From 917f64a6bf8f53cb158ed3cb0fa1924e5d323bea Mon Sep 17 00:00:00 2001 From: Satwik Miyyapuram Date: Tue, 1 Oct 2024 12:08:08 +0530 Subject: [PATCH] cleanup --- .github/workflows/main.yml | 31 +- go.mod | 34 - go.sum | 75 - .../access_tokens/access_tokens_client.go | 119 - .../generate_access_token_parameters.go | 153 - .../generate_access_token_responses.go | 187 - .../active_directory_client.go | 624 ---- ..._active_directory_principals_parameters.go | 153 - ...d_active_directory_principals_responses.go | 185 - ...reate_active_directory_entry_parameters.go | 153 - ...create_active_directory_entry_responses.go | 187 - ...elete_active_directory_entry_parameters.go | 153 - ...delete_active_directory_entry_responses.go | 173 - ...ble_trusted_domain_discovery_parameters.go | 175 - ...able_trusted_domain_discovery_responses.go | 187 - ...directory_domain_controllers_parameters.go | 163 - ..._directory_domain_controllers_responses.go | 187 - .../get_active_directory_entry_parameters.go | 256 -- .../get_active_directory_entry_responses.go | 185 - .../list_centrify_zones_parameters.go | 163 - .../list_centrify_zones_responses.go | 185 - ..._active_directory_principals_parameters.go | 364 -- ...h_active_directory_principals_responses.go | 185 - ..._active_directory_id_mapping_parameters.go | 175 - ...e_active_directory_id_mapping_responses.go | 187 - ...tory_ignored_trusted_domains_parameters.go | 175 - ...ctory_ignored_trusted_domains_responses.go | 187 - ...tive_directory_ldap_provider_parameters.go | 175 - ...ctive_directory_ldap_provider_responses.go | 187 - ...e_directory_machine_accounts_parameters.go | 175 - ...ve_directory_machine_accounts_responses.go | 187 - ...preferred_domain_controllers_parameters.go | 175 - ..._preferred_domain_controllers_responses.go | 187 - v1/client/alerts/alerts_client.go | 594 ---- .../create_notification_rule_parameters.go | 153 - .../create_notification_rule_responses.go | 187 - .../alerts/create_resolution_parameters.go | 153 - .../alerts/create_resolution_responses.go | 187 - .../delete_notification_rule_parameters.go | 154 - .../delete_notification_rule_responses.go | 173 - .../alerts/get_alert_by_id_parameters.go | 151 - v1/client/alerts/get_alert_by_id_responses.go | 187 - .../alerts/get_alert_categories_parameters.go | 128 - .../alerts/get_alert_categories_responses.go | 185 - .../alerts/get_alert_types_parameters.go | 211 -- v1/client/alerts/get_alert_types_responses.go | 185 - v1/client/alerts/get_alerts_parameters.go | 735 ---- v1/client/alerts/get_alerts_responses.go | 185 - .../get_notification_rules_parameters.go | 128 - .../get_notification_rules_responses.go | 185 - .../alerts/get_resolution_by_id_parameters.go | 154 - .../alerts/get_resolution_by_id_responses.go | 187 - .../alerts/get_resolutions_parameters.go | 403 --- v1/client/alerts/get_resolutions_responses.go | 185 - .../update_notification_rule_parameters.go | 128 - .../update_notification_rule_responses.go | 187 - .../alerts/update_resolution_parameters.go | 178 - .../alerts/update_resolution_responses.go | 187 - v1/client/analytics/analytics_client.go | 1262 ------- v1/client/analytics/analyze_jar_parameters.go | 150 - v1/client/analytics/analyze_jar_responses.go | 187 - ...ncel_map_reduce_instance_run_parameters.go | 151 - ...ancel_map_reduce_instance_run_responses.go | 187 - .../create_application_parameters.go | 150 - .../analytics/create_application_responses.go | 187 - .../analytics/create_mapper_parameters.go | 150 - .../analytics/create_mapper_responses.go | 187 - .../analytics/create_reducer_parameters.go | 150 - .../analytics/create_reducer_responses.go | 187 - .../delete_application_parameters.go | 151 - .../analytics/delete_application_responses.go | 173 - ...lete_map_reduce_instance_run_parameters.go | 151 - ...elete_map_reduce_instance_run_responses.go | 173 - .../analytics/delete_mapper_parameters.go | 151 - .../analytics/delete_mapper_responses.go | 173 - .../analytics/delete_reducer_parameters.go | 151 - .../analytics/delete_reducer_responses.go | 173 - .../delete_uploaded_jar_parameters.go | 150 - .../delete_uploaded_jar_responses.go | 173 - .../download_m_r_base_jar_parameters.go | 128 - .../download_m_r_base_jar_responses.go | 187 - .../download_m_r_output_files_parameters.go | 376 -- .../download_m_r_output_files_responses.go | 187 - .../get_application_by_id_parameters.go | 151 - .../get_application_by_id_responses.go | 187 - .../analytics/get_applications_parameters.go | 128 - .../analytics/get_applications_responses.go | 187 - .../get_m_r_upload_jar_path_parameters.go | 128 - .../get_m_r_upload_jar_path_responses.go | 187 - .../get_map_reduce_app_runs_parameters.go | 150 - .../get_map_reduce_app_runs_responses.go | 185 - .../get_map_reduce_file_formats_parameters.go | 215 -- .../get_map_reduce_file_formats_responses.go | 187 - .../analytics/get_mapper_by_id_parameters.go | 151 - .../analytics/get_mapper_by_id_responses.go | 187 - v1/client/analytics/get_mappers_parameters.go | 128 - v1/client/analytics/get_mappers_responses.go | 187 - .../analytics/get_reducer_by_id_parameters.go | 151 - .../analytics/get_reducer_by_id_responses.go | 187 - .../analytics/get_reducers_parameters.go | 128 - v1/client/analytics/get_reducers_responses.go | 187 - .../get_supported_patterns_parameters.go | 195 - .../get_supported_patterns_responses.go | 185 - .../run_map_reduce_app_instance_parameters.go | 150 - .../run_map_reduce_app_instance_responses.go | 187 - .../analytics/save_pattern_parameters.go | 150 - v1/client/analytics/save_pattern_responses.go | 173 - .../update_application_parameters.go | 172 - .../analytics/update_application_responses.go | 187 - .../analytics/update_mapper_parameters.go | 172 - .../analytics/update_mapper_responses.go | 187 - .../analytics/update_reducer_parameters.go | 172 - .../analytics/update_reducer_responses.go | 187 - v1/client/analytics/upload_jar_parameters.go | 128 - v1/client/analytics/upload_jar_responses.go | 187 - .../antivirus_service_group_client.go | 441 --- ...ntivirus_service_group_state_parameters.go | 150 - ...antivirus_service_group_state_responses.go | 187 - ...eate_antivirus_service_group_parameters.go | 153 - ...reate_antivirus_service_group_responses.go | 187 - ...lete_antivirus_service_group_parameters.go | 154 - ...elete_antivirus_service_group_responses.go | 173 - .../delete_infected_files_parameters.go | 153 - .../delete_infected_files_responses.go | 187 - .../get_antivirus_service_group_parameters.go | 128 - .../get_antivirus_service_group_responses.go | 185 - .../get_icap_connection_status_parameters.go | 175 - .../get_icap_connection_status_responses.go | 187 - .../get_infected_files_parameters.go | 352 -- .../get_infected_files_responses.go | 187 - ...date_antivirus_service_group_parameters.go | 153 - ...pdate_antivirus_service_group_responses.go | 187 - .../update_infected_files_parameters.go | 153 - .../update_infected_files_responses.go | 187 - v1/client/app/app_client.go | 261 -- v1/client/app/get_apps_parameters.go | 128 - v1/client/app/get_apps_responses.go | 185 - v1/client/app/install_app_parameters.go | 178 - v1/client/app/install_app_responses.go | 187 - v1/client/app/uninstall_app_parameters.go | 178 - v1/client/app/uninstall_app_responses.go | 173 - v1/client/app/upload_app_parameters.go | 163 - v1/client/app/upload_app_responses.go | 187 - v1/client/app_instance/app_instance_client.go | 233 -- .../get_app_instances_parameters.go | 128 - .../get_app_instances_responses.go | 185 - .../launch_app_instance_parameters.go | 153 - .../launch_app_instance_responses.go | 187 - ...update_app_instance_settings_parameters.go | 178 - .../update_app_instance_settings_responses.go | 173 - .../update_app_instance_state_parameters.go | 178 - .../update_app_instance_state_responses.go | 173 - .../athena_tokens/athena_tokens_client.go | 118 - .../generate_athena_token_parameters.go | 153 - .../generate_athena_token_responses.go | 187 - v1/client/audit/audit_client.go | 193 - .../get_audit_logs_actions_parameters.go | 128 - .../audit/get_audit_logs_actions_responses.go | 185 - .../get_audit_logs_categories_parameters.go | 128 - .../get_audit_logs_categories_responses.go | 185 - .../search_cluster_audit_logs_parameters.go | 615 ---- .../search_cluster_audit_logs_responses.go | 187 - .../activate_backup_job_parameters.go | 175 - .../activate_backup_job_responses.go | 187 - v1/client/backup_jobs/backup_jobs_client.go | 570 --- .../create_backup_job_parameters.go | 153 - .../create_backup_job_responses.go | 187 - .../deactivate_backup_job_parameters.go | 175 - .../deactivate_backup_job_responses.go | 187 - .../delete_backup_job_parameters.go | 175 - .../delete_backup_job_responses.go | 173 - .../delete_backup_job_runs_parameters.go | 150 - .../delete_backup_job_runs_responses.go | 173 - .../get_backup_job_audit_parameters.go | 154 - .../get_backup_job_audit_responses.go | 185 - .../get_backup_job_by_id_parameters.go | 154 - .../get_backup_job_by_id_responses.go | 185 - .../get_backup_job_history_parameters.go | 154 - .../get_backup_job_history_responses.go | 185 - .../get_backup_job_runs_parameters.go | 961 ----- .../get_backup_job_runs_responses.go | 185 - .../backup_jobs/get_backup_jobs_parameters.go | 593 ---- .../backup_jobs/get_backup_jobs_responses.go | 185 - .../get_backup_jobs_summary_parameters.go | 1063 ------ .../get_backup_jobs_summary_responses.go | 187 - .../update_backup_job_parameters.go | 175 - .../update_backup_job_responses.go | 187 - .../backup_sources/backup_sources_client.go | 777 ---- ...elete_app_owner_registration_parameters.go | 150 - ...delete_app_owner_registration_responses.go | 173 - .../delete_backup_source_parameters.go | 154 - .../delete_backup_source_responses.go | 173 - .../get_backup_entities_parameters.go | 128 - .../get_backup_entities_responses.go | 185 - .../get_backup_entity_by_id_parameters.go | 154 - .../get_backup_entity_by_id_responses.go | 185 - .../get_datastores_parameters.go | 273 -- .../get_datastores_responses.go | 185 - .../get_network_entities_parameters.go | 273 -- .../get_network_entities_responses.go | 185 - .../get_resource_pools_parameters.go | 202 -- .../get_resource_pools_responses.go | 185 - .../get_virtual_machines_parameters.go | 128 - .../get_virtual_machines_responses.go | 185 - .../get_vmware_folders_parameters.go | 273 -- .../get_vmware_folders_responses.go | 187 - .../list_app_entities_parameters.go | 311 -- .../list_app_entities_responses.go | 185 - .../list_backup_sources_parameters.go | 1358 ------- .../list_backup_sources_responses.go | 187 - .../list_entities_of_type_parameters.go | 1311 ------- .../list_entities_of_type_responses.go | 185 - ...st_registered_sources_report_parameters.go | 327 -- ...ist_registered_sources_report_responses.go | 187 - .../register_app_owner_parameters.go | 150 - .../register_app_owner_responses.go | 173 - .../register_backup_source_parameters.go | 153 - .../register_backup_source_responses.go | 173 - ...pdate_app_owner_registration_parameters.go | 150 - ...update_app_owner_registration_responses.go | 173 - ...te_backup_source_access_info_parameters.go | 178 - ...ate_backup_source_access_info_responses.go | 173 - v1/client/banner/banner_client.go | 151 - v1/client/banner/get_banner_parameters.go | 128 - v1/client/banner/get_banner_responses.go | 187 - v1/client/banner/update_banner_parameters.go | 153 - v1/client/banner/update_banner_responses.go | 187 - v1/client/certificates/certificates_client.go | 273 -- ...elete_web_server_certificate_parameters.go | 128 - ...delete_web_server_certificate_responses.go | 173 - .../deploy_host_certificate_parameters.go | 153 - .../deploy_host_certificate_responses.go | 187 - .../get_certificate_list_parameters.go | 128 - .../get_certificate_list_responses.go | 187 - .../get_web_server_certificate_parameters.go | 128 - .../get_web_server_certificate_responses.go | 187 - ...pdate_web_server_certificate_parameters.go | 150 - ...update_web_server_certificate_responses.go | 187 - v1/client/clone/clone_client.go | 103 - v1/client/clone/clone_vms_parameters.go | 153 - v1/client/clone/clone_vms_responses.go | 187 - .../clone_application/clone_app_parameters.go | 153 - .../clone_application/clone_app_responses.go | 187 - .../clone_application_client.go | 103 - .../clone_refresh_tasks_client.go | 107 - .../create_clone_refresh_task_parameters.go | 153 - .../create_clone_refresh_task_responses.go | 187 - v1/client/cluster/cluster_client.go | 321 -- .../cluster/get_app_settings_parameters.go | 128 - .../cluster/get_app_settings_responses.go | 187 - .../get_basic_cluster_info_parameters.go | 128 - .../get_basic_cluster_info_responses.go | 187 - v1/client/cluster/get_cluster_parameters.go | 234 -- v1/client/cluster/get_cluster_responses.go | 187 - .../cluster/get_cluster_status_parameters.go | 128 - .../cluster/get_cluster_status_responses.go | 187 - .../cluster/update_app_settings_parameters.go | 153 - .../cluster/update_app_settings_responses.go | 187 - .../cluster/update_cluster_parameters.go | 153 - v1/client/cluster/update_cluster_responses.go | 187 - .../cluster_partitions_client.go | 150 - .../get_cluster_partition_by_id_parameters.go | 154 - .../get_cluster_partition_by_id_responses.go | 249 -- .../get_cluster_partitions_parameters.go | 226 -- .../get_cluster_partitions_responses.go | 185 - .../change_service_state_parameters.go | 150 - .../change_service_state_responses.go | 187 - .../cluster_list_masters_parameters.go | 128 - .../cluster_list_masters_responses.go | 187 - v1/client/clusters/clusters_client.go | 1731 --------- .../create_cloud_cluster_parameters.go | 150 - .../create_cloud_cluster_responses.go | 187 - .../create_physical_cluster_parameters.go | 150 - .../create_physical_cluster_responses.go | 187 - .../create_virtual_cluster_parameters.go | 150 - .../create_virtual_cluster_responses.go | 187 - .../clusters/destroy_cluster_parameters.go | 128 - .../clusters/destroy_cluster_responses.go | 173 - .../clusters/download_snmp_mibs_parameters.go | 128 - .../clusters/download_snmp_mibs_responses.go | 185 - .../expand_cloud_cluster_parameters.go | 150 - .../expand_cloud_cluster_responses.go | 187 - .../expand_physical_cluster_parameters.go | 150 - .../expand_physical_cluster_responses.go | 187 - ...background_activity_schedule_parameters.go | 128 - ..._background_activity_schedule_responses.go | 187 - .../get_client_subnet_whitelist_parameters.go | 128 - .../get_client_subnet_whitelist_responses.go | 187 - ...et_cluster_creation_progress_parameters.go | 128 - ...get_cluster_creation_progress_responses.go | 187 - .../clusters/get_cluster_keys_parameters.go | 128 - .../clusters/get_cluster_keys_responses.go | 187 - .../get_cluster_platforms_parameters.go | 128 - .../get_cluster_platforms_responses.go | 185 - .../get_cluster_public_key_parameters.go | 128 - .../get_cluster_public_key_responses.go | 185 - .../clusters/get_cluster_stats_parameters.go | 128 - .../clusters/get_cluster_stats_responses.go | 187 - .../get_cluster_subnets_parameters.go | 128 - .../clusters/get_cluster_subnets_responses.go | 185 - .../get_cluster_upgrade_status_parameters.go | 128 - .../get_cluster_upgrade_status_responses.go | 187 - .../get_external_client_subnets_parameters.go | 211 -- .../get_external_client_subnets_responses.go | 187 - ..._io_preferential_tier_mixin0_parameters.go | 128 - ...t_io_preferential_tier_mixin0_responses.go | 187 - .../get_io_preferential_tier_parameters.go | 128 - .../get_io_preferential_tier_responses.go | 187 - .../get_n_f_s_export_paths_parameters.go | 128 - .../get_n_f_s_export_paths_responses.go | 187 - .../clusters/get_ntp_servers_parameters.go | 128 - .../clusters/get_ntp_servers_responses.go | 187 - .../clusters/get_proxy_servers_parameters.go | 128 - .../clusters/get_proxy_servers_responses.go | 185 - .../clusters/get_service_gflag_parameters.go | 128 - .../clusters/get_service_gflag_responses.go | 185 - .../list_service_states_parameters.go | 128 - .../clusters/list_service_states_responses.go | 185 - .../put_io_preferential_tier_parameters.go | 150 - .../put_io_preferential_tier_responses.go | 187 - v1/client/clusters/remove_node_parameters.go | 154 - v1/client/clusters/remove_node_responses.go | 173 - .../remove_proxy_server_parameters.go | 151 - .../clusters/remove_proxy_server_responses.go | 173 - ...background_activity_schedule_parameters.go | 128 - ..._background_activity_schedule_responses.go | 187 - ...date_client_subnet_whitelist_parameters.go | 150 - ...pdate_client_subnet_whitelist_responses.go | 187 - .../update_cluster_subnets_parameters.go | 128 - .../update_cluster_subnets_responses.go | 185 - ...date_external_client_subnets_parameters.go | 150 - ...pdate_external_client_subnets_responses.go | 187 - .../update_io_preferential_tier_parameters.go | 150 - .../update_io_preferential_tier_responses.go | 187 - .../clusters/update_ntp_servers_parameters.go | 150 - .../clusters/update_ntp_servers_responses.go | 187 - .../update_proxy_server_parameters.go | 172 - .../clusters/update_proxy_server_responses.go | 187 - .../update_service_flag_parameters.go | 150 - .../clusters/update_service_flag_responses.go | 185 - .../update_service_gflag_parameters.go | 128 - .../update_service_gflag_responses.go | 185 - .../clusters/upgrade_cluster_parameters.go | 150 - .../clusters/upgrade_cluster_responses.go | 187 - .../cohesity_internal_r_e_s_t_api_client.go | 482 --- v1/client/command/command_client.go | 147 - .../linux_command_execute_parameters.go | 128 - .../linux_command_execute_responses.go | 185 - .../command/linux_command_list_parameters.go | 128 - .../command/linux_command_list_responses.go | 185 - .../custom_reporting_client.go | 105 - .../get_postgres_parameters.go | 128 - .../get_postgres_responses.go | 185 - v1/client/dashboard/dashboard_client.go | 105 - .../dashboard/get_dashboard_parameters.go | 294 -- .../dashboard/get_dashboard_responses.go | 187 - v1/client/deploy/deploy_client.go | 105 - v1/client/deploy/deploy_vms_parameters.go | 153 - v1/client/deploy/deploy_vms_responses.go | 187 - .../destroy_clone/destroy_clone_client.go | 103 - .../destroy_clone_task_parameters.go | 154 - .../destroy_clone_task_responses.go | 187 - v1/client/disks/disks_client.go | 318 -- v1/client/disks/get_disk_by_id_parameters.go | 154 - v1/client/disks/get_disk_by_id_responses.go | 185 - v1/client/disks/get_disk_stats_parameters.go | 361 -- v1/client/disks/get_disk_stats_responses.go | 185 - v1/client/disks/get_disks_parameters.go | 361 -- v1/client/disks/get_disks_responses.go | 185 - .../disks/mark_disk_for_removal_parameters.go | 154 - .../disks/mark_disk_for_removal_responses.go | 187 - v1/client/disks/update_disk_parameters.go | 175 - v1/client/disks/update_disk_responses.go | 187 - ...pdate_hydra_disk_reservation_parameters.go | 150 - ...update_hydra_disk_reservation_responses.go | 185 - .../download_files/download_files_client.go | 103 - .../download_files_parameters.go | 712 ---- .../download_files_responses.go | 173 - v1/client/file/file_client.go | 183 - .../file/get_file_restore_info_parameters.go | 393 --- .../file/get_file_restore_info_responses.go | 185 - v1/client/file/get_file_stat_parameters.go | 128 - v1/client/file/get_file_stat_responses.go | 185 - .../file/get_file_versions_parameters.go | 347 -- v1/client/file/get_file_versions_responses.go | 187 - .../get_kms_status_parameters.go | 163 - .../get_kms_status_responses.go | 187 - .../getkms_status_response_client.go | 103 - v1/client/groups/create_group_parameters.go | 153 - v1/client/groups/create_group_responses.go | 187 - v1/client/groups/delete_groups_parameters.go | 153 - v1/client/groups/delete_groups_responses.go | 173 - v1/client/groups/get_groups_parameters.go | 318 -- v1/client/groups/get_groups_responses.go | 185 - v1/client/groups/groups_client.go | 244 -- v1/client/groups/update_group_parameters.go | 153 - v1/client/groups/update_group_responses.go | 187 - ...add_idp_directory_principals_parameters.go | 153 - .../add_idp_directory_principals_responses.go | 185 - v1/client/idps/create_idp_parameters.go | 153 - v1/client/idps/create_idp_responses.go | 187 - v1/client/idps/delete_idp_parameters.go | 154 - v1/client/idps/delete_idp_responses.go | 173 - v1/client/idps/get_idps_parameters.go | 349 -- v1/client/idps/get_idps_responses.go | 185 - v1/client/idps/idp_login_parameters.go | 164 - v1/client/idps/idp_login_responses.go | 173 - v1/client/idps/idps_client.go | 326 -- v1/client/idps/update_idp_parameters.go | 178 - v1/client/idps/update_idp_responses.go | 187 - .../create_interface_group_parameters.go | 150 - .../create_interface_group_responses.go | 187 - .../delete_interface_group_parameters.go | 151 - .../delete_interface_group_responses.go | 173 - .../get_interface_groups_parameters.go | 128 - .../get_interface_groups_responses.go | 185 - .../interface_group/interface_group_client.go | 231 -- .../update_interface_group_parameters.go | 150 - .../update_interface_group_responses.go | 187 - .../interface_operations_client.go | 145 - .../list_interface_parameters.go | 370 -- .../list_interface_responses.go | 185 - .../update_interface_parameters.go | 150 - .../update_interface_responses.go | 187 - v1/client/ip/configure_ip_parameters.go | 150 - v1/client/ip/configure_ip_responses.go | 187 - v1/client/ip/ip_client.go | 147 - v1/client/ip/unconfigure_ip_parameters.go | 150 - v1/client/ip/unconfigure_ip_responses.go | 173 - .../create_kms_config_parameters.go | 150 - .../create_kms_config_responses.go | 187 - .../delete_kms_config_parameters.go | 178 - .../delete_kms_config_responses.go | 173 - .../get_kms_config_parameters.go | 200 -- .../get_kms_config_responses.go | 185 - .../kms_configuration_client.go | 227 -- .../update_kms_config_parameters.go | 150 - .../update_kms_config_responses.go | 187 - .../create_ldap_provider_parameters.go | 153 - .../create_ldap_provider_responses.go | 187 - .../delete_ldap_provider_parameters.go | 154 - .../delete_ldap_provider_responses.go | 173 - .../get_ldap_provider_parameters.go | 256 -- .../get_ldap_provider_responses.go | 185 - .../get_ldap_provider_status_parameters.go | 154 - .../get_ldap_provider_status_responses.go | 173 - .../ldap_provider/ldap_provider_client.go | 267 -- .../update_ldap_provider_parameters.go | 153 - .../update_ldap_provider_responses.go | 187 - .../accept_license_parameters.go | 153 - .../accept_license_responses.go | 173 - .../license_agreement_client.go | 147 - .../update_eula_parameters.go | 128 - .../update_eula_responses.go | 187 - .../monitoring/get_all_job_runs_parameters.go | 401 --- .../monitoring/get_all_job_runs_responses.go | 185 - .../monitoring/get_job_run_info_parameters.go | 215 -- .../monitoring/get_job_run_info_responses.go | 187 - .../get_run_objects_details_parameters.go | 215 -- .../get_run_objects_details_responses.go | 185 - v1/client/monitoring/monitoring_client.go | 191 - v1/client/network/append_hosts_parameters.go | 150 - v1/client/network/append_hosts_responses.go | 187 - v1/client/network/create_bond_parameters.go | 150 - v1/client/network/create_bond_responses.go | 187 - .../network/create_ip_config_parameters.go | 150 - .../network/create_ip_config_responses.go | 187 - v1/client/network/delete_bond_parameters.go | 151 - v1/client/network/delete_bond_responses.go | 173 - v1/client/network/delete_hosts_parameters.go | 176 - v1/client/network/delete_hosts_responses.go | 187 - .../network/delete_ip_config_parameters.go | 150 - .../network/delete_ip_config_responses.go | 173 - v1/client/network/edit_hosts_parameters.go | 150 - v1/client/network/edit_hosts_responses.go | 187 - v1/client/network/list_hosts_parameters.go | 128 - v1/client/network/list_hosts_responses.go | 185 - v1/client/network/network_client.go | 409 --- v1/client/nodes/get_node_by_id_parameters.go | 154 - v1/client/nodes/get_node_by_id_responses.go | 185 - v1/client/nodes/get_node_stats_parameters.go | 128 - v1/client/nodes/get_node_stats_responses.go | 185 - v1/client/nodes/get_node_status_parameters.go | 128 - v1/client/nodes/get_node_status_responses.go | 187 - v1/client/nodes/get_nodes_parameters.go | 363 -- v1/client/nodes/get_nodes_responses.go | 185 - v1/client/nodes/list_free_nodes_parameters.go | 128 - v1/client/nodes/list_free_nodes_responses.go | 185 - .../nodes/mark_node_for_removal_parameters.go | 175 - .../nodes/mark_node_for_removal_responses.go | 187 - v1/client/nodes/nodes_client.go | 407 --- v1/client/nodes/update_node_parameters.go | 175 - v1/client/nodes/update_node_responses.go | 187 - v1/client/nodes/upgrade_node_parameters.go | 150 - v1/client/nodes/upgrade_node_responses.go | 187 - .../get_notifications_parameters.go | 148 - .../get_notifications_responses.go | 187 - .../notifications/notifications_client.go | 145 - .../update_notifications_parameters.go | 153 - .../update_notifications_responses.go | 173 - .../packages/download_package_parameters.go | 150 - .../packages/download_package_responses.go | 187 - .../packages/list_packages_parameters.go | 128 - v1/client/packages/list_packages_responses.go | 185 - v1/client/packages/packages_client.go | 194 - .../packages/upload_package_parameters.go | 128 - .../packages/upload_package_responses.go | 187 - .../passwords/password_strength_parameters.go | 150 - .../passwords/password_strength_responses.go | 187 - v1/client/passwords/passwords_client.go | 105 - .../get_user_preferences_parameters.go | 128 - .../get_user_preferences_responses.go | 187 - .../patch_user_preferences_parameters.go | 151 - .../patch_user_preferences_responses.go | 187 - v1/client/preferences/preferences_client.go | 187 - .../update_user_preferences_parameters.go | 151 - .../update_user_preferences_responses.go | 187 - .../create_user_api_key_parameters.go | 175 - .../create_user_api_key_responses.go | 187 - .../principals/create_user_parameters.go | 153 - v1/client/principals/create_user_responses.go | 187 - .../delete_user_api_key_parameters.go | 173 - .../delete_user_api_key_responses.go | 173 - .../principals/delete_users_parameters.go | 153 - .../principals/delete_users_responses.go | 173 - .../get_all_user_api_keys_parameters.go | 175 - .../get_all_user_api_keys_responses.go | 185 - .../principals/get_session_user_parameters.go | 128 - .../principals/get_session_user_responses.go | 187 - .../get_user_api_key_by_id_parameters.go | 173 - .../get_user_api_key_by_id_responses.go | 187 - .../get_user_api_keys_parameters.go | 197 -- .../principals/get_user_api_keys_responses.go | 185 - .../get_user_privileges_parameters.go | 128 - .../get_user_privileges_responses.go | 185 - v1/client/principals/get_users_parameters.go | 376 -- v1/client/principals/get_users_responses.go | 185 - ...pport_user_bash_shell_access_parameters.go | 150 - ...upport_user_bash_shell_access_responses.go | 187 - ...nux_support_user_sudo_access_parameters.go | 150 - ...inux_support_user_sudo_access_responses.go | 187 - .../list_sources_for_principals_parameters.go | 176 - .../list_sources_for_principals_responses.go | 185 - v1/client/principals/principals_client.go | 942 ----- .../reset_s3_secret_key_parameters.go | 153 - .../reset_s3_secret_key_responses.go | 187 - .../rotate_user_api_key_parameters.go | 173 - .../rotate_user_api_key_responses.go | 187 - .../search_principals_parameters.go | 364 -- .../principals/search_principals_responses.go | 185 - .../update_linux_credentials_parameters.go | 150 - .../update_linux_credentials_responses.go | 187 - ...pdate_sources_for_principals_parameters.go | 154 - ...update_sources_for_principals_responses.go | 173 - .../update_user_api_key_parameters.go | 197 -- .../update_user_api_key_responses.go | 187 - .../principals/update_user_parameters.go | 153 - v1/client/principals/update_user_responses.go | 187 - .../principals/verify_otp_code_parameters.go | 153 - .../principals/verify_otp_code_responses.go | 187 - .../privileges/get_privileges_parameters.go | 163 - .../privileges/get_privileges_responses.go | 185 - v1/client/privileges/privileges_client.go | 111 - .../change_protection_job_state_parameters.go | 175 - .../change_protection_job_state_responses.go | 173 - .../create_protection_job_parameters.go | 153 - .../create_protection_job_responses.go | 187 - .../delete_protection_job_parameters.go | 178 - .../delete_protection_job_responses.go | 173 - .../get_protection_job_audit_parameters.go | 154 - .../get_protection_job_audit_responses.go | 185 - .../get_protection_job_by_id_parameters.go | 154 - .../get_protection_job_by_id_responses.go | 187 - .../get_protection_jobs_parameters.go | 720 ---- .../get_protection_jobs_responses.go | 185 - .../protection_jobs/protection_jobs_client.go | 469 --- .../run_protection_job_parameters.go | 179 - .../run_protection_job_responses.go | 173 - .../update_protection_job_parameters.go | 178 - .../update_protection_job_responses.go | 187 - ...update_protection_jobs_state_parameters.go | 150 - .../update_protection_jobs_state_responses.go | 187 - ...et_protection_object_summary_parameters.go | 159 - ...get_protection_object_summary_responses.go | 187 - .../protect_object_parameters.go | 150 - .../protect_object_responses.go | 185 - .../protection_objects_client.go | 229 -- .../unprotect_object_parameters.go | 150 - .../unprotect_object_responses.go | 173 - .../update_protection_object_parameters.go | 150 - .../update_protection_object_responses.go | 190 - .../create_protection_policy_parameters.go | 153 - .../create_protection_policy_responses.go | 187 - .../delete_protection_policy_parameters.go | 151 - .../delete_protection_policy_responses.go | 173 - .../get_protection_policies_parameters.go | 477 --- .../get_protection_policies_responses.go | 185 - .../get_protection_policy_by_id_parameters.go | 151 - .../get_protection_policy_by_id_responses.go | 187 - ...et_protection_policy_summary_parameters.go | 379 -- ...get_protection_policy_summary_responses.go | 187 - .../protection_policies_client.go | 316 -- .../update_protection_policy_parameters.go | 175 - .../update_protection_policy_responses.go | 187 - .../cancel_protection_job_run_parameters.go | 175 - .../cancel_protection_job_run_responses.go | 173 - .../get_protection_run_errors_parameters.go | 291 -- .../get_protection_run_errors_responses.go | 187 - .../get_protection_runs_parameters.go | 743 ---- .../get_protection_runs_responses.go | 185 - .../protection_runs/protection_runs_client.go | 240 -- .../update_protection_runs_parameters.go | 153 - .../update_protection_runs_responses.go | 173 - .../download_cft_file_parameters.go | 153 - .../download_cft_file_responses.go | 187 - .../download_physical_agent_parameters.go | 347 -- .../download_physical_agent_responses.go | 185 - ...tection_sources_object_by_id_parameters.go | 154 - ...otection_sources_object_by_id_responses.go | 187 - ...t_protection_sources_objects_parameters.go | 175 - ...et_protection_sources_objects_responses.go | 185 - .../list_application_servers_parameters.go | 379 -- .../list_application_servers_responses.go | 185 - .../list_data_store_information_parameters.go | 159 - .../list_data_store_information_responses.go | 185 - .../list_exchange_dag_hosts_parameters.go | 201 -- .../list_exchange_dag_hosts_responses.go | 187 - .../list_protected_objects_parameters.go | 378 -- .../list_protected_objects_responses.go | 185 - .../list_protection_sources_parameters.go | 1471 -------- ...on_sources_registration_info_parameters.go | 668 ---- ...ion_sources_registration_info_responses.go | 187 - .../list_protection_sources_responses.go | 185 - ...rotection_sources_root_nodes_parameters.go | 255 -- ...protection_sources_root_nodes_responses.go | 185 - ..._sql_aag_hosts_and_databases_parameters.go | 177 - ...t_sql_aag_hosts_and_databases_responses.go | 187 - .../list_virtual_machines_parameters.go | 334 -- .../list_virtual_machines_responses.go | 185 - .../protection_sources_client.go | 1047 ------ ...resh_protection_source_by_id_parameters.go | 157 - ...fresh_protection_source_by_id_responses.go | 173 - ...register_application_servers_parameters.go | 153 - .../register_application_servers_responses.go | 187 - .../register_protection_source_parameters.go | 153 - .../register_protection_source_responses.go | 187 - .../run_diagnostics_parameters.go | 154 - .../run_diagnostics_responses.go | 187 - ...register_application_servers_parameters.go | 180 - ...nregister_application_servers_responses.go | 187 - ...unregister_protection_source_parameters.go | 156 - .../unregister_protection_source_responses.go | 173 - .../update_application_servers_parameters.go | 154 - .../update_application_servers_responses.go | 187 - .../update_protection_source_parameters.go | 178 - .../update_protection_source_responses.go | 187 - .../upgrade_physical_agents_parameters.go | 153 - .../upgrade_physical_agents_responses.go | 187 - .../recover_app_parameters.go | 153 - .../recover_app_responses.go | 187 - .../recover_application_client.go | 103 - .../create_remote_cluster_parameters.go | 153 - .../create_remote_cluster_responses.go | 187 - .../delete_remote_cluster_parameters.go | 154 - .../delete_remote_cluster_responses.go | 173 - .../get_remote_cluster_by_id_parameters.go | 154 - .../get_remote_cluster_by_id_responses.go | 185 - .../get_remote_clusters_parameters.go | 322 -- .../get_remote_clusters_responses.go | 185 - ...t_replication_encryption_key_parameters.go | 128 - ...et_replication_encryption_key_responses.go | 187 - .../remote_cluster/remote_cluster_client.go | 332 -- .../update_remote_cluster_parameters.go | 178 - .../update_remote_cluster_responses.go | 187 - ...oud_domain_migration_request_parameters.go | 153 - ...loud_domain_migration_request_responses.go | 173 - ...te_remote_vault_restore_task_parameters.go | 153 - ...ate_remote_vault_restore_task_responses.go | 187 - ...eate_remote_vault_search_job_parameters.go | 153 - ...reate_remote_vault_search_job_responses.go | 187 - ...ote_vault_search_job_results_parameters.go | 331 -- ...mote_vault_search_job_results_responses.go | 187 - .../list_cloud_domain_migration_parameters.go | 157 - .../list_cloud_domain_migration_responses.go | 187 - ...t_remote_vault_restore_tasks_parameters.go | 128 - ...st_remote_vault_restore_tasks_responses.go | 185 - ...emote_vault_search_job_by_id_parameters.go | 154 - ...remote_vault_search_job_by_id_responses.go | 187 - ...ist_remote_vault_search_jobs_parameters.go | 128 - ...list_remote_vault_search_jobs_responses.go | 185 - .../remote_restore/remote_restore_client.go | 530 --- ...stop_remote_vault_search_job_parameters.go | 153 - .../stop_remote_vault_search_job_responses.go | 173 - ...upload_vault_encryption_keys_parameters.go | 178 - .../upload_vault_encryption_keys_responses.go | 173 - .../get_agent_deployment_report_parameters.go | 320 -- .../get_agent_deployment_report_responses.go | 185 - ...cloud_archive_report_request_parameters.go | 128 - ..._cloud_archive_report_request_responses.go | 187 - ...r_from_vaults_report_request_parameters.go | 329 -- ...er_from_vaults_report_request_responses.go | 187 - ...fer_to_vaults_report_request_parameters.go | 329 -- ...sfer_to_vaults_report_request_responses.go | 187 - .../reports/get_gdpr_report_parameters.go | 455 --- .../reports/get_gdpr_report_responses.go | 185 - ...bjects_trends_report_request_parameters.go | 579 --- ...objects_trends_report_request_responses.go | 185 - ...rces_job_runs_report_request_parameters.go | 554 --- ...urces_job_runs_report_request_responses.go | 185 - ..._jobs_summary_report_request_parameters.go | 667 ---- ...s_jobs_summary_report_request_responses.go | 187 - v1/client/reports/reports_client.go | 420 --- v1/client/restore/recover_vms_parameters.go | 153 - v1/client/restore/recover_vms_responses.go | 187 - v1/client/restore/restore_client.go | 103 - .../check_restore_app_task_parameters.go | 153 - .../check_restore_app_task_responses.go | 187 - .../get_restore_app_time_ranges_parameters.go | 153 - .../get_restore_app_time_ranges_responses.go | 187 - v1/client/restore_app/restore_app_client.go | 143 - .../restore_files/restore_files_client.go | 103 - .../restore_files/restore_files_parameters.go | 153 - .../restore_files/restore_files_responses.go | 187 - .../ad_objects_restore_status_parameters.go | 167 - .../ad_objects_restore_status_responses.go | 187 - .../cancel_restore_task_parameters.go | 154 - .../cancel_restore_task_responses.go | 173 - .../compare_ad_objects_parameters.go | 154 - .../compare_ad_objects_responses.go | 185 - ...eate_applications_clone_task_parameters.go | 153 - ...reate_applications_clone_task_responses.go | 187 - ...te_applications_recover_task_parameters.go | 154 - ...ate_applications_recover_task_responses.go | 187 - .../create_clone_task_parameters.go | 153 - .../create_clone_task_responses.go | 187 - .../create_deploy_task_parameters.go | 153 - .../create_deploy_task_responses.go | 187 - ...e_download_files_and_folders_parameters.go | 154 - ...te_download_files_and_folders_responses.go | 187 - .../create_recover_task_parameters.go | 154 - .../create_recover_task_responses.go | 187 - .../create_restore_files_task_parameters.go | 153 - .../create_restore_files_task_responses.go | 187 - .../get_ad_domain_root_topology_parameters.go | 160 - .../get_ad_domain_root_topology_responses.go | 185 - .../get_ad_objects_parameters.go | 508 --- .../restore_tasks/get_ad_objects_responses.go | 187 - .../get_file_fstat_information_parameters.go | 522 --- .../get_file_fstat_information_responses.go | 187 - ...t_file_snapshots_information_parameters.go | 283 -- ...et_file_snapshots_information_responses.go | 185 - .../get_one_drive_documents_parameters.go | 369 -- .../get_one_drive_documents_responses.go | 187 - .../get_outlook_emails_parameters.go | 784 ----- .../get_outlook_emails_responses.go | 187 - .../get_restore_job_by_id_parameters.go | 154 - .../get_restore_job_by_id_responses.go | 185 - .../get_restore_jobs_parameters.go | 497 --- .../get_restore_jobs_responses.go | 185 - ...estore_points_for_time_range_parameters.go | 150 - ...restore_points_for_time_range_responses.go | 187 - .../get_restore_task_by_id_parameters.go | 154 - .../get_restore_task_by_id_responses.go | 187 - .../get_restore_tasks_parameters.go | 472 --- .../get_restore_tasks_responses.go | 185 - .../get_sharepoint_documents_parameters.go | 369 -- .../get_sharepoint_documents_responses.go | 187 - ...get_virtual_disk_information_parameters.go | 447 --- .../get_virtual_disk_information_responses.go | 185 - .../get_vm_directory_list_parameters.go | 632 ---- .../get_vm_directory_list_responses.go | 187 - .../get_vm_volumes_information_parameters.go | 461 --- .../get_vm_volumes_information_responses.go | 187 - .../list_org_vdc_networks_parameters.go | 154 - .../list_org_vdc_networks_responses.go | 189 - .../list_storage_profiles_parameters.go | 154 - .../list_storage_profiles_responses.go | 187 - .../public_destroy_clone_task_parameters.go | 154 - .../public_destroy_clone_task_responses.go | 173 - .../restore_tasks/restore_tasks_client.go | 1493 -------- .../search_ad_objects_parameters.go | 421 --- .../search_ad_objects_responses.go | 185 - .../search_objects_parameters.go | 748 ---- .../restore_tasks/search_objects_responses.go | 187 - ...search_production_ad_objects_parameters.go | 153 - .../search_production_ad_objects_responses.go | 185 - .../search_restored_files_parameters.go | 875 ----- .../search_restored_files_responses.go | 187 - .../update_restore_task_parameters.go | 150 - .../update_restore_task_responses.go | 189 - v1/client/roles/create_role_parameters.go | 153 - v1/client/roles/create_role_responses.go | 187 - v1/client/roles/delete_roles_parameters.go | 153 - v1/client/roles/delete_roles_responses.go | 173 - v1/client/roles/get_roles_parameters.go | 245 -- v1/client/roles/get_roles_responses.go | 185 - v1/client/roles/roles_client.go | 241 -- v1/client/roles/update_role_parameters.go | 175 - v1/client/roles/update_role_responses.go | 187 - v1/client/routes/add_route_parameters.go | 150 - v1/client/routes/add_route_responses.go | 187 - v1/client/routes/delete_route_parameters.go | 150 - v1/client/routes/delete_route_responses.go | 173 - v1/client/routes/get_routes_parameters.go | 128 - v1/client/routes/get_routes_responses.go | 185 - v1/client/routes/routes_client.go | 189 - .../close_smb_file_open_parameters.go | 153 - .../close_smb_file_open_responses.go | 173 - .../get_smb_file_opens_parameters.go | 276 -- .../get_smb_file_opens_responses.go | 187 - .../s_m_b_file_opens/smb_file_opens_client.go | 150 - .../create_scheduler_job_parameters.go | 150 - .../create_scheduler_job_responses.go | 263 -- .../delete_scheduler_jobs_parameters.go | 151 - .../delete_scheduler_jobs_responses.go | 173 - .../get_scheduler_jobs_parameters.go | 256 -- .../scheduler/get_scheduler_jobs_responses.go | 187 - v1/client/scheduler/scheduler_client.go | 243 -- .../update_scheduler_job_parameters.go | 153 - .../update_scheduler_job_responses.go | 187 - v1/client/search/search_client.go | 147 - .../search_protection_runs_parameters.go | 156 - .../search_protection_runs_responses.go | 187 - .../search_protection_sources_parameters.go | 728 ---- .../search_protection_sources_responses.go | 185 - v1/client/search_files/search_files_client.go | 103 - .../search_files/search_files_parameters.go | 1689 --------- .../search_files/search_files_responses.go | 187 - v1/client/search_vms/search_vms_client.go | 103 - v1/client/search_vms/search_vms_parameters.go | 981 ------ v1/client/search_vms/search_vms_responses.go | 187 - v1/client/snmp/get_snmp_config_parameters.go | 128 - v1/client/snmp/get_snmp_config_responses.go | 187 - v1/client/snmp/snmp_client.go | 143 - .../snmp/update_snmp_config_parameters.go | 153 - .../snmp/update_snmp_config_responses.go | 187 - .../statistics/get_entities_parameters.go | 346 -- .../statistics/get_entities_responses.go | 185 - .../get_entities_schema_parameters.go | 224 -- .../get_entities_schema_responses.go | 185 - .../get_entity_schema_by_name_parameters.go | 151 - .../get_entity_schema_by_name_responses.go | 185 - .../get_file_downloads_counter_parameters.go | 128 - .../get_file_downloads_counter_responses.go | 185 - ...get_progress_monitor_by_path_parameters.go | 405 --- .../get_progress_monitor_by_path_responses.go | 187 - .../get_progress_monitors_parameters.go | 383 -- .../get_progress_monitors_responses.go | 187 - v1/client/statistics/get_tasks_parameters.go | 409 --- v1/client/statistics/get_tasks_responses.go | 185 - .../get_time_series_schema_parameters.go | 218 -- .../get_time_series_schema_responses.go | 187 - .../get_time_series_stats_parameters.go | 488 --- .../get_time_series_stats_responses.go | 187 - v1/client/statistics/statistics_client.go | 467 --- .../get_active_alerts_stats_parameters.go | 188 - .../get_active_alerts_stats_responses.go | 187 - .../stats/get_consumer_stats_parameters.go | 690 ---- .../stats/get_consumer_stats_responses.go | 187 - .../get_file_distribution_stats_parameters.go | 156 - .../get_file_distribution_stats_responses.go | 185 - ...et_last_protection_run_stats_parameters.go | 202 -- ...get_last_protection_run_stats_responses.go | 187 - ...et_protected_objects_summary_parameters.go | 175 - ...get_protected_objects_summary_responses.go | 187 - .../get_protection_runs_stats_parameters.go | 215 -- .../get_protection_runs_stats_responses.go | 187 - .../stats/get_restore_stats_parameters.go | 188 - .../stats/get_restore_stats_responses.go | 187 - .../stats/get_storage_stats_parameters.go | 128 - .../stats/get_storage_stats_responses.go | 187 - .../stats/get_tenant_stats_parameters.go | 528 --- v1/client/stats/get_tenant_stats_responses.go | 187 - .../get_vault_provider_stats_parameters.go | 156 - .../get_vault_provider_stats_responses.go | 185 - .../stats/get_vault_run_stats_parameters.go | 242 -- .../stats/get_vault_run_stats_responses.go | 187 - v1/client/stats/get_vault_stats_parameters.go | 128 - v1/client/stats/get_vault_stats_responses.go | 187 - .../stats/get_view_box_stats_parameters.go | 412 --- .../stats/get_view_box_stats_responses.go | 187 - .../get_view_protocol_stats_parameters.go | 128 - .../get_view_protocol_stats_responses.go | 185 - v1/client/stats/get_view_stats_parameters.go | 270 -- v1/client/stats/get_view_stats_responses.go | 187 - v1/client/stats/stats_client.go | 687 ---- v1/client/tags/apply_tags_parameters.go | 153 - v1/client/tags/apply_tags_responses.go | 187 - v1/client/tags/remove_tags_parameters.go | 153 - v1/client/tags/remove_tags_responses.go | 187 - v1/client/tags/tags_client.go | 147 - v1/client/tenant/create_tenant_parameters.go | 153 - v1/client/tenant/create_tenant_responses.go | 187 - v1/client/tenant/delete_tenant_parameters.go | 150 - v1/client/tenant/delete_tenant_responses.go | 185 - .../download_tenants_proxy_parameters.go | 163 - .../download_tenants_proxy_responses.go | 185 - v1/client/tenant/get_tenants_parameters.go | 363 -- .../tenant/get_tenants_proxies_parameters.go | 172 - .../tenant/get_tenants_proxies_responses.go | 185 - .../get_tenants_proxy_config_parameters.go | 234 -- .../get_tenants_proxy_config_responses.go | 185 - v1/client/tenant/get_tenants_responses.go | 185 - v1/client/tenant/tenant_client.go | 795 ----- ...date_tenant_active_directory_parameters.go | 153 - ...pdate_tenant_active_directory_responses.go | 187 - .../tenant/update_tenant_entity_parameters.go | 153 - .../tenant/update_tenant_entity_responses.go | 187 - .../tenant/update_tenant_groups_parameters.go | 153 - .../tenant/update_tenant_groups_responses.go | 185 - .../update_tenant_ldap_provider_parameters.go | 153 - .../update_tenant_ldap_provider_responses.go | 187 - v1/client/tenant/update_tenant_parameters.go | 153 - ...update_tenant_protection_job_parameters.go | 153 - .../update_tenant_protection_job_responses.go | 187 - ...ate_tenant_protection_policy_parameters.go | 153 - ...date_tenant_protection_policy_responses.go | 187 - v1/client/tenant/update_tenant_responses.go | 187 - .../tenant/update_tenant_users_parameters.go | 153 - .../tenant/update_tenant_users_responses.go | 185 - .../update_tenant_view_box_parameters.go | 153 - .../update_tenant_view_box_responses.go | 187 - .../tenant/update_tenant_view_parameters.go | 153 - .../tenant/update_tenant_view_responses.go | 187 - .../tenant/update_tenant_vlan_parameters.go | 153 - .../tenant/update_tenant_vlan_responses.go | 187 - v1/client/vaults/create_vault_parameters.go | 153 - v1/client/vaults/create_vault_responses.go | 187 - v1/client/vaults/delete_vault_parameters.go | 178 - v1/client/vaults/delete_vault_responses.go | 173 - .../get_archive_media_info_parameters.go | 302 -- .../get_archive_media_info_responses.go | 185 - .../get_bandwidth_settings_parameters.go | 128 - .../get_bandwidth_settings_responses.go | 187 - .../vaults/get_vault_by_id_parameters.go | 154 - v1/client/vaults/get_vault_by_id_responses.go | 187 - .../get_vault_encryption_key_parameters.go | 154 - .../get_vault_encryption_key_responses.go | 187 - v1/client/vaults/get_vaults_parameters.go | 350 -- v1/client/vaults/get_vaults_responses.go | 185 - .../update_bandwidth_settings_parameters.go | 153 - .../update_bandwidth_settings_responses.go | 187 - v1/client/vaults/update_vault_parameters.go | 178 - v1/client/vaults/update_vault_responses.go | 187 - v1/client/vaults/vaults_client.go | 468 --- .../view_boxes/create_view_box_parameters.go | 153 - .../view_boxes/create_view_box_responses.go | 187 - .../view_boxes/delete_view_box_parameters.go | 154 - .../view_boxes/delete_view_box_responses.go | 173 - .../get_view_box_by_id_parameters.go | 188 - .../get_view_box_by_id_responses.go | 249 -- .../view_boxes/get_view_boxes_parameters.go | 489 --- .../view_boxes/get_view_boxes_responses.go | 185 - .../view_boxes/update_view_box_parameters.go | 178 - .../view_boxes/update_view_box_responses.go | 187 - v1/client/view_boxes/view_boxes_client.go | 278 -- .../views/activate_view_aliases_parameters.go | 151 - .../views/activate_view_aliases_responses.go | 187 - v1/client/views/clear_nlm_locks_parameters.go | 153 - v1/client/views/clear_nlm_locks_responses.go | 173 - v1/client/views/clone_directory_parameters.go | 153 - v1/client/views/clone_directory_responses.go | 173 - v1/client/views/clone_view_parameters.go | 153 - v1/client/views/clone_view_responses.go | 187 - .../views/create_view_alias_parameters.go | 153 - .../views/create_view_alias_responses.go | 187 - v1/client/views/create_view_parameters.go | 153 - v1/client/views/create_view_responses.go | 187 - .../create_view_user_quota_parameters.go | 153 - .../views/create_view_user_quota_responses.go | 187 - .../views/delete_view_alias_parameters.go | 151 - .../views/delete_view_alias_responses.go | 173 - .../views/delete_view_by_id_parameters.go | 154 - .../views/delete_view_by_id_responses.go | 173 - v1/client/views/delete_view_parameters.go | 151 - v1/client/views/delete_view_responses.go | 173 - .../delete_view_users_quota_parameters.go | 153 - .../delete_view_users_quota_responses.go | 173 - .../get_file_lock_status_by_id_parameters.go | 188 - .../get_file_lock_status_by_id_responses.go | 187 - .../views/get_file_lock_status_parameters.go | 185 - .../views/get_file_lock_status_responses.go | 187 - .../views/get_nfs_connections_parameters.go | 257 -- .../views/get_nfs_connections_responses.go | 185 - .../views/get_qo_s_policies_parameters.go | 220 -- .../views/get_qo_s_policies_responses.go | 185 - .../views/get_smb_connections_parameters.go | 291 -- .../views/get_smb_connections_responses.go | 185 - v1/client/views/get_view_by_id_parameters.go | 154 - v1/client/views/get_view_by_id_responses.go | 187 - .../views/get_view_by_name_parameters.go | 151 - v1/client/views/get_view_by_name_responses.go | 187 - .../get_view_dir_quota_info_parameters.go | 268 -- .../get_view_dir_quota_info_responses.go | 187 - .../views/get_view_user_quotas_parameters.go | 720 ---- .../views/get_view_user_quotas_responses.go | 187 - .../get_views_by_share_name_parameters.go | 353 -- .../get_views_by_share_name_responses.go | 187 - v1/client/views/get_views_parameters.go | 793 ----- v1/client/views/get_views_responses.go | 187 - v1/client/views/list_nlm_locks_parameters.go | 276 -- v1/client/views/list_nlm_locks_responses.go | 187 - v1/client/views/lock_file_by_id_parameters.go | 178 - v1/client/views/lock_file_by_id_responses.go | 187 - v1/client/views/lock_file_parameters.go | 175 - v1/client/views/lock_file_responses.go | 187 - v1/client/views/overwrite_view_parameters.go | 153 - v1/client/views/overwrite_view_responses.go | 187 - .../views/rename_view_by_id_parameters.go | 178 - .../views/rename_view_by_id_responses.go | 187 - v1/client/views/rename_view_parameters.go | 175 - v1/client/views/rename_view_responses.go | 187 - .../update_user_quota_settings_parameters.go | 153 - .../update_user_quota_settings_responses.go | 187 - .../views/update_view_alias_parameters.go | 153 - .../views/update_view_alias_responses.go | 187 - .../views/update_view_by_name_parameters.go | 175 - .../views/update_view_by_name_responses.go | 187 - .../views/update_view_dir_quota_parameters.go | 153 - .../views/update_view_dir_quota_responses.go | 187 - v1/client/views/update_view_parameters.go | 153 - v1/client/views/update_view_responses.go | 187 - .../update_view_user_quota_parameters.go | 153 - .../views/update_view_user_quota_responses.go | 187 - v1/client/views/views_client.go | 1507 -------- .../vlan/create_bifrost_vlan_parameters.go | 128 - .../vlan/create_bifrost_vlan_responses.go | 187 - v1/client/vlan/create_vlan_parameters.go | 150 - v1/client/vlan/create_vlan_responses.go | 187 - .../get_bifrost_tenant_vlans_parameters.go | 128 - .../get_bifrost_tenant_vlans_responses.go | 185 - v1/client/vlan/get_vlan_by_id_parameters.go | 154 - v1/client/vlan/get_vlan_by_id_responses.go | 249 -- v1/client/vlan/get_vlans_parameters.go | 316 -- v1/client/vlan/get_vlans_responses.go | 185 - v1/client/vlan/remove_vlan_parameters.go | 154 - v1/client/vlan/remove_vlan_responses.go | 173 - v1/client/vlan/update_vlan_parameters.go | 175 - v1/client/vlan/update_vlan_responses.go | 187 - v1/client/vlan/vlan_client.go | 360 -- v1/client/vm/get_vm_volume_info_parameters.go | 534 --- v1/client/vm/get_vm_volume_info_responses.go | 187 - v1/client/vm/read_dir_parameters.go | 818 ----- v1/client/vm/read_dir_responses.go | 187 - v1/client/vm/vm_client.go | 143 - v1/models/a_a_g_database_copy_info.go | 119 - v1/models/a_a_g_db_info.go | 61 - v1/models/a_a_g_info.go | 126 - v1/models/a_a_g_replica_info.go | 398 --- v1/models/a_a_g_replica_info_db_info.go | 120 - v1/models/a_d_attribute_restore_param.go | 148 - v1/models/a_d_database_info.go | 81 - v1/models/a_d_domain.go | 139 - v1/models/a_d_domain_controller.go | 317 -- v1/models/a_d_domain_identity.go | 64 - v1/models/a_d_guid_pair.go | 55 - v1/models/a_d_object.go | 135 - v1/models/a_d_object_restore_param.go | 136 - v1/models/a_d_object_restore_status.go | 197 -- ...ore_status_a_d_attribute_restore_status.go | 127 - v1/models/a_d_restore_status.go | 167 - v1/models/a_d_sysvol_info.go | 59 - v1/models/a_d_update_restore_task_options.go | 165 - v1/models/a_d_user_info.go | 59 - v1/models/a_m_q_p_target_config.go | 68 - v1/models/a_w_s_fleet_params.go | 303 -- .../a_w_s_fleet_params_network_params.go | 56 - ...s_fleet_params_network_params_map_entry.go | 112 - v1/models/a_w_s_fleet_params_tag.go | 53 - .../a_w_s_native_backup_source_params.go | 109 - v1/models/a_w_s_native_env_params.go | 109 - ...s_snapshot_manager_backup_source_params.go | 109 - v1/models/a_w_s_snapshot_manager_params.go | 121 - v1/models/aag_and_databases.go | 174 - ...bort_incomplete_multipart_upload_action.go | 51 - v1/models/access_token.go | 59 - v1/models/access_token_credential.go | 130 - v1/models/acl_proto.go | 230 -- v1/models/acl_proto_grant.go | 113 - v1/models/acropolis_backup_job_params.go | 191 - v1/models/acropolis_backup_params.go | 53 - v1/models/acropolis_backup_source_params.go | 190 - v1/models/acropolis_disk_filter_proto.go | 55 - v1/models/acropolis_protection_source.go | 237 -- v1/models/acropolis_restore_parameters.go | 92 - v1/models/activate_view_aliases_result.go | 125 - v1/models/active_alerts_stats.go | 115 - v1/models/active_directory_entry.go | 297 -- v1/models/active_directory_principal.go | 134 - ...ive_directory_principals_add_parameters.go | 156 - v1/models/ad_attribute.go | 281 -- v1/models/ad_domain.go | 126 - v1/models/ad_domain_controller.go | 129 - v1/models/ad_domain_identity.go | 61 - v1/models/ad_object_attribute_parameters.go | 149 - v1/models/ad_object_meta_data.go | 71 - v1/models/ad_object_restore_information.go | 137 - v1/models/ad_object_restore_parameters.go | 85 - v1/models/ad_objects_restore_status.go | 135 - v1/models/ad_protection_source.go | 180 - v1/models/ad_restore_options.go | 228 -- v1/models/ad_restore_parameters.go | 171 - v1/models/ad_root_topology_object.go | 77 - v1/models/adapter_specific_flags_proto.go | 52 - .../add_snapshot_arg_extended_information.go | 270 -- ...t_arg_extended_information_record_stats.go | 56 - ...tended_information_uda_add_snapshot_arg.go | 50 - v1/models/add_snapshot_arg_key_value_pair.go | 56 - v1/models/added_active_directory_principal.go | 165 - v1/models/added_idp_principal.go | 162 - v1/models/additional_connector_params.go | 191 - v1/models/additional_entity_info.go | 55 - v1/models/additional_oracle_d_b_params.go | 134 - v1/models/additional_run_info.go | 22 - v1/models/advanced_settings.go | 72 - v1/models/agent_certificate_information.go | 53 - v1/models/agent_deployment_status_response.go | 443 --- ...fo_proto_installed_subcomponent_version.go | 60 - v1/models/agent_information.go | 557 --- v1/models/agent_upgrade_task_info.go | 56 - v1/models/aggregated_subtree_info.go | 301 -- v1/models/airgap_config.go | 110 - v1/models/alert.go | 721 ---- v1/models/alert_category_name.go | 245 -- v1/models/alert_document.go | 70 - v1/models/alert_metadata.go | 408 --- v1/models/alert_property.go | 55 - v1/models/alert_resolution.go | 120 - v1/models/alert_resolution_details.go | 66 - v1/models/alert_resolution_info.go | 55 - v1/models/alert_resolution_request.go | 116 - v1/models/alert_vault_info.go | 61 - v1/models/alerting_config.go | 138 - v1/models/alerting_policy_proto.go | 142 - v1/models/amazon_cloud_credentials.go | 318 -- v1/models/analyse_jar_arg.go | 63 - v1/models/analyse_jar_result.go | 115 - v1/models/analysis_run_once_params.go | 51 - v1/models/analysis_task_info.go | 59 - v1/models/antivirus_scan_config.go | 133 - v1/models/antivirus_service_config.go | 90 - v1/models/antivirus_service_config_params.go | 78 - v1/models/antivirus_service_group.go | 164 - v1/models/antivirus_service_group_params.go | 142 - .../antivirus_service_group_state_params.go | 89 - v1/models/api_key.go | 81 - v1/models/api_request_attr.go | 65 - v1/models/api_version.go | 67 - v1/models/app.go | 469 --- v1/models/app_credentials.go | 112 - v1/models/app_entity_backup_status_info.go | 161 - v1/models/app_info.go | 61 - v1/models/app_instance.go | 495 --- v1/models/app_instance_id_parameter.go | 72 - v1/models/app_instance_settings.go | 401 --- v1/models/app_metadata.go | 73 - v1/models/app_owner_restore_info.go | 171 - v1/models/app_run_history.go | 177 - v1/models/append_hosts_parameters.go | 124 - v1/models/application_info.go | 369 -- v1/models/application_parameters.go | 52 - v1/models/application_restore_object.go | 227 -- v1/models/application_restore_parameters.go | 478 --- v1/models/application_server_info.go | 201 -- v1/models/application_special_parameters.go | 58 - .../applications_restore_task_request.go | 562 --- v1/models/applications_wrapper.go | 125 - v1/models/apps_config.go | 242 -- v1/models/archival_external_target.go | 120 - v1/models/archival_info_base.go | 326 -- ...ing_id_to_front_end_size_info_map_entry.go | 112 - v1/models/archival_target.go | 133 - v1/models/archive_w_o_r_m_properties.go | 75 - v1/models/array_info.go | 136 - v1/models/athena_token.go | 56 - v1/models/athena_token_parameters.go | 166 - v1/models/attachment.go | 65 - v1/models/attribute_filter_params.go | 70 - v1/models/attribute_filter_policy.go | 206 -- v1/models/attribute_restore_information.go | 55 - v1/models/attribute_value.go | 110 - v1/models/audit_log_settings.go | 52 - v1/models/audit_logs_tile.go | 133 - v1/models/aurora_cluster_info.go | 69 - v1/models/aws_credentials.go | 373 -- v1/models/aws_entity.go | 55 - v1/models/aws_fleet_public_params.go | 245 -- v1/models/aws_kms_configuration.go | 148 - v1/models/aws_kms_update_params.go | 66 - v1/models/aws_params.go | 190 - v1/models/aws_protection_source.go | 962 ----- .../aws_r_d_s_postgres_env_backup_params.go | 11 - v1/models/aws_snapshot_manager_parameters.go | 63 - v1/models/aws_target_params.go | 166 - v1/models/aws_target_params_network_config.go | 274 -- v1/models/axon_error.go | 92 - v1/models/azure_application.go | 56 - v1/models/azure_cloud_credentials.go | 202 -- v1/models/azure_credentials.go | 245 -- v1/models/azure_kms_configuration.go | 214 -- v1/models/azure_kms_credentials.go | 124 - v1/models/azure_managed_disk_params.go | 54 - v1/models/azure_params.go | 221 -- v1/models/azure_protection_source.go | 588 ---- .../azure_sql_env_backup_params_proto.go | 177 - v1/models/azure_subscription.go | 50 - v1/models/backup_job_attempt_state_proto.go | 405 --- v1/models/backup_job_audit.go | 166 - v1/models/backup_job_pre_or_post_script.go | 274 -- v1/models/backup_job_proto.go | 2343 ------------ v1/models/backup_job_proto_backup_source.go | 126 - .../backup_job_proto_d_r_to_cloud_params.go | 63 - v1/models/backup_job_proto_exclude_source.go | 122 - .../backup_job_proto_exclusion_time_range.go | 164 - ...up_job_proto_is_source_paused_map_entry.go | 53 - .../backup_job_proto_remote_view_params.go | 126 - ...emote_view_params_remote_view_map_entry.go | 112 - ...view_params_remote_view_params_per_view.go | 54 - v1/models/backup_job_run_state_proto.go | 1129 ------ v1/models/backup_job_runs_proto.go | 177 - v1/models/backup_job_summary_proto.go | 449 --- ...p_job_summary_proto_missing_entity_info.go | 116 - v1/models/backup_job_summary_wrapper.go | 173 - v1/models/backup_job_task_state_base_proto.go | 890 ----- ...e_base_proto_entity_ids_to_cancel_entry.go | 53 - ...p_job_task_state_base_proto_pause_state.go | 69 - ..._job_task_state_base_proto_source_state.go | 304 -- ...ime_usecs_map_d_e_p_r_e_c_a_t_e_d_entry.go | 53 - v1/models/backup_job_wrapper.go | 235 -- v1/models/backup_policy_proto.go | 351 -- ...backup_policy_proto_continuous_schedule.go | 130 - .../backup_policy_proto_daily_schedule.go | 115 - ...ackup_policy_proto_exclusion_time_range.go | 164 - .../backup_policy_proto_monthly_schedule.go | 116 - .../backup_policy_proto_one_off_schedule.go | 109 - v1/models/backup_policy_proto_schedule_end.go | 54 - v1/models/backup_run.go | 655 ---- v1/models/backup_run_id.go | 112 - v1/models/backup_script.go | 270 -- 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/backup_source_params.go | 744 ---- v1/models/backup_source_stats.go | 120 - v1/models/backup_task_additional_params.go | 1361 ------- v1/models/backup_task_info.go | 59 - v1/models/backup_task_state_proto.go | 1066 ------ ...ackup_task_state_proto_app_entity_state.go | 248 -- ...k_state_proto_entity_backup_stats_entry.go | 112 - ...tate_proto_in_progress_task_state_proto.go | 122 - .../backup_task_state_vapp_info_proto.go | 81 - v1/models/bandwidth_limit.go | 146 - v1/models/bandwidth_limit_override.go | 122 - v1/models/banner.go | 69 - v1/models/banner_update_parameters.go | 56 - v1/models/basic_cluster_info.go | 310 -- v1/models/basic_task_info.go | 53 - v1/models/bifrost_config.go | 152 - v1/models/bifrost_config_subnet.go | 99 - v1/models/bifrost_subnet.go | 69 - v1/models/blackout_period.go | 240 -- v1/models/blackout_period_end_time.go | 95 - v1/models/blackout_period_start_time.go | 95 - v1/models/bond_slave_info.go | 175 - v1/models/bonding_opts.go | 56 - v1/models/bucket_info.go | 53 - v1/models/bucket_ownership_controls.go | 110 - v1/models/bucket_policy.go | 131 - v1/models/bulk_install_app_task_info.go | 180 - v1/models/c2_s_access_portal.go | 65 - v1/models/c2_s_c_a_p_server_info.go | 82 - v1/models/c2_s_server_info.go | 124 - v1/models/c_b_m_r_info.go | 50 - v1/models/c_d_b_entity_info.go | 122 - v1/models/cancel_protection_job_run_param.go | 125 - v1/models/cancellation_timeout.go | 54 - v1/models/cancellation_timeout_params.go | 127 - v1/models/capacity_by_tier.go | 123 - v1/models/cassandra_additional_params.go | 192 - v1/models/cassandra_backup_job_params.go | 140 - v1/models/cassandra_backup_params.go | 109 - v1/models/cassandra_backup_run_params.go | 50 - v1/models/cassandra_cluster.go | 55 - v1/models/cassandra_connect_params.go | 207 -- v1/models/cassandra_discovery_params.go | 139 - v1/models/cassandra_keyspace.go | 173 - v1/models/cassandra_log_recover_job_params.go | 63 - v1/models/cassandra_port_info.go | 62 - v1/models/cassandra_ports_info.go | 65 - v1/models/cassandra_protection_source.go | 285 -- v1/models/cassandra_recover_job_params.go | 208 -- v1/models/cassandra_security_info.go | 133 - v1/models/cassandra_table.go | 111 - v1/models/cbt_info.go | 185 - v1/models/cdp_common_backup_params.go | 52 - v1/models/cdp_hydration_params.go | 145 - v1/models/cdp_hydration_params_disk_log.go | 172 - v1/models/cdp_hydration_params_log_data.go | 179 - .../cdp_hydration_params_virtual_disk_info.go | 116 - v1/models/cdp_io_filter_state.go | 63 - v1/models/cdp_log_run_params.go | 189 - v1/models/cdp_log_run_params_disk_log.go | 236 -- v1/models/cdp_log_run_params_epoch_data.go | 112 - v1/models/cdp_log_run_params_log_data.go | 53 - .../cdp_log_run_params_virtual_disk_info.go | 53 - v1/models/centrify_zone.go | 151 - ...ficate_based_authentication_credentials.go | 56 - v1/models/certificate_details.go | 126 - .../change_backup_job_activation_param.go | 67 - v1/models/change_backup_job_mode_proto.go | 111 - .../change_protection_job_state_param.go | 61 - v1/models/change_service_state_parameters.go | 216 -- v1/models/change_service_state_result.go | 57 - v1/models/chassis_info.go | 65 - v1/models/check_restore_app_task_arg.go | 217 -- v1/models/check_restore_app_task_result.go | 164 - ...eck_restore_app_task_result_entity_info.go | 225 -- ...tore_app_task_result_full_snapshot_info.go | 58 - ...store_app_task_result_log_snapshot_info.go | 54 - v1/models/cifs_share_info.go | 68 - v1/models/classification_info.go | 60 - v1/models/clear_nlm_locks_parameters.go | 61 - v1/models/client_subnet_whitelist.go | 122 - v1/models/clone_app_view_info_oracle.go | 51 - v1/models/clone_app_view_info_proto.go | 110 - v1/models/clone_app_view_params.go | 56 - v1/models/clone_arg.go | 836 ----- v1/models/clone_directory_params.go | 59 - v1/models/clone_refresh_request.go | 226 -- v1/models/clone_task_info.go | 55 - v1/models/clone_task_request.go | 487 --- ...lone_task_request_clone_view_parameters.go | 96 - v1/models/clone_view_request.go | 1048 ------ v1/models/clone_view_request_logical_quota.go | 107 - v1/models/close_smb_file_open_parameters.go | 61 - v1/models/cloud_archival_direct_config.go | 114 - v1/models/cloud_archival_info.go | 293 -- v1/models/cloud_archive_run.go | 123 - v1/models/cloud_archive_summary.go | 377 -- .../cloud_backup_job_pre_or_post_script.go | 161 - v1/models/cloud_deploy_info_proto.go | 281 -- ...d_deploy_info_proto_cloud_deploy_entity.go | 186 - v1/models/cloud_deploy_target.go | 175 - v1/models/cloud_deploy_target_details.go | 283 -- v1/models/cloud_deploy_task_state_proto.go | 118 - v1/models/cloud_domain_list.go | 57 - .../cloud_domain_migration_query_result.go | 192 - v1/models/cloud_network_configuration.go | 67 - v1/models/cloud_parameters.go | 55 - v1/models/cloud_vm_backup_params.go | 113 - v1/models/cluster.go | 1359 ------- v1/models/cluster_audit_log.go | 214 -- v1/models/cluster_audit_log_configuration.go | 111 - v1/models/cluster_audit_logs_search_result.go | 134 - ...luster_config_proto_n_t_p_auth_key_info.go | 56 - .../cluster_config_proto_qo_s_mapping.go | 126 - ..._config_proto_qo_s_mapping_qo_s_context.go | 65 - v1/models/cluster_config_proto_s_id.go | 61 - ...er_config_proto_storage_policy_override.go | 56 - v1/models/cluster_config_proto_subnet.go | 86 - ...ter_config_proto_vault_cloud_properties.go | 314 -- ...ault_cloud_properties_amazon_properties.go | 58 - ...vault_cloud_properties_azure_properties.go | 64 - ...ault_cloud_properties_google_properties.go | 50 - ...ault_cloud_properties_oracle_properties.go | 53 - ...oud_properties_s3_compatible_properties.go | 50 - ...ster_config_proto_vault_cloud_tier_info.go | 127 - ...r_config_proto_vault_cloud_tier_setting.go | 121 - ...ster_config_proto_vault_cloud_tier_type.go | 116 - v1/models/cluster_creation_progress_result.go | 80 - v1/models/cluster_eula_config.go | 95 - v1/models/cluster_hardware_info.go | 57 - v1/models/cluster_identifier.go | 53 - v1/models/cluster_info.go | 53 - v1/models/cluster_license_state.go | 95 - v1/models/cluster_list_master_resp.go | 122 - v1/models/cluster_networking_endpoint.go | 58 - v1/models/cluster_networking_info.go | 125 - v1/models/cluster_networking_info_endpoint.go | 68 - v1/models/cluster_networking_info_resource.go | 159 - ...cluster_networking_resource_information.go | 126 - v1/models/cluster_partition.go | 152 - v1/models/cluster_public_keys.go | 52 - v1/models/cluster_stats.go | 325 -- .../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/cluster_status_result.go | 488 --- v1/models/cluster_upgrade_status.go | 133 - v1/models/collection_info.go | 59 - v1/models/common_acl_proto.go | 115 - v1/models/common_acl_proto_grantees.go | 60 - v1/models/common_job_info.go | 192 - ...ompare_a_d_objects_result_a_d_attribute.go | 271 -- ..._a_d_objects_result_a_d_attribute_value.go | 57 - .../compare_a_d_objects_result_a_d_object.go | 207 -- v1/models/compare_ad_objects_request.go | 172 - v1/models/compared_a_d_object.go | 200 -- v1/models/component_removal_progress.go | 64 - v1/models/condition.go | 140 - ...ondition_condition_key_values_map_entry.go | 112 - v1/models/condition_key_values.go | 50 - v1/models/configuration_params.go | 56 - v1/models/connector_parameters.go | 317 -- v1/models/connector_params.go | 342 -- v1/models/consumer.go | 129 - v1/models/consumer_stats.go | 554 --- v1/models/container_info.go | 73 - v1/models/continuous_schedule.go | 55 - v1/models/copy_backup_run_state_proto.go | 390 -- v1/models/copy_backup_run_task_state_proto.go | 1141 ------ ...roto_entity_expiry_time_usecs_map_entry.go | 53 - ...state_proto_entity_legal_hold_map_entry.go | 53 - ...p_run_task_state_proto_linked_task_info.go | 160 - v1/models/copy_backup_sub_task_state_proto.go | 737 ---- v1/models/copy_object_base_info.go | 303 -- v1/models/copy_object_base_info_stats.go | 138 - v1/models/copy_run.go | 504 --- v1/models/copy_run_stats.go | 76 - v1/models/copy_run_task_uid.go | 93 - v1/models/copy_snapshot_params.go | 205 -- v1/models/copy_snapshot_task_status.go | 265 -- v1/models/couchbase_backup_job_params.go | 12 - v1/models/couchbase_bucket.go | 55 - v1/models/couchbase_cluster.go | 52 - v1/models/couchbase_connect_params.go | 62 - v1/models/couchbase_protection_source.go | 226 -- v1/models/couchbase_recover_job_params.go | 69 - v1/models/count_by_tier.go | 121 - v1/models/counter.go | 112 - v1/models/counter_identifier.go | 112 - v1/models/counter_namespace.go | 50 - v1/models/cracked_file_document.go | 967 ----- ...acked_file_document_a_d_object_metadata.go | 78 - ...file_document_exchange_mailbox_metadata.go | 62 - .../cracked_file_document_file_version.go | 259 -- ..._document_file_version_version_metadata.go | 54 - ...cracked_file_document_instance_id_range.go | 54 - ...d_file_document_magneto_entity_metadata.go | 54 - ...ked_file_document_mailbox_item_metadata.go | 276 -- .../cracked_file_document_no_sql_metadata.go | 62 - ...acked_file_document_o365_group_metadata.go | 217 -- ...ument_o365_teams_channel_files_metadata.go | 66 - ...acked_file_document_o365_teams_metadata.go | 163 - ...racked_file_document_one_drive_metadata.go | 132 - ...ed_file_document_public_folder_metadata.go | 170 - ...file_document_sharepoint_lists_metadata.go | 56 - ...acked_file_document_sharepoint_metadata.go | 184 - ...ent_snapshot_tags_association_map_entry.go | 112 - ...ed_file_document_teams_channel_metadata.go | 66 - .../cracked_file_document_uda_metadata.go | 53 - .../cracked_file_document_version_info.go | 129 - .../create_active_directory_entry_params.go | 299 -- v1/models/create_api_key_params.go | 80 - v1/models/create_backup_job_arg.go | 166 - ...eate_backup_job_arg_entities_to_protect.go | 60 - ...eate_backup_job_result_protected_entity.go | 163 - v1/models/create_bond_parameters.go | 144 - v1/models/create_bond_result.go | 52 - v1/models/create_cloud_cluster_parameters.go | 259 -- ...reate_cloud_domain_migration_parameters.go | 69 - v1/models/create_cluster_result.go | 205 -- v1/models/create_idp_configuration_request.go | 108 - v1/models/create_ip_config_parameters.go | 138 - v1/models/create_ip_config_result.go | 53 - .../create_physical_cluster_parameters.go | 314 -- ...te_remote_vault_restore_task_parameters.go | 285 -- ..._restore_task_parameters_search_job_uid.go | 95 - ...eate_remote_vault_search_job_parameters.go | 201 -- v1/models/create_view_alias_response_body.go | 217 -- v1/models/create_view_box_params.go | 434 --- ...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 | 1147 ------ .../create_view_request_logical_quota.go | 107 - .../create_virtual_cluster_parameters.go | 252 -- v1/models/created_api_key.go | 84 - .../created_remote_vault_search_job_uid.go | 112 - ...ote_vault_search_job_uid_search_job_uid.go | 93 - v1/models/credentials.go | 55 - v1/models/credentials_proto.go | 65 - v1/models/cryptsoft_kms_config_response.go | 63 - v1/models/cryptsoft_kms_configuration.go | 70 - v1/models/cryptsoft_kms_update_params.go | 70 - v1/models/custom_attribute.go | 62 - v1/models/custom_tag.go | 55 - v1/models/custom_tag_params.go | 56 - v1/models/custom_unix_id_attributes.go | 59 - v1/models/d_b_entity_info.go | 416 --- .../d_b_entity_info_tempfile_info_row.go | 66 - v1/models/d_g_entity_info.go | 53 - v1/models/d_h_c_p_conf.go | 128 - v1/models/d_s_e_solr_info.go | 53 - v1/models/dag_application_server_info.go | 152 - v1/models/dag_info.go | 183 - v1/models/daily_schedule.go | 112 - v1/models/dashboard.go | 522 --- v1/models/dashboard_response.go | 179 - v1/models/data_event.go | 70 - v1/models/data_insights_info.go | 60 - v1/models/data_lock_config.go | 121 - v1/models/data_lock_constraints.go | 120 - v1/models/data_lock_constraints_proto.go | 59 - v1/models/data_migration_job_parameters.go | 254 -- v1/models/data_migration_policy.go | 176 - v1/models/data_protect_azure_info.go | 125 - v1/models/data_protect_info.go | 131 - .../data_transfer_from_vault_per_task.go | 66 - v1/models/data_transfer_from_vault_summary.go | 152 - ...a_transfer_from_vaults_summary_response.go | 127 - v1/models/data_transfer_info.go | 134 - ...data_transfer_info_private_network_info.go | 216 -- ...ta_transfer_to_vault_per_protection_job.go | 66 - v1/models/data_transfer_to_vault_summary.go | 301 -- ...ata_transfer_to_vaults_summary_response.go | 127 - v1/models/data_uptier_job_parameters.go | 196 -- v1/models/data_usage_stats.go | 201 -- v1/models/database_copy_error.go | 56 - v1/models/database_info.go | 11 - v1/models/datastore_info.go | 53 - v1/models/date_time.go | 118 - v1/models/day_time.go | 178 - v1/models/day_time_window.go | 160 - v1/models/db_file_info.go | 128 - .../deactivate_job_entities_info_proto.go | 128 - ..._entities_info_proto_deactivated_entity.go | 164 - v1/models/deactivate_job_state_proto.go | 295 -- v1/models/delete_backup_job_runs_param.go | 121 - v1/models/delete_infected_file_params.go | 121 - v1/models/delete_infected_file_response.go | 183 - v1/models/delete_ip_config_parameters.go | 73 - v1/models/delete_job_run.go | 112 - v1/models/delete_protection_job_param.go | 53 - v1/models/delete_route_param.go | 66 - .../delete_view_users_quota_parameters.go | 129 - .../delivery_rule_proto_delivery_target.go | 84 - v1/models/deploy_arg.go | 232 -- v1/models/deploy_cert_parameters.go | 192 - .../deploy_d_b_instances_to_r_d_s_params.go | 285 -- ...d_s_params_point_in_time_restore_params.go | 51 - v1/models/deploy_fleet_params.go | 109 - v1/models/deploy_task_request.go | 203 -- v1/models/deploy_v_ms_to_a_w_s_params.go | 702 ---- v1/models/deploy_v_ms_to_azure_params.go | 1095 ------ v1/models/deploy_v_ms_to_cloud_params.go | 365 -- .../deploy_v_ms_to_cloud_task_state_proto.go | 110 - v1/models/deploy_v_ms_to_g_c_p_params.go | 264 -- v1/models/deploy_v_ms_to_on_prem_params.go | 110 - v1/models/deploy_vms_to_cloud.go | 217 -- .../destroy_clone_app_task_info_proto.go | 240 -- v1/models/destroy_cloned_entity_info_proto.go | 188 - ..._cloned_entity_info_proto_cloned_entity.go | 116 - v1/models/destroy_cloned_task_state_proto.go | 642 ---- .../destroy_cloned_vm_task_info_proto.go | 148 - .../destroy_mount_volumes_task_info_proto.go | 283 -- v1/models/device_node.go | 168 - v1/models/device_tree.go | 146 - v1/models/device_tree_child_device.go | 163 - v1/models/device_tree_details.go | 228 -- v1/models/device_tree_partition_slice.go | 71 - v1/models/dir_entry.go | 119 - v1/models/dir_quota_config.go | 55 - v1/models/dir_quota_info.go | 180 - v1/models/dir_quota_policy.go | 127 - v1/models/disk.go | 334 -- v1/models/disk_attach_params.go | 59 - v1/models/disk_block.go | 58 - v1/models/disk_delete_result.go | 131 - v1/models/disk_hardware_info.go | 59 - v1/models/disk_info.go | 140 - v1/models/disk_info_label.go | 57 - v1/models/disk_internal.go | 657 ---- v1/models/disk_partition.go | 73 - v1/models/disk_reservation.go | 53 - v1/models/disk_stats.go | 112 - v1/models/disk_unit.go | 59 - v1/models/dns_delegation_zone.go | 56 - v1/models/doc_error.go | 53 - v1/models/domain.go | 55 - v1/models/domain_controllers.go | 52 - v1/models/download_cft_params.go | 54 - v1/models/download_cft_response.go | 55 - v1/models/download_chats_params.go | 60 - .../download_files_and_folders_params.go | 195 - v1/models/download_package_parameters.go | 74 - v1/models/download_package_result.go | 53 - v1/models/e_b_s_volume_exclusion_params.go | 150 - .../e_b_s_volume_exclusion_params_tag.go | 55 - ..._b_s_volume_exclusion_params_tag_params.go | 190 - v1/models/e_b_s_volume_info.go | 140 - v1/models/e_b_s_volume_info_tag.go | 55 - v1/models/e_b_s_volume_tag.go | 53 - v1/models/ebs_volume_info.go | 141 - v1/models/edit_hosts_parameters.go | 125 - v1/models/elastifile_cluster.go | 64 - v1/models/elastifile_container.go | 125 - v1/models/elastifile_protection_source.go | 222 -- v1/models/email_delivery_target.go | 116 - v1/models/email_meta_data.go | 112 - v1/models/encryption_configuration.go | 68 - v1/models/encryption_params.go | 118 - v1/models/entity.go | 602 ---- v1/models/entity_access_info.go | 139 - v1/models/entity_arg_wrapper.go | 372 -- v1/models/entity_attribute_map_entry.go | 53 - v1/models/entity_backup_stats.go | 138 - v1/models/entity_common_info.go | 99 - v1/models/entity_external_metadata_proto.go | 218 -- v1/models/entity_group_membership_info.go | 55 - v1/models/entity_group_params.go | 70 - v1/models/entity_hierarchy_proto.go | 551 --- ..._hierarchy_proto_aggregated_entity_info.go | 70 - v1/models/entity_hierarchy_wrapper.go | 288 -- v1/models/entity_i_a_m_info.go | 53 - v1/models/entity_id_proto.go | 117 - v1/models/entity_identifier.go | 111 - v1/models/entity_operation_info_proto.go | 164 - v1/models/entity_operation_spec_proto.go | 112 - ...o_mark_source_for_unregistration_params.go | 51 - v1/models/entity_operation_status_proto.go | 110 - ...y_operation_status_proto_unregistration.go | 50 - v1/models/entity_permission_info.go | 152 - .../entity_permission_info_permission.go | 112 - v1/models/entity_permission_information.go | 253 -- .../entity_private_endpoint_connection.go | 53 - v1/models/entity_proto.go | 243 -- v1/models/entity_proto_size_info_entry.go | 112 - v1/models/entity_s_k_u.go | 63 - v1/models/entity_schema_proto.go | 284 -- ...tity_schema_proto_attributes_descriptor.go | 130 - v1/models/entity_schema_proto_granularity.go | 62 - ...ntity_schema_proto_key_value_descriptor.go | 59 - ...ity_schema_proto_time_series_descriptor.go | 142 - ...roto_time_series_descriptor_metric_unit.go | 62 - v1/models/entity_service_annotations_entry.go | 53 - ...ity_services_to_connector_ids_map_entry.go | 53 - v1/models/entity_site_params.go | 61 - v1/models/entity_size_info.go | 82 - v1/models/entity_snapshot_info_proto.go | 182 - v1/models/entity_storage_class_info.go | 53 - v1/models/entity_team_params.go | 56 - v1/models/entity_version_tuple.go | 56 - ...tity_vmware_custom_attributes_map_entry.go | 112 - v1/models/entity_volume_info.go | 99 - v1/models/entity_vss_writer_info.go | 54 - v1/models/env_backup_params.go | 1337 ------- v1/models/environment_type_job_parameters.go | 634 ---- v1/models/epoch_proto.go | 55 - v1/models/erasure_coding_info.go | 63 - v1/models/error.go | 55 - v1/models/error_proto.go | 53 - v1/models/eula_config.go | 130 - v1/models/ews_to_pst_conversion_params.go | 69 - v1/models/exchange_backup_job_params.go | 54 - v1/models/exchange_d_a_g.go | 112 - v1/models/exchange_d_a_g_backup_preference.go | 61 - v1/models/exchange_d_a_g_database.go | 131 - v1/models/exchange_d_a_g_database_copy.go | 189 - v1/models/exchange_d_a_g_identity.go | 57 - v1/models/exchange_d_a_g_info.go | 227 -- .../exchange_d_a_g_protection_preference.go | 74 - v1/models/exchange_dag_hosts_response.go | 193 - v1/models/exchange_database.go | 364 -- v1/models/exchange_database_backup_times.go | 264 -- v1/models/exchange_database_copy_info.go | 167 - v1/models/exchange_database_identity.go | 56 - v1/models/exchange_database_info.go | 147 - v1/models/exchange_e_d_b_info.go | 79 - v1/models/exchange_env_job_parameters.go | 52 - v1/models/exchange_host_info.go | 202 -- v1/models/exchange_log_info.go | 89 - v1/models/exchange_protection_source.go | 333 -- v1/models/exchange_restore_parameters.go | 172 - v1/models/exchange_restore_view_parameters.go | 59 - v1/models/exchange_server.go | 129 - v1/models/exchange_server_d_a_g_node.go | 192 - v1/models/exchange_server_identity.go | 60 - v1/models/exchange_server_info.go | 198 -- v1/models/exchange_server_node.go | 115 - v1/models/exchange_server_version.go | 70 - v1/models/exchange_topology.go | 344 -- v1/models/expand_cloud_cluster_parameters.go | 73 - .../expand_physical_cluster_parameters.go | 133 - v1/models/expiration_action.go | 57 - v1/models/extended_field_uri.go | 54 - v1/models/extended_retention_policy.go | 270 -- v1/models/extended_retention_policy_proto.go | 184 - v1/models/external_client_subnets.go | 121 - v1/models/external_network_info.go | 60 - .../externally_triggered_backup_params.go | 53 - ...externally_triggered_env_job_parameters.go | 163 - v1/models/externally_triggered_job_params.go | 121 - ..._params_externally_triggered_sbt_params.go | 50 - .../externally_triggered_sbt_parameters.go | 50 - v1/models/extract_file_range_result.go | 126 - v1/models/failure_reason.go | 53 - v1/models/field_info.go | 73 - v1/models/file_distribution_metrics.go | 55 - v1/models/file_distribution_stats.go | 135 - v1/models/file_distribution_stats_list.go | 80 - v1/models/file_extension_filter.go | 113 - v1/models/file_fstat_result.go | 116 - v1/models/file_id.go | 56 - v1/models/file_info.go | 53 - v1/models/file_level_data_lock_config.go | 212 -- v1/models/file_lock_status.go | 128 - v1/models/file_nlm_locks.go | 172 - v1/models/file_partition_block.go | 64 - v1/models/file_path_filter.go | 71 - v1/models/file_path_parameters.go | 67 - v1/models/file_results.go | 130 - v1/models/file_search_result.go | 533 --- v1/models/file_search_result_job_uid.go | 94 - v1/models/file_search_results.go | 138 - v1/models/file_snapshot_information.go | 193 - v1/models/file_stat_info.go | 125 - v1/models/file_stat_result.go | 212 -- v1/models/file_stubbing_params.go | 543 --- .../file_stubbing_params_target_view_data.go | 54 - ...e_stubbing_params_target_view_map_entry.go | 112 - v1/models/file_system_info.go | 133 - v1/models/file_uptiering_params.go | 158 - .../file_uptiering_params_source_view_data.go | 54 - ..._uptiering_params_source_view_map_entry.go | 112 - v1/models/file_version.go | 135 - v1/models/filename_pattern_to_directory.go | 57 - v1/models/filer_audit_log_configuration.go | 93 - v1/models/files_and_folders_info.go | 56 - v1/models/files_to_directory_mapping.go | 53 - v1/models/fileset_info.go | 90 - v1/models/filesystem_info.go | 64 - v1/models/filesystem_volume.go | 258 -- v1/models/filesystem_volume_logical_volume.go | 96 - v1/models/filter_ip_config.go | 56 - v1/models/filtering_policy_proto.go | 67 - v1/models/fixed_unix_id_mapping.go | 56 - v1/models/flash_blade_file_system.go | 187 - v1/models/flash_blade_network_interface.go | 58 - v1/models/flash_blade_nfs_info.go | 67 - v1/models/flash_blade_protection_source.go | 223 -- v1/models/flash_blade_storage_array.go | 141 - v1/models/fleet_network_params.go | 61 - .../fleet_network_params_network_params.go | 62 - v1/models/fleet_params.go | 234 -- v1/models/fleet_tag.go | 55 - v1/models/folder_content_info.go | 295 -- .../folder_content_info_extended_property.go | 114 - v1/models/folder_id.go | 57 - v1/models/folder_result.go | 56 - v1/models/folder_type.go | 11 - v1/models/fort_knox_azure_info.go | 63 - v1/models/fort_knox_cold_info.go | 63 - v1/models/free_node_information.go | 91 - v1/models/full_snapshot_info.go | 174 - v1/models/g_c_p_attributes.go | 69 - .../g_c_p_disk_exclusion_object_params.go | 51 - v1/models/g_c_p_fleet_params.go | 132 - v1/models/g_c_p_job_disk_exclusion_rule.go | 133 - .../g_c_p_job_disk_exclusion_rule_label.go | 57 - v1/models/g_c_p_native_job_params.go | 132 - v1/models/g_c_p_native_object_params.go | 109 - v1/models/gcp_credentials.go | 169 - v1/models/gcp_disk_info.go | 67 - v1/models/gcp_fleet_network_params.go | 237 -- v1/models/gcp_fleet_params.go | 126 - v1/models/gcp_params.go | 61 - v1/models/gcp_protection_source.go | 677 ---- v1/models/gdpr_copy_task.go | 74 - v1/models/get_all_job_runs_result.go | 314 -- .../get_backup_job_runs_result_wrapper.go | 175 - v1/models/get_consumer_stats_result.go | 127 - ...cked_file_restore_info_result_file_info.go | 169 - v1/models/get_cracked_file_versions_result.go | 241 -- ...acked_file_versions_result_version_info.go | 238 -- ...ns_result_version_info_version_metadata.go | 50 - ...chy_result_object_based_protection_info.go | 59 - v1/models/get_job_run_info_result.go | 81 - v1/models/get_m_r_jar_upload_path_result.go | 114 - v1/models/get_map_reduce_app_runs_params.go | 94 - v1/models/get_objects_details_result.go | 75 - v1/models/get_registration_info_response.go | 242 -- .../get_registration_info_response_stats.go | 94 - v1/models/get_restore_app_time_ranges_arg.go | 300 -- .../get_restore_app_time_ranges_result.go | 176 - v1/models/get_tasks_arg.go | 161 - v1/models/get_tasks_result.go | 172 - v1/models/get_tasks_result_result_group.go | 124 - .../get_tasks_result_result_group_task.go | 115 - v1/models/get_tenant_stats_result.go | 127 - v1/models/get_view_box_stats_result.go | 123 - v1/models/get_views_by_share_name_result.go | 130 - v1/models/get_views_result.go | 135 - v1/models/gflag.go | 104 - v1/models/google_account_info.go | 55 - v1/models/google_cloud_credentials.go | 141 - v1/models/gpfs_cluster.go | 59 - v1/models/gpfs_fileset.go | 115 - v1/models/gpfs_filesystem.go | 55 - v1/models/gpfs_protection_source.go | 278 -- v1/models/grantee_proto.go | 62 - v1/models/granular_restore_info.go | 116 - v1/models/granularity_bucket.go | 128 - .../granularity_bucket_exact_dates_info.go | 121 - v1/models/graph_keyspace_info.go | 51 - v1/models/group.go | 166 - v1/models/group_backup_env_params.go | 12 - v1/models/group_delete_parameters.go | 65 - v1/models/group_info.go | 61 - v1/models/group_membership_info.go | 53 - v1/models/group_parameters.go | 154 - v1/models/guid_pair.go | 55 - v1/models/h_base_backup_job_params.go | 110 - v1/models/h_base_connect_params.go | 124 - ...base_connect_params_configuration_entry.go | 53 - v1/models/h_base_discovery_params.go | 115 - v1/models/h_base_protection_source.go | 178 - v1/models/h_base_recover_job_params.go | 113 - v1/models/h_base_table.go | 52 - v1/models/hadoop_discovery_params.go | 56 - v1/models/hdfs_backup_job_params.go | 54 - v1/models/hdfs_connect_params.go | 180 - ...hdfs_connect_params_configuration_entry.go | 53 - v1/models/hdfs_discovery_params.go | 115 - v1/models/hdfs_protection_source.go | 113 - v1/models/hdfs_recover_job_params.go | 57 - v1/models/health_tile.go | 148 - v1/models/hive_backup_job_params.go | 110 - v1/models/hive_connect_params.go | 124 - ...hive_connect_params_configuration_entry.go | 53 - v1/models/hive_discovery_params.go | 115 - v1/models/hive_protection_source.go | 178 - v1/models/hive_recover_job_params.go | 113 - v1/models/hive_table.go | 130 - v1/models/host.go | 132 - v1/models/host_agent_status.go | 232 -- v1/models/host_entry.go | 94 - v1/models/host_info.go | 64 - v1/models/host_result.go | 53 - v1/models/host_settings_check.go | 53 - v1/models/host_settings_check_params.go | 11 - v1/models/host_settings_check_result.go | 198 -- v1/models/hyper_flex_protection_source.go | 116 - v1/models/hyper_v_backup_env_params.go | 199 -- v1/models/hyper_v_backup_source_params.go | 242 -- v1/models/hyper_v_disk_filter_proto.go | 62 - v1/models/hyperv_clone_parameters.go | 99 - v1/models/hyperv_datastore.go | 120 - v1/models/hyperv_env_job_parameters.go | 55 - v1/models/hyperv_protection_source.go | 576 --- v1/models/hyperv_restore_parameters.go | 106 - v1/models/hyperv_virtual_machine.go | 244 -- v1/models/i_o_filter_state.go | 167 - v1/models/i_o_filter_state_filter_status.go | 112 - .../ibm_flash_system_protection_source.go | 224 -- v1/models/icap_connection_status_response.go | 55 - v1/models/id_mapping_info.go | 170 - v1/models/identity.go | 57 - v1/models/identity_set.go | 366 -- v1/models/idp_principals_add_parameters.go | 153 - v1/models/idp_service_configuration.go | 111 - v1/models/idp_user_info.go | 74 - v1/models/index_and_snapshots.go | 177 - .../index_and_snapshots_archive_task_uid.go | 96 - ...and_snapshots_remote_protection_job_uid.go | 96 - v1/models/indexing_policy.go | 66 - v1/models/indexing_policy_proto.go | 58 - v1/models/infected_file.go | 153 - v1/models/infected_file_id.go | 58 - v1/models/infected_file_param.go | 123 - v1/models/infected_files.go | 128 - v1/models/input_spec.go | 164 - v1/models/input_spec_file_time_filter.go | 57 - v1/models/input_spec_input_files_selector.go | 142 - v1/models/input_spec_input_v_ms_selector.go | 143 - v1/models/interface.go | 115 - v1/models/interface_group.go | 247 -- v1/models/interface_stats.go | 71 - .../io_filter_storage_policy_properties.go | 62 - v1/models/io_preferential_tier.go | 659 ---- v1/models/iops_tile.go | 193 - v1/models/ip_config.go | 72 - v1/models/ip_details.go | 61 - v1/models/ip_mode.go | 54 - v1/models/ip_range.go | 54 - v1/models/ip_unconfig.go | 58 - v1/models/ipmi_configuration.go | 62 - v1/models/iscsi_san_port.go | 58 - v1/models/isilon_access_zone.go | 136 - v1/models/isilon_cluster.go | 61 - v1/models/isilon_env_params.go | 123 - v1/models/isilon_env_params_zone_config.go | 217 -- ...isilon_env_params_zone_config_map_entry.go | 112 - ..._params_zone_config_network_pool_config.go | 58 - v1/models/isilon_mount_point.go | 232 -- v1/models/isilon_nfs_mount_point.go | 58 - v1/models/isilon_protection_source.go | 278 -- v1/models/isilon_smb_mount_point.go | 59 - v1/models/item_meta_data.go | 731 ---- v1/models/item_meta_data_occurrence.go | 53 - v1/models/job_policy_proto.go | 178 - v1/models/job_runs_tile.go | 135 - v1/models/k8_s_filter_params.go | 198 -- v1/models/k8_s_filter_params_label_vec.go | 56 - v1/models/k_m_s_status_response.go | 51 - v1/models/key_value_pair.go | 114 - v1/models/key_value_str_pair.go | 53 - v1/models/key_vault_params.go | 119 - v1/models/keyspace_info.go | 126 - v1/models/keystone_acl_proto.go | 162 - v1/models/keystone_acl_proto_grantees.go | 137 - ...ystone_acl_proto_grantees_project_users.go | 50 - ..._proto_grantees_project_users_map_entry.go | 112 - v1/models/kill_map_reduce_instance_result.go | 109 - v1/models/kms_configuration_response.go | 355 -- v1/models/kms_create_request_parameters.go | 394 --- v1/models/kms_delete_params.go | 72 - v1/models/kms_key_info.go | 56 - v1/models/kms_update_request_parameters.go | 175 - v1/models/kubernetes_backup_params.go | 138 - v1/models/kubernetes_backup_source_params.go | 166 - v1/models/kubernetes_credentials.go | 52 - v1/models/kubernetes_env_params.go | 219 -- v1/models/kubernetes_label_attribute.go | 59 - v1/models/kubernetes_params.go | 327 -- v1/models/kubernetes_protection_source.go | 462 --- v1/models/kubernetes_restore_parameters.go | 61 - v1/models/kubernetes_vlan_info.go | 175 - v1/models/kvm_protection_source.go | 165 - v1/models/label_attributes_info.go | 56 - v1/models/label_selector.go | 130 - .../label_selector_match_labels_entry.go | 53 - v1/models/last_protection_run_stats.go | 135 - v1/models/last_protection_run_stats_by_env.go | 206 -- v1/models/last_protection_run_summary.go | 77 - v1/models/latency_thresholds.go | 58 - v1/models/latest_protection_job_run_info.go | 117 - v1/models/latest_protection_run.go | 235 -- v1/models/launch_app_instance.go | 127 - v1/models/ldap_provider.go | 167 - v1/models/ldap_provider_response.go | 170 - v1/models/legal_holdings.go | 55 - v1/models/license_state.go | 128 - v1/models/lifecycle_config_proto.go | 129 - v1/models/lifecycle_rule.go | 277 -- v1/models/lifecycle_rule_filter.go | 166 - v1/models/lifecycle_rule_filter_and.go | 125 - v1/models/lifecycle_rule_filter_tag.go | 53 - v1/models/linux_command_execute_node_resp.go | 62 - v1/models/linux_command_list_node_resp.go | 65 - ...pport_user_bash_shell_access_req_params.go | 52 - ...x_support_user_bash_shell_access_result.go | 53 - ...nux_support_user_sudo_access_req_params.go | 51 - .../linux_support_user_sudo_access_result.go | 53 - v1/models/list_app_entities_result.go | 161 - v1/models/list_centrify_zone.go | 151 - v1/models/list_cert_response.go | 123 - v1/models/list_nlm_locks_response.go | 127 - v1/models/list_org_vdc_networks_response.go | 121 - .../list_storage_profiles_response_body.go | 124 - v1/models/local_copy_info_base.go | 127 - ..._info_base_yoda_notified_task_ids_entry.go | 53 - v1/models/local_time.go | 54 - v1/models/lock_file_params.go | 56 - v1/models/lock_holder_info.go | 53 - v1/models/lock_info.go | 124 - v1/models/lock_range.go | 56 - v1/models/logical_stats.go | 58 - v1/models/logical_volume.go | 124 - v1/models/m365_teams_channel_info.go | 55 - v1/models/m_o_ref.go | 53 - v1/models/m_s_exchange_params.go | 53 - v1/models/m_s_graph_app_credentials.go | 221 -- ...p_credentials_scope_client_id_map_entry.go | 53 - ...h_app_credentials_scope_token_map_entry.go | 53 - v1/models/magneto_instance_id.go | 56 - v1/models/magneto_object_id.go | 170 - v1/models/maintenance_mode_config_proto.go | 245 -- ...config_proto_workflow_intervention_spec.go | 53 - v1/models/management_server.go | 53 - v1/models/map_reduce_aux_data.go | 122 - v1/models/map_reduce_file_formats.go | 53 - v1/models/map_reduce_info.go | 248 -- v1/models/map_reduce_info_app_property.go | 51 - .../map_reduce_info_required_property.go | 61 - v1/models/map_reduce_instance.go | 283 -- v1/models/map_reduce_instance_input_param.go | 54 - v1/models/map_reduce_instance_run_info.go | 101 - v1/models/map_reduce_instance_wrapper.go | 120 - v1/models/mapper_info.go | 72 - v1/models/mappers_wrapper.go | 123 - v1/models/mark_node_delete_request.go | 55 - v1/models/mcm_user_profile.go | 192 - v1/models/metric_data_block.go | 135 - v1/models/metric_data_point.go | 121 - v1/models/metric_value.go | 118 - v1/models/mfa_info.go | 93 - v1/models/migrate_oracle_clone_params.go | 66 - v1/models/mirror_params.go | 56 - v1/models/mongo_d_b_additional_params.go | 55 - v1/models/mongo_d_b_backup_job_params.go | 110 - v1/models/mongo_d_b_cluster.go | 52 - v1/models/mongo_d_b_collection.go | 58 - v1/models/mongo_d_b_connect_params.go | 135 - v1/models/mongo_d_b_database.go | 52 - v1/models/mongo_d_b_protection_source.go | 282 -- v1/models/mongo_d_b_recover_job_params.go | 51 - v1/models/monthly_schedule.go | 203 -- v1/models/mount_point_info.go | 187 - v1/models/mount_point_info_nfs_info.go | 57 - v1/models/mount_point_info_smb_info.go | 57 - v1/models/mount_volume_result.go | 121 - v1/models/mount_volume_result_details.go | 120 - ...mount_volume_result_details_mount_error.go | 94 - v1/models/mount_volumes_hyper_v_params.go | 116 - v1/models/mount_volumes_info_proto.go | 352 -- v1/models/mount_volumes_parameters.go | 96 - v1/models/mount_volumes_params.go | 232 -- v1/models/mount_volumes_state.go | 193 - v1/models/mount_volumes_state_other_error.go | 95 - v1/models/mount_volumes_task_state_proto.go | 218 -- v1/models/mount_volumes_v_mware_params.go | 116 - ...ti_stage_restore_finalize_action_params.go | 55 - .../multi_stage_restore_task_state_proto.go | 124 - v1/models/n_f_s_export_paths.go | 58 - v1/models/n_g_t_info.go | 62 - v1/models/namespace_info.go | 11 - v1/models/nas_analysis_job_params.go | 309 -- ..._analysis_job_params_access_time_bucket.go | 57 - ...as_analysis_job_params_file_size_bucket.go | 57 - ...as_analysis_job_params_file_type_bucket.go | 53 - ...nas_analysis_job_params_mod_time_bucket.go | 57 - v1/models/nas_backup_params.go | 326 -- v1/models/nas_credentials.go | 222 -- v1/models/nas_env_job_parameters.go | 592 ---- v1/models/nas_mount_credential_params.go | 192 - v1/models/nas_mount_credentials.go | 70 - v1/models/nas_protection_source.go | 193 - v1/models/nas_source_throttling_params.go | 64 - v1/models/nas_throttling_params.go | 69 - v1/models/netapp_cluster_info.go | 64 - v1/models/netapp_protection_source.go | 383 -- v1/models/netapp_version_tuple.go | 56 - v1/models/netapp_volume_info.go | 448 --- v1/models/netapp_vserver_info.go | 301 -- v1/models/network_configuration.go | 73 - v1/models/network_interface.go | 244 -- v1/models/network_mapping.go | 66 - v1/models/network_mapping_proto.go | 173 - v1/models/network_params.go | 112 - v1/models/network_pool.go | 250 -- v1/models/network_pool_config.go | 61 - v1/models/network_pool_range.go | 53 - v1/models/network_realm_info.go | 62 - v1/models/networking_information.go | 126 - v1/models/new_s3_secret_access_key.go | 50 - v1/models/nexus_cloud_credentials.go | 214 -- v1/models/nfs_connection.go | 63 - v1/models/nfs_info.go | 65 - v1/models/nfs_root_permissions.go | 58 - v1/models/nfs_squash.go | 53 - v1/models/nimble_protection_source.go | 224 -- v1/models/nis_netgroup.go | 126 - v1/models/nlm_lock.go | 127 - v1/models/no_sql_backup_job_params.go | 409 --- ...job_params_immediate_ancestor_map_entry.go | 112 - v1/models/no_sql_connect_params.go | 472 --- v1/models/no_sql_log_data.go | 178 - .../no_sql_mirror_recovery_job_params.go | 54 - v1/models/no_sql_recover_job_params.go | 429 --- v1/models/no_sql_recover_params.go | 289 -- v1/models/no_sql_recover_params_entity_log.go | 174 - v1/models/no_sql_restore_object.go | 128 - ...ect_object_restore_properties_map_entry.go | 53 - v1/models/node.go | 730 ---- v1/models/node_delete_result.go | 131 - v1/models/node_hardware_info.go | 58 - v1/models/node_interface_pair.go | 55 - v1/models/node_network_interfaces.go | 139 - v1/models/node_port.go | 127 - v1/models/node_stats.go | 114 - v1/models/node_status.go | 61 - v1/models/node_status_result.go | 403 --- v1/models/node_system_disk_info.go | 56 - .../node_to_tiered_storage_directories_map.go | 53 - v1/models/node_upgrade_status.go | 60 - .../noncurrent_version_expiration_action.go | 51 - v1/models/notification_rule.go | 337 -- v1/models/notifications.go | 130 - v1/models/ntp_servers.go | 128 - v1/models/ntp_settings_config.go | 53 - v1/models/o365_add_snapshot_arg.go | 290 -- v1/models/o365_add_snapshot_arg_group_info.go | 11 - .../o365_add_snapshot_arg_one_drive_info.go | 70 - .../o365_add_snapshot_arg_outlook_info.go | 50 - ...365_add_snapshot_arg_public_folder_info.go | 50 - .../o365_add_snapshot_arg_sharepoint_info.go | 52 - v1/models/o365_add_snapshot_arg_teams_info.go | 11 - v1/models/o365_backup_env_params.go | 330 -- v1/models/o365_backup_params.go | 231 -- v1/models/o365_backup_params_site_info.go | 53 - v1/models/o365_connect_params.go | 113 - .../o365_one_drive_restore_entity_params.go | 122 - ...5_one_drive_restore_entity_params_drive.go | 132 - ..._drive_restore_entity_params_drive_item.go | 56 - v1/models/o365_region_proto.go | 51 - v1/models/object_field_selector.go | 54 - v1/models/object_info.go | 132 - v1/models/object_information.go | 263 -- v1/models/object_level_params.go | 53 - v1/models/object_meta.go | 199 -- v1/models/object_meta_annotations_entry.go | 53 - v1/models/object_meta_labels_entry.go | 53 - v1/models/object_protection_info.go | 57 - v1/models/object_reference.go | 74 - v1/models/object_search_results.go | 134 - v1/models/object_snapshot_document.go | 647 ---- .../object_snapshot_document_o365_params.go | 55 - .../object_snapshot_document_version_info.go | 468 --- ...shot_document_version_info_record_stats.go | 53 - ...apshot_document_version_info_uda_params.go | 51 - ...ct_snapshot_document_volume_map_version.go | 174 - ...ument_volume_mount_i_o_info_map_version.go | 174 - v1/models/object_snapshot_info.go | 315 -- v1/models/object_snapshot_info_job_uid.go | 97 - v1/models/object_snapshot_type.go | 55 - v1/models/objects_by_env.go | 55 - v1/models/objects_discovery_params.go | 218 -- v1/models/objects_protected_by_policy.go | 129 - v1/models/office365_credentials.go | 72 - v1/models/office365_env_job_parameters.go | 164 - v1/models/office365_group_info.go | 64 - v1/models/office365_protection_source.go | 385 -- v1/models/office365_site_info.go | 59 - v1/models/office365_team_info.go | 129 - v1/models/office365_user_info.go | 211 -- v1/models/old_syslog_server.go | 140 - v1/models/on_prem_deploy_target.go | 165 - v1/models/on_prem_deploy_task_state_proto.go | 118 - v1/models/one_drive_backup_env_params.go | 222 -- v1/models/one_drive_document_metadata.go | 111 - v1/models/one_drive_env_job_parameters.go | 118 - v1/models/one_drive_info.go | 130 - v1/models/one_drive_item.go | 58 - v1/models/one_drive_owner.go | 174 - v1/models/one_drive_restore_parameters.go | 187 - v1/models/oracle_app_params.go | 130 - v1/models/oracle_archive_log_info.go | 130 - ...chive_log_info_oracle_archive_log_range.go | 121 - ...acle_archive_log_range_range_attributes.go | 123 - v1/models/oracle_backup_job_params.go | 135 - v1/models/oracle_backup_params.go | 54 - v1/models/oracle_cloud_credentials.go | 132 - v1/models/oracle_container_database_info.go | 125 - v1/models/oracle_d_b_channel_info.go | 224 -- .../oracle_d_b_channel_info_host_info.go | 127 - v1/models/oracle_d_b_config.go | 207 -- ...le_d_b_config_pfile_parameter_map_entry.go | 53 - .../oracle_d_b_config_redo_log_group_conf.go | 63 - v1/models/oracle_data_guard_info.go | 195 - v1/models/oracle_database_node.go | 124 - v1/models/oracle_database_node_channel.go | 154 - v1/models/oracle_env_job_parameters.go | 120 - v1/models/oracle_host.go | 132 - v1/models/oracle_pluggable_database_info.go | 127 - v1/models/oracle_protection_source.go | 400 --- v1/models/oracle_recovery_validation_info.go | 55 - v1/models/oracle_sbt_host_params.go | 130 - v1/models/oracle_session.go | 56 - v1/models/oracle_source_params.go | 129 - v1/models/oracle_special_parameters.go | 138 - .../oracle_update_restore_task_options.go | 113 - v1/models/oracle_vlan_info.go | 59 - v1/models/org_info.go | 59 - v1/models/org_v_d_c_network.go | 59 - v1/models/org_vdc_network_params.go | 58 - v1/models/outlook_backup_env_params.go | 170 - v1/models/outlook_backup_params.go | 67 - v1/models/outlook_env_job_parameters.go | 118 - v1/models/outlook_folder.go | 62 - v1/models/outlook_mailbox.go | 179 - v1/models/outlook_restore_parameters.go | 233 -- v1/models/output_spec.go | 68 - v1/models/overwrite_view_param.go | 90 - v1/models/owner_info.go | 50 - v1/models/ownership_controls_rule.go | 50 - v1/models/p_d_b_entity_info.go | 59 - v1/models/p_d_b_restore_param.go | 185 - ..._d_b_restore_param_rename_pdb_map_entry.go | 53 - v1/models/p_v_c_info.go | 222 -- v1/models/p_v_c_info_p_v_c_spec.go | 228 -- v1/models/p_v_c_info_p_v_c_spec_resources.go | 121 - ...nfo_p_v_c_spec_resources_requests_entry.go | 53 - v1/models/package_details.go | 63 - v1/models/pagination_parameters.go | 64 - v1/models/password_strength.go | 116 - v1/models/password_strength_params.go | 54 - v1/models/pattern.go | 59 - v1/models/pattern_request_body.go | 144 - v1/models/perform_restore_job_state_proto.go | 1861 ---------- ...rm_restore_job_state_proto_restore_task.go | 174 - v1/models/perform_restore_task_state_proto.go | 3129 ----------------- v1/models/peristent_volume_status.go | 50 - v1/models/permission.go | 138 - v1/models/permission_set.go | 125 - v1/models/physical_backup_env_params.go | 125 - v1/models/physical_backup_params.go | 146 - ...params_volume_guid_device_key_map_entry.go | 53 - v1/models/physical_backup_source_params.go | 224 -- v1/models/physical_env_job_parameters.go | 124 - v1/models/physical_file_backup_params.go | 140 - ...cal_file_backup_params_backup_path_info.go | 68 - ...le_backup_params_global_include_exclude.go | 55 - v1/models/physical_node_configuration.go | 61 - v1/models/physical_params.go | 215 -- v1/models/physical_protection_source.go | 564 --- v1/models/physical_protection_source_id.go | 94 - v1/models/physical_snapshot_params.go | 60 - v1/models/physical_special_parameters.go | 252 -- v1/models/physical_uid.go | 59 - v1/models/physical_volume.go | 92 - v1/models/platform_params.go | 53 - v1/models/pod_info_pod_spec_toleration.go | 75 - v1/models/pod_info_pod_spec_volume_info.go | 1546 -------- ...d_info_pod_spec_volume_info_a_w_s_e_b_s.go | 53 - ...od_info_pod_spec_volume_info_azure_disk.go | 53 - ...od_info_pod_spec_volume_info_azure_file.go | 56 - .../pod_info_pod_spec_volume_info_c_s_i.go | 337 -- ...lume_info_c_s_i_volume_attributes_entry.go | 53 - .../pod_info_pod_spec_volume_info_cephfs.go | 59 - .../pod_info_pod_spec_volume_info_cinder.go | 53 - ...od_info_pod_spec_volume_info_config_map.go | 50 - ..._info_pod_spec_volume_info_downward_api.go | 125 - ...ec_volume_info_downward_api_volume_file.go | 167 - ...api_volume_file_resource_field_selector.go | 56 - ...pod_info_pod_spec_volume_info_empty_dir.go | 11 - ...pec_volume_info_ephemeral_volume_source.go | 113 - .../pod_info_pod_spec_volume_info_f_c.go | 56 - .../pod_info_pod_spec_volume_info_flex.go | 182 - ...pod_spec_volume_info_flex_options_entry.go | 53 - .../pod_info_pod_spec_volume_info_flocker.go | 50 - ...od_spec_volume_info_gce_persistent_disk.go | 53 - ...od_info_pod_spec_volume_info_gluster_fs.go | 53 - ...pod_info_pod_spec_volume_info_host_path.go | 50 - ...pod_info_pod_spec_volume_info_i_s_c_s_i.go | 56 - ...d_info_pod_spec_volume_info_key_to_path.go | 56 - .../pod_info_pod_spec_volume_info_local.go | 50 - .../pod_info_pod_spec_volume_info_n_f_s.go | 56 - .../pod_info_pod_spec_volume_info_p_v_c.go | 55 - ...spec_volume_info_photon_persistent_disk.go | 53 - .../pod_info_pod_spec_volume_info_portworx.go | 56 - ...pod_info_pod_spec_volume_info_projected.go | 124 - ...volume_info_projected_volume_projection.go | 262 -- ...volume_projection_config_map_projection.go | 127 - ...lume_projection_downward_api_projection.go | 121 - ...ection_service_account_token_projection.go | 56 - .../pod_info_pod_spec_volume_info_quobyte.go | 66 - .../pod_info_pod_spec_volume_info_r_b_d.go | 131 - ...pod_info_pod_spec_volume_info_scale_i_o.go | 136 - ...d_spec_volume_info_secret_volume_source.go | 50 - ...d_info_pod_spec_volume_info_storage_o_s.go | 121 - ...d_spec_volume_info_vsphere_virtual_disk.go | 59 - v1/models/pod_metadata.go | 131 - v1/models/pod_metadata_volume_info.go | 120 - v1/models/postgres_node_info.go | 65 - v1/models/power_state_config_proto.go | 50 - v1/models/pre_check_validation.go | 56 - v1/models/preferences.go | 51 - v1/models/preferred_domain_controller.go | 56 - ...ervation_hold_library_protection_params.go | 59 - v1/models/primary_backup_run_stats.go | 83 - v1/models/principal.go | 134 - v1/models/private_a_a_g_info.go | 256 -- v1/models/private_a_a_g_replica_info.go | 208 -- v1/models/private_acropolis_entity.go | 270 -- v1/models/private_ad_entity.go | 128 - v1/models/private_agent_entity.go | 309 -- v1/models/private_aws_credentials.go | 145 - v1/models/private_aws_entity.go | 634 ---- v1/models/private_azure_credentials.go | 221 -- v1/models/private_azure_entity.go | 446 --- v1/models/private_bond_slave_info.go | 175 - v1/models/private_cassandra_connect_params.go | 326 -- v1/models/private_cassandra_entity.go | 226 -- v1/models/private_cassandra_security_info.go | 71 - v1/models/private_cbt_info.go | 166 - v1/models/private_cifs_share_info.go | 63 - v1/models/private_cluster_info.go | 50 - v1/models/private_couchbase_connect_params.go | 123 - v1/models/private_couchbase_entity.go | 174 - v1/models/private_credentials.go | 418 --- v1/models/private_datastore_info.go | 66 - v1/models/private_day_time.go | 112 - v1/models/private_day_time_window.go | 160 - v1/models/private_elastifile_entity.go | 168 - v1/models/private_entity_proto.go | 1920 ---------- v1/models/private_error.go | 55 - v1/models/private_error_proto.go | 53 - v1/models/private_exchange_d_a_g_database.go | 176 - .../private_exchange_database_copy_info.go | 256 -- v1/models/private_exchange_entity.go | 326 -- v1/models/private_flashblade_entity.go | 172 - v1/models/private_fleet_network_params.go | 129 - v1/models/private_gcp_credentials.go | 85 - v1/models/private_gcp_entity.go | 573 --- v1/models/private_generic_nas_entity.go | 136 - v1/models/private_gpfs_entity.go | 217 -- v1/models/private_h_base_connect_params.go | 136 - v1/models/private_hbase_entity.go | 178 - v1/models/private_hdfs_connect_params.go | 139 - v1/models/private_hdfs_entity.go | 224 -- v1/models/private_hive_connect_params.go | 136 - v1/models/private_hive_entity.go | 178 - .../private_host_settings_check_result.go | 122 - v1/models/private_hyperflex_entity.go | 59 - v1/models/private_hyperv_entity.go | 370 -- v1/models/private_interface_stats.go | 71 - v1/models/private_io_preferential_tier.go | 716 ---- v1/models/private_isilon_entity.go | 217 -- v1/models/private_kubernetes_entity.go | 602 ---- v1/models/private_kvm_entity.go | 192 - v1/models/private_mongo_d_b_connect_params.go | 123 - v1/models/private_mongodb_entity.go | 178 - v1/models/private_netapp_entity.go | 352 -- v1/models/private_network_interface.go | 244 -- v1/models/private_o365_entity.go | 513 --- v1/models/private_oracle_entity.go | 179 - v1/models/private_physical_entity.go | 512 --- v1/models/private_pure_entity.go | 177 - v1/models/private_registered_app_info.go | 231 -- v1/models/private_s3_proto_entity.go | 142 - v1/models/private_sfdc_entity.go | 273 -- ...private_source_throttling_configuration.go | 160 - v1/models/private_sql_entity.go | 594 ---- v1/models/private_subnet.go | 397 --- v1/models/private_task_event.go | 64 - v1/models/private_throttling_configuration.go | 129 - v1/models/private_uda_entity.go | 239 -- v1/models/private_uplink_switch_info.go | 56 - v1/models/private_user.go | 53 - v1/models/private_user_id.go | 66 - v1/models/private_view_entity.go | 116 - v1/models/private_virtual_disk_basic_info.go | 65 - v1/models/private_virtual_disk_config.go | 60 - v1/models/private_virtual_disk_info.go | 66 - v1/models/private_vmware_entity.go | 1058 ------ v1/models/private_volume_info.go | 197 -- v1/models/privilege_info.go | 319 -- v1/models/product_model_interface_tuple.go | 55 - v1/models/project.go | 119 - v1/models/properties.go | 355 -- v1/models/properties_status.go | 53 - v1/models/protect_object_parameters.go | 327 -- v1/models/protected_object.go | 118 - v1/models/protected_object_privileges.go | 121 - v1/models/protected_objects_by_env.go | 64 - v1/models/protected_objects_summary.go | 135 - v1/models/protected_objects_summary_by_env.go | 209 -- v1/models/protected_objects_tile.go | 135 - v1/models/protected_source_summary.go | 348 -- v1/models/protected_vm_info.go | 287 -- v1/models/protected_vm_info_stats.go | 93 - v1/models/protection_info.go | 76 - v1/models/protection_job.go | 1841 ---------- v1/models/protection_job_audit_trail.go | 243 -- ...otection_job_full_protection_start_time.go | 99 - ...n_job_incremental_protection_start_time.go | 99 - v1/models/protection_job_info.go | 300 -- .../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 | 1591 --------- ...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_run_stats.go | 144 - v1/models/protection_job_start_time.go | 98 - v1/models/protection_job_summary.go | 73 - .../protection_job_summary_for_policies.go | 228 -- v1/models/protection_job_summary_stats.go | 90 - v1/models/protection_job_uid.go | 94 - v1/models/protection_object_summary.go | 306 -- ...ection_object_summary_protection_source.go | 93 - v1/models/protection_policy.go | 1171 ------ ...rotection_policy_full_scheduling_policy.go | 97 - ...on_policy_incremental_scheduling_policy.go | 97 - v1/models/protection_policy_request.go | 1150 ------ ...n_policy_request_full_scheduling_policy.go | 97 - ...y_request_incremental_scheduling_policy.go | 97 - v1/models/protection_policy_summary.go | 346 -- v1/models/protection_run_errors.go | 129 - v1/models/protection_run_instance.go | 293 -- v1/models/protection_run_instance_job_uid.go | 93 - v1/models/protection_run_response.go | 246 -- v1/models/protection_run_shell_info_proto.go | 129 - v1/models/protection_run_state_proto.go | 222 -- v1/models/protection_runs_stats.go | 58 - v1/models/protection_runs_summary.go | 72 - v1/models/protection_shell_info.go | 226 -- v1/models/protection_source.go | 2005 ----------- ...tion_source_acropolis_protection_source.go | 94 - .../protection_source_ad_protection_source.go | 94 - ..._source_and_application_restore_objects.go | 179 - ...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 | 540 --- ...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 - v1/models/protection_source_response.go | 292 -- ...rotection_source_sfdc_protection_source.go | 94 - .../protection_source_snapshot_information.go | 300 -- ...protection_source_sql_protection_source.go | 94 - v1/models/protection_source_tree_info.go | 461 --- ...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 - v1/models/protection_source_uid.go | 61 - ...rotection_source_view_protection_source.go | 94 - ...ection_source_vm_ware_protection_source.go | 94 - ...tection_sources_job_runs_report_element.go | 177 - ...b_runs_report_element_protection_source.go | 93 - ...es_jobs_summary_report_response_wrapper.go | 122 - v1/models/protection_sources_summary_stats.go | 376 -- ...sources_summary_stats_protection_source.go | 95 - v1/models/protection_stats.go | 58 - v1/models/protection_summary.go | 65 - v1/models/protection_summary_by_env.go | 309 -- v1/models/protection_tile.go | 264 -- v1/models/protection_trend.go | 388 -- v1/models/proxy_server.go | 74 - v1/models/pst_parameters.go | 59 - v1/models/public_folder.go | 59 - v1/models/public_folders_backup_env_params.go | 114 - .../public_folders_restore_parameters.go | 179 - v1/models/pure_protection_source.go | 224 -- v1/models/q_star_server_credentials.go | 79 - v1/models/qo_s.go | 59 - v1/models/qo_s_policy.go | 143 - v1/models/quota_and_usage_in_view.go | 120 - v1/models/quota_policy.go | 83 - v1/models/r_d_s_db_connector_params.go | 57 - v1/models/ransomware_info.go | 63 - v1/models/rds_params.go | 101 - v1/models/read_dir_result.go | 127 - v1/models/read_i_o_data_proto.go | 124 - v1/models/read_i_o_data_proto_read_i_o.go | 56 - v1/models/recover_arg.go | 1404 -------- v1/models/recover_disks_task_state_proto.go | 160 - v1/models/recover_task_request.go | 961 ----- v1/models/recover_virtual_disk_info_proto.go | 345 -- v1/models/recover_virtual_disk_params.go | 178 - ...irtual_disk_params_virtual_disk_mapping.go | 217 -- v1/models/recover_volumes_params.go | 175 - v1/models/recover_volumes_params_mapping.go | 53 - v1/models/recover_volumes_task_state_proto.go | 174 - ...er_volumes_task_state_proto_task_result.go | 115 - v1/models/recoveries_tile.go | 132 - v1/models/recovery_task_info.go | 117 - v1/models/reducer_info.go | 72 - v1/models/reducers_wrapper.go | 123 - ...register_application_servers_parameters.go | 181 - v1/models/register_or_update_app_owner_arg.go | 422 --- .../register_protection_source_parameters.go | 2148 ----------- ...source_parameters_nas_mount_credentials.go | 96 - ...ion_source_parameters_throttling_policy.go | 93 - v1/models/register_remote_cluster.go | 319 -- v1/models/registered_app_info.go | 434 --- v1/models/registered_application_server.go | 163 - ...d_application_server_application_server.go | 99 - ...ion_server_registered_protection_source.go | 94 - v1/models/registered_entity_azure_params.go | 57 - .../registered_entity_cassandra_params.go | 164 - .../registered_entity_couchbase_params.go | 110 - .../registered_entity_generic_nas_params.go | 52 - v1/models/registered_entity_h_base_params.go | 164 - v1/models/registered_entity_hdfs_params.go | 164 - v1/models/registered_entity_hive_params.go | 164 - v1/models/registered_entity_info.go | 620 ---- ...ity_info_restricted_object_id_map_entry.go | 53 - v1/models/registered_entity_isilon_params.go | 109 - .../registered_entity_kubernetes_params.go | 320 -- ...rnetes_params_service_annotations_entry.go | 53 - .../registered_entity_mongo_d_b_params.go | 161 - v1/models/registered_entity_o365_params.go | 182 - ...65_params_team_entity_additional_params.go | 52 - ...365_params_user_entity_discovery_params.go | 76 - v1/models/registered_entity_params.go | 1142 ------ .../registered_entity_physical_params.go | 232 -- v1/models/registered_entity_report.go | 118 - v1/models/registered_entity_sfdc_params.go | 149 - v1/models/registered_entity_uda_params.go | 294 -- ...y_uda_params_source_arguments_map_entry.go | 112 - v1/models/registered_entity_v_c_d_params.go | 121 - v1/models/registered_entity_v_mware_params.go | 250 -- ...istered_protection_source_isilon_params.go | 125 - v1/models/registered_source_info.go | 1414 -------- ...tered_source_info_nas_mount_credentials.go | 96 - v1/models/remote_cluster.go | 329 -- v1/models/remote_host.go | 178 - v1/models/remote_host_connector_params.go | 118 - v1/models/remote_job_script.go | 270 -- .../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 | 358 -- ...mote_protection_job_information_job_uid.go | 97 - .../remote_protection_job_run_information.go | 423 --- ..._protection_job_run_information_job_uid.go | 97 - .../remote_protection_job_run_instance.go | 200 -- ...ction_job_run_instance_archive_task_uid.go | 96 - v1/models/remote_restore_indexing_status.go | 209 -- ...store_indexing_status_indexing_task_uid.go | 95 - v1/models/remote_restore_snapshot_status.go | 254 -- ...estore_snapshot_status_archive_task_uid.go | 96 - ...store_snapshot_status_snapshot_task_uid.go | 95 - v1/models/remote_script_path_and_params.go | 73 - v1/models/remote_script_proto.go | 266 -- v1/models/remote_vault_restore_task_status.go | 379 -- ...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 | 215 -- ...t_search_job_information_search_job_uid.go | 95 - v1/models/remote_vault_search_job_results.go | 293 -- ...vault_search_job_results_search_job_uid.go | 95 - v1/models/remote_view_config.go | 61 - v1/models/rename_object_param_proto.go | 55 - v1/models/rename_view_param.go | 73 - v1/models/replica_info.go | 166 - .../replicate_snapshots_to_a_w_s_params.go | 110 - .../replicate_snapshots_to_azure_params.go | 266 -- .../replication_encryption_key_reponse.go | 53 - v1/models/replication_info_base.go | 340 -- ..._base_filtered_backup_task_id_map_entry.go | 53 - v1/models/replication_target.go | 54 - v1/models/replication_target_settings.go | 56 - v1/models/request_error.go | 55 - v1/models/reset_s3_secret_key_parameters.go | 61 - v1/models/resource_pool_result.go | 212 -- v1/models/restore_a_d_app_object_params.go | 246 -- v1/models/restore_acropolis_v_ms_params.go | 349 -- v1/models/restore_acropolis_vm_param.go | 166 - ..._acropolis_vm_param_network_config_info.go | 126 - ...vm_param_network_config_info_n_i_c_spec.go | 53 - v1/models/restore_ad_guid_pair.go | 58 - v1/models/restore_app_arg.go | 445 --- v1/models/restore_app_object.go | 321 -- v1/models/restore_app_object_params.go | 376 -- v1/models/restore_app_params.go | 238 -- v1/models/restore_app_task_state_proto.go | 184 - v1/models/restore_azure_sql_params.go | 174 - v1/models/restore_count_by_object_type.go | 55 - v1/models/restore_env_stats.go | 201 -- v1/models/restore_exchange_params.go | 163 - ...estore_exchange_params_database_options.go | 138 - .../restore_exchange_params_view_options.go | 57 - v1/models/restore_file_copy_stats.go | 77 - v1/models/restore_file_params.go | 227 -- v1/models/restore_file_result_info.go | 224 -- v1/models/restore_files_info_proto.go | 314 -- v1/models/restore_files_params.go | 875 ----- ...directory_name_security_style_map_entry.go | 53 - v1/models/restore_files_preferences.go | 89 - v1/models/restore_files_task_request.go | 462 --- ...e_files_task_request_source_object_info.go | 102 - v1/models/restore_files_task_state_proto.go | 162 - v1/models/restore_hyper_v_vm_params.go | 408 --- v1/models/restore_info.go | 339 -- v1/models/restore_info_proto.go | 316 -- .../restore_info_proto_restore_entity.go | 366 -- v1/models/restore_k_vm_v_ms_params.go | 396 --- .../restore_kubernetes_namespaces_params.go | 308 -- v1/models/restore_o365_groups_params.go | 142 - ...365_groups_params_group_granular_params.go | 163 - ...store_o365_groups_params_m_s_group_info.go | 170 - .../restore_o365_public_folders_params.go | 186 - ...365_public_folders_params_public_folder.go | 60 - ...ublic_folders_params_root_public_folder.go | 177 - v1/models/restore_o365_teams_params.go | 297 -- ...restore_o365_teams_params_m_s_team_info.go | 177 - ...estore_o365_teams_params_source_channel.go | 131 - ...estore_o365_teams_params_target_channel.go | 136 - v1/models/restore_object.go | 1053 ------ v1/models/restore_object_details.go | 481 --- .../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_object_params.go | 410 --- v1/models/restore_object_state.go | 225 -- v1/models/restore_one_drive_params.go | 199 -- .../restore_one_drive_params_drive_item.go | 58 - .../restore_one_drive_params_drive_owner.go | 172 - ...tore_one_drive_params_drive_owner_drive.go | 128 - v1/models/restore_oracle_app_object_params.go | 638 ---- ...object_params_alternate_location_params.go | 136 - ...oracle_app_object_params_key_value_pair.go | 55 - v1/models/restore_outlook_params.go | 261 -- v1/models/restore_outlook_params_folder.go | 63 - v1/models/restore_outlook_params_mailbox.go | 177 - v1/models/restore_points_for_time_range.go | 185 - .../restore_points_for_time_range_param.go | 374 -- v1/models/restore_r_d_s_postgres_params.go | 123 - v1/models/restore_s3_params.go | 129 - .../restore_s3_params_new_location_params.go | 161 - v1/models/restore_san_params.go | 116 - v1/models/restore_site_params.go | 296 -- v1/models/restore_site_params_drive_item.go | 58 - v1/models/restore_site_params_site_owner.go | 223 -- .../restore_site_params_site_owner_drive.go | 132 - v1/models/restore_spfile_or_pfile_info.go | 60 - v1/models/restore_sql_app_object_params.go | 256 -- v1/models/restore_standby_task_state_proto.go | 51 - v1/models/restore_stats.go | 129 - v1/models/restore_task.go | 1364 ------- v1/models/restore_task_additional_params.go | 212 -- 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/restore_task_state_base_proto.go | 487 --- v1/models/restore_task_wrapper.go | 110 - v1/models/restore_v_mware_vm_params.go | 333 -- v1/models/restore_vapp_info.go | 53 - v1/models/restore_wrapper_proto.go | 365 -- v1/models/restored_file_info.go | 102 - v1/models/restored_file_info_list.go | 50 - .../restored_object_network_config_proto.go | 290 -- .../restored_object_v_c_d_config_proto.go | 427 --- v1/models/retention_policy_proto.go | 126 - v1/models/retrieve_archive_info.go | 219 -- .../retrieve_archive_info_retrieved_entity.go | 192 - .../retrieve_archive_task_state_proto.go | 638 ---- ...ve_task_state_proto_download_files_info.go | 182 - v1/models/role.go | 92 - v1/models/role_create_parameters.go | 61 - v1/models/role_delete_parameters.go | 75 - v1/models/role_update_parameters.go | 57 - v1/models/root_public_folder.go | 179 - v1/models/route.go | 78 - v1/models/rpo_policy_settings.go | 340 -- v1/models/rpo_schedule.go | 130 - v1/models/run_diagnostics_message.go | 53 - v1/models/run_job_snapshot_target.go | 305 -- v1/models/run_map_reduce_instance_result.go | 112 - v1/models/run_map_reduce_params.go | 231 -- v1/models/run_now_parameters.go | 119 - v1/models/run_now_physical_parameters.go | 57 - v1/models/run_protection_job_param.go | 265 -- v1/models/run_uid.go | 114 - v1/models/s3_backup_job_params.go | 58 - v1/models/s3_bucket_config_proto.go | 542 --- ..._proto_prefix_to_child_bucket_map_entry.go | 53 - .../s3_bucket_config_proto_tag_map_entry.go | 53 - v1/models/s3_bucket_info.go | 57 - v1/models/s3_bucket_params_proto.go | 123 - v1/models/s3_entity_info.go | 117 - v1/models/s3_view_backup_properties.go | 127 - v1/models/s_a_n_backup_params.go | 132 - .../s_a_n_group_entity_recover_params.go | 122 - ...over_params_s_a_n_volume_recover_params.go | 109 - v1/models/s_a_n_recover_params.go | 160 - ...n_storage_array_snapshot_recover_params.go | 53 - v1/models/s_s_l_verification.go | 56 - v1/models/salesforce_account_info.go | 79 - v1/models/same_config_ir_recovery_options.go | 61 - v1/models/sample.go | 60 - v1/models/san_backup_job_params.go | 53 - v1/models/san_env_job_parameters.go | 55 - v1/models/san_external_resource.go | 121 - v1/models/san_port.go | 69 - v1/models/san_storage_array.go | 133 - v1/models/san_volume.go | 65 - v1/models/schedule_proto.go | 192 - v1/models/scheduler_proto.go | 123 - v1/models/scheduler_proto_scheduler_job.go | 236 -- .../scheduler_proto_scheduler_job_schedule.go | 58 - ...o_scheduler_job_schedule_job_parameters.go | 109 - ...ule_job_parameters_report_job_parameter.go | 124 - ..._parameters_report_job_parameter_report.go | 121 - ..._report_job_parameter_report_parameters.go | 131 - v1/models/scheduling_policy.go | 331 -- .../scheduling_policy_continuous_schedule.go | 96 - v1/models/scheduling_policy_daily_schedule.go | 94 - .../scheduling_policy_monthly_schedule.go | 94 - v1/models/scheduling_policy_proto.go | 367 -- ...duling_policy_proto_continuous_schedule.go | 52 - .../scheduling_policy_proto_daily_schedule.go | 61 - .../scheduling_policy_proto_date_schedule.go | 122 - ...cheduling_policy_proto_monthly_schedule.go | 57 - .../scheduling_policy_proto_r_p_o_schedule.go | 51 - ...scheduling_policy_proto_yearly_schedule.go | 51 - v1/models/scheduling_policy_rpo_schedule.go | 94 - v1/models/schema_info.go | 62 - v1/models/script_execution_status.go | 123 - v1/models/script_path_and_params.go | 75 - .../search_production_ad_objects_request.go | 62 - v1/models/sequence_number.go | 57 - v1/models/sequencer.go | 162 - v1/models/service_access_config.go | 50 - v1/models/service_account_credentials.go | 61 - v1/models/service_flag_request.go | 67 - v1/models/service_gflags.go | 245 -- v1/models/service_process_entry.go | 181 - v1/models/service_state.go | 53 - v1/models/service_state_result.go | 235 -- v1/models/services_lock_info.go | 124 - v1/models/session_configuration.go | 58 - v1/models/session_user.go | 118 - .../setup_restore_disk_task_info_proto.go | 202 -- v1/models/sfdc_backup_job_params.go | 301 -- v1/models/sfdc_backup_source_params_proto.go | 184 - v1/models/sfdc_object.go | 182 - v1/models/sfdc_object_fields.go | 52 - v1/models/sfdc_org.go | 58 - v1/models/sfdc_params.go | 142 - v1/models/sfdc_protection_source.go | 225 -- v1/models/sfdc_recover_job_params.go | 243 -- ...l_sfdc_server_timestamp_usecs_map_entry.go | 53 - v1/models/sfdc_recover_params.go | 121 - v1/models/sfdc_restore_object.go | 116 - v1/models/sfdc_restore_object_params.go | 73 - v1/models/share.go | 236 -- v1/models/share_point_restore_parameters.go | 186 - .../sharep_point_site_backup_env_params.go | 172 - v1/models/sharepoint_backup_source_params.go | 52 - v1/models/sharepoint_document_metadata.go | 111 - v1/models/sharepoint_item_metadata.go | 50 - v1/models/site_backup_file.go | 58 - v1/models/site_backup_status.go | 181 - v1/models/site_continuity_info.go | 60 - v1/models/site_drive_info.go | 134 - v1/models/site_drive_item.go | 58 - v1/models/site_identity.go | 67 - v1/models/site_info.go | 370 -- v1/models/site_owner.go | 174 - v1/models/site_property.go | 60 - v1/models/sites_discovery_params.go | 54 - v1/models/size_info.go | 56 - v1/models/smb_active_file_opens_response.go | 127 - v1/models/smb_active_file_path.go | 133 - v1/models/smb_active_open.go | 214 -- v1/models/smb_active_session.go | 138 - v1/models/smb_connection.go | 78 - v1/models/smb_lease_info.go | 56 - v1/models/smb_permission.go | 271 -- v1/models/smb_permissions_info.go | 128 - v1/models/smb_principal.go | 60 - v1/models/snapshot_archival_copy_policy.go | 409 --- .../snapshot_archival_copy_policy_target.go | 93 - v1/models/snapshot_attempt.go | 61 - v1/models/snapshot_cloud_copy_policy.go | 407 --- v1/models/snapshot_copy_task.go | 122 - v1/models/snapshot_delta_proto.go | 22 - v1/models/snapshot_info.go | 315 -- v1/models/snapshot_info_proto.go | 605 ---- v1/models/snapshot_label.go | 54 - v1/models/snapshot_manager_params.go | 109 - v1/models/snapshot_replicas.go | 121 - v1/models/snapshot_replicas_replica.go | 167 - v1/models/snapshot_replication_copy_policy.go | 460 --- ...snapshot_replication_copy_policy_target.go | 93 - v1/models/snapshot_target.go | 268 -- v1/models/snapshot_target_policy_proto.go | 426 --- v1/models/snapshot_target_settings.go | 290 -- v1/models/snapshot_version.go | 248 -- v1/models/snmp_config.go | 296 -- v1/models/snmp_sys_info.go | 65 - v1/models/snmp_user.go | 86 - v1/models/source_app_params.go | 113 - v1/models/source_backup_status.go | 405 --- v1/models/source_filters.go | 125 - v1/models/source_filters_source_filter.go | 65 - v1/models/source_for_principal_param.go | 66 - v1/models/source_info.go | 55 - v1/models/source_special_parameter.go | 441 --- ...source_special_parameter_vm_credentials.go | 103 - v1/models/source_throttling_configuration.go | 162 - v1/models/sources_for_sid.go | 197 -- v1/models/space_usage_policy.go | 67 - v1/models/spog_context.go | 58 - v1/models/sql_aag_host_and_databases.go | 250 -- v1/models/sql_backup_job_params.go | 187 - v1/models/sql_backup_params.go | 137 - v1/models/sql_database_file_group_info.go | 51 - v1/models/sql_env_job_parameters.go | 267 -- v1/models/sql_id.go | 87 - v1/models/sql_instance_info.go | 409 --- v1/models/sql_instance_info_edition_info.go | 57 - ...l_instance_info_product_build_type_info.go | 55 - .../sql_instance_info_product_level_info.go | 54 - ...instance_info_product_update_level_info.go | 55 - v1/models/sql_package.go | 62 - v1/models/sql_protection_source.go | 537 --- v1/models/sql_restore_parameters.go | 234 -- v1/models/sql_server_instance_version.go | 62 - v1/models/sql_source_id.go | 67 - v1/models/sql_update_restore_task_options.go | 54 - v1/models/ssl_certificate_config.go | 60 - v1/models/ssl_verification.go | 56 - v1/models/standby_resource.go | 115 - v1/models/statement.go | 211 -- v1/models/stats_group.go | 137 - ...stop_remote_vault_search_job_parameters.go | 111 - ...lt_search_job_parameters_search_job_uid.go | 93 - .../storage_array_snapshot_config_params.go | 181 - ...ray_snapshot_max_snapshot_config_params.go | 50 - ..._array_snapshot_max_space_config_params.go | 50 - ...torage_array_snapshot_throttling_policy.go | 173 - v1/models/storage_domain_stats.go | 247 -- v1/models/storage_efficiency_tile.go | 470 --- v1/models/storage_policy.go | 278 -- v1/models/storage_policy_override.go | 57 - v1/models/storage_profile.go | 56 - v1/models/storage_snapshot_provider_params.go | 211 -- v1/models/storage_stats.go | 76 - v1/models/string_entity_ids_proto.go | 109 - .../string_entity_ids_proto_string_id.go | 56 - v1/models/stubbing_policy_proto.go | 163 - v1/models/subnet.go | 261 -- v1/models/subscription_info.go | 579 --- v1/models/supported_config.go | 67 - v1/models/supported_pattern.go | 118 - v1/models/swift_container_tagging_proto.go | 170 - v1/models/swift_params.go | 55 - v1/models/system_app_status_result.go | 64 - v1/models/system_resource_info.go | 54 - v1/models/table_info.go | 62 - v1/models/tag_attribute.go | 126 - v1/models/tag_attributes.go | 57 - v1/models/tagged_snapshots.go | 50 - v1/models/tags_operation_parameters.go | 75 - v1/models/tags_operation_result.go | 121 - v1/models/tape_media_information.go | 61 - v1/models/task.go | 286 -- v1/models/task_attribute.go | 128 - v1/models/task_event.go | 61 - v1/models/task_notification.go | 627 ---- v1/models/task_progress.go | 273 -- v1/models/task_status.go | 53 - v1/models/teams_additional_params.go | 55 - v1/models/teams_backup_env_params.go | 12 - v1/models/tenant.go | 490 --- v1/models/tenant_access.go | 247 -- v1/models/tenant_active_directory_update.go | 55 - ...nant_active_directory_update_parameters.go | 55 - v1/models/tenant_config.go | 73 - v1/models/tenant_create_parameters.go | 84 - v1/models/tenant_deletion_info.go | 235 -- v1/models/tenant_entity_update.go | 55 - v1/models/tenant_entity_update_parameters.go | 55 - v1/models/tenant_group_update_parameters.go | 55 - v1/models/tenant_id_data.go | 52 - v1/models/tenant_info.go | 61 - v1/models/tenant_ldap_provider_update.go | 55 - .../tenant_ldap_provider_update_parameters.go | 55 - v1/models/tenant_protection_job_update.go | 55 - ...tenant_protection_job_update_parameters.go | 55 - v1/models/tenant_protection_policy_update.go | 55 - ...ant_protection_policy_update_parameters.go | 55 - v1/models/tenant_proxy.go | 62 - v1/models/tenant_stats.go | 240 -- v1/models/tenant_update.go | 78 - v1/models/tenant_user_update_parameters.go | 55 - v1/models/tenant_view_box_update.go | 55 - .../tenant_view_box_update_parameters.go | 55 - v1/models/tenant_view_update.go | 55 - v1/models/tenant_view_update_parameters.go | 55 - v1/models/tenant_vlan_update.go | 56 - v1/models/tenant_vlan_update_parameters.go | 56 - v1/models/threat_protection_info.go | 60 - v1/models/throttling_configuration.go | 184 - ...ottling_configuration_throttling_window.go | 113 - v1/models/throttling_policy.go | 526 --- ...ottling_policy_datastore_streams_config.go | 52 - ...ling_policy_datastore_throttling_policy.go | 227 -- .../throttling_policy_latency_thresholds.go | 55 - v1/models/throttling_policy_override.go | 117 - v1/models/throttling_policy_parameters.go | 244 -- ...icy_registered_source_throttling_config.go | 165 - ...rage_array_snapshot_max_snapshot_config.go | 50 - ...storage_array_snapshot_max_space_config.go | 52 - ...torage_array_snapshot_throttling_policy.go | 225 -- v1/models/throttling_window.go | 112 - v1/models/throughput_tile.go | 193 - v1/models/tiering_audit_log_configuration.go | 94 - v1/models/tiering_info.go | 56 - v1/models/tiering_task_info.go | 59 - v1/models/time.go | 56 - v1/models/time_of_a_week.go | 222 -- v1/models/time_of_a_week_end_time.go | 95 - v1/models/time_of_a_week_start_time.go | 95 - v1/models/time_of_day.go | 55 - v1/models/time_range.go | 118 - v1/models/time_range_attributes.go | 111 - v1/models/time_range_info.go | 185 - v1/models/time_range_settings.go | 120 - v1/models/time_range_usecs.go | 54 - v1/models/time_series_schema_response.go | 123 - v1/models/time_window.go | 163 - v1/models/trending_data.go | 69 - v1/models/uda_backup_job_params.go | 274 -- ...b_params_backup_job_arguments_map_entry.go | 112 - v1/models/uda_backup_params.go | 284 -- v1/models/uda_backup_run_params.go | 109 - ...ams_uda_externally_triggered_run_params.go | 129 - ...lly_triggered_run_params_args_map_entry.go | 112 - v1/models/uda_backup_source_params.go | 109 - v1/models/uda_cluster.go | 53 - v1/models/uda_connect_params.go | 336 -- v1/models/uda_custom_argument.go | 56 - v1/models/uda_object.go | 56 - v1/models/uda_objects.go | 53 - v1/models/uda_protection_source.go | 227 -- v1/models/uda_recover_job_params.go | 451 --- ..._params_restore_job_arguments_map_entry.go | 112 - ...r_job_params_source_arguments_map_entry.go | 112 - v1/models/uda_recover_params.go | 179 - v1/models/uda_restore_object.go | 119 - v1/models/uda_restore_object_params.go | 59 - v1/models/uda_s3_view_backup_properties.go | 119 - v1/models/uda_source_capabilities.go | 84 - v1/models/uda_throttling_params.go | 60 - ...register_application_servers_parameters.go | 155 - v1/models/universal_id.go | 61 - v1/models/universal_id_proto.go | 56 - v1/models/unprotect_object_params.go | 93 - .../update_antivirus_service_group_params.go | 162 - v1/models/update_api_key_params.go | 80 - ...update_app_instance_settings_parameters.go | 114 - .../update_app_instance_state_parameters.go | 130 - .../update_application_server_parameters.go | 189 - v1/models/update_cluster_params.go | 625 ---- v1/models/update_dir_quota_args.go | 118 - v1/models/update_eula_config.go | 52 - .../update_hydra_disk_reservation_param.go | 51 - v1/models/update_idp_configuration_request.go | 97 - .../update_ignored_trusted_domains_params.go | 53 - v1/models/update_infected_file_params.go | 182 - v1/models/update_infected_file_response.go | 183 - v1/models/update_ldap_provider_param.go | 170 - v1/models/update_ldap_provider_params.go | 52 - v1/models/update_linux_password_req_params.go | 97 - v1/models/update_linux_password_result.go | 53 - v1/models/update_machine_accounts_params.go | 66 - v1/models/update_notifications.go | 56 - v1/models/update_protection_job_run.go | 188 - .../update_protection_job_run_job_uid.go | 93 - v1/models/update_protection_job_runs_param.go | 125 - v1/models/update_protection_jobs_state.go | 54 - ...date_protection_jobs_state_request_body.go | 121 - .../update_protection_object_parameters.go | 179 - .../update_protection_source_parameters.go | 1255 ------- ...source_parameters_nas_mount_credentials.go | 96 - ...ion_source_parameters_throttling_policy.go | 93 - v1/models/update_resolution_params.go | 53 - v1/models/update_restore_task_options.go | 172 - v1/models/update_restore_task_params.go | 282 -- .../update_sources_for_principals_params.go | 130 - .../update_trusted_domain_enable_params.go | 52 - .../update_user_quota_settings_for_view.go | 123 - v1/models/update_view_alias_param.go | 210 -- v1/models/update_view_param.go | 1036 ------ v1/models/update_view_param_logical_quota.go | 107 - v1/models/upgrade_cluster_parameters.go | 76 - v1/models/upgrade_cluster_result.go | 56 - v1/models/upgrade_node_parameters.go | 71 - v1/models/upgrade_node_result.go | 56 - v1/models/upgrade_physical_agents_message.go | 54 - v1/models/upgrade_physical_server_agents.go | 78 - v1/models/uplink_switch_info.go | 56 - v1/models/upload_m_r_jar_view_path_wrapper.go | 56 - v1/models/upload_package_result.go | 53 - v1/models/uptiering_run_once_params.go | 57 - v1/models/usage_and_performance_stats.go | 108 - v1/models/usage_schema_info.go | 123 - v1/models/user.go | 1115 ------ v1/models/user_delete_parameters.go | 68 - v1/models/user_id.go | 65 - v1/models/user_id_mapping.go | 292 -- v1/models/user_info.go | 61 - v1/models/user_information.go | 208 -- v1/models/user_license_info.go | 56 - v1/models/user_parameters.go | 348 -- v1/models/user_preferences_result.go | 52 - v1/models/user_quota.go | 127 - v1/models/user_quota_and_usage.go | 131 - v1/models/user_quota_settings.go | 115 - v1/models/user_quota_summary_for_user.go | 59 - v1/models/user_quota_summary_for_view.go | 122 - v1/models/user_ssh_key.go | 55 - v1/models/users_discovery_params.go | 74 - v1/models/uuid_config_proto.go | 50 - v1/models/v_c_d_attributes.go | 157 - v1/models/v_c_d_backup_params.go | 122 - ..._c_d_backup_params_vm_to_vapp_map_entry.go | 112 - v1/models/v_c_d_catalog.go | 53 - v1/models/v_c_d_v_center_info.go | 128 - v1/models/v_cloud_director_info.go | 53 - v1/models/v_mware_add_snapshot_arg.go | 125 - ...e_add_snapshot_arg_additional_file_info.go | 59 - v1/models/v_mware_backup_env_params.go | 208 -- ...backup_env_params_v_app_child_v_ms_list.go | 53 - v1/models/v_mware_backup_params.go | 245 -- ...ntity_id_to_progress_monitor_path_entry.go | 53 - v1/models/v_mware_backup_source_params.go | 230 -- .../v_mware_cdp_protection_source_info.go | 112 - v1/models/v_mware_disk_exclusion_proto.go | 63 - v1/models/v_mware_object_id.go | 64 - v1/models/v_mware_protection_source.go | 1058 ------ v1/models/v_mware_standby_resource.go | 427 --- v1/models/value.go | 118 - v1/models/value_data.go | 67 - v1/models/vault.go | 975 ----- v1/models/vault_bandwidth_limits.go | 267 -- v1/models/vault_config.go | 392 --- v1/models/vault_delete_params.go | 66 - v1/models/vault_encryption_key.go | 127 - v1/models/vault_encryption_key_key_uid.go | 95 - v1/models/vault_params_restore_params.go | 112 - .../vault_params_restore_params_glacier.go | 50 - v1/models/vault_provider_stats_by_env.go | 203 -- v1/models/vault_provider_stats_info.go | 324 -- v1/models/vault_provider_stats_list.go | 80 - v1/models/vault_run_info.go | 55 - v1/models/vault_run_stats_summary.go | 197 -- v1/models/vault_stats.go | 144 - v1/models/vault_stats_info.go | 173 - v1/models/vcd_storage_profile.go | 55 - v1/models/verify_otp_code_params.go | 126 - v1/models/view.go | 1385 -------- v1/models/view_alias.go | 216 -- v1/models/view_box.go | 653 ---- .../view_box_default_user_quota_policy.go | 94 - .../view_box_default_view_quota_policy.go | 104 - v1/models/view_box_pair_info.go | 67 - v1/models/view_box_physical_quota.go | 107 - v1/models/view_box_stats.go | 326 -- ...pping_proto_file_level_data_lock_config.go | 110 - ...w_id_mapping_proto_protocol_access_info.go | 66 - v1/models/view_intent.go | 55 - v1/models/view_logical_quota.go | 107 - v1/models/view_params.go | 298 -- v1/models/view_pinning_config.go | 97 - v1/models/view_privileges.go | 119 - v1/models/view_protection.go | 134 - v1/models/view_protection_source.go | 170 - v1/models/view_protection_source_id.go | 94 - v1/models/view_protocol_stats.go | 110 - v1/models/view_protocol_stats_list.go | 80 - v1/models/view_stat_info.go | 204 -- v1/models/view_stats.go | 116 - v1/models/view_stats_in_last_hours.go | 62 - v1/models/view_stats_info.go | 124 - v1/models/view_stats_snapshot.go | 126 - v1/models/view_user_quota_parameters.go | 114 - v1/models/view_user_quotas.go | 345 -- v1/models/virtual_disk_basic_info.go | 56 - v1/models/virtual_disk_config.go | 56 - v1/models/virtual_disk_id.go | 61 - v1/models/virtual_disk_id_information.go | 63 - v1/models/virtual_disk_info.go | 63 - v1/models/virtual_disk_information.go | 134 - v1/models/virtual_disk_mapping.go | 169 - v1/models/virtual_disk_mapping_response.go | 217 -- v1/models/virtual_disk_recover_task_state.go | 233 -- v1/models/virtual_disk_restore_parameters.go | 132 - v1/models/virtual_disk_restore_response.go | 181 - v1/models/virtual_machine_info.go | 158 - v1/models/virtual_node_configuration.go | 58 - v1/models/vlan.go | 413 --- v1/models/vlan_info.go | 173 - .../vlan_info_service_annotations_entry.go | 53 - v1/models/vlan_parameters.go | 66 - v1/models/vlan_params.go | 59 - v1/models/vlan_subnet.go | 99 - v1/models/vlan_subnet_v6.go | 98 - v1/models/vm_browsing_cookie.go | 51 - v1/models/vm_dir_entry.go | 178 - v1/models/vm_directory_list_result.go | 130 - v1/models/vm_group.go | 126 - v1/models/vm_info.go | 132 - v1/models/vm_linking_info.go | 62 - v1/models/vm_name_info.go | 54 - v1/models/vm_num_replicas.go | 53 - v1/models/vm_results.go | 126 - v1/models/vm_search_result.go | 162 - v1/models/vm_volumes_information.go | 126 - v1/models/vmware_clone_parameters.go | 328 -- v1/models/vmware_env_job_parameters.go | 133 - v1/models/vmware_folders_result.go | 183 - v1/models/vmware_params.go | 50 - v1/models/vmware_restore_parameters.go | 339 -- v1/models/vmware_special_parameters.go | 228 -- ...mware_special_parameters_vm_credentials.go | 100 - v1/models/volume_indexing_info.go | 57 - v1/models/volume_info.go | 264 -- v1/models/volume_info_disk_info.go | 205 -- .../volume_info_disk_info_partition_info.go | 77 - .../volume_info_disk_info_physical_range.go | 53 - v1/models/volume_info_logical_volume_info.go | 125 - v1/models/volume_info_result.go | 126 - v1/models/volume_info_sub_volume_info.go | 51 - ...me_mapping_report_volume_mount_i_o_info.go | 121 - ...mount_i_o_info_volume_mount_reads_entry.go | 112 - v1/models/volume_name_map.go | 123 - .../volume_name_map_volume_name_map_entry.go | 112 - v1/models/volume_security_info.go | 131 - v1/models/vserver_info.go | 255 -- .../vserver_info_network_interface_info.go | 68 - v1/models/vserver_network_interface.go | 120 - v1/models/vss_writer.go | 55 - v1/models/web_hook_delivery_target.go | 54 - v1/models/windows_host_snapshot_parameters.go | 68 - v1/models/worm_retention_proto.go | 70 - v1/models/yoda_file_search_result.go | 162 - v1/models/zone_config.go | 220 -- v1/models/zone_info.go | 133 - v1/models/zone_info_network_pool.go | 145 - v1/models/zone_info_network_pool_range.go | 53 - v2/client/access_token/access_token_client.go | 108 - .../create_access_token_parameters.go | 153 - .../create_access_token_responses.go | 187 - .../active_directory_client.go | 483 --- .../create_active_directory_parameters.go | 153 - .../create_active_directory_responses.go | 187 - .../delete_active_directory_parameters.go | 232 -- .../delete_active_directory_responses.go | 173 - .../get_active_directory_by_id_parameters.go | 335 -- .../get_active_directory_by_id_responses.go | 187 - .../get_active_directory_parameters.go | 299 -- .../get_active_directory_responses.go | 187 - .../get_centrify_zones_parameters.go | 156 - .../get_centrify_zones_responses.go | 187 - .../get_domain_controllers_parameters.go | 211 -- .../get_domain_controllers_responses.go | 187 - .../get_trusted_domains_parameters.go | 156 - .../get_trusted_domains_responses.go | 187 - ...er_trusted_domains_discovery_parameters.go | 184 - ...ger_trusted_domains_discovery_responses.go | 173 - .../update_active_directory_parameters.go | 178 - .../update_active_directory_responses.go | 187 - .../update_trusted_domains_parameters.go | 180 - .../update_trusted_domains_responses.go | 187 - v2/client/agent/agent_client.go | 257 -- .../agent/create_upgrade_task_parameters.go | 153 - .../agent/create_upgrade_task_responses.go | 187 - v2/client/agent/download_agent_parameters.go | 153 - v2/client/agent/download_agent_responses.go | 187 - .../agent/get_upgrade_tasks_parameters.go | 254 -- .../agent/get_upgrade_tasks_responses.go | 187 - ...action_on_agent_upgrade_task_parameters.go | 153 - ..._action_on_agent_upgrade_task_responses.go | 187 - v2/client/alert/alert_client.go | 105 - .../alert/get_alert_summary_parameters.go | 330 -- .../alert/get_alert_summary_responses.go | 187 - .../antivirus_service_client.go | 399 --- .../create_antivirus_group_parameters.go | 153 - .../create_antivirus_group_responses.go | 187 - .../delete_antivirus_group_parameters.go | 154 - .../delete_antivirus_group_responses.go | 173 - .../delete_infected_files_parameters.go | 153 - .../delete_infected_files_responses.go | 187 - ...get_antivirus_service_groups_parameters.go | 128 - .../get_antivirus_service_groups_responses.go | 187 - ...t_icap_uri_connection_status_parameters.go | 175 - ...et_icap_uri_connection_status_responses.go | 187 - .../get_infected_files_parameters.go | 324 -- .../get_infected_files_responses.go | 187 - .../update_antivirus_group_parameters.go | 178 - .../update_antivirus_group_responses.go | 187 - .../update_infected_files_parameters.go | 153 - .../update_infected_files_responses.go | 187 - v2/client/audit_log/audit_log_client.go | 273 -- .../get_audit_logs_actions_parameters.go | 128 - .../get_audit_logs_actions_responses.go | 187 - .../get_audit_logs_entity_types_parameters.go | 128 - .../get_audit_logs_entity_types_responses.go | 187 - .../audit_log/get_audit_logs_parameters.go | 567 --- .../audit_log/get_audit_logs_responses.go | 187 - .../get_filer_audit_log_configs_parameters.go | 128 - .../get_filer_audit_log_configs_responses.go | 187 - ...date_filer_audit_log_configs_parameters.go | 153 - ...pdate_filer_audit_log_configs_responses.go | 187 - .../apply_baseos_patch_parameters.go | 153 - .../apply_baseos_patch_responses.go | 173 - .../baseos_patch_management_client.go | 273 -- .../download_baseos_patch_parameters.go | 153 - .../download_baseos_patch_responses.go | 173 - .../get_baseos_patch_list_parameters.go | 128 - .../get_baseos_patch_list_responses.go | 185 - .../get_baseos_patch_log_parameters.go | 156 - .../get_baseos_patch_log_responses.go | 187 - .../remove_baseos_patch_parameters.go | 153 - .../remove_baseos_patch_responses.go | 173 - .../cloud_retrieve_task_client.go | 189 - .../create_cloud_retrieve_task_parameters.go | 153 - .../create_cloud_retrieve_task_responses.go | 187 - ...loud_retrieve_task_by_job_id_parameters.go | 154 - ...cloud_retrieve_task_by_job_id_responses.go | 187 - .../get_cloud_retrieve_tasks_parameters.go | 128 - .../get_cloud_retrieve_tasks_responses.go | 187 - v2/client/cohesity_r_e_s_t_api_client.go | 337 -- ...a_tiering_analysis_group_run_parameters.go | 173 - ...ta_tiering_analysis_group_run_responses.go | 173 - ...cancel_data_tiering_task_run_parameters.go | 173 - .../cancel_data_tiering_task_run_responses.go | 173 - ..._data_tiering_analysis_group_parameters.go | 153 - ...e_data_tiering_analysis_group_responses.go | 187 - ...a_tiering_analysis_group_run_parameters.go | 175 - ...ta_tiering_analysis_group_run_responses.go | 173 - .../create_data_tiering_task_parameters.go | 153 - .../create_data_tiering_task_responses.go | 187 - ...create_data_tiering_task_run_parameters.go | 175 - .../create_data_tiering_task_run_responses.go | 173 - v2/client/data_tiering/data_tiering_client.go | 913 ----- ..._data_tiering_analysis_group_parameters.go | 151 - ...e_data_tiering_analysis_group_responses.go | 173 - .../delete_data_tiering_task_parameters.go | 151 - .../delete_data_tiering_task_responses.go | 173 - .../get_capacity_trend_analysis_parameters.go | 238 -- .../get_capacity_trend_analysis_responses.go | 187 - ...tiering_analysis_group_by_id_parameters.go | 151 - ..._tiering_analysis_group_by_id_responses.go | 187 - ..._tiering_analysis_group_runs_parameters.go | 197 -- ...a_tiering_analysis_group_runs_responses.go | 185 - ...alysis_groups_default_config_parameters.go | 128 - ...nalysis_groups_default_config_responses.go | 187 - ...data_tiering_analysis_groups_parameters.go | 209 -- ..._data_tiering_analysis_groups_responses.go | 185 - .../get_data_tiering_task_by_id_parameters.go | 151 - .../get_data_tiering_task_by_id_responses.go | 187 - .../get_data_tiering_tasks_parameters.go | 210 -- .../get_data_tiering_tasks_responses.go | 185 - ..._data_tiering_analysis_group_parameters.go | 175 - ...e_data_tiering_analysis_group_responses.go | 187 - ...g_analysis_group_tags_config_parameters.go | 175 - ...ng_analysis_group_tags_config_responses.go | 187 - ...iering_analysis_groups_state_parameters.go | 154 - ...tiering_analysis_groups_state_responses.go | 187 - .../update_data_tiering_task_parameters.go | 175 - .../update_data_tiering_task_responses.go | 187 - ...ate_data_tiering_tasks_state_parameters.go | 154 - ...date_data_tiering_tasks_state_responses.go | 187 - .../create_external_target_parameters.go | 153 - .../create_external_target_responses.go | 187 - .../delete_external_target_parameters.go | 188 - .../delete_external_target_responses.go | 173 - .../external_target/external_target_client.go | 467 --- .../get_external_target_by_id_parameters.go | 154 - .../get_external_target_by_id_responses.go | 187 - ...l_target_encryption_key_info_parameters.go | 154 - ...al_target_encryption_key_info_responses.go | 187 - ...t_external_target_media_info_parameters.go | 298 -- ...et_external_target_media_info_responses.go | 187 - ...get_external_target_settings_parameters.go | 128 - .../get_external_target_settings_responses.go | 187 - .../get_external_targets_parameters.go | 445 --- .../get_external_targets_responses.go | 187 - .../update_external_target_parameters.go | 178 - .../update_external_target_responses.go | 187 - ...ate_external_target_settings_parameters.go | 153 - ...date_external_target_settings_responses.go | 187 - .../failover/cancel_failover_parameters.go | 151 - .../failover/cancel_failover_responses.go | 173 - .../cancel_view_failover_parameters.go | 154 - .../cancel_view_failover_responses.go | 173 - .../failover/create_planned_run_parameters.go | 175 - .../failover/create_planned_run_responses.go | 187 - .../create_view_failover_parameters.go | 178 - .../create_view_failover_responses.go | 187 - v2/client/failover/failover_client.go | 567 --- .../failover/get_failover_ops_parameters.go | 154 - .../failover/get_failover_ops_responses.go | 187 - .../get_tracking_view_id_parameters.go | 186 - .../get_tracking_view_id_responses.go | 187 - .../failover/get_view_failover_parameters.go | 154 - .../failover/get_view_failover_responses.go | 187 - .../failover/init_failover_parameters.go | 175 - v2/client/failover/init_failover_responses.go | 187 - .../failover/object_linkage_parameters.go | 175 - .../failover/object_linkage_responses.go | 173 - .../failover/poll_planned_runs_parameters.go | 254 -- .../failover/poll_planned_runs_responses.go | 187 - ...eplication_backup_activation_parameters.go | 175 - ...replication_backup_activation_responses.go | 187 - .../source_backup_deactivation_parameters.go | 175 - .../source_backup_deactivation_responses.go | 173 - v2/client/firewall/firewall_client.go | 357 -- .../list_firewall_ip_sets_parameters.go | 128 - .../list_firewall_ip_sets_responses.go | 187 - .../list_firewall_profiles_parameters.go | 128 - .../list_firewall_profiles_responses.go | 187 - .../remove_firewall_profiles_parameters.go | 153 - .../remove_firewall_profiles_responses.go | 187 - .../reset_firewall_profile_parameters.go | 128 - .../reset_firewall_profile_responses.go | 173 - .../update_firewall_ip_sets_parameters.go | 153 - .../update_firewall_ip_sets_responses.go | 187 - .../update_firewall_profile_parameters.go | 153 - .../update_firewall_profile_responses.go | 187 - .../update_firewall_profiles_parameters.go | 153 - .../update_firewall_profiles_responses.go | 187 - .../get_helios_on_prem_config_parameters.go | 128 - .../get_helios_on_prem_config_responses.go | 187 - .../helios_on_prem/helios_on_prem_client.go | 147 - ...update_helios_on_prem_config_parameters.go | 153 - .../update_helios_on_prem_config_responses.go | 187 - .../i_ps/configure_ip_settings_parameters.go | 153 - .../i_ps/configure_ip_settings_responses.go | 187 - v2/client/i_ps/i_ps_client.go | 105 - .../create_identity_parameters.go | 153 - .../create_identity_provider_parameters.go | 153 - .../create_identity_provider_responses.go | 187 - .../create_identity_responses.go | 187 - .../delete_identity_parameters.go | 154 - .../delete_identity_provider_parameters.go | 154 - .../delete_identity_provider_responses.go | 173 - .../delete_identity_responses.go | 173 - .../get_identities_parameters.go | 299 -- .../get_identities_responses.go | 187 - .../get_identity_providers_parameters.go | 344 -- .../get_identity_providers_responses.go | 187 - .../identity_provider_client.go | 477 --- .../idps_login_parameters.go | 163 - .../identity_provider/idps_login_responses.go | 173 - .../perform_identity_action_parameters.go | 153 - .../perform_identity_action_responses.go | 187 - .../update_identity_parameters.go | 178 - .../update_identity_provider_parameters.go | 178 - .../update_identity_provider_responses.go | 187 - .../update_identity_responses.go | 187 - .../get_kerberos_provider_by_id_parameters.go | 152 - .../get_kerberos_provider_by_id_responses.go | 187 - .../get_kerberos_providers_parameters.go | 299 -- .../get_kerberos_providers_responses.go | 187 - .../kerberos_provider_client.go | 273 -- .../register_kerberos_provider_parameters.go | 153 - .../register_kerberos_provider_responses.go | 187 - ...unregister_kerberos_provider_parameters.go | 175 - .../unregister_kerberos_provider_responses.go | 187 - .../update_kerberos_provider_parameters.go | 176 - .../update_kerberos_provider_responses.go | 187 - .../add_kms_configuration_parameters.go | 153 - .../add_kms_configuration_responses.go | 187 - .../delete_kms_config_parameters.go | 154 - .../delete_kms_config_responses.go | 173 - .../get_kms_configurations_parameters.go | 209 -- .../get_kms_configurations_responses.go | 187 - .../key_management_system_client.go | 231 -- .../update_kms_configuration_parameters.go | 178 - .../update_kms_configuration_responses.go | 187 - .../keystone/create_keystone_parameters.go | 153 - .../keystone/create_keystone_responses.go | 187 - .../keystone/delete_keystone_parameters.go | 176 - .../keystone/delete_keystone_responses.go | 173 - .../get_keystones_by_id_parameters.go | 154 - .../keystone/get_keystones_by_id_responses.go | 187 - .../keystone/get_keystones_parameters.go | 254 -- v2/client/keystone/get_keystones_responses.go | 187 - v2/client/keystone/keystone_client.go | 273 -- .../keystone/update_keystone_parameters.go | 178 - .../keystone/update_keystone_responses.go | 187 - .../create_ldap_provider_parameters.go | 153 - .../l_d_a_p/create_ldap_provider_responses.go | 187 - .../delete_ldap_provider_parameters.go | 154 - .../l_d_a_p/delete_ldap_provider_responses.go | 173 - .../get_ldap_connection_status_parameters.go | 154 - .../get_ldap_connection_status_responses.go | 187 - v2/client/l_d_a_p/get_ldaps_parameters.go | 254 -- v2/client/l_d_a_p/get_ldaps_responses.go | 187 - v2/client/l_d_a_p/ldap_client.go | 273 -- .../update_ldap_provider_parameters.go | 153 - .../l_d_a_p/update_ldap_provider_responses.go | 187 - .../m_f_a/create_email_otp_parameters.go | 153 - v2/client/m_f_a/create_email_otp_responses.go | 173 - v2/client/m_f_a/create_totp_key_parameters.go | 153 - v2/client/m_f_a/create_totp_key_responses.go | 187 - .../m_f_a/get_m_f_a_config_parameters.go | 128 - v2/client/m_f_a/get_m_f_a_config_responses.go | 187 - .../get_support_m_f_a_config_parameters.go | 128 - .../get_support_m_f_a_config_responses.go | 187 - v2/client/m_f_a/mfa_client.go | 441 --- v2/client/m_f_a/send_email_otp_parameters.go | 128 - v2/client/m_f_a/send_email_otp_responses.go | 173 - .../send_support_email_otp_parameters.go | 128 - .../m_f_a/send_support_email_otp_responses.go | 173 - .../m_f_a/update_m_f_a_config_parameters.go | 153 - .../m_f_a/update_m_f_a_config_responses.go | 187 - .../update_support_m_f_a_config_parameters.go | 153 - .../update_support_m_f_a_config_responses.go | 187 - .../verify_support_user_totp_parameters.go | 153 - .../verify_support_user_totp_responses.go | 187 - .../create_node_group_parameters.go | 153 - .../node_group/create_node_group_responses.go | 187 - .../delete_node_group_parameters.go | 151 - .../node_group/delete_node_group_responses.go | 173 - .../get_node_group_by_name_parameters.go | 151 - .../get_node_group_by_name_responses.go | 187 - .../node_group/get_node_groups_parameters.go | 211 -- .../node_group/get_node_groups_responses.go | 187 - v2/client/node_group/node_group_client.go | 273 -- .../update_node_group_parameters.go | 175 - .../node_group/update_node_group_responses.go | 187 - .../associate_entity_metadata_parameters.go | 153 - .../associate_entity_metadata_responses.go | 187 - .../browse_object_contents_parameters.go | 178 - .../browse_object_contents_responses.go | 187 - .../object/cancel_object_runs_parameters.go | 153 - .../object/cancel_object_runs_responses.go | 187 - .../object/construct_meta_info_parameters.go | 175 - .../object/construct_meta_info_responses.go | 187 - v2/client/object/filter_objects_parameters.go | 153 - v2/client/object/filter_objects_responses.go | 187 - ...all_indexed_object_snapshots_parameters.go | 445 --- ..._all_indexed_object_snapshots_responses.go | 187 - .../object/get_entity_metadata_parameters.go | 199 -- .../object/get_entity_metadata_responses.go | 187 - ...get_indexed_object_snapshots_parameters.go | 433 --- .../get_indexed_object_snapshots_responses.go | 187 - .../get_object_run_by_run_id_parameters.go | 176 - .../get_object_run_by_run_id_responses.go | 187 - .../object/get_object_runs_parameters.go | 679 ---- v2/client/object/get_object_runs_responses.go | 187 - .../get_object_snapshot_info_parameters.go | 151 - .../get_object_snapshot_info_responses.go | 187 - ..._object_snapshot_volume_info_parameters.go | 256 -- ...t_object_snapshot_volume_info_responses.go | 187 - .../object/get_object_snapshots_parameters.go | 568 --- .../object/get_object_snapshots_responses.go | 187 - .../object/get_object_stats_parameters.go | 199 -- .../object/get_object_stats_responses.go | 187 - .../object/get_object_tree_parameters.go | 154 - v2/client/object/get_object_tree_responses.go | 187 - .../object/get_objects_last_run_parameters.go | 324 -- .../object/get_objects_last_run_responses.go | 187 - ..._ranges_for_protected_object_parameters.go | 271 -- ...t_ranges_for_protected_object_responses.go | 187 - ...ted_object_of_any_type_by_id_parameters.go | 520 --- ...cted_object_of_any_type_by_id_responses.go | 187 - ...rotected_objects_of_any_type_parameters.go | 737 ---- ...protected_objects_of_any_type_responses.go | 187 - .../object/get_snapshot_diff_parameters.go | 172 - .../object/get_snapshot_diff_responses.go | 187 - ...get_source_hierarchy_objects_parameters.go | 1563 -------- .../get_source_hierarchy_objects_responses.go | 187 - v2/client/object/object_client.go | 1071 ------ .../object/objects_actions_parameters.go | 153 - v2/client/object/objects_actions_responses.go | 173 - .../perform_action_on_object_parameters.go | 178 - .../perform_action_on_object_responses.go | 173 - .../update_object_snapshot_parameters.go | 200 -- .../update_object_snapshot_responses.go | 187 - .../apply_patches_parameters.go | 153 - .../apply_patches_responses.go | 185 - .../get_applied_patches_parameters.go | 198 -- .../get_applied_patches_responses.go | 185 - .../get_available_patches_parameters.go | 198 -- .../get_available_patches_responses.go | 185 - .../get_patch_operation_status_parameters.go | 164 - .../get_patch_operation_status_responses.go | 187 - .../get_patches_history_parameters.go | 163 - .../get_patches_history_responses.go | 185 - .../import_patches_parameters.go | 193 - .../import_patches_responses.go | 185 - .../patch_management_client.go | 381 -- .../revert_patches_parameters.go | 153 - .../revert_patches_responses.go | 185 - v2/client/platform/add_hosts_parameters.go | 153 - v2/client/platform/add_hosts_responses.go | 187 - .../platform/add_remote_disk_parameters.go | 153 - .../platform/add_remote_disk_responses.go | 187 - .../clear_smtp_configuration_parameters.go | 128 - .../clear_smtp_configuration_responses.go | 173 - .../platform/create_cluster_parameters.go | 153 - .../platform/create_cluster_responses.go | 187 - .../create_cluster_vlan_parameters.go | 153 - .../platform/create_cluster_vlan_responses.go | 187 - .../create_interface_group_parameters.go | 153 - .../create_interface_group_responses.go | 187 - v2/client/platform/create_racks_parameters.go | 153 - v2/client/platform/create_racks_responses.go | 187 - ...delete_a_m_q_p_target_config_parameters.go | 128 - .../delete_a_m_q_p_target_config_responses.go | 173 - .../delete_cluster_package_parameters.go | 151 - .../delete_cluster_package_responses.go | 187 - .../delete_cluster_vlan_parameters.go | 151 - .../platform/delete_cluster_vlan_responses.go | 173 - v2/client/platform/delete_hosts_parameters.go | 153 - v2/client/platform/delete_hosts_responses.go | 173 - .../delete_interface_group_parameters.go | 154 - .../delete_interface_group_responses.go | 173 - .../platform/delete_rack_by_id_parameters.go | 151 - .../platform/delete_rack_by_id_responses.go | 173 - v2/client/platform/delete_racks_parameters.go | 128 - v2/client/platform/delete_racks_responses.go | 173 - .../platform/discover_disks_parameters.go | 128 - .../platform/discover_disks_responses.go | 187 - .../platform/disk_identify_parameters.go | 153 - v2/client/platform/disk_identify_responses.go | 187 - .../platform/disks_assimilate_parameters.go | 153 - .../platform/disks_assimilate_responses.go | 187 - .../expand_cluster_nodes_parameters.go | 153 - .../expand_cluster_nodes_responses.go | 187 - .../get_a_m_q_p_target_config_parameters.go | 128 - .../get_a_m_q_p_target_config_responses.go | 187 - .../platform/get_chassis_by_id_parameters.go | 154 - .../platform/get_chassis_by_id_responses.go | 187 - v2/client/platform/get_chassis_parameters.go | 164 - v2/client/platform/get_chassis_responses.go | 187 - ...et_cluster_local_domain_s_id_parameters.go | 128 - ...get_cluster_local_domain_s_id_responses.go | 187 - .../get_cluster_packages_parameters.go | 128 - .../get_cluster_packages_responses.go | 187 - v2/client/platform/get_cluster_parameters.go | 128 - v2/client/platform/get_cluster_responses.go | 187 - .../platform/get_cluster_state_parameters.go | 164 - .../platform/get_cluster_state_responses.go | 187 - .../platform/get_cluster_vlans_parameters.go | 341 -- .../platform/get_cluster_vlans_responses.go | 187 - .../get_interface_groups_parameters.go | 175 - .../get_interface_groups_responses.go | 187 - .../platform/get_interfaces_parameters.go | 474 --- .../platform/get_interfaces_responses.go | 187 - .../get_ipmi_lan_config_parameters.go | 175 - .../platform/get_ipmi_lan_config_responses.go | 187 - .../platform/get_ipmi_users_parameters.go | 175 - .../platform/get_ipmi_users_responses.go | 187 - .../get_is_d_maa_s_cluster_parameters.go | 128 - .../get_is_d_maa_s_cluster_responses.go | 187 - .../get_network_interfaces_parameters.go | 128 - .../get_network_interfaces_responses.go | 187 - v2/client/platform/get_nodes_parameters.go | 361 -- v2/client/platform/get_nodes_responses.go | 185 - .../platform/get_rack_by_id_parameters.go | 154 - .../platform/get_rack_by_id_responses.go | 187 - v2/client/platform/get_racks_parameters.go | 128 - v2/client/platform/get_racks_responses.go | 187 - .../platform/get_remote_disks_parameters.go | 333 -- .../platform/get_remote_disks_responses.go | 187 - .../get_smtp_configuration_parameters.go | 128 - .../get_smtp_configuration_responses.go | 187 - .../get_support_channel_config_parameters.go | 128 - .../get_support_channel_config_responses.go | 187 - .../platform/identify_node_parameters.go | 178 - v2/client/platform/identify_node_responses.go | 187 - .../platform/import_crl_file_parameters.go | 170 - .../platform/import_crl_file_responses.go | 173 - v2/client/platform/list_disks_parameters.go | 166 - v2/client/platform/list_disks_responses.go | 187 - .../platform/list_feature_flag_parameters.go | 128 - .../platform/list_feature_flag_responses.go | 185 - .../platform/list_free_nodes_parameters.go | 128 - .../platform/list_free_nodes_responses.go | 187 - v2/client/platform/list_hosts_parameters.go | 128 - v2/client/platform/list_hosts_responses.go | 187 - .../mark_baseos_upgrade_parameters.go | 153 - .../platform/mark_baseos_upgrade_responses.go | 187 - .../platform/mark_disk_removal_parameters.go | 178 - .../platform/mark_disk_removal_responses.go | 187 - .../platform/mark_node_removal_parameters.go | 178 - .../platform/mark_node_removal_responses.go | 187 - .../platform/node_information_parameters.go | 164 - .../platform/node_information_responses.go | 187 - v2/client/platform/platform_client.go | 3109 ---------------- .../platform/public_key_request_parameters.go | 153 - .../platform/public_key_request_responses.go | 187 - .../platform/remove_remote_disk_parameters.go | 154 - .../platform/remove_remote_disk_responses.go | 173 - .../platform/set_node_power_parameters.go | 153 - .../platform/set_node_power_responses.go | 173 - ...update_a_m_q_p_target_config_parameters.go | 153 - .../update_a_m_q_p_target_config_responses.go | 187 - .../update_airgap_config_parameters.go | 153 - .../update_airgap_config_responses.go | 187 - .../update_chassis_by_id_parameters.go | 178 - .../update_chassis_by_id_responses.go | 187 - .../platform/update_cluster_parameters.go | 153 - .../platform/update_cluster_responses.go | 187 - .../update_cluster_vlan_parameters.go | 175 - .../platform/update_cluster_vlan_responses.go | 187 - .../update_feature_flag_parameters.go | 153 - .../platform/update_feature_flag_responses.go | 185 - v2/client/platform/update_hosts_parameters.go | 150 - v2/client/platform/update_hosts_responses.go | 187 - .../update_interface_group_parameters.go | 178 - .../update_interface_group_responses.go | 187 - .../platform/update_interface_parameters.go | 178 - .../platform/update_interface_responses.go | 187 - .../update_ipmi_lan_config_parameters.go | 153 - .../update_ipmi_lan_config_responses.go | 187 - .../platform/update_ipmi_users_parameters.go | 153 - .../platform/update_ipmi_users_responses.go | 187 - .../update_is_d_maa_s_cluster_parameters.go | 153 - .../update_is_d_maa_s_cluster_responses.go | 187 - .../platform/update_rack_by_id_parameters.go | 178 - .../platform/update_rack_by_id_responses.go | 187 - v2/client/platform/update_racks_parameters.go | 153 - v2/client/platform/update_racks_responses.go | 187 - .../update_smtp_configuration_parameters.go | 153 - .../update_smtp_configuration_responses.go | 187 - ...pdate_support_channel_config_parameters.go | 153 - ...update_support_channel_config_responses.go | 187 - .../upgrade_check_get_results_parameters.go | 154 - .../upgrade_check_get_results_responses.go | 187 - .../upgrade_check_run_tests_parameters.go | 153 - .../upgrade_check_run_tests_responses.go | 187 - .../upgrade_cluster_software_parameters.go | 153 - .../upgrade_cluster_software_responses.go | 187 - .../upload_package_by_url_parameters.go | 153 - .../upload_package_by_url_responses.go | 187 - .../validate_smtp_configuration_parameters.go | 153 - .../validate_smtp_configuration_responses.go | 173 - .../create_protection_policy_parameters.go | 153 - .../create_protection_policy_responses.go | 187 - .../delete_protection_policy_parameters.go | 151 - .../delete_protection_policy_responses.go | 173 - .../get_policy_template_by_id_parameters.go | 151 - .../get_policy_template_by_id_responses.go | 187 - .../policy/get_policy_templates_parameters.go | 324 -- .../policy/get_policy_templates_responses.go | 187 - .../get_protection_policies_parameters.go | 484 --- .../get_protection_policies_responses.go | 187 - .../get_protection_policy_by_id_parameters.go | 176 - .../get_protection_policy_by_id_responses.go | 187 - v2/client/policy/policy_client.go | 357 -- .../update_protection_policy_parameters.go | 175 - .../update_protection_policy_responses.go | 187 - .../privilege/get_privileges_parameters.go | 175 - .../privilege/get_privileges_responses.go | 187 - v2/client/privilege/privilege_client.go | 105 - ...rm_action_on_protect_objects_parameters.go | 153 - ...orm_action_on_protect_objects_responses.go | 187 - .../protect_objects_of_any_type_parameters.go | 178 - .../protect_objects_of_any_type_responses.go | 187 - .../protected_object_client.go | 189 - ...rotected_objects_of_any_type_parameters.go | 203 -- ...protected_objects_of_any_type_responses.go | 187 - .../create_protection_group_parameters.go | 153 - .../create_protection_group_responses.go | 187 - .../create_protection_group_run_parameters.go | 175 - .../create_protection_group_run_responses.go | 187 - .../delete_protection_group_parameters.go | 186 - .../delete_protection_group_responses.go | 173 - .../get_protection_group_by_id_parameters.go | 279 -- .../get_protection_group_by_id_responses.go | 187 - .../get_protection_group_run_parameters.go | 346 -- .../get_protection_group_run_responses.go | 187 - .../get_protection_group_runs_parameters.go | 928 ----- .../get_protection_group_runs_responses.go | 187 - .../get_protection_groups_parameters.go | 1068 ------ .../get_protection_groups_responses.go | 187 - .../get_protection_run_progress_parameters.go | 601 ---- .../get_protection_run_progress_responses.go | 187 - .../get_protection_run_stats_parameters.go | 531 --- .../get_protection_run_stats_responses.go | 187 - .../get_protection_runs_parameters.go | 247 -- .../get_protection_runs_responses.go | 187 - ...et_run_debug_logs_for_object_parameters.go | 195 - ...get_run_debug_logs_for_object_responses.go | 173 - .../get_run_debug_logs_parameters.go | 207 -- .../get_run_debug_logs_responses.go | 173 - .../get_run_errors_report_parameters.go | 195 - .../get_run_errors_report_responses.go | 173 - .../get_runs_report_parameters.go | 263 -- .../get_runs_report_responses.go | 173 - ...tion_on_protection_group_run_parameters.go | 175 - ...ction_on_protection_group_run_responses.go | 187 - .../protection_group_client.go | 819 ----- .../update_protection_group_parameters.go | 175 - .../update_protection_group_responses.go | 187 - .../update_protection_group_run_parameters.go | 175 - .../update_protection_group_run_responses.go | 187 - ...date_protection_groups_state_parameters.go | 153 - ...pdate_protection_groups_state_responses.go | 187 - .../cancel_recovery_by_id_parameters.go | 151 - .../cancel_recovery_by_id_responses.go | 173 - ...d_files_and_folders_recovery_parameters.go | 153 - ...ad_files_and_folders_recovery_responses.go | 187 - .../recovery/create_recovery_parameters.go | 178 - .../recovery/create_recovery_responses.go | 187 - ...download_files_from_recovery_parameters.go | 360 -- .../download_files_from_recovery_responses.go | 173 - .../download_indexed_file_parameters.go | 328 -- .../download_indexed_file_responses.go | 173 - .../recovery/fetch_uptier_data_parameters.go | 156 - .../recovery/fetch_uptier_data_responses.go | 187 - .../recovery/get_recoveries_parameters.go | 621 ---- .../recovery/get_recoveries_responses.go | 187 - .../recovery/get_recovery_by_id_parameters.go | 186 - .../recovery/get_recovery_by_id_responses.go | 187 - .../get_recovery_debug_logs_parameters.go | 151 - .../get_recovery_debug_logs_responses.go | 173 - .../get_recovery_errors_report_parameters.go | 151 - .../get_recovery_errors_report_responses.go | 173 - v2/client/recovery/recovery_client.go | 525 --- .../tear_down_recovery_by_id_parameters.go | 151 - .../tear_down_recovery_by_id_responses.go | 173 - .../get_helios_reg_config_parameters.go | 128 - .../get_helios_reg_config_responses.go | 187 - .../registration/helios_claim_parameters.go | 153 - .../registration/helios_claim_responses.go | 173 - v2/client/registration/registration_client.go | 147 - .../delete_remote_cluster_parameters.go | 154 - .../delete_remote_cluster_responses.go | 173 - .../get_remote_cluster_by_id_parameters.go | 154 - .../get_remote_cluster_by_id_responses.go | 187 - .../get_remote_clusters_parameters.go | 310 -- .../get_remote_clusters_responses.go | 187 - .../register_remote_cluster_parameters.go | 153 - .../register_remote_cluster_responses.go | 187 - .../remote_clusters/remote_clusters_client.go | 315 -- .../update_remote_cluster_parameters.go | 178 - .../update_remote_cluster_responses.go | 187 - .../validate_remote_cluster_parameters.go | 153 - .../validate_remote_cluster_responses.go | 173 - ..._remote_storage_registration_parameters.go | 154 - ...e_remote_storage_registration_responses.go | 173 - ...gistered_remote_storage_list_parameters.go | 128 - ...egistered_remote_storage_list_responses.go | 187 - .../get_remote_storage_details_parameters.go | 273 -- .../get_remote_storage_details_responses.go | 187 - .../register_new_remote_storage_parameters.go | 153 - .../register_new_remote_storage_responses.go | 187 - .../remote_storage/remote_storage_client.go | 273 -- ..._remote_storage_registration_parameters.go | 178 - ...e_remote_storage_registration_responses.go | 187 - v2/client/role/create_role_parameters.go | 153 - v2/client/role/create_role_responses.go | 187 - v2/client/role/delete_role_parameters.go | 151 - v2/client/role/delete_role_responses.go | 173 - v2/client/role/get_roles_parameters.go | 254 -- v2/client/role/get_roles_responses.go | 187 - v2/client/role/role_client.go | 231 -- v2/client/role/update_role_parameters.go | 175 - v2/client/role/update_role_responses.go | 187 - .../routes/add_static_route_parameters.go | 153 - .../routes/add_static_route_responses.go | 187 - .../routes/delete_static_route_parameters.go | 151 - .../routes/delete_static_route_responses.go | 173 - .../routes/list_static_routes_parameters.go | 175 - .../routes/list_static_routes_responses.go | 187 - v2/client/routes/routes_client.go | 231 -- .../routes/update_static_route_parameters.go | 175 - .../routes/update_static_route_responses.go | 187 - v2/client/search/search_client.go | 189 - .../search_indexed_objects_parameters.go | 153 - .../search_indexed_objects_responses.go | 187 - v2/client/search/search_objects_parameters.go | 1209 ------- v2/client/search/search_objects_responses.go | 187 - .../search_protected_objects_parameters.go | 883 ----- .../search_protected_objects_responses.go | 187 - .../security/create_clientcsr_parameters.go | 153 - .../security/create_clientcsr_responses.go | 187 - v2/client/security/create_csr_parameters.go | 153 - v2/client/security/create_csr_responses.go | 187 - v2/client/security/delete_csr_parameters.go | 151 - v2/client/security/delete_csr_responses.go | 173 - v2/client/security/get_ciphers_parameters.go | 128 - v2/client/security/get_ciphers_responses.go | 187 - .../security/get_csr_by_id_parameters.go | 151 - v2/client/security/get_csr_by_id_responses.go | 187 - v2/client/security/get_csr_list_parameters.go | 209 -- v2/client/security/get_csr_list_responses.go | 185 - .../get_object_store_ciphers_parameters.go | 128 - .../get_object_store_ciphers_responses.go | 187 - .../get_security_config_parameters.go | 128 - .../security/get_security_config_responses.go | 187 - ...ort_certificate_by_clientcsr_parameters.go | 153 - ...port_certificate_by_clientcsr_responses.go | 187 - .../list_trusted_ca_by_id_parameters.go | 151 - .../list_trusted_ca_by_id_responses.go | 187 - .../security/list_trusted_cas_parameters.go | 220 -- .../security/list_trusted_cas_responses.go | 187 - .../security/modify_ciphers_parameters.go | 153 - .../security/modify_ciphers_responses.go | 187 - .../modify_object_store_ciphers_parameters.go | 153 - .../modify_object_store_ciphers_responses.go | 187 - .../register_trusted_cas_parameters.go | 153 - .../register_trusted_cas_responses.go | 187 - v2/client/security/security_client.go | 819 ----- .../unregister_trusted_ca_parameters.go | 151 - .../unregister_trusted_ca_responses.go | 173 - .../update_certificate_by_csr_parameters.go | 153 - .../update_certificate_by_csr_responses.go | 187 - .../update_security_config_parameters.go | 153 - .../update_security_config_responses.go | 187 - .../validate_trusted_ca_by_id_parameters.go | 151 - .../validate_trusted_ca_by_id_responses.go | 187 - .../create_azure_applications_parameters.go | 153 - .../create_azure_applications_responses.go | 187 - ...or_update_azure_applications_parameters.go | 153 - ..._or_update_azure_applications_responses.go | 187 - ...otection_source_registration_parameters.go | 154 - ...rotection_source_registration_responses.go | 173 - ...ate_m365_device_access_token_parameters.go | 153 - ...rate_m365_device_access_token_responses.go | 187 - .../generate_m365_device_code_parameters.go | 153 - .../generate_m365_device_code_responses.go | 187 - ...otection_source_registration_parameters.go | 179 - ...rotection_source_registration_responses.go | 187 - .../get_protection_sources_parameters.go | 302 -- .../get_protection_sources_responses.go | 187 - ...get_source_attribute_filters_parameters.go | 190 - .../get_source_attribute_filters_responses.go | 187 - .../get_source_registrations_parameters.go | 390 -- .../get_source_registrations_responses.go | 187 - .../source/get_vdc_details_parameters.go | 154 - v2/client/source/get_vdc_details_responses.go | 187 - ...otection_source_registration_parameters.go | 178 - ...rotection_source_registration_responses.go | 187 - .../protection_source_by_id_parameters.go | 154 - .../protection_source_by_id_responses.go | 187 - ...resh_protection_source_by_id_parameters.go | 154 - ...fresh_protection_source_by_id_responses.go | 173 - .../register_protection_source_parameters.go | 153 - .../register_protection_source_responses.go | 187 - v2/client/source/source_client.go | 735 ---- ...connection_protection_source_parameters.go | 153 - ..._connection_protection_source_responses.go | 187 - ...otection_source_registration_parameters.go | 178 - ...rotection_source_registration_responses.go | 187 - .../get_cluster_storage_stats_parameters.go | 128 - .../get_cluster_storage_stats_responses.go | 187 - v2/client/stats/get_files_stats_parameters.go | 163 - v2/client/stats/get_files_stats_responses.go | 187 - .../get_protection_runs_stats_parameters.go | 247 -- .../get_protection_runs_stats_responses.go | 187 - .../stats/get_time_series_stats_parameters.go | 364 -- .../stats/get_time_series_stats_responses.go | 187 - .../stats/get_view_client_stats_parameters.go | 236 -- .../stats/get_view_client_stats_responses.go | 187 - v2/client/stats/get_views_stats_parameters.go | 270 -- v2/client/stats/get_views_stats_responses.go | 187 - .../stats/get_workload_stats_parameters.go | 128 - .../stats/get_workload_stats_responses.go | 187 - v2/client/stats/stats_client.go | 357 -- .../create_storage_domain_parameters.go | 153 - .../create_storage_domain_responses.go | 187 - .../delete_storage_domain_parameters.go | 154 - .../delete_storage_domain_responses.go | 173 - .../get_storage_domain_by_id_parameters.go | 290 -- .../get_storage_domain_by_id_responses.go | 187 - .../get_storage_domains_parameters.go | 516 --- .../get_storage_domains_responses.go | 187 - .../storage_domain/storage_domain_client.go | 273 -- .../update_storage_domain_parameters.go | 178 - .../update_storage_domain_responses.go | 187 - .../get_support_user_config_parameters.go | 128 - .../get_support_user_config_responses.go | 187 - v2/client/support/support_client.go | 189 - .../update_support_user_config_parameters.go | 153 - .../update_support_user_config_responses.go | 187 - .../validate_support_user_creds_parameters.go | 153 - .../validate_support_user_creds_responses.go | 187 - .../syslog/add_syslog_server_parameters.go | 153 - .../syslog/add_syslog_server_responses.go | 187 - ...pported_syslog_program_names_parameters.go | 128 - ...upported_syslog_program_names_responses.go | 185 - .../get_syslog_audit_tags_parameters.go | 128 - .../syslog/get_syslog_audit_tags_responses.go | 187 - .../get_syslog_server_by_id_parameters.go | 154 - .../get_syslog_server_by_id_responses.go | 187 - ...t_syslog_server_status_by_id_parameters.go | 154 - ...et_syslog_server_status_by_id_responses.go | 187 - .../syslog/get_syslog_servers_parameters.go | 128 - .../syslog/get_syslog_servers_responses.go | 187 - .../patch_syslog_server_by_id_parameters.go | 178 - .../patch_syslog_server_by_id_responses.go | 187 - .../syslog/remove_syslog_server_parameters.go | 154 - .../syslog/remove_syslog_server_responses.go | 173 - .../remove_syslog_servers_parameters.go | 128 - .../syslog/remove_syslog_servers_responses.go | 173 - v2/client/syslog/syslog_client.go | 525 --- .../update_syslog_audit_tags_parameters.go | 153 - .../update_syslog_audit_tags_responses.go | 187 - .../update_syslog_server_by_id_parameters.go | 178 - .../update_syslog_server_by_id_responses.go | 187 - v2/client/tag/create_tag_parameters.go | 153 - v2/client/tag/create_tag_responses.go | 187 - v2/client/tag/delete_tag_parameters.go | 151 - v2/client/tag/delete_tag_responses.go | 173 - v2/client/tag/get_tag_by_id_parameters.go | 151 - v2/client/tag/get_tag_by_id_responses.go | 187 - v2/client/tag/get_tags_parameters.go | 383 -- v2/client/tag/get_tags_responses.go | 185 - v2/client/tag/tag_client.go | 275 -- v2/client/tag/update_tag_parameters.go | 175 - v2/client/tag/update_tag_responses.go | 187 - .../templates/download_art_file_parameters.go | 128 - .../templates/download_art_file_responses.go | 187 - v2/client/templates/templates_client.go | 131 - .../assign_properties_to_tenant_parameters.go | 172 - .../assign_properties_to_tenant_responses.go | 187 - v2/client/tenant/create_tenant_parameters.go | 146 - v2/client/tenant/create_tenant_responses.go | 368 -- v2/client/tenant/delete_tenant_parameters.go | 151 - v2/client/tenant/delete_tenant_responses.go | 173 - ...signed_properties_for_tenant_parameters.go | 151 - ...ssigned_properties_for_tenant_responses.go | 187 - .../get_on_prem_tenant_config_parameters.go | 128 - .../get_on_prem_tenant_config_responses.go | 187 - .../tenant/get_tenant_by_id_parameters.go | 151 - .../tenant/get_tenant_by_id_responses.go | 187 - .../tenant/get_tenant_swift_parameters.go | 163 - .../tenant/get_tenant_swift_responses.go | 187 - v2/client/tenant/list_tenants_parameters.go | 221 -- v2/client/tenant/list_tenants_responses.go | 185 - .../perform_tenant_action_parameters.go | 175 - .../tenant/perform_tenant_action_responses.go | 187 - v2/client/tenant/register_swift_parameters.go | 153 - v2/client/tenant/register_swift_responses.go | 173 - v2/client/tenant/tenant_client.go | 653 ---- .../tenant/unregister_swift_parameters.go | 153 - .../tenant/unregister_swift_responses.go | 173 - ...update_on_prem_tenant_config_parameters.go | 150 - .../update_on_prem_tenant_config_responses.go | 187 - v2/client/tenant/update_tenant_parameters.go | 169 - v2/client/tenant/update_tenant_responses.go | 187 - .../tenant/update_tenant_swift_parameters.go | 153 - .../tenant/update_tenant_swift_responses.go | 187 - v2/client/user/create_group_parameters.go | 153 - v2/client/user/create_group_responses.go | 187 - v2/client/user/create_session_parameters.go | 153 - v2/client/user/create_session_responses.go | 187 - .../user/create_user_api_key_parameters.go | 175 - .../user/create_user_api_key_responses.go | 187 - v2/client/user/create_users_parameters.go | 153 - v2/client/user/create_users_responses.go | 187 - v2/client/user/delete_group_parameters.go | 151 - v2/client/user/delete_group_responses.go | 173 - v2/client/user/delete_groups_parameters.go | 153 - v2/client/user/delete_groups_responses.go | 173 - v2/client/user/delete_session_parameters.go | 163 - v2/client/user/delete_session_responses.go | 173 - .../delete_user_api_key_by_id_parameters.go | 173 - .../delete_user_api_key_by_id_responses.go | 173 - v2/client/user/delete_user_parameters.go | 151 - v2/client/user/delete_user_responses.go | 173 - v2/client/user/delete_users_parameters.go | 153 - v2/client/user/delete_users_responses.go | 173 - .../get_active_sessions_count_parameters.go | 175 - .../get_active_sessions_count_responses.go | 187 - v2/client/user/get_all_api_keys_parameters.go | 288 -- v2/client/user/get_all_api_keys_responses.go | 187 - .../user/get_group_by_s_id_parameters.go | 151 - v2/client/user/get_group_by_s_id_responses.go | 187 - v2/client/user/get_groups_parameters.go | 412 --- v2/client/user/get_groups_responses.go | 187 - .../user/get_principal_sources_parameters.go | 151 - .../user/get_principal_sources_responses.go | 187 - .../get_security_principals_parameters.go | 175 - .../user/get_security_principals_responses.go | 187 - .../user/get_user_api_key_by_id_parameters.go | 173 - .../user/get_user_api_key_by_id_responses.go | 187 - .../user/get_user_api_keys_parameters.go | 265 -- v2/client/user/get_user_api_keys_responses.go | 187 - v2/client/user/get_user_by_s_id_parameters.go | 151 - v2/client/user/get_user_by_s_id_responses.go | 187 - v2/client/user/get_users_parameters.go | 457 --- v2/client/user/get_users_responses.go | 187 - .../user/regenerate_s3_key_parameters.go | 151 - v2/client/user/regenerate_s3_key_responses.go | 187 - .../user/rotate_user_api_key_parameters.go | 173 - .../user/rotate_user_api_key_responses.go | 187 - v2/client/user/update_group_parameters.go | 175 - v2/client/user/update_group_responses.go | 187 - .../update_principal_sources_parameters.go | 175 - .../update_principal_sources_responses.go | 187 - .../update_user_api_key_by_id_parameters.go | 197 -- .../update_user_api_key_by_id_responses.go | 187 - v2/client/user/update_user_parameters.go | 175 - v2/client/user/update_user_responses.go | 187 - v2/client/user/user_client.go | 1155 ------ ...dd_view_user_quota_overrides_parameters.go | 178 - ...add_view_user_quota_overrides_responses.go | 187 - v2/client/view/clear_nlm_locks_parameters.go | 153 - v2/client/view/clear_nlm_locks_responses.go | 173 - .../view/clone_view_directory_parameters.go | 153 - .../view/clone_view_directory_responses.go | 173 - v2/client/view/clone_view_parameters.go | 178 - v2/client/view/clone_view_responses.go | 187 - .../view/close_smb_file_open_parameters.go | 153 - .../view/close_smb_file_open_responses.go | 173 - v2/client/view/create_share_parameters.go | 153 - v2/client/view/create_share_responses.go | 187 - v2/client/view/create_view_parameters.go | 153 - v2/client/view/create_view_responses.go | 187 - .../view/create_view_template_parameters.go | 153 - .../view/create_view_template_responses.go | 187 - v2/client/view/delete_share_parameters.go | 151 - v2/client/view/delete_share_responses.go | 173 - .../delete_view_directory_quota_parameters.go | 222 -- .../delete_view_directory_quota_responses.go | 173 - v2/client/view/delete_view_parameters.go | 154 - v2/client/view/delete_view_responses.go | 173 - .../view/delete_view_template_parameters.go | 154 - .../view/delete_view_template_responses.go | 173 - ...te_view_user_quota_overrides_parameters.go | 178 - ...ete_view_user_quota_overrides_responses.go | 173 - .../view/get_file_lock_status_parameters.go | 181 - .../view/get_file_lock_status_responses.go | 187 - v2/client/view/get_nlm_locks_parameters.go | 275 -- v2/client/view/get_nlm_locks_responses.go | 187 - v2/client/view/get_qos_policies_parameters.go | 128 - v2/client/view/get_qos_policies_responses.go | 187 - v2/client/view/get_shares_parameters.go | 347 -- v2/client/view/get_shares_responses.go | 187 - v2/client/view/get_view_by_id_parameters.go | 154 - v2/client/view/get_view_by_id_responses.go | 187 - v2/client/view/get_view_clients_parameters.go | 290 -- v2/client/view/get_view_clients_responses.go | 187 - .../get_view_clients_summary_parameters.go | 175 - .../get_view_clients_summary_responses.go | 187 - .../get_view_directory_quotas_parameters.go | 226 -- .../get_view_directory_quotas_responses.go | 187 - .../view/get_view_user_quotas_parameters.go | 294 -- .../view/get_view_user_quotas_responses.go | 187 - v2/client/view/get_views_parameters.go | 1528 -------- v2/client/view/get_views_responses.go | 187 - .../view/get_views_summary_parameters.go | 200 -- v2/client/view/get_views_summary_responses.go | 187 - .../view/list_smb_file_opens_parameters.go | 268 -- .../view/list_smb_file_opens_responses.go | 187 - v2/client/view/lock_file_parameters.go | 178 - v2/client/view/lock_file_responses.go | 187 - v2/client/view/overwrite_view_parameters.go | 178 - v2/client/view/overwrite_view_responses.go | 173 - .../read_view_template_by_id_parameters.go | 154 - .../read_view_template_by_id_responses.go | 187 - .../view/read_view_templates_parameters.go | 128 - .../view/read_view_templates_responses.go | 187 - v2/client/view/update_share_parameters.go | 175 - v2/client/view/update_share_responses.go | 187 - .../update_view_directory_quota_parameters.go | 178 - .../update_view_directory_quota_responses.go | 187 - v2/client/view/update_view_parameters.go | 178 - v2/client/view/update_view_responses.go | 187 - .../view/update_view_template_parameters.go | 178 - .../view/update_view_template_responses.go | 187 - ...ate_view_user_quota_override_parameters.go | 200 -- ...date_view_user_quota_override_responses.go | 187 - ...ate_view_user_quota_settings_parameters.go | 178 - ...date_view_user_quota_settings_responses.go | 187 - v2/client/view/view_client.go | 1541 -------- v2/models/a_a_g_group.go | 240 -- v2/models/a_a_g_info.go | 53 - v2/models/a_d_attribute_constants.go | 113 - v2/models/a_d_class_constants.go | 113 - v2/models/a_d_protection_group_params.go | 189 - v2/models/a_w_s_tags.go | 50 - v2/models/a_w_s_target_config.go | 129 - v2/models/a_w_s_tier.go | 159 - v2/models/a_w_s_tiering_levels.go | 119 - v2/models/a_w_s_tiers.go | 124 - v2/models/aag_backup_preference.go | 113 - ...bort_incomplete_multipart_upload_action.go | 50 - v2/models/access_token_response.go | 56 - v2/models/acl_config.go | 121 - v2/models/acl_grant.go | 162 - v2/models/acl_grantee.go | 163 - v2/models/acropolis_disk_info.go | 138 - ...cropolis_protection_group_object_params.go | 218 -- .../acropolis_protection_group_params.go | 371 -- ...ropolis_recover_files_new_target_config.go | 178 - ...is_recover_files_original_target_config.go | 132 - ...rget_params_for_recover_file_and_folder.go | 240 -- .../acropolis_target_params_for_recover_vm.go | 274 -- v2/models/action_object_level_response.go | 346 -- v2/models/action_object_mapping.go | 53 - v2/models/active_directories.go | 121 - v2/models/active_directory.go | 594 ---- v2/models/active_directory_admin_params.go | 88 - v2/models/active_directory_app_params.go | 76 - v2/models/active_directory_error.go | 105 - ...irectory_protection_group_object_params.go | 161 - v2/models/active_sessions_count_params.go | 124 - v2/models/ad_auth_mapping.go | 107 - v2/models/ad_centrify_type_params.go | 164 - v2/models/ad_custom_attributes_type_params.go | 142 - v2/models/ad_fixed_type_params.go | 88 - v2/models/ad_ldap_provider_type_params.go | 108 - v2/models/ad_nis_provider_type_params.go | 108 - v2/models/ad_rfc2307_type_params.go | 108 - v2/models/ad_sfu30_type_params.go | 108 - v2/models/add_dmaas_tenant_cert_request.go | 127 - v2/models/add_remote_disk_response_body.go | 121 - v2/models/advanced_settings.go | 373 -- v2/models/agent_info_object.go | 182 - v2/models/agent_information.go | 244 -- v2/models/agent_upgrade_info_object.go | 112 - v2/models/agent_upgrade_task_action_object.go | 109 - .../agent_upgrade_task_action_request.go | 110 - v2/models/agent_upgrade_task_state.go | 324 -- v2/models/agent_upgrade_task_states.go | 123 - v2/models/airgap_config.go | 110 - v2/models/airgap_status.go | 107 - v2/models/aix_agent_params.go | 107 - v2/models/alert_group_summary.go | 219 -- v2/models/alert_status.go | 113 - v2/models/alert_target.go | 175 - v2/models/alerts_summary_response.go | 121 - v2/models/alias_smb_config.go | 145 - v2/models/allowed_failover_operation.go | 87 - v2/models/antivirus_scan_config.go | 148 - v2/models/antivirus_service.go | 113 - v2/models/antivirus_service_group.go | 117 - v2/models/antivirus_service_groups.go | 121 - v2/models/api_based_fetch_info.go | 71 - v2/models/app_resource.go | 179 - v2/models/applied_patch.go | 147 - v2/models/applied_patches.go | 80 - v2/models/apply_baseos_patch_request.go | 71 - v2/models/apply_patches_request.go | 55 - .../archival_aws_external_target_params.go | 588 ---- .../archival_azure_external_target_params.go | 288 -- v2/models/archival_bandwidth_settings.go | 95 - v2/models/archival_config.go | 356 -- v2/models/archival_data_stats.go | 73 - v2/models/archival_external_target_params.go | 526 --- .../archival_gcp_external_target_params.go | 194 - v2/models/archival_media_info.go | 91 - .../archival_nas_external_target_params.go | 293 -- .../archival_oracle_external_target_params.go | 194 - ...hival_qstar_tape_external_target_params.go | 173 - v2/models/archival_run.go | 123 - v2/models/archival_run_summary.go | 123 - ...archival_s3_comp_external_target_params.go | 193 - v2/models/archival_target_progress_info.go | 201 -- v2/models/archival_target_result.go | 621 ---- v2/models/archival_target_stats_info.go | 201 -- v2/models/archival_target_storage_type.go | 125 - v2/models/archival_target_summary_info.go | 278 -- v2/models/archival_target_tier_info.go | 160 - v2/models/archival_targets.go | 110 - v2/models/assigned_sources.go | 53 - .../associate_entity_metadata_request.go | 141 - v2/models/associate_entity_metadata_result.go | 124 - ...associate_entity_metadata_result_params.go | 56 - v2/models/attachment.go | 142 - v2/models/audit_actions.go | 272 -- v2/models/audit_entity_types.go | 335 -- v2/models/audit_log.go | 92 - v2/models/audit_log_config.go | 88 - v2/models/audit_logs.go | 124 - v2/models/audit_logs_actions.go | 50 - v2/models/audit_logs_entity_types.go | 50 - v2/models/aurora_config.go | 271 -- v2/models/available_patch.go | 138 - v2/models/available_patches.go | 80 - ...ws_agent_protection_group_object_params.go | 95 - .../aws_agent_protection_group_params.go | 246 -- v2/models/aws_archival_storage_class.go | 125 - ...s_aurora_protection_group_object_params.go | 95 - .../aws_aurora_protection_group_params.go | 189 - .../aws_aurora_recovery_target_config.go | 129 - ...apshot_manager_object_protection_params.go | 123 - v2/models/aws_auth_method.go | 113 - v2/models/aws_auth_method_type.go | 107 - .../aws_authentication_methods_params.go | 288 -- v2/models/aws_cloud_c2_s_params.go | 192 - v2/models/aws_cloud_gov_params.go | 111 - v2/models/aws_cloud_spin_params.go | 147 - v2/models/aws_cloud_standard_params.go | 111 - .../aws_common_object_protection_params.go | 122 - v2/models/aws_entity_metadata.go | 109 - v2/models/aws_fleet_info.go | 141 - v2/models/aws_glacier_params.go | 288 -- v2/models/aws_i_am_role_params.go | 90 - v2/models/aws_i_am_user_params.go | 76 - v2/models/aws_kms_configuration.go | 152 - v2/models/aws_kms_configuration_response.go | 68 - .../aws_kms_configuration_update_params.go | 62 - .../aws_native_object_protection_params.go | 174 - ...s_native_protection_group_object_params.go | 146 - .../aws_native_protection_group_params.go | 286 -- v2/models/aws_object_level_params.go | 132 - .../aws_object_protection_request_params.go | 468 --- .../aws_object_protection_response_params.go | 468 --- ...object_protection_update_request_params.go | 468 --- v2/models/aws_postgres_entity_metadata.go | 127 - v2/models/aws_postgres_metadata.go | 160 - v2/models/aws_postgres_metadata_type.go | 104 - v2/models/aws_protection_group_params.go | 486 --- v2/models/aws_protection_group_type.go | 122 - .../aws_rds_postgres_object_level_params.go | 95 - ...postgres_protection_group_object_params.go | 95 - ...ws_rds_postgres_protection_group_params.go | 183 - .../aws_rds_postgres_protection_params.go | 146 - .../aws_rds_protection_group_object_params.go | 95 - v2/models/aws_rds_protection_group_params.go | 189 - v2/models/aws_rds_recovery_target_config.go | 129 - ...apshot_manager_object_protection_params.go | 123 - .../aws_recover_files_new_target_config.go | 178 - ...ws_recover_files_original_target_config.go | 132 - v2/models/aws_recover_s3_new_target_config.go | 208 -- v2/models/aws_region_id.go | 140 - .../aws_s3_bucket_restore_filter_policy.go | 50 - .../aws_s3_glacier_deep_archive_params.go | 228 -- v2/models/aws_s3_glacier_i_r_params.go | 228 -- v2/models/aws_s3_glacier_params.go | 228 -- v2/models/aws_s3_intelligent_params.go | 228 -- v2/models/aws_s3_object_level_params.go | 79 - v2/models/aws_s3_one_zone_i_a_params.go | 228 -- .../aws_s3_protection_group_object_params.go | 95 - v2/models/aws_s3_protection_group_params.go | 208 -- v2/models/aws_s3_protection_params.go | 174 - v2/models/aws_s3_standard_i_a_params.go | 288 -- v2/models/aws_s3_standard_params.go | 288 -- v2/models/aws_s3_storage_class.go | 113 - ...apshot_manager_object_protection_params.go | 180 - ..._manager_protection_group_object_params.go | 146 - ...napshot_manager_protection_group_params.go | 241 -- v2/models/aws_snapshot_params.go | 120 - v2/models/aws_source_registration_params.go | 166 - v2/models/aws_subscription_type.go | 110 - v2/models/aws_target_category.go | 110 - .../aws_target_params_for_recover_aurora.go | 162 - ...rget_params_for_recover_file_and_folder.go | 240 -- ...arget_params_for_recover_r_d_s_postgres.go | 178 - .../aws_target_params_for_recover_rds.go | 162 - v2/models/aws_target_params_for_recover_s3.go | 141 - v2/models/aws_target_params_for_recover_vm.go | 282 -- v2/models/aws_tiering_storage_class.go | 110 - v2/models/aws_use_s_t_s_params.go | 76 - v2/models/aws_vm_recovery_target_config.go | 129 - ...re_agent_protection_group_object_params.go | 95 - .../azure_agent_protection_group_params.go | 249 -- v2/models/azure_application_credentials.go | 77 - v2/models/azure_archival_storage_class.go | 110 - v2/models/azure_archive_blob_params.go | 112 - v2/models/azure_cloud_spin_params.go | 82 - .../azure_common_object_protection_params.go | 113 - v2/models/azure_cool_blob_params.go | 118 - v2/models/azure_e_s_config_for_indexing.go | 124 - v2/models/azure_entity_metadata.go | 109 - v2/models/azure_fleet_info.go | 192 - v2/models/azure_hot_blob_params.go | 118 - .../azure_native_object_protection_params.go | 174 - ...e_native_protection_group_object_params.go | 95 - .../azure_native_protection_group_params.go | 340 -- v2/models/azure_object_level_params.go | 73 - .../azure_object_protection_request_params.go | 228 -- ...azure_object_protection_response_params.go | 228 -- ...object_protection_update_request_params.go | 228 -- v2/models/azure_protection_group_params.go | 273 -- v2/models/azure_protection_group_type.go | 113 - v2/models/azure_protection_use_case_type.go | 107 - .../azure_recover_files_new_target_config.go | 178 - ...re_recover_files_original_target_config.go | 132 - ..._manager_protection_group_object_params.go | 95 - ...napshot_manager_protection_group_params.go | 240 -- v2/models/azure_snapshot_params.go | 111 - v2/models/azure_source_registration_params.go | 359 -- v2/models/azure_sql_entity_metadata.go | 124 - v2/models/azure_sql_metadata.go | 163 - v2/models/azure_sql_metadata_type.go | 107 - .../azure_sql_object_protection_params.go | 333 -- v2/models/azure_sql_package_options.go | 116 - v2/models/azure_sql_sku_options.go | 271 -- .../azure_storage_config_for_indexing.go | 90 - v2/models/azure_subscription.go | 71 - v2/models/azure_target_category.go | 110 - v2/models/azure_target_config.go | 217 -- ...ure_target_params_for_recover_azure_sql.go | 127 - ...rget_params_for_recover_file_and_folder.go | 240 -- .../azure_target_params_for_recover_vm.go | 168 - v2/models/azure_tier.go | 159 - v2/models/azure_tiering_levels.go | 110 - v2/models/azure_tiering_storage_class.go | 104 - v2/models/azure_tiers.go | 124 - v2/models/azure_vm_recovery_target_config.go | 180 - v2/models/backup_attempt.go | 217 -- v2/models/backup_data_stats.go | 58 - v2/models/backup_error_class.go | 119 - v2/models/backup_generic_stats.go | 136 - v2/models/backup_nas_stats.go | 71 - v2/models/backup_policy.go | 377 -- v2/models/backup_run.go | 174 - v2/models/backup_run_progress_info.go | 178 - v2/models/backup_run_stats_info.go | 178 - v2/models/backup_run_summary.go | 401 --- v2/models/bandwidth_limit.go | 114 - v2/models/bandwidth_throttling.go | 129 - v2/models/bandwidth_throttling_override.go | 114 - v2/models/baseos_patch_list.go | 80 - v2/models/baseos_patch_list_item.go | 119 - v2/models/baseos_patch_log.go | 119 - v2/models/bgp_instance.go | 177 - v2/models/bgp_peer.go | 120 - v2/models/bgp_timers.go | 55 - v2/models/bifrost_connection.go | 152 - v2/models/bifrost_connections.go | 123 - v2/models/bifrost_connector.go | 200 -- v2/models/bifrost_connectors.go | 123 - v2/models/blackout_window.go | 234 -- v2/models/bmr_backup_policy.go | 159 - v2/models/bmr_schedule.go | 324 -- v2/models/bond_interface_network_params.go | 208 -- v2/models/bond_member.go | 286 -- v2/models/bonding_mode_type.go | 113 - v2/models/boolean_form_field_params.go | 53 - v2/models/bucket_policy.go | 77 - v2/models/byte_size.go | 27 - v2/models/c_d_p_filter_status.go | 137 - v2/models/cancel_gaia_indexing_params.go | 109 - v2/models/cancel_gaia_indexing_result.go | 50 - v2/models/cancel_object_run_params.go | 148 - v2/models/cancel_object_runs_params.go | 188 - v2/models/cancel_object_runs_request.go | 121 - v2/models/cancel_object_runs_result.go | 53 - v2/models/cancel_object_runs_results.go | 121 - .../cancel_protection_group_run_request.go | 171 - ...el_protection_group_run_response_params.go | 74 - v2/models/cancellation_timeout_params.go | 122 - v2/models/capacity_by_tier.go | 125 - v2/models/capacity_trend_analysis.go | 124 - v2/models/capacity_trend_datapoint.go | 127 - v2/models/capacity_trend_datapoint_stats.go | 112 - v2/models/cascaded_target_configuration.go | 125 - v2/models/cassandra_auth_type.go | 110 - v2/models/cassandra_connection_params.go | 234 -- v2/models/cassandra_indexed_object.go | 221 -- v2/models/cassandra_indexed_objects.go | 78 - v2/models/cassandra_on_prem_search_params.go | 118 - v2/models/cassandra_params.go | 166 - v2/models/cassandra_port_info.go | 64 - .../cassandra_protection_group_params.go | 139 - v2/models/cassandra_protection_run_params.go | 50 - v2/models/cassandra_search_params.go | 118 - v2/models/cassandra_security_info.go | 128 - v2/models/cassandra_source_config_params.go | 189 - .../cassandra_source_registration_params.go | 468 --- ...sandra_source_registration_patch_params.go | 486 --- v2/models/cdp_backup_policy.go | 110 - v2/models/cdp_local_backup_info.go | 53 - v2/models/cdp_object_info.go | 133 - v2/models/cdp_object_last_run_info.go | 109 - v2/models/cdp_retention.go | 185 - v2/models/centrify_zone.go | 204 -- v2/models/centrify_zones.go | 124 - v2/models/certificate.go | 62 - v2/models/certificate_auth_mapping.go | 111 - v2/models/certificate_request_params.go | 250 -- v2/models/certificate_validation_status.go | 113 - v2/models/channel_item.go | 122 - v2/models/channel_param.go | 210 -- v2/models/chassis.go | 67 - v2/models/chassis_info.go | 65 - v2/models/chassis_list.go | 123 - v2/models/chassis_rack_config_params.go | 53 - v2/models/cipher_suite.go | 143 - v2/models/ciphers_resp.go | 144 - v2/models/clear_nlm_lock_request.go | 61 - v2/models/client_stats.go | 419 --- v2/models/client_stats_in_last_hours.go | 53 - ..._cleanup_cloud_resources_cleanup_params.go | 121 - v2/models/clone_action_cleanup_params.go | 214 -- ...lone_action_cleanup_power_off_vm_params.go | 50 - v2/models/clone_view_directory_params.go | 105 - v2/models/clone_view_params.go | 363 -- v2/models/close_smb_file_open_params.go | 105 - v2/models/cloud_backup_script_params.go | 213 -- v2/models/cloud_cluster_expand_params.go | 71 - v2/models/cloud_domain.go | 105 - v2/models/cloud_down_water_fall_params.go | 55 - ...cloud_resources_cleanup_ami_instance_id.go | 53 - ..._resources_cleanup_restore_task_details.go | 139 - v2/models/cloud_retrieve_task.go | 150 - v2/models/cloud_retrieve_tasks.go | 121 - v2/models/cloud_spin_config.go | 166 - v2/models/cloud_spin_data_stats.go | 52 - v2/models/cloud_spin_run.go | 123 - v2/models/cloud_spin_run_summary.go | 123 - v2/models/cloud_spin_target.go | 183 - v2/models/cloud_spin_target_result.go | 368 -- v2/models/cluster.go | 642 ---- v2/models/cluster_a_m_q_p_target_config.go | 68 - v2/models/cluster_audit_log_config.go | 117 - v2/models/cluster_create_cloud_params.go | 83 - v2/models/cluster_create_network_config.go | 370 -- v2/models/cluster_create_node_params.go | 90 - .../cluster_create_node_status_response.go | 58 - v2/models/cluster_create_physical_params.go | 136 - v2/models/cluster_create_rigel_params.go | 148 - v2/models/cluster_create_virtual_params.go | 136 - v2/models/cluster_dhcp_network_config.go | 129 - v2/models/cluster_expand_params.go | 217 -- v2/models/cluster_free_disks.go | 126 - v2/models/cluster_health_status.go | 107 - v2/models/cluster_identifier.go | 79 - v2/models/cluster_interfaces.go | 123 - v2/models/cluster_ipmi_user.go | 71 - v2/models/cluster_local_domain_s_id.go | 50 - v2/models/cluster_log_type.go | 110 - v2/models/cluster_manual_network_config.go | 124 - v2/models/cluster_node_operation_status.go | 188 - .../cluster_operation_response_params.go | 50 - v2/models/cluster_operation_status.go | 318 -- v2/models/cluster_package_params.go | 53 - v2/models/cluster_packages.go | 121 - v2/models/cluster_provider_type.go | 107 - v2/models/cluster_proxy_server_config.go | 118 - v2/models/cluster_size.go | 116 - v2/models/cluster_state_params.go | 178 - v2/models/cluster_storage_stats.go | 68 - v2/models/cluster_type.go | 119 - v2/models/cluster_ui_config.go | 71 - v2/models/cluster_uprade_params.go | 116 - v2/models/cluster_vlan_params.go | 117 - v2/models/cluster_vlans.go | 121 - v2/models/cohesity_ca_key_info.go | 53 - v2/models/cohesity_ca_status_response.go | 108 - v2/models/common_a_w_s_category_params.go | 112 - v2/models/common_active_directory_params.go | 284 -- ...mon_archival_aws_external_target_params.go | 194 - ...n_archival_azure_external_target_params.go | 265 -- .../common_archival_external_target_params.go | 230 -- .../common_authentication_method_params.go | 115 - .../common_aws_external_target_params.go | 90 - .../common_azure_external_target_params.go | 99 - v2/models/common_backup_params.go | 349 -- v2/models/common_bandwidth_settings.go | 162 - v2/models/common_cdp_params.go | 52 - v2/models/common_cloud_tier_settings.go | 114 - ...eate_or_update_rigel_connection_request.go | 93 - ...reate_or_update_rigel_connector_request.go | 169 - v2/models/common_csr_request_params.go | 252 -- v2/models/common_csr_response_params.go | 139 - ...mmon_data_tiering_analysis_group_params.go | 178 - v2/models/common_data_tiering_task_params.go | 338 -- .../common_data_tiering_task_response.go | 404 --- .../common_download_file_and_folder_params.go | 129 - ...n_env_specific_object_protection_params.go | 246 -- v2/models/common_external_target_params.go | 411 --- .../common_gcp_external_target_params.go | 110 - .../common_generic_nas_protection_params.go | 319 -- v2/models/common_hyper_v_object_params.go | 50 - v2/models/common_hyper_v_protection_params.go | 115 - .../common_identity_provider_configuration.go | 123 - v2/models/common_indexed_object_params.go | 248 -- .../common_m_s_sql_protection_group_params.go | 351 -- ...mon_mssql_file_object_protection_params.go | 93 - ...n_mssql_native_object_protection_params.go | 130 - .../common_mssql_object_protection_params.go | 217 -- v2/models/common_nas_object_params.go | 99 - v2/models/common_nas_protection_params.go | 319 -- v2/models/common_no_sql_recovery_options.go | 151 - v2/models/common_object_action_request.go | 208 -- v2/models/common_object_protect_params.go | 93 - .../common_object_snapshot_volume_params.go | 121 - v2/models/common_object_summary.go | 240 -- v2/models/common_objects_action_params.go | 121 - v2/models/common_oracle_app_source_config.go | 398 --- v2/models/common_oracle_clone_params.go | 108 - .../common_oracle_external_target_params.go | 127 - ..._p_i_t_ranges_protected_object_response.go | 104 - v2/models/common_post_backup_script_params.go | 95 - v2/models/common_pre_backup_script_params.go | 119 - .../common_pre_post_cloud_script_params.go | 162 - v2/models/common_pre_post_script_params.go | 99 - .../common_protection_group_request_params.go | 644 ---- ...common_protection_group_response_params.go | 872 ----- ...rotection_group_run_response_parameters.go | 527 --- .../common_recover_file_and_folder_info.go | 192 - .../common_recover_object_snapshot_params.go | 478 --- ...common_recover_oracle_app_target_params.go | 180 - .../common_recover_sql_app_target_params.go | 180 - v2/models/common_recovery_request_params.go | 216 -- v2/models/common_recovery_response_params.go | 745 ---- v2/models/common_remote_storage_info.go | 128 - .../common_s3_comp_external_target_params.go | 122 - ...n_search_indexed_objects_request_params.go | 312 -- ..._search_indexed_objects_response_params.go | 155 - ...common_source_connection_request_params.go | 124 - .../common_source_registration_params.go | 145 - ...mmon_source_registration_reponse_params.go | 446 --- ...mmon_source_registration_request_params.go | 336 -- v2/models/common_sql_app_source_config.go | 238 -- v2/models/common_standby_resource_params.go | 52 - v2/models/common_target_configuration.go | 336 -- v2/models/common_tdm_clone_snapshot_params.go | 50 - v2/models/common_tdm_clone_task_params.go | 116 - .../common_tdm_clone_task_request_params.go | 168 - .../common_tdm_clone_task_response_params.go | 262 -- .../common_tdm_object_response_params.go | 272 -- ..._object_timeline_events_response_params.go | 235 -- ...common_tdm_refresh_task_response_params.go | 213 -- v2/models/common_tdm_task_request_params.go | 119 - v2/models/common_tdm_task_response_params.go | 235 -- ...mmon_tiering_aws_external_target_params.go | 161 - ...on_tiering_azure_external_target_params.go | 161 - .../common_tiering_external_target_params.go | 171 - v2/models/common_tiering_policy.go | 163 - v2/models/common_updatable_user_params.go | 65 - v2/models/common_vmware_object_params.go | 124 - v2/models/common_vmware_protection_params.go | 175 - v2/models/component_removal_progress.go | 64 - v2/models/compression_params.go | 113 - v2/models/compression_type.go | 110 - v2/models/connection_bandwidth_limits.go | 209 -- v2/models/connection_config.go | 56 - v2/models/connectivity_check_response_body.go | 123 - v2/models/connectivity_status.go | 111 - v2/models/connector_aws_metadata.go | 71 - v2/models/connector_azure_metadata.go | 88 - v2/models/connector_cloud_metadata.go | 160 - v2/models/connector_connection_info.go | 58 - v2/models/connector_group.go | 58 - v2/models/connector_type.go | 52 - v2/models/construct_meta_info_params.go | 180 - v2/models/construct_meta_info_request.go | 180 - v2/models/construct_meta_info_result.go | 355 -- v2/models/construct_meta_info_sfdc_params.go | 109 - ...nstruct_restore_meta_info_oracle_params.go | 73 - v2/models/container_database_info.go | 121 - v2/models/continuous_snapshot_params.go | 76 - v2/models/couch_base_on_prem_search_params.go | 118 - v2/models/couchbase_indexed_object.go | 171 - v2/models/couchbase_indexed_objects.go | 78 - v2/models/couchbase_params.go | 160 - v2/models/couchbase_search_params.go | 118 - .../couchbase_source_registration_params.go | 221 -- v2/models/count_by_tier.go | 121 - .../create_access_token_request_params.go | 91 - v2/models/create_active_directory_request.go | 205 -- .../create_antivirus_service_group_params.go | 205 -- ...create_azure_application_request_params.go | 235 -- ...reate_azure_application_response_params.go | 131 - .../create_bifrost_connection_request.go | 73 - v2/models/create_cad_storage_domain_param.go | 71 - v2/models/create_clientcsr_response_body.go | 67 - .../create_cloud_retrieve_task_request.go | 65 - .../create_cloud_retrieve_task_resp_body.go | 55 - v2/models/create_cluster_params.go | 464 --- v2/models/create_cluster_vlan_params.go | 132 - v2/models/create_csr_request.go | 95 - v2/models/create_csr_response_body.go | 95 - v2/models/create_email_otp_request_body.go | 60 - v2/models/create_gaia_index_params.go | 280 -- v2/models/create_gaia_index_result.go | 11 - v2/models/create_group_params.go | 156 - v2/models/create_groups_params.go | 85 - v2/models/create_idp_request_params.go | 168 - v2/models/create_keystone_request.go | 93 - v2/models/create_ldap_params.go | 252 -- v2/models/create_mcm_claim_request.go | 324 -- v2/models/create_mcm_claim_response_body.go | 322 -- v2/models/create_odp_remote_cluster_params.go | 159 - v2/models/create_or_update_api_key_request.go | 77 - ...ate_or_update_data_tiering_task_request.go | 228 -- ...eate_or_update_protection_group_request.go | 2088 ----------- v2/models/create_protected_objects_request.go | 204 -- .../create_protected_objects_response.go | 121 - .../create_protection_group_run_request.go | 340 -- ...eate_protection_group_run_response_body.go | 114 - v2/models/create_recovery_request.go | 1908 ---------- v2/models/create_remote_disk_status.go | 170 - v2/models/create_rigel_connection_request.go | 134 - v2/models/create_rigel_connector_request.go | 134 - v2/models/create_role_parameters.go | 134 - v2/models/create_storage_domain_param.go | 93 - v2/models/create_tdm_task_request.go | 346 -- v2/models/create_tenant_params.go | 102 - v2/models/create_totp_key_request_body.go | 50 - v2/models/create_upgrade_task_request.go | 67 - v2/models/create_user_parameters.go | 199 -- .../create_user_session_request_params.go | 126 - v2/models/create_users_parameters.go | 85 - v2/models/create_view.go | 321 -- v2/models/create_view_failover_request.go | 214 -- v2/models/create_view_request.go | 117 - v2/models/created_user_api_key.go | 132 - v2/models/creation_info.go | 52 - v2/models/credentials.go | 90 - v2/models/csr_key_type.go | 107 - v2/models/csr_service_name.go | 104 - v2/models/current_cluster_operations.go | 140 - v2/models/custom_tag_params.go | 88 - v2/models/d_maa_s_info.go | 71 - v2/models/d_s_e_solr_info.go | 90 - v2/models/data_lock_config.go | 192 - v2/models/data_lock_constraints.go | 110 - v2/models/data_point.go | 59 - v2/models/data_tiering_analysis_group.go | 240 -- v2/models/data_tiering_analysis_group_run.go | 182 - v2/models/data_tiering_analysis_group_runs.go | 78 - v2/models/data_tiering_analysis_groups.go | 78 - v2/models/data_tiering_analysis_info.go | 266 -- .../data_tiering_analysis_run_request.go | 121 - v2/models/data_tiering_analysis_share_info.go | 71 - .../data_tiering_object_analysis_info.go | 278 -- v2/models/data_tiering_object_info.go | 166 - v2/models/data_tiering_schedule.go | 320 -- v2/models/data_tiering_share_info.go | 78 - v2/models/data_tiering_share_stats.go | 68 - v2/models/data_tiering_source.go | 269 -- v2/models/data_tiering_tag.go | 53 - v2/models/data_tiering_tag_config.go | 141 - v2/models/data_tiering_tag_object.go | 179 - v2/models/data_tiering_target.go | 91 - v2/models/data_tiering_task.go | 226 -- v2/models/data_tiering_task_run.go | 118 - v2/models/data_tiering_task_run_request.go | 131 - v2/models/data_tiering_task_stats.go | 150 - v2/models/data_tiering_tasks.go | 78 - v2/models/data_transfer_info.go | 129 - v2/models/data_usage_stats.go | 167 - v2/models/database_entity_info.go | 160 - v2/models/datastore_params.go | 55 - v2/models/day_schedule.go | 95 - v2/models/db_recovery_over_writing_policy.go | 107 - v2/models/deduplication_params.go | 55 - v2/models/delete_active_directory_request.go | 108 - v2/models/delete_groups_request.go | 83 - v2/models/delete_hosts_parameters.go | 52 - v2/models/delete_infected_files.go | 183 - v2/models/delete_infected_files_parameters.go | 131 - v2/models/delete_rigel_connector_request.go | 73 - v2/models/delete_users_request.go | 83 - ...deleted_protected_objects_response_body.go | 172 - v2/models/device_tree_leaf_node.go | 59 - v2/models/device_tree_node.go | 163 - v2/models/device_tree_non_leaf_node.go | 206 -- v2/models/disaster_recovery_options.go | 58 - v2/models/disk.go | 433 --- v2/models/disk_identify.go | 107 - v2/models/disk_info.go | 144 - v2/models/disk_removal_params.go | 76 - v2/models/disk_status.go | 131 - v2/models/disk_tiers.go | 113 - v2/models/disk_type.go | 122 - v2/models/disks_list.go | 123 - v2/models/dmaas_audit_actions.go | 122 - v2/models/dmaas_audit_entity_types.go | 110 - v2/models/dmaas_tenant_action.go | 149 - v2/models/dns_delegation_zone.go | 77 - v2/models/dns_servers_info.go | 52 - v2/models/document_library_item.go | 204 -- v2/models/documents_filter_type.go | 110 - v2/models/domain_controller.go | 147 - v2/models/domain_controller_status.go | 113 - v2/models/domain_controllers.go | 124 - v2/models/domain_controllers_response.go | 121 - v2/models/domain_scope_params.go | 71 - v2/models/down_tiering_file_selection_type.go | 110 - v2/models/download_agent_request_params.go | 445 --- v2/models/download_baseos_patch_request.go | 71 - v2/models/download_chats_params.go | 113 - v2/models/download_cluster_cert_response.go | 121 - v2/models/download_file_type.go | 107 - ...wnload_files_and_folders_request_params.go | 273 -- ...nload_files_and_folders_response_params.go | 242 -- v2/models/downtiered_data_location.go | 92 - v2/models/downtiering_file_age_policy.go | 115 - v2/models/downtiering_policy.go | 512 --- v2/models/downtiering_target.go | 169 - v2/models/draas_audit_actions.go | 158 - v2/models/draas_audit_entity_types.go | 116 - v2/models/e_b_s_tag.go | 53 - v2/models/e_s_config_for_indexing.go | 90 - v2/models/ebs_volume_exclusion_params.go | 138 - .../elastifile_object_protection_params.go | 117 - ...tifile_object_protection_request_params.go | 217 -- ...ifile_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - ...astifile_protection_group_object_params.go | 93 - .../elastifile_protection_group_params.go | 551 --- v2/models/elastifile_registration_params.go | 178 - v2/models/email.go | 592 ---- v2/models/email_helios_search_params.go | 179 - v2/models/emails.go | 78 - v2/models/emblem_service_info.go | 53 - v2/models/encryption_config.go | 132 - v2/models/encryption_settings.go | 158 - v2/models/end_point.go | 58 - v2/models/endpoint_check_result.go | 119 - v2/models/endpoint_connection_state.go | 129 - .../endpoint_only_registration_params.go | 76 - v2/models/entity_external_metadata.go | 109 - v2/models/entity_identifier.go | 53 - v2/models/entity_metadata_params.go | 229 -- ...ecific_object_protection_request_params.go | 1066 ------ ...cific_object_protection_response_params.go | 1067 ------ ...object_protection_update_request_params.go | 1067 ------ v2/models/environment.go | 251 -- v2/models/erasure_coding_params.go | 113 - v2/models/error.go | 58 - v2/models/error_class.go | 120 - v2/models/error_type.go | 110 - v2/models/esxi_registration_params.go | 213 -- v2/models/exchange_app_params.go | 76 - ...xchange_database_recovery_target_config.go | 110 - v2/models/exchange_indexed_object.go | 141 - v2/models/exchange_indexed_objects.go | 78 - ...exchange_protection_group_object_params.go | 158 - v2/models/exchange_protection_group_params.go | 195 - v2/models/exchange_recover_database_params.go | 279 -- v2/models/exchange_recovery_target_config.go | 129 - ..._target_params_for_recover_exchange_app.go | 110 - ..._target_params_for_recover_exchange_dbs.go | 126 - v2/models/execute_runbook_action_request.go | 162 - v2/models/existing_group_param.go | 71 - v2/models/expiration_action.go | 56 - v2/models/extended_retention_policy.go | 223 -- v2/models/extended_retention_schedule.go | 142 - v2/models/external_target.go | 226 -- v2/models/external_targets.go | 121 - v2/models/externally_triggered_client_type.go | 107 - v2/models/externally_triggered_job_params.go | 164 - v2/models/externally_triggered_sbt_params.go | 50 - v2/models/f_c_i_cluster.go | 232 -- v2/models/failed_protection_group_details.go | 53 - v2/models/failed_run_details.go | 53 - v2/models/failover.go | 238 -- v2/models/failover_create_run_response.go | 50 - v2/models/failover_object.go | 73 - v2/models/failover_replica_cluster.go | 129 - v2/models/failover_replication.go | 141 - v2/models/failover_run_configuration.go | 219 -- v2/models/failover_runs_response.go | 121 - v2/models/failover_source_cluster.go | 129 - v2/models/fallback_user_id_mapping_params.go | 163 - v2/models/feature_flag.go | 64 - v2/models/feature_flag_list.go | 80 - v2/models/fetch_uptier_data_request_params.go | 78 - v2/models/fetch_uptier_data_response.go | 52 - v2/models/file.go | 300 -- v2/models/file_access_types.go | 110 - v2/models/file_category_type.go | 116 - v2/models/file_count.go | 56 - v2/models/file_extension_filter.go | 113 - v2/models/file_filtering_policy.go | 59 - v2/models/file_folder_info.go | 325 -- v2/models/file_id.go | 56 - v2/models/file_level_data_lock_config.go | 221 -- v2/models/file_lock_status.go | 194 - v2/models/file_nlm_locks.go | 172 - v2/models/file_operation.go | 124 - v2/models/file_size_policy.go | 112 - v2/models/file_size_rule_condition.go | 107 - v2/models/file_stats.go | 132 - v2/models/file_type.go | 110 - v2/models/filename_pattern_to_directory.go | 56 - v2/models/filer_audit_log_configs.go | 238 -- v2/models/filer_lifecycle_aging_policy.go | 116 - v2/models/filer_lifecycle_management.go | 121 - v2/models/filer_lifecycle_rule.go | 283 -- v2/models/filer_lifecycle_rule_filter.go | 112 - v2/models/filer_lifecycle_size_filter.go | 53 - v2/models/files.go | 78 - v2/models/files_and_folders_object.go | 74 - v2/models/files_stats.go | 183 - v2/models/files_stats_for_entity.go | 185 - v2/models/filter.go | 53 - v2/models/filter_documents_params.go | 118 - v2/models/filter_ip_config.go | 55 - v2/models/filter_objects_request.go | 263 -- v2/models/filtered_object.go | 53 - v2/models/filtered_objects_response_body.go | 121 - v2/models/firewall_ip_set.go | 95 - v2/models/firewall_ip_sets.go | 129 - v2/models/firewall_profile.go | 201 -- v2/models/firewall_profile_names_params.go | 71 - v2/models/firewall_profile_params.go | 192 - v2/models/firewall_profiles.go | 121 - v2/models/fixed_issue.go | 55 - v2/models/flash_blade_registration_info.go | 74 - v2/models/flashblade_object_params.go | 99 - .../flashblade_object_protection_params.go | 117 - ...hblade_object_protection_request_params.go | 217 -- ...blade_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - v2/models/flashblade_params.go | 274 -- ...ashblade_protection_group_object_params.go | 93 - .../flashblade_protection_group_params.go | 551 --- v2/models/flashblade_protocol.go | 110 - v2/models/flashblade_registration_params.go | 200 -- v2/models/fleet_config.go | 229 -- v2/models/fleet_network_params.go | 90 - v2/models/fleet_subnet_type.go | 110 - v2/models/fleet_tags.go | 90 - v2/models/folder_item.go | 77 - v2/models/form_field_params.go | 325 -- v2/models/form_panel_params.go | 130 - v2/models/free_disk.go | 82 - v2/models/free_node_information.go | 80 - v2/models/free_nodes.go | 121 - v2/models/frequency_schedule.go | 78 - v2/models/full_backup_policy.go | 111 - v2/models/full_schedule.go | 327 -- v2/models/full_schedule_and_retention.go | 159 - v2/models/full_schedule_unit.go | 116 - v2/models/g_c_p_archival_storage_class.go | 110 - v2/models/g_c_p_tiering_storage_class.go | 104 - v2/models/gaia_generic_params.go | 53 - v2/models/gaia_generic_result.go | 53 - v2/models/gaia_indexing_stats.go | 80 - v2/models/gaia_snapshot_info.go | 109 - v2/models/gateway_params.go | 111 - v2/models/gcp_disk_exclusion_params.go | 55 - ...p_native_protection_group_object_params.go | 98 - .../gcp_native_protection_group_params.go | 291 -- v2/models/gcp_protection_group_params.go | 162 - v2/models/gcp_protection_group_type.go | 104 - .../gcp_recover_files_new_target_config.go | 178 - ...cp_recover_files_original_target_config.go | 132 - ...rget_params_for_recover_file_and_folder.go | 240 -- v2/models/gcp_target_params_for_recover_vm.go | 168 - v2/models/gcp_vm_recovery_target_config.go | 129 - v2/models/gcp_vpc_subnet_config.go | 112 - v2/models/generate_ca_certificate_request.go | 128 - v2/models/generate_ca_certificate_response.go | 53 - v2/models/generate_csr_response.go | 53 - ...m365_device_access_token_request_params.go | 55 - ...365_device_access_token_response_params.go | 55 - ...enerate_m365_device_code_request_params.go | 52 - ...nerate_m365_device_code_response_params.go | 64 - v2/models/generate_new_certificate_request.go | 93 - .../generate_new_certificate_response.go | 56 - v2/models/generate_sign_csr_request.go | 99 - v2/models/generate_sign_csr_response.go | 53 - v2/models/generic_nas_data_tiering_params.go | 139 - .../generic_nas_object_protection_params.go | 117 - ...ic_nas_object_protection_request_params.go | 217 -- ...c_nas_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - ...neric_nas_protection_group_extra_params.go | 123 - .../generic_nas_protection_group_params.go | 217 -- v2/models/generic_nas_registration_params.go | 296 -- .../get_connection_bandwidth_response_body.go | 193 - v2/models/get_csr_list_response_body.go | 80 - v2/models/get_entity_metadata_result.go | 124 - v2/models/get_failover_ops_response.go | 121 - v2/models/get_gaia_indexing_status_params.go | 109 - v2/models/get_gaia_indexing_status_result.go | 115 - ..._indexed_object_snapshots_response_body.go | 121 - ..._source_region_endpoint_response_params.go | 131 - v2/models/get_nlm_locks_result.go | 126 - v2/models/get_object_runs_response_body.go | 174 - .../get_object_snapshots_response_body.go | 123 - ...t_ranges_protected_object_response_body.go | 168 - v2/models/get_protected_object_response.go | 109 - v2/models/get_protected_objects_response.go | 172 - v2/models/get_protection_run_progress_body.go | 234 -- v2/models/get_protection_run_stats_body.go | 172 - ...et_protection_runs_status_response_body.go | 121 - v2/models/get_tags_result.go | 80 - v2/models/get_tracking_view_id_response.go | 50 - v2/models/get_view_failover_response_body.go | 121 - v2/models/get_view_templates_result.go | 125 - v2/models/get_views_result.go | 138 - v2/models/glacier_flr_restore_type.go | 110 - v2/models/global_bandwidth_settings.go | 162 - v2/models/global_cluster_identifier.go | 79 - v2/models/global_id.go | 27 - v2/models/google_tier.go | 159 - v2/models/google_tiering_levels.go | 116 - v2/models/google_tiers.go | 124 - v2/models/gpfs_object_protection_params.go | 117 - .../gpfs_object_protection_request_params.go | 217 -- .../gpfs_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - .../gpfs_protection_group_object_params.go | 93 - v2/models/gpfs_protection_group_params.go | 551 --- v2/models/gpfs_registration_params.go | 229 -- v2/models/group.go | 58 - v2/models/group_object_entity_params.go | 56 - v2/models/group_params.go | 254 -- v2/models/groups.go | 121 - v2/models/h_base_additional_params.go | 160 - v2/models/h_d_f_s_indexed_object.go | 171 - v2/models/h_d_f_s_indexed_objects.go | 78 - v2/models/h_d_f_s_on_prem_search_params.go | 118 - v2/models/hadoop_auth_type.go | 107 - v2/models/hadoop_connection_params.go | 346 -- v2/models/hbase_indexed_object.go | 171 - v2/models/hbase_indexed_objects.go | 78 - v2/models/hbase_on_prem_search_params.go | 118 - v2/models/hbase_params.go | 160 - v2/models/hbase_search_params.go | 118 - v2/models/hbase_source_registration_params.go | 464 --- ...hbase_source_registration_update_params.go | 321 -- v2/models/hdfs_additional_params.go | 160 - v2/models/hdfs_browse_request_params.go | 50 - v2/models/hdfs_file_folder_params.go | 120 - v2/models/hdfs_params.go | 160 - v2/models/hdfs_protection_group_params.go | 192 - v2/models/hdfs_search_params.go | 118 - v2/models/hdfs_source_registration_params.go | 516 --- .../hdfs_source_registration_update_params.go | 321 -- v2/models/helios_a_w_s_target_config.go | 129 - v2/models/helios_a_w_s_tier.go | 159 - v2/models/helios_a_w_s_tiers.go | 124 - v2/models/helios_archival_config.go | 356 -- v2/models/helios_auto_tier_type.go | 107 - v2/models/helios_aws_cloud_spin_params.go | 79 - v2/models/helios_azure_cloud_spin_params.go | 82 - v2/models/helios_azure_target_config.go | 217 -- v2/models/helios_azure_tier.go | 159 - v2/models/helios_azure_tiers.go | 124 - v2/models/helios_backup_policy.go | 264 -- v2/models/helios_blackout_window.go | 234 -- v2/models/helios_bmr_backup_policy.go | 162 - v2/models/helios_bmr_schedule.go | 214 -- v2/models/helios_cassandra_objects.go | 180 - v2/models/helios_cdp_backup_policy.go | 111 - v2/models/helios_cdp_retention.go | 181 - v2/models/helios_claim_request.go | 76 - v2/models/helios_cloud_spin_config.go | 166 - v2/models/helios_cloud_spin_target.go | 183 - v2/models/helios_cluster_tenant.go | 140 - .../helios_common_cloud_tier_settings.go | 114 - ...n_search_indexed_objects_request_params.go | 250 -- ..._search_indexed_objects_response_params.go | 220 -- .../helios_common_target_configuration.go | 168 - v2/models/helios_couchbase_objects.go | 180 - v2/models/helios_day_schedule.go | 95 - v2/models/helios_emails.go | 180 - v2/models/helios_exchange_objects.go | 180 - v2/models/helios_extended_retention_policy.go | 227 -- .../helios_extended_retention_schedule.go | 140 - v2/models/helios_files.go | 180 - v2/models/helios_frequency_schedule.go | 76 - v2/models/helios_full_backup_policy.go | 111 - v2/models/helios_full_schedule.go | 274 -- v2/models/helios_google_tier.go | 159 - v2/models/helios_google_tiers.go | 124 - v2/models/helios_hbase_objects.go | 180 - v2/models/helios_hdfs_objects.go | 180 - v2/models/helios_hive_objects.go | 180 - v2/models/helios_hour_schedule.go | 95 - v2/models/helios_incremental_backup_policy.go | 111 - v2/models/helios_incremental_schedule.go | 381 -- v2/models/helios_log_backup_policy.go | 162 - v2/models/helios_log_schedule.go | 214 -- v2/models/helios_minute_schedule.go | 95 - v2/models/helios_mongo_objects.go | 180 - v2/models/helios_month_schedule.go | 160 - v2/models/helios_object_u_ui_ds.go | 40 - v2/models/helios_on_prem_config.go | 328 -- v2/models/helios_on_prem_ssh_config.go | 90 - v2/models/helios_on_prem_vm_node.go | 76 - v2/models/helios_onprem_deploy_config.go | 95 - v2/models/helios_oracle_tier.go | 159 - v2/models/helios_oracle_tiers.go | 124 - ...elios_policies_response_with_pagination.go | 121 - v2/models/helios_policy_request.go | 93 - v2/models/helios_policy_response.go | 139 - v2/models/helios_primary_backup_target.go | 161 - v2/models/helios_protection_policy.go | 505 --- .../helios_protection_policy_identifier.go | 55 - v2/models/helios_public_folder_items.go | 180 - v2/models/helios_reg_config.go | 169 - v2/models/helios_reg_status.go | 113 - v2/models/helios_regular_backup_policy.go | 264 -- v2/models/helios_remote_target_config.go | 95 - v2/models/helios_replication_config.go | 340 -- v2/models/helios_retention.go | 250 -- v2/models/helios_retry_options.go | 95 - v2/models/helios_rpaas_config.go | 210 -- ...os_search_indexed_objects_cluster_error.go | 55 - .../helios_search_indexed_objects_request.go | 949 ----- ...os_search_indexed_objects_response_body.go | 678 ---- v2/models/helios_source_u_ui_ds.go | 40 - v2/models/helios_storage_domain_u_ui_ds.go | 40 - v2/models/helios_target_schedule.go | 140 - v2/models/helios_targets_configuration.go | 369 -- v2/models/helios_tenant.go | 244 -- v2/models/helios_tier.go | 167 - v2/models/helios_tier_level_settings.go | 322 -- v2/models/helios_week_schedule.go | 101 - v2/models/hive_additional_params.go | 160 - v2/models/hive_indexed_object.go | 171 - v2/models/hive_indexed_objects.go | 78 - v2/models/hive_on_prem_search_params.go | 118 - v2/models/hive_params.go | 160 - v2/models/hive_search_params.go | 118 - v2/models/hive_source_registration_params.go | 464 --- .../hive_source_registration_update_params.go | 321 -- v2/models/host_based_backup_script_params.go | 314 -- v2/models/host_entry.go | 93 - v2/models/host_information.go | 210 -- v2/models/host_mappings.go | 123 - v2/models/host_mappings_parameters.go | 78 - v2/models/host_setting_check.go | 173 - v2/models/hour_schedule.go | 95 - v2/models/hyper_v_disk_info.go | 143 - ...hyper_v_mount_volumes_new_target_config.go | 178 - ..._v_mount_volumes_original_target_config.go | 129 - .../hyper_v_object_protection_request.go | 145 - ...yper_v_object_protection_request_params.go | 182 - .../hyper_v_object_protection_response.go | 117 - ...per_v_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 140 - .../hyper_v_protection_group_object_params.go | 220 -- v2/models/hyper_v_protection_group_params.go | 475 --- v2/models/hyper_v_protection_group_type.go | 110 - ...hyper_v_recover_files_new_target_config.go | 176 - ..._v_recover_files_original_target_config.go | 130 - .../hyper_v_source_registration_params.go | 268 -- .../hyper_v_target_params_for_mount_volume.go | 305 -- ...rget_params_for_recover_file_and_folder.go | 240 -- .../hyper_v_target_params_for_recover_vm.go | 231 -- .../hyper_v_vm_recovery_target_config.go | 180 - v2/models/hyperv_snapshot_params.go | 108 - v2/models/i_c_a_p_uri_status.go | 105 - v2/models/iam_role_aws_credentials.go | 76 - v2/models/iam_user_aws_credentials.go | 107 - ...h_system_protection_group_object_params.go | 95 - ...bm_flash_system_protection_group_params.go | 224 -- v2/models/icap_uri_connection_status.go | 108 - v2/models/icap_uri_connection_status_list.go | 121 - v2/models/id_mapping_params.go | 125 - v2/models/identity_action.go | 214 -- v2/models/identity_config.go | 257 -- v2/models/identity_configs.go | 121 - v2/models/identity_provider_configuration.go | 150 - v2/models/identity_provider_configurations.go | 121 - v2/models/import_cert_request.go | 162 - v2/models/import_cert_response.go | 50 - ...import_certificate_by_clientcsr_request.go | 88 - ..._certificate_by_clientcsr_response_body.go | 58 - v2/models/import_certificate_request.go | 116 - v2/models/incremental_backup_policy.go | 110 - v2/models/incremental_schedule.go | 432 --- v2/models/indexed_cassandra_type.go | 107 - v2/models/indexed_couchbase_type.go | 104 - v2/models/indexed_group_item_type.go | 113 - v2/models/indexed_h_d_f_s_type.go | 107 - v2/models/indexed_hbase_type.go | 107 - v2/models/indexed_hive_type.go | 110 - v2/models/indexed_mongo_type.go | 107 - v2/models/indexed_object_snapshot.go | 220 -- v2/models/indexed_object_type.go | 149 - v2/models/indexed_team_item_type.go | 116 - v2/models/indexing_cloud_config.go | 302 -- v2/models/indexing_policy.go | 79 - v2/models/infected_file.go | 180 - v2/models/infected_file_state.go | 105 - v2/models/infected_files.go | 124 - v2/models/init_cohesity_ca_request.go | 95 - v2/models/init_cohesity_ca_response.go | 50 - v2/models/init_failover_request.go | 355 -- v2/models/init_failover_response.go | 172 - v2/models/interface.go | 498 --- v2/models/interface_group.go | 117 - v2/models/interface_group_network_params.go | 112 - v2/models/interface_group_params.go | 245 -- v2/models/interface_groups.go | 121 - v2/models/interface_network_params.go | 112 - v2/models/interface_params.go | 127 - v2/models/interface_role_type.go | 110 - v2/models/interface_stats.go | 71 - v2/models/intervention_type.go | 107 - v2/models/ip_config_params.go | 68 - v2/models/ip_pool.go | 88 - v2/models/ip_preference.go | 107 - v2/models/ip_range.go | 88 - v2/models/ipmi_lan_config.go | 88 - v2/models/ipmi_lan_params.go | 172 - v2/models/ipmi_users.go | 172 - v2/models/isilon_data_tiering_params.go | 139 - v2/models/isilon_object_params.go | 99 - v2/models/isilon_object_protection_params.go | 176 - ...isilon_object_protection_request_params.go | 217 -- ...silon_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - .../isilon_protection_group_object_params.go | 93 - v2/models/isilon_protection_group_params.go | 608 ---- v2/models/isilon_protocol.go | 107 - v2/models/isilon_registration_params.go | 283 -- v2/models/item_task_status_type.go | 116 - v2/models/job_handle.go | 27 - v2/models/k_m_s_state.go | 110 - v2/models/k_m_s_type.go | 110 - v2/models/k_m_s_usage_type.go | 107 - v2/models/kerberos_provider.go | 178 - v2/models/kerberos_providers.go | 121 - v2/models/key_value_pair.go | 90 - v2/models/keystone.go | 182 - v2/models/keystone_admin_params.go | 91 - v2/models/keystone_credentials.go | 157 - v2/models/keystone_scope_params.go | 214 -- v2/models/keystone_scope_type.go | 107 - v2/models/keystones.go | 121 - v2/models/kmip_kms_configuration.go | 212 -- v2/models/kmip_kms_configuration_response.go | 145 - v2/models/kms_configuration.go | 197 -- .../kms_configuration_add_update_params.go | 133 - v2/models/kms_configuration_create_params.go | 321 -- .../kms_configuration_response_params.go | 324 -- v2/models/kms_configuration_update_params.go | 168 - v2/models/kms_configurations.go | 121 - v2/models/kubernetes_filter_params.go | 200 -- v2/models/kubernetes_label.go | 90 - ...es_namespace_recovery_new_source_config.go | 110 - ...rnetes_namespace_recovery_target_config.go | 129 - ...bernetes_protection_group_object_params.go | 220 -- .../kubernetes_protection_group_params.go | 343 -- v2/models/kubernetes_pvc_info.go | 90 - ...params_for_recover_kubernetes_namespace.go | 348 -- .../kvm_protection_group_object_params.go | 93 - v2/models/kvm_protection_group_params.go | 244 -- v2/models/kvm_target_params_for_recover_vm.go | 219 -- v2/models/kvm_vm_recovery_target_config.go | 180 - v2/models/language.go | 110 - v2/models/ldap.go | 128 - v2/models/ldap_connection_status.go | 105 - v2/models/ldap_status.go | 105 - v2/models/ldaps.go | 121 - v2/models/lifecycle_rule.go | 300 -- v2/models/lifecycle_rule_filter.go | 163 - v2/models/lifecycle_rule_filter_and.go | 124 - v2/models/lifecycle_rule_filter_tag.go | 53 - v2/models/linux_agent_params.go | 116 - v2/models/list_trusted_cas_result.go | 123 - v2/models/local_disk_status.go | 128 - v2/models/local_global_object_id_list.go | 121 - v2/models/local_global_object_ids.go | 53 - v2/models/local_group_params.go | 50 - v2/models/local_user_params.go | 192 - v2/models/local_user_response_params.go | 50 - v2/models/local_user_update_params.go | 140 - v2/models/locale.go | 52 - v2/models/lock_file_params.go | 88 - v2/models/lock_range.go | 56 - v2/models/log_backup_policy.go | 159 - v2/models/log_retention.go | 191 - v2/models/log_schedule.go | 216 -- v2/models/logical_volume_info.go | 121 - v2/models/m_oref.go | 53 - ...s_sql_file_protection_group_host_params.go | 98 - ...sql_file_protection_group_object_params.go | 112 - .../m_s_sql_file_protection_group_params.go | 273 -- ...l_native_protection_group_object_params.go | 112 - .../m_s_sql_native_protection_group_params.go | 213 -- v2/models/m_s_sql_protection_group_params.go | 270 -- ...sql_volume_protection_group_host_params.go | 101 - ...l_volume_protection_group_object_params.go | 112 - .../m_s_sql_volume_protection_group_params.go | 344 -- v2/models/machine_account.go | 132 - v2/models/machine_account_encryption_type.go | 116 - v2/models/mailbox_item_type.go | 119 - v2/models/mailbox_param.go | 124 - v2/models/maintenance_mode_config.go | 237 -- v2/models/maintenance_mode_workflow_type.go | 104 - v2/models/mark_baseos_upgrade_info.go | 74 - v2/models/mcm_audit_entity_types.go | 122 - v2/models/mcm_claim_entity_type.go | 113 - v2/models/mcm_cluster_claim_request_params.go | 124 - .../mcm_cluster_claim_response_params.go | 76 - v2/models/mcm_cluster_identifier.go | 58 - .../mcm_cohesion_claim_request_params.go | 141 - .../mcm_cohesion_claim_response_params.go | 76 - ..._m_storage_protect_claim_request_params.go | 124 - ...m_storage_protect_claim_response_params.go | 76 - .../mcm_object_activity_attribute_type.go | 116 - v2/models/mcm_object_activity_type.go | 110 - v2/models/mcm_rigel_claim_request_params.go | 156 - v2/models/mcm_rigel_claim_response_params.go | 187 - v2/models/mcm_service_type.go | 122 - v2/models/mcm_signup_request_status.go | 113 - v2/models/mcm_tenant_type.go | 107 - v2/models/mfa_authentication_types.go | 110 - v2/models/mfa_config_info.go | 105 - v2/models/migrate_clone_params.go | 55 - v2/models/minute_schedule.go | 95 - v2/models/missing_entity_params.go | 127 - v2/models/modify_ciphers_request_body.go | 120 - ...odify_object_store_ciphers_request_body.go | 132 - v2/models/mongo_d_b_auth_type.go | 113 - v2/models/mongo_d_b_cdp_job_info.go | 50 - .../mongo_d_b_protection_group_params.go | 167 - .../mongo_d_b_source_registration_params.go | 193 - v2/models/mongo_db_on_prem_search_params.go | 118 - v2/models/mongo_indexed_object.go | 231 -- v2/models/mongo_indexed_objects.go | 78 - v2/models/mongodb_params.go | 162 - v2/models/mongodb_search_params.go | 118 - v2/models/month_schedule.go | 163 - v2/models/mount_hyper_v_volume_params.go | 162 - v2/models/mount_physical_volume_params.go | 162 - v2/models/mount_vmware_volume_params.go | 162 - v2/models/mounted_volume_mapping.go | 56 - v2/models/ms_group_item.go | 280 -- v2/models/ms_group_items.go | 78 - v2/models/ms_group_param.go | 326 -- v2/models/ms_sql_common_connection_params.go | 71 - v2/models/ms_team_param.go | 139 - v2/models/mssql_connection_params.go | 93 - v2/models/mssql_connection_response_params.go | 391 -- v2/models/mssql_file_object_protection.go | 71 - .../mssql_file_object_protection_params.go | 189 - v2/models/mssql_native_object_protection.go | 71 - .../mssql_native_object_protection_params.go | 211 -- v2/models/mssql_object_entity_params.go | 163 - v2/models/mssql_object_protection_params.go | 217 -- .../mssql_object_protection_request_params.go | 93 - ...mssql_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - v2/models/mssql_protection_group_type.go | 110 - v2/models/multi_stage_restore_options.go | 55 - v2/models/my_sql_agent_params.go | 107 - v2/models/nas_full_throttling_config.go | 55 - .../nas_incremental_throttling_config.go | 106 - v2/models/nas_protocol.go | 119 - v2/models/nas_qos_policy.go | 50 - v2/models/nas_throttling_config.go | 162 - v2/models/netapp_data_tiering_params.go | 139 - v2/models/netapp_object_params.go | 211 -- v2/models/netapp_object_protection_params.go | 247 -- ...netapp_object_protection_request_params.go | 217 -- ...etapp_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 116 - .../netapp_protection_group_object_params.go | 93 - v2/models/netapp_protection_group_params.go | 780 ---- v2/models/netapp_protocol.go | 128 - .../netapp_recover_file_and_folder_info.go | 117 - v2/models/netapp_registration_params.go | 390 -- v2/models/netapp_source_type.go | 107 - v2/models/netapp_volume_extended_style.go | 107 - v2/models/network_connection_info.go | 61 - v2/models/network_interface.go | 341 -- v2/models/network_interface_params.go | 121 - v2/models/network_interface_type.go | 131 - v2/models/new_group_param.go | 105 - v2/models/new_view_files_target_params.go | 138 - v2/models/nfs_config.go | 229 -- v2/models/nfs_protocol.go | 107 - v2/models/nfs_root_permissions.go | 58 - v2/models/nfs_squash.go | 53 - v2/models/nic_speed_type.go | 119 - .../nimble_protection_group_object_params.go | 95 - v2/models/nimble_protection_group_params.go | 170 - v2/models/nis_netgroup.go | 201 -- v2/models/nis_netgroups.go | 121 - v2/models/nis_provider.go | 94 - v2/models/nis_providers.go | 121 - v2/models/nlm_lock.go | 124 - v2/models/no_content.go | 11 - v2/models/no_sql_object_property.go | 88 - .../no_sql_protection_group_object_params.go | 93 - v2/models/no_sql_protection_group_params.go | 211 -- v2/models/node.go | 721 ---- v2/models/node_bond_interface_params.go | 184 - v2/models/node_endpoint_state.go | 282 -- v2/models/node_free_disks.go | 166 - v2/models/node_group.go | 242 -- v2/models/node_group_request.go | 117 - v2/models/node_group_response.go | 125 - v2/models/node_hardware_info.go | 58 - v2/models/node_identify_params.go | 73 - v2/models/node_info.go | 227 -- v2/models/node_interface_params.go | 74 - v2/models/node_interfaces.go | 126 - v2/models/node_ipmi_lan_params.go | 157 - v2/models/node_ipmi_user.go | 88 - v2/models/node_network_interfaces.go | 130 - v2/models/node_power_operation.go | 110 - v2/models/node_removal_params.go | 79 - v2/models/node_reset_state.go | 58 - v2/models/node_stats.go | 114 - v2/models/node_system_disk_info.go | 56 - v2/models/node_unit_progress.go | 67 - .../non_current_version_expiration_action.go | 50 - v2/models/num_week_in_month.go | 116 - v2/models/number_form_field_params.go | 65 - ...365_helios_search_emails_request_params.go | 130 - v2/models/o365_protection_group_type.go | 119 - .../o365_search_emails_request_params.go | 55 - v2/models/o365_search_request_params.go | 64 - ...65_teams_channels_search_request_params.go | 64 - v2/models/o_auth2_action.go | 104 - v2/models/o_auth2_provider.go | 178 - v2/models/o_auth_audience.go | 113 - v2/models/object.go | 948 ----- v2/models/object_action_request.go | 168 - v2/models/object_archival_snapshot_info.go | 132 - v2/models/object_backup_snapshot_status.go | 131 - v2/models/object_browse_request.go | 228 -- v2/models/object_environment.go | 206 -- v2/models/object_identifier.go | 218 -- v2/models/object_identifiers_params.go | 121 - v2/models/object_info.go | 325 -- v2/models/object_last_run.go | 324 -- v2/models/object_linking_params.go | 93 - v2/models/object_linking_request.go | 121 - v2/models/object_local_snapshot_info.go | 55 - v2/models/object_mailbox_param.go | 157 - v2/models/object_ms_team_param.go | 157 - v2/models/object_mutation_type.go | 113 - v2/models/object_name.go | 27 - v2/models/object_one_drive_param.go | 172 - v2/models/object_policy.go | 135 - v2/models/object_progress_info.go | 201 -- v2/models/object_protection_group_summary.go | 378 -- v2/models/object_protection_info.go | 289 -- v2/models/object_protection_run_info.go | 633 ---- v2/models/object_protection_run_summary.go | 118 - v2/models/object_protection_stats_summary.go | 221 -- v2/models/object_protection_summary.go | 169 - v2/models/object_run_result.go | 369 -- v2/models/object_services_key_mapping.go | 116 - v2/models/object_site_param.go | 171 - v2/models/object_snapshot.go | 1138 ------ v2/models/object_snapshot_id_params.go | 85 - v2/models/object_snapshot_id_result.go | 71 - v2/models/object_snapshot_volume_info.go | 93 - v2/models/object_snapshots_info.go | 321 -- v2/models/object_stats.go | 123 - v2/models/object_stats_info.go | 201 -- v2/models/object_store_ciphers_resp.go | 144 - v2/models/object_summary.go | 556 --- v2/models/object_type.go | 527 --- v2/models/object_type_v_center_params.go | 50 - .../object_type_windows_cluster_params.go | 50 - v2/models/object_un_linking_params.go | 93 - v2/models/object_unique_identifier.go | 210 -- v2/models/object_with_children.go | 180 - v2/models/objects.go | 123 - v2/models/objects_action_request.go | 265 -- v2/models/objects_bulk_action.go | 105 - v2/models/objects_discovery_params.go | 259 -- v2/models/objects_last_run.go | 121 - v2/models/objects_link_type.go | 110 - v2/models/objects_search_response_body.go | 129 - v2/models/odp_remote_cluster.go | 93 - v2/models/odp_remote_clusters.go | 121 - v2/models/office365_app_credentials.go | 55 - ...fice365_groups_object_protection_params.go | 93 - ...fice365_object_protection_common_params.go | 221 -- ...fice365_object_protection_object_params.go | 118 - .../office365_object_protection_params.go | 379 -- ...ice365_object_protection_request_params.go | 93 - ...ce365_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - ...ce365_one_drive_protection_group_params.go | 114 - ...fice365_outlook_protection_group_params.go | 55 - ...ice365_preservation_hold_library_params.go | 52 - ...ffice365_protection_group_object_params.go | 95 - .../office365_protection_group_params.go | 500 --- ..._public_folders_protection_group_params.go | 52 - v2/models/office365_region_type.go | 116 - ...365_share_point_protection_group_params.go | 114 - ...harepoint_site_object_protection_params.go | 177 - .../office365_source_registration_params.go | 396 --- ...ffice365_teams_object_protection_params.go | 93 - ...5_user_mailbox_object_protection_params.go | 128 - ...user_one_drive_object_protection_params.go | 177 - v2/models/on_prem_deploy_run.go | 123 - v2/models/on_prem_deploy_target_result.go | 246 -- ...prem_deploy_target_result_vmware_params.go | 114 - v2/models/on_prem_object_ids.go | 76 - v2/models/on_prem_source_ids.go | 76 - v2/models/on_prem_tenant_config.go | 91 - v2/models/one_drive_item.go | 56 - v2/models/one_drive_items.go | 78 - v2/models/one_drive_param.go | 130 - v2/models/onprem_deploy_config.go | 168 - v2/models/onprem_deploy_params.go | 114 - .../onprem_deploy_target_environment_type.go | 104 - v2/models/open_id_connect_action.go | 104 - v2/models/open_id_provider.go | 138 - v2/models/operation_events.go | 114 - v2/models/oracle_archival_storage_class.go | 107 - v2/models/oracle_archive_log_info.go | 181 - v2/models/oracle_archive_log_range_type.go | 110 - v2/models/oracle_clone_object.go | 117 - v2/models/oracle_clone_refresh_task.go | 93 - v2/models/oracle_clone_task.go | 116 - v2/models/oracle_connection_params.go | 71 - v2/models/oracle_data_guard_info.go | 158 - v2/models/oracle_database_host.go | 120 - v2/models/oracle_db_channel.go | 250 -- .../oracle_object_based_protection_params.go | 194 - v2/models/oracle_object_entity_params.go | 160 - v2/models/oracle_object_protection_info.go | 141 - ...oracle_object_protection_request_params.go | 93 - ...racle_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - v2/models/oracle_pdb_object_info.go | 88 - v2/models/oracle_pdb_restore_params.go | 192 - .../oracle_protection_group_db_params.go | 144 - .../oracle_protection_group_object_params.go | 158 - v2/models/oracle_protection_group_params.go | 247 -- v2/models/oracle_range_meta_info.go | 91 - v2/models/oracle_recovery_granularity_type.go | 104 - v2/models/oracle_recovery_validation_info.go | 52 - v2/models/oracle_restore_meta_info_result.go | 247 -- v2/models/oracle_restore_range_info.go | 247 -- v2/models/oracle_rman_backup.go | 110 - v2/models/oracle_sbt_host_params.go | 132 - ...le_target_params_for_recover_oracle_app.go | 95 - v2/models/oracle_tier.go | 159 - v2/models/oracle_tiering_levels.go | 107 - v2/models/oracle_tiering_storage_class.go | 104 - v2/models/oracle_tiers.go | 124 - v2/models/oracle_vlan_info.go | 61 - v2/models/org_v_d_c_network.go | 110 - ...original_elastifile_files_target_params.go | 195 - .../original_elastifile_target_params.go | 174 - ...original_flashblade_files_target_params.go | 195 - .../original_flashblade_target_params.go | 174 - ...riginal_generic_nas_files_target_params.go | 144 - .../original_generic_nas_target_params.go | 123 - .../original_gpfs_files_target_params.go | 195 - v2/models/original_gpfs_target_params.go | 174 - .../original_isilon_files_target_params.go | 195 - v2/models/original_isilon_target_params.go | 174 - .../original_netapp_files_target_params.go | 195 - v2/models/original_netapp_target_params.go | 174 - .../original_view_files_target_params.go | 141 - v2/models/overwrite_view_params.go | 71 - v2/models/ownership_context.go | 107 - v2/models/pagination_info.go | 50 - v2/models/password_form_field_params.go | 56 - v2/models/patch_detail.go | 62 - v2/models/patch_operation.go | 73 - v2/models/patch_operation_status.go | 141 - v2/models/patches_details.go | 78 - v2/models/patches_history.go | 78 - v2/models/pause_action_object_level_params.go | 93 - .../pause_action_object_level_response.go | 109 - .../pause_protection_run_action_params.go | 78 - ...e_protection_run_action_response_params.go | 77 - v2/models/pause_status_run_level.go | 104 - v2/models/perform_action_on_clones_request.go | 162 - ..._action_on_protection_group_run_request.go | 302 -- v2/models/perform_run_action_response.go | 300 -- v2/models/permission_info.go | 239 -- v2/models/physical_cluster_expand_params.go | 189 - v2/models/physical_file_backup_path_params.go | 77 - ...cal_file_protection_group_object_params.go | 171 - .../physical_file_protection_group_params.go | 369 -- ...hysical_mount_volumes_new_target_config.go | 161 - ...al_mount_volumes_original_target_config.go | 111 - v2/models/physical_node_config_params.go | 94 - v2/models/physical_object_entity_params.go | 50 - .../physical_object_protection_params.go | 214 -- ...ysical_object_protection_request_params.go | 93 - ...sical_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - v2/models/physical_protection_group_params.go | 216 -- v2/models/physical_snapshot_params.go | 108 - .../physical_source_registration_params.go | 248 -- ...physical_target_params_for_mount_volume.go | 305 -- ...rget_params_for_recover_file_and_folder.go | 236 -- ...ysical_target_params_for_recover_volume.go | 229 -- ...l_volume_protection_group_object_params.go | 102 - ...physical_volume_protection_group_params.go | 254 -- v2/models/planned_failover_params.go | 163 - v2/models/planned_run_poll_status.go | 227 -- v2/models/pluggable_database_info.go | 53 - v2/models/policy_config.go | 136 - v2/models/policy_scheduled_backup.go | 113 - v2/models/policy_template_response.go | 141 - ...licy_templates_response_with_pagination.go | 123 - v2/models/power_off_vm_params.go | 50 - v2/models/pre_check_validation.go | 58 - v2/models/pre_post_script_params.go | 162 - v2/models/prepare_planned_failver_params.go | 50 - v2/models/primary_archival_target.go | 144 - v2/models/primary_backup_target.go | 161 - v2/models/primary_backup_target_location.go | 107 - v2/models/principal_object_type.go | 107 - v2/models/private_key_credentials.go | 93 - v2/models/private_network_info.go | 216 -- v2/models/privilege.go | 74 - v2/models/privileges.go | 121 - v2/models/progree_task_status.go | 116 - v2/models/progress_stats.go | 56 - v2/models/progress_summary.go | 56 - v2/models/progress_task.go | 121 - v2/models/progress_task_event.go | 53 - v2/models/progress_task_info.go | 247 -- v2/models/progress_tasks.go | 123 - v2/models/project_scope_params.go | 88 - v2/models/protectd_objects_action_request.go | 562 --- v2/models/protected_object.go | 240 -- v2/models/protected_object_action_response.go | 179 - v2/models/protected_object_backup_config.go | 173 - .../protected_object_group_backup_config.go | 74 - v2/models/protected_object_info.go | 369 -- .../protected_object_pause_action_params.go | 134 - .../protected_object_resume_action_params.go | 134 - .../protected_object_run_now_action_params.go | 137 - ...otected_object_un_protect_action_params.go | 134 - .../protected_objects_search_metadata.go | 123 - .../protected_objects_search_response_body.go | 177 - v2/models/protection_group.go | 2086 ----------- v2/models/protection_group_alerting_policy.go | 189 - v2/models/protection_group_identifier.go | 55 - v2/models/protection_group_info.go | 357 -- v2/models/protection_group_priority.go | 110 - v2/models/protection_group_run.go | 93 - v2/models/protection_group_run_actions.go | 110 - v2/models/protection_group_runs.go | 124 - .../protection_group_state_change_actions.go | 107 - v2/models/protection_groups.go | 121 - v2/models/protection_object_input.go | 93 - v2/models/protection_policy.go | 483 --- v2/models/protection_policy_identifier.go | 55 - v2/models/protection_policy_request.go | 119 - v2/models/protection_policy_response.go | 174 - ...tection_policy_response_with_pagination.go | 123 - v2/models/protection_policy_type.go | 107 - v2/models/protection_run_summary.go | 359 -- v2/models/protection_runs_stats.go | 117 - v2/models/protection_runs_stats_list.go | 124 - v2/models/protection_runs_summary.go | 121 - v2/models/protection_summary.go | 307 -- v2/models/protection_type.go | 131 - v2/models/protocol_access_level.go | 110 - v2/models/pst_param.go | 77 - v2/models/public_error_type.go | 107 - v2/models/public_folder.go | 77 - v2/models/public_folder_item.go | 196 -- v2/models/public_folder_item_type.go | 122 - v2/models/public_folder_items.go | 78 - v2/models/public_key_request.go | 104 - v2/models/public_key_response.go | 50 - v2/models/public_task_status.go | 134 - .../pure_protection_group_object_params.go | 95 - v2/models/pure_protection_group_params.go | 224 -- v2/models/pvc_information_response_params.go | 80 - v2/models/qo_s.go | 246 -- v2/models/qos_policies_result.go | 123 - v2/models/qos_policy.go | 113 - v2/models/quota_policy.go | 84 - v2/models/rack.go | 61 - v2/models/racks.go | 123 - v2/models/radio_button_form_field_params.go | 118 - v2/models/radio_group_form_field_params.go | 127 - v2/models/rds_config.go | 271 -- ...ecover_acropolis_file_and_folder_params.go | 227 -- v2/models/recover_acropolis_params.go | 330 -- .../recover_acropolis_snapshot_params.go | 230 -- .../recover_acropolis_vm_new_source_config.go | 212 -- ..._acropolis_vm_new_source_network_config.go | 114 - ...ver_acropolis_vm_original_source_config.go | 111 - ...polis_vm_original_source_network_config.go | 52 - v2/models/recover_acropolis_vm_params.go | 225 -- .../recover_acropolis_vm_target_config.go | 180 - .../recover_aws_aurora_new_source_config.go | 208 -- ...er_aws_aurora_new_source_network_config.go | 273 -- v2/models/recover_aws_aurora_params.go | 225 -- .../recover_aws_file_and_folder_params.go | 227 -- v2/models/recover_aws_params.go | 546 --- .../recover_aws_rds_new_source_config.go | 208 -- ...cover_aws_rds_new_source_network_config.go | 273 -- v2/models/recover_aws_rds_params.go | 225 -- v2/models/recover_aws_s3_bucket_params.go | 276 -- v2/models/recover_aws_vm_new_source_config.go | 310 -- ...ecover_aws_vm_new_source_network_config.go | 224 -- v2/models/recover_aws_vm_params.go | 225 -- .../recover_azure_file_and_folder_params.go | 227 -- v2/models/recover_azure_params.go | 384 -- .../recover_azure_sql_new_source_config.go | 110 - v2/models/recover_azure_sql_object_params.go | 166 - v2/models/recover_azure_sql_params.go | 227 -- .../recover_azure_sql_snapshot_params.go | 168 - .../recover_azure_vm_new_source_config.go | 616 ---- ...over_azure_vm_new_source_network_config.go | 210 -- ...recover_azure_vm_original_source_config.go | 111 - v2/models/recover_azure_vm_params.go | 225 -- .../recover_cassandra_no_sql_object_params.go | 144 - v2/models/recover_cassandra_params.go | 328 -- .../recover_cassandra_snapshot_params.go | 180 - .../recover_couchbase_no_sql_object_params.go | 76 - v2/models/recover_couchbase_params.go | 283 -- .../recover_couchbase_snapshot_params.go | 180 - v2/models/recover_elastifile_files_params.go | 497 --- .../recover_elastifile_nas_volume_params.go | 486 --- v2/models/recover_elastifile_params.go | 332 -- ...ifile_to_elastifile_files_target_params.go | 180 - ...file_to_elastifile_volume_target_params.go | 180 - v2/models/recover_exchange_app_params.go | 162 - .../recover_exchange_app_snapshot_params.go | 180 - v2/models/recover_exchange_dbs_params.go | 179 - .../recover_exchange_dbs_snapshot_params.go | 168 - v2/models/recover_exchange_params.go | 216 -- v2/models/recover_file_and_folder_method.go | 110 - v2/models/recover_flashblade_files_params.go | 497 --- .../recover_flashblade_nas_volume_params.go | 486 --- v2/models/recover_flashblade_params.go | 332 -- ...blade_to_flashblade_files_target_params.go | 180 - ...lade_to_flashblade_volume_target_params.go | 180 - .../recover_gcp_file_and_folder_params.go | 227 -- v2/models/recover_gcp_params.go | 330 -- v2/models/recover_gcp_vm_new_source_config.go | 306 -- ...ecover_gcp_vm_new_source_network_config.go | 110 - v2/models/recover_gcp_vm_params.go | 225 -- v2/models/recover_generic_nas_files_params.go | 497 --- .../recover_generic_nas_nas_volume_params.go | 486 --- v2/models/recover_generic_nas_params.go | 332 -- ..._nas_to_generic_nas_files_target_params.go | 180 - ...nas_to_generic_nas_volume_target_params.go | 180 - v2/models/recover_gpfs_files_params.go | 497 --- v2/models/recover_gpfs_nas_volume_params.go | 486 --- v2/models/recover_gpfs_params.go | 332 -- ...ecover_gpfs_to_gpfs_files_target_params.go | 180 - ...cover_gpfs_to_gpfs_volume_target_params.go | 180 - .../recover_hbase_no_sql_object_params.go | 76 - v2/models/recover_hbase_params.go | 193 - v2/models/recover_hbase_snapshot_params.go | 180 - .../recover_hdfs_no_sql_object_params.go | 73 - v2/models/recover_hdfs_params.go | 193 - v2/models/recover_hdfs_snapshot_params.go | 180 - .../recover_hive_no_sql_object_params.go | 73 - v2/models/recover_hive_params.go | 193 - v2/models/recover_hive_snapshot_params.go | 180 - .../recover_hyper_v_file_and_folder_params.go | 227 -- v2/models/recover_hyper_v_params.go | 384 -- .../recover_hyper_v_vm_new_source_config.go | 270 -- ...er_hyper_v_vm_new_source_network_config.go | 114 - ...cover_hyper_v_vm_original_source_config.go | 111 - ...per_v_vm_original_source_network_config.go | 52 - v2/models/recover_hyper_v_vm_params.go | 225 -- ...cover_hyper_v_vm_s_c_vm_m_source_config.go | 259 -- ...r_v_vm_standalone_cluster_source_config.go | 259 -- ...yper_v_vm_standalone_host_source_config.go | 210 -- v2/models/recover_isilon_files_params.go | 497 --- v2/models/recover_isilon_nas_volume_params.go | 486 --- v2/models/recover_isilon_params.go | 332 -- ...er_isilon_to_isilon_files_target_params.go | 180 - ...r_isilon_to_isilon_volume_target_params.go | 180 - .../recover_kubernetes_namespace_params.go | 213 -- v2/models/recover_kubernetes_params.go | 162 - v2/models/recover_kvm_params.go | 276 -- .../recover_kvm_vm_new_network_config.go | 162 - v2/models/recover_kvm_vm_new_source_config.go | 308 -- ...ecover_kvm_vm_new_source_network_config.go | 114 - .../recover_kvm_vm_original_source_config.go | 111 - ...r_kvm_vm_original_source_network_config.go | 52 - v2/models/recover_kvm_vm_params.go | 225 -- v2/models/recover_mailbox_params.go | 238 -- .../recover_mongodb_no_sql_object_params.go | 144 - v2/models/recover_mongodb_params.go | 193 - v2/models/recover_mongodb_snapshot_params.go | 180 - v2/models/recover_ms_group_params.go | 136 - v2/models/recover_ms_team_params.go | 298 -- .../recover_nas_volume_to_view_params.go | 165 - v2/models/recover_netapp_files_params.go | 500 --- v2/models/recover_netapp_nas_volume_params.go | 489 --- v2/models/recover_netapp_params.go | 332 -- ...er_netapp_to_netapp_files_target_params.go | 180 - ...r_netapp_to_netapp_volume_target_params.go | 180 - v2/models/recover_o365_params.go | 603 ---- v2/models/recover_one_drive_params.go | 184 - .../recover_oracle_app_new_source_config.go | 263 -- ...cover_oracle_app_original_source_config.go | 152 - v2/models/recover_oracle_app_params.go | 213 -- .../recover_oracle_db_snapshot_params.go | 169 - .../recover_oracle_granular_restore_info.go | 160 - ...cover_oracle_new_target_database_config.go | 501 --- .../recover_oracle_new_target_view_config.go | 119 - v2/models/recover_oracle_params.go | 230 -- ...r_nas_to_elastifile_files_target_params.go | 292 -- ..._nas_to_elastifile_volume_target_params.go | 275 -- ...r_nas_to_flashblade_files_target_params.go | 292 -- ..._nas_to_flashblade_volume_target_params.go | 275 -- ..._nas_to_generic_nas_files_target_params.go | 241 -- ...nas_to_generic_nas_volume_target_params.go | 224 -- ...r_other_nas_to_gpfs_files_target_params.go | 292 -- ..._other_nas_to_gpfs_volume_target_params.go | 275 -- ...other_nas_to_isilon_files_target_params.go | 292 -- ...ther_nas_to_isilon_volume_target_params.go | 275 -- ...other_nas_to_netapp_files_target_params.go | 292 -- ...ther_nas_to_netapp_volume_target_params.go | 275 -- ...recover_physical_file_and_folder_params.go | 227 -- v2/models/recover_physical_params.go | 440 --- v2/models/recover_physical_volume_params.go | 162 - .../recover_protection_group_run_params.go | 101 - v2/models/recover_public_folders_params.go | 188 - v2/models/recover_pure_group_target_params.go | 183 - v2/models/recover_pure_params.go | 281 -- ...ecover_pure_san_group_new_source_config.go | 212 -- ...r_pure_san_group_original_source_config.go | 162 - v2/models/recover_pure_san_group_params.go | 165 - ...cover_pure_san_volume_new_source_config.go | 212 -- ..._pure_san_volume_original_source_config.go | 162 - v2/models/recover_pure_san_volume_params.go | 165 - .../recover_pure_volume_target_params.go | 183 - ...ver_r_d_s_postgres_custom_server_config.go | 193 - v2/models/recover_r_d_s_postgres_params.go | 171 - ...r_r_d_s_postgres_to_known_source_config.go | 216 -- v2/models/recover_salesforce_params.go | 241 -- v2/models/recover_sfdc_object_params.go | 138 - v2/models/recover_site_params.go | 232 -- .../recover_sql_app_new_source_config.go | 252 -- .../recover_sql_app_original_source_config.go | 152 - v2/models/recover_sql_app_params.go | 244 -- v2/models/recover_sql_params.go | 235 -- v2/models/recover_target.go | 183 - v2/models/recover_uda_object_params.go | 59 - v2/models/recover_uda_params.go | 217 -- v2/models/recover_uda_snapshot_params.go | 180 - .../recover_v_mware_file_and_folder_params.go | 300 -- v2/models/recover_view_files_params.go | 177 - v2/models/recover_view_params.go | 279 -- ...ecover_view_to_view_files_target_params.go | 186 - .../recover_vmware_child_snapshot_params.go | 230 -- v2/models/recover_vmware_disk_params.go | 162 - v2/models/recover_vmware_params.go | 549 --- v2/models/recover_vmware_snapshot_params.go | 180 - .../recover_vmware_v_app_new_source_config.go | 162 - ...ver_vmware_v_app_original_source_config.go | 111 - v2/models/recover_vmware_v_app_params.go | 162 - ...vmware_v_app_template_new_source_config.go | 162 - .../recover_vmware_v_app_template_params.go | 162 - ...ware_v_app_template_v_c_d_source_config.go | 431 --- ...ecover_vmware_v_app_v_c_d_source_config.go | 382 -- .../recover_vmware_vm_esxi_source_config.go | 324 -- .../recover_vmware_vm_new_network_config.go | 117 - .../recover_vmware_vm_new_source_config.go | 270 -- ...ver_vmware_vm_new_source_network_config.go | 114 - ...ecover_vmware_vm_original_source_config.go | 111 - ...mware_vm_original_source_network_config.go | 55 - v2/models/recover_vmware_vm_params.go | 225 -- .../recover_vmware_vm_v_c_d_source_config.go | 426 --- ...ecover_vmware_vm_v_center_source_config.go | 326 -- v2/models/recover_volume_mapping.go | 90 - .../recovered_or_cloned_vms_rename_config.go | 55 - v2/models/recoveries.go | 123 - v2/models/recovery.go | 1908 ---------- v2/models/recovery_object_identifier.go | 95 - v2/models/recovery_oracle_task_info.go | 204 -- v2/models/recovery_process_type.go | 107 - v2/models/recovery_task_info.go | 204 -- v2/models/recovery_time_range_info.go | 82 - v2/models/recovery_type.go | 224 -- v2/models/recovery_vlan_config.go | 79 - v2/models/redo_log_group_config.go | 59 - ...ter_or_update_kerberos_provider_request.go | 117 - v2/models/register_remote_cluster_params.go | 116 - v2/models/register_swift_params.go | 127 - v2/models/register_trusted_cas.go | 134 - v2/models/registered_remote_storage_list.go | 123 - v2/models/registration_info.go | 164 - v2/models/regular_backup_policy.go | 327 -- v2/models/remote_adapter_host.go | 286 -- .../remote_adapter_protection_group_params.go | 255 -- ...ter_protection_group_replication_params.go | 76 - v2/models/remote_cluster.go | 93 - v2/models/remote_cluster_params.go | 249 -- v2/models/remote_cluster_purpose.go | 107 - v2/models/remote_clusters.go | 121 - v2/models/remote_disk.go | 322 -- v2/models/remote_disks.go | 123 - v2/models/remote_storage_info.go | 168 - v2/models/remote_target_config.go | 95 - v2/models/remove_baseos_patch_request.go | 74 - v2/models/remove_disk.go | 132 - v2/models/remove_node.go | 132 - v2/models/replica_failover_object.go | 53 - v2/models/replicated_view_name_config.go | 77 - v2/models/replication_backup_activation.go | 329 -- .../replication_backup_activation_result.go | 237 -- v2/models/replication_config.go | 341 -- v2/models/replication_data_stats.go | 58 - v2/models/replication_encryption_key.go | 71 - v2/models/replication_params.go | 181 - v2/models/replication_run.go | 123 - v2/models/replication_run_summary.go | 123 - v2/models/replication_target_progress_info.go | 201 -- v2/models/replication_target_result.go | 412 --- v2/models/replication_target_summary_info.go | 228 -- v2/models/replication_targets.go | 110 - v2/models/request_initiator_type.go | 110 - v2/models/reset_or_restore_networking.go | 107 - .../reset_patch_download_progress_result.go | 50 - v2/models/reset_states.go | 78 - v2/models/resource_endpoint.go | 65 - v2/models/restore_spfile_or_pfile_info.go | 55 - v2/models/restore_v_mware_vm_params.go | 76 - .../resume_action_object_level_params.go | 93 - .../resume_action_object_level_response.go | 109 - .../resume_protection_run_action_params.go | 78 - ...e_protection_run_action_response_params.go | 77 - v2/models/retention.go | 191 - v2/models/retention_units.go | 113 - v2/models/retrieve_archive_task.go | 77 - v2/models/retry_options.go | 95 - v2/models/reverse_replication_result.go | 53 - v2/models/revert_patches_request.go | 73 - v2/models/rigel_claim_info.go | 116 - v2/models/rigel_claim_log.go | 58 - v2/models/rigel_claim_logs.go | 123 - v2/models/rigel_cluster_config_params.go | 144 - v2/models/rigel_cluster_node.go | 79 - v2/models/rigel_connection.go | 135 - v2/models/rigel_connection_info.go | 58 - v2/models/rigel_connections.go | 123 - v2/models/rigel_connector.go | 126 - v2/models/rigel_connectors.go | 123 - v2/models/rigel_entity_type.go | 107 - v2/models/rigel_reg_config.go | 216 -- v2/models/rigel_use_case.go | 107 - v2/models/role.go | 161 - v2/models/roles.go | 121 - v2/models/root_public_folder_param.go | 174 - v2/models/rpaas_config.go | 210 -- v2/models/rpaas_kms_key_type.go | 107 - v2/models/rpaas_provision_status.go | 116 - v2/models/run_archival_config.go | 188 - v2/models/run_cloud_replication_config.go | 267 -- v2/models/run_filter_values.go | 122 - .../run_now_action_object_level_params.go | 169 - .../run_now_action_object_level_response.go | 109 - v2/models/run_object.go | 130 - v2/models/run_object_physical_params.go | 50 - v2/models/run_replication_config.go | 129 - v2/models/run_targets_configuration.go | 250 -- .../s3_abac_server_create_request_params.go | 159 - v2/models/s3_abac_server_response.go | 159 - .../s3_abac_server_update_request_params.go | 111 - v2/models/s3_abac_servers_response.go | 121 - v2/models/s3_account_params.go | 56 - v2/models/s3_acl_grantee_type.go | 107 - v2/models/s3_acl_permission.go | 116 - .../s3_compatible_archival_storage_class.go | 107 - v2/models/s3_config.go | 340 -- v2/models/s3_config_for_indexing.go | 107 - v2/models/s3_lifecycle_management.go | 124 - v2/models/s3_owner_info.go | 55 - v2/models/s_f_d_c_endpoint_type.go | 110 - v2/models/s_m_b_principal.go | 56 - v2/models/saas_service_name.go | 119 - v2/models/sap_hana_agent_params.go | 159 - v2/models/sap_oracle_agent_params.go | 107 - v2/models/schedule.go | 238 -- v2/models/schedule_type.go | 107 - v2/models/schedule_unit.go | 119 - v2/models/scheduled_backup.go | 119 - v2/models/schema.go | 58 - v2/models/script_host.go | 131 - v2/models/script_host_type.go | 125 - v2/models/scvmm_registration_params.go | 179 - .../search_document_library_request_params.go | 186 - v2/models/search_email_request_params.go | 168 - v2/models/search_email_request_params_base.go | 264 -- .../search_exchange_objects_request_params.go | 71 - v2/models/search_file_request_params.go | 141 - v2/models/search_file_request_params_base.go | 152 - v2/models/search_indexed_objects_request.go | 1068 ------ .../search_indexed_objects_response_body.go | 933 ----- v2/models/search_ms_groups_request_params.go | 213 -- v2/models/search_ms_teams_request_params.go | 282 -- v2/models/search_object.go | 261 -- .../search_public_folder_request_params.go | 207 -- .../search_sfdc_records_request_params.go | 143 - v2/models/secret_key_entity.go | 71 - v2/models/security_config.go | 473 --- v2/models/security_config_account_lockout.go | 119 - .../security_config_certificate_based_auth.go | 162 - .../security_config_data_classification.go | 56 - .../security_config_password_lifetime.go | 99 - v2/models/security_config_password_reuse.go | 94 - .../security_config_password_strength.go | 86 - v2/models/security_config_response.go | 95 - .../security_config_session_configuration.go | 137 - .../security_config_ssh_configuration.go | 51 - v2/models/security_principal.go | 123 - v2/models/security_principals.go | 121 - v2/models/self_service_snapshot_config.go | 71 - v2/models/service_patch_level.go | 62 - v2/models/service_patch_levels.go | 78 - v2/models/service_unit_progress.go | 141 - v2/models/service_version_info.go | 56 - v2/models/sfdc_aurora_cluster_info.go | 232 -- v2/models/sfdc_dependent_object.go | 90 - v2/models/sfdc_meta_info_result.go | 185 - v2/models/sfdc_meta_info_type.go | 104 - v2/models/sfdc_object_field_exclusion.go | 79 - v2/models/sfdc_object_params.go | 56 - .../sfdc_object_protection_object_params.go | 161 - v2/models/sfdc_object_protection_params.go | 143 - .../sfdc_object_protection_request_params.go | 93 - .../sfdc_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - .../sfdc_protection_group_object_params.go | 95 - v2/models/sfdc_protection_group_params.go | 133 - v2/models/sfdc_records.go | 55 - v2/models/sfdc_source_registration_params.go | 267 -- v2/models/share.go | 284 -- v2/models/sharepoint_item.go | 111 - v2/models/sharepoint_items.go | 78 - v2/models/sharepoint_object_entity_params.go | 50 - v2/models/sharepoint_object_params.go | 50 - v2/models/shares.go | 126 - v2/models/shell_key_value_pair.go | 53 - v2/models/simple_auth_params.go | 77 - v2/models/simple_tags.go | 90 - v2/models/sites_discovery_params.go | 52 - v2/models/sla_rule.go | 128 - v2/models/slave_data.go | 118 - v2/models/smb_active_file_path.go | 130 - v2/models/smb_active_open.go | 192 - v2/models/smb_active_session.go | 133 - v2/models/smb_config.go | 187 - v2/models/smb_file_access_types.go | 161 - v2/models/smb_file_opens.go | 124 - v2/models/smb_mount_credentials.go | 95 - v2/models/smb_permission.go | 272 -- v2/models/smb_permissions_info.go | 128 - v2/models/smtp_configuration.go | 97 - v2/models/snap_mirror_config.go | 53 - v2/models/snapshot_actions.go | 188 - v2/models/snapshot_diff_params.go | 278 -- v2/models/snapshot_diff_result.go | 178 - v2/models/snapshot_handle.go | 53 - v2/models/snapshot_info.go | 286 -- v2/models/snapshot_label.go | 55 - v2/models/snapshot_recovery_target_type.go | 52 - v2/models/snapshot_tag_info.go | 117 - v2/models/snapshot_target_type.go | 116 - v2/models/snapshots_summary.go | 315 -- v2/models/source.go | 130 - v2/models/source_attribute_filter.go | 53 - ...ource_attribute_filters_response_params.go | 121 - v2/models/source_backup_deactivation.go | 148 - v2/models/source_connection_request_params.go | 528 --- .../source_connection_response_params.go | 435 --- .../source_hierarchy_object_summaries.go | 123 - v2/models/source_hierarchy_object_summary.go | 119 - v2/models/source_name.go | 27 - v2/models/source_registration.go | 1368 ------- ...ource_registration_patch_request_params.go | 247 -- .../source_registration_request_params.go | 1308 ------- ...urce_registration_update_request_params.go | 1319 ------- v2/models/source_registrations.go | 121 - v2/models/source_replica_object.go | 53 - v2/models/sources.go | 121 - v2/models/sql_server.go | 283 -- v2/models/sql_server_instance.go | 133 - .../sql_target_params_for_recover_sql_app.go | 95 - v2/models/ssh_password_credentials.go | 88 - v2/models/ssh_private_key_credentials.go | 91 - .../standalone_cluster_registration_params.go | 117 - .../standalone_host_registration_params.go | 117 - v2/models/standard_params.go | 216 -- v2/models/standby_object.go | 74 - v2/models/static_route_params.go | 139 - v2/models/static_routes.go | 121 - v2/models/stats_task.go | 121 - v2/models/stats_task_info.go | 162 - v2/models/stats_tasks.go | 123 - .../storage_array_snapshot_backup_policy.go | 159 - v2/models/storage_array_snapshot_config.go | 231 -- ...rage_array_snapshot_max_snapshot_config.go | 52 - ...storage_array_snapshot_max_space_config.go | 52 - v2/models/storage_array_snapshot_schedule.go | 432 --- ...torage_array_snapshot_throttling_policy.go | 171 - v2/models/storage_domain.go | 690 ---- v2/models/storage_domain_pair.go | 127 - v2/models/storage_domains.go | 121 - v2/models/storage_policy.go | 333 -- v2/models/storage_policy_override.go | 61 - v2/models/string_form_field_params.go | 59 - v2/models/subnet.go | 313 -- v2/models/subnet_info.go | 58 - v2/models/success_resp.go | 71 - v2/models/support_channel_config.go | 90 - v2/models/support_mfa_config_info.go | 117 - v2/models/support_totp_key_info.go | 56 - v2/models/support_user_config.go | 53 - v2/models/supported_hadoop_distributions.go | 107 - v2/models/swift_config.go | 59 - v2/models/swift_params.go | 101 - v2/models/syslog_audit_tag.go | 61 - v2/models/syslog_server.go | 88 - v2/models/syslog_server_status.go | 58 - v2/models/syslog_servers.go | 123 - v2/models/system_app_status_params.go | 62 - v2/models/system_recovery_params.go | 52 - v2/models/tag.go | 211 -- v2/models/tag_info.go | 71 - v2/models/tag_object.go | 183 - v2/models/tag_params.go | 183 - v2/models/target_bandwidth_throttlings.go | 162 - v2/models/target_encryption_level.go | 110 - v2/models/target_mailbox_param.go | 102 - v2/models/target_ms_team_param.go | 138 - v2/models/target_nfs_security_type.go | 119 - v2/models/target_nfs_version_number.go | 116 - v2/models/target_one_drive_param.go | 102 - v2/models/target_purpose_type.go | 110 - v2/models/target_registration_status.go | 110 - v2/models/target_schedule.go | 142 - v2/models/target_share_type.go | 107 - v2/models/target_site_param.go | 128 - v2/models/target_teams_channel_param.go | 182 - v2/models/targets_configuration.go | 369 -- v2/models/task_logs.go | 53 - v2/models/tdm_action.go | 116 - v2/models/tdm_clone_task_request_params.go | 166 - v2/models/tdm_clone_task_response_params.go | 166 - v2/models/tdm_environment.go | 107 - v2/models/tdm_object.go | 166 - v2/models/tdm_object_timeline_event.go | 226 -- v2/models/tdm_object_timeline_events.go | 121 - v2/models/tdm_objects.go | 172 - v2/models/tdm_refresh_task_request_params.go | 91 - v2/models/tdm_refresh_task_response_params.go | 166 - v2/models/tdm_snapshot.go | 243 -- v2/models/tdm_snapshot_task_params.go | 134 - v2/models/tdm_status.go | 116 - v2/models/tdm_task.go | 226 -- v2/models/tdm_tasks.go | 172 - v2/models/tdm_teardown_task_request_params.go | 71 - v2/models/team_channel_type.go | 107 - v2/models/teams_additional_params.go | 52 - v2/models/teams_file_item.go | 119 - v2/models/teams_item.go | 280 -- v2/models/teams_items.go | 78 - v2/models/tear_down_status.go | 113 - v2/models/template.go | 266 -- v2/models/tenant.go | 95 - v2/models/tenant_action_body.go | 107 - v2/models/tenant_actions.go | 107 - v2/models/tenant_assignment_properties.go | 297 -- .../tenant_assignment_type_integer_id.go | 29 - v2/models/tenant_assignment_type_string_id.go | 29 - v2/models/tenant_assignments.go | 114 - v2/models/tenant_assignments_params.go | 65 - v2/models/tenant_assignments_result.go | 268 -- v2/models/tenant_backfill_task_type.go | 107 - v2/models/tenant_dmaas_cert.go | 64 - v2/models/tenant_dmaas_certs.go | 123 - v2/models/tenant_info.go | 232 -- v2/models/tenant_migration_action.go | 228 -- v2/models/tenant_migration_result.go | 129 - v2/models/tenant_migration_service.go | 178 - v2/models/tenant_migration_service_action.go | 229 -- v2/models/tenant_network.go | 84 - v2/models/tenant_status.go | 113 - v2/models/tenants_info.go | 80 - v2/models/test_smtp_config.go | 71 - v2/models/throttling_params.go | 132 - v2/models/tier_level_settings.go | 322 -- .../tiering_aws_external_target_params.go | 228 -- .../tiering_azure_external_target_params.go | 168 - v2/models/tiering_bandwidth_settings.go | 95 - v2/models/tiering_cloud_platforms.go | 113 - v2/models/tiering_external_target_params.go | 406 --- .../tiering_gcp_external_target_params.go | 161 - v2/models/tiering_info.go | 251 -- v2/models/tiering_levels.go | 149 - .../tiering_oracle_external_target_params.go | 161 - .../tiering_s3_comp_external_target_params.go | 95 - v2/models/tiering_target_storage_type.go | 116 - v2/models/tiering_type.go | 107 - v2/models/time.go | 53 - v2/models/time_of_a_week.go | 209 -- v2/models/time_of_day.go | 111 - v2/models/time_range_usecs.go | 88 - v2/models/time_series_stats.go | 121 - v2/models/time_series_stats_for_metric.go | 182 - v2/models/time_units.go | 119 - v2/models/time_window.go | 227 -- v2/models/totp_key_info.go | 59 - v2/models/trusted_ca.go | 287 -- v2/models/trusted_ca_request.go | 92 - v2/models/trusted_domain.go | 127 - v2/models/trusted_domain_params.go | 253 -- v2/models/uda_config_params.go | 172 - v2/models/uda_configs_list.go | 50 - v2/models/uda_connector_config_params.go | 191 - v2/models/uda_create_run_response_params.go | 50 - v2/models/uda_dynamic_form_params.go | 121 - .../uda_externally_triggered_run_params.go | 124 - v2/models/uda_host_os_specific_params.go | 265 -- v2/models/uda_index_params.go | 68 - v2/models/uda_indexed_object.go | 141 - v2/models/uda_indexed_objects.go | 78 - v2/models/uda_locale_specific_translations.go | 55 - v2/models/uda_o_s_index_config_params.go | 50 - v2/models/uda_o_s_specific_config_params.go | 64 - v2/models/uda_object_params.go | 53 - .../uda_object_protection_object_params.go | 93 - v2/models/uda_object_protection_params.go | 232 -- .../uda_object_protection_request_params.go | 93 - .../uda_object_protection_response_params.go | 93 - ...object_protection_update_request_params.go | 93 - v2/models/uda_on_prem_search_params.go | 118 - v2/models/uda_params.go | 160 - .../uda_protection_group_object_params.go | 53 - v2/models/uda_protection_group_params.go | 279 -- v2/models/uda_protection_params.go | 495 --- v2/models/uda_protection_run_params.go | 109 - v2/models/uda_recovery_params.go | 301 -- v2/models/uda_registration_params.go | 568 --- v2/models/uda_search_params.go | 71 - v2/models/uda_source_registration_params.go | 426 --- v2/models/uda_source_type.go | 137 - v2/models/universal_id.go | 56 - v2/models/unplanned_failover_params.go | 50 - .../unprotect_action_object_level_params.go | 128 - .../unprotect_action_object_level_response.go | 109 - v2/models/unregister_kerberos_provider.go | 50 - v2/models/unregister_kerberos_request.go | 74 - v2/models/unregister_swift_params.go | 127 - v2/models/up_tiering_file_selection_type.go | 107 - v2/models/update_active_directory_request.go | 248 -- v2/models/update_archival_snapshot_config.go | 185 - .../update_bifrost_connection_request.go | 95 - v2/models/update_bifrost_connector_request.go | 95 - .../update_certificate_by_csr_request.go | 88 - ...update_certificate_by_csr_response_body.go | 52 - v2/models/update_cluster_ipmi_user.go | 132 - v2/models/update_cluster_vlan_params.go | 330 -- v2/models/update_data_tiering_state.go | 56 - .../update_data_tiering_state_request.go | 143 - ...pdate_existing_archival_snapshot_config.go | 194 - ...te_existing_replication_snapshot_config.go | 139 - v2/models/update_feature_flag_params.go | 67 - v2/models/update_fleet_env_info_request.go | 177 - v2/models/update_group_parameters.go | 121 - v2/models/update_idp_request_params.go | 93 - v2/models/update_infected_files_list.go | 183 - v2/models/update_infected_files_parameters.go | 182 - v2/models/update_ipmi_users.go | 172 - v2/models/update_keystone_request.go | 93 - v2/models/update_local_snapshot_config.go | 116 - v2/models/update_m_f_a_result.go | 116 - .../update_node_bond_interface_params.go | 134 - v2/models/update_node_ipmi_user.go | 132 - v2/models/update_object_snapshot_request.go | 113 - v2/models/update_odp_remote_cluster_params.go | 166 - v2/models/update_protected_objects_request.go | 116 - .../update_protection_group_run_params.go | 236 -- ...pdate_protection_group_run_request_body.go | 133 - ...date_protection_group_run_response_body.go | 126 - v2/models/update_protection_groups_state.go | 124 - .../update_protection_groups_state_request.go | 138 - v2/models/update_remote_cluster_params.go | 160 - .../update_replication_snapshot_config.go | 185 - v2/models/update_rigel_connection_request.go | 191 - v2/models/update_rigel_connector_request.go | 95 - v2/models/update_role_parameters.go | 81 - v2/models/update_security_config_request.go | 95 - v2/models/update_share_param.go | 232 -- v2/models/update_smtp_params.go | 117 - v2/models/update_storage_domain_param.go | 93 - v2/models/update_support_user_params.go | 56 - v2/models/update_tdm_snapshot_request.go | 93 - v2/models/update_tenant_body.go | 168 - v2/models/update_tenant_params.go | 55 - v2/models/update_user_parameters.go | 166 - v2/models/update_view_param.go | 1242 ------- v2/models/upgrade_check_node_result.go | 187 - v2/models/upgrade_check_run_tests_request.go | 107 - v2/models/upgrade_check_run_tests_result.go | 52 - v2/models/upgrade_check_test_result.go | 134 - v2/models/upgrade_checks_results.go | 193 - v2/models/upgradecheck_node_test_status.go | 116 - v2/models/upgradecheck_request_type.go | 107 - v2/models/upgradecheck_result_status.go | 113 - v2/models/upgradecheck_test_result.go | 122 - v2/models/uplink_switch.go | 56 - v2/models/upload_cluster_cert_request.go | 121 - v2/models/upload_cluster_cert_response.go | 50 - v2/models/upload_package_url_params.go | 71 - v2/models/uptiering_file_age_policy.go | 114 - v2/models/uptiering_policy.go | 241 -- v2/models/uptiering_target.go | 144 - v2/models/usage_and_performance_stats.go | 108 - v2/models/user.go | 58 - v2/models/user_api_key.go | 207 -- v2/models/user_api_keys.go | 121 - v2/models/user_db_backup_preference.go | 110 - v2/models/user_id.go | 53 - v2/models/user_id_mapping_params.go | 487 --- v2/models/user_lock_reason.go | 114 - v2/models/user_params.go | 531 --- v2/models/user_quota.go | 192 - v2/models/user_quota_delete_params.go | 121 - v2/models/user_quota_overrides.go | 130 - v2/models/user_session.go | 50 - v2/models/user_sessions_count.go | 53 - v2/models/user_ui_config.go | 53 - v2/models/users_discovery_params.go | 67 - v2/models/users_list.go | 121 - ...v_mware_mount_volumes_new_target_config.go | 181 - ...re_mount_volumes_original_target_config.go | 132 - ...alidate_remote_cluster_connection_param.go | 112 - .../validate_support_user_cred_params.go | 76 - v2/models/vcd_additional_params.go | 123 - v2/models/vcd_connection_params.go | 136 - v2/models/vcd_registration_params.go | 189 - v2/models/vcd_storage_profile_params.go | 95 - v2/models/vcd_vcenter_info.go | 55 - v2/models/vcenter_credential_info.go | 119 - v2/models/vcenter_registration_params.go | 295 -- v2/models/vdc_catalog.go | 95 - v2/models/vdc_catalogs.go | 123 - v2/models/vdc_object.go | 183 - v2/models/verify_totp_request.go | 50 - v2/models/verify_totp_result.go | 53 - v2/models/view.go | 922 ----- v2/models/view_alias_info.go | 238 -- v2/models/view_category.go | 110 - v2/models/view_client.go | 141 - v2/models/view_client_stats.go | 124 - v2/models/view_clients.go | 121 - v2/models/view_clients_stats.go | 121 - v2/models/view_clients_summary.go | 121 - v2/models/view_clients_summary_info.go | 59 - v2/models/view_directory_quota.go | 159 - v2/models/view_directory_quota_policy.go | 53 - v2/models/view_directory_quotas.go | 124 - v2/models/view_failover.go | 62 - v2/models/view_intent.go | 156 - v2/models/view_object_params.go | 53 - v2/models/view_object_summary.go | 50 - v2/models/view_options.go | 58 - v2/models/view_params.go | 55 - v2/models/view_pinning_config.go | 96 - v2/models/view_protection.go | 133 - v2/models/view_protection_config.go | 214 -- .../view_protection_group_object_params.go | 93 - v2/models/view_protection_group_params.go | 291 -- ...iew_protection_group_replication_params.go | 136 - v2/models/view_protection_type.go | 116 - v2/models/view_protocol.go | 174 - v2/models/view_protocol_access.go | 116 - v2/models/view_protocol_access_mode.go | 107 - .../view_recover_file_and_folder_info.go | 117 - v2/models/view_security_mode.go | 110 - v2/models/view_share_permissions.go | 124 - v2/models/view_stats.go | 114 - v2/models/view_stats_in_last_hours.go | 62 - v2/models/view_stats_info.go | 130 - v2/models/view_stats_info_details.go | 464 --- v2/models/view_user_quota_settings.go | 127 - v2/models/view_user_quotas.go | 116 - v2/models/views_global_settings.go | 62 - v2/models/views_stats.go | 121 - v2/models/views_summary.go | 122 - v2/models/vlan_params.go | 58 - v2/models/vm_filter.go | 117 - v2/models/vm_ware_c_d_p_filter_params.go | 71 - v2/models/vmware_additional_params.go | 111 - v2/models/vmware_cdp_object.go | 191 - v2/models/vmware_connection_params.go | 168 - v2/models/vmware_disk_controller_type.go | 110 - v2/models/vmware_disk_provision_type.go | 116 - v2/models/vmware_object_action.go | 116 - v2/models/vmware_object_action_params.go | 174 - ...are_object_enable_app_protection_params.go | 171 - ...are_object_enable_sql_protection_params.go | 114 - v2/models/vmware_object_entity_params.go | 230 -- v2/models/vmware_object_protection_request.go | 145 - ...vmware_object_protection_request_params.go | 253 -- .../vmware_object_protection_response.go | 237 -- ...mware_object_protection_response_params.go | 116 - ...object_protection_update_request_params.go | 140 - .../vmware_protection_group_extra_params.go | 180 - .../vmware_protection_group_object_params.go | 343 -- v2/models/vmware_protection_group_params.go | 368 -- ...rotection_group_standby_resource_params.go | 281 -- ...re_recover_disks_original_source_config.go | 131 - ...ware_recover_disks_target_source_config.go | 148 - .../vmware_recover_files_new_target_config.go | 234 -- ...re_recover_files_original_target_config.go | 188 - ...are_recover_original_source_disk_params.go | 77 - ...mware_recover_target_source_disk_params.go | 88 - .../vmware_source_registration_params.go | 268 -- v2/models/vmware_source_type.go | 110 - v2/models/vmware_sql_credential_params.go | 55 - v2/models/vmware_standby_object.go | 254 -- .../vmware_target_params_for_mount_volume.go | 305 -- .../vmware_target_params_for_recover_disk.go | 222 -- ...rget_params_for_recover_file_and_folder.go | 240 -- .../vmware_target_params_for_recover_v_app.go | 390 -- ...arget_params_for_recover_v_app_template.go | 387 -- .../vmware_target_params_for_recover_vm.go | 348 -- v2/models/vmware_throttling_params.go | 61 - .../vmware_v_app_recovery_target_config.go | 180 - ...e_v_app_template_recovery_target_config.go | 180 - v2/models/vmware_vm_recovery_target_config.go | 180 - v2/models/volume_info.go | 185 - v2/models/web_socket_request_status.go | 110 - v2/models/week_days.go | 122 - v2/models/week_schedule.go | 103 - v2/models/workflow_intervention_spec.go | 156 - v2/models/workload_stats_schema.go | 178 - v2/models/workload_stats_summary.go | 121 - v2/models/workload_sub_type.go | 189 - v2/models/workload_type.go | 131 - v2/models/worm_properties.go | 58 - v2/models/worm_retention.go | 107 - v2/models/worm_specific_target_params.go | 64 - v2/models/year_schedule.go | 109 - 6326 files changed, 12 insertions(+), 1137226 deletions(-) delete mode 100644 go.mod delete mode 100644 go.sum delete mode 100644 v1/client/access_tokens/access_tokens_client.go delete mode 100644 v1/client/access_tokens/generate_access_token_parameters.go delete mode 100644 v1/client/access_tokens/generate_access_token_responses.go delete mode 100644 v1/client/active_directory/active_directory_client.go delete mode 100644 v1/client/active_directory/add_active_directory_principals_parameters.go delete mode 100644 v1/client/active_directory/add_active_directory_principals_responses.go delete mode 100644 v1/client/active_directory/create_active_directory_entry_parameters.go delete mode 100644 v1/client/active_directory/create_active_directory_entry_responses.go delete mode 100644 v1/client/active_directory/delete_active_directory_entry_parameters.go delete mode 100644 v1/client/active_directory/delete_active_directory_entry_responses.go delete mode 100644 v1/client/active_directory/enable_trusted_domain_discovery_parameters.go delete mode 100644 v1/client/active_directory/enable_trusted_domain_discovery_responses.go delete mode 100644 v1/client/active_directory/get_active_directory_domain_controllers_parameters.go delete mode 100644 v1/client/active_directory/get_active_directory_domain_controllers_responses.go delete mode 100644 v1/client/active_directory/get_active_directory_entry_parameters.go delete mode 100644 v1/client/active_directory/get_active_directory_entry_responses.go delete mode 100644 v1/client/active_directory/list_centrify_zones_parameters.go delete mode 100644 v1/client/active_directory/list_centrify_zones_responses.go delete mode 100644 v1/client/active_directory/search_active_directory_principals_parameters.go delete mode 100644 v1/client/active_directory/search_active_directory_principals_responses.go delete mode 100644 v1/client/active_directory/update_active_directory_id_mapping_parameters.go delete mode 100644 v1/client/active_directory/update_active_directory_id_mapping_responses.go delete mode 100644 v1/client/active_directory/update_active_directory_ignored_trusted_domains_parameters.go delete mode 100644 v1/client/active_directory/update_active_directory_ignored_trusted_domains_responses.go delete mode 100644 v1/client/active_directory/update_active_directory_ldap_provider_parameters.go delete mode 100644 v1/client/active_directory/update_active_directory_ldap_provider_responses.go delete mode 100644 v1/client/active_directory/update_active_directory_machine_accounts_parameters.go delete mode 100644 v1/client/active_directory/update_active_directory_machine_accounts_responses.go delete mode 100644 v1/client/active_directory/update_preferred_domain_controllers_parameters.go delete mode 100644 v1/client/active_directory/update_preferred_domain_controllers_responses.go delete mode 100644 v1/client/alerts/alerts_client.go delete mode 100644 v1/client/alerts/create_notification_rule_parameters.go delete mode 100644 v1/client/alerts/create_notification_rule_responses.go delete mode 100644 v1/client/alerts/create_resolution_parameters.go delete mode 100644 v1/client/alerts/create_resolution_responses.go delete mode 100644 v1/client/alerts/delete_notification_rule_parameters.go delete mode 100644 v1/client/alerts/delete_notification_rule_responses.go delete mode 100644 v1/client/alerts/get_alert_by_id_parameters.go delete mode 100644 v1/client/alerts/get_alert_by_id_responses.go delete mode 100644 v1/client/alerts/get_alert_categories_parameters.go delete mode 100644 v1/client/alerts/get_alert_categories_responses.go delete mode 100644 v1/client/alerts/get_alert_types_parameters.go delete mode 100644 v1/client/alerts/get_alert_types_responses.go delete mode 100644 v1/client/alerts/get_alerts_parameters.go delete mode 100644 v1/client/alerts/get_alerts_responses.go delete mode 100644 v1/client/alerts/get_notification_rules_parameters.go delete mode 100644 v1/client/alerts/get_notification_rules_responses.go delete mode 100644 v1/client/alerts/get_resolution_by_id_parameters.go delete mode 100644 v1/client/alerts/get_resolution_by_id_responses.go delete mode 100644 v1/client/alerts/get_resolutions_parameters.go delete mode 100644 v1/client/alerts/get_resolutions_responses.go delete mode 100644 v1/client/alerts/update_notification_rule_parameters.go delete mode 100644 v1/client/alerts/update_notification_rule_responses.go delete mode 100644 v1/client/alerts/update_resolution_parameters.go delete mode 100644 v1/client/alerts/update_resolution_responses.go delete mode 100644 v1/client/analytics/analytics_client.go delete mode 100644 v1/client/analytics/analyze_jar_parameters.go delete mode 100644 v1/client/analytics/analyze_jar_responses.go delete mode 100644 v1/client/analytics/cancel_map_reduce_instance_run_parameters.go delete mode 100644 v1/client/analytics/cancel_map_reduce_instance_run_responses.go delete mode 100644 v1/client/analytics/create_application_parameters.go delete mode 100644 v1/client/analytics/create_application_responses.go delete mode 100644 v1/client/analytics/create_mapper_parameters.go delete mode 100644 v1/client/analytics/create_mapper_responses.go delete mode 100644 v1/client/analytics/create_reducer_parameters.go delete mode 100644 v1/client/analytics/create_reducer_responses.go delete mode 100644 v1/client/analytics/delete_application_parameters.go delete mode 100644 v1/client/analytics/delete_application_responses.go delete mode 100644 v1/client/analytics/delete_map_reduce_instance_run_parameters.go delete mode 100644 v1/client/analytics/delete_map_reduce_instance_run_responses.go delete mode 100644 v1/client/analytics/delete_mapper_parameters.go delete mode 100644 v1/client/analytics/delete_mapper_responses.go delete mode 100644 v1/client/analytics/delete_reducer_parameters.go delete mode 100644 v1/client/analytics/delete_reducer_responses.go delete mode 100644 v1/client/analytics/delete_uploaded_jar_parameters.go delete mode 100644 v1/client/analytics/delete_uploaded_jar_responses.go delete mode 100644 v1/client/analytics/download_m_r_base_jar_parameters.go delete mode 100644 v1/client/analytics/download_m_r_base_jar_responses.go delete mode 100644 v1/client/analytics/download_m_r_output_files_parameters.go delete mode 100644 v1/client/analytics/download_m_r_output_files_responses.go delete mode 100644 v1/client/analytics/get_application_by_id_parameters.go delete mode 100644 v1/client/analytics/get_application_by_id_responses.go delete mode 100644 v1/client/analytics/get_applications_parameters.go delete mode 100644 v1/client/analytics/get_applications_responses.go delete mode 100644 v1/client/analytics/get_m_r_upload_jar_path_parameters.go delete mode 100644 v1/client/analytics/get_m_r_upload_jar_path_responses.go delete mode 100644 v1/client/analytics/get_map_reduce_app_runs_parameters.go delete mode 100644 v1/client/analytics/get_map_reduce_app_runs_responses.go delete mode 100644 v1/client/analytics/get_map_reduce_file_formats_parameters.go delete mode 100644 v1/client/analytics/get_map_reduce_file_formats_responses.go delete mode 100644 v1/client/analytics/get_mapper_by_id_parameters.go delete mode 100644 v1/client/analytics/get_mapper_by_id_responses.go delete mode 100644 v1/client/analytics/get_mappers_parameters.go delete mode 100644 v1/client/analytics/get_mappers_responses.go delete mode 100644 v1/client/analytics/get_reducer_by_id_parameters.go delete mode 100644 v1/client/analytics/get_reducer_by_id_responses.go delete mode 100644 v1/client/analytics/get_reducers_parameters.go delete mode 100644 v1/client/analytics/get_reducers_responses.go delete mode 100644 v1/client/analytics/get_supported_patterns_parameters.go delete mode 100644 v1/client/analytics/get_supported_patterns_responses.go delete mode 100644 v1/client/analytics/run_map_reduce_app_instance_parameters.go delete mode 100644 v1/client/analytics/run_map_reduce_app_instance_responses.go delete mode 100644 v1/client/analytics/save_pattern_parameters.go delete mode 100644 v1/client/analytics/save_pattern_responses.go delete mode 100644 v1/client/analytics/update_application_parameters.go delete mode 100644 v1/client/analytics/update_application_responses.go delete mode 100644 v1/client/analytics/update_mapper_parameters.go delete mode 100644 v1/client/analytics/update_mapper_responses.go delete mode 100644 v1/client/analytics/update_reducer_parameters.go delete mode 100644 v1/client/analytics/update_reducer_responses.go delete mode 100644 v1/client/analytics/upload_jar_parameters.go delete mode 100644 v1/client/analytics/upload_jar_responses.go delete mode 100644 v1/client/antivirus_service_group/antivirus_service_group_client.go delete mode 100644 v1/client/antivirus_service_group/antivirus_service_group_state_parameters.go delete mode 100644 v1/client/antivirus_service_group/antivirus_service_group_state_responses.go delete mode 100644 v1/client/antivirus_service_group/create_antivirus_service_group_parameters.go delete mode 100644 v1/client/antivirus_service_group/create_antivirus_service_group_responses.go delete mode 100644 v1/client/antivirus_service_group/delete_antivirus_service_group_parameters.go delete mode 100644 v1/client/antivirus_service_group/delete_antivirus_service_group_responses.go delete mode 100644 v1/client/antivirus_service_group/delete_infected_files_parameters.go delete mode 100644 v1/client/antivirus_service_group/delete_infected_files_responses.go delete mode 100644 v1/client/antivirus_service_group/get_antivirus_service_group_parameters.go delete mode 100644 v1/client/antivirus_service_group/get_antivirus_service_group_responses.go delete mode 100644 v1/client/antivirus_service_group/get_icap_connection_status_parameters.go delete mode 100644 v1/client/antivirus_service_group/get_icap_connection_status_responses.go delete mode 100644 v1/client/antivirus_service_group/get_infected_files_parameters.go delete mode 100644 v1/client/antivirus_service_group/get_infected_files_responses.go delete mode 100644 v1/client/antivirus_service_group/update_antivirus_service_group_parameters.go delete mode 100644 v1/client/antivirus_service_group/update_antivirus_service_group_responses.go delete mode 100644 v1/client/antivirus_service_group/update_infected_files_parameters.go delete mode 100644 v1/client/antivirus_service_group/update_infected_files_responses.go delete mode 100644 v1/client/app/app_client.go delete mode 100644 v1/client/app/get_apps_parameters.go delete mode 100644 v1/client/app/get_apps_responses.go delete mode 100644 v1/client/app/install_app_parameters.go delete mode 100644 v1/client/app/install_app_responses.go delete mode 100644 v1/client/app/uninstall_app_parameters.go delete mode 100644 v1/client/app/uninstall_app_responses.go delete mode 100644 v1/client/app/upload_app_parameters.go delete mode 100644 v1/client/app/upload_app_responses.go delete mode 100644 v1/client/app_instance/app_instance_client.go delete mode 100644 v1/client/app_instance/get_app_instances_parameters.go delete mode 100644 v1/client/app_instance/get_app_instances_responses.go delete mode 100644 v1/client/app_instance/launch_app_instance_parameters.go delete mode 100644 v1/client/app_instance/launch_app_instance_responses.go delete mode 100644 v1/client/app_instance/update_app_instance_settings_parameters.go delete mode 100644 v1/client/app_instance/update_app_instance_settings_responses.go delete mode 100644 v1/client/app_instance/update_app_instance_state_parameters.go delete mode 100644 v1/client/app_instance/update_app_instance_state_responses.go delete mode 100644 v1/client/athena_tokens/athena_tokens_client.go delete mode 100644 v1/client/athena_tokens/generate_athena_token_parameters.go delete mode 100644 v1/client/athena_tokens/generate_athena_token_responses.go delete mode 100644 v1/client/audit/audit_client.go delete mode 100644 v1/client/audit/get_audit_logs_actions_parameters.go delete mode 100644 v1/client/audit/get_audit_logs_actions_responses.go delete mode 100644 v1/client/audit/get_audit_logs_categories_parameters.go delete mode 100644 v1/client/audit/get_audit_logs_categories_responses.go delete mode 100644 v1/client/audit/search_cluster_audit_logs_parameters.go delete mode 100644 v1/client/audit/search_cluster_audit_logs_responses.go delete mode 100644 v1/client/backup_jobs/activate_backup_job_parameters.go delete mode 100644 v1/client/backup_jobs/activate_backup_job_responses.go delete mode 100644 v1/client/backup_jobs/backup_jobs_client.go delete mode 100644 v1/client/backup_jobs/create_backup_job_parameters.go delete mode 100644 v1/client/backup_jobs/create_backup_job_responses.go delete mode 100644 v1/client/backup_jobs/deactivate_backup_job_parameters.go delete mode 100644 v1/client/backup_jobs/deactivate_backup_job_responses.go delete mode 100644 v1/client/backup_jobs/delete_backup_job_parameters.go delete mode 100644 v1/client/backup_jobs/delete_backup_job_responses.go delete mode 100644 v1/client/backup_jobs/delete_backup_job_runs_parameters.go delete mode 100644 v1/client/backup_jobs/delete_backup_job_runs_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_job_audit_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_job_audit_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_job_by_id_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_job_by_id_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_job_history_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_job_history_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_job_runs_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_job_runs_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_jobs_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_jobs_responses.go delete mode 100644 v1/client/backup_jobs/get_backup_jobs_summary_parameters.go delete mode 100644 v1/client/backup_jobs/get_backup_jobs_summary_responses.go delete mode 100644 v1/client/backup_jobs/update_backup_job_parameters.go delete mode 100644 v1/client/backup_jobs/update_backup_job_responses.go delete mode 100644 v1/client/backup_sources/backup_sources_client.go delete mode 100644 v1/client/backup_sources/delete_app_owner_registration_parameters.go delete mode 100644 v1/client/backup_sources/delete_app_owner_registration_responses.go delete mode 100644 v1/client/backup_sources/delete_backup_source_parameters.go delete mode 100644 v1/client/backup_sources/delete_backup_source_responses.go delete mode 100644 v1/client/backup_sources/get_backup_entities_parameters.go delete mode 100644 v1/client/backup_sources/get_backup_entities_responses.go delete mode 100644 v1/client/backup_sources/get_backup_entity_by_id_parameters.go delete mode 100644 v1/client/backup_sources/get_backup_entity_by_id_responses.go delete mode 100644 v1/client/backup_sources/get_datastores_parameters.go delete mode 100644 v1/client/backup_sources/get_datastores_responses.go delete mode 100644 v1/client/backup_sources/get_network_entities_parameters.go delete mode 100644 v1/client/backup_sources/get_network_entities_responses.go delete mode 100644 v1/client/backup_sources/get_resource_pools_parameters.go delete mode 100644 v1/client/backup_sources/get_resource_pools_responses.go delete mode 100644 v1/client/backup_sources/get_virtual_machines_parameters.go delete mode 100644 v1/client/backup_sources/get_virtual_machines_responses.go delete mode 100644 v1/client/backup_sources/get_vmware_folders_parameters.go delete mode 100644 v1/client/backup_sources/get_vmware_folders_responses.go delete mode 100644 v1/client/backup_sources/list_app_entities_parameters.go delete mode 100644 v1/client/backup_sources/list_app_entities_responses.go delete mode 100644 v1/client/backup_sources/list_backup_sources_parameters.go delete mode 100644 v1/client/backup_sources/list_backup_sources_responses.go delete mode 100644 v1/client/backup_sources/list_entities_of_type_parameters.go delete mode 100644 v1/client/backup_sources/list_entities_of_type_responses.go delete mode 100644 v1/client/backup_sources/list_registered_sources_report_parameters.go delete mode 100644 v1/client/backup_sources/list_registered_sources_report_responses.go delete mode 100644 v1/client/backup_sources/register_app_owner_parameters.go delete mode 100644 v1/client/backup_sources/register_app_owner_responses.go delete mode 100644 v1/client/backup_sources/register_backup_source_parameters.go delete mode 100644 v1/client/backup_sources/register_backup_source_responses.go delete mode 100644 v1/client/backup_sources/update_app_owner_registration_parameters.go delete mode 100644 v1/client/backup_sources/update_app_owner_registration_responses.go delete mode 100644 v1/client/backup_sources/update_backup_source_access_info_parameters.go delete mode 100644 v1/client/backup_sources/update_backup_source_access_info_responses.go delete mode 100644 v1/client/banner/banner_client.go delete mode 100644 v1/client/banner/get_banner_parameters.go delete mode 100644 v1/client/banner/get_banner_responses.go delete mode 100644 v1/client/banner/update_banner_parameters.go delete mode 100644 v1/client/banner/update_banner_responses.go delete mode 100644 v1/client/certificates/certificates_client.go delete mode 100644 v1/client/certificates/delete_web_server_certificate_parameters.go delete mode 100644 v1/client/certificates/delete_web_server_certificate_responses.go delete mode 100644 v1/client/certificates/deploy_host_certificate_parameters.go delete mode 100644 v1/client/certificates/deploy_host_certificate_responses.go delete mode 100644 v1/client/certificates/get_certificate_list_parameters.go delete mode 100644 v1/client/certificates/get_certificate_list_responses.go delete mode 100644 v1/client/certificates/get_web_server_certificate_parameters.go delete mode 100644 v1/client/certificates/get_web_server_certificate_responses.go delete mode 100644 v1/client/certificates/update_web_server_certificate_parameters.go delete mode 100644 v1/client/certificates/update_web_server_certificate_responses.go delete mode 100644 v1/client/clone/clone_client.go delete mode 100644 v1/client/clone/clone_vms_parameters.go delete mode 100644 v1/client/clone/clone_vms_responses.go delete mode 100644 v1/client/clone_application/clone_app_parameters.go delete mode 100644 v1/client/clone_application/clone_app_responses.go delete mode 100644 v1/client/clone_application/clone_application_client.go delete mode 100644 v1/client/clone_refresh_tasks/clone_refresh_tasks_client.go delete mode 100644 v1/client/clone_refresh_tasks/create_clone_refresh_task_parameters.go delete mode 100644 v1/client/clone_refresh_tasks/create_clone_refresh_task_responses.go delete mode 100644 v1/client/cluster/cluster_client.go delete mode 100644 v1/client/cluster/get_app_settings_parameters.go delete mode 100644 v1/client/cluster/get_app_settings_responses.go delete mode 100644 v1/client/cluster/get_basic_cluster_info_parameters.go delete mode 100644 v1/client/cluster/get_basic_cluster_info_responses.go delete mode 100644 v1/client/cluster/get_cluster_parameters.go delete mode 100644 v1/client/cluster/get_cluster_responses.go delete mode 100644 v1/client/cluster/get_cluster_status_parameters.go delete mode 100644 v1/client/cluster/get_cluster_status_responses.go delete mode 100644 v1/client/cluster/update_app_settings_parameters.go delete mode 100644 v1/client/cluster/update_app_settings_responses.go delete mode 100644 v1/client/cluster/update_cluster_parameters.go delete mode 100644 v1/client/cluster/update_cluster_responses.go delete mode 100644 v1/client/cluster_partitions/cluster_partitions_client.go delete mode 100644 v1/client/cluster_partitions/get_cluster_partition_by_id_parameters.go delete mode 100644 v1/client/cluster_partitions/get_cluster_partition_by_id_responses.go delete mode 100644 v1/client/cluster_partitions/get_cluster_partitions_parameters.go delete mode 100644 v1/client/cluster_partitions/get_cluster_partitions_responses.go delete mode 100644 v1/client/clusters/change_service_state_parameters.go delete mode 100644 v1/client/clusters/change_service_state_responses.go delete mode 100644 v1/client/clusters/cluster_list_masters_parameters.go delete mode 100644 v1/client/clusters/cluster_list_masters_responses.go delete mode 100644 v1/client/clusters/clusters_client.go delete mode 100644 v1/client/clusters/create_cloud_cluster_parameters.go delete mode 100644 v1/client/clusters/create_cloud_cluster_responses.go delete mode 100644 v1/client/clusters/create_physical_cluster_parameters.go delete mode 100644 v1/client/clusters/create_physical_cluster_responses.go delete mode 100644 v1/client/clusters/create_virtual_cluster_parameters.go delete mode 100644 v1/client/clusters/create_virtual_cluster_responses.go delete mode 100644 v1/client/clusters/destroy_cluster_parameters.go delete mode 100644 v1/client/clusters/destroy_cluster_responses.go delete mode 100644 v1/client/clusters/download_snmp_mibs_parameters.go delete mode 100644 v1/client/clusters/download_snmp_mibs_responses.go delete mode 100644 v1/client/clusters/expand_cloud_cluster_parameters.go delete mode 100644 v1/client/clusters/expand_cloud_cluster_responses.go delete mode 100644 v1/client/clusters/expand_physical_cluster_parameters.go delete mode 100644 v1/client/clusters/expand_physical_cluster_responses.go delete mode 100644 v1/client/clusters/get_background_activity_schedule_parameters.go delete mode 100644 v1/client/clusters/get_background_activity_schedule_responses.go delete mode 100644 v1/client/clusters/get_client_subnet_whitelist_parameters.go delete mode 100644 v1/client/clusters/get_client_subnet_whitelist_responses.go delete mode 100644 v1/client/clusters/get_cluster_creation_progress_parameters.go delete mode 100644 v1/client/clusters/get_cluster_creation_progress_responses.go delete mode 100644 v1/client/clusters/get_cluster_keys_parameters.go delete mode 100644 v1/client/clusters/get_cluster_keys_responses.go delete mode 100644 v1/client/clusters/get_cluster_platforms_parameters.go delete mode 100644 v1/client/clusters/get_cluster_platforms_responses.go delete mode 100644 v1/client/clusters/get_cluster_public_key_parameters.go delete mode 100644 v1/client/clusters/get_cluster_public_key_responses.go delete mode 100644 v1/client/clusters/get_cluster_stats_parameters.go delete mode 100644 v1/client/clusters/get_cluster_stats_responses.go delete mode 100644 v1/client/clusters/get_cluster_subnets_parameters.go delete mode 100644 v1/client/clusters/get_cluster_subnets_responses.go delete mode 100644 v1/client/clusters/get_cluster_upgrade_status_parameters.go delete mode 100644 v1/client/clusters/get_cluster_upgrade_status_responses.go delete mode 100644 v1/client/clusters/get_external_client_subnets_parameters.go delete mode 100644 v1/client/clusters/get_external_client_subnets_responses.go delete mode 100644 v1/client/clusters/get_io_preferential_tier_mixin0_parameters.go delete mode 100644 v1/client/clusters/get_io_preferential_tier_mixin0_responses.go delete mode 100644 v1/client/clusters/get_io_preferential_tier_parameters.go delete mode 100644 v1/client/clusters/get_io_preferential_tier_responses.go delete mode 100644 v1/client/clusters/get_n_f_s_export_paths_parameters.go delete mode 100644 v1/client/clusters/get_n_f_s_export_paths_responses.go delete mode 100644 v1/client/clusters/get_ntp_servers_parameters.go delete mode 100644 v1/client/clusters/get_ntp_servers_responses.go delete mode 100644 v1/client/clusters/get_proxy_servers_parameters.go delete mode 100644 v1/client/clusters/get_proxy_servers_responses.go delete mode 100644 v1/client/clusters/get_service_gflag_parameters.go delete mode 100644 v1/client/clusters/get_service_gflag_responses.go delete mode 100644 v1/client/clusters/list_service_states_parameters.go delete mode 100644 v1/client/clusters/list_service_states_responses.go delete mode 100644 v1/client/clusters/put_io_preferential_tier_parameters.go delete mode 100644 v1/client/clusters/put_io_preferential_tier_responses.go delete mode 100644 v1/client/clusters/remove_node_parameters.go delete mode 100644 v1/client/clusters/remove_node_responses.go delete mode 100644 v1/client/clusters/remove_proxy_server_parameters.go delete mode 100644 v1/client/clusters/remove_proxy_server_responses.go delete mode 100644 v1/client/clusters/update_background_activity_schedule_parameters.go delete mode 100644 v1/client/clusters/update_background_activity_schedule_responses.go delete mode 100644 v1/client/clusters/update_client_subnet_whitelist_parameters.go delete mode 100644 v1/client/clusters/update_client_subnet_whitelist_responses.go delete mode 100644 v1/client/clusters/update_cluster_subnets_parameters.go delete mode 100644 v1/client/clusters/update_cluster_subnets_responses.go delete mode 100644 v1/client/clusters/update_external_client_subnets_parameters.go delete mode 100644 v1/client/clusters/update_external_client_subnets_responses.go delete mode 100644 v1/client/clusters/update_io_preferential_tier_parameters.go delete mode 100644 v1/client/clusters/update_io_preferential_tier_responses.go delete mode 100644 v1/client/clusters/update_ntp_servers_parameters.go delete mode 100644 v1/client/clusters/update_ntp_servers_responses.go delete mode 100644 v1/client/clusters/update_proxy_server_parameters.go delete mode 100644 v1/client/clusters/update_proxy_server_responses.go delete mode 100644 v1/client/clusters/update_service_flag_parameters.go delete mode 100644 v1/client/clusters/update_service_flag_responses.go delete mode 100644 v1/client/clusters/update_service_gflag_parameters.go delete mode 100644 v1/client/clusters/update_service_gflag_responses.go delete mode 100644 v1/client/clusters/upgrade_cluster_parameters.go delete mode 100644 v1/client/clusters/upgrade_cluster_responses.go delete mode 100644 v1/client/cohesity_internal_r_e_s_t_api_client.go delete mode 100644 v1/client/command/command_client.go delete mode 100644 v1/client/command/linux_command_execute_parameters.go delete mode 100644 v1/client/command/linux_command_execute_responses.go delete mode 100644 v1/client/command/linux_command_list_parameters.go delete mode 100644 v1/client/command/linux_command_list_responses.go delete mode 100644 v1/client/custom_reporting/custom_reporting_client.go delete mode 100644 v1/client/custom_reporting/get_postgres_parameters.go delete mode 100644 v1/client/custom_reporting/get_postgres_responses.go delete mode 100644 v1/client/dashboard/dashboard_client.go delete mode 100644 v1/client/dashboard/get_dashboard_parameters.go delete mode 100644 v1/client/dashboard/get_dashboard_responses.go delete mode 100644 v1/client/deploy/deploy_client.go delete mode 100644 v1/client/deploy/deploy_vms_parameters.go delete mode 100644 v1/client/deploy/deploy_vms_responses.go delete mode 100644 v1/client/destroy_clone/destroy_clone_client.go delete mode 100644 v1/client/destroy_clone/destroy_clone_task_parameters.go delete mode 100644 v1/client/destroy_clone/destroy_clone_task_responses.go delete mode 100644 v1/client/disks/disks_client.go delete mode 100644 v1/client/disks/get_disk_by_id_parameters.go delete mode 100644 v1/client/disks/get_disk_by_id_responses.go delete mode 100644 v1/client/disks/get_disk_stats_parameters.go delete mode 100644 v1/client/disks/get_disk_stats_responses.go delete mode 100644 v1/client/disks/get_disks_parameters.go delete mode 100644 v1/client/disks/get_disks_responses.go delete mode 100644 v1/client/disks/mark_disk_for_removal_parameters.go delete mode 100644 v1/client/disks/mark_disk_for_removal_responses.go delete mode 100644 v1/client/disks/update_disk_parameters.go delete mode 100644 v1/client/disks/update_disk_responses.go delete mode 100644 v1/client/disks/update_hydra_disk_reservation_parameters.go delete mode 100644 v1/client/disks/update_hydra_disk_reservation_responses.go delete mode 100644 v1/client/download_files/download_files_client.go delete mode 100644 v1/client/download_files/download_files_parameters.go delete mode 100644 v1/client/download_files/download_files_responses.go delete mode 100644 v1/client/file/file_client.go delete mode 100644 v1/client/file/get_file_restore_info_parameters.go delete mode 100644 v1/client/file/get_file_restore_info_responses.go delete mode 100644 v1/client/file/get_file_stat_parameters.go delete mode 100644 v1/client/file/get_file_stat_responses.go delete mode 100644 v1/client/file/get_file_versions_parameters.go delete mode 100644 v1/client/file/get_file_versions_responses.go delete mode 100644 v1/client/get_k_m_s_status_response/get_kms_status_parameters.go delete mode 100644 v1/client/get_k_m_s_status_response/get_kms_status_responses.go delete mode 100644 v1/client/get_k_m_s_status_response/getkms_status_response_client.go delete mode 100644 v1/client/groups/create_group_parameters.go delete mode 100644 v1/client/groups/create_group_responses.go delete mode 100644 v1/client/groups/delete_groups_parameters.go delete mode 100644 v1/client/groups/delete_groups_responses.go delete mode 100644 v1/client/groups/get_groups_parameters.go delete mode 100644 v1/client/groups/get_groups_responses.go delete mode 100644 v1/client/groups/groups_client.go delete mode 100644 v1/client/groups/update_group_parameters.go delete mode 100644 v1/client/groups/update_group_responses.go delete mode 100644 v1/client/idps/add_idp_directory_principals_parameters.go delete mode 100644 v1/client/idps/add_idp_directory_principals_responses.go delete mode 100644 v1/client/idps/create_idp_parameters.go delete mode 100644 v1/client/idps/create_idp_responses.go delete mode 100644 v1/client/idps/delete_idp_parameters.go delete mode 100644 v1/client/idps/delete_idp_responses.go delete mode 100644 v1/client/idps/get_idps_parameters.go delete mode 100644 v1/client/idps/get_idps_responses.go delete mode 100644 v1/client/idps/idp_login_parameters.go delete mode 100644 v1/client/idps/idp_login_responses.go delete mode 100644 v1/client/idps/idps_client.go delete mode 100644 v1/client/idps/update_idp_parameters.go delete mode 100644 v1/client/idps/update_idp_responses.go delete mode 100644 v1/client/interface_group/create_interface_group_parameters.go delete mode 100644 v1/client/interface_group/create_interface_group_responses.go delete mode 100644 v1/client/interface_group/delete_interface_group_parameters.go delete mode 100644 v1/client/interface_group/delete_interface_group_responses.go delete mode 100644 v1/client/interface_group/get_interface_groups_parameters.go delete mode 100644 v1/client/interface_group/get_interface_groups_responses.go delete mode 100644 v1/client/interface_group/interface_group_client.go delete mode 100644 v1/client/interface_group/update_interface_group_parameters.go delete mode 100644 v1/client/interface_group/update_interface_group_responses.go delete mode 100644 v1/client/interface_operations/interface_operations_client.go delete mode 100644 v1/client/interface_operations/list_interface_parameters.go delete mode 100644 v1/client/interface_operations/list_interface_responses.go delete mode 100644 v1/client/interface_operations/update_interface_parameters.go delete mode 100644 v1/client/interface_operations/update_interface_responses.go delete mode 100644 v1/client/ip/configure_ip_parameters.go delete mode 100644 v1/client/ip/configure_ip_responses.go delete mode 100644 v1/client/ip/ip_client.go delete mode 100644 v1/client/ip/unconfigure_ip_parameters.go delete mode 100644 v1/client/ip/unconfigure_ip_responses.go delete mode 100644 v1/client/kms_configuration/create_kms_config_parameters.go delete mode 100644 v1/client/kms_configuration/create_kms_config_responses.go delete mode 100644 v1/client/kms_configuration/delete_kms_config_parameters.go delete mode 100644 v1/client/kms_configuration/delete_kms_config_responses.go delete mode 100644 v1/client/kms_configuration/get_kms_config_parameters.go delete mode 100644 v1/client/kms_configuration/get_kms_config_responses.go delete mode 100644 v1/client/kms_configuration/kms_configuration_client.go delete mode 100644 v1/client/kms_configuration/update_kms_config_parameters.go delete mode 100644 v1/client/kms_configuration/update_kms_config_responses.go delete mode 100644 v1/client/ldap_provider/create_ldap_provider_parameters.go delete mode 100644 v1/client/ldap_provider/create_ldap_provider_responses.go delete mode 100644 v1/client/ldap_provider/delete_ldap_provider_parameters.go delete mode 100644 v1/client/ldap_provider/delete_ldap_provider_responses.go delete mode 100644 v1/client/ldap_provider/get_ldap_provider_parameters.go delete mode 100644 v1/client/ldap_provider/get_ldap_provider_responses.go delete mode 100644 v1/client/ldap_provider/get_ldap_provider_status_parameters.go delete mode 100644 v1/client/ldap_provider/get_ldap_provider_status_responses.go delete mode 100644 v1/client/ldap_provider/ldap_provider_client.go delete mode 100644 v1/client/ldap_provider/update_ldap_provider_parameters.go delete mode 100644 v1/client/ldap_provider/update_ldap_provider_responses.go delete mode 100644 v1/client/license_agreement/accept_license_parameters.go delete mode 100644 v1/client/license_agreement/accept_license_responses.go delete mode 100644 v1/client/license_agreement/license_agreement_client.go delete mode 100644 v1/client/license_agreement/update_eula_parameters.go delete mode 100644 v1/client/license_agreement/update_eula_responses.go delete mode 100644 v1/client/monitoring/get_all_job_runs_parameters.go delete mode 100644 v1/client/monitoring/get_all_job_runs_responses.go delete mode 100644 v1/client/monitoring/get_job_run_info_parameters.go delete mode 100644 v1/client/monitoring/get_job_run_info_responses.go delete mode 100644 v1/client/monitoring/get_run_objects_details_parameters.go delete mode 100644 v1/client/monitoring/get_run_objects_details_responses.go delete mode 100644 v1/client/monitoring/monitoring_client.go delete mode 100644 v1/client/network/append_hosts_parameters.go delete mode 100644 v1/client/network/append_hosts_responses.go delete mode 100644 v1/client/network/create_bond_parameters.go delete mode 100644 v1/client/network/create_bond_responses.go 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_bond_parameters.go delete mode 100644 v1/client/network/delete_bond_responses.go delete mode 100644 v1/client/network/delete_hosts_parameters.go delete mode 100644 v1/client/network/delete_hosts_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/network/edit_hosts_parameters.go delete mode 100644 v1/client/network/edit_hosts_responses.go delete mode 100644 v1/client/network/list_hosts_parameters.go delete mode 100644 v1/client/network/list_hosts_responses.go delete mode 100644 v1/client/network/network_client.go delete mode 100644 v1/client/nodes/get_node_by_id_parameters.go delete mode 100644 v1/client/nodes/get_node_by_id_responses.go delete mode 100644 v1/client/nodes/get_node_stats_parameters.go delete mode 100644 v1/client/nodes/get_node_stats_responses.go delete mode 100644 v1/client/nodes/get_node_status_parameters.go delete mode 100644 v1/client/nodes/get_node_status_responses.go delete mode 100644 v1/client/nodes/get_nodes_parameters.go delete mode 100644 v1/client/nodes/get_nodes_responses.go delete mode 100644 v1/client/nodes/list_free_nodes_parameters.go delete mode 100644 v1/client/nodes/list_free_nodes_responses.go delete mode 100644 v1/client/nodes/mark_node_for_removal_parameters.go delete mode 100644 v1/client/nodes/mark_node_for_removal_responses.go delete mode 100644 v1/client/nodes/nodes_client.go delete mode 100644 v1/client/nodes/update_node_parameters.go delete mode 100644 v1/client/nodes/update_node_responses.go delete mode 100644 v1/client/nodes/upgrade_node_parameters.go delete mode 100644 v1/client/nodes/upgrade_node_responses.go delete mode 100644 v1/client/notifications/get_notifications_parameters.go delete mode 100644 v1/client/notifications/get_notifications_responses.go delete mode 100644 v1/client/notifications/notifications_client.go delete mode 100644 v1/client/notifications/update_notifications_parameters.go delete mode 100644 v1/client/notifications/update_notifications_responses.go delete mode 100644 v1/client/packages/download_package_parameters.go delete mode 100644 v1/client/packages/download_package_responses.go delete mode 100644 v1/client/packages/list_packages_parameters.go delete mode 100644 v1/client/packages/list_packages_responses.go delete mode 100644 v1/client/packages/packages_client.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/client/passwords/password_strength_parameters.go delete mode 100644 v1/client/passwords/password_strength_responses.go delete mode 100644 v1/client/passwords/passwords_client.go delete mode 100644 v1/client/preferences/get_user_preferences_parameters.go delete mode 100644 v1/client/preferences/get_user_preferences_responses.go delete mode 100644 v1/client/preferences/patch_user_preferences_parameters.go delete mode 100644 v1/client/preferences/patch_user_preferences_responses.go delete mode 100644 v1/client/preferences/preferences_client.go delete mode 100644 v1/client/preferences/update_user_preferences_parameters.go delete mode 100644 v1/client/preferences/update_user_preferences_responses.go delete mode 100644 v1/client/principals/create_user_api_key_parameters.go delete mode 100644 v1/client/principals/create_user_api_key_responses.go delete mode 100644 v1/client/principals/create_user_parameters.go delete mode 100644 v1/client/principals/create_user_responses.go delete mode 100644 v1/client/principals/delete_user_api_key_parameters.go delete mode 100644 v1/client/principals/delete_user_api_key_responses.go delete mode 100644 v1/client/principals/delete_users_parameters.go delete mode 100644 v1/client/principals/delete_users_responses.go delete mode 100644 v1/client/principals/get_all_user_api_keys_parameters.go delete mode 100644 v1/client/principals/get_all_user_api_keys_responses.go delete mode 100644 v1/client/principals/get_session_user_parameters.go delete mode 100644 v1/client/principals/get_session_user_responses.go delete mode 100644 v1/client/principals/get_user_api_key_by_id_parameters.go delete mode 100644 v1/client/principals/get_user_api_key_by_id_responses.go delete mode 100644 v1/client/principals/get_user_api_keys_parameters.go delete mode 100644 v1/client/principals/get_user_api_keys_responses.go delete mode 100644 v1/client/principals/get_user_privileges_parameters.go delete mode 100644 v1/client/principals/get_user_privileges_responses.go delete mode 100644 v1/client/principals/get_users_parameters.go delete mode 100644 v1/client/principals/get_users_responses.go delete mode 100644 v1/client/principals/linux_support_user_bash_shell_access_parameters.go delete mode 100644 v1/client/principals/linux_support_user_bash_shell_access_responses.go delete mode 100644 v1/client/principals/linux_support_user_sudo_access_parameters.go delete mode 100644 v1/client/principals/linux_support_user_sudo_access_responses.go delete mode 100644 v1/client/principals/list_sources_for_principals_parameters.go delete mode 100644 v1/client/principals/list_sources_for_principals_responses.go delete mode 100644 v1/client/principals/principals_client.go delete mode 100644 v1/client/principals/reset_s3_secret_key_parameters.go delete mode 100644 v1/client/principals/reset_s3_secret_key_responses.go delete mode 100644 v1/client/principals/rotate_user_api_key_parameters.go delete mode 100644 v1/client/principals/rotate_user_api_key_responses.go delete mode 100644 v1/client/principals/search_principals_parameters.go delete mode 100644 v1/client/principals/search_principals_responses.go delete mode 100644 v1/client/principals/update_linux_credentials_parameters.go delete mode 100644 v1/client/principals/update_linux_credentials_responses.go delete mode 100644 v1/client/principals/update_sources_for_principals_parameters.go delete mode 100644 v1/client/principals/update_sources_for_principals_responses.go delete mode 100644 v1/client/principals/update_user_api_key_parameters.go delete mode 100644 v1/client/principals/update_user_api_key_responses.go delete mode 100644 v1/client/principals/update_user_parameters.go delete mode 100644 v1/client/principals/update_user_responses.go delete mode 100644 v1/client/principals/verify_otp_code_parameters.go delete mode 100644 v1/client/principals/verify_otp_code_responses.go delete mode 100644 v1/client/privileges/get_privileges_parameters.go delete mode 100644 v1/client/privileges/get_privileges_responses.go delete mode 100644 v1/client/privileges/privileges_client.go delete mode 100644 v1/client/protection_jobs/change_protection_job_state_parameters.go delete mode 100644 v1/client/protection_jobs/change_protection_job_state_responses.go delete mode 100644 v1/client/protection_jobs/create_protection_job_parameters.go delete mode 100644 v1/client/protection_jobs/create_protection_job_responses.go delete mode 100644 v1/client/protection_jobs/delete_protection_job_parameters.go delete mode 100644 v1/client/protection_jobs/delete_protection_job_responses.go delete mode 100644 v1/client/protection_jobs/get_protection_job_audit_parameters.go delete mode 100644 v1/client/protection_jobs/get_protection_job_audit_responses.go delete mode 100644 v1/client/protection_jobs/get_protection_job_by_id_parameters.go delete mode 100644 v1/client/protection_jobs/get_protection_job_by_id_responses.go delete mode 100644 v1/client/protection_jobs/get_protection_jobs_parameters.go delete mode 100644 v1/client/protection_jobs/get_protection_jobs_responses.go delete mode 100644 v1/client/protection_jobs/protection_jobs_client.go delete mode 100644 v1/client/protection_jobs/run_protection_job_parameters.go delete mode 100644 v1/client/protection_jobs/run_protection_job_responses.go delete mode 100644 v1/client/protection_jobs/update_protection_job_parameters.go delete mode 100644 v1/client/protection_jobs/update_protection_job_responses.go delete mode 100644 v1/client/protection_jobs/update_protection_jobs_state_parameters.go delete mode 100644 v1/client/protection_jobs/update_protection_jobs_state_responses.go delete mode 100644 v1/client/protection_objects/get_protection_object_summary_parameters.go delete mode 100644 v1/client/protection_objects/get_protection_object_summary_responses.go delete mode 100644 v1/client/protection_objects/protect_object_parameters.go delete mode 100644 v1/client/protection_objects/protect_object_responses.go delete mode 100644 v1/client/protection_objects/protection_objects_client.go delete mode 100644 v1/client/protection_objects/unprotect_object_parameters.go delete mode 100644 v1/client/protection_objects/unprotect_object_responses.go delete mode 100644 v1/client/protection_objects/update_protection_object_parameters.go delete mode 100644 v1/client/protection_objects/update_protection_object_responses.go delete mode 100644 v1/client/protection_policies/create_protection_policy_parameters.go delete mode 100644 v1/client/protection_policies/create_protection_policy_responses.go delete mode 100644 v1/client/protection_policies/delete_protection_policy_parameters.go delete mode 100644 v1/client/protection_policies/delete_protection_policy_responses.go delete mode 100644 v1/client/protection_policies/get_protection_policies_parameters.go delete mode 100644 v1/client/protection_policies/get_protection_policies_responses.go delete mode 100644 v1/client/protection_policies/get_protection_policy_by_id_parameters.go delete mode 100644 v1/client/protection_policies/get_protection_policy_by_id_responses.go delete mode 100644 v1/client/protection_policies/get_protection_policy_summary_parameters.go delete mode 100644 v1/client/protection_policies/get_protection_policy_summary_responses.go delete mode 100644 v1/client/protection_policies/protection_policies_client.go delete mode 100644 v1/client/protection_policies/update_protection_policy_parameters.go delete mode 100644 v1/client/protection_policies/update_protection_policy_responses.go delete mode 100644 v1/client/protection_runs/cancel_protection_job_run_parameters.go delete mode 100644 v1/client/protection_runs/cancel_protection_job_run_responses.go delete mode 100644 v1/client/protection_runs/get_protection_run_errors_parameters.go delete mode 100644 v1/client/protection_runs/get_protection_run_errors_responses.go delete mode 100644 v1/client/protection_runs/get_protection_runs_parameters.go delete mode 100644 v1/client/protection_runs/get_protection_runs_responses.go delete mode 100644 v1/client/protection_runs/protection_runs_client.go delete mode 100644 v1/client/protection_runs/update_protection_runs_parameters.go delete mode 100644 v1/client/protection_runs/update_protection_runs_responses.go delete mode 100644 v1/client/protection_sources/download_cft_file_parameters.go delete mode 100644 v1/client/protection_sources/download_cft_file_responses.go delete mode 100644 v1/client/protection_sources/download_physical_agent_parameters.go delete mode 100644 v1/client/protection_sources/download_physical_agent_responses.go delete mode 100644 v1/client/protection_sources/get_protection_sources_object_by_id_parameters.go delete mode 100644 v1/client/protection_sources/get_protection_sources_object_by_id_responses.go delete mode 100644 v1/client/protection_sources/get_protection_sources_objects_parameters.go delete mode 100644 v1/client/protection_sources/get_protection_sources_objects_responses.go delete mode 100644 v1/client/protection_sources/list_application_servers_parameters.go delete mode 100644 v1/client/protection_sources/list_application_servers_responses.go delete mode 100644 v1/client/protection_sources/list_data_store_information_parameters.go delete mode 100644 v1/client/protection_sources/list_data_store_information_responses.go delete mode 100644 v1/client/protection_sources/list_exchange_dag_hosts_parameters.go delete mode 100644 v1/client/protection_sources/list_exchange_dag_hosts_responses.go delete mode 100644 v1/client/protection_sources/list_protected_objects_parameters.go delete mode 100644 v1/client/protection_sources/list_protected_objects_responses.go delete mode 100644 v1/client/protection_sources/list_protection_sources_parameters.go delete mode 100644 v1/client/protection_sources/list_protection_sources_registration_info_parameters.go delete mode 100644 v1/client/protection_sources/list_protection_sources_registration_info_responses.go delete mode 100644 v1/client/protection_sources/list_protection_sources_responses.go delete mode 100644 v1/client/protection_sources/list_protection_sources_root_nodes_parameters.go delete mode 100644 v1/client/protection_sources/list_protection_sources_root_nodes_responses.go delete mode 100644 v1/client/protection_sources/list_sql_aag_hosts_and_databases_parameters.go delete mode 100644 v1/client/protection_sources/list_sql_aag_hosts_and_databases_responses.go delete mode 100644 v1/client/protection_sources/list_virtual_machines_parameters.go delete mode 100644 v1/client/protection_sources/list_virtual_machines_responses.go delete mode 100644 v1/client/protection_sources/protection_sources_client.go delete mode 100644 v1/client/protection_sources/refresh_protection_source_by_id_parameters.go delete mode 100644 v1/client/protection_sources/refresh_protection_source_by_id_responses.go delete mode 100644 v1/client/protection_sources/register_application_servers_parameters.go delete mode 100644 v1/client/protection_sources/register_application_servers_responses.go delete mode 100644 v1/client/protection_sources/register_protection_source_parameters.go delete mode 100644 v1/client/protection_sources/register_protection_source_responses.go delete mode 100644 v1/client/protection_sources/run_diagnostics_parameters.go delete mode 100644 v1/client/protection_sources/run_diagnostics_responses.go delete mode 100644 v1/client/protection_sources/unregister_application_servers_parameters.go delete mode 100644 v1/client/protection_sources/unregister_application_servers_responses.go delete mode 100644 v1/client/protection_sources/unregister_protection_source_parameters.go delete mode 100644 v1/client/protection_sources/unregister_protection_source_responses.go delete mode 100644 v1/client/protection_sources/update_application_servers_parameters.go delete mode 100644 v1/client/protection_sources/update_application_servers_responses.go delete mode 100644 v1/client/protection_sources/update_protection_source_parameters.go delete mode 100644 v1/client/protection_sources/update_protection_source_responses.go delete mode 100644 v1/client/protection_sources/upgrade_physical_agents_parameters.go delete mode 100644 v1/client/protection_sources/upgrade_physical_agents_responses.go delete mode 100644 v1/client/recover_application/recover_app_parameters.go delete mode 100644 v1/client/recover_application/recover_app_responses.go delete mode 100644 v1/client/recover_application/recover_application_client.go delete mode 100644 v1/client/remote_cluster/create_remote_cluster_parameters.go delete mode 100644 v1/client/remote_cluster/create_remote_cluster_responses.go delete mode 100644 v1/client/remote_cluster/delete_remote_cluster_parameters.go delete mode 100644 v1/client/remote_cluster/delete_remote_cluster_responses.go delete mode 100644 v1/client/remote_cluster/get_remote_cluster_by_id_parameters.go delete mode 100644 v1/client/remote_cluster/get_remote_cluster_by_id_responses.go delete mode 100644 v1/client/remote_cluster/get_remote_clusters_parameters.go delete mode 100644 v1/client/remote_cluster/get_remote_clusters_responses.go delete mode 100644 v1/client/remote_cluster/get_replication_encryption_key_parameters.go delete mode 100644 v1/client/remote_cluster/get_replication_encryption_key_responses.go delete mode 100644 v1/client/remote_cluster/remote_cluster_client.go delete mode 100644 v1/client/remote_cluster/update_remote_cluster_parameters.go delete mode 100644 v1/client/remote_cluster/update_remote_cluster_responses.go delete mode 100644 v1/client/remote_restore/create_cloud_domain_migration_request_parameters.go delete mode 100644 v1/client/remote_restore/create_cloud_domain_migration_request_responses.go delete mode 100644 v1/client/remote_restore/create_remote_vault_restore_task_parameters.go delete mode 100644 v1/client/remote_restore/create_remote_vault_restore_task_responses.go delete mode 100644 v1/client/remote_restore/create_remote_vault_search_job_parameters.go delete mode 100644 v1/client/remote_restore/create_remote_vault_search_job_responses.go delete mode 100644 v1/client/remote_restore/get_remote_vault_search_job_results_parameters.go delete mode 100644 v1/client/remote_restore/get_remote_vault_search_job_results_responses.go delete mode 100644 v1/client/remote_restore/list_cloud_domain_migration_parameters.go delete mode 100644 v1/client/remote_restore/list_cloud_domain_migration_responses.go delete mode 100644 v1/client/remote_restore/list_remote_vault_restore_tasks_parameters.go delete mode 100644 v1/client/remote_restore/list_remote_vault_restore_tasks_responses.go delete mode 100644 v1/client/remote_restore/list_remote_vault_search_job_by_id_parameters.go delete mode 100644 v1/client/remote_restore/list_remote_vault_search_job_by_id_responses.go delete mode 100644 v1/client/remote_restore/list_remote_vault_search_jobs_parameters.go delete mode 100644 v1/client/remote_restore/list_remote_vault_search_jobs_responses.go delete mode 100644 v1/client/remote_restore/remote_restore_client.go delete mode 100644 v1/client/remote_restore/stop_remote_vault_search_job_parameters.go delete mode 100644 v1/client/remote_restore/stop_remote_vault_search_job_responses.go delete mode 100644 v1/client/remote_restore/upload_vault_encryption_keys_parameters.go delete mode 100644 v1/client/remote_restore/upload_vault_encryption_keys_responses.go delete mode 100644 v1/client/reports/get_agent_deployment_report_parameters.go delete mode 100644 v1/client/reports/get_agent_deployment_report_responses.go delete mode 100644 v1/client/reports/get_cloud_archive_report_request_parameters.go delete mode 100644 v1/client/reports/get_cloud_archive_report_request_responses.go delete mode 100644 v1/client/reports/get_data_transfer_from_vaults_report_request_parameters.go delete mode 100644 v1/client/reports/get_data_transfer_from_vaults_report_request_responses.go delete mode 100644 v1/client/reports/get_data_transfer_to_vaults_report_request_parameters.go delete mode 100644 v1/client/reports/get_data_transfer_to_vaults_report_request_responses.go delete mode 100644 v1/client/reports/get_gdpr_report_parameters.go delete mode 100644 v1/client/reports/get_gdpr_report_responses.go delete mode 100644 v1/client/reports/get_protected_objects_trends_report_request_parameters.go delete mode 100644 v1/client/reports/get_protected_objects_trends_report_request_responses.go delete mode 100644 v1/client/reports/get_protection_sources_job_runs_report_request_parameters.go delete mode 100644 v1/client/reports/get_protection_sources_job_runs_report_request_responses.go delete mode 100644 v1/client/reports/get_protection_sources_jobs_summary_report_request_parameters.go delete mode 100644 v1/client/reports/get_protection_sources_jobs_summary_report_request_responses.go delete mode 100644 v1/client/reports/reports_client.go delete mode 100644 v1/client/restore/recover_vms_parameters.go delete mode 100644 v1/client/restore/recover_vms_responses.go delete mode 100644 v1/client/restore/restore_client.go delete mode 100644 v1/client/restore_app/check_restore_app_task_parameters.go delete mode 100644 v1/client/restore_app/check_restore_app_task_responses.go delete mode 100644 v1/client/restore_app/get_restore_app_time_ranges_parameters.go delete mode 100644 v1/client/restore_app/get_restore_app_time_ranges_responses.go delete mode 100644 v1/client/restore_app/restore_app_client.go delete mode 100644 v1/client/restore_files/restore_files_client.go delete mode 100644 v1/client/restore_files/restore_files_parameters.go delete mode 100644 v1/client/restore_files/restore_files_responses.go delete mode 100644 v1/client/restore_tasks/ad_objects_restore_status_parameters.go delete mode 100644 v1/client/restore_tasks/ad_objects_restore_status_responses.go delete mode 100644 v1/client/restore_tasks/cancel_restore_task_parameters.go delete mode 100644 v1/client/restore_tasks/cancel_restore_task_responses.go delete mode 100644 v1/client/restore_tasks/compare_ad_objects_parameters.go delete mode 100644 v1/client/restore_tasks/compare_ad_objects_responses.go delete mode 100644 v1/client/restore_tasks/create_applications_clone_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_applications_clone_task_responses.go delete mode 100644 v1/client/restore_tasks/create_applications_recover_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_applications_recover_task_responses.go delete mode 100644 v1/client/restore_tasks/create_clone_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_clone_task_responses.go delete mode 100644 v1/client/restore_tasks/create_deploy_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_deploy_task_responses.go delete mode 100644 v1/client/restore_tasks/create_download_files_and_folders_parameters.go delete mode 100644 v1/client/restore_tasks/create_download_files_and_folders_responses.go delete mode 100644 v1/client/restore_tasks/create_recover_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_recover_task_responses.go delete mode 100644 v1/client/restore_tasks/create_restore_files_task_parameters.go delete mode 100644 v1/client/restore_tasks/create_restore_files_task_responses.go delete mode 100644 v1/client/restore_tasks/get_ad_domain_root_topology_parameters.go delete mode 100644 v1/client/restore_tasks/get_ad_domain_root_topology_responses.go delete mode 100644 v1/client/restore_tasks/get_ad_objects_parameters.go delete mode 100644 v1/client/restore_tasks/get_ad_objects_responses.go delete mode 100644 v1/client/restore_tasks/get_file_fstat_information_parameters.go delete mode 100644 v1/client/restore_tasks/get_file_fstat_information_responses.go delete mode 100644 v1/client/restore_tasks/get_file_snapshots_information_parameters.go delete mode 100644 v1/client/restore_tasks/get_file_snapshots_information_responses.go delete mode 100644 v1/client/restore_tasks/get_one_drive_documents_parameters.go delete mode 100644 v1/client/restore_tasks/get_one_drive_documents_responses.go delete mode 100644 v1/client/restore_tasks/get_outlook_emails_parameters.go delete mode 100644 v1/client/restore_tasks/get_outlook_emails_responses.go delete mode 100644 v1/client/restore_tasks/get_restore_job_by_id_parameters.go delete mode 100644 v1/client/restore_tasks/get_restore_job_by_id_responses.go delete mode 100644 v1/client/restore_tasks/get_restore_jobs_parameters.go delete mode 100644 v1/client/restore_tasks/get_restore_jobs_responses.go delete mode 100644 v1/client/restore_tasks/get_restore_points_for_time_range_parameters.go delete mode 100644 v1/client/restore_tasks/get_restore_points_for_time_range_responses.go delete mode 100644 v1/client/restore_tasks/get_restore_task_by_id_parameters.go delete mode 100644 v1/client/restore_tasks/get_restore_task_by_id_responses.go delete mode 100644 v1/client/restore_tasks/get_restore_tasks_parameters.go delete mode 100644 v1/client/restore_tasks/get_restore_tasks_responses.go delete mode 100644 v1/client/restore_tasks/get_sharepoint_documents_parameters.go delete mode 100644 v1/client/restore_tasks/get_sharepoint_documents_responses.go delete mode 100644 v1/client/restore_tasks/get_virtual_disk_information_parameters.go delete mode 100644 v1/client/restore_tasks/get_virtual_disk_information_responses.go delete mode 100644 v1/client/restore_tasks/get_vm_directory_list_parameters.go delete mode 100644 v1/client/restore_tasks/get_vm_directory_list_responses.go delete mode 100644 v1/client/restore_tasks/get_vm_volumes_information_parameters.go delete mode 100644 v1/client/restore_tasks/get_vm_volumes_information_responses.go delete mode 100644 v1/client/restore_tasks/list_org_vdc_networks_parameters.go delete mode 100644 v1/client/restore_tasks/list_org_vdc_networks_responses.go delete mode 100644 v1/client/restore_tasks/list_storage_profiles_parameters.go delete mode 100644 v1/client/restore_tasks/list_storage_profiles_responses.go delete mode 100644 v1/client/restore_tasks/public_destroy_clone_task_parameters.go delete mode 100644 v1/client/restore_tasks/public_destroy_clone_task_responses.go delete mode 100644 v1/client/restore_tasks/restore_tasks_client.go delete mode 100644 v1/client/restore_tasks/search_ad_objects_parameters.go delete mode 100644 v1/client/restore_tasks/search_ad_objects_responses.go delete mode 100644 v1/client/restore_tasks/search_objects_parameters.go delete mode 100644 v1/client/restore_tasks/search_objects_responses.go delete mode 100644 v1/client/restore_tasks/search_production_ad_objects_parameters.go delete mode 100644 v1/client/restore_tasks/search_production_ad_objects_responses.go delete mode 100644 v1/client/restore_tasks/search_restored_files_parameters.go delete mode 100644 v1/client/restore_tasks/search_restored_files_responses.go delete mode 100644 v1/client/restore_tasks/update_restore_task_parameters.go delete mode 100644 v1/client/restore_tasks/update_restore_task_responses.go delete mode 100644 v1/client/roles/create_role_parameters.go delete mode 100644 v1/client/roles/create_role_responses.go delete mode 100644 v1/client/roles/delete_roles_parameters.go delete mode 100644 v1/client/roles/delete_roles_responses.go delete mode 100644 v1/client/roles/get_roles_parameters.go delete mode 100644 v1/client/roles/get_roles_responses.go delete mode 100644 v1/client/roles/roles_client.go delete mode 100644 v1/client/roles/update_role_parameters.go delete mode 100644 v1/client/roles/update_role_responses.go delete mode 100644 v1/client/routes/add_route_parameters.go delete mode 100644 v1/client/routes/add_route_responses.go delete mode 100644 v1/client/routes/delete_route_parameters.go delete mode 100644 v1/client/routes/delete_route_responses.go delete mode 100644 v1/client/routes/get_routes_parameters.go delete mode 100644 v1/client/routes/get_routes_responses.go delete mode 100644 v1/client/routes/routes_client.go delete mode 100644 v1/client/s_m_b_file_opens/close_smb_file_open_parameters.go delete mode 100644 v1/client/s_m_b_file_opens/close_smb_file_open_responses.go delete mode 100644 v1/client/s_m_b_file_opens/get_smb_file_opens_parameters.go delete mode 100644 v1/client/s_m_b_file_opens/get_smb_file_opens_responses.go delete mode 100644 v1/client/s_m_b_file_opens/smb_file_opens_client.go delete mode 100644 v1/client/scheduler/create_scheduler_job_parameters.go delete mode 100644 v1/client/scheduler/create_scheduler_job_responses.go delete mode 100644 v1/client/scheduler/delete_scheduler_jobs_parameters.go delete mode 100644 v1/client/scheduler/delete_scheduler_jobs_responses.go delete mode 100644 v1/client/scheduler/get_scheduler_jobs_parameters.go delete mode 100644 v1/client/scheduler/get_scheduler_jobs_responses.go delete mode 100644 v1/client/scheduler/scheduler_client.go delete mode 100644 v1/client/scheduler/update_scheduler_job_parameters.go delete mode 100644 v1/client/scheduler/update_scheduler_job_responses.go delete mode 100644 v1/client/search/search_client.go delete mode 100644 v1/client/search/search_protection_runs_parameters.go delete mode 100644 v1/client/search/search_protection_runs_responses.go delete mode 100644 v1/client/search/search_protection_sources_parameters.go delete mode 100644 v1/client/search/search_protection_sources_responses.go delete mode 100644 v1/client/search_files/search_files_client.go delete mode 100644 v1/client/search_files/search_files_parameters.go delete mode 100644 v1/client/search_files/search_files_responses.go delete mode 100644 v1/client/search_vms/search_vms_client.go delete mode 100644 v1/client/search_vms/search_vms_parameters.go delete mode 100644 v1/client/search_vms/search_vms_responses.go delete mode 100644 v1/client/snmp/get_snmp_config_parameters.go delete mode 100644 v1/client/snmp/get_snmp_config_responses.go delete mode 100644 v1/client/snmp/snmp_client.go delete mode 100644 v1/client/snmp/update_snmp_config_parameters.go delete mode 100644 v1/client/snmp/update_snmp_config_responses.go delete mode 100644 v1/client/statistics/get_entities_parameters.go delete mode 100644 v1/client/statistics/get_entities_responses.go delete mode 100644 v1/client/statistics/get_entities_schema_parameters.go delete mode 100644 v1/client/statistics/get_entities_schema_responses.go delete mode 100644 v1/client/statistics/get_entity_schema_by_name_parameters.go delete mode 100644 v1/client/statistics/get_entity_schema_by_name_responses.go delete mode 100644 v1/client/statistics/get_file_downloads_counter_parameters.go delete mode 100644 v1/client/statistics/get_file_downloads_counter_responses.go delete mode 100644 v1/client/statistics/get_progress_monitor_by_path_parameters.go delete mode 100644 v1/client/statistics/get_progress_monitor_by_path_responses.go delete mode 100644 v1/client/statistics/get_progress_monitors_parameters.go delete mode 100644 v1/client/statistics/get_progress_monitors_responses.go delete mode 100644 v1/client/statistics/get_tasks_parameters.go delete mode 100644 v1/client/statistics/get_tasks_responses.go delete mode 100644 v1/client/statistics/get_time_series_schema_parameters.go delete mode 100644 v1/client/statistics/get_time_series_schema_responses.go delete mode 100644 v1/client/statistics/get_time_series_stats_parameters.go delete mode 100644 v1/client/statistics/get_time_series_stats_responses.go delete mode 100644 v1/client/statistics/statistics_client.go delete mode 100644 v1/client/stats/get_active_alerts_stats_parameters.go delete mode 100644 v1/client/stats/get_active_alerts_stats_responses.go delete mode 100644 v1/client/stats/get_consumer_stats_parameters.go delete mode 100644 v1/client/stats/get_consumer_stats_responses.go delete mode 100644 v1/client/stats/get_file_distribution_stats_parameters.go delete mode 100644 v1/client/stats/get_file_distribution_stats_responses.go delete mode 100644 v1/client/stats/get_last_protection_run_stats_parameters.go delete mode 100644 v1/client/stats/get_last_protection_run_stats_responses.go delete mode 100644 v1/client/stats/get_protected_objects_summary_parameters.go delete mode 100644 v1/client/stats/get_protected_objects_summary_responses.go delete mode 100644 v1/client/stats/get_protection_runs_stats_parameters.go delete mode 100644 v1/client/stats/get_protection_runs_stats_responses.go delete mode 100644 v1/client/stats/get_restore_stats_parameters.go delete mode 100644 v1/client/stats/get_restore_stats_responses.go delete mode 100644 v1/client/stats/get_storage_stats_parameters.go delete mode 100644 v1/client/stats/get_storage_stats_responses.go delete mode 100644 v1/client/stats/get_tenant_stats_parameters.go delete mode 100644 v1/client/stats/get_tenant_stats_responses.go delete mode 100644 v1/client/stats/get_vault_provider_stats_parameters.go delete mode 100644 v1/client/stats/get_vault_provider_stats_responses.go delete mode 100644 v1/client/stats/get_vault_run_stats_parameters.go delete mode 100644 v1/client/stats/get_vault_run_stats_responses.go delete mode 100644 v1/client/stats/get_vault_stats_parameters.go delete mode 100644 v1/client/stats/get_vault_stats_responses.go delete mode 100644 v1/client/stats/get_view_box_stats_parameters.go delete mode 100644 v1/client/stats/get_view_box_stats_responses.go delete mode 100644 v1/client/stats/get_view_protocol_stats_parameters.go delete mode 100644 v1/client/stats/get_view_protocol_stats_responses.go delete mode 100644 v1/client/stats/get_view_stats_parameters.go delete mode 100644 v1/client/stats/get_view_stats_responses.go delete mode 100644 v1/client/stats/stats_client.go delete mode 100644 v1/client/tags/apply_tags_parameters.go delete mode 100644 v1/client/tags/apply_tags_responses.go delete mode 100644 v1/client/tags/remove_tags_parameters.go delete mode 100644 v1/client/tags/remove_tags_responses.go delete mode 100644 v1/client/tags/tags_client.go delete mode 100644 v1/client/tenant/create_tenant_parameters.go delete mode 100644 v1/client/tenant/create_tenant_responses.go delete mode 100644 v1/client/tenant/delete_tenant_parameters.go delete mode 100644 v1/client/tenant/delete_tenant_responses.go delete mode 100644 v1/client/tenant/download_tenants_proxy_parameters.go delete mode 100644 v1/client/tenant/download_tenants_proxy_responses.go delete mode 100644 v1/client/tenant/get_tenants_parameters.go delete mode 100644 v1/client/tenant/get_tenants_proxies_parameters.go delete mode 100644 v1/client/tenant/get_tenants_proxies_responses.go delete mode 100644 v1/client/tenant/get_tenants_proxy_config_parameters.go delete mode 100644 v1/client/tenant/get_tenants_proxy_config_responses.go delete mode 100644 v1/client/tenant/get_tenants_responses.go delete mode 100644 v1/client/tenant/tenant_client.go delete mode 100644 v1/client/tenant/update_tenant_active_directory_parameters.go delete mode 100644 v1/client/tenant/update_tenant_active_directory_responses.go delete mode 100644 v1/client/tenant/update_tenant_entity_parameters.go delete mode 100644 v1/client/tenant/update_tenant_entity_responses.go delete mode 100644 v1/client/tenant/update_tenant_groups_parameters.go delete mode 100644 v1/client/tenant/update_tenant_groups_responses.go delete mode 100644 v1/client/tenant/update_tenant_ldap_provider_parameters.go delete mode 100644 v1/client/tenant/update_tenant_ldap_provider_responses.go delete mode 100644 v1/client/tenant/update_tenant_parameters.go delete mode 100644 v1/client/tenant/update_tenant_protection_job_parameters.go delete mode 100644 v1/client/tenant/update_tenant_protection_job_responses.go delete mode 100644 v1/client/tenant/update_tenant_protection_policy_parameters.go delete mode 100644 v1/client/tenant/update_tenant_protection_policy_responses.go delete mode 100644 v1/client/tenant/update_tenant_responses.go delete mode 100644 v1/client/tenant/update_tenant_users_parameters.go delete mode 100644 v1/client/tenant/update_tenant_users_responses.go delete mode 100644 v1/client/tenant/update_tenant_view_box_parameters.go delete mode 100644 v1/client/tenant/update_tenant_view_box_responses.go delete mode 100644 v1/client/tenant/update_tenant_view_parameters.go delete mode 100644 v1/client/tenant/update_tenant_view_responses.go delete mode 100644 v1/client/tenant/update_tenant_vlan_parameters.go delete mode 100644 v1/client/tenant/update_tenant_vlan_responses.go delete mode 100644 v1/client/vaults/create_vault_parameters.go delete mode 100644 v1/client/vaults/create_vault_responses.go delete mode 100644 v1/client/vaults/delete_vault_parameters.go delete mode 100644 v1/client/vaults/delete_vault_responses.go delete mode 100644 v1/client/vaults/get_archive_media_info_parameters.go delete mode 100644 v1/client/vaults/get_archive_media_info_responses.go delete mode 100644 v1/client/vaults/get_bandwidth_settings_parameters.go delete mode 100644 v1/client/vaults/get_bandwidth_settings_responses.go delete mode 100644 v1/client/vaults/get_vault_by_id_parameters.go delete mode 100644 v1/client/vaults/get_vault_by_id_responses.go delete mode 100644 v1/client/vaults/get_vault_encryption_key_parameters.go delete mode 100644 v1/client/vaults/get_vault_encryption_key_responses.go delete mode 100644 v1/client/vaults/get_vaults_parameters.go delete mode 100644 v1/client/vaults/get_vaults_responses.go delete mode 100644 v1/client/vaults/update_bandwidth_settings_parameters.go delete mode 100644 v1/client/vaults/update_bandwidth_settings_responses.go delete mode 100644 v1/client/vaults/update_vault_parameters.go delete mode 100644 v1/client/vaults/update_vault_responses.go delete mode 100644 v1/client/vaults/vaults_client.go delete mode 100644 v1/client/view_boxes/create_view_box_parameters.go delete mode 100644 v1/client/view_boxes/create_view_box_responses.go delete mode 100644 v1/client/view_boxes/delete_view_box_parameters.go delete mode 100644 v1/client/view_boxes/delete_view_box_responses.go delete mode 100644 v1/client/view_boxes/get_view_box_by_id_parameters.go delete mode 100644 v1/client/view_boxes/get_view_box_by_id_responses.go delete mode 100644 v1/client/view_boxes/get_view_boxes_parameters.go delete mode 100644 v1/client/view_boxes/get_view_boxes_responses.go delete mode 100644 v1/client/view_boxes/update_view_box_parameters.go delete mode 100644 v1/client/view_boxes/update_view_box_responses.go delete mode 100644 v1/client/view_boxes/view_boxes_client.go delete mode 100644 v1/client/views/activate_view_aliases_parameters.go delete mode 100644 v1/client/views/activate_view_aliases_responses.go delete mode 100644 v1/client/views/clear_nlm_locks_parameters.go delete mode 100644 v1/client/views/clear_nlm_locks_responses.go delete mode 100644 v1/client/views/clone_directory_parameters.go delete mode 100644 v1/client/views/clone_directory_responses.go delete mode 100644 v1/client/views/clone_view_parameters.go delete mode 100644 v1/client/views/clone_view_responses.go delete mode 100644 v1/client/views/create_view_alias_parameters.go delete mode 100644 v1/client/views/create_view_alias_responses.go delete mode 100644 v1/client/views/create_view_parameters.go delete mode 100644 v1/client/views/create_view_responses.go delete mode 100644 v1/client/views/create_view_user_quota_parameters.go delete mode 100644 v1/client/views/create_view_user_quota_responses.go delete mode 100644 v1/client/views/delete_view_alias_parameters.go delete mode 100644 v1/client/views/delete_view_alias_responses.go delete mode 100644 v1/client/views/delete_view_by_id_parameters.go delete mode 100644 v1/client/views/delete_view_by_id_responses.go delete mode 100644 v1/client/views/delete_view_parameters.go delete mode 100644 v1/client/views/delete_view_responses.go delete mode 100644 v1/client/views/delete_view_users_quota_parameters.go delete mode 100644 v1/client/views/delete_view_users_quota_responses.go delete mode 100644 v1/client/views/get_file_lock_status_by_id_parameters.go delete mode 100644 v1/client/views/get_file_lock_status_by_id_responses.go delete mode 100644 v1/client/views/get_file_lock_status_parameters.go delete mode 100644 v1/client/views/get_file_lock_status_responses.go delete mode 100644 v1/client/views/get_nfs_connections_parameters.go delete mode 100644 v1/client/views/get_nfs_connections_responses.go delete mode 100644 v1/client/views/get_qo_s_policies_parameters.go delete mode 100644 v1/client/views/get_qo_s_policies_responses.go delete mode 100644 v1/client/views/get_smb_connections_parameters.go delete mode 100644 v1/client/views/get_smb_connections_responses.go delete mode 100644 v1/client/views/get_view_by_id_parameters.go delete mode 100644 v1/client/views/get_view_by_id_responses.go delete mode 100644 v1/client/views/get_view_by_name_parameters.go delete mode 100644 v1/client/views/get_view_by_name_responses.go delete mode 100644 v1/client/views/get_view_dir_quota_info_parameters.go delete mode 100644 v1/client/views/get_view_dir_quota_info_responses.go delete mode 100644 v1/client/views/get_view_user_quotas_parameters.go delete mode 100644 v1/client/views/get_view_user_quotas_responses.go delete mode 100644 v1/client/views/get_views_by_share_name_parameters.go delete mode 100644 v1/client/views/get_views_by_share_name_responses.go delete mode 100644 v1/client/views/get_views_parameters.go delete mode 100644 v1/client/views/get_views_responses.go delete mode 100644 v1/client/views/list_nlm_locks_parameters.go delete mode 100644 v1/client/views/list_nlm_locks_responses.go delete mode 100644 v1/client/views/lock_file_by_id_parameters.go delete mode 100644 v1/client/views/lock_file_by_id_responses.go delete mode 100644 v1/client/views/lock_file_parameters.go delete mode 100644 v1/client/views/lock_file_responses.go delete mode 100644 v1/client/views/overwrite_view_parameters.go delete mode 100644 v1/client/views/overwrite_view_responses.go delete mode 100644 v1/client/views/rename_view_by_id_parameters.go delete mode 100644 v1/client/views/rename_view_by_id_responses.go delete mode 100644 v1/client/views/rename_view_parameters.go delete mode 100644 v1/client/views/rename_view_responses.go delete mode 100644 v1/client/views/update_user_quota_settings_parameters.go delete mode 100644 v1/client/views/update_user_quota_settings_responses.go delete mode 100644 v1/client/views/update_view_alias_parameters.go delete mode 100644 v1/client/views/update_view_alias_responses.go delete mode 100644 v1/client/views/update_view_by_name_parameters.go delete mode 100644 v1/client/views/update_view_by_name_responses.go delete mode 100644 v1/client/views/update_view_dir_quota_parameters.go delete mode 100644 v1/client/views/update_view_dir_quota_responses.go delete mode 100644 v1/client/views/update_view_parameters.go delete mode 100644 v1/client/views/update_view_responses.go delete mode 100644 v1/client/views/update_view_user_quota_parameters.go delete mode 100644 v1/client/views/update_view_user_quota_responses.go delete mode 100644 v1/client/views/views_client.go delete mode 100644 v1/client/vlan/create_bifrost_vlan_parameters.go delete mode 100644 v1/client/vlan/create_bifrost_vlan_responses.go delete mode 100644 v1/client/vlan/create_vlan_parameters.go delete mode 100644 v1/client/vlan/create_vlan_responses.go delete mode 100644 v1/client/vlan/get_bifrost_tenant_vlans_parameters.go delete mode 100644 v1/client/vlan/get_bifrost_tenant_vlans_responses.go delete mode 100644 v1/client/vlan/get_vlan_by_id_parameters.go delete mode 100644 v1/client/vlan/get_vlan_by_id_responses.go delete mode 100644 v1/client/vlan/get_vlans_parameters.go delete mode 100644 v1/client/vlan/get_vlans_responses.go delete mode 100644 v1/client/vlan/remove_vlan_parameters.go delete mode 100644 v1/client/vlan/remove_vlan_responses.go delete mode 100644 v1/client/vlan/update_vlan_parameters.go delete mode 100644 v1/client/vlan/update_vlan_responses.go delete mode 100644 v1/client/vlan/vlan_client.go delete mode 100644 v1/client/vm/get_vm_volume_info_parameters.go delete mode 100644 v1/client/vm/get_vm_volume_info_responses.go delete mode 100644 v1/client/vm/read_dir_parameters.go delete mode 100644 v1/client/vm/read_dir_responses.go delete mode 100644 v1/client/vm/vm_client.go delete mode 100644 v1/models/a_a_g_database_copy_info.go delete mode 100644 v1/models/a_a_g_db_info.go delete mode 100644 v1/models/a_a_g_info.go delete mode 100644 v1/models/a_a_g_replica_info.go delete mode 100644 v1/models/a_a_g_replica_info_db_info.go delete mode 100644 v1/models/a_d_attribute_restore_param.go delete mode 100644 v1/models/a_d_database_info.go delete mode 100644 v1/models/a_d_domain.go delete mode 100644 v1/models/a_d_domain_controller.go delete mode 100644 v1/models/a_d_domain_identity.go delete mode 100644 v1/models/a_d_guid_pair.go delete mode 100644 v1/models/a_d_object.go delete mode 100644 v1/models/a_d_object_restore_param.go delete mode 100644 v1/models/a_d_object_restore_status.go delete mode 100644 v1/models/a_d_object_restore_status_a_d_attribute_restore_status.go delete mode 100644 v1/models/a_d_restore_status.go delete mode 100644 v1/models/a_d_sysvol_info.go delete mode 100644 v1/models/a_d_update_restore_task_options.go delete mode 100644 v1/models/a_d_user_info.go delete mode 100644 v1/models/a_m_q_p_target_config.go delete mode 100644 v1/models/a_w_s_fleet_params.go delete mode 100644 v1/models/a_w_s_fleet_params_network_params.go delete mode 100644 v1/models/a_w_s_fleet_params_network_params_map_entry.go delete mode 100644 v1/models/a_w_s_fleet_params_tag.go delete mode 100644 v1/models/a_w_s_native_backup_source_params.go delete mode 100644 v1/models/a_w_s_native_env_params.go delete mode 100644 v1/models/a_w_s_snapshot_manager_backup_source_params.go delete mode 100644 v1/models/a_w_s_snapshot_manager_params.go delete mode 100644 v1/models/aag_and_databases.go delete mode 100644 v1/models/abort_incomplete_multipart_upload_action.go delete mode 100644 v1/models/access_token.go delete mode 100644 v1/models/access_token_credential.go delete mode 100644 v1/models/acl_proto.go delete mode 100644 v1/models/acl_proto_grant.go delete mode 100644 v1/models/acropolis_backup_job_params.go delete mode 100644 v1/models/acropolis_backup_params.go delete mode 100644 v1/models/acropolis_backup_source_params.go delete mode 100644 v1/models/acropolis_disk_filter_proto.go delete mode 100644 v1/models/acropolis_protection_source.go delete mode 100644 v1/models/acropolis_restore_parameters.go delete mode 100644 v1/models/activate_view_aliases_result.go delete mode 100644 v1/models/active_alerts_stats.go delete mode 100644 v1/models/active_directory_entry.go delete mode 100644 v1/models/active_directory_principal.go delete mode 100644 v1/models/active_directory_principals_add_parameters.go delete mode 100644 v1/models/ad_attribute.go delete mode 100644 v1/models/ad_domain.go delete mode 100644 v1/models/ad_domain_controller.go delete mode 100644 v1/models/ad_domain_identity.go delete mode 100644 v1/models/ad_object_attribute_parameters.go delete mode 100644 v1/models/ad_object_meta_data.go delete mode 100644 v1/models/ad_object_restore_information.go delete mode 100644 v1/models/ad_object_restore_parameters.go delete mode 100644 v1/models/ad_objects_restore_status.go delete mode 100644 v1/models/ad_protection_source.go delete mode 100644 v1/models/ad_restore_options.go delete mode 100644 v1/models/ad_restore_parameters.go delete mode 100644 v1/models/ad_root_topology_object.go delete mode 100644 v1/models/adapter_specific_flags_proto.go delete mode 100644 v1/models/add_snapshot_arg_extended_information.go delete mode 100644 v1/models/add_snapshot_arg_extended_information_record_stats.go delete mode 100644 v1/models/add_snapshot_arg_extended_information_uda_add_snapshot_arg.go delete mode 100644 v1/models/add_snapshot_arg_key_value_pair.go delete mode 100644 v1/models/added_active_directory_principal.go delete mode 100644 v1/models/added_idp_principal.go delete mode 100644 v1/models/additional_connector_params.go delete mode 100644 v1/models/additional_entity_info.go delete mode 100644 v1/models/additional_oracle_d_b_params.go delete mode 100644 v1/models/additional_run_info.go delete mode 100644 v1/models/advanced_settings.go delete mode 100644 v1/models/agent_certificate_information.go delete mode 100644 v1/models/agent_deployment_status_response.go delete mode 100644 v1/models/agent_info_proto_installed_subcomponent_version.go delete mode 100644 v1/models/agent_information.go delete mode 100644 v1/models/agent_upgrade_task_info.go delete mode 100644 v1/models/aggregated_subtree_info.go delete mode 100644 v1/models/airgap_config.go delete mode 100644 v1/models/alert.go delete mode 100644 v1/models/alert_category_name.go delete mode 100644 v1/models/alert_document.go delete mode 100644 v1/models/alert_metadata.go delete mode 100644 v1/models/alert_property.go delete mode 100644 v1/models/alert_resolution.go delete mode 100644 v1/models/alert_resolution_details.go delete mode 100644 v1/models/alert_resolution_info.go delete mode 100644 v1/models/alert_resolution_request.go delete mode 100644 v1/models/alert_vault_info.go delete mode 100644 v1/models/alerting_config.go delete mode 100644 v1/models/alerting_policy_proto.go delete mode 100644 v1/models/amazon_cloud_credentials.go delete mode 100644 v1/models/analyse_jar_arg.go delete mode 100644 v1/models/analyse_jar_result.go delete mode 100644 v1/models/analysis_run_once_params.go delete mode 100644 v1/models/analysis_task_info.go delete mode 100644 v1/models/antivirus_scan_config.go delete mode 100644 v1/models/antivirus_service_config.go delete mode 100644 v1/models/antivirus_service_config_params.go delete mode 100644 v1/models/antivirus_service_group.go delete mode 100644 v1/models/antivirus_service_group_params.go delete mode 100644 v1/models/antivirus_service_group_state_params.go delete mode 100644 v1/models/api_key.go delete mode 100644 v1/models/api_request_attr.go delete mode 100644 v1/models/api_version.go delete mode 100644 v1/models/app.go delete mode 100644 v1/models/app_credentials.go delete mode 100644 v1/models/app_entity_backup_status_info.go delete mode 100644 v1/models/app_info.go delete mode 100644 v1/models/app_instance.go delete mode 100644 v1/models/app_instance_id_parameter.go delete mode 100644 v1/models/app_instance_settings.go delete mode 100644 v1/models/app_metadata.go delete mode 100644 v1/models/app_owner_restore_info.go delete mode 100644 v1/models/app_run_history.go delete mode 100644 v1/models/append_hosts_parameters.go delete mode 100644 v1/models/application_info.go delete mode 100644 v1/models/application_parameters.go delete mode 100644 v1/models/application_restore_object.go delete mode 100644 v1/models/application_restore_parameters.go delete mode 100644 v1/models/application_server_info.go delete mode 100644 v1/models/application_special_parameters.go delete mode 100644 v1/models/applications_restore_task_request.go delete mode 100644 v1/models/applications_wrapper.go delete mode 100644 v1/models/apps_config.go delete mode 100644 v1/models/archival_external_target.go delete mode 100644 v1/models/archival_info_base.go delete mode 100644 v1/models/archival_info_base_entity_string_id_to_front_end_size_info_map_entry.go delete mode 100644 v1/models/archival_target.go delete mode 100644 v1/models/archive_w_o_r_m_properties.go delete mode 100644 v1/models/array_info.go delete mode 100644 v1/models/athena_token.go delete mode 100644 v1/models/athena_token_parameters.go delete mode 100644 v1/models/attachment.go delete mode 100644 v1/models/attribute_filter_params.go delete mode 100644 v1/models/attribute_filter_policy.go delete mode 100644 v1/models/attribute_restore_information.go delete mode 100644 v1/models/attribute_value.go delete mode 100644 v1/models/audit_log_settings.go delete mode 100644 v1/models/audit_logs_tile.go delete mode 100644 v1/models/aurora_cluster_info.go delete mode 100644 v1/models/aws_credentials.go delete mode 100644 v1/models/aws_entity.go delete mode 100644 v1/models/aws_fleet_public_params.go delete mode 100644 v1/models/aws_kms_configuration.go delete mode 100644 v1/models/aws_kms_update_params.go delete mode 100644 v1/models/aws_params.go delete mode 100644 v1/models/aws_protection_source.go delete mode 100644 v1/models/aws_r_d_s_postgres_env_backup_params.go delete mode 100644 v1/models/aws_snapshot_manager_parameters.go delete mode 100644 v1/models/aws_target_params.go delete mode 100644 v1/models/aws_target_params_network_config.go delete mode 100644 v1/models/axon_error.go delete mode 100644 v1/models/azure_application.go delete mode 100644 v1/models/azure_cloud_credentials.go delete mode 100644 v1/models/azure_credentials.go delete mode 100644 v1/models/azure_kms_configuration.go delete mode 100644 v1/models/azure_kms_credentials.go delete mode 100644 v1/models/azure_managed_disk_params.go delete mode 100644 v1/models/azure_params.go delete mode 100644 v1/models/azure_protection_source.go delete mode 100644 v1/models/azure_sql_env_backup_params_proto.go delete mode 100644 v1/models/azure_subscription.go delete mode 100644 v1/models/backup_job_attempt_state_proto.go delete mode 100644 v1/models/backup_job_audit.go delete mode 100644 v1/models/backup_job_pre_or_post_script.go delete mode 100644 v1/models/backup_job_proto.go delete mode 100644 v1/models/backup_job_proto_backup_source.go delete mode 100644 v1/models/backup_job_proto_d_r_to_cloud_params.go delete mode 100644 v1/models/backup_job_proto_exclude_source.go delete mode 100644 v1/models/backup_job_proto_exclusion_time_range.go delete mode 100644 v1/models/backup_job_proto_is_source_paused_map_entry.go delete mode 100644 v1/models/backup_job_proto_remote_view_params.go delete mode 100644 v1/models/backup_job_proto_remote_view_params_remote_view_map_entry.go delete mode 100644 v1/models/backup_job_proto_remote_view_params_remote_view_params_per_view.go delete mode 100644 v1/models/backup_job_run_state_proto.go delete mode 100644 v1/models/backup_job_runs_proto.go delete mode 100644 v1/models/backup_job_summary_proto.go delete mode 100644 v1/models/backup_job_summary_proto_missing_entity_info.go delete mode 100644 v1/models/backup_job_summary_wrapper.go delete mode 100644 v1/models/backup_job_task_state_base_proto.go delete mode 100644 v1/models/backup_job_task_state_base_proto_entity_ids_to_cancel_entry.go delete mode 100644 v1/models/backup_job_task_state_base_proto_pause_state.go delete mode 100644 v1/models/backup_job_task_state_base_proto_source_state.go delete mode 100644 v1/models/backup_job_task_state_base_proto_subtask_to_permit_grant_time_usecs_map_d_e_p_r_e_c_a_t_e_d_entry.go delete mode 100644 v1/models/backup_job_wrapper.go delete mode 100644 v1/models/backup_policy_proto.go delete mode 100644 v1/models/backup_policy_proto_continuous_schedule.go delete mode 100644 v1/models/backup_policy_proto_daily_schedule.go delete mode 100644 v1/models/backup_policy_proto_exclusion_time_range.go delete mode 100644 v1/models/backup_policy_proto_monthly_schedule.go delete mode 100644 v1/models/backup_policy_proto_one_off_schedule.go delete mode 100644 v1/models/backup_policy_proto_schedule_end.go delete mode 100644 v1/models/backup_run.go delete mode 100644 v1/models/backup_run_id.go delete mode 100644 v1/models/backup_script.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/backup_source_params.go delete mode 100644 v1/models/backup_source_stats.go delete mode 100644 v1/models/backup_task_additional_params.go delete mode 100644 v1/models/backup_task_info.go delete mode 100644 v1/models/backup_task_state_proto.go delete mode 100644 v1/models/backup_task_state_proto_app_entity_state.go delete mode 100644 v1/models/backup_task_state_proto_entity_backup_stats_entry.go delete mode 100644 v1/models/backup_task_state_proto_in_progress_task_state_proto.go delete mode 100644 v1/models/backup_task_state_vapp_info_proto.go delete mode 100644 v1/models/bandwidth_limit.go delete mode 100644 v1/models/bandwidth_limit_override.go delete mode 100644 v1/models/banner.go delete mode 100644 v1/models/banner_update_parameters.go delete mode 100644 v1/models/basic_cluster_info.go delete mode 100644 v1/models/basic_task_info.go delete mode 100644 v1/models/bifrost_config.go delete mode 100644 v1/models/bifrost_config_subnet.go delete mode 100644 v1/models/bifrost_subnet.go delete mode 100644 v1/models/blackout_period.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/bond_slave_info.go delete mode 100644 v1/models/bonding_opts.go delete mode 100644 v1/models/bucket_info.go delete mode 100644 v1/models/bucket_ownership_controls.go delete mode 100644 v1/models/bucket_policy.go delete mode 100644 v1/models/bulk_install_app_task_info.go delete mode 100644 v1/models/c2_s_access_portal.go delete mode 100644 v1/models/c2_s_c_a_p_server_info.go delete mode 100644 v1/models/c2_s_server_info.go delete mode 100644 v1/models/c_b_m_r_info.go delete mode 100644 v1/models/c_d_b_entity_info.go delete mode 100644 v1/models/cancel_protection_job_run_param.go delete mode 100644 v1/models/cancellation_timeout.go delete mode 100644 v1/models/cancellation_timeout_params.go delete mode 100644 v1/models/capacity_by_tier.go delete mode 100644 v1/models/cassandra_additional_params.go delete mode 100644 v1/models/cassandra_backup_job_params.go delete mode 100644 v1/models/cassandra_backup_params.go delete mode 100644 v1/models/cassandra_backup_run_params.go delete mode 100644 v1/models/cassandra_cluster.go delete mode 100644 v1/models/cassandra_connect_params.go delete mode 100644 v1/models/cassandra_discovery_params.go delete mode 100644 v1/models/cassandra_keyspace.go delete mode 100644 v1/models/cassandra_log_recover_job_params.go delete mode 100644 v1/models/cassandra_port_info.go delete mode 100644 v1/models/cassandra_ports_info.go delete mode 100644 v1/models/cassandra_protection_source.go delete mode 100644 v1/models/cassandra_recover_job_params.go delete mode 100644 v1/models/cassandra_security_info.go delete mode 100644 v1/models/cassandra_table.go delete mode 100644 v1/models/cbt_info.go delete mode 100644 v1/models/cdp_common_backup_params.go delete mode 100644 v1/models/cdp_hydration_params.go delete mode 100644 v1/models/cdp_hydration_params_disk_log.go delete mode 100644 v1/models/cdp_hydration_params_log_data.go delete mode 100644 v1/models/cdp_hydration_params_virtual_disk_info.go delete mode 100644 v1/models/cdp_io_filter_state.go delete mode 100644 v1/models/cdp_log_run_params.go delete mode 100644 v1/models/cdp_log_run_params_disk_log.go delete mode 100644 v1/models/cdp_log_run_params_epoch_data.go delete mode 100644 v1/models/cdp_log_run_params_log_data.go delete mode 100644 v1/models/cdp_log_run_params_virtual_disk_info.go delete mode 100644 v1/models/centrify_zone.go delete mode 100644 v1/models/certificate_based_authentication_credentials.go delete mode 100644 v1/models/certificate_details.go delete mode 100644 v1/models/change_backup_job_activation_param.go delete mode 100644 v1/models/change_backup_job_mode_proto.go delete mode 100644 v1/models/change_protection_job_state_param.go delete mode 100644 v1/models/change_service_state_parameters.go delete mode 100644 v1/models/change_service_state_result.go delete mode 100644 v1/models/chassis_info.go delete mode 100644 v1/models/check_restore_app_task_arg.go delete mode 100644 v1/models/check_restore_app_task_result.go delete mode 100644 v1/models/check_restore_app_task_result_entity_info.go delete mode 100644 v1/models/check_restore_app_task_result_full_snapshot_info.go delete mode 100644 v1/models/check_restore_app_task_result_log_snapshot_info.go delete mode 100644 v1/models/cifs_share_info.go delete mode 100644 v1/models/classification_info.go delete mode 100644 v1/models/clear_nlm_locks_parameters.go delete mode 100644 v1/models/client_subnet_whitelist.go delete mode 100644 v1/models/clone_app_view_info_oracle.go delete mode 100644 v1/models/clone_app_view_info_proto.go delete mode 100644 v1/models/clone_app_view_params.go delete mode 100644 v1/models/clone_arg.go delete mode 100644 v1/models/clone_directory_params.go delete mode 100644 v1/models/clone_refresh_request.go delete mode 100644 v1/models/clone_task_info.go delete mode 100644 v1/models/clone_task_request.go delete mode 100644 v1/models/clone_task_request_clone_view_parameters.go delete mode 100644 v1/models/clone_view_request.go delete mode 100644 v1/models/clone_view_request_logical_quota.go delete mode 100644 v1/models/close_smb_file_open_parameters.go delete mode 100644 v1/models/cloud_archival_direct_config.go delete mode 100644 v1/models/cloud_archival_info.go delete mode 100644 v1/models/cloud_archive_run.go delete mode 100644 v1/models/cloud_archive_summary.go delete mode 100644 v1/models/cloud_backup_job_pre_or_post_script.go delete mode 100644 v1/models/cloud_deploy_info_proto.go delete mode 100644 v1/models/cloud_deploy_info_proto_cloud_deploy_entity.go delete mode 100644 v1/models/cloud_deploy_target.go delete mode 100644 v1/models/cloud_deploy_target_details.go delete mode 100644 v1/models/cloud_deploy_task_state_proto.go delete mode 100644 v1/models/cloud_domain_list.go delete mode 100644 v1/models/cloud_domain_migration_query_result.go delete mode 100644 v1/models/cloud_network_configuration.go delete mode 100644 v1/models/cloud_parameters.go delete mode 100644 v1/models/cloud_vm_backup_params.go delete mode 100644 v1/models/cluster.go delete mode 100644 v1/models/cluster_audit_log.go delete mode 100644 v1/models/cluster_audit_log_configuration.go delete mode 100644 v1/models/cluster_audit_logs_search_result.go delete mode 100644 v1/models/cluster_config_proto_n_t_p_auth_key_info.go delete mode 100644 v1/models/cluster_config_proto_qo_s_mapping.go delete mode 100644 v1/models/cluster_config_proto_qo_s_mapping_qo_s_context.go delete mode 100644 v1/models/cluster_config_proto_s_id.go delete mode 100644 v1/models/cluster_config_proto_storage_policy_override.go delete mode 100644 v1/models/cluster_config_proto_subnet.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties_amazon_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties_azure_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties_google_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties_oracle_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_properties_s3_compatible_properties.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_tier_info.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_tier_setting.go delete mode 100644 v1/models/cluster_config_proto_vault_cloud_tier_type.go delete mode 100644 v1/models/cluster_creation_progress_result.go delete mode 100644 v1/models/cluster_eula_config.go delete mode 100644 v1/models/cluster_hardware_info.go delete mode 100644 v1/models/cluster_identifier.go delete mode 100644 v1/models/cluster_info.go delete mode 100644 v1/models/cluster_license_state.go delete mode 100644 v1/models/cluster_list_master_resp.go delete mode 100644 v1/models/cluster_networking_endpoint.go delete mode 100644 v1/models/cluster_networking_info.go delete mode 100644 v1/models/cluster_networking_info_endpoint.go delete mode 100644 v1/models/cluster_networking_info_resource.go delete mode 100644 v1/models/cluster_networking_resource_information.go delete mode 100644 v1/models/cluster_partition.go delete mode 100644 v1/models/cluster_public_keys.go delete mode 100644 v1/models/cluster_stats.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/cluster_status_result.go delete mode 100644 v1/models/cluster_upgrade_status.go delete mode 100644 v1/models/collection_info.go delete mode 100644 v1/models/common_acl_proto.go delete mode 100644 v1/models/common_acl_proto_grantees.go delete mode 100644 v1/models/common_job_info.go delete mode 100644 v1/models/compare_a_d_objects_result_a_d_attribute.go delete mode 100644 v1/models/compare_a_d_objects_result_a_d_attribute_value.go delete mode 100644 v1/models/compare_a_d_objects_result_a_d_object.go delete mode 100644 v1/models/compare_ad_objects_request.go delete mode 100644 v1/models/compared_a_d_object.go delete mode 100644 v1/models/component_removal_progress.go delete mode 100644 v1/models/condition.go delete mode 100644 v1/models/condition_condition_key_values_map_entry.go delete mode 100644 v1/models/condition_key_values.go delete mode 100644 v1/models/configuration_params.go delete mode 100644 v1/models/connector_parameters.go delete mode 100644 v1/models/connector_params.go delete mode 100644 v1/models/consumer.go delete mode 100644 v1/models/consumer_stats.go delete mode 100644 v1/models/container_info.go delete mode 100644 v1/models/continuous_schedule.go delete mode 100644 v1/models/copy_backup_run_state_proto.go delete mode 100644 v1/models/copy_backup_run_task_state_proto.go delete mode 100644 v1/models/copy_backup_run_task_state_proto_entity_expiry_time_usecs_map_entry.go delete mode 100644 v1/models/copy_backup_run_task_state_proto_entity_legal_hold_map_entry.go delete mode 100644 v1/models/copy_backup_run_task_state_proto_linked_task_info.go delete mode 100644 v1/models/copy_backup_sub_task_state_proto.go delete mode 100644 v1/models/copy_object_base_info.go delete mode 100644 v1/models/copy_object_base_info_stats.go delete mode 100644 v1/models/copy_run.go delete mode 100644 v1/models/copy_run_stats.go delete mode 100644 v1/models/copy_run_task_uid.go delete mode 100644 v1/models/copy_snapshot_params.go delete mode 100644 v1/models/copy_snapshot_task_status.go delete mode 100644 v1/models/couchbase_backup_job_params.go delete mode 100644 v1/models/couchbase_bucket.go delete mode 100644 v1/models/couchbase_cluster.go delete mode 100644 v1/models/couchbase_connect_params.go delete mode 100644 v1/models/couchbase_protection_source.go delete mode 100644 v1/models/couchbase_recover_job_params.go delete mode 100644 v1/models/count_by_tier.go delete mode 100644 v1/models/counter.go delete mode 100644 v1/models/counter_identifier.go delete mode 100644 v1/models/counter_namespace.go delete mode 100644 v1/models/cracked_file_document.go delete mode 100644 v1/models/cracked_file_document_a_d_object_metadata.go delete mode 100644 v1/models/cracked_file_document_exchange_mailbox_metadata.go delete mode 100644 v1/models/cracked_file_document_file_version.go delete mode 100644 v1/models/cracked_file_document_file_version_version_metadata.go delete mode 100644 v1/models/cracked_file_document_instance_id_range.go delete mode 100644 v1/models/cracked_file_document_magneto_entity_metadata.go delete mode 100644 v1/models/cracked_file_document_mailbox_item_metadata.go delete mode 100644 v1/models/cracked_file_document_no_sql_metadata.go delete mode 100644 v1/models/cracked_file_document_o365_group_metadata.go delete mode 100644 v1/models/cracked_file_document_o365_teams_channel_files_metadata.go delete mode 100644 v1/models/cracked_file_document_o365_teams_metadata.go delete mode 100644 v1/models/cracked_file_document_one_drive_metadata.go delete mode 100644 v1/models/cracked_file_document_public_folder_metadata.go delete mode 100644 v1/models/cracked_file_document_sharepoint_lists_metadata.go delete mode 100644 v1/models/cracked_file_document_sharepoint_metadata.go delete mode 100644 v1/models/cracked_file_document_snapshot_tags_association_map_entry.go delete mode 100644 v1/models/cracked_file_document_teams_channel_metadata.go delete mode 100644 v1/models/cracked_file_document_uda_metadata.go delete mode 100644 v1/models/cracked_file_document_version_info.go delete mode 100644 v1/models/create_active_directory_entry_params.go delete mode 100644 v1/models/create_api_key_params.go delete mode 100644 v1/models/create_backup_job_arg.go delete mode 100644 v1/models/create_backup_job_arg_entities_to_protect.go delete mode 100644 v1/models/create_backup_job_result_protected_entity.go delete mode 100644 v1/models/create_bond_parameters.go delete mode 100644 v1/models/create_bond_result.go delete mode 100644 v1/models/create_cloud_cluster_parameters.go delete mode 100644 v1/models/create_cloud_domain_migration_parameters.go delete mode 100644 v1/models/create_cluster_result.go delete mode 100644 v1/models/create_idp_configuration_request.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_physical_cluster_parameters.go delete mode 100644 v1/models/create_remote_vault_restore_task_parameters.go delete mode 100644 v1/models/create_remote_vault_restore_task_parameters_search_job_uid.go delete mode 100644 v1/models/create_remote_vault_search_job_parameters.go delete mode 100644 v1/models/create_view_alias_response_body.go delete mode 100644 v1/models/create_view_box_params.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.go delete mode 100644 v1/models/create_view_request_logical_quota.go delete mode 100644 v1/models/create_virtual_cluster_parameters.go delete mode 100644 v1/models/created_api_key.go delete mode 100644 v1/models/created_remote_vault_search_job_uid.go delete mode 100644 v1/models/created_remote_vault_search_job_uid_search_job_uid.go delete mode 100644 v1/models/credentials.go delete mode 100644 v1/models/credentials_proto.go delete mode 100644 v1/models/cryptsoft_kms_config_response.go delete mode 100644 v1/models/cryptsoft_kms_configuration.go delete mode 100644 v1/models/cryptsoft_kms_update_params.go delete mode 100644 v1/models/custom_attribute.go delete mode 100644 v1/models/custom_tag.go delete mode 100644 v1/models/custom_tag_params.go delete mode 100644 v1/models/custom_unix_id_attributes.go delete mode 100644 v1/models/d_b_entity_info.go delete mode 100644 v1/models/d_b_entity_info_tempfile_info_row.go delete mode 100644 v1/models/d_g_entity_info.go delete mode 100644 v1/models/d_h_c_p_conf.go delete mode 100644 v1/models/d_s_e_solr_info.go delete mode 100644 v1/models/dag_application_server_info.go delete mode 100644 v1/models/dag_info.go delete mode 100644 v1/models/daily_schedule.go delete mode 100644 v1/models/dashboard.go delete mode 100644 v1/models/dashboard_response.go delete mode 100644 v1/models/data_event.go delete mode 100644 v1/models/data_insights_info.go delete mode 100644 v1/models/data_lock_config.go delete mode 100644 v1/models/data_lock_constraints.go delete mode 100644 v1/models/data_lock_constraints_proto.go delete mode 100644 v1/models/data_migration_job_parameters.go delete mode 100644 v1/models/data_migration_policy.go delete mode 100644 v1/models/data_protect_azure_info.go delete mode 100644 v1/models/data_protect_info.go delete mode 100644 v1/models/data_transfer_from_vault_per_task.go delete mode 100644 v1/models/data_transfer_from_vault_summary.go delete mode 100644 v1/models/data_transfer_from_vaults_summary_response.go delete mode 100644 v1/models/data_transfer_info.go delete mode 100644 v1/models/data_transfer_info_private_network_info.go delete mode 100644 v1/models/data_transfer_to_vault_per_protection_job.go delete mode 100644 v1/models/data_transfer_to_vault_summary.go delete mode 100644 v1/models/data_transfer_to_vaults_summary_response.go delete mode 100644 v1/models/data_uptier_job_parameters.go delete mode 100644 v1/models/data_usage_stats.go delete mode 100644 v1/models/database_copy_error.go delete mode 100644 v1/models/database_info.go delete mode 100644 v1/models/datastore_info.go delete mode 100644 v1/models/date_time.go delete mode 100644 v1/models/day_time.go delete mode 100644 v1/models/day_time_window.go delete mode 100644 v1/models/db_file_info.go delete mode 100644 v1/models/deactivate_job_entities_info_proto.go delete mode 100644 v1/models/deactivate_job_entities_info_proto_deactivated_entity.go delete mode 100644 v1/models/deactivate_job_state_proto.go delete mode 100644 v1/models/delete_backup_job_runs_param.go delete mode 100644 v1/models/delete_infected_file_params.go delete mode 100644 v1/models/delete_infected_file_response.go delete mode 100644 v1/models/delete_ip_config_parameters.go delete mode 100644 v1/models/delete_job_run.go delete mode 100644 v1/models/delete_protection_job_param.go delete mode 100644 v1/models/delete_route_param.go delete mode 100644 v1/models/delete_view_users_quota_parameters.go delete mode 100644 v1/models/delivery_rule_proto_delivery_target.go delete mode 100644 v1/models/deploy_arg.go delete mode 100644 v1/models/deploy_cert_parameters.go delete mode 100644 v1/models/deploy_d_b_instances_to_r_d_s_params.go delete mode 100644 v1/models/deploy_d_b_instances_to_r_d_s_params_point_in_time_restore_params.go delete mode 100644 v1/models/deploy_fleet_params.go delete mode 100644 v1/models/deploy_task_request.go delete mode 100644 v1/models/deploy_v_ms_to_a_w_s_params.go delete mode 100644 v1/models/deploy_v_ms_to_azure_params.go delete mode 100644 v1/models/deploy_v_ms_to_cloud_params.go delete mode 100644 v1/models/deploy_v_ms_to_cloud_task_state_proto.go delete mode 100644 v1/models/deploy_v_ms_to_g_c_p_params.go delete mode 100644 v1/models/deploy_v_ms_to_on_prem_params.go delete mode 100644 v1/models/deploy_vms_to_cloud.go delete mode 100644 v1/models/destroy_clone_app_task_info_proto.go delete mode 100644 v1/models/destroy_cloned_entity_info_proto.go delete mode 100644 v1/models/destroy_cloned_entity_info_proto_cloned_entity.go delete mode 100644 v1/models/destroy_cloned_task_state_proto.go delete mode 100644 v1/models/destroy_cloned_vm_task_info_proto.go delete mode 100644 v1/models/destroy_mount_volumes_task_info_proto.go delete mode 100644 v1/models/device_node.go delete mode 100644 v1/models/device_tree.go delete mode 100644 v1/models/device_tree_child_device.go delete mode 100644 v1/models/device_tree_details.go delete mode 100644 v1/models/device_tree_partition_slice.go delete mode 100644 v1/models/dir_entry.go delete mode 100644 v1/models/dir_quota_config.go delete mode 100644 v1/models/dir_quota_info.go delete mode 100644 v1/models/dir_quota_policy.go delete mode 100644 v1/models/disk.go delete mode 100644 v1/models/disk_attach_params.go delete mode 100644 v1/models/disk_block.go delete mode 100644 v1/models/disk_delete_result.go delete mode 100644 v1/models/disk_hardware_info.go delete mode 100644 v1/models/disk_info.go delete mode 100644 v1/models/disk_info_label.go delete mode 100644 v1/models/disk_internal.go delete mode 100644 v1/models/disk_partition.go delete mode 100644 v1/models/disk_reservation.go delete mode 100644 v1/models/disk_stats.go delete mode 100644 v1/models/disk_unit.go delete mode 100644 v1/models/dns_delegation_zone.go delete mode 100644 v1/models/doc_error.go delete mode 100644 v1/models/domain.go delete mode 100644 v1/models/domain_controllers.go delete mode 100644 v1/models/download_cft_params.go delete mode 100644 v1/models/download_cft_response.go delete mode 100644 v1/models/download_chats_params.go delete mode 100644 v1/models/download_files_and_folders_params.go delete mode 100644 v1/models/download_package_parameters.go delete mode 100644 v1/models/download_package_result.go delete mode 100644 v1/models/e_b_s_volume_exclusion_params.go delete mode 100644 v1/models/e_b_s_volume_exclusion_params_tag.go delete mode 100644 v1/models/e_b_s_volume_exclusion_params_tag_params.go delete mode 100644 v1/models/e_b_s_volume_info.go delete mode 100644 v1/models/e_b_s_volume_info_tag.go delete mode 100644 v1/models/e_b_s_volume_tag.go delete mode 100644 v1/models/ebs_volume_info.go delete mode 100644 v1/models/edit_hosts_parameters.go delete mode 100644 v1/models/elastifile_cluster.go delete mode 100644 v1/models/elastifile_container.go delete mode 100644 v1/models/elastifile_protection_source.go delete mode 100644 v1/models/email_delivery_target.go delete mode 100644 v1/models/email_meta_data.go delete mode 100644 v1/models/encryption_configuration.go delete mode 100644 v1/models/encryption_params.go delete mode 100644 v1/models/entity.go delete mode 100644 v1/models/entity_access_info.go delete mode 100644 v1/models/entity_arg_wrapper.go delete mode 100644 v1/models/entity_attribute_map_entry.go delete mode 100644 v1/models/entity_backup_stats.go delete mode 100644 v1/models/entity_common_info.go delete mode 100644 v1/models/entity_external_metadata_proto.go delete mode 100644 v1/models/entity_group_membership_info.go delete mode 100644 v1/models/entity_group_params.go delete mode 100644 v1/models/entity_hierarchy_proto.go delete mode 100644 v1/models/entity_hierarchy_proto_aggregated_entity_info.go delete mode 100644 v1/models/entity_hierarchy_wrapper.go delete mode 100644 v1/models/entity_i_a_m_info.go delete mode 100644 v1/models/entity_id_proto.go delete mode 100644 v1/models/entity_identifier.go delete mode 100644 v1/models/entity_operation_info_proto.go delete mode 100644 v1/models/entity_operation_spec_proto.go delete mode 100644 v1/models/entity_operation_spec_proto_mark_source_for_unregistration_params.go delete mode 100644 v1/models/entity_operation_status_proto.go delete mode 100644 v1/models/entity_operation_status_proto_unregistration.go delete mode 100644 v1/models/entity_permission_info.go delete mode 100644 v1/models/entity_permission_info_permission.go delete mode 100644 v1/models/entity_permission_information.go delete mode 100644 v1/models/entity_private_endpoint_connection.go delete mode 100644 v1/models/entity_proto.go delete mode 100644 v1/models/entity_proto_size_info_entry.go delete mode 100644 v1/models/entity_s_k_u.go delete mode 100644 v1/models/entity_schema_proto.go delete mode 100644 v1/models/entity_schema_proto_attributes_descriptor.go delete mode 100644 v1/models/entity_schema_proto_granularity.go delete mode 100644 v1/models/entity_schema_proto_key_value_descriptor.go delete mode 100644 v1/models/entity_schema_proto_time_series_descriptor.go delete mode 100644 v1/models/entity_schema_proto_time_series_descriptor_metric_unit.go delete mode 100644 v1/models/entity_service_annotations_entry.go delete mode 100644 v1/models/entity_services_to_connector_ids_map_entry.go delete mode 100644 v1/models/entity_site_params.go delete mode 100644 v1/models/entity_size_info.go delete mode 100644 v1/models/entity_snapshot_info_proto.go delete mode 100644 v1/models/entity_storage_class_info.go delete mode 100644 v1/models/entity_team_params.go delete mode 100644 v1/models/entity_version_tuple.go delete mode 100644 v1/models/entity_vmware_custom_attributes_map_entry.go delete mode 100644 v1/models/entity_volume_info.go delete mode 100644 v1/models/entity_vss_writer_info.go delete mode 100644 v1/models/env_backup_params.go delete mode 100644 v1/models/environment_type_job_parameters.go delete mode 100644 v1/models/epoch_proto.go delete mode 100644 v1/models/erasure_coding_info.go delete mode 100644 v1/models/error.go delete mode 100644 v1/models/error_proto.go delete mode 100644 v1/models/eula_config.go delete mode 100644 v1/models/ews_to_pst_conversion_params.go delete mode 100644 v1/models/exchange_backup_job_params.go delete mode 100644 v1/models/exchange_d_a_g.go delete mode 100644 v1/models/exchange_d_a_g_backup_preference.go delete mode 100644 v1/models/exchange_d_a_g_database.go delete mode 100644 v1/models/exchange_d_a_g_database_copy.go delete mode 100644 v1/models/exchange_d_a_g_identity.go delete mode 100644 v1/models/exchange_d_a_g_info.go delete mode 100644 v1/models/exchange_d_a_g_protection_preference.go delete mode 100644 v1/models/exchange_dag_hosts_response.go delete mode 100644 v1/models/exchange_database.go delete mode 100644 v1/models/exchange_database_backup_times.go delete mode 100644 v1/models/exchange_database_copy_info.go delete mode 100644 v1/models/exchange_database_identity.go delete mode 100644 v1/models/exchange_database_info.go delete mode 100644 v1/models/exchange_e_d_b_info.go delete mode 100644 v1/models/exchange_env_job_parameters.go delete mode 100644 v1/models/exchange_host_info.go delete mode 100644 v1/models/exchange_log_info.go delete mode 100644 v1/models/exchange_protection_source.go delete mode 100644 v1/models/exchange_restore_parameters.go delete mode 100644 v1/models/exchange_restore_view_parameters.go delete mode 100644 v1/models/exchange_server.go delete mode 100644 v1/models/exchange_server_d_a_g_node.go delete mode 100644 v1/models/exchange_server_identity.go delete mode 100644 v1/models/exchange_server_info.go delete mode 100644 v1/models/exchange_server_node.go delete mode 100644 v1/models/exchange_server_version.go delete mode 100644 v1/models/exchange_topology.go delete mode 100644 v1/models/expand_cloud_cluster_parameters.go delete mode 100644 v1/models/expand_physical_cluster_parameters.go delete mode 100644 v1/models/expiration_action.go delete mode 100644 v1/models/extended_field_uri.go delete mode 100644 v1/models/extended_retention_policy.go delete mode 100644 v1/models/extended_retention_policy_proto.go delete mode 100644 v1/models/external_client_subnets.go delete mode 100644 v1/models/external_network_info.go delete mode 100644 v1/models/externally_triggered_backup_params.go delete mode 100644 v1/models/externally_triggered_env_job_parameters.go delete mode 100644 v1/models/externally_triggered_job_params.go delete mode 100644 v1/models/externally_triggered_job_params_externally_triggered_sbt_params.go delete mode 100644 v1/models/externally_triggered_sbt_parameters.go delete mode 100644 v1/models/extract_file_range_result.go delete mode 100644 v1/models/failure_reason.go delete mode 100644 v1/models/field_info.go delete mode 100644 v1/models/file_distribution_metrics.go delete mode 100644 v1/models/file_distribution_stats.go delete mode 100644 v1/models/file_distribution_stats_list.go delete mode 100644 v1/models/file_extension_filter.go delete mode 100644 v1/models/file_fstat_result.go delete mode 100644 v1/models/file_id.go delete mode 100644 v1/models/file_info.go delete mode 100644 v1/models/file_level_data_lock_config.go delete mode 100644 v1/models/file_lock_status.go delete mode 100644 v1/models/file_nlm_locks.go delete mode 100644 v1/models/file_partition_block.go delete mode 100644 v1/models/file_path_filter.go delete mode 100644 v1/models/file_path_parameters.go delete mode 100644 v1/models/file_results.go delete mode 100644 v1/models/file_search_result.go delete mode 100644 v1/models/file_search_result_job_uid.go delete mode 100644 v1/models/file_search_results.go delete mode 100644 v1/models/file_snapshot_information.go delete mode 100644 v1/models/file_stat_info.go delete mode 100644 v1/models/file_stat_result.go delete mode 100644 v1/models/file_stubbing_params.go delete mode 100644 v1/models/file_stubbing_params_target_view_data.go delete mode 100644 v1/models/file_stubbing_params_target_view_map_entry.go delete mode 100644 v1/models/file_system_info.go delete mode 100644 v1/models/file_uptiering_params.go delete mode 100644 v1/models/file_uptiering_params_source_view_data.go delete mode 100644 v1/models/file_uptiering_params_source_view_map_entry.go delete mode 100644 v1/models/file_version.go delete mode 100644 v1/models/filename_pattern_to_directory.go delete mode 100644 v1/models/filer_audit_log_configuration.go delete mode 100644 v1/models/files_and_folders_info.go delete mode 100644 v1/models/files_to_directory_mapping.go delete mode 100644 v1/models/fileset_info.go delete mode 100644 v1/models/filesystem_info.go delete mode 100644 v1/models/filesystem_volume.go delete mode 100644 v1/models/filesystem_volume_logical_volume.go delete mode 100644 v1/models/filter_ip_config.go delete mode 100644 v1/models/filtering_policy_proto.go delete mode 100644 v1/models/fixed_unix_id_mapping.go delete mode 100644 v1/models/flash_blade_file_system.go delete mode 100644 v1/models/flash_blade_network_interface.go delete mode 100644 v1/models/flash_blade_nfs_info.go delete mode 100644 v1/models/flash_blade_protection_source.go delete mode 100644 v1/models/flash_blade_storage_array.go delete mode 100644 v1/models/fleet_network_params.go delete mode 100644 v1/models/fleet_network_params_network_params.go delete mode 100644 v1/models/fleet_params.go delete mode 100644 v1/models/fleet_tag.go delete mode 100644 v1/models/folder_content_info.go delete mode 100644 v1/models/folder_content_info_extended_property.go delete mode 100644 v1/models/folder_id.go delete mode 100644 v1/models/folder_result.go delete mode 100644 v1/models/folder_type.go delete mode 100644 v1/models/fort_knox_azure_info.go delete mode 100644 v1/models/fort_knox_cold_info.go delete mode 100644 v1/models/free_node_information.go delete mode 100644 v1/models/full_snapshot_info.go delete mode 100644 v1/models/g_c_p_attributes.go delete mode 100644 v1/models/g_c_p_disk_exclusion_object_params.go delete mode 100644 v1/models/g_c_p_fleet_params.go delete mode 100644 v1/models/g_c_p_job_disk_exclusion_rule.go delete mode 100644 v1/models/g_c_p_job_disk_exclusion_rule_label.go delete mode 100644 v1/models/g_c_p_native_job_params.go delete mode 100644 v1/models/g_c_p_native_object_params.go delete mode 100644 v1/models/gcp_credentials.go delete mode 100644 v1/models/gcp_disk_info.go delete mode 100644 v1/models/gcp_fleet_network_params.go delete mode 100644 v1/models/gcp_fleet_params.go delete mode 100644 v1/models/gcp_params.go delete mode 100644 v1/models/gcp_protection_source.go delete mode 100644 v1/models/gdpr_copy_task.go delete mode 100644 v1/models/get_all_job_runs_result.go delete mode 100644 v1/models/get_backup_job_runs_result_wrapper.go delete mode 100644 v1/models/get_consumer_stats_result.go delete mode 100644 v1/models/get_cracked_file_restore_info_result_file_info.go delete mode 100644 v1/models/get_cracked_file_versions_result.go delete mode 100644 v1/models/get_cracked_file_versions_result_version_info.go delete mode 100644 v1/models/get_cracked_file_versions_result_version_info_version_metadata.go delete mode 100644 v1/models/get_entity_hierarchy_result_object_based_protection_info.go delete mode 100644 v1/models/get_job_run_info_result.go delete mode 100644 v1/models/get_m_r_jar_upload_path_result.go delete mode 100644 v1/models/get_map_reduce_app_runs_params.go delete mode 100644 v1/models/get_objects_details_result.go delete mode 100644 v1/models/get_registration_info_response.go delete mode 100644 v1/models/get_registration_info_response_stats.go delete mode 100644 v1/models/get_restore_app_time_ranges_arg.go delete mode 100644 v1/models/get_restore_app_time_ranges_result.go delete mode 100644 v1/models/get_tasks_arg.go delete mode 100644 v1/models/get_tasks_result.go delete mode 100644 v1/models/get_tasks_result_result_group.go delete mode 100644 v1/models/get_tasks_result_result_group_task.go delete mode 100644 v1/models/get_tenant_stats_result.go delete mode 100644 v1/models/get_view_box_stats_result.go delete mode 100644 v1/models/get_views_by_share_name_result.go delete mode 100644 v1/models/get_views_result.go delete mode 100644 v1/models/gflag.go delete mode 100644 v1/models/google_account_info.go delete mode 100644 v1/models/google_cloud_credentials.go delete mode 100644 v1/models/gpfs_cluster.go delete mode 100644 v1/models/gpfs_fileset.go delete mode 100644 v1/models/gpfs_filesystem.go delete mode 100644 v1/models/gpfs_protection_source.go delete mode 100644 v1/models/grantee_proto.go delete mode 100644 v1/models/granular_restore_info.go delete mode 100644 v1/models/granularity_bucket.go delete mode 100644 v1/models/granularity_bucket_exact_dates_info.go delete mode 100644 v1/models/graph_keyspace_info.go delete mode 100644 v1/models/group.go delete mode 100644 v1/models/group_backup_env_params.go delete mode 100644 v1/models/group_delete_parameters.go delete mode 100644 v1/models/group_info.go delete mode 100644 v1/models/group_membership_info.go delete mode 100644 v1/models/group_parameters.go delete mode 100644 v1/models/guid_pair.go delete mode 100644 v1/models/h_base_backup_job_params.go delete mode 100644 v1/models/h_base_connect_params.go delete mode 100644 v1/models/h_base_connect_params_configuration_entry.go delete mode 100644 v1/models/h_base_discovery_params.go delete mode 100644 v1/models/h_base_protection_source.go delete mode 100644 v1/models/h_base_recover_job_params.go delete mode 100644 v1/models/h_base_table.go delete mode 100644 v1/models/hadoop_discovery_params.go delete mode 100644 v1/models/hdfs_backup_job_params.go delete mode 100644 v1/models/hdfs_connect_params.go delete mode 100644 v1/models/hdfs_connect_params_configuration_entry.go delete mode 100644 v1/models/hdfs_discovery_params.go delete mode 100644 v1/models/hdfs_protection_source.go delete mode 100644 v1/models/hdfs_recover_job_params.go delete mode 100644 v1/models/health_tile.go delete mode 100644 v1/models/hive_backup_job_params.go delete mode 100644 v1/models/hive_connect_params.go delete mode 100644 v1/models/hive_connect_params_configuration_entry.go delete mode 100644 v1/models/hive_discovery_params.go delete mode 100644 v1/models/hive_protection_source.go delete mode 100644 v1/models/hive_recover_job_params.go delete mode 100644 v1/models/hive_table.go delete mode 100644 v1/models/host.go delete mode 100644 v1/models/host_agent_status.go delete mode 100644 v1/models/host_entry.go delete mode 100644 v1/models/host_info.go delete mode 100644 v1/models/host_result.go delete mode 100644 v1/models/host_settings_check.go delete mode 100644 v1/models/host_settings_check_params.go delete mode 100644 v1/models/host_settings_check_result.go delete mode 100644 v1/models/hyper_flex_protection_source.go delete mode 100644 v1/models/hyper_v_backup_env_params.go delete mode 100644 v1/models/hyper_v_backup_source_params.go delete mode 100644 v1/models/hyper_v_disk_filter_proto.go delete mode 100644 v1/models/hyperv_clone_parameters.go delete mode 100644 v1/models/hyperv_datastore.go delete mode 100644 v1/models/hyperv_env_job_parameters.go delete mode 100644 v1/models/hyperv_protection_source.go delete mode 100644 v1/models/hyperv_restore_parameters.go delete mode 100644 v1/models/hyperv_virtual_machine.go delete mode 100644 v1/models/i_o_filter_state.go delete mode 100644 v1/models/i_o_filter_state_filter_status.go delete mode 100644 v1/models/ibm_flash_system_protection_source.go delete mode 100644 v1/models/icap_connection_status_response.go delete mode 100644 v1/models/id_mapping_info.go delete mode 100644 v1/models/identity.go delete mode 100644 v1/models/identity_set.go delete mode 100644 v1/models/idp_principals_add_parameters.go delete mode 100644 v1/models/idp_service_configuration.go delete mode 100644 v1/models/idp_user_info.go delete mode 100644 v1/models/index_and_snapshots.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/indexing_policy.go delete mode 100644 v1/models/indexing_policy_proto.go delete mode 100644 v1/models/infected_file.go delete mode 100644 v1/models/infected_file_id.go delete mode 100644 v1/models/infected_file_param.go delete mode 100644 v1/models/infected_files.go delete mode 100644 v1/models/input_spec.go delete mode 100644 v1/models/input_spec_file_time_filter.go delete mode 100644 v1/models/input_spec_input_files_selector.go delete mode 100644 v1/models/input_spec_input_v_ms_selector.go delete mode 100644 v1/models/interface.go delete mode 100644 v1/models/interface_group.go delete mode 100644 v1/models/interface_stats.go delete mode 100644 v1/models/io_filter_storage_policy_properties.go delete mode 100644 v1/models/io_preferential_tier.go delete mode 100644 v1/models/iops_tile.go delete mode 100644 v1/models/ip_config.go delete mode 100644 v1/models/ip_details.go delete mode 100644 v1/models/ip_mode.go delete mode 100644 v1/models/ip_range.go delete mode 100644 v1/models/ip_unconfig.go delete mode 100644 v1/models/ipmi_configuration.go delete mode 100644 v1/models/iscsi_san_port.go delete mode 100644 v1/models/isilon_access_zone.go delete mode 100644 v1/models/isilon_cluster.go delete mode 100644 v1/models/isilon_env_params.go delete mode 100644 v1/models/isilon_env_params_zone_config.go delete mode 100644 v1/models/isilon_env_params_zone_config_map_entry.go delete mode 100644 v1/models/isilon_env_params_zone_config_network_pool_config.go delete mode 100644 v1/models/isilon_mount_point.go delete mode 100644 v1/models/isilon_nfs_mount_point.go delete mode 100644 v1/models/isilon_protection_source.go delete mode 100644 v1/models/isilon_smb_mount_point.go delete mode 100644 v1/models/item_meta_data.go delete mode 100644 v1/models/item_meta_data_occurrence.go delete mode 100644 v1/models/job_policy_proto.go delete mode 100644 v1/models/job_runs_tile.go delete mode 100644 v1/models/k8_s_filter_params.go delete mode 100644 v1/models/k8_s_filter_params_label_vec.go delete mode 100644 v1/models/k_m_s_status_response.go delete mode 100644 v1/models/key_value_pair.go delete mode 100644 v1/models/key_value_str_pair.go delete mode 100644 v1/models/key_vault_params.go delete mode 100644 v1/models/keyspace_info.go delete mode 100644 v1/models/keystone_acl_proto.go delete mode 100644 v1/models/keystone_acl_proto_grantees.go delete mode 100644 v1/models/keystone_acl_proto_grantees_project_users.go delete mode 100644 v1/models/keystone_acl_proto_grantees_project_users_map_entry.go delete mode 100644 v1/models/kill_map_reduce_instance_result.go delete mode 100644 v1/models/kms_configuration_response.go delete mode 100644 v1/models/kms_create_request_parameters.go delete mode 100644 v1/models/kms_delete_params.go delete mode 100644 v1/models/kms_key_info.go delete mode 100644 v1/models/kms_update_request_parameters.go delete mode 100644 v1/models/kubernetes_backup_params.go delete mode 100644 v1/models/kubernetes_backup_source_params.go delete mode 100644 v1/models/kubernetes_credentials.go delete mode 100644 v1/models/kubernetes_env_params.go delete mode 100644 v1/models/kubernetes_label_attribute.go delete mode 100644 v1/models/kubernetes_params.go delete mode 100644 v1/models/kubernetes_protection_source.go delete mode 100644 v1/models/kubernetes_restore_parameters.go delete mode 100644 v1/models/kubernetes_vlan_info.go delete mode 100644 v1/models/kvm_protection_source.go delete mode 100644 v1/models/label_attributes_info.go delete mode 100644 v1/models/label_selector.go delete mode 100644 v1/models/label_selector_match_labels_entry.go delete mode 100644 v1/models/last_protection_run_stats.go delete mode 100644 v1/models/last_protection_run_stats_by_env.go delete mode 100644 v1/models/last_protection_run_summary.go delete mode 100644 v1/models/latency_thresholds.go delete mode 100644 v1/models/latest_protection_job_run_info.go delete mode 100644 v1/models/latest_protection_run.go delete mode 100644 v1/models/launch_app_instance.go delete mode 100644 v1/models/ldap_provider.go delete mode 100644 v1/models/ldap_provider_response.go delete mode 100644 v1/models/legal_holdings.go delete mode 100644 v1/models/license_state.go delete mode 100644 v1/models/lifecycle_config_proto.go delete mode 100644 v1/models/lifecycle_rule.go delete mode 100644 v1/models/lifecycle_rule_filter.go delete mode 100644 v1/models/lifecycle_rule_filter_and.go delete mode 100644 v1/models/lifecycle_rule_filter_tag.go delete mode 100644 v1/models/linux_command_execute_node_resp.go delete mode 100644 v1/models/linux_command_list_node_resp.go delete mode 100644 v1/models/linux_support_user_bash_shell_access_req_params.go delete mode 100644 v1/models/linux_support_user_bash_shell_access_result.go delete mode 100644 v1/models/linux_support_user_sudo_access_req_params.go delete mode 100644 v1/models/linux_support_user_sudo_access_result.go delete mode 100644 v1/models/list_app_entities_result.go delete mode 100644 v1/models/list_centrify_zone.go delete mode 100644 v1/models/list_cert_response.go delete mode 100644 v1/models/list_nlm_locks_response.go delete mode 100644 v1/models/list_org_vdc_networks_response.go delete mode 100644 v1/models/list_storage_profiles_response_body.go delete mode 100644 v1/models/local_copy_info_base.go delete mode 100644 v1/models/local_copy_info_base_yoda_notified_task_ids_entry.go delete mode 100644 v1/models/local_time.go delete mode 100644 v1/models/lock_file_params.go delete mode 100644 v1/models/lock_holder_info.go delete mode 100644 v1/models/lock_info.go delete mode 100644 v1/models/lock_range.go delete mode 100644 v1/models/logical_stats.go delete mode 100644 v1/models/logical_volume.go delete mode 100644 v1/models/m365_teams_channel_info.go delete mode 100644 v1/models/m_o_ref.go delete mode 100644 v1/models/m_s_exchange_params.go delete mode 100644 v1/models/m_s_graph_app_credentials.go delete mode 100644 v1/models/m_s_graph_app_credentials_scope_client_id_map_entry.go delete mode 100644 v1/models/m_s_graph_app_credentials_scope_token_map_entry.go delete mode 100644 v1/models/magneto_instance_id.go delete mode 100644 v1/models/magneto_object_id.go delete mode 100644 v1/models/maintenance_mode_config_proto.go delete mode 100644 v1/models/maintenance_mode_config_proto_workflow_intervention_spec.go delete mode 100644 v1/models/management_server.go delete mode 100644 v1/models/map_reduce_aux_data.go delete mode 100644 v1/models/map_reduce_file_formats.go delete mode 100644 v1/models/map_reduce_info.go delete mode 100644 v1/models/map_reduce_info_app_property.go delete mode 100644 v1/models/map_reduce_info_required_property.go delete mode 100644 v1/models/map_reduce_instance.go delete mode 100644 v1/models/map_reduce_instance_input_param.go delete mode 100644 v1/models/map_reduce_instance_run_info.go delete mode 100644 v1/models/map_reduce_instance_wrapper.go delete mode 100644 v1/models/mapper_info.go delete mode 100644 v1/models/mappers_wrapper.go delete mode 100644 v1/models/mark_node_delete_request.go delete mode 100644 v1/models/mcm_user_profile.go delete mode 100644 v1/models/metric_data_block.go delete mode 100644 v1/models/metric_data_point.go delete mode 100644 v1/models/metric_value.go delete mode 100644 v1/models/mfa_info.go delete mode 100644 v1/models/migrate_oracle_clone_params.go delete mode 100644 v1/models/mirror_params.go delete mode 100644 v1/models/mongo_d_b_additional_params.go delete mode 100644 v1/models/mongo_d_b_backup_job_params.go delete mode 100644 v1/models/mongo_d_b_cluster.go delete mode 100644 v1/models/mongo_d_b_collection.go delete mode 100644 v1/models/mongo_d_b_connect_params.go delete mode 100644 v1/models/mongo_d_b_database.go delete mode 100644 v1/models/mongo_d_b_protection_source.go delete mode 100644 v1/models/mongo_d_b_recover_job_params.go delete mode 100644 v1/models/monthly_schedule.go delete mode 100644 v1/models/mount_point_info.go delete mode 100644 v1/models/mount_point_info_nfs_info.go delete mode 100644 v1/models/mount_point_info_smb_info.go delete mode 100644 v1/models/mount_volume_result.go delete mode 100644 v1/models/mount_volume_result_details.go delete mode 100644 v1/models/mount_volume_result_details_mount_error.go delete mode 100644 v1/models/mount_volumes_hyper_v_params.go delete mode 100644 v1/models/mount_volumes_info_proto.go delete mode 100644 v1/models/mount_volumes_parameters.go delete mode 100644 v1/models/mount_volumes_params.go delete mode 100644 v1/models/mount_volumes_state.go delete mode 100644 v1/models/mount_volumes_state_other_error.go delete mode 100644 v1/models/mount_volumes_task_state_proto.go delete mode 100644 v1/models/mount_volumes_v_mware_params.go delete mode 100644 v1/models/multi_stage_restore_finalize_action_params.go delete mode 100644 v1/models/multi_stage_restore_task_state_proto.go delete mode 100644 v1/models/n_f_s_export_paths.go delete mode 100644 v1/models/n_g_t_info.go delete mode 100644 v1/models/namespace_info.go delete mode 100644 v1/models/nas_analysis_job_params.go delete mode 100644 v1/models/nas_analysis_job_params_access_time_bucket.go delete mode 100644 v1/models/nas_analysis_job_params_file_size_bucket.go delete mode 100644 v1/models/nas_analysis_job_params_file_type_bucket.go delete mode 100644 v1/models/nas_analysis_job_params_mod_time_bucket.go delete mode 100644 v1/models/nas_backup_params.go delete mode 100644 v1/models/nas_credentials.go delete mode 100644 v1/models/nas_env_job_parameters.go delete mode 100644 v1/models/nas_mount_credential_params.go delete mode 100644 v1/models/nas_mount_credentials.go delete mode 100644 v1/models/nas_protection_source.go delete mode 100644 v1/models/nas_source_throttling_params.go delete mode 100644 v1/models/nas_throttling_params.go delete mode 100644 v1/models/netapp_cluster_info.go delete mode 100644 v1/models/netapp_protection_source.go delete mode 100644 v1/models/netapp_version_tuple.go delete mode 100644 v1/models/netapp_volume_info.go delete mode 100644 v1/models/netapp_vserver_info.go delete mode 100644 v1/models/network_configuration.go delete mode 100644 v1/models/network_interface.go delete mode 100644 v1/models/network_mapping.go delete mode 100644 v1/models/network_mapping_proto.go delete mode 100644 v1/models/network_params.go delete mode 100644 v1/models/network_pool.go delete mode 100644 v1/models/network_pool_config.go delete mode 100644 v1/models/network_pool_range.go delete mode 100644 v1/models/network_realm_info.go delete mode 100644 v1/models/networking_information.go delete mode 100644 v1/models/new_s3_secret_access_key.go delete mode 100644 v1/models/nexus_cloud_credentials.go delete mode 100644 v1/models/nfs_connection.go delete mode 100644 v1/models/nfs_info.go delete mode 100644 v1/models/nfs_root_permissions.go delete mode 100644 v1/models/nfs_squash.go delete mode 100644 v1/models/nimble_protection_source.go delete mode 100644 v1/models/nis_netgroup.go delete mode 100644 v1/models/nlm_lock.go delete mode 100644 v1/models/no_sql_backup_job_params.go delete mode 100644 v1/models/no_sql_backup_job_params_immediate_ancestor_map_entry.go delete mode 100644 v1/models/no_sql_connect_params.go delete mode 100644 v1/models/no_sql_log_data.go delete mode 100644 v1/models/no_sql_mirror_recovery_job_params.go delete mode 100644 v1/models/no_sql_recover_job_params.go delete mode 100644 v1/models/no_sql_recover_params.go delete mode 100644 v1/models/no_sql_recover_params_entity_log.go delete mode 100644 v1/models/no_sql_restore_object.go delete mode 100644 v1/models/no_sql_restore_object_object_restore_properties_map_entry.go delete mode 100644 v1/models/node.go delete mode 100644 v1/models/node_delete_result.go delete mode 100644 v1/models/node_hardware_info.go delete mode 100644 v1/models/node_interface_pair.go delete mode 100644 v1/models/node_network_interfaces.go delete mode 100644 v1/models/node_port.go delete mode 100644 v1/models/node_stats.go delete mode 100644 v1/models/node_status.go delete mode 100644 v1/models/node_status_result.go delete mode 100644 v1/models/node_system_disk_info.go delete mode 100644 v1/models/node_to_tiered_storage_directories_map.go delete mode 100644 v1/models/node_upgrade_status.go delete mode 100644 v1/models/noncurrent_version_expiration_action.go delete mode 100644 v1/models/notification_rule.go delete mode 100644 v1/models/notifications.go delete mode 100644 v1/models/ntp_servers.go delete mode 100644 v1/models/ntp_settings_config.go delete mode 100644 v1/models/o365_add_snapshot_arg.go delete mode 100644 v1/models/o365_add_snapshot_arg_group_info.go delete mode 100644 v1/models/o365_add_snapshot_arg_one_drive_info.go delete mode 100644 v1/models/o365_add_snapshot_arg_outlook_info.go delete mode 100644 v1/models/o365_add_snapshot_arg_public_folder_info.go delete mode 100644 v1/models/o365_add_snapshot_arg_sharepoint_info.go delete mode 100644 v1/models/o365_add_snapshot_arg_teams_info.go delete mode 100644 v1/models/o365_backup_env_params.go delete mode 100644 v1/models/o365_backup_params.go delete mode 100644 v1/models/o365_backup_params_site_info.go delete mode 100644 v1/models/o365_connect_params.go delete mode 100644 v1/models/o365_one_drive_restore_entity_params.go delete mode 100644 v1/models/o365_one_drive_restore_entity_params_drive.go delete mode 100644 v1/models/o365_one_drive_restore_entity_params_drive_item.go delete mode 100644 v1/models/o365_region_proto.go delete mode 100644 v1/models/object_field_selector.go delete mode 100644 v1/models/object_info.go delete mode 100644 v1/models/object_information.go delete mode 100644 v1/models/object_level_params.go delete mode 100644 v1/models/object_meta.go delete mode 100644 v1/models/object_meta_annotations_entry.go delete mode 100644 v1/models/object_meta_labels_entry.go delete mode 100644 v1/models/object_protection_info.go delete mode 100644 v1/models/object_reference.go delete mode 100644 v1/models/object_search_results.go delete mode 100644 v1/models/object_snapshot_document.go delete mode 100644 v1/models/object_snapshot_document_o365_params.go delete mode 100644 v1/models/object_snapshot_document_version_info.go delete mode 100644 v1/models/object_snapshot_document_version_info_record_stats.go delete mode 100644 v1/models/object_snapshot_document_version_info_uda_params.go delete mode 100644 v1/models/object_snapshot_document_volume_map_version.go delete mode 100644 v1/models/object_snapshot_document_volume_mount_i_o_info_map_version.go delete mode 100644 v1/models/object_snapshot_info.go delete mode 100644 v1/models/object_snapshot_info_job_uid.go delete mode 100644 v1/models/object_snapshot_type.go delete mode 100644 v1/models/objects_by_env.go delete mode 100644 v1/models/objects_discovery_params.go delete mode 100644 v1/models/objects_protected_by_policy.go delete mode 100644 v1/models/office365_credentials.go delete mode 100644 v1/models/office365_env_job_parameters.go delete mode 100644 v1/models/office365_group_info.go delete mode 100644 v1/models/office365_protection_source.go delete mode 100644 v1/models/office365_site_info.go delete mode 100644 v1/models/office365_team_info.go delete mode 100644 v1/models/office365_user_info.go delete mode 100644 v1/models/old_syslog_server.go delete mode 100644 v1/models/on_prem_deploy_target.go delete mode 100644 v1/models/on_prem_deploy_task_state_proto.go delete mode 100644 v1/models/one_drive_backup_env_params.go delete mode 100644 v1/models/one_drive_document_metadata.go delete mode 100644 v1/models/one_drive_env_job_parameters.go delete mode 100644 v1/models/one_drive_info.go delete mode 100644 v1/models/one_drive_item.go delete mode 100644 v1/models/one_drive_owner.go delete mode 100644 v1/models/one_drive_restore_parameters.go delete mode 100644 v1/models/oracle_app_params.go delete mode 100644 v1/models/oracle_archive_log_info.go delete mode 100644 v1/models/oracle_archive_log_info_oracle_archive_log_range.go delete mode 100644 v1/models/oracle_archive_log_info_oracle_archive_log_range_range_attributes.go delete mode 100644 v1/models/oracle_backup_job_params.go delete mode 100644 v1/models/oracle_backup_params.go delete mode 100644 v1/models/oracle_cloud_credentials.go delete mode 100644 v1/models/oracle_container_database_info.go delete mode 100644 v1/models/oracle_d_b_channel_info.go delete mode 100644 v1/models/oracle_d_b_channel_info_host_info.go delete mode 100644 v1/models/oracle_d_b_config.go delete mode 100644 v1/models/oracle_d_b_config_pfile_parameter_map_entry.go delete mode 100644 v1/models/oracle_d_b_config_redo_log_group_conf.go delete mode 100644 v1/models/oracle_data_guard_info.go delete mode 100644 v1/models/oracle_database_node.go delete mode 100644 v1/models/oracle_database_node_channel.go delete mode 100644 v1/models/oracle_env_job_parameters.go delete mode 100644 v1/models/oracle_host.go delete mode 100644 v1/models/oracle_pluggable_database_info.go delete mode 100644 v1/models/oracle_protection_source.go delete mode 100644 v1/models/oracle_recovery_validation_info.go delete mode 100644 v1/models/oracle_sbt_host_params.go delete mode 100644 v1/models/oracle_session.go delete mode 100644 v1/models/oracle_source_params.go delete mode 100644 v1/models/oracle_special_parameters.go delete mode 100644 v1/models/oracle_update_restore_task_options.go delete mode 100644 v1/models/oracle_vlan_info.go delete mode 100644 v1/models/org_info.go delete mode 100644 v1/models/org_v_d_c_network.go delete mode 100644 v1/models/org_vdc_network_params.go delete mode 100644 v1/models/outlook_backup_env_params.go delete mode 100644 v1/models/outlook_backup_params.go delete mode 100644 v1/models/outlook_env_job_parameters.go delete mode 100644 v1/models/outlook_folder.go delete mode 100644 v1/models/outlook_mailbox.go delete mode 100644 v1/models/outlook_restore_parameters.go delete mode 100644 v1/models/output_spec.go delete mode 100644 v1/models/overwrite_view_param.go delete mode 100644 v1/models/owner_info.go delete mode 100644 v1/models/ownership_controls_rule.go delete mode 100644 v1/models/p_d_b_entity_info.go delete mode 100644 v1/models/p_d_b_restore_param.go delete mode 100644 v1/models/p_d_b_restore_param_rename_pdb_map_entry.go delete mode 100644 v1/models/p_v_c_info.go delete mode 100644 v1/models/p_v_c_info_p_v_c_spec.go delete mode 100644 v1/models/p_v_c_info_p_v_c_spec_resources.go delete mode 100644 v1/models/p_v_c_info_p_v_c_spec_resources_requests_entry.go delete mode 100644 v1/models/package_details.go delete mode 100644 v1/models/pagination_parameters.go delete mode 100644 v1/models/password_strength.go delete mode 100644 v1/models/password_strength_params.go delete mode 100644 v1/models/pattern.go delete mode 100644 v1/models/pattern_request_body.go delete mode 100644 v1/models/perform_restore_job_state_proto.go delete mode 100644 v1/models/perform_restore_job_state_proto_restore_task.go delete mode 100644 v1/models/perform_restore_task_state_proto.go delete mode 100644 v1/models/peristent_volume_status.go delete mode 100644 v1/models/permission.go delete mode 100644 v1/models/permission_set.go delete mode 100644 v1/models/physical_backup_env_params.go delete mode 100644 v1/models/physical_backup_params.go delete mode 100644 v1/models/physical_backup_params_volume_guid_device_key_map_entry.go delete mode 100644 v1/models/physical_backup_source_params.go delete mode 100644 v1/models/physical_env_job_parameters.go delete mode 100644 v1/models/physical_file_backup_params.go delete mode 100644 v1/models/physical_file_backup_params_backup_path_info.go delete mode 100644 v1/models/physical_file_backup_params_global_include_exclude.go delete mode 100644 v1/models/physical_node_configuration.go delete mode 100644 v1/models/physical_params.go delete mode 100644 v1/models/physical_protection_source.go delete mode 100644 v1/models/physical_protection_source_id.go delete mode 100644 v1/models/physical_snapshot_params.go delete mode 100644 v1/models/physical_special_parameters.go delete mode 100644 v1/models/physical_uid.go delete mode 100644 v1/models/physical_volume.go delete mode 100644 v1/models/platform_params.go delete mode 100644 v1/models/pod_info_pod_spec_toleration.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_a_w_s_e_b_s.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_azure_disk.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_azure_file.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_c_s_i.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_c_s_i_volume_attributes_entry.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_cephfs.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_cinder.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_config_map.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_downward_api.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file_resource_field_selector.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_empty_dir.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_ephemeral_volume_source.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_f_c.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_flex.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_flex_options_entry.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_flocker.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_gce_persistent_disk.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_gluster_fs.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_host_path.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_i_s_c_s_i.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_key_to_path.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_local.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_n_f_s.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_p_v_c.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_photon_persistent_disk.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_portworx.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_projected.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_projected_volume_projection.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_config_map_projection.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_downward_api_projection.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_service_account_token_projection.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_quobyte.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_r_b_d.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_scale_i_o.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_secret_volume_source.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_storage_o_s.go delete mode 100644 v1/models/pod_info_pod_spec_volume_info_vsphere_virtual_disk.go delete mode 100644 v1/models/pod_metadata.go delete mode 100644 v1/models/pod_metadata_volume_info.go delete mode 100644 v1/models/postgres_node_info.go delete mode 100644 v1/models/power_state_config_proto.go delete mode 100644 v1/models/pre_check_validation.go delete mode 100644 v1/models/preferences.go delete mode 100644 v1/models/preferred_domain_controller.go delete mode 100644 v1/models/preservation_hold_library_protection_params.go delete mode 100644 v1/models/primary_backup_run_stats.go delete mode 100644 v1/models/principal.go delete mode 100644 v1/models/private_a_a_g_info.go delete mode 100644 v1/models/private_a_a_g_replica_info.go delete mode 100644 v1/models/private_acropolis_entity.go delete mode 100644 v1/models/private_ad_entity.go delete mode 100644 v1/models/private_agent_entity.go delete mode 100644 v1/models/private_aws_credentials.go delete mode 100644 v1/models/private_aws_entity.go delete mode 100644 v1/models/private_azure_credentials.go delete mode 100644 v1/models/private_azure_entity.go delete mode 100644 v1/models/private_bond_slave_info.go delete mode 100644 v1/models/private_cassandra_connect_params.go delete mode 100644 v1/models/private_cassandra_entity.go delete mode 100644 v1/models/private_cassandra_security_info.go delete mode 100644 v1/models/private_cbt_info.go delete mode 100644 v1/models/private_cifs_share_info.go delete mode 100644 v1/models/private_cluster_info.go delete mode 100644 v1/models/private_couchbase_connect_params.go delete mode 100644 v1/models/private_couchbase_entity.go delete mode 100644 v1/models/private_credentials.go delete mode 100644 v1/models/private_datastore_info.go delete mode 100644 v1/models/private_day_time.go delete mode 100644 v1/models/private_day_time_window.go delete mode 100644 v1/models/private_elastifile_entity.go delete mode 100644 v1/models/private_entity_proto.go delete mode 100644 v1/models/private_error.go delete mode 100644 v1/models/private_error_proto.go delete mode 100644 v1/models/private_exchange_d_a_g_database.go delete mode 100644 v1/models/private_exchange_database_copy_info.go delete mode 100644 v1/models/private_exchange_entity.go delete mode 100644 v1/models/private_flashblade_entity.go delete mode 100644 v1/models/private_fleet_network_params.go delete mode 100644 v1/models/private_gcp_credentials.go delete mode 100644 v1/models/private_gcp_entity.go delete mode 100644 v1/models/private_generic_nas_entity.go delete mode 100644 v1/models/private_gpfs_entity.go delete mode 100644 v1/models/private_h_base_connect_params.go delete mode 100644 v1/models/private_hbase_entity.go delete mode 100644 v1/models/private_hdfs_connect_params.go delete mode 100644 v1/models/private_hdfs_entity.go delete mode 100644 v1/models/private_hive_connect_params.go delete mode 100644 v1/models/private_hive_entity.go delete mode 100644 v1/models/private_host_settings_check_result.go delete mode 100644 v1/models/private_hyperflex_entity.go delete mode 100644 v1/models/private_hyperv_entity.go delete mode 100644 v1/models/private_interface_stats.go delete mode 100644 v1/models/private_io_preferential_tier.go delete mode 100644 v1/models/private_isilon_entity.go delete mode 100644 v1/models/private_kubernetes_entity.go delete mode 100644 v1/models/private_kvm_entity.go delete mode 100644 v1/models/private_mongo_d_b_connect_params.go delete mode 100644 v1/models/private_mongodb_entity.go delete mode 100644 v1/models/private_netapp_entity.go delete mode 100644 v1/models/private_network_interface.go delete mode 100644 v1/models/private_o365_entity.go delete mode 100644 v1/models/private_oracle_entity.go delete mode 100644 v1/models/private_physical_entity.go delete mode 100644 v1/models/private_pure_entity.go delete mode 100644 v1/models/private_registered_app_info.go delete mode 100644 v1/models/private_s3_proto_entity.go delete mode 100644 v1/models/private_sfdc_entity.go delete mode 100644 v1/models/private_source_throttling_configuration.go delete mode 100644 v1/models/private_sql_entity.go delete mode 100644 v1/models/private_subnet.go delete mode 100644 v1/models/private_task_event.go delete mode 100644 v1/models/private_throttling_configuration.go delete mode 100644 v1/models/private_uda_entity.go delete mode 100644 v1/models/private_uplink_switch_info.go delete mode 100644 v1/models/private_user.go delete mode 100644 v1/models/private_user_id.go delete mode 100644 v1/models/private_view_entity.go delete mode 100644 v1/models/private_virtual_disk_basic_info.go delete mode 100644 v1/models/private_virtual_disk_config.go delete mode 100644 v1/models/private_virtual_disk_info.go delete mode 100644 v1/models/private_vmware_entity.go delete mode 100644 v1/models/private_volume_info.go delete mode 100644 v1/models/privilege_info.go delete mode 100644 v1/models/product_model_interface_tuple.go delete mode 100644 v1/models/project.go delete mode 100644 v1/models/properties.go delete mode 100644 v1/models/properties_status.go delete mode 100644 v1/models/protect_object_parameters.go delete mode 100644 v1/models/protected_object.go delete mode 100644 v1/models/protected_object_privileges.go delete mode 100644 v1/models/protected_objects_by_env.go delete mode 100644 v1/models/protected_objects_summary.go delete mode 100644 v1/models/protected_objects_summary_by_env.go delete mode 100644 v1/models/protected_objects_tile.go delete mode 100644 v1/models/protected_source_summary.go delete mode 100644 v1/models/protected_vm_info.go delete mode 100644 v1/models/protected_vm_info_stats.go delete mode 100644 v1/models/protection_info.go delete mode 100644 v1/models/protection_job.go delete mode 100644 v1/models/protection_job_audit_trail.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_info.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.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_run_stats.go delete mode 100644 v1/models/protection_job_start_time.go delete mode 100644 v1/models/protection_job_summary.go delete mode 100644 v1/models/protection_job_summary_for_policies.go delete mode 100644 v1/models/protection_job_summary_stats.go delete mode 100644 v1/models/protection_job_uid.go delete mode 100644 v1/models/protection_object_summary.go delete mode 100644 v1/models/protection_object_summary_protection_source.go delete mode 100644 v1/models/protection_policy.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.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_policy_summary.go delete mode 100644 v1/models/protection_run_errors.go delete mode 100644 v1/models/protection_run_instance.go delete mode 100644 v1/models/protection_run_instance_job_uid.go delete mode 100644 v1/models/protection_run_response.go delete mode 100644 v1/models/protection_run_shell_info_proto.go delete mode 100644 v1/models/protection_run_state_proto.go delete mode 100644 v1/models/protection_runs_stats.go delete mode 100644 v1/models/protection_runs_summary.go delete mode 100644 v1/models/protection_shell_info.go delete mode 100644 v1/models/protection_source.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_and_application_restore_objects.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.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_response.go delete mode 100644 v1/models/protection_source_sfdc_protection_source.go delete mode 100644 v1/models/protection_source_snapshot_information.go delete mode 100644 v1/models/protection_source_sql_protection_source.go delete mode 100644 v1/models/protection_source_tree_info.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_uid.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.go delete mode 100644 v1/models/protection_sources_job_runs_report_element_protection_source.go delete mode 100644 v1/models/protection_sources_jobs_summary_report_response_wrapper.go delete mode 100644 v1/models/protection_sources_summary_stats.go delete mode 100644 v1/models/protection_sources_summary_stats_protection_source.go delete mode 100644 v1/models/protection_stats.go delete mode 100644 v1/models/protection_summary.go delete mode 100644 v1/models/protection_summary_by_env.go delete mode 100644 v1/models/protection_tile.go delete mode 100644 v1/models/protection_trend.go delete mode 100644 v1/models/proxy_server.go delete mode 100644 v1/models/pst_parameters.go delete mode 100644 v1/models/public_folder.go delete mode 100644 v1/models/public_folders_backup_env_params.go delete mode 100644 v1/models/public_folders_restore_parameters.go delete mode 100644 v1/models/pure_protection_source.go delete mode 100644 v1/models/q_star_server_credentials.go delete mode 100644 v1/models/qo_s.go delete mode 100644 v1/models/qo_s_policy.go delete mode 100644 v1/models/quota_and_usage_in_view.go delete mode 100644 v1/models/quota_policy.go delete mode 100644 v1/models/r_d_s_db_connector_params.go delete mode 100644 v1/models/ransomware_info.go delete mode 100644 v1/models/rds_params.go delete mode 100644 v1/models/read_dir_result.go delete mode 100644 v1/models/read_i_o_data_proto.go delete mode 100644 v1/models/read_i_o_data_proto_read_i_o.go delete mode 100644 v1/models/recover_arg.go delete mode 100644 v1/models/recover_disks_task_state_proto.go delete mode 100644 v1/models/recover_task_request.go delete mode 100644 v1/models/recover_virtual_disk_info_proto.go delete mode 100644 v1/models/recover_virtual_disk_params.go delete mode 100644 v1/models/recover_virtual_disk_params_virtual_disk_mapping.go delete mode 100644 v1/models/recover_volumes_params.go delete mode 100644 v1/models/recover_volumes_params_mapping.go delete mode 100644 v1/models/recover_volumes_task_state_proto.go delete mode 100644 v1/models/recover_volumes_task_state_proto_task_result.go delete mode 100644 v1/models/recoveries_tile.go delete mode 100644 v1/models/recovery_task_info.go delete mode 100644 v1/models/reducer_info.go delete mode 100644 v1/models/reducers_wrapper.go delete mode 100644 v1/models/register_application_servers_parameters.go delete mode 100644 v1/models/register_or_update_app_owner_arg.go delete mode 100644 v1/models/register_protection_source_parameters.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/register_remote_cluster.go delete mode 100644 v1/models/registered_app_info.go delete mode 100644 v1/models/registered_application_server.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_entity_azure_params.go delete mode 100644 v1/models/registered_entity_cassandra_params.go delete mode 100644 v1/models/registered_entity_couchbase_params.go delete mode 100644 v1/models/registered_entity_generic_nas_params.go delete mode 100644 v1/models/registered_entity_h_base_params.go delete mode 100644 v1/models/registered_entity_hdfs_params.go delete mode 100644 v1/models/registered_entity_hive_params.go delete mode 100644 v1/models/registered_entity_info.go delete mode 100644 v1/models/registered_entity_info_restricted_object_id_map_entry.go delete mode 100644 v1/models/registered_entity_isilon_params.go delete mode 100644 v1/models/registered_entity_kubernetes_params.go delete mode 100644 v1/models/registered_entity_kubernetes_params_service_annotations_entry.go delete mode 100644 v1/models/registered_entity_mongo_d_b_params.go delete mode 100644 v1/models/registered_entity_o365_params.go delete mode 100644 v1/models/registered_entity_o365_params_team_entity_additional_params.go delete mode 100644 v1/models/registered_entity_o365_params_user_entity_discovery_params.go delete mode 100644 v1/models/registered_entity_params.go delete mode 100644 v1/models/registered_entity_physical_params.go delete mode 100644 v1/models/registered_entity_report.go delete mode 100644 v1/models/registered_entity_sfdc_params.go delete mode 100644 v1/models/registered_entity_uda_params.go delete mode 100644 v1/models/registered_entity_uda_params_source_arguments_map_entry.go delete mode 100644 v1/models/registered_entity_v_c_d_params.go delete mode 100644 v1/models/registered_entity_v_mware_params.go delete mode 100644 v1/models/registered_protection_source_isilon_params.go delete mode 100644 v1/models/registered_source_info.go delete mode 100644 v1/models/registered_source_info_nas_mount_credentials.go delete mode 100644 v1/models/remote_cluster.go delete mode 100644 v1/models/remote_host.go delete mode 100644 v1/models/remote_host_connector_params.go delete mode 100644 v1/models/remote_job_script.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.go delete mode 100644 v1/models/remote_protection_job_information_job_uid.go delete mode 100644 v1/models/remote_protection_job_run_information.go delete mode 100644 v1/models/remote_protection_job_run_information_job_uid.go delete mode 100644 v1/models/remote_protection_job_run_instance.go delete mode 100644 v1/models/remote_protection_job_run_instance_archive_task_uid.go delete mode 100644 v1/models/remote_restore_indexing_status.go delete mode 100644 v1/models/remote_restore_indexing_status_indexing_task_uid.go delete mode 100644 v1/models/remote_restore_snapshot_status.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_script_path_and_params.go delete mode 100644 v1/models/remote_script_proto.go delete mode 100644 v1/models/remote_vault_restore_task_status.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.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.go delete mode 100644 v1/models/remote_vault_search_job_results_search_job_uid.go delete mode 100644 v1/models/remote_view_config.go delete mode 100644 v1/models/rename_object_param_proto.go delete mode 100644 v1/models/rename_view_param.go delete mode 100644 v1/models/replica_info.go delete mode 100644 v1/models/replicate_snapshots_to_a_w_s_params.go delete mode 100644 v1/models/replicate_snapshots_to_azure_params.go delete mode 100644 v1/models/replication_encryption_key_reponse.go delete mode 100644 v1/models/replication_info_base.go delete mode 100644 v1/models/replication_info_base_filtered_backup_task_id_map_entry.go delete mode 100644 v1/models/replication_target.go delete mode 100644 v1/models/replication_target_settings.go delete mode 100644 v1/models/request_error.go delete mode 100644 v1/models/reset_s3_secret_key_parameters.go delete mode 100644 v1/models/resource_pool_result.go delete mode 100644 v1/models/restore_a_d_app_object_params.go delete mode 100644 v1/models/restore_acropolis_v_ms_params.go delete mode 100644 v1/models/restore_acropolis_vm_param.go delete mode 100644 v1/models/restore_acropolis_vm_param_network_config_info.go delete mode 100644 v1/models/restore_acropolis_vm_param_network_config_info_n_i_c_spec.go delete mode 100644 v1/models/restore_ad_guid_pair.go delete mode 100644 v1/models/restore_app_arg.go delete mode 100644 v1/models/restore_app_object.go delete mode 100644 v1/models/restore_app_object_params.go delete mode 100644 v1/models/restore_app_params.go delete mode 100644 v1/models/restore_app_task_state_proto.go delete mode 100644 v1/models/restore_azure_sql_params.go delete mode 100644 v1/models/restore_count_by_object_type.go delete mode 100644 v1/models/restore_env_stats.go delete mode 100644 v1/models/restore_exchange_params.go delete mode 100644 v1/models/restore_exchange_params_database_options.go delete mode 100644 v1/models/restore_exchange_params_view_options.go delete mode 100644 v1/models/restore_file_copy_stats.go delete mode 100644 v1/models/restore_file_params.go delete mode 100644 v1/models/restore_file_result_info.go delete mode 100644 v1/models/restore_files_info_proto.go delete mode 100644 v1/models/restore_files_params.go delete mode 100644 v1/models/restore_files_params_directory_name_security_style_map_entry.go delete mode 100644 v1/models/restore_files_preferences.go delete mode 100644 v1/models/restore_files_task_request.go delete mode 100644 v1/models/restore_files_task_request_source_object_info.go delete mode 100644 v1/models/restore_files_task_state_proto.go delete mode 100644 v1/models/restore_hyper_v_vm_params.go delete mode 100644 v1/models/restore_info.go delete mode 100644 v1/models/restore_info_proto.go delete mode 100644 v1/models/restore_info_proto_restore_entity.go delete mode 100644 v1/models/restore_k_vm_v_ms_params.go delete mode 100644 v1/models/restore_kubernetes_namespaces_params.go delete mode 100644 v1/models/restore_o365_groups_params.go delete mode 100644 v1/models/restore_o365_groups_params_group_granular_params.go delete mode 100644 v1/models/restore_o365_groups_params_m_s_group_info.go delete mode 100644 v1/models/restore_o365_public_folders_params.go delete mode 100644 v1/models/restore_o365_public_folders_params_public_folder.go delete mode 100644 v1/models/restore_o365_public_folders_params_root_public_folder.go delete mode 100644 v1/models/restore_o365_teams_params.go delete mode 100644 v1/models/restore_o365_teams_params_m_s_team_info.go delete mode 100644 v1/models/restore_o365_teams_params_source_channel.go delete mode 100644 v1/models/restore_o365_teams_params_target_channel.go delete mode 100644 v1/models/restore_object.go delete mode 100644 v1/models/restore_object_details.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_object_params.go delete mode 100644 v1/models/restore_object_state.go delete mode 100644 v1/models/restore_one_drive_params.go delete mode 100644 v1/models/restore_one_drive_params_drive_item.go delete mode 100644 v1/models/restore_one_drive_params_drive_owner.go delete mode 100644 v1/models/restore_one_drive_params_drive_owner_drive.go delete mode 100644 v1/models/restore_oracle_app_object_params.go delete mode 100644 v1/models/restore_oracle_app_object_params_alternate_location_params.go delete mode 100644 v1/models/restore_oracle_app_object_params_key_value_pair.go delete mode 100644 v1/models/restore_outlook_params.go delete mode 100644 v1/models/restore_outlook_params_folder.go delete mode 100644 v1/models/restore_outlook_params_mailbox.go delete mode 100644 v1/models/restore_points_for_time_range.go delete mode 100644 v1/models/restore_points_for_time_range_param.go delete mode 100644 v1/models/restore_r_d_s_postgres_params.go delete mode 100644 v1/models/restore_s3_params.go delete mode 100644 v1/models/restore_s3_params_new_location_params.go delete mode 100644 v1/models/restore_san_params.go delete mode 100644 v1/models/restore_site_params.go delete mode 100644 v1/models/restore_site_params_drive_item.go delete mode 100644 v1/models/restore_site_params_site_owner.go delete mode 100644 v1/models/restore_site_params_site_owner_drive.go delete mode 100644 v1/models/restore_spfile_or_pfile_info.go delete mode 100644 v1/models/restore_sql_app_object_params.go delete mode 100644 v1/models/restore_standby_task_state_proto.go delete mode 100644 v1/models/restore_stats.go delete mode 100644 v1/models/restore_task.go delete mode 100644 v1/models/restore_task_additional_params.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 delete mode 100644 v1/models/restore_task_state_base_proto.go delete mode 100644 v1/models/restore_task_wrapper.go delete mode 100644 v1/models/restore_v_mware_vm_params.go delete mode 100644 v1/models/restore_vapp_info.go delete mode 100644 v1/models/restore_wrapper_proto.go delete mode 100644 v1/models/restored_file_info.go delete mode 100644 v1/models/restored_file_info_list.go delete mode 100644 v1/models/restored_object_network_config_proto.go delete mode 100644 v1/models/restored_object_v_c_d_config_proto.go delete mode 100644 v1/models/retention_policy_proto.go delete mode 100644 v1/models/retrieve_archive_info.go delete mode 100644 v1/models/retrieve_archive_info_retrieved_entity.go delete mode 100644 v1/models/retrieve_archive_task_state_proto.go delete mode 100644 v1/models/retrieve_archive_task_state_proto_download_files_info.go delete mode 100644 v1/models/role.go delete mode 100644 v1/models/role_create_parameters.go delete mode 100644 v1/models/role_delete_parameters.go delete mode 100644 v1/models/role_update_parameters.go delete mode 100644 v1/models/root_public_folder.go delete mode 100644 v1/models/route.go delete mode 100644 v1/models/rpo_policy_settings.go delete mode 100644 v1/models/rpo_schedule.go delete mode 100644 v1/models/run_diagnostics_message.go delete mode 100644 v1/models/run_job_snapshot_target.go delete mode 100644 v1/models/run_map_reduce_instance_result.go delete mode 100644 v1/models/run_map_reduce_params.go delete mode 100644 v1/models/run_now_parameters.go delete mode 100644 v1/models/run_now_physical_parameters.go delete mode 100644 v1/models/run_protection_job_param.go delete mode 100644 v1/models/run_uid.go delete mode 100644 v1/models/s3_backup_job_params.go delete mode 100644 v1/models/s3_bucket_config_proto.go delete mode 100644 v1/models/s3_bucket_config_proto_prefix_to_child_bucket_map_entry.go delete mode 100644 v1/models/s3_bucket_config_proto_tag_map_entry.go delete mode 100644 v1/models/s3_bucket_info.go delete mode 100644 v1/models/s3_bucket_params_proto.go delete mode 100644 v1/models/s3_entity_info.go delete mode 100644 v1/models/s3_view_backup_properties.go delete mode 100644 v1/models/s_a_n_backup_params.go delete mode 100644 v1/models/s_a_n_group_entity_recover_params.go delete mode 100644 v1/models/s_a_n_group_entity_recover_params_s_a_n_volume_recover_params.go delete mode 100644 v1/models/s_a_n_recover_params.go delete mode 100644 v1/models/s_a_n_storage_array_snapshot_recover_params.go delete mode 100644 v1/models/s_s_l_verification.go delete mode 100644 v1/models/salesforce_account_info.go delete mode 100644 v1/models/same_config_ir_recovery_options.go delete mode 100644 v1/models/sample.go delete mode 100644 v1/models/san_backup_job_params.go delete mode 100644 v1/models/san_env_job_parameters.go delete mode 100644 v1/models/san_external_resource.go delete mode 100644 v1/models/san_port.go delete mode 100644 v1/models/san_storage_array.go delete mode 100644 v1/models/san_volume.go delete mode 100644 v1/models/schedule_proto.go delete mode 100644 v1/models/scheduler_proto.go delete mode 100644 v1/models/scheduler_proto_scheduler_job.go delete mode 100644 v1/models/scheduler_proto_scheduler_job_schedule.go delete mode 100644 v1/models/scheduler_proto_scheduler_job_schedule_job_parameters.go delete mode 100644 v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter.go delete mode 100644 v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report.go delete mode 100644 v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report_parameters.go delete mode 100644 v1/models/scheduling_policy.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_proto.go delete mode 100644 v1/models/scheduling_policy_proto_continuous_schedule.go delete mode 100644 v1/models/scheduling_policy_proto_daily_schedule.go delete mode 100644 v1/models/scheduling_policy_proto_date_schedule.go delete mode 100644 v1/models/scheduling_policy_proto_monthly_schedule.go delete mode 100644 v1/models/scheduling_policy_proto_r_p_o_schedule.go delete mode 100644 v1/models/scheduling_policy_proto_yearly_schedule.go delete mode 100644 v1/models/scheduling_policy_rpo_schedule.go delete mode 100644 v1/models/schema_info.go delete mode 100644 v1/models/script_execution_status.go delete mode 100644 v1/models/script_path_and_params.go delete mode 100644 v1/models/search_production_ad_objects_request.go delete mode 100644 v1/models/sequence_number.go delete mode 100644 v1/models/sequencer.go delete mode 100644 v1/models/service_access_config.go delete mode 100644 v1/models/service_account_credentials.go delete mode 100644 v1/models/service_flag_request.go delete mode 100644 v1/models/service_gflags.go delete mode 100644 v1/models/service_process_entry.go delete mode 100644 v1/models/service_state.go delete mode 100644 v1/models/service_state_result.go delete mode 100644 v1/models/services_lock_info.go delete mode 100644 v1/models/session_configuration.go delete mode 100644 v1/models/session_user.go delete mode 100644 v1/models/setup_restore_disk_task_info_proto.go delete mode 100644 v1/models/sfdc_backup_job_params.go delete mode 100644 v1/models/sfdc_backup_source_params_proto.go delete mode 100644 v1/models/sfdc_object.go delete mode 100644 v1/models/sfdc_object_fields.go delete mode 100644 v1/models/sfdc_org.go delete mode 100644 v1/models/sfdc_params.go delete mode 100644 v1/models/sfdc_protection_source.go delete mode 100644 v1/models/sfdc_recover_job_params.go delete mode 100644 v1/models/sfdc_recover_job_params_prev_full_sfdc_server_timestamp_usecs_map_entry.go delete mode 100644 v1/models/sfdc_recover_params.go delete mode 100644 v1/models/sfdc_restore_object.go delete mode 100644 v1/models/sfdc_restore_object_params.go delete mode 100644 v1/models/share.go delete mode 100644 v1/models/share_point_restore_parameters.go delete mode 100644 v1/models/sharep_point_site_backup_env_params.go delete mode 100644 v1/models/sharepoint_backup_source_params.go delete mode 100644 v1/models/sharepoint_document_metadata.go delete mode 100644 v1/models/sharepoint_item_metadata.go delete mode 100644 v1/models/site_backup_file.go delete mode 100644 v1/models/site_backup_status.go delete mode 100644 v1/models/site_continuity_info.go delete mode 100644 v1/models/site_drive_info.go delete mode 100644 v1/models/site_drive_item.go delete mode 100644 v1/models/site_identity.go delete mode 100644 v1/models/site_info.go delete mode 100644 v1/models/site_owner.go delete mode 100644 v1/models/site_property.go delete mode 100644 v1/models/sites_discovery_params.go delete mode 100644 v1/models/size_info.go delete mode 100644 v1/models/smb_active_file_opens_response.go delete mode 100644 v1/models/smb_active_file_path.go delete mode 100644 v1/models/smb_active_open.go delete mode 100644 v1/models/smb_active_session.go delete mode 100644 v1/models/smb_connection.go delete mode 100644 v1/models/smb_lease_info.go delete mode 100644 v1/models/smb_permission.go delete mode 100644 v1/models/smb_permissions_info.go delete mode 100644 v1/models/smb_principal.go delete mode 100644 v1/models/snapshot_archival_copy_policy.go delete mode 100644 v1/models/snapshot_archival_copy_policy_target.go delete mode 100644 v1/models/snapshot_attempt.go delete mode 100644 v1/models/snapshot_cloud_copy_policy.go delete mode 100644 v1/models/snapshot_copy_task.go delete mode 100644 v1/models/snapshot_delta_proto.go delete mode 100644 v1/models/snapshot_info.go delete mode 100644 v1/models/snapshot_info_proto.go delete mode 100644 v1/models/snapshot_label.go delete mode 100644 v1/models/snapshot_manager_params.go delete mode 100644 v1/models/snapshot_replicas.go delete mode 100644 v1/models/snapshot_replicas_replica.go delete mode 100644 v1/models/snapshot_replication_copy_policy.go delete mode 100644 v1/models/snapshot_replication_copy_policy_target.go delete mode 100644 v1/models/snapshot_target.go delete mode 100644 v1/models/snapshot_target_policy_proto.go delete mode 100644 v1/models/snapshot_target_settings.go delete mode 100644 v1/models/snapshot_version.go delete mode 100644 v1/models/snmp_config.go delete mode 100644 v1/models/snmp_sys_info.go delete mode 100644 v1/models/snmp_user.go delete mode 100644 v1/models/source_app_params.go delete mode 100644 v1/models/source_backup_status.go delete mode 100644 v1/models/source_filters.go delete mode 100644 v1/models/source_filters_source_filter.go delete mode 100644 v1/models/source_for_principal_param.go delete mode 100644 v1/models/source_info.go delete mode 100644 v1/models/source_special_parameter.go delete mode 100644 v1/models/source_special_parameter_vm_credentials.go delete mode 100644 v1/models/source_throttling_configuration.go delete mode 100644 v1/models/sources_for_sid.go delete mode 100644 v1/models/space_usage_policy.go delete mode 100644 v1/models/spog_context.go delete mode 100644 v1/models/sql_aag_host_and_databases.go delete mode 100644 v1/models/sql_backup_job_params.go delete mode 100644 v1/models/sql_backup_params.go delete mode 100644 v1/models/sql_database_file_group_info.go delete mode 100644 v1/models/sql_env_job_parameters.go delete mode 100644 v1/models/sql_id.go delete mode 100644 v1/models/sql_instance_info.go delete mode 100644 v1/models/sql_instance_info_edition_info.go delete mode 100644 v1/models/sql_instance_info_product_build_type_info.go delete mode 100644 v1/models/sql_instance_info_product_level_info.go delete mode 100644 v1/models/sql_instance_info_product_update_level_info.go delete mode 100644 v1/models/sql_package.go delete mode 100644 v1/models/sql_protection_source.go delete mode 100644 v1/models/sql_restore_parameters.go delete mode 100644 v1/models/sql_server_instance_version.go delete mode 100644 v1/models/sql_source_id.go delete mode 100644 v1/models/sql_update_restore_task_options.go delete mode 100644 v1/models/ssl_certificate_config.go delete mode 100644 v1/models/ssl_verification.go delete mode 100644 v1/models/standby_resource.go delete mode 100644 v1/models/statement.go delete mode 100644 v1/models/stats_group.go delete mode 100644 v1/models/stop_remote_vault_search_job_parameters.go delete mode 100644 v1/models/stop_remote_vault_search_job_parameters_search_job_uid.go delete mode 100644 v1/models/storage_array_snapshot_config_params.go delete mode 100644 v1/models/storage_array_snapshot_max_snapshot_config_params.go delete mode 100644 v1/models/storage_array_snapshot_max_space_config_params.go delete mode 100644 v1/models/storage_array_snapshot_throttling_policy.go delete mode 100644 v1/models/storage_domain_stats.go delete mode 100644 v1/models/storage_efficiency_tile.go delete mode 100644 v1/models/storage_policy.go delete mode 100644 v1/models/storage_policy_override.go delete mode 100644 v1/models/storage_profile.go delete mode 100644 v1/models/storage_snapshot_provider_params.go delete mode 100644 v1/models/storage_stats.go delete mode 100644 v1/models/string_entity_ids_proto.go delete mode 100644 v1/models/string_entity_ids_proto_string_id.go delete mode 100644 v1/models/stubbing_policy_proto.go delete mode 100644 v1/models/subnet.go delete mode 100644 v1/models/subscription_info.go delete mode 100644 v1/models/supported_config.go delete mode 100644 v1/models/supported_pattern.go delete mode 100644 v1/models/swift_container_tagging_proto.go delete mode 100644 v1/models/swift_params.go delete mode 100644 v1/models/system_app_status_result.go delete mode 100644 v1/models/system_resource_info.go delete mode 100644 v1/models/table_info.go delete mode 100644 v1/models/tag_attribute.go delete mode 100644 v1/models/tag_attributes.go delete mode 100644 v1/models/tagged_snapshots.go delete mode 100644 v1/models/tags_operation_parameters.go delete mode 100644 v1/models/tags_operation_result.go delete mode 100644 v1/models/tape_media_information.go delete mode 100644 v1/models/task.go delete mode 100644 v1/models/task_attribute.go delete mode 100644 v1/models/task_event.go delete mode 100644 v1/models/task_notification.go delete mode 100644 v1/models/task_progress.go delete mode 100644 v1/models/task_status.go delete mode 100644 v1/models/teams_additional_params.go delete mode 100644 v1/models/teams_backup_env_params.go delete mode 100644 v1/models/tenant.go delete mode 100644 v1/models/tenant_access.go delete mode 100644 v1/models/tenant_active_directory_update.go delete mode 100644 v1/models/tenant_active_directory_update_parameters.go delete mode 100644 v1/models/tenant_config.go delete mode 100644 v1/models/tenant_create_parameters.go delete mode 100644 v1/models/tenant_deletion_info.go delete mode 100644 v1/models/tenant_entity_update.go delete mode 100644 v1/models/tenant_entity_update_parameters.go delete mode 100644 v1/models/tenant_group_update_parameters.go delete mode 100644 v1/models/tenant_id_data.go delete mode 100644 v1/models/tenant_info.go delete mode 100644 v1/models/tenant_ldap_provider_update.go delete mode 100644 v1/models/tenant_ldap_provider_update_parameters.go delete mode 100644 v1/models/tenant_protection_job_update.go delete mode 100644 v1/models/tenant_protection_job_update_parameters.go delete mode 100644 v1/models/tenant_protection_policy_update.go delete mode 100644 v1/models/tenant_protection_policy_update_parameters.go delete mode 100644 v1/models/tenant_proxy.go delete mode 100644 v1/models/tenant_stats.go delete mode 100644 v1/models/tenant_update.go delete mode 100644 v1/models/tenant_user_update_parameters.go delete mode 100644 v1/models/tenant_view_box_update.go delete mode 100644 v1/models/tenant_view_box_update_parameters.go delete mode 100644 v1/models/tenant_view_update.go delete mode 100644 v1/models/tenant_view_update_parameters.go delete mode 100644 v1/models/tenant_vlan_update.go delete mode 100644 v1/models/tenant_vlan_update_parameters.go delete mode 100644 v1/models/threat_protection_info.go delete mode 100644 v1/models/throttling_configuration.go delete mode 100644 v1/models/throttling_configuration_throttling_window.go delete mode 100644 v1/models/throttling_policy.go delete mode 100644 v1/models/throttling_policy_datastore_streams_config.go delete mode 100644 v1/models/throttling_policy_datastore_throttling_policy.go delete mode 100644 v1/models/throttling_policy_latency_thresholds.go delete mode 100644 v1/models/throttling_policy_override.go delete mode 100644 v1/models/throttling_policy_parameters.go delete mode 100644 v1/models/throttling_policy_registered_source_throttling_config.go delete mode 100644 v1/models/throttling_policy_storage_array_snapshot_max_snapshot_config.go delete mode 100644 v1/models/throttling_policy_storage_array_snapshot_max_space_config.go delete mode 100644 v1/models/throttling_policy_storage_array_snapshot_throttling_policy.go delete mode 100644 v1/models/throttling_window.go delete mode 100644 v1/models/throughput_tile.go delete mode 100644 v1/models/tiering_audit_log_configuration.go delete mode 100644 v1/models/tiering_info.go delete mode 100644 v1/models/tiering_task_info.go delete mode 100644 v1/models/time.go delete mode 100644 v1/models/time_of_a_week.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/time_of_day.go delete mode 100644 v1/models/time_range.go delete mode 100644 v1/models/time_range_attributes.go delete mode 100644 v1/models/time_range_info.go delete mode 100644 v1/models/time_range_settings.go delete mode 100644 v1/models/time_range_usecs.go delete mode 100644 v1/models/time_series_schema_response.go delete mode 100644 v1/models/time_window.go delete mode 100644 v1/models/trending_data.go delete mode 100644 v1/models/uda_backup_job_params.go delete mode 100644 v1/models/uda_backup_job_params_backup_job_arguments_map_entry.go delete mode 100644 v1/models/uda_backup_params.go delete mode 100644 v1/models/uda_backup_run_params.go delete mode 100644 v1/models/uda_backup_run_params_uda_externally_triggered_run_params.go delete mode 100644 v1/models/uda_backup_run_params_uda_externally_triggered_run_params_args_map_entry.go delete mode 100644 v1/models/uda_backup_source_params.go delete mode 100644 v1/models/uda_cluster.go delete mode 100644 v1/models/uda_connect_params.go delete mode 100644 v1/models/uda_custom_argument.go delete mode 100644 v1/models/uda_object.go delete mode 100644 v1/models/uda_objects.go delete mode 100644 v1/models/uda_protection_source.go delete mode 100644 v1/models/uda_recover_job_params.go delete mode 100644 v1/models/uda_recover_job_params_restore_job_arguments_map_entry.go delete mode 100644 v1/models/uda_recover_job_params_source_arguments_map_entry.go delete mode 100644 v1/models/uda_recover_params.go delete mode 100644 v1/models/uda_restore_object.go delete mode 100644 v1/models/uda_restore_object_params.go delete mode 100644 v1/models/uda_s3_view_backup_properties.go delete mode 100644 v1/models/uda_source_capabilities.go delete mode 100644 v1/models/uda_throttling_params.go delete mode 100644 v1/models/un_register_application_servers_parameters.go delete mode 100644 v1/models/universal_id.go delete mode 100644 v1/models/universal_id_proto.go delete mode 100644 v1/models/unprotect_object_params.go delete mode 100644 v1/models/update_antivirus_service_group_params.go delete mode 100644 v1/models/update_api_key_params.go delete mode 100644 v1/models/update_app_instance_settings_parameters.go delete mode 100644 v1/models/update_app_instance_state_parameters.go delete mode 100644 v1/models/update_application_server_parameters.go delete mode 100644 v1/models/update_cluster_params.go delete mode 100644 v1/models/update_dir_quota_args.go delete mode 100644 v1/models/update_eula_config.go delete mode 100644 v1/models/update_hydra_disk_reservation_param.go delete mode 100644 v1/models/update_idp_configuration_request.go delete mode 100644 v1/models/update_ignored_trusted_domains_params.go delete mode 100644 v1/models/update_infected_file_params.go delete mode 100644 v1/models/update_infected_file_response.go delete mode 100644 v1/models/update_ldap_provider_param.go delete mode 100644 v1/models/update_ldap_provider_params.go delete mode 100644 v1/models/update_linux_password_req_params.go delete mode 100644 v1/models/update_linux_password_result.go delete mode 100644 v1/models/update_machine_accounts_params.go delete mode 100644 v1/models/update_notifications.go delete mode 100644 v1/models/update_protection_job_run.go delete mode 100644 v1/models/update_protection_job_run_job_uid.go delete mode 100644 v1/models/update_protection_job_runs_param.go delete mode 100644 v1/models/update_protection_jobs_state.go delete mode 100644 v1/models/update_protection_jobs_state_request_body.go delete mode 100644 v1/models/update_protection_object_parameters.go delete mode 100644 v1/models/update_protection_source_parameters.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_resolution_params.go delete mode 100644 v1/models/update_restore_task_options.go delete mode 100644 v1/models/update_restore_task_params.go delete mode 100644 v1/models/update_sources_for_principals_params.go delete mode 100644 v1/models/update_trusted_domain_enable_params.go delete mode 100644 v1/models/update_user_quota_settings_for_view.go delete mode 100644 v1/models/update_view_alias_param.go delete mode 100644 v1/models/update_view_param.go delete mode 100644 v1/models/update_view_param_logical_quota.go delete mode 100644 v1/models/upgrade_cluster_parameters.go delete mode 100644 v1/models/upgrade_cluster_result.go delete mode 100644 v1/models/upgrade_node_parameters.go delete mode 100644 v1/models/upgrade_node_result.go delete mode 100644 v1/models/upgrade_physical_agents_message.go delete mode 100644 v1/models/upgrade_physical_server_agents.go delete mode 100644 v1/models/uplink_switch_info.go delete mode 100644 v1/models/upload_m_r_jar_view_path_wrapper.go delete mode 100644 v1/models/upload_package_result.go delete mode 100644 v1/models/uptiering_run_once_params.go delete mode 100644 v1/models/usage_and_performance_stats.go delete mode 100644 v1/models/usage_schema_info.go delete mode 100644 v1/models/user.go delete mode 100644 v1/models/user_delete_parameters.go delete mode 100644 v1/models/user_id.go delete mode 100644 v1/models/user_id_mapping.go delete mode 100644 v1/models/user_info.go delete mode 100644 v1/models/user_information.go delete mode 100644 v1/models/user_license_info.go delete mode 100644 v1/models/user_parameters.go delete mode 100644 v1/models/user_preferences_result.go delete mode 100644 v1/models/user_quota.go delete mode 100644 v1/models/user_quota_and_usage.go delete mode 100644 v1/models/user_quota_settings.go delete mode 100644 v1/models/user_quota_summary_for_user.go delete mode 100644 v1/models/user_quota_summary_for_view.go delete mode 100644 v1/models/user_ssh_key.go delete mode 100644 v1/models/users_discovery_params.go delete mode 100644 v1/models/uuid_config_proto.go delete mode 100644 v1/models/v_c_d_attributes.go delete mode 100644 v1/models/v_c_d_backup_params.go delete mode 100644 v1/models/v_c_d_backup_params_vm_to_vapp_map_entry.go delete mode 100644 v1/models/v_c_d_catalog.go delete mode 100644 v1/models/v_c_d_v_center_info.go delete mode 100644 v1/models/v_cloud_director_info.go delete mode 100644 v1/models/v_mware_add_snapshot_arg.go delete mode 100644 v1/models/v_mware_add_snapshot_arg_additional_file_info.go delete mode 100644 v1/models/v_mware_backup_env_params.go delete mode 100644 v1/models/v_mware_backup_env_params_v_app_child_v_ms_list.go delete mode 100644 v1/models/v_mware_backup_params.go delete mode 100644 v1/models/v_mware_backup_params_vm_entity_id_to_progress_monitor_path_entry.go delete mode 100644 v1/models/v_mware_backup_source_params.go delete mode 100644 v1/models/v_mware_cdp_protection_source_info.go delete mode 100644 v1/models/v_mware_disk_exclusion_proto.go delete mode 100644 v1/models/v_mware_object_id.go delete mode 100644 v1/models/v_mware_protection_source.go delete mode 100644 v1/models/v_mware_standby_resource.go delete mode 100644 v1/models/value.go delete mode 100644 v1/models/value_data.go delete mode 100644 v1/models/vault.go delete mode 100644 v1/models/vault_bandwidth_limits.go delete mode 100644 v1/models/vault_config.go delete mode 100644 v1/models/vault_delete_params.go delete mode 100644 v1/models/vault_encryption_key.go delete mode 100644 v1/models/vault_encryption_key_key_uid.go delete mode 100644 v1/models/vault_params_restore_params.go delete mode 100644 v1/models/vault_params_restore_params_glacier.go delete mode 100644 v1/models/vault_provider_stats_by_env.go delete mode 100644 v1/models/vault_provider_stats_info.go delete mode 100644 v1/models/vault_provider_stats_list.go delete mode 100644 v1/models/vault_run_info.go delete mode 100644 v1/models/vault_run_stats_summary.go delete mode 100644 v1/models/vault_stats.go delete mode 100644 v1/models/vault_stats_info.go delete mode 100644 v1/models/vcd_storage_profile.go delete mode 100644 v1/models/verify_otp_code_params.go delete mode 100644 v1/models/view.go delete mode 100644 v1/models/view_alias.go delete mode 100644 v1/models/view_box.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_pair_info.go delete mode 100644 v1/models/view_box_physical_quota.go delete mode 100644 v1/models/view_box_stats.go delete mode 100644 v1/models/view_id_mapping_proto_file_level_data_lock_config.go delete mode 100644 v1/models/view_id_mapping_proto_protocol_access_info.go delete mode 100644 v1/models/view_intent.go delete mode 100644 v1/models/view_logical_quota.go delete mode 100644 v1/models/view_params.go delete mode 100644 v1/models/view_pinning_config.go delete mode 100644 v1/models/view_privileges.go delete mode 100644 v1/models/view_protection.go delete mode 100644 v1/models/view_protection_source.go delete mode 100644 v1/models/view_protection_source_id.go delete mode 100644 v1/models/view_protocol_stats.go delete mode 100644 v1/models/view_protocol_stats_list.go delete mode 100644 v1/models/view_stat_info.go delete mode 100644 v1/models/view_stats.go delete mode 100644 v1/models/view_stats_in_last_hours.go delete mode 100644 v1/models/view_stats_info.go delete mode 100644 v1/models/view_stats_snapshot.go delete mode 100644 v1/models/view_user_quota_parameters.go delete mode 100644 v1/models/view_user_quotas.go delete mode 100644 v1/models/virtual_disk_basic_info.go delete mode 100644 v1/models/virtual_disk_config.go delete mode 100644 v1/models/virtual_disk_id.go delete mode 100644 v1/models/virtual_disk_id_information.go delete mode 100644 v1/models/virtual_disk_info.go delete mode 100644 v1/models/virtual_disk_information.go delete mode 100644 v1/models/virtual_disk_mapping.go delete mode 100644 v1/models/virtual_disk_mapping_response.go delete mode 100644 v1/models/virtual_disk_recover_task_state.go delete mode 100644 v1/models/virtual_disk_restore_parameters.go delete mode 100644 v1/models/virtual_disk_restore_response.go delete mode 100644 v1/models/virtual_machine_info.go delete mode 100644 v1/models/virtual_node_configuration.go delete mode 100644 v1/models/vlan.go delete mode 100644 v1/models/vlan_info.go delete mode 100644 v1/models/vlan_info_service_annotations_entry.go delete mode 100644 v1/models/vlan_parameters.go delete mode 100644 v1/models/vlan_params.go delete mode 100644 v1/models/vlan_subnet.go delete mode 100644 v1/models/vlan_subnet_v6.go delete mode 100644 v1/models/vm_browsing_cookie.go delete mode 100644 v1/models/vm_dir_entry.go delete mode 100644 v1/models/vm_directory_list_result.go delete mode 100644 v1/models/vm_group.go delete mode 100644 v1/models/vm_info.go delete mode 100644 v1/models/vm_linking_info.go delete mode 100644 v1/models/vm_name_info.go delete mode 100644 v1/models/vm_num_replicas.go delete mode 100644 v1/models/vm_results.go delete mode 100644 v1/models/vm_search_result.go delete mode 100644 v1/models/vm_volumes_information.go delete mode 100644 v1/models/vmware_clone_parameters.go delete mode 100644 v1/models/vmware_env_job_parameters.go delete mode 100644 v1/models/vmware_folders_result.go delete mode 100644 v1/models/vmware_params.go delete mode 100644 v1/models/vmware_restore_parameters.go delete mode 100644 v1/models/vmware_special_parameters.go delete mode 100644 v1/models/vmware_special_parameters_vm_credentials.go delete mode 100644 v1/models/volume_indexing_info.go delete mode 100644 v1/models/volume_info.go delete mode 100644 v1/models/volume_info_disk_info.go delete mode 100644 v1/models/volume_info_disk_info_partition_info.go delete mode 100644 v1/models/volume_info_disk_info_physical_range.go delete mode 100644 v1/models/volume_info_logical_volume_info.go delete mode 100644 v1/models/volume_info_result.go delete mode 100644 v1/models/volume_info_sub_volume_info.go delete mode 100644 v1/models/volume_mapping_report_volume_mount_i_o_info.go delete mode 100644 v1/models/volume_mapping_report_volume_mount_i_o_info_volume_mount_reads_entry.go delete mode 100644 v1/models/volume_name_map.go delete mode 100644 v1/models/volume_name_map_volume_name_map_entry.go delete mode 100644 v1/models/volume_security_info.go delete mode 100644 v1/models/vserver_info.go delete mode 100644 v1/models/vserver_info_network_interface_info.go delete mode 100644 v1/models/vserver_network_interface.go delete mode 100644 v1/models/vss_writer.go delete mode 100644 v1/models/web_hook_delivery_target.go delete mode 100644 v1/models/windows_host_snapshot_parameters.go delete mode 100644 v1/models/worm_retention_proto.go delete mode 100644 v1/models/yoda_file_search_result.go delete mode 100644 v1/models/zone_config.go delete mode 100644 v1/models/zone_info.go delete mode 100644 v1/models/zone_info_network_pool.go delete mode 100644 v1/models/zone_info_network_pool_range.go delete mode 100644 v2/client/access_token/access_token_client.go delete mode 100644 v2/client/access_token/create_access_token_parameters.go delete mode 100644 v2/client/access_token/create_access_token_responses.go delete mode 100644 v2/client/active_directory/active_directory_client.go delete mode 100644 v2/client/active_directory/create_active_directory_parameters.go delete mode 100644 v2/client/active_directory/create_active_directory_responses.go delete mode 100644 v2/client/active_directory/delete_active_directory_parameters.go delete mode 100644 v2/client/active_directory/delete_active_directory_responses.go delete mode 100644 v2/client/active_directory/get_active_directory_by_id_parameters.go delete mode 100644 v2/client/active_directory/get_active_directory_by_id_responses.go delete mode 100644 v2/client/active_directory/get_active_directory_parameters.go delete mode 100644 v2/client/active_directory/get_active_directory_responses.go delete mode 100644 v2/client/active_directory/get_centrify_zones_parameters.go delete mode 100644 v2/client/active_directory/get_centrify_zones_responses.go delete mode 100644 v2/client/active_directory/get_domain_controllers_parameters.go delete mode 100644 v2/client/active_directory/get_domain_controllers_responses.go delete mode 100644 v2/client/active_directory/get_trusted_domains_parameters.go delete mode 100644 v2/client/active_directory/get_trusted_domains_responses.go delete mode 100644 v2/client/active_directory/trigger_trusted_domains_discovery_parameters.go delete mode 100644 v2/client/active_directory/trigger_trusted_domains_discovery_responses.go delete mode 100644 v2/client/active_directory/update_active_directory_parameters.go delete mode 100644 v2/client/active_directory/update_active_directory_responses.go delete mode 100644 v2/client/active_directory/update_trusted_domains_parameters.go delete mode 100644 v2/client/active_directory/update_trusted_domains_responses.go delete mode 100644 v2/client/agent/agent_client.go delete mode 100644 v2/client/agent/create_upgrade_task_parameters.go delete mode 100644 v2/client/agent/create_upgrade_task_responses.go delete mode 100644 v2/client/agent/download_agent_parameters.go delete mode 100644 v2/client/agent/download_agent_responses.go delete mode 100644 v2/client/agent/get_upgrade_tasks_parameters.go delete mode 100644 v2/client/agent/get_upgrade_tasks_responses.go delete mode 100644 v2/client/agent/perform_action_on_agent_upgrade_task_parameters.go delete mode 100644 v2/client/agent/perform_action_on_agent_upgrade_task_responses.go delete mode 100644 v2/client/alert/alert_client.go delete mode 100644 v2/client/alert/get_alert_summary_parameters.go delete mode 100644 v2/client/alert/get_alert_summary_responses.go delete mode 100644 v2/client/antivirus_service/antivirus_service_client.go delete mode 100644 v2/client/antivirus_service/create_antivirus_group_parameters.go delete mode 100644 v2/client/antivirus_service/create_antivirus_group_responses.go delete mode 100644 v2/client/antivirus_service/delete_antivirus_group_parameters.go delete mode 100644 v2/client/antivirus_service/delete_antivirus_group_responses.go delete mode 100644 v2/client/antivirus_service/delete_infected_files_parameters.go delete mode 100644 v2/client/antivirus_service/delete_infected_files_responses.go delete mode 100644 v2/client/antivirus_service/get_antivirus_service_groups_parameters.go delete mode 100644 v2/client/antivirus_service/get_antivirus_service_groups_responses.go delete mode 100644 v2/client/antivirus_service/get_icap_uri_connection_status_parameters.go delete mode 100644 v2/client/antivirus_service/get_icap_uri_connection_status_responses.go delete mode 100644 v2/client/antivirus_service/get_infected_files_parameters.go delete mode 100644 v2/client/antivirus_service/get_infected_files_responses.go delete mode 100644 v2/client/antivirus_service/update_antivirus_group_parameters.go delete mode 100644 v2/client/antivirus_service/update_antivirus_group_responses.go delete mode 100644 v2/client/antivirus_service/update_infected_files_parameters.go delete mode 100644 v2/client/antivirus_service/update_infected_files_responses.go delete mode 100644 v2/client/audit_log/audit_log_client.go delete mode 100644 v2/client/audit_log/get_audit_logs_actions_parameters.go delete mode 100644 v2/client/audit_log/get_audit_logs_actions_responses.go delete mode 100644 v2/client/audit_log/get_audit_logs_entity_types_parameters.go delete mode 100644 v2/client/audit_log/get_audit_logs_entity_types_responses.go delete mode 100644 v2/client/audit_log/get_audit_logs_parameters.go delete mode 100644 v2/client/audit_log/get_audit_logs_responses.go delete mode 100644 v2/client/audit_log/get_filer_audit_log_configs_parameters.go delete mode 100644 v2/client/audit_log/get_filer_audit_log_configs_responses.go delete mode 100644 v2/client/audit_log/update_filer_audit_log_configs_parameters.go delete mode 100644 v2/client/audit_log/update_filer_audit_log_configs_responses.go delete mode 100644 v2/client/baseos_patch_management/apply_baseos_patch_parameters.go delete mode 100644 v2/client/baseos_patch_management/apply_baseos_patch_responses.go delete mode 100644 v2/client/baseos_patch_management/baseos_patch_management_client.go delete mode 100644 v2/client/baseos_patch_management/download_baseos_patch_parameters.go delete mode 100644 v2/client/baseos_patch_management/download_baseos_patch_responses.go delete mode 100644 v2/client/baseos_patch_management/get_baseos_patch_list_parameters.go delete mode 100644 v2/client/baseos_patch_management/get_baseos_patch_list_responses.go delete mode 100644 v2/client/baseos_patch_management/get_baseos_patch_log_parameters.go delete mode 100644 v2/client/baseos_patch_management/get_baseos_patch_log_responses.go delete mode 100644 v2/client/baseos_patch_management/remove_baseos_patch_parameters.go delete mode 100644 v2/client/baseos_patch_management/remove_baseos_patch_responses.go delete mode 100644 v2/client/cloud_retrieve_task/cloud_retrieve_task_client.go delete mode 100644 v2/client/cloud_retrieve_task/create_cloud_retrieve_task_parameters.go delete mode 100644 v2/client/cloud_retrieve_task/create_cloud_retrieve_task_responses.go delete mode 100644 v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_parameters.go delete mode 100644 v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_responses.go delete mode 100644 v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_parameters.go delete mode 100644 v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_responses.go delete mode 100644 v2/client/cohesity_r_e_s_t_api_client.go delete mode 100644 v2/client/data_tiering/cancel_data_tiering_analysis_group_run_parameters.go delete mode 100644 v2/client/data_tiering/cancel_data_tiering_analysis_group_run_responses.go delete mode 100644 v2/client/data_tiering/cancel_data_tiering_task_run_parameters.go delete mode 100644 v2/client/data_tiering/cancel_data_tiering_task_run_responses.go delete mode 100644 v2/client/data_tiering/create_data_tiering_analysis_group_parameters.go delete mode 100644 v2/client/data_tiering/create_data_tiering_analysis_group_responses.go delete mode 100644 v2/client/data_tiering/create_data_tiering_analysis_group_run_parameters.go delete mode 100644 v2/client/data_tiering/create_data_tiering_analysis_group_run_responses.go delete mode 100644 v2/client/data_tiering/create_data_tiering_task_parameters.go delete mode 100644 v2/client/data_tiering/create_data_tiering_task_responses.go delete mode 100644 v2/client/data_tiering/create_data_tiering_task_run_parameters.go delete mode 100644 v2/client/data_tiering/create_data_tiering_task_run_responses.go delete mode 100644 v2/client/data_tiering/data_tiering_client.go delete mode 100644 v2/client/data_tiering/delete_data_tiering_analysis_group_parameters.go delete mode 100644 v2/client/data_tiering/delete_data_tiering_analysis_group_responses.go delete mode 100644 v2/client/data_tiering/delete_data_tiering_task_parameters.go delete mode 100644 v2/client/data_tiering/delete_data_tiering_task_responses.go delete mode 100644 v2/client/data_tiering/get_capacity_trend_analysis_parameters.go delete mode 100644 v2/client/data_tiering/get_capacity_trend_analysis_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_group_by_id_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_group_by_id_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_group_runs_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_group_runs_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_groups_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_analysis_groups_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_task_by_id_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_task_by_id_responses.go delete mode 100644 v2/client/data_tiering/get_data_tiering_tasks_parameters.go delete mode 100644 v2/client/data_tiering/get_data_tiering_tasks_responses.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_group_parameters.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_group_responses.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_parameters.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_responses.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_groups_state_parameters.go delete mode 100644 v2/client/data_tiering/update_data_tiering_analysis_groups_state_responses.go delete mode 100644 v2/client/data_tiering/update_data_tiering_task_parameters.go delete mode 100644 v2/client/data_tiering/update_data_tiering_task_responses.go delete mode 100644 v2/client/data_tiering/update_data_tiering_tasks_state_parameters.go delete mode 100644 v2/client/data_tiering/update_data_tiering_tasks_state_responses.go delete mode 100644 v2/client/external_target/create_external_target_parameters.go delete mode 100644 v2/client/external_target/create_external_target_responses.go delete mode 100644 v2/client/external_target/delete_external_target_parameters.go delete mode 100644 v2/client/external_target/delete_external_target_responses.go delete mode 100644 v2/client/external_target/external_target_client.go delete mode 100644 v2/client/external_target/get_external_target_by_id_parameters.go delete mode 100644 v2/client/external_target/get_external_target_by_id_responses.go delete mode 100644 v2/client/external_target/get_external_target_encryption_key_info_parameters.go delete mode 100644 v2/client/external_target/get_external_target_encryption_key_info_responses.go delete mode 100644 v2/client/external_target/get_external_target_media_info_parameters.go delete mode 100644 v2/client/external_target/get_external_target_media_info_responses.go delete mode 100644 v2/client/external_target/get_external_target_settings_parameters.go delete mode 100644 v2/client/external_target/get_external_target_settings_responses.go delete mode 100644 v2/client/external_target/get_external_targets_parameters.go delete mode 100644 v2/client/external_target/get_external_targets_responses.go delete mode 100644 v2/client/external_target/update_external_target_parameters.go delete mode 100644 v2/client/external_target/update_external_target_responses.go delete mode 100644 v2/client/external_target/update_external_target_settings_parameters.go delete mode 100644 v2/client/external_target/update_external_target_settings_responses.go delete mode 100644 v2/client/failover/cancel_failover_parameters.go delete mode 100644 v2/client/failover/cancel_failover_responses.go delete mode 100644 v2/client/failover/cancel_view_failover_parameters.go delete mode 100644 v2/client/failover/cancel_view_failover_responses.go delete mode 100644 v2/client/failover/create_planned_run_parameters.go delete mode 100644 v2/client/failover/create_planned_run_responses.go delete mode 100644 v2/client/failover/create_view_failover_parameters.go delete mode 100644 v2/client/failover/create_view_failover_responses.go delete mode 100644 v2/client/failover/failover_client.go delete mode 100644 v2/client/failover/get_failover_ops_parameters.go delete mode 100644 v2/client/failover/get_failover_ops_responses.go delete mode 100644 v2/client/failover/get_tracking_view_id_parameters.go delete mode 100644 v2/client/failover/get_tracking_view_id_responses.go delete mode 100644 v2/client/failover/get_view_failover_parameters.go delete mode 100644 v2/client/failover/get_view_failover_responses.go delete mode 100644 v2/client/failover/init_failover_parameters.go delete mode 100644 v2/client/failover/init_failover_responses.go delete mode 100644 v2/client/failover/object_linkage_parameters.go delete mode 100644 v2/client/failover/object_linkage_responses.go delete mode 100644 v2/client/failover/poll_planned_runs_parameters.go delete mode 100644 v2/client/failover/poll_planned_runs_responses.go delete mode 100644 v2/client/failover/replication_backup_activation_parameters.go delete mode 100644 v2/client/failover/replication_backup_activation_responses.go delete mode 100644 v2/client/failover/source_backup_deactivation_parameters.go delete mode 100644 v2/client/failover/source_backup_deactivation_responses.go delete mode 100644 v2/client/firewall/firewall_client.go delete mode 100644 v2/client/firewall/list_firewall_ip_sets_parameters.go delete mode 100644 v2/client/firewall/list_firewall_ip_sets_responses.go delete mode 100644 v2/client/firewall/list_firewall_profiles_parameters.go delete mode 100644 v2/client/firewall/list_firewall_profiles_responses.go delete mode 100644 v2/client/firewall/remove_firewall_profiles_parameters.go delete mode 100644 v2/client/firewall/remove_firewall_profiles_responses.go delete mode 100644 v2/client/firewall/reset_firewall_profile_parameters.go delete mode 100644 v2/client/firewall/reset_firewall_profile_responses.go delete mode 100644 v2/client/firewall/update_firewall_ip_sets_parameters.go delete mode 100644 v2/client/firewall/update_firewall_ip_sets_responses.go delete mode 100644 v2/client/firewall/update_firewall_profile_parameters.go delete mode 100644 v2/client/firewall/update_firewall_profile_responses.go delete mode 100644 v2/client/firewall/update_firewall_profiles_parameters.go delete mode 100644 v2/client/firewall/update_firewall_profiles_responses.go delete mode 100644 v2/client/helios_on_prem/get_helios_on_prem_config_parameters.go delete mode 100644 v2/client/helios_on_prem/get_helios_on_prem_config_responses.go delete mode 100644 v2/client/helios_on_prem/helios_on_prem_client.go delete mode 100644 v2/client/helios_on_prem/update_helios_on_prem_config_parameters.go delete mode 100644 v2/client/helios_on_prem/update_helios_on_prem_config_responses.go delete mode 100644 v2/client/i_ps/configure_ip_settings_parameters.go delete mode 100644 v2/client/i_ps/configure_ip_settings_responses.go delete mode 100644 v2/client/i_ps/i_ps_client.go delete mode 100644 v2/client/identity_provider/create_identity_parameters.go delete mode 100644 v2/client/identity_provider/create_identity_provider_parameters.go delete mode 100644 v2/client/identity_provider/create_identity_provider_responses.go delete mode 100644 v2/client/identity_provider/create_identity_responses.go delete mode 100644 v2/client/identity_provider/delete_identity_parameters.go delete mode 100644 v2/client/identity_provider/delete_identity_provider_parameters.go delete mode 100644 v2/client/identity_provider/delete_identity_provider_responses.go delete mode 100644 v2/client/identity_provider/delete_identity_responses.go delete mode 100644 v2/client/identity_provider/get_identities_parameters.go delete mode 100644 v2/client/identity_provider/get_identities_responses.go delete mode 100644 v2/client/identity_provider/get_identity_providers_parameters.go delete mode 100644 v2/client/identity_provider/get_identity_providers_responses.go delete mode 100644 v2/client/identity_provider/identity_provider_client.go delete mode 100644 v2/client/identity_provider/idps_login_parameters.go delete mode 100644 v2/client/identity_provider/idps_login_responses.go delete mode 100644 v2/client/identity_provider/perform_identity_action_parameters.go delete mode 100644 v2/client/identity_provider/perform_identity_action_responses.go delete mode 100644 v2/client/identity_provider/update_identity_parameters.go delete mode 100644 v2/client/identity_provider/update_identity_provider_parameters.go delete mode 100644 v2/client/identity_provider/update_identity_provider_responses.go delete mode 100644 v2/client/identity_provider/update_identity_responses.go delete mode 100644 v2/client/kerberos_provider/get_kerberos_provider_by_id_parameters.go delete mode 100644 v2/client/kerberos_provider/get_kerberos_provider_by_id_responses.go delete mode 100644 v2/client/kerberos_provider/get_kerberos_providers_parameters.go delete mode 100644 v2/client/kerberos_provider/get_kerberos_providers_responses.go delete mode 100644 v2/client/kerberos_provider/kerberos_provider_client.go delete mode 100644 v2/client/kerberos_provider/register_kerberos_provider_parameters.go delete mode 100644 v2/client/kerberos_provider/register_kerberos_provider_responses.go delete mode 100644 v2/client/kerberos_provider/unregister_kerberos_provider_parameters.go delete mode 100644 v2/client/kerberos_provider/unregister_kerberos_provider_responses.go delete mode 100644 v2/client/kerberos_provider/update_kerberos_provider_parameters.go delete mode 100644 v2/client/kerberos_provider/update_kerberos_provider_responses.go delete mode 100644 v2/client/key_management_system/add_kms_configuration_parameters.go delete mode 100644 v2/client/key_management_system/add_kms_configuration_responses.go delete mode 100644 v2/client/key_management_system/delete_kms_config_parameters.go delete mode 100644 v2/client/key_management_system/delete_kms_config_responses.go delete mode 100644 v2/client/key_management_system/get_kms_configurations_parameters.go delete mode 100644 v2/client/key_management_system/get_kms_configurations_responses.go delete mode 100644 v2/client/key_management_system/key_management_system_client.go delete mode 100644 v2/client/key_management_system/update_kms_configuration_parameters.go delete mode 100644 v2/client/key_management_system/update_kms_configuration_responses.go delete mode 100644 v2/client/keystone/create_keystone_parameters.go delete mode 100644 v2/client/keystone/create_keystone_responses.go delete mode 100644 v2/client/keystone/delete_keystone_parameters.go delete mode 100644 v2/client/keystone/delete_keystone_responses.go delete mode 100644 v2/client/keystone/get_keystones_by_id_parameters.go delete mode 100644 v2/client/keystone/get_keystones_by_id_responses.go delete mode 100644 v2/client/keystone/get_keystones_parameters.go delete mode 100644 v2/client/keystone/get_keystones_responses.go delete mode 100644 v2/client/keystone/keystone_client.go delete mode 100644 v2/client/keystone/update_keystone_parameters.go delete mode 100644 v2/client/keystone/update_keystone_responses.go delete mode 100644 v2/client/l_d_a_p/create_ldap_provider_parameters.go delete mode 100644 v2/client/l_d_a_p/create_ldap_provider_responses.go delete mode 100644 v2/client/l_d_a_p/delete_ldap_provider_parameters.go delete mode 100644 v2/client/l_d_a_p/delete_ldap_provider_responses.go delete mode 100644 v2/client/l_d_a_p/get_ldap_connection_status_parameters.go delete mode 100644 v2/client/l_d_a_p/get_ldap_connection_status_responses.go delete mode 100644 v2/client/l_d_a_p/get_ldaps_parameters.go delete mode 100644 v2/client/l_d_a_p/get_ldaps_responses.go delete mode 100644 v2/client/l_d_a_p/ldap_client.go delete mode 100644 v2/client/l_d_a_p/update_ldap_provider_parameters.go delete mode 100644 v2/client/l_d_a_p/update_ldap_provider_responses.go delete mode 100644 v2/client/m_f_a/create_email_otp_parameters.go delete mode 100644 v2/client/m_f_a/create_email_otp_responses.go delete mode 100644 v2/client/m_f_a/create_totp_key_parameters.go delete mode 100644 v2/client/m_f_a/create_totp_key_responses.go delete mode 100644 v2/client/m_f_a/get_m_f_a_config_parameters.go delete mode 100644 v2/client/m_f_a/get_m_f_a_config_responses.go delete mode 100644 v2/client/m_f_a/get_support_m_f_a_config_parameters.go delete mode 100644 v2/client/m_f_a/get_support_m_f_a_config_responses.go delete mode 100644 v2/client/m_f_a/mfa_client.go delete mode 100644 v2/client/m_f_a/send_email_otp_parameters.go delete mode 100644 v2/client/m_f_a/send_email_otp_responses.go delete mode 100644 v2/client/m_f_a/send_support_email_otp_parameters.go delete mode 100644 v2/client/m_f_a/send_support_email_otp_responses.go delete mode 100644 v2/client/m_f_a/update_m_f_a_config_parameters.go delete mode 100644 v2/client/m_f_a/update_m_f_a_config_responses.go delete mode 100644 v2/client/m_f_a/update_support_m_f_a_config_parameters.go delete mode 100644 v2/client/m_f_a/update_support_m_f_a_config_responses.go delete mode 100644 v2/client/m_f_a/verify_support_user_totp_parameters.go delete mode 100644 v2/client/m_f_a/verify_support_user_totp_responses.go delete mode 100644 v2/client/node_group/create_node_group_parameters.go delete mode 100644 v2/client/node_group/create_node_group_responses.go delete mode 100644 v2/client/node_group/delete_node_group_parameters.go delete mode 100644 v2/client/node_group/delete_node_group_responses.go delete mode 100644 v2/client/node_group/get_node_group_by_name_parameters.go delete mode 100644 v2/client/node_group/get_node_group_by_name_responses.go delete mode 100644 v2/client/node_group/get_node_groups_parameters.go delete mode 100644 v2/client/node_group/get_node_groups_responses.go delete mode 100644 v2/client/node_group/node_group_client.go delete mode 100644 v2/client/node_group/update_node_group_parameters.go delete mode 100644 v2/client/node_group/update_node_group_responses.go delete mode 100644 v2/client/object/associate_entity_metadata_parameters.go delete mode 100644 v2/client/object/associate_entity_metadata_responses.go delete mode 100644 v2/client/object/browse_object_contents_parameters.go delete mode 100644 v2/client/object/browse_object_contents_responses.go delete mode 100644 v2/client/object/cancel_object_runs_parameters.go delete mode 100644 v2/client/object/cancel_object_runs_responses.go delete mode 100644 v2/client/object/construct_meta_info_parameters.go delete mode 100644 v2/client/object/construct_meta_info_responses.go delete mode 100644 v2/client/object/filter_objects_parameters.go delete mode 100644 v2/client/object/filter_objects_responses.go delete mode 100644 v2/client/object/get_all_indexed_object_snapshots_parameters.go delete mode 100644 v2/client/object/get_all_indexed_object_snapshots_responses.go delete mode 100644 v2/client/object/get_entity_metadata_parameters.go delete mode 100644 v2/client/object/get_entity_metadata_responses.go delete mode 100644 v2/client/object/get_indexed_object_snapshots_parameters.go delete mode 100644 v2/client/object/get_indexed_object_snapshots_responses.go delete mode 100644 v2/client/object/get_object_run_by_run_id_parameters.go delete mode 100644 v2/client/object/get_object_run_by_run_id_responses.go delete mode 100644 v2/client/object/get_object_runs_parameters.go delete mode 100644 v2/client/object/get_object_runs_responses.go delete mode 100644 v2/client/object/get_object_snapshot_info_parameters.go delete mode 100644 v2/client/object/get_object_snapshot_info_responses.go delete mode 100644 v2/client/object/get_object_snapshot_volume_info_parameters.go delete mode 100644 v2/client/object/get_object_snapshot_volume_info_responses.go delete mode 100644 v2/client/object/get_object_snapshots_parameters.go delete mode 100644 v2/client/object/get_object_snapshots_responses.go delete mode 100644 v2/client/object/get_object_stats_parameters.go delete mode 100644 v2/client/object/get_object_stats_responses.go delete mode 100644 v2/client/object/get_object_tree_parameters.go delete mode 100644 v2/client/object/get_object_tree_responses.go delete mode 100644 v2/client/object/get_objects_last_run_parameters.go delete mode 100644 v2/client/object/get_objects_last_run_responses.go delete mode 100644 v2/client/object/get_p_i_t_ranges_for_protected_object_parameters.go delete mode 100644 v2/client/object/get_p_i_t_ranges_for_protected_object_responses.go delete mode 100644 v2/client/object/get_protected_object_of_any_type_by_id_parameters.go delete mode 100644 v2/client/object/get_protected_object_of_any_type_by_id_responses.go delete mode 100644 v2/client/object/get_protected_objects_of_any_type_parameters.go delete mode 100644 v2/client/object/get_protected_objects_of_any_type_responses.go delete mode 100644 v2/client/object/get_snapshot_diff_parameters.go delete mode 100644 v2/client/object/get_snapshot_diff_responses.go delete mode 100644 v2/client/object/get_source_hierarchy_objects_parameters.go delete mode 100644 v2/client/object/get_source_hierarchy_objects_responses.go delete mode 100644 v2/client/object/object_client.go delete mode 100644 v2/client/object/objects_actions_parameters.go delete mode 100644 v2/client/object/objects_actions_responses.go delete mode 100644 v2/client/object/perform_action_on_object_parameters.go delete mode 100644 v2/client/object/perform_action_on_object_responses.go delete mode 100644 v2/client/object/update_object_snapshot_parameters.go delete mode 100644 v2/client/object/update_object_snapshot_responses.go delete mode 100644 v2/client/patch_management/apply_patches_parameters.go delete mode 100644 v2/client/patch_management/apply_patches_responses.go delete mode 100644 v2/client/patch_management/get_applied_patches_parameters.go delete mode 100644 v2/client/patch_management/get_applied_patches_responses.go delete mode 100644 v2/client/patch_management/get_available_patches_parameters.go delete mode 100644 v2/client/patch_management/get_available_patches_responses.go delete mode 100644 v2/client/patch_management/get_patch_operation_status_parameters.go delete mode 100644 v2/client/patch_management/get_patch_operation_status_responses.go delete mode 100644 v2/client/patch_management/get_patches_history_parameters.go delete mode 100644 v2/client/patch_management/get_patches_history_responses.go delete mode 100644 v2/client/patch_management/import_patches_parameters.go delete mode 100644 v2/client/patch_management/import_patches_responses.go delete mode 100644 v2/client/patch_management/patch_management_client.go delete mode 100644 v2/client/patch_management/revert_patches_parameters.go delete mode 100644 v2/client/patch_management/revert_patches_responses.go delete mode 100644 v2/client/platform/add_hosts_parameters.go delete mode 100644 v2/client/platform/add_hosts_responses.go delete mode 100644 v2/client/platform/add_remote_disk_parameters.go delete mode 100644 v2/client/platform/add_remote_disk_responses.go delete mode 100644 v2/client/platform/clear_smtp_configuration_parameters.go delete mode 100644 v2/client/platform/clear_smtp_configuration_responses.go delete mode 100644 v2/client/platform/create_cluster_parameters.go delete mode 100644 v2/client/platform/create_cluster_responses.go delete mode 100644 v2/client/platform/create_cluster_vlan_parameters.go delete mode 100644 v2/client/platform/create_cluster_vlan_responses.go delete mode 100644 v2/client/platform/create_interface_group_parameters.go delete mode 100644 v2/client/platform/create_interface_group_responses.go delete mode 100644 v2/client/platform/create_racks_parameters.go delete mode 100644 v2/client/platform/create_racks_responses.go delete mode 100644 v2/client/platform/delete_a_m_q_p_target_config_parameters.go delete mode 100644 v2/client/platform/delete_a_m_q_p_target_config_responses.go delete mode 100644 v2/client/platform/delete_cluster_package_parameters.go delete mode 100644 v2/client/platform/delete_cluster_package_responses.go delete mode 100644 v2/client/platform/delete_cluster_vlan_parameters.go delete mode 100644 v2/client/platform/delete_cluster_vlan_responses.go delete mode 100644 v2/client/platform/delete_hosts_parameters.go delete mode 100644 v2/client/platform/delete_hosts_responses.go delete mode 100644 v2/client/platform/delete_interface_group_parameters.go delete mode 100644 v2/client/platform/delete_interface_group_responses.go delete mode 100644 v2/client/platform/delete_rack_by_id_parameters.go delete mode 100644 v2/client/platform/delete_rack_by_id_responses.go delete mode 100644 v2/client/platform/delete_racks_parameters.go delete mode 100644 v2/client/platform/delete_racks_responses.go delete mode 100644 v2/client/platform/discover_disks_parameters.go delete mode 100644 v2/client/platform/discover_disks_responses.go delete mode 100644 v2/client/platform/disk_identify_parameters.go delete mode 100644 v2/client/platform/disk_identify_responses.go delete mode 100644 v2/client/platform/disks_assimilate_parameters.go delete mode 100644 v2/client/platform/disks_assimilate_responses.go delete mode 100644 v2/client/platform/expand_cluster_nodes_parameters.go delete mode 100644 v2/client/platform/expand_cluster_nodes_responses.go delete mode 100644 v2/client/platform/get_a_m_q_p_target_config_parameters.go delete mode 100644 v2/client/platform/get_a_m_q_p_target_config_responses.go delete mode 100644 v2/client/platform/get_chassis_by_id_parameters.go delete mode 100644 v2/client/platform/get_chassis_by_id_responses.go delete mode 100644 v2/client/platform/get_chassis_parameters.go delete mode 100644 v2/client/platform/get_chassis_responses.go delete mode 100644 v2/client/platform/get_cluster_local_domain_s_id_parameters.go delete mode 100644 v2/client/platform/get_cluster_local_domain_s_id_responses.go delete mode 100644 v2/client/platform/get_cluster_packages_parameters.go delete mode 100644 v2/client/platform/get_cluster_packages_responses.go delete mode 100644 v2/client/platform/get_cluster_parameters.go delete mode 100644 v2/client/platform/get_cluster_responses.go delete mode 100644 v2/client/platform/get_cluster_state_parameters.go delete mode 100644 v2/client/platform/get_cluster_state_responses.go delete mode 100644 v2/client/platform/get_cluster_vlans_parameters.go delete mode 100644 v2/client/platform/get_cluster_vlans_responses.go delete mode 100644 v2/client/platform/get_interface_groups_parameters.go delete mode 100644 v2/client/platform/get_interface_groups_responses.go delete mode 100644 v2/client/platform/get_interfaces_parameters.go delete mode 100644 v2/client/platform/get_interfaces_responses.go delete mode 100644 v2/client/platform/get_ipmi_lan_config_parameters.go delete mode 100644 v2/client/platform/get_ipmi_lan_config_responses.go delete mode 100644 v2/client/platform/get_ipmi_users_parameters.go delete mode 100644 v2/client/platform/get_ipmi_users_responses.go delete mode 100644 v2/client/platform/get_is_d_maa_s_cluster_parameters.go delete mode 100644 v2/client/platform/get_is_d_maa_s_cluster_responses.go delete mode 100644 v2/client/platform/get_network_interfaces_parameters.go delete mode 100644 v2/client/platform/get_network_interfaces_responses.go delete mode 100644 v2/client/platform/get_nodes_parameters.go delete mode 100644 v2/client/platform/get_nodes_responses.go delete mode 100644 v2/client/platform/get_rack_by_id_parameters.go delete mode 100644 v2/client/platform/get_rack_by_id_responses.go delete mode 100644 v2/client/platform/get_racks_parameters.go delete mode 100644 v2/client/platform/get_racks_responses.go delete mode 100644 v2/client/platform/get_remote_disks_parameters.go delete mode 100644 v2/client/platform/get_remote_disks_responses.go delete mode 100644 v2/client/platform/get_smtp_configuration_parameters.go delete mode 100644 v2/client/platform/get_smtp_configuration_responses.go delete mode 100644 v2/client/platform/get_support_channel_config_parameters.go delete mode 100644 v2/client/platform/get_support_channel_config_responses.go delete mode 100644 v2/client/platform/identify_node_parameters.go delete mode 100644 v2/client/platform/identify_node_responses.go delete mode 100644 v2/client/platform/import_crl_file_parameters.go delete mode 100644 v2/client/platform/import_crl_file_responses.go delete mode 100644 v2/client/platform/list_disks_parameters.go delete mode 100644 v2/client/platform/list_disks_responses.go delete mode 100644 v2/client/platform/list_feature_flag_parameters.go delete mode 100644 v2/client/platform/list_feature_flag_responses.go delete mode 100644 v2/client/platform/list_free_nodes_parameters.go delete mode 100644 v2/client/platform/list_free_nodes_responses.go delete mode 100644 v2/client/platform/list_hosts_parameters.go delete mode 100644 v2/client/platform/list_hosts_responses.go delete mode 100644 v2/client/platform/mark_baseos_upgrade_parameters.go delete mode 100644 v2/client/platform/mark_baseos_upgrade_responses.go delete mode 100644 v2/client/platform/mark_disk_removal_parameters.go delete mode 100644 v2/client/platform/mark_disk_removal_responses.go delete mode 100644 v2/client/platform/mark_node_removal_parameters.go delete mode 100644 v2/client/platform/mark_node_removal_responses.go delete mode 100644 v2/client/platform/node_information_parameters.go delete mode 100644 v2/client/platform/node_information_responses.go delete mode 100644 v2/client/platform/platform_client.go delete mode 100644 v2/client/platform/public_key_request_parameters.go delete mode 100644 v2/client/platform/public_key_request_responses.go delete mode 100644 v2/client/platform/remove_remote_disk_parameters.go delete mode 100644 v2/client/platform/remove_remote_disk_responses.go delete mode 100644 v2/client/platform/set_node_power_parameters.go delete mode 100644 v2/client/platform/set_node_power_responses.go delete mode 100644 v2/client/platform/update_a_m_q_p_target_config_parameters.go delete mode 100644 v2/client/platform/update_a_m_q_p_target_config_responses.go delete mode 100644 v2/client/platform/update_airgap_config_parameters.go delete mode 100644 v2/client/platform/update_airgap_config_responses.go delete mode 100644 v2/client/platform/update_chassis_by_id_parameters.go delete mode 100644 v2/client/platform/update_chassis_by_id_responses.go delete mode 100644 v2/client/platform/update_cluster_parameters.go delete mode 100644 v2/client/platform/update_cluster_responses.go delete mode 100644 v2/client/platform/update_cluster_vlan_parameters.go delete mode 100644 v2/client/platform/update_cluster_vlan_responses.go delete mode 100644 v2/client/platform/update_feature_flag_parameters.go delete mode 100644 v2/client/platform/update_feature_flag_responses.go delete mode 100644 v2/client/platform/update_hosts_parameters.go delete mode 100644 v2/client/platform/update_hosts_responses.go delete mode 100644 v2/client/platform/update_interface_group_parameters.go delete mode 100644 v2/client/platform/update_interface_group_responses.go delete mode 100644 v2/client/platform/update_interface_parameters.go delete mode 100644 v2/client/platform/update_interface_responses.go delete mode 100644 v2/client/platform/update_ipmi_lan_config_parameters.go delete mode 100644 v2/client/platform/update_ipmi_lan_config_responses.go delete mode 100644 v2/client/platform/update_ipmi_users_parameters.go delete mode 100644 v2/client/platform/update_ipmi_users_responses.go delete mode 100644 v2/client/platform/update_is_d_maa_s_cluster_parameters.go delete mode 100644 v2/client/platform/update_is_d_maa_s_cluster_responses.go delete mode 100644 v2/client/platform/update_rack_by_id_parameters.go delete mode 100644 v2/client/platform/update_rack_by_id_responses.go delete mode 100644 v2/client/platform/update_racks_parameters.go delete mode 100644 v2/client/platform/update_racks_responses.go delete mode 100644 v2/client/platform/update_smtp_configuration_parameters.go delete mode 100644 v2/client/platform/update_smtp_configuration_responses.go delete mode 100644 v2/client/platform/update_support_channel_config_parameters.go delete mode 100644 v2/client/platform/update_support_channel_config_responses.go delete mode 100644 v2/client/platform/upgrade_check_get_results_parameters.go delete mode 100644 v2/client/platform/upgrade_check_get_results_responses.go delete mode 100644 v2/client/platform/upgrade_check_run_tests_parameters.go delete mode 100644 v2/client/platform/upgrade_check_run_tests_responses.go delete mode 100644 v2/client/platform/upgrade_cluster_software_parameters.go delete mode 100644 v2/client/platform/upgrade_cluster_software_responses.go delete mode 100644 v2/client/platform/upload_package_by_url_parameters.go delete mode 100644 v2/client/platform/upload_package_by_url_responses.go delete mode 100644 v2/client/platform/validate_smtp_configuration_parameters.go delete mode 100644 v2/client/platform/validate_smtp_configuration_responses.go delete mode 100644 v2/client/policy/create_protection_policy_parameters.go delete mode 100644 v2/client/policy/create_protection_policy_responses.go delete mode 100644 v2/client/policy/delete_protection_policy_parameters.go delete mode 100644 v2/client/policy/delete_protection_policy_responses.go delete mode 100644 v2/client/policy/get_policy_template_by_id_parameters.go delete mode 100644 v2/client/policy/get_policy_template_by_id_responses.go delete mode 100644 v2/client/policy/get_policy_templates_parameters.go delete mode 100644 v2/client/policy/get_policy_templates_responses.go delete mode 100644 v2/client/policy/get_protection_policies_parameters.go delete mode 100644 v2/client/policy/get_protection_policies_responses.go delete mode 100644 v2/client/policy/get_protection_policy_by_id_parameters.go delete mode 100644 v2/client/policy/get_protection_policy_by_id_responses.go delete mode 100644 v2/client/policy/policy_client.go delete mode 100644 v2/client/policy/update_protection_policy_parameters.go delete mode 100644 v2/client/policy/update_protection_policy_responses.go delete mode 100644 v2/client/privilege/get_privileges_parameters.go delete mode 100644 v2/client/privilege/get_privileges_responses.go delete mode 100644 v2/client/privilege/privilege_client.go delete mode 100644 v2/client/protected_object/perform_action_on_protect_objects_parameters.go delete mode 100644 v2/client/protected_object/perform_action_on_protect_objects_responses.go delete mode 100644 v2/client/protected_object/protect_objects_of_any_type_parameters.go delete mode 100644 v2/client/protected_object/protect_objects_of_any_type_responses.go delete mode 100644 v2/client/protected_object/protected_object_client.go delete mode 100644 v2/client/protected_object/update_protected_objects_of_any_type_parameters.go delete mode 100644 v2/client/protected_object/update_protected_objects_of_any_type_responses.go delete mode 100644 v2/client/protection_group/create_protection_group_parameters.go delete mode 100644 v2/client/protection_group/create_protection_group_responses.go delete mode 100644 v2/client/protection_group/create_protection_group_run_parameters.go delete mode 100644 v2/client/protection_group/create_protection_group_run_responses.go delete mode 100644 v2/client/protection_group/delete_protection_group_parameters.go delete mode 100644 v2/client/protection_group/delete_protection_group_responses.go delete mode 100644 v2/client/protection_group/get_protection_group_by_id_parameters.go delete mode 100644 v2/client/protection_group/get_protection_group_by_id_responses.go delete mode 100644 v2/client/protection_group/get_protection_group_run_parameters.go delete mode 100644 v2/client/protection_group/get_protection_group_run_responses.go delete mode 100644 v2/client/protection_group/get_protection_group_runs_parameters.go delete mode 100644 v2/client/protection_group/get_protection_group_runs_responses.go delete mode 100644 v2/client/protection_group/get_protection_groups_parameters.go delete mode 100644 v2/client/protection_group/get_protection_groups_responses.go delete mode 100644 v2/client/protection_group/get_protection_run_progress_parameters.go delete mode 100644 v2/client/protection_group/get_protection_run_progress_responses.go delete mode 100644 v2/client/protection_group/get_protection_run_stats_parameters.go delete mode 100644 v2/client/protection_group/get_protection_run_stats_responses.go delete mode 100644 v2/client/protection_group/get_protection_runs_parameters.go delete mode 100644 v2/client/protection_group/get_protection_runs_responses.go delete mode 100644 v2/client/protection_group/get_run_debug_logs_for_object_parameters.go delete mode 100644 v2/client/protection_group/get_run_debug_logs_for_object_responses.go delete mode 100644 v2/client/protection_group/get_run_debug_logs_parameters.go delete mode 100644 v2/client/protection_group/get_run_debug_logs_responses.go delete mode 100644 v2/client/protection_group/get_run_errors_report_parameters.go delete mode 100644 v2/client/protection_group/get_run_errors_report_responses.go delete mode 100644 v2/client/protection_group/get_runs_report_parameters.go delete mode 100644 v2/client/protection_group/get_runs_report_responses.go delete mode 100644 v2/client/protection_group/perform_action_on_protection_group_run_parameters.go delete mode 100644 v2/client/protection_group/perform_action_on_protection_group_run_responses.go delete mode 100644 v2/client/protection_group/protection_group_client.go delete mode 100644 v2/client/protection_group/update_protection_group_parameters.go delete mode 100644 v2/client/protection_group/update_protection_group_responses.go delete mode 100644 v2/client/protection_group/update_protection_group_run_parameters.go delete mode 100644 v2/client/protection_group/update_protection_group_run_responses.go delete mode 100644 v2/client/protection_group/update_protection_groups_state_parameters.go delete mode 100644 v2/client/protection_group/update_protection_groups_state_responses.go delete mode 100644 v2/client/recovery/cancel_recovery_by_id_parameters.go delete mode 100644 v2/client/recovery/cancel_recovery_by_id_responses.go delete mode 100644 v2/client/recovery/create_download_files_and_folders_recovery_parameters.go delete mode 100644 v2/client/recovery/create_download_files_and_folders_recovery_responses.go delete mode 100644 v2/client/recovery/create_recovery_parameters.go delete mode 100644 v2/client/recovery/create_recovery_responses.go delete mode 100644 v2/client/recovery/download_files_from_recovery_parameters.go delete mode 100644 v2/client/recovery/download_files_from_recovery_responses.go delete mode 100644 v2/client/recovery/download_indexed_file_parameters.go delete mode 100644 v2/client/recovery/download_indexed_file_responses.go delete mode 100644 v2/client/recovery/fetch_uptier_data_parameters.go delete mode 100644 v2/client/recovery/fetch_uptier_data_responses.go delete mode 100644 v2/client/recovery/get_recoveries_parameters.go delete mode 100644 v2/client/recovery/get_recoveries_responses.go delete mode 100644 v2/client/recovery/get_recovery_by_id_parameters.go delete mode 100644 v2/client/recovery/get_recovery_by_id_responses.go delete mode 100644 v2/client/recovery/get_recovery_debug_logs_parameters.go delete mode 100644 v2/client/recovery/get_recovery_debug_logs_responses.go delete mode 100644 v2/client/recovery/get_recovery_errors_report_parameters.go delete mode 100644 v2/client/recovery/get_recovery_errors_report_responses.go delete mode 100644 v2/client/recovery/recovery_client.go delete mode 100644 v2/client/recovery/tear_down_recovery_by_id_parameters.go delete mode 100644 v2/client/recovery/tear_down_recovery_by_id_responses.go delete mode 100644 v2/client/registration/get_helios_reg_config_parameters.go delete mode 100644 v2/client/registration/get_helios_reg_config_responses.go delete mode 100644 v2/client/registration/helios_claim_parameters.go delete mode 100644 v2/client/registration/helios_claim_responses.go delete mode 100644 v2/client/registration/registration_client.go delete mode 100644 v2/client/remote_clusters/delete_remote_cluster_parameters.go delete mode 100644 v2/client/remote_clusters/delete_remote_cluster_responses.go delete mode 100644 v2/client/remote_clusters/get_remote_cluster_by_id_parameters.go delete mode 100644 v2/client/remote_clusters/get_remote_cluster_by_id_responses.go delete mode 100644 v2/client/remote_clusters/get_remote_clusters_parameters.go delete mode 100644 v2/client/remote_clusters/get_remote_clusters_responses.go delete mode 100644 v2/client/remote_clusters/register_remote_cluster_parameters.go delete mode 100644 v2/client/remote_clusters/register_remote_cluster_responses.go delete mode 100644 v2/client/remote_clusters/remote_clusters_client.go delete mode 100644 v2/client/remote_clusters/update_remote_cluster_parameters.go delete mode 100644 v2/client/remote_clusters/update_remote_cluster_responses.go delete mode 100644 v2/client/remote_clusters/validate_remote_cluster_parameters.go delete mode 100644 v2/client/remote_clusters/validate_remote_cluster_responses.go delete mode 100644 v2/client/remote_storage/delete_remote_storage_registration_parameters.go delete mode 100644 v2/client/remote_storage/delete_remote_storage_registration_responses.go delete mode 100644 v2/client/remote_storage/get_registered_remote_storage_list_parameters.go delete mode 100644 v2/client/remote_storage/get_registered_remote_storage_list_responses.go delete mode 100644 v2/client/remote_storage/get_remote_storage_details_parameters.go delete mode 100644 v2/client/remote_storage/get_remote_storage_details_responses.go delete mode 100644 v2/client/remote_storage/register_new_remote_storage_parameters.go delete mode 100644 v2/client/remote_storage/register_new_remote_storage_responses.go delete mode 100644 v2/client/remote_storage/remote_storage_client.go delete mode 100644 v2/client/remote_storage/update_remote_storage_registration_parameters.go delete mode 100644 v2/client/remote_storage/update_remote_storage_registration_responses.go delete mode 100644 v2/client/role/create_role_parameters.go delete mode 100644 v2/client/role/create_role_responses.go delete mode 100644 v2/client/role/delete_role_parameters.go delete mode 100644 v2/client/role/delete_role_responses.go delete mode 100644 v2/client/role/get_roles_parameters.go delete mode 100644 v2/client/role/get_roles_responses.go delete mode 100644 v2/client/role/role_client.go delete mode 100644 v2/client/role/update_role_parameters.go delete mode 100644 v2/client/role/update_role_responses.go delete mode 100644 v2/client/routes/add_static_route_parameters.go delete mode 100644 v2/client/routes/add_static_route_responses.go delete mode 100644 v2/client/routes/delete_static_route_parameters.go delete mode 100644 v2/client/routes/delete_static_route_responses.go delete mode 100644 v2/client/routes/list_static_routes_parameters.go delete mode 100644 v2/client/routes/list_static_routes_responses.go delete mode 100644 v2/client/routes/routes_client.go delete mode 100644 v2/client/routes/update_static_route_parameters.go delete mode 100644 v2/client/routes/update_static_route_responses.go delete mode 100644 v2/client/search/search_client.go delete mode 100644 v2/client/search/search_indexed_objects_parameters.go delete mode 100644 v2/client/search/search_indexed_objects_responses.go delete mode 100644 v2/client/search/search_objects_parameters.go delete mode 100644 v2/client/search/search_objects_responses.go delete mode 100644 v2/client/search/search_protected_objects_parameters.go delete mode 100644 v2/client/search/search_protected_objects_responses.go delete mode 100644 v2/client/security/create_clientcsr_parameters.go delete mode 100644 v2/client/security/create_clientcsr_responses.go delete mode 100644 v2/client/security/create_csr_parameters.go delete mode 100644 v2/client/security/create_csr_responses.go delete mode 100644 v2/client/security/delete_csr_parameters.go delete mode 100644 v2/client/security/delete_csr_responses.go delete mode 100644 v2/client/security/get_ciphers_parameters.go delete mode 100644 v2/client/security/get_ciphers_responses.go delete mode 100644 v2/client/security/get_csr_by_id_parameters.go delete mode 100644 v2/client/security/get_csr_by_id_responses.go delete mode 100644 v2/client/security/get_csr_list_parameters.go delete mode 100644 v2/client/security/get_csr_list_responses.go delete mode 100644 v2/client/security/get_object_store_ciphers_parameters.go delete mode 100644 v2/client/security/get_object_store_ciphers_responses.go delete mode 100644 v2/client/security/get_security_config_parameters.go delete mode 100644 v2/client/security/get_security_config_responses.go delete mode 100644 v2/client/security/import_certificate_by_clientcsr_parameters.go delete mode 100644 v2/client/security/import_certificate_by_clientcsr_responses.go delete mode 100644 v2/client/security/list_trusted_ca_by_id_parameters.go delete mode 100644 v2/client/security/list_trusted_ca_by_id_responses.go delete mode 100644 v2/client/security/list_trusted_cas_parameters.go delete mode 100644 v2/client/security/list_trusted_cas_responses.go delete mode 100644 v2/client/security/modify_ciphers_parameters.go delete mode 100644 v2/client/security/modify_ciphers_responses.go delete mode 100644 v2/client/security/modify_object_store_ciphers_parameters.go delete mode 100644 v2/client/security/modify_object_store_ciphers_responses.go delete mode 100644 v2/client/security/register_trusted_cas_parameters.go delete mode 100644 v2/client/security/register_trusted_cas_responses.go delete mode 100644 v2/client/security/security_client.go delete mode 100644 v2/client/security/unregister_trusted_ca_parameters.go delete mode 100644 v2/client/security/unregister_trusted_ca_responses.go delete mode 100644 v2/client/security/update_certificate_by_csr_parameters.go delete mode 100644 v2/client/security/update_certificate_by_csr_responses.go delete mode 100644 v2/client/security/update_security_config_parameters.go delete mode 100644 v2/client/security/update_security_config_responses.go delete mode 100644 v2/client/security/validate_trusted_ca_by_id_parameters.go delete mode 100644 v2/client/security/validate_trusted_ca_by_id_responses.go delete mode 100644 v2/client/source/create_azure_applications_parameters.go delete mode 100644 v2/client/source/create_azure_applications_responses.go delete mode 100644 v2/client/source/create_or_update_azure_applications_parameters.go delete mode 100644 v2/client/source/create_or_update_azure_applications_responses.go delete mode 100644 v2/client/source/delete_protection_source_registration_parameters.go delete mode 100644 v2/client/source/delete_protection_source_registration_responses.go delete mode 100644 v2/client/source/generate_m365_device_access_token_parameters.go delete mode 100644 v2/client/source/generate_m365_device_access_token_responses.go delete mode 100644 v2/client/source/generate_m365_device_code_parameters.go delete mode 100644 v2/client/source/generate_m365_device_code_responses.go delete mode 100644 v2/client/source/get_protection_source_registration_parameters.go delete mode 100644 v2/client/source/get_protection_source_registration_responses.go delete mode 100644 v2/client/source/get_protection_sources_parameters.go delete mode 100644 v2/client/source/get_protection_sources_responses.go delete mode 100644 v2/client/source/get_source_attribute_filters_parameters.go delete mode 100644 v2/client/source/get_source_attribute_filters_responses.go delete mode 100644 v2/client/source/get_source_registrations_parameters.go delete mode 100644 v2/client/source/get_source_registrations_responses.go delete mode 100644 v2/client/source/get_vdc_details_parameters.go delete mode 100644 v2/client/source/get_vdc_details_responses.go delete mode 100644 v2/client/source/patch_protection_source_registration_parameters.go delete mode 100644 v2/client/source/patch_protection_source_registration_responses.go delete mode 100644 v2/client/source/protection_source_by_id_parameters.go delete mode 100644 v2/client/source/protection_source_by_id_responses.go delete mode 100644 v2/client/source/refresh_protection_source_by_id_parameters.go delete mode 100644 v2/client/source/refresh_protection_source_by_id_responses.go delete mode 100644 v2/client/source/register_protection_source_parameters.go delete mode 100644 v2/client/source/register_protection_source_responses.go delete mode 100644 v2/client/source/source_client.go delete mode 100644 v2/client/source/test_connection_protection_source_parameters.go delete mode 100644 v2/client/source/test_connection_protection_source_responses.go delete mode 100644 v2/client/source/update_protection_source_registration_parameters.go delete mode 100644 v2/client/source/update_protection_source_registration_responses.go delete mode 100644 v2/client/stats/get_cluster_storage_stats_parameters.go delete mode 100644 v2/client/stats/get_cluster_storage_stats_responses.go delete mode 100644 v2/client/stats/get_files_stats_parameters.go delete mode 100644 v2/client/stats/get_files_stats_responses.go delete mode 100644 v2/client/stats/get_protection_runs_stats_parameters.go delete mode 100644 v2/client/stats/get_protection_runs_stats_responses.go delete mode 100644 v2/client/stats/get_time_series_stats_parameters.go delete mode 100644 v2/client/stats/get_time_series_stats_responses.go delete mode 100644 v2/client/stats/get_view_client_stats_parameters.go delete mode 100644 v2/client/stats/get_view_client_stats_responses.go delete mode 100644 v2/client/stats/get_views_stats_parameters.go delete mode 100644 v2/client/stats/get_views_stats_responses.go delete mode 100644 v2/client/stats/get_workload_stats_parameters.go delete mode 100644 v2/client/stats/get_workload_stats_responses.go delete mode 100644 v2/client/stats/stats_client.go delete mode 100644 v2/client/storage_domain/create_storage_domain_parameters.go delete mode 100644 v2/client/storage_domain/create_storage_domain_responses.go delete mode 100644 v2/client/storage_domain/delete_storage_domain_parameters.go delete mode 100644 v2/client/storage_domain/delete_storage_domain_responses.go delete mode 100644 v2/client/storage_domain/get_storage_domain_by_id_parameters.go delete mode 100644 v2/client/storage_domain/get_storage_domain_by_id_responses.go delete mode 100644 v2/client/storage_domain/get_storage_domains_parameters.go delete mode 100644 v2/client/storage_domain/get_storage_domains_responses.go delete mode 100644 v2/client/storage_domain/storage_domain_client.go delete mode 100644 v2/client/storage_domain/update_storage_domain_parameters.go delete mode 100644 v2/client/storage_domain/update_storage_domain_responses.go delete mode 100644 v2/client/support/get_support_user_config_parameters.go delete mode 100644 v2/client/support/get_support_user_config_responses.go delete mode 100644 v2/client/support/support_client.go delete mode 100644 v2/client/support/update_support_user_config_parameters.go delete mode 100644 v2/client/support/update_support_user_config_responses.go delete mode 100644 v2/client/support/validate_support_user_creds_parameters.go delete mode 100644 v2/client/support/validate_support_user_creds_responses.go delete mode 100644 v2/client/syslog/add_syslog_server_parameters.go delete mode 100644 v2/client/syslog/add_syslog_server_responses.go delete mode 100644 v2/client/syslog/get_supported_syslog_program_names_parameters.go delete mode 100644 v2/client/syslog/get_supported_syslog_program_names_responses.go delete mode 100644 v2/client/syslog/get_syslog_audit_tags_parameters.go delete mode 100644 v2/client/syslog/get_syslog_audit_tags_responses.go delete mode 100644 v2/client/syslog/get_syslog_server_by_id_parameters.go delete mode 100644 v2/client/syslog/get_syslog_server_by_id_responses.go delete mode 100644 v2/client/syslog/get_syslog_server_status_by_id_parameters.go delete mode 100644 v2/client/syslog/get_syslog_server_status_by_id_responses.go delete mode 100644 v2/client/syslog/get_syslog_servers_parameters.go delete mode 100644 v2/client/syslog/get_syslog_servers_responses.go delete mode 100644 v2/client/syslog/patch_syslog_server_by_id_parameters.go delete mode 100644 v2/client/syslog/patch_syslog_server_by_id_responses.go delete mode 100644 v2/client/syslog/remove_syslog_server_parameters.go delete mode 100644 v2/client/syslog/remove_syslog_server_responses.go delete mode 100644 v2/client/syslog/remove_syslog_servers_parameters.go delete mode 100644 v2/client/syslog/remove_syslog_servers_responses.go delete mode 100644 v2/client/syslog/syslog_client.go delete mode 100644 v2/client/syslog/update_syslog_audit_tags_parameters.go delete mode 100644 v2/client/syslog/update_syslog_audit_tags_responses.go delete mode 100644 v2/client/syslog/update_syslog_server_by_id_parameters.go delete mode 100644 v2/client/syslog/update_syslog_server_by_id_responses.go delete mode 100644 v2/client/tag/create_tag_parameters.go delete mode 100644 v2/client/tag/create_tag_responses.go delete mode 100644 v2/client/tag/delete_tag_parameters.go delete mode 100644 v2/client/tag/delete_tag_responses.go delete mode 100644 v2/client/tag/get_tag_by_id_parameters.go delete mode 100644 v2/client/tag/get_tag_by_id_responses.go delete mode 100644 v2/client/tag/get_tags_parameters.go delete mode 100644 v2/client/tag/get_tags_responses.go delete mode 100644 v2/client/tag/tag_client.go delete mode 100644 v2/client/tag/update_tag_parameters.go delete mode 100644 v2/client/tag/update_tag_responses.go delete mode 100644 v2/client/templates/download_art_file_parameters.go delete mode 100644 v2/client/templates/download_art_file_responses.go delete mode 100644 v2/client/templates/templates_client.go delete mode 100644 v2/client/tenant/assign_properties_to_tenant_parameters.go delete mode 100644 v2/client/tenant/assign_properties_to_tenant_responses.go delete mode 100644 v2/client/tenant/create_tenant_parameters.go delete mode 100644 v2/client/tenant/create_tenant_responses.go delete mode 100644 v2/client/tenant/delete_tenant_parameters.go delete mode 100644 v2/client/tenant/delete_tenant_responses.go delete mode 100644 v2/client/tenant/get_assigned_properties_for_tenant_parameters.go delete mode 100644 v2/client/tenant/get_assigned_properties_for_tenant_responses.go delete mode 100644 v2/client/tenant/get_on_prem_tenant_config_parameters.go delete mode 100644 v2/client/tenant/get_on_prem_tenant_config_responses.go delete mode 100644 v2/client/tenant/get_tenant_by_id_parameters.go delete mode 100644 v2/client/tenant/get_tenant_by_id_responses.go delete mode 100644 v2/client/tenant/get_tenant_swift_parameters.go delete mode 100644 v2/client/tenant/get_tenant_swift_responses.go delete mode 100644 v2/client/tenant/list_tenants_parameters.go delete mode 100644 v2/client/tenant/list_tenants_responses.go delete mode 100644 v2/client/tenant/perform_tenant_action_parameters.go delete mode 100644 v2/client/tenant/perform_tenant_action_responses.go delete mode 100644 v2/client/tenant/register_swift_parameters.go delete mode 100644 v2/client/tenant/register_swift_responses.go delete mode 100644 v2/client/tenant/tenant_client.go delete mode 100644 v2/client/tenant/unregister_swift_parameters.go delete mode 100644 v2/client/tenant/unregister_swift_responses.go delete mode 100644 v2/client/tenant/update_on_prem_tenant_config_parameters.go delete mode 100644 v2/client/tenant/update_on_prem_tenant_config_responses.go delete mode 100644 v2/client/tenant/update_tenant_parameters.go delete mode 100644 v2/client/tenant/update_tenant_responses.go delete mode 100644 v2/client/tenant/update_tenant_swift_parameters.go delete mode 100644 v2/client/tenant/update_tenant_swift_responses.go delete mode 100644 v2/client/user/create_group_parameters.go delete mode 100644 v2/client/user/create_group_responses.go delete mode 100644 v2/client/user/create_session_parameters.go delete mode 100644 v2/client/user/create_session_responses.go delete mode 100644 v2/client/user/create_user_api_key_parameters.go delete mode 100644 v2/client/user/create_user_api_key_responses.go delete mode 100644 v2/client/user/create_users_parameters.go delete mode 100644 v2/client/user/create_users_responses.go delete mode 100644 v2/client/user/delete_group_parameters.go delete mode 100644 v2/client/user/delete_group_responses.go delete mode 100644 v2/client/user/delete_groups_parameters.go delete mode 100644 v2/client/user/delete_groups_responses.go delete mode 100644 v2/client/user/delete_session_parameters.go delete mode 100644 v2/client/user/delete_session_responses.go delete mode 100644 v2/client/user/delete_user_api_key_by_id_parameters.go delete mode 100644 v2/client/user/delete_user_api_key_by_id_responses.go delete mode 100644 v2/client/user/delete_user_parameters.go delete mode 100644 v2/client/user/delete_user_responses.go delete mode 100644 v2/client/user/delete_users_parameters.go delete mode 100644 v2/client/user/delete_users_responses.go delete mode 100644 v2/client/user/get_active_sessions_count_parameters.go delete mode 100644 v2/client/user/get_active_sessions_count_responses.go delete mode 100644 v2/client/user/get_all_api_keys_parameters.go delete mode 100644 v2/client/user/get_all_api_keys_responses.go delete mode 100644 v2/client/user/get_group_by_s_id_parameters.go delete mode 100644 v2/client/user/get_group_by_s_id_responses.go delete mode 100644 v2/client/user/get_groups_parameters.go delete mode 100644 v2/client/user/get_groups_responses.go delete mode 100644 v2/client/user/get_principal_sources_parameters.go delete mode 100644 v2/client/user/get_principal_sources_responses.go delete mode 100644 v2/client/user/get_security_principals_parameters.go delete mode 100644 v2/client/user/get_security_principals_responses.go delete mode 100644 v2/client/user/get_user_api_key_by_id_parameters.go delete mode 100644 v2/client/user/get_user_api_key_by_id_responses.go delete mode 100644 v2/client/user/get_user_api_keys_parameters.go delete mode 100644 v2/client/user/get_user_api_keys_responses.go delete mode 100644 v2/client/user/get_user_by_s_id_parameters.go delete mode 100644 v2/client/user/get_user_by_s_id_responses.go delete mode 100644 v2/client/user/get_users_parameters.go delete mode 100644 v2/client/user/get_users_responses.go delete mode 100644 v2/client/user/regenerate_s3_key_parameters.go delete mode 100644 v2/client/user/regenerate_s3_key_responses.go delete mode 100644 v2/client/user/rotate_user_api_key_parameters.go delete mode 100644 v2/client/user/rotate_user_api_key_responses.go delete mode 100644 v2/client/user/update_group_parameters.go delete mode 100644 v2/client/user/update_group_responses.go delete mode 100644 v2/client/user/update_principal_sources_parameters.go delete mode 100644 v2/client/user/update_principal_sources_responses.go delete mode 100644 v2/client/user/update_user_api_key_by_id_parameters.go delete mode 100644 v2/client/user/update_user_api_key_by_id_responses.go delete mode 100644 v2/client/user/update_user_parameters.go delete mode 100644 v2/client/user/update_user_responses.go delete mode 100644 v2/client/user/user_client.go delete mode 100644 v2/client/view/add_view_user_quota_overrides_parameters.go delete mode 100644 v2/client/view/add_view_user_quota_overrides_responses.go delete mode 100644 v2/client/view/clear_nlm_locks_parameters.go delete mode 100644 v2/client/view/clear_nlm_locks_responses.go delete mode 100644 v2/client/view/clone_view_directory_parameters.go delete mode 100644 v2/client/view/clone_view_directory_responses.go delete mode 100644 v2/client/view/clone_view_parameters.go delete mode 100644 v2/client/view/clone_view_responses.go delete mode 100644 v2/client/view/close_smb_file_open_parameters.go delete mode 100644 v2/client/view/close_smb_file_open_responses.go delete mode 100644 v2/client/view/create_share_parameters.go delete mode 100644 v2/client/view/create_share_responses.go delete mode 100644 v2/client/view/create_view_parameters.go delete mode 100644 v2/client/view/create_view_responses.go delete mode 100644 v2/client/view/create_view_template_parameters.go delete mode 100644 v2/client/view/create_view_template_responses.go delete mode 100644 v2/client/view/delete_share_parameters.go delete mode 100644 v2/client/view/delete_share_responses.go delete mode 100644 v2/client/view/delete_view_directory_quota_parameters.go delete mode 100644 v2/client/view/delete_view_directory_quota_responses.go delete mode 100644 v2/client/view/delete_view_parameters.go delete mode 100644 v2/client/view/delete_view_responses.go delete mode 100644 v2/client/view/delete_view_template_parameters.go delete mode 100644 v2/client/view/delete_view_template_responses.go delete mode 100644 v2/client/view/delete_view_user_quota_overrides_parameters.go delete mode 100644 v2/client/view/delete_view_user_quota_overrides_responses.go delete mode 100644 v2/client/view/get_file_lock_status_parameters.go delete mode 100644 v2/client/view/get_file_lock_status_responses.go delete mode 100644 v2/client/view/get_nlm_locks_parameters.go delete mode 100644 v2/client/view/get_nlm_locks_responses.go delete mode 100644 v2/client/view/get_qos_policies_parameters.go delete mode 100644 v2/client/view/get_qos_policies_responses.go delete mode 100644 v2/client/view/get_shares_parameters.go delete mode 100644 v2/client/view/get_shares_responses.go delete mode 100644 v2/client/view/get_view_by_id_parameters.go delete mode 100644 v2/client/view/get_view_by_id_responses.go delete mode 100644 v2/client/view/get_view_clients_parameters.go delete mode 100644 v2/client/view/get_view_clients_responses.go delete mode 100644 v2/client/view/get_view_clients_summary_parameters.go delete mode 100644 v2/client/view/get_view_clients_summary_responses.go delete mode 100644 v2/client/view/get_view_directory_quotas_parameters.go delete mode 100644 v2/client/view/get_view_directory_quotas_responses.go delete mode 100644 v2/client/view/get_view_user_quotas_parameters.go delete mode 100644 v2/client/view/get_view_user_quotas_responses.go delete mode 100644 v2/client/view/get_views_parameters.go delete mode 100644 v2/client/view/get_views_responses.go delete mode 100644 v2/client/view/get_views_summary_parameters.go delete mode 100644 v2/client/view/get_views_summary_responses.go delete mode 100644 v2/client/view/list_smb_file_opens_parameters.go delete mode 100644 v2/client/view/list_smb_file_opens_responses.go delete mode 100644 v2/client/view/lock_file_parameters.go delete mode 100644 v2/client/view/lock_file_responses.go delete mode 100644 v2/client/view/overwrite_view_parameters.go delete mode 100644 v2/client/view/overwrite_view_responses.go delete mode 100644 v2/client/view/read_view_template_by_id_parameters.go delete mode 100644 v2/client/view/read_view_template_by_id_responses.go delete mode 100644 v2/client/view/read_view_templates_parameters.go delete mode 100644 v2/client/view/read_view_templates_responses.go delete mode 100644 v2/client/view/update_share_parameters.go delete mode 100644 v2/client/view/update_share_responses.go delete mode 100644 v2/client/view/update_view_directory_quota_parameters.go delete mode 100644 v2/client/view/update_view_directory_quota_responses.go delete mode 100644 v2/client/view/update_view_parameters.go delete mode 100644 v2/client/view/update_view_responses.go delete mode 100644 v2/client/view/update_view_template_parameters.go delete mode 100644 v2/client/view/update_view_template_responses.go delete mode 100644 v2/client/view/update_view_user_quota_override_parameters.go delete mode 100644 v2/client/view/update_view_user_quota_override_responses.go delete mode 100644 v2/client/view/update_view_user_quota_settings_parameters.go delete mode 100644 v2/client/view/update_view_user_quota_settings_responses.go delete mode 100644 v2/client/view/view_client.go delete mode 100644 v2/models/a_a_g_group.go delete mode 100644 v2/models/a_a_g_info.go delete mode 100644 v2/models/a_d_attribute_constants.go delete mode 100644 v2/models/a_d_class_constants.go delete mode 100644 v2/models/a_d_protection_group_params.go delete mode 100644 v2/models/a_w_s_tags.go delete mode 100644 v2/models/a_w_s_target_config.go delete mode 100644 v2/models/a_w_s_tier.go delete mode 100644 v2/models/a_w_s_tiering_levels.go delete mode 100644 v2/models/a_w_s_tiers.go delete mode 100644 v2/models/aag_backup_preference.go delete mode 100644 v2/models/abort_incomplete_multipart_upload_action.go delete mode 100644 v2/models/access_token_response.go delete mode 100644 v2/models/acl_config.go delete mode 100644 v2/models/acl_grant.go delete mode 100644 v2/models/acl_grantee.go delete mode 100644 v2/models/acropolis_disk_info.go delete mode 100644 v2/models/acropolis_protection_group_object_params.go delete mode 100644 v2/models/acropolis_protection_group_params.go delete mode 100644 v2/models/acropolis_recover_files_new_target_config.go delete mode 100644 v2/models/acropolis_recover_files_original_target_config.go delete mode 100644 v2/models/acropolis_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/acropolis_target_params_for_recover_vm.go delete mode 100644 v2/models/action_object_level_response.go delete mode 100644 v2/models/action_object_mapping.go delete mode 100644 v2/models/active_directories.go delete mode 100644 v2/models/active_directory.go delete mode 100644 v2/models/active_directory_admin_params.go delete mode 100644 v2/models/active_directory_app_params.go delete mode 100644 v2/models/active_directory_error.go delete mode 100644 v2/models/active_directory_protection_group_object_params.go delete mode 100644 v2/models/active_sessions_count_params.go delete mode 100644 v2/models/ad_auth_mapping.go delete mode 100644 v2/models/ad_centrify_type_params.go delete mode 100644 v2/models/ad_custom_attributes_type_params.go delete mode 100644 v2/models/ad_fixed_type_params.go delete mode 100644 v2/models/ad_ldap_provider_type_params.go delete mode 100644 v2/models/ad_nis_provider_type_params.go delete mode 100644 v2/models/ad_rfc2307_type_params.go delete mode 100644 v2/models/ad_sfu30_type_params.go delete mode 100644 v2/models/add_dmaas_tenant_cert_request.go delete mode 100644 v2/models/add_remote_disk_response_body.go delete mode 100644 v2/models/advanced_settings.go delete mode 100644 v2/models/agent_info_object.go delete mode 100644 v2/models/agent_information.go delete mode 100644 v2/models/agent_upgrade_info_object.go delete mode 100644 v2/models/agent_upgrade_task_action_object.go delete mode 100644 v2/models/agent_upgrade_task_action_request.go delete mode 100644 v2/models/agent_upgrade_task_state.go delete mode 100644 v2/models/agent_upgrade_task_states.go delete mode 100644 v2/models/airgap_config.go delete mode 100644 v2/models/airgap_status.go delete mode 100644 v2/models/aix_agent_params.go delete mode 100644 v2/models/alert_group_summary.go delete mode 100644 v2/models/alert_status.go delete mode 100644 v2/models/alert_target.go delete mode 100644 v2/models/alerts_summary_response.go delete mode 100644 v2/models/alias_smb_config.go delete mode 100644 v2/models/allowed_failover_operation.go delete mode 100644 v2/models/antivirus_scan_config.go delete mode 100644 v2/models/antivirus_service.go delete mode 100644 v2/models/antivirus_service_group.go delete mode 100644 v2/models/antivirus_service_groups.go delete mode 100644 v2/models/api_based_fetch_info.go delete mode 100644 v2/models/app_resource.go delete mode 100644 v2/models/applied_patch.go delete mode 100644 v2/models/applied_patches.go delete mode 100644 v2/models/apply_baseos_patch_request.go delete mode 100644 v2/models/apply_patches_request.go delete mode 100644 v2/models/archival_aws_external_target_params.go delete mode 100644 v2/models/archival_azure_external_target_params.go delete mode 100644 v2/models/archival_bandwidth_settings.go delete mode 100644 v2/models/archival_config.go delete mode 100644 v2/models/archival_data_stats.go delete mode 100644 v2/models/archival_external_target_params.go delete mode 100644 v2/models/archival_gcp_external_target_params.go delete mode 100644 v2/models/archival_media_info.go delete mode 100644 v2/models/archival_nas_external_target_params.go delete mode 100644 v2/models/archival_oracle_external_target_params.go delete mode 100644 v2/models/archival_qstar_tape_external_target_params.go delete mode 100644 v2/models/archival_run.go delete mode 100644 v2/models/archival_run_summary.go delete mode 100644 v2/models/archival_s3_comp_external_target_params.go delete mode 100644 v2/models/archival_target_progress_info.go delete mode 100644 v2/models/archival_target_result.go delete mode 100644 v2/models/archival_target_stats_info.go delete mode 100644 v2/models/archival_target_storage_type.go delete mode 100644 v2/models/archival_target_summary_info.go delete mode 100644 v2/models/archival_target_tier_info.go delete mode 100644 v2/models/archival_targets.go delete mode 100644 v2/models/assigned_sources.go delete mode 100644 v2/models/associate_entity_metadata_request.go delete mode 100644 v2/models/associate_entity_metadata_result.go delete mode 100644 v2/models/associate_entity_metadata_result_params.go delete mode 100644 v2/models/attachment.go delete mode 100644 v2/models/audit_actions.go delete mode 100644 v2/models/audit_entity_types.go delete mode 100644 v2/models/audit_log.go delete mode 100644 v2/models/audit_log_config.go delete mode 100644 v2/models/audit_logs.go delete mode 100644 v2/models/audit_logs_actions.go delete mode 100644 v2/models/audit_logs_entity_types.go delete mode 100644 v2/models/aurora_config.go delete mode 100644 v2/models/available_patch.go delete mode 100644 v2/models/available_patches.go delete mode 100644 v2/models/aws_agent_protection_group_object_params.go delete mode 100644 v2/models/aws_agent_protection_group_params.go delete mode 100644 v2/models/aws_archival_storage_class.go delete mode 100644 v2/models/aws_aurora_protection_group_object_params.go delete mode 100644 v2/models/aws_aurora_protection_group_params.go delete mode 100644 v2/models/aws_aurora_recovery_target_config.go delete mode 100644 v2/models/aws_aurora_snapshot_manager_object_protection_params.go delete mode 100644 v2/models/aws_auth_method.go delete mode 100644 v2/models/aws_auth_method_type.go delete mode 100644 v2/models/aws_authentication_methods_params.go delete mode 100644 v2/models/aws_cloud_c2_s_params.go delete mode 100644 v2/models/aws_cloud_gov_params.go delete mode 100644 v2/models/aws_cloud_spin_params.go delete mode 100644 v2/models/aws_cloud_standard_params.go delete mode 100644 v2/models/aws_common_object_protection_params.go delete mode 100644 v2/models/aws_entity_metadata.go delete mode 100644 v2/models/aws_fleet_info.go delete mode 100644 v2/models/aws_glacier_params.go delete mode 100644 v2/models/aws_i_am_role_params.go delete mode 100644 v2/models/aws_i_am_user_params.go delete mode 100644 v2/models/aws_kms_configuration.go delete mode 100644 v2/models/aws_kms_configuration_response.go delete mode 100644 v2/models/aws_kms_configuration_update_params.go delete mode 100644 v2/models/aws_native_object_protection_params.go delete mode 100644 v2/models/aws_native_protection_group_object_params.go delete mode 100644 v2/models/aws_native_protection_group_params.go delete mode 100644 v2/models/aws_object_level_params.go delete mode 100644 v2/models/aws_object_protection_request_params.go delete mode 100644 v2/models/aws_object_protection_response_params.go delete mode 100644 v2/models/aws_object_protection_update_request_params.go delete mode 100644 v2/models/aws_postgres_entity_metadata.go delete mode 100644 v2/models/aws_postgres_metadata.go delete mode 100644 v2/models/aws_postgres_metadata_type.go delete mode 100644 v2/models/aws_protection_group_params.go delete mode 100644 v2/models/aws_protection_group_type.go delete mode 100644 v2/models/aws_rds_postgres_object_level_params.go delete mode 100644 v2/models/aws_rds_postgres_protection_group_object_params.go delete mode 100644 v2/models/aws_rds_postgres_protection_group_params.go delete mode 100644 v2/models/aws_rds_postgres_protection_params.go delete mode 100644 v2/models/aws_rds_protection_group_object_params.go delete mode 100644 v2/models/aws_rds_protection_group_params.go delete mode 100644 v2/models/aws_rds_recovery_target_config.go delete mode 100644 v2/models/aws_rds_snapshot_manager_object_protection_params.go delete mode 100644 v2/models/aws_recover_files_new_target_config.go delete mode 100644 v2/models/aws_recover_files_original_target_config.go delete mode 100644 v2/models/aws_recover_s3_new_target_config.go delete mode 100644 v2/models/aws_region_id.go delete mode 100644 v2/models/aws_s3_bucket_restore_filter_policy.go delete mode 100644 v2/models/aws_s3_glacier_deep_archive_params.go delete mode 100644 v2/models/aws_s3_glacier_i_r_params.go delete mode 100644 v2/models/aws_s3_glacier_params.go delete mode 100644 v2/models/aws_s3_intelligent_params.go delete mode 100644 v2/models/aws_s3_object_level_params.go delete mode 100644 v2/models/aws_s3_one_zone_i_a_params.go delete mode 100644 v2/models/aws_s3_protection_group_object_params.go delete mode 100644 v2/models/aws_s3_protection_group_params.go delete mode 100644 v2/models/aws_s3_protection_params.go delete mode 100644 v2/models/aws_s3_standard_i_a_params.go delete mode 100644 v2/models/aws_s3_standard_params.go delete mode 100644 v2/models/aws_s3_storage_class.go delete mode 100644 v2/models/aws_snapshot_manager_object_protection_params.go delete mode 100644 v2/models/aws_snapshot_manager_protection_group_object_params.go delete mode 100644 v2/models/aws_snapshot_manager_protection_group_params.go delete mode 100644 v2/models/aws_snapshot_params.go delete mode 100644 v2/models/aws_source_registration_params.go delete mode 100644 v2/models/aws_subscription_type.go delete mode 100644 v2/models/aws_target_category.go delete mode 100644 v2/models/aws_target_params_for_recover_aurora.go delete mode 100644 v2/models/aws_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/aws_target_params_for_recover_r_d_s_postgres.go delete mode 100644 v2/models/aws_target_params_for_recover_rds.go delete mode 100644 v2/models/aws_target_params_for_recover_s3.go delete mode 100644 v2/models/aws_target_params_for_recover_vm.go delete mode 100644 v2/models/aws_tiering_storage_class.go delete mode 100644 v2/models/aws_use_s_t_s_params.go delete mode 100644 v2/models/aws_vm_recovery_target_config.go delete mode 100644 v2/models/azure_agent_protection_group_object_params.go delete mode 100644 v2/models/azure_agent_protection_group_params.go delete mode 100644 v2/models/azure_application_credentials.go delete mode 100644 v2/models/azure_archival_storage_class.go delete mode 100644 v2/models/azure_archive_blob_params.go delete mode 100644 v2/models/azure_cloud_spin_params.go delete mode 100644 v2/models/azure_common_object_protection_params.go delete mode 100644 v2/models/azure_cool_blob_params.go delete mode 100644 v2/models/azure_e_s_config_for_indexing.go delete mode 100644 v2/models/azure_entity_metadata.go delete mode 100644 v2/models/azure_fleet_info.go delete mode 100644 v2/models/azure_hot_blob_params.go delete mode 100644 v2/models/azure_native_object_protection_params.go delete mode 100644 v2/models/azure_native_protection_group_object_params.go delete mode 100644 v2/models/azure_native_protection_group_params.go delete mode 100644 v2/models/azure_object_level_params.go delete mode 100644 v2/models/azure_object_protection_request_params.go delete mode 100644 v2/models/azure_object_protection_response_params.go delete mode 100644 v2/models/azure_object_protection_update_request_params.go delete mode 100644 v2/models/azure_protection_group_params.go delete mode 100644 v2/models/azure_protection_group_type.go delete mode 100644 v2/models/azure_protection_use_case_type.go delete mode 100644 v2/models/azure_recover_files_new_target_config.go delete mode 100644 v2/models/azure_recover_files_original_target_config.go delete mode 100644 v2/models/azure_snapshot_manager_protection_group_object_params.go delete mode 100644 v2/models/azure_snapshot_manager_protection_group_params.go delete mode 100644 v2/models/azure_snapshot_params.go delete mode 100644 v2/models/azure_source_registration_params.go delete mode 100644 v2/models/azure_sql_entity_metadata.go delete mode 100644 v2/models/azure_sql_metadata.go delete mode 100644 v2/models/azure_sql_metadata_type.go delete mode 100644 v2/models/azure_sql_object_protection_params.go delete mode 100644 v2/models/azure_sql_package_options.go delete mode 100644 v2/models/azure_sql_sku_options.go delete mode 100644 v2/models/azure_storage_config_for_indexing.go delete mode 100644 v2/models/azure_subscription.go delete mode 100644 v2/models/azure_target_category.go delete mode 100644 v2/models/azure_target_config.go delete mode 100644 v2/models/azure_target_params_for_recover_azure_sql.go delete mode 100644 v2/models/azure_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/azure_target_params_for_recover_vm.go delete mode 100644 v2/models/azure_tier.go delete mode 100644 v2/models/azure_tiering_levels.go delete mode 100644 v2/models/azure_tiering_storage_class.go delete mode 100644 v2/models/azure_tiers.go delete mode 100644 v2/models/azure_vm_recovery_target_config.go delete mode 100644 v2/models/backup_attempt.go delete mode 100644 v2/models/backup_data_stats.go delete mode 100644 v2/models/backup_error_class.go delete mode 100644 v2/models/backup_generic_stats.go delete mode 100644 v2/models/backup_nas_stats.go delete mode 100644 v2/models/backup_policy.go delete mode 100644 v2/models/backup_run.go delete mode 100644 v2/models/backup_run_progress_info.go delete mode 100644 v2/models/backup_run_stats_info.go delete mode 100644 v2/models/backup_run_summary.go delete mode 100644 v2/models/bandwidth_limit.go delete mode 100644 v2/models/bandwidth_throttling.go delete mode 100644 v2/models/bandwidth_throttling_override.go delete mode 100644 v2/models/baseos_patch_list.go delete mode 100644 v2/models/baseos_patch_list_item.go delete mode 100644 v2/models/baseos_patch_log.go delete mode 100644 v2/models/bgp_instance.go delete mode 100644 v2/models/bgp_peer.go delete mode 100644 v2/models/bgp_timers.go delete mode 100644 v2/models/bifrost_connection.go delete mode 100644 v2/models/bifrost_connections.go delete mode 100644 v2/models/bifrost_connector.go delete mode 100644 v2/models/bifrost_connectors.go delete mode 100644 v2/models/blackout_window.go delete mode 100644 v2/models/bmr_backup_policy.go delete mode 100644 v2/models/bmr_schedule.go delete mode 100644 v2/models/bond_interface_network_params.go delete mode 100644 v2/models/bond_member.go delete mode 100644 v2/models/bonding_mode_type.go delete mode 100644 v2/models/boolean_form_field_params.go delete mode 100644 v2/models/bucket_policy.go delete mode 100644 v2/models/byte_size.go delete mode 100644 v2/models/c_d_p_filter_status.go delete mode 100644 v2/models/cancel_gaia_indexing_params.go delete mode 100644 v2/models/cancel_gaia_indexing_result.go delete mode 100644 v2/models/cancel_object_run_params.go delete mode 100644 v2/models/cancel_object_runs_params.go delete mode 100644 v2/models/cancel_object_runs_request.go delete mode 100644 v2/models/cancel_object_runs_result.go delete mode 100644 v2/models/cancel_object_runs_results.go delete mode 100644 v2/models/cancel_protection_group_run_request.go delete mode 100644 v2/models/cancel_protection_group_run_response_params.go delete mode 100644 v2/models/cancellation_timeout_params.go delete mode 100644 v2/models/capacity_by_tier.go delete mode 100644 v2/models/capacity_trend_analysis.go delete mode 100644 v2/models/capacity_trend_datapoint.go delete mode 100644 v2/models/capacity_trend_datapoint_stats.go delete mode 100644 v2/models/cascaded_target_configuration.go delete mode 100644 v2/models/cassandra_auth_type.go delete mode 100644 v2/models/cassandra_connection_params.go delete mode 100644 v2/models/cassandra_indexed_object.go delete mode 100644 v2/models/cassandra_indexed_objects.go delete mode 100644 v2/models/cassandra_on_prem_search_params.go delete mode 100644 v2/models/cassandra_params.go delete mode 100644 v2/models/cassandra_port_info.go delete mode 100644 v2/models/cassandra_protection_group_params.go delete mode 100644 v2/models/cassandra_protection_run_params.go delete mode 100644 v2/models/cassandra_search_params.go delete mode 100644 v2/models/cassandra_security_info.go delete mode 100644 v2/models/cassandra_source_config_params.go delete mode 100644 v2/models/cassandra_source_registration_params.go delete mode 100644 v2/models/cassandra_source_registration_patch_params.go delete mode 100644 v2/models/cdp_backup_policy.go delete mode 100644 v2/models/cdp_local_backup_info.go delete mode 100644 v2/models/cdp_object_info.go delete mode 100644 v2/models/cdp_object_last_run_info.go delete mode 100644 v2/models/cdp_retention.go delete mode 100644 v2/models/centrify_zone.go delete mode 100644 v2/models/centrify_zones.go delete mode 100644 v2/models/certificate.go delete mode 100644 v2/models/certificate_auth_mapping.go delete mode 100644 v2/models/certificate_request_params.go delete mode 100644 v2/models/certificate_validation_status.go delete mode 100644 v2/models/channel_item.go delete mode 100644 v2/models/channel_param.go delete mode 100644 v2/models/chassis.go delete mode 100644 v2/models/chassis_info.go delete mode 100644 v2/models/chassis_list.go delete mode 100644 v2/models/chassis_rack_config_params.go delete mode 100644 v2/models/cipher_suite.go delete mode 100644 v2/models/ciphers_resp.go delete mode 100644 v2/models/clear_nlm_lock_request.go delete mode 100644 v2/models/client_stats.go delete mode 100644 v2/models/client_stats_in_last_hours.go delete mode 100644 v2/models/clone_action_cleanup_cloud_resources_cleanup_params.go delete mode 100644 v2/models/clone_action_cleanup_params.go delete mode 100644 v2/models/clone_action_cleanup_power_off_vm_params.go delete mode 100644 v2/models/clone_view_directory_params.go delete mode 100644 v2/models/clone_view_params.go delete mode 100644 v2/models/close_smb_file_open_params.go delete mode 100644 v2/models/cloud_backup_script_params.go delete mode 100644 v2/models/cloud_cluster_expand_params.go delete mode 100644 v2/models/cloud_domain.go delete mode 100644 v2/models/cloud_down_water_fall_params.go delete mode 100644 v2/models/cloud_resources_cleanup_ami_instance_id.go delete mode 100644 v2/models/cloud_resources_cleanup_restore_task_details.go delete mode 100644 v2/models/cloud_retrieve_task.go delete mode 100644 v2/models/cloud_retrieve_tasks.go delete mode 100644 v2/models/cloud_spin_config.go delete mode 100644 v2/models/cloud_spin_data_stats.go delete mode 100644 v2/models/cloud_spin_run.go delete mode 100644 v2/models/cloud_spin_run_summary.go delete mode 100644 v2/models/cloud_spin_target.go delete mode 100644 v2/models/cloud_spin_target_result.go delete mode 100644 v2/models/cluster.go delete mode 100644 v2/models/cluster_a_m_q_p_target_config.go delete mode 100644 v2/models/cluster_audit_log_config.go delete mode 100644 v2/models/cluster_create_cloud_params.go delete mode 100644 v2/models/cluster_create_network_config.go delete mode 100644 v2/models/cluster_create_node_params.go delete mode 100644 v2/models/cluster_create_node_status_response.go delete mode 100644 v2/models/cluster_create_physical_params.go delete mode 100644 v2/models/cluster_create_rigel_params.go delete mode 100644 v2/models/cluster_create_virtual_params.go delete mode 100644 v2/models/cluster_dhcp_network_config.go delete mode 100644 v2/models/cluster_expand_params.go delete mode 100644 v2/models/cluster_free_disks.go delete mode 100644 v2/models/cluster_health_status.go delete mode 100644 v2/models/cluster_identifier.go delete mode 100644 v2/models/cluster_interfaces.go delete mode 100644 v2/models/cluster_ipmi_user.go delete mode 100644 v2/models/cluster_local_domain_s_id.go delete mode 100644 v2/models/cluster_log_type.go delete mode 100644 v2/models/cluster_manual_network_config.go delete mode 100644 v2/models/cluster_node_operation_status.go delete mode 100644 v2/models/cluster_operation_response_params.go delete mode 100644 v2/models/cluster_operation_status.go delete mode 100644 v2/models/cluster_package_params.go delete mode 100644 v2/models/cluster_packages.go delete mode 100644 v2/models/cluster_provider_type.go delete mode 100644 v2/models/cluster_proxy_server_config.go delete mode 100644 v2/models/cluster_size.go delete mode 100644 v2/models/cluster_state_params.go delete mode 100644 v2/models/cluster_storage_stats.go delete mode 100644 v2/models/cluster_type.go delete mode 100644 v2/models/cluster_ui_config.go delete mode 100644 v2/models/cluster_uprade_params.go delete mode 100644 v2/models/cluster_vlan_params.go delete mode 100644 v2/models/cluster_vlans.go delete mode 100644 v2/models/cohesity_ca_key_info.go delete mode 100644 v2/models/cohesity_ca_status_response.go delete mode 100644 v2/models/common_a_w_s_category_params.go delete mode 100644 v2/models/common_active_directory_params.go delete mode 100644 v2/models/common_archival_aws_external_target_params.go delete mode 100644 v2/models/common_archival_azure_external_target_params.go delete mode 100644 v2/models/common_archival_external_target_params.go delete mode 100644 v2/models/common_authentication_method_params.go delete mode 100644 v2/models/common_aws_external_target_params.go delete mode 100644 v2/models/common_azure_external_target_params.go delete mode 100644 v2/models/common_backup_params.go delete mode 100644 v2/models/common_bandwidth_settings.go delete mode 100644 v2/models/common_cdp_params.go delete mode 100644 v2/models/common_cloud_tier_settings.go delete mode 100644 v2/models/common_create_or_update_rigel_connection_request.go delete mode 100644 v2/models/common_create_or_update_rigel_connector_request.go delete mode 100644 v2/models/common_csr_request_params.go delete mode 100644 v2/models/common_csr_response_params.go delete mode 100644 v2/models/common_data_tiering_analysis_group_params.go delete mode 100644 v2/models/common_data_tiering_task_params.go delete mode 100644 v2/models/common_data_tiering_task_response.go delete mode 100644 v2/models/common_download_file_and_folder_params.go delete mode 100644 v2/models/common_env_specific_object_protection_params.go delete mode 100644 v2/models/common_external_target_params.go delete mode 100644 v2/models/common_gcp_external_target_params.go delete mode 100644 v2/models/common_generic_nas_protection_params.go delete mode 100644 v2/models/common_hyper_v_object_params.go delete mode 100644 v2/models/common_hyper_v_protection_params.go delete mode 100644 v2/models/common_identity_provider_configuration.go delete mode 100644 v2/models/common_indexed_object_params.go delete mode 100644 v2/models/common_m_s_sql_protection_group_params.go delete mode 100644 v2/models/common_mssql_file_object_protection_params.go delete mode 100644 v2/models/common_mssql_native_object_protection_params.go delete mode 100644 v2/models/common_mssql_object_protection_params.go delete mode 100644 v2/models/common_nas_object_params.go delete mode 100644 v2/models/common_nas_protection_params.go delete mode 100644 v2/models/common_no_sql_recovery_options.go delete mode 100644 v2/models/common_object_action_request.go delete mode 100644 v2/models/common_object_protect_params.go delete mode 100644 v2/models/common_object_snapshot_volume_params.go delete mode 100644 v2/models/common_object_summary.go delete mode 100644 v2/models/common_objects_action_params.go delete mode 100644 v2/models/common_oracle_app_source_config.go delete mode 100644 v2/models/common_oracle_clone_params.go delete mode 100644 v2/models/common_oracle_external_target_params.go delete mode 100644 v2/models/common_p_i_t_ranges_protected_object_response.go delete mode 100644 v2/models/common_post_backup_script_params.go delete mode 100644 v2/models/common_pre_backup_script_params.go delete mode 100644 v2/models/common_pre_post_cloud_script_params.go delete mode 100644 v2/models/common_pre_post_script_params.go delete mode 100644 v2/models/common_protection_group_request_params.go delete mode 100644 v2/models/common_protection_group_response_params.go delete mode 100644 v2/models/common_protection_group_run_response_parameters.go delete mode 100644 v2/models/common_recover_file_and_folder_info.go delete mode 100644 v2/models/common_recover_object_snapshot_params.go delete mode 100644 v2/models/common_recover_oracle_app_target_params.go delete mode 100644 v2/models/common_recover_sql_app_target_params.go delete mode 100644 v2/models/common_recovery_request_params.go delete mode 100644 v2/models/common_recovery_response_params.go delete mode 100644 v2/models/common_remote_storage_info.go delete mode 100644 v2/models/common_s3_comp_external_target_params.go delete mode 100644 v2/models/common_search_indexed_objects_request_params.go delete mode 100644 v2/models/common_search_indexed_objects_response_params.go delete mode 100644 v2/models/common_source_connection_request_params.go delete mode 100644 v2/models/common_source_registration_params.go delete mode 100644 v2/models/common_source_registration_reponse_params.go delete mode 100644 v2/models/common_source_registration_request_params.go delete mode 100644 v2/models/common_sql_app_source_config.go delete mode 100644 v2/models/common_standby_resource_params.go delete mode 100644 v2/models/common_target_configuration.go delete mode 100644 v2/models/common_tdm_clone_snapshot_params.go delete mode 100644 v2/models/common_tdm_clone_task_params.go delete mode 100644 v2/models/common_tdm_clone_task_request_params.go delete mode 100644 v2/models/common_tdm_clone_task_response_params.go delete mode 100644 v2/models/common_tdm_object_response_params.go delete mode 100644 v2/models/common_tdm_object_timeline_events_response_params.go delete mode 100644 v2/models/common_tdm_refresh_task_response_params.go delete mode 100644 v2/models/common_tdm_task_request_params.go delete mode 100644 v2/models/common_tdm_task_response_params.go delete mode 100644 v2/models/common_tiering_aws_external_target_params.go delete mode 100644 v2/models/common_tiering_azure_external_target_params.go delete mode 100644 v2/models/common_tiering_external_target_params.go delete mode 100644 v2/models/common_tiering_policy.go delete mode 100644 v2/models/common_updatable_user_params.go delete mode 100644 v2/models/common_vmware_object_params.go delete mode 100644 v2/models/common_vmware_protection_params.go delete mode 100644 v2/models/component_removal_progress.go delete mode 100644 v2/models/compression_params.go delete mode 100644 v2/models/compression_type.go delete mode 100644 v2/models/connection_bandwidth_limits.go delete mode 100644 v2/models/connection_config.go delete mode 100644 v2/models/connectivity_check_response_body.go delete mode 100644 v2/models/connectivity_status.go delete mode 100644 v2/models/connector_aws_metadata.go delete mode 100644 v2/models/connector_azure_metadata.go delete mode 100644 v2/models/connector_cloud_metadata.go delete mode 100644 v2/models/connector_connection_info.go delete mode 100644 v2/models/connector_group.go delete mode 100644 v2/models/connector_type.go delete mode 100644 v2/models/construct_meta_info_params.go delete mode 100644 v2/models/construct_meta_info_request.go delete mode 100644 v2/models/construct_meta_info_result.go delete mode 100644 v2/models/construct_meta_info_sfdc_params.go delete mode 100644 v2/models/construct_restore_meta_info_oracle_params.go delete mode 100644 v2/models/container_database_info.go delete mode 100644 v2/models/continuous_snapshot_params.go delete mode 100644 v2/models/couch_base_on_prem_search_params.go delete mode 100644 v2/models/couchbase_indexed_object.go delete mode 100644 v2/models/couchbase_indexed_objects.go delete mode 100644 v2/models/couchbase_params.go delete mode 100644 v2/models/couchbase_search_params.go delete mode 100644 v2/models/couchbase_source_registration_params.go delete mode 100644 v2/models/count_by_tier.go delete mode 100644 v2/models/create_access_token_request_params.go delete mode 100644 v2/models/create_active_directory_request.go delete mode 100644 v2/models/create_antivirus_service_group_params.go delete mode 100644 v2/models/create_azure_application_request_params.go delete mode 100644 v2/models/create_azure_application_response_params.go delete mode 100644 v2/models/create_bifrost_connection_request.go delete mode 100644 v2/models/create_cad_storage_domain_param.go delete mode 100644 v2/models/create_clientcsr_response_body.go delete mode 100644 v2/models/create_cloud_retrieve_task_request.go delete mode 100644 v2/models/create_cloud_retrieve_task_resp_body.go delete mode 100644 v2/models/create_cluster_params.go delete mode 100644 v2/models/create_cluster_vlan_params.go delete mode 100644 v2/models/create_csr_request.go delete mode 100644 v2/models/create_csr_response_body.go delete mode 100644 v2/models/create_email_otp_request_body.go delete mode 100644 v2/models/create_gaia_index_params.go delete mode 100644 v2/models/create_gaia_index_result.go delete mode 100644 v2/models/create_group_params.go delete mode 100644 v2/models/create_groups_params.go delete mode 100644 v2/models/create_idp_request_params.go delete mode 100644 v2/models/create_keystone_request.go delete mode 100644 v2/models/create_ldap_params.go delete mode 100644 v2/models/create_mcm_claim_request.go delete mode 100644 v2/models/create_mcm_claim_response_body.go delete mode 100644 v2/models/create_odp_remote_cluster_params.go delete mode 100644 v2/models/create_or_update_api_key_request.go delete mode 100644 v2/models/create_or_update_data_tiering_task_request.go delete mode 100644 v2/models/create_or_update_protection_group_request.go delete mode 100644 v2/models/create_protected_objects_request.go delete mode 100644 v2/models/create_protected_objects_response.go delete mode 100644 v2/models/create_protection_group_run_request.go delete mode 100644 v2/models/create_protection_group_run_response_body.go delete mode 100644 v2/models/create_recovery_request.go delete mode 100644 v2/models/create_remote_disk_status.go delete mode 100644 v2/models/create_rigel_connection_request.go delete mode 100644 v2/models/create_rigel_connector_request.go delete mode 100644 v2/models/create_role_parameters.go delete mode 100644 v2/models/create_storage_domain_param.go delete mode 100644 v2/models/create_tdm_task_request.go delete mode 100644 v2/models/create_tenant_params.go delete mode 100644 v2/models/create_totp_key_request_body.go delete mode 100644 v2/models/create_upgrade_task_request.go delete mode 100644 v2/models/create_user_parameters.go delete mode 100644 v2/models/create_user_session_request_params.go delete mode 100644 v2/models/create_users_parameters.go delete mode 100644 v2/models/create_view.go delete mode 100644 v2/models/create_view_failover_request.go delete mode 100644 v2/models/create_view_request.go delete mode 100644 v2/models/created_user_api_key.go delete mode 100644 v2/models/creation_info.go delete mode 100644 v2/models/credentials.go delete mode 100644 v2/models/csr_key_type.go delete mode 100644 v2/models/csr_service_name.go delete mode 100644 v2/models/current_cluster_operations.go delete mode 100644 v2/models/custom_tag_params.go delete mode 100644 v2/models/d_maa_s_info.go delete mode 100644 v2/models/d_s_e_solr_info.go delete mode 100644 v2/models/data_lock_config.go delete mode 100644 v2/models/data_lock_constraints.go delete mode 100644 v2/models/data_point.go delete mode 100644 v2/models/data_tiering_analysis_group.go delete mode 100644 v2/models/data_tiering_analysis_group_run.go delete mode 100644 v2/models/data_tiering_analysis_group_runs.go delete mode 100644 v2/models/data_tiering_analysis_groups.go delete mode 100644 v2/models/data_tiering_analysis_info.go delete mode 100644 v2/models/data_tiering_analysis_run_request.go delete mode 100644 v2/models/data_tiering_analysis_share_info.go delete mode 100644 v2/models/data_tiering_object_analysis_info.go delete mode 100644 v2/models/data_tiering_object_info.go delete mode 100644 v2/models/data_tiering_schedule.go delete mode 100644 v2/models/data_tiering_share_info.go delete mode 100644 v2/models/data_tiering_share_stats.go delete mode 100644 v2/models/data_tiering_source.go delete mode 100644 v2/models/data_tiering_tag.go delete mode 100644 v2/models/data_tiering_tag_config.go delete mode 100644 v2/models/data_tiering_tag_object.go delete mode 100644 v2/models/data_tiering_target.go delete mode 100644 v2/models/data_tiering_task.go delete mode 100644 v2/models/data_tiering_task_run.go delete mode 100644 v2/models/data_tiering_task_run_request.go delete mode 100644 v2/models/data_tiering_task_stats.go delete mode 100644 v2/models/data_tiering_tasks.go delete mode 100644 v2/models/data_transfer_info.go delete mode 100644 v2/models/data_usage_stats.go delete mode 100644 v2/models/database_entity_info.go delete mode 100644 v2/models/datastore_params.go delete mode 100644 v2/models/day_schedule.go delete mode 100644 v2/models/db_recovery_over_writing_policy.go delete mode 100644 v2/models/deduplication_params.go delete mode 100644 v2/models/delete_active_directory_request.go delete mode 100644 v2/models/delete_groups_request.go delete mode 100644 v2/models/delete_hosts_parameters.go delete mode 100644 v2/models/delete_infected_files.go delete mode 100644 v2/models/delete_infected_files_parameters.go delete mode 100644 v2/models/delete_rigel_connector_request.go delete mode 100644 v2/models/delete_users_request.go delete mode 100644 v2/models/deleted_protected_objects_response_body.go delete mode 100644 v2/models/device_tree_leaf_node.go delete mode 100644 v2/models/device_tree_node.go delete mode 100644 v2/models/device_tree_non_leaf_node.go delete mode 100644 v2/models/disaster_recovery_options.go delete mode 100644 v2/models/disk.go delete mode 100644 v2/models/disk_identify.go delete mode 100644 v2/models/disk_info.go delete mode 100644 v2/models/disk_removal_params.go delete mode 100644 v2/models/disk_status.go delete mode 100644 v2/models/disk_tiers.go delete mode 100644 v2/models/disk_type.go delete mode 100644 v2/models/disks_list.go delete mode 100644 v2/models/dmaas_audit_actions.go delete mode 100644 v2/models/dmaas_audit_entity_types.go delete mode 100644 v2/models/dmaas_tenant_action.go delete mode 100644 v2/models/dns_delegation_zone.go delete mode 100644 v2/models/dns_servers_info.go delete mode 100644 v2/models/document_library_item.go delete mode 100644 v2/models/documents_filter_type.go delete mode 100644 v2/models/domain_controller.go delete mode 100644 v2/models/domain_controller_status.go delete mode 100644 v2/models/domain_controllers.go delete mode 100644 v2/models/domain_controllers_response.go delete mode 100644 v2/models/domain_scope_params.go delete mode 100644 v2/models/down_tiering_file_selection_type.go delete mode 100644 v2/models/download_agent_request_params.go delete mode 100644 v2/models/download_baseos_patch_request.go delete mode 100644 v2/models/download_chats_params.go delete mode 100644 v2/models/download_cluster_cert_response.go delete mode 100644 v2/models/download_file_type.go delete mode 100644 v2/models/download_files_and_folders_request_params.go delete mode 100644 v2/models/download_files_and_folders_response_params.go delete mode 100644 v2/models/downtiered_data_location.go delete mode 100644 v2/models/downtiering_file_age_policy.go delete mode 100644 v2/models/downtiering_policy.go delete mode 100644 v2/models/downtiering_target.go delete mode 100644 v2/models/draas_audit_actions.go delete mode 100644 v2/models/draas_audit_entity_types.go delete mode 100644 v2/models/e_b_s_tag.go delete mode 100644 v2/models/e_s_config_for_indexing.go delete mode 100644 v2/models/ebs_volume_exclusion_params.go delete mode 100644 v2/models/elastifile_object_protection_params.go delete mode 100644 v2/models/elastifile_object_protection_request_params.go delete mode 100644 v2/models/elastifile_object_protection_response_params.go delete mode 100644 v2/models/elastifile_object_protection_update_request_params.go delete mode 100644 v2/models/elastifile_protection_group_object_params.go delete mode 100644 v2/models/elastifile_protection_group_params.go delete mode 100644 v2/models/elastifile_registration_params.go delete mode 100644 v2/models/email.go delete mode 100644 v2/models/email_helios_search_params.go delete mode 100644 v2/models/emails.go delete mode 100644 v2/models/emblem_service_info.go delete mode 100644 v2/models/encryption_config.go delete mode 100644 v2/models/encryption_settings.go delete mode 100644 v2/models/end_point.go delete mode 100644 v2/models/endpoint_check_result.go delete mode 100644 v2/models/endpoint_connection_state.go delete mode 100644 v2/models/endpoint_only_registration_params.go delete mode 100644 v2/models/entity_external_metadata.go delete mode 100644 v2/models/entity_identifier.go delete mode 100644 v2/models/entity_metadata_params.go delete mode 100644 v2/models/env_specific_object_protection_request_params.go delete mode 100644 v2/models/env_specific_object_protection_response_params.go delete mode 100644 v2/models/env_specific_object_protection_update_request_params.go delete mode 100644 v2/models/environment.go delete mode 100644 v2/models/erasure_coding_params.go delete mode 100644 v2/models/error.go delete mode 100644 v2/models/error_class.go delete mode 100644 v2/models/error_type.go delete mode 100644 v2/models/esxi_registration_params.go delete mode 100644 v2/models/exchange_app_params.go delete mode 100644 v2/models/exchange_database_recovery_target_config.go delete mode 100644 v2/models/exchange_indexed_object.go delete mode 100644 v2/models/exchange_indexed_objects.go delete mode 100644 v2/models/exchange_protection_group_object_params.go delete mode 100644 v2/models/exchange_protection_group_params.go delete mode 100644 v2/models/exchange_recover_database_params.go delete mode 100644 v2/models/exchange_recovery_target_config.go delete mode 100644 v2/models/exchange_target_params_for_recover_exchange_app.go delete mode 100644 v2/models/exchange_target_params_for_recover_exchange_dbs.go delete mode 100644 v2/models/execute_runbook_action_request.go delete mode 100644 v2/models/existing_group_param.go delete mode 100644 v2/models/expiration_action.go delete mode 100644 v2/models/extended_retention_policy.go delete mode 100644 v2/models/extended_retention_schedule.go delete mode 100644 v2/models/external_target.go delete mode 100644 v2/models/external_targets.go delete mode 100644 v2/models/externally_triggered_client_type.go delete mode 100644 v2/models/externally_triggered_job_params.go delete mode 100644 v2/models/externally_triggered_sbt_params.go delete mode 100644 v2/models/f_c_i_cluster.go delete mode 100644 v2/models/failed_protection_group_details.go delete mode 100644 v2/models/failed_run_details.go delete mode 100644 v2/models/failover.go delete mode 100644 v2/models/failover_create_run_response.go delete mode 100644 v2/models/failover_object.go delete mode 100644 v2/models/failover_replica_cluster.go delete mode 100644 v2/models/failover_replication.go delete mode 100644 v2/models/failover_run_configuration.go delete mode 100644 v2/models/failover_runs_response.go delete mode 100644 v2/models/failover_source_cluster.go delete mode 100644 v2/models/fallback_user_id_mapping_params.go delete mode 100644 v2/models/feature_flag.go delete mode 100644 v2/models/feature_flag_list.go delete mode 100644 v2/models/fetch_uptier_data_request_params.go delete mode 100644 v2/models/fetch_uptier_data_response.go delete mode 100644 v2/models/file.go delete mode 100644 v2/models/file_access_types.go delete mode 100644 v2/models/file_category_type.go delete mode 100644 v2/models/file_count.go delete mode 100644 v2/models/file_extension_filter.go delete mode 100644 v2/models/file_filtering_policy.go delete mode 100644 v2/models/file_folder_info.go delete mode 100644 v2/models/file_id.go delete mode 100644 v2/models/file_level_data_lock_config.go delete mode 100644 v2/models/file_lock_status.go delete mode 100644 v2/models/file_nlm_locks.go delete mode 100644 v2/models/file_operation.go delete mode 100644 v2/models/file_size_policy.go delete mode 100644 v2/models/file_size_rule_condition.go delete mode 100644 v2/models/file_stats.go delete mode 100644 v2/models/file_type.go delete mode 100644 v2/models/filename_pattern_to_directory.go delete mode 100644 v2/models/filer_audit_log_configs.go delete mode 100644 v2/models/filer_lifecycle_aging_policy.go delete mode 100644 v2/models/filer_lifecycle_management.go delete mode 100644 v2/models/filer_lifecycle_rule.go delete mode 100644 v2/models/filer_lifecycle_rule_filter.go delete mode 100644 v2/models/filer_lifecycle_size_filter.go delete mode 100644 v2/models/files.go delete mode 100644 v2/models/files_and_folders_object.go delete mode 100644 v2/models/files_stats.go delete mode 100644 v2/models/files_stats_for_entity.go delete mode 100644 v2/models/filter.go delete mode 100644 v2/models/filter_documents_params.go delete mode 100644 v2/models/filter_ip_config.go delete mode 100644 v2/models/filter_objects_request.go delete mode 100644 v2/models/filtered_object.go delete mode 100644 v2/models/filtered_objects_response_body.go delete mode 100644 v2/models/firewall_ip_set.go delete mode 100644 v2/models/firewall_ip_sets.go delete mode 100644 v2/models/firewall_profile.go delete mode 100644 v2/models/firewall_profile_names_params.go delete mode 100644 v2/models/firewall_profile_params.go delete mode 100644 v2/models/firewall_profiles.go delete mode 100644 v2/models/fixed_issue.go delete mode 100644 v2/models/flash_blade_registration_info.go delete mode 100644 v2/models/flashblade_object_params.go delete mode 100644 v2/models/flashblade_object_protection_params.go delete mode 100644 v2/models/flashblade_object_protection_request_params.go delete mode 100644 v2/models/flashblade_object_protection_response_params.go delete mode 100644 v2/models/flashblade_object_protection_update_request_params.go delete mode 100644 v2/models/flashblade_params.go delete mode 100644 v2/models/flashblade_protection_group_object_params.go delete mode 100644 v2/models/flashblade_protection_group_params.go delete mode 100644 v2/models/flashblade_protocol.go delete mode 100644 v2/models/flashblade_registration_params.go delete mode 100644 v2/models/fleet_config.go delete mode 100644 v2/models/fleet_network_params.go delete mode 100644 v2/models/fleet_subnet_type.go delete mode 100644 v2/models/fleet_tags.go delete mode 100644 v2/models/folder_item.go delete mode 100644 v2/models/form_field_params.go delete mode 100644 v2/models/form_panel_params.go delete mode 100644 v2/models/free_disk.go delete mode 100644 v2/models/free_node_information.go delete mode 100644 v2/models/free_nodes.go delete mode 100644 v2/models/frequency_schedule.go delete mode 100644 v2/models/full_backup_policy.go delete mode 100644 v2/models/full_schedule.go delete mode 100644 v2/models/full_schedule_and_retention.go delete mode 100644 v2/models/full_schedule_unit.go delete mode 100644 v2/models/g_c_p_archival_storage_class.go delete mode 100644 v2/models/g_c_p_tiering_storage_class.go delete mode 100644 v2/models/gaia_generic_params.go delete mode 100644 v2/models/gaia_generic_result.go delete mode 100644 v2/models/gaia_indexing_stats.go delete mode 100644 v2/models/gaia_snapshot_info.go delete mode 100644 v2/models/gateway_params.go delete mode 100644 v2/models/gcp_disk_exclusion_params.go delete mode 100644 v2/models/gcp_native_protection_group_object_params.go delete mode 100644 v2/models/gcp_native_protection_group_params.go delete mode 100644 v2/models/gcp_protection_group_params.go delete mode 100644 v2/models/gcp_protection_group_type.go delete mode 100644 v2/models/gcp_recover_files_new_target_config.go delete mode 100644 v2/models/gcp_recover_files_original_target_config.go delete mode 100644 v2/models/gcp_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/gcp_target_params_for_recover_vm.go delete mode 100644 v2/models/gcp_vm_recovery_target_config.go delete mode 100644 v2/models/gcp_vpc_subnet_config.go delete mode 100644 v2/models/generate_ca_certificate_request.go delete mode 100644 v2/models/generate_ca_certificate_response.go delete mode 100644 v2/models/generate_csr_response.go delete mode 100644 v2/models/generate_m365_device_access_token_request_params.go delete mode 100644 v2/models/generate_m365_device_access_token_response_params.go delete mode 100644 v2/models/generate_m365_device_code_request_params.go delete mode 100644 v2/models/generate_m365_device_code_response_params.go delete mode 100644 v2/models/generate_new_certificate_request.go delete mode 100644 v2/models/generate_new_certificate_response.go delete mode 100644 v2/models/generate_sign_csr_request.go delete mode 100644 v2/models/generate_sign_csr_response.go delete mode 100644 v2/models/generic_nas_data_tiering_params.go delete mode 100644 v2/models/generic_nas_object_protection_params.go delete mode 100644 v2/models/generic_nas_object_protection_request_params.go delete mode 100644 v2/models/generic_nas_object_protection_response_params.go delete mode 100644 v2/models/generic_nas_object_protection_update_request_params.go delete mode 100644 v2/models/generic_nas_protection_group_extra_params.go delete mode 100644 v2/models/generic_nas_protection_group_params.go delete mode 100644 v2/models/generic_nas_registration_params.go delete mode 100644 v2/models/get_connection_bandwidth_response_body.go delete mode 100644 v2/models/get_csr_list_response_body.go delete mode 100644 v2/models/get_entity_metadata_result.go delete mode 100644 v2/models/get_failover_ops_response.go delete mode 100644 v2/models/get_gaia_indexing_status_params.go delete mode 100644 v2/models/get_gaia_indexing_status_result.go delete mode 100644 v2/models/get_indexed_object_snapshots_response_body.go delete mode 100644 v2/models/get_m365_source_region_endpoint_response_params.go delete mode 100644 v2/models/get_nlm_locks_result.go delete mode 100644 v2/models/get_object_runs_response_body.go delete mode 100644 v2/models/get_object_snapshots_response_body.go delete mode 100644 v2/models/get_p_i_t_ranges_protected_object_response_body.go delete mode 100644 v2/models/get_protected_object_response.go delete mode 100644 v2/models/get_protected_objects_response.go delete mode 100644 v2/models/get_protection_run_progress_body.go delete mode 100644 v2/models/get_protection_run_stats_body.go delete mode 100644 v2/models/get_protection_runs_status_response_body.go delete mode 100644 v2/models/get_tags_result.go delete mode 100644 v2/models/get_tracking_view_id_response.go delete mode 100644 v2/models/get_view_failover_response_body.go delete mode 100644 v2/models/get_view_templates_result.go delete mode 100644 v2/models/get_views_result.go delete mode 100644 v2/models/glacier_flr_restore_type.go delete mode 100644 v2/models/global_bandwidth_settings.go delete mode 100644 v2/models/global_cluster_identifier.go delete mode 100644 v2/models/global_id.go delete mode 100644 v2/models/google_tier.go delete mode 100644 v2/models/google_tiering_levels.go delete mode 100644 v2/models/google_tiers.go delete mode 100644 v2/models/gpfs_object_protection_params.go delete mode 100644 v2/models/gpfs_object_protection_request_params.go delete mode 100644 v2/models/gpfs_object_protection_response_params.go delete mode 100644 v2/models/gpfs_object_protection_update_request_params.go delete mode 100644 v2/models/gpfs_protection_group_object_params.go delete mode 100644 v2/models/gpfs_protection_group_params.go delete mode 100644 v2/models/gpfs_registration_params.go delete mode 100644 v2/models/group.go delete mode 100644 v2/models/group_object_entity_params.go delete mode 100644 v2/models/group_params.go delete mode 100644 v2/models/groups.go delete mode 100644 v2/models/h_base_additional_params.go delete mode 100644 v2/models/h_d_f_s_indexed_object.go delete mode 100644 v2/models/h_d_f_s_indexed_objects.go delete mode 100644 v2/models/h_d_f_s_on_prem_search_params.go delete mode 100644 v2/models/hadoop_auth_type.go delete mode 100644 v2/models/hadoop_connection_params.go delete mode 100644 v2/models/hbase_indexed_object.go delete mode 100644 v2/models/hbase_indexed_objects.go delete mode 100644 v2/models/hbase_on_prem_search_params.go delete mode 100644 v2/models/hbase_params.go delete mode 100644 v2/models/hbase_search_params.go delete mode 100644 v2/models/hbase_source_registration_params.go delete mode 100644 v2/models/hbase_source_registration_update_params.go delete mode 100644 v2/models/hdfs_additional_params.go delete mode 100644 v2/models/hdfs_browse_request_params.go delete mode 100644 v2/models/hdfs_file_folder_params.go delete mode 100644 v2/models/hdfs_params.go delete mode 100644 v2/models/hdfs_protection_group_params.go delete mode 100644 v2/models/hdfs_search_params.go delete mode 100644 v2/models/hdfs_source_registration_params.go delete mode 100644 v2/models/hdfs_source_registration_update_params.go delete mode 100644 v2/models/helios_a_w_s_target_config.go delete mode 100644 v2/models/helios_a_w_s_tier.go delete mode 100644 v2/models/helios_a_w_s_tiers.go delete mode 100644 v2/models/helios_archival_config.go delete mode 100644 v2/models/helios_auto_tier_type.go delete mode 100644 v2/models/helios_aws_cloud_spin_params.go delete mode 100644 v2/models/helios_azure_cloud_spin_params.go delete mode 100644 v2/models/helios_azure_target_config.go delete mode 100644 v2/models/helios_azure_tier.go delete mode 100644 v2/models/helios_azure_tiers.go delete mode 100644 v2/models/helios_backup_policy.go delete mode 100644 v2/models/helios_blackout_window.go delete mode 100644 v2/models/helios_bmr_backup_policy.go delete mode 100644 v2/models/helios_bmr_schedule.go delete mode 100644 v2/models/helios_cassandra_objects.go delete mode 100644 v2/models/helios_cdp_backup_policy.go delete mode 100644 v2/models/helios_cdp_retention.go delete mode 100644 v2/models/helios_claim_request.go delete mode 100644 v2/models/helios_cloud_spin_config.go delete mode 100644 v2/models/helios_cloud_spin_target.go delete mode 100644 v2/models/helios_cluster_tenant.go delete mode 100644 v2/models/helios_common_cloud_tier_settings.go delete mode 100644 v2/models/helios_common_search_indexed_objects_request_params.go delete mode 100644 v2/models/helios_common_search_indexed_objects_response_params.go delete mode 100644 v2/models/helios_common_target_configuration.go delete mode 100644 v2/models/helios_couchbase_objects.go delete mode 100644 v2/models/helios_day_schedule.go delete mode 100644 v2/models/helios_emails.go delete mode 100644 v2/models/helios_exchange_objects.go delete mode 100644 v2/models/helios_extended_retention_policy.go delete mode 100644 v2/models/helios_extended_retention_schedule.go delete mode 100644 v2/models/helios_files.go delete mode 100644 v2/models/helios_frequency_schedule.go delete mode 100644 v2/models/helios_full_backup_policy.go delete mode 100644 v2/models/helios_full_schedule.go delete mode 100644 v2/models/helios_google_tier.go delete mode 100644 v2/models/helios_google_tiers.go delete mode 100644 v2/models/helios_hbase_objects.go delete mode 100644 v2/models/helios_hdfs_objects.go delete mode 100644 v2/models/helios_hive_objects.go delete mode 100644 v2/models/helios_hour_schedule.go delete mode 100644 v2/models/helios_incremental_backup_policy.go delete mode 100644 v2/models/helios_incremental_schedule.go delete mode 100644 v2/models/helios_log_backup_policy.go delete mode 100644 v2/models/helios_log_schedule.go delete mode 100644 v2/models/helios_minute_schedule.go delete mode 100644 v2/models/helios_mongo_objects.go delete mode 100644 v2/models/helios_month_schedule.go delete mode 100644 v2/models/helios_object_u_ui_ds.go delete mode 100644 v2/models/helios_on_prem_config.go delete mode 100644 v2/models/helios_on_prem_ssh_config.go delete mode 100644 v2/models/helios_on_prem_vm_node.go delete mode 100644 v2/models/helios_onprem_deploy_config.go delete mode 100644 v2/models/helios_oracle_tier.go delete mode 100644 v2/models/helios_oracle_tiers.go delete mode 100644 v2/models/helios_policies_response_with_pagination.go delete mode 100644 v2/models/helios_policy_request.go delete mode 100644 v2/models/helios_policy_response.go delete mode 100644 v2/models/helios_primary_backup_target.go delete mode 100644 v2/models/helios_protection_policy.go delete mode 100644 v2/models/helios_protection_policy_identifier.go delete mode 100644 v2/models/helios_public_folder_items.go delete mode 100644 v2/models/helios_reg_config.go delete mode 100644 v2/models/helios_reg_status.go delete mode 100644 v2/models/helios_regular_backup_policy.go delete mode 100644 v2/models/helios_remote_target_config.go delete mode 100644 v2/models/helios_replication_config.go delete mode 100644 v2/models/helios_retention.go delete mode 100644 v2/models/helios_retry_options.go delete mode 100644 v2/models/helios_rpaas_config.go delete mode 100644 v2/models/helios_search_indexed_objects_cluster_error.go delete mode 100644 v2/models/helios_search_indexed_objects_request.go delete mode 100644 v2/models/helios_search_indexed_objects_response_body.go delete mode 100644 v2/models/helios_source_u_ui_ds.go delete mode 100644 v2/models/helios_storage_domain_u_ui_ds.go delete mode 100644 v2/models/helios_target_schedule.go delete mode 100644 v2/models/helios_targets_configuration.go delete mode 100644 v2/models/helios_tenant.go delete mode 100644 v2/models/helios_tier.go delete mode 100644 v2/models/helios_tier_level_settings.go delete mode 100644 v2/models/helios_week_schedule.go delete mode 100644 v2/models/hive_additional_params.go delete mode 100644 v2/models/hive_indexed_object.go delete mode 100644 v2/models/hive_indexed_objects.go delete mode 100644 v2/models/hive_on_prem_search_params.go delete mode 100644 v2/models/hive_params.go delete mode 100644 v2/models/hive_search_params.go delete mode 100644 v2/models/hive_source_registration_params.go delete mode 100644 v2/models/hive_source_registration_update_params.go delete mode 100644 v2/models/host_based_backup_script_params.go delete mode 100644 v2/models/host_entry.go delete mode 100644 v2/models/host_information.go delete mode 100644 v2/models/host_mappings.go delete mode 100644 v2/models/host_mappings_parameters.go delete mode 100644 v2/models/host_setting_check.go delete mode 100644 v2/models/hour_schedule.go delete mode 100644 v2/models/hyper_v_disk_info.go delete mode 100644 v2/models/hyper_v_mount_volumes_new_target_config.go delete mode 100644 v2/models/hyper_v_mount_volumes_original_target_config.go delete mode 100644 v2/models/hyper_v_object_protection_request.go delete mode 100644 v2/models/hyper_v_object_protection_request_params.go delete mode 100644 v2/models/hyper_v_object_protection_response.go delete mode 100644 v2/models/hyper_v_object_protection_response_params.go delete mode 100644 v2/models/hyper_v_object_protection_update_request_params.go delete mode 100644 v2/models/hyper_v_protection_group_object_params.go delete mode 100644 v2/models/hyper_v_protection_group_params.go delete mode 100644 v2/models/hyper_v_protection_group_type.go delete mode 100644 v2/models/hyper_v_recover_files_new_target_config.go delete mode 100644 v2/models/hyper_v_recover_files_original_target_config.go delete mode 100644 v2/models/hyper_v_source_registration_params.go delete mode 100644 v2/models/hyper_v_target_params_for_mount_volume.go delete mode 100644 v2/models/hyper_v_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/hyper_v_target_params_for_recover_vm.go delete mode 100644 v2/models/hyper_v_vm_recovery_target_config.go delete mode 100644 v2/models/hyperv_snapshot_params.go delete mode 100644 v2/models/i_c_a_p_uri_status.go delete mode 100644 v2/models/iam_role_aws_credentials.go delete mode 100644 v2/models/iam_user_aws_credentials.go delete mode 100644 v2/models/ibm_flash_system_protection_group_object_params.go delete mode 100644 v2/models/ibm_flash_system_protection_group_params.go delete mode 100644 v2/models/icap_uri_connection_status.go delete mode 100644 v2/models/icap_uri_connection_status_list.go delete mode 100644 v2/models/id_mapping_params.go delete mode 100644 v2/models/identity_action.go delete mode 100644 v2/models/identity_config.go delete mode 100644 v2/models/identity_configs.go delete mode 100644 v2/models/identity_provider_configuration.go delete mode 100644 v2/models/identity_provider_configurations.go delete mode 100644 v2/models/import_cert_request.go delete mode 100644 v2/models/import_cert_response.go delete mode 100644 v2/models/import_certificate_by_clientcsr_request.go delete mode 100644 v2/models/import_certificate_by_clientcsr_response_body.go delete mode 100644 v2/models/import_certificate_request.go delete mode 100644 v2/models/incremental_backup_policy.go delete mode 100644 v2/models/incremental_schedule.go delete mode 100644 v2/models/indexed_cassandra_type.go delete mode 100644 v2/models/indexed_couchbase_type.go delete mode 100644 v2/models/indexed_group_item_type.go delete mode 100644 v2/models/indexed_h_d_f_s_type.go delete mode 100644 v2/models/indexed_hbase_type.go delete mode 100644 v2/models/indexed_hive_type.go delete mode 100644 v2/models/indexed_mongo_type.go delete mode 100644 v2/models/indexed_object_snapshot.go delete mode 100644 v2/models/indexed_object_type.go delete mode 100644 v2/models/indexed_team_item_type.go delete mode 100644 v2/models/indexing_cloud_config.go delete mode 100644 v2/models/indexing_policy.go delete mode 100644 v2/models/infected_file.go delete mode 100644 v2/models/infected_file_state.go delete mode 100644 v2/models/infected_files.go delete mode 100644 v2/models/init_cohesity_ca_request.go delete mode 100644 v2/models/init_cohesity_ca_response.go delete mode 100644 v2/models/init_failover_request.go delete mode 100644 v2/models/init_failover_response.go delete mode 100644 v2/models/interface.go delete mode 100644 v2/models/interface_group.go delete mode 100644 v2/models/interface_group_network_params.go delete mode 100644 v2/models/interface_group_params.go delete mode 100644 v2/models/interface_groups.go delete mode 100644 v2/models/interface_network_params.go delete mode 100644 v2/models/interface_params.go delete mode 100644 v2/models/interface_role_type.go delete mode 100644 v2/models/interface_stats.go delete mode 100644 v2/models/intervention_type.go delete mode 100644 v2/models/ip_config_params.go delete mode 100644 v2/models/ip_pool.go delete mode 100644 v2/models/ip_preference.go delete mode 100644 v2/models/ip_range.go delete mode 100644 v2/models/ipmi_lan_config.go delete mode 100644 v2/models/ipmi_lan_params.go delete mode 100644 v2/models/ipmi_users.go delete mode 100644 v2/models/isilon_data_tiering_params.go delete mode 100644 v2/models/isilon_object_params.go delete mode 100644 v2/models/isilon_object_protection_params.go delete mode 100644 v2/models/isilon_object_protection_request_params.go delete mode 100644 v2/models/isilon_object_protection_response_params.go delete mode 100644 v2/models/isilon_object_protection_update_request_params.go delete mode 100644 v2/models/isilon_protection_group_object_params.go delete mode 100644 v2/models/isilon_protection_group_params.go delete mode 100644 v2/models/isilon_protocol.go delete mode 100644 v2/models/isilon_registration_params.go delete mode 100644 v2/models/item_task_status_type.go delete mode 100644 v2/models/job_handle.go delete mode 100644 v2/models/k_m_s_state.go delete mode 100644 v2/models/k_m_s_type.go delete mode 100644 v2/models/k_m_s_usage_type.go delete mode 100644 v2/models/kerberos_provider.go delete mode 100644 v2/models/kerberos_providers.go delete mode 100644 v2/models/key_value_pair.go delete mode 100644 v2/models/keystone.go delete mode 100644 v2/models/keystone_admin_params.go delete mode 100644 v2/models/keystone_credentials.go delete mode 100644 v2/models/keystone_scope_params.go delete mode 100644 v2/models/keystone_scope_type.go delete mode 100644 v2/models/keystones.go delete mode 100644 v2/models/kmip_kms_configuration.go delete mode 100644 v2/models/kmip_kms_configuration_response.go delete mode 100644 v2/models/kms_configuration.go delete mode 100644 v2/models/kms_configuration_add_update_params.go delete mode 100644 v2/models/kms_configuration_create_params.go delete mode 100644 v2/models/kms_configuration_response_params.go delete mode 100644 v2/models/kms_configuration_update_params.go delete mode 100644 v2/models/kms_configurations.go delete mode 100644 v2/models/kubernetes_filter_params.go delete mode 100644 v2/models/kubernetes_label.go delete mode 100644 v2/models/kubernetes_namespace_recovery_new_source_config.go delete mode 100644 v2/models/kubernetes_namespace_recovery_target_config.go delete mode 100644 v2/models/kubernetes_protection_group_object_params.go delete mode 100644 v2/models/kubernetes_protection_group_params.go delete mode 100644 v2/models/kubernetes_pvc_info.go delete mode 100644 v2/models/kubernetes_target_params_for_recover_kubernetes_namespace.go delete mode 100644 v2/models/kvm_protection_group_object_params.go delete mode 100644 v2/models/kvm_protection_group_params.go delete mode 100644 v2/models/kvm_target_params_for_recover_vm.go delete mode 100644 v2/models/kvm_vm_recovery_target_config.go delete mode 100644 v2/models/language.go delete mode 100644 v2/models/ldap.go delete mode 100644 v2/models/ldap_connection_status.go delete mode 100644 v2/models/ldap_status.go delete mode 100644 v2/models/ldaps.go delete mode 100644 v2/models/lifecycle_rule.go delete mode 100644 v2/models/lifecycle_rule_filter.go delete mode 100644 v2/models/lifecycle_rule_filter_and.go delete mode 100644 v2/models/lifecycle_rule_filter_tag.go delete mode 100644 v2/models/linux_agent_params.go delete mode 100644 v2/models/list_trusted_cas_result.go delete mode 100644 v2/models/local_disk_status.go delete mode 100644 v2/models/local_global_object_id_list.go delete mode 100644 v2/models/local_global_object_ids.go delete mode 100644 v2/models/local_group_params.go delete mode 100644 v2/models/local_user_params.go delete mode 100644 v2/models/local_user_response_params.go delete mode 100644 v2/models/local_user_update_params.go delete mode 100644 v2/models/locale.go delete mode 100644 v2/models/lock_file_params.go delete mode 100644 v2/models/lock_range.go delete mode 100644 v2/models/log_backup_policy.go delete mode 100644 v2/models/log_retention.go delete mode 100644 v2/models/log_schedule.go delete mode 100644 v2/models/logical_volume_info.go delete mode 100644 v2/models/m_oref.go delete mode 100644 v2/models/m_s_sql_file_protection_group_host_params.go delete mode 100644 v2/models/m_s_sql_file_protection_group_object_params.go delete mode 100644 v2/models/m_s_sql_file_protection_group_params.go delete mode 100644 v2/models/m_s_sql_native_protection_group_object_params.go delete mode 100644 v2/models/m_s_sql_native_protection_group_params.go delete mode 100644 v2/models/m_s_sql_protection_group_params.go delete mode 100644 v2/models/m_s_sql_volume_protection_group_host_params.go delete mode 100644 v2/models/m_s_sql_volume_protection_group_object_params.go delete mode 100644 v2/models/m_s_sql_volume_protection_group_params.go delete mode 100644 v2/models/machine_account.go delete mode 100644 v2/models/machine_account_encryption_type.go delete mode 100644 v2/models/mailbox_item_type.go delete mode 100644 v2/models/mailbox_param.go delete mode 100644 v2/models/maintenance_mode_config.go delete mode 100644 v2/models/maintenance_mode_workflow_type.go delete mode 100644 v2/models/mark_baseos_upgrade_info.go delete mode 100644 v2/models/mcm_audit_entity_types.go delete mode 100644 v2/models/mcm_claim_entity_type.go delete mode 100644 v2/models/mcm_cluster_claim_request_params.go delete mode 100644 v2/models/mcm_cluster_claim_response_params.go delete mode 100644 v2/models/mcm_cluster_identifier.go delete mode 100644 v2/models/mcm_cohesion_claim_request_params.go delete mode 100644 v2/models/mcm_cohesion_claim_response_params.go delete mode 100644 v2/models/mcm_i_b_m_storage_protect_claim_request_params.go delete mode 100644 v2/models/mcm_i_b_m_storage_protect_claim_response_params.go delete mode 100644 v2/models/mcm_object_activity_attribute_type.go delete mode 100644 v2/models/mcm_object_activity_type.go delete mode 100644 v2/models/mcm_rigel_claim_request_params.go delete mode 100644 v2/models/mcm_rigel_claim_response_params.go delete mode 100644 v2/models/mcm_service_type.go delete mode 100644 v2/models/mcm_signup_request_status.go delete mode 100644 v2/models/mcm_tenant_type.go delete mode 100644 v2/models/mfa_authentication_types.go delete mode 100644 v2/models/mfa_config_info.go delete mode 100644 v2/models/migrate_clone_params.go delete mode 100644 v2/models/minute_schedule.go delete mode 100644 v2/models/missing_entity_params.go delete mode 100644 v2/models/modify_ciphers_request_body.go delete mode 100644 v2/models/modify_object_store_ciphers_request_body.go delete mode 100644 v2/models/mongo_d_b_auth_type.go delete mode 100644 v2/models/mongo_d_b_cdp_job_info.go delete mode 100644 v2/models/mongo_d_b_protection_group_params.go delete mode 100644 v2/models/mongo_d_b_source_registration_params.go delete mode 100644 v2/models/mongo_db_on_prem_search_params.go delete mode 100644 v2/models/mongo_indexed_object.go delete mode 100644 v2/models/mongo_indexed_objects.go delete mode 100644 v2/models/mongodb_params.go delete mode 100644 v2/models/mongodb_search_params.go delete mode 100644 v2/models/month_schedule.go delete mode 100644 v2/models/mount_hyper_v_volume_params.go delete mode 100644 v2/models/mount_physical_volume_params.go delete mode 100644 v2/models/mount_vmware_volume_params.go delete mode 100644 v2/models/mounted_volume_mapping.go delete mode 100644 v2/models/ms_group_item.go delete mode 100644 v2/models/ms_group_items.go delete mode 100644 v2/models/ms_group_param.go delete mode 100644 v2/models/ms_sql_common_connection_params.go delete mode 100644 v2/models/ms_team_param.go delete mode 100644 v2/models/mssql_connection_params.go delete mode 100644 v2/models/mssql_connection_response_params.go delete mode 100644 v2/models/mssql_file_object_protection.go delete mode 100644 v2/models/mssql_file_object_protection_params.go delete mode 100644 v2/models/mssql_native_object_protection.go delete mode 100644 v2/models/mssql_native_object_protection_params.go delete mode 100644 v2/models/mssql_object_entity_params.go delete mode 100644 v2/models/mssql_object_protection_params.go delete mode 100644 v2/models/mssql_object_protection_request_params.go delete mode 100644 v2/models/mssql_object_protection_response_params.go delete mode 100644 v2/models/mssql_object_protection_update_request_params.go delete mode 100644 v2/models/mssql_protection_group_type.go delete mode 100644 v2/models/multi_stage_restore_options.go delete mode 100644 v2/models/my_sql_agent_params.go delete mode 100644 v2/models/nas_full_throttling_config.go delete mode 100644 v2/models/nas_incremental_throttling_config.go delete mode 100644 v2/models/nas_protocol.go delete mode 100644 v2/models/nas_qos_policy.go delete mode 100644 v2/models/nas_throttling_config.go delete mode 100644 v2/models/netapp_data_tiering_params.go delete mode 100644 v2/models/netapp_object_params.go delete mode 100644 v2/models/netapp_object_protection_params.go delete mode 100644 v2/models/netapp_object_protection_request_params.go delete mode 100644 v2/models/netapp_object_protection_response_params.go delete mode 100644 v2/models/netapp_object_protection_update_request_params.go delete mode 100644 v2/models/netapp_protection_group_object_params.go delete mode 100644 v2/models/netapp_protection_group_params.go delete mode 100644 v2/models/netapp_protocol.go delete mode 100644 v2/models/netapp_recover_file_and_folder_info.go delete mode 100644 v2/models/netapp_registration_params.go delete mode 100644 v2/models/netapp_source_type.go delete mode 100644 v2/models/netapp_volume_extended_style.go delete mode 100644 v2/models/network_connection_info.go delete mode 100644 v2/models/network_interface.go delete mode 100644 v2/models/network_interface_params.go delete mode 100644 v2/models/network_interface_type.go delete mode 100644 v2/models/new_group_param.go delete mode 100644 v2/models/new_view_files_target_params.go delete mode 100644 v2/models/nfs_config.go delete mode 100644 v2/models/nfs_protocol.go delete mode 100644 v2/models/nfs_root_permissions.go delete mode 100644 v2/models/nfs_squash.go delete mode 100644 v2/models/nic_speed_type.go delete mode 100644 v2/models/nimble_protection_group_object_params.go delete mode 100644 v2/models/nimble_protection_group_params.go delete mode 100644 v2/models/nis_netgroup.go delete mode 100644 v2/models/nis_netgroups.go delete mode 100644 v2/models/nis_provider.go delete mode 100644 v2/models/nis_providers.go delete mode 100644 v2/models/nlm_lock.go delete mode 100644 v2/models/no_content.go delete mode 100644 v2/models/no_sql_object_property.go delete mode 100644 v2/models/no_sql_protection_group_object_params.go delete mode 100644 v2/models/no_sql_protection_group_params.go delete mode 100644 v2/models/node.go delete mode 100644 v2/models/node_bond_interface_params.go delete mode 100644 v2/models/node_endpoint_state.go delete mode 100644 v2/models/node_free_disks.go delete mode 100644 v2/models/node_group.go delete mode 100644 v2/models/node_group_request.go delete mode 100644 v2/models/node_group_response.go delete mode 100644 v2/models/node_hardware_info.go delete mode 100644 v2/models/node_identify_params.go delete mode 100644 v2/models/node_info.go delete mode 100644 v2/models/node_interface_params.go delete mode 100644 v2/models/node_interfaces.go delete mode 100644 v2/models/node_ipmi_lan_params.go delete mode 100644 v2/models/node_ipmi_user.go delete mode 100644 v2/models/node_network_interfaces.go delete mode 100644 v2/models/node_power_operation.go delete mode 100644 v2/models/node_removal_params.go delete mode 100644 v2/models/node_reset_state.go delete mode 100644 v2/models/node_stats.go delete mode 100644 v2/models/node_system_disk_info.go delete mode 100644 v2/models/node_unit_progress.go delete mode 100644 v2/models/non_current_version_expiration_action.go delete mode 100644 v2/models/num_week_in_month.go delete mode 100644 v2/models/number_form_field_params.go delete mode 100644 v2/models/o365_helios_search_emails_request_params.go delete mode 100644 v2/models/o365_protection_group_type.go delete mode 100644 v2/models/o365_search_emails_request_params.go delete mode 100644 v2/models/o365_search_request_params.go delete mode 100644 v2/models/o365_teams_channels_search_request_params.go delete mode 100644 v2/models/o_auth2_action.go delete mode 100644 v2/models/o_auth2_provider.go delete mode 100644 v2/models/o_auth_audience.go delete mode 100644 v2/models/object.go delete mode 100644 v2/models/object_action_request.go delete mode 100644 v2/models/object_archival_snapshot_info.go delete mode 100644 v2/models/object_backup_snapshot_status.go delete mode 100644 v2/models/object_browse_request.go delete mode 100644 v2/models/object_environment.go delete mode 100644 v2/models/object_identifier.go delete mode 100644 v2/models/object_identifiers_params.go delete mode 100644 v2/models/object_info.go delete mode 100644 v2/models/object_last_run.go delete mode 100644 v2/models/object_linking_params.go delete mode 100644 v2/models/object_linking_request.go delete mode 100644 v2/models/object_local_snapshot_info.go delete mode 100644 v2/models/object_mailbox_param.go delete mode 100644 v2/models/object_ms_team_param.go delete mode 100644 v2/models/object_mutation_type.go delete mode 100644 v2/models/object_name.go delete mode 100644 v2/models/object_one_drive_param.go delete mode 100644 v2/models/object_policy.go delete mode 100644 v2/models/object_progress_info.go delete mode 100644 v2/models/object_protection_group_summary.go delete mode 100644 v2/models/object_protection_info.go delete mode 100644 v2/models/object_protection_run_info.go delete mode 100644 v2/models/object_protection_run_summary.go delete mode 100644 v2/models/object_protection_stats_summary.go delete mode 100644 v2/models/object_protection_summary.go delete mode 100644 v2/models/object_run_result.go delete mode 100644 v2/models/object_services_key_mapping.go delete mode 100644 v2/models/object_site_param.go delete mode 100644 v2/models/object_snapshot.go delete mode 100644 v2/models/object_snapshot_id_params.go delete mode 100644 v2/models/object_snapshot_id_result.go delete mode 100644 v2/models/object_snapshot_volume_info.go delete mode 100644 v2/models/object_snapshots_info.go delete mode 100644 v2/models/object_stats.go delete mode 100644 v2/models/object_stats_info.go delete mode 100644 v2/models/object_store_ciphers_resp.go delete mode 100644 v2/models/object_summary.go delete mode 100644 v2/models/object_type.go delete mode 100644 v2/models/object_type_v_center_params.go delete mode 100644 v2/models/object_type_windows_cluster_params.go delete mode 100644 v2/models/object_un_linking_params.go delete mode 100644 v2/models/object_unique_identifier.go delete mode 100644 v2/models/object_with_children.go delete mode 100644 v2/models/objects.go delete mode 100644 v2/models/objects_action_request.go delete mode 100644 v2/models/objects_bulk_action.go delete mode 100644 v2/models/objects_discovery_params.go delete mode 100644 v2/models/objects_last_run.go delete mode 100644 v2/models/objects_link_type.go delete mode 100644 v2/models/objects_search_response_body.go delete mode 100644 v2/models/odp_remote_cluster.go delete mode 100644 v2/models/odp_remote_clusters.go delete mode 100644 v2/models/office365_app_credentials.go delete mode 100644 v2/models/office365_groups_object_protection_params.go delete mode 100644 v2/models/office365_object_protection_common_params.go delete mode 100644 v2/models/office365_object_protection_object_params.go delete mode 100644 v2/models/office365_object_protection_params.go delete mode 100644 v2/models/office365_object_protection_request_params.go delete mode 100644 v2/models/office365_object_protection_response_params.go delete mode 100644 v2/models/office365_object_protection_update_request_params.go delete mode 100644 v2/models/office365_one_drive_protection_group_params.go delete mode 100644 v2/models/office365_outlook_protection_group_params.go delete mode 100644 v2/models/office365_preservation_hold_library_params.go delete mode 100644 v2/models/office365_protection_group_object_params.go delete mode 100644 v2/models/office365_protection_group_params.go delete mode 100644 v2/models/office365_public_folders_protection_group_params.go delete mode 100644 v2/models/office365_region_type.go delete mode 100644 v2/models/office365_share_point_protection_group_params.go delete mode 100644 v2/models/office365_sharepoint_site_object_protection_params.go delete mode 100644 v2/models/office365_source_registration_params.go delete mode 100644 v2/models/office365_teams_object_protection_params.go delete mode 100644 v2/models/office365_user_mailbox_object_protection_params.go delete mode 100644 v2/models/office365_user_one_drive_object_protection_params.go delete mode 100644 v2/models/on_prem_deploy_run.go delete mode 100644 v2/models/on_prem_deploy_target_result.go delete mode 100644 v2/models/on_prem_deploy_target_result_vmware_params.go delete mode 100644 v2/models/on_prem_object_ids.go delete mode 100644 v2/models/on_prem_source_ids.go delete mode 100644 v2/models/on_prem_tenant_config.go delete mode 100644 v2/models/one_drive_item.go delete mode 100644 v2/models/one_drive_items.go delete mode 100644 v2/models/one_drive_param.go delete mode 100644 v2/models/onprem_deploy_config.go delete mode 100644 v2/models/onprem_deploy_params.go delete mode 100644 v2/models/onprem_deploy_target_environment_type.go delete mode 100644 v2/models/open_id_connect_action.go delete mode 100644 v2/models/open_id_provider.go delete mode 100644 v2/models/operation_events.go delete mode 100644 v2/models/oracle_archival_storage_class.go delete mode 100644 v2/models/oracle_archive_log_info.go delete mode 100644 v2/models/oracle_archive_log_range_type.go delete mode 100644 v2/models/oracle_clone_object.go delete mode 100644 v2/models/oracle_clone_refresh_task.go delete mode 100644 v2/models/oracle_clone_task.go delete mode 100644 v2/models/oracle_connection_params.go delete mode 100644 v2/models/oracle_data_guard_info.go delete mode 100644 v2/models/oracle_database_host.go delete mode 100644 v2/models/oracle_db_channel.go delete mode 100644 v2/models/oracle_object_based_protection_params.go delete mode 100644 v2/models/oracle_object_entity_params.go delete mode 100644 v2/models/oracle_object_protection_info.go delete mode 100644 v2/models/oracle_object_protection_request_params.go delete mode 100644 v2/models/oracle_object_protection_response_params.go delete mode 100644 v2/models/oracle_object_protection_update_request_params.go delete mode 100644 v2/models/oracle_pdb_object_info.go delete mode 100644 v2/models/oracle_pdb_restore_params.go delete mode 100644 v2/models/oracle_protection_group_db_params.go delete mode 100644 v2/models/oracle_protection_group_object_params.go delete mode 100644 v2/models/oracle_protection_group_params.go delete mode 100644 v2/models/oracle_range_meta_info.go delete mode 100644 v2/models/oracle_recovery_granularity_type.go delete mode 100644 v2/models/oracle_recovery_validation_info.go delete mode 100644 v2/models/oracle_restore_meta_info_result.go delete mode 100644 v2/models/oracle_restore_range_info.go delete mode 100644 v2/models/oracle_rman_backup.go delete mode 100644 v2/models/oracle_sbt_host_params.go delete mode 100644 v2/models/oracle_target_params_for_recover_oracle_app.go delete mode 100644 v2/models/oracle_tier.go delete mode 100644 v2/models/oracle_tiering_levels.go delete mode 100644 v2/models/oracle_tiering_storage_class.go delete mode 100644 v2/models/oracle_tiers.go delete mode 100644 v2/models/oracle_vlan_info.go delete mode 100644 v2/models/org_v_d_c_network.go delete mode 100644 v2/models/original_elastifile_files_target_params.go delete mode 100644 v2/models/original_elastifile_target_params.go delete mode 100644 v2/models/original_flashblade_files_target_params.go delete mode 100644 v2/models/original_flashblade_target_params.go delete mode 100644 v2/models/original_generic_nas_files_target_params.go delete mode 100644 v2/models/original_generic_nas_target_params.go delete mode 100644 v2/models/original_gpfs_files_target_params.go delete mode 100644 v2/models/original_gpfs_target_params.go delete mode 100644 v2/models/original_isilon_files_target_params.go delete mode 100644 v2/models/original_isilon_target_params.go delete mode 100644 v2/models/original_netapp_files_target_params.go delete mode 100644 v2/models/original_netapp_target_params.go delete mode 100644 v2/models/original_view_files_target_params.go delete mode 100644 v2/models/overwrite_view_params.go delete mode 100644 v2/models/ownership_context.go delete mode 100644 v2/models/pagination_info.go delete mode 100644 v2/models/password_form_field_params.go delete mode 100644 v2/models/patch_detail.go delete mode 100644 v2/models/patch_operation.go delete mode 100644 v2/models/patch_operation_status.go delete mode 100644 v2/models/patches_details.go delete mode 100644 v2/models/patches_history.go delete mode 100644 v2/models/pause_action_object_level_params.go delete mode 100644 v2/models/pause_action_object_level_response.go delete mode 100644 v2/models/pause_protection_run_action_params.go delete mode 100644 v2/models/pause_protection_run_action_response_params.go delete mode 100644 v2/models/pause_status_run_level.go delete mode 100644 v2/models/perform_action_on_clones_request.go delete mode 100644 v2/models/perform_action_on_protection_group_run_request.go delete mode 100644 v2/models/perform_run_action_response.go delete mode 100644 v2/models/permission_info.go delete mode 100644 v2/models/physical_cluster_expand_params.go delete mode 100644 v2/models/physical_file_backup_path_params.go delete mode 100644 v2/models/physical_file_protection_group_object_params.go delete mode 100644 v2/models/physical_file_protection_group_params.go delete mode 100644 v2/models/physical_mount_volumes_new_target_config.go delete mode 100644 v2/models/physical_mount_volumes_original_target_config.go delete mode 100644 v2/models/physical_node_config_params.go delete mode 100644 v2/models/physical_object_entity_params.go delete mode 100644 v2/models/physical_object_protection_params.go delete mode 100644 v2/models/physical_object_protection_request_params.go delete mode 100644 v2/models/physical_object_protection_response_params.go delete mode 100644 v2/models/physical_object_protection_update_request_params.go delete mode 100644 v2/models/physical_protection_group_params.go delete mode 100644 v2/models/physical_snapshot_params.go delete mode 100644 v2/models/physical_source_registration_params.go delete mode 100644 v2/models/physical_target_params_for_mount_volume.go delete mode 100644 v2/models/physical_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/physical_target_params_for_recover_volume.go delete mode 100644 v2/models/physical_volume_protection_group_object_params.go delete mode 100644 v2/models/physical_volume_protection_group_params.go delete mode 100644 v2/models/planned_failover_params.go delete mode 100644 v2/models/planned_run_poll_status.go delete mode 100644 v2/models/pluggable_database_info.go delete mode 100644 v2/models/policy_config.go delete mode 100644 v2/models/policy_scheduled_backup.go delete mode 100644 v2/models/policy_template_response.go delete mode 100644 v2/models/policy_templates_response_with_pagination.go delete mode 100644 v2/models/power_off_vm_params.go delete mode 100644 v2/models/pre_check_validation.go delete mode 100644 v2/models/pre_post_script_params.go delete mode 100644 v2/models/prepare_planned_failver_params.go delete mode 100644 v2/models/primary_archival_target.go delete mode 100644 v2/models/primary_backup_target.go delete mode 100644 v2/models/primary_backup_target_location.go delete mode 100644 v2/models/principal_object_type.go delete mode 100644 v2/models/private_key_credentials.go delete mode 100644 v2/models/private_network_info.go delete mode 100644 v2/models/privilege.go delete mode 100644 v2/models/privileges.go delete mode 100644 v2/models/progree_task_status.go delete mode 100644 v2/models/progress_stats.go delete mode 100644 v2/models/progress_summary.go delete mode 100644 v2/models/progress_task.go delete mode 100644 v2/models/progress_task_event.go delete mode 100644 v2/models/progress_task_info.go delete mode 100644 v2/models/progress_tasks.go delete mode 100644 v2/models/project_scope_params.go delete mode 100644 v2/models/protectd_objects_action_request.go delete mode 100644 v2/models/protected_object.go delete mode 100644 v2/models/protected_object_action_response.go delete mode 100644 v2/models/protected_object_backup_config.go delete mode 100644 v2/models/protected_object_group_backup_config.go delete mode 100644 v2/models/protected_object_info.go delete mode 100644 v2/models/protected_object_pause_action_params.go delete mode 100644 v2/models/protected_object_resume_action_params.go delete mode 100644 v2/models/protected_object_run_now_action_params.go delete mode 100644 v2/models/protected_object_un_protect_action_params.go delete mode 100644 v2/models/protected_objects_search_metadata.go delete mode 100644 v2/models/protected_objects_search_response_body.go delete mode 100644 v2/models/protection_group.go delete mode 100644 v2/models/protection_group_alerting_policy.go delete mode 100644 v2/models/protection_group_identifier.go delete mode 100644 v2/models/protection_group_info.go delete mode 100644 v2/models/protection_group_priority.go delete mode 100644 v2/models/protection_group_run.go delete mode 100644 v2/models/protection_group_run_actions.go delete mode 100644 v2/models/protection_group_runs.go delete mode 100644 v2/models/protection_group_state_change_actions.go delete mode 100644 v2/models/protection_groups.go delete mode 100644 v2/models/protection_object_input.go delete mode 100644 v2/models/protection_policy.go delete mode 100644 v2/models/protection_policy_identifier.go delete mode 100644 v2/models/protection_policy_request.go delete mode 100644 v2/models/protection_policy_response.go delete mode 100644 v2/models/protection_policy_response_with_pagination.go delete mode 100644 v2/models/protection_policy_type.go delete mode 100644 v2/models/protection_run_summary.go delete mode 100644 v2/models/protection_runs_stats.go delete mode 100644 v2/models/protection_runs_stats_list.go delete mode 100644 v2/models/protection_runs_summary.go delete mode 100644 v2/models/protection_summary.go delete mode 100644 v2/models/protection_type.go delete mode 100644 v2/models/protocol_access_level.go delete mode 100644 v2/models/pst_param.go delete mode 100644 v2/models/public_error_type.go delete mode 100644 v2/models/public_folder.go delete mode 100644 v2/models/public_folder_item.go delete mode 100644 v2/models/public_folder_item_type.go delete mode 100644 v2/models/public_folder_items.go delete mode 100644 v2/models/public_key_request.go delete mode 100644 v2/models/public_key_response.go delete mode 100644 v2/models/public_task_status.go delete mode 100644 v2/models/pure_protection_group_object_params.go delete mode 100644 v2/models/pure_protection_group_params.go delete mode 100644 v2/models/pvc_information_response_params.go delete mode 100644 v2/models/qo_s.go delete mode 100644 v2/models/qos_policies_result.go delete mode 100644 v2/models/qos_policy.go delete mode 100644 v2/models/quota_policy.go delete mode 100644 v2/models/rack.go delete mode 100644 v2/models/racks.go delete mode 100644 v2/models/radio_button_form_field_params.go delete mode 100644 v2/models/radio_group_form_field_params.go delete mode 100644 v2/models/rds_config.go delete mode 100644 v2/models/recover_acropolis_file_and_folder_params.go delete mode 100644 v2/models/recover_acropolis_params.go delete mode 100644 v2/models/recover_acropolis_snapshot_params.go delete mode 100644 v2/models/recover_acropolis_vm_new_source_config.go delete mode 100644 v2/models/recover_acropolis_vm_new_source_network_config.go delete mode 100644 v2/models/recover_acropolis_vm_original_source_config.go delete mode 100644 v2/models/recover_acropolis_vm_original_source_network_config.go delete mode 100644 v2/models/recover_acropolis_vm_params.go delete mode 100644 v2/models/recover_acropolis_vm_target_config.go delete mode 100644 v2/models/recover_aws_aurora_new_source_config.go delete mode 100644 v2/models/recover_aws_aurora_new_source_network_config.go delete mode 100644 v2/models/recover_aws_aurora_params.go delete mode 100644 v2/models/recover_aws_file_and_folder_params.go delete mode 100644 v2/models/recover_aws_params.go delete mode 100644 v2/models/recover_aws_rds_new_source_config.go delete mode 100644 v2/models/recover_aws_rds_new_source_network_config.go delete mode 100644 v2/models/recover_aws_rds_params.go delete mode 100644 v2/models/recover_aws_s3_bucket_params.go delete mode 100644 v2/models/recover_aws_vm_new_source_config.go delete mode 100644 v2/models/recover_aws_vm_new_source_network_config.go delete mode 100644 v2/models/recover_aws_vm_params.go delete mode 100644 v2/models/recover_azure_file_and_folder_params.go delete mode 100644 v2/models/recover_azure_params.go delete mode 100644 v2/models/recover_azure_sql_new_source_config.go delete mode 100644 v2/models/recover_azure_sql_object_params.go delete mode 100644 v2/models/recover_azure_sql_params.go delete mode 100644 v2/models/recover_azure_sql_snapshot_params.go delete mode 100644 v2/models/recover_azure_vm_new_source_config.go delete mode 100644 v2/models/recover_azure_vm_new_source_network_config.go delete mode 100644 v2/models/recover_azure_vm_original_source_config.go delete mode 100644 v2/models/recover_azure_vm_params.go delete mode 100644 v2/models/recover_cassandra_no_sql_object_params.go delete mode 100644 v2/models/recover_cassandra_params.go delete mode 100644 v2/models/recover_cassandra_snapshot_params.go delete mode 100644 v2/models/recover_couchbase_no_sql_object_params.go delete mode 100644 v2/models/recover_couchbase_params.go delete mode 100644 v2/models/recover_couchbase_snapshot_params.go delete mode 100644 v2/models/recover_elastifile_files_params.go delete mode 100644 v2/models/recover_elastifile_nas_volume_params.go delete mode 100644 v2/models/recover_elastifile_params.go delete mode 100644 v2/models/recover_elastifile_to_elastifile_files_target_params.go delete mode 100644 v2/models/recover_elastifile_to_elastifile_volume_target_params.go delete mode 100644 v2/models/recover_exchange_app_params.go delete mode 100644 v2/models/recover_exchange_app_snapshot_params.go delete mode 100644 v2/models/recover_exchange_dbs_params.go delete mode 100644 v2/models/recover_exchange_dbs_snapshot_params.go delete mode 100644 v2/models/recover_exchange_params.go delete mode 100644 v2/models/recover_file_and_folder_method.go delete mode 100644 v2/models/recover_flashblade_files_params.go delete mode 100644 v2/models/recover_flashblade_nas_volume_params.go delete mode 100644 v2/models/recover_flashblade_params.go delete mode 100644 v2/models/recover_flashblade_to_flashblade_files_target_params.go delete mode 100644 v2/models/recover_flashblade_to_flashblade_volume_target_params.go delete mode 100644 v2/models/recover_gcp_file_and_folder_params.go delete mode 100644 v2/models/recover_gcp_params.go delete mode 100644 v2/models/recover_gcp_vm_new_source_config.go delete mode 100644 v2/models/recover_gcp_vm_new_source_network_config.go delete mode 100644 v2/models/recover_gcp_vm_params.go delete mode 100644 v2/models/recover_generic_nas_files_params.go delete mode 100644 v2/models/recover_generic_nas_nas_volume_params.go delete mode 100644 v2/models/recover_generic_nas_params.go delete mode 100644 v2/models/recover_generic_nas_to_generic_nas_files_target_params.go delete mode 100644 v2/models/recover_generic_nas_to_generic_nas_volume_target_params.go delete mode 100644 v2/models/recover_gpfs_files_params.go delete mode 100644 v2/models/recover_gpfs_nas_volume_params.go delete mode 100644 v2/models/recover_gpfs_params.go delete mode 100644 v2/models/recover_gpfs_to_gpfs_files_target_params.go delete mode 100644 v2/models/recover_gpfs_to_gpfs_volume_target_params.go delete mode 100644 v2/models/recover_hbase_no_sql_object_params.go delete mode 100644 v2/models/recover_hbase_params.go delete mode 100644 v2/models/recover_hbase_snapshot_params.go delete mode 100644 v2/models/recover_hdfs_no_sql_object_params.go delete mode 100644 v2/models/recover_hdfs_params.go delete mode 100644 v2/models/recover_hdfs_snapshot_params.go delete mode 100644 v2/models/recover_hive_no_sql_object_params.go delete mode 100644 v2/models/recover_hive_params.go delete mode 100644 v2/models/recover_hive_snapshot_params.go delete mode 100644 v2/models/recover_hyper_v_file_and_folder_params.go delete mode 100644 v2/models/recover_hyper_v_params.go delete mode 100644 v2/models/recover_hyper_v_vm_new_source_config.go delete mode 100644 v2/models/recover_hyper_v_vm_new_source_network_config.go delete mode 100644 v2/models/recover_hyper_v_vm_original_source_config.go delete mode 100644 v2/models/recover_hyper_v_vm_original_source_network_config.go delete mode 100644 v2/models/recover_hyper_v_vm_params.go delete mode 100644 v2/models/recover_hyper_v_vm_s_c_vm_m_source_config.go delete mode 100644 v2/models/recover_hyper_v_vm_standalone_cluster_source_config.go delete mode 100644 v2/models/recover_hyper_v_vm_standalone_host_source_config.go delete mode 100644 v2/models/recover_isilon_files_params.go delete mode 100644 v2/models/recover_isilon_nas_volume_params.go delete mode 100644 v2/models/recover_isilon_params.go delete mode 100644 v2/models/recover_isilon_to_isilon_files_target_params.go delete mode 100644 v2/models/recover_isilon_to_isilon_volume_target_params.go delete mode 100644 v2/models/recover_kubernetes_namespace_params.go delete mode 100644 v2/models/recover_kubernetes_params.go delete mode 100644 v2/models/recover_kvm_params.go delete mode 100644 v2/models/recover_kvm_vm_new_network_config.go delete mode 100644 v2/models/recover_kvm_vm_new_source_config.go delete mode 100644 v2/models/recover_kvm_vm_new_source_network_config.go delete mode 100644 v2/models/recover_kvm_vm_original_source_config.go delete mode 100644 v2/models/recover_kvm_vm_original_source_network_config.go delete mode 100644 v2/models/recover_kvm_vm_params.go delete mode 100644 v2/models/recover_mailbox_params.go delete mode 100644 v2/models/recover_mongodb_no_sql_object_params.go delete mode 100644 v2/models/recover_mongodb_params.go delete mode 100644 v2/models/recover_mongodb_snapshot_params.go delete mode 100644 v2/models/recover_ms_group_params.go delete mode 100644 v2/models/recover_ms_team_params.go delete mode 100644 v2/models/recover_nas_volume_to_view_params.go delete mode 100644 v2/models/recover_netapp_files_params.go delete mode 100644 v2/models/recover_netapp_nas_volume_params.go delete mode 100644 v2/models/recover_netapp_params.go delete mode 100644 v2/models/recover_netapp_to_netapp_files_target_params.go delete mode 100644 v2/models/recover_netapp_to_netapp_volume_target_params.go delete mode 100644 v2/models/recover_o365_params.go delete mode 100644 v2/models/recover_one_drive_params.go delete mode 100644 v2/models/recover_oracle_app_new_source_config.go delete mode 100644 v2/models/recover_oracle_app_original_source_config.go delete mode 100644 v2/models/recover_oracle_app_params.go delete mode 100644 v2/models/recover_oracle_db_snapshot_params.go delete mode 100644 v2/models/recover_oracle_granular_restore_info.go delete mode 100644 v2/models/recover_oracle_new_target_database_config.go delete mode 100644 v2/models/recover_oracle_new_target_view_config.go delete mode 100644 v2/models/recover_oracle_params.go delete mode 100644 v2/models/recover_other_nas_to_elastifile_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_elastifile_volume_target_params.go delete mode 100644 v2/models/recover_other_nas_to_flashblade_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_flashblade_volume_target_params.go delete mode 100644 v2/models/recover_other_nas_to_generic_nas_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_generic_nas_volume_target_params.go delete mode 100644 v2/models/recover_other_nas_to_gpfs_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_gpfs_volume_target_params.go delete mode 100644 v2/models/recover_other_nas_to_isilon_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_isilon_volume_target_params.go delete mode 100644 v2/models/recover_other_nas_to_netapp_files_target_params.go delete mode 100644 v2/models/recover_other_nas_to_netapp_volume_target_params.go delete mode 100644 v2/models/recover_physical_file_and_folder_params.go delete mode 100644 v2/models/recover_physical_params.go delete mode 100644 v2/models/recover_physical_volume_params.go delete mode 100644 v2/models/recover_protection_group_run_params.go delete mode 100644 v2/models/recover_public_folders_params.go delete mode 100644 v2/models/recover_pure_group_target_params.go delete mode 100644 v2/models/recover_pure_params.go delete mode 100644 v2/models/recover_pure_san_group_new_source_config.go delete mode 100644 v2/models/recover_pure_san_group_original_source_config.go delete mode 100644 v2/models/recover_pure_san_group_params.go delete mode 100644 v2/models/recover_pure_san_volume_new_source_config.go delete mode 100644 v2/models/recover_pure_san_volume_original_source_config.go delete mode 100644 v2/models/recover_pure_san_volume_params.go delete mode 100644 v2/models/recover_pure_volume_target_params.go delete mode 100644 v2/models/recover_r_d_s_postgres_custom_server_config.go delete mode 100644 v2/models/recover_r_d_s_postgres_params.go delete mode 100644 v2/models/recover_r_d_s_postgres_to_known_source_config.go delete mode 100644 v2/models/recover_salesforce_params.go delete mode 100644 v2/models/recover_sfdc_object_params.go delete mode 100644 v2/models/recover_site_params.go delete mode 100644 v2/models/recover_sql_app_new_source_config.go delete mode 100644 v2/models/recover_sql_app_original_source_config.go delete mode 100644 v2/models/recover_sql_app_params.go delete mode 100644 v2/models/recover_sql_params.go delete mode 100644 v2/models/recover_target.go delete mode 100644 v2/models/recover_uda_object_params.go delete mode 100644 v2/models/recover_uda_params.go delete mode 100644 v2/models/recover_uda_snapshot_params.go delete mode 100644 v2/models/recover_v_mware_file_and_folder_params.go delete mode 100644 v2/models/recover_view_files_params.go delete mode 100644 v2/models/recover_view_params.go delete mode 100644 v2/models/recover_view_to_view_files_target_params.go delete mode 100644 v2/models/recover_vmware_child_snapshot_params.go delete mode 100644 v2/models/recover_vmware_disk_params.go delete mode 100644 v2/models/recover_vmware_params.go delete mode 100644 v2/models/recover_vmware_snapshot_params.go delete mode 100644 v2/models/recover_vmware_v_app_new_source_config.go delete mode 100644 v2/models/recover_vmware_v_app_original_source_config.go delete mode 100644 v2/models/recover_vmware_v_app_params.go delete mode 100644 v2/models/recover_vmware_v_app_template_new_source_config.go delete mode 100644 v2/models/recover_vmware_v_app_template_params.go delete mode 100644 v2/models/recover_vmware_v_app_template_v_c_d_source_config.go delete mode 100644 v2/models/recover_vmware_v_app_v_c_d_source_config.go delete mode 100644 v2/models/recover_vmware_vm_esxi_source_config.go delete mode 100644 v2/models/recover_vmware_vm_new_network_config.go delete mode 100644 v2/models/recover_vmware_vm_new_source_config.go delete mode 100644 v2/models/recover_vmware_vm_new_source_network_config.go delete mode 100644 v2/models/recover_vmware_vm_original_source_config.go delete mode 100644 v2/models/recover_vmware_vm_original_source_network_config.go delete mode 100644 v2/models/recover_vmware_vm_params.go delete mode 100644 v2/models/recover_vmware_vm_v_c_d_source_config.go delete mode 100644 v2/models/recover_vmware_vm_v_center_source_config.go delete mode 100644 v2/models/recover_volume_mapping.go delete mode 100644 v2/models/recovered_or_cloned_vms_rename_config.go delete mode 100644 v2/models/recoveries.go delete mode 100644 v2/models/recovery.go delete mode 100644 v2/models/recovery_object_identifier.go delete mode 100644 v2/models/recovery_oracle_task_info.go delete mode 100644 v2/models/recovery_process_type.go delete mode 100644 v2/models/recovery_task_info.go delete mode 100644 v2/models/recovery_time_range_info.go delete mode 100644 v2/models/recovery_type.go delete mode 100644 v2/models/recovery_vlan_config.go delete mode 100644 v2/models/redo_log_group_config.go delete mode 100644 v2/models/register_or_update_kerberos_provider_request.go delete mode 100644 v2/models/register_remote_cluster_params.go delete mode 100644 v2/models/register_swift_params.go delete mode 100644 v2/models/register_trusted_cas.go delete mode 100644 v2/models/registered_remote_storage_list.go delete mode 100644 v2/models/registration_info.go delete mode 100644 v2/models/regular_backup_policy.go delete mode 100644 v2/models/remote_adapter_host.go delete mode 100644 v2/models/remote_adapter_protection_group_params.go delete mode 100644 v2/models/remote_adapter_protection_group_replication_params.go delete mode 100644 v2/models/remote_cluster.go delete mode 100644 v2/models/remote_cluster_params.go delete mode 100644 v2/models/remote_cluster_purpose.go delete mode 100644 v2/models/remote_clusters.go delete mode 100644 v2/models/remote_disk.go delete mode 100644 v2/models/remote_disks.go delete mode 100644 v2/models/remote_storage_info.go delete mode 100644 v2/models/remote_target_config.go delete mode 100644 v2/models/remove_baseos_patch_request.go delete mode 100644 v2/models/remove_disk.go delete mode 100644 v2/models/remove_node.go delete mode 100644 v2/models/replica_failover_object.go delete mode 100644 v2/models/replicated_view_name_config.go delete mode 100644 v2/models/replication_backup_activation.go delete mode 100644 v2/models/replication_backup_activation_result.go delete mode 100644 v2/models/replication_config.go delete mode 100644 v2/models/replication_data_stats.go delete mode 100644 v2/models/replication_encryption_key.go delete mode 100644 v2/models/replication_params.go delete mode 100644 v2/models/replication_run.go delete mode 100644 v2/models/replication_run_summary.go delete mode 100644 v2/models/replication_target_progress_info.go delete mode 100644 v2/models/replication_target_result.go delete mode 100644 v2/models/replication_target_summary_info.go delete mode 100644 v2/models/replication_targets.go delete mode 100644 v2/models/request_initiator_type.go delete mode 100644 v2/models/reset_or_restore_networking.go delete mode 100644 v2/models/reset_patch_download_progress_result.go delete mode 100644 v2/models/reset_states.go delete mode 100644 v2/models/resource_endpoint.go delete mode 100644 v2/models/restore_spfile_or_pfile_info.go delete mode 100644 v2/models/restore_v_mware_vm_params.go delete mode 100644 v2/models/resume_action_object_level_params.go delete mode 100644 v2/models/resume_action_object_level_response.go delete mode 100644 v2/models/resume_protection_run_action_params.go delete mode 100644 v2/models/resume_protection_run_action_response_params.go delete mode 100644 v2/models/retention.go delete mode 100644 v2/models/retention_units.go delete mode 100644 v2/models/retrieve_archive_task.go delete mode 100644 v2/models/retry_options.go delete mode 100644 v2/models/reverse_replication_result.go delete mode 100644 v2/models/revert_patches_request.go delete mode 100644 v2/models/rigel_claim_info.go delete mode 100644 v2/models/rigel_claim_log.go delete mode 100644 v2/models/rigel_claim_logs.go delete mode 100644 v2/models/rigel_cluster_config_params.go delete mode 100644 v2/models/rigel_cluster_node.go delete mode 100644 v2/models/rigel_connection.go delete mode 100644 v2/models/rigel_connection_info.go delete mode 100644 v2/models/rigel_connections.go delete mode 100644 v2/models/rigel_connector.go delete mode 100644 v2/models/rigel_connectors.go delete mode 100644 v2/models/rigel_entity_type.go delete mode 100644 v2/models/rigel_reg_config.go delete mode 100644 v2/models/rigel_use_case.go delete mode 100644 v2/models/role.go delete mode 100644 v2/models/roles.go delete mode 100644 v2/models/root_public_folder_param.go delete mode 100644 v2/models/rpaas_config.go delete mode 100644 v2/models/rpaas_kms_key_type.go delete mode 100644 v2/models/rpaas_provision_status.go delete mode 100644 v2/models/run_archival_config.go delete mode 100644 v2/models/run_cloud_replication_config.go delete mode 100644 v2/models/run_filter_values.go delete mode 100644 v2/models/run_now_action_object_level_params.go delete mode 100644 v2/models/run_now_action_object_level_response.go delete mode 100644 v2/models/run_object.go delete mode 100644 v2/models/run_object_physical_params.go delete mode 100644 v2/models/run_replication_config.go delete mode 100644 v2/models/run_targets_configuration.go delete mode 100644 v2/models/s3_abac_server_create_request_params.go delete mode 100644 v2/models/s3_abac_server_response.go delete mode 100644 v2/models/s3_abac_server_update_request_params.go delete mode 100644 v2/models/s3_abac_servers_response.go delete mode 100644 v2/models/s3_account_params.go delete mode 100644 v2/models/s3_acl_grantee_type.go delete mode 100644 v2/models/s3_acl_permission.go delete mode 100644 v2/models/s3_compatible_archival_storage_class.go delete mode 100644 v2/models/s3_config.go delete mode 100644 v2/models/s3_config_for_indexing.go delete mode 100644 v2/models/s3_lifecycle_management.go delete mode 100644 v2/models/s3_owner_info.go delete mode 100644 v2/models/s_f_d_c_endpoint_type.go delete mode 100644 v2/models/s_m_b_principal.go delete mode 100644 v2/models/saas_service_name.go delete mode 100644 v2/models/sap_hana_agent_params.go delete mode 100644 v2/models/sap_oracle_agent_params.go delete mode 100644 v2/models/schedule.go delete mode 100644 v2/models/schedule_type.go delete mode 100644 v2/models/schedule_unit.go delete mode 100644 v2/models/scheduled_backup.go delete mode 100644 v2/models/schema.go delete mode 100644 v2/models/script_host.go delete mode 100644 v2/models/script_host_type.go delete mode 100644 v2/models/scvmm_registration_params.go delete mode 100644 v2/models/search_document_library_request_params.go delete mode 100644 v2/models/search_email_request_params.go delete mode 100644 v2/models/search_email_request_params_base.go delete mode 100644 v2/models/search_exchange_objects_request_params.go delete mode 100644 v2/models/search_file_request_params.go delete mode 100644 v2/models/search_file_request_params_base.go delete mode 100644 v2/models/search_indexed_objects_request.go delete mode 100644 v2/models/search_indexed_objects_response_body.go delete mode 100644 v2/models/search_ms_groups_request_params.go delete mode 100644 v2/models/search_ms_teams_request_params.go delete mode 100644 v2/models/search_object.go delete mode 100644 v2/models/search_public_folder_request_params.go delete mode 100644 v2/models/search_sfdc_records_request_params.go delete mode 100644 v2/models/secret_key_entity.go delete mode 100644 v2/models/security_config.go delete mode 100644 v2/models/security_config_account_lockout.go delete mode 100644 v2/models/security_config_certificate_based_auth.go delete mode 100644 v2/models/security_config_data_classification.go delete mode 100644 v2/models/security_config_password_lifetime.go delete mode 100644 v2/models/security_config_password_reuse.go delete mode 100644 v2/models/security_config_password_strength.go delete mode 100644 v2/models/security_config_response.go delete mode 100644 v2/models/security_config_session_configuration.go delete mode 100644 v2/models/security_config_ssh_configuration.go delete mode 100644 v2/models/security_principal.go delete mode 100644 v2/models/security_principals.go delete mode 100644 v2/models/self_service_snapshot_config.go delete mode 100644 v2/models/service_patch_level.go delete mode 100644 v2/models/service_patch_levels.go delete mode 100644 v2/models/service_unit_progress.go delete mode 100644 v2/models/service_version_info.go delete mode 100644 v2/models/sfdc_aurora_cluster_info.go delete mode 100644 v2/models/sfdc_dependent_object.go delete mode 100644 v2/models/sfdc_meta_info_result.go delete mode 100644 v2/models/sfdc_meta_info_type.go delete mode 100644 v2/models/sfdc_object_field_exclusion.go delete mode 100644 v2/models/sfdc_object_params.go delete mode 100644 v2/models/sfdc_object_protection_object_params.go delete mode 100644 v2/models/sfdc_object_protection_params.go delete mode 100644 v2/models/sfdc_object_protection_request_params.go delete mode 100644 v2/models/sfdc_object_protection_response_params.go delete mode 100644 v2/models/sfdc_object_protection_update_request_params.go delete mode 100644 v2/models/sfdc_protection_group_object_params.go delete mode 100644 v2/models/sfdc_protection_group_params.go delete mode 100644 v2/models/sfdc_records.go delete mode 100644 v2/models/sfdc_source_registration_params.go delete mode 100644 v2/models/share.go delete mode 100644 v2/models/sharepoint_item.go delete mode 100644 v2/models/sharepoint_items.go delete mode 100644 v2/models/sharepoint_object_entity_params.go delete mode 100644 v2/models/sharepoint_object_params.go delete mode 100644 v2/models/shares.go delete mode 100644 v2/models/shell_key_value_pair.go delete mode 100644 v2/models/simple_auth_params.go delete mode 100644 v2/models/simple_tags.go delete mode 100644 v2/models/sites_discovery_params.go delete mode 100644 v2/models/sla_rule.go delete mode 100644 v2/models/slave_data.go delete mode 100644 v2/models/smb_active_file_path.go delete mode 100644 v2/models/smb_active_open.go delete mode 100644 v2/models/smb_active_session.go delete mode 100644 v2/models/smb_config.go delete mode 100644 v2/models/smb_file_access_types.go delete mode 100644 v2/models/smb_file_opens.go delete mode 100644 v2/models/smb_mount_credentials.go delete mode 100644 v2/models/smb_permission.go delete mode 100644 v2/models/smb_permissions_info.go delete mode 100644 v2/models/smtp_configuration.go delete mode 100644 v2/models/snap_mirror_config.go delete mode 100644 v2/models/snapshot_actions.go delete mode 100644 v2/models/snapshot_diff_params.go delete mode 100644 v2/models/snapshot_diff_result.go delete mode 100644 v2/models/snapshot_handle.go delete mode 100644 v2/models/snapshot_info.go delete mode 100644 v2/models/snapshot_label.go delete mode 100644 v2/models/snapshot_recovery_target_type.go delete mode 100644 v2/models/snapshot_tag_info.go delete mode 100644 v2/models/snapshot_target_type.go delete mode 100644 v2/models/snapshots_summary.go delete mode 100644 v2/models/source.go delete mode 100644 v2/models/source_attribute_filter.go delete mode 100644 v2/models/source_attribute_filters_response_params.go delete mode 100644 v2/models/source_backup_deactivation.go delete mode 100644 v2/models/source_connection_request_params.go delete mode 100644 v2/models/source_connection_response_params.go delete mode 100644 v2/models/source_hierarchy_object_summaries.go delete mode 100644 v2/models/source_hierarchy_object_summary.go delete mode 100644 v2/models/source_name.go delete mode 100644 v2/models/source_registration.go delete mode 100644 v2/models/source_registration_patch_request_params.go delete mode 100644 v2/models/source_registration_request_params.go delete mode 100644 v2/models/source_registration_update_request_params.go delete mode 100644 v2/models/source_registrations.go delete mode 100644 v2/models/source_replica_object.go delete mode 100644 v2/models/sources.go delete mode 100644 v2/models/sql_server.go delete mode 100644 v2/models/sql_server_instance.go delete mode 100644 v2/models/sql_target_params_for_recover_sql_app.go delete mode 100644 v2/models/ssh_password_credentials.go delete mode 100644 v2/models/ssh_private_key_credentials.go delete mode 100644 v2/models/standalone_cluster_registration_params.go delete mode 100644 v2/models/standalone_host_registration_params.go delete mode 100644 v2/models/standard_params.go delete mode 100644 v2/models/standby_object.go delete mode 100644 v2/models/static_route_params.go delete mode 100644 v2/models/static_routes.go delete mode 100644 v2/models/stats_task.go delete mode 100644 v2/models/stats_task_info.go delete mode 100644 v2/models/stats_tasks.go delete mode 100644 v2/models/storage_array_snapshot_backup_policy.go delete mode 100644 v2/models/storage_array_snapshot_config.go delete mode 100644 v2/models/storage_array_snapshot_max_snapshot_config.go delete mode 100644 v2/models/storage_array_snapshot_max_space_config.go delete mode 100644 v2/models/storage_array_snapshot_schedule.go delete mode 100644 v2/models/storage_array_snapshot_throttling_policy.go delete mode 100644 v2/models/storage_domain.go delete mode 100644 v2/models/storage_domain_pair.go delete mode 100644 v2/models/storage_domains.go delete mode 100644 v2/models/storage_policy.go delete mode 100644 v2/models/storage_policy_override.go delete mode 100644 v2/models/string_form_field_params.go delete mode 100644 v2/models/subnet.go delete mode 100644 v2/models/subnet_info.go delete mode 100644 v2/models/success_resp.go delete mode 100644 v2/models/support_channel_config.go delete mode 100644 v2/models/support_mfa_config_info.go delete mode 100644 v2/models/support_totp_key_info.go delete mode 100644 v2/models/support_user_config.go delete mode 100644 v2/models/supported_hadoop_distributions.go delete mode 100644 v2/models/swift_config.go delete mode 100644 v2/models/swift_params.go delete mode 100644 v2/models/syslog_audit_tag.go delete mode 100644 v2/models/syslog_server.go delete mode 100644 v2/models/syslog_server_status.go delete mode 100644 v2/models/syslog_servers.go delete mode 100644 v2/models/system_app_status_params.go delete mode 100644 v2/models/system_recovery_params.go delete mode 100644 v2/models/tag.go delete mode 100644 v2/models/tag_info.go delete mode 100644 v2/models/tag_object.go delete mode 100644 v2/models/tag_params.go delete mode 100644 v2/models/target_bandwidth_throttlings.go delete mode 100644 v2/models/target_encryption_level.go delete mode 100644 v2/models/target_mailbox_param.go delete mode 100644 v2/models/target_ms_team_param.go delete mode 100644 v2/models/target_nfs_security_type.go delete mode 100644 v2/models/target_nfs_version_number.go delete mode 100644 v2/models/target_one_drive_param.go delete mode 100644 v2/models/target_purpose_type.go delete mode 100644 v2/models/target_registration_status.go delete mode 100644 v2/models/target_schedule.go delete mode 100644 v2/models/target_share_type.go delete mode 100644 v2/models/target_site_param.go delete mode 100644 v2/models/target_teams_channel_param.go delete mode 100644 v2/models/targets_configuration.go delete mode 100644 v2/models/task_logs.go delete mode 100644 v2/models/tdm_action.go delete mode 100644 v2/models/tdm_clone_task_request_params.go delete mode 100644 v2/models/tdm_clone_task_response_params.go delete mode 100644 v2/models/tdm_environment.go delete mode 100644 v2/models/tdm_object.go delete mode 100644 v2/models/tdm_object_timeline_event.go delete mode 100644 v2/models/tdm_object_timeline_events.go delete mode 100644 v2/models/tdm_objects.go delete mode 100644 v2/models/tdm_refresh_task_request_params.go delete mode 100644 v2/models/tdm_refresh_task_response_params.go delete mode 100644 v2/models/tdm_snapshot.go delete mode 100644 v2/models/tdm_snapshot_task_params.go delete mode 100644 v2/models/tdm_status.go delete mode 100644 v2/models/tdm_task.go delete mode 100644 v2/models/tdm_tasks.go delete mode 100644 v2/models/tdm_teardown_task_request_params.go delete mode 100644 v2/models/team_channel_type.go delete mode 100644 v2/models/teams_additional_params.go delete mode 100644 v2/models/teams_file_item.go delete mode 100644 v2/models/teams_item.go delete mode 100644 v2/models/teams_items.go delete mode 100644 v2/models/tear_down_status.go delete mode 100644 v2/models/template.go delete mode 100644 v2/models/tenant.go delete mode 100644 v2/models/tenant_action_body.go delete mode 100644 v2/models/tenant_actions.go delete mode 100644 v2/models/tenant_assignment_properties.go delete mode 100644 v2/models/tenant_assignment_type_integer_id.go delete mode 100644 v2/models/tenant_assignment_type_string_id.go delete mode 100644 v2/models/tenant_assignments.go delete mode 100644 v2/models/tenant_assignments_params.go delete mode 100644 v2/models/tenant_assignments_result.go delete mode 100644 v2/models/tenant_backfill_task_type.go delete mode 100644 v2/models/tenant_dmaas_cert.go delete mode 100644 v2/models/tenant_dmaas_certs.go delete mode 100644 v2/models/tenant_info.go delete mode 100644 v2/models/tenant_migration_action.go delete mode 100644 v2/models/tenant_migration_result.go delete mode 100644 v2/models/tenant_migration_service.go delete mode 100644 v2/models/tenant_migration_service_action.go delete mode 100644 v2/models/tenant_network.go delete mode 100644 v2/models/tenant_status.go delete mode 100644 v2/models/tenants_info.go delete mode 100644 v2/models/test_smtp_config.go delete mode 100644 v2/models/throttling_params.go delete mode 100644 v2/models/tier_level_settings.go delete mode 100644 v2/models/tiering_aws_external_target_params.go delete mode 100644 v2/models/tiering_azure_external_target_params.go delete mode 100644 v2/models/tiering_bandwidth_settings.go delete mode 100644 v2/models/tiering_cloud_platforms.go delete mode 100644 v2/models/tiering_external_target_params.go delete mode 100644 v2/models/tiering_gcp_external_target_params.go delete mode 100644 v2/models/tiering_info.go delete mode 100644 v2/models/tiering_levels.go delete mode 100644 v2/models/tiering_oracle_external_target_params.go delete mode 100644 v2/models/tiering_s3_comp_external_target_params.go delete mode 100644 v2/models/tiering_target_storage_type.go delete mode 100644 v2/models/tiering_type.go delete mode 100644 v2/models/time.go delete mode 100644 v2/models/time_of_a_week.go delete mode 100644 v2/models/time_of_day.go delete mode 100644 v2/models/time_range_usecs.go delete mode 100644 v2/models/time_series_stats.go delete mode 100644 v2/models/time_series_stats_for_metric.go delete mode 100644 v2/models/time_units.go delete mode 100644 v2/models/time_window.go delete mode 100644 v2/models/totp_key_info.go delete mode 100644 v2/models/trusted_ca.go delete mode 100644 v2/models/trusted_ca_request.go delete mode 100644 v2/models/trusted_domain.go delete mode 100644 v2/models/trusted_domain_params.go delete mode 100644 v2/models/uda_config_params.go delete mode 100644 v2/models/uda_configs_list.go delete mode 100644 v2/models/uda_connector_config_params.go delete mode 100644 v2/models/uda_create_run_response_params.go delete mode 100644 v2/models/uda_dynamic_form_params.go delete mode 100644 v2/models/uda_externally_triggered_run_params.go delete mode 100644 v2/models/uda_host_os_specific_params.go delete mode 100644 v2/models/uda_index_params.go delete mode 100644 v2/models/uda_indexed_object.go delete mode 100644 v2/models/uda_indexed_objects.go delete mode 100644 v2/models/uda_locale_specific_translations.go delete mode 100644 v2/models/uda_o_s_index_config_params.go delete mode 100644 v2/models/uda_o_s_specific_config_params.go delete mode 100644 v2/models/uda_object_params.go delete mode 100644 v2/models/uda_object_protection_object_params.go delete mode 100644 v2/models/uda_object_protection_params.go delete mode 100644 v2/models/uda_object_protection_request_params.go delete mode 100644 v2/models/uda_object_protection_response_params.go delete mode 100644 v2/models/uda_object_protection_update_request_params.go delete mode 100644 v2/models/uda_on_prem_search_params.go delete mode 100644 v2/models/uda_params.go delete mode 100644 v2/models/uda_protection_group_object_params.go delete mode 100644 v2/models/uda_protection_group_params.go delete mode 100644 v2/models/uda_protection_params.go delete mode 100644 v2/models/uda_protection_run_params.go delete mode 100644 v2/models/uda_recovery_params.go delete mode 100644 v2/models/uda_registration_params.go delete mode 100644 v2/models/uda_search_params.go delete mode 100644 v2/models/uda_source_registration_params.go delete mode 100644 v2/models/uda_source_type.go delete mode 100644 v2/models/universal_id.go delete mode 100644 v2/models/unplanned_failover_params.go delete mode 100644 v2/models/unprotect_action_object_level_params.go delete mode 100644 v2/models/unprotect_action_object_level_response.go delete mode 100644 v2/models/unregister_kerberos_provider.go delete mode 100644 v2/models/unregister_kerberos_request.go delete mode 100644 v2/models/unregister_swift_params.go delete mode 100644 v2/models/up_tiering_file_selection_type.go delete mode 100644 v2/models/update_active_directory_request.go delete mode 100644 v2/models/update_archival_snapshot_config.go delete mode 100644 v2/models/update_bifrost_connection_request.go delete mode 100644 v2/models/update_bifrost_connector_request.go delete mode 100644 v2/models/update_certificate_by_csr_request.go delete mode 100644 v2/models/update_certificate_by_csr_response_body.go delete mode 100644 v2/models/update_cluster_ipmi_user.go delete mode 100644 v2/models/update_cluster_vlan_params.go delete mode 100644 v2/models/update_data_tiering_state.go delete mode 100644 v2/models/update_data_tiering_state_request.go delete mode 100644 v2/models/update_existing_archival_snapshot_config.go delete mode 100644 v2/models/update_existing_replication_snapshot_config.go delete mode 100644 v2/models/update_feature_flag_params.go delete mode 100644 v2/models/update_fleet_env_info_request.go delete mode 100644 v2/models/update_group_parameters.go delete mode 100644 v2/models/update_idp_request_params.go delete mode 100644 v2/models/update_infected_files_list.go delete mode 100644 v2/models/update_infected_files_parameters.go delete mode 100644 v2/models/update_ipmi_users.go delete mode 100644 v2/models/update_keystone_request.go delete mode 100644 v2/models/update_local_snapshot_config.go delete mode 100644 v2/models/update_m_f_a_result.go delete mode 100644 v2/models/update_node_bond_interface_params.go delete mode 100644 v2/models/update_node_ipmi_user.go delete mode 100644 v2/models/update_object_snapshot_request.go delete mode 100644 v2/models/update_odp_remote_cluster_params.go delete mode 100644 v2/models/update_protected_objects_request.go delete mode 100644 v2/models/update_protection_group_run_params.go delete mode 100644 v2/models/update_protection_group_run_request_body.go delete mode 100644 v2/models/update_protection_group_run_response_body.go delete mode 100644 v2/models/update_protection_groups_state.go delete mode 100644 v2/models/update_protection_groups_state_request.go delete mode 100644 v2/models/update_remote_cluster_params.go delete mode 100644 v2/models/update_replication_snapshot_config.go delete mode 100644 v2/models/update_rigel_connection_request.go delete mode 100644 v2/models/update_rigel_connector_request.go delete mode 100644 v2/models/update_role_parameters.go delete mode 100644 v2/models/update_security_config_request.go delete mode 100644 v2/models/update_share_param.go delete mode 100644 v2/models/update_smtp_params.go delete mode 100644 v2/models/update_storage_domain_param.go delete mode 100644 v2/models/update_support_user_params.go delete mode 100644 v2/models/update_tdm_snapshot_request.go delete mode 100644 v2/models/update_tenant_body.go delete mode 100644 v2/models/update_tenant_params.go delete mode 100644 v2/models/update_user_parameters.go delete mode 100644 v2/models/update_view_param.go delete mode 100644 v2/models/upgrade_check_node_result.go delete mode 100644 v2/models/upgrade_check_run_tests_request.go delete mode 100644 v2/models/upgrade_check_run_tests_result.go delete mode 100644 v2/models/upgrade_check_test_result.go delete mode 100644 v2/models/upgrade_checks_results.go delete mode 100644 v2/models/upgradecheck_node_test_status.go delete mode 100644 v2/models/upgradecheck_request_type.go delete mode 100644 v2/models/upgradecheck_result_status.go delete mode 100644 v2/models/upgradecheck_test_result.go delete mode 100644 v2/models/uplink_switch.go delete mode 100644 v2/models/upload_cluster_cert_request.go delete mode 100644 v2/models/upload_cluster_cert_response.go delete mode 100644 v2/models/upload_package_url_params.go delete mode 100644 v2/models/uptiering_file_age_policy.go delete mode 100644 v2/models/uptiering_policy.go delete mode 100644 v2/models/uptiering_target.go delete mode 100644 v2/models/usage_and_performance_stats.go delete mode 100644 v2/models/user.go delete mode 100644 v2/models/user_api_key.go delete mode 100644 v2/models/user_api_keys.go delete mode 100644 v2/models/user_db_backup_preference.go delete mode 100644 v2/models/user_id.go delete mode 100644 v2/models/user_id_mapping_params.go delete mode 100644 v2/models/user_lock_reason.go delete mode 100644 v2/models/user_params.go delete mode 100644 v2/models/user_quota.go delete mode 100644 v2/models/user_quota_delete_params.go delete mode 100644 v2/models/user_quota_overrides.go delete mode 100644 v2/models/user_session.go delete mode 100644 v2/models/user_sessions_count.go delete mode 100644 v2/models/user_ui_config.go delete mode 100644 v2/models/users_discovery_params.go delete mode 100644 v2/models/users_list.go delete mode 100644 v2/models/v_mware_mount_volumes_new_target_config.go delete mode 100644 v2/models/v_mware_mount_volumes_original_target_config.go delete mode 100644 v2/models/validate_remote_cluster_connection_param.go delete mode 100644 v2/models/validate_support_user_cred_params.go delete mode 100644 v2/models/vcd_additional_params.go delete mode 100644 v2/models/vcd_connection_params.go delete mode 100644 v2/models/vcd_registration_params.go delete mode 100644 v2/models/vcd_storage_profile_params.go delete mode 100644 v2/models/vcd_vcenter_info.go delete mode 100644 v2/models/vcenter_credential_info.go delete mode 100644 v2/models/vcenter_registration_params.go delete mode 100644 v2/models/vdc_catalog.go delete mode 100644 v2/models/vdc_catalogs.go delete mode 100644 v2/models/vdc_object.go delete mode 100644 v2/models/verify_totp_request.go delete mode 100644 v2/models/verify_totp_result.go delete mode 100644 v2/models/view.go delete mode 100644 v2/models/view_alias_info.go delete mode 100644 v2/models/view_category.go delete mode 100644 v2/models/view_client.go delete mode 100644 v2/models/view_client_stats.go delete mode 100644 v2/models/view_clients.go delete mode 100644 v2/models/view_clients_stats.go delete mode 100644 v2/models/view_clients_summary.go delete mode 100644 v2/models/view_clients_summary_info.go delete mode 100644 v2/models/view_directory_quota.go delete mode 100644 v2/models/view_directory_quota_policy.go delete mode 100644 v2/models/view_directory_quotas.go delete mode 100644 v2/models/view_failover.go delete mode 100644 v2/models/view_intent.go delete mode 100644 v2/models/view_object_params.go delete mode 100644 v2/models/view_object_summary.go delete mode 100644 v2/models/view_options.go delete mode 100644 v2/models/view_params.go delete mode 100644 v2/models/view_pinning_config.go delete mode 100644 v2/models/view_protection.go delete mode 100644 v2/models/view_protection_config.go delete mode 100644 v2/models/view_protection_group_object_params.go delete mode 100644 v2/models/view_protection_group_params.go delete mode 100644 v2/models/view_protection_group_replication_params.go delete mode 100644 v2/models/view_protection_type.go delete mode 100644 v2/models/view_protocol.go delete mode 100644 v2/models/view_protocol_access.go delete mode 100644 v2/models/view_protocol_access_mode.go delete mode 100644 v2/models/view_recover_file_and_folder_info.go delete mode 100644 v2/models/view_security_mode.go delete mode 100644 v2/models/view_share_permissions.go delete mode 100644 v2/models/view_stats.go delete mode 100644 v2/models/view_stats_in_last_hours.go delete mode 100644 v2/models/view_stats_info.go delete mode 100644 v2/models/view_stats_info_details.go delete mode 100644 v2/models/view_user_quota_settings.go delete mode 100644 v2/models/view_user_quotas.go delete mode 100644 v2/models/views_global_settings.go delete mode 100644 v2/models/views_stats.go delete mode 100644 v2/models/views_summary.go delete mode 100644 v2/models/vlan_params.go delete mode 100644 v2/models/vm_filter.go delete mode 100644 v2/models/vm_ware_c_d_p_filter_params.go delete mode 100644 v2/models/vmware_additional_params.go delete mode 100644 v2/models/vmware_cdp_object.go delete mode 100644 v2/models/vmware_connection_params.go delete mode 100644 v2/models/vmware_disk_controller_type.go delete mode 100644 v2/models/vmware_disk_provision_type.go delete mode 100644 v2/models/vmware_object_action.go delete mode 100644 v2/models/vmware_object_action_params.go delete mode 100644 v2/models/vmware_object_enable_app_protection_params.go delete mode 100644 v2/models/vmware_object_enable_sql_protection_params.go delete mode 100644 v2/models/vmware_object_entity_params.go delete mode 100644 v2/models/vmware_object_protection_request.go delete mode 100644 v2/models/vmware_object_protection_request_params.go delete mode 100644 v2/models/vmware_object_protection_response.go delete mode 100644 v2/models/vmware_object_protection_response_params.go delete mode 100644 v2/models/vmware_object_protection_update_request_params.go delete mode 100644 v2/models/vmware_protection_group_extra_params.go delete mode 100644 v2/models/vmware_protection_group_object_params.go delete mode 100644 v2/models/vmware_protection_group_params.go delete mode 100644 v2/models/vmware_protection_group_standby_resource_params.go delete mode 100644 v2/models/vmware_recover_disks_original_source_config.go delete mode 100644 v2/models/vmware_recover_disks_target_source_config.go delete mode 100644 v2/models/vmware_recover_files_new_target_config.go delete mode 100644 v2/models/vmware_recover_files_original_target_config.go delete mode 100644 v2/models/vmware_recover_original_source_disk_params.go delete mode 100644 v2/models/vmware_recover_target_source_disk_params.go delete mode 100644 v2/models/vmware_source_registration_params.go delete mode 100644 v2/models/vmware_source_type.go delete mode 100644 v2/models/vmware_sql_credential_params.go delete mode 100644 v2/models/vmware_standby_object.go delete mode 100644 v2/models/vmware_target_params_for_mount_volume.go delete mode 100644 v2/models/vmware_target_params_for_recover_disk.go delete mode 100644 v2/models/vmware_target_params_for_recover_file_and_folder.go delete mode 100644 v2/models/vmware_target_params_for_recover_v_app.go delete mode 100644 v2/models/vmware_target_params_for_recover_v_app_template.go delete mode 100644 v2/models/vmware_target_params_for_recover_vm.go delete mode 100644 v2/models/vmware_throttling_params.go delete mode 100644 v2/models/vmware_v_app_recovery_target_config.go delete mode 100644 v2/models/vmware_v_app_template_recovery_target_config.go delete mode 100644 v2/models/vmware_vm_recovery_target_config.go delete mode 100644 v2/models/volume_info.go delete mode 100644 v2/models/web_socket_request_status.go delete mode 100644 v2/models/week_days.go delete mode 100644 v2/models/week_schedule.go delete mode 100644 v2/models/workflow_intervention_spec.go delete mode 100644 v2/models/workload_stats_schema.go delete mode 100644 v2/models/workload_stats_summary.go delete mode 100644 v2/models/workload_sub_type.go delete mode 100644 v2/models/workload_type.go delete mode 100644 v2/models/worm_properties.go delete mode 100644 v2/models/worm_retention.go delete mode 100644 v2/models/worm_specific_target_params.go delete mode 100644 v2/models/year_schedule.go diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36bf3fd9..1af2f417 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Create Pull Request for Last Commit on Any Branch +name: Auto Pull Request on Push on: push: @@ -13,26 +13,19 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Get last commit SHA (Commit 1) - id: commit1 - run: echo "::set-output name=sha1::$(git rev-parse HEAD~1)" - - - name: Get current commit SHA (Commit 2) - id: commit2 - run: echo "::set-output name=sha2::$(git rev-parse HEAD)" + # Get current branch name + - name: Get branch name + id: branch_name + run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})" - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Automated Pull Request for new commit" - base: ${{ github.ref_name }} # The current branch name - head: ${{ steps.commit1.outputs.sha1 }} # Commit 1 - compare-to: ${{ steps.commit2.outputs.sha2 }} # Commit 2 - title: "CR: Compare Commit 1 vs Commit 2" - body: | - This pull request is automatically created to compare: - - **Commit 1 (SHA: ${{ steps.commit1.outputs.sha1 }})** and - - **Commit 2 (SHA: ${{ steps.commit2.outputs.sha2 }})** - reviewers: "" # Optionally add reviewers - labels: "auto-generated" # Optionally add labels + commit-message: "Auto-generated Pull Request from ${{ steps.branch_name.outputs.branch }}" + base: main # Target branch for PR (e.g., main, develop) + head: ${{ steps.branch_name.outputs.branch }} # The branch you just pushed to + title: "PR: ${{ steps.branch_name.outputs.branch }} to main" + body: "This PR was automatically generated after pushing to ${{ steps.branch_name.outputs.branch }}." + reviewers: "" # Optional: Add reviewers + labels: "auto-generated" # Optional: Add labels diff --git a/go.mod b/go.mod deleted file mode 100644 index 4ba3fac7..00000000 --- a/go.mod +++ /dev/null @@ -1,34 +0,0 @@ -module github.com/satwik-miyyapuram-cohesity/go-sdk - -go 1.22.5 - -require ( - github.com/go-openapi/errors v0.22.0 - github.com/go-openapi/runtime v0.28.0 - github.com/go-openapi/strfmt v0.23.0 - github.com/go-openapi/swag v0.23.0 - github.com/go-openapi/validate v0.24.0 -) - -require ( - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/go-openapi/loads v0.22.0 // indirect - github.com/go-openapi/spec v0.21.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/oklog/ulid v1.3.1 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - go.mongodb.org/mongo-driver v1.14.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/sync v0.6.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index fe414b65..00000000 --- a/go.sum +++ /dev/null @@ -1,75 +0,0 @@ -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= -github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= -github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= -github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= -github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= -github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= -github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= -github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= -github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= -github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= -github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= -github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= -go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/v1/client/access_tokens/access_tokens_client.go b/v1/client/access_tokens/access_tokens_client.go deleted file mode 100644 index f604980d..00000000 --- a/v1/client/access_tokens/access_tokens_client.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_tokens - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new access tokens API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new access tokens API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new access tokens API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for access tokens API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GenerateAccessToken(params *GenerateAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateAccessTokenCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GenerateAccessToken generates an access token - - Before making other REST API requests, your REST client must make a - -'POST /public/accessToken' request with a valid Cohesity username and -password. This POST request returns an access token and type -in the response that is generated by the Cohesity Cluster. -Subsequent requests to other Cohesity REST API operations must -specify the returned access token and type by setting 'Authorization' -in the http header in the following format: - -Authorization: token_type access_token - -The generated token is valid for 24 hours. If a request is made with -an expired token, the 'Token expired' error message is returned. -Add code to your REST client to check for this error and request -another access token before reissuing the request. -*/ -func (a *Client) GenerateAccessToken(params *GenerateAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateAccessTokenCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGenerateAccessTokenParams() - } - op := &runtime.ClientOperation{ - ID: "GenerateAccessToken", - Method: "POST", - PathPattern: "/public/accessTokens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GenerateAccessTokenReader{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.(*GenerateAccessTokenCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GenerateAccessTokenDefault) - 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/access_tokens/generate_access_token_parameters.go b/v1/client/access_tokens/generate_access_token_parameters.go deleted file mode 100644 index ce7f9825..00000000 --- a/v1/client/access_tokens/generate_access_token_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_tokens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGenerateAccessTokenParams creates a new GenerateAccessTokenParams 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 NewGenerateAccessTokenParams() *GenerateAccessTokenParams { - return &GenerateAccessTokenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGenerateAccessTokenParamsWithTimeout creates a new GenerateAccessTokenParams object -// with the ability to set a timeout on a request. -func NewGenerateAccessTokenParamsWithTimeout(timeout time.Duration) *GenerateAccessTokenParams { - return &GenerateAccessTokenParams{ - timeout: timeout, - } -} - -// NewGenerateAccessTokenParamsWithContext creates a new GenerateAccessTokenParams object -// with the ability to set a context for a request. -func NewGenerateAccessTokenParamsWithContext(ctx context.Context) *GenerateAccessTokenParams { - return &GenerateAccessTokenParams{ - Context: ctx, - } -} - -// NewGenerateAccessTokenParamsWithHTTPClient creates a new GenerateAccessTokenParams object -// with the ability to set a custom HTTPClient for a request. -func NewGenerateAccessTokenParamsWithHTTPClient(client *http.Client) *GenerateAccessTokenParams { - return &GenerateAccessTokenParams{ - HTTPClient: client, - } -} - -/* -GenerateAccessTokenParams contains all the parameters to send to the API endpoint - - for the generate access token operation. - - Typically these are written to a http.Request. -*/ -type GenerateAccessTokenParams struct { - - /* Body. - - Request to generate access token. - */ - Body *models.AccessTokenCredential - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the generate access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateAccessTokenParams) WithDefaults() *GenerateAccessTokenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the generate access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateAccessTokenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the generate access token params -func (o *GenerateAccessTokenParams) WithTimeout(timeout time.Duration) *GenerateAccessTokenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the generate access token params -func (o *GenerateAccessTokenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the generate access token params -func (o *GenerateAccessTokenParams) WithContext(ctx context.Context) *GenerateAccessTokenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the generate access token params -func (o *GenerateAccessTokenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the generate access token params -func (o *GenerateAccessTokenParams) WithHTTPClient(client *http.Client) *GenerateAccessTokenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the generate access token params -func (o *GenerateAccessTokenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the generate access token params -func (o *GenerateAccessTokenParams) WithBody(body *models.AccessTokenCredential) *GenerateAccessTokenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the generate access token params -func (o *GenerateAccessTokenParams) SetBody(body *models.AccessTokenCredential) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GenerateAccessTokenParams) 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/access_tokens/generate_access_token_responses.go b/v1/client/access_tokens/generate_access_token_responses.go deleted file mode 100644 index 1366a281..00000000 --- a/v1/client/access_tokens/generate_access_token_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_tokens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GenerateAccessTokenReader is a Reader for the GenerateAccessToken structure. -type GenerateAccessTokenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GenerateAccessTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGenerateAccessTokenCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGenerateAccessTokenDefault(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 - } -} - -// NewGenerateAccessTokenCreated creates a GenerateAccessTokenCreated with default headers values -func NewGenerateAccessTokenCreated() *GenerateAccessTokenCreated { - return &GenerateAccessTokenCreated{} -} - -/* -GenerateAccessTokenCreated describes a response with status code 201, with default header values. - -Success -*/ -type GenerateAccessTokenCreated struct { - Payload *models.AccessToken -} - -// IsSuccess returns true when this generate access token created response has a 2xx status code -func (o *GenerateAccessTokenCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this generate access token created response has a 3xx status code -func (o *GenerateAccessTokenCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this generate access token created response has a 4xx status code -func (o *GenerateAccessTokenCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this generate access token created response has a 5xx status code -func (o *GenerateAccessTokenCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this generate access token created response a status code equal to that given -func (o *GenerateAccessTokenCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the generate access token created response -func (o *GenerateAccessTokenCreated) Code() int { - return 201 -} - -func (o *GenerateAccessTokenCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/accessTokens][%d] generateAccessTokenCreated %s", 201, payload) -} - -func (o *GenerateAccessTokenCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/accessTokens][%d] generateAccessTokenCreated %s", 201, payload) -} - -func (o *GenerateAccessTokenCreated) GetPayload() *models.AccessToken { - return o.Payload -} - -func (o *GenerateAccessTokenCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AccessToken) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGenerateAccessTokenDefault creates a GenerateAccessTokenDefault with default headers values -func NewGenerateAccessTokenDefault(code int) *GenerateAccessTokenDefault { - return &GenerateAccessTokenDefault{ - _statusCode: code, - } -} - -/* -GenerateAccessTokenDefault describes a response with status code -1, with default header values. - -Error -*/ -type GenerateAccessTokenDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this generate access token default response has a 2xx status code -func (o *GenerateAccessTokenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this generate access token default response has a 3xx status code -func (o *GenerateAccessTokenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this generate access token default response has a 4xx status code -func (o *GenerateAccessTokenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this generate access token default response has a 5xx status code -func (o *GenerateAccessTokenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this generate access token default response a status code equal to that given -func (o *GenerateAccessTokenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the generate access token default response -func (o *GenerateAccessTokenDefault) Code() int { - return o._statusCode -} - -func (o *GenerateAccessTokenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/accessTokens][%d] GenerateAccessToken default %s", o._statusCode, payload) -} - -func (o *GenerateAccessTokenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/accessTokens][%d] GenerateAccessToken default %s", o._statusCode, payload) -} - -func (o *GenerateAccessTokenDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GenerateAccessTokenDefault) 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/active_directory/active_directory_client.go b/v1/client/active_directory/active_directory_client.go deleted file mode 100644 index 91d37cb1..00000000 --- a/v1/client/active_directory/active_directory_client.go +++ /dev/null @@ -1,624 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new active directory API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new active directory API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new active directory API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for active directory API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddActiveDirectoryPrincipals(params *AddActiveDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddActiveDirectoryPrincipalsCreated, error) - - CreateActiveDirectoryEntry(params *CreateActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateActiveDirectoryEntryCreated, error) - - DeleteActiveDirectoryEntry(params *DeleteActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteActiveDirectoryEntryNoContent, error) - - EnableTrustedDomainDiscovery(params *EnableTrustedDomainDiscoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EnableTrustedDomainDiscoveryOK, error) - - GetActiveDirectoryDomainControllers(params *GetActiveDirectoryDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryDomainControllersOK, error) - - GetActiveDirectoryEntry(params *GetActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryEntryOK, error) - - ListCentrifyZones(params *ListCentrifyZonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCentrifyZonesOK, error) - - SearchActiveDirectoryPrincipals(params *SearchActiveDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchActiveDirectoryPrincipalsOK, error) - - UpdateActiveDirectoryIDMapping(params *UpdateActiveDirectoryIDMappingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryIDMappingOK, error) - - UpdateActiveDirectoryIgnoredTrustedDomains(params *UpdateActiveDirectoryIgnoredTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryIgnoredTrustedDomainsOK, error) - - UpdateActiveDirectoryLdapProvider(params *UpdateActiveDirectoryLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryLdapProviderOK, error) - - UpdateActiveDirectoryMachineAccounts(params *UpdateActiveDirectoryMachineAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryMachineAccountsOK, error) - - UpdatePreferredDomainControllers(params *UpdatePreferredDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePreferredDomainControllersOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - AddActiveDirectoryPrincipals adds multiple groups or users on the cohesity cluster for the specified active directory principals in addition assign cohesity roles to the users or groups to define their cohesity privileges - - After a group or user has been added to a Cohesity Cluster, - -the referenced Active Directory principal can be used by the Cohesity Cluster. -In addition, this operation maps Cohesity roles with a group or user and -this mapping defines the privileges allowed on the Cohesity Cluster for the -group or user. -For example if an 'management' group is created on the Cohesity Cluster -for the Active Directory 'management' principal group and is -associated with the Cohesity 'View' role, all users in the -referenced Active Directory 'management' principal group can log in to the -Cohesity Dashboard but will only have view-only privileges. -These users cannot create new Protection Jobs, Policies, Views, etc. - -NOTE: Local Cohesity users and groups cannot be created by this operation. -Local Cohesity users or groups do not have an associated Active Directory -principals and are created directly in the default LOCAL domain. -*/ -func (a *Client) AddActiveDirectoryPrincipals(params *AddActiveDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddActiveDirectoryPrincipalsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddActiveDirectoryPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "AddActiveDirectoryPrincipals", - Method: "POST", - PathPattern: "/public/activeDirectory/principals", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddActiveDirectoryPrincipalsReader{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.(*AddActiveDirectoryPrincipalsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddActiveDirectoryPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateActiveDirectoryEntry joins the cohesity cluster to the specified active directory - - After a Cohesity Cluster has been joined to an Active Directory domain, - -the users and groups in the domain can be authenticated on the Cohesity Cluster -using their Active Directory credentials. -*/ -func (a *Client) CreateActiveDirectoryEntry(params *CreateActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateActiveDirectoryEntryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateActiveDirectoryEntryParams() - } - op := &runtime.ClientOperation{ - ID: "CreateActiveDirectoryEntry", - Method: "POST", - PathPattern: "/public/activeDirectory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateActiveDirectoryEntryReader{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.(*CreateActiveDirectoryEntryCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateActiveDirectoryEntryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteActiveDirectoryEntry deletes the join with the active directory - - Deletes the join of the Cohesity Cluster to the specified - -Active Directory domain. After the deletion, the Cohesity Cluster -no longer has access to the principals on the Active Directory. -For example, you can no longer log in to the Cohesity Cluster -with a user defined in a principal group of the Active Directory domain. -*/ -func (a *Client) DeleteActiveDirectoryEntry(params *DeleteActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteActiveDirectoryEntryNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteActiveDirectoryEntryParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteActiveDirectoryEntry", - Method: "DELETE", - PathPattern: "/public/activeDirectory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteActiveDirectoryEntryReader{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.(*DeleteActiveDirectoryEntryNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteActiveDirectoryEntryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -EnableTrustedDomainDiscovery updates the states of trusted domains discovery -*/ -func (a *Client) EnableTrustedDomainDiscovery(params *EnableTrustedDomainDiscoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EnableTrustedDomainDiscoveryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewEnableTrustedDomainDiscoveryParams() - } - op := &runtime.ClientOperation{ - ID: "EnableTrustedDomainDiscovery", - Method: "POST", - PathPattern: "/public/activeDirectory/{name}/enableTrustedDomainState", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &EnableTrustedDomainDiscoveryReader{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.(*EnableTrustedDomainDiscoveryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*EnableTrustedDomainDiscoveryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetActiveDirectoryDomainControllers lists the domain controllers for a domain -*/ -func (a *Client) GetActiveDirectoryDomainControllers(params *GetActiveDirectoryDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryDomainControllersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveDirectoryDomainControllersParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveDirectoryDomainControllers", - Method: "GET", - PathPattern: "/public/activeDirectory/domainControllers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveDirectoryDomainControllersReader{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.(*GetActiveDirectoryDomainControllersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveDirectoryDomainControllersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetActiveDirectoryEntry lists the active directories that the cohesity cluster has joined - - After a Cohesity Cluster has been joined to an Active Directory domain, - -the users and groups in the domain can be authenticated on the Cohesity Cluster -using their Active Directory credentials. - -NOTE: The userName and password fields are not populated by this operation. -*/ -func (a *Client) GetActiveDirectoryEntry(params *GetActiveDirectoryEntryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryEntryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveDirectoryEntryParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveDirectoryEntry", - Method: "GET", - PathPattern: "/public/activeDirectory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveDirectoryEntryReader{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.(*GetActiveDirectoryEntryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveDirectoryEntryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListCentrifyZones fetches the list centrify zones of an active directory domain -*/ -func (a *Client) ListCentrifyZones(params *ListCentrifyZonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCentrifyZonesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListCentrifyZonesParams() - } - op := &runtime.ClientOperation{ - ID: "ListCentrifyZones", - Method: "GET", - PathPattern: "/public/activeDirectory/centrifyZones", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListCentrifyZonesReader{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.(*ListCentrifyZonesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListCentrifyZonesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchActiveDirectoryPrincipals lists the user and group principals in the active directory that match the filter criteria specified using parameters - - Optionally limit the search results by specifying security identifiers (SIDs), - -an object class (user or group) or a substring. -You can specify SIDs or a substring but not both. -*/ -func (a *Client) SearchActiveDirectoryPrincipals(params *SearchActiveDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchActiveDirectoryPrincipalsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchActiveDirectoryPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchActiveDirectoryPrincipals", - Method: "GET", - PathPattern: "/public/activeDirectory/principals", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchActiveDirectoryPrincipalsReader{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.(*SearchActiveDirectoryPrincipalsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchActiveDirectoryPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateActiveDirectoryIDMapping updates the user id mapping info of an active directory -*/ -func (a *Client) UpdateActiveDirectoryIDMapping(params *UpdateActiveDirectoryIDMappingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryIDMappingOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateActiveDirectoryIDMappingParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateActiveDirectoryIdMapping", - Method: "PUT", - PathPattern: "/public/activeDirectory/{name}/idMappingInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateActiveDirectoryIDMappingReader{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.(*UpdateActiveDirectoryIDMappingOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateActiveDirectoryIDMappingDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateActiveDirectoryIgnoredTrustedDomains updates the list of trusted domains to be ignored during trusted domain discovery of an active directory -*/ -func (a *Client) UpdateActiveDirectoryIgnoredTrustedDomains(params *UpdateActiveDirectoryIgnoredTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryIgnoredTrustedDomainsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateActiveDirectoryIgnoredTrustedDomainsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateActiveDirectoryIgnoredTrustedDomains", - Method: "PUT", - PathPattern: "/public/activeDirectory/{name}/ignoredTrustedDomains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateActiveDirectoryIgnoredTrustedDomainsReader{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.(*UpdateActiveDirectoryIgnoredTrustedDomainsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateActiveDirectoryIgnoredTrustedDomainsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateActiveDirectoryLdapProvider updates the l d a p provide Id for an active directory domain -*/ -func (a *Client) UpdateActiveDirectoryLdapProvider(params *UpdateActiveDirectoryLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryLdapProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateActiveDirectoryLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateActiveDirectoryLdapProvider", - Method: "PUT", - PathPattern: "/public/activeDirectory/{name}/ldapProvider", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateActiveDirectoryLdapProviderReader{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.(*UpdateActiveDirectoryLdapProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateActiveDirectoryLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateActiveDirectoryMachineAccounts updates the machine accounts of an active directory -*/ -func (a *Client) UpdateActiveDirectoryMachineAccounts(params *UpdateActiveDirectoryMachineAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryMachineAccountsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateActiveDirectoryMachineAccountsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateActiveDirectoryMachineAccounts", - Method: "POST", - PathPattern: "/public/activeDirectory/{name}/machineAccounts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateActiveDirectoryMachineAccountsReader{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.(*UpdateActiveDirectoryMachineAccountsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateActiveDirectoryMachineAccountsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdatePreferredDomainControllers Updates the preferred domain controllers of an Active Directory -*/ -func (a *Client) UpdatePreferredDomainControllers(params *UpdatePreferredDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePreferredDomainControllersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdatePreferredDomainControllersParams() - } - op := &runtime.ClientOperation{ - ID: "UpdatePreferredDomainControllers", - Method: "PUT", - PathPattern: "/public/activeDirectory/{name}/preferredDomainControllers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdatePreferredDomainControllersReader{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.(*UpdatePreferredDomainControllersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdatePreferredDomainControllersDefault) - 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/active_directory/add_active_directory_principals_parameters.go b/v1/client/active_directory/add_active_directory_principals_parameters.go deleted file mode 100644 index c3acbf3d..00000000 --- a/v1/client/active_directory/add_active_directory_principals_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAddActiveDirectoryPrincipalsParams creates a new AddActiveDirectoryPrincipalsParams 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 NewAddActiveDirectoryPrincipalsParams() *AddActiveDirectoryPrincipalsParams { - return &AddActiveDirectoryPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddActiveDirectoryPrincipalsParamsWithTimeout creates a new AddActiveDirectoryPrincipalsParams object -// with the ability to set a timeout on a request. -func NewAddActiveDirectoryPrincipalsParamsWithTimeout(timeout time.Duration) *AddActiveDirectoryPrincipalsParams { - return &AddActiveDirectoryPrincipalsParams{ - timeout: timeout, - } -} - -// NewAddActiveDirectoryPrincipalsParamsWithContext creates a new AddActiveDirectoryPrincipalsParams object -// with the ability to set a context for a request. -func NewAddActiveDirectoryPrincipalsParamsWithContext(ctx context.Context) *AddActiveDirectoryPrincipalsParams { - return &AddActiveDirectoryPrincipalsParams{ - Context: ctx, - } -} - -// NewAddActiveDirectoryPrincipalsParamsWithHTTPClient creates a new AddActiveDirectoryPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddActiveDirectoryPrincipalsParamsWithHTTPClient(client *http.Client) *AddActiveDirectoryPrincipalsParams { - return &AddActiveDirectoryPrincipalsParams{ - HTTPClient: client, - } -} - -/* -AddActiveDirectoryPrincipalsParams contains all the parameters to send to the API endpoint - - for the add active directory principals operation. - - Typically these are written to a http.Request. -*/ -type AddActiveDirectoryPrincipalsParams struct { - - /* Body. - - Request to add groups or users to the Cohesity Cluster. - */ - Body []*models.ActiveDirectoryPrincipalsAddParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add active directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddActiveDirectoryPrincipalsParams) WithDefaults() *AddActiveDirectoryPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add active directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddActiveDirectoryPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) WithTimeout(timeout time.Duration) *AddActiveDirectoryPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) WithContext(ctx context.Context) *AddActiveDirectoryPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) WithHTTPClient(client *http.Client) *AddActiveDirectoryPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) WithBody(body []*models.ActiveDirectoryPrincipalsAddParameters) *AddActiveDirectoryPrincipalsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add active directory principals params -func (o *AddActiveDirectoryPrincipalsParams) SetBody(body []*models.ActiveDirectoryPrincipalsAddParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddActiveDirectoryPrincipalsParams) 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/active_directory/add_active_directory_principals_responses.go b/v1/client/active_directory/add_active_directory_principals_responses.go deleted file mode 100644 index c8c98aa7..00000000 --- a/v1/client/active_directory/add_active_directory_principals_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AddActiveDirectoryPrincipalsReader is a Reader for the AddActiveDirectoryPrincipals structure. -type AddActiveDirectoryPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddActiveDirectoryPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddActiveDirectoryPrincipalsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddActiveDirectoryPrincipalsDefault(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 - } -} - -// NewAddActiveDirectoryPrincipalsCreated creates a AddActiveDirectoryPrincipalsCreated with default headers values -func NewAddActiveDirectoryPrincipalsCreated() *AddActiveDirectoryPrincipalsCreated { - return &AddActiveDirectoryPrincipalsCreated{} -} - -/* -AddActiveDirectoryPrincipalsCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddActiveDirectoryPrincipalsCreated struct { - Payload []*models.AddedActiveDirectoryPrincipal -} - -// IsSuccess returns true when this add active directory principals created response has a 2xx status code -func (o *AddActiveDirectoryPrincipalsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add active directory principals created response has a 3xx status code -func (o *AddActiveDirectoryPrincipalsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add active directory principals created response has a 4xx status code -func (o *AddActiveDirectoryPrincipalsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add active directory principals created response has a 5xx status code -func (o *AddActiveDirectoryPrincipalsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add active directory principals created response a status code equal to that given -func (o *AddActiveDirectoryPrincipalsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add active directory principals created response -func (o *AddActiveDirectoryPrincipalsCreated) Code() int { - return 201 -} - -func (o *AddActiveDirectoryPrincipalsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/principals][%d] addActiveDirectoryPrincipalsCreated %s", 201, payload) -} - -func (o *AddActiveDirectoryPrincipalsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/principals][%d] addActiveDirectoryPrincipalsCreated %s", 201, payload) -} - -func (o *AddActiveDirectoryPrincipalsCreated) GetPayload() []*models.AddedActiveDirectoryPrincipal { - return o.Payload -} - -func (o *AddActiveDirectoryPrincipalsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddActiveDirectoryPrincipalsDefault creates a AddActiveDirectoryPrincipalsDefault with default headers values -func NewAddActiveDirectoryPrincipalsDefault(code int) *AddActiveDirectoryPrincipalsDefault { - return &AddActiveDirectoryPrincipalsDefault{ - _statusCode: code, - } -} - -/* -AddActiveDirectoryPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddActiveDirectoryPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this add active directory principals default response has a 2xx status code -func (o *AddActiveDirectoryPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add active directory principals default response has a 3xx status code -func (o *AddActiveDirectoryPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add active directory principals default response has a 4xx status code -func (o *AddActiveDirectoryPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add active directory principals default response has a 5xx status code -func (o *AddActiveDirectoryPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add active directory principals default response a status code equal to that given -func (o *AddActiveDirectoryPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add active directory principals default response -func (o *AddActiveDirectoryPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *AddActiveDirectoryPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/principals][%d] AddActiveDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *AddActiveDirectoryPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/principals][%d] AddActiveDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *AddActiveDirectoryPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AddActiveDirectoryPrincipalsDefault) 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/active_directory/create_active_directory_entry_parameters.go b/v1/client/active_directory/create_active_directory_entry_parameters.go deleted file mode 100644 index 11b3b61f..00000000 --- a/v1/client/active_directory/create_active_directory_entry_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateActiveDirectoryEntryParams creates a new CreateActiveDirectoryEntryParams 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 NewCreateActiveDirectoryEntryParams() *CreateActiveDirectoryEntryParams { - return &CreateActiveDirectoryEntryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateActiveDirectoryEntryParamsWithTimeout creates a new CreateActiveDirectoryEntryParams object -// with the ability to set a timeout on a request. -func NewCreateActiveDirectoryEntryParamsWithTimeout(timeout time.Duration) *CreateActiveDirectoryEntryParams { - return &CreateActiveDirectoryEntryParams{ - timeout: timeout, - } -} - -// NewCreateActiveDirectoryEntryParamsWithContext creates a new CreateActiveDirectoryEntryParams object -// with the ability to set a context for a request. -func NewCreateActiveDirectoryEntryParamsWithContext(ctx context.Context) *CreateActiveDirectoryEntryParams { - return &CreateActiveDirectoryEntryParams{ - Context: ctx, - } -} - -// NewCreateActiveDirectoryEntryParamsWithHTTPClient creates a new CreateActiveDirectoryEntryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateActiveDirectoryEntryParamsWithHTTPClient(client *http.Client) *CreateActiveDirectoryEntryParams { - return &CreateActiveDirectoryEntryParams{ - HTTPClient: client, - } -} - -/* -CreateActiveDirectoryEntryParams contains all the parameters to send to the API endpoint - - for the create active directory entry operation. - - Typically these are written to a http.Request. -*/ -type CreateActiveDirectoryEntryParams struct { - - /* Body. - - Request to join an Active Directory. - */ - Body *models.CreateActiveDirectoryEntryParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateActiveDirectoryEntryParams) WithDefaults() *CreateActiveDirectoryEntryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateActiveDirectoryEntryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) WithTimeout(timeout time.Duration) *CreateActiveDirectoryEntryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) WithContext(ctx context.Context) *CreateActiveDirectoryEntryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) WithHTTPClient(client *http.Client) *CreateActiveDirectoryEntryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) WithBody(body *models.CreateActiveDirectoryEntryParams) *CreateActiveDirectoryEntryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create active directory entry params -func (o *CreateActiveDirectoryEntryParams) SetBody(body *models.CreateActiveDirectoryEntryParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateActiveDirectoryEntryParams) 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/active_directory/create_active_directory_entry_responses.go b/v1/client/active_directory/create_active_directory_entry_responses.go deleted file mode 100644 index 941de812..00000000 --- a/v1/client/active_directory/create_active_directory_entry_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateActiveDirectoryEntryReader is a Reader for the CreateActiveDirectoryEntry structure. -type CreateActiveDirectoryEntryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateActiveDirectoryEntryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateActiveDirectoryEntryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateActiveDirectoryEntryDefault(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 - } -} - -// NewCreateActiveDirectoryEntryCreated creates a CreateActiveDirectoryEntryCreated with default headers values -func NewCreateActiveDirectoryEntryCreated() *CreateActiveDirectoryEntryCreated { - return &CreateActiveDirectoryEntryCreated{} -} - -/* -CreateActiveDirectoryEntryCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateActiveDirectoryEntryCreated struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this create active directory entry created response has a 2xx status code -func (o *CreateActiveDirectoryEntryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create active directory entry created response has a 3xx status code -func (o *CreateActiveDirectoryEntryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create active directory entry created response has a 4xx status code -func (o *CreateActiveDirectoryEntryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create active directory entry created response has a 5xx status code -func (o *CreateActiveDirectoryEntryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create active directory entry created response a status code equal to that given -func (o *CreateActiveDirectoryEntryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create active directory entry created response -func (o *CreateActiveDirectoryEntryCreated) Code() int { - return 201 -} - -func (o *CreateActiveDirectoryEntryCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory][%d] createActiveDirectoryEntryCreated %s", 201, payload) -} - -func (o *CreateActiveDirectoryEntryCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory][%d] createActiveDirectoryEntryCreated %s", 201, payload) -} - -func (o *CreateActiveDirectoryEntryCreated) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *CreateActiveDirectoryEntryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateActiveDirectoryEntryDefault creates a CreateActiveDirectoryEntryDefault with default headers values -func NewCreateActiveDirectoryEntryDefault(code int) *CreateActiveDirectoryEntryDefault { - return &CreateActiveDirectoryEntryDefault{ - _statusCode: code, - } -} - -/* -CreateActiveDirectoryEntryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateActiveDirectoryEntryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create active directory entry default response has a 2xx status code -func (o *CreateActiveDirectoryEntryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create active directory entry default response has a 3xx status code -func (o *CreateActiveDirectoryEntryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create active directory entry default response has a 4xx status code -func (o *CreateActiveDirectoryEntryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create active directory entry default response has a 5xx status code -func (o *CreateActiveDirectoryEntryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create active directory entry default response a status code equal to that given -func (o *CreateActiveDirectoryEntryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create active directory entry default response -func (o *CreateActiveDirectoryEntryDefault) Code() int { - return o._statusCode -} - -func (o *CreateActiveDirectoryEntryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory][%d] CreateActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *CreateActiveDirectoryEntryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory][%d] CreateActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *CreateActiveDirectoryEntryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateActiveDirectoryEntryDefault) 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/active_directory/delete_active_directory_entry_parameters.go b/v1/client/active_directory/delete_active_directory_entry_parameters.go deleted file mode 100644 index 438c9370..00000000 --- a/v1/client/active_directory/delete_active_directory_entry_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteActiveDirectoryEntryParams creates a new DeleteActiveDirectoryEntryParams 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 NewDeleteActiveDirectoryEntryParams() *DeleteActiveDirectoryEntryParams { - return &DeleteActiveDirectoryEntryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteActiveDirectoryEntryParamsWithTimeout creates a new DeleteActiveDirectoryEntryParams object -// with the ability to set a timeout on a request. -func NewDeleteActiveDirectoryEntryParamsWithTimeout(timeout time.Duration) *DeleteActiveDirectoryEntryParams { - return &DeleteActiveDirectoryEntryParams{ - timeout: timeout, - } -} - -// NewDeleteActiveDirectoryEntryParamsWithContext creates a new DeleteActiveDirectoryEntryParams object -// with the ability to set a context for a request. -func NewDeleteActiveDirectoryEntryParamsWithContext(ctx context.Context) *DeleteActiveDirectoryEntryParams { - return &DeleteActiveDirectoryEntryParams{ - Context: ctx, - } -} - -// NewDeleteActiveDirectoryEntryParamsWithHTTPClient creates a new DeleteActiveDirectoryEntryParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteActiveDirectoryEntryParamsWithHTTPClient(client *http.Client) *DeleteActiveDirectoryEntryParams { - return &DeleteActiveDirectoryEntryParams{ - HTTPClient: client, - } -} - -/* -DeleteActiveDirectoryEntryParams contains all the parameters to send to the API endpoint - - for the delete active directory entry operation. - - Typically these are written to a http.Request. -*/ -type DeleteActiveDirectoryEntryParams struct { - - /* Body. - - Request to delete a join with an Active Directory. - */ - Body *models.ActiveDirectoryEntry - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteActiveDirectoryEntryParams) WithDefaults() *DeleteActiveDirectoryEntryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteActiveDirectoryEntryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) WithTimeout(timeout time.Duration) *DeleteActiveDirectoryEntryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) WithContext(ctx context.Context) *DeleteActiveDirectoryEntryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) WithHTTPClient(client *http.Client) *DeleteActiveDirectoryEntryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) WithBody(body *models.ActiveDirectoryEntry) *DeleteActiveDirectoryEntryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete active directory entry params -func (o *DeleteActiveDirectoryEntryParams) SetBody(body *models.ActiveDirectoryEntry) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteActiveDirectoryEntryParams) 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/active_directory/delete_active_directory_entry_responses.go b/v1/client/active_directory/delete_active_directory_entry_responses.go deleted file mode 100644 index a48994a3..00000000 --- a/v1/client/active_directory/delete_active_directory_entry_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteActiveDirectoryEntryReader is a Reader for the DeleteActiveDirectoryEntry structure. -type DeleteActiveDirectoryEntryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteActiveDirectoryEntryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteActiveDirectoryEntryNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteActiveDirectoryEntryDefault(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 - } -} - -// NewDeleteActiveDirectoryEntryNoContent creates a DeleteActiveDirectoryEntryNoContent with default headers values -func NewDeleteActiveDirectoryEntryNoContent() *DeleteActiveDirectoryEntryNoContent { - return &DeleteActiveDirectoryEntryNoContent{} -} - -/* -DeleteActiveDirectoryEntryNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteActiveDirectoryEntryNoContent struct { -} - -// IsSuccess returns true when this delete active directory entry no content response has a 2xx status code -func (o *DeleteActiveDirectoryEntryNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete active directory entry no content response has a 3xx status code -func (o *DeleteActiveDirectoryEntryNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete active directory entry no content response has a 4xx status code -func (o *DeleteActiveDirectoryEntryNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete active directory entry no content response has a 5xx status code -func (o *DeleteActiveDirectoryEntryNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete active directory entry no content response a status code equal to that given -func (o *DeleteActiveDirectoryEntryNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete active directory entry no content response -func (o *DeleteActiveDirectoryEntryNoContent) Code() int { - return 204 -} - -func (o *DeleteActiveDirectoryEntryNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/activeDirectory][%d] deleteActiveDirectoryEntryNoContent", 204) -} - -func (o *DeleteActiveDirectoryEntryNoContent) String() string { - return fmt.Sprintf("[DELETE /public/activeDirectory][%d] deleteActiveDirectoryEntryNoContent", 204) -} - -func (o *DeleteActiveDirectoryEntryNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteActiveDirectoryEntryDefault creates a DeleteActiveDirectoryEntryDefault with default headers values -func NewDeleteActiveDirectoryEntryDefault(code int) *DeleteActiveDirectoryEntryDefault { - return &DeleteActiveDirectoryEntryDefault{ - _statusCode: code, - } -} - -/* -DeleteActiveDirectoryEntryDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteActiveDirectoryEntryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete active directory entry default response has a 2xx status code -func (o *DeleteActiveDirectoryEntryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete active directory entry default response has a 3xx status code -func (o *DeleteActiveDirectoryEntryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete active directory entry default response has a 4xx status code -func (o *DeleteActiveDirectoryEntryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete active directory entry default response has a 5xx status code -func (o *DeleteActiveDirectoryEntryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete active directory entry default response a status code equal to that given -func (o *DeleteActiveDirectoryEntryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete active directory entry default response -func (o *DeleteActiveDirectoryEntryDefault) Code() int { - return o._statusCode -} - -func (o *DeleteActiveDirectoryEntryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/activeDirectory][%d] DeleteActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *DeleteActiveDirectoryEntryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/activeDirectory][%d] DeleteActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *DeleteActiveDirectoryEntryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteActiveDirectoryEntryDefault) 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/active_directory/enable_trusted_domain_discovery_parameters.go b/v1/client/active_directory/enable_trusted_domain_discovery_parameters.go deleted file mode 100644 index 6f16ad95..00000000 --- a/v1/client/active_directory/enable_trusted_domain_discovery_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewEnableTrustedDomainDiscoveryParams creates a new EnableTrustedDomainDiscoveryParams 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 NewEnableTrustedDomainDiscoveryParams() *EnableTrustedDomainDiscoveryParams { - return &EnableTrustedDomainDiscoveryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewEnableTrustedDomainDiscoveryParamsWithTimeout creates a new EnableTrustedDomainDiscoveryParams object -// with the ability to set a timeout on a request. -func NewEnableTrustedDomainDiscoveryParamsWithTimeout(timeout time.Duration) *EnableTrustedDomainDiscoveryParams { - return &EnableTrustedDomainDiscoveryParams{ - timeout: timeout, - } -} - -// NewEnableTrustedDomainDiscoveryParamsWithContext creates a new EnableTrustedDomainDiscoveryParams object -// with the ability to set a context for a request. -func NewEnableTrustedDomainDiscoveryParamsWithContext(ctx context.Context) *EnableTrustedDomainDiscoveryParams { - return &EnableTrustedDomainDiscoveryParams{ - Context: ctx, - } -} - -// NewEnableTrustedDomainDiscoveryParamsWithHTTPClient creates a new EnableTrustedDomainDiscoveryParams object -// with the ability to set a custom HTTPClient for a request. -func NewEnableTrustedDomainDiscoveryParamsWithHTTPClient(client *http.Client) *EnableTrustedDomainDiscoveryParams { - return &EnableTrustedDomainDiscoveryParams{ - HTTPClient: client, - } -} - -/* -EnableTrustedDomainDiscoveryParams contains all the parameters to send to the API endpoint - - for the enable trusted domain discovery operation. - - Typically these are written to a http.Request. -*/ -type EnableTrustedDomainDiscoveryParams struct { - - /* Body. - - Request to update enable trusted domains state of an Active Directory. - */ - Body *models.UpdateTrustedDomainEnableParams - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the enable trusted domain discovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EnableTrustedDomainDiscoveryParams) WithDefaults() *EnableTrustedDomainDiscoveryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the enable trusted domain discovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EnableTrustedDomainDiscoveryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) WithTimeout(timeout time.Duration) *EnableTrustedDomainDiscoveryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) WithContext(ctx context.Context) *EnableTrustedDomainDiscoveryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) WithHTTPClient(client *http.Client) *EnableTrustedDomainDiscoveryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) WithBody(body *models.UpdateTrustedDomainEnableParams) *EnableTrustedDomainDiscoveryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) SetBody(body *models.UpdateTrustedDomainEnableParams) { - o.Body = body -} - -// WithName adds the name to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) WithName(name string) *EnableTrustedDomainDiscoveryParams { - o.SetName(name) - return o -} - -// SetName adds the name to the enable trusted domain discovery params -func (o *EnableTrustedDomainDiscoveryParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *EnableTrustedDomainDiscoveryParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/enable_trusted_domain_discovery_responses.go b/v1/client/active_directory/enable_trusted_domain_discovery_responses.go deleted file mode 100644 index 34f7b78c..00000000 --- a/v1/client/active_directory/enable_trusted_domain_discovery_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// EnableTrustedDomainDiscoveryReader is a Reader for the EnableTrustedDomainDiscovery structure. -type EnableTrustedDomainDiscoveryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *EnableTrustedDomainDiscoveryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewEnableTrustedDomainDiscoveryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewEnableTrustedDomainDiscoveryDefault(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 - } -} - -// NewEnableTrustedDomainDiscoveryOK creates a EnableTrustedDomainDiscoveryOK with default headers values -func NewEnableTrustedDomainDiscoveryOK() *EnableTrustedDomainDiscoveryOK { - return &EnableTrustedDomainDiscoveryOK{} -} - -/* -EnableTrustedDomainDiscoveryOK describes a response with status code 200, with default header values. - -Success -*/ -type EnableTrustedDomainDiscoveryOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this enable trusted domain discovery o k response has a 2xx status code -func (o *EnableTrustedDomainDiscoveryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this enable trusted domain discovery o k response has a 3xx status code -func (o *EnableTrustedDomainDiscoveryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this enable trusted domain discovery o k response has a 4xx status code -func (o *EnableTrustedDomainDiscoveryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this enable trusted domain discovery o k response has a 5xx status code -func (o *EnableTrustedDomainDiscoveryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this enable trusted domain discovery o k response a status code equal to that given -func (o *EnableTrustedDomainDiscoveryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the enable trusted domain discovery o k response -func (o *EnableTrustedDomainDiscoveryOK) Code() int { - return 200 -} - -func (o *EnableTrustedDomainDiscoveryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/enableTrustedDomainState][%d] enableTrustedDomainDiscoveryOK %s", 200, payload) -} - -func (o *EnableTrustedDomainDiscoveryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/enableTrustedDomainState][%d] enableTrustedDomainDiscoveryOK %s", 200, payload) -} - -func (o *EnableTrustedDomainDiscoveryOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *EnableTrustedDomainDiscoveryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewEnableTrustedDomainDiscoveryDefault creates a EnableTrustedDomainDiscoveryDefault with default headers values -func NewEnableTrustedDomainDiscoveryDefault(code int) *EnableTrustedDomainDiscoveryDefault { - return &EnableTrustedDomainDiscoveryDefault{ - _statusCode: code, - } -} - -/* -EnableTrustedDomainDiscoveryDefault describes a response with status code -1, with default header values. - -Error -*/ -type EnableTrustedDomainDiscoveryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this enable trusted domain discovery default response has a 2xx status code -func (o *EnableTrustedDomainDiscoveryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this enable trusted domain discovery default response has a 3xx status code -func (o *EnableTrustedDomainDiscoveryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this enable trusted domain discovery default response has a 4xx status code -func (o *EnableTrustedDomainDiscoveryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this enable trusted domain discovery default response has a 5xx status code -func (o *EnableTrustedDomainDiscoveryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this enable trusted domain discovery default response a status code equal to that given -func (o *EnableTrustedDomainDiscoveryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the enable trusted domain discovery default response -func (o *EnableTrustedDomainDiscoveryDefault) Code() int { - return o._statusCode -} - -func (o *EnableTrustedDomainDiscoveryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/enableTrustedDomainState][%d] EnableTrustedDomainDiscovery default %s", o._statusCode, payload) -} - -func (o *EnableTrustedDomainDiscoveryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/enableTrustedDomainState][%d] EnableTrustedDomainDiscovery default %s", o._statusCode, payload) -} - -func (o *EnableTrustedDomainDiscoveryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *EnableTrustedDomainDiscoveryDefault) 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/active_directory/get_active_directory_domain_controllers_parameters.go b/v1/client/active_directory/get_active_directory_domain_controllers_parameters.go deleted file mode 100644 index f0adfa5f..00000000 --- a/v1/client/active_directory/get_active_directory_domain_controllers_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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" -) - -// NewGetActiveDirectoryDomainControllersParams creates a new GetActiveDirectoryDomainControllersParams 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 NewGetActiveDirectoryDomainControllersParams() *GetActiveDirectoryDomainControllersParams { - return &GetActiveDirectoryDomainControllersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveDirectoryDomainControllersParamsWithTimeout creates a new GetActiveDirectoryDomainControllersParams object -// with the ability to set a timeout on a request. -func NewGetActiveDirectoryDomainControllersParamsWithTimeout(timeout time.Duration) *GetActiveDirectoryDomainControllersParams { - return &GetActiveDirectoryDomainControllersParams{ - timeout: timeout, - } -} - -// NewGetActiveDirectoryDomainControllersParamsWithContext creates a new GetActiveDirectoryDomainControllersParams object -// with the ability to set a context for a request. -func NewGetActiveDirectoryDomainControllersParamsWithContext(ctx context.Context) *GetActiveDirectoryDomainControllersParams { - return &GetActiveDirectoryDomainControllersParams{ - Context: ctx, - } -} - -// NewGetActiveDirectoryDomainControllersParamsWithHTTPClient creates a new GetActiveDirectoryDomainControllersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveDirectoryDomainControllersParamsWithHTTPClient(client *http.Client) *GetActiveDirectoryDomainControllersParams { - return &GetActiveDirectoryDomainControllersParams{ - HTTPClient: client, - } -} - -/* -GetActiveDirectoryDomainControllersParams contains all the parameters to send to the API endpoint - - for the get active directory domain controllers operation. - - Typically these are written to a http.Request. -*/ -type GetActiveDirectoryDomainControllersParams struct { - - /* DomainName. - - Specifies the domain name - */ - DomainName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active directory domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryDomainControllersParams) WithDefaults() *GetActiveDirectoryDomainControllersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active directory domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryDomainControllersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) WithTimeout(timeout time.Duration) *GetActiveDirectoryDomainControllersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) WithContext(ctx context.Context) *GetActiveDirectoryDomainControllersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) WithHTTPClient(client *http.Client) *GetActiveDirectoryDomainControllersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainName adds the domainName to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) WithDomainName(domainName *string) *GetActiveDirectoryDomainControllersParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the get active directory domain controllers params -func (o *GetActiveDirectoryDomainControllersParams) SetDomainName(domainName *string) { - o.DomainName = domainName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveDirectoryDomainControllersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DomainName != nil { - - // query param domainName - var qrDomainName string - - if o.DomainName != nil { - qrDomainName = *o.DomainName - } - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/get_active_directory_domain_controllers_responses.go b/v1/client/active_directory/get_active_directory_domain_controllers_responses.go deleted file mode 100644 index d3c74910..00000000 --- a/v1/client/active_directory/get_active_directory_domain_controllers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetActiveDirectoryDomainControllersReader is a Reader for the GetActiveDirectoryDomainControllers structure. -type GetActiveDirectoryDomainControllersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveDirectoryDomainControllersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveDirectoryDomainControllersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveDirectoryDomainControllersDefault(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 - } -} - -// NewGetActiveDirectoryDomainControllersOK creates a GetActiveDirectoryDomainControllersOK with default headers values -func NewGetActiveDirectoryDomainControllersOK() *GetActiveDirectoryDomainControllersOK { - return &GetActiveDirectoryDomainControllersOK{} -} - -/* -GetActiveDirectoryDomainControllersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveDirectoryDomainControllersOK struct { - Payload *models.DomainControllers -} - -// IsSuccess returns true when this get active directory domain controllers o k response has a 2xx status code -func (o *GetActiveDirectoryDomainControllersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active directory domain controllers o k response has a 3xx status code -func (o *GetActiveDirectoryDomainControllersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active directory domain controllers o k response has a 4xx status code -func (o *GetActiveDirectoryDomainControllersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active directory domain controllers o k response has a 5xx status code -func (o *GetActiveDirectoryDomainControllersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active directory domain controllers o k response a status code equal to that given -func (o *GetActiveDirectoryDomainControllersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active directory domain controllers o k response -func (o *GetActiveDirectoryDomainControllersOK) Code() int { - return 200 -} - -func (o *GetActiveDirectoryDomainControllersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/domainControllers][%d] getActiveDirectoryDomainControllersOK %s", 200, payload) -} - -func (o *GetActiveDirectoryDomainControllersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/domainControllers][%d] getActiveDirectoryDomainControllersOK %s", 200, payload) -} - -func (o *GetActiveDirectoryDomainControllersOK) GetPayload() *models.DomainControllers { - return o.Payload -} - -func (o *GetActiveDirectoryDomainControllersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DomainControllers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveDirectoryDomainControllersDefault creates a GetActiveDirectoryDomainControllersDefault with default headers values -func NewGetActiveDirectoryDomainControllersDefault(code int) *GetActiveDirectoryDomainControllersDefault { - return &GetActiveDirectoryDomainControllersDefault{ - _statusCode: code, - } -} - -/* -GetActiveDirectoryDomainControllersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveDirectoryDomainControllersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get active directory domain controllers default response has a 2xx status code -func (o *GetActiveDirectoryDomainControllersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active directory domain controllers default response has a 3xx status code -func (o *GetActiveDirectoryDomainControllersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active directory domain controllers default response has a 4xx status code -func (o *GetActiveDirectoryDomainControllersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active directory domain controllers default response has a 5xx status code -func (o *GetActiveDirectoryDomainControllersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active directory domain controllers default response a status code equal to that given -func (o *GetActiveDirectoryDomainControllersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active directory domain controllers default response -func (o *GetActiveDirectoryDomainControllersDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveDirectoryDomainControllersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/domainControllers][%d] GetActiveDirectoryDomainControllers default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryDomainControllersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/domainControllers][%d] GetActiveDirectoryDomainControllers default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryDomainControllersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetActiveDirectoryDomainControllersDefault) 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/active_directory/get_active_directory_entry_parameters.go b/v1/client/active_directory/get_active_directory_entry_parameters.go deleted file mode 100644 index 2cd8afc8..00000000 --- a/v1/client/active_directory/get_active_directory_entry_parameters.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewGetActiveDirectoryEntryParams creates a new GetActiveDirectoryEntryParams 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 NewGetActiveDirectoryEntryParams() *GetActiveDirectoryEntryParams { - return &GetActiveDirectoryEntryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveDirectoryEntryParamsWithTimeout creates a new GetActiveDirectoryEntryParams object -// with the ability to set a timeout on a request. -func NewGetActiveDirectoryEntryParamsWithTimeout(timeout time.Duration) *GetActiveDirectoryEntryParams { - return &GetActiveDirectoryEntryParams{ - timeout: timeout, - } -} - -// NewGetActiveDirectoryEntryParamsWithContext creates a new GetActiveDirectoryEntryParams object -// with the ability to set a context for a request. -func NewGetActiveDirectoryEntryParamsWithContext(ctx context.Context) *GetActiveDirectoryEntryParams { - return &GetActiveDirectoryEntryParams{ - Context: ctx, - } -} - -// NewGetActiveDirectoryEntryParamsWithHTTPClient creates a new GetActiveDirectoryEntryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveDirectoryEntryParamsWithHTTPClient(client *http.Client) *GetActiveDirectoryEntryParams { - return &GetActiveDirectoryEntryParams{ - HTTPClient: client, - } -} - -/* -GetActiveDirectoryEntryParams contains all the parameters to send to the API endpoint - - for the get active directory entry operation. - - Typically these are written to a http.Request. -*/ -type GetActiveDirectoryEntryParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Domains. - - Specifies the domains to fetch active directory entries. - */ - Domains []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryEntryParams) WithDefaults() *GetActiveDirectoryEntryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active directory entry params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryEntryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithTimeout(timeout time.Duration) *GetActiveDirectoryEntryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithContext(ctx context.Context) *GetActiveDirectoryEntryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithHTTPClient(client *http.Client) *GetActiveDirectoryEntryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetActiveDirectoryEntryParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomains adds the domains to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithDomains(domains []string) *GetActiveDirectoryEntryParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithTenantIds adds the tenantIds to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) WithTenantIds(tenantIds []string) *GetActiveDirectoryEntryParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get active directory entry params -func (o *GetActiveDirectoryEntryParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveDirectoryEntryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetActiveDirectoryEntry binds the parameter domains -func (o *GetActiveDirectoryEntryParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamGetActiveDirectoryEntry binds the parameter tenantIds -func (o *GetActiveDirectoryEntryParams) 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/v1/client/active_directory/get_active_directory_entry_responses.go b/v1/client/active_directory/get_active_directory_entry_responses.go deleted file mode 100644 index 48584f4b..00000000 --- a/v1/client/active_directory/get_active_directory_entry_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetActiveDirectoryEntryReader is a Reader for the GetActiveDirectoryEntry structure. -type GetActiveDirectoryEntryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveDirectoryEntryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveDirectoryEntryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveDirectoryEntryDefault(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 - } -} - -// NewGetActiveDirectoryEntryOK creates a GetActiveDirectoryEntryOK with default headers values -func NewGetActiveDirectoryEntryOK() *GetActiveDirectoryEntryOK { - return &GetActiveDirectoryEntryOK{} -} - -/* -GetActiveDirectoryEntryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveDirectoryEntryOK struct { - Payload []*models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this get active directory entry o k response has a 2xx status code -func (o *GetActiveDirectoryEntryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active directory entry o k response has a 3xx status code -func (o *GetActiveDirectoryEntryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active directory entry o k response has a 4xx status code -func (o *GetActiveDirectoryEntryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active directory entry o k response has a 5xx status code -func (o *GetActiveDirectoryEntryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active directory entry o k response a status code equal to that given -func (o *GetActiveDirectoryEntryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active directory entry o k response -func (o *GetActiveDirectoryEntryOK) Code() int { - return 200 -} - -func (o *GetActiveDirectoryEntryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory][%d] getActiveDirectoryEntryOK %s", 200, payload) -} - -func (o *GetActiveDirectoryEntryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory][%d] getActiveDirectoryEntryOK %s", 200, payload) -} - -func (o *GetActiveDirectoryEntryOK) GetPayload() []*models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *GetActiveDirectoryEntryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveDirectoryEntryDefault creates a GetActiveDirectoryEntryDefault with default headers values -func NewGetActiveDirectoryEntryDefault(code int) *GetActiveDirectoryEntryDefault { - return &GetActiveDirectoryEntryDefault{ - _statusCode: code, - } -} - -/* -GetActiveDirectoryEntryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveDirectoryEntryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get active directory entry default response has a 2xx status code -func (o *GetActiveDirectoryEntryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active directory entry default response has a 3xx status code -func (o *GetActiveDirectoryEntryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active directory entry default response has a 4xx status code -func (o *GetActiveDirectoryEntryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active directory entry default response has a 5xx status code -func (o *GetActiveDirectoryEntryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active directory entry default response a status code equal to that given -func (o *GetActiveDirectoryEntryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active directory entry default response -func (o *GetActiveDirectoryEntryDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveDirectoryEntryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory][%d] GetActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryEntryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory][%d] GetActiveDirectoryEntry default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryEntryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetActiveDirectoryEntryDefault) 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/active_directory/list_centrify_zones_parameters.go b/v1/client/active_directory/list_centrify_zones_parameters.go deleted file mode 100644 index c1266481..00000000 --- a/v1/client/active_directory/list_centrify_zones_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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" -) - -// NewListCentrifyZonesParams creates a new ListCentrifyZonesParams 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 NewListCentrifyZonesParams() *ListCentrifyZonesParams { - return &ListCentrifyZonesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListCentrifyZonesParamsWithTimeout creates a new ListCentrifyZonesParams object -// with the ability to set a timeout on a request. -func NewListCentrifyZonesParamsWithTimeout(timeout time.Duration) *ListCentrifyZonesParams { - return &ListCentrifyZonesParams{ - timeout: timeout, - } -} - -// NewListCentrifyZonesParamsWithContext creates a new ListCentrifyZonesParams object -// with the ability to set a context for a request. -func NewListCentrifyZonesParamsWithContext(ctx context.Context) *ListCentrifyZonesParams { - return &ListCentrifyZonesParams{ - Context: ctx, - } -} - -// NewListCentrifyZonesParamsWithHTTPClient creates a new ListCentrifyZonesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListCentrifyZonesParamsWithHTTPClient(client *http.Client) *ListCentrifyZonesParams { - return &ListCentrifyZonesParams{ - HTTPClient: client, - } -} - -/* -ListCentrifyZonesParams contains all the parameters to send to the API endpoint - - for the list centrify zones operation. - - Typically these are written to a http.Request. -*/ -type ListCentrifyZonesParams struct { - - /* DomainName. - - Specifies the fully qualified domain name (FQDN) of an Active Directory. - */ - DomainName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list centrify zones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListCentrifyZonesParams) WithDefaults() *ListCentrifyZonesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list centrify zones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListCentrifyZonesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list centrify zones params -func (o *ListCentrifyZonesParams) WithTimeout(timeout time.Duration) *ListCentrifyZonesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list centrify zones params -func (o *ListCentrifyZonesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list centrify zones params -func (o *ListCentrifyZonesParams) WithContext(ctx context.Context) *ListCentrifyZonesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list centrify zones params -func (o *ListCentrifyZonesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list centrify zones params -func (o *ListCentrifyZonesParams) WithHTTPClient(client *http.Client) *ListCentrifyZonesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list centrify zones params -func (o *ListCentrifyZonesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainName adds the domainName to the list centrify zones params -func (o *ListCentrifyZonesParams) WithDomainName(domainName *string) *ListCentrifyZonesParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the list centrify zones params -func (o *ListCentrifyZonesParams) SetDomainName(domainName *string) { - o.DomainName = domainName -} - -// WriteToRequest writes these params to a swagger request -func (o *ListCentrifyZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DomainName != nil { - - // query param domainName - var qrDomainName string - - if o.DomainName != nil { - qrDomainName = *o.DomainName - } - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/list_centrify_zones_responses.go b/v1/client/active_directory/list_centrify_zones_responses.go deleted file mode 100644 index 89ad27af..00000000 --- a/v1/client/active_directory/list_centrify_zones_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListCentrifyZonesReader is a Reader for the ListCentrifyZones structure. -type ListCentrifyZonesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListCentrifyZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListCentrifyZonesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListCentrifyZonesDefault(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 - } -} - -// NewListCentrifyZonesOK creates a ListCentrifyZonesOK with default headers values -func NewListCentrifyZonesOK() *ListCentrifyZonesOK { - return &ListCentrifyZonesOK{} -} - -/* -ListCentrifyZonesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListCentrifyZonesOK struct { - Payload []*models.ListCentrifyZone -} - -// IsSuccess returns true when this list centrify zones o k response has a 2xx status code -func (o *ListCentrifyZonesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list centrify zones o k response has a 3xx status code -func (o *ListCentrifyZonesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list centrify zones o k response has a 4xx status code -func (o *ListCentrifyZonesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list centrify zones o k response has a 5xx status code -func (o *ListCentrifyZonesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list centrify zones o k response a status code equal to that given -func (o *ListCentrifyZonesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list centrify zones o k response -func (o *ListCentrifyZonesOK) Code() int { - return 200 -} - -func (o *ListCentrifyZonesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/centrifyZones][%d] listCentrifyZonesOK %s", 200, payload) -} - -func (o *ListCentrifyZonesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/centrifyZones][%d] listCentrifyZonesOK %s", 200, payload) -} - -func (o *ListCentrifyZonesOK) GetPayload() []*models.ListCentrifyZone { - return o.Payload -} - -func (o *ListCentrifyZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListCentrifyZonesDefault creates a ListCentrifyZonesDefault with default headers values -func NewListCentrifyZonesDefault(code int) *ListCentrifyZonesDefault { - return &ListCentrifyZonesDefault{ - _statusCode: code, - } -} - -/* -ListCentrifyZonesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListCentrifyZonesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list centrify zones default response has a 2xx status code -func (o *ListCentrifyZonesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list centrify zones default response has a 3xx status code -func (o *ListCentrifyZonesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list centrify zones default response has a 4xx status code -func (o *ListCentrifyZonesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list centrify zones default response has a 5xx status code -func (o *ListCentrifyZonesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list centrify zones default response a status code equal to that given -func (o *ListCentrifyZonesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list centrify zones default response -func (o *ListCentrifyZonesDefault) Code() int { - return o._statusCode -} - -func (o *ListCentrifyZonesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/centrifyZones][%d] ListCentrifyZones default %s", o._statusCode, payload) -} - -func (o *ListCentrifyZonesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/centrifyZones][%d] ListCentrifyZones default %s", o._statusCode, payload) -} - -func (o *ListCentrifyZonesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListCentrifyZonesDefault) 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/active_directory/search_active_directory_principals_parameters.go b/v1/client/active_directory/search_active_directory_principals_parameters.go deleted file mode 100644 index e29059e1..00000000 --- a/v1/client/active_directory/search_active_directory_principals_parameters.go +++ /dev/null @@ -1,364 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewSearchActiveDirectoryPrincipalsParams creates a new SearchActiveDirectoryPrincipalsParams 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 NewSearchActiveDirectoryPrincipalsParams() *SearchActiveDirectoryPrincipalsParams { - return &SearchActiveDirectoryPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchActiveDirectoryPrincipalsParamsWithTimeout creates a new SearchActiveDirectoryPrincipalsParams object -// with the ability to set a timeout on a request. -func NewSearchActiveDirectoryPrincipalsParamsWithTimeout(timeout time.Duration) *SearchActiveDirectoryPrincipalsParams { - return &SearchActiveDirectoryPrincipalsParams{ - timeout: timeout, - } -} - -// NewSearchActiveDirectoryPrincipalsParamsWithContext creates a new SearchActiveDirectoryPrincipalsParams object -// with the ability to set a context for a request. -func NewSearchActiveDirectoryPrincipalsParamsWithContext(ctx context.Context) *SearchActiveDirectoryPrincipalsParams { - return &SearchActiveDirectoryPrincipalsParams{ - Context: ctx, - } -} - -// NewSearchActiveDirectoryPrincipalsParamsWithHTTPClient creates a new SearchActiveDirectoryPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchActiveDirectoryPrincipalsParamsWithHTTPClient(client *http.Client) *SearchActiveDirectoryPrincipalsParams { - return &SearchActiveDirectoryPrincipalsParams{ - HTTPClient: client, - } -} - -/* -SearchActiveDirectoryPrincipalsParams contains all the parameters to send to the API endpoint - - for the search active directory principals operation. - - Typically these are written to a http.Request. -*/ -type SearchActiveDirectoryPrincipalsParams struct { - - /* Domain. - - Specifies the domain name of the principals to search. If specified - the principals in that domain are searched. Domain could be an - Active Directory domain joined by the Cluster or any one of the - trusted domains of the Active Directory domain or the LOCAL domain. - If not specified, all the domains are searched. - */ - Domain *string - - /* IncludeComputers. - - Specifies if Computer/GMSA accounts need to be included in this search. - */ - IncludeComputers *bool - - /* IncludeServiceAccounts. - - Specifies if service accouns should be included in the search result. - This field is true by default. - */ - IncludeServiceAccounts *bool - - /* ObjectClass. - - Optionally filter by a principal object class such as 'kGroup' or 'kUser'. - If 'kGroup' is specified, only group principals are returned. - If 'kUser' is specified, only user principals are returned. - If not specified, both group and user principals are returned. - 'kUser' specifies a user object class. - 'kGroup' specifies a group object class. - 'kComputer' specifies a computer object class. - 'kWellKnownPrincipal' specifies a well known principal. - 'kServiceAccount' specifies a service account object class. - */ - ObjectClass *string - - /* Search. - - Optionally filter by matching a substring. Only principals in - the with a name or sAMAccountName that matches - part or all of the specified substring are returned. - If specified, a 'sids' parameter should not be specified. - */ - Search *string - - /* Sids. - - Optionally filter by a list of security identifiers (SIDs) found - in the specified domain. Only principals matching - the specified SIDs are returned. - If specified, a 'search' parameter should not be specified. - */ - Sids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search active directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchActiveDirectoryPrincipalsParams) WithDefaults() *SearchActiveDirectoryPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search active directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchActiveDirectoryPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithTimeout(timeout time.Duration) *SearchActiveDirectoryPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithContext(ctx context.Context) *SearchActiveDirectoryPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithHTTPClient(client *http.Client) *SearchActiveDirectoryPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomain adds the domain to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithDomain(domain *string) *SearchActiveDirectoryPrincipalsParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithIncludeComputers adds the includeComputers to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithIncludeComputers(includeComputers *bool) *SearchActiveDirectoryPrincipalsParams { - o.SetIncludeComputers(includeComputers) - return o -} - -// SetIncludeComputers adds the includeComputers to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetIncludeComputers(includeComputers *bool) { - o.IncludeComputers = includeComputers -} - -// WithIncludeServiceAccounts adds the includeServiceAccounts to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithIncludeServiceAccounts(includeServiceAccounts *bool) *SearchActiveDirectoryPrincipalsParams { - o.SetIncludeServiceAccounts(includeServiceAccounts) - return o -} - -// SetIncludeServiceAccounts adds the includeServiceAccounts to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetIncludeServiceAccounts(includeServiceAccounts *bool) { - o.IncludeServiceAccounts = includeServiceAccounts -} - -// WithObjectClass adds the objectClass to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithObjectClass(objectClass *string) *SearchActiveDirectoryPrincipalsParams { - o.SetObjectClass(objectClass) - return o -} - -// SetObjectClass adds the objectClass to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetObjectClass(objectClass *string) { - o.ObjectClass = objectClass -} - -// WithSearch adds the search to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithSearch(search *string) *SearchActiveDirectoryPrincipalsParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetSearch(search *string) { - o.Search = search -} - -// WithSids adds the sids to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) WithSids(sids []string) *SearchActiveDirectoryPrincipalsParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the search active directory principals params -func (o *SearchActiveDirectoryPrincipalsParams) SetSids(sids []string) { - o.Sids = sids -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchActiveDirectoryPrincipalsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.IncludeComputers != nil { - - // query param includeComputers - var qrIncludeComputers bool - - if o.IncludeComputers != nil { - qrIncludeComputers = *o.IncludeComputers - } - qIncludeComputers := swag.FormatBool(qrIncludeComputers) - if qIncludeComputers != "" { - - if err := r.SetQueryParam("includeComputers", qIncludeComputers); err != nil { - return err - } - } - } - - if o.IncludeServiceAccounts != nil { - - // query param includeServiceAccounts - var qrIncludeServiceAccounts bool - - if o.IncludeServiceAccounts != nil { - qrIncludeServiceAccounts = *o.IncludeServiceAccounts - } - qIncludeServiceAccounts := swag.FormatBool(qrIncludeServiceAccounts) - if qIncludeServiceAccounts != "" { - - if err := r.SetQueryParam("includeServiceAccounts", qIncludeServiceAccounts); err != nil { - return err - } - } - } - - if o.ObjectClass != nil { - - // query param objectClass - var qrObjectClass string - - if o.ObjectClass != nil { - qrObjectClass = *o.ObjectClass - } - qObjectClass := qrObjectClass - if qObjectClass != "" { - - if err := r.SetQueryParam("objectClass", qObjectClass); err != nil { - return err - } - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchActiveDirectoryPrincipals binds the parameter sids -func (o *SearchActiveDirectoryPrincipalsParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} diff --git a/v1/client/active_directory/search_active_directory_principals_responses.go b/v1/client/active_directory/search_active_directory_principals_responses.go deleted file mode 100644 index 6e940c00..00000000 --- a/v1/client/active_directory/search_active_directory_principals_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchActiveDirectoryPrincipalsReader is a Reader for the SearchActiveDirectoryPrincipals structure. -type SearchActiveDirectoryPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchActiveDirectoryPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchActiveDirectoryPrincipalsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchActiveDirectoryPrincipalsDefault(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 - } -} - -// NewSearchActiveDirectoryPrincipalsOK creates a SearchActiveDirectoryPrincipalsOK with default headers values -func NewSearchActiveDirectoryPrincipalsOK() *SearchActiveDirectoryPrincipalsOK { - return &SearchActiveDirectoryPrincipalsOK{} -} - -/* -SearchActiveDirectoryPrincipalsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchActiveDirectoryPrincipalsOK struct { - Payload []*models.ActiveDirectoryPrincipal -} - -// IsSuccess returns true when this search active directory principals o k response has a 2xx status code -func (o *SearchActiveDirectoryPrincipalsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search active directory principals o k response has a 3xx status code -func (o *SearchActiveDirectoryPrincipalsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search active directory principals o k response has a 4xx status code -func (o *SearchActiveDirectoryPrincipalsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search active directory principals o k response has a 5xx status code -func (o *SearchActiveDirectoryPrincipalsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search active directory principals o k response a status code equal to that given -func (o *SearchActiveDirectoryPrincipalsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search active directory principals o k response -func (o *SearchActiveDirectoryPrincipalsOK) Code() int { - return 200 -} - -func (o *SearchActiveDirectoryPrincipalsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/principals][%d] searchActiveDirectoryPrincipalsOK %s", 200, payload) -} - -func (o *SearchActiveDirectoryPrincipalsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/principals][%d] searchActiveDirectoryPrincipalsOK %s", 200, payload) -} - -func (o *SearchActiveDirectoryPrincipalsOK) GetPayload() []*models.ActiveDirectoryPrincipal { - return o.Payload -} - -func (o *SearchActiveDirectoryPrincipalsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchActiveDirectoryPrincipalsDefault creates a SearchActiveDirectoryPrincipalsDefault with default headers values -func NewSearchActiveDirectoryPrincipalsDefault(code int) *SearchActiveDirectoryPrincipalsDefault { - return &SearchActiveDirectoryPrincipalsDefault{ - _statusCode: code, - } -} - -/* -SearchActiveDirectoryPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchActiveDirectoryPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search active directory principals default response has a 2xx status code -func (o *SearchActiveDirectoryPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search active directory principals default response has a 3xx status code -func (o *SearchActiveDirectoryPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search active directory principals default response has a 4xx status code -func (o *SearchActiveDirectoryPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search active directory principals default response has a 5xx status code -func (o *SearchActiveDirectoryPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search active directory principals default response a status code equal to that given -func (o *SearchActiveDirectoryPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search active directory principals default response -func (o *SearchActiveDirectoryPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *SearchActiveDirectoryPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/principals][%d] SearchActiveDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *SearchActiveDirectoryPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/activeDirectory/principals][%d] SearchActiveDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *SearchActiveDirectoryPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchActiveDirectoryPrincipalsDefault) 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/active_directory/update_active_directory_id_mapping_parameters.go b/v1/client/active_directory/update_active_directory_id_mapping_parameters.go deleted file mode 100644 index 87562dcb..00000000 --- a/v1/client/active_directory/update_active_directory_id_mapping_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateActiveDirectoryIDMappingParams creates a new UpdateActiveDirectoryIDMappingParams 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 NewUpdateActiveDirectoryIDMappingParams() *UpdateActiveDirectoryIDMappingParams { - return &UpdateActiveDirectoryIDMappingParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateActiveDirectoryIDMappingParamsWithTimeout creates a new UpdateActiveDirectoryIDMappingParams object -// with the ability to set a timeout on a request. -func NewUpdateActiveDirectoryIDMappingParamsWithTimeout(timeout time.Duration) *UpdateActiveDirectoryIDMappingParams { - return &UpdateActiveDirectoryIDMappingParams{ - timeout: timeout, - } -} - -// NewUpdateActiveDirectoryIDMappingParamsWithContext creates a new UpdateActiveDirectoryIDMappingParams object -// with the ability to set a context for a request. -func NewUpdateActiveDirectoryIDMappingParamsWithContext(ctx context.Context) *UpdateActiveDirectoryIDMappingParams { - return &UpdateActiveDirectoryIDMappingParams{ - Context: ctx, - } -} - -// NewUpdateActiveDirectoryIDMappingParamsWithHTTPClient creates a new UpdateActiveDirectoryIDMappingParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateActiveDirectoryIDMappingParamsWithHTTPClient(client *http.Client) *UpdateActiveDirectoryIDMappingParams { - return &UpdateActiveDirectoryIDMappingParams{ - HTTPClient: client, - } -} - -/* -UpdateActiveDirectoryIDMappingParams contains all the parameters to send to the API endpoint - - for the update active directory Id mapping operation. - - Typically these are written to a http.Request. -*/ -type UpdateActiveDirectoryIDMappingParams struct { - - /* Body. - - Request to update user id mapping of an Active Directory. - */ - Body *models.IDMappingInfo - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update active directory Id mapping params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryIDMappingParams) WithDefaults() *UpdateActiveDirectoryIDMappingParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update active directory Id mapping params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryIDMappingParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) WithTimeout(timeout time.Duration) *UpdateActiveDirectoryIDMappingParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) WithContext(ctx context.Context) *UpdateActiveDirectoryIDMappingParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) WithHTTPClient(client *http.Client) *UpdateActiveDirectoryIDMappingParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) WithBody(body *models.IDMappingInfo) *UpdateActiveDirectoryIDMappingParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) SetBody(body *models.IDMappingInfo) { - o.Body = body -} - -// WithName adds the name to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) WithName(name string) *UpdateActiveDirectoryIDMappingParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update active directory Id mapping params -func (o *UpdateActiveDirectoryIDMappingParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateActiveDirectoryIDMappingParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/update_active_directory_id_mapping_responses.go b/v1/client/active_directory/update_active_directory_id_mapping_responses.go deleted file mode 100644 index f2e61375..00000000 --- a/v1/client/active_directory/update_active_directory_id_mapping_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateActiveDirectoryIDMappingReader is a Reader for the UpdateActiveDirectoryIDMapping structure. -type UpdateActiveDirectoryIDMappingReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateActiveDirectoryIDMappingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateActiveDirectoryIDMappingOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateActiveDirectoryIDMappingDefault(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 - } -} - -// NewUpdateActiveDirectoryIDMappingOK creates a UpdateActiveDirectoryIDMappingOK with default headers values -func NewUpdateActiveDirectoryIDMappingOK() *UpdateActiveDirectoryIDMappingOK { - return &UpdateActiveDirectoryIDMappingOK{} -} - -/* -UpdateActiveDirectoryIDMappingOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateActiveDirectoryIDMappingOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this update active directory Id mapping o k response has a 2xx status code -func (o *UpdateActiveDirectoryIDMappingOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update active directory Id mapping o k response has a 3xx status code -func (o *UpdateActiveDirectoryIDMappingOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update active directory Id mapping o k response has a 4xx status code -func (o *UpdateActiveDirectoryIDMappingOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update active directory Id mapping o k response has a 5xx status code -func (o *UpdateActiveDirectoryIDMappingOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update active directory Id mapping o k response a status code equal to that given -func (o *UpdateActiveDirectoryIDMappingOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update active directory Id mapping o k response -func (o *UpdateActiveDirectoryIDMappingOK) Code() int { - return 200 -} - -func (o *UpdateActiveDirectoryIDMappingOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/idMappingInfo][%d] updateActiveDirectoryIdMappingOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryIDMappingOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/idMappingInfo][%d] updateActiveDirectoryIdMappingOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryIDMappingOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *UpdateActiveDirectoryIDMappingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateActiveDirectoryIDMappingDefault creates a UpdateActiveDirectoryIDMappingDefault with default headers values -func NewUpdateActiveDirectoryIDMappingDefault(code int) *UpdateActiveDirectoryIDMappingDefault { - return &UpdateActiveDirectoryIDMappingDefault{ - _statusCode: code, - } -} - -/* -UpdateActiveDirectoryIDMappingDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateActiveDirectoryIDMappingDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update active directory Id mapping default response has a 2xx status code -func (o *UpdateActiveDirectoryIDMappingDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update active directory Id mapping default response has a 3xx status code -func (o *UpdateActiveDirectoryIDMappingDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update active directory Id mapping default response has a 4xx status code -func (o *UpdateActiveDirectoryIDMappingDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update active directory Id mapping default response has a 5xx status code -func (o *UpdateActiveDirectoryIDMappingDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update active directory Id mapping default response a status code equal to that given -func (o *UpdateActiveDirectoryIDMappingDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update active directory Id mapping default response -func (o *UpdateActiveDirectoryIDMappingDefault) Code() int { - return o._statusCode -} - -func (o *UpdateActiveDirectoryIDMappingDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/idMappingInfo][%d] UpdateActiveDirectoryIdMapping default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryIDMappingDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/idMappingInfo][%d] UpdateActiveDirectoryIdMapping default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryIDMappingDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateActiveDirectoryIDMappingDefault) 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/active_directory/update_active_directory_ignored_trusted_domains_parameters.go b/v1/client/active_directory/update_active_directory_ignored_trusted_domains_parameters.go deleted file mode 100644 index 6302f002..00000000 --- a/v1/client/active_directory/update_active_directory_ignored_trusted_domains_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsParams creates a new UpdateActiveDirectoryIgnoredTrustedDomainsParams 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 NewUpdateActiveDirectoryIgnoredTrustedDomainsParams() *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - return &UpdateActiveDirectoryIgnoredTrustedDomainsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithTimeout creates a new UpdateActiveDirectoryIgnoredTrustedDomainsParams object -// with the ability to set a timeout on a request. -func NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithTimeout(timeout time.Duration) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - return &UpdateActiveDirectoryIgnoredTrustedDomainsParams{ - timeout: timeout, - } -} - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithContext creates a new UpdateActiveDirectoryIgnoredTrustedDomainsParams object -// with the ability to set a context for a request. -func NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithContext(ctx context.Context) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - return &UpdateActiveDirectoryIgnoredTrustedDomainsParams{ - Context: ctx, - } -} - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithHTTPClient creates a new UpdateActiveDirectoryIgnoredTrustedDomainsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateActiveDirectoryIgnoredTrustedDomainsParamsWithHTTPClient(client *http.Client) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - return &UpdateActiveDirectoryIgnoredTrustedDomainsParams{ - HTTPClient: client, - } -} - -/* -UpdateActiveDirectoryIgnoredTrustedDomainsParams contains all the parameters to send to the API endpoint - - for the update active directory ignored trusted domains operation. - - Typically these are written to a http.Request. -*/ -type UpdateActiveDirectoryIgnoredTrustedDomainsParams struct { - - /* Body. - - Request to update the list of ignored trusted domains of an AD. - */ - Body *models.UpdateIgnoredTrustedDomainsParams - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update active directory ignored trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithDefaults() *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update active directory ignored trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithTimeout(timeout time.Duration) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithContext(ctx context.Context) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithHTTPClient(client *http.Client) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithBody(body *models.UpdateIgnoredTrustedDomainsParams) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetBody(body *models.UpdateIgnoredTrustedDomainsParams) { - o.Body = body -} - -// WithName adds the name to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) WithName(name string) *UpdateActiveDirectoryIgnoredTrustedDomainsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update active directory ignored trusted domains params -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/update_active_directory_ignored_trusted_domains_responses.go b/v1/client/active_directory/update_active_directory_ignored_trusted_domains_responses.go deleted file mode 100644 index 8deea7e9..00000000 --- a/v1/client/active_directory/update_active_directory_ignored_trusted_domains_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateActiveDirectoryIgnoredTrustedDomainsReader is a Reader for the UpdateActiveDirectoryIgnoredTrustedDomains structure. -type UpdateActiveDirectoryIgnoredTrustedDomainsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateActiveDirectoryIgnoredTrustedDomainsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateActiveDirectoryIgnoredTrustedDomainsDefault(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 - } -} - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsOK creates a UpdateActiveDirectoryIgnoredTrustedDomainsOK with default headers values -func NewUpdateActiveDirectoryIgnoredTrustedDomainsOK() *UpdateActiveDirectoryIgnoredTrustedDomainsOK { - return &UpdateActiveDirectoryIgnoredTrustedDomainsOK{} -} - -/* -UpdateActiveDirectoryIgnoredTrustedDomainsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateActiveDirectoryIgnoredTrustedDomainsOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this update active directory ignored trusted domains o k response has a 2xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update active directory ignored trusted domains o k response has a 3xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update active directory ignored trusted domains o k response has a 4xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update active directory ignored trusted domains o k response has a 5xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update active directory ignored trusted domains o k response a status code equal to that given -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update active directory ignored trusted domains o k response -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) Code() int { - return 200 -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ignoredTrustedDomains][%d] updateActiveDirectoryIgnoredTrustedDomainsOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ignoredTrustedDomains][%d] updateActiveDirectoryIgnoredTrustedDomainsOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateActiveDirectoryIgnoredTrustedDomainsDefault creates a UpdateActiveDirectoryIgnoredTrustedDomainsDefault with default headers values -func NewUpdateActiveDirectoryIgnoredTrustedDomainsDefault(code int) *UpdateActiveDirectoryIgnoredTrustedDomainsDefault { - return &UpdateActiveDirectoryIgnoredTrustedDomainsDefault{ - _statusCode: code, - } -} - -/* -UpdateActiveDirectoryIgnoredTrustedDomainsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateActiveDirectoryIgnoredTrustedDomainsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update active directory ignored trusted domains default response has a 2xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update active directory ignored trusted domains default response has a 3xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update active directory ignored trusted domains default response has a 4xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update active directory ignored trusted domains default response has a 5xx status code -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update active directory ignored trusted domains default response a status code equal to that given -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update active directory ignored trusted domains default response -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ignoredTrustedDomains][%d] UpdateActiveDirectoryIgnoredTrustedDomains default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ignoredTrustedDomains][%d] UpdateActiveDirectoryIgnoredTrustedDomains default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateActiveDirectoryIgnoredTrustedDomainsDefault) 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/active_directory/update_active_directory_ldap_provider_parameters.go b/v1/client/active_directory/update_active_directory_ldap_provider_parameters.go deleted file mode 100644 index b6fd67b8..00000000 --- a/v1/client/active_directory/update_active_directory_ldap_provider_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateActiveDirectoryLdapProviderParams creates a new UpdateActiveDirectoryLdapProviderParams 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 NewUpdateActiveDirectoryLdapProviderParams() *UpdateActiveDirectoryLdapProviderParams { - return &UpdateActiveDirectoryLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateActiveDirectoryLdapProviderParamsWithTimeout creates a new UpdateActiveDirectoryLdapProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateActiveDirectoryLdapProviderParamsWithTimeout(timeout time.Duration) *UpdateActiveDirectoryLdapProviderParams { - return &UpdateActiveDirectoryLdapProviderParams{ - timeout: timeout, - } -} - -// NewUpdateActiveDirectoryLdapProviderParamsWithContext creates a new UpdateActiveDirectoryLdapProviderParams object -// with the ability to set a context for a request. -func NewUpdateActiveDirectoryLdapProviderParamsWithContext(ctx context.Context) *UpdateActiveDirectoryLdapProviderParams { - return &UpdateActiveDirectoryLdapProviderParams{ - Context: ctx, - } -} - -// NewUpdateActiveDirectoryLdapProviderParamsWithHTTPClient creates a new UpdateActiveDirectoryLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateActiveDirectoryLdapProviderParamsWithHTTPClient(client *http.Client) *UpdateActiveDirectoryLdapProviderParams { - return &UpdateActiveDirectoryLdapProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateActiveDirectoryLdapProviderParams contains all the parameters to send to the API endpoint - - for the update active directory ldap provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateActiveDirectoryLdapProviderParams struct { - - /* Body. - - Request to update the LDAP provider info. - */ - Body *models.UpdateLdapProviderParams - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update active directory ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryLdapProviderParams) WithDefaults() *UpdateActiveDirectoryLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update active directory ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) WithTimeout(timeout time.Duration) *UpdateActiveDirectoryLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) WithContext(ctx context.Context) *UpdateActiveDirectoryLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) WithHTTPClient(client *http.Client) *UpdateActiveDirectoryLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) WithBody(body *models.UpdateLdapProviderParams) *UpdateActiveDirectoryLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) SetBody(body *models.UpdateLdapProviderParams) { - o.Body = body -} - -// WithName adds the name to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) WithName(name string) *UpdateActiveDirectoryLdapProviderParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update active directory ldap provider params -func (o *UpdateActiveDirectoryLdapProviderParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateActiveDirectoryLdapProviderParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/update_active_directory_ldap_provider_responses.go b/v1/client/active_directory/update_active_directory_ldap_provider_responses.go deleted file mode 100644 index 96b90641..00000000 --- a/v1/client/active_directory/update_active_directory_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateActiveDirectoryLdapProviderReader is a Reader for the UpdateActiveDirectoryLdapProvider structure. -type UpdateActiveDirectoryLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateActiveDirectoryLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateActiveDirectoryLdapProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateActiveDirectoryLdapProviderDefault(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 - } -} - -// NewUpdateActiveDirectoryLdapProviderOK creates a UpdateActiveDirectoryLdapProviderOK with default headers values -func NewUpdateActiveDirectoryLdapProviderOK() *UpdateActiveDirectoryLdapProviderOK { - return &UpdateActiveDirectoryLdapProviderOK{} -} - -/* -UpdateActiveDirectoryLdapProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateActiveDirectoryLdapProviderOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this update active directory ldap provider o k response has a 2xx status code -func (o *UpdateActiveDirectoryLdapProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update active directory ldap provider o k response has a 3xx status code -func (o *UpdateActiveDirectoryLdapProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update active directory ldap provider o k response has a 4xx status code -func (o *UpdateActiveDirectoryLdapProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update active directory ldap provider o k response has a 5xx status code -func (o *UpdateActiveDirectoryLdapProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update active directory ldap provider o k response a status code equal to that given -func (o *UpdateActiveDirectoryLdapProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update active directory ldap provider o k response -func (o *UpdateActiveDirectoryLdapProviderOK) Code() int { - return 200 -} - -func (o *UpdateActiveDirectoryLdapProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ldapProvider][%d] updateActiveDirectoryLdapProviderOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryLdapProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ldapProvider][%d] updateActiveDirectoryLdapProviderOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryLdapProviderOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *UpdateActiveDirectoryLdapProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateActiveDirectoryLdapProviderDefault creates a UpdateActiveDirectoryLdapProviderDefault with default headers values -func NewUpdateActiveDirectoryLdapProviderDefault(code int) *UpdateActiveDirectoryLdapProviderDefault { - return &UpdateActiveDirectoryLdapProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateActiveDirectoryLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateActiveDirectoryLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update active directory ldap provider default response has a 2xx status code -func (o *UpdateActiveDirectoryLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update active directory ldap provider default response has a 3xx status code -func (o *UpdateActiveDirectoryLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update active directory ldap provider default response has a 4xx status code -func (o *UpdateActiveDirectoryLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update active directory ldap provider default response has a 5xx status code -func (o *UpdateActiveDirectoryLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update active directory ldap provider default response a status code equal to that given -func (o *UpdateActiveDirectoryLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update active directory ldap provider default response -func (o *UpdateActiveDirectoryLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateActiveDirectoryLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ldapProvider][%d] UpdateActiveDirectoryLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/ldapProvider][%d] UpdateActiveDirectoryLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateActiveDirectoryLdapProviderDefault) 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/active_directory/update_active_directory_machine_accounts_parameters.go b/v1/client/active_directory/update_active_directory_machine_accounts_parameters.go deleted file mode 100644 index 3b62d6ad..00000000 --- a/v1/client/active_directory/update_active_directory_machine_accounts_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateActiveDirectoryMachineAccountsParams creates a new UpdateActiveDirectoryMachineAccountsParams 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 NewUpdateActiveDirectoryMachineAccountsParams() *UpdateActiveDirectoryMachineAccountsParams { - return &UpdateActiveDirectoryMachineAccountsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateActiveDirectoryMachineAccountsParamsWithTimeout creates a new UpdateActiveDirectoryMachineAccountsParams object -// with the ability to set a timeout on a request. -func NewUpdateActiveDirectoryMachineAccountsParamsWithTimeout(timeout time.Duration) *UpdateActiveDirectoryMachineAccountsParams { - return &UpdateActiveDirectoryMachineAccountsParams{ - timeout: timeout, - } -} - -// NewUpdateActiveDirectoryMachineAccountsParamsWithContext creates a new UpdateActiveDirectoryMachineAccountsParams object -// with the ability to set a context for a request. -func NewUpdateActiveDirectoryMachineAccountsParamsWithContext(ctx context.Context) *UpdateActiveDirectoryMachineAccountsParams { - return &UpdateActiveDirectoryMachineAccountsParams{ - Context: ctx, - } -} - -// NewUpdateActiveDirectoryMachineAccountsParamsWithHTTPClient creates a new UpdateActiveDirectoryMachineAccountsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateActiveDirectoryMachineAccountsParamsWithHTTPClient(client *http.Client) *UpdateActiveDirectoryMachineAccountsParams { - return &UpdateActiveDirectoryMachineAccountsParams{ - HTTPClient: client, - } -} - -/* -UpdateActiveDirectoryMachineAccountsParams contains all the parameters to send to the API endpoint - - for the update active directory machine accounts operation. - - Typically these are written to a http.Request. -*/ -type UpdateActiveDirectoryMachineAccountsParams struct { - - /* Body. - - Request to update machine accounts of an Active Directory. - */ - Body *models.UpdateMachineAccountsParams - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update active directory machine accounts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryMachineAccountsParams) WithDefaults() *UpdateActiveDirectoryMachineAccountsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update active directory machine accounts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryMachineAccountsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) WithTimeout(timeout time.Duration) *UpdateActiveDirectoryMachineAccountsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) WithContext(ctx context.Context) *UpdateActiveDirectoryMachineAccountsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) WithHTTPClient(client *http.Client) *UpdateActiveDirectoryMachineAccountsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) WithBody(body *models.UpdateMachineAccountsParams) *UpdateActiveDirectoryMachineAccountsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) SetBody(body *models.UpdateMachineAccountsParams) { - o.Body = body -} - -// WithName adds the name to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) WithName(name string) *UpdateActiveDirectoryMachineAccountsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update active directory machine accounts params -func (o *UpdateActiveDirectoryMachineAccountsParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateActiveDirectoryMachineAccountsParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/update_active_directory_machine_accounts_responses.go b/v1/client/active_directory/update_active_directory_machine_accounts_responses.go deleted file mode 100644 index b138d76e..00000000 --- a/v1/client/active_directory/update_active_directory_machine_accounts_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateActiveDirectoryMachineAccountsReader is a Reader for the UpdateActiveDirectoryMachineAccounts structure. -type UpdateActiveDirectoryMachineAccountsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateActiveDirectoryMachineAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateActiveDirectoryMachineAccountsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateActiveDirectoryMachineAccountsDefault(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 - } -} - -// NewUpdateActiveDirectoryMachineAccountsOK creates a UpdateActiveDirectoryMachineAccountsOK with default headers values -func NewUpdateActiveDirectoryMachineAccountsOK() *UpdateActiveDirectoryMachineAccountsOK { - return &UpdateActiveDirectoryMachineAccountsOK{} -} - -/* -UpdateActiveDirectoryMachineAccountsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateActiveDirectoryMachineAccountsOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this update active directory machine accounts o k response has a 2xx status code -func (o *UpdateActiveDirectoryMachineAccountsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update active directory machine accounts o k response has a 3xx status code -func (o *UpdateActiveDirectoryMachineAccountsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update active directory machine accounts o k response has a 4xx status code -func (o *UpdateActiveDirectoryMachineAccountsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update active directory machine accounts o k response has a 5xx status code -func (o *UpdateActiveDirectoryMachineAccountsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update active directory machine accounts o k response a status code equal to that given -func (o *UpdateActiveDirectoryMachineAccountsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update active directory machine accounts o k response -func (o *UpdateActiveDirectoryMachineAccountsOK) Code() int { - return 200 -} - -func (o *UpdateActiveDirectoryMachineAccountsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/machineAccounts][%d] updateActiveDirectoryMachineAccountsOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryMachineAccountsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/machineAccounts][%d] updateActiveDirectoryMachineAccountsOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryMachineAccountsOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *UpdateActiveDirectoryMachineAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateActiveDirectoryMachineAccountsDefault creates a UpdateActiveDirectoryMachineAccountsDefault with default headers values -func NewUpdateActiveDirectoryMachineAccountsDefault(code int) *UpdateActiveDirectoryMachineAccountsDefault { - return &UpdateActiveDirectoryMachineAccountsDefault{ - _statusCode: code, - } -} - -/* -UpdateActiveDirectoryMachineAccountsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateActiveDirectoryMachineAccountsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update active directory machine accounts default response has a 2xx status code -func (o *UpdateActiveDirectoryMachineAccountsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update active directory machine accounts default response has a 3xx status code -func (o *UpdateActiveDirectoryMachineAccountsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update active directory machine accounts default response has a 4xx status code -func (o *UpdateActiveDirectoryMachineAccountsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update active directory machine accounts default response has a 5xx status code -func (o *UpdateActiveDirectoryMachineAccountsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update active directory machine accounts default response a status code equal to that given -func (o *UpdateActiveDirectoryMachineAccountsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update active directory machine accounts default response -func (o *UpdateActiveDirectoryMachineAccountsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateActiveDirectoryMachineAccountsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/machineAccounts][%d] UpdateActiveDirectoryMachineAccounts default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryMachineAccountsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/activeDirectory/{name}/machineAccounts][%d] UpdateActiveDirectoryMachineAccounts default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryMachineAccountsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateActiveDirectoryMachineAccountsDefault) 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/active_directory/update_preferred_domain_controllers_parameters.go b/v1/client/active_directory/update_preferred_domain_controllers_parameters.go deleted file mode 100644 index 8aadc0fd..00000000 --- a/v1/client/active_directory/update_preferred_domain_controllers_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdatePreferredDomainControllersParams creates a new UpdatePreferredDomainControllersParams 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 NewUpdatePreferredDomainControllersParams() *UpdatePreferredDomainControllersParams { - return &UpdatePreferredDomainControllersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdatePreferredDomainControllersParamsWithTimeout creates a new UpdatePreferredDomainControllersParams object -// with the ability to set a timeout on a request. -func NewUpdatePreferredDomainControllersParamsWithTimeout(timeout time.Duration) *UpdatePreferredDomainControllersParams { - return &UpdatePreferredDomainControllersParams{ - timeout: timeout, - } -} - -// NewUpdatePreferredDomainControllersParamsWithContext creates a new UpdatePreferredDomainControllersParams object -// with the ability to set a context for a request. -func NewUpdatePreferredDomainControllersParamsWithContext(ctx context.Context) *UpdatePreferredDomainControllersParams { - return &UpdatePreferredDomainControllersParams{ - Context: ctx, - } -} - -// NewUpdatePreferredDomainControllersParamsWithHTTPClient creates a new UpdatePreferredDomainControllersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdatePreferredDomainControllersParamsWithHTTPClient(client *http.Client) *UpdatePreferredDomainControllersParams { - return &UpdatePreferredDomainControllersParams{ - HTTPClient: client, - } -} - -/* -UpdatePreferredDomainControllersParams contains all the parameters to send to the API endpoint - - for the update preferred domain controllers operation. - - Typically these are written to a http.Request. -*/ -type UpdatePreferredDomainControllersParams struct { - - /* Body. - - Request to update preferred domain controllers of an Active Directory. - */ - Body []*models.PreferredDomainController - - /* Name. - - Specifies the Active Directory Domain Name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update preferred domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePreferredDomainControllersParams) WithDefaults() *UpdatePreferredDomainControllersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update preferred domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePreferredDomainControllersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) WithTimeout(timeout time.Duration) *UpdatePreferredDomainControllersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) WithContext(ctx context.Context) *UpdatePreferredDomainControllersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) WithHTTPClient(client *http.Client) *UpdatePreferredDomainControllersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) WithBody(body []*models.PreferredDomainController) *UpdatePreferredDomainControllersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) SetBody(body []*models.PreferredDomainController) { - o.Body = body -} - -// WithName adds the name to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) WithName(name string) *UpdatePreferredDomainControllersParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update preferred domain controllers params -func (o *UpdatePreferredDomainControllersParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdatePreferredDomainControllersParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/active_directory/update_preferred_domain_controllers_responses.go b/v1/client/active_directory/update_preferred_domain_controllers_responses.go deleted file mode 100644 index a02e0cc0..00000000 --- a/v1/client/active_directory/update_preferred_domain_controllers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdatePreferredDomainControllersReader is a Reader for the UpdatePreferredDomainControllers structure. -type UpdatePreferredDomainControllersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdatePreferredDomainControllersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdatePreferredDomainControllersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdatePreferredDomainControllersDefault(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 - } -} - -// NewUpdatePreferredDomainControllersOK creates a UpdatePreferredDomainControllersOK with default headers values -func NewUpdatePreferredDomainControllersOK() *UpdatePreferredDomainControllersOK { - return &UpdatePreferredDomainControllersOK{} -} - -/* -UpdatePreferredDomainControllersOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdatePreferredDomainControllersOK struct { - Payload *models.ActiveDirectoryEntry -} - -// IsSuccess returns true when this update preferred domain controllers o k response has a 2xx status code -func (o *UpdatePreferredDomainControllersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update preferred domain controllers o k response has a 3xx status code -func (o *UpdatePreferredDomainControllersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update preferred domain controllers o k response has a 4xx status code -func (o *UpdatePreferredDomainControllersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update preferred domain controllers o k response has a 5xx status code -func (o *UpdatePreferredDomainControllersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update preferred domain controllers o k response a status code equal to that given -func (o *UpdatePreferredDomainControllersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update preferred domain controllers o k response -func (o *UpdatePreferredDomainControllersOK) Code() int { - return 200 -} - -func (o *UpdatePreferredDomainControllersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/preferredDomainControllers][%d] updatePreferredDomainControllersOK %s", 200, payload) -} - -func (o *UpdatePreferredDomainControllersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/preferredDomainControllers][%d] updatePreferredDomainControllersOK %s", 200, payload) -} - -func (o *UpdatePreferredDomainControllersOK) GetPayload() *models.ActiveDirectoryEntry { - return o.Payload -} - -func (o *UpdatePreferredDomainControllersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectoryEntry) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdatePreferredDomainControllersDefault creates a UpdatePreferredDomainControllersDefault with default headers values -func NewUpdatePreferredDomainControllersDefault(code int) *UpdatePreferredDomainControllersDefault { - return &UpdatePreferredDomainControllersDefault{ - _statusCode: code, - } -} - -/* -UpdatePreferredDomainControllersDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdatePreferredDomainControllersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update preferred domain controllers default response has a 2xx status code -func (o *UpdatePreferredDomainControllersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update preferred domain controllers default response has a 3xx status code -func (o *UpdatePreferredDomainControllersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update preferred domain controllers default response has a 4xx status code -func (o *UpdatePreferredDomainControllersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update preferred domain controllers default response has a 5xx status code -func (o *UpdatePreferredDomainControllersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update preferred domain controllers default response a status code equal to that given -func (o *UpdatePreferredDomainControllersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update preferred domain controllers default response -func (o *UpdatePreferredDomainControllersDefault) Code() int { - return o._statusCode -} - -func (o *UpdatePreferredDomainControllersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/preferredDomainControllers][%d] UpdatePreferredDomainControllers default %s", o._statusCode, payload) -} - -func (o *UpdatePreferredDomainControllersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/activeDirectory/{name}/preferredDomainControllers][%d] UpdatePreferredDomainControllers default %s", o._statusCode, payload) -} - -func (o *UpdatePreferredDomainControllersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdatePreferredDomainControllersDefault) 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/alerts/alerts_client.go b/v1/client/alerts/alerts_client.go deleted file mode 100644 index c674f4f1..00000000 --- a/v1/client/alerts/alerts_client.go +++ /dev/null @@ -1,594 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new alerts API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new alerts API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new alerts API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for alerts API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateNotificationRule(params *CreateNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateNotificationRuleCreated, error) - - CreateResolution(params *CreateResolutionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateResolutionCreated, error) - - DeleteNotificationRule(params *DeleteNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteNotificationRuleNoContent, error) - - GetAlertByID(params *GetAlertByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertByIDOK, error) - - GetAlertCategories(params *GetAlertCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertCategoriesOK, error) - - GetAlertTypes(params *GetAlertTypesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertTypesOK, error) - - GetAlerts(params *GetAlertsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertsOK, error) - - GetNotificationRules(params *GetNotificationRulesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNotificationRulesOK, error) - - GetResolutionByID(params *GetResolutionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResolutionByIDOK, error) - - GetResolutions(params *GetResolutionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResolutionsOK, error) - - UpdateNotificationRule(params *UpdateNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNotificationRuleOK, error) - - UpdateResolution(params *UpdateResolutionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResolutionOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateNotificationRule creates a new alert notification rule - - Creates a new notification rule with provided delivery targets such as email - -addresses and external apis. -*/ -func (a *Client) CreateNotificationRule(params *CreateNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateNotificationRuleCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateNotificationRuleParams() - } - op := &runtime.ClientOperation{ - ID: "CreateNotificationRule", - Method: "POST", - PathPattern: "/public/alertNotificationRules", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateNotificationRuleReader{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.(*CreateNotificationRuleCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateNotificationRuleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateResolution creates an alert resolution - - Create an Alert Resolution and apply it to one or more Alerts. - -Mark the Alerts as resolved. -*/ -func (a *Client) CreateResolution(params *CreateResolutionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateResolutionCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateResolutionParams() - } - op := &runtime.ClientOperation{ - ID: "CreateResolution", - Method: "POST", - PathPattern: "/public/alertResolutions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateResolutionReader{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.(*CreateResolutionCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateResolutionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteNotificationRule deletes an alert notification rule - -Deletes an existing alert notification rule matching the rule id. -*/ -func (a *Client) DeleteNotificationRule(params *DeleteNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteNotificationRuleNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteNotificationRuleParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteNotificationRule", - Method: "DELETE", - PathPattern: "/public/alertNotificationRules/{ruleId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteNotificationRuleReader{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.(*DeleteNotificationRuleNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteNotificationRuleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAlertByID lists details about a single alert - -Returns the Alert object corresponding to the specified id. -*/ -func (a *Client) GetAlertByID(params *GetAlertByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetAlertById", - Method: "GET", - PathPattern: "/public/alerts/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAlertByIDReader{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.(*GetAlertByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAlertByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAlertCategories gets alert categories in the cohesity cluster - -Returns alert categories in Cohesity cluster. -*/ -func (a *Client) GetAlertCategories(params *GetAlertCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertCategoriesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertCategoriesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAlertCategories", - Method: "GET", - PathPattern: "/public/alertCategories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAlertCategoriesReader{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.(*GetAlertCategoriesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAlertCategoriesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetAlertTypes gets registered alerts in the cohesity cluster - - Returns registered alerts in the Cohesity cluster that match the filter - -criteria specified using parameters. If no filter parameters are specified, -all registered alerts in the Cohesity cluster are returned. -*/ -func (a *Client) GetAlertTypes(params *GetAlertTypesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertTypesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertTypesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAlertTypes", - Method: "GET", - PathPattern: "/public/alertTypes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAlertTypesReader{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.(*GetAlertTypesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAlertTypesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetAlerts lists the alerts on the cohesity cluster - - Returns all Alert objects found on the Cohesity Cluster that - -match the filter criteria specified using parameters. -The Cohesity Cluster creates an Alert when a potential problem -is found or when a threshold has been exceeded on the Cohesity Cluster. -If no filter parameters are specified, all Alert objects are returned. -Each object provides details about the Alert such as the Status and Severity. -*/ -func (a *Client) GetAlerts(params *GetAlertsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAlerts", - Method: "GET", - PathPattern: "/public/alerts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAlertsReader{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.(*GetAlertsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAlertsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetNotificationRules gets all alert notification rules - - Gets all alert notification rules containing criteria to deliver notification - -to delivery targets such as email addresses, invoking external apis etc. -*/ -func (a *Client) GetNotificationRules(params *GetNotificationRulesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNotificationRulesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNotificationRulesParams() - } - op := &runtime.ClientOperation{ - ID: "GetNotificationRules", - Method: "GET", - PathPattern: "/public/alertNotificationRules", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNotificationRulesReader{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.(*GetNotificationRulesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNotificationRulesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetResolutionByID lists details about a single alert resolution - - Returns the Alert Resolution object corresponding to passed in Alert - -Resolution Id. -*/ -func (a *Client) GetResolutionByID(params *GetResolutionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResolutionByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetResolutionByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetResolutionById", - Method: "GET", - PathPattern: "/public/alertResolutions/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetResolutionByIDReader{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.(*GetResolutionByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetResolutionByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetResolutions lists the alert resolutions on the cohesity cluster - - Returns all Alert Resolution objects found on the Cohesity Cluster - -that match the filter criteria specified using parameters. -If no filter parameters are specified, -all Alert Resolution objects are returned. -Each object provides details about the Alert Resolution such as -the resolution summary and details. -*/ -func (a *Client) GetResolutions(params *GetResolutionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResolutionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetResolutionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetResolutions", - Method: "GET", - PathPattern: "/public/alertResolutions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetResolutionsReader{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.(*GetResolutionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetResolutionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateNotificationRule updates an existing alert notification rule - - Updates delivery targets such as email addresses and external apis in an - -existing notification rule. -*/ -func (a *Client) UpdateNotificationRule(params *UpdateNotificationRuleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNotificationRuleOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateNotificationRuleParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateNotificationRule", - Method: "PUT", - PathPattern: "/public/alertNotificationRules", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateNotificationRuleReader{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.(*UpdateNotificationRuleOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateNotificationRuleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateResolution applies an existing alert resolution to additional alerts - - Apply an existing Alert Resolution to one or more additional Alerts. - -Mark those additional Alerts as resolved. -*/ -func (a *Client) UpdateResolution(params *UpdateResolutionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResolutionOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateResolutionParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateResolution", - Method: "PUT", - PathPattern: "/public/alertResolutions/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateResolutionReader{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.(*UpdateResolutionOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateResolutionDefault) - 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/alerts/create_notification_rule_parameters.go b/v1/client/alerts/create_notification_rule_parameters.go deleted file mode 100644 index dbff88ec..00000000 --- a/v1/client/alerts/create_notification_rule_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateNotificationRuleParams creates a new CreateNotificationRuleParams 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 NewCreateNotificationRuleParams() *CreateNotificationRuleParams { - return &CreateNotificationRuleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateNotificationRuleParamsWithTimeout creates a new CreateNotificationRuleParams object -// with the ability to set a timeout on a request. -func NewCreateNotificationRuleParamsWithTimeout(timeout time.Duration) *CreateNotificationRuleParams { - return &CreateNotificationRuleParams{ - timeout: timeout, - } -} - -// NewCreateNotificationRuleParamsWithContext creates a new CreateNotificationRuleParams object -// with the ability to set a context for a request. -func NewCreateNotificationRuleParamsWithContext(ctx context.Context) *CreateNotificationRuleParams { - return &CreateNotificationRuleParams{ - Context: ctx, - } -} - -// NewCreateNotificationRuleParamsWithHTTPClient creates a new CreateNotificationRuleParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateNotificationRuleParamsWithHTTPClient(client *http.Client) *CreateNotificationRuleParams { - return &CreateNotificationRuleParams{ - HTTPClient: client, - } -} - -/* -CreateNotificationRuleParams contains all the parameters to send to the API endpoint - - for the create notification rule operation. - - Typically these are written to a http.Request. -*/ -type CreateNotificationRuleParams struct { - - /* Body. - - Create Notification Rule argument. - */ - Body *models.NotificationRule - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateNotificationRuleParams) WithDefaults() *CreateNotificationRuleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateNotificationRuleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create notification rule params -func (o *CreateNotificationRuleParams) WithTimeout(timeout time.Duration) *CreateNotificationRuleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create notification rule params -func (o *CreateNotificationRuleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create notification rule params -func (o *CreateNotificationRuleParams) WithContext(ctx context.Context) *CreateNotificationRuleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create notification rule params -func (o *CreateNotificationRuleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create notification rule params -func (o *CreateNotificationRuleParams) WithHTTPClient(client *http.Client) *CreateNotificationRuleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create notification rule params -func (o *CreateNotificationRuleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create notification rule params -func (o *CreateNotificationRuleParams) WithBody(body *models.NotificationRule) *CreateNotificationRuleParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create notification rule params -func (o *CreateNotificationRuleParams) SetBody(body *models.NotificationRule) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateNotificationRuleParams) 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/alerts/create_notification_rule_responses.go b/v1/client/alerts/create_notification_rule_responses.go deleted file mode 100644 index 8c0c950b..00000000 --- a/v1/client/alerts/create_notification_rule_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateNotificationRuleReader is a Reader for the CreateNotificationRule structure. -type CreateNotificationRuleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateNotificationRuleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateNotificationRuleCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateNotificationRuleDefault(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 - } -} - -// NewCreateNotificationRuleCreated creates a CreateNotificationRuleCreated with default headers values -func NewCreateNotificationRuleCreated() *CreateNotificationRuleCreated { - return &CreateNotificationRuleCreated{} -} - -/* -CreateNotificationRuleCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateNotificationRuleCreated struct { - Payload *models.NotificationRule -} - -// IsSuccess returns true when this create notification rule created response has a 2xx status code -func (o *CreateNotificationRuleCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create notification rule created response has a 3xx status code -func (o *CreateNotificationRuleCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create notification rule created response has a 4xx status code -func (o *CreateNotificationRuleCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create notification rule created response has a 5xx status code -func (o *CreateNotificationRuleCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create notification rule created response a status code equal to that given -func (o *CreateNotificationRuleCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create notification rule created response -func (o *CreateNotificationRuleCreated) Code() int { - return 201 -} - -func (o *CreateNotificationRuleCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertNotificationRules][%d] createNotificationRuleCreated %s", 201, payload) -} - -func (o *CreateNotificationRuleCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertNotificationRules][%d] createNotificationRuleCreated %s", 201, payload) -} - -func (o *CreateNotificationRuleCreated) GetPayload() *models.NotificationRule { - return o.Payload -} - -func (o *CreateNotificationRuleCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NotificationRule) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateNotificationRuleDefault creates a CreateNotificationRuleDefault with default headers values -func NewCreateNotificationRuleDefault(code int) *CreateNotificationRuleDefault { - return &CreateNotificationRuleDefault{ - _statusCode: code, - } -} - -/* -CreateNotificationRuleDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateNotificationRuleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create notification rule default response has a 2xx status code -func (o *CreateNotificationRuleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create notification rule default response has a 3xx status code -func (o *CreateNotificationRuleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create notification rule default response has a 4xx status code -func (o *CreateNotificationRuleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create notification rule default response has a 5xx status code -func (o *CreateNotificationRuleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create notification rule default response a status code equal to that given -func (o *CreateNotificationRuleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create notification rule default response -func (o *CreateNotificationRuleDefault) Code() int { - return o._statusCode -} - -func (o *CreateNotificationRuleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertNotificationRules][%d] CreateNotificationRule default %s", o._statusCode, payload) -} - -func (o *CreateNotificationRuleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertNotificationRules][%d] CreateNotificationRule default %s", o._statusCode, payload) -} - -func (o *CreateNotificationRuleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateNotificationRuleDefault) 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/alerts/create_resolution_parameters.go b/v1/client/alerts/create_resolution_parameters.go deleted file mode 100644 index 9ec961de..00000000 --- a/v1/client/alerts/create_resolution_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateResolutionParams creates a new CreateResolutionParams 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 NewCreateResolutionParams() *CreateResolutionParams { - return &CreateResolutionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateResolutionParamsWithTimeout creates a new CreateResolutionParams object -// with the ability to set a timeout on a request. -func NewCreateResolutionParamsWithTimeout(timeout time.Duration) *CreateResolutionParams { - return &CreateResolutionParams{ - timeout: timeout, - } -} - -// NewCreateResolutionParamsWithContext creates a new CreateResolutionParams object -// with the ability to set a context for a request. -func NewCreateResolutionParamsWithContext(ctx context.Context) *CreateResolutionParams { - return &CreateResolutionParams{ - Context: ctx, - } -} - -// NewCreateResolutionParamsWithHTTPClient creates a new CreateResolutionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateResolutionParamsWithHTTPClient(client *http.Client) *CreateResolutionParams { - return &CreateResolutionParams{ - HTTPClient: client, - } -} - -/* -CreateResolutionParams contains all the parameters to send to the API endpoint - - for the create resolution operation. - - Typically these are written to a http.Request. -*/ -type CreateResolutionParams struct { - - /* Body. - - Request to create an Alert Resolution and apply it to the specified Alerts. - */ - Body *models.AlertResolutionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create resolution params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResolutionParams) WithDefaults() *CreateResolutionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create resolution params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResolutionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create resolution params -func (o *CreateResolutionParams) WithTimeout(timeout time.Duration) *CreateResolutionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create resolution params -func (o *CreateResolutionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create resolution params -func (o *CreateResolutionParams) WithContext(ctx context.Context) *CreateResolutionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create resolution params -func (o *CreateResolutionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create resolution params -func (o *CreateResolutionParams) WithHTTPClient(client *http.Client) *CreateResolutionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create resolution params -func (o *CreateResolutionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create resolution params -func (o *CreateResolutionParams) WithBody(body *models.AlertResolutionRequest) *CreateResolutionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create resolution params -func (o *CreateResolutionParams) SetBody(body *models.AlertResolutionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateResolutionParams) 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/alerts/create_resolution_responses.go b/v1/client/alerts/create_resolution_responses.go deleted file mode 100644 index 822ef997..00000000 --- a/v1/client/alerts/create_resolution_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateResolutionReader is a Reader for the CreateResolution structure. -type CreateResolutionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateResolutionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateResolutionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateResolutionDefault(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 - } -} - -// NewCreateResolutionCreated creates a CreateResolutionCreated with default headers values -func NewCreateResolutionCreated() *CreateResolutionCreated { - return &CreateResolutionCreated{} -} - -/* -CreateResolutionCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateResolutionCreated struct { - Payload *models.AlertResolution -} - -// IsSuccess returns true when this create resolution created response has a 2xx status code -func (o *CreateResolutionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create resolution created response has a 3xx status code -func (o *CreateResolutionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create resolution created response has a 4xx status code -func (o *CreateResolutionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create resolution created response has a 5xx status code -func (o *CreateResolutionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create resolution created response a status code equal to that given -func (o *CreateResolutionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create resolution created response -func (o *CreateResolutionCreated) Code() int { - return 201 -} - -func (o *CreateResolutionCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertResolutions][%d] createResolutionCreated %s", 201, payload) -} - -func (o *CreateResolutionCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertResolutions][%d] createResolutionCreated %s", 201, payload) -} - -func (o *CreateResolutionCreated) GetPayload() *models.AlertResolution { - return o.Payload -} - -func (o *CreateResolutionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AlertResolution) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateResolutionDefault creates a CreateResolutionDefault with default headers values -func NewCreateResolutionDefault(code int) *CreateResolutionDefault { - return &CreateResolutionDefault{ - _statusCode: code, - } -} - -/* -CreateResolutionDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateResolutionDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create resolution default response has a 2xx status code -func (o *CreateResolutionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create resolution default response has a 3xx status code -func (o *CreateResolutionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create resolution default response has a 4xx status code -func (o *CreateResolutionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create resolution default response has a 5xx status code -func (o *CreateResolutionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create resolution default response a status code equal to that given -func (o *CreateResolutionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create resolution default response -func (o *CreateResolutionDefault) Code() int { - return o._statusCode -} - -func (o *CreateResolutionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertResolutions][%d] CreateResolution default %s", o._statusCode, payload) -} - -func (o *CreateResolutionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/alertResolutions][%d] CreateResolution default %s", o._statusCode, payload) -} - -func (o *CreateResolutionDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateResolutionDefault) 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/alerts/delete_notification_rule_parameters.go b/v1/client/alerts/delete_notification_rule_parameters.go deleted file mode 100644 index 77c3e250..00000000 --- a/v1/client/alerts/delete_notification_rule_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" -) - -// NewDeleteNotificationRuleParams creates a new DeleteNotificationRuleParams 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 NewDeleteNotificationRuleParams() *DeleteNotificationRuleParams { - return &DeleteNotificationRuleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteNotificationRuleParamsWithTimeout creates a new DeleteNotificationRuleParams object -// with the ability to set a timeout on a request. -func NewDeleteNotificationRuleParamsWithTimeout(timeout time.Duration) *DeleteNotificationRuleParams { - return &DeleteNotificationRuleParams{ - timeout: timeout, - } -} - -// NewDeleteNotificationRuleParamsWithContext creates a new DeleteNotificationRuleParams object -// with the ability to set a context for a request. -func NewDeleteNotificationRuleParamsWithContext(ctx context.Context) *DeleteNotificationRuleParams { - return &DeleteNotificationRuleParams{ - Context: ctx, - } -} - -// NewDeleteNotificationRuleParamsWithHTTPClient creates a new DeleteNotificationRuleParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteNotificationRuleParamsWithHTTPClient(client *http.Client) *DeleteNotificationRuleParams { - return &DeleteNotificationRuleParams{ - HTTPClient: client, - } -} - -/* -DeleteNotificationRuleParams contains all the parameters to send to the API endpoint - - for the delete notification rule operation. - - Typically these are written to a http.Request. -*/ -type DeleteNotificationRuleParams struct { - - /* RuleID. - - Specifies the rule id. - - Format: int64 - */ - RuleID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteNotificationRuleParams) WithDefaults() *DeleteNotificationRuleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteNotificationRuleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete notification rule params -func (o *DeleteNotificationRuleParams) WithTimeout(timeout time.Duration) *DeleteNotificationRuleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete notification rule params -func (o *DeleteNotificationRuleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete notification rule params -func (o *DeleteNotificationRuleParams) WithContext(ctx context.Context) *DeleteNotificationRuleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete notification rule params -func (o *DeleteNotificationRuleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete notification rule params -func (o *DeleteNotificationRuleParams) WithHTTPClient(client *http.Client) *DeleteNotificationRuleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete notification rule params -func (o *DeleteNotificationRuleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRuleID adds the ruleID to the delete notification rule params -func (o *DeleteNotificationRuleParams) WithRuleID(ruleID int64) *DeleteNotificationRuleParams { - o.SetRuleID(ruleID) - return o -} - -// SetRuleID adds the ruleId to the delete notification rule params -func (o *DeleteNotificationRuleParams) SetRuleID(ruleID int64) { - o.RuleID = ruleID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteNotificationRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param ruleId - if err := r.SetPathParam("ruleId", swag.FormatInt64(o.RuleID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/alerts/delete_notification_rule_responses.go b/v1/client/alerts/delete_notification_rule_responses.go deleted file mode 100644 index 0a359974..00000000 --- a/v1/client/alerts/delete_notification_rule_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteNotificationRuleReader is a Reader for the DeleteNotificationRule structure. -type DeleteNotificationRuleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteNotificationRuleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteNotificationRuleNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteNotificationRuleDefault(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 - } -} - -// NewDeleteNotificationRuleNoContent creates a DeleteNotificationRuleNoContent with default headers values -func NewDeleteNotificationRuleNoContent() *DeleteNotificationRuleNoContent { - return &DeleteNotificationRuleNoContent{} -} - -/* -DeleteNotificationRuleNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteNotificationRuleNoContent struct { -} - -// IsSuccess returns true when this delete notification rule no content response has a 2xx status code -func (o *DeleteNotificationRuleNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete notification rule no content response has a 3xx status code -func (o *DeleteNotificationRuleNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete notification rule no content response has a 4xx status code -func (o *DeleteNotificationRuleNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete notification rule no content response has a 5xx status code -func (o *DeleteNotificationRuleNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete notification rule no content response a status code equal to that given -func (o *DeleteNotificationRuleNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete notification rule no content response -func (o *DeleteNotificationRuleNoContent) Code() int { - return 204 -} - -func (o *DeleteNotificationRuleNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/alertNotificationRules/{ruleId}][%d] deleteNotificationRuleNoContent", 204) -} - -func (o *DeleteNotificationRuleNoContent) String() string { - return fmt.Sprintf("[DELETE /public/alertNotificationRules/{ruleId}][%d] deleteNotificationRuleNoContent", 204) -} - -func (o *DeleteNotificationRuleNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteNotificationRuleDefault creates a DeleteNotificationRuleDefault with default headers values -func NewDeleteNotificationRuleDefault(code int) *DeleteNotificationRuleDefault { - return &DeleteNotificationRuleDefault{ - _statusCode: code, - } -} - -/* -DeleteNotificationRuleDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteNotificationRuleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete notification rule default response has a 2xx status code -func (o *DeleteNotificationRuleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete notification rule default response has a 3xx status code -func (o *DeleteNotificationRuleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete notification rule default response has a 4xx status code -func (o *DeleteNotificationRuleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete notification rule default response has a 5xx status code -func (o *DeleteNotificationRuleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete notification rule default response a status code equal to that given -func (o *DeleteNotificationRuleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete notification rule default response -func (o *DeleteNotificationRuleDefault) Code() int { - return o._statusCode -} - -func (o *DeleteNotificationRuleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/alertNotificationRules/{ruleId}][%d] DeleteNotificationRule default %s", o._statusCode, payload) -} - -func (o *DeleteNotificationRuleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/alertNotificationRules/{ruleId}][%d] DeleteNotificationRule default %s", o._statusCode, payload) -} - -func (o *DeleteNotificationRuleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteNotificationRuleDefault) 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/alerts/get_alert_by_id_parameters.go b/v1/client/alerts/get_alert_by_id_parameters.go deleted file mode 100644 index 7ac8d0bb..00000000 --- a/v1/client/alerts/get_alert_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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" -) - -// NewGetAlertByIDParams creates a new GetAlertByIDParams 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 NewGetAlertByIDParams() *GetAlertByIDParams { - return &GetAlertByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertByIDParamsWithTimeout creates a new GetAlertByIDParams object -// with the ability to set a timeout on a request. -func NewGetAlertByIDParamsWithTimeout(timeout time.Duration) *GetAlertByIDParams { - return &GetAlertByIDParams{ - timeout: timeout, - } -} - -// NewGetAlertByIDParamsWithContext creates a new GetAlertByIDParams object -// with the ability to set a context for a request. -func NewGetAlertByIDParamsWithContext(ctx context.Context) *GetAlertByIDParams { - return &GetAlertByIDParams{ - Context: ctx, - } -} - -// NewGetAlertByIDParamsWithHTTPClient creates a new GetAlertByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertByIDParamsWithHTTPClient(client *http.Client) *GetAlertByIDParams { - return &GetAlertByIDParams{ - HTTPClient: client, - } -} - -/* -GetAlertByIDParams contains all the parameters to send to the API endpoint - - for the get alert by Id operation. - - Typically these are written to a http.Request. -*/ -type GetAlertByIDParams struct { - - /* ID. - - Unique id of the Alert to return. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alert by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertByIDParams) WithDefaults() *GetAlertByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alert by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get alert by Id params -func (o *GetAlertByIDParams) WithTimeout(timeout time.Duration) *GetAlertByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alert by Id params -func (o *GetAlertByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alert by Id params -func (o *GetAlertByIDParams) WithContext(ctx context.Context) *GetAlertByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alert by Id params -func (o *GetAlertByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alert by Id params -func (o *GetAlertByIDParams) WithHTTPClient(client *http.Client) *GetAlertByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alert by Id params -func (o *GetAlertByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get alert by Id params -func (o *GetAlertByIDParams) WithID(id string) *GetAlertByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get alert by Id params -func (o *GetAlertByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/alerts/get_alert_by_id_responses.go b/v1/client/alerts/get_alert_by_id_responses.go deleted file mode 100644 index c0067ee7..00000000 --- a/v1/client/alerts/get_alert_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAlertByIDReader is a Reader for the GetAlertByID structure. -type GetAlertByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAlertByIDDefault(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 - } -} - -// NewGetAlertByIDOK creates a GetAlertByIDOK with default headers values -func NewGetAlertByIDOK() *GetAlertByIDOK { - return &GetAlertByIDOK{} -} - -/* -GetAlertByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAlertByIDOK struct { - Payload *models.Alert -} - -// IsSuccess returns true when this get alert by Id o k response has a 2xx status code -func (o *GetAlertByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alert by Id o k response has a 3xx status code -func (o *GetAlertByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert by Id o k response has a 4xx status code -func (o *GetAlertByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert by Id o k response has a 5xx status code -func (o *GetAlertByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert by Id o k response a status code equal to that given -func (o *GetAlertByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alert by Id o k response -func (o *GetAlertByIDOK) Code() int { - return 200 -} - -func (o *GetAlertByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts/{id}][%d] getAlertByIdOK %s", 200, payload) -} - -func (o *GetAlertByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts/{id}][%d] getAlertByIdOK %s", 200, payload) -} - -func (o *GetAlertByIDOK) GetPayload() *models.Alert { - return o.Payload -} - -func (o *GetAlertByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Alert) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertByIDDefault creates a GetAlertByIDDefault with default headers values -func NewGetAlertByIDDefault(code int) *GetAlertByIDDefault { - return &GetAlertByIDDefault{ - _statusCode: code, - } -} - -/* -GetAlertByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAlertByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get alert by Id default response has a 2xx status code -func (o *GetAlertByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get alert by Id default response has a 3xx status code -func (o *GetAlertByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get alert by Id default response has a 4xx status code -func (o *GetAlertByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get alert by Id default response has a 5xx status code -func (o *GetAlertByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get alert by Id default response a status code equal to that given -func (o *GetAlertByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get alert by Id default response -func (o *GetAlertByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetAlertByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts/{id}][%d] GetAlertById default %s", o._statusCode, payload) -} - -func (o *GetAlertByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts/{id}][%d] GetAlertById default %s", o._statusCode, payload) -} - -func (o *GetAlertByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAlertByIDDefault) 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/alerts/get_alert_categories_parameters.go b/v1/client/alerts/get_alert_categories_parameters.go deleted file mode 100644 index fdd30108..00000000 --- a/v1/client/alerts/get_alert_categories_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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" -) - -// NewGetAlertCategoriesParams creates a new GetAlertCategoriesParams 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 NewGetAlertCategoriesParams() *GetAlertCategoriesParams { - return &GetAlertCategoriesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertCategoriesParamsWithTimeout creates a new GetAlertCategoriesParams object -// with the ability to set a timeout on a request. -func NewGetAlertCategoriesParamsWithTimeout(timeout time.Duration) *GetAlertCategoriesParams { - return &GetAlertCategoriesParams{ - timeout: timeout, - } -} - -// NewGetAlertCategoriesParamsWithContext creates a new GetAlertCategoriesParams object -// with the ability to set a context for a request. -func NewGetAlertCategoriesParamsWithContext(ctx context.Context) *GetAlertCategoriesParams { - return &GetAlertCategoriesParams{ - Context: ctx, - } -} - -// NewGetAlertCategoriesParamsWithHTTPClient creates a new GetAlertCategoriesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertCategoriesParamsWithHTTPClient(client *http.Client) *GetAlertCategoriesParams { - return &GetAlertCategoriesParams{ - HTTPClient: client, - } -} - -/* -GetAlertCategoriesParams contains all the parameters to send to the API endpoint - - for the get alert categories operation. - - Typically these are written to a http.Request. -*/ -type GetAlertCategoriesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alert categories params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertCategoriesParams) WithDefaults() *GetAlertCategoriesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alert categories params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertCategoriesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get alert categories params -func (o *GetAlertCategoriesParams) WithTimeout(timeout time.Duration) *GetAlertCategoriesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alert categories params -func (o *GetAlertCategoriesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alert categories params -func (o *GetAlertCategoriesParams) WithContext(ctx context.Context) *GetAlertCategoriesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alert categories params -func (o *GetAlertCategoriesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alert categories params -func (o *GetAlertCategoriesParams) WithHTTPClient(client *http.Client) *GetAlertCategoriesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alert categories params -func (o *GetAlertCategoriesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertCategoriesParams) 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/alerts/get_alert_categories_responses.go b/v1/client/alerts/get_alert_categories_responses.go deleted file mode 100644 index d10bcd63..00000000 --- a/v1/client/alerts/get_alert_categories_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAlertCategoriesReader is a Reader for the GetAlertCategories structure. -type GetAlertCategoriesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertCategoriesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAlertCategoriesDefault(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 - } -} - -// NewGetAlertCategoriesOK creates a GetAlertCategoriesOK with default headers values -func NewGetAlertCategoriesOK() *GetAlertCategoriesOK { - return &GetAlertCategoriesOK{} -} - -/* -GetAlertCategoriesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAlertCategoriesOK struct { - Payload []*models.AlertCategoryName -} - -// IsSuccess returns true when this get alert categories o k response has a 2xx status code -func (o *GetAlertCategoriesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alert categories o k response has a 3xx status code -func (o *GetAlertCategoriesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert categories o k response has a 4xx status code -func (o *GetAlertCategoriesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert categories o k response has a 5xx status code -func (o *GetAlertCategoriesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert categories o k response a status code equal to that given -func (o *GetAlertCategoriesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alert categories o k response -func (o *GetAlertCategoriesOK) Code() int { - return 200 -} - -func (o *GetAlertCategoriesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertCategories][%d] getAlertCategoriesOK %s", 200, payload) -} - -func (o *GetAlertCategoriesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertCategories][%d] getAlertCategoriesOK %s", 200, payload) -} - -func (o *GetAlertCategoriesOK) GetPayload() []*models.AlertCategoryName { - return o.Payload -} - -func (o *GetAlertCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertCategoriesDefault creates a GetAlertCategoriesDefault with default headers values -func NewGetAlertCategoriesDefault(code int) *GetAlertCategoriesDefault { - return &GetAlertCategoriesDefault{ - _statusCode: code, - } -} - -/* -GetAlertCategoriesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAlertCategoriesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get alert categories default response has a 2xx status code -func (o *GetAlertCategoriesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get alert categories default response has a 3xx status code -func (o *GetAlertCategoriesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get alert categories default response has a 4xx status code -func (o *GetAlertCategoriesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get alert categories default response has a 5xx status code -func (o *GetAlertCategoriesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get alert categories default response a status code equal to that given -func (o *GetAlertCategoriesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get alert categories default response -func (o *GetAlertCategoriesDefault) Code() int { - return o._statusCode -} - -func (o *GetAlertCategoriesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertCategories][%d] GetAlertCategories default %s", o._statusCode, payload) -} - -func (o *GetAlertCategoriesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertCategories][%d] GetAlertCategories default %s", o._statusCode, payload) -} - -func (o *GetAlertCategoriesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAlertCategoriesDefault) 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/alerts/get_alert_types_parameters.go b/v1/client/alerts/get_alert_types_parameters.go deleted file mode 100644 index 8e0d2e38..00000000 --- a/v1/client/alerts/get_alert_types_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" -) - -// NewGetAlertTypesParams creates a new GetAlertTypesParams 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 NewGetAlertTypesParams() *GetAlertTypesParams { - return &GetAlertTypesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertTypesParamsWithTimeout creates a new GetAlertTypesParams object -// with the ability to set a timeout on a request. -func NewGetAlertTypesParamsWithTimeout(timeout time.Duration) *GetAlertTypesParams { - return &GetAlertTypesParams{ - timeout: timeout, - } -} - -// NewGetAlertTypesParamsWithContext creates a new GetAlertTypesParams object -// with the ability to set a context for a request. -func NewGetAlertTypesParamsWithContext(ctx context.Context) *GetAlertTypesParams { - return &GetAlertTypesParams{ - Context: ctx, - } -} - -// NewGetAlertTypesParamsWithHTTPClient creates a new GetAlertTypesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertTypesParamsWithHTTPClient(client *http.Client) *GetAlertTypesParams { - return &GetAlertTypesParams{ - HTTPClient: client, - } -} - -/* -GetAlertTypesParams contains all the parameters to send to the API endpoint - - for the get alert types operation. - - Typically these are written to a http.Request. -*/ -type GetAlertTypesParams struct { - - /* AlertCategoryList. - - Specifies a list of Alert Categories to filter alert types by. - Specifies the category of an Alert. - kDisk - Alert associated with the disk. - kNode - Alert associated with general hardware on a specific node. - kCluster - Alert associated with general hardware in cluster level. - kChassis - Alert associated with the Chassis. - kPowerSupply - Alert associated with the power supply. - kCPU - Alert associated with the CPU usage. - kMemory - Alert associated with the RAM/Memory. - kTemperature - Alert associated with the temperature. - kFan - Alert associated with the fan. - kNIC - Alert associated with network chips and interfaces. - kFirmware - Alert associated with the firmware. - kNodeHealth - Alert associated with node health status. - kOperatingSystem - Alert associated with operating systems. - kDataPath - Alert associated with data management in the cluster. - kMetadata - Alert associated with metadata management. - kIndexing - Alert associated with indexing services. - kHelios - Alert associated with Helios. - kAppMarketPlace - Alert associated with App MarketPlace. - kSystemService -Alert associated with System service apps. - kLicense - Alert associated with licensing. - kSecurity - Alert associated with security. - kUpgrade - Alert associated with upgrade activities. - kClusterManagement - Alert associated with cluster management activities. - kAuditLog - Alert associated with audit log events. - kNetworking - Alert associated with networking issue. - kConfiguration - Alert associated with cluster or system configurations. - kStorageUsage - Alert associated with the disk/domain/cluster storage usage. - kFaultTolerance - Alert associated with the fault tolerance in different levels. - kBackupRestore - Alert associated with Backup-Restore job. - kArchivalRestore - Alert associated with Archival-Restore job. - kRemoteReplication - Alert associated with Replication job. - kQuota - Alert associated with Quotas. - kCDP - Alert associated with Continuous Data Protection. - kViewFailover - Alert associated with view Failover. - kDisasterRecovery - Alert associated with Disaster Recovery. - */ - AlertCategoryList []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alert types params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertTypesParams) WithDefaults() *GetAlertTypesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alert types params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertTypesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get alert types params -func (o *GetAlertTypesParams) WithTimeout(timeout time.Duration) *GetAlertTypesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alert types params -func (o *GetAlertTypesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alert types params -func (o *GetAlertTypesParams) WithContext(ctx context.Context) *GetAlertTypesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alert types params -func (o *GetAlertTypesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alert types params -func (o *GetAlertTypesParams) WithHTTPClient(client *http.Client) *GetAlertTypesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alert types params -func (o *GetAlertTypesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAlertCategoryList adds the alertCategoryList to the get alert types params -func (o *GetAlertTypesParams) WithAlertCategoryList(alertCategoryList []string) *GetAlertTypesParams { - o.SetAlertCategoryList(alertCategoryList) - return o -} - -// SetAlertCategoryList adds the alertCategoryList to the get alert types params -func (o *GetAlertTypesParams) SetAlertCategoryList(alertCategoryList []string) { - o.AlertCategoryList = alertCategoryList -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AlertCategoryList != nil { - - // binding items for alertCategoryList - joinedAlertCategoryList := o.bindParamAlertCategoryList(reg) - - // query array param alertCategoryList - if err := r.SetQueryParam("alertCategoryList", joinedAlertCategoryList...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAlertTypes binds the parameter alertCategoryList -func (o *GetAlertTypesParams) bindParamAlertCategoryList(formats strfmt.Registry) []string { - alertCategoryListIR := o.AlertCategoryList - - var alertCategoryListIC []string - for _, alertCategoryListIIR := range alertCategoryListIR { // explode []string - - alertCategoryListIIV := alertCategoryListIIR // string as string - alertCategoryListIC = append(alertCategoryListIC, alertCategoryListIIV) - } - - // items.CollectionFormat: "" - alertCategoryListIS := swag.JoinByFormat(alertCategoryListIC, "") - - return alertCategoryListIS -} diff --git a/v1/client/alerts/get_alert_types_responses.go b/v1/client/alerts/get_alert_types_responses.go deleted file mode 100644 index 7abb8068..00000000 --- a/v1/client/alerts/get_alert_types_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAlertTypesReader is a Reader for the GetAlertTypes structure. -type GetAlertTypesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertTypesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAlertTypesDefault(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 - } -} - -// NewGetAlertTypesOK creates a GetAlertTypesOK with default headers values -func NewGetAlertTypesOK() *GetAlertTypesOK { - return &GetAlertTypesOK{} -} - -/* -GetAlertTypesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAlertTypesOK struct { - Payload []*models.AlertMetadata -} - -// IsSuccess returns true when this get alert types o k response has a 2xx status code -func (o *GetAlertTypesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alert types o k response has a 3xx status code -func (o *GetAlertTypesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert types o k response has a 4xx status code -func (o *GetAlertTypesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert types o k response has a 5xx status code -func (o *GetAlertTypesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert types o k response a status code equal to that given -func (o *GetAlertTypesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alert types o k response -func (o *GetAlertTypesOK) Code() int { - return 200 -} - -func (o *GetAlertTypesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertTypes][%d] getAlertTypesOK %s", 200, payload) -} - -func (o *GetAlertTypesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertTypes][%d] getAlertTypesOK %s", 200, payload) -} - -func (o *GetAlertTypesOK) GetPayload() []*models.AlertMetadata { - return o.Payload -} - -func (o *GetAlertTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertTypesDefault creates a GetAlertTypesDefault with default headers values -func NewGetAlertTypesDefault(code int) *GetAlertTypesDefault { - return &GetAlertTypesDefault{ - _statusCode: code, - } -} - -/* -GetAlertTypesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAlertTypesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get alert types default response has a 2xx status code -func (o *GetAlertTypesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get alert types default response has a 3xx status code -func (o *GetAlertTypesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get alert types default response has a 4xx status code -func (o *GetAlertTypesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get alert types default response has a 5xx status code -func (o *GetAlertTypesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get alert types default response a status code equal to that given -func (o *GetAlertTypesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get alert types default response -func (o *GetAlertTypesDefault) Code() int { - return o._statusCode -} - -func (o *GetAlertTypesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertTypes][%d] GetAlertTypes default %s", o._statusCode, payload) -} - -func (o *GetAlertTypesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertTypes][%d] GetAlertTypes default %s", o._statusCode, payload) -} - -func (o *GetAlertTypesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAlertTypesDefault) 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/alerts/get_alerts_parameters.go b/v1/client/alerts/get_alerts_parameters.go deleted file mode 100644 index 3f3c0db0..00000000 --- a/v1/client/alerts/get_alerts_parameters.go +++ /dev/null @@ -1,735 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" -) - -// NewGetAlertsParams creates a new GetAlertsParams 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 NewGetAlertsParams() *GetAlertsParams { - return &GetAlertsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertsParamsWithTimeout creates a new GetAlertsParams object -// with the ability to set a timeout on a request. -func NewGetAlertsParamsWithTimeout(timeout time.Duration) *GetAlertsParams { - return &GetAlertsParams{ - timeout: timeout, - } -} - -// NewGetAlertsParamsWithContext creates a new GetAlertsParams object -// with the ability to set a context for a request. -func NewGetAlertsParamsWithContext(ctx context.Context) *GetAlertsParams { - return &GetAlertsParams{ - Context: ctx, - } -} - -// NewGetAlertsParamsWithHTTPClient creates a new GetAlertsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertsParamsWithHTTPClient(client *http.Client) *GetAlertsParams { - return &GetAlertsParams{ - HTTPClient: client, - } -} - -/* -GetAlertsParams contains all the parameters to send to the API endpoint - - for the get alerts operation. - - Typically these are written to a http.Request. -*/ -type GetAlertsParams struct { - - /* AlertCategoryList. - - Specifies list of Alert Categories. - */ - AlertCategoryList []string - - /* AlertIDList. - - Specifies list of Alert ids to filter alerts by. - */ - AlertIDList []string - - /* AlertName. - - Specifies Alert name to filter alerts by. - */ - AlertName *string - - /* AlertSeverityList. - - Specifies list of Alert severity to filter alerts by. - */ - AlertSeverityList []string - - /* AlertStateList. - - Specifies list of Alert States to filter alerts by. - */ - AlertStateList []string - - /* AlertTypeBucketList. - - Specifies the list of Alert type bucket. - Specifies the Alert type bucket. - kHardware - Alerts related to hardware on which Cohesity software is running. - kSoftware - Alerts which are related to software components. - kDataService - Alerts related to data services. - kMaintenance - Alerts relates to maintenance activities. - */ - AlertTypeBucketList []string - - /* AlertTypeList. - - Specifies list of Alert Types to filter alerts by. - */ - AlertTypeList []int32 - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EndDateUsecs. - - Specifies end time Unix epoch time in microseconds to filter alerts by. - - Format: int64 - */ - EndDateUsecs *int64 - - /* MaxAlerts. - - Specifies the number of returned Alerts to be returned. The newest Alerts - are returned. - - Format: int32 - */ - MaxAlerts int32 - - /* PropertyKey. - - Specifies name of the property to filter alerts by. - */ - PropertyKey *string - - /* PropertyValue. - - Specifies value of the property to filter alerts by. - */ - PropertyValue *string - - /* ResolutionIDList. - - Specifies alert resolution ids to filter alerts by. - */ - ResolutionIDList []int64 - - /* StartDateUsecs. - - Specifies start time Unix epoch time in microseconds to filter alerts by. - - Format: int64 - */ - StartDateUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertsParams) WithDefaults() *GetAlertsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get alerts params -func (o *GetAlertsParams) WithTimeout(timeout time.Duration) *GetAlertsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alerts params -func (o *GetAlertsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alerts params -func (o *GetAlertsParams) WithContext(ctx context.Context) *GetAlertsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alerts params -func (o *GetAlertsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alerts params -func (o *GetAlertsParams) WithHTTPClient(client *http.Client) *GetAlertsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alerts params -func (o *GetAlertsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAlertCategoryList adds the alertCategoryList to the get alerts params -func (o *GetAlertsParams) WithAlertCategoryList(alertCategoryList []string) *GetAlertsParams { - o.SetAlertCategoryList(alertCategoryList) - return o -} - -// SetAlertCategoryList adds the alertCategoryList to the get alerts params -func (o *GetAlertsParams) SetAlertCategoryList(alertCategoryList []string) { - o.AlertCategoryList = alertCategoryList -} - -// WithAlertIDList adds the alertIDList to the get alerts params -func (o *GetAlertsParams) WithAlertIDList(alertIDList []string) *GetAlertsParams { - o.SetAlertIDList(alertIDList) - return o -} - -// SetAlertIDList adds the alertIdList to the get alerts params -func (o *GetAlertsParams) SetAlertIDList(alertIDList []string) { - o.AlertIDList = alertIDList -} - -// WithAlertName adds the alertName to the get alerts params -func (o *GetAlertsParams) WithAlertName(alertName *string) *GetAlertsParams { - o.SetAlertName(alertName) - return o -} - -// SetAlertName adds the alertName to the get alerts params -func (o *GetAlertsParams) SetAlertName(alertName *string) { - o.AlertName = alertName -} - -// WithAlertSeverityList adds the alertSeverityList to the get alerts params -func (o *GetAlertsParams) WithAlertSeverityList(alertSeverityList []string) *GetAlertsParams { - o.SetAlertSeverityList(alertSeverityList) - return o -} - -// SetAlertSeverityList adds the alertSeverityList to the get alerts params -func (o *GetAlertsParams) SetAlertSeverityList(alertSeverityList []string) { - o.AlertSeverityList = alertSeverityList -} - -// WithAlertStateList adds the alertStateList to the get alerts params -func (o *GetAlertsParams) WithAlertStateList(alertStateList []string) *GetAlertsParams { - o.SetAlertStateList(alertStateList) - return o -} - -// SetAlertStateList adds the alertStateList to the get alerts params -func (o *GetAlertsParams) SetAlertStateList(alertStateList []string) { - o.AlertStateList = alertStateList -} - -// WithAlertTypeBucketList adds the alertTypeBucketList to the get alerts params -func (o *GetAlertsParams) WithAlertTypeBucketList(alertTypeBucketList []string) *GetAlertsParams { - o.SetAlertTypeBucketList(alertTypeBucketList) - return o -} - -// SetAlertTypeBucketList adds the alertTypeBucketList to the get alerts params -func (o *GetAlertsParams) SetAlertTypeBucketList(alertTypeBucketList []string) { - o.AlertTypeBucketList = alertTypeBucketList -} - -// WithAlertTypeList adds the alertTypeList to the get alerts params -func (o *GetAlertsParams) WithAlertTypeList(alertTypeList []int32) *GetAlertsParams { - o.SetAlertTypeList(alertTypeList) - return o -} - -// SetAlertTypeList adds the alertTypeList to the get alerts params -func (o *GetAlertsParams) SetAlertTypeList(alertTypeList []int32) { - o.AlertTypeList = alertTypeList -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get alerts params -func (o *GetAlertsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetAlertsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get alerts params -func (o *GetAlertsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndDateUsecs adds the endDateUsecs to the get alerts params -func (o *GetAlertsParams) WithEndDateUsecs(endDateUsecs *int64) *GetAlertsParams { - o.SetEndDateUsecs(endDateUsecs) - return o -} - -// SetEndDateUsecs adds the endDateUsecs to the get alerts params -func (o *GetAlertsParams) SetEndDateUsecs(endDateUsecs *int64) { - o.EndDateUsecs = endDateUsecs -} - -// WithMaxAlerts adds the maxAlerts to the get alerts params -func (o *GetAlertsParams) WithMaxAlerts(maxAlerts int32) *GetAlertsParams { - o.SetMaxAlerts(maxAlerts) - return o -} - -// SetMaxAlerts adds the maxAlerts to the get alerts params -func (o *GetAlertsParams) SetMaxAlerts(maxAlerts int32) { - o.MaxAlerts = maxAlerts -} - -// WithPropertyKey adds the propertyKey to the get alerts params -func (o *GetAlertsParams) WithPropertyKey(propertyKey *string) *GetAlertsParams { - o.SetPropertyKey(propertyKey) - return o -} - -// SetPropertyKey adds the propertyKey to the get alerts params -func (o *GetAlertsParams) SetPropertyKey(propertyKey *string) { - o.PropertyKey = propertyKey -} - -// WithPropertyValue adds the propertyValue to the get alerts params -func (o *GetAlertsParams) WithPropertyValue(propertyValue *string) *GetAlertsParams { - o.SetPropertyValue(propertyValue) - return o -} - -// SetPropertyValue adds the propertyValue to the get alerts params -func (o *GetAlertsParams) SetPropertyValue(propertyValue *string) { - o.PropertyValue = propertyValue -} - -// WithResolutionIDList adds the resolutionIDList to the get alerts params -func (o *GetAlertsParams) WithResolutionIDList(resolutionIDList []int64) *GetAlertsParams { - o.SetResolutionIDList(resolutionIDList) - return o -} - -// SetResolutionIDList adds the resolutionIdList to the get alerts params -func (o *GetAlertsParams) SetResolutionIDList(resolutionIDList []int64) { - o.ResolutionIDList = resolutionIDList -} - -// WithStartDateUsecs adds the startDateUsecs to the get alerts params -func (o *GetAlertsParams) WithStartDateUsecs(startDateUsecs *int64) *GetAlertsParams { - o.SetStartDateUsecs(startDateUsecs) - return o -} - -// SetStartDateUsecs adds the startDateUsecs to the get alerts params -func (o *GetAlertsParams) SetStartDateUsecs(startDateUsecs *int64) { - o.StartDateUsecs = startDateUsecs -} - -// WithTenantIds adds the tenantIds to the get alerts params -func (o *GetAlertsParams) WithTenantIds(tenantIds []string) *GetAlertsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get alerts params -func (o *GetAlertsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AlertCategoryList != nil { - - // binding items for alertCategoryList - joinedAlertCategoryList := o.bindParamAlertCategoryList(reg) - - // query array param alertCategoryList - if err := r.SetQueryParam("alertCategoryList", joinedAlertCategoryList...); err != nil { - return err - } - } - - if o.AlertIDList != nil { - - // binding items for alertIdList - joinedAlertIDList := o.bindParamAlertIDList(reg) - - // query array param alertIdList - if err := r.SetQueryParam("alertIdList", joinedAlertIDList...); err != nil { - return err - } - } - - if o.AlertName != nil { - - // query param alertName - var qrAlertName string - - if o.AlertName != nil { - qrAlertName = *o.AlertName - } - qAlertName := qrAlertName - if qAlertName != "" { - - if err := r.SetQueryParam("alertName", qAlertName); err != nil { - return err - } - } - } - - if o.AlertSeverityList != nil { - - // binding items for alertSeverityList - joinedAlertSeverityList := o.bindParamAlertSeverityList(reg) - - // query array param alertSeverityList - if err := r.SetQueryParam("alertSeverityList", joinedAlertSeverityList...); err != nil { - return err - } - } - - if o.AlertStateList != nil { - - // binding items for alertStateList - joinedAlertStateList := o.bindParamAlertStateList(reg) - - // query array param alertStateList - if err := r.SetQueryParam("alertStateList", joinedAlertStateList...); err != nil { - return err - } - } - - if o.AlertTypeBucketList != nil { - - // binding items for alertTypeBucketList - joinedAlertTypeBucketList := o.bindParamAlertTypeBucketList(reg) - - // query array param alertTypeBucketList - if err := r.SetQueryParam("alertTypeBucketList", joinedAlertTypeBucketList...); err != nil { - return err - } - } - - if o.AlertTypeList != nil { - - // binding items for alertTypeList - joinedAlertTypeList := o.bindParamAlertTypeList(reg) - - // query array param alertTypeList - if err := r.SetQueryParam("alertTypeList", joinedAlertTypeList...); err != nil { - return err - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndDateUsecs != nil { - - // query param endDateUsecs - var qrEndDateUsecs int64 - - if o.EndDateUsecs != nil { - qrEndDateUsecs = *o.EndDateUsecs - } - qEndDateUsecs := swag.FormatInt64(qrEndDateUsecs) - if qEndDateUsecs != "" { - - if err := r.SetQueryParam("endDateUsecs", qEndDateUsecs); err != nil { - return err - } - } - } - - // query param maxAlerts - qrMaxAlerts := o.MaxAlerts - qMaxAlerts := swag.FormatInt32(qrMaxAlerts) - if qMaxAlerts != "" { - - if err := r.SetQueryParam("maxAlerts", qMaxAlerts); err != nil { - return err - } - } - - if o.PropertyKey != nil { - - // query param propertyKey - var qrPropertyKey string - - if o.PropertyKey != nil { - qrPropertyKey = *o.PropertyKey - } - qPropertyKey := qrPropertyKey - if qPropertyKey != "" { - - if err := r.SetQueryParam("propertyKey", qPropertyKey); err != nil { - return err - } - } - } - - if o.PropertyValue != nil { - - // query param propertyValue - var qrPropertyValue string - - if o.PropertyValue != nil { - qrPropertyValue = *o.PropertyValue - } - qPropertyValue := qrPropertyValue - if qPropertyValue != "" { - - if err := r.SetQueryParam("propertyValue", qPropertyValue); err != nil { - return err - } - } - } - - if o.ResolutionIDList != nil { - - // binding items for resolutionIdList - joinedResolutionIDList := o.bindParamResolutionIDList(reg) - - // query array param resolutionIdList - if err := r.SetQueryParam("resolutionIdList", joinedResolutionIDList...); err != nil { - return err - } - } - - if o.StartDateUsecs != nil { - - // query param startDateUsecs - var qrStartDateUsecs int64 - - if o.StartDateUsecs != nil { - qrStartDateUsecs = *o.StartDateUsecs - } - qStartDateUsecs := swag.FormatInt64(qrStartDateUsecs) - if qStartDateUsecs != "" { - - if err := r.SetQueryParam("startDateUsecs", qStartDateUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAlerts binds the parameter alertCategoryList -func (o *GetAlertsParams) bindParamAlertCategoryList(formats strfmt.Registry) []string { - alertCategoryListIR := o.AlertCategoryList - - var alertCategoryListIC []string - for _, alertCategoryListIIR := range alertCategoryListIR { // explode []string - - alertCategoryListIIV := alertCategoryListIIR // string as string - alertCategoryListIC = append(alertCategoryListIC, alertCategoryListIIV) - } - - // items.CollectionFormat: "" - alertCategoryListIS := swag.JoinByFormat(alertCategoryListIC, "") - - return alertCategoryListIS -} - -// bindParamGetAlerts binds the parameter alertIdList -func (o *GetAlertsParams) bindParamAlertIDList(formats strfmt.Registry) []string { - alertIDListIR := o.AlertIDList - - var alertIDListIC []string - for _, alertIDListIIR := range alertIDListIR { // explode []string - - alertIDListIIV := alertIDListIIR // string as string - alertIDListIC = append(alertIDListIC, alertIDListIIV) - } - - // items.CollectionFormat: "" - alertIDListIS := swag.JoinByFormat(alertIDListIC, "") - - return alertIDListIS -} - -// bindParamGetAlerts binds the parameter alertSeverityList -func (o *GetAlertsParams) bindParamAlertSeverityList(formats strfmt.Registry) []string { - alertSeverityListIR := o.AlertSeverityList - - var alertSeverityListIC []string - for _, alertSeverityListIIR := range alertSeverityListIR { // explode []string - - alertSeverityListIIV := alertSeverityListIIR // string as string - alertSeverityListIC = append(alertSeverityListIC, alertSeverityListIIV) - } - - // items.CollectionFormat: "" - alertSeverityListIS := swag.JoinByFormat(alertSeverityListIC, "") - - return alertSeverityListIS -} - -// bindParamGetAlerts binds the parameter alertStateList -func (o *GetAlertsParams) bindParamAlertStateList(formats strfmt.Registry) []string { - alertStateListIR := o.AlertStateList - - var alertStateListIC []string - for _, alertStateListIIR := range alertStateListIR { // explode []string - - alertStateListIIV := alertStateListIIR // string as string - alertStateListIC = append(alertStateListIC, alertStateListIIV) - } - - // items.CollectionFormat: "" - alertStateListIS := swag.JoinByFormat(alertStateListIC, "") - - return alertStateListIS -} - -// bindParamGetAlerts binds the parameter alertTypeBucketList -func (o *GetAlertsParams) bindParamAlertTypeBucketList(formats strfmt.Registry) []string { - alertTypeBucketListIR := o.AlertTypeBucketList - - var alertTypeBucketListIC []string - for _, alertTypeBucketListIIR := range alertTypeBucketListIR { // explode []string - - alertTypeBucketListIIV := alertTypeBucketListIIR // string as string - alertTypeBucketListIC = append(alertTypeBucketListIC, alertTypeBucketListIIV) - } - - // items.CollectionFormat: "" - alertTypeBucketListIS := swag.JoinByFormat(alertTypeBucketListIC, "") - - return alertTypeBucketListIS -} - -// bindParamGetAlerts binds the parameter alertTypeList -func (o *GetAlertsParams) bindParamAlertTypeList(formats strfmt.Registry) []string { - alertTypeListIR := o.AlertTypeList - - var alertTypeListIC []string - for _, alertTypeListIIR := range alertTypeListIR { // explode []int32 - - alertTypeListIIV := swag.FormatInt32(alertTypeListIIR) // int32 as string - alertTypeListIC = append(alertTypeListIC, alertTypeListIIV) - } - - // items.CollectionFormat: "" - alertTypeListIS := swag.JoinByFormat(alertTypeListIC, "") - - return alertTypeListIS -} - -// bindParamGetAlerts binds the parameter resolutionIdList -func (o *GetAlertsParams) bindParamResolutionIDList(formats strfmt.Registry) []string { - resolutionIDListIR := o.ResolutionIDList - - var resolutionIDListIC []string - for _, resolutionIDListIIR := range resolutionIDListIR { // explode []int64 - - resolutionIDListIIV := swag.FormatInt64(resolutionIDListIIR) // int64 as string - resolutionIDListIC = append(resolutionIDListIC, resolutionIDListIIV) - } - - // items.CollectionFormat: "" - resolutionIDListIS := swag.JoinByFormat(resolutionIDListIC, "") - - return resolutionIDListIS -} - -// bindParamGetAlerts binds the parameter tenantIds -func (o *GetAlertsParams) 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/v1/client/alerts/get_alerts_responses.go b/v1/client/alerts/get_alerts_responses.go deleted file mode 100644 index d75f0dc8..00000000 --- a/v1/client/alerts/get_alerts_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAlertsReader is a Reader for the GetAlerts structure. -type GetAlertsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAlertsDefault(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 - } -} - -// NewGetAlertsOK creates a GetAlertsOK with default headers values -func NewGetAlertsOK() *GetAlertsOK { - return &GetAlertsOK{} -} - -/* -GetAlertsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAlertsOK struct { - Payload []*models.Alert -} - -// IsSuccess returns true when this get alerts o k response has a 2xx status code -func (o *GetAlertsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alerts o k response has a 3xx status code -func (o *GetAlertsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alerts o k response has a 4xx status code -func (o *GetAlertsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alerts o k response has a 5xx status code -func (o *GetAlertsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alerts o k response a status code equal to that given -func (o *GetAlertsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alerts o k response -func (o *GetAlertsOK) Code() int { - return 200 -} - -func (o *GetAlertsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts][%d] getAlertsOK %s", 200, payload) -} - -func (o *GetAlertsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts][%d] getAlertsOK %s", 200, payload) -} - -func (o *GetAlertsOK) GetPayload() []*models.Alert { - return o.Payload -} - -func (o *GetAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertsDefault creates a GetAlertsDefault with default headers values -func NewGetAlertsDefault(code int) *GetAlertsDefault { - return &GetAlertsDefault{ - _statusCode: code, - } -} - -/* -GetAlertsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAlertsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get alerts default response has a 2xx status code -func (o *GetAlertsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get alerts default response has a 3xx status code -func (o *GetAlertsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get alerts default response has a 4xx status code -func (o *GetAlertsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get alerts default response has a 5xx status code -func (o *GetAlertsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get alerts default response a status code equal to that given -func (o *GetAlertsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get alerts default response -func (o *GetAlertsDefault) Code() int { - return o._statusCode -} - -func (o *GetAlertsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts][%d] GetAlerts default %s", o._statusCode, payload) -} - -func (o *GetAlertsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alerts][%d] GetAlerts default %s", o._statusCode, payload) -} - -func (o *GetAlertsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAlertsDefault) 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/alerts/get_notification_rules_parameters.go b/v1/client/alerts/get_notification_rules_parameters.go deleted file mode 100644 index 179cafa1..00000000 --- a/v1/client/alerts/get_notification_rules_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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" -) - -// NewGetNotificationRulesParams creates a new GetNotificationRulesParams 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 NewGetNotificationRulesParams() *GetNotificationRulesParams { - return &GetNotificationRulesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNotificationRulesParamsWithTimeout creates a new GetNotificationRulesParams object -// with the ability to set a timeout on a request. -func NewGetNotificationRulesParamsWithTimeout(timeout time.Duration) *GetNotificationRulesParams { - return &GetNotificationRulesParams{ - timeout: timeout, - } -} - -// NewGetNotificationRulesParamsWithContext creates a new GetNotificationRulesParams object -// with the ability to set a context for a request. -func NewGetNotificationRulesParamsWithContext(ctx context.Context) *GetNotificationRulesParams { - return &GetNotificationRulesParams{ - Context: ctx, - } -} - -// NewGetNotificationRulesParamsWithHTTPClient creates a new GetNotificationRulesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNotificationRulesParamsWithHTTPClient(client *http.Client) *GetNotificationRulesParams { - return &GetNotificationRulesParams{ - HTTPClient: client, - } -} - -/* -GetNotificationRulesParams contains all the parameters to send to the API endpoint - - for the get notification rules operation. - - Typically these are written to a http.Request. -*/ -type GetNotificationRulesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get notification rules params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNotificationRulesParams) WithDefaults() *GetNotificationRulesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get notification rules params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNotificationRulesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get notification rules params -func (o *GetNotificationRulesParams) WithTimeout(timeout time.Duration) *GetNotificationRulesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get notification rules params -func (o *GetNotificationRulesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get notification rules params -func (o *GetNotificationRulesParams) WithContext(ctx context.Context) *GetNotificationRulesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get notification rules params -func (o *GetNotificationRulesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get notification rules params -func (o *GetNotificationRulesParams) WithHTTPClient(client *http.Client) *GetNotificationRulesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get notification rules params -func (o *GetNotificationRulesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNotificationRulesParams) 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/alerts/get_notification_rules_responses.go b/v1/client/alerts/get_notification_rules_responses.go deleted file mode 100644 index 9bb44e8c..00000000 --- a/v1/client/alerts/get_notification_rules_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNotificationRulesReader is a Reader for the GetNotificationRules structure. -type GetNotificationRulesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNotificationRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNotificationRulesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNotificationRulesDefault(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 - } -} - -// NewGetNotificationRulesOK creates a GetNotificationRulesOK with default headers values -func NewGetNotificationRulesOK() *GetNotificationRulesOK { - return &GetNotificationRulesOK{} -} - -/* -GetNotificationRulesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNotificationRulesOK struct { - Payload []*models.NotificationRule -} - -// IsSuccess returns true when this get notification rules o k response has a 2xx status code -func (o *GetNotificationRulesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get notification rules o k response has a 3xx status code -func (o *GetNotificationRulesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get notification rules o k response has a 4xx status code -func (o *GetNotificationRulesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get notification rules o k response has a 5xx status code -func (o *GetNotificationRulesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get notification rules o k response a status code equal to that given -func (o *GetNotificationRulesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get notification rules o k response -func (o *GetNotificationRulesOK) Code() int { - return 200 -} - -func (o *GetNotificationRulesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertNotificationRules][%d] getNotificationRulesOK %s", 200, payload) -} - -func (o *GetNotificationRulesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertNotificationRules][%d] getNotificationRulesOK %s", 200, payload) -} - -func (o *GetNotificationRulesOK) GetPayload() []*models.NotificationRule { - return o.Payload -} - -func (o *GetNotificationRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNotificationRulesDefault creates a GetNotificationRulesDefault with default headers values -func NewGetNotificationRulesDefault(code int) *GetNotificationRulesDefault { - return &GetNotificationRulesDefault{ - _statusCode: code, - } -} - -/* -GetNotificationRulesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNotificationRulesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get notification rules default response has a 2xx status code -func (o *GetNotificationRulesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get notification rules default response has a 3xx status code -func (o *GetNotificationRulesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get notification rules default response has a 4xx status code -func (o *GetNotificationRulesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get notification rules default response has a 5xx status code -func (o *GetNotificationRulesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get notification rules default response a status code equal to that given -func (o *GetNotificationRulesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get notification rules default response -func (o *GetNotificationRulesDefault) Code() int { - return o._statusCode -} - -func (o *GetNotificationRulesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertNotificationRules][%d] GetNotificationRules default %s", o._statusCode, payload) -} - -func (o *GetNotificationRulesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertNotificationRules][%d] GetNotificationRules default %s", o._statusCode, payload) -} - -func (o *GetNotificationRulesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNotificationRulesDefault) 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/alerts/get_resolution_by_id_parameters.go b/v1/client/alerts/get_resolution_by_id_parameters.go deleted file mode 100644 index a6b3d246..00000000 --- a/v1/client/alerts/get_resolution_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" -) - -// NewGetResolutionByIDParams creates a new GetResolutionByIDParams 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 NewGetResolutionByIDParams() *GetResolutionByIDParams { - return &GetResolutionByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetResolutionByIDParamsWithTimeout creates a new GetResolutionByIDParams object -// with the ability to set a timeout on a request. -func NewGetResolutionByIDParamsWithTimeout(timeout time.Duration) *GetResolutionByIDParams { - return &GetResolutionByIDParams{ - timeout: timeout, - } -} - -// NewGetResolutionByIDParamsWithContext creates a new GetResolutionByIDParams object -// with the ability to set a context for a request. -func NewGetResolutionByIDParamsWithContext(ctx context.Context) *GetResolutionByIDParams { - return &GetResolutionByIDParams{ - Context: ctx, - } -} - -// NewGetResolutionByIDParamsWithHTTPClient creates a new GetResolutionByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetResolutionByIDParamsWithHTTPClient(client *http.Client) *GetResolutionByIDParams { - return &GetResolutionByIDParams{ - HTTPClient: client, - } -} - -/* -GetResolutionByIDParams contains all the parameters to send to the API endpoint - - for the get resolution by Id operation. - - Typically these are written to a http.Request. -*/ -type GetResolutionByIDParams struct { - - /* ID. - - Unique id of the Alert Resolution to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get resolution by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResolutionByIDParams) WithDefaults() *GetResolutionByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get resolution by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResolutionByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get resolution by Id params -func (o *GetResolutionByIDParams) WithTimeout(timeout time.Duration) *GetResolutionByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get resolution by Id params -func (o *GetResolutionByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get resolution by Id params -func (o *GetResolutionByIDParams) WithContext(ctx context.Context) *GetResolutionByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get resolution by Id params -func (o *GetResolutionByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get resolution by Id params -func (o *GetResolutionByIDParams) WithHTTPClient(client *http.Client) *GetResolutionByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get resolution by Id params -func (o *GetResolutionByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get resolution by Id params -func (o *GetResolutionByIDParams) WithID(id int64) *GetResolutionByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get resolution by Id params -func (o *GetResolutionByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetResolutionByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/alerts/get_resolution_by_id_responses.go b/v1/client/alerts/get_resolution_by_id_responses.go deleted file mode 100644 index b7e23249..00000000 --- a/v1/client/alerts/get_resolution_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetResolutionByIDReader is a Reader for the GetResolutionByID structure. -type GetResolutionByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetResolutionByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetResolutionByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetResolutionByIDDefault(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 - } -} - -// NewGetResolutionByIDOK creates a GetResolutionByIDOK with default headers values -func NewGetResolutionByIDOK() *GetResolutionByIDOK { - return &GetResolutionByIDOK{} -} - -/* -GetResolutionByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetResolutionByIDOK struct { - Payload *models.AlertResolution -} - -// IsSuccess returns true when this get resolution by Id o k response has a 2xx status code -func (o *GetResolutionByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get resolution by Id o k response has a 3xx status code -func (o *GetResolutionByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get resolution by Id o k response has a 4xx status code -func (o *GetResolutionByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get resolution by Id o k response has a 5xx status code -func (o *GetResolutionByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get resolution by Id o k response a status code equal to that given -func (o *GetResolutionByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get resolution by Id o k response -func (o *GetResolutionByIDOK) Code() int { - return 200 -} - -func (o *GetResolutionByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions/{id}][%d] getResolutionByIdOK %s", 200, payload) -} - -func (o *GetResolutionByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions/{id}][%d] getResolutionByIdOK %s", 200, payload) -} - -func (o *GetResolutionByIDOK) GetPayload() *models.AlertResolution { - return o.Payload -} - -func (o *GetResolutionByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AlertResolution) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetResolutionByIDDefault creates a GetResolutionByIDDefault with default headers values -func NewGetResolutionByIDDefault(code int) *GetResolutionByIDDefault { - return &GetResolutionByIDDefault{ - _statusCode: code, - } -} - -/* -GetResolutionByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetResolutionByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get resolution by Id default response has a 2xx status code -func (o *GetResolutionByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get resolution by Id default response has a 3xx status code -func (o *GetResolutionByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get resolution by Id default response has a 4xx status code -func (o *GetResolutionByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get resolution by Id default response has a 5xx status code -func (o *GetResolutionByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get resolution by Id default response a status code equal to that given -func (o *GetResolutionByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get resolution by Id default response -func (o *GetResolutionByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetResolutionByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions/{id}][%d] GetResolutionById default %s", o._statusCode, payload) -} - -func (o *GetResolutionByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions/{id}][%d] GetResolutionById default %s", o._statusCode, payload) -} - -func (o *GetResolutionByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetResolutionByIDDefault) 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/alerts/get_resolutions_parameters.go b/v1/client/alerts/get_resolutions_parameters.go deleted file mode 100644 index 5b445c1f..00000000 --- a/v1/client/alerts/get_resolutions_parameters.go +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" -) - -// NewGetResolutionsParams creates a new GetResolutionsParams 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 NewGetResolutionsParams() *GetResolutionsParams { - return &GetResolutionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetResolutionsParamsWithTimeout creates a new GetResolutionsParams object -// with the ability to set a timeout on a request. -func NewGetResolutionsParamsWithTimeout(timeout time.Duration) *GetResolutionsParams { - return &GetResolutionsParams{ - timeout: timeout, - } -} - -// NewGetResolutionsParamsWithContext creates a new GetResolutionsParams object -// with the ability to set a context for a request. -func NewGetResolutionsParamsWithContext(ctx context.Context) *GetResolutionsParams { - return &GetResolutionsParams{ - Context: ctx, - } -} - -// NewGetResolutionsParamsWithHTTPClient creates a new GetResolutionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetResolutionsParamsWithHTTPClient(client *http.Client) *GetResolutionsParams { - return &GetResolutionsParams{ - HTTPClient: client, - } -} - -/* -GetResolutionsParams contains all the parameters to send to the API endpoint - - for the get resolutions operation. - - Typically these are written to a http.Request. -*/ -type GetResolutionsParams struct { - - /* AlertIDList. - - Specifies list of Alert Resolution ids to filter resolutions by. - */ - AlertIDList []string - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EndDateUsecs. - - Specifies End Time Unix epoch in microseconds to filter resolutions by. - - Format: int64 - */ - EndDateUsecs *int64 - - /* MaxResolutions. - - Specifies the number of returned Resolutions to be returned. The newest - Resolutions are returned. - - Format: int32 - */ - MaxResolutions int32 - - /* ResolutionIDList. - - Specifies list of Alert Resolution ids to filter resolutions by. - */ - ResolutionIDList []int64 - - /* StartDateUsecs. - - Specifies Start Time Unix epoch in microseconds to filter resolutions by. - - Format: int64 - */ - StartDateUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get resolutions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResolutionsParams) WithDefaults() *GetResolutionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get resolutions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResolutionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get resolutions params -func (o *GetResolutionsParams) WithTimeout(timeout time.Duration) *GetResolutionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get resolutions params -func (o *GetResolutionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get resolutions params -func (o *GetResolutionsParams) WithContext(ctx context.Context) *GetResolutionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get resolutions params -func (o *GetResolutionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get resolutions params -func (o *GetResolutionsParams) WithHTTPClient(client *http.Client) *GetResolutionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get resolutions params -func (o *GetResolutionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAlertIDList adds the alertIDList to the get resolutions params -func (o *GetResolutionsParams) WithAlertIDList(alertIDList []string) *GetResolutionsParams { - o.SetAlertIDList(alertIDList) - return o -} - -// SetAlertIDList adds the alertIdList to the get resolutions params -func (o *GetResolutionsParams) SetAlertIDList(alertIDList []string) { - o.AlertIDList = alertIDList -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get resolutions params -func (o *GetResolutionsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetResolutionsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get resolutions params -func (o *GetResolutionsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndDateUsecs adds the endDateUsecs to the get resolutions params -func (o *GetResolutionsParams) WithEndDateUsecs(endDateUsecs *int64) *GetResolutionsParams { - o.SetEndDateUsecs(endDateUsecs) - return o -} - -// SetEndDateUsecs adds the endDateUsecs to the get resolutions params -func (o *GetResolutionsParams) SetEndDateUsecs(endDateUsecs *int64) { - o.EndDateUsecs = endDateUsecs -} - -// WithMaxResolutions adds the maxResolutions to the get resolutions params -func (o *GetResolutionsParams) WithMaxResolutions(maxResolutions int32) *GetResolutionsParams { - o.SetMaxResolutions(maxResolutions) - return o -} - -// SetMaxResolutions adds the maxResolutions to the get resolutions params -func (o *GetResolutionsParams) SetMaxResolutions(maxResolutions int32) { - o.MaxResolutions = maxResolutions -} - -// WithResolutionIDList adds the resolutionIDList to the get resolutions params -func (o *GetResolutionsParams) WithResolutionIDList(resolutionIDList []int64) *GetResolutionsParams { - o.SetResolutionIDList(resolutionIDList) - return o -} - -// SetResolutionIDList adds the resolutionIdList to the get resolutions params -func (o *GetResolutionsParams) SetResolutionIDList(resolutionIDList []int64) { - o.ResolutionIDList = resolutionIDList -} - -// WithStartDateUsecs adds the startDateUsecs to the get resolutions params -func (o *GetResolutionsParams) WithStartDateUsecs(startDateUsecs *int64) *GetResolutionsParams { - o.SetStartDateUsecs(startDateUsecs) - return o -} - -// SetStartDateUsecs adds the startDateUsecs to the get resolutions params -func (o *GetResolutionsParams) SetStartDateUsecs(startDateUsecs *int64) { - o.StartDateUsecs = startDateUsecs -} - -// WithTenantIds adds the tenantIds to the get resolutions params -func (o *GetResolutionsParams) WithTenantIds(tenantIds []string) *GetResolutionsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get resolutions params -func (o *GetResolutionsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetResolutionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AlertIDList != nil { - - // binding items for alertIdList - joinedAlertIDList := o.bindParamAlertIDList(reg) - - // query array param alertIdList - if err := r.SetQueryParam("alertIdList", joinedAlertIDList...); err != nil { - return err - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndDateUsecs != nil { - - // query param endDateUsecs - var qrEndDateUsecs int64 - - if o.EndDateUsecs != nil { - qrEndDateUsecs = *o.EndDateUsecs - } - qEndDateUsecs := swag.FormatInt64(qrEndDateUsecs) - if qEndDateUsecs != "" { - - if err := r.SetQueryParam("endDateUsecs", qEndDateUsecs); err != nil { - return err - } - } - } - - // query param maxResolutions - qrMaxResolutions := o.MaxResolutions - qMaxResolutions := swag.FormatInt32(qrMaxResolutions) - if qMaxResolutions != "" { - - if err := r.SetQueryParam("maxResolutions", qMaxResolutions); err != nil { - return err - } - } - - if o.ResolutionIDList != nil { - - // binding items for resolutionIdList - joinedResolutionIDList := o.bindParamResolutionIDList(reg) - - // query array param resolutionIdList - if err := r.SetQueryParam("resolutionIdList", joinedResolutionIDList...); err != nil { - return err - } - } - - if o.StartDateUsecs != nil { - - // query param startDateUsecs - var qrStartDateUsecs int64 - - if o.StartDateUsecs != nil { - qrStartDateUsecs = *o.StartDateUsecs - } - qStartDateUsecs := swag.FormatInt64(qrStartDateUsecs) - if qStartDateUsecs != "" { - - if err := r.SetQueryParam("startDateUsecs", qStartDateUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetResolutions binds the parameter alertIdList -func (o *GetResolutionsParams) bindParamAlertIDList(formats strfmt.Registry) []string { - alertIDListIR := o.AlertIDList - - var alertIDListIC []string - for _, alertIDListIIR := range alertIDListIR { // explode []string - - alertIDListIIV := alertIDListIIR // string as string - alertIDListIC = append(alertIDListIC, alertIDListIIV) - } - - // items.CollectionFormat: "" - alertIDListIS := swag.JoinByFormat(alertIDListIC, "") - - return alertIDListIS -} - -// bindParamGetResolutions binds the parameter resolutionIdList -func (o *GetResolutionsParams) bindParamResolutionIDList(formats strfmt.Registry) []string { - resolutionIDListIR := o.ResolutionIDList - - var resolutionIDListIC []string - for _, resolutionIDListIIR := range resolutionIDListIR { // explode []int64 - - resolutionIDListIIV := swag.FormatInt64(resolutionIDListIIR) // int64 as string - resolutionIDListIC = append(resolutionIDListIC, resolutionIDListIIV) - } - - // items.CollectionFormat: "" - resolutionIDListIS := swag.JoinByFormat(resolutionIDListIC, "") - - return resolutionIDListIS -} - -// bindParamGetResolutions binds the parameter tenantIds -func (o *GetResolutionsParams) 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/v1/client/alerts/get_resolutions_responses.go b/v1/client/alerts/get_resolutions_responses.go deleted file mode 100644 index b5b11cc5..00000000 --- a/v1/client/alerts/get_resolutions_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetResolutionsReader is a Reader for the GetResolutions structure. -type GetResolutionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetResolutionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetResolutionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetResolutionsDefault(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 - } -} - -// NewGetResolutionsOK creates a GetResolutionsOK with default headers values -func NewGetResolutionsOK() *GetResolutionsOK { - return &GetResolutionsOK{} -} - -/* -GetResolutionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetResolutionsOK struct { - Payload []*models.AlertResolution -} - -// IsSuccess returns true when this get resolutions o k response has a 2xx status code -func (o *GetResolutionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get resolutions o k response has a 3xx status code -func (o *GetResolutionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get resolutions o k response has a 4xx status code -func (o *GetResolutionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get resolutions o k response has a 5xx status code -func (o *GetResolutionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get resolutions o k response a status code equal to that given -func (o *GetResolutionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get resolutions o k response -func (o *GetResolutionsOK) Code() int { - return 200 -} - -func (o *GetResolutionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions][%d] getResolutionsOK %s", 200, payload) -} - -func (o *GetResolutionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions][%d] getResolutionsOK %s", 200, payload) -} - -func (o *GetResolutionsOK) GetPayload() []*models.AlertResolution { - return o.Payload -} - -func (o *GetResolutionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetResolutionsDefault creates a GetResolutionsDefault with default headers values -func NewGetResolutionsDefault(code int) *GetResolutionsDefault { - return &GetResolutionsDefault{ - _statusCode: code, - } -} - -/* -GetResolutionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetResolutionsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get resolutions default response has a 2xx status code -func (o *GetResolutionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get resolutions default response has a 3xx status code -func (o *GetResolutionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get resolutions default response has a 4xx status code -func (o *GetResolutionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get resolutions default response has a 5xx status code -func (o *GetResolutionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get resolutions default response a status code equal to that given -func (o *GetResolutionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get resolutions default response -func (o *GetResolutionsDefault) Code() int { - return o._statusCode -} - -func (o *GetResolutionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions][%d] GetResolutions default %s", o._statusCode, payload) -} - -func (o *GetResolutionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/alertResolutions][%d] GetResolutions default %s", o._statusCode, payload) -} - -func (o *GetResolutionsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetResolutionsDefault) 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/alerts/update_notification_rule_parameters.go b/v1/client/alerts/update_notification_rule_parameters.go deleted file mode 100644 index 4f051d84..00000000 --- a/v1/client/alerts/update_notification_rule_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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" -) - -// NewUpdateNotificationRuleParams creates a new UpdateNotificationRuleParams 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 NewUpdateNotificationRuleParams() *UpdateNotificationRuleParams { - return &UpdateNotificationRuleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateNotificationRuleParamsWithTimeout creates a new UpdateNotificationRuleParams object -// with the ability to set a timeout on a request. -func NewUpdateNotificationRuleParamsWithTimeout(timeout time.Duration) *UpdateNotificationRuleParams { - return &UpdateNotificationRuleParams{ - timeout: timeout, - } -} - -// NewUpdateNotificationRuleParamsWithContext creates a new UpdateNotificationRuleParams object -// with the ability to set a context for a request. -func NewUpdateNotificationRuleParamsWithContext(ctx context.Context) *UpdateNotificationRuleParams { - return &UpdateNotificationRuleParams{ - Context: ctx, - } -} - -// NewUpdateNotificationRuleParamsWithHTTPClient creates a new UpdateNotificationRuleParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateNotificationRuleParamsWithHTTPClient(client *http.Client) *UpdateNotificationRuleParams { - return &UpdateNotificationRuleParams{ - HTTPClient: client, - } -} - -/* -UpdateNotificationRuleParams contains all the parameters to send to the API endpoint - - for the update notification rule operation. - - Typically these are written to a http.Request. -*/ -type UpdateNotificationRuleParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNotificationRuleParams) WithDefaults() *UpdateNotificationRuleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update notification rule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNotificationRuleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update notification rule params -func (o *UpdateNotificationRuleParams) WithTimeout(timeout time.Duration) *UpdateNotificationRuleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update notification rule params -func (o *UpdateNotificationRuleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update notification rule params -func (o *UpdateNotificationRuleParams) WithContext(ctx context.Context) *UpdateNotificationRuleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update notification rule params -func (o *UpdateNotificationRuleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update notification rule params -func (o *UpdateNotificationRuleParams) WithHTTPClient(client *http.Client) *UpdateNotificationRuleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update notification rule params -func (o *UpdateNotificationRuleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateNotificationRuleParams) 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/alerts/update_notification_rule_responses.go b/v1/client/alerts/update_notification_rule_responses.go deleted file mode 100644 index 2f1fb99d..00000000 --- a/v1/client/alerts/update_notification_rule_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateNotificationRuleReader is a Reader for the UpdateNotificationRule structure. -type UpdateNotificationRuleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateNotificationRuleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateNotificationRuleOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateNotificationRuleDefault(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 - } -} - -// NewUpdateNotificationRuleOK creates a UpdateNotificationRuleOK with default headers values -func NewUpdateNotificationRuleOK() *UpdateNotificationRuleOK { - return &UpdateNotificationRuleOK{} -} - -/* -UpdateNotificationRuleOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateNotificationRuleOK struct { - Payload *models.NotificationRule -} - -// IsSuccess returns true when this update notification rule o k response has a 2xx status code -func (o *UpdateNotificationRuleOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update notification rule o k response has a 3xx status code -func (o *UpdateNotificationRuleOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update notification rule o k response has a 4xx status code -func (o *UpdateNotificationRuleOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update notification rule o k response has a 5xx status code -func (o *UpdateNotificationRuleOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update notification rule o k response a status code equal to that given -func (o *UpdateNotificationRuleOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update notification rule o k response -func (o *UpdateNotificationRuleOK) Code() int { - return 200 -} - -func (o *UpdateNotificationRuleOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertNotificationRules][%d] updateNotificationRuleOK %s", 200, payload) -} - -func (o *UpdateNotificationRuleOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertNotificationRules][%d] updateNotificationRuleOK %s", 200, payload) -} - -func (o *UpdateNotificationRuleOK) GetPayload() *models.NotificationRule { - return o.Payload -} - -func (o *UpdateNotificationRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NotificationRule) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateNotificationRuleDefault creates a UpdateNotificationRuleDefault with default headers values -func NewUpdateNotificationRuleDefault(code int) *UpdateNotificationRuleDefault { - return &UpdateNotificationRuleDefault{ - _statusCode: code, - } -} - -/* -UpdateNotificationRuleDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateNotificationRuleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update notification rule default response has a 2xx status code -func (o *UpdateNotificationRuleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update notification rule default response has a 3xx status code -func (o *UpdateNotificationRuleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update notification rule default response has a 4xx status code -func (o *UpdateNotificationRuleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update notification rule default response has a 5xx status code -func (o *UpdateNotificationRuleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update notification rule default response a status code equal to that given -func (o *UpdateNotificationRuleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update notification rule default response -func (o *UpdateNotificationRuleDefault) Code() int { - return o._statusCode -} - -func (o *UpdateNotificationRuleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertNotificationRules][%d] UpdateNotificationRule default %s", o._statusCode, payload) -} - -func (o *UpdateNotificationRuleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertNotificationRules][%d] UpdateNotificationRule default %s", o._statusCode, payload) -} - -func (o *UpdateNotificationRuleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateNotificationRuleDefault) 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/alerts/update_resolution_parameters.go b/v1/client/alerts/update_resolution_parameters.go deleted file mode 100644 index e1193ac5..00000000 --- a/v1/client/alerts/update_resolution_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateResolutionParams creates a new UpdateResolutionParams 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 NewUpdateResolutionParams() *UpdateResolutionParams { - return &UpdateResolutionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateResolutionParamsWithTimeout creates a new UpdateResolutionParams object -// with the ability to set a timeout on a request. -func NewUpdateResolutionParamsWithTimeout(timeout time.Duration) *UpdateResolutionParams { - return &UpdateResolutionParams{ - timeout: timeout, - } -} - -// NewUpdateResolutionParamsWithContext creates a new UpdateResolutionParams object -// with the ability to set a context for a request. -func NewUpdateResolutionParamsWithContext(ctx context.Context) *UpdateResolutionParams { - return &UpdateResolutionParams{ - Context: ctx, - } -} - -// NewUpdateResolutionParamsWithHTTPClient creates a new UpdateResolutionParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateResolutionParamsWithHTTPClient(client *http.Client) *UpdateResolutionParams { - return &UpdateResolutionParams{ - HTTPClient: client, - } -} - -/* -UpdateResolutionParams contains all the parameters to send to the API endpoint - - for the update resolution operation. - - Typically these are written to a http.Request. -*/ -type UpdateResolutionParams struct { - - /* Body. - - Request to apply an existing resolution to the specified Alerts. - */ - Body *models.UpdateResolutionParams - - /* ID. - - Unique id of the Alert Resolution to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update resolution params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateResolutionParams) WithDefaults() *UpdateResolutionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update resolution params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateResolutionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update resolution params -func (o *UpdateResolutionParams) WithTimeout(timeout time.Duration) *UpdateResolutionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update resolution params -func (o *UpdateResolutionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update resolution params -func (o *UpdateResolutionParams) WithContext(ctx context.Context) *UpdateResolutionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update resolution params -func (o *UpdateResolutionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update resolution params -func (o *UpdateResolutionParams) WithHTTPClient(client *http.Client) *UpdateResolutionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update resolution params -func (o *UpdateResolutionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update resolution params -func (o *UpdateResolutionParams) WithBody(body *models.UpdateResolutionParams) *UpdateResolutionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update resolution params -func (o *UpdateResolutionParams) SetBody(body *models.UpdateResolutionParams) { - o.Body = body -} - -// WithID adds the id to the update resolution params -func (o *UpdateResolutionParams) WithID(id int64) *UpdateResolutionParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update resolution params -func (o *UpdateResolutionParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateResolutionParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/alerts/update_resolution_responses.go b/v1/client/alerts/update_resolution_responses.go deleted file mode 100644 index 761e7cd2..00000000 --- a/v1/client/alerts/update_resolution_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alerts - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateResolutionReader is a Reader for the UpdateResolution structure. -type UpdateResolutionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateResolutionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateResolutionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateResolutionDefault(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 - } -} - -// NewUpdateResolutionOK creates a UpdateResolutionOK with default headers values -func NewUpdateResolutionOK() *UpdateResolutionOK { - return &UpdateResolutionOK{} -} - -/* -UpdateResolutionOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateResolutionOK struct { - Payload *models.AlertResolution -} - -// IsSuccess returns true when this update resolution o k response has a 2xx status code -func (o *UpdateResolutionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update resolution o k response has a 3xx status code -func (o *UpdateResolutionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update resolution o k response has a 4xx status code -func (o *UpdateResolutionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update resolution o k response has a 5xx status code -func (o *UpdateResolutionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update resolution o k response a status code equal to that given -func (o *UpdateResolutionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update resolution o k response -func (o *UpdateResolutionOK) Code() int { - return 200 -} - -func (o *UpdateResolutionOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertResolutions/{id}][%d] updateResolutionOK %s", 200, payload) -} - -func (o *UpdateResolutionOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertResolutions/{id}][%d] updateResolutionOK %s", 200, payload) -} - -func (o *UpdateResolutionOK) GetPayload() *models.AlertResolution { - return o.Payload -} - -func (o *UpdateResolutionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AlertResolution) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateResolutionDefault creates a UpdateResolutionDefault with default headers values -func NewUpdateResolutionDefault(code int) *UpdateResolutionDefault { - return &UpdateResolutionDefault{ - _statusCode: code, - } -} - -/* -UpdateResolutionDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateResolutionDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update resolution default response has a 2xx status code -func (o *UpdateResolutionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update resolution default response has a 3xx status code -func (o *UpdateResolutionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update resolution default response has a 4xx status code -func (o *UpdateResolutionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update resolution default response has a 5xx status code -func (o *UpdateResolutionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update resolution default response a status code equal to that given -func (o *UpdateResolutionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update resolution default response -func (o *UpdateResolutionDefault) Code() int { - return o._statusCode -} - -func (o *UpdateResolutionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertResolutions/{id}][%d] UpdateResolution default %s", o._statusCode, payload) -} - -func (o *UpdateResolutionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/alertResolutions/{id}][%d] UpdateResolution default %s", o._statusCode, payload) -} - -func (o *UpdateResolutionDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateResolutionDefault) 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/analytics/analytics_client.go b/v1/client/analytics/analytics_client.go deleted file mode 100644 index 9366e9dc..00000000 --- a/v1/client/analytics/analytics_client.go +++ /dev/null @@ -1,1262 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new analytics API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new analytics API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new analytics API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for analytics API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AnalyzeJar(params *AnalyzeJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AnalyzeJarOK, error) - - CancelMapReduceInstanceRun(params *CancelMapReduceInstanceRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelMapReduceInstanceRunOK, error) - - CreateApplication(params *CreateApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationCreated, error) - - CreateMapper(params *CreateMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateMapperCreated, error) - - CreateReducer(params *CreateReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateReducerCreated, error) - - DeleteApplication(params *DeleteApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteApplicationNoContent, error) - - DeleteMapReduceInstanceRun(params *DeleteMapReduceInstanceRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteMapReduceInstanceRunNoContent, error) - - DeleteMapper(params *DeleteMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteMapperNoContent, error) - - DeleteReducer(params *DeleteReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteReducerNoContent, error) - - DeleteUploadedJar(params *DeleteUploadedJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUploadedJarNoContent, error) - - DownloadMRBaseJar(params *DownloadMRBaseJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadMRBaseJarOK, error) - - DownloadMROutputFiles(params *DownloadMROutputFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadMROutputFilesOK, error) - - GetApplicationByID(params *GetApplicationByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApplicationByIDOK, error) - - GetApplications(params *GetApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApplicationsOK, error) - - GetMRUploadJarPath(params *GetMRUploadJarPathParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMRUploadJarPathOK, error) - - GetMapReduceAppRuns(params *GetMapReduceAppRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapReduceAppRunsOK, error) - - GetMapReduceFileFormats(params *GetMapReduceFileFormatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapReduceFileFormatsOK, error) - - GetMapperByID(params *GetMapperByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapperByIDOK, error) - - GetMappers(params *GetMappersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMappersOK, error) - - GetReducerByID(params *GetReducerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReducerByIDOK, error) - - GetReducers(params *GetReducersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReducersOK, error) - - GetSupportedPatterns(params *GetSupportedPatternsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportedPatternsOK, error) - - RunMapReduceAppInstance(params *RunMapReduceAppInstanceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunMapReduceAppInstanceOK, error) - - SavePattern(params *SavePatternParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SavePatternCreated, error) - - UpdateApplication(params *UpdateApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateApplicationOK, error) - - UpdateMapper(params *UpdateMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateMapperOK, error) - - UpdateReducer(params *UpdateReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateReducerOK, error) - - UploadJar(params *UploadJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadJarOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AnalyzeJar analyzes the uploaded jar - -Returns the result of the jar analysis. -*/ -func (a *Client) AnalyzeJar(params *AnalyzeJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AnalyzeJarOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAnalyzeJarParams() - } - op := &runtime.ClientOperation{ - ID: "AnalyzeJar", - Method: "POST", - PathPattern: "/public/analytics/analyzeJar", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AnalyzeJarReader{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.(*AnalyzeJarOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AnalyzeJarDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CancelMapReduceInstanceRun cancels a specific map reduce instance run - -Returns the result. -*/ -func (a *Client) CancelMapReduceInstanceRun(params *CancelMapReduceInstanceRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelMapReduceInstanceRunOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelMapReduceInstanceRunParams() - } - op := &runtime.ClientOperation{ - ID: "CancelMapReduceInstanceRun", - Method: "PUT", - PathPattern: "/public/analytics/cancelAppInstanceRun/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelMapReduceInstanceRunReader{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.(*CancelMapReduceInstanceRunOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelMapReduceInstanceRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateApplication creates an application - -Returns the created application. -*/ -func (a *Client) CreateApplication(params *CreateApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateApplicationParams() - } - op := &runtime.ClientOperation{ - ID: "CreateApplication", - Method: "POST", - PathPattern: "/public/analytics/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateApplicationReader{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.(*CreateApplicationCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateApplicationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateMapper creates a mapper - -Returns the created mapper. -*/ -func (a *Client) CreateMapper(params *CreateMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateMapperCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateMapperParams() - } - op := &runtime.ClientOperation{ - ID: "CreateMapper", - Method: "POST", - PathPattern: "/public/analytics/mappers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateMapperReader{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.(*CreateMapperCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateMapperDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateReducer creates a reducer - -Returns the created reducer. -*/ -func (a *Client) CreateReducer(params *CreateReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateReducerCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateReducerParams() - } - op := &runtime.ClientOperation{ - ID: "CreateReducer", - Method: "POST", - PathPattern: "/public/analytics/reducers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateReducerReader{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.(*CreateReducerCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateReducerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteApplication deletes an application - -Returns delete status upon completion. -*/ -func (a *Client) DeleteApplication(params *DeleteApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteApplicationNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteApplicationParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteApplication", - Method: "DELETE", - PathPattern: "/public/analytics/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteApplicationReader{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.(*DeleteApplicationNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteApplicationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteMapReduceInstanceRun deletes a map reduce application instance run - -Returns delete status upon completion. -*/ -func (a *Client) DeleteMapReduceInstanceRun(params *DeleteMapReduceInstanceRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteMapReduceInstanceRunNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteMapReduceInstanceRunParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteMapReduceInstanceRun", - Method: "DELETE", - PathPattern: "/public/analytics/mrAppRun/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteMapReduceInstanceRunReader{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.(*DeleteMapReduceInstanceRunNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteMapReduceInstanceRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteMapper deletes a mapper - -Returns delete status upon completion. -*/ -func (a *Client) DeleteMapper(params *DeleteMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteMapperNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteMapperParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteMapper", - Method: "DELETE", - PathPattern: "/public/analytics/mappers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteMapperReader{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.(*DeleteMapperNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteMapperDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteReducer deletes a reducer - -Returns delete status upon completion. -*/ -func (a *Client) DeleteReducer(params *DeleteReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteReducerNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteReducerParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteReducer", - Method: "DELETE", - PathPattern: "/public/analytics/reducers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteReducerReader{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.(*DeleteReducerNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteReducerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteUploadedJar deletes the uploaded jar from temporary location - -Returns delete status upon completion. -*/ -func (a *Client) DeleteUploadedJar(params *DeleteUploadedJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUploadedJarNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUploadedJarParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUploadedJar", - Method: "DELETE", - PathPattern: "/public/analytics/uploadJar", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUploadedJarReader{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.(*DeleteUploadedJarNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUploadedJarDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadMRBaseJar downloads the map reduce base jar - -Returns a struct containing the map reduce base jar from the cluster. -*/ -func (a *Client) DownloadMRBaseJar(params *DownloadMRBaseJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadMRBaseJarOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadMRBaseJarParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadMRBaseJar", - Method: "GET", - PathPattern: "/public/analytics/mrBaseJar", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadMRBaseJarReader{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.(*DownloadMRBaseJarOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadMRBaseJarDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadMROutputFiles downloads map reduce base instance run output files from yoda - -Returns a struct containing the map reduce instance run output files from Yoda. -*/ -func (a *Client) DownloadMROutputFiles(params *DownloadMROutputFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadMROutputFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadMROutputFilesParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadMROutputFiles", - Method: "GET", - PathPattern: "/public/analytics/mrOutputfiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadMROutputFilesReader{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.(*DownloadMROutputFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadMROutputFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetApplicationByID lists details about a single application - -Returns the Application corresponding to the specified Application Id. -*/ -func (a *Client) GetApplicationByID(params *GetApplicationByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApplicationByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetApplicationByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetApplicationById", - Method: "GET", - PathPattern: "/public/analytics/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetApplicationByIDReader{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.(*GetApplicationByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetApplicationByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetApplications lists applications filtered by the specified parameters - - If no parameters are specified, all Applications currently on - -the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetApplications(params *GetApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetApplicationsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetApplicationsParams() - } - op := &runtime.ClientOperation{ - ID: "GetApplications", - Method: "GET", - PathPattern: "/public/analytics/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetApplicationsReader{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.(*GetApplicationsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetApplicationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetMRUploadJarPath gets details about the mounted path to upload jars - -Returns the mounted path to upload Jars. -*/ -func (a *Client) GetMRUploadJarPath(params *GetMRUploadJarPathParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMRUploadJarPathOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMRUploadJarPathParams() - } - op := &runtime.ClientOperation{ - ID: "GetMRUploadJarPath", - Method: "GET", - PathPattern: "/public/analytics/uploadJarPath", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMRUploadJarPathReader{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.(*GetMRUploadJarPathOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMRUploadJarPathDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetMapReduceAppRuns lists map reduce application runs filtered by the specified parameters - - If no parameters are specified, all map reduce application instance runs - -currently on the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetMapReduceAppRuns(params *GetMapReduceAppRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapReduceAppRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapReduceAppRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetMapReduceAppRuns", - Method: "GET", - PathPattern: "/public/analytics/mrAppRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMapReduceAppRunsReader{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.(*GetMapReduceAppRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMapReduceAppRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetMapReduceFileFormats useds to retrieve supported output file formats from a map reduce instance - - The Analytics workbench generates output files from map reduce instances run for - -a particular application. This API returns the output file formats available to -the user for download. -*/ -func (a *Client) GetMapReduceFileFormats(params *GetMapReduceFileFormatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapReduceFileFormatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapReduceFileFormatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetMapReduceFileFormats", - Method: "GET", - PathPattern: "/public/analytics/mrFileFormats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMapReduceFileFormatsReader{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.(*GetMapReduceFileFormatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMapReduceFileFormatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetMapperByID lists details about a single mapper - -Returns the Mapper corresponding to the specified Mapper Id. -*/ -func (a *Client) GetMapperByID(params *GetMapperByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMapperByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapperByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetMapperById", - Method: "GET", - PathPattern: "/public/analytics/mappers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMapperByIDReader{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.(*GetMapperByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMapperByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetMappers lists mappers filtered by the specified parameters - - If no parameters are specified, all Mappers currently on - -the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetMappers(params *GetMappersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMappersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMappersParams() - } - op := &runtime.ClientOperation{ - ID: "GetMappers", - Method: "GET", - PathPattern: "/public/analytics/mappers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMappersReader{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.(*GetMappersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMappersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetReducerByID lists details about a single reducer - -Returns the Reducer corresponding to the specified Reducer Id. -*/ -func (a *Client) GetReducerByID(params *GetReducerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReducerByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetReducerByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetReducerById", - Method: "GET", - PathPattern: "/public/analytics/reducers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetReducerByIDReader{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.(*GetReducerByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetReducerByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetReducers lists reducers filtered by the specified parameters - - If no parameters are specified, all Reducers currently on - -the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetReducers(params *GetReducersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReducersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetReducersParams() - } - op := &runtime.ClientOperation{ - ID: "GetReducers", - Method: "GET", - PathPattern: "/public/analytics/reducers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetReducersReader{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.(*GetReducersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetReducersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetSupportedPatterns useds to retrieve supported patterns available for search in an application - - The Analytics workbench has ability to search for patterns which can be system - -defined or can be user defined. This API returns the patterns available for -search. -*/ -func (a *Client) GetSupportedPatterns(params *GetSupportedPatternsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportedPatternsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSupportedPatternsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSupportedPatterns", - Method: "GET", - PathPattern: "/public/analytics/supportedPatterns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSupportedPatternsReader{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.(*GetSupportedPatternsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSupportedPatternsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RunMapReduceAppInstance runs a map reduce application instance - -Returns the updated Application. -*/ -func (a *Client) RunMapReduceAppInstance(params *RunMapReduceAppInstanceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunMapReduceAppInstanceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRunMapReduceAppInstanceParams() - } - op := &runtime.ClientOperation{ - ID: "RunMapReduceAppInstance", - Method: "PUT", - PathPattern: "/public/analytics/runAppInstance", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RunMapReduceAppInstanceReader{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.(*RunMapReduceAppInstanceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RunMapReduceAppInstanceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SavePattern useds to save user patterns for search in an application - - The Analytics workbench has ability to search for patterns which can be system - -defined or can be user defined. This API enables the user to save patterns for -searching. -*/ -func (a *Client) SavePattern(params *SavePatternParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SavePatternCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSavePatternParams() - } - op := &runtime.ClientOperation{ - ID: "SavePattern", - Method: "PUT", - PathPattern: "/public/analytics/supportedPatterns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SavePatternReader{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.(*SavePatternCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SavePatternDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateApplication updates an application - -Returns the updated Application. -*/ -func (a *Client) UpdateApplication(params *UpdateApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateApplicationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateApplicationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateApplication", - Method: "PUT", - PathPattern: "/public/analytics/apps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateApplicationReader{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.(*UpdateApplicationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateApplicationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateMapper updates a mapper - -Returns the updated Mapper. -*/ -func (a *Client) UpdateMapper(params *UpdateMapperParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateMapperOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateMapperParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateMapper", - Method: "PUT", - PathPattern: "/public/analytics/mappers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateMapperReader{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.(*UpdateMapperOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateMapperDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateReducer updates a reducer - -Returns the updated reducer. -*/ -func (a *Client) UpdateReducer(params *UpdateReducerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateReducerOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateReducerParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateReducer", - Method: "PUT", - PathPattern: "/public/analytics/reducers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateReducerReader{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.(*UpdateReducerOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateReducerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UploadJar uploads a jar to pre specified yoda internal view - - Returns a struct containing the jar name and local mount path where the jar - -will be uploaded. -*/ -func (a *Client) UploadJar(params *UploadJarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadJarOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUploadJarParams() - } - op := &runtime.ClientOperation{ - ID: "UploadJar", - Method: "POST", - PathPattern: "/public/analytics/uploadJar", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UploadJarReader{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.(*UploadJarOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UploadJarDefault) - 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/analytics/analyze_jar_parameters.go b/v1/client/analytics/analyze_jar_parameters.go deleted file mode 100644 index 65ddb41f..00000000 --- a/v1/client/analytics/analyze_jar_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAnalyzeJarParams creates a new AnalyzeJarParams 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 NewAnalyzeJarParams() *AnalyzeJarParams { - return &AnalyzeJarParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAnalyzeJarParamsWithTimeout creates a new AnalyzeJarParams object -// with the ability to set a timeout on a request. -func NewAnalyzeJarParamsWithTimeout(timeout time.Duration) *AnalyzeJarParams { - return &AnalyzeJarParams{ - timeout: timeout, - } -} - -// NewAnalyzeJarParamsWithContext creates a new AnalyzeJarParams object -// with the ability to set a context for a request. -func NewAnalyzeJarParamsWithContext(ctx context.Context) *AnalyzeJarParams { - return &AnalyzeJarParams{ - Context: ctx, - } -} - -// NewAnalyzeJarParamsWithHTTPClient creates a new AnalyzeJarParams object -// with the ability to set a custom HTTPClient for a request. -func NewAnalyzeJarParamsWithHTTPClient(client *http.Client) *AnalyzeJarParams { - return &AnalyzeJarParams{ - HTTPClient: client, - } -} - -/* -AnalyzeJarParams contains all the parameters to send to the API endpoint - - for the analyze jar operation. - - Typically these are written to a http.Request. -*/ -type AnalyzeJarParams struct { - - // Body. - Body *models.AnalyseJarArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the analyze jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AnalyzeJarParams) WithDefaults() *AnalyzeJarParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the analyze jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AnalyzeJarParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the analyze jar params -func (o *AnalyzeJarParams) WithTimeout(timeout time.Duration) *AnalyzeJarParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the analyze jar params -func (o *AnalyzeJarParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the analyze jar params -func (o *AnalyzeJarParams) WithContext(ctx context.Context) *AnalyzeJarParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the analyze jar params -func (o *AnalyzeJarParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the analyze jar params -func (o *AnalyzeJarParams) WithHTTPClient(client *http.Client) *AnalyzeJarParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the analyze jar params -func (o *AnalyzeJarParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the analyze jar params -func (o *AnalyzeJarParams) WithBody(body *models.AnalyseJarArg) *AnalyzeJarParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the analyze jar params -func (o *AnalyzeJarParams) SetBody(body *models.AnalyseJarArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AnalyzeJarParams) 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/analytics/analyze_jar_responses.go b/v1/client/analytics/analyze_jar_responses.go deleted file mode 100644 index 091c7510..00000000 --- a/v1/client/analytics/analyze_jar_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AnalyzeJarReader is a Reader for the AnalyzeJar structure. -type AnalyzeJarReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AnalyzeJarReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAnalyzeJarOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAnalyzeJarDefault(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 - } -} - -// NewAnalyzeJarOK creates a AnalyzeJarOK with default headers values -func NewAnalyzeJarOK() *AnalyzeJarOK { - return &AnalyzeJarOK{} -} - -/* -AnalyzeJarOK describes a response with status code 200, with default header values. - -Success -*/ -type AnalyzeJarOK struct { - Payload *models.AnalyseJarResult -} - -// IsSuccess returns true when this analyze jar o k response has a 2xx status code -func (o *AnalyzeJarOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this analyze jar o k response has a 3xx status code -func (o *AnalyzeJarOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this analyze jar o k response has a 4xx status code -func (o *AnalyzeJarOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this analyze jar o k response has a 5xx status code -func (o *AnalyzeJarOK) IsServerError() bool { - return false -} - -// IsCode returns true when this analyze jar o k response a status code equal to that given -func (o *AnalyzeJarOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the analyze jar o k response -func (o *AnalyzeJarOK) Code() int { - return 200 -} - -func (o *AnalyzeJarOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/analyzeJar][%d] analyzeJarOK %s", 200, payload) -} - -func (o *AnalyzeJarOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/analyzeJar][%d] analyzeJarOK %s", 200, payload) -} - -func (o *AnalyzeJarOK) GetPayload() *models.AnalyseJarResult { - return o.Payload -} - -func (o *AnalyzeJarOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AnalyseJarResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAnalyzeJarDefault creates a AnalyzeJarDefault with default headers values -func NewAnalyzeJarDefault(code int) *AnalyzeJarDefault { - return &AnalyzeJarDefault{ - _statusCode: code, - } -} - -/* -AnalyzeJarDefault describes a response with status code -1, with default header values. - -Error -*/ -type AnalyzeJarDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this analyze jar default response has a 2xx status code -func (o *AnalyzeJarDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this analyze jar default response has a 3xx status code -func (o *AnalyzeJarDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this analyze jar default response has a 4xx status code -func (o *AnalyzeJarDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this analyze jar default response has a 5xx status code -func (o *AnalyzeJarDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this analyze jar default response a status code equal to that given -func (o *AnalyzeJarDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the analyze jar default response -func (o *AnalyzeJarDefault) Code() int { - return o._statusCode -} - -func (o *AnalyzeJarDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/analyzeJar][%d] AnalyzeJar default %s", o._statusCode, payload) -} - -func (o *AnalyzeJarDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/analyzeJar][%d] AnalyzeJar default %s", o._statusCode, payload) -} - -func (o *AnalyzeJarDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AnalyzeJarDefault) 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/analytics/cancel_map_reduce_instance_run_parameters.go b/v1/client/analytics/cancel_map_reduce_instance_run_parameters.go deleted file mode 100644 index 15404e5b..00000000 --- a/v1/client/analytics/cancel_map_reduce_instance_run_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewCancelMapReduceInstanceRunParams creates a new CancelMapReduceInstanceRunParams 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 NewCancelMapReduceInstanceRunParams() *CancelMapReduceInstanceRunParams { - return &CancelMapReduceInstanceRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelMapReduceInstanceRunParamsWithTimeout creates a new CancelMapReduceInstanceRunParams object -// with the ability to set a timeout on a request. -func NewCancelMapReduceInstanceRunParamsWithTimeout(timeout time.Duration) *CancelMapReduceInstanceRunParams { - return &CancelMapReduceInstanceRunParams{ - timeout: timeout, - } -} - -// NewCancelMapReduceInstanceRunParamsWithContext creates a new CancelMapReduceInstanceRunParams object -// with the ability to set a context for a request. -func NewCancelMapReduceInstanceRunParamsWithContext(ctx context.Context) *CancelMapReduceInstanceRunParams { - return &CancelMapReduceInstanceRunParams{ - Context: ctx, - } -} - -// NewCancelMapReduceInstanceRunParamsWithHTTPClient creates a new CancelMapReduceInstanceRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelMapReduceInstanceRunParamsWithHTTPClient(client *http.Client) *CancelMapReduceInstanceRunParams { - return &CancelMapReduceInstanceRunParams{ - HTTPClient: client, - } -} - -/* -CancelMapReduceInstanceRunParams contains all the parameters to send to the API endpoint - - for the cancel map reduce instance run operation. - - Typically these are written to a http.Request. -*/ -type CancelMapReduceInstanceRunParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel map reduce instance run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelMapReduceInstanceRunParams) WithDefaults() *CancelMapReduceInstanceRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel map reduce instance run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelMapReduceInstanceRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) WithTimeout(timeout time.Duration) *CancelMapReduceInstanceRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) WithContext(ctx context.Context) *CancelMapReduceInstanceRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) WithHTTPClient(client *http.Client) *CancelMapReduceInstanceRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) WithID(id int64) *CancelMapReduceInstanceRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel map reduce instance run params -func (o *CancelMapReduceInstanceRunParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelMapReduceInstanceRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/cancel_map_reduce_instance_run_responses.go b/v1/client/analytics/cancel_map_reduce_instance_run_responses.go deleted file mode 100644 index 557c75f0..00000000 --- a/v1/client/analytics/cancel_map_reduce_instance_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CancelMapReduceInstanceRunReader is a Reader for the CancelMapReduceInstanceRun structure. -type CancelMapReduceInstanceRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelMapReduceInstanceRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCancelMapReduceInstanceRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelMapReduceInstanceRunDefault(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 - } -} - -// NewCancelMapReduceInstanceRunOK creates a CancelMapReduceInstanceRunOK with default headers values -func NewCancelMapReduceInstanceRunOK() *CancelMapReduceInstanceRunOK { - return &CancelMapReduceInstanceRunOK{} -} - -/* -CancelMapReduceInstanceRunOK describes a response with status code 200, with default header values. - -Success -*/ -type CancelMapReduceInstanceRunOK struct { - Payload *models.KillMapReduceInstanceResult -} - -// IsSuccess returns true when this cancel map reduce instance run o k response has a 2xx status code -func (o *CancelMapReduceInstanceRunOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel map reduce instance run o k response has a 3xx status code -func (o *CancelMapReduceInstanceRunOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel map reduce instance run o k response has a 4xx status code -func (o *CancelMapReduceInstanceRunOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel map reduce instance run o k response has a 5xx status code -func (o *CancelMapReduceInstanceRunOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel map reduce instance run o k response a status code equal to that given -func (o *CancelMapReduceInstanceRunOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cancel map reduce instance run o k response -func (o *CancelMapReduceInstanceRunOK) Code() int { - return 200 -} - -func (o *CancelMapReduceInstanceRunOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/cancelAppInstanceRun/{id}][%d] cancelMapReduceInstanceRunOK %s", 200, payload) -} - -func (o *CancelMapReduceInstanceRunOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/cancelAppInstanceRun/{id}][%d] cancelMapReduceInstanceRunOK %s", 200, payload) -} - -func (o *CancelMapReduceInstanceRunOK) GetPayload() *models.KillMapReduceInstanceResult { - return o.Payload -} - -func (o *CancelMapReduceInstanceRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KillMapReduceInstanceResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCancelMapReduceInstanceRunDefault creates a CancelMapReduceInstanceRunDefault with default headers values -func NewCancelMapReduceInstanceRunDefault(code int) *CancelMapReduceInstanceRunDefault { - return &CancelMapReduceInstanceRunDefault{ - _statusCode: code, - } -} - -/* -CancelMapReduceInstanceRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelMapReduceInstanceRunDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this cancel map reduce instance run default response has a 2xx status code -func (o *CancelMapReduceInstanceRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel map reduce instance run default response has a 3xx status code -func (o *CancelMapReduceInstanceRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel map reduce instance run default response has a 4xx status code -func (o *CancelMapReduceInstanceRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel map reduce instance run default response has a 5xx status code -func (o *CancelMapReduceInstanceRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel map reduce instance run default response a status code equal to that given -func (o *CancelMapReduceInstanceRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel map reduce instance run default response -func (o *CancelMapReduceInstanceRunDefault) Code() int { - return o._statusCode -} - -func (o *CancelMapReduceInstanceRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/cancelAppInstanceRun/{id}][%d] CancelMapReduceInstanceRun default %s", o._statusCode, payload) -} - -func (o *CancelMapReduceInstanceRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/cancelAppInstanceRun/{id}][%d] CancelMapReduceInstanceRun default %s", o._statusCode, payload) -} - -func (o *CancelMapReduceInstanceRunDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CancelMapReduceInstanceRunDefault) 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/analytics/create_application_parameters.go b/v1/client/analytics/create_application_parameters.go deleted file mode 100644 index 3dda809d..00000000 --- a/v1/client/analytics/create_application_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateApplicationParams creates a new CreateApplicationParams 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 NewCreateApplicationParams() *CreateApplicationParams { - return &CreateApplicationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateApplicationParamsWithTimeout creates a new CreateApplicationParams object -// with the ability to set a timeout on a request. -func NewCreateApplicationParamsWithTimeout(timeout time.Duration) *CreateApplicationParams { - return &CreateApplicationParams{ - timeout: timeout, - } -} - -// NewCreateApplicationParamsWithContext creates a new CreateApplicationParams object -// with the ability to set a context for a request. -func NewCreateApplicationParamsWithContext(ctx context.Context) *CreateApplicationParams { - return &CreateApplicationParams{ - Context: ctx, - } -} - -// NewCreateApplicationParamsWithHTTPClient creates a new CreateApplicationParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateApplicationParamsWithHTTPClient(client *http.Client) *CreateApplicationParams { - return &CreateApplicationParams{ - HTTPClient: client, - } -} - -/* -CreateApplicationParams contains all the parameters to send to the API endpoint - - for the create application operation. - - Typically these are written to a http.Request. -*/ -type CreateApplicationParams struct { - - // Body. - Body *models.MapReduceInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationParams) WithDefaults() *CreateApplicationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create application params -func (o *CreateApplicationParams) WithTimeout(timeout time.Duration) *CreateApplicationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create application params -func (o *CreateApplicationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create application params -func (o *CreateApplicationParams) WithContext(ctx context.Context) *CreateApplicationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create application params -func (o *CreateApplicationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create application params -func (o *CreateApplicationParams) WithHTTPClient(client *http.Client) *CreateApplicationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create application params -func (o *CreateApplicationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create application params -func (o *CreateApplicationParams) WithBody(body *models.MapReduceInfo) *CreateApplicationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create application params -func (o *CreateApplicationParams) SetBody(body *models.MapReduceInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateApplicationParams) 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/analytics/create_application_responses.go b/v1/client/analytics/create_application_responses.go deleted file mode 100644 index 33bd0b28..00000000 --- a/v1/client/analytics/create_application_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateApplicationReader is a Reader for the CreateApplication structure. -type CreateApplicationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateApplicationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateApplicationCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateApplicationDefault(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 - } -} - -// NewCreateApplicationCreated creates a CreateApplicationCreated with default headers values -func NewCreateApplicationCreated() *CreateApplicationCreated { - return &CreateApplicationCreated{} -} - -/* -CreateApplicationCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateApplicationCreated struct { - Payload *models.MapReduceInfo -} - -// IsSuccess returns true when this create application created response has a 2xx status code -func (o *CreateApplicationCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create application created response has a 3xx status code -func (o *CreateApplicationCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create application created response has a 4xx status code -func (o *CreateApplicationCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create application created response has a 5xx status code -func (o *CreateApplicationCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create application created response a status code equal to that given -func (o *CreateApplicationCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create application created response -func (o *CreateApplicationCreated) Code() int { - return 201 -} - -func (o *CreateApplicationCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/apps][%d] createApplicationCreated %s", 201, payload) -} - -func (o *CreateApplicationCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/apps][%d] createApplicationCreated %s", 201, payload) -} - -func (o *CreateApplicationCreated) GetPayload() *models.MapReduceInfo { - return o.Payload -} - -func (o *CreateApplicationCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapReduceInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateApplicationDefault creates a CreateApplicationDefault with default headers values -func NewCreateApplicationDefault(code int) *CreateApplicationDefault { - return &CreateApplicationDefault{ - _statusCode: code, - } -} - -/* -CreateApplicationDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateApplicationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create application default response has a 2xx status code -func (o *CreateApplicationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create application default response has a 3xx status code -func (o *CreateApplicationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create application default response has a 4xx status code -func (o *CreateApplicationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create application default response has a 5xx status code -func (o *CreateApplicationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create application default response a status code equal to that given -func (o *CreateApplicationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create application default response -func (o *CreateApplicationDefault) Code() int { - return o._statusCode -} - -func (o *CreateApplicationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/apps][%d] CreateApplication default %s", o._statusCode, payload) -} - -func (o *CreateApplicationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/apps][%d] CreateApplication default %s", o._statusCode, payload) -} - -func (o *CreateApplicationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateApplicationDefault) 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/analytics/create_mapper_parameters.go b/v1/client/analytics/create_mapper_parameters.go deleted file mode 100644 index a13a8cdf..00000000 --- a/v1/client/analytics/create_mapper_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateMapperParams creates a new CreateMapperParams 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 NewCreateMapperParams() *CreateMapperParams { - return &CreateMapperParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateMapperParamsWithTimeout creates a new CreateMapperParams object -// with the ability to set a timeout on a request. -func NewCreateMapperParamsWithTimeout(timeout time.Duration) *CreateMapperParams { - return &CreateMapperParams{ - timeout: timeout, - } -} - -// NewCreateMapperParamsWithContext creates a new CreateMapperParams object -// with the ability to set a context for a request. -func NewCreateMapperParamsWithContext(ctx context.Context) *CreateMapperParams { - return &CreateMapperParams{ - Context: ctx, - } -} - -// NewCreateMapperParamsWithHTTPClient creates a new CreateMapperParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateMapperParamsWithHTTPClient(client *http.Client) *CreateMapperParams { - return &CreateMapperParams{ - HTTPClient: client, - } -} - -/* -CreateMapperParams contains all the parameters to send to the API endpoint - - for the create mapper operation. - - Typically these are written to a http.Request. -*/ -type CreateMapperParams struct { - - // Body. - Body *models.MapperInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateMapperParams) WithDefaults() *CreateMapperParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateMapperParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create mapper params -func (o *CreateMapperParams) WithTimeout(timeout time.Duration) *CreateMapperParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create mapper params -func (o *CreateMapperParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create mapper params -func (o *CreateMapperParams) WithContext(ctx context.Context) *CreateMapperParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create mapper params -func (o *CreateMapperParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create mapper params -func (o *CreateMapperParams) WithHTTPClient(client *http.Client) *CreateMapperParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create mapper params -func (o *CreateMapperParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create mapper params -func (o *CreateMapperParams) WithBody(body *models.MapperInfo) *CreateMapperParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create mapper params -func (o *CreateMapperParams) SetBody(body *models.MapperInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateMapperParams) 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/analytics/create_mapper_responses.go b/v1/client/analytics/create_mapper_responses.go deleted file mode 100644 index ecf25897..00000000 --- a/v1/client/analytics/create_mapper_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateMapperReader is a Reader for the CreateMapper structure. -type CreateMapperReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateMapperReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateMapperCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateMapperDefault(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 - } -} - -// NewCreateMapperCreated creates a CreateMapperCreated with default headers values -func NewCreateMapperCreated() *CreateMapperCreated { - return &CreateMapperCreated{} -} - -/* -CreateMapperCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateMapperCreated struct { - Payload *models.MapperInfo -} - -// IsSuccess returns true when this create mapper created response has a 2xx status code -func (o *CreateMapperCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create mapper created response has a 3xx status code -func (o *CreateMapperCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create mapper created response has a 4xx status code -func (o *CreateMapperCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create mapper created response has a 5xx status code -func (o *CreateMapperCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create mapper created response a status code equal to that given -func (o *CreateMapperCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create mapper created response -func (o *CreateMapperCreated) Code() int { - return 201 -} - -func (o *CreateMapperCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/mappers][%d] createMapperCreated %s", 201, payload) -} - -func (o *CreateMapperCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/mappers][%d] createMapperCreated %s", 201, payload) -} - -func (o *CreateMapperCreated) GetPayload() *models.MapperInfo { - return o.Payload -} - -func (o *CreateMapperCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapperInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateMapperDefault creates a CreateMapperDefault with default headers values -func NewCreateMapperDefault(code int) *CreateMapperDefault { - return &CreateMapperDefault{ - _statusCode: code, - } -} - -/* -CreateMapperDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateMapperDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create mapper default response has a 2xx status code -func (o *CreateMapperDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create mapper default response has a 3xx status code -func (o *CreateMapperDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create mapper default response has a 4xx status code -func (o *CreateMapperDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create mapper default response has a 5xx status code -func (o *CreateMapperDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create mapper default response a status code equal to that given -func (o *CreateMapperDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create mapper default response -func (o *CreateMapperDefault) Code() int { - return o._statusCode -} - -func (o *CreateMapperDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/mappers][%d] CreateMapper default %s", o._statusCode, payload) -} - -func (o *CreateMapperDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/mappers][%d] CreateMapper default %s", o._statusCode, payload) -} - -func (o *CreateMapperDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateMapperDefault) 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/analytics/create_reducer_parameters.go b/v1/client/analytics/create_reducer_parameters.go deleted file mode 100644 index feb30ede..00000000 --- a/v1/client/analytics/create_reducer_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateReducerParams creates a new CreateReducerParams 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 NewCreateReducerParams() *CreateReducerParams { - return &CreateReducerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateReducerParamsWithTimeout creates a new CreateReducerParams object -// with the ability to set a timeout on a request. -func NewCreateReducerParamsWithTimeout(timeout time.Duration) *CreateReducerParams { - return &CreateReducerParams{ - timeout: timeout, - } -} - -// NewCreateReducerParamsWithContext creates a new CreateReducerParams object -// with the ability to set a context for a request. -func NewCreateReducerParamsWithContext(ctx context.Context) *CreateReducerParams { - return &CreateReducerParams{ - Context: ctx, - } -} - -// NewCreateReducerParamsWithHTTPClient creates a new CreateReducerParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateReducerParamsWithHTTPClient(client *http.Client) *CreateReducerParams { - return &CreateReducerParams{ - HTTPClient: client, - } -} - -/* -CreateReducerParams contains all the parameters to send to the API endpoint - - for the create reducer operation. - - Typically these are written to a http.Request. -*/ -type CreateReducerParams struct { - - // Body. - Body *models.ReducerInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateReducerParams) WithDefaults() *CreateReducerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateReducerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create reducer params -func (o *CreateReducerParams) WithTimeout(timeout time.Duration) *CreateReducerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create reducer params -func (o *CreateReducerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create reducer params -func (o *CreateReducerParams) WithContext(ctx context.Context) *CreateReducerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create reducer params -func (o *CreateReducerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create reducer params -func (o *CreateReducerParams) WithHTTPClient(client *http.Client) *CreateReducerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create reducer params -func (o *CreateReducerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create reducer params -func (o *CreateReducerParams) WithBody(body *models.ReducerInfo) *CreateReducerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create reducer params -func (o *CreateReducerParams) SetBody(body *models.ReducerInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateReducerParams) 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/analytics/create_reducer_responses.go b/v1/client/analytics/create_reducer_responses.go deleted file mode 100644 index 673d825a..00000000 --- a/v1/client/analytics/create_reducer_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateReducerReader is a Reader for the CreateReducer structure. -type CreateReducerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateReducerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateReducerCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateReducerDefault(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 - } -} - -// NewCreateReducerCreated creates a CreateReducerCreated with default headers values -func NewCreateReducerCreated() *CreateReducerCreated { - return &CreateReducerCreated{} -} - -/* -CreateReducerCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateReducerCreated struct { - Payload *models.ReducerInfo -} - -// IsSuccess returns true when this create reducer created response has a 2xx status code -func (o *CreateReducerCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create reducer created response has a 3xx status code -func (o *CreateReducerCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create reducer created response has a 4xx status code -func (o *CreateReducerCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create reducer created response has a 5xx status code -func (o *CreateReducerCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create reducer created response a status code equal to that given -func (o *CreateReducerCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create reducer created response -func (o *CreateReducerCreated) Code() int { - return 201 -} - -func (o *CreateReducerCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/reducers][%d] createReducerCreated %s", 201, payload) -} - -func (o *CreateReducerCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/reducers][%d] createReducerCreated %s", 201, payload) -} - -func (o *CreateReducerCreated) GetPayload() *models.ReducerInfo { - return o.Payload -} - -func (o *CreateReducerCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReducerInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateReducerDefault creates a CreateReducerDefault with default headers values -func NewCreateReducerDefault(code int) *CreateReducerDefault { - return &CreateReducerDefault{ - _statusCode: code, - } -} - -/* -CreateReducerDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateReducerDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create reducer default response has a 2xx status code -func (o *CreateReducerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create reducer default response has a 3xx status code -func (o *CreateReducerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create reducer default response has a 4xx status code -func (o *CreateReducerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create reducer default response has a 5xx status code -func (o *CreateReducerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create reducer default response a status code equal to that given -func (o *CreateReducerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create reducer default response -func (o *CreateReducerDefault) Code() int { - return o._statusCode -} - -func (o *CreateReducerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/reducers][%d] CreateReducer default %s", o._statusCode, payload) -} - -func (o *CreateReducerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/reducers][%d] CreateReducer default %s", o._statusCode, payload) -} - -func (o *CreateReducerDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateReducerDefault) 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/analytics/delete_application_parameters.go b/v1/client/analytics/delete_application_parameters.go deleted file mode 100644 index 115afe5f..00000000 --- a/v1/client/analytics/delete_application_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewDeleteApplicationParams creates a new DeleteApplicationParams 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 NewDeleteApplicationParams() *DeleteApplicationParams { - return &DeleteApplicationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteApplicationParamsWithTimeout creates a new DeleteApplicationParams object -// with the ability to set a timeout on a request. -func NewDeleteApplicationParamsWithTimeout(timeout time.Duration) *DeleteApplicationParams { - return &DeleteApplicationParams{ - timeout: timeout, - } -} - -// NewDeleteApplicationParamsWithContext creates a new DeleteApplicationParams object -// with the ability to set a context for a request. -func NewDeleteApplicationParamsWithContext(ctx context.Context) *DeleteApplicationParams { - return &DeleteApplicationParams{ - Context: ctx, - } -} - -// NewDeleteApplicationParamsWithHTTPClient creates a new DeleteApplicationParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteApplicationParamsWithHTTPClient(client *http.Client) *DeleteApplicationParams { - return &DeleteApplicationParams{ - HTTPClient: client, - } -} - -/* -DeleteApplicationParams contains all the parameters to send to the API endpoint - - for the delete application operation. - - Typically these are written to a http.Request. -*/ -type DeleteApplicationParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteApplicationParams) WithDefaults() *DeleteApplicationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteApplicationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete application params -func (o *DeleteApplicationParams) WithTimeout(timeout time.Duration) *DeleteApplicationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete application params -func (o *DeleteApplicationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete application params -func (o *DeleteApplicationParams) WithContext(ctx context.Context) *DeleteApplicationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete application params -func (o *DeleteApplicationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete application params -func (o *DeleteApplicationParams) WithHTTPClient(client *http.Client) *DeleteApplicationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete application params -func (o *DeleteApplicationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete application params -func (o *DeleteApplicationParams) WithID(id int64) *DeleteApplicationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete application params -func (o *DeleteApplicationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteApplicationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/delete_application_responses.go b/v1/client/analytics/delete_application_responses.go deleted file mode 100644 index 36753ee4..00000000 --- a/v1/client/analytics/delete_application_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteApplicationReader is a Reader for the DeleteApplication structure. -type DeleteApplicationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteApplicationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteApplicationNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteApplicationDefault(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 - } -} - -// NewDeleteApplicationNoContent creates a DeleteApplicationNoContent with default headers values -func NewDeleteApplicationNoContent() *DeleteApplicationNoContent { - return &DeleteApplicationNoContent{} -} - -/* -DeleteApplicationNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteApplicationNoContent struct { -} - -// IsSuccess returns true when this delete application no content response has a 2xx status code -func (o *DeleteApplicationNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete application no content response has a 3xx status code -func (o *DeleteApplicationNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete application no content response has a 4xx status code -func (o *DeleteApplicationNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete application no content response has a 5xx status code -func (o *DeleteApplicationNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete application no content response a status code equal to that given -func (o *DeleteApplicationNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete application no content response -func (o *DeleteApplicationNoContent) Code() int { - return 204 -} - -func (o *DeleteApplicationNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/analytics/apps/{id}][%d] deleteApplicationNoContent", 204) -} - -func (o *DeleteApplicationNoContent) String() string { - return fmt.Sprintf("[DELETE /public/analytics/apps/{id}][%d] deleteApplicationNoContent", 204) -} - -func (o *DeleteApplicationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteApplicationDefault creates a DeleteApplicationDefault with default headers values -func NewDeleteApplicationDefault(code int) *DeleteApplicationDefault { - return &DeleteApplicationDefault{ - _statusCode: code, - } -} - -/* -DeleteApplicationDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteApplicationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete application default response has a 2xx status code -func (o *DeleteApplicationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete application default response has a 3xx status code -func (o *DeleteApplicationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete application default response has a 4xx status code -func (o *DeleteApplicationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete application default response has a 5xx status code -func (o *DeleteApplicationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete application default response a status code equal to that given -func (o *DeleteApplicationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete application default response -func (o *DeleteApplicationDefault) Code() int { - return o._statusCode -} - -func (o *DeleteApplicationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/apps/{id}][%d] DeleteApplication default %s", o._statusCode, payload) -} - -func (o *DeleteApplicationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/apps/{id}][%d] DeleteApplication default %s", o._statusCode, payload) -} - -func (o *DeleteApplicationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteApplicationDefault) 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/analytics/delete_map_reduce_instance_run_parameters.go b/v1/client/analytics/delete_map_reduce_instance_run_parameters.go deleted file mode 100644 index 8d18b98d..00000000 --- a/v1/client/analytics/delete_map_reduce_instance_run_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewDeleteMapReduceInstanceRunParams creates a new DeleteMapReduceInstanceRunParams 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 NewDeleteMapReduceInstanceRunParams() *DeleteMapReduceInstanceRunParams { - return &DeleteMapReduceInstanceRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteMapReduceInstanceRunParamsWithTimeout creates a new DeleteMapReduceInstanceRunParams object -// with the ability to set a timeout on a request. -func NewDeleteMapReduceInstanceRunParamsWithTimeout(timeout time.Duration) *DeleteMapReduceInstanceRunParams { - return &DeleteMapReduceInstanceRunParams{ - timeout: timeout, - } -} - -// NewDeleteMapReduceInstanceRunParamsWithContext creates a new DeleteMapReduceInstanceRunParams object -// with the ability to set a context for a request. -func NewDeleteMapReduceInstanceRunParamsWithContext(ctx context.Context) *DeleteMapReduceInstanceRunParams { - return &DeleteMapReduceInstanceRunParams{ - Context: ctx, - } -} - -// NewDeleteMapReduceInstanceRunParamsWithHTTPClient creates a new DeleteMapReduceInstanceRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteMapReduceInstanceRunParamsWithHTTPClient(client *http.Client) *DeleteMapReduceInstanceRunParams { - return &DeleteMapReduceInstanceRunParams{ - HTTPClient: client, - } -} - -/* -DeleteMapReduceInstanceRunParams contains all the parameters to send to the API endpoint - - for the delete map reduce instance run operation. - - Typically these are written to a http.Request. -*/ -type DeleteMapReduceInstanceRunParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete map reduce instance run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteMapReduceInstanceRunParams) WithDefaults() *DeleteMapReduceInstanceRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete map reduce instance run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteMapReduceInstanceRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) WithTimeout(timeout time.Duration) *DeleteMapReduceInstanceRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) WithContext(ctx context.Context) *DeleteMapReduceInstanceRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) WithHTTPClient(client *http.Client) *DeleteMapReduceInstanceRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) WithID(id int64) *DeleteMapReduceInstanceRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete map reduce instance run params -func (o *DeleteMapReduceInstanceRunParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteMapReduceInstanceRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/delete_map_reduce_instance_run_responses.go b/v1/client/analytics/delete_map_reduce_instance_run_responses.go deleted file mode 100644 index 131f882d..00000000 --- a/v1/client/analytics/delete_map_reduce_instance_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteMapReduceInstanceRunReader is a Reader for the DeleteMapReduceInstanceRun structure. -type DeleteMapReduceInstanceRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteMapReduceInstanceRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteMapReduceInstanceRunNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteMapReduceInstanceRunDefault(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 - } -} - -// NewDeleteMapReduceInstanceRunNoContent creates a DeleteMapReduceInstanceRunNoContent with default headers values -func NewDeleteMapReduceInstanceRunNoContent() *DeleteMapReduceInstanceRunNoContent { - return &DeleteMapReduceInstanceRunNoContent{} -} - -/* -DeleteMapReduceInstanceRunNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteMapReduceInstanceRunNoContent struct { -} - -// IsSuccess returns true when this delete map reduce instance run no content response has a 2xx status code -func (o *DeleteMapReduceInstanceRunNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete map reduce instance run no content response has a 3xx status code -func (o *DeleteMapReduceInstanceRunNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete map reduce instance run no content response has a 4xx status code -func (o *DeleteMapReduceInstanceRunNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete map reduce instance run no content response has a 5xx status code -func (o *DeleteMapReduceInstanceRunNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete map reduce instance run no content response a status code equal to that given -func (o *DeleteMapReduceInstanceRunNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete map reduce instance run no content response -func (o *DeleteMapReduceInstanceRunNoContent) Code() int { - return 204 -} - -func (o *DeleteMapReduceInstanceRunNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/analytics/mrAppRun/{id}][%d] deleteMapReduceInstanceRunNoContent", 204) -} - -func (o *DeleteMapReduceInstanceRunNoContent) String() string { - return fmt.Sprintf("[DELETE /public/analytics/mrAppRun/{id}][%d] deleteMapReduceInstanceRunNoContent", 204) -} - -func (o *DeleteMapReduceInstanceRunNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteMapReduceInstanceRunDefault creates a DeleteMapReduceInstanceRunDefault with default headers values -func NewDeleteMapReduceInstanceRunDefault(code int) *DeleteMapReduceInstanceRunDefault { - return &DeleteMapReduceInstanceRunDefault{ - _statusCode: code, - } -} - -/* -DeleteMapReduceInstanceRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteMapReduceInstanceRunDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete map reduce instance run default response has a 2xx status code -func (o *DeleteMapReduceInstanceRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete map reduce instance run default response has a 3xx status code -func (o *DeleteMapReduceInstanceRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete map reduce instance run default response has a 4xx status code -func (o *DeleteMapReduceInstanceRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete map reduce instance run default response has a 5xx status code -func (o *DeleteMapReduceInstanceRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete map reduce instance run default response a status code equal to that given -func (o *DeleteMapReduceInstanceRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete map reduce instance run default response -func (o *DeleteMapReduceInstanceRunDefault) Code() int { - return o._statusCode -} - -func (o *DeleteMapReduceInstanceRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/mrAppRun/{id}][%d] DeleteMapReduceInstanceRun default %s", o._statusCode, payload) -} - -func (o *DeleteMapReduceInstanceRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/mrAppRun/{id}][%d] DeleteMapReduceInstanceRun default %s", o._statusCode, payload) -} - -func (o *DeleteMapReduceInstanceRunDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteMapReduceInstanceRunDefault) 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/analytics/delete_mapper_parameters.go b/v1/client/analytics/delete_mapper_parameters.go deleted file mode 100644 index a6020120..00000000 --- a/v1/client/analytics/delete_mapper_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewDeleteMapperParams creates a new DeleteMapperParams 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 NewDeleteMapperParams() *DeleteMapperParams { - return &DeleteMapperParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteMapperParamsWithTimeout creates a new DeleteMapperParams object -// with the ability to set a timeout on a request. -func NewDeleteMapperParamsWithTimeout(timeout time.Duration) *DeleteMapperParams { - return &DeleteMapperParams{ - timeout: timeout, - } -} - -// NewDeleteMapperParamsWithContext creates a new DeleteMapperParams object -// with the ability to set a context for a request. -func NewDeleteMapperParamsWithContext(ctx context.Context) *DeleteMapperParams { - return &DeleteMapperParams{ - Context: ctx, - } -} - -// NewDeleteMapperParamsWithHTTPClient creates a new DeleteMapperParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteMapperParamsWithHTTPClient(client *http.Client) *DeleteMapperParams { - return &DeleteMapperParams{ - HTTPClient: client, - } -} - -/* -DeleteMapperParams contains all the parameters to send to the API endpoint - - for the delete mapper operation. - - Typically these are written to a http.Request. -*/ -type DeleteMapperParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteMapperParams) WithDefaults() *DeleteMapperParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteMapperParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete mapper params -func (o *DeleteMapperParams) WithTimeout(timeout time.Duration) *DeleteMapperParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete mapper params -func (o *DeleteMapperParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete mapper params -func (o *DeleteMapperParams) WithContext(ctx context.Context) *DeleteMapperParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete mapper params -func (o *DeleteMapperParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete mapper params -func (o *DeleteMapperParams) WithHTTPClient(client *http.Client) *DeleteMapperParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete mapper params -func (o *DeleteMapperParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete mapper params -func (o *DeleteMapperParams) WithID(id int64) *DeleteMapperParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete mapper params -func (o *DeleteMapperParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteMapperParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/delete_mapper_responses.go b/v1/client/analytics/delete_mapper_responses.go deleted file mode 100644 index f3d28ddb..00000000 --- a/v1/client/analytics/delete_mapper_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteMapperReader is a Reader for the DeleteMapper structure. -type DeleteMapperReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteMapperReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteMapperNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteMapperDefault(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 - } -} - -// NewDeleteMapperNoContent creates a DeleteMapperNoContent with default headers values -func NewDeleteMapperNoContent() *DeleteMapperNoContent { - return &DeleteMapperNoContent{} -} - -/* -DeleteMapperNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteMapperNoContent struct { -} - -// IsSuccess returns true when this delete mapper no content response has a 2xx status code -func (o *DeleteMapperNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete mapper no content response has a 3xx status code -func (o *DeleteMapperNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete mapper no content response has a 4xx status code -func (o *DeleteMapperNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete mapper no content response has a 5xx status code -func (o *DeleteMapperNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete mapper no content response a status code equal to that given -func (o *DeleteMapperNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete mapper no content response -func (o *DeleteMapperNoContent) Code() int { - return 204 -} - -func (o *DeleteMapperNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/analytics/mappers/{id}][%d] deleteMapperNoContent", 204) -} - -func (o *DeleteMapperNoContent) String() string { - return fmt.Sprintf("[DELETE /public/analytics/mappers/{id}][%d] deleteMapperNoContent", 204) -} - -func (o *DeleteMapperNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteMapperDefault creates a DeleteMapperDefault with default headers values -func NewDeleteMapperDefault(code int) *DeleteMapperDefault { - return &DeleteMapperDefault{ - _statusCode: code, - } -} - -/* -DeleteMapperDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteMapperDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete mapper default response has a 2xx status code -func (o *DeleteMapperDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete mapper default response has a 3xx status code -func (o *DeleteMapperDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete mapper default response has a 4xx status code -func (o *DeleteMapperDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete mapper default response has a 5xx status code -func (o *DeleteMapperDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete mapper default response a status code equal to that given -func (o *DeleteMapperDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete mapper default response -func (o *DeleteMapperDefault) Code() int { - return o._statusCode -} - -func (o *DeleteMapperDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/mappers/{id}][%d] DeleteMapper default %s", o._statusCode, payload) -} - -func (o *DeleteMapperDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/mappers/{id}][%d] DeleteMapper default %s", o._statusCode, payload) -} - -func (o *DeleteMapperDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteMapperDefault) 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/analytics/delete_reducer_parameters.go b/v1/client/analytics/delete_reducer_parameters.go deleted file mode 100644 index f54b9140..00000000 --- a/v1/client/analytics/delete_reducer_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewDeleteReducerParams creates a new DeleteReducerParams 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 NewDeleteReducerParams() *DeleteReducerParams { - return &DeleteReducerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteReducerParamsWithTimeout creates a new DeleteReducerParams object -// with the ability to set a timeout on a request. -func NewDeleteReducerParamsWithTimeout(timeout time.Duration) *DeleteReducerParams { - return &DeleteReducerParams{ - timeout: timeout, - } -} - -// NewDeleteReducerParamsWithContext creates a new DeleteReducerParams object -// with the ability to set a context for a request. -func NewDeleteReducerParamsWithContext(ctx context.Context) *DeleteReducerParams { - return &DeleteReducerParams{ - Context: ctx, - } -} - -// NewDeleteReducerParamsWithHTTPClient creates a new DeleteReducerParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteReducerParamsWithHTTPClient(client *http.Client) *DeleteReducerParams { - return &DeleteReducerParams{ - HTTPClient: client, - } -} - -/* -DeleteReducerParams contains all the parameters to send to the API endpoint - - for the delete reducer operation. - - Typically these are written to a http.Request. -*/ -type DeleteReducerParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteReducerParams) WithDefaults() *DeleteReducerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteReducerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete reducer params -func (o *DeleteReducerParams) WithTimeout(timeout time.Duration) *DeleteReducerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete reducer params -func (o *DeleteReducerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete reducer params -func (o *DeleteReducerParams) WithContext(ctx context.Context) *DeleteReducerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete reducer params -func (o *DeleteReducerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete reducer params -func (o *DeleteReducerParams) WithHTTPClient(client *http.Client) *DeleteReducerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete reducer params -func (o *DeleteReducerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete reducer params -func (o *DeleteReducerParams) WithID(id int64) *DeleteReducerParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete reducer params -func (o *DeleteReducerParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteReducerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/delete_reducer_responses.go b/v1/client/analytics/delete_reducer_responses.go deleted file mode 100644 index e43402f7..00000000 --- a/v1/client/analytics/delete_reducer_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteReducerReader is a Reader for the DeleteReducer structure. -type DeleteReducerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteReducerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteReducerNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteReducerDefault(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 - } -} - -// NewDeleteReducerNoContent creates a DeleteReducerNoContent with default headers values -func NewDeleteReducerNoContent() *DeleteReducerNoContent { - return &DeleteReducerNoContent{} -} - -/* -DeleteReducerNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteReducerNoContent struct { -} - -// IsSuccess returns true when this delete reducer no content response has a 2xx status code -func (o *DeleteReducerNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete reducer no content response has a 3xx status code -func (o *DeleteReducerNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete reducer no content response has a 4xx status code -func (o *DeleteReducerNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete reducer no content response has a 5xx status code -func (o *DeleteReducerNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete reducer no content response a status code equal to that given -func (o *DeleteReducerNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete reducer no content response -func (o *DeleteReducerNoContent) Code() int { - return 204 -} - -func (o *DeleteReducerNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/analytics/reducers/{id}][%d] deleteReducerNoContent", 204) -} - -func (o *DeleteReducerNoContent) String() string { - return fmt.Sprintf("[DELETE /public/analytics/reducers/{id}][%d] deleteReducerNoContent", 204) -} - -func (o *DeleteReducerNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteReducerDefault creates a DeleteReducerDefault with default headers values -func NewDeleteReducerDefault(code int) *DeleteReducerDefault { - return &DeleteReducerDefault{ - _statusCode: code, - } -} - -/* -DeleteReducerDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteReducerDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete reducer default response has a 2xx status code -func (o *DeleteReducerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete reducer default response has a 3xx status code -func (o *DeleteReducerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete reducer default response has a 4xx status code -func (o *DeleteReducerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete reducer default response has a 5xx status code -func (o *DeleteReducerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete reducer default response a status code equal to that given -func (o *DeleteReducerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete reducer default response -func (o *DeleteReducerDefault) Code() int { - return o._statusCode -} - -func (o *DeleteReducerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/reducers/{id}][%d] DeleteReducer default %s", o._statusCode, payload) -} - -func (o *DeleteReducerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/reducers/{id}][%d] DeleteReducer default %s", o._statusCode, payload) -} - -func (o *DeleteReducerDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteReducerDefault) 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/analytics/delete_uploaded_jar_parameters.go b/v1/client/analytics/delete_uploaded_jar_parameters.go deleted file mode 100644 index 97887780..00000000 --- a/v1/client/analytics/delete_uploaded_jar_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteUploadedJarParams creates a new DeleteUploadedJarParams 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 NewDeleteUploadedJarParams() *DeleteUploadedJarParams { - return &DeleteUploadedJarParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUploadedJarParamsWithTimeout creates a new DeleteUploadedJarParams object -// with the ability to set a timeout on a request. -func NewDeleteUploadedJarParamsWithTimeout(timeout time.Duration) *DeleteUploadedJarParams { - return &DeleteUploadedJarParams{ - timeout: timeout, - } -} - -// NewDeleteUploadedJarParamsWithContext creates a new DeleteUploadedJarParams object -// with the ability to set a context for a request. -func NewDeleteUploadedJarParamsWithContext(ctx context.Context) *DeleteUploadedJarParams { - return &DeleteUploadedJarParams{ - Context: ctx, - } -} - -// NewDeleteUploadedJarParamsWithHTTPClient creates a new DeleteUploadedJarParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUploadedJarParamsWithHTTPClient(client *http.Client) *DeleteUploadedJarParams { - return &DeleteUploadedJarParams{ - HTTPClient: client, - } -} - -/* -DeleteUploadedJarParams contains all the parameters to send to the API endpoint - - for the delete uploaded jar operation. - - Typically these are written to a http.Request. -*/ -type DeleteUploadedJarParams struct { - - // Body. - Body *models.UploadMRJarViewPathWrapper - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete uploaded jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUploadedJarParams) WithDefaults() *DeleteUploadedJarParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete uploaded jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUploadedJarParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete uploaded jar params -func (o *DeleteUploadedJarParams) WithTimeout(timeout time.Duration) *DeleteUploadedJarParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete uploaded jar params -func (o *DeleteUploadedJarParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete uploaded jar params -func (o *DeleteUploadedJarParams) WithContext(ctx context.Context) *DeleteUploadedJarParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete uploaded jar params -func (o *DeleteUploadedJarParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete uploaded jar params -func (o *DeleteUploadedJarParams) WithHTTPClient(client *http.Client) *DeleteUploadedJarParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete uploaded jar params -func (o *DeleteUploadedJarParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete uploaded jar params -func (o *DeleteUploadedJarParams) WithBody(body *models.UploadMRJarViewPathWrapper) *DeleteUploadedJarParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete uploaded jar params -func (o *DeleteUploadedJarParams) SetBody(body *models.UploadMRJarViewPathWrapper) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUploadedJarParams) 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/analytics/delete_uploaded_jar_responses.go b/v1/client/analytics/delete_uploaded_jar_responses.go deleted file mode 100644 index 48f5f6ae..00000000 --- a/v1/client/analytics/delete_uploaded_jar_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteUploadedJarReader is a Reader for the DeleteUploadedJar structure. -type DeleteUploadedJarReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUploadedJarReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUploadedJarNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUploadedJarDefault(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 - } -} - -// NewDeleteUploadedJarNoContent creates a DeleteUploadedJarNoContent with default headers values -func NewDeleteUploadedJarNoContent() *DeleteUploadedJarNoContent { - return &DeleteUploadedJarNoContent{} -} - -/* -DeleteUploadedJarNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUploadedJarNoContent struct { -} - -// IsSuccess returns true when this delete uploaded jar no content response has a 2xx status code -func (o *DeleteUploadedJarNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete uploaded jar no content response has a 3xx status code -func (o *DeleteUploadedJarNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete uploaded jar no content response has a 4xx status code -func (o *DeleteUploadedJarNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete uploaded jar no content response has a 5xx status code -func (o *DeleteUploadedJarNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete uploaded jar no content response a status code equal to that given -func (o *DeleteUploadedJarNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete uploaded jar no content response -func (o *DeleteUploadedJarNoContent) Code() int { - return 204 -} - -func (o *DeleteUploadedJarNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/analytics/uploadJar][%d] deleteUploadedJarNoContent", 204) -} - -func (o *DeleteUploadedJarNoContent) String() string { - return fmt.Sprintf("[DELETE /public/analytics/uploadJar][%d] deleteUploadedJarNoContent", 204) -} - -func (o *DeleteUploadedJarNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUploadedJarDefault creates a DeleteUploadedJarDefault with default headers values -func NewDeleteUploadedJarDefault(code int) *DeleteUploadedJarDefault { - return &DeleteUploadedJarDefault{ - _statusCode: code, - } -} - -/* -DeleteUploadedJarDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUploadedJarDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete uploaded jar default response has a 2xx status code -func (o *DeleteUploadedJarDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete uploaded jar default response has a 3xx status code -func (o *DeleteUploadedJarDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete uploaded jar default response has a 4xx status code -func (o *DeleteUploadedJarDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete uploaded jar default response has a 5xx status code -func (o *DeleteUploadedJarDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete uploaded jar default response a status code equal to that given -func (o *DeleteUploadedJarDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete uploaded jar default response -func (o *DeleteUploadedJarDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUploadedJarDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/uploadJar][%d] DeleteUploadedJar default %s", o._statusCode, payload) -} - -func (o *DeleteUploadedJarDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/analytics/uploadJar][%d] DeleteUploadedJar default %s", o._statusCode, payload) -} - -func (o *DeleteUploadedJarDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteUploadedJarDefault) 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/analytics/download_m_r_base_jar_parameters.go b/v1/client/analytics/download_m_r_base_jar_parameters.go deleted file mode 100644 index b66f6067..00000000 --- a/v1/client/analytics/download_m_r_base_jar_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewDownloadMRBaseJarParams creates a new DownloadMRBaseJarParams 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 NewDownloadMRBaseJarParams() *DownloadMRBaseJarParams { - return &DownloadMRBaseJarParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadMRBaseJarParamsWithTimeout creates a new DownloadMRBaseJarParams object -// with the ability to set a timeout on a request. -func NewDownloadMRBaseJarParamsWithTimeout(timeout time.Duration) *DownloadMRBaseJarParams { - return &DownloadMRBaseJarParams{ - timeout: timeout, - } -} - -// NewDownloadMRBaseJarParamsWithContext creates a new DownloadMRBaseJarParams object -// with the ability to set a context for a request. -func NewDownloadMRBaseJarParamsWithContext(ctx context.Context) *DownloadMRBaseJarParams { - return &DownloadMRBaseJarParams{ - Context: ctx, - } -} - -// NewDownloadMRBaseJarParamsWithHTTPClient creates a new DownloadMRBaseJarParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadMRBaseJarParamsWithHTTPClient(client *http.Client) *DownloadMRBaseJarParams { - return &DownloadMRBaseJarParams{ - HTTPClient: client, - } -} - -/* -DownloadMRBaseJarParams contains all the parameters to send to the API endpoint - - for the download m r base jar operation. - - Typically these are written to a http.Request. -*/ -type DownloadMRBaseJarParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download m r base jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadMRBaseJarParams) WithDefaults() *DownloadMRBaseJarParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download m r base jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadMRBaseJarParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download m r base jar params -func (o *DownloadMRBaseJarParams) WithTimeout(timeout time.Duration) *DownloadMRBaseJarParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download m r base jar params -func (o *DownloadMRBaseJarParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download m r base jar params -func (o *DownloadMRBaseJarParams) WithContext(ctx context.Context) *DownloadMRBaseJarParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download m r base jar params -func (o *DownloadMRBaseJarParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download m r base jar params -func (o *DownloadMRBaseJarParams) WithHTTPClient(client *http.Client) *DownloadMRBaseJarParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download m r base jar params -func (o *DownloadMRBaseJarParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadMRBaseJarParams) 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/analytics/download_m_r_base_jar_responses.go b/v1/client/analytics/download_m_r_base_jar_responses.go deleted file mode 100644 index 5cfc24b8..00000000 --- a/v1/client/analytics/download_m_r_base_jar_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadMRBaseJarReader is a Reader for the DownloadMRBaseJar structure. -type DownloadMRBaseJarReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadMRBaseJarReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadMRBaseJarOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadMRBaseJarDefault(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 - } -} - -// NewDownloadMRBaseJarOK creates a DownloadMRBaseJarOK with default headers values -func NewDownloadMRBaseJarOK() *DownloadMRBaseJarOK { - return &DownloadMRBaseJarOK{} -} - -/* -DownloadMRBaseJarOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadMRBaseJarOK struct { - Payload *models.ExtractFileRangeResult -} - -// IsSuccess returns true when this download m r base jar o k response has a 2xx status code -func (o *DownloadMRBaseJarOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download m r base jar o k response has a 3xx status code -func (o *DownloadMRBaseJarOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download m r base jar o k response has a 4xx status code -func (o *DownloadMRBaseJarOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download m r base jar o k response has a 5xx status code -func (o *DownloadMRBaseJarOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download m r base jar o k response a status code equal to that given -func (o *DownloadMRBaseJarOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download m r base jar o k response -func (o *DownloadMRBaseJarOK) Code() int { - return 200 -} - -func (o *DownloadMRBaseJarOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrBaseJar][%d] downloadMRBaseJarOK %s", 200, payload) -} - -func (o *DownloadMRBaseJarOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrBaseJar][%d] downloadMRBaseJarOK %s", 200, payload) -} - -func (o *DownloadMRBaseJarOK) GetPayload() *models.ExtractFileRangeResult { - return o.Payload -} - -func (o *DownloadMRBaseJarOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExtractFileRangeResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadMRBaseJarDefault creates a DownloadMRBaseJarDefault with default headers values -func NewDownloadMRBaseJarDefault(code int) *DownloadMRBaseJarDefault { - return &DownloadMRBaseJarDefault{ - _statusCode: code, - } -} - -/* -DownloadMRBaseJarDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadMRBaseJarDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download m r base jar default response has a 2xx status code -func (o *DownloadMRBaseJarDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download m r base jar default response has a 3xx status code -func (o *DownloadMRBaseJarDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download m r base jar default response has a 4xx status code -func (o *DownloadMRBaseJarDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download m r base jar default response has a 5xx status code -func (o *DownloadMRBaseJarDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download m r base jar default response a status code equal to that given -func (o *DownloadMRBaseJarDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download m r base jar default response -func (o *DownloadMRBaseJarDefault) Code() int { - return o._statusCode -} - -func (o *DownloadMRBaseJarDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrBaseJar][%d] DownloadMRBaseJar default %s", o._statusCode, payload) -} - -func (o *DownloadMRBaseJarDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrBaseJar][%d] DownloadMRBaseJar default %s", o._statusCode, payload) -} - -func (o *DownloadMRBaseJarDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadMRBaseJarDefault) 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/analytics/download_m_r_output_files_parameters.go b/v1/client/analytics/download_m_r_output_files_parameters.go deleted file mode 100644 index a9ab83ee..00000000 --- a/v1/client/analytics/download_m_r_output_files_parameters.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewDownloadMROutputFilesParams creates a new DownloadMROutputFilesParams 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 NewDownloadMROutputFilesParams() *DownloadMROutputFilesParams { - return &DownloadMROutputFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadMROutputFilesParamsWithTimeout creates a new DownloadMROutputFilesParams object -// with the ability to set a timeout on a request. -func NewDownloadMROutputFilesParamsWithTimeout(timeout time.Duration) *DownloadMROutputFilesParams { - return &DownloadMROutputFilesParams{ - timeout: timeout, - } -} - -// NewDownloadMROutputFilesParamsWithContext creates a new DownloadMROutputFilesParams object -// with the ability to set a context for a request. -func NewDownloadMROutputFilesParamsWithContext(ctx context.Context) *DownloadMROutputFilesParams { - return &DownloadMROutputFilesParams{ - Context: ctx, - } -} - -// NewDownloadMROutputFilesParamsWithHTTPClient creates a new DownloadMROutputFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadMROutputFilesParamsWithHTTPClient(client *http.Client) *DownloadMROutputFilesParams { - return &DownloadMROutputFilesParams{ - HTTPClient: client, - } -} - -/* -DownloadMROutputFilesParams contains all the parameters to send to the API endpoint - - for the download m r output files operation. - - Typically these are written to a http.Request. -*/ -type DownloadMROutputFilesParams struct { - - /* FilePath. - - filepath of the file on NFS. - */ - FilePath *string - - /* IsNfsFile. - - If true, then extracts file from NFS, else from local file system. - */ - IsNfsFile *bool - - /* LengthBytes. - - Number of bytes to be read from start_offset. - - Format: int64 - */ - LengthBytes *int64 - - /* PartitionID. - - Cluster partition id for the file to be read. - - Format: int64 - */ - PartitionID *int64 - - /* StartOffset. - - start offset from where bytes will be read. - - Format: int64 - */ - StartOffset *int64 - - /* ViewBoxID. - - View box id for the file to be read. Required for nfs files only. - - Format: int64 - */ - ViewBoxID *int64 - - /* ViewName. - - View name for the file to be read. Required for nfs files only. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download m r output files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadMROutputFilesParams) WithDefaults() *DownloadMROutputFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download m r output files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadMROutputFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download m r output files params -func (o *DownloadMROutputFilesParams) WithTimeout(timeout time.Duration) *DownloadMROutputFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download m r output files params -func (o *DownloadMROutputFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download m r output files params -func (o *DownloadMROutputFilesParams) WithContext(ctx context.Context) *DownloadMROutputFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download m r output files params -func (o *DownloadMROutputFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download m r output files params -func (o *DownloadMROutputFilesParams) WithHTTPClient(client *http.Client) *DownloadMROutputFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download m r output files params -func (o *DownloadMROutputFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilePath adds the filePath to the download m r output files params -func (o *DownloadMROutputFilesParams) WithFilePath(filePath *string) *DownloadMROutputFilesParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the download m r output files params -func (o *DownloadMROutputFilesParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithIsNfsFile adds the isNfsFile to the download m r output files params -func (o *DownloadMROutputFilesParams) WithIsNfsFile(isNfsFile *bool) *DownloadMROutputFilesParams { - o.SetIsNfsFile(isNfsFile) - return o -} - -// SetIsNfsFile adds the isNfsFile to the download m r output files params -func (o *DownloadMROutputFilesParams) SetIsNfsFile(isNfsFile *bool) { - o.IsNfsFile = isNfsFile -} - -// WithLengthBytes adds the lengthBytes to the download m r output files params -func (o *DownloadMROutputFilesParams) WithLengthBytes(lengthBytes *int64) *DownloadMROutputFilesParams { - o.SetLengthBytes(lengthBytes) - return o -} - -// SetLengthBytes adds the lengthBytes to the download m r output files params -func (o *DownloadMROutputFilesParams) SetLengthBytes(lengthBytes *int64) { - o.LengthBytes = lengthBytes -} - -// WithPartitionID adds the partitionID to the download m r output files params -func (o *DownloadMROutputFilesParams) WithPartitionID(partitionID *int64) *DownloadMROutputFilesParams { - o.SetPartitionID(partitionID) - return o -} - -// SetPartitionID adds the partitionId to the download m r output files params -func (o *DownloadMROutputFilesParams) SetPartitionID(partitionID *int64) { - o.PartitionID = partitionID -} - -// WithStartOffset adds the startOffset to the download m r output files params -func (o *DownloadMROutputFilesParams) WithStartOffset(startOffset *int64) *DownloadMROutputFilesParams { - o.SetStartOffset(startOffset) - return o -} - -// SetStartOffset adds the startOffset to the download m r output files params -func (o *DownloadMROutputFilesParams) SetStartOffset(startOffset *int64) { - o.StartOffset = startOffset -} - -// WithViewBoxID adds the viewBoxID to the download m r output files params -func (o *DownloadMROutputFilesParams) WithViewBoxID(viewBoxID *int64) *DownloadMROutputFilesParams { - o.SetViewBoxID(viewBoxID) - return o -} - -// SetViewBoxID adds the viewBoxId to the download m r output files params -func (o *DownloadMROutputFilesParams) SetViewBoxID(viewBoxID *int64) { - o.ViewBoxID = viewBoxID -} - -// WithViewName adds the viewName to the download m r output files params -func (o *DownloadMROutputFilesParams) WithViewName(viewName *string) *DownloadMROutputFilesParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the download m r output files params -func (o *DownloadMROutputFilesParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadMROutputFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.IsNfsFile != nil { - - // query param isNfsFile - var qrIsNfsFile bool - - if o.IsNfsFile != nil { - qrIsNfsFile = *o.IsNfsFile - } - qIsNfsFile := swag.FormatBool(qrIsNfsFile) - if qIsNfsFile != "" { - - if err := r.SetQueryParam("isNfsFile", qIsNfsFile); err != nil { - return err - } - } - } - - if o.LengthBytes != nil { - - // query param lengthBytes - var qrLengthBytes int64 - - if o.LengthBytes != nil { - qrLengthBytes = *o.LengthBytes - } - qLengthBytes := swag.FormatInt64(qrLengthBytes) - if qLengthBytes != "" { - - if err := r.SetQueryParam("lengthBytes", qLengthBytes); err != nil { - return err - } - } - } - - if o.PartitionID != nil { - - // query param partitionId - var qrPartitionID int64 - - if o.PartitionID != nil { - qrPartitionID = *o.PartitionID - } - qPartitionID := swag.FormatInt64(qrPartitionID) - if qPartitionID != "" { - - if err := r.SetQueryParam("partitionId", qPartitionID); err != nil { - return err - } - } - } - - if o.StartOffset != nil { - - // query param startOffset - var qrStartOffset int64 - - if o.StartOffset != nil { - qrStartOffset = *o.StartOffset - } - qStartOffset := swag.FormatInt64(qrStartOffset) - if qStartOffset != "" { - - if err := r.SetQueryParam("startOffset", qStartOffset); err != nil { - return err - } - } - } - - if o.ViewBoxID != nil { - - // query param viewBoxId - var qrViewBoxID int64 - - if o.ViewBoxID != nil { - qrViewBoxID = *o.ViewBoxID - } - qViewBoxID := swag.FormatInt64(qrViewBoxID) - if qViewBoxID != "" { - - if err := r.SetQueryParam("viewBoxId", qViewBoxID); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/download_m_r_output_files_responses.go b/v1/client/analytics/download_m_r_output_files_responses.go deleted file mode 100644 index 32e6d209..00000000 --- a/v1/client/analytics/download_m_r_output_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadMROutputFilesReader is a Reader for the DownloadMROutputFiles structure. -type DownloadMROutputFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadMROutputFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadMROutputFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadMROutputFilesDefault(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 - } -} - -// NewDownloadMROutputFilesOK creates a DownloadMROutputFilesOK with default headers values -func NewDownloadMROutputFilesOK() *DownloadMROutputFilesOK { - return &DownloadMROutputFilesOK{} -} - -/* -DownloadMROutputFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadMROutputFilesOK struct { - Payload *models.ExtractFileRangeResult -} - -// IsSuccess returns true when this download m r output files o k response has a 2xx status code -func (o *DownloadMROutputFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download m r output files o k response has a 3xx status code -func (o *DownloadMROutputFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download m r output files o k response has a 4xx status code -func (o *DownloadMROutputFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download m r output files o k response has a 5xx status code -func (o *DownloadMROutputFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download m r output files o k response a status code equal to that given -func (o *DownloadMROutputFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download m r output files o k response -func (o *DownloadMROutputFilesOK) Code() int { - return 200 -} - -func (o *DownloadMROutputFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrOutputfiles][%d] downloadMROutputFilesOK %s", 200, payload) -} - -func (o *DownloadMROutputFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrOutputfiles][%d] downloadMROutputFilesOK %s", 200, payload) -} - -func (o *DownloadMROutputFilesOK) GetPayload() *models.ExtractFileRangeResult { - return o.Payload -} - -func (o *DownloadMROutputFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExtractFileRangeResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadMROutputFilesDefault creates a DownloadMROutputFilesDefault with default headers values -func NewDownloadMROutputFilesDefault(code int) *DownloadMROutputFilesDefault { - return &DownloadMROutputFilesDefault{ - _statusCode: code, - } -} - -/* -DownloadMROutputFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadMROutputFilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download m r output files default response has a 2xx status code -func (o *DownloadMROutputFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download m r output files default response has a 3xx status code -func (o *DownloadMROutputFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download m r output files default response has a 4xx status code -func (o *DownloadMROutputFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download m r output files default response has a 5xx status code -func (o *DownloadMROutputFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download m r output files default response a status code equal to that given -func (o *DownloadMROutputFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download m r output files default response -func (o *DownloadMROutputFilesDefault) Code() int { - return o._statusCode -} - -func (o *DownloadMROutputFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrOutputfiles][%d] DownloadMROutputFiles default %s", o._statusCode, payload) -} - -func (o *DownloadMROutputFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrOutputfiles][%d] DownloadMROutputFiles default %s", o._statusCode, payload) -} - -func (o *DownloadMROutputFilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadMROutputFilesDefault) 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/analytics/get_application_by_id_parameters.go b/v1/client/analytics/get_application_by_id_parameters.go deleted file mode 100644 index a0b392fb..00000000 --- a/v1/client/analytics/get_application_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewGetApplicationByIDParams creates a new GetApplicationByIDParams 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 NewGetApplicationByIDParams() *GetApplicationByIDParams { - return &GetApplicationByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetApplicationByIDParamsWithTimeout creates a new GetApplicationByIDParams object -// with the ability to set a timeout on a request. -func NewGetApplicationByIDParamsWithTimeout(timeout time.Duration) *GetApplicationByIDParams { - return &GetApplicationByIDParams{ - timeout: timeout, - } -} - -// NewGetApplicationByIDParamsWithContext creates a new GetApplicationByIDParams object -// with the ability to set a context for a request. -func NewGetApplicationByIDParamsWithContext(ctx context.Context) *GetApplicationByIDParams { - return &GetApplicationByIDParams{ - Context: ctx, - } -} - -// NewGetApplicationByIDParamsWithHTTPClient creates a new GetApplicationByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetApplicationByIDParamsWithHTTPClient(client *http.Client) *GetApplicationByIDParams { - return &GetApplicationByIDParams{ - HTTPClient: client, - } -} - -/* -GetApplicationByIDParams contains all the parameters to send to the API endpoint - - for the get application by Id operation. - - Typically these are written to a http.Request. -*/ -type GetApplicationByIDParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get application by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetApplicationByIDParams) WithDefaults() *GetApplicationByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get application by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetApplicationByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get application by Id params -func (o *GetApplicationByIDParams) WithTimeout(timeout time.Duration) *GetApplicationByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get application by Id params -func (o *GetApplicationByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get application by Id params -func (o *GetApplicationByIDParams) WithContext(ctx context.Context) *GetApplicationByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get application by Id params -func (o *GetApplicationByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get application by Id params -func (o *GetApplicationByIDParams) WithHTTPClient(client *http.Client) *GetApplicationByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get application by Id params -func (o *GetApplicationByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get application by Id params -func (o *GetApplicationByIDParams) WithID(id int64) *GetApplicationByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get application by Id params -func (o *GetApplicationByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetApplicationByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/get_application_by_id_responses.go b/v1/client/analytics/get_application_by_id_responses.go deleted file mode 100644 index de12309b..00000000 --- a/v1/client/analytics/get_application_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetApplicationByIDReader is a Reader for the GetApplicationByID structure. -type GetApplicationByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetApplicationByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetApplicationByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetApplicationByIDDefault(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 - } -} - -// NewGetApplicationByIDOK creates a GetApplicationByIDOK with default headers values -func NewGetApplicationByIDOK() *GetApplicationByIDOK { - return &GetApplicationByIDOK{} -} - -/* -GetApplicationByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetApplicationByIDOK struct { - Payload *models.MapReduceInfo -} - -// IsSuccess returns true when this get application by Id o k response has a 2xx status code -func (o *GetApplicationByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get application by Id o k response has a 3xx status code -func (o *GetApplicationByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get application by Id o k response has a 4xx status code -func (o *GetApplicationByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get application by Id o k response has a 5xx status code -func (o *GetApplicationByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get application by Id o k response a status code equal to that given -func (o *GetApplicationByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get application by Id o k response -func (o *GetApplicationByIDOK) Code() int { - return 200 -} - -func (o *GetApplicationByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps/{id}][%d] getApplicationByIdOK %s", 200, payload) -} - -func (o *GetApplicationByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps/{id}][%d] getApplicationByIdOK %s", 200, payload) -} - -func (o *GetApplicationByIDOK) GetPayload() *models.MapReduceInfo { - return o.Payload -} - -func (o *GetApplicationByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapReduceInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetApplicationByIDDefault creates a GetApplicationByIDDefault with default headers values -func NewGetApplicationByIDDefault(code int) *GetApplicationByIDDefault { - return &GetApplicationByIDDefault{ - _statusCode: code, - } -} - -/* -GetApplicationByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetApplicationByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get application by Id default response has a 2xx status code -func (o *GetApplicationByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get application by Id default response has a 3xx status code -func (o *GetApplicationByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get application by Id default response has a 4xx status code -func (o *GetApplicationByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get application by Id default response has a 5xx status code -func (o *GetApplicationByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get application by Id default response a status code equal to that given -func (o *GetApplicationByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get application by Id default response -func (o *GetApplicationByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetApplicationByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps/{id}][%d] GetApplicationById default %s", o._statusCode, payload) -} - -func (o *GetApplicationByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps/{id}][%d] GetApplicationById default %s", o._statusCode, payload) -} - -func (o *GetApplicationByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetApplicationByIDDefault) 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/analytics/get_applications_parameters.go b/v1/client/analytics/get_applications_parameters.go deleted file mode 100644 index f8625aa2..00000000 --- a/v1/client/analytics/get_applications_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewGetApplicationsParams creates a new GetApplicationsParams 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 NewGetApplicationsParams() *GetApplicationsParams { - return &GetApplicationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetApplicationsParamsWithTimeout creates a new GetApplicationsParams object -// with the ability to set a timeout on a request. -func NewGetApplicationsParamsWithTimeout(timeout time.Duration) *GetApplicationsParams { - return &GetApplicationsParams{ - timeout: timeout, - } -} - -// NewGetApplicationsParamsWithContext creates a new GetApplicationsParams object -// with the ability to set a context for a request. -func NewGetApplicationsParamsWithContext(ctx context.Context) *GetApplicationsParams { - return &GetApplicationsParams{ - Context: ctx, - } -} - -// NewGetApplicationsParamsWithHTTPClient creates a new GetApplicationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetApplicationsParamsWithHTTPClient(client *http.Client) *GetApplicationsParams { - return &GetApplicationsParams{ - HTTPClient: client, - } -} - -/* -GetApplicationsParams contains all the parameters to send to the API endpoint - - for the get applications operation. - - Typically these are written to a http.Request. -*/ -type GetApplicationsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetApplicationsParams) WithDefaults() *GetApplicationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetApplicationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get applications params -func (o *GetApplicationsParams) WithTimeout(timeout time.Duration) *GetApplicationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get applications params -func (o *GetApplicationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get applications params -func (o *GetApplicationsParams) WithContext(ctx context.Context) *GetApplicationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get applications params -func (o *GetApplicationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get applications params -func (o *GetApplicationsParams) WithHTTPClient(client *http.Client) *GetApplicationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get applications params -func (o *GetApplicationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetApplicationsParams) 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/analytics/get_applications_responses.go b/v1/client/analytics/get_applications_responses.go deleted file mode 100644 index d308daed..00000000 --- a/v1/client/analytics/get_applications_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetApplicationsReader is a Reader for the GetApplications structure. -type GetApplicationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetApplicationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetApplicationsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetApplicationsDefault(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 - } -} - -// NewGetApplicationsOK creates a GetApplicationsOK with default headers values -func NewGetApplicationsOK() *GetApplicationsOK { - return &GetApplicationsOK{} -} - -/* -GetApplicationsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetApplicationsOK struct { - Payload *models.ApplicationsWrapper -} - -// IsSuccess returns true when this get applications o k response has a 2xx status code -func (o *GetApplicationsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get applications o k response has a 3xx status code -func (o *GetApplicationsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get applications o k response has a 4xx status code -func (o *GetApplicationsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get applications o k response has a 5xx status code -func (o *GetApplicationsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get applications o k response a status code equal to that given -func (o *GetApplicationsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get applications o k response -func (o *GetApplicationsOK) Code() int { - return 200 -} - -func (o *GetApplicationsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps][%d] getApplicationsOK %s", 200, payload) -} - -func (o *GetApplicationsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps][%d] getApplicationsOK %s", 200, payload) -} - -func (o *GetApplicationsOK) GetPayload() *models.ApplicationsWrapper { - return o.Payload -} - -func (o *GetApplicationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ApplicationsWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetApplicationsDefault creates a GetApplicationsDefault with default headers values -func NewGetApplicationsDefault(code int) *GetApplicationsDefault { - return &GetApplicationsDefault{ - _statusCode: code, - } -} - -/* -GetApplicationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetApplicationsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get applications default response has a 2xx status code -func (o *GetApplicationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get applications default response has a 3xx status code -func (o *GetApplicationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get applications default response has a 4xx status code -func (o *GetApplicationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get applications default response has a 5xx status code -func (o *GetApplicationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get applications default response a status code equal to that given -func (o *GetApplicationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get applications default response -func (o *GetApplicationsDefault) Code() int { - return o._statusCode -} - -func (o *GetApplicationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps][%d] GetApplications default %s", o._statusCode, payload) -} - -func (o *GetApplicationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/apps][%d] GetApplications default %s", o._statusCode, payload) -} - -func (o *GetApplicationsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetApplicationsDefault) 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/analytics/get_m_r_upload_jar_path_parameters.go b/v1/client/analytics/get_m_r_upload_jar_path_parameters.go deleted file mode 100644 index 2c5c4802..00000000 --- a/v1/client/analytics/get_m_r_upload_jar_path_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewGetMRUploadJarPathParams creates a new GetMRUploadJarPathParams 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 NewGetMRUploadJarPathParams() *GetMRUploadJarPathParams { - return &GetMRUploadJarPathParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMRUploadJarPathParamsWithTimeout creates a new GetMRUploadJarPathParams object -// with the ability to set a timeout on a request. -func NewGetMRUploadJarPathParamsWithTimeout(timeout time.Duration) *GetMRUploadJarPathParams { - return &GetMRUploadJarPathParams{ - timeout: timeout, - } -} - -// NewGetMRUploadJarPathParamsWithContext creates a new GetMRUploadJarPathParams object -// with the ability to set a context for a request. -func NewGetMRUploadJarPathParamsWithContext(ctx context.Context) *GetMRUploadJarPathParams { - return &GetMRUploadJarPathParams{ - Context: ctx, - } -} - -// NewGetMRUploadJarPathParamsWithHTTPClient creates a new GetMRUploadJarPathParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMRUploadJarPathParamsWithHTTPClient(client *http.Client) *GetMRUploadJarPathParams { - return &GetMRUploadJarPathParams{ - HTTPClient: client, - } -} - -/* -GetMRUploadJarPathParams contains all the parameters to send to the API endpoint - - for the get m r upload jar path operation. - - Typically these are written to a http.Request. -*/ -type GetMRUploadJarPathParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get m r upload jar path params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMRUploadJarPathParams) WithDefaults() *GetMRUploadJarPathParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get m r upload jar path params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMRUploadJarPathParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) WithTimeout(timeout time.Duration) *GetMRUploadJarPathParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) WithContext(ctx context.Context) *GetMRUploadJarPathParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) WithHTTPClient(client *http.Client) *GetMRUploadJarPathParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get m r upload jar path params -func (o *GetMRUploadJarPathParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMRUploadJarPathParams) 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/analytics/get_m_r_upload_jar_path_responses.go b/v1/client/analytics/get_m_r_upload_jar_path_responses.go deleted file mode 100644 index addde6da..00000000 --- a/v1/client/analytics/get_m_r_upload_jar_path_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetMRUploadJarPathReader is a Reader for the GetMRUploadJarPath structure. -type GetMRUploadJarPathReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMRUploadJarPathReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMRUploadJarPathOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMRUploadJarPathDefault(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 - } -} - -// NewGetMRUploadJarPathOK creates a GetMRUploadJarPathOK with default headers values -func NewGetMRUploadJarPathOK() *GetMRUploadJarPathOK { - return &GetMRUploadJarPathOK{} -} - -/* -GetMRUploadJarPathOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMRUploadJarPathOK struct { - Payload *models.GetMRJarUploadPathResult -} - -// IsSuccess returns true when this get m r upload jar path o k response has a 2xx status code -func (o *GetMRUploadJarPathOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get m r upload jar path o k response has a 3xx status code -func (o *GetMRUploadJarPathOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get m r upload jar path o k response has a 4xx status code -func (o *GetMRUploadJarPathOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get m r upload jar path o k response has a 5xx status code -func (o *GetMRUploadJarPathOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get m r upload jar path o k response a status code equal to that given -func (o *GetMRUploadJarPathOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get m r upload jar path o k response -func (o *GetMRUploadJarPathOK) Code() int { - return 200 -} - -func (o *GetMRUploadJarPathOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/uploadJarPath][%d] getMRUploadJarPathOK %s", 200, payload) -} - -func (o *GetMRUploadJarPathOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/uploadJarPath][%d] getMRUploadJarPathOK %s", 200, payload) -} - -func (o *GetMRUploadJarPathOK) GetPayload() *models.GetMRJarUploadPathResult { - return o.Payload -} - -func (o *GetMRUploadJarPathOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetMRJarUploadPathResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMRUploadJarPathDefault creates a GetMRUploadJarPathDefault with default headers values -func NewGetMRUploadJarPathDefault(code int) *GetMRUploadJarPathDefault { - return &GetMRUploadJarPathDefault{ - _statusCode: code, - } -} - -/* -GetMRUploadJarPathDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMRUploadJarPathDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get m r upload jar path default response has a 2xx status code -func (o *GetMRUploadJarPathDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get m r upload jar path default response has a 3xx status code -func (o *GetMRUploadJarPathDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get m r upload jar path default response has a 4xx status code -func (o *GetMRUploadJarPathDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get m r upload jar path default response has a 5xx status code -func (o *GetMRUploadJarPathDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get m r upload jar path default response a status code equal to that given -func (o *GetMRUploadJarPathDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get m r upload jar path default response -func (o *GetMRUploadJarPathDefault) Code() int { - return o._statusCode -} - -func (o *GetMRUploadJarPathDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/uploadJarPath][%d] GetMRUploadJarPath default %s", o._statusCode, payload) -} - -func (o *GetMRUploadJarPathDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/uploadJarPath][%d] GetMRUploadJarPath default %s", o._statusCode, payload) -} - -func (o *GetMRUploadJarPathDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetMRUploadJarPathDefault) 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/analytics/get_map_reduce_app_runs_parameters.go b/v1/client/analytics/get_map_reduce_app_runs_parameters.go deleted file mode 100644 index 43b928a5..00000000 --- a/v1/client/analytics/get_map_reduce_app_runs_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGetMapReduceAppRunsParams creates a new GetMapReduceAppRunsParams 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 NewGetMapReduceAppRunsParams() *GetMapReduceAppRunsParams { - return &GetMapReduceAppRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapReduceAppRunsParamsWithTimeout creates a new GetMapReduceAppRunsParams object -// with the ability to set a timeout on a request. -func NewGetMapReduceAppRunsParamsWithTimeout(timeout time.Duration) *GetMapReduceAppRunsParams { - return &GetMapReduceAppRunsParams{ - timeout: timeout, - } -} - -// NewGetMapReduceAppRunsParamsWithContext creates a new GetMapReduceAppRunsParams object -// with the ability to set a context for a request. -func NewGetMapReduceAppRunsParamsWithContext(ctx context.Context) *GetMapReduceAppRunsParams { - return &GetMapReduceAppRunsParams{ - Context: ctx, - } -} - -// NewGetMapReduceAppRunsParamsWithHTTPClient creates a new GetMapReduceAppRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapReduceAppRunsParamsWithHTTPClient(client *http.Client) *GetMapReduceAppRunsParams { - return &GetMapReduceAppRunsParams{ - HTTPClient: client, - } -} - -/* -GetMapReduceAppRunsParams contains all the parameters to send to the API endpoint - - for the get map reduce app runs operation. - - Typically these are written to a http.Request. -*/ -type GetMapReduceAppRunsParams struct { - - // Body. - Body *models.GetMapReduceAppRunsParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get map reduce app runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapReduceAppRunsParams) WithDefaults() *GetMapReduceAppRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get map reduce app runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapReduceAppRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) WithTimeout(timeout time.Duration) *GetMapReduceAppRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) WithContext(ctx context.Context) *GetMapReduceAppRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) WithHTTPClient(client *http.Client) *GetMapReduceAppRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) WithBody(body *models.GetMapReduceAppRunsParams) *GetMapReduceAppRunsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get map reduce app runs params -func (o *GetMapReduceAppRunsParams) SetBody(body *models.GetMapReduceAppRunsParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapReduceAppRunsParams) 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/analytics/get_map_reduce_app_runs_responses.go b/v1/client/analytics/get_map_reduce_app_runs_responses.go deleted file mode 100644 index 80db0b94..00000000 --- a/v1/client/analytics/get_map_reduce_app_runs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetMapReduceAppRunsReader is a Reader for the GetMapReduceAppRuns structure. -type GetMapReduceAppRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapReduceAppRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapReduceAppRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMapReduceAppRunsDefault(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 - } -} - -// NewGetMapReduceAppRunsOK creates a GetMapReduceAppRunsOK with default headers values -func NewGetMapReduceAppRunsOK() *GetMapReduceAppRunsOK { - return &GetMapReduceAppRunsOK{} -} - -/* -GetMapReduceAppRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapReduceAppRunsOK struct { - Payload []*models.AppRunHistory -} - -// IsSuccess returns true when this get map reduce app runs o k response has a 2xx status code -func (o *GetMapReduceAppRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get map reduce app runs o k response has a 3xx status code -func (o *GetMapReduceAppRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map reduce app runs o k response has a 4xx status code -func (o *GetMapReduceAppRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get map reduce app runs o k response has a 5xx status code -func (o *GetMapReduceAppRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get map reduce app runs o k response a status code equal to that given -func (o *GetMapReduceAppRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get map reduce app runs o k response -func (o *GetMapReduceAppRunsOK) Code() int { - return 200 -} - -func (o *GetMapReduceAppRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrAppRuns][%d] getMapReduceAppRunsOK %s", 200, payload) -} - -func (o *GetMapReduceAppRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrAppRuns][%d] getMapReduceAppRunsOK %s", 200, payload) -} - -func (o *GetMapReduceAppRunsOK) GetPayload() []*models.AppRunHistory { - return o.Payload -} - -func (o *GetMapReduceAppRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMapReduceAppRunsDefault creates a GetMapReduceAppRunsDefault with default headers values -func NewGetMapReduceAppRunsDefault(code int) *GetMapReduceAppRunsDefault { - return &GetMapReduceAppRunsDefault{ - _statusCode: code, - } -} - -/* -GetMapReduceAppRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMapReduceAppRunsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get map reduce app runs default response has a 2xx status code -func (o *GetMapReduceAppRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get map reduce app runs default response has a 3xx status code -func (o *GetMapReduceAppRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get map reduce app runs default response has a 4xx status code -func (o *GetMapReduceAppRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get map reduce app runs default response has a 5xx status code -func (o *GetMapReduceAppRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get map reduce app runs default response a status code equal to that given -func (o *GetMapReduceAppRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get map reduce app runs default response -func (o *GetMapReduceAppRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetMapReduceAppRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrAppRuns][%d] GetMapReduceAppRuns default %s", o._statusCode, payload) -} - -func (o *GetMapReduceAppRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrAppRuns][%d] GetMapReduceAppRuns default %s", o._statusCode, payload) -} - -func (o *GetMapReduceAppRunsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetMapReduceAppRunsDefault) 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/analytics/get_map_reduce_file_formats_parameters.go b/v1/client/analytics/get_map_reduce_file_formats_parameters.go deleted file mode 100644 index ab7b5667..00000000 --- a/v1/client/analytics/get_map_reduce_file_formats_parameters.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewGetMapReduceFileFormatsParams creates a new GetMapReduceFileFormatsParams 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 NewGetMapReduceFileFormatsParams() *GetMapReduceFileFormatsParams { - return &GetMapReduceFileFormatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapReduceFileFormatsParamsWithTimeout creates a new GetMapReduceFileFormatsParams object -// with the ability to set a timeout on a request. -func NewGetMapReduceFileFormatsParamsWithTimeout(timeout time.Duration) *GetMapReduceFileFormatsParams { - return &GetMapReduceFileFormatsParams{ - timeout: timeout, - } -} - -// NewGetMapReduceFileFormatsParamsWithContext creates a new GetMapReduceFileFormatsParams object -// with the ability to set a context for a request. -func NewGetMapReduceFileFormatsParamsWithContext(ctx context.Context) *GetMapReduceFileFormatsParams { - return &GetMapReduceFileFormatsParams{ - Context: ctx, - } -} - -// NewGetMapReduceFileFormatsParamsWithHTTPClient creates a new GetMapReduceFileFormatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapReduceFileFormatsParamsWithHTTPClient(client *http.Client) *GetMapReduceFileFormatsParams { - return &GetMapReduceFileFormatsParams{ - HTTPClient: client, - } -} - -/* -GetMapReduceFileFormatsParams contains all the parameters to send to the API endpoint - - for the get map reduce file formats operation. - - Typically these are written to a http.Request. -*/ -type GetMapReduceFileFormatsParams struct { - - /* ResultFilePath. - - Specifies the path where the map reduce instance has the result. - file generated. - */ - ResultFilePath string - - /* StorageDomainID. - - Specifies the ID of the storage domain. - - Format: int64 - */ - StorageDomainID int64 - - /* ViewName. - - Specifies the name of the view inside view box where map reduce instance. - is run. - */ - ViewName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get map reduce file formats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapReduceFileFormatsParams) WithDefaults() *GetMapReduceFileFormatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get map reduce file formats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapReduceFileFormatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithTimeout(timeout time.Duration) *GetMapReduceFileFormatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithContext(ctx context.Context) *GetMapReduceFileFormatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithHTTPClient(client *http.Client) *GetMapReduceFileFormatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResultFilePath adds the resultFilePath to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithResultFilePath(resultFilePath string) *GetMapReduceFileFormatsParams { - o.SetResultFilePath(resultFilePath) - return o -} - -// SetResultFilePath adds the resultFilePath to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetResultFilePath(resultFilePath string) { - o.ResultFilePath = resultFilePath -} - -// WithStorageDomainID adds the storageDomainID to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithStorageDomainID(storageDomainID int64) *GetMapReduceFileFormatsParams { - o.SetStorageDomainID(storageDomainID) - return o -} - -// SetStorageDomainID adds the storageDomainId to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetStorageDomainID(storageDomainID int64) { - o.StorageDomainID = storageDomainID -} - -// WithViewName adds the viewName to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) WithViewName(viewName string) *GetMapReduceFileFormatsParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get map reduce file formats params -func (o *GetMapReduceFileFormatsParams) SetViewName(viewName string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapReduceFileFormatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param resultFilePath - qrResultFilePath := o.ResultFilePath - qResultFilePath := qrResultFilePath - if qResultFilePath != "" { - - if err := r.SetQueryParam("resultFilePath", qResultFilePath); err != nil { - return err - } - } - - // query param storageDomainId - qrStorageDomainID := o.StorageDomainID - qStorageDomainID := swag.FormatInt64(qrStorageDomainID) - if qStorageDomainID != "" { - - if err := r.SetQueryParam("storageDomainId", qStorageDomainID); err != nil { - return err - } - } - - // query param viewName - qrViewName := o.ViewName - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/get_map_reduce_file_formats_responses.go b/v1/client/analytics/get_map_reduce_file_formats_responses.go deleted file mode 100644 index 2638945a..00000000 --- a/v1/client/analytics/get_map_reduce_file_formats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetMapReduceFileFormatsReader is a Reader for the GetMapReduceFileFormats structure. -type GetMapReduceFileFormatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapReduceFileFormatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapReduceFileFormatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMapReduceFileFormatsDefault(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 - } -} - -// NewGetMapReduceFileFormatsOK creates a GetMapReduceFileFormatsOK with default headers values -func NewGetMapReduceFileFormatsOK() *GetMapReduceFileFormatsOK { - return &GetMapReduceFileFormatsOK{} -} - -/* -GetMapReduceFileFormatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapReduceFileFormatsOK struct { - Payload *models.MapReduceFileFormats -} - -// IsSuccess returns true when this get map reduce file formats o k response has a 2xx status code -func (o *GetMapReduceFileFormatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get map reduce file formats o k response has a 3xx status code -func (o *GetMapReduceFileFormatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map reduce file formats o k response has a 4xx status code -func (o *GetMapReduceFileFormatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get map reduce file formats o k response has a 5xx status code -func (o *GetMapReduceFileFormatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get map reduce file formats o k response a status code equal to that given -func (o *GetMapReduceFileFormatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get map reduce file formats o k response -func (o *GetMapReduceFileFormatsOK) Code() int { - return 200 -} - -func (o *GetMapReduceFileFormatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrFileFormats][%d] getMapReduceFileFormatsOK %s", 200, payload) -} - -func (o *GetMapReduceFileFormatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrFileFormats][%d] getMapReduceFileFormatsOK %s", 200, payload) -} - -func (o *GetMapReduceFileFormatsOK) GetPayload() *models.MapReduceFileFormats { - return o.Payload -} - -func (o *GetMapReduceFileFormatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapReduceFileFormats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMapReduceFileFormatsDefault creates a GetMapReduceFileFormatsDefault with default headers values -func NewGetMapReduceFileFormatsDefault(code int) *GetMapReduceFileFormatsDefault { - return &GetMapReduceFileFormatsDefault{ - _statusCode: code, - } -} - -/* -GetMapReduceFileFormatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMapReduceFileFormatsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get map reduce file formats default response has a 2xx status code -func (o *GetMapReduceFileFormatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get map reduce file formats default response has a 3xx status code -func (o *GetMapReduceFileFormatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get map reduce file formats default response has a 4xx status code -func (o *GetMapReduceFileFormatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get map reduce file formats default response has a 5xx status code -func (o *GetMapReduceFileFormatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get map reduce file formats default response a status code equal to that given -func (o *GetMapReduceFileFormatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get map reduce file formats default response -func (o *GetMapReduceFileFormatsDefault) Code() int { - return o._statusCode -} - -func (o *GetMapReduceFileFormatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrFileFormats][%d] GetMapReduceFileFormats default %s", o._statusCode, payload) -} - -func (o *GetMapReduceFileFormatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mrFileFormats][%d] GetMapReduceFileFormats default %s", o._statusCode, payload) -} - -func (o *GetMapReduceFileFormatsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetMapReduceFileFormatsDefault) 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/analytics/get_mapper_by_id_parameters.go b/v1/client/analytics/get_mapper_by_id_parameters.go deleted file mode 100644 index 86554139..00000000 --- a/v1/client/analytics/get_mapper_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewGetMapperByIDParams creates a new GetMapperByIDParams 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 NewGetMapperByIDParams() *GetMapperByIDParams { - return &GetMapperByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapperByIDParamsWithTimeout creates a new GetMapperByIDParams object -// with the ability to set a timeout on a request. -func NewGetMapperByIDParamsWithTimeout(timeout time.Duration) *GetMapperByIDParams { - return &GetMapperByIDParams{ - timeout: timeout, - } -} - -// NewGetMapperByIDParamsWithContext creates a new GetMapperByIDParams object -// with the ability to set a context for a request. -func NewGetMapperByIDParamsWithContext(ctx context.Context) *GetMapperByIDParams { - return &GetMapperByIDParams{ - Context: ctx, - } -} - -// NewGetMapperByIDParamsWithHTTPClient creates a new GetMapperByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapperByIDParamsWithHTTPClient(client *http.Client) *GetMapperByIDParams { - return &GetMapperByIDParams{ - HTTPClient: client, - } -} - -/* -GetMapperByIDParams contains all the parameters to send to the API endpoint - - for the get mapper by Id operation. - - Typically these are written to a http.Request. -*/ -type GetMapperByIDParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get mapper by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapperByIDParams) WithDefaults() *GetMapperByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get mapper by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapperByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get mapper by Id params -func (o *GetMapperByIDParams) WithTimeout(timeout time.Duration) *GetMapperByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get mapper by Id params -func (o *GetMapperByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get mapper by Id params -func (o *GetMapperByIDParams) WithContext(ctx context.Context) *GetMapperByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get mapper by Id params -func (o *GetMapperByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get mapper by Id params -func (o *GetMapperByIDParams) WithHTTPClient(client *http.Client) *GetMapperByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get mapper by Id params -func (o *GetMapperByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get mapper by Id params -func (o *GetMapperByIDParams) WithID(id int64) *GetMapperByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get mapper by Id params -func (o *GetMapperByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapperByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/get_mapper_by_id_responses.go b/v1/client/analytics/get_mapper_by_id_responses.go deleted file mode 100644 index 68891ffc..00000000 --- a/v1/client/analytics/get_mapper_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetMapperByIDReader is a Reader for the GetMapperByID structure. -type GetMapperByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapperByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapperByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMapperByIDDefault(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 - } -} - -// NewGetMapperByIDOK creates a GetMapperByIDOK with default headers values -func NewGetMapperByIDOK() *GetMapperByIDOK { - return &GetMapperByIDOK{} -} - -/* -GetMapperByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapperByIDOK struct { - Payload *models.MapperInfo -} - -// IsSuccess returns true when this get mapper by Id o k response has a 2xx status code -func (o *GetMapperByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get mapper by Id o k response has a 3xx status code -func (o *GetMapperByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get mapper by Id o k response has a 4xx status code -func (o *GetMapperByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get mapper by Id o k response has a 5xx status code -func (o *GetMapperByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get mapper by Id o k response a status code equal to that given -func (o *GetMapperByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get mapper by Id o k response -func (o *GetMapperByIDOK) Code() int { - return 200 -} - -func (o *GetMapperByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers/{id}][%d] getMapperByIdOK %s", 200, payload) -} - -func (o *GetMapperByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers/{id}][%d] getMapperByIdOK %s", 200, payload) -} - -func (o *GetMapperByIDOK) GetPayload() *models.MapperInfo { - return o.Payload -} - -func (o *GetMapperByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapperInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMapperByIDDefault creates a GetMapperByIDDefault with default headers values -func NewGetMapperByIDDefault(code int) *GetMapperByIDDefault { - return &GetMapperByIDDefault{ - _statusCode: code, - } -} - -/* -GetMapperByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMapperByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get mapper by Id default response has a 2xx status code -func (o *GetMapperByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get mapper by Id default response has a 3xx status code -func (o *GetMapperByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get mapper by Id default response has a 4xx status code -func (o *GetMapperByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get mapper by Id default response has a 5xx status code -func (o *GetMapperByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get mapper by Id default response a status code equal to that given -func (o *GetMapperByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get mapper by Id default response -func (o *GetMapperByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetMapperByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers/{id}][%d] GetMapperById default %s", o._statusCode, payload) -} - -func (o *GetMapperByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers/{id}][%d] GetMapperById default %s", o._statusCode, payload) -} - -func (o *GetMapperByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetMapperByIDDefault) 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/analytics/get_mappers_parameters.go b/v1/client/analytics/get_mappers_parameters.go deleted file mode 100644 index 54c73237..00000000 --- a/v1/client/analytics/get_mappers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewGetMappersParams creates a new GetMappersParams 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 NewGetMappersParams() *GetMappersParams { - return &GetMappersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMappersParamsWithTimeout creates a new GetMappersParams object -// with the ability to set a timeout on a request. -func NewGetMappersParamsWithTimeout(timeout time.Duration) *GetMappersParams { - return &GetMappersParams{ - timeout: timeout, - } -} - -// NewGetMappersParamsWithContext creates a new GetMappersParams object -// with the ability to set a context for a request. -func NewGetMappersParamsWithContext(ctx context.Context) *GetMappersParams { - return &GetMappersParams{ - Context: ctx, - } -} - -// NewGetMappersParamsWithHTTPClient creates a new GetMappersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMappersParamsWithHTTPClient(client *http.Client) *GetMappersParams { - return &GetMappersParams{ - HTTPClient: client, - } -} - -/* -GetMappersParams contains all the parameters to send to the API endpoint - - for the get mappers operation. - - Typically these are written to a http.Request. -*/ -type GetMappersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get mappers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMappersParams) WithDefaults() *GetMappersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get mappers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMappersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get mappers params -func (o *GetMappersParams) WithTimeout(timeout time.Duration) *GetMappersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get mappers params -func (o *GetMappersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get mappers params -func (o *GetMappersParams) WithContext(ctx context.Context) *GetMappersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get mappers params -func (o *GetMappersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get mappers params -func (o *GetMappersParams) WithHTTPClient(client *http.Client) *GetMappersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get mappers params -func (o *GetMappersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMappersParams) 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/analytics/get_mappers_responses.go b/v1/client/analytics/get_mappers_responses.go deleted file mode 100644 index 852ba609..00000000 --- a/v1/client/analytics/get_mappers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetMappersReader is a Reader for the GetMappers structure. -type GetMappersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMappersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMappersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMappersDefault(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 - } -} - -// NewGetMappersOK creates a GetMappersOK with default headers values -func NewGetMappersOK() *GetMappersOK { - return &GetMappersOK{} -} - -/* -GetMappersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMappersOK struct { - Payload *models.MappersWrapper -} - -// IsSuccess returns true when this get mappers o k response has a 2xx status code -func (o *GetMappersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get mappers o k response has a 3xx status code -func (o *GetMappersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get mappers o k response has a 4xx status code -func (o *GetMappersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get mappers o k response has a 5xx status code -func (o *GetMappersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get mappers o k response a status code equal to that given -func (o *GetMappersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get mappers o k response -func (o *GetMappersOK) Code() int { - return 200 -} - -func (o *GetMappersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers][%d] getMappersOK %s", 200, payload) -} - -func (o *GetMappersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers][%d] getMappersOK %s", 200, payload) -} - -func (o *GetMappersOK) GetPayload() *models.MappersWrapper { - return o.Payload -} - -func (o *GetMappersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MappersWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMappersDefault creates a GetMappersDefault with default headers values -func NewGetMappersDefault(code int) *GetMappersDefault { - return &GetMappersDefault{ - _statusCode: code, - } -} - -/* -GetMappersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMappersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get mappers default response has a 2xx status code -func (o *GetMappersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get mappers default response has a 3xx status code -func (o *GetMappersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get mappers default response has a 4xx status code -func (o *GetMappersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get mappers default response has a 5xx status code -func (o *GetMappersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get mappers default response a status code equal to that given -func (o *GetMappersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get mappers default response -func (o *GetMappersDefault) Code() int { - return o._statusCode -} - -func (o *GetMappersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers][%d] GetMappers default %s", o._statusCode, payload) -} - -func (o *GetMappersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/mappers][%d] GetMappers default %s", o._statusCode, payload) -} - -func (o *GetMappersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetMappersDefault) 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/analytics/get_reducer_by_id_parameters.go b/v1/client/analytics/get_reducer_by_id_parameters.go deleted file mode 100644 index 0e01bf8e..00000000 --- a/v1/client/analytics/get_reducer_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewGetReducerByIDParams creates a new GetReducerByIDParams 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 NewGetReducerByIDParams() *GetReducerByIDParams { - return &GetReducerByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReducerByIDParamsWithTimeout creates a new GetReducerByIDParams object -// with the ability to set a timeout on a request. -func NewGetReducerByIDParamsWithTimeout(timeout time.Duration) *GetReducerByIDParams { - return &GetReducerByIDParams{ - timeout: timeout, - } -} - -// NewGetReducerByIDParamsWithContext creates a new GetReducerByIDParams object -// with the ability to set a context for a request. -func NewGetReducerByIDParamsWithContext(ctx context.Context) *GetReducerByIDParams { - return &GetReducerByIDParams{ - Context: ctx, - } -} - -// NewGetReducerByIDParamsWithHTTPClient creates a new GetReducerByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReducerByIDParamsWithHTTPClient(client *http.Client) *GetReducerByIDParams { - return &GetReducerByIDParams{ - HTTPClient: client, - } -} - -/* -GetReducerByIDParams contains all the parameters to send to the API endpoint - - for the get reducer by Id operation. - - Typically these are written to a http.Request. -*/ -type GetReducerByIDParams struct { - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get reducer by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReducerByIDParams) WithDefaults() *GetReducerByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get reducer by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReducerByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get reducer by Id params -func (o *GetReducerByIDParams) WithTimeout(timeout time.Duration) *GetReducerByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get reducer by Id params -func (o *GetReducerByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get reducer by Id params -func (o *GetReducerByIDParams) WithContext(ctx context.Context) *GetReducerByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get reducer by Id params -func (o *GetReducerByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get reducer by Id params -func (o *GetReducerByIDParams) WithHTTPClient(client *http.Client) *GetReducerByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get reducer by Id params -func (o *GetReducerByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get reducer by Id params -func (o *GetReducerByIDParams) WithID(id int64) *GetReducerByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get reducer by Id params -func (o *GetReducerByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReducerByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/get_reducer_by_id_responses.go b/v1/client/analytics/get_reducer_by_id_responses.go deleted file mode 100644 index 77fe58e0..00000000 --- a/v1/client/analytics/get_reducer_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetReducerByIDReader is a Reader for the GetReducerByID structure. -type GetReducerByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReducerByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReducerByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetReducerByIDDefault(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 - } -} - -// NewGetReducerByIDOK creates a GetReducerByIDOK with default headers values -func NewGetReducerByIDOK() *GetReducerByIDOK { - return &GetReducerByIDOK{} -} - -/* -GetReducerByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetReducerByIDOK struct { - Payload *models.ReducerInfo -} - -// IsSuccess returns true when this get reducer by Id o k response has a 2xx status code -func (o *GetReducerByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get reducer by Id o k response has a 3xx status code -func (o *GetReducerByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get reducer by Id o k response has a 4xx status code -func (o *GetReducerByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get reducer by Id o k response has a 5xx status code -func (o *GetReducerByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get reducer by Id o k response a status code equal to that given -func (o *GetReducerByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get reducer by Id o k response -func (o *GetReducerByIDOK) Code() int { - return 200 -} - -func (o *GetReducerByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers/{id}][%d] getReducerByIdOK %s", 200, payload) -} - -func (o *GetReducerByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers/{id}][%d] getReducerByIdOK %s", 200, payload) -} - -func (o *GetReducerByIDOK) GetPayload() *models.ReducerInfo { - return o.Payload -} - -func (o *GetReducerByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReducerInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReducerByIDDefault creates a GetReducerByIDDefault with default headers values -func NewGetReducerByIDDefault(code int) *GetReducerByIDDefault { - return &GetReducerByIDDefault{ - _statusCode: code, - } -} - -/* -GetReducerByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetReducerByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get reducer by Id default response has a 2xx status code -func (o *GetReducerByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get reducer by Id default response has a 3xx status code -func (o *GetReducerByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get reducer by Id default response has a 4xx status code -func (o *GetReducerByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get reducer by Id default response has a 5xx status code -func (o *GetReducerByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get reducer by Id default response a status code equal to that given -func (o *GetReducerByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get reducer by Id default response -func (o *GetReducerByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetReducerByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers/{id}][%d] GetReducerById default %s", o._statusCode, payload) -} - -func (o *GetReducerByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers/{id}][%d] GetReducerById default %s", o._statusCode, payload) -} - -func (o *GetReducerByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetReducerByIDDefault) 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/analytics/get_reducers_parameters.go b/v1/client/analytics/get_reducers_parameters.go deleted file mode 100644 index ef04a2d6..00000000 --- a/v1/client/analytics/get_reducers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewGetReducersParams creates a new GetReducersParams 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 NewGetReducersParams() *GetReducersParams { - return &GetReducersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReducersParamsWithTimeout creates a new GetReducersParams object -// with the ability to set a timeout on a request. -func NewGetReducersParamsWithTimeout(timeout time.Duration) *GetReducersParams { - return &GetReducersParams{ - timeout: timeout, - } -} - -// NewGetReducersParamsWithContext creates a new GetReducersParams object -// with the ability to set a context for a request. -func NewGetReducersParamsWithContext(ctx context.Context) *GetReducersParams { - return &GetReducersParams{ - Context: ctx, - } -} - -// NewGetReducersParamsWithHTTPClient creates a new GetReducersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReducersParamsWithHTTPClient(client *http.Client) *GetReducersParams { - return &GetReducersParams{ - HTTPClient: client, - } -} - -/* -GetReducersParams contains all the parameters to send to the API endpoint - - for the get reducers operation. - - Typically these are written to a http.Request. -*/ -type GetReducersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get reducers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReducersParams) WithDefaults() *GetReducersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get reducers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReducersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get reducers params -func (o *GetReducersParams) WithTimeout(timeout time.Duration) *GetReducersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get reducers params -func (o *GetReducersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get reducers params -func (o *GetReducersParams) WithContext(ctx context.Context) *GetReducersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get reducers params -func (o *GetReducersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get reducers params -func (o *GetReducersParams) WithHTTPClient(client *http.Client) *GetReducersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get reducers params -func (o *GetReducersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReducersParams) 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/analytics/get_reducers_responses.go b/v1/client/analytics/get_reducers_responses.go deleted file mode 100644 index cedd09cf..00000000 --- a/v1/client/analytics/get_reducers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetReducersReader is a Reader for the GetReducers structure. -type GetReducersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReducersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReducersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetReducersDefault(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 - } -} - -// NewGetReducersOK creates a GetReducersOK with default headers values -func NewGetReducersOK() *GetReducersOK { - return &GetReducersOK{} -} - -/* -GetReducersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetReducersOK struct { - Payload *models.ReducersWrapper -} - -// IsSuccess returns true when this get reducers o k response has a 2xx status code -func (o *GetReducersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get reducers o k response has a 3xx status code -func (o *GetReducersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get reducers o k response has a 4xx status code -func (o *GetReducersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get reducers o k response has a 5xx status code -func (o *GetReducersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get reducers o k response a status code equal to that given -func (o *GetReducersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get reducers o k response -func (o *GetReducersOK) Code() int { - return 200 -} - -func (o *GetReducersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers][%d] getReducersOK %s", 200, payload) -} - -func (o *GetReducersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers][%d] getReducersOK %s", 200, payload) -} - -func (o *GetReducersOK) GetPayload() *models.ReducersWrapper { - return o.Payload -} - -func (o *GetReducersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReducersWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReducersDefault creates a GetReducersDefault with default headers values -func NewGetReducersDefault(code int) *GetReducersDefault { - return &GetReducersDefault{ - _statusCode: code, - } -} - -/* -GetReducersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetReducersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get reducers default response has a 2xx status code -func (o *GetReducersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get reducers default response has a 3xx status code -func (o *GetReducersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get reducers default response has a 4xx status code -func (o *GetReducersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get reducers default response has a 5xx status code -func (o *GetReducersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get reducers default response a status code equal to that given -func (o *GetReducersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get reducers default response -func (o *GetReducersDefault) Code() int { - return o._statusCode -} - -func (o *GetReducersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers][%d] GetReducers default %s", o._statusCode, payload) -} - -func (o *GetReducersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/reducers][%d] GetReducers default %s", o._statusCode, payload) -} - -func (o *GetReducersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetReducersDefault) 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/analytics/get_supported_patterns_parameters.go b/v1/client/analytics/get_supported_patterns_parameters.go deleted file mode 100644 index a5aa40ef..00000000 --- a/v1/client/analytics/get_supported_patterns_parameters.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" -) - -// NewGetSupportedPatternsParams creates a new GetSupportedPatternsParams 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 NewGetSupportedPatternsParams() *GetSupportedPatternsParams { - return &GetSupportedPatternsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSupportedPatternsParamsWithTimeout creates a new GetSupportedPatternsParams object -// with the ability to set a timeout on a request. -func NewGetSupportedPatternsParamsWithTimeout(timeout time.Duration) *GetSupportedPatternsParams { - return &GetSupportedPatternsParams{ - timeout: timeout, - } -} - -// NewGetSupportedPatternsParamsWithContext creates a new GetSupportedPatternsParams object -// with the ability to set a context for a request. -func NewGetSupportedPatternsParamsWithContext(ctx context.Context) *GetSupportedPatternsParams { - return &GetSupportedPatternsParams{ - Context: ctx, - } -} - -// NewGetSupportedPatternsParamsWithHTTPClient creates a new GetSupportedPatternsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSupportedPatternsParamsWithHTTPClient(client *http.Client) *GetSupportedPatternsParams { - return &GetSupportedPatternsParams{ - HTTPClient: client, - } -} - -/* -GetSupportedPatternsParams contains all the parameters to send to the API endpoint - - for the get supported patterns operation. - - Typically these are written to a http.Request. -*/ -type GetSupportedPatternsParams struct { - - /* ApplicationDataType. - - Specifies the data type for which supported patterns can be fetched. - - Format: int32 - */ - ApplicationDataType *int32 - - /* ApplicationID. - - Specifies the application Id. - - Format: int64 - */ - ApplicationID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get supported patterns params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportedPatternsParams) WithDefaults() *GetSupportedPatternsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get supported patterns params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportedPatternsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get supported patterns params -func (o *GetSupportedPatternsParams) WithTimeout(timeout time.Duration) *GetSupportedPatternsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get supported patterns params -func (o *GetSupportedPatternsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get supported patterns params -func (o *GetSupportedPatternsParams) WithContext(ctx context.Context) *GetSupportedPatternsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get supported patterns params -func (o *GetSupportedPatternsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get supported patterns params -func (o *GetSupportedPatternsParams) WithHTTPClient(client *http.Client) *GetSupportedPatternsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get supported patterns params -func (o *GetSupportedPatternsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithApplicationDataType adds the applicationDataType to the get supported patterns params -func (o *GetSupportedPatternsParams) WithApplicationDataType(applicationDataType *int32) *GetSupportedPatternsParams { - o.SetApplicationDataType(applicationDataType) - return o -} - -// SetApplicationDataType adds the applicationDataType to the get supported patterns params -func (o *GetSupportedPatternsParams) SetApplicationDataType(applicationDataType *int32) { - o.ApplicationDataType = applicationDataType -} - -// WithApplicationID adds the applicationID to the get supported patterns params -func (o *GetSupportedPatternsParams) WithApplicationID(applicationID int64) *GetSupportedPatternsParams { - o.SetApplicationID(applicationID) - return o -} - -// SetApplicationID adds the applicationId to the get supported patterns params -func (o *GetSupportedPatternsParams) SetApplicationID(applicationID int64) { - o.ApplicationID = applicationID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSupportedPatternsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ApplicationDataType != nil { - - // query param applicationDataType - var qrApplicationDataType int32 - - if o.ApplicationDataType != nil { - qrApplicationDataType = *o.ApplicationDataType - } - qApplicationDataType := swag.FormatInt32(qrApplicationDataType) - if qApplicationDataType != "" { - - if err := r.SetQueryParam("applicationDataType", qApplicationDataType); err != nil { - return err - } - } - } - - // query param applicationId - qrApplicationID := o.ApplicationID - qApplicationID := swag.FormatInt64(qrApplicationID) - if qApplicationID != "" { - - if err := r.SetQueryParam("applicationId", qApplicationID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/get_supported_patterns_responses.go b/v1/client/analytics/get_supported_patterns_responses.go deleted file mode 100644 index 1d854f58..00000000 --- a/v1/client/analytics/get_supported_patterns_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSupportedPatternsReader is a Reader for the GetSupportedPatterns structure. -type GetSupportedPatternsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSupportedPatternsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSupportedPatternsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSupportedPatternsDefault(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 - } -} - -// NewGetSupportedPatternsOK creates a GetSupportedPatternsOK with default headers values -func NewGetSupportedPatternsOK() *GetSupportedPatternsOK { - return &GetSupportedPatternsOK{} -} - -/* -GetSupportedPatternsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSupportedPatternsOK struct { - Payload []*models.SupportedPattern -} - -// IsSuccess returns true when this get supported patterns o k response has a 2xx status code -func (o *GetSupportedPatternsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get supported patterns o k response has a 3xx status code -func (o *GetSupportedPatternsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get supported patterns o k response has a 4xx status code -func (o *GetSupportedPatternsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get supported patterns o k response has a 5xx status code -func (o *GetSupportedPatternsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get supported patterns o k response a status code equal to that given -func (o *GetSupportedPatternsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get supported patterns o k response -func (o *GetSupportedPatternsOK) Code() int { - return 200 -} - -func (o *GetSupportedPatternsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/supportedPatterns][%d] getSupportedPatternsOK %s", 200, payload) -} - -func (o *GetSupportedPatternsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/supportedPatterns][%d] getSupportedPatternsOK %s", 200, payload) -} - -func (o *GetSupportedPatternsOK) GetPayload() []*models.SupportedPattern { - return o.Payload -} - -func (o *GetSupportedPatternsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSupportedPatternsDefault creates a GetSupportedPatternsDefault with default headers values -func NewGetSupportedPatternsDefault(code int) *GetSupportedPatternsDefault { - return &GetSupportedPatternsDefault{ - _statusCode: code, - } -} - -/* -GetSupportedPatternsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSupportedPatternsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get supported patterns default response has a 2xx status code -func (o *GetSupportedPatternsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get supported patterns default response has a 3xx status code -func (o *GetSupportedPatternsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get supported patterns default response has a 4xx status code -func (o *GetSupportedPatternsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get supported patterns default response has a 5xx status code -func (o *GetSupportedPatternsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get supported patterns default response a status code equal to that given -func (o *GetSupportedPatternsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get supported patterns default response -func (o *GetSupportedPatternsDefault) Code() int { - return o._statusCode -} - -func (o *GetSupportedPatternsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/supportedPatterns][%d] GetSupportedPatterns default %s", o._statusCode, payload) -} - -func (o *GetSupportedPatternsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/analytics/supportedPatterns][%d] GetSupportedPatterns default %s", o._statusCode, payload) -} - -func (o *GetSupportedPatternsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSupportedPatternsDefault) 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/analytics/run_map_reduce_app_instance_parameters.go b/v1/client/analytics/run_map_reduce_app_instance_parameters.go deleted file mode 100644 index 88164bb4..00000000 --- a/v1/client/analytics/run_map_reduce_app_instance_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRunMapReduceAppInstanceParams creates a new RunMapReduceAppInstanceParams 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 NewRunMapReduceAppInstanceParams() *RunMapReduceAppInstanceParams { - return &RunMapReduceAppInstanceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRunMapReduceAppInstanceParamsWithTimeout creates a new RunMapReduceAppInstanceParams object -// with the ability to set a timeout on a request. -func NewRunMapReduceAppInstanceParamsWithTimeout(timeout time.Duration) *RunMapReduceAppInstanceParams { - return &RunMapReduceAppInstanceParams{ - timeout: timeout, - } -} - -// NewRunMapReduceAppInstanceParamsWithContext creates a new RunMapReduceAppInstanceParams object -// with the ability to set a context for a request. -func NewRunMapReduceAppInstanceParamsWithContext(ctx context.Context) *RunMapReduceAppInstanceParams { - return &RunMapReduceAppInstanceParams{ - Context: ctx, - } -} - -// NewRunMapReduceAppInstanceParamsWithHTTPClient creates a new RunMapReduceAppInstanceParams object -// with the ability to set a custom HTTPClient for a request. -func NewRunMapReduceAppInstanceParamsWithHTTPClient(client *http.Client) *RunMapReduceAppInstanceParams { - return &RunMapReduceAppInstanceParams{ - HTTPClient: client, - } -} - -/* -RunMapReduceAppInstanceParams contains all the parameters to send to the API endpoint - - for the run map reduce app instance operation. - - Typically these are written to a http.Request. -*/ -type RunMapReduceAppInstanceParams struct { - - // Body. - Body *models.RunMapReduceParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the run map reduce app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunMapReduceAppInstanceParams) WithDefaults() *RunMapReduceAppInstanceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the run map reduce app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunMapReduceAppInstanceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) WithTimeout(timeout time.Duration) *RunMapReduceAppInstanceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) WithContext(ctx context.Context) *RunMapReduceAppInstanceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) WithHTTPClient(client *http.Client) *RunMapReduceAppInstanceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) WithBody(body *models.RunMapReduceParams) *RunMapReduceAppInstanceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the run map reduce app instance params -func (o *RunMapReduceAppInstanceParams) SetBody(body *models.RunMapReduceParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RunMapReduceAppInstanceParams) 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/analytics/run_map_reduce_app_instance_responses.go b/v1/client/analytics/run_map_reduce_app_instance_responses.go deleted file mode 100644 index c75db2e2..00000000 --- a/v1/client/analytics/run_map_reduce_app_instance_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RunMapReduceAppInstanceReader is a Reader for the RunMapReduceAppInstance structure. -type RunMapReduceAppInstanceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RunMapReduceAppInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRunMapReduceAppInstanceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRunMapReduceAppInstanceDefault(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 - } -} - -// NewRunMapReduceAppInstanceOK creates a RunMapReduceAppInstanceOK with default headers values -func NewRunMapReduceAppInstanceOK() *RunMapReduceAppInstanceOK { - return &RunMapReduceAppInstanceOK{} -} - -/* -RunMapReduceAppInstanceOK describes a response with status code 200, with default header values. - -Success -*/ -type RunMapReduceAppInstanceOK struct { - Payload *models.RunMapReduceInstanceResult -} - -// IsSuccess returns true when this run map reduce app instance o k response has a 2xx status code -func (o *RunMapReduceAppInstanceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this run map reduce app instance o k response has a 3xx status code -func (o *RunMapReduceAppInstanceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this run map reduce app instance o k response has a 4xx status code -func (o *RunMapReduceAppInstanceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this run map reduce app instance o k response has a 5xx status code -func (o *RunMapReduceAppInstanceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this run map reduce app instance o k response a status code equal to that given -func (o *RunMapReduceAppInstanceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the run map reduce app instance o k response -func (o *RunMapReduceAppInstanceOK) Code() int { - return 200 -} - -func (o *RunMapReduceAppInstanceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/runAppInstance][%d] runMapReduceAppInstanceOK %s", 200, payload) -} - -func (o *RunMapReduceAppInstanceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/runAppInstance][%d] runMapReduceAppInstanceOK %s", 200, payload) -} - -func (o *RunMapReduceAppInstanceOK) GetPayload() *models.RunMapReduceInstanceResult { - return o.Payload -} - -func (o *RunMapReduceAppInstanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RunMapReduceInstanceResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRunMapReduceAppInstanceDefault creates a RunMapReduceAppInstanceDefault with default headers values -func NewRunMapReduceAppInstanceDefault(code int) *RunMapReduceAppInstanceDefault { - return &RunMapReduceAppInstanceDefault{ - _statusCode: code, - } -} - -/* -RunMapReduceAppInstanceDefault describes a response with status code -1, with default header values. - -Error -*/ -type RunMapReduceAppInstanceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this run map reduce app instance default response has a 2xx status code -func (o *RunMapReduceAppInstanceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this run map reduce app instance default response has a 3xx status code -func (o *RunMapReduceAppInstanceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this run map reduce app instance default response has a 4xx status code -func (o *RunMapReduceAppInstanceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this run map reduce app instance default response has a 5xx status code -func (o *RunMapReduceAppInstanceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this run map reduce app instance default response a status code equal to that given -func (o *RunMapReduceAppInstanceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the run map reduce app instance default response -func (o *RunMapReduceAppInstanceDefault) Code() int { - return o._statusCode -} - -func (o *RunMapReduceAppInstanceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/runAppInstance][%d] RunMapReduceAppInstance default %s", o._statusCode, payload) -} - -func (o *RunMapReduceAppInstanceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/runAppInstance][%d] RunMapReduceAppInstance default %s", o._statusCode, payload) -} - -func (o *RunMapReduceAppInstanceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RunMapReduceAppInstanceDefault) 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/analytics/save_pattern_parameters.go b/v1/client/analytics/save_pattern_parameters.go deleted file mode 100644 index edddca4e..00000000 --- a/v1/client/analytics/save_pattern_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewSavePatternParams creates a new SavePatternParams 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 NewSavePatternParams() *SavePatternParams { - return &SavePatternParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSavePatternParamsWithTimeout creates a new SavePatternParams object -// with the ability to set a timeout on a request. -func NewSavePatternParamsWithTimeout(timeout time.Duration) *SavePatternParams { - return &SavePatternParams{ - timeout: timeout, - } -} - -// NewSavePatternParamsWithContext creates a new SavePatternParams object -// with the ability to set a context for a request. -func NewSavePatternParamsWithContext(ctx context.Context) *SavePatternParams { - return &SavePatternParams{ - Context: ctx, - } -} - -// NewSavePatternParamsWithHTTPClient creates a new SavePatternParams object -// with the ability to set a custom HTTPClient for a request. -func NewSavePatternParamsWithHTTPClient(client *http.Client) *SavePatternParams { - return &SavePatternParams{ - HTTPClient: client, - } -} - -/* -SavePatternParams contains all the parameters to send to the API endpoint - - for the save pattern operation. - - Typically these are written to a http.Request. -*/ -type SavePatternParams struct { - - // Body. - Body *models.PatternRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the save pattern params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SavePatternParams) WithDefaults() *SavePatternParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the save pattern params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SavePatternParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the save pattern params -func (o *SavePatternParams) WithTimeout(timeout time.Duration) *SavePatternParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the save pattern params -func (o *SavePatternParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the save pattern params -func (o *SavePatternParams) WithContext(ctx context.Context) *SavePatternParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the save pattern params -func (o *SavePatternParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the save pattern params -func (o *SavePatternParams) WithHTTPClient(client *http.Client) *SavePatternParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the save pattern params -func (o *SavePatternParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the save pattern params -func (o *SavePatternParams) WithBody(body *models.PatternRequestBody) *SavePatternParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the save pattern params -func (o *SavePatternParams) SetBody(body *models.PatternRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *SavePatternParams) 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/analytics/save_pattern_responses.go b/v1/client/analytics/save_pattern_responses.go deleted file mode 100644 index 52b2c662..00000000 --- a/v1/client/analytics/save_pattern_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SavePatternReader is a Reader for the SavePattern structure. -type SavePatternReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SavePatternReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewSavePatternCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSavePatternDefault(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 - } -} - -// NewSavePatternCreated creates a SavePatternCreated with default headers values -func NewSavePatternCreated() *SavePatternCreated { - return &SavePatternCreated{} -} - -/* -SavePatternCreated describes a response with status code 201, with default header values. - -No Content -*/ -type SavePatternCreated struct { -} - -// IsSuccess returns true when this save pattern created response has a 2xx status code -func (o *SavePatternCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this save pattern created response has a 3xx status code -func (o *SavePatternCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this save pattern created response has a 4xx status code -func (o *SavePatternCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this save pattern created response has a 5xx status code -func (o *SavePatternCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this save pattern created response a status code equal to that given -func (o *SavePatternCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the save pattern created response -func (o *SavePatternCreated) Code() int { - return 201 -} - -func (o *SavePatternCreated) Error() string { - return fmt.Sprintf("[PUT /public/analytics/supportedPatterns][%d] savePatternCreated", 201) -} - -func (o *SavePatternCreated) String() string { - return fmt.Sprintf("[PUT /public/analytics/supportedPatterns][%d] savePatternCreated", 201) -} - -func (o *SavePatternCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewSavePatternDefault creates a SavePatternDefault with default headers values -func NewSavePatternDefault(code int) *SavePatternDefault { - return &SavePatternDefault{ - _statusCode: code, - } -} - -/* -SavePatternDefault describes a response with status code -1, with default header values. - -Error -*/ -type SavePatternDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this save pattern default response has a 2xx status code -func (o *SavePatternDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this save pattern default response has a 3xx status code -func (o *SavePatternDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this save pattern default response has a 4xx status code -func (o *SavePatternDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this save pattern default response has a 5xx status code -func (o *SavePatternDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this save pattern default response a status code equal to that given -func (o *SavePatternDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the save pattern default response -func (o *SavePatternDefault) Code() int { - return o._statusCode -} - -func (o *SavePatternDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/supportedPatterns][%d] SavePattern default %s", o._statusCode, payload) -} - -func (o *SavePatternDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/supportedPatterns][%d] SavePattern default %s", o._statusCode, payload) -} - -func (o *SavePatternDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SavePatternDefault) 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/analytics/update_application_parameters.go b/v1/client/analytics/update_application_parameters.go deleted file mode 100644 index 464e3b3e..00000000 --- a/v1/client/analytics/update_application_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateApplicationParams creates a new UpdateApplicationParams 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 NewUpdateApplicationParams() *UpdateApplicationParams { - return &UpdateApplicationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateApplicationParamsWithTimeout creates a new UpdateApplicationParams object -// with the ability to set a timeout on a request. -func NewUpdateApplicationParamsWithTimeout(timeout time.Duration) *UpdateApplicationParams { - return &UpdateApplicationParams{ - timeout: timeout, - } -} - -// NewUpdateApplicationParamsWithContext creates a new UpdateApplicationParams object -// with the ability to set a context for a request. -func NewUpdateApplicationParamsWithContext(ctx context.Context) *UpdateApplicationParams { - return &UpdateApplicationParams{ - Context: ctx, - } -} - -// NewUpdateApplicationParamsWithHTTPClient creates a new UpdateApplicationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateApplicationParamsWithHTTPClient(client *http.Client) *UpdateApplicationParams { - return &UpdateApplicationParams{ - HTTPClient: client, - } -} - -/* -UpdateApplicationParams contains all the parameters to send to the API endpoint - - for the update application operation. - - Typically these are written to a http.Request. -*/ -type UpdateApplicationParams struct { - - // Body. - Body *models.MapReduceInfo - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateApplicationParams) WithDefaults() *UpdateApplicationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update application params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateApplicationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update application params -func (o *UpdateApplicationParams) WithTimeout(timeout time.Duration) *UpdateApplicationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update application params -func (o *UpdateApplicationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update application params -func (o *UpdateApplicationParams) WithContext(ctx context.Context) *UpdateApplicationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update application params -func (o *UpdateApplicationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update application params -func (o *UpdateApplicationParams) WithHTTPClient(client *http.Client) *UpdateApplicationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update application params -func (o *UpdateApplicationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update application params -func (o *UpdateApplicationParams) WithBody(body *models.MapReduceInfo) *UpdateApplicationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update application params -func (o *UpdateApplicationParams) SetBody(body *models.MapReduceInfo) { - o.Body = body -} - -// WithID adds the id to the update application params -func (o *UpdateApplicationParams) WithID(id int64) *UpdateApplicationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update application params -func (o *UpdateApplicationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateApplicationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/update_application_responses.go b/v1/client/analytics/update_application_responses.go deleted file mode 100644 index b7747634..00000000 --- a/v1/client/analytics/update_application_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateApplicationReader is a Reader for the UpdateApplication structure. -type UpdateApplicationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateApplicationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateApplicationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateApplicationDefault(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 - } -} - -// NewUpdateApplicationOK creates a UpdateApplicationOK with default headers values -func NewUpdateApplicationOK() *UpdateApplicationOK { - return &UpdateApplicationOK{} -} - -/* -UpdateApplicationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateApplicationOK struct { - Payload *models.MapReduceInfo -} - -// IsSuccess returns true when this update application o k response has a 2xx status code -func (o *UpdateApplicationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update application o k response has a 3xx status code -func (o *UpdateApplicationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update application o k response has a 4xx status code -func (o *UpdateApplicationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update application o k response has a 5xx status code -func (o *UpdateApplicationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update application o k response a status code equal to that given -func (o *UpdateApplicationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update application o k response -func (o *UpdateApplicationOK) Code() int { - return 200 -} - -func (o *UpdateApplicationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/apps/{id}][%d] updateApplicationOK %s", 200, payload) -} - -func (o *UpdateApplicationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/apps/{id}][%d] updateApplicationOK %s", 200, payload) -} - -func (o *UpdateApplicationOK) GetPayload() *models.MapReduceInfo { - return o.Payload -} - -func (o *UpdateApplicationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapReduceInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateApplicationDefault creates a UpdateApplicationDefault with default headers values -func NewUpdateApplicationDefault(code int) *UpdateApplicationDefault { - return &UpdateApplicationDefault{ - _statusCode: code, - } -} - -/* -UpdateApplicationDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateApplicationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update application default response has a 2xx status code -func (o *UpdateApplicationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update application default response has a 3xx status code -func (o *UpdateApplicationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update application default response has a 4xx status code -func (o *UpdateApplicationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update application default response has a 5xx status code -func (o *UpdateApplicationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update application default response a status code equal to that given -func (o *UpdateApplicationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update application default response -func (o *UpdateApplicationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateApplicationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/apps/{id}][%d] UpdateApplication default %s", o._statusCode, payload) -} - -func (o *UpdateApplicationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/apps/{id}][%d] UpdateApplication default %s", o._statusCode, payload) -} - -func (o *UpdateApplicationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateApplicationDefault) 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/analytics/update_mapper_parameters.go b/v1/client/analytics/update_mapper_parameters.go deleted file mode 100644 index 8d5dace1..00000000 --- a/v1/client/analytics/update_mapper_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateMapperParams creates a new UpdateMapperParams 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 NewUpdateMapperParams() *UpdateMapperParams { - return &UpdateMapperParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateMapperParamsWithTimeout creates a new UpdateMapperParams object -// with the ability to set a timeout on a request. -func NewUpdateMapperParamsWithTimeout(timeout time.Duration) *UpdateMapperParams { - return &UpdateMapperParams{ - timeout: timeout, - } -} - -// NewUpdateMapperParamsWithContext creates a new UpdateMapperParams object -// with the ability to set a context for a request. -func NewUpdateMapperParamsWithContext(ctx context.Context) *UpdateMapperParams { - return &UpdateMapperParams{ - Context: ctx, - } -} - -// NewUpdateMapperParamsWithHTTPClient creates a new UpdateMapperParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateMapperParamsWithHTTPClient(client *http.Client) *UpdateMapperParams { - return &UpdateMapperParams{ - HTTPClient: client, - } -} - -/* -UpdateMapperParams contains all the parameters to send to the API endpoint - - for the update mapper operation. - - Typically these are written to a http.Request. -*/ -type UpdateMapperParams struct { - - // Body. - Body *models.MapperInfo - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateMapperParams) WithDefaults() *UpdateMapperParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update mapper params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateMapperParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update mapper params -func (o *UpdateMapperParams) WithTimeout(timeout time.Duration) *UpdateMapperParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update mapper params -func (o *UpdateMapperParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update mapper params -func (o *UpdateMapperParams) WithContext(ctx context.Context) *UpdateMapperParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update mapper params -func (o *UpdateMapperParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update mapper params -func (o *UpdateMapperParams) WithHTTPClient(client *http.Client) *UpdateMapperParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update mapper params -func (o *UpdateMapperParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update mapper params -func (o *UpdateMapperParams) WithBody(body *models.MapperInfo) *UpdateMapperParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update mapper params -func (o *UpdateMapperParams) SetBody(body *models.MapperInfo) { - o.Body = body -} - -// WithID adds the id to the update mapper params -func (o *UpdateMapperParams) WithID(id int64) *UpdateMapperParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update mapper params -func (o *UpdateMapperParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateMapperParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/update_mapper_responses.go b/v1/client/analytics/update_mapper_responses.go deleted file mode 100644 index 74bdf2ca..00000000 --- a/v1/client/analytics/update_mapper_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateMapperReader is a Reader for the UpdateMapper structure. -type UpdateMapperReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateMapperReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateMapperOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateMapperDefault(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 - } -} - -// NewUpdateMapperOK creates a UpdateMapperOK with default headers values -func NewUpdateMapperOK() *UpdateMapperOK { - return &UpdateMapperOK{} -} - -/* -UpdateMapperOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateMapperOK struct { - Payload *models.MapperInfo -} - -// IsSuccess returns true when this update mapper o k response has a 2xx status code -func (o *UpdateMapperOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update mapper o k response has a 3xx status code -func (o *UpdateMapperOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update mapper o k response has a 4xx status code -func (o *UpdateMapperOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update mapper o k response has a 5xx status code -func (o *UpdateMapperOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update mapper o k response a status code equal to that given -func (o *UpdateMapperOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update mapper o k response -func (o *UpdateMapperOK) Code() int { - return 200 -} - -func (o *UpdateMapperOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/mappers/{id}][%d] updateMapperOK %s", 200, payload) -} - -func (o *UpdateMapperOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/mappers/{id}][%d] updateMapperOK %s", 200, payload) -} - -func (o *UpdateMapperOK) GetPayload() *models.MapperInfo { - return o.Payload -} - -func (o *UpdateMapperOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MapperInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateMapperDefault creates a UpdateMapperDefault with default headers values -func NewUpdateMapperDefault(code int) *UpdateMapperDefault { - return &UpdateMapperDefault{ - _statusCode: code, - } -} - -/* -UpdateMapperDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateMapperDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update mapper default response has a 2xx status code -func (o *UpdateMapperDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update mapper default response has a 3xx status code -func (o *UpdateMapperDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update mapper default response has a 4xx status code -func (o *UpdateMapperDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update mapper default response has a 5xx status code -func (o *UpdateMapperDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update mapper default response a status code equal to that given -func (o *UpdateMapperDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update mapper default response -func (o *UpdateMapperDefault) Code() int { - return o._statusCode -} - -func (o *UpdateMapperDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/mappers/{id}][%d] UpdateMapper default %s", o._statusCode, payload) -} - -func (o *UpdateMapperDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/mappers/{id}][%d] UpdateMapper default %s", o._statusCode, payload) -} - -func (o *UpdateMapperDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateMapperDefault) 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/analytics/update_reducer_parameters.go b/v1/client/analytics/update_reducer_parameters.go deleted file mode 100644 index 1f671cb6..00000000 --- a/v1/client/analytics/update_reducer_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateReducerParams creates a new UpdateReducerParams 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 NewUpdateReducerParams() *UpdateReducerParams { - return &UpdateReducerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateReducerParamsWithTimeout creates a new UpdateReducerParams object -// with the ability to set a timeout on a request. -func NewUpdateReducerParamsWithTimeout(timeout time.Duration) *UpdateReducerParams { - return &UpdateReducerParams{ - timeout: timeout, - } -} - -// NewUpdateReducerParamsWithContext creates a new UpdateReducerParams object -// with the ability to set a context for a request. -func NewUpdateReducerParamsWithContext(ctx context.Context) *UpdateReducerParams { - return &UpdateReducerParams{ - Context: ctx, - } -} - -// NewUpdateReducerParamsWithHTTPClient creates a new UpdateReducerParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateReducerParamsWithHTTPClient(client *http.Client) *UpdateReducerParams { - return &UpdateReducerParams{ - HTTPClient: client, - } -} - -/* -UpdateReducerParams contains all the parameters to send to the API endpoint - - for the update reducer operation. - - Typically these are written to a http.Request. -*/ -type UpdateReducerParams struct { - - // Body. - Body *models.ReducerInfo - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateReducerParams) WithDefaults() *UpdateReducerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update reducer params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateReducerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update reducer params -func (o *UpdateReducerParams) WithTimeout(timeout time.Duration) *UpdateReducerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update reducer params -func (o *UpdateReducerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update reducer params -func (o *UpdateReducerParams) WithContext(ctx context.Context) *UpdateReducerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update reducer params -func (o *UpdateReducerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update reducer params -func (o *UpdateReducerParams) WithHTTPClient(client *http.Client) *UpdateReducerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update reducer params -func (o *UpdateReducerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update reducer params -func (o *UpdateReducerParams) WithBody(body *models.ReducerInfo) *UpdateReducerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update reducer params -func (o *UpdateReducerParams) SetBody(body *models.ReducerInfo) { - o.Body = body -} - -// WithID adds the id to the update reducer params -func (o *UpdateReducerParams) WithID(id int64) *UpdateReducerParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update reducer params -func (o *UpdateReducerParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateReducerParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/analytics/update_reducer_responses.go b/v1/client/analytics/update_reducer_responses.go deleted file mode 100644 index 4c725993..00000000 --- a/v1/client/analytics/update_reducer_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateReducerReader is a Reader for the UpdateReducer structure. -type UpdateReducerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateReducerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateReducerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateReducerDefault(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 - } -} - -// NewUpdateReducerOK creates a UpdateReducerOK with default headers values -func NewUpdateReducerOK() *UpdateReducerOK { - return &UpdateReducerOK{} -} - -/* -UpdateReducerOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateReducerOK struct { - Payload *models.ReducerInfo -} - -// IsSuccess returns true when this update reducer o k response has a 2xx status code -func (o *UpdateReducerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update reducer o k response has a 3xx status code -func (o *UpdateReducerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update reducer o k response has a 4xx status code -func (o *UpdateReducerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update reducer o k response has a 5xx status code -func (o *UpdateReducerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update reducer o k response a status code equal to that given -func (o *UpdateReducerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update reducer o k response -func (o *UpdateReducerOK) Code() int { - return 200 -} - -func (o *UpdateReducerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/reducers/{id}][%d] updateReducerOK %s", 200, payload) -} - -func (o *UpdateReducerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/reducers/{id}][%d] updateReducerOK %s", 200, payload) -} - -func (o *UpdateReducerOK) GetPayload() *models.ReducerInfo { - return o.Payload -} - -func (o *UpdateReducerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReducerInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateReducerDefault creates a UpdateReducerDefault with default headers values -func NewUpdateReducerDefault(code int) *UpdateReducerDefault { - return &UpdateReducerDefault{ - _statusCode: code, - } -} - -/* -UpdateReducerDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateReducerDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update reducer default response has a 2xx status code -func (o *UpdateReducerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update reducer default response has a 3xx status code -func (o *UpdateReducerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update reducer default response has a 4xx status code -func (o *UpdateReducerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update reducer default response has a 5xx status code -func (o *UpdateReducerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update reducer default response a status code equal to that given -func (o *UpdateReducerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update reducer default response -func (o *UpdateReducerDefault) Code() int { - return o._statusCode -} - -func (o *UpdateReducerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/reducers/{id}][%d] UpdateReducer default %s", o._statusCode, payload) -} - -func (o *UpdateReducerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/analytics/reducers/{id}][%d] UpdateReducer default %s", o._statusCode, payload) -} - -func (o *UpdateReducerDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateReducerDefault) 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/analytics/upload_jar_parameters.go b/v1/client/analytics/upload_jar_parameters.go deleted file mode 100644 index bc9b514f..00000000 --- a/v1/client/analytics/upload_jar_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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" -) - -// NewUploadJarParams creates a new UploadJarParams 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 NewUploadJarParams() *UploadJarParams { - return &UploadJarParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUploadJarParamsWithTimeout creates a new UploadJarParams object -// with the ability to set a timeout on a request. -func NewUploadJarParamsWithTimeout(timeout time.Duration) *UploadJarParams { - return &UploadJarParams{ - timeout: timeout, - } -} - -// NewUploadJarParamsWithContext creates a new UploadJarParams object -// with the ability to set a context for a request. -func NewUploadJarParamsWithContext(ctx context.Context) *UploadJarParams { - return &UploadJarParams{ - Context: ctx, - } -} - -// NewUploadJarParamsWithHTTPClient creates a new UploadJarParams object -// with the ability to set a custom HTTPClient for a request. -func NewUploadJarParamsWithHTTPClient(client *http.Client) *UploadJarParams { - return &UploadJarParams{ - HTTPClient: client, - } -} - -/* -UploadJarParams contains all the parameters to send to the API endpoint - - for the upload jar operation. - - Typically these are written to a http.Request. -*/ -type UploadJarParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upload jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadJarParams) WithDefaults() *UploadJarParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upload jar params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadJarParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upload jar params -func (o *UploadJarParams) WithTimeout(timeout time.Duration) *UploadJarParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload jar params -func (o *UploadJarParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload jar params -func (o *UploadJarParams) WithContext(ctx context.Context) *UploadJarParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload jar params -func (o *UploadJarParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload jar params -func (o *UploadJarParams) WithHTTPClient(client *http.Client) *UploadJarParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload jar params -func (o *UploadJarParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadJarParams) 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/analytics/upload_jar_responses.go b/v1/client/analytics/upload_jar_responses.go deleted file mode 100644 index 0f12c27a..00000000 --- a/v1/client/analytics/upload_jar_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package analytics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UploadJarReader is a Reader for the UploadJar structure. -type UploadJarReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadJarReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUploadJarOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUploadJarDefault(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 - } -} - -// NewUploadJarOK creates a UploadJarOK with default headers values -func NewUploadJarOK() *UploadJarOK { - return &UploadJarOK{} -} - -/* -UploadJarOK describes a response with status code 200, with default header values. - -Success -*/ -type UploadJarOK struct { - Payload *models.UploadMRJarViewPathWrapper -} - -// IsSuccess returns true when this upload jar o k response has a 2xx status code -func (o *UploadJarOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upload jar o k response has a 3xx status code -func (o *UploadJarOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upload jar o k response has a 4xx status code -func (o *UploadJarOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upload jar o k response has a 5xx status code -func (o *UploadJarOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upload jar o k response a status code equal to that given -func (o *UploadJarOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upload jar o k response -func (o *UploadJarOK) Code() int { - return 200 -} - -func (o *UploadJarOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/uploadJar][%d] uploadJarOK %s", 200, payload) -} - -func (o *UploadJarOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/uploadJar][%d] uploadJarOK %s", 200, payload) -} - -func (o *UploadJarOK) GetPayload() *models.UploadMRJarViewPathWrapper { - return o.Payload -} - -func (o *UploadJarOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UploadMRJarViewPathWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadJarDefault creates a UploadJarDefault with default headers values -func NewUploadJarDefault(code int) *UploadJarDefault { - return &UploadJarDefault{ - _statusCode: code, - } -} - -/* -UploadJarDefault describes a response with status code -1, with default header values. - -Error -*/ -type UploadJarDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upload jar default response has a 2xx status code -func (o *UploadJarDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upload jar default response has a 3xx status code -func (o *UploadJarDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upload jar default response has a 4xx status code -func (o *UploadJarDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upload jar default response has a 5xx status code -func (o *UploadJarDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upload jar default response a status code equal to that given -func (o *UploadJarDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upload jar default response -func (o *UploadJarDefault) Code() int { - return o._statusCode -} - -func (o *UploadJarDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/uploadJar][%d] UploadJar default %s", o._statusCode, payload) -} - -func (o *UploadJarDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/analytics/uploadJar][%d] UploadJar default %s", o._statusCode, payload) -} - -func (o *UploadJarDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UploadJarDefault) 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/antivirus_service_group/antivirus_service_group_client.go b/v1/client/antivirus_service_group/antivirus_service_group_client.go deleted file mode 100644 index b3b62cd7..00000000 --- a/v1/client/antivirus_service_group/antivirus_service_group_client.go +++ /dev/null @@ -1,441 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new antivirus service group API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new antivirus service group API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new antivirus service group API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for antivirus service group API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AntivirusServiceGroupState(params *AntivirusServiceGroupStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AntivirusServiceGroupStateOK, error) - - CreateAntivirusServiceGroup(params *CreateAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAntivirusServiceGroupCreated, error) - - DeleteAntivirusServiceGroup(params *DeleteAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAntivirusServiceGroupNoContent, error) - - DeleteInfectedFiles(params *DeleteInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInfectedFilesOK, error) - - GetAntivirusServiceGroup(params *GetAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAntivirusServiceGroupOK, error) - - GetIcapConnectionStatus(params *GetIcapConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIcapConnectionStatusOK, error) - - GetInfectedFiles(params *GetInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInfectedFilesOK, error) - - UpdateAntivirusServiceGroup(params *UpdateAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAntivirusServiceGroupOK, error) - - UpdateInfectedFiles(params *UpdateInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInfectedFilesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AntivirusServiceGroupState changes the state of an antivirus service group - -Returns the state of an antivirus service group upon completion. -*/ -func (a *Client) AntivirusServiceGroupState(params *AntivirusServiceGroupStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AntivirusServiceGroupStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAntivirusServiceGroupStateParams() - } - op := &runtime.ClientOperation{ - ID: "AntivirusServiceGroupState", - Method: "PUT", - PathPattern: "/public/antivirusGroups/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AntivirusServiceGroupStateReader{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.(*AntivirusServiceGroupStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AntivirusServiceGroupStateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateAntivirusServiceGroup creates an antivirus service group - -Returns the created Antivirus service group. -*/ -func (a *Client) CreateAntivirusServiceGroup(params *CreateAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAntivirusServiceGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateAntivirusServiceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateAntivirusServiceGroup", - Method: "POST", - PathPattern: "/public/antivirusGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateAntivirusServiceGroupReader{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.(*CreateAntivirusServiceGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateAntivirusServiceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteAntivirusServiceGroup deletes an antivirus service group corresponding to the specified antivirus service group Id - -Returns delete status upon completion. -*/ -func (a *Client) DeleteAntivirusServiceGroup(params *DeleteAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAntivirusServiceGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteAntivirusServiceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteAntivirusServiceGroup", - Method: "DELETE", - PathPattern: "/public/antivirusGroups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteAntivirusServiceGroupReader{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.(*DeleteAntivirusServiceGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteAntivirusServiceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteInfectedFiles deletes the list of infected files - -Returns the list of delete succeeded and delete failed infected files. -*/ -func (a *Client) DeleteInfectedFiles(params *DeleteInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInfectedFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteInfectedFiles", - Method: "DELETE", - PathPattern: "/public/infectedFiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteInfectedFilesReader{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.(*DeleteInfectedFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteInfectedFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAntivirusServiceGroup lists the antivirus service groups - -Returns all the antivirus service group. -*/ -func (a *Client) GetAntivirusServiceGroup(params *GetAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAntivirusServiceGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAntivirusServiceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "GetAntivirusServiceGroup", - Method: "GET", - PathPattern: "/public/antivirusGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAntivirusServiceGroupReader{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.(*GetAntivirusServiceGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAntivirusServiceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIcapConnectionStatus checks the icap server connection status - -Returns the list of succeeded and failed connection statuses of Icap servers. -*/ -func (a *Client) GetIcapConnectionStatus(params *GetIcapConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIcapConnectionStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIcapConnectionStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetIcapConnectionStatus", - Method: "GET", - PathPattern: "/public/icapConnectionStatus", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIcapConnectionStatusReader{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.(*GetIcapConnectionStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIcapConnectionStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetInfectedFiles lists the infected files - -Returns all the infected files matching with query parameters. -*/ -func (a *Client) GetInfectedFiles(params *GetInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInfectedFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "GetInfectedFiles", - Method: "GET", - PathPattern: "/public/infectedFiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetInfectedFilesReader{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.(*GetInfectedFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetInfectedFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAntivirusServiceGroup updates an antivirus service group - -Returns the updated antivirus service group. -*/ -func (a *Client) UpdateAntivirusServiceGroup(params *UpdateAntivirusServiceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAntivirusServiceGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAntivirusServiceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAntivirusServiceGroup", - Method: "PUT", - PathPattern: "/public/antivirusGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAntivirusServiceGroupReader{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.(*UpdateAntivirusServiceGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAntivirusServiceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInfectedFiles updates the list of infected files - -Returns the list of update succeeded and update failed infected files. -*/ -func (a *Client) UpdateInfectedFiles(params *UpdateInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInfectedFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInfectedFiles", - Method: "PUT", - PathPattern: "/public/infectedFiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInfectedFilesReader{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.(*UpdateInfectedFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInfectedFilesDefault) - 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/antivirus_service_group/antivirus_service_group_state_parameters.go b/v1/client/antivirus_service_group/antivirus_service_group_state_parameters.go deleted file mode 100644 index 2e51f062..00000000 --- a/v1/client/antivirus_service_group/antivirus_service_group_state_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAntivirusServiceGroupStateParams creates a new AntivirusServiceGroupStateParams 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 NewAntivirusServiceGroupStateParams() *AntivirusServiceGroupStateParams { - return &AntivirusServiceGroupStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAntivirusServiceGroupStateParamsWithTimeout creates a new AntivirusServiceGroupStateParams object -// with the ability to set a timeout on a request. -func NewAntivirusServiceGroupStateParamsWithTimeout(timeout time.Duration) *AntivirusServiceGroupStateParams { - return &AntivirusServiceGroupStateParams{ - timeout: timeout, - } -} - -// NewAntivirusServiceGroupStateParamsWithContext creates a new AntivirusServiceGroupStateParams object -// with the ability to set a context for a request. -func NewAntivirusServiceGroupStateParamsWithContext(ctx context.Context) *AntivirusServiceGroupStateParams { - return &AntivirusServiceGroupStateParams{ - Context: ctx, - } -} - -// NewAntivirusServiceGroupStateParamsWithHTTPClient creates a new AntivirusServiceGroupStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewAntivirusServiceGroupStateParamsWithHTTPClient(client *http.Client) *AntivirusServiceGroupStateParams { - return &AntivirusServiceGroupStateParams{ - HTTPClient: client, - } -} - -/* -AntivirusServiceGroupStateParams contains all the parameters to send to the API endpoint - - for the antivirus service group state operation. - - Typically these are written to a http.Request. -*/ -type AntivirusServiceGroupStateParams struct { - - // Body. - Body *models.AntivirusServiceGroupStateParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the antivirus service group state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AntivirusServiceGroupStateParams) WithDefaults() *AntivirusServiceGroupStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the antivirus service group state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AntivirusServiceGroupStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) WithTimeout(timeout time.Duration) *AntivirusServiceGroupStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) WithContext(ctx context.Context) *AntivirusServiceGroupStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) WithHTTPClient(client *http.Client) *AntivirusServiceGroupStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) WithBody(body *models.AntivirusServiceGroupStateParams) *AntivirusServiceGroupStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the antivirus service group state params -func (o *AntivirusServiceGroupStateParams) SetBody(body *models.AntivirusServiceGroupStateParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AntivirusServiceGroupStateParams) 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/antivirus_service_group/antivirus_service_group_state_responses.go b/v1/client/antivirus_service_group/antivirus_service_group_state_responses.go deleted file mode 100644 index bf5383f9..00000000 --- a/v1/client/antivirus_service_group/antivirus_service_group_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AntivirusServiceGroupStateReader is a Reader for the AntivirusServiceGroupState structure. -type AntivirusServiceGroupStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AntivirusServiceGroupStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAntivirusServiceGroupStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAntivirusServiceGroupStateDefault(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 - } -} - -// NewAntivirusServiceGroupStateOK creates a AntivirusServiceGroupStateOK with default headers values -func NewAntivirusServiceGroupStateOK() *AntivirusServiceGroupStateOK { - return &AntivirusServiceGroupStateOK{} -} - -/* -AntivirusServiceGroupStateOK describes a response with status code 200, with default header values. - -Success -*/ -type AntivirusServiceGroupStateOK struct { - Payload *models.AntivirusServiceGroupStateParams -} - -// IsSuccess returns true when this antivirus service group state o k response has a 2xx status code -func (o *AntivirusServiceGroupStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this antivirus service group state o k response has a 3xx status code -func (o *AntivirusServiceGroupStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this antivirus service group state o k response has a 4xx status code -func (o *AntivirusServiceGroupStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this antivirus service group state o k response has a 5xx status code -func (o *AntivirusServiceGroupStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this antivirus service group state o k response a status code equal to that given -func (o *AntivirusServiceGroupStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the antivirus service group state o k response -func (o *AntivirusServiceGroupStateOK) Code() int { - return 200 -} - -func (o *AntivirusServiceGroupStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups/states][%d] antivirusServiceGroupStateOK %s", 200, payload) -} - -func (o *AntivirusServiceGroupStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups/states][%d] antivirusServiceGroupStateOK %s", 200, payload) -} - -func (o *AntivirusServiceGroupStateOK) GetPayload() *models.AntivirusServiceGroupStateParams { - return o.Payload -} - -func (o *AntivirusServiceGroupStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroupStateParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAntivirusServiceGroupStateDefault creates a AntivirusServiceGroupStateDefault with default headers values -func NewAntivirusServiceGroupStateDefault(code int) *AntivirusServiceGroupStateDefault { - return &AntivirusServiceGroupStateDefault{ - _statusCode: code, - } -} - -/* -AntivirusServiceGroupStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type AntivirusServiceGroupStateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this antivirus service group state default response has a 2xx status code -func (o *AntivirusServiceGroupStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this antivirus service group state default response has a 3xx status code -func (o *AntivirusServiceGroupStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this antivirus service group state default response has a 4xx status code -func (o *AntivirusServiceGroupStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this antivirus service group state default response has a 5xx status code -func (o *AntivirusServiceGroupStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this antivirus service group state default response a status code equal to that given -func (o *AntivirusServiceGroupStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the antivirus service group state default response -func (o *AntivirusServiceGroupStateDefault) Code() int { - return o._statusCode -} - -func (o *AntivirusServiceGroupStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups/states][%d] AntivirusServiceGroupState default %s", o._statusCode, payload) -} - -func (o *AntivirusServiceGroupStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups/states][%d] AntivirusServiceGroupState default %s", o._statusCode, payload) -} - -func (o *AntivirusServiceGroupStateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AntivirusServiceGroupStateDefault) 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/antivirus_service_group/create_antivirus_service_group_parameters.go b/v1/client/antivirus_service_group/create_antivirus_service_group_parameters.go deleted file mode 100644 index 1d60f06a..00000000 --- a/v1/client/antivirus_service_group/create_antivirus_service_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateAntivirusServiceGroupParams creates a new CreateAntivirusServiceGroupParams 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 NewCreateAntivirusServiceGroupParams() *CreateAntivirusServiceGroupParams { - return &CreateAntivirusServiceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAntivirusServiceGroupParamsWithTimeout creates a new CreateAntivirusServiceGroupParams object -// with the ability to set a timeout on a request. -func NewCreateAntivirusServiceGroupParamsWithTimeout(timeout time.Duration) *CreateAntivirusServiceGroupParams { - return &CreateAntivirusServiceGroupParams{ - timeout: timeout, - } -} - -// NewCreateAntivirusServiceGroupParamsWithContext creates a new CreateAntivirusServiceGroupParams object -// with the ability to set a context for a request. -func NewCreateAntivirusServiceGroupParamsWithContext(ctx context.Context) *CreateAntivirusServiceGroupParams { - return &CreateAntivirusServiceGroupParams{ - Context: ctx, - } -} - -// NewCreateAntivirusServiceGroupParamsWithHTTPClient creates a new CreateAntivirusServiceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAntivirusServiceGroupParamsWithHTTPClient(client *http.Client) *CreateAntivirusServiceGroupParams { - return &CreateAntivirusServiceGroupParams{ - HTTPClient: client, - } -} - -/* -CreateAntivirusServiceGroupParams contains all the parameters to send to the API endpoint - - for the create antivirus service group operation. - - Typically these are written to a http.Request. -*/ -type CreateAntivirusServiceGroupParams struct { - - /* Body. - - Request to create an Antivirus Service Group. - */ - Body *models.AntivirusServiceGroupParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAntivirusServiceGroupParams) WithDefaults() *CreateAntivirusServiceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAntivirusServiceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) WithTimeout(timeout time.Duration) *CreateAntivirusServiceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) WithContext(ctx context.Context) *CreateAntivirusServiceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) WithHTTPClient(client *http.Client) *CreateAntivirusServiceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) WithBody(body *models.AntivirusServiceGroupParams) *CreateAntivirusServiceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create antivirus service group params -func (o *CreateAntivirusServiceGroupParams) SetBody(body *models.AntivirusServiceGroupParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAntivirusServiceGroupParams) 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/antivirus_service_group/create_antivirus_service_group_responses.go b/v1/client/antivirus_service_group/create_antivirus_service_group_responses.go deleted file mode 100644 index 567c6e33..00000000 --- a/v1/client/antivirus_service_group/create_antivirus_service_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateAntivirusServiceGroupReader is a Reader for the CreateAntivirusServiceGroup structure. -type CreateAntivirusServiceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAntivirusServiceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAntivirusServiceGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateAntivirusServiceGroupDefault(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 - } -} - -// NewCreateAntivirusServiceGroupCreated creates a CreateAntivirusServiceGroupCreated with default headers values -func NewCreateAntivirusServiceGroupCreated() *CreateAntivirusServiceGroupCreated { - return &CreateAntivirusServiceGroupCreated{} -} - -/* -CreateAntivirusServiceGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateAntivirusServiceGroupCreated struct { - Payload *models.AntivirusServiceGroup -} - -// IsSuccess returns true when this create antivirus service group created response has a 2xx status code -func (o *CreateAntivirusServiceGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create antivirus service group created response has a 3xx status code -func (o *CreateAntivirusServiceGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create antivirus service group created response has a 4xx status code -func (o *CreateAntivirusServiceGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create antivirus service group created response has a 5xx status code -func (o *CreateAntivirusServiceGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create antivirus service group created response a status code equal to that given -func (o *CreateAntivirusServiceGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create antivirus service group created response -func (o *CreateAntivirusServiceGroupCreated) Code() int { - return 201 -} - -func (o *CreateAntivirusServiceGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/antivirusGroups][%d] createAntivirusServiceGroupCreated %s", 201, payload) -} - -func (o *CreateAntivirusServiceGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/antivirusGroups][%d] createAntivirusServiceGroupCreated %s", 201, payload) -} - -func (o *CreateAntivirusServiceGroupCreated) GetPayload() *models.AntivirusServiceGroup { - return o.Payload -} - -func (o *CreateAntivirusServiceGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAntivirusServiceGroupDefault creates a CreateAntivirusServiceGroupDefault with default headers values -func NewCreateAntivirusServiceGroupDefault(code int) *CreateAntivirusServiceGroupDefault { - return &CreateAntivirusServiceGroupDefault{ - _statusCode: code, - } -} - -/* -CreateAntivirusServiceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateAntivirusServiceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create antivirus service group default response has a 2xx status code -func (o *CreateAntivirusServiceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create antivirus service group default response has a 3xx status code -func (o *CreateAntivirusServiceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create antivirus service group default response has a 4xx status code -func (o *CreateAntivirusServiceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create antivirus service group default response has a 5xx status code -func (o *CreateAntivirusServiceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create antivirus service group default response a status code equal to that given -func (o *CreateAntivirusServiceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create antivirus service group default response -func (o *CreateAntivirusServiceGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateAntivirusServiceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/antivirusGroups][%d] CreateAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *CreateAntivirusServiceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/antivirusGroups][%d] CreateAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *CreateAntivirusServiceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateAntivirusServiceGroupDefault) 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/antivirus_service_group/delete_antivirus_service_group_parameters.go b/v1/client/antivirus_service_group/delete_antivirus_service_group_parameters.go deleted file mode 100644 index ab337232..00000000 --- a/v1/client/antivirus_service_group/delete_antivirus_service_group_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/go-openapi/swag" -) - -// NewDeleteAntivirusServiceGroupParams creates a new DeleteAntivirusServiceGroupParams 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 NewDeleteAntivirusServiceGroupParams() *DeleteAntivirusServiceGroupParams { - return &DeleteAntivirusServiceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAntivirusServiceGroupParamsWithTimeout creates a new DeleteAntivirusServiceGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteAntivirusServiceGroupParamsWithTimeout(timeout time.Duration) *DeleteAntivirusServiceGroupParams { - return &DeleteAntivirusServiceGroupParams{ - timeout: timeout, - } -} - -// NewDeleteAntivirusServiceGroupParamsWithContext creates a new DeleteAntivirusServiceGroupParams object -// with the ability to set a context for a request. -func NewDeleteAntivirusServiceGroupParamsWithContext(ctx context.Context) *DeleteAntivirusServiceGroupParams { - return &DeleteAntivirusServiceGroupParams{ - Context: ctx, - } -} - -// NewDeleteAntivirusServiceGroupParamsWithHTTPClient creates a new DeleteAntivirusServiceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAntivirusServiceGroupParamsWithHTTPClient(client *http.Client) *DeleteAntivirusServiceGroupParams { - return &DeleteAntivirusServiceGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteAntivirusServiceGroupParams contains all the parameters to send to the API endpoint - - for the delete antivirus service group operation. - - Typically these are written to a http.Request. -*/ -type DeleteAntivirusServiceGroupParams struct { - - /* ID. - - Specifies the AntivirusServiceGroup Id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAntivirusServiceGroupParams) WithDefaults() *DeleteAntivirusServiceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAntivirusServiceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) WithTimeout(timeout time.Duration) *DeleteAntivirusServiceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) WithContext(ctx context.Context) *DeleteAntivirusServiceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) WithHTTPClient(client *http.Client) *DeleteAntivirusServiceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) WithID(id int64) *DeleteAntivirusServiceGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete antivirus service group params -func (o *DeleteAntivirusServiceGroupParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAntivirusServiceGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/antivirus_service_group/delete_antivirus_service_group_responses.go b/v1/client/antivirus_service_group/delete_antivirus_service_group_responses.go deleted file mode 100644 index 4d5733a8..00000000 --- a/v1/client/antivirus_service_group/delete_antivirus_service_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteAntivirusServiceGroupReader is a Reader for the DeleteAntivirusServiceGroup structure. -type DeleteAntivirusServiceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAntivirusServiceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteAntivirusServiceGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteAntivirusServiceGroupDefault(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 - } -} - -// NewDeleteAntivirusServiceGroupNoContent creates a DeleteAntivirusServiceGroupNoContent with default headers values -func NewDeleteAntivirusServiceGroupNoContent() *DeleteAntivirusServiceGroupNoContent { - return &DeleteAntivirusServiceGroupNoContent{} -} - -/* -DeleteAntivirusServiceGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteAntivirusServiceGroupNoContent struct { -} - -// IsSuccess returns true when this delete antivirus service group no content response has a 2xx status code -func (o *DeleteAntivirusServiceGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete antivirus service group no content response has a 3xx status code -func (o *DeleteAntivirusServiceGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete antivirus service group no content response has a 4xx status code -func (o *DeleteAntivirusServiceGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete antivirus service group no content response has a 5xx status code -func (o *DeleteAntivirusServiceGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete antivirus service group no content response a status code equal to that given -func (o *DeleteAntivirusServiceGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete antivirus service group no content response -func (o *DeleteAntivirusServiceGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteAntivirusServiceGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/antivirusGroups/{id}][%d] deleteAntivirusServiceGroupNoContent", 204) -} - -func (o *DeleteAntivirusServiceGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /public/antivirusGroups/{id}][%d] deleteAntivirusServiceGroupNoContent", 204) -} - -func (o *DeleteAntivirusServiceGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteAntivirusServiceGroupDefault creates a DeleteAntivirusServiceGroupDefault with default headers values -func NewDeleteAntivirusServiceGroupDefault(code int) *DeleteAntivirusServiceGroupDefault { - return &DeleteAntivirusServiceGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteAntivirusServiceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteAntivirusServiceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete antivirus service group default response has a 2xx status code -func (o *DeleteAntivirusServiceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete antivirus service group default response has a 3xx status code -func (o *DeleteAntivirusServiceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete antivirus service group default response has a 4xx status code -func (o *DeleteAntivirusServiceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete antivirus service group default response has a 5xx status code -func (o *DeleteAntivirusServiceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete antivirus service group default response a status code equal to that given -func (o *DeleteAntivirusServiceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete antivirus service group default response -func (o *DeleteAntivirusServiceGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteAntivirusServiceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/antivirusGroups/{id}][%d] DeleteAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteAntivirusServiceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/antivirusGroups/{id}][%d] DeleteAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteAntivirusServiceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteAntivirusServiceGroupDefault) 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/antivirus_service_group/delete_infected_files_parameters.go b/v1/client/antivirus_service_group/delete_infected_files_parameters.go deleted file mode 100644 index 855f1a21..00000000 --- a/v1/client/antivirus_service_group/delete_infected_files_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteInfectedFilesParams creates a new DeleteInfectedFilesParams 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 NewDeleteInfectedFilesParams() *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInfectedFilesParamsWithTimeout creates a new DeleteInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewDeleteInfectedFilesParamsWithTimeout(timeout time.Duration) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - timeout: timeout, - } -} - -// NewDeleteInfectedFilesParamsWithContext creates a new DeleteInfectedFilesParams object -// with the ability to set a context for a request. -func NewDeleteInfectedFilesParamsWithContext(ctx context.Context) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - Context: ctx, - } -} - -// NewDeleteInfectedFilesParamsWithHTTPClient creates a new DeleteInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInfectedFilesParamsWithHTTPClient(client *http.Client) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -DeleteInfectedFilesParams contains all the parameters to send to the API endpoint - - for the delete infected files operation. - - Typically these are written to a http.Request. -*/ -type DeleteInfectedFilesParams struct { - - /* Body. - - Request to delete the list of infected files. - */ - Body *models.DeleteInfectedFileParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInfectedFilesParams) WithDefaults() *DeleteInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete infected files params -func (o *DeleteInfectedFilesParams) WithTimeout(timeout time.Duration) *DeleteInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete infected files params -func (o *DeleteInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete infected files params -func (o *DeleteInfectedFilesParams) WithContext(ctx context.Context) *DeleteInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete infected files params -func (o *DeleteInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete infected files params -func (o *DeleteInfectedFilesParams) WithHTTPClient(client *http.Client) *DeleteInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete infected files params -func (o *DeleteInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete infected files params -func (o *DeleteInfectedFilesParams) WithBody(body *models.DeleteInfectedFileParams) *DeleteInfectedFilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete infected files params -func (o *DeleteInfectedFilesParams) SetBody(body *models.DeleteInfectedFileParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInfectedFilesParams) 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/antivirus_service_group/delete_infected_files_responses.go b/v1/client/antivirus_service_group/delete_infected_files_responses.go deleted file mode 100644 index 627026e3..00000000 --- a/v1/client/antivirus_service_group/delete_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteInfectedFilesReader is a Reader for the DeleteInfectedFiles structure. -type DeleteInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteInfectedFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteInfectedFilesDefault(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 - } -} - -// NewDeleteInfectedFilesOK creates a DeleteInfectedFilesOK with default headers values -func NewDeleteInfectedFilesOK() *DeleteInfectedFilesOK { - return &DeleteInfectedFilesOK{} -} - -/* -DeleteInfectedFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteInfectedFilesOK struct { - Payload *models.DeleteInfectedFileResponse -} - -// IsSuccess returns true when this delete infected files o k response has a 2xx status code -func (o *DeleteInfectedFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete infected files o k response has a 3xx status code -func (o *DeleteInfectedFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete infected files o k response has a 4xx status code -func (o *DeleteInfectedFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete infected files o k response has a 5xx status code -func (o *DeleteInfectedFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete infected files o k response a status code equal to that given -func (o *DeleteInfectedFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete infected files o k response -func (o *DeleteInfectedFilesOK) Code() int { - return 200 -} - -func (o *DeleteInfectedFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/infectedFiles][%d] deleteInfectedFilesOK %s", 200, payload) -} - -func (o *DeleteInfectedFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/infectedFiles][%d] deleteInfectedFilesOK %s", 200, payload) -} - -func (o *DeleteInfectedFilesOK) GetPayload() *models.DeleteInfectedFileResponse { - return o.Payload -} - -func (o *DeleteInfectedFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DeleteInfectedFileResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInfectedFilesDefault creates a DeleteInfectedFilesDefault with default headers values -func NewDeleteInfectedFilesDefault(code int) *DeleteInfectedFilesDefault { - return &DeleteInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -DeleteInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteInfectedFilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete infected files default response has a 2xx status code -func (o *DeleteInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete infected files default response has a 3xx status code -func (o *DeleteInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete infected files default response has a 4xx status code -func (o *DeleteInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete infected files default response has a 5xx status code -func (o *DeleteInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete infected files default response a status code equal to that given -func (o *DeleteInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete infected files default response -func (o *DeleteInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *DeleteInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/infectedFiles][%d] DeleteInfectedFiles default %s", o._statusCode, payload) -} - -func (o *DeleteInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/infectedFiles][%d] DeleteInfectedFiles default %s", o._statusCode, payload) -} - -func (o *DeleteInfectedFilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteInfectedFilesDefault) 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/antivirus_service_group/get_antivirus_service_group_parameters.go b/v1/client/antivirus_service_group/get_antivirus_service_group_parameters.go deleted file mode 100644 index b3ba9acc..00000000 --- a/v1/client/antivirus_service_group/get_antivirus_service_group_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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" -) - -// NewGetAntivirusServiceGroupParams creates a new GetAntivirusServiceGroupParams 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 NewGetAntivirusServiceGroupParams() *GetAntivirusServiceGroupParams { - return &GetAntivirusServiceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAntivirusServiceGroupParamsWithTimeout creates a new GetAntivirusServiceGroupParams object -// with the ability to set a timeout on a request. -func NewGetAntivirusServiceGroupParamsWithTimeout(timeout time.Duration) *GetAntivirusServiceGroupParams { - return &GetAntivirusServiceGroupParams{ - timeout: timeout, - } -} - -// NewGetAntivirusServiceGroupParamsWithContext creates a new GetAntivirusServiceGroupParams object -// with the ability to set a context for a request. -func NewGetAntivirusServiceGroupParamsWithContext(ctx context.Context) *GetAntivirusServiceGroupParams { - return &GetAntivirusServiceGroupParams{ - Context: ctx, - } -} - -// NewGetAntivirusServiceGroupParamsWithHTTPClient creates a new GetAntivirusServiceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAntivirusServiceGroupParamsWithHTTPClient(client *http.Client) *GetAntivirusServiceGroupParams { - return &GetAntivirusServiceGroupParams{ - HTTPClient: client, - } -} - -/* -GetAntivirusServiceGroupParams contains all the parameters to send to the API endpoint - - for the get antivirus service group operation. - - Typically these are written to a http.Request. -*/ -type GetAntivirusServiceGroupParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAntivirusServiceGroupParams) WithDefaults() *GetAntivirusServiceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAntivirusServiceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) WithTimeout(timeout time.Duration) *GetAntivirusServiceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) WithContext(ctx context.Context) *GetAntivirusServiceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) WithHTTPClient(client *http.Client) *GetAntivirusServiceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get antivirus service group params -func (o *GetAntivirusServiceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAntivirusServiceGroupParams) 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/antivirus_service_group/get_antivirus_service_group_responses.go b/v1/client/antivirus_service_group/get_antivirus_service_group_responses.go deleted file mode 100644 index 88f4acf5..00000000 --- a/v1/client/antivirus_service_group/get_antivirus_service_group_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAntivirusServiceGroupReader is a Reader for the GetAntivirusServiceGroup structure. -type GetAntivirusServiceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAntivirusServiceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAntivirusServiceGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAntivirusServiceGroupDefault(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 - } -} - -// NewGetAntivirusServiceGroupOK creates a GetAntivirusServiceGroupOK with default headers values -func NewGetAntivirusServiceGroupOK() *GetAntivirusServiceGroupOK { - return &GetAntivirusServiceGroupOK{} -} - -/* -GetAntivirusServiceGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAntivirusServiceGroupOK struct { - Payload []*models.AntivirusServiceGroup -} - -// IsSuccess returns true when this get antivirus service group o k response has a 2xx status code -func (o *GetAntivirusServiceGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get antivirus service group o k response has a 3xx status code -func (o *GetAntivirusServiceGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get antivirus service group o k response has a 4xx status code -func (o *GetAntivirusServiceGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get antivirus service group o k response has a 5xx status code -func (o *GetAntivirusServiceGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get antivirus service group o k response a status code equal to that given -func (o *GetAntivirusServiceGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get antivirus service group o k response -func (o *GetAntivirusServiceGroupOK) Code() int { - return 200 -} - -func (o *GetAntivirusServiceGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/antivirusGroups][%d] getAntivirusServiceGroupOK %s", 200, payload) -} - -func (o *GetAntivirusServiceGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/antivirusGroups][%d] getAntivirusServiceGroupOK %s", 200, payload) -} - -func (o *GetAntivirusServiceGroupOK) GetPayload() []*models.AntivirusServiceGroup { - return o.Payload -} - -func (o *GetAntivirusServiceGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAntivirusServiceGroupDefault creates a GetAntivirusServiceGroupDefault with default headers values -func NewGetAntivirusServiceGroupDefault(code int) *GetAntivirusServiceGroupDefault { - return &GetAntivirusServiceGroupDefault{ - _statusCode: code, - } -} - -/* -GetAntivirusServiceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAntivirusServiceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get antivirus service group default response has a 2xx status code -func (o *GetAntivirusServiceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get antivirus service group default response has a 3xx status code -func (o *GetAntivirusServiceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get antivirus service group default response has a 4xx status code -func (o *GetAntivirusServiceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get antivirus service group default response has a 5xx status code -func (o *GetAntivirusServiceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get antivirus service group default response a status code equal to that given -func (o *GetAntivirusServiceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get antivirus service group default response -func (o *GetAntivirusServiceGroupDefault) Code() int { - return o._statusCode -} - -func (o *GetAntivirusServiceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/antivirusGroups][%d] GetAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *GetAntivirusServiceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/antivirusGroups][%d] GetAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *GetAntivirusServiceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAntivirusServiceGroupDefault) 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/antivirus_service_group/get_icap_connection_status_parameters.go b/v1/client/antivirus_service_group/get_icap_connection_status_parameters.go deleted file mode 100644 index 94d732b9..00000000 --- a/v1/client/antivirus_service_group/get_icap_connection_status_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/go-openapi/swag" -) - -// NewGetIcapConnectionStatusParams creates a new GetIcapConnectionStatusParams 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 NewGetIcapConnectionStatusParams() *GetIcapConnectionStatusParams { - return &GetIcapConnectionStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIcapConnectionStatusParamsWithTimeout creates a new GetIcapConnectionStatusParams object -// with the ability to set a timeout on a request. -func NewGetIcapConnectionStatusParamsWithTimeout(timeout time.Duration) *GetIcapConnectionStatusParams { - return &GetIcapConnectionStatusParams{ - timeout: timeout, - } -} - -// NewGetIcapConnectionStatusParamsWithContext creates a new GetIcapConnectionStatusParams object -// with the ability to set a context for a request. -func NewGetIcapConnectionStatusParamsWithContext(ctx context.Context) *GetIcapConnectionStatusParams { - return &GetIcapConnectionStatusParams{ - Context: ctx, - } -} - -// NewGetIcapConnectionStatusParamsWithHTTPClient creates a new GetIcapConnectionStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIcapConnectionStatusParamsWithHTTPClient(client *http.Client) *GetIcapConnectionStatusParams { - return &GetIcapConnectionStatusParams{ - HTTPClient: client, - } -} - -/* -GetIcapConnectionStatusParams contains all the parameters to send to the API endpoint - - for the get icap connection status operation. - - Typically these are written to a http.Request. -*/ -type GetIcapConnectionStatusParams struct { - - /* IcapUris. - - Specifies the list of icap uri. - */ - IcapUris []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get icap connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIcapConnectionStatusParams) WithDefaults() *GetIcapConnectionStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get icap connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIcapConnectionStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get icap connection status params -func (o *GetIcapConnectionStatusParams) WithTimeout(timeout time.Duration) *GetIcapConnectionStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get icap connection status params -func (o *GetIcapConnectionStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get icap connection status params -func (o *GetIcapConnectionStatusParams) WithContext(ctx context.Context) *GetIcapConnectionStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get icap connection status params -func (o *GetIcapConnectionStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get icap connection status params -func (o *GetIcapConnectionStatusParams) WithHTTPClient(client *http.Client) *GetIcapConnectionStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get icap connection status params -func (o *GetIcapConnectionStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIcapUris adds the icapUris to the get icap connection status params -func (o *GetIcapConnectionStatusParams) WithIcapUris(icapUris []string) *GetIcapConnectionStatusParams { - o.SetIcapUris(icapUris) - return o -} - -// SetIcapUris adds the icapUris to the get icap connection status params -func (o *GetIcapConnectionStatusParams) SetIcapUris(icapUris []string) { - o.IcapUris = icapUris -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIcapConnectionStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IcapUris != nil { - - // binding items for icapUris - joinedIcapUris := o.bindParamIcapUris(reg) - - // query array param icapUris - if err := r.SetQueryParam("icapUris", joinedIcapUris...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIcapConnectionStatus binds the parameter icapUris -func (o *GetIcapConnectionStatusParams) bindParamIcapUris(formats strfmt.Registry) []string { - icapUrisIR := o.IcapUris - - var icapUrisIC []string - for _, icapUrisIIR := range icapUrisIR { // explode []string - - icapUrisIIV := icapUrisIIR // string as string - icapUrisIC = append(icapUrisIC, icapUrisIIV) - } - - // items.CollectionFormat: "" - icapUrisIS := swag.JoinByFormat(icapUrisIC, "") - - return icapUrisIS -} diff --git a/v1/client/antivirus_service_group/get_icap_connection_status_responses.go b/v1/client/antivirus_service_group/get_icap_connection_status_responses.go deleted file mode 100644 index 4a5f607b..00000000 --- a/v1/client/antivirus_service_group/get_icap_connection_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetIcapConnectionStatusReader is a Reader for the GetIcapConnectionStatus structure. -type GetIcapConnectionStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIcapConnectionStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIcapConnectionStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIcapConnectionStatusDefault(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 - } -} - -// NewGetIcapConnectionStatusOK creates a GetIcapConnectionStatusOK with default headers values -func NewGetIcapConnectionStatusOK() *GetIcapConnectionStatusOK { - return &GetIcapConnectionStatusOK{} -} - -/* -GetIcapConnectionStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIcapConnectionStatusOK struct { - Payload *models.IcapConnectionStatusResponse -} - -// IsSuccess returns true when this get icap connection status o k response has a 2xx status code -func (o *GetIcapConnectionStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get icap connection status o k response has a 3xx status code -func (o *GetIcapConnectionStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get icap connection status o k response has a 4xx status code -func (o *GetIcapConnectionStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get icap connection status o k response has a 5xx status code -func (o *GetIcapConnectionStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get icap connection status o k response a status code equal to that given -func (o *GetIcapConnectionStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get icap connection status o k response -func (o *GetIcapConnectionStatusOK) Code() int { - return 200 -} - -func (o *GetIcapConnectionStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/icapConnectionStatus][%d] getIcapConnectionStatusOK %s", 200, payload) -} - -func (o *GetIcapConnectionStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/icapConnectionStatus][%d] getIcapConnectionStatusOK %s", 200, payload) -} - -func (o *GetIcapConnectionStatusOK) GetPayload() *models.IcapConnectionStatusResponse { - return o.Payload -} - -func (o *GetIcapConnectionStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IcapConnectionStatusResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIcapConnectionStatusDefault creates a GetIcapConnectionStatusDefault with default headers values -func NewGetIcapConnectionStatusDefault(code int) *GetIcapConnectionStatusDefault { - return &GetIcapConnectionStatusDefault{ - _statusCode: code, - } -} - -/* -GetIcapConnectionStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIcapConnectionStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get icap connection status default response has a 2xx status code -func (o *GetIcapConnectionStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get icap connection status default response has a 3xx status code -func (o *GetIcapConnectionStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get icap connection status default response has a 4xx status code -func (o *GetIcapConnectionStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get icap connection status default response has a 5xx status code -func (o *GetIcapConnectionStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get icap connection status default response a status code equal to that given -func (o *GetIcapConnectionStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get icap connection status default response -func (o *GetIcapConnectionStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetIcapConnectionStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/icapConnectionStatus][%d] GetIcapConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetIcapConnectionStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/icapConnectionStatus][%d] GetIcapConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetIcapConnectionStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetIcapConnectionStatusDefault) 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/antivirus_service_group/get_infected_files_parameters.go b/v1/client/antivirus_service_group/get_infected_files_parameters.go deleted file mode 100644 index 3c403c2d..00000000 --- a/v1/client/antivirus_service_group/get_infected_files_parameters.go +++ /dev/null @@ -1,352 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/go-openapi/swag" -) - -// NewGetInfectedFilesParams creates a new GetInfectedFilesParams 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 NewGetInfectedFilesParams() *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInfectedFilesParamsWithTimeout creates a new GetInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewGetInfectedFilesParamsWithTimeout(timeout time.Duration) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - timeout: timeout, - } -} - -// NewGetInfectedFilesParamsWithContext creates a new GetInfectedFilesParams object -// with the ability to set a context for a request. -func NewGetInfectedFilesParamsWithContext(ctx context.Context) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - Context: ctx, - } -} - -// NewGetInfectedFilesParamsWithHTTPClient creates a new GetInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInfectedFilesParamsWithHTTPClient(client *http.Client) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -GetInfectedFilesParams contains all the parameters to send to the API endpoint - - for the get infected files operation. - - Typically these are written to a http.Request. -*/ -type GetInfectedFilesParams struct { - - /* FilePath. - - Specifies the path of a file. If this is provided, infected file list - would contain the scan and infection state of the file and pagination - cookie will be ignored. - */ - FilePath *string - - /* IncludeQuarantinedFiles. - - Specifies whether to include quarantined files in the result. - */ - IncludeQuarantinedFiles *bool - - /* IncludeUnquarantinedFiles. - - Specifies whether to include unquarantined files in the result. - */ - IncludeUnquarantinedFiles *bool - - /* PageCount. - - Specifies the number of items to return in the response for pagination - purposes. Default value is 1000. - - Format: int64 - */ - PageCount *int64 - - /* PaginationCookie. - - Pagination cookie should be used from previous call to list infected - files. It resumes (or gives the next set of values) from the result of the - previous call. - */ - PaginationCookie *string - - /* ViewNames. - - Filter by a list of View names. - */ - ViewNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInfectedFilesParams) WithDefaults() *GetInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get infected files params -func (o *GetInfectedFilesParams) WithTimeout(timeout time.Duration) *GetInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get infected files params -func (o *GetInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get infected files params -func (o *GetInfectedFilesParams) WithContext(ctx context.Context) *GetInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get infected files params -func (o *GetInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get infected files params -func (o *GetInfectedFilesParams) WithHTTPClient(client *http.Client) *GetInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get infected files params -func (o *GetInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilePath adds the filePath to the get infected files params -func (o *GetInfectedFilesParams) WithFilePath(filePath *string) *GetInfectedFilesParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the get infected files params -func (o *GetInfectedFilesParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithIncludeQuarantinedFiles adds the includeQuarantinedFiles to the get infected files params -func (o *GetInfectedFilesParams) WithIncludeQuarantinedFiles(includeQuarantinedFiles *bool) *GetInfectedFilesParams { - o.SetIncludeQuarantinedFiles(includeQuarantinedFiles) - return o -} - -// SetIncludeQuarantinedFiles adds the includeQuarantinedFiles to the get infected files params -func (o *GetInfectedFilesParams) SetIncludeQuarantinedFiles(includeQuarantinedFiles *bool) { - o.IncludeQuarantinedFiles = includeQuarantinedFiles -} - -// WithIncludeUnquarantinedFiles adds the includeUnquarantinedFiles to the get infected files params -func (o *GetInfectedFilesParams) WithIncludeUnquarantinedFiles(includeUnquarantinedFiles *bool) *GetInfectedFilesParams { - o.SetIncludeUnquarantinedFiles(includeUnquarantinedFiles) - return o -} - -// SetIncludeUnquarantinedFiles adds the includeUnquarantinedFiles to the get infected files params -func (o *GetInfectedFilesParams) SetIncludeUnquarantinedFiles(includeUnquarantinedFiles *bool) { - o.IncludeUnquarantinedFiles = includeUnquarantinedFiles -} - -// WithPageCount adds the pageCount to the get infected files params -func (o *GetInfectedFilesParams) WithPageCount(pageCount *int64) *GetInfectedFilesParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get infected files params -func (o *GetInfectedFilesParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithPaginationCookie adds the paginationCookie to the get infected files params -func (o *GetInfectedFilesParams) WithPaginationCookie(paginationCookie *string) *GetInfectedFilesParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get infected files params -func (o *GetInfectedFilesParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithViewNames adds the viewNames to the get infected files params -func (o *GetInfectedFilesParams) WithViewNames(viewNames []string) *GetInfectedFilesParams { - o.SetViewNames(viewNames) - return o -} - -// SetViewNames adds the viewNames to the get infected files params -func (o *GetInfectedFilesParams) SetViewNames(viewNames []string) { - o.ViewNames = viewNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInfectedFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.IncludeQuarantinedFiles != nil { - - // query param includeQuarantinedFiles - var qrIncludeQuarantinedFiles bool - - if o.IncludeQuarantinedFiles != nil { - qrIncludeQuarantinedFiles = *o.IncludeQuarantinedFiles - } - qIncludeQuarantinedFiles := swag.FormatBool(qrIncludeQuarantinedFiles) - if qIncludeQuarantinedFiles != "" { - - if err := r.SetQueryParam("includeQuarantinedFiles", qIncludeQuarantinedFiles); err != nil { - return err - } - } - } - - if o.IncludeUnquarantinedFiles != nil { - - // query param includeUnquarantinedFiles - var qrIncludeUnquarantinedFiles bool - - if o.IncludeUnquarantinedFiles != nil { - qrIncludeUnquarantinedFiles = *o.IncludeUnquarantinedFiles - } - qIncludeUnquarantinedFiles := swag.FormatBool(qrIncludeUnquarantinedFiles) - if qIncludeUnquarantinedFiles != "" { - - if err := r.SetQueryParam("includeUnquarantinedFiles", qIncludeUnquarantinedFiles); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - 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.ViewNames != nil { - - // binding items for viewNames - joinedViewNames := o.bindParamViewNames(reg) - - // query array param viewNames - if err := r.SetQueryParam("viewNames", joinedViewNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetInfectedFiles binds the parameter viewNames -func (o *GetInfectedFilesParams) bindParamViewNames(formats strfmt.Registry) []string { - viewNamesIR := o.ViewNames - - var viewNamesIC []string - for _, viewNamesIIR := range viewNamesIR { // explode []string - - viewNamesIIV := viewNamesIIR // string as string - viewNamesIC = append(viewNamesIC, viewNamesIIV) - } - - // items.CollectionFormat: "" - viewNamesIS := swag.JoinByFormat(viewNamesIC, "") - - return viewNamesIS -} diff --git a/v1/client/antivirus_service_group/get_infected_files_responses.go b/v1/client/antivirus_service_group/get_infected_files_responses.go deleted file mode 100644 index 8db46f7e..00000000 --- a/v1/client/antivirus_service_group/get_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetInfectedFilesReader is a Reader for the GetInfectedFiles structure. -type GetInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInfectedFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetInfectedFilesDefault(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 - } -} - -// NewGetInfectedFilesOK creates a GetInfectedFilesOK with default headers values -func NewGetInfectedFilesOK() *GetInfectedFilesOK { - return &GetInfectedFilesOK{} -} - -/* -GetInfectedFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetInfectedFilesOK struct { - Payload *models.InfectedFiles -} - -// IsSuccess returns true when this get infected files o k response has a 2xx status code -func (o *GetInfectedFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get infected files o k response has a 3xx status code -func (o *GetInfectedFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get infected files o k response has a 4xx status code -func (o *GetInfectedFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get infected files o k response has a 5xx status code -func (o *GetInfectedFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get infected files o k response a status code equal to that given -func (o *GetInfectedFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get infected files o k response -func (o *GetInfectedFilesOK) Code() int { - return 200 -} - -func (o *GetInfectedFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/infectedFiles][%d] getInfectedFilesOK %s", 200, payload) -} - -func (o *GetInfectedFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/infectedFiles][%d] getInfectedFilesOK %s", 200, payload) -} - -func (o *GetInfectedFilesOK) GetPayload() *models.InfectedFiles { - return o.Payload -} - -func (o *GetInfectedFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfectedFiles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInfectedFilesDefault creates a GetInfectedFilesDefault with default headers values -func NewGetInfectedFilesDefault(code int) *GetInfectedFilesDefault { - return &GetInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -GetInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetInfectedFilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get infected files default response has a 2xx status code -func (o *GetInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get infected files default response has a 3xx status code -func (o *GetInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get infected files default response has a 4xx status code -func (o *GetInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get infected files default response has a 5xx status code -func (o *GetInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get infected files default response a status code equal to that given -func (o *GetInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get infected files default response -func (o *GetInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *GetInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/infectedFiles][%d] GetInfectedFiles default %s", o._statusCode, payload) -} - -func (o *GetInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/infectedFiles][%d] GetInfectedFiles default %s", o._statusCode, payload) -} - -func (o *GetInfectedFilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetInfectedFilesDefault) 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/antivirus_service_group/update_antivirus_service_group_parameters.go b/v1/client/antivirus_service_group/update_antivirus_service_group_parameters.go deleted file mode 100644 index c386a3a6..00000000 --- a/v1/client/antivirus_service_group/update_antivirus_service_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateAntivirusServiceGroupParams creates a new UpdateAntivirusServiceGroupParams 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 NewUpdateAntivirusServiceGroupParams() *UpdateAntivirusServiceGroupParams { - return &UpdateAntivirusServiceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAntivirusServiceGroupParamsWithTimeout creates a new UpdateAntivirusServiceGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateAntivirusServiceGroupParamsWithTimeout(timeout time.Duration) *UpdateAntivirusServiceGroupParams { - return &UpdateAntivirusServiceGroupParams{ - timeout: timeout, - } -} - -// NewUpdateAntivirusServiceGroupParamsWithContext creates a new UpdateAntivirusServiceGroupParams object -// with the ability to set a context for a request. -func NewUpdateAntivirusServiceGroupParamsWithContext(ctx context.Context) *UpdateAntivirusServiceGroupParams { - return &UpdateAntivirusServiceGroupParams{ - Context: ctx, - } -} - -// NewUpdateAntivirusServiceGroupParamsWithHTTPClient creates a new UpdateAntivirusServiceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAntivirusServiceGroupParamsWithHTTPClient(client *http.Client) *UpdateAntivirusServiceGroupParams { - return &UpdateAntivirusServiceGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateAntivirusServiceGroupParams contains all the parameters to send to the API endpoint - - for the update antivirus service group operation. - - Typically these are written to a http.Request. -*/ -type UpdateAntivirusServiceGroupParams struct { - - /* Body. - - Request to update an Antivirus Service Group. - */ - Body *models.UpdateAntivirusServiceGroupParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAntivirusServiceGroupParams) WithDefaults() *UpdateAntivirusServiceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update antivirus service group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAntivirusServiceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) WithTimeout(timeout time.Duration) *UpdateAntivirusServiceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) WithContext(ctx context.Context) *UpdateAntivirusServiceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) WithHTTPClient(client *http.Client) *UpdateAntivirusServiceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) WithBody(body *models.UpdateAntivirusServiceGroupParams) *UpdateAntivirusServiceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update antivirus service group params -func (o *UpdateAntivirusServiceGroupParams) SetBody(body *models.UpdateAntivirusServiceGroupParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAntivirusServiceGroupParams) 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/antivirus_service_group/update_antivirus_service_group_responses.go b/v1/client/antivirus_service_group/update_antivirus_service_group_responses.go deleted file mode 100644 index 88a84db7..00000000 --- a/v1/client/antivirus_service_group/update_antivirus_service_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateAntivirusServiceGroupReader is a Reader for the UpdateAntivirusServiceGroup structure. -type UpdateAntivirusServiceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAntivirusServiceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAntivirusServiceGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAntivirusServiceGroupDefault(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 - } -} - -// NewUpdateAntivirusServiceGroupOK creates a UpdateAntivirusServiceGroupOK with default headers values -func NewUpdateAntivirusServiceGroupOK() *UpdateAntivirusServiceGroupOK { - return &UpdateAntivirusServiceGroupOK{} -} - -/* -UpdateAntivirusServiceGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateAntivirusServiceGroupOK struct { - Payload *models.AntivirusServiceGroup -} - -// IsSuccess returns true when this update antivirus service group o k response has a 2xx status code -func (o *UpdateAntivirusServiceGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update antivirus service group o k response has a 3xx status code -func (o *UpdateAntivirusServiceGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update antivirus service group o k response has a 4xx status code -func (o *UpdateAntivirusServiceGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update antivirus service group o k response has a 5xx status code -func (o *UpdateAntivirusServiceGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update antivirus service group o k response a status code equal to that given -func (o *UpdateAntivirusServiceGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update antivirus service group o k response -func (o *UpdateAntivirusServiceGroupOK) Code() int { - return 200 -} - -func (o *UpdateAntivirusServiceGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups][%d] updateAntivirusServiceGroupOK %s", 200, payload) -} - -func (o *UpdateAntivirusServiceGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups][%d] updateAntivirusServiceGroupOK %s", 200, payload) -} - -func (o *UpdateAntivirusServiceGroupOK) GetPayload() *models.AntivirusServiceGroup { - return o.Payload -} - -func (o *UpdateAntivirusServiceGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAntivirusServiceGroupDefault creates a UpdateAntivirusServiceGroupDefault with default headers values -func NewUpdateAntivirusServiceGroupDefault(code int) *UpdateAntivirusServiceGroupDefault { - return &UpdateAntivirusServiceGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateAntivirusServiceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAntivirusServiceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update antivirus service group default response has a 2xx status code -func (o *UpdateAntivirusServiceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update antivirus service group default response has a 3xx status code -func (o *UpdateAntivirusServiceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update antivirus service group default response has a 4xx status code -func (o *UpdateAntivirusServiceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update antivirus service group default response has a 5xx status code -func (o *UpdateAntivirusServiceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update antivirus service group default response a status code equal to that given -func (o *UpdateAntivirusServiceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update antivirus service group default response -func (o *UpdateAntivirusServiceGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAntivirusServiceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups][%d] UpdateAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateAntivirusServiceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/antivirusGroups][%d] UpdateAntivirusServiceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateAntivirusServiceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateAntivirusServiceGroupDefault) 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/antivirus_service_group/update_infected_files_parameters.go b/v1/client/antivirus_service_group/update_infected_files_parameters.go deleted file mode 100644 index 9f30c9b0..00000000 --- a/v1/client/antivirus_service_group/update_infected_files_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateInfectedFilesParams creates a new UpdateInfectedFilesParams 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 NewUpdateInfectedFilesParams() *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInfectedFilesParamsWithTimeout creates a new UpdateInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewUpdateInfectedFilesParamsWithTimeout(timeout time.Duration) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - timeout: timeout, - } -} - -// NewUpdateInfectedFilesParamsWithContext creates a new UpdateInfectedFilesParams object -// with the ability to set a context for a request. -func NewUpdateInfectedFilesParamsWithContext(ctx context.Context) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - Context: ctx, - } -} - -// NewUpdateInfectedFilesParamsWithHTTPClient creates a new UpdateInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInfectedFilesParamsWithHTTPClient(client *http.Client) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -UpdateInfectedFilesParams contains all the parameters to send to the API endpoint - - for the update infected files operation. - - Typically these are written to a http.Request. -*/ -type UpdateInfectedFilesParams struct { - - /* Body. - - Request to update the list of infected files. - */ - Body *models.UpdateInfectedFileParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInfectedFilesParams) WithDefaults() *UpdateInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update infected files params -func (o *UpdateInfectedFilesParams) WithTimeout(timeout time.Duration) *UpdateInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update infected files params -func (o *UpdateInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update infected files params -func (o *UpdateInfectedFilesParams) WithContext(ctx context.Context) *UpdateInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update infected files params -func (o *UpdateInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update infected files params -func (o *UpdateInfectedFilesParams) WithHTTPClient(client *http.Client) *UpdateInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update infected files params -func (o *UpdateInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update infected files params -func (o *UpdateInfectedFilesParams) WithBody(body *models.UpdateInfectedFileParams) *UpdateInfectedFilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update infected files params -func (o *UpdateInfectedFilesParams) SetBody(body *models.UpdateInfectedFileParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInfectedFilesParams) 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/antivirus_service_group/update_infected_files_responses.go b/v1/client/antivirus_service_group/update_infected_files_responses.go deleted file mode 100644 index e54b381b..00000000 --- a/v1/client/antivirus_service_group/update_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateInfectedFilesReader is a Reader for the UpdateInfectedFiles structure. -type UpdateInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInfectedFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInfectedFilesDefault(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 - } -} - -// NewUpdateInfectedFilesOK creates a UpdateInfectedFilesOK with default headers values -func NewUpdateInfectedFilesOK() *UpdateInfectedFilesOK { - return &UpdateInfectedFilesOK{} -} - -/* -UpdateInfectedFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateInfectedFilesOK struct { - Payload *models.UpdateInfectedFileResponse -} - -// IsSuccess returns true when this update infected files o k response has a 2xx status code -func (o *UpdateInfectedFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update infected files o k response has a 3xx status code -func (o *UpdateInfectedFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update infected files o k response has a 4xx status code -func (o *UpdateInfectedFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update infected files o k response has a 5xx status code -func (o *UpdateInfectedFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update infected files o k response a status code equal to that given -func (o *UpdateInfectedFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update infected files o k response -func (o *UpdateInfectedFilesOK) Code() int { - return 200 -} - -func (o *UpdateInfectedFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/infectedFiles][%d] updateInfectedFilesOK %s", 200, payload) -} - -func (o *UpdateInfectedFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/infectedFiles][%d] updateInfectedFilesOK %s", 200, payload) -} - -func (o *UpdateInfectedFilesOK) GetPayload() *models.UpdateInfectedFileResponse { - return o.Payload -} - -func (o *UpdateInfectedFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateInfectedFileResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInfectedFilesDefault creates a UpdateInfectedFilesDefault with default headers values -func NewUpdateInfectedFilesDefault(code int) *UpdateInfectedFilesDefault { - return &UpdateInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -UpdateInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInfectedFilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update infected files default response has a 2xx status code -func (o *UpdateInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update infected files default response has a 3xx status code -func (o *UpdateInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update infected files default response has a 4xx status code -func (o *UpdateInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update infected files default response has a 5xx status code -func (o *UpdateInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update infected files default response a status code equal to that given -func (o *UpdateInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update infected files default response -func (o *UpdateInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/infectedFiles][%d] UpdateInfectedFiles default %s", o._statusCode, payload) -} - -func (o *UpdateInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/infectedFiles][%d] UpdateInfectedFiles default %s", o._statusCode, payload) -} - -func (o *UpdateInfectedFilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateInfectedFilesDefault) 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/app/app_client.go b/v1/client/app/app_client.go deleted file mode 100644 index 73101218..00000000 --- a/v1/client/app/app_client.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new app API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new app API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new app API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for app API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithContentType allows the client to force the Content-Type header -// to negotiate a specific Consumer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithContentType(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{mime} - } -} - -// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". -func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"application/json"} -} - -// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data". -func WithContentTypeMultipartFormData(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"multipart/form-data"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - GetApps(params *GetAppsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppsOK, error) - - InstallApp(params *InstallAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InstallAppCreated, error) - - UninstallApp(params *UninstallAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UninstallAppAccepted, error) - - UploadApp(params *UploadAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadAppCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetApps lists the apps - - Api provides the list of the apps which are available for the user to install - -or are already installed. App object provides basic app information along with -app metadata. -*/ -func (a *Client) GetApps(params *GetAppsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAppsParams() - } - op := &runtime.ClientOperation{ - ID: "GetApps", - Method: "GET", - PathPattern: "/public/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAppsReader{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.(*GetAppsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAppsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -InstallApp starts the application installation on the cluster - -Only purchased apps can be installed using this api. -*/ -func (a *Client) InstallApp(params *InstallAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InstallAppCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewInstallAppParams() - } - op := &runtime.ClientOperation{ - ID: "InstallApp", - Method: "POST", - PathPattern: "/public/apps/{appUid}/versions/{version}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &InstallAppReader{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.(*InstallAppCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*InstallAppDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UninstallApp starts the application uninstall from the cluster - -App must already been installed for this api to work. -*/ -func (a *Client) UninstallApp(params *UninstallAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UninstallAppAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUninstallAppParams() - } - op := &runtime.ClientOperation{ - ID: "UninstallApp", - Method: "DELETE", - PathPattern: "/public/apps/{appUid}/versions/{version}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UninstallAppReader{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.(*UninstallAppAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UninstallAppDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UploadApp uploads and install an app from image - - Api provides the list of the apps which are available for the user to install - -or are already installed. App object provides basic app information along with -app metadata. -*/ -func (a *Client) UploadApp(params *UploadAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadAppCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUploadAppParams() - } - op := &runtime.ClientOperation{ - ID: "UploadApp", - Method: "POST", - PathPattern: "/public/apps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"multipart/form-data"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UploadAppReader{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.(*UploadAppCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UploadAppDefault) - 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/app/get_apps_parameters.go b/v1/client/app/get_apps_parameters.go deleted file mode 100644 index d5d48c9a..00000000 --- a/v1/client/app/get_apps_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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" -) - -// NewGetAppsParams creates a new GetAppsParams 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 NewGetAppsParams() *GetAppsParams { - return &GetAppsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppsParamsWithTimeout creates a new GetAppsParams object -// with the ability to set a timeout on a request. -func NewGetAppsParamsWithTimeout(timeout time.Duration) *GetAppsParams { - return &GetAppsParams{ - timeout: timeout, - } -} - -// NewGetAppsParamsWithContext creates a new GetAppsParams object -// with the ability to set a context for a request. -func NewGetAppsParamsWithContext(ctx context.Context) *GetAppsParams { - return &GetAppsParams{ - Context: ctx, - } -} - -// NewGetAppsParamsWithHTTPClient creates a new GetAppsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppsParamsWithHTTPClient(client *http.Client) *GetAppsParams { - return &GetAppsParams{ - HTTPClient: client, - } -} - -/* -GetAppsParams contains all the parameters to send to the API endpoint - - for the get apps operation. - - Typically these are written to a http.Request. -*/ -type GetAppsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppsParams) WithDefaults() *GetAppsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get apps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get apps params -func (o *GetAppsParams) WithTimeout(timeout time.Duration) *GetAppsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get apps params -func (o *GetAppsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get apps params -func (o *GetAppsParams) WithContext(ctx context.Context) *GetAppsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get apps params -func (o *GetAppsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get apps params -func (o *GetAppsParams) WithHTTPClient(client *http.Client) *GetAppsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get apps params -func (o *GetAppsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppsParams) 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/app/get_apps_responses.go b/v1/client/app/get_apps_responses.go deleted file mode 100644 index 1ca5689c..00000000 --- a/v1/client/app/get_apps_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAppsReader is a Reader for the GetApps structure. -type GetAppsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAppsDefault(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 - } -} - -// NewGetAppsOK creates a GetAppsOK with default headers values -func NewGetAppsOK() *GetAppsOK { - return &GetAppsOK{} -} - -/* -GetAppsOK describes a response with status code 200, with default header values. - -GetAppsResponse specifies response for getting apps -*/ -type GetAppsOK struct { - Payload []*models.App -} - -// IsSuccess returns true when this get apps o k response has a 2xx status code -func (o *GetAppsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get apps o k response has a 3xx status code -func (o *GetAppsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get apps o k response has a 4xx status code -func (o *GetAppsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get apps o k response has a 5xx status code -func (o *GetAppsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get apps o k response a status code equal to that given -func (o *GetAppsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get apps o k response -func (o *GetAppsOK) Code() int { - return 200 -} - -func (o *GetAppsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/apps][%d] getAppsOK %s", 200, payload) -} - -func (o *GetAppsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/apps][%d] getAppsOK %s", 200, payload) -} - -func (o *GetAppsOK) GetPayload() []*models.App { - return o.Payload -} - -func (o *GetAppsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppsDefault creates a GetAppsDefault with default headers values -func NewGetAppsDefault(code int) *GetAppsDefault { - return &GetAppsDefault{ - _statusCode: code, - } -} - -/* -GetAppsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAppsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get apps default response has a 2xx status code -func (o *GetAppsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get apps default response has a 3xx status code -func (o *GetAppsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get apps default response has a 4xx status code -func (o *GetAppsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get apps default response has a 5xx status code -func (o *GetAppsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get apps default response a status code equal to that given -func (o *GetAppsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get apps default response -func (o *GetAppsDefault) Code() int { - return o._statusCode -} - -func (o *GetAppsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/apps][%d] GetApps default %s", o._statusCode, payload) -} - -func (o *GetAppsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/apps][%d] GetApps default %s", o._statusCode, payload) -} - -func (o *GetAppsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAppsDefault) 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/app/install_app_parameters.go b/v1/client/app/install_app_parameters.go deleted file mode 100644 index b16bae03..00000000 --- a/v1/client/app/install_app_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/go-openapi/swag" -) - -// NewInstallAppParams creates a new InstallAppParams 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 NewInstallAppParams() *InstallAppParams { - return &InstallAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewInstallAppParamsWithTimeout creates a new InstallAppParams object -// with the ability to set a timeout on a request. -func NewInstallAppParamsWithTimeout(timeout time.Duration) *InstallAppParams { - return &InstallAppParams{ - timeout: timeout, - } -} - -// NewInstallAppParamsWithContext creates a new InstallAppParams object -// with the ability to set a context for a request. -func NewInstallAppParamsWithContext(ctx context.Context) *InstallAppParams { - return &InstallAppParams{ - Context: ctx, - } -} - -// NewInstallAppParamsWithHTTPClient creates a new InstallAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewInstallAppParamsWithHTTPClient(client *http.Client) *InstallAppParams { - return &InstallAppParams{ - HTTPClient: client, - } -} - -/* -InstallAppParams contains all the parameters to send to the API endpoint - - for the install app operation. - - Typically these are written to a http.Request. -*/ -type InstallAppParams struct { - - /* AppUID. - - Specifies the app Id. - - Format: int64 - */ - AppUID int64 - - /* Version. - - Specifies the app version. - - Format: int64 - */ - Version int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the install app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallAppParams) WithDefaults() *InstallAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the install app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the install app params -func (o *InstallAppParams) WithTimeout(timeout time.Duration) *InstallAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the install app params -func (o *InstallAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the install app params -func (o *InstallAppParams) WithContext(ctx context.Context) *InstallAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the install app params -func (o *InstallAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the install app params -func (o *InstallAppParams) WithHTTPClient(client *http.Client) *InstallAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the install app params -func (o *InstallAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppUID adds the appUID to the install app params -func (o *InstallAppParams) WithAppUID(appUID int64) *InstallAppParams { - o.SetAppUID(appUID) - return o -} - -// SetAppUID adds the appUid to the install app params -func (o *InstallAppParams) SetAppUID(appUID int64) { - o.AppUID = appUID -} - -// WithVersion adds the version to the install app params -func (o *InstallAppParams) WithVersion(version int64) *InstallAppParams { - o.SetVersion(version) - return o -} - -// SetVersion adds the version to the install app params -func (o *InstallAppParams) SetVersion(version int64) { - o.Version = version -} - -// WriteToRequest writes these params to a swagger request -func (o *InstallAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param appUid - if err := r.SetPathParam("appUid", swag.FormatInt64(o.AppUID)); err != nil { - return err - } - - // path param version - if err := r.SetPathParam("version", swag.FormatInt64(o.Version)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/app/install_app_responses.go b/v1/client/app/install_app_responses.go deleted file mode 100644 index 3064122c..00000000 --- a/v1/client/app/install_app_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// InstallAppReader is a Reader for the InstallApp structure. -type InstallAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *InstallAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewInstallAppCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewInstallAppDefault(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 - } -} - -// NewInstallAppCreated creates a InstallAppCreated with default headers values -func NewInstallAppCreated() *InstallAppCreated { - return &InstallAppCreated{} -} - -/* -InstallAppCreated describes a response with status code 201, with default header values. - -Success -*/ -type InstallAppCreated struct { - Payload *models.App -} - -// IsSuccess returns true when this install app created response has a 2xx status code -func (o *InstallAppCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this install app created response has a 3xx status code -func (o *InstallAppCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this install app created response has a 4xx status code -func (o *InstallAppCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this install app created response has a 5xx status code -func (o *InstallAppCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this install app created response a status code equal to that given -func (o *InstallAppCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the install app created response -func (o *InstallAppCreated) Code() int { - return 201 -} - -func (o *InstallAppCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps/{appUid}/versions/{version}][%d] installAppCreated %s", 201, payload) -} - -func (o *InstallAppCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps/{appUid}/versions/{version}][%d] installAppCreated %s", 201, payload) -} - -func (o *InstallAppCreated) GetPayload() *models.App { - return o.Payload -} - -func (o *InstallAppCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.App) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallAppDefault creates a InstallAppDefault with default headers values -func NewInstallAppDefault(code int) *InstallAppDefault { - return &InstallAppDefault{ - _statusCode: code, - } -} - -/* -InstallAppDefault describes a response with status code -1, with default header values. - -Error -*/ -type InstallAppDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this install app default response has a 2xx status code -func (o *InstallAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this install app default response has a 3xx status code -func (o *InstallAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this install app default response has a 4xx status code -func (o *InstallAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this install app default response has a 5xx status code -func (o *InstallAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this install app default response a status code equal to that given -func (o *InstallAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the install app default response -func (o *InstallAppDefault) Code() int { - return o._statusCode -} - -func (o *InstallAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps/{appUid}/versions/{version}][%d] InstallApp default %s", o._statusCode, payload) -} - -func (o *InstallAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps/{appUid}/versions/{version}][%d] InstallApp default %s", o._statusCode, payload) -} - -func (o *InstallAppDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *InstallAppDefault) 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/app/uninstall_app_parameters.go b/v1/client/app/uninstall_app_parameters.go deleted file mode 100644 index 049c2fd0..00000000 --- a/v1/client/app/uninstall_app_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/go-openapi/swag" -) - -// NewUninstallAppParams creates a new UninstallAppParams 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 NewUninstallAppParams() *UninstallAppParams { - return &UninstallAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUninstallAppParamsWithTimeout creates a new UninstallAppParams object -// with the ability to set a timeout on a request. -func NewUninstallAppParamsWithTimeout(timeout time.Duration) *UninstallAppParams { - return &UninstallAppParams{ - timeout: timeout, - } -} - -// NewUninstallAppParamsWithContext creates a new UninstallAppParams object -// with the ability to set a context for a request. -func NewUninstallAppParamsWithContext(ctx context.Context) *UninstallAppParams { - return &UninstallAppParams{ - Context: ctx, - } -} - -// NewUninstallAppParamsWithHTTPClient creates a new UninstallAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewUninstallAppParamsWithHTTPClient(client *http.Client) *UninstallAppParams { - return &UninstallAppParams{ - HTTPClient: client, - } -} - -/* -UninstallAppParams contains all the parameters to send to the API endpoint - - for the uninstall app operation. - - Typically these are written to a http.Request. -*/ -type UninstallAppParams struct { - - /* AppUID. - - Specifies the app Id. - - Format: int64 - */ - AppUID int64 - - /* Version. - - Specifies the app version. - - Format: int64 - */ - Version int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the uninstall app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UninstallAppParams) WithDefaults() *UninstallAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the uninstall app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UninstallAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the uninstall app params -func (o *UninstallAppParams) WithTimeout(timeout time.Duration) *UninstallAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the uninstall app params -func (o *UninstallAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the uninstall app params -func (o *UninstallAppParams) WithContext(ctx context.Context) *UninstallAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the uninstall app params -func (o *UninstallAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the uninstall app params -func (o *UninstallAppParams) WithHTTPClient(client *http.Client) *UninstallAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the uninstall app params -func (o *UninstallAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppUID adds the appUID to the uninstall app params -func (o *UninstallAppParams) WithAppUID(appUID int64) *UninstallAppParams { - o.SetAppUID(appUID) - return o -} - -// SetAppUID adds the appUid to the uninstall app params -func (o *UninstallAppParams) SetAppUID(appUID int64) { - o.AppUID = appUID -} - -// WithVersion adds the version to the uninstall app params -func (o *UninstallAppParams) WithVersion(version int64) *UninstallAppParams { - o.SetVersion(version) - return o -} - -// SetVersion adds the version to the uninstall app params -func (o *UninstallAppParams) SetVersion(version int64) { - o.Version = version -} - -// WriteToRequest writes these params to a swagger request -func (o *UninstallAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param appUid - if err := r.SetPathParam("appUid", swag.FormatInt64(o.AppUID)); err != nil { - return err - } - - // path param version - if err := r.SetPathParam("version", swag.FormatInt64(o.Version)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/app/uninstall_app_responses.go b/v1/client/app/uninstall_app_responses.go deleted file mode 100644 index 8a62f818..00000000 --- a/v1/client/app/uninstall_app_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UninstallAppReader is a Reader for the UninstallApp structure. -type UninstallAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UninstallAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUninstallAppAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUninstallAppDefault(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 - } -} - -// NewUninstallAppAccepted creates a UninstallAppAccepted with default headers values -func NewUninstallAppAccepted() *UninstallAppAccepted { - return &UninstallAppAccepted{} -} - -/* -UninstallAppAccepted describes a response with status code 202, with default header values. - -No Content -*/ -type UninstallAppAccepted struct { -} - -// IsSuccess returns true when this uninstall app accepted response has a 2xx status code -func (o *UninstallAppAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this uninstall app accepted response has a 3xx status code -func (o *UninstallAppAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this uninstall app accepted response has a 4xx status code -func (o *UninstallAppAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this uninstall app accepted response has a 5xx status code -func (o *UninstallAppAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this uninstall app accepted response a status code equal to that given -func (o *UninstallAppAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the uninstall app accepted response -func (o *UninstallAppAccepted) Code() int { - return 202 -} - -func (o *UninstallAppAccepted) Error() string { - return fmt.Sprintf("[DELETE /public/apps/{appUid}/versions/{version}][%d] uninstallAppAccepted", 202) -} - -func (o *UninstallAppAccepted) String() string { - return fmt.Sprintf("[DELETE /public/apps/{appUid}/versions/{version}][%d] uninstallAppAccepted", 202) -} - -func (o *UninstallAppAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUninstallAppDefault creates a UninstallAppDefault with default headers values -func NewUninstallAppDefault(code int) *UninstallAppDefault { - return &UninstallAppDefault{ - _statusCode: code, - } -} - -/* -UninstallAppDefault describes a response with status code -1, with default header values. - -Error -*/ -type UninstallAppDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this uninstall app default response has a 2xx status code -func (o *UninstallAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this uninstall app default response has a 3xx status code -func (o *UninstallAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this uninstall app default response has a 4xx status code -func (o *UninstallAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this uninstall app default response has a 5xx status code -func (o *UninstallAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this uninstall app default response a status code equal to that given -func (o *UninstallAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the uninstall app default response -func (o *UninstallAppDefault) Code() int { - return o._statusCode -} - -func (o *UninstallAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/apps/{appUid}/versions/{version}][%d] UninstallApp default %s", o._statusCode, payload) -} - -func (o *UninstallAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/apps/{appUid}/versions/{version}][%d] UninstallApp default %s", o._statusCode, payload) -} - -func (o *UninstallAppDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UninstallAppDefault) 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/app/upload_app_parameters.go b/v1/client/app/upload_app_parameters.go deleted file mode 100644 index 62e8a1d1..00000000 --- a/v1/client/app/upload_app_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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" -) - -// NewUploadAppParams creates a new UploadAppParams 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 NewUploadAppParams() *UploadAppParams { - return &UploadAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUploadAppParamsWithTimeout creates a new UploadAppParams object -// with the ability to set a timeout on a request. -func NewUploadAppParamsWithTimeout(timeout time.Duration) *UploadAppParams { - return &UploadAppParams{ - timeout: timeout, - } -} - -// NewUploadAppParamsWithContext creates a new UploadAppParams object -// with the ability to set a context for a request. -func NewUploadAppParamsWithContext(ctx context.Context) *UploadAppParams { - return &UploadAppParams{ - Context: ctx, - } -} - -// NewUploadAppParamsWithHTTPClient creates a new UploadAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewUploadAppParamsWithHTTPClient(client *http.Client) *UploadAppParams { - return &UploadAppParams{ - HTTPClient: client, - } -} - -/* -UploadAppParams contains all the parameters to send to the API endpoint - - for the upload app operation. - - Typically these are written to a http.Request. -*/ -type UploadAppParams struct { - - /* AppURL. - - Specifies the url of the app package - */ - AppURL *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upload app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadAppParams) WithDefaults() *UploadAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upload app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upload app params -func (o *UploadAppParams) WithTimeout(timeout time.Duration) *UploadAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload app params -func (o *UploadAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload app params -func (o *UploadAppParams) WithContext(ctx context.Context) *UploadAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload app params -func (o *UploadAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload app params -func (o *UploadAppParams) WithHTTPClient(client *http.Client) *UploadAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload app params -func (o *UploadAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppURL adds the appURL to the upload app params -func (o *UploadAppParams) WithAppURL(appURL *string) *UploadAppParams { - o.SetAppURL(appURL) - return o -} - -// SetAppURL adds the appUrl to the upload app params -func (o *UploadAppParams) SetAppURL(appURL *string) { - o.AppURL = appURL -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AppURL != nil { - - // query param appUrl - var qrAppURL string - - if o.AppURL != nil { - qrAppURL = *o.AppURL - } - qAppURL := qrAppURL - if qAppURL != "" { - - if err := r.SetQueryParam("appUrl", qAppURL); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/app/upload_app_responses.go b/v1/client/app/upload_app_responses.go deleted file mode 100644 index 07fbdab4..00000000 --- a/v1/client/app/upload_app_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UploadAppReader is a Reader for the UploadApp structure. -type UploadAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUploadAppCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUploadAppDefault(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 - } -} - -// NewUploadAppCreated creates a UploadAppCreated with default headers values -func NewUploadAppCreated() *UploadAppCreated { - return &UploadAppCreated{} -} - -/* -UploadAppCreated describes a response with status code 201, with default header values. - -Success -*/ -type UploadAppCreated struct { - Payload *models.App -} - -// IsSuccess returns true when this upload app created response has a 2xx status code -func (o *UploadAppCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upload app created response has a 3xx status code -func (o *UploadAppCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upload app created response has a 4xx status code -func (o *UploadAppCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this upload app created response has a 5xx status code -func (o *UploadAppCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this upload app created response a status code equal to that given -func (o *UploadAppCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the upload app created response -func (o *UploadAppCreated) Code() int { - return 201 -} - -func (o *UploadAppCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps][%d] uploadAppCreated %s", 201, payload) -} - -func (o *UploadAppCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps][%d] uploadAppCreated %s", 201, payload) -} - -func (o *UploadAppCreated) GetPayload() *models.App { - return o.Payload -} - -func (o *UploadAppCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.App) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadAppDefault creates a UploadAppDefault with default headers values -func NewUploadAppDefault(code int) *UploadAppDefault { - return &UploadAppDefault{ - _statusCode: code, - } -} - -/* -UploadAppDefault describes a response with status code -1, with default header values. - -Error -*/ -type UploadAppDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upload app default response has a 2xx status code -func (o *UploadAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upload app default response has a 3xx status code -func (o *UploadAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upload app default response has a 4xx status code -func (o *UploadAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upload app default response has a 5xx status code -func (o *UploadAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upload app default response a status code equal to that given -func (o *UploadAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upload app default response -func (o *UploadAppDefault) Code() int { - return o._statusCode -} - -func (o *UploadAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps][%d] UploadApp default %s", o._statusCode, payload) -} - -func (o *UploadAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/apps][%d] UploadApp default %s", o._statusCode, payload) -} - -func (o *UploadAppDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UploadAppDefault) 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/app_instance/app_instance_client.go b/v1/client/app_instance/app_instance_client.go deleted file mode 100644 index 3f089ded..00000000 --- a/v1/client/app_instance/app_instance_client.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new app instance API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new app instance API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new app instance API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for app instance API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAppInstances(params *GetAppInstancesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppInstancesOK, error) - - LaunchAppInstance(params *LaunchAppInstanceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LaunchAppInstanceAccepted, error) - - UpdateAppInstanceSettings(params *UpdateAppInstanceSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppInstanceSettingsAccepted, error) - - UpdateAppInstanceState(params *UpdateAppInstanceStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppInstanceStateAccepted, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetAppInstances lists the app instances - - Api provides the list of the app instances. Instances can be in different - -states including stopped. -*/ -func (a *Client) GetAppInstances(params *GetAppInstancesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppInstancesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAppInstancesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAppInstances", - Method: "GET", - PathPattern: "/public/appInstances", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAppInstancesReader{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.(*GetAppInstancesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAppInstancesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LaunchAppInstance starts the application instance launch on the cluster - -Only installed apps can be launched. -*/ -func (a *Client) LaunchAppInstance(params *LaunchAppInstanceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LaunchAppInstanceAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLaunchAppInstanceParams() - } - op := &runtime.ClientOperation{ - ID: "LaunchAppInstance", - Method: "POST", - PathPattern: "/public/appInstances", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LaunchAppInstanceReader{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.(*LaunchAppInstanceAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LaunchAppInstanceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAppInstanceSettings updates app instance settings - -Changes the settings of the app instance. -*/ -func (a *Client) UpdateAppInstanceSettings(params *UpdateAppInstanceSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppInstanceSettingsAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAppInstanceSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAppInstanceSettings", - Method: "PUT", - PathPattern: "/public/appInstanceSettings/{appInstanceId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAppInstanceSettingsReader{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.(*UpdateAppInstanceSettingsAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAppInstanceSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAppInstanceState updates app instance state - -Changes the state of the app instances. -*/ -func (a *Client) UpdateAppInstanceState(params *UpdateAppInstanceStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppInstanceStateAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAppInstanceStateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAppInstanceState", - Method: "PUT", - PathPattern: "/public/appInstances/{appInstanceId}/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAppInstanceStateReader{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.(*UpdateAppInstanceStateAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAppInstanceStateDefault) - 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/app_instance/get_app_instances_parameters.go b/v1/client/app_instance/get_app_instances_parameters.go deleted file mode 100644 index 257eeda6..00000000 --- a/v1/client/app_instance/get_app_instances_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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" -) - -// NewGetAppInstancesParams creates a new GetAppInstancesParams 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 NewGetAppInstancesParams() *GetAppInstancesParams { - return &GetAppInstancesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppInstancesParamsWithTimeout creates a new GetAppInstancesParams object -// with the ability to set a timeout on a request. -func NewGetAppInstancesParamsWithTimeout(timeout time.Duration) *GetAppInstancesParams { - return &GetAppInstancesParams{ - timeout: timeout, - } -} - -// NewGetAppInstancesParamsWithContext creates a new GetAppInstancesParams object -// with the ability to set a context for a request. -func NewGetAppInstancesParamsWithContext(ctx context.Context) *GetAppInstancesParams { - return &GetAppInstancesParams{ - Context: ctx, - } -} - -// NewGetAppInstancesParamsWithHTTPClient creates a new GetAppInstancesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppInstancesParamsWithHTTPClient(client *http.Client) *GetAppInstancesParams { - return &GetAppInstancesParams{ - HTTPClient: client, - } -} - -/* -GetAppInstancesParams contains all the parameters to send to the API endpoint - - for the get app instances operation. - - Typically these are written to a http.Request. -*/ -type GetAppInstancesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app instances params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInstancesParams) WithDefaults() *GetAppInstancesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app instances params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppInstancesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app instances params -func (o *GetAppInstancesParams) WithTimeout(timeout time.Duration) *GetAppInstancesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app instances params -func (o *GetAppInstancesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app instances params -func (o *GetAppInstancesParams) WithContext(ctx context.Context) *GetAppInstancesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app instances params -func (o *GetAppInstancesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app instances params -func (o *GetAppInstancesParams) WithHTTPClient(client *http.Client) *GetAppInstancesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app instances params -func (o *GetAppInstancesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppInstancesParams) 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/app_instance/get_app_instances_responses.go b/v1/client/app_instance/get_app_instances_responses.go deleted file mode 100644 index 537fa951..00000000 --- a/v1/client/app_instance/get_app_instances_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAppInstancesReader is a Reader for the GetAppInstances structure. -type GetAppInstancesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppInstancesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppInstancesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAppInstancesDefault(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 - } -} - -// NewGetAppInstancesOK creates a GetAppInstancesOK with default headers values -func NewGetAppInstancesOK() *GetAppInstancesOK { - return &GetAppInstancesOK{} -} - -/* -GetAppInstancesOK describes a response with status code 200, with default header values. - -GetAppInstancesResponse specifies response for getting apps -*/ -type GetAppInstancesOK struct { - Payload []*models.AppInstance -} - -// IsSuccess returns true when this get app instances o k response has a 2xx status code -func (o *GetAppInstancesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app instances o k response has a 3xx status code -func (o *GetAppInstancesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app instances o k response has a 4xx status code -func (o *GetAppInstancesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app instances o k response has a 5xx status code -func (o *GetAppInstancesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app instances o k response a status code equal to that given -func (o *GetAppInstancesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app instances o k response -func (o *GetAppInstancesOK) Code() int { - return 200 -} - -func (o *GetAppInstancesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/appInstances][%d] getAppInstancesOK %s", 200, payload) -} - -func (o *GetAppInstancesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/appInstances][%d] getAppInstancesOK %s", 200, payload) -} - -func (o *GetAppInstancesOK) GetPayload() []*models.AppInstance { - return o.Payload -} - -func (o *GetAppInstancesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppInstancesDefault creates a GetAppInstancesDefault with default headers values -func NewGetAppInstancesDefault(code int) *GetAppInstancesDefault { - return &GetAppInstancesDefault{ - _statusCode: code, - } -} - -/* -GetAppInstancesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAppInstancesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get app instances default response has a 2xx status code -func (o *GetAppInstancesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get app instances default response has a 3xx status code -func (o *GetAppInstancesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get app instances default response has a 4xx status code -func (o *GetAppInstancesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get app instances default response has a 5xx status code -func (o *GetAppInstancesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get app instances default response a status code equal to that given -func (o *GetAppInstancesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get app instances default response -func (o *GetAppInstancesDefault) Code() int { - return o._statusCode -} - -func (o *GetAppInstancesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/appInstances][%d] GetAppInstances default %s", o._statusCode, payload) -} - -func (o *GetAppInstancesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/appInstances][%d] GetAppInstances default %s", o._statusCode, payload) -} - -func (o *GetAppInstancesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAppInstancesDefault) 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/app_instance/launch_app_instance_parameters.go b/v1/client/app_instance/launch_app_instance_parameters.go deleted file mode 100644 index 04e5e15a..00000000 --- a/v1/client/app_instance/launch_app_instance_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewLaunchAppInstanceParams creates a new LaunchAppInstanceParams 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 NewLaunchAppInstanceParams() *LaunchAppInstanceParams { - return &LaunchAppInstanceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLaunchAppInstanceParamsWithTimeout creates a new LaunchAppInstanceParams object -// with the ability to set a timeout on a request. -func NewLaunchAppInstanceParamsWithTimeout(timeout time.Duration) *LaunchAppInstanceParams { - return &LaunchAppInstanceParams{ - timeout: timeout, - } -} - -// NewLaunchAppInstanceParamsWithContext creates a new LaunchAppInstanceParams object -// with the ability to set a context for a request. -func NewLaunchAppInstanceParamsWithContext(ctx context.Context) *LaunchAppInstanceParams { - return &LaunchAppInstanceParams{ - Context: ctx, - } -} - -// NewLaunchAppInstanceParamsWithHTTPClient creates a new LaunchAppInstanceParams object -// with the ability to set a custom HTTPClient for a request. -func NewLaunchAppInstanceParamsWithHTTPClient(client *http.Client) *LaunchAppInstanceParams { - return &LaunchAppInstanceParams{ - HTTPClient: client, - } -} - -/* -LaunchAppInstanceParams contains all the parameters to send to the API endpoint - - for the launch app instance operation. - - Typically these are written to a http.Request. -*/ -type LaunchAppInstanceParams struct { - - /* Body. - - Request to launch app. - */ - Body *models.LaunchAppInstance - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the launch app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LaunchAppInstanceParams) WithDefaults() *LaunchAppInstanceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the launch app instance params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LaunchAppInstanceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the launch app instance params -func (o *LaunchAppInstanceParams) WithTimeout(timeout time.Duration) *LaunchAppInstanceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the launch app instance params -func (o *LaunchAppInstanceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the launch app instance params -func (o *LaunchAppInstanceParams) WithContext(ctx context.Context) *LaunchAppInstanceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the launch app instance params -func (o *LaunchAppInstanceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the launch app instance params -func (o *LaunchAppInstanceParams) WithHTTPClient(client *http.Client) *LaunchAppInstanceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the launch app instance params -func (o *LaunchAppInstanceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the launch app instance params -func (o *LaunchAppInstanceParams) WithBody(body *models.LaunchAppInstance) *LaunchAppInstanceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the launch app instance params -func (o *LaunchAppInstanceParams) SetBody(body *models.LaunchAppInstance) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *LaunchAppInstanceParams) 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/app_instance/launch_app_instance_responses.go b/v1/client/app_instance/launch_app_instance_responses.go deleted file mode 100644 index dc82ca8b..00000000 --- a/v1/client/app_instance/launch_app_instance_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LaunchAppInstanceReader is a Reader for the LaunchAppInstance structure. -type LaunchAppInstanceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LaunchAppInstanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewLaunchAppInstanceAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLaunchAppInstanceDefault(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 - } -} - -// NewLaunchAppInstanceAccepted creates a LaunchAppInstanceAccepted with default headers values -func NewLaunchAppInstanceAccepted() *LaunchAppInstanceAccepted { - return &LaunchAppInstanceAccepted{} -} - -/* -LaunchAppInstanceAccepted describes a response with status code 202, with default header values. - -Success -*/ -type LaunchAppInstanceAccepted struct { - Payload *models.AppInstanceIDParameter -} - -// IsSuccess returns true when this launch app instance accepted response has a 2xx status code -func (o *LaunchAppInstanceAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this launch app instance accepted response has a 3xx status code -func (o *LaunchAppInstanceAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this launch app instance accepted response has a 4xx status code -func (o *LaunchAppInstanceAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this launch app instance accepted response has a 5xx status code -func (o *LaunchAppInstanceAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this launch app instance accepted response a status code equal to that given -func (o *LaunchAppInstanceAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the launch app instance accepted response -func (o *LaunchAppInstanceAccepted) Code() int { - return 202 -} - -func (o *LaunchAppInstanceAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/appInstances][%d] launchAppInstanceAccepted %s", 202, payload) -} - -func (o *LaunchAppInstanceAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/appInstances][%d] launchAppInstanceAccepted %s", 202, payload) -} - -func (o *LaunchAppInstanceAccepted) GetPayload() *models.AppInstanceIDParameter { - return o.Payload -} - -func (o *LaunchAppInstanceAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppInstanceIDParameter) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLaunchAppInstanceDefault creates a LaunchAppInstanceDefault with default headers values -func NewLaunchAppInstanceDefault(code int) *LaunchAppInstanceDefault { - return &LaunchAppInstanceDefault{ - _statusCode: code, - } -} - -/* -LaunchAppInstanceDefault describes a response with status code -1, with default header values. - -Error -*/ -type LaunchAppInstanceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this launch app instance default response has a 2xx status code -func (o *LaunchAppInstanceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this launch app instance default response has a 3xx status code -func (o *LaunchAppInstanceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this launch app instance default response has a 4xx status code -func (o *LaunchAppInstanceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this launch app instance default response has a 5xx status code -func (o *LaunchAppInstanceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this launch app instance default response a status code equal to that given -func (o *LaunchAppInstanceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the launch app instance default response -func (o *LaunchAppInstanceDefault) Code() int { - return o._statusCode -} - -func (o *LaunchAppInstanceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/appInstances][%d] LaunchAppInstance default %s", o._statusCode, payload) -} - -func (o *LaunchAppInstanceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/appInstances][%d] LaunchAppInstance default %s", o._statusCode, payload) -} - -func (o *LaunchAppInstanceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *LaunchAppInstanceDefault) 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/app_instance/update_app_instance_settings_parameters.go b/v1/client/app_instance/update_app_instance_settings_parameters.go deleted file mode 100644 index 160c8843..00000000 --- a/v1/client/app_instance/update_app_instance_settings_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateAppInstanceSettingsParams creates a new UpdateAppInstanceSettingsParams 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 NewUpdateAppInstanceSettingsParams() *UpdateAppInstanceSettingsParams { - return &UpdateAppInstanceSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAppInstanceSettingsParamsWithTimeout creates a new UpdateAppInstanceSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateAppInstanceSettingsParamsWithTimeout(timeout time.Duration) *UpdateAppInstanceSettingsParams { - return &UpdateAppInstanceSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateAppInstanceSettingsParamsWithContext creates a new UpdateAppInstanceSettingsParams object -// with the ability to set a context for a request. -func NewUpdateAppInstanceSettingsParamsWithContext(ctx context.Context) *UpdateAppInstanceSettingsParams { - return &UpdateAppInstanceSettingsParams{ - Context: ctx, - } -} - -// NewUpdateAppInstanceSettingsParamsWithHTTPClient creates a new UpdateAppInstanceSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAppInstanceSettingsParamsWithHTTPClient(client *http.Client) *UpdateAppInstanceSettingsParams { - return &UpdateAppInstanceSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateAppInstanceSettingsParams contains all the parameters to send to the API endpoint - - for the update app instance settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateAppInstanceSettingsParams struct { - - /* AppInstanceID. - - Specifies the app instance Id. - - Format: int64 - */ - AppInstanceID int64 - - /* Body. - - Request to update app instance settings. - */ - Body *models.UpdateAppInstanceSettingsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update app instance settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppInstanceSettingsParams) WithDefaults() *UpdateAppInstanceSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update app instance settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppInstanceSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) WithTimeout(timeout time.Duration) *UpdateAppInstanceSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) WithContext(ctx context.Context) *UpdateAppInstanceSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) WithHTTPClient(client *http.Client) *UpdateAppInstanceSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppInstanceID adds the appInstanceID to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) WithAppInstanceID(appInstanceID int64) *UpdateAppInstanceSettingsParams { - o.SetAppInstanceID(appInstanceID) - return o -} - -// SetAppInstanceID adds the appInstanceId to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) SetAppInstanceID(appInstanceID int64) { - o.AppInstanceID = appInstanceID -} - -// WithBody adds the body to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) WithBody(body *models.UpdateAppInstanceSettingsParameters) *UpdateAppInstanceSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update app instance settings params -func (o *UpdateAppInstanceSettingsParams) SetBody(body *models.UpdateAppInstanceSettingsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAppInstanceSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param appInstanceId - if err := r.SetPathParam("appInstanceId", swag.FormatInt64(o.AppInstanceID)); err != nil { - return err - } - 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/app_instance/update_app_instance_settings_responses.go b/v1/client/app_instance/update_app_instance_settings_responses.go deleted file mode 100644 index 61a4485d..00000000 --- a/v1/client/app_instance/update_app_instance_settings_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateAppInstanceSettingsReader is a Reader for the UpdateAppInstanceSettings structure. -type UpdateAppInstanceSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAppInstanceSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpdateAppInstanceSettingsAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAppInstanceSettingsDefault(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 - } -} - -// NewUpdateAppInstanceSettingsAccepted creates a UpdateAppInstanceSettingsAccepted with default headers values -func NewUpdateAppInstanceSettingsAccepted() *UpdateAppInstanceSettingsAccepted { - return &UpdateAppInstanceSettingsAccepted{} -} - -/* -UpdateAppInstanceSettingsAccepted describes a response with status code 202, with default header values. - -No Content -*/ -type UpdateAppInstanceSettingsAccepted struct { -} - -// IsSuccess returns true when this update app instance settings accepted response has a 2xx status code -func (o *UpdateAppInstanceSettingsAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update app instance settings accepted response has a 3xx status code -func (o *UpdateAppInstanceSettingsAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app instance settings accepted response has a 4xx status code -func (o *UpdateAppInstanceSettingsAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app instance settings accepted response has a 5xx status code -func (o *UpdateAppInstanceSettingsAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this update app instance settings accepted response a status code equal to that given -func (o *UpdateAppInstanceSettingsAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the update app instance settings accepted response -func (o *UpdateAppInstanceSettingsAccepted) Code() int { - return 202 -} - -func (o *UpdateAppInstanceSettingsAccepted) Error() string { - return fmt.Sprintf("[PUT /public/appInstanceSettings/{appInstanceId}][%d] updateAppInstanceSettingsAccepted", 202) -} - -func (o *UpdateAppInstanceSettingsAccepted) String() string { - return fmt.Sprintf("[PUT /public/appInstanceSettings/{appInstanceId}][%d] updateAppInstanceSettingsAccepted", 202) -} - -func (o *UpdateAppInstanceSettingsAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateAppInstanceSettingsDefault creates a UpdateAppInstanceSettingsDefault with default headers values -func NewUpdateAppInstanceSettingsDefault(code int) *UpdateAppInstanceSettingsDefault { - return &UpdateAppInstanceSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateAppInstanceSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAppInstanceSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update app instance settings default response has a 2xx status code -func (o *UpdateAppInstanceSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update app instance settings default response has a 3xx status code -func (o *UpdateAppInstanceSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update app instance settings default response has a 4xx status code -func (o *UpdateAppInstanceSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update app instance settings default response has a 5xx status code -func (o *UpdateAppInstanceSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update app instance settings default response a status code equal to that given -func (o *UpdateAppInstanceSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update app instance settings default response -func (o *UpdateAppInstanceSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAppInstanceSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/appInstanceSettings/{appInstanceId}][%d] UpdateAppInstanceSettings default %s", o._statusCode, payload) -} - -func (o *UpdateAppInstanceSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/appInstanceSettings/{appInstanceId}][%d] UpdateAppInstanceSettings default %s", o._statusCode, payload) -} - -func (o *UpdateAppInstanceSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateAppInstanceSettingsDefault) 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/app_instance/update_app_instance_state_parameters.go b/v1/client/app_instance/update_app_instance_state_parameters.go deleted file mode 100644 index 20d1de28..00000000 --- a/v1/client/app_instance/update_app_instance_state_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateAppInstanceStateParams creates a new UpdateAppInstanceStateParams 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 NewUpdateAppInstanceStateParams() *UpdateAppInstanceStateParams { - return &UpdateAppInstanceStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAppInstanceStateParamsWithTimeout creates a new UpdateAppInstanceStateParams object -// with the ability to set a timeout on a request. -func NewUpdateAppInstanceStateParamsWithTimeout(timeout time.Duration) *UpdateAppInstanceStateParams { - return &UpdateAppInstanceStateParams{ - timeout: timeout, - } -} - -// NewUpdateAppInstanceStateParamsWithContext creates a new UpdateAppInstanceStateParams object -// with the ability to set a context for a request. -func NewUpdateAppInstanceStateParamsWithContext(ctx context.Context) *UpdateAppInstanceStateParams { - return &UpdateAppInstanceStateParams{ - Context: ctx, - } -} - -// NewUpdateAppInstanceStateParamsWithHTTPClient creates a new UpdateAppInstanceStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAppInstanceStateParamsWithHTTPClient(client *http.Client) *UpdateAppInstanceStateParams { - return &UpdateAppInstanceStateParams{ - HTTPClient: client, - } -} - -/* -UpdateAppInstanceStateParams contains all the parameters to send to the API endpoint - - for the update app instance state operation. - - Typically these are written to a http.Request. -*/ -type UpdateAppInstanceStateParams struct { - - /* AppInstanceID. - - Specifies the app instance Id. - - Format: int64 - */ - AppInstanceID int64 - - /* Body. - - Request to update app instance state. - */ - Body *models.UpdateAppInstanceStateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update app instance state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppInstanceStateParams) WithDefaults() *UpdateAppInstanceStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update app instance state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppInstanceStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update app instance state params -func (o *UpdateAppInstanceStateParams) WithTimeout(timeout time.Duration) *UpdateAppInstanceStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update app instance state params -func (o *UpdateAppInstanceStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update app instance state params -func (o *UpdateAppInstanceStateParams) WithContext(ctx context.Context) *UpdateAppInstanceStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update app instance state params -func (o *UpdateAppInstanceStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update app instance state params -func (o *UpdateAppInstanceStateParams) WithHTTPClient(client *http.Client) *UpdateAppInstanceStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update app instance state params -func (o *UpdateAppInstanceStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppInstanceID adds the appInstanceID to the update app instance state params -func (o *UpdateAppInstanceStateParams) WithAppInstanceID(appInstanceID int64) *UpdateAppInstanceStateParams { - o.SetAppInstanceID(appInstanceID) - return o -} - -// SetAppInstanceID adds the appInstanceId to the update app instance state params -func (o *UpdateAppInstanceStateParams) SetAppInstanceID(appInstanceID int64) { - o.AppInstanceID = appInstanceID -} - -// WithBody adds the body to the update app instance state params -func (o *UpdateAppInstanceStateParams) WithBody(body *models.UpdateAppInstanceStateParameters) *UpdateAppInstanceStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update app instance state params -func (o *UpdateAppInstanceStateParams) SetBody(body *models.UpdateAppInstanceStateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAppInstanceStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param appInstanceId - if err := r.SetPathParam("appInstanceId", swag.FormatInt64(o.AppInstanceID)); err != nil { - return err - } - 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/app_instance/update_app_instance_state_responses.go b/v1/client/app_instance/update_app_instance_state_responses.go deleted file mode 100644 index 50f7e243..00000000 --- a/v1/client/app_instance/update_app_instance_state_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package app_instance - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateAppInstanceStateReader is a Reader for the UpdateAppInstanceState structure. -type UpdateAppInstanceStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAppInstanceStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpdateAppInstanceStateAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAppInstanceStateDefault(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 - } -} - -// NewUpdateAppInstanceStateAccepted creates a UpdateAppInstanceStateAccepted with default headers values -func NewUpdateAppInstanceStateAccepted() *UpdateAppInstanceStateAccepted { - return &UpdateAppInstanceStateAccepted{} -} - -/* -UpdateAppInstanceStateAccepted describes a response with status code 202, with default header values. - -No Content -*/ -type UpdateAppInstanceStateAccepted struct { -} - -// IsSuccess returns true when this update app instance state accepted response has a 2xx status code -func (o *UpdateAppInstanceStateAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update app instance state accepted response has a 3xx status code -func (o *UpdateAppInstanceStateAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app instance state accepted response has a 4xx status code -func (o *UpdateAppInstanceStateAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app instance state accepted response has a 5xx status code -func (o *UpdateAppInstanceStateAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this update app instance state accepted response a status code equal to that given -func (o *UpdateAppInstanceStateAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the update app instance state accepted response -func (o *UpdateAppInstanceStateAccepted) Code() int { - return 202 -} - -func (o *UpdateAppInstanceStateAccepted) Error() string { - return fmt.Sprintf("[PUT /public/appInstances/{appInstanceId}/states][%d] updateAppInstanceStateAccepted", 202) -} - -func (o *UpdateAppInstanceStateAccepted) String() string { - return fmt.Sprintf("[PUT /public/appInstances/{appInstanceId}/states][%d] updateAppInstanceStateAccepted", 202) -} - -func (o *UpdateAppInstanceStateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateAppInstanceStateDefault creates a UpdateAppInstanceStateDefault with default headers values -func NewUpdateAppInstanceStateDefault(code int) *UpdateAppInstanceStateDefault { - return &UpdateAppInstanceStateDefault{ - _statusCode: code, - } -} - -/* -UpdateAppInstanceStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAppInstanceStateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update app instance state default response has a 2xx status code -func (o *UpdateAppInstanceStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update app instance state default response has a 3xx status code -func (o *UpdateAppInstanceStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update app instance state default response has a 4xx status code -func (o *UpdateAppInstanceStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update app instance state default response has a 5xx status code -func (o *UpdateAppInstanceStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update app instance state default response a status code equal to that given -func (o *UpdateAppInstanceStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update app instance state default response -func (o *UpdateAppInstanceStateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAppInstanceStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/appInstances/{appInstanceId}/states][%d] UpdateAppInstanceState default %s", o._statusCode, payload) -} - -func (o *UpdateAppInstanceStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/appInstances/{appInstanceId}/states][%d] UpdateAppInstanceState default %s", o._statusCode, payload) -} - -func (o *UpdateAppInstanceStateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateAppInstanceStateDefault) 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/athena_tokens/athena_tokens_client.go b/v1/client/athena_tokens/athena_tokens_client.go deleted file mode 100644 index b0c5fd40..00000000 --- a/v1/client/athena_tokens/athena_tokens_client.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package athena_tokens - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new athena tokens API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new athena tokens API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new athena tokens API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for athena tokens API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GenerateAthenaToken(params *GenerateAthenaTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateAthenaTokenCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GenerateAthenaToken generates an athena access token - - Before making other REST API requests, your REST client must make a - -'POST /athenaToken' request with a valid Cohesity user and App information. -This POST request returns an access token and type in the response that is -generated by the Cohesity Cluster. Subsequent requests to other Cohesity REST -API operations must specify the token and the type by setting 'AthenaToken' -in the http header in the following format: - -AthenaToken: type token - -The generated token is valid for 24 hours. If a request is made with -an expired token, the 'Token expired' error message is returned. -Add code to your REST client to check for this error and request -another access token before reissuing the request. -*/ -func (a *Client) GenerateAthenaToken(params *GenerateAthenaTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateAthenaTokenCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGenerateAthenaTokenParams() - } - op := &runtime.ClientOperation{ - ID: "GenerateAthenaToken", - Method: "POST", - PathPattern: "/athenaTokens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GenerateAthenaTokenReader{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.(*GenerateAthenaTokenCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GenerateAthenaTokenDefault) - 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/athena_tokens/generate_athena_token_parameters.go b/v1/client/athena_tokens/generate_athena_token_parameters.go deleted file mode 100644 index f721681a..00000000 --- a/v1/client/athena_tokens/generate_athena_token_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package athena_tokens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGenerateAthenaTokenParams creates a new GenerateAthenaTokenParams 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 NewGenerateAthenaTokenParams() *GenerateAthenaTokenParams { - return &GenerateAthenaTokenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGenerateAthenaTokenParamsWithTimeout creates a new GenerateAthenaTokenParams object -// with the ability to set a timeout on a request. -func NewGenerateAthenaTokenParamsWithTimeout(timeout time.Duration) *GenerateAthenaTokenParams { - return &GenerateAthenaTokenParams{ - timeout: timeout, - } -} - -// NewGenerateAthenaTokenParamsWithContext creates a new GenerateAthenaTokenParams object -// with the ability to set a context for a request. -func NewGenerateAthenaTokenParamsWithContext(ctx context.Context) *GenerateAthenaTokenParams { - return &GenerateAthenaTokenParams{ - Context: ctx, - } -} - -// NewGenerateAthenaTokenParamsWithHTTPClient creates a new GenerateAthenaTokenParams object -// with the ability to set a custom HTTPClient for a request. -func NewGenerateAthenaTokenParamsWithHTTPClient(client *http.Client) *GenerateAthenaTokenParams { - return &GenerateAthenaTokenParams{ - HTTPClient: client, - } -} - -/* -GenerateAthenaTokenParams contains all the parameters to send to the API endpoint - - for the generate athena token operation. - - Typically these are written to a http.Request. -*/ -type GenerateAthenaTokenParams struct { - - /* Body. - - Request to generate access token. - */ - Body *models.AthenaTokenParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the generate athena token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateAthenaTokenParams) WithDefaults() *GenerateAthenaTokenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the generate athena token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateAthenaTokenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the generate athena token params -func (o *GenerateAthenaTokenParams) WithTimeout(timeout time.Duration) *GenerateAthenaTokenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the generate athena token params -func (o *GenerateAthenaTokenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the generate athena token params -func (o *GenerateAthenaTokenParams) WithContext(ctx context.Context) *GenerateAthenaTokenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the generate athena token params -func (o *GenerateAthenaTokenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the generate athena token params -func (o *GenerateAthenaTokenParams) WithHTTPClient(client *http.Client) *GenerateAthenaTokenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the generate athena token params -func (o *GenerateAthenaTokenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the generate athena token params -func (o *GenerateAthenaTokenParams) WithBody(body *models.AthenaTokenParameters) *GenerateAthenaTokenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the generate athena token params -func (o *GenerateAthenaTokenParams) SetBody(body *models.AthenaTokenParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GenerateAthenaTokenParams) 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/athena_tokens/generate_athena_token_responses.go b/v1/client/athena_tokens/generate_athena_token_responses.go deleted file mode 100644 index e689ed59..00000000 --- a/v1/client/athena_tokens/generate_athena_token_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package athena_tokens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GenerateAthenaTokenReader is a Reader for the GenerateAthenaToken structure. -type GenerateAthenaTokenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GenerateAthenaTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGenerateAthenaTokenCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGenerateAthenaTokenDefault(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 - } -} - -// NewGenerateAthenaTokenCreated creates a GenerateAthenaTokenCreated with default headers values -func NewGenerateAthenaTokenCreated() *GenerateAthenaTokenCreated { - return &GenerateAthenaTokenCreated{} -} - -/* -GenerateAthenaTokenCreated describes a response with status code 201, with default header values. - -Success -*/ -type GenerateAthenaTokenCreated struct { - Payload *models.AthenaToken -} - -// IsSuccess returns true when this generate athena token created response has a 2xx status code -func (o *GenerateAthenaTokenCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this generate athena token created response has a 3xx status code -func (o *GenerateAthenaTokenCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this generate athena token created response has a 4xx status code -func (o *GenerateAthenaTokenCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this generate athena token created response has a 5xx status code -func (o *GenerateAthenaTokenCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this generate athena token created response a status code equal to that given -func (o *GenerateAthenaTokenCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the generate athena token created response -func (o *GenerateAthenaTokenCreated) Code() int { - return 201 -} - -func (o *GenerateAthenaTokenCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /athenaTokens][%d] generateAthenaTokenCreated %s", 201, payload) -} - -func (o *GenerateAthenaTokenCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /athenaTokens][%d] generateAthenaTokenCreated %s", 201, payload) -} - -func (o *GenerateAthenaTokenCreated) GetPayload() *models.AthenaToken { - return o.Payload -} - -func (o *GenerateAthenaTokenCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AthenaToken) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGenerateAthenaTokenDefault creates a GenerateAthenaTokenDefault with default headers values -func NewGenerateAthenaTokenDefault(code int) *GenerateAthenaTokenDefault { - return &GenerateAthenaTokenDefault{ - _statusCode: code, - } -} - -/* -GenerateAthenaTokenDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GenerateAthenaTokenDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this generate athena token default response has a 2xx status code -func (o *GenerateAthenaTokenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this generate athena token default response has a 3xx status code -func (o *GenerateAthenaTokenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this generate athena token default response has a 4xx status code -func (o *GenerateAthenaTokenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this generate athena token default response has a 5xx status code -func (o *GenerateAthenaTokenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this generate athena token default response a status code equal to that given -func (o *GenerateAthenaTokenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the generate athena token default response -func (o *GenerateAthenaTokenDefault) Code() int { - return o._statusCode -} - -func (o *GenerateAthenaTokenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /athenaTokens][%d] GenerateAthenaToken default %s", o._statusCode, payload) -} - -func (o *GenerateAthenaTokenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /athenaTokens][%d] GenerateAthenaToken default %s", o._statusCode, payload) -} - -func (o *GenerateAthenaTokenDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GenerateAthenaTokenDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/audit/audit_client.go b/v1/client/audit/audit_client.go deleted file mode 100644 index 20caa709..00000000 --- a/v1/client/audit/audit_client.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new audit API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new audit API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new audit API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for audit API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAuditLogsActions(params *GetAuditLogsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsActionsOK, error) - - GetAuditLogsCategories(params *GetAuditLogsCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsCategoriesOK, error) - - SearchClusterAuditLogs(params *SearchClusterAuditLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchClusterAuditLogsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAuditLogsActions returns list of audit log actions - -A string array of all the actions used to filter audit logs. -*/ -func (a *Client) GetAuditLogsActions(params *GetAuditLogsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsActionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAuditLogsActionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAuditLogsActions", - Method: "GET", - PathPattern: "/public/auditLogs/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAuditLogsActionsReader{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.(*GetAuditLogsActionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAuditLogsActionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAuditLogsCategories returns list of audit log categories - -A string array of all the categories used to filter audit logs. -*/ -func (a *Client) GetAuditLogsCategories(params *GetAuditLogsCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsCategoriesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAuditLogsCategoriesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAuditLogsCategories", - Method: "GET", - PathPattern: "/public/auditLogs/categories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAuditLogsCategoriesReader{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.(*GetAuditLogsCategoriesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAuditLogsCategoriesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchClusterAuditLogs lists the cluster audit logs on the cohesity cluster that match the filter criteria specified using parameters - - When actions (such as a login or a Job being paused) occur on the - -Cohesity Cluster, the Cluster generates Audit Logs. -If no parameters are specified, all logs currently on the Cohesity Cluster -are returned. Specifying the parameters filters the results that are returned. -*/ -func (a *Client) SearchClusterAuditLogs(params *SearchClusterAuditLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchClusterAuditLogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchClusterAuditLogsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchClusterAuditLogs", - Method: "GET", - PathPattern: "/public/auditLogs/cluster", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchClusterAuditLogsReader{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.(*SearchClusterAuditLogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchClusterAuditLogsDefault) - 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/audit/get_audit_logs_actions_parameters.go b/v1/client/audit/get_audit_logs_actions_parameters.go deleted file mode 100644 index 014a03f9..00000000 --- a/v1/client/audit/get_audit_logs_actions_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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" -) - -// NewGetAuditLogsActionsParams creates a new GetAuditLogsActionsParams 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 NewGetAuditLogsActionsParams() *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAuditLogsActionsParamsWithTimeout creates a new GetAuditLogsActionsParams object -// with the ability to set a timeout on a request. -func NewGetAuditLogsActionsParamsWithTimeout(timeout time.Duration) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - timeout: timeout, - } -} - -// NewGetAuditLogsActionsParamsWithContext creates a new GetAuditLogsActionsParams object -// with the ability to set a context for a request. -func NewGetAuditLogsActionsParamsWithContext(ctx context.Context) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - Context: ctx, - } -} - -// NewGetAuditLogsActionsParamsWithHTTPClient creates a new GetAuditLogsActionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAuditLogsActionsParamsWithHTTPClient(client *http.Client) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - HTTPClient: client, - } -} - -/* -GetAuditLogsActionsParams contains all the parameters to send to the API endpoint - - for the get audit logs actions operation. - - Typically these are written to a http.Request. -*/ -type GetAuditLogsActionsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get audit logs actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsActionsParams) WithDefaults() *GetAuditLogsActionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get audit logs actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsActionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithTimeout(timeout time.Duration) *GetAuditLogsActionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithContext(ctx context.Context) *GetAuditLogsActionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithHTTPClient(client *http.Client) *GetAuditLogsActionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAuditLogsActionsParams) 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/audit/get_audit_logs_actions_responses.go b/v1/client/audit/get_audit_logs_actions_responses.go deleted file mode 100644 index 039cf724..00000000 --- a/v1/client/audit/get_audit_logs_actions_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAuditLogsActionsReader is a Reader for the GetAuditLogsActions structure. -type GetAuditLogsActionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAuditLogsActionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAuditLogsActionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAuditLogsActionsDefault(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 - } -} - -// NewGetAuditLogsActionsOK creates a GetAuditLogsActionsOK with default headers values -func NewGetAuditLogsActionsOK() *GetAuditLogsActionsOK { - return &GetAuditLogsActionsOK{} -} - -/* -GetAuditLogsActionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAuditLogsActionsOK struct { - Payload []string -} - -// IsSuccess returns true when this get audit logs actions o k response has a 2xx status code -func (o *GetAuditLogsActionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get audit logs actions o k response has a 3xx status code -func (o *GetAuditLogsActionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get audit logs actions o k response has a 4xx status code -func (o *GetAuditLogsActionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get audit logs actions o k response has a 5xx status code -func (o *GetAuditLogsActionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get audit logs actions o k response a status code equal to that given -func (o *GetAuditLogsActionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get audit logs actions o k response -func (o *GetAuditLogsActionsOK) Code() int { - return 200 -} - -func (o *GetAuditLogsActionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/actions][%d] getAuditLogsActionsOK %s", 200, payload) -} - -func (o *GetAuditLogsActionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/actions][%d] getAuditLogsActionsOK %s", 200, payload) -} - -func (o *GetAuditLogsActionsOK) GetPayload() []string { - return o.Payload -} - -func (o *GetAuditLogsActionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAuditLogsActionsDefault creates a GetAuditLogsActionsDefault with default headers values -func NewGetAuditLogsActionsDefault(code int) *GetAuditLogsActionsDefault { - return &GetAuditLogsActionsDefault{ - _statusCode: code, - } -} - -/* -GetAuditLogsActionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAuditLogsActionsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get audit logs actions default response has a 2xx status code -func (o *GetAuditLogsActionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get audit logs actions default response has a 3xx status code -func (o *GetAuditLogsActionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get audit logs actions default response has a 4xx status code -func (o *GetAuditLogsActionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get audit logs actions default response has a 5xx status code -func (o *GetAuditLogsActionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get audit logs actions default response a status code equal to that given -func (o *GetAuditLogsActionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get audit logs actions default response -func (o *GetAuditLogsActionsDefault) Code() int { - return o._statusCode -} - -func (o *GetAuditLogsActionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/actions][%d] GetAuditLogsActions default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsActionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/actions][%d] GetAuditLogsActions default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsActionsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAuditLogsActionsDefault) 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/audit/get_audit_logs_categories_parameters.go b/v1/client/audit/get_audit_logs_categories_parameters.go deleted file mode 100644 index 73075b53..00000000 --- a/v1/client/audit/get_audit_logs_categories_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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" -) - -// NewGetAuditLogsCategoriesParams creates a new GetAuditLogsCategoriesParams 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 NewGetAuditLogsCategoriesParams() *GetAuditLogsCategoriesParams { - return &GetAuditLogsCategoriesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAuditLogsCategoriesParamsWithTimeout creates a new GetAuditLogsCategoriesParams object -// with the ability to set a timeout on a request. -func NewGetAuditLogsCategoriesParamsWithTimeout(timeout time.Duration) *GetAuditLogsCategoriesParams { - return &GetAuditLogsCategoriesParams{ - timeout: timeout, - } -} - -// NewGetAuditLogsCategoriesParamsWithContext creates a new GetAuditLogsCategoriesParams object -// with the ability to set a context for a request. -func NewGetAuditLogsCategoriesParamsWithContext(ctx context.Context) *GetAuditLogsCategoriesParams { - return &GetAuditLogsCategoriesParams{ - Context: ctx, - } -} - -// NewGetAuditLogsCategoriesParamsWithHTTPClient creates a new GetAuditLogsCategoriesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAuditLogsCategoriesParamsWithHTTPClient(client *http.Client) *GetAuditLogsCategoriesParams { - return &GetAuditLogsCategoriesParams{ - HTTPClient: client, - } -} - -/* -GetAuditLogsCategoriesParams contains all the parameters to send to the API endpoint - - for the get audit logs categories operation. - - Typically these are written to a http.Request. -*/ -type GetAuditLogsCategoriesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get audit logs categories params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsCategoriesParams) WithDefaults() *GetAuditLogsCategoriesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get audit logs categories params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsCategoriesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) WithTimeout(timeout time.Duration) *GetAuditLogsCategoriesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) WithContext(ctx context.Context) *GetAuditLogsCategoriesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) WithHTTPClient(client *http.Client) *GetAuditLogsCategoriesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get audit logs categories params -func (o *GetAuditLogsCategoriesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAuditLogsCategoriesParams) 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/audit/get_audit_logs_categories_responses.go b/v1/client/audit/get_audit_logs_categories_responses.go deleted file mode 100644 index 936a9b8f..00000000 --- a/v1/client/audit/get_audit_logs_categories_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAuditLogsCategoriesReader is a Reader for the GetAuditLogsCategories structure. -type GetAuditLogsCategoriesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAuditLogsCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAuditLogsCategoriesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAuditLogsCategoriesDefault(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 - } -} - -// NewGetAuditLogsCategoriesOK creates a GetAuditLogsCategoriesOK with default headers values -func NewGetAuditLogsCategoriesOK() *GetAuditLogsCategoriesOK { - return &GetAuditLogsCategoriesOK{} -} - -/* -GetAuditLogsCategoriesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAuditLogsCategoriesOK struct { - Payload []string -} - -// IsSuccess returns true when this get audit logs categories o k response has a 2xx status code -func (o *GetAuditLogsCategoriesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get audit logs categories o k response has a 3xx status code -func (o *GetAuditLogsCategoriesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get audit logs categories o k response has a 4xx status code -func (o *GetAuditLogsCategoriesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get audit logs categories o k response has a 5xx status code -func (o *GetAuditLogsCategoriesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get audit logs categories o k response a status code equal to that given -func (o *GetAuditLogsCategoriesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get audit logs categories o k response -func (o *GetAuditLogsCategoriesOK) Code() int { - return 200 -} - -func (o *GetAuditLogsCategoriesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/categories][%d] getAuditLogsCategoriesOK %s", 200, payload) -} - -func (o *GetAuditLogsCategoriesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/categories][%d] getAuditLogsCategoriesOK %s", 200, payload) -} - -func (o *GetAuditLogsCategoriesOK) GetPayload() []string { - return o.Payload -} - -func (o *GetAuditLogsCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAuditLogsCategoriesDefault creates a GetAuditLogsCategoriesDefault with default headers values -func NewGetAuditLogsCategoriesDefault(code int) *GetAuditLogsCategoriesDefault { - return &GetAuditLogsCategoriesDefault{ - _statusCode: code, - } -} - -/* -GetAuditLogsCategoriesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAuditLogsCategoriesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get audit logs categories default response has a 2xx status code -func (o *GetAuditLogsCategoriesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get audit logs categories default response has a 3xx status code -func (o *GetAuditLogsCategoriesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get audit logs categories default response has a 4xx status code -func (o *GetAuditLogsCategoriesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get audit logs categories default response has a 5xx status code -func (o *GetAuditLogsCategoriesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get audit logs categories default response a status code equal to that given -func (o *GetAuditLogsCategoriesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get audit logs categories default response -func (o *GetAuditLogsCategoriesDefault) Code() int { - return o._statusCode -} - -func (o *GetAuditLogsCategoriesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/categories][%d] GetAuditLogsCategories default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsCategoriesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/categories][%d] GetAuditLogsCategories default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsCategoriesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAuditLogsCategoriesDefault) 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/audit/search_cluster_audit_logs_parameters.go b/v1/client/audit/search_cluster_audit_logs_parameters.go deleted file mode 100644 index f5c5a3f0..00000000 --- a/v1/client/audit/search_cluster_audit_logs_parameters.go +++ /dev/null @@ -1,615 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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/go-openapi/swag" -) - -// NewSearchClusterAuditLogsParams creates a new SearchClusterAuditLogsParams 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 NewSearchClusterAuditLogsParams() *SearchClusterAuditLogsParams { - return &SearchClusterAuditLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchClusterAuditLogsParamsWithTimeout creates a new SearchClusterAuditLogsParams object -// with the ability to set a timeout on a request. -func NewSearchClusterAuditLogsParamsWithTimeout(timeout time.Duration) *SearchClusterAuditLogsParams { - return &SearchClusterAuditLogsParams{ - timeout: timeout, - } -} - -// NewSearchClusterAuditLogsParamsWithContext creates a new SearchClusterAuditLogsParams object -// with the ability to set a context for a request. -func NewSearchClusterAuditLogsParamsWithContext(ctx context.Context) *SearchClusterAuditLogsParams { - return &SearchClusterAuditLogsParams{ - Context: ctx, - } -} - -// NewSearchClusterAuditLogsParamsWithHTTPClient creates a new SearchClusterAuditLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchClusterAuditLogsParamsWithHTTPClient(client *http.Client) *SearchClusterAuditLogsParams { - return &SearchClusterAuditLogsParams{ - HTTPClient: client, - } -} - -/* -SearchClusterAuditLogsParams contains all the parameters to send to the API endpoint - - for the search cluster audit logs operation. - - Typically these are written to a http.Request. -*/ -type SearchClusterAuditLogsParams struct { - - /* Actions. - - Filter by the actions that generate Cluster audit logs such as - Activate, Cancel, Clone, Create, etc. For a complete list, see the - Actions drop-down in the Admin > Audit Logs page of the Cohesity - Dashboard. - */ - Actions []string - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* Domains. - - Filter by domains of users who cause the actions that trigger - Cluster audit logs. - */ - Domains []string - - /* EndTimeUsecs. - - Filter by a end time specified as a Unix epoch Timestamp - (in microseconds). Only Cluster audit logs that were generated before the - specified end time are returned. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* EntityTypes. - - Filter by entity types involved in the actions that generate the - Cluster audit logs, such as User, Protection Job, View, etc. - For a complete list, see the Category drop-down in the Admin > Audit Logs - page of the Cohesity Dashboard. - */ - EntityTypes []string - - /* OutputFormat. - - Specifies the format of the output such as csv and json. - If not specified, the json format is returned. If csv is specified, - a comma-separated list with a heading row is returned. - */ - OutputFormat *string - - /* PageCount. - - Limit the number of items to return in the response for pagination - purposes. Default value is 1000. - - Format: int64 - */ - PageCount *int64 - - /* Search. - - Filter by matching a substring in entity name or details of the - Cluster audit log. - */ - Search *string - - /* StartIndex. - - Specifies an index number that can be used to return subsets of items - in multiple requests. - Break up the items to return into multiple requests by setting pageCount - and startIndex to return a subsets of items in the search result. - For example, set startIndex to 0 to get the first set of pageCount items - for the first request. Increment startIndex by pageCount - to get the next set of pageCount items for a next request. - Continue until all items are returned and therefore the total number of - returned items is equal to totalCount. Default value is 0. - - Format: int64 - */ - StartIndex *int64 - - /* StartTimeUsecs. - - Filter by a start time. Only Cluster audit logs that were generated after - the specified time are returned. - Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* UserNames. - - Filter by user names who cause the actions that generate Cluster Audit - Logs. - */ - UserNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search cluster audit logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchClusterAuditLogsParams) WithDefaults() *SearchClusterAuditLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search cluster audit logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchClusterAuditLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithTimeout(timeout time.Duration) *SearchClusterAuditLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithContext(ctx context.Context) *SearchClusterAuditLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithHTTPClient(client *http.Client) *SearchClusterAuditLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithActions adds the actions to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithActions(actions []string) *SearchClusterAuditLogsParams { - o.SetActions(actions) - return o -} - -// SetActions adds the actions to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetActions(actions []string) { - o.Actions = actions -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *SearchClusterAuditLogsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomains adds the domains to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithDomains(domains []string) *SearchClusterAuditLogsParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithEndTimeUsecs adds the endTimeUsecs to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithEndTimeUsecs(endTimeUsecs *int64) *SearchClusterAuditLogsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEntityTypes adds the entityTypes to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithEntityTypes(entityTypes []string) *SearchClusterAuditLogsParams { - o.SetEntityTypes(entityTypes) - return o -} - -// SetEntityTypes adds the entityTypes to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetEntityTypes(entityTypes []string) { - o.EntityTypes = entityTypes -} - -// WithOutputFormat adds the outputFormat to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithOutputFormat(outputFormat *string) *SearchClusterAuditLogsParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithPageCount adds the pageCount to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithPageCount(pageCount *int64) *SearchClusterAuditLogsParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithSearch adds the search to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithSearch(search *string) *SearchClusterAuditLogsParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetSearch(search *string) { - o.Search = search -} - -// WithStartIndex adds the startIndex to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithStartIndex(startIndex *int64) *SearchClusterAuditLogsParams { - o.SetStartIndex(startIndex) - return o -} - -// SetStartIndex adds the startIndex to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetStartIndex(startIndex *int64) { - o.StartIndex = startIndex -} - -// WithStartTimeUsecs adds the startTimeUsecs to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithStartTimeUsecs(startTimeUsecs *int64) *SearchClusterAuditLogsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantID adds the tenantID to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithTenantID(tenantID *string) *SearchClusterAuditLogsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithUserNames adds the userNames to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) WithUserNames(userNames []string) *SearchClusterAuditLogsParams { - o.SetUserNames(userNames) - return o -} - -// SetUserNames adds the userNames to the search cluster audit logs params -func (o *SearchClusterAuditLogsParams) SetUserNames(userNames []string) { - o.UserNames = userNames -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchClusterAuditLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Actions != nil { - - // binding items for actions - joinedActions := o.bindParamActions(reg) - - // query array param actions - if err := r.SetQueryParam("actions", joinedActions...); err != nil { - return err - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.EntityTypes != nil { - - // binding items for entityTypes - joinedEntityTypes := o.bindParamEntityTypes(reg) - - // query array param entityTypes - if err := r.SetQueryParam("entityTypes", joinedEntityTypes...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.StartIndex != nil { - - // query param startIndex - var qrStartIndex int64 - - if o.StartIndex != nil { - qrStartIndex = *o.StartIndex - } - qStartIndex := swag.FormatInt64(qrStartIndex) - if qStartIndex != "" { - - if err := r.SetQueryParam("startIndex", qStartIndex); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.UserNames != nil { - - // binding items for userNames - joinedUserNames := o.bindParamUserNames(reg) - - // query array param userNames - if err := r.SetQueryParam("userNames", joinedUserNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchClusterAuditLogs binds the parameter actions -func (o *SearchClusterAuditLogsParams) bindParamActions(formats strfmt.Registry) []string { - actionsIR := o.Actions - - var actionsIC []string - for _, actionsIIR := range actionsIR { // explode []string - - actionsIIV := actionsIIR // string as string - actionsIC = append(actionsIC, actionsIIV) - } - - // items.CollectionFormat: "" - actionsIS := swag.JoinByFormat(actionsIC, "") - - return actionsIS -} - -// bindParamSearchClusterAuditLogs binds the parameter domains -func (o *SearchClusterAuditLogsParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamSearchClusterAuditLogs binds the parameter entityTypes -func (o *SearchClusterAuditLogsParams) bindParamEntityTypes(formats strfmt.Registry) []string { - entityTypesIR := o.EntityTypes - - var entityTypesIC []string - for _, entityTypesIIR := range entityTypesIR { // explode []string - - entityTypesIIV := entityTypesIIR // string as string - entityTypesIC = append(entityTypesIC, entityTypesIIV) - } - - // items.CollectionFormat: "" - entityTypesIS := swag.JoinByFormat(entityTypesIC, "") - - return entityTypesIS -} - -// bindParamSearchClusterAuditLogs binds the parameter userNames -func (o *SearchClusterAuditLogsParams) bindParamUserNames(formats strfmt.Registry) []string { - userNamesIR := o.UserNames - - var userNamesIC []string - for _, userNamesIIR := range userNamesIR { // explode []string - - userNamesIIV := userNamesIIR // string as string - userNamesIC = append(userNamesIC, userNamesIIV) - } - - // items.CollectionFormat: "" - userNamesIS := swag.JoinByFormat(userNamesIC, "") - - return userNamesIS -} diff --git a/v1/client/audit/search_cluster_audit_logs_responses.go b/v1/client/audit/search_cluster_audit_logs_responses.go deleted file mode 100644 index 017f9a3a..00000000 --- a/v1/client/audit/search_cluster_audit_logs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchClusterAuditLogsReader is a Reader for the SearchClusterAuditLogs structure. -type SearchClusterAuditLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchClusterAuditLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchClusterAuditLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchClusterAuditLogsDefault(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 - } -} - -// NewSearchClusterAuditLogsOK creates a SearchClusterAuditLogsOK with default headers values -func NewSearchClusterAuditLogsOK() *SearchClusterAuditLogsOK { - return &SearchClusterAuditLogsOK{} -} - -/* -SearchClusterAuditLogsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchClusterAuditLogsOK struct { - Payload *models.ClusterAuditLogsSearchResult -} - -// IsSuccess returns true when this search cluster audit logs o k response has a 2xx status code -func (o *SearchClusterAuditLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search cluster audit logs o k response has a 3xx status code -func (o *SearchClusterAuditLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search cluster audit logs o k response has a 4xx status code -func (o *SearchClusterAuditLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search cluster audit logs o k response has a 5xx status code -func (o *SearchClusterAuditLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search cluster audit logs o k response a status code equal to that given -func (o *SearchClusterAuditLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search cluster audit logs o k response -func (o *SearchClusterAuditLogsOK) Code() int { - return 200 -} - -func (o *SearchClusterAuditLogsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/cluster][%d] searchClusterAuditLogsOK %s", 200, payload) -} - -func (o *SearchClusterAuditLogsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/cluster][%d] searchClusterAuditLogsOK %s", 200, payload) -} - -func (o *SearchClusterAuditLogsOK) GetPayload() *models.ClusterAuditLogsSearchResult { - return o.Payload -} - -func (o *SearchClusterAuditLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterAuditLogsSearchResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchClusterAuditLogsDefault creates a SearchClusterAuditLogsDefault with default headers values -func NewSearchClusterAuditLogsDefault(code int) *SearchClusterAuditLogsDefault { - return &SearchClusterAuditLogsDefault{ - _statusCode: code, - } -} - -/* -SearchClusterAuditLogsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchClusterAuditLogsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search cluster audit logs default response has a 2xx status code -func (o *SearchClusterAuditLogsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search cluster audit logs default response has a 3xx status code -func (o *SearchClusterAuditLogsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search cluster audit logs default response has a 4xx status code -func (o *SearchClusterAuditLogsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search cluster audit logs default response has a 5xx status code -func (o *SearchClusterAuditLogsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search cluster audit logs default response a status code equal to that given -func (o *SearchClusterAuditLogsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search cluster audit logs default response -func (o *SearchClusterAuditLogsDefault) Code() int { - return o._statusCode -} - -func (o *SearchClusterAuditLogsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/cluster][%d] SearchClusterAuditLogs default %s", o._statusCode, payload) -} - -func (o *SearchClusterAuditLogsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/auditLogs/cluster][%d] SearchClusterAuditLogs default %s", o._statusCode, payload) -} - -func (o *SearchClusterAuditLogsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchClusterAuditLogsDefault) 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/backup_jobs/activate_backup_job_parameters.go b/v1/client/backup_jobs/activate_backup_job_parameters.go deleted file mode 100644 index fc383744..00000000 --- a/v1/client/backup_jobs/activate_backup_job_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewActivateBackupJobParams creates a new ActivateBackupJobParams 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 NewActivateBackupJobParams() *ActivateBackupJobParams { - return &ActivateBackupJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewActivateBackupJobParamsWithTimeout creates a new ActivateBackupJobParams object -// with the ability to set a timeout on a request. -func NewActivateBackupJobParamsWithTimeout(timeout time.Duration) *ActivateBackupJobParams { - return &ActivateBackupJobParams{ - timeout: timeout, - } -} - -// NewActivateBackupJobParamsWithContext creates a new ActivateBackupJobParams object -// with the ability to set a context for a request. -func NewActivateBackupJobParamsWithContext(ctx context.Context) *ActivateBackupJobParams { - return &ActivateBackupJobParams{ - Context: ctx, - } -} - -// NewActivateBackupJobParamsWithHTTPClient creates a new ActivateBackupJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewActivateBackupJobParamsWithHTTPClient(client *http.Client) *ActivateBackupJobParams { - return &ActivateBackupJobParams{ - HTTPClient: client, - } -} - -/* -ActivateBackupJobParams contains all the parameters to send to the API endpoint - - for the activate backup job operation. - - Typically these are written to a http.Request. -*/ -type ActivateBackupJobParams struct { - - // Body. - Body *models.ChangeBackupJobActivationParam - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the activate backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ActivateBackupJobParams) WithDefaults() *ActivateBackupJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the activate backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ActivateBackupJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the activate backup job params -func (o *ActivateBackupJobParams) WithTimeout(timeout time.Duration) *ActivateBackupJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the activate backup job params -func (o *ActivateBackupJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the activate backup job params -func (o *ActivateBackupJobParams) WithContext(ctx context.Context) *ActivateBackupJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the activate backup job params -func (o *ActivateBackupJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the activate backup job params -func (o *ActivateBackupJobParams) WithHTTPClient(client *http.Client) *ActivateBackupJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the activate backup job params -func (o *ActivateBackupJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the activate backup job params -func (o *ActivateBackupJobParams) WithBody(body *models.ChangeBackupJobActivationParam) *ActivateBackupJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the activate backup job params -func (o *ActivateBackupJobParams) SetBody(body *models.ChangeBackupJobActivationParam) { - o.Body = body -} - -// WithID adds the id to the activate backup job params -func (o *ActivateBackupJobParams) WithID(id int64) *ActivateBackupJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the activate backup job params -func (o *ActivateBackupJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ActivateBackupJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/activate_backup_job_responses.go b/v1/client/backup_jobs/activate_backup_job_responses.go deleted file mode 100644 index 92c47ac1..00000000 --- a/v1/client/backup_jobs/activate_backup_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ActivateBackupJobReader is a Reader for the ActivateBackupJob structure. -type ActivateBackupJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ActivateBackupJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewActivateBackupJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewActivateBackupJobDefault(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 - } -} - -// NewActivateBackupJobOK creates a ActivateBackupJobOK with default headers values -func NewActivateBackupJobOK() *ActivateBackupJobOK { - return &ActivateBackupJobOK{} -} - -/* -ActivateBackupJobOK describes a response with status code 200, with default header values. - -Success -*/ -type ActivateBackupJobOK struct { - Payload *models.BackupJobWrapper -} - -// IsSuccess returns true when this activate backup job o k response has a 2xx status code -func (o *ActivateBackupJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this activate backup job o k response has a 3xx status code -func (o *ActivateBackupJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this activate backup job o k response has a 4xx status code -func (o *ActivateBackupJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this activate backup job o k response has a 5xx status code -func (o *ActivateBackupJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this activate backup job o k response a status code equal to that given -func (o *ActivateBackupJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the activate backup job o k response -func (o *ActivateBackupJobOK) Code() int { - return 200 -} - -func (o *ActivateBackupJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /activateBackupJob/{id}][%d] activateBackupJobOK %s", 200, payload) -} - -func (o *ActivateBackupJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /activateBackupJob/{id}][%d] activateBackupJobOK %s", 200, payload) -} - -func (o *ActivateBackupJobOK) GetPayload() *models.BackupJobWrapper { - return o.Payload -} - -func (o *ActivateBackupJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupJobWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewActivateBackupJobDefault creates a ActivateBackupJobDefault with default headers values -func NewActivateBackupJobDefault(code int) *ActivateBackupJobDefault { - return &ActivateBackupJobDefault{ - _statusCode: code, - } -} - -/* -ActivateBackupJobDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ActivateBackupJobDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this activate backup job default response has a 2xx status code -func (o *ActivateBackupJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this activate backup job default response has a 3xx status code -func (o *ActivateBackupJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this activate backup job default response has a 4xx status code -func (o *ActivateBackupJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this activate backup job default response has a 5xx status code -func (o *ActivateBackupJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this activate backup job default response a status code equal to that given -func (o *ActivateBackupJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the activate backup job default response -func (o *ActivateBackupJobDefault) Code() int { - return o._statusCode -} - -func (o *ActivateBackupJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /activateBackupJob/{id}][%d] ActivateBackupJob default %s", o._statusCode, payload) -} - -func (o *ActivateBackupJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /activateBackupJob/{id}][%d] ActivateBackupJob default %s", o._statusCode, payload) -} - -func (o *ActivateBackupJobDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ActivateBackupJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/backup_jobs_client.go b/v1/client/backup_jobs/backup_jobs_client.go deleted file mode 100644 index a7cd9de0..00000000 --- a/v1/client/backup_jobs/backup_jobs_client.go +++ /dev/null @@ -1,570 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new backup jobs API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new backup jobs API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new backup jobs API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for backup jobs API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ActivateBackupJob(params *ActivateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivateBackupJobOK, error) - - CreateBackupJob(params *CreateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBackupJobCreated, error) - - DeactivateBackupJob(params *DeactivateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeactivateBackupJobOK, error) - - DeleteBackupJob(params *DeleteBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupJobOK, error) - - DeleteBackupJobRuns(params *DeleteBackupJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupJobRunsOK, error) - - GetBackupJobAudit(params *GetBackupJobAuditParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobAuditOK, error) - - GetBackupJobByID(params *GetBackupJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobByIDOK, error) - - GetBackupJobHistory(params *GetBackupJobHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobHistoryOK, error) - - GetBackupJobRuns(params *GetBackupJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobRunsOK, error) - - GetBackupJobs(params *GetBackupJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobsOK, error) - - GetBackupJobsSummary(params *GetBackupJobsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobsSummaryOK, error) - - UpdateBackupJob(params *UpdateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackupJobOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ActivateBackupJob activates a backup job - -This is used for failback. -*/ -func (a *Client) ActivateBackupJob(params *ActivateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivateBackupJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewActivateBackupJobParams() - } - op := &runtime.ClientOperation{ - ID: "ActivateBackupJob", - Method: "POST", - PathPattern: "/activateBackupJob/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ActivateBackupJobReader{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.(*ActivateBackupJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ActivateBackupJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateBackupJob creates a backup job - -Returns the created backup job. -*/ -func (a *Client) CreateBackupJob(params *CreateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBackupJobCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateBackupJobParams() - } - op := &runtime.ClientOperation{ - ID: "CreateBackupJob", - Method: "POST", - PathPattern: "/backupjobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateBackupJobReader{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.(*CreateBackupJobCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateBackupJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeactivateBackupJob deactivates a backup job - -Deactivate a backup job. This is used for failover on a remote cluster. -*/ -func (a *Client) DeactivateBackupJob(params *DeactivateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeactivateBackupJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeactivateBackupJobParams() - } - op := &runtime.ClientOperation{ - ID: "DeactivateBackupJob", - Method: "POST", - PathPattern: "/deactivateBackupJob/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeactivateBackupJobReader{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.(*DeactivateBackupJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeactivateBackupJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteBackupJob deletes a backup job - -Return success if the backup job is deleted. -*/ -func (a *Client) DeleteBackupJob(params *DeleteBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteBackupJobParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteBackupJob", - Method: "DELETE", - PathPattern: "/backupjobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteBackupJobReader{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.(*DeleteBackupJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteBackupJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteBackupJobRuns deletes backup job runs - -Returns success if the backup job runs are deleted. -*/ -func (a *Client) DeleteBackupJobRuns(params *DeleteBackupJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupJobRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteBackupJobRunsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteBackupJobRuns", - Method: "DELETE", - PathPattern: "/backupjobruns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteBackupJobRunsReader{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.(*DeleteBackupJobRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteBackupJobRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupJobAudit lists a backup job audit - -Returns the audit of specific backup job history. -*/ -func (a *Client) GetBackupJobAudit(params *GetBackupJobAuditParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobAuditOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobAuditParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobAudit", - Method: "GET", - PathPattern: "/backupjobaudit/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobAuditReader{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.(*GetBackupJobAuditOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobAuditDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupJobByID lists details about single backup job - -Return the Backup Job corresponding to the specified id. -*/ -func (a *Client) GetBackupJobByID(params *GetBackupJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobById", - Method: "GET", - PathPattern: "/backupjobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobByIDReader{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.(*GetBackupJobByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupJobHistory lists a backup job history - -Returns the history of specific backup job history. -*/ -func (a *Client) GetBackupJobHistory(params *GetBackupJobHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobHistoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobHistoryParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobHistory", - Method: "GET", - PathPattern: "/backupjobhistory/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobHistoryReader{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.(*GetBackupJobHistoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobHistoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupJobRuns lists the backup job runs - -Returns the list of backup job returns. -*/ -func (a *Client) GetBackupJobRuns(params *GetBackupJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobRuns", - Method: "GET", - PathPattern: "/backupjobruns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobRunsReader{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.(*GetBackupJobRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetBackupJobs lists backup jobs filtered by the specifed parameters - - If no parameters are specified, all Backup Jobs currently - -on the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetBackupJobs(params *GetBackupJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobsParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobs", - Method: "GET", - PathPattern: "/backupjobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobsReader{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.(*GetBackupJobsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupJobsSummary lists backup jobs summary according to specified summary - -Returns the backup jobs summary filtered by the mentioned criteria. -*/ -func (a *Client) GetBackupJobsSummary(params *GetBackupJobsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupJobsSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupJobsSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupJobsSummary", - Method: "GET", - PathPattern: "/backupjobssummary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupJobsSummaryReader{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.(*GetBackupJobsSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupJobsSummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateBackupJob updates a backup job - -Returns the updated backup job. -*/ -func (a *Client) UpdateBackupJob(params *UpdateBackupJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackupJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateBackupJobParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateBackupJob", - Method: "PUT", - PathPattern: "/backupjobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateBackupJobReader{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.(*UpdateBackupJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateBackupJobDefault) - 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/backup_jobs/create_backup_job_parameters.go b/v1/client/backup_jobs/create_backup_job_parameters.go deleted file mode 100644 index 369dfba0..00000000 --- a/v1/client/backup_jobs/create_backup_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateBackupJobParams creates a new CreateBackupJobParams 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 NewCreateBackupJobParams() *CreateBackupJobParams { - return &CreateBackupJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateBackupJobParamsWithTimeout creates a new CreateBackupJobParams object -// with the ability to set a timeout on a request. -func NewCreateBackupJobParamsWithTimeout(timeout time.Duration) *CreateBackupJobParams { - return &CreateBackupJobParams{ - timeout: timeout, - } -} - -// NewCreateBackupJobParamsWithContext creates a new CreateBackupJobParams object -// with the ability to set a context for a request. -func NewCreateBackupJobParamsWithContext(ctx context.Context) *CreateBackupJobParams { - return &CreateBackupJobParams{ - Context: ctx, - } -} - -// NewCreateBackupJobParamsWithHTTPClient creates a new CreateBackupJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateBackupJobParamsWithHTTPClient(client *http.Client) *CreateBackupJobParams { - return &CreateBackupJobParams{ - HTTPClient: client, - } -} - -/* -CreateBackupJobParams contains all the parameters to send to the API endpoint - - for the create backup job operation. - - Typically these are written to a http.Request. -*/ -type CreateBackupJobParams struct { - - /* Body. - - Request to create a backup job - */ - Body *models.CreateBackupJobArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBackupJobParams) WithDefaults() *CreateBackupJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBackupJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create backup job params -func (o *CreateBackupJobParams) WithTimeout(timeout time.Duration) *CreateBackupJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create backup job params -func (o *CreateBackupJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create backup job params -func (o *CreateBackupJobParams) WithContext(ctx context.Context) *CreateBackupJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create backup job params -func (o *CreateBackupJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create backup job params -func (o *CreateBackupJobParams) WithHTTPClient(client *http.Client) *CreateBackupJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create backup job params -func (o *CreateBackupJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create backup job params -func (o *CreateBackupJobParams) WithBody(body *models.CreateBackupJobArg) *CreateBackupJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create backup job params -func (o *CreateBackupJobParams) SetBody(body *models.CreateBackupJobArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateBackupJobParams) 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/backup_jobs/create_backup_job_responses.go b/v1/client/backup_jobs/create_backup_job_responses.go deleted file mode 100644 index 41c4f611..00000000 --- a/v1/client/backup_jobs/create_backup_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateBackupJobReader is a Reader for the CreateBackupJob structure. -type CreateBackupJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateBackupJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateBackupJobCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateBackupJobDefault(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 - } -} - -// NewCreateBackupJobCreated creates a CreateBackupJobCreated with default headers values -func NewCreateBackupJobCreated() *CreateBackupJobCreated { - return &CreateBackupJobCreated{} -} - -/* -CreateBackupJobCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateBackupJobCreated struct { - Payload *models.BackupJobWrapper -} - -// IsSuccess returns true when this create backup job created response has a 2xx status code -func (o *CreateBackupJobCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create backup job created response has a 3xx status code -func (o *CreateBackupJobCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create backup job created response has a 4xx status code -func (o *CreateBackupJobCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create backup job created response has a 5xx status code -func (o *CreateBackupJobCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create backup job created response a status code equal to that given -func (o *CreateBackupJobCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create backup job created response -func (o *CreateBackupJobCreated) Code() int { - return 201 -} - -func (o *CreateBackupJobCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupjobs][%d] createBackupJobCreated %s", 201, payload) -} - -func (o *CreateBackupJobCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupjobs][%d] createBackupJobCreated %s", 201, payload) -} - -func (o *CreateBackupJobCreated) GetPayload() *models.BackupJobWrapper { - return o.Payload -} - -func (o *CreateBackupJobCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupJobWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateBackupJobDefault creates a CreateBackupJobDefault with default headers values -func NewCreateBackupJobDefault(code int) *CreateBackupJobDefault { - return &CreateBackupJobDefault{ - _statusCode: code, - } -} - -/* -CreateBackupJobDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type CreateBackupJobDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this create backup job default response has a 2xx status code -func (o *CreateBackupJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create backup job default response has a 3xx status code -func (o *CreateBackupJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create backup job default response has a 4xx status code -func (o *CreateBackupJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create backup job default response has a 5xx status code -func (o *CreateBackupJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create backup job default response a status code equal to that given -func (o *CreateBackupJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create backup job default response -func (o *CreateBackupJobDefault) Code() int { - return o._statusCode -} - -func (o *CreateBackupJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupjobs][%d] CreateBackupJob default %s", o._statusCode, payload) -} - -func (o *CreateBackupJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupjobs][%d] CreateBackupJob default %s", o._statusCode, payload) -} - -func (o *CreateBackupJobDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *CreateBackupJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/deactivate_backup_job_parameters.go b/v1/client/backup_jobs/deactivate_backup_job_parameters.go deleted file mode 100644 index bd9975e1..00000000 --- a/v1/client/backup_jobs/deactivate_backup_job_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeactivateBackupJobParams creates a new DeactivateBackupJobParams 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 NewDeactivateBackupJobParams() *DeactivateBackupJobParams { - return &DeactivateBackupJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeactivateBackupJobParamsWithTimeout creates a new DeactivateBackupJobParams object -// with the ability to set a timeout on a request. -func NewDeactivateBackupJobParamsWithTimeout(timeout time.Duration) *DeactivateBackupJobParams { - return &DeactivateBackupJobParams{ - timeout: timeout, - } -} - -// NewDeactivateBackupJobParamsWithContext creates a new DeactivateBackupJobParams object -// with the ability to set a context for a request. -func NewDeactivateBackupJobParamsWithContext(ctx context.Context) *DeactivateBackupJobParams { - return &DeactivateBackupJobParams{ - Context: ctx, - } -} - -// NewDeactivateBackupJobParamsWithHTTPClient creates a new DeactivateBackupJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeactivateBackupJobParamsWithHTTPClient(client *http.Client) *DeactivateBackupJobParams { - return &DeactivateBackupJobParams{ - HTTPClient: client, - } -} - -/* -DeactivateBackupJobParams contains all the parameters to send to the API endpoint - - for the deactivate backup job operation. - - Typically these are written to a http.Request. -*/ -type DeactivateBackupJobParams struct { - - // Body. - Body *models.ChangeBackupJobActivationParam - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the deactivate backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeactivateBackupJobParams) WithDefaults() *DeactivateBackupJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the deactivate backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeactivateBackupJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the deactivate backup job params -func (o *DeactivateBackupJobParams) WithTimeout(timeout time.Duration) *DeactivateBackupJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the deactivate backup job params -func (o *DeactivateBackupJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the deactivate backup job params -func (o *DeactivateBackupJobParams) WithContext(ctx context.Context) *DeactivateBackupJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the deactivate backup job params -func (o *DeactivateBackupJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the deactivate backup job params -func (o *DeactivateBackupJobParams) WithHTTPClient(client *http.Client) *DeactivateBackupJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the deactivate backup job params -func (o *DeactivateBackupJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the deactivate backup job params -func (o *DeactivateBackupJobParams) WithBody(body *models.ChangeBackupJobActivationParam) *DeactivateBackupJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the deactivate backup job params -func (o *DeactivateBackupJobParams) SetBody(body *models.ChangeBackupJobActivationParam) { - o.Body = body -} - -// WithID adds the id to the deactivate backup job params -func (o *DeactivateBackupJobParams) WithID(id int64) *DeactivateBackupJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the deactivate backup job params -func (o *DeactivateBackupJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeactivateBackupJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/deactivate_backup_job_responses.go b/v1/client/backup_jobs/deactivate_backup_job_responses.go deleted file mode 100644 index 1bc8ec11..00000000 --- a/v1/client/backup_jobs/deactivate_backup_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeactivateBackupJobReader is a Reader for the DeactivateBackupJob structure. -type DeactivateBackupJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeactivateBackupJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeactivateBackupJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeactivateBackupJobDefault(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 - } -} - -// NewDeactivateBackupJobOK creates a DeactivateBackupJobOK with default headers values -func NewDeactivateBackupJobOK() *DeactivateBackupJobOK { - return &DeactivateBackupJobOK{} -} - -/* -DeactivateBackupJobOK describes a response with status code 200, with default header values. - -Success -*/ -type DeactivateBackupJobOK struct { - Payload *models.BackupJobWrapper -} - -// IsSuccess returns true when this deactivate backup job o k response has a 2xx status code -func (o *DeactivateBackupJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this deactivate backup job o k response has a 3xx status code -func (o *DeactivateBackupJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deactivate backup job o k response has a 4xx status code -func (o *DeactivateBackupJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this deactivate backup job o k response has a 5xx status code -func (o *DeactivateBackupJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this deactivate backup job o k response a status code equal to that given -func (o *DeactivateBackupJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the deactivate backup job o k response -func (o *DeactivateBackupJobOK) Code() int { - return 200 -} - -func (o *DeactivateBackupJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deactivateBackupJob/{id}][%d] deactivateBackupJobOK %s", 200, payload) -} - -func (o *DeactivateBackupJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deactivateBackupJob/{id}][%d] deactivateBackupJobOK %s", 200, payload) -} - -func (o *DeactivateBackupJobOK) GetPayload() *models.BackupJobWrapper { - return o.Payload -} - -func (o *DeactivateBackupJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupJobWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeactivateBackupJobDefault creates a DeactivateBackupJobDefault with default headers values -func NewDeactivateBackupJobDefault(code int) *DeactivateBackupJobDefault { - return &DeactivateBackupJobDefault{ - _statusCode: code, - } -} - -/* -DeactivateBackupJobDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeactivateBackupJobDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this deactivate backup job default response has a 2xx status code -func (o *DeactivateBackupJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this deactivate backup job default response has a 3xx status code -func (o *DeactivateBackupJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this deactivate backup job default response has a 4xx status code -func (o *DeactivateBackupJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this deactivate backup job default response has a 5xx status code -func (o *DeactivateBackupJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this deactivate backup job default response a status code equal to that given -func (o *DeactivateBackupJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the deactivate backup job default response -func (o *DeactivateBackupJobDefault) Code() int { - return o._statusCode -} - -func (o *DeactivateBackupJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deactivateBackupJob/{id}][%d] DeactivateBackupJob default %s", o._statusCode, payload) -} - -func (o *DeactivateBackupJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deactivateBackupJob/{id}][%d] DeactivateBackupJob default %s", o._statusCode, payload) -} - -func (o *DeactivateBackupJobDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeactivateBackupJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/delete_backup_job_parameters.go b/v1/client/backup_jobs/delete_backup_job_parameters.go deleted file mode 100644 index da47ff50..00000000 --- a/v1/client/backup_jobs/delete_backup_job_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewDeleteBackupJobParams creates a new DeleteBackupJobParams 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 NewDeleteBackupJobParams() *DeleteBackupJobParams { - return &DeleteBackupJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteBackupJobParamsWithTimeout creates a new DeleteBackupJobParams object -// with the ability to set a timeout on a request. -func NewDeleteBackupJobParamsWithTimeout(timeout time.Duration) *DeleteBackupJobParams { - return &DeleteBackupJobParams{ - timeout: timeout, - } -} - -// NewDeleteBackupJobParamsWithContext creates a new DeleteBackupJobParams object -// with the ability to set a context for a request. -func NewDeleteBackupJobParamsWithContext(ctx context.Context) *DeleteBackupJobParams { - return &DeleteBackupJobParams{ - Context: ctx, - } -} - -// NewDeleteBackupJobParamsWithHTTPClient creates a new DeleteBackupJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteBackupJobParamsWithHTTPClient(client *http.Client) *DeleteBackupJobParams { - return &DeleteBackupJobParams{ - HTTPClient: client, - } -} - -/* -DeleteBackupJobParams contains all the parameters to send to the API endpoint - - for the delete backup job operation. - - Typically these are written to a http.Request. -*/ -type DeleteBackupJobParams struct { - - /* DeleteSnapshots. - - DeleteSnapshots specifies whether to delete the snapshots along with the - job. - */ - DeleteSnapshots bool - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupJobParams) WithDefaults() *DeleteBackupJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete backup job params -func (o *DeleteBackupJobParams) WithTimeout(timeout time.Duration) *DeleteBackupJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete backup job params -func (o *DeleteBackupJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete backup job params -func (o *DeleteBackupJobParams) WithContext(ctx context.Context) *DeleteBackupJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete backup job params -func (o *DeleteBackupJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete backup job params -func (o *DeleteBackupJobParams) WithHTTPClient(client *http.Client) *DeleteBackupJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete backup job params -func (o *DeleteBackupJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeleteSnapshots adds the deleteSnapshots to the delete backup job params -func (o *DeleteBackupJobParams) WithDeleteSnapshots(deleteSnapshots bool) *DeleteBackupJobParams { - o.SetDeleteSnapshots(deleteSnapshots) - return o -} - -// SetDeleteSnapshots adds the deleteSnapshots to the delete backup job params -func (o *DeleteBackupJobParams) SetDeleteSnapshots(deleteSnapshots bool) { - o.DeleteSnapshots = deleteSnapshots -} - -// WithID adds the id to the delete backup job params -func (o *DeleteBackupJobParams) WithID(id int64) *DeleteBackupJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete backup job params -func (o *DeleteBackupJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteBackupJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.DeleteSnapshots); err != nil { - return err - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/delete_backup_job_responses.go b/v1/client/backup_jobs/delete_backup_job_responses.go deleted file mode 100644 index 99a15309..00000000 --- a/v1/client/backup_jobs/delete_backup_job_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteBackupJobReader is a Reader for the DeleteBackupJob structure. -type DeleteBackupJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteBackupJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteBackupJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteBackupJobDefault(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 - } -} - -// NewDeleteBackupJobOK creates a DeleteBackupJobOK with default headers values -func NewDeleteBackupJobOK() *DeleteBackupJobOK { - return &DeleteBackupJobOK{} -} - -/* -DeleteBackupJobOK describes a response with status code 200, with default header values. - -Success Response -*/ -type DeleteBackupJobOK struct { -} - -// IsSuccess returns true when this delete backup job o k response has a 2xx status code -func (o *DeleteBackupJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete backup job o k response has a 3xx status code -func (o *DeleteBackupJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete backup job o k response has a 4xx status code -func (o *DeleteBackupJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete backup job o k response has a 5xx status code -func (o *DeleteBackupJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete backup job o k response a status code equal to that given -func (o *DeleteBackupJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete backup job o k response -func (o *DeleteBackupJobOK) Code() int { - return 200 -} - -func (o *DeleteBackupJobOK) Error() string { - return fmt.Sprintf("[DELETE /backupjobs/{id}][%d] deleteBackupJobOK", 200) -} - -func (o *DeleteBackupJobOK) String() string { - return fmt.Sprintf("[DELETE /backupjobs/{id}][%d] deleteBackupJobOK", 200) -} - -func (o *DeleteBackupJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteBackupJobDefault creates a DeleteBackupJobDefault with default headers values -func NewDeleteBackupJobDefault(code int) *DeleteBackupJobDefault { - return &DeleteBackupJobDefault{ - _statusCode: code, - } -} - -/* -DeleteBackupJobDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeleteBackupJobDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this delete backup job default response has a 2xx status code -func (o *DeleteBackupJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete backup job default response has a 3xx status code -func (o *DeleteBackupJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete backup job default response has a 4xx status code -func (o *DeleteBackupJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete backup job default response has a 5xx status code -func (o *DeleteBackupJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete backup job default response a status code equal to that given -func (o *DeleteBackupJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete backup job default response -func (o *DeleteBackupJobDefault) Code() int { - return o._statusCode -} - -func (o *DeleteBackupJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupjobs/{id}][%d] DeleteBackupJob default %s", o._statusCode, payload) -} - -func (o *DeleteBackupJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupjobs/{id}][%d] DeleteBackupJob default %s", o._statusCode, payload) -} - -func (o *DeleteBackupJobDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeleteBackupJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/delete_backup_job_runs_parameters.go b/v1/client/backup_jobs/delete_backup_job_runs_parameters.go deleted file mode 100644 index 74916319..00000000 --- a/v1/client/backup_jobs/delete_backup_job_runs_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteBackupJobRunsParams creates a new DeleteBackupJobRunsParams 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 NewDeleteBackupJobRunsParams() *DeleteBackupJobRunsParams { - return &DeleteBackupJobRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteBackupJobRunsParamsWithTimeout creates a new DeleteBackupJobRunsParams object -// with the ability to set a timeout on a request. -func NewDeleteBackupJobRunsParamsWithTimeout(timeout time.Duration) *DeleteBackupJobRunsParams { - return &DeleteBackupJobRunsParams{ - timeout: timeout, - } -} - -// NewDeleteBackupJobRunsParamsWithContext creates a new DeleteBackupJobRunsParams object -// with the ability to set a context for a request. -func NewDeleteBackupJobRunsParamsWithContext(ctx context.Context) *DeleteBackupJobRunsParams { - return &DeleteBackupJobRunsParams{ - Context: ctx, - } -} - -// NewDeleteBackupJobRunsParamsWithHTTPClient creates a new DeleteBackupJobRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteBackupJobRunsParamsWithHTTPClient(client *http.Client) *DeleteBackupJobRunsParams { - return &DeleteBackupJobRunsParams{ - HTTPClient: client, - } -} - -/* -DeleteBackupJobRunsParams contains all the parameters to send to the API endpoint - - for the delete backup job runs operation. - - Typically these are written to a http.Request. -*/ -type DeleteBackupJobRunsParams struct { - - // Body. - Body *models.DeleteBackupJobRunsParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete backup job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupJobRunsParams) WithDefaults() *DeleteBackupJobRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete backup job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupJobRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) WithTimeout(timeout time.Duration) *DeleteBackupJobRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) WithContext(ctx context.Context) *DeleteBackupJobRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) WithHTTPClient(client *http.Client) *DeleteBackupJobRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) WithBody(body *models.DeleteBackupJobRunsParam) *DeleteBackupJobRunsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete backup job runs params -func (o *DeleteBackupJobRunsParams) SetBody(body *models.DeleteBackupJobRunsParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteBackupJobRunsParams) 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/backup_jobs/delete_backup_job_runs_responses.go b/v1/client/backup_jobs/delete_backup_job_runs_responses.go deleted file mode 100644 index a8b05926..00000000 --- a/v1/client/backup_jobs/delete_backup_job_runs_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteBackupJobRunsReader is a Reader for the DeleteBackupJobRuns structure. -type DeleteBackupJobRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteBackupJobRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteBackupJobRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteBackupJobRunsDefault(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 - } -} - -// NewDeleteBackupJobRunsOK creates a DeleteBackupJobRunsOK with default headers values -func NewDeleteBackupJobRunsOK() *DeleteBackupJobRunsOK { - return &DeleteBackupJobRunsOK{} -} - -/* -DeleteBackupJobRunsOK describes a response with status code 200, with default header values. - -Success Response -*/ -type DeleteBackupJobRunsOK struct { -} - -// IsSuccess returns true when this delete backup job runs o k response has a 2xx status code -func (o *DeleteBackupJobRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete backup job runs o k response has a 3xx status code -func (o *DeleteBackupJobRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete backup job runs o k response has a 4xx status code -func (o *DeleteBackupJobRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete backup job runs o k response has a 5xx status code -func (o *DeleteBackupJobRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete backup job runs o k response a status code equal to that given -func (o *DeleteBackupJobRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete backup job runs o k response -func (o *DeleteBackupJobRunsOK) Code() int { - return 200 -} - -func (o *DeleteBackupJobRunsOK) Error() string { - return fmt.Sprintf("[DELETE /backupjobruns][%d] deleteBackupJobRunsOK", 200) -} - -func (o *DeleteBackupJobRunsOK) String() string { - return fmt.Sprintf("[DELETE /backupjobruns][%d] deleteBackupJobRunsOK", 200) -} - -func (o *DeleteBackupJobRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteBackupJobRunsDefault creates a DeleteBackupJobRunsDefault with default headers values -func NewDeleteBackupJobRunsDefault(code int) *DeleteBackupJobRunsDefault { - return &DeleteBackupJobRunsDefault{ - _statusCode: code, - } -} - -/* -DeleteBackupJobRunsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeleteBackupJobRunsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this delete backup job runs default response has a 2xx status code -func (o *DeleteBackupJobRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete backup job runs default response has a 3xx status code -func (o *DeleteBackupJobRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete backup job runs default response has a 4xx status code -func (o *DeleteBackupJobRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete backup job runs default response has a 5xx status code -func (o *DeleteBackupJobRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete backup job runs default response a status code equal to that given -func (o *DeleteBackupJobRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete backup job runs default response -func (o *DeleteBackupJobRunsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteBackupJobRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupjobruns][%d] DeleteBackupJobRuns default %s", o._statusCode, payload) -} - -func (o *DeleteBackupJobRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupjobruns][%d] DeleteBackupJobRuns default %s", o._statusCode, payload) -} - -func (o *DeleteBackupJobRunsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeleteBackupJobRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_audit_parameters.go b/v1/client/backup_jobs/get_backup_job_audit_parameters.go deleted file mode 100644 index 90ad66d9..00000000 --- a/v1/client/backup_jobs/get_backup_job_audit_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobAuditParams creates a new GetBackupJobAuditParams 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 NewGetBackupJobAuditParams() *GetBackupJobAuditParams { - return &GetBackupJobAuditParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobAuditParamsWithTimeout creates a new GetBackupJobAuditParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobAuditParamsWithTimeout(timeout time.Duration) *GetBackupJobAuditParams { - return &GetBackupJobAuditParams{ - timeout: timeout, - } -} - -// NewGetBackupJobAuditParamsWithContext creates a new GetBackupJobAuditParams object -// with the ability to set a context for a request. -func NewGetBackupJobAuditParamsWithContext(ctx context.Context) *GetBackupJobAuditParams { - return &GetBackupJobAuditParams{ - Context: ctx, - } -} - -// NewGetBackupJobAuditParamsWithHTTPClient creates a new GetBackupJobAuditParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobAuditParamsWithHTTPClient(client *http.Client) *GetBackupJobAuditParams { - return &GetBackupJobAuditParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobAuditParams contains all the parameters to send to the API endpoint - - for the get backup job audit operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobAuditParams struct { - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup job audit params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobAuditParams) WithDefaults() *GetBackupJobAuditParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup job audit params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobAuditParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup job audit params -func (o *GetBackupJobAuditParams) WithTimeout(timeout time.Duration) *GetBackupJobAuditParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup job audit params -func (o *GetBackupJobAuditParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup job audit params -func (o *GetBackupJobAuditParams) WithContext(ctx context.Context) *GetBackupJobAuditParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup job audit params -func (o *GetBackupJobAuditParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup job audit params -func (o *GetBackupJobAuditParams) WithHTTPClient(client *http.Client) *GetBackupJobAuditParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup job audit params -func (o *GetBackupJobAuditParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get backup job audit params -func (o *GetBackupJobAuditParams) WithID(id int64) *GetBackupJobAuditParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get backup job audit params -func (o *GetBackupJobAuditParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobAuditParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_audit_responses.go b/v1/client/backup_jobs/get_backup_job_audit_responses.go deleted file mode 100644 index 33b6f9cb..00000000 --- a/v1/client/backup_jobs/get_backup_job_audit_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobAuditReader is a Reader for the GetBackupJobAudit structure. -type GetBackupJobAuditReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobAuditReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobAuditOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobAuditDefault(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 - } -} - -// NewGetBackupJobAuditOK creates a GetBackupJobAuditOK with default headers values -func NewGetBackupJobAuditOK() *GetBackupJobAuditOK { - return &GetBackupJobAuditOK{} -} - -/* -GetBackupJobAuditOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobAuditOK struct { - Payload []*models.BackupJobAudit -} - -// IsSuccess returns true when this get backup job audit o k response has a 2xx status code -func (o *GetBackupJobAuditOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup job audit o k response has a 3xx status code -func (o *GetBackupJobAuditOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup job audit o k response has a 4xx status code -func (o *GetBackupJobAuditOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup job audit o k response has a 5xx status code -func (o *GetBackupJobAuditOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup job audit o k response a status code equal to that given -func (o *GetBackupJobAuditOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup job audit o k response -func (o *GetBackupJobAuditOK) Code() int { - return 200 -} - -func (o *GetBackupJobAuditOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobaudit/{id}][%d] getBackupJobAuditOK %s", 200, payload) -} - -func (o *GetBackupJobAuditOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobaudit/{id}][%d] getBackupJobAuditOK %s", 200, payload) -} - -func (o *GetBackupJobAuditOK) GetPayload() []*models.BackupJobAudit { - return o.Payload -} - -func (o *GetBackupJobAuditOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobAuditDefault creates a GetBackupJobAuditDefault with default headers values -func NewGetBackupJobAuditDefault(code int) *GetBackupJobAuditDefault { - return &GetBackupJobAuditDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobAuditDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobAuditDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup job audit default response has a 2xx status code -func (o *GetBackupJobAuditDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup job audit default response has a 3xx status code -func (o *GetBackupJobAuditDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup job audit default response has a 4xx status code -func (o *GetBackupJobAuditDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup job audit default response has a 5xx status code -func (o *GetBackupJobAuditDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup job audit default response a status code equal to that given -func (o *GetBackupJobAuditDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup job audit default response -func (o *GetBackupJobAuditDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobAuditDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobaudit/{id}][%d] GetBackupJobAudit default %s", o._statusCode, payload) -} - -func (o *GetBackupJobAuditDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobaudit/{id}][%d] GetBackupJobAudit default %s", o._statusCode, payload) -} - -func (o *GetBackupJobAuditDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobAuditDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_by_id_parameters.go b/v1/client/backup_jobs/get_backup_job_by_id_parameters.go deleted file mode 100644 index e41adb56..00000000 --- a/v1/client/backup_jobs/get_backup_job_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobByIDParams creates a new GetBackupJobByIDParams 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 NewGetBackupJobByIDParams() *GetBackupJobByIDParams { - return &GetBackupJobByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobByIDParamsWithTimeout creates a new GetBackupJobByIDParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobByIDParamsWithTimeout(timeout time.Duration) *GetBackupJobByIDParams { - return &GetBackupJobByIDParams{ - timeout: timeout, - } -} - -// NewGetBackupJobByIDParamsWithContext creates a new GetBackupJobByIDParams object -// with the ability to set a context for a request. -func NewGetBackupJobByIDParamsWithContext(ctx context.Context) *GetBackupJobByIDParams { - return &GetBackupJobByIDParams{ - Context: ctx, - } -} - -// NewGetBackupJobByIDParamsWithHTTPClient creates a new GetBackupJobByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobByIDParamsWithHTTPClient(client *http.Client) *GetBackupJobByIDParams { - return &GetBackupJobByIDParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobByIDParams contains all the parameters to send to the API endpoint - - for the get backup job by Id operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobByIDParams struct { - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobByIDParams) WithDefaults() *GetBackupJobByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup job by Id params -func (o *GetBackupJobByIDParams) WithTimeout(timeout time.Duration) *GetBackupJobByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup job by Id params -func (o *GetBackupJobByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup job by Id params -func (o *GetBackupJobByIDParams) WithContext(ctx context.Context) *GetBackupJobByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup job by Id params -func (o *GetBackupJobByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup job by Id params -func (o *GetBackupJobByIDParams) WithHTTPClient(client *http.Client) *GetBackupJobByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup job by Id params -func (o *GetBackupJobByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get backup job by Id params -func (o *GetBackupJobByIDParams) WithID(id int64) *GetBackupJobByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get backup job by Id params -func (o *GetBackupJobByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_by_id_responses.go b/v1/client/backup_jobs/get_backup_job_by_id_responses.go deleted file mode 100644 index 84aa736a..00000000 --- a/v1/client/backup_jobs/get_backup_job_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobByIDReader is a Reader for the GetBackupJobByID structure. -type GetBackupJobByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobByIDDefault(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 - } -} - -// NewGetBackupJobByIDOK creates a GetBackupJobByIDOK with default headers values -func NewGetBackupJobByIDOK() *GetBackupJobByIDOK { - return &GetBackupJobByIDOK{} -} - -/* -GetBackupJobByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobByIDOK struct { - Payload []*models.BackupJobWrapper -} - -// IsSuccess returns true when this get backup job by Id o k response has a 2xx status code -func (o *GetBackupJobByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup job by Id o k response has a 3xx status code -func (o *GetBackupJobByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup job by Id o k response has a 4xx status code -func (o *GetBackupJobByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup job by Id o k response has a 5xx status code -func (o *GetBackupJobByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup job by Id o k response a status code equal to that given -func (o *GetBackupJobByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup job by Id o k response -func (o *GetBackupJobByIDOK) Code() int { - return 200 -} - -func (o *GetBackupJobByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs/{id}][%d] getBackupJobByIdOK %s", 200, payload) -} - -func (o *GetBackupJobByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs/{id}][%d] getBackupJobByIdOK %s", 200, payload) -} - -func (o *GetBackupJobByIDOK) GetPayload() []*models.BackupJobWrapper { - return o.Payload -} - -func (o *GetBackupJobByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobByIDDefault creates a GetBackupJobByIDDefault with default headers values -func NewGetBackupJobByIDDefault(code int) *GetBackupJobByIDDefault { - return &GetBackupJobByIDDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobByIDDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobByIDDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup job by Id default response has a 2xx status code -func (o *GetBackupJobByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup job by Id default response has a 3xx status code -func (o *GetBackupJobByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup job by Id default response has a 4xx status code -func (o *GetBackupJobByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup job by Id default response has a 5xx status code -func (o *GetBackupJobByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup job by Id default response a status code equal to that given -func (o *GetBackupJobByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup job by Id default response -func (o *GetBackupJobByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs/{id}][%d] GetBackupJobById default %s", o._statusCode, payload) -} - -func (o *GetBackupJobByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs/{id}][%d] GetBackupJobById default %s", o._statusCode, payload) -} - -func (o *GetBackupJobByIDDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_history_parameters.go b/v1/client/backup_jobs/get_backup_job_history_parameters.go deleted file mode 100644 index cdaa3ad9..00000000 --- a/v1/client/backup_jobs/get_backup_job_history_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobHistoryParams creates a new GetBackupJobHistoryParams 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 NewGetBackupJobHistoryParams() *GetBackupJobHistoryParams { - return &GetBackupJobHistoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobHistoryParamsWithTimeout creates a new GetBackupJobHistoryParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobHistoryParamsWithTimeout(timeout time.Duration) *GetBackupJobHistoryParams { - return &GetBackupJobHistoryParams{ - timeout: timeout, - } -} - -// NewGetBackupJobHistoryParamsWithContext creates a new GetBackupJobHistoryParams object -// with the ability to set a context for a request. -func NewGetBackupJobHistoryParamsWithContext(ctx context.Context) *GetBackupJobHistoryParams { - return &GetBackupJobHistoryParams{ - Context: ctx, - } -} - -// NewGetBackupJobHistoryParamsWithHTTPClient creates a new GetBackupJobHistoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobHistoryParamsWithHTTPClient(client *http.Client) *GetBackupJobHistoryParams { - return &GetBackupJobHistoryParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobHistoryParams contains all the parameters to send to the API endpoint - - for the get backup job history operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobHistoryParams struct { - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup job history params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobHistoryParams) WithDefaults() *GetBackupJobHistoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup job history params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobHistoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup job history params -func (o *GetBackupJobHistoryParams) WithTimeout(timeout time.Duration) *GetBackupJobHistoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup job history params -func (o *GetBackupJobHistoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup job history params -func (o *GetBackupJobHistoryParams) WithContext(ctx context.Context) *GetBackupJobHistoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup job history params -func (o *GetBackupJobHistoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup job history params -func (o *GetBackupJobHistoryParams) WithHTTPClient(client *http.Client) *GetBackupJobHistoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup job history params -func (o *GetBackupJobHistoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get backup job history params -func (o *GetBackupJobHistoryParams) WithID(id int64) *GetBackupJobHistoryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get backup job history params -func (o *GetBackupJobHistoryParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobHistoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_history_responses.go b/v1/client/backup_jobs/get_backup_job_history_responses.go deleted file mode 100644 index 282abc87..00000000 --- a/v1/client/backup_jobs/get_backup_job_history_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobHistoryReader is a Reader for the GetBackupJobHistory structure. -type GetBackupJobHistoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobHistoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobHistoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobHistoryDefault(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 - } -} - -// NewGetBackupJobHistoryOK creates a GetBackupJobHistoryOK with default headers values -func NewGetBackupJobHistoryOK() *GetBackupJobHistoryOK { - return &GetBackupJobHistoryOK{} -} - -/* -GetBackupJobHistoryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobHistoryOK struct { - Payload []*models.BackupJobWrapper -} - -// IsSuccess returns true when this get backup job history o k response has a 2xx status code -func (o *GetBackupJobHistoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup job history o k response has a 3xx status code -func (o *GetBackupJobHistoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup job history o k response has a 4xx status code -func (o *GetBackupJobHistoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup job history o k response has a 5xx status code -func (o *GetBackupJobHistoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup job history o k response a status code equal to that given -func (o *GetBackupJobHistoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup job history o k response -func (o *GetBackupJobHistoryOK) Code() int { - return 200 -} - -func (o *GetBackupJobHistoryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobhistory/{id}][%d] getBackupJobHistoryOK %s", 200, payload) -} - -func (o *GetBackupJobHistoryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobhistory/{id}][%d] getBackupJobHistoryOK %s", 200, payload) -} - -func (o *GetBackupJobHistoryOK) GetPayload() []*models.BackupJobWrapper { - return o.Payload -} - -func (o *GetBackupJobHistoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobHistoryDefault creates a GetBackupJobHistoryDefault with default headers values -func NewGetBackupJobHistoryDefault(code int) *GetBackupJobHistoryDefault { - return &GetBackupJobHistoryDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobHistoryDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobHistoryDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup job history default response has a 2xx status code -func (o *GetBackupJobHistoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup job history default response has a 3xx status code -func (o *GetBackupJobHistoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup job history default response has a 4xx status code -func (o *GetBackupJobHistoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup job history default response has a 5xx status code -func (o *GetBackupJobHistoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup job history default response a status code equal to that given -func (o *GetBackupJobHistoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup job history default response -func (o *GetBackupJobHistoryDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobHistoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobhistory/{id}][%d] GetBackupJobHistory default %s", o._statusCode, payload) -} - -func (o *GetBackupJobHistoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobhistory/{id}][%d] GetBackupJobHistory default %s", o._statusCode, payload) -} - -func (o *GetBackupJobHistoryDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobHistoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_job_runs_parameters.go b/v1/client/backup_jobs/get_backup_job_runs_parameters.go deleted file mode 100644 index 1ec32063..00000000 --- a/v1/client/backup_jobs/get_backup_job_runs_parameters.go +++ /dev/null @@ -1,961 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobRunsParams creates a new GetBackupJobRunsParams 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 NewGetBackupJobRunsParams() *GetBackupJobRunsParams { - return &GetBackupJobRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobRunsParamsWithTimeout creates a new GetBackupJobRunsParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobRunsParamsWithTimeout(timeout time.Duration) *GetBackupJobRunsParams { - return &GetBackupJobRunsParams{ - timeout: timeout, - } -} - -// NewGetBackupJobRunsParamsWithContext creates a new GetBackupJobRunsParams object -// with the ability to set a context for a request. -func NewGetBackupJobRunsParamsWithContext(ctx context.Context) *GetBackupJobRunsParams { - return &GetBackupJobRunsParams{ - Context: ctx, - } -} - -// NewGetBackupJobRunsParamsWithHTTPClient creates a new GetBackupJobRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobRunsParamsWithHTTPClient(client *http.Client) *GetBackupJobRunsParams { - return &GetBackupJobRunsParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobRunsParams contains all the parameters to send to the API endpoint - - for the get backup job runs operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobRunsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* CopyRunTypes. - - Following field contains a list of valid CopyTarget i.e Replication, - Archival representing the types of copy runs needed to be looked at - the given time window, denoted via TimeRange. - This input is only considered valid when - filterByCopyTaskEndTime is set to true. Else it is ignored. - */ - CopyRunTypes []string - - /* EndTimeUsecs. - - EndTimeUsecs is the end time in usecs. If not set, "now" is treated as the - end time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* EntityID. - - EntityId is the parameter to filter job runs by sources being protected(VM, - view,SQL etc.). EntityId is the Id of the entity protected by jobs whose - runs will be returned. - - Format: int64 - */ - EntityID *int64 - - /* ExactMatchStartTimeUsecs. - - ExactMatchStartTimeUsecs is the start time (in usecs) of a particular run - in a job to fetch. If this is provided, job_id must also be provided. If - this is not provided, then all job runs (for a single job or all jobs) that - match other filter criteria will be fetched. - - Format: int64 - */ - ExactMatchStartTimeUsecs *int64 - - /* ExcludeErrorRuns. - - ExcludeErrorRuns specifies whether to exclude runs with error. If no value - is specified, then runs with errors are included. - */ - ExcludeErrorRuns *bool - - /* ExcludeNonRestoreableRuns. - - Exclude runs that cannot be restored. Runs without any successful object - will be excluded. The default value is false. - */ - ExcludeNonRestoreableRuns *bool - - /* ExcludeTasks. - - ExcludeTasks is the parameter to exclude tasks from the runs. This will - make the JSON lighter weight. - */ - ExcludeTasks *bool - - /* FilterByCopyTaskEndTime. - - If true, then the details of the backup runs along with CopyRuns will be - returned where those backup run has atleast one CopyTask that is completed - in the given Time Range. If this field is true, then other filters such as - filterByEndTime should not be applied. - */ - FilterByCopyTaskEndTime *bool - - /* FilterByEndTime. - - If true, the runs with end time within the specified time range will be - returned. Otherwise, the runs with start time in the time range are - returned. - */ - FilterByEndTime *bool - - /* ID. - - Id is the id of the backup job. If this is not specified, runs for all - backup jobs will be returned. - - Format: int64 - */ - ID *int64 - - /* IncludeExtensionInfo. - - Include proto extensions if they are extended. - */ - IncludeExtensionInfo *bool - - /* IncludeRpoSnapshots. - - If true, then the snapshots for Protection Sources protected by Rpo - policies will also be returned. - */ - IncludeRpoSnapshots *bool - - /* NumRuns. - - NumRuns is the number of runs. If specified, at most these many runs will - be returned. - - Format: int64 - */ - NumRuns *int64 - - /* OnlyIncludeSuccessfulCopyRuns. - - If marked false, all CopyTasks in any finished state like cancelled, - failed in the given time window will be considered. Otherwise if kept - empty or marked as true, only the copy_tasks with kSuccess status will - be considered. - This input is only considered valid when - filterByCopyTaskEndTime is set to true. Else it is ignored. - */ - OnlyIncludeSuccessfulCopyRuns *bool - - /* OnlyReturnDataMigrationJobs. - - OnlyReturnDataMigrationJobs specifies if only data stubbing jobs should be - returned. If not set, no data migration job will be returned. - */ - OnlyReturnDataMigrationJobs *bool - - /* OnlyReturnShellInfo. - - OnlyReturnShellInfo returns only shell info such as run's start time, - type, error if any. - */ - OnlyReturnShellInfo *bool - - /* OutputFormat. - - OutputFormat is the Output format for the output. If it is not specified, - default is json. - */ - OutputFormat *string - - /* RunTypes. - - Filter by run type i.e. kFull, kRegular, kLog. - */ - RunTypes []string - - /* StartTimeUsecs. - - StartTimeUsecs is the start time in usecs. If not set, historical - information all the way to the beginning is looked at. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* UseCaseType. - - UseCaseType represents various types of usecases for the backupjobruns - api. According to the value of UseCaseType, various redundant information - will be removed or cleaned up. - UseCaseType represents various types of usecases for the backupjobruns - api. - 'KUseCaseType_kObjectRunsPage' indicates that the caller is object runs - page. - */ - UseCaseType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobRunsParams) WithDefaults() *GetBackupJobRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup job runs params -func (o *GetBackupJobRunsParams) WithTimeout(timeout time.Duration) *GetBackupJobRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup job runs params -func (o *GetBackupJobRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup job runs params -func (o *GetBackupJobRunsParams) WithContext(ctx context.Context) *GetBackupJobRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup job runs params -func (o *GetBackupJobRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup job runs params -func (o *GetBackupJobRunsParams) WithHTTPClient(client *http.Client) *GetBackupJobRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup job runs params -func (o *GetBackupJobRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get backup job runs params -func (o *GetBackupJobRunsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetBackupJobRunsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get backup job runs params -func (o *GetBackupJobRunsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithCopyRunTypes adds the copyRunTypes to the get backup job runs params -func (o *GetBackupJobRunsParams) WithCopyRunTypes(copyRunTypes []string) *GetBackupJobRunsParams { - o.SetCopyRunTypes(copyRunTypes) - return o -} - -// SetCopyRunTypes adds the copyRunTypes to the get backup job runs params -func (o *GetBackupJobRunsParams) SetCopyRunTypes(copyRunTypes []string) { - o.CopyRunTypes = copyRunTypes -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetBackupJobRunsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEntityID adds the entityID to the get backup job runs params -func (o *GetBackupJobRunsParams) WithEntityID(entityID *int64) *GetBackupJobRunsParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get backup job runs params -func (o *GetBackupJobRunsParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithExactMatchStartTimeUsecs adds the exactMatchStartTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) WithExactMatchStartTimeUsecs(exactMatchStartTimeUsecs *int64) *GetBackupJobRunsParams { - o.SetExactMatchStartTimeUsecs(exactMatchStartTimeUsecs) - return o -} - -// SetExactMatchStartTimeUsecs adds the exactMatchStartTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) SetExactMatchStartTimeUsecs(exactMatchStartTimeUsecs *int64) { - o.ExactMatchStartTimeUsecs = exactMatchStartTimeUsecs -} - -// WithExcludeErrorRuns adds the excludeErrorRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) WithExcludeErrorRuns(excludeErrorRuns *bool) *GetBackupJobRunsParams { - o.SetExcludeErrorRuns(excludeErrorRuns) - return o -} - -// SetExcludeErrorRuns adds the excludeErrorRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) SetExcludeErrorRuns(excludeErrorRuns *bool) { - o.ExcludeErrorRuns = excludeErrorRuns -} - -// WithExcludeNonRestoreableRuns adds the excludeNonRestoreableRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) WithExcludeNonRestoreableRuns(excludeNonRestoreableRuns *bool) *GetBackupJobRunsParams { - o.SetExcludeNonRestoreableRuns(excludeNonRestoreableRuns) - return o -} - -// SetExcludeNonRestoreableRuns adds the excludeNonRestoreableRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) SetExcludeNonRestoreableRuns(excludeNonRestoreableRuns *bool) { - o.ExcludeNonRestoreableRuns = excludeNonRestoreableRuns -} - -// WithExcludeTasks adds the excludeTasks to the get backup job runs params -func (o *GetBackupJobRunsParams) WithExcludeTasks(excludeTasks *bool) *GetBackupJobRunsParams { - o.SetExcludeTasks(excludeTasks) - return o -} - -// SetExcludeTasks adds the excludeTasks to the get backup job runs params -func (o *GetBackupJobRunsParams) SetExcludeTasks(excludeTasks *bool) { - o.ExcludeTasks = excludeTasks -} - -// WithFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get backup job runs params -func (o *GetBackupJobRunsParams) WithFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) *GetBackupJobRunsParams { - o.SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime) - return o -} - -// SetFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get backup job runs params -func (o *GetBackupJobRunsParams) SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) { - o.FilterByCopyTaskEndTime = filterByCopyTaskEndTime -} - -// WithFilterByEndTime adds the filterByEndTime to the get backup job runs params -func (o *GetBackupJobRunsParams) WithFilterByEndTime(filterByEndTime *bool) *GetBackupJobRunsParams { - o.SetFilterByEndTime(filterByEndTime) - return o -} - -// SetFilterByEndTime adds the filterByEndTime to the get backup job runs params -func (o *GetBackupJobRunsParams) SetFilterByEndTime(filterByEndTime *bool) { - o.FilterByEndTime = filterByEndTime -} - -// WithID adds the id to the get backup job runs params -func (o *GetBackupJobRunsParams) WithID(id *int64) *GetBackupJobRunsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get backup job runs params -func (o *GetBackupJobRunsParams) SetID(id *int64) { - o.ID = id -} - -// WithIncludeExtensionInfo adds the includeExtensionInfo to the get backup job runs params -func (o *GetBackupJobRunsParams) WithIncludeExtensionInfo(includeExtensionInfo *bool) *GetBackupJobRunsParams { - o.SetIncludeExtensionInfo(includeExtensionInfo) - return o -} - -// SetIncludeExtensionInfo adds the includeExtensionInfo to the get backup job runs params -func (o *GetBackupJobRunsParams) SetIncludeExtensionInfo(includeExtensionInfo *bool) { - o.IncludeExtensionInfo = includeExtensionInfo -} - -// WithIncludeRpoSnapshots adds the includeRpoSnapshots to the get backup job runs params -func (o *GetBackupJobRunsParams) WithIncludeRpoSnapshots(includeRpoSnapshots *bool) *GetBackupJobRunsParams { - o.SetIncludeRpoSnapshots(includeRpoSnapshots) - return o -} - -// SetIncludeRpoSnapshots adds the includeRpoSnapshots to the get backup job runs params -func (o *GetBackupJobRunsParams) SetIncludeRpoSnapshots(includeRpoSnapshots *bool) { - o.IncludeRpoSnapshots = includeRpoSnapshots -} - -// WithNumRuns adds the numRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) WithNumRuns(numRuns *int64) *GetBackupJobRunsParams { - o.SetNumRuns(numRuns) - return o -} - -// SetNumRuns adds the numRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) SetNumRuns(numRuns *int64) { - o.NumRuns = numRuns -} - -// WithOnlyIncludeSuccessfulCopyRuns adds the onlyIncludeSuccessfulCopyRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) WithOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns *bool) *GetBackupJobRunsParams { - o.SetOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns) - return o -} - -// SetOnlyIncludeSuccessfulCopyRuns adds the onlyIncludeSuccessfulCopyRuns to the get backup job runs params -func (o *GetBackupJobRunsParams) SetOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns *bool) { - o.OnlyIncludeSuccessfulCopyRuns = onlyIncludeSuccessfulCopyRuns -} - -// WithOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup job runs params -func (o *GetBackupJobRunsParams) WithOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) *GetBackupJobRunsParams { - o.SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs) - return o -} - -// SetOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup job runs params -func (o *GetBackupJobRunsParams) SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) { - o.OnlyReturnDataMigrationJobs = onlyReturnDataMigrationJobs -} - -// WithOnlyReturnShellInfo adds the onlyReturnShellInfo to the get backup job runs params -func (o *GetBackupJobRunsParams) WithOnlyReturnShellInfo(onlyReturnShellInfo *bool) *GetBackupJobRunsParams { - o.SetOnlyReturnShellInfo(onlyReturnShellInfo) - return o -} - -// SetOnlyReturnShellInfo adds the onlyReturnShellInfo to the get backup job runs params -func (o *GetBackupJobRunsParams) SetOnlyReturnShellInfo(onlyReturnShellInfo *bool) { - o.OnlyReturnShellInfo = onlyReturnShellInfo -} - -// WithOutputFormat adds the outputFormat to the get backup job runs params -func (o *GetBackupJobRunsParams) WithOutputFormat(outputFormat *string) *GetBackupJobRunsParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get backup job runs params -func (o *GetBackupJobRunsParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithRunTypes adds the runTypes to the get backup job runs params -func (o *GetBackupJobRunsParams) WithRunTypes(runTypes []string) *GetBackupJobRunsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get backup job runs params -func (o *GetBackupJobRunsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetBackupJobRunsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get backup job runs params -func (o *GetBackupJobRunsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get backup job runs params -func (o *GetBackupJobRunsParams) WithTenantIds(tenantIds []string) *GetBackupJobRunsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get backup job runs params -func (o *GetBackupJobRunsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCaseType adds the useCaseType to the get backup job runs params -func (o *GetBackupJobRunsParams) WithUseCaseType(useCaseType *string) *GetBackupJobRunsParams { - o.SetUseCaseType(useCaseType) - return o -} - -// SetUseCaseType adds the useCaseType to the get backup job runs params -func (o *GetBackupJobRunsParams) SetUseCaseType(useCaseType *string) { - o.UseCaseType = useCaseType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.CopyRunTypes != nil { - - // binding items for copyRunTypes - joinedCopyRunTypes := o.bindParamCopyRunTypes(reg) - - // query array param copyRunTypes - if err := r.SetQueryParam("copyRunTypes", joinedCopyRunTypes...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.ExactMatchStartTimeUsecs != nil { - - // query param exactMatchStartTimeUsecs - var qrExactMatchStartTimeUsecs int64 - - if o.ExactMatchStartTimeUsecs != nil { - qrExactMatchStartTimeUsecs = *o.ExactMatchStartTimeUsecs - } - qExactMatchStartTimeUsecs := swag.FormatInt64(qrExactMatchStartTimeUsecs) - if qExactMatchStartTimeUsecs != "" { - - if err := r.SetQueryParam("exactMatchStartTimeUsecs", qExactMatchStartTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeErrorRuns != nil { - - // query param excludeErrorRuns - var qrExcludeErrorRuns bool - - if o.ExcludeErrorRuns != nil { - qrExcludeErrorRuns = *o.ExcludeErrorRuns - } - qExcludeErrorRuns := swag.FormatBool(qrExcludeErrorRuns) - if qExcludeErrorRuns != "" { - - if err := r.SetQueryParam("excludeErrorRuns", qExcludeErrorRuns); err != nil { - return err - } - } - } - - if o.ExcludeNonRestoreableRuns != nil { - - // query param excludeNonRestoreableRuns - var qrExcludeNonRestoreableRuns bool - - if o.ExcludeNonRestoreableRuns != nil { - qrExcludeNonRestoreableRuns = *o.ExcludeNonRestoreableRuns - } - qExcludeNonRestoreableRuns := swag.FormatBool(qrExcludeNonRestoreableRuns) - if qExcludeNonRestoreableRuns != "" { - - if err := r.SetQueryParam("excludeNonRestoreableRuns", qExcludeNonRestoreableRuns); err != nil { - return err - } - } - } - - if o.ExcludeTasks != nil { - - // query param excludeTasks - var qrExcludeTasks bool - - if o.ExcludeTasks != nil { - qrExcludeTasks = *o.ExcludeTasks - } - qExcludeTasks := swag.FormatBool(qrExcludeTasks) - if qExcludeTasks != "" { - - if err := r.SetQueryParam("excludeTasks", qExcludeTasks); err != nil { - return err - } - } - } - - if o.FilterByCopyTaskEndTime != nil { - - // query param filterByCopyTaskEndTime - var qrFilterByCopyTaskEndTime bool - - if o.FilterByCopyTaskEndTime != nil { - qrFilterByCopyTaskEndTime = *o.FilterByCopyTaskEndTime - } - qFilterByCopyTaskEndTime := swag.FormatBool(qrFilterByCopyTaskEndTime) - if qFilterByCopyTaskEndTime != "" { - - if err := r.SetQueryParam("filterByCopyTaskEndTime", qFilterByCopyTaskEndTime); err != nil { - return err - } - } - } - - if o.FilterByEndTime != nil { - - // query param filterByEndTime - var qrFilterByEndTime bool - - if o.FilterByEndTime != nil { - qrFilterByEndTime = *o.FilterByEndTime - } - qFilterByEndTime := swag.FormatBool(qrFilterByEndTime) - if qFilterByEndTime != "" { - - if err := r.SetQueryParam("filterByEndTime", qFilterByEndTime); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID int64 - - if o.ID != nil { - qrID = *o.ID - } - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IncludeExtensionInfo != nil { - - // query param includeExtensionInfo - var qrIncludeExtensionInfo bool - - if o.IncludeExtensionInfo != nil { - qrIncludeExtensionInfo = *o.IncludeExtensionInfo - } - qIncludeExtensionInfo := swag.FormatBool(qrIncludeExtensionInfo) - if qIncludeExtensionInfo != "" { - - if err := r.SetQueryParam("includeExtensionInfo", qIncludeExtensionInfo); err != nil { - return err - } - } - } - - if o.IncludeRpoSnapshots != nil { - - // query param includeRpoSnapshots - var qrIncludeRpoSnapshots bool - - if o.IncludeRpoSnapshots != nil { - qrIncludeRpoSnapshots = *o.IncludeRpoSnapshots - } - qIncludeRpoSnapshots := swag.FormatBool(qrIncludeRpoSnapshots) - if qIncludeRpoSnapshots != "" { - - if err := r.SetQueryParam("includeRpoSnapshots", qIncludeRpoSnapshots); err != nil { - return err - } - } - } - - if o.NumRuns != nil { - - // query param numRuns - var qrNumRuns int64 - - if o.NumRuns != nil { - qrNumRuns = *o.NumRuns - } - qNumRuns := swag.FormatInt64(qrNumRuns) - if qNumRuns != "" { - - if err := r.SetQueryParam("numRuns", qNumRuns); err != nil { - return err - } - } - } - - if o.OnlyIncludeSuccessfulCopyRuns != nil { - - // query param onlyIncludeSuccessfulCopyRuns - var qrOnlyIncludeSuccessfulCopyRuns bool - - if o.OnlyIncludeSuccessfulCopyRuns != nil { - qrOnlyIncludeSuccessfulCopyRuns = *o.OnlyIncludeSuccessfulCopyRuns - } - qOnlyIncludeSuccessfulCopyRuns := swag.FormatBool(qrOnlyIncludeSuccessfulCopyRuns) - if qOnlyIncludeSuccessfulCopyRuns != "" { - - if err := r.SetQueryParam("onlyIncludeSuccessfulCopyRuns", qOnlyIncludeSuccessfulCopyRuns); err != nil { - return err - } - } - } - - if o.OnlyReturnDataMigrationJobs != nil { - - // query param onlyReturnDataMigrationJobs - var qrOnlyReturnDataMigrationJobs bool - - if o.OnlyReturnDataMigrationJobs != nil { - qrOnlyReturnDataMigrationJobs = *o.OnlyReturnDataMigrationJobs - } - qOnlyReturnDataMigrationJobs := swag.FormatBool(qrOnlyReturnDataMigrationJobs) - if qOnlyReturnDataMigrationJobs != "" { - - if err := r.SetQueryParam("onlyReturnDataMigrationJobs", qOnlyReturnDataMigrationJobs); err != nil { - return err - } - } - } - - if o.OnlyReturnShellInfo != nil { - - // query param onlyReturnShellInfo - var qrOnlyReturnShellInfo bool - - if o.OnlyReturnShellInfo != nil { - qrOnlyReturnShellInfo = *o.OnlyReturnShellInfo - } - qOnlyReturnShellInfo := swag.FormatBool(qrOnlyReturnShellInfo) - if qOnlyReturnShellInfo != "" { - - if err := r.SetQueryParam("onlyReturnShellInfo", qOnlyReturnShellInfo); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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.UseCaseType != nil { - - // query param useCaseType - var qrUseCaseType string - - if o.UseCaseType != nil { - qrUseCaseType = *o.UseCaseType - } - qUseCaseType := qrUseCaseType - if qUseCaseType != "" { - - if err := r.SetQueryParam("useCaseType", qUseCaseType); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetBackupJobRuns binds the parameter copyRunTypes -func (o *GetBackupJobRunsParams) bindParamCopyRunTypes(formats strfmt.Registry) []string { - copyRunTypesIR := o.CopyRunTypes - - var copyRunTypesIC []string - for _, copyRunTypesIIR := range copyRunTypesIR { // explode []string - - copyRunTypesIIV := copyRunTypesIIR // string as string - copyRunTypesIC = append(copyRunTypesIC, copyRunTypesIIV) - } - - // items.CollectionFormat: "" - copyRunTypesIS := swag.JoinByFormat(copyRunTypesIC, "") - - return copyRunTypesIS -} - -// bindParamGetBackupJobRuns binds the parameter runTypes -func (o *GetBackupJobRunsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} - -// bindParamGetBackupJobRuns binds the parameter tenantIds -func (o *GetBackupJobRunsParams) 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/v1/client/backup_jobs/get_backup_job_runs_responses.go b/v1/client/backup_jobs/get_backup_job_runs_responses.go deleted file mode 100644 index f561cbf9..00000000 --- a/v1/client/backup_jobs/get_backup_job_runs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobRunsReader is a Reader for the GetBackupJobRuns structure. -type GetBackupJobRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobRunsDefault(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 - } -} - -// NewGetBackupJobRunsOK creates a GetBackupJobRunsOK with default headers values -func NewGetBackupJobRunsOK() *GetBackupJobRunsOK { - return &GetBackupJobRunsOK{} -} - -/* -GetBackupJobRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobRunsOK struct { - Payload []*models.GetBackupJobRunsResultWrapper -} - -// IsSuccess returns true when this get backup job runs o k response has a 2xx status code -func (o *GetBackupJobRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup job runs o k response has a 3xx status code -func (o *GetBackupJobRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup job runs o k response has a 4xx status code -func (o *GetBackupJobRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup job runs o k response has a 5xx status code -func (o *GetBackupJobRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup job runs o k response a status code equal to that given -func (o *GetBackupJobRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup job runs o k response -func (o *GetBackupJobRunsOK) Code() int { - return 200 -} - -func (o *GetBackupJobRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobruns][%d] getBackupJobRunsOK %s", 200, payload) -} - -func (o *GetBackupJobRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobruns][%d] getBackupJobRunsOK %s", 200, payload) -} - -func (o *GetBackupJobRunsOK) GetPayload() []*models.GetBackupJobRunsResultWrapper { - return o.Payload -} - -func (o *GetBackupJobRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobRunsDefault creates a GetBackupJobRunsDefault with default headers values -func NewGetBackupJobRunsDefault(code int) *GetBackupJobRunsDefault { - return &GetBackupJobRunsDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobRunsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobRunsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup job runs default response has a 2xx status code -func (o *GetBackupJobRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup job runs default response has a 3xx status code -func (o *GetBackupJobRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup job runs default response has a 4xx status code -func (o *GetBackupJobRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup job runs default response has a 5xx status code -func (o *GetBackupJobRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup job runs default response a status code equal to that given -func (o *GetBackupJobRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup job runs default response -func (o *GetBackupJobRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobruns][%d] GetBackupJobRuns default %s", o._statusCode, payload) -} - -func (o *GetBackupJobRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobruns][%d] GetBackupJobRuns default %s", o._statusCode, payload) -} - -func (o *GetBackupJobRunsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_jobs_parameters.go b/v1/client/backup_jobs/get_backup_jobs_parameters.go deleted file mode 100644 index b65f6590..00000000 --- a/v1/client/backup_jobs/get_backup_jobs_parameters.go +++ /dev/null @@ -1,593 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobsParams creates a new GetBackupJobsParams 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 NewGetBackupJobsParams() *GetBackupJobsParams { - return &GetBackupJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobsParamsWithTimeout creates a new GetBackupJobsParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobsParamsWithTimeout(timeout time.Duration) *GetBackupJobsParams { - return &GetBackupJobsParams{ - timeout: timeout, - } -} - -// NewGetBackupJobsParamsWithContext creates a new GetBackupJobsParams object -// with the ability to set a context for a request. -func NewGetBackupJobsParamsWithContext(ctx context.Context) *GetBackupJobsParams { - return &GetBackupJobsParams{ - Context: ctx, - } -} - -// NewGetBackupJobsParamsWithHTTPClient creates a new GetBackupJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobsParamsWithHTTPClient(client *http.Client) *GetBackupJobsParams { - return &GetBackupJobsParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobsParams contains all the parameters to send to the API endpoint - - for the get backup jobs operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* EnvTypes. - - EnvTypes are the types of backup jobs to return e.g. VMWare, View etc. - */ - EnvTypes []int64 - - /* Ids. - - Ids are the ids of the backup jobs to filter. - */ - Ids []int64 - - /* IsActive. - - IsActive is the parameter to filter active/inactive jobs. If it is - specified as true, only active jobs are returned. If it is specified as - false, only inactive jobs are returned. - */ - IsActive *bool - - /* IsDeleted. - - IsDeleted is the parameter to filter deleted/non-deleted jobs. If it is - specified as true, only deleted jobs are returned. If it is specified as - false, only non-deleted jobs are returned. - */ - IsDeleted *bool - - /* IsLastRunSLAViolated. - - IsLastRunSlaViolated is the parameter to filter the Protection Jobs based - on the SLA violation status of the last Protection Run. - */ - IsLastRunSLAViolated *bool - - /* Names. - - Names are the names of backup jobs to filter. - */ - Names []string - - /* OnlyReturnDataMigrationJobs. - - OnlyReturnDataMigrationJobs specifies if only data stubbing jobs should be - returned. If not set, no data migration job will be returned. - */ - OnlyReturnDataMigrationJobs *bool - - /* PolicyIds. - - PolicyIds are the Ids of policies to filter by. - */ - PolicyIds []string - - /* PruneExclusionSources. - - If true, the list of exclusion sources will be omitted from the response. - This can be used to improve performance when the exclusion sources are - not needed. - */ - PruneExclusionSources *bool - - /* PruneSources. - - If set to true, all backup sources within the requested jobs will be - omitted from the response. Callers may use this to avoid overfetching - when information about entities in the job is not needed. - */ - PruneSources *bool - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobsParams) WithDefaults() *GetBackupJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup jobs params -func (o *GetBackupJobsParams) WithTimeout(timeout time.Duration) *GetBackupJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup jobs params -func (o *GetBackupJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup jobs params -func (o *GetBackupJobsParams) WithContext(ctx context.Context) *GetBackupJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup jobs params -func (o *GetBackupJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup jobs params -func (o *GetBackupJobsParams) WithHTTPClient(client *http.Client) *GetBackupJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup jobs params -func (o *GetBackupJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get backup jobs params -func (o *GetBackupJobsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetBackupJobsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get backup jobs params -func (o *GetBackupJobsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEnvTypes adds the envTypes to the get backup jobs params -func (o *GetBackupJobsParams) WithEnvTypes(envTypes []int64) *GetBackupJobsParams { - o.SetEnvTypes(envTypes) - return o -} - -// SetEnvTypes adds the envTypes to the get backup jobs params -func (o *GetBackupJobsParams) SetEnvTypes(envTypes []int64) { - o.EnvTypes = envTypes -} - -// WithIds adds the ids to the get backup jobs params -func (o *GetBackupJobsParams) WithIds(ids []int64) *GetBackupJobsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get backup jobs params -func (o *GetBackupJobsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIsActive adds the isActive to the get backup jobs params -func (o *GetBackupJobsParams) WithIsActive(isActive *bool) *GetBackupJobsParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get backup jobs params -func (o *GetBackupJobsParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsDeleted adds the isDeleted to the get backup jobs params -func (o *GetBackupJobsParams) WithIsDeleted(isDeleted *bool) *GetBackupJobsParams { - o.SetIsDeleted(isDeleted) - return o -} - -// SetIsDeleted adds the isDeleted to the get backup jobs params -func (o *GetBackupJobsParams) SetIsDeleted(isDeleted *bool) { - o.IsDeleted = isDeleted -} - -// WithIsLastRunSLAViolated adds the isLastRunSLAViolated to the get backup jobs params -func (o *GetBackupJobsParams) WithIsLastRunSLAViolated(isLastRunSLAViolated *bool) *GetBackupJobsParams { - o.SetIsLastRunSLAViolated(isLastRunSLAViolated) - return o -} - -// SetIsLastRunSLAViolated adds the isLastRunSlaViolated to the get backup jobs params -func (o *GetBackupJobsParams) SetIsLastRunSLAViolated(isLastRunSLAViolated *bool) { - o.IsLastRunSLAViolated = isLastRunSLAViolated -} - -// WithNames adds the names to the get backup jobs params -func (o *GetBackupJobsParams) WithNames(names []string) *GetBackupJobsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get backup jobs params -func (o *GetBackupJobsParams) SetNames(names []string) { - o.Names = names -} - -// WithOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup jobs params -func (o *GetBackupJobsParams) WithOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) *GetBackupJobsParams { - o.SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs) - return o -} - -// SetOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup jobs params -func (o *GetBackupJobsParams) SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) { - o.OnlyReturnDataMigrationJobs = onlyReturnDataMigrationJobs -} - -// WithPolicyIds adds the policyIds to the get backup jobs params -func (o *GetBackupJobsParams) WithPolicyIds(policyIds []string) *GetBackupJobsParams { - o.SetPolicyIds(policyIds) - return o -} - -// SetPolicyIds adds the policyIds to the get backup jobs params -func (o *GetBackupJobsParams) SetPolicyIds(policyIds []string) { - o.PolicyIds = policyIds -} - -// WithPruneExclusionSources adds the pruneExclusionSources to the get backup jobs params -func (o *GetBackupJobsParams) WithPruneExclusionSources(pruneExclusionSources *bool) *GetBackupJobsParams { - o.SetPruneExclusionSources(pruneExclusionSources) - return o -} - -// SetPruneExclusionSources adds the pruneExclusionSources to the get backup jobs params -func (o *GetBackupJobsParams) SetPruneExclusionSources(pruneExclusionSources *bool) { - o.PruneExclusionSources = pruneExclusionSources -} - -// WithPruneSources adds the pruneSources to the get backup jobs params -func (o *GetBackupJobsParams) WithPruneSources(pruneSources *bool) *GetBackupJobsParams { - o.SetPruneSources(pruneSources) - return o -} - -// SetPruneSources adds the pruneSources to the get backup jobs params -func (o *GetBackupJobsParams) SetPruneSources(pruneSources *bool) { - o.PruneSources = pruneSources -} - -// WithTenantID adds the tenantID to the get backup jobs params -func (o *GetBackupJobsParams) WithTenantID(tenantID *string) *GetBackupJobsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get backup jobs params -func (o *GetBackupJobsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EnvTypes != nil { - - // binding items for envTypes - joinedEnvTypes := o.bindParamEnvTypes(reg) - - // query array param envTypes - if err := r.SetQueryParam("envTypes", joinedEnvTypes...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsDeleted != nil { - - // query param isDeleted - var qrIsDeleted bool - - if o.IsDeleted != nil { - qrIsDeleted = *o.IsDeleted - } - qIsDeleted := swag.FormatBool(qrIsDeleted) - if qIsDeleted != "" { - - if err := r.SetQueryParam("isDeleted", qIsDeleted); err != nil { - return err - } - } - } - - if o.IsLastRunSLAViolated != nil { - - // query param isLastRunSlaViolated - var qrIsLastRunSLAViolated bool - - if o.IsLastRunSLAViolated != nil { - qrIsLastRunSLAViolated = *o.IsLastRunSLAViolated - } - qIsLastRunSLAViolated := swag.FormatBool(qrIsLastRunSLAViolated) - if qIsLastRunSLAViolated != "" { - - if err := r.SetQueryParam("isLastRunSlaViolated", qIsLastRunSLAViolated); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.OnlyReturnDataMigrationJobs != nil { - - // query param onlyReturnDataMigrationJobs - var qrOnlyReturnDataMigrationJobs bool - - if o.OnlyReturnDataMigrationJobs != nil { - qrOnlyReturnDataMigrationJobs = *o.OnlyReturnDataMigrationJobs - } - qOnlyReturnDataMigrationJobs := swag.FormatBool(qrOnlyReturnDataMigrationJobs) - if qOnlyReturnDataMigrationJobs != "" { - - if err := r.SetQueryParam("onlyReturnDataMigrationJobs", qOnlyReturnDataMigrationJobs); err != nil { - return err - } - } - } - - if o.PolicyIds != nil { - - // binding items for policyIds - joinedPolicyIds := o.bindParamPolicyIds(reg) - - // query array param policyIds - if err := r.SetQueryParam("policyIds", joinedPolicyIds...); err != nil { - return err - } - } - - if o.PruneExclusionSources != nil { - - // query param pruneExclusionSources - var qrPruneExclusionSources bool - - if o.PruneExclusionSources != nil { - qrPruneExclusionSources = *o.PruneExclusionSources - } - qPruneExclusionSources := swag.FormatBool(qrPruneExclusionSources) - if qPruneExclusionSources != "" { - - if err := r.SetQueryParam("pruneExclusionSources", qPruneExclusionSources); err != nil { - return err - } - } - } - - if o.PruneSources != nil { - - // query param pruneSources - var qrPruneSources bool - - if o.PruneSources != nil { - qrPruneSources = *o.PruneSources - } - qPruneSources := swag.FormatBool(qrPruneSources) - if qPruneSources != "" { - - if err := r.SetQueryParam("pruneSources", qPruneSources); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetBackupJobs binds the parameter envTypes -func (o *GetBackupJobsParams) bindParamEnvTypes(formats strfmt.Registry) []string { - envTypesIR := o.EnvTypes - - var envTypesIC []string - for _, envTypesIIR := range envTypesIR { // explode []int64 - - envTypesIIV := swag.FormatInt64(envTypesIIR) // int64 as string - envTypesIC = append(envTypesIC, envTypesIIV) - } - - // items.CollectionFormat: "" - envTypesIS := swag.JoinByFormat(envTypesIC, "") - - return envTypesIS -} - -// bindParamGetBackupJobs binds the parameter ids -func (o *GetBackupJobsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetBackupJobs binds the parameter names -func (o *GetBackupJobsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetBackupJobs binds the parameter policyIds -func (o *GetBackupJobsParams) bindParamPolicyIds(formats strfmt.Registry) []string { - policyIdsIR := o.PolicyIds - - var policyIdsIC []string - for _, policyIdsIIR := range policyIdsIR { // explode []string - - policyIdsIIV := policyIdsIIR // string as string - policyIdsIC = append(policyIdsIC, policyIdsIIV) - } - - // items.CollectionFormat: "" - policyIdsIS := swag.JoinByFormat(policyIdsIC, "") - - return policyIdsIS -} diff --git a/v1/client/backup_jobs/get_backup_jobs_responses.go b/v1/client/backup_jobs/get_backup_jobs_responses.go deleted file mode 100644 index b9f41714..00000000 --- a/v1/client/backup_jobs/get_backup_jobs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobsReader is a Reader for the GetBackupJobs structure. -type GetBackupJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobsDefault(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 - } -} - -// NewGetBackupJobsOK creates a GetBackupJobsOK with default headers values -func NewGetBackupJobsOK() *GetBackupJobsOK { - return &GetBackupJobsOK{} -} - -/* -GetBackupJobsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobsOK struct { - Payload []*models.BackupJobWrapper -} - -// IsSuccess returns true when this get backup jobs o k response has a 2xx status code -func (o *GetBackupJobsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup jobs o k response has a 3xx status code -func (o *GetBackupJobsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup jobs o k response has a 4xx status code -func (o *GetBackupJobsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup jobs o k response has a 5xx status code -func (o *GetBackupJobsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup jobs o k response a status code equal to that given -func (o *GetBackupJobsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup jobs o k response -func (o *GetBackupJobsOK) Code() int { - return 200 -} - -func (o *GetBackupJobsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs][%d] getBackupJobsOK %s", 200, payload) -} - -func (o *GetBackupJobsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs][%d] getBackupJobsOK %s", 200, payload) -} - -func (o *GetBackupJobsOK) GetPayload() []*models.BackupJobWrapper { - return o.Payload -} - -func (o *GetBackupJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobsDefault creates a GetBackupJobsDefault with default headers values -func NewGetBackupJobsDefault(code int) *GetBackupJobsDefault { - return &GetBackupJobsDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup jobs default response has a 2xx status code -func (o *GetBackupJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup jobs default response has a 3xx status code -func (o *GetBackupJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup jobs default response has a 4xx status code -func (o *GetBackupJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup jobs default response has a 5xx status code -func (o *GetBackupJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup jobs default response a status code equal to that given -func (o *GetBackupJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup jobs default response -func (o *GetBackupJobsDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs][%d] GetBackupJobs default %s", o._statusCode, payload) -} - -func (o *GetBackupJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobs][%d] GetBackupJobs default %s", o._statusCode, payload) -} - -func (o *GetBackupJobsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go b/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go deleted file mode 100644 index 9f45bbc0..00000000 --- a/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go +++ /dev/null @@ -1,1063 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" -) - -// NewGetBackupJobsSummaryParams creates a new GetBackupJobsSummaryParams 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 NewGetBackupJobsSummaryParams() *GetBackupJobsSummaryParams { - return &GetBackupJobsSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupJobsSummaryParamsWithTimeout creates a new GetBackupJobsSummaryParams object -// with the ability to set a timeout on a request. -func NewGetBackupJobsSummaryParamsWithTimeout(timeout time.Duration) *GetBackupJobsSummaryParams { - return &GetBackupJobsSummaryParams{ - timeout: timeout, - } -} - -// NewGetBackupJobsSummaryParamsWithContext creates a new GetBackupJobsSummaryParams object -// with the ability to set a context for a request. -func NewGetBackupJobsSummaryParamsWithContext(ctx context.Context) *GetBackupJobsSummaryParams { - return &GetBackupJobsSummaryParams{ - Context: ctx, - } -} - -// NewGetBackupJobsSummaryParamsWithHTTPClient creates a new GetBackupJobsSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupJobsSummaryParamsWithHTTPClient(client *http.Client) *GetBackupJobsSummaryParams { - return &GetBackupJobsSummaryParams{ - HTTPClient: client, - } -} - -/* -GetBackupJobsSummaryParams contains all the parameters to send to the API endpoint - - for the get backup jobs summary operation. - - Typically these are written to a http.Request. -*/ -type GetBackupJobsSummaryParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EndTimeUsecs. - - EndTimeUsecs is the end time in usecs for which to fetch job summary. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* EnvTypes. - - EnvTypes are the types of backup jobs to return e.g. VMWare, View etc. - */ - EnvTypes []int64 - - /* ExcludeTasks. - - ExcludeTasks is the parameter to exclude tasks from the last run. This will - make the JSON lighter weight. - */ - ExcludeTasks *bool - - /* Ids. - - Ids are the ids of the backup jobs to filter. - */ - Ids []int64 - - /* IncludeJobsWithoutRun. - - IncludeJobsWithoutRun specifies whether to include jobs without any run. - Aggregate metrics will not exist for jobs without any run. - */ - IncludeJobsWithoutRun *bool - - /* IncludeMissingSourceIds. - - If true, then the missing sources entity ids will also be returned. - Entities could be missing due to deletion. - */ - IncludeMissingSourceIds *bool - - /* IncludeRpoSnapshots. - - If true, then the Protected Objects protected by RPO policies will also - be returned. - */ - IncludeRpoSnapshots *bool - - /* IsActive. - - IsActive is the parameter to filter active/inactive jobs. If it is - specified as true, only active jobs are returned. If it is specified as - false, only inactive jobs are returned. - */ - IsActive *bool - - /* IsDeleted. - - IsDeleted is the parameter to filter deleted/non-deleted jobs. If it is - specified as true, only deleted jobs are returned. If it is specified as - false, only non-deleted jobs are returned. - */ - IsDeleted *bool - - /* IsLastRunSLAViolated. - - IsLastRunSlaViolated is the parameter to filter the Protection Jobs based - on the SLA violation status of the last Protection Run. - */ - IsLastRunSLAViolated *bool - - /* MaxRuns. - - MaxRuns specifies the maximum number of job runs. If specified, only the - jobs only the jobs that have run at most MaxRuns times in the provided - time range will be returned. - - Format: int64 - */ - MaxRuns *int64 - - /* MinRuns. - - MinRuns specifies the minimum number of job runs. If specified, only the - jobs that have run at least MinRuns times in the provided time - range will be returned. - - Format: int64 - */ - MinRuns *int64 - - /* Names. - - Names are the prefixes that can match backup job names as a prefix. - */ - Names []string - - /* OnlyReturnBasicSummary. - - OnlyReturnBasicSummary specifies whether to only return job descriptions - without any aggregate metrics. - */ - OnlyReturnBasicSummary *bool - - /* OnlyReturnDataMigrationJobs. - - OnlyReturnDataMigrationJobs specifies if only data migration jobs should be - returned. If not set, no data migration job will be returned. - */ - OnlyReturnDataMigrationJobs *bool - - /* OutputFormat. - - OutputFormat is the Output format for the output. If it is not specified, - default is json. - */ - OutputFormat *string - - /* PolicyIds. - - PolicyIds are the Ids of policies to filter by. - */ - PolicyIds []string - - /* PruneExclusionSources. - - If true, the list of exclusion sources will be omitted from the response. - This can be used to improve performance when the exclusion sources are - not needed. - */ - PruneExclusionSources *bool - - /* SourceIds. - - SourceIds specifies the Ids of parent sources of the backup jobs to filter. - */ - SourceIds []int64 - - /* StartTimeUsecs. - - StartTimeUsecs is the start time in usecs for which to fetch job summary. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* Statuses. - - Statuses are the statuses of backup jobs to filter. If not specified, jobs - in all statuses are returned. - */ - Statuses []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* ViewBoxIds. - - ViewBoxIds are the view box ids to filter by. - */ - ViewBoxIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup jobs summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobsSummaryParams) WithDefaults() *GetBackupJobsSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup jobs summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupJobsSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithTimeout(timeout time.Duration) *GetBackupJobsSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithContext(ctx context.Context) *GetBackupJobsSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithHTTPClient(client *http.Client) *GetBackupJobsSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetBackupJobsSummaryParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetBackupJobsSummaryParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvTypes adds the envTypes to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithEnvTypes(envTypes []int64) *GetBackupJobsSummaryParams { - o.SetEnvTypes(envTypes) - return o -} - -// SetEnvTypes adds the envTypes to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetEnvTypes(envTypes []int64) { - o.EnvTypes = envTypes -} - -// WithExcludeTasks adds the excludeTasks to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithExcludeTasks(excludeTasks *bool) *GetBackupJobsSummaryParams { - o.SetExcludeTasks(excludeTasks) - return o -} - -// SetExcludeTasks adds the excludeTasks to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetExcludeTasks(excludeTasks *bool) { - o.ExcludeTasks = excludeTasks -} - -// WithIds adds the ids to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIds(ids []int64) *GetBackupJobsSummaryParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeJobsWithoutRun adds the includeJobsWithoutRun to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIncludeJobsWithoutRun(includeJobsWithoutRun *bool) *GetBackupJobsSummaryParams { - o.SetIncludeJobsWithoutRun(includeJobsWithoutRun) - return o -} - -// SetIncludeJobsWithoutRun adds the includeJobsWithoutRun to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIncludeJobsWithoutRun(includeJobsWithoutRun *bool) { - o.IncludeJobsWithoutRun = includeJobsWithoutRun -} - -// WithIncludeMissingSourceIds adds the includeMissingSourceIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIncludeMissingSourceIds(includeMissingSourceIds *bool) *GetBackupJobsSummaryParams { - o.SetIncludeMissingSourceIds(includeMissingSourceIds) - return o -} - -// SetIncludeMissingSourceIds adds the includeMissingSourceIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIncludeMissingSourceIds(includeMissingSourceIds *bool) { - o.IncludeMissingSourceIds = includeMissingSourceIds -} - -// WithIncludeRpoSnapshots adds the includeRpoSnapshots to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIncludeRpoSnapshots(includeRpoSnapshots *bool) *GetBackupJobsSummaryParams { - o.SetIncludeRpoSnapshots(includeRpoSnapshots) - return o -} - -// SetIncludeRpoSnapshots adds the includeRpoSnapshots to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIncludeRpoSnapshots(includeRpoSnapshots *bool) { - o.IncludeRpoSnapshots = includeRpoSnapshots -} - -// WithIsActive adds the isActive to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIsActive(isActive *bool) *GetBackupJobsSummaryParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsDeleted adds the isDeleted to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIsDeleted(isDeleted *bool) *GetBackupJobsSummaryParams { - o.SetIsDeleted(isDeleted) - return o -} - -// SetIsDeleted adds the isDeleted to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIsDeleted(isDeleted *bool) { - o.IsDeleted = isDeleted -} - -// WithIsLastRunSLAViolated adds the isLastRunSLAViolated to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithIsLastRunSLAViolated(isLastRunSLAViolated *bool) *GetBackupJobsSummaryParams { - o.SetIsLastRunSLAViolated(isLastRunSLAViolated) - return o -} - -// SetIsLastRunSLAViolated adds the isLastRunSlaViolated to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetIsLastRunSLAViolated(isLastRunSLAViolated *bool) { - o.IsLastRunSLAViolated = isLastRunSLAViolated -} - -// WithMaxRuns adds the maxRuns to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithMaxRuns(maxRuns *int64) *GetBackupJobsSummaryParams { - o.SetMaxRuns(maxRuns) - return o -} - -// SetMaxRuns adds the maxRuns to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetMaxRuns(maxRuns *int64) { - o.MaxRuns = maxRuns -} - -// WithMinRuns adds the minRuns to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithMinRuns(minRuns *int64) *GetBackupJobsSummaryParams { - o.SetMinRuns(minRuns) - return o -} - -// SetMinRuns adds the minRuns to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetMinRuns(minRuns *int64) { - o.MinRuns = minRuns -} - -// WithNames adds the names to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithNames(names []string) *GetBackupJobsSummaryParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetNames(names []string) { - o.Names = names -} - -// WithOnlyReturnBasicSummary adds the onlyReturnBasicSummary to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithOnlyReturnBasicSummary(onlyReturnBasicSummary *bool) *GetBackupJobsSummaryParams { - o.SetOnlyReturnBasicSummary(onlyReturnBasicSummary) - return o -} - -// SetOnlyReturnBasicSummary adds the onlyReturnBasicSummary to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetOnlyReturnBasicSummary(onlyReturnBasicSummary *bool) { - o.OnlyReturnBasicSummary = onlyReturnBasicSummary -} - -// WithOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) *GetBackupJobsSummaryParams { - o.SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs) - return o -} - -// SetOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) { - o.OnlyReturnDataMigrationJobs = onlyReturnDataMigrationJobs -} - -// WithOutputFormat adds the outputFormat to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithOutputFormat(outputFormat *string) *GetBackupJobsSummaryParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithPolicyIds adds the policyIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithPolicyIds(policyIds []string) *GetBackupJobsSummaryParams { - o.SetPolicyIds(policyIds) - return o -} - -// SetPolicyIds adds the policyIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetPolicyIds(policyIds []string) { - o.PolicyIds = policyIds -} - -// WithPruneExclusionSources adds the pruneExclusionSources to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithPruneExclusionSources(pruneExclusionSources *bool) *GetBackupJobsSummaryParams { - o.SetPruneExclusionSources(pruneExclusionSources) - return o -} - -// SetPruneExclusionSources adds the pruneExclusionSources to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetPruneExclusionSources(pruneExclusionSources *bool) { - o.PruneExclusionSources = pruneExclusionSources -} - -// WithSourceIds adds the sourceIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithSourceIds(sourceIds []int64) *GetBackupJobsSummaryParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetBackupJobsSummaryParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStatuses adds the statuses to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithStatuses(statuses []string) *GetBackupJobsSummaryParams { - o.SetStatuses(statuses) - return o -} - -// SetStatuses adds the statuses to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetStatuses(statuses []string) { - o.Statuses = statuses -} - -// WithTenantIds adds the tenantIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithTenantIds(tenantIds []string) *GetBackupJobsSummaryParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewBoxIds adds the viewBoxIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) WithViewBoxIds(viewBoxIds []int64) *GetBackupJobsSummaryParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the get backup jobs summary params -func (o *GetBackupJobsSummaryParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupJobsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.EnvTypes != nil { - - // binding items for envTypes - joinedEnvTypes := o.bindParamEnvTypes(reg) - - // query array param envTypes - if err := r.SetQueryParam("envTypes", joinedEnvTypes...); err != nil { - return err - } - } - - if o.ExcludeTasks != nil { - - // query param excludeTasks - var qrExcludeTasks bool - - if o.ExcludeTasks != nil { - qrExcludeTasks = *o.ExcludeTasks - } - qExcludeTasks := swag.FormatBool(qrExcludeTasks) - if qExcludeTasks != "" { - - if err := r.SetQueryParam("excludeTasks", qExcludeTasks); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeJobsWithoutRun != nil { - - // query param includeJobsWithoutRun - var qrIncludeJobsWithoutRun bool - - if o.IncludeJobsWithoutRun != nil { - qrIncludeJobsWithoutRun = *o.IncludeJobsWithoutRun - } - qIncludeJobsWithoutRun := swag.FormatBool(qrIncludeJobsWithoutRun) - if qIncludeJobsWithoutRun != "" { - - if err := r.SetQueryParam("includeJobsWithoutRun", qIncludeJobsWithoutRun); err != nil { - return err - } - } - } - - if o.IncludeMissingSourceIds != nil { - - // query param includeMissingSourceIds - var qrIncludeMissingSourceIds bool - - if o.IncludeMissingSourceIds != nil { - qrIncludeMissingSourceIds = *o.IncludeMissingSourceIds - } - qIncludeMissingSourceIds := swag.FormatBool(qrIncludeMissingSourceIds) - if qIncludeMissingSourceIds != "" { - - if err := r.SetQueryParam("includeMissingSourceIds", qIncludeMissingSourceIds); err != nil { - return err - } - } - } - - if o.IncludeRpoSnapshots != nil { - - // query param includeRpoSnapshots - var qrIncludeRpoSnapshots bool - - if o.IncludeRpoSnapshots != nil { - qrIncludeRpoSnapshots = *o.IncludeRpoSnapshots - } - qIncludeRpoSnapshots := swag.FormatBool(qrIncludeRpoSnapshots) - if qIncludeRpoSnapshots != "" { - - if err := r.SetQueryParam("includeRpoSnapshots", qIncludeRpoSnapshots); err != nil { - return err - } - } - } - - if o.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsDeleted != nil { - - // query param isDeleted - var qrIsDeleted bool - - if o.IsDeleted != nil { - qrIsDeleted = *o.IsDeleted - } - qIsDeleted := swag.FormatBool(qrIsDeleted) - if qIsDeleted != "" { - - if err := r.SetQueryParam("isDeleted", qIsDeleted); err != nil { - return err - } - } - } - - if o.IsLastRunSLAViolated != nil { - - // query param isLastRunSlaViolated - var qrIsLastRunSLAViolated bool - - if o.IsLastRunSLAViolated != nil { - qrIsLastRunSLAViolated = *o.IsLastRunSLAViolated - } - qIsLastRunSLAViolated := swag.FormatBool(qrIsLastRunSLAViolated) - if qIsLastRunSLAViolated != "" { - - if err := r.SetQueryParam("isLastRunSlaViolated", qIsLastRunSLAViolated); err != nil { - return err - } - } - } - - if o.MaxRuns != nil { - - // query param maxRuns - var qrMaxRuns int64 - - if o.MaxRuns != nil { - qrMaxRuns = *o.MaxRuns - } - qMaxRuns := swag.FormatInt64(qrMaxRuns) - if qMaxRuns != "" { - - if err := r.SetQueryParam("maxRuns", qMaxRuns); err != nil { - return err - } - } - } - - if o.MinRuns != nil { - - // query param minRuns - var qrMinRuns int64 - - if o.MinRuns != nil { - qrMinRuns = *o.MinRuns - } - qMinRuns := swag.FormatInt64(qrMinRuns) - if qMinRuns != "" { - - if err := r.SetQueryParam("minRuns", qMinRuns); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.OnlyReturnBasicSummary != nil { - - // query param onlyReturnBasicSummary - var qrOnlyReturnBasicSummary bool - - if o.OnlyReturnBasicSummary != nil { - qrOnlyReturnBasicSummary = *o.OnlyReturnBasicSummary - } - qOnlyReturnBasicSummary := swag.FormatBool(qrOnlyReturnBasicSummary) - if qOnlyReturnBasicSummary != "" { - - if err := r.SetQueryParam("onlyReturnBasicSummary", qOnlyReturnBasicSummary); err != nil { - return err - } - } - } - - if o.OnlyReturnDataMigrationJobs != nil { - - // query param onlyReturnDataMigrationJobs - var qrOnlyReturnDataMigrationJobs bool - - if o.OnlyReturnDataMigrationJobs != nil { - qrOnlyReturnDataMigrationJobs = *o.OnlyReturnDataMigrationJobs - } - qOnlyReturnDataMigrationJobs := swag.FormatBool(qrOnlyReturnDataMigrationJobs) - if qOnlyReturnDataMigrationJobs != "" { - - if err := r.SetQueryParam("onlyReturnDataMigrationJobs", qOnlyReturnDataMigrationJobs); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.PolicyIds != nil { - - // binding items for policyIds - joinedPolicyIds := o.bindParamPolicyIds(reg) - - // query array param policyIds - if err := r.SetQueryParam("policyIds", joinedPolicyIds...); err != nil { - return err - } - } - - if o.PruneExclusionSources != nil { - - // query param pruneExclusionSources - var qrPruneExclusionSources bool - - if o.PruneExclusionSources != nil { - qrPruneExclusionSources = *o.PruneExclusionSources - } - qPruneExclusionSources := swag.FormatBool(qrPruneExclusionSources) - if qPruneExclusionSources != "" { - - if err := r.SetQueryParam("pruneExclusionSources", qPruneExclusionSources); err != nil { - return err - } - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.Statuses != nil { - - // binding items for statuses - joinedStatuses := o.bindParamStatuses(reg) - - // query array param statuses - if err := r.SetQueryParam("statuses", joinedStatuses...); err != nil { - return err - } - } - - 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.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetBackupJobsSummary binds the parameter envTypes -func (o *GetBackupJobsSummaryParams) bindParamEnvTypes(formats strfmt.Registry) []string { - envTypesIR := o.EnvTypes - - var envTypesIC []string - for _, envTypesIIR := range envTypesIR { // explode []int64 - - envTypesIIV := swag.FormatInt64(envTypesIIR) // int64 as string - envTypesIC = append(envTypesIC, envTypesIIV) - } - - // items.CollectionFormat: "" - envTypesIS := swag.JoinByFormat(envTypesIC, "") - - return envTypesIS -} - -// bindParamGetBackupJobsSummary binds the parameter ids -func (o *GetBackupJobsSummaryParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetBackupJobsSummary binds the parameter names -func (o *GetBackupJobsSummaryParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetBackupJobsSummary binds the parameter policyIds -func (o *GetBackupJobsSummaryParams) bindParamPolicyIds(formats strfmt.Registry) []string { - policyIdsIR := o.PolicyIds - - var policyIdsIC []string - for _, policyIdsIIR := range policyIdsIR { // explode []string - - policyIdsIIV := policyIdsIIR // string as string - policyIdsIC = append(policyIdsIC, policyIdsIIV) - } - - // items.CollectionFormat: "" - policyIdsIS := swag.JoinByFormat(policyIdsIC, "") - - return policyIdsIS -} - -// bindParamGetBackupJobsSummary binds the parameter sourceIds -func (o *GetBackupJobsSummaryParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} - -// bindParamGetBackupJobsSummary binds the parameter statuses -func (o *GetBackupJobsSummaryParams) bindParamStatuses(formats strfmt.Registry) []string { - statusesIR := o.Statuses - - var statusesIC []string - for _, statusesIIR := range statusesIR { // explode []string - - statusesIIV := statusesIIR // string as string - statusesIC = append(statusesIC, statusesIIV) - } - - // items.CollectionFormat: "" - statusesIS := swag.JoinByFormat(statusesIC, "") - - return statusesIS -} - -// bindParamGetBackupJobsSummary binds the parameter tenantIds -func (o *GetBackupJobsSummaryParams) 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 -} - -// bindParamGetBackupJobsSummary binds the parameter viewBoxIds -func (o *GetBackupJobsSummaryParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/backup_jobs/get_backup_jobs_summary_responses.go b/v1/client/backup_jobs/get_backup_jobs_summary_responses.go deleted file mode 100644 index cd37fe44..00000000 --- a/v1/client/backup_jobs/get_backup_jobs_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupJobsSummaryReader is a Reader for the GetBackupJobsSummary structure. -type GetBackupJobsSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupJobsSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupJobsSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupJobsSummaryDefault(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 - } -} - -// NewGetBackupJobsSummaryOK creates a GetBackupJobsSummaryOK with default headers values -func NewGetBackupJobsSummaryOK() *GetBackupJobsSummaryOK { - return &GetBackupJobsSummaryOK{} -} - -/* -GetBackupJobsSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupJobsSummaryOK struct { - Payload *models.BackupJobSummaryWrapper -} - -// IsSuccess returns true when this get backup jobs summary o k response has a 2xx status code -func (o *GetBackupJobsSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup jobs summary o k response has a 3xx status code -func (o *GetBackupJobsSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup jobs summary o k response has a 4xx status code -func (o *GetBackupJobsSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup jobs summary o k response has a 5xx status code -func (o *GetBackupJobsSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup jobs summary o k response a status code equal to that given -func (o *GetBackupJobsSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup jobs summary o k response -func (o *GetBackupJobsSummaryOK) Code() int { - return 200 -} - -func (o *GetBackupJobsSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobssummary][%d] getBackupJobsSummaryOK %s", 200, payload) -} - -func (o *GetBackupJobsSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobssummary][%d] getBackupJobsSummaryOK %s", 200, payload) -} - -func (o *GetBackupJobsSummaryOK) GetPayload() *models.BackupJobSummaryWrapper { - return o.Payload -} - -func (o *GetBackupJobsSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupJobSummaryWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupJobsSummaryDefault creates a GetBackupJobsSummaryDefault with default headers values -func NewGetBackupJobsSummaryDefault(code int) *GetBackupJobsSummaryDefault { - return &GetBackupJobsSummaryDefault{ - _statusCode: code, - } -} - -/* -GetBackupJobsSummaryDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupJobsSummaryDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup jobs summary default response has a 2xx status code -func (o *GetBackupJobsSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup jobs summary default response has a 3xx status code -func (o *GetBackupJobsSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup jobs summary default response has a 4xx status code -func (o *GetBackupJobsSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup jobs summary default response has a 5xx status code -func (o *GetBackupJobsSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup jobs summary default response a status code equal to that given -func (o *GetBackupJobsSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup jobs summary default response -func (o *GetBackupJobsSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupJobsSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobssummary][%d] GetBackupJobsSummary default %s", o._statusCode, payload) -} - -func (o *GetBackupJobsSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupjobssummary][%d] GetBackupJobsSummary default %s", o._statusCode, payload) -} - -func (o *GetBackupJobsSummaryDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupJobsSummaryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_jobs/update_backup_job_parameters.go b/v1/client/backup_jobs/update_backup_job_parameters.go deleted file mode 100644 index 7a5d4820..00000000 --- a/v1/client/backup_jobs/update_backup_job_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateBackupJobParams creates a new UpdateBackupJobParams 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 NewUpdateBackupJobParams() *UpdateBackupJobParams { - return &UpdateBackupJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateBackupJobParamsWithTimeout creates a new UpdateBackupJobParams object -// with the ability to set a timeout on a request. -func NewUpdateBackupJobParamsWithTimeout(timeout time.Duration) *UpdateBackupJobParams { - return &UpdateBackupJobParams{ - timeout: timeout, - } -} - -// NewUpdateBackupJobParamsWithContext creates a new UpdateBackupJobParams object -// with the ability to set a context for a request. -func NewUpdateBackupJobParamsWithContext(ctx context.Context) *UpdateBackupJobParams { - return &UpdateBackupJobParams{ - Context: ctx, - } -} - -// NewUpdateBackupJobParamsWithHTTPClient creates a new UpdateBackupJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateBackupJobParamsWithHTTPClient(client *http.Client) *UpdateBackupJobParams { - return &UpdateBackupJobParams{ - HTTPClient: client, - } -} - -/* -UpdateBackupJobParams contains all the parameters to send to the API endpoint - - for the update backup job operation. - - Typically these are written to a http.Request. -*/ -type UpdateBackupJobParams struct { - - // Body. - Body *models.BackupJobWrapper - - /* ID. - - Specifies a unique id of the Backup Job - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackupJobParams) WithDefaults() *UpdateBackupJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update backup job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackupJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update backup job params -func (o *UpdateBackupJobParams) WithTimeout(timeout time.Duration) *UpdateBackupJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update backup job params -func (o *UpdateBackupJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update backup job params -func (o *UpdateBackupJobParams) WithContext(ctx context.Context) *UpdateBackupJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update backup job params -func (o *UpdateBackupJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update backup job params -func (o *UpdateBackupJobParams) WithHTTPClient(client *http.Client) *UpdateBackupJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update backup job params -func (o *UpdateBackupJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update backup job params -func (o *UpdateBackupJobParams) WithBody(body *models.BackupJobWrapper) *UpdateBackupJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update backup job params -func (o *UpdateBackupJobParams) SetBody(body *models.BackupJobWrapper) { - o.Body = body -} - -// WithID adds the id to the update backup job params -func (o *UpdateBackupJobParams) WithID(id int64) *UpdateBackupJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update backup job params -func (o *UpdateBackupJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateBackupJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_jobs/update_backup_job_responses.go b/v1/client/backup_jobs/update_backup_job_responses.go deleted file mode 100644 index 6be5e6c1..00000000 --- a/v1/client/backup_jobs/update_backup_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateBackupJobReader is a Reader for the UpdateBackupJob structure. -type UpdateBackupJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateBackupJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateBackupJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateBackupJobDefault(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 - } -} - -// NewUpdateBackupJobOK creates a UpdateBackupJobOK with default headers values -func NewUpdateBackupJobOK() *UpdateBackupJobOK { - return &UpdateBackupJobOK{} -} - -/* -UpdateBackupJobOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateBackupJobOK struct { - Payload *models.BackupJobWrapper -} - -// IsSuccess returns true when this update backup job o k response has a 2xx status code -func (o *UpdateBackupJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update backup job o k response has a 3xx status code -func (o *UpdateBackupJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update backup job o k response has a 4xx status code -func (o *UpdateBackupJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update backup job o k response has a 5xx status code -func (o *UpdateBackupJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update backup job o k response a status code equal to that given -func (o *UpdateBackupJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update backup job o k response -func (o *UpdateBackupJobOK) Code() int { - return 200 -} - -func (o *UpdateBackupJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupjobs/{id}][%d] updateBackupJobOK %s", 200, payload) -} - -func (o *UpdateBackupJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupjobs/{id}][%d] updateBackupJobOK %s", 200, payload) -} - -func (o *UpdateBackupJobOK) GetPayload() *models.BackupJobWrapper { - return o.Payload -} - -func (o *UpdateBackupJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupJobWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateBackupJobDefault creates a UpdateBackupJobDefault with default headers values -func NewUpdateBackupJobDefault(code int) *UpdateBackupJobDefault { - return &UpdateBackupJobDefault{ - _statusCode: code, - } -} - -/* -UpdateBackupJobDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateBackupJobDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update backup job default response has a 2xx status code -func (o *UpdateBackupJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update backup job default response has a 3xx status code -func (o *UpdateBackupJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update backup job default response has a 4xx status code -func (o *UpdateBackupJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update backup job default response has a 5xx status code -func (o *UpdateBackupJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update backup job default response a status code equal to that given -func (o *UpdateBackupJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update backup job default response -func (o *UpdateBackupJobDefault) Code() int { - return o._statusCode -} - -func (o *UpdateBackupJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupjobs/{id}][%d] UpdateBackupJob default %s", o._statusCode, payload) -} - -func (o *UpdateBackupJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupjobs/{id}][%d] UpdateBackupJob default %s", o._statusCode, payload) -} - -func (o *UpdateBackupJobDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateBackupJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/backup_sources_client.go b/v1/client/backup_sources/backup_sources_client.go deleted file mode 100644 index aad5baab..00000000 --- a/v1/client/backup_sources/backup_sources_client.go +++ /dev/null @@ -1,777 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new backup sources API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new backup sources API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new backup sources API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for backup sources API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteAppOwnerRegistration(params *DeleteAppOwnerRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAppOwnerRegistrationOK, error) - - DeleteBackupSource(params *DeleteBackupSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupSourceOK, error) - - GetBackupEntities(params *GetBackupEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupEntitiesOK, error) - - GetBackupEntityByID(params *GetBackupEntityByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupEntityByIDOK, error) - - GetDatastores(params *GetDatastoresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatastoresOK, error) - - GetNetworkEntities(params *GetNetworkEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNetworkEntitiesOK, error) - - GetResourcePools(params *GetResourcePoolsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResourcePoolsOK, error) - - GetVirtualMachines(params *GetVirtualMachinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVirtualMachinesOK, error) - - GetVmwareFolders(params *GetVmwareFoldersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVmwareFoldersOK, error) - - ListAppEntities(params *ListAppEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListAppEntitiesOK, error) - - ListBackupSources(params *ListBackupSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListBackupSourcesOK, error) - - ListEntitiesOfType(params *ListEntitiesOfTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListEntitiesOfTypeOK, error) - - ListRegisteredSourcesReport(params *ListRegisteredSourcesReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRegisteredSourcesReportOK, error) - - RegisterAppOwner(params *RegisterAppOwnerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterAppOwnerOK, error) - - RegisterBackupSource(params *RegisterBackupSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterBackupSourceOK, error) - - UpdateAppOwnerRegistration(params *UpdateAppOwnerRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppOwnerRegistrationOK, error) - - UpdateBackupSourceAccessInfo(params *UpdateBackupSourceAccessInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackupSourceAccessInfoOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteAppOwnerRegistration deletes an application owner registration - -Returns success if the application owner registration is deleted. -*/ -func (a *Client) DeleteAppOwnerRegistration(params *DeleteAppOwnerRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAppOwnerRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteAppOwnerRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteAppOwnerRegistration", - Method: "DELETE", - PathPattern: "/applicationSourceRegistration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteAppOwnerRegistrationReader{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.(*DeleteAppOwnerRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteAppOwnerRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteBackupSource deletes a backup source - -Returns success if the backup source is deleted. -*/ -func (a *Client) DeleteBackupSource(params *DeleteBackupSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupSourceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteBackupSourceParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteBackupSource", - Method: "DELETE", - PathPattern: "/backupsources/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteBackupSourceReader{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.(*DeleteBackupSourceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteBackupSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupEntities lists backup entities based on the input parameters - -Returns a list of backup entities based on the input parameters. -*/ -func (a *Client) GetBackupEntities(params *GetBackupEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupEntitiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupEntitiesParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupEntities", - Method: "GET", - PathPattern: "/backupEntities", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupEntitiesReader{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.(*GetBackupEntitiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupEntitiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackupEntityByID lists backup entity based on the input id - -Returns a backup entity based on the input id. -*/ -func (a *Client) GetBackupEntityByID(params *GetBackupEntityByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupEntityByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackupEntityByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackupEntityById", - Method: "GET", - PathPattern: "/backupEntities/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackupEntityByIDReader{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.(*GetBackupEntityByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackupEntityByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDatastores lists data stores for a resource pool - -Return the data stores for a resource pool. -*/ -func (a *Client) GetDatastores(params *GetDatastoresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDatastoresOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDatastoresParams() - } - op := &runtime.ClientOperation{ - ID: "GetDatastores", - Method: "GET", - PathPattern: "/datastores", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDatastoresReader{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.(*GetDatastoresOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDatastoresDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNetworkEntities lists network entities for a resource pool - -Returns network entites for a resource pool. -*/ -func (a *Client) GetNetworkEntities(params *GetNetworkEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNetworkEntitiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNetworkEntitiesParams() - } - op := &runtime.ClientOperation{ - ID: "GetNetworkEntities", - Method: "GET", - PathPattern: "/networkEntities", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNetworkEntitiesReader{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.(*GetNetworkEntitiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNetworkEntitiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetResourcePools lists resource pools for a v center - -Returns resource pools for a vCenter. -*/ -func (a *Client) GetResourcePools(params *GetResourcePoolsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResourcePoolsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetResourcePoolsParams() - } - op := &runtime.ClientOperation{ - ID: "GetResourcePools", - Method: "GET", - PathPattern: "/resourcePools", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetResourcePoolsReader{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.(*GetResourcePoolsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetResourcePoolsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVirtualMachines lists virtual machines for a v center - -Returns a list of virtual machines for a vCenter. -*/ -func (a *Client) GetVirtualMachines(params *GetVirtualMachinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVirtualMachinesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVirtualMachinesParams() - } - op := &runtime.ClientOperation{ - ID: "GetVirtualMachines", - Method: "GET", - PathPattern: "/virtualMachines", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVirtualMachinesReader{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.(*GetVirtualMachinesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVirtualMachinesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVmwareFolders lists folder entities for a selected resource pool - -Returns folder entites for a resource pool. -*/ -func (a *Client) GetVmwareFolders(params *GetVmwareFoldersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVmwareFoldersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVmwareFoldersParams() - } - op := &runtime.ClientOperation{ - ID: "GetVmwareFolders", - Method: "GET", - PathPattern: "/vmwareFolders", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVmwareFoldersReader{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.(*GetVmwareFoldersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVmwareFoldersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListAppEntities lists the application entites - -Returns the application entities. -*/ -func (a *Client) ListAppEntities(params *ListAppEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListAppEntitiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListAppEntitiesParams() - } - op := &runtime.ClientOperation{ - ID: "ListAppEntities", - Method: "GET", - PathPattern: "/appEntities", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListAppEntitiesReader{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.(*ListAppEntitiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListAppEntitiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListBackupSources lists backup sources based on a particular criteria - -Returns a list of backup sources based on particular criteria. -*/ -func (a *Client) ListBackupSources(params *ListBackupSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListBackupSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListBackupSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "ListBackupSources", - Method: "GET", - PathPattern: "/backupsources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListBackupSourcesReader{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.(*ListBackupSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListBackupSourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListEntitiesOfType lists entities of certian type for example it can be used to list v ms and physical servers - -Returns a list of entities. -*/ -func (a *Client) ListEntitiesOfType(params *ListEntitiesOfTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListEntitiesOfTypeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListEntitiesOfTypeParams() - } - op := &runtime.ClientOperation{ - ID: "ListEntitiesOfType", - Method: "GET", - PathPattern: "/entitiesOfType", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListEntitiesOfTypeReader{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.(*ListEntitiesOfTypeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListEntitiesOfTypeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListRegisteredSourcesReport lists registered sources report based on the input parameters - -Returns a registered sources report based on the input parameters. -*/ -func (a *Client) ListRegisteredSourcesReport(params *ListRegisteredSourcesReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRegisteredSourcesReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListRegisteredSourcesReportParams() - } - op := &runtime.ClientOperation{ - ID: "ListRegisteredSourcesReport", - Method: "GET", - PathPattern: "/reports/backupsources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListRegisteredSourcesReportReader{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.(*ListRegisteredSourcesReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListRegisteredSourcesReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterAppOwner registers an entity for an application - -Returns success if the entity is registered for an application. -*/ -func (a *Client) RegisterAppOwner(params *RegisterAppOwnerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterAppOwnerOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterAppOwnerParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterAppOwner", - Method: "POST", - PathPattern: "/applicationSourceRegistration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterAppOwnerReader{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.(*RegisterAppOwnerOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterAppOwnerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterBackupSource registers a backup source - -Returns success if the backup source is registered. -*/ -func (a *Client) RegisterBackupSource(params *RegisterBackupSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterBackupSourceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterBackupSourceParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterBackupSource", - Method: "POST", - PathPattern: "/backupsources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterBackupSourceReader{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.(*RegisterBackupSourceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterBackupSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAppOwnerRegistration updates credentials for an application owner - -Returns success if the application owner credential is updated. -*/ -func (a *Client) UpdateAppOwnerRegistration(params *UpdateAppOwnerRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppOwnerRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAppOwnerRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAppOwnerRegistration", - Method: "PUT", - PathPattern: "/applicationSourceRegistration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAppOwnerRegistrationReader{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.(*UpdateAppOwnerRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAppOwnerRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateBackupSourceAccessInfo updates a backup source s access info - -Returns success if the backup source's access info. -*/ -func (a *Client) UpdateBackupSourceAccessInfo(params *UpdateBackupSourceAccessInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackupSourceAccessInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateBackupSourceAccessInfoParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateBackupSourceAccessInfo", - Method: "PUT", - PathPattern: "/backupsources/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateBackupSourceAccessInfoReader{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.(*UpdateBackupSourceAccessInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateBackupSourceAccessInfoDefault) - 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/backup_sources/delete_app_owner_registration_parameters.go b/v1/client/backup_sources/delete_app_owner_registration_parameters.go deleted file mode 100644 index 79fbf88d..00000000 --- a/v1/client/backup_sources/delete_app_owner_registration_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteAppOwnerRegistrationParams creates a new DeleteAppOwnerRegistrationParams 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 NewDeleteAppOwnerRegistrationParams() *DeleteAppOwnerRegistrationParams { - return &DeleteAppOwnerRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAppOwnerRegistrationParamsWithTimeout creates a new DeleteAppOwnerRegistrationParams object -// with the ability to set a timeout on a request. -func NewDeleteAppOwnerRegistrationParamsWithTimeout(timeout time.Duration) *DeleteAppOwnerRegistrationParams { - return &DeleteAppOwnerRegistrationParams{ - timeout: timeout, - } -} - -// NewDeleteAppOwnerRegistrationParamsWithContext creates a new DeleteAppOwnerRegistrationParams object -// with the ability to set a context for a request. -func NewDeleteAppOwnerRegistrationParamsWithContext(ctx context.Context) *DeleteAppOwnerRegistrationParams { - return &DeleteAppOwnerRegistrationParams{ - Context: ctx, - } -} - -// NewDeleteAppOwnerRegistrationParamsWithHTTPClient creates a new DeleteAppOwnerRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAppOwnerRegistrationParamsWithHTTPClient(client *http.Client) *DeleteAppOwnerRegistrationParams { - return &DeleteAppOwnerRegistrationParams{ - HTTPClient: client, - } -} - -/* -DeleteAppOwnerRegistrationParams contains all the parameters to send to the API endpoint - - for the delete app owner registration operation. - - Typically these are written to a http.Request. -*/ -type DeleteAppOwnerRegistrationParams struct { - - // Body. - Body *models.RegisterOrUpdateAppOwnerArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete app owner registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppOwnerRegistrationParams) WithDefaults() *DeleteAppOwnerRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete app owner registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAppOwnerRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) WithTimeout(timeout time.Duration) *DeleteAppOwnerRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) WithContext(ctx context.Context) *DeleteAppOwnerRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) WithHTTPClient(client *http.Client) *DeleteAppOwnerRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) WithBody(body *models.RegisterOrUpdateAppOwnerArg) *DeleteAppOwnerRegistrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete app owner registration params -func (o *DeleteAppOwnerRegistrationParams) SetBody(body *models.RegisterOrUpdateAppOwnerArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAppOwnerRegistrationParams) 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/backup_sources/delete_app_owner_registration_responses.go b/v1/client/backup_sources/delete_app_owner_registration_responses.go deleted file mode 100644 index 54b33740..00000000 --- a/v1/client/backup_sources/delete_app_owner_registration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteAppOwnerRegistrationReader is a Reader for the DeleteAppOwnerRegistration structure. -type DeleteAppOwnerRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAppOwnerRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteAppOwnerRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteAppOwnerRegistrationDefault(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 - } -} - -// NewDeleteAppOwnerRegistrationOK creates a DeleteAppOwnerRegistrationOK with default headers values -func NewDeleteAppOwnerRegistrationOK() *DeleteAppOwnerRegistrationOK { - return &DeleteAppOwnerRegistrationOK{} -} - -/* -DeleteAppOwnerRegistrationOK describes a response with status code 200, with default header values. - -Success Response -*/ -type DeleteAppOwnerRegistrationOK struct { -} - -// IsSuccess returns true when this delete app owner registration o k response has a 2xx status code -func (o *DeleteAppOwnerRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete app owner registration o k response has a 3xx status code -func (o *DeleteAppOwnerRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete app owner registration o k response has a 4xx status code -func (o *DeleteAppOwnerRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete app owner registration o k response has a 5xx status code -func (o *DeleteAppOwnerRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete app owner registration o k response a status code equal to that given -func (o *DeleteAppOwnerRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete app owner registration o k response -func (o *DeleteAppOwnerRegistrationOK) Code() int { - return 200 -} - -func (o *DeleteAppOwnerRegistrationOK) Error() string { - return fmt.Sprintf("[DELETE /applicationSourceRegistration][%d] deleteAppOwnerRegistrationOK", 200) -} - -func (o *DeleteAppOwnerRegistrationOK) String() string { - return fmt.Sprintf("[DELETE /applicationSourceRegistration][%d] deleteAppOwnerRegistrationOK", 200) -} - -func (o *DeleteAppOwnerRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteAppOwnerRegistrationDefault creates a DeleteAppOwnerRegistrationDefault with default headers values -func NewDeleteAppOwnerRegistrationDefault(code int) *DeleteAppOwnerRegistrationDefault { - return &DeleteAppOwnerRegistrationDefault{ - _statusCode: code, - } -} - -/* -DeleteAppOwnerRegistrationDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeleteAppOwnerRegistrationDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this delete app owner registration default response has a 2xx status code -func (o *DeleteAppOwnerRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete app owner registration default response has a 3xx status code -func (o *DeleteAppOwnerRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete app owner registration default response has a 4xx status code -func (o *DeleteAppOwnerRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete app owner registration default response has a 5xx status code -func (o *DeleteAppOwnerRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete app owner registration default response a status code equal to that given -func (o *DeleteAppOwnerRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete app owner registration default response -func (o *DeleteAppOwnerRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *DeleteAppOwnerRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /applicationSourceRegistration][%d] DeleteAppOwnerRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteAppOwnerRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /applicationSourceRegistration][%d] DeleteAppOwnerRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteAppOwnerRegistrationDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeleteAppOwnerRegistrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/delete_backup_source_parameters.go b/v1/client/backup_sources/delete_backup_source_parameters.go deleted file mode 100644 index 8b12615b..00000000 --- a/v1/client/backup_sources/delete_backup_source_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewDeleteBackupSourceParams creates a new DeleteBackupSourceParams 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 NewDeleteBackupSourceParams() *DeleteBackupSourceParams { - return &DeleteBackupSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteBackupSourceParamsWithTimeout creates a new DeleteBackupSourceParams object -// with the ability to set a timeout on a request. -func NewDeleteBackupSourceParamsWithTimeout(timeout time.Duration) *DeleteBackupSourceParams { - return &DeleteBackupSourceParams{ - timeout: timeout, - } -} - -// NewDeleteBackupSourceParamsWithContext creates a new DeleteBackupSourceParams object -// with the ability to set a context for a request. -func NewDeleteBackupSourceParamsWithContext(ctx context.Context) *DeleteBackupSourceParams { - return &DeleteBackupSourceParams{ - Context: ctx, - } -} - -// NewDeleteBackupSourceParamsWithHTTPClient creates a new DeleteBackupSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteBackupSourceParamsWithHTTPClient(client *http.Client) *DeleteBackupSourceParams { - return &DeleteBackupSourceParams{ - HTTPClient: client, - } -} - -/* -DeleteBackupSourceParams contains all the parameters to send to the API endpoint - - for the delete backup source operation. - - Typically these are written to a http.Request. -*/ -type DeleteBackupSourceParams struct { - - /* ID. - - Specifies a backup source's unique id - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete backup source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupSourceParams) WithDefaults() *DeleteBackupSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete backup source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBackupSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete backup source params -func (o *DeleteBackupSourceParams) WithTimeout(timeout time.Duration) *DeleteBackupSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete backup source params -func (o *DeleteBackupSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete backup source params -func (o *DeleteBackupSourceParams) WithContext(ctx context.Context) *DeleteBackupSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete backup source params -func (o *DeleteBackupSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete backup source params -func (o *DeleteBackupSourceParams) WithHTTPClient(client *http.Client) *DeleteBackupSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete backup source params -func (o *DeleteBackupSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete backup source params -func (o *DeleteBackupSourceParams) WithID(id int64) *DeleteBackupSourceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete backup source params -func (o *DeleteBackupSourceParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteBackupSourceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/delete_backup_source_responses.go b/v1/client/backup_sources/delete_backup_source_responses.go deleted file mode 100644 index e0466054..00000000 --- a/v1/client/backup_sources/delete_backup_source_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteBackupSourceReader is a Reader for the DeleteBackupSource structure. -type DeleteBackupSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteBackupSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteBackupSourceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteBackupSourceDefault(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 - } -} - -// NewDeleteBackupSourceOK creates a DeleteBackupSourceOK with default headers values -func NewDeleteBackupSourceOK() *DeleteBackupSourceOK { - return &DeleteBackupSourceOK{} -} - -/* -DeleteBackupSourceOK describes a response with status code 200, with default header values. - -Success Response -*/ -type DeleteBackupSourceOK struct { -} - -// IsSuccess returns true when this delete backup source o k response has a 2xx status code -func (o *DeleteBackupSourceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete backup source o k response has a 3xx status code -func (o *DeleteBackupSourceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete backup source o k response has a 4xx status code -func (o *DeleteBackupSourceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete backup source o k response has a 5xx status code -func (o *DeleteBackupSourceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete backup source o k response a status code equal to that given -func (o *DeleteBackupSourceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete backup source o k response -func (o *DeleteBackupSourceOK) Code() int { - return 200 -} - -func (o *DeleteBackupSourceOK) Error() string { - return fmt.Sprintf("[DELETE /backupsources/{id}][%d] deleteBackupSourceOK", 200) -} - -func (o *DeleteBackupSourceOK) String() string { - return fmt.Sprintf("[DELETE /backupsources/{id}][%d] deleteBackupSourceOK", 200) -} - -func (o *DeleteBackupSourceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteBackupSourceDefault creates a DeleteBackupSourceDefault with default headers values -func NewDeleteBackupSourceDefault(code int) *DeleteBackupSourceDefault { - return &DeleteBackupSourceDefault{ - _statusCode: code, - } -} - -/* -DeleteBackupSourceDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeleteBackupSourceDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this delete backup source default response has a 2xx status code -func (o *DeleteBackupSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete backup source default response has a 3xx status code -func (o *DeleteBackupSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete backup source default response has a 4xx status code -func (o *DeleteBackupSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete backup source default response has a 5xx status code -func (o *DeleteBackupSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete backup source default response a status code equal to that given -func (o *DeleteBackupSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete backup source default response -func (o *DeleteBackupSourceDefault) Code() int { - return o._statusCode -} - -func (o *DeleteBackupSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupsources/{id}][%d] DeleteBackupSource default %s", o._statusCode, payload) -} - -func (o *DeleteBackupSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /backupsources/{id}][%d] DeleteBackupSource default %s", o._statusCode, payload) -} - -func (o *DeleteBackupSourceDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeleteBackupSourceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_backup_entities_parameters.go b/v1/client/backup_sources/get_backup_entities_parameters.go deleted file mode 100644 index 00bebd8c..00000000 --- a/v1/client/backup_sources/get_backup_entities_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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" -) - -// NewGetBackupEntitiesParams creates a new GetBackupEntitiesParams 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 NewGetBackupEntitiesParams() *GetBackupEntitiesParams { - return &GetBackupEntitiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupEntitiesParamsWithTimeout creates a new GetBackupEntitiesParams object -// with the ability to set a timeout on a request. -func NewGetBackupEntitiesParamsWithTimeout(timeout time.Duration) *GetBackupEntitiesParams { - return &GetBackupEntitiesParams{ - timeout: timeout, - } -} - -// NewGetBackupEntitiesParamsWithContext creates a new GetBackupEntitiesParams object -// with the ability to set a context for a request. -func NewGetBackupEntitiesParamsWithContext(ctx context.Context) *GetBackupEntitiesParams { - return &GetBackupEntitiesParams{ - Context: ctx, - } -} - -// NewGetBackupEntitiesParamsWithHTTPClient creates a new GetBackupEntitiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupEntitiesParamsWithHTTPClient(client *http.Client) *GetBackupEntitiesParams { - return &GetBackupEntitiesParams{ - HTTPClient: client, - } -} - -/* -GetBackupEntitiesParams contains all the parameters to send to the API endpoint - - for the get backup entities operation. - - Typically these are written to a http.Request. -*/ -type GetBackupEntitiesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupEntitiesParams) WithDefaults() *GetBackupEntitiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupEntitiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup entities params -func (o *GetBackupEntitiesParams) WithTimeout(timeout time.Duration) *GetBackupEntitiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup entities params -func (o *GetBackupEntitiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup entities params -func (o *GetBackupEntitiesParams) WithContext(ctx context.Context) *GetBackupEntitiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup entities params -func (o *GetBackupEntitiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup entities params -func (o *GetBackupEntitiesParams) WithHTTPClient(client *http.Client) *GetBackupEntitiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup entities params -func (o *GetBackupEntitiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupEntitiesParams) 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/backup_sources/get_backup_entities_responses.go b/v1/client/backup_sources/get_backup_entities_responses.go deleted file mode 100644 index 011411ec..00000000 --- a/v1/client/backup_sources/get_backup_entities_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupEntitiesReader is a Reader for the GetBackupEntities structure. -type GetBackupEntitiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupEntitiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupEntitiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupEntitiesDefault(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 - } -} - -// NewGetBackupEntitiesOK creates a GetBackupEntitiesOK with default headers values -func NewGetBackupEntitiesOK() *GetBackupEntitiesOK { - return &GetBackupEntitiesOK{} -} - -/* -GetBackupEntitiesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupEntitiesOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this get backup entities o k response has a 2xx status code -func (o *GetBackupEntitiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup entities o k response has a 3xx status code -func (o *GetBackupEntitiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup entities o k response has a 4xx status code -func (o *GetBackupEntitiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup entities o k response has a 5xx status code -func (o *GetBackupEntitiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup entities o k response a status code equal to that given -func (o *GetBackupEntitiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup entities o k response -func (o *GetBackupEntitiesOK) Code() int { - return 200 -} - -func (o *GetBackupEntitiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities][%d] getBackupEntitiesOK %s", 200, payload) -} - -func (o *GetBackupEntitiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities][%d] getBackupEntitiesOK %s", 200, payload) -} - -func (o *GetBackupEntitiesOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *GetBackupEntitiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupEntitiesDefault creates a GetBackupEntitiesDefault with default headers values -func NewGetBackupEntitiesDefault(code int) *GetBackupEntitiesDefault { - return &GetBackupEntitiesDefault{ - _statusCode: code, - } -} - -/* -GetBackupEntitiesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupEntitiesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup entities default response has a 2xx status code -func (o *GetBackupEntitiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup entities default response has a 3xx status code -func (o *GetBackupEntitiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup entities default response has a 4xx status code -func (o *GetBackupEntitiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup entities default response has a 5xx status code -func (o *GetBackupEntitiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup entities default response a status code equal to that given -func (o *GetBackupEntitiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup entities default response -func (o *GetBackupEntitiesDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupEntitiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities][%d] GetBackupEntities default %s", o._statusCode, payload) -} - -func (o *GetBackupEntitiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities][%d] GetBackupEntities default %s", o._statusCode, payload) -} - -func (o *GetBackupEntitiesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupEntitiesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_backup_entity_by_id_parameters.go b/v1/client/backup_sources/get_backup_entity_by_id_parameters.go deleted file mode 100644 index 34d38c1a..00000000 --- a/v1/client/backup_sources/get_backup_entity_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewGetBackupEntityByIDParams creates a new GetBackupEntityByIDParams 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 NewGetBackupEntityByIDParams() *GetBackupEntityByIDParams { - return &GetBackupEntityByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackupEntityByIDParamsWithTimeout creates a new GetBackupEntityByIDParams object -// with the ability to set a timeout on a request. -func NewGetBackupEntityByIDParamsWithTimeout(timeout time.Duration) *GetBackupEntityByIDParams { - return &GetBackupEntityByIDParams{ - timeout: timeout, - } -} - -// NewGetBackupEntityByIDParamsWithContext creates a new GetBackupEntityByIDParams object -// with the ability to set a context for a request. -func NewGetBackupEntityByIDParamsWithContext(ctx context.Context) *GetBackupEntityByIDParams { - return &GetBackupEntityByIDParams{ - Context: ctx, - } -} - -// NewGetBackupEntityByIDParamsWithHTTPClient creates a new GetBackupEntityByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackupEntityByIDParamsWithHTTPClient(client *http.Client) *GetBackupEntityByIDParams { - return &GetBackupEntityByIDParams{ - HTTPClient: client, - } -} - -/* -GetBackupEntityByIDParams contains all the parameters to send to the API endpoint - - for the get backup entity by Id operation. - - Typically these are written to a http.Request. -*/ -type GetBackupEntityByIDParams struct { - - /* ID. - - Specifies a backup source's unique id - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get backup entity by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupEntityByIDParams) WithDefaults() *GetBackupEntityByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get backup entity by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackupEntityByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) WithTimeout(timeout time.Duration) *GetBackupEntityByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) WithContext(ctx context.Context) *GetBackupEntityByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) WithHTTPClient(client *http.Client) *GetBackupEntityByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) WithID(id int64) *GetBackupEntityByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get backup entity by Id params -func (o *GetBackupEntityByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackupEntityByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/get_backup_entity_by_id_responses.go b/v1/client/backup_sources/get_backup_entity_by_id_responses.go deleted file mode 100644 index b929e782..00000000 --- a/v1/client/backup_sources/get_backup_entity_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackupEntityByIDReader is a Reader for the GetBackupEntityByID structure. -type GetBackupEntityByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackupEntityByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackupEntityByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackupEntityByIDDefault(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 - } -} - -// NewGetBackupEntityByIDOK creates a GetBackupEntityByIDOK with default headers values -func NewGetBackupEntityByIDOK() *GetBackupEntityByIDOK { - return &GetBackupEntityByIDOK{} -} - -/* -GetBackupEntityByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackupEntityByIDOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this get backup entity by Id o k response has a 2xx status code -func (o *GetBackupEntityByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get backup entity by Id o k response has a 3xx status code -func (o *GetBackupEntityByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get backup entity by Id o k response has a 4xx status code -func (o *GetBackupEntityByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get backup entity by Id o k response has a 5xx status code -func (o *GetBackupEntityByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get backup entity by Id o k response a status code equal to that given -func (o *GetBackupEntityByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get backup entity by Id o k response -func (o *GetBackupEntityByIDOK) Code() int { - return 200 -} - -func (o *GetBackupEntityByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities/{id}][%d] getBackupEntityByIdOK %s", 200, payload) -} - -func (o *GetBackupEntityByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities/{id}][%d] getBackupEntityByIdOK %s", 200, payload) -} - -func (o *GetBackupEntityByIDOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *GetBackupEntityByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackupEntityByIDDefault creates a GetBackupEntityByIDDefault with default headers values -func NewGetBackupEntityByIDDefault(code int) *GetBackupEntityByIDDefault { - return &GetBackupEntityByIDDefault{ - _statusCode: code, - } -} - -/* -GetBackupEntityByIDDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetBackupEntityByIDDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get backup entity by Id default response has a 2xx status code -func (o *GetBackupEntityByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get backup entity by Id default response has a 3xx status code -func (o *GetBackupEntityByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get backup entity by Id default response has a 4xx status code -func (o *GetBackupEntityByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get backup entity by Id default response has a 5xx status code -func (o *GetBackupEntityByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get backup entity by Id default response a status code equal to that given -func (o *GetBackupEntityByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get backup entity by Id default response -func (o *GetBackupEntityByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetBackupEntityByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities/{id}][%d] GetBackupEntityById default %s", o._statusCode, payload) -} - -func (o *GetBackupEntityByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupEntities/{id}][%d] GetBackupEntityById default %s", o._statusCode, payload) -} - -func (o *GetBackupEntityByIDDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetBackupEntityByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_datastores_parameters.go b/v1/client/backup_sources/get_datastores_parameters.go deleted file mode 100644 index 6465afe1..00000000 --- a/v1/client/backup_sources/get_datastores_parameters.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewGetDatastoresParams creates a new GetDatastoresParams 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 NewGetDatastoresParams() *GetDatastoresParams { - return &GetDatastoresParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDatastoresParamsWithTimeout creates a new GetDatastoresParams object -// with the ability to set a timeout on a request. -func NewGetDatastoresParamsWithTimeout(timeout time.Duration) *GetDatastoresParams { - return &GetDatastoresParams{ - timeout: timeout, - } -} - -// NewGetDatastoresParamsWithContext creates a new GetDatastoresParams object -// with the ability to set a context for a request. -func NewGetDatastoresParamsWithContext(ctx context.Context) *GetDatastoresParams { - return &GetDatastoresParams{ - Context: ctx, - } -} - -// NewGetDatastoresParamsWithHTTPClient creates a new GetDatastoresParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDatastoresParamsWithHTTPClient(client *http.Client) *GetDatastoresParams { - return &GetDatastoresParams{ - HTTPClient: client, - } -} - -/* -GetDatastoresParams contains all the parameters to send to the API endpoint - - for the get datastores operation. - - Typically these are written to a http.Request. -*/ -type GetDatastoresParams struct { - - /* ResourcePoolID. - - ResourcePoolId specifies the entity Id of the resource pool. - - Format: int64 - */ - ResourcePoolID *int64 - - /* ReturnOnlyDatastoreClusters. - - Flag if set to true, only the datastore clusters would be returned. - */ - ReturnOnlyDatastoreClusters *bool - - /* SkipDatacenterLevel. - - SkipDatacenterLevel specifies if we should skip fetching the Datastores - from Datacenter level. If no Datastore is found at Cluster level, - Datastores are fetched from Datacenter level. Set this param to true to - avoid call at Datacenter level. - */ - SkipDatacenterLevel *bool - - /* VCenterID. - - VCenterId specifies the entity Id of the vCenter. - - Format: int64 - */ - VCenterID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get datastores params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDatastoresParams) WithDefaults() *GetDatastoresParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get datastores params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDatastoresParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get datastores params -func (o *GetDatastoresParams) WithTimeout(timeout time.Duration) *GetDatastoresParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get datastores params -func (o *GetDatastoresParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get datastores params -func (o *GetDatastoresParams) WithContext(ctx context.Context) *GetDatastoresParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get datastores params -func (o *GetDatastoresParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get datastores params -func (o *GetDatastoresParams) WithHTTPClient(client *http.Client) *GetDatastoresParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get datastores params -func (o *GetDatastoresParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResourcePoolID adds the resourcePoolID to the get datastores params -func (o *GetDatastoresParams) WithResourcePoolID(resourcePoolID *int64) *GetDatastoresParams { - o.SetResourcePoolID(resourcePoolID) - return o -} - -// SetResourcePoolID adds the resourcePoolId to the get datastores params -func (o *GetDatastoresParams) SetResourcePoolID(resourcePoolID *int64) { - o.ResourcePoolID = resourcePoolID -} - -// WithReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get datastores params -func (o *GetDatastoresParams) WithReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) *GetDatastoresParams { - o.SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters) - return o -} - -// SetReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get datastores params -func (o *GetDatastoresParams) SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) { - o.ReturnOnlyDatastoreClusters = returnOnlyDatastoreClusters -} - -// WithSkipDatacenterLevel adds the skipDatacenterLevel to the get datastores params -func (o *GetDatastoresParams) WithSkipDatacenterLevel(skipDatacenterLevel *bool) *GetDatastoresParams { - o.SetSkipDatacenterLevel(skipDatacenterLevel) - return o -} - -// SetSkipDatacenterLevel adds the skipDatacenterLevel to the get datastores params -func (o *GetDatastoresParams) SetSkipDatacenterLevel(skipDatacenterLevel *bool) { - o.SkipDatacenterLevel = skipDatacenterLevel -} - -// WithVCenterID adds the vCenterID to the get datastores params -func (o *GetDatastoresParams) WithVCenterID(vCenterID *int64) *GetDatastoresParams { - o.SetVCenterID(vCenterID) - return o -} - -// SetVCenterID adds the vCenterId to the get datastores params -func (o *GetDatastoresParams) SetVCenterID(vCenterID *int64) { - o.VCenterID = vCenterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDatastoresParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ResourcePoolID != nil { - - // query param resourcePoolId - var qrResourcePoolID int64 - - if o.ResourcePoolID != nil { - qrResourcePoolID = *o.ResourcePoolID - } - qResourcePoolID := swag.FormatInt64(qrResourcePoolID) - if qResourcePoolID != "" { - - if err := r.SetQueryParam("resourcePoolId", qResourcePoolID); err != nil { - return err - } - } - } - - if o.ReturnOnlyDatastoreClusters != nil { - - // query param returnOnlyDatastoreClusters - var qrReturnOnlyDatastoreClusters bool - - if o.ReturnOnlyDatastoreClusters != nil { - qrReturnOnlyDatastoreClusters = *o.ReturnOnlyDatastoreClusters - } - qReturnOnlyDatastoreClusters := swag.FormatBool(qrReturnOnlyDatastoreClusters) - if qReturnOnlyDatastoreClusters != "" { - - if err := r.SetQueryParam("returnOnlyDatastoreClusters", qReturnOnlyDatastoreClusters); err != nil { - return err - } - } - } - - if o.SkipDatacenterLevel != nil { - - // query param skipDatacenterLevel - var qrSkipDatacenterLevel bool - - if o.SkipDatacenterLevel != nil { - qrSkipDatacenterLevel = *o.SkipDatacenterLevel - } - qSkipDatacenterLevel := swag.FormatBool(qrSkipDatacenterLevel) - if qSkipDatacenterLevel != "" { - - if err := r.SetQueryParam("skipDatacenterLevel", qSkipDatacenterLevel); err != nil { - return err - } - } - } - - if o.VCenterID != nil { - - // query param vCenterId - var qrVCenterID int64 - - if o.VCenterID != nil { - qrVCenterID = *o.VCenterID - } - qVCenterID := swag.FormatInt64(qrVCenterID) - if qVCenterID != "" { - - if err := r.SetQueryParam("vCenterId", qVCenterID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/get_datastores_responses.go b/v1/client/backup_sources/get_datastores_responses.go deleted file mode 100644 index 9a153bb5..00000000 --- a/v1/client/backup_sources/get_datastores_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDatastoresReader is a Reader for the GetDatastores structure. -type GetDatastoresReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDatastoresReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDatastoresOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDatastoresDefault(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 - } -} - -// NewGetDatastoresOK creates a GetDatastoresOK with default headers values -func NewGetDatastoresOK() *GetDatastoresOK { - return &GetDatastoresOK{} -} - -/* -GetDatastoresOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDatastoresOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this get datastores o k response has a 2xx status code -func (o *GetDatastoresOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get datastores o k response has a 3xx status code -func (o *GetDatastoresOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get datastores o k response has a 4xx status code -func (o *GetDatastoresOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get datastores o k response has a 5xx status code -func (o *GetDatastoresOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get datastores o k response a status code equal to that given -func (o *GetDatastoresOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get datastores o k response -func (o *GetDatastoresOK) Code() int { - return 200 -} - -func (o *GetDatastoresOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /datastores][%d] getDatastoresOK %s", 200, payload) -} - -func (o *GetDatastoresOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /datastores][%d] getDatastoresOK %s", 200, payload) -} - -func (o *GetDatastoresOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *GetDatastoresOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDatastoresDefault creates a GetDatastoresDefault with default headers values -func NewGetDatastoresDefault(code int) *GetDatastoresDefault { - return &GetDatastoresDefault{ - _statusCode: code, - } -} - -/* -GetDatastoresDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetDatastoresDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get datastores default response has a 2xx status code -func (o *GetDatastoresDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get datastores default response has a 3xx status code -func (o *GetDatastoresDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get datastores default response has a 4xx status code -func (o *GetDatastoresDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get datastores default response has a 5xx status code -func (o *GetDatastoresDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get datastores default response a status code equal to that given -func (o *GetDatastoresDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get datastores default response -func (o *GetDatastoresDefault) Code() int { - return o._statusCode -} - -func (o *GetDatastoresDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /datastores][%d] GetDatastores default %s", o._statusCode, payload) -} - -func (o *GetDatastoresDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /datastores][%d] GetDatastores default %s", o._statusCode, payload) -} - -func (o *GetDatastoresDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetDatastoresDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_network_entities_parameters.go b/v1/client/backup_sources/get_network_entities_parameters.go deleted file mode 100644 index 0e628534..00000000 --- a/v1/client/backup_sources/get_network_entities_parameters.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewGetNetworkEntitiesParams creates a new GetNetworkEntitiesParams 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 NewGetNetworkEntitiesParams() *GetNetworkEntitiesParams { - return &GetNetworkEntitiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNetworkEntitiesParamsWithTimeout creates a new GetNetworkEntitiesParams object -// with the ability to set a timeout on a request. -func NewGetNetworkEntitiesParamsWithTimeout(timeout time.Duration) *GetNetworkEntitiesParams { - return &GetNetworkEntitiesParams{ - timeout: timeout, - } -} - -// NewGetNetworkEntitiesParamsWithContext creates a new GetNetworkEntitiesParams object -// with the ability to set a context for a request. -func NewGetNetworkEntitiesParamsWithContext(ctx context.Context) *GetNetworkEntitiesParams { - return &GetNetworkEntitiesParams{ - Context: ctx, - } -} - -// NewGetNetworkEntitiesParamsWithHTTPClient creates a new GetNetworkEntitiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNetworkEntitiesParamsWithHTTPClient(client *http.Client) *GetNetworkEntitiesParams { - return &GetNetworkEntitiesParams{ - HTTPClient: client, - } -} - -/* -GetNetworkEntitiesParams contains all the parameters to send to the API endpoint - - for the get network entities operation. - - Typically these are written to a http.Request. -*/ -type GetNetworkEntitiesParams struct { - - /* ResourcePoolID. - - ResourcePoolId specifies the entity Id of the resource pool. - - Format: int64 - */ - ResourcePoolID *int64 - - /* ReturnOnlyDatastoreClusters. - - Flag if set to true, only the datastore clusters would be returned. - */ - ReturnOnlyDatastoreClusters *bool - - /* SkipDatacenterLevel. - - SkipDatacenterLevel specifies if we should skip fetching the Datastores - from Datacenter level. If no Datastore is found at Cluster level, - Datastores are fetched from Datacenter level. Set this param to true to - avoid call at Datacenter level. - */ - SkipDatacenterLevel *bool - - /* VCenterID. - - VCenterId specifies the entity Id of the vCenter. - - Format: int64 - */ - VCenterID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get network entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNetworkEntitiesParams) WithDefaults() *GetNetworkEntitiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get network entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNetworkEntitiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get network entities params -func (o *GetNetworkEntitiesParams) WithTimeout(timeout time.Duration) *GetNetworkEntitiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get network entities params -func (o *GetNetworkEntitiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get network entities params -func (o *GetNetworkEntitiesParams) WithContext(ctx context.Context) *GetNetworkEntitiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get network entities params -func (o *GetNetworkEntitiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get network entities params -func (o *GetNetworkEntitiesParams) WithHTTPClient(client *http.Client) *GetNetworkEntitiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get network entities params -func (o *GetNetworkEntitiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResourcePoolID adds the resourcePoolID to the get network entities params -func (o *GetNetworkEntitiesParams) WithResourcePoolID(resourcePoolID *int64) *GetNetworkEntitiesParams { - o.SetResourcePoolID(resourcePoolID) - return o -} - -// SetResourcePoolID adds the resourcePoolId to the get network entities params -func (o *GetNetworkEntitiesParams) SetResourcePoolID(resourcePoolID *int64) { - o.ResourcePoolID = resourcePoolID -} - -// WithReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get network entities params -func (o *GetNetworkEntitiesParams) WithReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) *GetNetworkEntitiesParams { - o.SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters) - return o -} - -// SetReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get network entities params -func (o *GetNetworkEntitiesParams) SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) { - o.ReturnOnlyDatastoreClusters = returnOnlyDatastoreClusters -} - -// WithSkipDatacenterLevel adds the skipDatacenterLevel to the get network entities params -func (o *GetNetworkEntitiesParams) WithSkipDatacenterLevel(skipDatacenterLevel *bool) *GetNetworkEntitiesParams { - o.SetSkipDatacenterLevel(skipDatacenterLevel) - return o -} - -// SetSkipDatacenterLevel adds the skipDatacenterLevel to the get network entities params -func (o *GetNetworkEntitiesParams) SetSkipDatacenterLevel(skipDatacenterLevel *bool) { - o.SkipDatacenterLevel = skipDatacenterLevel -} - -// WithVCenterID adds the vCenterID to the get network entities params -func (o *GetNetworkEntitiesParams) WithVCenterID(vCenterID *int64) *GetNetworkEntitiesParams { - o.SetVCenterID(vCenterID) - return o -} - -// SetVCenterID adds the vCenterId to the get network entities params -func (o *GetNetworkEntitiesParams) SetVCenterID(vCenterID *int64) { - o.VCenterID = vCenterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNetworkEntitiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ResourcePoolID != nil { - - // query param resourcePoolId - var qrResourcePoolID int64 - - if o.ResourcePoolID != nil { - qrResourcePoolID = *o.ResourcePoolID - } - qResourcePoolID := swag.FormatInt64(qrResourcePoolID) - if qResourcePoolID != "" { - - if err := r.SetQueryParam("resourcePoolId", qResourcePoolID); err != nil { - return err - } - } - } - - if o.ReturnOnlyDatastoreClusters != nil { - - // query param returnOnlyDatastoreClusters - var qrReturnOnlyDatastoreClusters bool - - if o.ReturnOnlyDatastoreClusters != nil { - qrReturnOnlyDatastoreClusters = *o.ReturnOnlyDatastoreClusters - } - qReturnOnlyDatastoreClusters := swag.FormatBool(qrReturnOnlyDatastoreClusters) - if qReturnOnlyDatastoreClusters != "" { - - if err := r.SetQueryParam("returnOnlyDatastoreClusters", qReturnOnlyDatastoreClusters); err != nil { - return err - } - } - } - - if o.SkipDatacenterLevel != nil { - - // query param skipDatacenterLevel - var qrSkipDatacenterLevel bool - - if o.SkipDatacenterLevel != nil { - qrSkipDatacenterLevel = *o.SkipDatacenterLevel - } - qSkipDatacenterLevel := swag.FormatBool(qrSkipDatacenterLevel) - if qSkipDatacenterLevel != "" { - - if err := r.SetQueryParam("skipDatacenterLevel", qSkipDatacenterLevel); err != nil { - return err - } - } - } - - if o.VCenterID != nil { - - // query param vCenterId - var qrVCenterID int64 - - if o.VCenterID != nil { - qrVCenterID = *o.VCenterID - } - qVCenterID := swag.FormatInt64(qrVCenterID) - if qVCenterID != "" { - - if err := r.SetQueryParam("vCenterId", qVCenterID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/get_network_entities_responses.go b/v1/client/backup_sources/get_network_entities_responses.go deleted file mode 100644 index 7d7cf866..00000000 --- a/v1/client/backup_sources/get_network_entities_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNetworkEntitiesReader is a Reader for the GetNetworkEntities structure. -type GetNetworkEntitiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNetworkEntitiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNetworkEntitiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNetworkEntitiesDefault(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 - } -} - -// NewGetNetworkEntitiesOK creates a GetNetworkEntitiesOK with default headers values -func NewGetNetworkEntitiesOK() *GetNetworkEntitiesOK { - return &GetNetworkEntitiesOK{} -} - -/* -GetNetworkEntitiesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNetworkEntitiesOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this get network entities o k response has a 2xx status code -func (o *GetNetworkEntitiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get network entities o k response has a 3xx status code -func (o *GetNetworkEntitiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get network entities o k response has a 4xx status code -func (o *GetNetworkEntitiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get network entities o k response has a 5xx status code -func (o *GetNetworkEntitiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get network entities o k response a status code equal to that given -func (o *GetNetworkEntitiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get network entities o k response -func (o *GetNetworkEntitiesOK) Code() int { - return 200 -} - -func (o *GetNetworkEntitiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /networkEntities][%d] getNetworkEntitiesOK %s", 200, payload) -} - -func (o *GetNetworkEntitiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /networkEntities][%d] getNetworkEntitiesOK %s", 200, payload) -} - -func (o *GetNetworkEntitiesOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *GetNetworkEntitiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNetworkEntitiesDefault creates a GetNetworkEntitiesDefault with default headers values -func NewGetNetworkEntitiesDefault(code int) *GetNetworkEntitiesDefault { - return &GetNetworkEntitiesDefault{ - _statusCode: code, - } -} - -/* -GetNetworkEntitiesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetNetworkEntitiesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get network entities default response has a 2xx status code -func (o *GetNetworkEntitiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get network entities default response has a 3xx status code -func (o *GetNetworkEntitiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get network entities default response has a 4xx status code -func (o *GetNetworkEntitiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get network entities default response has a 5xx status code -func (o *GetNetworkEntitiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get network entities default response a status code equal to that given -func (o *GetNetworkEntitiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get network entities default response -func (o *GetNetworkEntitiesDefault) Code() int { - return o._statusCode -} - -func (o *GetNetworkEntitiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /networkEntities][%d] GetNetworkEntities default %s", o._statusCode, payload) -} - -func (o *GetNetworkEntitiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /networkEntities][%d] GetNetworkEntities default %s", o._statusCode, payload) -} - -func (o *GetNetworkEntitiesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetNetworkEntitiesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_resource_pools_parameters.go b/v1/client/backup_sources/get_resource_pools_parameters.go deleted file mode 100644 index dd68a80d..00000000 --- a/v1/client/backup_sources/get_resource_pools_parameters.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewGetResourcePoolsParams creates a new GetResourcePoolsParams 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 NewGetResourcePoolsParams() *GetResourcePoolsParams { - return &GetResourcePoolsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetResourcePoolsParamsWithTimeout creates a new GetResourcePoolsParams object -// with the ability to set a timeout on a request. -func NewGetResourcePoolsParamsWithTimeout(timeout time.Duration) *GetResourcePoolsParams { - return &GetResourcePoolsParams{ - timeout: timeout, - } -} - -// NewGetResourcePoolsParamsWithContext creates a new GetResourcePoolsParams object -// with the ability to set a context for a request. -func NewGetResourcePoolsParamsWithContext(ctx context.Context) *GetResourcePoolsParams { - return &GetResourcePoolsParams{ - Context: ctx, - } -} - -// NewGetResourcePoolsParamsWithHTTPClient creates a new GetResourcePoolsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetResourcePoolsParamsWithHTTPClient(client *http.Client) *GetResourcePoolsParams { - return &GetResourcePoolsParams{ - HTTPClient: client, - } -} - -/* -GetResourcePoolsParams contains all the parameters to send to the API endpoint - - for the get resource pools operation. - - Typically these are written to a http.Request. -*/ -type GetResourcePoolsParams struct { - - /* EnvType. - - EnvType is the type of entity i.e. physical or VMWare. - - Format: int32 - */ - EnvType *int32 - - /* VCenterID. - - VCenterId specifies the entity Id of the vCenter. - - Format: int64 - */ - VCenterID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get resource pools params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResourcePoolsParams) WithDefaults() *GetResourcePoolsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get resource pools params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResourcePoolsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get resource pools params -func (o *GetResourcePoolsParams) WithTimeout(timeout time.Duration) *GetResourcePoolsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get resource pools params -func (o *GetResourcePoolsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get resource pools params -func (o *GetResourcePoolsParams) WithContext(ctx context.Context) *GetResourcePoolsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get resource pools params -func (o *GetResourcePoolsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get resource pools params -func (o *GetResourcePoolsParams) WithHTTPClient(client *http.Client) *GetResourcePoolsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get resource pools params -func (o *GetResourcePoolsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnvType adds the envType to the get resource pools params -func (o *GetResourcePoolsParams) WithEnvType(envType *int32) *GetResourcePoolsParams { - o.SetEnvType(envType) - return o -} - -// SetEnvType adds the envType to the get resource pools params -func (o *GetResourcePoolsParams) SetEnvType(envType *int32) { - o.EnvType = envType -} - -// WithVCenterID adds the vCenterID to the get resource pools params -func (o *GetResourcePoolsParams) WithVCenterID(vCenterID *int64) *GetResourcePoolsParams { - o.SetVCenterID(vCenterID) - return o -} - -// SetVCenterID adds the vCenterId to the get resource pools params -func (o *GetResourcePoolsParams) SetVCenterID(vCenterID *int64) { - o.VCenterID = vCenterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetResourcePoolsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EnvType != nil { - - // query param envType - var qrEnvType int32 - - if o.EnvType != nil { - qrEnvType = *o.EnvType - } - qEnvType := swag.FormatInt32(qrEnvType) - if qEnvType != "" { - - if err := r.SetQueryParam("envType", qEnvType); err != nil { - return err - } - } - } - - if o.VCenterID != nil { - - // query param vCenterId - var qrVCenterID int64 - - if o.VCenterID != nil { - qrVCenterID = *o.VCenterID - } - qVCenterID := swag.FormatInt64(qrVCenterID) - if qVCenterID != "" { - - if err := r.SetQueryParam("vCenterId", qVCenterID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/get_resource_pools_responses.go b/v1/client/backup_sources/get_resource_pools_responses.go deleted file mode 100644 index 617fe08b..00000000 --- a/v1/client/backup_sources/get_resource_pools_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetResourcePoolsReader is a Reader for the GetResourcePools structure. -type GetResourcePoolsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetResourcePoolsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetResourcePoolsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetResourcePoolsDefault(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 - } -} - -// NewGetResourcePoolsOK creates a GetResourcePoolsOK with default headers values -func NewGetResourcePoolsOK() *GetResourcePoolsOK { - return &GetResourcePoolsOK{} -} - -/* -GetResourcePoolsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetResourcePoolsOK struct { - Payload []*models.ResourcePoolResult -} - -// IsSuccess returns true when this get resource pools o k response has a 2xx status code -func (o *GetResourcePoolsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get resource pools o k response has a 3xx status code -func (o *GetResourcePoolsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get resource pools o k response has a 4xx status code -func (o *GetResourcePoolsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get resource pools o k response has a 5xx status code -func (o *GetResourcePoolsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get resource pools o k response a status code equal to that given -func (o *GetResourcePoolsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get resource pools o k response -func (o *GetResourcePoolsOK) Code() int { - return 200 -} - -func (o *GetResourcePoolsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /resourcePools][%d] getResourcePoolsOK %s", 200, payload) -} - -func (o *GetResourcePoolsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /resourcePools][%d] getResourcePoolsOK %s", 200, payload) -} - -func (o *GetResourcePoolsOK) GetPayload() []*models.ResourcePoolResult { - return o.Payload -} - -func (o *GetResourcePoolsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetResourcePoolsDefault creates a GetResourcePoolsDefault with default headers values -func NewGetResourcePoolsDefault(code int) *GetResourcePoolsDefault { - return &GetResourcePoolsDefault{ - _statusCode: code, - } -} - -/* -GetResourcePoolsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetResourcePoolsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get resource pools default response has a 2xx status code -func (o *GetResourcePoolsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get resource pools default response has a 3xx status code -func (o *GetResourcePoolsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get resource pools default response has a 4xx status code -func (o *GetResourcePoolsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get resource pools default response has a 5xx status code -func (o *GetResourcePoolsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get resource pools default response a status code equal to that given -func (o *GetResourcePoolsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get resource pools default response -func (o *GetResourcePoolsDefault) Code() int { - return o._statusCode -} - -func (o *GetResourcePoolsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /resourcePools][%d] GetResourcePools default %s", o._statusCode, payload) -} - -func (o *GetResourcePoolsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /resourcePools][%d] GetResourcePools default %s", o._statusCode, payload) -} - -func (o *GetResourcePoolsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetResourcePoolsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_virtual_machines_parameters.go b/v1/client/backup_sources/get_virtual_machines_parameters.go deleted file mode 100644 index 7317ffa8..00000000 --- a/v1/client/backup_sources/get_virtual_machines_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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" -) - -// NewGetVirtualMachinesParams creates a new GetVirtualMachinesParams 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 NewGetVirtualMachinesParams() *GetVirtualMachinesParams { - return &GetVirtualMachinesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVirtualMachinesParamsWithTimeout creates a new GetVirtualMachinesParams object -// with the ability to set a timeout on a request. -func NewGetVirtualMachinesParamsWithTimeout(timeout time.Duration) *GetVirtualMachinesParams { - return &GetVirtualMachinesParams{ - timeout: timeout, - } -} - -// NewGetVirtualMachinesParamsWithContext creates a new GetVirtualMachinesParams object -// with the ability to set a context for a request. -func NewGetVirtualMachinesParamsWithContext(ctx context.Context) *GetVirtualMachinesParams { - return &GetVirtualMachinesParams{ - Context: ctx, - } -} - -// NewGetVirtualMachinesParamsWithHTTPClient creates a new GetVirtualMachinesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVirtualMachinesParamsWithHTTPClient(client *http.Client) *GetVirtualMachinesParams { - return &GetVirtualMachinesParams{ - HTTPClient: client, - } -} - -/* -GetVirtualMachinesParams contains all the parameters to send to the API endpoint - - for the get virtual machines operation. - - Typically these are written to a http.Request. -*/ -type GetVirtualMachinesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get virtual machines params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVirtualMachinesParams) WithDefaults() *GetVirtualMachinesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get virtual machines params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVirtualMachinesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get virtual machines params -func (o *GetVirtualMachinesParams) WithTimeout(timeout time.Duration) *GetVirtualMachinesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get virtual machines params -func (o *GetVirtualMachinesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get virtual machines params -func (o *GetVirtualMachinesParams) WithContext(ctx context.Context) *GetVirtualMachinesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get virtual machines params -func (o *GetVirtualMachinesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get virtual machines params -func (o *GetVirtualMachinesParams) WithHTTPClient(client *http.Client) *GetVirtualMachinesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get virtual machines params -func (o *GetVirtualMachinesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVirtualMachinesParams) 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/backup_sources/get_virtual_machines_responses.go b/v1/client/backup_sources/get_virtual_machines_responses.go deleted file mode 100644 index f28209fb..00000000 --- a/v1/client/backup_sources/get_virtual_machines_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVirtualMachinesReader is a Reader for the GetVirtualMachines structure. -type GetVirtualMachinesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVirtualMachinesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVirtualMachinesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVirtualMachinesDefault(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 - } -} - -// NewGetVirtualMachinesOK creates a GetVirtualMachinesOK with default headers values -func NewGetVirtualMachinesOK() *GetVirtualMachinesOK { - return &GetVirtualMachinesOK{} -} - -/* -GetVirtualMachinesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVirtualMachinesOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this get virtual machines o k response has a 2xx status code -func (o *GetVirtualMachinesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get virtual machines o k response has a 3xx status code -func (o *GetVirtualMachinesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get virtual machines o k response has a 4xx status code -func (o *GetVirtualMachinesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get virtual machines o k response has a 5xx status code -func (o *GetVirtualMachinesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get virtual machines o k response a status code equal to that given -func (o *GetVirtualMachinesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get virtual machines o k response -func (o *GetVirtualMachinesOK) Code() int { - return 200 -} - -func (o *GetVirtualMachinesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /virtualMachines][%d] getVirtualMachinesOK %s", 200, payload) -} - -func (o *GetVirtualMachinesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /virtualMachines][%d] getVirtualMachinesOK %s", 200, payload) -} - -func (o *GetVirtualMachinesOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *GetVirtualMachinesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVirtualMachinesDefault creates a GetVirtualMachinesDefault with default headers values -func NewGetVirtualMachinesDefault(code int) *GetVirtualMachinesDefault { - return &GetVirtualMachinesDefault{ - _statusCode: code, - } -} - -/* -GetVirtualMachinesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetVirtualMachinesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get virtual machines default response has a 2xx status code -func (o *GetVirtualMachinesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get virtual machines default response has a 3xx status code -func (o *GetVirtualMachinesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get virtual machines default response has a 4xx status code -func (o *GetVirtualMachinesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get virtual machines default response has a 5xx status code -func (o *GetVirtualMachinesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get virtual machines default response a status code equal to that given -func (o *GetVirtualMachinesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get virtual machines default response -func (o *GetVirtualMachinesDefault) Code() int { - return o._statusCode -} - -func (o *GetVirtualMachinesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /virtualMachines][%d] GetVirtualMachines default %s", o._statusCode, payload) -} - -func (o *GetVirtualMachinesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /virtualMachines][%d] GetVirtualMachines default %s", o._statusCode, payload) -} - -func (o *GetVirtualMachinesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetVirtualMachinesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/get_vmware_folders_parameters.go b/v1/client/backup_sources/get_vmware_folders_parameters.go deleted file mode 100644 index 198830f5..00000000 --- a/v1/client/backup_sources/get_vmware_folders_parameters.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewGetVmwareFoldersParams creates a new GetVmwareFoldersParams 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 NewGetVmwareFoldersParams() *GetVmwareFoldersParams { - return &GetVmwareFoldersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVmwareFoldersParamsWithTimeout creates a new GetVmwareFoldersParams object -// with the ability to set a timeout on a request. -func NewGetVmwareFoldersParamsWithTimeout(timeout time.Duration) *GetVmwareFoldersParams { - return &GetVmwareFoldersParams{ - timeout: timeout, - } -} - -// NewGetVmwareFoldersParamsWithContext creates a new GetVmwareFoldersParams object -// with the ability to set a context for a request. -func NewGetVmwareFoldersParamsWithContext(ctx context.Context) *GetVmwareFoldersParams { - return &GetVmwareFoldersParams{ - Context: ctx, - } -} - -// NewGetVmwareFoldersParamsWithHTTPClient creates a new GetVmwareFoldersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVmwareFoldersParamsWithHTTPClient(client *http.Client) *GetVmwareFoldersParams { - return &GetVmwareFoldersParams{ - HTTPClient: client, - } -} - -/* -GetVmwareFoldersParams contains all the parameters to send to the API endpoint - - for the get vmware folders operation. - - Typically these are written to a http.Request. -*/ -type GetVmwareFoldersParams struct { - - /* ResourcePoolID. - - ResourcePoolId specifies the entity Id of the resource pool. - - Format: int64 - */ - ResourcePoolID *int64 - - /* ReturnOnlyDatastoreClusters. - - Flag if set to true, only the datastore clusters would be returned. - */ - ReturnOnlyDatastoreClusters *bool - - /* SkipDatacenterLevel. - - SkipDatacenterLevel specifies if we should skip fetching the Datastores - from Datacenter level. If no Datastore is found at Cluster level, - Datastores are fetched from Datacenter level. Set this param to true to - avoid call at Datacenter level. - */ - SkipDatacenterLevel *bool - - /* VCenterID. - - VCenterId specifies the entity Id of the vCenter. - - Format: int64 - */ - VCenterID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vmware folders params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVmwareFoldersParams) WithDefaults() *GetVmwareFoldersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vmware folders params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVmwareFoldersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vmware folders params -func (o *GetVmwareFoldersParams) WithTimeout(timeout time.Duration) *GetVmwareFoldersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vmware folders params -func (o *GetVmwareFoldersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vmware folders params -func (o *GetVmwareFoldersParams) WithContext(ctx context.Context) *GetVmwareFoldersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vmware folders params -func (o *GetVmwareFoldersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vmware folders params -func (o *GetVmwareFoldersParams) WithHTTPClient(client *http.Client) *GetVmwareFoldersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vmware folders params -func (o *GetVmwareFoldersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResourcePoolID adds the resourcePoolID to the get vmware folders params -func (o *GetVmwareFoldersParams) WithResourcePoolID(resourcePoolID *int64) *GetVmwareFoldersParams { - o.SetResourcePoolID(resourcePoolID) - return o -} - -// SetResourcePoolID adds the resourcePoolId to the get vmware folders params -func (o *GetVmwareFoldersParams) SetResourcePoolID(resourcePoolID *int64) { - o.ResourcePoolID = resourcePoolID -} - -// WithReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get vmware folders params -func (o *GetVmwareFoldersParams) WithReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) *GetVmwareFoldersParams { - o.SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters) - return o -} - -// SetReturnOnlyDatastoreClusters adds the returnOnlyDatastoreClusters to the get vmware folders params -func (o *GetVmwareFoldersParams) SetReturnOnlyDatastoreClusters(returnOnlyDatastoreClusters *bool) { - o.ReturnOnlyDatastoreClusters = returnOnlyDatastoreClusters -} - -// WithSkipDatacenterLevel adds the skipDatacenterLevel to the get vmware folders params -func (o *GetVmwareFoldersParams) WithSkipDatacenterLevel(skipDatacenterLevel *bool) *GetVmwareFoldersParams { - o.SetSkipDatacenterLevel(skipDatacenterLevel) - return o -} - -// SetSkipDatacenterLevel adds the skipDatacenterLevel to the get vmware folders params -func (o *GetVmwareFoldersParams) SetSkipDatacenterLevel(skipDatacenterLevel *bool) { - o.SkipDatacenterLevel = skipDatacenterLevel -} - -// WithVCenterID adds the vCenterID to the get vmware folders params -func (o *GetVmwareFoldersParams) WithVCenterID(vCenterID *int64) *GetVmwareFoldersParams { - o.SetVCenterID(vCenterID) - return o -} - -// SetVCenterID adds the vCenterId to the get vmware folders params -func (o *GetVmwareFoldersParams) SetVCenterID(vCenterID *int64) { - o.VCenterID = vCenterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVmwareFoldersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ResourcePoolID != nil { - - // query param resourcePoolId - var qrResourcePoolID int64 - - if o.ResourcePoolID != nil { - qrResourcePoolID = *o.ResourcePoolID - } - qResourcePoolID := swag.FormatInt64(qrResourcePoolID) - if qResourcePoolID != "" { - - if err := r.SetQueryParam("resourcePoolId", qResourcePoolID); err != nil { - return err - } - } - } - - if o.ReturnOnlyDatastoreClusters != nil { - - // query param returnOnlyDatastoreClusters - var qrReturnOnlyDatastoreClusters bool - - if o.ReturnOnlyDatastoreClusters != nil { - qrReturnOnlyDatastoreClusters = *o.ReturnOnlyDatastoreClusters - } - qReturnOnlyDatastoreClusters := swag.FormatBool(qrReturnOnlyDatastoreClusters) - if qReturnOnlyDatastoreClusters != "" { - - if err := r.SetQueryParam("returnOnlyDatastoreClusters", qReturnOnlyDatastoreClusters); err != nil { - return err - } - } - } - - if o.SkipDatacenterLevel != nil { - - // query param skipDatacenterLevel - var qrSkipDatacenterLevel bool - - if o.SkipDatacenterLevel != nil { - qrSkipDatacenterLevel = *o.SkipDatacenterLevel - } - qSkipDatacenterLevel := swag.FormatBool(qrSkipDatacenterLevel) - if qSkipDatacenterLevel != "" { - - if err := r.SetQueryParam("skipDatacenterLevel", qSkipDatacenterLevel); err != nil { - return err - } - } - } - - if o.VCenterID != nil { - - // query param vCenterId - var qrVCenterID int64 - - if o.VCenterID != nil { - qrVCenterID = *o.VCenterID - } - qVCenterID := swag.FormatInt64(qrVCenterID) - if qVCenterID != "" { - - if err := r.SetQueryParam("vCenterId", qVCenterID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/get_vmware_folders_responses.go b/v1/client/backup_sources/get_vmware_folders_responses.go deleted file mode 100644 index 21f2d9bf..00000000 --- a/v1/client/backup_sources/get_vmware_folders_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVmwareFoldersReader is a Reader for the GetVmwareFolders structure. -type GetVmwareFoldersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVmwareFoldersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVmwareFoldersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVmwareFoldersDefault(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 - } -} - -// NewGetVmwareFoldersOK creates a GetVmwareFoldersOK with default headers values -func NewGetVmwareFoldersOK() *GetVmwareFoldersOK { - return &GetVmwareFoldersOK{} -} - -/* -GetVmwareFoldersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVmwareFoldersOK struct { - Payload *models.VmwareFoldersResult -} - -// IsSuccess returns true when this get vmware folders o k response has a 2xx status code -func (o *GetVmwareFoldersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vmware folders o k response has a 3xx status code -func (o *GetVmwareFoldersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vmware folders o k response has a 4xx status code -func (o *GetVmwareFoldersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vmware folders o k response has a 5xx status code -func (o *GetVmwareFoldersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vmware folders o k response a status code equal to that given -func (o *GetVmwareFoldersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vmware folders o k response -func (o *GetVmwareFoldersOK) Code() int { - return 200 -} - -func (o *GetVmwareFoldersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vmwareFolders][%d] getVmwareFoldersOK %s", 200, payload) -} - -func (o *GetVmwareFoldersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vmwareFolders][%d] getVmwareFoldersOK %s", 200, payload) -} - -func (o *GetVmwareFoldersOK) GetPayload() *models.VmwareFoldersResult { - return o.Payload -} - -func (o *GetVmwareFoldersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VmwareFoldersResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVmwareFoldersDefault creates a GetVmwareFoldersDefault with default headers values -func NewGetVmwareFoldersDefault(code int) *GetVmwareFoldersDefault { - return &GetVmwareFoldersDefault{ - _statusCode: code, - } -} - -/* -GetVmwareFoldersDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetVmwareFoldersDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get vmware folders default response has a 2xx status code -func (o *GetVmwareFoldersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vmware folders default response has a 3xx status code -func (o *GetVmwareFoldersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vmware folders default response has a 4xx status code -func (o *GetVmwareFoldersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vmware folders default response has a 5xx status code -func (o *GetVmwareFoldersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vmware folders default response a status code equal to that given -func (o *GetVmwareFoldersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vmware folders default response -func (o *GetVmwareFoldersDefault) Code() int { - return o._statusCode -} - -func (o *GetVmwareFoldersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vmwareFolders][%d] GetVmwareFolders default %s", o._statusCode, payload) -} - -func (o *GetVmwareFoldersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vmwareFolders][%d] GetVmwareFolders default %s", o._statusCode, payload) -} - -func (o *GetVmwareFoldersDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetVmwareFoldersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/list_app_entities_parameters.go b/v1/client/backup_sources/list_app_entities_parameters.go deleted file mode 100644 index 201f913b..00000000 --- a/v1/client/backup_sources/list_app_entities_parameters.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewListAppEntitiesParams creates a new ListAppEntitiesParams 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 NewListAppEntitiesParams() *ListAppEntitiesParams { - return &ListAppEntitiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListAppEntitiesParamsWithTimeout creates a new ListAppEntitiesParams object -// with the ability to set a timeout on a request. -func NewListAppEntitiesParamsWithTimeout(timeout time.Duration) *ListAppEntitiesParams { - return &ListAppEntitiesParams{ - timeout: timeout, - } -} - -// NewListAppEntitiesParamsWithContext creates a new ListAppEntitiesParams object -// with the ability to set a context for a request. -func NewListAppEntitiesParamsWithContext(ctx context.Context) *ListAppEntitiesParams { - return &ListAppEntitiesParams{ - Context: ctx, - } -} - -// NewListAppEntitiesParamsWithHTTPClient creates a new ListAppEntitiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListAppEntitiesParamsWithHTTPClient(client *http.Client) *ListAppEntitiesParams { - return &ListAppEntitiesParams{ - HTTPClient: client, - } -} - -/* -ListAppEntitiesParams contains all the parameters to send to the API endpoint - - for the list app entities operation. - - Typically these are written to a http.Request. -*/ -type ListAppEntitiesParams struct { - - /* AppEnvType. - - AppEnvType is the type of application environment e.g. Environment_kSql - - Format: int32 - */ - AppEnvType *int32 - - /* EntityID. - - EntityId specifies the entity Id of the physical server or a VM. - - Format: int64 - */ - EntityID *int64 - - /* EnvType. - - EnvType is the type of entity i.e. physical or VMWare. - - Format: int32 - */ - EnvType *int32 - - /* NumLevels. - - Specifies the number of levels from the root node in the entity hierarchy - to be returned. - - Format: int32 - */ - NumLevels *int32 - - /* RootEntityID. - - RootEntityId specifies the entity Id of the root e.g. vCenter. - - Format: int64 - */ - RootEntityID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list app entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListAppEntitiesParams) WithDefaults() *ListAppEntitiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list app entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListAppEntitiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list app entities params -func (o *ListAppEntitiesParams) WithTimeout(timeout time.Duration) *ListAppEntitiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list app entities params -func (o *ListAppEntitiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list app entities params -func (o *ListAppEntitiesParams) WithContext(ctx context.Context) *ListAppEntitiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list app entities params -func (o *ListAppEntitiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list app entities params -func (o *ListAppEntitiesParams) WithHTTPClient(client *http.Client) *ListAppEntitiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list app entities params -func (o *ListAppEntitiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAppEnvType adds the appEnvType to the list app entities params -func (o *ListAppEntitiesParams) WithAppEnvType(appEnvType *int32) *ListAppEntitiesParams { - o.SetAppEnvType(appEnvType) - return o -} - -// SetAppEnvType adds the appEnvType to the list app entities params -func (o *ListAppEntitiesParams) SetAppEnvType(appEnvType *int32) { - o.AppEnvType = appEnvType -} - -// WithEntityID adds the entityID to the list app entities params -func (o *ListAppEntitiesParams) WithEntityID(entityID *int64) *ListAppEntitiesParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the list app entities params -func (o *ListAppEntitiesParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithEnvType adds the envType to the list app entities params -func (o *ListAppEntitiesParams) WithEnvType(envType *int32) *ListAppEntitiesParams { - o.SetEnvType(envType) - return o -} - -// SetEnvType adds the envType to the list app entities params -func (o *ListAppEntitiesParams) SetEnvType(envType *int32) { - o.EnvType = envType -} - -// WithNumLevels adds the numLevels to the list app entities params -func (o *ListAppEntitiesParams) WithNumLevels(numLevels *int32) *ListAppEntitiesParams { - o.SetNumLevels(numLevels) - return o -} - -// SetNumLevels adds the numLevels to the list app entities params -func (o *ListAppEntitiesParams) SetNumLevels(numLevels *int32) { - o.NumLevels = numLevels -} - -// WithRootEntityID adds the rootEntityID to the list app entities params -func (o *ListAppEntitiesParams) WithRootEntityID(rootEntityID *int64) *ListAppEntitiesParams { - o.SetRootEntityID(rootEntityID) - return o -} - -// SetRootEntityID adds the rootEntityId to the list app entities params -func (o *ListAppEntitiesParams) SetRootEntityID(rootEntityID *int64) { - o.RootEntityID = rootEntityID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListAppEntitiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AppEnvType != nil { - - // query param appEnvType - var qrAppEnvType int32 - - if o.AppEnvType != nil { - qrAppEnvType = *o.AppEnvType - } - qAppEnvType := swag.FormatInt32(qrAppEnvType) - if qAppEnvType != "" { - - if err := r.SetQueryParam("appEnvType", qAppEnvType); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.EnvType != nil { - - // query param envType - var qrEnvType int32 - - if o.EnvType != nil { - qrEnvType = *o.EnvType - } - qEnvType := swag.FormatInt32(qrEnvType) - if qEnvType != "" { - - if err := r.SetQueryParam("envType", qEnvType); err != nil { - return err - } - } - } - - if o.NumLevels != nil { - - // query param numLevels - var qrNumLevels int32 - - if o.NumLevels != nil { - qrNumLevels = *o.NumLevels - } - qNumLevels := swag.FormatInt32(qrNumLevels) - if qNumLevels != "" { - - if err := r.SetQueryParam("numLevels", qNumLevels); err != nil { - return err - } - } - } - - if o.RootEntityID != nil { - - // query param rootEntityId - var qrRootEntityID int64 - - if o.RootEntityID != nil { - qrRootEntityID = *o.RootEntityID - } - qRootEntityID := swag.FormatInt64(qrRootEntityID) - if qRootEntityID != "" { - - if err := r.SetQueryParam("rootEntityId", qRootEntityID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/list_app_entities_responses.go b/v1/client/backup_sources/list_app_entities_responses.go deleted file mode 100644 index 6d2b4ea3..00000000 --- a/v1/client/backup_sources/list_app_entities_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListAppEntitiesReader is a Reader for the ListAppEntities structure. -type ListAppEntitiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListAppEntitiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListAppEntitiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListAppEntitiesDefault(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 - } -} - -// NewListAppEntitiesOK creates a ListAppEntitiesOK with default headers values -func NewListAppEntitiesOK() *ListAppEntitiesOK { - return &ListAppEntitiesOK{} -} - -/* -ListAppEntitiesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListAppEntitiesOK struct { - Payload []*models.ListAppEntitiesResult -} - -// IsSuccess returns true when this list app entities o k response has a 2xx status code -func (o *ListAppEntitiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list app entities o k response has a 3xx status code -func (o *ListAppEntitiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list app entities o k response has a 4xx status code -func (o *ListAppEntitiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list app entities o k response has a 5xx status code -func (o *ListAppEntitiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list app entities o k response a status code equal to that given -func (o *ListAppEntitiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list app entities o k response -func (o *ListAppEntitiesOK) Code() int { - return 200 -} - -func (o *ListAppEntitiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /appEntities][%d] listAppEntitiesOK %s", 200, payload) -} - -func (o *ListAppEntitiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /appEntities][%d] listAppEntitiesOK %s", 200, payload) -} - -func (o *ListAppEntitiesOK) GetPayload() []*models.ListAppEntitiesResult { - return o.Payload -} - -func (o *ListAppEntitiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListAppEntitiesDefault creates a ListAppEntitiesDefault with default headers values -func NewListAppEntitiesDefault(code int) *ListAppEntitiesDefault { - return &ListAppEntitiesDefault{ - _statusCode: code, - } -} - -/* -ListAppEntitiesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ListAppEntitiesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this list app entities default response has a 2xx status code -func (o *ListAppEntitiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list app entities default response has a 3xx status code -func (o *ListAppEntitiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list app entities default response has a 4xx status code -func (o *ListAppEntitiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list app entities default response has a 5xx status code -func (o *ListAppEntitiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list app entities default response a status code equal to that given -func (o *ListAppEntitiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list app entities default response -func (o *ListAppEntitiesDefault) Code() int { - return o._statusCode -} - -func (o *ListAppEntitiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /appEntities][%d] ListAppEntities default %s", o._statusCode, payload) -} - -func (o *ListAppEntitiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /appEntities][%d] ListAppEntities default %s", o._statusCode, payload) -} - -func (o *ListAppEntitiesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ListAppEntitiesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/list_backup_sources_parameters.go b/v1/client/backup_sources/list_backup_sources_parameters.go deleted file mode 100644 index 30fed3c3..00000000 --- a/v1/client/backup_sources/list_backup_sources_parameters.go +++ /dev/null @@ -1,1358 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewListBackupSourcesParams creates a new ListBackupSourcesParams 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 NewListBackupSourcesParams() *ListBackupSourcesParams { - return &ListBackupSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListBackupSourcesParamsWithTimeout creates a new ListBackupSourcesParams object -// with the ability to set a timeout on a request. -func NewListBackupSourcesParamsWithTimeout(timeout time.Duration) *ListBackupSourcesParams { - return &ListBackupSourcesParams{ - timeout: timeout, - } -} - -// NewListBackupSourcesParamsWithContext creates a new ListBackupSourcesParams object -// with the ability to set a context for a request. -func NewListBackupSourcesParamsWithContext(ctx context.Context) *ListBackupSourcesParams { - return &ListBackupSourcesParams{ - Context: ctx, - } -} - -// NewListBackupSourcesParamsWithHTTPClient creates a new ListBackupSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListBackupSourcesParamsWithHTTPClient(client *http.Client) *ListBackupSourcesParams { - return &ListBackupSourcesParams{ - HTTPClient: client, - } -} - -/* -ListBackupSourcesParams contains all the parameters to send to the API endpoint - - for the list backup sources operation. - - Typically these are written to a http.Request. -*/ -type ListBackupSourcesParams struct { - - /* AfterCursorEntityID. - - Specifies the entity id starting from which the items are to be returned. - - Format: int64 - */ - AfterCursorEntityID *int64 - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* AppEnvironmentType. - - AppEnvironmentType is specified to return only application specific view. - For example if AppEnvironmentType of type SQL is specified, only SQL VMs - are returned. Also, higher level entities are omitted if they do not have - any application specific children. - - Format: int64 - */ - AppEnvironmentType *int64 - - /* BeforeCursorEntityID. - - Specifies the entity id upto which the items are to be returned. - - Format: int64 - */ - BeforeCursorEntityID *int64 - - /* EncryptionKey. - - Key to be used to encrypt the source credential. If - include_source_credentials is set to true this key must be specified. - */ - EncryptionKey *string - - /* EntityID. - - EntityId specified the Id of backup source for which to get the hierarchy. - - Format: int64 - */ - EntityID *int64 - - /* EnvTypes. - - EnvTypes are the types of sources to return e.g. VMWare, SQL, View etc. - */ - EnvTypes []int64 - - /* ExcludeAwsTypes. - - ExcludeAwsTypes specifies an array of AWS entity types to be excluded from - the entity hierarchy. Entities of this type along with their children, if - any, will be filtered out. - */ - ExcludeAwsTypes []int32 - - /* ExcludeAzureTypes. - - ExcludeAzureTypes specifies an array of Azure entity types to be excluded - from the entity hierarchy. Entities of this type along with their - children, if any, will be filtered out. - */ - ExcludeAzureTypes []int32 - - /* ExcludeKubernetesTypes. - - ExcludeKubernetesTypes specifies an array of K8s entity types to be - excluded from the entity hierarchy. Entities of this type along with - their children, if any, will be filtered out. - */ - ExcludeKubernetesTypes []int32 - - /* ExcludeOffice365Types. - - ExcludeOffice365Types specifies an array of Office 365 entity types to be - excluded from the entity hierarchy. Entities of this type along with their - children, if any, will be filtered out. - */ - ExcludeOffice365Types []int32 - - /* ExcludeTypes. - - ExcludeTypes specifies an array of types to exclude from the entity - hierarchy. Entities of this type along with their children will be - filtered out. - */ - ExcludeTypes []int32 - - /* HasValidMailbox. - - If set to true, users with valid mailbox will be returned. - */ - HasValidMailbox *bool - - /* HasValidOnedrive. - - If set to true, users with valid onedrive will be returned. - */ - HasValidOnedrive *bool - - /* IncludeDatastores. - - IncludeDatastores specifies whether to include datastore folder in the - entity hierarchy. If it is not specified, the default is false. - */ - IncludeDatastores *bool - - /* IncludeEntityPermissionInfo. - - If specified, then a list of entities with permissions assigned to them are - returned. - */ - IncludeEntityPermissionInfo *bool - - /* IncludeExternalMetadata. - - Specifies if entity external metadata should be included within the - response to get entity hierarchy call. - */ - IncludeExternalMetadata *bool - - /* IncludeNetworkEntities. - - IncludeNetworkEntities specifies whether to include network entities in - the entity hierarchy. If it is not specified, the default is false. - */ - IncludeNetworkEntities *bool - - /* IncludeObjectProtectionInfo. - - If specified, the object protection of entities(if any) will be returned. - */ - IncludeObjectProtectionInfo *bool - - /* IncludeSourceCredentials. - - If specified, then crednetial for the registered sources will be included. - Credential is first encrypted with internal key and then reencrypted with - user supplied 'encryption_key'. - */ - IncludeSourceCredentials *bool - - /* IncludeSystemVApps. - - IncludeSystemVApps specifies whether to include system generated vApps in - the respone. The defauult behavior is false. - */ - IncludeSystemVApps *bool - - /* IncludeVMFolders. - - IncludeVMFolders specifies whether to include VM folders in the - entity hierarchy. If it is not specified, the default is false. - */ - IncludeVMFolders *bool - - /* IsSecurityGroup. - - If set to true, Groups which are security enabled will be returned. - */ - IsSecurityGroup *bool - - /* NodeID. - - Specifies the entity id for the Node at any level within the Source entity - hierarchy whose children are to be paginated. - - Format: int64 - */ - NodeID *int64 - - /* NumLevels. - - Specifies the number of levels from the root node in the entity hierarchy - to be returned. - - Format: int32 - */ - NumLevels *int32 - - /* OnlyReturnOneLevel. - - OnlyReturnOneLevel if set to true, only returns information one-level deep - This is only valid if 'entity' is not set. - */ - OnlyReturnOneLevel *bool - - /* PageSize. - - Specifies the maximum number of entities to be returned within the page. - - Format: int64 - */ - PageSize *int64 - - /* PruneNonCriticalInfo. - - Specifies whether to prune non critical info within entities. - Incase of VMs, virtual disk information will be pruned. - Incase of Office365, metadata about user entities will be pruned. - This can be used to limit the size of the response by caller. - */ - PruneNonCriticalInfo *bool - - /* RefreshEntityHierarchy. - - RefreshEntityHierarchy specifies whether entity hierarchy should be - refreshed from VCenter. If set to true and an already existing 'entity' is - specified, the entity hierarchy is refreshed prior to returning it. If - 'entity' is not set when this is set, an error will be returned. Setting - this to true might cause the RPC to take a long while and result in - timeouts. - */ - RefreshEntityHierarchy *bool - - /* Sids. - - Filter the list of entities for the sids given in the list. - */ - Sids []string - - /* 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. - setting this to true ensures that the API request is served - to the read replica. setting this to false will serve the request to - the master. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list backup sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListBackupSourcesParams) WithDefaults() *ListBackupSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list backup sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListBackupSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list backup sources params -func (o *ListBackupSourcesParams) WithTimeout(timeout time.Duration) *ListBackupSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list backup sources params -func (o *ListBackupSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list backup sources params -func (o *ListBackupSourcesParams) WithContext(ctx context.Context) *ListBackupSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list backup sources params -func (o *ListBackupSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list backup sources params -func (o *ListBackupSourcesParams) WithHTTPClient(client *http.Client) *ListBackupSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list backup sources params -func (o *ListBackupSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAfterCursorEntityID adds the afterCursorEntityID to the list backup sources params -func (o *ListBackupSourcesParams) WithAfterCursorEntityID(afterCursorEntityID *int64) *ListBackupSourcesParams { - o.SetAfterCursorEntityID(afterCursorEntityID) - return o -} - -// SetAfterCursorEntityID adds the afterCursorEntityId to the list backup sources params -func (o *ListBackupSourcesParams) SetAfterCursorEntityID(afterCursorEntityID *int64) { - o.AfterCursorEntityID = afterCursorEntityID -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the list backup sources params -func (o *ListBackupSourcesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *ListBackupSourcesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the list backup sources params -func (o *ListBackupSourcesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithAppEnvironmentType adds the appEnvironmentType to the list backup sources params -func (o *ListBackupSourcesParams) WithAppEnvironmentType(appEnvironmentType *int64) *ListBackupSourcesParams { - o.SetAppEnvironmentType(appEnvironmentType) - return o -} - -// SetAppEnvironmentType adds the appEnvironmentType to the list backup sources params -func (o *ListBackupSourcesParams) SetAppEnvironmentType(appEnvironmentType *int64) { - o.AppEnvironmentType = appEnvironmentType -} - -// WithBeforeCursorEntityID adds the beforeCursorEntityID to the list backup sources params -func (o *ListBackupSourcesParams) WithBeforeCursorEntityID(beforeCursorEntityID *int64) *ListBackupSourcesParams { - o.SetBeforeCursorEntityID(beforeCursorEntityID) - return o -} - -// SetBeforeCursorEntityID adds the beforeCursorEntityId to the list backup sources params -func (o *ListBackupSourcesParams) SetBeforeCursorEntityID(beforeCursorEntityID *int64) { - o.BeforeCursorEntityID = beforeCursorEntityID -} - -// WithEncryptionKey adds the encryptionKey to the list backup sources params -func (o *ListBackupSourcesParams) WithEncryptionKey(encryptionKey *string) *ListBackupSourcesParams { - o.SetEncryptionKey(encryptionKey) - return o -} - -// SetEncryptionKey adds the encryptionKey to the list backup sources params -func (o *ListBackupSourcesParams) SetEncryptionKey(encryptionKey *string) { - o.EncryptionKey = encryptionKey -} - -// WithEntityID adds the entityID to the list backup sources params -func (o *ListBackupSourcesParams) WithEntityID(entityID *int64) *ListBackupSourcesParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the list backup sources params -func (o *ListBackupSourcesParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithEnvTypes adds the envTypes to the list backup sources params -func (o *ListBackupSourcesParams) WithEnvTypes(envTypes []int64) *ListBackupSourcesParams { - o.SetEnvTypes(envTypes) - return o -} - -// SetEnvTypes adds the envTypes to the list backup sources params -func (o *ListBackupSourcesParams) SetEnvTypes(envTypes []int64) { - o.EnvTypes = envTypes -} - -// WithExcludeAwsTypes adds the excludeAwsTypes to the list backup sources params -func (o *ListBackupSourcesParams) WithExcludeAwsTypes(excludeAwsTypes []int32) *ListBackupSourcesParams { - o.SetExcludeAwsTypes(excludeAwsTypes) - return o -} - -// SetExcludeAwsTypes adds the excludeAwsTypes to the list backup sources params -func (o *ListBackupSourcesParams) SetExcludeAwsTypes(excludeAwsTypes []int32) { - o.ExcludeAwsTypes = excludeAwsTypes -} - -// WithExcludeAzureTypes adds the excludeAzureTypes to the list backup sources params -func (o *ListBackupSourcesParams) WithExcludeAzureTypes(excludeAzureTypes []int32) *ListBackupSourcesParams { - o.SetExcludeAzureTypes(excludeAzureTypes) - return o -} - -// SetExcludeAzureTypes adds the excludeAzureTypes to the list backup sources params -func (o *ListBackupSourcesParams) SetExcludeAzureTypes(excludeAzureTypes []int32) { - o.ExcludeAzureTypes = excludeAzureTypes -} - -// WithExcludeKubernetesTypes adds the excludeKubernetesTypes to the list backup sources params -func (o *ListBackupSourcesParams) WithExcludeKubernetesTypes(excludeKubernetesTypes []int32) *ListBackupSourcesParams { - o.SetExcludeKubernetesTypes(excludeKubernetesTypes) - return o -} - -// SetExcludeKubernetesTypes adds the excludeKubernetesTypes to the list backup sources params -func (o *ListBackupSourcesParams) SetExcludeKubernetesTypes(excludeKubernetesTypes []int32) { - o.ExcludeKubernetesTypes = excludeKubernetesTypes -} - -// WithExcludeOffice365Types adds the excludeOffice365Types to the list backup sources params -func (o *ListBackupSourcesParams) WithExcludeOffice365Types(excludeOffice365Types []int32) *ListBackupSourcesParams { - o.SetExcludeOffice365Types(excludeOffice365Types) - return o -} - -// SetExcludeOffice365Types adds the excludeOffice365Types to the list backup sources params -func (o *ListBackupSourcesParams) SetExcludeOffice365Types(excludeOffice365Types []int32) { - o.ExcludeOffice365Types = excludeOffice365Types -} - -// WithExcludeTypes adds the excludeTypes to the list backup sources params -func (o *ListBackupSourcesParams) WithExcludeTypes(excludeTypes []int32) *ListBackupSourcesParams { - o.SetExcludeTypes(excludeTypes) - return o -} - -// SetExcludeTypes adds the excludeTypes to the list backup sources params -func (o *ListBackupSourcesParams) SetExcludeTypes(excludeTypes []int32) { - o.ExcludeTypes = excludeTypes -} - -// WithHasValidMailbox adds the hasValidMailbox to the list backup sources params -func (o *ListBackupSourcesParams) WithHasValidMailbox(hasValidMailbox *bool) *ListBackupSourcesParams { - o.SetHasValidMailbox(hasValidMailbox) - return o -} - -// SetHasValidMailbox adds the hasValidMailbox to the list backup sources params -func (o *ListBackupSourcesParams) SetHasValidMailbox(hasValidMailbox *bool) { - o.HasValidMailbox = hasValidMailbox -} - -// WithHasValidOnedrive adds the hasValidOnedrive to the list backup sources params -func (o *ListBackupSourcesParams) WithHasValidOnedrive(hasValidOnedrive *bool) *ListBackupSourcesParams { - o.SetHasValidOnedrive(hasValidOnedrive) - return o -} - -// SetHasValidOnedrive adds the hasValidOnedrive to the list backup sources params -func (o *ListBackupSourcesParams) SetHasValidOnedrive(hasValidOnedrive *bool) { - o.HasValidOnedrive = hasValidOnedrive -} - -// WithIncludeDatastores adds the includeDatastores to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeDatastores(includeDatastores *bool) *ListBackupSourcesParams { - o.SetIncludeDatastores(includeDatastores) - return o -} - -// SetIncludeDatastores adds the includeDatastores to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeDatastores(includeDatastores *bool) { - o.IncludeDatastores = includeDatastores -} - -// WithIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) *ListBackupSourcesParams { - o.SetIncludeEntityPermissionInfo(includeEntityPermissionInfo) - return o -} - -// SetIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) { - o.IncludeEntityPermissionInfo = includeEntityPermissionInfo -} - -// WithIncludeExternalMetadata adds the includeExternalMetadata to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeExternalMetadata(includeExternalMetadata *bool) *ListBackupSourcesParams { - o.SetIncludeExternalMetadata(includeExternalMetadata) - return o -} - -// SetIncludeExternalMetadata adds the includeExternalMetadata to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeExternalMetadata(includeExternalMetadata *bool) { - o.IncludeExternalMetadata = includeExternalMetadata -} - -// WithIncludeNetworkEntities adds the includeNetworkEntities to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeNetworkEntities(includeNetworkEntities *bool) *ListBackupSourcesParams { - o.SetIncludeNetworkEntities(includeNetworkEntities) - return o -} - -// SetIncludeNetworkEntities adds the includeNetworkEntities to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeNetworkEntities(includeNetworkEntities *bool) { - o.IncludeNetworkEntities = includeNetworkEntities -} - -// WithIncludeObjectProtectionInfo adds the includeObjectProtectionInfo to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeObjectProtectionInfo(includeObjectProtectionInfo *bool) *ListBackupSourcesParams { - o.SetIncludeObjectProtectionInfo(includeObjectProtectionInfo) - return o -} - -// SetIncludeObjectProtectionInfo adds the includeObjectProtectionInfo to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeObjectProtectionInfo(includeObjectProtectionInfo *bool) { - o.IncludeObjectProtectionInfo = includeObjectProtectionInfo -} - -// WithIncludeSourceCredentials adds the includeSourceCredentials to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeSourceCredentials(includeSourceCredentials *bool) *ListBackupSourcesParams { - o.SetIncludeSourceCredentials(includeSourceCredentials) - return o -} - -// SetIncludeSourceCredentials adds the includeSourceCredentials to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeSourceCredentials(includeSourceCredentials *bool) { - o.IncludeSourceCredentials = includeSourceCredentials -} - -// WithIncludeSystemVApps adds the includeSystemVApps to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeSystemVApps(includeSystemVApps *bool) *ListBackupSourcesParams { - o.SetIncludeSystemVApps(includeSystemVApps) - return o -} - -// SetIncludeSystemVApps adds the includeSystemVApps to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeSystemVApps(includeSystemVApps *bool) { - o.IncludeSystemVApps = includeSystemVApps -} - -// WithIncludeVMFolders adds the includeVMFolders to the list backup sources params -func (o *ListBackupSourcesParams) WithIncludeVMFolders(includeVMFolders *bool) *ListBackupSourcesParams { - o.SetIncludeVMFolders(includeVMFolders) - return o -} - -// SetIncludeVMFolders adds the includeVmFolders to the list backup sources params -func (o *ListBackupSourcesParams) SetIncludeVMFolders(includeVMFolders *bool) { - o.IncludeVMFolders = includeVMFolders -} - -// WithIsSecurityGroup adds the isSecurityGroup to the list backup sources params -func (o *ListBackupSourcesParams) WithIsSecurityGroup(isSecurityGroup *bool) *ListBackupSourcesParams { - o.SetIsSecurityGroup(isSecurityGroup) - return o -} - -// SetIsSecurityGroup adds the isSecurityGroup to the list backup sources params -func (o *ListBackupSourcesParams) SetIsSecurityGroup(isSecurityGroup *bool) { - o.IsSecurityGroup = isSecurityGroup -} - -// WithNodeID adds the nodeID to the list backup sources params -func (o *ListBackupSourcesParams) WithNodeID(nodeID *int64) *ListBackupSourcesParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the list backup sources params -func (o *ListBackupSourcesParams) SetNodeID(nodeID *int64) { - o.NodeID = nodeID -} - -// WithNumLevels adds the numLevels to the list backup sources params -func (o *ListBackupSourcesParams) WithNumLevels(numLevels *int32) *ListBackupSourcesParams { - o.SetNumLevels(numLevels) - return o -} - -// SetNumLevels adds the numLevels to the list backup sources params -func (o *ListBackupSourcesParams) SetNumLevels(numLevels *int32) { - o.NumLevels = numLevels -} - -// WithOnlyReturnOneLevel adds the onlyReturnOneLevel to the list backup sources params -func (o *ListBackupSourcesParams) WithOnlyReturnOneLevel(onlyReturnOneLevel *bool) *ListBackupSourcesParams { - o.SetOnlyReturnOneLevel(onlyReturnOneLevel) - return o -} - -// SetOnlyReturnOneLevel adds the onlyReturnOneLevel to the list backup sources params -func (o *ListBackupSourcesParams) SetOnlyReturnOneLevel(onlyReturnOneLevel *bool) { - o.OnlyReturnOneLevel = onlyReturnOneLevel -} - -// WithPageSize adds the pageSize to the list backup sources params -func (o *ListBackupSourcesParams) WithPageSize(pageSize *int64) *ListBackupSourcesParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list backup sources params -func (o *ListBackupSourcesParams) SetPageSize(pageSize *int64) { - o.PageSize = pageSize -} - -// WithPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list backup sources params -func (o *ListBackupSourcesParams) WithPruneNonCriticalInfo(pruneNonCriticalInfo *bool) *ListBackupSourcesParams { - o.SetPruneNonCriticalInfo(pruneNonCriticalInfo) - return o -} - -// SetPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list backup sources params -func (o *ListBackupSourcesParams) SetPruneNonCriticalInfo(pruneNonCriticalInfo *bool) { - o.PruneNonCriticalInfo = pruneNonCriticalInfo -} - -// WithRefreshEntityHierarchy adds the refreshEntityHierarchy to the list backup sources params -func (o *ListBackupSourcesParams) WithRefreshEntityHierarchy(refreshEntityHierarchy *bool) *ListBackupSourcesParams { - o.SetRefreshEntityHierarchy(refreshEntityHierarchy) - return o -} - -// SetRefreshEntityHierarchy adds the refreshEntityHierarchy to the list backup sources params -func (o *ListBackupSourcesParams) SetRefreshEntityHierarchy(refreshEntityHierarchy *bool) { - o.RefreshEntityHierarchy = refreshEntityHierarchy -} - -// WithSids adds the sids to the list backup sources params -func (o *ListBackupSourcesParams) WithSids(sids []string) *ListBackupSourcesParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the list backup sources params -func (o *ListBackupSourcesParams) SetSids(sids []string) { - o.Sids = sids -} - -// WithTenantIds adds the tenantIds to the list backup sources params -func (o *ListBackupSourcesParams) WithTenantIds(tenantIds []string) *ListBackupSourcesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the list backup sources params -func (o *ListBackupSourcesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the list backup sources params -func (o *ListBackupSourcesParams) WithUseCachedData(useCachedData *bool) *ListBackupSourcesParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the list backup sources params -func (o *ListBackupSourcesParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *ListBackupSourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AfterCursorEntityID != nil { - - // query param afterCursorEntityId - var qrAfterCursorEntityID int64 - - if o.AfterCursorEntityID != nil { - qrAfterCursorEntityID = *o.AfterCursorEntityID - } - qAfterCursorEntityID := swag.FormatInt64(qrAfterCursorEntityID) - if qAfterCursorEntityID != "" { - - if err := r.SetQueryParam("afterCursorEntityId", qAfterCursorEntityID); err != nil { - return err - } - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.AppEnvironmentType != nil { - - // query param appEnvironmentType - var qrAppEnvironmentType int64 - - if o.AppEnvironmentType != nil { - qrAppEnvironmentType = *o.AppEnvironmentType - } - qAppEnvironmentType := swag.FormatInt64(qrAppEnvironmentType) - if qAppEnvironmentType != "" { - - if err := r.SetQueryParam("appEnvironmentType", qAppEnvironmentType); err != nil { - return err - } - } - } - - if o.BeforeCursorEntityID != nil { - - // query param beforeCursorEntityId - var qrBeforeCursorEntityID int64 - - if o.BeforeCursorEntityID != nil { - qrBeforeCursorEntityID = *o.BeforeCursorEntityID - } - qBeforeCursorEntityID := swag.FormatInt64(qrBeforeCursorEntityID) - if qBeforeCursorEntityID != "" { - - if err := r.SetQueryParam("beforeCursorEntityId", qBeforeCursorEntityID); err != nil { - return err - } - } - } - - if o.EncryptionKey != nil { - - // query param encryptionKey - var qrEncryptionKey string - - if o.EncryptionKey != nil { - qrEncryptionKey = *o.EncryptionKey - } - qEncryptionKey := qrEncryptionKey - if qEncryptionKey != "" { - - if err := r.SetQueryParam("encryptionKey", qEncryptionKey); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.EnvTypes != nil { - - // binding items for envTypes - joinedEnvTypes := o.bindParamEnvTypes(reg) - - // query array param envTypes - if err := r.SetQueryParam("envTypes", joinedEnvTypes...); err != nil { - return err - } - } - - if o.ExcludeAwsTypes != nil { - - // binding items for excludeAwsTypes - joinedExcludeAwsTypes := o.bindParamExcludeAwsTypes(reg) - - // query array param excludeAwsTypes - if err := r.SetQueryParam("excludeAwsTypes", joinedExcludeAwsTypes...); err != nil { - return err - } - } - - if o.ExcludeAzureTypes != nil { - - // binding items for excludeAzureTypes - joinedExcludeAzureTypes := o.bindParamExcludeAzureTypes(reg) - - // query array param excludeAzureTypes - if err := r.SetQueryParam("excludeAzureTypes", joinedExcludeAzureTypes...); err != nil { - return err - } - } - - if o.ExcludeKubernetesTypes != nil { - - // binding items for excludeKubernetesTypes - joinedExcludeKubernetesTypes := o.bindParamExcludeKubernetesTypes(reg) - - // query array param excludeKubernetesTypes - if err := r.SetQueryParam("excludeKubernetesTypes", joinedExcludeKubernetesTypes...); err != nil { - return err - } - } - - if o.ExcludeOffice365Types != nil { - - // binding items for excludeOffice365Types - joinedExcludeOffice365Types := o.bindParamExcludeOffice365Types(reg) - - // query array param excludeOffice365Types - if err := r.SetQueryParam("excludeOffice365Types", joinedExcludeOffice365Types...); err != nil { - return err - } - } - - if o.ExcludeTypes != nil { - - // binding items for excludeTypes - joinedExcludeTypes := o.bindParamExcludeTypes(reg) - - // query array param excludeTypes - if err := r.SetQueryParam("excludeTypes", joinedExcludeTypes...); err != nil { - return err - } - } - - if o.HasValidMailbox != nil { - - // query param hasValidMailbox - var qrHasValidMailbox bool - - if o.HasValidMailbox != nil { - qrHasValidMailbox = *o.HasValidMailbox - } - qHasValidMailbox := swag.FormatBool(qrHasValidMailbox) - if qHasValidMailbox != "" { - - if err := r.SetQueryParam("hasValidMailbox", qHasValidMailbox); err != nil { - return err - } - } - } - - if o.HasValidOnedrive != nil { - - // query param hasValidOnedrive - var qrHasValidOnedrive bool - - if o.HasValidOnedrive != nil { - qrHasValidOnedrive = *o.HasValidOnedrive - } - qHasValidOnedrive := swag.FormatBool(qrHasValidOnedrive) - if qHasValidOnedrive != "" { - - if err := r.SetQueryParam("hasValidOnedrive", qHasValidOnedrive); err != nil { - return err - } - } - } - - if o.IncludeDatastores != nil { - - // query param includeDatastores - var qrIncludeDatastores bool - - if o.IncludeDatastores != nil { - qrIncludeDatastores = *o.IncludeDatastores - } - qIncludeDatastores := swag.FormatBool(qrIncludeDatastores) - if qIncludeDatastores != "" { - - if err := r.SetQueryParam("includeDatastores", qIncludeDatastores); err != nil { - return err - } - } - } - - if o.IncludeEntityPermissionInfo != nil { - - // query param includeEntityPermissionInfo - var qrIncludeEntityPermissionInfo bool - - if o.IncludeEntityPermissionInfo != nil { - qrIncludeEntityPermissionInfo = *o.IncludeEntityPermissionInfo - } - qIncludeEntityPermissionInfo := swag.FormatBool(qrIncludeEntityPermissionInfo) - if qIncludeEntityPermissionInfo != "" { - - if err := r.SetQueryParam("includeEntityPermissionInfo", qIncludeEntityPermissionInfo); err != nil { - return err - } - } - } - - if o.IncludeExternalMetadata != nil { - - // query param includeExternalMetadata - var qrIncludeExternalMetadata bool - - if o.IncludeExternalMetadata != nil { - qrIncludeExternalMetadata = *o.IncludeExternalMetadata - } - qIncludeExternalMetadata := swag.FormatBool(qrIncludeExternalMetadata) - if qIncludeExternalMetadata != "" { - - if err := r.SetQueryParam("includeExternalMetadata", qIncludeExternalMetadata); err != nil { - return err - } - } - } - - if o.IncludeNetworkEntities != nil { - - // query param includeNetworkEntities - var qrIncludeNetworkEntities bool - - if o.IncludeNetworkEntities != nil { - qrIncludeNetworkEntities = *o.IncludeNetworkEntities - } - qIncludeNetworkEntities := swag.FormatBool(qrIncludeNetworkEntities) - if qIncludeNetworkEntities != "" { - - if err := r.SetQueryParam("includeNetworkEntities", qIncludeNetworkEntities); err != nil { - return err - } - } - } - - if o.IncludeObjectProtectionInfo != nil { - - // query param includeObjectProtectionInfo - var qrIncludeObjectProtectionInfo bool - - if o.IncludeObjectProtectionInfo != nil { - qrIncludeObjectProtectionInfo = *o.IncludeObjectProtectionInfo - } - qIncludeObjectProtectionInfo := swag.FormatBool(qrIncludeObjectProtectionInfo) - if qIncludeObjectProtectionInfo != "" { - - if err := r.SetQueryParam("includeObjectProtectionInfo", qIncludeObjectProtectionInfo); err != nil { - return err - } - } - } - - if o.IncludeSourceCredentials != nil { - - // query param includeSourceCredentials - var qrIncludeSourceCredentials bool - - if o.IncludeSourceCredentials != nil { - qrIncludeSourceCredentials = *o.IncludeSourceCredentials - } - qIncludeSourceCredentials := swag.FormatBool(qrIncludeSourceCredentials) - if qIncludeSourceCredentials != "" { - - if err := r.SetQueryParam("includeSourceCredentials", qIncludeSourceCredentials); err != nil { - return err - } - } - } - - if o.IncludeSystemVApps != nil { - - // query param includeSystemVApps - var qrIncludeSystemVApps bool - - if o.IncludeSystemVApps != nil { - qrIncludeSystemVApps = *o.IncludeSystemVApps - } - qIncludeSystemVApps := swag.FormatBool(qrIncludeSystemVApps) - if qIncludeSystemVApps != "" { - - if err := r.SetQueryParam("includeSystemVApps", qIncludeSystemVApps); err != nil { - return err - } - } - } - - if o.IncludeVMFolders != nil { - - // query param includeVMFolders - var qrIncludeVMFolders bool - - if o.IncludeVMFolders != nil { - qrIncludeVMFolders = *o.IncludeVMFolders - } - qIncludeVMFolders := swag.FormatBool(qrIncludeVMFolders) - if qIncludeVMFolders != "" { - - if err := r.SetQueryParam("includeVMFolders", qIncludeVMFolders); err != nil { - return err - } - } - } - - if o.IsSecurityGroup != nil { - - // query param isSecurityGroup - var qrIsSecurityGroup bool - - if o.IsSecurityGroup != nil { - qrIsSecurityGroup = *o.IsSecurityGroup - } - qIsSecurityGroup := swag.FormatBool(qrIsSecurityGroup) - if qIsSecurityGroup != "" { - - if err := r.SetQueryParam("isSecurityGroup", qIsSecurityGroup); err != nil { - return err - } - } - } - - if o.NodeID != nil { - - // query param nodeId - var qrNodeID int64 - - if o.NodeID != nil { - qrNodeID = *o.NodeID - } - qNodeID := swag.FormatInt64(qrNodeID) - if qNodeID != "" { - - if err := r.SetQueryParam("nodeId", qNodeID); err != nil { - return err - } - } - } - - if o.NumLevels != nil { - - // query param numLevels - var qrNumLevels int32 - - if o.NumLevels != nil { - qrNumLevels = *o.NumLevels - } - qNumLevels := swag.FormatInt32(qrNumLevels) - if qNumLevels != "" { - - if err := r.SetQueryParam("numLevels", qNumLevels); err != nil { - return err - } - } - } - - if o.OnlyReturnOneLevel != nil { - - // query param onlyReturnOneLevel - var qrOnlyReturnOneLevel bool - - if o.OnlyReturnOneLevel != nil { - qrOnlyReturnOneLevel = *o.OnlyReturnOneLevel - } - qOnlyReturnOneLevel := swag.FormatBool(qrOnlyReturnOneLevel) - if qOnlyReturnOneLevel != "" { - - if err := r.SetQueryParam("onlyReturnOneLevel", qOnlyReturnOneLevel); err != nil { - return err - } - } - } - - if o.PageSize != nil { - - // query param pageSize - var qrPageSize int64 - - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt64(qrPageSize) - if qPageSize != "" { - - if err := r.SetQueryParam("pageSize", qPageSize); err != nil { - return err - } - } - } - - if o.PruneNonCriticalInfo != nil { - - // query param pruneNonCriticalInfo - var qrPruneNonCriticalInfo bool - - if o.PruneNonCriticalInfo != nil { - qrPruneNonCriticalInfo = *o.PruneNonCriticalInfo - } - qPruneNonCriticalInfo := swag.FormatBool(qrPruneNonCriticalInfo) - if qPruneNonCriticalInfo != "" { - - if err := r.SetQueryParam("pruneNonCriticalInfo", qPruneNonCriticalInfo); err != nil { - return err - } - } - } - - if o.RefreshEntityHierarchy != nil { - - // query param refreshEntityHierarchy - var qrRefreshEntityHierarchy bool - - if o.RefreshEntityHierarchy != nil { - qrRefreshEntityHierarchy = *o.RefreshEntityHierarchy - } - qRefreshEntityHierarchy := swag.FormatBool(qrRefreshEntityHierarchy) - if qRefreshEntityHierarchy != "" { - - if err := r.SetQueryParam("refreshEntityHierarchy", qRefreshEntityHierarchy); err != nil { - return err - } - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListBackupSources binds the parameter envTypes -func (o *ListBackupSourcesParams) bindParamEnvTypes(formats strfmt.Registry) []string { - envTypesIR := o.EnvTypes - - var envTypesIC []string - for _, envTypesIIR := range envTypesIR { // explode []int64 - - envTypesIIV := swag.FormatInt64(envTypesIIR) // int64 as string - envTypesIC = append(envTypesIC, envTypesIIV) - } - - // items.CollectionFormat: "" - envTypesIS := swag.JoinByFormat(envTypesIC, "") - - return envTypesIS -} - -// bindParamListBackupSources binds the parameter excludeAwsTypes -func (o *ListBackupSourcesParams) bindParamExcludeAwsTypes(formats strfmt.Registry) []string { - excludeAwsTypesIR := o.ExcludeAwsTypes - - var excludeAwsTypesIC []string - for _, excludeAwsTypesIIR := range excludeAwsTypesIR { // explode []int32 - - excludeAwsTypesIIV := swag.FormatInt32(excludeAwsTypesIIR) // int32 as string - excludeAwsTypesIC = append(excludeAwsTypesIC, excludeAwsTypesIIV) - } - - // items.CollectionFormat: "" - excludeAwsTypesIS := swag.JoinByFormat(excludeAwsTypesIC, "") - - return excludeAwsTypesIS -} - -// bindParamListBackupSources binds the parameter excludeAzureTypes -func (o *ListBackupSourcesParams) bindParamExcludeAzureTypes(formats strfmt.Registry) []string { - excludeAzureTypesIR := o.ExcludeAzureTypes - - var excludeAzureTypesIC []string - for _, excludeAzureTypesIIR := range excludeAzureTypesIR { // explode []int32 - - excludeAzureTypesIIV := swag.FormatInt32(excludeAzureTypesIIR) // int32 as string - excludeAzureTypesIC = append(excludeAzureTypesIC, excludeAzureTypesIIV) - } - - // items.CollectionFormat: "" - excludeAzureTypesIS := swag.JoinByFormat(excludeAzureTypesIC, "") - - return excludeAzureTypesIS -} - -// bindParamListBackupSources binds the parameter excludeKubernetesTypes -func (o *ListBackupSourcesParams) bindParamExcludeKubernetesTypes(formats strfmt.Registry) []string { - excludeKubernetesTypesIR := o.ExcludeKubernetesTypes - - var excludeKubernetesTypesIC []string - for _, excludeKubernetesTypesIIR := range excludeKubernetesTypesIR { // explode []int32 - - excludeKubernetesTypesIIV := swag.FormatInt32(excludeKubernetesTypesIIR) // int32 as string - excludeKubernetesTypesIC = append(excludeKubernetesTypesIC, excludeKubernetesTypesIIV) - } - - // items.CollectionFormat: "" - excludeKubernetesTypesIS := swag.JoinByFormat(excludeKubernetesTypesIC, "") - - return excludeKubernetesTypesIS -} - -// bindParamListBackupSources binds the parameter excludeOffice365Types -func (o *ListBackupSourcesParams) bindParamExcludeOffice365Types(formats strfmt.Registry) []string { - excludeOffice365TypesIR := o.ExcludeOffice365Types - - var excludeOffice365TypesIC []string - for _, excludeOffice365TypesIIR := range excludeOffice365TypesIR { // explode []int32 - - excludeOffice365TypesIIV := swag.FormatInt32(excludeOffice365TypesIIR) // int32 as string - excludeOffice365TypesIC = append(excludeOffice365TypesIC, excludeOffice365TypesIIV) - } - - // items.CollectionFormat: "" - excludeOffice365TypesIS := swag.JoinByFormat(excludeOffice365TypesIC, "") - - return excludeOffice365TypesIS -} - -// bindParamListBackupSources binds the parameter excludeTypes -func (o *ListBackupSourcesParams) bindParamExcludeTypes(formats strfmt.Registry) []string { - excludeTypesIR := o.ExcludeTypes - - var excludeTypesIC []string - for _, excludeTypesIIR := range excludeTypesIR { // explode []int32 - - excludeTypesIIV := swag.FormatInt32(excludeTypesIIR) // int32 as string - excludeTypesIC = append(excludeTypesIC, excludeTypesIIV) - } - - // items.CollectionFormat: "" - excludeTypesIS := swag.JoinByFormat(excludeTypesIC, "") - - return excludeTypesIS -} - -// bindParamListBackupSources binds the parameter sids -func (o *ListBackupSourcesParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} - -// bindParamListBackupSources binds the parameter tenantIds -func (o *ListBackupSourcesParams) 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/v1/client/backup_sources/list_backup_sources_responses.go b/v1/client/backup_sources/list_backup_sources_responses.go deleted file mode 100644 index 4fdf6379..00000000 --- a/v1/client/backup_sources/list_backup_sources_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListBackupSourcesReader is a Reader for the ListBackupSources structure. -type ListBackupSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListBackupSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListBackupSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListBackupSourcesDefault(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 - } -} - -// NewListBackupSourcesOK creates a ListBackupSourcesOK with default headers values -func NewListBackupSourcesOK() *ListBackupSourcesOK { - return &ListBackupSourcesOK{} -} - -/* -ListBackupSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListBackupSourcesOK struct { - Payload *models.EntityHierarchyWrapper -} - -// IsSuccess returns true when this list backup sources o k response has a 2xx status code -func (o *ListBackupSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list backup sources o k response has a 3xx status code -func (o *ListBackupSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list backup sources o k response has a 4xx status code -func (o *ListBackupSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list backup sources o k response has a 5xx status code -func (o *ListBackupSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list backup sources o k response a status code equal to that given -func (o *ListBackupSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list backup sources o k response -func (o *ListBackupSourcesOK) Code() int { - return 200 -} - -func (o *ListBackupSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupsources][%d] listBackupSourcesOK %s", 200, payload) -} - -func (o *ListBackupSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupsources][%d] listBackupSourcesOK %s", 200, payload) -} - -func (o *ListBackupSourcesOK) GetPayload() *models.EntityHierarchyWrapper { - return o.Payload -} - -func (o *ListBackupSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.EntityHierarchyWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListBackupSourcesDefault creates a ListBackupSourcesDefault with default headers values -func NewListBackupSourcesDefault(code int) *ListBackupSourcesDefault { - return &ListBackupSourcesDefault{ - _statusCode: code, - } -} - -/* -ListBackupSourcesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ListBackupSourcesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this list backup sources default response has a 2xx status code -func (o *ListBackupSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list backup sources default response has a 3xx status code -func (o *ListBackupSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list backup sources default response has a 4xx status code -func (o *ListBackupSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list backup sources default response has a 5xx status code -func (o *ListBackupSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list backup sources default response a status code equal to that given -func (o *ListBackupSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list backup sources default response -func (o *ListBackupSourcesDefault) Code() int { - return o._statusCode -} - -func (o *ListBackupSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupsources][%d] ListBackupSources default %s", o._statusCode, payload) -} - -func (o *ListBackupSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /backupsources][%d] ListBackupSources default %s", o._statusCode, payload) -} - -func (o *ListBackupSourcesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ListBackupSourcesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/list_entities_of_type_parameters.go b/v1/client/backup_sources/list_entities_of_type_parameters.go deleted file mode 100644 index 38717bdb..00000000 --- a/v1/client/backup_sources/list_entities_of_type_parameters.go +++ /dev/null @@ -1,1311 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewListEntitiesOfTypeParams creates a new ListEntitiesOfTypeParams 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 NewListEntitiesOfTypeParams() *ListEntitiesOfTypeParams { - return &ListEntitiesOfTypeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListEntitiesOfTypeParamsWithTimeout creates a new ListEntitiesOfTypeParams object -// with the ability to set a timeout on a request. -func NewListEntitiesOfTypeParamsWithTimeout(timeout time.Duration) *ListEntitiesOfTypeParams { - return &ListEntitiesOfTypeParams{ - timeout: timeout, - } -} - -// NewListEntitiesOfTypeParamsWithContext creates a new ListEntitiesOfTypeParams object -// with the ability to set a context for a request. -func NewListEntitiesOfTypeParamsWithContext(ctx context.Context) *ListEntitiesOfTypeParams { - return &ListEntitiesOfTypeParams{ - Context: ctx, - } -} - -// NewListEntitiesOfTypeParamsWithHTTPClient creates a new ListEntitiesOfTypeParams object -// with the ability to set a custom HTTPClient for a request. -func NewListEntitiesOfTypeParamsWithHTTPClient(client *http.Client) *ListEntitiesOfTypeParams { - return &ListEntitiesOfTypeParams{ - HTTPClient: client, - } -} - -/* -ListEntitiesOfTypeParams contains all the parameters to send to the API endpoint - - for the list entities of type operation. - - Typically these are written to a http.Request. -*/ -type ListEntitiesOfTypeParams struct { - - /* AcropolisEntityTypes. - - Acropolis environment specific entity types. - */ - AcropolisEntityTypes []string - - /* AdEntityTypes. - - AD environment specific entity types. - */ - AdEntityTypes []string - - /* AgentEntityTypes. - - Agent environment specific entity types. - */ - AgentEntityTypes []string - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* AwsEntityTypes. - - AWS environment specific entity types. - */ - AwsEntityTypes []string - - /* AzureEntityTypes. - - Azure environment specific entity types. - */ - AzureEntityTypes []string - - /* EnvironmentTypes. - - Specifies the type of environments e.g. kVmware, kPhysical, kView etc. - */ - EnvironmentTypes []string - - /* FlashbladeEntityTypes. - - FlashBlade environment specific entity types. - */ - FlashbladeEntityTypes []string - - /* GcpEntityTypes. - - GCP environment specific entity types. - */ - GcpEntityTypes []string - - /* GenericNasEntityTypes. - - GenericNas environment specific entity types. - */ - GenericNasEntityTypes []string - - /* GpfsEntityTypes. - - GPFS environment specific entity types. - */ - GpfsEntityTypes []string - - /* HyperflexEntityTypes. - - Hyperflex environment specific entity types. - */ - HyperflexEntityTypes []string - - /* HypervEntityTypes. - - HyperV environment specific entity types. - */ - HypervEntityTypes []string - - /* IsProtected. - - Limit the returned sources to those that have been protected by a - Protection Job. - By default, both protected and unprotected entities are returned. - */ - IsProtected *bool - - /* IsilonEntityTypes. - - Isilon environment specific entity types. - */ - IsilonEntityTypes []string - - /* KvmEntityTypes. - - KVM environment specific entity types. - */ - KvmEntityTypes []string - - /* NetappEntityTypes. - - Netapp environment specific entity types. - */ - NetappEntityTypes []string - - /* Office365EntityTypes. - - Office365 environment specific entity types. - */ - Office365EntityTypes []string - - /* OracleEntityTypes. - - Oracle environment specific entity types. - */ - OracleEntityTypes []string - - /* ParentEntityID. - - Optional Parameter. If this is specified, only entities that are - descendents of this entity are returned. - - Format: int64 - */ - ParentEntityID *int64 - - /* PhysicalEntityTypes. - - Physical environment specific entity types e.g. kPhysicalHost. - */ - PhysicalEntityTypes []string - - /* PureEntityTypes. - - Pure environment specific entity types. - */ - PureEntityTypes []string - - /* RootEntityID. - - RootEntityId specifies the entity Id of the root. - - Format: int64 - */ - RootEntityID *int64 - - /* SQLEntityTypes. - - SQL environment specific entity types. - */ - SQLEntityTypes []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* ViewEntityTypes. - - View environment specific entity types e.g. kView. - */ - ViewEntityTypes []string - - /* VmwareEntityTypes. - - VMWare specific entity types e.g. kVirtualMachine, kHostSystem, kVCenter - etc. - */ - VmwareEntityTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list entities of type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListEntitiesOfTypeParams) WithDefaults() *ListEntitiesOfTypeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list entities of type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListEntitiesOfTypeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithTimeout(timeout time.Duration) *ListEntitiesOfTypeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithContext(ctx context.Context) *ListEntitiesOfTypeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithHTTPClient(client *http.Client) *ListEntitiesOfTypeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAcropolisEntityTypes adds the acropolisEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAcropolisEntityTypes(acropolisEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetAcropolisEntityTypes(acropolisEntityTypes) - return o -} - -// SetAcropolisEntityTypes adds the acropolisEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAcropolisEntityTypes(acropolisEntityTypes []string) { - o.AcropolisEntityTypes = acropolisEntityTypes -} - -// WithAdEntityTypes adds the adEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAdEntityTypes(adEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetAdEntityTypes(adEntityTypes) - return o -} - -// SetAdEntityTypes adds the adEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAdEntityTypes(adEntityTypes []string) { - o.AdEntityTypes = adEntityTypes -} - -// WithAgentEntityTypes adds the agentEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAgentEntityTypes(agentEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetAgentEntityTypes(agentEntityTypes) - return o -} - -// SetAgentEntityTypes adds the agentEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAgentEntityTypes(agentEntityTypes []string) { - o.AgentEntityTypes = agentEntityTypes -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *ListEntitiesOfTypeParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithAwsEntityTypes adds the awsEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAwsEntityTypes(awsEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetAwsEntityTypes(awsEntityTypes) - return o -} - -// SetAwsEntityTypes adds the awsEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAwsEntityTypes(awsEntityTypes []string) { - o.AwsEntityTypes = awsEntityTypes -} - -// WithAzureEntityTypes adds the azureEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithAzureEntityTypes(azureEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetAzureEntityTypes(azureEntityTypes) - return o -} - -// SetAzureEntityTypes adds the azureEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetAzureEntityTypes(azureEntityTypes []string) { - o.AzureEntityTypes = azureEntityTypes -} - -// WithEnvironmentTypes adds the environmentTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithEnvironmentTypes(environmentTypes []string) *ListEntitiesOfTypeParams { - o.SetEnvironmentTypes(environmentTypes) - return o -} - -// SetEnvironmentTypes adds the environmentTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetEnvironmentTypes(environmentTypes []string) { - o.EnvironmentTypes = environmentTypes -} - -// WithFlashbladeEntityTypes adds the flashbladeEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithFlashbladeEntityTypes(flashbladeEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetFlashbladeEntityTypes(flashbladeEntityTypes) - return o -} - -// SetFlashbladeEntityTypes adds the flashbladeEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetFlashbladeEntityTypes(flashbladeEntityTypes []string) { - o.FlashbladeEntityTypes = flashbladeEntityTypes -} - -// WithGcpEntityTypes adds the gcpEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithGcpEntityTypes(gcpEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetGcpEntityTypes(gcpEntityTypes) - return o -} - -// SetGcpEntityTypes adds the gcpEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetGcpEntityTypes(gcpEntityTypes []string) { - o.GcpEntityTypes = gcpEntityTypes -} - -// WithGenericNasEntityTypes adds the genericNasEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithGenericNasEntityTypes(genericNasEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetGenericNasEntityTypes(genericNasEntityTypes) - return o -} - -// SetGenericNasEntityTypes adds the genericNasEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetGenericNasEntityTypes(genericNasEntityTypes []string) { - o.GenericNasEntityTypes = genericNasEntityTypes -} - -// WithGpfsEntityTypes adds the gpfsEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithGpfsEntityTypes(gpfsEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetGpfsEntityTypes(gpfsEntityTypes) - return o -} - -// SetGpfsEntityTypes adds the gpfsEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetGpfsEntityTypes(gpfsEntityTypes []string) { - o.GpfsEntityTypes = gpfsEntityTypes -} - -// WithHyperflexEntityTypes adds the hyperflexEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithHyperflexEntityTypes(hyperflexEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetHyperflexEntityTypes(hyperflexEntityTypes) - return o -} - -// SetHyperflexEntityTypes adds the hyperflexEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetHyperflexEntityTypes(hyperflexEntityTypes []string) { - o.HyperflexEntityTypes = hyperflexEntityTypes -} - -// WithHypervEntityTypes adds the hypervEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithHypervEntityTypes(hypervEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetHypervEntityTypes(hypervEntityTypes) - return o -} - -// SetHypervEntityTypes adds the hypervEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetHypervEntityTypes(hypervEntityTypes []string) { - o.HypervEntityTypes = hypervEntityTypes -} - -// WithIsProtected adds the isProtected to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithIsProtected(isProtected *bool) *ListEntitiesOfTypeParams { - o.SetIsProtected(isProtected) - return o -} - -// SetIsProtected adds the isProtected to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetIsProtected(isProtected *bool) { - o.IsProtected = isProtected -} - -// WithIsilonEntityTypes adds the isilonEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithIsilonEntityTypes(isilonEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetIsilonEntityTypes(isilonEntityTypes) - return o -} - -// SetIsilonEntityTypes adds the isilonEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetIsilonEntityTypes(isilonEntityTypes []string) { - o.IsilonEntityTypes = isilonEntityTypes -} - -// WithKvmEntityTypes adds the kvmEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithKvmEntityTypes(kvmEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetKvmEntityTypes(kvmEntityTypes) - return o -} - -// SetKvmEntityTypes adds the kvmEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetKvmEntityTypes(kvmEntityTypes []string) { - o.KvmEntityTypes = kvmEntityTypes -} - -// WithNetappEntityTypes adds the netappEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithNetappEntityTypes(netappEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetNetappEntityTypes(netappEntityTypes) - return o -} - -// SetNetappEntityTypes adds the netappEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetNetappEntityTypes(netappEntityTypes []string) { - o.NetappEntityTypes = netappEntityTypes -} - -// WithOffice365EntityTypes adds the office365EntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithOffice365EntityTypes(office365EntityTypes []string) *ListEntitiesOfTypeParams { - o.SetOffice365EntityTypes(office365EntityTypes) - return o -} - -// SetOffice365EntityTypes adds the office365EntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetOffice365EntityTypes(office365EntityTypes []string) { - o.Office365EntityTypes = office365EntityTypes -} - -// WithOracleEntityTypes adds the oracleEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithOracleEntityTypes(oracleEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetOracleEntityTypes(oracleEntityTypes) - return o -} - -// SetOracleEntityTypes adds the oracleEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetOracleEntityTypes(oracleEntityTypes []string) { - o.OracleEntityTypes = oracleEntityTypes -} - -// WithParentEntityID adds the parentEntityID to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithParentEntityID(parentEntityID *int64) *ListEntitiesOfTypeParams { - o.SetParentEntityID(parentEntityID) - return o -} - -// SetParentEntityID adds the parentEntityId to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetParentEntityID(parentEntityID *int64) { - o.ParentEntityID = parentEntityID -} - -// WithPhysicalEntityTypes adds the physicalEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithPhysicalEntityTypes(physicalEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetPhysicalEntityTypes(physicalEntityTypes) - return o -} - -// SetPhysicalEntityTypes adds the physicalEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetPhysicalEntityTypes(physicalEntityTypes []string) { - o.PhysicalEntityTypes = physicalEntityTypes -} - -// WithPureEntityTypes adds the pureEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithPureEntityTypes(pureEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetPureEntityTypes(pureEntityTypes) - return o -} - -// SetPureEntityTypes adds the pureEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetPureEntityTypes(pureEntityTypes []string) { - o.PureEntityTypes = pureEntityTypes -} - -// WithRootEntityID adds the rootEntityID to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithRootEntityID(rootEntityID *int64) *ListEntitiesOfTypeParams { - o.SetRootEntityID(rootEntityID) - return o -} - -// SetRootEntityID adds the rootEntityId to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetRootEntityID(rootEntityID *int64) { - o.RootEntityID = rootEntityID -} - -// WithSQLEntityTypes adds the sQLEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithSQLEntityTypes(sQLEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetSQLEntityTypes(sQLEntityTypes) - return o -} - -// SetSQLEntityTypes adds the sqlEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetSQLEntityTypes(sQLEntityTypes []string) { - o.SQLEntityTypes = sQLEntityTypes -} - -// WithTenantIds adds the tenantIds to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithTenantIds(tenantIds []string) *ListEntitiesOfTypeParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewEntityTypes adds the viewEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithViewEntityTypes(viewEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetViewEntityTypes(viewEntityTypes) - return o -} - -// SetViewEntityTypes adds the viewEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetViewEntityTypes(viewEntityTypes []string) { - o.ViewEntityTypes = viewEntityTypes -} - -// WithVmwareEntityTypes adds the vmwareEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) WithVmwareEntityTypes(vmwareEntityTypes []string) *ListEntitiesOfTypeParams { - o.SetVmwareEntityTypes(vmwareEntityTypes) - return o -} - -// SetVmwareEntityTypes adds the vmwareEntityTypes to the list entities of type params -func (o *ListEntitiesOfTypeParams) SetVmwareEntityTypes(vmwareEntityTypes []string) { - o.VmwareEntityTypes = vmwareEntityTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *ListEntitiesOfTypeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AcropolisEntityTypes != nil { - - // binding items for acropolisEntityTypes - joinedAcropolisEntityTypes := o.bindParamAcropolisEntityTypes(reg) - - // query array param acropolisEntityTypes - if err := r.SetQueryParam("acropolisEntityTypes", joinedAcropolisEntityTypes...); err != nil { - return err - } - } - - if o.AdEntityTypes != nil { - - // binding items for adEntityTypes - joinedAdEntityTypes := o.bindParamAdEntityTypes(reg) - - // query array param adEntityTypes - if err := r.SetQueryParam("adEntityTypes", joinedAdEntityTypes...); err != nil { - return err - } - } - - if o.AgentEntityTypes != nil { - - // binding items for agentEntityTypes - joinedAgentEntityTypes := o.bindParamAgentEntityTypes(reg) - - // query array param agentEntityTypes - if err := r.SetQueryParam("agentEntityTypes", joinedAgentEntityTypes...); err != nil { - return err - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.AwsEntityTypes != nil { - - // binding items for awsEntityTypes - joinedAwsEntityTypes := o.bindParamAwsEntityTypes(reg) - - // query array param awsEntityTypes - if err := r.SetQueryParam("awsEntityTypes", joinedAwsEntityTypes...); err != nil { - return err - } - } - - if o.AzureEntityTypes != nil { - - // binding items for azureEntityTypes - joinedAzureEntityTypes := o.bindParamAzureEntityTypes(reg) - - // query array param azureEntityTypes - if err := r.SetQueryParam("azureEntityTypes", joinedAzureEntityTypes...); err != nil { - return err - } - } - - if o.EnvironmentTypes != nil { - - // binding items for environmentTypes - joinedEnvironmentTypes := o.bindParamEnvironmentTypes(reg) - - // query array param environmentTypes - if err := r.SetQueryParam("environmentTypes", joinedEnvironmentTypes...); err != nil { - return err - } - } - - if o.FlashbladeEntityTypes != nil { - - // binding items for flashbladeEntityTypes - joinedFlashbladeEntityTypes := o.bindParamFlashbladeEntityTypes(reg) - - // query array param flashbladeEntityTypes - if err := r.SetQueryParam("flashbladeEntityTypes", joinedFlashbladeEntityTypes...); err != nil { - return err - } - } - - if o.GcpEntityTypes != nil { - - // binding items for gcpEntityTypes - joinedGcpEntityTypes := o.bindParamGcpEntityTypes(reg) - - // query array param gcpEntityTypes - if err := r.SetQueryParam("gcpEntityTypes", joinedGcpEntityTypes...); err != nil { - return err - } - } - - if o.GenericNasEntityTypes != nil { - - // binding items for genericNasEntityTypes - joinedGenericNasEntityTypes := o.bindParamGenericNasEntityTypes(reg) - - // query array param genericNasEntityTypes - if err := r.SetQueryParam("genericNasEntityTypes", joinedGenericNasEntityTypes...); err != nil { - return err - } - } - - if o.GpfsEntityTypes != nil { - - // binding items for gpfsEntityTypes - joinedGpfsEntityTypes := o.bindParamGpfsEntityTypes(reg) - - // query array param gpfsEntityTypes - if err := r.SetQueryParam("gpfsEntityTypes", joinedGpfsEntityTypes...); err != nil { - return err - } - } - - if o.HyperflexEntityTypes != nil { - - // binding items for hyperflexEntityTypes - joinedHyperflexEntityTypes := o.bindParamHyperflexEntityTypes(reg) - - // query array param hyperflexEntityTypes - if err := r.SetQueryParam("hyperflexEntityTypes", joinedHyperflexEntityTypes...); err != nil { - return err - } - } - - if o.HypervEntityTypes != nil { - - // binding items for hypervEntityTypes - joinedHypervEntityTypes := o.bindParamHypervEntityTypes(reg) - - // query array param hypervEntityTypes - if err := r.SetQueryParam("hypervEntityTypes", joinedHypervEntityTypes...); err != nil { - return err - } - } - - if o.IsProtected != nil { - - // query param isProtected - var qrIsProtected bool - - if o.IsProtected != nil { - qrIsProtected = *o.IsProtected - } - qIsProtected := swag.FormatBool(qrIsProtected) - if qIsProtected != "" { - - if err := r.SetQueryParam("isProtected", qIsProtected); err != nil { - return err - } - } - } - - if o.IsilonEntityTypes != nil { - - // binding items for isilonEntityTypes - joinedIsilonEntityTypes := o.bindParamIsilonEntityTypes(reg) - - // query array param isilonEntityTypes - if err := r.SetQueryParam("isilonEntityTypes", joinedIsilonEntityTypes...); err != nil { - return err - } - } - - if o.KvmEntityTypes != nil { - - // binding items for kvmEntityTypes - joinedKvmEntityTypes := o.bindParamKvmEntityTypes(reg) - - // query array param kvmEntityTypes - if err := r.SetQueryParam("kvmEntityTypes", joinedKvmEntityTypes...); err != nil { - return err - } - } - - if o.NetappEntityTypes != nil { - - // binding items for netappEntityTypes - joinedNetappEntityTypes := o.bindParamNetappEntityTypes(reg) - - // query array param netappEntityTypes - if err := r.SetQueryParam("netappEntityTypes", joinedNetappEntityTypes...); err != nil { - return err - } - } - - if o.Office365EntityTypes != nil { - - // binding items for office365EntityTypes - joinedOffice365EntityTypes := o.bindParamOffice365EntityTypes(reg) - - // query array param office365EntityTypes - if err := r.SetQueryParam("office365EntityTypes", joinedOffice365EntityTypes...); err != nil { - return err - } - } - - if o.OracleEntityTypes != nil { - - // binding items for oracleEntityTypes - joinedOracleEntityTypes := o.bindParamOracleEntityTypes(reg) - - // query array param oracleEntityTypes - if err := r.SetQueryParam("oracleEntityTypes", joinedOracleEntityTypes...); err != nil { - return err - } - } - - if o.ParentEntityID != nil { - - // query param parentEntityId - var qrParentEntityID int64 - - if o.ParentEntityID != nil { - qrParentEntityID = *o.ParentEntityID - } - qParentEntityID := swag.FormatInt64(qrParentEntityID) - if qParentEntityID != "" { - - if err := r.SetQueryParam("parentEntityId", qParentEntityID); err != nil { - return err - } - } - } - - if o.PhysicalEntityTypes != nil { - - // binding items for physicalEntityTypes - joinedPhysicalEntityTypes := o.bindParamPhysicalEntityTypes(reg) - - // query array param physicalEntityTypes - if err := r.SetQueryParam("physicalEntityTypes", joinedPhysicalEntityTypes...); err != nil { - return err - } - } - - if o.PureEntityTypes != nil { - - // binding items for pureEntityTypes - joinedPureEntityTypes := o.bindParamPureEntityTypes(reg) - - // query array param pureEntityTypes - if err := r.SetQueryParam("pureEntityTypes", joinedPureEntityTypes...); err != nil { - return err - } - } - - if o.RootEntityID != nil { - - // query param rootEntityId - var qrRootEntityID int64 - - if o.RootEntityID != nil { - qrRootEntityID = *o.RootEntityID - } - qRootEntityID := swag.FormatInt64(qrRootEntityID) - if qRootEntityID != "" { - - if err := r.SetQueryParam("rootEntityId", qRootEntityID); err != nil { - return err - } - } - } - - if o.SQLEntityTypes != nil { - - // binding items for sqlEntityTypes - joinedSQLEntityTypes := o.bindParamSQLEntityTypes(reg) - - // query array param sqlEntityTypes - if err := r.SetQueryParam("sqlEntityTypes", joinedSQLEntityTypes...); err != nil { - return err - } - } - - 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.ViewEntityTypes != nil { - - // binding items for viewEntityTypes - joinedViewEntityTypes := o.bindParamViewEntityTypes(reg) - - // query array param viewEntityTypes - if err := r.SetQueryParam("viewEntityTypes", joinedViewEntityTypes...); err != nil { - return err - } - } - - if o.VmwareEntityTypes != nil { - - // binding items for vmwareEntityTypes - joinedVmwareEntityTypes := o.bindParamVmwareEntityTypes(reg) - - // query array param vmwareEntityTypes - if err := r.SetQueryParam("vmwareEntityTypes", joinedVmwareEntityTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListEntitiesOfType binds the parameter acropolisEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamAcropolisEntityTypes(formats strfmt.Registry) []string { - acropolisEntityTypesIR := o.AcropolisEntityTypes - - var acropolisEntityTypesIC []string - for _, acropolisEntityTypesIIR := range acropolisEntityTypesIR { // explode []string - - acropolisEntityTypesIIV := acropolisEntityTypesIIR // string as string - acropolisEntityTypesIC = append(acropolisEntityTypesIC, acropolisEntityTypesIIV) - } - - // items.CollectionFormat: "" - acropolisEntityTypesIS := swag.JoinByFormat(acropolisEntityTypesIC, "") - - return acropolisEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter adEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamAdEntityTypes(formats strfmt.Registry) []string { - adEntityTypesIR := o.AdEntityTypes - - var adEntityTypesIC []string - for _, adEntityTypesIIR := range adEntityTypesIR { // explode []string - - adEntityTypesIIV := adEntityTypesIIR // string as string - adEntityTypesIC = append(adEntityTypesIC, adEntityTypesIIV) - } - - // items.CollectionFormat: "" - adEntityTypesIS := swag.JoinByFormat(adEntityTypesIC, "") - - return adEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter agentEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamAgentEntityTypes(formats strfmt.Registry) []string { - agentEntityTypesIR := o.AgentEntityTypes - - var agentEntityTypesIC []string - for _, agentEntityTypesIIR := range agentEntityTypesIR { // explode []string - - agentEntityTypesIIV := agentEntityTypesIIR // string as string - agentEntityTypesIC = append(agentEntityTypesIC, agentEntityTypesIIV) - } - - // items.CollectionFormat: "" - agentEntityTypesIS := swag.JoinByFormat(agentEntityTypesIC, "") - - return agentEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter awsEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamAwsEntityTypes(formats strfmt.Registry) []string { - awsEntityTypesIR := o.AwsEntityTypes - - var awsEntityTypesIC []string - for _, awsEntityTypesIIR := range awsEntityTypesIR { // explode []string - - awsEntityTypesIIV := awsEntityTypesIIR // string as string - awsEntityTypesIC = append(awsEntityTypesIC, awsEntityTypesIIV) - } - - // items.CollectionFormat: "" - awsEntityTypesIS := swag.JoinByFormat(awsEntityTypesIC, "") - - return awsEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter azureEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamAzureEntityTypes(formats strfmt.Registry) []string { - azureEntityTypesIR := o.AzureEntityTypes - - var azureEntityTypesIC []string - for _, azureEntityTypesIIR := range azureEntityTypesIR { // explode []string - - azureEntityTypesIIV := azureEntityTypesIIR // string as string - azureEntityTypesIC = append(azureEntityTypesIC, azureEntityTypesIIV) - } - - // items.CollectionFormat: "" - azureEntityTypesIS := swag.JoinByFormat(azureEntityTypesIC, "") - - return azureEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter environmentTypes -func (o *ListEntitiesOfTypeParams) bindParamEnvironmentTypes(formats strfmt.Registry) []string { - environmentTypesIR := o.EnvironmentTypes - - var environmentTypesIC []string - for _, environmentTypesIIR := range environmentTypesIR { // explode []string - - environmentTypesIIV := environmentTypesIIR // string as string - environmentTypesIC = append(environmentTypesIC, environmentTypesIIV) - } - - // items.CollectionFormat: "" - environmentTypesIS := swag.JoinByFormat(environmentTypesIC, "") - - return environmentTypesIS -} - -// bindParamListEntitiesOfType binds the parameter flashbladeEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamFlashbladeEntityTypes(formats strfmt.Registry) []string { - flashbladeEntityTypesIR := o.FlashbladeEntityTypes - - var flashbladeEntityTypesIC []string - for _, flashbladeEntityTypesIIR := range flashbladeEntityTypesIR { // explode []string - - flashbladeEntityTypesIIV := flashbladeEntityTypesIIR // string as string - flashbladeEntityTypesIC = append(flashbladeEntityTypesIC, flashbladeEntityTypesIIV) - } - - // items.CollectionFormat: "" - flashbladeEntityTypesIS := swag.JoinByFormat(flashbladeEntityTypesIC, "") - - return flashbladeEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter gcpEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamGcpEntityTypes(formats strfmt.Registry) []string { - gcpEntityTypesIR := o.GcpEntityTypes - - var gcpEntityTypesIC []string - for _, gcpEntityTypesIIR := range gcpEntityTypesIR { // explode []string - - gcpEntityTypesIIV := gcpEntityTypesIIR // string as string - gcpEntityTypesIC = append(gcpEntityTypesIC, gcpEntityTypesIIV) - } - - // items.CollectionFormat: "" - gcpEntityTypesIS := swag.JoinByFormat(gcpEntityTypesIC, "") - - return gcpEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter genericNasEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamGenericNasEntityTypes(formats strfmt.Registry) []string { - genericNasEntityTypesIR := o.GenericNasEntityTypes - - var genericNasEntityTypesIC []string - for _, genericNasEntityTypesIIR := range genericNasEntityTypesIR { // explode []string - - genericNasEntityTypesIIV := genericNasEntityTypesIIR // string as string - genericNasEntityTypesIC = append(genericNasEntityTypesIC, genericNasEntityTypesIIV) - } - - // items.CollectionFormat: "" - genericNasEntityTypesIS := swag.JoinByFormat(genericNasEntityTypesIC, "") - - return genericNasEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter gpfsEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamGpfsEntityTypes(formats strfmt.Registry) []string { - gpfsEntityTypesIR := o.GpfsEntityTypes - - var gpfsEntityTypesIC []string - for _, gpfsEntityTypesIIR := range gpfsEntityTypesIR { // explode []string - - gpfsEntityTypesIIV := gpfsEntityTypesIIR // string as string - gpfsEntityTypesIC = append(gpfsEntityTypesIC, gpfsEntityTypesIIV) - } - - // items.CollectionFormat: "" - gpfsEntityTypesIS := swag.JoinByFormat(gpfsEntityTypesIC, "") - - return gpfsEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter hyperflexEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamHyperflexEntityTypes(formats strfmt.Registry) []string { - hyperflexEntityTypesIR := o.HyperflexEntityTypes - - var hyperflexEntityTypesIC []string - for _, hyperflexEntityTypesIIR := range hyperflexEntityTypesIR { // explode []string - - hyperflexEntityTypesIIV := hyperflexEntityTypesIIR // string as string - hyperflexEntityTypesIC = append(hyperflexEntityTypesIC, hyperflexEntityTypesIIV) - } - - // items.CollectionFormat: "" - hyperflexEntityTypesIS := swag.JoinByFormat(hyperflexEntityTypesIC, "") - - return hyperflexEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter hypervEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamHypervEntityTypes(formats strfmt.Registry) []string { - hypervEntityTypesIR := o.HypervEntityTypes - - var hypervEntityTypesIC []string - for _, hypervEntityTypesIIR := range hypervEntityTypesIR { // explode []string - - hypervEntityTypesIIV := hypervEntityTypesIIR // string as string - hypervEntityTypesIC = append(hypervEntityTypesIC, hypervEntityTypesIIV) - } - - // items.CollectionFormat: "" - hypervEntityTypesIS := swag.JoinByFormat(hypervEntityTypesIC, "") - - return hypervEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter isilonEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamIsilonEntityTypes(formats strfmt.Registry) []string { - isilonEntityTypesIR := o.IsilonEntityTypes - - var isilonEntityTypesIC []string - for _, isilonEntityTypesIIR := range isilonEntityTypesIR { // explode []string - - isilonEntityTypesIIV := isilonEntityTypesIIR // string as string - isilonEntityTypesIC = append(isilonEntityTypesIC, isilonEntityTypesIIV) - } - - // items.CollectionFormat: "" - isilonEntityTypesIS := swag.JoinByFormat(isilonEntityTypesIC, "") - - return isilonEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter kvmEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamKvmEntityTypes(formats strfmt.Registry) []string { - kvmEntityTypesIR := o.KvmEntityTypes - - var kvmEntityTypesIC []string - for _, kvmEntityTypesIIR := range kvmEntityTypesIR { // explode []string - - kvmEntityTypesIIV := kvmEntityTypesIIR // string as string - kvmEntityTypesIC = append(kvmEntityTypesIC, kvmEntityTypesIIV) - } - - // items.CollectionFormat: "" - kvmEntityTypesIS := swag.JoinByFormat(kvmEntityTypesIC, "") - - return kvmEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter netappEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamNetappEntityTypes(formats strfmt.Registry) []string { - netappEntityTypesIR := o.NetappEntityTypes - - var netappEntityTypesIC []string - for _, netappEntityTypesIIR := range netappEntityTypesIR { // explode []string - - netappEntityTypesIIV := netappEntityTypesIIR // string as string - netappEntityTypesIC = append(netappEntityTypesIC, netappEntityTypesIIV) - } - - // items.CollectionFormat: "" - netappEntityTypesIS := swag.JoinByFormat(netappEntityTypesIC, "") - - return netappEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter office365EntityTypes -func (o *ListEntitiesOfTypeParams) bindParamOffice365EntityTypes(formats strfmt.Registry) []string { - office365EntityTypesIR := o.Office365EntityTypes - - var office365EntityTypesIC []string - for _, office365EntityTypesIIR := range office365EntityTypesIR { // explode []string - - office365EntityTypesIIV := office365EntityTypesIIR // string as string - office365EntityTypesIC = append(office365EntityTypesIC, office365EntityTypesIIV) - } - - // items.CollectionFormat: "" - office365EntityTypesIS := swag.JoinByFormat(office365EntityTypesIC, "") - - return office365EntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter oracleEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamOracleEntityTypes(formats strfmt.Registry) []string { - oracleEntityTypesIR := o.OracleEntityTypes - - var oracleEntityTypesIC []string - for _, oracleEntityTypesIIR := range oracleEntityTypesIR { // explode []string - - oracleEntityTypesIIV := oracleEntityTypesIIR // string as string - oracleEntityTypesIC = append(oracleEntityTypesIC, oracleEntityTypesIIV) - } - - // items.CollectionFormat: "" - oracleEntityTypesIS := swag.JoinByFormat(oracleEntityTypesIC, "") - - return oracleEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter physicalEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamPhysicalEntityTypes(formats strfmt.Registry) []string { - physicalEntityTypesIR := o.PhysicalEntityTypes - - var physicalEntityTypesIC []string - for _, physicalEntityTypesIIR := range physicalEntityTypesIR { // explode []string - - physicalEntityTypesIIV := physicalEntityTypesIIR // string as string - physicalEntityTypesIC = append(physicalEntityTypesIC, physicalEntityTypesIIV) - } - - // items.CollectionFormat: "" - physicalEntityTypesIS := swag.JoinByFormat(physicalEntityTypesIC, "") - - return physicalEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter pureEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamPureEntityTypes(formats strfmt.Registry) []string { - pureEntityTypesIR := o.PureEntityTypes - - var pureEntityTypesIC []string - for _, pureEntityTypesIIR := range pureEntityTypesIR { // explode []string - - pureEntityTypesIIV := pureEntityTypesIIR // string as string - pureEntityTypesIC = append(pureEntityTypesIC, pureEntityTypesIIV) - } - - // items.CollectionFormat: "" - pureEntityTypesIS := swag.JoinByFormat(pureEntityTypesIC, "") - - return pureEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter sqlEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamSQLEntityTypes(formats strfmt.Registry) []string { - sQLEntityTypesIR := o.SQLEntityTypes - - var sQLEntityTypesIC []string - for _, sQLEntityTypesIIR := range sQLEntityTypesIR { // explode []string - - sQLEntityTypesIIV := sQLEntityTypesIIR // string as string - sQLEntityTypesIC = append(sQLEntityTypesIC, sQLEntityTypesIIV) - } - - // items.CollectionFormat: "" - sQLEntityTypesIS := swag.JoinByFormat(sQLEntityTypesIC, "") - - return sQLEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter tenantIds -func (o *ListEntitiesOfTypeParams) 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 -} - -// bindParamListEntitiesOfType binds the parameter viewEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamViewEntityTypes(formats strfmt.Registry) []string { - viewEntityTypesIR := o.ViewEntityTypes - - var viewEntityTypesIC []string - for _, viewEntityTypesIIR := range viewEntityTypesIR { // explode []string - - viewEntityTypesIIV := viewEntityTypesIIR // string as string - viewEntityTypesIC = append(viewEntityTypesIC, viewEntityTypesIIV) - } - - // items.CollectionFormat: "" - viewEntityTypesIS := swag.JoinByFormat(viewEntityTypesIC, "") - - return viewEntityTypesIS -} - -// bindParamListEntitiesOfType binds the parameter vmwareEntityTypes -func (o *ListEntitiesOfTypeParams) bindParamVmwareEntityTypes(formats strfmt.Registry) []string { - vmwareEntityTypesIR := o.VmwareEntityTypes - - var vmwareEntityTypesIC []string - for _, vmwareEntityTypesIIR := range vmwareEntityTypesIR { // explode []string - - vmwareEntityTypesIIV := vmwareEntityTypesIIR // string as string - vmwareEntityTypesIC = append(vmwareEntityTypesIC, vmwareEntityTypesIIV) - } - - // items.CollectionFormat: "" - vmwareEntityTypesIS := swag.JoinByFormat(vmwareEntityTypesIC, "") - - return vmwareEntityTypesIS -} diff --git a/v1/client/backup_sources/list_entities_of_type_responses.go b/v1/client/backup_sources/list_entities_of_type_responses.go deleted file mode 100644 index 7fef298c..00000000 --- a/v1/client/backup_sources/list_entities_of_type_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListEntitiesOfTypeReader is a Reader for the ListEntitiesOfType structure. -type ListEntitiesOfTypeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListEntitiesOfTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListEntitiesOfTypeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListEntitiesOfTypeDefault(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 - } -} - -// NewListEntitiesOfTypeOK creates a ListEntitiesOfTypeOK with default headers values -func NewListEntitiesOfTypeOK() *ListEntitiesOfTypeOK { - return &ListEntitiesOfTypeOK{} -} - -/* -ListEntitiesOfTypeOK describes a response with status code 200, with default header values. - -Success -*/ -type ListEntitiesOfTypeOK struct { - Payload []*models.PrivateEntityProto -} - -// IsSuccess returns true when this list entities of type o k response has a 2xx status code -func (o *ListEntitiesOfTypeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list entities of type o k response has a 3xx status code -func (o *ListEntitiesOfTypeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list entities of type o k response has a 4xx status code -func (o *ListEntitiesOfTypeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list entities of type o k response has a 5xx status code -func (o *ListEntitiesOfTypeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list entities of type o k response a status code equal to that given -func (o *ListEntitiesOfTypeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list entities of type o k response -func (o *ListEntitiesOfTypeOK) Code() int { - return 200 -} - -func (o *ListEntitiesOfTypeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /entitiesOfType][%d] listEntitiesOfTypeOK %s", 200, payload) -} - -func (o *ListEntitiesOfTypeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /entitiesOfType][%d] listEntitiesOfTypeOK %s", 200, payload) -} - -func (o *ListEntitiesOfTypeOK) GetPayload() []*models.PrivateEntityProto { - return o.Payload -} - -func (o *ListEntitiesOfTypeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListEntitiesOfTypeDefault creates a ListEntitiesOfTypeDefault with default headers values -func NewListEntitiesOfTypeDefault(code int) *ListEntitiesOfTypeDefault { - return &ListEntitiesOfTypeDefault{ - _statusCode: code, - } -} - -/* -ListEntitiesOfTypeDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ListEntitiesOfTypeDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this list entities of type default response has a 2xx status code -func (o *ListEntitiesOfTypeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list entities of type default response has a 3xx status code -func (o *ListEntitiesOfTypeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list entities of type default response has a 4xx status code -func (o *ListEntitiesOfTypeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list entities of type default response has a 5xx status code -func (o *ListEntitiesOfTypeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list entities of type default response a status code equal to that given -func (o *ListEntitiesOfTypeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list entities of type default response -func (o *ListEntitiesOfTypeDefault) Code() int { - return o._statusCode -} - -func (o *ListEntitiesOfTypeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /entitiesOfType][%d] ListEntitiesOfType default %s", o._statusCode, payload) -} - -func (o *ListEntitiesOfTypeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /entitiesOfType][%d] ListEntitiesOfType default %s", o._statusCode, payload) -} - -func (o *ListEntitiesOfTypeDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ListEntitiesOfTypeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/list_registered_sources_report_parameters.go b/v1/client/backup_sources/list_registered_sources_report_parameters.go deleted file mode 100644 index bcf73805..00000000 --- a/v1/client/backup_sources/list_registered_sources_report_parameters.go +++ /dev/null @@ -1,327 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" -) - -// NewListRegisteredSourcesReportParams creates a new ListRegisteredSourcesReportParams 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 NewListRegisteredSourcesReportParams() *ListRegisteredSourcesReportParams { - return &ListRegisteredSourcesReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListRegisteredSourcesReportParamsWithTimeout creates a new ListRegisteredSourcesReportParams object -// with the ability to set a timeout on a request. -func NewListRegisteredSourcesReportParamsWithTimeout(timeout time.Duration) *ListRegisteredSourcesReportParams { - return &ListRegisteredSourcesReportParams{ - timeout: timeout, - } -} - -// NewListRegisteredSourcesReportParamsWithContext creates a new ListRegisteredSourcesReportParams object -// with the ability to set a context for a request. -func NewListRegisteredSourcesReportParamsWithContext(ctx context.Context) *ListRegisteredSourcesReportParams { - return &ListRegisteredSourcesReportParams{ - Context: ctx, - } -} - -// NewListRegisteredSourcesReportParamsWithHTTPClient creates a new ListRegisteredSourcesReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewListRegisteredSourcesReportParamsWithHTTPClient(client *http.Client) *ListRegisteredSourcesReportParams { - return &ListRegisteredSourcesReportParams{ - HTTPClient: client, - } -} - -/* -ListRegisteredSourcesReportParams contains all the parameters to send to the API endpoint - - for the list registered sources report operation. - - Typically these are written to a http.Request. -*/ -type ListRegisteredSourcesReportParams struct { - - /* RefreshDateEndUsecs. - - RefreshDateEndUsecs is the filter to report sources refreshed by magneto - before specified time in usecs. If no value is provided, value will be - assumed to be present time. - - Format: int64 - */ - RefreshDateEndUsecs *int64 - - /* RefreshDateStartUsecs. - - RefreshDateStartUsecs is the filter to report sources refreshed by magneto - after specified time in usecs. If no value is provided, value will be - assumed to be beginning of time. - - Format: int64 - */ - RefreshDateStartUsecs *int64 - - /* RegistrationDateEndUsecs. - - RegistrationDateEndUsecs is the filter to report sources registered before - specified time in usecs. If no value is provided, value will be assumed - to be present time. - - Format: int64 - */ - RegistrationDateEndUsecs *int64 - - /* RegistrationDateStartUsecs. - - RegistrationDateStartUsecs is the filter to report sources registered - after specified time in usecs. If no value is provided, value will be - assumed to be beginning of time. - - Format: int64 - */ - RegistrationDateStartUsecs *int64 - - /* SourceIds. - - SourceIds specifies the Ids of the registered sources to filter. - */ - SourceIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list registered sources report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRegisteredSourcesReportParams) WithDefaults() *ListRegisteredSourcesReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list registered sources report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRegisteredSourcesReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithTimeout(timeout time.Duration) *ListRegisteredSourcesReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithContext(ctx context.Context) *ListRegisteredSourcesReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithHTTPClient(client *http.Client) *ListRegisteredSourcesReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRefreshDateEndUsecs adds the refreshDateEndUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithRefreshDateEndUsecs(refreshDateEndUsecs *int64) *ListRegisteredSourcesReportParams { - o.SetRefreshDateEndUsecs(refreshDateEndUsecs) - return o -} - -// SetRefreshDateEndUsecs adds the refreshDateEndUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetRefreshDateEndUsecs(refreshDateEndUsecs *int64) { - o.RefreshDateEndUsecs = refreshDateEndUsecs -} - -// WithRefreshDateStartUsecs adds the refreshDateStartUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithRefreshDateStartUsecs(refreshDateStartUsecs *int64) *ListRegisteredSourcesReportParams { - o.SetRefreshDateStartUsecs(refreshDateStartUsecs) - return o -} - -// SetRefreshDateStartUsecs adds the refreshDateStartUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetRefreshDateStartUsecs(refreshDateStartUsecs *int64) { - o.RefreshDateStartUsecs = refreshDateStartUsecs -} - -// WithRegistrationDateEndUsecs adds the registrationDateEndUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithRegistrationDateEndUsecs(registrationDateEndUsecs *int64) *ListRegisteredSourcesReportParams { - o.SetRegistrationDateEndUsecs(registrationDateEndUsecs) - return o -} - -// SetRegistrationDateEndUsecs adds the registrationDateEndUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetRegistrationDateEndUsecs(registrationDateEndUsecs *int64) { - o.RegistrationDateEndUsecs = registrationDateEndUsecs -} - -// WithRegistrationDateStartUsecs adds the registrationDateStartUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithRegistrationDateStartUsecs(registrationDateStartUsecs *int64) *ListRegisteredSourcesReportParams { - o.SetRegistrationDateStartUsecs(registrationDateStartUsecs) - return o -} - -// SetRegistrationDateStartUsecs adds the registrationDateStartUsecs to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetRegistrationDateStartUsecs(registrationDateStartUsecs *int64) { - o.RegistrationDateStartUsecs = registrationDateStartUsecs -} - -// WithSourceIds adds the sourceIds to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) WithSourceIds(sourceIds []int64) *ListRegisteredSourcesReportParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the list registered sources report params -func (o *ListRegisteredSourcesReportParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WriteToRequest writes these params to a swagger request -func (o *ListRegisteredSourcesReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.RefreshDateEndUsecs != nil { - - // query param refreshDateEndUsecs - var qrRefreshDateEndUsecs int64 - - if o.RefreshDateEndUsecs != nil { - qrRefreshDateEndUsecs = *o.RefreshDateEndUsecs - } - qRefreshDateEndUsecs := swag.FormatInt64(qrRefreshDateEndUsecs) - if qRefreshDateEndUsecs != "" { - - if err := r.SetQueryParam("refreshDateEndUsecs", qRefreshDateEndUsecs); err != nil { - return err - } - } - } - - if o.RefreshDateStartUsecs != nil { - - // query param refreshDateStartUsecs - var qrRefreshDateStartUsecs int64 - - if o.RefreshDateStartUsecs != nil { - qrRefreshDateStartUsecs = *o.RefreshDateStartUsecs - } - qRefreshDateStartUsecs := swag.FormatInt64(qrRefreshDateStartUsecs) - if qRefreshDateStartUsecs != "" { - - if err := r.SetQueryParam("refreshDateStartUsecs", qRefreshDateStartUsecs); err != nil { - return err - } - } - } - - if o.RegistrationDateEndUsecs != nil { - - // query param registrationDateEndUsecs - var qrRegistrationDateEndUsecs int64 - - if o.RegistrationDateEndUsecs != nil { - qrRegistrationDateEndUsecs = *o.RegistrationDateEndUsecs - } - qRegistrationDateEndUsecs := swag.FormatInt64(qrRegistrationDateEndUsecs) - if qRegistrationDateEndUsecs != "" { - - if err := r.SetQueryParam("registrationDateEndUsecs", qRegistrationDateEndUsecs); err != nil { - return err - } - } - } - - if o.RegistrationDateStartUsecs != nil { - - // query param registrationDateStartUsecs - var qrRegistrationDateStartUsecs int64 - - if o.RegistrationDateStartUsecs != nil { - qrRegistrationDateStartUsecs = *o.RegistrationDateStartUsecs - } - qRegistrationDateStartUsecs := swag.FormatInt64(qrRegistrationDateStartUsecs) - if qRegistrationDateStartUsecs != "" { - - if err := r.SetQueryParam("registrationDateStartUsecs", qRegistrationDateStartUsecs); err != nil { - return err - } - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListRegisteredSourcesReport binds the parameter sourceIds -func (o *ListRegisteredSourcesReportParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} diff --git a/v1/client/backup_sources/list_registered_sources_report_responses.go b/v1/client/backup_sources/list_registered_sources_report_responses.go deleted file mode 100644 index 149ed1f7..00000000 --- a/v1/client/backup_sources/list_registered_sources_report_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListRegisteredSourcesReportReader is a Reader for the ListRegisteredSourcesReport structure. -type ListRegisteredSourcesReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListRegisteredSourcesReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListRegisteredSourcesReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListRegisteredSourcesReportDefault(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 - } -} - -// NewListRegisteredSourcesReportOK creates a ListRegisteredSourcesReportOK with default headers values -func NewListRegisteredSourcesReportOK() *ListRegisteredSourcesReportOK { - return &ListRegisteredSourcesReportOK{} -} - -/* -ListRegisteredSourcesReportOK describes a response with status code 200, with default header values. - -Success -*/ -type ListRegisteredSourcesReportOK struct { - Payload *models.RegisteredEntityReport -} - -// IsSuccess returns true when this list registered sources report o k response has a 2xx status code -func (o *ListRegisteredSourcesReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list registered sources report o k response has a 3xx status code -func (o *ListRegisteredSourcesReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list registered sources report o k response has a 4xx status code -func (o *ListRegisteredSourcesReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list registered sources report o k response has a 5xx status code -func (o *ListRegisteredSourcesReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list registered sources report o k response a status code equal to that given -func (o *ListRegisteredSourcesReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list registered sources report o k response -func (o *ListRegisteredSourcesReportOK) Code() int { - return 200 -} - -func (o *ListRegisteredSourcesReportOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /reports/backupsources][%d] listRegisteredSourcesReportOK %s", 200, payload) -} - -func (o *ListRegisteredSourcesReportOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /reports/backupsources][%d] listRegisteredSourcesReportOK %s", 200, payload) -} - -func (o *ListRegisteredSourcesReportOK) GetPayload() *models.RegisteredEntityReport { - return o.Payload -} - -func (o *ListRegisteredSourcesReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RegisteredEntityReport) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListRegisteredSourcesReportDefault creates a ListRegisteredSourcesReportDefault with default headers values -func NewListRegisteredSourcesReportDefault(code int) *ListRegisteredSourcesReportDefault { - return &ListRegisteredSourcesReportDefault{ - _statusCode: code, - } -} - -/* -ListRegisteredSourcesReportDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ListRegisteredSourcesReportDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this list registered sources report default response has a 2xx status code -func (o *ListRegisteredSourcesReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list registered sources report default response has a 3xx status code -func (o *ListRegisteredSourcesReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list registered sources report default response has a 4xx status code -func (o *ListRegisteredSourcesReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list registered sources report default response has a 5xx status code -func (o *ListRegisteredSourcesReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list registered sources report default response a status code equal to that given -func (o *ListRegisteredSourcesReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list registered sources report default response -func (o *ListRegisteredSourcesReportDefault) Code() int { - return o._statusCode -} - -func (o *ListRegisteredSourcesReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /reports/backupsources][%d] ListRegisteredSourcesReport default %s", o._statusCode, payload) -} - -func (o *ListRegisteredSourcesReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /reports/backupsources][%d] ListRegisteredSourcesReport default %s", o._statusCode, payload) -} - -func (o *ListRegisteredSourcesReportDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ListRegisteredSourcesReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/register_app_owner_parameters.go b/v1/client/backup_sources/register_app_owner_parameters.go deleted file mode 100644 index 74f7e8ce..00000000 --- a/v1/client/backup_sources/register_app_owner_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRegisterAppOwnerParams creates a new RegisterAppOwnerParams 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 NewRegisterAppOwnerParams() *RegisterAppOwnerParams { - return &RegisterAppOwnerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterAppOwnerParamsWithTimeout creates a new RegisterAppOwnerParams object -// with the ability to set a timeout on a request. -func NewRegisterAppOwnerParamsWithTimeout(timeout time.Duration) *RegisterAppOwnerParams { - return &RegisterAppOwnerParams{ - timeout: timeout, - } -} - -// NewRegisterAppOwnerParamsWithContext creates a new RegisterAppOwnerParams object -// with the ability to set a context for a request. -func NewRegisterAppOwnerParamsWithContext(ctx context.Context) *RegisterAppOwnerParams { - return &RegisterAppOwnerParams{ - Context: ctx, - } -} - -// NewRegisterAppOwnerParamsWithHTTPClient creates a new RegisterAppOwnerParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterAppOwnerParamsWithHTTPClient(client *http.Client) *RegisterAppOwnerParams { - return &RegisterAppOwnerParams{ - HTTPClient: client, - } -} - -/* -RegisterAppOwnerParams contains all the parameters to send to the API endpoint - - for the register app owner operation. - - Typically these are written to a http.Request. -*/ -type RegisterAppOwnerParams struct { - - // Body. - Body *models.RegisterOrUpdateAppOwnerArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register app owner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterAppOwnerParams) WithDefaults() *RegisterAppOwnerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register app owner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterAppOwnerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register app owner params -func (o *RegisterAppOwnerParams) WithTimeout(timeout time.Duration) *RegisterAppOwnerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register app owner params -func (o *RegisterAppOwnerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register app owner params -func (o *RegisterAppOwnerParams) WithContext(ctx context.Context) *RegisterAppOwnerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register app owner params -func (o *RegisterAppOwnerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register app owner params -func (o *RegisterAppOwnerParams) WithHTTPClient(client *http.Client) *RegisterAppOwnerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register app owner params -func (o *RegisterAppOwnerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register app owner params -func (o *RegisterAppOwnerParams) WithBody(body *models.RegisterOrUpdateAppOwnerArg) *RegisterAppOwnerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register app owner params -func (o *RegisterAppOwnerParams) SetBody(body *models.RegisterOrUpdateAppOwnerArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterAppOwnerParams) 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/backup_sources/register_app_owner_responses.go b/v1/client/backup_sources/register_app_owner_responses.go deleted file mode 100644 index b0732c86..00000000 --- a/v1/client/backup_sources/register_app_owner_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RegisterAppOwnerReader is a Reader for the RegisterAppOwner structure. -type RegisterAppOwnerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterAppOwnerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRegisterAppOwnerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterAppOwnerDefault(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 - } -} - -// NewRegisterAppOwnerOK creates a RegisterAppOwnerOK with default headers values -func NewRegisterAppOwnerOK() *RegisterAppOwnerOK { - return &RegisterAppOwnerOK{} -} - -/* -RegisterAppOwnerOK describes a response with status code 200, with default header values. - -Success Response -*/ -type RegisterAppOwnerOK struct { -} - -// IsSuccess returns true when this register app owner o k response has a 2xx status code -func (o *RegisterAppOwnerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register app owner o k response has a 3xx status code -func (o *RegisterAppOwnerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register app owner o k response has a 4xx status code -func (o *RegisterAppOwnerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this register app owner o k response has a 5xx status code -func (o *RegisterAppOwnerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this register app owner o k response a status code equal to that given -func (o *RegisterAppOwnerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the register app owner o k response -func (o *RegisterAppOwnerOK) Code() int { - return 200 -} - -func (o *RegisterAppOwnerOK) Error() string { - return fmt.Sprintf("[POST /applicationSourceRegistration][%d] registerAppOwnerOK", 200) -} - -func (o *RegisterAppOwnerOK) String() string { - return fmt.Sprintf("[POST /applicationSourceRegistration][%d] registerAppOwnerOK", 200) -} - -func (o *RegisterAppOwnerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRegisterAppOwnerDefault creates a RegisterAppOwnerDefault with default headers values -func NewRegisterAppOwnerDefault(code int) *RegisterAppOwnerDefault { - return &RegisterAppOwnerDefault{ - _statusCode: code, - } -} - -/* -RegisterAppOwnerDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RegisterAppOwnerDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this register app owner default response has a 2xx status code -func (o *RegisterAppOwnerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register app owner default response has a 3xx status code -func (o *RegisterAppOwnerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register app owner default response has a 4xx status code -func (o *RegisterAppOwnerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register app owner default response has a 5xx status code -func (o *RegisterAppOwnerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register app owner default response a status code equal to that given -func (o *RegisterAppOwnerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register app owner default response -func (o *RegisterAppOwnerDefault) Code() int { - return o._statusCode -} - -func (o *RegisterAppOwnerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /applicationSourceRegistration][%d] RegisterAppOwner default %s", o._statusCode, payload) -} - -func (o *RegisterAppOwnerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /applicationSourceRegistration][%d] RegisterAppOwner default %s", o._statusCode, payload) -} - -func (o *RegisterAppOwnerDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RegisterAppOwnerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/register_backup_source_parameters.go b/v1/client/backup_sources/register_backup_source_parameters.go deleted file mode 100644 index 11fbccb3..00000000 --- a/v1/client/backup_sources/register_backup_source_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRegisterBackupSourceParams creates a new RegisterBackupSourceParams 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 NewRegisterBackupSourceParams() *RegisterBackupSourceParams { - return &RegisterBackupSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterBackupSourceParamsWithTimeout creates a new RegisterBackupSourceParams object -// with the ability to set a timeout on a request. -func NewRegisterBackupSourceParamsWithTimeout(timeout time.Duration) *RegisterBackupSourceParams { - return &RegisterBackupSourceParams{ - timeout: timeout, - } -} - -// NewRegisterBackupSourceParamsWithContext creates a new RegisterBackupSourceParams object -// with the ability to set a context for a request. -func NewRegisterBackupSourceParamsWithContext(ctx context.Context) *RegisterBackupSourceParams { - return &RegisterBackupSourceParams{ - Context: ctx, - } -} - -// NewRegisterBackupSourceParamsWithHTTPClient creates a new RegisterBackupSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterBackupSourceParamsWithHTTPClient(client *http.Client) *RegisterBackupSourceParams { - return &RegisterBackupSourceParams{ - HTTPClient: client, - } -} - -/* -RegisterBackupSourceParams contains all the parameters to send to the API endpoint - - for the register backup source operation. - - Typically these are written to a http.Request. -*/ -type RegisterBackupSourceParams struct { - - /* Body. - - Request to register or update a backup source - */ - Body *models.EntityArgWrapper - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register backup source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterBackupSourceParams) WithDefaults() *RegisterBackupSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register backup source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterBackupSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register backup source params -func (o *RegisterBackupSourceParams) WithTimeout(timeout time.Duration) *RegisterBackupSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register backup source params -func (o *RegisterBackupSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register backup source params -func (o *RegisterBackupSourceParams) WithContext(ctx context.Context) *RegisterBackupSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register backup source params -func (o *RegisterBackupSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register backup source params -func (o *RegisterBackupSourceParams) WithHTTPClient(client *http.Client) *RegisterBackupSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register backup source params -func (o *RegisterBackupSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register backup source params -func (o *RegisterBackupSourceParams) WithBody(body *models.EntityArgWrapper) *RegisterBackupSourceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register backup source params -func (o *RegisterBackupSourceParams) SetBody(body *models.EntityArgWrapper) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterBackupSourceParams) 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/backup_sources/register_backup_source_responses.go b/v1/client/backup_sources/register_backup_source_responses.go deleted file mode 100644 index ac200d42..00000000 --- a/v1/client/backup_sources/register_backup_source_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RegisterBackupSourceReader is a Reader for the RegisterBackupSource structure. -type RegisterBackupSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterBackupSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRegisterBackupSourceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterBackupSourceDefault(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 - } -} - -// NewRegisterBackupSourceOK creates a RegisterBackupSourceOK with default headers values -func NewRegisterBackupSourceOK() *RegisterBackupSourceOK { - return &RegisterBackupSourceOK{} -} - -/* -RegisterBackupSourceOK describes a response with status code 200, with default header values. - -Success Response -*/ -type RegisterBackupSourceOK struct { -} - -// IsSuccess returns true when this register backup source o k response has a 2xx status code -func (o *RegisterBackupSourceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register backup source o k response has a 3xx status code -func (o *RegisterBackupSourceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register backup source o k response has a 4xx status code -func (o *RegisterBackupSourceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this register backup source o k response has a 5xx status code -func (o *RegisterBackupSourceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this register backup source o k response a status code equal to that given -func (o *RegisterBackupSourceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the register backup source o k response -func (o *RegisterBackupSourceOK) Code() int { - return 200 -} - -func (o *RegisterBackupSourceOK) Error() string { - return fmt.Sprintf("[POST /backupsources][%d] registerBackupSourceOK", 200) -} - -func (o *RegisterBackupSourceOK) String() string { - return fmt.Sprintf("[POST /backupsources][%d] registerBackupSourceOK", 200) -} - -func (o *RegisterBackupSourceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRegisterBackupSourceDefault creates a RegisterBackupSourceDefault with default headers values -func NewRegisterBackupSourceDefault(code int) *RegisterBackupSourceDefault { - return &RegisterBackupSourceDefault{ - _statusCode: code, - } -} - -/* -RegisterBackupSourceDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RegisterBackupSourceDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this register backup source default response has a 2xx status code -func (o *RegisterBackupSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register backup source default response has a 3xx status code -func (o *RegisterBackupSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register backup source default response has a 4xx status code -func (o *RegisterBackupSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register backup source default response has a 5xx status code -func (o *RegisterBackupSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register backup source default response a status code equal to that given -func (o *RegisterBackupSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register backup source default response -func (o *RegisterBackupSourceDefault) Code() int { - return o._statusCode -} - -func (o *RegisterBackupSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupsources][%d] RegisterBackupSource default %s", o._statusCode, payload) -} - -func (o *RegisterBackupSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /backupsources][%d] RegisterBackupSource default %s", o._statusCode, payload) -} - -func (o *RegisterBackupSourceDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RegisterBackupSourceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/update_app_owner_registration_parameters.go b/v1/client/backup_sources/update_app_owner_registration_parameters.go deleted file mode 100644 index 2dc2e246..00000000 --- a/v1/client/backup_sources/update_app_owner_registration_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateAppOwnerRegistrationParams creates a new UpdateAppOwnerRegistrationParams 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 NewUpdateAppOwnerRegistrationParams() *UpdateAppOwnerRegistrationParams { - return &UpdateAppOwnerRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAppOwnerRegistrationParamsWithTimeout creates a new UpdateAppOwnerRegistrationParams object -// with the ability to set a timeout on a request. -func NewUpdateAppOwnerRegistrationParamsWithTimeout(timeout time.Duration) *UpdateAppOwnerRegistrationParams { - return &UpdateAppOwnerRegistrationParams{ - timeout: timeout, - } -} - -// NewUpdateAppOwnerRegistrationParamsWithContext creates a new UpdateAppOwnerRegistrationParams object -// with the ability to set a context for a request. -func NewUpdateAppOwnerRegistrationParamsWithContext(ctx context.Context) *UpdateAppOwnerRegistrationParams { - return &UpdateAppOwnerRegistrationParams{ - Context: ctx, - } -} - -// NewUpdateAppOwnerRegistrationParamsWithHTTPClient creates a new UpdateAppOwnerRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAppOwnerRegistrationParamsWithHTTPClient(client *http.Client) *UpdateAppOwnerRegistrationParams { - return &UpdateAppOwnerRegistrationParams{ - HTTPClient: client, - } -} - -/* -UpdateAppOwnerRegistrationParams contains all the parameters to send to the API endpoint - - for the update app owner registration operation. - - Typically these are written to a http.Request. -*/ -type UpdateAppOwnerRegistrationParams struct { - - // Body. - Body *models.RegisterOrUpdateAppOwnerArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update app owner registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppOwnerRegistrationParams) WithDefaults() *UpdateAppOwnerRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update app owner registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppOwnerRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) WithTimeout(timeout time.Duration) *UpdateAppOwnerRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) WithContext(ctx context.Context) *UpdateAppOwnerRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) WithHTTPClient(client *http.Client) *UpdateAppOwnerRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) WithBody(body *models.RegisterOrUpdateAppOwnerArg) *UpdateAppOwnerRegistrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update app owner registration params -func (o *UpdateAppOwnerRegistrationParams) SetBody(body *models.RegisterOrUpdateAppOwnerArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAppOwnerRegistrationParams) 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/backup_sources/update_app_owner_registration_responses.go b/v1/client/backup_sources/update_app_owner_registration_responses.go deleted file mode 100644 index 5aad5173..00000000 --- a/v1/client/backup_sources/update_app_owner_registration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateAppOwnerRegistrationReader is a Reader for the UpdateAppOwnerRegistration structure. -type UpdateAppOwnerRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAppOwnerRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAppOwnerRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAppOwnerRegistrationDefault(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 - } -} - -// NewUpdateAppOwnerRegistrationOK creates a UpdateAppOwnerRegistrationOK with default headers values -func NewUpdateAppOwnerRegistrationOK() *UpdateAppOwnerRegistrationOK { - return &UpdateAppOwnerRegistrationOK{} -} - -/* -UpdateAppOwnerRegistrationOK describes a response with status code 200, with default header values. - -Success Response -*/ -type UpdateAppOwnerRegistrationOK struct { -} - -// IsSuccess returns true when this update app owner registration o k response has a 2xx status code -func (o *UpdateAppOwnerRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update app owner registration o k response has a 3xx status code -func (o *UpdateAppOwnerRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app owner registration o k response has a 4xx status code -func (o *UpdateAppOwnerRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app owner registration o k response has a 5xx status code -func (o *UpdateAppOwnerRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update app owner registration o k response a status code equal to that given -func (o *UpdateAppOwnerRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update app owner registration o k response -func (o *UpdateAppOwnerRegistrationOK) Code() int { - return 200 -} - -func (o *UpdateAppOwnerRegistrationOK) Error() string { - return fmt.Sprintf("[PUT /applicationSourceRegistration][%d] updateAppOwnerRegistrationOK", 200) -} - -func (o *UpdateAppOwnerRegistrationOK) String() string { - return fmt.Sprintf("[PUT /applicationSourceRegistration][%d] updateAppOwnerRegistrationOK", 200) -} - -func (o *UpdateAppOwnerRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateAppOwnerRegistrationDefault creates a UpdateAppOwnerRegistrationDefault with default headers values -func NewUpdateAppOwnerRegistrationDefault(code int) *UpdateAppOwnerRegistrationDefault { - return &UpdateAppOwnerRegistrationDefault{ - _statusCode: code, - } -} - -/* -UpdateAppOwnerRegistrationDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateAppOwnerRegistrationDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update app owner registration default response has a 2xx status code -func (o *UpdateAppOwnerRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update app owner registration default response has a 3xx status code -func (o *UpdateAppOwnerRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update app owner registration default response has a 4xx status code -func (o *UpdateAppOwnerRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update app owner registration default response has a 5xx status code -func (o *UpdateAppOwnerRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update app owner registration default response a status code equal to that given -func (o *UpdateAppOwnerRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update app owner registration default response -func (o *UpdateAppOwnerRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAppOwnerRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /applicationSourceRegistration][%d] UpdateAppOwnerRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateAppOwnerRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /applicationSourceRegistration][%d] UpdateAppOwnerRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateAppOwnerRegistrationDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateAppOwnerRegistrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/backup_sources/update_backup_source_access_info_parameters.go b/v1/client/backup_sources/update_backup_source_access_info_parameters.go deleted file mode 100644 index 15a8b3ea..00000000 --- a/v1/client/backup_sources/update_backup_source_access_info_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateBackupSourceAccessInfoParams creates a new UpdateBackupSourceAccessInfoParams 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 NewUpdateBackupSourceAccessInfoParams() *UpdateBackupSourceAccessInfoParams { - return &UpdateBackupSourceAccessInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateBackupSourceAccessInfoParamsWithTimeout creates a new UpdateBackupSourceAccessInfoParams object -// with the ability to set a timeout on a request. -func NewUpdateBackupSourceAccessInfoParamsWithTimeout(timeout time.Duration) *UpdateBackupSourceAccessInfoParams { - return &UpdateBackupSourceAccessInfoParams{ - timeout: timeout, - } -} - -// NewUpdateBackupSourceAccessInfoParamsWithContext creates a new UpdateBackupSourceAccessInfoParams object -// with the ability to set a context for a request. -func NewUpdateBackupSourceAccessInfoParamsWithContext(ctx context.Context) *UpdateBackupSourceAccessInfoParams { - return &UpdateBackupSourceAccessInfoParams{ - Context: ctx, - } -} - -// NewUpdateBackupSourceAccessInfoParamsWithHTTPClient creates a new UpdateBackupSourceAccessInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateBackupSourceAccessInfoParamsWithHTTPClient(client *http.Client) *UpdateBackupSourceAccessInfoParams { - return &UpdateBackupSourceAccessInfoParams{ - HTTPClient: client, - } -} - -/* -UpdateBackupSourceAccessInfoParams contains all the parameters to send to the API endpoint - - for the update backup source access info operation. - - Typically these are written to a http.Request. -*/ -type UpdateBackupSourceAccessInfoParams struct { - - /* Body. - - Request to register or update a backup source - */ - Body *models.EntityArgWrapper - - /* ID. - - Specifies a backup source's unique id - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update backup source access info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackupSourceAccessInfoParams) WithDefaults() *UpdateBackupSourceAccessInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update backup source access info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackupSourceAccessInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) WithTimeout(timeout time.Duration) *UpdateBackupSourceAccessInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) WithContext(ctx context.Context) *UpdateBackupSourceAccessInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) WithHTTPClient(client *http.Client) *UpdateBackupSourceAccessInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) WithBody(body *models.EntityArgWrapper) *UpdateBackupSourceAccessInfoParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) SetBody(body *models.EntityArgWrapper) { - o.Body = body -} - -// WithID adds the id to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) WithID(id int64) *UpdateBackupSourceAccessInfoParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update backup source access info params -func (o *UpdateBackupSourceAccessInfoParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateBackupSourceAccessInfoParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/backup_sources/update_backup_source_access_info_responses.go b/v1/client/backup_sources/update_backup_source_access_info_responses.go deleted file mode 100644 index c46f73c1..00000000 --- a/v1/client/backup_sources/update_backup_source_access_info_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package backup_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateBackupSourceAccessInfoReader is a Reader for the UpdateBackupSourceAccessInfo structure. -type UpdateBackupSourceAccessInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateBackupSourceAccessInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateBackupSourceAccessInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateBackupSourceAccessInfoDefault(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 - } -} - -// NewUpdateBackupSourceAccessInfoOK creates a UpdateBackupSourceAccessInfoOK with default headers values -func NewUpdateBackupSourceAccessInfoOK() *UpdateBackupSourceAccessInfoOK { - return &UpdateBackupSourceAccessInfoOK{} -} - -/* -UpdateBackupSourceAccessInfoOK describes a response with status code 200, with default header values. - -Success Response -*/ -type UpdateBackupSourceAccessInfoOK struct { -} - -// IsSuccess returns true when this update backup source access info o k response has a 2xx status code -func (o *UpdateBackupSourceAccessInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update backup source access info o k response has a 3xx status code -func (o *UpdateBackupSourceAccessInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update backup source access info o k response has a 4xx status code -func (o *UpdateBackupSourceAccessInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update backup source access info o k response has a 5xx status code -func (o *UpdateBackupSourceAccessInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update backup source access info o k response a status code equal to that given -func (o *UpdateBackupSourceAccessInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update backup source access info o k response -func (o *UpdateBackupSourceAccessInfoOK) Code() int { - return 200 -} - -func (o *UpdateBackupSourceAccessInfoOK) Error() string { - return fmt.Sprintf("[PUT /backupsources/{id}][%d] updateBackupSourceAccessInfoOK", 200) -} - -func (o *UpdateBackupSourceAccessInfoOK) String() string { - return fmt.Sprintf("[PUT /backupsources/{id}][%d] updateBackupSourceAccessInfoOK", 200) -} - -func (o *UpdateBackupSourceAccessInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateBackupSourceAccessInfoDefault creates a UpdateBackupSourceAccessInfoDefault with default headers values -func NewUpdateBackupSourceAccessInfoDefault(code int) *UpdateBackupSourceAccessInfoDefault { - return &UpdateBackupSourceAccessInfoDefault{ - _statusCode: code, - } -} - -/* -UpdateBackupSourceAccessInfoDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateBackupSourceAccessInfoDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update backup source access info default response has a 2xx status code -func (o *UpdateBackupSourceAccessInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update backup source access info default response has a 3xx status code -func (o *UpdateBackupSourceAccessInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update backup source access info default response has a 4xx status code -func (o *UpdateBackupSourceAccessInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update backup source access info default response has a 5xx status code -func (o *UpdateBackupSourceAccessInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update backup source access info default response a status code equal to that given -func (o *UpdateBackupSourceAccessInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update backup source access info default response -func (o *UpdateBackupSourceAccessInfoDefault) Code() int { - return o._statusCode -} - -func (o *UpdateBackupSourceAccessInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupsources/{id}][%d] UpdateBackupSourceAccessInfo default %s", o._statusCode, payload) -} - -func (o *UpdateBackupSourceAccessInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /backupsources/{id}][%d] UpdateBackupSourceAccessInfo default %s", o._statusCode, payload) -} - -func (o *UpdateBackupSourceAccessInfoDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateBackupSourceAccessInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/banner/banner_client.go b/v1/client/banner/banner_client.go deleted file mode 100644 index 9d8b0125..00000000 --- a/v1/client/banner/banner_client.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package banner - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new banner API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new banner API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new banner API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for banner API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetBanner(params *GetBannerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBannerOK, error) - - UpdateBanner(params *UpdateBannerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBannerOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetBanner lists the banner for a persona - - Currently it returns a cluster specific banner for all requests. Later, - -depending on who is requesting it (which can be inferred from the URL), -we would like to return most appropriate banner if set by the cluster -admin (or Service Provider). -*/ -func (a *Client) GetBanner(params *GetBannerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBannerOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBannerParams() - } - op := &runtime.ClientOperation{ - ID: "GetBanner", - Method: "GET", - PathPattern: "/public/banners", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBannerReader{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.(*GetBannerOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBannerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateBanner updates an existing banner on the cohesity cluster - -Returns the banner that was updated on the Cohesity Cluster. -*/ -func (a *Client) UpdateBanner(params *UpdateBannerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBannerOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateBannerParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateBanner", - Method: "PUT", - PathPattern: "/public/banners", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateBannerReader{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.(*UpdateBannerOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateBannerDefault) - 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/banner/get_banner_parameters.go b/v1/client/banner/get_banner_parameters.go deleted file mode 100644 index 7b99445e..00000000 --- a/v1/client/banner/get_banner_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package banner - -// 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" -) - -// NewGetBannerParams creates a new GetBannerParams 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 NewGetBannerParams() *GetBannerParams { - return &GetBannerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBannerParamsWithTimeout creates a new GetBannerParams object -// with the ability to set a timeout on a request. -func NewGetBannerParamsWithTimeout(timeout time.Duration) *GetBannerParams { - return &GetBannerParams{ - timeout: timeout, - } -} - -// NewGetBannerParamsWithContext creates a new GetBannerParams object -// with the ability to set a context for a request. -func NewGetBannerParamsWithContext(ctx context.Context) *GetBannerParams { - return &GetBannerParams{ - Context: ctx, - } -} - -// NewGetBannerParamsWithHTTPClient creates a new GetBannerParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBannerParamsWithHTTPClient(client *http.Client) *GetBannerParams { - return &GetBannerParams{ - HTTPClient: client, - } -} - -/* -GetBannerParams contains all the parameters to send to the API endpoint - - for the get banner operation. - - Typically these are written to a http.Request. -*/ -type GetBannerParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get banner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBannerParams) WithDefaults() *GetBannerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get banner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBannerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get banner params -func (o *GetBannerParams) WithTimeout(timeout time.Duration) *GetBannerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get banner params -func (o *GetBannerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get banner params -func (o *GetBannerParams) WithContext(ctx context.Context) *GetBannerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get banner params -func (o *GetBannerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get banner params -func (o *GetBannerParams) WithHTTPClient(client *http.Client) *GetBannerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get banner params -func (o *GetBannerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBannerParams) 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/banner/get_banner_responses.go b/v1/client/banner/get_banner_responses.go deleted file mode 100644 index d6677ff6..00000000 --- a/v1/client/banner/get_banner_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package banner - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBannerReader is a Reader for the GetBanner structure. -type GetBannerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBannerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBannerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBannerDefault(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 - } -} - -// NewGetBannerOK creates a GetBannerOK with default headers values -func NewGetBannerOK() *GetBannerOK { - return &GetBannerOK{} -} - -/* -GetBannerOK describes a response with status code 200, with default header values. - -GetBannerResponse response. -*/ -type GetBannerOK struct { - Payload *models.Banner -} - -// IsSuccess returns true when this get banner o k response has a 2xx status code -func (o *GetBannerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get banner o k response has a 3xx status code -func (o *GetBannerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get banner o k response has a 4xx status code -func (o *GetBannerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get banner o k response has a 5xx status code -func (o *GetBannerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get banner o k response a status code equal to that given -func (o *GetBannerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get banner o k response -func (o *GetBannerOK) Code() int { - return 200 -} - -func (o *GetBannerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/banners][%d] getBannerOK %s", 200, payload) -} - -func (o *GetBannerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/banners][%d] getBannerOK %s", 200, payload) -} - -func (o *GetBannerOK) GetPayload() *models.Banner { - return o.Payload -} - -func (o *GetBannerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Banner) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBannerDefault creates a GetBannerDefault with default headers values -func NewGetBannerDefault(code int) *GetBannerDefault { - return &GetBannerDefault{ - _statusCode: code, - } -} - -/* -GetBannerDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBannerDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get banner default response has a 2xx status code -func (o *GetBannerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get banner default response has a 3xx status code -func (o *GetBannerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get banner default response has a 4xx status code -func (o *GetBannerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get banner default response has a 5xx status code -func (o *GetBannerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get banner default response a status code equal to that given -func (o *GetBannerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get banner default response -func (o *GetBannerDefault) Code() int { - return o._statusCode -} - -func (o *GetBannerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/banners][%d] GetBanner default %s", o._statusCode, payload) -} - -func (o *GetBannerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/banners][%d] GetBanner default %s", o._statusCode, payload) -} - -func (o *GetBannerDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetBannerDefault) 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/banner/update_banner_parameters.go b/v1/client/banner/update_banner_parameters.go deleted file mode 100644 index b89aaa02..00000000 --- a/v1/client/banner/update_banner_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package banner - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateBannerParams creates a new UpdateBannerParams 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 NewUpdateBannerParams() *UpdateBannerParams { - return &UpdateBannerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateBannerParamsWithTimeout creates a new UpdateBannerParams object -// with the ability to set a timeout on a request. -func NewUpdateBannerParamsWithTimeout(timeout time.Duration) *UpdateBannerParams { - return &UpdateBannerParams{ - timeout: timeout, - } -} - -// NewUpdateBannerParamsWithContext creates a new UpdateBannerParams object -// with the ability to set a context for a request. -func NewUpdateBannerParamsWithContext(ctx context.Context) *UpdateBannerParams { - return &UpdateBannerParams{ - Context: ctx, - } -} - -// NewUpdateBannerParamsWithHTTPClient creates a new UpdateBannerParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateBannerParamsWithHTTPClient(client *http.Client) *UpdateBannerParams { - return &UpdateBannerParams{ - HTTPClient: client, - } -} - -/* -UpdateBannerParams contains all the parameters to send to the API endpoint - - for the update banner operation. - - Typically these are written to a http.Request. -*/ -type UpdateBannerParams struct { - - /* Body. - - Request to update existing banner. - */ - Body *models.BannerUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update banner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBannerParams) WithDefaults() *UpdateBannerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update banner params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBannerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update banner params -func (o *UpdateBannerParams) WithTimeout(timeout time.Duration) *UpdateBannerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update banner params -func (o *UpdateBannerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update banner params -func (o *UpdateBannerParams) WithContext(ctx context.Context) *UpdateBannerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update banner params -func (o *UpdateBannerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update banner params -func (o *UpdateBannerParams) WithHTTPClient(client *http.Client) *UpdateBannerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update banner params -func (o *UpdateBannerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update banner params -func (o *UpdateBannerParams) WithBody(body *models.BannerUpdateParameters) *UpdateBannerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update banner params -func (o *UpdateBannerParams) SetBody(body *models.BannerUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateBannerParams) 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/banner/update_banner_responses.go b/v1/client/banner/update_banner_responses.go deleted file mode 100644 index 0e93da86..00000000 --- a/v1/client/banner/update_banner_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package banner - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateBannerReader is a Reader for the UpdateBanner structure. -type UpdateBannerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateBannerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateBannerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateBannerDefault(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 - } -} - -// NewUpdateBannerOK creates a UpdateBannerOK with default headers values -func NewUpdateBannerOK() *UpdateBannerOK { - return &UpdateBannerOK{} -} - -/* -UpdateBannerOK describes a response with status code 200, with default header values. - -UpdateBannerResponse response. -*/ -type UpdateBannerOK struct { - Payload *models.Banner -} - -// IsSuccess returns true when this update banner o k response has a 2xx status code -func (o *UpdateBannerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update banner o k response has a 3xx status code -func (o *UpdateBannerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update banner o k response has a 4xx status code -func (o *UpdateBannerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update banner o k response has a 5xx status code -func (o *UpdateBannerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update banner o k response a status code equal to that given -func (o *UpdateBannerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update banner o k response -func (o *UpdateBannerOK) Code() int { - return 200 -} - -func (o *UpdateBannerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/banners][%d] updateBannerOK %s", 200, payload) -} - -func (o *UpdateBannerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/banners][%d] updateBannerOK %s", 200, payload) -} - -func (o *UpdateBannerOK) GetPayload() *models.Banner { - return o.Payload -} - -func (o *UpdateBannerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Banner) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateBannerDefault creates a UpdateBannerDefault with default headers values -func NewUpdateBannerDefault(code int) *UpdateBannerDefault { - return &UpdateBannerDefault{ - _statusCode: code, - } -} - -/* -UpdateBannerDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateBannerDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update banner default response has a 2xx status code -func (o *UpdateBannerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update banner default response has a 3xx status code -func (o *UpdateBannerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update banner default response has a 4xx status code -func (o *UpdateBannerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update banner default response has a 5xx status code -func (o *UpdateBannerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update banner default response a status code equal to that given -func (o *UpdateBannerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update banner default response -func (o *UpdateBannerDefault) Code() int { - return o._statusCode -} - -func (o *UpdateBannerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/banners][%d] UpdateBanner default %s", o._statusCode, payload) -} - -func (o *UpdateBannerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/banners][%d] UpdateBanner default %s", o._statusCode, payload) -} - -func (o *UpdateBannerDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateBannerDefault) 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/certificates/certificates_client.go b/v1/client/certificates/certificates_client.go deleted file mode 100644 index fc58337c..00000000 --- a/v1/client/certificates/certificates_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new certificates API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new certificates API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new certificates API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for certificates API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteWebServerCertificate(params *DeleteWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteWebServerCertificateNoContent, error) - - DeployHostCertificate(params *DeployHostCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeployHostCertificateCreated, error) - - GetCertificateList(params *GetCertificateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCertificateListOK, error) - - GetWebServerCertificate(params *GetWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWebServerCertificateOK, error) - - UpdateWebServerCertificate(params *UpdateWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateWebServerCertificateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteWebServerCertificate deletes the s s l certificate in the cluster - -Returns delete status upon completion. -*/ -func (a *Client) DeleteWebServerCertificate(params *DeleteWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteWebServerCertificateNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteWebServerCertificateParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteWebServerCertificate", - Method: "DELETE", - PathPattern: "/public/certificates/webServer", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteWebServerCertificateReader{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.(*DeleteWebServerCertificateNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteWebServerCertificateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeployHostCertificate generates and deploy certificate for a single or multiple hosts - -Returns the global certificate for a single or multiple hosts. -*/ -func (a *Client) DeployHostCertificate(params *DeployHostCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeployHostCertificateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeployHostCertificateParams() - } - op := &runtime.ClientOperation{ - ID: "DeployHostCertificate", - Method: "POST", - PathPattern: "/public/certificates/global", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeployHostCertificateReader{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.(*DeployHostCertificateCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeployHostCertificateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCertificateList lists the certificates generated and deployed on hosts - -Returns the all certificate and their details generated from this cluster. -*/ -func (a *Client) GetCertificateList(params *GetCertificateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCertificateListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCertificateListParams() - } - op := &runtime.ClientOperation{ - ID: "GetCertificateList", - Method: "GET", - PathPattern: "/public/certificates/global", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCertificateListReader{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.(*GetCertificateListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCertificateListDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetWebServerCertificate gets the server certificate configured on the cluster - -Returns the Server Certificate configured on the cluster. -*/ -func (a *Client) GetWebServerCertificate(params *GetWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWebServerCertificateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetWebServerCertificateParams() - } - op := &runtime.ClientOperation{ - ID: "GetWebServerCertificate", - Method: "GET", - PathPattern: "/public/certificates/webServer", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetWebServerCertificateReader{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.(*GetWebServerCertificateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetWebServerCertificateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateWebServerCertificate updates the web server certificate on the cluster - -Returns the updated Web Server Certificate on the cluster. -*/ -func (a *Client) UpdateWebServerCertificate(params *UpdateWebServerCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateWebServerCertificateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateWebServerCertificateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateWebServerCertificate", - Method: "PUT", - PathPattern: "/public/certificates/webServer", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateWebServerCertificateReader{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.(*UpdateWebServerCertificateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateWebServerCertificateDefault) - 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/certificates/delete_web_server_certificate_parameters.go b/v1/client/certificates/delete_web_server_certificate_parameters.go deleted file mode 100644 index 371fe6b1..00000000 --- a/v1/client/certificates/delete_web_server_certificate_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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" -) - -// NewDeleteWebServerCertificateParams creates a new DeleteWebServerCertificateParams 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 NewDeleteWebServerCertificateParams() *DeleteWebServerCertificateParams { - return &DeleteWebServerCertificateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteWebServerCertificateParamsWithTimeout creates a new DeleteWebServerCertificateParams object -// with the ability to set a timeout on a request. -func NewDeleteWebServerCertificateParamsWithTimeout(timeout time.Duration) *DeleteWebServerCertificateParams { - return &DeleteWebServerCertificateParams{ - timeout: timeout, - } -} - -// NewDeleteWebServerCertificateParamsWithContext creates a new DeleteWebServerCertificateParams object -// with the ability to set a context for a request. -func NewDeleteWebServerCertificateParamsWithContext(ctx context.Context) *DeleteWebServerCertificateParams { - return &DeleteWebServerCertificateParams{ - Context: ctx, - } -} - -// NewDeleteWebServerCertificateParamsWithHTTPClient creates a new DeleteWebServerCertificateParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteWebServerCertificateParamsWithHTTPClient(client *http.Client) *DeleteWebServerCertificateParams { - return &DeleteWebServerCertificateParams{ - HTTPClient: client, - } -} - -/* -DeleteWebServerCertificateParams contains all the parameters to send to the API endpoint - - for the delete web server certificate operation. - - Typically these are written to a http.Request. -*/ -type DeleteWebServerCertificateParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteWebServerCertificateParams) WithDefaults() *DeleteWebServerCertificateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteWebServerCertificateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) WithTimeout(timeout time.Duration) *DeleteWebServerCertificateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) WithContext(ctx context.Context) *DeleteWebServerCertificateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) WithHTTPClient(client *http.Client) *DeleteWebServerCertificateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete web server certificate params -func (o *DeleteWebServerCertificateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteWebServerCertificateParams) 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/certificates/delete_web_server_certificate_responses.go b/v1/client/certificates/delete_web_server_certificate_responses.go deleted file mode 100644 index 6220063e..00000000 --- a/v1/client/certificates/delete_web_server_certificate_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteWebServerCertificateReader is a Reader for the DeleteWebServerCertificate structure. -type DeleteWebServerCertificateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteWebServerCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteWebServerCertificateNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteWebServerCertificateDefault(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 - } -} - -// NewDeleteWebServerCertificateNoContent creates a DeleteWebServerCertificateNoContent with default headers values -func NewDeleteWebServerCertificateNoContent() *DeleteWebServerCertificateNoContent { - return &DeleteWebServerCertificateNoContent{} -} - -/* -DeleteWebServerCertificateNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteWebServerCertificateNoContent struct { -} - -// IsSuccess returns true when this delete web server certificate no content response has a 2xx status code -func (o *DeleteWebServerCertificateNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete web server certificate no content response has a 3xx status code -func (o *DeleteWebServerCertificateNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete web server certificate no content response has a 4xx status code -func (o *DeleteWebServerCertificateNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete web server certificate no content response has a 5xx status code -func (o *DeleteWebServerCertificateNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete web server certificate no content response a status code equal to that given -func (o *DeleteWebServerCertificateNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete web server certificate no content response -func (o *DeleteWebServerCertificateNoContent) Code() int { - return 204 -} - -func (o *DeleteWebServerCertificateNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/certificates/webServer][%d] deleteWebServerCertificateNoContent", 204) -} - -func (o *DeleteWebServerCertificateNoContent) String() string { - return fmt.Sprintf("[DELETE /public/certificates/webServer][%d] deleteWebServerCertificateNoContent", 204) -} - -func (o *DeleteWebServerCertificateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteWebServerCertificateDefault creates a DeleteWebServerCertificateDefault with default headers values -func NewDeleteWebServerCertificateDefault(code int) *DeleteWebServerCertificateDefault { - return &DeleteWebServerCertificateDefault{ - _statusCode: code, - } -} - -/* -DeleteWebServerCertificateDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteWebServerCertificateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete web server certificate default response has a 2xx status code -func (o *DeleteWebServerCertificateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete web server certificate default response has a 3xx status code -func (o *DeleteWebServerCertificateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete web server certificate default response has a 4xx status code -func (o *DeleteWebServerCertificateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete web server certificate default response has a 5xx status code -func (o *DeleteWebServerCertificateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete web server certificate default response a status code equal to that given -func (o *DeleteWebServerCertificateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete web server certificate default response -func (o *DeleteWebServerCertificateDefault) Code() int { - return o._statusCode -} - -func (o *DeleteWebServerCertificateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/certificates/webServer][%d] DeleteWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *DeleteWebServerCertificateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/certificates/webServer][%d] DeleteWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *DeleteWebServerCertificateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteWebServerCertificateDefault) 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/certificates/deploy_host_certificate_parameters.go b/v1/client/certificates/deploy_host_certificate_parameters.go deleted file mode 100644 index a935e926..00000000 --- a/v1/client/certificates/deploy_host_certificate_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeployHostCertificateParams creates a new DeployHostCertificateParams 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 NewDeployHostCertificateParams() *DeployHostCertificateParams { - return &DeployHostCertificateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeployHostCertificateParamsWithTimeout creates a new DeployHostCertificateParams object -// with the ability to set a timeout on a request. -func NewDeployHostCertificateParamsWithTimeout(timeout time.Duration) *DeployHostCertificateParams { - return &DeployHostCertificateParams{ - timeout: timeout, - } -} - -// NewDeployHostCertificateParamsWithContext creates a new DeployHostCertificateParams object -// with the ability to set a context for a request. -func NewDeployHostCertificateParamsWithContext(ctx context.Context) *DeployHostCertificateParams { - return &DeployHostCertificateParams{ - Context: ctx, - } -} - -// NewDeployHostCertificateParamsWithHTTPClient creates a new DeployHostCertificateParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeployHostCertificateParamsWithHTTPClient(client *http.Client) *DeployHostCertificateParams { - return &DeployHostCertificateParams{ - HTTPClient: client, - } -} - -/* -DeployHostCertificateParams contains all the parameters to send to the API endpoint - - for the deploy host certificate operation. - - Typically these are written to a http.Request. -*/ -type DeployHostCertificateParams struct { - - /* Body. - - Request to generate and deploy a new certificate. - */ - Body *models.DeployCertParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the deploy host certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployHostCertificateParams) WithDefaults() *DeployHostCertificateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the deploy host certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployHostCertificateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the deploy host certificate params -func (o *DeployHostCertificateParams) WithTimeout(timeout time.Duration) *DeployHostCertificateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the deploy host certificate params -func (o *DeployHostCertificateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the deploy host certificate params -func (o *DeployHostCertificateParams) WithContext(ctx context.Context) *DeployHostCertificateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the deploy host certificate params -func (o *DeployHostCertificateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the deploy host certificate params -func (o *DeployHostCertificateParams) WithHTTPClient(client *http.Client) *DeployHostCertificateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the deploy host certificate params -func (o *DeployHostCertificateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the deploy host certificate params -func (o *DeployHostCertificateParams) WithBody(body *models.DeployCertParameters) *DeployHostCertificateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the deploy host certificate params -func (o *DeployHostCertificateParams) SetBody(body *models.DeployCertParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeployHostCertificateParams) 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/certificates/deploy_host_certificate_responses.go b/v1/client/certificates/deploy_host_certificate_responses.go deleted file mode 100644 index de5c909a..00000000 --- a/v1/client/certificates/deploy_host_certificate_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeployHostCertificateReader is a Reader for the DeployHostCertificate structure. -type DeployHostCertificateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeployHostCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewDeployHostCertificateCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeployHostCertificateDefault(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 - } -} - -// NewDeployHostCertificateCreated creates a DeployHostCertificateCreated with default headers values -func NewDeployHostCertificateCreated() *DeployHostCertificateCreated { - return &DeployHostCertificateCreated{} -} - -/* -DeployHostCertificateCreated describes a response with status code 201, with default header values. - -Host Certificate Download Response. -*/ -type DeployHostCertificateCreated struct { - Payload *models.CertificateDetails -} - -// IsSuccess returns true when this deploy host certificate created response has a 2xx status code -func (o *DeployHostCertificateCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this deploy host certificate created response has a 3xx status code -func (o *DeployHostCertificateCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy host certificate created response has a 4xx status code -func (o *DeployHostCertificateCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this deploy host certificate created response has a 5xx status code -func (o *DeployHostCertificateCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy host certificate created response a status code equal to that given -func (o *DeployHostCertificateCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the deploy host certificate created response -func (o *DeployHostCertificateCreated) Code() int { - return 201 -} - -func (o *DeployHostCertificateCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/certificates/global][%d] deployHostCertificateCreated %s", 201, payload) -} - -func (o *DeployHostCertificateCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/certificates/global][%d] deployHostCertificateCreated %s", 201, payload) -} - -func (o *DeployHostCertificateCreated) GetPayload() *models.CertificateDetails { - return o.Payload -} - -func (o *DeployHostCertificateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CertificateDetails) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployHostCertificateDefault creates a DeployHostCertificateDefault with default headers values -func NewDeployHostCertificateDefault(code int) *DeployHostCertificateDefault { - return &DeployHostCertificateDefault{ - _statusCode: code, - } -} - -/* -DeployHostCertificateDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeployHostCertificateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this deploy host certificate default response has a 2xx status code -func (o *DeployHostCertificateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this deploy host certificate default response has a 3xx status code -func (o *DeployHostCertificateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this deploy host certificate default response has a 4xx status code -func (o *DeployHostCertificateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this deploy host certificate default response has a 5xx status code -func (o *DeployHostCertificateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this deploy host certificate default response a status code equal to that given -func (o *DeployHostCertificateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the deploy host certificate default response -func (o *DeployHostCertificateDefault) Code() int { - return o._statusCode -} - -func (o *DeployHostCertificateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/certificates/global][%d] DeployHostCertificate default %s", o._statusCode, payload) -} - -func (o *DeployHostCertificateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/certificates/global][%d] DeployHostCertificate default %s", o._statusCode, payload) -} - -func (o *DeployHostCertificateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeployHostCertificateDefault) 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/certificates/get_certificate_list_parameters.go b/v1/client/certificates/get_certificate_list_parameters.go deleted file mode 100644 index 5e32c456..00000000 --- a/v1/client/certificates/get_certificate_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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" -) - -// NewGetCertificateListParams creates a new GetCertificateListParams 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 NewGetCertificateListParams() *GetCertificateListParams { - return &GetCertificateListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCertificateListParamsWithTimeout creates a new GetCertificateListParams object -// with the ability to set a timeout on a request. -func NewGetCertificateListParamsWithTimeout(timeout time.Duration) *GetCertificateListParams { - return &GetCertificateListParams{ - timeout: timeout, - } -} - -// NewGetCertificateListParamsWithContext creates a new GetCertificateListParams object -// with the ability to set a context for a request. -func NewGetCertificateListParamsWithContext(ctx context.Context) *GetCertificateListParams { - return &GetCertificateListParams{ - Context: ctx, - } -} - -// NewGetCertificateListParamsWithHTTPClient creates a new GetCertificateListParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCertificateListParamsWithHTTPClient(client *http.Client) *GetCertificateListParams { - return &GetCertificateListParams{ - HTTPClient: client, - } -} - -/* -GetCertificateListParams contains all the parameters to send to the API endpoint - - for the get certificate list operation. - - Typically these are written to a http.Request. -*/ -type GetCertificateListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get certificate list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCertificateListParams) WithDefaults() *GetCertificateListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get certificate list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCertificateListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get certificate list params -func (o *GetCertificateListParams) WithTimeout(timeout time.Duration) *GetCertificateListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get certificate list params -func (o *GetCertificateListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get certificate list params -func (o *GetCertificateListParams) WithContext(ctx context.Context) *GetCertificateListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get certificate list params -func (o *GetCertificateListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get certificate list params -func (o *GetCertificateListParams) WithHTTPClient(client *http.Client) *GetCertificateListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get certificate list params -func (o *GetCertificateListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCertificateListParams) 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/certificates/get_certificate_list_responses.go b/v1/client/certificates/get_certificate_list_responses.go deleted file mode 100644 index c1940919..00000000 --- a/v1/client/certificates/get_certificate_list_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetCertificateListReader is a Reader for the GetCertificateList structure. -type GetCertificateListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCertificateListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCertificateListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCertificateListDefault(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 - } -} - -// NewGetCertificateListOK creates a GetCertificateListOK with default headers values -func NewGetCertificateListOK() *GetCertificateListOK { - return &GetCertificateListOK{} -} - -/* -GetCertificateListOK describes a response with status code 200, with default header values. - -List Host Certificate Response. -*/ -type GetCertificateListOK struct { - Payload *models.ListCertResponse -} - -// IsSuccess returns true when this get certificate list o k response has a 2xx status code -func (o *GetCertificateListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get certificate list o k response has a 3xx status code -func (o *GetCertificateListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get certificate list o k response has a 4xx status code -func (o *GetCertificateListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get certificate list o k response has a 5xx status code -func (o *GetCertificateListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get certificate list o k response a status code equal to that given -func (o *GetCertificateListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get certificate list o k response -func (o *GetCertificateListOK) Code() int { - return 200 -} - -func (o *GetCertificateListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/global][%d] getCertificateListOK %s", 200, payload) -} - -func (o *GetCertificateListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/global][%d] getCertificateListOK %s", 200, payload) -} - -func (o *GetCertificateListOK) GetPayload() *models.ListCertResponse { - return o.Payload -} - -func (o *GetCertificateListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListCertResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCertificateListDefault creates a GetCertificateListDefault with default headers values -func NewGetCertificateListDefault(code int) *GetCertificateListDefault { - return &GetCertificateListDefault{ - _statusCode: code, - } -} - -/* -GetCertificateListDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCertificateListDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get certificate list default response has a 2xx status code -func (o *GetCertificateListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get certificate list default response has a 3xx status code -func (o *GetCertificateListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get certificate list default response has a 4xx status code -func (o *GetCertificateListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get certificate list default response has a 5xx status code -func (o *GetCertificateListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get certificate list default response a status code equal to that given -func (o *GetCertificateListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get certificate list default response -func (o *GetCertificateListDefault) Code() int { - return o._statusCode -} - -func (o *GetCertificateListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/global][%d] GetCertificateList default %s", o._statusCode, payload) -} - -func (o *GetCertificateListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/global][%d] GetCertificateList default %s", o._statusCode, payload) -} - -func (o *GetCertificateListDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetCertificateListDefault) 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/certificates/get_web_server_certificate_parameters.go b/v1/client/certificates/get_web_server_certificate_parameters.go deleted file mode 100644 index c413bed6..00000000 --- a/v1/client/certificates/get_web_server_certificate_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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" -) - -// NewGetWebServerCertificateParams creates a new GetWebServerCertificateParams 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 NewGetWebServerCertificateParams() *GetWebServerCertificateParams { - return &GetWebServerCertificateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetWebServerCertificateParamsWithTimeout creates a new GetWebServerCertificateParams object -// with the ability to set a timeout on a request. -func NewGetWebServerCertificateParamsWithTimeout(timeout time.Duration) *GetWebServerCertificateParams { - return &GetWebServerCertificateParams{ - timeout: timeout, - } -} - -// NewGetWebServerCertificateParamsWithContext creates a new GetWebServerCertificateParams object -// with the ability to set a context for a request. -func NewGetWebServerCertificateParamsWithContext(ctx context.Context) *GetWebServerCertificateParams { - return &GetWebServerCertificateParams{ - Context: ctx, - } -} - -// NewGetWebServerCertificateParamsWithHTTPClient creates a new GetWebServerCertificateParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetWebServerCertificateParamsWithHTTPClient(client *http.Client) *GetWebServerCertificateParams { - return &GetWebServerCertificateParams{ - HTTPClient: client, - } -} - -/* -GetWebServerCertificateParams contains all the parameters to send to the API endpoint - - for the get web server certificate operation. - - Typically these are written to a http.Request. -*/ -type GetWebServerCertificateParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetWebServerCertificateParams) WithDefaults() *GetWebServerCertificateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetWebServerCertificateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get web server certificate params -func (o *GetWebServerCertificateParams) WithTimeout(timeout time.Duration) *GetWebServerCertificateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get web server certificate params -func (o *GetWebServerCertificateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get web server certificate params -func (o *GetWebServerCertificateParams) WithContext(ctx context.Context) *GetWebServerCertificateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get web server certificate params -func (o *GetWebServerCertificateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get web server certificate params -func (o *GetWebServerCertificateParams) WithHTTPClient(client *http.Client) *GetWebServerCertificateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get web server certificate params -func (o *GetWebServerCertificateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetWebServerCertificateParams) 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/certificates/get_web_server_certificate_responses.go b/v1/client/certificates/get_web_server_certificate_responses.go deleted file mode 100644 index b0ba3950..00000000 --- a/v1/client/certificates/get_web_server_certificate_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetWebServerCertificateReader is a Reader for the GetWebServerCertificate structure. -type GetWebServerCertificateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetWebServerCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetWebServerCertificateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetWebServerCertificateDefault(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 - } -} - -// NewGetWebServerCertificateOK creates a GetWebServerCertificateOK with default headers values -func NewGetWebServerCertificateOK() *GetWebServerCertificateOK { - return &GetWebServerCertificateOK{} -} - -/* -GetWebServerCertificateOK describes a response with status code 200, with default header values. - -Success -*/ -type GetWebServerCertificateOK struct { - Payload *models.SslCertificateConfig -} - -// IsSuccess returns true when this get web server certificate o k response has a 2xx status code -func (o *GetWebServerCertificateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get web server certificate o k response has a 3xx status code -func (o *GetWebServerCertificateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get web server certificate o k response has a 4xx status code -func (o *GetWebServerCertificateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get web server certificate o k response has a 5xx status code -func (o *GetWebServerCertificateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get web server certificate o k response a status code equal to that given -func (o *GetWebServerCertificateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get web server certificate o k response -func (o *GetWebServerCertificateOK) Code() int { - return 200 -} - -func (o *GetWebServerCertificateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/webServer][%d] getWebServerCertificateOK %s", 200, payload) -} - -func (o *GetWebServerCertificateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/webServer][%d] getWebServerCertificateOK %s", 200, payload) -} - -func (o *GetWebServerCertificateOK) GetPayload() *models.SslCertificateConfig { - return o.Payload -} - -func (o *GetWebServerCertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SslCertificateConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetWebServerCertificateDefault creates a GetWebServerCertificateDefault with default headers values -func NewGetWebServerCertificateDefault(code int) *GetWebServerCertificateDefault { - return &GetWebServerCertificateDefault{ - _statusCode: code, - } -} - -/* -GetWebServerCertificateDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetWebServerCertificateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get web server certificate default response has a 2xx status code -func (o *GetWebServerCertificateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get web server certificate default response has a 3xx status code -func (o *GetWebServerCertificateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get web server certificate default response has a 4xx status code -func (o *GetWebServerCertificateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get web server certificate default response has a 5xx status code -func (o *GetWebServerCertificateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get web server certificate default response a status code equal to that given -func (o *GetWebServerCertificateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get web server certificate default response -func (o *GetWebServerCertificateDefault) Code() int { - return o._statusCode -} - -func (o *GetWebServerCertificateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/webServer][%d] GetWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *GetWebServerCertificateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/certificates/webServer][%d] GetWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *GetWebServerCertificateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetWebServerCertificateDefault) 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/certificates/update_web_server_certificate_parameters.go b/v1/client/certificates/update_web_server_certificate_parameters.go deleted file mode 100644 index d5813727..00000000 --- a/v1/client/certificates/update_web_server_certificate_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateWebServerCertificateParams creates a new UpdateWebServerCertificateParams 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 NewUpdateWebServerCertificateParams() *UpdateWebServerCertificateParams { - return &UpdateWebServerCertificateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateWebServerCertificateParamsWithTimeout creates a new UpdateWebServerCertificateParams object -// with the ability to set a timeout on a request. -func NewUpdateWebServerCertificateParamsWithTimeout(timeout time.Duration) *UpdateWebServerCertificateParams { - return &UpdateWebServerCertificateParams{ - timeout: timeout, - } -} - -// NewUpdateWebServerCertificateParamsWithContext creates a new UpdateWebServerCertificateParams object -// with the ability to set a context for a request. -func NewUpdateWebServerCertificateParamsWithContext(ctx context.Context) *UpdateWebServerCertificateParams { - return &UpdateWebServerCertificateParams{ - Context: ctx, - } -} - -// NewUpdateWebServerCertificateParamsWithHTTPClient creates a new UpdateWebServerCertificateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateWebServerCertificateParamsWithHTTPClient(client *http.Client) *UpdateWebServerCertificateParams { - return &UpdateWebServerCertificateParams{ - HTTPClient: client, - } -} - -/* -UpdateWebServerCertificateParams contains all the parameters to send to the API endpoint - - for the update web server certificate operation. - - Typically these are written to a http.Request. -*/ -type UpdateWebServerCertificateParams struct { - - // Body. - Body *models.SslCertificateConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateWebServerCertificateParams) WithDefaults() *UpdateWebServerCertificateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update web server certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateWebServerCertificateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update web server certificate params -func (o *UpdateWebServerCertificateParams) WithTimeout(timeout time.Duration) *UpdateWebServerCertificateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update web server certificate params -func (o *UpdateWebServerCertificateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update web server certificate params -func (o *UpdateWebServerCertificateParams) WithContext(ctx context.Context) *UpdateWebServerCertificateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update web server certificate params -func (o *UpdateWebServerCertificateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update web server certificate params -func (o *UpdateWebServerCertificateParams) WithHTTPClient(client *http.Client) *UpdateWebServerCertificateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update web server certificate params -func (o *UpdateWebServerCertificateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update web server certificate params -func (o *UpdateWebServerCertificateParams) WithBody(body *models.SslCertificateConfig) *UpdateWebServerCertificateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update web server certificate params -func (o *UpdateWebServerCertificateParams) SetBody(body *models.SslCertificateConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateWebServerCertificateParams) 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/certificates/update_web_server_certificate_responses.go b/v1/client/certificates/update_web_server_certificate_responses.go deleted file mode 100644 index 76748a22..00000000 --- a/v1/client/certificates/update_web_server_certificate_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package certificates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateWebServerCertificateReader is a Reader for the UpdateWebServerCertificate structure. -type UpdateWebServerCertificateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateWebServerCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateWebServerCertificateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateWebServerCertificateDefault(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 - } -} - -// NewUpdateWebServerCertificateOK creates a UpdateWebServerCertificateOK with default headers values -func NewUpdateWebServerCertificateOK() *UpdateWebServerCertificateOK { - return &UpdateWebServerCertificateOK{} -} - -/* -UpdateWebServerCertificateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateWebServerCertificateOK struct { - Payload *models.SslCertificateConfig -} - -// IsSuccess returns true when this update web server certificate o k response has a 2xx status code -func (o *UpdateWebServerCertificateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update web server certificate o k response has a 3xx status code -func (o *UpdateWebServerCertificateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update web server certificate o k response has a 4xx status code -func (o *UpdateWebServerCertificateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update web server certificate o k response has a 5xx status code -func (o *UpdateWebServerCertificateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update web server certificate o k response a status code equal to that given -func (o *UpdateWebServerCertificateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update web server certificate o k response -func (o *UpdateWebServerCertificateOK) Code() int { - return 200 -} - -func (o *UpdateWebServerCertificateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/certificates/webServer][%d] updateWebServerCertificateOK %s", 200, payload) -} - -func (o *UpdateWebServerCertificateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/certificates/webServer][%d] updateWebServerCertificateOK %s", 200, payload) -} - -func (o *UpdateWebServerCertificateOK) GetPayload() *models.SslCertificateConfig { - return o.Payload -} - -func (o *UpdateWebServerCertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SslCertificateConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateWebServerCertificateDefault creates a UpdateWebServerCertificateDefault with default headers values -func NewUpdateWebServerCertificateDefault(code int) *UpdateWebServerCertificateDefault { - return &UpdateWebServerCertificateDefault{ - _statusCode: code, - } -} - -/* -UpdateWebServerCertificateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateWebServerCertificateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update web server certificate default response has a 2xx status code -func (o *UpdateWebServerCertificateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update web server certificate default response has a 3xx status code -func (o *UpdateWebServerCertificateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update web server certificate default response has a 4xx status code -func (o *UpdateWebServerCertificateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update web server certificate default response has a 5xx status code -func (o *UpdateWebServerCertificateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update web server certificate default response a status code equal to that given -func (o *UpdateWebServerCertificateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update web server certificate default response -func (o *UpdateWebServerCertificateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateWebServerCertificateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/certificates/webServer][%d] UpdateWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *UpdateWebServerCertificateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/certificates/webServer][%d] UpdateWebServerCertificate default %s", o._statusCode, payload) -} - -func (o *UpdateWebServerCertificateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateWebServerCertificateDefault) 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/clone/clone_client.go b/v1/client/clone/clone_client.go deleted file mode 100644 index 1ec8285a..00000000 --- a/v1/client/clone/clone_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new clone API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new clone API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new clone API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for clone API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CloneVms(params *CloneVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneVmsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CloneVms clones v ms -*/ -func (a *Client) CloneVms(params *CloneVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneVmsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneVmsParams() - } - op := &runtime.ClientOperation{ - ID: "CloneVms", - Method: "POST", - PathPattern: "/clone", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneVmsReader{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.(*CloneVmsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneVmsDefault) - 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/clone/clone_vms_parameters.go b/v1/client/clone/clone_vms_parameters.go deleted file mode 100644 index f5645907..00000000 --- a/v1/client/clone/clone_vms_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCloneVmsParams creates a new CloneVmsParams 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 NewCloneVmsParams() *CloneVmsParams { - return &CloneVmsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneVmsParamsWithTimeout creates a new CloneVmsParams object -// with the ability to set a timeout on a request. -func NewCloneVmsParamsWithTimeout(timeout time.Duration) *CloneVmsParams { - return &CloneVmsParams{ - timeout: timeout, - } -} - -// NewCloneVmsParamsWithContext creates a new CloneVmsParams object -// with the ability to set a context for a request. -func NewCloneVmsParamsWithContext(ctx context.Context) *CloneVmsParams { - return &CloneVmsParams{ - Context: ctx, - } -} - -// NewCloneVmsParamsWithHTTPClient creates a new CloneVmsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneVmsParamsWithHTTPClient(client *http.Client) *CloneVmsParams { - return &CloneVmsParams{ - HTTPClient: client, - } -} - -/* -CloneVmsParams contains all the parameters to send to the API endpoint - - for the clone vms operation. - - Typically these are written to a http.Request. -*/ -type CloneVmsParams struct { - - /* Body. - - Clone VM argument - */ - Body *models.CloneArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneVmsParams) WithDefaults() *CloneVmsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneVmsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone vms params -func (o *CloneVmsParams) WithTimeout(timeout time.Duration) *CloneVmsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone vms params -func (o *CloneVmsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone vms params -func (o *CloneVmsParams) WithContext(ctx context.Context) *CloneVmsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone vms params -func (o *CloneVmsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone vms params -func (o *CloneVmsParams) WithHTTPClient(client *http.Client) *CloneVmsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone vms params -func (o *CloneVmsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone vms params -func (o *CloneVmsParams) WithBody(body *models.CloneArg) *CloneVmsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone vms params -func (o *CloneVmsParams) SetBody(body *models.CloneArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneVmsParams) 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/clone/clone_vms_responses.go b/v1/client/clone/clone_vms_responses.go deleted file mode 100644 index 7ecd3964..00000000 --- a/v1/client/clone/clone_vms_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CloneVmsReader is a Reader for the CloneVms structure. -type CloneVmsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneVmsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCloneVmsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneVmsDefault(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 - } -} - -// NewCloneVmsOK creates a CloneVmsOK with default headers values -func NewCloneVmsOK() *CloneVmsOK { - return &CloneVmsOK{} -} - -/* -CloneVmsOK describes a response with status code 200, with default header values. - -Success -*/ -type CloneVmsOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this clone vms o k response has a 2xx status code -func (o *CloneVmsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone vms o k response has a 3xx status code -func (o *CloneVmsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone vms o k response has a 4xx status code -func (o *CloneVmsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone vms o k response has a 5xx status code -func (o *CloneVmsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this clone vms o k response a status code equal to that given -func (o *CloneVmsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the clone vms o k response -func (o *CloneVmsOK) Code() int { - return 200 -} - -func (o *CloneVmsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clone][%d] cloneVmsOK %s", 200, payload) -} - -func (o *CloneVmsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clone][%d] cloneVmsOK %s", 200, payload) -} - -func (o *CloneVmsOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *CloneVmsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCloneVmsDefault creates a CloneVmsDefault with default headers values -func NewCloneVmsDefault(code int) *CloneVmsDefault { - return &CloneVmsDefault{ - _statusCode: code, - } -} - -/* -CloneVmsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type CloneVmsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this clone vms default response has a 2xx status code -func (o *CloneVmsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone vms default response has a 3xx status code -func (o *CloneVmsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone vms default response has a 4xx status code -func (o *CloneVmsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone vms default response has a 5xx status code -func (o *CloneVmsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone vms default response a status code equal to that given -func (o *CloneVmsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone vms default response -func (o *CloneVmsDefault) Code() int { - return o._statusCode -} - -func (o *CloneVmsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clone][%d] CloneVms default %s", o._statusCode, payload) -} - -func (o *CloneVmsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clone][%d] CloneVms default %s", o._statusCode, payload) -} - -func (o *CloneVmsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *CloneVmsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clone_application/clone_app_parameters.go b/v1/client/clone_application/clone_app_parameters.go deleted file mode 100644 index a2c039f7..00000000 --- a/v1/client/clone_application/clone_app_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_application - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCloneAppParams creates a new CloneAppParams 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 NewCloneAppParams() *CloneAppParams { - return &CloneAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneAppParamsWithTimeout creates a new CloneAppParams object -// with the ability to set a timeout on a request. -func NewCloneAppParamsWithTimeout(timeout time.Duration) *CloneAppParams { - return &CloneAppParams{ - timeout: timeout, - } -} - -// NewCloneAppParamsWithContext creates a new CloneAppParams object -// with the ability to set a context for a request. -func NewCloneAppParamsWithContext(ctx context.Context) *CloneAppParams { - return &CloneAppParams{ - Context: ctx, - } -} - -// NewCloneAppParamsWithHTTPClient creates a new CloneAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneAppParamsWithHTTPClient(client *http.Client) *CloneAppParams { - return &CloneAppParams{ - HTTPClient: client, - } -} - -/* -CloneAppParams contains all the parameters to send to the API endpoint - - for the clone app operation. - - Typically these are written to a http.Request. -*/ -type CloneAppParams struct { - - /* Body. - - Restore Application argument - */ - Body *models.RestoreAppArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneAppParams) WithDefaults() *CloneAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone app params -func (o *CloneAppParams) WithTimeout(timeout time.Duration) *CloneAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone app params -func (o *CloneAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone app params -func (o *CloneAppParams) WithContext(ctx context.Context) *CloneAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone app params -func (o *CloneAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone app params -func (o *CloneAppParams) WithHTTPClient(client *http.Client) *CloneAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone app params -func (o *CloneAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone app params -func (o *CloneAppParams) WithBody(body *models.RestoreAppArg) *CloneAppParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone app params -func (o *CloneAppParams) SetBody(body *models.RestoreAppArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneAppParams) 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/clone_application/clone_app_responses.go b/v1/client/clone_application/clone_app_responses.go deleted file mode 100644 index 88086a17..00000000 --- a/v1/client/clone_application/clone_app_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_application - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CloneAppReader is a Reader for the CloneApp structure. -type CloneAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCloneAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneAppDefault(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 - } -} - -// NewCloneAppOK creates a CloneAppOK with default headers values -func NewCloneAppOK() *CloneAppOK { - return &CloneAppOK{} -} - -/* -CloneAppOK describes a response with status code 200, with default header values. - -Success -*/ -type CloneAppOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this clone app o k response has a 2xx status code -func (o *CloneAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone app o k response has a 3xx status code -func (o *CloneAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone app o k response has a 4xx status code -func (o *CloneAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone app o k response has a 5xx status code -func (o *CloneAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this clone app o k response a status code equal to that given -func (o *CloneAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the clone app o k response -func (o *CloneAppOK) Code() int { - return 200 -} - -func (o *CloneAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /cloneApplication][%d] cloneAppOK %s", 200, payload) -} - -func (o *CloneAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /cloneApplication][%d] cloneAppOK %s", 200, payload) -} - -func (o *CloneAppOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *CloneAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCloneAppDefault creates a CloneAppDefault with default headers values -func NewCloneAppDefault(code int) *CloneAppDefault { - return &CloneAppDefault{ - _statusCode: code, - } -} - -/* -CloneAppDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type CloneAppDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this clone app default response has a 2xx status code -func (o *CloneAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone app default response has a 3xx status code -func (o *CloneAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone app default response has a 4xx status code -func (o *CloneAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone app default response has a 5xx status code -func (o *CloneAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone app default response a status code equal to that given -func (o *CloneAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone app default response -func (o *CloneAppDefault) Code() int { - return o._statusCode -} - -func (o *CloneAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /cloneApplication][%d] CloneApp default %s", o._statusCode, payload) -} - -func (o *CloneAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /cloneApplication][%d] CloneApp default %s", o._statusCode, payload) -} - -func (o *CloneAppDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *CloneAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clone_application/clone_application_client.go b/v1/client/clone_application/clone_application_client.go deleted file mode 100644 index f65a3fc3..00000000 --- a/v1/client/clone_application/clone_application_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_application - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new clone application API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new clone application API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new clone application API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for clone application API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CloneApp(params *CloneAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneAppOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CloneApp clones applications like SQL d bs -*/ -func (a *Client) CloneApp(params *CloneAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneAppOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneAppParams() - } - op := &runtime.ClientOperation{ - ID: "CloneApp", - Method: "POST", - PathPattern: "/cloneApplication", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneAppReader{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.(*CloneAppOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneAppDefault) - 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/clone_refresh_tasks/clone_refresh_tasks_client.go b/v1/client/clone_refresh_tasks/clone_refresh_tasks_client.go deleted file mode 100644 index 460eee6d..00000000 --- a/v1/client/clone_refresh_tasks/clone_refresh_tasks_client.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_refresh_tasks - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new clone refresh tasks API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new clone refresh tasks API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new clone refresh tasks API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for clone refresh tasks API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateCloneRefreshTask(params *CreateCloneRefreshTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloneRefreshTaskCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateCloneRefreshTask creates a clone refresh task to refresh the clone with the new data - - Returns the created Clone Refresh Task which refreshes the clone with specified - -data. -*/ -func (a *Client) CreateCloneRefreshTask(params *CreateCloneRefreshTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloneRefreshTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCloneRefreshTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCloneRefreshTask", - Method: "POST", - PathPattern: "/public/restore/applicationsClone/refresh", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCloneRefreshTaskReader{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.(*CreateCloneRefreshTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCloneRefreshTaskDefault) - 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/clone_refresh_tasks/create_clone_refresh_task_parameters.go b/v1/client/clone_refresh_tasks/create_clone_refresh_task_parameters.go deleted file mode 100644 index cf5a542e..00000000 --- a/v1/client/clone_refresh_tasks/create_clone_refresh_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_refresh_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateCloneRefreshTaskParams creates a new CreateCloneRefreshTaskParams 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 NewCreateCloneRefreshTaskParams() *CreateCloneRefreshTaskParams { - return &CreateCloneRefreshTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCloneRefreshTaskParamsWithTimeout creates a new CreateCloneRefreshTaskParams object -// with the ability to set a timeout on a request. -func NewCreateCloneRefreshTaskParamsWithTimeout(timeout time.Duration) *CreateCloneRefreshTaskParams { - return &CreateCloneRefreshTaskParams{ - timeout: timeout, - } -} - -// NewCreateCloneRefreshTaskParamsWithContext creates a new CreateCloneRefreshTaskParams object -// with the ability to set a context for a request. -func NewCreateCloneRefreshTaskParamsWithContext(ctx context.Context) *CreateCloneRefreshTaskParams { - return &CreateCloneRefreshTaskParams{ - Context: ctx, - } -} - -// NewCreateCloneRefreshTaskParamsWithHTTPClient creates a new CreateCloneRefreshTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCloneRefreshTaskParamsWithHTTPClient(client *http.Client) *CreateCloneRefreshTaskParams { - return &CreateCloneRefreshTaskParams{ - HTTPClient: client, - } -} - -/* -CreateCloneRefreshTaskParams contains all the parameters to send to the API endpoint - - for the create clone refresh task operation. - - Typically these are written to a http.Request. -*/ -type CreateCloneRefreshTaskParams struct { - - /* Body. - - Request to create a Clone Refresh Task. - */ - Body *models.CloneRefreshRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create clone refresh task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloneRefreshTaskParams) WithDefaults() *CreateCloneRefreshTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create clone refresh task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloneRefreshTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) WithTimeout(timeout time.Duration) *CreateCloneRefreshTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) WithContext(ctx context.Context) *CreateCloneRefreshTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) WithHTTPClient(client *http.Client) *CreateCloneRefreshTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) WithBody(body *models.CloneRefreshRequest) *CreateCloneRefreshTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create clone refresh task params -func (o *CreateCloneRefreshTaskParams) SetBody(body *models.CloneRefreshRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCloneRefreshTaskParams) 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/clone_refresh_tasks/create_clone_refresh_task_responses.go b/v1/client/clone_refresh_tasks/create_clone_refresh_task_responses.go deleted file mode 100644 index 8209b1c5..00000000 --- a/v1/client/clone_refresh_tasks/create_clone_refresh_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clone_refresh_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateCloneRefreshTaskReader is a Reader for the CreateCloneRefreshTask structure. -type CreateCloneRefreshTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCloneRefreshTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCloneRefreshTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCloneRefreshTaskDefault(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 - } -} - -// NewCreateCloneRefreshTaskCreated creates a CreateCloneRefreshTaskCreated with default headers values -func NewCreateCloneRefreshTaskCreated() *CreateCloneRefreshTaskCreated { - return &CreateCloneRefreshTaskCreated{} -} - -/* -CreateCloneRefreshTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateCloneRefreshTaskCreated struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this create clone refresh task created response has a 2xx status code -func (o *CreateCloneRefreshTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create clone refresh task created response has a 3xx status code -func (o *CreateCloneRefreshTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create clone refresh task created response has a 4xx status code -func (o *CreateCloneRefreshTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create clone refresh task created response has a 5xx status code -func (o *CreateCloneRefreshTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create clone refresh task created response a status code equal to that given -func (o *CreateCloneRefreshTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create clone refresh task created response -func (o *CreateCloneRefreshTaskCreated) Code() int { - return 201 -} - -func (o *CreateCloneRefreshTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone/refresh][%d] createCloneRefreshTaskCreated %s", 201, payload) -} - -func (o *CreateCloneRefreshTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone/refresh][%d] createCloneRefreshTaskCreated %s", 201, payload) -} - -func (o *CreateCloneRefreshTaskCreated) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *CreateCloneRefreshTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateCloneRefreshTaskDefault creates a CreateCloneRefreshTaskDefault with default headers values -func NewCreateCloneRefreshTaskDefault(code int) *CreateCloneRefreshTaskDefault { - return &CreateCloneRefreshTaskDefault{ - _statusCode: code, - } -} - -/* -CreateCloneRefreshTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCloneRefreshTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create clone refresh task default response has a 2xx status code -func (o *CreateCloneRefreshTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create clone refresh task default response has a 3xx status code -func (o *CreateCloneRefreshTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create clone refresh task default response has a 4xx status code -func (o *CreateCloneRefreshTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create clone refresh task default response has a 5xx status code -func (o *CreateCloneRefreshTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create clone refresh task default response a status code equal to that given -func (o *CreateCloneRefreshTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create clone refresh task default response -func (o *CreateCloneRefreshTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateCloneRefreshTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone/refresh][%d] CreateCloneRefreshTask default %s", o._statusCode, payload) -} - -func (o *CreateCloneRefreshTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone/refresh][%d] CreateCloneRefreshTask default %s", o._statusCode, payload) -} - -func (o *CreateCloneRefreshTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateCloneRefreshTaskDefault) 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/cluster/cluster_client.go b/v1/client/cluster/cluster_client.go deleted file mode 100644 index c925c09b..00000000 --- a/v1/client/cluster/cluster_client.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new cluster API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new cluster API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new cluster API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for cluster API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAppSettings(params *GetAppSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppSettingsOK, error) - - GetBasicClusterInfo(params *GetBasicClusterInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBasicClusterInfoOK, error) - - GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error) - - GetClusterStatus(params *GetClusterStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStatusOK, error) - - UpdateAppSettings(params *UpdateAppSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppSettingsOK, error) - - UpdateCluster(params *UpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAppSettings gets the app settings for the cluster - -Returns the app settings for the cluster. -*/ -func (a *Client) GetAppSettings(params *GetAppSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAppSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAppSettings", - Method: "GET", - PathPattern: "/public/cluster/appSettings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAppSettingsReader{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.(*GetAppSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAppSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetBasicClusterInfo lists details about the cohesity cluster such as the name type version language locale and domains this operation does not require authentication - - All Active Directory domains that are currently joined to the Cohesity - -Cluster are returned. In addition, the default LOCAL domain on the -Cohesity Cluster is returned as the first element of the domains array in -the response. -*/ -func (a *Client) GetBasicClusterInfo(params *GetBasicClusterInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBasicClusterInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBasicClusterInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetBasicClusterInfo", - Method: "GET", - PathPattern: "/public/basicClusterInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBasicClusterInfoReader{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.(*GetBasicClusterInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBasicClusterInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCluster lists details about this cohesity cluster - -Returns information about this Cohesity Cluster. -*/ -func (a *Client) GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterParams() - } - op := &runtime.ClientOperation{ - ID: "GetCluster", - Method: "GET", - PathPattern: "/public/cluster", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterReader{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.(*GetClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetClusterStatus gets the status of a cohesity cluster - - Sends a request to get the status of every node that is part of the current - -Cluster. -*/ -func (a *Client) GetClusterStatus(params *GetClusterStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterStatus", - Method: "GET", - PathPattern: "/public/cluster/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterStatusReader{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.(*GetClusterStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAppSettings updates the app settings of the cluster - -Returns the updated app settings. -*/ -func (a *Client) UpdateAppSettings(params *UpdateAppSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAppSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAppSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAppSettings", - Method: "PUT", - PathPattern: "/public/cluster/appSettings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAppSettingsReader{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.(*UpdateAppSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAppSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateCluster updates the configuration of this cohesity cluster - -Returns the updated Cluster configuration. -*/ -func (a *Client) UpdateCluster(params *UpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateCluster", - Method: "PUT", - PathPattern: "/public/cluster", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateClusterReader{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.(*UpdateClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateClusterDefault) - 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/cluster/get_app_settings_parameters.go b/v1/client/cluster/get_app_settings_parameters.go deleted file mode 100644 index 95d9b047..00000000 --- a/v1/client/cluster/get_app_settings_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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" -) - -// NewGetAppSettingsParams creates a new GetAppSettingsParams 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 NewGetAppSettingsParams() *GetAppSettingsParams { - return &GetAppSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppSettingsParamsWithTimeout creates a new GetAppSettingsParams object -// with the ability to set a timeout on a request. -func NewGetAppSettingsParamsWithTimeout(timeout time.Duration) *GetAppSettingsParams { - return &GetAppSettingsParams{ - timeout: timeout, - } -} - -// NewGetAppSettingsParamsWithContext creates a new GetAppSettingsParams object -// with the ability to set a context for a request. -func NewGetAppSettingsParamsWithContext(ctx context.Context) *GetAppSettingsParams { - return &GetAppSettingsParams{ - Context: ctx, - } -} - -// NewGetAppSettingsParamsWithHTTPClient creates a new GetAppSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppSettingsParamsWithHTTPClient(client *http.Client) *GetAppSettingsParams { - return &GetAppSettingsParams{ - HTTPClient: client, - } -} - -/* -GetAppSettingsParams contains all the parameters to send to the API endpoint - - for the get app settings operation. - - Typically these are written to a http.Request. -*/ -type GetAppSettingsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get app settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSettingsParams) WithDefaults() *GetAppSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get app settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get app settings params -func (o *GetAppSettingsParams) WithTimeout(timeout time.Duration) *GetAppSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get app settings params -func (o *GetAppSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get app settings params -func (o *GetAppSettingsParams) WithContext(ctx context.Context) *GetAppSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get app settings params -func (o *GetAppSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get app settings params -func (o *GetAppSettingsParams) WithHTTPClient(client *http.Client) *GetAppSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get app settings params -func (o *GetAppSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppSettingsParams) 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/cluster/get_app_settings_responses.go b/v1/client/cluster/get_app_settings_responses.go deleted file mode 100644 index 35b371d0..00000000 --- a/v1/client/cluster/get_app_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAppSettingsReader is a Reader for the GetAppSettings structure. -type GetAppSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAppSettingsDefault(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 - } -} - -// NewGetAppSettingsOK creates a GetAppSettingsOK with default headers values -func NewGetAppSettingsOK() *GetAppSettingsOK { - return &GetAppSettingsOK{} -} - -/* -GetAppSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAppSettingsOK struct { - Payload *models.AppsConfig -} - -// IsSuccess returns true when this get app settings o k response has a 2xx status code -func (o *GetAppSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get app settings o k response has a 3xx status code -func (o *GetAppSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get app settings o k response has a 4xx status code -func (o *GetAppSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get app settings o k response has a 5xx status code -func (o *GetAppSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get app settings o k response a status code equal to that given -func (o *GetAppSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get app settings o k response -func (o *GetAppSettingsOK) Code() int { - return 200 -} - -func (o *GetAppSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/appSettings][%d] getAppSettingsOK %s", 200, payload) -} - -func (o *GetAppSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/appSettings][%d] getAppSettingsOK %s", 200, payload) -} - -func (o *GetAppSettingsOK) GetPayload() *models.AppsConfig { - return o.Payload -} - -func (o *GetAppSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppsConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppSettingsDefault creates a GetAppSettingsDefault with default headers values -func NewGetAppSettingsDefault(code int) *GetAppSettingsDefault { - return &GetAppSettingsDefault{ - _statusCode: code, - } -} - -/* -GetAppSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAppSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get app settings default response has a 2xx status code -func (o *GetAppSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get app settings default response has a 3xx status code -func (o *GetAppSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get app settings default response has a 4xx status code -func (o *GetAppSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get app settings default response has a 5xx status code -func (o *GetAppSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get app settings default response a status code equal to that given -func (o *GetAppSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get app settings default response -func (o *GetAppSettingsDefault) Code() int { - return o._statusCode -} - -func (o *GetAppSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/appSettings][%d] GetAppSettings default %s", o._statusCode, payload) -} - -func (o *GetAppSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/appSettings][%d] GetAppSettings default %s", o._statusCode, payload) -} - -func (o *GetAppSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAppSettingsDefault) 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/cluster/get_basic_cluster_info_parameters.go b/v1/client/cluster/get_basic_cluster_info_parameters.go deleted file mode 100644 index d82b3c71..00000000 --- a/v1/client/cluster/get_basic_cluster_info_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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" -) - -// NewGetBasicClusterInfoParams creates a new GetBasicClusterInfoParams 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 NewGetBasicClusterInfoParams() *GetBasicClusterInfoParams { - return &GetBasicClusterInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBasicClusterInfoParamsWithTimeout creates a new GetBasicClusterInfoParams object -// with the ability to set a timeout on a request. -func NewGetBasicClusterInfoParamsWithTimeout(timeout time.Duration) *GetBasicClusterInfoParams { - return &GetBasicClusterInfoParams{ - timeout: timeout, - } -} - -// NewGetBasicClusterInfoParamsWithContext creates a new GetBasicClusterInfoParams object -// with the ability to set a context for a request. -func NewGetBasicClusterInfoParamsWithContext(ctx context.Context) *GetBasicClusterInfoParams { - return &GetBasicClusterInfoParams{ - Context: ctx, - } -} - -// NewGetBasicClusterInfoParamsWithHTTPClient creates a new GetBasicClusterInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBasicClusterInfoParamsWithHTTPClient(client *http.Client) *GetBasicClusterInfoParams { - return &GetBasicClusterInfoParams{ - HTTPClient: client, - } -} - -/* -GetBasicClusterInfoParams contains all the parameters to send to the API endpoint - - for the get basic cluster info operation. - - Typically these are written to a http.Request. -*/ -type GetBasicClusterInfoParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get basic cluster info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBasicClusterInfoParams) WithDefaults() *GetBasicClusterInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get basic cluster info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBasicClusterInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get basic cluster info params -func (o *GetBasicClusterInfoParams) WithTimeout(timeout time.Duration) *GetBasicClusterInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get basic cluster info params -func (o *GetBasicClusterInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get basic cluster info params -func (o *GetBasicClusterInfoParams) WithContext(ctx context.Context) *GetBasicClusterInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get basic cluster info params -func (o *GetBasicClusterInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get basic cluster info params -func (o *GetBasicClusterInfoParams) WithHTTPClient(client *http.Client) *GetBasicClusterInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get basic cluster info params -func (o *GetBasicClusterInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBasicClusterInfoParams) 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/cluster/get_basic_cluster_info_responses.go b/v1/client/cluster/get_basic_cluster_info_responses.go deleted file mode 100644 index 45311834..00000000 --- a/v1/client/cluster/get_basic_cluster_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBasicClusterInfoReader is a Reader for the GetBasicClusterInfo structure. -type GetBasicClusterInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBasicClusterInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBasicClusterInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBasicClusterInfoDefault(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 - } -} - -// NewGetBasicClusterInfoOK creates a GetBasicClusterInfoOK with default headers values -func NewGetBasicClusterInfoOK() *GetBasicClusterInfoOK { - return &GetBasicClusterInfoOK{} -} - -/* -GetBasicClusterInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBasicClusterInfoOK struct { - Payload *models.BasicClusterInfo -} - -// IsSuccess returns true when this get basic cluster info o k response has a 2xx status code -func (o *GetBasicClusterInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get basic cluster info o k response has a 3xx status code -func (o *GetBasicClusterInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get basic cluster info o k response has a 4xx status code -func (o *GetBasicClusterInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get basic cluster info o k response has a 5xx status code -func (o *GetBasicClusterInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get basic cluster info o k response a status code equal to that given -func (o *GetBasicClusterInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get basic cluster info o k response -func (o *GetBasicClusterInfoOK) Code() int { - return 200 -} - -func (o *GetBasicClusterInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/basicClusterInfo][%d] getBasicClusterInfoOK %s", 200, payload) -} - -func (o *GetBasicClusterInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/basicClusterInfo][%d] getBasicClusterInfoOK %s", 200, payload) -} - -func (o *GetBasicClusterInfoOK) GetPayload() *models.BasicClusterInfo { - return o.Payload -} - -func (o *GetBasicClusterInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BasicClusterInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBasicClusterInfoDefault creates a GetBasicClusterInfoDefault with default headers values -func NewGetBasicClusterInfoDefault(code int) *GetBasicClusterInfoDefault { - return &GetBasicClusterInfoDefault{ - _statusCode: code, - } -} - -/* -GetBasicClusterInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBasicClusterInfoDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get basic cluster info default response has a 2xx status code -func (o *GetBasicClusterInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get basic cluster info default response has a 3xx status code -func (o *GetBasicClusterInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get basic cluster info default response has a 4xx status code -func (o *GetBasicClusterInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get basic cluster info default response has a 5xx status code -func (o *GetBasicClusterInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get basic cluster info default response a status code equal to that given -func (o *GetBasicClusterInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get basic cluster info default response -func (o *GetBasicClusterInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetBasicClusterInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/basicClusterInfo][%d] GetBasicClusterInfo default %s", o._statusCode, payload) -} - -func (o *GetBasicClusterInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/basicClusterInfo][%d] GetBasicClusterInfo default %s", o._statusCode, payload) -} - -func (o *GetBasicClusterInfoDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetBasicClusterInfoDefault) 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/cluster/get_cluster_parameters.go b/v1/client/cluster/get_cluster_parameters.go deleted file mode 100644 index 98537fb7..00000000 --- a/v1/client/cluster/get_cluster_parameters.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/go-openapi/swag" -) - -// NewGetClusterParams creates a new GetClusterParams 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 NewGetClusterParams() *GetClusterParams { - return &GetClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterParamsWithTimeout creates a new GetClusterParams object -// with the ability to set a timeout on a request. -func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams { - return &GetClusterParams{ - timeout: timeout, - } -} - -// NewGetClusterParamsWithContext creates a new GetClusterParams object -// with the ability to set a context for a request. -func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams { - return &GetClusterParams{ - Context: ctx, - } -} - -// NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams { - return &GetClusterParams{ - HTTPClient: client, - } -} - -/* -GetClusterParams contains all the parameters to send to the API endpoint - - for the get cluster operation. - - Typically these are written to a http.Request. -*/ -type GetClusterParams struct { - - /* FetchStats. - - If 'true', also get statistics about the Cohesity Cluster. - */ - FetchStats *bool - - /* FetchTimeSeriesSchema. - - Specifies whether to get time series schema info of the cluster. - */ - FetchTimeSeriesSchema *bool - - /* IncludeMinimumNodesInfo. - - Specifies whether to include info about minimum failure domains - needed to support based on fault tolerance configured and - EC configuration on all storage domains. - */ - IncludeMinimumNodesInfo *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterParams) WithDefaults() *GetClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster params -func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster params -func (o *GetClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster params -func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster params -func (o *GetClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster params -func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster params -func (o *GetClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFetchStats adds the fetchStats to the get cluster params -func (o *GetClusterParams) WithFetchStats(fetchStats *bool) *GetClusterParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get cluster params -func (o *GetClusterParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithFetchTimeSeriesSchema adds the fetchTimeSeriesSchema to the get cluster params -func (o *GetClusterParams) WithFetchTimeSeriesSchema(fetchTimeSeriesSchema *bool) *GetClusterParams { - o.SetFetchTimeSeriesSchema(fetchTimeSeriesSchema) - return o -} - -// SetFetchTimeSeriesSchema adds the fetchTimeSeriesSchema to the get cluster params -func (o *GetClusterParams) SetFetchTimeSeriesSchema(fetchTimeSeriesSchema *bool) { - o.FetchTimeSeriesSchema = fetchTimeSeriesSchema -} - -// WithIncludeMinimumNodesInfo adds the includeMinimumNodesInfo to the get cluster params -func (o *GetClusterParams) WithIncludeMinimumNodesInfo(includeMinimumNodesInfo *bool) *GetClusterParams { - o.SetIncludeMinimumNodesInfo(includeMinimumNodesInfo) - return o -} - -// SetIncludeMinimumNodesInfo adds the includeMinimumNodesInfo to the get cluster params -func (o *GetClusterParams) SetIncludeMinimumNodesInfo(includeMinimumNodesInfo *bool) { - o.IncludeMinimumNodesInfo = includeMinimumNodesInfo -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.FetchTimeSeriesSchema != nil { - - // query param fetchTimeSeriesSchema - var qrFetchTimeSeriesSchema bool - - if o.FetchTimeSeriesSchema != nil { - qrFetchTimeSeriesSchema = *o.FetchTimeSeriesSchema - } - qFetchTimeSeriesSchema := swag.FormatBool(qrFetchTimeSeriesSchema) - if qFetchTimeSeriesSchema != "" { - - if err := r.SetQueryParam("fetchTimeSeriesSchema", qFetchTimeSeriesSchema); err != nil { - return err - } - } - } - - if o.IncludeMinimumNodesInfo != nil { - - // query param includeMinimumNodesInfo - var qrIncludeMinimumNodesInfo bool - - if o.IncludeMinimumNodesInfo != nil { - qrIncludeMinimumNodesInfo = *o.IncludeMinimumNodesInfo - } - qIncludeMinimumNodesInfo := swag.FormatBool(qrIncludeMinimumNodesInfo) - if qIncludeMinimumNodesInfo != "" { - - if err := r.SetQueryParam("includeMinimumNodesInfo", qIncludeMinimumNodesInfo); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/cluster/get_cluster_responses.go b/v1/client/cluster/get_cluster_responses.go deleted file mode 100644 index 891b76f3..00000000 --- a/v1/client/cluster/get_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterReader is a Reader for the GetCluster structure. -type GetClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterDefault(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 - } -} - -// NewGetClusterOK creates a GetClusterOK with default headers values -func NewGetClusterOK() *GetClusterOK { - return &GetClusterOK{} -} - -/* -GetClusterOK describes a response with status code 200, with default header values. - -Successful Response -*/ -type GetClusterOK struct { - Payload *models.Cluster -} - -// IsSuccess returns true when this get cluster o k response has a 2xx status code -func (o *GetClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster o k response has a 3xx status code -func (o *GetClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster o k response has a 4xx status code -func (o *GetClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster o k response has a 5xx status code -func (o *GetClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster o k response a status code equal to that given -func (o *GetClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster o k response -func (o *GetClusterOK) Code() int { - return 200 -} - -func (o *GetClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster][%d] getClusterOK %s", 200, payload) -} - -func (o *GetClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster][%d] getClusterOK %s", 200, payload) -} - -func (o *GetClusterOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *GetClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterDefault creates a GetClusterDefault with default headers values -func NewGetClusterDefault(code int) *GetClusterDefault { - return &GetClusterDefault{ - _statusCode: code, - } -} - -/* -GetClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster default response has a 2xx status code -func (o *GetClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster default response has a 3xx status code -func (o *GetClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster default response has a 4xx status code -func (o *GetClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster default response has a 5xx status code -func (o *GetClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster default response a status code equal to that given -func (o *GetClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster default response -func (o *GetClusterDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster][%d] GetCluster default %s", o._statusCode, payload) -} - -func (o *GetClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster][%d] GetCluster default %s", o._statusCode, payload) -} - -func (o *GetClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterDefault) 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/cluster/get_cluster_status_parameters.go b/v1/client/cluster/get_cluster_status_parameters.go deleted file mode 100644 index 68c88f79..00000000 --- a/v1/client/cluster/get_cluster_status_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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" -) - -// NewGetClusterStatusParams creates a new GetClusterStatusParams 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 NewGetClusterStatusParams() *GetClusterStatusParams { - return &GetClusterStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterStatusParamsWithTimeout creates a new GetClusterStatusParams object -// with the ability to set a timeout on a request. -func NewGetClusterStatusParamsWithTimeout(timeout time.Duration) *GetClusterStatusParams { - return &GetClusterStatusParams{ - timeout: timeout, - } -} - -// NewGetClusterStatusParamsWithContext creates a new GetClusterStatusParams object -// with the ability to set a context for a request. -func NewGetClusterStatusParamsWithContext(ctx context.Context) *GetClusterStatusParams { - return &GetClusterStatusParams{ - Context: ctx, - } -} - -// NewGetClusterStatusParamsWithHTTPClient creates a new GetClusterStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterStatusParamsWithHTTPClient(client *http.Client) *GetClusterStatusParams { - return &GetClusterStatusParams{ - HTTPClient: client, - } -} - -/* -GetClusterStatusParams contains all the parameters to send to the API endpoint - - for the get cluster status operation. - - Typically these are written to a http.Request. -*/ -type GetClusterStatusParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStatusParams) WithDefaults() *GetClusterStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster status params -func (o *GetClusterStatusParams) WithTimeout(timeout time.Duration) *GetClusterStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster status params -func (o *GetClusterStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster status params -func (o *GetClusterStatusParams) WithContext(ctx context.Context) *GetClusterStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster status params -func (o *GetClusterStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster status params -func (o *GetClusterStatusParams) WithHTTPClient(client *http.Client) *GetClusterStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster status params -func (o *GetClusterStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterStatusParams) 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/cluster/get_cluster_status_responses.go b/v1/client/cluster/get_cluster_status_responses.go deleted file mode 100644 index cc13f4b8..00000000 --- a/v1/client/cluster/get_cluster_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterStatusReader is a Reader for the GetClusterStatus structure. -type GetClusterStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterStatusDefault(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 - } -} - -// NewGetClusterStatusOK creates a GetClusterStatusOK with default headers values -func NewGetClusterStatusOK() *GetClusterStatusOK { - return &GetClusterStatusOK{} -} - -/* -GetClusterStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterStatusOK struct { - Payload *models.ClusterStatusResult -} - -// IsSuccess returns true when this get cluster status o k response has a 2xx status code -func (o *GetClusterStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster status o k response has a 3xx status code -func (o *GetClusterStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster status o k response has a 4xx status code -func (o *GetClusterStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster status o k response has a 5xx status code -func (o *GetClusterStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster status o k response a status code equal to that given -func (o *GetClusterStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster status o k response -func (o *GetClusterStatusOK) Code() int { - return 200 -} - -func (o *GetClusterStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/status][%d] getClusterStatusOK %s", 200, payload) -} - -func (o *GetClusterStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/status][%d] getClusterStatusOK %s", 200, payload) -} - -func (o *GetClusterStatusOK) GetPayload() *models.ClusterStatusResult { - return o.Payload -} - -func (o *GetClusterStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterStatusResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterStatusDefault creates a GetClusterStatusDefault with default headers values -func NewGetClusterStatusDefault(code int) *GetClusterStatusDefault { - return &GetClusterStatusDefault{ - _statusCode: code, - } -} - -/* -GetClusterStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster status default response has a 2xx status code -func (o *GetClusterStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster status default response has a 3xx status code -func (o *GetClusterStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster status default response has a 4xx status code -func (o *GetClusterStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster status default response has a 5xx status code -func (o *GetClusterStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster status default response a status code equal to that given -func (o *GetClusterStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster status default response -func (o *GetClusterStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/status][%d] GetClusterStatus default %s", o._statusCode, payload) -} - -func (o *GetClusterStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/status][%d] GetClusterStatus default %s", o._statusCode, payload) -} - -func (o *GetClusterStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterStatusDefault) 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/cluster/update_app_settings_parameters.go b/v1/client/cluster/update_app_settings_parameters.go deleted file mode 100644 index 3b414c43..00000000 --- a/v1/client/cluster/update_app_settings_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateAppSettingsParams creates a new UpdateAppSettingsParams 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 NewUpdateAppSettingsParams() *UpdateAppSettingsParams { - return &UpdateAppSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAppSettingsParamsWithTimeout creates a new UpdateAppSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateAppSettingsParamsWithTimeout(timeout time.Duration) *UpdateAppSettingsParams { - return &UpdateAppSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateAppSettingsParamsWithContext creates a new UpdateAppSettingsParams object -// with the ability to set a context for a request. -func NewUpdateAppSettingsParamsWithContext(ctx context.Context) *UpdateAppSettingsParams { - return &UpdateAppSettingsParams{ - Context: ctx, - } -} - -// NewUpdateAppSettingsParamsWithHTTPClient creates a new UpdateAppSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAppSettingsParamsWithHTTPClient(client *http.Client) *UpdateAppSettingsParams { - return &UpdateAppSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateAppSettingsParams contains all the parameters to send to the API endpoint - - for the update app settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateAppSettingsParams struct { - - /* Body. - - Update App Settings Parameter. - */ - Body *models.AppsConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update app settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppSettingsParams) WithDefaults() *UpdateAppSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update app settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAppSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update app settings params -func (o *UpdateAppSettingsParams) WithTimeout(timeout time.Duration) *UpdateAppSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update app settings params -func (o *UpdateAppSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update app settings params -func (o *UpdateAppSettingsParams) WithContext(ctx context.Context) *UpdateAppSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update app settings params -func (o *UpdateAppSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update app settings params -func (o *UpdateAppSettingsParams) WithHTTPClient(client *http.Client) *UpdateAppSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update app settings params -func (o *UpdateAppSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update app settings params -func (o *UpdateAppSettingsParams) WithBody(body *models.AppsConfig) *UpdateAppSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update app settings params -func (o *UpdateAppSettingsParams) SetBody(body *models.AppsConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAppSettingsParams) 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/cluster/update_app_settings_responses.go b/v1/client/cluster/update_app_settings_responses.go deleted file mode 100644 index e427c0b8..00000000 --- a/v1/client/cluster/update_app_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateAppSettingsReader is a Reader for the UpdateAppSettings structure. -type UpdateAppSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAppSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAppSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAppSettingsDefault(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 - } -} - -// NewUpdateAppSettingsOK creates a UpdateAppSettingsOK with default headers values -func NewUpdateAppSettingsOK() *UpdateAppSettingsOK { - return &UpdateAppSettingsOK{} -} - -/* -UpdateAppSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateAppSettingsOK struct { - Payload *models.AppsConfig -} - -// IsSuccess returns true when this update app settings o k response has a 2xx status code -func (o *UpdateAppSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update app settings o k response has a 3xx status code -func (o *UpdateAppSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update app settings o k response has a 4xx status code -func (o *UpdateAppSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update app settings o k response has a 5xx status code -func (o *UpdateAppSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update app settings o k response a status code equal to that given -func (o *UpdateAppSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update app settings o k response -func (o *UpdateAppSettingsOK) Code() int { - return 200 -} - -func (o *UpdateAppSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/appSettings][%d] updateAppSettingsOK %s", 200, payload) -} - -func (o *UpdateAppSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/appSettings][%d] updateAppSettingsOK %s", 200, payload) -} - -func (o *UpdateAppSettingsOK) GetPayload() *models.AppsConfig { - return o.Payload -} - -func (o *UpdateAppSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AppsConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAppSettingsDefault creates a UpdateAppSettingsDefault with default headers values -func NewUpdateAppSettingsDefault(code int) *UpdateAppSettingsDefault { - return &UpdateAppSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateAppSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAppSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update app settings default response has a 2xx status code -func (o *UpdateAppSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update app settings default response has a 3xx status code -func (o *UpdateAppSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update app settings default response has a 4xx status code -func (o *UpdateAppSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update app settings default response has a 5xx status code -func (o *UpdateAppSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update app settings default response a status code equal to that given -func (o *UpdateAppSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update app settings default response -func (o *UpdateAppSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAppSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/appSettings][%d] UpdateAppSettings default %s", o._statusCode, payload) -} - -func (o *UpdateAppSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/appSettings][%d] UpdateAppSettings default %s", o._statusCode, payload) -} - -func (o *UpdateAppSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateAppSettingsDefault) 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/cluster/update_cluster_parameters.go b/v1/client/cluster/update_cluster_parameters.go deleted file mode 100644 index dfe59b19..00000000 --- a/v1/client/cluster/update_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateClusterParams creates a new UpdateClusterParams 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 NewUpdateClusterParams() *UpdateClusterParams { - return &UpdateClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateClusterParamsWithTimeout creates a new UpdateClusterParams object -// with the ability to set a timeout on a request. -func NewUpdateClusterParamsWithTimeout(timeout time.Duration) *UpdateClusterParams { - return &UpdateClusterParams{ - timeout: timeout, - } -} - -// NewUpdateClusterParamsWithContext creates a new UpdateClusterParams object -// with the ability to set a context for a request. -func NewUpdateClusterParamsWithContext(ctx context.Context) *UpdateClusterParams { - return &UpdateClusterParams{ - Context: ctx, - } -} - -// NewUpdateClusterParamsWithHTTPClient creates a new UpdateClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateClusterParamsWithHTTPClient(client *http.Client) *UpdateClusterParams { - return &UpdateClusterParams{ - HTTPClient: client, - } -} - -/* -UpdateClusterParams contains all the parameters to send to the API endpoint - - for the update cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdateClusterParams struct { - - /* Body. - - Update Cluster Parameter. - */ - Body *models.UpdateClusterParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterParams) WithDefaults() *UpdateClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update cluster params -func (o *UpdateClusterParams) WithTimeout(timeout time.Duration) *UpdateClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update cluster params -func (o *UpdateClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update cluster params -func (o *UpdateClusterParams) WithContext(ctx context.Context) *UpdateClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update cluster params -func (o *UpdateClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update cluster params -func (o *UpdateClusterParams) WithHTTPClient(client *http.Client) *UpdateClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update cluster params -func (o *UpdateClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update cluster params -func (o *UpdateClusterParams) WithBody(body *models.UpdateClusterParams) *UpdateClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update cluster params -func (o *UpdateClusterParams) SetBody(body *models.UpdateClusterParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateClusterParams) 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/cluster/update_cluster_responses.go b/v1/client/cluster/update_cluster_responses.go deleted file mode 100644 index 886d4251..00000000 --- a/v1/client/cluster/update_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateClusterReader is a Reader for the UpdateCluster structure. -type UpdateClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateClusterDefault(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 - } -} - -// NewUpdateClusterOK creates a UpdateClusterOK with default headers values -func NewUpdateClusterOK() *UpdateClusterOK { - return &UpdateClusterOK{} -} - -/* -UpdateClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateClusterOK struct { - Payload *models.Cluster -} - -// IsSuccess returns true when this update cluster o k response has a 2xx status code -func (o *UpdateClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update cluster o k response has a 3xx status code -func (o *UpdateClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update cluster o k response has a 4xx status code -func (o *UpdateClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update cluster o k response has a 5xx status code -func (o *UpdateClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update cluster o k response a status code equal to that given -func (o *UpdateClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update cluster o k response -func (o *UpdateClusterOK) Code() int { - return 200 -} - -func (o *UpdateClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster][%d] updateClusterOK %s", 200, payload) -} - -func (o *UpdateClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster][%d] updateClusterOK %s", 200, payload) -} - -func (o *UpdateClusterOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *UpdateClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateClusterDefault creates a UpdateClusterDefault with default headers values -func NewUpdateClusterDefault(code int) *UpdateClusterDefault { - return &UpdateClusterDefault{ - _statusCode: code, - } -} - -/* -UpdateClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update cluster default response has a 2xx status code -func (o *UpdateClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update cluster default response has a 3xx status code -func (o *UpdateClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update cluster default response has a 4xx status code -func (o *UpdateClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update cluster default response has a 5xx status code -func (o *UpdateClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update cluster default response a status code equal to that given -func (o *UpdateClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update cluster default response -func (o *UpdateClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdateClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster][%d] UpdateCluster default %s", o._statusCode, payload) -} - -func (o *UpdateClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster][%d] UpdateCluster default %s", o._statusCode, payload) -} - -func (o *UpdateClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateClusterDefault) 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/cluster_partitions/cluster_partitions_client.go b/v1/client/cluster_partitions/cluster_partitions_client.go deleted file mode 100644 index da26d034..00000000 --- a/v1/client/cluster_partitions/cluster_partitions_client.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster_partitions - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new cluster partitions API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new cluster partitions API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new cluster partitions API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for cluster partitions API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetClusterPartitionByID(params *GetClusterPartitionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPartitionByIDOK, error) - - GetClusterPartitions(params *GetClusterPartitionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPartitionsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetClusterPartitionByID lists details about a single cluster partition - -Returns the Cluster Partition corresponding to the specified Cluster Partition Id. -*/ -func (a *Client) GetClusterPartitionByID(params *GetClusterPartitionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPartitionByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterPartitionByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterPartitionById", - Method: "GET", - PathPattern: "/public/clusterPartitions/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterPartitionByIDReader{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.(*GetClusterPartitionByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterPartitionByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetClusterPartitions lists cluster partitions filtered by the specified parameters - - If no parameters are specified, all Cluster Partitions currently on - -the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetClusterPartitions(params *GetClusterPartitionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPartitionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterPartitionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterPartitions", - Method: "GET", - PathPattern: "/public/clusterPartitions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterPartitionsReader{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.(*GetClusterPartitionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterPartitionsDefault) - 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/cluster_partitions/get_cluster_partition_by_id_parameters.go b/v1/client/cluster_partitions/get_cluster_partition_by_id_parameters.go deleted file mode 100644 index fa5d8570..00000000 --- a/v1/client/cluster_partitions/get_cluster_partition_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster_partitions - -// 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/go-openapi/swag" -) - -// NewGetClusterPartitionByIDParams creates a new GetClusterPartitionByIDParams 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 NewGetClusterPartitionByIDParams() *GetClusterPartitionByIDParams { - return &GetClusterPartitionByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterPartitionByIDParamsWithTimeout creates a new GetClusterPartitionByIDParams object -// with the ability to set a timeout on a request. -func NewGetClusterPartitionByIDParamsWithTimeout(timeout time.Duration) *GetClusterPartitionByIDParams { - return &GetClusterPartitionByIDParams{ - timeout: timeout, - } -} - -// NewGetClusterPartitionByIDParamsWithContext creates a new GetClusterPartitionByIDParams object -// with the ability to set a context for a request. -func NewGetClusterPartitionByIDParamsWithContext(ctx context.Context) *GetClusterPartitionByIDParams { - return &GetClusterPartitionByIDParams{ - Context: ctx, - } -} - -// NewGetClusterPartitionByIDParamsWithHTTPClient creates a new GetClusterPartitionByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterPartitionByIDParamsWithHTTPClient(client *http.Client) *GetClusterPartitionByIDParams { - return &GetClusterPartitionByIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterPartitionByIDParams contains all the parameters to send to the API endpoint - - for the get cluster partition by Id operation. - - Typically these are written to a http.Request. -*/ -type GetClusterPartitionByIDParams struct { - - /* ID. - - Specifies a unique id of the Cluster Partition to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster partition by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPartitionByIDParams) WithDefaults() *GetClusterPartitionByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster partition by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPartitionByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) WithTimeout(timeout time.Duration) *GetClusterPartitionByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) WithContext(ctx context.Context) *GetClusterPartitionByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) WithHTTPClient(client *http.Client) *GetClusterPartitionByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) WithID(id int64) *GetClusterPartitionByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get cluster partition by Id params -func (o *GetClusterPartitionByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterPartitionByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/cluster_partitions/get_cluster_partition_by_id_responses.go b/v1/client/cluster_partitions/get_cluster_partition_by_id_responses.go deleted file mode 100644 index 3f52d705..00000000 --- a/v1/client/cluster_partitions/get_cluster_partition_by_id_responses.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster_partitions - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterPartitionByIDReader is a Reader for the GetClusterPartitionByID structure. -type GetClusterPartitionByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterPartitionByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterPartitionByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetClusterPartitionByIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewGetClusterPartitionByIDDefault(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 - } -} - -// NewGetClusterPartitionByIDOK creates a GetClusterPartitionByIDOK with default headers values -func NewGetClusterPartitionByIDOK() *GetClusterPartitionByIDOK { - return &GetClusterPartitionByIDOK{} -} - -/* -GetClusterPartitionByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterPartitionByIDOK struct { - Payload *models.ClusterPartition -} - -// IsSuccess returns true when this get cluster partition by Id o k response has a 2xx status code -func (o *GetClusterPartitionByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster partition by Id o k response has a 3xx status code -func (o *GetClusterPartitionByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster partition by Id o k response has a 4xx status code -func (o *GetClusterPartitionByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster partition by Id o k response has a 5xx status code -func (o *GetClusterPartitionByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster partition by Id o k response a status code equal to that given -func (o *GetClusterPartitionByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster partition by Id o k response -func (o *GetClusterPartitionByIDOK) Code() int { - return 200 -} - -func (o *GetClusterPartitionByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] getClusterPartitionByIdOK %s", 200, payload) -} - -func (o *GetClusterPartitionByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] getClusterPartitionByIdOK %s", 200, payload) -} - -func (o *GetClusterPartitionByIDOK) GetPayload() *models.ClusterPartition { - return o.Payload -} - -func (o *GetClusterPartitionByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterPartition) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterPartitionByIDNotFound creates a GetClusterPartitionByIDNotFound with default headers values -func NewGetClusterPartitionByIDNotFound() *GetClusterPartitionByIDNotFound { - return &GetClusterPartitionByIDNotFound{} -} - -/* -GetClusterPartitionByIDNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetClusterPartitionByIDNotFound struct { -} - -// IsSuccess returns true when this get cluster partition by Id not found response has a 2xx status code -func (o *GetClusterPartitionByIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cluster partition by Id not found response has a 3xx status code -func (o *GetClusterPartitionByIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster partition by Id not found response has a 4xx status code -func (o *GetClusterPartitionByIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get cluster partition by Id not found response has a 5xx status code -func (o *GetClusterPartitionByIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster partition by Id not found response a status code equal to that given -func (o *GetClusterPartitionByIDNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get cluster partition by Id not found response -func (o *GetClusterPartitionByIDNotFound) Code() int { - return 404 -} - -func (o *GetClusterPartitionByIDNotFound) Error() string { - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] getClusterPartitionByIdNotFound", 404) -} - -func (o *GetClusterPartitionByIDNotFound) String() string { - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] getClusterPartitionByIdNotFound", 404) -} - -func (o *GetClusterPartitionByIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetClusterPartitionByIDDefault creates a GetClusterPartitionByIDDefault with default headers values -func NewGetClusterPartitionByIDDefault(code int) *GetClusterPartitionByIDDefault { - return &GetClusterPartitionByIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterPartitionByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterPartitionByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster partition by Id default response has a 2xx status code -func (o *GetClusterPartitionByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster partition by Id default response has a 3xx status code -func (o *GetClusterPartitionByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster partition by Id default response has a 4xx status code -func (o *GetClusterPartitionByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster partition by Id default response has a 5xx status code -func (o *GetClusterPartitionByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster partition by Id default response a status code equal to that given -func (o *GetClusterPartitionByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster partition by Id default response -func (o *GetClusterPartitionByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterPartitionByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] GetClusterPartitionById default %s", o._statusCode, payload) -} - -func (o *GetClusterPartitionByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions/{id}][%d] GetClusterPartitionById default %s", o._statusCode, payload) -} - -func (o *GetClusterPartitionByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterPartitionByIDDefault) 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/cluster_partitions/get_cluster_partitions_parameters.go b/v1/client/cluster_partitions/get_cluster_partitions_parameters.go deleted file mode 100644 index 98a9286f..00000000 --- a/v1/client/cluster_partitions/get_cluster_partitions_parameters.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster_partitions - -// 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/go-openapi/swag" -) - -// NewGetClusterPartitionsParams creates a new GetClusterPartitionsParams 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 NewGetClusterPartitionsParams() *GetClusterPartitionsParams { - return &GetClusterPartitionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterPartitionsParamsWithTimeout creates a new GetClusterPartitionsParams object -// with the ability to set a timeout on a request. -func NewGetClusterPartitionsParamsWithTimeout(timeout time.Duration) *GetClusterPartitionsParams { - return &GetClusterPartitionsParams{ - timeout: timeout, - } -} - -// NewGetClusterPartitionsParamsWithContext creates a new GetClusterPartitionsParams object -// with the ability to set a context for a request. -func NewGetClusterPartitionsParamsWithContext(ctx context.Context) *GetClusterPartitionsParams { - return &GetClusterPartitionsParams{ - Context: ctx, - } -} - -// NewGetClusterPartitionsParamsWithHTTPClient creates a new GetClusterPartitionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterPartitionsParamsWithHTTPClient(client *http.Client) *GetClusterPartitionsParams { - return &GetClusterPartitionsParams{ - HTTPClient: client, - } -} - -/* -GetClusterPartitionsParams contains all the parameters to send to the API endpoint - - for the get cluster partitions operation. - - Typically these are written to a http.Request. -*/ -type GetClusterPartitionsParams struct { - - /* Ids. - - Array of Cluster Partition Ids. - - Filter by a list of Cluster Partition ids. If empty, the Cluster Partitions - are not filtered by id. - */ - Ids []int64 - - /* Names. - - Array of Cluster Partition Names. - - Filter by a list of Cluster Partition Names. If empty, the Cluster - Partitions are not filtered by names. - */ - Names []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster partitions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPartitionsParams) WithDefaults() *GetClusterPartitionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster partitions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPartitionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster partitions params -func (o *GetClusterPartitionsParams) WithTimeout(timeout time.Duration) *GetClusterPartitionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster partitions params -func (o *GetClusterPartitionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster partitions params -func (o *GetClusterPartitionsParams) WithContext(ctx context.Context) *GetClusterPartitionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster partitions params -func (o *GetClusterPartitionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster partitions params -func (o *GetClusterPartitionsParams) WithHTTPClient(client *http.Client) *GetClusterPartitionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster partitions params -func (o *GetClusterPartitionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get cluster partitions params -func (o *GetClusterPartitionsParams) WithIds(ids []int64) *GetClusterPartitionsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get cluster partitions params -func (o *GetClusterPartitionsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithNames adds the names to the get cluster partitions params -func (o *GetClusterPartitionsParams) WithNames(names []string) *GetClusterPartitionsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get cluster partitions params -func (o *GetClusterPartitionsParams) SetNames(names []string) { - o.Names = names -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterPartitionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetClusterPartitions binds the parameter ids -func (o *GetClusterPartitionsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetClusterPartitions binds the parameter names -func (o *GetClusterPartitionsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} diff --git a/v1/client/cluster_partitions/get_cluster_partitions_responses.go b/v1/client/cluster_partitions/get_cluster_partitions_responses.go deleted file mode 100644 index 66f18954..00000000 --- a/v1/client/cluster_partitions/get_cluster_partitions_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cluster_partitions - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterPartitionsReader is a Reader for the GetClusterPartitions structure. -type GetClusterPartitionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterPartitionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterPartitionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterPartitionsDefault(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 - } -} - -// NewGetClusterPartitionsOK creates a GetClusterPartitionsOK with default headers values -func NewGetClusterPartitionsOK() *GetClusterPartitionsOK { - return &GetClusterPartitionsOK{} -} - -/* -GetClusterPartitionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterPartitionsOK struct { - Payload []*models.ClusterPartition -} - -// IsSuccess returns true when this get cluster partitions o k response has a 2xx status code -func (o *GetClusterPartitionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster partitions o k response has a 3xx status code -func (o *GetClusterPartitionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster partitions o k response has a 4xx status code -func (o *GetClusterPartitionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster partitions o k response has a 5xx status code -func (o *GetClusterPartitionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster partitions o k response a status code equal to that given -func (o *GetClusterPartitionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster partitions o k response -func (o *GetClusterPartitionsOK) Code() int { - return 200 -} - -func (o *GetClusterPartitionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions][%d] getClusterPartitionsOK %s", 200, payload) -} - -func (o *GetClusterPartitionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions][%d] getClusterPartitionsOK %s", 200, payload) -} - -func (o *GetClusterPartitionsOK) GetPayload() []*models.ClusterPartition { - return o.Payload -} - -func (o *GetClusterPartitionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterPartitionsDefault creates a GetClusterPartitionsDefault with default headers values -func NewGetClusterPartitionsDefault(code int) *GetClusterPartitionsDefault { - return &GetClusterPartitionsDefault{ - _statusCode: code, - } -} - -/* -GetClusterPartitionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterPartitionsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster partitions default response has a 2xx status code -func (o *GetClusterPartitionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster partitions default response has a 3xx status code -func (o *GetClusterPartitionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster partitions default response has a 4xx status code -func (o *GetClusterPartitionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster partitions default response has a 5xx status code -func (o *GetClusterPartitionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster partitions default response a status code equal to that given -func (o *GetClusterPartitionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster partitions default response -func (o *GetClusterPartitionsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterPartitionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions][%d] GetClusterPartitions default %s", o._statusCode, payload) -} - -func (o *GetClusterPartitionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusterPartitions][%d] GetClusterPartitions default %s", o._statusCode, payload) -} - -func (o *GetClusterPartitionsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterPartitionsDefault) 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/clusters/change_service_state_parameters.go b/v1/client/clusters/change_service_state_parameters.go deleted file mode 100644 index 5b021f0f..00000000 --- a/v1/client/clusters/change_service_state_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewChangeServiceStateParams creates a new ChangeServiceStateParams 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 NewChangeServiceStateParams() *ChangeServiceStateParams { - return &ChangeServiceStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewChangeServiceStateParamsWithTimeout creates a new ChangeServiceStateParams object -// with the ability to set a timeout on a request. -func NewChangeServiceStateParamsWithTimeout(timeout time.Duration) *ChangeServiceStateParams { - return &ChangeServiceStateParams{ - timeout: timeout, - } -} - -// NewChangeServiceStateParamsWithContext creates a new ChangeServiceStateParams object -// with the ability to set a context for a request. -func NewChangeServiceStateParamsWithContext(ctx context.Context) *ChangeServiceStateParams { - return &ChangeServiceStateParams{ - Context: ctx, - } -} - -// NewChangeServiceStateParamsWithHTTPClient creates a new ChangeServiceStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewChangeServiceStateParamsWithHTTPClient(client *http.Client) *ChangeServiceStateParams { - return &ChangeServiceStateParams{ - HTTPClient: client, - } -} - -/* -ChangeServiceStateParams contains all the parameters to send to the API endpoint - - for the change service state operation. - - Typically these are written to a http.Request. -*/ -type ChangeServiceStateParams struct { - - // Body. - Body *models.ChangeServiceStateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the change service state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeServiceStateParams) WithDefaults() *ChangeServiceStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the change service state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeServiceStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the change service state params -func (o *ChangeServiceStateParams) WithTimeout(timeout time.Duration) *ChangeServiceStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the change service state params -func (o *ChangeServiceStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the change service state params -func (o *ChangeServiceStateParams) WithContext(ctx context.Context) *ChangeServiceStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the change service state params -func (o *ChangeServiceStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the change service state params -func (o *ChangeServiceStateParams) WithHTTPClient(client *http.Client) *ChangeServiceStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the change service state params -func (o *ChangeServiceStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the change service state params -func (o *ChangeServiceStateParams) WithBody(body *models.ChangeServiceStateParameters) *ChangeServiceStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the change service state params -func (o *ChangeServiceStateParams) SetBody(body *models.ChangeServiceStateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ChangeServiceStateParams) 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/clusters/change_service_state_responses.go b/v1/client/clusters/change_service_state_responses.go deleted file mode 100644 index b203b2fb..00000000 --- a/v1/client/clusters/change_service_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ChangeServiceStateReader is a Reader for the ChangeServiceState structure. -type ChangeServiceStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ChangeServiceStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewChangeServiceStateAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewChangeServiceStateDefault(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 - } -} - -// NewChangeServiceStateAccepted creates a ChangeServiceStateAccepted with default headers values -func NewChangeServiceStateAccepted() *ChangeServiceStateAccepted { - return &ChangeServiceStateAccepted{} -} - -/* -ChangeServiceStateAccepted describes a response with status code 202, with default header values. - -Success -*/ -type ChangeServiceStateAccepted struct { - Payload *models.ChangeServiceStateResult -} - -// IsSuccess returns true when this change service state accepted response has a 2xx status code -func (o *ChangeServiceStateAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this change service state accepted response has a 3xx status code -func (o *ChangeServiceStateAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this change service state accepted response has a 4xx status code -func (o *ChangeServiceStateAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this change service state accepted response has a 5xx status code -func (o *ChangeServiceStateAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this change service state accepted response a status code equal to that given -func (o *ChangeServiceStateAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the change service state accepted response -func (o *ChangeServiceStateAccepted) Code() int { - return 202 -} - -func (o *ChangeServiceStateAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/services/states][%d] changeServiceStateAccepted %s", 202, payload) -} - -func (o *ChangeServiceStateAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/services/states][%d] changeServiceStateAccepted %s", 202, payload) -} - -func (o *ChangeServiceStateAccepted) GetPayload() *models.ChangeServiceStateResult { - return o.Payload -} - -func (o *ChangeServiceStateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ChangeServiceStateResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewChangeServiceStateDefault creates a ChangeServiceStateDefault with default headers values -func NewChangeServiceStateDefault(code int) *ChangeServiceStateDefault { - return &ChangeServiceStateDefault{ - _statusCode: code, - } -} - -/* -ChangeServiceStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type ChangeServiceStateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this change service state default response has a 2xx status code -func (o *ChangeServiceStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this change service state default response has a 3xx status code -func (o *ChangeServiceStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this change service state default response has a 4xx status code -func (o *ChangeServiceStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this change service state default response has a 5xx status code -func (o *ChangeServiceStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this change service state default response a status code equal to that given -func (o *ChangeServiceStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the change service state default response -func (o *ChangeServiceStateDefault) Code() int { - return o._statusCode -} - -func (o *ChangeServiceStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/services/states][%d] ChangeServiceState default %s", o._statusCode, payload) -} - -func (o *ChangeServiceStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/services/states][%d] ChangeServiceState default %s", o._statusCode, payload) -} - -func (o *ChangeServiceStateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ChangeServiceStateDefault) 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/clusters/cluster_list_masters_parameters.go b/v1/client/clusters/cluster_list_masters_parameters.go deleted file mode 100644 index 108b0c1c..00000000 --- a/v1/client/clusters/cluster_list_masters_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewClusterListMastersParams creates a new ClusterListMastersParams 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 NewClusterListMastersParams() *ClusterListMastersParams { - return &ClusterListMastersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewClusterListMastersParamsWithTimeout creates a new ClusterListMastersParams object -// with the ability to set a timeout on a request. -func NewClusterListMastersParamsWithTimeout(timeout time.Duration) *ClusterListMastersParams { - return &ClusterListMastersParams{ - timeout: timeout, - } -} - -// NewClusterListMastersParamsWithContext creates a new ClusterListMastersParams object -// with the ability to set a context for a request. -func NewClusterListMastersParamsWithContext(ctx context.Context) *ClusterListMastersParams { - return &ClusterListMastersParams{ - Context: ctx, - } -} - -// NewClusterListMastersParamsWithHTTPClient creates a new ClusterListMastersParams object -// with the ability to set a custom HTTPClient for a request. -func NewClusterListMastersParamsWithHTTPClient(client *http.Client) *ClusterListMastersParams { - return &ClusterListMastersParams{ - HTTPClient: client, - } -} - -/* -ClusterListMastersParams contains all the parameters to send to the API endpoint - - for the cluster list masters operation. - - Typically these are written to a http.Request. -*/ -type ClusterListMastersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cluster list masters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClusterListMastersParams) WithDefaults() *ClusterListMastersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cluster list masters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClusterListMastersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cluster list masters params -func (o *ClusterListMastersParams) WithTimeout(timeout time.Duration) *ClusterListMastersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cluster list masters params -func (o *ClusterListMastersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cluster list masters params -func (o *ClusterListMastersParams) WithContext(ctx context.Context) *ClusterListMastersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cluster list masters params -func (o *ClusterListMastersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cluster list masters params -func (o *ClusterListMastersParams) WithHTTPClient(client *http.Client) *ClusterListMastersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cluster list masters params -func (o *ClusterListMastersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ClusterListMastersParams) 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/clusters/cluster_list_masters_responses.go b/v1/client/clusters/cluster_list_masters_responses.go deleted file mode 100644 index d0cd34e3..00000000 --- a/v1/client/clusters/cluster_list_masters_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ClusterListMastersReader is a Reader for the ClusterListMasters structure. -type ClusterListMastersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ClusterListMastersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewClusterListMastersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewClusterListMastersDefault(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 - } -} - -// NewClusterListMastersOK creates a ClusterListMastersOK with default headers values -func NewClusterListMastersOK() *ClusterListMastersOK { - return &ClusterListMastersOK{} -} - -/* -ClusterListMastersOK describes a response with status code 200, with default header values. - -Success -*/ -type ClusterListMastersOK struct { - Payload *models.ClusterListMasterResp -} - -// IsSuccess returns true when this cluster list masters o k response has a 2xx status code -func (o *ClusterListMastersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cluster list masters o k response has a 3xx status code -func (o *ClusterListMastersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cluster list masters o k response has a 4xx status code -func (o *ClusterListMastersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cluster list masters o k response has a 5xx status code -func (o *ClusterListMastersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cluster list masters o k response a status code equal to that given -func (o *ClusterListMastersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cluster list masters o k response -func (o *ClusterListMastersOK) Code() int { - return 200 -} - -func (o *ClusterListMastersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /gandalf/listMasters][%d] clusterListMastersOK %s", 200, payload) -} - -func (o *ClusterListMastersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /gandalf/listMasters][%d] clusterListMastersOK %s", 200, payload) -} - -func (o *ClusterListMastersOK) GetPayload() *models.ClusterListMasterResp { - return o.Payload -} - -func (o *ClusterListMastersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterListMasterResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewClusterListMastersDefault creates a ClusterListMastersDefault with default headers values -func NewClusterListMastersDefault(code int) *ClusterListMastersDefault { - return &ClusterListMastersDefault{ - _statusCode: code, - } -} - -/* -ClusterListMastersDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ClusterListMastersDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this cluster list masters default response has a 2xx status code -func (o *ClusterListMastersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cluster list masters default response has a 3xx status code -func (o *ClusterListMastersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cluster list masters default response has a 4xx status code -func (o *ClusterListMastersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cluster list masters default response has a 5xx status code -func (o *ClusterListMastersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cluster list masters default response a status code equal to that given -func (o *ClusterListMastersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cluster list masters default response -func (o *ClusterListMastersDefault) Code() int { - return o._statusCode -} - -func (o *ClusterListMastersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /gandalf/listMasters][%d] ClusterListMasters default %s", o._statusCode, payload) -} - -func (o *ClusterListMastersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /gandalf/listMasters][%d] ClusterListMasters default %s", o._statusCode, payload) -} - -func (o *ClusterListMastersDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ClusterListMastersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/clusters_client.go b/v1/client/clusters/clusters_client.go deleted file mode 100644 index 772292e0..00000000 --- a/v1/client/clusters/clusters_client.go +++ /dev/null @@ -1,1731 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new clusters API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new clusters API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new clusters API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for clusters API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ChangeServiceState(params *ChangeServiceStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangeServiceStateAccepted, error) - - ClusterListMasters(params *ClusterListMastersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterListMastersOK, error) - - CreateCloudCluster(params *CreateCloudClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudClusterAccepted, error) - - CreatePhysicalCluster(params *CreatePhysicalClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePhysicalClusterAccepted, error) - - CreateVirtualCluster(params *CreateVirtualClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVirtualClusterAccepted, error) - - DestroyCluster(params *DestroyClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DestroyClusterNoContent, error) - - DownloadSnmpMibs(params *DownloadSnmpMibsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadSnmpMibsOK, error) - - ExpandCloudCluster(params *ExpandCloudClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandCloudClusterAccepted, error) - - ExpandPhysicalCluster(params *ExpandPhysicalClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandPhysicalClusterAccepted, error) - - GetBackgroundActivitySchedule(params *GetBackgroundActivityScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackgroundActivityScheduleOK, error) - - GetClientSubnetWhitelist(params *GetClientSubnetWhitelistParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClientSubnetWhitelistOK, error) - - GetClusterCreationProgress(params *GetClusterCreationProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterCreationProgressOK, error) - - GetClusterKeys(params *GetClusterKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterKeysOK, error) - - GetClusterPlatforms(params *GetClusterPlatformsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPlatformsOK, error) - - GetClusterPublicKey(params *GetClusterPublicKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPublicKeyOK, error) - - GetClusterStats(params *GetClusterStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStatsOK, error) - - GetClusterSubnets(params *GetClusterSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterSubnetsOK, error) - - GetClusterUpgradeStatus(params *GetClusterUpgradeStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterUpgradeStatusOK, error) - - GetExternalClientSubnets(params *GetExternalClientSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalClientSubnetsOK, error) - - GetIoPreferentialTier(params *GetIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIoPreferentialTierOK, error) - - GetIoPreferentialTierMixin0(params *GetIoPreferentialTierMixin0Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIoPreferentialTierMixin0OK, error) - - GetNFSExportPaths(params *GetNFSExportPathsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNFSExportPathsOK, error) - - GetNtpServers(params *GetNtpServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNtpServersOK, error) - - GetProxyServers(params *GetProxyServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProxyServersOK, error) - - GetServiceGflag(params *GetServiceGflagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceGflagOK, error) - - ListServiceStates(params *ListServiceStatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServiceStatesOK, error) - - PutIoPreferentialTier(params *PutIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutIoPreferentialTierOK, error) - - RemoveNode(params *RemoveNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveNodeNoContent, error) - - RemoveProxyServer(params *RemoveProxyServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveProxyServerNoContent, error) - - UpdateBackgroundActivitySchedule(params *UpdateBackgroundActivityScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackgroundActivityScheduleOK, error) - - UpdateClientSubnetWhitelist(params *UpdateClientSubnetWhitelistParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClientSubnetWhitelistOK, error) - - UpdateClusterSubnets(params *UpdateClusterSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterSubnetsOK, error) - - UpdateExternalClientSubnets(params *UpdateExternalClientSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalClientSubnetsOK, error) - - UpdateIoPreferentialTier(params *UpdateIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIoPreferentialTierOK, error) - - UpdateNtpServers(params *UpdateNtpServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNtpServersOK, error) - - UpdateProxyServer(params *UpdateProxyServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProxyServerOK, error) - - UpdateServiceFlag(params *UpdateServiceFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateServiceFlagOK, error) - - UpdateServiceGflag(params *UpdateServiceGflagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateServiceGflagOK, error) - - UpgradeCluster(params *UpgradeClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeClusterAccepted, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - ChangeServiceState changes the state of one or more services on a cohesity cluster - - Sends a request to either stop, start, or restart one or more of the services - -on a Cohesity Cluster and returns a message describing the result. - -WARNING: This is a destructive operation. -*/ -func (a *Client) ChangeServiceState(params *ChangeServiceStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangeServiceStateAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewChangeServiceStateParams() - } - op := &runtime.ClientOperation{ - ID: "ChangeServiceState", - Method: "POST", - PathPattern: "/public/clusters/services/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ChangeServiceStateReader{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.(*ChangeServiceStateAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ChangeServiceStateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ClusterListMasters tos fetch list of master nodes for all components - -Returns the list of master nodes for all components. -*/ -func (a *Client) ClusterListMasters(params *ClusterListMastersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterListMastersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewClusterListMastersParams() - } - op := &runtime.ClientOperation{ - ID: "ClusterListMasters", - Method: "GET", - PathPattern: "/gandalf/listMasters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ClusterListMastersReader{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.(*ClusterListMastersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ClusterListMastersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateCloudCluster creates a new cloud edition cohesity cluster - - Sends a request to create a new Cloud Edition Cohesity Cluster and returns - -the IDs, name, and software version of the new cluster. Also returns the -status of each node. -*/ -func (a *Client) CreateCloudCluster(params *CreateCloudClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCloudClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCloudCluster", - Method: "POST", - PathPattern: "/public/clusters/cloudEdition", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCloudClusterReader{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.(*CreateCloudClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCloudClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreatePhysicalCluster creates a new physical edition cohesity cluster - - Sends a request to create a new Physical Edition Cohesity Cluster and returns - -the IDs, name, and software version of the new cluster. Also returns the -status of each node. -*/ -func (a *Client) CreatePhysicalCluster(params *CreatePhysicalClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePhysicalClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreatePhysicalClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreatePhysicalCluster", - Method: "POST", - PathPattern: "/public/clusters/physicalEdition", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreatePhysicalClusterReader{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.(*CreatePhysicalClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreatePhysicalClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateVirtualCluster creates a new virtual edition cohesity cluster - - Sends a request to create a new Virtual Edition Cohesity Cluster and returns - -the IDs, name and software version of the new cluster. -*/ -func (a *Client) CreateVirtualCluster(params *CreateVirtualClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVirtualClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateVirtualClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreateVirtualCluster", - Method: "POST", - PathPattern: "/public/clusters/virtualEdition", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateVirtualClusterReader{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.(*CreateVirtualClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateVirtualClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DestroyCluster destroys a cohesity cluster - - Sends a request to destroy a Cohesity Cluster and returns some information - -about the operation and each Node. - -WARNING: This is a destructive operation. -*/ -func (a *Client) DestroyCluster(params *DestroyClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DestroyClusterNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDestroyClusterParams() - } - op := &runtime.ClientOperation{ - ID: "DestroyCluster", - Method: "DELETE", - PathPattern: "/public/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DestroyClusterReader{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.(*DestroyClusterNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DestroyClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadSnmpMibs downloads the s n m p mibs file from the cluster - -Returns the SNMP Mibs file from the cluster. -*/ -func (a *Client) DownloadSnmpMibs(params *DownloadSnmpMibsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadSnmpMibsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadSnmpMibsParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadSnmpMibs", - Method: "GET", - PathPattern: "/snmp/mibsFile", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadSnmpMibsReader{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.(*DownloadSnmpMibsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadSnmpMibsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ExpandCloudCluster expands a cloud edition cohesity cluster - - Sends a request to expand a Cloud Edition Cohesity Cluster and returns some - -information about the request and each new Node. -*/ -func (a *Client) ExpandCloudCluster(params *ExpandCloudClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandCloudClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExpandCloudClusterParams() - } - op := &runtime.ClientOperation{ - ID: "ExpandCloudCluster", - Method: "POST", - PathPattern: "/public/clusters/cloudEdition/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ExpandCloudClusterReader{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.(*ExpandCloudClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ExpandCloudClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ExpandPhysicalCluster expands a physical edition cohesity cluster - - Sends a request to expand a Physical Edition Cohesity Cluster and returns some - -information about the request and each new Node. -*/ -func (a *Client) ExpandPhysicalCluster(params *ExpandPhysicalClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandPhysicalClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExpandPhysicalClusterParams() - } - op := &runtime.ClientOperation{ - ID: "ExpandPhysicalCluster", - Method: "POST", - PathPattern: "/public/clusters/physicalEdition/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ExpandPhysicalClusterReader{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.(*ExpandPhysicalClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ExpandPhysicalClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBackgroundActivitySchedule gets the apollo throttling schedule - -Sends a request to get the apollo throttling settings applied for the cluster. -*/ -func (a *Client) GetBackgroundActivitySchedule(params *GetBackgroundActivityScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackgroundActivityScheduleOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBackgroundActivityScheduleParams() - } - op := &runtime.ClientOperation{ - ID: "GetBackgroundActivitySchedule", - Method: "GET", - PathPattern: "/public/cluster/backgroundActivitySchedule", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBackgroundActivityScheduleReader{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.(*GetBackgroundActivityScheduleOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBackgroundActivityScheduleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClientSubnetWhitelist lists the client subnet whitelist for the cluster - -Returns the Client Subnet Whitelist for the cluster. -*/ -func (a *Client) GetClientSubnetWhitelist(params *GetClientSubnetWhitelistParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClientSubnetWhitelistOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClientSubnetWhitelistParams() - } - op := &runtime.ClientOperation{ - ID: "GetClientSubnetWhitelist", - Method: "GET", - PathPattern: "/clientSubnetWhitelist", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClientSubnetWhitelistReader{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.(*GetClientSubnetWhitelistOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClientSubnetWhitelistDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetClusterCreationProgress checks the progress of the creation of a new cohesity cluster - - Sends a request to check the progress of the creation of a new Cohesity - -Cluster and returns some information about the creation process along -with an estimated time remaining and completion percentage. -*/ -func (a *Client) GetClusterCreationProgress(params *GetClusterCreationProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterCreationProgressOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterCreationProgressParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterCreationProgress", - Method: "GET", - PathPattern: "/public/clusters/creationProgress", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterCreationProgressReader{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.(*GetClusterCreationProgressOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterCreationProgressDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterKeys lists the public keys for the cluster - -Returns the Public Keys for the cluster. -*/ -func (a *Client) GetClusterKeys(params *GetClusterKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterKeysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterKeysParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterKeys", - Method: "GET", - PathPattern: "/public/cluster/keys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterKeysReader{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.(*GetClusterKeysOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterKeysDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterPlatforms lists the cluster platform types for all nodes - -Returns the PlatformParam object for the cluster. -*/ -func (a *Client) GetClusterPlatforms(params *GetClusterPlatformsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPlatformsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterPlatformsParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterPlatforms", - Method: "GET", - PathPattern: "/clusterPlatforms", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterPlatformsReader{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.(*GetClusterPlatformsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterPlatformsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterPublicKey lists the public key for the cluster - -Returns the Public Key for the cluster. -*/ -func (a *Client) GetClusterPublicKey(params *GetClusterPublicKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPublicKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterPublicKeyParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterPublicKey", - Method: "GET", - PathPattern: "/clusterPublicKey", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterPublicKeyReader{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.(*GetClusterPublicKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterPublicKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterStats lists the cluster stats - -Returns the top level stats for the cluster. -*/ -func (a *Client) GetClusterStats(params *GetClusterStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterStats", - Method: "GET", - PathPattern: "/clusterStats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterStatsReader{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.(*GetClusterStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterSubnets lists the cluster subnet - -Returns the subnet object for the cluster. -*/ -func (a *Client) GetClusterSubnets(params *GetClusterSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterSubnetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterSubnetsParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterSubnets", - Method: "GET", - PathPattern: "/clusterSubnets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterSubnetsReader{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.(*GetClusterSubnetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterSubnetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterUpgradeStatus lists the cluster upgrade status - -Returns the upgrade status for the cluster. -*/ -func (a *Client) GetClusterUpgradeStatus(params *GetClusterUpgradeStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterUpgradeStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterUpgradeStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterUpgradeStatus", - Method: "GET", - PathPattern: "/clusterUpgradeStatus", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterUpgradeStatusReader{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.(*GetClusterUpgradeStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterUpgradeStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalClientSubnets lists the external client subnets for the cluster - -Returns the external Client Subnets for the cluster. -*/ -func (a *Client) GetExternalClientSubnets(params *GetExternalClientSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalClientSubnetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalClientSubnetsParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalClientSubnets", - Method: "GET", - PathPattern: "/public/externalClientSubnets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalClientSubnetsReader{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.(*GetExternalClientSubnetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalClientSubnetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIoPreferentialTier lists the i o preferential tier for the cluster - -Returns the IO Preferential Tier for the cluster. -*/ -func (a *Client) GetIoPreferentialTier(params *GetIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIoPreferentialTierOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIoPreferentialTierParams() - } - op := &runtime.ClientOperation{ - ID: "GetIoPreferentialTier", - Method: "GET", - PathPattern: "/ioPreferentialTier", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIoPreferentialTierReader{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.(*GetIoPreferentialTierOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIoPreferentialTierDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIoPreferentialTierMixin0 returns the i o preferential tiers of the cluster - -Get the IO preferential tiers of the cluster. -*/ -func (a *Client) GetIoPreferentialTierMixin0(params *GetIoPreferentialTierMixin0Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIoPreferentialTierMixin0OK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIoPreferentialTierMixin0Params() - } - op := &runtime.ClientOperation{ - ID: "GetIoPreferentialTierMixin0", - Method: "GET", - PathPattern: "/public/clusters/ioPreferentialTier", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIoPreferentialTierMixin0Reader{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.(*GetIoPreferentialTierMixin0OK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIoPreferentialTierMixin0Default) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNFSExportPaths lists the n f s export path list for the cluster - -Returns the NFS Export Path List for the cluster. -*/ -func (a *Client) GetNFSExportPaths(params *GetNFSExportPathsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNFSExportPathsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNFSExportPathsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNFSExportPaths", - Method: "GET", - PathPattern: "/nfsExportPaths", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNFSExportPathsReader{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.(*GetNFSExportPathsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNFSExportPathsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNtpServers lists the n t p servers for the cluster - -Returns the NTP Servers for the cluster. -*/ -func (a *Client) GetNtpServers(params *GetNtpServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNtpServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNtpServersParams() - } - op := &runtime.ClientOperation{ - ID: "GetNtpServers", - Method: "GET", - PathPattern: "/ntpServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNtpServersReader{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.(*GetNtpServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNtpServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProxyServers lists the proxy servers for the cluster - -Returns the Proxy Servers for the cluster. -*/ -func (a *Client) GetProxyServers(params *GetProxyServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProxyServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProxyServersParams() - } - op := &runtime.ClientOperation{ - ID: "GetProxyServers", - Method: "GET", - PathPattern: "/proxyServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProxyServersReader{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.(*GetProxyServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProxyServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetServiceGflag gets the gflags of a cohesity cluster - -Sends a request to get the gflags of the current Cluster. -*/ -func (a *Client) GetServiceGflag(params *GetServiceGflagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetServiceGflagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetServiceGflagParams() - } - op := &runtime.ClientOperation{ - ID: "GetServiceGflag", - Method: "GET", - PathPattern: "/clusters/gflag", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetServiceGflagReader{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.(*GetServiceGflagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetServiceGflagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListServiceStates lists the states of the services on the cluster - -Sends a request to list the states of all of the services on a Cluster. -*/ -func (a *Client) ListServiceStates(params *ListServiceStatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServiceStatesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListServiceStatesParams() - } - op := &runtime.ClientOperation{ - ID: "ListServiceStates", - Method: "GET", - PathPattern: "/public/clusters/services/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListServiceStatesReader{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.(*ListServiceStatesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListServiceStatesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PutIoPreferentialTier updates the i o preferential tiers and return the updated i o preferential tiers of the cluster - -Update the IO preferential tiers of the cluster. -*/ -func (a *Client) PutIoPreferentialTier(params *PutIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutIoPreferentialTierOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutIoPreferentialTierParams() - } - op := &runtime.ClientOperation{ - ID: "PutIoPreferentialTier", - Method: "PUT", - PathPattern: "/public/clusters/ioPreferentialTier", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PutIoPreferentialTierReader{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.(*PutIoPreferentialTierOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PutIoPreferentialTierDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RemoveNode removes a node from a cohesity cluster - - Sends a request to remove a Node from a Cohesity Cluster. - -WARNING: This is a destructive operation. -*/ -func (a *Client) RemoveNode(params *RemoveNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveNodeNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveNodeParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveNode", - Method: "DELETE", - PathPattern: "/public/clusters/nodes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveNodeReader{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.(*RemoveNodeNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveNodeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveProxyServer removes specified proxy server from the cluster - -Returns delete status upon completion. -*/ -func (a *Client) RemoveProxyServer(params *RemoveProxyServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveProxyServerNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveProxyServerParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveProxyServer", - Method: "DELETE", - PathPattern: "/proxyServers/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveProxyServerReader{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.(*RemoveProxyServerNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveProxyServerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateBackgroundActivitySchedule updates the apollo throttling schedule - - Sends a request to update the apollo throttling settings for the cluster. - -Returns the updated apollo throttling settings of the cluster. -*/ -func (a *Client) UpdateBackgroundActivitySchedule(params *UpdateBackgroundActivityScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBackgroundActivityScheduleOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateBackgroundActivityScheduleParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateBackgroundActivitySchedule", - Method: "PUT", - PathPattern: "/public/cluster/backgroundActivitySchedule", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateBackgroundActivityScheduleReader{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.(*UpdateBackgroundActivityScheduleOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateBackgroundActivityScheduleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateClientSubnetWhitelist updates the client subnet whitelist of the cluster - -Returns the updated Client Subnet Whitelist of the cluster. -*/ -func (a *Client) UpdateClientSubnetWhitelist(params *UpdateClientSubnetWhitelistParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClientSubnetWhitelistOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateClientSubnetWhitelistParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateClientSubnetWhitelist", - Method: "PUT", - PathPattern: "/clientSubnetWhitelist", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateClientSubnetWhitelistReader{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.(*UpdateClientSubnetWhitelistOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateClientSubnetWhitelistDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateClusterSubnets updates the cluster subnets - -Returns the updated Cluster Subnets. -*/ -func (a *Client) UpdateClusterSubnets(params *UpdateClusterSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterSubnetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateClusterSubnetsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateClusterSubnets", - Method: "PUT", - PathPattern: "/clusterSubnets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateClusterSubnetsReader{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.(*UpdateClusterSubnetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateClusterSubnetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateExternalClientSubnets updates the external client subnet of the cluster - -Returns the updated external Client Subnets of the cluster. -*/ -func (a *Client) UpdateExternalClientSubnets(params *UpdateExternalClientSubnetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalClientSubnetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateExternalClientSubnetsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateExternalClientSubnets", - Method: "PUT", - PathPattern: "/public/externalClientSubnets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateExternalClientSubnetsReader{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.(*UpdateExternalClientSubnetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateExternalClientSubnetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIoPreferentialTier updates the i o preferential tier of the cluster - -Returns the updated IO Preferential Tier of the cluster. -*/ -func (a *Client) UpdateIoPreferentialTier(params *UpdateIoPreferentialTierParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIoPreferentialTierOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIoPreferentialTierParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIoPreferentialTier", - Method: "PUT", - PathPattern: "/ioPreferentialTier", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIoPreferentialTierReader{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.(*UpdateIoPreferentialTierOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIoPreferentialTierDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateNtpServers updates the n t p servers of the cluster - -Returns the updated NTP Servers of the cluster. -*/ -func (a *Client) UpdateNtpServers(params *UpdateNtpServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNtpServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateNtpServersParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateNtpServers", - Method: "PUT", - PathPattern: "/ntpServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateNtpServersReader{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.(*UpdateNtpServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateNtpServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProxyServer updates the proxy servers of the cluster - -Returns the updated Proxy Server on the cluster. -*/ -func (a *Client) UpdateProxyServer(params *UpdateProxyServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProxyServerOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProxyServerParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProxyServer", - Method: "POST", - PathPattern: "/proxyServers/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProxyServerReader{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.(*UpdateProxyServerOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProxyServerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateServiceFlag updates the service flag on all the nodes of the cluster - -Returns the service flag update response of all the nodes on the cluster. -*/ -func (a *Client) UpdateServiceFlag(params *UpdateServiceFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateServiceFlagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateServiceFlagParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateServiceFlag", - Method: "POST", - PathPattern: "/flagz", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateServiceFlagReader{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.(*UpdateServiceFlagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateServiceFlagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateServiceGflag updates the gflags of a cohesity cluster - -Sends a request to update the gflags of the current Cluster. -*/ -func (a *Client) UpdateServiceGflag(params *UpdateServiceGflagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateServiceGflagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateServiceGflagParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateServiceGflag", - Method: "PUT", - PathPattern: "/clusters/gflag", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateServiceGflagReader{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.(*UpdateServiceGflagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateServiceGflagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpgradeCluster upgrades a cohesity cluster - - Sends a request to upgrade the software version of a Cohesity Cluster - -and returns a message specifying the result. Before using this, you need to -use the /public/packages endpoint to upload a new package to the Cluster. -*/ -func (a *Client) UpgradeCluster(params *UpgradeClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeClusterAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradeClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradeCluster", - Method: "PUT", - PathPattern: "/public/clusters/software", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradeClusterReader{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.(*UpgradeClusterAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradeClusterDefault) - 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/clusters/create_cloud_cluster_parameters.go b/v1/client/clusters/create_cloud_cluster_parameters.go deleted file mode 100644 index 1f997058..00000000 --- a/v1/client/clusters/create_cloud_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateCloudClusterParams creates a new CreateCloudClusterParams 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 NewCreateCloudClusterParams() *CreateCloudClusterParams { - return &CreateCloudClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCloudClusterParamsWithTimeout creates a new CreateCloudClusterParams object -// with the ability to set a timeout on a request. -func NewCreateCloudClusterParamsWithTimeout(timeout time.Duration) *CreateCloudClusterParams { - return &CreateCloudClusterParams{ - timeout: timeout, - } -} - -// NewCreateCloudClusterParamsWithContext creates a new CreateCloudClusterParams object -// with the ability to set a context for a request. -func NewCreateCloudClusterParamsWithContext(ctx context.Context) *CreateCloudClusterParams { - return &CreateCloudClusterParams{ - Context: ctx, - } -} - -// NewCreateCloudClusterParamsWithHTTPClient creates a new CreateCloudClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCloudClusterParamsWithHTTPClient(client *http.Client) *CreateCloudClusterParams { - return &CreateCloudClusterParams{ - HTTPClient: client, - } -} - -/* -CreateCloudClusterParams contains all the parameters to send to the API endpoint - - for the create cloud cluster operation. - - Typically these are written to a http.Request. -*/ -type CreateCloudClusterParams struct { - - // Body. - Body *models.CreateCloudClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create cloud cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudClusterParams) WithDefaults() *CreateCloudClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create cloud cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create cloud cluster params -func (o *CreateCloudClusterParams) WithTimeout(timeout time.Duration) *CreateCloudClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create cloud cluster params -func (o *CreateCloudClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create cloud cluster params -func (o *CreateCloudClusterParams) WithContext(ctx context.Context) *CreateCloudClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create cloud cluster params -func (o *CreateCloudClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create cloud cluster params -func (o *CreateCloudClusterParams) WithHTTPClient(client *http.Client) *CreateCloudClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create cloud cluster params -func (o *CreateCloudClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create cloud cluster params -func (o *CreateCloudClusterParams) WithBody(body *models.CreateCloudClusterParameters) *CreateCloudClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create cloud cluster params -func (o *CreateCloudClusterParams) SetBody(body *models.CreateCloudClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCloudClusterParams) 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/clusters/create_cloud_cluster_responses.go b/v1/client/clusters/create_cloud_cluster_responses.go deleted file mode 100644 index 9d7f11cd..00000000 --- a/v1/client/clusters/create_cloud_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateCloudClusterReader is a Reader for the CreateCloudCluster structure. -type CreateCloudClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCloudClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreateCloudClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCloudClusterDefault(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 - } -} - -// NewCreateCloudClusterAccepted creates a CreateCloudClusterAccepted with default headers values -func NewCreateCloudClusterAccepted() *CreateCloudClusterAccepted { - return &CreateCloudClusterAccepted{} -} - -/* -CreateCloudClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type CreateCloudClusterAccepted struct { - Payload *models.CreateClusterResult -} - -// IsSuccess returns true when this create cloud cluster accepted response has a 2xx status code -func (o *CreateCloudClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create cloud cluster accepted response has a 3xx status code -func (o *CreateCloudClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create cloud cluster accepted response has a 4xx status code -func (o *CreateCloudClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create cloud cluster accepted response has a 5xx status code -func (o *CreateCloudClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create cloud cluster accepted response a status code equal to that given -func (o *CreateCloudClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create cloud cluster accepted response -func (o *CreateCloudClusterAccepted) Code() int { - return 202 -} - -func (o *CreateCloudClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition][%d] createCloudClusterAccepted %s", 202, payload) -} - -func (o *CreateCloudClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition][%d] createCloudClusterAccepted %s", 202, payload) -} - -func (o *CreateCloudClusterAccepted) GetPayload() *models.CreateClusterResult { - return o.Payload -} - -func (o *CreateCloudClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateCloudClusterDefault creates a CreateCloudClusterDefault with default headers values -func NewCreateCloudClusterDefault(code int) *CreateCloudClusterDefault { - return &CreateCloudClusterDefault{ - _statusCode: code, - } -} - -/* -CreateCloudClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCloudClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create cloud cluster default response has a 2xx status code -func (o *CreateCloudClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create cloud cluster default response has a 3xx status code -func (o *CreateCloudClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create cloud cluster default response has a 4xx status code -func (o *CreateCloudClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create cloud cluster default response has a 5xx status code -func (o *CreateCloudClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create cloud cluster default response a status code equal to that given -func (o *CreateCloudClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create cloud cluster default response -func (o *CreateCloudClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreateCloudClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition][%d] CreateCloudCluster default %s", o._statusCode, payload) -} - -func (o *CreateCloudClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition][%d] CreateCloudCluster default %s", o._statusCode, payload) -} - -func (o *CreateCloudClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateCloudClusterDefault) 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/clusters/create_physical_cluster_parameters.go b/v1/client/clusters/create_physical_cluster_parameters.go deleted file mode 100644 index 5e9ef442..00000000 --- a/v1/client/clusters/create_physical_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreatePhysicalClusterParams creates a new CreatePhysicalClusterParams 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 NewCreatePhysicalClusterParams() *CreatePhysicalClusterParams { - return &CreatePhysicalClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePhysicalClusterParamsWithTimeout creates a new CreatePhysicalClusterParams object -// with the ability to set a timeout on a request. -func NewCreatePhysicalClusterParamsWithTimeout(timeout time.Duration) *CreatePhysicalClusterParams { - return &CreatePhysicalClusterParams{ - timeout: timeout, - } -} - -// NewCreatePhysicalClusterParamsWithContext creates a new CreatePhysicalClusterParams object -// with the ability to set a context for a request. -func NewCreatePhysicalClusterParamsWithContext(ctx context.Context) *CreatePhysicalClusterParams { - return &CreatePhysicalClusterParams{ - Context: ctx, - } -} - -// NewCreatePhysicalClusterParamsWithHTTPClient creates a new CreatePhysicalClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreatePhysicalClusterParamsWithHTTPClient(client *http.Client) *CreatePhysicalClusterParams { - return &CreatePhysicalClusterParams{ - HTTPClient: client, - } -} - -/* -CreatePhysicalClusterParams contains all the parameters to send to the API endpoint - - for the create physical cluster operation. - - Typically these are written to a http.Request. -*/ -type CreatePhysicalClusterParams struct { - - // Body. - Body *models.CreatePhysicalClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create physical cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePhysicalClusterParams) WithDefaults() *CreatePhysicalClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create physical cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePhysicalClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create physical cluster params -func (o *CreatePhysicalClusterParams) WithTimeout(timeout time.Duration) *CreatePhysicalClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create physical cluster params -func (o *CreatePhysicalClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create physical cluster params -func (o *CreatePhysicalClusterParams) WithContext(ctx context.Context) *CreatePhysicalClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create physical cluster params -func (o *CreatePhysicalClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create physical cluster params -func (o *CreatePhysicalClusterParams) WithHTTPClient(client *http.Client) *CreatePhysicalClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create physical cluster params -func (o *CreatePhysicalClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create physical cluster params -func (o *CreatePhysicalClusterParams) WithBody(body *models.CreatePhysicalClusterParameters) *CreatePhysicalClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create physical cluster params -func (o *CreatePhysicalClusterParams) SetBody(body *models.CreatePhysicalClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePhysicalClusterParams) 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/clusters/create_physical_cluster_responses.go b/v1/client/clusters/create_physical_cluster_responses.go deleted file mode 100644 index d1a6488f..00000000 --- a/v1/client/clusters/create_physical_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreatePhysicalClusterReader is a Reader for the CreatePhysicalCluster structure. -type CreatePhysicalClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePhysicalClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreatePhysicalClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreatePhysicalClusterDefault(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 - } -} - -// NewCreatePhysicalClusterAccepted creates a CreatePhysicalClusterAccepted with default headers values -func NewCreatePhysicalClusterAccepted() *CreatePhysicalClusterAccepted { - return &CreatePhysicalClusterAccepted{} -} - -/* -CreatePhysicalClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type CreatePhysicalClusterAccepted struct { - Payload *models.CreateClusterResult -} - -// IsSuccess returns true when this create physical cluster accepted response has a 2xx status code -func (o *CreatePhysicalClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create physical cluster accepted response has a 3xx status code -func (o *CreatePhysicalClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create physical cluster accepted response has a 4xx status code -func (o *CreatePhysicalClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create physical cluster accepted response has a 5xx status code -func (o *CreatePhysicalClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create physical cluster accepted response a status code equal to that given -func (o *CreatePhysicalClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create physical cluster accepted response -func (o *CreatePhysicalClusterAccepted) Code() int { - return 202 -} - -func (o *CreatePhysicalClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition][%d] createPhysicalClusterAccepted %s", 202, payload) -} - -func (o *CreatePhysicalClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition][%d] createPhysicalClusterAccepted %s", 202, payload) -} - -func (o *CreatePhysicalClusterAccepted) GetPayload() *models.CreateClusterResult { - return o.Payload -} - -func (o *CreatePhysicalClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePhysicalClusterDefault creates a CreatePhysicalClusterDefault with default headers values -func NewCreatePhysicalClusterDefault(code int) *CreatePhysicalClusterDefault { - return &CreatePhysicalClusterDefault{ - _statusCode: code, - } -} - -/* -CreatePhysicalClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreatePhysicalClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create physical cluster default response has a 2xx status code -func (o *CreatePhysicalClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create physical cluster default response has a 3xx status code -func (o *CreatePhysicalClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create physical cluster default response has a 4xx status code -func (o *CreatePhysicalClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create physical cluster default response has a 5xx status code -func (o *CreatePhysicalClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create physical cluster default response a status code equal to that given -func (o *CreatePhysicalClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create physical cluster default response -func (o *CreatePhysicalClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreatePhysicalClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition][%d] CreatePhysicalCluster default %s", o._statusCode, payload) -} - -func (o *CreatePhysicalClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition][%d] CreatePhysicalCluster default %s", o._statusCode, payload) -} - -func (o *CreatePhysicalClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreatePhysicalClusterDefault) 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/clusters/create_virtual_cluster_parameters.go b/v1/client/clusters/create_virtual_cluster_parameters.go deleted file mode 100644 index 74d31b13..00000000 --- a/v1/client/clusters/create_virtual_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateVirtualClusterParams creates a new CreateVirtualClusterParams 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 NewCreateVirtualClusterParams() *CreateVirtualClusterParams { - return &CreateVirtualClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVirtualClusterParamsWithTimeout creates a new CreateVirtualClusterParams object -// with the ability to set a timeout on a request. -func NewCreateVirtualClusterParamsWithTimeout(timeout time.Duration) *CreateVirtualClusterParams { - return &CreateVirtualClusterParams{ - timeout: timeout, - } -} - -// NewCreateVirtualClusterParamsWithContext creates a new CreateVirtualClusterParams object -// with the ability to set a context for a request. -func NewCreateVirtualClusterParamsWithContext(ctx context.Context) *CreateVirtualClusterParams { - return &CreateVirtualClusterParams{ - Context: ctx, - } -} - -// NewCreateVirtualClusterParamsWithHTTPClient creates a new CreateVirtualClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateVirtualClusterParamsWithHTTPClient(client *http.Client) *CreateVirtualClusterParams { - return &CreateVirtualClusterParams{ - HTTPClient: client, - } -} - -/* -CreateVirtualClusterParams contains all the parameters to send to the API endpoint - - for the create virtual cluster operation. - - Typically these are written to a http.Request. -*/ -type CreateVirtualClusterParams struct { - - // Body. - Body *models.CreateVirtualClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create virtual cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVirtualClusterParams) WithDefaults() *CreateVirtualClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create virtual cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVirtualClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create virtual cluster params -func (o *CreateVirtualClusterParams) WithTimeout(timeout time.Duration) *CreateVirtualClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create virtual cluster params -func (o *CreateVirtualClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create virtual cluster params -func (o *CreateVirtualClusterParams) WithContext(ctx context.Context) *CreateVirtualClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create virtual cluster params -func (o *CreateVirtualClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create virtual cluster params -func (o *CreateVirtualClusterParams) WithHTTPClient(client *http.Client) *CreateVirtualClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create virtual cluster params -func (o *CreateVirtualClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create virtual cluster params -func (o *CreateVirtualClusterParams) WithBody(body *models.CreateVirtualClusterParameters) *CreateVirtualClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create virtual cluster params -func (o *CreateVirtualClusterParams) SetBody(body *models.CreateVirtualClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVirtualClusterParams) 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/clusters/create_virtual_cluster_responses.go b/v1/client/clusters/create_virtual_cluster_responses.go deleted file mode 100644 index 9faca80a..00000000 --- a/v1/client/clusters/create_virtual_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateVirtualClusterReader is a Reader for the CreateVirtualCluster structure. -type CreateVirtualClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVirtualClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreateVirtualClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateVirtualClusterDefault(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 - } -} - -// NewCreateVirtualClusterAccepted creates a CreateVirtualClusterAccepted with default headers values -func NewCreateVirtualClusterAccepted() *CreateVirtualClusterAccepted { - return &CreateVirtualClusterAccepted{} -} - -/* -CreateVirtualClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type CreateVirtualClusterAccepted struct { - Payload *models.CreateClusterResult -} - -// IsSuccess returns true when this create virtual cluster accepted response has a 2xx status code -func (o *CreateVirtualClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create virtual cluster accepted response has a 3xx status code -func (o *CreateVirtualClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create virtual cluster accepted response has a 4xx status code -func (o *CreateVirtualClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create virtual cluster accepted response has a 5xx status code -func (o *CreateVirtualClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create virtual cluster accepted response a status code equal to that given -func (o *CreateVirtualClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create virtual cluster accepted response -func (o *CreateVirtualClusterAccepted) Code() int { - return 202 -} - -func (o *CreateVirtualClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/virtualEdition][%d] createVirtualClusterAccepted %s", 202, payload) -} - -func (o *CreateVirtualClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/virtualEdition][%d] createVirtualClusterAccepted %s", 202, payload) -} - -func (o *CreateVirtualClusterAccepted) GetPayload() *models.CreateClusterResult { - return o.Payload -} - -func (o *CreateVirtualClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVirtualClusterDefault creates a CreateVirtualClusterDefault with default headers values -func NewCreateVirtualClusterDefault(code int) *CreateVirtualClusterDefault { - return &CreateVirtualClusterDefault{ - _statusCode: code, - } -} - -/* -CreateVirtualClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateVirtualClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create virtual cluster default response has a 2xx status code -func (o *CreateVirtualClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create virtual cluster default response has a 3xx status code -func (o *CreateVirtualClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create virtual cluster default response has a 4xx status code -func (o *CreateVirtualClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create virtual cluster default response has a 5xx status code -func (o *CreateVirtualClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create virtual cluster default response a status code equal to that given -func (o *CreateVirtualClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create virtual cluster default response -func (o *CreateVirtualClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreateVirtualClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/virtualEdition][%d] CreateVirtualCluster default %s", o._statusCode, payload) -} - -func (o *CreateVirtualClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/virtualEdition][%d] CreateVirtualCluster default %s", o._statusCode, payload) -} - -func (o *CreateVirtualClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateVirtualClusterDefault) 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/clusters/destroy_cluster_parameters.go b/v1/client/clusters/destroy_cluster_parameters.go deleted file mode 100644 index 7ff41123..00000000 --- a/v1/client/clusters/destroy_cluster_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewDestroyClusterParams creates a new DestroyClusterParams 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 NewDestroyClusterParams() *DestroyClusterParams { - return &DestroyClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDestroyClusterParamsWithTimeout creates a new DestroyClusterParams object -// with the ability to set a timeout on a request. -func NewDestroyClusterParamsWithTimeout(timeout time.Duration) *DestroyClusterParams { - return &DestroyClusterParams{ - timeout: timeout, - } -} - -// NewDestroyClusterParamsWithContext creates a new DestroyClusterParams object -// with the ability to set a context for a request. -func NewDestroyClusterParamsWithContext(ctx context.Context) *DestroyClusterParams { - return &DestroyClusterParams{ - Context: ctx, - } -} - -// NewDestroyClusterParamsWithHTTPClient creates a new DestroyClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewDestroyClusterParamsWithHTTPClient(client *http.Client) *DestroyClusterParams { - return &DestroyClusterParams{ - HTTPClient: client, - } -} - -/* -DestroyClusterParams contains all the parameters to send to the API endpoint - - for the destroy cluster operation. - - Typically these are written to a http.Request. -*/ -type DestroyClusterParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the destroy cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DestroyClusterParams) WithDefaults() *DestroyClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the destroy cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DestroyClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the destroy cluster params -func (o *DestroyClusterParams) WithTimeout(timeout time.Duration) *DestroyClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the destroy cluster params -func (o *DestroyClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the destroy cluster params -func (o *DestroyClusterParams) WithContext(ctx context.Context) *DestroyClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the destroy cluster params -func (o *DestroyClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the destroy cluster params -func (o *DestroyClusterParams) WithHTTPClient(client *http.Client) *DestroyClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the destroy cluster params -func (o *DestroyClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DestroyClusterParams) 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/clusters/destroy_cluster_responses.go b/v1/client/clusters/destroy_cluster_responses.go deleted file mode 100644 index faeb3532..00000000 --- a/v1/client/clusters/destroy_cluster_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DestroyClusterReader is a Reader for the DestroyCluster structure. -type DestroyClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DestroyClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDestroyClusterNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDestroyClusterDefault(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 - } -} - -// NewDestroyClusterNoContent creates a DestroyClusterNoContent with default headers values -func NewDestroyClusterNoContent() *DestroyClusterNoContent { - return &DestroyClusterNoContent{} -} - -/* -DestroyClusterNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DestroyClusterNoContent struct { -} - -// IsSuccess returns true when this destroy cluster no content response has a 2xx status code -func (o *DestroyClusterNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this destroy cluster no content response has a 3xx status code -func (o *DestroyClusterNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this destroy cluster no content response has a 4xx status code -func (o *DestroyClusterNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this destroy cluster no content response has a 5xx status code -func (o *DestroyClusterNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this destroy cluster no content response a status code equal to that given -func (o *DestroyClusterNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the destroy cluster no content response -func (o *DestroyClusterNoContent) Code() int { - return 204 -} - -func (o *DestroyClusterNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/clusters][%d] destroyClusterNoContent", 204) -} - -func (o *DestroyClusterNoContent) String() string { - return fmt.Sprintf("[DELETE /public/clusters][%d] destroyClusterNoContent", 204) -} - -func (o *DestroyClusterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDestroyClusterDefault creates a DestroyClusterDefault with default headers values -func NewDestroyClusterDefault(code int) *DestroyClusterDefault { - return &DestroyClusterDefault{ - _statusCode: code, - } -} - -/* -DestroyClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type DestroyClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this destroy cluster default response has a 2xx status code -func (o *DestroyClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this destroy cluster default response has a 3xx status code -func (o *DestroyClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this destroy cluster default response has a 4xx status code -func (o *DestroyClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this destroy cluster default response has a 5xx status code -func (o *DestroyClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this destroy cluster default response a status code equal to that given -func (o *DestroyClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the destroy cluster default response -func (o *DestroyClusterDefault) Code() int { - return o._statusCode -} - -func (o *DestroyClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/clusters][%d] DestroyCluster default %s", o._statusCode, payload) -} - -func (o *DestroyClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/clusters][%d] DestroyCluster default %s", o._statusCode, payload) -} - -func (o *DestroyClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DestroyClusterDefault) 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/clusters/download_snmp_mibs_parameters.go b/v1/client/clusters/download_snmp_mibs_parameters.go deleted file mode 100644 index 6e29218e..00000000 --- a/v1/client/clusters/download_snmp_mibs_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewDownloadSnmpMibsParams creates a new DownloadSnmpMibsParams 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 NewDownloadSnmpMibsParams() *DownloadSnmpMibsParams { - return &DownloadSnmpMibsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadSnmpMibsParamsWithTimeout creates a new DownloadSnmpMibsParams object -// with the ability to set a timeout on a request. -func NewDownloadSnmpMibsParamsWithTimeout(timeout time.Duration) *DownloadSnmpMibsParams { - return &DownloadSnmpMibsParams{ - timeout: timeout, - } -} - -// NewDownloadSnmpMibsParamsWithContext creates a new DownloadSnmpMibsParams object -// with the ability to set a context for a request. -func NewDownloadSnmpMibsParamsWithContext(ctx context.Context) *DownloadSnmpMibsParams { - return &DownloadSnmpMibsParams{ - Context: ctx, - } -} - -// NewDownloadSnmpMibsParamsWithHTTPClient creates a new DownloadSnmpMibsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadSnmpMibsParamsWithHTTPClient(client *http.Client) *DownloadSnmpMibsParams { - return &DownloadSnmpMibsParams{ - HTTPClient: client, - } -} - -/* -DownloadSnmpMibsParams contains all the parameters to send to the API endpoint - - for the download snmp mibs operation. - - Typically these are written to a http.Request. -*/ -type DownloadSnmpMibsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download snmp mibs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadSnmpMibsParams) WithDefaults() *DownloadSnmpMibsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download snmp mibs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadSnmpMibsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download snmp mibs params -func (o *DownloadSnmpMibsParams) WithTimeout(timeout time.Duration) *DownloadSnmpMibsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download snmp mibs params -func (o *DownloadSnmpMibsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download snmp mibs params -func (o *DownloadSnmpMibsParams) WithContext(ctx context.Context) *DownloadSnmpMibsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download snmp mibs params -func (o *DownloadSnmpMibsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download snmp mibs params -func (o *DownloadSnmpMibsParams) WithHTTPClient(client *http.Client) *DownloadSnmpMibsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download snmp mibs params -func (o *DownloadSnmpMibsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadSnmpMibsParams) 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/clusters/download_snmp_mibs_responses.go b/v1/client/clusters/download_snmp_mibs_responses.go deleted file mode 100644 index 01909c3a..00000000 --- a/v1/client/clusters/download_snmp_mibs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadSnmpMibsReader is a Reader for the DownloadSnmpMibs structure. -type DownloadSnmpMibsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadSnmpMibsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadSnmpMibsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadSnmpMibsDefault(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 - } -} - -// NewDownloadSnmpMibsOK creates a DownloadSnmpMibsOK with default headers values -func NewDownloadSnmpMibsOK() *DownloadSnmpMibsOK { - return &DownloadSnmpMibsOK{} -} - -/* -DownloadSnmpMibsOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadSnmpMibsOK struct { - Payload []uint8 -} - -// IsSuccess returns true when this download snmp mibs o k response has a 2xx status code -func (o *DownloadSnmpMibsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download snmp mibs o k response has a 3xx status code -func (o *DownloadSnmpMibsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download snmp mibs o k response has a 4xx status code -func (o *DownloadSnmpMibsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download snmp mibs o k response has a 5xx status code -func (o *DownloadSnmpMibsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download snmp mibs o k response a status code equal to that given -func (o *DownloadSnmpMibsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download snmp mibs o k response -func (o *DownloadSnmpMibsOK) Code() int { - return 200 -} - -func (o *DownloadSnmpMibsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/mibsFile][%d] downloadSnmpMibsOK %s", 200, payload) -} - -func (o *DownloadSnmpMibsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/mibsFile][%d] downloadSnmpMibsOK %s", 200, payload) -} - -func (o *DownloadSnmpMibsOK) GetPayload() []uint8 { - return o.Payload -} - -func (o *DownloadSnmpMibsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadSnmpMibsDefault creates a DownloadSnmpMibsDefault with default headers values -func NewDownloadSnmpMibsDefault(code int) *DownloadSnmpMibsDefault { - return &DownloadSnmpMibsDefault{ - _statusCode: code, - } -} - -/* -DownloadSnmpMibsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DownloadSnmpMibsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this download snmp mibs default response has a 2xx status code -func (o *DownloadSnmpMibsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download snmp mibs default response has a 3xx status code -func (o *DownloadSnmpMibsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download snmp mibs default response has a 4xx status code -func (o *DownloadSnmpMibsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download snmp mibs default response has a 5xx status code -func (o *DownloadSnmpMibsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download snmp mibs default response a status code equal to that given -func (o *DownloadSnmpMibsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download snmp mibs default response -func (o *DownloadSnmpMibsDefault) Code() int { - return o._statusCode -} - -func (o *DownloadSnmpMibsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/mibsFile][%d] DownloadSnmpMibs default %s", o._statusCode, payload) -} - -func (o *DownloadSnmpMibsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/mibsFile][%d] DownloadSnmpMibs default %s", o._statusCode, payload) -} - -func (o *DownloadSnmpMibsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DownloadSnmpMibsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/expand_cloud_cluster_parameters.go b/v1/client/clusters/expand_cloud_cluster_parameters.go deleted file mode 100644 index 90458349..00000000 --- a/v1/client/clusters/expand_cloud_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewExpandCloudClusterParams creates a new ExpandCloudClusterParams 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 NewExpandCloudClusterParams() *ExpandCloudClusterParams { - return &ExpandCloudClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewExpandCloudClusterParamsWithTimeout creates a new ExpandCloudClusterParams object -// with the ability to set a timeout on a request. -func NewExpandCloudClusterParamsWithTimeout(timeout time.Duration) *ExpandCloudClusterParams { - return &ExpandCloudClusterParams{ - timeout: timeout, - } -} - -// NewExpandCloudClusterParamsWithContext creates a new ExpandCloudClusterParams object -// with the ability to set a context for a request. -func NewExpandCloudClusterParamsWithContext(ctx context.Context) *ExpandCloudClusterParams { - return &ExpandCloudClusterParams{ - Context: ctx, - } -} - -// NewExpandCloudClusterParamsWithHTTPClient creates a new ExpandCloudClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewExpandCloudClusterParamsWithHTTPClient(client *http.Client) *ExpandCloudClusterParams { - return &ExpandCloudClusterParams{ - HTTPClient: client, - } -} - -/* -ExpandCloudClusterParams contains all the parameters to send to the API endpoint - - for the expand cloud cluster operation. - - Typically these are written to a http.Request. -*/ -type ExpandCloudClusterParams struct { - - // Body. - Body *models.ExpandCloudClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the expand cloud cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandCloudClusterParams) WithDefaults() *ExpandCloudClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the expand cloud cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandCloudClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the expand cloud cluster params -func (o *ExpandCloudClusterParams) WithTimeout(timeout time.Duration) *ExpandCloudClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the expand cloud cluster params -func (o *ExpandCloudClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the expand cloud cluster params -func (o *ExpandCloudClusterParams) WithContext(ctx context.Context) *ExpandCloudClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the expand cloud cluster params -func (o *ExpandCloudClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the expand cloud cluster params -func (o *ExpandCloudClusterParams) WithHTTPClient(client *http.Client) *ExpandCloudClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the expand cloud cluster params -func (o *ExpandCloudClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the expand cloud cluster params -func (o *ExpandCloudClusterParams) WithBody(body *models.ExpandCloudClusterParameters) *ExpandCloudClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the expand cloud cluster params -func (o *ExpandCloudClusterParams) SetBody(body *models.ExpandCloudClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ExpandCloudClusterParams) 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/clusters/expand_cloud_cluster_responses.go b/v1/client/clusters/expand_cloud_cluster_responses.go deleted file mode 100644 index 929069b8..00000000 --- a/v1/client/clusters/expand_cloud_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ExpandCloudClusterReader is a Reader for the ExpandCloudCluster structure. -type ExpandCloudClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExpandCloudClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewExpandCloudClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewExpandCloudClusterDefault(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 - } -} - -// NewExpandCloudClusterAccepted creates a ExpandCloudClusterAccepted with default headers values -func NewExpandCloudClusterAccepted() *ExpandCloudClusterAccepted { - return &ExpandCloudClusterAccepted{} -} - -/* -ExpandCloudClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type ExpandCloudClusterAccepted struct { - Payload *models.CreateClusterResult -} - -// IsSuccess returns true when this expand cloud cluster accepted response has a 2xx status code -func (o *ExpandCloudClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this expand cloud cluster accepted response has a 3xx status code -func (o *ExpandCloudClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this expand cloud cluster accepted response has a 4xx status code -func (o *ExpandCloudClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this expand cloud cluster accepted response has a 5xx status code -func (o *ExpandCloudClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this expand cloud cluster accepted response a status code equal to that given -func (o *ExpandCloudClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the expand cloud cluster accepted response -func (o *ExpandCloudClusterAccepted) Code() int { - return 202 -} - -func (o *ExpandCloudClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition/nodes][%d] expandCloudClusterAccepted %s", 202, payload) -} - -func (o *ExpandCloudClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition/nodes][%d] expandCloudClusterAccepted %s", 202, payload) -} - -func (o *ExpandCloudClusterAccepted) GetPayload() *models.CreateClusterResult { - return o.Payload -} - -func (o *ExpandCloudClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewExpandCloudClusterDefault creates a ExpandCloudClusterDefault with default headers values -func NewExpandCloudClusterDefault(code int) *ExpandCloudClusterDefault { - return &ExpandCloudClusterDefault{ - _statusCode: code, - } -} - -/* -ExpandCloudClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type ExpandCloudClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this expand cloud cluster default response has a 2xx status code -func (o *ExpandCloudClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this expand cloud cluster default response has a 3xx status code -func (o *ExpandCloudClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this expand cloud cluster default response has a 4xx status code -func (o *ExpandCloudClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this expand cloud cluster default response has a 5xx status code -func (o *ExpandCloudClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this expand cloud cluster default response a status code equal to that given -func (o *ExpandCloudClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the expand cloud cluster default response -func (o *ExpandCloudClusterDefault) Code() int { - return o._statusCode -} - -func (o *ExpandCloudClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition/nodes][%d] ExpandCloudCluster default %s", o._statusCode, payload) -} - -func (o *ExpandCloudClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/cloudEdition/nodes][%d] ExpandCloudCluster default %s", o._statusCode, payload) -} - -func (o *ExpandCloudClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ExpandCloudClusterDefault) 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/clusters/expand_physical_cluster_parameters.go b/v1/client/clusters/expand_physical_cluster_parameters.go deleted file mode 100644 index 37869d93..00000000 --- a/v1/client/clusters/expand_physical_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewExpandPhysicalClusterParams creates a new ExpandPhysicalClusterParams 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 NewExpandPhysicalClusterParams() *ExpandPhysicalClusterParams { - return &ExpandPhysicalClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewExpandPhysicalClusterParamsWithTimeout creates a new ExpandPhysicalClusterParams object -// with the ability to set a timeout on a request. -func NewExpandPhysicalClusterParamsWithTimeout(timeout time.Duration) *ExpandPhysicalClusterParams { - return &ExpandPhysicalClusterParams{ - timeout: timeout, - } -} - -// NewExpandPhysicalClusterParamsWithContext creates a new ExpandPhysicalClusterParams object -// with the ability to set a context for a request. -func NewExpandPhysicalClusterParamsWithContext(ctx context.Context) *ExpandPhysicalClusterParams { - return &ExpandPhysicalClusterParams{ - Context: ctx, - } -} - -// NewExpandPhysicalClusterParamsWithHTTPClient creates a new ExpandPhysicalClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewExpandPhysicalClusterParamsWithHTTPClient(client *http.Client) *ExpandPhysicalClusterParams { - return &ExpandPhysicalClusterParams{ - HTTPClient: client, - } -} - -/* -ExpandPhysicalClusterParams contains all the parameters to send to the API endpoint - - for the expand physical cluster operation. - - Typically these are written to a http.Request. -*/ -type ExpandPhysicalClusterParams struct { - - // Body. - Body *models.ExpandPhysicalClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the expand physical cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandPhysicalClusterParams) WithDefaults() *ExpandPhysicalClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the expand physical cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandPhysicalClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) WithTimeout(timeout time.Duration) *ExpandPhysicalClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) WithContext(ctx context.Context) *ExpandPhysicalClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) WithHTTPClient(client *http.Client) *ExpandPhysicalClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) WithBody(body *models.ExpandPhysicalClusterParameters) *ExpandPhysicalClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the expand physical cluster params -func (o *ExpandPhysicalClusterParams) SetBody(body *models.ExpandPhysicalClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ExpandPhysicalClusterParams) 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/clusters/expand_physical_cluster_responses.go b/v1/client/clusters/expand_physical_cluster_responses.go deleted file mode 100644 index ab5c952b..00000000 --- a/v1/client/clusters/expand_physical_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ExpandPhysicalClusterReader is a Reader for the ExpandPhysicalCluster structure. -type ExpandPhysicalClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExpandPhysicalClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewExpandPhysicalClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewExpandPhysicalClusterDefault(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 - } -} - -// NewExpandPhysicalClusterAccepted creates a ExpandPhysicalClusterAccepted with default headers values -func NewExpandPhysicalClusterAccepted() *ExpandPhysicalClusterAccepted { - return &ExpandPhysicalClusterAccepted{} -} - -/* -ExpandPhysicalClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type ExpandPhysicalClusterAccepted struct { - Payload *models.CreateClusterResult -} - -// IsSuccess returns true when this expand physical cluster accepted response has a 2xx status code -func (o *ExpandPhysicalClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this expand physical cluster accepted response has a 3xx status code -func (o *ExpandPhysicalClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this expand physical cluster accepted response has a 4xx status code -func (o *ExpandPhysicalClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this expand physical cluster accepted response has a 5xx status code -func (o *ExpandPhysicalClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this expand physical cluster accepted response a status code equal to that given -func (o *ExpandPhysicalClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the expand physical cluster accepted response -func (o *ExpandPhysicalClusterAccepted) Code() int { - return 202 -} - -func (o *ExpandPhysicalClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition/nodes][%d] expandPhysicalClusterAccepted %s", 202, payload) -} - -func (o *ExpandPhysicalClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition/nodes][%d] expandPhysicalClusterAccepted %s", 202, payload) -} - -func (o *ExpandPhysicalClusterAccepted) GetPayload() *models.CreateClusterResult { - return o.Payload -} - -func (o *ExpandPhysicalClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewExpandPhysicalClusterDefault creates a ExpandPhysicalClusterDefault with default headers values -func NewExpandPhysicalClusterDefault(code int) *ExpandPhysicalClusterDefault { - return &ExpandPhysicalClusterDefault{ - _statusCode: code, - } -} - -/* -ExpandPhysicalClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type ExpandPhysicalClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this expand physical cluster default response has a 2xx status code -func (o *ExpandPhysicalClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this expand physical cluster default response has a 3xx status code -func (o *ExpandPhysicalClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this expand physical cluster default response has a 4xx status code -func (o *ExpandPhysicalClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this expand physical cluster default response has a 5xx status code -func (o *ExpandPhysicalClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this expand physical cluster default response a status code equal to that given -func (o *ExpandPhysicalClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the expand physical cluster default response -func (o *ExpandPhysicalClusterDefault) Code() int { - return o._statusCode -} - -func (o *ExpandPhysicalClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition/nodes][%d] ExpandPhysicalCluster default %s", o._statusCode, payload) -} - -func (o *ExpandPhysicalClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/clusters/physicalEdition/nodes][%d] ExpandPhysicalCluster default %s", o._statusCode, payload) -} - -func (o *ExpandPhysicalClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ExpandPhysicalClusterDefault) 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/clusters/get_background_activity_schedule_parameters.go b/v1/client/clusters/get_background_activity_schedule_parameters.go deleted file mode 100644 index 7123847f..00000000 --- a/v1/client/clusters/get_background_activity_schedule_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetBackgroundActivityScheduleParams creates a new GetBackgroundActivityScheduleParams 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 NewGetBackgroundActivityScheduleParams() *GetBackgroundActivityScheduleParams { - return &GetBackgroundActivityScheduleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBackgroundActivityScheduleParamsWithTimeout creates a new GetBackgroundActivityScheduleParams object -// with the ability to set a timeout on a request. -func NewGetBackgroundActivityScheduleParamsWithTimeout(timeout time.Duration) *GetBackgroundActivityScheduleParams { - return &GetBackgroundActivityScheduleParams{ - timeout: timeout, - } -} - -// NewGetBackgroundActivityScheduleParamsWithContext creates a new GetBackgroundActivityScheduleParams object -// with the ability to set a context for a request. -func NewGetBackgroundActivityScheduleParamsWithContext(ctx context.Context) *GetBackgroundActivityScheduleParams { - return &GetBackgroundActivityScheduleParams{ - Context: ctx, - } -} - -// NewGetBackgroundActivityScheduleParamsWithHTTPClient creates a new GetBackgroundActivityScheduleParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBackgroundActivityScheduleParamsWithHTTPClient(client *http.Client) *GetBackgroundActivityScheduleParams { - return &GetBackgroundActivityScheduleParams{ - HTTPClient: client, - } -} - -/* -GetBackgroundActivityScheduleParams contains all the parameters to send to the API endpoint - - for the get background activity schedule operation. - - Typically these are written to a http.Request. -*/ -type GetBackgroundActivityScheduleParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get background activity schedule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackgroundActivityScheduleParams) WithDefaults() *GetBackgroundActivityScheduleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get background activity schedule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBackgroundActivityScheduleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) WithTimeout(timeout time.Duration) *GetBackgroundActivityScheduleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) WithContext(ctx context.Context) *GetBackgroundActivityScheduleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) WithHTTPClient(client *http.Client) *GetBackgroundActivityScheduleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get background activity schedule params -func (o *GetBackgroundActivityScheduleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBackgroundActivityScheduleParams) 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/clusters/get_background_activity_schedule_responses.go b/v1/client/clusters/get_background_activity_schedule_responses.go deleted file mode 100644 index e6954993..00000000 --- a/v1/client/clusters/get_background_activity_schedule_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBackgroundActivityScheduleReader is a Reader for the GetBackgroundActivitySchedule structure. -type GetBackgroundActivityScheduleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBackgroundActivityScheduleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBackgroundActivityScheduleOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBackgroundActivityScheduleDefault(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 - } -} - -// NewGetBackgroundActivityScheduleOK creates a GetBackgroundActivityScheduleOK with default headers values -func NewGetBackgroundActivityScheduleOK() *GetBackgroundActivityScheduleOK { - return &GetBackgroundActivityScheduleOK{} -} - -/* -GetBackgroundActivityScheduleOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBackgroundActivityScheduleOK struct { - Payload *models.BandwidthLimit -} - -// IsSuccess returns true when this get background activity schedule o k response has a 2xx status code -func (o *GetBackgroundActivityScheduleOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get background activity schedule o k response has a 3xx status code -func (o *GetBackgroundActivityScheduleOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get background activity schedule o k response has a 4xx status code -func (o *GetBackgroundActivityScheduleOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get background activity schedule o k response has a 5xx status code -func (o *GetBackgroundActivityScheduleOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get background activity schedule o k response a status code equal to that given -func (o *GetBackgroundActivityScheduleOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get background activity schedule o k response -func (o *GetBackgroundActivityScheduleOK) Code() int { - return 200 -} - -func (o *GetBackgroundActivityScheduleOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/backgroundActivitySchedule][%d] getBackgroundActivityScheduleOK %s", 200, payload) -} - -func (o *GetBackgroundActivityScheduleOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/backgroundActivitySchedule][%d] getBackgroundActivityScheduleOK %s", 200, payload) -} - -func (o *GetBackgroundActivityScheduleOK) GetPayload() *models.BandwidthLimit { - return o.Payload -} - -func (o *GetBackgroundActivityScheduleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BandwidthLimit) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBackgroundActivityScheduleDefault creates a GetBackgroundActivityScheduleDefault with default headers values -func NewGetBackgroundActivityScheduleDefault(code int) *GetBackgroundActivityScheduleDefault { - return &GetBackgroundActivityScheduleDefault{ - _statusCode: code, - } -} - -/* -GetBackgroundActivityScheduleDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBackgroundActivityScheduleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get background activity schedule default response has a 2xx status code -func (o *GetBackgroundActivityScheduleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get background activity schedule default response has a 3xx status code -func (o *GetBackgroundActivityScheduleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get background activity schedule default response has a 4xx status code -func (o *GetBackgroundActivityScheduleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get background activity schedule default response has a 5xx status code -func (o *GetBackgroundActivityScheduleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get background activity schedule default response a status code equal to that given -func (o *GetBackgroundActivityScheduleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get background activity schedule default response -func (o *GetBackgroundActivityScheduleDefault) Code() int { - return o._statusCode -} - -func (o *GetBackgroundActivityScheduleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/backgroundActivitySchedule][%d] GetBackgroundActivitySchedule default %s", o._statusCode, payload) -} - -func (o *GetBackgroundActivityScheduleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/backgroundActivitySchedule][%d] GetBackgroundActivitySchedule default %s", o._statusCode, payload) -} - -func (o *GetBackgroundActivityScheduleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetBackgroundActivityScheduleDefault) 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/clusters/get_client_subnet_whitelist_parameters.go b/v1/client/clusters/get_client_subnet_whitelist_parameters.go deleted file mode 100644 index 349be99d..00000000 --- a/v1/client/clusters/get_client_subnet_whitelist_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClientSubnetWhitelistParams creates a new GetClientSubnetWhitelistParams 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 NewGetClientSubnetWhitelistParams() *GetClientSubnetWhitelistParams { - return &GetClientSubnetWhitelistParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClientSubnetWhitelistParamsWithTimeout creates a new GetClientSubnetWhitelistParams object -// with the ability to set a timeout on a request. -func NewGetClientSubnetWhitelistParamsWithTimeout(timeout time.Duration) *GetClientSubnetWhitelistParams { - return &GetClientSubnetWhitelistParams{ - timeout: timeout, - } -} - -// NewGetClientSubnetWhitelistParamsWithContext creates a new GetClientSubnetWhitelistParams object -// with the ability to set a context for a request. -func NewGetClientSubnetWhitelistParamsWithContext(ctx context.Context) *GetClientSubnetWhitelistParams { - return &GetClientSubnetWhitelistParams{ - Context: ctx, - } -} - -// NewGetClientSubnetWhitelistParamsWithHTTPClient creates a new GetClientSubnetWhitelistParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClientSubnetWhitelistParamsWithHTTPClient(client *http.Client) *GetClientSubnetWhitelistParams { - return &GetClientSubnetWhitelistParams{ - HTTPClient: client, - } -} - -/* -GetClientSubnetWhitelistParams contains all the parameters to send to the API endpoint - - for the get client subnet whitelist operation. - - Typically these are written to a http.Request. -*/ -type GetClientSubnetWhitelistParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get client subnet whitelist params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClientSubnetWhitelistParams) WithDefaults() *GetClientSubnetWhitelistParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get client subnet whitelist params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClientSubnetWhitelistParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) WithTimeout(timeout time.Duration) *GetClientSubnetWhitelistParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) WithContext(ctx context.Context) *GetClientSubnetWhitelistParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) WithHTTPClient(client *http.Client) *GetClientSubnetWhitelistParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get client subnet whitelist params -func (o *GetClientSubnetWhitelistParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClientSubnetWhitelistParams) 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/clusters/get_client_subnet_whitelist_responses.go b/v1/client/clusters/get_client_subnet_whitelist_responses.go deleted file mode 100644 index 0bac690c..00000000 --- a/v1/client/clusters/get_client_subnet_whitelist_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClientSubnetWhitelistReader is a Reader for the GetClientSubnetWhitelist structure. -type GetClientSubnetWhitelistReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClientSubnetWhitelistReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClientSubnetWhitelistOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClientSubnetWhitelistDefault(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 - } -} - -// NewGetClientSubnetWhitelistOK creates a GetClientSubnetWhitelistOK with default headers values -func NewGetClientSubnetWhitelistOK() *GetClientSubnetWhitelistOK { - return &GetClientSubnetWhitelistOK{} -} - -/* -GetClientSubnetWhitelistOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClientSubnetWhitelistOK struct { - Payload *models.ClientSubnetWhitelist -} - -// IsSuccess returns true when this get client subnet whitelist o k response has a 2xx status code -func (o *GetClientSubnetWhitelistOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get client subnet whitelist o k response has a 3xx status code -func (o *GetClientSubnetWhitelistOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get client subnet whitelist o k response has a 4xx status code -func (o *GetClientSubnetWhitelistOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get client subnet whitelist o k response has a 5xx status code -func (o *GetClientSubnetWhitelistOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get client subnet whitelist o k response a status code equal to that given -func (o *GetClientSubnetWhitelistOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get client subnet whitelist o k response -func (o *GetClientSubnetWhitelistOK) Code() int { - return 200 -} - -func (o *GetClientSubnetWhitelistOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clientSubnetWhitelist][%d] getClientSubnetWhitelistOK %s", 200, payload) -} - -func (o *GetClientSubnetWhitelistOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clientSubnetWhitelist][%d] getClientSubnetWhitelistOK %s", 200, payload) -} - -func (o *GetClientSubnetWhitelistOK) GetPayload() *models.ClientSubnetWhitelist { - return o.Payload -} - -func (o *GetClientSubnetWhitelistOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClientSubnetWhitelist) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClientSubnetWhitelistDefault creates a GetClientSubnetWhitelistDefault with default headers values -func NewGetClientSubnetWhitelistDefault(code int) *GetClientSubnetWhitelistDefault { - return &GetClientSubnetWhitelistDefault{ - _statusCode: code, - } -} - -/* -GetClientSubnetWhitelistDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClientSubnetWhitelistDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get client subnet whitelist default response has a 2xx status code -func (o *GetClientSubnetWhitelistDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get client subnet whitelist default response has a 3xx status code -func (o *GetClientSubnetWhitelistDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get client subnet whitelist default response has a 4xx status code -func (o *GetClientSubnetWhitelistDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get client subnet whitelist default response has a 5xx status code -func (o *GetClientSubnetWhitelistDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get client subnet whitelist default response a status code equal to that given -func (o *GetClientSubnetWhitelistDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get client subnet whitelist default response -func (o *GetClientSubnetWhitelistDefault) Code() int { - return o._statusCode -} - -func (o *GetClientSubnetWhitelistDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clientSubnetWhitelist][%d] GetClientSubnetWhitelist default %s", o._statusCode, payload) -} - -func (o *GetClientSubnetWhitelistDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clientSubnetWhitelist][%d] GetClientSubnetWhitelist default %s", o._statusCode, payload) -} - -func (o *GetClientSubnetWhitelistDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClientSubnetWhitelistDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_cluster_creation_progress_parameters.go b/v1/client/clusters/get_cluster_creation_progress_parameters.go deleted file mode 100644 index 5f1689ba..00000000 --- a/v1/client/clusters/get_cluster_creation_progress_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterCreationProgressParams creates a new GetClusterCreationProgressParams 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 NewGetClusterCreationProgressParams() *GetClusterCreationProgressParams { - return &GetClusterCreationProgressParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterCreationProgressParamsWithTimeout creates a new GetClusterCreationProgressParams object -// with the ability to set a timeout on a request. -func NewGetClusterCreationProgressParamsWithTimeout(timeout time.Duration) *GetClusterCreationProgressParams { - return &GetClusterCreationProgressParams{ - timeout: timeout, - } -} - -// NewGetClusterCreationProgressParamsWithContext creates a new GetClusterCreationProgressParams object -// with the ability to set a context for a request. -func NewGetClusterCreationProgressParamsWithContext(ctx context.Context) *GetClusterCreationProgressParams { - return &GetClusterCreationProgressParams{ - Context: ctx, - } -} - -// NewGetClusterCreationProgressParamsWithHTTPClient creates a new GetClusterCreationProgressParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterCreationProgressParamsWithHTTPClient(client *http.Client) *GetClusterCreationProgressParams { - return &GetClusterCreationProgressParams{ - HTTPClient: client, - } -} - -/* -GetClusterCreationProgressParams contains all the parameters to send to the API endpoint - - for the get cluster creation progress operation. - - Typically these are written to a http.Request. -*/ -type GetClusterCreationProgressParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster creation progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterCreationProgressParams) WithDefaults() *GetClusterCreationProgressParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster creation progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterCreationProgressParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) WithTimeout(timeout time.Duration) *GetClusterCreationProgressParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) WithContext(ctx context.Context) *GetClusterCreationProgressParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) WithHTTPClient(client *http.Client) *GetClusterCreationProgressParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster creation progress params -func (o *GetClusterCreationProgressParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterCreationProgressParams) 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/clusters/get_cluster_creation_progress_responses.go b/v1/client/clusters/get_cluster_creation_progress_responses.go deleted file mode 100644 index 7cbe26cd..00000000 --- a/v1/client/clusters/get_cluster_creation_progress_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterCreationProgressReader is a Reader for the GetClusterCreationProgress structure. -type GetClusterCreationProgressReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterCreationProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterCreationProgressOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterCreationProgressDefault(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 - } -} - -// NewGetClusterCreationProgressOK creates a GetClusterCreationProgressOK with default headers values -func NewGetClusterCreationProgressOK() *GetClusterCreationProgressOK { - return &GetClusterCreationProgressOK{} -} - -/* -GetClusterCreationProgressOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterCreationProgressOK struct { - Payload *models.ClusterCreationProgressResult -} - -// IsSuccess returns true when this get cluster creation progress o k response has a 2xx status code -func (o *GetClusterCreationProgressOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster creation progress o k response has a 3xx status code -func (o *GetClusterCreationProgressOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster creation progress o k response has a 4xx status code -func (o *GetClusterCreationProgressOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster creation progress o k response has a 5xx status code -func (o *GetClusterCreationProgressOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster creation progress o k response a status code equal to that given -func (o *GetClusterCreationProgressOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster creation progress o k response -func (o *GetClusterCreationProgressOK) Code() int { - return 200 -} - -func (o *GetClusterCreationProgressOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/creationProgress][%d] getClusterCreationProgressOK %s", 200, payload) -} - -func (o *GetClusterCreationProgressOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/creationProgress][%d] getClusterCreationProgressOK %s", 200, payload) -} - -func (o *GetClusterCreationProgressOK) GetPayload() *models.ClusterCreationProgressResult { - return o.Payload -} - -func (o *GetClusterCreationProgressOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterCreationProgressResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterCreationProgressDefault creates a GetClusterCreationProgressDefault with default headers values -func NewGetClusterCreationProgressDefault(code int) *GetClusterCreationProgressDefault { - return &GetClusterCreationProgressDefault{ - _statusCode: code, - } -} - -/* -GetClusterCreationProgressDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterCreationProgressDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster creation progress default response has a 2xx status code -func (o *GetClusterCreationProgressDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster creation progress default response has a 3xx status code -func (o *GetClusterCreationProgressDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster creation progress default response has a 4xx status code -func (o *GetClusterCreationProgressDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster creation progress default response has a 5xx status code -func (o *GetClusterCreationProgressDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster creation progress default response a status code equal to that given -func (o *GetClusterCreationProgressDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster creation progress default response -func (o *GetClusterCreationProgressDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterCreationProgressDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/creationProgress][%d] GetClusterCreationProgress default %s", o._statusCode, payload) -} - -func (o *GetClusterCreationProgressDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/creationProgress][%d] GetClusterCreationProgress default %s", o._statusCode, payload) -} - -func (o *GetClusterCreationProgressDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterCreationProgressDefault) 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/clusters/get_cluster_keys_parameters.go b/v1/client/clusters/get_cluster_keys_parameters.go deleted file mode 100644 index bb5ea965..00000000 --- a/v1/client/clusters/get_cluster_keys_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterKeysParams creates a new GetClusterKeysParams 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 NewGetClusterKeysParams() *GetClusterKeysParams { - return &GetClusterKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterKeysParamsWithTimeout creates a new GetClusterKeysParams object -// with the ability to set a timeout on a request. -func NewGetClusterKeysParamsWithTimeout(timeout time.Duration) *GetClusterKeysParams { - return &GetClusterKeysParams{ - timeout: timeout, - } -} - -// NewGetClusterKeysParamsWithContext creates a new GetClusterKeysParams object -// with the ability to set a context for a request. -func NewGetClusterKeysParamsWithContext(ctx context.Context) *GetClusterKeysParams { - return &GetClusterKeysParams{ - Context: ctx, - } -} - -// NewGetClusterKeysParamsWithHTTPClient creates a new GetClusterKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterKeysParamsWithHTTPClient(client *http.Client) *GetClusterKeysParams { - return &GetClusterKeysParams{ - HTTPClient: client, - } -} - -/* -GetClusterKeysParams contains all the parameters to send to the API endpoint - - for the get cluster keys operation. - - Typically these are written to a http.Request. -*/ -type GetClusterKeysParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterKeysParams) WithDefaults() *GetClusterKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster keys params -func (o *GetClusterKeysParams) WithTimeout(timeout time.Duration) *GetClusterKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster keys params -func (o *GetClusterKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster keys params -func (o *GetClusterKeysParams) WithContext(ctx context.Context) *GetClusterKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster keys params -func (o *GetClusterKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster keys params -func (o *GetClusterKeysParams) WithHTTPClient(client *http.Client) *GetClusterKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster keys params -func (o *GetClusterKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterKeysParams) 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/clusters/get_cluster_keys_responses.go b/v1/client/clusters/get_cluster_keys_responses.go deleted file mode 100644 index 4651e2ec..00000000 --- a/v1/client/clusters/get_cluster_keys_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterKeysReader is a Reader for the GetClusterKeys structure. -type GetClusterKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterKeysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterKeysDefault(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 - } -} - -// NewGetClusterKeysOK creates a GetClusterKeysOK with default headers values -func NewGetClusterKeysOK() *GetClusterKeysOK { - return &GetClusterKeysOK{} -} - -/* -GetClusterKeysOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterKeysOK struct { - Payload *models.ClusterPublicKeys -} - -// IsSuccess returns true when this get cluster keys o k response has a 2xx status code -func (o *GetClusterKeysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster keys o k response has a 3xx status code -func (o *GetClusterKeysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster keys o k response has a 4xx status code -func (o *GetClusterKeysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster keys o k response has a 5xx status code -func (o *GetClusterKeysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster keys o k response a status code equal to that given -func (o *GetClusterKeysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster keys o k response -func (o *GetClusterKeysOK) Code() int { - return 200 -} - -func (o *GetClusterKeysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/keys][%d] getClusterKeysOK %s", 200, payload) -} - -func (o *GetClusterKeysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/keys][%d] getClusterKeysOK %s", 200, payload) -} - -func (o *GetClusterKeysOK) GetPayload() *models.ClusterPublicKeys { - return o.Payload -} - -func (o *GetClusterKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterPublicKeys) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterKeysDefault creates a GetClusterKeysDefault with default headers values -func NewGetClusterKeysDefault(code int) *GetClusterKeysDefault { - return &GetClusterKeysDefault{ - _statusCode: code, - } -} - -/* -GetClusterKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterKeysDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cluster keys default response has a 2xx status code -func (o *GetClusterKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster keys default response has a 3xx status code -func (o *GetClusterKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster keys default response has a 4xx status code -func (o *GetClusterKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster keys default response has a 5xx status code -func (o *GetClusterKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster keys default response a status code equal to that given -func (o *GetClusterKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster keys default response -func (o *GetClusterKeysDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/keys][%d] GetClusterKeys default %s", o._statusCode, payload) -} - -func (o *GetClusterKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/cluster/keys][%d] GetClusterKeys default %s", o._statusCode, payload) -} - -func (o *GetClusterKeysDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetClusterKeysDefault) 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/clusters/get_cluster_platforms_parameters.go b/v1/client/clusters/get_cluster_platforms_parameters.go deleted file mode 100644 index 24ee0913..00000000 --- a/v1/client/clusters/get_cluster_platforms_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterPlatformsParams creates a new GetClusterPlatformsParams 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 NewGetClusterPlatformsParams() *GetClusterPlatformsParams { - return &GetClusterPlatformsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterPlatformsParamsWithTimeout creates a new GetClusterPlatformsParams object -// with the ability to set a timeout on a request. -func NewGetClusterPlatformsParamsWithTimeout(timeout time.Duration) *GetClusterPlatformsParams { - return &GetClusterPlatformsParams{ - timeout: timeout, - } -} - -// NewGetClusterPlatformsParamsWithContext creates a new GetClusterPlatformsParams object -// with the ability to set a context for a request. -func NewGetClusterPlatformsParamsWithContext(ctx context.Context) *GetClusterPlatformsParams { - return &GetClusterPlatformsParams{ - Context: ctx, - } -} - -// NewGetClusterPlatformsParamsWithHTTPClient creates a new GetClusterPlatformsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterPlatformsParamsWithHTTPClient(client *http.Client) *GetClusterPlatformsParams { - return &GetClusterPlatformsParams{ - HTTPClient: client, - } -} - -/* -GetClusterPlatformsParams contains all the parameters to send to the API endpoint - - for the get cluster platforms operation. - - Typically these are written to a http.Request. -*/ -type GetClusterPlatformsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster platforms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPlatformsParams) WithDefaults() *GetClusterPlatformsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster platforms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPlatformsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster platforms params -func (o *GetClusterPlatformsParams) WithTimeout(timeout time.Duration) *GetClusterPlatformsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster platforms params -func (o *GetClusterPlatformsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster platforms params -func (o *GetClusterPlatformsParams) WithContext(ctx context.Context) *GetClusterPlatformsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster platforms params -func (o *GetClusterPlatformsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster platforms params -func (o *GetClusterPlatformsParams) WithHTTPClient(client *http.Client) *GetClusterPlatformsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster platforms params -func (o *GetClusterPlatformsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterPlatformsParams) 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/clusters/get_cluster_platforms_responses.go b/v1/client/clusters/get_cluster_platforms_responses.go deleted file mode 100644 index a0369ff1..00000000 --- a/v1/client/clusters/get_cluster_platforms_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterPlatformsReader is a Reader for the GetClusterPlatforms structure. -type GetClusterPlatformsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterPlatformsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterPlatformsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterPlatformsDefault(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 - } -} - -// NewGetClusterPlatformsOK creates a GetClusterPlatformsOK with default headers values -func NewGetClusterPlatformsOK() *GetClusterPlatformsOK { - return &GetClusterPlatformsOK{} -} - -/* -GetClusterPlatformsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterPlatformsOK struct { - Payload []*models.PlatformParams -} - -// IsSuccess returns true when this get cluster platforms o k response has a 2xx status code -func (o *GetClusterPlatformsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster platforms o k response has a 3xx status code -func (o *GetClusterPlatformsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster platforms o k response has a 4xx status code -func (o *GetClusterPlatformsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster platforms o k response has a 5xx status code -func (o *GetClusterPlatformsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster platforms o k response a status code equal to that given -func (o *GetClusterPlatformsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster platforms o k response -func (o *GetClusterPlatformsOK) Code() int { - return 200 -} - -func (o *GetClusterPlatformsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPlatforms][%d] getClusterPlatformsOK %s", 200, payload) -} - -func (o *GetClusterPlatformsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPlatforms][%d] getClusterPlatformsOK %s", 200, payload) -} - -func (o *GetClusterPlatformsOK) GetPayload() []*models.PlatformParams { - return o.Payload -} - -func (o *GetClusterPlatformsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterPlatformsDefault creates a GetClusterPlatformsDefault with default headers values -func NewGetClusterPlatformsDefault(code int) *GetClusterPlatformsDefault { - return &GetClusterPlatformsDefault{ - _statusCode: code, - } -} - -/* -GetClusterPlatformsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClusterPlatformsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get cluster platforms default response has a 2xx status code -func (o *GetClusterPlatformsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster platforms default response has a 3xx status code -func (o *GetClusterPlatformsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster platforms default response has a 4xx status code -func (o *GetClusterPlatformsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster platforms default response has a 5xx status code -func (o *GetClusterPlatformsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster platforms default response a status code equal to that given -func (o *GetClusterPlatformsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster platforms default response -func (o *GetClusterPlatformsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterPlatformsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPlatforms][%d] GetClusterPlatforms default %s", o._statusCode, payload) -} - -func (o *GetClusterPlatformsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPlatforms][%d] GetClusterPlatforms default %s", o._statusCode, payload) -} - -func (o *GetClusterPlatformsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClusterPlatformsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_cluster_public_key_parameters.go b/v1/client/clusters/get_cluster_public_key_parameters.go deleted file mode 100644 index 8c1641b4..00000000 --- a/v1/client/clusters/get_cluster_public_key_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterPublicKeyParams creates a new GetClusterPublicKeyParams 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 NewGetClusterPublicKeyParams() *GetClusterPublicKeyParams { - return &GetClusterPublicKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterPublicKeyParamsWithTimeout creates a new GetClusterPublicKeyParams object -// with the ability to set a timeout on a request. -func NewGetClusterPublicKeyParamsWithTimeout(timeout time.Duration) *GetClusterPublicKeyParams { - return &GetClusterPublicKeyParams{ - timeout: timeout, - } -} - -// NewGetClusterPublicKeyParamsWithContext creates a new GetClusterPublicKeyParams object -// with the ability to set a context for a request. -func NewGetClusterPublicKeyParamsWithContext(ctx context.Context) *GetClusterPublicKeyParams { - return &GetClusterPublicKeyParams{ - Context: ctx, - } -} - -// NewGetClusterPublicKeyParamsWithHTTPClient creates a new GetClusterPublicKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterPublicKeyParamsWithHTTPClient(client *http.Client) *GetClusterPublicKeyParams { - return &GetClusterPublicKeyParams{ - HTTPClient: client, - } -} - -/* -GetClusterPublicKeyParams contains all the parameters to send to the API endpoint - - for the get cluster public key operation. - - Typically these are written to a http.Request. -*/ -type GetClusterPublicKeyParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster public key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPublicKeyParams) WithDefaults() *GetClusterPublicKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster public key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPublicKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster public key params -func (o *GetClusterPublicKeyParams) WithTimeout(timeout time.Duration) *GetClusterPublicKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster public key params -func (o *GetClusterPublicKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster public key params -func (o *GetClusterPublicKeyParams) WithContext(ctx context.Context) *GetClusterPublicKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster public key params -func (o *GetClusterPublicKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster public key params -func (o *GetClusterPublicKeyParams) WithHTTPClient(client *http.Client) *GetClusterPublicKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster public key params -func (o *GetClusterPublicKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterPublicKeyParams) 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/clusters/get_cluster_public_key_responses.go b/v1/client/clusters/get_cluster_public_key_responses.go deleted file mode 100644 index f3db48b1..00000000 --- a/v1/client/clusters/get_cluster_public_key_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterPublicKeyReader is a Reader for the GetClusterPublicKey structure. -type GetClusterPublicKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterPublicKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterPublicKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterPublicKeyDefault(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 - } -} - -// NewGetClusterPublicKeyOK creates a GetClusterPublicKeyOK with default headers values -func NewGetClusterPublicKeyOK() *GetClusterPublicKeyOK { - return &GetClusterPublicKeyOK{} -} - -/* -GetClusterPublicKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterPublicKeyOK struct { - Payload []uint8 -} - -// IsSuccess returns true when this get cluster public key o k response has a 2xx status code -func (o *GetClusterPublicKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster public key o k response has a 3xx status code -func (o *GetClusterPublicKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster public key o k response has a 4xx status code -func (o *GetClusterPublicKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster public key o k response has a 5xx status code -func (o *GetClusterPublicKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster public key o k response a status code equal to that given -func (o *GetClusterPublicKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster public key o k response -func (o *GetClusterPublicKeyOK) Code() int { - return 200 -} - -func (o *GetClusterPublicKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPublicKey][%d] getClusterPublicKeyOK %s", 200, payload) -} - -func (o *GetClusterPublicKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPublicKey][%d] getClusterPublicKeyOK %s", 200, payload) -} - -func (o *GetClusterPublicKeyOK) GetPayload() []uint8 { - return o.Payload -} - -func (o *GetClusterPublicKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterPublicKeyDefault creates a GetClusterPublicKeyDefault with default headers values -func NewGetClusterPublicKeyDefault(code int) *GetClusterPublicKeyDefault { - return &GetClusterPublicKeyDefault{ - _statusCode: code, - } -} - -/* -GetClusterPublicKeyDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClusterPublicKeyDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get cluster public key default response has a 2xx status code -func (o *GetClusterPublicKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster public key default response has a 3xx status code -func (o *GetClusterPublicKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster public key default response has a 4xx status code -func (o *GetClusterPublicKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster public key default response has a 5xx status code -func (o *GetClusterPublicKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster public key default response a status code equal to that given -func (o *GetClusterPublicKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster public key default response -func (o *GetClusterPublicKeyDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterPublicKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPublicKey][%d] GetClusterPublicKey default %s", o._statusCode, payload) -} - -func (o *GetClusterPublicKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterPublicKey][%d] GetClusterPublicKey default %s", o._statusCode, payload) -} - -func (o *GetClusterPublicKeyDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClusterPublicKeyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_cluster_stats_parameters.go b/v1/client/clusters/get_cluster_stats_parameters.go deleted file mode 100644 index 4346024f..00000000 --- a/v1/client/clusters/get_cluster_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterStatsParams creates a new GetClusterStatsParams 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 NewGetClusterStatsParams() *GetClusterStatsParams { - return &GetClusterStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterStatsParamsWithTimeout creates a new GetClusterStatsParams object -// with the ability to set a timeout on a request. -func NewGetClusterStatsParamsWithTimeout(timeout time.Duration) *GetClusterStatsParams { - return &GetClusterStatsParams{ - timeout: timeout, - } -} - -// NewGetClusterStatsParamsWithContext creates a new GetClusterStatsParams object -// with the ability to set a context for a request. -func NewGetClusterStatsParamsWithContext(ctx context.Context) *GetClusterStatsParams { - return &GetClusterStatsParams{ - Context: ctx, - } -} - -// NewGetClusterStatsParamsWithHTTPClient creates a new GetClusterStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterStatsParamsWithHTTPClient(client *http.Client) *GetClusterStatsParams { - return &GetClusterStatsParams{ - HTTPClient: client, - } -} - -/* -GetClusterStatsParams contains all the parameters to send to the API endpoint - - for the get cluster stats operation. - - Typically these are written to a http.Request. -*/ -type GetClusterStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStatsParams) WithDefaults() *GetClusterStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster stats params -func (o *GetClusterStatsParams) WithTimeout(timeout time.Duration) *GetClusterStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster stats params -func (o *GetClusterStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster stats params -func (o *GetClusterStatsParams) WithContext(ctx context.Context) *GetClusterStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster stats params -func (o *GetClusterStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster stats params -func (o *GetClusterStatsParams) WithHTTPClient(client *http.Client) *GetClusterStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster stats params -func (o *GetClusterStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterStatsParams) 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/clusters/get_cluster_stats_responses.go b/v1/client/clusters/get_cluster_stats_responses.go deleted file mode 100644 index 5ca883ca..00000000 --- a/v1/client/clusters/get_cluster_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterStatsReader is a Reader for the GetClusterStats structure. -type GetClusterStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterStatsDefault(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 - } -} - -// NewGetClusterStatsOK creates a GetClusterStatsOK with default headers values -func NewGetClusterStatsOK() *GetClusterStatsOK { - return &GetClusterStatsOK{} -} - -/* -GetClusterStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterStatsOK struct { - Payload *models.ClusterStats -} - -// IsSuccess returns true when this get cluster stats o k response has a 2xx status code -func (o *GetClusterStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster stats o k response has a 3xx status code -func (o *GetClusterStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster stats o k response has a 4xx status code -func (o *GetClusterStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster stats o k response has a 5xx status code -func (o *GetClusterStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster stats o k response a status code equal to that given -func (o *GetClusterStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster stats o k response -func (o *GetClusterStatsOK) Code() int { - return 200 -} - -func (o *GetClusterStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterStats][%d] getClusterStatsOK %s", 200, payload) -} - -func (o *GetClusterStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterStats][%d] getClusterStatsOK %s", 200, payload) -} - -func (o *GetClusterStatsOK) GetPayload() *models.ClusterStats { - return o.Payload -} - -func (o *GetClusterStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterStatsDefault creates a GetClusterStatsDefault with default headers values -func NewGetClusterStatsDefault(code int) *GetClusterStatsDefault { - return &GetClusterStatsDefault{ - _statusCode: code, - } -} - -/* -GetClusterStatsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClusterStatsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get cluster stats default response has a 2xx status code -func (o *GetClusterStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster stats default response has a 3xx status code -func (o *GetClusterStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster stats default response has a 4xx status code -func (o *GetClusterStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster stats default response has a 5xx status code -func (o *GetClusterStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster stats default response a status code equal to that given -func (o *GetClusterStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster stats default response -func (o *GetClusterStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterStats][%d] GetClusterStats default %s", o._statusCode, payload) -} - -func (o *GetClusterStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterStats][%d] GetClusterStats default %s", o._statusCode, payload) -} - -func (o *GetClusterStatsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClusterStatsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_cluster_subnets_parameters.go b/v1/client/clusters/get_cluster_subnets_parameters.go deleted file mode 100644 index 2caa2074..00000000 --- a/v1/client/clusters/get_cluster_subnets_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterSubnetsParams creates a new GetClusterSubnetsParams 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 NewGetClusterSubnetsParams() *GetClusterSubnetsParams { - return &GetClusterSubnetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterSubnetsParamsWithTimeout creates a new GetClusterSubnetsParams object -// with the ability to set a timeout on a request. -func NewGetClusterSubnetsParamsWithTimeout(timeout time.Duration) *GetClusterSubnetsParams { - return &GetClusterSubnetsParams{ - timeout: timeout, - } -} - -// NewGetClusterSubnetsParamsWithContext creates a new GetClusterSubnetsParams object -// with the ability to set a context for a request. -func NewGetClusterSubnetsParamsWithContext(ctx context.Context) *GetClusterSubnetsParams { - return &GetClusterSubnetsParams{ - Context: ctx, - } -} - -// NewGetClusterSubnetsParamsWithHTTPClient creates a new GetClusterSubnetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterSubnetsParamsWithHTTPClient(client *http.Client) *GetClusterSubnetsParams { - return &GetClusterSubnetsParams{ - HTTPClient: client, - } -} - -/* -GetClusterSubnetsParams contains all the parameters to send to the API endpoint - - for the get cluster subnets operation. - - Typically these are written to a http.Request. -*/ -type GetClusterSubnetsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterSubnetsParams) WithDefaults() *GetClusterSubnetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterSubnetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster subnets params -func (o *GetClusterSubnetsParams) WithTimeout(timeout time.Duration) *GetClusterSubnetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster subnets params -func (o *GetClusterSubnetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster subnets params -func (o *GetClusterSubnetsParams) WithContext(ctx context.Context) *GetClusterSubnetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster subnets params -func (o *GetClusterSubnetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster subnets params -func (o *GetClusterSubnetsParams) WithHTTPClient(client *http.Client) *GetClusterSubnetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster subnets params -func (o *GetClusterSubnetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterSubnetsParams) 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/clusters/get_cluster_subnets_responses.go b/v1/client/clusters/get_cluster_subnets_responses.go deleted file mode 100644 index 653bec6e..00000000 --- a/v1/client/clusters/get_cluster_subnets_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterSubnetsReader is a Reader for the GetClusterSubnets structure. -type GetClusterSubnetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterSubnetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterSubnetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterSubnetsDefault(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 - } -} - -// NewGetClusterSubnetsOK creates a GetClusterSubnetsOK with default headers values -func NewGetClusterSubnetsOK() *GetClusterSubnetsOK { - return &GetClusterSubnetsOK{} -} - -/* -GetClusterSubnetsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterSubnetsOK struct { - Payload []*models.Subnet -} - -// IsSuccess returns true when this get cluster subnets o k response has a 2xx status code -func (o *GetClusterSubnetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster subnets o k response has a 3xx status code -func (o *GetClusterSubnetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster subnets o k response has a 4xx status code -func (o *GetClusterSubnetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster subnets o k response has a 5xx status code -func (o *GetClusterSubnetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster subnets o k response a status code equal to that given -func (o *GetClusterSubnetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster subnets o k response -func (o *GetClusterSubnetsOK) Code() int { - return 200 -} - -func (o *GetClusterSubnetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterSubnets][%d] getClusterSubnetsOK %s", 200, payload) -} - -func (o *GetClusterSubnetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterSubnets][%d] getClusterSubnetsOK %s", 200, payload) -} - -func (o *GetClusterSubnetsOK) GetPayload() []*models.Subnet { - return o.Payload -} - -func (o *GetClusterSubnetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterSubnetsDefault creates a GetClusterSubnetsDefault with default headers values -func NewGetClusterSubnetsDefault(code int) *GetClusterSubnetsDefault { - return &GetClusterSubnetsDefault{ - _statusCode: code, - } -} - -/* -GetClusterSubnetsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClusterSubnetsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get cluster subnets default response has a 2xx status code -func (o *GetClusterSubnetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster subnets default response has a 3xx status code -func (o *GetClusterSubnetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster subnets default response has a 4xx status code -func (o *GetClusterSubnetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster subnets default response has a 5xx status code -func (o *GetClusterSubnetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster subnets default response a status code equal to that given -func (o *GetClusterSubnetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster subnets default response -func (o *GetClusterSubnetsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterSubnetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterSubnets][%d] GetClusterSubnets default %s", o._statusCode, payload) -} - -func (o *GetClusterSubnetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterSubnets][%d] GetClusterSubnets default %s", o._statusCode, payload) -} - -func (o *GetClusterSubnetsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClusterSubnetsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_cluster_upgrade_status_parameters.go b/v1/client/clusters/get_cluster_upgrade_status_parameters.go deleted file mode 100644 index bbd3556c..00000000 --- a/v1/client/clusters/get_cluster_upgrade_status_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetClusterUpgradeStatusParams creates a new GetClusterUpgradeStatusParams 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 NewGetClusterUpgradeStatusParams() *GetClusterUpgradeStatusParams { - return &GetClusterUpgradeStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterUpgradeStatusParamsWithTimeout creates a new GetClusterUpgradeStatusParams object -// with the ability to set a timeout on a request. -func NewGetClusterUpgradeStatusParamsWithTimeout(timeout time.Duration) *GetClusterUpgradeStatusParams { - return &GetClusterUpgradeStatusParams{ - timeout: timeout, - } -} - -// NewGetClusterUpgradeStatusParamsWithContext creates a new GetClusterUpgradeStatusParams object -// with the ability to set a context for a request. -func NewGetClusterUpgradeStatusParamsWithContext(ctx context.Context) *GetClusterUpgradeStatusParams { - return &GetClusterUpgradeStatusParams{ - Context: ctx, - } -} - -// NewGetClusterUpgradeStatusParamsWithHTTPClient creates a new GetClusterUpgradeStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterUpgradeStatusParamsWithHTTPClient(client *http.Client) *GetClusterUpgradeStatusParams { - return &GetClusterUpgradeStatusParams{ - HTTPClient: client, - } -} - -/* -GetClusterUpgradeStatusParams contains all the parameters to send to the API endpoint - - for the get cluster upgrade status operation. - - Typically these are written to a http.Request. -*/ -type GetClusterUpgradeStatusParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster upgrade status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterUpgradeStatusParams) WithDefaults() *GetClusterUpgradeStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster upgrade status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterUpgradeStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) WithTimeout(timeout time.Duration) *GetClusterUpgradeStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) WithContext(ctx context.Context) *GetClusterUpgradeStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) WithHTTPClient(client *http.Client) *GetClusterUpgradeStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster upgrade status params -func (o *GetClusterUpgradeStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterUpgradeStatusParams) 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/clusters/get_cluster_upgrade_status_responses.go b/v1/client/clusters/get_cluster_upgrade_status_responses.go deleted file mode 100644 index f1dc99bf..00000000 --- a/v1/client/clusters/get_cluster_upgrade_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetClusterUpgradeStatusReader is a Reader for the GetClusterUpgradeStatus structure. -type GetClusterUpgradeStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterUpgradeStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterUpgradeStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterUpgradeStatusDefault(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 - } -} - -// NewGetClusterUpgradeStatusOK creates a GetClusterUpgradeStatusOK with default headers values -func NewGetClusterUpgradeStatusOK() *GetClusterUpgradeStatusOK { - return &GetClusterUpgradeStatusOK{} -} - -/* -GetClusterUpgradeStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterUpgradeStatusOK struct { - Payload *models.ClusterUpgradeStatus -} - -// IsSuccess returns true when this get cluster upgrade status o k response has a 2xx status code -func (o *GetClusterUpgradeStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster upgrade status o k response has a 3xx status code -func (o *GetClusterUpgradeStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster upgrade status o k response has a 4xx status code -func (o *GetClusterUpgradeStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster upgrade status o k response has a 5xx status code -func (o *GetClusterUpgradeStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster upgrade status o k response a status code equal to that given -func (o *GetClusterUpgradeStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster upgrade status o k response -func (o *GetClusterUpgradeStatusOK) Code() int { - return 200 -} - -func (o *GetClusterUpgradeStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterUpgradeStatus][%d] getClusterUpgradeStatusOK %s", 200, payload) -} - -func (o *GetClusterUpgradeStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterUpgradeStatus][%d] getClusterUpgradeStatusOK %s", 200, payload) -} - -func (o *GetClusterUpgradeStatusOK) GetPayload() *models.ClusterUpgradeStatus { - return o.Payload -} - -func (o *GetClusterUpgradeStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterUpgradeStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterUpgradeStatusDefault creates a GetClusterUpgradeStatusDefault with default headers values -func NewGetClusterUpgradeStatusDefault(code int) *GetClusterUpgradeStatusDefault { - return &GetClusterUpgradeStatusDefault{ - _statusCode: code, - } -} - -/* -GetClusterUpgradeStatusDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetClusterUpgradeStatusDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get cluster upgrade status default response has a 2xx status code -func (o *GetClusterUpgradeStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster upgrade status default response has a 3xx status code -func (o *GetClusterUpgradeStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster upgrade status default response has a 4xx status code -func (o *GetClusterUpgradeStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster upgrade status default response has a 5xx status code -func (o *GetClusterUpgradeStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster upgrade status default response a status code equal to that given -func (o *GetClusterUpgradeStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster upgrade status default response -func (o *GetClusterUpgradeStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterUpgradeStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterUpgradeStatus][%d] GetClusterUpgradeStatus default %s", o._statusCode, payload) -} - -func (o *GetClusterUpgradeStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusterUpgradeStatus][%d] GetClusterUpgradeStatus default %s", o._statusCode, payload) -} - -func (o *GetClusterUpgradeStatusDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetClusterUpgradeStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_external_client_subnets_parameters.go b/v1/client/clusters/get_external_client_subnets_parameters.go deleted file mode 100644 index fbcdfea6..00000000 --- a/v1/client/clusters/get_external_client_subnets_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/go-openapi/swag" -) - -// NewGetExternalClientSubnetsParams creates a new GetExternalClientSubnetsParams 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 NewGetExternalClientSubnetsParams() *GetExternalClientSubnetsParams { - return &GetExternalClientSubnetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalClientSubnetsParamsWithTimeout creates a new GetExternalClientSubnetsParams object -// with the ability to set a timeout on a request. -func NewGetExternalClientSubnetsParamsWithTimeout(timeout time.Duration) *GetExternalClientSubnetsParams { - return &GetExternalClientSubnetsParams{ - timeout: timeout, - } -} - -// NewGetExternalClientSubnetsParamsWithContext creates a new GetExternalClientSubnetsParams object -// with the ability to set a context for a request. -func NewGetExternalClientSubnetsParamsWithContext(ctx context.Context) *GetExternalClientSubnetsParams { - return &GetExternalClientSubnetsParams{ - Context: ctx, - } -} - -// NewGetExternalClientSubnetsParamsWithHTTPClient creates a new GetExternalClientSubnetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalClientSubnetsParamsWithHTTPClient(client *http.Client) *GetExternalClientSubnetsParams { - return &GetExternalClientSubnetsParams{ - HTTPClient: client, - } -} - -/* -GetExternalClientSubnetsParams contains all the parameters to send to the API endpoint - - for the get external client subnets operation. - - Typically these are written to a http.Request. -*/ -type GetExternalClientSubnetsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external client subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalClientSubnetsParams) WithDefaults() *GetExternalClientSubnetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external client subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalClientSubnetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external client subnets params -func (o *GetExternalClientSubnetsParams) WithTimeout(timeout time.Duration) *GetExternalClientSubnetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external client subnets params -func (o *GetExternalClientSubnetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external client subnets params -func (o *GetExternalClientSubnetsParams) WithContext(ctx context.Context) *GetExternalClientSubnetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external client subnets params -func (o *GetExternalClientSubnetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external client subnets params -func (o *GetExternalClientSubnetsParams) WithHTTPClient(client *http.Client) *GetExternalClientSubnetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external client subnets params -func (o *GetExternalClientSubnetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get external client subnets params -func (o *GetExternalClientSubnetsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetExternalClientSubnetsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get external client subnets params -func (o *GetExternalClientSubnetsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithTenantIds adds the tenantIds to the get external client subnets params -func (o *GetExternalClientSubnetsParams) WithTenantIds(tenantIds []string) *GetExternalClientSubnetsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get external client subnets params -func (o *GetExternalClientSubnetsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalClientSubnetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetExternalClientSubnets binds the parameter tenantIds -func (o *GetExternalClientSubnetsParams) 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/v1/client/clusters/get_external_client_subnets_responses.go b/v1/client/clusters/get_external_client_subnets_responses.go deleted file mode 100644 index ab57e94b..00000000 --- a/v1/client/clusters/get_external_client_subnets_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetExternalClientSubnetsReader is a Reader for the GetExternalClientSubnets structure. -type GetExternalClientSubnetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalClientSubnetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalClientSubnetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalClientSubnetsDefault(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 - } -} - -// NewGetExternalClientSubnetsOK creates a GetExternalClientSubnetsOK with default headers values -func NewGetExternalClientSubnetsOK() *GetExternalClientSubnetsOK { - return &GetExternalClientSubnetsOK{} -} - -/* -GetExternalClientSubnetsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalClientSubnetsOK struct { - Payload *models.ExternalClientSubnets -} - -// IsSuccess returns true when this get external client subnets o k response has a 2xx status code -func (o *GetExternalClientSubnetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external client subnets o k response has a 3xx status code -func (o *GetExternalClientSubnetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external client subnets o k response has a 4xx status code -func (o *GetExternalClientSubnetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external client subnets o k response has a 5xx status code -func (o *GetExternalClientSubnetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external client subnets o k response a status code equal to that given -func (o *GetExternalClientSubnetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external client subnets o k response -func (o *GetExternalClientSubnetsOK) Code() int { - return 200 -} - -func (o *GetExternalClientSubnetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/externalClientSubnets][%d] getExternalClientSubnetsOK %s", 200, payload) -} - -func (o *GetExternalClientSubnetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/externalClientSubnets][%d] getExternalClientSubnetsOK %s", 200, payload) -} - -func (o *GetExternalClientSubnetsOK) GetPayload() *models.ExternalClientSubnets { - return o.Payload -} - -func (o *GetExternalClientSubnetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalClientSubnets) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalClientSubnetsDefault creates a GetExternalClientSubnetsDefault with default headers values -func NewGetExternalClientSubnetsDefault(code int) *GetExternalClientSubnetsDefault { - return &GetExternalClientSubnetsDefault{ - _statusCode: code, - } -} - -/* -GetExternalClientSubnetsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalClientSubnetsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get external client subnets default response has a 2xx status code -func (o *GetExternalClientSubnetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external client subnets default response has a 3xx status code -func (o *GetExternalClientSubnetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external client subnets default response has a 4xx status code -func (o *GetExternalClientSubnetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external client subnets default response has a 5xx status code -func (o *GetExternalClientSubnetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external client subnets default response a status code equal to that given -func (o *GetExternalClientSubnetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external client subnets default response -func (o *GetExternalClientSubnetsDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalClientSubnetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/externalClientSubnets][%d] GetExternalClientSubnets default %s", o._statusCode, payload) -} - -func (o *GetExternalClientSubnetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/externalClientSubnets][%d] GetExternalClientSubnets default %s", o._statusCode, payload) -} - -func (o *GetExternalClientSubnetsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetExternalClientSubnetsDefault) 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/clusters/get_io_preferential_tier_mixin0_parameters.go b/v1/client/clusters/get_io_preferential_tier_mixin0_parameters.go deleted file mode 100644 index 29c6d5cb..00000000 --- a/v1/client/clusters/get_io_preferential_tier_mixin0_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetIoPreferentialTierMixin0Params creates a new GetIoPreferentialTierMixin0Params 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 NewGetIoPreferentialTierMixin0Params() *GetIoPreferentialTierMixin0Params { - return &GetIoPreferentialTierMixin0Params{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIoPreferentialTierMixin0ParamsWithTimeout creates a new GetIoPreferentialTierMixin0Params object -// with the ability to set a timeout on a request. -func NewGetIoPreferentialTierMixin0ParamsWithTimeout(timeout time.Duration) *GetIoPreferentialTierMixin0Params { - return &GetIoPreferentialTierMixin0Params{ - timeout: timeout, - } -} - -// NewGetIoPreferentialTierMixin0ParamsWithContext creates a new GetIoPreferentialTierMixin0Params object -// with the ability to set a context for a request. -func NewGetIoPreferentialTierMixin0ParamsWithContext(ctx context.Context) *GetIoPreferentialTierMixin0Params { - return &GetIoPreferentialTierMixin0Params{ - Context: ctx, - } -} - -// NewGetIoPreferentialTierMixin0ParamsWithHTTPClient creates a new GetIoPreferentialTierMixin0Params object -// with the ability to set a custom HTTPClient for a request. -func NewGetIoPreferentialTierMixin0ParamsWithHTTPClient(client *http.Client) *GetIoPreferentialTierMixin0Params { - return &GetIoPreferentialTierMixin0Params{ - HTTPClient: client, - } -} - -/* -GetIoPreferentialTierMixin0Params contains all the parameters to send to the API endpoint - - for the get io preferential tier mixin0 operation. - - Typically these are written to a http.Request. -*/ -type GetIoPreferentialTierMixin0Params struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get io preferential tier mixin0 params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIoPreferentialTierMixin0Params) WithDefaults() *GetIoPreferentialTierMixin0Params { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get io preferential tier mixin0 params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIoPreferentialTierMixin0Params) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) WithTimeout(timeout time.Duration) *GetIoPreferentialTierMixin0Params { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) WithContext(ctx context.Context) *GetIoPreferentialTierMixin0Params { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) WithHTTPClient(client *http.Client) *GetIoPreferentialTierMixin0Params { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get io preferential tier mixin0 params -func (o *GetIoPreferentialTierMixin0Params) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIoPreferentialTierMixin0Params) 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/clusters/get_io_preferential_tier_mixin0_responses.go b/v1/client/clusters/get_io_preferential_tier_mixin0_responses.go deleted file mode 100644 index 23890dbf..00000000 --- a/v1/client/clusters/get_io_preferential_tier_mixin0_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetIoPreferentialTierMixin0Reader is a Reader for the GetIoPreferentialTierMixin0 structure. -type GetIoPreferentialTierMixin0Reader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIoPreferentialTierMixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIoPreferentialTierMixin0OK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIoPreferentialTierMixin0Default(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 - } -} - -// NewGetIoPreferentialTierMixin0OK creates a GetIoPreferentialTierMixin0OK with default headers values -func NewGetIoPreferentialTierMixin0OK() *GetIoPreferentialTierMixin0OK { - return &GetIoPreferentialTierMixin0OK{} -} - -/* -GetIoPreferentialTierMixin0OK describes a response with status code 200, with default header values. - -Success -*/ -type GetIoPreferentialTierMixin0OK struct { - Payload *models.IoPreferentialTier -} - -// IsSuccess returns true when this get io preferential tier mixin0 o k response has a 2xx status code -func (o *GetIoPreferentialTierMixin0OK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get io preferential tier mixin0 o k response has a 3xx status code -func (o *GetIoPreferentialTierMixin0OK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get io preferential tier mixin0 o k response has a 4xx status code -func (o *GetIoPreferentialTierMixin0OK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get io preferential tier mixin0 o k response has a 5xx status code -func (o *GetIoPreferentialTierMixin0OK) IsServerError() bool { - return false -} - -// IsCode returns true when this get io preferential tier mixin0 o k response a status code equal to that given -func (o *GetIoPreferentialTierMixin0OK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get io preferential tier mixin0 o k response -func (o *GetIoPreferentialTierMixin0OK) Code() int { - return 200 -} - -func (o *GetIoPreferentialTierMixin0OK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/ioPreferentialTier][%d] getIoPreferentialTierMixin0OK %s", 200, payload) -} - -func (o *GetIoPreferentialTierMixin0OK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/ioPreferentialTier][%d] getIoPreferentialTierMixin0OK %s", 200, payload) -} - -func (o *GetIoPreferentialTierMixin0OK) GetPayload() *models.IoPreferentialTier { - return o.Payload -} - -func (o *GetIoPreferentialTierMixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IoPreferentialTier) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIoPreferentialTierMixin0Default creates a GetIoPreferentialTierMixin0Default with default headers values -func NewGetIoPreferentialTierMixin0Default(code int) *GetIoPreferentialTierMixin0Default { - return &GetIoPreferentialTierMixin0Default{ - _statusCode: code, - } -} - -/* -GetIoPreferentialTierMixin0Default describes a response with status code -1, with default header values. - -Error -*/ -type GetIoPreferentialTierMixin0Default struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get io preferential tier mixin0 default response has a 2xx status code -func (o *GetIoPreferentialTierMixin0Default) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get io preferential tier mixin0 default response has a 3xx status code -func (o *GetIoPreferentialTierMixin0Default) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get io preferential tier mixin0 default response has a 4xx status code -func (o *GetIoPreferentialTierMixin0Default) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get io preferential tier mixin0 default response has a 5xx status code -func (o *GetIoPreferentialTierMixin0Default) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get io preferential tier mixin0 default response a status code equal to that given -func (o *GetIoPreferentialTierMixin0Default) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get io preferential tier mixin0 default response -func (o *GetIoPreferentialTierMixin0Default) Code() int { - return o._statusCode -} - -func (o *GetIoPreferentialTierMixin0Default) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/ioPreferentialTier][%d] GetIoPreferentialTierMixin0 default %s", o._statusCode, payload) -} - -func (o *GetIoPreferentialTierMixin0Default) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/ioPreferentialTier][%d] GetIoPreferentialTierMixin0 default %s", o._statusCode, payload) -} - -func (o *GetIoPreferentialTierMixin0Default) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIoPreferentialTierMixin0Default) 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/v1/client/clusters/get_io_preferential_tier_parameters.go b/v1/client/clusters/get_io_preferential_tier_parameters.go deleted file mode 100644 index 047dc672..00000000 --- a/v1/client/clusters/get_io_preferential_tier_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetIoPreferentialTierParams creates a new GetIoPreferentialTierParams 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 NewGetIoPreferentialTierParams() *GetIoPreferentialTierParams { - return &GetIoPreferentialTierParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIoPreferentialTierParamsWithTimeout creates a new GetIoPreferentialTierParams object -// with the ability to set a timeout on a request. -func NewGetIoPreferentialTierParamsWithTimeout(timeout time.Duration) *GetIoPreferentialTierParams { - return &GetIoPreferentialTierParams{ - timeout: timeout, - } -} - -// NewGetIoPreferentialTierParamsWithContext creates a new GetIoPreferentialTierParams object -// with the ability to set a context for a request. -func NewGetIoPreferentialTierParamsWithContext(ctx context.Context) *GetIoPreferentialTierParams { - return &GetIoPreferentialTierParams{ - Context: ctx, - } -} - -// NewGetIoPreferentialTierParamsWithHTTPClient creates a new GetIoPreferentialTierParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIoPreferentialTierParamsWithHTTPClient(client *http.Client) *GetIoPreferentialTierParams { - return &GetIoPreferentialTierParams{ - HTTPClient: client, - } -} - -/* -GetIoPreferentialTierParams contains all the parameters to send to the API endpoint - - for the get io preferential tier operation. - - Typically these are written to a http.Request. -*/ -type GetIoPreferentialTierParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIoPreferentialTierParams) WithDefaults() *GetIoPreferentialTierParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIoPreferentialTierParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get io preferential tier params -func (o *GetIoPreferentialTierParams) WithTimeout(timeout time.Duration) *GetIoPreferentialTierParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get io preferential tier params -func (o *GetIoPreferentialTierParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get io preferential tier params -func (o *GetIoPreferentialTierParams) WithContext(ctx context.Context) *GetIoPreferentialTierParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get io preferential tier params -func (o *GetIoPreferentialTierParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get io preferential tier params -func (o *GetIoPreferentialTierParams) WithHTTPClient(client *http.Client) *GetIoPreferentialTierParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get io preferential tier params -func (o *GetIoPreferentialTierParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIoPreferentialTierParams) 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/clusters/get_io_preferential_tier_responses.go b/v1/client/clusters/get_io_preferential_tier_responses.go deleted file mode 100644 index 337f0219..00000000 --- a/v1/client/clusters/get_io_preferential_tier_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetIoPreferentialTierReader is a Reader for the GetIoPreferentialTier structure. -type GetIoPreferentialTierReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIoPreferentialTierReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIoPreferentialTierOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIoPreferentialTierDefault(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 - } -} - -// NewGetIoPreferentialTierOK creates a GetIoPreferentialTierOK with default headers values -func NewGetIoPreferentialTierOK() *GetIoPreferentialTierOK { - return &GetIoPreferentialTierOK{} -} - -/* -GetIoPreferentialTierOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIoPreferentialTierOK struct { - Payload *models.PrivateIoPreferentialTier -} - -// IsSuccess returns true when this get io preferential tier o k response has a 2xx status code -func (o *GetIoPreferentialTierOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get io preferential tier o k response has a 3xx status code -func (o *GetIoPreferentialTierOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get io preferential tier o k response has a 4xx status code -func (o *GetIoPreferentialTierOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get io preferential tier o k response has a 5xx status code -func (o *GetIoPreferentialTierOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get io preferential tier o k response a status code equal to that given -func (o *GetIoPreferentialTierOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get io preferential tier o k response -func (o *GetIoPreferentialTierOK) Code() int { - return 200 -} - -func (o *GetIoPreferentialTierOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ioPreferentialTier][%d] getIoPreferentialTierOK %s", 200, payload) -} - -func (o *GetIoPreferentialTierOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ioPreferentialTier][%d] getIoPreferentialTierOK %s", 200, payload) -} - -func (o *GetIoPreferentialTierOK) GetPayload() *models.PrivateIoPreferentialTier { - return o.Payload -} - -func (o *GetIoPreferentialTierOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateIoPreferentialTier) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIoPreferentialTierDefault creates a GetIoPreferentialTierDefault with default headers values -func NewGetIoPreferentialTierDefault(code int) *GetIoPreferentialTierDefault { - return &GetIoPreferentialTierDefault{ - _statusCode: code, - } -} - -/* -GetIoPreferentialTierDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetIoPreferentialTierDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get io preferential tier default response has a 2xx status code -func (o *GetIoPreferentialTierDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get io preferential tier default response has a 3xx status code -func (o *GetIoPreferentialTierDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get io preferential tier default response has a 4xx status code -func (o *GetIoPreferentialTierDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get io preferential tier default response has a 5xx status code -func (o *GetIoPreferentialTierDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get io preferential tier default response a status code equal to that given -func (o *GetIoPreferentialTierDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get io preferential tier default response -func (o *GetIoPreferentialTierDefault) Code() int { - return o._statusCode -} - -func (o *GetIoPreferentialTierDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ioPreferentialTier][%d] GetIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *GetIoPreferentialTierDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ioPreferentialTier][%d] GetIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *GetIoPreferentialTierDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetIoPreferentialTierDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_n_f_s_export_paths_parameters.go b/v1/client/clusters/get_n_f_s_export_paths_parameters.go deleted file mode 100644 index 569e01a0..00000000 --- a/v1/client/clusters/get_n_f_s_export_paths_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetNFSExportPathsParams creates a new GetNFSExportPathsParams 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 NewGetNFSExportPathsParams() *GetNFSExportPathsParams { - return &GetNFSExportPathsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNFSExportPathsParamsWithTimeout creates a new GetNFSExportPathsParams object -// with the ability to set a timeout on a request. -func NewGetNFSExportPathsParamsWithTimeout(timeout time.Duration) *GetNFSExportPathsParams { - return &GetNFSExportPathsParams{ - timeout: timeout, - } -} - -// NewGetNFSExportPathsParamsWithContext creates a new GetNFSExportPathsParams object -// with the ability to set a context for a request. -func NewGetNFSExportPathsParamsWithContext(ctx context.Context) *GetNFSExportPathsParams { - return &GetNFSExportPathsParams{ - Context: ctx, - } -} - -// NewGetNFSExportPathsParamsWithHTTPClient creates a new GetNFSExportPathsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNFSExportPathsParamsWithHTTPClient(client *http.Client) *GetNFSExportPathsParams { - return &GetNFSExportPathsParams{ - HTTPClient: client, - } -} - -/* -GetNFSExportPathsParams contains all the parameters to send to the API endpoint - - for the get n f s export paths operation. - - Typically these are written to a http.Request. -*/ -type GetNFSExportPathsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get n f s export paths params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNFSExportPathsParams) WithDefaults() *GetNFSExportPathsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get n f s export paths params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNFSExportPathsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get n f s export paths params -func (o *GetNFSExportPathsParams) WithTimeout(timeout time.Duration) *GetNFSExportPathsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get n f s export paths params -func (o *GetNFSExportPathsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get n f s export paths params -func (o *GetNFSExportPathsParams) WithContext(ctx context.Context) *GetNFSExportPathsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get n f s export paths params -func (o *GetNFSExportPathsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get n f s export paths params -func (o *GetNFSExportPathsParams) WithHTTPClient(client *http.Client) *GetNFSExportPathsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get n f s export paths params -func (o *GetNFSExportPathsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNFSExportPathsParams) 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/clusters/get_n_f_s_export_paths_responses.go b/v1/client/clusters/get_n_f_s_export_paths_responses.go deleted file mode 100644 index c5c5c979..00000000 --- a/v1/client/clusters/get_n_f_s_export_paths_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNFSExportPathsReader is a Reader for the GetNFSExportPaths structure. -type GetNFSExportPathsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNFSExportPathsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNFSExportPathsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNFSExportPathsDefault(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 - } -} - -// NewGetNFSExportPathsOK creates a GetNFSExportPathsOK with default headers values -func NewGetNFSExportPathsOK() *GetNFSExportPathsOK { - return &GetNFSExportPathsOK{} -} - -/* -GetNFSExportPathsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNFSExportPathsOK struct { - Payload *models.NFSExportPaths -} - -// IsSuccess returns true when this get n f s export paths o k response has a 2xx status code -func (o *GetNFSExportPathsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get n f s export paths o k response has a 3xx status code -func (o *GetNFSExportPathsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get n f s export paths o k response has a 4xx status code -func (o *GetNFSExportPathsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get n f s export paths o k response has a 5xx status code -func (o *GetNFSExportPathsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get n f s export paths o k response a status code equal to that given -func (o *GetNFSExportPathsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get n f s export paths o k response -func (o *GetNFSExportPathsOK) Code() int { - return 200 -} - -func (o *GetNFSExportPathsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nfsExportPaths][%d] getNFSExportPathsOK %s", 200, payload) -} - -func (o *GetNFSExportPathsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nfsExportPaths][%d] getNFSExportPathsOK %s", 200, payload) -} - -func (o *GetNFSExportPathsOK) GetPayload() *models.NFSExportPaths { - return o.Payload -} - -func (o *GetNFSExportPathsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NFSExportPaths) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNFSExportPathsDefault creates a GetNFSExportPathsDefault with default headers values -func NewGetNFSExportPathsDefault(code int) *GetNFSExportPathsDefault { - return &GetNFSExportPathsDefault{ - _statusCode: code, - } -} - -/* -GetNFSExportPathsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetNFSExportPathsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get n f s export paths default response has a 2xx status code -func (o *GetNFSExportPathsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get n f s export paths default response has a 3xx status code -func (o *GetNFSExportPathsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get n f s export paths default response has a 4xx status code -func (o *GetNFSExportPathsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get n f s export paths default response has a 5xx status code -func (o *GetNFSExportPathsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get n f s export paths default response a status code equal to that given -func (o *GetNFSExportPathsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get n f s export paths default response -func (o *GetNFSExportPathsDefault) Code() int { - return o._statusCode -} - -func (o *GetNFSExportPathsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nfsExportPaths][%d] GetNFSExportPaths default %s", o._statusCode, payload) -} - -func (o *GetNFSExportPathsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nfsExportPaths][%d] GetNFSExportPaths default %s", o._statusCode, payload) -} - -func (o *GetNFSExportPathsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetNFSExportPathsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_ntp_servers_parameters.go b/v1/client/clusters/get_ntp_servers_parameters.go deleted file mode 100644 index 92f0ce7b..00000000 --- a/v1/client/clusters/get_ntp_servers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetNtpServersParams creates a new GetNtpServersParams 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 NewGetNtpServersParams() *GetNtpServersParams { - return &GetNtpServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNtpServersParamsWithTimeout creates a new GetNtpServersParams object -// with the ability to set a timeout on a request. -func NewGetNtpServersParamsWithTimeout(timeout time.Duration) *GetNtpServersParams { - return &GetNtpServersParams{ - timeout: timeout, - } -} - -// NewGetNtpServersParamsWithContext creates a new GetNtpServersParams object -// with the ability to set a context for a request. -func NewGetNtpServersParamsWithContext(ctx context.Context) *GetNtpServersParams { - return &GetNtpServersParams{ - Context: ctx, - } -} - -// NewGetNtpServersParamsWithHTTPClient creates a new GetNtpServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNtpServersParamsWithHTTPClient(client *http.Client) *GetNtpServersParams { - return &GetNtpServersParams{ - HTTPClient: client, - } -} - -/* -GetNtpServersParams contains all the parameters to send to the API endpoint - - for the get ntp servers operation. - - Typically these are written to a http.Request. -*/ -type GetNtpServersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ntp servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNtpServersParams) WithDefaults() *GetNtpServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ntp servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNtpServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ntp servers params -func (o *GetNtpServersParams) WithTimeout(timeout time.Duration) *GetNtpServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ntp servers params -func (o *GetNtpServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ntp servers params -func (o *GetNtpServersParams) WithContext(ctx context.Context) *GetNtpServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ntp servers params -func (o *GetNtpServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ntp servers params -func (o *GetNtpServersParams) WithHTTPClient(client *http.Client) *GetNtpServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ntp servers params -func (o *GetNtpServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNtpServersParams) 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/clusters/get_ntp_servers_responses.go b/v1/client/clusters/get_ntp_servers_responses.go deleted file mode 100644 index aa0120f7..00000000 --- a/v1/client/clusters/get_ntp_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNtpServersReader is a Reader for the GetNtpServers structure. -type GetNtpServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNtpServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNtpServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNtpServersDefault(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 - } -} - -// NewGetNtpServersOK creates a GetNtpServersOK with default headers values -func NewGetNtpServersOK() *GetNtpServersOK { - return &GetNtpServersOK{} -} - -/* -GetNtpServersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNtpServersOK struct { - Payload *models.NtpServers -} - -// IsSuccess returns true when this get ntp servers o k response has a 2xx status code -func (o *GetNtpServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ntp servers o k response has a 3xx status code -func (o *GetNtpServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ntp servers o k response has a 4xx status code -func (o *GetNtpServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ntp servers o k response has a 5xx status code -func (o *GetNtpServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ntp servers o k response a status code equal to that given -func (o *GetNtpServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ntp servers o k response -func (o *GetNtpServersOK) Code() int { - return 200 -} - -func (o *GetNtpServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ntpServers][%d] getNtpServersOK %s", 200, payload) -} - -func (o *GetNtpServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ntpServers][%d] getNtpServersOK %s", 200, payload) -} - -func (o *GetNtpServersOK) GetPayload() *models.NtpServers { - return o.Payload -} - -func (o *GetNtpServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NtpServers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNtpServersDefault creates a GetNtpServersDefault with default headers values -func NewGetNtpServersDefault(code int) *GetNtpServersDefault { - return &GetNtpServersDefault{ - _statusCode: code, - } -} - -/* -GetNtpServersDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetNtpServersDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get ntp servers default response has a 2xx status code -func (o *GetNtpServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ntp servers default response has a 3xx status code -func (o *GetNtpServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ntp servers default response has a 4xx status code -func (o *GetNtpServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ntp servers default response has a 5xx status code -func (o *GetNtpServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ntp servers default response a status code equal to that given -func (o *GetNtpServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ntp servers default response -func (o *GetNtpServersDefault) Code() int { - return o._statusCode -} - -func (o *GetNtpServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ntpServers][%d] GetNtpServers default %s", o._statusCode, payload) -} - -func (o *GetNtpServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ntpServers][%d] GetNtpServers default %s", o._statusCode, payload) -} - -func (o *GetNtpServersDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetNtpServersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_proxy_servers_parameters.go b/v1/client/clusters/get_proxy_servers_parameters.go deleted file mode 100644 index 4805b038..00000000 --- a/v1/client/clusters/get_proxy_servers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetProxyServersParams creates a new GetProxyServersParams 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 NewGetProxyServersParams() *GetProxyServersParams { - return &GetProxyServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProxyServersParamsWithTimeout creates a new GetProxyServersParams object -// with the ability to set a timeout on a request. -func NewGetProxyServersParamsWithTimeout(timeout time.Duration) *GetProxyServersParams { - return &GetProxyServersParams{ - timeout: timeout, - } -} - -// NewGetProxyServersParamsWithContext creates a new GetProxyServersParams object -// with the ability to set a context for a request. -func NewGetProxyServersParamsWithContext(ctx context.Context) *GetProxyServersParams { - return &GetProxyServersParams{ - Context: ctx, - } -} - -// NewGetProxyServersParamsWithHTTPClient creates a new GetProxyServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProxyServersParamsWithHTTPClient(client *http.Client) *GetProxyServersParams { - return &GetProxyServersParams{ - HTTPClient: client, - } -} - -/* -GetProxyServersParams contains all the parameters to send to the API endpoint - - for the get proxy servers operation. - - Typically these are written to a http.Request. -*/ -type GetProxyServersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get proxy servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProxyServersParams) WithDefaults() *GetProxyServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get proxy servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProxyServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get proxy servers params -func (o *GetProxyServersParams) WithTimeout(timeout time.Duration) *GetProxyServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get proxy servers params -func (o *GetProxyServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get proxy servers params -func (o *GetProxyServersParams) WithContext(ctx context.Context) *GetProxyServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get proxy servers params -func (o *GetProxyServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get proxy servers params -func (o *GetProxyServersParams) WithHTTPClient(client *http.Client) *GetProxyServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get proxy servers params -func (o *GetProxyServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProxyServersParams) 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/clusters/get_proxy_servers_responses.go b/v1/client/clusters/get_proxy_servers_responses.go deleted file mode 100644 index 08f08e32..00000000 --- a/v1/client/clusters/get_proxy_servers_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProxyServersReader is a Reader for the GetProxyServers structure. -type GetProxyServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProxyServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProxyServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProxyServersDefault(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 - } -} - -// NewGetProxyServersOK creates a GetProxyServersOK with default headers values -func NewGetProxyServersOK() *GetProxyServersOK { - return &GetProxyServersOK{} -} - -/* -GetProxyServersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProxyServersOK struct { - Payload []*models.ProxyServer -} - -// IsSuccess returns true when this get proxy servers o k response has a 2xx status code -func (o *GetProxyServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get proxy servers o k response has a 3xx status code -func (o *GetProxyServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get proxy servers o k response has a 4xx status code -func (o *GetProxyServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get proxy servers o k response has a 5xx status code -func (o *GetProxyServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get proxy servers o k response a status code equal to that given -func (o *GetProxyServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get proxy servers o k response -func (o *GetProxyServersOK) Code() int { - return 200 -} - -func (o *GetProxyServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /proxyServers][%d] getProxyServersOK %s", 200, payload) -} - -func (o *GetProxyServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /proxyServers][%d] getProxyServersOK %s", 200, payload) -} - -func (o *GetProxyServersOK) GetPayload() []*models.ProxyServer { - return o.Payload -} - -func (o *GetProxyServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProxyServersDefault creates a GetProxyServersDefault with default headers values -func NewGetProxyServersDefault(code int) *GetProxyServersDefault { - return &GetProxyServersDefault{ - _statusCode: code, - } -} - -/* -GetProxyServersDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetProxyServersDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get proxy servers default response has a 2xx status code -func (o *GetProxyServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get proxy servers default response has a 3xx status code -func (o *GetProxyServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get proxy servers default response has a 4xx status code -func (o *GetProxyServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get proxy servers default response has a 5xx status code -func (o *GetProxyServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get proxy servers default response a status code equal to that given -func (o *GetProxyServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get proxy servers default response -func (o *GetProxyServersDefault) Code() int { - return o._statusCode -} - -func (o *GetProxyServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /proxyServers][%d] GetProxyServers default %s", o._statusCode, payload) -} - -func (o *GetProxyServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /proxyServers][%d] GetProxyServers default %s", o._statusCode, payload) -} - -func (o *GetProxyServersDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetProxyServersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/get_service_gflag_parameters.go b/v1/client/clusters/get_service_gflag_parameters.go deleted file mode 100644 index d97d0d1a..00000000 --- a/v1/client/clusters/get_service_gflag_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewGetServiceGflagParams creates a new GetServiceGflagParams 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 NewGetServiceGflagParams() *GetServiceGflagParams { - return &GetServiceGflagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetServiceGflagParamsWithTimeout creates a new GetServiceGflagParams object -// with the ability to set a timeout on a request. -func NewGetServiceGflagParamsWithTimeout(timeout time.Duration) *GetServiceGflagParams { - return &GetServiceGflagParams{ - timeout: timeout, - } -} - -// NewGetServiceGflagParamsWithContext creates a new GetServiceGflagParams object -// with the ability to set a context for a request. -func NewGetServiceGflagParamsWithContext(ctx context.Context) *GetServiceGflagParams { - return &GetServiceGflagParams{ - Context: ctx, - } -} - -// NewGetServiceGflagParamsWithHTTPClient creates a new GetServiceGflagParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetServiceGflagParamsWithHTTPClient(client *http.Client) *GetServiceGflagParams { - return &GetServiceGflagParams{ - HTTPClient: client, - } -} - -/* -GetServiceGflagParams contains all the parameters to send to the API endpoint - - for the get service gflag operation. - - Typically these are written to a http.Request. -*/ -type GetServiceGflagParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get service gflag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceGflagParams) WithDefaults() *GetServiceGflagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get service gflag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceGflagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get service gflag params -func (o *GetServiceGflagParams) WithTimeout(timeout time.Duration) *GetServiceGflagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get service gflag params -func (o *GetServiceGflagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get service gflag params -func (o *GetServiceGflagParams) WithContext(ctx context.Context) *GetServiceGflagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get service gflag params -func (o *GetServiceGflagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get service gflag params -func (o *GetServiceGflagParams) WithHTTPClient(client *http.Client) *GetServiceGflagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get service gflag params -func (o *GetServiceGflagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetServiceGflagParams) 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/clusters/get_service_gflag_responses.go b/v1/client/clusters/get_service_gflag_responses.go deleted file mode 100644 index 9d56ee70..00000000 --- a/v1/client/clusters/get_service_gflag_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetServiceGflagReader is a Reader for the GetServiceGflag structure. -type GetServiceGflagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetServiceGflagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetServiceGflagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetServiceGflagDefault(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 - } -} - -// NewGetServiceGflagOK creates a GetServiceGflagOK with default headers values -func NewGetServiceGflagOK() *GetServiceGflagOK { - return &GetServiceGflagOK{} -} - -/* -GetServiceGflagOK describes a response with status code 200, with default header values. - -Success -*/ -type GetServiceGflagOK struct { - Payload []*models.ServiceGflags -} - -// IsSuccess returns true when this get service gflag o k response has a 2xx status code -func (o *GetServiceGflagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get service gflag o k response has a 3xx status code -func (o *GetServiceGflagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get service gflag o k response has a 4xx status code -func (o *GetServiceGflagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get service gflag o k response has a 5xx status code -func (o *GetServiceGflagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get service gflag o k response a status code equal to that given -func (o *GetServiceGflagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get service gflag o k response -func (o *GetServiceGflagOK) Code() int { - return 200 -} - -func (o *GetServiceGflagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/gflag][%d] getServiceGflagOK %s", 200, payload) -} - -func (o *GetServiceGflagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/gflag][%d] getServiceGflagOK %s", 200, payload) -} - -func (o *GetServiceGflagOK) GetPayload() []*models.ServiceGflags { - return o.Payload -} - -func (o *GetServiceGflagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetServiceGflagDefault creates a GetServiceGflagDefault with default headers values -func NewGetServiceGflagDefault(code int) *GetServiceGflagDefault { - return &GetServiceGflagDefault{ - _statusCode: code, - } -} - -/* -GetServiceGflagDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetServiceGflagDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get service gflag default response has a 2xx status code -func (o *GetServiceGflagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get service gflag default response has a 3xx status code -func (o *GetServiceGflagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get service gflag default response has a 4xx status code -func (o *GetServiceGflagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get service gflag default response has a 5xx status code -func (o *GetServiceGflagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get service gflag default response a status code equal to that given -func (o *GetServiceGflagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get service gflag default response -func (o *GetServiceGflagDefault) Code() int { - return o._statusCode -} - -func (o *GetServiceGflagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/gflag][%d] GetServiceGflag default %s", o._statusCode, payload) -} - -func (o *GetServiceGflagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/gflag][%d] GetServiceGflag default %s", o._statusCode, payload) -} - -func (o *GetServiceGflagDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetServiceGflagDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/list_service_states_parameters.go b/v1/client/clusters/list_service_states_parameters.go deleted file mode 100644 index 032ce9c2..00000000 --- a/v1/client/clusters/list_service_states_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewListServiceStatesParams creates a new ListServiceStatesParams 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 NewListServiceStatesParams() *ListServiceStatesParams { - return &ListServiceStatesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListServiceStatesParamsWithTimeout creates a new ListServiceStatesParams object -// with the ability to set a timeout on a request. -func NewListServiceStatesParamsWithTimeout(timeout time.Duration) *ListServiceStatesParams { - return &ListServiceStatesParams{ - timeout: timeout, - } -} - -// NewListServiceStatesParamsWithContext creates a new ListServiceStatesParams object -// with the ability to set a context for a request. -func NewListServiceStatesParamsWithContext(ctx context.Context) *ListServiceStatesParams { - return &ListServiceStatesParams{ - Context: ctx, - } -} - -// NewListServiceStatesParamsWithHTTPClient creates a new ListServiceStatesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListServiceStatesParamsWithHTTPClient(client *http.Client) *ListServiceStatesParams { - return &ListServiceStatesParams{ - HTTPClient: client, - } -} - -/* -ListServiceStatesParams contains all the parameters to send to the API endpoint - - for the list service states operation. - - Typically these are written to a http.Request. -*/ -type ListServiceStatesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list service states params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListServiceStatesParams) WithDefaults() *ListServiceStatesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list service states params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListServiceStatesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list service states params -func (o *ListServiceStatesParams) WithTimeout(timeout time.Duration) *ListServiceStatesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list service states params -func (o *ListServiceStatesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list service states params -func (o *ListServiceStatesParams) WithContext(ctx context.Context) *ListServiceStatesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list service states params -func (o *ListServiceStatesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list service states params -func (o *ListServiceStatesParams) WithHTTPClient(client *http.Client) *ListServiceStatesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list service states params -func (o *ListServiceStatesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListServiceStatesParams) 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/clusters/list_service_states_responses.go b/v1/client/clusters/list_service_states_responses.go deleted file mode 100644 index 808da5e1..00000000 --- a/v1/client/clusters/list_service_states_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListServiceStatesReader is a Reader for the ListServiceStates structure. -type ListServiceStatesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListServiceStatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListServiceStatesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListServiceStatesDefault(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 - } -} - -// NewListServiceStatesOK creates a ListServiceStatesOK with default headers values -func NewListServiceStatesOK() *ListServiceStatesOK { - return &ListServiceStatesOK{} -} - -/* -ListServiceStatesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListServiceStatesOK struct { - Payload []*models.ServiceStateResult -} - -// IsSuccess returns true when this list service states o k response has a 2xx status code -func (o *ListServiceStatesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list service states o k response has a 3xx status code -func (o *ListServiceStatesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list service states o k response has a 4xx status code -func (o *ListServiceStatesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list service states o k response has a 5xx status code -func (o *ListServiceStatesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list service states o k response a status code equal to that given -func (o *ListServiceStatesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list service states o k response -func (o *ListServiceStatesOK) Code() int { - return 200 -} - -func (o *ListServiceStatesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/services/states][%d] listServiceStatesOK %s", 200, payload) -} - -func (o *ListServiceStatesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/services/states][%d] listServiceStatesOK %s", 200, payload) -} - -func (o *ListServiceStatesOK) GetPayload() []*models.ServiceStateResult { - return o.Payload -} - -func (o *ListServiceStatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListServiceStatesDefault creates a ListServiceStatesDefault with default headers values -func NewListServiceStatesDefault(code int) *ListServiceStatesDefault { - return &ListServiceStatesDefault{ - _statusCode: code, - } -} - -/* -ListServiceStatesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListServiceStatesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list service states default response has a 2xx status code -func (o *ListServiceStatesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list service states default response has a 3xx status code -func (o *ListServiceStatesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list service states default response has a 4xx status code -func (o *ListServiceStatesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list service states default response has a 5xx status code -func (o *ListServiceStatesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list service states default response a status code equal to that given -func (o *ListServiceStatesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list service states default response -func (o *ListServiceStatesDefault) Code() int { - return o._statusCode -} - -func (o *ListServiceStatesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/services/states][%d] ListServiceStates default %s", o._statusCode, payload) -} - -func (o *ListServiceStatesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/clusters/services/states][%d] ListServiceStates default %s", o._statusCode, payload) -} - -func (o *ListServiceStatesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListServiceStatesDefault) 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/clusters/put_io_preferential_tier_parameters.go b/v1/client/clusters/put_io_preferential_tier_parameters.go deleted file mode 100644 index 6c9c9e07..00000000 --- a/v1/client/clusters/put_io_preferential_tier_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewPutIoPreferentialTierParams creates a new PutIoPreferentialTierParams 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 NewPutIoPreferentialTierParams() *PutIoPreferentialTierParams { - return &PutIoPreferentialTierParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutIoPreferentialTierParamsWithTimeout creates a new PutIoPreferentialTierParams object -// with the ability to set a timeout on a request. -func NewPutIoPreferentialTierParamsWithTimeout(timeout time.Duration) *PutIoPreferentialTierParams { - return &PutIoPreferentialTierParams{ - timeout: timeout, - } -} - -// NewPutIoPreferentialTierParamsWithContext creates a new PutIoPreferentialTierParams object -// with the ability to set a context for a request. -func NewPutIoPreferentialTierParamsWithContext(ctx context.Context) *PutIoPreferentialTierParams { - return &PutIoPreferentialTierParams{ - Context: ctx, - } -} - -// NewPutIoPreferentialTierParamsWithHTTPClient creates a new PutIoPreferentialTierParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutIoPreferentialTierParamsWithHTTPClient(client *http.Client) *PutIoPreferentialTierParams { - return &PutIoPreferentialTierParams{ - HTTPClient: client, - } -} - -/* -PutIoPreferentialTierParams contains all the parameters to send to the API endpoint - - for the put io preferential tier operation. - - Typically these are written to a http.Request. -*/ -type PutIoPreferentialTierParams struct { - - // Body. - Body *models.IoPreferentialTier - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutIoPreferentialTierParams) WithDefaults() *PutIoPreferentialTierParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutIoPreferentialTierParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put io preferential tier params -func (o *PutIoPreferentialTierParams) WithTimeout(timeout time.Duration) *PutIoPreferentialTierParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put io preferential tier params -func (o *PutIoPreferentialTierParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put io preferential tier params -func (o *PutIoPreferentialTierParams) WithContext(ctx context.Context) *PutIoPreferentialTierParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put io preferential tier params -func (o *PutIoPreferentialTierParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put io preferential tier params -func (o *PutIoPreferentialTierParams) WithHTTPClient(client *http.Client) *PutIoPreferentialTierParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put io preferential tier params -func (o *PutIoPreferentialTierParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the put io preferential tier params -func (o *PutIoPreferentialTierParams) WithBody(body *models.IoPreferentialTier) *PutIoPreferentialTierParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the put io preferential tier params -func (o *PutIoPreferentialTierParams) SetBody(body *models.IoPreferentialTier) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PutIoPreferentialTierParams) 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/clusters/put_io_preferential_tier_responses.go b/v1/client/clusters/put_io_preferential_tier_responses.go deleted file mode 100644 index 0f9621e5..00000000 --- a/v1/client/clusters/put_io_preferential_tier_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// PutIoPreferentialTierReader is a Reader for the PutIoPreferentialTier structure. -type PutIoPreferentialTierReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutIoPreferentialTierReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutIoPreferentialTierOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPutIoPreferentialTierDefault(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 - } -} - -// NewPutIoPreferentialTierOK creates a PutIoPreferentialTierOK with default headers values -func NewPutIoPreferentialTierOK() *PutIoPreferentialTierOK { - return &PutIoPreferentialTierOK{} -} - -/* -PutIoPreferentialTierOK describes a response with status code 200, with default header values. - -Success -*/ -type PutIoPreferentialTierOK struct { - Payload *models.IoPreferentialTier -} - -// IsSuccess returns true when this put io preferential tier o k response has a 2xx status code -func (o *PutIoPreferentialTierOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put io preferential tier o k response has a 3xx status code -func (o *PutIoPreferentialTierOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put io preferential tier o k response has a 4xx status code -func (o *PutIoPreferentialTierOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put io preferential tier o k response has a 5xx status code -func (o *PutIoPreferentialTierOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put io preferential tier o k response a status code equal to that given -func (o *PutIoPreferentialTierOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the put io preferential tier o k response -func (o *PutIoPreferentialTierOK) Code() int { - return 200 -} - -func (o *PutIoPreferentialTierOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/ioPreferentialTier][%d] putIoPreferentialTierOK %s", 200, payload) -} - -func (o *PutIoPreferentialTierOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/ioPreferentialTier][%d] putIoPreferentialTierOK %s", 200, payload) -} - -func (o *PutIoPreferentialTierOK) GetPayload() *models.IoPreferentialTier { - return o.Payload -} - -func (o *PutIoPreferentialTierOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IoPreferentialTier) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutIoPreferentialTierDefault creates a PutIoPreferentialTierDefault with default headers values -func NewPutIoPreferentialTierDefault(code int) *PutIoPreferentialTierDefault { - return &PutIoPreferentialTierDefault{ - _statusCode: code, - } -} - -/* -PutIoPreferentialTierDefault describes a response with status code -1, with default header values. - -Error -*/ -type PutIoPreferentialTierDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this put io preferential tier default response has a 2xx status code -func (o *PutIoPreferentialTierDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this put io preferential tier default response has a 3xx status code -func (o *PutIoPreferentialTierDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this put io preferential tier default response has a 4xx status code -func (o *PutIoPreferentialTierDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this put io preferential tier default response has a 5xx status code -func (o *PutIoPreferentialTierDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this put io preferential tier default response a status code equal to that given -func (o *PutIoPreferentialTierDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the put io preferential tier default response -func (o *PutIoPreferentialTierDefault) Code() int { - return o._statusCode -} - -func (o *PutIoPreferentialTierDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/ioPreferentialTier][%d] PutIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *PutIoPreferentialTierDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/ioPreferentialTier][%d] PutIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *PutIoPreferentialTierDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PutIoPreferentialTierDefault) 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/v1/client/clusters/remove_node_parameters.go b/v1/client/clusters/remove_node_parameters.go deleted file mode 100644 index d7b01952..00000000 --- a/v1/client/clusters/remove_node_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/go-openapi/swag" -) - -// NewRemoveNodeParams creates a new RemoveNodeParams 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 NewRemoveNodeParams() *RemoveNodeParams { - return &RemoveNodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveNodeParamsWithTimeout creates a new RemoveNodeParams object -// with the ability to set a timeout on a request. -func NewRemoveNodeParamsWithTimeout(timeout time.Duration) *RemoveNodeParams { - return &RemoveNodeParams{ - timeout: timeout, - } -} - -// NewRemoveNodeParamsWithContext creates a new RemoveNodeParams object -// with the ability to set a context for a request. -func NewRemoveNodeParamsWithContext(ctx context.Context) *RemoveNodeParams { - return &RemoveNodeParams{ - Context: ctx, - } -} - -// NewRemoveNodeParamsWithHTTPClient creates a new RemoveNodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveNodeParamsWithHTTPClient(client *http.Client) *RemoveNodeParams { - return &RemoveNodeParams{ - HTTPClient: client, - } -} - -/* -RemoveNodeParams contains all the parameters to send to the API endpoint - - for the remove node operation. - - Typically these are written to a http.Request. -*/ -type RemoveNodeParams struct { - - /* ID. - - Specifies the ID of the node being removed. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveNodeParams) WithDefaults() *RemoveNodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveNodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove node params -func (o *RemoveNodeParams) WithTimeout(timeout time.Duration) *RemoveNodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove node params -func (o *RemoveNodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove node params -func (o *RemoveNodeParams) WithContext(ctx context.Context) *RemoveNodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove node params -func (o *RemoveNodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove node params -func (o *RemoveNodeParams) WithHTTPClient(client *http.Client) *RemoveNodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove node params -func (o *RemoveNodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the remove node params -func (o *RemoveNodeParams) WithID(id int64) *RemoveNodeParams { - o.SetID(id) - return o -} - -// SetID adds the id to the remove node params -func (o *RemoveNodeParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/clusters/remove_node_responses.go b/v1/client/clusters/remove_node_responses.go deleted file mode 100644 index f6f7c89c..00000000 --- a/v1/client/clusters/remove_node_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RemoveNodeReader is a Reader for the RemoveNode structure. -type RemoveNodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveNodeNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveNodeDefault(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 - } -} - -// NewRemoveNodeNoContent creates a RemoveNodeNoContent with default headers values -func NewRemoveNodeNoContent() *RemoveNodeNoContent { - return &RemoveNodeNoContent{} -} - -/* -RemoveNodeNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveNodeNoContent struct { -} - -// IsSuccess returns true when this remove node no content response has a 2xx status code -func (o *RemoveNodeNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove node no content response has a 3xx status code -func (o *RemoveNodeNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove node no content response has a 4xx status code -func (o *RemoveNodeNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove node no content response has a 5xx status code -func (o *RemoveNodeNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove node no content response a status code equal to that given -func (o *RemoveNodeNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove node no content response -func (o *RemoveNodeNoContent) Code() int { - return 204 -} - -func (o *RemoveNodeNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/clusters/nodes/{id}][%d] removeNodeNoContent", 204) -} - -func (o *RemoveNodeNoContent) String() string { - return fmt.Sprintf("[DELETE /public/clusters/nodes/{id}][%d] removeNodeNoContent", 204) -} - -func (o *RemoveNodeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveNodeDefault creates a RemoveNodeDefault with default headers values -func NewRemoveNodeDefault(code int) *RemoveNodeDefault { - return &RemoveNodeDefault{ - _statusCode: code, - } -} - -/* -RemoveNodeDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveNodeDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this remove node default response has a 2xx status code -func (o *RemoveNodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove node default response has a 3xx status code -func (o *RemoveNodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove node default response has a 4xx status code -func (o *RemoveNodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove node default response has a 5xx status code -func (o *RemoveNodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove node default response a status code equal to that given -func (o *RemoveNodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove node default response -func (o *RemoveNodeDefault) Code() int { - return o._statusCode -} - -func (o *RemoveNodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/clusters/nodes/{id}][%d] RemoveNode default %s", o._statusCode, payload) -} - -func (o *RemoveNodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/clusters/nodes/{id}][%d] RemoveNode default %s", o._statusCode, payload) -} - -func (o *RemoveNodeDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RemoveNodeDefault) 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/clusters/remove_proxy_server_parameters.go b/v1/client/clusters/remove_proxy_server_parameters.go deleted file mode 100644 index 4e2531e2..00000000 --- a/v1/client/clusters/remove_proxy_server_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewRemoveProxyServerParams creates a new RemoveProxyServerParams 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 NewRemoveProxyServerParams() *RemoveProxyServerParams { - return &RemoveProxyServerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveProxyServerParamsWithTimeout creates a new RemoveProxyServerParams object -// with the ability to set a timeout on a request. -func NewRemoveProxyServerParamsWithTimeout(timeout time.Duration) *RemoveProxyServerParams { - return &RemoveProxyServerParams{ - timeout: timeout, - } -} - -// NewRemoveProxyServerParamsWithContext creates a new RemoveProxyServerParams object -// with the ability to set a context for a request. -func NewRemoveProxyServerParamsWithContext(ctx context.Context) *RemoveProxyServerParams { - return &RemoveProxyServerParams{ - Context: ctx, - } -} - -// NewRemoveProxyServerParamsWithHTTPClient creates a new RemoveProxyServerParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveProxyServerParamsWithHTTPClient(client *http.Client) *RemoveProxyServerParams { - return &RemoveProxyServerParams{ - HTTPClient: client, - } -} - -/* -RemoveProxyServerParams contains all the parameters to send to the API endpoint - - for the remove proxy server operation. - - Typically these are written to a http.Request. -*/ -type RemoveProxyServerParams struct { - - /* Name. - - Name of the proxy server. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove proxy server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveProxyServerParams) WithDefaults() *RemoveProxyServerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove proxy server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveProxyServerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove proxy server params -func (o *RemoveProxyServerParams) WithTimeout(timeout time.Duration) *RemoveProxyServerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove proxy server params -func (o *RemoveProxyServerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove proxy server params -func (o *RemoveProxyServerParams) WithContext(ctx context.Context) *RemoveProxyServerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove proxy server params -func (o *RemoveProxyServerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove proxy server params -func (o *RemoveProxyServerParams) WithHTTPClient(client *http.Client) *RemoveProxyServerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove proxy server params -func (o *RemoveProxyServerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the remove proxy server params -func (o *RemoveProxyServerParams) WithName(name string) *RemoveProxyServerParams { - o.SetName(name) - return o -} - -// SetName adds the name to the remove proxy server params -func (o *RemoveProxyServerParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveProxyServerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/clusters/remove_proxy_server_responses.go b/v1/client/clusters/remove_proxy_server_responses.go deleted file mode 100644 index d4ec3a20..00000000 --- a/v1/client/clusters/remove_proxy_server_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RemoveProxyServerReader is a Reader for the RemoveProxyServer structure. -type RemoveProxyServerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveProxyServerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveProxyServerNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveProxyServerDefault(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 - } -} - -// NewRemoveProxyServerNoContent creates a RemoveProxyServerNoContent with default headers values -func NewRemoveProxyServerNoContent() *RemoveProxyServerNoContent { - return &RemoveProxyServerNoContent{} -} - -/* -RemoveProxyServerNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveProxyServerNoContent struct { -} - -// IsSuccess returns true when this remove proxy server no content response has a 2xx status code -func (o *RemoveProxyServerNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove proxy server no content response has a 3xx status code -func (o *RemoveProxyServerNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove proxy server no content response has a 4xx status code -func (o *RemoveProxyServerNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove proxy server no content response has a 5xx status code -func (o *RemoveProxyServerNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove proxy server no content response a status code equal to that given -func (o *RemoveProxyServerNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove proxy server no content response -func (o *RemoveProxyServerNoContent) Code() int { - return 204 -} - -func (o *RemoveProxyServerNoContent) Error() string { - return fmt.Sprintf("[DELETE /proxyServers/{name}][%d] removeProxyServerNoContent", 204) -} - -func (o *RemoveProxyServerNoContent) String() string { - return fmt.Sprintf("[DELETE /proxyServers/{name}][%d] removeProxyServerNoContent", 204) -} - -func (o *RemoveProxyServerNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveProxyServerDefault creates a RemoveProxyServerDefault with default headers values -func NewRemoveProxyServerDefault(code int) *RemoveProxyServerDefault { - return &RemoveProxyServerDefault{ - _statusCode: code, - } -} - -/* -RemoveProxyServerDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RemoveProxyServerDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this remove proxy server default response has a 2xx status code -func (o *RemoveProxyServerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove proxy server default response has a 3xx status code -func (o *RemoveProxyServerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove proxy server default response has a 4xx status code -func (o *RemoveProxyServerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove proxy server default response has a 5xx status code -func (o *RemoveProxyServerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove proxy server default response a status code equal to that given -func (o *RemoveProxyServerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove proxy server default response -func (o *RemoveProxyServerDefault) Code() int { - return o._statusCode -} - -func (o *RemoveProxyServerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /proxyServers/{name}][%d] RemoveProxyServer default %s", o._statusCode, payload) -} - -func (o *RemoveProxyServerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /proxyServers/{name}][%d] RemoveProxyServer default %s", o._statusCode, payload) -} - -func (o *RemoveProxyServerDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RemoveProxyServerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_background_activity_schedule_parameters.go b/v1/client/clusters/update_background_activity_schedule_parameters.go deleted file mode 100644 index b71017f3..00000000 --- a/v1/client/clusters/update_background_activity_schedule_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewUpdateBackgroundActivityScheduleParams creates a new UpdateBackgroundActivityScheduleParams 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 NewUpdateBackgroundActivityScheduleParams() *UpdateBackgroundActivityScheduleParams { - return &UpdateBackgroundActivityScheduleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateBackgroundActivityScheduleParamsWithTimeout creates a new UpdateBackgroundActivityScheduleParams object -// with the ability to set a timeout on a request. -func NewUpdateBackgroundActivityScheduleParamsWithTimeout(timeout time.Duration) *UpdateBackgroundActivityScheduleParams { - return &UpdateBackgroundActivityScheduleParams{ - timeout: timeout, - } -} - -// NewUpdateBackgroundActivityScheduleParamsWithContext creates a new UpdateBackgroundActivityScheduleParams object -// with the ability to set a context for a request. -func NewUpdateBackgroundActivityScheduleParamsWithContext(ctx context.Context) *UpdateBackgroundActivityScheduleParams { - return &UpdateBackgroundActivityScheduleParams{ - Context: ctx, - } -} - -// NewUpdateBackgroundActivityScheduleParamsWithHTTPClient creates a new UpdateBackgroundActivityScheduleParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateBackgroundActivityScheduleParamsWithHTTPClient(client *http.Client) *UpdateBackgroundActivityScheduleParams { - return &UpdateBackgroundActivityScheduleParams{ - HTTPClient: client, - } -} - -/* -UpdateBackgroundActivityScheduleParams contains all the parameters to send to the API endpoint - - for the update background activity schedule operation. - - Typically these are written to a http.Request. -*/ -type UpdateBackgroundActivityScheduleParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update background activity schedule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackgroundActivityScheduleParams) WithDefaults() *UpdateBackgroundActivityScheduleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update background activity schedule params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBackgroundActivityScheduleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) WithTimeout(timeout time.Duration) *UpdateBackgroundActivityScheduleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) WithContext(ctx context.Context) *UpdateBackgroundActivityScheduleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) WithHTTPClient(client *http.Client) *UpdateBackgroundActivityScheduleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update background activity schedule params -func (o *UpdateBackgroundActivityScheduleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateBackgroundActivityScheduleParams) 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/clusters/update_background_activity_schedule_responses.go b/v1/client/clusters/update_background_activity_schedule_responses.go deleted file mode 100644 index 53007566..00000000 --- a/v1/client/clusters/update_background_activity_schedule_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateBackgroundActivityScheduleReader is a Reader for the UpdateBackgroundActivitySchedule structure. -type UpdateBackgroundActivityScheduleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateBackgroundActivityScheduleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateBackgroundActivityScheduleOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateBackgroundActivityScheduleDefault(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 - } -} - -// NewUpdateBackgroundActivityScheduleOK creates a UpdateBackgroundActivityScheduleOK with default headers values -func NewUpdateBackgroundActivityScheduleOK() *UpdateBackgroundActivityScheduleOK { - return &UpdateBackgroundActivityScheduleOK{} -} - -/* -UpdateBackgroundActivityScheduleOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateBackgroundActivityScheduleOK struct { - Payload *models.BandwidthLimit -} - -// IsSuccess returns true when this update background activity schedule o k response has a 2xx status code -func (o *UpdateBackgroundActivityScheduleOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update background activity schedule o k response has a 3xx status code -func (o *UpdateBackgroundActivityScheduleOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update background activity schedule o k response has a 4xx status code -func (o *UpdateBackgroundActivityScheduleOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update background activity schedule o k response has a 5xx status code -func (o *UpdateBackgroundActivityScheduleOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update background activity schedule o k response a status code equal to that given -func (o *UpdateBackgroundActivityScheduleOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update background activity schedule o k response -func (o *UpdateBackgroundActivityScheduleOK) Code() int { - return 200 -} - -func (o *UpdateBackgroundActivityScheduleOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/backgroundActivitySchedule][%d] updateBackgroundActivityScheduleOK %s", 200, payload) -} - -func (o *UpdateBackgroundActivityScheduleOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/backgroundActivitySchedule][%d] updateBackgroundActivityScheduleOK %s", 200, payload) -} - -func (o *UpdateBackgroundActivityScheduleOK) GetPayload() *models.BandwidthLimit { - return o.Payload -} - -func (o *UpdateBackgroundActivityScheduleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BandwidthLimit) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateBackgroundActivityScheduleDefault creates a UpdateBackgroundActivityScheduleDefault with default headers values -func NewUpdateBackgroundActivityScheduleDefault(code int) *UpdateBackgroundActivityScheduleDefault { - return &UpdateBackgroundActivityScheduleDefault{ - _statusCode: code, - } -} - -/* -UpdateBackgroundActivityScheduleDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateBackgroundActivityScheduleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update background activity schedule default response has a 2xx status code -func (o *UpdateBackgroundActivityScheduleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update background activity schedule default response has a 3xx status code -func (o *UpdateBackgroundActivityScheduleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update background activity schedule default response has a 4xx status code -func (o *UpdateBackgroundActivityScheduleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update background activity schedule default response has a 5xx status code -func (o *UpdateBackgroundActivityScheduleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update background activity schedule default response a status code equal to that given -func (o *UpdateBackgroundActivityScheduleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update background activity schedule default response -func (o *UpdateBackgroundActivityScheduleDefault) Code() int { - return o._statusCode -} - -func (o *UpdateBackgroundActivityScheduleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/backgroundActivitySchedule][%d] UpdateBackgroundActivitySchedule default %s", o._statusCode, payload) -} - -func (o *UpdateBackgroundActivityScheduleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/cluster/backgroundActivitySchedule][%d] UpdateBackgroundActivitySchedule default %s", o._statusCode, payload) -} - -func (o *UpdateBackgroundActivityScheduleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateBackgroundActivityScheduleDefault) 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/clusters/update_client_subnet_whitelist_parameters.go b/v1/client/clusters/update_client_subnet_whitelist_parameters.go deleted file mode 100644 index d43dbdb8..00000000 --- a/v1/client/clusters/update_client_subnet_whitelist_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateClientSubnetWhitelistParams creates a new UpdateClientSubnetWhitelistParams 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 NewUpdateClientSubnetWhitelistParams() *UpdateClientSubnetWhitelistParams { - return &UpdateClientSubnetWhitelistParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateClientSubnetWhitelistParamsWithTimeout creates a new UpdateClientSubnetWhitelistParams object -// with the ability to set a timeout on a request. -func NewUpdateClientSubnetWhitelistParamsWithTimeout(timeout time.Duration) *UpdateClientSubnetWhitelistParams { - return &UpdateClientSubnetWhitelistParams{ - timeout: timeout, - } -} - -// NewUpdateClientSubnetWhitelistParamsWithContext creates a new UpdateClientSubnetWhitelistParams object -// with the ability to set a context for a request. -func NewUpdateClientSubnetWhitelistParamsWithContext(ctx context.Context) *UpdateClientSubnetWhitelistParams { - return &UpdateClientSubnetWhitelistParams{ - Context: ctx, - } -} - -// NewUpdateClientSubnetWhitelistParamsWithHTTPClient creates a new UpdateClientSubnetWhitelistParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateClientSubnetWhitelistParamsWithHTTPClient(client *http.Client) *UpdateClientSubnetWhitelistParams { - return &UpdateClientSubnetWhitelistParams{ - HTTPClient: client, - } -} - -/* -UpdateClientSubnetWhitelistParams contains all the parameters to send to the API endpoint - - for the update client subnet whitelist operation. - - Typically these are written to a http.Request. -*/ -type UpdateClientSubnetWhitelistParams struct { - - // Body. - Body *models.ClientSubnetWhitelist - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update client subnet whitelist params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClientSubnetWhitelistParams) WithDefaults() *UpdateClientSubnetWhitelistParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update client subnet whitelist params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClientSubnetWhitelistParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) WithTimeout(timeout time.Duration) *UpdateClientSubnetWhitelistParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) WithContext(ctx context.Context) *UpdateClientSubnetWhitelistParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) WithHTTPClient(client *http.Client) *UpdateClientSubnetWhitelistParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) WithBody(body *models.ClientSubnetWhitelist) *UpdateClientSubnetWhitelistParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update client subnet whitelist params -func (o *UpdateClientSubnetWhitelistParams) SetBody(body *models.ClientSubnetWhitelist) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateClientSubnetWhitelistParams) 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/clusters/update_client_subnet_whitelist_responses.go b/v1/client/clusters/update_client_subnet_whitelist_responses.go deleted file mode 100644 index 6475f665..00000000 --- a/v1/client/clusters/update_client_subnet_whitelist_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateClientSubnetWhitelistReader is a Reader for the UpdateClientSubnetWhitelist structure. -type UpdateClientSubnetWhitelistReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateClientSubnetWhitelistReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateClientSubnetWhitelistOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateClientSubnetWhitelistDefault(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 - } -} - -// NewUpdateClientSubnetWhitelistOK creates a UpdateClientSubnetWhitelistOK with default headers values -func NewUpdateClientSubnetWhitelistOK() *UpdateClientSubnetWhitelistOK { - return &UpdateClientSubnetWhitelistOK{} -} - -/* -UpdateClientSubnetWhitelistOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateClientSubnetWhitelistOK struct { - Payload *models.ClientSubnetWhitelist -} - -// IsSuccess returns true when this update client subnet whitelist o k response has a 2xx status code -func (o *UpdateClientSubnetWhitelistOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update client subnet whitelist o k response has a 3xx status code -func (o *UpdateClientSubnetWhitelistOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update client subnet whitelist o k response has a 4xx status code -func (o *UpdateClientSubnetWhitelistOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update client subnet whitelist o k response has a 5xx status code -func (o *UpdateClientSubnetWhitelistOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update client subnet whitelist o k response a status code equal to that given -func (o *UpdateClientSubnetWhitelistOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update client subnet whitelist o k response -func (o *UpdateClientSubnetWhitelistOK) Code() int { - return 200 -} - -func (o *UpdateClientSubnetWhitelistOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clientSubnetWhitelist][%d] updateClientSubnetWhitelistOK %s", 200, payload) -} - -func (o *UpdateClientSubnetWhitelistOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clientSubnetWhitelist][%d] updateClientSubnetWhitelistOK %s", 200, payload) -} - -func (o *UpdateClientSubnetWhitelistOK) GetPayload() *models.ClientSubnetWhitelist { - return o.Payload -} - -func (o *UpdateClientSubnetWhitelistOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClientSubnetWhitelist) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateClientSubnetWhitelistDefault creates a UpdateClientSubnetWhitelistDefault with default headers values -func NewUpdateClientSubnetWhitelistDefault(code int) *UpdateClientSubnetWhitelistDefault { - return &UpdateClientSubnetWhitelistDefault{ - _statusCode: code, - } -} - -/* -UpdateClientSubnetWhitelistDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateClientSubnetWhitelistDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update client subnet whitelist default response has a 2xx status code -func (o *UpdateClientSubnetWhitelistDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update client subnet whitelist default response has a 3xx status code -func (o *UpdateClientSubnetWhitelistDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update client subnet whitelist default response has a 4xx status code -func (o *UpdateClientSubnetWhitelistDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update client subnet whitelist default response has a 5xx status code -func (o *UpdateClientSubnetWhitelistDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update client subnet whitelist default response a status code equal to that given -func (o *UpdateClientSubnetWhitelistDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update client subnet whitelist default response -func (o *UpdateClientSubnetWhitelistDefault) Code() int { - return o._statusCode -} - -func (o *UpdateClientSubnetWhitelistDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clientSubnetWhitelist][%d] UpdateClientSubnetWhitelist default %s", o._statusCode, payload) -} - -func (o *UpdateClientSubnetWhitelistDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clientSubnetWhitelist][%d] UpdateClientSubnetWhitelist default %s", o._statusCode, payload) -} - -func (o *UpdateClientSubnetWhitelistDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateClientSubnetWhitelistDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_cluster_subnets_parameters.go b/v1/client/clusters/update_cluster_subnets_parameters.go deleted file mode 100644 index 5245b6ea..00000000 --- a/v1/client/clusters/update_cluster_subnets_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewUpdateClusterSubnetsParams creates a new UpdateClusterSubnetsParams 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 NewUpdateClusterSubnetsParams() *UpdateClusterSubnetsParams { - return &UpdateClusterSubnetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateClusterSubnetsParamsWithTimeout creates a new UpdateClusterSubnetsParams object -// with the ability to set a timeout on a request. -func NewUpdateClusterSubnetsParamsWithTimeout(timeout time.Duration) *UpdateClusterSubnetsParams { - return &UpdateClusterSubnetsParams{ - timeout: timeout, - } -} - -// NewUpdateClusterSubnetsParamsWithContext creates a new UpdateClusterSubnetsParams object -// with the ability to set a context for a request. -func NewUpdateClusterSubnetsParamsWithContext(ctx context.Context) *UpdateClusterSubnetsParams { - return &UpdateClusterSubnetsParams{ - Context: ctx, - } -} - -// NewUpdateClusterSubnetsParamsWithHTTPClient creates a new UpdateClusterSubnetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateClusterSubnetsParamsWithHTTPClient(client *http.Client) *UpdateClusterSubnetsParams { - return &UpdateClusterSubnetsParams{ - HTTPClient: client, - } -} - -/* -UpdateClusterSubnetsParams contains all the parameters to send to the API endpoint - - for the update cluster subnets operation. - - Typically these are written to a http.Request. -*/ -type UpdateClusterSubnetsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update cluster subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterSubnetsParams) WithDefaults() *UpdateClusterSubnetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update cluster subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterSubnetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) WithTimeout(timeout time.Duration) *UpdateClusterSubnetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) WithContext(ctx context.Context) *UpdateClusterSubnetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) WithHTTPClient(client *http.Client) *UpdateClusterSubnetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update cluster subnets params -func (o *UpdateClusterSubnetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateClusterSubnetsParams) 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/clusters/update_cluster_subnets_responses.go b/v1/client/clusters/update_cluster_subnets_responses.go deleted file mode 100644 index 87addde0..00000000 --- a/v1/client/clusters/update_cluster_subnets_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateClusterSubnetsReader is a Reader for the UpdateClusterSubnets structure. -type UpdateClusterSubnetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateClusterSubnetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateClusterSubnetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateClusterSubnetsDefault(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 - } -} - -// NewUpdateClusterSubnetsOK creates a UpdateClusterSubnetsOK with default headers values -func NewUpdateClusterSubnetsOK() *UpdateClusterSubnetsOK { - return &UpdateClusterSubnetsOK{} -} - -/* -UpdateClusterSubnetsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateClusterSubnetsOK struct { - Payload []*models.Subnet -} - -// IsSuccess returns true when this update cluster subnets o k response has a 2xx status code -func (o *UpdateClusterSubnetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update cluster subnets o k response has a 3xx status code -func (o *UpdateClusterSubnetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update cluster subnets o k response has a 4xx status code -func (o *UpdateClusterSubnetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update cluster subnets o k response has a 5xx status code -func (o *UpdateClusterSubnetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update cluster subnets o k response a status code equal to that given -func (o *UpdateClusterSubnetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update cluster subnets o k response -func (o *UpdateClusterSubnetsOK) Code() int { - return 200 -} - -func (o *UpdateClusterSubnetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusterSubnets][%d] updateClusterSubnetsOK %s", 200, payload) -} - -func (o *UpdateClusterSubnetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusterSubnets][%d] updateClusterSubnetsOK %s", 200, payload) -} - -func (o *UpdateClusterSubnetsOK) GetPayload() []*models.Subnet { - return o.Payload -} - -func (o *UpdateClusterSubnetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateClusterSubnetsDefault creates a UpdateClusterSubnetsDefault with default headers values -func NewUpdateClusterSubnetsDefault(code int) *UpdateClusterSubnetsDefault { - return &UpdateClusterSubnetsDefault{ - _statusCode: code, - } -} - -/* -UpdateClusterSubnetsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateClusterSubnetsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update cluster subnets default response has a 2xx status code -func (o *UpdateClusterSubnetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update cluster subnets default response has a 3xx status code -func (o *UpdateClusterSubnetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update cluster subnets default response has a 4xx status code -func (o *UpdateClusterSubnetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update cluster subnets default response has a 5xx status code -func (o *UpdateClusterSubnetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update cluster subnets default response a status code equal to that given -func (o *UpdateClusterSubnetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update cluster subnets default response -func (o *UpdateClusterSubnetsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateClusterSubnetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusterSubnets][%d] UpdateClusterSubnets default %s", o._statusCode, payload) -} - -func (o *UpdateClusterSubnetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusterSubnets][%d] UpdateClusterSubnets default %s", o._statusCode, payload) -} - -func (o *UpdateClusterSubnetsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateClusterSubnetsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_external_client_subnets_parameters.go b/v1/client/clusters/update_external_client_subnets_parameters.go deleted file mode 100644 index 07672711..00000000 --- a/v1/client/clusters/update_external_client_subnets_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateExternalClientSubnetsParams creates a new UpdateExternalClientSubnetsParams 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 NewUpdateExternalClientSubnetsParams() *UpdateExternalClientSubnetsParams { - return &UpdateExternalClientSubnetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateExternalClientSubnetsParamsWithTimeout creates a new UpdateExternalClientSubnetsParams object -// with the ability to set a timeout on a request. -func NewUpdateExternalClientSubnetsParamsWithTimeout(timeout time.Duration) *UpdateExternalClientSubnetsParams { - return &UpdateExternalClientSubnetsParams{ - timeout: timeout, - } -} - -// NewUpdateExternalClientSubnetsParamsWithContext creates a new UpdateExternalClientSubnetsParams object -// with the ability to set a context for a request. -func NewUpdateExternalClientSubnetsParamsWithContext(ctx context.Context) *UpdateExternalClientSubnetsParams { - return &UpdateExternalClientSubnetsParams{ - Context: ctx, - } -} - -// NewUpdateExternalClientSubnetsParamsWithHTTPClient creates a new UpdateExternalClientSubnetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateExternalClientSubnetsParamsWithHTTPClient(client *http.Client) *UpdateExternalClientSubnetsParams { - return &UpdateExternalClientSubnetsParams{ - HTTPClient: client, - } -} - -/* -UpdateExternalClientSubnetsParams contains all the parameters to send to the API endpoint - - for the update external client subnets operation. - - Typically these are written to a http.Request. -*/ -type UpdateExternalClientSubnetsParams struct { - - // Body. - Body *models.ExternalClientSubnets - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update external client subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalClientSubnetsParams) WithDefaults() *UpdateExternalClientSubnetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update external client subnets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalClientSubnetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) WithTimeout(timeout time.Duration) *UpdateExternalClientSubnetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) WithContext(ctx context.Context) *UpdateExternalClientSubnetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) WithHTTPClient(client *http.Client) *UpdateExternalClientSubnetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) WithBody(body *models.ExternalClientSubnets) *UpdateExternalClientSubnetsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update external client subnets params -func (o *UpdateExternalClientSubnetsParams) SetBody(body *models.ExternalClientSubnets) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateExternalClientSubnetsParams) 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/clusters/update_external_client_subnets_responses.go b/v1/client/clusters/update_external_client_subnets_responses.go deleted file mode 100644 index e5b3719b..00000000 --- a/v1/client/clusters/update_external_client_subnets_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateExternalClientSubnetsReader is a Reader for the UpdateExternalClientSubnets structure. -type UpdateExternalClientSubnetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateExternalClientSubnetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateExternalClientSubnetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateExternalClientSubnetsDefault(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 - } -} - -// NewUpdateExternalClientSubnetsOK creates a UpdateExternalClientSubnetsOK with default headers values -func NewUpdateExternalClientSubnetsOK() *UpdateExternalClientSubnetsOK { - return &UpdateExternalClientSubnetsOK{} -} - -/* -UpdateExternalClientSubnetsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateExternalClientSubnetsOK struct { - Payload *models.ExternalClientSubnets -} - -// IsSuccess returns true when this update external client subnets o k response has a 2xx status code -func (o *UpdateExternalClientSubnetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update external client subnets o k response has a 3xx status code -func (o *UpdateExternalClientSubnetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update external client subnets o k response has a 4xx status code -func (o *UpdateExternalClientSubnetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update external client subnets o k response has a 5xx status code -func (o *UpdateExternalClientSubnetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update external client subnets o k response a status code equal to that given -func (o *UpdateExternalClientSubnetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update external client subnets o k response -func (o *UpdateExternalClientSubnetsOK) Code() int { - return 200 -} - -func (o *UpdateExternalClientSubnetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/externalClientSubnets][%d] updateExternalClientSubnetsOK %s", 200, payload) -} - -func (o *UpdateExternalClientSubnetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/externalClientSubnets][%d] updateExternalClientSubnetsOK %s", 200, payload) -} - -func (o *UpdateExternalClientSubnetsOK) GetPayload() *models.ExternalClientSubnets { - return o.Payload -} - -func (o *UpdateExternalClientSubnetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalClientSubnets) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateExternalClientSubnetsDefault creates a UpdateExternalClientSubnetsDefault with default headers values -func NewUpdateExternalClientSubnetsDefault(code int) *UpdateExternalClientSubnetsDefault { - return &UpdateExternalClientSubnetsDefault{ - _statusCode: code, - } -} - -/* -UpdateExternalClientSubnetsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateExternalClientSubnetsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update external client subnets default response has a 2xx status code -func (o *UpdateExternalClientSubnetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update external client subnets default response has a 3xx status code -func (o *UpdateExternalClientSubnetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update external client subnets default response has a 4xx status code -func (o *UpdateExternalClientSubnetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update external client subnets default response has a 5xx status code -func (o *UpdateExternalClientSubnetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update external client subnets default response a status code equal to that given -func (o *UpdateExternalClientSubnetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update external client subnets default response -func (o *UpdateExternalClientSubnetsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateExternalClientSubnetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/externalClientSubnets][%d] UpdateExternalClientSubnets default %s", o._statusCode, payload) -} - -func (o *UpdateExternalClientSubnetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/externalClientSubnets][%d] UpdateExternalClientSubnets default %s", o._statusCode, payload) -} - -func (o *UpdateExternalClientSubnetsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateExternalClientSubnetsDefault) 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/clusters/update_io_preferential_tier_parameters.go b/v1/client/clusters/update_io_preferential_tier_parameters.go deleted file mode 100644 index 23fea6dd..00000000 --- a/v1/client/clusters/update_io_preferential_tier_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateIoPreferentialTierParams creates a new UpdateIoPreferentialTierParams 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 NewUpdateIoPreferentialTierParams() *UpdateIoPreferentialTierParams { - return &UpdateIoPreferentialTierParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIoPreferentialTierParamsWithTimeout creates a new UpdateIoPreferentialTierParams object -// with the ability to set a timeout on a request. -func NewUpdateIoPreferentialTierParamsWithTimeout(timeout time.Duration) *UpdateIoPreferentialTierParams { - return &UpdateIoPreferentialTierParams{ - timeout: timeout, - } -} - -// NewUpdateIoPreferentialTierParamsWithContext creates a new UpdateIoPreferentialTierParams object -// with the ability to set a context for a request. -func NewUpdateIoPreferentialTierParamsWithContext(ctx context.Context) *UpdateIoPreferentialTierParams { - return &UpdateIoPreferentialTierParams{ - Context: ctx, - } -} - -// NewUpdateIoPreferentialTierParamsWithHTTPClient creates a new UpdateIoPreferentialTierParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIoPreferentialTierParamsWithHTTPClient(client *http.Client) *UpdateIoPreferentialTierParams { - return &UpdateIoPreferentialTierParams{ - HTTPClient: client, - } -} - -/* -UpdateIoPreferentialTierParams contains all the parameters to send to the API endpoint - - for the update io preferential tier operation. - - Typically these are written to a http.Request. -*/ -type UpdateIoPreferentialTierParams struct { - - // Body. - Body *models.PrivateIoPreferentialTier - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIoPreferentialTierParams) WithDefaults() *UpdateIoPreferentialTierParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update io preferential tier params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIoPreferentialTierParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) WithTimeout(timeout time.Duration) *UpdateIoPreferentialTierParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) WithContext(ctx context.Context) *UpdateIoPreferentialTierParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) WithHTTPClient(client *http.Client) *UpdateIoPreferentialTierParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) WithBody(body *models.PrivateIoPreferentialTier) *UpdateIoPreferentialTierParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update io preferential tier params -func (o *UpdateIoPreferentialTierParams) SetBody(body *models.PrivateIoPreferentialTier) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIoPreferentialTierParams) 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/clusters/update_io_preferential_tier_responses.go b/v1/client/clusters/update_io_preferential_tier_responses.go deleted file mode 100644 index d471f67a..00000000 --- a/v1/client/clusters/update_io_preferential_tier_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateIoPreferentialTierReader is a Reader for the UpdateIoPreferentialTier structure. -type UpdateIoPreferentialTierReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIoPreferentialTierReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIoPreferentialTierOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIoPreferentialTierDefault(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 - } -} - -// NewUpdateIoPreferentialTierOK creates a UpdateIoPreferentialTierOK with default headers values -func NewUpdateIoPreferentialTierOK() *UpdateIoPreferentialTierOK { - return &UpdateIoPreferentialTierOK{} -} - -/* -UpdateIoPreferentialTierOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIoPreferentialTierOK struct { - Payload *models.PrivateIoPreferentialTier -} - -// IsSuccess returns true when this update io preferential tier o k response has a 2xx status code -func (o *UpdateIoPreferentialTierOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update io preferential tier o k response has a 3xx status code -func (o *UpdateIoPreferentialTierOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update io preferential tier o k response has a 4xx status code -func (o *UpdateIoPreferentialTierOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update io preferential tier o k response has a 5xx status code -func (o *UpdateIoPreferentialTierOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update io preferential tier o k response a status code equal to that given -func (o *UpdateIoPreferentialTierOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update io preferential tier o k response -func (o *UpdateIoPreferentialTierOK) Code() int { - return 200 -} - -func (o *UpdateIoPreferentialTierOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ioPreferentialTier][%d] updateIoPreferentialTierOK %s", 200, payload) -} - -func (o *UpdateIoPreferentialTierOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ioPreferentialTier][%d] updateIoPreferentialTierOK %s", 200, payload) -} - -func (o *UpdateIoPreferentialTierOK) GetPayload() *models.PrivateIoPreferentialTier { - return o.Payload -} - -func (o *UpdateIoPreferentialTierOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateIoPreferentialTier) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIoPreferentialTierDefault creates a UpdateIoPreferentialTierDefault with default headers values -func NewUpdateIoPreferentialTierDefault(code int) *UpdateIoPreferentialTierDefault { - return &UpdateIoPreferentialTierDefault{ - _statusCode: code, - } -} - -/* -UpdateIoPreferentialTierDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateIoPreferentialTierDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update io preferential tier default response has a 2xx status code -func (o *UpdateIoPreferentialTierDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update io preferential tier default response has a 3xx status code -func (o *UpdateIoPreferentialTierDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update io preferential tier default response has a 4xx status code -func (o *UpdateIoPreferentialTierDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update io preferential tier default response has a 5xx status code -func (o *UpdateIoPreferentialTierDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update io preferential tier default response a status code equal to that given -func (o *UpdateIoPreferentialTierDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update io preferential tier default response -func (o *UpdateIoPreferentialTierDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIoPreferentialTierDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ioPreferentialTier][%d] UpdateIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *UpdateIoPreferentialTierDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ioPreferentialTier][%d] UpdateIoPreferentialTier default %s", o._statusCode, payload) -} - -func (o *UpdateIoPreferentialTierDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateIoPreferentialTierDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_ntp_servers_parameters.go b/v1/client/clusters/update_ntp_servers_parameters.go deleted file mode 100644 index 6f88e293..00000000 --- a/v1/client/clusters/update_ntp_servers_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateNtpServersParams creates a new UpdateNtpServersParams 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 NewUpdateNtpServersParams() *UpdateNtpServersParams { - return &UpdateNtpServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateNtpServersParamsWithTimeout creates a new UpdateNtpServersParams object -// with the ability to set a timeout on a request. -func NewUpdateNtpServersParamsWithTimeout(timeout time.Duration) *UpdateNtpServersParams { - return &UpdateNtpServersParams{ - timeout: timeout, - } -} - -// NewUpdateNtpServersParamsWithContext creates a new UpdateNtpServersParams object -// with the ability to set a context for a request. -func NewUpdateNtpServersParamsWithContext(ctx context.Context) *UpdateNtpServersParams { - return &UpdateNtpServersParams{ - Context: ctx, - } -} - -// NewUpdateNtpServersParamsWithHTTPClient creates a new UpdateNtpServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateNtpServersParamsWithHTTPClient(client *http.Client) *UpdateNtpServersParams { - return &UpdateNtpServersParams{ - HTTPClient: client, - } -} - -/* -UpdateNtpServersParams contains all the parameters to send to the API endpoint - - for the update ntp servers operation. - - Typically these are written to a http.Request. -*/ -type UpdateNtpServersParams struct { - - // Body. - Body *models.NtpServers - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update ntp servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNtpServersParams) WithDefaults() *UpdateNtpServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update ntp servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNtpServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update ntp servers params -func (o *UpdateNtpServersParams) WithTimeout(timeout time.Duration) *UpdateNtpServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update ntp servers params -func (o *UpdateNtpServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update ntp servers params -func (o *UpdateNtpServersParams) WithContext(ctx context.Context) *UpdateNtpServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update ntp servers params -func (o *UpdateNtpServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update ntp servers params -func (o *UpdateNtpServersParams) WithHTTPClient(client *http.Client) *UpdateNtpServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update ntp servers params -func (o *UpdateNtpServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update ntp servers params -func (o *UpdateNtpServersParams) WithBody(body *models.NtpServers) *UpdateNtpServersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update ntp servers params -func (o *UpdateNtpServersParams) SetBody(body *models.NtpServers) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateNtpServersParams) 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/clusters/update_ntp_servers_responses.go b/v1/client/clusters/update_ntp_servers_responses.go deleted file mode 100644 index 9d399f37..00000000 --- a/v1/client/clusters/update_ntp_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateNtpServersReader is a Reader for the UpdateNtpServers structure. -type UpdateNtpServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateNtpServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateNtpServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateNtpServersDefault(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 - } -} - -// NewUpdateNtpServersOK creates a UpdateNtpServersOK with default headers values -func NewUpdateNtpServersOK() *UpdateNtpServersOK { - return &UpdateNtpServersOK{} -} - -/* -UpdateNtpServersOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateNtpServersOK struct { - Payload *models.NtpServers -} - -// IsSuccess returns true when this update ntp servers o k response has a 2xx status code -func (o *UpdateNtpServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update ntp servers o k response has a 3xx status code -func (o *UpdateNtpServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update ntp servers o k response has a 4xx status code -func (o *UpdateNtpServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update ntp servers o k response has a 5xx status code -func (o *UpdateNtpServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update ntp servers o k response a status code equal to that given -func (o *UpdateNtpServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update ntp servers o k response -func (o *UpdateNtpServersOK) Code() int { - return 200 -} - -func (o *UpdateNtpServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ntpServers][%d] updateNtpServersOK %s", 200, payload) -} - -func (o *UpdateNtpServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ntpServers][%d] updateNtpServersOK %s", 200, payload) -} - -func (o *UpdateNtpServersOK) GetPayload() *models.NtpServers { - return o.Payload -} - -func (o *UpdateNtpServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NtpServers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateNtpServersDefault creates a UpdateNtpServersDefault with default headers values -func NewUpdateNtpServersDefault(code int) *UpdateNtpServersDefault { - return &UpdateNtpServersDefault{ - _statusCode: code, - } -} - -/* -UpdateNtpServersDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateNtpServersDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update ntp servers default response has a 2xx status code -func (o *UpdateNtpServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update ntp servers default response has a 3xx status code -func (o *UpdateNtpServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update ntp servers default response has a 4xx status code -func (o *UpdateNtpServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update ntp servers default response has a 5xx status code -func (o *UpdateNtpServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update ntp servers default response a status code equal to that given -func (o *UpdateNtpServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update ntp servers default response -func (o *UpdateNtpServersDefault) Code() int { - return o._statusCode -} - -func (o *UpdateNtpServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ntpServers][%d] UpdateNtpServers default %s", o._statusCode, payload) -} - -func (o *UpdateNtpServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ntpServers][%d] UpdateNtpServers default %s", o._statusCode, payload) -} - -func (o *UpdateNtpServersDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateNtpServersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_proxy_server_parameters.go b/v1/client/clusters/update_proxy_server_parameters.go deleted file mode 100644 index b9e7736e..00000000 --- a/v1/client/clusters/update_proxy_server_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProxyServerParams creates a new UpdateProxyServerParams 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 NewUpdateProxyServerParams() *UpdateProxyServerParams { - return &UpdateProxyServerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProxyServerParamsWithTimeout creates a new UpdateProxyServerParams object -// with the ability to set a timeout on a request. -func NewUpdateProxyServerParamsWithTimeout(timeout time.Duration) *UpdateProxyServerParams { - return &UpdateProxyServerParams{ - timeout: timeout, - } -} - -// NewUpdateProxyServerParamsWithContext creates a new UpdateProxyServerParams object -// with the ability to set a context for a request. -func NewUpdateProxyServerParamsWithContext(ctx context.Context) *UpdateProxyServerParams { - return &UpdateProxyServerParams{ - Context: ctx, - } -} - -// NewUpdateProxyServerParamsWithHTTPClient creates a new UpdateProxyServerParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProxyServerParamsWithHTTPClient(client *http.Client) *UpdateProxyServerParams { - return &UpdateProxyServerParams{ - HTTPClient: client, - } -} - -/* -UpdateProxyServerParams contains all the parameters to send to the API endpoint - - for the update proxy server operation. - - Typically these are written to a http.Request. -*/ -type UpdateProxyServerParams struct { - - // Body. - Body *models.ProxyServer - - /* Name. - - Name of the proxy server. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update proxy server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProxyServerParams) WithDefaults() *UpdateProxyServerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update proxy server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProxyServerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update proxy server params -func (o *UpdateProxyServerParams) WithTimeout(timeout time.Duration) *UpdateProxyServerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update proxy server params -func (o *UpdateProxyServerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update proxy server params -func (o *UpdateProxyServerParams) WithContext(ctx context.Context) *UpdateProxyServerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update proxy server params -func (o *UpdateProxyServerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update proxy server params -func (o *UpdateProxyServerParams) WithHTTPClient(client *http.Client) *UpdateProxyServerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update proxy server params -func (o *UpdateProxyServerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update proxy server params -func (o *UpdateProxyServerParams) WithBody(body *models.ProxyServer) *UpdateProxyServerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update proxy server params -func (o *UpdateProxyServerParams) SetBody(body *models.ProxyServer) { - o.Body = body -} - -// WithName adds the name to the update proxy server params -func (o *UpdateProxyServerParams) WithName(name string) *UpdateProxyServerParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update proxy server params -func (o *UpdateProxyServerParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProxyServerParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/clusters/update_proxy_server_responses.go b/v1/client/clusters/update_proxy_server_responses.go deleted file mode 100644 index 46b2ee77..00000000 --- a/v1/client/clusters/update_proxy_server_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProxyServerReader is a Reader for the UpdateProxyServer structure. -type UpdateProxyServerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProxyServerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProxyServerOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProxyServerDefault(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 - } -} - -// NewUpdateProxyServerOK creates a UpdateProxyServerOK with default headers values -func NewUpdateProxyServerOK() *UpdateProxyServerOK { - return &UpdateProxyServerOK{} -} - -/* -UpdateProxyServerOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProxyServerOK struct { - Payload *models.ProxyServer -} - -// IsSuccess returns true when this update proxy server o k response has a 2xx status code -func (o *UpdateProxyServerOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update proxy server o k response has a 3xx status code -func (o *UpdateProxyServerOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update proxy server o k response has a 4xx status code -func (o *UpdateProxyServerOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update proxy server o k response has a 5xx status code -func (o *UpdateProxyServerOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update proxy server o k response a status code equal to that given -func (o *UpdateProxyServerOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update proxy server o k response -func (o *UpdateProxyServerOK) Code() int { - return 200 -} - -func (o *UpdateProxyServerOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /proxyServers/{name}][%d] updateProxyServerOK %s", 200, payload) -} - -func (o *UpdateProxyServerOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /proxyServers/{name}][%d] updateProxyServerOK %s", 200, payload) -} - -func (o *UpdateProxyServerOK) GetPayload() *models.ProxyServer { - return o.Payload -} - -func (o *UpdateProxyServerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProxyServer) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProxyServerDefault creates a UpdateProxyServerDefault with default headers values -func NewUpdateProxyServerDefault(code int) *UpdateProxyServerDefault { - return &UpdateProxyServerDefault{ - _statusCode: code, - } -} - -/* -UpdateProxyServerDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateProxyServerDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update proxy server default response has a 2xx status code -func (o *UpdateProxyServerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update proxy server default response has a 3xx status code -func (o *UpdateProxyServerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update proxy server default response has a 4xx status code -func (o *UpdateProxyServerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update proxy server default response has a 5xx status code -func (o *UpdateProxyServerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update proxy server default response a status code equal to that given -func (o *UpdateProxyServerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update proxy server default response -func (o *UpdateProxyServerDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProxyServerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /proxyServers/{name}][%d] UpdateProxyServer default %s", o._statusCode, payload) -} - -func (o *UpdateProxyServerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /proxyServers/{name}][%d] UpdateProxyServer default %s", o._statusCode, payload) -} - -func (o *UpdateProxyServerDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateProxyServerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_service_flag_parameters.go b/v1/client/clusters/update_service_flag_parameters.go deleted file mode 100644 index 3a26e3dd..00000000 --- a/v1/client/clusters/update_service_flag_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateServiceFlagParams creates a new UpdateServiceFlagParams 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 NewUpdateServiceFlagParams() *UpdateServiceFlagParams { - return &UpdateServiceFlagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateServiceFlagParamsWithTimeout creates a new UpdateServiceFlagParams object -// with the ability to set a timeout on a request. -func NewUpdateServiceFlagParamsWithTimeout(timeout time.Duration) *UpdateServiceFlagParams { - return &UpdateServiceFlagParams{ - timeout: timeout, - } -} - -// NewUpdateServiceFlagParamsWithContext creates a new UpdateServiceFlagParams object -// with the ability to set a context for a request. -func NewUpdateServiceFlagParamsWithContext(ctx context.Context) *UpdateServiceFlagParams { - return &UpdateServiceFlagParams{ - Context: ctx, - } -} - -// NewUpdateServiceFlagParamsWithHTTPClient creates a new UpdateServiceFlagParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateServiceFlagParamsWithHTTPClient(client *http.Client) *UpdateServiceFlagParams { - return &UpdateServiceFlagParams{ - HTTPClient: client, - } -} - -/* -UpdateServiceFlagParams contains all the parameters to send to the API endpoint - - for the update service flag operation. - - Typically these are written to a http.Request. -*/ -type UpdateServiceFlagParams struct { - - // Body. - Body *models.ServiceFlagRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update service flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateServiceFlagParams) WithDefaults() *UpdateServiceFlagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update service flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateServiceFlagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update service flag params -func (o *UpdateServiceFlagParams) WithTimeout(timeout time.Duration) *UpdateServiceFlagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update service flag params -func (o *UpdateServiceFlagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update service flag params -func (o *UpdateServiceFlagParams) WithContext(ctx context.Context) *UpdateServiceFlagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update service flag params -func (o *UpdateServiceFlagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update service flag params -func (o *UpdateServiceFlagParams) WithHTTPClient(client *http.Client) *UpdateServiceFlagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update service flag params -func (o *UpdateServiceFlagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update service flag params -func (o *UpdateServiceFlagParams) WithBody(body *models.ServiceFlagRequest) *UpdateServiceFlagParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update service flag params -func (o *UpdateServiceFlagParams) SetBody(body *models.ServiceFlagRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateServiceFlagParams) 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/clusters/update_service_flag_responses.go b/v1/client/clusters/update_service_flag_responses.go deleted file mode 100644 index 33edd8f9..00000000 --- a/v1/client/clusters/update_service_flag_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateServiceFlagReader is a Reader for the UpdateServiceFlag structure. -type UpdateServiceFlagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateServiceFlagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateServiceFlagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateServiceFlagDefault(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 - } -} - -// NewUpdateServiceFlagOK creates a UpdateServiceFlagOK with default headers values -func NewUpdateServiceFlagOK() *UpdateServiceFlagOK { - return &UpdateServiceFlagOK{} -} - -/* -UpdateServiceFlagOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateServiceFlagOK struct { - Payload []string -} - -// IsSuccess returns true when this update service flag o k response has a 2xx status code -func (o *UpdateServiceFlagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update service flag o k response has a 3xx status code -func (o *UpdateServiceFlagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update service flag o k response has a 4xx status code -func (o *UpdateServiceFlagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update service flag o k response has a 5xx status code -func (o *UpdateServiceFlagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update service flag o k response a status code equal to that given -func (o *UpdateServiceFlagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update service flag o k response -func (o *UpdateServiceFlagOK) Code() int { - return 200 -} - -func (o *UpdateServiceFlagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /flagz][%d] updateServiceFlagOK %s", 200, payload) -} - -func (o *UpdateServiceFlagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /flagz][%d] updateServiceFlagOK %s", 200, payload) -} - -func (o *UpdateServiceFlagOK) GetPayload() []string { - return o.Payload -} - -func (o *UpdateServiceFlagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateServiceFlagDefault creates a UpdateServiceFlagDefault with default headers values -func NewUpdateServiceFlagDefault(code int) *UpdateServiceFlagDefault { - return &UpdateServiceFlagDefault{ - _statusCode: code, - } -} - -/* -UpdateServiceFlagDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateServiceFlagDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update service flag default response has a 2xx status code -func (o *UpdateServiceFlagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update service flag default response has a 3xx status code -func (o *UpdateServiceFlagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update service flag default response has a 4xx status code -func (o *UpdateServiceFlagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update service flag default response has a 5xx status code -func (o *UpdateServiceFlagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update service flag default response a status code equal to that given -func (o *UpdateServiceFlagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update service flag default response -func (o *UpdateServiceFlagDefault) Code() int { - return o._statusCode -} - -func (o *UpdateServiceFlagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /flagz][%d] UpdateServiceFlag default %s", o._statusCode, payload) -} - -func (o *UpdateServiceFlagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /flagz][%d] UpdateServiceFlag default %s", o._statusCode, payload) -} - -func (o *UpdateServiceFlagDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateServiceFlagDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/update_service_gflag_parameters.go b/v1/client/clusters/update_service_gflag_parameters.go deleted file mode 100644 index 2901fabc..00000000 --- a/v1/client/clusters/update_service_gflag_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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" -) - -// NewUpdateServiceGflagParams creates a new UpdateServiceGflagParams 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 NewUpdateServiceGflagParams() *UpdateServiceGflagParams { - return &UpdateServiceGflagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateServiceGflagParamsWithTimeout creates a new UpdateServiceGflagParams object -// with the ability to set a timeout on a request. -func NewUpdateServiceGflagParamsWithTimeout(timeout time.Duration) *UpdateServiceGflagParams { - return &UpdateServiceGflagParams{ - timeout: timeout, - } -} - -// NewUpdateServiceGflagParamsWithContext creates a new UpdateServiceGflagParams object -// with the ability to set a context for a request. -func NewUpdateServiceGflagParamsWithContext(ctx context.Context) *UpdateServiceGflagParams { - return &UpdateServiceGflagParams{ - Context: ctx, - } -} - -// NewUpdateServiceGflagParamsWithHTTPClient creates a new UpdateServiceGflagParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateServiceGflagParamsWithHTTPClient(client *http.Client) *UpdateServiceGflagParams { - return &UpdateServiceGflagParams{ - HTTPClient: client, - } -} - -/* -UpdateServiceGflagParams contains all the parameters to send to the API endpoint - - for the update service gflag operation. - - Typically these are written to a http.Request. -*/ -type UpdateServiceGflagParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update service gflag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateServiceGflagParams) WithDefaults() *UpdateServiceGflagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update service gflag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateServiceGflagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update service gflag params -func (o *UpdateServiceGflagParams) WithTimeout(timeout time.Duration) *UpdateServiceGflagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update service gflag params -func (o *UpdateServiceGflagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update service gflag params -func (o *UpdateServiceGflagParams) WithContext(ctx context.Context) *UpdateServiceGflagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update service gflag params -func (o *UpdateServiceGflagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update service gflag params -func (o *UpdateServiceGflagParams) WithHTTPClient(client *http.Client) *UpdateServiceGflagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update service gflag params -func (o *UpdateServiceGflagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateServiceGflagParams) 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/clusters/update_service_gflag_responses.go b/v1/client/clusters/update_service_gflag_responses.go deleted file mode 100644 index 5fe87926..00000000 --- a/v1/client/clusters/update_service_gflag_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateServiceGflagReader is a Reader for the UpdateServiceGflag structure. -type UpdateServiceGflagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateServiceGflagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateServiceGflagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateServiceGflagDefault(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 - } -} - -// NewUpdateServiceGflagOK creates a UpdateServiceGflagOK with default headers values -func NewUpdateServiceGflagOK() *UpdateServiceGflagOK { - return &UpdateServiceGflagOK{} -} - -/* -UpdateServiceGflagOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateServiceGflagOK struct { - Payload []*models.ServiceGflags -} - -// IsSuccess returns true when this update service gflag o k response has a 2xx status code -func (o *UpdateServiceGflagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update service gflag o k response has a 3xx status code -func (o *UpdateServiceGflagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update service gflag o k response has a 4xx status code -func (o *UpdateServiceGflagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update service gflag o k response has a 5xx status code -func (o *UpdateServiceGflagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update service gflag o k response a status code equal to that given -func (o *UpdateServiceGflagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update service gflag o k response -func (o *UpdateServiceGflagOK) Code() int { - return 200 -} - -func (o *UpdateServiceGflagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/gflag][%d] updateServiceGflagOK %s", 200, payload) -} - -func (o *UpdateServiceGflagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/gflag][%d] updateServiceGflagOK %s", 200, payload) -} - -func (o *UpdateServiceGflagOK) GetPayload() []*models.ServiceGflags { - return o.Payload -} - -func (o *UpdateServiceGflagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateServiceGflagDefault creates a UpdateServiceGflagDefault with default headers values -func NewUpdateServiceGflagDefault(code int) *UpdateServiceGflagDefault { - return &UpdateServiceGflagDefault{ - _statusCode: code, - } -} - -/* -UpdateServiceGflagDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateServiceGflagDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update service gflag default response has a 2xx status code -func (o *UpdateServiceGflagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update service gflag default response has a 3xx status code -func (o *UpdateServiceGflagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update service gflag default response has a 4xx status code -func (o *UpdateServiceGflagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update service gflag default response has a 5xx status code -func (o *UpdateServiceGflagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update service gflag default response a status code equal to that given -func (o *UpdateServiceGflagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update service gflag default response -func (o *UpdateServiceGflagDefault) Code() int { - return o._statusCode -} - -func (o *UpdateServiceGflagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/gflag][%d] UpdateServiceGflag default %s", o._statusCode, payload) -} - -func (o *UpdateServiceGflagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/gflag][%d] UpdateServiceGflag default %s", o._statusCode, payload) -} - -func (o *UpdateServiceGflagDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateServiceGflagDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/clusters/upgrade_cluster_parameters.go b/v1/client/clusters/upgrade_cluster_parameters.go deleted file mode 100644 index 7c230dc8..00000000 --- a/v1/client/clusters/upgrade_cluster_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpgradeClusterParams creates a new UpgradeClusterParams 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 NewUpgradeClusterParams() *UpgradeClusterParams { - return &UpgradeClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradeClusterParamsWithTimeout creates a new UpgradeClusterParams object -// with the ability to set a timeout on a request. -func NewUpgradeClusterParamsWithTimeout(timeout time.Duration) *UpgradeClusterParams { - return &UpgradeClusterParams{ - timeout: timeout, - } -} - -// NewUpgradeClusterParamsWithContext creates a new UpgradeClusterParams object -// with the ability to set a context for a request. -func NewUpgradeClusterParamsWithContext(ctx context.Context) *UpgradeClusterParams { - return &UpgradeClusterParams{ - Context: ctx, - } -} - -// NewUpgradeClusterParamsWithHTTPClient creates a new UpgradeClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradeClusterParamsWithHTTPClient(client *http.Client) *UpgradeClusterParams { - return &UpgradeClusterParams{ - HTTPClient: client, - } -} - -/* -UpgradeClusterParams contains all the parameters to send to the API endpoint - - for the upgrade cluster operation. - - Typically these are written to a http.Request. -*/ -type UpgradeClusterParams struct { - - // Body. - Body *models.UpgradeClusterParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeClusterParams) WithDefaults() *UpgradeClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade cluster params -func (o *UpgradeClusterParams) WithTimeout(timeout time.Duration) *UpgradeClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade cluster params -func (o *UpgradeClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade cluster params -func (o *UpgradeClusterParams) WithContext(ctx context.Context) *UpgradeClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade cluster params -func (o *UpgradeClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade cluster params -func (o *UpgradeClusterParams) WithHTTPClient(client *http.Client) *UpgradeClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade cluster params -func (o *UpgradeClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upgrade cluster params -func (o *UpgradeClusterParams) WithBody(body *models.UpgradeClusterParameters) *UpgradeClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upgrade cluster params -func (o *UpgradeClusterParams) SetBody(body *models.UpgradeClusterParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradeClusterParams) 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/clusters/upgrade_cluster_responses.go b/v1/client/clusters/upgrade_cluster_responses.go deleted file mode 100644 index 54724d33..00000000 --- a/v1/client/clusters/upgrade_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpgradeClusterReader is a Reader for the UpgradeCluster structure. -type UpgradeClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradeClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpgradeClusterAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradeClusterDefault(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 - } -} - -// NewUpgradeClusterAccepted creates a UpgradeClusterAccepted with default headers values -func NewUpgradeClusterAccepted() *UpgradeClusterAccepted { - return &UpgradeClusterAccepted{} -} - -/* -UpgradeClusterAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UpgradeClusterAccepted struct { - Payload *models.UpgradeClusterResult -} - -// IsSuccess returns true when this upgrade cluster accepted response has a 2xx status code -func (o *UpgradeClusterAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade cluster accepted response has a 3xx status code -func (o *UpgradeClusterAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade cluster accepted response has a 4xx status code -func (o *UpgradeClusterAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade cluster accepted response has a 5xx status code -func (o *UpgradeClusterAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade cluster accepted response a status code equal to that given -func (o *UpgradeClusterAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the upgrade cluster accepted response -func (o *UpgradeClusterAccepted) Code() int { - return 202 -} - -func (o *UpgradeClusterAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/software][%d] upgradeClusterAccepted %s", 202, payload) -} - -func (o *UpgradeClusterAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/software][%d] upgradeClusterAccepted %s", 202, payload) -} - -func (o *UpgradeClusterAccepted) GetPayload() *models.UpgradeClusterResult { - return o.Payload -} - -func (o *UpgradeClusterAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpgradeClusterResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradeClusterDefault creates a UpgradeClusterDefault with default headers values -func NewUpgradeClusterDefault(code int) *UpgradeClusterDefault { - return &UpgradeClusterDefault{ - _statusCode: code, - } -} - -/* -UpgradeClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradeClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upgrade cluster default response has a 2xx status code -func (o *UpgradeClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade cluster default response has a 3xx status code -func (o *UpgradeClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade cluster default response has a 4xx status code -func (o *UpgradeClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade cluster default response has a 5xx status code -func (o *UpgradeClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade cluster default response a status code equal to that given -func (o *UpgradeClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade cluster default response -func (o *UpgradeClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpgradeClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/software][%d] UpgradeCluster default %s", o._statusCode, payload) -} - -func (o *UpgradeClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/clusters/software][%d] UpgradeCluster default %s", o._statusCode, payload) -} - -func (o *UpgradeClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpgradeClusterDefault) 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/cohesity_internal_r_e_s_t_api_client.go b/v1/client/cohesity_internal_r_e_s_t_api_client.go deleted file mode 100644 index 27b02853..00000000 --- a/v1/client/cohesity_internal_r_e_s_t_api_client.go +++ /dev/null @@ -1,482 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/access_tokens" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/active_directory" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/alerts" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/analytics" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/antivirus_service_group" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/app" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/app_instance" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/athena_tokens" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/audit" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/backup_jobs" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/backup_sources" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/banner" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/certificates" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/clone" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/clone_application" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/clone_refresh_tasks" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/cluster" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/cluster_partitions" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/clusters" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/command" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/custom_reporting" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/dashboard" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/deploy" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/destroy_clone" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/disks" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/download_files" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/file" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/get_k_m_s_status_response" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/groups" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/idps" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/interface_group" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/interface_operations" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/ip" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/kms_configuration" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/ldap_provider" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/license_agreement" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/monitoring" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/network" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/nodes" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/notifications" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/packages" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/passwords" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/preferences" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/principals" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/privileges" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/protection_jobs" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/protection_objects" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/protection_policies" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/protection_runs" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/protection_sources" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/recover_application" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/remote_cluster" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/remote_restore" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/reports" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/restore" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/restore_app" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/restore_files" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/restore_tasks" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/roles" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/routes" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/s_m_b_file_opens" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/scheduler" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/search" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/search_files" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/search_vms" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/snmp" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/statistics" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/stats" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/tags" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/tenant" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/vaults" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/view_boxes" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/views" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/vlan" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/client/vm" -) - -// Default cohesity internal r e s t API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/irisservices/api/v1" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"https"} - -// NewHTTPClient creates a new cohesity internal r e s t API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *CohesityInternalRESTAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new cohesity internal r e s t API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *CohesityInternalRESTAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new cohesity internal r e s t API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *CohesityInternalRESTAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(CohesityInternalRESTAPI) - cli.Transport = transport - cli.AccessTokens = access_tokens.New(transport, formats) - cli.ActiveDirectory = active_directory.New(transport, formats) - cli.Alerts = alerts.New(transport, formats) - cli.Analytics = analytics.New(transport, formats) - cli.AntivirusServiceGroup = antivirus_service_group.New(transport, formats) - cli.App = app.New(transport, formats) - cli.AppInstance = app_instance.New(transport, formats) - cli.AthenaTokens = athena_tokens.New(transport, formats) - cli.Audit = audit.New(transport, formats) - cli.BackupJobs = backup_jobs.New(transport, formats) - cli.BackupSources = backup_sources.New(transport, formats) - cli.Banner = banner.New(transport, formats) - cli.Certificates = certificates.New(transport, formats) - cli.Clone = clone.New(transport, formats) - cli.CloneApplication = clone_application.New(transport, formats) - cli.CloneRefreshTasks = clone_refresh_tasks.New(transport, formats) - cli.Cluster = cluster.New(transport, formats) - cli.ClusterPartitions = cluster_partitions.New(transport, formats) - cli.Clusters = clusters.New(transport, formats) - cli.Command = command.New(transport, formats) - cli.CustomReporting = custom_reporting.New(transport, formats) - cli.Dashboard = dashboard.New(transport, formats) - cli.Deploy = deploy.New(transport, formats) - cli.DestroyClone = destroy_clone.New(transport, formats) - cli.Disks = disks.New(transport, formats) - cli.DownloadFiles = download_files.New(transport, formats) - cli.File = file.New(transport, formats) - cli.GetkmsStatusResponse = get_k_m_s_status_response.New(transport, formats) - cli.Groups = groups.New(transport, formats) - cli.Idps = idps.New(transport, formats) - cli.InterfaceGroup = interface_group.New(transport, formats) - cli.InterfaceOperations = interface_operations.New(transport, formats) - cli.IP = ip.New(transport, formats) - cli.KmsConfiguration = kms_configuration.New(transport, formats) - cli.LdapProvider = ldap_provider.New(transport, formats) - cli.LicenseAgreement = license_agreement.New(transport, formats) - cli.Monitoring = monitoring.New(transport, formats) - cli.Network = network.New(transport, formats) - cli.Nodes = nodes.New(transport, formats) - cli.Notifications = notifications.New(transport, formats) - cli.Packages = packages.New(transport, formats) - cli.Passwords = passwords.New(transport, formats) - cli.Preferences = preferences.New(transport, formats) - cli.Principals = principals.New(transport, formats) - cli.Privileges = privileges.New(transport, formats) - cli.ProtectionJobs = protection_jobs.New(transport, formats) - cli.ProtectionObjects = protection_objects.New(transport, formats) - cli.ProtectionPolicies = protection_policies.New(transport, formats) - cli.ProtectionRuns = protection_runs.New(transport, formats) - cli.ProtectionSources = protection_sources.New(transport, formats) - cli.RecoverApplication = recover_application.New(transport, formats) - cli.RemoteCluster = remote_cluster.New(transport, formats) - cli.RemoteRestore = remote_restore.New(transport, formats) - cli.Reports = reports.New(transport, formats) - cli.Restore = restore.New(transport, formats) - cli.RestoreApp = restore_app.New(transport, formats) - cli.RestoreFiles = restore_files.New(transport, formats) - cli.RestoreTasks = restore_tasks.New(transport, formats) - cli.Roles = roles.New(transport, formats) - cli.Routes = routes.New(transport, formats) - cli.SmbFileOpens = s_m_b_file_opens.New(transport, formats) - cli.Scheduler = scheduler.New(transport, formats) - cli.Search = search.New(transport, formats) - cli.SearchFiles = search_files.New(transport, formats) - cli.SearchVms = search_vms.New(transport, formats) - cli.Snmp = snmp.New(transport, formats) - cli.Statistics = statistics.New(transport, formats) - cli.Stats = stats.New(transport, formats) - cli.Tags = tags.New(transport, formats) - cli.Tenant = tenant.New(transport, formats) - cli.Vaults = vaults.New(transport, formats) - cli.ViewBoxes = view_boxes.New(transport, formats) - cli.Views = views.New(transport, formats) - cli.Vlan = vlan.New(transport, formats) - cli.VM = vm.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// CohesityInternalRESTAPI is a client for cohesity internal r e s t API -type CohesityInternalRESTAPI struct { - AccessTokens access_tokens.ClientService - - ActiveDirectory active_directory.ClientService - - Alerts alerts.ClientService - - Analytics analytics.ClientService - - AntivirusServiceGroup antivirus_service_group.ClientService - - App app.ClientService - - AppInstance app_instance.ClientService - - AthenaTokens athena_tokens.ClientService - - Audit audit.ClientService - - BackupJobs backup_jobs.ClientService - - BackupSources backup_sources.ClientService - - Banner banner.ClientService - - Certificates certificates.ClientService - - Clone clone.ClientService - - CloneApplication clone_application.ClientService - - CloneRefreshTasks clone_refresh_tasks.ClientService - - Cluster cluster.ClientService - - ClusterPartitions cluster_partitions.ClientService - - Clusters clusters.ClientService - - Command command.ClientService - - CustomReporting custom_reporting.ClientService - - Dashboard dashboard.ClientService - - Deploy deploy.ClientService - - DestroyClone destroy_clone.ClientService - - Disks disks.ClientService - - DownloadFiles download_files.ClientService - - File file.ClientService - - GetkmsStatusResponse get_k_m_s_status_response.ClientService - - Groups groups.ClientService - - Idps idps.ClientService - - InterfaceGroup interface_group.ClientService - - InterfaceOperations interface_operations.ClientService - - IP ip.ClientService - - KmsConfiguration kms_configuration.ClientService - - LdapProvider ldap_provider.ClientService - - LicenseAgreement license_agreement.ClientService - - Monitoring monitoring.ClientService - - Network network.ClientService - - Nodes nodes.ClientService - - Notifications notifications.ClientService - - Packages packages.ClientService - - Passwords passwords.ClientService - - Preferences preferences.ClientService - - Principals principals.ClientService - - Privileges privileges.ClientService - - ProtectionJobs protection_jobs.ClientService - - ProtectionObjects protection_objects.ClientService - - ProtectionPolicies protection_policies.ClientService - - ProtectionRuns protection_runs.ClientService - - ProtectionSources protection_sources.ClientService - - RecoverApplication recover_application.ClientService - - RemoteCluster remote_cluster.ClientService - - RemoteRestore remote_restore.ClientService - - Reports reports.ClientService - - Restore restore.ClientService - - RestoreApp restore_app.ClientService - - RestoreFiles restore_files.ClientService - - RestoreTasks restore_tasks.ClientService - - Roles roles.ClientService - - Routes routes.ClientService - - SmbFileOpens s_m_b_file_opens.ClientService - - Scheduler scheduler.ClientService - - Search search.ClientService - - SearchFiles search_files.ClientService - - SearchVms search_vms.ClientService - - Snmp snmp.ClientService - - Statistics statistics.ClientService - - Stats stats.ClientService - - Tags tags.ClientService - - Tenant tenant.ClientService - - Vaults vaults.ClientService - - ViewBoxes view_boxes.ClientService - - Views views.ClientService - - Vlan vlan.ClientService - - VM vm.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *CohesityInternalRESTAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.AccessTokens.SetTransport(transport) - c.ActiveDirectory.SetTransport(transport) - c.Alerts.SetTransport(transport) - c.Analytics.SetTransport(transport) - c.AntivirusServiceGroup.SetTransport(transport) - c.App.SetTransport(transport) - c.AppInstance.SetTransport(transport) - c.AthenaTokens.SetTransport(transport) - c.Audit.SetTransport(transport) - c.BackupJobs.SetTransport(transport) - c.BackupSources.SetTransport(transport) - c.Banner.SetTransport(transport) - c.Certificates.SetTransport(transport) - c.Clone.SetTransport(transport) - c.CloneApplication.SetTransport(transport) - c.CloneRefreshTasks.SetTransport(transport) - c.Cluster.SetTransport(transport) - c.ClusterPartitions.SetTransport(transport) - c.Clusters.SetTransport(transport) - c.Command.SetTransport(transport) - c.CustomReporting.SetTransport(transport) - c.Dashboard.SetTransport(transport) - c.Deploy.SetTransport(transport) - c.DestroyClone.SetTransport(transport) - c.Disks.SetTransport(transport) - c.DownloadFiles.SetTransport(transport) - c.File.SetTransport(transport) - c.GetkmsStatusResponse.SetTransport(transport) - c.Groups.SetTransport(transport) - c.Idps.SetTransport(transport) - c.InterfaceGroup.SetTransport(transport) - c.InterfaceOperations.SetTransport(transport) - c.IP.SetTransport(transport) - c.KmsConfiguration.SetTransport(transport) - c.LdapProvider.SetTransport(transport) - c.LicenseAgreement.SetTransport(transport) - c.Monitoring.SetTransport(transport) - c.Network.SetTransport(transport) - c.Nodes.SetTransport(transport) - c.Notifications.SetTransport(transport) - c.Packages.SetTransport(transport) - c.Passwords.SetTransport(transport) - c.Preferences.SetTransport(transport) - c.Principals.SetTransport(transport) - c.Privileges.SetTransport(transport) - c.ProtectionJobs.SetTransport(transport) - c.ProtectionObjects.SetTransport(transport) - c.ProtectionPolicies.SetTransport(transport) - c.ProtectionRuns.SetTransport(transport) - c.ProtectionSources.SetTransport(transport) - c.RecoverApplication.SetTransport(transport) - c.RemoteCluster.SetTransport(transport) - c.RemoteRestore.SetTransport(transport) - c.Reports.SetTransport(transport) - c.Restore.SetTransport(transport) - c.RestoreApp.SetTransport(transport) - c.RestoreFiles.SetTransport(transport) - c.RestoreTasks.SetTransport(transport) - c.Roles.SetTransport(transport) - c.Routes.SetTransport(transport) - c.SmbFileOpens.SetTransport(transport) - c.Scheduler.SetTransport(transport) - c.Search.SetTransport(transport) - c.SearchFiles.SetTransport(transport) - c.SearchVms.SetTransport(transport) - c.Snmp.SetTransport(transport) - c.Statistics.SetTransport(transport) - c.Stats.SetTransport(transport) - c.Tags.SetTransport(transport) - c.Tenant.SetTransport(transport) - c.Vaults.SetTransport(transport) - c.ViewBoxes.SetTransport(transport) - c.Views.SetTransport(transport) - c.Vlan.SetTransport(transport) - c.VM.SetTransport(transport) -} diff --git a/v1/client/command/command_client.go b/v1/client/command/command_client.go deleted file mode 100644 index 2357c27f..00000000 --- a/v1/client/command/command_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package command - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new command API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new command API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new command API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for command API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - LinuxCommandExecute(params *LinuxCommandExecuteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxCommandExecuteOK, error) - - LinuxCommandList(params *LinuxCommandListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxCommandListOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -LinuxCommandExecute runs a linux command - -Returns the command status upon completion. -*/ -func (a *Client) LinuxCommandExecute(params *LinuxCommandExecuteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxCommandExecuteOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLinuxCommandExecuteParams() - } - op := &runtime.ClientOperation{ - ID: "LinuxCommandExecute", - Method: "POST", - PathPattern: "/linuxCommand/execute", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LinuxCommandExecuteReader{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.(*LinuxCommandExecuteOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LinuxCommandExecuteDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LinuxCommandList runs a linux command - -Returns the command status upon completion. -*/ -func (a *Client) LinuxCommandList(params *LinuxCommandListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxCommandListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLinuxCommandListParams() - } - op := &runtime.ClientOperation{ - ID: "LinuxCommandList", - Method: "GET", - PathPattern: "/linuxCommand/list", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LinuxCommandListReader{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.(*LinuxCommandListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LinuxCommandListDefault) - 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/command/linux_command_execute_parameters.go b/v1/client/command/linux_command_execute_parameters.go deleted file mode 100644 index 4b32abbd..00000000 --- a/v1/client/command/linux_command_execute_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package command - -// 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" -) - -// NewLinuxCommandExecuteParams creates a new LinuxCommandExecuteParams 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 NewLinuxCommandExecuteParams() *LinuxCommandExecuteParams { - return &LinuxCommandExecuteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLinuxCommandExecuteParamsWithTimeout creates a new LinuxCommandExecuteParams object -// with the ability to set a timeout on a request. -func NewLinuxCommandExecuteParamsWithTimeout(timeout time.Duration) *LinuxCommandExecuteParams { - return &LinuxCommandExecuteParams{ - timeout: timeout, - } -} - -// NewLinuxCommandExecuteParamsWithContext creates a new LinuxCommandExecuteParams object -// with the ability to set a context for a request. -func NewLinuxCommandExecuteParamsWithContext(ctx context.Context) *LinuxCommandExecuteParams { - return &LinuxCommandExecuteParams{ - Context: ctx, - } -} - -// NewLinuxCommandExecuteParamsWithHTTPClient creates a new LinuxCommandExecuteParams object -// with the ability to set a custom HTTPClient for a request. -func NewLinuxCommandExecuteParamsWithHTTPClient(client *http.Client) *LinuxCommandExecuteParams { - return &LinuxCommandExecuteParams{ - HTTPClient: client, - } -} - -/* -LinuxCommandExecuteParams contains all the parameters to send to the API endpoint - - for the linux command execute operation. - - Typically these are written to a http.Request. -*/ -type LinuxCommandExecuteParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the linux command execute params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxCommandExecuteParams) WithDefaults() *LinuxCommandExecuteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the linux command execute params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxCommandExecuteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the linux command execute params -func (o *LinuxCommandExecuteParams) WithTimeout(timeout time.Duration) *LinuxCommandExecuteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the linux command execute params -func (o *LinuxCommandExecuteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the linux command execute params -func (o *LinuxCommandExecuteParams) WithContext(ctx context.Context) *LinuxCommandExecuteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the linux command execute params -func (o *LinuxCommandExecuteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the linux command execute params -func (o *LinuxCommandExecuteParams) WithHTTPClient(client *http.Client) *LinuxCommandExecuteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the linux command execute params -func (o *LinuxCommandExecuteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *LinuxCommandExecuteParams) 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/command/linux_command_execute_responses.go b/v1/client/command/linux_command_execute_responses.go deleted file mode 100644 index 218d3d80..00000000 --- a/v1/client/command/linux_command_execute_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package command - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LinuxCommandExecuteReader is a Reader for the LinuxCommandExecute structure. -type LinuxCommandExecuteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LinuxCommandExecuteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewLinuxCommandExecuteOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLinuxCommandExecuteDefault(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 - } -} - -// NewLinuxCommandExecuteOK creates a LinuxCommandExecuteOK with default headers values -func NewLinuxCommandExecuteOK() *LinuxCommandExecuteOK { - return &LinuxCommandExecuteOK{} -} - -/* -LinuxCommandExecuteOK describes a response with status code 200, with default header values. - -Success -*/ -type LinuxCommandExecuteOK struct { - Payload []*models.LinuxCommandExecuteNodeResp -} - -// IsSuccess returns true when this linux command execute o k response has a 2xx status code -func (o *LinuxCommandExecuteOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this linux command execute o k response has a 3xx status code -func (o *LinuxCommandExecuteOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this linux command execute o k response has a 4xx status code -func (o *LinuxCommandExecuteOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this linux command execute o k response has a 5xx status code -func (o *LinuxCommandExecuteOK) IsServerError() bool { - return false -} - -// IsCode returns true when this linux command execute o k response a status code equal to that given -func (o *LinuxCommandExecuteOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the linux command execute o k response -func (o *LinuxCommandExecuteOK) Code() int { - return 200 -} - -func (o *LinuxCommandExecuteOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /linuxCommand/execute][%d] linuxCommandExecuteOK %s", 200, payload) -} - -func (o *LinuxCommandExecuteOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /linuxCommand/execute][%d] linuxCommandExecuteOK %s", 200, payload) -} - -func (o *LinuxCommandExecuteOK) GetPayload() []*models.LinuxCommandExecuteNodeResp { - return o.Payload -} - -func (o *LinuxCommandExecuteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLinuxCommandExecuteDefault creates a LinuxCommandExecuteDefault with default headers values -func NewLinuxCommandExecuteDefault(code int) *LinuxCommandExecuteDefault { - return &LinuxCommandExecuteDefault{ - _statusCode: code, - } -} - -/* -LinuxCommandExecuteDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type LinuxCommandExecuteDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this linux command execute default response has a 2xx status code -func (o *LinuxCommandExecuteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this linux command execute default response has a 3xx status code -func (o *LinuxCommandExecuteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this linux command execute default response has a 4xx status code -func (o *LinuxCommandExecuteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this linux command execute default response has a 5xx status code -func (o *LinuxCommandExecuteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this linux command execute default response a status code equal to that given -func (o *LinuxCommandExecuteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the linux command execute default response -func (o *LinuxCommandExecuteDefault) Code() int { - return o._statusCode -} - -func (o *LinuxCommandExecuteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /linuxCommand/execute][%d] LinuxCommandExecute default %s", o._statusCode, payload) -} - -func (o *LinuxCommandExecuteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /linuxCommand/execute][%d] LinuxCommandExecute default %s", o._statusCode, payload) -} - -func (o *LinuxCommandExecuteDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *LinuxCommandExecuteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/command/linux_command_list_parameters.go b/v1/client/command/linux_command_list_parameters.go deleted file mode 100644 index b655f3ee..00000000 --- a/v1/client/command/linux_command_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package command - -// 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" -) - -// NewLinuxCommandListParams creates a new LinuxCommandListParams 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 NewLinuxCommandListParams() *LinuxCommandListParams { - return &LinuxCommandListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLinuxCommandListParamsWithTimeout creates a new LinuxCommandListParams object -// with the ability to set a timeout on a request. -func NewLinuxCommandListParamsWithTimeout(timeout time.Duration) *LinuxCommandListParams { - return &LinuxCommandListParams{ - timeout: timeout, - } -} - -// NewLinuxCommandListParamsWithContext creates a new LinuxCommandListParams object -// with the ability to set a context for a request. -func NewLinuxCommandListParamsWithContext(ctx context.Context) *LinuxCommandListParams { - return &LinuxCommandListParams{ - Context: ctx, - } -} - -// NewLinuxCommandListParamsWithHTTPClient creates a new LinuxCommandListParams object -// with the ability to set a custom HTTPClient for a request. -func NewLinuxCommandListParamsWithHTTPClient(client *http.Client) *LinuxCommandListParams { - return &LinuxCommandListParams{ - HTTPClient: client, - } -} - -/* -LinuxCommandListParams contains all the parameters to send to the API endpoint - - for the linux command list operation. - - Typically these are written to a http.Request. -*/ -type LinuxCommandListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the linux command list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxCommandListParams) WithDefaults() *LinuxCommandListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the linux command list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxCommandListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the linux command list params -func (o *LinuxCommandListParams) WithTimeout(timeout time.Duration) *LinuxCommandListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the linux command list params -func (o *LinuxCommandListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the linux command list params -func (o *LinuxCommandListParams) WithContext(ctx context.Context) *LinuxCommandListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the linux command list params -func (o *LinuxCommandListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the linux command list params -func (o *LinuxCommandListParams) WithHTTPClient(client *http.Client) *LinuxCommandListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the linux command list params -func (o *LinuxCommandListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *LinuxCommandListParams) 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/command/linux_command_list_responses.go b/v1/client/command/linux_command_list_responses.go deleted file mode 100644 index 1b6fffb4..00000000 --- a/v1/client/command/linux_command_list_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package command - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LinuxCommandListReader is a Reader for the LinuxCommandList structure. -type LinuxCommandListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LinuxCommandListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewLinuxCommandListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLinuxCommandListDefault(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 - } -} - -// NewLinuxCommandListOK creates a LinuxCommandListOK with default headers values -func NewLinuxCommandListOK() *LinuxCommandListOK { - return &LinuxCommandListOK{} -} - -/* -LinuxCommandListOK describes a response with status code 200, with default header values. - -Success -*/ -type LinuxCommandListOK struct { - Payload []*models.LinuxCommandListNodeResp -} - -// IsSuccess returns true when this linux command list o k response has a 2xx status code -func (o *LinuxCommandListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this linux command list o k response has a 3xx status code -func (o *LinuxCommandListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this linux command list o k response has a 4xx status code -func (o *LinuxCommandListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this linux command list o k response has a 5xx status code -func (o *LinuxCommandListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this linux command list o k response a status code equal to that given -func (o *LinuxCommandListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the linux command list o k response -func (o *LinuxCommandListOK) Code() int { - return 200 -} - -func (o *LinuxCommandListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /linuxCommand/list][%d] linuxCommandListOK %s", 200, payload) -} - -func (o *LinuxCommandListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /linuxCommand/list][%d] linuxCommandListOK %s", 200, payload) -} - -func (o *LinuxCommandListOK) GetPayload() []*models.LinuxCommandListNodeResp { - return o.Payload -} - -func (o *LinuxCommandListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLinuxCommandListDefault creates a LinuxCommandListDefault with default headers values -func NewLinuxCommandListDefault(code int) *LinuxCommandListDefault { - return &LinuxCommandListDefault{ - _statusCode: code, - } -} - -/* -LinuxCommandListDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type LinuxCommandListDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this linux command list default response has a 2xx status code -func (o *LinuxCommandListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this linux command list default response has a 3xx status code -func (o *LinuxCommandListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this linux command list default response has a 4xx status code -func (o *LinuxCommandListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this linux command list default response has a 5xx status code -func (o *LinuxCommandListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this linux command list default response a status code equal to that given -func (o *LinuxCommandListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the linux command list default response -func (o *LinuxCommandListDefault) Code() int { - return o._statusCode -} - -func (o *LinuxCommandListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /linuxCommand/list][%d] LinuxCommandList default %s", o._statusCode, payload) -} - -func (o *LinuxCommandListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /linuxCommand/list][%d] LinuxCommandList default %s", o._statusCode, payload) -} - -func (o *LinuxCommandListDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *LinuxCommandListDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/custom_reporting/custom_reporting_client.go b/v1/client/custom_reporting/custom_reporting_client.go deleted file mode 100644 index b85d14f8..00000000 --- a/v1/client/custom_reporting/custom_reporting_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package custom_reporting - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new custom reporting API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new custom reporting API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new custom reporting API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for custom reporting API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetPostgres(params *GetPostgresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPostgresOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetPostgres lists the postgres database running nodes on the cohesity cluster - -Returns the list of node information running postgres database. -*/ -func (a *Client) GetPostgres(params *GetPostgresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPostgresOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPostgresParams() - } - op := &runtime.ClientOperation{ - ID: "GetPostgres", - Method: "GET", - PathPattern: "/public/postgres", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPostgresReader{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.(*GetPostgresOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPostgresDefault) - 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/custom_reporting/get_postgres_parameters.go b/v1/client/custom_reporting/get_postgres_parameters.go deleted file mode 100644 index 9de22c30..00000000 --- a/v1/client/custom_reporting/get_postgres_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package custom_reporting - -// 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" -) - -// NewGetPostgresParams creates a new GetPostgresParams 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 NewGetPostgresParams() *GetPostgresParams { - return &GetPostgresParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPostgresParamsWithTimeout creates a new GetPostgresParams object -// with the ability to set a timeout on a request. -func NewGetPostgresParamsWithTimeout(timeout time.Duration) *GetPostgresParams { - return &GetPostgresParams{ - timeout: timeout, - } -} - -// NewGetPostgresParamsWithContext creates a new GetPostgresParams object -// with the ability to set a context for a request. -func NewGetPostgresParamsWithContext(ctx context.Context) *GetPostgresParams { - return &GetPostgresParams{ - Context: ctx, - } -} - -// NewGetPostgresParamsWithHTTPClient creates a new GetPostgresParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPostgresParamsWithHTTPClient(client *http.Client) *GetPostgresParams { - return &GetPostgresParams{ - HTTPClient: client, - } -} - -/* -GetPostgresParams contains all the parameters to send to the API endpoint - - for the get postgres operation. - - Typically these are written to a http.Request. -*/ -type GetPostgresParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get postgres params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPostgresParams) WithDefaults() *GetPostgresParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get postgres params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPostgresParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get postgres params -func (o *GetPostgresParams) WithTimeout(timeout time.Duration) *GetPostgresParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get postgres params -func (o *GetPostgresParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get postgres params -func (o *GetPostgresParams) WithContext(ctx context.Context) *GetPostgresParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get postgres params -func (o *GetPostgresParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get postgres params -func (o *GetPostgresParams) WithHTTPClient(client *http.Client) *GetPostgresParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get postgres params -func (o *GetPostgresParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPostgresParams) 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/custom_reporting/get_postgres_responses.go b/v1/client/custom_reporting/get_postgres_responses.go deleted file mode 100644 index 608b5f9f..00000000 --- a/v1/client/custom_reporting/get_postgres_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package custom_reporting - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetPostgresReader is a Reader for the GetPostgres structure. -type GetPostgresReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPostgresReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPostgresOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPostgresDefault(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 - } -} - -// NewGetPostgresOK creates a GetPostgresOK with default headers values -func NewGetPostgresOK() *GetPostgresOK { - return &GetPostgresOK{} -} - -/* -GetPostgresOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPostgresOK struct { - Payload []*models.PostgresNodeInfo -} - -// IsSuccess returns true when this get postgres o k response has a 2xx status code -func (o *GetPostgresOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get postgres o k response has a 3xx status code -func (o *GetPostgresOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get postgres o k response has a 4xx status code -func (o *GetPostgresOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get postgres o k response has a 5xx status code -func (o *GetPostgresOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get postgres o k response a status code equal to that given -func (o *GetPostgresOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get postgres o k response -func (o *GetPostgresOK) Code() int { - return 200 -} - -func (o *GetPostgresOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/postgres][%d] getPostgresOK %s", 200, payload) -} - -func (o *GetPostgresOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/postgres][%d] getPostgresOK %s", 200, payload) -} - -func (o *GetPostgresOK) GetPayload() []*models.PostgresNodeInfo { - return o.Payload -} - -func (o *GetPostgresOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPostgresDefault creates a GetPostgresDefault with default headers values -func NewGetPostgresDefault(code int) *GetPostgresDefault { - return &GetPostgresDefault{ - _statusCode: code, - } -} - -/* -GetPostgresDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPostgresDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get postgres default response has a 2xx status code -func (o *GetPostgresDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get postgres default response has a 3xx status code -func (o *GetPostgresDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get postgres default response has a 4xx status code -func (o *GetPostgresDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get postgres default response has a 5xx status code -func (o *GetPostgresDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get postgres default response a status code equal to that given -func (o *GetPostgresDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get postgres default response -func (o *GetPostgresDefault) Code() int { - return o._statusCode -} - -func (o *GetPostgresDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/postgres][%d] GetPostgres default %s", o._statusCode, payload) -} - -func (o *GetPostgresDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/postgres][%d] GetPostgres default %s", o._statusCode, payload) -} - -func (o *GetPostgresDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetPostgresDefault) 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/dashboard/dashboard_client.go b/v1/client/dashboard/dashboard_client.go deleted file mode 100644 index b425ba2c..00000000 --- a/v1/client/dashboard/dashboard_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package dashboard - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new dashboard API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new dashboard API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new dashboard API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for dashboard API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetDashboard(params *GetDashboardParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDashboardOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetDashboard returns the dashboard that match the filter criteria specified using parameters - -If no parameters are specified, dashboard for the local cluster is returned. -*/ -func (a *Client) GetDashboard(params *GetDashboardParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDashboardOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDashboardParams() - } - op := &runtime.ClientOperation{ - ID: "GetDashboard", - Method: "GET", - PathPattern: "/public/dashboard", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDashboardReader{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.(*GetDashboardOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDashboardDefault) - 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/dashboard/get_dashboard_parameters.go b/v1/client/dashboard/get_dashboard_parameters.go deleted file mode 100644 index 7e9dea9a..00000000 --- a/v1/client/dashboard/get_dashboard_parameters.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package dashboard - -// 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/go-openapi/swag" -) - -// NewGetDashboardParams creates a new GetDashboardParams 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 NewGetDashboardParams() *GetDashboardParams { - return &GetDashboardParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDashboardParamsWithTimeout creates a new GetDashboardParams object -// with the ability to set a timeout on a request. -func NewGetDashboardParamsWithTimeout(timeout time.Duration) *GetDashboardParams { - return &GetDashboardParams{ - timeout: timeout, - } -} - -// NewGetDashboardParamsWithContext creates a new GetDashboardParams object -// with the ability to set a context for a request. -func NewGetDashboardParamsWithContext(ctx context.Context) *GetDashboardParams { - return &GetDashboardParams{ - Context: ctx, - } -} - -// NewGetDashboardParamsWithHTTPClient creates a new GetDashboardParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDashboardParamsWithHTTPClient(client *http.Client) *GetDashboardParams { - return &GetDashboardParams{ - HTTPClient: client, - } -} - -/* -GetDashboardParams contains all the parameters to send to the API endpoint - - for the get dashboard operation. - - Typically these are written to a http.Request. -*/ -type GetDashboardParams struct { - - /* AllClusters. - - Summary data for all clusters. If this is set to true, all other - parameters will be ignored. - */ - AllClusters *bool - - /* ClusterID. - - Id of the remote cluster for which to fetch the data. If value is not - specified, it is assumed to be local cluster. - - Format: int64 - */ - ClusterID *int64 - - /* Refresh. - - Specifies whether to refresh the tiles selected. - */ - Refresh *bool - - /* TileTypes. - - Specifies the types of the tiles to be returned. If this is not - specified, all the tiles are returned. This is ignored when allClusters - is set to true. - 'kHealthTile' is the tile that shows health of the cluster and the alerts in - the past 24 hours. - 'kJobRunsTile' is the tile that shows job runs in the past 24 hours. - 'kRecoveriesTile' is the tile that shows recoveries done in the past 30 days. - 'kProtectedObjectsTile' is the tile that shows the protected objects details. - 'kProtectionTile' is the tile that shows the protection information in the - past 24 hours. - 'kAuditLogsTile' is the tile that shows the recent audit logs. - 'kIopsTile' is the tile that shows IP performance in the past 24 hours. - 'kThroughputTile' is the tile that shows job runs in the past 24 hours. - 'kStorageEfficiencyTile' is the tile that shows job runs in the past 7 days. - */ - TileTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get dashboard params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDashboardParams) WithDefaults() *GetDashboardParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get dashboard params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDashboardParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get dashboard params -func (o *GetDashboardParams) WithTimeout(timeout time.Duration) *GetDashboardParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get dashboard params -func (o *GetDashboardParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get dashboard params -func (o *GetDashboardParams) WithContext(ctx context.Context) *GetDashboardParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get dashboard params -func (o *GetDashboardParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get dashboard params -func (o *GetDashboardParams) WithHTTPClient(client *http.Client) *GetDashboardParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get dashboard params -func (o *GetDashboardParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllClusters adds the allClusters to the get dashboard params -func (o *GetDashboardParams) WithAllClusters(allClusters *bool) *GetDashboardParams { - o.SetAllClusters(allClusters) - return o -} - -// SetAllClusters adds the allClusters to the get dashboard params -func (o *GetDashboardParams) SetAllClusters(allClusters *bool) { - o.AllClusters = allClusters -} - -// WithClusterID adds the clusterID to the get dashboard params -func (o *GetDashboardParams) WithClusterID(clusterID *int64) *GetDashboardParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get dashboard params -func (o *GetDashboardParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithRefresh adds the refresh to the get dashboard params -func (o *GetDashboardParams) WithRefresh(refresh *bool) *GetDashboardParams { - o.SetRefresh(refresh) - return o -} - -// SetRefresh adds the refresh to the get dashboard params -func (o *GetDashboardParams) SetRefresh(refresh *bool) { - o.Refresh = refresh -} - -// WithTileTypes adds the tileTypes to the get dashboard params -func (o *GetDashboardParams) WithTileTypes(tileTypes []string) *GetDashboardParams { - o.SetTileTypes(tileTypes) - return o -} - -// SetTileTypes adds the tileTypes to the get dashboard params -func (o *GetDashboardParams) SetTileTypes(tileTypes []string) { - o.TileTypes = tileTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDashboardParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllClusters != nil { - - // query param allClusters - var qrAllClusters bool - - if o.AllClusters != nil { - qrAllClusters = *o.AllClusters - } - qAllClusters := swag.FormatBool(qrAllClusters) - if qAllClusters != "" { - - if err := r.SetQueryParam("allClusters", qAllClusters); err != nil { - return err - } - } - } - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.Refresh != nil { - - // query param refresh - var qrRefresh bool - - if o.Refresh != nil { - qrRefresh = *o.Refresh - } - qRefresh := swag.FormatBool(qrRefresh) - if qRefresh != "" { - - if err := r.SetQueryParam("refresh", qRefresh); err != nil { - return err - } - } - } - - if o.TileTypes != nil { - - // binding items for tileTypes - joinedTileTypes := o.bindParamTileTypes(reg) - - // query array param tileTypes - if err := r.SetQueryParam("tileTypes", joinedTileTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDashboard binds the parameter tileTypes -func (o *GetDashboardParams) bindParamTileTypes(formats strfmt.Registry) []string { - tileTypesIR := o.TileTypes - - var tileTypesIC []string - for _, tileTypesIIR := range tileTypesIR { // explode []string - - tileTypesIIV := tileTypesIIR // string as string - tileTypesIC = append(tileTypesIC, tileTypesIIV) - } - - // items.CollectionFormat: "" - tileTypesIS := swag.JoinByFormat(tileTypesIC, "") - - return tileTypesIS -} diff --git a/v1/client/dashboard/get_dashboard_responses.go b/v1/client/dashboard/get_dashboard_responses.go deleted file mode 100644 index 3b567f48..00000000 --- a/v1/client/dashboard/get_dashboard_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package dashboard - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDashboardReader is a Reader for the GetDashboard structure. -type GetDashboardReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDashboardReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDashboardOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDashboardDefault(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 - } -} - -// NewGetDashboardOK creates a GetDashboardOK with default headers values -func NewGetDashboardOK() *GetDashboardOK { - return &GetDashboardOK{} -} - -/* -GetDashboardOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDashboardOK struct { - Payload *models.DashboardResponse -} - -// IsSuccess returns true when this get dashboard o k response has a 2xx status code -func (o *GetDashboardOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get dashboard o k response has a 3xx status code -func (o *GetDashboardOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get dashboard o k response has a 4xx status code -func (o *GetDashboardOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get dashboard o k response has a 5xx status code -func (o *GetDashboardOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get dashboard o k response a status code equal to that given -func (o *GetDashboardOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get dashboard o k response -func (o *GetDashboardOK) Code() int { - return 200 -} - -func (o *GetDashboardOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/dashboard][%d] getDashboardOK %s", 200, payload) -} - -func (o *GetDashboardOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/dashboard][%d] getDashboardOK %s", 200, payload) -} - -func (o *GetDashboardOK) GetPayload() *models.DashboardResponse { - return o.Payload -} - -func (o *GetDashboardOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DashboardResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDashboardDefault creates a GetDashboardDefault with default headers values -func NewGetDashboardDefault(code int) *GetDashboardDefault { - return &GetDashboardDefault{ - _statusCode: code, - } -} - -/* -GetDashboardDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDashboardDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get dashboard default response has a 2xx status code -func (o *GetDashboardDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get dashboard default response has a 3xx status code -func (o *GetDashboardDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get dashboard default response has a 4xx status code -func (o *GetDashboardDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get dashboard default response has a 5xx status code -func (o *GetDashboardDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get dashboard default response a status code equal to that given -func (o *GetDashboardDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get dashboard default response -func (o *GetDashboardDefault) Code() int { - return o._statusCode -} - -func (o *GetDashboardDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/dashboard][%d] GetDashboard default %s", o._statusCode, payload) -} - -func (o *GetDashboardDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/dashboard][%d] GetDashboard default %s", o._statusCode, payload) -} - -func (o *GetDashboardDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetDashboardDefault) 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/deploy/deploy_client.go b/v1/client/deploy/deploy_client.go deleted file mode 100644 index 48b5133c..00000000 --- a/v1/client/deploy/deploy_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package deploy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new deploy API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new deploy API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new deploy API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for deploy API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeployVms(params *DeployVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeployVmsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeployVms deploys v ms on cloud - -Returns the Restore task response. -*/ -func (a *Client) DeployVms(params *DeployVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeployVmsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeployVmsParams() - } - op := &runtime.ClientOperation{ - ID: "DeployVms", - Method: "POST", - PathPattern: "/deploy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeployVmsReader{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.(*DeployVmsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeployVmsDefault) - 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/deploy/deploy_vms_parameters.go b/v1/client/deploy/deploy_vms_parameters.go deleted file mode 100644 index 91b6bafc..00000000 --- a/v1/client/deploy/deploy_vms_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package deploy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeployVmsParams creates a new DeployVmsParams 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 NewDeployVmsParams() *DeployVmsParams { - return &DeployVmsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeployVmsParamsWithTimeout creates a new DeployVmsParams object -// with the ability to set a timeout on a request. -func NewDeployVmsParamsWithTimeout(timeout time.Duration) *DeployVmsParams { - return &DeployVmsParams{ - timeout: timeout, - } -} - -// NewDeployVmsParamsWithContext creates a new DeployVmsParams object -// with the ability to set a context for a request. -func NewDeployVmsParamsWithContext(ctx context.Context) *DeployVmsParams { - return &DeployVmsParams{ - Context: ctx, - } -} - -// NewDeployVmsParamsWithHTTPClient creates a new DeployVmsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeployVmsParamsWithHTTPClient(client *http.Client) *DeployVmsParams { - return &DeployVmsParams{ - HTTPClient: client, - } -} - -/* -DeployVmsParams contains all the parameters to send to the API endpoint - - for the deploy vms operation. - - Typically these are written to a http.Request. -*/ -type DeployVmsParams struct { - - /* Body. - - Deploy VM argument - */ - Body *models.DeployArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the deploy vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployVmsParams) WithDefaults() *DeployVmsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the deploy vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeployVmsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the deploy vms params -func (o *DeployVmsParams) WithTimeout(timeout time.Duration) *DeployVmsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the deploy vms params -func (o *DeployVmsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the deploy vms params -func (o *DeployVmsParams) WithContext(ctx context.Context) *DeployVmsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the deploy vms params -func (o *DeployVmsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the deploy vms params -func (o *DeployVmsParams) WithHTTPClient(client *http.Client) *DeployVmsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the deploy vms params -func (o *DeployVmsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the deploy vms params -func (o *DeployVmsParams) WithBody(body *models.DeployArg) *DeployVmsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the deploy vms params -func (o *DeployVmsParams) SetBody(body *models.DeployArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeployVmsParams) 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/deploy/deploy_vms_responses.go b/v1/client/deploy/deploy_vms_responses.go deleted file mode 100644 index fb4e3fed..00000000 --- a/v1/client/deploy/deploy_vms_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package deploy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeployVmsReader is a Reader for the DeployVms structure. -type DeployVmsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeployVmsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeployVmsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeployVmsDefault(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 - } -} - -// NewDeployVmsOK creates a DeployVmsOK with default headers values -func NewDeployVmsOK() *DeployVmsOK { - return &DeployVmsOK{} -} - -/* -DeployVmsOK describes a response with status code 200, with default header values. - -Success -*/ -type DeployVmsOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this deploy vms o k response has a 2xx status code -func (o *DeployVmsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this deploy vms o k response has a 3xx status code -func (o *DeployVmsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this deploy vms o k response has a 4xx status code -func (o *DeployVmsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this deploy vms o k response has a 5xx status code -func (o *DeployVmsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this deploy vms o k response a status code equal to that given -func (o *DeployVmsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the deploy vms o k response -func (o *DeployVmsOK) Code() int { - return 200 -} - -func (o *DeployVmsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deploy][%d] deployVmsOK %s", 200, payload) -} - -func (o *DeployVmsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deploy][%d] deployVmsOK %s", 200, payload) -} - -func (o *DeployVmsOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *DeployVmsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeployVmsDefault creates a DeployVmsDefault with default headers values -func NewDeployVmsDefault(code int) *DeployVmsDefault { - return &DeployVmsDefault{ - _statusCode: code, - } -} - -/* -DeployVmsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DeployVmsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this deploy vms default response has a 2xx status code -func (o *DeployVmsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this deploy vms default response has a 3xx status code -func (o *DeployVmsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this deploy vms default response has a 4xx status code -func (o *DeployVmsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this deploy vms default response has a 5xx status code -func (o *DeployVmsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this deploy vms default response a status code equal to that given -func (o *DeployVmsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the deploy vms default response -func (o *DeployVmsDefault) Code() int { - return o._statusCode -} - -func (o *DeployVmsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deploy][%d] DeployVms default %s", o._statusCode, payload) -} - -func (o *DeployVmsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /deploy][%d] DeployVms default %s", o._statusCode, payload) -} - -func (o *DeployVmsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DeployVmsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/destroy_clone/destroy_clone_client.go b/v1/client/destroy_clone/destroy_clone_client.go deleted file mode 100644 index 6785ca68..00000000 --- a/v1/client/destroy_clone/destroy_clone_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package destroy_clone - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new destroy clone API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new destroy clone API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new destroy clone API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for destroy clone API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DestroyCloneTask(params *DestroyCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DestroyCloneTaskOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DestroyCloneTask destroys a clone task with specified id -*/ -func (a *Client) DestroyCloneTask(params *DestroyCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DestroyCloneTaskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDestroyCloneTaskParams() - } - op := &runtime.ClientOperation{ - ID: "DestroyCloneTask", - Method: "POST", - PathPattern: "/destroyclone/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DestroyCloneTaskReader{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.(*DestroyCloneTaskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DestroyCloneTaskDefault) - 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/destroy_clone/destroy_clone_task_parameters.go b/v1/client/destroy_clone/destroy_clone_task_parameters.go deleted file mode 100644 index bb81b37a..00000000 --- a/v1/client/destroy_clone/destroy_clone_task_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package destroy_clone - -// 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/go-openapi/swag" -) - -// NewDestroyCloneTaskParams creates a new DestroyCloneTaskParams 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 NewDestroyCloneTaskParams() *DestroyCloneTaskParams { - return &DestroyCloneTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDestroyCloneTaskParamsWithTimeout creates a new DestroyCloneTaskParams object -// with the ability to set a timeout on a request. -func NewDestroyCloneTaskParamsWithTimeout(timeout time.Duration) *DestroyCloneTaskParams { - return &DestroyCloneTaskParams{ - timeout: timeout, - } -} - -// NewDestroyCloneTaskParamsWithContext creates a new DestroyCloneTaskParams object -// with the ability to set a context for a request. -func NewDestroyCloneTaskParamsWithContext(ctx context.Context) *DestroyCloneTaskParams { - return &DestroyCloneTaskParams{ - Context: ctx, - } -} - -// NewDestroyCloneTaskParamsWithHTTPClient creates a new DestroyCloneTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewDestroyCloneTaskParamsWithHTTPClient(client *http.Client) *DestroyCloneTaskParams { - return &DestroyCloneTaskParams{ - HTTPClient: client, - } -} - -/* -DestroyCloneTaskParams contains all the parameters to send to the API endpoint - - for the destroy clone task operation. - - Typically these are written to a http.Request. -*/ -type DestroyCloneTaskParams struct { - - /* ID. - - Unique id of the Restore Job to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the destroy clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DestroyCloneTaskParams) WithDefaults() *DestroyCloneTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the destroy clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DestroyCloneTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the destroy clone task params -func (o *DestroyCloneTaskParams) WithTimeout(timeout time.Duration) *DestroyCloneTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the destroy clone task params -func (o *DestroyCloneTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the destroy clone task params -func (o *DestroyCloneTaskParams) WithContext(ctx context.Context) *DestroyCloneTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the destroy clone task params -func (o *DestroyCloneTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the destroy clone task params -func (o *DestroyCloneTaskParams) WithHTTPClient(client *http.Client) *DestroyCloneTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the destroy clone task params -func (o *DestroyCloneTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the destroy clone task params -func (o *DestroyCloneTaskParams) WithID(id int64) *DestroyCloneTaskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the destroy clone task params -func (o *DestroyCloneTaskParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DestroyCloneTaskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/destroy_clone/destroy_clone_task_responses.go b/v1/client/destroy_clone/destroy_clone_task_responses.go deleted file mode 100644 index 2e49a2a4..00000000 --- a/v1/client/destroy_clone/destroy_clone_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package destroy_clone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DestroyCloneTaskReader is a Reader for the DestroyCloneTask structure. -type DestroyCloneTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DestroyCloneTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDestroyCloneTaskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDestroyCloneTaskDefault(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 - } -} - -// NewDestroyCloneTaskOK creates a DestroyCloneTaskOK with default headers values -func NewDestroyCloneTaskOK() *DestroyCloneTaskOK { - return &DestroyCloneTaskOK{} -} - -/* -DestroyCloneTaskOK describes a response with status code 200, with default header values. - -Success -*/ -type DestroyCloneTaskOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this destroy clone task o k response has a 2xx status code -func (o *DestroyCloneTaskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this destroy clone task o k response has a 3xx status code -func (o *DestroyCloneTaskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this destroy clone task o k response has a 4xx status code -func (o *DestroyCloneTaskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this destroy clone task o k response has a 5xx status code -func (o *DestroyCloneTaskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this destroy clone task o k response a status code equal to that given -func (o *DestroyCloneTaskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the destroy clone task o k response -func (o *DestroyCloneTaskOK) Code() int { - return 200 -} - -func (o *DestroyCloneTaskOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /destroyclone/{id}][%d] destroyCloneTaskOK %s", 200, payload) -} - -func (o *DestroyCloneTaskOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /destroyclone/{id}][%d] destroyCloneTaskOK %s", 200, payload) -} - -func (o *DestroyCloneTaskOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *DestroyCloneTaskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDestroyCloneTaskDefault creates a DestroyCloneTaskDefault with default headers values -func NewDestroyCloneTaskDefault(code int) *DestroyCloneTaskDefault { - return &DestroyCloneTaskDefault{ - _statusCode: code, - } -} - -/* -DestroyCloneTaskDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DestroyCloneTaskDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this destroy clone task default response has a 2xx status code -func (o *DestroyCloneTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this destroy clone task default response has a 3xx status code -func (o *DestroyCloneTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this destroy clone task default response has a 4xx status code -func (o *DestroyCloneTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this destroy clone task default response has a 5xx status code -func (o *DestroyCloneTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this destroy clone task default response a status code equal to that given -func (o *DestroyCloneTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the destroy clone task default response -func (o *DestroyCloneTaskDefault) Code() int { - return o._statusCode -} - -func (o *DestroyCloneTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /destroyclone/{id}][%d] DestroyCloneTask default %s", o._statusCode, payload) -} - -func (o *DestroyCloneTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /destroyclone/{id}][%d] DestroyCloneTask default %s", o._statusCode, payload) -} - -func (o *DestroyCloneTaskDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DestroyCloneTaskDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/disks_client.go b/v1/client/disks/disks_client.go deleted file mode 100644 index 6863f75b..00000000 --- a/v1/client/disks/disks_client.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new disks API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new disks API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new disks API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for disks API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetDiskByID(params *GetDiskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDiskByIDOK, error) - - GetDiskStats(params *GetDiskStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDiskStatsOK, error) - - GetDisks(params *GetDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDisksOK, error) - - MarkDiskForRemoval(params *MarkDiskForRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkDiskForRemovalAccepted, error) - - UpdateDisk(params *UpdateDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDiskOK, error) - - UpdateHydraDiskReservation(params *UpdateHydraDiskReservationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHydraDiskReservationOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetDiskByID lists details about a single disk - -Returns the Disk corresponding to the specified Disk Id. -*/ -func (a *Client) GetDiskByID(params *GetDiskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDiskByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDiskByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetDiskById", - Method: "GET", - PathPattern: "/disks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDiskByIDReader{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.(*GetDiskByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDiskByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDiskStats lists details about disk stats - -Returns the top level stats for the disks in the clusters. -*/ -func (a *Client) GetDiskStats(params *GetDiskStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDiskStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDiskStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetDiskStats", - Method: "GET", - PathPattern: "/diskStats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDiskStatsReader{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.(*GetDiskStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDiskStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetDisks lists disks filtered by some parameters - - If no parameters are specified, all Disks currently on the Cohesity Cluster are - -returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetDisks(params *GetDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDisksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDisksParams() - } - op := &runtime.ClientOperation{ - ID: "GetDisks", - Method: "GET", - PathPattern: "/disks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDisksReader{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.(*GetDisksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDisksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -MarkDiskForRemoval marks a disk for removal - -Returns delete status upon completion. -*/ -func (a *Client) MarkDiskForRemoval(params *MarkDiskForRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkDiskForRemovalAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewMarkDiskForRemovalParams() - } - op := &runtime.ClientOperation{ - ID: "MarkDiskForRemoval", - Method: "DELETE", - PathPattern: "/disks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &MarkDiskForRemovalReader{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.(*MarkDiskForRemovalAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*MarkDiskForRemovalDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateDisk updates a disk - -Returns the updated Disk. -*/ -func (a *Client) UpdateDisk(params *UpdateDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDiskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDiskParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDisk", - Method: "PUT", - PathPattern: "/disks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDiskReader{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.(*UpdateDiskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDiskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateHydraDiskReservation updates a hydra disk reservation - -Returns the updated hydra disk reservation. -*/ -func (a *Client) UpdateHydraDiskReservation(params *UpdateHydraDiskReservationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHydraDiskReservationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateHydraDiskReservationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateHydraDiskReservation", - Method: "PUT", - PathPattern: "/updateHydraDiskReservation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateHydraDiskReservationReader{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.(*UpdateHydraDiskReservationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateHydraDiskReservationDefault) - 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/disks/get_disk_by_id_parameters.go b/v1/client/disks/get_disk_by_id_parameters.go deleted file mode 100644 index 69b5346c..00000000 --- a/v1/client/disks/get_disk_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/go-openapi/swag" -) - -// NewGetDiskByIDParams creates a new GetDiskByIDParams 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 NewGetDiskByIDParams() *GetDiskByIDParams { - return &GetDiskByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDiskByIDParamsWithTimeout creates a new GetDiskByIDParams object -// with the ability to set a timeout on a request. -func NewGetDiskByIDParamsWithTimeout(timeout time.Duration) *GetDiskByIDParams { - return &GetDiskByIDParams{ - timeout: timeout, - } -} - -// NewGetDiskByIDParamsWithContext creates a new GetDiskByIDParams object -// with the ability to set a context for a request. -func NewGetDiskByIDParamsWithContext(ctx context.Context) *GetDiskByIDParams { - return &GetDiskByIDParams{ - Context: ctx, - } -} - -// NewGetDiskByIDParamsWithHTTPClient creates a new GetDiskByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDiskByIDParamsWithHTTPClient(client *http.Client) *GetDiskByIDParams { - return &GetDiskByIDParams{ - HTTPClient: client, - } -} - -/* -GetDiskByIDParams contains all the parameters to send to the API endpoint - - for the get disk by Id operation. - - Typically these are written to a http.Request. -*/ -type GetDiskByIDParams struct { - - /* ID. - - Id of the Disk - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get disk by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDiskByIDParams) WithDefaults() *GetDiskByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get disk by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDiskByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get disk by Id params -func (o *GetDiskByIDParams) WithTimeout(timeout time.Duration) *GetDiskByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get disk by Id params -func (o *GetDiskByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get disk by Id params -func (o *GetDiskByIDParams) WithContext(ctx context.Context) *GetDiskByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get disk by Id params -func (o *GetDiskByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get disk by Id params -func (o *GetDiskByIDParams) WithHTTPClient(client *http.Client) *GetDiskByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get disk by Id params -func (o *GetDiskByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get disk by Id params -func (o *GetDiskByIDParams) WithID(id int64) *GetDiskByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get disk by Id params -func (o *GetDiskByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDiskByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/disks/get_disk_by_id_responses.go b/v1/client/disks/get_disk_by_id_responses.go deleted file mode 100644 index 0f9f4f91..00000000 --- a/v1/client/disks/get_disk_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDiskByIDReader is a Reader for the GetDiskByID structure. -type GetDiskByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDiskByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDiskByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDiskByIDDefault(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 - } -} - -// NewGetDiskByIDOK creates a GetDiskByIDOK with default headers values -func NewGetDiskByIDOK() *GetDiskByIDOK { - return &GetDiskByIDOK{} -} - -/* -GetDiskByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDiskByIDOK struct { - Payload []*models.DiskInternal -} - -// IsSuccess returns true when this get disk by Id o k response has a 2xx status code -func (o *GetDiskByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get disk by Id o k response has a 3xx status code -func (o *GetDiskByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get disk by Id o k response has a 4xx status code -func (o *GetDiskByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get disk by Id o k response has a 5xx status code -func (o *GetDiskByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get disk by Id o k response a status code equal to that given -func (o *GetDiskByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get disk by Id o k response -func (o *GetDiskByIDOK) Code() int { - return 200 -} - -func (o *GetDiskByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/{id}][%d] getDiskByIdOK %s", 200, payload) -} - -func (o *GetDiskByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/{id}][%d] getDiskByIdOK %s", 200, payload) -} - -func (o *GetDiskByIDOK) GetPayload() []*models.DiskInternal { - return o.Payload -} - -func (o *GetDiskByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDiskByIDDefault creates a GetDiskByIDDefault with default headers values -func NewGetDiskByIDDefault(code int) *GetDiskByIDDefault { - return &GetDiskByIDDefault{ - _statusCode: code, - } -} - -/* -GetDiskByIDDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetDiskByIDDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get disk by Id default response has a 2xx status code -func (o *GetDiskByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get disk by Id default response has a 3xx status code -func (o *GetDiskByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get disk by Id default response has a 4xx status code -func (o *GetDiskByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get disk by Id default response has a 5xx status code -func (o *GetDiskByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get disk by Id default response a status code equal to that given -func (o *GetDiskByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get disk by Id default response -func (o *GetDiskByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetDiskByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/{id}][%d] GetDiskById default %s", o._statusCode, payload) -} - -func (o *GetDiskByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/{id}][%d] GetDiskById default %s", o._statusCode, payload) -} - -func (o *GetDiskByIDDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetDiskByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/get_disk_stats_parameters.go b/v1/client/disks/get_disk_stats_parameters.go deleted file mode 100644 index bf434b3e..00000000 --- a/v1/client/disks/get_disk_stats_parameters.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/go-openapi/swag" -) - -// NewGetDiskStatsParams creates a new GetDiskStatsParams 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 NewGetDiskStatsParams() *GetDiskStatsParams { - return &GetDiskStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDiskStatsParamsWithTimeout creates a new GetDiskStatsParams object -// with the ability to set a timeout on a request. -func NewGetDiskStatsParamsWithTimeout(timeout time.Duration) *GetDiskStatsParams { - return &GetDiskStatsParams{ - timeout: timeout, - } -} - -// NewGetDiskStatsParamsWithContext creates a new GetDiskStatsParams object -// with the ability to set a context for a request. -func NewGetDiskStatsParamsWithContext(ctx context.Context) *GetDiskStatsParams { - return &GetDiskStatsParams{ - Context: ctx, - } -} - -// NewGetDiskStatsParamsWithHTTPClient creates a new GetDiskStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDiskStatsParamsWithHTTPClient(client *http.Client) *GetDiskStatsParams { - return &GetDiskStatsParams{ - HTTPClient: client, - } -} - -/* -GetDiskStatsParams contains all the parameters to send to the API endpoint - - for the get disk stats operation. - - Typically these are written to a http.Request. -*/ -type GetDiskStatsParams struct { - - /* FetchDiskUsage. - - FetchDiskUsage is used to specify whether to fetch the disk usage - details. - */ - FetchDiskUsage *bool - - /* FetchStats. - - FetchStats is used to specify whether to call Stats service to fetch the - stats for the disks. - */ - FetchStats *bool - - /* Ids. - - IdList is the ids of disks to be returned. If empty, all - nodes are returned. - */ - Ids []int64 - - /* IncludeMarkedForRemoval. - - IncludeMarkedForRemoval is used to specify whether to include disks - marked for removal. - */ - IncludeMarkedForRemoval *bool - - /* NodeIds. - - NodeIdList specifies the list of Node Ids used to filter the disks by - specified nodes. - */ - NodeIds []int64 - - /* OnlyReadyForRemoval. - - OnlyReadyForRemoval is used to list all disks in kOkToRemove state. - */ - OnlyReadyForRemoval *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get disk stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDiskStatsParams) WithDefaults() *GetDiskStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get disk stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDiskStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get disk stats params -func (o *GetDiskStatsParams) WithTimeout(timeout time.Duration) *GetDiskStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get disk stats params -func (o *GetDiskStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get disk stats params -func (o *GetDiskStatsParams) WithContext(ctx context.Context) *GetDiskStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get disk stats params -func (o *GetDiskStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get disk stats params -func (o *GetDiskStatsParams) WithHTTPClient(client *http.Client) *GetDiskStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get disk stats params -func (o *GetDiskStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFetchDiskUsage adds the fetchDiskUsage to the get disk stats params -func (o *GetDiskStatsParams) WithFetchDiskUsage(fetchDiskUsage *bool) *GetDiskStatsParams { - o.SetFetchDiskUsage(fetchDiskUsage) - return o -} - -// SetFetchDiskUsage adds the fetchDiskUsage to the get disk stats params -func (o *GetDiskStatsParams) SetFetchDiskUsage(fetchDiskUsage *bool) { - o.FetchDiskUsage = fetchDiskUsage -} - -// WithFetchStats adds the fetchStats to the get disk stats params -func (o *GetDiskStatsParams) WithFetchStats(fetchStats *bool) *GetDiskStatsParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get disk stats params -func (o *GetDiskStatsParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithIds adds the ids to the get disk stats params -func (o *GetDiskStatsParams) WithIds(ids []int64) *GetDiskStatsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get disk stats params -func (o *GetDiskStatsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get disk stats params -func (o *GetDiskStatsParams) WithIncludeMarkedForRemoval(includeMarkedForRemoval *bool) *GetDiskStatsParams { - o.SetIncludeMarkedForRemoval(includeMarkedForRemoval) - return o -} - -// SetIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get disk stats params -func (o *GetDiskStatsParams) SetIncludeMarkedForRemoval(includeMarkedForRemoval *bool) { - o.IncludeMarkedForRemoval = includeMarkedForRemoval -} - -// WithNodeIds adds the nodeIds to the get disk stats params -func (o *GetDiskStatsParams) WithNodeIds(nodeIds []int64) *GetDiskStatsParams { - o.SetNodeIds(nodeIds) - return o -} - -// SetNodeIds adds the nodeIds to the get disk stats params -func (o *GetDiskStatsParams) SetNodeIds(nodeIds []int64) { - o.NodeIds = nodeIds -} - -// WithOnlyReadyForRemoval adds the onlyReadyForRemoval to the get disk stats params -func (o *GetDiskStatsParams) WithOnlyReadyForRemoval(onlyReadyForRemoval *bool) *GetDiskStatsParams { - o.SetOnlyReadyForRemoval(onlyReadyForRemoval) - return o -} - -// SetOnlyReadyForRemoval adds the onlyReadyForRemoval to the get disk stats params -func (o *GetDiskStatsParams) SetOnlyReadyForRemoval(onlyReadyForRemoval *bool) { - o.OnlyReadyForRemoval = onlyReadyForRemoval -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDiskStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FetchDiskUsage != nil { - - // query param fetchDiskUsage - var qrFetchDiskUsage bool - - if o.FetchDiskUsage != nil { - qrFetchDiskUsage = *o.FetchDiskUsage - } - qFetchDiskUsage := swag.FormatBool(qrFetchDiskUsage) - if qFetchDiskUsage != "" { - - if err := r.SetQueryParam("fetchDiskUsage", qFetchDiskUsage); err != nil { - return err - } - } - } - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeMarkedForRemoval != nil { - - // query param includeMarkedForRemoval - var qrIncludeMarkedForRemoval bool - - if o.IncludeMarkedForRemoval != nil { - qrIncludeMarkedForRemoval = *o.IncludeMarkedForRemoval - } - qIncludeMarkedForRemoval := swag.FormatBool(qrIncludeMarkedForRemoval) - if qIncludeMarkedForRemoval != "" { - - if err := r.SetQueryParam("includeMarkedForRemoval", qIncludeMarkedForRemoval); err != nil { - return err - } - } - } - - if o.NodeIds != nil { - - // binding items for nodeIds - joinedNodeIds := o.bindParamNodeIds(reg) - - // query array param nodeIds - if err := r.SetQueryParam("nodeIds", joinedNodeIds...); err != nil { - return err - } - } - - if o.OnlyReadyForRemoval != nil { - - // query param onlyReadyForRemoval - var qrOnlyReadyForRemoval bool - - if o.OnlyReadyForRemoval != nil { - qrOnlyReadyForRemoval = *o.OnlyReadyForRemoval - } - qOnlyReadyForRemoval := swag.FormatBool(qrOnlyReadyForRemoval) - if qOnlyReadyForRemoval != "" { - - if err := r.SetQueryParam("onlyReadyForRemoval", qOnlyReadyForRemoval); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDiskStats binds the parameter ids -func (o *GetDiskStatsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetDiskStats binds the parameter nodeIds -func (o *GetDiskStatsParams) bindParamNodeIds(formats strfmt.Registry) []string { - nodeIdsIR := o.NodeIds - - var nodeIdsIC []string - for _, nodeIdsIIR := range nodeIdsIR { // explode []int64 - - nodeIdsIIV := swag.FormatInt64(nodeIdsIIR) // int64 as string - nodeIdsIC = append(nodeIdsIC, nodeIdsIIV) - } - - // items.CollectionFormat: "" - nodeIdsIS := swag.JoinByFormat(nodeIdsIC, "") - - return nodeIdsIS -} diff --git a/v1/client/disks/get_disk_stats_responses.go b/v1/client/disks/get_disk_stats_responses.go deleted file mode 100644 index 15c6c1dd..00000000 --- a/v1/client/disks/get_disk_stats_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDiskStatsReader is a Reader for the GetDiskStats structure. -type GetDiskStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDiskStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDiskStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDiskStatsDefault(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 - } -} - -// NewGetDiskStatsOK creates a GetDiskStatsOK with default headers values -func NewGetDiskStatsOK() *GetDiskStatsOK { - return &GetDiskStatsOK{} -} - -/* -GetDiskStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDiskStatsOK struct { - Payload []*models.DiskStats -} - -// IsSuccess returns true when this get disk stats o k response has a 2xx status code -func (o *GetDiskStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get disk stats o k response has a 3xx status code -func (o *GetDiskStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get disk stats o k response has a 4xx status code -func (o *GetDiskStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get disk stats o k response has a 5xx status code -func (o *GetDiskStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get disk stats o k response a status code equal to that given -func (o *GetDiskStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get disk stats o k response -func (o *GetDiskStatsOK) Code() int { - return 200 -} - -func (o *GetDiskStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /diskStats][%d] getDiskStatsOK %s", 200, payload) -} - -func (o *GetDiskStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /diskStats][%d] getDiskStatsOK %s", 200, payload) -} - -func (o *GetDiskStatsOK) GetPayload() []*models.DiskStats { - return o.Payload -} - -func (o *GetDiskStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDiskStatsDefault creates a GetDiskStatsDefault with default headers values -func NewGetDiskStatsDefault(code int) *GetDiskStatsDefault { - return &GetDiskStatsDefault{ - _statusCode: code, - } -} - -/* -GetDiskStatsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetDiskStatsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get disk stats default response has a 2xx status code -func (o *GetDiskStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get disk stats default response has a 3xx status code -func (o *GetDiskStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get disk stats default response has a 4xx status code -func (o *GetDiskStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get disk stats default response has a 5xx status code -func (o *GetDiskStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get disk stats default response a status code equal to that given -func (o *GetDiskStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get disk stats default response -func (o *GetDiskStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetDiskStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /diskStats][%d] GetDiskStats default %s", o._statusCode, payload) -} - -func (o *GetDiskStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /diskStats][%d] GetDiskStats default %s", o._statusCode, payload) -} - -func (o *GetDiskStatsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetDiskStatsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/get_disks_parameters.go b/v1/client/disks/get_disks_parameters.go deleted file mode 100644 index 07f96dbf..00000000 --- a/v1/client/disks/get_disks_parameters.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/go-openapi/swag" -) - -// NewGetDisksParams creates a new GetDisksParams 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 NewGetDisksParams() *GetDisksParams { - return &GetDisksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDisksParamsWithTimeout creates a new GetDisksParams object -// with the ability to set a timeout on a request. -func NewGetDisksParamsWithTimeout(timeout time.Duration) *GetDisksParams { - return &GetDisksParams{ - timeout: timeout, - } -} - -// NewGetDisksParamsWithContext creates a new GetDisksParams object -// with the ability to set a context for a request. -func NewGetDisksParamsWithContext(ctx context.Context) *GetDisksParams { - return &GetDisksParams{ - Context: ctx, - } -} - -// NewGetDisksParamsWithHTTPClient creates a new GetDisksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDisksParamsWithHTTPClient(client *http.Client) *GetDisksParams { - return &GetDisksParams{ - HTTPClient: client, - } -} - -/* -GetDisksParams contains all the parameters to send to the API endpoint - - for the get disks operation. - - Typically these are written to a http.Request. -*/ -type GetDisksParams struct { - - /* FetchDiskUsage. - - FetchDiskUsage is used to specify whether to fetch the disk usage - details. - */ - FetchDiskUsage *bool - - /* FetchStats. - - FetchStats is used to specify whether to call Stats service to fetch the - stats for the disks. - */ - FetchStats *bool - - /* Ids. - - IdList is the ids of disks to be returned. If empty, all - nodes are returned. - */ - Ids []int64 - - /* IncludeMarkedForRemoval. - - IncludeMarkedForRemoval is used to specify whether to include disks - marked for removal. - */ - IncludeMarkedForRemoval *bool - - /* NodeIds. - - NodeIdList specifies the list of Node Ids used to filter the disks by - specified nodes. - */ - NodeIds []int64 - - /* OnlyReadyForRemoval. - - OnlyReadyForRemoval is used to list all disks in kOkToRemove state. - */ - OnlyReadyForRemoval *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDisksParams) WithDefaults() *GetDisksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDisksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get disks params -func (o *GetDisksParams) WithTimeout(timeout time.Duration) *GetDisksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get disks params -func (o *GetDisksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get disks params -func (o *GetDisksParams) WithContext(ctx context.Context) *GetDisksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get disks params -func (o *GetDisksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get disks params -func (o *GetDisksParams) WithHTTPClient(client *http.Client) *GetDisksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get disks params -func (o *GetDisksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFetchDiskUsage adds the fetchDiskUsage to the get disks params -func (o *GetDisksParams) WithFetchDiskUsage(fetchDiskUsage *bool) *GetDisksParams { - o.SetFetchDiskUsage(fetchDiskUsage) - return o -} - -// SetFetchDiskUsage adds the fetchDiskUsage to the get disks params -func (o *GetDisksParams) SetFetchDiskUsage(fetchDiskUsage *bool) { - o.FetchDiskUsage = fetchDiskUsage -} - -// WithFetchStats adds the fetchStats to the get disks params -func (o *GetDisksParams) WithFetchStats(fetchStats *bool) *GetDisksParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get disks params -func (o *GetDisksParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithIds adds the ids to the get disks params -func (o *GetDisksParams) WithIds(ids []int64) *GetDisksParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get disks params -func (o *GetDisksParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get disks params -func (o *GetDisksParams) WithIncludeMarkedForRemoval(includeMarkedForRemoval *bool) *GetDisksParams { - o.SetIncludeMarkedForRemoval(includeMarkedForRemoval) - return o -} - -// SetIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get disks params -func (o *GetDisksParams) SetIncludeMarkedForRemoval(includeMarkedForRemoval *bool) { - o.IncludeMarkedForRemoval = includeMarkedForRemoval -} - -// WithNodeIds adds the nodeIds to the get disks params -func (o *GetDisksParams) WithNodeIds(nodeIds []int64) *GetDisksParams { - o.SetNodeIds(nodeIds) - return o -} - -// SetNodeIds adds the nodeIds to the get disks params -func (o *GetDisksParams) SetNodeIds(nodeIds []int64) { - o.NodeIds = nodeIds -} - -// WithOnlyReadyForRemoval adds the onlyReadyForRemoval to the get disks params -func (o *GetDisksParams) WithOnlyReadyForRemoval(onlyReadyForRemoval *bool) *GetDisksParams { - o.SetOnlyReadyForRemoval(onlyReadyForRemoval) - return o -} - -// SetOnlyReadyForRemoval adds the onlyReadyForRemoval to the get disks params -func (o *GetDisksParams) SetOnlyReadyForRemoval(onlyReadyForRemoval *bool) { - o.OnlyReadyForRemoval = onlyReadyForRemoval -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDisksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FetchDiskUsage != nil { - - // query param fetchDiskUsage - var qrFetchDiskUsage bool - - if o.FetchDiskUsage != nil { - qrFetchDiskUsage = *o.FetchDiskUsage - } - qFetchDiskUsage := swag.FormatBool(qrFetchDiskUsage) - if qFetchDiskUsage != "" { - - if err := r.SetQueryParam("fetchDiskUsage", qFetchDiskUsage); err != nil { - return err - } - } - } - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeMarkedForRemoval != nil { - - // query param includeMarkedForRemoval - var qrIncludeMarkedForRemoval bool - - if o.IncludeMarkedForRemoval != nil { - qrIncludeMarkedForRemoval = *o.IncludeMarkedForRemoval - } - qIncludeMarkedForRemoval := swag.FormatBool(qrIncludeMarkedForRemoval) - if qIncludeMarkedForRemoval != "" { - - if err := r.SetQueryParam("includeMarkedForRemoval", qIncludeMarkedForRemoval); err != nil { - return err - } - } - } - - if o.NodeIds != nil { - - // binding items for nodeIds - joinedNodeIds := o.bindParamNodeIds(reg) - - // query array param nodeIds - if err := r.SetQueryParam("nodeIds", joinedNodeIds...); err != nil { - return err - } - } - - if o.OnlyReadyForRemoval != nil { - - // query param onlyReadyForRemoval - var qrOnlyReadyForRemoval bool - - if o.OnlyReadyForRemoval != nil { - qrOnlyReadyForRemoval = *o.OnlyReadyForRemoval - } - qOnlyReadyForRemoval := swag.FormatBool(qrOnlyReadyForRemoval) - if qOnlyReadyForRemoval != "" { - - if err := r.SetQueryParam("onlyReadyForRemoval", qOnlyReadyForRemoval); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDisks binds the parameter ids -func (o *GetDisksParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetDisks binds the parameter nodeIds -func (o *GetDisksParams) bindParamNodeIds(formats strfmt.Registry) []string { - nodeIdsIR := o.NodeIds - - var nodeIdsIC []string - for _, nodeIdsIIR := range nodeIdsIR { // explode []int64 - - nodeIdsIIV := swag.FormatInt64(nodeIdsIIR) // int64 as string - nodeIdsIC = append(nodeIdsIC, nodeIdsIIV) - } - - // items.CollectionFormat: "" - nodeIdsIS := swag.JoinByFormat(nodeIdsIC, "") - - return nodeIdsIS -} diff --git a/v1/client/disks/get_disks_responses.go b/v1/client/disks/get_disks_responses.go deleted file mode 100644 index ad511578..00000000 --- a/v1/client/disks/get_disks_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDisksReader is a Reader for the GetDisks structure. -type GetDisksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDisksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDisksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDisksDefault(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 - } -} - -// NewGetDisksOK creates a GetDisksOK with default headers values -func NewGetDisksOK() *GetDisksOK { - return &GetDisksOK{} -} - -/* -GetDisksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDisksOK struct { - Payload []*models.DiskInternal -} - -// IsSuccess returns true when this get disks o k response has a 2xx status code -func (o *GetDisksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get disks o k response has a 3xx status code -func (o *GetDisksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get disks o k response has a 4xx status code -func (o *GetDisksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get disks o k response has a 5xx status code -func (o *GetDisksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get disks o k response a status code equal to that given -func (o *GetDisksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get disks o k response -func (o *GetDisksOK) Code() int { - return 200 -} - -func (o *GetDisksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks][%d] getDisksOK %s", 200, payload) -} - -func (o *GetDisksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks][%d] getDisksOK %s", 200, payload) -} - -func (o *GetDisksOK) GetPayload() []*models.DiskInternal { - return o.Payload -} - -func (o *GetDisksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDisksDefault creates a GetDisksDefault with default headers values -func NewGetDisksDefault(code int) *GetDisksDefault { - return &GetDisksDefault{ - _statusCode: code, - } -} - -/* -GetDisksDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetDisksDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get disks default response has a 2xx status code -func (o *GetDisksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get disks default response has a 3xx status code -func (o *GetDisksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get disks default response has a 4xx status code -func (o *GetDisksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get disks default response has a 5xx status code -func (o *GetDisksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get disks default response a status code equal to that given -func (o *GetDisksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get disks default response -func (o *GetDisksDefault) Code() int { - return o._statusCode -} - -func (o *GetDisksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks][%d] GetDisks default %s", o._statusCode, payload) -} - -func (o *GetDisksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks][%d] GetDisks default %s", o._statusCode, payload) -} - -func (o *GetDisksDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetDisksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/mark_disk_for_removal_parameters.go b/v1/client/disks/mark_disk_for_removal_parameters.go deleted file mode 100644 index 49cf4e8a..00000000 --- a/v1/client/disks/mark_disk_for_removal_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/go-openapi/swag" -) - -// NewMarkDiskForRemovalParams creates a new MarkDiskForRemovalParams 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 NewMarkDiskForRemovalParams() *MarkDiskForRemovalParams { - return &MarkDiskForRemovalParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewMarkDiskForRemovalParamsWithTimeout creates a new MarkDiskForRemovalParams object -// with the ability to set a timeout on a request. -func NewMarkDiskForRemovalParamsWithTimeout(timeout time.Duration) *MarkDiskForRemovalParams { - return &MarkDiskForRemovalParams{ - timeout: timeout, - } -} - -// NewMarkDiskForRemovalParamsWithContext creates a new MarkDiskForRemovalParams object -// with the ability to set a context for a request. -func NewMarkDiskForRemovalParamsWithContext(ctx context.Context) *MarkDiskForRemovalParams { - return &MarkDiskForRemovalParams{ - Context: ctx, - } -} - -// NewMarkDiskForRemovalParamsWithHTTPClient creates a new MarkDiskForRemovalParams object -// with the ability to set a custom HTTPClient for a request. -func NewMarkDiskForRemovalParamsWithHTTPClient(client *http.Client) *MarkDiskForRemovalParams { - return &MarkDiskForRemovalParams{ - HTTPClient: client, - } -} - -/* -MarkDiskForRemovalParams contains all the parameters to send to the API endpoint - - for the mark disk for removal operation. - - Typically these are written to a http.Request. -*/ -type MarkDiskForRemovalParams struct { - - /* ID. - - Id of the Disk - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the mark disk for removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkDiskForRemovalParams) WithDefaults() *MarkDiskForRemovalParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the mark disk for removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkDiskForRemovalParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the mark disk for removal params -func (o *MarkDiskForRemovalParams) WithTimeout(timeout time.Duration) *MarkDiskForRemovalParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the mark disk for removal params -func (o *MarkDiskForRemovalParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the mark disk for removal params -func (o *MarkDiskForRemovalParams) WithContext(ctx context.Context) *MarkDiskForRemovalParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the mark disk for removal params -func (o *MarkDiskForRemovalParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the mark disk for removal params -func (o *MarkDiskForRemovalParams) WithHTTPClient(client *http.Client) *MarkDiskForRemovalParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the mark disk for removal params -func (o *MarkDiskForRemovalParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the mark disk for removal params -func (o *MarkDiskForRemovalParams) WithID(id int64) *MarkDiskForRemovalParams { - o.SetID(id) - return o -} - -// SetID adds the id to the mark disk for removal params -func (o *MarkDiskForRemovalParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *MarkDiskForRemovalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/disks/mark_disk_for_removal_responses.go b/v1/client/disks/mark_disk_for_removal_responses.go deleted file mode 100644 index 53967392..00000000 --- a/v1/client/disks/mark_disk_for_removal_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// MarkDiskForRemovalReader is a Reader for the MarkDiskForRemoval structure. -type MarkDiskForRemovalReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *MarkDiskForRemovalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewMarkDiskForRemovalAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewMarkDiskForRemovalDefault(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 - } -} - -// NewMarkDiskForRemovalAccepted creates a MarkDiskForRemovalAccepted with default headers values -func NewMarkDiskForRemovalAccepted() *MarkDiskForRemovalAccepted { - return &MarkDiskForRemovalAccepted{} -} - -/* -MarkDiskForRemovalAccepted describes a response with status code 202, with default header values. - -Success -*/ -type MarkDiskForRemovalAccepted struct { - Payload *models.DiskDeleteResult -} - -// IsSuccess returns true when this mark disk for removal accepted response has a 2xx status code -func (o *MarkDiskForRemovalAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this mark disk for removal accepted response has a 3xx status code -func (o *MarkDiskForRemovalAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this mark disk for removal accepted response has a 4xx status code -func (o *MarkDiskForRemovalAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this mark disk for removal accepted response has a 5xx status code -func (o *MarkDiskForRemovalAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this mark disk for removal accepted response a status code equal to that given -func (o *MarkDiskForRemovalAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the mark disk for removal accepted response -func (o *MarkDiskForRemovalAccepted) Code() int { - return 202 -} - -func (o *MarkDiskForRemovalAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/{id}][%d] markDiskForRemovalAccepted %s", 202, payload) -} - -func (o *MarkDiskForRemovalAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/{id}][%d] markDiskForRemovalAccepted %s", 202, payload) -} - -func (o *MarkDiskForRemovalAccepted) GetPayload() *models.DiskDeleteResult { - return o.Payload -} - -func (o *MarkDiskForRemovalAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DiskDeleteResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewMarkDiskForRemovalDefault creates a MarkDiskForRemovalDefault with default headers values -func NewMarkDiskForRemovalDefault(code int) *MarkDiskForRemovalDefault { - return &MarkDiskForRemovalDefault{ - _statusCode: code, - } -} - -/* -MarkDiskForRemovalDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type MarkDiskForRemovalDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this mark disk for removal default response has a 2xx status code -func (o *MarkDiskForRemovalDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this mark disk for removal default response has a 3xx status code -func (o *MarkDiskForRemovalDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this mark disk for removal default response has a 4xx status code -func (o *MarkDiskForRemovalDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this mark disk for removal default response has a 5xx status code -func (o *MarkDiskForRemovalDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this mark disk for removal default response a status code equal to that given -func (o *MarkDiskForRemovalDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the mark disk for removal default response -func (o *MarkDiskForRemovalDefault) Code() int { - return o._statusCode -} - -func (o *MarkDiskForRemovalDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/{id}][%d] MarkDiskForRemoval default %s", o._statusCode, payload) -} - -func (o *MarkDiskForRemovalDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/{id}][%d] MarkDiskForRemoval default %s", o._statusCode, payload) -} - -func (o *MarkDiskForRemovalDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *MarkDiskForRemovalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/update_disk_parameters.go b/v1/client/disks/update_disk_parameters.go deleted file mode 100644 index a9b36769..00000000 --- a/v1/client/disks/update_disk_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateDiskParams creates a new UpdateDiskParams 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 NewUpdateDiskParams() *UpdateDiskParams { - return &UpdateDiskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDiskParamsWithTimeout creates a new UpdateDiskParams object -// with the ability to set a timeout on a request. -func NewUpdateDiskParamsWithTimeout(timeout time.Duration) *UpdateDiskParams { - return &UpdateDiskParams{ - timeout: timeout, - } -} - -// NewUpdateDiskParamsWithContext creates a new UpdateDiskParams object -// with the ability to set a context for a request. -func NewUpdateDiskParamsWithContext(ctx context.Context) *UpdateDiskParams { - return &UpdateDiskParams{ - Context: ctx, - } -} - -// NewUpdateDiskParamsWithHTTPClient creates a new UpdateDiskParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDiskParamsWithHTTPClient(client *http.Client) *UpdateDiskParams { - return &UpdateDiskParams{ - HTTPClient: client, - } -} - -/* -UpdateDiskParams contains all the parameters to send to the API endpoint - - for the update disk operation. - - Typically these are written to a http.Request. -*/ -type UpdateDiskParams struct { - - // Body. - Body *models.DiskInternal - - /* ID. - - Id of the Disk - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDiskParams) WithDefaults() *UpdateDiskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDiskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update disk params -func (o *UpdateDiskParams) WithTimeout(timeout time.Duration) *UpdateDiskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update disk params -func (o *UpdateDiskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update disk params -func (o *UpdateDiskParams) WithContext(ctx context.Context) *UpdateDiskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update disk params -func (o *UpdateDiskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update disk params -func (o *UpdateDiskParams) WithHTTPClient(client *http.Client) *UpdateDiskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update disk params -func (o *UpdateDiskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update disk params -func (o *UpdateDiskParams) WithBody(body *models.DiskInternal) *UpdateDiskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update disk params -func (o *UpdateDiskParams) SetBody(body *models.DiskInternal) { - o.Body = body -} - -// WithID adds the id to the update disk params -func (o *UpdateDiskParams) WithID(id int64) *UpdateDiskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update disk params -func (o *UpdateDiskParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDiskParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/disks/update_disk_responses.go b/v1/client/disks/update_disk_responses.go deleted file mode 100644 index 06bb193a..00000000 --- a/v1/client/disks/update_disk_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateDiskReader is a Reader for the UpdateDisk structure. -type UpdateDiskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDiskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDiskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDiskDefault(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 - } -} - -// NewUpdateDiskOK creates a UpdateDiskOK with default headers values -func NewUpdateDiskOK() *UpdateDiskOK { - return &UpdateDiskOK{} -} - -/* -UpdateDiskOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDiskOK struct { - Payload *models.DiskInternal -} - -// IsSuccess returns true when this update disk o k response has a 2xx status code -func (o *UpdateDiskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update disk o k response has a 3xx status code -func (o *UpdateDiskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update disk o k response has a 4xx status code -func (o *UpdateDiskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update disk o k response has a 5xx status code -func (o *UpdateDiskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update disk o k response a status code equal to that given -func (o *UpdateDiskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update disk o k response -func (o *UpdateDiskOK) Code() int { - return 200 -} - -func (o *UpdateDiskOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /disks/{id}][%d] updateDiskOK %s", 200, payload) -} - -func (o *UpdateDiskOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /disks/{id}][%d] updateDiskOK %s", 200, payload) -} - -func (o *UpdateDiskOK) GetPayload() *models.DiskInternal { - return o.Payload -} - -func (o *UpdateDiskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DiskInternal) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDiskDefault creates a UpdateDiskDefault with default headers values -func NewUpdateDiskDefault(code int) *UpdateDiskDefault { - return &UpdateDiskDefault{ - _statusCode: code, - } -} - -/* -UpdateDiskDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateDiskDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update disk default response has a 2xx status code -func (o *UpdateDiskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update disk default response has a 3xx status code -func (o *UpdateDiskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update disk default response has a 4xx status code -func (o *UpdateDiskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update disk default response has a 5xx status code -func (o *UpdateDiskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update disk default response a status code equal to that given -func (o *UpdateDiskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update disk default response -func (o *UpdateDiskDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDiskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /disks/{id}][%d] UpdateDisk default %s", o._statusCode, payload) -} - -func (o *UpdateDiskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /disks/{id}][%d] UpdateDisk default %s", o._statusCode, payload) -} - -func (o *UpdateDiskDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateDiskDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/disks/update_hydra_disk_reservation_parameters.go b/v1/client/disks/update_hydra_disk_reservation_parameters.go deleted file mode 100644 index 493c13b1..00000000 --- a/v1/client/disks/update_hydra_disk_reservation_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateHydraDiskReservationParams creates a new UpdateHydraDiskReservationParams 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 NewUpdateHydraDiskReservationParams() *UpdateHydraDiskReservationParams { - return &UpdateHydraDiskReservationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateHydraDiskReservationParamsWithTimeout creates a new UpdateHydraDiskReservationParams object -// with the ability to set a timeout on a request. -func NewUpdateHydraDiskReservationParamsWithTimeout(timeout time.Duration) *UpdateHydraDiskReservationParams { - return &UpdateHydraDiskReservationParams{ - timeout: timeout, - } -} - -// NewUpdateHydraDiskReservationParamsWithContext creates a new UpdateHydraDiskReservationParams object -// with the ability to set a context for a request. -func NewUpdateHydraDiskReservationParamsWithContext(ctx context.Context) *UpdateHydraDiskReservationParams { - return &UpdateHydraDiskReservationParams{ - Context: ctx, - } -} - -// NewUpdateHydraDiskReservationParamsWithHTTPClient creates a new UpdateHydraDiskReservationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateHydraDiskReservationParamsWithHTTPClient(client *http.Client) *UpdateHydraDiskReservationParams { - return &UpdateHydraDiskReservationParams{ - HTTPClient: client, - } -} - -/* -UpdateHydraDiskReservationParams contains all the parameters to send to the API endpoint - - for the update hydra disk reservation operation. - - Typically these are written to a http.Request. -*/ -type UpdateHydraDiskReservationParams struct { - - // Body. - Body *models.UpdateHydraDiskReservationParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update hydra disk reservation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHydraDiskReservationParams) WithDefaults() *UpdateHydraDiskReservationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update hydra disk reservation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHydraDiskReservationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) WithTimeout(timeout time.Duration) *UpdateHydraDiskReservationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) WithContext(ctx context.Context) *UpdateHydraDiskReservationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) WithHTTPClient(client *http.Client) *UpdateHydraDiskReservationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) WithBody(body *models.UpdateHydraDiskReservationParam) *UpdateHydraDiskReservationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update hydra disk reservation params -func (o *UpdateHydraDiskReservationParams) SetBody(body *models.UpdateHydraDiskReservationParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateHydraDiskReservationParams) 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/disks/update_hydra_disk_reservation_responses.go b/v1/client/disks/update_hydra_disk_reservation_responses.go deleted file mode 100644 index afd381fc..00000000 --- a/v1/client/disks/update_hydra_disk_reservation_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package disks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateHydraDiskReservationReader is a Reader for the UpdateHydraDiskReservation structure. -type UpdateHydraDiskReservationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateHydraDiskReservationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateHydraDiskReservationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateHydraDiskReservationDefault(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 - } -} - -// NewUpdateHydraDiskReservationOK creates a UpdateHydraDiskReservationOK with default headers values -func NewUpdateHydraDiskReservationOK() *UpdateHydraDiskReservationOK { - return &UpdateHydraDiskReservationOK{} -} - -/* -UpdateHydraDiskReservationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateHydraDiskReservationOK struct { - Payload []*models.DiskInternal -} - -// IsSuccess returns true when this update hydra disk reservation o k response has a 2xx status code -func (o *UpdateHydraDiskReservationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update hydra disk reservation o k response has a 3xx status code -func (o *UpdateHydraDiskReservationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update hydra disk reservation o k response has a 4xx status code -func (o *UpdateHydraDiskReservationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update hydra disk reservation o k response has a 5xx status code -func (o *UpdateHydraDiskReservationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update hydra disk reservation o k response a status code equal to that given -func (o *UpdateHydraDiskReservationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update hydra disk reservation o k response -func (o *UpdateHydraDiskReservationOK) Code() int { - return 200 -} - -func (o *UpdateHydraDiskReservationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /updateHydraDiskReservation][%d] updateHydraDiskReservationOK %s", 200, payload) -} - -func (o *UpdateHydraDiskReservationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /updateHydraDiskReservation][%d] updateHydraDiskReservationOK %s", 200, payload) -} - -func (o *UpdateHydraDiskReservationOK) GetPayload() []*models.DiskInternal { - return o.Payload -} - -func (o *UpdateHydraDiskReservationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateHydraDiskReservationDefault creates a UpdateHydraDiskReservationDefault with default headers values -func NewUpdateHydraDiskReservationDefault(code int) *UpdateHydraDiskReservationDefault { - return &UpdateHydraDiskReservationDefault{ - _statusCode: code, - } -} - -/* -UpdateHydraDiskReservationDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateHydraDiskReservationDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update hydra disk reservation default response has a 2xx status code -func (o *UpdateHydraDiskReservationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update hydra disk reservation default response has a 3xx status code -func (o *UpdateHydraDiskReservationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update hydra disk reservation default response has a 4xx status code -func (o *UpdateHydraDiskReservationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update hydra disk reservation default response has a 5xx status code -func (o *UpdateHydraDiskReservationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update hydra disk reservation default response a status code equal to that given -func (o *UpdateHydraDiskReservationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update hydra disk reservation default response -func (o *UpdateHydraDiskReservationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateHydraDiskReservationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /updateHydraDiskReservation][%d] UpdateHydraDiskReservation default %s", o._statusCode, payload) -} - -func (o *UpdateHydraDiskReservationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /updateHydraDiskReservation][%d] UpdateHydraDiskReservation default %s", o._statusCode, payload) -} - -func (o *UpdateHydraDiskReservationDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateHydraDiskReservationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/download_files/download_files_client.go b/v1/client/download_files/download_files_client.go deleted file mode 100644 index af820a9a..00000000 --- a/v1/client/download_files/download_files_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package download_files - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new download files API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new download files API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new download files API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for download files API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DownloadFiles(params *DownloadFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadFilesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DownloadFiles downloads files from yoda -*/ -func (a *Client) DownloadFiles(params *DownloadFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadFilesParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadFiles", - Method: "GET", - PathPattern: "/downloadfiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadFilesReader{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.(*DownloadFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadFilesDefault) - 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/download_files/download_files_parameters.go b/v1/client/download_files/download_files_parameters.go deleted file mode 100644 index a394f696..00000000 --- a/v1/client/download_files/download_files_parameters.go +++ /dev/null @@ -1,712 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package download_files - -// 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/go-openapi/swag" -) - -// NewDownloadFilesParams creates a new DownloadFilesParams 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 NewDownloadFilesParams() *DownloadFilesParams { - return &DownloadFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadFilesParamsWithTimeout creates a new DownloadFilesParams object -// with the ability to set a timeout on a request. -func NewDownloadFilesParamsWithTimeout(timeout time.Duration) *DownloadFilesParams { - return &DownloadFilesParams{ - timeout: timeout, - } -} - -// NewDownloadFilesParamsWithContext creates a new DownloadFilesParams object -// with the ability to set a context for a request. -func NewDownloadFilesParamsWithContext(ctx context.Context) *DownloadFilesParams { - return &DownloadFilesParams{ - Context: ctx, - } -} - -// NewDownloadFilesParamsWithHTTPClient creates a new DownloadFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadFilesParamsWithHTTPClient(client *http.Client) *DownloadFilesParams { - return &DownloadFilesParams{ - HTTPClient: client, - } -} - -/* -DownloadFilesParams contains all the parameters to send to the API endpoint - - for the download files operation. - - Typically these are written to a http.Request. -*/ -type DownloadFilesParams struct { - - /* PrimaryJobID. - - PrimaryJobId is the PrimaryJobId of a replicated job. Yoda requires - this to download the file from replicated snapshot. - Note: This field is for internal use. Not to be sent through api call. - deprecated now - - Format: int64 - */ - PrimaryJobID *int64 - - /* AttemptNum. - - AttemptNum is the attempt of the job instance that took the snapshot. If - a particular job run has errors, it can result in multiple retries. Each - retry of a job run is called an attempt. - - Format: int64 - */ - AttemptNum *int64 - - /* ClusterID. - - ClusterId is the Id of the cluster used for constructing JobUid. - - Format: int64 - */ - ClusterID *int64 - - /* ClusterIncarnationID. - - ClusterIncarnationId is the incarnation Id of the cluster used for - constructing JobUid. - - Format: int64 - */ - ClusterIncarnationID *int64 - - /* EntityID. - - EntityId is the Id of the entity where the file resides. - - Format: int64 - */ - EntityID *int64 - - /* ExternalTargetID. - - ExternalTargetId is the Vault id where a file is stored when attempting - to download file from Archive. - - Format: int64 - */ - ExternalTargetID *int64 - - /* Filepath. - - Filepath is the path of file/directory in the guest OS. This is mandatory - if VmwareVmxFile, vmwareFileType are not specified. - */ - Filepath *string - - /* JobID. - - JobId is the Id of the job that took the snapshot. - - Format: int64 - */ - JobID *int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the run of the job that took the snapshot. - - Format: int64 - */ - JobInstanceID *int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time of the job run. - - Format: int64 - */ - JobStartTimeUsecs *int64 - - /* Length. - - Length specifies how many bytes from start_offset are required. Note that - we may not honor this length, and return fewer bytes. - - Format: int64 - */ - Length *int64 - - /* StartOffset. - - StartOffset is the start offset from where bytes will be read. - - Format: int64 - */ - StartOffset *int64 - - /* ViewBoxID. - - ViewBoxId is the view box where the file is stored. - - Format: int64 - */ - ViewBoxID *int64 - - /* ViewName. - - Name of the View if a file is being downloaded from a View. - */ - ViewName *string - - /* VmwareFileType. - - vmwareFileType specifies the type of VMware file to be extracted. - If this is set, then Filepath, VmwareVmxFile should not be specified. - - Format: int32 - */ - VmwareFileType *int32 - - /* VmwareVmxFile. - - VmwareVmxFile specifies whether the vmware vmx file for the VM is to be - extracted. If this is set to true, then Filepath, VmwareFileType should - not be specified. - */ - VmwareVmxFile *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadFilesParams) WithDefaults() *DownloadFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download files params -func (o *DownloadFilesParams) WithTimeout(timeout time.Duration) *DownloadFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download files params -func (o *DownloadFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download files params -func (o *DownloadFilesParams) WithContext(ctx context.Context) *DownloadFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download files params -func (o *DownloadFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download files params -func (o *DownloadFilesParams) WithHTTPClient(client *http.Client) *DownloadFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download files params -func (o *DownloadFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPrimaryJobID adds the primaryJobID to the download files params -func (o *DownloadFilesParams) WithPrimaryJobID(primaryJobID *int64) *DownloadFilesParams { - o.SetPrimaryJobID(primaryJobID) - return o -} - -// SetPrimaryJobID adds the primaryJobId to the download files params -func (o *DownloadFilesParams) SetPrimaryJobID(primaryJobID *int64) { - o.PrimaryJobID = primaryJobID -} - -// WithAttemptNum adds the attemptNum to the download files params -func (o *DownloadFilesParams) WithAttemptNum(attemptNum *int64) *DownloadFilesParams { - o.SetAttemptNum(attemptNum) - return o -} - -// SetAttemptNum adds the attemptNum to the download files params -func (o *DownloadFilesParams) SetAttemptNum(attemptNum *int64) { - o.AttemptNum = attemptNum -} - -// WithClusterID adds the clusterID to the download files params -func (o *DownloadFilesParams) WithClusterID(clusterID *int64) *DownloadFilesParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the download files params -func (o *DownloadFilesParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the download files params -func (o *DownloadFilesParams) WithClusterIncarnationID(clusterIncarnationID *int64) *DownloadFilesParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the download files params -func (o *DownloadFilesParams) SetClusterIncarnationID(clusterIncarnationID *int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithEntityID adds the entityID to the download files params -func (o *DownloadFilesParams) WithEntityID(entityID *int64) *DownloadFilesParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the download files params -func (o *DownloadFilesParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithExternalTargetID adds the externalTargetID to the download files params -func (o *DownloadFilesParams) WithExternalTargetID(externalTargetID *int64) *DownloadFilesParams { - o.SetExternalTargetID(externalTargetID) - return o -} - -// SetExternalTargetID adds the externalTargetId to the download files params -func (o *DownloadFilesParams) SetExternalTargetID(externalTargetID *int64) { - o.ExternalTargetID = externalTargetID -} - -// WithFilepath adds the filepath to the download files params -func (o *DownloadFilesParams) WithFilepath(filepath *string) *DownloadFilesParams { - o.SetFilepath(filepath) - return o -} - -// SetFilepath adds the filepath to the download files params -func (o *DownloadFilesParams) SetFilepath(filepath *string) { - o.Filepath = filepath -} - -// WithJobID adds the jobID to the download files params -func (o *DownloadFilesParams) WithJobID(jobID *int64) *DownloadFilesParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the download files params -func (o *DownloadFilesParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the download files params -func (o *DownloadFilesParams) WithJobInstanceID(jobInstanceID *int64) *DownloadFilesParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the download files params -func (o *DownloadFilesParams) SetJobInstanceID(jobInstanceID *int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the download files params -func (o *DownloadFilesParams) WithJobStartTimeUsecs(jobStartTimeUsecs *int64) *DownloadFilesParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the download files params -func (o *DownloadFilesParams) SetJobStartTimeUsecs(jobStartTimeUsecs *int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WithLength adds the length to the download files params -func (o *DownloadFilesParams) WithLength(length *int64) *DownloadFilesParams { - o.SetLength(length) - return o -} - -// SetLength adds the length to the download files params -func (o *DownloadFilesParams) SetLength(length *int64) { - o.Length = length -} - -// WithStartOffset adds the startOffset to the download files params -func (o *DownloadFilesParams) WithStartOffset(startOffset *int64) *DownloadFilesParams { - o.SetStartOffset(startOffset) - return o -} - -// SetStartOffset adds the startOffset to the download files params -func (o *DownloadFilesParams) SetStartOffset(startOffset *int64) { - o.StartOffset = startOffset -} - -// WithViewBoxID adds the viewBoxID to the download files params -func (o *DownloadFilesParams) WithViewBoxID(viewBoxID *int64) *DownloadFilesParams { - o.SetViewBoxID(viewBoxID) - return o -} - -// SetViewBoxID adds the viewBoxId to the download files params -func (o *DownloadFilesParams) SetViewBoxID(viewBoxID *int64) { - o.ViewBoxID = viewBoxID -} - -// WithViewName adds the viewName to the download files params -func (o *DownloadFilesParams) WithViewName(viewName *string) *DownloadFilesParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the download files params -func (o *DownloadFilesParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WithVmwareFileType adds the vmwareFileType to the download files params -func (o *DownloadFilesParams) WithVmwareFileType(vmwareFileType *int32) *DownloadFilesParams { - o.SetVmwareFileType(vmwareFileType) - return o -} - -// SetVmwareFileType adds the vmwareFileType to the download files params -func (o *DownloadFilesParams) SetVmwareFileType(vmwareFileType *int32) { - o.VmwareFileType = vmwareFileType -} - -// WithVmwareVmxFile adds the vmwareVmxFile to the download files params -func (o *DownloadFilesParams) WithVmwareVmxFile(vmwareVmxFile *bool) *DownloadFilesParams { - o.SetVmwareVmxFile(vmwareVmxFile) - return o -} - -// SetVmwareVmxFile adds the vmwareVmxFile to the download files params -func (o *DownloadFilesParams) SetVmwareVmxFile(vmwareVmxFile *bool) { - o.VmwareVmxFile = vmwareVmxFile -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.PrimaryJobID != nil { - - // query param PrimaryJobId - var qrPrimaryJobID int64 - - if o.PrimaryJobID != nil { - qrPrimaryJobID = *o.PrimaryJobID - } - qPrimaryJobID := swag.FormatInt64(qrPrimaryJobID) - if qPrimaryJobID != "" { - - if err := r.SetQueryParam("PrimaryJobId", qPrimaryJobID); err != nil { - return err - } - } - } - - if o.AttemptNum != nil { - - // query param attemptNum - var qrAttemptNum int64 - - if o.AttemptNum != nil { - qrAttemptNum = *o.AttemptNum - } - qAttemptNum := swag.FormatInt64(qrAttemptNum) - if qAttemptNum != "" { - - if err := r.SetQueryParam("attemptNum", qAttemptNum); err != nil { - return err - } - } - } - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.ClusterIncarnationID != nil { - - // query param clusterIncarnationId - var qrClusterIncarnationID int64 - - if o.ClusterIncarnationID != nil { - qrClusterIncarnationID = *o.ClusterIncarnationID - } - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.ExternalTargetID != nil { - - // query param externalTargetId - var qrExternalTargetID int64 - - if o.ExternalTargetID != nil { - qrExternalTargetID = *o.ExternalTargetID - } - qExternalTargetID := swag.FormatInt64(qrExternalTargetID) - if qExternalTargetID != "" { - - if err := r.SetQueryParam("externalTargetId", qExternalTargetID); err != nil { - return err - } - } - } - - if o.Filepath != nil { - - // query param filepath - var qrFilepath string - - if o.Filepath != nil { - qrFilepath = *o.Filepath - } - qFilepath := qrFilepath - if qFilepath != "" { - - if err := r.SetQueryParam("filepath", qFilepath); err != nil { - return err - } - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if o.JobInstanceID != nil { - - // query param jobInstanceId - var qrJobInstanceID int64 - - if o.JobInstanceID != nil { - qrJobInstanceID = *o.JobInstanceID - } - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - } - - if o.JobStartTimeUsecs != nil { - - // query param jobStartTimeUsecs - var qrJobStartTimeUsecs int64 - - if o.JobStartTimeUsecs != nil { - qrJobStartTimeUsecs = *o.JobStartTimeUsecs - } - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - } - - if o.Length != nil { - - // query param length - var qrLength int64 - - if o.Length != nil { - qrLength = *o.Length - } - qLength := swag.FormatInt64(qrLength) - if qLength != "" { - - if err := r.SetQueryParam("length", qLength); err != nil { - return err - } - } - } - - if o.StartOffset != nil { - - // query param startOffset - var qrStartOffset int64 - - if o.StartOffset != nil { - qrStartOffset = *o.StartOffset - } - qStartOffset := swag.FormatInt64(qrStartOffset) - if qStartOffset != "" { - - if err := r.SetQueryParam("startOffset", qStartOffset); err != nil { - return err - } - } - } - - if o.ViewBoxID != nil { - - // query param viewBoxId - var qrViewBoxID int64 - - if o.ViewBoxID != nil { - qrViewBoxID = *o.ViewBoxID - } - qViewBoxID := swag.FormatInt64(qrViewBoxID) - if qViewBoxID != "" { - - if err := r.SetQueryParam("viewBoxId", qViewBoxID); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if o.VmwareFileType != nil { - - // query param vmwareFileType - var qrVmwareFileType int32 - - if o.VmwareFileType != nil { - qrVmwareFileType = *o.VmwareFileType - } - qVmwareFileType := swag.FormatInt32(qrVmwareFileType) - if qVmwareFileType != "" { - - if err := r.SetQueryParam("vmwareFileType", qVmwareFileType); err != nil { - return err - } - } - } - - if o.VmwareVmxFile != nil { - - // query param vmwareVmxFile - var qrVmwareVmxFile bool - - if o.VmwareVmxFile != nil { - qrVmwareVmxFile = *o.VmwareVmxFile - } - qVmwareVmxFile := swag.FormatBool(qrVmwareVmxFile) - if qVmwareVmxFile != "" { - - if err := r.SetQueryParam("vmwareVmxFile", qVmwareVmxFile); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/download_files/download_files_responses.go b/v1/client/download_files/download_files_responses.go deleted file mode 100644 index 5afff594..00000000 --- a/v1/client/download_files/download_files_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package download_files - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadFilesReader is a Reader for the DownloadFiles structure. -type DownloadFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadFilesDefault(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 - } -} - -// NewDownloadFilesOK creates a DownloadFilesOK with default headers values -func NewDownloadFilesOK() *DownloadFilesOK { - return &DownloadFilesOK{} -} - -/* -DownloadFilesOK describes a response with status code 200, with default header values. - -Success Response -*/ -type DownloadFilesOK struct { -} - -// IsSuccess returns true when this download files o k response has a 2xx status code -func (o *DownloadFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download files o k response has a 3xx status code -func (o *DownloadFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download files o k response has a 4xx status code -func (o *DownloadFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download files o k response has a 5xx status code -func (o *DownloadFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download files o k response a status code equal to that given -func (o *DownloadFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download files o k response -func (o *DownloadFilesOK) Code() int { - return 200 -} - -func (o *DownloadFilesOK) Error() string { - return fmt.Sprintf("[GET /downloadfiles][%d] downloadFilesOK", 200) -} - -func (o *DownloadFilesOK) String() string { - return fmt.Sprintf("[GET /downloadfiles][%d] downloadFilesOK", 200) -} - -func (o *DownloadFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDownloadFilesDefault creates a DownloadFilesDefault with default headers values -func NewDownloadFilesDefault(code int) *DownloadFilesDefault { - return &DownloadFilesDefault{ - _statusCode: code, - } -} - -/* -DownloadFilesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type DownloadFilesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this download files default response has a 2xx status code -func (o *DownloadFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download files default response has a 3xx status code -func (o *DownloadFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download files default response has a 4xx status code -func (o *DownloadFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download files default response has a 5xx status code -func (o *DownloadFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download files default response a status code equal to that given -func (o *DownloadFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download files default response -func (o *DownloadFilesDefault) Code() int { - return o._statusCode -} - -func (o *DownloadFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /downloadfiles][%d] DownloadFiles default %s", o._statusCode, payload) -} - -func (o *DownloadFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /downloadfiles][%d] DownloadFiles default %s", o._statusCode, payload) -} - -func (o *DownloadFilesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *DownloadFilesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/file/file_client.go b/v1/client/file/file_client.go deleted file mode 100644 index 54367f9d..00000000 --- a/v1/client/file/file_client.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new file API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new file API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new file API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for file API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetFileRestoreInfo(params *GetFileRestoreInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileRestoreInfoOK, error) - - GetFileStat(params *GetFileStatParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileStatOK, error) - - GetFileVersions(params *GetFileVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileVersionsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetFileRestoreInfo gets restore information for files -*/ -func (a *Client) GetFileRestoreInfo(params *GetFileRestoreInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileRestoreInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileRestoreInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileRestoreInfo", - Method: "GET", - PathPattern: "/file/restoreInformation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileRestoreInfoReader{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.(*GetFileRestoreInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileRestoreInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileStat gets file stat -*/ -func (a *Client) GetFileStat(params *GetFileStatParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileStatOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileStatParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileStat", - Method: "GET", - PathPattern: "/file/stat", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileStatReader{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.(*GetFileStatOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileStatDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileVersions gets the versions for a specific file -*/ -func (a *Client) GetFileVersions(params *GetFileVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileVersionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileVersionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileVersions", - Method: "GET", - PathPattern: "/file/versions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileVersionsReader{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.(*GetFileVersionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileVersionsDefault) - 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/file/get_file_restore_info_parameters.go b/v1/client/file/get_file_restore_info_parameters.go deleted file mode 100644 index f3f3a45c..00000000 --- a/v1/client/file/get_file_restore_info_parameters.go +++ /dev/null @@ -1,393 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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/go-openapi/swag" -) - -// NewGetFileRestoreInfoParams creates a new GetFileRestoreInfoParams 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 NewGetFileRestoreInfoParams() *GetFileRestoreInfoParams { - return &GetFileRestoreInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileRestoreInfoParamsWithTimeout creates a new GetFileRestoreInfoParams object -// with the ability to set a timeout on a request. -func NewGetFileRestoreInfoParamsWithTimeout(timeout time.Duration) *GetFileRestoreInfoParams { - return &GetFileRestoreInfoParams{ - timeout: timeout, - } -} - -// NewGetFileRestoreInfoParamsWithContext creates a new GetFileRestoreInfoParams object -// with the ability to set a context for a request. -func NewGetFileRestoreInfoParamsWithContext(ctx context.Context) *GetFileRestoreInfoParams { - return &GetFileRestoreInfoParams{ - Context: ctx, - } -} - -// NewGetFileRestoreInfoParamsWithHTTPClient creates a new GetFileRestoreInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileRestoreInfoParamsWithHTTPClient(client *http.Client) *GetFileRestoreInfoParams { - return &GetFileRestoreInfoParams{ - HTTPClient: client, - } -} - -/* -GetFileRestoreInfoParams contains all the parameters to send to the API endpoint - - for the get file restore info operation. - - Typically these are written to a http.Request. -*/ -type GetFileRestoreInfoParams struct { - - /* ClusterID. - - ClusterId is the Id of the cluster used for constructing JobUid. - - Format: int64 - */ - ClusterID *int64 - - /* ClusterIncarnationID. - - ClusterIncarnationId is the incarnation Id of the cluster used for - constructing JobUid. - - Format: int64 - */ - ClusterIncarnationID *int64 - - /* EntityID. - - EntityId is the Id of the entity where the file resides. - - Format: int64 - */ - EntityID *int64 - - /* Filenames. - - Filenames are the names of the files. - */ - Filenames []string - - /* JobID. - - JobId is the Id of the job that took the snapshot. - - Format: int64 - */ - JobID *int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the job run that backed up the entity. - - Format: int64 - */ - JobInstanceID *int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time in usecs of the job run that backed up - the entity. - - Format: int64 - */ - JobStartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file restore info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileRestoreInfoParams) WithDefaults() *GetFileRestoreInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file restore info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileRestoreInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file restore info params -func (o *GetFileRestoreInfoParams) WithTimeout(timeout time.Duration) *GetFileRestoreInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file restore info params -func (o *GetFileRestoreInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file restore info params -func (o *GetFileRestoreInfoParams) WithContext(ctx context.Context) *GetFileRestoreInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file restore info params -func (o *GetFileRestoreInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file restore info params -func (o *GetFileRestoreInfoParams) WithHTTPClient(client *http.Client) *GetFileRestoreInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file restore info params -func (o *GetFileRestoreInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get file restore info params -func (o *GetFileRestoreInfoParams) WithClusterID(clusterID *int64) *GetFileRestoreInfoParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get file restore info params -func (o *GetFileRestoreInfoParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get file restore info params -func (o *GetFileRestoreInfoParams) WithClusterIncarnationID(clusterIncarnationID *int64) *GetFileRestoreInfoParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get file restore info params -func (o *GetFileRestoreInfoParams) SetClusterIncarnationID(clusterIncarnationID *int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithEntityID adds the entityID to the get file restore info params -func (o *GetFileRestoreInfoParams) WithEntityID(entityID *int64) *GetFileRestoreInfoParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get file restore info params -func (o *GetFileRestoreInfoParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithFilenames adds the filenames to the get file restore info params -func (o *GetFileRestoreInfoParams) WithFilenames(filenames []string) *GetFileRestoreInfoParams { - o.SetFilenames(filenames) - return o -} - -// SetFilenames adds the filenames to the get file restore info params -func (o *GetFileRestoreInfoParams) SetFilenames(filenames []string) { - o.Filenames = filenames -} - -// WithJobID adds the jobID to the get file restore info params -func (o *GetFileRestoreInfoParams) WithJobID(jobID *int64) *GetFileRestoreInfoParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get file restore info params -func (o *GetFileRestoreInfoParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the get file restore info params -func (o *GetFileRestoreInfoParams) WithJobInstanceID(jobInstanceID *int64) *GetFileRestoreInfoParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the get file restore info params -func (o *GetFileRestoreInfoParams) SetJobInstanceID(jobInstanceID *int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the get file restore info params -func (o *GetFileRestoreInfoParams) WithJobStartTimeUsecs(jobStartTimeUsecs *int64) *GetFileRestoreInfoParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the get file restore info params -func (o *GetFileRestoreInfoParams) SetJobStartTimeUsecs(jobStartTimeUsecs *int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileRestoreInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.ClusterIncarnationID != nil { - - // query param clusterIncarnationId - var qrClusterIncarnationID int64 - - if o.ClusterIncarnationID != nil { - qrClusterIncarnationID = *o.ClusterIncarnationID - } - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.Filenames != nil { - - // binding items for filenames - joinedFilenames := o.bindParamFilenames(reg) - - // query array param filenames - if err := r.SetQueryParam("filenames", joinedFilenames...); err != nil { - return err - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if o.JobInstanceID != nil { - - // query param jobInstanceId - var qrJobInstanceID int64 - - if o.JobInstanceID != nil { - qrJobInstanceID = *o.JobInstanceID - } - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - } - - if o.JobStartTimeUsecs != nil { - - // query param jobStartTimeUsecs - var qrJobStartTimeUsecs int64 - - if o.JobStartTimeUsecs != nil { - qrJobStartTimeUsecs = *o.JobStartTimeUsecs - } - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetFileRestoreInfo binds the parameter filenames -func (o *GetFileRestoreInfoParams) bindParamFilenames(formats strfmt.Registry) []string { - filenamesIR := o.Filenames - - var filenamesIC []string - for _, filenamesIIR := range filenamesIR { // explode []string - - filenamesIIV := filenamesIIR // string as string - filenamesIC = append(filenamesIC, filenamesIIV) - } - - // items.CollectionFormat: "" - filenamesIS := swag.JoinByFormat(filenamesIC, "") - - return filenamesIS -} diff --git a/v1/client/file/get_file_restore_info_responses.go b/v1/client/file/get_file_restore_info_responses.go deleted file mode 100644 index 003afaf0..00000000 --- a/v1/client/file/get_file_restore_info_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileRestoreInfoReader is a Reader for the GetFileRestoreInfo structure. -type GetFileRestoreInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileRestoreInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileRestoreInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileRestoreInfoDefault(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 - } -} - -// NewGetFileRestoreInfoOK creates a GetFileRestoreInfoOK with default headers values -func NewGetFileRestoreInfoOK() *GetFileRestoreInfoOK { - return &GetFileRestoreInfoOK{} -} - -/* -GetFileRestoreInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileRestoreInfoOK struct { - Payload []*models.GetCrackedFileRestoreInfoResultFileInfo -} - -// IsSuccess returns true when this get file restore info o k response has a 2xx status code -func (o *GetFileRestoreInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file restore info o k response has a 3xx status code -func (o *GetFileRestoreInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file restore info o k response has a 4xx status code -func (o *GetFileRestoreInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file restore info o k response has a 5xx status code -func (o *GetFileRestoreInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file restore info o k response a status code equal to that given -func (o *GetFileRestoreInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file restore info o k response -func (o *GetFileRestoreInfoOK) Code() int { - return 200 -} - -func (o *GetFileRestoreInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/restoreInformation][%d] getFileRestoreInfoOK %s", 200, payload) -} - -func (o *GetFileRestoreInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/restoreInformation][%d] getFileRestoreInfoOK %s", 200, payload) -} - -func (o *GetFileRestoreInfoOK) GetPayload() []*models.GetCrackedFileRestoreInfoResultFileInfo { - return o.Payload -} - -func (o *GetFileRestoreInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileRestoreInfoDefault creates a GetFileRestoreInfoDefault with default headers values -func NewGetFileRestoreInfoDefault(code int) *GetFileRestoreInfoDefault { - return &GetFileRestoreInfoDefault{ - _statusCode: code, - } -} - -/* -GetFileRestoreInfoDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetFileRestoreInfoDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get file restore info default response has a 2xx status code -func (o *GetFileRestoreInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file restore info default response has a 3xx status code -func (o *GetFileRestoreInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file restore info default response has a 4xx status code -func (o *GetFileRestoreInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file restore info default response has a 5xx status code -func (o *GetFileRestoreInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file restore info default response a status code equal to that given -func (o *GetFileRestoreInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file restore info default response -func (o *GetFileRestoreInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetFileRestoreInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/restoreInformation][%d] GetFileRestoreInfo default %s", o._statusCode, payload) -} - -func (o *GetFileRestoreInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/restoreInformation][%d] GetFileRestoreInfo default %s", o._statusCode, payload) -} - -func (o *GetFileRestoreInfoDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetFileRestoreInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/file/get_file_stat_parameters.go b/v1/client/file/get_file_stat_parameters.go deleted file mode 100644 index 4573a57f..00000000 --- a/v1/client/file/get_file_stat_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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" -) - -// NewGetFileStatParams creates a new GetFileStatParams 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 NewGetFileStatParams() *GetFileStatParams { - return &GetFileStatParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileStatParamsWithTimeout creates a new GetFileStatParams object -// with the ability to set a timeout on a request. -func NewGetFileStatParamsWithTimeout(timeout time.Duration) *GetFileStatParams { - return &GetFileStatParams{ - timeout: timeout, - } -} - -// NewGetFileStatParamsWithContext creates a new GetFileStatParams object -// with the ability to set a context for a request. -func NewGetFileStatParamsWithContext(ctx context.Context) *GetFileStatParams { - return &GetFileStatParams{ - Context: ctx, - } -} - -// NewGetFileStatParamsWithHTTPClient creates a new GetFileStatParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileStatParamsWithHTTPClient(client *http.Client) *GetFileStatParams { - return &GetFileStatParams{ - HTTPClient: client, - } -} - -/* -GetFileStatParams contains all the parameters to send to the API endpoint - - for the get file stat operation. - - Typically these are written to a http.Request. -*/ -type GetFileStatParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file stat params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileStatParams) WithDefaults() *GetFileStatParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file stat params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileStatParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file stat params -func (o *GetFileStatParams) WithTimeout(timeout time.Duration) *GetFileStatParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file stat params -func (o *GetFileStatParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file stat params -func (o *GetFileStatParams) WithContext(ctx context.Context) *GetFileStatParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file stat params -func (o *GetFileStatParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file stat params -func (o *GetFileStatParams) WithHTTPClient(client *http.Client) *GetFileStatParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file stat params -func (o *GetFileStatParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileStatParams) 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/file/get_file_stat_responses.go b/v1/client/file/get_file_stat_responses.go deleted file mode 100644 index 1aef9153..00000000 --- a/v1/client/file/get_file_stat_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileStatReader is a Reader for the GetFileStat structure. -type GetFileStatReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileStatReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileStatOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileStatDefault(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 - } -} - -// NewGetFileStatOK creates a GetFileStatOK with default headers values -func NewGetFileStatOK() *GetFileStatOK { - return &GetFileStatOK{} -} - -/* -GetFileStatOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileStatOK struct { - Payload []*models.FileStatResult -} - -// IsSuccess returns true when this get file stat o k response has a 2xx status code -func (o *GetFileStatOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file stat o k response has a 3xx status code -func (o *GetFileStatOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file stat o k response has a 4xx status code -func (o *GetFileStatOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file stat o k response has a 5xx status code -func (o *GetFileStatOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file stat o k response a status code equal to that given -func (o *GetFileStatOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file stat o k response -func (o *GetFileStatOK) Code() int { - return 200 -} - -func (o *GetFileStatOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/stat][%d] getFileStatOK %s", 200, payload) -} - -func (o *GetFileStatOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/stat][%d] getFileStatOK %s", 200, payload) -} - -func (o *GetFileStatOK) GetPayload() []*models.FileStatResult { - return o.Payload -} - -func (o *GetFileStatOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileStatDefault creates a GetFileStatDefault with default headers values -func NewGetFileStatDefault(code int) *GetFileStatDefault { - return &GetFileStatDefault{ - _statusCode: code, - } -} - -/* -GetFileStatDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetFileStatDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get file stat default response has a 2xx status code -func (o *GetFileStatDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file stat default response has a 3xx status code -func (o *GetFileStatDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file stat default response has a 4xx status code -func (o *GetFileStatDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file stat default response has a 5xx status code -func (o *GetFileStatDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file stat default response a status code equal to that given -func (o *GetFileStatDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file stat default response -func (o *GetFileStatDefault) Code() int { - return o._statusCode -} - -func (o *GetFileStatDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/stat][%d] GetFileStat default %s", o._statusCode, payload) -} - -func (o *GetFileStatDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/stat][%d] GetFileStat default %s", o._statusCode, payload) -} - -func (o *GetFileStatDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetFileStatDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/file/get_file_versions_parameters.go b/v1/client/file/get_file_versions_parameters.go deleted file mode 100644 index bbd44dfe..00000000 --- a/v1/client/file/get_file_versions_parameters.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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/go-openapi/swag" -) - -// NewGetFileVersionsParams creates a new GetFileVersionsParams 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 NewGetFileVersionsParams() *GetFileVersionsParams { - return &GetFileVersionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileVersionsParamsWithTimeout creates a new GetFileVersionsParams object -// with the ability to set a timeout on a request. -func NewGetFileVersionsParamsWithTimeout(timeout time.Duration) *GetFileVersionsParams { - return &GetFileVersionsParams{ - timeout: timeout, - } -} - -// NewGetFileVersionsParamsWithContext creates a new GetFileVersionsParams object -// with the ability to set a context for a request. -func NewGetFileVersionsParamsWithContext(ctx context.Context) *GetFileVersionsParams { - return &GetFileVersionsParams{ - Context: ctx, - } -} - -// NewGetFileVersionsParamsWithHTTPClient creates a new GetFileVersionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileVersionsParamsWithHTTPClient(client *http.Client) *GetFileVersionsParams { - return &GetFileVersionsParams{ - HTTPClient: client, - } -} - -/* -GetFileVersionsParams contains all the parameters to send to the API endpoint - - for the get file versions operation. - - Typically these are written to a http.Request. -*/ -type GetFileVersionsParams struct { - - /* ClusterID. - - ClusterId is the Id of the cluster used for constructing JobUid. - - Format: int64 - */ - ClusterID *int64 - - /* ClusterIncarnationID. - - ClusterIncarnationId is the incarnation Id of the cluster used for - constructing JobUid. - - Format: int64 - */ - ClusterIncarnationID *int64 - - /* EntityID. - - EntityId is the Id of the entity where the file resides. - - Format: int64 - */ - EntityID *int64 - - /* Filename. - - Filename is the name of the file. - */ - Filename *string - - /* FromObjectSnapshotsOnly. - - if FromObjectSnapshotsOnly is false get the file versions from the indexed - snapshots else get it from non-indexed snapshots. - indexed snapshots are those in which we are sure file exist and in - non-indexed snapshots file may or may not exist. - Default is false. - */ - FromObjectSnapshotsOnly *bool - - /* JobID. - - JobId is the Id of the job that took the snapshot. - - Format: int64 - */ - JobID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file versions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileVersionsParams) WithDefaults() *GetFileVersionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file versions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileVersionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file versions params -func (o *GetFileVersionsParams) WithTimeout(timeout time.Duration) *GetFileVersionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file versions params -func (o *GetFileVersionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file versions params -func (o *GetFileVersionsParams) WithContext(ctx context.Context) *GetFileVersionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file versions params -func (o *GetFileVersionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file versions params -func (o *GetFileVersionsParams) WithHTTPClient(client *http.Client) *GetFileVersionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file versions params -func (o *GetFileVersionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get file versions params -func (o *GetFileVersionsParams) WithClusterID(clusterID *int64) *GetFileVersionsParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get file versions params -func (o *GetFileVersionsParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get file versions params -func (o *GetFileVersionsParams) WithClusterIncarnationID(clusterIncarnationID *int64) *GetFileVersionsParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get file versions params -func (o *GetFileVersionsParams) SetClusterIncarnationID(clusterIncarnationID *int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithEntityID adds the entityID to the get file versions params -func (o *GetFileVersionsParams) WithEntityID(entityID *int64) *GetFileVersionsParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get file versions params -func (o *GetFileVersionsParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithFilename adds the filename to the get file versions params -func (o *GetFileVersionsParams) WithFilename(filename *string) *GetFileVersionsParams { - o.SetFilename(filename) - return o -} - -// SetFilename adds the filename to the get file versions params -func (o *GetFileVersionsParams) SetFilename(filename *string) { - o.Filename = filename -} - -// WithFromObjectSnapshotsOnly adds the fromObjectSnapshotsOnly to the get file versions params -func (o *GetFileVersionsParams) WithFromObjectSnapshotsOnly(fromObjectSnapshotsOnly *bool) *GetFileVersionsParams { - o.SetFromObjectSnapshotsOnly(fromObjectSnapshotsOnly) - return o -} - -// SetFromObjectSnapshotsOnly adds the fromObjectSnapshotsOnly to the get file versions params -func (o *GetFileVersionsParams) SetFromObjectSnapshotsOnly(fromObjectSnapshotsOnly *bool) { - o.FromObjectSnapshotsOnly = fromObjectSnapshotsOnly -} - -// WithJobID adds the jobID to the get file versions params -func (o *GetFileVersionsParams) WithJobID(jobID *int64) *GetFileVersionsParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get file versions params -func (o *GetFileVersionsParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.ClusterIncarnationID != nil { - - // query param clusterIncarnationId - var qrClusterIncarnationID int64 - - if o.ClusterIncarnationID != nil { - qrClusterIncarnationID = *o.ClusterIncarnationID - } - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.Filename != nil { - - // query param filename - var qrFilename string - - if o.Filename != nil { - qrFilename = *o.Filename - } - qFilename := qrFilename - if qFilename != "" { - - if err := r.SetQueryParam("filename", qFilename); err != nil { - return err - } - } - } - - if o.FromObjectSnapshotsOnly != nil { - - // query param fromObjectSnapshotsOnly - var qrFromObjectSnapshotsOnly bool - - if o.FromObjectSnapshotsOnly != nil { - qrFromObjectSnapshotsOnly = *o.FromObjectSnapshotsOnly - } - qFromObjectSnapshotsOnly := swag.FormatBool(qrFromObjectSnapshotsOnly) - if qFromObjectSnapshotsOnly != "" { - - if err := r.SetQueryParam("fromObjectSnapshotsOnly", qFromObjectSnapshotsOnly); err != nil { - return err - } - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/file/get_file_versions_responses.go b/v1/client/file/get_file_versions_responses.go deleted file mode 100644 index 4f56c7af..00000000 --- a/v1/client/file/get_file_versions_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package file - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileVersionsReader is a Reader for the GetFileVersions structure. -type GetFileVersionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileVersionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileVersionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileVersionsDefault(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 - } -} - -// NewGetFileVersionsOK creates a GetFileVersionsOK with default headers values -func NewGetFileVersionsOK() *GetFileVersionsOK { - return &GetFileVersionsOK{} -} - -/* -GetFileVersionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileVersionsOK struct { - Payload *models.GetCrackedFileVersionsResult -} - -// IsSuccess returns true when this get file versions o k response has a 2xx status code -func (o *GetFileVersionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file versions o k response has a 3xx status code -func (o *GetFileVersionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file versions o k response has a 4xx status code -func (o *GetFileVersionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file versions o k response has a 5xx status code -func (o *GetFileVersionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file versions o k response a status code equal to that given -func (o *GetFileVersionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file versions o k response -func (o *GetFileVersionsOK) Code() int { - return 200 -} - -func (o *GetFileVersionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/versions][%d] getFileVersionsOK %s", 200, payload) -} - -func (o *GetFileVersionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/versions][%d] getFileVersionsOK %s", 200, payload) -} - -func (o *GetFileVersionsOK) GetPayload() *models.GetCrackedFileVersionsResult { - return o.Payload -} - -func (o *GetFileVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetCrackedFileVersionsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileVersionsDefault creates a GetFileVersionsDefault with default headers values -func NewGetFileVersionsDefault(code int) *GetFileVersionsDefault { - return &GetFileVersionsDefault{ - _statusCode: code, - } -} - -/* -GetFileVersionsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetFileVersionsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get file versions default response has a 2xx status code -func (o *GetFileVersionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file versions default response has a 3xx status code -func (o *GetFileVersionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file versions default response has a 4xx status code -func (o *GetFileVersionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file versions default response has a 5xx status code -func (o *GetFileVersionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file versions default response a status code equal to that given -func (o *GetFileVersionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file versions default response -func (o *GetFileVersionsDefault) Code() int { - return o._statusCode -} - -func (o *GetFileVersionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/versions][%d] GetFileVersions default %s", o._statusCode, payload) -} - -func (o *GetFileVersionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file/versions][%d] GetFileVersions default %s", o._statusCode, payload) -} - -func (o *GetFileVersionsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetFileVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/get_k_m_s_status_response/get_kms_status_parameters.go b/v1/client/get_k_m_s_status_response/get_kms_status_parameters.go deleted file mode 100644 index 39c6b112..00000000 --- a/v1/client/get_k_m_s_status_response/get_kms_status_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package get_k_m_s_status_response - -// 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" -) - -// NewGetKmsStatusParams creates a new GetKmsStatusParams 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 NewGetKmsStatusParams() *GetKmsStatusParams { - return &GetKmsStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKmsStatusParamsWithTimeout creates a new GetKmsStatusParams object -// with the ability to set a timeout on a request. -func NewGetKmsStatusParamsWithTimeout(timeout time.Duration) *GetKmsStatusParams { - return &GetKmsStatusParams{ - timeout: timeout, - } -} - -// NewGetKmsStatusParamsWithContext creates a new GetKmsStatusParams object -// with the ability to set a context for a request. -func NewGetKmsStatusParamsWithContext(ctx context.Context) *GetKmsStatusParams { - return &GetKmsStatusParams{ - Context: ctx, - } -} - -// NewGetKmsStatusParamsWithHTTPClient creates a new GetKmsStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKmsStatusParamsWithHTTPClient(client *http.Client) *GetKmsStatusParams { - return &GetKmsStatusParams{ - HTTPClient: client, - } -} - -/* -GetKmsStatusParams contains all the parameters to send to the API endpoint - - for the get kms status operation. - - Typically these are written to a http.Request. -*/ -type GetKmsStatusParams struct { - - /* Name. - - Specifies the name of the server to check the connectivity. - */ - Name *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kms status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsStatusParams) WithDefaults() *GetKmsStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kms status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kms status params -func (o *GetKmsStatusParams) WithTimeout(timeout time.Duration) *GetKmsStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kms status params -func (o *GetKmsStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kms status params -func (o *GetKmsStatusParams) WithContext(ctx context.Context) *GetKmsStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kms status params -func (o *GetKmsStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kms status params -func (o *GetKmsStatusParams) WithHTTPClient(client *http.Client) *GetKmsStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kms status params -func (o *GetKmsStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the get kms status params -func (o *GetKmsStatusParams) WithName(name *string) *GetKmsStatusParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get kms status params -func (o *GetKmsStatusParams) SetName(name *string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKmsStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/get_k_m_s_status_response/get_kms_status_responses.go b/v1/client/get_k_m_s_status_response/get_kms_status_responses.go deleted file mode 100644 index 45d30d69..00000000 --- a/v1/client/get_k_m_s_status_response/get_kms_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package get_k_m_s_status_response - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetKmsStatusReader is a Reader for the GetKmsStatus structure. -type GetKmsStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKmsStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKmsStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKmsStatusDefault(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 - } -} - -// NewGetKmsStatusOK creates a GetKmsStatusOK with default headers values -func NewGetKmsStatusOK() *GetKmsStatusOK { - return &GetKmsStatusOK{} -} - -/* -GetKmsStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKmsStatusOK struct { - Payload *models.KMSStatusResponse -} - -// IsSuccess returns true when this get kms status o k response has a 2xx status code -func (o *GetKmsStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get kms status o k response has a 3xx status code -func (o *GetKmsStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get kms status o k response has a 4xx status code -func (o *GetKmsStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get kms status o k response has a 5xx status code -func (o *GetKmsStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get kms status o k response a status code equal to that given -func (o *GetKmsStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get kms status o k response -func (o *GetKmsStatusOK) Code() int { - return 200 -} - -func (o *GetKmsStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsStatus][%d] getKmsStatusOK %s", 200, payload) -} - -func (o *GetKmsStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsStatus][%d] getKmsStatusOK %s", 200, payload) -} - -func (o *GetKmsStatusOK) GetPayload() *models.KMSStatusResponse { - return o.Payload -} - -func (o *GetKmsStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KMSStatusResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKmsStatusDefault creates a GetKmsStatusDefault with default headers values -func NewGetKmsStatusDefault(code int) *GetKmsStatusDefault { - return &GetKmsStatusDefault{ - _statusCode: code, - } -} - -/* -GetKmsStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKmsStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get kms status default response has a 2xx status code -func (o *GetKmsStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get kms status default response has a 3xx status code -func (o *GetKmsStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get kms status default response has a 4xx status code -func (o *GetKmsStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get kms status default response has a 5xx status code -func (o *GetKmsStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get kms status default response a status code equal to that given -func (o *GetKmsStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get kms status default response -func (o *GetKmsStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetKmsStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsStatus][%d] GetKmsStatus default %s", o._statusCode, payload) -} - -func (o *GetKmsStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsStatus][%d] GetKmsStatus default %s", o._statusCode, payload) -} - -func (o *GetKmsStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetKmsStatusDefault) 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/get_k_m_s_status_response/getkms_status_response_client.go b/v1/client/get_k_m_s_status_response/getkms_status_response_client.go deleted file mode 100644 index cb6a1013..00000000 --- a/v1/client/get_k_m_s_status_response/getkms_status_response_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package get_k_m_s_status_response - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new get k m s status response API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new get k m s status response API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new get k m s status response API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for get k m s status response API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetKmsStatus(params *GetKmsStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsStatusOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetKmsStatus returns the status of the k m s server -*/ -func (a *Client) GetKmsStatus(params *GetKmsStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKmsStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetKmsStatus", - Method: "GET", - PathPattern: "/public/kmsStatus", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKmsStatusReader{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.(*GetKmsStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKmsStatusDefault) - 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/groups/create_group_parameters.go b/v1/client/groups/create_group_parameters.go deleted file mode 100644 index 4a6ed61e..00000000 --- a/v1/client/groups/create_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateGroupParams creates a new CreateGroupParams 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 NewCreateGroupParams() *CreateGroupParams { - return &CreateGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateGroupParamsWithTimeout creates a new CreateGroupParams object -// with the ability to set a timeout on a request. -func NewCreateGroupParamsWithTimeout(timeout time.Duration) *CreateGroupParams { - return &CreateGroupParams{ - timeout: timeout, - } -} - -// NewCreateGroupParamsWithContext creates a new CreateGroupParams object -// with the ability to set a context for a request. -func NewCreateGroupParamsWithContext(ctx context.Context) *CreateGroupParams { - return &CreateGroupParams{ - Context: ctx, - } -} - -// NewCreateGroupParamsWithHTTPClient creates a new CreateGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateGroupParamsWithHTTPClient(client *http.Client) *CreateGroupParams { - return &CreateGroupParams{ - HTTPClient: client, - } -} - -/* -CreateGroupParams contains all the parameters to send to the API endpoint - - for the create group operation. - - Typically these are written to a http.Request. -*/ -type CreateGroupParams struct { - - /* Body. - - Request to add or create a Group. - */ - Body *models.GroupParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGroupParams) WithDefaults() *CreateGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create group params -func (o *CreateGroupParams) WithTimeout(timeout time.Duration) *CreateGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create group params -func (o *CreateGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create group params -func (o *CreateGroupParams) WithContext(ctx context.Context) *CreateGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create group params -func (o *CreateGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create group params -func (o *CreateGroupParams) WithHTTPClient(client *http.Client) *CreateGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create group params -func (o *CreateGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create group params -func (o *CreateGroupParams) WithBody(body *models.GroupParameters) *CreateGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create group params -func (o *CreateGroupParams) SetBody(body *models.GroupParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateGroupParams) 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/groups/create_group_responses.go b/v1/client/groups/create_group_responses.go deleted file mode 100644 index 1f1a0e21..00000000 --- a/v1/client/groups/create_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateGroupReader is a Reader for the CreateGroup structure. -type CreateGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateGroupDefault(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 - } -} - -// NewCreateGroupCreated creates a CreateGroupCreated with default headers values -func NewCreateGroupCreated() *CreateGroupCreated { - return &CreateGroupCreated{} -} - -/* -CreateGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateGroupCreated struct { - Payload *models.Group -} - -// IsSuccess returns true when this create group created response has a 2xx status code -func (o *CreateGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create group created response has a 3xx status code -func (o *CreateGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create group created response has a 4xx status code -func (o *CreateGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create group created response has a 5xx status code -func (o *CreateGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create group created response a status code equal to that given -func (o *CreateGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create group created response -func (o *CreateGroupCreated) Code() int { - return 201 -} - -func (o *CreateGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/groups][%d] createGroupCreated %s", 201, payload) -} - -func (o *CreateGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/groups][%d] createGroupCreated %s", 201, payload) -} - -func (o *CreateGroupCreated) GetPayload() *models.Group { - return o.Payload -} - -func (o *CreateGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Group) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateGroupDefault creates a CreateGroupDefault with default headers values -func NewCreateGroupDefault(code int) *CreateGroupDefault { - return &CreateGroupDefault{ - _statusCode: code, - } -} - -/* -CreateGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create group default response has a 2xx status code -func (o *CreateGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create group default response has a 3xx status code -func (o *CreateGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create group default response has a 4xx status code -func (o *CreateGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create group default response has a 5xx status code -func (o *CreateGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create group default response a status code equal to that given -func (o *CreateGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create group default response -func (o *CreateGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/groups][%d] CreateGroup default %s", o._statusCode, payload) -} - -func (o *CreateGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/groups][%d] CreateGroup default %s", o._statusCode, payload) -} - -func (o *CreateGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateGroupDefault) 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/groups/delete_groups_parameters.go b/v1/client/groups/delete_groups_parameters.go deleted file mode 100644 index 79168b50..00000000 --- a/v1/client/groups/delete_groups_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteGroupsParams creates a new DeleteGroupsParams 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 NewDeleteGroupsParams() *DeleteGroupsParams { - return &DeleteGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteGroupsParamsWithTimeout creates a new DeleteGroupsParams object -// with the ability to set a timeout on a request. -func NewDeleteGroupsParamsWithTimeout(timeout time.Duration) *DeleteGroupsParams { - return &DeleteGroupsParams{ - timeout: timeout, - } -} - -// NewDeleteGroupsParamsWithContext creates a new DeleteGroupsParams object -// with the ability to set a context for a request. -func NewDeleteGroupsParamsWithContext(ctx context.Context) *DeleteGroupsParams { - return &DeleteGroupsParams{ - Context: ctx, - } -} - -// NewDeleteGroupsParamsWithHTTPClient creates a new DeleteGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteGroupsParamsWithHTTPClient(client *http.Client) *DeleteGroupsParams { - return &DeleteGroupsParams{ - HTTPClient: client, - } -} - -/* -DeleteGroupsParams contains all the parameters to send to the API endpoint - - for the delete groups operation. - - Typically these are written to a http.Request. -*/ -type DeleteGroupsParams struct { - - /* Body. - - Request to delete one or more groups on the Cohesity Cluster. - */ - Body *models.GroupDeleteParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupsParams) WithDefaults() *DeleteGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete groups params -func (o *DeleteGroupsParams) WithTimeout(timeout time.Duration) *DeleteGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete groups params -func (o *DeleteGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete groups params -func (o *DeleteGroupsParams) WithContext(ctx context.Context) *DeleteGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete groups params -func (o *DeleteGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete groups params -func (o *DeleteGroupsParams) WithHTTPClient(client *http.Client) *DeleteGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete groups params -func (o *DeleteGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete groups params -func (o *DeleteGroupsParams) WithBody(body *models.GroupDeleteParameters) *DeleteGroupsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete groups params -func (o *DeleteGroupsParams) SetBody(body *models.GroupDeleteParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteGroupsParams) 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/groups/delete_groups_responses.go b/v1/client/groups/delete_groups_responses.go deleted file mode 100644 index 31edce4b..00000000 --- a/v1/client/groups/delete_groups_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteGroupsReader is a Reader for the DeleteGroups structure. -type DeleteGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteGroupsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteGroupsDefault(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 - } -} - -// NewDeleteGroupsNoContent creates a DeleteGroupsNoContent with default headers values -func NewDeleteGroupsNoContent() *DeleteGroupsNoContent { - return &DeleteGroupsNoContent{} -} - -/* -DeleteGroupsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteGroupsNoContent struct { -} - -// IsSuccess returns true when this delete groups no content response has a 2xx status code -func (o *DeleteGroupsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete groups no content response has a 3xx status code -func (o *DeleteGroupsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete groups no content response has a 4xx status code -func (o *DeleteGroupsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete groups no content response has a 5xx status code -func (o *DeleteGroupsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete groups no content response a status code equal to that given -func (o *DeleteGroupsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete groups no content response -func (o *DeleteGroupsNoContent) Code() int { - return 204 -} - -func (o *DeleteGroupsNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/groups][%d] deleteGroupsNoContent", 204) -} - -func (o *DeleteGroupsNoContent) String() string { - return fmt.Sprintf("[DELETE /public/groups][%d] deleteGroupsNoContent", 204) -} - -func (o *DeleteGroupsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteGroupsDefault creates a DeleteGroupsDefault with default headers values -func NewDeleteGroupsDefault(code int) *DeleteGroupsDefault { - return &DeleteGroupsDefault{ - _statusCode: code, - } -} - -/* -DeleteGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteGroupsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete groups default response has a 2xx status code -func (o *DeleteGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete groups default response has a 3xx status code -func (o *DeleteGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete groups default response has a 4xx status code -func (o *DeleteGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete groups default response has a 5xx status code -func (o *DeleteGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete groups default response a status code equal to that given -func (o *DeleteGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete groups default response -func (o *DeleteGroupsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/groups][%d] DeleteGroups default %s", o._statusCode, payload) -} - -func (o *DeleteGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/groups][%d] DeleteGroups default %s", o._statusCode, payload) -} - -func (o *DeleteGroupsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteGroupsDefault) 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/groups/get_groups_parameters.go b/v1/client/groups/get_groups_parameters.go deleted file mode 100644 index 71309b56..00000000 --- a/v1/client/groups/get_groups_parameters.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/go-openapi/swag" -) - -// NewGetGroupsParams creates a new GetGroupsParams 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 NewGetGroupsParams() *GetGroupsParams { - return &GetGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetGroupsParamsWithTimeout creates a new GetGroupsParams object -// with the ability to set a timeout on a request. -func NewGetGroupsParamsWithTimeout(timeout time.Duration) *GetGroupsParams { - return &GetGroupsParams{ - timeout: timeout, - } -} - -// NewGetGroupsParamsWithContext creates a new GetGroupsParams object -// with the ability to set a context for a request. -func NewGetGroupsParamsWithContext(ctx context.Context) *GetGroupsParams { - return &GetGroupsParams{ - Context: ctx, - } -} - -// NewGetGroupsParamsWithHTTPClient creates a new GetGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetGroupsParamsWithHTTPClient(client *http.Client) *GetGroupsParams { - return &GetGroupsParams{ - HTTPClient: client, - } -} - -/* -GetGroupsParams contains all the parameters to send to the API endpoint - - for the get groups operation. - - Typically these are written to a http.Request. -*/ -type GetGroupsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Domain. - - If no domain is specified, all groups on the Cohesity Cluster are searched. - If a domain is specified, only groups on the Cohesity Cluster - associated with that domain are searched. - */ - Domain *string - - /* FilterByOwnedDomains. - - If FilterByOwnedDomains is set to true, then the groups are filtered - to show only the ones that are in the domains owned by the current tenant - or user. - */ - FilterByOwnedDomains *bool - - /* Name. - - Optionally specify a group name to filter by. All groups containing name - will be returned. - */ - Name *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupsParams) WithDefaults() *GetGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get groups params -func (o *GetGroupsParams) WithTimeout(timeout time.Duration) *GetGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get groups params -func (o *GetGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get groups params -func (o *GetGroupsParams) WithContext(ctx context.Context) *GetGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get groups params -func (o *GetGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get groups params -func (o *GetGroupsParams) WithHTTPClient(client *http.Client) *GetGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get groups params -func (o *GetGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get groups params -func (o *GetGroupsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetGroupsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get groups params -func (o *GetGroupsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomain adds the domain to the get groups params -func (o *GetGroupsParams) WithDomain(domain *string) *GetGroupsParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the get groups params -func (o *GetGroupsParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithFilterByOwnedDomains adds the filterByOwnedDomains to the get groups params -func (o *GetGroupsParams) WithFilterByOwnedDomains(filterByOwnedDomains *bool) *GetGroupsParams { - o.SetFilterByOwnedDomains(filterByOwnedDomains) - return o -} - -// SetFilterByOwnedDomains adds the filterByOwnedDomains to the get groups params -func (o *GetGroupsParams) SetFilterByOwnedDomains(filterByOwnedDomains *bool) { - o.FilterByOwnedDomains = filterByOwnedDomains -} - -// WithName adds the name to the get groups params -func (o *GetGroupsParams) WithName(name *string) *GetGroupsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get groups params -func (o *GetGroupsParams) SetName(name *string) { - o.Name = name -} - -// WithTenantIds adds the tenantIds to the get groups params -func (o *GetGroupsParams) WithTenantIds(tenantIds []string) *GetGroupsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get groups params -func (o *GetGroupsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.FilterByOwnedDomains != nil { - - // query param filterByOwnedDomains - var qrFilterByOwnedDomains bool - - if o.FilterByOwnedDomains != nil { - qrFilterByOwnedDomains = *o.FilterByOwnedDomains - } - qFilterByOwnedDomains := swag.FormatBool(qrFilterByOwnedDomains) - if qFilterByOwnedDomains != "" { - - if err := r.SetQueryParam("filterByOwnedDomains", qFilterByOwnedDomains); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetGroups binds the parameter tenantIds -func (o *GetGroupsParams) 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/v1/client/groups/get_groups_responses.go b/v1/client/groups/get_groups_responses.go deleted file mode 100644 index b3a6aea1..00000000 --- a/v1/client/groups/get_groups_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetGroupsReader is a Reader for the GetGroups structure. -type GetGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetGroupsDefault(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 - } -} - -// NewGetGroupsOK creates a GetGroupsOK with default headers values -func NewGetGroupsOK() *GetGroupsOK { - return &GetGroupsOK{} -} - -/* -GetGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetGroupsOK struct { - Payload []*models.Group -} - -// IsSuccess returns true when this get groups o k response has a 2xx status code -func (o *GetGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get groups o k response has a 3xx status code -func (o *GetGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get groups o k response has a 4xx status code -func (o *GetGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get groups o k response has a 5xx status code -func (o *GetGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get groups o k response a status code equal to that given -func (o *GetGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get groups o k response -func (o *GetGroupsOK) Code() int { - return 200 -} - -func (o *GetGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/groups][%d] getGroupsOK %s", 200, payload) -} - -func (o *GetGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/groups][%d] getGroupsOK %s", 200, payload) -} - -func (o *GetGroupsOK) GetPayload() []*models.Group { - return o.Payload -} - -func (o *GetGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetGroupsDefault creates a GetGroupsDefault with default headers values -func NewGetGroupsDefault(code int) *GetGroupsDefault { - return &GetGroupsDefault{ - _statusCode: code, - } -} - -/* -GetGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetGroupsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get groups default response has a 2xx status code -func (o *GetGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get groups default response has a 3xx status code -func (o *GetGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get groups default response has a 4xx status code -func (o *GetGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get groups default response has a 5xx status code -func (o *GetGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get groups default response a status code equal to that given -func (o *GetGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get groups default response -func (o *GetGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/groups][%d] GetGroups default %s", o._statusCode, payload) -} - -func (o *GetGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/groups][%d] GetGroups default %s", o._statusCode, payload) -} - -func (o *GetGroupsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetGroupsDefault) 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/groups/groups_client.go b/v1/client/groups/groups_client.go deleted file mode 100644 index 4a2698ae..00000000 --- a/v1/client/groups/groups_client.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new groups API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new groups API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new groups API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for groups API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateGroup(params *CreateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateGroupCreated, error) - - DeleteGroups(params *DeleteGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupsNoContent, error) - - GetGroups(params *GetGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupsOK, error) - - UpdateGroup(params *UpdateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateGroupOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateGroup creates or add a new group to the cohesity cluster - - If an Active Directory domain is specified, a new group is added to the - -Cohesity Cluster for the specified Active Directory group principal. -If the LOCAL domain is specified, a new group is created directly in -the default LOCAL domain on the Cohesity Cluster. - -Returns the created or added group. -*/ -func (a *Client) CreateGroup(params *CreateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateGroup", - Method: "POST", - PathPattern: "/public/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateGroupReader{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.(*CreateGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteGroups deletes one or more groups on the cohesity cluster - - If the group on the Cohesity Cluster was added for an Active Directory user, - -the referenced principal group on the Active Directory domain is NOT deleted. -Only the group on the Cohesity Cluster is deleted. - -Returns Success if the specified groups are deleted. -*/ -func (a *Client) DeleteGroups(params *DeleteGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteGroups", - Method: "DELETE", - PathPattern: "/public/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteGroupsReader{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.(*DeleteGroupsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetGroups lists the groups that match the filter criteria specified using parameters - - If no parameters are specified, all groups currently on the Cohesity Cluster - -are returned. Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetGroups(params *GetGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetGroups", - Method: "GET", - PathPattern: "/public/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetGroupsReader{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.(*GetGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateGroup updates an existing group on the cohesity cluster only group settings on the cohesity cluster are updated no changes are made to the referenced group principal on the active directory - -Returns the group that was updated on the Cohesity Cluster. -*/ -func (a *Client) UpdateGroup(params *UpdateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateGroup", - Method: "PUT", - PathPattern: "/public/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateGroupReader{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.(*UpdateGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateGroupDefault) - 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/groups/update_group_parameters.go b/v1/client/groups/update_group_parameters.go deleted file mode 100644 index 834aff30..00000000 --- a/v1/client/groups/update_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateGroupParams creates a new UpdateGroupParams 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 NewUpdateGroupParams() *UpdateGroupParams { - return &UpdateGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateGroupParamsWithTimeout creates a new UpdateGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateGroupParamsWithTimeout(timeout time.Duration) *UpdateGroupParams { - return &UpdateGroupParams{ - timeout: timeout, - } -} - -// NewUpdateGroupParamsWithContext creates a new UpdateGroupParams object -// with the ability to set a context for a request. -func NewUpdateGroupParamsWithContext(ctx context.Context) *UpdateGroupParams { - return &UpdateGroupParams{ - Context: ctx, - } -} - -// NewUpdateGroupParamsWithHTTPClient creates a new UpdateGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateGroupParamsWithHTTPClient(client *http.Client) *UpdateGroupParams { - return &UpdateGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateGroupParams contains all the parameters to send to the API endpoint - - for the update group operation. - - Typically these are written to a http.Request. -*/ -type UpdateGroupParams struct { - - /* Body. - - Request to update a group. - */ - Body *models.GroupParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGroupParams) WithDefaults() *UpdateGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update group params -func (o *UpdateGroupParams) WithTimeout(timeout time.Duration) *UpdateGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update group params -func (o *UpdateGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update group params -func (o *UpdateGroupParams) WithContext(ctx context.Context) *UpdateGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update group params -func (o *UpdateGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update group params -func (o *UpdateGroupParams) WithHTTPClient(client *http.Client) *UpdateGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update group params -func (o *UpdateGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update group params -func (o *UpdateGroupParams) WithBody(body *models.GroupParameters) *UpdateGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update group params -func (o *UpdateGroupParams) SetBody(body *models.GroupParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateGroupParams) 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/groups/update_group_responses.go b/v1/client/groups/update_group_responses.go deleted file mode 100644 index 48eb5105..00000000 --- a/v1/client/groups/update_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package groups - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateGroupReader is a Reader for the UpdateGroup structure. -type UpdateGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateGroupDefault(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 - } -} - -// NewUpdateGroupOK creates a UpdateGroupOK with default headers values -func NewUpdateGroupOK() *UpdateGroupOK { - return &UpdateGroupOK{} -} - -/* -UpdateGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateGroupOK struct { - Payload *models.Group -} - -// IsSuccess returns true when this update group o k response has a 2xx status code -func (o *UpdateGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update group o k response has a 3xx status code -func (o *UpdateGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update group o k response has a 4xx status code -func (o *UpdateGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update group o k response has a 5xx status code -func (o *UpdateGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update group o k response a status code equal to that given -func (o *UpdateGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update group o k response -func (o *UpdateGroupOK) Code() int { - return 200 -} - -func (o *UpdateGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/groups][%d] updateGroupOK %s", 200, payload) -} - -func (o *UpdateGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/groups][%d] updateGroupOK %s", 200, payload) -} - -func (o *UpdateGroupOK) GetPayload() *models.Group { - return o.Payload -} - -func (o *UpdateGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Group) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateGroupDefault creates a UpdateGroupDefault with default headers values -func NewUpdateGroupDefault(code int) *UpdateGroupDefault { - return &UpdateGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update group default response has a 2xx status code -func (o *UpdateGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update group default response has a 3xx status code -func (o *UpdateGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update group default response has a 4xx status code -func (o *UpdateGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update group default response has a 5xx status code -func (o *UpdateGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update group default response a status code equal to that given -func (o *UpdateGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update group default response -func (o *UpdateGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/groups][%d] UpdateGroup default %s", o._statusCode, payload) -} - -func (o *UpdateGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/groups][%d] UpdateGroup default %s", o._statusCode, payload) -} - -func (o *UpdateGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateGroupDefault) 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/idps/add_idp_directory_principals_parameters.go b/v1/client/idps/add_idp_directory_principals_parameters.go deleted file mode 100644 index 4110feaa..00000000 --- a/v1/client/idps/add_idp_directory_principals_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAddIdpDirectoryPrincipalsParams creates a new AddIdpDirectoryPrincipalsParams 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 NewAddIdpDirectoryPrincipalsParams() *AddIdpDirectoryPrincipalsParams { - return &AddIdpDirectoryPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddIdpDirectoryPrincipalsParamsWithTimeout creates a new AddIdpDirectoryPrincipalsParams object -// with the ability to set a timeout on a request. -func NewAddIdpDirectoryPrincipalsParamsWithTimeout(timeout time.Duration) *AddIdpDirectoryPrincipalsParams { - return &AddIdpDirectoryPrincipalsParams{ - timeout: timeout, - } -} - -// NewAddIdpDirectoryPrincipalsParamsWithContext creates a new AddIdpDirectoryPrincipalsParams object -// with the ability to set a context for a request. -func NewAddIdpDirectoryPrincipalsParamsWithContext(ctx context.Context) *AddIdpDirectoryPrincipalsParams { - return &AddIdpDirectoryPrincipalsParams{ - Context: ctx, - } -} - -// NewAddIdpDirectoryPrincipalsParamsWithHTTPClient creates a new AddIdpDirectoryPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddIdpDirectoryPrincipalsParamsWithHTTPClient(client *http.Client) *AddIdpDirectoryPrincipalsParams { - return &AddIdpDirectoryPrincipalsParams{ - HTTPClient: client, - } -} - -/* -AddIdpDirectoryPrincipalsParams contains all the parameters to send to the API endpoint - - for the add idp directory principals operation. - - Typically these are written to a http.Request. -*/ -type AddIdpDirectoryPrincipalsParams struct { - - /* Body. - - Request to add groups or users to the Cohesity Cluster. - */ - Body []*models.IdpPrincipalsAddParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add idp directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddIdpDirectoryPrincipalsParams) WithDefaults() *AddIdpDirectoryPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add idp directory principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddIdpDirectoryPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) WithTimeout(timeout time.Duration) *AddIdpDirectoryPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) WithContext(ctx context.Context) *AddIdpDirectoryPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) WithHTTPClient(client *http.Client) *AddIdpDirectoryPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) WithBody(body []*models.IdpPrincipalsAddParameters) *AddIdpDirectoryPrincipalsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add idp directory principals params -func (o *AddIdpDirectoryPrincipalsParams) SetBody(body []*models.IdpPrincipalsAddParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddIdpDirectoryPrincipalsParams) 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/idps/add_idp_directory_principals_responses.go b/v1/client/idps/add_idp_directory_principals_responses.go deleted file mode 100644 index 35aff053..00000000 --- a/v1/client/idps/add_idp_directory_principals_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AddIdpDirectoryPrincipalsReader is a Reader for the AddIdpDirectoryPrincipals structure. -type AddIdpDirectoryPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddIdpDirectoryPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddIdpDirectoryPrincipalsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddIdpDirectoryPrincipalsDefault(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 - } -} - -// NewAddIdpDirectoryPrincipalsCreated creates a AddIdpDirectoryPrincipalsCreated with default headers values -func NewAddIdpDirectoryPrincipalsCreated() *AddIdpDirectoryPrincipalsCreated { - return &AddIdpDirectoryPrincipalsCreated{} -} - -/* -AddIdpDirectoryPrincipalsCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddIdpDirectoryPrincipalsCreated struct { - Payload []*models.AddedIdpPrincipal -} - -// IsSuccess returns true when this add idp directory principals created response has a 2xx status code -func (o *AddIdpDirectoryPrincipalsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add idp directory principals created response has a 3xx status code -func (o *AddIdpDirectoryPrincipalsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add idp directory principals created response has a 4xx status code -func (o *AddIdpDirectoryPrincipalsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add idp directory principals created response has a 5xx status code -func (o *AddIdpDirectoryPrincipalsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add idp directory principals created response a status code equal to that given -func (o *AddIdpDirectoryPrincipalsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add idp directory principals created response -func (o *AddIdpDirectoryPrincipalsCreated) Code() int { - return 201 -} - -func (o *AddIdpDirectoryPrincipalsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps/principals][%d] addIdpDirectoryPrincipalsCreated %s", 201, payload) -} - -func (o *AddIdpDirectoryPrincipalsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps/principals][%d] addIdpDirectoryPrincipalsCreated %s", 201, payload) -} - -func (o *AddIdpDirectoryPrincipalsCreated) GetPayload() []*models.AddedIdpPrincipal { - return o.Payload -} - -func (o *AddIdpDirectoryPrincipalsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddIdpDirectoryPrincipalsDefault creates a AddIdpDirectoryPrincipalsDefault with default headers values -func NewAddIdpDirectoryPrincipalsDefault(code int) *AddIdpDirectoryPrincipalsDefault { - return &AddIdpDirectoryPrincipalsDefault{ - _statusCode: code, - } -} - -/* -AddIdpDirectoryPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddIdpDirectoryPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this add idp directory principals default response has a 2xx status code -func (o *AddIdpDirectoryPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add idp directory principals default response has a 3xx status code -func (o *AddIdpDirectoryPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add idp directory principals default response has a 4xx status code -func (o *AddIdpDirectoryPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add idp directory principals default response has a 5xx status code -func (o *AddIdpDirectoryPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add idp directory principals default response a status code equal to that given -func (o *AddIdpDirectoryPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add idp directory principals default response -func (o *AddIdpDirectoryPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *AddIdpDirectoryPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps/principals][%d] AddIdpDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *AddIdpDirectoryPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps/principals][%d] AddIdpDirectoryPrincipals default %s", o._statusCode, payload) -} - -func (o *AddIdpDirectoryPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AddIdpDirectoryPrincipalsDefault) 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/idps/create_idp_parameters.go b/v1/client/idps/create_idp_parameters.go deleted file mode 100644 index 456b9ba8..00000000 --- a/v1/client/idps/create_idp_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateIdpParams creates a new CreateIdpParams 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 NewCreateIdpParams() *CreateIdpParams { - return &CreateIdpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateIdpParamsWithTimeout creates a new CreateIdpParams object -// with the ability to set a timeout on a request. -func NewCreateIdpParamsWithTimeout(timeout time.Duration) *CreateIdpParams { - return &CreateIdpParams{ - timeout: timeout, - } -} - -// NewCreateIdpParamsWithContext creates a new CreateIdpParams object -// with the ability to set a context for a request. -func NewCreateIdpParamsWithContext(ctx context.Context) *CreateIdpParams { - return &CreateIdpParams{ - Context: ctx, - } -} - -// NewCreateIdpParamsWithHTTPClient creates a new CreateIdpParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateIdpParamsWithHTTPClient(client *http.Client) *CreateIdpParams { - return &CreateIdpParams{ - HTTPClient: client, - } -} - -/* -CreateIdpParams contains all the parameters to send to the API endpoint - - for the create idp operation. - - Typically these are written to a http.Request. -*/ -type CreateIdpParams struct { - - /* Body. - - Request to create a new IdP Configuration. - */ - Body *models.CreateIdpConfigurationRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdpParams) WithDefaults() *CreateIdpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create idp params -func (o *CreateIdpParams) WithTimeout(timeout time.Duration) *CreateIdpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create idp params -func (o *CreateIdpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create idp params -func (o *CreateIdpParams) WithContext(ctx context.Context) *CreateIdpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create idp params -func (o *CreateIdpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create idp params -func (o *CreateIdpParams) WithHTTPClient(client *http.Client) *CreateIdpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create idp params -func (o *CreateIdpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create idp params -func (o *CreateIdpParams) WithBody(body *models.CreateIdpConfigurationRequest) *CreateIdpParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create idp params -func (o *CreateIdpParams) SetBody(body *models.CreateIdpConfigurationRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateIdpParams) 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/idps/create_idp_responses.go b/v1/client/idps/create_idp_responses.go deleted file mode 100644 index 42e8d403..00000000 --- a/v1/client/idps/create_idp_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateIdpReader is a Reader for the CreateIdp structure. -type CreateIdpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateIdpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateIdpCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateIdpDefault(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 - } -} - -// NewCreateIdpCreated creates a CreateIdpCreated with default headers values -func NewCreateIdpCreated() *CreateIdpCreated { - return &CreateIdpCreated{} -} - -/* -CreateIdpCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateIdpCreated struct { - Payload *models.IdpServiceConfiguration -} - -// IsSuccess returns true when this create idp created response has a 2xx status code -func (o *CreateIdpCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create idp created response has a 3xx status code -func (o *CreateIdpCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create idp created response has a 4xx status code -func (o *CreateIdpCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create idp created response has a 5xx status code -func (o *CreateIdpCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create idp created response a status code equal to that given -func (o *CreateIdpCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create idp created response -func (o *CreateIdpCreated) Code() int { - return 201 -} - -func (o *CreateIdpCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps][%d] createIdpCreated %s", 201, payload) -} - -func (o *CreateIdpCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps][%d] createIdpCreated %s", 201, payload) -} - -func (o *CreateIdpCreated) GetPayload() *models.IdpServiceConfiguration { - return o.Payload -} - -func (o *CreateIdpCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdpServiceConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateIdpDefault creates a CreateIdpDefault with default headers values -func NewCreateIdpDefault(code int) *CreateIdpDefault { - return &CreateIdpDefault{ - _statusCode: code, - } -} - -/* -CreateIdpDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateIdpDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create idp default response has a 2xx status code -func (o *CreateIdpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create idp default response has a 3xx status code -func (o *CreateIdpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create idp default response has a 4xx status code -func (o *CreateIdpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create idp default response has a 5xx status code -func (o *CreateIdpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create idp default response a status code equal to that given -func (o *CreateIdpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create idp default response -func (o *CreateIdpDefault) Code() int { - return o._statusCode -} - -func (o *CreateIdpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps][%d] CreateIdp default %s", o._statusCode, payload) -} - -func (o *CreateIdpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/idps][%d] CreateIdp default %s", o._statusCode, payload) -} - -func (o *CreateIdpDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateIdpDefault) 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/idps/delete_idp_parameters.go b/v1/client/idps/delete_idp_parameters.go deleted file mode 100644 index 36833ee3..00000000 --- a/v1/client/idps/delete_idp_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/go-openapi/swag" -) - -// NewDeleteIdpParams creates a new DeleteIdpParams 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 NewDeleteIdpParams() *DeleteIdpParams { - return &DeleteIdpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteIdpParamsWithTimeout creates a new DeleteIdpParams object -// with the ability to set a timeout on a request. -func NewDeleteIdpParamsWithTimeout(timeout time.Duration) *DeleteIdpParams { - return &DeleteIdpParams{ - timeout: timeout, - } -} - -// NewDeleteIdpParamsWithContext creates a new DeleteIdpParams object -// with the ability to set a context for a request. -func NewDeleteIdpParamsWithContext(ctx context.Context) *DeleteIdpParams { - return &DeleteIdpParams{ - Context: ctx, - } -} - -// NewDeleteIdpParamsWithHTTPClient creates a new DeleteIdpParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteIdpParamsWithHTTPClient(client *http.Client) *DeleteIdpParams { - return &DeleteIdpParams{ - HTTPClient: client, - } -} - -/* -DeleteIdpParams contains all the parameters to send to the API endpoint - - for the delete idp operation. - - Typically these are written to a http.Request. -*/ -type DeleteIdpParams struct { - - /* ID. - - Specifies the Id assigned for the IdP Service by the Cluster. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdpParams) WithDefaults() *DeleteIdpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete idp params -func (o *DeleteIdpParams) WithTimeout(timeout time.Duration) *DeleteIdpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete idp params -func (o *DeleteIdpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete idp params -func (o *DeleteIdpParams) WithContext(ctx context.Context) *DeleteIdpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete idp params -func (o *DeleteIdpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete idp params -func (o *DeleteIdpParams) WithHTTPClient(client *http.Client) *DeleteIdpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete idp params -func (o *DeleteIdpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete idp params -func (o *DeleteIdpParams) WithID(id int64) *DeleteIdpParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete idp params -func (o *DeleteIdpParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteIdpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/idps/delete_idp_responses.go b/v1/client/idps/delete_idp_responses.go deleted file mode 100644 index 50835a2e..00000000 --- a/v1/client/idps/delete_idp_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteIdpReader is a Reader for the DeleteIdp structure. -type DeleteIdpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteIdpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteIdpNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteIdpDefault(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 - } -} - -// NewDeleteIdpNoContent creates a DeleteIdpNoContent with default headers values -func NewDeleteIdpNoContent() *DeleteIdpNoContent { - return &DeleteIdpNoContent{} -} - -/* -DeleteIdpNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteIdpNoContent struct { -} - -// IsSuccess returns true when this delete idp no content response has a 2xx status code -func (o *DeleteIdpNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete idp no content response has a 3xx status code -func (o *DeleteIdpNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete idp no content response has a 4xx status code -func (o *DeleteIdpNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete idp no content response has a 5xx status code -func (o *DeleteIdpNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete idp no content response a status code equal to that given -func (o *DeleteIdpNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete idp no content response -func (o *DeleteIdpNoContent) Code() int { - return 204 -} - -func (o *DeleteIdpNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/idps/{id}][%d] deleteIdpNoContent", 204) -} - -func (o *DeleteIdpNoContent) String() string { - return fmt.Sprintf("[DELETE /public/idps/{id}][%d] deleteIdpNoContent", 204) -} - -func (o *DeleteIdpNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIdpDefault creates a DeleteIdpDefault with default headers values -func NewDeleteIdpDefault(code int) *DeleteIdpDefault { - return &DeleteIdpDefault{ - _statusCode: code, - } -} - -/* -DeleteIdpDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteIdpDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete idp default response has a 2xx status code -func (o *DeleteIdpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete idp default response has a 3xx status code -func (o *DeleteIdpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete idp default response has a 4xx status code -func (o *DeleteIdpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete idp default response has a 5xx status code -func (o *DeleteIdpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete idp default response a status code equal to that given -func (o *DeleteIdpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete idp default response -func (o *DeleteIdpDefault) Code() int { - return o._statusCode -} - -func (o *DeleteIdpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/idps/{id}][%d] DeleteIdp default %s", o._statusCode, payload) -} - -func (o *DeleteIdpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/idps/{id}][%d] DeleteIdp default %s", o._statusCode, payload) -} - -func (o *DeleteIdpDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteIdpDefault) 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/idps/get_idps_parameters.go b/v1/client/idps/get_idps_parameters.go deleted file mode 100644 index a589c359..00000000 --- a/v1/client/idps/get_idps_parameters.go +++ /dev/null @@ -1,349 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/go-openapi/swag" -) - -// NewGetIdpsParams creates a new GetIdpsParams 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 NewGetIdpsParams() *GetIdpsParams { - return &GetIdpsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdpsParamsWithTimeout creates a new GetIdpsParams object -// with the ability to set a timeout on a request. -func NewGetIdpsParamsWithTimeout(timeout time.Duration) *GetIdpsParams { - return &GetIdpsParams{ - timeout: timeout, - } -} - -// NewGetIdpsParamsWithContext creates a new GetIdpsParams object -// with the ability to set a context for a request. -func NewGetIdpsParamsWithContext(ctx context.Context) *GetIdpsParams { - return &GetIdpsParams{ - Context: ctx, - } -} - -// NewGetIdpsParamsWithHTTPClient creates a new GetIdpsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdpsParamsWithHTTPClient(client *http.Client) *GetIdpsParams { - return &GetIdpsParams{ - HTTPClient: client, - } -} - -/* -GetIdpsParams contains all the parameters to send to the API endpoint - - for the get idps operation. - - Typically these are written to a http.Request. -*/ -type GetIdpsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Domains. - - Specifies the domains of the IdP configurations. If specified, returns - IdP configurations matching the domains in the parameters. - */ - Domains []string - - /* Ids. - - Specifies the Ids of the IdP configuration. If specified, returns IdP - configurations of the matching Ids in the IdP configuration. - */ - Ids []int64 - - /* Names. - - Specifies the names of the IdP vendors like Okta. If specified, returns - IdP configurations of the vendors matching the names in the parameters. - */ - Names []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get idps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdpsParams) WithDefaults() *GetIdpsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get idps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdpsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get idps params -func (o *GetIdpsParams) WithTimeout(timeout time.Duration) *GetIdpsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get idps params -func (o *GetIdpsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get idps params -func (o *GetIdpsParams) WithContext(ctx context.Context) *GetIdpsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get idps params -func (o *GetIdpsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get idps params -func (o *GetIdpsParams) WithHTTPClient(client *http.Client) *GetIdpsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get idps params -func (o *GetIdpsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get idps params -func (o *GetIdpsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetIdpsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get idps params -func (o *GetIdpsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomains adds the domains to the get idps params -func (o *GetIdpsParams) WithDomains(domains []string) *GetIdpsParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the get idps params -func (o *GetIdpsParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithIds adds the ids to the get idps params -func (o *GetIdpsParams) WithIds(ids []int64) *GetIdpsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get idps params -func (o *GetIdpsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithNames adds the names to the get idps params -func (o *GetIdpsParams) WithNames(names []string) *GetIdpsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get idps params -func (o *GetIdpsParams) SetNames(names []string) { - o.Names = names -} - -// WithTenantIds adds the tenantIds to the get idps params -func (o *GetIdpsParams) WithTenantIds(tenantIds []string) *GetIdpsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get idps params -func (o *GetIdpsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIdps binds the parameter domains -func (o *GetIdpsParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamGetIdps binds the parameter ids -func (o *GetIdpsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetIdps binds the parameter names -func (o *GetIdpsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetIdps binds the parameter tenantIds -func (o *GetIdpsParams) 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/v1/client/idps/get_idps_responses.go b/v1/client/idps/get_idps_responses.go deleted file mode 100644 index 49853972..00000000 --- a/v1/client/idps/get_idps_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetIdpsReader is a Reader for the GetIdps structure. -type GetIdpsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdpsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdpsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIdpsDefault(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 - } -} - -// NewGetIdpsOK creates a GetIdpsOK with default headers values -func NewGetIdpsOK() *GetIdpsOK { - return &GetIdpsOK{} -} - -/* -GetIdpsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdpsOK struct { - Payload []*models.IdpServiceConfiguration -} - -// IsSuccess returns true when this get idps o k response has a 2xx status code -func (o *GetIdpsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get idps o k response has a 3xx status code -func (o *GetIdpsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get idps o k response has a 4xx status code -func (o *GetIdpsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get idps o k response has a 5xx status code -func (o *GetIdpsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get idps o k response a status code equal to that given -func (o *GetIdpsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get idps o k response -func (o *GetIdpsOK) Code() int { - return 200 -} - -func (o *GetIdpsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps][%d] getIdpsOK %s", 200, payload) -} - -func (o *GetIdpsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps][%d] getIdpsOK %s", 200, payload) -} - -func (o *GetIdpsOK) GetPayload() []*models.IdpServiceConfiguration { - return o.Payload -} - -func (o *GetIdpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdpsDefault creates a GetIdpsDefault with default headers values -func NewGetIdpsDefault(code int) *GetIdpsDefault { - return &GetIdpsDefault{ - _statusCode: code, - } -} - -/* -GetIdpsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIdpsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get idps default response has a 2xx status code -func (o *GetIdpsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get idps default response has a 3xx status code -func (o *GetIdpsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get idps default response has a 4xx status code -func (o *GetIdpsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get idps default response has a 5xx status code -func (o *GetIdpsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get idps default response a status code equal to that given -func (o *GetIdpsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get idps default response -func (o *GetIdpsDefault) Code() int { - return o._statusCode -} - -func (o *GetIdpsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps][%d] GetIdps default %s", o._statusCode, payload) -} - -func (o *GetIdpsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps][%d] GetIdps default %s", o._statusCode, payload) -} - -func (o *GetIdpsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetIdpsDefault) 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/idps/idp_login_parameters.go b/v1/client/idps/idp_login_parameters.go deleted file mode 100644 index 94805ddb..00000000 --- a/v1/client/idps/idp_login_parameters.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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" -) - -// NewIdpLoginParams creates a new IdpLoginParams 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 NewIdpLoginParams() *IdpLoginParams { - return &IdpLoginParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewIdpLoginParamsWithTimeout creates a new IdpLoginParams object -// with the ability to set a timeout on a request. -func NewIdpLoginParamsWithTimeout(timeout time.Duration) *IdpLoginParams { - return &IdpLoginParams{ - timeout: timeout, - } -} - -// NewIdpLoginParamsWithContext creates a new IdpLoginParams object -// with the ability to set a context for a request. -func NewIdpLoginParamsWithContext(ctx context.Context) *IdpLoginParams { - return &IdpLoginParams{ - Context: ctx, - } -} - -// NewIdpLoginParamsWithHTTPClient creates a new IdpLoginParams object -// with the ability to set a custom HTTPClient for a request. -func NewIdpLoginParamsWithHTTPClient(client *http.Client) *IdpLoginParams { - return &IdpLoginParams{ - HTTPClient: client, - } -} - -/* -IdpLoginParams contains all the parameters to send to the API endpoint - - for the idp login operation. - - Typically these are written to a http.Request. -*/ -type IdpLoginParams struct { - - /* TenantID. - - Specifies an optional tenantId for which the SSO login should be done. - If this is not specified, Cluster SSO login is done. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the idp login params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdpLoginParams) WithDefaults() *IdpLoginParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the idp login params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdpLoginParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the idp login params -func (o *IdpLoginParams) WithTimeout(timeout time.Duration) *IdpLoginParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the idp login params -func (o *IdpLoginParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the idp login params -func (o *IdpLoginParams) WithContext(ctx context.Context) *IdpLoginParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the idp login params -func (o *IdpLoginParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the idp login params -func (o *IdpLoginParams) WithHTTPClient(client *http.Client) *IdpLoginParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the idp login params -func (o *IdpLoginParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTenantID adds the tenantID to the idp login params -func (o *IdpLoginParams) WithTenantID(tenantID *string) *IdpLoginParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the idp login params -func (o *IdpLoginParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *IdpLoginParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/idps/idp_login_responses.go b/v1/client/idps/idp_login_responses.go deleted file mode 100644 index e9d0d56b..00000000 --- a/v1/client/idps/idp_login_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// IdpLoginReader is a Reader for the IdpLogin structure. -type IdpLoginReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *IdpLoginReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 302: - result := NewIdpLoginFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewIdpLoginDefault(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 - } -} - -// NewIdpLoginFound creates a IdpLoginFound with default headers values -func NewIdpLoginFound() *IdpLoginFound { - return &IdpLoginFound{} -} - -/* -IdpLoginFound describes a response with status code 302, with default header values. - -No Content -*/ -type IdpLoginFound struct { -} - -// IsSuccess returns true when this idp login found response has a 2xx status code -func (o *IdpLoginFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this idp login found response has a 3xx status code -func (o *IdpLoginFound) IsRedirect() bool { - return true -} - -// IsClientError returns true when this idp login found response has a 4xx status code -func (o *IdpLoginFound) IsClientError() bool { - return false -} - -// IsServerError returns true when this idp login found response has a 5xx status code -func (o *IdpLoginFound) IsServerError() bool { - return false -} - -// IsCode returns true when this idp login found response a status code equal to that given -func (o *IdpLoginFound) IsCode(code int) bool { - return code == 302 -} - -// Code gets the status code for the idp login found response -func (o *IdpLoginFound) Code() int { - return 302 -} - -func (o *IdpLoginFound) Error() string { - return fmt.Sprintf("[GET /public/idps/login][%d] idpLoginFound", 302) -} - -func (o *IdpLoginFound) String() string { - return fmt.Sprintf("[GET /public/idps/login][%d] idpLoginFound", 302) -} - -func (o *IdpLoginFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewIdpLoginDefault creates a IdpLoginDefault with default headers values -func NewIdpLoginDefault(code int) *IdpLoginDefault { - return &IdpLoginDefault{ - _statusCode: code, - } -} - -/* -IdpLoginDefault describes a response with status code -1, with default header values. - -Error -*/ -type IdpLoginDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this idp login default response has a 2xx status code -func (o *IdpLoginDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this idp login default response has a 3xx status code -func (o *IdpLoginDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this idp login default response has a 4xx status code -func (o *IdpLoginDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this idp login default response has a 5xx status code -func (o *IdpLoginDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this idp login default response a status code equal to that given -func (o *IdpLoginDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the idp login default response -func (o *IdpLoginDefault) Code() int { - return o._statusCode -} - -func (o *IdpLoginDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps/login][%d] IdpLogin default %s", o._statusCode, payload) -} - -func (o *IdpLoginDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/idps/login][%d] IdpLogin default %s", o._statusCode, payload) -} - -func (o *IdpLoginDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *IdpLoginDefault) 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/idps/idps_client.go b/v1/client/idps/idps_client.go deleted file mode 100644 index 7f114384..00000000 --- a/v1/client/idps/idps_client.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new idps API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new idps API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new idps API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for idps API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddIdpDirectoryPrincipals(params *AddIdpDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddIdpDirectoryPrincipalsCreated, error) - - CreateIdp(params *CreateIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdpCreated, error) - - DeleteIdp(params *DeleteIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdpNoContent, error) - - GetIdps(params *GetIdpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdpsOK, error) - - IdpLogin(params *IdpLoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error - - UpdateIdp(params *UpdateIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdpOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - AddIdpDirectoryPrincipals adds multiple groups or users on the cohesity cluster for the specified idp principals in addition assign cohesity roles to the users or groups to define their cohesity privileges - - After a group or user has been added to a Cohesity Cluster, - -the referenced Idp principal can be used by the Cohesity Cluster. -In addition, this operation maps Cohesity roles with a group or user and -this mapping defines the privileges allowed on the Cohesity Cluster for the -group or user. -For example if an 'management' group is created on the Cohesity Cluster -for the Idp 'management' principal group and is associated with the -Cohesity 'View' role, all users in the referenced Idp -'management' principal group can log in to the Cohesity Dashboard but -will only have view-only privileges. These users cannot create new -Protection Jobs, Policies, Views, etc. - -NOTE: Local Cohesity users and groups cannot be created by this operation. -Local Cohesity users or groups do not have an associated Idp -principals and are created directly in the default LOCAL domain. -*/ -func (a *Client) AddIdpDirectoryPrincipals(params *AddIdpDirectoryPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddIdpDirectoryPrincipalsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddIdpDirectoryPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "AddIdpDirectoryPrincipals", - Method: "POST", - PathPattern: "/public/idps/principals", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddIdpDirectoryPrincipalsReader{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.(*AddIdpDirectoryPrincipalsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddIdpDirectoryPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateIdp creates an Id p configuration - -Returns the newly created IdP configuration. -*/ -func (a *Client) CreateIdp(params *CreateIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdpCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateIdpParams() - } - op := &runtime.ClientOperation{ - ID: "CreateIdp", - Method: "POST", - PathPattern: "/public/idps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateIdpReader{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.(*CreateIdpCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateIdpDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteIdp deletes one Id p configuration - -Returns Success if the IdP configuration is deleted. -*/ -func (a *Client) DeleteIdp(params *DeleteIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdpNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteIdpParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteIdp", - Method: "DELETE", - PathPattern: "/public/idps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteIdpReader{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.(*DeleteIdpNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteIdpDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetIdps lists the Id ps configured on the cluster - - Returns the Idps configured on the Cohesity Cluster corresponding to the filter - -parameters. If no filter is given, all Idp configurations are returned. -*/ -func (a *Client) GetIdps(params *GetIdpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdpsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdpsParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdps", - Method: "GET", - PathPattern: "/public/idps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIdpsReader{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.(*GetIdpsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIdpsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -IdpLogin logins to cohesity cluster using an Id p - -Redirects the client to the IdP site with the URI to login. -*/ -func (a *Client) IdpLogin(params *IdpLoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error { - // TODO: Validate the params before sending - if params == nil { - params = NewIdpLoginParams() - } - op := &runtime.ClientOperation{ - ID: "IdpLogin", - Method: "GET", - PathPattern: "/public/idps/login", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &IdpLoginReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - _, err := a.transport.Submit(op) - if err != nil { - return err - } - return nil -} - -/* -UpdateIdp updates an Id p configuration - -Returns the updated IdP configuration. -*/ -func (a *Client) UpdateIdp(params *UpdateIdpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdpOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIdpParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIdp", - Method: "PUT", - PathPattern: "/public/idps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIdpReader{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.(*UpdateIdpOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIdpDefault) - 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/idps/update_idp_parameters.go b/v1/client/idps/update_idp_parameters.go deleted file mode 100644 index 3844d204..00000000 --- a/v1/client/idps/update_idp_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateIdpParams creates a new UpdateIdpParams 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 NewUpdateIdpParams() *UpdateIdpParams { - return &UpdateIdpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIdpParamsWithTimeout creates a new UpdateIdpParams object -// with the ability to set a timeout on a request. -func NewUpdateIdpParamsWithTimeout(timeout time.Duration) *UpdateIdpParams { - return &UpdateIdpParams{ - timeout: timeout, - } -} - -// NewUpdateIdpParamsWithContext creates a new UpdateIdpParams object -// with the ability to set a context for a request. -func NewUpdateIdpParamsWithContext(ctx context.Context) *UpdateIdpParams { - return &UpdateIdpParams{ - Context: ctx, - } -} - -// NewUpdateIdpParamsWithHTTPClient creates a new UpdateIdpParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIdpParamsWithHTTPClient(client *http.Client) *UpdateIdpParams { - return &UpdateIdpParams{ - HTTPClient: client, - } -} - -/* -UpdateIdpParams contains all the parameters to send to the API endpoint - - for the update idp operation. - - Typically these are written to a http.Request. -*/ -type UpdateIdpParams struct { - - /* Body. - - Request to update an Idp Configuration. - */ - Body *models.UpdateIdpConfigurationRequest - - /* ID. - - Specifies the Id assigned for the IdP Service by the Cluster. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdpParams) WithDefaults() *UpdateIdpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update idp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update idp params -func (o *UpdateIdpParams) WithTimeout(timeout time.Duration) *UpdateIdpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update idp params -func (o *UpdateIdpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update idp params -func (o *UpdateIdpParams) WithContext(ctx context.Context) *UpdateIdpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update idp params -func (o *UpdateIdpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update idp params -func (o *UpdateIdpParams) WithHTTPClient(client *http.Client) *UpdateIdpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update idp params -func (o *UpdateIdpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update idp params -func (o *UpdateIdpParams) WithBody(body *models.UpdateIdpConfigurationRequest) *UpdateIdpParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update idp params -func (o *UpdateIdpParams) SetBody(body *models.UpdateIdpConfigurationRequest) { - o.Body = body -} - -// WithID adds the id to the update idp params -func (o *UpdateIdpParams) WithID(id int64) *UpdateIdpParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update idp params -func (o *UpdateIdpParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIdpParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/idps/update_idp_responses.go b/v1/client/idps/update_idp_responses.go deleted file mode 100644 index 577586cc..00000000 --- a/v1/client/idps/update_idp_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package idps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateIdpReader is a Reader for the UpdateIdp structure. -type UpdateIdpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIdpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIdpOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIdpDefault(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 - } -} - -// NewUpdateIdpOK creates a UpdateIdpOK with default headers values -func NewUpdateIdpOK() *UpdateIdpOK { - return &UpdateIdpOK{} -} - -/* -UpdateIdpOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIdpOK struct { - Payload *models.IdpServiceConfiguration -} - -// IsSuccess returns true when this update idp o k response has a 2xx status code -func (o *UpdateIdpOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update idp o k response has a 3xx status code -func (o *UpdateIdpOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update idp o k response has a 4xx status code -func (o *UpdateIdpOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update idp o k response has a 5xx status code -func (o *UpdateIdpOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update idp o k response a status code equal to that given -func (o *UpdateIdpOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update idp o k response -func (o *UpdateIdpOK) Code() int { - return 200 -} - -func (o *UpdateIdpOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/idps/{id}][%d] updateIdpOK %s", 200, payload) -} - -func (o *UpdateIdpOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/idps/{id}][%d] updateIdpOK %s", 200, payload) -} - -func (o *UpdateIdpOK) GetPayload() *models.IdpServiceConfiguration { - return o.Payload -} - -func (o *UpdateIdpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdpServiceConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIdpDefault creates a UpdateIdpDefault with default headers values -func NewUpdateIdpDefault(code int) *UpdateIdpDefault { - return &UpdateIdpDefault{ - _statusCode: code, - } -} - -/* -UpdateIdpDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIdpDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update idp default response has a 2xx status code -func (o *UpdateIdpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update idp default response has a 3xx status code -func (o *UpdateIdpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update idp default response has a 4xx status code -func (o *UpdateIdpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update idp default response has a 5xx status code -func (o *UpdateIdpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update idp default response a status code equal to that given -func (o *UpdateIdpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update idp default response -func (o *UpdateIdpDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIdpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/idps/{id}][%d] UpdateIdp default %s", o._statusCode, payload) -} - -func (o *UpdateIdpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/idps/{id}][%d] UpdateIdp default %s", o._statusCode, payload) -} - -func (o *UpdateIdpDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateIdpDefault) 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/interface_group/create_interface_group_parameters.go b/v1/client/interface_group/create_interface_group_parameters.go deleted file mode 100644 index 17c6b143..00000000 --- a/v1/client/interface_group/create_interface_group_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateInterfaceGroupParams creates a new CreateInterfaceGroupParams 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 NewCreateInterfaceGroupParams() *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInterfaceGroupParamsWithTimeout creates a new CreateInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewCreateInterfaceGroupParamsWithTimeout(timeout time.Duration) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewCreateInterfaceGroupParamsWithContext creates a new CreateInterfaceGroupParams object -// with the ability to set a context for a request. -func NewCreateInterfaceGroupParamsWithContext(ctx context.Context) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - Context: ctx, - } -} - -// NewCreateInterfaceGroupParamsWithHTTPClient creates a new CreateInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInterfaceGroupParamsWithHTTPClient(client *http.Client) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -CreateInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the create interface group operation. - - Typically these are written to a http.Request. -*/ -type CreateInterfaceGroupParams struct { - - // Body. - Body *models.InterfaceGroup - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInterfaceGroupParams) WithDefaults() *CreateInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create interface group params -func (o *CreateInterfaceGroupParams) WithTimeout(timeout time.Duration) *CreateInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create interface group params -func (o *CreateInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create interface group params -func (o *CreateInterfaceGroupParams) WithContext(ctx context.Context) *CreateInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create interface group params -func (o *CreateInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create interface group params -func (o *CreateInterfaceGroupParams) WithHTTPClient(client *http.Client) *CreateInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create interface group params -func (o *CreateInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create interface group params -func (o *CreateInterfaceGroupParams) WithBody(body *models.InterfaceGroup) *CreateInterfaceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create interface group params -func (o *CreateInterfaceGroupParams) SetBody(body *models.InterfaceGroup) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInterfaceGroupParams) 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/interface_group/create_interface_group_responses.go b/v1/client/interface_group/create_interface_group_responses.go deleted file mode 100644 index 1b9e870f..00000000 --- a/v1/client/interface_group/create_interface_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateInterfaceGroupReader is a Reader for the CreateInterfaceGroup structure. -type CreateInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInterfaceGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateInterfaceGroupDefault(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 - } -} - -// NewCreateInterfaceGroupCreated creates a CreateInterfaceGroupCreated with default headers values -func NewCreateInterfaceGroupCreated() *CreateInterfaceGroupCreated { - return &CreateInterfaceGroupCreated{} -} - -/* -CreateInterfaceGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateInterfaceGroupCreated struct { - Payload *models.InterfaceGroup -} - -// IsSuccess returns true when this create interface group created response has a 2xx status code -func (o *CreateInterfaceGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create interface group created response has a 3xx status code -func (o *CreateInterfaceGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create interface group created response has a 4xx status code -func (o *CreateInterfaceGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create interface group created response has a 5xx status code -func (o *CreateInterfaceGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create interface group created response a status code equal to that given -func (o *CreateInterfaceGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create interface group created response -func (o *CreateInterfaceGroupCreated) Code() int { - return 201 -} - -func (o *CreateInterfaceGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/interfaceGroups][%d] createInterfaceGroupCreated %s", 201, payload) -} - -func (o *CreateInterfaceGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/interfaceGroups][%d] createInterfaceGroupCreated %s", 201, payload) -} - -func (o *CreateInterfaceGroupCreated) GetPayload() *models.InterfaceGroup { - return o.Payload -} - -func (o *CreateInterfaceGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInterfaceGroupDefault creates a CreateInterfaceGroupDefault with default headers values -func NewCreateInterfaceGroupDefault(code int) *CreateInterfaceGroupDefault { - return &CreateInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -CreateInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateInterfaceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create interface group default response has a 2xx status code -func (o *CreateInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create interface group default response has a 3xx status code -func (o *CreateInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create interface group default response has a 4xx status code -func (o *CreateInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create interface group default response has a 5xx status code -func (o *CreateInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create interface group default response a status code equal to that given -func (o *CreateInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create interface group default response -func (o *CreateInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/interfaceGroups][%d] CreateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *CreateInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/interfaceGroups][%d] CreateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *CreateInterfaceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateInterfaceGroupDefault) 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/interface_group/delete_interface_group_parameters.go b/v1/client/interface_group/delete_interface_group_parameters.go deleted file mode 100644 index 7d2ca036..00000000 --- a/v1/client/interface_group/delete_interface_group_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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" -) - -// NewDeleteInterfaceGroupParams creates a new DeleteInterfaceGroupParams 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 NewDeleteInterfaceGroupParams() *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInterfaceGroupParamsWithTimeout creates a new DeleteInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteInterfaceGroupParamsWithTimeout(timeout time.Duration) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewDeleteInterfaceGroupParamsWithContext creates a new DeleteInterfaceGroupParams object -// with the ability to set a context for a request. -func NewDeleteInterfaceGroupParamsWithContext(ctx context.Context) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - Context: ctx, - } -} - -// NewDeleteInterfaceGroupParamsWithHTTPClient creates a new DeleteInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInterfaceGroupParamsWithHTTPClient(client *http.Client) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the delete interface group operation. - - Typically these are written to a http.Request. -*/ -type DeleteInterfaceGroupParams struct { - - /* Name. - - Request to delete one interface group. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInterfaceGroupParams) WithDefaults() *DeleteInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithTimeout(timeout time.Duration) *DeleteInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithContext(ctx context.Context) *DeleteInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithHTTPClient(client *http.Client) *DeleteInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithName(name string) *DeleteInterfaceGroupParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInterfaceGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/interface_group/delete_interface_group_responses.go b/v1/client/interface_group/delete_interface_group_responses.go deleted file mode 100644 index 598d07c0..00000000 --- a/v1/client/interface_group/delete_interface_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteInterfaceGroupReader is a Reader for the DeleteInterfaceGroup structure. -type DeleteInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteInterfaceGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteInterfaceGroupDefault(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 - } -} - -// NewDeleteInterfaceGroupNoContent creates a DeleteInterfaceGroupNoContent with default headers values -func NewDeleteInterfaceGroupNoContent() *DeleteInterfaceGroupNoContent { - return &DeleteInterfaceGroupNoContent{} -} - -/* -DeleteInterfaceGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteInterfaceGroupNoContent struct { -} - -// IsSuccess returns true when this delete interface group no content response has a 2xx status code -func (o *DeleteInterfaceGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete interface group no content response has a 3xx status code -func (o *DeleteInterfaceGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete interface group no content response has a 4xx status code -func (o *DeleteInterfaceGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete interface group no content response has a 5xx status code -func (o *DeleteInterfaceGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete interface group no content response a status code equal to that given -func (o *DeleteInterfaceGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete interface group no content response -func (o *DeleteInterfaceGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteInterfaceGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/interfaceGroups/{name}][%d] deleteInterfaceGroupNoContent", 204) -} - -func (o *DeleteInterfaceGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /public/interfaceGroups/{name}][%d] deleteInterfaceGroupNoContent", 204) -} - -func (o *DeleteInterfaceGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteInterfaceGroupDefault creates a DeleteInterfaceGroupDefault with default headers values -func NewDeleteInterfaceGroupDefault(code int) *DeleteInterfaceGroupDefault { - return &DeleteInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteInterfaceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete interface group default response has a 2xx status code -func (o *DeleteInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete interface group default response has a 3xx status code -func (o *DeleteInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete interface group default response has a 4xx status code -func (o *DeleteInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete interface group default response has a 5xx status code -func (o *DeleteInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete interface group default response a status code equal to that given -func (o *DeleteInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete interface group default response -func (o *DeleteInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/interfaceGroups/{name}][%d] DeleteInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/interfaceGroups/{name}][%d] DeleteInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteInterfaceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteInterfaceGroupDefault) 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/interface_group/get_interface_groups_parameters.go b/v1/client/interface_group/get_interface_groups_parameters.go deleted file mode 100644 index 83aadaa9..00000000 --- a/v1/client/interface_group/get_interface_groups_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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" -) - -// NewGetInterfaceGroupsParams creates a new GetInterfaceGroupsParams 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 NewGetInterfaceGroupsParams() *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInterfaceGroupsParamsWithTimeout creates a new GetInterfaceGroupsParams object -// with the ability to set a timeout on a request. -func NewGetInterfaceGroupsParamsWithTimeout(timeout time.Duration) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - timeout: timeout, - } -} - -// NewGetInterfaceGroupsParamsWithContext creates a new GetInterfaceGroupsParams object -// with the ability to set a context for a request. -func NewGetInterfaceGroupsParamsWithContext(ctx context.Context) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - Context: ctx, - } -} - -// NewGetInterfaceGroupsParamsWithHTTPClient creates a new GetInterfaceGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInterfaceGroupsParamsWithHTTPClient(client *http.Client) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - HTTPClient: client, - } -} - -/* -GetInterfaceGroupsParams contains all the parameters to send to the API endpoint - - for the get interface groups operation. - - Typically these are written to a http.Request. -*/ -type GetInterfaceGroupsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get interface groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfaceGroupsParams) WithDefaults() *GetInterfaceGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get interface groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfaceGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get interface groups params -func (o *GetInterfaceGroupsParams) WithTimeout(timeout time.Duration) *GetInterfaceGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get interface groups params -func (o *GetInterfaceGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get interface groups params -func (o *GetInterfaceGroupsParams) WithContext(ctx context.Context) *GetInterfaceGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get interface groups params -func (o *GetInterfaceGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get interface groups params -func (o *GetInterfaceGroupsParams) WithHTTPClient(client *http.Client) *GetInterfaceGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get interface groups params -func (o *GetInterfaceGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInterfaceGroupsParams) 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/interface_group/get_interface_groups_responses.go b/v1/client/interface_group/get_interface_groups_responses.go deleted file mode 100644 index 7715c240..00000000 --- a/v1/client/interface_group/get_interface_groups_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetInterfaceGroupsReader is a Reader for the GetInterfaceGroups structure. -type GetInterfaceGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInterfaceGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInterfaceGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetInterfaceGroupsDefault(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 - } -} - -// NewGetInterfaceGroupsOK creates a GetInterfaceGroupsOK with default headers values -func NewGetInterfaceGroupsOK() *GetInterfaceGroupsOK { - return &GetInterfaceGroupsOK{} -} - -/* -GetInterfaceGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetInterfaceGroupsOK struct { - Payload []*models.InterfaceGroup -} - -// IsSuccess returns true when this get interface groups o k response has a 2xx status code -func (o *GetInterfaceGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get interface groups o k response has a 3xx status code -func (o *GetInterfaceGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get interface groups o k response has a 4xx status code -func (o *GetInterfaceGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get interface groups o k response has a 5xx status code -func (o *GetInterfaceGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get interface groups o k response a status code equal to that given -func (o *GetInterfaceGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get interface groups o k response -func (o *GetInterfaceGroupsOK) Code() int { - return 200 -} - -func (o *GetInterfaceGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interfaceGroups][%d] getInterfaceGroupsOK %s", 200, payload) -} - -func (o *GetInterfaceGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interfaceGroups][%d] getInterfaceGroupsOK %s", 200, payload) -} - -func (o *GetInterfaceGroupsOK) GetPayload() []*models.InterfaceGroup { - return o.Payload -} - -func (o *GetInterfaceGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInterfaceGroupsDefault creates a GetInterfaceGroupsDefault with default headers values -func NewGetInterfaceGroupsDefault(code int) *GetInterfaceGroupsDefault { - return &GetInterfaceGroupsDefault{ - _statusCode: code, - } -} - -/* -GetInterfaceGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetInterfaceGroupsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get interface groups default response has a 2xx status code -func (o *GetInterfaceGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get interface groups default response has a 3xx status code -func (o *GetInterfaceGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get interface groups default response has a 4xx status code -func (o *GetInterfaceGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get interface groups default response has a 5xx status code -func (o *GetInterfaceGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get interface groups default response a status code equal to that given -func (o *GetInterfaceGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get interface groups default response -func (o *GetInterfaceGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetInterfaceGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interfaceGroups][%d] GetInterfaceGroups default %s", o._statusCode, payload) -} - -func (o *GetInterfaceGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interfaceGroups][%d] GetInterfaceGroups default %s", o._statusCode, payload) -} - -func (o *GetInterfaceGroupsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetInterfaceGroupsDefault) 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/interface_group/interface_group_client.go b/v1/client/interface_group/interface_group_client.go deleted file mode 100644 index ab2cef2e..00000000 --- a/v1/client/interface_group/interface_group_client.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new interface group API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new interface group API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new interface group API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for interface group API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateInterfaceGroup(params *CreateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInterfaceGroupCreated, error) - - DeleteInterfaceGroup(params *DeleteInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInterfaceGroupNoContent, error) - - GetInterfaceGroups(params *GetInterfaceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfaceGroupsOK, error) - - UpdateInterfaceGroup(params *UpdateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceGroupOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateInterfaceGroup creates an interface group on the cohesity cluster - -Returns the create status upon completion. -*/ -func (a *Client) CreateInterfaceGroup(params *CreateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInterfaceGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateInterfaceGroup", - Method: "POST", - PathPattern: "/public/interfaceGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateInterfaceGroupReader{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.(*CreateInterfaceGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateInterfaceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteInterfaceGroup deletes the specified interface group from the cohesity cluster - -Returns the delete status upon completion. -*/ -func (a *Client) DeleteInterfaceGroup(params *DeleteInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInterfaceGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteInterfaceGroup", - Method: "DELETE", - PathPattern: "/public/interfaceGroups/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteInterfaceGroupReader{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.(*DeleteInterfaceGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteInterfaceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetInterfaceGroups lists the interface groups for the cohesity cluster - -Returns the interface groups for the Cohesity Cluster. -*/ -func (a *Client) GetInterfaceGroups(params *GetInterfaceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfaceGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetInterfaceGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetInterfaceGroups", - Method: "GET", - PathPattern: "/public/interfaceGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetInterfaceGroupsReader{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.(*GetInterfaceGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetInterfaceGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInterfaceGroup updates an interface group on the cohesity cluster - -Returns the update status upon completion. -*/ -func (a *Client) UpdateInterfaceGroup(params *UpdateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInterfaceGroup", - Method: "PUT", - PathPattern: "/public/interfaceGroups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInterfaceGroupReader{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.(*UpdateInterfaceGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInterfaceGroupDefault) - 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/interface_group/update_interface_group_parameters.go b/v1/client/interface_group/update_interface_group_parameters.go deleted file mode 100644 index 40a265e9..00000000 --- a/v1/client/interface_group/update_interface_group_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateInterfaceGroupParams creates a new UpdateInterfaceGroupParams 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 NewUpdateInterfaceGroupParams() *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInterfaceGroupParamsWithTimeout creates a new UpdateInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateInterfaceGroupParamsWithTimeout(timeout time.Duration) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewUpdateInterfaceGroupParamsWithContext creates a new UpdateInterfaceGroupParams object -// with the ability to set a context for a request. -func NewUpdateInterfaceGroupParamsWithContext(ctx context.Context) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - Context: ctx, - } -} - -// NewUpdateInterfaceGroupParamsWithHTTPClient creates a new UpdateInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInterfaceGroupParamsWithHTTPClient(client *http.Client) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the update interface group operation. - - Typically these are written to a http.Request. -*/ -type UpdateInterfaceGroupParams struct { - - // Body. - Body *models.InterfaceGroup - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceGroupParams) WithDefaults() *UpdateInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update interface group params -func (o *UpdateInterfaceGroupParams) WithTimeout(timeout time.Duration) *UpdateInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update interface group params -func (o *UpdateInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update interface group params -func (o *UpdateInterfaceGroupParams) WithContext(ctx context.Context) *UpdateInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update interface group params -func (o *UpdateInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update interface group params -func (o *UpdateInterfaceGroupParams) WithHTTPClient(client *http.Client) *UpdateInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update interface group params -func (o *UpdateInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update interface group params -func (o *UpdateInterfaceGroupParams) WithBody(body *models.InterfaceGroup) *UpdateInterfaceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update interface group params -func (o *UpdateInterfaceGroupParams) SetBody(body *models.InterfaceGroup) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInterfaceGroupParams) 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/interface_group/update_interface_group_responses.go b/v1/client/interface_group/update_interface_group_responses.go deleted file mode 100644 index bfe0a397..00000000 --- a/v1/client/interface_group/update_interface_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateInterfaceGroupReader is a Reader for the UpdateInterfaceGroup structure. -type UpdateInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInterfaceGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInterfaceGroupDefault(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 - } -} - -// NewUpdateInterfaceGroupOK creates a UpdateInterfaceGroupOK with default headers values -func NewUpdateInterfaceGroupOK() *UpdateInterfaceGroupOK { - return &UpdateInterfaceGroupOK{} -} - -/* -UpdateInterfaceGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateInterfaceGroupOK struct { - Payload *models.InterfaceGroup -} - -// IsSuccess returns true when this update interface group o k response has a 2xx status code -func (o *UpdateInterfaceGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update interface group o k response has a 3xx status code -func (o *UpdateInterfaceGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update interface group o k response has a 4xx status code -func (o *UpdateInterfaceGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update interface group o k response has a 5xx status code -func (o *UpdateInterfaceGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update interface group o k response a status code equal to that given -func (o *UpdateInterfaceGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update interface group o k response -func (o *UpdateInterfaceGroupOK) Code() int { - return 200 -} - -func (o *UpdateInterfaceGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interfaceGroups][%d] updateInterfaceGroupOK %s", 200, payload) -} - -func (o *UpdateInterfaceGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interfaceGroups][%d] updateInterfaceGroupOK %s", 200, payload) -} - -func (o *UpdateInterfaceGroupOK) GetPayload() *models.InterfaceGroup { - return o.Payload -} - -func (o *UpdateInterfaceGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInterfaceGroupDefault creates a UpdateInterfaceGroupDefault with default headers values -func NewUpdateInterfaceGroupDefault(code int) *UpdateInterfaceGroupDefault { - return &UpdateInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInterfaceGroupDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update interface group default response has a 2xx status code -func (o *UpdateInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update interface group default response has a 3xx status code -func (o *UpdateInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update interface group default response has a 4xx status code -func (o *UpdateInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update interface group default response has a 5xx status code -func (o *UpdateInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update interface group default response a status code equal to that given -func (o *UpdateInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update interface group default response -func (o *UpdateInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interfaceGroups][%d] UpdateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interfaceGroups][%d] UpdateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceGroupDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateInterfaceGroupDefault) 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/interface_operations/interface_operations_client.go b/v1/client/interface_operations/interface_operations_client.go deleted file mode 100644 index 8a97cf24..00000000 --- a/v1/client/interface_operations/interface_operations_client.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new interface operations API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new interface operations API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new interface operations API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for interface operations API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ListInterface(params *ListInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListInterfaceOK, error) - - UpdateInterface(params *UpdateInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ListInterface shows network interfaces -*/ -func (a *Client) ListInterface(params *ListInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListInterfaceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListInterfaceParams() - } - op := &runtime.ClientOperation{ - ID: "ListInterface", - Method: "GET", - PathPattern: "/public/interface", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListInterfaceReader{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.(*ListInterfaceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListInterfaceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInterface updates an interface - -Returns the update status upon completion. -*/ -func (a *Client) UpdateInterface(params *UpdateInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInterfaceParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInterface", - Method: "PUT", - PathPattern: "/public/interface", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInterfaceReader{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.(*UpdateInterfaceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInterfaceDefault) - 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/interface_operations/list_interface_parameters.go b/v1/client/interface_operations/list_interface_parameters.go deleted file mode 100644 index f4e4132e..00000000 --- a/v1/client/interface_operations/list_interface_parameters.go +++ /dev/null @@ -1,370 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// 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/go-openapi/swag" -) - -// NewListInterfaceParams creates a new ListInterfaceParams 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 NewListInterfaceParams() *ListInterfaceParams { - return &ListInterfaceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListInterfaceParamsWithTimeout creates a new ListInterfaceParams object -// with the ability to set a timeout on a request. -func NewListInterfaceParamsWithTimeout(timeout time.Duration) *ListInterfaceParams { - return &ListInterfaceParams{ - timeout: timeout, - } -} - -// NewListInterfaceParamsWithContext creates a new ListInterfaceParams object -// with the ability to set a context for a request. -func NewListInterfaceParamsWithContext(ctx context.Context) *ListInterfaceParams { - return &ListInterfaceParams{ - Context: ctx, - } -} - -// NewListInterfaceParamsWithHTTPClient creates a new ListInterfaceParams object -// with the ability to set a custom HTTPClient for a request. -func NewListInterfaceParamsWithHTTPClient(client *http.Client) *ListInterfaceParams { - return &ListInterfaceParams{ - HTTPClient: client, - } -} - -/* -ListInterfaceParams contains all the parameters to send to the API endpoint - - for the list interface operation. - - Typically these are written to a http.Request. -*/ -type ListInterfaceParams struct { - - /* BondInterfaceOnly. - - Specifies if only show bond interface info. - */ - BondInterfaceOnly *bool - - /* Cache. - - Specifies if interface is cached info. - */ - Cache *bool - - /* IfaceGroupAssignedOnly. - - Specifies if only show interface group assigned interface info. - */ - IfaceGroupAssignedOnly *bool - - /* IncludeBondSlaveDetails. - - Specifies if include bond secondary detailed info. - */ - IncludeBondSlaveDetails *bool - - /* IncludeStats. - - Specifies if include stats. - */ - IncludeStats *bool - - /* IncludeUplinkSwitchInfo. - - Specifies if include uplink switch info. - */ - IncludeUplinkSwitchInfo *bool - - /* NodeID. - - Specifies the id of the ndde. - - Format: int64 - */ - NodeID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListInterfaceParams) WithDefaults() *ListInterfaceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListInterfaceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list interface params -func (o *ListInterfaceParams) WithTimeout(timeout time.Duration) *ListInterfaceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list interface params -func (o *ListInterfaceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list interface params -func (o *ListInterfaceParams) WithContext(ctx context.Context) *ListInterfaceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list interface params -func (o *ListInterfaceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list interface params -func (o *ListInterfaceParams) WithHTTPClient(client *http.Client) *ListInterfaceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list interface params -func (o *ListInterfaceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBondInterfaceOnly adds the bondInterfaceOnly to the list interface params -func (o *ListInterfaceParams) WithBondInterfaceOnly(bondInterfaceOnly *bool) *ListInterfaceParams { - o.SetBondInterfaceOnly(bondInterfaceOnly) - return o -} - -// SetBondInterfaceOnly adds the bondInterfaceOnly to the list interface params -func (o *ListInterfaceParams) SetBondInterfaceOnly(bondInterfaceOnly *bool) { - o.BondInterfaceOnly = bondInterfaceOnly -} - -// WithCache adds the cache to the list interface params -func (o *ListInterfaceParams) WithCache(cache *bool) *ListInterfaceParams { - o.SetCache(cache) - return o -} - -// SetCache adds the cache to the list interface params -func (o *ListInterfaceParams) SetCache(cache *bool) { - o.Cache = cache -} - -// WithIfaceGroupAssignedOnly adds the ifaceGroupAssignedOnly to the list interface params -func (o *ListInterfaceParams) WithIfaceGroupAssignedOnly(ifaceGroupAssignedOnly *bool) *ListInterfaceParams { - o.SetIfaceGroupAssignedOnly(ifaceGroupAssignedOnly) - return o -} - -// SetIfaceGroupAssignedOnly adds the ifaceGroupAssignedOnly to the list interface params -func (o *ListInterfaceParams) SetIfaceGroupAssignedOnly(ifaceGroupAssignedOnly *bool) { - o.IfaceGroupAssignedOnly = ifaceGroupAssignedOnly -} - -// WithIncludeBondSlaveDetails adds the includeBondSlaveDetails to the list interface params -func (o *ListInterfaceParams) WithIncludeBondSlaveDetails(includeBondSlaveDetails *bool) *ListInterfaceParams { - o.SetIncludeBondSlaveDetails(includeBondSlaveDetails) - return o -} - -// SetIncludeBondSlaveDetails adds the includeBondSlaveDetails to the list interface params -func (o *ListInterfaceParams) SetIncludeBondSlaveDetails(includeBondSlaveDetails *bool) { - o.IncludeBondSlaveDetails = includeBondSlaveDetails -} - -// WithIncludeStats adds the includeStats to the list interface params -func (o *ListInterfaceParams) WithIncludeStats(includeStats *bool) *ListInterfaceParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the list interface params -func (o *ListInterfaceParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeUplinkSwitchInfo adds the includeUplinkSwitchInfo to the list interface params -func (o *ListInterfaceParams) WithIncludeUplinkSwitchInfo(includeUplinkSwitchInfo *bool) *ListInterfaceParams { - o.SetIncludeUplinkSwitchInfo(includeUplinkSwitchInfo) - return o -} - -// SetIncludeUplinkSwitchInfo adds the includeUplinkSwitchInfo to the list interface params -func (o *ListInterfaceParams) SetIncludeUplinkSwitchInfo(includeUplinkSwitchInfo *bool) { - o.IncludeUplinkSwitchInfo = includeUplinkSwitchInfo -} - -// WithNodeID adds the nodeID to the list interface params -func (o *ListInterfaceParams) WithNodeID(nodeID *int64) *ListInterfaceParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the list interface params -func (o *ListInterfaceParams) SetNodeID(nodeID *int64) { - o.NodeID = nodeID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListInterfaceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.BondInterfaceOnly != nil { - - // query param bondInterfaceOnly - var qrBondInterfaceOnly bool - - if o.BondInterfaceOnly != nil { - qrBondInterfaceOnly = *o.BondInterfaceOnly - } - qBondInterfaceOnly := swag.FormatBool(qrBondInterfaceOnly) - if qBondInterfaceOnly != "" { - - if err := r.SetQueryParam("bondInterfaceOnly", qBondInterfaceOnly); err != nil { - return err - } - } - } - - if o.Cache != nil { - - // query param cache - var qrCache bool - - if o.Cache != nil { - qrCache = *o.Cache - } - qCache := swag.FormatBool(qrCache) - if qCache != "" { - - if err := r.SetQueryParam("cache", qCache); err != nil { - return err - } - } - } - - if o.IfaceGroupAssignedOnly != nil { - - // query param ifaceGroupAssignedOnly - var qrIfaceGroupAssignedOnly bool - - if o.IfaceGroupAssignedOnly != nil { - qrIfaceGroupAssignedOnly = *o.IfaceGroupAssignedOnly - } - qIfaceGroupAssignedOnly := swag.FormatBool(qrIfaceGroupAssignedOnly) - if qIfaceGroupAssignedOnly != "" { - - if err := r.SetQueryParam("ifaceGroupAssignedOnly", qIfaceGroupAssignedOnly); err != nil { - return err - } - } - } - - if o.IncludeBondSlaveDetails != nil { - - // query param includeBondSlaveDetails - var qrIncludeBondSlaveDetails bool - - if o.IncludeBondSlaveDetails != nil { - qrIncludeBondSlaveDetails = *o.IncludeBondSlaveDetails - } - qIncludeBondSlaveDetails := swag.FormatBool(qrIncludeBondSlaveDetails) - if qIncludeBondSlaveDetails != "" { - - if err := r.SetQueryParam("includeBondSlaveDetails", qIncludeBondSlaveDetails); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); err != nil { - return err - } - } - } - - if o.IncludeUplinkSwitchInfo != nil { - - // query param includeUplinkSwitchInfo - var qrIncludeUplinkSwitchInfo bool - - if o.IncludeUplinkSwitchInfo != nil { - qrIncludeUplinkSwitchInfo = *o.IncludeUplinkSwitchInfo - } - qIncludeUplinkSwitchInfo := swag.FormatBool(qrIncludeUplinkSwitchInfo) - if qIncludeUplinkSwitchInfo != "" { - - if err := r.SetQueryParam("includeUplinkSwitchInfo", qIncludeUplinkSwitchInfo); err != nil { - return err - } - } - } - - if o.NodeID != nil { - - // query param nodeId - var qrNodeID int64 - - if o.NodeID != nil { - qrNodeID = *o.NodeID - } - qNodeID := swag.FormatInt64(qrNodeID) - if qNodeID != "" { - - if err := r.SetQueryParam("nodeId", qNodeID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/interface_operations/list_interface_responses.go b/v1/client/interface_operations/list_interface_responses.go deleted file mode 100644 index cc2b2a4f..00000000 --- a/v1/client/interface_operations/list_interface_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListInterfaceReader is a Reader for the ListInterface structure. -type ListInterfaceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListInterfaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListInterfaceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListInterfaceDefault(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 - } -} - -// NewListInterfaceOK creates a ListInterfaceOK with default headers values -func NewListInterfaceOK() *ListInterfaceOK { - return &ListInterfaceOK{} -} - -/* -ListInterfaceOK describes a response with status code 200, with default header values. - -Success -*/ -type ListInterfaceOK struct { - Payload []*models.NodeNetworkInterfaces -} - -// IsSuccess returns true when this list interface o k response has a 2xx status code -func (o *ListInterfaceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list interface o k response has a 3xx status code -func (o *ListInterfaceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list interface o k response has a 4xx status code -func (o *ListInterfaceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list interface o k response has a 5xx status code -func (o *ListInterfaceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list interface o k response a status code equal to that given -func (o *ListInterfaceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list interface o k response -func (o *ListInterfaceOK) Code() int { - return 200 -} - -func (o *ListInterfaceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interface][%d] listInterfaceOK %s", 200, payload) -} - -func (o *ListInterfaceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interface][%d] listInterfaceOK %s", 200, payload) -} - -func (o *ListInterfaceOK) GetPayload() []*models.NodeNetworkInterfaces { - return o.Payload -} - -func (o *ListInterfaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListInterfaceDefault creates a ListInterfaceDefault with default headers values -func NewListInterfaceDefault(code int) *ListInterfaceDefault { - return &ListInterfaceDefault{ - _statusCode: code, - } -} - -/* -ListInterfaceDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListInterfaceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list interface default response has a 2xx status code -func (o *ListInterfaceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list interface default response has a 3xx status code -func (o *ListInterfaceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list interface default response has a 4xx status code -func (o *ListInterfaceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list interface default response has a 5xx status code -func (o *ListInterfaceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list interface default response a status code equal to that given -func (o *ListInterfaceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list interface default response -func (o *ListInterfaceDefault) Code() int { - return o._statusCode -} - -func (o *ListInterfaceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interface][%d] ListInterface default %s", o._statusCode, payload) -} - -func (o *ListInterfaceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/interface][%d] ListInterface default %s", o._statusCode, payload) -} - -func (o *ListInterfaceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListInterfaceDefault) 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/interface_operations/update_interface_parameters.go b/v1/client/interface_operations/update_interface_parameters.go deleted file mode 100644 index 149f4167..00000000 --- a/v1/client/interface_operations/update_interface_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateInterfaceParams creates a new UpdateInterfaceParams 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 NewUpdateInterfaceParams() *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInterfaceParamsWithTimeout creates a new UpdateInterfaceParams object -// with the ability to set a timeout on a request. -func NewUpdateInterfaceParamsWithTimeout(timeout time.Duration) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - timeout: timeout, - } -} - -// NewUpdateInterfaceParamsWithContext creates a new UpdateInterfaceParams object -// with the ability to set a context for a request. -func NewUpdateInterfaceParamsWithContext(ctx context.Context) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - Context: ctx, - } -} - -// NewUpdateInterfaceParamsWithHTTPClient creates a new UpdateInterfaceParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInterfaceParamsWithHTTPClient(client *http.Client) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - HTTPClient: client, - } -} - -/* -UpdateInterfaceParams contains all the parameters to send to the API endpoint - - for the update interface operation. - - Typically these are written to a http.Request. -*/ -type UpdateInterfaceParams struct { - - // Body. - Body *models.Interface - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceParams) WithDefaults() *UpdateInterfaceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update interface params -func (o *UpdateInterfaceParams) WithTimeout(timeout time.Duration) *UpdateInterfaceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update interface params -func (o *UpdateInterfaceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update interface params -func (o *UpdateInterfaceParams) WithContext(ctx context.Context) *UpdateInterfaceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update interface params -func (o *UpdateInterfaceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update interface params -func (o *UpdateInterfaceParams) WithHTTPClient(client *http.Client) *UpdateInterfaceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update interface params -func (o *UpdateInterfaceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update interface params -func (o *UpdateInterfaceParams) WithBody(body *models.Interface) *UpdateInterfaceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update interface params -func (o *UpdateInterfaceParams) SetBody(body *models.Interface) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInterfaceParams) 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/interface_operations/update_interface_responses.go b/v1/client/interface_operations/update_interface_responses.go deleted file mode 100644 index 749a1f8e..00000000 --- a/v1/client/interface_operations/update_interface_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateInterfaceReader is a Reader for the UpdateInterface structure. -type UpdateInterfaceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInterfaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInterfaceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInterfaceDefault(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 - } -} - -// NewUpdateInterfaceOK creates a UpdateInterfaceOK with default headers values -func NewUpdateInterfaceOK() *UpdateInterfaceOK { - return &UpdateInterfaceOK{} -} - -/* -UpdateInterfaceOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateInterfaceOK struct { - Payload *models.Interface -} - -// IsSuccess returns true when this update interface o k response has a 2xx status code -func (o *UpdateInterfaceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update interface o k response has a 3xx status code -func (o *UpdateInterfaceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update interface o k response has a 4xx status code -func (o *UpdateInterfaceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update interface o k response has a 5xx status code -func (o *UpdateInterfaceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update interface o k response a status code equal to that given -func (o *UpdateInterfaceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update interface o k response -func (o *UpdateInterfaceOK) Code() int { - return 200 -} - -func (o *UpdateInterfaceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interface][%d] updateInterfaceOK %s", 200, payload) -} - -func (o *UpdateInterfaceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interface][%d] updateInterfaceOK %s", 200, payload) -} - -func (o *UpdateInterfaceOK) GetPayload() *models.Interface { - return o.Payload -} - -func (o *UpdateInterfaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Interface) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInterfaceDefault creates a UpdateInterfaceDefault with default headers values -func NewUpdateInterfaceDefault(code int) *UpdateInterfaceDefault { - return &UpdateInterfaceDefault{ - _statusCode: code, - } -} - -/* -UpdateInterfaceDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInterfaceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update interface default response has a 2xx status code -func (o *UpdateInterfaceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update interface default response has a 3xx status code -func (o *UpdateInterfaceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update interface default response has a 4xx status code -func (o *UpdateInterfaceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update interface default response has a 5xx status code -func (o *UpdateInterfaceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update interface default response a status code equal to that given -func (o *UpdateInterfaceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update interface default response -func (o *UpdateInterfaceDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInterfaceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interface][%d] UpdateInterface default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/interface][%d] UpdateInterface default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateInterfaceDefault) 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/ip/configure_ip_parameters.go b/v1/client/ip/configure_ip_parameters.go deleted file mode 100644 index 7a1ad4b7..00000000 --- a/v1/client/ip/configure_ip_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ip - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewConfigureIPParams creates a new ConfigureIPParams 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 NewConfigureIPParams() *ConfigureIPParams { - return &ConfigureIPParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewConfigureIPParamsWithTimeout creates a new ConfigureIPParams object -// with the ability to set a timeout on a request. -func NewConfigureIPParamsWithTimeout(timeout time.Duration) *ConfigureIPParams { - return &ConfigureIPParams{ - timeout: timeout, - } -} - -// NewConfigureIPParamsWithContext creates a new ConfigureIPParams object -// with the ability to set a context for a request. -func NewConfigureIPParamsWithContext(ctx context.Context) *ConfigureIPParams { - return &ConfigureIPParams{ - Context: ctx, - } -} - -// NewConfigureIPParamsWithHTTPClient creates a new ConfigureIPParams object -// with the ability to set a custom HTTPClient for a request. -func NewConfigureIPParamsWithHTTPClient(client *http.Client) *ConfigureIPParams { - return &ConfigureIPParams{ - HTTPClient: client, - } -} - -/* -ConfigureIPParams contains all the parameters to send to the API endpoint - - for the configure Ip operation. - - Typically these are written to a http.Request. -*/ -type ConfigureIPParams struct { - - // Body. - Body *models.IPConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the configure Ip params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConfigureIPParams) WithDefaults() *ConfigureIPParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the configure Ip params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConfigureIPParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the configure Ip params -func (o *ConfigureIPParams) WithTimeout(timeout time.Duration) *ConfigureIPParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the configure Ip params -func (o *ConfigureIPParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the configure Ip params -func (o *ConfigureIPParams) WithContext(ctx context.Context) *ConfigureIPParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the configure Ip params -func (o *ConfigureIPParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the configure Ip params -func (o *ConfigureIPParams) WithHTTPClient(client *http.Client) *ConfigureIPParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the configure Ip params -func (o *ConfigureIPParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the configure Ip params -func (o *ConfigureIPParams) WithBody(body *models.IPConfig) *ConfigureIPParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the configure Ip params -func (o *ConfigureIPParams) SetBody(body *models.IPConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ConfigureIPParams) 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/ip/configure_ip_responses.go b/v1/client/ip/configure_ip_responses.go deleted file mode 100644 index 4ae72795..00000000 --- a/v1/client/ip/configure_ip_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ip - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ConfigureIPReader is a Reader for the ConfigureIP structure. -type ConfigureIPReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ConfigureIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewConfigureIPOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewConfigureIPDefault(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 - } -} - -// NewConfigureIPOK creates a ConfigureIPOK with default headers values -func NewConfigureIPOK() *ConfigureIPOK { - return &ConfigureIPOK{} -} - -/* -ConfigureIPOK describes a response with status code 200, with default header values. - -Success -*/ -type ConfigureIPOK struct { - Payload *models.IPConfig -} - -// IsSuccess returns true when this configure Ip o k response has a 2xx status code -func (o *ConfigureIPOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this configure Ip o k response has a 3xx status code -func (o *ConfigureIPOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this configure Ip o k response has a 4xx status code -func (o *ConfigureIPOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this configure Ip o k response has a 5xx status code -func (o *ConfigureIPOK) IsServerError() bool { - return false -} - -// IsCode returns true when this configure Ip o k response a status code equal to that given -func (o *ConfigureIPOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the configure Ip o k response -func (o *ConfigureIPOK) Code() int { - return 200 -} - -func (o *ConfigureIPOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ip][%d] configureIpOK %s", 200, payload) -} - -func (o *ConfigureIPOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ip][%d] configureIpOK %s", 200, payload) -} - -func (o *ConfigureIPOK) GetPayload() *models.IPConfig { - return o.Payload -} - -func (o *ConfigureIPOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IPConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewConfigureIPDefault creates a ConfigureIPDefault with default headers values -func NewConfigureIPDefault(code int) *ConfigureIPDefault { - return &ConfigureIPDefault{ - _statusCode: code, - } -} - -/* -ConfigureIPDefault describes a response with status code -1, with default header values. - -Error -*/ -type ConfigureIPDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this configure Ip default response has a 2xx status code -func (o *ConfigureIPDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this configure Ip default response has a 3xx status code -func (o *ConfigureIPDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this configure Ip default response has a 4xx status code -func (o *ConfigureIPDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this configure Ip default response has a 5xx status code -func (o *ConfigureIPDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this configure Ip default response a status code equal to that given -func (o *ConfigureIPDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the configure Ip default response -func (o *ConfigureIPDefault) Code() int { - return o._statusCode -} - -func (o *ConfigureIPDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ip][%d] ConfigureIp default %s", o._statusCode, payload) -} - -func (o *ConfigureIPDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ip][%d] ConfigureIp default %s", o._statusCode, payload) -} - -func (o *ConfigureIPDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ConfigureIPDefault) 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/ip/ip_client.go b/v1/client/ip/ip_client.go deleted file mode 100644 index 69904192..00000000 --- a/v1/client/ip/ip_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ip - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new ip API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new ip API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new ip API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for ip API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ConfigureIP(params *ConfigureIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConfigureIPOK, error) - - UnconfigureIP(params *UnconfigureIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnconfigureIPNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ConfigureIP configures the specfied IP settings on the cohesity cluster - -Returns the create status upon completion. -*/ -func (a *Client) ConfigureIP(params *ConfigureIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConfigureIPOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewConfigureIPParams() - } - op := &runtime.ClientOperation{ - ID: "ConfigureIp", - Method: "PUT", - PathPattern: "/public/ip", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ConfigureIPReader{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.(*ConfigureIPOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ConfigureIPDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnconfigureIP deletes the specified IP settings on the cohesity cluster - -Returns the delete status upon completion. -*/ -func (a *Client) UnconfigureIP(params *UnconfigureIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnconfigureIPNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnconfigureIPParams() - } - op := &runtime.ClientOperation{ - ID: "UnconfigureIp", - Method: "DELETE", - PathPattern: "/public/ip", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnconfigureIPReader{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.(*UnconfigureIPNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnconfigureIPDefault) - 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/ip/unconfigure_ip_parameters.go b/v1/client/ip/unconfigure_ip_parameters.go deleted file mode 100644 index 1fa16490..00000000 --- a/v1/client/ip/unconfigure_ip_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ip - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUnconfigureIPParams creates a new UnconfigureIPParams 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 NewUnconfigureIPParams() *UnconfigureIPParams { - return &UnconfigureIPParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnconfigureIPParamsWithTimeout creates a new UnconfigureIPParams object -// with the ability to set a timeout on a request. -func NewUnconfigureIPParamsWithTimeout(timeout time.Duration) *UnconfigureIPParams { - return &UnconfigureIPParams{ - timeout: timeout, - } -} - -// NewUnconfigureIPParamsWithContext creates a new UnconfigureIPParams object -// with the ability to set a context for a request. -func NewUnconfigureIPParamsWithContext(ctx context.Context) *UnconfigureIPParams { - return &UnconfigureIPParams{ - Context: ctx, - } -} - -// NewUnconfigureIPParamsWithHTTPClient creates a new UnconfigureIPParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnconfigureIPParamsWithHTTPClient(client *http.Client) *UnconfigureIPParams { - return &UnconfigureIPParams{ - HTTPClient: client, - } -} - -/* -UnconfigureIPParams contains all the parameters to send to the API endpoint - - for the unconfigure Ip operation. - - Typically these are written to a http.Request. -*/ -type UnconfigureIPParams struct { - - // Body. - Body *models.IPUnconfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unconfigure Ip params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnconfigureIPParams) WithDefaults() *UnconfigureIPParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unconfigure Ip params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnconfigureIPParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unconfigure Ip params -func (o *UnconfigureIPParams) WithTimeout(timeout time.Duration) *UnconfigureIPParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unconfigure Ip params -func (o *UnconfigureIPParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unconfigure Ip params -func (o *UnconfigureIPParams) WithContext(ctx context.Context) *UnconfigureIPParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unconfigure Ip params -func (o *UnconfigureIPParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unconfigure Ip params -func (o *UnconfigureIPParams) WithHTTPClient(client *http.Client) *UnconfigureIPParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unconfigure Ip params -func (o *UnconfigureIPParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unconfigure Ip params -func (o *UnconfigureIPParams) WithBody(body *models.IPUnconfig) *UnconfigureIPParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unconfigure Ip params -func (o *UnconfigureIPParams) SetBody(body *models.IPUnconfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UnconfigureIPParams) 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/ip/unconfigure_ip_responses.go b/v1/client/ip/unconfigure_ip_responses.go deleted file mode 100644 index af64e5d9..00000000 --- a/v1/client/ip/unconfigure_ip_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ip - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UnconfigureIPReader is a Reader for the UnconfigureIP structure. -type UnconfigureIPReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnconfigureIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUnconfigureIPNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnconfigureIPDefault(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 - } -} - -// NewUnconfigureIPNoContent creates a UnconfigureIPNoContent with default headers values -func NewUnconfigureIPNoContent() *UnconfigureIPNoContent { - return &UnconfigureIPNoContent{} -} - -/* -UnconfigureIPNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UnconfigureIPNoContent struct { -} - -// IsSuccess returns true when this unconfigure Ip no content response has a 2xx status code -func (o *UnconfigureIPNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unconfigure Ip no content response has a 3xx status code -func (o *UnconfigureIPNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unconfigure Ip no content response has a 4xx status code -func (o *UnconfigureIPNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this unconfigure Ip no content response has a 5xx status code -func (o *UnconfigureIPNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this unconfigure Ip no content response a status code equal to that given -func (o *UnconfigureIPNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the unconfigure Ip no content response -func (o *UnconfigureIPNoContent) Code() int { - return 204 -} - -func (o *UnconfigureIPNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/ip][%d] unconfigureIpNoContent", 204) -} - -func (o *UnconfigureIPNoContent) String() string { - return fmt.Sprintf("[DELETE /public/ip][%d] unconfigureIpNoContent", 204) -} - -func (o *UnconfigureIPNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUnconfigureIPDefault creates a UnconfigureIPDefault with default headers values -func NewUnconfigureIPDefault(code int) *UnconfigureIPDefault { - return &UnconfigureIPDefault{ - _statusCode: code, - } -} - -/* -UnconfigureIPDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnconfigureIPDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this unconfigure Ip default response has a 2xx status code -func (o *UnconfigureIPDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unconfigure Ip default response has a 3xx status code -func (o *UnconfigureIPDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unconfigure Ip default response has a 4xx status code -func (o *UnconfigureIPDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unconfigure Ip default response has a 5xx status code -func (o *UnconfigureIPDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unconfigure Ip default response a status code equal to that given -func (o *UnconfigureIPDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unconfigure Ip default response -func (o *UnconfigureIPDefault) Code() int { - return o._statusCode -} - -func (o *UnconfigureIPDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/ip][%d] UnconfigureIp default %s", o._statusCode, payload) -} - -func (o *UnconfigureIPDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/ip][%d] UnconfigureIp default %s", o._statusCode, payload) -} - -func (o *UnconfigureIPDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UnconfigureIPDefault) 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/kms_configuration/create_kms_config_parameters.go b/v1/client/kms_configuration/create_kms_config_parameters.go deleted file mode 100644 index a7dfc4b1..00000000 --- a/v1/client/kms_configuration/create_kms_config_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateKmsConfigParams creates a new CreateKmsConfigParams 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 NewCreateKmsConfigParams() *CreateKmsConfigParams { - return &CreateKmsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateKmsConfigParamsWithTimeout creates a new CreateKmsConfigParams object -// with the ability to set a timeout on a request. -func NewCreateKmsConfigParamsWithTimeout(timeout time.Duration) *CreateKmsConfigParams { - return &CreateKmsConfigParams{ - timeout: timeout, - } -} - -// NewCreateKmsConfigParamsWithContext creates a new CreateKmsConfigParams object -// with the ability to set a context for a request. -func NewCreateKmsConfigParamsWithContext(ctx context.Context) *CreateKmsConfigParams { - return &CreateKmsConfigParams{ - Context: ctx, - } -} - -// NewCreateKmsConfigParamsWithHTTPClient creates a new CreateKmsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateKmsConfigParamsWithHTTPClient(client *http.Client) *CreateKmsConfigParams { - return &CreateKmsConfigParams{ - HTTPClient: client, - } -} - -/* -CreateKmsConfigParams contains all the parameters to send to the API endpoint - - for the create kms config operation. - - Typically these are written to a http.Request. -*/ -type CreateKmsConfigParams struct { - - // Body. - Body *models.KmsCreateRequestParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateKmsConfigParams) WithDefaults() *CreateKmsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateKmsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create kms config params -func (o *CreateKmsConfigParams) WithTimeout(timeout time.Duration) *CreateKmsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create kms config params -func (o *CreateKmsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create kms config params -func (o *CreateKmsConfigParams) WithContext(ctx context.Context) *CreateKmsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create kms config params -func (o *CreateKmsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create kms config params -func (o *CreateKmsConfigParams) WithHTTPClient(client *http.Client) *CreateKmsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create kms config params -func (o *CreateKmsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create kms config params -func (o *CreateKmsConfigParams) WithBody(body *models.KmsCreateRequestParameters) *CreateKmsConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create kms config params -func (o *CreateKmsConfigParams) SetBody(body *models.KmsCreateRequestParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateKmsConfigParams) 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/kms_configuration/create_kms_config_responses.go b/v1/client/kms_configuration/create_kms_config_responses.go deleted file mode 100644 index 2fc33a68..00000000 --- a/v1/client/kms_configuration/create_kms_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateKmsConfigReader is a Reader for the CreateKmsConfig structure. -type CreateKmsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateKmsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateKmsConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateKmsConfigDefault(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 - } -} - -// NewCreateKmsConfigOK creates a CreateKmsConfigOK with default headers values -func NewCreateKmsConfigOK() *CreateKmsConfigOK { - return &CreateKmsConfigOK{} -} - -/* -CreateKmsConfigOK describes a response with status code 200, with default header values. - -Response after KMS has been created. -*/ -type CreateKmsConfigOK struct { - Payload *models.KmsConfigurationResponse -} - -// IsSuccess returns true when this create kms config o k response has a 2xx status code -func (o *CreateKmsConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create kms config o k response has a 3xx status code -func (o *CreateKmsConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create kms config o k response has a 4xx status code -func (o *CreateKmsConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create kms config o k response has a 5xx status code -func (o *CreateKmsConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create kms config o k response a status code equal to that given -func (o *CreateKmsConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create kms config o k response -func (o *CreateKmsConfigOK) Code() int { - return 200 -} - -func (o *CreateKmsConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/kmsConfig][%d] createKmsConfigOK %s", 200, payload) -} - -func (o *CreateKmsConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/kmsConfig][%d] createKmsConfigOK %s", 200, payload) -} - -func (o *CreateKmsConfigOK) GetPayload() *models.KmsConfigurationResponse { - return o.Payload -} - -func (o *CreateKmsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KmsConfigurationResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateKmsConfigDefault creates a CreateKmsConfigDefault with default headers values -func NewCreateKmsConfigDefault(code int) *CreateKmsConfigDefault { - return &CreateKmsConfigDefault{ - _statusCode: code, - } -} - -/* -CreateKmsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateKmsConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create kms config default response has a 2xx status code -func (o *CreateKmsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create kms config default response has a 3xx status code -func (o *CreateKmsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create kms config default response has a 4xx status code -func (o *CreateKmsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create kms config default response has a 5xx status code -func (o *CreateKmsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create kms config default response a status code equal to that given -func (o *CreateKmsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create kms config default response -func (o *CreateKmsConfigDefault) Code() int { - return o._statusCode -} - -func (o *CreateKmsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/kmsConfig][%d] CreateKmsConfig default %s", o._statusCode, payload) -} - -func (o *CreateKmsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/kmsConfig][%d] CreateKmsConfig default %s", o._statusCode, payload) -} - -func (o *CreateKmsConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateKmsConfigDefault) 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/kms_configuration/delete_kms_config_parameters.go b/v1/client/kms_configuration/delete_kms_config_parameters.go deleted file mode 100644 index 39cc2980..00000000 --- a/v1/client/kms_configuration/delete_kms_config_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteKmsConfigParams creates a new DeleteKmsConfigParams 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 NewDeleteKmsConfigParams() *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteKmsConfigParamsWithTimeout creates a new DeleteKmsConfigParams object -// with the ability to set a timeout on a request. -func NewDeleteKmsConfigParamsWithTimeout(timeout time.Duration) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - timeout: timeout, - } -} - -// NewDeleteKmsConfigParamsWithContext creates a new DeleteKmsConfigParams object -// with the ability to set a context for a request. -func NewDeleteKmsConfigParamsWithContext(ctx context.Context) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - Context: ctx, - } -} - -// NewDeleteKmsConfigParamsWithHTTPClient creates a new DeleteKmsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteKmsConfigParamsWithHTTPClient(client *http.Client) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - HTTPClient: client, - } -} - -/* -DeleteKmsConfigParams contains all the parameters to send to the API endpoint - - for the delete kms config operation. - - Typically these are written to a http.Request. -*/ -type DeleteKmsConfigParams struct { - - /* Body. - - Request to delete kms config. - */ - Body *models.KmsDeleteParams - - /* ID. - - Specifies a unique id of the KMS config. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKmsConfigParams) WithDefaults() *DeleteKmsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKmsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete kms config params -func (o *DeleteKmsConfigParams) WithTimeout(timeout time.Duration) *DeleteKmsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete kms config params -func (o *DeleteKmsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete kms config params -func (o *DeleteKmsConfigParams) WithContext(ctx context.Context) *DeleteKmsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete kms config params -func (o *DeleteKmsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete kms config params -func (o *DeleteKmsConfigParams) WithHTTPClient(client *http.Client) *DeleteKmsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete kms config params -func (o *DeleteKmsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete kms config params -func (o *DeleteKmsConfigParams) WithBody(body *models.KmsDeleteParams) *DeleteKmsConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete kms config params -func (o *DeleteKmsConfigParams) SetBody(body *models.KmsDeleteParams) { - o.Body = body -} - -// WithID adds the id to the delete kms config params -func (o *DeleteKmsConfigParams) WithID(id int64) *DeleteKmsConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete kms config params -func (o *DeleteKmsConfigParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteKmsConfigParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/kms_configuration/delete_kms_config_responses.go b/v1/client/kms_configuration/delete_kms_config_responses.go deleted file mode 100644 index 40954c91..00000000 --- a/v1/client/kms_configuration/delete_kms_config_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteKmsConfigReader is a Reader for the DeleteKmsConfig structure. -type DeleteKmsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteKmsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteKmsConfigNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteKmsConfigDefault(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 - } -} - -// NewDeleteKmsConfigNoContent creates a DeleteKmsConfigNoContent with default headers values -func NewDeleteKmsConfigNoContent() *DeleteKmsConfigNoContent { - return &DeleteKmsConfigNoContent{} -} - -/* -DeleteKmsConfigNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteKmsConfigNoContent struct { -} - -// IsSuccess returns true when this delete kms config no content response has a 2xx status code -func (o *DeleteKmsConfigNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete kms config no content response has a 3xx status code -func (o *DeleteKmsConfigNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete kms config no content response has a 4xx status code -func (o *DeleteKmsConfigNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete kms config no content response has a 5xx status code -func (o *DeleteKmsConfigNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete kms config no content response a status code equal to that given -func (o *DeleteKmsConfigNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete kms config no content response -func (o *DeleteKmsConfigNoContent) Code() int { - return 204 -} - -func (o *DeleteKmsConfigNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/kmsConfig/{id}][%d] deleteKmsConfigNoContent", 204) -} - -func (o *DeleteKmsConfigNoContent) String() string { - return fmt.Sprintf("[DELETE /public/kmsConfig/{id}][%d] deleteKmsConfigNoContent", 204) -} - -func (o *DeleteKmsConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteKmsConfigDefault creates a DeleteKmsConfigDefault with default headers values -func NewDeleteKmsConfigDefault(code int) *DeleteKmsConfigDefault { - return &DeleteKmsConfigDefault{ - _statusCode: code, - } -} - -/* -DeleteKmsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteKmsConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete kms config default response has a 2xx status code -func (o *DeleteKmsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete kms config default response has a 3xx status code -func (o *DeleteKmsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete kms config default response has a 4xx status code -func (o *DeleteKmsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete kms config default response has a 5xx status code -func (o *DeleteKmsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete kms config default response a status code equal to that given -func (o *DeleteKmsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete kms config default response -func (o *DeleteKmsConfigDefault) Code() int { - return o._statusCode -} - -func (o *DeleteKmsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/kmsConfig/{id}][%d] DeleteKmsConfig default %s", o._statusCode, payload) -} - -func (o *DeleteKmsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/kmsConfig/{id}][%d] DeleteKmsConfig default %s", o._statusCode, payload) -} - -func (o *DeleteKmsConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteKmsConfigDefault) 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/kms_configuration/get_kms_config_parameters.go b/v1/client/kms_configuration/get_kms_config_parameters.go deleted file mode 100644 index 0e57c0cb..00000000 --- a/v1/client/kms_configuration/get_kms_config_parameters.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/go-openapi/swag" -) - -// NewGetKmsConfigParams creates a new GetKmsConfigParams 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 NewGetKmsConfigParams() *GetKmsConfigParams { - return &GetKmsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKmsConfigParamsWithTimeout creates a new GetKmsConfigParams object -// with the ability to set a timeout on a request. -func NewGetKmsConfigParamsWithTimeout(timeout time.Duration) *GetKmsConfigParams { - return &GetKmsConfigParams{ - timeout: timeout, - } -} - -// NewGetKmsConfigParamsWithContext creates a new GetKmsConfigParams object -// with the ability to set a context for a request. -func NewGetKmsConfigParamsWithContext(ctx context.Context) *GetKmsConfigParams { - return &GetKmsConfigParams{ - Context: ctx, - } -} - -// NewGetKmsConfigParamsWithHTTPClient creates a new GetKmsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKmsConfigParamsWithHTTPClient(client *http.Client) *GetKmsConfigParams { - return &GetKmsConfigParams{ - HTTPClient: client, - } -} - -/* -GetKmsConfigParams contains all the parameters to send to the API endpoint - - for the get kms config operation. - - Typically these are written to a http.Request. -*/ -type GetKmsConfigParams struct { - - /* ID. - - The Id of a KMS server. - - Format: int64 - */ - ID *int64 - - /* IncludeRpaasKms. - - Include RPaaS KMS, if true returns RPaaS keys - */ - IncludeRpaasKms *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsConfigParams) WithDefaults() *GetKmsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kms config params -func (o *GetKmsConfigParams) WithTimeout(timeout time.Duration) *GetKmsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kms config params -func (o *GetKmsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kms config params -func (o *GetKmsConfigParams) WithContext(ctx context.Context) *GetKmsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kms config params -func (o *GetKmsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kms config params -func (o *GetKmsConfigParams) WithHTTPClient(client *http.Client) *GetKmsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kms config params -func (o *GetKmsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get kms config params -func (o *GetKmsConfigParams) WithID(id *int64) *GetKmsConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get kms config params -func (o *GetKmsConfigParams) SetID(id *int64) { - o.ID = id -} - -// WithIncludeRpaasKms adds the includeRpaasKms to the get kms config params -func (o *GetKmsConfigParams) WithIncludeRpaasKms(includeRpaasKms *bool) *GetKmsConfigParams { - o.SetIncludeRpaasKms(includeRpaasKms) - return o -} - -// SetIncludeRpaasKms adds the includeRpaasKms to the get kms config params -func (o *GetKmsConfigParams) SetIncludeRpaasKms(includeRpaasKms *bool) { - o.IncludeRpaasKms = includeRpaasKms -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKmsConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID int64 - - if o.ID != nil { - qrID = *o.ID - } - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IncludeRpaasKms != nil { - - // query param includeRpaasKms - var qrIncludeRpaasKms bool - - if o.IncludeRpaasKms != nil { - qrIncludeRpaasKms = *o.IncludeRpaasKms - } - qIncludeRpaasKms := swag.FormatBool(qrIncludeRpaasKms) - if qIncludeRpaasKms != "" { - - if err := r.SetQueryParam("includeRpaasKms", qIncludeRpaasKms); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/kms_configuration/get_kms_config_responses.go b/v1/client/kms_configuration/get_kms_config_responses.go deleted file mode 100644 index 2f9f978b..00000000 --- a/v1/client/kms_configuration/get_kms_config_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetKmsConfigReader is a Reader for the GetKmsConfig structure. -type GetKmsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKmsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKmsConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKmsConfigDefault(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 - } -} - -// NewGetKmsConfigOK creates a GetKmsConfigOK with default headers values -func NewGetKmsConfigOK() *GetKmsConfigOK { - return &GetKmsConfigOK{} -} - -/* -GetKmsConfigOK describes a response with status code 200, with default header values. - -Specifies a list of KMS configurations. -*/ -type GetKmsConfigOK struct { - Payload []*models.KmsConfigurationResponse -} - -// IsSuccess returns true when this get kms config o k response has a 2xx status code -func (o *GetKmsConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get kms config o k response has a 3xx status code -func (o *GetKmsConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get kms config o k response has a 4xx status code -func (o *GetKmsConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get kms config o k response has a 5xx status code -func (o *GetKmsConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get kms config o k response a status code equal to that given -func (o *GetKmsConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get kms config o k response -func (o *GetKmsConfigOK) Code() int { - return 200 -} - -func (o *GetKmsConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsConfig][%d] getKmsConfigOK %s", 200, payload) -} - -func (o *GetKmsConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsConfig][%d] getKmsConfigOK %s", 200, payload) -} - -func (o *GetKmsConfigOK) GetPayload() []*models.KmsConfigurationResponse { - return o.Payload -} - -func (o *GetKmsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKmsConfigDefault creates a GetKmsConfigDefault with default headers values -func NewGetKmsConfigDefault(code int) *GetKmsConfigDefault { - return &GetKmsConfigDefault{ - _statusCode: code, - } -} - -/* -GetKmsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKmsConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get kms config default response has a 2xx status code -func (o *GetKmsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get kms config default response has a 3xx status code -func (o *GetKmsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get kms config default response has a 4xx status code -func (o *GetKmsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get kms config default response has a 5xx status code -func (o *GetKmsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get kms config default response a status code equal to that given -func (o *GetKmsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get kms config default response -func (o *GetKmsConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetKmsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsConfig][%d] GetKmsConfig default %s", o._statusCode, payload) -} - -func (o *GetKmsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/kmsConfig][%d] GetKmsConfig default %s", o._statusCode, payload) -} - -func (o *GetKmsConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetKmsConfigDefault) 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/kms_configuration/kms_configuration_client.go b/v1/client/kms_configuration/kms_configuration_client.go deleted file mode 100644 index a5b6e508..00000000 --- a/v1/client/kms_configuration/kms_configuration_client.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new kms configuration API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new kms configuration API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new kms configuration API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for kms configuration API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateKmsConfig(params *CreateKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateKmsConfigOK, error) - - DeleteKmsConfig(params *DeleteKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKmsConfigNoContent, error) - - GetKmsConfig(params *GetKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsConfigOK, error) - - UpdateKmsConfig(params *UpdateKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKmsConfigOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateKmsConfig creates a k m s config - -Returns the created KMS config. -*/ -func (a *Client) CreateKmsConfig(params *CreateKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateKmsConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateKmsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "CreateKmsConfig", - Method: "POST", - PathPattern: "/public/kmsConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateKmsConfigReader{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.(*CreateKmsConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateKmsConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteKmsConfig deletes a kms configuration for a given id - -Returns delete status upon completion. -*/ -func (a *Client) DeleteKmsConfig(params *DeleteKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKmsConfigNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteKmsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteKmsConfig", - Method: "DELETE", - PathPattern: "/public/kmsConfig/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteKmsConfigReader{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.(*DeleteKmsConfigNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteKmsConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetKmsConfig lists k m s configurations in the cluster -*/ -func (a *Client) GetKmsConfig(params *GetKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKmsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetKmsConfig", - Method: "GET", - PathPattern: "/public/kmsConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKmsConfigReader{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.(*GetKmsConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKmsConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateKmsConfig updates k m s configurations in the cluster -*/ -func (a *Client) UpdateKmsConfig(params *UpdateKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKmsConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateKmsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateKmsConfig", - Method: "PUT", - PathPattern: "/public/kmsConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateKmsConfigReader{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.(*UpdateKmsConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateKmsConfigDefault) - 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/kms_configuration/update_kms_config_parameters.go b/v1/client/kms_configuration/update_kms_config_parameters.go deleted file mode 100644 index 65e05a66..00000000 --- a/v1/client/kms_configuration/update_kms_config_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateKmsConfigParams creates a new UpdateKmsConfigParams 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 NewUpdateKmsConfigParams() *UpdateKmsConfigParams { - return &UpdateKmsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateKmsConfigParamsWithTimeout creates a new UpdateKmsConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateKmsConfigParamsWithTimeout(timeout time.Duration) *UpdateKmsConfigParams { - return &UpdateKmsConfigParams{ - timeout: timeout, - } -} - -// NewUpdateKmsConfigParamsWithContext creates a new UpdateKmsConfigParams object -// with the ability to set a context for a request. -func NewUpdateKmsConfigParamsWithContext(ctx context.Context) *UpdateKmsConfigParams { - return &UpdateKmsConfigParams{ - Context: ctx, - } -} - -// NewUpdateKmsConfigParamsWithHTTPClient creates a new UpdateKmsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateKmsConfigParamsWithHTTPClient(client *http.Client) *UpdateKmsConfigParams { - return &UpdateKmsConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateKmsConfigParams contains all the parameters to send to the API endpoint - - for the update kms config operation. - - Typically these are written to a http.Request. -*/ -type UpdateKmsConfigParams struct { - - // Body. - Body *models.KmsUpdateRequestParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKmsConfigParams) WithDefaults() *UpdateKmsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKmsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update kms config params -func (o *UpdateKmsConfigParams) WithTimeout(timeout time.Duration) *UpdateKmsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update kms config params -func (o *UpdateKmsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update kms config params -func (o *UpdateKmsConfigParams) WithContext(ctx context.Context) *UpdateKmsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update kms config params -func (o *UpdateKmsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update kms config params -func (o *UpdateKmsConfigParams) WithHTTPClient(client *http.Client) *UpdateKmsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update kms config params -func (o *UpdateKmsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update kms config params -func (o *UpdateKmsConfigParams) WithBody(body *models.KmsUpdateRequestParameters) *UpdateKmsConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update kms config params -func (o *UpdateKmsConfigParams) SetBody(body *models.KmsUpdateRequestParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateKmsConfigParams) 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/kms_configuration/update_kms_config_responses.go b/v1/client/kms_configuration/update_kms_config_responses.go deleted file mode 100644 index 633a2f62..00000000 --- a/v1/client/kms_configuration/update_kms_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kms_configuration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateKmsConfigReader is a Reader for the UpdateKmsConfig structure. -type UpdateKmsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateKmsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateKmsConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateKmsConfigDefault(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 - } -} - -// NewUpdateKmsConfigOK creates a UpdateKmsConfigOK with default headers values -func NewUpdateKmsConfigOK() *UpdateKmsConfigOK { - return &UpdateKmsConfigOK{} -} - -/* -UpdateKmsConfigOK describes a response with status code 200, with default header values. - -Response after KMS has been updated. -*/ -type UpdateKmsConfigOK struct { - Payload *models.KmsConfigurationResponse -} - -// IsSuccess returns true when this update kms config o k response has a 2xx status code -func (o *UpdateKmsConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update kms config o k response has a 3xx status code -func (o *UpdateKmsConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update kms config o k response has a 4xx status code -func (o *UpdateKmsConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update kms config o k response has a 5xx status code -func (o *UpdateKmsConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update kms config o k response a status code equal to that given -func (o *UpdateKmsConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update kms config o k response -func (o *UpdateKmsConfigOK) Code() int { - return 200 -} - -func (o *UpdateKmsConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/kmsConfig][%d] updateKmsConfigOK %s", 200, payload) -} - -func (o *UpdateKmsConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/kmsConfig][%d] updateKmsConfigOK %s", 200, payload) -} - -func (o *UpdateKmsConfigOK) GetPayload() *models.KmsConfigurationResponse { - return o.Payload -} - -func (o *UpdateKmsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KmsConfigurationResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateKmsConfigDefault creates a UpdateKmsConfigDefault with default headers values -func NewUpdateKmsConfigDefault(code int) *UpdateKmsConfigDefault { - return &UpdateKmsConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateKmsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateKmsConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update kms config default response has a 2xx status code -func (o *UpdateKmsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update kms config default response has a 3xx status code -func (o *UpdateKmsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update kms config default response has a 4xx status code -func (o *UpdateKmsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update kms config default response has a 5xx status code -func (o *UpdateKmsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update kms config default response a status code equal to that given -func (o *UpdateKmsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update kms config default response -func (o *UpdateKmsConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateKmsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/kmsConfig][%d] UpdateKmsConfig default %s", o._statusCode, payload) -} - -func (o *UpdateKmsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/kmsConfig][%d] UpdateKmsConfig default %s", o._statusCode, payload) -} - -func (o *UpdateKmsConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateKmsConfigDefault) 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/ldap_provider/create_ldap_provider_parameters.go b/v1/client/ldap_provider/create_ldap_provider_parameters.go deleted file mode 100644 index 313e0563..00000000 --- a/v1/client/ldap_provider/create_ldap_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateLdapProviderParams creates a new CreateLdapProviderParams 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 NewCreateLdapProviderParams() *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateLdapProviderParamsWithTimeout creates a new CreateLdapProviderParams object -// with the ability to set a timeout on a request. -func NewCreateLdapProviderParamsWithTimeout(timeout time.Duration) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - timeout: timeout, - } -} - -// NewCreateLdapProviderParamsWithContext creates a new CreateLdapProviderParams object -// with the ability to set a context for a request. -func NewCreateLdapProviderParamsWithContext(ctx context.Context) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - Context: ctx, - } -} - -// NewCreateLdapProviderParamsWithHTTPClient creates a new CreateLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateLdapProviderParamsWithHTTPClient(client *http.Client) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - HTTPClient: client, - } -} - -/* -CreateLdapProviderParams contains all the parameters to send to the API endpoint - - for the create ldap provider operation. - - Typically these are written to a http.Request. -*/ -type CreateLdapProviderParams struct { - - /* Body. - - Request to configure a LDAP provider. - */ - Body *models.LdapProvider - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLdapProviderParams) WithDefaults() *CreateLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create ldap provider params -func (o *CreateLdapProviderParams) WithTimeout(timeout time.Duration) *CreateLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create ldap provider params -func (o *CreateLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create ldap provider params -func (o *CreateLdapProviderParams) WithContext(ctx context.Context) *CreateLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create ldap provider params -func (o *CreateLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create ldap provider params -func (o *CreateLdapProviderParams) WithHTTPClient(client *http.Client) *CreateLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create ldap provider params -func (o *CreateLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create ldap provider params -func (o *CreateLdapProviderParams) WithBody(body *models.LdapProvider) *CreateLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create ldap provider params -func (o *CreateLdapProviderParams) SetBody(body *models.LdapProvider) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateLdapProviderParams) 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/ldap_provider/create_ldap_provider_responses.go b/v1/client/ldap_provider/create_ldap_provider_responses.go deleted file mode 100644 index 1e32a994..00000000 --- a/v1/client/ldap_provider/create_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateLdapProviderReader is a Reader for the CreateLdapProvider structure. -type CreateLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateLdapProviderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateLdapProviderDefault(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 - } -} - -// NewCreateLdapProviderCreated creates a CreateLdapProviderCreated with default headers values -func NewCreateLdapProviderCreated() *CreateLdapProviderCreated { - return &CreateLdapProviderCreated{} -} - -/* -CreateLdapProviderCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateLdapProviderCreated struct { - Payload *models.LdapProviderResponse -} - -// IsSuccess returns true when this create ldap provider created response has a 2xx status code -func (o *CreateLdapProviderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create ldap provider created response has a 3xx status code -func (o *CreateLdapProviderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create ldap provider created response has a 4xx status code -func (o *CreateLdapProviderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create ldap provider created response has a 5xx status code -func (o *CreateLdapProviderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create ldap provider created response a status code equal to that given -func (o *CreateLdapProviderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create ldap provider created response -func (o *CreateLdapProviderCreated) Code() int { - return 201 -} - -func (o *CreateLdapProviderCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/ldapProvider][%d] createLdapProviderCreated %s", 201, payload) -} - -func (o *CreateLdapProviderCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/ldapProvider][%d] createLdapProviderCreated %s", 201, payload) -} - -func (o *CreateLdapProviderCreated) GetPayload() *models.LdapProviderResponse { - return o.Payload -} - -func (o *CreateLdapProviderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LdapProviderResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateLdapProviderDefault creates a CreateLdapProviderDefault with default headers values -func NewCreateLdapProviderDefault(code int) *CreateLdapProviderDefault { - return &CreateLdapProviderDefault{ - _statusCode: code, - } -} - -/* -CreateLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create ldap provider default response has a 2xx status code -func (o *CreateLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create ldap provider default response has a 3xx status code -func (o *CreateLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create ldap provider default response has a 4xx status code -func (o *CreateLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create ldap provider default response has a 5xx status code -func (o *CreateLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create ldap provider default response a status code equal to that given -func (o *CreateLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create ldap provider default response -func (o *CreateLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *CreateLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/ldapProvider][%d] CreateLdapProvider default %s", o._statusCode, payload) -} - -func (o *CreateLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/ldapProvider][%d] CreateLdapProvider default %s", o._statusCode, payload) -} - -func (o *CreateLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateLdapProviderDefault) 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/ldap_provider/delete_ldap_provider_parameters.go b/v1/client/ldap_provider/delete_ldap_provider_parameters.go deleted file mode 100644 index efaa581f..00000000 --- a/v1/client/ldap_provider/delete_ldap_provider_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/go-openapi/swag" -) - -// NewDeleteLdapProviderParams creates a new DeleteLdapProviderParams 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 NewDeleteLdapProviderParams() *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteLdapProviderParamsWithTimeout creates a new DeleteLdapProviderParams object -// with the ability to set a timeout on a request. -func NewDeleteLdapProviderParamsWithTimeout(timeout time.Duration) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - timeout: timeout, - } -} - -// NewDeleteLdapProviderParamsWithContext creates a new DeleteLdapProviderParams object -// with the ability to set a context for a request. -func NewDeleteLdapProviderParamsWithContext(ctx context.Context) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - Context: ctx, - } -} - -// NewDeleteLdapProviderParamsWithHTTPClient creates a new DeleteLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteLdapProviderParamsWithHTTPClient(client *http.Client) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - HTTPClient: client, - } -} - -/* -DeleteLdapProviderParams contains all the parameters to send to the API endpoint - - for the delete ldap provider operation. - - Typically these are written to a http.Request. -*/ -type DeleteLdapProviderParams struct { - - /* ID. - - Specifies the LDAP Id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteLdapProviderParams) WithDefaults() *DeleteLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithTimeout(timeout time.Duration) *DeleteLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithContext(ctx context.Context) *DeleteLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithHTTPClient(client *http.Client) *DeleteLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithID(id int64) *DeleteLdapProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteLdapProviderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/ldap_provider/delete_ldap_provider_responses.go b/v1/client/ldap_provider/delete_ldap_provider_responses.go deleted file mode 100644 index 6f1ad878..00000000 --- a/v1/client/ldap_provider/delete_ldap_provider_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteLdapProviderReader is a Reader for the DeleteLdapProvider structure. -type DeleteLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteLdapProviderNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteLdapProviderDefault(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 - } -} - -// NewDeleteLdapProviderNoContent creates a DeleteLdapProviderNoContent with default headers values -func NewDeleteLdapProviderNoContent() *DeleteLdapProviderNoContent { - return &DeleteLdapProviderNoContent{} -} - -/* -DeleteLdapProviderNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteLdapProviderNoContent struct { -} - -// IsSuccess returns true when this delete ldap provider no content response has a 2xx status code -func (o *DeleteLdapProviderNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete ldap provider no content response has a 3xx status code -func (o *DeleteLdapProviderNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ldap provider no content response has a 4xx status code -func (o *DeleteLdapProviderNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete ldap provider no content response has a 5xx status code -func (o *DeleteLdapProviderNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ldap provider no content response a status code equal to that given -func (o *DeleteLdapProviderNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete ldap provider no content response -func (o *DeleteLdapProviderNoContent) Code() int { - return 204 -} - -func (o *DeleteLdapProviderNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/ldapProvider/{id}][%d] deleteLdapProviderNoContent", 204) -} - -func (o *DeleteLdapProviderNoContent) String() string { - return fmt.Sprintf("[DELETE /public/ldapProvider/{id}][%d] deleteLdapProviderNoContent", 204) -} - -func (o *DeleteLdapProviderNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteLdapProviderDefault creates a DeleteLdapProviderDefault with default headers values -func NewDeleteLdapProviderDefault(code int) *DeleteLdapProviderDefault { - return &DeleteLdapProviderDefault{ - _statusCode: code, - } -} - -/* -DeleteLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete ldap provider default response has a 2xx status code -func (o *DeleteLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete ldap provider default response has a 3xx status code -func (o *DeleteLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete ldap provider default response has a 4xx status code -func (o *DeleteLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete ldap provider default response has a 5xx status code -func (o *DeleteLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete ldap provider default response a status code equal to that given -func (o *DeleteLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete ldap provider default response -func (o *DeleteLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *DeleteLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/ldapProvider/{id}][%d] DeleteLdapProvider default %s", o._statusCode, payload) -} - -func (o *DeleteLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/ldapProvider/{id}][%d] DeleteLdapProvider default %s", o._statusCode, payload) -} - -func (o *DeleteLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteLdapProviderDefault) 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/ldap_provider/get_ldap_provider_parameters.go b/v1/client/ldap_provider/get_ldap_provider_parameters.go deleted file mode 100644 index 58b86a1a..00000000 --- a/v1/client/ldap_provider/get_ldap_provider_parameters.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/go-openapi/swag" -) - -// NewGetLdapProviderParams creates a new GetLdapProviderParams 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 NewGetLdapProviderParams() *GetLdapProviderParams { - return &GetLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLdapProviderParamsWithTimeout creates a new GetLdapProviderParams object -// with the ability to set a timeout on a request. -func NewGetLdapProviderParamsWithTimeout(timeout time.Duration) *GetLdapProviderParams { - return &GetLdapProviderParams{ - timeout: timeout, - } -} - -// NewGetLdapProviderParamsWithContext creates a new GetLdapProviderParams object -// with the ability to set a context for a request. -func NewGetLdapProviderParamsWithContext(ctx context.Context) *GetLdapProviderParams { - return &GetLdapProviderParams{ - Context: ctx, - } -} - -// NewGetLdapProviderParamsWithHTTPClient creates a new GetLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLdapProviderParamsWithHTTPClient(client *http.Client) *GetLdapProviderParams { - return &GetLdapProviderParams{ - HTTPClient: client, - } -} - -/* -GetLdapProviderParams contains all the parameters to send to the API endpoint - - for the get ldap provider operation. - - Typically these are written to a http.Request. -*/ -type GetLdapProviderParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Ids. - - Specifies the ids of the LDAP providers to fetch. - */ - Ids []int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapProviderParams) WithDefaults() *GetLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ldap provider params -func (o *GetLdapProviderParams) WithTimeout(timeout time.Duration) *GetLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ldap provider params -func (o *GetLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ldap provider params -func (o *GetLdapProviderParams) WithContext(ctx context.Context) *GetLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ldap provider params -func (o *GetLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ldap provider params -func (o *GetLdapProviderParams) WithHTTPClient(client *http.Client) *GetLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ldap provider params -func (o *GetLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get ldap provider params -func (o *GetLdapProviderParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetLdapProviderParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get ldap provider params -func (o *GetLdapProviderParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithIds adds the ids to the get ldap provider params -func (o *GetLdapProviderParams) WithIds(ids []int64) *GetLdapProviderParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get ldap provider params -func (o *GetLdapProviderParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithTenantIds adds the tenantIds to the get ldap provider params -func (o *GetLdapProviderParams) WithTenantIds(tenantIds []string) *GetLdapProviderParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get ldap provider params -func (o *GetLdapProviderParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLdapProviderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetLdapProvider binds the parameter ids -func (o *GetLdapProviderParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetLdapProvider binds the parameter tenantIds -func (o *GetLdapProviderParams) 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/v1/client/ldap_provider/get_ldap_provider_responses.go b/v1/client/ldap_provider/get_ldap_provider_responses.go deleted file mode 100644 index ed846417..00000000 --- a/v1/client/ldap_provider/get_ldap_provider_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetLdapProviderReader is a Reader for the GetLdapProvider structure. -type GetLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLdapProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLdapProviderDefault(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 - } -} - -// NewGetLdapProviderOK creates a GetLdapProviderOK with default headers values -func NewGetLdapProviderOK() *GetLdapProviderOK { - return &GetLdapProviderOK{} -} - -/* -GetLdapProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type GetLdapProviderOK struct { - Payload []*models.LdapProviderResponse -} - -// IsSuccess returns true when this get ldap provider o k response has a 2xx status code -func (o *GetLdapProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ldap provider o k response has a 3xx status code -func (o *GetLdapProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ldap provider o k response has a 4xx status code -func (o *GetLdapProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ldap provider o k response has a 5xx status code -func (o *GetLdapProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ldap provider o k response a status code equal to that given -func (o *GetLdapProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ldap provider o k response -func (o *GetLdapProviderOK) Code() int { - return 200 -} - -func (o *GetLdapProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider][%d] getLdapProviderOK %s", 200, payload) -} - -func (o *GetLdapProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider][%d] getLdapProviderOK %s", 200, payload) -} - -func (o *GetLdapProviderOK) GetPayload() []*models.LdapProviderResponse { - return o.Payload -} - -func (o *GetLdapProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetLdapProviderDefault creates a GetLdapProviderDefault with default headers values -func NewGetLdapProviderDefault(code int) *GetLdapProviderDefault { - return &GetLdapProviderDefault{ - _statusCode: code, - } -} - -/* -GetLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get ldap provider default response has a 2xx status code -func (o *GetLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ldap provider default response has a 3xx status code -func (o *GetLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ldap provider default response has a 4xx status code -func (o *GetLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ldap provider default response has a 5xx status code -func (o *GetLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ldap provider default response a status code equal to that given -func (o *GetLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ldap provider default response -func (o *GetLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *GetLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider][%d] GetLdapProvider default %s", o._statusCode, payload) -} - -func (o *GetLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider][%d] GetLdapProvider default %s", o._statusCode, payload) -} - -func (o *GetLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetLdapProviderDefault) 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/ldap_provider/get_ldap_provider_status_parameters.go b/v1/client/ldap_provider/get_ldap_provider_status_parameters.go deleted file mode 100644 index e69e9ff1..00000000 --- a/v1/client/ldap_provider/get_ldap_provider_status_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/go-openapi/swag" -) - -// NewGetLdapProviderStatusParams creates a new GetLdapProviderStatusParams 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 NewGetLdapProviderStatusParams() *GetLdapProviderStatusParams { - return &GetLdapProviderStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLdapProviderStatusParamsWithTimeout creates a new GetLdapProviderStatusParams object -// with the ability to set a timeout on a request. -func NewGetLdapProviderStatusParamsWithTimeout(timeout time.Duration) *GetLdapProviderStatusParams { - return &GetLdapProviderStatusParams{ - timeout: timeout, - } -} - -// NewGetLdapProviderStatusParamsWithContext creates a new GetLdapProviderStatusParams object -// with the ability to set a context for a request. -func NewGetLdapProviderStatusParamsWithContext(ctx context.Context) *GetLdapProviderStatusParams { - return &GetLdapProviderStatusParams{ - Context: ctx, - } -} - -// NewGetLdapProviderStatusParamsWithHTTPClient creates a new GetLdapProviderStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLdapProviderStatusParamsWithHTTPClient(client *http.Client) *GetLdapProviderStatusParams { - return &GetLdapProviderStatusParams{ - HTTPClient: client, - } -} - -/* -GetLdapProviderStatusParams contains all the parameters to send to the API endpoint - - for the get ldap provider status operation. - - Typically these are written to a http.Request. -*/ -type GetLdapProviderStatusParams struct { - - /* ID. - - Specifies the LDAP Id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ldap provider status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapProviderStatusParams) WithDefaults() *GetLdapProviderStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ldap provider status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapProviderStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ldap provider status params -func (o *GetLdapProviderStatusParams) WithTimeout(timeout time.Duration) *GetLdapProviderStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ldap provider status params -func (o *GetLdapProviderStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ldap provider status params -func (o *GetLdapProviderStatusParams) WithContext(ctx context.Context) *GetLdapProviderStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ldap provider status params -func (o *GetLdapProviderStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ldap provider status params -func (o *GetLdapProviderStatusParams) WithHTTPClient(client *http.Client) *GetLdapProviderStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ldap provider status params -func (o *GetLdapProviderStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get ldap provider status params -func (o *GetLdapProviderStatusParams) WithID(id int64) *GetLdapProviderStatusParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get ldap provider status params -func (o *GetLdapProviderStatusParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLdapProviderStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/ldap_provider/get_ldap_provider_status_responses.go b/v1/client/ldap_provider/get_ldap_provider_status_responses.go deleted file mode 100644 index e916a004..00000000 --- a/v1/client/ldap_provider/get_ldap_provider_status_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetLdapProviderStatusReader is a Reader for the GetLdapProviderStatus structure. -type GetLdapProviderStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLdapProviderStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGetLdapProviderStatusCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLdapProviderStatusDefault(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 - } -} - -// NewGetLdapProviderStatusCreated creates a GetLdapProviderStatusCreated with default headers values -func NewGetLdapProviderStatusCreated() *GetLdapProviderStatusCreated { - return &GetLdapProviderStatusCreated{} -} - -/* -GetLdapProviderStatusCreated describes a response with status code 201, with default header values. - -No Content -*/ -type GetLdapProviderStatusCreated struct { -} - -// IsSuccess returns true when this get ldap provider status created response has a 2xx status code -func (o *GetLdapProviderStatusCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ldap provider status created response has a 3xx status code -func (o *GetLdapProviderStatusCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ldap provider status created response has a 4xx status code -func (o *GetLdapProviderStatusCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ldap provider status created response has a 5xx status code -func (o *GetLdapProviderStatusCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this get ldap provider status created response a status code equal to that given -func (o *GetLdapProviderStatusCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the get ldap provider status created response -func (o *GetLdapProviderStatusCreated) Code() int { - return 201 -} - -func (o *GetLdapProviderStatusCreated) Error() string { - return fmt.Sprintf("[GET /public/ldapProvider/{id}/status][%d] getLdapProviderStatusCreated", 201) -} - -func (o *GetLdapProviderStatusCreated) String() string { - return fmt.Sprintf("[GET /public/ldapProvider/{id}/status][%d] getLdapProviderStatusCreated", 201) -} - -func (o *GetLdapProviderStatusCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetLdapProviderStatusDefault creates a GetLdapProviderStatusDefault with default headers values -func NewGetLdapProviderStatusDefault(code int) *GetLdapProviderStatusDefault { - return &GetLdapProviderStatusDefault{ - _statusCode: code, - } -} - -/* -GetLdapProviderStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetLdapProviderStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get ldap provider status default response has a 2xx status code -func (o *GetLdapProviderStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ldap provider status default response has a 3xx status code -func (o *GetLdapProviderStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ldap provider status default response has a 4xx status code -func (o *GetLdapProviderStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ldap provider status default response has a 5xx status code -func (o *GetLdapProviderStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ldap provider status default response a status code equal to that given -func (o *GetLdapProviderStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ldap provider status default response -func (o *GetLdapProviderStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetLdapProviderStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider/{id}/status][%d] GetLdapProviderStatus default %s", o._statusCode, payload) -} - -func (o *GetLdapProviderStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/ldapProvider/{id}/status][%d] GetLdapProviderStatus default %s", o._statusCode, payload) -} - -func (o *GetLdapProviderStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetLdapProviderStatusDefault) 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/ldap_provider/ldap_provider_client.go b/v1/client/ldap_provider/ldap_provider_client.go deleted file mode 100644 index 59e35ce9..00000000 --- a/v1/client/ldap_provider/ldap_provider_client.go +++ /dev/null @@ -1,267 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new ldap provider API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new ldap provider API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new ldap provider API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for ldap provider API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateLdapProvider(params *CreateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateLdapProviderCreated, error) - - DeleteLdapProvider(params *DeleteLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLdapProviderNoContent, error) - - GetLdapProvider(params *GetLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapProviderOK, error) - - GetLdapProviderStatus(params *GetLdapProviderStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapProviderStatusCreated, error) - - UpdateLdapProvider(params *UpdateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLdapProviderCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateLdapProvider creates a l d a p provider - -Returns the created LDAP provider. -*/ -func (a *Client) CreateLdapProvider(params *CreateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateLdapProviderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "CreateLdapProvider", - Method: "POST", - PathPattern: "/public/ldapProvider", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateLdapProviderReader{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.(*CreateLdapProviderCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteLdapProvider deletes an l d a p provider -*/ -func (a *Client) DeleteLdapProvider(params *DeleteLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLdapProviderNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteLdapProvider", - Method: "DELETE", - PathPattern: "/public/ldapProvider/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteLdapProviderReader{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.(*DeleteLdapProviderNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetLdapProvider lists the l d a p providers -*/ -func (a *Client) GetLdapProvider(params *GetLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "GetLdapProvider", - Method: "GET", - PathPattern: "/public/ldapProvider", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetLdapProviderReader{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.(*GetLdapProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetLdapProviderStatus gets the connection status of an l d a p provider -*/ -func (a *Client) GetLdapProviderStatus(params *GetLdapProviderStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapProviderStatusCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLdapProviderStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetLdapProviderStatus", - Method: "GET", - PathPattern: "/public/ldapProvider/{id}/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetLdapProviderStatusReader{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.(*GetLdapProviderStatusCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLdapProviderStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateLdapProvider updates an l d a p provider - -Returns the updated LDAP provider. -*/ -func (a *Client) UpdateLdapProvider(params *UpdateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLdapProviderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateLdapProvider", - Method: "PUT", - PathPattern: "/public/ldapProvider", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateLdapProviderReader{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.(*UpdateLdapProviderCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateLdapProviderDefault) - 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/ldap_provider/update_ldap_provider_parameters.go b/v1/client/ldap_provider/update_ldap_provider_parameters.go deleted file mode 100644 index ec803eeb..00000000 --- a/v1/client/ldap_provider/update_ldap_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateLdapProviderParams creates a new UpdateLdapProviderParams 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 NewUpdateLdapProviderParams() *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateLdapProviderParamsWithTimeout creates a new UpdateLdapProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateLdapProviderParamsWithTimeout(timeout time.Duration) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - timeout: timeout, - } -} - -// NewUpdateLdapProviderParamsWithContext creates a new UpdateLdapProviderParams object -// with the ability to set a context for a request. -func NewUpdateLdapProviderParamsWithContext(ctx context.Context) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - Context: ctx, - } -} - -// NewUpdateLdapProviderParamsWithHTTPClient creates a new UpdateLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateLdapProviderParamsWithHTTPClient(client *http.Client) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateLdapProviderParams contains all the parameters to send to the API endpoint - - for the update ldap provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateLdapProviderParams struct { - - /* Body. - - Request to update a LDAP provider. - */ - Body *models.UpdateLdapProviderParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLdapProviderParams) WithDefaults() *UpdateLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update ldap provider params -func (o *UpdateLdapProviderParams) WithTimeout(timeout time.Duration) *UpdateLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update ldap provider params -func (o *UpdateLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update ldap provider params -func (o *UpdateLdapProviderParams) WithContext(ctx context.Context) *UpdateLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update ldap provider params -func (o *UpdateLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update ldap provider params -func (o *UpdateLdapProviderParams) WithHTTPClient(client *http.Client) *UpdateLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update ldap provider params -func (o *UpdateLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update ldap provider params -func (o *UpdateLdapProviderParams) WithBody(body *models.UpdateLdapProviderParam) *UpdateLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update ldap provider params -func (o *UpdateLdapProviderParams) SetBody(body *models.UpdateLdapProviderParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateLdapProviderParams) 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/ldap_provider/update_ldap_provider_responses.go b/v1/client/ldap_provider/update_ldap_provider_responses.go deleted file mode 100644 index c3eaa338..00000000 --- a/v1/client/ldap_provider/update_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ldap_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateLdapProviderReader is a Reader for the UpdateLdapProvider structure. -type UpdateLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpdateLdapProviderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateLdapProviderDefault(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 - } -} - -// NewUpdateLdapProviderCreated creates a UpdateLdapProviderCreated with default headers values -func NewUpdateLdapProviderCreated() *UpdateLdapProviderCreated { - return &UpdateLdapProviderCreated{} -} - -/* -UpdateLdapProviderCreated describes a response with status code 201, with default header values. - -Success -*/ -type UpdateLdapProviderCreated struct { - Payload *models.LdapProviderResponse -} - -// IsSuccess returns true when this update ldap provider created response has a 2xx status code -func (o *UpdateLdapProviderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update ldap provider created response has a 3xx status code -func (o *UpdateLdapProviderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update ldap provider created response has a 4xx status code -func (o *UpdateLdapProviderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this update ldap provider created response has a 5xx status code -func (o *UpdateLdapProviderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this update ldap provider created response a status code equal to that given -func (o *UpdateLdapProviderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the update ldap provider created response -func (o *UpdateLdapProviderCreated) Code() int { - return 201 -} - -func (o *UpdateLdapProviderCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ldapProvider][%d] updateLdapProviderCreated %s", 201, payload) -} - -func (o *UpdateLdapProviderCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ldapProvider][%d] updateLdapProviderCreated %s", 201, payload) -} - -func (o *UpdateLdapProviderCreated) GetPayload() *models.LdapProviderResponse { - return o.Payload -} - -func (o *UpdateLdapProviderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LdapProviderResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateLdapProviderDefault creates a UpdateLdapProviderDefault with default headers values -func NewUpdateLdapProviderDefault(code int) *UpdateLdapProviderDefault { - return &UpdateLdapProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update ldap provider default response has a 2xx status code -func (o *UpdateLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update ldap provider default response has a 3xx status code -func (o *UpdateLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update ldap provider default response has a 4xx status code -func (o *UpdateLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update ldap provider default response has a 5xx status code -func (o *UpdateLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update ldap provider default response a status code equal to that given -func (o *UpdateLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update ldap provider default response -func (o *UpdateLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ldapProvider][%d] UpdateLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/ldapProvider][%d] UpdateLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateLdapProviderDefault) 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/license_agreement/accept_license_parameters.go b/v1/client/license_agreement/accept_license_parameters.go deleted file mode 100644 index 9328bd13..00000000 --- a/v1/client/license_agreement/accept_license_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package license_agreement - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAcceptLicenseParams creates a new AcceptLicenseParams 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 NewAcceptLicenseParams() *AcceptLicenseParams { - return &AcceptLicenseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAcceptLicenseParamsWithTimeout creates a new AcceptLicenseParams object -// with the ability to set a timeout on a request. -func NewAcceptLicenseParamsWithTimeout(timeout time.Duration) *AcceptLicenseParams { - return &AcceptLicenseParams{ - timeout: timeout, - } -} - -// NewAcceptLicenseParamsWithContext creates a new AcceptLicenseParams object -// with the ability to set a context for a request. -func NewAcceptLicenseParamsWithContext(ctx context.Context) *AcceptLicenseParams { - return &AcceptLicenseParams{ - Context: ctx, - } -} - -// NewAcceptLicenseParamsWithHTTPClient creates a new AcceptLicenseParams object -// with the ability to set a custom HTTPClient for a request. -func NewAcceptLicenseParamsWithHTTPClient(client *http.Client) *AcceptLicenseParams { - return &AcceptLicenseParams{ - HTTPClient: client, - } -} - -/* -AcceptLicenseParams contains all the parameters to send to the API endpoint - - for the accept license operation. - - Typically these are written to a http.Request. -*/ -type AcceptLicenseParams struct { - - /* Body. - - Request to accept EULA. - */ - Body *models.EulaConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the accept license params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AcceptLicenseParams) WithDefaults() *AcceptLicenseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the accept license params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AcceptLicenseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the accept license params -func (o *AcceptLicenseParams) WithTimeout(timeout time.Duration) *AcceptLicenseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the accept license params -func (o *AcceptLicenseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the accept license params -func (o *AcceptLicenseParams) WithContext(ctx context.Context) *AcceptLicenseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the accept license params -func (o *AcceptLicenseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the accept license params -func (o *AcceptLicenseParams) WithHTTPClient(client *http.Client) *AcceptLicenseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the accept license params -func (o *AcceptLicenseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the accept license params -func (o *AcceptLicenseParams) WithBody(body *models.EulaConfig) *AcceptLicenseParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the accept license params -func (o *AcceptLicenseParams) SetBody(body *models.EulaConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AcceptLicenseParams) 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/license_agreement/accept_license_responses.go b/v1/client/license_agreement/accept_license_responses.go deleted file mode 100644 index ff475117..00000000 --- a/v1/client/license_agreement/accept_license_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package license_agreement - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AcceptLicenseReader is a Reader for the AcceptLicense structure. -type AcceptLicenseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AcceptLicenseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewAcceptLicenseNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAcceptLicenseDefault(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 - } -} - -// NewAcceptLicenseNoContent creates a AcceptLicenseNoContent with default headers values -func NewAcceptLicenseNoContent() *AcceptLicenseNoContent { - return &AcceptLicenseNoContent{} -} - -/* -AcceptLicenseNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type AcceptLicenseNoContent struct { -} - -// IsSuccess returns true when this accept license no content response has a 2xx status code -func (o *AcceptLicenseNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this accept license no content response has a 3xx status code -func (o *AcceptLicenseNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this accept license no content response has a 4xx status code -func (o *AcceptLicenseNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this accept license no content response has a 5xx status code -func (o *AcceptLicenseNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this accept license no content response a status code equal to that given -func (o *AcceptLicenseNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the accept license no content response -func (o *AcceptLicenseNoContent) Code() int { - return 204 -} - -func (o *AcceptLicenseNoContent) Error() string { - return fmt.Sprintf("[POST /public/licenseAgreement][%d] acceptLicenseNoContent", 204) -} - -func (o *AcceptLicenseNoContent) String() string { - return fmt.Sprintf("[POST /public/licenseAgreement][%d] acceptLicenseNoContent", 204) -} - -func (o *AcceptLicenseNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewAcceptLicenseDefault creates a AcceptLicenseDefault with default headers values -func NewAcceptLicenseDefault(code int) *AcceptLicenseDefault { - return &AcceptLicenseDefault{ - _statusCode: code, - } -} - -/* -AcceptLicenseDefault describes a response with status code -1, with default header values. - -Error -*/ -type AcceptLicenseDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this accept license default response has a 2xx status code -func (o *AcceptLicenseDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this accept license default response has a 3xx status code -func (o *AcceptLicenseDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this accept license default response has a 4xx status code -func (o *AcceptLicenseDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this accept license default response has a 5xx status code -func (o *AcceptLicenseDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this accept license default response a status code equal to that given -func (o *AcceptLicenseDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the accept license default response -func (o *AcceptLicenseDefault) Code() int { - return o._statusCode -} - -func (o *AcceptLicenseDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/licenseAgreement][%d] AcceptLicense default %s", o._statusCode, payload) -} - -func (o *AcceptLicenseDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/licenseAgreement][%d] AcceptLicense default %s", o._statusCode, payload) -} - -func (o *AcceptLicenseDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AcceptLicenseDefault) 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/license_agreement/license_agreement_client.go b/v1/client/license_agreement/license_agreement_client.go deleted file mode 100644 index 32b90322..00000000 --- a/v1/client/license_agreement/license_agreement_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package license_agreement - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new license agreement API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new license agreement API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new license agreement API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for license agreement API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AcceptLicense(params *AcceptLicenseParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AcceptLicenseNoContent, error) - - UpdateEula(params *UpdateEulaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEulaOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AcceptLicense accepts license agreement - -Accepts license agreement. -*/ -func (a *Client) AcceptLicense(params *AcceptLicenseParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AcceptLicenseNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAcceptLicenseParams() - } - op := &runtime.ClientOperation{ - ID: "AcceptLicense", - Method: "POST", - PathPattern: "/public/licenseAgreement", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AcceptLicenseReader{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.(*AcceptLicenseNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AcceptLicenseDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateEula updates e u l a version - -Updates EULA version. -*/ -func (a *Client) UpdateEula(params *UpdateEulaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEulaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateEulaParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateEula", - Method: "PUT", - PathPattern: "/eulaConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateEulaReader{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.(*UpdateEulaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateEulaDefault) - 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/license_agreement/update_eula_parameters.go b/v1/client/license_agreement/update_eula_parameters.go deleted file mode 100644 index 6bb19a64..00000000 --- a/v1/client/license_agreement/update_eula_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package license_agreement - -// 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" -) - -// NewUpdateEulaParams creates a new UpdateEulaParams 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 NewUpdateEulaParams() *UpdateEulaParams { - return &UpdateEulaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateEulaParamsWithTimeout creates a new UpdateEulaParams object -// with the ability to set a timeout on a request. -func NewUpdateEulaParamsWithTimeout(timeout time.Duration) *UpdateEulaParams { - return &UpdateEulaParams{ - timeout: timeout, - } -} - -// NewUpdateEulaParamsWithContext creates a new UpdateEulaParams object -// with the ability to set a context for a request. -func NewUpdateEulaParamsWithContext(ctx context.Context) *UpdateEulaParams { - return &UpdateEulaParams{ - Context: ctx, - } -} - -// NewUpdateEulaParamsWithHTTPClient creates a new UpdateEulaParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateEulaParamsWithHTTPClient(client *http.Client) *UpdateEulaParams { - return &UpdateEulaParams{ - HTTPClient: client, - } -} - -/* -UpdateEulaParams contains all the parameters to send to the API endpoint - - for the update eula operation. - - Typically these are written to a http.Request. -*/ -type UpdateEulaParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update eula params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEulaParams) WithDefaults() *UpdateEulaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update eula params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEulaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update eula params -func (o *UpdateEulaParams) WithTimeout(timeout time.Duration) *UpdateEulaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update eula params -func (o *UpdateEulaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update eula params -func (o *UpdateEulaParams) WithContext(ctx context.Context) *UpdateEulaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update eula params -func (o *UpdateEulaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update eula params -func (o *UpdateEulaParams) WithHTTPClient(client *http.Client) *UpdateEulaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update eula params -func (o *UpdateEulaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateEulaParams) 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/license_agreement/update_eula_responses.go b/v1/client/license_agreement/update_eula_responses.go deleted file mode 100644 index c1e3ea02..00000000 --- a/v1/client/license_agreement/update_eula_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package license_agreement - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateEulaReader is a Reader for the UpdateEula structure. -type UpdateEulaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateEulaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateEulaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateEulaDefault(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 - } -} - -// NewUpdateEulaOK creates a UpdateEulaOK with default headers values -func NewUpdateEulaOK() *UpdateEulaOK { - return &UpdateEulaOK{} -} - -/* -UpdateEulaOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateEulaOK struct { - Payload *models.UpdateEulaConfig -} - -// IsSuccess returns true when this update eula o k response has a 2xx status code -func (o *UpdateEulaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update eula o k response has a 3xx status code -func (o *UpdateEulaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update eula o k response has a 4xx status code -func (o *UpdateEulaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update eula o k response has a 5xx status code -func (o *UpdateEulaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update eula o k response a status code equal to that given -func (o *UpdateEulaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update eula o k response -func (o *UpdateEulaOK) Code() int { - return 200 -} - -func (o *UpdateEulaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /eulaConfig][%d] updateEulaOK %s", 200, payload) -} - -func (o *UpdateEulaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /eulaConfig][%d] updateEulaOK %s", 200, payload) -} - -func (o *UpdateEulaOK) GetPayload() *models.UpdateEulaConfig { - return o.Payload -} - -func (o *UpdateEulaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateEulaConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateEulaDefault creates a UpdateEulaDefault with default headers values -func NewUpdateEulaDefault(code int) *UpdateEulaDefault { - return &UpdateEulaDefault{ - _statusCode: code, - } -} - -/* -UpdateEulaDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateEulaDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update eula default response has a 2xx status code -func (o *UpdateEulaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update eula default response has a 3xx status code -func (o *UpdateEulaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update eula default response has a 4xx status code -func (o *UpdateEulaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update eula default response has a 5xx status code -func (o *UpdateEulaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update eula default response a status code equal to that given -func (o *UpdateEulaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update eula default response -func (o *UpdateEulaDefault) Code() int { - return o._statusCode -} - -func (o *UpdateEulaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /eulaConfig][%d] UpdateEula default %s", o._statusCode, payload) -} - -func (o *UpdateEulaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /eulaConfig][%d] UpdateEula default %s", o._statusCode, payload) -} - -func (o *UpdateEulaDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateEulaDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/monitoring/get_all_job_runs_parameters.go b/v1/client/monitoring/get_all_job_runs_parameters.go deleted file mode 100644 index c34638ef..00000000 --- a/v1/client/monitoring/get_all_job_runs_parameters.go +++ /dev/null @@ -1,401 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/go-openapi/swag" -) - -// NewGetAllJobRunsParams creates a new GetAllJobRunsParams 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 NewGetAllJobRunsParams() *GetAllJobRunsParams { - return &GetAllJobRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAllJobRunsParamsWithTimeout creates a new GetAllJobRunsParams object -// with the ability to set a timeout on a request. -func NewGetAllJobRunsParamsWithTimeout(timeout time.Duration) *GetAllJobRunsParams { - return &GetAllJobRunsParams{ - timeout: timeout, - } -} - -// NewGetAllJobRunsParamsWithContext creates a new GetAllJobRunsParams object -// with the ability to set a context for a request. -func NewGetAllJobRunsParamsWithContext(ctx context.Context) *GetAllJobRunsParams { - return &GetAllJobRunsParams{ - Context: ctx, - } -} - -// NewGetAllJobRunsParamsWithHTTPClient creates a new GetAllJobRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAllJobRunsParamsWithHTTPClient(client *http.Client) *GetAllJobRunsParams { - return &GetAllJobRunsParams{ - HTTPClient: client, - } -} - -/* -GetAllJobRunsParams contains all the parameters to send to the API endpoint - - for the get all job runs operation. - - Typically these are written to a http.Request. -*/ -type GetAllJobRunsParams struct { - - /* EndTimeMsecs. - - Specifies the end time of the time range of interest. - - Format: int64 - */ - EndTimeMsecs int64 - - /* EnvTypes. - - Specifies the environment types of the job. - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - EnvTypes []string - - /* JobTypes. - - Specifies the job types for which runs are needed. - */ - JobTypes []string - - /* Page. - - Specifies the page number in case of pagination of response. - - Format: int32 - */ - Page *int32 - - /* PageSize. - - Specifies the size of the page in case of pagination of response. - - Format: int32 - */ - PageSize *int32 - - /* StartTimeMsecs. - - Specifies the start time of the time range of interest. - - Format: int64 - */ - StartTimeMsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get all job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllJobRunsParams) WithDefaults() *GetAllJobRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get all job runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllJobRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get all job runs params -func (o *GetAllJobRunsParams) WithTimeout(timeout time.Duration) *GetAllJobRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get all job runs params -func (o *GetAllJobRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get all job runs params -func (o *GetAllJobRunsParams) WithContext(ctx context.Context) *GetAllJobRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get all job runs params -func (o *GetAllJobRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get all job runs params -func (o *GetAllJobRunsParams) WithHTTPClient(client *http.Client) *GetAllJobRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get all job runs params -func (o *GetAllJobRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeMsecs adds the endTimeMsecs to the get all job runs params -func (o *GetAllJobRunsParams) WithEndTimeMsecs(endTimeMsecs int64) *GetAllJobRunsParams { - o.SetEndTimeMsecs(endTimeMsecs) - return o -} - -// SetEndTimeMsecs adds the endTimeMsecs to the get all job runs params -func (o *GetAllJobRunsParams) SetEndTimeMsecs(endTimeMsecs int64) { - o.EndTimeMsecs = endTimeMsecs -} - -// WithEnvTypes adds the envTypes to the get all job runs params -func (o *GetAllJobRunsParams) WithEnvTypes(envTypes []string) *GetAllJobRunsParams { - o.SetEnvTypes(envTypes) - return o -} - -// SetEnvTypes adds the envTypes to the get all job runs params -func (o *GetAllJobRunsParams) SetEnvTypes(envTypes []string) { - o.EnvTypes = envTypes -} - -// WithJobTypes adds the jobTypes to the get all job runs params -func (o *GetAllJobRunsParams) WithJobTypes(jobTypes []string) *GetAllJobRunsParams { - o.SetJobTypes(jobTypes) - return o -} - -// SetJobTypes adds the jobTypes to the get all job runs params -func (o *GetAllJobRunsParams) SetJobTypes(jobTypes []string) { - o.JobTypes = jobTypes -} - -// WithPage adds the page to the get all job runs params -func (o *GetAllJobRunsParams) WithPage(page *int32) *GetAllJobRunsParams { - o.SetPage(page) - return o -} - -// SetPage adds the page to the get all job runs params -func (o *GetAllJobRunsParams) SetPage(page *int32) { - o.Page = page -} - -// WithPageSize adds the pageSize to the get all job runs params -func (o *GetAllJobRunsParams) WithPageSize(pageSize *int32) *GetAllJobRunsParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the get all job runs params -func (o *GetAllJobRunsParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithStartTimeMsecs adds the startTimeMsecs to the get all job runs params -func (o *GetAllJobRunsParams) WithStartTimeMsecs(startTimeMsecs int64) *GetAllJobRunsParams { - o.SetStartTimeMsecs(startTimeMsecs) - return o -} - -// SetStartTimeMsecs adds the startTimeMsecs to the get all job runs params -func (o *GetAllJobRunsParams) SetStartTimeMsecs(startTimeMsecs int64) { - o.StartTimeMsecs = startTimeMsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAllJobRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param endTimeMsecs - qrEndTimeMsecs := o.EndTimeMsecs - qEndTimeMsecs := swag.FormatInt64(qrEndTimeMsecs) - if qEndTimeMsecs != "" { - - if err := r.SetQueryParam("endTimeMsecs", qEndTimeMsecs); err != nil { - return err - } - } - - if o.EnvTypes != nil { - - // binding items for envTypes - joinedEnvTypes := o.bindParamEnvTypes(reg) - - // query array param envTypes - if err := r.SetQueryParam("envTypes", joinedEnvTypes...); err != nil { - return err - } - } - - if o.JobTypes != nil { - - // binding items for jobTypes - joinedJobTypes := o.bindParamJobTypes(reg) - - // query array param jobTypes - if err := r.SetQueryParam("jobTypes", joinedJobTypes...); err != nil { - return err - } - } - - if o.Page != nil { - - // query param page - var qrPage int32 - - if o.Page != nil { - qrPage = *o.Page - } - qPage := swag.FormatInt32(qrPage) - if qPage != "" { - - if err := r.SetQueryParam("page", qPage); err != nil { - return err - } - } - } - - if o.PageSize != nil { - - // query param pageSize - var qrPageSize int32 - - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - - if err := r.SetQueryParam("pageSize", qPageSize); err != nil { - return err - } - } - } - - // query param startTimeMsecs - qrStartTimeMsecs := o.StartTimeMsecs - qStartTimeMsecs := swag.FormatInt64(qrStartTimeMsecs) - if qStartTimeMsecs != "" { - - if err := r.SetQueryParam("startTimeMsecs", qStartTimeMsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAllJobRuns binds the parameter envTypes -func (o *GetAllJobRunsParams) bindParamEnvTypes(formats strfmt.Registry) []string { - envTypesIR := o.EnvTypes - - var envTypesIC []string - for _, envTypesIIR := range envTypesIR { // explode []string - - envTypesIIV := envTypesIIR // string as string - envTypesIC = append(envTypesIC, envTypesIIV) - } - - // items.CollectionFormat: "" - envTypesIS := swag.JoinByFormat(envTypesIC, "") - - return envTypesIS -} - -// bindParamGetAllJobRuns binds the parameter jobTypes -func (o *GetAllJobRunsParams) bindParamJobTypes(formats strfmt.Registry) []string { - jobTypesIR := o.JobTypes - - var jobTypesIC []string - for _, jobTypesIIR := range jobTypesIR { // explode []string - - jobTypesIIV := jobTypesIIR // string as string - jobTypesIC = append(jobTypesIC, jobTypesIIV) - } - - // items.CollectionFormat: "" - jobTypesIS := swag.JoinByFormat(jobTypesIC, "") - - return jobTypesIS -} diff --git a/v1/client/monitoring/get_all_job_runs_responses.go b/v1/client/monitoring/get_all_job_runs_responses.go deleted file mode 100644 index 9b1fed31..00000000 --- a/v1/client/monitoring/get_all_job_runs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAllJobRunsReader is a Reader for the GetAllJobRuns structure. -type GetAllJobRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAllJobRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAllJobRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAllJobRunsDefault(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 - } -} - -// NewGetAllJobRunsOK creates a GetAllJobRunsOK with default headers values -func NewGetAllJobRunsOK() *GetAllJobRunsOK { - return &GetAllJobRunsOK{} -} - -/* -GetAllJobRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAllJobRunsOK struct { - Payload []*models.GetAllJobRunsResult -} - -// IsSuccess returns true when this get all job runs o k response has a 2xx status code -func (o *GetAllJobRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get all job runs o k response has a 3xx status code -func (o *GetAllJobRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all job runs o k response has a 4xx status code -func (o *GetAllJobRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all job runs o k response has a 5xx status code -func (o *GetAllJobRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get all job runs o k response a status code equal to that given -func (o *GetAllJobRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get all job runs o k response -func (o *GetAllJobRunsOK) Code() int { - return 200 -} - -func (o *GetAllJobRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobs][%d] getAllJobRunsOK %s", 200, payload) -} - -func (o *GetAllJobRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobs][%d] getAllJobRunsOK %s", 200, payload) -} - -func (o *GetAllJobRunsOK) GetPayload() []*models.GetAllJobRunsResult { - return o.Payload -} - -func (o *GetAllJobRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllJobRunsDefault creates a GetAllJobRunsDefault with default headers values -func NewGetAllJobRunsDefault(code int) *GetAllJobRunsDefault { - return &GetAllJobRunsDefault{ - _statusCode: code, - } -} - -/* -GetAllJobRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAllJobRunsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get all job runs default response has a 2xx status code -func (o *GetAllJobRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get all job runs default response has a 3xx status code -func (o *GetAllJobRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get all job runs default response has a 4xx status code -func (o *GetAllJobRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get all job runs default response has a 5xx status code -func (o *GetAllJobRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get all job runs default response a status code equal to that given -func (o *GetAllJobRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get all job runs default response -func (o *GetAllJobRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetAllJobRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobs][%d] GetAllJobRuns default %s", o._statusCode, payload) -} - -func (o *GetAllJobRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobs][%d] GetAllJobRuns default %s", o._statusCode, payload) -} - -func (o *GetAllJobRunsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAllJobRunsDefault) 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/monitoring/get_job_run_info_parameters.go b/v1/client/monitoring/get_job_run_info_parameters.go deleted file mode 100644 index 0da5e85c..00000000 --- a/v1/client/monitoring/get_job_run_info_parameters.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/go-openapi/swag" -) - -// NewGetJobRunInfoParams creates a new GetJobRunInfoParams 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 NewGetJobRunInfoParams() *GetJobRunInfoParams { - return &GetJobRunInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetJobRunInfoParamsWithTimeout creates a new GetJobRunInfoParams object -// with the ability to set a timeout on a request. -func NewGetJobRunInfoParamsWithTimeout(timeout time.Duration) *GetJobRunInfoParams { - return &GetJobRunInfoParams{ - timeout: timeout, - } -} - -// NewGetJobRunInfoParamsWithContext creates a new GetJobRunInfoParams object -// with the ability to set a context for a request. -func NewGetJobRunInfoParamsWithContext(ctx context.Context) *GetJobRunInfoParams { - return &GetJobRunInfoParams{ - Context: ctx, - } -} - -// NewGetJobRunInfoParamsWithHTTPClient creates a new GetJobRunInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetJobRunInfoParamsWithHTTPClient(client *http.Client) *GetJobRunInfoParams { - return &GetJobRunInfoParams{ - HTTPClient: client, - } -} - -/* -GetJobRunInfoParams contains all the parameters to send to the API endpoint - - for the get job run info operation. - - Typically these are written to a http.Request. -*/ -type GetJobRunInfoParams struct { - - /* JobID. - - Specifies the job id of the needed run. - - Format: int64 - */ - JobID int64 - - /* JobRunID. - - Specifies the job run id of the needed run. - - Format: int64 - */ - JobRunID int64 - - /* JobType. - - Specifies the job type of the needed run. - */ - JobType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get job run info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetJobRunInfoParams) WithDefaults() *GetJobRunInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get job run info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetJobRunInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get job run info params -func (o *GetJobRunInfoParams) WithTimeout(timeout time.Duration) *GetJobRunInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get job run info params -func (o *GetJobRunInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get job run info params -func (o *GetJobRunInfoParams) WithContext(ctx context.Context) *GetJobRunInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get job run info params -func (o *GetJobRunInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get job run info params -func (o *GetJobRunInfoParams) WithHTTPClient(client *http.Client) *GetJobRunInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get job run info params -func (o *GetJobRunInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithJobID adds the jobID to the get job run info params -func (o *GetJobRunInfoParams) WithJobID(jobID int64) *GetJobRunInfoParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get job run info params -func (o *GetJobRunInfoParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobRunID adds the jobRunID to the get job run info params -func (o *GetJobRunInfoParams) WithJobRunID(jobRunID int64) *GetJobRunInfoParams { - o.SetJobRunID(jobRunID) - return o -} - -// SetJobRunID adds the jobRunId to the get job run info params -func (o *GetJobRunInfoParams) SetJobRunID(jobRunID int64) { - o.JobRunID = jobRunID -} - -// WithJobType adds the jobType to the get job run info params -func (o *GetJobRunInfoParams) WithJobType(jobType string) *GetJobRunInfoParams { - o.SetJobType(jobType) - return o -} - -// SetJobType adds the jobType to the get job run info params -func (o *GetJobRunInfoParams) SetJobType(jobType string) { - o.JobType = jobType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetJobRunInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobRunId - qrJobRunID := o.JobRunID - qJobRunID := swag.FormatInt64(qrJobRunID) - if qJobRunID != "" { - - if err := r.SetQueryParam("jobRunId", qJobRunID); err != nil { - return err - } - } - - // query param jobType - qrJobType := o.JobType - qJobType := qrJobType - if qJobType != "" { - - if err := r.SetQueryParam("jobType", qJobType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/monitoring/get_job_run_info_responses.go b/v1/client/monitoring/get_job_run_info_responses.go deleted file mode 100644 index 742758b5..00000000 --- a/v1/client/monitoring/get_job_run_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetJobRunInfoReader is a Reader for the GetJobRunInfo structure. -type GetJobRunInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetJobRunInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetJobRunInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetJobRunInfoDefault(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 - } -} - -// NewGetJobRunInfoOK creates a GetJobRunInfoOK with default headers values -func NewGetJobRunInfoOK() *GetJobRunInfoOK { - return &GetJobRunInfoOK{} -} - -/* -GetJobRunInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetJobRunInfoOK struct { - Payload *models.GetJobRunInfoResult -} - -// IsSuccess returns true when this get job run info o k response has a 2xx status code -func (o *GetJobRunInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get job run info o k response has a 3xx status code -func (o *GetJobRunInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get job run info o k response has a 4xx status code -func (o *GetJobRunInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get job run info o k response has a 5xx status code -func (o *GetJobRunInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get job run info o k response a status code equal to that given -func (o *GetJobRunInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get job run info o k response -func (o *GetJobRunInfoOK) Code() int { - return 200 -} - -func (o *GetJobRunInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobRunInfo][%d] getJobRunInfoOK %s", 200, payload) -} - -func (o *GetJobRunInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobRunInfo][%d] getJobRunInfoOK %s", 200, payload) -} - -func (o *GetJobRunInfoOK) GetPayload() *models.GetJobRunInfoResult { - return o.Payload -} - -func (o *GetJobRunInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetJobRunInfoResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetJobRunInfoDefault creates a GetJobRunInfoDefault with default headers values -func NewGetJobRunInfoDefault(code int) *GetJobRunInfoDefault { - return &GetJobRunInfoDefault{ - _statusCode: code, - } -} - -/* -GetJobRunInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetJobRunInfoDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get job run info default response has a 2xx status code -func (o *GetJobRunInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get job run info default response has a 3xx status code -func (o *GetJobRunInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get job run info default response has a 4xx status code -func (o *GetJobRunInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get job run info default response has a 5xx status code -func (o *GetJobRunInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get job run info default response a status code equal to that given -func (o *GetJobRunInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get job run info default response -func (o *GetJobRunInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetJobRunInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobRunInfo][%d] GetJobRunInfo default %s", o._statusCode, payload) -} - -func (o *GetJobRunInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/jobRunInfo][%d] GetJobRunInfo default %s", o._statusCode, payload) -} - -func (o *GetJobRunInfoDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetJobRunInfoDefault) 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/monitoring/get_run_objects_details_parameters.go b/v1/client/monitoring/get_run_objects_details_parameters.go deleted file mode 100644 index 9210dd81..00000000 --- a/v1/client/monitoring/get_run_objects_details_parameters.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/go-openapi/swag" -) - -// NewGetRunObjectsDetailsParams creates a new GetRunObjectsDetailsParams 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 NewGetRunObjectsDetailsParams() *GetRunObjectsDetailsParams { - return &GetRunObjectsDetailsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunObjectsDetailsParamsWithTimeout creates a new GetRunObjectsDetailsParams object -// with the ability to set a timeout on a request. -func NewGetRunObjectsDetailsParamsWithTimeout(timeout time.Duration) *GetRunObjectsDetailsParams { - return &GetRunObjectsDetailsParams{ - timeout: timeout, - } -} - -// NewGetRunObjectsDetailsParamsWithContext creates a new GetRunObjectsDetailsParams object -// with the ability to set a context for a request. -func NewGetRunObjectsDetailsParamsWithContext(ctx context.Context) *GetRunObjectsDetailsParams { - return &GetRunObjectsDetailsParams{ - Context: ctx, - } -} - -// NewGetRunObjectsDetailsParamsWithHTTPClient creates a new GetRunObjectsDetailsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRunObjectsDetailsParamsWithHTTPClient(client *http.Client) *GetRunObjectsDetailsParams { - return &GetRunObjectsDetailsParams{ - HTTPClient: client, - } -} - -/* -GetRunObjectsDetailsParams contains all the parameters to send to the API endpoint - - for the get run objects details operation. - - Typically these are written to a http.Request. -*/ -type GetRunObjectsDetailsParams struct { - - /* JobID. - - Specifies the job id of the needed run. - - Format: int64 - */ - JobID int64 - - /* JobRunID. - - Specifies the job run id of the needed run. - - Format: int64 - */ - JobRunID int64 - - /* JobType. - - Specifies the job type of the needed run. - */ - JobType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get run objects details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunObjectsDetailsParams) WithDefaults() *GetRunObjectsDetailsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get run objects details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunObjectsDetailsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithTimeout(timeout time.Duration) *GetRunObjectsDetailsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithContext(ctx context.Context) *GetRunObjectsDetailsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithHTTPClient(client *http.Client) *GetRunObjectsDetailsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithJobID adds the jobID to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithJobID(jobID int64) *GetRunObjectsDetailsParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobRunID adds the jobRunID to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithJobRunID(jobRunID int64) *GetRunObjectsDetailsParams { - o.SetJobRunID(jobRunID) - return o -} - -// SetJobRunID adds the jobRunId to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetJobRunID(jobRunID int64) { - o.JobRunID = jobRunID -} - -// WithJobType adds the jobType to the get run objects details params -func (o *GetRunObjectsDetailsParams) WithJobType(jobType string) *GetRunObjectsDetailsParams { - o.SetJobType(jobType) - return o -} - -// SetJobType adds the jobType to the get run objects details params -func (o *GetRunObjectsDetailsParams) SetJobType(jobType string) { - o.JobType = jobType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunObjectsDetailsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobRunId - qrJobRunID := o.JobRunID - qJobRunID := swag.FormatInt64(qrJobRunID) - if qJobRunID != "" { - - if err := r.SetQueryParam("jobRunId", qJobRunID); err != nil { - return err - } - } - - // query param jobType - qrJobType := o.JobType - qJobType := qrJobType - if qJobType != "" { - - if err := r.SetQueryParam("jobType", qJobType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/monitoring/get_run_objects_details_responses.go b/v1/client/monitoring/get_run_objects_details_responses.go deleted file mode 100644 index 3cb51092..00000000 --- a/v1/client/monitoring/get_run_objects_details_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRunObjectsDetailsReader is a Reader for the GetRunObjectsDetails structure. -type GetRunObjectsDetailsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunObjectsDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRunObjectsDetailsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRunObjectsDetailsDefault(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 - } -} - -// NewGetRunObjectsDetailsOK creates a GetRunObjectsDetailsOK with default headers values -func NewGetRunObjectsDetailsOK() *GetRunObjectsDetailsOK { - return &GetRunObjectsDetailsOK{} -} - -/* -GetRunObjectsDetailsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRunObjectsDetailsOK struct { - Payload []*models.GetObjectsDetailsResult -} - -// IsSuccess returns true when this get run objects details o k response has a 2xx status code -func (o *GetRunObjectsDetailsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get run objects details o k response has a 3xx status code -func (o *GetRunObjectsDetailsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get run objects details o k response has a 4xx status code -func (o *GetRunObjectsDetailsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get run objects details o k response has a 5xx status code -func (o *GetRunObjectsDetailsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get run objects details o k response a status code equal to that given -func (o *GetRunObjectsDetailsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get run objects details o k response -func (o *GetRunObjectsDetailsOK) Code() int { - return 200 -} - -func (o *GetRunObjectsDetailsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/objectDetails][%d] getRunObjectsDetailsOK %s", 200, payload) -} - -func (o *GetRunObjectsDetailsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/objectDetails][%d] getRunObjectsDetailsOK %s", 200, payload) -} - -func (o *GetRunObjectsDetailsOK) GetPayload() []*models.GetObjectsDetailsResult { - return o.Payload -} - -func (o *GetRunObjectsDetailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRunObjectsDetailsDefault creates a GetRunObjectsDetailsDefault with default headers values -func NewGetRunObjectsDetailsDefault(code int) *GetRunObjectsDetailsDefault { - return &GetRunObjectsDetailsDefault{ - _statusCode: code, - } -} - -/* -GetRunObjectsDetailsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRunObjectsDetailsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get run objects details default response has a 2xx status code -func (o *GetRunObjectsDetailsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get run objects details default response has a 3xx status code -func (o *GetRunObjectsDetailsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get run objects details default response has a 4xx status code -func (o *GetRunObjectsDetailsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get run objects details default response has a 5xx status code -func (o *GetRunObjectsDetailsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get run objects details default response a status code equal to that given -func (o *GetRunObjectsDetailsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get run objects details default response -func (o *GetRunObjectsDetailsDefault) Code() int { - return o._statusCode -} - -func (o *GetRunObjectsDetailsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/objectDetails][%d] GetRunObjectsDetails default %s", o._statusCode, payload) -} - -func (o *GetRunObjectsDetailsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/monitoring/objectDetails][%d] GetRunObjectsDetails default %s", o._statusCode, payload) -} - -func (o *GetRunObjectsDetailsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRunObjectsDetailsDefault) 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/monitoring/monitoring_client.go b/v1/client/monitoring/monitoring_client.go deleted file mode 100644 index 32b6b465..00000000 --- a/v1/client/monitoring/monitoring_client.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package monitoring - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new monitoring API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new monitoring API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new monitoring API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for monitoring API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAllJobRuns(params *GetAllJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllJobRunsOK, error) - - GetJobRunInfo(params *GetJobRunInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobRunInfoOK, error) - - GetRunObjectsDetails(params *GetRunObjectsDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunObjectsDetailsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetAllJobRuns lists runs of all the jobs - - Returns the job runs for the filters. - -Specifying parameters can alter the results that are returned. -*/ -func (a *Client) GetAllJobRuns(params *GetAllJobRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllJobRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAllJobRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAllJobRuns", - Method: "GET", - PathPattern: "/public/monitoring/jobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAllJobRunsReader{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.(*GetAllJobRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAllJobRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetJobRunInfo lists info related to a job run - -Returns the run details for the job run. -*/ -func (a *Client) GetJobRunInfo(params *GetJobRunInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetJobRunInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetJobRunInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetJobRunInfo", - Method: "GET", - PathPattern: "/public/monitoring/jobRunInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetJobRunInfoReader{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.(*GetJobRunInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetJobRunInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRunObjectsDetails lists details of objects in a job run - -Returns the objects details for the job run. -*/ -func (a *Client) GetRunObjectsDetails(params *GetRunObjectsDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunObjectsDetailsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRunObjectsDetailsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRunObjectsDetails", - Method: "GET", - PathPattern: "/public/monitoring/objectDetails", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRunObjectsDetailsReader{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.(*GetRunObjectsDetailsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRunObjectsDetailsDefault) - 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/network/append_hosts_parameters.go b/v1/client/network/append_hosts_parameters.go deleted file mode 100644 index ab5aed95..00000000 --- a/v1/client/network/append_hosts_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAppendHostsParams creates a new AppendHostsParams 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 NewAppendHostsParams() *AppendHostsParams { - return &AppendHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAppendHostsParamsWithTimeout creates a new AppendHostsParams object -// with the ability to set a timeout on a request. -func NewAppendHostsParamsWithTimeout(timeout time.Duration) *AppendHostsParams { - return &AppendHostsParams{ - timeout: timeout, - } -} - -// NewAppendHostsParamsWithContext creates a new AppendHostsParams object -// with the ability to set a context for a request. -func NewAppendHostsParamsWithContext(ctx context.Context) *AppendHostsParams { - return &AppendHostsParams{ - Context: ctx, - } -} - -// NewAppendHostsParamsWithHTTPClient creates a new AppendHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewAppendHostsParamsWithHTTPClient(client *http.Client) *AppendHostsParams { - return &AppendHostsParams{ - HTTPClient: client, - } -} - -/* -AppendHostsParams contains all the parameters to send to the API endpoint - - for the append hosts operation. - - Typically these are written to a http.Request. -*/ -type AppendHostsParams struct { - - // Body. - Body *models.AppendHostsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the append hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AppendHostsParams) WithDefaults() *AppendHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the append hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AppendHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the append hosts params -func (o *AppendHostsParams) WithTimeout(timeout time.Duration) *AppendHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the append hosts params -func (o *AppendHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the append hosts params -func (o *AppendHostsParams) WithContext(ctx context.Context) *AppendHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the append hosts params -func (o *AppendHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the append hosts params -func (o *AppendHostsParams) WithHTTPClient(client *http.Client) *AppendHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the append hosts params -func (o *AppendHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the append hosts params -func (o *AppendHostsParams) WithBody(body *models.AppendHostsParameters) *AppendHostsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the append hosts params -func (o *AppendHostsParams) SetBody(body *models.AppendHostsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AppendHostsParams) 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/append_hosts_responses.go b/v1/client/network/append_hosts_responses.go deleted file mode 100644 index be4658b1..00000000 --- a/v1/client/network/append_hosts_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AppendHostsReader is a Reader for the AppendHosts structure. -type AppendHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AppendHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAppendHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAppendHostsDefault(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 - } -} - -// NewAppendHostsOK creates a AppendHostsOK with default headers values -func NewAppendHostsOK() *AppendHostsOK { - return &AppendHostsOK{} -} - -/* -AppendHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type AppendHostsOK struct { - Payload *models.HostResult -} - -// IsSuccess returns true when this append hosts o k response has a 2xx status code -func (o *AppendHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this append hosts o k response has a 3xx status code -func (o *AppendHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this append hosts o k response has a 4xx status code -func (o *AppendHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this append hosts o k response has a 5xx status code -func (o *AppendHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this append hosts o k response a status code equal to that given -func (o *AppendHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the append hosts o k response -func (o *AppendHostsOK) Code() int { - return 200 -} - -func (o *AppendHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/hosts][%d] appendHostsOK %s", 200, payload) -} - -func (o *AppendHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/hosts][%d] appendHostsOK %s", 200, payload) -} - -func (o *AppendHostsOK) GetPayload() *models.HostResult { - return o.Payload -} - -func (o *AppendHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAppendHostsDefault creates a AppendHostsDefault with default headers values -func NewAppendHostsDefault(code int) *AppendHostsDefault { - return &AppendHostsDefault{ - _statusCode: code, - } -} - -/* -AppendHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type AppendHostsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this append hosts default response has a 2xx status code -func (o *AppendHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this append hosts default response has a 3xx status code -func (o *AppendHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this append hosts default response has a 4xx status code -func (o *AppendHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this append hosts default response has a 5xx status code -func (o *AppendHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this append hosts default response a status code equal to that given -func (o *AppendHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the append hosts default response -func (o *AppendHostsDefault) Code() int { - return o._statusCode -} - -func (o *AppendHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/hosts][%d] AppendHosts default %s", o._statusCode, payload) -} - -func (o *AppendHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/hosts][%d] AppendHosts default %s", o._statusCode, payload) -} - -func (o *AppendHostsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AppendHostsDefault) 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/create_bond_parameters.go b/v1/client/network/create_bond_parameters.go deleted file mode 100644 index d5bf782f..00000000 --- a/v1/client/network/create_bond_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateBondParams creates a new CreateBondParams 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 NewCreateBondParams() *CreateBondParams { - return &CreateBondParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateBondParamsWithTimeout creates a new CreateBondParams object -// with the ability to set a timeout on a request. -func NewCreateBondParamsWithTimeout(timeout time.Duration) *CreateBondParams { - return &CreateBondParams{ - timeout: timeout, - } -} - -// NewCreateBondParamsWithContext creates a new CreateBondParams object -// with the ability to set a context for a request. -func NewCreateBondParamsWithContext(ctx context.Context) *CreateBondParams { - return &CreateBondParams{ - Context: ctx, - } -} - -// NewCreateBondParamsWithHTTPClient creates a new CreateBondParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateBondParamsWithHTTPClient(client *http.Client) *CreateBondParams { - return &CreateBondParams{ - HTTPClient: client, - } -} - -/* -CreateBondParams contains all the parameters to send to the API endpoint - - for the create bond operation. - - Typically these are written to a http.Request. -*/ -type CreateBondParams struct { - - // Body. - Body *models.CreateBondParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create bond params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBondParams) WithDefaults() *CreateBondParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create bond params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBondParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create bond params -func (o *CreateBondParams) WithTimeout(timeout time.Duration) *CreateBondParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create bond params -func (o *CreateBondParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create bond params -func (o *CreateBondParams) WithContext(ctx context.Context) *CreateBondParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create bond params -func (o *CreateBondParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create bond params -func (o *CreateBondParams) WithHTTPClient(client *http.Client) *CreateBondParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create bond params -func (o *CreateBondParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create bond params -func (o *CreateBondParams) WithBody(body *models.CreateBondParameters) *CreateBondParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create bond params -func (o *CreateBondParams) SetBody(body *models.CreateBondParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateBondParams) 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_bond_responses.go b/v1/client/network/create_bond_responses.go deleted file mode 100644 index d6772600..00000000 --- a/v1/client/network/create_bond_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateBondReader is a Reader for the CreateBond structure. -type CreateBondReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateBondReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateBondOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateBondDefault(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 - } -} - -// NewCreateBondOK creates a CreateBondOK with default headers values -func NewCreateBondOK() *CreateBondOK { - return &CreateBondOK{} -} - -/* -CreateBondOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateBondOK struct { - Payload *models.CreateBondResult -} - -// IsSuccess returns true when this create bond o k response has a 2xx status code -func (o *CreateBondOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create bond o k response has a 3xx status code -func (o *CreateBondOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create bond o k response has a 4xx status code -func (o *CreateBondOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create bond o k response has a 5xx status code -func (o *CreateBondOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create bond o k response a status code equal to that given -func (o *CreateBondOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create bond o k response -func (o *CreateBondOK) Code() int { - return 200 -} - -func (o *CreateBondOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/bonds][%d] createBondOK %s", 200, payload) -} - -func (o *CreateBondOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/bonds][%d] createBondOK %s", 200, payload) -} - -func (o *CreateBondOK) GetPayload() *models.CreateBondResult { - return o.Payload -} - -func (o *CreateBondOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateBondResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateBondDefault creates a CreateBondDefault with default headers values -func NewCreateBondDefault(code int) *CreateBondDefault { - return &CreateBondDefault{ - _statusCode: code, - } -} - -/* -CreateBondDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateBondDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create bond default response has a 2xx status code -func (o *CreateBondDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create bond default response has a 3xx status code -func (o *CreateBondDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create bond default response has a 4xx status code -func (o *CreateBondDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create bond default response has a 5xx status code -func (o *CreateBondDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create bond default response a status code equal to that given -func (o *CreateBondDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create bond default response -func (o *CreateBondDefault) Code() int { - return o._statusCode -} - -func (o *CreateBondDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/bonds][%d] CreateBond default %s", o._statusCode, payload) -} - -func (o *CreateBondDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/bonds][%d] CreateBond default %s", o._statusCode, payload) -} - -func (o *CreateBondDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateBondDefault) 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/create_ip_config_parameters.go b/v1/client/network/create_ip_config_parameters.go deleted file mode 100644 index e1e5dc5c..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/satwik-miyyapuram-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 42af8f89..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/satwik-miyyapuram-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_bond_parameters.go b/v1/client/network/delete_bond_parameters.go deleted file mode 100644 index f620cc7c..00000000 --- a/v1/client/network/delete_bond_parameters.go +++ /dev/null @@ -1,151 +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" -) - -// NewDeleteBondParams creates a new DeleteBondParams 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 NewDeleteBondParams() *DeleteBondParams { - return &DeleteBondParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteBondParamsWithTimeout creates a new DeleteBondParams object -// with the ability to set a timeout on a request. -func NewDeleteBondParamsWithTimeout(timeout time.Duration) *DeleteBondParams { - return &DeleteBondParams{ - timeout: timeout, - } -} - -// NewDeleteBondParamsWithContext creates a new DeleteBondParams object -// with the ability to set a context for a request. -func NewDeleteBondParamsWithContext(ctx context.Context) *DeleteBondParams { - return &DeleteBondParams{ - Context: ctx, - } -} - -// NewDeleteBondParamsWithHTTPClient creates a new DeleteBondParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteBondParamsWithHTTPClient(client *http.Client) *DeleteBondParams { - return &DeleteBondParams{ - HTTPClient: client, - } -} - -/* -DeleteBondParams contains all the parameters to send to the API endpoint - - for the delete bond operation. - - Typically these are written to a http.Request. -*/ -type DeleteBondParams struct { - - /* Name. - - Specifies the name of the bond being deleted. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete bond params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBondParams) WithDefaults() *DeleteBondParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete bond params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteBondParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete bond params -func (o *DeleteBondParams) WithTimeout(timeout time.Duration) *DeleteBondParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete bond params -func (o *DeleteBondParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete bond params -func (o *DeleteBondParams) WithContext(ctx context.Context) *DeleteBondParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete bond params -func (o *DeleteBondParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete bond params -func (o *DeleteBondParams) WithHTTPClient(client *http.Client) *DeleteBondParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete bond params -func (o *DeleteBondParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete bond params -func (o *DeleteBondParams) WithName(name string) *DeleteBondParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete bond params -func (o *DeleteBondParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteBondParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/network/delete_bond_responses.go b/v1/client/network/delete_bond_responses.go deleted file mode 100644 index e845eb15..00000000 --- a/v1/client/network/delete_bond_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteBondReader is a Reader for the DeleteBond structure. -type DeleteBondReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteBondReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteBondNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteBondDefault(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 - } -} - -// NewDeleteBondNoContent creates a DeleteBondNoContent with default headers values -func NewDeleteBondNoContent() *DeleteBondNoContent { - return &DeleteBondNoContent{} -} - -/* -DeleteBondNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteBondNoContent struct { -} - -// IsSuccess returns true when this delete bond no content response has a 2xx status code -func (o *DeleteBondNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete bond no content response has a 3xx status code -func (o *DeleteBondNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete bond no content response has a 4xx status code -func (o *DeleteBondNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete bond no content response has a 5xx status code -func (o *DeleteBondNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete bond no content response a status code equal to that given -func (o *DeleteBondNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete bond no content response -func (o *DeleteBondNoContent) Code() int { - return 204 -} - -func (o *DeleteBondNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/network/bonds/{name}][%d] deleteBondNoContent", 204) -} - -func (o *DeleteBondNoContent) String() string { - return fmt.Sprintf("[DELETE /public/network/bonds/{name}][%d] deleteBondNoContent", 204) -} - -func (o *DeleteBondNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteBondDefault creates a DeleteBondDefault with default headers values -func NewDeleteBondDefault(code int) *DeleteBondDefault { - return &DeleteBondDefault{ - _statusCode: code, - } -} - -/* -DeleteBondDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteBondDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete bond default response has a 2xx status code -func (o *DeleteBondDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete bond default response has a 3xx status code -func (o *DeleteBondDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete bond default response has a 4xx status code -func (o *DeleteBondDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete bond default response has a 5xx status code -func (o *DeleteBondDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete bond default response a status code equal to that given -func (o *DeleteBondDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete bond default response -func (o *DeleteBondDefault) Code() int { - return o._statusCode -} - -func (o *DeleteBondDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/bonds/{name}][%d] DeleteBond default %s", o._statusCode, payload) -} - -func (o *DeleteBondDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/bonds/{name}][%d] DeleteBond default %s", o._statusCode, payload) -} - -func (o *DeleteBondDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteBondDefault) 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_hosts_parameters.go b/v1/client/network/delete_hosts_parameters.go deleted file mode 100644 index a682825c..00000000 --- a/v1/client/network/delete_hosts_parameters.go +++ /dev/null @@ -1,176 +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/go-openapi/swag" -) - -// NewDeleteHostsParams creates a new DeleteHostsParams 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 NewDeleteHostsParams() *DeleteHostsParams { - return &DeleteHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteHostsParamsWithTimeout creates a new DeleteHostsParams object -// with the ability to set a timeout on a request. -func NewDeleteHostsParamsWithTimeout(timeout time.Duration) *DeleteHostsParams { - return &DeleteHostsParams{ - timeout: timeout, - } -} - -// NewDeleteHostsParamsWithContext creates a new DeleteHostsParams object -// with the ability to set a context for a request. -func NewDeleteHostsParamsWithContext(ctx context.Context) *DeleteHostsParams { - return &DeleteHostsParams{ - Context: ctx, - } -} - -// NewDeleteHostsParamsWithHTTPClient creates a new DeleteHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteHostsParamsWithHTTPClient(client *http.Client) *DeleteHostsParams { - return &DeleteHostsParams{ - HTTPClient: client, - } -} - -/* -DeleteHostsParams contains all the parameters to send to the API endpoint - - for the delete hosts operation. - - Typically these are written to a http.Request. -*/ -type DeleteHostsParams struct { - - /* Ips. - - Specifies a list of the IP addresses of entries to remove from the - Cluster's /etc/hosts file. - */ - Ips []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteHostsParams) WithDefaults() *DeleteHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete hosts params -func (o *DeleteHostsParams) WithTimeout(timeout time.Duration) *DeleteHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete hosts params -func (o *DeleteHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete hosts params -func (o *DeleteHostsParams) WithContext(ctx context.Context) *DeleteHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete hosts params -func (o *DeleteHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete hosts params -func (o *DeleteHostsParams) WithHTTPClient(client *http.Client) *DeleteHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete hosts params -func (o *DeleteHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIps adds the ips to the delete hosts params -func (o *DeleteHostsParams) WithIps(ips []string) *DeleteHostsParams { - o.SetIps(ips) - return o -} - -// SetIps adds the ips to the delete hosts params -func (o *DeleteHostsParams) SetIps(ips []string) { - o.Ips = ips -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteHostsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ips != nil { - - // binding items for ips - joinedIps := o.bindParamIps(reg) - - // query array param ips - if err := r.SetQueryParam("ips", joinedIps...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamDeleteHosts binds the parameter ips -func (o *DeleteHostsParams) bindParamIps(formats strfmt.Registry) []string { - ipsIR := o.Ips - - var ipsIC []string - for _, ipsIIR := range ipsIR { // explode []string - - ipsIIV := ipsIIR // string as string - ipsIC = append(ipsIC, ipsIIV) - } - - // items.CollectionFormat: "" - ipsIS := swag.JoinByFormat(ipsIC, "") - - return ipsIS -} diff --git a/v1/client/network/delete_hosts_responses.go b/v1/client/network/delete_hosts_responses.go deleted file mode 100644 index 79361f90..00000000 --- a/v1/client/network/delete_hosts_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteHostsReader is a Reader for the DeleteHosts structure. -type DeleteHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteHostsDefault(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 - } -} - -// NewDeleteHostsOK creates a DeleteHostsOK with default headers values -func NewDeleteHostsOK() *DeleteHostsOK { - return &DeleteHostsOK{} -} - -/* -DeleteHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteHostsOK struct { - Payload *models.HostResult -} - -// IsSuccess returns true when this delete hosts o k response has a 2xx status code -func (o *DeleteHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete hosts o k response has a 3xx status code -func (o *DeleteHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete hosts o k response has a 4xx status code -func (o *DeleteHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete hosts o k response has a 5xx status code -func (o *DeleteHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete hosts o k response a status code equal to that given -func (o *DeleteHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete hosts o k response -func (o *DeleteHostsOK) Code() int { - return 200 -} - -func (o *DeleteHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/hosts][%d] deleteHostsOK %s", 200, payload) -} - -func (o *DeleteHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/hosts][%d] deleteHostsOK %s", 200, payload) -} - -func (o *DeleteHostsOK) GetPayload() *models.HostResult { - return o.Payload -} - -func (o *DeleteHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteHostsDefault creates a DeleteHostsDefault with default headers values -func NewDeleteHostsDefault(code int) *DeleteHostsDefault { - return &DeleteHostsDefault{ - _statusCode: code, - } -} - -/* -DeleteHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteHostsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete hosts default response has a 2xx status code -func (o *DeleteHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete hosts default response has a 3xx status code -func (o *DeleteHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete hosts default response has a 4xx status code -func (o *DeleteHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete hosts default response has a 5xx status code -func (o *DeleteHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete hosts default response a status code equal to that given -func (o *DeleteHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete hosts default response -func (o *DeleteHostsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/hosts][%d] DeleteHosts default %s", o._statusCode, payload) -} - -func (o *DeleteHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/hosts][%d] DeleteHosts default %s", o._statusCode, payload) -} - -func (o *DeleteHostsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteHostsDefault) 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 2e01dfd7..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/satwik-miyyapuram-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 f6605435..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/satwik-miyyapuram-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/edit_hosts_parameters.go b/v1/client/network/edit_hosts_parameters.go deleted file mode 100644 index 3fe90a9d..00000000 --- a/v1/client/network/edit_hosts_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewEditHostsParams creates a new EditHostsParams 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 NewEditHostsParams() *EditHostsParams { - return &EditHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewEditHostsParamsWithTimeout creates a new EditHostsParams object -// with the ability to set a timeout on a request. -func NewEditHostsParamsWithTimeout(timeout time.Duration) *EditHostsParams { - return &EditHostsParams{ - timeout: timeout, - } -} - -// NewEditHostsParamsWithContext creates a new EditHostsParams object -// with the ability to set a context for a request. -func NewEditHostsParamsWithContext(ctx context.Context) *EditHostsParams { - return &EditHostsParams{ - Context: ctx, - } -} - -// NewEditHostsParamsWithHTTPClient creates a new EditHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewEditHostsParamsWithHTTPClient(client *http.Client) *EditHostsParams { - return &EditHostsParams{ - HTTPClient: client, - } -} - -/* -EditHostsParams contains all the parameters to send to the API endpoint - - for the edit hosts operation. - - Typically these are written to a http.Request. -*/ -type EditHostsParams struct { - - // Body. - Body *models.EditHostsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the edit hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EditHostsParams) WithDefaults() *EditHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the edit hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EditHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the edit hosts params -func (o *EditHostsParams) WithTimeout(timeout time.Duration) *EditHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the edit hosts params -func (o *EditHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the edit hosts params -func (o *EditHostsParams) WithContext(ctx context.Context) *EditHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the edit hosts params -func (o *EditHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the edit hosts params -func (o *EditHostsParams) WithHTTPClient(client *http.Client) *EditHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the edit hosts params -func (o *EditHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the edit hosts params -func (o *EditHostsParams) WithBody(body *models.EditHostsParameters) *EditHostsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the edit hosts params -func (o *EditHostsParams) SetBody(body *models.EditHostsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *EditHostsParams) 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/edit_hosts_responses.go b/v1/client/network/edit_hosts_responses.go deleted file mode 100644 index c76de955..00000000 --- a/v1/client/network/edit_hosts_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// EditHostsReader is a Reader for the EditHosts structure. -type EditHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *EditHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewEditHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewEditHostsDefault(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 - } -} - -// NewEditHostsOK creates a EditHostsOK with default headers values -func NewEditHostsOK() *EditHostsOK { - return &EditHostsOK{} -} - -/* -EditHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type EditHostsOK struct { - Payload *models.HostResult -} - -// IsSuccess returns true when this edit hosts o k response has a 2xx status code -func (o *EditHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this edit hosts o k response has a 3xx status code -func (o *EditHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this edit hosts o k response has a 4xx status code -func (o *EditHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this edit hosts o k response has a 5xx status code -func (o *EditHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this edit hosts o k response a status code equal to that given -func (o *EditHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the edit hosts o k response -func (o *EditHostsOK) Code() int { - return 200 -} - -func (o *EditHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/network/hosts][%d] editHostsOK %s", 200, payload) -} - -func (o *EditHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/network/hosts][%d] editHostsOK %s", 200, payload) -} - -func (o *EditHostsOK) GetPayload() *models.HostResult { - return o.Payload -} - -func (o *EditHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewEditHostsDefault creates a EditHostsDefault with default headers values -func NewEditHostsDefault(code int) *EditHostsDefault { - return &EditHostsDefault{ - _statusCode: code, - } -} - -/* -EditHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type EditHostsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this edit hosts default response has a 2xx status code -func (o *EditHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this edit hosts default response has a 3xx status code -func (o *EditHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this edit hosts default response has a 4xx status code -func (o *EditHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this edit hosts default response has a 5xx status code -func (o *EditHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this edit hosts default response a status code equal to that given -func (o *EditHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the edit hosts default response -func (o *EditHostsDefault) Code() int { - return o._statusCode -} - -func (o *EditHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/network/hosts][%d] EditHosts default %s", o._statusCode, payload) -} - -func (o *EditHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/network/hosts][%d] EditHosts default %s", o._statusCode, payload) -} - -func (o *EditHostsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *EditHostsDefault) 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/list_hosts_parameters.go b/v1/client/network/list_hosts_parameters.go deleted file mode 100644 index 86c2af7d..00000000 --- a/v1/client/network/list_hosts_parameters.go +++ /dev/null @@ -1,128 +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" -) - -// NewListHostsParams creates a new ListHostsParams 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 NewListHostsParams() *ListHostsParams { - return &ListHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListHostsParamsWithTimeout creates a new ListHostsParams object -// with the ability to set a timeout on a request. -func NewListHostsParamsWithTimeout(timeout time.Duration) *ListHostsParams { - return &ListHostsParams{ - timeout: timeout, - } -} - -// NewListHostsParamsWithContext creates a new ListHostsParams object -// with the ability to set a context for a request. -func NewListHostsParamsWithContext(ctx context.Context) *ListHostsParams { - return &ListHostsParams{ - Context: ctx, - } -} - -// NewListHostsParamsWithHTTPClient creates a new ListHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListHostsParamsWithHTTPClient(client *http.Client) *ListHostsParams { - return &ListHostsParams{ - HTTPClient: client, - } -} - -/* -ListHostsParams contains all the parameters to send to the API endpoint - - for the list hosts operation. - - Typically these are written to a http.Request. -*/ -type ListHostsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListHostsParams) WithDefaults() *ListHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list hosts params -func (o *ListHostsParams) WithTimeout(timeout time.Duration) *ListHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list hosts params -func (o *ListHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list hosts params -func (o *ListHostsParams) WithContext(ctx context.Context) *ListHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list hosts params -func (o *ListHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list hosts params -func (o *ListHostsParams) WithHTTPClient(client *http.Client) *ListHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list hosts params -func (o *ListHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListHostsParams) 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/network/list_hosts_responses.go b/v1/client/network/list_hosts_responses.go deleted file mode 100644 index 02a726db..00000000 --- a/v1/client/network/list_hosts_responses.go +++ /dev/null @@ -1,185 +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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListHostsReader is a Reader for the ListHosts structure. -type ListHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListHostsDefault(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 - } -} - -// NewListHostsOK creates a ListHostsOK with default headers values -func NewListHostsOK() *ListHostsOK { - return &ListHostsOK{} -} - -/* -ListHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListHostsOK struct { - Payload []*models.HostEntry -} - -// IsSuccess returns true when this list hosts o k response has a 2xx status code -func (o *ListHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list hosts o k response has a 3xx status code -func (o *ListHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list hosts o k response has a 4xx status code -func (o *ListHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list hosts o k response has a 5xx status code -func (o *ListHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list hosts o k response a status code equal to that given -func (o *ListHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list hosts o k response -func (o *ListHostsOK) Code() int { - return 200 -} - -func (o *ListHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/network/hosts][%d] listHostsOK %s", 200, payload) -} - -func (o *ListHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/network/hosts][%d] listHostsOK %s", 200, payload) -} - -func (o *ListHostsOK) GetPayload() []*models.HostEntry { - return o.Payload -} - -func (o *ListHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListHostsDefault creates a ListHostsDefault with default headers values -func NewListHostsDefault(code int) *ListHostsDefault { - return &ListHostsDefault{ - _statusCode: code, - } -} - -/* -ListHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListHostsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list hosts default response has a 2xx status code -func (o *ListHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list hosts default response has a 3xx status code -func (o *ListHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list hosts default response has a 4xx status code -func (o *ListHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list hosts default response has a 5xx status code -func (o *ListHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list hosts default response a status code equal to that given -func (o *ListHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list hosts default response -func (o *ListHostsDefault) Code() int { - return o._statusCode -} - -func (o *ListHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/network/hosts][%d] ListHosts default %s", o._statusCode, payload) -} - -func (o *ListHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/network/hosts][%d] ListHosts default %s", o._statusCode, payload) -} - -func (o *ListHostsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListHostsDefault) 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 deleted file mode 100644 index 4298b055..00000000 --- a/v1/client/network/network_client.go +++ /dev/null @@ -1,409 +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 ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new network API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new network API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new network API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for network API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AppendHosts(params *AppendHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppendHostsOK, error) - - 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) - - SetTransport(transport runtime.ClientTransport) -} - -/* - AppendHosts adds new entries to the etc hosts file - - Sends a request to add one or more new entries to the Cluster's /etc/hosts - -file. -*/ -func (a *Client) AppendHosts(params *AppendHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AppendHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAppendHostsParams() - } - op := &runtime.ClientOperation{ - ID: "AppendHosts", - Method: "POST", - PathPattern: "/public/network/hosts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AppendHostsReader{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.(*AppendHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AppendHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateBond creates a new network bond - - Sends a request to create a new network bond on the Cluster. This can only be - -performed on a Node before it is part of a Cluster. -*/ -func (a *Client) CreateBond(params *CreateBondParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBondOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateBondParams() - } - op := &runtime.ClientOperation{ - ID: "CreateBond", - Method: "POST", - PathPattern: "/public/network/bonds", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateBondReader{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.(*CreateBondOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateBondDefault) - 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 - - Sends a request to delete a network bond from the Cluster. This can only be - -performed on a Node before it is part of a Cluster. -*/ -func (a *Client) DeleteBond(params *DeleteBondParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBondNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteBondParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteBond", - Method: "DELETE", - PathPattern: "/public/network/bonds/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteBondReader{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.(*DeleteBondNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteBondDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteHosts removes entries from the etc hosts file - - Sends a request to remove one or more entries from the Cluster's - -etc/hosts file. -*/ -func (a *Client) DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteHostsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteHosts", - Method: "DELETE", - PathPattern: "/public/network/hosts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteHostsReader{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.(*DeleteHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteHostsDefault) - 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 - -Sends a request to edit one or more entries in the Cluster's /etc/hosts file. -*/ -func (a *Client) EditHosts(params *EditHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EditHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewEditHostsParams() - } - op := &runtime.ClientOperation{ - ID: "EditHosts", - Method: "PUT", - PathPattern: "/public/network/hosts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &EditHostsReader{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.(*EditHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*EditHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListHosts gets the current entries in the hosts file on the cluster - - Sends a request to get a list of the current entries in the hosts file - -on the Cluster. -*/ -func (a *Client) ListHosts(params *ListHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListHostsParams() - } - op := &runtime.ClientOperation{ - ID: "ListHosts", - Method: "GET", - PathPattern: "/public/network/hosts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListHostsReader{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.(*ListHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListHostsDefault) - 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/nodes/get_node_by_id_parameters.go b/v1/client/nodes/get_node_by_id_parameters.go deleted file mode 100644 index c8895292..00000000 --- a/v1/client/nodes/get_node_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/go-openapi/swag" -) - -// NewGetNodeByIDParams creates a new GetNodeByIDParams 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 NewGetNodeByIDParams() *GetNodeByIDParams { - return &GetNodeByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeByIDParamsWithTimeout creates a new GetNodeByIDParams object -// with the ability to set a timeout on a request. -func NewGetNodeByIDParamsWithTimeout(timeout time.Duration) *GetNodeByIDParams { - return &GetNodeByIDParams{ - timeout: timeout, - } -} - -// NewGetNodeByIDParamsWithContext creates a new GetNodeByIDParams object -// with the ability to set a context for a request. -func NewGetNodeByIDParamsWithContext(ctx context.Context) *GetNodeByIDParams { - return &GetNodeByIDParams{ - Context: ctx, - } -} - -// NewGetNodeByIDParamsWithHTTPClient creates a new GetNodeByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeByIDParamsWithHTTPClient(client *http.Client) *GetNodeByIDParams { - return &GetNodeByIDParams{ - HTTPClient: client, - } -} - -/* -GetNodeByIDParams contains all the parameters to send to the API endpoint - - for the get node by Id operation. - - Typically these are written to a http.Request. -*/ -type GetNodeByIDParams struct { - - /* ID. - - Id of the Node - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeByIDParams) WithDefaults() *GetNodeByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node by Id params -func (o *GetNodeByIDParams) WithTimeout(timeout time.Duration) *GetNodeByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node by Id params -func (o *GetNodeByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node by Id params -func (o *GetNodeByIDParams) WithContext(ctx context.Context) *GetNodeByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node by Id params -func (o *GetNodeByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node by Id params -func (o *GetNodeByIDParams) WithHTTPClient(client *http.Client) *GetNodeByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node by Id params -func (o *GetNodeByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get node by Id params -func (o *GetNodeByIDParams) WithID(id int64) *GetNodeByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get node by Id params -func (o *GetNodeByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/nodes/get_node_by_id_responses.go b/v1/client/nodes/get_node_by_id_responses.go deleted file mode 100644 index f4ca2898..00000000 --- a/v1/client/nodes/get_node_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNodeByIDReader is a Reader for the GetNodeByID structure. -type GetNodeByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodeByIDDefault(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 - } -} - -// NewGetNodeByIDOK creates a GetNodeByIDOK with default headers values -func NewGetNodeByIDOK() *GetNodeByIDOK { - return &GetNodeByIDOK{} -} - -/* -GetNodeByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeByIDOK struct { - Payload []*models.Node -} - -// IsSuccess returns true when this get node by Id o k response has a 2xx status code -func (o *GetNodeByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node by Id o k response has a 3xx status code -func (o *GetNodeByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node by Id o k response has a 4xx status code -func (o *GetNodeByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node by Id o k response has a 5xx status code -func (o *GetNodeByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node by Id o k response a status code equal to that given -func (o *GetNodeByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get node by Id o k response -func (o *GetNodeByIDOK) Code() int { - return 200 -} - -func (o *GetNodeByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes/{id}][%d] getNodeByIdOK %s", 200, payload) -} - -func (o *GetNodeByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes/{id}][%d] getNodeByIdOK %s", 200, payload) -} - -func (o *GetNodeByIDOK) GetPayload() []*models.Node { - return o.Payload -} - -func (o *GetNodeByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodeByIDDefault creates a GetNodeByIDDefault with default headers values -func NewGetNodeByIDDefault(code int) *GetNodeByIDDefault { - return &GetNodeByIDDefault{ - _statusCode: code, - } -} - -/* -GetNodeByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodeByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get node by Id default response has a 2xx status code -func (o *GetNodeByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get node by Id default response has a 3xx status code -func (o *GetNodeByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get node by Id default response has a 4xx status code -func (o *GetNodeByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get node by Id default response has a 5xx status code -func (o *GetNodeByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get node by Id default response a status code equal to that given -func (o *GetNodeByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get node by Id default response -func (o *GetNodeByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetNodeByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes/{id}][%d] GetNodeById default %s", o._statusCode, payload) -} - -func (o *GetNodeByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes/{id}][%d] GetNodeById default %s", o._statusCode, payload) -} - -func (o *GetNodeByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNodeByIDDefault) 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/nodes/get_node_stats_parameters.go b/v1/client/nodes/get_node_stats_parameters.go deleted file mode 100644 index 70e73133..00000000 --- a/v1/client/nodes/get_node_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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" -) - -// NewGetNodeStatsParams creates a new GetNodeStatsParams 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 NewGetNodeStatsParams() *GetNodeStatsParams { - return &GetNodeStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeStatsParamsWithTimeout creates a new GetNodeStatsParams object -// with the ability to set a timeout on a request. -func NewGetNodeStatsParamsWithTimeout(timeout time.Duration) *GetNodeStatsParams { - return &GetNodeStatsParams{ - timeout: timeout, - } -} - -// NewGetNodeStatsParamsWithContext creates a new GetNodeStatsParams object -// with the ability to set a context for a request. -func NewGetNodeStatsParamsWithContext(ctx context.Context) *GetNodeStatsParams { - return &GetNodeStatsParams{ - Context: ctx, - } -} - -// NewGetNodeStatsParamsWithHTTPClient creates a new GetNodeStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeStatsParamsWithHTTPClient(client *http.Client) *GetNodeStatsParams { - return &GetNodeStatsParams{ - HTTPClient: client, - } -} - -/* -GetNodeStatsParams contains all the parameters to send to the API endpoint - - for the get node stats operation. - - Typically these are written to a http.Request. -*/ -type GetNodeStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeStatsParams) WithDefaults() *GetNodeStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node stats params -func (o *GetNodeStatsParams) WithTimeout(timeout time.Duration) *GetNodeStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node stats params -func (o *GetNodeStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node stats params -func (o *GetNodeStatsParams) WithContext(ctx context.Context) *GetNodeStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node stats params -func (o *GetNodeStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node stats params -func (o *GetNodeStatsParams) WithHTTPClient(client *http.Client) *GetNodeStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node stats params -func (o *GetNodeStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeStatsParams) 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/nodes/get_node_stats_responses.go b/v1/client/nodes/get_node_stats_responses.go deleted file mode 100644 index b49c58c4..00000000 --- a/v1/client/nodes/get_node_stats_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNodeStatsReader is a Reader for the GetNodeStats structure. -type GetNodeStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodeStatsDefault(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 - } -} - -// NewGetNodeStatsOK creates a GetNodeStatsOK with default headers values -func NewGetNodeStatsOK() *GetNodeStatsOK { - return &GetNodeStatsOK{} -} - -/* -GetNodeStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeStatsOK struct { - Payload []*models.NodeStats -} - -// IsSuccess returns true when this get node stats o k response has a 2xx status code -func (o *GetNodeStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node stats o k response has a 3xx status code -func (o *GetNodeStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node stats o k response has a 4xx status code -func (o *GetNodeStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node stats o k response has a 5xx status code -func (o *GetNodeStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node stats o k response a status code equal to that given -func (o *GetNodeStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get node stats o k response -func (o *GetNodeStatsOK) Code() int { - return 200 -} - -func (o *GetNodeStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodeStats][%d] getNodeStatsOK %s", 200, payload) -} - -func (o *GetNodeStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodeStats][%d] getNodeStatsOK %s", 200, payload) -} - -func (o *GetNodeStatsOK) GetPayload() []*models.NodeStats { - return o.Payload -} - -func (o *GetNodeStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodeStatsDefault creates a GetNodeStatsDefault with default headers values -func NewGetNodeStatsDefault(code int) *GetNodeStatsDefault { - return &GetNodeStatsDefault{ - _statusCode: code, - } -} - -/* -GetNodeStatsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetNodeStatsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get node stats default response has a 2xx status code -func (o *GetNodeStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get node stats default response has a 3xx status code -func (o *GetNodeStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get node stats default response has a 4xx status code -func (o *GetNodeStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get node stats default response has a 5xx status code -func (o *GetNodeStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get node stats default response a status code equal to that given -func (o *GetNodeStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get node stats default response -func (o *GetNodeStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetNodeStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodeStats][%d] GetNodeStats default %s", o._statusCode, payload) -} - -func (o *GetNodeStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodeStats][%d] GetNodeStats default %s", o._statusCode, payload) -} - -func (o *GetNodeStatsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetNodeStatsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/nodes/get_node_status_parameters.go b/v1/client/nodes/get_node_status_parameters.go deleted file mode 100644 index f19cb1b2..00000000 --- a/v1/client/nodes/get_node_status_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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" -) - -// NewGetNodeStatusParams creates a new GetNodeStatusParams 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 NewGetNodeStatusParams() *GetNodeStatusParams { - return &GetNodeStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeStatusParamsWithTimeout creates a new GetNodeStatusParams object -// with the ability to set a timeout on a request. -func NewGetNodeStatusParamsWithTimeout(timeout time.Duration) *GetNodeStatusParams { - return &GetNodeStatusParams{ - timeout: timeout, - } -} - -// NewGetNodeStatusParamsWithContext creates a new GetNodeStatusParams object -// with the ability to set a context for a request. -func NewGetNodeStatusParamsWithContext(ctx context.Context) *GetNodeStatusParams { - return &GetNodeStatusParams{ - Context: ctx, - } -} - -// NewGetNodeStatusParamsWithHTTPClient creates a new GetNodeStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeStatusParamsWithHTTPClient(client *http.Client) *GetNodeStatusParams { - return &GetNodeStatusParams{ - HTTPClient: client, - } -} - -/* -GetNodeStatusParams contains all the parameters to send to the API endpoint - - for the get node status operation. - - Typically these are written to a http.Request. -*/ -type GetNodeStatusParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeStatusParams) WithDefaults() *GetNodeStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node status params -func (o *GetNodeStatusParams) WithTimeout(timeout time.Duration) *GetNodeStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node status params -func (o *GetNodeStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node status params -func (o *GetNodeStatusParams) WithContext(ctx context.Context) *GetNodeStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node status params -func (o *GetNodeStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node status params -func (o *GetNodeStatusParams) WithHTTPClient(client *http.Client) *GetNodeStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node status params -func (o *GetNodeStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeStatusParams) 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/nodes/get_node_status_responses.go b/v1/client/nodes/get_node_status_responses.go deleted file mode 100644 index b91af03a..00000000 --- a/v1/client/nodes/get_node_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNodeStatusReader is a Reader for the GetNodeStatus structure. -type GetNodeStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodeStatusDefault(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 - } -} - -// NewGetNodeStatusOK creates a GetNodeStatusOK with default headers values -func NewGetNodeStatusOK() *GetNodeStatusOK { - return &GetNodeStatusOK{} -} - -/* -GetNodeStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeStatusOK struct { - Payload *models.NodeStatusResult -} - -// IsSuccess returns true when this get node status o k response has a 2xx status code -func (o *GetNodeStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node status o k response has a 3xx status code -func (o *GetNodeStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node status o k response has a 4xx status code -func (o *GetNodeStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node status o k response has a 5xx status code -func (o *GetNodeStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node status o k response a status code equal to that given -func (o *GetNodeStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get node status o k response -func (o *GetNodeStatusOK) Code() int { - return 200 -} - -func (o *GetNodeStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/node/status][%d] getNodeStatusOK %s", 200, payload) -} - -func (o *GetNodeStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/node/status][%d] getNodeStatusOK %s", 200, payload) -} - -func (o *GetNodeStatusOK) GetPayload() *models.NodeStatusResult { - return o.Payload -} - -func (o *GetNodeStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeStatusResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodeStatusDefault creates a GetNodeStatusDefault with default headers values -func NewGetNodeStatusDefault(code int) *GetNodeStatusDefault { - return &GetNodeStatusDefault{ - _statusCode: code, - } -} - -/* -GetNodeStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodeStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get node status default response has a 2xx status code -func (o *GetNodeStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get node status default response has a 3xx status code -func (o *GetNodeStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get node status default response has a 4xx status code -func (o *GetNodeStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get node status default response has a 5xx status code -func (o *GetNodeStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get node status default response a status code equal to that given -func (o *GetNodeStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get node status default response -func (o *GetNodeStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetNodeStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/node/status][%d] GetNodeStatus default %s", o._statusCode, payload) -} - -func (o *GetNodeStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/node/status][%d] GetNodeStatus default %s", o._statusCode, payload) -} - -func (o *GetNodeStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNodeStatusDefault) 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/nodes/get_nodes_parameters.go b/v1/client/nodes/get_nodes_parameters.go deleted file mode 100644 index 981c705f..00000000 --- a/v1/client/nodes/get_nodes_parameters.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/go-openapi/swag" -) - -// NewGetNodesParams creates a new GetNodesParams 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 NewGetNodesParams() *GetNodesParams { - return &GetNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodesParamsWithTimeout creates a new GetNodesParams object -// with the ability to set a timeout on a request. -func NewGetNodesParamsWithTimeout(timeout time.Duration) *GetNodesParams { - return &GetNodesParams{ - timeout: timeout, - } -} - -// NewGetNodesParamsWithContext creates a new GetNodesParams object -// with the ability to set a context for a request. -func NewGetNodesParamsWithContext(ctx context.Context) *GetNodesParams { - return &GetNodesParams{ - Context: ctx, - } -} - -// NewGetNodesParamsWithHTTPClient creates a new GetNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodesParamsWithHTTPClient(client *http.Client) *GetNodesParams { - return &GetNodesParams{ - HTTPClient: client, - } -} - -/* -GetNodesParams contains all the parameters to send to the API endpoint - - for the get nodes operation. - - Typically these are written to a http.Request. -*/ -type GetNodesParams struct { - - /* ClusterPartitionIds. - - ClusterPartitionIdList specifies the list of Ids used to filter the - nodes by specified cluster partition. - */ - ClusterPartitionIds []int64 - - /* FetchStats. - - FetchStats is used to specify whether to call Stats service to fetch the - stats for the nodes. - */ - FetchStats *bool - - /* Ids. - - IdList is the ids of nodes to be returned. If empty, all - nodes are returned. - */ - Ids []int64 - - /* IncludeMarkedForRemoval. - - IncludeMarkedForRemoval is used to specify whether to include nodes - marked for removal. - */ - IncludeMarkedForRemoval *bool - - /* IncludeOnlyUnassignedNodes. - - IncludeOnlyUnassignedNodes will return nodes that are not yet assigned to - any cluster partition. If this parameter is specified as true and - ClusterPartitionIdList is also non-empty, then no nodes will be returned. - */ - IncludeOnlyUnassignedNodes *bool - - /* ShowSystemDisks. - - ShowSystemdisks is used to specify whether to display system disks for - the nodes. - */ - ShowSystemDisks *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodesParams) WithDefaults() *GetNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get nodes params -func (o *GetNodesParams) WithTimeout(timeout time.Duration) *GetNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get nodes params -func (o *GetNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get nodes params -func (o *GetNodesParams) WithContext(ctx context.Context) *GetNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get nodes params -func (o *GetNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get nodes params -func (o *GetNodesParams) WithHTTPClient(client *http.Client) *GetNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get nodes params -func (o *GetNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterPartitionIds adds the clusterPartitionIds to the get nodes params -func (o *GetNodesParams) WithClusterPartitionIds(clusterPartitionIds []int64) *GetNodesParams { - o.SetClusterPartitionIds(clusterPartitionIds) - return o -} - -// SetClusterPartitionIds adds the clusterPartitionIds to the get nodes params -func (o *GetNodesParams) SetClusterPartitionIds(clusterPartitionIds []int64) { - o.ClusterPartitionIds = clusterPartitionIds -} - -// WithFetchStats adds the fetchStats to the get nodes params -func (o *GetNodesParams) WithFetchStats(fetchStats *bool) *GetNodesParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get nodes params -func (o *GetNodesParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithIds adds the ids to the get nodes params -func (o *GetNodesParams) WithIds(ids []int64) *GetNodesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get nodes params -func (o *GetNodesParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get nodes params -func (o *GetNodesParams) WithIncludeMarkedForRemoval(includeMarkedForRemoval *bool) *GetNodesParams { - o.SetIncludeMarkedForRemoval(includeMarkedForRemoval) - return o -} - -// SetIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get nodes params -func (o *GetNodesParams) SetIncludeMarkedForRemoval(includeMarkedForRemoval *bool) { - o.IncludeMarkedForRemoval = includeMarkedForRemoval -} - -// WithIncludeOnlyUnassignedNodes adds the includeOnlyUnassignedNodes to the get nodes params -func (o *GetNodesParams) WithIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes *bool) *GetNodesParams { - o.SetIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes) - return o -} - -// SetIncludeOnlyUnassignedNodes adds the includeOnlyUnassignedNodes to the get nodes params -func (o *GetNodesParams) SetIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes *bool) { - o.IncludeOnlyUnassignedNodes = includeOnlyUnassignedNodes -} - -// WithShowSystemDisks adds the showSystemDisks to the get nodes params -func (o *GetNodesParams) WithShowSystemDisks(showSystemDisks *bool) *GetNodesParams { - o.SetShowSystemDisks(showSystemDisks) - return o -} - -// SetShowSystemDisks adds the showSystemDisks to the get nodes params -func (o *GetNodesParams) SetShowSystemDisks(showSystemDisks *bool) { - o.ShowSystemDisks = showSystemDisks -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterPartitionIds != nil { - - // binding items for clusterPartitionIds - joinedClusterPartitionIds := o.bindParamClusterPartitionIds(reg) - - // query array param clusterPartitionIds - if err := r.SetQueryParam("clusterPartitionIds", joinedClusterPartitionIds...); err != nil { - return err - } - } - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeMarkedForRemoval != nil { - - // query param includeMarkedForRemoval - var qrIncludeMarkedForRemoval bool - - if o.IncludeMarkedForRemoval != nil { - qrIncludeMarkedForRemoval = *o.IncludeMarkedForRemoval - } - qIncludeMarkedForRemoval := swag.FormatBool(qrIncludeMarkedForRemoval) - if qIncludeMarkedForRemoval != "" { - - if err := r.SetQueryParam("includeMarkedForRemoval", qIncludeMarkedForRemoval); err != nil { - return err - } - } - } - - if o.IncludeOnlyUnassignedNodes != nil { - - // query param includeOnlyUnassignedNodes - var qrIncludeOnlyUnassignedNodes bool - - if o.IncludeOnlyUnassignedNodes != nil { - qrIncludeOnlyUnassignedNodes = *o.IncludeOnlyUnassignedNodes - } - qIncludeOnlyUnassignedNodes := swag.FormatBool(qrIncludeOnlyUnassignedNodes) - if qIncludeOnlyUnassignedNodes != "" { - - if err := r.SetQueryParam("includeOnlyUnassignedNodes", qIncludeOnlyUnassignedNodes); err != nil { - return err - } - } - } - - if o.ShowSystemDisks != nil { - - // query param showSystemDisks - var qrShowSystemDisks bool - - if o.ShowSystemDisks != nil { - qrShowSystemDisks = *o.ShowSystemDisks - } - qShowSystemDisks := swag.FormatBool(qrShowSystemDisks) - if qShowSystemDisks != "" { - - if err := r.SetQueryParam("showSystemDisks", qShowSystemDisks); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetNodes binds the parameter clusterPartitionIds -func (o *GetNodesParams) bindParamClusterPartitionIds(formats strfmt.Registry) []string { - clusterPartitionIdsIR := o.ClusterPartitionIds - - var clusterPartitionIdsIC []string - for _, clusterPartitionIdsIIR := range clusterPartitionIdsIR { // explode []int64 - - clusterPartitionIdsIIV := swag.FormatInt64(clusterPartitionIdsIIR) // int64 as string - clusterPartitionIdsIC = append(clusterPartitionIdsIC, clusterPartitionIdsIIV) - } - - // items.CollectionFormat: "" - clusterPartitionIdsIS := swag.JoinByFormat(clusterPartitionIdsIC, "") - - return clusterPartitionIdsIS -} - -// bindParamGetNodes binds the parameter ids -func (o *GetNodesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v1/client/nodes/get_nodes_responses.go b/v1/client/nodes/get_nodes_responses.go deleted file mode 100644 index b9f356f4..00000000 --- a/v1/client/nodes/get_nodes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNodesReader is a Reader for the GetNodes structure. -type GetNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodesDefault(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 - } -} - -// NewGetNodesOK creates a GetNodesOK with default headers values -func NewGetNodesOK() *GetNodesOK { - return &GetNodesOK{} -} - -/* -GetNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodesOK struct { - Payload []*models.Node -} - -// IsSuccess returns true when this get nodes o k response has a 2xx status code -func (o *GetNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get nodes o k response has a 3xx status code -func (o *GetNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get nodes o k response has a 4xx status code -func (o *GetNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get nodes o k response has a 5xx status code -func (o *GetNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get nodes o k response a status code equal to that given -func (o *GetNodesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get nodes o k response -func (o *GetNodesOK) Code() int { - return 200 -} - -func (o *GetNodesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes][%d] getNodesOK %s", 200, payload) -} - -func (o *GetNodesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes][%d] getNodesOK %s", 200, payload) -} - -func (o *GetNodesOK) GetPayload() []*models.Node { - return o.Payload -} - -func (o *GetNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodesDefault creates a GetNodesDefault with default headers values -func NewGetNodesDefault(code int) *GetNodesDefault { - return &GetNodesDefault{ - _statusCode: code, - } -} - -/* -GetNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get nodes default response has a 2xx status code -func (o *GetNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get nodes default response has a 3xx status code -func (o *GetNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get nodes default response has a 4xx status code -func (o *GetNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get nodes default response has a 5xx status code -func (o *GetNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get nodes default response a status code equal to that given -func (o *GetNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get nodes default response -func (o *GetNodesDefault) Code() int { - return o._statusCode -} - -func (o *GetNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes][%d] GetNodes default %s", o._statusCode, payload) -} - -func (o *GetNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nodes][%d] GetNodes default %s", o._statusCode, payload) -} - -func (o *GetNodesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNodesDefault) 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/nodes/list_free_nodes_parameters.go b/v1/client/nodes/list_free_nodes_parameters.go deleted file mode 100644 index 0a0e1419..00000000 --- a/v1/client/nodes/list_free_nodes_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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" -) - -// NewListFreeNodesParams creates a new ListFreeNodesParams 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 NewListFreeNodesParams() *ListFreeNodesParams { - return &ListFreeNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListFreeNodesParamsWithTimeout creates a new ListFreeNodesParams object -// with the ability to set a timeout on a request. -func NewListFreeNodesParamsWithTimeout(timeout time.Duration) *ListFreeNodesParams { - return &ListFreeNodesParams{ - timeout: timeout, - } -} - -// NewListFreeNodesParamsWithContext creates a new ListFreeNodesParams object -// with the ability to set a context for a request. -func NewListFreeNodesParamsWithContext(ctx context.Context) *ListFreeNodesParams { - return &ListFreeNodesParams{ - Context: ctx, - } -} - -// NewListFreeNodesParamsWithHTTPClient creates a new ListFreeNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListFreeNodesParamsWithHTTPClient(client *http.Client) *ListFreeNodesParams { - return &ListFreeNodesParams{ - HTTPClient: client, - } -} - -/* -ListFreeNodesParams contains all the parameters to send to the API endpoint - - for the list free nodes operation. - - Typically these are written to a http.Request. -*/ -type ListFreeNodesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list free nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFreeNodesParams) WithDefaults() *ListFreeNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list free nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFreeNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list free nodes params -func (o *ListFreeNodesParams) WithTimeout(timeout time.Duration) *ListFreeNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list free nodes params -func (o *ListFreeNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list free nodes params -func (o *ListFreeNodesParams) WithContext(ctx context.Context) *ListFreeNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list free nodes params -func (o *ListFreeNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list free nodes params -func (o *ListFreeNodesParams) WithHTTPClient(client *http.Client) *ListFreeNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list free nodes params -func (o *ListFreeNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListFreeNodesParams) 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/nodes/list_free_nodes_responses.go b/v1/client/nodes/list_free_nodes_responses.go deleted file mode 100644 index 89a7168d..00000000 --- a/v1/client/nodes/list_free_nodes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListFreeNodesReader is a Reader for the ListFreeNodes structure. -type ListFreeNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListFreeNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListFreeNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListFreeNodesDefault(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 - } -} - -// NewListFreeNodesOK creates a ListFreeNodesOK with default headers values -func NewListFreeNodesOK() *ListFreeNodesOK { - return &ListFreeNodesOK{} -} - -/* -ListFreeNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListFreeNodesOK struct { - Payload []*models.FreeNodeInformation -} - -// IsSuccess returns true when this list free nodes o k response has a 2xx status code -func (o *ListFreeNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list free nodes o k response has a 3xx status code -func (o *ListFreeNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list free nodes o k response has a 4xx status code -func (o *ListFreeNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list free nodes o k response has a 5xx status code -func (o *ListFreeNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list free nodes o k response a status code equal to that given -func (o *ListFreeNodesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list free nodes o k response -func (o *ListFreeNodesOK) Code() int { - return 200 -} - -func (o *ListFreeNodesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/freeNodes][%d] listFreeNodesOK %s", 200, payload) -} - -func (o *ListFreeNodesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/freeNodes][%d] listFreeNodesOK %s", 200, payload) -} - -func (o *ListFreeNodesOK) GetPayload() []*models.FreeNodeInformation { - return o.Payload -} - -func (o *ListFreeNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListFreeNodesDefault creates a ListFreeNodesDefault with default headers values -func NewListFreeNodesDefault(code int) *ListFreeNodesDefault { - return &ListFreeNodesDefault{ - _statusCode: code, - } -} - -/* -ListFreeNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListFreeNodesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list free nodes default response has a 2xx status code -func (o *ListFreeNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list free nodes default response has a 3xx status code -func (o *ListFreeNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list free nodes default response has a 4xx status code -func (o *ListFreeNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list free nodes default response has a 5xx status code -func (o *ListFreeNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list free nodes default response a status code equal to that given -func (o *ListFreeNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list free nodes default response -func (o *ListFreeNodesDefault) Code() int { - return o._statusCode -} - -func (o *ListFreeNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/freeNodes][%d] ListFreeNodes default %s", o._statusCode, payload) -} - -func (o *ListFreeNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/freeNodes][%d] ListFreeNodes default %s", o._statusCode, payload) -} - -func (o *ListFreeNodesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListFreeNodesDefault) 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/nodes/mark_node_for_removal_parameters.go b/v1/client/nodes/mark_node_for_removal_parameters.go deleted file mode 100644 index 54e32f52..00000000 --- a/v1/client/nodes/mark_node_for_removal_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewMarkNodeForRemovalParams creates a new MarkNodeForRemovalParams 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 NewMarkNodeForRemovalParams() *MarkNodeForRemovalParams { - return &MarkNodeForRemovalParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewMarkNodeForRemovalParamsWithTimeout creates a new MarkNodeForRemovalParams object -// with the ability to set a timeout on a request. -func NewMarkNodeForRemovalParamsWithTimeout(timeout time.Duration) *MarkNodeForRemovalParams { - return &MarkNodeForRemovalParams{ - timeout: timeout, - } -} - -// NewMarkNodeForRemovalParamsWithContext creates a new MarkNodeForRemovalParams object -// with the ability to set a context for a request. -func NewMarkNodeForRemovalParamsWithContext(ctx context.Context) *MarkNodeForRemovalParams { - return &MarkNodeForRemovalParams{ - Context: ctx, - } -} - -// NewMarkNodeForRemovalParamsWithHTTPClient creates a new MarkNodeForRemovalParams object -// with the ability to set a custom HTTPClient for a request. -func NewMarkNodeForRemovalParamsWithHTTPClient(client *http.Client) *MarkNodeForRemovalParams { - return &MarkNodeForRemovalParams{ - HTTPClient: client, - } -} - -/* -MarkNodeForRemovalParams contains all the parameters to send to the API endpoint - - for the mark node for removal operation. - - Typically these are written to a http.Request. -*/ -type MarkNodeForRemovalParams struct { - - // Body. - Body *models.MarkNodeDeleteRequest - - /* ID. - - Id of the Node - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the mark node for removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkNodeForRemovalParams) WithDefaults() *MarkNodeForRemovalParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the mark node for removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkNodeForRemovalParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the mark node for removal params -func (o *MarkNodeForRemovalParams) WithTimeout(timeout time.Duration) *MarkNodeForRemovalParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the mark node for removal params -func (o *MarkNodeForRemovalParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the mark node for removal params -func (o *MarkNodeForRemovalParams) WithContext(ctx context.Context) *MarkNodeForRemovalParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the mark node for removal params -func (o *MarkNodeForRemovalParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the mark node for removal params -func (o *MarkNodeForRemovalParams) WithHTTPClient(client *http.Client) *MarkNodeForRemovalParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the mark node for removal params -func (o *MarkNodeForRemovalParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the mark node for removal params -func (o *MarkNodeForRemovalParams) WithBody(body *models.MarkNodeDeleteRequest) *MarkNodeForRemovalParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the mark node for removal params -func (o *MarkNodeForRemovalParams) SetBody(body *models.MarkNodeDeleteRequest) { - o.Body = body -} - -// WithID adds the id to the mark node for removal params -func (o *MarkNodeForRemovalParams) WithID(id int64) *MarkNodeForRemovalParams { - o.SetID(id) - return o -} - -// SetID adds the id to the mark node for removal params -func (o *MarkNodeForRemovalParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *MarkNodeForRemovalParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/nodes/mark_node_for_removal_responses.go b/v1/client/nodes/mark_node_for_removal_responses.go deleted file mode 100644 index 8787dccd..00000000 --- a/v1/client/nodes/mark_node_for_removal_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// MarkNodeForRemovalReader is a Reader for the MarkNodeForRemoval structure. -type MarkNodeForRemovalReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *MarkNodeForRemovalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewMarkNodeForRemovalAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewMarkNodeForRemovalDefault(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 - } -} - -// NewMarkNodeForRemovalAccepted creates a MarkNodeForRemovalAccepted with default headers values -func NewMarkNodeForRemovalAccepted() *MarkNodeForRemovalAccepted { - return &MarkNodeForRemovalAccepted{} -} - -/* -MarkNodeForRemovalAccepted describes a response with status code 202, with default header values. - -Success -*/ -type MarkNodeForRemovalAccepted struct { - Payload *models.NodeDeleteResult -} - -// IsSuccess returns true when this mark node for removal accepted response has a 2xx status code -func (o *MarkNodeForRemovalAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this mark node for removal accepted response has a 3xx status code -func (o *MarkNodeForRemovalAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this mark node for removal accepted response has a 4xx status code -func (o *MarkNodeForRemovalAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this mark node for removal accepted response has a 5xx status code -func (o *MarkNodeForRemovalAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this mark node for removal accepted response a status code equal to that given -func (o *MarkNodeForRemovalAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the mark node for removal accepted response -func (o *MarkNodeForRemovalAccepted) Code() int { - return 202 -} - -func (o *MarkNodeForRemovalAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}][%d] markNodeForRemovalAccepted %s", 202, payload) -} - -func (o *MarkNodeForRemovalAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}][%d] markNodeForRemovalAccepted %s", 202, payload) -} - -func (o *MarkNodeForRemovalAccepted) GetPayload() *models.NodeDeleteResult { - return o.Payload -} - -func (o *MarkNodeForRemovalAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeDeleteResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewMarkNodeForRemovalDefault creates a MarkNodeForRemovalDefault with default headers values -func NewMarkNodeForRemovalDefault(code int) *MarkNodeForRemovalDefault { - return &MarkNodeForRemovalDefault{ - _statusCode: code, - } -} - -/* -MarkNodeForRemovalDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type MarkNodeForRemovalDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this mark node for removal default response has a 2xx status code -func (o *MarkNodeForRemovalDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this mark node for removal default response has a 3xx status code -func (o *MarkNodeForRemovalDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this mark node for removal default response has a 4xx status code -func (o *MarkNodeForRemovalDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this mark node for removal default response has a 5xx status code -func (o *MarkNodeForRemovalDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this mark node for removal default response a status code equal to that given -func (o *MarkNodeForRemovalDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the mark node for removal default response -func (o *MarkNodeForRemovalDefault) Code() int { - return o._statusCode -} - -func (o *MarkNodeForRemovalDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}][%d] MarkNodeForRemoval default %s", o._statusCode, payload) -} - -func (o *MarkNodeForRemovalDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}][%d] MarkNodeForRemoval default %s", o._statusCode, payload) -} - -func (o *MarkNodeForRemovalDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *MarkNodeForRemovalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/nodes/nodes_client.go b/v1/client/nodes/nodes_client.go deleted file mode 100644 index 5a3262c3..00000000 --- a/v1/client/nodes/nodes_client.go +++ /dev/null @@ -1,407 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new nodes API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new nodes API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new nodes API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for nodes API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetNodeByID(params *GetNodeByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeByIDOK, error) - - GetNodeStats(params *GetNodeStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeStatsOK, error) - - GetNodeStatus(params *GetNodeStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeStatusOK, error) - - GetNodes(params *GetNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodesOK, error) - - ListFreeNodes(params *ListFreeNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFreeNodesOK, error) - - MarkNodeForRemoval(params *MarkNodeForRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkNodeForRemovalAccepted, error) - - UpdateNode(params *UpdateNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNodeOK, error) - - UpgradeNode(params *UpgradeNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeNodeAccepted, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetNodeByID lists details about a single node - -Returns the Node corresponding to the specified Node Id. -*/ -func (a *Client) GetNodeByID(params *GetNodeByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeById", - Method: "GET", - PathPattern: "/public/nodes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodeByIDReader{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.(*GetNodeByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodeByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNodeStats lists details about node stats - -Returns the top level stats for the nodes in the clusters. -*/ -func (a *Client) GetNodeStats(params *GetNodeStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeStats", - Method: "GET", - PathPattern: "/nodeStats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodeStatsReader{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.(*GetNodeStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodeStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNodeStatus sends a request to a node to get the status of that node -*/ -func (a *Client) GetNodeStatus(params *GetNodeStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeStatus", - Method: "GET", - PathPattern: "/public/node/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodeStatusReader{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.(*GetNodeStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodeStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetNodes lists nodes of the cluster - - If no parameters are specified, all Nodes currently on the Cohesity Cluster are - -returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetNodes(params *GetNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodesParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodes", - Method: "GET", - PathPattern: "/public/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodesReader{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.(*GetNodesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListFreeNodes lists the free nodes present on a network - - Sends a request to any Node to list all of the free Nodes that are present on - -the network. -*/ -func (a *Client) ListFreeNodes(params *ListFreeNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFreeNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListFreeNodesParams() - } - op := &runtime.ClientOperation{ - ID: "ListFreeNodes", - Method: "GET", - PathPattern: "/public/freeNodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListFreeNodesReader{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.(*ListFreeNodesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListFreeNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -MarkNodeForRemoval marks a node for removal - -Returns removal status upon completion. -*/ -func (a *Client) MarkNodeForRemoval(params *MarkNodeForRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkNodeForRemovalAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewMarkNodeForRemovalParams() - } - op := &runtime.ClientOperation{ - ID: "MarkNodeForRemoval", - Method: "POST", - PathPattern: "/nodes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &MarkNodeForRemovalReader{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.(*MarkNodeForRemovalAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*MarkNodeForRemovalDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateNode updates a node - -Returns the updated Node. -*/ -func (a *Client) UpdateNode(params *UpdateNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNodeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateNodeParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateNode", - Method: "PUT", - PathPattern: "/nodes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateNodeReader{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.(*UpdateNodeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateNodeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpgradeNode upgrades the software on a node - - Sends a request to upgrade the software version of a Node. By default, the - -Node that the request is sent to is the only one upgraded, but the user can -specify if they want to attempt to upgrade all free nodes on the network. -Before using this, you need to upload a new package to the Node you want to -upgrade by using the /public/packages endpoint. -*/ -func (a *Client) UpgradeNode(params *UpgradeNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeNodeAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradeNodeParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradeNode", - Method: "PUT", - PathPattern: "/public/nodes/software", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradeNodeReader{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.(*UpgradeNodeAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradeNodeDefault) - 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/nodes/update_node_parameters.go b/v1/client/nodes/update_node_parameters.go deleted file mode 100644 index 3aacfa01..00000000 --- a/v1/client/nodes/update_node_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateNodeParams creates a new UpdateNodeParams 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 NewUpdateNodeParams() *UpdateNodeParams { - return &UpdateNodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateNodeParamsWithTimeout creates a new UpdateNodeParams object -// with the ability to set a timeout on a request. -func NewUpdateNodeParamsWithTimeout(timeout time.Duration) *UpdateNodeParams { - return &UpdateNodeParams{ - timeout: timeout, - } -} - -// NewUpdateNodeParamsWithContext creates a new UpdateNodeParams object -// with the ability to set a context for a request. -func NewUpdateNodeParamsWithContext(ctx context.Context) *UpdateNodeParams { - return &UpdateNodeParams{ - Context: ctx, - } -} - -// NewUpdateNodeParamsWithHTTPClient creates a new UpdateNodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateNodeParamsWithHTTPClient(client *http.Client) *UpdateNodeParams { - return &UpdateNodeParams{ - HTTPClient: client, - } -} - -/* -UpdateNodeParams contains all the parameters to send to the API endpoint - - for the update node operation. - - Typically these are written to a http.Request. -*/ -type UpdateNodeParams struct { - - // Body. - Body *models.Node - - /* ID. - - Id of the Node - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNodeParams) WithDefaults() *UpdateNodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update node params -func (o *UpdateNodeParams) WithTimeout(timeout time.Duration) *UpdateNodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update node params -func (o *UpdateNodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update node params -func (o *UpdateNodeParams) WithContext(ctx context.Context) *UpdateNodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update node params -func (o *UpdateNodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update node params -func (o *UpdateNodeParams) WithHTTPClient(client *http.Client) *UpdateNodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update node params -func (o *UpdateNodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update node params -func (o *UpdateNodeParams) WithBody(body *models.Node) *UpdateNodeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update node params -func (o *UpdateNodeParams) SetBody(body *models.Node) { - o.Body = body -} - -// WithID adds the id to the update node params -func (o *UpdateNodeParams) WithID(id int64) *UpdateNodeParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update node params -func (o *UpdateNodeParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateNodeParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/nodes/update_node_responses.go b/v1/client/nodes/update_node_responses.go deleted file mode 100644 index 08ad9849..00000000 --- a/v1/client/nodes/update_node_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateNodeReader is a Reader for the UpdateNode structure. -type UpdateNodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateNodeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateNodeDefault(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 - } -} - -// NewUpdateNodeOK creates a UpdateNodeOK with default headers values -func NewUpdateNodeOK() *UpdateNodeOK { - return &UpdateNodeOK{} -} - -/* -UpdateNodeOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateNodeOK struct { - Payload *models.Node -} - -// IsSuccess returns true when this update node o k response has a 2xx status code -func (o *UpdateNodeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update node o k response has a 3xx status code -func (o *UpdateNodeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update node o k response has a 4xx status code -func (o *UpdateNodeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update node o k response has a 5xx status code -func (o *UpdateNodeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update node o k response a status code equal to that given -func (o *UpdateNodeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update node o k response -func (o *UpdateNodeOK) Code() int { - return 200 -} - -func (o *UpdateNodeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /nodes/{id}][%d] updateNodeOK %s", 200, payload) -} - -func (o *UpdateNodeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /nodes/{id}][%d] updateNodeOK %s", 200, payload) -} - -func (o *UpdateNodeOK) GetPayload() *models.Node { - return o.Payload -} - -func (o *UpdateNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Node) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateNodeDefault creates a UpdateNodeDefault with default headers values -func NewUpdateNodeDefault(code int) *UpdateNodeDefault { - return &UpdateNodeDefault{ - _statusCode: code, - } -} - -/* -UpdateNodeDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateNodeDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update node default response has a 2xx status code -func (o *UpdateNodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update node default response has a 3xx status code -func (o *UpdateNodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update node default response has a 4xx status code -func (o *UpdateNodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update node default response has a 5xx status code -func (o *UpdateNodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update node default response a status code equal to that given -func (o *UpdateNodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update node default response -func (o *UpdateNodeDefault) Code() int { - return o._statusCode -} - -func (o *UpdateNodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /nodes/{id}][%d] UpdateNode default %s", o._statusCode, payload) -} - -func (o *UpdateNodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /nodes/{id}][%d] UpdateNode default %s", o._statusCode, payload) -} - -func (o *UpdateNodeDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/nodes/upgrade_node_parameters.go b/v1/client/nodes/upgrade_node_parameters.go deleted file mode 100644 index 936ed2cf..00000000 --- a/v1/client/nodes/upgrade_node_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpgradeNodeParams creates a new UpgradeNodeParams 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 NewUpgradeNodeParams() *UpgradeNodeParams { - return &UpgradeNodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradeNodeParamsWithTimeout creates a new UpgradeNodeParams object -// with the ability to set a timeout on a request. -func NewUpgradeNodeParamsWithTimeout(timeout time.Duration) *UpgradeNodeParams { - return &UpgradeNodeParams{ - timeout: timeout, - } -} - -// NewUpgradeNodeParamsWithContext creates a new UpgradeNodeParams object -// with the ability to set a context for a request. -func NewUpgradeNodeParamsWithContext(ctx context.Context) *UpgradeNodeParams { - return &UpgradeNodeParams{ - Context: ctx, - } -} - -// NewUpgradeNodeParamsWithHTTPClient creates a new UpgradeNodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradeNodeParamsWithHTTPClient(client *http.Client) *UpgradeNodeParams { - return &UpgradeNodeParams{ - HTTPClient: client, - } -} - -/* -UpgradeNodeParams contains all the parameters to send to the API endpoint - - for the upgrade node operation. - - Typically these are written to a http.Request. -*/ -type UpgradeNodeParams struct { - - // Body. - Body *models.UpgradeNodeParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeNodeParams) WithDefaults() *UpgradeNodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeNodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade node params -func (o *UpgradeNodeParams) WithTimeout(timeout time.Duration) *UpgradeNodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade node params -func (o *UpgradeNodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade node params -func (o *UpgradeNodeParams) WithContext(ctx context.Context) *UpgradeNodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade node params -func (o *UpgradeNodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade node params -func (o *UpgradeNodeParams) WithHTTPClient(client *http.Client) *UpgradeNodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade node params -func (o *UpgradeNodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upgrade node params -func (o *UpgradeNodeParams) WithBody(body *models.UpgradeNodeParameters) *UpgradeNodeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upgrade node params -func (o *UpgradeNodeParams) SetBody(body *models.UpgradeNodeParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradeNodeParams) 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/nodes/upgrade_node_responses.go b/v1/client/nodes/upgrade_node_responses.go deleted file mode 100644 index 159d4715..00000000 --- a/v1/client/nodes/upgrade_node_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package nodes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpgradeNodeReader is a Reader for the UpgradeNode structure. -type UpgradeNodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradeNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpgradeNodeAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradeNodeDefault(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 - } -} - -// NewUpgradeNodeAccepted creates a UpgradeNodeAccepted with default headers values -func NewUpgradeNodeAccepted() *UpgradeNodeAccepted { - return &UpgradeNodeAccepted{} -} - -/* -UpgradeNodeAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UpgradeNodeAccepted struct { - Payload *models.UpgradeNodeResult -} - -// IsSuccess returns true when this upgrade node accepted response has a 2xx status code -func (o *UpgradeNodeAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade node accepted response has a 3xx status code -func (o *UpgradeNodeAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade node accepted response has a 4xx status code -func (o *UpgradeNodeAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade node accepted response has a 5xx status code -func (o *UpgradeNodeAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade node accepted response a status code equal to that given -func (o *UpgradeNodeAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the upgrade node accepted response -func (o *UpgradeNodeAccepted) Code() int { - return 202 -} - -func (o *UpgradeNodeAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/nodes/software][%d] upgradeNodeAccepted %s", 202, payload) -} - -func (o *UpgradeNodeAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/nodes/software][%d] upgradeNodeAccepted %s", 202, payload) -} - -func (o *UpgradeNodeAccepted) GetPayload() *models.UpgradeNodeResult { - return o.Payload -} - -func (o *UpgradeNodeAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpgradeNodeResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradeNodeDefault creates a UpgradeNodeDefault with default headers values -func NewUpgradeNodeDefault(code int) *UpgradeNodeDefault { - return &UpgradeNodeDefault{ - _statusCode: code, - } -} - -/* -UpgradeNodeDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradeNodeDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upgrade node default response has a 2xx status code -func (o *UpgradeNodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade node default response has a 3xx status code -func (o *UpgradeNodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade node default response has a 4xx status code -func (o *UpgradeNodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade node default response has a 5xx status code -func (o *UpgradeNodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade node default response a status code equal to that given -func (o *UpgradeNodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade node default response -func (o *UpgradeNodeDefault) Code() int { - return o._statusCode -} - -func (o *UpgradeNodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/nodes/software][%d] UpgradeNode default %s", o._statusCode, payload) -} - -func (o *UpgradeNodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/nodes/software][%d] UpgradeNode default %s", o._statusCode, payload) -} - -func (o *UpgradeNodeDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpgradeNodeDefault) 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/notifications/get_notifications_parameters.go b/v1/client/notifications/get_notifications_parameters.go deleted file mode 100644 index 85c56658..00000000 --- a/v1/client/notifications/get_notifications_parameters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package notifications - -// 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" -) - -// NewGetNotificationsParams creates a new GetNotificationsParams 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 NewGetNotificationsParams() *GetNotificationsParams { - return &GetNotificationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNotificationsParamsWithTimeout creates a new GetNotificationsParams object -// with the ability to set a timeout on a request. -func NewGetNotificationsParamsWithTimeout(timeout time.Duration) *GetNotificationsParams { - return &GetNotificationsParams{ - timeout: timeout, - } -} - -// NewGetNotificationsParamsWithContext creates a new GetNotificationsParams object -// with the ability to set a context for a request. -func NewGetNotificationsParamsWithContext(ctx context.Context) *GetNotificationsParams { - return &GetNotificationsParams{ - Context: ctx, - } -} - -// NewGetNotificationsParamsWithHTTPClient creates a new GetNotificationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNotificationsParamsWithHTTPClient(client *http.Client) *GetNotificationsParams { - return &GetNotificationsParams{ - HTTPClient: client, - } -} - -/* -GetNotificationsParams contains all the parameters to send to the API endpoint - - for the get notifications operation. - - Typically these are written to a http.Request. -*/ -type GetNotificationsParams struct { - - // Count. - // - // Format: int64 - Count int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get notifications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNotificationsParams) WithDefaults() *GetNotificationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get notifications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNotificationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get notifications params -func (o *GetNotificationsParams) WithTimeout(timeout time.Duration) *GetNotificationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get notifications params -func (o *GetNotificationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get notifications params -func (o *GetNotificationsParams) WithContext(ctx context.Context) *GetNotificationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get notifications params -func (o *GetNotificationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get notifications params -func (o *GetNotificationsParams) WithHTTPClient(client *http.Client) *GetNotificationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get notifications params -func (o *GetNotificationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCount adds the count to the get notifications params -func (o *GetNotificationsParams) WithCount(count int64) *GetNotificationsParams { - o.SetCount(count) - return o -} - -// SetCount adds the count to the get notifications params -func (o *GetNotificationsParams) SetCount(count int64) { - o.Count = count -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNotificationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Count); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/notifications/get_notifications_responses.go b/v1/client/notifications/get_notifications_responses.go deleted file mode 100644 index f476e7d6..00000000 --- a/v1/client/notifications/get_notifications_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package notifications - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNotificationsReader is a Reader for the GetNotifications structure. -type GetNotificationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNotificationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNotificationsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNotificationsDefault(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 - } -} - -// NewGetNotificationsOK creates a GetNotificationsOK with default headers values -func NewGetNotificationsOK() *GetNotificationsOK { - return &GetNotificationsOK{} -} - -/* -GetNotificationsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNotificationsOK struct { - Payload *models.Notifications -} - -// IsSuccess returns true when this get notifications o k response has a 2xx status code -func (o *GetNotificationsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get notifications o k response has a 3xx status code -func (o *GetNotificationsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get notifications o k response has a 4xx status code -func (o *GetNotificationsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get notifications o k response has a 5xx status code -func (o *GetNotificationsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get notifications o k response a status code equal to that given -func (o *GetNotificationsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get notifications o k response -func (o *GetNotificationsOK) Code() int { - return 200 -} - -func (o *GetNotificationsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/notifications][%d] getNotificationsOK %s", 200, payload) -} - -func (o *GetNotificationsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/notifications][%d] getNotificationsOK %s", 200, payload) -} - -func (o *GetNotificationsOK) GetPayload() *models.Notifications { - return o.Payload -} - -func (o *GetNotificationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Notifications) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNotificationsDefault creates a GetNotificationsDefault with default headers values -func NewGetNotificationsDefault(code int) *GetNotificationsDefault { - return &GetNotificationsDefault{ - _statusCode: code, - } -} - -/* -GetNotificationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNotificationsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get notifications default response has a 2xx status code -func (o *GetNotificationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get notifications default response has a 3xx status code -func (o *GetNotificationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get notifications default response has a 4xx status code -func (o *GetNotificationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get notifications default response has a 5xx status code -func (o *GetNotificationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get notifications default response a status code equal to that given -func (o *GetNotificationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get notifications default response -func (o *GetNotificationsDefault) Code() int { - return o._statusCode -} - -func (o *GetNotificationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/notifications][%d] GetNotifications default %s", o._statusCode, payload) -} - -func (o *GetNotificationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/notifications][%d] GetNotifications default %s", o._statusCode, payload) -} - -func (o *GetNotificationsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNotificationsDefault) 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/notifications/notifications_client.go b/v1/client/notifications/notifications_client.go deleted file mode 100644 index 49263495..00000000 --- a/v1/client/notifications/notifications_client.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package notifications - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new notifications API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new notifications API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new notifications API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for notifications API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetNotifications(params *GetNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNotificationsOK, error) - - UpdateNotifications(params *UpdateNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNotificationsNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetNotifications lists the notification of the session user -*/ -func (a *Client) GetNotifications(params *GetNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNotificationsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNotificationsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNotifications", - Method: "GET", - PathPattern: "/public/sessionUser/notifications", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNotificationsReader{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.(*GetNotificationsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNotificationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateNotifications performs operations on the notification of the session user - -Returns success or failure. -*/ -func (a *Client) UpdateNotifications(params *UpdateNotificationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNotificationsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateNotificationsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateNotifications", - Method: "PATCH", - PathPattern: "/public/sessionUser/notifications", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateNotificationsReader{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.(*UpdateNotificationsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateNotificationsDefault) - 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/notifications/update_notifications_parameters.go b/v1/client/notifications/update_notifications_parameters.go deleted file mode 100644 index 0fba6b7a..00000000 --- a/v1/client/notifications/update_notifications_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package notifications - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateNotificationsParams creates a new UpdateNotificationsParams 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 NewUpdateNotificationsParams() *UpdateNotificationsParams { - return &UpdateNotificationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateNotificationsParamsWithTimeout creates a new UpdateNotificationsParams object -// with the ability to set a timeout on a request. -func NewUpdateNotificationsParamsWithTimeout(timeout time.Duration) *UpdateNotificationsParams { - return &UpdateNotificationsParams{ - timeout: timeout, - } -} - -// NewUpdateNotificationsParamsWithContext creates a new UpdateNotificationsParams object -// with the ability to set a context for a request. -func NewUpdateNotificationsParamsWithContext(ctx context.Context) *UpdateNotificationsParams { - return &UpdateNotificationsParams{ - Context: ctx, - } -} - -// NewUpdateNotificationsParamsWithHTTPClient creates a new UpdateNotificationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateNotificationsParamsWithHTTPClient(client *http.Client) *UpdateNotificationsParams { - return &UpdateNotificationsParams{ - HTTPClient: client, - } -} - -/* -UpdateNotificationsParams contains all the parameters to send to the API endpoint - - for the update notifications operation. - - Typically these are written to a http.Request. -*/ -type UpdateNotificationsParams struct { - - /* Body. - - Specifies the list of notificationIds and the operation to be performed. - */ - Body *models.UpdateNotifications - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update notifications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNotificationsParams) WithDefaults() *UpdateNotificationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update notifications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNotificationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update notifications params -func (o *UpdateNotificationsParams) WithTimeout(timeout time.Duration) *UpdateNotificationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update notifications params -func (o *UpdateNotificationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update notifications params -func (o *UpdateNotificationsParams) WithContext(ctx context.Context) *UpdateNotificationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update notifications params -func (o *UpdateNotificationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update notifications params -func (o *UpdateNotificationsParams) WithHTTPClient(client *http.Client) *UpdateNotificationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update notifications params -func (o *UpdateNotificationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update notifications params -func (o *UpdateNotificationsParams) WithBody(body *models.UpdateNotifications) *UpdateNotificationsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update notifications params -func (o *UpdateNotificationsParams) SetBody(body *models.UpdateNotifications) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateNotificationsParams) 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/notifications/update_notifications_responses.go b/v1/client/notifications/update_notifications_responses.go deleted file mode 100644 index c12f2fbe..00000000 --- a/v1/client/notifications/update_notifications_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package notifications - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateNotificationsReader is a Reader for the UpdateNotifications structure. -type UpdateNotificationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateNotificationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUpdateNotificationsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateNotificationsDefault(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 - } -} - -// NewUpdateNotificationsNoContent creates a UpdateNotificationsNoContent with default headers values -func NewUpdateNotificationsNoContent() *UpdateNotificationsNoContent { - return &UpdateNotificationsNoContent{} -} - -/* -UpdateNotificationsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UpdateNotificationsNoContent struct { -} - -// IsSuccess returns true when this update notifications no content response has a 2xx status code -func (o *UpdateNotificationsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update notifications no content response has a 3xx status code -func (o *UpdateNotificationsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update notifications no content response has a 4xx status code -func (o *UpdateNotificationsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this update notifications no content response has a 5xx status code -func (o *UpdateNotificationsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this update notifications no content response a status code equal to that given -func (o *UpdateNotificationsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the update notifications no content response -func (o *UpdateNotificationsNoContent) Code() int { - return 204 -} - -func (o *UpdateNotificationsNoContent) Error() string { - return fmt.Sprintf("[PATCH /public/sessionUser/notifications][%d] updateNotificationsNoContent", 204) -} - -func (o *UpdateNotificationsNoContent) String() string { - return fmt.Sprintf("[PATCH /public/sessionUser/notifications][%d] updateNotificationsNoContent", 204) -} - -func (o *UpdateNotificationsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateNotificationsDefault creates a UpdateNotificationsDefault with default headers values -func NewUpdateNotificationsDefault(code int) *UpdateNotificationsDefault { - return &UpdateNotificationsDefault{ - _statusCode: code, - } -} - -/* -UpdateNotificationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateNotificationsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update notifications default response has a 2xx status code -func (o *UpdateNotificationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update notifications default response has a 3xx status code -func (o *UpdateNotificationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update notifications default response has a 4xx status code -func (o *UpdateNotificationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update notifications default response has a 5xx status code -func (o *UpdateNotificationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update notifications default response a status code equal to that given -func (o *UpdateNotificationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update notifications default response -func (o *UpdateNotificationsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateNotificationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/notifications][%d] UpdateNotifications default %s", o._statusCode, payload) -} - -func (o *UpdateNotificationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/notifications][%d] UpdateNotifications default %s", o._statusCode, payload) -} - -func (o *UpdateNotificationsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateNotificationsDefault) 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/packages/download_package_parameters.go b/v1/client/packages/download_package_parameters.go deleted file mode 100644 index cbf8fe88..00000000 --- a/v1/client/packages/download_package_parameters.go +++ /dev/null @@ -1,150 +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" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDownloadPackageParams creates a new DownloadPackageParams 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 NewDownloadPackageParams() *DownloadPackageParams { - return &DownloadPackageParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadPackageParamsWithTimeout creates a new DownloadPackageParams object -// with the ability to set a timeout on a request. -func NewDownloadPackageParamsWithTimeout(timeout time.Duration) *DownloadPackageParams { - return &DownloadPackageParams{ - timeout: timeout, - } -} - -// NewDownloadPackageParamsWithContext creates a new DownloadPackageParams object -// with the ability to set a context for a request. -func NewDownloadPackageParamsWithContext(ctx context.Context) *DownloadPackageParams { - return &DownloadPackageParams{ - Context: ctx, - } -} - -// NewDownloadPackageParamsWithHTTPClient creates a new DownloadPackageParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadPackageParamsWithHTTPClient(client *http.Client) *DownloadPackageParams { - return &DownloadPackageParams{ - HTTPClient: client, - } -} - -/* -DownloadPackageParams contains all the parameters to send to the API endpoint - - for the download package operation. - - Typically these are written to a http.Request. -*/ -type DownloadPackageParams struct { - - // Body. - Body *models.DownloadPackageParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadPackageParams) WithDefaults() *DownloadPackageParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadPackageParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download package params -func (o *DownloadPackageParams) WithTimeout(timeout time.Duration) *DownloadPackageParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download package params -func (o *DownloadPackageParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download package params -func (o *DownloadPackageParams) WithContext(ctx context.Context) *DownloadPackageParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download package params -func (o *DownloadPackageParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download package params -func (o *DownloadPackageParams) WithHTTPClient(client *http.Client) *DownloadPackageParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download package params -func (o *DownloadPackageParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the download package params -func (o *DownloadPackageParams) WithBody(body *models.DownloadPackageParameters) *DownloadPackageParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the download package params -func (o *DownloadPackageParams) SetBody(body *models.DownloadPackageParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadPackageParams) 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/packages/download_package_responses.go b/v1/client/packages/download_package_responses.go deleted file mode 100644 index c182a424..00000000 --- a/v1/client/packages/download_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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadPackageReader is a Reader for the DownloadPackage structure. -type DownloadPackageReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadPackageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewDownloadPackageAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadPackageDefault(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 - } -} - -// NewDownloadPackageAccepted creates a DownloadPackageAccepted with default headers values -func NewDownloadPackageAccepted() *DownloadPackageAccepted { - return &DownloadPackageAccepted{} -} - -/* -DownloadPackageAccepted describes a response with status code 202, with default header values. - -Success -*/ -type DownloadPackageAccepted struct { - Payload *models.DownloadPackageResult -} - -// IsSuccess returns true when this download package accepted response has a 2xx status code -func (o *DownloadPackageAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download package accepted response has a 3xx status code -func (o *DownloadPackageAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download package accepted response has a 4xx status code -func (o *DownloadPackageAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this download package accepted response has a 5xx status code -func (o *DownloadPackageAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this download package accepted response a status code equal to that given -func (o *DownloadPackageAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the download package accepted response -func (o *DownloadPackageAccepted) Code() int { - return 202 -} - -func (o *DownloadPackageAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/url][%d] downloadPackageAccepted %s", 202, payload) -} - -func (o *DownloadPackageAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/url][%d] downloadPackageAccepted %s", 202, payload) -} - -func (o *DownloadPackageAccepted) GetPayload() *models.DownloadPackageResult { - return o.Payload -} - -func (o *DownloadPackageAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DownloadPackageResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadPackageDefault creates a DownloadPackageDefault with default headers values -func NewDownloadPackageDefault(code int) *DownloadPackageDefault { - return &DownloadPackageDefault{ - _statusCode: code, - } -} - -/* -DownloadPackageDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadPackageDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download package default response has a 2xx status code -func (o *DownloadPackageDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download package default response has a 3xx status code -func (o *DownloadPackageDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download package default response has a 4xx status code -func (o *DownloadPackageDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download package default response has a 5xx status code -func (o *DownloadPackageDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download package default response a status code equal to that given -func (o *DownloadPackageDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download package default response -func (o *DownloadPackageDefault) Code() int { - return o._statusCode -} - -func (o *DownloadPackageDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/url][%d] DownloadPackage default %s", o._statusCode, payload) -} - -func (o *DownloadPackageDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/url][%d] DownloadPackage default %s", o._statusCode, payload) -} - -func (o *DownloadPackageDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadPackageDefault) 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/packages/list_packages_parameters.go b/v1/client/packages/list_packages_parameters.go deleted file mode 100644 index bf0ad227..00000000 --- a/v1/client/packages/list_packages_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" -) - -// NewListPackagesParams creates a new ListPackagesParams 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 NewListPackagesParams() *ListPackagesParams { - return &ListPackagesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListPackagesParamsWithTimeout creates a new ListPackagesParams object -// with the ability to set a timeout on a request. -func NewListPackagesParamsWithTimeout(timeout time.Duration) *ListPackagesParams { - return &ListPackagesParams{ - timeout: timeout, - } -} - -// NewListPackagesParamsWithContext creates a new ListPackagesParams object -// with the ability to set a context for a request. -func NewListPackagesParamsWithContext(ctx context.Context) *ListPackagesParams { - return &ListPackagesParams{ - Context: ctx, - } -} - -// NewListPackagesParamsWithHTTPClient creates a new ListPackagesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListPackagesParamsWithHTTPClient(client *http.Client) *ListPackagesParams { - return &ListPackagesParams{ - HTTPClient: client, - } -} - -/* -ListPackagesParams contains all the parameters to send to the API endpoint - - for the list packages operation. - - Typically these are written to a http.Request. -*/ -type ListPackagesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list packages params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListPackagesParams) WithDefaults() *ListPackagesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list packages params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListPackagesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list packages params -func (o *ListPackagesParams) WithTimeout(timeout time.Duration) *ListPackagesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list packages params -func (o *ListPackagesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list packages params -func (o *ListPackagesParams) WithContext(ctx context.Context) *ListPackagesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list packages params -func (o *ListPackagesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list packages params -func (o *ListPackagesParams) WithHTTPClient(client *http.Client) *ListPackagesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list packages params -func (o *ListPackagesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListPackagesParams) 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/list_packages_responses.go b/v1/client/packages/list_packages_responses.go deleted file mode 100644 index 1240dfc6..00000000 --- a/v1/client/packages/list_packages_responses.go +++ /dev/null @@ -1,185 +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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListPackagesReader is a Reader for the ListPackages structure. -type ListPackagesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListPackagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListPackagesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListPackagesDefault(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 - } -} - -// NewListPackagesOK creates a ListPackagesOK with default headers values -func NewListPackagesOK() *ListPackagesOK { - return &ListPackagesOK{} -} - -/* -ListPackagesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListPackagesOK struct { - Payload []*models.PackageDetails -} - -// IsSuccess returns true when this list packages o k response has a 2xx status code -func (o *ListPackagesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list packages o k response has a 3xx status code -func (o *ListPackagesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list packages o k response has a 4xx status code -func (o *ListPackagesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list packages o k response has a 5xx status code -func (o *ListPackagesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list packages o k response a status code equal to that given -func (o *ListPackagesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list packages o k response -func (o *ListPackagesOK) Code() int { - return 200 -} - -func (o *ListPackagesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/packages][%d] listPackagesOK %s", 200, payload) -} - -func (o *ListPackagesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/packages][%d] listPackagesOK %s", 200, payload) -} - -func (o *ListPackagesOK) GetPayload() []*models.PackageDetails { - return o.Payload -} - -func (o *ListPackagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListPackagesDefault creates a ListPackagesDefault with default headers values -func NewListPackagesDefault(code int) *ListPackagesDefault { - return &ListPackagesDefault{ - _statusCode: code, - } -} - -/* -ListPackagesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListPackagesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list packages default response has a 2xx status code -func (o *ListPackagesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list packages default response has a 3xx status code -func (o *ListPackagesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list packages default response has a 4xx status code -func (o *ListPackagesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list packages default response has a 5xx status code -func (o *ListPackagesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list packages default response a status code equal to that given -func (o *ListPackagesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list packages default response -func (o *ListPackagesDefault) Code() int { - return o._statusCode -} - -func (o *ListPackagesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/packages][%d] ListPackages default %s", o._statusCode, payload) -} - -func (o *ListPackagesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/packages][%d] ListPackages default %s", o._statusCode, payload) -} - -func (o *ListPackagesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListPackagesDefault) 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/packages/packages_client.go b/v1/client/packages/packages_client.go deleted file mode 100644 index 878fa09f..00000000 --- a/v1/client/packages/packages_client.go +++ /dev/null @@ -1,194 +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 ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new packages API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new packages API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new packages API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for packages API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DownloadPackage(params *DownloadPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadPackageAccepted, error) - - ListPackages(params *ListPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPackagesOK, error) - - UploadPackage(params *UploadPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPackageOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DownloadPackage downloads a package to the cluster by providing a URL where the package is hosted - -Sends a request to download a package from a URL to the Cluster. -*/ -func (a *Client) DownloadPackage(params *DownloadPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadPackageAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadPackageParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadPackage", - Method: "POST", - PathPattern: "/public/packages/url", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadPackageReader{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.(*DownloadPackageAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadPackageDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListPackages lists all currently installed packages on a cohesity cluster - - Sends a request retrieve information about all packages which are currently - -installed on the Cluster. -*/ -func (a *Client) ListPackages(params *ListPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPackagesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListPackagesParams() - } - op := &runtime.ClientOperation{ - ID: "ListPackages", - Method: "GET", - PathPattern: "/public/packages", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListPackagesReader{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.(*ListPackagesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListPackagesDefault) - 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 1ae4437f..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/satwik-miyyapuram-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/passwords/password_strength_parameters.go b/v1/client/passwords/password_strength_parameters.go deleted file mode 100644 index 87f41954..00000000 --- a/v1/client/passwords/password_strength_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package passwords - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewPasswordStrengthParams creates a new PasswordStrengthParams 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 NewPasswordStrengthParams() *PasswordStrengthParams { - return &PasswordStrengthParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPasswordStrengthParamsWithTimeout creates a new PasswordStrengthParams object -// with the ability to set a timeout on a request. -func NewPasswordStrengthParamsWithTimeout(timeout time.Duration) *PasswordStrengthParams { - return &PasswordStrengthParams{ - timeout: timeout, - } -} - -// NewPasswordStrengthParamsWithContext creates a new PasswordStrengthParams object -// with the ability to set a context for a request. -func NewPasswordStrengthParamsWithContext(ctx context.Context) *PasswordStrengthParams { - return &PasswordStrengthParams{ - Context: ctx, - } -} - -// NewPasswordStrengthParamsWithHTTPClient creates a new PasswordStrengthParams object -// with the ability to set a custom HTTPClient for a request. -func NewPasswordStrengthParamsWithHTTPClient(client *http.Client) *PasswordStrengthParams { - return &PasswordStrengthParams{ - HTTPClient: client, - } -} - -/* -PasswordStrengthParams contains all the parameters to send to the API endpoint - - for the password strength operation. - - Typically these are written to a http.Request. -*/ -type PasswordStrengthParams struct { - - // Body. - Body *models.PasswordStrengthParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the password strength params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PasswordStrengthParams) WithDefaults() *PasswordStrengthParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the password strength params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PasswordStrengthParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the password strength params -func (o *PasswordStrengthParams) WithTimeout(timeout time.Duration) *PasswordStrengthParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the password strength params -func (o *PasswordStrengthParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the password strength params -func (o *PasswordStrengthParams) WithContext(ctx context.Context) *PasswordStrengthParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the password strength params -func (o *PasswordStrengthParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the password strength params -func (o *PasswordStrengthParams) WithHTTPClient(client *http.Client) *PasswordStrengthParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the password strength params -func (o *PasswordStrengthParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the password strength params -func (o *PasswordStrengthParams) WithBody(body *models.PasswordStrengthParams) *PasswordStrengthParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the password strength params -func (o *PasswordStrengthParams) SetBody(body *models.PasswordStrengthParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PasswordStrengthParams) 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/passwords/password_strength_responses.go b/v1/client/passwords/password_strength_responses.go deleted file mode 100644 index c45276e2..00000000 --- a/v1/client/passwords/password_strength_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package passwords - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// PasswordStrengthReader is a Reader for the PasswordStrength structure. -type PasswordStrengthReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PasswordStrengthReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPasswordStrengthOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPasswordStrengthDefault(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 - } -} - -// NewPasswordStrengthOK creates a PasswordStrengthOK with default headers values -func NewPasswordStrengthOK() *PasswordStrengthOK { - return &PasswordStrengthOK{} -} - -/* -PasswordStrengthOK describes a response with status code 200, with default header values. - -Success -*/ -type PasswordStrengthOK struct { - Payload *models.PasswordStrength -} - -// IsSuccess returns true when this password strength o k response has a 2xx status code -func (o *PasswordStrengthOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this password strength o k response has a 3xx status code -func (o *PasswordStrengthOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this password strength o k response has a 4xx status code -func (o *PasswordStrengthOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this password strength o k response has a 5xx status code -func (o *PasswordStrengthOK) IsServerError() bool { - return false -} - -// IsCode returns true when this password strength o k response a status code equal to that given -func (o *PasswordStrengthOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the password strength o k response -func (o *PasswordStrengthOK) Code() int { - return 200 -} - -func (o *PasswordStrengthOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /passwordStrength][%d] passwordStrengthOK %s", 200, payload) -} - -func (o *PasswordStrengthOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /passwordStrength][%d] passwordStrengthOK %s", 200, payload) -} - -func (o *PasswordStrengthOK) GetPayload() *models.PasswordStrength { - return o.Payload -} - -func (o *PasswordStrengthOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PasswordStrength) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPasswordStrengthDefault creates a PasswordStrengthDefault with default headers values -func NewPasswordStrengthDefault(code int) *PasswordStrengthDefault { - return &PasswordStrengthDefault{ - _statusCode: code, - } -} - -/* -PasswordStrengthDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type PasswordStrengthDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this password strength default response has a 2xx status code -func (o *PasswordStrengthDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this password strength default response has a 3xx status code -func (o *PasswordStrengthDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this password strength default response has a 4xx status code -func (o *PasswordStrengthDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this password strength default response has a 5xx status code -func (o *PasswordStrengthDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this password strength default response a status code equal to that given -func (o *PasswordStrengthDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the password strength default response -func (o *PasswordStrengthDefault) Code() int { - return o._statusCode -} - -func (o *PasswordStrengthDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /passwordStrength][%d] PasswordStrength default %s", o._statusCode, payload) -} - -func (o *PasswordStrengthDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /passwordStrength][%d] PasswordStrength default %s", o._statusCode, payload) -} - -func (o *PasswordStrengthDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *PasswordStrengthDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/passwords/passwords_client.go b/v1/client/passwords/passwords_client.go deleted file mode 100644 index d34c66ad..00000000 --- a/v1/client/passwords/passwords_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package passwords - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new passwords API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new passwords API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new passwords API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for passwords API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - PasswordStrength(params *PasswordStrengthParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PasswordStrengthOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -PasswordStrength gets the strength of a password - -Returns the strength of the input password. -*/ -func (a *Client) PasswordStrength(params *PasswordStrengthParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PasswordStrengthOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPasswordStrengthParams() - } - op := &runtime.ClientOperation{ - ID: "PasswordStrength", - Method: "POST", - PathPattern: "/passwordStrength", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PasswordStrengthReader{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.(*PasswordStrengthOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PasswordStrengthDefault) - 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/preferences/get_user_preferences_parameters.go b/v1/client/preferences/get_user_preferences_parameters.go deleted file mode 100644 index f38b6ddf..00000000 --- a/v1/client/preferences/get_user_preferences_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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" -) - -// NewGetUserPreferencesParams creates a new GetUserPreferencesParams 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 NewGetUserPreferencesParams() *GetUserPreferencesParams { - return &GetUserPreferencesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserPreferencesParamsWithTimeout creates a new GetUserPreferencesParams object -// with the ability to set a timeout on a request. -func NewGetUserPreferencesParamsWithTimeout(timeout time.Duration) *GetUserPreferencesParams { - return &GetUserPreferencesParams{ - timeout: timeout, - } -} - -// NewGetUserPreferencesParamsWithContext creates a new GetUserPreferencesParams object -// with the ability to set a context for a request. -func NewGetUserPreferencesParamsWithContext(ctx context.Context) *GetUserPreferencesParams { - return &GetUserPreferencesParams{ - Context: ctx, - } -} - -// NewGetUserPreferencesParamsWithHTTPClient creates a new GetUserPreferencesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserPreferencesParamsWithHTTPClient(client *http.Client) *GetUserPreferencesParams { - return &GetUserPreferencesParams{ - HTTPClient: client, - } -} - -/* -GetUserPreferencesParams contains all the parameters to send to the API endpoint - - for the get user preferences operation. - - Typically these are written to a http.Request. -*/ -type GetUserPreferencesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserPreferencesParams) WithDefaults() *GetUserPreferencesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserPreferencesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user preferences params -func (o *GetUserPreferencesParams) WithTimeout(timeout time.Duration) *GetUserPreferencesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user preferences params -func (o *GetUserPreferencesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user preferences params -func (o *GetUserPreferencesParams) WithContext(ctx context.Context) *GetUserPreferencesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user preferences params -func (o *GetUserPreferencesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user preferences params -func (o *GetUserPreferencesParams) WithHTTPClient(client *http.Client) *GetUserPreferencesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user preferences params -func (o *GetUserPreferencesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserPreferencesParams) 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/preferences/get_user_preferences_responses.go b/v1/client/preferences/get_user_preferences_responses.go deleted file mode 100644 index 2d947029..00000000 --- a/v1/client/preferences/get_user_preferences_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetUserPreferencesReader is a Reader for the GetUserPreferences structure. -type GetUserPreferencesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserPreferencesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserPreferencesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserPreferencesDefault(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 - } -} - -// NewGetUserPreferencesOK creates a GetUserPreferencesOK with default headers values -func NewGetUserPreferencesOK() *GetUserPreferencesOK { - return &GetUserPreferencesOK{} -} - -/* -GetUserPreferencesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserPreferencesOK struct { - Payload *models.UserPreferencesResult -} - -// IsSuccess returns true when this get user preferences o k response has a 2xx status code -func (o *GetUserPreferencesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user preferences o k response has a 3xx status code -func (o *GetUserPreferencesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user preferences o k response has a 4xx status code -func (o *GetUserPreferencesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user preferences o k response has a 5xx status code -func (o *GetUserPreferencesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user preferences o k response a status code equal to that given -func (o *GetUserPreferencesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user preferences o k response -func (o *GetUserPreferencesOK) Code() int { - return 200 -} - -func (o *GetUserPreferencesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/preferences][%d] getUserPreferencesOK %s", 200, payload) -} - -func (o *GetUserPreferencesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/preferences][%d] getUserPreferencesOK %s", 200, payload) -} - -func (o *GetUserPreferencesOK) GetPayload() *models.UserPreferencesResult { - return o.Payload -} - -func (o *GetUserPreferencesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserPreferencesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserPreferencesDefault creates a GetUserPreferencesDefault with default headers values -func NewGetUserPreferencesDefault(code int) *GetUserPreferencesDefault { - return &GetUserPreferencesDefault{ - _statusCode: code, - } -} - -/* -GetUserPreferencesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserPreferencesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get user preferences default response has a 2xx status code -func (o *GetUserPreferencesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user preferences default response has a 3xx status code -func (o *GetUserPreferencesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user preferences default response has a 4xx status code -func (o *GetUserPreferencesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user preferences default response has a 5xx status code -func (o *GetUserPreferencesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user preferences default response a status code equal to that given -func (o *GetUserPreferencesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user preferences default response -func (o *GetUserPreferencesDefault) Code() int { - return o._statusCode -} - -func (o *GetUserPreferencesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/preferences][%d] GetUserPreferences default %s", o._statusCode, payload) -} - -func (o *GetUserPreferencesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser/preferences][%d] GetUserPreferences default %s", o._statusCode, payload) -} - -func (o *GetUserPreferencesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetUserPreferencesDefault) 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/preferences/patch_user_preferences_parameters.go b/v1/client/preferences/patch_user_preferences_parameters.go deleted file mode 100644 index 4d520d87..00000000 --- a/v1/client/preferences/patch_user_preferences_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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" -) - -// NewPatchUserPreferencesParams creates a new PatchUserPreferencesParams 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 NewPatchUserPreferencesParams() *PatchUserPreferencesParams { - return &PatchUserPreferencesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchUserPreferencesParamsWithTimeout creates a new PatchUserPreferencesParams object -// with the ability to set a timeout on a request. -func NewPatchUserPreferencesParamsWithTimeout(timeout time.Duration) *PatchUserPreferencesParams { - return &PatchUserPreferencesParams{ - timeout: timeout, - } -} - -// NewPatchUserPreferencesParamsWithContext creates a new PatchUserPreferencesParams object -// with the ability to set a context for a request. -func NewPatchUserPreferencesParamsWithContext(ctx context.Context) *PatchUserPreferencesParams { - return &PatchUserPreferencesParams{ - Context: ctx, - } -} - -// NewPatchUserPreferencesParamsWithHTTPClient creates a new PatchUserPreferencesParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchUserPreferencesParamsWithHTTPClient(client *http.Client) *PatchUserPreferencesParams { - return &PatchUserPreferencesParams{ - HTTPClient: client, - } -} - -/* -PatchUserPreferencesParams contains all the parameters to send to the API endpoint - - for the patch user preferences operation. - - Typically these are written to a http.Request. -*/ -type PatchUserPreferencesParams struct { - - /* Preferences. - - Request to create or update User Preferences. - */ - Preferences map[string]string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchUserPreferencesParams) WithDefaults() *PatchUserPreferencesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchUserPreferencesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch user preferences params -func (o *PatchUserPreferencesParams) WithTimeout(timeout time.Duration) *PatchUserPreferencesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch user preferences params -func (o *PatchUserPreferencesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch user preferences params -func (o *PatchUserPreferencesParams) WithContext(ctx context.Context) *PatchUserPreferencesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch user preferences params -func (o *PatchUserPreferencesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch user preferences params -func (o *PatchUserPreferencesParams) WithHTTPClient(client *http.Client) *PatchUserPreferencesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch user preferences params -func (o *PatchUserPreferencesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPreferences adds the preferences to the patch user preferences params -func (o *PatchUserPreferencesParams) WithPreferences(preferences map[string]string) *PatchUserPreferencesParams { - o.SetPreferences(preferences) - return o -} - -// SetPreferences adds the preferences to the patch user preferences params -func (o *PatchUserPreferencesParams) SetPreferences(preferences map[string]string) { - o.Preferences = preferences -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchUserPreferencesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Preferences != nil { - if err := r.SetBodyParam(o.Preferences); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/preferences/patch_user_preferences_responses.go b/v1/client/preferences/patch_user_preferences_responses.go deleted file mode 100644 index 2405442f..00000000 --- a/v1/client/preferences/patch_user_preferences_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// PatchUserPreferencesReader is a Reader for the PatchUserPreferences structure. -type PatchUserPreferencesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchUserPreferencesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchUserPreferencesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPatchUserPreferencesDefault(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 - } -} - -// NewPatchUserPreferencesOK creates a PatchUserPreferencesOK with default headers values -func NewPatchUserPreferencesOK() *PatchUserPreferencesOK { - return &PatchUserPreferencesOK{} -} - -/* -PatchUserPreferencesOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchUserPreferencesOK struct { - Payload *models.UserPreferencesResult -} - -// IsSuccess returns true when this patch user preferences o k response has a 2xx status code -func (o *PatchUserPreferencesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch user preferences o k response has a 3xx status code -func (o *PatchUserPreferencesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch user preferences o k response has a 4xx status code -func (o *PatchUserPreferencesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch user preferences o k response has a 5xx status code -func (o *PatchUserPreferencesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch user preferences o k response a status code equal to that given -func (o *PatchUserPreferencesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the patch user preferences o k response -func (o *PatchUserPreferencesOK) Code() int { - return 200 -} - -func (o *PatchUserPreferencesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/preferences][%d] patchUserPreferencesOK %s", 200, payload) -} - -func (o *PatchUserPreferencesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/preferences][%d] patchUserPreferencesOK %s", 200, payload) -} - -func (o *PatchUserPreferencesOK) GetPayload() *models.UserPreferencesResult { - return o.Payload -} - -func (o *PatchUserPreferencesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserPreferencesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchUserPreferencesDefault creates a PatchUserPreferencesDefault with default headers values -func NewPatchUserPreferencesDefault(code int) *PatchUserPreferencesDefault { - return &PatchUserPreferencesDefault{ - _statusCode: code, - } -} - -/* -PatchUserPreferencesDefault describes a response with status code -1, with default header values. - -Error -*/ -type PatchUserPreferencesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this patch user preferences default response has a 2xx status code -func (o *PatchUserPreferencesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this patch user preferences default response has a 3xx status code -func (o *PatchUserPreferencesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this patch user preferences default response has a 4xx status code -func (o *PatchUserPreferencesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this patch user preferences default response has a 5xx status code -func (o *PatchUserPreferencesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this patch user preferences default response a status code equal to that given -func (o *PatchUserPreferencesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the patch user preferences default response -func (o *PatchUserPreferencesDefault) Code() int { - return o._statusCode -} - -func (o *PatchUserPreferencesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/preferences][%d] PatchUserPreferences default %s", o._statusCode, payload) -} - -func (o *PatchUserPreferencesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/sessionUser/preferences][%d] PatchUserPreferences default %s", o._statusCode, payload) -} - -func (o *PatchUserPreferencesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *PatchUserPreferencesDefault) 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/preferences/preferences_client.go b/v1/client/preferences/preferences_client.go deleted file mode 100644 index 20f28c1d..00000000 --- a/v1/client/preferences/preferences_client.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new preferences API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new preferences API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new preferences API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for preferences API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetUserPreferences(params *GetUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserPreferencesOK, error) - - PatchUserPreferences(params *PatchUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchUserPreferencesOK, error) - - UpdateUserPreferences(params *UpdateUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserPreferencesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetUserPreferences lists the preferences of the session user -*/ -func (a *Client) GetUserPreferences(params *GetUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserPreferencesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserPreferencesParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserPreferences", - Method: "GET", - PathPattern: "/public/sessionUser/preferences", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserPreferencesReader{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.(*GetUserPreferencesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserPreferencesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PatchUserPreferences updates specific preferences of the session user - -Returns the updated user preferences. -*/ -func (a *Client) PatchUserPreferences(params *PatchUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchUserPreferencesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchUserPreferencesParams() - } - op := &runtime.ClientOperation{ - ID: "PatchUserPreferences", - Method: "PATCH", - PathPattern: "/public/sessionUser/preferences", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PatchUserPreferencesReader{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.(*PatchUserPreferencesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PatchUserPreferencesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUserPreferences updates the preferences of the session user - -Returns the updated user preferences. -*/ -func (a *Client) UpdateUserPreferences(params *UpdateUserPreferencesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserPreferencesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserPreferencesParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUserPreferences", - Method: "PUT", - PathPattern: "/public/sessionUser/preferences", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserPreferencesReader{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.(*UpdateUserPreferencesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserPreferencesDefault) - 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/preferences/update_user_preferences_parameters.go b/v1/client/preferences/update_user_preferences_parameters.go deleted file mode 100644 index 864cfca2..00000000 --- a/v1/client/preferences/update_user_preferences_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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" -) - -// NewUpdateUserPreferencesParams creates a new UpdateUserPreferencesParams 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 NewUpdateUserPreferencesParams() *UpdateUserPreferencesParams { - return &UpdateUserPreferencesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserPreferencesParamsWithTimeout creates a new UpdateUserPreferencesParams object -// with the ability to set a timeout on a request. -func NewUpdateUserPreferencesParamsWithTimeout(timeout time.Duration) *UpdateUserPreferencesParams { - return &UpdateUserPreferencesParams{ - timeout: timeout, - } -} - -// NewUpdateUserPreferencesParamsWithContext creates a new UpdateUserPreferencesParams object -// with the ability to set a context for a request. -func NewUpdateUserPreferencesParamsWithContext(ctx context.Context) *UpdateUserPreferencesParams { - return &UpdateUserPreferencesParams{ - Context: ctx, - } -} - -// NewUpdateUserPreferencesParamsWithHTTPClient creates a new UpdateUserPreferencesParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserPreferencesParamsWithHTTPClient(client *http.Client) *UpdateUserPreferencesParams { - return &UpdateUserPreferencesParams{ - HTTPClient: client, - } -} - -/* -UpdateUserPreferencesParams contains all the parameters to send to the API endpoint - - for the update user preferences operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserPreferencesParams struct { - - /* Preferences. - - Request to create or update User Preferences. - */ - Preferences map[string]string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserPreferencesParams) WithDefaults() *UpdateUserPreferencesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user preferences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserPreferencesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user preferences params -func (o *UpdateUserPreferencesParams) WithTimeout(timeout time.Duration) *UpdateUserPreferencesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user preferences params -func (o *UpdateUserPreferencesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user preferences params -func (o *UpdateUserPreferencesParams) WithContext(ctx context.Context) *UpdateUserPreferencesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user preferences params -func (o *UpdateUserPreferencesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user preferences params -func (o *UpdateUserPreferencesParams) WithHTTPClient(client *http.Client) *UpdateUserPreferencesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user preferences params -func (o *UpdateUserPreferencesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPreferences adds the preferences to the update user preferences params -func (o *UpdateUserPreferencesParams) WithPreferences(preferences map[string]string) *UpdateUserPreferencesParams { - o.SetPreferences(preferences) - return o -} - -// SetPreferences adds the preferences to the update user preferences params -func (o *UpdateUserPreferencesParams) SetPreferences(preferences map[string]string) { - o.Preferences = preferences -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserPreferencesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Preferences != nil { - if err := r.SetBodyParam(o.Preferences); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/preferences/update_user_preferences_responses.go b/v1/client/preferences/update_user_preferences_responses.go deleted file mode 100644 index ea9aee7c..00000000 --- a/v1/client/preferences/update_user_preferences_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package preferences - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateUserPreferencesReader is a Reader for the UpdateUserPreferences structure. -type UpdateUserPreferencesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserPreferencesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserPreferencesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserPreferencesDefault(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 - } -} - -// NewUpdateUserPreferencesOK creates a UpdateUserPreferencesOK with default headers values -func NewUpdateUserPreferencesOK() *UpdateUserPreferencesOK { - return &UpdateUserPreferencesOK{} -} - -/* -UpdateUserPreferencesOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateUserPreferencesOK struct { - Payload *models.UserPreferencesResult -} - -// IsSuccess returns true when this update user preferences o k response has a 2xx status code -func (o *UpdateUserPreferencesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user preferences o k response has a 3xx status code -func (o *UpdateUserPreferencesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user preferences o k response has a 4xx status code -func (o *UpdateUserPreferencesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user preferences o k response has a 5xx status code -func (o *UpdateUserPreferencesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user preferences o k response a status code equal to that given -func (o *UpdateUserPreferencesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user preferences o k response -func (o *UpdateUserPreferencesOK) Code() int { - return 200 -} - -func (o *UpdateUserPreferencesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/sessionUser/preferences][%d] updateUserPreferencesOK %s", 200, payload) -} - -func (o *UpdateUserPreferencesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/sessionUser/preferences][%d] updateUserPreferencesOK %s", 200, payload) -} - -func (o *UpdateUserPreferencesOK) GetPayload() *models.UserPreferencesResult { - return o.Payload -} - -func (o *UpdateUserPreferencesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserPreferencesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserPreferencesDefault creates a UpdateUserPreferencesDefault with default headers values -func NewUpdateUserPreferencesDefault(code int) *UpdateUserPreferencesDefault { - return &UpdateUserPreferencesDefault{ - _statusCode: code, - } -} - -/* -UpdateUserPreferencesDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserPreferencesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update user preferences default response has a 2xx status code -func (o *UpdateUserPreferencesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user preferences default response has a 3xx status code -func (o *UpdateUserPreferencesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user preferences default response has a 4xx status code -func (o *UpdateUserPreferencesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user preferences default response has a 5xx status code -func (o *UpdateUserPreferencesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user preferences default response a status code equal to that given -func (o *UpdateUserPreferencesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user preferences default response -func (o *UpdateUserPreferencesDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserPreferencesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/sessionUser/preferences][%d] UpdateUserPreferences default %s", o._statusCode, payload) -} - -func (o *UpdateUserPreferencesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/sessionUser/preferences][%d] UpdateUserPreferences default %s", o._statusCode, payload) -} - -func (o *UpdateUserPreferencesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateUserPreferencesDefault) 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/principals/create_user_api_key_parameters.go b/v1/client/principals/create_user_api_key_parameters.go deleted file mode 100644 index e5686d05..00000000 --- a/v1/client/principals/create_user_api_key_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateUserAPIKeyParams creates a new CreateUserAPIKeyParams 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 NewCreateUserAPIKeyParams() *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateUserAPIKeyParamsWithTimeout creates a new CreateUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewCreateUserAPIKeyParamsWithTimeout(timeout time.Duration) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewCreateUserAPIKeyParamsWithContext creates a new CreateUserAPIKeyParams object -// with the ability to set a context for a request. -func NewCreateUserAPIKeyParamsWithContext(ctx context.Context) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - Context: ctx, - } -} - -// NewCreateUserAPIKeyParamsWithHTTPClient creates a new CreateUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateUserAPIKeyParamsWithHTTPClient(client *http.Client) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -CreateUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the create user Api key operation. - - Typically these are written to a http.Request. -*/ -type CreateUserAPIKeyParams struct { - - /* Body. - - Request to create an API key. - */ - Body *models.CreateAPIKeyParams - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserAPIKeyParams) WithDefaults() *CreateUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create user Api key params -func (o *CreateUserAPIKeyParams) WithTimeout(timeout time.Duration) *CreateUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create user Api key params -func (o *CreateUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create user Api key params -func (o *CreateUserAPIKeyParams) WithContext(ctx context.Context) *CreateUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create user Api key params -func (o *CreateUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create user Api key params -func (o *CreateUserAPIKeyParams) WithHTTPClient(client *http.Client) *CreateUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create user Api key params -func (o *CreateUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create user Api key params -func (o *CreateUserAPIKeyParams) WithBody(body *models.CreateAPIKeyParams) *CreateUserAPIKeyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create user Api key params -func (o *CreateUserAPIKeyParams) SetBody(body *models.CreateAPIKeyParams) { - o.Body = body -} - -// WithSid adds the sid to the create user Api key params -func (o *CreateUserAPIKeyParams) WithSid(sid string) *CreateUserAPIKeyParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the create user Api key params -func (o *CreateUserAPIKeyParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateUserAPIKeyParams) 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 - } - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/principals/create_user_api_key_responses.go b/v1/client/principals/create_user_api_key_responses.go deleted file mode 100644 index c1a18244..00000000 --- a/v1/client/principals/create_user_api_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateUserAPIKeyReader is a Reader for the CreateUserAPIKey structure. -type CreateUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateUserAPIKeyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateUserAPIKeyDefault(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 - } -} - -// NewCreateUserAPIKeyCreated creates a CreateUserAPIKeyCreated with default headers values -func NewCreateUserAPIKeyCreated() *CreateUserAPIKeyCreated { - return &CreateUserAPIKeyCreated{} -} - -/* -CreateUserAPIKeyCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateUserAPIKeyCreated struct { - Payload *models.CreatedAPIKey -} - -// IsSuccess returns true when this create user Api key created response has a 2xx status code -func (o *CreateUserAPIKeyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create user Api key created response has a 3xx status code -func (o *CreateUserAPIKeyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create user Api key created response has a 4xx status code -func (o *CreateUserAPIKeyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create user Api key created response has a 5xx status code -func (o *CreateUserAPIKeyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create user Api key created response a status code equal to that given -func (o *CreateUserAPIKeyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create user Api key created response -func (o *CreateUserAPIKeyCreated) Code() int { - return 201 -} - -func (o *CreateUserAPIKeyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys][%d] createUserApiKeyCreated %s", 201, payload) -} - -func (o *CreateUserAPIKeyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys][%d] createUserApiKeyCreated %s", 201, payload) -} - -func (o *CreateUserAPIKeyCreated) GetPayload() *models.CreatedAPIKey { - return o.Payload -} - -func (o *CreateUserAPIKeyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateUserAPIKeyDefault creates a CreateUserAPIKeyDefault with default headers values -func NewCreateUserAPIKeyDefault(code int) *CreateUserAPIKeyDefault { - return &CreateUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -CreateUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateUserAPIKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create user Api key default response has a 2xx status code -func (o *CreateUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create user Api key default response has a 3xx status code -func (o *CreateUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create user Api key default response has a 4xx status code -func (o *CreateUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create user Api key default response has a 5xx status code -func (o *CreateUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create user Api key default response a status code equal to that given -func (o *CreateUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create user Api key default response -func (o *CreateUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *CreateUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys][%d] CreateUserApiKey default %s", o._statusCode, payload) -} - -func (o *CreateUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys][%d] CreateUserApiKey default %s", o._statusCode, payload) -} - -func (o *CreateUserAPIKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateUserAPIKeyDefault) 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/principals/create_user_parameters.go b/v1/client/principals/create_user_parameters.go deleted file mode 100644 index 9fd0c838..00000000 --- a/v1/client/principals/create_user_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateUserParams creates a new CreateUserParams 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 NewCreateUserParams() *CreateUserParams { - return &CreateUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateUserParamsWithTimeout creates a new CreateUserParams object -// with the ability to set a timeout on a request. -func NewCreateUserParamsWithTimeout(timeout time.Duration) *CreateUserParams { - return &CreateUserParams{ - timeout: timeout, - } -} - -// NewCreateUserParamsWithContext creates a new CreateUserParams object -// with the ability to set a context for a request. -func NewCreateUserParamsWithContext(ctx context.Context) *CreateUserParams { - return &CreateUserParams{ - Context: ctx, - } -} - -// NewCreateUserParamsWithHTTPClient creates a new CreateUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateUserParamsWithHTTPClient(client *http.Client) *CreateUserParams { - return &CreateUserParams{ - HTTPClient: client, - } -} - -/* -CreateUserParams contains all the parameters to send to the API endpoint - - for the create user operation. - - Typically these are written to a http.Request. -*/ -type CreateUserParams struct { - - /* Body. - - Request to add or create a new user. - */ - Body *models.UserParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserParams) WithDefaults() *CreateUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create user params -func (o *CreateUserParams) WithTimeout(timeout time.Duration) *CreateUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create user params -func (o *CreateUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create user params -func (o *CreateUserParams) WithContext(ctx context.Context) *CreateUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create user params -func (o *CreateUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create user params -func (o *CreateUserParams) WithHTTPClient(client *http.Client) *CreateUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create user params -func (o *CreateUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create user params -func (o *CreateUserParams) WithBody(body *models.UserParameters) *CreateUserParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create user params -func (o *CreateUserParams) SetBody(body *models.UserParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateUserParams) 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/principals/create_user_responses.go b/v1/client/principals/create_user_responses.go deleted file mode 100644 index 16e6d2f1..00000000 --- a/v1/client/principals/create_user_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateUserReader is a Reader for the CreateUser structure. -type CreateUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateUserCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateUserDefault(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 - } -} - -// NewCreateUserCreated creates a CreateUserCreated with default headers values -func NewCreateUserCreated() *CreateUserCreated { - return &CreateUserCreated{} -} - -/* -CreateUserCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateUserCreated struct { - Payload *models.User -} - -// IsSuccess returns true when this create user created response has a 2xx status code -func (o *CreateUserCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create user created response has a 3xx status code -func (o *CreateUserCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create user created response has a 4xx status code -func (o *CreateUserCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create user created response has a 5xx status code -func (o *CreateUserCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create user created response a status code equal to that given -func (o *CreateUserCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create user created response -func (o *CreateUserCreated) Code() int { - return 201 -} - -func (o *CreateUserCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users][%d] createUserCreated %s", 201, payload) -} - -func (o *CreateUserCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users][%d] createUserCreated %s", 201, payload) -} - -func (o *CreateUserCreated) GetPayload() *models.User { - return o.Payload -} - -func (o *CreateUserCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.User) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateUserDefault creates a CreateUserDefault with default headers values -func NewCreateUserDefault(code int) *CreateUserDefault { - return &CreateUserDefault{ - _statusCode: code, - } -} - -/* -CreateUserDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateUserDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create user default response has a 2xx status code -func (o *CreateUserDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create user default response has a 3xx status code -func (o *CreateUserDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create user default response has a 4xx status code -func (o *CreateUserDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create user default response has a 5xx status code -func (o *CreateUserDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create user default response a status code equal to that given -func (o *CreateUserDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create user default response -func (o *CreateUserDefault) Code() int { - return o._statusCode -} - -func (o *CreateUserDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users][%d] CreateUser default %s", o._statusCode, payload) -} - -func (o *CreateUserDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users][%d] CreateUser default %s", o._statusCode, payload) -} - -func (o *CreateUserDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateUserDefault) 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/principals/delete_user_api_key_parameters.go b/v1/client/principals/delete_user_api_key_parameters.go deleted file mode 100644 index 9f302804..00000000 --- a/v1/client/principals/delete_user_api_key_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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" -) - -// NewDeleteUserAPIKeyParams creates a new DeleteUserAPIKeyParams 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 NewDeleteUserAPIKeyParams() *DeleteUserAPIKeyParams { - return &DeleteUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUserAPIKeyParamsWithTimeout creates a new DeleteUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewDeleteUserAPIKeyParamsWithTimeout(timeout time.Duration) *DeleteUserAPIKeyParams { - return &DeleteUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewDeleteUserAPIKeyParamsWithContext creates a new DeleteUserAPIKeyParams object -// with the ability to set a context for a request. -func NewDeleteUserAPIKeyParamsWithContext(ctx context.Context) *DeleteUserAPIKeyParams { - return &DeleteUserAPIKeyParams{ - Context: ctx, - } -} - -// NewDeleteUserAPIKeyParamsWithHTTPClient creates a new DeleteUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUserAPIKeyParamsWithHTTPClient(client *http.Client) *DeleteUserAPIKeyParams { - return &DeleteUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -DeleteUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the delete user Api key operation. - - Typically these are written to a http.Request. -*/ -type DeleteUserAPIKeyParams struct { - - /* ID. - - Specifies the API key id. - */ - ID string - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserAPIKeyParams) WithDefaults() *DeleteUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete user Api key params -func (o *DeleteUserAPIKeyParams) WithTimeout(timeout time.Duration) *DeleteUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete user Api key params -func (o *DeleteUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete user Api key params -func (o *DeleteUserAPIKeyParams) WithContext(ctx context.Context) *DeleteUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete user Api key params -func (o *DeleteUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete user Api key params -func (o *DeleteUserAPIKeyParams) WithHTTPClient(client *http.Client) *DeleteUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete user Api key params -func (o *DeleteUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete user Api key params -func (o *DeleteUserAPIKeyParams) WithID(id string) *DeleteUserAPIKeyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete user Api key params -func (o *DeleteUserAPIKeyParams) SetID(id string) { - o.ID = id -} - -// WithSid adds the sid to the delete user Api key params -func (o *DeleteUserAPIKeyParams) WithSid(sid string) *DeleteUserAPIKeyParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the delete user Api key params -func (o *DeleteUserAPIKeyParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUserAPIKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/principals/delete_user_api_key_responses.go b/v1/client/principals/delete_user_api_key_responses.go deleted file mode 100644 index af385c3c..00000000 --- a/v1/client/principals/delete_user_api_key_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteUserAPIKeyReader is a Reader for the DeleteUserAPIKey structure. -type DeleteUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUserAPIKeyNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUserAPIKeyDefault(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 - } -} - -// NewDeleteUserAPIKeyNoContent creates a DeleteUserAPIKeyNoContent with default headers values -func NewDeleteUserAPIKeyNoContent() *DeleteUserAPIKeyNoContent { - return &DeleteUserAPIKeyNoContent{} -} - -/* -DeleteUserAPIKeyNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUserAPIKeyNoContent struct { -} - -// IsSuccess returns true when this delete user Api key no content response has a 2xx status code -func (o *DeleteUserAPIKeyNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete user Api key no content response has a 3xx status code -func (o *DeleteUserAPIKeyNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete user Api key no content response has a 4xx status code -func (o *DeleteUserAPIKeyNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete user Api key no content response has a 5xx status code -func (o *DeleteUserAPIKeyNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete user Api key no content response a status code equal to that given -func (o *DeleteUserAPIKeyNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete user Api key no content response -func (o *DeleteUserAPIKeyNoContent) Code() int { - return 204 -} - -func (o *DeleteUserAPIKeyNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/users/{sid}/apiKeys/{id}][%d] deleteUserApiKeyNoContent", 204) -} - -func (o *DeleteUserAPIKeyNoContent) String() string { - return fmt.Sprintf("[DELETE /public/users/{sid}/apiKeys/{id}][%d] deleteUserApiKeyNoContent", 204) -} - -func (o *DeleteUserAPIKeyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUserAPIKeyDefault creates a DeleteUserAPIKeyDefault with default headers values -func NewDeleteUserAPIKeyDefault(code int) *DeleteUserAPIKeyDefault { - return &DeleteUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -DeleteUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUserAPIKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete user Api key default response has a 2xx status code -func (o *DeleteUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete user Api key default response has a 3xx status code -func (o *DeleteUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete user Api key default response has a 4xx status code -func (o *DeleteUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete user Api key default response has a 5xx status code -func (o *DeleteUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete user Api key default response a status code equal to that given -func (o *DeleteUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete user Api key default response -func (o *DeleteUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/users/{sid}/apiKeys/{id}][%d] DeleteUserApiKey default %s", o._statusCode, payload) -} - -func (o *DeleteUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/users/{sid}/apiKeys/{id}][%d] DeleteUserApiKey default %s", o._statusCode, payload) -} - -func (o *DeleteUserAPIKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteUserAPIKeyDefault) 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/principals/delete_users_parameters.go b/v1/client/principals/delete_users_parameters.go deleted file mode 100644 index d7858d5e..00000000 --- a/v1/client/principals/delete_users_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteUsersParams creates a new DeleteUsersParams 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 NewDeleteUsersParams() *DeleteUsersParams { - return &DeleteUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUsersParamsWithTimeout creates a new DeleteUsersParams object -// with the ability to set a timeout on a request. -func NewDeleteUsersParamsWithTimeout(timeout time.Duration) *DeleteUsersParams { - return &DeleteUsersParams{ - timeout: timeout, - } -} - -// NewDeleteUsersParamsWithContext creates a new DeleteUsersParams object -// with the ability to set a context for a request. -func NewDeleteUsersParamsWithContext(ctx context.Context) *DeleteUsersParams { - return &DeleteUsersParams{ - Context: ctx, - } -} - -// NewDeleteUsersParamsWithHTTPClient creates a new DeleteUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUsersParamsWithHTTPClient(client *http.Client) *DeleteUsersParams { - return &DeleteUsersParams{ - HTTPClient: client, - } -} - -/* -DeleteUsersParams contains all the parameters to send to the API endpoint - - for the delete users operation. - - Typically these are written to a http.Request. -*/ -type DeleteUsersParams struct { - - /* Body. - - Request to delete one or more users on the Cohesity Cluster. - */ - Body *models.UserDeleteParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUsersParams) WithDefaults() *DeleteUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete users params -func (o *DeleteUsersParams) WithTimeout(timeout time.Duration) *DeleteUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete users params -func (o *DeleteUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete users params -func (o *DeleteUsersParams) WithContext(ctx context.Context) *DeleteUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete users params -func (o *DeleteUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete users params -func (o *DeleteUsersParams) WithHTTPClient(client *http.Client) *DeleteUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete users params -func (o *DeleteUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete users params -func (o *DeleteUsersParams) WithBody(body *models.UserDeleteParameters) *DeleteUsersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete users params -func (o *DeleteUsersParams) SetBody(body *models.UserDeleteParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUsersParams) 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/principals/delete_users_responses.go b/v1/client/principals/delete_users_responses.go deleted file mode 100644 index 57657ae0..00000000 --- a/v1/client/principals/delete_users_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteUsersReader is a Reader for the DeleteUsers structure. -type DeleteUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUsersNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUsersDefault(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 - } -} - -// NewDeleteUsersNoContent creates a DeleteUsersNoContent with default headers values -func NewDeleteUsersNoContent() *DeleteUsersNoContent { - return &DeleteUsersNoContent{} -} - -/* -DeleteUsersNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUsersNoContent struct { -} - -// IsSuccess returns true when this delete users no content response has a 2xx status code -func (o *DeleteUsersNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete users no content response has a 3xx status code -func (o *DeleteUsersNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete users no content response has a 4xx status code -func (o *DeleteUsersNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete users no content response has a 5xx status code -func (o *DeleteUsersNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete users no content response a status code equal to that given -func (o *DeleteUsersNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete users no content response -func (o *DeleteUsersNoContent) Code() int { - return 204 -} - -func (o *DeleteUsersNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/users][%d] deleteUsersNoContent", 204) -} - -func (o *DeleteUsersNoContent) String() string { - return fmt.Sprintf("[DELETE /public/users][%d] deleteUsersNoContent", 204) -} - -func (o *DeleteUsersNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUsersDefault creates a DeleteUsersDefault with default headers values -func NewDeleteUsersDefault(code int) *DeleteUsersDefault { - return &DeleteUsersDefault{ - _statusCode: code, - } -} - -/* -DeleteUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUsersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete users default response has a 2xx status code -func (o *DeleteUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete users default response has a 3xx status code -func (o *DeleteUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete users default response has a 4xx status code -func (o *DeleteUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete users default response has a 5xx status code -func (o *DeleteUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete users default response a status code equal to that given -func (o *DeleteUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete users default response -func (o *DeleteUsersDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/users][%d] DeleteUsers default %s", o._statusCode, payload) -} - -func (o *DeleteUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/users][%d] DeleteUsers default %s", o._statusCode, payload) -} - -func (o *DeleteUsersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteUsersDefault) 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/principals/get_all_user_api_keys_parameters.go b/v1/client/principals/get_all_user_api_keys_parameters.go deleted file mode 100644 index 10411259..00000000 --- a/v1/client/principals/get_all_user_api_keys_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/go-openapi/swag" -) - -// NewGetAllUserAPIKeysParams creates a new GetAllUserAPIKeysParams 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 NewGetAllUserAPIKeysParams() *GetAllUserAPIKeysParams { - return &GetAllUserAPIKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAllUserAPIKeysParamsWithTimeout creates a new GetAllUserAPIKeysParams object -// with the ability to set a timeout on a request. -func NewGetAllUserAPIKeysParamsWithTimeout(timeout time.Duration) *GetAllUserAPIKeysParams { - return &GetAllUserAPIKeysParams{ - timeout: timeout, - } -} - -// NewGetAllUserAPIKeysParamsWithContext creates a new GetAllUserAPIKeysParams object -// with the ability to set a context for a request. -func NewGetAllUserAPIKeysParamsWithContext(ctx context.Context) *GetAllUserAPIKeysParams { - return &GetAllUserAPIKeysParams{ - Context: ctx, - } -} - -// NewGetAllUserAPIKeysParamsWithHTTPClient creates a new GetAllUserAPIKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAllUserAPIKeysParamsWithHTTPClient(client *http.Client) *GetAllUserAPIKeysParams { - return &GetAllUserAPIKeysParams{ - HTTPClient: client, - } -} - -/* -GetAllUserAPIKeysParams contains all the parameters to send to the API endpoint - - for the get all user Api keys operation. - - Typically these are written to a http.Request. -*/ -type GetAllUserAPIKeysParams struct { - - /* UserSids. - - Specifies a list of user sids. - */ - UserSids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get all user Api keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllUserAPIKeysParams) WithDefaults() *GetAllUserAPIKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get all user Api keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllUserAPIKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) WithTimeout(timeout time.Duration) *GetAllUserAPIKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) WithContext(ctx context.Context) *GetAllUserAPIKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) WithHTTPClient(client *http.Client) *GetAllUserAPIKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithUserSids adds the userSids to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) WithUserSids(userSids []string) *GetAllUserAPIKeysParams { - o.SetUserSids(userSids) - return o -} - -// SetUserSids adds the userSids to the get all user Api keys params -func (o *GetAllUserAPIKeysParams) SetUserSids(userSids []string) { - o.UserSids = userSids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAllUserAPIKeysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.UserSids != nil { - - // binding items for userSids - joinedUserSids := o.bindParamUserSids(reg) - - // query array param userSids - if err := r.SetQueryParam("userSids", joinedUserSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAllUserAPIKeys binds the parameter userSids -func (o *GetAllUserAPIKeysParams) bindParamUserSids(formats strfmt.Registry) []string { - userSidsIR := o.UserSids - - var userSidsIC []string - for _, userSidsIIR := range userSidsIR { // explode []string - - userSidsIIV := userSidsIIR // string as string - userSidsIC = append(userSidsIC, userSidsIIV) - } - - // items.CollectionFormat: "" - userSidsIS := swag.JoinByFormat(userSidsIC, "") - - return userSidsIS -} diff --git a/v1/client/principals/get_all_user_api_keys_responses.go b/v1/client/principals/get_all_user_api_keys_responses.go deleted file mode 100644 index 9a322f48..00000000 --- a/v1/client/principals/get_all_user_api_keys_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAllUserAPIKeysReader is a Reader for the GetAllUserAPIKeys structure. -type GetAllUserAPIKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAllUserAPIKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAllUserAPIKeysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAllUserAPIKeysDefault(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 - } -} - -// NewGetAllUserAPIKeysOK creates a GetAllUserAPIKeysOK with default headers values -func NewGetAllUserAPIKeysOK() *GetAllUserAPIKeysOK { - return &GetAllUserAPIKeysOK{} -} - -/* -GetAllUserAPIKeysOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAllUserAPIKeysOK struct { - Payload []*models.APIKey -} - -// IsSuccess returns true when this get all user Api keys o k response has a 2xx status code -func (o *GetAllUserAPIKeysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get all user Api keys o k response has a 3xx status code -func (o *GetAllUserAPIKeysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all user Api keys o k response has a 4xx status code -func (o *GetAllUserAPIKeysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all user Api keys o k response has a 5xx status code -func (o *GetAllUserAPIKeysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get all user Api keys o k response a status code equal to that given -func (o *GetAllUserAPIKeysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get all user Api keys o k response -func (o *GetAllUserAPIKeysOK) Code() int { - return 200 -} - -func (o *GetAllUserAPIKeysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/usersApiKeys][%d] getAllUserApiKeysOK %s", 200, payload) -} - -func (o *GetAllUserAPIKeysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/usersApiKeys][%d] getAllUserApiKeysOK %s", 200, payload) -} - -func (o *GetAllUserAPIKeysOK) GetPayload() []*models.APIKey { - return o.Payload -} - -func (o *GetAllUserAPIKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllUserAPIKeysDefault creates a GetAllUserAPIKeysDefault with default headers values -func NewGetAllUserAPIKeysDefault(code int) *GetAllUserAPIKeysDefault { - return &GetAllUserAPIKeysDefault{ - _statusCode: code, - } -} - -/* -GetAllUserAPIKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAllUserAPIKeysDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get all user Api keys default response has a 2xx status code -func (o *GetAllUserAPIKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get all user Api keys default response has a 3xx status code -func (o *GetAllUserAPIKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get all user Api keys default response has a 4xx status code -func (o *GetAllUserAPIKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get all user Api keys default response has a 5xx status code -func (o *GetAllUserAPIKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get all user Api keys default response a status code equal to that given -func (o *GetAllUserAPIKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get all user Api keys default response -func (o *GetAllUserAPIKeysDefault) Code() int { - return o._statusCode -} - -func (o *GetAllUserAPIKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/usersApiKeys][%d] GetAllUserApiKeys default %s", o._statusCode, payload) -} - -func (o *GetAllUserAPIKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/usersApiKeys][%d] GetAllUserApiKeys default %s", o._statusCode, payload) -} - -func (o *GetAllUserAPIKeysDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAllUserAPIKeysDefault) 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/principals/get_session_user_parameters.go b/v1/client/principals/get_session_user_parameters.go deleted file mode 100644 index ca75ccc7..00000000 --- a/v1/client/principals/get_session_user_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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" -) - -// NewGetSessionUserParams creates a new GetSessionUserParams 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 NewGetSessionUserParams() *GetSessionUserParams { - return &GetSessionUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSessionUserParamsWithTimeout creates a new GetSessionUserParams object -// with the ability to set a timeout on a request. -func NewGetSessionUserParamsWithTimeout(timeout time.Duration) *GetSessionUserParams { - return &GetSessionUserParams{ - timeout: timeout, - } -} - -// NewGetSessionUserParamsWithContext creates a new GetSessionUserParams object -// with the ability to set a context for a request. -func NewGetSessionUserParamsWithContext(ctx context.Context) *GetSessionUserParams { - return &GetSessionUserParams{ - Context: ctx, - } -} - -// NewGetSessionUserParamsWithHTTPClient creates a new GetSessionUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSessionUserParamsWithHTTPClient(client *http.Client) *GetSessionUserParams { - return &GetSessionUserParams{ - HTTPClient: client, - } -} - -/* -GetSessionUserParams contains all the parameters to send to the API endpoint - - for the get session user operation. - - Typically these are written to a http.Request. -*/ -type GetSessionUserParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get session user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSessionUserParams) WithDefaults() *GetSessionUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get session user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSessionUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get session user params -func (o *GetSessionUserParams) WithTimeout(timeout time.Duration) *GetSessionUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get session user params -func (o *GetSessionUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get session user params -func (o *GetSessionUserParams) WithContext(ctx context.Context) *GetSessionUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get session user params -func (o *GetSessionUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get session user params -func (o *GetSessionUserParams) WithHTTPClient(client *http.Client) *GetSessionUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get session user params -func (o *GetSessionUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSessionUserParams) 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/principals/get_session_user_responses.go b/v1/client/principals/get_session_user_responses.go deleted file mode 100644 index 226f5aec..00000000 --- a/v1/client/principals/get_session_user_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSessionUserReader is a Reader for the GetSessionUser structure. -type GetSessionUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSessionUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSessionUserOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSessionUserDefault(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 - } -} - -// NewGetSessionUserOK creates a GetSessionUserOK with default headers values -func NewGetSessionUserOK() *GetSessionUserOK { - return &GetSessionUserOK{} -} - -/* -GetSessionUserOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSessionUserOK struct { - Payload *models.User -} - -// IsSuccess returns true when this get session user o k response has a 2xx status code -func (o *GetSessionUserOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get session user o k response has a 3xx status code -func (o *GetSessionUserOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get session user o k response has a 4xx status code -func (o *GetSessionUserOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get session user o k response has a 5xx status code -func (o *GetSessionUserOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get session user o k response a status code equal to that given -func (o *GetSessionUserOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get session user o k response -func (o *GetSessionUserOK) Code() int { - return 200 -} - -func (o *GetSessionUserOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser][%d] getSessionUserOK %s", 200, payload) -} - -func (o *GetSessionUserOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser][%d] getSessionUserOK %s", 200, payload) -} - -func (o *GetSessionUserOK) GetPayload() *models.User { - return o.Payload -} - -func (o *GetSessionUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.User) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSessionUserDefault creates a GetSessionUserDefault with default headers values -func NewGetSessionUserDefault(code int) *GetSessionUserDefault { - return &GetSessionUserDefault{ - _statusCode: code, - } -} - -/* -GetSessionUserDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSessionUserDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get session user default response has a 2xx status code -func (o *GetSessionUserDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get session user default response has a 3xx status code -func (o *GetSessionUserDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get session user default response has a 4xx status code -func (o *GetSessionUserDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get session user default response has a 5xx status code -func (o *GetSessionUserDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get session user default response a status code equal to that given -func (o *GetSessionUserDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get session user default response -func (o *GetSessionUserDefault) Code() int { - return o._statusCode -} - -func (o *GetSessionUserDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser][%d] GetSessionUser default %s", o._statusCode, payload) -} - -func (o *GetSessionUserDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/sessionUser][%d] GetSessionUser default %s", o._statusCode, payload) -} - -func (o *GetSessionUserDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSessionUserDefault) 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/principals/get_user_api_key_by_id_parameters.go b/v1/client/principals/get_user_api_key_by_id_parameters.go deleted file mode 100644 index 99583960..00000000 --- a/v1/client/principals/get_user_api_key_by_id_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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" -) - -// NewGetUserAPIKeyByIDParams creates a new GetUserAPIKeyByIDParams 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 NewGetUserAPIKeyByIDParams() *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserAPIKeyByIDParamsWithTimeout creates a new GetUserAPIKeyByIDParams object -// with the ability to set a timeout on a request. -func NewGetUserAPIKeyByIDParamsWithTimeout(timeout time.Duration) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - timeout: timeout, - } -} - -// NewGetUserAPIKeyByIDParamsWithContext creates a new GetUserAPIKeyByIDParams object -// with the ability to set a context for a request. -func NewGetUserAPIKeyByIDParamsWithContext(ctx context.Context) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - Context: ctx, - } -} - -// NewGetUserAPIKeyByIDParamsWithHTTPClient creates a new GetUserAPIKeyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserAPIKeyByIDParamsWithHTTPClient(client *http.Client) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - HTTPClient: client, - } -} - -/* -GetUserAPIKeyByIDParams contains all the parameters to send to the API endpoint - - for the get user Api key by Id operation. - - Typically these are written to a http.Request. -*/ -type GetUserAPIKeyByIDParams struct { - - /* ID. - - Specifies the API key id. - */ - ID string - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user Api key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeyByIDParams) WithDefaults() *GetUserAPIKeyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user Api key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) WithTimeout(timeout time.Duration) *GetUserAPIKeyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) WithContext(ctx context.Context) *GetUserAPIKeyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) WithHTTPClient(client *http.Client) *GetUserAPIKeyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) WithID(id string) *GetUserAPIKeyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) SetID(id string) { - o.ID = id -} - -// WithSid adds the sid to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) WithSid(sid string) *GetUserAPIKeyByIDParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get user Api key by Id params -func (o *GetUserAPIKeyByIDParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserAPIKeyByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/principals/get_user_api_key_by_id_responses.go b/v1/client/principals/get_user_api_key_by_id_responses.go deleted file mode 100644 index d460b584..00000000 --- a/v1/client/principals/get_user_api_key_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetUserAPIKeyByIDReader is a Reader for the GetUserAPIKeyByID structure. -type GetUserAPIKeyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserAPIKeyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserAPIKeyByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserAPIKeyByIDDefault(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 - } -} - -// NewGetUserAPIKeyByIDOK creates a GetUserAPIKeyByIDOK with default headers values -func NewGetUserAPIKeyByIDOK() *GetUserAPIKeyByIDOK { - return &GetUserAPIKeyByIDOK{} -} - -/* -GetUserAPIKeyByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserAPIKeyByIDOK struct { - Payload *models.APIKey -} - -// IsSuccess returns true when this get user Api key by Id o k response has a 2xx status code -func (o *GetUserAPIKeyByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user Api key by Id o k response has a 3xx status code -func (o *GetUserAPIKeyByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user Api key by Id o k response has a 4xx status code -func (o *GetUserAPIKeyByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user Api key by Id o k response has a 5xx status code -func (o *GetUserAPIKeyByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user Api key by Id o k response a status code equal to that given -func (o *GetUserAPIKeyByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user Api key by Id o k response -func (o *GetUserAPIKeyByIDOK) Code() int { - return 200 -} - -func (o *GetUserAPIKeyByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys/{id}][%d] getUserApiKeyByIdOK %s", 200, payload) -} - -func (o *GetUserAPIKeyByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys/{id}][%d] getUserApiKeyByIdOK %s", 200, payload) -} - -func (o *GetUserAPIKeyByIDOK) GetPayload() *models.APIKey { - return o.Payload -} - -func (o *GetUserAPIKeyByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserAPIKeyByIDDefault creates a GetUserAPIKeyByIDDefault with default headers values -func NewGetUserAPIKeyByIDDefault(code int) *GetUserAPIKeyByIDDefault { - return &GetUserAPIKeyByIDDefault{ - _statusCode: code, - } -} - -/* -GetUserAPIKeyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserAPIKeyByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get user Api key by Id default response has a 2xx status code -func (o *GetUserAPIKeyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user Api key by Id default response has a 3xx status code -func (o *GetUserAPIKeyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user Api key by Id default response has a 4xx status code -func (o *GetUserAPIKeyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user Api key by Id default response has a 5xx status code -func (o *GetUserAPIKeyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user Api key by Id default response a status code equal to that given -func (o *GetUserAPIKeyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user Api key by Id default response -func (o *GetUserAPIKeyByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetUserAPIKeyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys/{id}][%d] GetUserApiKeyById default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys/{id}][%d] GetUserApiKeyById default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeyByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetUserAPIKeyByIDDefault) 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/principals/get_user_api_keys_parameters.go b/v1/client/principals/get_user_api_keys_parameters.go deleted file mode 100644 index c4c00b10..00000000 --- a/v1/client/principals/get_user_api_keys_parameters.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/go-openapi/swag" -) - -// NewGetUserAPIKeysParams creates a new GetUserAPIKeysParams 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 NewGetUserAPIKeysParams() *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserAPIKeysParamsWithTimeout creates a new GetUserAPIKeysParams object -// with the ability to set a timeout on a request. -func NewGetUserAPIKeysParamsWithTimeout(timeout time.Duration) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - timeout: timeout, - } -} - -// NewGetUserAPIKeysParamsWithContext creates a new GetUserAPIKeysParams object -// with the ability to set a context for a request. -func NewGetUserAPIKeysParamsWithContext(ctx context.Context) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - Context: ctx, - } -} - -// NewGetUserAPIKeysParamsWithHTTPClient creates a new GetUserAPIKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserAPIKeysParamsWithHTTPClient(client *http.Client) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - HTTPClient: client, - } -} - -/* -GetUserAPIKeysParams contains all the parameters to send to the API endpoint - - for the get user Api keys operation. - - Typically these are written to a http.Request. -*/ -type GetUserAPIKeysParams struct { - - /* Ids. - - Specifies a list of API key ids. - */ - Ids []string - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user Api keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeysParams) WithDefaults() *GetUserAPIKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user Api keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user Api keys params -func (o *GetUserAPIKeysParams) WithTimeout(timeout time.Duration) *GetUserAPIKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user Api keys params -func (o *GetUserAPIKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user Api keys params -func (o *GetUserAPIKeysParams) WithContext(ctx context.Context) *GetUserAPIKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user Api keys params -func (o *GetUserAPIKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user Api keys params -func (o *GetUserAPIKeysParams) WithHTTPClient(client *http.Client) *GetUserAPIKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user Api keys params -func (o *GetUserAPIKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get user Api keys params -func (o *GetUserAPIKeysParams) WithIds(ids []string) *GetUserAPIKeysParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get user Api keys params -func (o *GetUserAPIKeysParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithSid adds the sid to the get user Api keys params -func (o *GetUserAPIKeysParams) WithSid(sid string) *GetUserAPIKeysParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get user Api keys params -func (o *GetUserAPIKeysParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserAPIKeysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetUserAPIKeys binds the parameter ids -func (o *GetUserAPIKeysParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v1/client/principals/get_user_api_keys_responses.go b/v1/client/principals/get_user_api_keys_responses.go deleted file mode 100644 index efbe1caf..00000000 --- a/v1/client/principals/get_user_api_keys_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetUserAPIKeysReader is a Reader for the GetUserAPIKeys structure. -type GetUserAPIKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserAPIKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserAPIKeysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserAPIKeysDefault(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 - } -} - -// NewGetUserAPIKeysOK creates a GetUserAPIKeysOK with default headers values -func NewGetUserAPIKeysOK() *GetUserAPIKeysOK { - return &GetUserAPIKeysOK{} -} - -/* -GetUserAPIKeysOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserAPIKeysOK struct { - Payload []*models.APIKey -} - -// IsSuccess returns true when this get user Api keys o k response has a 2xx status code -func (o *GetUserAPIKeysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user Api keys o k response has a 3xx status code -func (o *GetUserAPIKeysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user Api keys o k response has a 4xx status code -func (o *GetUserAPIKeysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user Api keys o k response has a 5xx status code -func (o *GetUserAPIKeysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user Api keys o k response a status code equal to that given -func (o *GetUserAPIKeysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user Api keys o k response -func (o *GetUserAPIKeysOK) Code() int { - return 200 -} - -func (o *GetUserAPIKeysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys][%d] getUserApiKeysOK %s", 200, payload) -} - -func (o *GetUserAPIKeysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys][%d] getUserApiKeysOK %s", 200, payload) -} - -func (o *GetUserAPIKeysOK) GetPayload() []*models.APIKey { - return o.Payload -} - -func (o *GetUserAPIKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserAPIKeysDefault creates a GetUserAPIKeysDefault with default headers values -func NewGetUserAPIKeysDefault(code int) *GetUserAPIKeysDefault { - return &GetUserAPIKeysDefault{ - _statusCode: code, - } -} - -/* -GetUserAPIKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserAPIKeysDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get user Api keys default response has a 2xx status code -func (o *GetUserAPIKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user Api keys default response has a 3xx status code -func (o *GetUserAPIKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user Api keys default response has a 4xx status code -func (o *GetUserAPIKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user Api keys default response has a 5xx status code -func (o *GetUserAPIKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user Api keys default response a status code equal to that given -func (o *GetUserAPIKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user Api keys default response -func (o *GetUserAPIKeysDefault) Code() int { - return o._statusCode -} - -func (o *GetUserAPIKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys][%d] GetUserApiKeys default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/{sid}/apiKeys][%d] GetUserApiKeys default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeysDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetUserAPIKeysDefault) 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/principals/get_user_privileges_parameters.go b/v1/client/principals/get_user_privileges_parameters.go deleted file mode 100644 index 5f27b101..00000000 --- a/v1/client/principals/get_user_privileges_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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" -) - -// NewGetUserPrivilegesParams creates a new GetUserPrivilegesParams 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 NewGetUserPrivilegesParams() *GetUserPrivilegesParams { - return &GetUserPrivilegesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserPrivilegesParamsWithTimeout creates a new GetUserPrivilegesParams object -// with the ability to set a timeout on a request. -func NewGetUserPrivilegesParamsWithTimeout(timeout time.Duration) *GetUserPrivilegesParams { - return &GetUserPrivilegesParams{ - timeout: timeout, - } -} - -// NewGetUserPrivilegesParamsWithContext creates a new GetUserPrivilegesParams object -// with the ability to set a context for a request. -func NewGetUserPrivilegesParamsWithContext(ctx context.Context) *GetUserPrivilegesParams { - return &GetUserPrivilegesParams{ - Context: ctx, - } -} - -// NewGetUserPrivilegesParamsWithHTTPClient creates a new GetUserPrivilegesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserPrivilegesParamsWithHTTPClient(client *http.Client) *GetUserPrivilegesParams { - return &GetUserPrivilegesParams{ - HTTPClient: client, - } -} - -/* -GetUserPrivilegesParams contains all the parameters to send to the API endpoint - - for the get user privileges operation. - - Typically these are written to a http.Request. -*/ -type GetUserPrivilegesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserPrivilegesParams) WithDefaults() *GetUserPrivilegesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserPrivilegesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user privileges params -func (o *GetUserPrivilegesParams) WithTimeout(timeout time.Duration) *GetUserPrivilegesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user privileges params -func (o *GetUserPrivilegesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user privileges params -func (o *GetUserPrivilegesParams) WithContext(ctx context.Context) *GetUserPrivilegesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user privileges params -func (o *GetUserPrivilegesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user privileges params -func (o *GetUserPrivilegesParams) WithHTTPClient(client *http.Client) *GetUserPrivilegesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user privileges params -func (o *GetUserPrivilegesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserPrivilegesParams) 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/principals/get_user_privileges_responses.go b/v1/client/principals/get_user_privileges_responses.go deleted file mode 100644 index f23d0b23..00000000 --- a/v1/client/principals/get_user_privileges_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetUserPrivilegesReader is a Reader for the GetUserPrivileges structure. -type GetUserPrivilegesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserPrivilegesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserPrivilegesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserPrivilegesDefault(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 - } -} - -// NewGetUserPrivilegesOK creates a GetUserPrivilegesOK with default headers values -func NewGetUserPrivilegesOK() *GetUserPrivilegesOK { - return &GetUserPrivilegesOK{} -} - -/* -GetUserPrivilegesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserPrivilegesOK struct { - Payload []string -} - -// IsSuccess returns true when this get user privileges o k response has a 2xx status code -func (o *GetUserPrivilegesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user privileges o k response has a 3xx status code -func (o *GetUserPrivilegesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user privileges o k response has a 4xx status code -func (o *GetUserPrivilegesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user privileges o k response has a 5xx status code -func (o *GetUserPrivilegesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user privileges o k response a status code equal to that given -func (o *GetUserPrivilegesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user privileges o k response -func (o *GetUserPrivilegesOK) Code() int { - return 200 -} - -func (o *GetUserPrivilegesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/privileges][%d] getUserPrivilegesOK %s", 200, payload) -} - -func (o *GetUserPrivilegesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/privileges][%d] getUserPrivilegesOK %s", 200, payload) -} - -func (o *GetUserPrivilegesOK) GetPayload() []string { - return o.Payload -} - -func (o *GetUserPrivilegesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserPrivilegesDefault creates a GetUserPrivilegesDefault with default headers values -func NewGetUserPrivilegesDefault(code int) *GetUserPrivilegesDefault { - return &GetUserPrivilegesDefault{ - _statusCode: code, - } -} - -/* -GetUserPrivilegesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserPrivilegesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get user privileges default response has a 2xx status code -func (o *GetUserPrivilegesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user privileges default response has a 3xx status code -func (o *GetUserPrivilegesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user privileges default response has a 4xx status code -func (o *GetUserPrivilegesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user privileges default response has a 5xx status code -func (o *GetUserPrivilegesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user privileges default response a status code equal to that given -func (o *GetUserPrivilegesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user privileges default response -func (o *GetUserPrivilegesDefault) Code() int { - return o._statusCode -} - -func (o *GetUserPrivilegesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/privileges][%d] GetUserPrivileges default %s", o._statusCode, payload) -} - -func (o *GetUserPrivilegesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users/privileges][%d] GetUserPrivileges default %s", o._statusCode, payload) -} - -func (o *GetUserPrivilegesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetUserPrivilegesDefault) 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/principals/get_users_parameters.go b/v1/client/principals/get_users_parameters.go deleted file mode 100644 index b8fdb818..00000000 --- a/v1/client/principals/get_users_parameters.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/go-openapi/swag" -) - -// NewGetUsersParams creates a new GetUsersParams 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 NewGetUsersParams() *GetUsersParams { - return &GetUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUsersParamsWithTimeout creates a new GetUsersParams object -// with the ability to set a timeout on a request. -func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams { - return &GetUsersParams{ - timeout: timeout, - } -} - -// NewGetUsersParamsWithContext creates a new GetUsersParams object -// with the ability to set a context for a request. -func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams { - return &GetUsersParams{ - Context: ctx, - } -} - -// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams { - return &GetUsersParams{ - HTTPClient: client, - } -} - -/* -GetUsersParams contains all the parameters to send to the API endpoint - - for the get users operation. - - Typically these are written to a http.Request. -*/ -type GetUsersParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Domain. - - Optionally specify a domain to filter by. - If no domain is specified, all users on the Cohesity Cluster are searched. - If a domain is specified, only users on the Cohesity Cluster - associated with that domain are searched. - */ - Domain *string - - /* EmailAddresses. - - Optionally specify a list of email addresses to filter by. - */ - EmailAddresses []string - - /* PartialMatch. - - Optionally specify whether to enable partial match. If set, all users - with name containing Usernames will be returned. If set to false, only - users with exact the same name as Usernames will be returned. By default - this parameter is set to true. - */ - PartialMatch *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* Usernames. - - Optionally specify a list of usernames to filter by. All users containing - username will be returned. - */ - Usernames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUsersParams) WithDefaults() *GetUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get users params -func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get users params -func (o *GetUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get users params -func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get users params -func (o *GetUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get users params -func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get users params -func (o *GetUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get users params -func (o *GetUsersParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetUsersParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get users params -func (o *GetUsersParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomain adds the domain to the get users params -func (o *GetUsersParams) WithDomain(domain *string) *GetUsersParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the get users params -func (o *GetUsersParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithEmailAddresses adds the emailAddresses to the get users params -func (o *GetUsersParams) WithEmailAddresses(emailAddresses []string) *GetUsersParams { - o.SetEmailAddresses(emailAddresses) - return o -} - -// SetEmailAddresses adds the emailAddresses to the get users params -func (o *GetUsersParams) SetEmailAddresses(emailAddresses []string) { - o.EmailAddresses = emailAddresses -} - -// WithPartialMatch adds the partialMatch to the get users params -func (o *GetUsersParams) WithPartialMatch(partialMatch *bool) *GetUsersParams { - o.SetPartialMatch(partialMatch) - return o -} - -// SetPartialMatch adds the partialMatch to the get users params -func (o *GetUsersParams) SetPartialMatch(partialMatch *bool) { - o.PartialMatch = partialMatch -} - -// WithTenantIds adds the tenantIds to the get users params -func (o *GetUsersParams) WithTenantIds(tenantIds []string) *GetUsersParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get users params -func (o *GetUsersParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUsernames adds the usernames to the get users params -func (o *GetUsersParams) WithUsernames(usernames []string) *GetUsersParams { - o.SetUsernames(usernames) - return o -} - -// SetUsernames adds the usernames to the get users params -func (o *GetUsersParams) SetUsernames(usernames []string) { - o.Usernames = usernames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.EmailAddresses != nil { - - // binding items for emailAddresses - joinedEmailAddresses := o.bindParamEmailAddresses(reg) - - // query array param emailAddresses - if err := r.SetQueryParam("emailAddresses", joinedEmailAddresses...); err != nil { - return err - } - } - - if o.PartialMatch != nil { - - // query param partialMatch - var qrPartialMatch bool - - if o.PartialMatch != nil { - qrPartialMatch = *o.PartialMatch - } - qPartialMatch := swag.FormatBool(qrPartialMatch) - if qPartialMatch != "" { - - if err := r.SetQueryParam("partialMatch", qPartialMatch); err != nil { - return err - } - } - } - - 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.Usernames != nil { - - // binding items for usernames - joinedUsernames := o.bindParamUsernames(reg) - - // query array param usernames - if err := r.SetQueryParam("usernames", joinedUsernames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetUsers binds the parameter emailAddresses -func (o *GetUsersParams) bindParamEmailAddresses(formats strfmt.Registry) []string { - emailAddressesIR := o.EmailAddresses - - var emailAddressesIC []string - for _, emailAddressesIIR := range emailAddressesIR { // explode []string - - emailAddressesIIV := emailAddressesIIR // string as string - emailAddressesIC = append(emailAddressesIC, emailAddressesIIV) - } - - // items.CollectionFormat: "" - emailAddressesIS := swag.JoinByFormat(emailAddressesIC, "") - - return emailAddressesIS -} - -// bindParamGetUsers binds the parameter tenantIds -func (o *GetUsersParams) 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 -} - -// bindParamGetUsers binds the parameter usernames -func (o *GetUsersParams) bindParamUsernames(formats strfmt.Registry) []string { - usernamesIR := o.Usernames - - var usernamesIC []string - for _, usernamesIIR := range usernamesIR { // explode []string - - usernamesIIV := usernamesIIR // string as string - usernamesIC = append(usernamesIC, usernamesIIV) - } - - // items.CollectionFormat: "" - usernamesIS := swag.JoinByFormat(usernamesIC, "") - - return usernamesIS -} diff --git a/v1/client/principals/get_users_responses.go b/v1/client/principals/get_users_responses.go deleted file mode 100644 index 9f61ae92..00000000 --- a/v1/client/principals/get_users_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetUsersReader is a Reader for the GetUsers structure. -type GetUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUsersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUsersDefault(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 - } -} - -// NewGetUsersOK creates a GetUsersOK with default headers values -func NewGetUsersOK() *GetUsersOK { - return &GetUsersOK{} -} - -/* -GetUsersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUsersOK struct { - Payload []*models.User -} - -// IsSuccess returns true when this get users o k response has a 2xx status code -func (o *GetUsersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get users o k response has a 3xx status code -func (o *GetUsersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get users o k response has a 4xx status code -func (o *GetUsersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get users o k response has a 5xx status code -func (o *GetUsersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get users o k response a status code equal to that given -func (o *GetUsersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get users o k response -func (o *GetUsersOK) Code() int { - return 200 -} - -func (o *GetUsersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users][%d] getUsersOK %s", 200, payload) -} - -func (o *GetUsersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users][%d] getUsersOK %s", 200, payload) -} - -func (o *GetUsersOK) GetPayload() []*models.User { - return o.Payload -} - -func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUsersDefault creates a GetUsersDefault with default headers values -func NewGetUsersDefault(code int) *GetUsersDefault { - return &GetUsersDefault{ - _statusCode: code, - } -} - -/* -GetUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUsersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get users default response has a 2xx status code -func (o *GetUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get users default response has a 3xx status code -func (o *GetUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get users default response has a 4xx status code -func (o *GetUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get users default response has a 5xx status code -func (o *GetUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get users default response a status code equal to that given -func (o *GetUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get users default response -func (o *GetUsersDefault) Code() int { - return o._statusCode -} - -func (o *GetUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users][%d] GetUsers default %s", o._statusCode, payload) -} - -func (o *GetUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/users][%d] GetUsers default %s", o._statusCode, payload) -} - -func (o *GetUsersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetUsersDefault) 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/principals/linux_support_user_bash_shell_access_parameters.go b/v1/client/principals/linux_support_user_bash_shell_access_parameters.go deleted file mode 100644 index d7889beb..00000000 --- a/v1/client/principals/linux_support_user_bash_shell_access_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewLinuxSupportUserBashShellAccessParams creates a new LinuxSupportUserBashShellAccessParams 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 NewLinuxSupportUserBashShellAccessParams() *LinuxSupportUserBashShellAccessParams { - return &LinuxSupportUserBashShellAccessParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLinuxSupportUserBashShellAccessParamsWithTimeout creates a new LinuxSupportUserBashShellAccessParams object -// with the ability to set a timeout on a request. -func NewLinuxSupportUserBashShellAccessParamsWithTimeout(timeout time.Duration) *LinuxSupportUserBashShellAccessParams { - return &LinuxSupportUserBashShellAccessParams{ - timeout: timeout, - } -} - -// NewLinuxSupportUserBashShellAccessParamsWithContext creates a new LinuxSupportUserBashShellAccessParams object -// with the ability to set a context for a request. -func NewLinuxSupportUserBashShellAccessParamsWithContext(ctx context.Context) *LinuxSupportUserBashShellAccessParams { - return &LinuxSupportUserBashShellAccessParams{ - Context: ctx, - } -} - -// NewLinuxSupportUserBashShellAccessParamsWithHTTPClient creates a new LinuxSupportUserBashShellAccessParams object -// with the ability to set a custom HTTPClient for a request. -func NewLinuxSupportUserBashShellAccessParamsWithHTTPClient(client *http.Client) *LinuxSupportUserBashShellAccessParams { - return &LinuxSupportUserBashShellAccessParams{ - HTTPClient: client, - } -} - -/* -LinuxSupportUserBashShellAccessParams contains all the parameters to send to the API endpoint - - for the linux support user bash shell access operation. - - Typically these are written to a http.Request. -*/ -type LinuxSupportUserBashShellAccessParams struct { - - // Body. - Body *models.LinuxSupportUserBashShellAccessReqParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the linux support user bash shell access params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxSupportUserBashShellAccessParams) WithDefaults() *LinuxSupportUserBashShellAccessParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the linux support user bash shell access params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxSupportUserBashShellAccessParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) WithTimeout(timeout time.Duration) *LinuxSupportUserBashShellAccessParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) WithContext(ctx context.Context) *LinuxSupportUserBashShellAccessParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) WithHTTPClient(client *http.Client) *LinuxSupportUserBashShellAccessParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) WithBody(body *models.LinuxSupportUserBashShellAccessReqParams) *LinuxSupportUserBashShellAccessParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the linux support user bash shell access params -func (o *LinuxSupportUserBashShellAccessParams) SetBody(body *models.LinuxSupportUserBashShellAccessReqParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *LinuxSupportUserBashShellAccessParams) 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/principals/linux_support_user_bash_shell_access_responses.go b/v1/client/principals/linux_support_user_bash_shell_access_responses.go deleted file mode 100644 index d69df36b..00000000 --- a/v1/client/principals/linux_support_user_bash_shell_access_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LinuxSupportUserBashShellAccessReader is a Reader for the LinuxSupportUserBashShellAccess structure. -type LinuxSupportUserBashShellAccessReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LinuxSupportUserBashShellAccessReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewLinuxSupportUserBashShellAccessAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLinuxSupportUserBashShellAccessDefault(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 - } -} - -// NewLinuxSupportUserBashShellAccessAccepted creates a LinuxSupportUserBashShellAccessAccepted with default headers values -func NewLinuxSupportUserBashShellAccessAccepted() *LinuxSupportUserBashShellAccessAccepted { - return &LinuxSupportUserBashShellAccessAccepted{} -} - -/* -LinuxSupportUserBashShellAccessAccepted describes a response with status code 202, with default header values. - -Success -*/ -type LinuxSupportUserBashShellAccessAccepted struct { - Payload *models.LinuxSupportUserBashShellAccessResult -} - -// IsSuccess returns true when this linux support user bash shell access accepted response has a 2xx status code -func (o *LinuxSupportUserBashShellAccessAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this linux support user bash shell access accepted response has a 3xx status code -func (o *LinuxSupportUserBashShellAccessAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this linux support user bash shell access accepted response has a 4xx status code -func (o *LinuxSupportUserBashShellAccessAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this linux support user bash shell access accepted response has a 5xx status code -func (o *LinuxSupportUserBashShellAccessAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this linux support user bash shell access accepted response a status code equal to that given -func (o *LinuxSupportUserBashShellAccessAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the linux support user bash shell access accepted response -func (o *LinuxSupportUserBashShellAccessAccepted) Code() int { - return 202 -} - -func (o *LinuxSupportUserBashShellAccessAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserBashShellAccess][%d] linuxSupportUserBashShellAccessAccepted %s", 202, payload) -} - -func (o *LinuxSupportUserBashShellAccessAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserBashShellAccess][%d] linuxSupportUserBashShellAccessAccepted %s", 202, payload) -} - -func (o *LinuxSupportUserBashShellAccessAccepted) GetPayload() *models.LinuxSupportUserBashShellAccessResult { - return o.Payload -} - -func (o *LinuxSupportUserBashShellAccessAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LinuxSupportUserBashShellAccessResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLinuxSupportUserBashShellAccessDefault creates a LinuxSupportUserBashShellAccessDefault with default headers values -func NewLinuxSupportUserBashShellAccessDefault(code int) *LinuxSupportUserBashShellAccessDefault { - return &LinuxSupportUserBashShellAccessDefault{ - _statusCode: code, - } -} - -/* -LinuxSupportUserBashShellAccessDefault describes a response with status code -1, with default header values. - -Error -*/ -type LinuxSupportUserBashShellAccessDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this linux support user bash shell access default response has a 2xx status code -func (o *LinuxSupportUserBashShellAccessDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this linux support user bash shell access default response has a 3xx status code -func (o *LinuxSupportUserBashShellAccessDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this linux support user bash shell access default response has a 4xx status code -func (o *LinuxSupportUserBashShellAccessDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this linux support user bash shell access default response has a 5xx status code -func (o *LinuxSupportUserBashShellAccessDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this linux support user bash shell access default response a status code equal to that given -func (o *LinuxSupportUserBashShellAccessDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the linux support user bash shell access default response -func (o *LinuxSupportUserBashShellAccessDefault) Code() int { - return o._statusCode -} - -func (o *LinuxSupportUserBashShellAccessDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserBashShellAccess][%d] LinuxSupportUserBashShellAccess default %s", o._statusCode, payload) -} - -func (o *LinuxSupportUserBashShellAccessDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserBashShellAccess][%d] LinuxSupportUserBashShellAccess default %s", o._statusCode, payload) -} - -func (o *LinuxSupportUserBashShellAccessDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *LinuxSupportUserBashShellAccessDefault) 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/principals/linux_support_user_sudo_access_parameters.go b/v1/client/principals/linux_support_user_sudo_access_parameters.go deleted file mode 100644 index 5f1329f3..00000000 --- a/v1/client/principals/linux_support_user_sudo_access_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewLinuxSupportUserSudoAccessParams creates a new LinuxSupportUserSudoAccessParams 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 NewLinuxSupportUserSudoAccessParams() *LinuxSupportUserSudoAccessParams { - return &LinuxSupportUserSudoAccessParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLinuxSupportUserSudoAccessParamsWithTimeout creates a new LinuxSupportUserSudoAccessParams object -// with the ability to set a timeout on a request. -func NewLinuxSupportUserSudoAccessParamsWithTimeout(timeout time.Duration) *LinuxSupportUserSudoAccessParams { - return &LinuxSupportUserSudoAccessParams{ - timeout: timeout, - } -} - -// NewLinuxSupportUserSudoAccessParamsWithContext creates a new LinuxSupportUserSudoAccessParams object -// with the ability to set a context for a request. -func NewLinuxSupportUserSudoAccessParamsWithContext(ctx context.Context) *LinuxSupportUserSudoAccessParams { - return &LinuxSupportUserSudoAccessParams{ - Context: ctx, - } -} - -// NewLinuxSupportUserSudoAccessParamsWithHTTPClient creates a new LinuxSupportUserSudoAccessParams object -// with the ability to set a custom HTTPClient for a request. -func NewLinuxSupportUserSudoAccessParamsWithHTTPClient(client *http.Client) *LinuxSupportUserSudoAccessParams { - return &LinuxSupportUserSudoAccessParams{ - HTTPClient: client, - } -} - -/* -LinuxSupportUserSudoAccessParams contains all the parameters to send to the API endpoint - - for the linux support user sudo access operation. - - Typically these are written to a http.Request. -*/ -type LinuxSupportUserSudoAccessParams struct { - - // Body. - Body *models.LinuxSupportUserSudoAccessReqParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the linux support user sudo access params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxSupportUserSudoAccessParams) WithDefaults() *LinuxSupportUserSudoAccessParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the linux support user sudo access params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LinuxSupportUserSudoAccessParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) WithTimeout(timeout time.Duration) *LinuxSupportUserSudoAccessParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) WithContext(ctx context.Context) *LinuxSupportUserSudoAccessParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) WithHTTPClient(client *http.Client) *LinuxSupportUserSudoAccessParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) WithBody(body *models.LinuxSupportUserSudoAccessReqParams) *LinuxSupportUserSudoAccessParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the linux support user sudo access params -func (o *LinuxSupportUserSudoAccessParams) SetBody(body *models.LinuxSupportUserSudoAccessReqParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *LinuxSupportUserSudoAccessParams) 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/principals/linux_support_user_sudo_access_responses.go b/v1/client/principals/linux_support_user_sudo_access_responses.go deleted file mode 100644 index 9d0c170d..00000000 --- a/v1/client/principals/linux_support_user_sudo_access_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LinuxSupportUserSudoAccessReader is a Reader for the LinuxSupportUserSudoAccess structure. -type LinuxSupportUserSudoAccessReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LinuxSupportUserSudoAccessReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewLinuxSupportUserSudoAccessAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLinuxSupportUserSudoAccessDefault(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 - } -} - -// NewLinuxSupportUserSudoAccessAccepted creates a LinuxSupportUserSudoAccessAccepted with default headers values -func NewLinuxSupportUserSudoAccessAccepted() *LinuxSupportUserSudoAccessAccepted { - return &LinuxSupportUserSudoAccessAccepted{} -} - -/* -LinuxSupportUserSudoAccessAccepted describes a response with status code 202, with default header values. - -Success -*/ -type LinuxSupportUserSudoAccessAccepted struct { - Payload *models.LinuxSupportUserSudoAccessResult -} - -// IsSuccess returns true when this linux support user sudo access accepted response has a 2xx status code -func (o *LinuxSupportUserSudoAccessAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this linux support user sudo access accepted response has a 3xx status code -func (o *LinuxSupportUserSudoAccessAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this linux support user sudo access accepted response has a 4xx status code -func (o *LinuxSupportUserSudoAccessAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this linux support user sudo access accepted response has a 5xx status code -func (o *LinuxSupportUserSudoAccessAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this linux support user sudo access accepted response a status code equal to that given -func (o *LinuxSupportUserSudoAccessAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the linux support user sudo access accepted response -func (o *LinuxSupportUserSudoAccessAccepted) Code() int { - return 202 -} - -func (o *LinuxSupportUserSudoAccessAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserSudoAccess][%d] linuxSupportUserSudoAccessAccepted %s", 202, payload) -} - -func (o *LinuxSupportUserSudoAccessAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserSudoAccess][%d] linuxSupportUserSudoAccessAccepted %s", 202, payload) -} - -func (o *LinuxSupportUserSudoAccessAccepted) GetPayload() *models.LinuxSupportUserSudoAccessResult { - return o.Payload -} - -func (o *LinuxSupportUserSudoAccessAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LinuxSupportUserSudoAccessResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLinuxSupportUserSudoAccessDefault creates a LinuxSupportUserSudoAccessDefault with default headers values -func NewLinuxSupportUserSudoAccessDefault(code int) *LinuxSupportUserSudoAccessDefault { - return &LinuxSupportUserSudoAccessDefault{ - _statusCode: code, - } -} - -/* -LinuxSupportUserSudoAccessDefault describes a response with status code -1, with default header values. - -Error -*/ -type LinuxSupportUserSudoAccessDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this linux support user sudo access default response has a 2xx status code -func (o *LinuxSupportUserSudoAccessDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this linux support user sudo access default response has a 3xx status code -func (o *LinuxSupportUserSudoAccessDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this linux support user sudo access default response has a 4xx status code -func (o *LinuxSupportUserSudoAccessDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this linux support user sudo access default response has a 5xx status code -func (o *LinuxSupportUserSudoAccessDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this linux support user sudo access default response a status code equal to that given -func (o *LinuxSupportUserSudoAccessDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the linux support user sudo access default response -func (o *LinuxSupportUserSudoAccessDefault) Code() int { - return o._statusCode -} - -func (o *LinuxSupportUserSudoAccessDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserSudoAccess][%d] LinuxSupportUserSudoAccess default %s", o._statusCode, payload) -} - -func (o *LinuxSupportUserSudoAccessDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxSupportUserSudoAccess][%d] LinuxSupportUserSudoAccess default %s", o._statusCode, payload) -} - -func (o *LinuxSupportUserSudoAccessDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *LinuxSupportUserSudoAccessDefault) 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/principals/list_sources_for_principals_parameters.go b/v1/client/principals/list_sources_for_principals_parameters.go deleted file mode 100644 index 18e7864d..00000000 --- a/v1/client/principals/list_sources_for_principals_parameters.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/go-openapi/swag" -) - -// NewListSourcesForPrincipalsParams creates a new ListSourcesForPrincipalsParams 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 NewListSourcesForPrincipalsParams() *ListSourcesForPrincipalsParams { - return &ListSourcesForPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListSourcesForPrincipalsParamsWithTimeout creates a new ListSourcesForPrincipalsParams object -// with the ability to set a timeout on a request. -func NewListSourcesForPrincipalsParamsWithTimeout(timeout time.Duration) *ListSourcesForPrincipalsParams { - return &ListSourcesForPrincipalsParams{ - timeout: timeout, - } -} - -// NewListSourcesForPrincipalsParamsWithContext creates a new ListSourcesForPrincipalsParams object -// with the ability to set a context for a request. -func NewListSourcesForPrincipalsParamsWithContext(ctx context.Context) *ListSourcesForPrincipalsParams { - return &ListSourcesForPrincipalsParams{ - Context: ctx, - } -} - -// NewListSourcesForPrincipalsParamsWithHTTPClient creates a new ListSourcesForPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListSourcesForPrincipalsParamsWithHTTPClient(client *http.Client) *ListSourcesForPrincipalsParams { - return &ListSourcesForPrincipalsParams{ - HTTPClient: client, - } -} - -/* -ListSourcesForPrincipalsParams contains all the parameters to send to the API endpoint - - for the list sources for principals operation. - - Typically these are written to a http.Request. -*/ -type ListSourcesForPrincipalsParams struct { - - /* Sids. - - Specifies a list of security identifiers (SIDs) that specify user or - group principals. - */ - Sids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list sources for principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSourcesForPrincipalsParams) WithDefaults() *ListSourcesForPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list sources for principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSourcesForPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) WithTimeout(timeout time.Duration) *ListSourcesForPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) WithContext(ctx context.Context) *ListSourcesForPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) WithHTTPClient(client *http.Client) *ListSourcesForPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSids adds the sids to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) WithSids(sids []string) *ListSourcesForPrincipalsParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the list sources for principals params -func (o *ListSourcesForPrincipalsParams) SetSids(sids []string) { - o.Sids = sids -} - -// WriteToRequest writes these params to a swagger request -func (o *ListSourcesForPrincipalsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListSourcesForPrincipals binds the parameter sids -func (o *ListSourcesForPrincipalsParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} diff --git a/v1/client/principals/list_sources_for_principals_responses.go b/v1/client/principals/list_sources_for_principals_responses.go deleted file mode 100644 index 6d015bf0..00000000 --- a/v1/client/principals/list_sources_for_principals_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListSourcesForPrincipalsReader is a Reader for the ListSourcesForPrincipals structure. -type ListSourcesForPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListSourcesForPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListSourcesForPrincipalsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListSourcesForPrincipalsDefault(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 - } -} - -// NewListSourcesForPrincipalsOK creates a ListSourcesForPrincipalsOK with default headers values -func NewListSourcesForPrincipalsOK() *ListSourcesForPrincipalsOK { - return &ListSourcesForPrincipalsOK{} -} - -/* -ListSourcesForPrincipalsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListSourcesForPrincipalsOK struct { - Payload []*models.SourcesForSid -} - -// IsSuccess returns true when this list sources for principals o k response has a 2xx status code -func (o *ListSourcesForPrincipalsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list sources for principals o k response has a 3xx status code -func (o *ListSourcesForPrincipalsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list sources for principals o k response has a 4xx status code -func (o *ListSourcesForPrincipalsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list sources for principals o k response has a 5xx status code -func (o *ListSourcesForPrincipalsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list sources for principals o k response a status code equal to that given -func (o *ListSourcesForPrincipalsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list sources for principals o k response -func (o *ListSourcesForPrincipalsOK) Code() int { - return 200 -} - -func (o *ListSourcesForPrincipalsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/protectionSources][%d] listSourcesForPrincipalsOK %s", 200, payload) -} - -func (o *ListSourcesForPrincipalsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/protectionSources][%d] listSourcesForPrincipalsOK %s", 200, payload) -} - -func (o *ListSourcesForPrincipalsOK) GetPayload() []*models.SourcesForSid { - return o.Payload -} - -func (o *ListSourcesForPrincipalsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListSourcesForPrincipalsDefault creates a ListSourcesForPrincipalsDefault with default headers values -func NewListSourcesForPrincipalsDefault(code int) *ListSourcesForPrincipalsDefault { - return &ListSourcesForPrincipalsDefault{ - _statusCode: code, - } -} - -/* -ListSourcesForPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListSourcesForPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list sources for principals default response has a 2xx status code -func (o *ListSourcesForPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list sources for principals default response has a 3xx status code -func (o *ListSourcesForPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list sources for principals default response has a 4xx status code -func (o *ListSourcesForPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list sources for principals default response has a 5xx status code -func (o *ListSourcesForPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list sources for principals default response a status code equal to that given -func (o *ListSourcesForPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list sources for principals default response -func (o *ListSourcesForPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *ListSourcesForPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/protectionSources][%d] ListSourcesForPrincipals default %s", o._statusCode, payload) -} - -func (o *ListSourcesForPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/protectionSources][%d] ListSourcesForPrincipals default %s", o._statusCode, payload) -} - -func (o *ListSourcesForPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListSourcesForPrincipalsDefault) 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/principals/principals_client.go b/v1/client/principals/principals_client.go deleted file mode 100644 index 9b85d405..00000000 --- a/v1/client/principals/principals_client.go +++ /dev/null @@ -1,942 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new principals API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new principals API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new principals API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for principals API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateUser(params *CreateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserCreated, error) - - CreateUserAPIKey(params *CreateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserAPIKeyCreated, error) - - DeleteUserAPIKey(params *DeleteUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserAPIKeyNoContent, error) - - DeleteUsers(params *DeleteUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUsersNoContent, error) - - GetAllUserAPIKeys(params *GetAllUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllUserAPIKeysOK, error) - - GetSessionUser(params *GetSessionUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSessionUserOK, error) - - GetUserAPIKeyByID(params *GetUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeyByIDOK, error) - - GetUserAPIKeys(params *GetUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeysOK, error) - - GetUserPrivileges(params *GetUserPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserPrivilegesOK, error) - - GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error) - - LinuxSupportUserBashShellAccess(params *LinuxSupportUserBashShellAccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxSupportUserBashShellAccessAccepted, error) - - LinuxSupportUserSudoAccess(params *LinuxSupportUserSudoAccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxSupportUserSudoAccessAccepted, error) - - ListSourcesForPrincipals(params *ListSourcesForPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSourcesForPrincipalsOK, error) - - ResetS3SecretKey(params *ResetS3SecretKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ResetS3SecretKeyOK, error) - - RotateUserAPIKey(params *RotateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RotateUserAPIKeyOK, error) - - SearchPrincipals(params *SearchPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchPrincipalsOK, error) - - UpdateLinuxCredentials(params *UpdateLinuxCredentialsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLinuxCredentialsAccepted, error) - - UpdateSourcesForPrincipals(params *UpdateSourcesForPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSourcesForPrincipalsNoContent, error) - - UpdateUser(params *UpdateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserOK, error) - - UpdateUserAPIKey(params *UpdateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserAPIKeyOK, error) - - VerifyOtpCode(params *VerifyOtpCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VerifyOtpCodeOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateUser creates or add a new user to the cohesity cluster - - If an Active Directory domain is specified, a new user is added to the - -Cohesity Cluster for the specified Active Directory user principal. -If the LOCAL domain is specified, a new user is created directly in -the default LOCAL domain on the Cohesity Cluster. - -Returns the created or added user. -*/ -func (a *Client) CreateUser(params *CreateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateUserParams() - } - op := &runtime.ClientOperation{ - ID: "CreateUser", - Method: "POST", - PathPattern: "/public/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateUserReader{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.(*CreateUserCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateUserDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateUserAPIKey creates an API key for user -*/ -func (a *Client) CreateUserAPIKey(params *CreateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserAPIKeyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "CreateUserApiKey", - Method: "POST", - PathPattern: "/public/users/{sid}/apiKeys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateUserAPIKeyReader{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.(*CreateUserAPIKeyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteUserAPIKey deletes an API key for user -*/ -func (a *Client) DeleteUserAPIKey(params *DeleteUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserAPIKeyNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUserApiKey", - Method: "DELETE", - PathPattern: "/public/users/{sid}/apiKeys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUserAPIKeyReader{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.(*DeleteUserAPIKeyNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteUsers deletes one or more users on the cohesity cluster - - Only users from the same domain can be deleted by a single request. - -If the Cohesity user was created for an Active Directory user, the referenced -principal user on the Active Directory domain is NOT deleted. -Only the user on the Cohesity Cluster is deleted. -Returns Success if the specified users are deleted. -*/ -func (a *Client) DeleteUsers(params *DeleteUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUsersNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUsersParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUsers", - Method: "DELETE", - PathPattern: "/public/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUsersReader{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.(*DeleteUsersNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAllUserAPIKeys fetches API keys across all users -*/ -func (a *Client) GetAllUserAPIKeys(params *GetAllUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllUserAPIKeysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAllUserAPIKeysParams() - } - op := &runtime.ClientOperation{ - ID: "GetAllUserApiKeys", - Method: "GET", - PathPattern: "/public/usersApiKeys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAllUserAPIKeysReader{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.(*GetAllUserAPIKeysOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAllUserAPIKeysDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSessionUser gets the information of the logged in user -*/ -func (a *Client) GetSessionUser(params *GetSessionUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSessionUserOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSessionUserParams() - } - op := &runtime.ClientOperation{ - ID: "GetSessionUser", - Method: "GET", - PathPattern: "/public/sessionUser", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSessionUserReader{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.(*GetSessionUserOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSessionUserDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserAPIKeyByID fetches an API key for user by its id -*/ -func (a *Client) GetUserAPIKeyByID(params *GetUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeyByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserAPIKeyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserApiKeyById", - Method: "GET", - PathPattern: "/public/users/{sid}/apiKeys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserAPIKeyByIDReader{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.(*GetUserAPIKeyByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserAPIKeyByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserAPIKeys fetches API keys for user -*/ -func (a *Client) GetUserAPIKeys(params *GetUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserAPIKeysParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserApiKeys", - Method: "GET", - PathPattern: "/public/users/{sid}/apiKeys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserAPIKeysReader{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.(*GetUserAPIKeysOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserAPIKeysDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserPrivileges lists the privileges of the session user -*/ -func (a *Client) GetUserPrivileges(params *GetUserPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserPrivilegesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserPrivilegesParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserPrivileges", - Method: "GET", - PathPattern: "/public/users/privileges", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserPrivilegesReader{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.(*GetUserPrivilegesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserPrivilegesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetUsers lists the users on the cohesity cluster that match the filter criteria specified using parameters - - If no parameters are specified, all users currently on the Cohesity Cluster - -are returned. Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUsersParams() - } - op := &runtime.ClientOperation{ - ID: "GetUsers", - Method: "GET", - PathPattern: "/public/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUsersReader{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.(*GetUsersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LinuxSupportUserBashShellAccess requests linux support user bash shell access -*/ -func (a *Client) LinuxSupportUserBashShellAccess(params *LinuxSupportUserBashShellAccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxSupportUserBashShellAccessAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLinuxSupportUserBashShellAccessParams() - } - op := &runtime.ClientOperation{ - ID: "LinuxSupportUserBashShellAccess", - Method: "PUT", - PathPattern: "/public/users/linuxSupportUserBashShellAccess", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LinuxSupportUserBashShellAccessReader{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.(*LinuxSupportUserBashShellAccessAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LinuxSupportUserBashShellAccessDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LinuxSupportUserSudoAccess requests linux support user sudo access -*/ -func (a *Client) LinuxSupportUserSudoAccess(params *LinuxSupportUserSudoAccessParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LinuxSupportUserSudoAccessAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLinuxSupportUserSudoAccessParams() - } - op := &runtime.ClientOperation{ - ID: "LinuxSupportUserSudoAccess", - Method: "PUT", - PathPattern: "/public/users/linuxSupportUserSudoAccess", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LinuxSupportUserSudoAccessReader{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.(*LinuxSupportUserSudoAccessAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LinuxSupportUserSudoAccessDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListSourcesForPrincipals returns the protection sources objects and view names that the principals have permissions to access - - From the passed in list principals (specified by SIDs), - -return the list of Protection Sources objects and View names that each -principal has permission to access. -*/ -func (a *Client) ListSourcesForPrincipals(params *ListSourcesForPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSourcesForPrincipalsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListSourcesForPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "ListSourcesForPrincipals", - Method: "GET", - PathPattern: "/public/principals/protectionSources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListSourcesForPrincipalsReader{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.(*ListSourcesForPrincipalsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListSourcesForPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ResetS3SecretKey resets the s3 secret access key for the specified user on the cohesity cluster - -Returns the new key that was generated. -*/ -func (a *Client) ResetS3SecretKey(params *ResetS3SecretKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ResetS3SecretKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewResetS3SecretKeyParams() - } - op := &runtime.ClientOperation{ - ID: "ResetS3SecretKey", - Method: "POST", - PathPattern: "/public/users/s3SecretKey", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ResetS3SecretKeyReader{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.(*ResetS3SecretKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ResetS3SecretKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RotateUserAPIKey fetches an API key for user by its id -*/ -func (a *Client) RotateUserAPIKey(params *RotateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RotateUserAPIKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRotateUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "RotateUserApiKey", - Method: "POST", - PathPattern: "/public/users/{sid}/apiKeys/{id}/rotate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RotateUserAPIKeyReader{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.(*RotateUserAPIKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RotateUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchPrincipals lists the user and group principals that match the filter criteria specified using parameters - - Optionally, limit the search results by specifying security identifiers (SIDs), - -an object class (user or group) or a substring. -You can specify SIDs or a substring but not both. -*/ -func (a *Client) SearchPrincipals(params *SearchPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchPrincipalsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchPrincipals", - Method: "GET", - PathPattern: "/public/principals/searchPrincipals", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchPrincipalsReader{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.(*SearchPrincipalsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateLinuxCredentials updates linux user password -*/ -func (a *Client) UpdateLinuxCredentials(params *UpdateLinuxCredentialsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLinuxCredentialsAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateLinuxCredentialsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateLinuxCredentials", - Method: "PUT", - PathPattern: "/public/users/linuxPassword", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateLinuxCredentialsReader{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.(*UpdateLinuxCredentialsAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateLinuxCredentialsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateSourcesForPrincipals sets the protection sources and views that the specified principal has permissions to access - - Specify the security identifier (SID) of the principal to grant access - -permissions for. -*/ -func (a *Client) UpdateSourcesForPrincipals(params *UpdateSourcesForPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSourcesForPrincipalsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSourcesForPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSourcesForPrincipals", - Method: "PUT", - PathPattern: "/public/principals/protectionSources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSourcesForPrincipalsReader{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.(*UpdateSourcesForPrincipalsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSourcesForPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUser updates an existing user on the cohesity cluster only user settings on the cohesity cluster are updated no changes are made to the referenced user principal on the active directory - -Returns the user that was updated on the Cohesity Cluster. -*/ -func (a *Client) UpdateUser(params *UpdateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUser", - Method: "PUT", - PathPattern: "/public/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserReader{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.(*UpdateUserOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUserAPIKey updates an API key -*/ -func (a *Client) UpdateUserAPIKey(params *UpdateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserAPIKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUserApiKey", - Method: "PUT", - PathPattern: "/public/users/{sid}/apiKeys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserAPIKeyReader{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.(*UpdateUserAPIKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -VerifyOtpCode verifies the o t p code - -Returns the session user info if the verification is successful. -*/ -func (a *Client) VerifyOtpCode(params *VerifyOtpCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VerifyOtpCodeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewVerifyOtpCodeParams() - } - op := &runtime.ClientOperation{ - ID: "VerifyOtpCode", - Method: "POST", - PathPattern: "/public/verify-otp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &VerifyOtpCodeReader{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.(*VerifyOtpCodeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*VerifyOtpCodeDefault) - 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/principals/reset_s3_secret_key_parameters.go b/v1/client/principals/reset_s3_secret_key_parameters.go deleted file mode 100644 index ccc0c257..00000000 --- a/v1/client/principals/reset_s3_secret_key_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewResetS3SecretKeyParams creates a new ResetS3SecretKeyParams 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 NewResetS3SecretKeyParams() *ResetS3SecretKeyParams { - return &ResetS3SecretKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewResetS3SecretKeyParamsWithTimeout creates a new ResetS3SecretKeyParams object -// with the ability to set a timeout on a request. -func NewResetS3SecretKeyParamsWithTimeout(timeout time.Duration) *ResetS3SecretKeyParams { - return &ResetS3SecretKeyParams{ - timeout: timeout, - } -} - -// NewResetS3SecretKeyParamsWithContext creates a new ResetS3SecretKeyParams object -// with the ability to set a context for a request. -func NewResetS3SecretKeyParamsWithContext(ctx context.Context) *ResetS3SecretKeyParams { - return &ResetS3SecretKeyParams{ - Context: ctx, - } -} - -// NewResetS3SecretKeyParamsWithHTTPClient creates a new ResetS3SecretKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewResetS3SecretKeyParamsWithHTTPClient(client *http.Client) *ResetS3SecretKeyParams { - return &ResetS3SecretKeyParams{ - HTTPClient: client, - } -} - -/* -ResetS3SecretKeyParams contains all the parameters to send to the API endpoint - - for the reset s3 secret key operation. - - Typically these are written to a http.Request. -*/ -type ResetS3SecretKeyParams struct { - - /* Body. - - Request to reset the S3 secret access key for the specified Cohesity user. - */ - Body *models.ResetS3SecretKeyParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the reset s3 secret key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ResetS3SecretKeyParams) WithDefaults() *ResetS3SecretKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the reset s3 secret key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ResetS3SecretKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) WithTimeout(timeout time.Duration) *ResetS3SecretKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) WithContext(ctx context.Context) *ResetS3SecretKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) WithHTTPClient(client *http.Client) *ResetS3SecretKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) WithBody(body *models.ResetS3SecretKeyParameters) *ResetS3SecretKeyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the reset s3 secret key params -func (o *ResetS3SecretKeyParams) SetBody(body *models.ResetS3SecretKeyParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ResetS3SecretKeyParams) 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/principals/reset_s3_secret_key_responses.go b/v1/client/principals/reset_s3_secret_key_responses.go deleted file mode 100644 index e258376e..00000000 --- a/v1/client/principals/reset_s3_secret_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ResetS3SecretKeyReader is a Reader for the ResetS3SecretKey structure. -type ResetS3SecretKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ResetS3SecretKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewResetS3SecretKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewResetS3SecretKeyDefault(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 - } -} - -// NewResetS3SecretKeyOK creates a ResetS3SecretKeyOK with default headers values -func NewResetS3SecretKeyOK() *ResetS3SecretKeyOK { - return &ResetS3SecretKeyOK{} -} - -/* -ResetS3SecretKeyOK describes a response with status code 200, with default header values. - -New S3 Secret Access Key. -*/ -type ResetS3SecretKeyOK struct { - Payload *models.NewS3SecretAccessKey -} - -// IsSuccess returns true when this reset s3 secret key o k response has a 2xx status code -func (o *ResetS3SecretKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this reset s3 secret key o k response has a 3xx status code -func (o *ResetS3SecretKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset s3 secret key o k response has a 4xx status code -func (o *ResetS3SecretKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this reset s3 secret key o k response has a 5xx status code -func (o *ResetS3SecretKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this reset s3 secret key o k response a status code equal to that given -func (o *ResetS3SecretKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the reset s3 secret key o k response -func (o *ResetS3SecretKeyOK) Code() int { - return 200 -} - -func (o *ResetS3SecretKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/s3SecretKey][%d] resetS3SecretKeyOK %s", 200, payload) -} - -func (o *ResetS3SecretKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/s3SecretKey][%d] resetS3SecretKeyOK %s", 200, payload) -} - -func (o *ResetS3SecretKeyOK) GetPayload() *models.NewS3SecretAccessKey { - return o.Payload -} - -func (o *ResetS3SecretKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NewS3SecretAccessKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewResetS3SecretKeyDefault creates a ResetS3SecretKeyDefault with default headers values -func NewResetS3SecretKeyDefault(code int) *ResetS3SecretKeyDefault { - return &ResetS3SecretKeyDefault{ - _statusCode: code, - } -} - -/* -ResetS3SecretKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type ResetS3SecretKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this reset s3 secret key default response has a 2xx status code -func (o *ResetS3SecretKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this reset s3 secret key default response has a 3xx status code -func (o *ResetS3SecretKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this reset s3 secret key default response has a 4xx status code -func (o *ResetS3SecretKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this reset s3 secret key default response has a 5xx status code -func (o *ResetS3SecretKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this reset s3 secret key default response a status code equal to that given -func (o *ResetS3SecretKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the reset s3 secret key default response -func (o *ResetS3SecretKeyDefault) Code() int { - return o._statusCode -} - -func (o *ResetS3SecretKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/s3SecretKey][%d] ResetS3SecretKey default %s", o._statusCode, payload) -} - -func (o *ResetS3SecretKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/s3SecretKey][%d] ResetS3SecretKey default %s", o._statusCode, payload) -} - -func (o *ResetS3SecretKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ResetS3SecretKeyDefault) 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/principals/rotate_user_api_key_parameters.go b/v1/client/principals/rotate_user_api_key_parameters.go deleted file mode 100644 index 79e0d485..00000000 --- a/v1/client/principals/rotate_user_api_key_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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" -) - -// NewRotateUserAPIKeyParams creates a new RotateUserAPIKeyParams 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 NewRotateUserAPIKeyParams() *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRotateUserAPIKeyParamsWithTimeout creates a new RotateUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewRotateUserAPIKeyParamsWithTimeout(timeout time.Duration) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewRotateUserAPIKeyParamsWithContext creates a new RotateUserAPIKeyParams object -// with the ability to set a context for a request. -func NewRotateUserAPIKeyParamsWithContext(ctx context.Context) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - Context: ctx, - } -} - -// NewRotateUserAPIKeyParamsWithHTTPClient creates a new RotateUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewRotateUserAPIKeyParamsWithHTTPClient(client *http.Client) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -RotateUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the rotate user Api key operation. - - Typically these are written to a http.Request. -*/ -type RotateUserAPIKeyParams struct { - - /* ID. - - Specifies the API key id. - */ - ID string - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the rotate user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RotateUserAPIKeyParams) WithDefaults() *RotateUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the rotate user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RotateUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the rotate user Api key params -func (o *RotateUserAPIKeyParams) WithTimeout(timeout time.Duration) *RotateUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the rotate user Api key params -func (o *RotateUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the rotate user Api key params -func (o *RotateUserAPIKeyParams) WithContext(ctx context.Context) *RotateUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the rotate user Api key params -func (o *RotateUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the rotate user Api key params -func (o *RotateUserAPIKeyParams) WithHTTPClient(client *http.Client) *RotateUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the rotate user Api key params -func (o *RotateUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the rotate user Api key params -func (o *RotateUserAPIKeyParams) WithID(id string) *RotateUserAPIKeyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the rotate user Api key params -func (o *RotateUserAPIKeyParams) SetID(id string) { - o.ID = id -} - -// WithSid adds the sid to the rotate user Api key params -func (o *RotateUserAPIKeyParams) WithSid(sid string) *RotateUserAPIKeyParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the rotate user Api key params -func (o *RotateUserAPIKeyParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *RotateUserAPIKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/principals/rotate_user_api_key_responses.go b/v1/client/principals/rotate_user_api_key_responses.go deleted file mode 100644 index 44cd3939..00000000 --- a/v1/client/principals/rotate_user_api_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RotateUserAPIKeyReader is a Reader for the RotateUserAPIKey structure. -type RotateUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RotateUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRotateUserAPIKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRotateUserAPIKeyDefault(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 - } -} - -// NewRotateUserAPIKeyOK creates a RotateUserAPIKeyOK with default headers values -func NewRotateUserAPIKeyOK() *RotateUserAPIKeyOK { - return &RotateUserAPIKeyOK{} -} - -/* -RotateUserAPIKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type RotateUserAPIKeyOK struct { - Payload *models.CreatedAPIKey -} - -// IsSuccess returns true when this rotate user Api key o k response has a 2xx status code -func (o *RotateUserAPIKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this rotate user Api key o k response has a 3xx status code -func (o *RotateUserAPIKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this rotate user Api key o k response has a 4xx status code -func (o *RotateUserAPIKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this rotate user Api key o k response has a 5xx status code -func (o *RotateUserAPIKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this rotate user Api key o k response a status code equal to that given -func (o *RotateUserAPIKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the rotate user Api key o k response -func (o *RotateUserAPIKeyOK) Code() int { - return 200 -} - -func (o *RotateUserAPIKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys/{id}/rotate][%d] rotateUserApiKeyOK %s", 200, payload) -} - -func (o *RotateUserAPIKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys/{id}/rotate][%d] rotateUserApiKeyOK %s", 200, payload) -} - -func (o *RotateUserAPIKeyOK) GetPayload() *models.CreatedAPIKey { - return o.Payload -} - -func (o *RotateUserAPIKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRotateUserAPIKeyDefault creates a RotateUserAPIKeyDefault with default headers values -func NewRotateUserAPIKeyDefault(code int) *RotateUserAPIKeyDefault { - return &RotateUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -RotateUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type RotateUserAPIKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this rotate user Api key default response has a 2xx status code -func (o *RotateUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this rotate user Api key default response has a 3xx status code -func (o *RotateUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this rotate user Api key default response has a 4xx status code -func (o *RotateUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this rotate user Api key default response has a 5xx status code -func (o *RotateUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this rotate user Api key default response a status code equal to that given -func (o *RotateUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the rotate user Api key default response -func (o *RotateUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *RotateUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys/{id}/rotate][%d] RotateUserApiKey default %s", o._statusCode, payload) -} - -func (o *RotateUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/users/{sid}/apiKeys/{id}/rotate][%d] RotateUserApiKey default %s", o._statusCode, payload) -} - -func (o *RotateUserAPIKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RotateUserAPIKeyDefault) 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/principals/search_principals_parameters.go b/v1/client/principals/search_principals_parameters.go deleted file mode 100644 index 5c2baf2e..00000000 --- a/v1/client/principals/search_principals_parameters.go +++ /dev/null @@ -1,364 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/go-openapi/swag" -) - -// NewSearchPrincipalsParams creates a new SearchPrincipalsParams 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 NewSearchPrincipalsParams() *SearchPrincipalsParams { - return &SearchPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchPrincipalsParamsWithTimeout creates a new SearchPrincipalsParams object -// with the ability to set a timeout on a request. -func NewSearchPrincipalsParamsWithTimeout(timeout time.Duration) *SearchPrincipalsParams { - return &SearchPrincipalsParams{ - timeout: timeout, - } -} - -// NewSearchPrincipalsParamsWithContext creates a new SearchPrincipalsParams object -// with the ability to set a context for a request. -func NewSearchPrincipalsParamsWithContext(ctx context.Context) *SearchPrincipalsParams { - return &SearchPrincipalsParams{ - Context: ctx, - } -} - -// NewSearchPrincipalsParamsWithHTTPClient creates a new SearchPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchPrincipalsParamsWithHTTPClient(client *http.Client) *SearchPrincipalsParams { - return &SearchPrincipalsParams{ - HTTPClient: client, - } -} - -/* -SearchPrincipalsParams contains all the parameters to send to the API endpoint - - for the search principals operation. - - Typically these are written to a http.Request. -*/ -type SearchPrincipalsParams struct { - - /* Domain. - - Specifies the domain name of the principals to search. If specified - the principals in that domain are searched. Domain could be an - Active Directory domain joined by the Cluster or any one of the - trusted domains of the Active Directory domain or the LOCAL domain. - If not specified, all the domains are searched. - */ - Domain *string - - /* IncludeComputers. - - Specifies if Computer/GMSA accounts need to be included in this search. - */ - IncludeComputers *bool - - /* IncludeServiceAccounts. - - Specifies if service accouns should be included in the search result. - This field is true by default. - */ - IncludeServiceAccounts *bool - - /* ObjectClass. - - Optionally filter by a principal object class such as 'kGroup' or 'kUser'. - If 'kGroup' is specified, only group principals are returned. - If 'kUser' is specified, only user principals are returned. - If not specified, both group and user principals are returned. - 'kUser' specifies a user object class. - 'kGroup' specifies a group object class. - 'kComputer' specifies a computer object class. - 'kWellKnownPrincipal' specifies a well known principal. - 'kServiceAccount' specifies a service account object class. - */ - ObjectClass *string - - /* Search. - - Optionally filter by matching a substring. Only principals in - the with a name or sAMAccountName that matches - part or all of the specified substring are returned. - If specified, a 'sids' parameter should not be specified. - */ - Search *string - - /* Sids. - - Optionally filter by a list of security identifiers (SIDs) found - in the specified domain. Only principals matching - the specified SIDs are returned. - If specified, a 'search' parameter should not be specified. - */ - Sids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchPrincipalsParams) WithDefaults() *SearchPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search principals params -func (o *SearchPrincipalsParams) WithTimeout(timeout time.Duration) *SearchPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search principals params -func (o *SearchPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search principals params -func (o *SearchPrincipalsParams) WithContext(ctx context.Context) *SearchPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search principals params -func (o *SearchPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search principals params -func (o *SearchPrincipalsParams) WithHTTPClient(client *http.Client) *SearchPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search principals params -func (o *SearchPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomain adds the domain to the search principals params -func (o *SearchPrincipalsParams) WithDomain(domain *string) *SearchPrincipalsParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the search principals params -func (o *SearchPrincipalsParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithIncludeComputers adds the includeComputers to the search principals params -func (o *SearchPrincipalsParams) WithIncludeComputers(includeComputers *bool) *SearchPrincipalsParams { - o.SetIncludeComputers(includeComputers) - return o -} - -// SetIncludeComputers adds the includeComputers to the search principals params -func (o *SearchPrincipalsParams) SetIncludeComputers(includeComputers *bool) { - o.IncludeComputers = includeComputers -} - -// WithIncludeServiceAccounts adds the includeServiceAccounts to the search principals params -func (o *SearchPrincipalsParams) WithIncludeServiceAccounts(includeServiceAccounts *bool) *SearchPrincipalsParams { - o.SetIncludeServiceAccounts(includeServiceAccounts) - return o -} - -// SetIncludeServiceAccounts adds the includeServiceAccounts to the search principals params -func (o *SearchPrincipalsParams) SetIncludeServiceAccounts(includeServiceAccounts *bool) { - o.IncludeServiceAccounts = includeServiceAccounts -} - -// WithObjectClass adds the objectClass to the search principals params -func (o *SearchPrincipalsParams) WithObjectClass(objectClass *string) *SearchPrincipalsParams { - o.SetObjectClass(objectClass) - return o -} - -// SetObjectClass adds the objectClass to the search principals params -func (o *SearchPrincipalsParams) SetObjectClass(objectClass *string) { - o.ObjectClass = objectClass -} - -// WithSearch adds the search to the search principals params -func (o *SearchPrincipalsParams) WithSearch(search *string) *SearchPrincipalsParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the search principals params -func (o *SearchPrincipalsParams) SetSearch(search *string) { - o.Search = search -} - -// WithSids adds the sids to the search principals params -func (o *SearchPrincipalsParams) WithSids(sids []string) *SearchPrincipalsParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the search principals params -func (o *SearchPrincipalsParams) SetSids(sids []string) { - o.Sids = sids -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchPrincipalsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.IncludeComputers != nil { - - // query param includeComputers - var qrIncludeComputers bool - - if o.IncludeComputers != nil { - qrIncludeComputers = *o.IncludeComputers - } - qIncludeComputers := swag.FormatBool(qrIncludeComputers) - if qIncludeComputers != "" { - - if err := r.SetQueryParam("includeComputers", qIncludeComputers); err != nil { - return err - } - } - } - - if o.IncludeServiceAccounts != nil { - - // query param includeServiceAccounts - var qrIncludeServiceAccounts bool - - if o.IncludeServiceAccounts != nil { - qrIncludeServiceAccounts = *o.IncludeServiceAccounts - } - qIncludeServiceAccounts := swag.FormatBool(qrIncludeServiceAccounts) - if qIncludeServiceAccounts != "" { - - if err := r.SetQueryParam("includeServiceAccounts", qIncludeServiceAccounts); err != nil { - return err - } - } - } - - if o.ObjectClass != nil { - - // query param objectClass - var qrObjectClass string - - if o.ObjectClass != nil { - qrObjectClass = *o.ObjectClass - } - qObjectClass := qrObjectClass - if qObjectClass != "" { - - if err := r.SetQueryParam("objectClass", qObjectClass); err != nil { - return err - } - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchPrincipals binds the parameter sids -func (o *SearchPrincipalsParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} diff --git a/v1/client/principals/search_principals_responses.go b/v1/client/principals/search_principals_responses.go deleted file mode 100644 index 27102352..00000000 --- a/v1/client/principals/search_principals_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchPrincipalsReader is a Reader for the SearchPrincipals structure. -type SearchPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchPrincipalsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchPrincipalsDefault(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 - } -} - -// NewSearchPrincipalsOK creates a SearchPrincipalsOK with default headers values -func NewSearchPrincipalsOK() *SearchPrincipalsOK { - return &SearchPrincipalsOK{} -} - -/* -SearchPrincipalsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchPrincipalsOK struct { - Payload []*models.Principal -} - -// IsSuccess returns true when this search principals o k response has a 2xx status code -func (o *SearchPrincipalsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search principals o k response has a 3xx status code -func (o *SearchPrincipalsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search principals o k response has a 4xx status code -func (o *SearchPrincipalsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search principals o k response has a 5xx status code -func (o *SearchPrincipalsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search principals o k response a status code equal to that given -func (o *SearchPrincipalsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search principals o k response -func (o *SearchPrincipalsOK) Code() int { - return 200 -} - -func (o *SearchPrincipalsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/searchPrincipals][%d] searchPrincipalsOK %s", 200, payload) -} - -func (o *SearchPrincipalsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/searchPrincipals][%d] searchPrincipalsOK %s", 200, payload) -} - -func (o *SearchPrincipalsOK) GetPayload() []*models.Principal { - return o.Payload -} - -func (o *SearchPrincipalsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchPrincipalsDefault creates a SearchPrincipalsDefault with default headers values -func NewSearchPrincipalsDefault(code int) *SearchPrincipalsDefault { - return &SearchPrincipalsDefault{ - _statusCode: code, - } -} - -/* -SearchPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search principals default response has a 2xx status code -func (o *SearchPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search principals default response has a 3xx status code -func (o *SearchPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search principals default response has a 4xx status code -func (o *SearchPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search principals default response has a 5xx status code -func (o *SearchPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search principals default response a status code equal to that given -func (o *SearchPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search principals default response -func (o *SearchPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *SearchPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/searchPrincipals][%d] SearchPrincipals default %s", o._statusCode, payload) -} - -func (o *SearchPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/principals/searchPrincipals][%d] SearchPrincipals default %s", o._statusCode, payload) -} - -func (o *SearchPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchPrincipalsDefault) 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/principals/update_linux_credentials_parameters.go b/v1/client/principals/update_linux_credentials_parameters.go deleted file mode 100644 index 01ce980e..00000000 --- a/v1/client/principals/update_linux_credentials_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateLinuxCredentialsParams creates a new UpdateLinuxCredentialsParams 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 NewUpdateLinuxCredentialsParams() *UpdateLinuxCredentialsParams { - return &UpdateLinuxCredentialsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateLinuxCredentialsParamsWithTimeout creates a new UpdateLinuxCredentialsParams object -// with the ability to set a timeout on a request. -func NewUpdateLinuxCredentialsParamsWithTimeout(timeout time.Duration) *UpdateLinuxCredentialsParams { - return &UpdateLinuxCredentialsParams{ - timeout: timeout, - } -} - -// NewUpdateLinuxCredentialsParamsWithContext creates a new UpdateLinuxCredentialsParams object -// with the ability to set a context for a request. -func NewUpdateLinuxCredentialsParamsWithContext(ctx context.Context) *UpdateLinuxCredentialsParams { - return &UpdateLinuxCredentialsParams{ - Context: ctx, - } -} - -// NewUpdateLinuxCredentialsParamsWithHTTPClient creates a new UpdateLinuxCredentialsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateLinuxCredentialsParamsWithHTTPClient(client *http.Client) *UpdateLinuxCredentialsParams { - return &UpdateLinuxCredentialsParams{ - HTTPClient: client, - } -} - -/* -UpdateLinuxCredentialsParams contains all the parameters to send to the API endpoint - - for the update linux credentials operation. - - Typically these are written to a http.Request. -*/ -type UpdateLinuxCredentialsParams struct { - - // Body. - Body *models.UpdateLinuxPasswordReqParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update linux credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLinuxCredentialsParams) WithDefaults() *UpdateLinuxCredentialsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update linux credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLinuxCredentialsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) WithTimeout(timeout time.Duration) *UpdateLinuxCredentialsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) WithContext(ctx context.Context) *UpdateLinuxCredentialsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) WithHTTPClient(client *http.Client) *UpdateLinuxCredentialsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) WithBody(body *models.UpdateLinuxPasswordReqParams) *UpdateLinuxCredentialsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update linux credentials params -func (o *UpdateLinuxCredentialsParams) SetBody(body *models.UpdateLinuxPasswordReqParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateLinuxCredentialsParams) 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/principals/update_linux_credentials_responses.go b/v1/client/principals/update_linux_credentials_responses.go deleted file mode 100644 index 360ed1b2..00000000 --- a/v1/client/principals/update_linux_credentials_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateLinuxCredentialsReader is a Reader for the UpdateLinuxCredentials structure. -type UpdateLinuxCredentialsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateLinuxCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpdateLinuxCredentialsAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateLinuxCredentialsDefault(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 - } -} - -// NewUpdateLinuxCredentialsAccepted creates a UpdateLinuxCredentialsAccepted with default headers values -func NewUpdateLinuxCredentialsAccepted() *UpdateLinuxCredentialsAccepted { - return &UpdateLinuxCredentialsAccepted{} -} - -/* -UpdateLinuxCredentialsAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UpdateLinuxCredentialsAccepted struct { - Payload *models.UpdateLinuxPasswordResult -} - -// IsSuccess returns true when this update linux credentials accepted response has a 2xx status code -func (o *UpdateLinuxCredentialsAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update linux credentials accepted response has a 3xx status code -func (o *UpdateLinuxCredentialsAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update linux credentials accepted response has a 4xx status code -func (o *UpdateLinuxCredentialsAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this update linux credentials accepted response has a 5xx status code -func (o *UpdateLinuxCredentialsAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this update linux credentials accepted response a status code equal to that given -func (o *UpdateLinuxCredentialsAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the update linux credentials accepted response -func (o *UpdateLinuxCredentialsAccepted) Code() int { - return 202 -} - -func (o *UpdateLinuxCredentialsAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxPassword][%d] updateLinuxCredentialsAccepted %s", 202, payload) -} - -func (o *UpdateLinuxCredentialsAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxPassword][%d] updateLinuxCredentialsAccepted %s", 202, payload) -} - -func (o *UpdateLinuxCredentialsAccepted) GetPayload() *models.UpdateLinuxPasswordResult { - return o.Payload -} - -func (o *UpdateLinuxCredentialsAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateLinuxPasswordResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateLinuxCredentialsDefault creates a UpdateLinuxCredentialsDefault with default headers values -func NewUpdateLinuxCredentialsDefault(code int) *UpdateLinuxCredentialsDefault { - return &UpdateLinuxCredentialsDefault{ - _statusCode: code, - } -} - -/* -UpdateLinuxCredentialsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateLinuxCredentialsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update linux credentials default response has a 2xx status code -func (o *UpdateLinuxCredentialsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update linux credentials default response has a 3xx status code -func (o *UpdateLinuxCredentialsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update linux credentials default response has a 4xx status code -func (o *UpdateLinuxCredentialsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update linux credentials default response has a 5xx status code -func (o *UpdateLinuxCredentialsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update linux credentials default response a status code equal to that given -func (o *UpdateLinuxCredentialsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update linux credentials default response -func (o *UpdateLinuxCredentialsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateLinuxCredentialsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxPassword][%d] UpdateLinuxCredentials default %s", o._statusCode, payload) -} - -func (o *UpdateLinuxCredentialsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/linuxPassword][%d] UpdateLinuxCredentials default %s", o._statusCode, payload) -} - -func (o *UpdateLinuxCredentialsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateLinuxCredentialsDefault) 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/principals/update_sources_for_principals_parameters.go b/v1/client/principals/update_sources_for_principals_parameters.go deleted file mode 100644 index 4d319e5a..00000000 --- a/v1/client/principals/update_sources_for_principals_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateSourcesForPrincipalsParams creates a new UpdateSourcesForPrincipalsParams 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 NewUpdateSourcesForPrincipalsParams() *UpdateSourcesForPrincipalsParams { - return &UpdateSourcesForPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSourcesForPrincipalsParamsWithTimeout creates a new UpdateSourcesForPrincipalsParams object -// with the ability to set a timeout on a request. -func NewUpdateSourcesForPrincipalsParamsWithTimeout(timeout time.Duration) *UpdateSourcesForPrincipalsParams { - return &UpdateSourcesForPrincipalsParams{ - timeout: timeout, - } -} - -// NewUpdateSourcesForPrincipalsParamsWithContext creates a new UpdateSourcesForPrincipalsParams object -// with the ability to set a context for a request. -func NewUpdateSourcesForPrincipalsParamsWithContext(ctx context.Context) *UpdateSourcesForPrincipalsParams { - return &UpdateSourcesForPrincipalsParams{ - Context: ctx, - } -} - -// NewUpdateSourcesForPrincipalsParamsWithHTTPClient creates a new UpdateSourcesForPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSourcesForPrincipalsParamsWithHTTPClient(client *http.Client) *UpdateSourcesForPrincipalsParams { - return &UpdateSourcesForPrincipalsParams{ - HTTPClient: client, - } -} - -/* -UpdateSourcesForPrincipalsParams contains all the parameters to send to the API endpoint - - for the update sources for principals operation. - - Typically these are written to a http.Request. -*/ -type UpdateSourcesForPrincipalsParams struct { - - /* Body. - - Request to set access permissions to Protection Sources and Views - for a principal. - */ - Body *models.UpdateSourcesForPrincipalsParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update sources for principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSourcesForPrincipalsParams) WithDefaults() *UpdateSourcesForPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update sources for principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSourcesForPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) WithTimeout(timeout time.Duration) *UpdateSourcesForPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) WithContext(ctx context.Context) *UpdateSourcesForPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) WithHTTPClient(client *http.Client) *UpdateSourcesForPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) WithBody(body *models.UpdateSourcesForPrincipalsParams) *UpdateSourcesForPrincipalsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update sources for principals params -func (o *UpdateSourcesForPrincipalsParams) SetBody(body *models.UpdateSourcesForPrincipalsParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSourcesForPrincipalsParams) 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/principals/update_sources_for_principals_responses.go b/v1/client/principals/update_sources_for_principals_responses.go deleted file mode 100644 index 08127264..00000000 --- a/v1/client/principals/update_sources_for_principals_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateSourcesForPrincipalsReader is a Reader for the UpdateSourcesForPrincipals structure. -type UpdateSourcesForPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSourcesForPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUpdateSourcesForPrincipalsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSourcesForPrincipalsDefault(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 - } -} - -// NewUpdateSourcesForPrincipalsNoContent creates a UpdateSourcesForPrincipalsNoContent with default headers values -func NewUpdateSourcesForPrincipalsNoContent() *UpdateSourcesForPrincipalsNoContent { - return &UpdateSourcesForPrincipalsNoContent{} -} - -/* -UpdateSourcesForPrincipalsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UpdateSourcesForPrincipalsNoContent struct { -} - -// IsSuccess returns true when this update sources for principals no content response has a 2xx status code -func (o *UpdateSourcesForPrincipalsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update sources for principals no content response has a 3xx status code -func (o *UpdateSourcesForPrincipalsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update sources for principals no content response has a 4xx status code -func (o *UpdateSourcesForPrincipalsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this update sources for principals no content response has a 5xx status code -func (o *UpdateSourcesForPrincipalsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this update sources for principals no content response a status code equal to that given -func (o *UpdateSourcesForPrincipalsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the update sources for principals no content response -func (o *UpdateSourcesForPrincipalsNoContent) Code() int { - return 204 -} - -func (o *UpdateSourcesForPrincipalsNoContent) Error() string { - return fmt.Sprintf("[PUT /public/principals/protectionSources][%d] updateSourcesForPrincipalsNoContent", 204) -} - -func (o *UpdateSourcesForPrincipalsNoContent) String() string { - return fmt.Sprintf("[PUT /public/principals/protectionSources][%d] updateSourcesForPrincipalsNoContent", 204) -} - -func (o *UpdateSourcesForPrincipalsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateSourcesForPrincipalsDefault creates a UpdateSourcesForPrincipalsDefault with default headers values -func NewUpdateSourcesForPrincipalsDefault(code int) *UpdateSourcesForPrincipalsDefault { - return &UpdateSourcesForPrincipalsDefault{ - _statusCode: code, - } -} - -/* -UpdateSourcesForPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSourcesForPrincipalsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update sources for principals default response has a 2xx status code -func (o *UpdateSourcesForPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update sources for principals default response has a 3xx status code -func (o *UpdateSourcesForPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update sources for principals default response has a 4xx status code -func (o *UpdateSourcesForPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update sources for principals default response has a 5xx status code -func (o *UpdateSourcesForPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update sources for principals default response a status code equal to that given -func (o *UpdateSourcesForPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update sources for principals default response -func (o *UpdateSourcesForPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSourcesForPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/principals/protectionSources][%d] UpdateSourcesForPrincipals default %s", o._statusCode, payload) -} - -func (o *UpdateSourcesForPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/principals/protectionSources][%d] UpdateSourcesForPrincipals default %s", o._statusCode, payload) -} - -func (o *UpdateSourcesForPrincipalsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateSourcesForPrincipalsDefault) 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/principals/update_user_api_key_parameters.go b/v1/client/principals/update_user_api_key_parameters.go deleted file mode 100644 index 07ded9c6..00000000 --- a/v1/client/principals/update_user_api_key_parameters.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateUserAPIKeyParams creates a new UpdateUserAPIKeyParams 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 NewUpdateUserAPIKeyParams() *UpdateUserAPIKeyParams { - return &UpdateUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserAPIKeyParamsWithTimeout creates a new UpdateUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewUpdateUserAPIKeyParamsWithTimeout(timeout time.Duration) *UpdateUserAPIKeyParams { - return &UpdateUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewUpdateUserAPIKeyParamsWithContext creates a new UpdateUserAPIKeyParams object -// with the ability to set a context for a request. -func NewUpdateUserAPIKeyParamsWithContext(ctx context.Context) *UpdateUserAPIKeyParams { - return &UpdateUserAPIKeyParams{ - Context: ctx, - } -} - -// NewUpdateUserAPIKeyParamsWithHTTPClient creates a new UpdateUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserAPIKeyParamsWithHTTPClient(client *http.Client) *UpdateUserAPIKeyParams { - return &UpdateUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -UpdateUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the update user Api key operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserAPIKeyParams struct { - - /* Body. - - Request to update an API key. - */ - Body *models.UpdateAPIKeyParams - - /* ID. - - Specifies the API key id. - */ - ID string - - /* Sid. - - Specifies the user sid. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserAPIKeyParams) WithDefaults() *UpdateUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user Api key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithTimeout(timeout time.Duration) *UpdateUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithContext(ctx context.Context) *UpdateUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithHTTPClient(client *http.Client) *UpdateUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithBody(body *models.UpdateAPIKeyParams) *UpdateUserAPIKeyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetBody(body *models.UpdateAPIKeyParams) { - o.Body = body -} - -// WithID adds the id to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithID(id string) *UpdateUserAPIKeyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetID(id string) { - o.ID = id -} - -// WithSid adds the sid to the update user Api key params -func (o *UpdateUserAPIKeyParams) WithSid(sid string) *UpdateUserAPIKeyParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the update user Api key params -func (o *UpdateUserAPIKeyParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserAPIKeyParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/principals/update_user_api_key_responses.go b/v1/client/principals/update_user_api_key_responses.go deleted file mode 100644 index 1d425609..00000000 --- a/v1/client/principals/update_user_api_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateUserAPIKeyReader is a Reader for the UpdateUserAPIKey structure. -type UpdateUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserAPIKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserAPIKeyDefault(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 - } -} - -// NewUpdateUserAPIKeyOK creates a UpdateUserAPIKeyOK with default headers values -func NewUpdateUserAPIKeyOK() *UpdateUserAPIKeyOK { - return &UpdateUserAPIKeyOK{} -} - -/* -UpdateUserAPIKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateUserAPIKeyOK struct { - Payload *models.CreatedAPIKey -} - -// IsSuccess returns true when this update user Api key o k response has a 2xx status code -func (o *UpdateUserAPIKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user Api key o k response has a 3xx status code -func (o *UpdateUserAPIKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user Api key o k response has a 4xx status code -func (o *UpdateUserAPIKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user Api key o k response has a 5xx status code -func (o *UpdateUserAPIKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user Api key o k response a status code equal to that given -func (o *UpdateUserAPIKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user Api key o k response -func (o *UpdateUserAPIKeyOK) Code() int { - return 200 -} - -func (o *UpdateUserAPIKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/{sid}/apiKeys/{id}][%d] updateUserApiKeyOK %s", 200, payload) -} - -func (o *UpdateUserAPIKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/{sid}/apiKeys/{id}][%d] updateUserApiKeyOK %s", 200, payload) -} - -func (o *UpdateUserAPIKeyOK) GetPayload() *models.CreatedAPIKey { - return o.Payload -} - -func (o *UpdateUserAPIKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserAPIKeyDefault creates a UpdateUserAPIKeyDefault with default headers values -func NewUpdateUserAPIKeyDefault(code int) *UpdateUserAPIKeyDefault { - return &UpdateUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -UpdateUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserAPIKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update user Api key default response has a 2xx status code -func (o *UpdateUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user Api key default response has a 3xx status code -func (o *UpdateUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user Api key default response has a 4xx status code -func (o *UpdateUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user Api key default response has a 5xx status code -func (o *UpdateUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user Api key default response a status code equal to that given -func (o *UpdateUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user Api key default response -func (o *UpdateUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/{sid}/apiKeys/{id}][%d] UpdateUserApiKey default %s", o._statusCode, payload) -} - -func (o *UpdateUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users/{sid}/apiKeys/{id}][%d] UpdateUserApiKey default %s", o._statusCode, payload) -} - -func (o *UpdateUserAPIKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateUserAPIKeyDefault) 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/principals/update_user_parameters.go b/v1/client/principals/update_user_parameters.go deleted file mode 100644 index 080d1b06..00000000 --- a/v1/client/principals/update_user_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateUserParams creates a new UpdateUserParams 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 NewUpdateUserParams() *UpdateUserParams { - return &UpdateUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserParamsWithTimeout creates a new UpdateUserParams object -// with the ability to set a timeout on a request. -func NewUpdateUserParamsWithTimeout(timeout time.Duration) *UpdateUserParams { - return &UpdateUserParams{ - timeout: timeout, - } -} - -// NewUpdateUserParamsWithContext creates a new UpdateUserParams object -// with the ability to set a context for a request. -func NewUpdateUserParamsWithContext(ctx context.Context) *UpdateUserParams { - return &UpdateUserParams{ - Context: ctx, - } -} - -// NewUpdateUserParamsWithHTTPClient creates a new UpdateUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserParamsWithHTTPClient(client *http.Client) *UpdateUserParams { - return &UpdateUserParams{ - HTTPClient: client, - } -} - -/* -UpdateUserParams contains all the parameters to send to the API endpoint - - for the update user operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserParams struct { - - /* Body. - - Request to update an existing user. - */ - Body *models.User - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserParams) WithDefaults() *UpdateUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user params -func (o *UpdateUserParams) WithTimeout(timeout time.Duration) *UpdateUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user params -func (o *UpdateUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user params -func (o *UpdateUserParams) WithContext(ctx context.Context) *UpdateUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user params -func (o *UpdateUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user params -func (o *UpdateUserParams) WithHTTPClient(client *http.Client) *UpdateUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user params -func (o *UpdateUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update user params -func (o *UpdateUserParams) WithBody(body *models.User) *UpdateUserParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update user params -func (o *UpdateUserParams) SetBody(body *models.User) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserParams) 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/principals/update_user_responses.go b/v1/client/principals/update_user_responses.go deleted file mode 100644 index 9352a6f3..00000000 --- a/v1/client/principals/update_user_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateUserReader is a Reader for the UpdateUser structure. -type UpdateUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserDefault(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 - } -} - -// NewUpdateUserOK creates a UpdateUserOK with default headers values -func NewUpdateUserOK() *UpdateUserOK { - return &UpdateUserOK{} -} - -/* -UpdateUserOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateUserOK struct { - Payload *models.User -} - -// IsSuccess returns true when this update user o k response has a 2xx status code -func (o *UpdateUserOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user o k response has a 3xx status code -func (o *UpdateUserOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user o k response has a 4xx status code -func (o *UpdateUserOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user o k response has a 5xx status code -func (o *UpdateUserOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user o k response a status code equal to that given -func (o *UpdateUserOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user o k response -func (o *UpdateUserOK) Code() int { - return 200 -} - -func (o *UpdateUserOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users][%d] updateUserOK %s", 200, payload) -} - -func (o *UpdateUserOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users][%d] updateUserOK %s", 200, payload) -} - -func (o *UpdateUserOK) GetPayload() *models.User { - return o.Payload -} - -func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.User) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserDefault creates a UpdateUserDefault with default headers values -func NewUpdateUserDefault(code int) *UpdateUserDefault { - return &UpdateUserDefault{ - _statusCode: code, - } -} - -/* -UpdateUserDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update user default response has a 2xx status code -func (o *UpdateUserDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user default response has a 3xx status code -func (o *UpdateUserDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user default response has a 4xx status code -func (o *UpdateUserDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user default response has a 5xx status code -func (o *UpdateUserDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user default response a status code equal to that given -func (o *UpdateUserDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user default response -func (o *UpdateUserDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users][%d] UpdateUser default %s", o._statusCode, payload) -} - -func (o *UpdateUserDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/users][%d] UpdateUser default %s", o._statusCode, payload) -} - -func (o *UpdateUserDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateUserDefault) 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/principals/verify_otp_code_parameters.go b/v1/client/principals/verify_otp_code_parameters.go deleted file mode 100644 index 9d4f7b84..00000000 --- a/v1/client/principals/verify_otp_code_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewVerifyOtpCodeParams creates a new VerifyOtpCodeParams 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 NewVerifyOtpCodeParams() *VerifyOtpCodeParams { - return &VerifyOtpCodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewVerifyOtpCodeParamsWithTimeout creates a new VerifyOtpCodeParams object -// with the ability to set a timeout on a request. -func NewVerifyOtpCodeParamsWithTimeout(timeout time.Duration) *VerifyOtpCodeParams { - return &VerifyOtpCodeParams{ - timeout: timeout, - } -} - -// NewVerifyOtpCodeParamsWithContext creates a new VerifyOtpCodeParams object -// with the ability to set a context for a request. -func NewVerifyOtpCodeParamsWithContext(ctx context.Context) *VerifyOtpCodeParams { - return &VerifyOtpCodeParams{ - Context: ctx, - } -} - -// NewVerifyOtpCodeParamsWithHTTPClient creates a new VerifyOtpCodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewVerifyOtpCodeParamsWithHTTPClient(client *http.Client) *VerifyOtpCodeParams { - return &VerifyOtpCodeParams{ - HTTPClient: client, - } -} - -/* -VerifyOtpCodeParams contains all the parameters to send to the API endpoint - - for the verify otp code operation. - - Typically these are written to a http.Request. -*/ -type VerifyOtpCodeParams struct { - - /* Body. - - Request to verify OTP code. - */ - Body *models.VerifyOtpCodeParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the verify otp code params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *VerifyOtpCodeParams) WithDefaults() *VerifyOtpCodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the verify otp code params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *VerifyOtpCodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the verify otp code params -func (o *VerifyOtpCodeParams) WithTimeout(timeout time.Duration) *VerifyOtpCodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the verify otp code params -func (o *VerifyOtpCodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the verify otp code params -func (o *VerifyOtpCodeParams) WithContext(ctx context.Context) *VerifyOtpCodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the verify otp code params -func (o *VerifyOtpCodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the verify otp code params -func (o *VerifyOtpCodeParams) WithHTTPClient(client *http.Client) *VerifyOtpCodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the verify otp code params -func (o *VerifyOtpCodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the verify otp code params -func (o *VerifyOtpCodeParams) WithBody(body *models.VerifyOtpCodeParams) *VerifyOtpCodeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the verify otp code params -func (o *VerifyOtpCodeParams) SetBody(body *models.VerifyOtpCodeParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *VerifyOtpCodeParams) 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/principals/verify_otp_code_responses.go b/v1/client/principals/verify_otp_code_responses.go deleted file mode 100644 index 08636d8e..00000000 --- a/v1/client/principals/verify_otp_code_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package principals - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// VerifyOtpCodeReader is a Reader for the VerifyOtpCode structure. -type VerifyOtpCodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *VerifyOtpCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewVerifyOtpCodeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewVerifyOtpCodeDefault(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 - } -} - -// NewVerifyOtpCodeOK creates a VerifyOtpCodeOK with default headers values -func NewVerifyOtpCodeOK() *VerifyOtpCodeOK { - return &VerifyOtpCodeOK{} -} - -/* -VerifyOtpCodeOK describes a response with status code 200, with default header values. - -Success -*/ -type VerifyOtpCodeOK struct { - Payload *models.SessionUser -} - -// IsSuccess returns true when this verify otp code o k response has a 2xx status code -func (o *VerifyOtpCodeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this verify otp code o k response has a 3xx status code -func (o *VerifyOtpCodeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this verify otp code o k response has a 4xx status code -func (o *VerifyOtpCodeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this verify otp code o k response has a 5xx status code -func (o *VerifyOtpCodeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this verify otp code o k response a status code equal to that given -func (o *VerifyOtpCodeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the verify otp code o k response -func (o *VerifyOtpCodeOK) Code() int { - return 200 -} - -func (o *VerifyOtpCodeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/verify-otp][%d] verifyOtpCodeOK %s", 200, payload) -} - -func (o *VerifyOtpCodeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/verify-otp][%d] verifyOtpCodeOK %s", 200, payload) -} - -func (o *VerifyOtpCodeOK) GetPayload() *models.SessionUser { - return o.Payload -} - -func (o *VerifyOtpCodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SessionUser) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewVerifyOtpCodeDefault creates a VerifyOtpCodeDefault with default headers values -func NewVerifyOtpCodeDefault(code int) *VerifyOtpCodeDefault { - return &VerifyOtpCodeDefault{ - _statusCode: code, - } -} - -/* -VerifyOtpCodeDefault describes a response with status code -1, with default header values. - -Error -*/ -type VerifyOtpCodeDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this verify otp code default response has a 2xx status code -func (o *VerifyOtpCodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this verify otp code default response has a 3xx status code -func (o *VerifyOtpCodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this verify otp code default response has a 4xx status code -func (o *VerifyOtpCodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this verify otp code default response has a 5xx status code -func (o *VerifyOtpCodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this verify otp code default response a status code equal to that given -func (o *VerifyOtpCodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the verify otp code default response -func (o *VerifyOtpCodeDefault) Code() int { - return o._statusCode -} - -func (o *VerifyOtpCodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/verify-otp][%d] VerifyOtpCode default %s", o._statusCode, payload) -} - -func (o *VerifyOtpCodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/verify-otp][%d] VerifyOtpCode default %s", o._statusCode, payload) -} - -func (o *VerifyOtpCodeDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *VerifyOtpCodeDefault) 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/privileges/get_privileges_parameters.go b/v1/client/privileges/get_privileges_parameters.go deleted file mode 100644 index d7a923b8..00000000 --- a/v1/client/privileges/get_privileges_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privileges - -// 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" -) - -// NewGetPrivilegesParams creates a new GetPrivilegesParams 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 NewGetPrivilegesParams() *GetPrivilegesParams { - return &GetPrivilegesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPrivilegesParamsWithTimeout creates a new GetPrivilegesParams object -// with the ability to set a timeout on a request. -func NewGetPrivilegesParamsWithTimeout(timeout time.Duration) *GetPrivilegesParams { - return &GetPrivilegesParams{ - timeout: timeout, - } -} - -// NewGetPrivilegesParamsWithContext creates a new GetPrivilegesParams object -// with the ability to set a context for a request. -func NewGetPrivilegesParamsWithContext(ctx context.Context) *GetPrivilegesParams { - return &GetPrivilegesParams{ - Context: ctx, - } -} - -// NewGetPrivilegesParamsWithHTTPClient creates a new GetPrivilegesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPrivilegesParamsWithHTTPClient(client *http.Client) *GetPrivilegesParams { - return &GetPrivilegesParams{ - HTTPClient: client, - } -} - -/* -GetPrivilegesParams contains all the parameters to send to the API endpoint - - for the get privileges operation. - - Typically these are written to a http.Request. -*/ -type GetPrivilegesParams struct { - - /* Name. - - Specifies the name of the privilege. - */ - Name *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrivilegesParams) WithDefaults() *GetPrivilegesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrivilegesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get privileges params -func (o *GetPrivilegesParams) WithTimeout(timeout time.Duration) *GetPrivilegesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get privileges params -func (o *GetPrivilegesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get privileges params -func (o *GetPrivilegesParams) WithContext(ctx context.Context) *GetPrivilegesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get privileges params -func (o *GetPrivilegesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get privileges params -func (o *GetPrivilegesParams) WithHTTPClient(client *http.Client) *GetPrivilegesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get privileges params -func (o *GetPrivilegesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the get privileges params -func (o *GetPrivilegesParams) WithName(name *string) *GetPrivilegesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get privileges params -func (o *GetPrivilegesParams) SetName(name *string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPrivilegesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/privileges/get_privileges_responses.go b/v1/client/privileges/get_privileges_responses.go deleted file mode 100644 index 7b3f5bc9..00000000 --- a/v1/client/privileges/get_privileges_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privileges - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetPrivilegesReader is a Reader for the GetPrivileges structure. -type GetPrivilegesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPrivilegesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPrivilegesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPrivilegesDefault(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 - } -} - -// NewGetPrivilegesOK creates a GetPrivilegesOK with default headers values -func NewGetPrivilegesOK() *GetPrivilegesOK { - return &GetPrivilegesOK{} -} - -/* -GetPrivilegesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPrivilegesOK struct { - Payload []*models.PrivilegeInfo -} - -// IsSuccess returns true when this get privileges o k response has a 2xx status code -func (o *GetPrivilegesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get privileges o k response has a 3xx status code -func (o *GetPrivilegesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get privileges o k response has a 4xx status code -func (o *GetPrivilegesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get privileges o k response has a 5xx status code -func (o *GetPrivilegesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get privileges o k response a status code equal to that given -func (o *GetPrivilegesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get privileges o k response -func (o *GetPrivilegesOK) Code() int { - return 200 -} - -func (o *GetPrivilegesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/privileges][%d] getPrivilegesOK %s", 200, payload) -} - -func (o *GetPrivilegesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/privileges][%d] getPrivilegesOK %s", 200, payload) -} - -func (o *GetPrivilegesOK) GetPayload() []*models.PrivilegeInfo { - return o.Payload -} - -func (o *GetPrivilegesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPrivilegesDefault creates a GetPrivilegesDefault with default headers values -func NewGetPrivilegesDefault(code int) *GetPrivilegesDefault { - return &GetPrivilegesDefault{ - _statusCode: code, - } -} - -/* -GetPrivilegesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPrivilegesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get privileges default response has a 2xx status code -func (o *GetPrivilegesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get privileges default response has a 3xx status code -func (o *GetPrivilegesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get privileges default response has a 4xx status code -func (o *GetPrivilegesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get privileges default response has a 5xx status code -func (o *GetPrivilegesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get privileges default response a status code equal to that given -func (o *GetPrivilegesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get privileges default response -func (o *GetPrivilegesDefault) Code() int { - return o._statusCode -} - -func (o *GetPrivilegesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/privileges][%d] GetPrivileges default %s", o._statusCode, payload) -} - -func (o *GetPrivilegesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/privileges][%d] GetPrivileges default %s", o._statusCode, payload) -} - -func (o *GetPrivilegesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetPrivilegesDefault) 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/privileges/privileges_client.go b/v1/client/privileges/privileges_client.go deleted file mode 100644 index bbaffc45..00000000 --- a/v1/client/privileges/privileges_client.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privileges - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new privileges API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new privileges API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new privileges API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for privileges API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetPrivileges(params *GetPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrivilegesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetPrivileges lists the privileges defined on the cohesity cluster - - If the 'name' parameter is not specified, all privileges defined - -on the Cohesity Cluster are returned. -In addition, information about each privilege is returned such as the -associated category, description, name, etc. -If an exact privilege name (such as PRINCIPAL_VIEW) is specified in the -'name' parameter, only information about that single privilege is returned. -*/ -func (a *Client) GetPrivileges(params *GetPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrivilegesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPrivilegesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPrivileges", - Method: "GET", - PathPattern: "/public/privileges", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPrivilegesReader{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.(*GetPrivilegesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPrivilegesDefault) - 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/protection_jobs/change_protection_job_state_parameters.go b/v1/client/protection_jobs/change_protection_job_state_parameters.go deleted file mode 100644 index 348a8735..00000000 --- a/v1/client/protection_jobs/change_protection_job_state_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewChangeProtectionJobStateParams creates a new ChangeProtectionJobStateParams 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 NewChangeProtectionJobStateParams() *ChangeProtectionJobStateParams { - return &ChangeProtectionJobStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewChangeProtectionJobStateParamsWithTimeout creates a new ChangeProtectionJobStateParams object -// with the ability to set a timeout on a request. -func NewChangeProtectionJobStateParamsWithTimeout(timeout time.Duration) *ChangeProtectionJobStateParams { - return &ChangeProtectionJobStateParams{ - timeout: timeout, - } -} - -// NewChangeProtectionJobStateParamsWithContext creates a new ChangeProtectionJobStateParams object -// with the ability to set a context for a request. -func NewChangeProtectionJobStateParamsWithContext(ctx context.Context) *ChangeProtectionJobStateParams { - return &ChangeProtectionJobStateParams{ - Context: ctx, - } -} - -// NewChangeProtectionJobStateParamsWithHTTPClient creates a new ChangeProtectionJobStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewChangeProtectionJobStateParamsWithHTTPClient(client *http.Client) *ChangeProtectionJobStateParams { - return &ChangeProtectionJobStateParams{ - HTTPClient: client, - } -} - -/* -ChangeProtectionJobStateParams contains all the parameters to send to the API endpoint - - for the change protection job state operation. - - Typically these are written to a http.Request. -*/ -type ChangeProtectionJobStateParams struct { - - // Body. - Body *models.ChangeProtectionJobStateParam - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the change protection job state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeProtectionJobStateParams) WithDefaults() *ChangeProtectionJobStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the change protection job state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeProtectionJobStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the change protection job state params -func (o *ChangeProtectionJobStateParams) WithTimeout(timeout time.Duration) *ChangeProtectionJobStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the change protection job state params -func (o *ChangeProtectionJobStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the change protection job state params -func (o *ChangeProtectionJobStateParams) WithContext(ctx context.Context) *ChangeProtectionJobStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the change protection job state params -func (o *ChangeProtectionJobStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the change protection job state params -func (o *ChangeProtectionJobStateParams) WithHTTPClient(client *http.Client) *ChangeProtectionJobStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the change protection job state params -func (o *ChangeProtectionJobStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the change protection job state params -func (o *ChangeProtectionJobStateParams) WithBody(body *models.ChangeProtectionJobStateParam) *ChangeProtectionJobStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the change protection job state params -func (o *ChangeProtectionJobStateParams) SetBody(body *models.ChangeProtectionJobStateParam) { - o.Body = body -} - -// WithID adds the id to the change protection job state params -func (o *ChangeProtectionJobStateParams) WithID(id int64) *ChangeProtectionJobStateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the change protection job state params -func (o *ChangeProtectionJobStateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ChangeProtectionJobStateParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/change_protection_job_state_responses.go b/v1/client/protection_jobs/change_protection_job_state_responses.go deleted file mode 100644 index 65b880f6..00000000 --- a/v1/client/protection_jobs/change_protection_job_state_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ChangeProtectionJobStateReader is a Reader for the ChangeProtectionJobState structure. -type ChangeProtectionJobStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ChangeProtectionJobStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewChangeProtectionJobStateNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewChangeProtectionJobStateDefault(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 - } -} - -// NewChangeProtectionJobStateNoContent creates a ChangeProtectionJobStateNoContent with default headers values -func NewChangeProtectionJobStateNoContent() *ChangeProtectionJobStateNoContent { - return &ChangeProtectionJobStateNoContent{} -} - -/* -ChangeProtectionJobStateNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ChangeProtectionJobStateNoContent struct { -} - -// IsSuccess returns true when this change protection job state no content response has a 2xx status code -func (o *ChangeProtectionJobStateNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this change protection job state no content response has a 3xx status code -func (o *ChangeProtectionJobStateNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this change protection job state no content response has a 4xx status code -func (o *ChangeProtectionJobStateNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this change protection job state no content response has a 5xx status code -func (o *ChangeProtectionJobStateNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this change protection job state no content response a status code equal to that given -func (o *ChangeProtectionJobStateNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the change protection job state no content response -func (o *ChangeProtectionJobStateNoContent) Code() int { - return 204 -} - -func (o *ChangeProtectionJobStateNoContent) Error() string { - return fmt.Sprintf("[POST /public/protectionJobState/{id}][%d] changeProtectionJobStateNoContent", 204) -} - -func (o *ChangeProtectionJobStateNoContent) String() string { - return fmt.Sprintf("[POST /public/protectionJobState/{id}][%d] changeProtectionJobStateNoContent", 204) -} - -func (o *ChangeProtectionJobStateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewChangeProtectionJobStateDefault creates a ChangeProtectionJobStateDefault with default headers values -func NewChangeProtectionJobStateDefault(code int) *ChangeProtectionJobStateDefault { - return &ChangeProtectionJobStateDefault{ - _statusCode: code, - } -} - -/* -ChangeProtectionJobStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type ChangeProtectionJobStateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this change protection job state default response has a 2xx status code -func (o *ChangeProtectionJobStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this change protection job state default response has a 3xx status code -func (o *ChangeProtectionJobStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this change protection job state default response has a 4xx status code -func (o *ChangeProtectionJobStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this change protection job state default response has a 5xx status code -func (o *ChangeProtectionJobStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this change protection job state default response a status code equal to that given -func (o *ChangeProtectionJobStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the change protection job state default response -func (o *ChangeProtectionJobStateDefault) Code() int { - return o._statusCode -} - -func (o *ChangeProtectionJobStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobState/{id}][%d] ChangeProtectionJobState default %s", o._statusCode, payload) -} - -func (o *ChangeProtectionJobStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobState/{id}][%d] ChangeProtectionJobState default %s", o._statusCode, payload) -} - -func (o *ChangeProtectionJobStateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ChangeProtectionJobStateDefault) 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/create_protection_job_parameters.go b/v1/client/protection_jobs/create_protection_job_parameters.go deleted file mode 100644 index d06285de..00000000 --- a/v1/client/protection_jobs/create_protection_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateProtectionJobParams creates a new CreateProtectionJobParams 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 NewCreateProtectionJobParams() *CreateProtectionJobParams { - return &CreateProtectionJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateProtectionJobParamsWithTimeout creates a new CreateProtectionJobParams object -// with the ability to set a timeout on a request. -func NewCreateProtectionJobParamsWithTimeout(timeout time.Duration) *CreateProtectionJobParams { - return &CreateProtectionJobParams{ - timeout: timeout, - } -} - -// NewCreateProtectionJobParamsWithContext creates a new CreateProtectionJobParams object -// with the ability to set a context for a request. -func NewCreateProtectionJobParamsWithContext(ctx context.Context) *CreateProtectionJobParams { - return &CreateProtectionJobParams{ - Context: ctx, - } -} - -// NewCreateProtectionJobParamsWithHTTPClient creates a new CreateProtectionJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateProtectionJobParamsWithHTTPClient(client *http.Client) *CreateProtectionJobParams { - return &CreateProtectionJobParams{ - HTTPClient: client, - } -} - -/* -CreateProtectionJobParams contains all the parameters to send to the API endpoint - - for the create protection job operation. - - Typically these are written to a http.Request. -*/ -type CreateProtectionJobParams struct { - - /* Body. - - Request to create a Protection Job. - */ - Body *models.ProtectionJobRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionJobParams) WithDefaults() *CreateProtectionJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create protection job params -func (o *CreateProtectionJobParams) WithTimeout(timeout time.Duration) *CreateProtectionJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create protection job params -func (o *CreateProtectionJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create protection job params -func (o *CreateProtectionJobParams) WithContext(ctx context.Context) *CreateProtectionJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create protection job params -func (o *CreateProtectionJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create protection job params -func (o *CreateProtectionJobParams) WithHTTPClient(client *http.Client) *CreateProtectionJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create protection job params -func (o *CreateProtectionJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create protection job params -func (o *CreateProtectionJobParams) WithBody(body *models.ProtectionJobRequestBody) *CreateProtectionJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create protection job params -func (o *CreateProtectionJobParams) SetBody(body *models.ProtectionJobRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateProtectionJobParams) 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/protection_jobs/create_protection_job_responses.go b/v1/client/protection_jobs/create_protection_job_responses.go deleted file mode 100644 index 7cf147d6..00000000 --- a/v1/client/protection_jobs/create_protection_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateProtectionJobReader is a Reader for the CreateProtectionJob structure. -type CreateProtectionJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateProtectionJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateProtectionJobCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateProtectionJobDefault(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 - } -} - -// NewCreateProtectionJobCreated creates a CreateProtectionJobCreated with default headers values -func NewCreateProtectionJobCreated() *CreateProtectionJobCreated { - return &CreateProtectionJobCreated{} -} - -/* -CreateProtectionJobCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateProtectionJobCreated struct { - Payload *models.ProtectionJob -} - -// IsSuccess returns true when this create protection job created response has a 2xx status code -func (o *CreateProtectionJobCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create protection job created response has a 3xx status code -func (o *CreateProtectionJobCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create protection job created response has a 4xx status code -func (o *CreateProtectionJobCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create protection job created response has a 5xx status code -func (o *CreateProtectionJobCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create protection job created response a status code equal to that given -func (o *CreateProtectionJobCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create protection job created response -func (o *CreateProtectionJobCreated) Code() int { - return 201 -} - -func (o *CreateProtectionJobCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs][%d] createProtectionJobCreated %s", 201, payload) -} - -func (o *CreateProtectionJobCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs][%d] createProtectionJobCreated %s", 201, payload) -} - -func (o *CreateProtectionJobCreated) GetPayload() *models.ProtectionJob { - return o.Payload -} - -func (o *CreateProtectionJobCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateProtectionJobDefault creates a CreateProtectionJobDefault with default headers values -func NewCreateProtectionJobDefault(code int) *CreateProtectionJobDefault { - return &CreateProtectionJobDefault{ - _statusCode: code, - } -} - -/* -CreateProtectionJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateProtectionJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create protection job default response has a 2xx status code -func (o *CreateProtectionJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create protection job default response has a 3xx status code -func (o *CreateProtectionJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create protection job default response has a 4xx status code -func (o *CreateProtectionJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create protection job default response has a 5xx status code -func (o *CreateProtectionJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create protection job default response a status code equal to that given -func (o *CreateProtectionJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create protection job default response -func (o *CreateProtectionJobDefault) Code() int { - return o._statusCode -} - -func (o *CreateProtectionJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs][%d] CreateProtectionJob default %s", o._statusCode, payload) -} - -func (o *CreateProtectionJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs][%d] CreateProtectionJob default %s", o._statusCode, payload) -} - -func (o *CreateProtectionJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateProtectionJobDefault) 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/delete_protection_job_parameters.go b/v1/client/protection_jobs/delete_protection_job_parameters.go deleted file mode 100644 index 904ab6ce..00000000 --- a/v1/client/protection_jobs/delete_protection_job_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteProtectionJobParams creates a new DeleteProtectionJobParams 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 NewDeleteProtectionJobParams() *DeleteProtectionJobParams { - return &DeleteProtectionJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteProtectionJobParamsWithTimeout creates a new DeleteProtectionJobParams object -// with the ability to set a timeout on a request. -func NewDeleteProtectionJobParamsWithTimeout(timeout time.Duration) *DeleteProtectionJobParams { - return &DeleteProtectionJobParams{ - timeout: timeout, - } -} - -// NewDeleteProtectionJobParamsWithContext creates a new DeleteProtectionJobParams object -// with the ability to set a context for a request. -func NewDeleteProtectionJobParamsWithContext(ctx context.Context) *DeleteProtectionJobParams { - return &DeleteProtectionJobParams{ - Context: ctx, - } -} - -// NewDeleteProtectionJobParamsWithHTTPClient creates a new DeleteProtectionJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteProtectionJobParamsWithHTTPClient(client *http.Client) *DeleteProtectionJobParams { - return &DeleteProtectionJobParams{ - HTTPClient: client, - } -} - -/* -DeleteProtectionJobParams contains all the parameters to send to the API endpoint - - for the delete protection job operation. - - Typically these are written to a http.Request. -*/ -type DeleteProtectionJobParams struct { - - /* Body. - - Request to delete a protection job. - */ - Body *models.DeleteProtectionJobParam - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionJobParams) WithDefaults() *DeleteProtectionJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete protection job params -func (o *DeleteProtectionJobParams) WithTimeout(timeout time.Duration) *DeleteProtectionJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete protection job params -func (o *DeleteProtectionJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete protection job params -func (o *DeleteProtectionJobParams) WithContext(ctx context.Context) *DeleteProtectionJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete protection job params -func (o *DeleteProtectionJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete protection job params -func (o *DeleteProtectionJobParams) WithHTTPClient(client *http.Client) *DeleteProtectionJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete protection job params -func (o *DeleteProtectionJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete protection job params -func (o *DeleteProtectionJobParams) WithBody(body *models.DeleteProtectionJobParam) *DeleteProtectionJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete protection job params -func (o *DeleteProtectionJobParams) SetBody(body *models.DeleteProtectionJobParam) { - o.Body = body -} - -// WithID adds the id to the delete protection job params -func (o *DeleteProtectionJobParams) WithID(id int64) *DeleteProtectionJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete protection job params -func (o *DeleteProtectionJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteProtectionJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/delete_protection_job_responses.go b/v1/client/protection_jobs/delete_protection_job_responses.go deleted file mode 100644 index 33e5973d..00000000 --- a/v1/client/protection_jobs/delete_protection_job_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteProtectionJobReader is a Reader for the DeleteProtectionJob structure. -type DeleteProtectionJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteProtectionJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteProtectionJobNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteProtectionJobDefault(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 - } -} - -// NewDeleteProtectionJobNoContent creates a DeleteProtectionJobNoContent with default headers values -func NewDeleteProtectionJobNoContent() *DeleteProtectionJobNoContent { - return &DeleteProtectionJobNoContent{} -} - -/* -DeleteProtectionJobNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteProtectionJobNoContent struct { -} - -// IsSuccess returns true when this delete protection job no content response has a 2xx status code -func (o *DeleteProtectionJobNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete protection job no content response has a 3xx status code -func (o *DeleteProtectionJobNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete protection job no content response has a 4xx status code -func (o *DeleteProtectionJobNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete protection job no content response has a 5xx status code -func (o *DeleteProtectionJobNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete protection job no content response a status code equal to that given -func (o *DeleteProtectionJobNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete protection job no content response -func (o *DeleteProtectionJobNoContent) Code() int { - return 204 -} - -func (o *DeleteProtectionJobNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/protectionJobs/{id}][%d] deleteProtectionJobNoContent", 204) -} - -func (o *DeleteProtectionJobNoContent) String() string { - return fmt.Sprintf("[DELETE /public/protectionJobs/{id}][%d] deleteProtectionJobNoContent", 204) -} - -func (o *DeleteProtectionJobNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteProtectionJobDefault creates a DeleteProtectionJobDefault with default headers values -func NewDeleteProtectionJobDefault(code int) *DeleteProtectionJobDefault { - return &DeleteProtectionJobDefault{ - _statusCode: code, - } -} - -/* -DeleteProtectionJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteProtectionJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete protection job default response has a 2xx status code -func (o *DeleteProtectionJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete protection job default response has a 3xx status code -func (o *DeleteProtectionJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete protection job default response has a 4xx status code -func (o *DeleteProtectionJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete protection job default response has a 5xx status code -func (o *DeleteProtectionJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete protection job default response a status code equal to that given -func (o *DeleteProtectionJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete protection job default response -func (o *DeleteProtectionJobDefault) Code() int { - return o._statusCode -} - -func (o *DeleteProtectionJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionJobs/{id}][%d] DeleteProtectionJob default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionJobs/{id}][%d] DeleteProtectionJob default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteProtectionJobDefault) 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_job_audit_parameters.go b/v1/client/protection_jobs/get_protection_job_audit_parameters.go deleted file mode 100644 index 91c7509a..00000000 --- a/v1/client/protection_jobs/get_protection_job_audit_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" -) - -// NewGetProtectionJobAuditParams creates a new GetProtectionJobAuditParams 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 NewGetProtectionJobAuditParams() *GetProtectionJobAuditParams { - return &GetProtectionJobAuditParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionJobAuditParamsWithTimeout creates a new GetProtectionJobAuditParams object -// with the ability to set a timeout on a request. -func NewGetProtectionJobAuditParamsWithTimeout(timeout time.Duration) *GetProtectionJobAuditParams { - return &GetProtectionJobAuditParams{ - timeout: timeout, - } -} - -// NewGetProtectionJobAuditParamsWithContext creates a new GetProtectionJobAuditParams object -// with the ability to set a context for a request. -func NewGetProtectionJobAuditParamsWithContext(ctx context.Context) *GetProtectionJobAuditParams { - return &GetProtectionJobAuditParams{ - Context: ctx, - } -} - -// NewGetProtectionJobAuditParamsWithHTTPClient creates a new GetProtectionJobAuditParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionJobAuditParamsWithHTTPClient(client *http.Client) *GetProtectionJobAuditParams { - return &GetProtectionJobAuditParams{ - HTTPClient: client, - } -} - -/* -GetProtectionJobAuditParams contains all the parameters to send to the API endpoint - - for the get protection job audit operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionJobAuditParams struct { - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection job audit params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobAuditParams) WithDefaults() *GetProtectionJobAuditParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection job audit params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobAuditParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection job audit params -func (o *GetProtectionJobAuditParams) WithTimeout(timeout time.Duration) *GetProtectionJobAuditParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection job audit params -func (o *GetProtectionJobAuditParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection job audit params -func (o *GetProtectionJobAuditParams) WithContext(ctx context.Context) *GetProtectionJobAuditParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection job audit params -func (o *GetProtectionJobAuditParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection job audit params -func (o *GetProtectionJobAuditParams) WithHTTPClient(client *http.Client) *GetProtectionJobAuditParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection job audit params -func (o *GetProtectionJobAuditParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection job audit params -func (o *GetProtectionJobAuditParams) WithID(id int64) *GetProtectionJobAuditParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection job audit params -func (o *GetProtectionJobAuditParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionJobAuditParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/get_protection_job_audit_responses.go b/v1/client/protection_jobs/get_protection_job_audit_responses.go deleted file mode 100644 index d359ece4..00000000 --- a/v1/client/protection_jobs/get_protection_job_audit_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionJobAuditReader is a Reader for the GetProtectionJobAudit structure. -type GetProtectionJobAuditReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionJobAuditReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionJobAuditOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionJobAuditDefault(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 - } -} - -// NewGetProtectionJobAuditOK creates a GetProtectionJobAuditOK with default headers values -func NewGetProtectionJobAuditOK() *GetProtectionJobAuditOK { - return &GetProtectionJobAuditOK{} -} - -/* -GetProtectionJobAuditOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionJobAuditOK struct { - Payload []*models.ProtectionJobAuditTrail -} - -// IsSuccess returns true when this get protection job audit o k response has a 2xx status code -func (o *GetProtectionJobAuditOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection job audit o k response has a 3xx status code -func (o *GetProtectionJobAuditOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection job audit o k response has a 4xx status code -func (o *GetProtectionJobAuditOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection job audit o k response has a 5xx status code -func (o *GetProtectionJobAuditOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection job audit o k response a status code equal to that given -func (o *GetProtectionJobAuditOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection job audit o k response -func (o *GetProtectionJobAuditOK) Code() int { - return 200 -} - -func (o *GetProtectionJobAuditOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}/auditTrail][%d] getProtectionJobAuditOK %s", 200, payload) -} - -func (o *GetProtectionJobAuditOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}/auditTrail][%d] getProtectionJobAuditOK %s", 200, payload) -} - -func (o *GetProtectionJobAuditOK) GetPayload() []*models.ProtectionJobAuditTrail { - return o.Payload -} - -func (o *GetProtectionJobAuditOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionJobAuditDefault creates a GetProtectionJobAuditDefault with default headers values -func NewGetProtectionJobAuditDefault(code int) *GetProtectionJobAuditDefault { - return &GetProtectionJobAuditDefault{ - _statusCode: code, - } -} - -/* -GetProtectionJobAuditDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionJobAuditDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection job audit default response has a 2xx status code -func (o *GetProtectionJobAuditDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection job audit default response has a 3xx status code -func (o *GetProtectionJobAuditDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection job audit default response has a 4xx status code -func (o *GetProtectionJobAuditDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection job audit default response has a 5xx status code -func (o *GetProtectionJobAuditDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection job audit default response a status code equal to that given -func (o *GetProtectionJobAuditDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection job audit default response -func (o *GetProtectionJobAuditDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionJobAuditDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}/auditTrail][%d] GetProtectionJobAudit default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobAuditDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}/auditTrail][%d] GetProtectionJobAudit default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobAuditDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionJobAuditDefault) 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_job_by_id_parameters.go b/v1/client/protection_jobs/get_protection_job_by_id_parameters.go deleted file mode 100644 index fac51c40..00000000 --- a/v1/client/protection_jobs/get_protection_job_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" -) - -// NewGetProtectionJobByIDParams creates a new GetProtectionJobByIDParams 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 NewGetProtectionJobByIDParams() *GetProtectionJobByIDParams { - return &GetProtectionJobByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionJobByIDParamsWithTimeout creates a new GetProtectionJobByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectionJobByIDParamsWithTimeout(timeout time.Duration) *GetProtectionJobByIDParams { - return &GetProtectionJobByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectionJobByIDParamsWithContext creates a new GetProtectionJobByIDParams object -// with the ability to set a context for a request. -func NewGetProtectionJobByIDParamsWithContext(ctx context.Context) *GetProtectionJobByIDParams { - return &GetProtectionJobByIDParams{ - Context: ctx, - } -} - -// NewGetProtectionJobByIDParamsWithHTTPClient creates a new GetProtectionJobByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionJobByIDParamsWithHTTPClient(client *http.Client) *GetProtectionJobByIDParams { - return &GetProtectionJobByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectionJobByIDParams contains all the parameters to send to the API endpoint - - for the get protection job by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionJobByIDParams struct { - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobByIDParams) WithDefaults() *GetProtectionJobByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection job by Id params -func (o *GetProtectionJobByIDParams) WithTimeout(timeout time.Duration) *GetProtectionJobByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection job by Id params -func (o *GetProtectionJobByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection job by Id params -func (o *GetProtectionJobByIDParams) WithContext(ctx context.Context) *GetProtectionJobByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection job by Id params -func (o *GetProtectionJobByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection job by Id params -func (o *GetProtectionJobByIDParams) WithHTTPClient(client *http.Client) *GetProtectionJobByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection job by Id params -func (o *GetProtectionJobByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection job by Id params -func (o *GetProtectionJobByIDParams) WithID(id int64) *GetProtectionJobByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection job by Id params -func (o *GetProtectionJobByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionJobByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/get_protection_job_by_id_responses.go b/v1/client/protection_jobs/get_protection_job_by_id_responses.go deleted file mode 100644 index 2642b3b8..00000000 --- a/v1/client/protection_jobs/get_protection_job_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionJobByIDReader is a Reader for the GetProtectionJobByID structure. -type GetProtectionJobByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionJobByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionJobByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionJobByIDDefault(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 - } -} - -// NewGetProtectionJobByIDOK creates a GetProtectionJobByIDOK with default headers values -func NewGetProtectionJobByIDOK() *GetProtectionJobByIDOK { - return &GetProtectionJobByIDOK{} -} - -/* -GetProtectionJobByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionJobByIDOK struct { - Payload *models.ProtectionJob -} - -// IsSuccess returns true when this get protection job by Id o k response has a 2xx status code -func (o *GetProtectionJobByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection job by Id o k response has a 3xx status code -func (o *GetProtectionJobByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection job by Id o k response has a 4xx status code -func (o *GetProtectionJobByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection job by Id o k response has a 5xx status code -func (o *GetProtectionJobByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection job by Id o k response a status code equal to that given -func (o *GetProtectionJobByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection job by Id o k response -func (o *GetProtectionJobByIDOK) Code() int { - return 200 -} - -func (o *GetProtectionJobByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}][%d] getProtectionJobByIdOK %s", 200, payload) -} - -func (o *GetProtectionJobByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}][%d] getProtectionJobByIdOK %s", 200, payload) -} - -func (o *GetProtectionJobByIDOK) GetPayload() *models.ProtectionJob { - return o.Payload -} - -func (o *GetProtectionJobByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionJobByIDDefault creates a GetProtectionJobByIDDefault with default headers values -func NewGetProtectionJobByIDDefault(code int) *GetProtectionJobByIDDefault { - return &GetProtectionJobByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectionJobByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionJobByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection job by Id default response has a 2xx status code -func (o *GetProtectionJobByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection job by Id default response has a 3xx status code -func (o *GetProtectionJobByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection job by Id default response has a 4xx status code -func (o *GetProtectionJobByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection job by Id default response has a 5xx status code -func (o *GetProtectionJobByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection job by Id default response a status code equal to that given -func (o *GetProtectionJobByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection job by Id default response -func (o *GetProtectionJobByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionJobByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}][%d] GetProtectionJobById default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs/{id}][%d] GetProtectionJobById default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionJobByIDDefault) 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 deleted file mode 100644 index b13335ff..00000000 --- a/v1/client/protection_jobs/get_protection_jobs_parameters.go +++ /dev/null @@ -1,720 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" -) - -// NewGetProtectionJobsParams creates a new GetProtectionJobsParams 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 NewGetProtectionJobsParams() *GetProtectionJobsParams { - return &GetProtectionJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionJobsParamsWithTimeout creates a new GetProtectionJobsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionJobsParamsWithTimeout(timeout time.Duration) *GetProtectionJobsParams { - return &GetProtectionJobsParams{ - timeout: timeout, - } -} - -// NewGetProtectionJobsParamsWithContext creates a new GetProtectionJobsParams object -// with the ability to set a context for a request. -func NewGetProtectionJobsParamsWithContext(ctx context.Context) *GetProtectionJobsParams { - return &GetProtectionJobsParams{ - Context: ctx, - } -} - -// NewGetProtectionJobsParamsWithHTTPClient creates a new GetProtectionJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionJobsParamsWithHTTPClient(client *http.Client) *GetProtectionJobsParams { - return &GetProtectionJobsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionJobsParams contains all the parameters to send to the API endpoint - - for the get protection jobs operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionJobsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. - Only Jobs protecting the specified environment types are returned. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* Ids. - - Filter by a list of Protection Job ids. - */ - Ids []int64 - - /* IncludeLastRunAndStats. - - If true, return the last Protection Run of the Job and the summary stats. - */ - IncludeLastRunAndStats *bool - - /* IncludeRpoSnapshots. - - If true, then the Protected Objects protected by RPO policies will also - be returned. - */ - IncludeRpoSnapshots *bool - - /* IncludeSourceNames. - - If true, both names and ids of Sources inside the protection group will be - sent in the response. - If false, only Source ids will be sent in the response. - */ - IncludeSourceNames *bool - - /* IsActive. - - Filter by Inactive or Active Jobs. If not set, all Inactive and - Active Jobs are returned. If true, only Active Jobs are returned. - If false, only Inactive Jobs are returned. - When you create a Protection Job on a Primary Cluster - with a replication schedule, the Cluster creates an - Inactive copy of the Job on the Remote Cluster. - In addition, when an Active and running Job is deactivated, - the Job becomes Inactive. - */ - IsActive *bool - - /* IsDeleted. - - If true, return only Protection Jobs that have been deleted but still - have Snapshots associated with them. - If false, return all Protection Jobs except those Jobs that have - been deleted and still have Snapshots associated with them. - A Job that is deleted with all its Snapshots is not returned for - either of these cases. - */ - IsDeleted *bool - - /* IsLastRunSLAViolated. - - IsLastRunSlaViolated is the parameter to filter the Protection Jobs based - on the SLA violation status of the last Protection Run. - */ - IsLastRunSLAViolated *bool - - /* Names. - - Filter by a list of Protection Job names. - */ - Names []string - - /* OnlyReturnBasicSummary. - - if true then only job descriptions and the most recent run of the job - will be returned. - */ - OnlyReturnBasicSummary *bool - - /* OnlyReturnDataMigrationJobs. - - OnlyReturnDataMigrationJobs specifies if only data migration jobs should be - returned. If not set, no data migration job will be returned. - */ - OnlyReturnDataMigrationJobs *bool - - /* PolicyIds. - - Filter by Policy ids that are associated with Protection Jobs. - Only Jobs associated with the specified Policy ids, are returned. - */ - PolicyIds []string - - /* PruneExcludedSourceIds. - - If true, the list of exclusion sources will be omitted from the response. - This can be used to improve performance when the exclusion sources are - not needed. - */ - PruneExcludedSourceIds *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobsParams) WithDefaults() *GetProtectionJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection jobs params -func (o *GetProtectionJobsParams) WithTimeout(timeout time.Duration) *GetProtectionJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection jobs params -func (o *GetProtectionJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection jobs params -func (o *GetProtectionJobsParams) WithContext(ctx context.Context) *GetProtectionJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection jobs params -func (o *GetProtectionJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection jobs params -func (o *GetProtectionJobsParams) WithHTTPClient(client *http.Client) *GetProtectionJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection jobs params -func (o *GetProtectionJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get protection jobs params -func (o *GetProtectionJobsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetProtectionJobsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get protection jobs params -func (o *GetProtectionJobsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEnvironments adds the environments to the get protection jobs params -func (o *GetProtectionJobsParams) WithEnvironments(environments []string) *GetProtectionJobsParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protection jobs params -func (o *GetProtectionJobsParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIds adds the ids to the get protection jobs params -func (o *GetProtectionJobsParams) WithIds(ids []int64) *GetProtectionJobsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get protection jobs params -func (o *GetProtectionJobsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeLastRunAndStats adds the includeLastRunAndStats to the get protection jobs params -func (o *GetProtectionJobsParams) WithIncludeLastRunAndStats(includeLastRunAndStats *bool) *GetProtectionJobsParams { - o.SetIncludeLastRunAndStats(includeLastRunAndStats) - return o -} - -// SetIncludeLastRunAndStats adds the includeLastRunAndStats to the get protection jobs params -func (o *GetProtectionJobsParams) SetIncludeLastRunAndStats(includeLastRunAndStats *bool) { - o.IncludeLastRunAndStats = includeLastRunAndStats -} - -// WithIncludeRpoSnapshots adds the includeRpoSnapshots to the get protection jobs params -func (o *GetProtectionJobsParams) WithIncludeRpoSnapshots(includeRpoSnapshots *bool) *GetProtectionJobsParams { - o.SetIncludeRpoSnapshots(includeRpoSnapshots) - return o -} - -// SetIncludeRpoSnapshots adds the includeRpoSnapshots to the get protection jobs params -func (o *GetProtectionJobsParams) SetIncludeRpoSnapshots(includeRpoSnapshots *bool) { - o.IncludeRpoSnapshots = includeRpoSnapshots -} - -// WithIncludeSourceNames adds the includeSourceNames to the get protection jobs params -func (o *GetProtectionJobsParams) WithIncludeSourceNames(includeSourceNames *bool) *GetProtectionJobsParams { - o.SetIncludeSourceNames(includeSourceNames) - return o -} - -// SetIncludeSourceNames adds the includeSourceNames to the get protection jobs params -func (o *GetProtectionJobsParams) SetIncludeSourceNames(includeSourceNames *bool) { - o.IncludeSourceNames = includeSourceNames -} - -// WithIsActive adds the isActive to the get protection jobs params -func (o *GetProtectionJobsParams) WithIsActive(isActive *bool) *GetProtectionJobsParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get protection jobs params -func (o *GetProtectionJobsParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsDeleted adds the isDeleted to the get protection jobs params -func (o *GetProtectionJobsParams) WithIsDeleted(isDeleted *bool) *GetProtectionJobsParams { - o.SetIsDeleted(isDeleted) - return o -} - -// SetIsDeleted adds the isDeleted to the get protection jobs params -func (o *GetProtectionJobsParams) SetIsDeleted(isDeleted *bool) { - o.IsDeleted = isDeleted -} - -// WithIsLastRunSLAViolated adds the isLastRunSLAViolated to the get protection jobs params -func (o *GetProtectionJobsParams) WithIsLastRunSLAViolated(isLastRunSLAViolated *bool) *GetProtectionJobsParams { - o.SetIsLastRunSLAViolated(isLastRunSLAViolated) - return o -} - -// SetIsLastRunSLAViolated adds the isLastRunSlaViolated to the get protection jobs params -func (o *GetProtectionJobsParams) SetIsLastRunSLAViolated(isLastRunSLAViolated *bool) { - o.IsLastRunSLAViolated = isLastRunSLAViolated -} - -// WithNames adds the names to the get protection jobs params -func (o *GetProtectionJobsParams) WithNames(names []string) *GetProtectionJobsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get protection jobs params -func (o *GetProtectionJobsParams) SetNames(names []string) { - o.Names = names -} - -// WithOnlyReturnBasicSummary adds the onlyReturnBasicSummary to the get protection jobs params -func (o *GetProtectionJobsParams) WithOnlyReturnBasicSummary(onlyReturnBasicSummary *bool) *GetProtectionJobsParams { - o.SetOnlyReturnBasicSummary(onlyReturnBasicSummary) - return o -} - -// SetOnlyReturnBasicSummary adds the onlyReturnBasicSummary to the get protection jobs params -func (o *GetProtectionJobsParams) SetOnlyReturnBasicSummary(onlyReturnBasicSummary *bool) { - o.OnlyReturnBasicSummary = onlyReturnBasicSummary -} - -// WithOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get protection jobs params -func (o *GetProtectionJobsParams) WithOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) *GetProtectionJobsParams { - o.SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs) - return o -} - -// SetOnlyReturnDataMigrationJobs adds the onlyReturnDataMigrationJobs to the get protection jobs params -func (o *GetProtectionJobsParams) SetOnlyReturnDataMigrationJobs(onlyReturnDataMigrationJobs *bool) { - o.OnlyReturnDataMigrationJobs = onlyReturnDataMigrationJobs -} - -// WithPolicyIds adds the policyIds to the get protection jobs params -func (o *GetProtectionJobsParams) WithPolicyIds(policyIds []string) *GetProtectionJobsParams { - o.SetPolicyIds(policyIds) - return o -} - -// SetPolicyIds adds the policyIds to the get protection jobs params -func (o *GetProtectionJobsParams) SetPolicyIds(policyIds []string) { - o.PolicyIds = policyIds -} - -// WithPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection jobs params -func (o *GetProtectionJobsParams) WithPruneExcludedSourceIds(pruneExcludedSourceIds *bool) *GetProtectionJobsParams { - o.SetPruneExcludedSourceIds(pruneExcludedSourceIds) - return o -} - -// SetPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection jobs params -func (o *GetProtectionJobsParams) SetPruneExcludedSourceIds(pruneExcludedSourceIds *bool) { - o.PruneExcludedSourceIds = pruneExcludedSourceIds -} - -// WithTenantIds adds the tenantIds to the get protection jobs params -func (o *GetProtectionJobsParams) WithTenantIds(tenantIds []string) *GetProtectionJobsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection jobs params -func (o *GetProtectionJobsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeLastRunAndStats != nil { - - // query param includeLastRunAndStats - var qrIncludeLastRunAndStats bool - - if o.IncludeLastRunAndStats != nil { - qrIncludeLastRunAndStats = *o.IncludeLastRunAndStats - } - qIncludeLastRunAndStats := swag.FormatBool(qrIncludeLastRunAndStats) - if qIncludeLastRunAndStats != "" { - - if err := r.SetQueryParam("includeLastRunAndStats", qIncludeLastRunAndStats); err != nil { - return err - } - } - } - - if o.IncludeRpoSnapshots != nil { - - // query param includeRpoSnapshots - var qrIncludeRpoSnapshots bool - - if o.IncludeRpoSnapshots != nil { - qrIncludeRpoSnapshots = *o.IncludeRpoSnapshots - } - qIncludeRpoSnapshots := swag.FormatBool(qrIncludeRpoSnapshots) - if qIncludeRpoSnapshots != "" { - - if err := r.SetQueryParam("includeRpoSnapshots", qIncludeRpoSnapshots); err != nil { - return err - } - } - } - - if o.IncludeSourceNames != nil { - - // query param includeSourceNames - var qrIncludeSourceNames bool - - if o.IncludeSourceNames != nil { - qrIncludeSourceNames = *o.IncludeSourceNames - } - qIncludeSourceNames := swag.FormatBool(qrIncludeSourceNames) - if qIncludeSourceNames != "" { - - if err := r.SetQueryParam("includeSourceNames", qIncludeSourceNames); err != nil { - return err - } - } - } - - if o.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsDeleted != nil { - - // query param isDeleted - var qrIsDeleted bool - - if o.IsDeleted != nil { - qrIsDeleted = *o.IsDeleted - } - qIsDeleted := swag.FormatBool(qrIsDeleted) - if qIsDeleted != "" { - - if err := r.SetQueryParam("isDeleted", qIsDeleted); err != nil { - return err - } - } - } - - if o.IsLastRunSLAViolated != nil { - - // query param isLastRunSlaViolated - var qrIsLastRunSLAViolated bool - - if o.IsLastRunSLAViolated != nil { - qrIsLastRunSLAViolated = *o.IsLastRunSLAViolated - } - qIsLastRunSLAViolated := swag.FormatBool(qrIsLastRunSLAViolated) - if qIsLastRunSLAViolated != "" { - - if err := r.SetQueryParam("isLastRunSlaViolated", qIsLastRunSLAViolated); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.OnlyReturnBasicSummary != nil { - - // query param onlyReturnBasicSummary - var qrOnlyReturnBasicSummary bool - - if o.OnlyReturnBasicSummary != nil { - qrOnlyReturnBasicSummary = *o.OnlyReturnBasicSummary - } - qOnlyReturnBasicSummary := swag.FormatBool(qrOnlyReturnBasicSummary) - if qOnlyReturnBasicSummary != "" { - - if err := r.SetQueryParam("onlyReturnBasicSummary", qOnlyReturnBasicSummary); err != nil { - return err - } - } - } - - if o.OnlyReturnDataMigrationJobs != nil { - - // query param onlyReturnDataMigrationJobs - var qrOnlyReturnDataMigrationJobs bool - - if o.OnlyReturnDataMigrationJobs != nil { - qrOnlyReturnDataMigrationJobs = *o.OnlyReturnDataMigrationJobs - } - qOnlyReturnDataMigrationJobs := swag.FormatBool(qrOnlyReturnDataMigrationJobs) - if qOnlyReturnDataMigrationJobs != "" { - - if err := r.SetQueryParam("onlyReturnDataMigrationJobs", qOnlyReturnDataMigrationJobs); err != nil { - return err - } - } - } - - if o.PolicyIds != nil { - - // binding items for policyIds - joinedPolicyIds := o.bindParamPolicyIds(reg) - - // query array param policyIds - if err := r.SetQueryParam("policyIds", joinedPolicyIds...); err != nil { - return err - } - } - - if o.PruneExcludedSourceIds != nil { - - // query param pruneExcludedSourceIds - var qrPruneExcludedSourceIds bool - - if o.PruneExcludedSourceIds != nil { - qrPruneExcludedSourceIds = *o.PruneExcludedSourceIds - } - qPruneExcludedSourceIds := swag.FormatBool(qrPruneExcludedSourceIds) - if qPruneExcludedSourceIds != "" { - - if err := r.SetQueryParam("pruneExcludedSourceIds", qPruneExcludedSourceIds); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionJobs binds the parameter environments -func (o *GetProtectionJobsParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectionJobs binds the parameter ids -func (o *GetProtectionJobsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetProtectionJobs binds the parameter names -func (o *GetProtectionJobsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetProtectionJobs binds the parameter policyIds -func (o *GetProtectionJobsParams) bindParamPolicyIds(formats strfmt.Registry) []string { - policyIdsIR := o.PolicyIds - - var policyIdsIC []string - for _, policyIdsIIR := range policyIdsIR { // explode []string - - policyIdsIIV := policyIdsIIR // string as string - policyIdsIC = append(policyIdsIC, policyIdsIIV) - } - - // items.CollectionFormat: "" - policyIdsIS := swag.JoinByFormat(policyIdsIC, "") - - return policyIdsIS -} - -// bindParamGetProtectionJobs binds the parameter tenantIds -func (o *GetProtectionJobsParams) 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/v1/client/protection_jobs/get_protection_jobs_responses.go b/v1/client/protection_jobs/get_protection_jobs_responses.go deleted file mode 100644 index 713ba521..00000000 --- a/v1/client/protection_jobs/get_protection_jobs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionJobsReader is a Reader for the GetProtectionJobs structure. -type GetProtectionJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionJobsDefault(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 - } -} - -// NewGetProtectionJobsOK creates a GetProtectionJobsOK with default headers values -func NewGetProtectionJobsOK() *GetProtectionJobsOK { - return &GetProtectionJobsOK{} -} - -/* -GetProtectionJobsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionJobsOK struct { - Payload []*models.ProtectionJob -} - -// IsSuccess returns true when this get protection jobs o k response has a 2xx status code -func (o *GetProtectionJobsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection jobs o k response has a 3xx status code -func (o *GetProtectionJobsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection jobs o k response has a 4xx status code -func (o *GetProtectionJobsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection jobs o k response has a 5xx status code -func (o *GetProtectionJobsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection jobs o k response a status code equal to that given -func (o *GetProtectionJobsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection jobs o k response -func (o *GetProtectionJobsOK) Code() int { - return 200 -} - -func (o *GetProtectionJobsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs][%d] getProtectionJobsOK %s", 200, payload) -} - -func (o *GetProtectionJobsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs][%d] getProtectionJobsOK %s", 200, payload) -} - -func (o *GetProtectionJobsOK) GetPayload() []*models.ProtectionJob { - return o.Payload -} - -func (o *GetProtectionJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionJobsDefault creates a GetProtectionJobsDefault with default headers values -func NewGetProtectionJobsDefault(code int) *GetProtectionJobsDefault { - return &GetProtectionJobsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionJobsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionJobsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection jobs default response has a 2xx status code -func (o *GetProtectionJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection jobs default response has a 3xx status code -func (o *GetProtectionJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection jobs default response has a 4xx status code -func (o *GetProtectionJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection jobs default response has a 5xx status code -func (o *GetProtectionJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection jobs default response a status code equal to that given -func (o *GetProtectionJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection jobs default response -func (o *GetProtectionJobsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs][%d] GetProtectionJobs default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionJobs][%d] GetProtectionJobs default %s", o._statusCode, payload) -} - -func (o *GetProtectionJobsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionJobsDefault) 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/protection_jobs_client.go b/v1/client/protection_jobs/protection_jobs_client.go deleted file mode 100644 index da99c349..00000000 --- a/v1/client/protection_jobs/protection_jobs_client.go +++ /dev/null @@ -1,469 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection jobs API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection jobs API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection jobs API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection jobs API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ChangeProtectionJobState(params *ChangeProtectionJobStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangeProtectionJobStateNoContent, error) - - CreateProtectionJob(params *CreateProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionJobCreated, error) - - DeleteProtectionJob(params *DeleteProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionJobNoContent, error) - - GetProtectionJobAudit(params *GetProtectionJobAuditParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobAuditOK, error) - - GetProtectionJobByID(params *GetProtectionJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobByIDOK, error) - - GetProtectionJobs(params *GetProtectionJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobsOK, error) - - RunProtectionJob(params *RunProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunProtectionJobNoContent, error) - - UpdateProtectionJob(params *UpdateProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionJobOK, error) - - UpdateProtectionJobsState(params *UpdateProtectionJobsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionJobsStateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - ChangeProtectionJobState pauses future runs or resume future runs of the specified protection job - - If the Protection Job is currently running (not paused) and true is passed in, - -this operation stops any new Runs of this Protection Job -from stating and executing. -However, any existing Runs that were already executing will continue to run. -If this Projection Job is paused and false is passed in, this operation -restores the Job to a running state and new Runs are started as defined -by the schedule in the Policy associated with the Job. - -Returns success if the paused state is changed. -*/ -func (a *Client) ChangeProtectionJobState(params *ChangeProtectionJobStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChangeProtectionJobStateNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewChangeProtectionJobStateParams() - } - op := &runtime.ClientOperation{ - ID: "ChangeProtectionJobState", - Method: "POST", - PathPattern: "/public/protectionJobState/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ChangeProtectionJobStateReader{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.(*ChangeProtectionJobStateNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ChangeProtectionJobStateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateProtectionJob creates a protection job - -Returns the created Protection Job. -*/ -func (a *Client) CreateProtectionJob(params *CreateProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionJobCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateProtectionJobParams() - } - op := &runtime.ClientOperation{ - ID: "CreateProtectionJob", - Method: "POST", - PathPattern: "/public/protectionJobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateProtectionJobReader{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.(*CreateProtectionJobCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateProtectionJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteProtectionJob deletes a protection job - -Returns Success if the Protection Job is deleted. -*/ -func (a *Client) DeleteProtectionJob(params *DeleteProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionJobNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteProtectionJobParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteProtectionJob", - Method: "DELETE", - PathPattern: "/public/protectionJobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteProtectionJobReader{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.(*DeleteProtectionJobNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteProtectionJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionJobAudit lists a protection job audit - -Returns the audit of specific protection job edit history. -*/ -func (a *Client) GetProtectionJobAudit(params *GetProtectionJobAuditParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobAuditOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionJobAuditParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionJobAudit", - Method: "GET", - PathPattern: "/public/protectionJobs/{id}/auditTrail", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionJobAuditReader{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.(*GetProtectionJobAuditOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionJobAuditDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionJobByID lists details about single protection job - -Returns the Protection Job corresponding to the specified Job id. -*/ -func (a *Client) GetProtectionJobByID(params *GetProtectionJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionJobByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionJobById", - Method: "GET", - PathPattern: "/public/protectionJobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionJobByIDReader{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.(*GetProtectionJobByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionJobByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionJobs lists protections jobs filtered by the specified parameters - - If no parameters are specified, all Protection Jobs currently - -on the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetProtectionJobs(params *GetProtectionJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionJobsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionJobsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionJobs", - Method: "GET", - PathPattern: "/public/protectionJobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionJobsReader{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.(*GetProtectionJobsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RunProtectionJob immediatelies execute a single protection job run - - Immediately execute a single Job Run and ignore the schedule defined - -in the Policy. -A Protection Policy associated with the Job may define up to three -backup run types: -1) Regular (CBT utilized), 2) Full (CBT not utilized) and 3) Log. -The passed in run type defines what type of backup is done by the Job Run. -The schedule defined in the Policy for the backup run type is ignored but -other settings such as the snapshot retention and retry settings are used. -Returns success if the Job Run starts. -*/ -func (a *Client) RunProtectionJob(params *RunProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunProtectionJobNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRunProtectionJobParams() - } - op := &runtime.ClientOperation{ - ID: "RunProtectionJob", - Method: "POST", - PathPattern: "/public/protectionJobs/run/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RunProtectionJobReader{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.(*RunProtectionJobNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RunProtectionJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionJob updates a protection job - -Returns the updated Protection Job. -*/ -func (a *Client) UpdateProtectionJob(params *UpdateProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionJobParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionJob", - Method: "PUT", - PathPattern: "/public/protectionJobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionJobReader{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.(*UpdateProtectionJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateProtectionJobsState performs an action like pause resume activate deactivate on all the specified protection jobs - - Note that the pause or resume actions will take effect from next Protection - -Run. Also, user can specify only one type of action on all the Protection Jobs. -Deactivate and activate actions are independent of pause and resume state. -Deactivate and activate actions are useful in case of failover situations. - -Returns success if the state of all the Protection Jobs state is changed -successfully. -*/ -func (a *Client) UpdateProtectionJobsState(params *UpdateProtectionJobsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionJobsStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionJobsStateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionJobsState", - Method: "POST", - PathPattern: "/public/protectionJobs/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionJobsStateReader{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.(*UpdateProtectionJobsStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionJobsStateDefault) - 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/protection_jobs/run_protection_job_parameters.go b/v1/client/protection_jobs/run_protection_job_parameters.go deleted file mode 100644 index 46a071d2..00000000 --- a/v1/client/protection_jobs/run_protection_job_parameters.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRunProtectionJobParams creates a new RunProtectionJobParams 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 NewRunProtectionJobParams() *RunProtectionJobParams { - return &RunProtectionJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRunProtectionJobParamsWithTimeout creates a new RunProtectionJobParams object -// with the ability to set a timeout on a request. -func NewRunProtectionJobParamsWithTimeout(timeout time.Duration) *RunProtectionJobParams { - return &RunProtectionJobParams{ - timeout: timeout, - } -} - -// NewRunProtectionJobParamsWithContext creates a new RunProtectionJobParams object -// with the ability to set a context for a request. -func NewRunProtectionJobParamsWithContext(ctx context.Context) *RunProtectionJobParams { - return &RunProtectionJobParams{ - Context: ctx, - } -} - -// NewRunProtectionJobParamsWithHTTPClient creates a new RunProtectionJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewRunProtectionJobParamsWithHTTPClient(client *http.Client) *RunProtectionJobParams { - return &RunProtectionJobParams{ - HTTPClient: client, - } -} - -/* -RunProtectionJobParams contains all the parameters to send to the API endpoint - - for the run protection job operation. - - Typically these are written to a http.Request. -*/ -type RunProtectionJobParams struct { - - /* Body. - - Specifies the type of backup. If not specified, the 'kRegular' - backup is run. - */ - Body *models.RunProtectionJobParam - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the run protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunProtectionJobParams) WithDefaults() *RunProtectionJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the run protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunProtectionJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the run protection job params -func (o *RunProtectionJobParams) WithTimeout(timeout time.Duration) *RunProtectionJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the run protection job params -func (o *RunProtectionJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the run protection job params -func (o *RunProtectionJobParams) WithContext(ctx context.Context) *RunProtectionJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the run protection job params -func (o *RunProtectionJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the run protection job params -func (o *RunProtectionJobParams) WithHTTPClient(client *http.Client) *RunProtectionJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the run protection job params -func (o *RunProtectionJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the run protection job params -func (o *RunProtectionJobParams) WithBody(body *models.RunProtectionJobParam) *RunProtectionJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the run protection job params -func (o *RunProtectionJobParams) SetBody(body *models.RunProtectionJobParam) { - o.Body = body -} - -// WithID adds the id to the run protection job params -func (o *RunProtectionJobParams) WithID(id int64) *RunProtectionJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the run protection job params -func (o *RunProtectionJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RunProtectionJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/run_protection_job_responses.go b/v1/client/protection_jobs/run_protection_job_responses.go deleted file mode 100644 index dd5fd03b..00000000 --- a/v1/client/protection_jobs/run_protection_job_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RunProtectionJobReader is a Reader for the RunProtectionJob structure. -type RunProtectionJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RunProtectionJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRunProtectionJobNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRunProtectionJobDefault(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 - } -} - -// NewRunProtectionJobNoContent creates a RunProtectionJobNoContent with default headers values -func NewRunProtectionJobNoContent() *RunProtectionJobNoContent { - return &RunProtectionJobNoContent{} -} - -/* -RunProtectionJobNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RunProtectionJobNoContent struct { -} - -// IsSuccess returns true when this run protection job no content response has a 2xx status code -func (o *RunProtectionJobNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this run protection job no content response has a 3xx status code -func (o *RunProtectionJobNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this run protection job no content response has a 4xx status code -func (o *RunProtectionJobNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this run protection job no content response has a 5xx status code -func (o *RunProtectionJobNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this run protection job no content response a status code equal to that given -func (o *RunProtectionJobNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the run protection job no content response -func (o *RunProtectionJobNoContent) Code() int { - return 204 -} - -func (o *RunProtectionJobNoContent) Error() string { - return fmt.Sprintf("[POST /public/protectionJobs/run/{id}][%d] runProtectionJobNoContent", 204) -} - -func (o *RunProtectionJobNoContent) String() string { - return fmt.Sprintf("[POST /public/protectionJobs/run/{id}][%d] runProtectionJobNoContent", 204) -} - -func (o *RunProtectionJobNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRunProtectionJobDefault creates a RunProtectionJobDefault with default headers values -func NewRunProtectionJobDefault(code int) *RunProtectionJobDefault { - return &RunProtectionJobDefault{ - _statusCode: code, - } -} - -/* -RunProtectionJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type RunProtectionJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this run protection job default response has a 2xx status code -func (o *RunProtectionJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this run protection job default response has a 3xx status code -func (o *RunProtectionJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this run protection job default response has a 4xx status code -func (o *RunProtectionJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this run protection job default response has a 5xx status code -func (o *RunProtectionJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this run protection job default response a status code equal to that given -func (o *RunProtectionJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the run protection job default response -func (o *RunProtectionJobDefault) Code() int { - return o._statusCode -} - -func (o *RunProtectionJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/run/{id}][%d] RunProtectionJob default %s", o._statusCode, payload) -} - -func (o *RunProtectionJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/run/{id}][%d] RunProtectionJob default %s", o._statusCode, payload) -} - -func (o *RunProtectionJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RunProtectionJobDefault) 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/update_protection_job_parameters.go b/v1/client/protection_jobs/update_protection_job_parameters.go deleted file mode 100644 index 3159cfc3..00000000 --- a/v1/client/protection_jobs/update_protection_job_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionJobParams creates a new UpdateProtectionJobParams 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 NewUpdateProtectionJobParams() *UpdateProtectionJobParams { - return &UpdateProtectionJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionJobParamsWithTimeout creates a new UpdateProtectionJobParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionJobParamsWithTimeout(timeout time.Duration) *UpdateProtectionJobParams { - return &UpdateProtectionJobParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionJobParamsWithContext creates a new UpdateProtectionJobParams object -// with the ability to set a context for a request. -func NewUpdateProtectionJobParamsWithContext(ctx context.Context) *UpdateProtectionJobParams { - return &UpdateProtectionJobParams{ - Context: ctx, - } -} - -// NewUpdateProtectionJobParamsWithHTTPClient creates a new UpdateProtectionJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionJobParamsWithHTTPClient(client *http.Client) *UpdateProtectionJobParams { - return &UpdateProtectionJobParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionJobParams contains all the parameters to send to the API endpoint - - for the update protection job operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionJobParams struct { - - /* Body. - - Request to update a protection job. - */ - Body *models.ProtectionJobRequestBody - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionJobParams) WithDefaults() *UpdateProtectionJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection job params -func (o *UpdateProtectionJobParams) WithTimeout(timeout time.Duration) *UpdateProtectionJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection job params -func (o *UpdateProtectionJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection job params -func (o *UpdateProtectionJobParams) WithContext(ctx context.Context) *UpdateProtectionJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection job params -func (o *UpdateProtectionJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection job params -func (o *UpdateProtectionJobParams) WithHTTPClient(client *http.Client) *UpdateProtectionJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection job params -func (o *UpdateProtectionJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection job params -func (o *UpdateProtectionJobParams) WithBody(body *models.ProtectionJobRequestBody) *UpdateProtectionJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection job params -func (o *UpdateProtectionJobParams) SetBody(body *models.ProtectionJobRequestBody) { - o.Body = body -} - -// WithID adds the id to the update protection job params -func (o *UpdateProtectionJobParams) WithID(id int64) *UpdateProtectionJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection job params -func (o *UpdateProtectionJobParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionJobParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_jobs/update_protection_job_responses.go b/v1/client/protection_jobs/update_protection_job_responses.go deleted file mode 100644 index 3fd99898..00000000 --- a/v1/client/protection_jobs/update_protection_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionJobReader is a Reader for the UpdateProtectionJob structure. -type UpdateProtectionJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionJobDefault(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 - } -} - -// NewUpdateProtectionJobOK creates a UpdateProtectionJobOK with default headers values -func NewUpdateProtectionJobOK() *UpdateProtectionJobOK { - return &UpdateProtectionJobOK{} -} - -/* -UpdateProtectionJobOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionJobOK struct { - Payload *models.ProtectionJob -} - -// IsSuccess returns true when this update protection job o k response has a 2xx status code -func (o *UpdateProtectionJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection job o k response has a 3xx status code -func (o *UpdateProtectionJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection job o k response has a 4xx status code -func (o *UpdateProtectionJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection job o k response has a 5xx status code -func (o *UpdateProtectionJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection job o k response a status code equal to that given -func (o *UpdateProtectionJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection job o k response -func (o *UpdateProtectionJobOK) Code() int { - return 200 -} - -func (o *UpdateProtectionJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionJobs/{id}][%d] updateProtectionJobOK %s", 200, payload) -} - -func (o *UpdateProtectionJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionJobs/{id}][%d] updateProtectionJobOK %s", 200, payload) -} - -func (o *UpdateProtectionJobOK) GetPayload() *models.ProtectionJob { - return o.Payload -} - -func (o *UpdateProtectionJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionJobDefault creates a UpdateProtectionJobDefault with default headers values -func NewUpdateProtectionJobDefault(code int) *UpdateProtectionJobDefault { - return &UpdateProtectionJobDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection job default response has a 2xx status code -func (o *UpdateProtectionJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection job default response has a 3xx status code -func (o *UpdateProtectionJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection job default response has a 4xx status code -func (o *UpdateProtectionJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection job default response has a 5xx status code -func (o *UpdateProtectionJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection job default response a status code equal to that given -func (o *UpdateProtectionJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection job default response -func (o *UpdateProtectionJobDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionJobs/{id}][%d] UpdateProtectionJob default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionJobs/{id}][%d] UpdateProtectionJob default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionJobDefault) 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/update_protection_jobs_state_parameters.go b/v1/client/protection_jobs/update_protection_jobs_state_parameters.go deleted file mode 100644 index 9e2b8d97..00000000 --- a/v1/client/protection_jobs/update_protection_jobs_state_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionJobsStateParams creates a new UpdateProtectionJobsStateParams 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 NewUpdateProtectionJobsStateParams() *UpdateProtectionJobsStateParams { - return &UpdateProtectionJobsStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionJobsStateParamsWithTimeout creates a new UpdateProtectionJobsStateParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionJobsStateParamsWithTimeout(timeout time.Duration) *UpdateProtectionJobsStateParams { - return &UpdateProtectionJobsStateParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionJobsStateParamsWithContext creates a new UpdateProtectionJobsStateParams object -// with the ability to set a context for a request. -func NewUpdateProtectionJobsStateParamsWithContext(ctx context.Context) *UpdateProtectionJobsStateParams { - return &UpdateProtectionJobsStateParams{ - Context: ctx, - } -} - -// NewUpdateProtectionJobsStateParamsWithHTTPClient creates a new UpdateProtectionJobsStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionJobsStateParamsWithHTTPClient(client *http.Client) *UpdateProtectionJobsStateParams { - return &UpdateProtectionJobsStateParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionJobsStateParams contains all the parameters to send to the API endpoint - - for the update protection jobs state operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionJobsStateParams struct { - - // Body. - Body *models.UpdateProtectionJobsStateRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection jobs state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionJobsStateParams) WithDefaults() *UpdateProtectionJobsStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection jobs state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionJobsStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) WithTimeout(timeout time.Duration) *UpdateProtectionJobsStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) WithContext(ctx context.Context) *UpdateProtectionJobsStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) WithHTTPClient(client *http.Client) *UpdateProtectionJobsStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) WithBody(body *models.UpdateProtectionJobsStateRequestBody) *UpdateProtectionJobsStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection jobs state params -func (o *UpdateProtectionJobsStateParams) SetBody(body *models.UpdateProtectionJobsStateRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionJobsStateParams) 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/protection_jobs/update_protection_jobs_state_responses.go b/v1/client/protection_jobs/update_protection_jobs_state_responses.go deleted file mode 100644 index 908c8978..00000000 --- a/v1/client/protection_jobs/update_protection_jobs_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_jobs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionJobsStateReader is a Reader for the UpdateProtectionJobsState structure. -type UpdateProtectionJobsStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionJobsStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionJobsStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionJobsStateDefault(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 - } -} - -// NewUpdateProtectionJobsStateOK creates a UpdateProtectionJobsStateOK with default headers values -func NewUpdateProtectionJobsStateOK() *UpdateProtectionJobsStateOK { - return &UpdateProtectionJobsStateOK{} -} - -/* -UpdateProtectionJobsStateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionJobsStateOK struct { - Payload *models.UpdateProtectionJobsState -} - -// IsSuccess returns true when this update protection jobs state o k response has a 2xx status code -func (o *UpdateProtectionJobsStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection jobs state o k response has a 3xx status code -func (o *UpdateProtectionJobsStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection jobs state o k response has a 4xx status code -func (o *UpdateProtectionJobsStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection jobs state o k response has a 5xx status code -func (o *UpdateProtectionJobsStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection jobs state o k response a status code equal to that given -func (o *UpdateProtectionJobsStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection jobs state o k response -func (o *UpdateProtectionJobsStateOK) Code() int { - return 200 -} - -func (o *UpdateProtectionJobsStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/states][%d] updateProtectionJobsStateOK %s", 200, payload) -} - -func (o *UpdateProtectionJobsStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/states][%d] updateProtectionJobsStateOK %s", 200, payload) -} - -func (o *UpdateProtectionJobsStateOK) GetPayload() *models.UpdateProtectionJobsState { - return o.Payload -} - -func (o *UpdateProtectionJobsStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateProtectionJobsState) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionJobsStateDefault creates a UpdateProtectionJobsStateDefault with default headers values -func NewUpdateProtectionJobsStateDefault(code int) *UpdateProtectionJobsStateDefault { - return &UpdateProtectionJobsStateDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionJobsStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionJobsStateDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection jobs state default response has a 2xx status code -func (o *UpdateProtectionJobsStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection jobs state default response has a 3xx status code -func (o *UpdateProtectionJobsStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection jobs state default response has a 4xx status code -func (o *UpdateProtectionJobsStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection jobs state default response has a 5xx status code -func (o *UpdateProtectionJobsStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection jobs state default response a status code equal to that given -func (o *UpdateProtectionJobsStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection jobs state default response -func (o *UpdateProtectionJobsStateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionJobsStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/states][%d] UpdateProtectionJobsState default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionJobsStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionJobs/states][%d] UpdateProtectionJobsState default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionJobsStateDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionJobsStateDefault) 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_objects/get_protection_object_summary_parameters.go b/v1/client/protection_objects/get_protection_object_summary_parameters.go deleted file mode 100644 index 197a5037..00000000 --- a/v1/client/protection_objects/get_protection_object_summary_parameters.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/go-openapi/swag" -) - -// NewGetProtectionObjectSummaryParams creates a new GetProtectionObjectSummaryParams 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 NewGetProtectionObjectSummaryParams() *GetProtectionObjectSummaryParams { - return &GetProtectionObjectSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionObjectSummaryParamsWithTimeout creates a new GetProtectionObjectSummaryParams object -// with the ability to set a timeout on a request. -func NewGetProtectionObjectSummaryParamsWithTimeout(timeout time.Duration) *GetProtectionObjectSummaryParams { - return &GetProtectionObjectSummaryParams{ - timeout: timeout, - } -} - -// NewGetProtectionObjectSummaryParamsWithContext creates a new GetProtectionObjectSummaryParams object -// with the ability to set a context for a request. -func NewGetProtectionObjectSummaryParamsWithContext(ctx context.Context) *GetProtectionObjectSummaryParams { - return &GetProtectionObjectSummaryParams{ - Context: ctx, - } -} - -// NewGetProtectionObjectSummaryParamsWithHTTPClient creates a new GetProtectionObjectSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionObjectSummaryParamsWithHTTPClient(client *http.Client) *GetProtectionObjectSummaryParams { - return &GetProtectionObjectSummaryParams{ - HTTPClient: client, - } -} - -/* -GetProtectionObjectSummaryParams contains all the parameters to send to the API endpoint - - for the get protection object summary operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionObjectSummaryParams struct { - - /* ProtectionSourceID. - - Specifies the id of the Protection Source. - - Format: int64 - */ - ProtectionSourceID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection object summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionObjectSummaryParams) WithDefaults() *GetProtectionObjectSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection object summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionObjectSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) WithTimeout(timeout time.Duration) *GetProtectionObjectSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) WithContext(ctx context.Context) *GetProtectionObjectSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) WithHTTPClient(client *http.Client) *GetProtectionObjectSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithProtectionSourceID adds the protectionSourceID to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) WithProtectionSourceID(protectionSourceID int64) *GetProtectionObjectSummaryParams { - o.SetProtectionSourceID(protectionSourceID) - return o -} - -// SetProtectionSourceID adds the protectionSourceId to the get protection object summary params -func (o *GetProtectionObjectSummaryParams) SetProtectionSourceID(protectionSourceID int64) { - o.ProtectionSourceID = protectionSourceID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionObjectSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param protectionSourceId - qrProtectionSourceID := o.ProtectionSourceID - qProtectionSourceID := swag.FormatInt64(qrProtectionSourceID) - if qProtectionSourceID != "" { - - if err := r.SetQueryParam("protectionSourceId", qProtectionSourceID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_objects/get_protection_object_summary_responses.go b/v1/client/protection_objects/get_protection_object_summary_responses.go deleted file mode 100644 index 32179d66..00000000 --- a/v1/client/protection_objects/get_protection_object_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionObjectSummaryReader is a Reader for the GetProtectionObjectSummary structure. -type GetProtectionObjectSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionObjectSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionObjectSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionObjectSummaryDefault(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 - } -} - -// NewGetProtectionObjectSummaryOK creates a GetProtectionObjectSummaryOK with default headers values -func NewGetProtectionObjectSummaryOK() *GetProtectionObjectSummaryOK { - return &GetProtectionObjectSummaryOK{} -} - -/* -GetProtectionObjectSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionObjectSummaryOK struct { - Payload *models.ProtectionObjectSummary -} - -// IsSuccess returns true when this get protection object summary o k response has a 2xx status code -func (o *GetProtectionObjectSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection object summary o k response has a 3xx status code -func (o *GetProtectionObjectSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection object summary o k response has a 4xx status code -func (o *GetProtectionObjectSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection object summary o k response has a 5xx status code -func (o *GetProtectionObjectSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection object summary o k response a status code equal to that given -func (o *GetProtectionObjectSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection object summary o k response -func (o *GetProtectionObjectSummaryOK) Code() int { - return 200 -} - -func (o *GetProtectionObjectSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionObjects/summary][%d] getProtectionObjectSummaryOK %s", 200, payload) -} - -func (o *GetProtectionObjectSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionObjects/summary][%d] getProtectionObjectSummaryOK %s", 200, payload) -} - -func (o *GetProtectionObjectSummaryOK) GetPayload() *models.ProtectionObjectSummary { - return o.Payload -} - -func (o *GetProtectionObjectSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionObjectSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionObjectSummaryDefault creates a GetProtectionObjectSummaryDefault with default headers values -func NewGetProtectionObjectSummaryDefault(code int) *GetProtectionObjectSummaryDefault { - return &GetProtectionObjectSummaryDefault{ - _statusCode: code, - } -} - -/* -GetProtectionObjectSummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionObjectSummaryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection object summary default response has a 2xx status code -func (o *GetProtectionObjectSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection object summary default response has a 3xx status code -func (o *GetProtectionObjectSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection object summary default response has a 4xx status code -func (o *GetProtectionObjectSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection object summary default response has a 5xx status code -func (o *GetProtectionObjectSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection object summary default response a status code equal to that given -func (o *GetProtectionObjectSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection object summary default response -func (o *GetProtectionObjectSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionObjectSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionObjects/summary][%d] GetProtectionObjectSummary default %s", o._statusCode, payload) -} - -func (o *GetProtectionObjectSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionObjects/summary][%d] GetProtectionObjectSummary default %s", o._statusCode, payload) -} - -func (o *GetProtectionObjectSummaryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionObjectSummaryDefault) 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_objects/protect_object_parameters.go b/v1/client/protection_objects/protect_object_parameters.go deleted file mode 100644 index 2fb2482e..00000000 --- a/v1/client/protection_objects/protect_object_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewProtectObjectParams creates a new ProtectObjectParams 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 NewProtectObjectParams() *ProtectObjectParams { - return &ProtectObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewProtectObjectParamsWithTimeout creates a new ProtectObjectParams object -// with the ability to set a timeout on a request. -func NewProtectObjectParamsWithTimeout(timeout time.Duration) *ProtectObjectParams { - return &ProtectObjectParams{ - timeout: timeout, - } -} - -// NewProtectObjectParamsWithContext creates a new ProtectObjectParams object -// with the ability to set a context for a request. -func NewProtectObjectParamsWithContext(ctx context.Context) *ProtectObjectParams { - return &ProtectObjectParams{ - Context: ctx, - } -} - -// NewProtectObjectParamsWithHTTPClient creates a new ProtectObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewProtectObjectParamsWithHTTPClient(client *http.Client) *ProtectObjectParams { - return &ProtectObjectParams{ - HTTPClient: client, - } -} - -/* -ProtectObjectParams contains all the parameters to send to the API endpoint - - for the protect object operation. - - Typically these are written to a http.Request. -*/ -type ProtectObjectParams struct { - - // Body. - Body *models.ProtectObjectParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the protect object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectObjectParams) WithDefaults() *ProtectObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the protect object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the protect object params -func (o *ProtectObjectParams) WithTimeout(timeout time.Duration) *ProtectObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the protect object params -func (o *ProtectObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the protect object params -func (o *ProtectObjectParams) WithContext(ctx context.Context) *ProtectObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the protect object params -func (o *ProtectObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the protect object params -func (o *ProtectObjectParams) WithHTTPClient(client *http.Client) *ProtectObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the protect object params -func (o *ProtectObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the protect object params -func (o *ProtectObjectParams) WithBody(body *models.ProtectObjectParameters) *ProtectObjectParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the protect object params -func (o *ProtectObjectParams) SetBody(body *models.ProtectObjectParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ProtectObjectParams) 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/protection_objects/protect_object_responses.go b/v1/client/protection_objects/protect_object_responses.go deleted file mode 100644 index 03f9cd2e..00000000 --- a/v1/client/protection_objects/protect_object_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ProtectObjectReader is a Reader for the ProtectObject structure. -type ProtectObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ProtectObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewProtectObjectCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewProtectObjectDefault(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 - } -} - -// NewProtectObjectCreated creates a ProtectObjectCreated with default headers values -func NewProtectObjectCreated() *ProtectObjectCreated { - return &ProtectObjectCreated{} -} - -/* -ProtectObjectCreated describes a response with status code 201, with default header values. - -Success -*/ -type ProtectObjectCreated struct { - Payload []*models.ProtectedObject -} - -// IsSuccess returns true when this protect object created response has a 2xx status code -func (o *ProtectObjectCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this protect object created response has a 3xx status code -func (o *ProtectObjectCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this protect object created response has a 4xx status code -func (o *ProtectObjectCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this protect object created response has a 5xx status code -func (o *ProtectObjectCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this protect object created response a status code equal to that given -func (o *ProtectObjectCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the protect object created response -func (o *ProtectObjectCreated) Code() int { - return 201 -} - -func (o *ProtectObjectCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionObjects][%d] protectObjectCreated %s", 201, payload) -} - -func (o *ProtectObjectCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionObjects][%d] protectObjectCreated %s", 201, payload) -} - -func (o *ProtectObjectCreated) GetPayload() []*models.ProtectedObject { - return o.Payload -} - -func (o *ProtectObjectCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewProtectObjectDefault creates a ProtectObjectDefault with default headers values -func NewProtectObjectDefault(code int) *ProtectObjectDefault { - return &ProtectObjectDefault{ - _statusCode: code, - } -} - -/* -ProtectObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type ProtectObjectDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this protect object default response has a 2xx status code -func (o *ProtectObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this protect object default response has a 3xx status code -func (o *ProtectObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this protect object default response has a 4xx status code -func (o *ProtectObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this protect object default response has a 5xx status code -func (o *ProtectObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this protect object default response a status code equal to that given -func (o *ProtectObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the protect object default response -func (o *ProtectObjectDefault) Code() int { - return o._statusCode -} - -func (o *ProtectObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionObjects][%d] ProtectObject default %s", o._statusCode, payload) -} - -func (o *ProtectObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionObjects][%d] ProtectObject default %s", o._statusCode, payload) -} - -func (o *ProtectObjectDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ProtectObjectDefault) 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_objects/protection_objects_client.go b/v1/client/protection_objects/protection_objects_client.go deleted file mode 100644 index b2c145af..00000000 --- a/v1/client/protection_objects/protection_objects_client.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection objects API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection objects API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection objects API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection objects API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetProtectionObjectSummary(params *GetProtectionObjectSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionObjectSummaryOK, error) - - ProtectObject(params *ProtectObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectObjectCreated, error) - - UnprotectObject(params *UnprotectObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnprotectObjectNoContent, error) - - UpdateProtectionObject(params *UpdateProtectionObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionObjectOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetProtectionObjectSummary protects an object - -Returns the Protected Object and its corresponding Protection Job information. -*/ -func (a *Client) GetProtectionObjectSummary(params *GetProtectionObjectSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionObjectSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionObjectSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionObjectSummary", - Method: "GET", - PathPattern: "/public/protectionObjects/summary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionObjectSummaryReader{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.(*GetProtectionObjectSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionObjectSummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ProtectObject protects an object - -Returns the Protected Object and its corresponding Protection Job information. -*/ -func (a *Client) ProtectObject(params *ProtectObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectObjectCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewProtectObjectParams() - } - op := &runtime.ClientOperation{ - ID: "ProtectObject", - Method: "POST", - PathPattern: "/public/protectionObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ProtectObjectReader{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.(*ProtectObjectCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ProtectObjectDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnprotectObject unprotects a protected object -*/ -func (a *Client) UnprotectObject(params *UnprotectObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnprotectObjectNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnprotectObjectParams() - } - op := &runtime.ClientOperation{ - ID: "UnprotectObject", - Method: "DELETE", - PathPattern: "/public/protectionObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnprotectObjectReader{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.(*UnprotectObjectNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnprotectObjectDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionObject updates a protected object - -Returns the Updated Protected Object. -*/ -func (a *Client) UpdateProtectionObject(params *UpdateProtectionObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionObjectOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionObjectParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionObject", - Method: "PUT", - PathPattern: "/public/protectionObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionObjectReader{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.(*UpdateProtectionObjectOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionObjectDefault) - 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/protection_objects/unprotect_object_parameters.go b/v1/client/protection_objects/unprotect_object_parameters.go deleted file mode 100644 index 8e4145f4..00000000 --- a/v1/client/protection_objects/unprotect_object_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUnprotectObjectParams creates a new UnprotectObjectParams 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 NewUnprotectObjectParams() *UnprotectObjectParams { - return &UnprotectObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnprotectObjectParamsWithTimeout creates a new UnprotectObjectParams object -// with the ability to set a timeout on a request. -func NewUnprotectObjectParamsWithTimeout(timeout time.Duration) *UnprotectObjectParams { - return &UnprotectObjectParams{ - timeout: timeout, - } -} - -// NewUnprotectObjectParamsWithContext creates a new UnprotectObjectParams object -// with the ability to set a context for a request. -func NewUnprotectObjectParamsWithContext(ctx context.Context) *UnprotectObjectParams { - return &UnprotectObjectParams{ - Context: ctx, - } -} - -// NewUnprotectObjectParamsWithHTTPClient creates a new UnprotectObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnprotectObjectParamsWithHTTPClient(client *http.Client) *UnprotectObjectParams { - return &UnprotectObjectParams{ - HTTPClient: client, - } -} - -/* -UnprotectObjectParams contains all the parameters to send to the API endpoint - - for the unprotect object operation. - - Typically these are written to a http.Request. -*/ -type UnprotectObjectParams struct { - - // Body. - Body *models.UnprotectObjectParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unprotect object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnprotectObjectParams) WithDefaults() *UnprotectObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unprotect object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnprotectObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unprotect object params -func (o *UnprotectObjectParams) WithTimeout(timeout time.Duration) *UnprotectObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unprotect object params -func (o *UnprotectObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unprotect object params -func (o *UnprotectObjectParams) WithContext(ctx context.Context) *UnprotectObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unprotect object params -func (o *UnprotectObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unprotect object params -func (o *UnprotectObjectParams) WithHTTPClient(client *http.Client) *UnprotectObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unprotect object params -func (o *UnprotectObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unprotect object params -func (o *UnprotectObjectParams) WithBody(body *models.UnprotectObjectParams) *UnprotectObjectParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unprotect object params -func (o *UnprotectObjectParams) SetBody(body *models.UnprotectObjectParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UnprotectObjectParams) 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/protection_objects/unprotect_object_responses.go b/v1/client/protection_objects/unprotect_object_responses.go deleted file mode 100644 index 07472230..00000000 --- a/v1/client/protection_objects/unprotect_object_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UnprotectObjectReader is a Reader for the UnprotectObject structure. -type UnprotectObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnprotectObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUnprotectObjectNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnprotectObjectDefault(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 - } -} - -// NewUnprotectObjectNoContent creates a UnprotectObjectNoContent with default headers values -func NewUnprotectObjectNoContent() *UnprotectObjectNoContent { - return &UnprotectObjectNoContent{} -} - -/* -UnprotectObjectNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UnprotectObjectNoContent struct { -} - -// IsSuccess returns true when this unprotect object no content response has a 2xx status code -func (o *UnprotectObjectNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unprotect object no content response has a 3xx status code -func (o *UnprotectObjectNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unprotect object no content response has a 4xx status code -func (o *UnprotectObjectNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this unprotect object no content response has a 5xx status code -func (o *UnprotectObjectNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this unprotect object no content response a status code equal to that given -func (o *UnprotectObjectNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the unprotect object no content response -func (o *UnprotectObjectNoContent) Code() int { - return 204 -} - -func (o *UnprotectObjectNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/protectionObjects][%d] unprotectObjectNoContent", 204) -} - -func (o *UnprotectObjectNoContent) String() string { - return fmt.Sprintf("[DELETE /public/protectionObjects][%d] unprotectObjectNoContent", 204) -} - -func (o *UnprotectObjectNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUnprotectObjectDefault creates a UnprotectObjectDefault with default headers values -func NewUnprotectObjectDefault(code int) *UnprotectObjectDefault { - return &UnprotectObjectDefault{ - _statusCode: code, - } -} - -/* -UnprotectObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnprotectObjectDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this unprotect object default response has a 2xx status code -func (o *UnprotectObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unprotect object default response has a 3xx status code -func (o *UnprotectObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unprotect object default response has a 4xx status code -func (o *UnprotectObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unprotect object default response has a 5xx status code -func (o *UnprotectObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unprotect object default response a status code equal to that given -func (o *UnprotectObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unprotect object default response -func (o *UnprotectObjectDefault) Code() int { - return o._statusCode -} - -func (o *UnprotectObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionObjects][%d] UnprotectObject default %s", o._statusCode, payload) -} - -func (o *UnprotectObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionObjects][%d] UnprotectObject default %s", o._statusCode, payload) -} - -func (o *UnprotectObjectDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UnprotectObjectDefault) 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_objects/update_protection_object_parameters.go b/v1/client/protection_objects/update_protection_object_parameters.go deleted file mode 100644 index 3538d142..00000000 --- a/v1/client/protection_objects/update_protection_object_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionObjectParams creates a new UpdateProtectionObjectParams 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 NewUpdateProtectionObjectParams() *UpdateProtectionObjectParams { - return &UpdateProtectionObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionObjectParamsWithTimeout creates a new UpdateProtectionObjectParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionObjectParamsWithTimeout(timeout time.Duration) *UpdateProtectionObjectParams { - return &UpdateProtectionObjectParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionObjectParamsWithContext creates a new UpdateProtectionObjectParams object -// with the ability to set a context for a request. -func NewUpdateProtectionObjectParamsWithContext(ctx context.Context) *UpdateProtectionObjectParams { - return &UpdateProtectionObjectParams{ - Context: ctx, - } -} - -// NewUpdateProtectionObjectParamsWithHTTPClient creates a new UpdateProtectionObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionObjectParamsWithHTTPClient(client *http.Client) *UpdateProtectionObjectParams { - return &UpdateProtectionObjectParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionObjectParams contains all the parameters to send to the API endpoint - - for the update protection object operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionObjectParams struct { - - // Body. - Body *models.UpdateProtectionObjectParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionObjectParams) WithDefaults() *UpdateProtectionObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection object params -func (o *UpdateProtectionObjectParams) WithTimeout(timeout time.Duration) *UpdateProtectionObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection object params -func (o *UpdateProtectionObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection object params -func (o *UpdateProtectionObjectParams) WithContext(ctx context.Context) *UpdateProtectionObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection object params -func (o *UpdateProtectionObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection object params -func (o *UpdateProtectionObjectParams) WithHTTPClient(client *http.Client) *UpdateProtectionObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection object params -func (o *UpdateProtectionObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection object params -func (o *UpdateProtectionObjectParams) WithBody(body *models.UpdateProtectionObjectParameters) *UpdateProtectionObjectParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection object params -func (o *UpdateProtectionObjectParams) SetBody(body *models.UpdateProtectionObjectParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionObjectParams) 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/protection_objects/update_protection_object_responses.go b/v1/client/protection_objects/update_protection_object_responses.go deleted file mode 100644 index 997f3a31..00000000 --- a/v1/client/protection_objects/update_protection_object_responses.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_objects - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionObjectReader is a Reader for the UpdateProtectionObject structure. -type UpdateProtectionObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionObjectOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionObjectDefault(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 - } -} - -// NewUpdateProtectionObjectOK creates a UpdateProtectionObjectOK with default headers values -func NewUpdateProtectionObjectOK() *UpdateProtectionObjectOK { - return &UpdateProtectionObjectOK{} -} - -/* - UpdateProtectionObjectOK describes a response with status code 200, with default header values. - - UpdateProtectionObjectRequest is the response of updating a Protection - -Object. -Success -*/ -type UpdateProtectionObjectOK struct { - Payload *models.ProtectionJob -} - -// IsSuccess returns true when this update protection object o k response has a 2xx status code -func (o *UpdateProtectionObjectOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection object o k response has a 3xx status code -func (o *UpdateProtectionObjectOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection object o k response has a 4xx status code -func (o *UpdateProtectionObjectOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection object o k response has a 5xx status code -func (o *UpdateProtectionObjectOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection object o k response a status code equal to that given -func (o *UpdateProtectionObjectOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection object o k response -func (o *UpdateProtectionObjectOK) Code() int { - return 200 -} - -func (o *UpdateProtectionObjectOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionObjects][%d] updateProtectionObjectOK %s", 200, payload) -} - -func (o *UpdateProtectionObjectOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionObjects][%d] updateProtectionObjectOK %s", 200, payload) -} - -func (o *UpdateProtectionObjectOK) GetPayload() *models.ProtectionJob { - return o.Payload -} - -func (o *UpdateProtectionObjectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionObjectDefault creates a UpdateProtectionObjectDefault with default headers values -func NewUpdateProtectionObjectDefault(code int) *UpdateProtectionObjectDefault { - return &UpdateProtectionObjectDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionObjectDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection object default response has a 2xx status code -func (o *UpdateProtectionObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection object default response has a 3xx status code -func (o *UpdateProtectionObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection object default response has a 4xx status code -func (o *UpdateProtectionObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection object default response has a 5xx status code -func (o *UpdateProtectionObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection object default response a status code equal to that given -func (o *UpdateProtectionObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection object default response -func (o *UpdateProtectionObjectDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionObjects][%d] UpdateProtectionObject default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionObjects][%d] UpdateProtectionObject default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionObjectDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionObjectDefault) 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_policies/create_protection_policy_parameters.go b/v1/client/protection_policies/create_protection_policy_parameters.go deleted file mode 100644 index 5bc69501..00000000 --- a/v1/client/protection_policies/create_protection_policy_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateProtectionPolicyParams creates a new CreateProtectionPolicyParams 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 NewCreateProtectionPolicyParams() *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateProtectionPolicyParamsWithTimeout creates a new CreateProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewCreateProtectionPolicyParamsWithTimeout(timeout time.Duration) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewCreateProtectionPolicyParamsWithContext creates a new CreateProtectionPolicyParams object -// with the ability to set a context for a request. -func NewCreateProtectionPolicyParamsWithContext(ctx context.Context) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - Context: ctx, - } -} - -// NewCreateProtectionPolicyParamsWithHTTPClient creates a new CreateProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateProtectionPolicyParamsWithHTTPClient(client *http.Client) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -CreateProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the create protection policy operation. - - Typically these are written to a http.Request. -*/ -type CreateProtectionPolicyParams struct { - - /* Body. - - Request to create a Protection Policy. - */ - Body *models.ProtectionPolicyRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionPolicyParams) WithDefaults() *CreateProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create protection policy params -func (o *CreateProtectionPolicyParams) WithTimeout(timeout time.Duration) *CreateProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create protection policy params -func (o *CreateProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create protection policy params -func (o *CreateProtectionPolicyParams) WithContext(ctx context.Context) *CreateProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create protection policy params -func (o *CreateProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create protection policy params -func (o *CreateProtectionPolicyParams) WithHTTPClient(client *http.Client) *CreateProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create protection policy params -func (o *CreateProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create protection policy params -func (o *CreateProtectionPolicyParams) WithBody(body *models.ProtectionPolicyRequest) *CreateProtectionPolicyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create protection policy params -func (o *CreateProtectionPolicyParams) SetBody(body *models.ProtectionPolicyRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateProtectionPolicyParams) 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/protection_policies/create_protection_policy_responses.go b/v1/client/protection_policies/create_protection_policy_responses.go deleted file mode 100644 index 930ce581..00000000 --- a/v1/client/protection_policies/create_protection_policy_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateProtectionPolicyReader is a Reader for the CreateProtectionPolicy structure. -type CreateProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateProtectionPolicyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateProtectionPolicyDefault(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 - } -} - -// NewCreateProtectionPolicyCreated creates a CreateProtectionPolicyCreated with default headers values -func NewCreateProtectionPolicyCreated() *CreateProtectionPolicyCreated { - return &CreateProtectionPolicyCreated{} -} - -/* -CreateProtectionPolicyCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateProtectionPolicyCreated struct { - Payload *models.ProtectionPolicy -} - -// IsSuccess returns true when this create protection policy created response has a 2xx status code -func (o *CreateProtectionPolicyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create protection policy created response has a 3xx status code -func (o *CreateProtectionPolicyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create protection policy created response has a 4xx status code -func (o *CreateProtectionPolicyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create protection policy created response has a 5xx status code -func (o *CreateProtectionPolicyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create protection policy created response a status code equal to that given -func (o *CreateProtectionPolicyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create protection policy created response -func (o *CreateProtectionPolicyCreated) Code() int { - return 201 -} - -func (o *CreateProtectionPolicyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionPolicies][%d] createProtectionPolicyCreated %s", 201, payload) -} - -func (o *CreateProtectionPolicyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionPolicies][%d] createProtectionPolicyCreated %s", 201, payload) -} - -func (o *CreateProtectionPolicyCreated) GetPayload() *models.ProtectionPolicy { - return o.Payload -} - -func (o *CreateProtectionPolicyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateProtectionPolicyDefault creates a CreateProtectionPolicyDefault with default headers values -func NewCreateProtectionPolicyDefault(code int) *CreateProtectionPolicyDefault { - return &CreateProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -CreateProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateProtectionPolicyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create protection policy default response has a 2xx status code -func (o *CreateProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create protection policy default response has a 3xx status code -func (o *CreateProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create protection policy default response has a 4xx status code -func (o *CreateProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create protection policy default response has a 5xx status code -func (o *CreateProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create protection policy default response a status code equal to that given -func (o *CreateProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create protection policy default response -func (o *CreateProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *CreateProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionPolicies][%d] CreateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *CreateProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionPolicies][%d] CreateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *CreateProtectionPolicyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateProtectionPolicyDefault) 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_policies/delete_protection_policy_parameters.go b/v1/client/protection_policies/delete_protection_policy_parameters.go deleted file mode 100644 index 16546ed1..00000000 --- a/v1/client/protection_policies/delete_protection_policy_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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" -) - -// NewDeleteProtectionPolicyParams creates a new DeleteProtectionPolicyParams 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 NewDeleteProtectionPolicyParams() *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteProtectionPolicyParamsWithTimeout creates a new DeleteProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewDeleteProtectionPolicyParamsWithTimeout(timeout time.Duration) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewDeleteProtectionPolicyParamsWithContext creates a new DeleteProtectionPolicyParams object -// with the ability to set a context for a request. -func NewDeleteProtectionPolicyParamsWithContext(ctx context.Context) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - Context: ctx, - } -} - -// NewDeleteProtectionPolicyParamsWithHTTPClient creates a new DeleteProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteProtectionPolicyParamsWithHTTPClient(client *http.Client) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -DeleteProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the delete protection policy operation. - - Typically these are written to a http.Request. -*/ -type DeleteProtectionPolicyParams struct { - - /* ID. - - Specifies a unique id of the Protection Policy to return. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionPolicyParams) WithDefaults() *DeleteProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithTimeout(timeout time.Duration) *DeleteProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithContext(ctx context.Context) *DeleteProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithHTTPClient(client *http.Client) *DeleteProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithID(id string) *DeleteProtectionPolicyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteProtectionPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_policies/delete_protection_policy_responses.go b/v1/client/protection_policies/delete_protection_policy_responses.go deleted file mode 100644 index 0e8b1c7f..00000000 --- a/v1/client/protection_policies/delete_protection_policy_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteProtectionPolicyReader is a Reader for the DeleteProtectionPolicy structure. -type DeleteProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteProtectionPolicyNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteProtectionPolicyDefault(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 - } -} - -// NewDeleteProtectionPolicyNoContent creates a DeleteProtectionPolicyNoContent with default headers values -func NewDeleteProtectionPolicyNoContent() *DeleteProtectionPolicyNoContent { - return &DeleteProtectionPolicyNoContent{} -} - -/* -DeleteProtectionPolicyNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteProtectionPolicyNoContent struct { -} - -// IsSuccess returns true when this delete protection policy no content response has a 2xx status code -func (o *DeleteProtectionPolicyNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete protection policy no content response has a 3xx status code -func (o *DeleteProtectionPolicyNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete protection policy no content response has a 4xx status code -func (o *DeleteProtectionPolicyNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete protection policy no content response has a 5xx status code -func (o *DeleteProtectionPolicyNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete protection policy no content response a status code equal to that given -func (o *DeleteProtectionPolicyNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete protection policy no content response -func (o *DeleteProtectionPolicyNoContent) Code() int { - return 204 -} - -func (o *DeleteProtectionPolicyNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/protectionPolicies/{id}][%d] deleteProtectionPolicyNoContent", 204) -} - -func (o *DeleteProtectionPolicyNoContent) String() string { - return fmt.Sprintf("[DELETE /public/protectionPolicies/{id}][%d] deleteProtectionPolicyNoContent", 204) -} - -func (o *DeleteProtectionPolicyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteProtectionPolicyDefault creates a DeleteProtectionPolicyDefault with default headers values -func NewDeleteProtectionPolicyDefault(code int) *DeleteProtectionPolicyDefault { - return &DeleteProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -DeleteProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteProtectionPolicyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete protection policy default response has a 2xx status code -func (o *DeleteProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete protection policy default response has a 3xx status code -func (o *DeleteProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete protection policy default response has a 4xx status code -func (o *DeleteProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete protection policy default response has a 5xx status code -func (o *DeleteProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete protection policy default response a status code equal to that given -func (o *DeleteProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete protection policy default response -func (o *DeleteProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *DeleteProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionPolicies/{id}][%d] DeleteProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionPolicies/{id}][%d] DeleteProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionPolicyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteProtectionPolicyDefault) 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_policies/get_protection_policies_parameters.go b/v1/client/protection_policies/get_protection_policies_parameters.go deleted file mode 100644 index a3849678..00000000 --- a/v1/client/protection_policies/get_protection_policies_parameters.go +++ /dev/null @@ -1,477 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/go-openapi/swag" -) - -// NewGetProtectionPoliciesParams creates a new GetProtectionPoliciesParams 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 NewGetProtectionPoliciesParams() *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionPoliciesParamsWithTimeout creates a new GetProtectionPoliciesParams object -// with the ability to set a timeout on a request. -func NewGetProtectionPoliciesParamsWithTimeout(timeout time.Duration) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - timeout: timeout, - } -} - -// NewGetProtectionPoliciesParamsWithContext creates a new GetProtectionPoliciesParams object -// with the ability to set a context for a request. -func NewGetProtectionPoliciesParamsWithContext(ctx context.Context) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - Context: ctx, - } -} - -// NewGetProtectionPoliciesParamsWithHTTPClient creates a new GetProtectionPoliciesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionPoliciesParamsWithHTTPClient(client *http.Client) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - HTTPClient: client, - } -} - -/* -GetProtectionPoliciesParams contains all the parameters to send to the API endpoint - - for the get protection policies operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionPoliciesParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Environments. - - Filter by Environment type such as 'kVMware', 'kView', etc. - Only Policies protecting the specified environment type are returned. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* Ids. - - Filter by a list of Protection Policy ids. - */ - Ids []string - - /* Names. - - Filter by a list of Protection Policy names. - */ - Names []string - - /* Origin. - - Specifies the origin of the protection policy. - 'kHelios' means a global policy which was created on Helios. - 'kLocal' means a local policy which was created on the cluster. - */ - Origin *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* Types. - - Specifies the type of the protection policy. - 'kRegular' means a regular Protection Policy. - 'kRPO' means an RPO Protection Policy. - */ - Types []string - - /* VaultIds. - - Filter by a list of Vault ids. Policies archiving to any of the - specified vaults will be returned. - */ - VaultIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPoliciesParams) WithDefaults() *GetProtectionPoliciesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPoliciesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTimeout(timeout time.Duration) *GetProtectionPoliciesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection policies params -func (o *GetProtectionPoliciesParams) WithContext(ctx context.Context) *GetProtectionPoliciesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection policies params -func (o *GetProtectionPoliciesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection policies params -func (o *GetProtectionPoliciesParams) WithHTTPClient(client *http.Client) *GetProtectionPoliciesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection policies params -func (o *GetProtectionPoliciesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get protection policies params -func (o *GetProtectionPoliciesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetProtectionPoliciesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get protection policies params -func (o *GetProtectionPoliciesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEnvironments adds the environments to the get protection policies params -func (o *GetProtectionPoliciesParams) WithEnvironments(environments []string) *GetProtectionPoliciesParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protection policies params -func (o *GetProtectionPoliciesParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIds adds the ids to the get protection policies params -func (o *GetProtectionPoliciesParams) WithIds(ids []string) *GetProtectionPoliciesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get protection policies params -func (o *GetProtectionPoliciesParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithNames adds the names to the get protection policies params -func (o *GetProtectionPoliciesParams) WithNames(names []string) *GetProtectionPoliciesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get protection policies params -func (o *GetProtectionPoliciesParams) SetNames(names []string) { - o.Names = names -} - -// WithOrigin adds the origin to the get protection policies params -func (o *GetProtectionPoliciesParams) WithOrigin(origin *string) *GetProtectionPoliciesParams { - o.SetOrigin(origin) - return o -} - -// SetOrigin adds the origin to the get protection policies params -func (o *GetProtectionPoliciesParams) SetOrigin(origin *string) { - o.Origin = origin -} - -// WithTenantIds adds the tenantIds to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTenantIds(tenantIds []string) *GetProtectionPoliciesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithTypes adds the types to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTypes(types []string) *GetProtectionPoliciesParams { - o.SetTypes(types) - return o -} - -// SetTypes adds the types to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTypes(types []string) { - o.Types = types -} - -// WithVaultIds adds the vaultIds to the get protection policies params -func (o *GetProtectionPoliciesParams) WithVaultIds(vaultIds []int64) *GetProtectionPoliciesParams { - o.SetVaultIds(vaultIds) - return o -} - -// SetVaultIds adds the vaultIds to the get protection policies params -func (o *GetProtectionPoliciesParams) SetVaultIds(vaultIds []int64) { - o.VaultIds = vaultIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.Origin != nil { - - // query param origin - var qrOrigin string - - if o.Origin != nil { - qrOrigin = *o.Origin - } - qOrigin := qrOrigin - if qOrigin != "" { - - if err := r.SetQueryParam("origin", qOrigin); err != nil { - return err - } - } - } - - 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.Types != nil { - - // binding items for types - joinedTypes := o.bindParamTypes(reg) - - // query array param types - if err := r.SetQueryParam("types", joinedTypes...); err != nil { - return err - } - } - - if o.VaultIds != nil { - - // binding items for vaultIds - joinedVaultIds := o.bindParamVaultIds(reg) - - // query array param vaultIds - if err := r.SetQueryParam("vaultIds", joinedVaultIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionPolicies binds the parameter environments -func (o *GetProtectionPoliciesParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectionPolicies binds the parameter ids -func (o *GetProtectionPoliciesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetProtectionPolicies binds the parameter names -func (o *GetProtectionPoliciesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetProtectionPolicies binds the parameter tenantIds -func (o *GetProtectionPoliciesParams) 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 -} - -// bindParamGetProtectionPolicies binds the parameter types -func (o *GetProtectionPoliciesParams) bindParamTypes(formats strfmt.Registry) []string { - typesIR := o.Types - - var typesIC []string - for _, typesIIR := range typesIR { // explode []string - - typesIIV := typesIIR // string as string - typesIC = append(typesIC, typesIIV) - } - - // items.CollectionFormat: "" - typesIS := swag.JoinByFormat(typesIC, "") - - return typesIS -} - -// bindParamGetProtectionPolicies binds the parameter vaultIds -func (o *GetProtectionPoliciesParams) bindParamVaultIds(formats strfmt.Registry) []string { - vaultIdsIR := o.VaultIds - - var vaultIdsIC []string - for _, vaultIdsIIR := range vaultIdsIR { // explode []int64 - - vaultIdsIIV := swag.FormatInt64(vaultIdsIIR) // int64 as string - vaultIdsIC = append(vaultIdsIC, vaultIdsIIV) - } - - // items.CollectionFormat: "" - vaultIdsIS := swag.JoinByFormat(vaultIdsIC, "") - - return vaultIdsIS -} diff --git a/v1/client/protection_policies/get_protection_policies_responses.go b/v1/client/protection_policies/get_protection_policies_responses.go deleted file mode 100644 index 15791e99..00000000 --- a/v1/client/protection_policies/get_protection_policies_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionPoliciesReader is a Reader for the GetProtectionPolicies structure. -type GetProtectionPoliciesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionPoliciesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionPoliciesDefault(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 - } -} - -// NewGetProtectionPoliciesOK creates a GetProtectionPoliciesOK with default headers values -func NewGetProtectionPoliciesOK() *GetProtectionPoliciesOK { - return &GetProtectionPoliciesOK{} -} - -/* -GetProtectionPoliciesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionPoliciesOK struct { - Payload []*models.ProtectionPolicy -} - -// IsSuccess returns true when this get protection policies o k response has a 2xx status code -func (o *GetProtectionPoliciesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection policies o k response has a 3xx status code -func (o *GetProtectionPoliciesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection policies o k response has a 4xx status code -func (o *GetProtectionPoliciesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection policies o k response has a 5xx status code -func (o *GetProtectionPoliciesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection policies o k response a status code equal to that given -func (o *GetProtectionPoliciesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection policies o k response -func (o *GetProtectionPoliciesOK) Code() int { - return 200 -} - -func (o *GetProtectionPoliciesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies][%d] getProtectionPoliciesOK %s", 200, payload) -} - -func (o *GetProtectionPoliciesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies][%d] getProtectionPoliciesOK %s", 200, payload) -} - -func (o *GetProtectionPoliciesOK) GetPayload() []*models.ProtectionPolicy { - return o.Payload -} - -func (o *GetProtectionPoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionPoliciesDefault creates a GetProtectionPoliciesDefault with default headers values -func NewGetProtectionPoliciesDefault(code int) *GetProtectionPoliciesDefault { - return &GetProtectionPoliciesDefault{ - _statusCode: code, - } -} - -/* -GetProtectionPoliciesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionPoliciesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection policies default response has a 2xx status code -func (o *GetProtectionPoliciesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection policies default response has a 3xx status code -func (o *GetProtectionPoliciesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection policies default response has a 4xx status code -func (o *GetProtectionPoliciesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection policies default response has a 5xx status code -func (o *GetProtectionPoliciesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection policies default response a status code equal to that given -func (o *GetProtectionPoliciesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection policies default response -func (o *GetProtectionPoliciesDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionPoliciesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies][%d] GetProtectionPolicies default %s", o._statusCode, payload) -} - -func (o *GetProtectionPoliciesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies][%d] GetProtectionPolicies default %s", o._statusCode, payload) -} - -func (o *GetProtectionPoliciesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionPoliciesDefault) 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_policies/get_protection_policy_by_id_parameters.go b/v1/client/protection_policies/get_protection_policy_by_id_parameters.go deleted file mode 100644 index 003e6fac..00000000 --- a/v1/client/protection_policies/get_protection_policy_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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" -) - -// NewGetProtectionPolicyByIDParams creates a new GetProtectionPolicyByIDParams 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 NewGetProtectionPolicyByIDParams() *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionPolicyByIDParamsWithTimeout creates a new GetProtectionPolicyByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectionPolicyByIDParamsWithTimeout(timeout time.Duration) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectionPolicyByIDParamsWithContext creates a new GetProtectionPolicyByIDParams object -// with the ability to set a context for a request. -func NewGetProtectionPolicyByIDParamsWithContext(ctx context.Context) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - Context: ctx, - } -} - -// NewGetProtectionPolicyByIDParamsWithHTTPClient creates a new GetProtectionPolicyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionPolicyByIDParamsWithHTTPClient(client *http.Client) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectionPolicyByIDParams contains all the parameters to send to the API endpoint - - for the get protection policy by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionPolicyByIDParams struct { - - /* ID. - - Specifies a unique id of the Protection Policy to return. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection policy by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicyByIDParams) WithDefaults() *GetProtectionPolicyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection policy by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithTimeout(timeout time.Duration) *GetProtectionPolicyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithContext(ctx context.Context) *GetProtectionPolicyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithHTTPClient(client *http.Client) *GetProtectionPolicyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithID(id string) *GetProtectionPolicyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionPolicyByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_policies/get_protection_policy_by_id_responses.go b/v1/client/protection_policies/get_protection_policy_by_id_responses.go deleted file mode 100644 index 6d025467..00000000 --- a/v1/client/protection_policies/get_protection_policy_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionPolicyByIDReader is a Reader for the GetProtectionPolicyByID structure. -type GetProtectionPolicyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionPolicyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionPolicyByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionPolicyByIDDefault(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 - } -} - -// NewGetProtectionPolicyByIDOK creates a GetProtectionPolicyByIDOK with default headers values -func NewGetProtectionPolicyByIDOK() *GetProtectionPolicyByIDOK { - return &GetProtectionPolicyByIDOK{} -} - -/* -GetProtectionPolicyByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionPolicyByIDOK struct { - Payload *models.ProtectionPolicy -} - -// IsSuccess returns true when this get protection policy by Id o k response has a 2xx status code -func (o *GetProtectionPolicyByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection policy by Id o k response has a 3xx status code -func (o *GetProtectionPolicyByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection policy by Id o k response has a 4xx status code -func (o *GetProtectionPolicyByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection policy by Id o k response has a 5xx status code -func (o *GetProtectionPolicyByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection policy by Id o k response a status code equal to that given -func (o *GetProtectionPolicyByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection policy by Id o k response -func (o *GetProtectionPolicyByIDOK) Code() int { - return 200 -} - -func (o *GetProtectionPolicyByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies/{id}][%d] getProtectionPolicyByIdOK %s", 200, payload) -} - -func (o *GetProtectionPolicyByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies/{id}][%d] getProtectionPolicyByIdOK %s", 200, payload) -} - -func (o *GetProtectionPolicyByIDOK) GetPayload() *models.ProtectionPolicy { - return o.Payload -} - -func (o *GetProtectionPolicyByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionPolicyByIDDefault creates a GetProtectionPolicyByIDDefault with default headers values -func NewGetProtectionPolicyByIDDefault(code int) *GetProtectionPolicyByIDDefault { - return &GetProtectionPolicyByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectionPolicyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionPolicyByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection policy by Id default response has a 2xx status code -func (o *GetProtectionPolicyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection policy by Id default response has a 3xx status code -func (o *GetProtectionPolicyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection policy by Id default response has a 4xx status code -func (o *GetProtectionPolicyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection policy by Id default response has a 5xx status code -func (o *GetProtectionPolicyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection policy by Id default response a status code equal to that given -func (o *GetProtectionPolicyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection policy by Id default response -func (o *GetProtectionPolicyByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionPolicyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies/{id}][%d] GetProtectionPolicyById default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicies/{id}][%d] GetProtectionPolicyById default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicyByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionPolicyByIDDefault) 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_policies/get_protection_policy_summary_parameters.go b/v1/client/protection_policies/get_protection_policy_summary_parameters.go deleted file mode 100644 index f528b252..00000000 --- a/v1/client/protection_policies/get_protection_policy_summary_parameters.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/go-openapi/swag" -) - -// NewGetProtectionPolicySummaryParams creates a new GetProtectionPolicySummaryParams 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 NewGetProtectionPolicySummaryParams() *GetProtectionPolicySummaryParams { - return &GetProtectionPolicySummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionPolicySummaryParamsWithTimeout creates a new GetProtectionPolicySummaryParams object -// with the ability to set a timeout on a request. -func NewGetProtectionPolicySummaryParamsWithTimeout(timeout time.Duration) *GetProtectionPolicySummaryParams { - return &GetProtectionPolicySummaryParams{ - timeout: timeout, - } -} - -// NewGetProtectionPolicySummaryParamsWithContext creates a new GetProtectionPolicySummaryParams object -// with the ability to set a context for a request. -func NewGetProtectionPolicySummaryParamsWithContext(ctx context.Context) *GetProtectionPolicySummaryParams { - return &GetProtectionPolicySummaryParams{ - Context: ctx, - } -} - -// NewGetProtectionPolicySummaryParamsWithHTTPClient creates a new GetProtectionPolicySummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionPolicySummaryParamsWithHTTPClient(client *http.Client) *GetProtectionPolicySummaryParams { - return &GetProtectionPolicySummaryParams{ - HTTPClient: client, - } -} - -/* -GetProtectionPolicySummaryParams contains all the parameters to send to the API endpoint - - for the get protection policy summary operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionPolicySummaryParams struct { - - /* EndTimeUsecs. - - Filter by a end time specified as a Unix epoch Timestamp - (in microseconds). Only Job Runs that completed before the specified - end time are included int he aggregated runs summary result. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ID. - - Specifies the id of the policy whose summary should be retrieved. If this is not - set, the API will return error. - */ - ID string - - /* IncludeAggregatedLastRunSummary. - - Specifies whether to include summary of the last Protection Run of - each Protection Source. - */ - IncludeAggregatedLastRunSummary *bool - - /* IncludeAggregatedRunsSummary. - - Specifies whether to include summary of all Protection Runs of the - Protection Source or Protection Jobs. If this is set to true, then - only the Protection Runs from the provided 'startTimeUsecs' and - 'endTimeUsecs' are processed. - */ - IncludeAggregatedRunsSummary *bool - - /* PageCount. - - Specifies the limit of the number of Protection Sources or Protection Jobs - to be returned as a part of the Protection Policy Summary. - - Format: int64 - */ - PageCount *int64 - - /* PaginationCookie. - - If set, i.e. there are more results to display, use this value to get - the next set of results, by using this value in paginationCookie param - for the next request to GetProtectionPolicySummary. - */ - PaginationCookie *string - - /* StartTimeUsecs. - - Filter by a start time specified as a Unix epoch Timestamp - (in microseconds). Only Job Runs that started after the specified - time are included in the aggregated runs summary result. - - Format: int64 - */ - StartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection policy summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicySummaryParams) WithDefaults() *GetProtectionPolicySummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection policy summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicySummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithTimeout(timeout time.Duration) *GetProtectionPolicySummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithContext(ctx context.Context) *GetProtectionPolicySummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithHTTPClient(client *http.Client) *GetProtectionPolicySummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionPolicySummaryParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithID adds the id to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithID(id string) *GetProtectionPolicySummaryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetID(id string) { - o.ID = id -} - -// WithIncludeAggregatedLastRunSummary adds the includeAggregatedLastRunSummary to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithIncludeAggregatedLastRunSummary(includeAggregatedLastRunSummary *bool) *GetProtectionPolicySummaryParams { - o.SetIncludeAggregatedLastRunSummary(includeAggregatedLastRunSummary) - return o -} - -// SetIncludeAggregatedLastRunSummary adds the includeAggregatedLastRunSummary to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetIncludeAggregatedLastRunSummary(includeAggregatedLastRunSummary *bool) { - o.IncludeAggregatedLastRunSummary = includeAggregatedLastRunSummary -} - -// WithIncludeAggregatedRunsSummary adds the includeAggregatedRunsSummary to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithIncludeAggregatedRunsSummary(includeAggregatedRunsSummary *bool) *GetProtectionPolicySummaryParams { - o.SetIncludeAggregatedRunsSummary(includeAggregatedRunsSummary) - return o -} - -// SetIncludeAggregatedRunsSummary adds the includeAggregatedRunsSummary to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetIncludeAggregatedRunsSummary(includeAggregatedRunsSummary *bool) { - o.IncludeAggregatedRunsSummary = includeAggregatedRunsSummary -} - -// WithPageCount adds the pageCount to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithPageCount(pageCount *int64) *GetProtectionPolicySummaryParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithPaginationCookie adds the paginationCookie to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithPaginationCookie(paginationCookie *string) *GetProtectionPolicySummaryParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionPolicySummaryParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection policy summary params -func (o *GetProtectionPolicySummaryParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionPolicySummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - // query param id - qrID := o.ID - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - - if o.IncludeAggregatedLastRunSummary != nil { - - // query param includeAggregatedLastRunSummary - var qrIncludeAggregatedLastRunSummary bool - - if o.IncludeAggregatedLastRunSummary != nil { - qrIncludeAggregatedLastRunSummary = *o.IncludeAggregatedLastRunSummary - } - qIncludeAggregatedLastRunSummary := swag.FormatBool(qrIncludeAggregatedLastRunSummary) - if qIncludeAggregatedLastRunSummary != "" { - - if err := r.SetQueryParam("includeAggregatedLastRunSummary", qIncludeAggregatedLastRunSummary); err != nil { - return err - } - } - } - - if o.IncludeAggregatedRunsSummary != nil { - - // query param includeAggregatedRunsSummary - var qrIncludeAggregatedRunsSummary bool - - if o.IncludeAggregatedRunsSummary != nil { - qrIncludeAggregatedRunsSummary = *o.IncludeAggregatedRunsSummary - } - qIncludeAggregatedRunsSummary := swag.FormatBool(qrIncludeAggregatedRunsSummary) - if qIncludeAggregatedRunsSummary != "" { - - if err := r.SetQueryParam("includeAggregatedRunsSummary", qIncludeAggregatedRunsSummary); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - 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.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_policies/get_protection_policy_summary_responses.go b/v1/client/protection_policies/get_protection_policy_summary_responses.go deleted file mode 100644 index 51214c43..00000000 --- a/v1/client/protection_policies/get_protection_policy_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionPolicySummaryReader is a Reader for the GetProtectionPolicySummary structure. -type GetProtectionPolicySummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionPolicySummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionPolicySummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionPolicySummaryDefault(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 - } -} - -// NewGetProtectionPolicySummaryOK creates a GetProtectionPolicySummaryOK with default headers values -func NewGetProtectionPolicySummaryOK() *GetProtectionPolicySummaryOK { - return &GetProtectionPolicySummaryOK{} -} - -/* -GetProtectionPolicySummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionPolicySummaryOK struct { - Payload *models.ProtectionPolicySummary -} - -// IsSuccess returns true when this get protection policy summary o k response has a 2xx status code -func (o *GetProtectionPolicySummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection policy summary o k response has a 3xx status code -func (o *GetProtectionPolicySummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection policy summary o k response has a 4xx status code -func (o *GetProtectionPolicySummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection policy summary o k response has a 5xx status code -func (o *GetProtectionPolicySummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection policy summary o k response a status code equal to that given -func (o *GetProtectionPolicySummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection policy summary o k response -func (o *GetProtectionPolicySummaryOK) Code() int { - return 200 -} - -func (o *GetProtectionPolicySummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicySummary][%d] getProtectionPolicySummaryOK %s", 200, payload) -} - -func (o *GetProtectionPolicySummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicySummary][%d] getProtectionPolicySummaryOK %s", 200, payload) -} - -func (o *GetProtectionPolicySummaryOK) GetPayload() *models.ProtectionPolicySummary { - return o.Payload -} - -func (o *GetProtectionPolicySummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicySummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionPolicySummaryDefault creates a GetProtectionPolicySummaryDefault with default headers values -func NewGetProtectionPolicySummaryDefault(code int) *GetProtectionPolicySummaryDefault { - return &GetProtectionPolicySummaryDefault{ - _statusCode: code, - } -} - -/* -GetProtectionPolicySummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionPolicySummaryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection policy summary default response has a 2xx status code -func (o *GetProtectionPolicySummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection policy summary default response has a 3xx status code -func (o *GetProtectionPolicySummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection policy summary default response has a 4xx status code -func (o *GetProtectionPolicySummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection policy summary default response has a 5xx status code -func (o *GetProtectionPolicySummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection policy summary default response a status code equal to that given -func (o *GetProtectionPolicySummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection policy summary default response -func (o *GetProtectionPolicySummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionPolicySummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicySummary][%d] GetProtectionPolicySummary default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicySummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionPolicySummary][%d] GetProtectionPolicySummary default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicySummaryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionPolicySummaryDefault) 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_policies/protection_policies_client.go b/v1/client/protection_policies/protection_policies_client.go deleted file mode 100644 index 23f50444..00000000 --- a/v1/client/protection_policies/protection_policies_client.go +++ /dev/null @@ -1,316 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection policies API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection policies API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection policies API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection policies API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateProtectionPolicy(params *CreateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionPolicyCreated, error) - - DeleteProtectionPolicy(params *DeleteProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionPolicyNoContent, error) - - GetProtectionPolicies(params *GetProtectionPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPoliciesOK, error) - - GetProtectionPolicyByID(params *GetProtectionPolicyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicyByIDOK, error) - - GetProtectionPolicySummary(params *GetProtectionPolicySummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicySummaryOK, error) - - UpdateProtectionPolicy(params *UpdateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionPolicyOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateProtectionPolicy creates a protection policy - -Returns the created Protection Policy. -*/ -func (a *Client) CreateProtectionPolicy(params *CreateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionPolicyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "CreateProtectionPolicy", - Method: "POST", - PathPattern: "/public/protectionPolicies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateProtectionPolicyReader{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.(*CreateProtectionPolicyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateProtectionPolicyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteProtectionPolicy deletes a protection policy - -Returns Success if the Protection Policy is deleted. -*/ -func (a *Client) DeleteProtectionPolicy(params *DeleteProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionPolicyNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteProtectionPolicy", - Method: "DELETE", - PathPattern: "/public/protectionPolicies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteProtectionPolicyReader{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.(*DeleteProtectionPolicyNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteProtectionPolicyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionPolicies lists protection policies filtered by some parameters - - If no parameters are specified, all Protection Policies currently on the - -Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetProtectionPolicies(params *GetProtectionPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPoliciesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionPoliciesParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionPolicies", - Method: "GET", - PathPattern: "/public/protectionPolicies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionPoliciesReader{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.(*GetProtectionPoliciesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionPoliciesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionPolicyByID lists details about a single protection policy - -Returns the Protection Policy corresponding to the specified Policy Id. -*/ -func (a *Client) GetProtectionPolicyByID(params *GetProtectionPolicyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicyByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionPolicyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionPolicyById", - Method: "GET", - PathPattern: "/public/protectionPolicies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionPolicyByIDReader{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.(*GetProtectionPolicyByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionPolicyByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionPolicySummary lists protection policy summary -*/ -func (a *Client) GetProtectionPolicySummary(params *GetProtectionPolicySummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicySummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionPolicySummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionPolicySummary", - Method: "GET", - PathPattern: "/public/protectionPolicySummary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionPolicySummaryReader{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.(*GetProtectionPolicySummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionPolicySummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionPolicy updates a protection policy - -Returns the updated Protection Policy. -*/ -func (a *Client) UpdateProtectionPolicy(params *UpdateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionPolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionPolicy", - Method: "PUT", - PathPattern: "/public/protectionPolicies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionPolicyReader{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.(*UpdateProtectionPolicyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionPolicyDefault) - 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/protection_policies/update_protection_policy_parameters.go b/v1/client/protection_policies/update_protection_policy_parameters.go deleted file mode 100644 index 10ff7518..00000000 --- a/v1/client/protection_policies/update_protection_policy_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionPolicyParams creates a new UpdateProtectionPolicyParams 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 NewUpdateProtectionPolicyParams() *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionPolicyParamsWithTimeout creates a new UpdateProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionPolicyParamsWithTimeout(timeout time.Duration) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionPolicyParamsWithContext creates a new UpdateProtectionPolicyParams object -// with the ability to set a context for a request. -func NewUpdateProtectionPolicyParamsWithContext(ctx context.Context) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - Context: ctx, - } -} - -// NewUpdateProtectionPolicyParamsWithHTTPClient creates a new UpdateProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionPolicyParamsWithHTTPClient(client *http.Client) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the update protection policy operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionPolicyParams struct { - - /* Body. - - Request to update a Protection Policy. - */ - Body *models.ProtectionPolicyRequest - - /* ID. - - Specifies a unique id of the Protection Policy to return. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionPolicyParams) WithDefaults() *UpdateProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithTimeout(timeout time.Duration) *UpdateProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithContext(ctx context.Context) *UpdateProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithHTTPClient(client *http.Client) *UpdateProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithBody(body *models.ProtectionPolicyRequest) *UpdateProtectionPolicyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetBody(body *models.ProtectionPolicyRequest) { - o.Body = body -} - -// WithID adds the id to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithID(id string) *UpdateProtectionPolicyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionPolicyParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_policies/update_protection_policy_responses.go b/v1/client/protection_policies/update_protection_policy_responses.go deleted file mode 100644 index cad3db38..00000000 --- a/v1/client/protection_policies/update_protection_policy_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_policies - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionPolicyReader is a Reader for the UpdateProtectionPolicy structure. -type UpdateProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionPolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionPolicyDefault(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 - } -} - -// NewUpdateProtectionPolicyOK creates a UpdateProtectionPolicyOK with default headers values -func NewUpdateProtectionPolicyOK() *UpdateProtectionPolicyOK { - return &UpdateProtectionPolicyOK{} -} - -/* -UpdateProtectionPolicyOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionPolicyOK struct { - Payload *models.ProtectionPolicy -} - -// IsSuccess returns true when this update protection policy o k response has a 2xx status code -func (o *UpdateProtectionPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection policy o k response has a 3xx status code -func (o *UpdateProtectionPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection policy o k response has a 4xx status code -func (o *UpdateProtectionPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection policy o k response has a 5xx status code -func (o *UpdateProtectionPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection policy o k response a status code equal to that given -func (o *UpdateProtectionPolicyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection policy o k response -func (o *UpdateProtectionPolicyOK) Code() int { - return 200 -} - -func (o *UpdateProtectionPolicyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionPolicies/{id}][%d] updateProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateProtectionPolicyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionPolicies/{id}][%d] updateProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateProtectionPolicyOK) GetPayload() *models.ProtectionPolicy { - return o.Payload -} - -func (o *UpdateProtectionPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionPolicyDefault creates a UpdateProtectionPolicyDefault with default headers values -func NewUpdateProtectionPolicyDefault(code int) *UpdateProtectionPolicyDefault { - return &UpdateProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionPolicyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection policy default response has a 2xx status code -func (o *UpdateProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection policy default response has a 3xx status code -func (o *UpdateProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection policy default response has a 4xx status code -func (o *UpdateProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection policy default response has a 5xx status code -func (o *UpdateProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection policy default response a status code equal to that given -func (o *UpdateProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection policy default response -func (o *UpdateProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionPolicies/{id}][%d] UpdateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionPolicies/{id}][%d] UpdateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionPolicyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionPolicyDefault) 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_runs/cancel_protection_job_run_parameters.go b/v1/client/protection_runs/cancel_protection_job_run_parameters.go deleted file mode 100644 index 84228fe5..00000000 --- a/v1/client/protection_runs/cancel_protection_job_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCancelProtectionJobRunParams creates a new CancelProtectionJobRunParams 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 NewCancelProtectionJobRunParams() *CancelProtectionJobRunParams { - return &CancelProtectionJobRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelProtectionJobRunParamsWithTimeout creates a new CancelProtectionJobRunParams object -// with the ability to set a timeout on a request. -func NewCancelProtectionJobRunParamsWithTimeout(timeout time.Duration) *CancelProtectionJobRunParams { - return &CancelProtectionJobRunParams{ - timeout: timeout, - } -} - -// NewCancelProtectionJobRunParamsWithContext creates a new CancelProtectionJobRunParams object -// with the ability to set a context for a request. -func NewCancelProtectionJobRunParamsWithContext(ctx context.Context) *CancelProtectionJobRunParams { - return &CancelProtectionJobRunParams{ - Context: ctx, - } -} - -// NewCancelProtectionJobRunParamsWithHTTPClient creates a new CancelProtectionJobRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelProtectionJobRunParamsWithHTTPClient(client *http.Client) *CancelProtectionJobRunParams { - return &CancelProtectionJobRunParams{ - HTTPClient: client, - } -} - -/* -CancelProtectionJobRunParams contains all the parameters to send to the API endpoint - - for the cancel protection job run operation. - - Typically these are written to a http.Request. -*/ -type CancelProtectionJobRunParams struct { - - // Body. - Body *models.CancelProtectionJobRunParam - - /* ID. - - Specifies a unique id of the Protection Job. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel protection job run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelProtectionJobRunParams) WithDefaults() *CancelProtectionJobRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel protection job run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelProtectionJobRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel protection job run params -func (o *CancelProtectionJobRunParams) WithTimeout(timeout time.Duration) *CancelProtectionJobRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel protection job run params -func (o *CancelProtectionJobRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel protection job run params -func (o *CancelProtectionJobRunParams) WithContext(ctx context.Context) *CancelProtectionJobRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel protection job run params -func (o *CancelProtectionJobRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel protection job run params -func (o *CancelProtectionJobRunParams) WithHTTPClient(client *http.Client) *CancelProtectionJobRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel protection job run params -func (o *CancelProtectionJobRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cancel protection job run params -func (o *CancelProtectionJobRunParams) WithBody(body *models.CancelProtectionJobRunParam) *CancelProtectionJobRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cancel protection job run params -func (o *CancelProtectionJobRunParams) SetBody(body *models.CancelProtectionJobRunParam) { - o.Body = body -} - -// WithID adds the id to the cancel protection job run params -func (o *CancelProtectionJobRunParams) WithID(id int64) *CancelProtectionJobRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel protection job run params -func (o *CancelProtectionJobRunParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelProtectionJobRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_runs/cancel_protection_job_run_responses.go b/v1/client/protection_runs/cancel_protection_job_run_responses.go deleted file mode 100644 index e957ccf0..00000000 --- a/v1/client/protection_runs/cancel_protection_job_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CancelProtectionJobRunReader is a Reader for the CancelProtectionJobRun structure. -type CancelProtectionJobRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelProtectionJobRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCancelProtectionJobRunNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelProtectionJobRunDefault(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 - } -} - -// NewCancelProtectionJobRunNoContent creates a CancelProtectionJobRunNoContent with default headers values -func NewCancelProtectionJobRunNoContent() *CancelProtectionJobRunNoContent { - return &CancelProtectionJobRunNoContent{} -} - -/* -CancelProtectionJobRunNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CancelProtectionJobRunNoContent struct { -} - -// IsSuccess returns true when this cancel protection job run no content response has a 2xx status code -func (o *CancelProtectionJobRunNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel protection job run no content response has a 3xx status code -func (o *CancelProtectionJobRunNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel protection job run no content response has a 4xx status code -func (o *CancelProtectionJobRunNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel protection job run no content response has a 5xx status code -func (o *CancelProtectionJobRunNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel protection job run no content response a status code equal to that given -func (o *CancelProtectionJobRunNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the cancel protection job run no content response -func (o *CancelProtectionJobRunNoContent) Code() int { - return 204 -} - -func (o *CancelProtectionJobRunNoContent) Error() string { - return fmt.Sprintf("[POST /public/protectionRuns/cancel/{id}][%d] cancelProtectionJobRunNoContent", 204) -} - -func (o *CancelProtectionJobRunNoContent) String() string { - return fmt.Sprintf("[POST /public/protectionRuns/cancel/{id}][%d] cancelProtectionJobRunNoContent", 204) -} - -func (o *CancelProtectionJobRunNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelProtectionJobRunDefault creates a CancelProtectionJobRunDefault with default headers values -func NewCancelProtectionJobRunDefault(code int) *CancelProtectionJobRunDefault { - return &CancelProtectionJobRunDefault{ - _statusCode: code, - } -} - -/* -CancelProtectionJobRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelProtectionJobRunDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this cancel protection job run default response has a 2xx status code -func (o *CancelProtectionJobRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel protection job run default response has a 3xx status code -func (o *CancelProtectionJobRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel protection job run default response has a 4xx status code -func (o *CancelProtectionJobRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel protection job run default response has a 5xx status code -func (o *CancelProtectionJobRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel protection job run default response a status code equal to that given -func (o *CancelProtectionJobRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel protection job run default response -func (o *CancelProtectionJobRunDefault) Code() int { - return o._statusCode -} - -func (o *CancelProtectionJobRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionRuns/cancel/{id}][%d] CancelProtectionJobRun default %s", o._statusCode, payload) -} - -func (o *CancelProtectionJobRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionRuns/cancel/{id}][%d] CancelProtectionJobRun default %s", o._statusCode, payload) -} - -func (o *CancelProtectionJobRunDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CancelProtectionJobRunDefault) 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_runs/get_protection_run_errors_parameters.go b/v1/client/protection_runs/get_protection_run_errors_parameters.go deleted file mode 100644 index dad17439..00000000 --- a/v1/client/protection_runs/get_protection_run_errors_parameters.go +++ /dev/null @@ -1,291 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunErrorsParams creates a new GetProtectionRunErrorsParams 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 NewGetProtectionRunErrorsParams() *GetProtectionRunErrorsParams { - return &GetProtectionRunErrorsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunErrorsParamsWithTimeout creates a new GetProtectionRunErrorsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunErrorsParamsWithTimeout(timeout time.Duration) *GetProtectionRunErrorsParams { - return &GetProtectionRunErrorsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunErrorsParamsWithContext creates a new GetProtectionRunErrorsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunErrorsParamsWithContext(ctx context.Context) *GetProtectionRunErrorsParams { - return &GetProtectionRunErrorsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunErrorsParamsWithHTTPClient creates a new GetProtectionRunErrorsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunErrorsParamsWithHTTPClient(client *http.Client) *GetProtectionRunErrorsParams { - return &GetProtectionRunErrorsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunErrorsParams contains all the parameters to send to the API endpoint - - for the get protection run errors operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunErrorsParams struct { - - /* JobID. - - Specifies the id of the Protection Job whose runs are to be returned. - This field is required. - - Format: int64 - */ - JobID int64 - - /* LimitNumberOfErrors. - - Specifies the number of the results expected. - - Format: int64 - */ - LimitNumberOfErrors *int64 - - /* PaginationCookie. - - Specifies the cookie for next set of results. - */ - PaginationCookie *string - - /* StartTimeUsecs. - - Specifies the time when the Job Run started as a - Unix epoch Timestamp (in microseconds). - This field is required - - Format: int64 - */ - StartTimeUsecs int64 - - /* TaskID. - - Specifies the id of the Protection Run task for which errors are to be - returned. This field is required to get the errors list. - - Format: int64 - */ - TaskID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection run errors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunErrorsParams) WithDefaults() *GetProtectionRunErrorsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection run errors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunErrorsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithTimeout(timeout time.Duration) *GetProtectionRunErrorsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithContext(ctx context.Context) *GetProtectionRunErrorsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithHTTPClient(client *http.Client) *GetProtectionRunErrorsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithJobID adds the jobID to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithJobID(jobID int64) *GetProtectionRunErrorsParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithLimitNumberOfErrors adds the limitNumberOfErrors to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithLimitNumberOfErrors(limitNumberOfErrors *int64) *GetProtectionRunErrorsParams { - o.SetLimitNumberOfErrors(limitNumberOfErrors) - return o -} - -// SetLimitNumberOfErrors adds the limitNumberOfErrors to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetLimitNumberOfErrors(limitNumberOfErrors *int64) { - o.LimitNumberOfErrors = limitNumberOfErrors -} - -// WithPaginationCookie adds the paginationCookie to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithPaginationCookie(paginationCookie *string) *GetProtectionRunErrorsParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithStartTimeUsecs(startTimeUsecs int64) *GetProtectionRunErrorsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTaskID adds the taskID to the get protection run errors params -func (o *GetProtectionRunErrorsParams) WithTaskID(taskID int64) *GetProtectionRunErrorsParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the get protection run errors params -func (o *GetProtectionRunErrorsParams) SetTaskID(taskID int64) { - o.TaskID = taskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunErrorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - if o.LimitNumberOfErrors != nil { - - // query param limitNumberOfErrors - var qrLimitNumberOfErrors int64 - - if o.LimitNumberOfErrors != nil { - qrLimitNumberOfErrors = *o.LimitNumberOfErrors - } - qLimitNumberOfErrors := swag.FormatInt64(qrLimitNumberOfErrors) - if qLimitNumberOfErrors != "" { - - if err := r.SetQueryParam("limitNumberOfErrors", qLimitNumberOfErrors); err != nil { - return err - } - } - } - - 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 - } - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - // query param taskId - qrTaskID := o.TaskID - qTaskID := swag.FormatInt64(qrTaskID) - if qTaskID != "" { - - if err := r.SetQueryParam("taskId", qTaskID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_runs/get_protection_run_errors_responses.go b/v1/client/protection_runs/get_protection_run_errors_responses.go deleted file mode 100644 index 5b0d6ee8..00000000 --- a/v1/client/protection_runs/get_protection_run_errors_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionRunErrorsReader is a Reader for the GetProtectionRunErrors structure. -type GetProtectionRunErrorsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunErrorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunErrorsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunErrorsDefault(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 - } -} - -// NewGetProtectionRunErrorsOK creates a GetProtectionRunErrorsOK with default headers values -func NewGetProtectionRunErrorsOK() *GetProtectionRunErrorsOK { - return &GetProtectionRunErrorsOK{} -} - -/* -GetProtectionRunErrorsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunErrorsOK struct { - Payload *models.ProtectionRunErrors -} - -// IsSuccess returns true when this get protection run errors o k response has a 2xx status code -func (o *GetProtectionRunErrorsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection run errors o k response has a 3xx status code -func (o *GetProtectionRunErrorsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection run errors o k response has a 4xx status code -func (o *GetProtectionRunErrorsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection run errors o k response has a 5xx status code -func (o *GetProtectionRunErrorsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection run errors o k response a status code equal to that given -func (o *GetProtectionRunErrorsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection run errors o k response -func (o *GetProtectionRunErrorsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunErrorsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns/errors][%d] getProtectionRunErrorsOK %s", 200, payload) -} - -func (o *GetProtectionRunErrorsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns/errors][%d] getProtectionRunErrorsOK %s", 200, payload) -} - -func (o *GetProtectionRunErrorsOK) GetPayload() *models.ProtectionRunErrors { - return o.Payload -} - -func (o *GetProtectionRunErrorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionRunErrors) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunErrorsDefault creates a GetProtectionRunErrorsDefault with default headers values -func NewGetProtectionRunErrorsDefault(code int) *GetProtectionRunErrorsDefault { - return &GetProtectionRunErrorsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunErrorsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunErrorsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection run errors default response has a 2xx status code -func (o *GetProtectionRunErrorsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection run errors default response has a 3xx status code -func (o *GetProtectionRunErrorsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection run errors default response has a 4xx status code -func (o *GetProtectionRunErrorsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection run errors default response has a 5xx status code -func (o *GetProtectionRunErrorsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection run errors default response a status code equal to that given -func (o *GetProtectionRunErrorsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection run errors default response -func (o *GetProtectionRunErrorsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunErrorsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns/errors][%d] GetProtectionRunErrors default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunErrorsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns/errors][%d] GetProtectionRunErrors default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunErrorsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionRunErrorsDefault) 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_runs/get_protection_runs_parameters.go b/v1/client/protection_runs/get_protection_runs_parameters.go deleted file mode 100644 index 7ff25cdd..00000000 --- a/v1/client/protection_runs/get_protection_runs_parameters.go +++ /dev/null @@ -1,743 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunsParams creates a new GetProtectionRunsParams 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 NewGetProtectionRunsParams() *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunsParamsWithTimeout creates a new GetProtectionRunsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunsParamsWithTimeout(timeout time.Duration) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunsParamsWithContext creates a new GetProtectionRunsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunsParamsWithContext(ctx context.Context) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunsParamsWithHTTPClient creates a new GetProtectionRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunsParamsWithHTTPClient(client *http.Client) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunsParams contains all the parameters to send to the API endpoint - - for the get protection runs operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunsParams struct { - - /* CopyRunTypes. - - Following field contains a list of valid CopyTarget i.e Replication, - Archival representing the types of copy runs needed to be looked at - the given time window, denoted via TimeRange. - This input is only considered valid when - filterByCopyTaskEndTime is set to true. Else it is ignored. - */ - CopyRunTypes []string - - /* EndTimeUsecs. - - Filter by a end time specified as a Unix epoch Timestamp - (in microseconds). Only Job Runs that completed before the specified - end time are returned. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ExcludeErrorRuns. - - Filter out Jobs Runs with errors by setting this field to 'true'. - If not set or set to 'false', Job Runs with errors are returned. - */ - ExcludeErrorRuns *bool - - /* ExcludeNonRestoreableRuns. - - Filter out jobs runs that cannot be restored by setting this field to - 'true'. If not set or set to 'false', Runs without any successful - object will be returned. The default value is false. - */ - ExcludeNonRestoreableRuns *bool - - /* ExcludeTasks. - - If true, the individual backup status for all the objects protected by - the Job Run are not populated in the response. For example in a VMware - environment, the status of backing up each VM associated with a Job - is not returned. - */ - ExcludeTasks *bool - - /* FilterByCopyTaskEndTime. - - If true, then the details of the backup runs along with CopyRuns will be - returned where those backup run has atleast one CopyTask that is completed - in the given Time Range. If this field is true, then other filters such as - filterByEndTime should not be applied. - */ - FilterByCopyTaskEndTime *bool - - /* FilterByEndTime. - - If true, the runs with end time within the specified time range will be - returned. Otherwise, the runs with start time in the time range are - returned. - */ - FilterByEndTime *bool - - /* IncludeRpoSnapshots. - - If true, then the snapshots for Protection Sources protected by Rpo - policies will also be returned. - */ - IncludeRpoSnapshots *bool - - /* JobID. - - Filter by a Protection Job that is specified by id. - If not specified, all Job Runs for all Protection Jobs are returned. - - Format: int64 - */ - JobID *int64 - - /* NumRuns. - - Specify the number of Job Runs to return. - The newest Job Runs are returned. - - Format: int64 - */ - NumRuns *int64 - - /* OnlyIncludeSuccessfulCopyRuns. - - If marked false, all CopyTasks in any finished state like cancelled, - failed in the given time window will be considered. Otherwise if kept - empty or marked as true, only the copy_tasks with kSuccess status will - be considered. This input is only considered valid when - filterByCopyTaskEndTime is set to true. Else it is ignored. - */ - OnlyIncludeSuccessfulCopyRuns *bool - - /* OnlyReturnShellInfo. - - If passed as true, then only returns the summary information about run - including details such as runs start time, status, type etc. It does not - include extra details such as attempt/task info etc. - */ - OnlyReturnShellInfo *bool - - /* RunTypes. - - Filter by run type such as 'kFull', 'kRegular' or 'kLog'. - If not specified, Job Runs of all types are returned. - */ - RunTypes []string - - /* SourceID. - - Filter by source id. Only Job Runs protecting the specified source - (such as a VM or View) are returned. The source id - is assigned by the Cohesity Cluster. - - Format: int64 - */ - SourceID *int64 - - /* StartTimeUsecs. - - Filter by a start time. Only Job Runs that started after the specified - time are returned. - Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* StartedTimeUsecs. - - Return a specific Job Run by specifying a time and a jobId. - Specify the time when the Job Run started as a - Unix epoch Timestamp (in microseconds). - If this field is specified, jobId must also be - specified. - - Format: int64 - */ - StartedTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsParams) WithDefaults() *GetProtectionRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection runs params -func (o *GetProtectionRunsParams) WithTimeout(timeout time.Duration) *GetProtectionRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection runs params -func (o *GetProtectionRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection runs params -func (o *GetProtectionRunsParams) WithContext(ctx context.Context) *GetProtectionRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection runs params -func (o *GetProtectionRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection runs params -func (o *GetProtectionRunsParams) WithHTTPClient(client *http.Client) *GetProtectionRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection runs params -func (o *GetProtectionRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCopyRunTypes adds the copyRunTypes to the get protection runs params -func (o *GetProtectionRunsParams) WithCopyRunTypes(copyRunTypes []string) *GetProtectionRunsParams { - o.SetCopyRunTypes(copyRunTypes) - return o -} - -// SetCopyRunTypes adds the copyRunTypes to the get protection runs params -func (o *GetProtectionRunsParams) SetCopyRunTypes(copyRunTypes []string) { - o.CopyRunTypes = copyRunTypes -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionRunsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithExcludeErrorRuns adds the excludeErrorRuns to the get protection runs params -func (o *GetProtectionRunsParams) WithExcludeErrorRuns(excludeErrorRuns *bool) *GetProtectionRunsParams { - o.SetExcludeErrorRuns(excludeErrorRuns) - return o -} - -// SetExcludeErrorRuns adds the excludeErrorRuns to the get protection runs params -func (o *GetProtectionRunsParams) SetExcludeErrorRuns(excludeErrorRuns *bool) { - o.ExcludeErrorRuns = excludeErrorRuns -} - -// WithExcludeNonRestoreableRuns adds the excludeNonRestoreableRuns to the get protection runs params -func (o *GetProtectionRunsParams) WithExcludeNonRestoreableRuns(excludeNonRestoreableRuns *bool) *GetProtectionRunsParams { - o.SetExcludeNonRestoreableRuns(excludeNonRestoreableRuns) - return o -} - -// SetExcludeNonRestoreableRuns adds the excludeNonRestoreableRuns to the get protection runs params -func (o *GetProtectionRunsParams) SetExcludeNonRestoreableRuns(excludeNonRestoreableRuns *bool) { - o.ExcludeNonRestoreableRuns = excludeNonRestoreableRuns -} - -// WithExcludeTasks adds the excludeTasks to the get protection runs params -func (o *GetProtectionRunsParams) WithExcludeTasks(excludeTasks *bool) *GetProtectionRunsParams { - o.SetExcludeTasks(excludeTasks) - return o -} - -// SetExcludeTasks adds the excludeTasks to the get protection runs params -func (o *GetProtectionRunsParams) SetExcludeTasks(excludeTasks *bool) { - o.ExcludeTasks = excludeTasks -} - -// WithFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get protection runs params -func (o *GetProtectionRunsParams) WithFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) *GetProtectionRunsParams { - o.SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime) - return o -} - -// SetFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get protection runs params -func (o *GetProtectionRunsParams) SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) { - o.FilterByCopyTaskEndTime = filterByCopyTaskEndTime -} - -// WithFilterByEndTime adds the filterByEndTime to the get protection runs params -func (o *GetProtectionRunsParams) WithFilterByEndTime(filterByEndTime *bool) *GetProtectionRunsParams { - o.SetFilterByEndTime(filterByEndTime) - return o -} - -// SetFilterByEndTime adds the filterByEndTime to the get protection runs params -func (o *GetProtectionRunsParams) SetFilterByEndTime(filterByEndTime *bool) { - o.FilterByEndTime = filterByEndTime -} - -// WithIncludeRpoSnapshots adds the includeRpoSnapshots to the get protection runs params -func (o *GetProtectionRunsParams) WithIncludeRpoSnapshots(includeRpoSnapshots *bool) *GetProtectionRunsParams { - o.SetIncludeRpoSnapshots(includeRpoSnapshots) - return o -} - -// SetIncludeRpoSnapshots adds the includeRpoSnapshots to the get protection runs params -func (o *GetProtectionRunsParams) SetIncludeRpoSnapshots(includeRpoSnapshots *bool) { - o.IncludeRpoSnapshots = includeRpoSnapshots -} - -// WithJobID adds the jobID to the get protection runs params -func (o *GetProtectionRunsParams) WithJobID(jobID *int64) *GetProtectionRunsParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get protection runs params -func (o *GetProtectionRunsParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WithNumRuns adds the numRuns to the get protection runs params -func (o *GetProtectionRunsParams) WithNumRuns(numRuns *int64) *GetProtectionRunsParams { - o.SetNumRuns(numRuns) - return o -} - -// SetNumRuns adds the numRuns to the get protection runs params -func (o *GetProtectionRunsParams) SetNumRuns(numRuns *int64) { - o.NumRuns = numRuns -} - -// WithOnlyIncludeSuccessfulCopyRuns adds the onlyIncludeSuccessfulCopyRuns to the get protection runs params -func (o *GetProtectionRunsParams) WithOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns *bool) *GetProtectionRunsParams { - o.SetOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns) - return o -} - -// SetOnlyIncludeSuccessfulCopyRuns adds the onlyIncludeSuccessfulCopyRuns to the get protection runs params -func (o *GetProtectionRunsParams) SetOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns *bool) { - o.OnlyIncludeSuccessfulCopyRuns = onlyIncludeSuccessfulCopyRuns -} - -// WithOnlyReturnShellInfo adds the onlyReturnShellInfo to the get protection runs params -func (o *GetProtectionRunsParams) WithOnlyReturnShellInfo(onlyReturnShellInfo *bool) *GetProtectionRunsParams { - o.SetOnlyReturnShellInfo(onlyReturnShellInfo) - return o -} - -// SetOnlyReturnShellInfo adds the onlyReturnShellInfo to the get protection runs params -func (o *GetProtectionRunsParams) SetOnlyReturnShellInfo(onlyReturnShellInfo *bool) { - o.OnlyReturnShellInfo = onlyReturnShellInfo -} - -// WithRunTypes adds the runTypes to the get protection runs params -func (o *GetProtectionRunsParams) WithRunTypes(runTypes []string) *GetProtectionRunsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get protection runs params -func (o *GetProtectionRunsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithSourceID adds the sourceID to the get protection runs params -func (o *GetProtectionRunsParams) WithSourceID(sourceID *int64) *GetProtectionRunsParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get protection runs params -func (o *GetProtectionRunsParams) SetSourceID(sourceID *int64) { - o.SourceID = sourceID -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionRunsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStartedTimeUsecs adds the startedTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) WithStartedTimeUsecs(startedTimeUsecs *int64) *GetProtectionRunsParams { - o.SetStartedTimeUsecs(startedTimeUsecs) - return o -} - -// SetStartedTimeUsecs adds the startedTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) SetStartedTimeUsecs(startedTimeUsecs *int64) { - o.StartedTimeUsecs = startedTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CopyRunTypes != nil { - - // binding items for copyRunTypes - joinedCopyRunTypes := o.bindParamCopyRunTypes(reg) - - // query array param copyRunTypes - if err := r.SetQueryParam("copyRunTypes", joinedCopyRunTypes...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeErrorRuns != nil { - - // query param excludeErrorRuns - var qrExcludeErrorRuns bool - - if o.ExcludeErrorRuns != nil { - qrExcludeErrorRuns = *o.ExcludeErrorRuns - } - qExcludeErrorRuns := swag.FormatBool(qrExcludeErrorRuns) - if qExcludeErrorRuns != "" { - - if err := r.SetQueryParam("excludeErrorRuns", qExcludeErrorRuns); err != nil { - return err - } - } - } - - if o.ExcludeNonRestoreableRuns != nil { - - // query param excludeNonRestoreableRuns - var qrExcludeNonRestoreableRuns bool - - if o.ExcludeNonRestoreableRuns != nil { - qrExcludeNonRestoreableRuns = *o.ExcludeNonRestoreableRuns - } - qExcludeNonRestoreableRuns := swag.FormatBool(qrExcludeNonRestoreableRuns) - if qExcludeNonRestoreableRuns != "" { - - if err := r.SetQueryParam("excludeNonRestoreableRuns", qExcludeNonRestoreableRuns); err != nil { - return err - } - } - } - - if o.ExcludeTasks != nil { - - // query param excludeTasks - var qrExcludeTasks bool - - if o.ExcludeTasks != nil { - qrExcludeTasks = *o.ExcludeTasks - } - qExcludeTasks := swag.FormatBool(qrExcludeTasks) - if qExcludeTasks != "" { - - if err := r.SetQueryParam("excludeTasks", qExcludeTasks); err != nil { - return err - } - } - } - - if o.FilterByCopyTaskEndTime != nil { - - // query param filterByCopyTaskEndTime - var qrFilterByCopyTaskEndTime bool - - if o.FilterByCopyTaskEndTime != nil { - qrFilterByCopyTaskEndTime = *o.FilterByCopyTaskEndTime - } - qFilterByCopyTaskEndTime := swag.FormatBool(qrFilterByCopyTaskEndTime) - if qFilterByCopyTaskEndTime != "" { - - if err := r.SetQueryParam("filterByCopyTaskEndTime", qFilterByCopyTaskEndTime); err != nil { - return err - } - } - } - - if o.FilterByEndTime != nil { - - // query param filterByEndTime - var qrFilterByEndTime bool - - if o.FilterByEndTime != nil { - qrFilterByEndTime = *o.FilterByEndTime - } - qFilterByEndTime := swag.FormatBool(qrFilterByEndTime) - if qFilterByEndTime != "" { - - if err := r.SetQueryParam("filterByEndTime", qFilterByEndTime); err != nil { - return err - } - } - } - - if o.IncludeRpoSnapshots != nil { - - // query param includeRpoSnapshots - var qrIncludeRpoSnapshots bool - - if o.IncludeRpoSnapshots != nil { - qrIncludeRpoSnapshots = *o.IncludeRpoSnapshots - } - qIncludeRpoSnapshots := swag.FormatBool(qrIncludeRpoSnapshots) - if qIncludeRpoSnapshots != "" { - - if err := r.SetQueryParam("includeRpoSnapshots", qIncludeRpoSnapshots); err != nil { - return err - } - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if o.NumRuns != nil { - - // query param numRuns - var qrNumRuns int64 - - if o.NumRuns != nil { - qrNumRuns = *o.NumRuns - } - qNumRuns := swag.FormatInt64(qrNumRuns) - if qNumRuns != "" { - - if err := r.SetQueryParam("numRuns", qNumRuns); err != nil { - return err - } - } - } - - if o.OnlyIncludeSuccessfulCopyRuns != nil { - - // query param onlyIncludeSuccessfulCopyRuns - var qrOnlyIncludeSuccessfulCopyRuns bool - - if o.OnlyIncludeSuccessfulCopyRuns != nil { - qrOnlyIncludeSuccessfulCopyRuns = *o.OnlyIncludeSuccessfulCopyRuns - } - qOnlyIncludeSuccessfulCopyRuns := swag.FormatBool(qrOnlyIncludeSuccessfulCopyRuns) - if qOnlyIncludeSuccessfulCopyRuns != "" { - - if err := r.SetQueryParam("onlyIncludeSuccessfulCopyRuns", qOnlyIncludeSuccessfulCopyRuns); err != nil { - return err - } - } - } - - if o.OnlyReturnShellInfo != nil { - - // query param onlyReturnShellInfo - var qrOnlyReturnShellInfo bool - - if o.OnlyReturnShellInfo != nil { - qrOnlyReturnShellInfo = *o.OnlyReturnShellInfo - } - qOnlyReturnShellInfo := swag.FormatBool(qrOnlyReturnShellInfo) - if qOnlyReturnShellInfo != "" { - - if err := r.SetQueryParam("onlyReturnShellInfo", qOnlyReturnShellInfo); err != nil { - return err - } - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.SourceID != nil { - - // query param sourceId - var qrSourceID int64 - - if o.SourceID != nil { - qrSourceID = *o.SourceID - } - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.StartedTimeUsecs != nil { - - // query param startedTimeUsecs - var qrStartedTimeUsecs int64 - - if o.StartedTimeUsecs != nil { - qrStartedTimeUsecs = *o.StartedTimeUsecs - } - qStartedTimeUsecs := swag.FormatInt64(qrStartedTimeUsecs) - if qStartedTimeUsecs != "" { - - if err := r.SetQueryParam("startedTimeUsecs", qStartedTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionRuns binds the parameter copyRunTypes -func (o *GetProtectionRunsParams) bindParamCopyRunTypes(formats strfmt.Registry) []string { - copyRunTypesIR := o.CopyRunTypes - - var copyRunTypesIC []string - for _, copyRunTypesIIR := range copyRunTypesIR { // explode []string - - copyRunTypesIIV := copyRunTypesIIR // string as string - copyRunTypesIC = append(copyRunTypesIC, copyRunTypesIIV) - } - - // items.CollectionFormat: "" - copyRunTypesIS := swag.JoinByFormat(copyRunTypesIC, "") - - return copyRunTypesIS -} - -// bindParamGetProtectionRuns binds the parameter runTypes -func (o *GetProtectionRunsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} diff --git a/v1/client/protection_runs/get_protection_runs_responses.go b/v1/client/protection_runs/get_protection_runs_responses.go deleted file mode 100644 index d81cd4af..00000000 --- a/v1/client/protection_runs/get_protection_runs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionRunsReader is a Reader for the GetProtectionRuns structure. -type GetProtectionRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunsDefault(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 - } -} - -// NewGetProtectionRunsOK creates a GetProtectionRunsOK with default headers values -func NewGetProtectionRunsOK() *GetProtectionRunsOK { - return &GetProtectionRunsOK{} -} - -/* -GetProtectionRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunsOK struct { - Payload []*models.ProtectionRunInstance -} - -// IsSuccess returns true when this get protection runs o k response has a 2xx status code -func (o *GetProtectionRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection runs o k response has a 3xx status code -func (o *GetProtectionRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection runs o k response has a 4xx status code -func (o *GetProtectionRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection runs o k response has a 5xx status code -func (o *GetProtectionRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection runs o k response a status code equal to that given -func (o *GetProtectionRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection runs o k response -func (o *GetProtectionRunsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns][%d] getProtectionRunsOK %s", 200, payload) -} - -func (o *GetProtectionRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns][%d] getProtectionRunsOK %s", 200, payload) -} - -func (o *GetProtectionRunsOK) GetPayload() []*models.ProtectionRunInstance { - return o.Payload -} - -func (o *GetProtectionRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunsDefault creates a GetProtectionRunsDefault with default headers values -func NewGetProtectionRunsDefault(code int) *GetProtectionRunsDefault { - return &GetProtectionRunsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection runs default response has a 2xx status code -func (o *GetProtectionRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection runs default response has a 3xx status code -func (o *GetProtectionRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection runs default response has a 4xx status code -func (o *GetProtectionRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection runs default response has a 5xx status code -func (o *GetProtectionRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection runs default response a status code equal to that given -func (o *GetProtectionRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection runs default response -func (o *GetProtectionRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns][%d] GetProtectionRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionRuns][%d] GetProtectionRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionRunsDefault) 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_runs/protection_runs_client.go b/v1/client/protection_runs/protection_runs_client.go deleted file mode 100644 index c7083a5b..00000000 --- a/v1/client/protection_runs/protection_runs_client.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection runs API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection runs API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection runs API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection runs API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CancelProtectionJobRun(params *CancelProtectionJobRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelProtectionJobRunNoContent, error) - - GetProtectionRunErrors(params *GetProtectionRunErrorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunErrorsOK, error) - - GetProtectionRuns(params *GetProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsOK, error) - - UpdateProtectionRuns(params *UpdateProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionRunsNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CancelProtectionJobRun cancels a protection job run -*/ -func (a *Client) CancelProtectionJobRun(params *CancelProtectionJobRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelProtectionJobRunNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelProtectionJobRunParams() - } - op := &runtime.ClientOperation{ - ID: "CancelProtectionJobRun", - Method: "POST", - PathPattern: "/public/protectionRuns/cancel/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelProtectionJobRunReader{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.(*CancelProtectionJobRunNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelProtectionJobRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionRunErrors lists protection job run errors filtered by the specified parameters - - jobId, startTimeUsecs and taskId have to be provided to get the a list of - -errors for a job run task. -*/ -func (a *Client) GetProtectionRunErrors(params *GetProtectionRunErrorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunErrorsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunErrorsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRunErrors", - Method: "GET", - PathPattern: "/public/protectionRuns/errors", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunErrorsReader{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.(*GetProtectionRunErrorsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunErrorsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionRuns lists protection job runs filtered by the specified parameters - - If no parameters are specified, Job Runs currently - -on the Cohesity Cluster are returned. Both running and completed Job Runs -are reported. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetProtectionRuns(params *GetProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRuns", - Method: "GET", - PathPattern: "/public/protectionRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunsReader{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.(*GetProtectionRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateProtectionRuns updates how long protection job runs and their snapshots are retained on the cohesity cluster - - Update the expiration date (retention period) for the specified Protection - -Job Runs and their snapshots. -After an expiration time is reached, the Job Run and its snapshots are deleted. -If an expiration time of 0 is specified, a Job Run and its snapshots -are immediately deleted. -*/ -func (a *Client) UpdateProtectionRuns(params *UpdateProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionRunsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionRunsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionRuns", - Method: "PUT", - PathPattern: "/public/protectionRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionRunsReader{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.(*UpdateProtectionRunsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionRunsDefault) - 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/protection_runs/update_protection_runs_parameters.go b/v1/client/protection_runs/update_protection_runs_parameters.go deleted file mode 100644 index 8b30d6cb..00000000 --- a/v1/client/protection_runs/update_protection_runs_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionRunsParams creates a new UpdateProtectionRunsParams 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 NewUpdateProtectionRunsParams() *UpdateProtectionRunsParams { - return &UpdateProtectionRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionRunsParamsWithTimeout creates a new UpdateProtectionRunsParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionRunsParamsWithTimeout(timeout time.Duration) *UpdateProtectionRunsParams { - return &UpdateProtectionRunsParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionRunsParamsWithContext creates a new UpdateProtectionRunsParams object -// with the ability to set a context for a request. -func NewUpdateProtectionRunsParamsWithContext(ctx context.Context) *UpdateProtectionRunsParams { - return &UpdateProtectionRunsParams{ - Context: ctx, - } -} - -// NewUpdateProtectionRunsParamsWithHTTPClient creates a new UpdateProtectionRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionRunsParamsWithHTTPClient(client *http.Client) *UpdateProtectionRunsParams { - return &UpdateProtectionRunsParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionRunsParams contains all the parameters to send to the API endpoint - - for the update protection runs operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionRunsParams struct { - - /* Body. - - Request to update the expiration time of Protection Job Runs. - */ - Body *models.UpdateProtectionJobRunsParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionRunsParams) WithDefaults() *UpdateProtectionRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection runs params -func (o *UpdateProtectionRunsParams) WithTimeout(timeout time.Duration) *UpdateProtectionRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection runs params -func (o *UpdateProtectionRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection runs params -func (o *UpdateProtectionRunsParams) WithContext(ctx context.Context) *UpdateProtectionRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection runs params -func (o *UpdateProtectionRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection runs params -func (o *UpdateProtectionRunsParams) WithHTTPClient(client *http.Client) *UpdateProtectionRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection runs params -func (o *UpdateProtectionRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection runs params -func (o *UpdateProtectionRunsParams) WithBody(body *models.UpdateProtectionJobRunsParam) *UpdateProtectionRunsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection runs params -func (o *UpdateProtectionRunsParams) SetBody(body *models.UpdateProtectionJobRunsParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionRunsParams) 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/protection_runs/update_protection_runs_responses.go b/v1/client/protection_runs/update_protection_runs_responses.go deleted file mode 100644 index c0380639..00000000 --- a/v1/client/protection_runs/update_protection_runs_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_runs - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionRunsReader is a Reader for the UpdateProtectionRuns structure. -type UpdateProtectionRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUpdateProtectionRunsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionRunsDefault(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 - } -} - -// NewUpdateProtectionRunsNoContent creates a UpdateProtectionRunsNoContent with default headers values -func NewUpdateProtectionRunsNoContent() *UpdateProtectionRunsNoContent { - return &UpdateProtectionRunsNoContent{} -} - -/* -UpdateProtectionRunsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UpdateProtectionRunsNoContent struct { -} - -// IsSuccess returns true when this update protection runs no content response has a 2xx status code -func (o *UpdateProtectionRunsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection runs no content response has a 3xx status code -func (o *UpdateProtectionRunsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection runs no content response has a 4xx status code -func (o *UpdateProtectionRunsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection runs no content response has a 5xx status code -func (o *UpdateProtectionRunsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection runs no content response a status code equal to that given -func (o *UpdateProtectionRunsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the update protection runs no content response -func (o *UpdateProtectionRunsNoContent) Code() int { - return 204 -} - -func (o *UpdateProtectionRunsNoContent) Error() string { - return fmt.Sprintf("[PUT /public/protectionRuns][%d] updateProtectionRunsNoContent", 204) -} - -func (o *UpdateProtectionRunsNoContent) String() string { - return fmt.Sprintf("[PUT /public/protectionRuns][%d] updateProtectionRunsNoContent", 204) -} - -func (o *UpdateProtectionRunsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUpdateProtectionRunsDefault creates a UpdateProtectionRunsDefault with default headers values -func NewUpdateProtectionRunsDefault(code int) *UpdateProtectionRunsDefault { - return &UpdateProtectionRunsDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionRunsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection runs default response has a 2xx status code -func (o *UpdateProtectionRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection runs default response has a 3xx status code -func (o *UpdateProtectionRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection runs default response has a 4xx status code -func (o *UpdateProtectionRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection runs default response has a 5xx status code -func (o *UpdateProtectionRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection runs default response a status code equal to that given -func (o *UpdateProtectionRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection runs default response -func (o *UpdateProtectionRunsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionRuns][%d] UpdateProtectionRuns default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionRuns][%d] UpdateProtectionRuns default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionRunsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionRunsDefault) 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_sources/download_cft_file_parameters.go b/v1/client/protection_sources/download_cft_file_parameters.go deleted file mode 100644 index 1aebd7e0..00000000 --- a/v1/client/protection_sources/download_cft_file_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDownloadCftFileParams creates a new DownloadCftFileParams 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 NewDownloadCftFileParams() *DownloadCftFileParams { - return &DownloadCftFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadCftFileParamsWithTimeout creates a new DownloadCftFileParams object -// with the ability to set a timeout on a request. -func NewDownloadCftFileParamsWithTimeout(timeout time.Duration) *DownloadCftFileParams { - return &DownloadCftFileParams{ - timeout: timeout, - } -} - -// NewDownloadCftFileParamsWithContext creates a new DownloadCftFileParams object -// with the ability to set a context for a request. -func NewDownloadCftFileParamsWithContext(ctx context.Context) *DownloadCftFileParams { - return &DownloadCftFileParams{ - Context: ctx, - } -} - -// NewDownloadCftFileParamsWithHTTPClient creates a new DownloadCftFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadCftFileParamsWithHTTPClient(client *http.Client) *DownloadCftFileParams { - return &DownloadCftFileParams{ - HTTPClient: client, - } -} - -/* -DownloadCftFileParams contains all the parameters to send to the API endpoint - - for the download cft file operation. - - Typically these are written to a http.Request. -*/ -type DownloadCftFileParams struct { - - /* Body. - - Specifies the request to download CFT. - */ - Body *models.DownloadCftParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download cft file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadCftFileParams) WithDefaults() *DownloadCftFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download cft file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadCftFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download cft file params -func (o *DownloadCftFileParams) WithTimeout(timeout time.Duration) *DownloadCftFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download cft file params -func (o *DownloadCftFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download cft file params -func (o *DownloadCftFileParams) WithContext(ctx context.Context) *DownloadCftFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download cft file params -func (o *DownloadCftFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download cft file params -func (o *DownloadCftFileParams) WithHTTPClient(client *http.Client) *DownloadCftFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download cft file params -func (o *DownloadCftFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the download cft file params -func (o *DownloadCftFileParams) WithBody(body *models.DownloadCftParams) *DownloadCftFileParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the download cft file params -func (o *DownloadCftFileParams) SetBody(body *models.DownloadCftParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadCftFileParams) 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/protection_sources/download_cft_file_responses.go b/v1/client/protection_sources/download_cft_file_responses.go deleted file mode 100644 index 333593f7..00000000 --- a/v1/client/protection_sources/download_cft_file_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadCftFileReader is a Reader for the DownloadCftFile structure. -type DownloadCftFileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadCftFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadCftFileOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadCftFileDefault(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 - } -} - -// NewDownloadCftFileOK creates a DownloadCftFileOK with default headers values -func NewDownloadCftFileOK() *DownloadCftFileOK { - return &DownloadCftFileOK{} -} - -/* -DownloadCftFileOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadCftFileOK struct { - Payload *models.DownloadCftResponse -} - -// IsSuccess returns true when this download cft file o k response has a 2xx status code -func (o *DownloadCftFileOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download cft file o k response has a 3xx status code -func (o *DownloadCftFileOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download cft file o k response has a 4xx status code -func (o *DownloadCftFileOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download cft file o k response has a 5xx status code -func (o *DownloadCftFileOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download cft file o k response a status code equal to that given -func (o *DownloadCftFileOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download cft file o k response -func (o *DownloadCftFileOK) Code() int { - return 200 -} - -func (o *DownloadCftFileOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/downloadCftFile][%d] downloadCftFileOK %s", 200, payload) -} - -func (o *DownloadCftFileOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/downloadCftFile][%d] downloadCftFileOK %s", 200, payload) -} - -func (o *DownloadCftFileOK) GetPayload() *models.DownloadCftResponse { - return o.Payload -} - -func (o *DownloadCftFileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DownloadCftResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadCftFileDefault creates a DownloadCftFileDefault with default headers values -func NewDownloadCftFileDefault(code int) *DownloadCftFileDefault { - return &DownloadCftFileDefault{ - _statusCode: code, - } -} - -/* -DownloadCftFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadCftFileDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download cft file default response has a 2xx status code -func (o *DownloadCftFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download cft file default response has a 3xx status code -func (o *DownloadCftFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download cft file default response has a 4xx status code -func (o *DownloadCftFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download cft file default response has a 5xx status code -func (o *DownloadCftFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download cft file default response a status code equal to that given -func (o *DownloadCftFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download cft file default response -func (o *DownloadCftFileDefault) Code() int { - return o._statusCode -} - -func (o *DownloadCftFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/downloadCftFile][%d] DownloadCftFile default %s", o._statusCode, payload) -} - -func (o *DownloadCftFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/downloadCftFile][%d] DownloadCftFile default %s", o._statusCode, payload) -} - -func (o *DownloadCftFileDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadCftFileDefault) 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_sources/download_physical_agent_parameters.go b/v1/client/protection_sources/download_physical_agent_parameters.go deleted file mode 100644 index 907678d9..00000000 --- a/v1/client/protection_sources/download_physical_agent_parameters.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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" -) - -// NewDownloadPhysicalAgentParams creates a new DownloadPhysicalAgentParams 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 NewDownloadPhysicalAgentParams() *DownloadPhysicalAgentParams { - return &DownloadPhysicalAgentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadPhysicalAgentParamsWithTimeout creates a new DownloadPhysicalAgentParams object -// with the ability to set a timeout on a request. -func NewDownloadPhysicalAgentParamsWithTimeout(timeout time.Duration) *DownloadPhysicalAgentParams { - return &DownloadPhysicalAgentParams{ - timeout: timeout, - } -} - -// NewDownloadPhysicalAgentParamsWithContext creates a new DownloadPhysicalAgentParams object -// with the ability to set a context for a request. -func NewDownloadPhysicalAgentParamsWithContext(ctx context.Context) *DownloadPhysicalAgentParams { - return &DownloadPhysicalAgentParams{ - Context: ctx, - } -} - -// NewDownloadPhysicalAgentParamsWithHTTPClient creates a new DownloadPhysicalAgentParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadPhysicalAgentParamsWithHTTPClient(client *http.Client) *DownloadPhysicalAgentParams { - return &DownloadPhysicalAgentParams{ - HTTPClient: client, - } -} - -/* -DownloadPhysicalAgentParams contains all the parameters to send to the API endpoint - - for the download physical agent operation. - - Typically these are written to a http.Request. -*/ -type DownloadPhysicalAgentParams struct { - - /* AgentType. - - Specifies agent type. Can be "kGo" for go agent and "kJava" - for java agent and "kCpp" for c++ agent. - 'kCpp' indicates a c++ agent. - 'kJava' indicates a java agent. - 'kGo' indicates a go agent. - 'kLegacy' indicates a go agent. - */ - AgentType *string - - /* HostOSType. - - Specifies the OS type for which user wants to download the - physical agent/plugin. - 'kLinux' indicates the Linux operating system. - 'kWindows' indicates the Microsoft Windows operating system. - 'kAix' indicates the IBM AIX operating system. - 'kSolaris' indicates the Oracle Solaris operating system. - 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - 'kCockroachDB' indicates the CockroachDB database system. - 'kMySQL' indicates the MySQL database system. - 'kSapSybase' indicates the SapSybase database system. - 'kSapMaxDB' indicates the SapMaxDB database system. - 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - 'kDB2' indicates the DB2 database system. - 'kSapASE' indicates the SapASE database system. - 'kMariaDB' indicates the MariaDB database system. - 'kPostgreSQL' indicates the PostgreSQL database system. - 'kHPUX' indicates the HPUX database system. - 'kVOS' indicates the VOS database system. - 'kOther' indicates the other types of operating system. - */ - HostOSType *string - - /* HostType. - - Specifies the host type for which user wants to download the - physical agent. - 'kLinux' indicates the Linux operating system. - 'kWindows' indicates the Microsoft Windows operating system. - 'kAix' indicates the IBM AIX operating system. - 'kSolaris' indicates the Oracle Solaris operating system. - 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - 'kCockroachDB' indicates the CockroachDB database system. - 'kMySQL' indicates the MySQL database system. - 'kSapSybase' indicates the SapSybase database system. - 'kSapMaxDB' indicates the SapMaxDB database system. - 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - 'kDB2' indicates the DB2 database system. - 'kSapASE' indicates the SapASE database system. - 'kMariaDB' indicates the MariaDB database system. - 'kPostgreSQL' indicates the PostgreSQL database system. - 'kHPUX' indicates the HPUX database system. - 'kVOS' indicates the VOS database system. - 'kOther' indicates the other types of operating system. - */ - HostType string - - /* PkgType. - - Specifies the Linux installer package type applicable only to Linux - OS and the value can be any of ("kScript","kRPM", "kSuseRPM", "kDEB") - 'kScript' indicates a script based agent installer. - 'kRPM' indicates a RPM agent installer. - 'kSuseRPM' indicates a Open Suse RPM installer. - 'kDEB' indicates a Debian agent installer. - 'kPowerPCRPM' indicates a Power PC RPM installer. - */ - PkgType *string - - /* SolarisPkgType. - - Specifies the Solaris installer package type applicable only to Solaris - OS and the value can be any of ("kSolaris10x86","kSolaris10Sparc", - "kSolaris11x86", "kSolaris11Sparc") - 'kSolaris10x86' indicates Solaris OS version 10 and x86 architecture. - 'kSolaris10Sparc' indicates Solaris OS version 10 and Sparc architecture. - 'kSolaris11x86' indicates Solaris OS version 11 and x86 architecture. - 'kSolaris11Sparc' indicates Solaris OS version 11 and Sparc architecture. - */ - SolarisPkgType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download physical agent params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadPhysicalAgentParams) WithDefaults() *DownloadPhysicalAgentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download physical agent params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadPhysicalAgentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithTimeout(timeout time.Duration) *DownloadPhysicalAgentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithContext(ctx context.Context) *DownloadPhysicalAgentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithHTTPClient(client *http.Client) *DownloadPhysicalAgentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAgentType adds the agentType to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithAgentType(agentType *string) *DownloadPhysicalAgentParams { - o.SetAgentType(agentType) - return o -} - -// SetAgentType adds the agentType to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetAgentType(agentType *string) { - o.AgentType = agentType -} - -// WithHostOSType adds the hostOSType to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithHostOSType(hostOSType *string) *DownloadPhysicalAgentParams { - o.SetHostOSType(hostOSType) - return o -} - -// SetHostOSType adds the hostOSType to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetHostOSType(hostOSType *string) { - o.HostOSType = hostOSType -} - -// WithHostType adds the hostType to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithHostType(hostType string) *DownloadPhysicalAgentParams { - o.SetHostType(hostType) - return o -} - -// SetHostType adds the hostType to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetHostType(hostType string) { - o.HostType = hostType -} - -// WithPkgType adds the pkgType to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithPkgType(pkgType *string) *DownloadPhysicalAgentParams { - o.SetPkgType(pkgType) - return o -} - -// SetPkgType adds the pkgType to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetPkgType(pkgType *string) { - o.PkgType = pkgType -} - -// WithSolarisPkgType adds the solarisPkgType to the download physical agent params -func (o *DownloadPhysicalAgentParams) WithSolarisPkgType(solarisPkgType *string) *DownloadPhysicalAgentParams { - o.SetSolarisPkgType(solarisPkgType) - return o -} - -// SetSolarisPkgType adds the solarisPkgType to the download physical agent params -func (o *DownloadPhysicalAgentParams) SetSolarisPkgType(solarisPkgType *string) { - o.SolarisPkgType = solarisPkgType -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadPhysicalAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AgentType != nil { - - // query param agentType - var qrAgentType string - - if o.AgentType != nil { - qrAgentType = *o.AgentType - } - qAgentType := qrAgentType - if qAgentType != "" { - - if err := r.SetQueryParam("agentType", qAgentType); err != nil { - return err - } - } - } - - if o.HostOSType != nil { - - // query param hostOSType - var qrHostOSType string - - if o.HostOSType != nil { - qrHostOSType = *o.HostOSType - } - qHostOSType := qrHostOSType - if qHostOSType != "" { - - if err := r.SetQueryParam("hostOSType", qHostOSType); err != nil { - return err - } - } - } - - // query param hostType - qrHostType := o.HostType - qHostType := qrHostType - if qHostType != "" { - - if err := r.SetQueryParam("hostType", qHostType); err != nil { - return err - } - } - - if o.PkgType != nil { - - // query param pkgType - var qrPkgType string - - if o.PkgType != nil { - qrPkgType = *o.PkgType - } - qPkgType := qrPkgType - if qPkgType != "" { - - if err := r.SetQueryParam("pkgType", qPkgType); err != nil { - return err - } - } - } - - if o.SolarisPkgType != nil { - - // query param solarisPkgType - var qrSolarisPkgType string - - if o.SolarisPkgType != nil { - qrSolarisPkgType = *o.SolarisPkgType - } - qSolarisPkgType := qrSolarisPkgType - if qSolarisPkgType != "" { - - if err := r.SetQueryParam("solarisPkgType", qSolarisPkgType); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/download_physical_agent_responses.go b/v1/client/protection_sources/download_physical_agent_responses.go deleted file mode 100644 index 996d915d..00000000 --- a/v1/client/protection_sources/download_physical_agent_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadPhysicalAgentReader is a Reader for the DownloadPhysicalAgent structure. -type DownloadPhysicalAgentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadPhysicalAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadPhysicalAgentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadPhysicalAgentDefault(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 - } -} - -// NewDownloadPhysicalAgentOK creates a DownloadPhysicalAgentOK with default headers values -func NewDownloadPhysicalAgentOK() *DownloadPhysicalAgentOK { - return &DownloadPhysicalAgentOK{} -} - -/* -DownloadPhysicalAgentOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadPhysicalAgentOK struct { - Payload []uint8 -} - -// IsSuccess returns true when this download physical agent o k response has a 2xx status code -func (o *DownloadPhysicalAgentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download physical agent o k response has a 3xx status code -func (o *DownloadPhysicalAgentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download physical agent o k response has a 4xx status code -func (o *DownloadPhysicalAgentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download physical agent o k response has a 5xx status code -func (o *DownloadPhysicalAgentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download physical agent o k response a status code equal to that given -func (o *DownloadPhysicalAgentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download physical agent o k response -func (o *DownloadPhysicalAgentOK) Code() int { - return 200 -} - -func (o *DownloadPhysicalAgentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/physicalAgents/download][%d] downloadPhysicalAgentOK %s", 200, payload) -} - -func (o *DownloadPhysicalAgentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/physicalAgents/download][%d] downloadPhysicalAgentOK %s", 200, payload) -} - -func (o *DownloadPhysicalAgentOK) GetPayload() []uint8 { - return o.Payload -} - -func (o *DownloadPhysicalAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadPhysicalAgentDefault creates a DownloadPhysicalAgentDefault with default headers values -func NewDownloadPhysicalAgentDefault(code int) *DownloadPhysicalAgentDefault { - return &DownloadPhysicalAgentDefault{ - _statusCode: code, - } -} - -/* -DownloadPhysicalAgentDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadPhysicalAgentDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download physical agent default response has a 2xx status code -func (o *DownloadPhysicalAgentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download physical agent default response has a 3xx status code -func (o *DownloadPhysicalAgentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download physical agent default response has a 4xx status code -func (o *DownloadPhysicalAgentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download physical agent default response has a 5xx status code -func (o *DownloadPhysicalAgentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download physical agent default response a status code equal to that given -func (o *DownloadPhysicalAgentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download physical agent default response -func (o *DownloadPhysicalAgentDefault) Code() int { - return o._statusCode -} - -func (o *DownloadPhysicalAgentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/physicalAgents/download][%d] DownloadPhysicalAgent default %s", o._statusCode, payload) -} - -func (o *DownloadPhysicalAgentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/physicalAgents/download][%d] DownloadPhysicalAgent default %s", o._statusCode, payload) -} - -func (o *DownloadPhysicalAgentDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadPhysicalAgentDefault) 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_sources/get_protection_sources_object_by_id_parameters.go b/v1/client/protection_sources/get_protection_sources_object_by_id_parameters.go deleted file mode 100644 index cb5a7623..00000000 --- a/v1/client/protection_sources/get_protection_sources_object_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourcesObjectByIDParams creates a new GetProtectionSourcesObjectByIDParams 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 NewGetProtectionSourcesObjectByIDParams() *GetProtectionSourcesObjectByIDParams { - return &GetProtectionSourcesObjectByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourcesObjectByIDParamsWithTimeout creates a new GetProtectionSourcesObjectByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourcesObjectByIDParamsWithTimeout(timeout time.Duration) *GetProtectionSourcesObjectByIDParams { - return &GetProtectionSourcesObjectByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourcesObjectByIDParamsWithContext creates a new GetProtectionSourcesObjectByIDParams object -// with the ability to set a context for a request. -func NewGetProtectionSourcesObjectByIDParamsWithContext(ctx context.Context) *GetProtectionSourcesObjectByIDParams { - return &GetProtectionSourcesObjectByIDParams{ - Context: ctx, - } -} - -// NewGetProtectionSourcesObjectByIDParamsWithHTTPClient creates a new GetProtectionSourcesObjectByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourcesObjectByIDParamsWithHTTPClient(client *http.Client) *GetProtectionSourcesObjectByIDParams { - return &GetProtectionSourcesObjectByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourcesObjectByIDParams contains all the parameters to send to the API endpoint - - for the get protection sources object by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourcesObjectByIDParams struct { - - /* ID. - - Specifies a unique id of the Protection Source to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection sources object by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesObjectByIDParams) WithDefaults() *GetProtectionSourcesObjectByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection sources object by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesObjectByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) WithTimeout(timeout time.Duration) *GetProtectionSourcesObjectByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) WithContext(ctx context.Context) *GetProtectionSourcesObjectByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) WithHTTPClient(client *http.Client) *GetProtectionSourcesObjectByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) WithID(id int64) *GetProtectionSourcesObjectByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection sources object by Id params -func (o *GetProtectionSourcesObjectByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourcesObjectByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/get_protection_sources_object_by_id_responses.go b/v1/client/protection_sources/get_protection_sources_object_by_id_responses.go deleted file mode 100644 index 246ca268..00000000 --- a/v1/client/protection_sources/get_protection_sources_object_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionSourcesObjectByIDReader is a Reader for the GetProtectionSourcesObjectByID structure. -type GetProtectionSourcesObjectByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourcesObjectByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourcesObjectByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourcesObjectByIDDefault(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 - } -} - -// NewGetProtectionSourcesObjectByIDOK creates a GetProtectionSourcesObjectByIDOK with default headers values -func NewGetProtectionSourcesObjectByIDOK() *GetProtectionSourcesObjectByIDOK { - return &GetProtectionSourcesObjectByIDOK{} -} - -/* -GetProtectionSourcesObjectByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourcesObjectByIDOK struct { - Payload *models.ProtectionSource -} - -// IsSuccess returns true when this get protection sources object by Id o k response has a 2xx status code -func (o *GetProtectionSourcesObjectByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection sources object by Id o k response has a 3xx status code -func (o *GetProtectionSourcesObjectByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection sources object by Id o k response has a 4xx status code -func (o *GetProtectionSourcesObjectByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection sources object by Id o k response has a 5xx status code -func (o *GetProtectionSourcesObjectByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection sources object by Id o k response a status code equal to that given -func (o *GetProtectionSourcesObjectByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection sources object by Id o k response -func (o *GetProtectionSourcesObjectByIDOK) Code() int { - return 200 -} - -func (o *GetProtectionSourcesObjectByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects/{id}][%d] getProtectionSourcesObjectByIdOK %s", 200, payload) -} - -func (o *GetProtectionSourcesObjectByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects/{id}][%d] getProtectionSourcesObjectByIdOK %s", 200, payload) -} - -func (o *GetProtectionSourcesObjectByIDOK) GetPayload() *models.ProtectionSource { - return o.Payload -} - -func (o *GetProtectionSourcesObjectByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSource) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourcesObjectByIDDefault creates a GetProtectionSourcesObjectByIDDefault with default headers values -func NewGetProtectionSourcesObjectByIDDefault(code int) *GetProtectionSourcesObjectByIDDefault { - return &GetProtectionSourcesObjectByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourcesObjectByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourcesObjectByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection sources object by Id default response has a 2xx status code -func (o *GetProtectionSourcesObjectByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection sources object by Id default response has a 3xx status code -func (o *GetProtectionSourcesObjectByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection sources object by Id default response has a 4xx status code -func (o *GetProtectionSourcesObjectByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection sources object by Id default response has a 5xx status code -func (o *GetProtectionSourcesObjectByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection sources object by Id default response a status code equal to that given -func (o *GetProtectionSourcesObjectByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection sources object by Id default response -func (o *GetProtectionSourcesObjectByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourcesObjectByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects/{id}][%d] GetProtectionSourcesObjectById default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesObjectByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects/{id}][%d] GetProtectionSourcesObjectById default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesObjectByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionSourcesObjectByIDDefault) 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_sources/get_protection_sources_objects_parameters.go b/v1/client/protection_sources/get_protection_sources_objects_parameters.go deleted file mode 100644 index d42469ef..00000000 --- a/v1/client/protection_sources/get_protection_sources_objects_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourcesObjectsParams creates a new GetProtectionSourcesObjectsParams 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 NewGetProtectionSourcesObjectsParams() *GetProtectionSourcesObjectsParams { - return &GetProtectionSourcesObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourcesObjectsParamsWithTimeout creates a new GetProtectionSourcesObjectsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourcesObjectsParamsWithTimeout(timeout time.Duration) *GetProtectionSourcesObjectsParams { - return &GetProtectionSourcesObjectsParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourcesObjectsParamsWithContext creates a new GetProtectionSourcesObjectsParams object -// with the ability to set a context for a request. -func NewGetProtectionSourcesObjectsParamsWithContext(ctx context.Context) *GetProtectionSourcesObjectsParams { - return &GetProtectionSourcesObjectsParams{ - Context: ctx, - } -} - -// NewGetProtectionSourcesObjectsParamsWithHTTPClient creates a new GetProtectionSourcesObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourcesObjectsParamsWithHTTPClient(client *http.Client) *GetProtectionSourcesObjectsParams { - return &GetProtectionSourcesObjectsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourcesObjectsParams contains all the parameters to send to the API endpoint - - for the get protection sources objects operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourcesObjectsParams struct { - - /* ObjectIds. - - Specifies the ids of the Protection Source objects to return. - */ - ObjectIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection sources objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesObjectsParams) WithDefaults() *GetProtectionSourcesObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection sources objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) WithTimeout(timeout time.Duration) *GetProtectionSourcesObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) WithContext(ctx context.Context) *GetProtectionSourcesObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) WithHTTPClient(client *http.Client) *GetProtectionSourcesObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithObjectIds adds the objectIds to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) WithObjectIds(objectIds []int64) *GetProtectionSourcesObjectsParams { - o.SetObjectIds(objectIds) - return o -} - -// SetObjectIds adds the objectIds to the get protection sources objects params -func (o *GetProtectionSourcesObjectsParams) SetObjectIds(objectIds []int64) { - o.ObjectIds = objectIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourcesObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ObjectIds != nil { - - // binding items for objectIds - joinedObjectIds := o.bindParamObjectIds(reg) - - // query array param objectIds - if err := r.SetQueryParam("objectIds", joinedObjectIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionSourcesObjects binds the parameter objectIds -func (o *GetProtectionSourcesObjectsParams) bindParamObjectIds(formats strfmt.Registry) []string { - objectIdsIR := o.ObjectIds - - var objectIdsIC []string - for _, objectIdsIIR := range objectIdsIR { // explode []int64 - - objectIdsIIV := swag.FormatInt64(objectIdsIIR) // int64 as string - objectIdsIC = append(objectIdsIC, objectIdsIIV) - } - - // items.CollectionFormat: "" - objectIdsIS := swag.JoinByFormat(objectIdsIC, "") - - return objectIdsIS -} diff --git a/v1/client/protection_sources/get_protection_sources_objects_responses.go b/v1/client/protection_sources/get_protection_sources_objects_responses.go deleted file mode 100644 index 3f99fb49..00000000 --- a/v1/client/protection_sources/get_protection_sources_objects_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionSourcesObjectsReader is a Reader for the GetProtectionSourcesObjects structure. -type GetProtectionSourcesObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourcesObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourcesObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourcesObjectsDefault(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 - } -} - -// NewGetProtectionSourcesObjectsOK creates a GetProtectionSourcesObjectsOK with default headers values -func NewGetProtectionSourcesObjectsOK() *GetProtectionSourcesObjectsOK { - return &GetProtectionSourcesObjectsOK{} -} - -/* -GetProtectionSourcesObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourcesObjectsOK struct { - Payload []*models.ProtectionSource -} - -// IsSuccess returns true when this get protection sources objects o k response has a 2xx status code -func (o *GetProtectionSourcesObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection sources objects o k response has a 3xx status code -func (o *GetProtectionSourcesObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection sources objects o k response has a 4xx status code -func (o *GetProtectionSourcesObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection sources objects o k response has a 5xx status code -func (o *GetProtectionSourcesObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection sources objects o k response a status code equal to that given -func (o *GetProtectionSourcesObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection sources objects o k response -func (o *GetProtectionSourcesObjectsOK) Code() int { - return 200 -} - -func (o *GetProtectionSourcesObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects][%d] getProtectionSourcesObjectsOK %s", 200, payload) -} - -func (o *GetProtectionSourcesObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects][%d] getProtectionSourcesObjectsOK %s", 200, payload) -} - -func (o *GetProtectionSourcesObjectsOK) GetPayload() []*models.ProtectionSource { - return o.Payload -} - -func (o *GetProtectionSourcesObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourcesObjectsDefault creates a GetProtectionSourcesObjectsDefault with default headers values -func NewGetProtectionSourcesObjectsDefault(code int) *GetProtectionSourcesObjectsDefault { - return &GetProtectionSourcesObjectsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourcesObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourcesObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection sources objects default response has a 2xx status code -func (o *GetProtectionSourcesObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection sources objects default response has a 3xx status code -func (o *GetProtectionSourcesObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection sources objects default response has a 4xx status code -func (o *GetProtectionSourcesObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection sources objects default response has a 5xx status code -func (o *GetProtectionSourcesObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection sources objects default response a status code equal to that given -func (o *GetProtectionSourcesObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection sources objects default response -func (o *GetProtectionSourcesObjectsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourcesObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects][%d] GetProtectionSourcesObjects default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/objects][%d] GetProtectionSourcesObjects default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionSourcesObjectsDefault) 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_sources/list_application_servers_parameters.go b/v1/client/protection_sources/list_application_servers_parameters.go deleted file mode 100644 index 68840830..00000000 --- a/v1/client/protection_sources/list_application_servers_parameters.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListApplicationServersParams creates a new ListApplicationServersParams 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 NewListApplicationServersParams() *ListApplicationServersParams { - return &ListApplicationServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListApplicationServersParamsWithTimeout creates a new ListApplicationServersParams object -// with the ability to set a timeout on a request. -func NewListApplicationServersParamsWithTimeout(timeout time.Duration) *ListApplicationServersParams { - return &ListApplicationServersParams{ - timeout: timeout, - } -} - -// NewListApplicationServersParamsWithContext creates a new ListApplicationServersParams object -// with the ability to set a context for a request. -func NewListApplicationServersParamsWithContext(ctx context.Context) *ListApplicationServersParams { - return &ListApplicationServersParams{ - Context: ctx, - } -} - -// NewListApplicationServersParamsWithHTTPClient creates a new ListApplicationServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewListApplicationServersParamsWithHTTPClient(client *http.Client) *ListApplicationServersParams { - return &ListApplicationServersParams{ - HTTPClient: client, - } -} - -/* -ListApplicationServersParams contains all the parameters to send to the API endpoint - - for the list application servers operation. - - Typically these are written to a http.Request. -*/ -type ListApplicationServersParams struct { - - /* Application. - - Specifies the application such as 'kSQL', 'kExchange' running on the - Protection Source. - overrideDescription: true - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Application *string - - /* Environment. - - Specifies the environment such as 'kPhysical' or 'kVMware' of the - Protection Source tree. - overrideDescription: true - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Environment *string - - /* ProtectionSourceID. - - Specifies the Protection Source Id of the 'kPhysical' or 'kVMware' - entity in the Protection Source tree hosting the applications. - - Format: int64 - */ - ProtectionSourceID *int64 - - /* ProtectionSourcesRootNodeID. - - Specifies the Protection Source Id of the root node of a Protection - Sources tree. A root node represents a registered Source on the - Cohesity Cluster, such as a vCenter Server. - - Format: int64 - */ - ProtectionSourcesRootNodeID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListApplicationServersParams) WithDefaults() *ListApplicationServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListApplicationServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list application servers params -func (o *ListApplicationServersParams) WithTimeout(timeout time.Duration) *ListApplicationServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list application servers params -func (o *ListApplicationServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list application servers params -func (o *ListApplicationServersParams) WithContext(ctx context.Context) *ListApplicationServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list application servers params -func (o *ListApplicationServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list application servers params -func (o *ListApplicationServersParams) WithHTTPClient(client *http.Client) *ListApplicationServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list application servers params -func (o *ListApplicationServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithApplication adds the application to the list application servers params -func (o *ListApplicationServersParams) WithApplication(application *string) *ListApplicationServersParams { - o.SetApplication(application) - return o -} - -// SetApplication adds the application to the list application servers params -func (o *ListApplicationServersParams) SetApplication(application *string) { - o.Application = application -} - -// WithEnvironment adds the environment to the list application servers params -func (o *ListApplicationServersParams) WithEnvironment(environment *string) *ListApplicationServersParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the list application servers params -func (o *ListApplicationServersParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithProtectionSourceID adds the protectionSourceID to the list application servers params -func (o *ListApplicationServersParams) WithProtectionSourceID(protectionSourceID *int64) *ListApplicationServersParams { - o.SetProtectionSourceID(protectionSourceID) - return o -} - -// SetProtectionSourceID adds the protectionSourceId to the list application servers params -func (o *ListApplicationServersParams) SetProtectionSourceID(protectionSourceID *int64) { - o.ProtectionSourceID = protectionSourceID -} - -// WithProtectionSourcesRootNodeID adds the protectionSourcesRootNodeID to the list application servers params -func (o *ListApplicationServersParams) WithProtectionSourcesRootNodeID(protectionSourcesRootNodeID *int64) *ListApplicationServersParams { - o.SetProtectionSourcesRootNodeID(protectionSourcesRootNodeID) - return o -} - -// SetProtectionSourcesRootNodeID adds the protectionSourcesRootNodeId to the list application servers params -func (o *ListApplicationServersParams) SetProtectionSourcesRootNodeID(protectionSourcesRootNodeID *int64) { - o.ProtectionSourcesRootNodeID = protectionSourcesRootNodeID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListApplicationServersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Application != nil { - - // query param application - var qrApplication string - - if o.Application != nil { - qrApplication = *o.Application - } - qApplication := qrApplication - if qApplication != "" { - - if err := r.SetQueryParam("application", qApplication); err != nil { - return err - } - } - } - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - if o.ProtectionSourceID != nil { - - // query param protectionSourceId - var qrProtectionSourceID int64 - - if o.ProtectionSourceID != nil { - qrProtectionSourceID = *o.ProtectionSourceID - } - qProtectionSourceID := swag.FormatInt64(qrProtectionSourceID) - if qProtectionSourceID != "" { - - if err := r.SetQueryParam("protectionSourceId", qProtectionSourceID); err != nil { - return err - } - } - } - - if o.ProtectionSourcesRootNodeID != nil { - - // query param protectionSourcesRootNodeId - var qrProtectionSourcesRootNodeID int64 - - if o.ProtectionSourcesRootNodeID != nil { - qrProtectionSourcesRootNodeID = *o.ProtectionSourcesRootNodeID - } - qProtectionSourcesRootNodeID := swag.FormatInt64(qrProtectionSourcesRootNodeID) - if qProtectionSourcesRootNodeID != "" { - - if err := r.SetQueryParam("protectionSourcesRootNodeId", qProtectionSourcesRootNodeID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/list_application_servers_responses.go b/v1/client/protection_sources/list_application_servers_responses.go deleted file mode 100644 index 66af6bfe..00000000 --- a/v1/client/protection_sources/list_application_servers_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListApplicationServersReader is a Reader for the ListApplicationServers structure. -type ListApplicationServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListApplicationServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListApplicationServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListApplicationServersDefault(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 - } -} - -// NewListApplicationServersOK creates a ListApplicationServersOK with default headers values -func NewListApplicationServersOK() *ListApplicationServersOK { - return &ListApplicationServersOK{} -} - -/* -ListApplicationServersOK describes a response with status code 200, with default header values. - -Success -*/ -type ListApplicationServersOK struct { - Payload []*models.RegisteredApplicationServer -} - -// IsSuccess returns true when this list application servers o k response has a 2xx status code -func (o *ListApplicationServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list application servers o k response has a 3xx status code -func (o *ListApplicationServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list application servers o k response has a 4xx status code -func (o *ListApplicationServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list application servers o k response has a 5xx status code -func (o *ListApplicationServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list application servers o k response a status code equal to that given -func (o *ListApplicationServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list application servers o k response -func (o *ListApplicationServersOK) Code() int { - return 200 -} - -func (o *ListApplicationServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/applicationServers][%d] listApplicationServersOK %s", 200, payload) -} - -func (o *ListApplicationServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/applicationServers][%d] listApplicationServersOK %s", 200, payload) -} - -func (o *ListApplicationServersOK) GetPayload() []*models.RegisteredApplicationServer { - return o.Payload -} - -func (o *ListApplicationServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListApplicationServersDefault creates a ListApplicationServersDefault with default headers values -func NewListApplicationServersDefault(code int) *ListApplicationServersDefault { - return &ListApplicationServersDefault{ - _statusCode: code, - } -} - -/* -ListApplicationServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListApplicationServersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list application servers default response has a 2xx status code -func (o *ListApplicationServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list application servers default response has a 3xx status code -func (o *ListApplicationServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list application servers default response has a 4xx status code -func (o *ListApplicationServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list application servers default response has a 5xx status code -func (o *ListApplicationServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list application servers default response a status code equal to that given -func (o *ListApplicationServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list application servers default response -func (o *ListApplicationServersDefault) Code() int { - return o._statusCode -} - -func (o *ListApplicationServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/applicationServers][%d] ListApplicationServers default %s", o._statusCode, payload) -} - -func (o *ListApplicationServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/applicationServers][%d] ListApplicationServers default %s", o._statusCode, payload) -} - -func (o *ListApplicationServersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListApplicationServersDefault) 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_sources/list_data_store_information_parameters.go b/v1/client/protection_sources/list_data_store_information_parameters.go deleted file mode 100644 index 31d3a9bc..00000000 --- a/v1/client/protection_sources/list_data_store_information_parameters.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListDataStoreInformationParams creates a new ListDataStoreInformationParams 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 NewListDataStoreInformationParams() *ListDataStoreInformationParams { - return &ListDataStoreInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListDataStoreInformationParamsWithTimeout creates a new ListDataStoreInformationParams object -// with the ability to set a timeout on a request. -func NewListDataStoreInformationParamsWithTimeout(timeout time.Duration) *ListDataStoreInformationParams { - return &ListDataStoreInformationParams{ - timeout: timeout, - } -} - -// NewListDataStoreInformationParamsWithContext creates a new ListDataStoreInformationParams object -// with the ability to set a context for a request. -func NewListDataStoreInformationParamsWithContext(ctx context.Context) *ListDataStoreInformationParams { - return &ListDataStoreInformationParams{ - Context: ctx, - } -} - -// NewListDataStoreInformationParamsWithHTTPClient creates a new ListDataStoreInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewListDataStoreInformationParamsWithHTTPClient(client *http.Client) *ListDataStoreInformationParams { - return &ListDataStoreInformationParams{ - HTTPClient: client, - } -} - -/* -ListDataStoreInformationParams contains all the parameters to send to the API endpoint - - for the list data store information operation. - - Typically these are written to a http.Request. -*/ -type ListDataStoreInformationParams struct { - - /* SourceID. - - Specifies the id of the virtual machine in vmware environment. - - Format: int64 - */ - SourceID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list data store information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDataStoreInformationParams) WithDefaults() *ListDataStoreInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list data store information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDataStoreInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list data store information params -func (o *ListDataStoreInformationParams) WithTimeout(timeout time.Duration) *ListDataStoreInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list data store information params -func (o *ListDataStoreInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list data store information params -func (o *ListDataStoreInformationParams) WithContext(ctx context.Context) *ListDataStoreInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list data store information params -func (o *ListDataStoreInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list data store information params -func (o *ListDataStoreInformationParams) WithHTTPClient(client *http.Client) *ListDataStoreInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list data store information params -func (o *ListDataStoreInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSourceID adds the sourceID to the list data store information params -func (o *ListDataStoreInformationParams) WithSourceID(sourceID int64) *ListDataStoreInformationParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the list data store information params -func (o *ListDataStoreInformationParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListDataStoreInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param sourceId - qrSourceID := o.SourceID - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/list_data_store_information_responses.go b/v1/client/protection_sources/list_data_store_information_responses.go deleted file mode 100644 index 308ba0a2..00000000 --- a/v1/client/protection_sources/list_data_store_information_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListDataStoreInformationReader is a Reader for the ListDataStoreInformation structure. -type ListDataStoreInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListDataStoreInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListDataStoreInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListDataStoreInformationDefault(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 - } -} - -// NewListDataStoreInformationOK creates a ListDataStoreInformationOK with default headers values -func NewListDataStoreInformationOK() *ListDataStoreInformationOK { - return &ListDataStoreInformationOK{} -} - -/* -ListDataStoreInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type ListDataStoreInformationOK struct { - Payload []*models.ProtectionSource -} - -// IsSuccess returns true when this list data store information o k response has a 2xx status code -func (o *ListDataStoreInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list data store information o k response has a 3xx status code -func (o *ListDataStoreInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list data store information o k response has a 4xx status code -func (o *ListDataStoreInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list data store information o k response has a 5xx status code -func (o *ListDataStoreInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list data store information o k response a status code equal to that given -func (o *ListDataStoreInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list data store information o k response -func (o *ListDataStoreInformationOK) Code() int { - return 200 -} - -func (o *ListDataStoreInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/datastores][%d] listDataStoreInformationOK %s", 200, payload) -} - -func (o *ListDataStoreInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/datastores][%d] listDataStoreInformationOK %s", 200, payload) -} - -func (o *ListDataStoreInformationOK) GetPayload() []*models.ProtectionSource { - return o.Payload -} - -func (o *ListDataStoreInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListDataStoreInformationDefault creates a ListDataStoreInformationDefault with default headers values -func NewListDataStoreInformationDefault(code int) *ListDataStoreInformationDefault { - return &ListDataStoreInformationDefault{ - _statusCode: code, - } -} - -/* -ListDataStoreInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListDataStoreInformationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list data store information default response has a 2xx status code -func (o *ListDataStoreInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list data store information default response has a 3xx status code -func (o *ListDataStoreInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list data store information default response has a 4xx status code -func (o *ListDataStoreInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list data store information default response has a 5xx status code -func (o *ListDataStoreInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list data store information default response a status code equal to that given -func (o *ListDataStoreInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list data store information default response -func (o *ListDataStoreInformationDefault) Code() int { - return o._statusCode -} - -func (o *ListDataStoreInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/datastores][%d] ListDataStoreInformation default %s", o._statusCode, payload) -} - -func (o *ListDataStoreInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/datastores][%d] ListDataStoreInformation default %s", o._statusCode, payload) -} - -func (o *ListDataStoreInformationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListDataStoreInformationDefault) 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_sources/list_exchange_dag_hosts_parameters.go b/v1/client/protection_sources/list_exchange_dag_hosts_parameters.go deleted file mode 100644 index 2619491d..00000000 --- a/v1/client/protection_sources/list_exchange_dag_hosts_parameters.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListExchangeDagHostsParams creates a new ListExchangeDagHostsParams 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 NewListExchangeDagHostsParams() *ListExchangeDagHostsParams { - return &ListExchangeDagHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListExchangeDagHostsParamsWithTimeout creates a new ListExchangeDagHostsParams object -// with the ability to set a timeout on a request. -func NewListExchangeDagHostsParamsWithTimeout(timeout time.Duration) *ListExchangeDagHostsParams { - return &ListExchangeDagHostsParams{ - timeout: timeout, - } -} - -// NewListExchangeDagHostsParamsWithContext creates a new ListExchangeDagHostsParams object -// with the ability to set a context for a request. -func NewListExchangeDagHostsParamsWithContext(ctx context.Context) *ListExchangeDagHostsParams { - return &ListExchangeDagHostsParams{ - Context: ctx, - } -} - -// NewListExchangeDagHostsParamsWithHTTPClient creates a new ListExchangeDagHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListExchangeDagHostsParamsWithHTTPClient(client *http.Client) *ListExchangeDagHostsParams { - return &ListExchangeDagHostsParams{ - HTTPClient: client, - } -} - -/* -ListExchangeDagHostsParams contains all the parameters to send to the API endpoint - - for the list exchange dag hosts operation. - - Typically these are written to a http.Request. -*/ -type ListExchangeDagHostsParams struct { - - /* Endpoint. - - Specifies the endpoint of Exchange DAG or a host which is member of - Exchange DAG or a standalone exchange server. - */ - Endpoint *string - - /* ProtectionSourceID. - - Specifies the Protection Source Id of the Exchange DAG source. - - Format: int64 - */ - ProtectionSourceID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list exchange dag hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListExchangeDagHostsParams) WithDefaults() *ListExchangeDagHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list exchange dag hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListExchangeDagHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) WithTimeout(timeout time.Duration) *ListExchangeDagHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) WithContext(ctx context.Context) *ListExchangeDagHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) WithHTTPClient(client *http.Client) *ListExchangeDagHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndpoint adds the endpoint to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) WithEndpoint(endpoint *string) *ListExchangeDagHostsParams { - o.SetEndpoint(endpoint) - return o -} - -// SetEndpoint adds the endpoint to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) SetEndpoint(endpoint *string) { - o.Endpoint = endpoint -} - -// WithProtectionSourceID adds the protectionSourceID to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) WithProtectionSourceID(protectionSourceID *int64) *ListExchangeDagHostsParams { - o.SetProtectionSourceID(protectionSourceID) - return o -} - -// SetProtectionSourceID adds the protectionSourceId to the list exchange dag hosts params -func (o *ListExchangeDagHostsParams) SetProtectionSourceID(protectionSourceID *int64) { - o.ProtectionSourceID = protectionSourceID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListExchangeDagHostsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Endpoint != nil { - - // query param endpoint - var qrEndpoint string - - if o.Endpoint != nil { - qrEndpoint = *o.Endpoint - } - qEndpoint := qrEndpoint - if qEndpoint != "" { - - if err := r.SetQueryParam("endpoint", qEndpoint); err != nil { - return err - } - } - } - - if o.ProtectionSourceID != nil { - - // query param protectionSourceId - var qrProtectionSourceID int64 - - if o.ProtectionSourceID != nil { - qrProtectionSourceID = *o.ProtectionSourceID - } - qProtectionSourceID := swag.FormatInt64(qrProtectionSourceID) - if qProtectionSourceID != "" { - - if err := r.SetQueryParam("protectionSourceId", qProtectionSourceID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/list_exchange_dag_hosts_responses.go b/v1/client/protection_sources/list_exchange_dag_hosts_responses.go deleted file mode 100644 index a7556f8d..00000000 --- a/v1/client/protection_sources/list_exchange_dag_hosts_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListExchangeDagHostsReader is a Reader for the ListExchangeDagHosts structure. -type ListExchangeDagHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListExchangeDagHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListExchangeDagHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListExchangeDagHostsDefault(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 - } -} - -// NewListExchangeDagHostsOK creates a ListExchangeDagHostsOK with default headers values -func NewListExchangeDagHostsOK() *ListExchangeDagHostsOK { - return &ListExchangeDagHostsOK{} -} - -/* -ListExchangeDagHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListExchangeDagHostsOK struct { - Payload *models.ExchangeDagHostsResponse -} - -// IsSuccess returns true when this list exchange dag hosts o k response has a 2xx status code -func (o *ListExchangeDagHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list exchange dag hosts o k response has a 3xx status code -func (o *ListExchangeDagHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list exchange dag hosts o k response has a 4xx status code -func (o *ListExchangeDagHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list exchange dag hosts o k response has a 5xx status code -func (o *ListExchangeDagHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list exchange dag hosts o k response a status code equal to that given -func (o *ListExchangeDagHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list exchange dag hosts o k response -func (o *ListExchangeDagHostsOK) Code() int { - return 200 -} - -func (o *ListExchangeDagHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/exchangeDagHosts][%d] listExchangeDagHostsOK %s", 200, payload) -} - -func (o *ListExchangeDagHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/exchangeDagHosts][%d] listExchangeDagHostsOK %s", 200, payload) -} - -func (o *ListExchangeDagHostsOK) GetPayload() *models.ExchangeDagHostsResponse { - return o.Payload -} - -func (o *ListExchangeDagHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExchangeDagHostsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListExchangeDagHostsDefault creates a ListExchangeDagHostsDefault with default headers values -func NewListExchangeDagHostsDefault(code int) *ListExchangeDagHostsDefault { - return &ListExchangeDagHostsDefault{ - _statusCode: code, - } -} - -/* -ListExchangeDagHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListExchangeDagHostsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list exchange dag hosts default response has a 2xx status code -func (o *ListExchangeDagHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list exchange dag hosts default response has a 3xx status code -func (o *ListExchangeDagHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list exchange dag hosts default response has a 4xx status code -func (o *ListExchangeDagHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list exchange dag hosts default response has a 5xx status code -func (o *ListExchangeDagHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list exchange dag hosts default response a status code equal to that given -func (o *ListExchangeDagHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list exchange dag hosts default response -func (o *ListExchangeDagHostsDefault) Code() int { - return o._statusCode -} - -func (o *ListExchangeDagHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/exchangeDagHosts][%d] ListExchangeDagHosts default %s", o._statusCode, payload) -} - -func (o *ListExchangeDagHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/exchangeDagHosts][%d] ListExchangeDagHosts default %s", o._statusCode, payload) -} - -func (o *ListExchangeDagHostsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListExchangeDagHostsDefault) 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_sources/list_protected_objects_parameters.go b/v1/client/protection_sources/list_protected_objects_parameters.go deleted file mode 100644 index e5c98cf9..00000000 --- a/v1/client/protection_sources/list_protected_objects_parameters.go +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListProtectedObjectsParams creates a new ListProtectedObjectsParams 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 NewListProtectedObjectsParams() *ListProtectedObjectsParams { - return &ListProtectedObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListProtectedObjectsParamsWithTimeout creates a new ListProtectedObjectsParams object -// with the ability to set a timeout on a request. -func NewListProtectedObjectsParamsWithTimeout(timeout time.Duration) *ListProtectedObjectsParams { - return &ListProtectedObjectsParams{ - timeout: timeout, - } -} - -// NewListProtectedObjectsParamsWithContext creates a new ListProtectedObjectsParams object -// with the ability to set a context for a request. -func NewListProtectedObjectsParamsWithContext(ctx context.Context) *ListProtectedObjectsParams { - return &ListProtectedObjectsParams{ - Context: ctx, - } -} - -// NewListProtectedObjectsParamsWithHTTPClient creates a new ListProtectedObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListProtectedObjectsParamsWithHTTPClient(client *http.Client) *ListProtectedObjectsParams { - return &ListProtectedObjectsParams{ - HTTPClient: client, - } -} - -/* -ListProtectedObjectsParams contains all the parameters to send to the API endpoint - - for the list protected objects operation. - - Typically these are written to a http.Request. -*/ -type ListProtectedObjectsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Environment. - - Specifies the environment type of the registered Protection Source - such as 'kVMware', 'kSQL', 'kView' 'kPhysical', 'kPuppeteer', 'kPure', - 'kNetapp', 'kGenericNas', 'kHyperV', 'kAcropolis', or 'kAzure'. - For example, set this parameter to 'kVMware' if the registered - Protection Source is of 'kVMware' environment type. - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Environment string - - /* ID. - - Specifies the Id of a registered Protection Source of the type - given in environment. - - Format: int64 - */ - ID int64 - - /* IncludeRpoSnapshots. - - If true, then the Protected Objects protected by RPO policies will also - be returned. - */ - IncludeRpoSnapshots *bool - - /* PruneProtectionJobMetadata. - - Specifies whether the metadata about the protection job is to be pruned. - If set to true, only ID, name & policy info will be returned. - Info about indexing, entities within the job and other additional settings - will be omitted. - */ - PruneProtectionJobMetadata *bool - - /* RequestInitiatorType. - - Specifies the type of the request. Possible values are UIUser and UIAuto, - which means the request is triggered by user or is an auto refresh - request. Services like magneto will use this to determine the priority - of the requests, so that it can more intelligently handle overload - situations by prioritizing higher priority requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list protected objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectedObjectsParams) WithDefaults() *ListProtectedObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list protected objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectedObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list protected objects params -func (o *ListProtectedObjectsParams) WithTimeout(timeout time.Duration) *ListProtectedObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list protected objects params -func (o *ListProtectedObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list protected objects params -func (o *ListProtectedObjectsParams) WithContext(ctx context.Context) *ListProtectedObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list protected objects params -func (o *ListProtectedObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list protected objects params -func (o *ListProtectedObjectsParams) WithHTTPClient(client *http.Client) *ListProtectedObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list protected objects params -func (o *ListProtectedObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the list protected objects params -func (o *ListProtectedObjectsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *ListProtectedObjectsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the list protected objects params -func (o *ListProtectedObjectsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEnvironment adds the environment to the list protected objects params -func (o *ListProtectedObjectsParams) WithEnvironment(environment string) *ListProtectedObjectsParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the list protected objects params -func (o *ListProtectedObjectsParams) SetEnvironment(environment string) { - o.Environment = environment -} - -// WithID adds the id to the list protected objects params -func (o *ListProtectedObjectsParams) WithID(id int64) *ListProtectedObjectsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list protected objects params -func (o *ListProtectedObjectsParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeRpoSnapshots adds the includeRpoSnapshots to the list protected objects params -func (o *ListProtectedObjectsParams) WithIncludeRpoSnapshots(includeRpoSnapshots *bool) *ListProtectedObjectsParams { - o.SetIncludeRpoSnapshots(includeRpoSnapshots) - return o -} - -// SetIncludeRpoSnapshots adds the includeRpoSnapshots to the list protected objects params -func (o *ListProtectedObjectsParams) SetIncludeRpoSnapshots(includeRpoSnapshots *bool) { - o.IncludeRpoSnapshots = includeRpoSnapshots -} - -// WithPruneProtectionJobMetadata adds the pruneProtectionJobMetadata to the list protected objects params -func (o *ListProtectedObjectsParams) WithPruneProtectionJobMetadata(pruneProtectionJobMetadata *bool) *ListProtectedObjectsParams { - o.SetPruneProtectionJobMetadata(pruneProtectionJobMetadata) - return o -} - -// SetPruneProtectionJobMetadata adds the pruneProtectionJobMetadata to the list protected objects params -func (o *ListProtectedObjectsParams) SetPruneProtectionJobMetadata(pruneProtectionJobMetadata *bool) { - o.PruneProtectionJobMetadata = pruneProtectionJobMetadata -} - -// WithRequestInitiatorType adds the requestInitiatorType to the list protected objects params -func (o *ListProtectedObjectsParams) WithRequestInitiatorType(requestInitiatorType *string) *ListProtectedObjectsParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the list protected objects params -func (o *ListProtectedObjectsParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *ListProtectedObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - // query param environment - qrEnvironment := o.Environment - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - - // query param id - qrID := o.ID - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - - if o.IncludeRpoSnapshots != nil { - - // query param includeRpoSnapshots - var qrIncludeRpoSnapshots bool - - if o.IncludeRpoSnapshots != nil { - qrIncludeRpoSnapshots = *o.IncludeRpoSnapshots - } - qIncludeRpoSnapshots := swag.FormatBool(qrIncludeRpoSnapshots) - if qIncludeRpoSnapshots != "" { - - if err := r.SetQueryParam("includeRpoSnapshots", qIncludeRpoSnapshots); err != nil { - return err - } - } - } - - if o.PruneProtectionJobMetadata != nil { - - // query param pruneProtectionJobMetadata - var qrPruneProtectionJobMetadata bool - - if o.PruneProtectionJobMetadata != nil { - qrPruneProtectionJobMetadata = *o.PruneProtectionJobMetadata - } - qPruneProtectionJobMetadata := swag.FormatBool(qrPruneProtectionJobMetadata) - if qPruneProtectionJobMetadata != "" { - - if err := r.SetQueryParam("pruneProtectionJobMetadata", qPruneProtectionJobMetadata); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/list_protected_objects_responses.go b/v1/client/protection_sources/list_protected_objects_responses.go deleted file mode 100644 index eb3b976b..00000000 --- a/v1/client/protection_sources/list_protected_objects_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListProtectedObjectsReader is a Reader for the ListProtectedObjects structure. -type ListProtectedObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListProtectedObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListProtectedObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListProtectedObjectsDefault(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 - } -} - -// NewListProtectedObjectsOK creates a ListProtectedObjectsOK with default headers values -func NewListProtectedObjectsOK() *ListProtectedObjectsOK { - return &ListProtectedObjectsOK{} -} - -/* -ListProtectedObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListProtectedObjectsOK struct { - Payload []*models.ProtectedVMInfo -} - -// IsSuccess returns true when this list protected objects o k response has a 2xx status code -func (o *ListProtectedObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list protected objects o k response has a 3xx status code -func (o *ListProtectedObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list protected objects o k response has a 4xx status code -func (o *ListProtectedObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list protected objects o k response has a 5xx status code -func (o *ListProtectedObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list protected objects o k response a status code equal to that given -func (o *ListProtectedObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list protected objects o k response -func (o *ListProtectedObjectsOK) Code() int { - return 200 -} - -func (o *ListProtectedObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/protectedObjects][%d] listProtectedObjectsOK %s", 200, payload) -} - -func (o *ListProtectedObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/protectedObjects][%d] listProtectedObjectsOK %s", 200, payload) -} - -func (o *ListProtectedObjectsOK) GetPayload() []*models.ProtectedVMInfo { - return o.Payload -} - -func (o *ListProtectedObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListProtectedObjectsDefault creates a ListProtectedObjectsDefault with default headers values -func NewListProtectedObjectsDefault(code int) *ListProtectedObjectsDefault { - return &ListProtectedObjectsDefault{ - _statusCode: code, - } -} - -/* -ListProtectedObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListProtectedObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list protected objects default response has a 2xx status code -func (o *ListProtectedObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list protected objects default response has a 3xx status code -func (o *ListProtectedObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list protected objects default response has a 4xx status code -func (o *ListProtectedObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list protected objects default response has a 5xx status code -func (o *ListProtectedObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list protected objects default response a status code equal to that given -func (o *ListProtectedObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list protected objects default response -func (o *ListProtectedObjectsDefault) Code() int { - return o._statusCode -} - -func (o *ListProtectedObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/protectedObjects][%d] ListProtectedObjects default %s", o._statusCode, payload) -} - -func (o *ListProtectedObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/protectedObjects][%d] ListProtectedObjects default %s", o._statusCode, payload) -} - -func (o *ListProtectedObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListProtectedObjectsDefault) 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_sources/list_protection_sources_parameters.go b/v1/client/protection_sources/list_protection_sources_parameters.go deleted file mode 100644 index 9370c255..00000000 --- a/v1/client/protection_sources/list_protection_sources_parameters.go +++ /dev/null @@ -1,1471 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListProtectionSourcesParams creates a new ListProtectionSourcesParams 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 NewListProtectionSourcesParams() *ListProtectionSourcesParams { - return &ListProtectionSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListProtectionSourcesParamsWithTimeout creates a new ListProtectionSourcesParams object -// with the ability to set a timeout on a request. -func NewListProtectionSourcesParamsWithTimeout(timeout time.Duration) *ListProtectionSourcesParams { - return &ListProtectionSourcesParams{ - timeout: timeout, - } -} - -// NewListProtectionSourcesParamsWithContext creates a new ListProtectionSourcesParams object -// with the ability to set a context for a request. -func NewListProtectionSourcesParamsWithContext(ctx context.Context) *ListProtectionSourcesParams { - return &ListProtectionSourcesParams{ - Context: ctx, - } -} - -// NewListProtectionSourcesParamsWithHTTPClient creates a new ListProtectionSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListProtectionSourcesParamsWithHTTPClient(client *http.Client) *ListProtectionSourcesParams { - return &ListProtectionSourcesParams{ - HTTPClient: client, - } -} - -/* -ListProtectionSourcesParams contains all the parameters to send to the API endpoint - - for the list protection sources operation. - - Typically these are written to a http.Request. -*/ -type ListProtectionSourcesParams struct { - - /* AfterCursorEntityID. - - Specifies the entity id starting from which the items are to be returned. - - Format: int64 - */ - AfterCursorEntityID *int64 - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* BeforeCursorEntityID. - - Specifies the entity id upto which the items are to be returned. - - Format: int64 - */ - BeforeCursorEntityID *int64 - - /* EncryptionKey. - - Key to be used to encrypt the source credential. If - include_source_credentials is set to true this key must be specified. - */ - EncryptionKey *string - - /* Environment. - - This field is deprecated. Use environments instead. - deprecated: true - */ - Environment *string - - /* Environments. - - Return only Protection Sources that match the passed in environment type - such as 'kVMware', 'kSQL', 'kView' 'kPhysical', 'kPuppeteer', 'kPure', - 'kNetapp', 'kGenericNas', 'kHyperV', 'kAcropolis', or 'kAzure'. - For example, set this parameter to 'kVMware' to only return the Sources - (and their Object subtrees) found in the 'kVMware' - (VMware vCenter Server) environment. - - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* ExcludeAwsTypes. - - Specifies the Object types to be filtered out for AWS that match the - passed in types such as 'kEC2Instance', 'kRDSInstance', 'kAuroraCluster', - 'kTag', 'kAuroraTag', 'kRDSTag', kS3Bucket, kS3Tag. - For example, set this parameter to 'kEC2Instance' to exclude ec2 instance - from being returned. - */ - ExcludeAwsTypes []string - - /* ExcludeAzureTypes. - - Specifies the Object types to be filtered out for Azure that match the - passed in types such as 'kVirtualMachine', 'kSQLDatabase'. - For example, set this parameter to 'kVirtualMachine' to exclude azure VMs - from being returned. - */ - ExcludeAzureTypes []string - - /* ExcludeKubernetesTypes. - - Specifies the Object types to be filtered out for Kubernetes that match - the passed in types such as 'kService'. - For example, set this parameter to 'kService' to exclude services - from being returned. - */ - ExcludeKubernetesTypes []string - - /* ExcludeOffice365Types. - - Specifies the Object types to be filtered out for Office 365 that match - the passed in types such as 'kDomain', 'kOutlook', 'kMailbox', etc. - For example, set this parameter to 'kMailbox' to exclude Mailbox Objects - from being returned. - */ - ExcludeOffice365Types []string - - /* ExcludeTypes. - - Filter out the Object types (and their subtrees) that match the passed - in types such as 'kVCenter', 'kFolder', 'kDatacenter', - 'kComputeResource', 'kResourcePool', 'kDatastore', 'kHostSystem', - 'kVirtualMachine', etc. - For example, set this parameter to 'kResourcePool' to - exclude Resource Pool Objects from being returned. - */ - ExcludeTypes []string - - /* GetTeamsChannels. - - Specifies whether to get the list of the channels for a given M365 Teams - object. - This should be set to true only when a single Id belonging to M365 Teams - object is provided in the query params. - */ - GetTeamsChannels *bool - - /* HasValidMailbox. - - If set to true, users with valid mailbox will be returned. - */ - HasValidMailbox *bool - - /* HasValidOnedrive. - - If set to true, users with valid onedrive will be returned. - */ - HasValidOnedrive *bool - - /* ID. - - Return the Object subtree for the passed in Protection Source id. - - Format: int64 - */ - ID *int64 - - /* IncludeDatastores. - - Set this parameter to true to also return kDatastore object types found in - the Source in addition to their Object subtrees. - By default, datastores are not returned. - */ - IncludeDatastores *bool - - /* IncludeEntityPermissionInfo. - - If specified, then a list of entites with permissions assigned to them are - returned. - */ - IncludeEntityPermissionInfo *bool - - /* IncludeExternalMetadata. - - Specifies if entity external metadata should be included within the - response to get entity hierarchy call. - */ - IncludeExternalMetadata *bool - - /* IncludeNetworks. - - Set this parameter to true to also return kNetwork object types found in - the Source in addition to their Object subtrees. - By default, network objects are not returned. - */ - IncludeNetworks *bool - - /* IncludeObjectProtectionInfo. - - If specified, the object protection of entities(if any) will be returned. - */ - IncludeObjectProtectionInfo *bool - - /* IncludeSfdcFields. - - Set this parameter to true to also return fields of the object found - in the Source in addition to their Object subtrees. - By default, Sfdc object fields are not returned. - */ - IncludeSfdcFields *bool - - /* IncludeSourceCredentials. - - If specified, then crednetial for the registered sources will be included. - Credential is first encrypted with internal key and then reencrypted with - user supplied 'encryption_key'. - */ - IncludeSourceCredentials *bool - - /* IncludeSystemVApps. - - Set this parameter to true to also return system VApp object types found - in the Source in addition to their Object subtrees. - By default, VM folder objects are not returned. - */ - IncludeSystemVApps *bool - - /* IncludeVMFolders. - - Set this parameter to true to also return kVMFolder object types found in - the Source in addition to their Object subtrees. - By default, VM folder objects are not returned. - */ - IncludeVMFolders *bool - - /* IsSecurityGroup. - - If set to true, Groups which are security enabled will be returned. - */ - IsSecurityGroup *bool - - /* NodeID. - - Specifies the entity id for the Node at any level within the Source entity - hierarchy whose children are to be paginated. - - Format: int64 - */ - NodeID *int64 - - /* NumLevels. - - Specifies the expected number of levels from the root node to be returned - in the entity hierarchy response. - - Format: int32 - */ - NumLevels *int32 - - /* PageSize. - - Specifies the maximum number of entities to be returned within the page. - - Format: int64 - */ - PageSize *int64 - - /* PruneAggregationInfo. - - Specifies whether to prune the aggregation information about the number - of entities protected/unprotected. - */ - PruneAggregationInfo *bool - - /* PruneMembershipInfo. - - Specifies whether to prune membershipInfo while fetching security groups. - IsSecurityGroup should be true for pruning. - */ - PruneMembershipInfo *bool - - /* PruneNonCriticalInfo. - - Specifies whether to prune non critical info within entities. - Incase of VMs, virtual disk information will be pruned. - Incase of Office365, metadata about user entities will be pruned. - This can be used to limit the size of the response by caller. - */ - PruneNonCriticalInfo *bool - - /* RequestInitiatorType. - - Specifies the type of the request. Possible values are UIUser and UIAuto, - which means the request is triggered by user or is an auto refresh - request. Services like magneto will use this to determine the priority - of the requests, so that it can more intelligently handle overload - situations by prioritizing higher priority requests. - */ - RequestInitiatorType *string - - /* Sids. - - Filter the object subtree for the sids given in the list. - */ - Sids []string - - /* 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. - setting this to true ensures that the API request is served - to the read replica. setting this to false will serve the request to - the master. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesParams) WithDefaults() *ListProtectionSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list protection sources params -func (o *ListProtectionSourcesParams) WithTimeout(timeout time.Duration) *ListProtectionSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list protection sources params -func (o *ListProtectionSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list protection sources params -func (o *ListProtectionSourcesParams) WithContext(ctx context.Context) *ListProtectionSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list protection sources params -func (o *ListProtectionSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list protection sources params -func (o *ListProtectionSourcesParams) WithHTTPClient(client *http.Client) *ListProtectionSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list protection sources params -func (o *ListProtectionSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAfterCursorEntityID adds the afterCursorEntityID to the list protection sources params -func (o *ListProtectionSourcesParams) WithAfterCursorEntityID(afterCursorEntityID *int64) *ListProtectionSourcesParams { - o.SetAfterCursorEntityID(afterCursorEntityID) - return o -} - -// SetAfterCursorEntityID adds the afterCursorEntityId to the list protection sources params -func (o *ListProtectionSourcesParams) SetAfterCursorEntityID(afterCursorEntityID *int64) { - o.AfterCursorEntityID = afterCursorEntityID -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the list protection sources params -func (o *ListProtectionSourcesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *ListProtectionSourcesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the list protection sources params -func (o *ListProtectionSourcesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithBeforeCursorEntityID adds the beforeCursorEntityID to the list protection sources params -func (o *ListProtectionSourcesParams) WithBeforeCursorEntityID(beforeCursorEntityID *int64) *ListProtectionSourcesParams { - o.SetBeforeCursorEntityID(beforeCursorEntityID) - return o -} - -// SetBeforeCursorEntityID adds the beforeCursorEntityId to the list protection sources params -func (o *ListProtectionSourcesParams) SetBeforeCursorEntityID(beforeCursorEntityID *int64) { - o.BeforeCursorEntityID = beforeCursorEntityID -} - -// WithEncryptionKey adds the encryptionKey to the list protection sources params -func (o *ListProtectionSourcesParams) WithEncryptionKey(encryptionKey *string) *ListProtectionSourcesParams { - o.SetEncryptionKey(encryptionKey) - return o -} - -// SetEncryptionKey adds the encryptionKey to the list protection sources params -func (o *ListProtectionSourcesParams) SetEncryptionKey(encryptionKey *string) { - o.EncryptionKey = encryptionKey -} - -// WithEnvironment adds the environment to the list protection sources params -func (o *ListProtectionSourcesParams) WithEnvironment(environment *string) *ListProtectionSourcesParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the list protection sources params -func (o *ListProtectionSourcesParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithEnvironments adds the environments to the list protection sources params -func (o *ListProtectionSourcesParams) WithEnvironments(environments []string) *ListProtectionSourcesParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the list protection sources params -func (o *ListProtectionSourcesParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithExcludeAwsTypes adds the excludeAwsTypes to the list protection sources params -func (o *ListProtectionSourcesParams) WithExcludeAwsTypes(excludeAwsTypes []string) *ListProtectionSourcesParams { - o.SetExcludeAwsTypes(excludeAwsTypes) - return o -} - -// SetExcludeAwsTypes adds the excludeAwsTypes to the list protection sources params -func (o *ListProtectionSourcesParams) SetExcludeAwsTypes(excludeAwsTypes []string) { - o.ExcludeAwsTypes = excludeAwsTypes -} - -// WithExcludeAzureTypes adds the excludeAzureTypes to the list protection sources params -func (o *ListProtectionSourcesParams) WithExcludeAzureTypes(excludeAzureTypes []string) *ListProtectionSourcesParams { - o.SetExcludeAzureTypes(excludeAzureTypes) - return o -} - -// SetExcludeAzureTypes adds the excludeAzureTypes to the list protection sources params -func (o *ListProtectionSourcesParams) SetExcludeAzureTypes(excludeAzureTypes []string) { - o.ExcludeAzureTypes = excludeAzureTypes -} - -// WithExcludeKubernetesTypes adds the excludeKubernetesTypes to the list protection sources params -func (o *ListProtectionSourcesParams) WithExcludeKubernetesTypes(excludeKubernetesTypes []string) *ListProtectionSourcesParams { - o.SetExcludeKubernetesTypes(excludeKubernetesTypes) - return o -} - -// SetExcludeKubernetesTypes adds the excludeKubernetesTypes to the list protection sources params -func (o *ListProtectionSourcesParams) SetExcludeKubernetesTypes(excludeKubernetesTypes []string) { - o.ExcludeKubernetesTypes = excludeKubernetesTypes -} - -// WithExcludeOffice365Types adds the excludeOffice365Types to the list protection sources params -func (o *ListProtectionSourcesParams) WithExcludeOffice365Types(excludeOffice365Types []string) *ListProtectionSourcesParams { - o.SetExcludeOffice365Types(excludeOffice365Types) - return o -} - -// SetExcludeOffice365Types adds the excludeOffice365Types to the list protection sources params -func (o *ListProtectionSourcesParams) SetExcludeOffice365Types(excludeOffice365Types []string) { - o.ExcludeOffice365Types = excludeOffice365Types -} - -// WithExcludeTypes adds the excludeTypes to the list protection sources params -func (o *ListProtectionSourcesParams) WithExcludeTypes(excludeTypes []string) *ListProtectionSourcesParams { - o.SetExcludeTypes(excludeTypes) - return o -} - -// SetExcludeTypes adds the excludeTypes to the list protection sources params -func (o *ListProtectionSourcesParams) SetExcludeTypes(excludeTypes []string) { - o.ExcludeTypes = excludeTypes -} - -// WithGetTeamsChannels adds the getTeamsChannels to the list protection sources params -func (o *ListProtectionSourcesParams) WithGetTeamsChannels(getTeamsChannels *bool) *ListProtectionSourcesParams { - o.SetGetTeamsChannels(getTeamsChannels) - return o -} - -// SetGetTeamsChannels adds the getTeamsChannels to the list protection sources params -func (o *ListProtectionSourcesParams) SetGetTeamsChannels(getTeamsChannels *bool) { - o.GetTeamsChannels = getTeamsChannels -} - -// WithHasValidMailbox adds the hasValidMailbox to the list protection sources params -func (o *ListProtectionSourcesParams) WithHasValidMailbox(hasValidMailbox *bool) *ListProtectionSourcesParams { - o.SetHasValidMailbox(hasValidMailbox) - return o -} - -// SetHasValidMailbox adds the hasValidMailbox to the list protection sources params -func (o *ListProtectionSourcesParams) SetHasValidMailbox(hasValidMailbox *bool) { - o.HasValidMailbox = hasValidMailbox -} - -// WithHasValidOnedrive adds the hasValidOnedrive to the list protection sources params -func (o *ListProtectionSourcesParams) WithHasValidOnedrive(hasValidOnedrive *bool) *ListProtectionSourcesParams { - o.SetHasValidOnedrive(hasValidOnedrive) - return o -} - -// SetHasValidOnedrive adds the hasValidOnedrive to the list protection sources params -func (o *ListProtectionSourcesParams) SetHasValidOnedrive(hasValidOnedrive *bool) { - o.HasValidOnedrive = hasValidOnedrive -} - -// WithID adds the id to the list protection sources params -func (o *ListProtectionSourcesParams) WithID(id *int64) *ListProtectionSourcesParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list protection sources params -func (o *ListProtectionSourcesParams) SetID(id *int64) { - o.ID = id -} - -// WithIncludeDatastores adds the includeDatastores to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeDatastores(includeDatastores *bool) *ListProtectionSourcesParams { - o.SetIncludeDatastores(includeDatastores) - return o -} - -// SetIncludeDatastores adds the includeDatastores to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeDatastores(includeDatastores *bool) { - o.IncludeDatastores = includeDatastores -} - -// WithIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) *ListProtectionSourcesParams { - o.SetIncludeEntityPermissionInfo(includeEntityPermissionInfo) - return o -} - -// SetIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) { - o.IncludeEntityPermissionInfo = includeEntityPermissionInfo -} - -// WithIncludeExternalMetadata adds the includeExternalMetadata to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeExternalMetadata(includeExternalMetadata *bool) *ListProtectionSourcesParams { - o.SetIncludeExternalMetadata(includeExternalMetadata) - return o -} - -// SetIncludeExternalMetadata adds the includeExternalMetadata to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeExternalMetadata(includeExternalMetadata *bool) { - o.IncludeExternalMetadata = includeExternalMetadata -} - -// WithIncludeNetworks adds the includeNetworks to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeNetworks(includeNetworks *bool) *ListProtectionSourcesParams { - o.SetIncludeNetworks(includeNetworks) - return o -} - -// SetIncludeNetworks adds the includeNetworks to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeNetworks(includeNetworks *bool) { - o.IncludeNetworks = includeNetworks -} - -// WithIncludeObjectProtectionInfo adds the includeObjectProtectionInfo to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeObjectProtectionInfo(includeObjectProtectionInfo *bool) *ListProtectionSourcesParams { - o.SetIncludeObjectProtectionInfo(includeObjectProtectionInfo) - return o -} - -// SetIncludeObjectProtectionInfo adds the includeObjectProtectionInfo to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeObjectProtectionInfo(includeObjectProtectionInfo *bool) { - o.IncludeObjectProtectionInfo = includeObjectProtectionInfo -} - -// WithIncludeSfdcFields adds the includeSfdcFields to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeSfdcFields(includeSfdcFields *bool) *ListProtectionSourcesParams { - o.SetIncludeSfdcFields(includeSfdcFields) - return o -} - -// SetIncludeSfdcFields adds the includeSfdcFields to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeSfdcFields(includeSfdcFields *bool) { - o.IncludeSfdcFields = includeSfdcFields -} - -// WithIncludeSourceCredentials adds the includeSourceCredentials to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeSourceCredentials(includeSourceCredentials *bool) *ListProtectionSourcesParams { - o.SetIncludeSourceCredentials(includeSourceCredentials) - return o -} - -// SetIncludeSourceCredentials adds the includeSourceCredentials to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeSourceCredentials(includeSourceCredentials *bool) { - o.IncludeSourceCredentials = includeSourceCredentials -} - -// WithIncludeSystemVApps adds the includeSystemVApps to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeSystemVApps(includeSystemVApps *bool) *ListProtectionSourcesParams { - o.SetIncludeSystemVApps(includeSystemVApps) - return o -} - -// SetIncludeSystemVApps adds the includeSystemVApps to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeSystemVApps(includeSystemVApps *bool) { - o.IncludeSystemVApps = includeSystemVApps -} - -// WithIncludeVMFolders adds the includeVMFolders to the list protection sources params -func (o *ListProtectionSourcesParams) WithIncludeVMFolders(includeVMFolders *bool) *ListProtectionSourcesParams { - o.SetIncludeVMFolders(includeVMFolders) - return o -} - -// SetIncludeVMFolders adds the includeVmFolders to the list protection sources params -func (o *ListProtectionSourcesParams) SetIncludeVMFolders(includeVMFolders *bool) { - o.IncludeVMFolders = includeVMFolders -} - -// WithIsSecurityGroup adds the isSecurityGroup to the list protection sources params -func (o *ListProtectionSourcesParams) WithIsSecurityGroup(isSecurityGroup *bool) *ListProtectionSourcesParams { - o.SetIsSecurityGroup(isSecurityGroup) - return o -} - -// SetIsSecurityGroup adds the isSecurityGroup to the list protection sources params -func (o *ListProtectionSourcesParams) SetIsSecurityGroup(isSecurityGroup *bool) { - o.IsSecurityGroup = isSecurityGroup -} - -// WithNodeID adds the nodeID to the list protection sources params -func (o *ListProtectionSourcesParams) WithNodeID(nodeID *int64) *ListProtectionSourcesParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the list protection sources params -func (o *ListProtectionSourcesParams) SetNodeID(nodeID *int64) { - o.NodeID = nodeID -} - -// WithNumLevels adds the numLevels to the list protection sources params -func (o *ListProtectionSourcesParams) WithNumLevels(numLevels *int32) *ListProtectionSourcesParams { - o.SetNumLevels(numLevels) - return o -} - -// SetNumLevels adds the numLevels to the list protection sources params -func (o *ListProtectionSourcesParams) SetNumLevels(numLevels *int32) { - o.NumLevels = numLevels -} - -// WithPageSize adds the pageSize to the list protection sources params -func (o *ListProtectionSourcesParams) WithPageSize(pageSize *int64) *ListProtectionSourcesParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list protection sources params -func (o *ListProtectionSourcesParams) SetPageSize(pageSize *int64) { - o.PageSize = pageSize -} - -// WithPruneAggregationInfo adds the pruneAggregationInfo to the list protection sources params -func (o *ListProtectionSourcesParams) WithPruneAggregationInfo(pruneAggregationInfo *bool) *ListProtectionSourcesParams { - o.SetPruneAggregationInfo(pruneAggregationInfo) - return o -} - -// SetPruneAggregationInfo adds the pruneAggregationInfo to the list protection sources params -func (o *ListProtectionSourcesParams) SetPruneAggregationInfo(pruneAggregationInfo *bool) { - o.PruneAggregationInfo = pruneAggregationInfo -} - -// WithPruneMembershipInfo adds the pruneMembershipInfo to the list protection sources params -func (o *ListProtectionSourcesParams) WithPruneMembershipInfo(pruneMembershipInfo *bool) *ListProtectionSourcesParams { - o.SetPruneMembershipInfo(pruneMembershipInfo) - return o -} - -// SetPruneMembershipInfo adds the pruneMembershipInfo to the list protection sources params -func (o *ListProtectionSourcesParams) SetPruneMembershipInfo(pruneMembershipInfo *bool) { - o.PruneMembershipInfo = pruneMembershipInfo -} - -// WithPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list protection sources params -func (o *ListProtectionSourcesParams) WithPruneNonCriticalInfo(pruneNonCriticalInfo *bool) *ListProtectionSourcesParams { - o.SetPruneNonCriticalInfo(pruneNonCriticalInfo) - return o -} - -// SetPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list protection sources params -func (o *ListProtectionSourcesParams) SetPruneNonCriticalInfo(pruneNonCriticalInfo *bool) { - o.PruneNonCriticalInfo = pruneNonCriticalInfo -} - -// WithRequestInitiatorType adds the requestInitiatorType to the list protection sources params -func (o *ListProtectionSourcesParams) WithRequestInitiatorType(requestInitiatorType *string) *ListProtectionSourcesParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the list protection sources params -func (o *ListProtectionSourcesParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithSids adds the sids to the list protection sources params -func (o *ListProtectionSourcesParams) WithSids(sids []string) *ListProtectionSourcesParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the list protection sources params -func (o *ListProtectionSourcesParams) SetSids(sids []string) { - o.Sids = sids -} - -// WithTenantIds adds the tenantIds to the list protection sources params -func (o *ListProtectionSourcesParams) WithTenantIds(tenantIds []string) *ListProtectionSourcesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the list protection sources params -func (o *ListProtectionSourcesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the list protection sources params -func (o *ListProtectionSourcesParams) WithUseCachedData(useCachedData *bool) *ListProtectionSourcesParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the list protection sources params -func (o *ListProtectionSourcesParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *ListProtectionSourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AfterCursorEntityID != nil { - - // query param afterCursorEntityId - var qrAfterCursorEntityID int64 - - if o.AfterCursorEntityID != nil { - qrAfterCursorEntityID = *o.AfterCursorEntityID - } - qAfterCursorEntityID := swag.FormatInt64(qrAfterCursorEntityID) - if qAfterCursorEntityID != "" { - - if err := r.SetQueryParam("afterCursorEntityId", qAfterCursorEntityID); err != nil { - return err - } - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.BeforeCursorEntityID != nil { - - // query param beforeCursorEntityId - var qrBeforeCursorEntityID int64 - - if o.BeforeCursorEntityID != nil { - qrBeforeCursorEntityID = *o.BeforeCursorEntityID - } - qBeforeCursorEntityID := swag.FormatInt64(qrBeforeCursorEntityID) - if qBeforeCursorEntityID != "" { - - if err := r.SetQueryParam("beforeCursorEntityId", qBeforeCursorEntityID); err != nil { - return err - } - } - } - - if o.EncryptionKey != nil { - - // query param encryptionKey - var qrEncryptionKey string - - if o.EncryptionKey != nil { - qrEncryptionKey = *o.EncryptionKey - } - qEncryptionKey := qrEncryptionKey - if qEncryptionKey != "" { - - if err := r.SetQueryParam("encryptionKey", qEncryptionKey); err != nil { - return err - } - } - } - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.ExcludeAwsTypes != nil { - - // binding items for excludeAwsTypes - joinedExcludeAwsTypes := o.bindParamExcludeAwsTypes(reg) - - // query array param excludeAwsTypes - if err := r.SetQueryParam("excludeAwsTypes", joinedExcludeAwsTypes...); err != nil { - return err - } - } - - if o.ExcludeAzureTypes != nil { - - // binding items for excludeAzureTypes - joinedExcludeAzureTypes := o.bindParamExcludeAzureTypes(reg) - - // query array param excludeAzureTypes - if err := r.SetQueryParam("excludeAzureTypes", joinedExcludeAzureTypes...); err != nil { - return err - } - } - - if o.ExcludeKubernetesTypes != nil { - - // binding items for excludeKubernetesTypes - joinedExcludeKubernetesTypes := o.bindParamExcludeKubernetesTypes(reg) - - // query array param excludeKubernetesTypes - if err := r.SetQueryParam("excludeKubernetesTypes", joinedExcludeKubernetesTypes...); err != nil { - return err - } - } - - if o.ExcludeOffice365Types != nil { - - // binding items for excludeOffice365Types - joinedExcludeOffice365Types := o.bindParamExcludeOffice365Types(reg) - - // query array param excludeOffice365Types - if err := r.SetQueryParam("excludeOffice365Types", joinedExcludeOffice365Types...); err != nil { - return err - } - } - - if o.ExcludeTypes != nil { - - // binding items for excludeTypes - joinedExcludeTypes := o.bindParamExcludeTypes(reg) - - // query array param excludeTypes - if err := r.SetQueryParam("excludeTypes", joinedExcludeTypes...); err != nil { - return err - } - } - - if o.GetTeamsChannels != nil { - - // query param getTeamsChannels - var qrGetTeamsChannels bool - - if o.GetTeamsChannels != nil { - qrGetTeamsChannels = *o.GetTeamsChannels - } - qGetTeamsChannels := swag.FormatBool(qrGetTeamsChannels) - if qGetTeamsChannels != "" { - - if err := r.SetQueryParam("getTeamsChannels", qGetTeamsChannels); err != nil { - return err - } - } - } - - if o.HasValidMailbox != nil { - - // query param hasValidMailbox - var qrHasValidMailbox bool - - if o.HasValidMailbox != nil { - qrHasValidMailbox = *o.HasValidMailbox - } - qHasValidMailbox := swag.FormatBool(qrHasValidMailbox) - if qHasValidMailbox != "" { - - if err := r.SetQueryParam("hasValidMailbox", qHasValidMailbox); err != nil { - return err - } - } - } - - if o.HasValidOnedrive != nil { - - // query param hasValidOnedrive - var qrHasValidOnedrive bool - - if o.HasValidOnedrive != nil { - qrHasValidOnedrive = *o.HasValidOnedrive - } - qHasValidOnedrive := swag.FormatBool(qrHasValidOnedrive) - if qHasValidOnedrive != "" { - - if err := r.SetQueryParam("hasValidOnedrive", qHasValidOnedrive); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID int64 - - if o.ID != nil { - qrID = *o.ID - } - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IncludeDatastores != nil { - - // query param includeDatastores - var qrIncludeDatastores bool - - if o.IncludeDatastores != nil { - qrIncludeDatastores = *o.IncludeDatastores - } - qIncludeDatastores := swag.FormatBool(qrIncludeDatastores) - if qIncludeDatastores != "" { - - if err := r.SetQueryParam("includeDatastores", qIncludeDatastores); err != nil { - return err - } - } - } - - if o.IncludeEntityPermissionInfo != nil { - - // query param includeEntityPermissionInfo - var qrIncludeEntityPermissionInfo bool - - if o.IncludeEntityPermissionInfo != nil { - qrIncludeEntityPermissionInfo = *o.IncludeEntityPermissionInfo - } - qIncludeEntityPermissionInfo := swag.FormatBool(qrIncludeEntityPermissionInfo) - if qIncludeEntityPermissionInfo != "" { - - if err := r.SetQueryParam("includeEntityPermissionInfo", qIncludeEntityPermissionInfo); err != nil { - return err - } - } - } - - if o.IncludeExternalMetadata != nil { - - // query param includeExternalMetadata - var qrIncludeExternalMetadata bool - - if o.IncludeExternalMetadata != nil { - qrIncludeExternalMetadata = *o.IncludeExternalMetadata - } - qIncludeExternalMetadata := swag.FormatBool(qrIncludeExternalMetadata) - if qIncludeExternalMetadata != "" { - - if err := r.SetQueryParam("includeExternalMetadata", qIncludeExternalMetadata); err != nil { - return err - } - } - } - - if o.IncludeNetworks != nil { - - // query param includeNetworks - var qrIncludeNetworks bool - - if o.IncludeNetworks != nil { - qrIncludeNetworks = *o.IncludeNetworks - } - qIncludeNetworks := swag.FormatBool(qrIncludeNetworks) - if qIncludeNetworks != "" { - - if err := r.SetQueryParam("includeNetworks", qIncludeNetworks); err != nil { - return err - } - } - } - - if o.IncludeObjectProtectionInfo != nil { - - // query param includeObjectProtectionInfo - var qrIncludeObjectProtectionInfo bool - - if o.IncludeObjectProtectionInfo != nil { - qrIncludeObjectProtectionInfo = *o.IncludeObjectProtectionInfo - } - qIncludeObjectProtectionInfo := swag.FormatBool(qrIncludeObjectProtectionInfo) - if qIncludeObjectProtectionInfo != "" { - - if err := r.SetQueryParam("includeObjectProtectionInfo", qIncludeObjectProtectionInfo); err != nil { - return err - } - } - } - - if o.IncludeSfdcFields != nil { - - // query param includeSfdcFields - var qrIncludeSfdcFields bool - - if o.IncludeSfdcFields != nil { - qrIncludeSfdcFields = *o.IncludeSfdcFields - } - qIncludeSfdcFields := swag.FormatBool(qrIncludeSfdcFields) - if qIncludeSfdcFields != "" { - - if err := r.SetQueryParam("includeSfdcFields", qIncludeSfdcFields); err != nil { - return err - } - } - } - - if o.IncludeSourceCredentials != nil { - - // query param includeSourceCredentials - var qrIncludeSourceCredentials bool - - if o.IncludeSourceCredentials != nil { - qrIncludeSourceCredentials = *o.IncludeSourceCredentials - } - qIncludeSourceCredentials := swag.FormatBool(qrIncludeSourceCredentials) - if qIncludeSourceCredentials != "" { - - if err := r.SetQueryParam("includeSourceCredentials", qIncludeSourceCredentials); err != nil { - return err - } - } - } - - if o.IncludeSystemVApps != nil { - - // query param includeSystemVApps - var qrIncludeSystemVApps bool - - if o.IncludeSystemVApps != nil { - qrIncludeSystemVApps = *o.IncludeSystemVApps - } - qIncludeSystemVApps := swag.FormatBool(qrIncludeSystemVApps) - if qIncludeSystemVApps != "" { - - if err := r.SetQueryParam("includeSystemVApps", qIncludeSystemVApps); err != nil { - return err - } - } - } - - if o.IncludeVMFolders != nil { - - // query param includeVMFolders - var qrIncludeVMFolders bool - - if o.IncludeVMFolders != nil { - qrIncludeVMFolders = *o.IncludeVMFolders - } - qIncludeVMFolders := swag.FormatBool(qrIncludeVMFolders) - if qIncludeVMFolders != "" { - - if err := r.SetQueryParam("includeVMFolders", qIncludeVMFolders); err != nil { - return err - } - } - } - - if o.IsSecurityGroup != nil { - - // query param isSecurityGroup - var qrIsSecurityGroup bool - - if o.IsSecurityGroup != nil { - qrIsSecurityGroup = *o.IsSecurityGroup - } - qIsSecurityGroup := swag.FormatBool(qrIsSecurityGroup) - if qIsSecurityGroup != "" { - - if err := r.SetQueryParam("isSecurityGroup", qIsSecurityGroup); err != nil { - return err - } - } - } - - if o.NodeID != nil { - - // query param nodeId - var qrNodeID int64 - - if o.NodeID != nil { - qrNodeID = *o.NodeID - } - qNodeID := swag.FormatInt64(qrNodeID) - if qNodeID != "" { - - if err := r.SetQueryParam("nodeId", qNodeID); err != nil { - return err - } - } - } - - if o.NumLevels != nil { - - // query param numLevels - var qrNumLevels int32 - - if o.NumLevels != nil { - qrNumLevels = *o.NumLevels - } - qNumLevels := swag.FormatInt32(qrNumLevels) - if qNumLevels != "" { - - if err := r.SetQueryParam("numLevels", qNumLevels); err != nil { - return err - } - } - } - - if o.PageSize != nil { - - // query param pageSize - var qrPageSize int64 - - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt64(qrPageSize) - if qPageSize != "" { - - if err := r.SetQueryParam("pageSize", qPageSize); err != nil { - return err - } - } - } - - if o.PruneAggregationInfo != nil { - - // query param pruneAggregationInfo - var qrPruneAggregationInfo bool - - if o.PruneAggregationInfo != nil { - qrPruneAggregationInfo = *o.PruneAggregationInfo - } - qPruneAggregationInfo := swag.FormatBool(qrPruneAggregationInfo) - if qPruneAggregationInfo != "" { - - if err := r.SetQueryParam("pruneAggregationInfo", qPruneAggregationInfo); err != nil { - return err - } - } - } - - if o.PruneMembershipInfo != nil { - - // query param pruneMembershipInfo - var qrPruneMembershipInfo bool - - if o.PruneMembershipInfo != nil { - qrPruneMembershipInfo = *o.PruneMembershipInfo - } - qPruneMembershipInfo := swag.FormatBool(qrPruneMembershipInfo) - if qPruneMembershipInfo != "" { - - if err := r.SetQueryParam("pruneMembershipInfo", qPruneMembershipInfo); err != nil { - return err - } - } - } - - if o.PruneNonCriticalInfo != nil { - - // query param pruneNonCriticalInfo - var qrPruneNonCriticalInfo bool - - if o.PruneNonCriticalInfo != nil { - qrPruneNonCriticalInfo = *o.PruneNonCriticalInfo - } - qPruneNonCriticalInfo := swag.FormatBool(qrPruneNonCriticalInfo) - if qPruneNonCriticalInfo != "" { - - if err := r.SetQueryParam("pruneNonCriticalInfo", qPruneNonCriticalInfo); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListProtectionSources binds the parameter environments -func (o *ListProtectionSourcesParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamListProtectionSources binds the parameter excludeAwsTypes -func (o *ListProtectionSourcesParams) bindParamExcludeAwsTypes(formats strfmt.Registry) []string { - excludeAwsTypesIR := o.ExcludeAwsTypes - - var excludeAwsTypesIC []string - for _, excludeAwsTypesIIR := range excludeAwsTypesIR { // explode []string - - excludeAwsTypesIIV := excludeAwsTypesIIR // string as string - excludeAwsTypesIC = append(excludeAwsTypesIC, excludeAwsTypesIIV) - } - - // items.CollectionFormat: "" - excludeAwsTypesIS := swag.JoinByFormat(excludeAwsTypesIC, "") - - return excludeAwsTypesIS -} - -// bindParamListProtectionSources binds the parameter excludeAzureTypes -func (o *ListProtectionSourcesParams) bindParamExcludeAzureTypes(formats strfmt.Registry) []string { - excludeAzureTypesIR := o.ExcludeAzureTypes - - var excludeAzureTypesIC []string - for _, excludeAzureTypesIIR := range excludeAzureTypesIR { // explode []string - - excludeAzureTypesIIV := excludeAzureTypesIIR // string as string - excludeAzureTypesIC = append(excludeAzureTypesIC, excludeAzureTypesIIV) - } - - // items.CollectionFormat: "" - excludeAzureTypesIS := swag.JoinByFormat(excludeAzureTypesIC, "") - - return excludeAzureTypesIS -} - -// bindParamListProtectionSources binds the parameter excludeKubernetesTypes -func (o *ListProtectionSourcesParams) bindParamExcludeKubernetesTypes(formats strfmt.Registry) []string { - excludeKubernetesTypesIR := o.ExcludeKubernetesTypes - - var excludeKubernetesTypesIC []string - for _, excludeKubernetesTypesIIR := range excludeKubernetesTypesIR { // explode []string - - excludeKubernetesTypesIIV := excludeKubernetesTypesIIR // string as string - excludeKubernetesTypesIC = append(excludeKubernetesTypesIC, excludeKubernetesTypesIIV) - } - - // items.CollectionFormat: "" - excludeKubernetesTypesIS := swag.JoinByFormat(excludeKubernetesTypesIC, "") - - return excludeKubernetesTypesIS -} - -// bindParamListProtectionSources binds the parameter excludeOffice365Types -func (o *ListProtectionSourcesParams) bindParamExcludeOffice365Types(formats strfmt.Registry) []string { - excludeOffice365TypesIR := o.ExcludeOffice365Types - - var excludeOffice365TypesIC []string - for _, excludeOffice365TypesIIR := range excludeOffice365TypesIR { // explode []string - - excludeOffice365TypesIIV := excludeOffice365TypesIIR // string as string - excludeOffice365TypesIC = append(excludeOffice365TypesIC, excludeOffice365TypesIIV) - } - - // items.CollectionFormat: "" - excludeOffice365TypesIS := swag.JoinByFormat(excludeOffice365TypesIC, "") - - return excludeOffice365TypesIS -} - -// bindParamListProtectionSources binds the parameter excludeTypes -func (o *ListProtectionSourcesParams) bindParamExcludeTypes(formats strfmt.Registry) []string { - excludeTypesIR := o.ExcludeTypes - - var excludeTypesIC []string - for _, excludeTypesIIR := range excludeTypesIR { // explode []string - - excludeTypesIIV := excludeTypesIIR // string as string - excludeTypesIC = append(excludeTypesIC, excludeTypesIIV) - } - - // items.CollectionFormat: "" - excludeTypesIS := swag.JoinByFormat(excludeTypesIC, "") - - return excludeTypesIS -} - -// bindParamListProtectionSources binds the parameter sids -func (o *ListProtectionSourcesParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} - -// bindParamListProtectionSources binds the parameter tenantIds -func (o *ListProtectionSourcesParams) 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/v1/client/protection_sources/list_protection_sources_registration_info_parameters.go b/v1/client/protection_sources/list_protection_sources_registration_info_parameters.go deleted file mode 100644 index 5e9d6728..00000000 --- a/v1/client/protection_sources/list_protection_sources_registration_info_parameters.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListProtectionSourcesRegistrationInfoParams creates a new ListProtectionSourcesRegistrationInfoParams 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 NewListProtectionSourcesRegistrationInfoParams() *ListProtectionSourcesRegistrationInfoParams { - return &ListProtectionSourcesRegistrationInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListProtectionSourcesRegistrationInfoParamsWithTimeout creates a new ListProtectionSourcesRegistrationInfoParams object -// with the ability to set a timeout on a request. -func NewListProtectionSourcesRegistrationInfoParamsWithTimeout(timeout time.Duration) *ListProtectionSourcesRegistrationInfoParams { - return &ListProtectionSourcesRegistrationInfoParams{ - timeout: timeout, - } -} - -// NewListProtectionSourcesRegistrationInfoParamsWithContext creates a new ListProtectionSourcesRegistrationInfoParams object -// with the ability to set a context for a request. -func NewListProtectionSourcesRegistrationInfoParamsWithContext(ctx context.Context) *ListProtectionSourcesRegistrationInfoParams { - return &ListProtectionSourcesRegistrationInfoParams{ - Context: ctx, - } -} - -// NewListProtectionSourcesRegistrationInfoParamsWithHTTPClient creates a new ListProtectionSourcesRegistrationInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewListProtectionSourcesRegistrationInfoParamsWithHTTPClient(client *http.Client) *ListProtectionSourcesRegistrationInfoParams { - return &ListProtectionSourcesRegistrationInfoParams{ - HTTPClient: client, - } -} - -/* -ListProtectionSourcesRegistrationInfoParams contains all the parameters to send to the API endpoint - - for the list protection sources registration info operation. - - Typically these are written to a http.Request. -*/ -type ListProtectionSourcesRegistrationInfoParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EncryptionKey. - - Key to be used to encrypt the source credential. If - include_source_credentials is set to true this key must be specified. - */ - EncryptionKey *string - - /* Environments. - - Return only Protection Sources that match the passed in environment type - such as 'kVMware', 'kSQL', 'kView' 'kPhysical', 'kPuppeteer', 'kPure', - 'kNetapp', 'kGenericNas', 'kHyperV', 'kAcropolis', or 'kAzure'. - For example, set this parameter to 'kVMware' to only return the Sources - (and their Object subtrees) found in the 'kVMware' - (VMware vCenter Server) environment. - - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* Ids. - - Return only the registered root nodes whose Ids are given in the list. - */ - Ids []int64 - - /* IncludeApplicationsTreeInfo. - - Specifies whether to return applications tree info or not. - */ - IncludeApplicationsTreeInfo *bool - - /* IncludeEntityPermissionInfo. - - If specified, then a list of entities with permissions assigned to them are - returned. - */ - IncludeEntityPermissionInfo *bool - - /* IncludeExternalMetadata. - - Specifies if entity external metadata should be included within the - response to get entity hierarchy call. - */ - IncludeExternalMetadata *bool - - /* IncludeSourceCredentials. - - If specified, then crednetial for the registered sources will be included. - Credential is first encrypted with internal key and then reencrypted with - user supplied 'encryption_key'. - */ - IncludeSourceCredentials *bool - - /* MaintenanceStatus. - - Specifies the maintenance status of a source - 'UnderMaintenance' indicates the source is currently under maintenance. - 'ScheduledMaintenance' indicates the source is scheduled for maintenance. - 'NotConfigured' indicates maintenance is not configured on the source. - */ - MaintenanceStatus *string - - /* PruneNonCriticalInfo. - - Specifies whether to prune non critical info within entities. - Incase of VMs, virtual disk information will be pruned. - Incase of Office365, metadata about user entities will be pruned. - This can be used to limit the size of the response by caller. - */ - PruneNonCriticalInfo *bool - - /* RequestInitiatorType. - - Specifies the type of the request. Possible values are UIUser and UIAuto, - which means the request is triggered by user or is an auto refresh - request. Services like magneto will use this to determine the priority - of the requests, so that it can more intelligently handle overload - situations by prioritizing higher priority requests. - */ - RequestInitiatorType *string - - /* Sids. - - Filter the registered root nodes for the sids given in the list. - */ - Sids []string - - /* 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. - setting this to true ensures that the API request is served - to the read replica. setting this to false will serve the request to - the master. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list protection sources registration info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesRegistrationInfoParams) WithDefaults() *ListProtectionSourcesRegistrationInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list protection sources registration info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesRegistrationInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithTimeout(timeout time.Duration) *ListProtectionSourcesRegistrationInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithContext(ctx context.Context) *ListProtectionSourcesRegistrationInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithHTTPClient(client *http.Client) *ListProtectionSourcesRegistrationInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEncryptionKey adds the encryptionKey to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithEncryptionKey(encryptionKey *string) *ListProtectionSourcesRegistrationInfoParams { - o.SetEncryptionKey(encryptionKey) - return o -} - -// SetEncryptionKey adds the encryptionKey to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetEncryptionKey(encryptionKey *string) { - o.EncryptionKey = encryptionKey -} - -// WithEnvironments adds the environments to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithEnvironments(environments []string) *ListProtectionSourcesRegistrationInfoParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIds adds the ids to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithIds(ids []int64) *ListProtectionSourcesRegistrationInfoParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeApplicationsTreeInfo adds the includeApplicationsTreeInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithIncludeApplicationsTreeInfo(includeApplicationsTreeInfo *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetIncludeApplicationsTreeInfo(includeApplicationsTreeInfo) - return o -} - -// SetIncludeApplicationsTreeInfo adds the includeApplicationsTreeInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetIncludeApplicationsTreeInfo(includeApplicationsTreeInfo *bool) { - o.IncludeApplicationsTreeInfo = includeApplicationsTreeInfo -} - -// WithIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetIncludeEntityPermissionInfo(includeEntityPermissionInfo) - return o -} - -// SetIncludeEntityPermissionInfo adds the includeEntityPermissionInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetIncludeEntityPermissionInfo(includeEntityPermissionInfo *bool) { - o.IncludeEntityPermissionInfo = includeEntityPermissionInfo -} - -// WithIncludeExternalMetadata adds the includeExternalMetadata to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithIncludeExternalMetadata(includeExternalMetadata *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetIncludeExternalMetadata(includeExternalMetadata) - return o -} - -// SetIncludeExternalMetadata adds the includeExternalMetadata to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetIncludeExternalMetadata(includeExternalMetadata *bool) { - o.IncludeExternalMetadata = includeExternalMetadata -} - -// WithIncludeSourceCredentials adds the includeSourceCredentials to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithIncludeSourceCredentials(includeSourceCredentials *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetIncludeSourceCredentials(includeSourceCredentials) - return o -} - -// SetIncludeSourceCredentials adds the includeSourceCredentials to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetIncludeSourceCredentials(includeSourceCredentials *bool) { - o.IncludeSourceCredentials = includeSourceCredentials -} - -// WithMaintenanceStatus adds the maintenanceStatus to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithMaintenanceStatus(maintenanceStatus *string) *ListProtectionSourcesRegistrationInfoParams { - o.SetMaintenanceStatus(maintenanceStatus) - return o -} - -// SetMaintenanceStatus adds the maintenanceStatus to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetMaintenanceStatus(maintenanceStatus *string) { - o.MaintenanceStatus = maintenanceStatus -} - -// WithPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithPruneNonCriticalInfo(pruneNonCriticalInfo *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetPruneNonCriticalInfo(pruneNonCriticalInfo) - return o -} - -// SetPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetPruneNonCriticalInfo(pruneNonCriticalInfo *bool) { - o.PruneNonCriticalInfo = pruneNonCriticalInfo -} - -// WithRequestInitiatorType adds the requestInitiatorType to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithRequestInitiatorType(requestInitiatorType *string) *ListProtectionSourcesRegistrationInfoParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithSids adds the sids to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithSids(sids []string) *ListProtectionSourcesRegistrationInfoParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetSids(sids []string) { - o.Sids = sids -} - -// WithTenantIds adds the tenantIds to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithTenantIds(tenantIds []string) *ListProtectionSourcesRegistrationInfoParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) WithUseCachedData(useCachedData *bool) *ListProtectionSourcesRegistrationInfoParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the list protection sources registration info params -func (o *ListProtectionSourcesRegistrationInfoParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *ListProtectionSourcesRegistrationInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EncryptionKey != nil { - - // query param encryptionKey - var qrEncryptionKey string - - if o.EncryptionKey != nil { - qrEncryptionKey = *o.EncryptionKey - } - qEncryptionKey := qrEncryptionKey - if qEncryptionKey != "" { - - if err := r.SetQueryParam("encryptionKey", qEncryptionKey); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeApplicationsTreeInfo != nil { - - // query param includeApplicationsTreeInfo - var qrIncludeApplicationsTreeInfo bool - - if o.IncludeApplicationsTreeInfo != nil { - qrIncludeApplicationsTreeInfo = *o.IncludeApplicationsTreeInfo - } - qIncludeApplicationsTreeInfo := swag.FormatBool(qrIncludeApplicationsTreeInfo) - if qIncludeApplicationsTreeInfo != "" { - - if err := r.SetQueryParam("includeApplicationsTreeInfo", qIncludeApplicationsTreeInfo); err != nil { - return err - } - } - } - - if o.IncludeEntityPermissionInfo != nil { - - // query param includeEntityPermissionInfo - var qrIncludeEntityPermissionInfo bool - - if o.IncludeEntityPermissionInfo != nil { - qrIncludeEntityPermissionInfo = *o.IncludeEntityPermissionInfo - } - qIncludeEntityPermissionInfo := swag.FormatBool(qrIncludeEntityPermissionInfo) - if qIncludeEntityPermissionInfo != "" { - - if err := r.SetQueryParam("includeEntityPermissionInfo", qIncludeEntityPermissionInfo); err != nil { - return err - } - } - } - - if o.IncludeExternalMetadata != nil { - - // query param includeExternalMetadata - var qrIncludeExternalMetadata bool - - if o.IncludeExternalMetadata != nil { - qrIncludeExternalMetadata = *o.IncludeExternalMetadata - } - qIncludeExternalMetadata := swag.FormatBool(qrIncludeExternalMetadata) - if qIncludeExternalMetadata != "" { - - if err := r.SetQueryParam("includeExternalMetadata", qIncludeExternalMetadata); err != nil { - return err - } - } - } - - if o.IncludeSourceCredentials != nil { - - // query param includeSourceCredentials - var qrIncludeSourceCredentials bool - - if o.IncludeSourceCredentials != nil { - qrIncludeSourceCredentials = *o.IncludeSourceCredentials - } - qIncludeSourceCredentials := swag.FormatBool(qrIncludeSourceCredentials) - if qIncludeSourceCredentials != "" { - - if err := r.SetQueryParam("includeSourceCredentials", qIncludeSourceCredentials); err != nil { - return err - } - } - } - - if o.MaintenanceStatus != nil { - - // query param maintenanceStatus - var qrMaintenanceStatus string - - if o.MaintenanceStatus != nil { - qrMaintenanceStatus = *o.MaintenanceStatus - } - qMaintenanceStatus := qrMaintenanceStatus - if qMaintenanceStatus != "" { - - if err := r.SetQueryParam("maintenanceStatus", qMaintenanceStatus); err != nil { - return err - } - } - } - - if o.PruneNonCriticalInfo != nil { - - // query param pruneNonCriticalInfo - var qrPruneNonCriticalInfo bool - - if o.PruneNonCriticalInfo != nil { - qrPruneNonCriticalInfo = *o.PruneNonCriticalInfo - } - qPruneNonCriticalInfo := swag.FormatBool(qrPruneNonCriticalInfo) - if qPruneNonCriticalInfo != "" { - - if err := r.SetQueryParam("pruneNonCriticalInfo", qPruneNonCriticalInfo); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListProtectionSourcesRegistrationInfo binds the parameter environments -func (o *ListProtectionSourcesRegistrationInfoParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamListProtectionSourcesRegistrationInfo binds the parameter ids -func (o *ListProtectionSourcesRegistrationInfoParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamListProtectionSourcesRegistrationInfo binds the parameter sids -func (o *ListProtectionSourcesRegistrationInfoParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} - -// bindParamListProtectionSourcesRegistrationInfo binds the parameter tenantIds -func (o *ListProtectionSourcesRegistrationInfoParams) 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/v1/client/protection_sources/list_protection_sources_registration_info_responses.go b/v1/client/protection_sources/list_protection_sources_registration_info_responses.go deleted file mode 100644 index 004cb6df..00000000 --- a/v1/client/protection_sources/list_protection_sources_registration_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListProtectionSourcesRegistrationInfoReader is a Reader for the ListProtectionSourcesRegistrationInfo structure. -type ListProtectionSourcesRegistrationInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListProtectionSourcesRegistrationInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListProtectionSourcesRegistrationInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListProtectionSourcesRegistrationInfoDefault(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 - } -} - -// NewListProtectionSourcesRegistrationInfoOK creates a ListProtectionSourcesRegistrationInfoOK with default headers values -func NewListProtectionSourcesRegistrationInfoOK() *ListProtectionSourcesRegistrationInfoOK { - return &ListProtectionSourcesRegistrationInfoOK{} -} - -/* -ListProtectionSourcesRegistrationInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type ListProtectionSourcesRegistrationInfoOK struct { - Payload *models.GetRegistrationInfoResponse -} - -// IsSuccess returns true when this list protection sources registration info o k response has a 2xx status code -func (o *ListProtectionSourcesRegistrationInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list protection sources registration info o k response has a 3xx status code -func (o *ListProtectionSourcesRegistrationInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list protection sources registration info o k response has a 4xx status code -func (o *ListProtectionSourcesRegistrationInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list protection sources registration info o k response has a 5xx status code -func (o *ListProtectionSourcesRegistrationInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list protection sources registration info o k response a status code equal to that given -func (o *ListProtectionSourcesRegistrationInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list protection sources registration info o k response -func (o *ListProtectionSourcesRegistrationInfoOK) Code() int { - return 200 -} - -func (o *ListProtectionSourcesRegistrationInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/registrationInfo][%d] listProtectionSourcesRegistrationInfoOK %s", 200, payload) -} - -func (o *ListProtectionSourcesRegistrationInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/registrationInfo][%d] listProtectionSourcesRegistrationInfoOK %s", 200, payload) -} - -func (o *ListProtectionSourcesRegistrationInfoOK) GetPayload() *models.GetRegistrationInfoResponse { - return o.Payload -} - -func (o *ListProtectionSourcesRegistrationInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetRegistrationInfoResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListProtectionSourcesRegistrationInfoDefault creates a ListProtectionSourcesRegistrationInfoDefault with default headers values -func NewListProtectionSourcesRegistrationInfoDefault(code int) *ListProtectionSourcesRegistrationInfoDefault { - return &ListProtectionSourcesRegistrationInfoDefault{ - _statusCode: code, - } -} - -/* -ListProtectionSourcesRegistrationInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListProtectionSourcesRegistrationInfoDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list protection sources registration info default response has a 2xx status code -func (o *ListProtectionSourcesRegistrationInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list protection sources registration info default response has a 3xx status code -func (o *ListProtectionSourcesRegistrationInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list protection sources registration info default response has a 4xx status code -func (o *ListProtectionSourcesRegistrationInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list protection sources registration info default response has a 5xx status code -func (o *ListProtectionSourcesRegistrationInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list protection sources registration info default response a status code equal to that given -func (o *ListProtectionSourcesRegistrationInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list protection sources registration info default response -func (o *ListProtectionSourcesRegistrationInfoDefault) Code() int { - return o._statusCode -} - -func (o *ListProtectionSourcesRegistrationInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/registrationInfo][%d] ListProtectionSourcesRegistrationInfo default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesRegistrationInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/registrationInfo][%d] ListProtectionSourcesRegistrationInfo default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesRegistrationInfoDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListProtectionSourcesRegistrationInfoDefault) 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_sources/list_protection_sources_responses.go b/v1/client/protection_sources/list_protection_sources_responses.go deleted file mode 100644 index 6ac23b38..00000000 --- a/v1/client/protection_sources/list_protection_sources_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListProtectionSourcesReader is a Reader for the ListProtectionSources structure. -type ListProtectionSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListProtectionSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListProtectionSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListProtectionSourcesDefault(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 - } -} - -// NewListProtectionSourcesOK creates a ListProtectionSourcesOK with default headers values -func NewListProtectionSourcesOK() *ListProtectionSourcesOK { - return &ListProtectionSourcesOK{} -} - -/* -ListProtectionSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListProtectionSourcesOK struct { - Payload []*models.ProtectionSourceNode -} - -// IsSuccess returns true when this list protection sources o k response has a 2xx status code -func (o *ListProtectionSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list protection sources o k response has a 3xx status code -func (o *ListProtectionSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list protection sources o k response has a 4xx status code -func (o *ListProtectionSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list protection sources o k response has a 5xx status code -func (o *ListProtectionSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list protection sources o k response a status code equal to that given -func (o *ListProtectionSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list protection sources o k response -func (o *ListProtectionSourcesOK) Code() int { - return 200 -} - -func (o *ListProtectionSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources][%d] listProtectionSourcesOK %s", 200, payload) -} - -func (o *ListProtectionSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources][%d] listProtectionSourcesOK %s", 200, payload) -} - -func (o *ListProtectionSourcesOK) GetPayload() []*models.ProtectionSourceNode { - return o.Payload -} - -func (o *ListProtectionSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListProtectionSourcesDefault creates a ListProtectionSourcesDefault with default headers values -func NewListProtectionSourcesDefault(code int) *ListProtectionSourcesDefault { - return &ListProtectionSourcesDefault{ - _statusCode: code, - } -} - -/* -ListProtectionSourcesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListProtectionSourcesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list protection sources default response has a 2xx status code -func (o *ListProtectionSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list protection sources default response has a 3xx status code -func (o *ListProtectionSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list protection sources default response has a 4xx status code -func (o *ListProtectionSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list protection sources default response has a 5xx status code -func (o *ListProtectionSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list protection sources default response a status code equal to that given -func (o *ListProtectionSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list protection sources default response -func (o *ListProtectionSourcesDefault) Code() int { - return o._statusCode -} - -func (o *ListProtectionSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources][%d] ListProtectionSources default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources][%d] ListProtectionSources default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListProtectionSourcesDefault) 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_sources/list_protection_sources_root_nodes_parameters.go b/v1/client/protection_sources/list_protection_sources_root_nodes_parameters.go deleted file mode 100644 index 9b7a393e..00000000 --- a/v1/client/protection_sources/list_protection_sources_root_nodes_parameters.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListProtectionSourcesRootNodesParams creates a new ListProtectionSourcesRootNodesParams 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 NewListProtectionSourcesRootNodesParams() *ListProtectionSourcesRootNodesParams { - return &ListProtectionSourcesRootNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListProtectionSourcesRootNodesParamsWithTimeout creates a new ListProtectionSourcesRootNodesParams object -// with the ability to set a timeout on a request. -func NewListProtectionSourcesRootNodesParamsWithTimeout(timeout time.Duration) *ListProtectionSourcesRootNodesParams { - return &ListProtectionSourcesRootNodesParams{ - timeout: timeout, - } -} - -// NewListProtectionSourcesRootNodesParamsWithContext creates a new ListProtectionSourcesRootNodesParams object -// with the ability to set a context for a request. -func NewListProtectionSourcesRootNodesParamsWithContext(ctx context.Context) *ListProtectionSourcesRootNodesParams { - return &ListProtectionSourcesRootNodesParams{ - Context: ctx, - } -} - -// NewListProtectionSourcesRootNodesParamsWithHTTPClient creates a new ListProtectionSourcesRootNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListProtectionSourcesRootNodesParamsWithHTTPClient(client *http.Client) *ListProtectionSourcesRootNodesParams { - return &ListProtectionSourcesRootNodesParams{ - HTTPClient: client, - } -} - -/* -ListProtectionSourcesRootNodesParams contains all the parameters to send to the API endpoint - - for the list protection sources root nodes operation. - - Typically these are written to a http.Request. -*/ -type ListProtectionSourcesRootNodesParams struct { - - /* Environment. - - This field is deprecated. Use environments instead. - deprecated: true - */ - Environment *string - - /* Environments. - - Return only the root Protection Sources that match the passed in - environment type such as 'kVMware', 'kSQL', 'kView', 'kPuppeteer', - 'kPhysical', 'kPure', 'kNetapp', 'kGenericNas', 'kHyperV', 'kAcropolis' - 'kAzure'. - For example, set this parameter to 'kVMware' to - only return the root Protection Sources found in the 'kVMware' - (VMware vCenter) environment. In addition, the registration - information for each Source is returned. - - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* ID. - - Return the registration information for the Protection Source id. - - Format: int64 - */ - ID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list protection sources root nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesRootNodesParams) WithDefaults() *ListProtectionSourcesRootNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list protection sources root nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListProtectionSourcesRootNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithTimeout(timeout time.Duration) *ListProtectionSourcesRootNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithContext(ctx context.Context) *ListProtectionSourcesRootNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithHTTPClient(client *http.Client) *ListProtectionSourcesRootNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnvironment adds the environment to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithEnvironment(environment *string) *ListProtectionSourcesRootNodesParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithEnvironments adds the environments to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithEnvironments(environments []string) *ListProtectionSourcesRootNodesParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithID adds the id to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) WithID(id *int64) *ListProtectionSourcesRootNodesParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list protection sources root nodes params -func (o *ListProtectionSourcesRootNodesParams) SetID(id *int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ListProtectionSourcesRootNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.ID != nil { - - // query param id - var qrID int64 - - if o.ID != nil { - qrID = *o.ID - } - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListProtectionSourcesRootNodes binds the parameter environments -func (o *ListProtectionSourcesRootNodesParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} diff --git a/v1/client/protection_sources/list_protection_sources_root_nodes_responses.go b/v1/client/protection_sources/list_protection_sources_root_nodes_responses.go deleted file mode 100644 index 128220d5..00000000 --- a/v1/client/protection_sources/list_protection_sources_root_nodes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListProtectionSourcesRootNodesReader is a Reader for the ListProtectionSourcesRootNodes structure. -type ListProtectionSourcesRootNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListProtectionSourcesRootNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListProtectionSourcesRootNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListProtectionSourcesRootNodesDefault(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 - } -} - -// NewListProtectionSourcesRootNodesOK creates a ListProtectionSourcesRootNodesOK with default headers values -func NewListProtectionSourcesRootNodesOK() *ListProtectionSourcesRootNodesOK { - return &ListProtectionSourcesRootNodesOK{} -} - -/* -ListProtectionSourcesRootNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListProtectionSourcesRootNodesOK struct { - Payload []*models.ProtectionSourceNode -} - -// IsSuccess returns true when this list protection sources root nodes o k response has a 2xx status code -func (o *ListProtectionSourcesRootNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list protection sources root nodes o k response has a 3xx status code -func (o *ListProtectionSourcesRootNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list protection sources root nodes o k response has a 4xx status code -func (o *ListProtectionSourcesRootNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list protection sources root nodes o k response has a 5xx status code -func (o *ListProtectionSourcesRootNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list protection sources root nodes o k response a status code equal to that given -func (o *ListProtectionSourcesRootNodesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list protection sources root nodes o k response -func (o *ListProtectionSourcesRootNodesOK) Code() int { - return 200 -} - -func (o *ListProtectionSourcesRootNodesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/rootNodes][%d] listProtectionSourcesRootNodesOK %s", 200, payload) -} - -func (o *ListProtectionSourcesRootNodesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/rootNodes][%d] listProtectionSourcesRootNodesOK %s", 200, payload) -} - -func (o *ListProtectionSourcesRootNodesOK) GetPayload() []*models.ProtectionSourceNode { - return o.Payload -} - -func (o *ListProtectionSourcesRootNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListProtectionSourcesRootNodesDefault creates a ListProtectionSourcesRootNodesDefault with default headers values -func NewListProtectionSourcesRootNodesDefault(code int) *ListProtectionSourcesRootNodesDefault { - return &ListProtectionSourcesRootNodesDefault{ - _statusCode: code, - } -} - -/* -ListProtectionSourcesRootNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListProtectionSourcesRootNodesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list protection sources root nodes default response has a 2xx status code -func (o *ListProtectionSourcesRootNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list protection sources root nodes default response has a 3xx status code -func (o *ListProtectionSourcesRootNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list protection sources root nodes default response has a 4xx status code -func (o *ListProtectionSourcesRootNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list protection sources root nodes default response has a 5xx status code -func (o *ListProtectionSourcesRootNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list protection sources root nodes default response a status code equal to that given -func (o *ListProtectionSourcesRootNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list protection sources root nodes default response -func (o *ListProtectionSourcesRootNodesDefault) Code() int { - return o._statusCode -} - -func (o *ListProtectionSourcesRootNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/rootNodes][%d] ListProtectionSourcesRootNodes default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesRootNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/rootNodes][%d] ListProtectionSourcesRootNodes default %s", o._statusCode, payload) -} - -func (o *ListProtectionSourcesRootNodesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListProtectionSourcesRootNodesDefault) 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_sources/list_sql_aag_hosts_and_databases_parameters.go b/v1/client/protection_sources/list_sql_aag_hosts_and_databases_parameters.go deleted file mode 100644 index 234c952f..00000000 --- a/v1/client/protection_sources/list_sql_aag_hosts_and_databases_parameters.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListSQLAagHostsAndDatabasesParams creates a new ListSQLAagHostsAndDatabasesParams 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 NewListSQLAagHostsAndDatabasesParams() *ListSQLAagHostsAndDatabasesParams { - return &ListSQLAagHostsAndDatabasesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListSQLAagHostsAndDatabasesParamsWithTimeout creates a new ListSQLAagHostsAndDatabasesParams object -// with the ability to set a timeout on a request. -func NewListSQLAagHostsAndDatabasesParamsWithTimeout(timeout time.Duration) *ListSQLAagHostsAndDatabasesParams { - return &ListSQLAagHostsAndDatabasesParams{ - timeout: timeout, - } -} - -// NewListSQLAagHostsAndDatabasesParamsWithContext creates a new ListSQLAagHostsAndDatabasesParams object -// with the ability to set a context for a request. -func NewListSQLAagHostsAndDatabasesParamsWithContext(ctx context.Context) *ListSQLAagHostsAndDatabasesParams { - return &ListSQLAagHostsAndDatabasesParams{ - Context: ctx, - } -} - -// NewListSQLAagHostsAndDatabasesParamsWithHTTPClient creates a new ListSQLAagHostsAndDatabasesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListSQLAagHostsAndDatabasesParamsWithHTTPClient(client *http.Client) *ListSQLAagHostsAndDatabasesParams { - return &ListSQLAagHostsAndDatabasesParams{ - HTTPClient: client, - } -} - -/* -ListSQLAagHostsAndDatabasesParams contains all the parameters to send to the API endpoint - - for the list Sql aag hosts and databases operation. - - Typically these are written to a http.Request. -*/ -type ListSQLAagHostsAndDatabasesParams struct { - - /* SQLProtectionSourceIds. - - Specifies a list of Ids of Protection Sources registered as SQL servers. - These sources may have one or more SQL databases in them. Some of them - may be part of AAGs(Always on Availability Group). - */ - SQLProtectionSourceIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list Sql aag hosts and databases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSQLAagHostsAndDatabasesParams) WithDefaults() *ListSQLAagHostsAndDatabasesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list Sql aag hosts and databases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSQLAagHostsAndDatabasesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) WithTimeout(timeout time.Duration) *ListSQLAagHostsAndDatabasesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) WithContext(ctx context.Context) *ListSQLAagHostsAndDatabasesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) WithHTTPClient(client *http.Client) *ListSQLAagHostsAndDatabasesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSQLProtectionSourceIds adds the sQLProtectionSourceIds to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) WithSQLProtectionSourceIds(sQLProtectionSourceIds []int64) *ListSQLAagHostsAndDatabasesParams { - o.SetSQLProtectionSourceIds(sQLProtectionSourceIds) - return o -} - -// SetSQLProtectionSourceIds adds the sqlProtectionSourceIds to the list Sql aag hosts and databases params -func (o *ListSQLAagHostsAndDatabasesParams) SetSQLProtectionSourceIds(sQLProtectionSourceIds []int64) { - o.SQLProtectionSourceIds = sQLProtectionSourceIds -} - -// WriteToRequest writes these params to a swagger request -func (o *ListSQLAagHostsAndDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.SQLProtectionSourceIds != nil { - - // binding items for sqlProtectionSourceIds - joinedSQLProtectionSourceIds := o.bindParamSQLProtectionSourceIds(reg) - - // query array param sqlProtectionSourceIds - if err := r.SetQueryParam("sqlProtectionSourceIds", joinedSQLProtectionSourceIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListSQLAagHostsAndDatabases binds the parameter sqlProtectionSourceIds -func (o *ListSQLAagHostsAndDatabasesParams) bindParamSQLProtectionSourceIds(formats strfmt.Registry) []string { - sQLProtectionSourceIdsIR := o.SQLProtectionSourceIds - - var sQLProtectionSourceIdsIC []string - for _, sQLProtectionSourceIdsIIR := range sQLProtectionSourceIdsIR { // explode []int64 - - sQLProtectionSourceIdsIIV := swag.FormatInt64(sQLProtectionSourceIdsIIR) // int64 as string - sQLProtectionSourceIdsIC = append(sQLProtectionSourceIdsIC, sQLProtectionSourceIdsIIV) - } - - // items.CollectionFormat: "" - sQLProtectionSourceIdsIS := swag.JoinByFormat(sQLProtectionSourceIdsIC, "") - - return sQLProtectionSourceIdsIS -} diff --git a/v1/client/protection_sources/list_sql_aag_hosts_and_databases_responses.go b/v1/client/protection_sources/list_sql_aag_hosts_and_databases_responses.go deleted file mode 100644 index 80f2588e..00000000 --- a/v1/client/protection_sources/list_sql_aag_hosts_and_databases_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListSQLAagHostsAndDatabasesReader is a Reader for the ListSQLAagHostsAndDatabases structure. -type ListSQLAagHostsAndDatabasesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListSQLAagHostsAndDatabasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListSQLAagHostsAndDatabasesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListSQLAagHostsAndDatabasesDefault(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 - } -} - -// NewListSQLAagHostsAndDatabasesOK creates a ListSQLAagHostsAndDatabasesOK with default headers values -func NewListSQLAagHostsAndDatabasesOK() *ListSQLAagHostsAndDatabasesOK { - return &ListSQLAagHostsAndDatabasesOK{} -} - -/* - ListSQLAagHostsAndDatabasesOK describes a response with status code 200, with default header values. - - List SQL AAG hosts and databases response. - -Success -*/ -type ListSQLAagHostsAndDatabasesOK struct { - Payload []*models.SQLAagHostAndDatabases -} - -// IsSuccess returns true when this list Sql aag hosts and databases o k response has a 2xx status code -func (o *ListSQLAagHostsAndDatabasesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list Sql aag hosts and databases o k response has a 3xx status code -func (o *ListSQLAagHostsAndDatabasesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list Sql aag hosts and databases o k response has a 4xx status code -func (o *ListSQLAagHostsAndDatabasesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list Sql aag hosts and databases o k response has a 5xx status code -func (o *ListSQLAagHostsAndDatabasesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list Sql aag hosts and databases o k response a status code equal to that given -func (o *ListSQLAagHostsAndDatabasesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list Sql aag hosts and databases o k response -func (o *ListSQLAagHostsAndDatabasesOK) Code() int { - return 200 -} - -func (o *ListSQLAagHostsAndDatabasesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/sqlAagHostsAndDatabases][%d] listSqlAagHostsAndDatabasesOK %s", 200, payload) -} - -func (o *ListSQLAagHostsAndDatabasesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/sqlAagHostsAndDatabases][%d] listSqlAagHostsAndDatabasesOK %s", 200, payload) -} - -func (o *ListSQLAagHostsAndDatabasesOK) GetPayload() []*models.SQLAagHostAndDatabases { - return o.Payload -} - -func (o *ListSQLAagHostsAndDatabasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListSQLAagHostsAndDatabasesDefault creates a ListSQLAagHostsAndDatabasesDefault with default headers values -func NewListSQLAagHostsAndDatabasesDefault(code int) *ListSQLAagHostsAndDatabasesDefault { - return &ListSQLAagHostsAndDatabasesDefault{ - _statusCode: code, - } -} - -/* -ListSQLAagHostsAndDatabasesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListSQLAagHostsAndDatabasesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list Sql aag hosts and databases default response has a 2xx status code -func (o *ListSQLAagHostsAndDatabasesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list Sql aag hosts and databases default response has a 3xx status code -func (o *ListSQLAagHostsAndDatabasesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list Sql aag hosts and databases default response has a 4xx status code -func (o *ListSQLAagHostsAndDatabasesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list Sql aag hosts and databases default response has a 5xx status code -func (o *ListSQLAagHostsAndDatabasesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list Sql aag hosts and databases default response a status code equal to that given -func (o *ListSQLAagHostsAndDatabasesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list Sql aag hosts and databases default response -func (o *ListSQLAagHostsAndDatabasesDefault) Code() int { - return o._statusCode -} - -func (o *ListSQLAagHostsAndDatabasesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/sqlAagHostsAndDatabases][%d] ListSqlAagHostsAndDatabases default %s", o._statusCode, payload) -} - -func (o *ListSQLAagHostsAndDatabasesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/sqlAagHostsAndDatabases][%d] ListSqlAagHostsAndDatabases default %s", o._statusCode, payload) -} - -func (o *ListSQLAagHostsAndDatabasesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListSQLAagHostsAndDatabasesDefault) 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_sources/list_virtual_machines_parameters.go b/v1/client/protection_sources/list_virtual_machines_parameters.go deleted file mode 100644 index 02687a38..00000000 --- a/v1/client/protection_sources/list_virtual_machines_parameters.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewListVirtualMachinesParams creates a new ListVirtualMachinesParams 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 NewListVirtualMachinesParams() *ListVirtualMachinesParams { - return &ListVirtualMachinesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListVirtualMachinesParamsWithTimeout creates a new ListVirtualMachinesParams object -// with the ability to set a timeout on a request. -func NewListVirtualMachinesParamsWithTimeout(timeout time.Duration) *ListVirtualMachinesParams { - return &ListVirtualMachinesParams{ - timeout: timeout, - } -} - -// NewListVirtualMachinesParamsWithContext creates a new ListVirtualMachinesParams object -// with the ability to set a context for a request. -func NewListVirtualMachinesParamsWithContext(ctx context.Context) *ListVirtualMachinesParams { - return &ListVirtualMachinesParams{ - Context: ctx, - } -} - -// NewListVirtualMachinesParamsWithHTTPClient creates a new ListVirtualMachinesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListVirtualMachinesParamsWithHTTPClient(client *http.Client) *ListVirtualMachinesParams { - return &ListVirtualMachinesParams{ - HTTPClient: client, - } -} - -/* -ListVirtualMachinesParams contains all the parameters to send to the API endpoint - - for the list virtual machines operation. - - Typically these are written to a http.Request. -*/ -type ListVirtualMachinesParams struct { - - /* Names. - - Limit the returned VMs to those that exactly match the passed in VM name. - To match multiple VM names, specify multiple "names" parameters that each - specify a single VM name. - The string must exactly match the passed in VM name and wild cards are - not supported. - */ - Names []string - - /* Protected. - - Limit the returned VMs to those that have been protected - by a Protection Job. - By default, both protected and unprotected VMs are returned. - */ - Protected *bool - - /* PruneNonCriticalInfo. - - Specifies whether to prune non-critical info within entities. - In case of VMs, virtual disk information will be pruned. - */ - PruneNonCriticalInfo *bool - - /* Uuids. - - Limit the returned VMs to those that exactly match the passed in UUIDs. - */ - Uuids []string - - /* VCenterID. - - Limit the VMs returned to the set of VMs found in a specific - vCenter Server. - Pass in the root Protection Source id for the vCenter Server - to search for VMs. - - Format: int64 - */ - VCenterID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list virtual machines params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListVirtualMachinesParams) WithDefaults() *ListVirtualMachinesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list virtual machines params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListVirtualMachinesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list virtual machines params -func (o *ListVirtualMachinesParams) WithTimeout(timeout time.Duration) *ListVirtualMachinesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list virtual machines params -func (o *ListVirtualMachinesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list virtual machines params -func (o *ListVirtualMachinesParams) WithContext(ctx context.Context) *ListVirtualMachinesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list virtual machines params -func (o *ListVirtualMachinesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list virtual machines params -func (o *ListVirtualMachinesParams) WithHTTPClient(client *http.Client) *ListVirtualMachinesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list virtual machines params -func (o *ListVirtualMachinesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithNames adds the names to the list virtual machines params -func (o *ListVirtualMachinesParams) WithNames(names []string) *ListVirtualMachinesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the list virtual machines params -func (o *ListVirtualMachinesParams) SetNames(names []string) { - o.Names = names -} - -// WithProtected adds the protected to the list virtual machines params -func (o *ListVirtualMachinesParams) WithProtected(protected *bool) *ListVirtualMachinesParams { - o.SetProtected(protected) - return o -} - -// SetProtected adds the protected to the list virtual machines params -func (o *ListVirtualMachinesParams) SetProtected(protected *bool) { - o.Protected = protected -} - -// WithPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list virtual machines params -func (o *ListVirtualMachinesParams) WithPruneNonCriticalInfo(pruneNonCriticalInfo *bool) *ListVirtualMachinesParams { - o.SetPruneNonCriticalInfo(pruneNonCriticalInfo) - return o -} - -// SetPruneNonCriticalInfo adds the pruneNonCriticalInfo to the list virtual machines params -func (o *ListVirtualMachinesParams) SetPruneNonCriticalInfo(pruneNonCriticalInfo *bool) { - o.PruneNonCriticalInfo = pruneNonCriticalInfo -} - -// WithUuids adds the uuids to the list virtual machines params -func (o *ListVirtualMachinesParams) WithUuids(uuids []string) *ListVirtualMachinesParams { - o.SetUuids(uuids) - return o -} - -// SetUuids adds the uuids to the list virtual machines params -func (o *ListVirtualMachinesParams) SetUuids(uuids []string) { - o.Uuids = uuids -} - -// WithVCenterID adds the vCenterID to the list virtual machines params -func (o *ListVirtualMachinesParams) WithVCenterID(vCenterID *int64) *ListVirtualMachinesParams { - o.SetVCenterID(vCenterID) - return o -} - -// SetVCenterID adds the vCenterId to the list virtual machines params -func (o *ListVirtualMachinesParams) SetVCenterID(vCenterID *int64) { - o.VCenterID = vCenterID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListVirtualMachinesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.Protected != nil { - - // query param protected - var qrProtected bool - - if o.Protected != nil { - qrProtected = *o.Protected - } - qProtected := swag.FormatBool(qrProtected) - if qProtected != "" { - - if err := r.SetQueryParam("protected", qProtected); err != nil { - return err - } - } - } - - if o.PruneNonCriticalInfo != nil { - - // query param pruneNonCriticalInfo - var qrPruneNonCriticalInfo bool - - if o.PruneNonCriticalInfo != nil { - qrPruneNonCriticalInfo = *o.PruneNonCriticalInfo - } - qPruneNonCriticalInfo := swag.FormatBool(qrPruneNonCriticalInfo) - if qPruneNonCriticalInfo != "" { - - if err := r.SetQueryParam("pruneNonCriticalInfo", qPruneNonCriticalInfo); err != nil { - return err - } - } - } - - if o.Uuids != nil { - - // binding items for uuids - joinedUuids := o.bindParamUuids(reg) - - // query array param uuids - if err := r.SetQueryParam("uuids", joinedUuids...); err != nil { - return err - } - } - - if o.VCenterID != nil { - - // query param vCenterId - var qrVCenterID int64 - - if o.VCenterID != nil { - qrVCenterID = *o.VCenterID - } - qVCenterID := swag.FormatInt64(qrVCenterID) - if qVCenterID != "" { - - if err := r.SetQueryParam("vCenterId", qVCenterID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListVirtualMachines binds the parameter names -func (o *ListVirtualMachinesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamListVirtualMachines binds the parameter uuids -func (o *ListVirtualMachinesParams) bindParamUuids(formats strfmt.Registry) []string { - uuidsIR := o.Uuids - - var uuidsIC []string - for _, uuidsIIR := range uuidsIR { // explode []string - - uuidsIIV := uuidsIIR // string as string - uuidsIC = append(uuidsIC, uuidsIIV) - } - - // items.CollectionFormat: "" - uuidsIS := swag.JoinByFormat(uuidsIC, "") - - return uuidsIS -} diff --git a/v1/client/protection_sources/list_virtual_machines_responses.go b/v1/client/protection_sources/list_virtual_machines_responses.go deleted file mode 100644 index c1ecce7e..00000000 --- a/v1/client/protection_sources/list_virtual_machines_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListVirtualMachinesReader is a Reader for the ListVirtualMachines structure. -type ListVirtualMachinesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListVirtualMachinesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListVirtualMachinesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListVirtualMachinesDefault(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 - } -} - -// NewListVirtualMachinesOK creates a ListVirtualMachinesOK with default headers values -func NewListVirtualMachinesOK() *ListVirtualMachinesOK { - return &ListVirtualMachinesOK{} -} - -/* -ListVirtualMachinesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListVirtualMachinesOK struct { - Payload []*models.ProtectionSource -} - -// IsSuccess returns true when this list virtual machines o k response has a 2xx status code -func (o *ListVirtualMachinesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list virtual machines o k response has a 3xx status code -func (o *ListVirtualMachinesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list virtual machines o k response has a 4xx status code -func (o *ListVirtualMachinesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list virtual machines o k response has a 5xx status code -func (o *ListVirtualMachinesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list virtual machines o k response a status code equal to that given -func (o *ListVirtualMachinesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list virtual machines o k response -func (o *ListVirtualMachinesOK) Code() int { - return 200 -} - -func (o *ListVirtualMachinesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/virtualMachines][%d] listVirtualMachinesOK %s", 200, payload) -} - -func (o *ListVirtualMachinesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/virtualMachines][%d] listVirtualMachinesOK %s", 200, payload) -} - -func (o *ListVirtualMachinesOK) GetPayload() []*models.ProtectionSource { - return o.Payload -} - -func (o *ListVirtualMachinesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListVirtualMachinesDefault creates a ListVirtualMachinesDefault with default headers values -func NewListVirtualMachinesDefault(code int) *ListVirtualMachinesDefault { - return &ListVirtualMachinesDefault{ - _statusCode: code, - } -} - -/* -ListVirtualMachinesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListVirtualMachinesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list virtual machines default response has a 2xx status code -func (o *ListVirtualMachinesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list virtual machines default response has a 3xx status code -func (o *ListVirtualMachinesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list virtual machines default response has a 4xx status code -func (o *ListVirtualMachinesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list virtual machines default response has a 5xx status code -func (o *ListVirtualMachinesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list virtual machines default response a status code equal to that given -func (o *ListVirtualMachinesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list virtual machines default response -func (o *ListVirtualMachinesDefault) Code() int { - return o._statusCode -} - -func (o *ListVirtualMachinesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/virtualMachines][%d] ListVirtualMachines default %s", o._statusCode, payload) -} - -func (o *ListVirtualMachinesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/protectionSources/virtualMachines][%d] ListVirtualMachines default %s", o._statusCode, payload) -} - -func (o *ListVirtualMachinesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListVirtualMachinesDefault) 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_sources/protection_sources_client.go b/v1/client/protection_sources/protection_sources_client.go deleted file mode 100644 index 9686065a..00000000 --- a/v1/client/protection_sources/protection_sources_client.go +++ /dev/null @@ -1,1047 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection sources API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection sources API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection sources API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection sources API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DownloadCftFile(params *DownloadCftFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadCftFileOK, error) - - DownloadPhysicalAgent(params *DownloadPhysicalAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadPhysicalAgentOK, error) - - GetProtectionSourcesObjectByID(params *GetProtectionSourcesObjectByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesObjectByIDOK, error) - - GetProtectionSourcesObjects(params *GetProtectionSourcesObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesObjectsOK, error) - - ListApplicationServers(params *ListApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListApplicationServersOK, error) - - ListDataStoreInformation(params *ListDataStoreInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDataStoreInformationOK, error) - - ListExchangeDagHosts(params *ListExchangeDagHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListExchangeDagHostsOK, error) - - ListProtectedObjects(params *ListProtectedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectedObjectsOK, error) - - ListProtectionSources(params *ListProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesOK, error) - - ListProtectionSourcesRegistrationInfo(params *ListProtectionSourcesRegistrationInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesRegistrationInfoOK, error) - - ListProtectionSourcesRootNodes(params *ListProtectionSourcesRootNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesRootNodesOK, error) - - ListSQLAagHostsAndDatabases(params *ListSQLAagHostsAndDatabasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSQLAagHostsAndDatabasesOK, error) - - ListVirtualMachines(params *ListVirtualMachinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListVirtualMachinesOK, error) - - RefreshProtectionSourceByID(params *RefreshProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RefreshProtectionSourceByIDNoContent, error) - - RegisterApplicationServers(params *RegisterApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterApplicationServersOK, error) - - RegisterProtectionSource(params *RegisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterProtectionSourceOK, error) - - RunDiagnostics(params *RunDiagnosticsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunDiagnosticsCreated, error) - - UnregisterApplicationServers(params *UnregisterApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterApplicationServersOK, error) - - UnregisterProtectionSource(params *UnregisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterProtectionSourceNoContent, error) - - UpdateApplicationServers(params *UpdateApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateApplicationServersOK, error) - - UpdateProtectionSource(params *UpdateProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionSourceOK, error) - - UpgradePhysicalAgents(params *UpgradePhysicalAgentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradePhysicalAgentsCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DownloadCftFile downloads the c f t -*/ -func (a *Client) DownloadCftFile(params *DownloadCftFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadCftFileOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadCftFileParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadCftFile", - Method: "GET", - PathPattern: "/public/protectionSources/downloadCftFile", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadCftFileReader{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.(*DownloadCftFileOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadCftFileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadPhysicalAgent downloads the physical agent for a host type - -Host type could be Linux, Windows, AIX. -*/ -func (a *Client) DownloadPhysicalAgent(params *DownloadPhysicalAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadPhysicalAgentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadPhysicalAgentParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadPhysicalAgent", - Method: "GET", - PathPattern: "/public/physicalAgents/download", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadPhysicalAgentReader{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.(*DownloadPhysicalAgentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadPhysicalAgentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionSourcesObjectByID gets details about a single protection source object - -Returns the Protection Source object corresponding to the specified id. -*/ -func (a *Client) GetProtectionSourcesObjectByID(params *GetProtectionSourcesObjectByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesObjectByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourcesObjectByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSourcesObjectById", - Method: "GET", - PathPattern: "/public/protectionSources/objects/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourcesObjectByIDReader{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.(*GetProtectionSourcesObjectByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourcesObjectByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionSourcesObjects lists details about protection source objects - -Returns the Protection Source objects corresponding to the specified ids. -*/ -func (a *Client) GetProtectionSourcesObjects(params *GetProtectionSourcesObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourcesObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSourcesObjects", - Method: "GET", - PathPattern: "/public/protectionSources/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourcesObjectsReader{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.(*GetProtectionSourcesObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourcesObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListApplicationServers returns the registered application servers and their object subtrees - - Given the root node id of a Protection Source tree, returns the list of - -Application Servers registered under that tree based on the filters. -*/ -func (a *Client) ListApplicationServers(params *ListApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListApplicationServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListApplicationServersParams() - } - op := &runtime.ClientOperation{ - ID: "ListApplicationServers", - Method: "GET", - PathPattern: "/public/protectionSources/applicationServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListApplicationServersReader{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.(*ListApplicationServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListApplicationServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListDataStoreInformation returns the datastore information in v mware environment -*/ -func (a *Client) ListDataStoreInformation(params *ListDataStoreInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDataStoreInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListDataStoreInformationParams() - } - op := &runtime.ClientOperation{ - ID: "ListDataStoreInformation", - Method: "GET", - PathPattern: "/public/protectionSources/datastores", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListDataStoreInformationReader{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.(*ListDataStoreInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListDataStoreInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListExchangeDagHosts Returns information about all the exchange hosts that belong to an Exchange - -DAG. -*/ -func (a *Client) ListExchangeDagHosts(params *ListExchangeDagHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListExchangeDagHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListExchangeDagHostsParams() - } - op := &runtime.ClientOperation{ - ID: "ListExchangeDagHosts", - Method: "GET", - PathPattern: "/public/protectionSources/exchangeDagHosts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListExchangeDagHostsReader{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.(*ListExchangeDagHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListExchangeDagHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListProtectedObjects returns the list of protected objects in a registered protection source -*/ -func (a *Client) ListProtectedObjects(params *ListProtectedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectedObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListProtectedObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "ListProtectedObjects", - Method: "GET", - PathPattern: "/public/protectionSources/protectedObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListProtectedObjectsReader{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.(*ListProtectedObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListProtectedObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListProtectionSources returns the registered protection sources and their object subtrees - - If no parameters are specified, all Protection Sources that are registered - -on the Cohesity Cluster are returned. -In addition, an Object subtree gathered from each Source is returned. -For example, the Cohesity Cluster interrogates a Source VMware vCenter Server -and creates an hierarchical Object subtree that mirrors the -Inventory tree on vCenter Server. -The contents of the Object tree are returned as a "nodes" hierarchy -of "protectionSource"s. -Specifying parameters can alter the results that are returned. -*/ -func (a *Client) ListProtectionSources(params *ListProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListProtectionSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "ListProtectionSources", - Method: "GET", - PathPattern: "/public/protectionSources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListProtectionSourcesReader{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.(*ListProtectionSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListProtectionSourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListProtectionSourcesRegistrationInfo Returns the registration and protection information of the registered - -Protection Sources. -*/ -func (a *Client) ListProtectionSourcesRegistrationInfo(params *ListProtectionSourcesRegistrationInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesRegistrationInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListProtectionSourcesRegistrationInfoParams() - } - op := &runtime.ClientOperation{ - ID: "ListProtectionSourcesRegistrationInfo", - Method: "GET", - PathPattern: "/public/protectionSources/registrationInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListProtectionSourcesRegistrationInfoReader{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.(*ListProtectionSourcesRegistrationInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListProtectionSourcesRegistrationInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListProtectionSourcesRootNodes returns the top level root protection sources with registration information - - Returns the root Protection Sources and the registration information for - -each of these Sources. -*/ -func (a *Client) ListProtectionSourcesRootNodes(params *ListProtectionSourcesRootNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListProtectionSourcesRootNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListProtectionSourcesRootNodesParams() - } - op := &runtime.ClientOperation{ - ID: "ListProtectionSourcesRootNodes", - Method: "GET", - PathPattern: "/public/protectionSources/rootNodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListProtectionSourcesRootNodesReader{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.(*ListProtectionSourcesRootNodesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListProtectionSourcesRootNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListSQLAagHostsAndDatabases returns the registered protection sources and their object subtrees - - Given a list of Protection Source Ids registered as SQL servers, returns - -AAGs found and the databases in AAG(Always on Availablity Group). -*/ -func (a *Client) ListSQLAagHostsAndDatabases(params *ListSQLAagHostsAndDatabasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSQLAagHostsAndDatabasesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListSQLAagHostsAndDatabasesParams() - } - op := &runtime.ClientOperation{ - ID: "ListSqlAagHostsAndDatabases", - Method: "GET", - PathPattern: "/public/protectionSources/sqlAagHostsAndDatabases", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListSQLAagHostsAndDatabasesReader{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.(*ListSQLAagHostsAndDatabasesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListSQLAagHostsAndDatabasesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListVirtualMachines returns the virtual machines in a v center server - - Returns all Virtual Machines found in all the vCenter Servers registered - -on the Cohesity Cluster that match the filter criteria specified using -parameters. -If an id is specified, only VMs found in the specified vCenter Server -are returned. -Only VM Objects are returned. -Other VMware Objects such as datacenters are not returned. -*/ -func (a *Client) ListVirtualMachines(params *ListVirtualMachinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListVirtualMachinesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListVirtualMachinesParams() - } - op := &runtime.ClientOperation{ - ID: "ListVirtualMachines", - Method: "GET", - PathPattern: "/public/protectionSources/virtualMachines", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListVirtualMachinesReader{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.(*ListVirtualMachinesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListVirtualMachinesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RefreshProtectionSourceByID refreshes the object hierarchy of the protection sources tree - - Force an immediate refresh between the specified Protection Source tree - -on the Cohesity Cluster and the Inventory tree -in the associated vCenter Server. - -For example if a new VM is added to the vCenter Server, after a refresh, -a new Protection Source node for this VM is added to the Protection Sources -tree. - -Success indicates the forced refresh has been completed. For larger sources it -is possible for the operation to timeout before the force refresh has been -completed. This timeout can be increased by modifying the -'iris_post_timeout_msecs_to_magneto' gflag on the Iris service. -*/ -func (a *Client) RefreshProtectionSourceByID(params *RefreshProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RefreshProtectionSourceByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRefreshProtectionSourceByIDParams() - } - op := &runtime.ClientOperation{ - ID: "RefreshProtectionSourceById", - Method: "POST", - PathPattern: "/public/protectionSources/refresh/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RefreshProtectionSourceByIDReader{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.(*RefreshProtectionSourceByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RefreshProtectionSourceByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RegisterApplicationServers registers a protection source as running one or more application servers like microsoft SQL servers or microsoft exchange servers - - Registering Application Servers will help Cohesity Cluster such that any - -application specific data can be backed up. - -Returns the Protection Source registered upon success. -*/ -func (a *Client) RegisterApplicationServers(params *RegisterApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterApplicationServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterApplicationServersParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterApplicationServers", - Method: "POST", - PathPattern: "/public/protectionSources/applicationServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterApplicationServersReader{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.(*RegisterApplicationServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterApplicationServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RegisterProtectionSource registers a protection source - - Register a Protection Source on the Cohesity Cluster. - -It could be the root node of a vCenter Server or a physical server. - -Returns the newly registered Protection Source upon success. -*/ -func (a *Client) RegisterProtectionSource(params *RegisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterProtectionSourceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterProtectionSourceParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterProtectionSource", - Method: "POST", - PathPattern: "/public/protectionSources/register", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterProtectionSourceReader{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.(*RegisterProtectionSourceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterProtectionSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RunDiagnostics collects diagnostics of the protection source for a host type - - If the request is successful, the diagnostics script is triggered on Cohesity - -agent which generates a tarball containing various diagnostics and uploads it -to the Cohesity cluster. Host type could be Linux, Windows. -*/ -func (a *Client) RunDiagnostics(params *RunDiagnosticsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunDiagnosticsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRunDiagnosticsParams() - } - op := &runtime.ClientOperation{ - ID: "RunDiagnostics", - Method: "POST", - PathPattern: "/public/protectionSources/diagnostics/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RunDiagnosticsReader{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.(*RunDiagnosticsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RunDiagnosticsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UnregisterApplicationServers unregisters application servers like microsoft SQL servers or microsoft exchange servers running on a protection source - - Unregistering Application Servers will fail if the Protection Source is - -currently being backed up. - -Returns the Protection Source whose Application Servers are unregistered upon -success. -*/ -func (a *Client) UnregisterApplicationServers(params *UnregisterApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterApplicationServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterApplicationServersParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterApplicationServers", - Method: "DELETE", - PathPattern: "/public/protectionSources/applicationServers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnregisterApplicationServersReader{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.(*UnregisterApplicationServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterApplicationServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnregisterProtectionSource unregisters a previously registered protection source -*/ -func (a *Client) UnregisterProtectionSource(params *UnregisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterProtectionSourceNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterProtectionSourceParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterProtectionSource", - Method: "DELETE", - PathPattern: "/public/protectionSources/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnregisterProtectionSourceReader{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.(*UnregisterProtectionSourceNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterProtectionSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateApplicationServers modifies the registration parameters of application servers in a protection source - - Returns the Protection Source whose registration parameters of its - -Application Servers are modified upon success. -*/ -func (a *Client) UpdateApplicationServers(params *UpdateApplicationServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateApplicationServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateApplicationServersParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateApplicationServers", - Method: "PUT", - PathPattern: "/public/protectionSources/applicationServers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateApplicationServersReader{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.(*UpdateApplicationServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateApplicationServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionSource updates a previously registered protection source with new details -*/ -func (a *Client) UpdateProtectionSource(params *UpdateProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionSourceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionSourceParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionSource", - Method: "PATCH", - PathPattern: "/public/protectionSources/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionSourceReader{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.(*UpdateProtectionSourceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpgradePhysicalAgents initiates a request to upgrade cohesity agents on one or more physical servers registered on the cohesity cluster - - If the request is successful, the Cohesity agents on the specified - -Physical Servers are upgraded to the agent release -currently available from this Cohesity Cluster. -For example if the Cluster is upgraded from 3.7.1 to 4.0, -the agents on the specified Physical Servers can be upgraded to 4.0 using -this POST operation. -To get the agentIds to pass into this operation, call -GET /public/protectionSources with the environment set to 'KPhysical'. -In addition this GET operation returns the agentUpgradability field, that -indicates if an agent can be upgraded. Use the agentUpgradability field -to determine which Physical Servers to upgrade using this -POST /public/physicalAgents/upgrade operation. - -WARNING: Only agents at a particular Cohesity release can be -upgraded using this operation. -See the Cohesity online help for details. - -Returns the status of the upgrade initiation. -*/ -func (a *Client) UpgradePhysicalAgents(params *UpgradePhysicalAgentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradePhysicalAgentsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradePhysicalAgentsParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradePhysicalAgents", - Method: "POST", - PathPattern: "/public/physicalAgents/upgrade", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradePhysicalAgentsReader{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.(*UpgradePhysicalAgentsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradePhysicalAgentsDefault) - 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/protection_sources/refresh_protection_source_by_id_parameters.go b/v1/client/protection_sources/refresh_protection_source_by_id_parameters.go deleted file mode 100644 index dae05c76..00000000 --- a/v1/client/protection_sources/refresh_protection_source_by_id_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewRefreshProtectionSourceByIDParams creates a new RefreshProtectionSourceByIDParams 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 NewRefreshProtectionSourceByIDParams() *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRefreshProtectionSourceByIDParamsWithTimeout creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a timeout on a request. -func NewRefreshProtectionSourceByIDParamsWithTimeout(timeout time.Duration) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - timeout: timeout, - } -} - -// NewRefreshProtectionSourceByIDParamsWithContext creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a context for a request. -func NewRefreshProtectionSourceByIDParamsWithContext(ctx context.Context) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - Context: ctx, - } -} - -// NewRefreshProtectionSourceByIDParamsWithHTTPClient creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewRefreshProtectionSourceByIDParamsWithHTTPClient(client *http.Client) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - HTTPClient: client, - } -} - -/* -RefreshProtectionSourceByIDParams contains all the parameters to send to the API endpoint - - for the refresh protection source by Id operation. - - Typically these are written to a http.Request. -*/ -type RefreshProtectionSourceByIDParams struct { - - /* ID. - - Id of the root node of the Protection Sources tree to refresh. - - Force a refresh of the Object hierarchy for the passed in Protection - Sources Id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the refresh protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RefreshProtectionSourceByIDParams) WithDefaults() *RefreshProtectionSourceByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the refresh protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RefreshProtectionSourceByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithTimeout(timeout time.Duration) *RefreshProtectionSourceByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithContext(ctx context.Context) *RefreshProtectionSourceByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithHTTPClient(client *http.Client) *RefreshProtectionSourceByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithID(id int64) *RefreshProtectionSourceByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RefreshProtectionSourceByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/refresh_protection_source_by_id_responses.go b/v1/client/protection_sources/refresh_protection_source_by_id_responses.go deleted file mode 100644 index b9649981..00000000 --- a/v1/client/protection_sources/refresh_protection_source_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RefreshProtectionSourceByIDReader is a Reader for the RefreshProtectionSourceByID structure. -type RefreshProtectionSourceByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RefreshProtectionSourceByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRefreshProtectionSourceByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRefreshProtectionSourceByIDDefault(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 - } -} - -// NewRefreshProtectionSourceByIDNoContent creates a RefreshProtectionSourceByIDNoContent with default headers values -func NewRefreshProtectionSourceByIDNoContent() *RefreshProtectionSourceByIDNoContent { - return &RefreshProtectionSourceByIDNoContent{} -} - -/* -RefreshProtectionSourceByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RefreshProtectionSourceByIDNoContent struct { -} - -// IsSuccess returns true when this refresh protection source by Id no content response has a 2xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this refresh protection source by Id no content response has a 3xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this refresh protection source by Id no content response has a 4xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this refresh protection source by Id no content response has a 5xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this refresh protection source by Id no content response a status code equal to that given -func (o *RefreshProtectionSourceByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the refresh protection source by Id no content response -func (o *RefreshProtectionSourceByIDNoContent) Code() int { - return 204 -} - -func (o *RefreshProtectionSourceByIDNoContent) Error() string { - return fmt.Sprintf("[POST /public/protectionSources/refresh/{id}][%d] refreshProtectionSourceByIdNoContent", 204) -} - -func (o *RefreshProtectionSourceByIDNoContent) String() string { - return fmt.Sprintf("[POST /public/protectionSources/refresh/{id}][%d] refreshProtectionSourceByIdNoContent", 204) -} - -func (o *RefreshProtectionSourceByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRefreshProtectionSourceByIDDefault creates a RefreshProtectionSourceByIDDefault with default headers values -func NewRefreshProtectionSourceByIDDefault(code int) *RefreshProtectionSourceByIDDefault { - return &RefreshProtectionSourceByIDDefault{ - _statusCode: code, - } -} - -/* -RefreshProtectionSourceByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type RefreshProtectionSourceByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this refresh protection source by Id default response has a 2xx status code -func (o *RefreshProtectionSourceByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this refresh protection source by Id default response has a 3xx status code -func (o *RefreshProtectionSourceByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this refresh protection source by Id default response has a 4xx status code -func (o *RefreshProtectionSourceByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this refresh protection source by Id default response has a 5xx status code -func (o *RefreshProtectionSourceByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this refresh protection source by Id default response a status code equal to that given -func (o *RefreshProtectionSourceByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the refresh protection source by Id default response -func (o *RefreshProtectionSourceByIDDefault) Code() int { - return o._statusCode -} - -func (o *RefreshProtectionSourceByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/refresh/{id}][%d] RefreshProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *RefreshProtectionSourceByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/refresh/{id}][%d] RefreshProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *RefreshProtectionSourceByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RefreshProtectionSourceByIDDefault) 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_sources/register_application_servers_parameters.go b/v1/client/protection_sources/register_application_servers_parameters.go deleted file mode 100644 index 3285527d..00000000 --- a/v1/client/protection_sources/register_application_servers_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRegisterApplicationServersParams creates a new RegisterApplicationServersParams 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 NewRegisterApplicationServersParams() *RegisterApplicationServersParams { - return &RegisterApplicationServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterApplicationServersParamsWithTimeout creates a new RegisterApplicationServersParams object -// with the ability to set a timeout on a request. -func NewRegisterApplicationServersParamsWithTimeout(timeout time.Duration) *RegisterApplicationServersParams { - return &RegisterApplicationServersParams{ - timeout: timeout, - } -} - -// NewRegisterApplicationServersParamsWithContext creates a new RegisterApplicationServersParams object -// with the ability to set a context for a request. -func NewRegisterApplicationServersParamsWithContext(ctx context.Context) *RegisterApplicationServersParams { - return &RegisterApplicationServersParams{ - Context: ctx, - } -} - -// NewRegisterApplicationServersParamsWithHTTPClient creates a new RegisterApplicationServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterApplicationServersParamsWithHTTPClient(client *http.Client) *RegisterApplicationServersParams { - return &RegisterApplicationServersParams{ - HTTPClient: client, - } -} - -/* -RegisterApplicationServersParams contains all the parameters to send to the API endpoint - - for the register application servers operation. - - Typically these are written to a http.Request. -*/ -type RegisterApplicationServersParams struct { - - /* Body. - - Request to register Application Servers in a Protection Source. - */ - Body *models.RegisterApplicationServersParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterApplicationServersParams) WithDefaults() *RegisterApplicationServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterApplicationServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register application servers params -func (o *RegisterApplicationServersParams) WithTimeout(timeout time.Duration) *RegisterApplicationServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register application servers params -func (o *RegisterApplicationServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register application servers params -func (o *RegisterApplicationServersParams) WithContext(ctx context.Context) *RegisterApplicationServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register application servers params -func (o *RegisterApplicationServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register application servers params -func (o *RegisterApplicationServersParams) WithHTTPClient(client *http.Client) *RegisterApplicationServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register application servers params -func (o *RegisterApplicationServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register application servers params -func (o *RegisterApplicationServersParams) WithBody(body *models.RegisterApplicationServersParameters) *RegisterApplicationServersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register application servers params -func (o *RegisterApplicationServersParams) SetBody(body *models.RegisterApplicationServersParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterApplicationServersParams) 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/protection_sources/register_application_servers_responses.go b/v1/client/protection_sources/register_application_servers_responses.go deleted file mode 100644 index 99bb0781..00000000 --- a/v1/client/protection_sources/register_application_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RegisterApplicationServersReader is a Reader for the RegisterApplicationServers structure. -type RegisterApplicationServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterApplicationServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRegisterApplicationServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterApplicationServersDefault(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 - } -} - -// NewRegisterApplicationServersOK creates a RegisterApplicationServersOK with default headers values -func NewRegisterApplicationServersOK() *RegisterApplicationServersOK { - return &RegisterApplicationServersOK{} -} - -/* -RegisterApplicationServersOK describes a response with status code 200, with default header values. - -Success -*/ -type RegisterApplicationServersOK struct { - Payload *models.ProtectionSource -} - -// IsSuccess returns true when this register application servers o k response has a 2xx status code -func (o *RegisterApplicationServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register application servers o k response has a 3xx status code -func (o *RegisterApplicationServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register application servers o k response has a 4xx status code -func (o *RegisterApplicationServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this register application servers o k response has a 5xx status code -func (o *RegisterApplicationServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this register application servers o k response a status code equal to that given -func (o *RegisterApplicationServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the register application servers o k response -func (o *RegisterApplicationServersOK) Code() int { - return 200 -} - -func (o *RegisterApplicationServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/applicationServers][%d] registerApplicationServersOK %s", 200, payload) -} - -func (o *RegisterApplicationServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/applicationServers][%d] registerApplicationServersOK %s", 200, payload) -} - -func (o *RegisterApplicationServersOK) GetPayload() *models.ProtectionSource { - return o.Payload -} - -func (o *RegisterApplicationServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSource) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterApplicationServersDefault creates a RegisterApplicationServersDefault with default headers values -func NewRegisterApplicationServersDefault(code int) *RegisterApplicationServersDefault { - return &RegisterApplicationServersDefault{ - _statusCode: code, - } -} - -/* -RegisterApplicationServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterApplicationServersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this register application servers default response has a 2xx status code -func (o *RegisterApplicationServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register application servers default response has a 3xx status code -func (o *RegisterApplicationServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register application servers default response has a 4xx status code -func (o *RegisterApplicationServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register application servers default response has a 5xx status code -func (o *RegisterApplicationServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register application servers default response a status code equal to that given -func (o *RegisterApplicationServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register application servers default response -func (o *RegisterApplicationServersDefault) Code() int { - return o._statusCode -} - -func (o *RegisterApplicationServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/applicationServers][%d] RegisterApplicationServers default %s", o._statusCode, payload) -} - -func (o *RegisterApplicationServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/applicationServers][%d] RegisterApplicationServers default %s", o._statusCode, payload) -} - -func (o *RegisterApplicationServersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RegisterApplicationServersDefault) 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_sources/register_protection_source_parameters.go b/v1/client/protection_sources/register_protection_source_parameters.go deleted file mode 100644 index ac43c586..00000000 --- a/v1/client/protection_sources/register_protection_source_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRegisterProtectionSourceParams creates a new RegisterProtectionSourceParams 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 NewRegisterProtectionSourceParams() *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterProtectionSourceParamsWithTimeout creates a new RegisterProtectionSourceParams object -// with the ability to set a timeout on a request. -func NewRegisterProtectionSourceParamsWithTimeout(timeout time.Duration) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - timeout: timeout, - } -} - -// NewRegisterProtectionSourceParamsWithContext creates a new RegisterProtectionSourceParams object -// with the ability to set a context for a request. -func NewRegisterProtectionSourceParamsWithContext(ctx context.Context) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - Context: ctx, - } -} - -// NewRegisterProtectionSourceParamsWithHTTPClient creates a new RegisterProtectionSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterProtectionSourceParamsWithHTTPClient(client *http.Client) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - HTTPClient: client, - } -} - -/* -RegisterProtectionSourceParams contains all the parameters to send to the API endpoint - - for the register protection source operation. - - Typically these are written to a http.Request. -*/ -type RegisterProtectionSourceParams struct { - - /* Body. - - Request to register a protection source. - */ - Body *models.RegisterProtectionSourceParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterProtectionSourceParams) WithDefaults() *RegisterProtectionSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterProtectionSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register protection source params -func (o *RegisterProtectionSourceParams) WithTimeout(timeout time.Duration) *RegisterProtectionSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register protection source params -func (o *RegisterProtectionSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register protection source params -func (o *RegisterProtectionSourceParams) WithContext(ctx context.Context) *RegisterProtectionSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register protection source params -func (o *RegisterProtectionSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register protection source params -func (o *RegisterProtectionSourceParams) WithHTTPClient(client *http.Client) *RegisterProtectionSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register protection source params -func (o *RegisterProtectionSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register protection source params -func (o *RegisterProtectionSourceParams) WithBody(body *models.RegisterProtectionSourceParameters) *RegisterProtectionSourceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register protection source params -func (o *RegisterProtectionSourceParams) SetBody(body *models.RegisterProtectionSourceParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterProtectionSourceParams) 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/protection_sources/register_protection_source_responses.go b/v1/client/protection_sources/register_protection_source_responses.go deleted file mode 100644 index 210b6b57..00000000 --- a/v1/client/protection_sources/register_protection_source_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RegisterProtectionSourceReader is a Reader for the RegisterProtectionSource structure. -type RegisterProtectionSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterProtectionSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRegisterProtectionSourceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterProtectionSourceDefault(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 - } -} - -// NewRegisterProtectionSourceOK creates a RegisterProtectionSourceOK with default headers values -func NewRegisterProtectionSourceOK() *RegisterProtectionSourceOK { - return &RegisterProtectionSourceOK{} -} - -/* -RegisterProtectionSourceOK describes a response with status code 200, with default header values. - -Success -*/ -type RegisterProtectionSourceOK struct { - Payload *models.ProtectionSource -} - -// IsSuccess returns true when this register protection source o k response has a 2xx status code -func (o *RegisterProtectionSourceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register protection source o k response has a 3xx status code -func (o *RegisterProtectionSourceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register protection source o k response has a 4xx status code -func (o *RegisterProtectionSourceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this register protection source o k response has a 5xx status code -func (o *RegisterProtectionSourceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this register protection source o k response a status code equal to that given -func (o *RegisterProtectionSourceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the register protection source o k response -func (o *RegisterProtectionSourceOK) Code() int { - return 200 -} - -func (o *RegisterProtectionSourceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/register][%d] registerProtectionSourceOK %s", 200, payload) -} - -func (o *RegisterProtectionSourceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/register][%d] registerProtectionSourceOK %s", 200, payload) -} - -func (o *RegisterProtectionSourceOK) GetPayload() *models.ProtectionSource { - return o.Payload -} - -func (o *RegisterProtectionSourceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSource) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterProtectionSourceDefault creates a RegisterProtectionSourceDefault with default headers values -func NewRegisterProtectionSourceDefault(code int) *RegisterProtectionSourceDefault { - return &RegisterProtectionSourceDefault{ - _statusCode: code, - } -} - -/* -RegisterProtectionSourceDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterProtectionSourceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this register protection source default response has a 2xx status code -func (o *RegisterProtectionSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register protection source default response has a 3xx status code -func (o *RegisterProtectionSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register protection source default response has a 4xx status code -func (o *RegisterProtectionSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register protection source default response has a 5xx status code -func (o *RegisterProtectionSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register protection source default response a status code equal to that given -func (o *RegisterProtectionSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register protection source default response -func (o *RegisterProtectionSourceDefault) Code() int { - return o._statusCode -} - -func (o *RegisterProtectionSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/register][%d] RegisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *RegisterProtectionSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/register][%d] RegisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *RegisterProtectionSourceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RegisterProtectionSourceDefault) 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_sources/run_diagnostics_parameters.go b/v1/client/protection_sources/run_diagnostics_parameters.go deleted file mode 100644 index ee0021b6..00000000 --- a/v1/client/protection_sources/run_diagnostics_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewRunDiagnosticsParams creates a new RunDiagnosticsParams 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 NewRunDiagnosticsParams() *RunDiagnosticsParams { - return &RunDiagnosticsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRunDiagnosticsParamsWithTimeout creates a new RunDiagnosticsParams object -// with the ability to set a timeout on a request. -func NewRunDiagnosticsParamsWithTimeout(timeout time.Duration) *RunDiagnosticsParams { - return &RunDiagnosticsParams{ - timeout: timeout, - } -} - -// NewRunDiagnosticsParamsWithContext creates a new RunDiagnosticsParams object -// with the ability to set a context for a request. -func NewRunDiagnosticsParamsWithContext(ctx context.Context) *RunDiagnosticsParams { - return &RunDiagnosticsParams{ - Context: ctx, - } -} - -// NewRunDiagnosticsParamsWithHTTPClient creates a new RunDiagnosticsParams object -// with the ability to set a custom HTTPClient for a request. -func NewRunDiagnosticsParamsWithHTTPClient(client *http.Client) *RunDiagnosticsParams { - return &RunDiagnosticsParams{ - HTTPClient: client, - } -} - -/* -RunDiagnosticsParams contains all the parameters to send to the API endpoint - - for the run diagnostics operation. - - Typically these are written to a http.Request. -*/ -type RunDiagnosticsParams struct { - - /* ID. - - Specifies the entity id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the run diagnostics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunDiagnosticsParams) WithDefaults() *RunDiagnosticsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the run diagnostics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RunDiagnosticsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the run diagnostics params -func (o *RunDiagnosticsParams) WithTimeout(timeout time.Duration) *RunDiagnosticsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the run diagnostics params -func (o *RunDiagnosticsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the run diagnostics params -func (o *RunDiagnosticsParams) WithContext(ctx context.Context) *RunDiagnosticsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the run diagnostics params -func (o *RunDiagnosticsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the run diagnostics params -func (o *RunDiagnosticsParams) WithHTTPClient(client *http.Client) *RunDiagnosticsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the run diagnostics params -func (o *RunDiagnosticsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the run diagnostics params -func (o *RunDiagnosticsParams) WithID(id int64) *RunDiagnosticsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the run diagnostics params -func (o *RunDiagnosticsParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RunDiagnosticsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/run_diagnostics_responses.go b/v1/client/protection_sources/run_diagnostics_responses.go deleted file mode 100644 index c3337923..00000000 --- a/v1/client/protection_sources/run_diagnostics_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RunDiagnosticsReader is a Reader for the RunDiagnostics structure. -type RunDiagnosticsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RunDiagnosticsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRunDiagnosticsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRunDiagnosticsDefault(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 - } -} - -// NewRunDiagnosticsCreated creates a RunDiagnosticsCreated with default headers values -func NewRunDiagnosticsCreated() *RunDiagnosticsCreated { - return &RunDiagnosticsCreated{} -} - -/* -RunDiagnosticsCreated describes a response with status code 201, with default header values. - -Success -*/ -type RunDiagnosticsCreated struct { - Payload *models.RunDiagnosticsMessage -} - -// IsSuccess returns true when this run diagnostics created response has a 2xx status code -func (o *RunDiagnosticsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this run diagnostics created response has a 3xx status code -func (o *RunDiagnosticsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this run diagnostics created response has a 4xx status code -func (o *RunDiagnosticsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this run diagnostics created response has a 5xx status code -func (o *RunDiagnosticsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this run diagnostics created response a status code equal to that given -func (o *RunDiagnosticsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the run diagnostics created response -func (o *RunDiagnosticsCreated) Code() int { - return 201 -} - -func (o *RunDiagnosticsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/diagnostics/{id}][%d] runDiagnosticsCreated %s", 201, payload) -} - -func (o *RunDiagnosticsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/diagnostics/{id}][%d] runDiagnosticsCreated %s", 201, payload) -} - -func (o *RunDiagnosticsCreated) GetPayload() *models.RunDiagnosticsMessage { - return o.Payload -} - -func (o *RunDiagnosticsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RunDiagnosticsMessage) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRunDiagnosticsDefault creates a RunDiagnosticsDefault with default headers values -func NewRunDiagnosticsDefault(code int) *RunDiagnosticsDefault { - return &RunDiagnosticsDefault{ - _statusCode: code, - } -} - -/* -RunDiagnosticsDefault describes a response with status code -1, with default header values. - -Error -*/ -type RunDiagnosticsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this run diagnostics default response has a 2xx status code -func (o *RunDiagnosticsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this run diagnostics default response has a 3xx status code -func (o *RunDiagnosticsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this run diagnostics default response has a 4xx status code -func (o *RunDiagnosticsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this run diagnostics default response has a 5xx status code -func (o *RunDiagnosticsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this run diagnostics default response a status code equal to that given -func (o *RunDiagnosticsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the run diagnostics default response -func (o *RunDiagnosticsDefault) Code() int { - return o._statusCode -} - -func (o *RunDiagnosticsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/diagnostics/{id}][%d] RunDiagnostics default %s", o._statusCode, payload) -} - -func (o *RunDiagnosticsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/protectionSources/diagnostics/{id}][%d] RunDiagnostics default %s", o._statusCode, payload) -} - -func (o *RunDiagnosticsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RunDiagnosticsDefault) 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_sources/unregister_application_servers_parameters.go b/v1/client/protection_sources/unregister_application_servers_parameters.go deleted file mode 100644 index 02c082c7..00000000 --- a/v1/client/protection_sources/unregister_application_servers_parameters.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUnregisterApplicationServersParams creates a new UnregisterApplicationServersParams 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 NewUnregisterApplicationServersParams() *UnregisterApplicationServersParams { - return &UnregisterApplicationServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterApplicationServersParamsWithTimeout creates a new UnregisterApplicationServersParams object -// with the ability to set a timeout on a request. -func NewUnregisterApplicationServersParamsWithTimeout(timeout time.Duration) *UnregisterApplicationServersParams { - return &UnregisterApplicationServersParams{ - timeout: timeout, - } -} - -// NewUnregisterApplicationServersParamsWithContext creates a new UnregisterApplicationServersParams object -// with the ability to set a context for a request. -func NewUnregisterApplicationServersParamsWithContext(ctx context.Context) *UnregisterApplicationServersParams { - return &UnregisterApplicationServersParams{ - Context: ctx, - } -} - -// NewUnregisterApplicationServersParamsWithHTTPClient creates a new UnregisterApplicationServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterApplicationServersParamsWithHTTPClient(client *http.Client) *UnregisterApplicationServersParams { - return &UnregisterApplicationServersParams{ - HTTPClient: client, - } -} - -/* -UnregisterApplicationServersParams contains all the parameters to send to the API endpoint - - for the unregister application servers operation. - - Typically these are written to a http.Request. -*/ -type UnregisterApplicationServersParams struct { - - /* Body. - - Request to register a protection source. - */ - Body *models.UnRegisterApplicationServersParameters - - /* ID. - - Specifies a unique id of the Protection Source to unregister the - Application Servers. If the Protection Source is currently being - backed up, unregister operation will fail. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterApplicationServersParams) WithDefaults() *UnregisterApplicationServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterApplicationServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister application servers params -func (o *UnregisterApplicationServersParams) WithTimeout(timeout time.Duration) *UnregisterApplicationServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister application servers params -func (o *UnregisterApplicationServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister application servers params -func (o *UnregisterApplicationServersParams) WithContext(ctx context.Context) *UnregisterApplicationServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister application servers params -func (o *UnregisterApplicationServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister application servers params -func (o *UnregisterApplicationServersParams) WithHTTPClient(client *http.Client) *UnregisterApplicationServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister application servers params -func (o *UnregisterApplicationServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unregister application servers params -func (o *UnregisterApplicationServersParams) WithBody(body *models.UnRegisterApplicationServersParameters) *UnregisterApplicationServersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unregister application servers params -func (o *UnregisterApplicationServersParams) SetBody(body *models.UnRegisterApplicationServersParameters) { - o.Body = body -} - -// WithID adds the id to the unregister application servers params -func (o *UnregisterApplicationServersParams) WithID(id int64) *UnregisterApplicationServersParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unregister application servers params -func (o *UnregisterApplicationServersParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterApplicationServersParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/unregister_application_servers_responses.go b/v1/client/protection_sources/unregister_application_servers_responses.go deleted file mode 100644 index c4853240..00000000 --- a/v1/client/protection_sources/unregister_application_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UnregisterApplicationServersReader is a Reader for the UnregisterApplicationServers structure. -type UnregisterApplicationServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterApplicationServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUnregisterApplicationServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterApplicationServersDefault(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 - } -} - -// NewUnregisterApplicationServersOK creates a UnregisterApplicationServersOK with default headers values -func NewUnregisterApplicationServersOK() *UnregisterApplicationServersOK { - return &UnregisterApplicationServersOK{} -} - -/* -UnregisterApplicationServersOK describes a response with status code 200, with default header values. - -Success -*/ -type UnregisterApplicationServersOK struct { - Payload *models.ProtectionSource -} - -// IsSuccess returns true when this unregister application servers o k response has a 2xx status code -func (o *UnregisterApplicationServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unregister application servers o k response has a 3xx status code -func (o *UnregisterApplicationServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unregister application servers o k response has a 4xx status code -func (o *UnregisterApplicationServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this unregister application servers o k response has a 5xx status code -func (o *UnregisterApplicationServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this unregister application servers o k response a status code equal to that given -func (o *UnregisterApplicationServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the unregister application servers o k response -func (o *UnregisterApplicationServersOK) Code() int { - return 200 -} - -func (o *UnregisterApplicationServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/applicationServers/{id}][%d] unregisterApplicationServersOK %s", 200, payload) -} - -func (o *UnregisterApplicationServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/applicationServers/{id}][%d] unregisterApplicationServersOK %s", 200, payload) -} - -func (o *UnregisterApplicationServersOK) GetPayload() *models.ProtectionSource { - return o.Payload -} - -func (o *UnregisterApplicationServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSource) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUnregisterApplicationServersDefault creates a UnregisterApplicationServersDefault with default headers values -func NewUnregisterApplicationServersDefault(code int) *UnregisterApplicationServersDefault { - return &UnregisterApplicationServersDefault{ - _statusCode: code, - } -} - -/* -UnregisterApplicationServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnregisterApplicationServersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this unregister application servers default response has a 2xx status code -func (o *UnregisterApplicationServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unregister application servers default response has a 3xx status code -func (o *UnregisterApplicationServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unregister application servers default response has a 4xx status code -func (o *UnregisterApplicationServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unregister application servers default response has a 5xx status code -func (o *UnregisterApplicationServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unregister application servers default response a status code equal to that given -func (o *UnregisterApplicationServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unregister application servers default response -func (o *UnregisterApplicationServersDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterApplicationServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/applicationServers/{id}][%d] UnregisterApplicationServers default %s", o._statusCode, payload) -} - -func (o *UnregisterApplicationServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/applicationServers/{id}][%d] UnregisterApplicationServers default %s", o._statusCode, payload) -} - -func (o *UnregisterApplicationServersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UnregisterApplicationServersDefault) 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_sources/unregister_protection_source_parameters.go b/v1/client/protection_sources/unregister_protection_source_parameters.go deleted file mode 100644 index fc10bc8c..00000000 --- a/v1/client/protection_sources/unregister_protection_source_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" -) - -// NewUnregisterProtectionSourceParams creates a new UnregisterProtectionSourceParams 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 NewUnregisterProtectionSourceParams() *UnregisterProtectionSourceParams { - return &UnregisterProtectionSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterProtectionSourceParamsWithTimeout creates a new UnregisterProtectionSourceParams object -// with the ability to set a timeout on a request. -func NewUnregisterProtectionSourceParamsWithTimeout(timeout time.Duration) *UnregisterProtectionSourceParams { - return &UnregisterProtectionSourceParams{ - timeout: timeout, - } -} - -// NewUnregisterProtectionSourceParamsWithContext creates a new UnregisterProtectionSourceParams object -// with the ability to set a context for a request. -func NewUnregisterProtectionSourceParamsWithContext(ctx context.Context) *UnregisterProtectionSourceParams { - return &UnregisterProtectionSourceParams{ - Context: ctx, - } -} - -// NewUnregisterProtectionSourceParamsWithHTTPClient creates a new UnregisterProtectionSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterProtectionSourceParamsWithHTTPClient(client *http.Client) *UnregisterProtectionSourceParams { - return &UnregisterProtectionSourceParams{ - HTTPClient: client, - } -} - -/* -UnregisterProtectionSourceParams contains all the parameters to send to the API endpoint - - for the unregister protection source operation. - - Typically these are written to a http.Request. -*/ -type UnregisterProtectionSourceParams struct { - - /* ID. - - Specifies a unique id of the Protection Source to unregister. - If the Protection Source is currently being backed up, unregister - operation will fail. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterProtectionSourceParams) WithDefaults() *UnregisterProtectionSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterProtectionSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister protection source params -func (o *UnregisterProtectionSourceParams) WithTimeout(timeout time.Duration) *UnregisterProtectionSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister protection source params -func (o *UnregisterProtectionSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister protection source params -func (o *UnregisterProtectionSourceParams) WithContext(ctx context.Context) *UnregisterProtectionSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister protection source params -func (o *UnregisterProtectionSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister protection source params -func (o *UnregisterProtectionSourceParams) WithHTTPClient(client *http.Client) *UnregisterProtectionSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister protection source params -func (o *UnregisterProtectionSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the unregister protection source params -func (o *UnregisterProtectionSourceParams) WithID(id int64) *UnregisterProtectionSourceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unregister protection source params -func (o *UnregisterProtectionSourceParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterProtectionSourceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/unregister_protection_source_responses.go b/v1/client/protection_sources/unregister_protection_source_responses.go deleted file mode 100644 index 96e9d217..00000000 --- a/v1/client/protection_sources/unregister_protection_source_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UnregisterProtectionSourceReader is a Reader for the UnregisterProtectionSource structure. -type UnregisterProtectionSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterProtectionSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUnregisterProtectionSourceNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterProtectionSourceDefault(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 - } -} - -// NewUnregisterProtectionSourceNoContent creates a UnregisterProtectionSourceNoContent with default headers values -func NewUnregisterProtectionSourceNoContent() *UnregisterProtectionSourceNoContent { - return &UnregisterProtectionSourceNoContent{} -} - -/* -UnregisterProtectionSourceNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UnregisterProtectionSourceNoContent struct { -} - -// IsSuccess returns true when this unregister protection source no content response has a 2xx status code -func (o *UnregisterProtectionSourceNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unregister protection source no content response has a 3xx status code -func (o *UnregisterProtectionSourceNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unregister protection source no content response has a 4xx status code -func (o *UnregisterProtectionSourceNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this unregister protection source no content response has a 5xx status code -func (o *UnregisterProtectionSourceNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this unregister protection source no content response a status code equal to that given -func (o *UnregisterProtectionSourceNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the unregister protection source no content response -func (o *UnregisterProtectionSourceNoContent) Code() int { - return 204 -} - -func (o *UnregisterProtectionSourceNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/protectionSources/{id}][%d] unregisterProtectionSourceNoContent", 204) -} - -func (o *UnregisterProtectionSourceNoContent) String() string { - return fmt.Sprintf("[DELETE /public/protectionSources/{id}][%d] unregisterProtectionSourceNoContent", 204) -} - -func (o *UnregisterProtectionSourceNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUnregisterProtectionSourceDefault creates a UnregisterProtectionSourceDefault with default headers values -func NewUnregisterProtectionSourceDefault(code int) *UnregisterProtectionSourceDefault { - return &UnregisterProtectionSourceDefault{ - _statusCode: code, - } -} - -/* -UnregisterProtectionSourceDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnregisterProtectionSourceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this unregister protection source default response has a 2xx status code -func (o *UnregisterProtectionSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unregister protection source default response has a 3xx status code -func (o *UnregisterProtectionSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unregister protection source default response has a 4xx status code -func (o *UnregisterProtectionSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unregister protection source default response has a 5xx status code -func (o *UnregisterProtectionSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unregister protection source default response a status code equal to that given -func (o *UnregisterProtectionSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unregister protection source default response -func (o *UnregisterProtectionSourceDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterProtectionSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/{id}][%d] UnregisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *UnregisterProtectionSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/protectionSources/{id}][%d] UnregisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *UnregisterProtectionSourceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UnregisterProtectionSourceDefault) 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_sources/update_application_servers_parameters.go b/v1/client/protection_sources/update_application_servers_parameters.go deleted file mode 100644 index 2dd16c6a..00000000 --- a/v1/client/protection_sources/update_application_servers_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateApplicationServersParams creates a new UpdateApplicationServersParams 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 NewUpdateApplicationServersParams() *UpdateApplicationServersParams { - return &UpdateApplicationServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateApplicationServersParamsWithTimeout creates a new UpdateApplicationServersParams object -// with the ability to set a timeout on a request. -func NewUpdateApplicationServersParamsWithTimeout(timeout time.Duration) *UpdateApplicationServersParams { - return &UpdateApplicationServersParams{ - timeout: timeout, - } -} - -// NewUpdateApplicationServersParamsWithContext creates a new UpdateApplicationServersParams object -// with the ability to set a context for a request. -func NewUpdateApplicationServersParamsWithContext(ctx context.Context) *UpdateApplicationServersParams { - return &UpdateApplicationServersParams{ - Context: ctx, - } -} - -// NewUpdateApplicationServersParamsWithHTTPClient creates a new UpdateApplicationServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateApplicationServersParamsWithHTTPClient(client *http.Client) *UpdateApplicationServersParams { - return &UpdateApplicationServersParams{ - HTTPClient: client, - } -} - -/* -UpdateApplicationServersParams contains all the parameters to send to the API endpoint - - for the update application servers operation. - - Typically these are written to a http.Request. -*/ -type UpdateApplicationServersParams struct { - - /* Body. - - Request to modify the Application Servers registration of a Protection - Source. - */ - Body *models.UpdateApplicationServerParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateApplicationServersParams) WithDefaults() *UpdateApplicationServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update application servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateApplicationServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update application servers params -func (o *UpdateApplicationServersParams) WithTimeout(timeout time.Duration) *UpdateApplicationServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update application servers params -func (o *UpdateApplicationServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update application servers params -func (o *UpdateApplicationServersParams) WithContext(ctx context.Context) *UpdateApplicationServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update application servers params -func (o *UpdateApplicationServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update application servers params -func (o *UpdateApplicationServersParams) WithHTTPClient(client *http.Client) *UpdateApplicationServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update application servers params -func (o *UpdateApplicationServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update application servers params -func (o *UpdateApplicationServersParams) WithBody(body *models.UpdateApplicationServerParameters) *UpdateApplicationServersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update application servers params -func (o *UpdateApplicationServersParams) SetBody(body *models.UpdateApplicationServerParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateApplicationServersParams) 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/protection_sources/update_application_servers_responses.go b/v1/client/protection_sources/update_application_servers_responses.go deleted file mode 100644 index a7475aef..00000000 --- a/v1/client/protection_sources/update_application_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateApplicationServersReader is a Reader for the UpdateApplicationServers structure. -type UpdateApplicationServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateApplicationServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateApplicationServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateApplicationServersDefault(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 - } -} - -// NewUpdateApplicationServersOK creates a UpdateApplicationServersOK with default headers values -func NewUpdateApplicationServersOK() *UpdateApplicationServersOK { - return &UpdateApplicationServersOK{} -} - -/* -UpdateApplicationServersOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateApplicationServersOK struct { - Payload *models.ProtectionSource -} - -// IsSuccess returns true when this update application servers o k response has a 2xx status code -func (o *UpdateApplicationServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update application servers o k response has a 3xx status code -func (o *UpdateApplicationServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update application servers o k response has a 4xx status code -func (o *UpdateApplicationServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update application servers o k response has a 5xx status code -func (o *UpdateApplicationServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update application servers o k response a status code equal to that given -func (o *UpdateApplicationServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update application servers o k response -func (o *UpdateApplicationServersOK) Code() int { - return 200 -} - -func (o *UpdateApplicationServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionSources/applicationServers][%d] updateApplicationServersOK %s", 200, payload) -} - -func (o *UpdateApplicationServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionSources/applicationServers][%d] updateApplicationServersOK %s", 200, payload) -} - -func (o *UpdateApplicationServersOK) GetPayload() *models.ProtectionSource { - return o.Payload -} - -func (o *UpdateApplicationServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSource) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateApplicationServersDefault creates a UpdateApplicationServersDefault with default headers values -func NewUpdateApplicationServersDefault(code int) *UpdateApplicationServersDefault { - return &UpdateApplicationServersDefault{ - _statusCode: code, - } -} - -/* -UpdateApplicationServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateApplicationServersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update application servers default response has a 2xx status code -func (o *UpdateApplicationServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update application servers default response has a 3xx status code -func (o *UpdateApplicationServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update application servers default response has a 4xx status code -func (o *UpdateApplicationServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update application servers default response has a 5xx status code -func (o *UpdateApplicationServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update application servers default response a status code equal to that given -func (o *UpdateApplicationServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update application servers default response -func (o *UpdateApplicationServersDefault) Code() int { - return o._statusCode -} - -func (o *UpdateApplicationServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionSources/applicationServers][%d] UpdateApplicationServers default %s", o._statusCode, payload) -} - -func (o *UpdateApplicationServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/protectionSources/applicationServers][%d] UpdateApplicationServers default %s", o._statusCode, payload) -} - -func (o *UpdateApplicationServersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateApplicationServersDefault) 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_sources/update_protection_source_parameters.go b/v1/client/protection_sources/update_protection_source_parameters.go deleted file mode 100644 index b95a27ad..00000000 --- a/v1/client/protection_sources/update_protection_source_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateProtectionSourceParams creates a new UpdateProtectionSourceParams 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 NewUpdateProtectionSourceParams() *UpdateProtectionSourceParams { - return &UpdateProtectionSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionSourceParamsWithTimeout creates a new UpdateProtectionSourceParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionSourceParamsWithTimeout(timeout time.Duration) *UpdateProtectionSourceParams { - return &UpdateProtectionSourceParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionSourceParamsWithContext creates a new UpdateProtectionSourceParams object -// with the ability to set a context for a request. -func NewUpdateProtectionSourceParamsWithContext(ctx context.Context) *UpdateProtectionSourceParams { - return &UpdateProtectionSourceParams{ - Context: ctx, - } -} - -// NewUpdateProtectionSourceParamsWithHTTPClient creates a new UpdateProtectionSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionSourceParamsWithHTTPClient(client *http.Client) *UpdateProtectionSourceParams { - return &UpdateProtectionSourceParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionSourceParams contains all the parameters to send to the API endpoint - - for the update protection source operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionSourceParams struct { - - /* Body. - - Request to update protection source. - */ - Body *models.UpdateProtectionSourceParameters - - /* ID. - - Specifies a unique id of the Protection Source to update. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionSourceParams) WithDefaults() *UpdateProtectionSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection source params -func (o *UpdateProtectionSourceParams) WithTimeout(timeout time.Duration) *UpdateProtectionSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection source params -func (o *UpdateProtectionSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection source params -func (o *UpdateProtectionSourceParams) WithContext(ctx context.Context) *UpdateProtectionSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection source params -func (o *UpdateProtectionSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection source params -func (o *UpdateProtectionSourceParams) WithHTTPClient(client *http.Client) *UpdateProtectionSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection source params -func (o *UpdateProtectionSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection source params -func (o *UpdateProtectionSourceParams) WithBody(body *models.UpdateProtectionSourceParameters) *UpdateProtectionSourceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection source params -func (o *UpdateProtectionSourceParams) SetBody(body *models.UpdateProtectionSourceParameters) { - o.Body = body -} - -// WithID adds the id to the update protection source params -func (o *UpdateProtectionSourceParams) WithID(id int64) *UpdateProtectionSourceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection source params -func (o *UpdateProtectionSourceParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionSourceParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/protection_sources/update_protection_source_responses.go b/v1/client/protection_sources/update_protection_source_responses.go deleted file mode 100644 index fc2eb3cc..00000000 --- a/v1/client/protection_sources/update_protection_source_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateProtectionSourceReader is a Reader for the UpdateProtectionSource structure. -type UpdateProtectionSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionSourceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionSourceDefault(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 - } -} - -// NewUpdateProtectionSourceOK creates a UpdateProtectionSourceOK with default headers values -func NewUpdateProtectionSourceOK() *UpdateProtectionSourceOK { - return &UpdateProtectionSourceOK{} -} - -/* -UpdateProtectionSourceOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionSourceOK struct { - Payload *models.ProtectionSourceNode -} - -// IsSuccess returns true when this update protection source o k response has a 2xx status code -func (o *UpdateProtectionSourceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection source o k response has a 3xx status code -func (o *UpdateProtectionSourceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection source o k response has a 4xx status code -func (o *UpdateProtectionSourceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection source o k response has a 5xx status code -func (o *UpdateProtectionSourceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection source o k response a status code equal to that given -func (o *UpdateProtectionSourceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection source o k response -func (o *UpdateProtectionSourceOK) Code() int { - return 200 -} - -func (o *UpdateProtectionSourceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/protectionSources/{id}][%d] updateProtectionSourceOK %s", 200, payload) -} - -func (o *UpdateProtectionSourceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/protectionSources/{id}][%d] updateProtectionSourceOK %s", 200, payload) -} - -func (o *UpdateProtectionSourceOK) GetPayload() *models.ProtectionSourceNode { - return o.Payload -} - -func (o *UpdateProtectionSourceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSourceNode) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionSourceDefault creates a UpdateProtectionSourceDefault with default headers values -func NewUpdateProtectionSourceDefault(code int) *UpdateProtectionSourceDefault { - return &UpdateProtectionSourceDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionSourceDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionSourceDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update protection source default response has a 2xx status code -func (o *UpdateProtectionSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection source default response has a 3xx status code -func (o *UpdateProtectionSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection source default response has a 4xx status code -func (o *UpdateProtectionSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection source default response has a 5xx status code -func (o *UpdateProtectionSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection source default response a status code equal to that given -func (o *UpdateProtectionSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection source default response -func (o *UpdateProtectionSourceDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/protectionSources/{id}][%d] UpdateProtectionSource default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /public/protectionSources/{id}][%d] UpdateProtectionSource default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionSourceDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateProtectionSourceDefault) 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_sources/upgrade_physical_agents_parameters.go b/v1/client/protection_sources/upgrade_physical_agents_parameters.go deleted file mode 100644 index d87d249e..00000000 --- a/v1/client/protection_sources/upgrade_physical_agents_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpgradePhysicalAgentsParams creates a new UpgradePhysicalAgentsParams 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 NewUpgradePhysicalAgentsParams() *UpgradePhysicalAgentsParams { - return &UpgradePhysicalAgentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradePhysicalAgentsParamsWithTimeout creates a new UpgradePhysicalAgentsParams object -// with the ability to set a timeout on a request. -func NewUpgradePhysicalAgentsParamsWithTimeout(timeout time.Duration) *UpgradePhysicalAgentsParams { - return &UpgradePhysicalAgentsParams{ - timeout: timeout, - } -} - -// NewUpgradePhysicalAgentsParamsWithContext creates a new UpgradePhysicalAgentsParams object -// with the ability to set a context for a request. -func NewUpgradePhysicalAgentsParamsWithContext(ctx context.Context) *UpgradePhysicalAgentsParams { - return &UpgradePhysicalAgentsParams{ - Context: ctx, - } -} - -// NewUpgradePhysicalAgentsParamsWithHTTPClient creates a new UpgradePhysicalAgentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradePhysicalAgentsParamsWithHTTPClient(client *http.Client) *UpgradePhysicalAgentsParams { - return &UpgradePhysicalAgentsParams{ - HTTPClient: client, - } -} - -/* -UpgradePhysicalAgentsParams contains all the parameters to send to the API endpoint - - for the upgrade physical agents operation. - - Typically these are written to a http.Request. -*/ -type UpgradePhysicalAgentsParams struct { - - /* Body. - - Request to upgrade agents on Physical Servers. - */ - Body *models.UpgradePhysicalServerAgents - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade physical agents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradePhysicalAgentsParams) WithDefaults() *UpgradePhysicalAgentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade physical agents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradePhysicalAgentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) WithTimeout(timeout time.Duration) *UpgradePhysicalAgentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) WithContext(ctx context.Context) *UpgradePhysicalAgentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) WithHTTPClient(client *http.Client) *UpgradePhysicalAgentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) WithBody(body *models.UpgradePhysicalServerAgents) *UpgradePhysicalAgentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upgrade physical agents params -func (o *UpgradePhysicalAgentsParams) SetBody(body *models.UpgradePhysicalServerAgents) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradePhysicalAgentsParams) 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/protection_sources/upgrade_physical_agents_responses.go b/v1/client/protection_sources/upgrade_physical_agents_responses.go deleted file mode 100644 index e5cf049f..00000000 --- a/v1/client/protection_sources/upgrade_physical_agents_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_sources - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpgradePhysicalAgentsReader is a Reader for the UpgradePhysicalAgents structure. -type UpgradePhysicalAgentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradePhysicalAgentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpgradePhysicalAgentsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradePhysicalAgentsDefault(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 - } -} - -// NewUpgradePhysicalAgentsCreated creates a UpgradePhysicalAgentsCreated with default headers values -func NewUpgradePhysicalAgentsCreated() *UpgradePhysicalAgentsCreated { - return &UpgradePhysicalAgentsCreated{} -} - -/* -UpgradePhysicalAgentsCreated describes a response with status code 201, with default header values. - -Success -*/ -type UpgradePhysicalAgentsCreated struct { - Payload *models.UpgradePhysicalAgentsMessage -} - -// IsSuccess returns true when this upgrade physical agents created response has a 2xx status code -func (o *UpgradePhysicalAgentsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade physical agents created response has a 3xx status code -func (o *UpgradePhysicalAgentsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade physical agents created response has a 4xx status code -func (o *UpgradePhysicalAgentsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade physical agents created response has a 5xx status code -func (o *UpgradePhysicalAgentsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade physical agents created response a status code equal to that given -func (o *UpgradePhysicalAgentsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the upgrade physical agents created response -func (o *UpgradePhysicalAgentsCreated) Code() int { - return 201 -} - -func (o *UpgradePhysicalAgentsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/physicalAgents/upgrade][%d] upgradePhysicalAgentsCreated %s", 201, payload) -} - -func (o *UpgradePhysicalAgentsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/physicalAgents/upgrade][%d] upgradePhysicalAgentsCreated %s", 201, payload) -} - -func (o *UpgradePhysicalAgentsCreated) GetPayload() *models.UpgradePhysicalAgentsMessage { - return o.Payload -} - -func (o *UpgradePhysicalAgentsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpgradePhysicalAgentsMessage) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradePhysicalAgentsDefault creates a UpgradePhysicalAgentsDefault with default headers values -func NewUpgradePhysicalAgentsDefault(code int) *UpgradePhysicalAgentsDefault { - return &UpgradePhysicalAgentsDefault{ - _statusCode: code, - } -} - -/* -UpgradePhysicalAgentsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradePhysicalAgentsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upgrade physical agents default response has a 2xx status code -func (o *UpgradePhysicalAgentsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade physical agents default response has a 3xx status code -func (o *UpgradePhysicalAgentsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade physical agents default response has a 4xx status code -func (o *UpgradePhysicalAgentsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade physical agents default response has a 5xx status code -func (o *UpgradePhysicalAgentsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade physical agents default response a status code equal to that given -func (o *UpgradePhysicalAgentsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade physical agents default response -func (o *UpgradePhysicalAgentsDefault) Code() int { - return o._statusCode -} - -func (o *UpgradePhysicalAgentsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/physicalAgents/upgrade][%d] UpgradePhysicalAgents default %s", o._statusCode, payload) -} - -func (o *UpgradePhysicalAgentsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/physicalAgents/upgrade][%d] UpgradePhysicalAgents default %s", o._statusCode, payload) -} - -func (o *UpgradePhysicalAgentsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpgradePhysicalAgentsDefault) 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/recover_application/recover_app_parameters.go b/v1/client/recover_application/recover_app_parameters.go deleted file mode 100644 index 1b835e07..00000000 --- a/v1/client/recover_application/recover_app_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recover_application - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRecoverAppParams creates a new RecoverAppParams 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 NewRecoverAppParams() *RecoverAppParams { - return &RecoverAppParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRecoverAppParamsWithTimeout creates a new RecoverAppParams object -// with the ability to set a timeout on a request. -func NewRecoverAppParamsWithTimeout(timeout time.Duration) *RecoverAppParams { - return &RecoverAppParams{ - timeout: timeout, - } -} - -// NewRecoverAppParamsWithContext creates a new RecoverAppParams object -// with the ability to set a context for a request. -func NewRecoverAppParamsWithContext(ctx context.Context) *RecoverAppParams { - return &RecoverAppParams{ - Context: ctx, - } -} - -// NewRecoverAppParamsWithHTTPClient creates a new RecoverAppParams object -// with the ability to set a custom HTTPClient for a request. -func NewRecoverAppParamsWithHTTPClient(client *http.Client) *RecoverAppParams { - return &RecoverAppParams{ - HTTPClient: client, - } -} - -/* -RecoverAppParams contains all the parameters to send to the API endpoint - - for the recover app operation. - - Typically these are written to a http.Request. -*/ -type RecoverAppParams struct { - - /* Body. - - Restore Application argument - */ - Body *models.RestoreAppArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the recover app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RecoverAppParams) WithDefaults() *RecoverAppParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the recover app params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RecoverAppParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the recover app params -func (o *RecoverAppParams) WithTimeout(timeout time.Duration) *RecoverAppParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the recover app params -func (o *RecoverAppParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the recover app params -func (o *RecoverAppParams) WithContext(ctx context.Context) *RecoverAppParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the recover app params -func (o *RecoverAppParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the recover app params -func (o *RecoverAppParams) WithHTTPClient(client *http.Client) *RecoverAppParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the recover app params -func (o *RecoverAppParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the recover app params -func (o *RecoverAppParams) WithBody(body *models.RestoreAppArg) *RecoverAppParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the recover app params -func (o *RecoverAppParams) SetBody(body *models.RestoreAppArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RecoverAppParams) 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/recover_application/recover_app_responses.go b/v1/client/recover_application/recover_app_responses.go deleted file mode 100644 index d0cac895..00000000 --- a/v1/client/recover_application/recover_app_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recover_application - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RecoverAppReader is a Reader for the RecoverApp structure. -type RecoverAppReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RecoverAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRecoverAppOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRecoverAppDefault(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 - } -} - -// NewRecoverAppOK creates a RecoverAppOK with default headers values -func NewRecoverAppOK() *RecoverAppOK { - return &RecoverAppOK{} -} - -/* -RecoverAppOK describes a response with status code 200, with default header values. - -Success -*/ -type RecoverAppOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this recover app o k response has a 2xx status code -func (o *RecoverAppOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this recover app o k response has a 3xx status code -func (o *RecoverAppOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this recover app o k response has a 4xx status code -func (o *RecoverAppOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this recover app o k response has a 5xx status code -func (o *RecoverAppOK) IsServerError() bool { - return false -} - -// IsCode returns true when this recover app o k response a status code equal to that given -func (o *RecoverAppOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the recover app o k response -func (o *RecoverAppOK) Code() int { - return 200 -} - -func (o *RecoverAppOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /recoverApplication][%d] recoverAppOK %s", 200, payload) -} - -func (o *RecoverAppOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /recoverApplication][%d] recoverAppOK %s", 200, payload) -} - -func (o *RecoverAppOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *RecoverAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRecoverAppDefault creates a RecoverAppDefault with default headers values -func NewRecoverAppDefault(code int) *RecoverAppDefault { - return &RecoverAppDefault{ - _statusCode: code, - } -} - -/* -RecoverAppDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RecoverAppDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this recover app default response has a 2xx status code -func (o *RecoverAppDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this recover app default response has a 3xx status code -func (o *RecoverAppDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this recover app default response has a 4xx status code -func (o *RecoverAppDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this recover app default response has a 5xx status code -func (o *RecoverAppDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this recover app default response a status code equal to that given -func (o *RecoverAppDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the recover app default response -func (o *RecoverAppDefault) Code() int { - return o._statusCode -} - -func (o *RecoverAppDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /recoverApplication][%d] RecoverApp default %s", o._statusCode, payload) -} - -func (o *RecoverAppDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /recoverApplication][%d] RecoverApp default %s", o._statusCode, payload) -} - -func (o *RecoverAppDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RecoverAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/recover_application/recover_application_client.go b/v1/client/recover_application/recover_application_client.go deleted file mode 100644 index 1723cbfa..00000000 --- a/v1/client/recover_application/recover_application_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recover_application - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new recover application API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new recover application API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new recover application API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for recover application API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - RecoverApp(params *RecoverAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RecoverAppOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -RecoverApp recovers applications like SQL d bs -*/ -func (a *Client) RecoverApp(params *RecoverAppParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RecoverAppOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRecoverAppParams() - } - op := &runtime.ClientOperation{ - ID: "RecoverApp", - Method: "POST", - PathPattern: "/recoverApplication", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RecoverAppReader{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.(*RecoverAppOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RecoverAppDefault) - 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/remote_cluster/create_remote_cluster_parameters.go b/v1/client/remote_cluster/create_remote_cluster_parameters.go deleted file mode 100644 index e8ffe3fb..00000000 --- a/v1/client/remote_cluster/create_remote_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRemoteClusterParams creates a new CreateRemoteClusterParams 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 NewCreateRemoteClusterParams() *CreateRemoteClusterParams { - return &CreateRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRemoteClusterParamsWithTimeout creates a new CreateRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewCreateRemoteClusterParamsWithTimeout(timeout time.Duration) *CreateRemoteClusterParams { - return &CreateRemoteClusterParams{ - timeout: timeout, - } -} - -// NewCreateRemoteClusterParamsWithContext creates a new CreateRemoteClusterParams object -// with the ability to set a context for a request. -func NewCreateRemoteClusterParamsWithContext(ctx context.Context) *CreateRemoteClusterParams { - return &CreateRemoteClusterParams{ - Context: ctx, - } -} - -// NewCreateRemoteClusterParamsWithHTTPClient creates a new CreateRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRemoteClusterParamsWithHTTPClient(client *http.Client) *CreateRemoteClusterParams { - return &CreateRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -CreateRemoteClusterParams contains all the parameters to send to the API endpoint - - for the create remote cluster operation. - - Typically these are written to a http.Request. -*/ -type CreateRemoteClusterParams struct { - - /* Body. - - Request to register a remote Cluster. - */ - Body *models.RegisterRemoteCluster - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteClusterParams) WithDefaults() *CreateRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create remote cluster params -func (o *CreateRemoteClusterParams) WithTimeout(timeout time.Duration) *CreateRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create remote cluster params -func (o *CreateRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create remote cluster params -func (o *CreateRemoteClusterParams) WithContext(ctx context.Context) *CreateRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create remote cluster params -func (o *CreateRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create remote cluster params -func (o *CreateRemoteClusterParams) WithHTTPClient(client *http.Client) *CreateRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create remote cluster params -func (o *CreateRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create remote cluster params -func (o *CreateRemoteClusterParams) WithBody(body *models.RegisterRemoteCluster) *CreateRemoteClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create remote cluster params -func (o *CreateRemoteClusterParams) SetBody(body *models.RegisterRemoteCluster) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRemoteClusterParams) 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/remote_cluster/create_remote_cluster_responses.go b/v1/client/remote_cluster/create_remote_cluster_responses.go deleted file mode 100644 index 74053d38..00000000 --- a/v1/client/remote_cluster/create_remote_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRemoteClusterReader is a Reader for the CreateRemoteCluster structure. -type CreateRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRemoteClusterCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRemoteClusterDefault(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 - } -} - -// NewCreateRemoteClusterCreated creates a CreateRemoteClusterCreated with default headers values -func NewCreateRemoteClusterCreated() *CreateRemoteClusterCreated { - return &CreateRemoteClusterCreated{} -} - -/* -CreateRemoteClusterCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRemoteClusterCreated struct { - Payload *models.RemoteCluster -} - -// IsSuccess returns true when this create remote cluster created response has a 2xx status code -func (o *CreateRemoteClusterCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create remote cluster created response has a 3xx status code -func (o *CreateRemoteClusterCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create remote cluster created response has a 4xx status code -func (o *CreateRemoteClusterCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create remote cluster created response has a 5xx status code -func (o *CreateRemoteClusterCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create remote cluster created response a status code equal to that given -func (o *CreateRemoteClusterCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create remote cluster created response -func (o *CreateRemoteClusterCreated) Code() int { - return 201 -} - -func (o *CreateRemoteClusterCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteClusters][%d] createRemoteClusterCreated %s", 201, payload) -} - -func (o *CreateRemoteClusterCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteClusters][%d] createRemoteClusterCreated %s", 201, payload) -} - -func (o *CreateRemoteClusterCreated) GetPayload() *models.RemoteCluster { - return o.Payload -} - -func (o *CreateRemoteClusterCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteCluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRemoteClusterDefault creates a CreateRemoteClusterDefault with default headers values -func NewCreateRemoteClusterDefault(code int) *CreateRemoteClusterDefault { - return &CreateRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -CreateRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRemoteClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create remote cluster default response has a 2xx status code -func (o *CreateRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create remote cluster default response has a 3xx status code -func (o *CreateRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create remote cluster default response has a 4xx status code -func (o *CreateRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create remote cluster default response has a 5xx status code -func (o *CreateRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create remote cluster default response a status code equal to that given -func (o *CreateRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create remote cluster default response -func (o *CreateRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreateRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteClusters][%d] CreateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *CreateRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteClusters][%d] CreateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *CreateRemoteClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRemoteClusterDefault) 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/remote_cluster/delete_remote_cluster_parameters.go b/v1/client/remote_cluster/delete_remote_cluster_parameters.go deleted file mode 100644 index c54c23a9..00000000 --- a/v1/client/remote_cluster/delete_remote_cluster_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/go-openapi/swag" -) - -// NewDeleteRemoteClusterParams creates a new DeleteRemoteClusterParams 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 NewDeleteRemoteClusterParams() *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRemoteClusterParamsWithTimeout creates a new DeleteRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewDeleteRemoteClusterParamsWithTimeout(timeout time.Duration) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - timeout: timeout, - } -} - -// NewDeleteRemoteClusterParamsWithContext creates a new DeleteRemoteClusterParams object -// with the ability to set a context for a request. -func NewDeleteRemoteClusterParamsWithContext(ctx context.Context) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - Context: ctx, - } -} - -// NewDeleteRemoteClusterParamsWithHTTPClient creates a new DeleteRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRemoteClusterParamsWithHTTPClient(client *http.Client) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -DeleteRemoteClusterParams contains all the parameters to send to the API endpoint - - for the delete remote cluster operation. - - Typically these are written to a http.Request. -*/ -type DeleteRemoteClusterParams struct { - - /* ID. - - id of the remote Cluster - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteClusterParams) WithDefaults() *DeleteRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithTimeout(timeout time.Duration) *DeleteRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithContext(ctx context.Context) *DeleteRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithHTTPClient(client *http.Client) *DeleteRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithID(id int64) *DeleteRemoteClusterParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRemoteClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_cluster/delete_remote_cluster_responses.go b/v1/client/remote_cluster/delete_remote_cluster_responses.go deleted file mode 100644 index 95d9ba1e..00000000 --- a/v1/client/remote_cluster/delete_remote_cluster_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteRemoteClusterReader is a Reader for the DeleteRemoteCluster structure. -type DeleteRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRemoteClusterNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRemoteClusterDefault(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 - } -} - -// NewDeleteRemoteClusterNoContent creates a DeleteRemoteClusterNoContent with default headers values -func NewDeleteRemoteClusterNoContent() *DeleteRemoteClusterNoContent { - return &DeleteRemoteClusterNoContent{} -} - -/* -DeleteRemoteClusterNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRemoteClusterNoContent struct { -} - -// IsSuccess returns true when this delete remote cluster no content response has a 2xx status code -func (o *DeleteRemoteClusterNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete remote cluster no content response has a 3xx status code -func (o *DeleteRemoteClusterNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete remote cluster no content response has a 4xx status code -func (o *DeleteRemoteClusterNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete remote cluster no content response has a 5xx status code -func (o *DeleteRemoteClusterNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete remote cluster no content response a status code equal to that given -func (o *DeleteRemoteClusterNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete remote cluster no content response -func (o *DeleteRemoteClusterNoContent) Code() int { - return 204 -} - -func (o *DeleteRemoteClusterNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/remoteClusters/{id}][%d] deleteRemoteClusterNoContent", 204) -} - -func (o *DeleteRemoteClusterNoContent) String() string { - return fmt.Sprintf("[DELETE /public/remoteClusters/{id}][%d] deleteRemoteClusterNoContent", 204) -} - -func (o *DeleteRemoteClusterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRemoteClusterDefault creates a DeleteRemoteClusterDefault with default headers values -func NewDeleteRemoteClusterDefault(code int) *DeleteRemoteClusterDefault { - return &DeleteRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -DeleteRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRemoteClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete remote cluster default response has a 2xx status code -func (o *DeleteRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete remote cluster default response has a 3xx status code -func (o *DeleteRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete remote cluster default response has a 4xx status code -func (o *DeleteRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete remote cluster default response has a 5xx status code -func (o *DeleteRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete remote cluster default response a status code equal to that given -func (o *DeleteRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete remote cluster default response -func (o *DeleteRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/remoteClusters/{id}][%d] DeleteRemoteCluster default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/remoteClusters/{id}][%d] DeleteRemoteCluster default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteRemoteClusterDefault) 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/remote_cluster/get_remote_cluster_by_id_parameters.go b/v1/client/remote_cluster/get_remote_cluster_by_id_parameters.go deleted file mode 100644 index 10bfaf09..00000000 --- a/v1/client/remote_cluster/get_remote_cluster_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/go-openapi/swag" -) - -// NewGetRemoteClusterByIDParams creates a new GetRemoteClusterByIDParams 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 NewGetRemoteClusterByIDParams() *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteClusterByIDParamsWithTimeout creates a new GetRemoteClusterByIDParams object -// with the ability to set a timeout on a request. -func NewGetRemoteClusterByIDParamsWithTimeout(timeout time.Duration) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - timeout: timeout, - } -} - -// NewGetRemoteClusterByIDParamsWithContext creates a new GetRemoteClusterByIDParams object -// with the ability to set a context for a request. -func NewGetRemoteClusterByIDParamsWithContext(ctx context.Context) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - Context: ctx, - } -} - -// NewGetRemoteClusterByIDParamsWithHTTPClient creates a new GetRemoteClusterByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteClusterByIDParamsWithHTTPClient(client *http.Client) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - HTTPClient: client, - } -} - -/* -GetRemoteClusterByIDParams contains all the parameters to send to the API endpoint - - for the get remote cluster by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteClusterByIDParams struct { - - /* ID. - - id of the remote Cluster - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote cluster by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClusterByIDParams) WithDefaults() *GetRemoteClusterByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote cluster by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClusterByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithTimeout(timeout time.Duration) *GetRemoteClusterByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithContext(ctx context.Context) *GetRemoteClusterByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithHTTPClient(client *http.Client) *GetRemoteClusterByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithID(id int64) *GetRemoteClusterByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteClusterByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_cluster/get_remote_cluster_by_id_responses.go b/v1/client/remote_cluster/get_remote_cluster_by_id_responses.go deleted file mode 100644 index 7f1d3e32..00000000 --- a/v1/client/remote_cluster/get_remote_cluster_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRemoteClusterByIDReader is a Reader for the GetRemoteClusterByID structure. -type GetRemoteClusterByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteClusterByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteClusterByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteClusterByIDDefault(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 - } -} - -// NewGetRemoteClusterByIDOK creates a GetRemoteClusterByIDOK with default headers values -func NewGetRemoteClusterByIDOK() *GetRemoteClusterByIDOK { - return &GetRemoteClusterByIDOK{} -} - -/* -GetRemoteClusterByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteClusterByIDOK struct { - Payload []*models.RemoteCluster -} - -// IsSuccess returns true when this get remote cluster by Id o k response has a 2xx status code -func (o *GetRemoteClusterByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote cluster by Id o k response has a 3xx status code -func (o *GetRemoteClusterByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote cluster by Id o k response has a 4xx status code -func (o *GetRemoteClusterByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote cluster by Id o k response has a 5xx status code -func (o *GetRemoteClusterByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote cluster by Id o k response a status code equal to that given -func (o *GetRemoteClusterByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote cluster by Id o k response -func (o *GetRemoteClusterByIDOK) Code() int { - return 200 -} - -func (o *GetRemoteClusterByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters/{id}][%d] getRemoteClusterByIdOK %s", 200, payload) -} - -func (o *GetRemoteClusterByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters/{id}][%d] getRemoteClusterByIdOK %s", 200, payload) -} - -func (o *GetRemoteClusterByIDOK) GetPayload() []*models.RemoteCluster { - return o.Payload -} - -func (o *GetRemoteClusterByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteClusterByIDDefault creates a GetRemoteClusterByIDDefault with default headers values -func NewGetRemoteClusterByIDDefault(code int) *GetRemoteClusterByIDDefault { - return &GetRemoteClusterByIDDefault{ - _statusCode: code, - } -} - -/* -GetRemoteClusterByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteClusterByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get remote cluster by Id default response has a 2xx status code -func (o *GetRemoteClusterByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote cluster by Id default response has a 3xx status code -func (o *GetRemoteClusterByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote cluster by Id default response has a 4xx status code -func (o *GetRemoteClusterByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote cluster by Id default response has a 5xx status code -func (o *GetRemoteClusterByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote cluster by Id default response a status code equal to that given -func (o *GetRemoteClusterByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote cluster by Id default response -func (o *GetRemoteClusterByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteClusterByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters/{id}][%d] GetRemoteClusterById default %s", o._statusCode, payload) -} - -func (o *GetRemoteClusterByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters/{id}][%d] GetRemoteClusterById default %s", o._statusCode, payload) -} - -func (o *GetRemoteClusterByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRemoteClusterByIDDefault) 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/remote_cluster/get_remote_clusters_parameters.go b/v1/client/remote_cluster/get_remote_clusters_parameters.go deleted file mode 100644 index 4d40a139..00000000 --- a/v1/client/remote_cluster/get_remote_clusters_parameters.go +++ /dev/null @@ -1,322 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/go-openapi/swag" -) - -// NewGetRemoteClustersParams creates a new GetRemoteClustersParams 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 NewGetRemoteClustersParams() *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteClustersParamsWithTimeout creates a new GetRemoteClustersParams object -// with the ability to set a timeout on a request. -func NewGetRemoteClustersParamsWithTimeout(timeout time.Duration) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - timeout: timeout, - } -} - -// NewGetRemoteClustersParamsWithContext creates a new GetRemoteClustersParams object -// with the ability to set a context for a request. -func NewGetRemoteClustersParamsWithContext(ctx context.Context) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - Context: ctx, - } -} - -// NewGetRemoteClustersParamsWithHTTPClient creates a new GetRemoteClustersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteClustersParamsWithHTTPClient(client *http.Client) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - HTTPClient: client, - } -} - -/* -GetRemoteClustersParams contains all the parameters to send to the API endpoint - - for the get remote clusters operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteClustersParams struct { - - /* ClusterIds. - - Filter by a list of Cluster ids. - */ - ClusterIds []int64 - - /* ClusterNames. - - Filter by a list of Cluster names. - */ - ClusterNames []string - - /* PurposeRemoteAccess. - - Filter for purpose as Remote Access. - */ - PurposeRemoteAccess *bool - - /* PurposeReplication. - - Filter for purpose as Replication. - */ - PurposeReplication *bool - - /* VerifyReverseRegistration. - - Verify anti connection if set to true. - */ - VerifyReverseRegistration *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClustersParams) WithDefaults() *GetRemoteClustersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClustersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote clusters params -func (o *GetRemoteClustersParams) WithTimeout(timeout time.Duration) *GetRemoteClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote clusters params -func (o *GetRemoteClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote clusters params -func (o *GetRemoteClustersParams) WithContext(ctx context.Context) *GetRemoteClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote clusters params -func (o *GetRemoteClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote clusters params -func (o *GetRemoteClustersParams) WithHTTPClient(client *http.Client) *GetRemoteClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote clusters params -func (o *GetRemoteClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterIds adds the clusterIds to the get remote clusters params -func (o *GetRemoteClustersParams) WithClusterIds(clusterIds []int64) *GetRemoteClustersParams { - o.SetClusterIds(clusterIds) - return o -} - -// SetClusterIds adds the clusterIds to the get remote clusters params -func (o *GetRemoteClustersParams) SetClusterIds(clusterIds []int64) { - o.ClusterIds = clusterIds -} - -// WithClusterNames adds the clusterNames to the get remote clusters params -func (o *GetRemoteClustersParams) WithClusterNames(clusterNames []string) *GetRemoteClustersParams { - o.SetClusterNames(clusterNames) - return o -} - -// SetClusterNames adds the clusterNames to the get remote clusters params -func (o *GetRemoteClustersParams) SetClusterNames(clusterNames []string) { - o.ClusterNames = clusterNames -} - -// WithPurposeRemoteAccess adds the purposeRemoteAccess to the get remote clusters params -func (o *GetRemoteClustersParams) WithPurposeRemoteAccess(purposeRemoteAccess *bool) *GetRemoteClustersParams { - o.SetPurposeRemoteAccess(purposeRemoteAccess) - return o -} - -// SetPurposeRemoteAccess adds the purposeRemoteAccess to the get remote clusters params -func (o *GetRemoteClustersParams) SetPurposeRemoteAccess(purposeRemoteAccess *bool) { - o.PurposeRemoteAccess = purposeRemoteAccess -} - -// WithPurposeReplication adds the purposeReplication to the get remote clusters params -func (o *GetRemoteClustersParams) WithPurposeReplication(purposeReplication *bool) *GetRemoteClustersParams { - o.SetPurposeReplication(purposeReplication) - return o -} - -// SetPurposeReplication adds the purposeReplication to the get remote clusters params -func (o *GetRemoteClustersParams) SetPurposeReplication(purposeReplication *bool) { - o.PurposeReplication = purposeReplication -} - -// WithVerifyReverseRegistration adds the verifyReverseRegistration to the get remote clusters params -func (o *GetRemoteClustersParams) WithVerifyReverseRegistration(verifyReverseRegistration *bool) *GetRemoteClustersParams { - o.SetVerifyReverseRegistration(verifyReverseRegistration) - return o -} - -// SetVerifyReverseRegistration adds the verifyReverseRegistration to the get remote clusters params -func (o *GetRemoteClustersParams) SetVerifyReverseRegistration(verifyReverseRegistration *bool) { - o.VerifyReverseRegistration = verifyReverseRegistration -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterIds != nil { - - // binding items for clusterIds - joinedClusterIds := o.bindParamClusterIds(reg) - - // query array param clusterIds - if err := r.SetQueryParam("clusterIds", joinedClusterIds...); err != nil { - return err - } - } - - if o.ClusterNames != nil { - - // binding items for clusterNames - joinedClusterNames := o.bindParamClusterNames(reg) - - // query array param clusterNames - if err := r.SetQueryParam("clusterNames", joinedClusterNames...); err != nil { - return err - } - } - - if o.PurposeRemoteAccess != nil { - - // query param purposeRemoteAccess - var qrPurposeRemoteAccess bool - - if o.PurposeRemoteAccess != nil { - qrPurposeRemoteAccess = *o.PurposeRemoteAccess - } - qPurposeRemoteAccess := swag.FormatBool(qrPurposeRemoteAccess) - if qPurposeRemoteAccess != "" { - - if err := r.SetQueryParam("purposeRemoteAccess", qPurposeRemoteAccess); err != nil { - return err - } - } - } - - if o.PurposeReplication != nil { - - // query param purposeReplication - var qrPurposeReplication bool - - if o.PurposeReplication != nil { - qrPurposeReplication = *o.PurposeReplication - } - qPurposeReplication := swag.FormatBool(qrPurposeReplication) - if qPurposeReplication != "" { - - if err := r.SetQueryParam("purposeReplication", qPurposeReplication); err != nil { - return err - } - } - } - - if o.VerifyReverseRegistration != nil { - - // query param verifyReverseRegistration - var qrVerifyReverseRegistration bool - - if o.VerifyReverseRegistration != nil { - qrVerifyReverseRegistration = *o.VerifyReverseRegistration - } - qVerifyReverseRegistration := swag.FormatBool(qrVerifyReverseRegistration) - if qVerifyReverseRegistration != "" { - - if err := r.SetQueryParam("verifyReverseRegistration", qVerifyReverseRegistration); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRemoteClusters binds the parameter clusterIds -func (o *GetRemoteClustersParams) bindParamClusterIds(formats strfmt.Registry) []string { - clusterIdsIR := o.ClusterIds - - var clusterIdsIC []string - for _, clusterIdsIIR := range clusterIdsIR { // explode []int64 - - clusterIdsIIV := swag.FormatInt64(clusterIdsIIR) // int64 as string - clusterIdsIC = append(clusterIdsIC, clusterIdsIIV) - } - - // items.CollectionFormat: "" - clusterIdsIS := swag.JoinByFormat(clusterIdsIC, "") - - return clusterIdsIS -} - -// bindParamGetRemoteClusters binds the parameter clusterNames -func (o *GetRemoteClustersParams) bindParamClusterNames(formats strfmt.Registry) []string { - clusterNamesIR := o.ClusterNames - - var clusterNamesIC []string - for _, clusterNamesIIR := range clusterNamesIR { // explode []string - - clusterNamesIIV := clusterNamesIIR // string as string - clusterNamesIC = append(clusterNamesIC, clusterNamesIIV) - } - - // items.CollectionFormat: "" - clusterNamesIS := swag.JoinByFormat(clusterNamesIC, "") - - return clusterNamesIS -} diff --git a/v1/client/remote_cluster/get_remote_clusters_responses.go b/v1/client/remote_cluster/get_remote_clusters_responses.go deleted file mode 100644 index 24065e86..00000000 --- a/v1/client/remote_cluster/get_remote_clusters_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRemoteClustersReader is a Reader for the GetRemoteClusters structure. -type GetRemoteClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteClustersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteClustersDefault(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 - } -} - -// NewGetRemoteClustersOK creates a GetRemoteClustersOK with default headers values -func NewGetRemoteClustersOK() *GetRemoteClustersOK { - return &GetRemoteClustersOK{} -} - -/* -GetRemoteClustersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteClustersOK struct { - Payload []*models.RemoteCluster -} - -// IsSuccess returns true when this get remote clusters o k response has a 2xx status code -func (o *GetRemoteClustersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote clusters o k response has a 3xx status code -func (o *GetRemoteClustersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote clusters o k response has a 4xx status code -func (o *GetRemoteClustersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote clusters o k response has a 5xx status code -func (o *GetRemoteClustersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote clusters o k response a status code equal to that given -func (o *GetRemoteClustersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote clusters o k response -func (o *GetRemoteClustersOK) Code() int { - return 200 -} - -func (o *GetRemoteClustersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters][%d] getRemoteClustersOK %s", 200, payload) -} - -func (o *GetRemoteClustersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters][%d] getRemoteClustersOK %s", 200, payload) -} - -func (o *GetRemoteClustersOK) GetPayload() []*models.RemoteCluster { - return o.Payload -} - -func (o *GetRemoteClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteClustersDefault creates a GetRemoteClustersDefault with default headers values -func NewGetRemoteClustersDefault(code int) *GetRemoteClustersDefault { - return &GetRemoteClustersDefault{ - _statusCode: code, - } -} - -/* -GetRemoteClustersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteClustersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get remote clusters default response has a 2xx status code -func (o *GetRemoteClustersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote clusters default response has a 3xx status code -func (o *GetRemoteClustersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote clusters default response has a 4xx status code -func (o *GetRemoteClustersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote clusters default response has a 5xx status code -func (o *GetRemoteClustersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote clusters default response a status code equal to that given -func (o *GetRemoteClustersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote clusters default response -func (o *GetRemoteClustersDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteClustersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters][%d] GetRemoteClusters default %s", o._statusCode, payload) -} - -func (o *GetRemoteClustersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteClusters][%d] GetRemoteClusters default %s", o._statusCode, payload) -} - -func (o *GetRemoteClustersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRemoteClustersDefault) 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/remote_cluster/get_replication_encryption_key_parameters.go b/v1/client/remote_cluster/get_replication_encryption_key_parameters.go deleted file mode 100644 index 41a0fab3..00000000 --- a/v1/client/remote_cluster/get_replication_encryption_key_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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" -) - -// NewGetReplicationEncryptionKeyParams creates a new GetReplicationEncryptionKeyParams 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 NewGetReplicationEncryptionKeyParams() *GetReplicationEncryptionKeyParams { - return &GetReplicationEncryptionKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReplicationEncryptionKeyParamsWithTimeout creates a new GetReplicationEncryptionKeyParams object -// with the ability to set a timeout on a request. -func NewGetReplicationEncryptionKeyParamsWithTimeout(timeout time.Duration) *GetReplicationEncryptionKeyParams { - return &GetReplicationEncryptionKeyParams{ - timeout: timeout, - } -} - -// NewGetReplicationEncryptionKeyParamsWithContext creates a new GetReplicationEncryptionKeyParams object -// with the ability to set a context for a request. -func NewGetReplicationEncryptionKeyParamsWithContext(ctx context.Context) *GetReplicationEncryptionKeyParams { - return &GetReplicationEncryptionKeyParams{ - Context: ctx, - } -} - -// NewGetReplicationEncryptionKeyParamsWithHTTPClient creates a new GetReplicationEncryptionKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReplicationEncryptionKeyParamsWithHTTPClient(client *http.Client) *GetReplicationEncryptionKeyParams { - return &GetReplicationEncryptionKeyParams{ - HTTPClient: client, - } -} - -/* -GetReplicationEncryptionKeyParams contains all the parameters to send to the API endpoint - - for the get replication encryption key operation. - - Typically these are written to a http.Request. -*/ -type GetReplicationEncryptionKeyParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get replication encryption key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReplicationEncryptionKeyParams) WithDefaults() *GetReplicationEncryptionKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get replication encryption key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReplicationEncryptionKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) WithTimeout(timeout time.Duration) *GetReplicationEncryptionKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) WithContext(ctx context.Context) *GetReplicationEncryptionKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) WithHTTPClient(client *http.Client) *GetReplicationEncryptionKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get replication encryption key params -func (o *GetReplicationEncryptionKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReplicationEncryptionKeyParams) 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/remote_cluster/get_replication_encryption_key_responses.go b/v1/client/remote_cluster/get_replication_encryption_key_responses.go deleted file mode 100644 index b6a2558b..00000000 --- a/v1/client/remote_cluster/get_replication_encryption_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetReplicationEncryptionKeyReader is a Reader for the GetReplicationEncryptionKey structure. -type GetReplicationEncryptionKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReplicationEncryptionKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReplicationEncryptionKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetReplicationEncryptionKeyDefault(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 - } -} - -// NewGetReplicationEncryptionKeyOK creates a GetReplicationEncryptionKeyOK with default headers values -func NewGetReplicationEncryptionKeyOK() *GetReplicationEncryptionKeyOK { - return &GetReplicationEncryptionKeyOK{} -} - -/* -GetReplicationEncryptionKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type GetReplicationEncryptionKeyOK struct { - Payload *models.ReplicationEncryptionKeyReponse -} - -// IsSuccess returns true when this get replication encryption key o k response has a 2xx status code -func (o *GetReplicationEncryptionKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get replication encryption key o k response has a 3xx status code -func (o *GetReplicationEncryptionKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get replication encryption key o k response has a 4xx status code -func (o *GetReplicationEncryptionKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get replication encryption key o k response has a 5xx status code -func (o *GetReplicationEncryptionKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get replication encryption key o k response a status code equal to that given -func (o *GetReplicationEncryptionKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get replication encryption key o k response -func (o *GetReplicationEncryptionKeyOK) Code() int { - return 200 -} - -func (o *GetReplicationEncryptionKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/replicationEncryptionKey][%d] getReplicationEncryptionKeyOK %s", 200, payload) -} - -func (o *GetReplicationEncryptionKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/replicationEncryptionKey][%d] getReplicationEncryptionKeyOK %s", 200, payload) -} - -func (o *GetReplicationEncryptionKeyOK) GetPayload() *models.ReplicationEncryptionKeyReponse { - return o.Payload -} - -func (o *GetReplicationEncryptionKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReplicationEncryptionKeyReponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetReplicationEncryptionKeyDefault creates a GetReplicationEncryptionKeyDefault with default headers values -func NewGetReplicationEncryptionKeyDefault(code int) *GetReplicationEncryptionKeyDefault { - return &GetReplicationEncryptionKeyDefault{ - _statusCode: code, - } -} - -/* -GetReplicationEncryptionKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetReplicationEncryptionKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get replication encryption key default response has a 2xx status code -func (o *GetReplicationEncryptionKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get replication encryption key default response has a 3xx status code -func (o *GetReplicationEncryptionKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get replication encryption key default response has a 4xx status code -func (o *GetReplicationEncryptionKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get replication encryption key default response has a 5xx status code -func (o *GetReplicationEncryptionKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get replication encryption key default response a status code equal to that given -func (o *GetReplicationEncryptionKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get replication encryption key default response -func (o *GetReplicationEncryptionKeyDefault) Code() int { - return o._statusCode -} - -func (o *GetReplicationEncryptionKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/replicationEncryptionKey][%d] GetReplicationEncryptionKey default %s", o._statusCode, payload) -} - -func (o *GetReplicationEncryptionKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/replicationEncryptionKey][%d] GetReplicationEncryptionKey default %s", o._statusCode, payload) -} - -func (o *GetReplicationEncryptionKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetReplicationEncryptionKeyDefault) 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/remote_cluster/remote_cluster_client.go b/v1/client/remote_cluster/remote_cluster_client.go deleted file mode 100644 index 083da6e8..00000000 --- a/v1/client/remote_cluster/remote_cluster_client.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new remote cluster API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new remote cluster API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new remote cluster API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for remote cluster API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateRemoteCluster(params *CreateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteClusterCreated, error) - - DeleteRemoteCluster(params *DeleteRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteClusterNoContent, error) - - GetRemoteClusterByID(params *GetRemoteClusterByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClusterByIDOK, error) - - GetRemoteClusters(params *GetRemoteClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClustersOK, error) - - GetReplicationEncryptionKey(params *GetReplicationEncryptionKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReplicationEncryptionKeyOK, error) - - UpdateRemoteCluster(params *UpdateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateRemoteCluster registers a remote cluster on this local cluster for replication - - For a Protection Job to replicate Snapshots from one Cluster - -to another Cluster, the Clusters must be paired together by -registering each Cluster on the other Cluster. -For example, Cluster A must be registered on Cluster B -and Cluster B must be registered on Cluster A. -*/ -func (a *Client) CreateRemoteCluster(params *CreateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteClusterCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRemoteCluster", - Method: "POST", - PathPattern: "/public/remoteClusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRemoteClusterReader{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.(*CreateRemoteClusterCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRemoteClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteRemoteCluster deletes a remote cluster registration connection - - Delete the specified remote Cluster registration connection - -on this Cluster. -*/ -func (a *Client) DeleteRemoteCluster(params *DeleteRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteClusterNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRemoteCluster", - Method: "DELETE", - PathPattern: "/public/remoteClusters/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRemoteClusterReader{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.(*DeleteRemoteClusterNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRemoteClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRemoteClusterByID lists details about a single remote cluster registered on this local cluster - - Returns the details about the remote Cluster with the specified Cluster id - -that is registered on this local Cluster. -*/ -func (a *Client) GetRemoteClusterByID(params *GetRemoteClusterByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClusterByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteClusterByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteClusterById", - Method: "GET", - PathPattern: "/public/remoteClusters/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteClusterByIDReader{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.(*GetRemoteClusterByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteClusterByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRemoteClusters lists the remote cohesity clusters that are registered on this local cohesity cluster that match the filter criteria specified using parameters - - Cohesity Clusters involved in replication, must be registered to each other. - -For example, if Cluster A is replicating Snapshots to Cluster B, Cluster -B must be registered on Cluster A and Cluster B must be registered -on Cluster A. -*/ -func (a *Client) GetRemoteClusters(params *GetRemoteClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClustersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteClustersParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteClusters", - Method: "GET", - PathPattern: "/public/remoteClusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteClustersReader{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.(*GetRemoteClustersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetReplicationEncryptionKey gets the encryption key on this cluster - - Get the encryption key that is used for encrypting replication data - -between this Cluster and a remote Cluster. -*/ -func (a *Client) GetReplicationEncryptionKey(params *GetReplicationEncryptionKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReplicationEncryptionKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetReplicationEncryptionKeyParams() - } - op := &runtime.ClientOperation{ - ID: "GetReplicationEncryptionKey", - Method: "GET", - PathPattern: "/public/replicationEncryptionKey", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetReplicationEncryptionKeyReader{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.(*GetReplicationEncryptionKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetReplicationEncryptionKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateRemoteCluster updates the connection settings of the registered remote cluster - - Update the connection settings of the specified remote Cluster that is - -registered on this Cluster. -*/ -func (a *Client) UpdateRemoteCluster(params *UpdateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRemoteCluster", - Method: "PUT", - PathPattern: "/public/remoteClusters/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRemoteClusterReader{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.(*UpdateRemoteClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRemoteClusterDefault) - 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/remote_cluster/update_remote_cluster_parameters.go b/v1/client/remote_cluster/update_remote_cluster_parameters.go deleted file mode 100644 index 92c886ad..00000000 --- a/v1/client/remote_cluster/update_remote_cluster_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateRemoteClusterParams creates a new UpdateRemoteClusterParams 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 NewUpdateRemoteClusterParams() *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRemoteClusterParamsWithTimeout creates a new UpdateRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewUpdateRemoteClusterParamsWithTimeout(timeout time.Duration) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - timeout: timeout, - } -} - -// NewUpdateRemoteClusterParamsWithContext creates a new UpdateRemoteClusterParams object -// with the ability to set a context for a request. -func NewUpdateRemoteClusterParamsWithContext(ctx context.Context) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - Context: ctx, - } -} - -// NewUpdateRemoteClusterParamsWithHTTPClient creates a new UpdateRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRemoteClusterParamsWithHTTPClient(client *http.Client) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -UpdateRemoteClusterParams contains all the parameters to send to the API endpoint - - for the update remote cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdateRemoteClusterParams struct { - - /* Body. - - Request to update a remote Cluster. - */ - Body *models.RegisterRemoteCluster - - /* ID. - - id of the remote Cluster - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteClusterParams) WithDefaults() *UpdateRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithTimeout(timeout time.Duration) *UpdateRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithContext(ctx context.Context) *UpdateRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithHTTPClient(client *http.Client) *UpdateRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithBody(body *models.RegisterRemoteCluster) *UpdateRemoteClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetBody(body *models.RegisterRemoteCluster) { - o.Body = body -} - -// WithID adds the id to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithID(id int64) *UpdateRemoteClusterParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRemoteClusterParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_cluster/update_remote_cluster_responses.go b/v1/client/remote_cluster/update_remote_cluster_responses.go deleted file mode 100644 index c1b44286..00000000 --- a/v1/client/remote_cluster/update_remote_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_cluster - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateRemoteClusterReader is a Reader for the UpdateRemoteCluster structure. -type UpdateRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRemoteClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRemoteClusterDefault(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 - } -} - -// NewUpdateRemoteClusterOK creates a UpdateRemoteClusterOK with default headers values -func NewUpdateRemoteClusterOK() *UpdateRemoteClusterOK { - return &UpdateRemoteClusterOK{} -} - -/* -UpdateRemoteClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRemoteClusterOK struct { - Payload *models.RemoteCluster -} - -// IsSuccess returns true when this update remote cluster o k response has a 2xx status code -func (o *UpdateRemoteClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update remote cluster o k response has a 3xx status code -func (o *UpdateRemoteClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update remote cluster o k response has a 4xx status code -func (o *UpdateRemoteClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update remote cluster o k response has a 5xx status code -func (o *UpdateRemoteClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update remote cluster o k response a status code equal to that given -func (o *UpdateRemoteClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update remote cluster o k response -func (o *UpdateRemoteClusterOK) Code() int { - return 200 -} - -func (o *UpdateRemoteClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteClusters/{id}][%d] updateRemoteClusterOK %s", 200, payload) -} - -func (o *UpdateRemoteClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteClusters/{id}][%d] updateRemoteClusterOK %s", 200, payload) -} - -func (o *UpdateRemoteClusterOK) GetPayload() *models.RemoteCluster { - return o.Payload -} - -func (o *UpdateRemoteClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteCluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRemoteClusterDefault creates a UpdateRemoteClusterDefault with default headers values -func NewUpdateRemoteClusterDefault(code int) *UpdateRemoteClusterDefault { - return &UpdateRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -UpdateRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRemoteClusterDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update remote cluster default response has a 2xx status code -func (o *UpdateRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update remote cluster default response has a 3xx status code -func (o *UpdateRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update remote cluster default response has a 4xx status code -func (o *UpdateRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update remote cluster default response has a 5xx status code -func (o *UpdateRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update remote cluster default response a status code equal to that given -func (o *UpdateRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update remote cluster default response -func (o *UpdateRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteClusters/{id}][%d] UpdateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteClusters/{id}][%d] UpdateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteClusterDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateRemoteClusterDefault) 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/remote_restore/create_cloud_domain_migration_request_parameters.go b/v1/client/remote_restore/create_cloud_domain_migration_request_parameters.go deleted file mode 100644 index aa4d311f..00000000 --- a/v1/client/remote_restore/create_cloud_domain_migration_request_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateCloudDomainMigrationRequestParams creates a new CreateCloudDomainMigrationRequestParams 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 NewCreateCloudDomainMigrationRequestParams() *CreateCloudDomainMigrationRequestParams { - return &CreateCloudDomainMigrationRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCloudDomainMigrationRequestParamsWithTimeout creates a new CreateCloudDomainMigrationRequestParams object -// with the ability to set a timeout on a request. -func NewCreateCloudDomainMigrationRequestParamsWithTimeout(timeout time.Duration) *CreateCloudDomainMigrationRequestParams { - return &CreateCloudDomainMigrationRequestParams{ - timeout: timeout, - } -} - -// NewCreateCloudDomainMigrationRequestParamsWithContext creates a new CreateCloudDomainMigrationRequestParams object -// with the ability to set a context for a request. -func NewCreateCloudDomainMigrationRequestParamsWithContext(ctx context.Context) *CreateCloudDomainMigrationRequestParams { - return &CreateCloudDomainMigrationRequestParams{ - Context: ctx, - } -} - -// NewCreateCloudDomainMigrationRequestParamsWithHTTPClient creates a new CreateCloudDomainMigrationRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCloudDomainMigrationRequestParamsWithHTTPClient(client *http.Client) *CreateCloudDomainMigrationRequestParams { - return &CreateCloudDomainMigrationRequestParams{ - HTTPClient: client, - } -} - -/* -CreateCloudDomainMigrationRequestParams contains all the parameters to send to the API endpoint - - for the create cloud domain migration request operation. - - Typically these are written to a http.Request. -*/ -type CreateCloudDomainMigrationRequestParams struct { - - /* Body. - - Request to schedule a cloud domain migration task. - */ - Body *models.CreateCloudDomainMigrationParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create cloud domain migration request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudDomainMigrationRequestParams) WithDefaults() *CreateCloudDomainMigrationRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create cloud domain migration request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudDomainMigrationRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) WithTimeout(timeout time.Duration) *CreateCloudDomainMigrationRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) WithContext(ctx context.Context) *CreateCloudDomainMigrationRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) WithHTTPClient(client *http.Client) *CreateCloudDomainMigrationRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) WithBody(body *models.CreateCloudDomainMigrationParameters) *CreateCloudDomainMigrationRequestParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create cloud domain migration request params -func (o *CreateCloudDomainMigrationRequestParams) SetBody(body *models.CreateCloudDomainMigrationParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCloudDomainMigrationRequestParams) 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/remote_restore/create_cloud_domain_migration_request_responses.go b/v1/client/remote_restore/create_cloud_domain_migration_request_responses.go deleted file mode 100644 index f6ecc766..00000000 --- a/v1/client/remote_restore/create_cloud_domain_migration_request_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateCloudDomainMigrationRequestReader is a Reader for the CreateCloudDomainMigrationRequest structure. -type CreateCloudDomainMigrationRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCloudDomainMigrationRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCreateCloudDomainMigrationRequestNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCloudDomainMigrationRequestDefault(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 - } -} - -// NewCreateCloudDomainMigrationRequestNoContent creates a CreateCloudDomainMigrationRequestNoContent with default headers values -func NewCreateCloudDomainMigrationRequestNoContent() *CreateCloudDomainMigrationRequestNoContent { - return &CreateCloudDomainMigrationRequestNoContent{} -} - -/* -CreateCloudDomainMigrationRequestNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CreateCloudDomainMigrationRequestNoContent struct { -} - -// IsSuccess returns true when this create cloud domain migration request no content response has a 2xx status code -func (o *CreateCloudDomainMigrationRequestNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create cloud domain migration request no content response has a 3xx status code -func (o *CreateCloudDomainMigrationRequestNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create cloud domain migration request no content response has a 4xx status code -func (o *CreateCloudDomainMigrationRequestNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this create cloud domain migration request no content response has a 5xx status code -func (o *CreateCloudDomainMigrationRequestNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this create cloud domain migration request no content response a status code equal to that given -func (o *CreateCloudDomainMigrationRequestNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the create cloud domain migration request no content response -func (o *CreateCloudDomainMigrationRequestNoContent) Code() int { - return 204 -} - -func (o *CreateCloudDomainMigrationRequestNoContent) Error() string { - return fmt.Sprintf("[POST /public/remoteVaults/cloudDomainMigration][%d] createCloudDomainMigrationRequestNoContent", 204) -} - -func (o *CreateCloudDomainMigrationRequestNoContent) String() string { - return fmt.Sprintf("[POST /public/remoteVaults/cloudDomainMigration][%d] createCloudDomainMigrationRequestNoContent", 204) -} - -func (o *CreateCloudDomainMigrationRequestNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCreateCloudDomainMigrationRequestDefault creates a CreateCloudDomainMigrationRequestDefault with default headers values -func NewCreateCloudDomainMigrationRequestDefault(code int) *CreateCloudDomainMigrationRequestDefault { - return &CreateCloudDomainMigrationRequestDefault{ - _statusCode: code, - } -} - -/* -CreateCloudDomainMigrationRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCloudDomainMigrationRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create cloud domain migration request default response has a 2xx status code -func (o *CreateCloudDomainMigrationRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create cloud domain migration request default response has a 3xx status code -func (o *CreateCloudDomainMigrationRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create cloud domain migration request default response has a 4xx status code -func (o *CreateCloudDomainMigrationRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create cloud domain migration request default response has a 5xx status code -func (o *CreateCloudDomainMigrationRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create cloud domain migration request default response a status code equal to that given -func (o *CreateCloudDomainMigrationRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create cloud domain migration request default response -func (o *CreateCloudDomainMigrationRequestDefault) Code() int { - return o._statusCode -} - -func (o *CreateCloudDomainMigrationRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/cloudDomainMigration][%d] CreateCloudDomainMigrationRequest default %s", o._statusCode, payload) -} - -func (o *CreateCloudDomainMigrationRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/cloudDomainMigration][%d] CreateCloudDomainMigrationRequest default %s", o._statusCode, payload) -} - -func (o *CreateCloudDomainMigrationRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateCloudDomainMigrationRequestDefault) 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/remote_restore/create_remote_vault_restore_task_parameters.go b/v1/client/remote_restore/create_remote_vault_restore_task_parameters.go deleted file mode 100644 index dcd3ada3..00000000 --- a/v1/client/remote_restore/create_remote_vault_restore_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRemoteVaultRestoreTaskParams creates a new CreateRemoteVaultRestoreTaskParams 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 NewCreateRemoteVaultRestoreTaskParams() *CreateRemoteVaultRestoreTaskParams { - return &CreateRemoteVaultRestoreTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRemoteVaultRestoreTaskParamsWithTimeout creates a new CreateRemoteVaultRestoreTaskParams object -// with the ability to set a timeout on a request. -func NewCreateRemoteVaultRestoreTaskParamsWithTimeout(timeout time.Duration) *CreateRemoteVaultRestoreTaskParams { - return &CreateRemoteVaultRestoreTaskParams{ - timeout: timeout, - } -} - -// NewCreateRemoteVaultRestoreTaskParamsWithContext creates a new CreateRemoteVaultRestoreTaskParams object -// with the ability to set a context for a request. -func NewCreateRemoteVaultRestoreTaskParamsWithContext(ctx context.Context) *CreateRemoteVaultRestoreTaskParams { - return &CreateRemoteVaultRestoreTaskParams{ - Context: ctx, - } -} - -// NewCreateRemoteVaultRestoreTaskParamsWithHTTPClient creates a new CreateRemoteVaultRestoreTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRemoteVaultRestoreTaskParamsWithHTTPClient(client *http.Client) *CreateRemoteVaultRestoreTaskParams { - return &CreateRemoteVaultRestoreTaskParams{ - HTTPClient: client, - } -} - -/* -CreateRemoteVaultRestoreTaskParams contains all the parameters to send to the API endpoint - - for the create remote vault restore task operation. - - Typically these are written to a http.Request. -*/ -type CreateRemoteVaultRestoreTaskParams struct { - - /* Body. - - Request to create a remote Vault restore task. - */ - Body *models.CreateRemoteVaultRestoreTaskParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create remote vault restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteVaultRestoreTaskParams) WithDefaults() *CreateRemoteVaultRestoreTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create remote vault restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteVaultRestoreTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) WithTimeout(timeout time.Duration) *CreateRemoteVaultRestoreTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) WithContext(ctx context.Context) *CreateRemoteVaultRestoreTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) WithHTTPClient(client *http.Client) *CreateRemoteVaultRestoreTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) WithBody(body *models.CreateRemoteVaultRestoreTaskParameters) *CreateRemoteVaultRestoreTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create remote vault restore task params -func (o *CreateRemoteVaultRestoreTaskParams) SetBody(body *models.CreateRemoteVaultRestoreTaskParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRemoteVaultRestoreTaskParams) 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/remote_restore/create_remote_vault_restore_task_responses.go b/v1/client/remote_restore/create_remote_vault_restore_task_responses.go deleted file mode 100644 index 98b91a18..00000000 --- a/v1/client/remote_restore/create_remote_vault_restore_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRemoteVaultRestoreTaskReader is a Reader for the CreateRemoteVaultRestoreTask structure. -type CreateRemoteVaultRestoreTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRemoteVaultRestoreTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRemoteVaultRestoreTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRemoteVaultRestoreTaskDefault(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 - } -} - -// NewCreateRemoteVaultRestoreTaskCreated creates a CreateRemoteVaultRestoreTaskCreated with default headers values -func NewCreateRemoteVaultRestoreTaskCreated() *CreateRemoteVaultRestoreTaskCreated { - return &CreateRemoteVaultRestoreTaskCreated{} -} - -/* -CreateRemoteVaultRestoreTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRemoteVaultRestoreTaskCreated struct { - Payload *models.UniversalID -} - -// IsSuccess returns true when this create remote vault restore task created response has a 2xx status code -func (o *CreateRemoteVaultRestoreTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create remote vault restore task created response has a 3xx status code -func (o *CreateRemoteVaultRestoreTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create remote vault restore task created response has a 4xx status code -func (o *CreateRemoteVaultRestoreTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create remote vault restore task created response has a 5xx status code -func (o *CreateRemoteVaultRestoreTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create remote vault restore task created response a status code equal to that given -func (o *CreateRemoteVaultRestoreTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create remote vault restore task created response -func (o *CreateRemoteVaultRestoreTaskCreated) Code() int { - return 201 -} - -func (o *CreateRemoteVaultRestoreTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/restoreTasks][%d] createRemoteVaultRestoreTaskCreated %s", 201, payload) -} - -func (o *CreateRemoteVaultRestoreTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/restoreTasks][%d] createRemoteVaultRestoreTaskCreated %s", 201, payload) -} - -func (o *CreateRemoteVaultRestoreTaskCreated) GetPayload() *models.UniversalID { - return o.Payload -} - -func (o *CreateRemoteVaultRestoreTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UniversalID) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRemoteVaultRestoreTaskDefault creates a CreateRemoteVaultRestoreTaskDefault with default headers values -func NewCreateRemoteVaultRestoreTaskDefault(code int) *CreateRemoteVaultRestoreTaskDefault { - return &CreateRemoteVaultRestoreTaskDefault{ - _statusCode: code, - } -} - -/* -CreateRemoteVaultRestoreTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRemoteVaultRestoreTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create remote vault restore task default response has a 2xx status code -func (o *CreateRemoteVaultRestoreTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create remote vault restore task default response has a 3xx status code -func (o *CreateRemoteVaultRestoreTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create remote vault restore task default response has a 4xx status code -func (o *CreateRemoteVaultRestoreTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create remote vault restore task default response has a 5xx status code -func (o *CreateRemoteVaultRestoreTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create remote vault restore task default response a status code equal to that given -func (o *CreateRemoteVaultRestoreTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create remote vault restore task default response -func (o *CreateRemoteVaultRestoreTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateRemoteVaultRestoreTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/restoreTasks][%d] CreateRemoteVaultRestoreTask default %s", o._statusCode, payload) -} - -func (o *CreateRemoteVaultRestoreTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/restoreTasks][%d] CreateRemoteVaultRestoreTask default %s", o._statusCode, payload) -} - -func (o *CreateRemoteVaultRestoreTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRemoteVaultRestoreTaskDefault) 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/remote_restore/create_remote_vault_search_job_parameters.go b/v1/client/remote_restore/create_remote_vault_search_job_parameters.go deleted file mode 100644 index 6785e443..00000000 --- a/v1/client/remote_restore/create_remote_vault_search_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRemoteVaultSearchJobParams creates a new CreateRemoteVaultSearchJobParams 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 NewCreateRemoteVaultSearchJobParams() *CreateRemoteVaultSearchJobParams { - return &CreateRemoteVaultSearchJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRemoteVaultSearchJobParamsWithTimeout creates a new CreateRemoteVaultSearchJobParams object -// with the ability to set a timeout on a request. -func NewCreateRemoteVaultSearchJobParamsWithTimeout(timeout time.Duration) *CreateRemoteVaultSearchJobParams { - return &CreateRemoteVaultSearchJobParams{ - timeout: timeout, - } -} - -// NewCreateRemoteVaultSearchJobParamsWithContext creates a new CreateRemoteVaultSearchJobParams object -// with the ability to set a context for a request. -func NewCreateRemoteVaultSearchJobParamsWithContext(ctx context.Context) *CreateRemoteVaultSearchJobParams { - return &CreateRemoteVaultSearchJobParams{ - Context: ctx, - } -} - -// NewCreateRemoteVaultSearchJobParamsWithHTTPClient creates a new CreateRemoteVaultSearchJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRemoteVaultSearchJobParamsWithHTTPClient(client *http.Client) *CreateRemoteVaultSearchJobParams { - return &CreateRemoteVaultSearchJobParams{ - HTTPClient: client, - } -} - -/* -CreateRemoteVaultSearchJobParams contains all the parameters to send to the API endpoint - - for the create remote vault search job operation. - - Typically these are written to a http.Request. -*/ -type CreateRemoteVaultSearchJobParams struct { - - /* Body. - - Request to create a search of a remote Vault. - */ - Body *models.CreateRemoteVaultSearchJobParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create remote vault search job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteVaultSearchJobParams) WithDefaults() *CreateRemoteVaultSearchJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create remote vault search job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRemoteVaultSearchJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) WithTimeout(timeout time.Duration) *CreateRemoteVaultSearchJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) WithContext(ctx context.Context) *CreateRemoteVaultSearchJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) WithHTTPClient(client *http.Client) *CreateRemoteVaultSearchJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) WithBody(body *models.CreateRemoteVaultSearchJobParameters) *CreateRemoteVaultSearchJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create remote vault search job params -func (o *CreateRemoteVaultSearchJobParams) SetBody(body *models.CreateRemoteVaultSearchJobParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRemoteVaultSearchJobParams) 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/remote_restore/create_remote_vault_search_job_responses.go b/v1/client/remote_restore/create_remote_vault_search_job_responses.go deleted file mode 100644 index 6b71d49a..00000000 --- a/v1/client/remote_restore/create_remote_vault_search_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRemoteVaultSearchJobReader is a Reader for the CreateRemoteVaultSearchJob structure. -type CreateRemoteVaultSearchJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRemoteVaultSearchJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRemoteVaultSearchJobCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRemoteVaultSearchJobDefault(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 - } -} - -// NewCreateRemoteVaultSearchJobCreated creates a CreateRemoteVaultSearchJobCreated with default headers values -func NewCreateRemoteVaultSearchJobCreated() *CreateRemoteVaultSearchJobCreated { - return &CreateRemoteVaultSearchJobCreated{} -} - -/* -CreateRemoteVaultSearchJobCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRemoteVaultSearchJobCreated struct { - Payload *models.CreatedRemoteVaultSearchJobUID -} - -// IsSuccess returns true when this create remote vault search job created response has a 2xx status code -func (o *CreateRemoteVaultSearchJobCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create remote vault search job created response has a 3xx status code -func (o *CreateRemoteVaultSearchJobCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create remote vault search job created response has a 4xx status code -func (o *CreateRemoteVaultSearchJobCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create remote vault search job created response has a 5xx status code -func (o *CreateRemoteVaultSearchJobCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create remote vault search job created response a status code equal to that given -func (o *CreateRemoteVaultSearchJobCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create remote vault search job created response -func (o *CreateRemoteVaultSearchJobCreated) Code() int { - return 201 -} - -func (o *CreateRemoteVaultSearchJobCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/searchJobs][%d] createRemoteVaultSearchJobCreated %s", 201, payload) -} - -func (o *CreateRemoteVaultSearchJobCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/searchJobs][%d] createRemoteVaultSearchJobCreated %s", 201, payload) -} - -func (o *CreateRemoteVaultSearchJobCreated) GetPayload() *models.CreatedRemoteVaultSearchJobUID { - return o.Payload -} - -func (o *CreateRemoteVaultSearchJobCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedRemoteVaultSearchJobUID) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRemoteVaultSearchJobDefault creates a CreateRemoteVaultSearchJobDefault with default headers values -func NewCreateRemoteVaultSearchJobDefault(code int) *CreateRemoteVaultSearchJobDefault { - return &CreateRemoteVaultSearchJobDefault{ - _statusCode: code, - } -} - -/* -CreateRemoteVaultSearchJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRemoteVaultSearchJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create remote vault search job default response has a 2xx status code -func (o *CreateRemoteVaultSearchJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create remote vault search job default response has a 3xx status code -func (o *CreateRemoteVaultSearchJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create remote vault search job default response has a 4xx status code -func (o *CreateRemoteVaultSearchJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create remote vault search job default response has a 5xx status code -func (o *CreateRemoteVaultSearchJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create remote vault search job default response a status code equal to that given -func (o *CreateRemoteVaultSearchJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create remote vault search job default response -func (o *CreateRemoteVaultSearchJobDefault) Code() int { - return o._statusCode -} - -func (o *CreateRemoteVaultSearchJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/searchJobs][%d] CreateRemoteVaultSearchJob default %s", o._statusCode, payload) -} - -func (o *CreateRemoteVaultSearchJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/remoteVaults/searchJobs][%d] CreateRemoteVaultSearchJob default %s", o._statusCode, payload) -} - -func (o *CreateRemoteVaultSearchJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRemoteVaultSearchJobDefault) 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/remote_restore/get_remote_vault_search_job_results_parameters.go b/v1/client/remote_restore/get_remote_vault_search_job_results_parameters.go deleted file mode 100644 index c543b914..00000000 --- a/v1/client/remote_restore/get_remote_vault_search_job_results_parameters.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/go-openapi/swag" -) - -// NewGetRemoteVaultSearchJobResultsParams creates a new GetRemoteVaultSearchJobResultsParams 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 NewGetRemoteVaultSearchJobResultsParams() *GetRemoteVaultSearchJobResultsParams { - return &GetRemoteVaultSearchJobResultsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteVaultSearchJobResultsParamsWithTimeout creates a new GetRemoteVaultSearchJobResultsParams object -// with the ability to set a timeout on a request. -func NewGetRemoteVaultSearchJobResultsParamsWithTimeout(timeout time.Duration) *GetRemoteVaultSearchJobResultsParams { - return &GetRemoteVaultSearchJobResultsParams{ - timeout: timeout, - } -} - -// NewGetRemoteVaultSearchJobResultsParamsWithContext creates a new GetRemoteVaultSearchJobResultsParams object -// with the ability to set a context for a request. -func NewGetRemoteVaultSearchJobResultsParamsWithContext(ctx context.Context) *GetRemoteVaultSearchJobResultsParams { - return &GetRemoteVaultSearchJobResultsParams{ - Context: ctx, - } -} - -// NewGetRemoteVaultSearchJobResultsParamsWithHTTPClient creates a new GetRemoteVaultSearchJobResultsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteVaultSearchJobResultsParamsWithHTTPClient(client *http.Client) *GetRemoteVaultSearchJobResultsParams { - return &GetRemoteVaultSearchJobResultsParams{ - HTTPClient: client, - } -} - -/* -GetRemoteVaultSearchJobResultsParams contains all the parameters to send to the API endpoint - - for the get remote vault search job results operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteVaultSearchJobResultsParams struct { - - /* ClusterID. - - Specifies the Cohesity Cluster id where the search Job was created. - Used in combination with the searchJobId and clusterIncarnationId - to uniquely identify the search Job. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation id of the Cohesity Cluster where the - search Job was created. - Used in combination with the searchJobId and clusterId to uniquely - identify the search Job. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* ClusterName. - - Optionally filter the result by the remote Cohesity Cluster name. - */ - ClusterName *string - - /* Cookie. - - Specifies the opaque string cookie returned by the previous response, to - get next set of results. Used in combination with pageCount to support - pagination. - */ - Cookie *string - - /* PageCount. - - Specifies the number of Protection Jobs to return in the response - to support pagination. - - Format: int32 - */ - PageCount *int32 - - /* SearchJobID. - - Specifies the id of the remote Vault search Job assigned - by the Cohesity Cluster. Used in combination with the clusterId - and clusterIncarnationId to uniquely identify the search Job. - - Format: int64 - */ - SearchJobID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote vault search job results params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteVaultSearchJobResultsParams) WithDefaults() *GetRemoteVaultSearchJobResultsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote vault search job results params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteVaultSearchJobResultsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithTimeout(timeout time.Duration) *GetRemoteVaultSearchJobResultsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithContext(ctx context.Context) *GetRemoteVaultSearchJobResultsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithHTTPClient(client *http.Client) *GetRemoteVaultSearchJobResultsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithClusterID(clusterID int64) *GetRemoteVaultSearchJobResultsParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetRemoteVaultSearchJobResultsParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithClusterName adds the clusterName to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithClusterName(clusterName *string) *GetRemoteVaultSearchJobResultsParams { - o.SetClusterName(clusterName) - return o -} - -// SetClusterName adds the clusterName to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetClusterName(clusterName *string) { - o.ClusterName = clusterName -} - -// WithCookie adds the cookie to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithCookie(cookie *string) *GetRemoteVaultSearchJobResultsParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithPageCount adds the pageCount to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithPageCount(pageCount *int32) *GetRemoteVaultSearchJobResultsParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetPageCount(pageCount *int32) { - o.PageCount = pageCount -} - -// WithSearchJobID adds the searchJobID to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) WithSearchJobID(searchJobID int64) *GetRemoteVaultSearchJobResultsParams { - o.SetSearchJobID(searchJobID) - return o -} - -// SetSearchJobID adds the searchJobId to the get remote vault search job results params -func (o *GetRemoteVaultSearchJobResultsParams) SetSearchJobID(searchJobID int64) { - o.SearchJobID = searchJobID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteVaultSearchJobResultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - if o.ClusterName != nil { - - // query param clusterName - var qrClusterName string - - if o.ClusterName != nil { - qrClusterName = *o.ClusterName - } - qClusterName := qrClusterName - if qClusterName != "" { - - if err := r.SetQueryParam("clusterName", qClusterName); err != nil { - return err - } - } - } - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int32 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt32(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - // query param searchJobId - qrSearchJobID := o.SearchJobID - qSearchJobID := swag.FormatInt64(qrSearchJobID) - if qSearchJobID != "" { - - if err := r.SetQueryParam("searchJobId", qSearchJobID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_restore/get_remote_vault_search_job_results_responses.go b/v1/client/remote_restore/get_remote_vault_search_job_results_responses.go deleted file mode 100644 index 82277497..00000000 --- a/v1/client/remote_restore/get_remote_vault_search_job_results_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRemoteVaultSearchJobResultsReader is a Reader for the GetRemoteVaultSearchJobResults structure. -type GetRemoteVaultSearchJobResultsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteVaultSearchJobResultsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteVaultSearchJobResultsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteVaultSearchJobResultsDefault(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 - } -} - -// NewGetRemoteVaultSearchJobResultsOK creates a GetRemoteVaultSearchJobResultsOK with default headers values -func NewGetRemoteVaultSearchJobResultsOK() *GetRemoteVaultSearchJobResultsOK { - return &GetRemoteVaultSearchJobResultsOK{} -} - -/* -GetRemoteVaultSearchJobResultsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteVaultSearchJobResultsOK struct { - Payload *models.RemoteVaultSearchJobResults -} - -// IsSuccess returns true when this get remote vault search job results o k response has a 2xx status code -func (o *GetRemoteVaultSearchJobResultsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote vault search job results o k response has a 3xx status code -func (o *GetRemoteVaultSearchJobResultsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote vault search job results o k response has a 4xx status code -func (o *GetRemoteVaultSearchJobResultsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote vault search job results o k response has a 5xx status code -func (o *GetRemoteVaultSearchJobResultsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote vault search job results o k response a status code equal to that given -func (o *GetRemoteVaultSearchJobResultsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote vault search job results o k response -func (o *GetRemoteVaultSearchJobResultsOK) Code() int { - return 200 -} - -func (o *GetRemoteVaultSearchJobResultsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobResults][%d] getRemoteVaultSearchJobResultsOK %s", 200, payload) -} - -func (o *GetRemoteVaultSearchJobResultsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobResults][%d] getRemoteVaultSearchJobResultsOK %s", 200, payload) -} - -func (o *GetRemoteVaultSearchJobResultsOK) GetPayload() *models.RemoteVaultSearchJobResults { - return o.Payload -} - -func (o *GetRemoteVaultSearchJobResultsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteVaultSearchJobResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteVaultSearchJobResultsDefault creates a GetRemoteVaultSearchJobResultsDefault with default headers values -func NewGetRemoteVaultSearchJobResultsDefault(code int) *GetRemoteVaultSearchJobResultsDefault { - return &GetRemoteVaultSearchJobResultsDefault{ - _statusCode: code, - } -} - -/* -GetRemoteVaultSearchJobResultsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteVaultSearchJobResultsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get remote vault search job results default response has a 2xx status code -func (o *GetRemoteVaultSearchJobResultsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote vault search job results default response has a 3xx status code -func (o *GetRemoteVaultSearchJobResultsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote vault search job results default response has a 4xx status code -func (o *GetRemoteVaultSearchJobResultsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote vault search job results default response has a 5xx status code -func (o *GetRemoteVaultSearchJobResultsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote vault search job results default response a status code equal to that given -func (o *GetRemoteVaultSearchJobResultsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote vault search job results default response -func (o *GetRemoteVaultSearchJobResultsDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteVaultSearchJobResultsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobResults][%d] GetRemoteVaultSearchJobResults default %s", o._statusCode, payload) -} - -func (o *GetRemoteVaultSearchJobResultsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobResults][%d] GetRemoteVaultSearchJobResults default %s", o._statusCode, payload) -} - -func (o *GetRemoteVaultSearchJobResultsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRemoteVaultSearchJobResultsDefault) 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/remote_restore/list_cloud_domain_migration_parameters.go b/v1/client/remote_restore/list_cloud_domain_migration_parameters.go deleted file mode 100644 index fd6bfa27..00000000 --- a/v1/client/remote_restore/list_cloud_domain_migration_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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" -) - -// NewListCloudDomainMigrationParams creates a new ListCloudDomainMigrationParams 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 NewListCloudDomainMigrationParams() *ListCloudDomainMigrationParams { - return &ListCloudDomainMigrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListCloudDomainMigrationParamsWithTimeout creates a new ListCloudDomainMigrationParams object -// with the ability to set a timeout on a request. -func NewListCloudDomainMigrationParamsWithTimeout(timeout time.Duration) *ListCloudDomainMigrationParams { - return &ListCloudDomainMigrationParams{ - timeout: timeout, - } -} - -// NewListCloudDomainMigrationParamsWithContext creates a new ListCloudDomainMigrationParams object -// with the ability to set a context for a request. -func NewListCloudDomainMigrationParamsWithContext(ctx context.Context) *ListCloudDomainMigrationParams { - return &ListCloudDomainMigrationParams{ - Context: ctx, - } -} - -// NewListCloudDomainMigrationParamsWithHTTPClient creates a new ListCloudDomainMigrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewListCloudDomainMigrationParamsWithHTTPClient(client *http.Client) *ListCloudDomainMigrationParams { - return &ListCloudDomainMigrationParams{ - HTTPClient: client, - } -} - -/* -ListCloudDomainMigrationParams contains all the parameters to send to the API endpoint - - for the list cloud domain migration operation. - - Typically these are written to a http.Request. -*/ -type ListCloudDomainMigrationParams struct { - - /* MigrationUID. - - Specifies the Unique identifier of the domain migration request and can be - used to query the status of the migration. - */ - MigrationUID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list cloud domain migration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListCloudDomainMigrationParams) WithDefaults() *ListCloudDomainMigrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list cloud domain migration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListCloudDomainMigrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) WithTimeout(timeout time.Duration) *ListCloudDomainMigrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) WithContext(ctx context.Context) *ListCloudDomainMigrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) WithHTTPClient(client *http.Client) *ListCloudDomainMigrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMigrationUID adds the migrationUID to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) WithMigrationUID(migrationUID string) *ListCloudDomainMigrationParams { - o.SetMigrationUID(migrationUID) - return o -} - -// SetMigrationUID adds the migrationUid to the list cloud domain migration params -func (o *ListCloudDomainMigrationParams) SetMigrationUID(migrationUID string) { - o.MigrationUID = migrationUID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListCloudDomainMigrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param migrationUid - qrMigrationUID := o.MigrationUID - qMigrationUID := qrMigrationUID - if qMigrationUID != "" { - - if err := r.SetQueryParam("migrationUid", qMigrationUID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_restore/list_cloud_domain_migration_responses.go b/v1/client/remote_restore/list_cloud_domain_migration_responses.go deleted file mode 100644 index 545696b2..00000000 --- a/v1/client/remote_restore/list_cloud_domain_migration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListCloudDomainMigrationReader is a Reader for the ListCloudDomainMigration structure. -type ListCloudDomainMigrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListCloudDomainMigrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListCloudDomainMigrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListCloudDomainMigrationDefault(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 - } -} - -// NewListCloudDomainMigrationOK creates a ListCloudDomainMigrationOK with default headers values -func NewListCloudDomainMigrationOK() *ListCloudDomainMigrationOK { - return &ListCloudDomainMigrationOK{} -} - -/* -ListCloudDomainMigrationOK describes a response with status code 200, with default header values. - -Success -*/ -type ListCloudDomainMigrationOK struct { - Payload *models.CloudDomainMigrationQueryResult -} - -// IsSuccess returns true when this list cloud domain migration o k response has a 2xx status code -func (o *ListCloudDomainMigrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list cloud domain migration o k response has a 3xx status code -func (o *ListCloudDomainMigrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list cloud domain migration o k response has a 4xx status code -func (o *ListCloudDomainMigrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list cloud domain migration o k response has a 5xx status code -func (o *ListCloudDomainMigrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list cloud domain migration o k response a status code equal to that given -func (o *ListCloudDomainMigrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list cloud domain migration o k response -func (o *ListCloudDomainMigrationOK) Code() int { - return 200 -} - -func (o *ListCloudDomainMigrationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/cloudDomainMigration][%d] listCloudDomainMigrationOK %s", 200, payload) -} - -func (o *ListCloudDomainMigrationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/cloudDomainMigration][%d] listCloudDomainMigrationOK %s", 200, payload) -} - -func (o *ListCloudDomainMigrationOK) GetPayload() *models.CloudDomainMigrationQueryResult { - return o.Payload -} - -func (o *ListCloudDomainMigrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CloudDomainMigrationQueryResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListCloudDomainMigrationDefault creates a ListCloudDomainMigrationDefault with default headers values -func NewListCloudDomainMigrationDefault(code int) *ListCloudDomainMigrationDefault { - return &ListCloudDomainMigrationDefault{ - _statusCode: code, - } -} - -/* -ListCloudDomainMigrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListCloudDomainMigrationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list cloud domain migration default response has a 2xx status code -func (o *ListCloudDomainMigrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list cloud domain migration default response has a 3xx status code -func (o *ListCloudDomainMigrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list cloud domain migration default response has a 4xx status code -func (o *ListCloudDomainMigrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list cloud domain migration default response has a 5xx status code -func (o *ListCloudDomainMigrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list cloud domain migration default response a status code equal to that given -func (o *ListCloudDomainMigrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list cloud domain migration default response -func (o *ListCloudDomainMigrationDefault) Code() int { - return o._statusCode -} - -func (o *ListCloudDomainMigrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/cloudDomainMigration][%d] ListCloudDomainMigration default %s", o._statusCode, payload) -} - -func (o *ListCloudDomainMigrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/cloudDomainMigration][%d] ListCloudDomainMigration default %s", o._statusCode, payload) -} - -func (o *ListCloudDomainMigrationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListCloudDomainMigrationDefault) 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/remote_restore/list_remote_vault_restore_tasks_parameters.go b/v1/client/remote_restore/list_remote_vault_restore_tasks_parameters.go deleted file mode 100644 index 7c917624..00000000 --- a/v1/client/remote_restore/list_remote_vault_restore_tasks_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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" -) - -// NewListRemoteVaultRestoreTasksParams creates a new ListRemoteVaultRestoreTasksParams 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 NewListRemoteVaultRestoreTasksParams() *ListRemoteVaultRestoreTasksParams { - return &ListRemoteVaultRestoreTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListRemoteVaultRestoreTasksParamsWithTimeout creates a new ListRemoteVaultRestoreTasksParams object -// with the ability to set a timeout on a request. -func NewListRemoteVaultRestoreTasksParamsWithTimeout(timeout time.Duration) *ListRemoteVaultRestoreTasksParams { - return &ListRemoteVaultRestoreTasksParams{ - timeout: timeout, - } -} - -// NewListRemoteVaultRestoreTasksParamsWithContext creates a new ListRemoteVaultRestoreTasksParams object -// with the ability to set a context for a request. -func NewListRemoteVaultRestoreTasksParamsWithContext(ctx context.Context) *ListRemoteVaultRestoreTasksParams { - return &ListRemoteVaultRestoreTasksParams{ - Context: ctx, - } -} - -// NewListRemoteVaultRestoreTasksParamsWithHTTPClient creates a new ListRemoteVaultRestoreTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewListRemoteVaultRestoreTasksParamsWithHTTPClient(client *http.Client) *ListRemoteVaultRestoreTasksParams { - return &ListRemoteVaultRestoreTasksParams{ - HTTPClient: client, - } -} - -/* -ListRemoteVaultRestoreTasksParams contains all the parameters to send to the API endpoint - - for the list remote vault restore tasks operation. - - Typically these are written to a http.Request. -*/ -type ListRemoteVaultRestoreTasksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list remote vault restore tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultRestoreTasksParams) WithDefaults() *ListRemoteVaultRestoreTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list remote vault restore tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultRestoreTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) WithTimeout(timeout time.Duration) *ListRemoteVaultRestoreTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) WithContext(ctx context.Context) *ListRemoteVaultRestoreTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) WithHTTPClient(client *http.Client) *ListRemoteVaultRestoreTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list remote vault restore tasks params -func (o *ListRemoteVaultRestoreTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListRemoteVaultRestoreTasksParams) 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/remote_restore/list_remote_vault_restore_tasks_responses.go b/v1/client/remote_restore/list_remote_vault_restore_tasks_responses.go deleted file mode 100644 index 395fa3f2..00000000 --- a/v1/client/remote_restore/list_remote_vault_restore_tasks_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListRemoteVaultRestoreTasksReader is a Reader for the ListRemoteVaultRestoreTasks structure. -type ListRemoteVaultRestoreTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListRemoteVaultRestoreTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListRemoteVaultRestoreTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListRemoteVaultRestoreTasksDefault(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 - } -} - -// NewListRemoteVaultRestoreTasksOK creates a ListRemoteVaultRestoreTasksOK with default headers values -func NewListRemoteVaultRestoreTasksOK() *ListRemoteVaultRestoreTasksOK { - return &ListRemoteVaultRestoreTasksOK{} -} - -/* -ListRemoteVaultRestoreTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type ListRemoteVaultRestoreTasksOK struct { - Payload []*models.RemoteVaultRestoreTaskStatus -} - -// IsSuccess returns true when this list remote vault restore tasks o k response has a 2xx status code -func (o *ListRemoteVaultRestoreTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list remote vault restore tasks o k response has a 3xx status code -func (o *ListRemoteVaultRestoreTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list remote vault restore tasks o k response has a 4xx status code -func (o *ListRemoteVaultRestoreTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list remote vault restore tasks o k response has a 5xx status code -func (o *ListRemoteVaultRestoreTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list remote vault restore tasks o k response a status code equal to that given -func (o *ListRemoteVaultRestoreTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list remote vault restore tasks o k response -func (o *ListRemoteVaultRestoreTasksOK) Code() int { - return 200 -} - -func (o *ListRemoteVaultRestoreTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/restoreTasks][%d] listRemoteVaultRestoreTasksOK %s", 200, payload) -} - -func (o *ListRemoteVaultRestoreTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/restoreTasks][%d] listRemoteVaultRestoreTasksOK %s", 200, payload) -} - -func (o *ListRemoteVaultRestoreTasksOK) GetPayload() []*models.RemoteVaultRestoreTaskStatus { - return o.Payload -} - -func (o *ListRemoteVaultRestoreTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListRemoteVaultRestoreTasksDefault creates a ListRemoteVaultRestoreTasksDefault with default headers values -func NewListRemoteVaultRestoreTasksDefault(code int) *ListRemoteVaultRestoreTasksDefault { - return &ListRemoteVaultRestoreTasksDefault{ - _statusCode: code, - } -} - -/* -ListRemoteVaultRestoreTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListRemoteVaultRestoreTasksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list remote vault restore tasks default response has a 2xx status code -func (o *ListRemoteVaultRestoreTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list remote vault restore tasks default response has a 3xx status code -func (o *ListRemoteVaultRestoreTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list remote vault restore tasks default response has a 4xx status code -func (o *ListRemoteVaultRestoreTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list remote vault restore tasks default response has a 5xx status code -func (o *ListRemoteVaultRestoreTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list remote vault restore tasks default response a status code equal to that given -func (o *ListRemoteVaultRestoreTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list remote vault restore tasks default response -func (o *ListRemoteVaultRestoreTasksDefault) Code() int { - return o._statusCode -} - -func (o *ListRemoteVaultRestoreTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/restoreTasks][%d] ListRemoteVaultRestoreTasks default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultRestoreTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/restoreTasks][%d] ListRemoteVaultRestoreTasks default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultRestoreTasksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListRemoteVaultRestoreTasksDefault) 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/remote_restore/list_remote_vault_search_job_by_id_parameters.go b/v1/client/remote_restore/list_remote_vault_search_job_by_id_parameters.go deleted file mode 100644 index 1eae3105..00000000 --- a/v1/client/remote_restore/list_remote_vault_search_job_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/go-openapi/swag" -) - -// NewListRemoteVaultSearchJobByIDParams creates a new ListRemoteVaultSearchJobByIDParams 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 NewListRemoteVaultSearchJobByIDParams() *ListRemoteVaultSearchJobByIDParams { - return &ListRemoteVaultSearchJobByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListRemoteVaultSearchJobByIDParamsWithTimeout creates a new ListRemoteVaultSearchJobByIDParams object -// with the ability to set a timeout on a request. -func NewListRemoteVaultSearchJobByIDParamsWithTimeout(timeout time.Duration) *ListRemoteVaultSearchJobByIDParams { - return &ListRemoteVaultSearchJobByIDParams{ - timeout: timeout, - } -} - -// NewListRemoteVaultSearchJobByIDParamsWithContext creates a new ListRemoteVaultSearchJobByIDParams object -// with the ability to set a context for a request. -func NewListRemoteVaultSearchJobByIDParamsWithContext(ctx context.Context) *ListRemoteVaultSearchJobByIDParams { - return &ListRemoteVaultSearchJobByIDParams{ - Context: ctx, - } -} - -// NewListRemoteVaultSearchJobByIDParamsWithHTTPClient creates a new ListRemoteVaultSearchJobByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewListRemoteVaultSearchJobByIDParamsWithHTTPClient(client *http.Client) *ListRemoteVaultSearchJobByIDParams { - return &ListRemoteVaultSearchJobByIDParams{ - HTTPClient: client, - } -} - -/* -ListRemoteVaultSearchJobByIDParams contains all the parameters to send to the API endpoint - - for the list remote vault search job by Id operation. - - Typically these are written to a http.Request. -*/ -type ListRemoteVaultSearchJobByIDParams struct { - - /* ID. - - Specifies the id of the remote Vault search Job to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list remote vault search job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultSearchJobByIDParams) WithDefaults() *ListRemoteVaultSearchJobByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list remote vault search job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultSearchJobByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) WithTimeout(timeout time.Duration) *ListRemoteVaultSearchJobByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) WithContext(ctx context.Context) *ListRemoteVaultSearchJobByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) WithHTTPClient(client *http.Client) *ListRemoteVaultSearchJobByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) WithID(id int64) *ListRemoteVaultSearchJobByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list remote vault search job by Id params -func (o *ListRemoteVaultSearchJobByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ListRemoteVaultSearchJobByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_restore/list_remote_vault_search_job_by_id_responses.go b/v1/client/remote_restore/list_remote_vault_search_job_by_id_responses.go deleted file mode 100644 index 7d8fd222..00000000 --- a/v1/client/remote_restore/list_remote_vault_search_job_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListRemoteVaultSearchJobByIDReader is a Reader for the ListRemoteVaultSearchJobByID structure. -type ListRemoteVaultSearchJobByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListRemoteVaultSearchJobByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListRemoteVaultSearchJobByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListRemoteVaultSearchJobByIDDefault(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 - } -} - -// NewListRemoteVaultSearchJobByIDOK creates a ListRemoteVaultSearchJobByIDOK with default headers values -func NewListRemoteVaultSearchJobByIDOK() *ListRemoteVaultSearchJobByIDOK { - return &ListRemoteVaultSearchJobByIDOK{} -} - -/* -ListRemoteVaultSearchJobByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type ListRemoteVaultSearchJobByIDOK struct { - Payload *models.RemoteVaultSearchJobInformation -} - -// IsSuccess returns true when this list remote vault search job by Id o k response has a 2xx status code -func (o *ListRemoteVaultSearchJobByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list remote vault search job by Id o k response has a 3xx status code -func (o *ListRemoteVaultSearchJobByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list remote vault search job by Id o k response has a 4xx status code -func (o *ListRemoteVaultSearchJobByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list remote vault search job by Id o k response has a 5xx status code -func (o *ListRemoteVaultSearchJobByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list remote vault search job by Id o k response a status code equal to that given -func (o *ListRemoteVaultSearchJobByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list remote vault search job by Id o k response -func (o *ListRemoteVaultSearchJobByIDOK) Code() int { - return 200 -} - -func (o *ListRemoteVaultSearchJobByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs/{id}][%d] listRemoteVaultSearchJobByIdOK %s", 200, payload) -} - -func (o *ListRemoteVaultSearchJobByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs/{id}][%d] listRemoteVaultSearchJobByIdOK %s", 200, payload) -} - -func (o *ListRemoteVaultSearchJobByIDOK) GetPayload() *models.RemoteVaultSearchJobInformation { - return o.Payload -} - -func (o *ListRemoteVaultSearchJobByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteVaultSearchJobInformation) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListRemoteVaultSearchJobByIDDefault creates a ListRemoteVaultSearchJobByIDDefault with default headers values -func NewListRemoteVaultSearchJobByIDDefault(code int) *ListRemoteVaultSearchJobByIDDefault { - return &ListRemoteVaultSearchJobByIDDefault{ - _statusCode: code, - } -} - -/* -ListRemoteVaultSearchJobByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListRemoteVaultSearchJobByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list remote vault search job by Id default response has a 2xx status code -func (o *ListRemoteVaultSearchJobByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list remote vault search job by Id default response has a 3xx status code -func (o *ListRemoteVaultSearchJobByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list remote vault search job by Id default response has a 4xx status code -func (o *ListRemoteVaultSearchJobByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list remote vault search job by Id default response has a 5xx status code -func (o *ListRemoteVaultSearchJobByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list remote vault search job by Id default response a status code equal to that given -func (o *ListRemoteVaultSearchJobByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list remote vault search job by Id default response -func (o *ListRemoteVaultSearchJobByIDDefault) Code() int { - return o._statusCode -} - -func (o *ListRemoteVaultSearchJobByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs/{id}][%d] ListRemoteVaultSearchJobById default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultSearchJobByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs/{id}][%d] ListRemoteVaultSearchJobById default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultSearchJobByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListRemoteVaultSearchJobByIDDefault) 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/remote_restore/list_remote_vault_search_jobs_parameters.go b/v1/client/remote_restore/list_remote_vault_search_jobs_parameters.go deleted file mode 100644 index d32d7c72..00000000 --- a/v1/client/remote_restore/list_remote_vault_search_jobs_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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" -) - -// NewListRemoteVaultSearchJobsParams creates a new ListRemoteVaultSearchJobsParams 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 NewListRemoteVaultSearchJobsParams() *ListRemoteVaultSearchJobsParams { - return &ListRemoteVaultSearchJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListRemoteVaultSearchJobsParamsWithTimeout creates a new ListRemoteVaultSearchJobsParams object -// with the ability to set a timeout on a request. -func NewListRemoteVaultSearchJobsParamsWithTimeout(timeout time.Duration) *ListRemoteVaultSearchJobsParams { - return &ListRemoteVaultSearchJobsParams{ - timeout: timeout, - } -} - -// NewListRemoteVaultSearchJobsParamsWithContext creates a new ListRemoteVaultSearchJobsParams object -// with the ability to set a context for a request. -func NewListRemoteVaultSearchJobsParamsWithContext(ctx context.Context) *ListRemoteVaultSearchJobsParams { - return &ListRemoteVaultSearchJobsParams{ - Context: ctx, - } -} - -// NewListRemoteVaultSearchJobsParamsWithHTTPClient creates a new ListRemoteVaultSearchJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListRemoteVaultSearchJobsParamsWithHTTPClient(client *http.Client) *ListRemoteVaultSearchJobsParams { - return &ListRemoteVaultSearchJobsParams{ - HTTPClient: client, - } -} - -/* -ListRemoteVaultSearchJobsParams contains all the parameters to send to the API endpoint - - for the list remote vault search jobs operation. - - Typically these are written to a http.Request. -*/ -type ListRemoteVaultSearchJobsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list remote vault search jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultSearchJobsParams) WithDefaults() *ListRemoteVaultSearchJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list remote vault search jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListRemoteVaultSearchJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) WithTimeout(timeout time.Duration) *ListRemoteVaultSearchJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) WithContext(ctx context.Context) *ListRemoteVaultSearchJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) WithHTTPClient(client *http.Client) *ListRemoteVaultSearchJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list remote vault search jobs params -func (o *ListRemoteVaultSearchJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListRemoteVaultSearchJobsParams) 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/remote_restore/list_remote_vault_search_jobs_responses.go b/v1/client/remote_restore/list_remote_vault_search_jobs_responses.go deleted file mode 100644 index ed0f15ec..00000000 --- a/v1/client/remote_restore/list_remote_vault_search_jobs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListRemoteVaultSearchJobsReader is a Reader for the ListRemoteVaultSearchJobs structure. -type ListRemoteVaultSearchJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListRemoteVaultSearchJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListRemoteVaultSearchJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListRemoteVaultSearchJobsDefault(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 - } -} - -// NewListRemoteVaultSearchJobsOK creates a ListRemoteVaultSearchJobsOK with default headers values -func NewListRemoteVaultSearchJobsOK() *ListRemoteVaultSearchJobsOK { - return &ListRemoteVaultSearchJobsOK{} -} - -/* -ListRemoteVaultSearchJobsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListRemoteVaultSearchJobsOK struct { - Payload []*models.RemoteVaultSearchJobInformation -} - -// IsSuccess returns true when this list remote vault search jobs o k response has a 2xx status code -func (o *ListRemoteVaultSearchJobsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list remote vault search jobs o k response has a 3xx status code -func (o *ListRemoteVaultSearchJobsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list remote vault search jobs o k response has a 4xx status code -func (o *ListRemoteVaultSearchJobsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list remote vault search jobs o k response has a 5xx status code -func (o *ListRemoteVaultSearchJobsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list remote vault search jobs o k response a status code equal to that given -func (o *ListRemoteVaultSearchJobsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list remote vault search jobs o k response -func (o *ListRemoteVaultSearchJobsOK) Code() int { - return 200 -} - -func (o *ListRemoteVaultSearchJobsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs][%d] listRemoteVaultSearchJobsOK %s", 200, payload) -} - -func (o *ListRemoteVaultSearchJobsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs][%d] listRemoteVaultSearchJobsOK %s", 200, payload) -} - -func (o *ListRemoteVaultSearchJobsOK) GetPayload() []*models.RemoteVaultSearchJobInformation { - return o.Payload -} - -func (o *ListRemoteVaultSearchJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListRemoteVaultSearchJobsDefault creates a ListRemoteVaultSearchJobsDefault with default headers values -func NewListRemoteVaultSearchJobsDefault(code int) *ListRemoteVaultSearchJobsDefault { - return &ListRemoteVaultSearchJobsDefault{ - _statusCode: code, - } -} - -/* -ListRemoteVaultSearchJobsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListRemoteVaultSearchJobsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list remote vault search jobs default response has a 2xx status code -func (o *ListRemoteVaultSearchJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list remote vault search jobs default response has a 3xx status code -func (o *ListRemoteVaultSearchJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list remote vault search jobs default response has a 4xx status code -func (o *ListRemoteVaultSearchJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list remote vault search jobs default response has a 5xx status code -func (o *ListRemoteVaultSearchJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list remote vault search jobs default response a status code equal to that given -func (o *ListRemoteVaultSearchJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list remote vault search jobs default response -func (o *ListRemoteVaultSearchJobsDefault) Code() int { - return o._statusCode -} - -func (o *ListRemoteVaultSearchJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs][%d] ListRemoteVaultSearchJobs default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultSearchJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/remoteVaults/searchJobs][%d] ListRemoteVaultSearchJobs default %s", o._statusCode, payload) -} - -func (o *ListRemoteVaultSearchJobsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListRemoteVaultSearchJobsDefault) 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/remote_restore/remote_restore_client.go b/v1/client/remote_restore/remote_restore_client.go deleted file mode 100644 index 91131ae1..00000000 --- a/v1/client/remote_restore/remote_restore_client.go +++ /dev/null @@ -1,530 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new remote restore API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new remote restore API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new remote restore API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for remote restore API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateCloudDomainMigrationRequest(params *CreateCloudDomainMigrationRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudDomainMigrationRequestNoContent, error) - - CreateRemoteVaultRestoreTask(params *CreateRemoteVaultRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteVaultRestoreTaskCreated, error) - - CreateRemoteVaultSearchJob(params *CreateRemoteVaultSearchJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteVaultSearchJobCreated, error) - - GetRemoteVaultSearchJobResults(params *GetRemoteVaultSearchJobResultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteVaultSearchJobResultsOK, error) - - ListCloudDomainMigration(params *ListCloudDomainMigrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCloudDomainMigrationOK, error) - - ListRemoteVaultRestoreTasks(params *ListRemoteVaultRestoreTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultRestoreTasksOK, error) - - ListRemoteVaultSearchJobByID(params *ListRemoteVaultSearchJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultSearchJobByIDOK, error) - - ListRemoteVaultSearchJobs(params *ListRemoteVaultSearchJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultSearchJobsOK, error) - - StopRemoteVaultSearchJob(params *StopRemoteVaultSearchJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StopRemoteVaultSearchJobNoContent, error) - - UploadVaultEncryptionKeys(params *UploadVaultEncryptionKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadVaultEncryptionKeysNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateCloudDomainMigrationRequest schedules cloud domain migration - -Returns the created cloud domain response. -*/ -func (a *Client) CreateCloudDomainMigrationRequest(params *CreateCloudDomainMigrationRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudDomainMigrationRequestNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCloudDomainMigrationRequestParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCloudDomainMigrationRequest", - Method: "POST", - PathPattern: "/public/remoteVaults/cloudDomainMigration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCloudDomainMigrationRequestReader{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.(*CreateCloudDomainMigrationRequestNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCloudDomainMigrationRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateRemoteVaultRestoreTask creates a remote vault restore task cloud retrieve - - Returns the id of the remote Vault restore Task that was created. - -After a Vault is searched by a search Job, this operation can be -called to create a task that restores the indexes and/or the Snapshots -of a Protection Job, which were archived on a remote Vault (External Target). -This is part of the CloudRetrieve functionality for finding and restoring -archived data from remote Vaults to an alternative (non-original) Cluster. -*/ -func (a *Client) CreateRemoteVaultRestoreTask(params *CreateRemoteVaultRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteVaultRestoreTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRemoteVaultRestoreTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRemoteVaultRestoreTask", - Method: "POST", - PathPattern: "/public/remoteVaults/restoreTasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRemoteVaultRestoreTaskReader{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.(*CreateRemoteVaultRestoreTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRemoteVaultRestoreTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateRemoteVaultSearchJob creates a search of a remote vault cloud retrieve - - A search Job finds Protection Jobs that archived data to a - -Vault (External Target) which also match the specified search criteria. -The results can be optionally filtered by specifying a Cluster match string, -a Protection Job match string, a start time and an end time. -This is part of the CloudRetrieve functionality for finding and restoring -archived data from remote Vaults to an alternative (non-original) Cluster. - -NOTE: A Vault is equivalent to an External Target in the Cohesity Dashboard. -A search Job is equivalent to a search task in the Cohesity Dashboard. -*/ -func (a *Client) CreateRemoteVaultSearchJob(params *CreateRemoteVaultSearchJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRemoteVaultSearchJobCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRemoteVaultSearchJobParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRemoteVaultSearchJob", - Method: "POST", - PathPattern: "/public/remoteVaults/searchJobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRemoteVaultSearchJobReader{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.(*CreateRemoteVaultSearchJobCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRemoteVaultSearchJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRemoteVaultSearchJobResults lists details about the job runs of protection jobs found by a single search of a remote vault cloud retrieve - - Specify a unique id of the search Job using a combination of the - -searchJobId, clusterId, and clusterIncarnationId parameters, -which are all required. - -The results can be optionally filtered by the remote Cluster name. -This is part of the CloudRetrieve functionality for finding and restoring -archived data from a remote Vault. -*/ -func (a *Client) GetRemoteVaultSearchJobResults(params *GetRemoteVaultSearchJobResultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteVaultSearchJobResultsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteVaultSearchJobResultsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteVaultSearchJobResults", - Method: "GET", - PathPattern: "/public/remoteVaults/searchJobResults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteVaultSearchJobResultsReader{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.(*GetRemoteVaultSearchJobResultsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteVaultSearchJobResultsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListCloudDomainMigration queries the cloud domain migration - -Returns the queried cloud domain response. -*/ -func (a *Client) ListCloudDomainMigration(params *ListCloudDomainMigrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCloudDomainMigrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListCloudDomainMigrationParams() - } - op := &runtime.ClientOperation{ - ID: "ListCloudDomainMigration", - Method: "GET", - PathPattern: "/public/remoteVaults/cloudDomainMigration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListCloudDomainMigrationReader{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.(*ListCloudDomainMigrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListCloudDomainMigrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListRemoteVaultRestoreTasks lists the remote vault restore tasks that have completed or are running on this cohesity cluster cloud retrieve - - A remote Vault restore task can restore archived data from a Vault - -(External Target) to this local Cluster. -This is part of the CloudRetrieve functionality for finding and restoring -archived data from remote Vaults to an alternative (non-original) Cluster. -*/ -func (a *Client) ListRemoteVaultRestoreTasks(params *ListRemoteVaultRestoreTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultRestoreTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListRemoteVaultRestoreTasksParams() - } - op := &runtime.ClientOperation{ - ID: "ListRemoteVaultRestoreTasks", - Method: "GET", - PathPattern: "/public/remoteVaults/restoreTasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListRemoteVaultRestoreTasksReader{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.(*ListRemoteVaultRestoreTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListRemoteVaultRestoreTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListRemoteVaultSearchJobByID lists details about a single search job of a remote vault cloud retrieve - - Specify an id for a completed or running search Job. - -A search Job finds data that has been archived to a Vault (External Target). -The returned results do not include Job Run (Snapshot) information. -It is part of the CloudRetrieve functionality for finding and restoring -archived data from remote Vaults to an alternative (non-original) Cluster. -*/ -func (a *Client) ListRemoteVaultSearchJobByID(params *ListRemoteVaultSearchJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultSearchJobByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListRemoteVaultSearchJobByIDParams() - } - op := &runtime.ClientOperation{ - ID: "ListRemoteVaultSearchJobById", - Method: "GET", - PathPattern: "/public/remoteVaults/searchJobs/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListRemoteVaultSearchJobByIDReader{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.(*ListRemoteVaultSearchJobByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListRemoteVaultSearchJobByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListRemoteVaultSearchJobs lists all the searches of remote vaults cloud retrieve - - List all the searches of remote Vaults (External Targets) that - -have run or are running on this Cohesity Cluster. -A search finds Protection Jobs that have archived to a -Vault (External Target). -This is part of the CloudRetrieve functionality for finding and restoring -archived data from remote Vaults to an alternative (non-original) Cluster. - -NOTE: A Vault is equivalent to an External Target in the Cohesity Dashboard. -A search Job is equivalent to a search task in the Cohesity Dashboard. -*/ -func (a *Client) ListRemoteVaultSearchJobs(params *ListRemoteVaultSearchJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRemoteVaultSearchJobsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListRemoteVaultSearchJobsParams() - } - op := &runtime.ClientOperation{ - ID: "ListRemoteVaultSearchJobs", - Method: "GET", - PathPattern: "/public/remoteVaults/searchJobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListRemoteVaultSearchJobsReader{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.(*ListRemoteVaultSearchJobsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListRemoteVaultSearchJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - StopRemoteVaultSearchJob stops a search of a remote vault external target cloud retrieve - - This is part of the CloudRetrieve functionality for finding and restoring - -archived data from remote Vaults to an alternative (non-original) Cluster. -*/ -func (a *Client) StopRemoteVaultSearchJob(params *StopRemoteVaultSearchJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StopRemoteVaultSearchJobNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewStopRemoteVaultSearchJobParams() - } - op := &runtime.ClientOperation{ - ID: "StopRemoteVaultSearchJob", - Method: "DELETE", - PathPattern: "/public/remoteVaults/searchJobs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &StopRemoteVaultSearchJobReader{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.(*StopRemoteVaultSearchJobNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*StopRemoteVaultSearchJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UploadVaultEncryptionKeys uploads the encryption keys required to restore data from a remote vault cloud retrieve - - This request contains multiple files stored as multipart mime data. - -Each file has a key used to encrypt data between a remote Cluster and the -remote Vault. -Content of the file should be same as the file downloaded from the remote -Cluster. -*/ -func (a *Client) UploadVaultEncryptionKeys(params *UploadVaultEncryptionKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadVaultEncryptionKeysNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUploadVaultEncryptionKeysParams() - } - op := &runtime.ClientOperation{ - ID: "UploadVaultEncryptionKeys", - Method: "PUT", - PathPattern: "/public/remoteVaults/encryptionKeys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UploadVaultEncryptionKeysReader{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.(*UploadVaultEncryptionKeysNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UploadVaultEncryptionKeysDefault) - 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/remote_restore/stop_remote_vault_search_job_parameters.go b/v1/client/remote_restore/stop_remote_vault_search_job_parameters.go deleted file mode 100644 index a7bae310..00000000 --- a/v1/client/remote_restore/stop_remote_vault_search_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewStopRemoteVaultSearchJobParams creates a new StopRemoteVaultSearchJobParams 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 NewStopRemoteVaultSearchJobParams() *StopRemoteVaultSearchJobParams { - return &StopRemoteVaultSearchJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewStopRemoteVaultSearchJobParamsWithTimeout creates a new StopRemoteVaultSearchJobParams object -// with the ability to set a timeout on a request. -func NewStopRemoteVaultSearchJobParamsWithTimeout(timeout time.Duration) *StopRemoteVaultSearchJobParams { - return &StopRemoteVaultSearchJobParams{ - timeout: timeout, - } -} - -// NewStopRemoteVaultSearchJobParamsWithContext creates a new StopRemoteVaultSearchJobParams object -// with the ability to set a context for a request. -func NewStopRemoteVaultSearchJobParamsWithContext(ctx context.Context) *StopRemoteVaultSearchJobParams { - return &StopRemoteVaultSearchJobParams{ - Context: ctx, - } -} - -// NewStopRemoteVaultSearchJobParamsWithHTTPClient creates a new StopRemoteVaultSearchJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewStopRemoteVaultSearchJobParamsWithHTTPClient(client *http.Client) *StopRemoteVaultSearchJobParams { - return &StopRemoteVaultSearchJobParams{ - HTTPClient: client, - } -} - -/* -StopRemoteVaultSearchJobParams contains all the parameters to send to the API endpoint - - for the stop remote vault search job operation. - - Typically these are written to a http.Request. -*/ -type StopRemoteVaultSearchJobParams struct { - - /* Body. - - Request to stop a Remote Vault Search Job. - */ - Body *models.StopRemoteVaultSearchJobParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the stop remote vault search job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *StopRemoteVaultSearchJobParams) WithDefaults() *StopRemoteVaultSearchJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the stop remote vault search job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *StopRemoteVaultSearchJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) WithTimeout(timeout time.Duration) *StopRemoteVaultSearchJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) WithContext(ctx context.Context) *StopRemoteVaultSearchJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) WithHTTPClient(client *http.Client) *StopRemoteVaultSearchJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) WithBody(body *models.StopRemoteVaultSearchJobParameters) *StopRemoteVaultSearchJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the stop remote vault search job params -func (o *StopRemoteVaultSearchJobParams) SetBody(body *models.StopRemoteVaultSearchJobParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *StopRemoteVaultSearchJobParams) 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/remote_restore/stop_remote_vault_search_job_responses.go b/v1/client/remote_restore/stop_remote_vault_search_job_responses.go deleted file mode 100644 index cad36e35..00000000 --- a/v1/client/remote_restore/stop_remote_vault_search_job_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// StopRemoteVaultSearchJobReader is a Reader for the StopRemoteVaultSearchJob structure. -type StopRemoteVaultSearchJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *StopRemoteVaultSearchJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewStopRemoteVaultSearchJobNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewStopRemoteVaultSearchJobDefault(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 - } -} - -// NewStopRemoteVaultSearchJobNoContent creates a StopRemoteVaultSearchJobNoContent with default headers values -func NewStopRemoteVaultSearchJobNoContent() *StopRemoteVaultSearchJobNoContent { - return &StopRemoteVaultSearchJobNoContent{} -} - -/* -StopRemoteVaultSearchJobNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type StopRemoteVaultSearchJobNoContent struct { -} - -// IsSuccess returns true when this stop remote vault search job no content response has a 2xx status code -func (o *StopRemoteVaultSearchJobNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this stop remote vault search job no content response has a 3xx status code -func (o *StopRemoteVaultSearchJobNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this stop remote vault search job no content response has a 4xx status code -func (o *StopRemoteVaultSearchJobNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this stop remote vault search job no content response has a 5xx status code -func (o *StopRemoteVaultSearchJobNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this stop remote vault search job no content response a status code equal to that given -func (o *StopRemoteVaultSearchJobNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the stop remote vault search job no content response -func (o *StopRemoteVaultSearchJobNoContent) Code() int { - return 204 -} - -func (o *StopRemoteVaultSearchJobNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/remoteVaults/searchJobs][%d] stopRemoteVaultSearchJobNoContent", 204) -} - -func (o *StopRemoteVaultSearchJobNoContent) String() string { - return fmt.Sprintf("[DELETE /public/remoteVaults/searchJobs][%d] stopRemoteVaultSearchJobNoContent", 204) -} - -func (o *StopRemoteVaultSearchJobNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewStopRemoteVaultSearchJobDefault creates a StopRemoteVaultSearchJobDefault with default headers values -func NewStopRemoteVaultSearchJobDefault(code int) *StopRemoteVaultSearchJobDefault { - return &StopRemoteVaultSearchJobDefault{ - _statusCode: code, - } -} - -/* -StopRemoteVaultSearchJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type StopRemoteVaultSearchJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this stop remote vault search job default response has a 2xx status code -func (o *StopRemoteVaultSearchJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this stop remote vault search job default response has a 3xx status code -func (o *StopRemoteVaultSearchJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this stop remote vault search job default response has a 4xx status code -func (o *StopRemoteVaultSearchJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this stop remote vault search job default response has a 5xx status code -func (o *StopRemoteVaultSearchJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this stop remote vault search job default response a status code equal to that given -func (o *StopRemoteVaultSearchJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the stop remote vault search job default response -func (o *StopRemoteVaultSearchJobDefault) Code() int { - return o._statusCode -} - -func (o *StopRemoteVaultSearchJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/remoteVaults/searchJobs][%d] StopRemoteVaultSearchJob default %s", o._statusCode, payload) -} - -func (o *StopRemoteVaultSearchJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/remoteVaults/searchJobs][%d] StopRemoteVaultSearchJob default %s", o._statusCode, payload) -} - -func (o *StopRemoteVaultSearchJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *StopRemoteVaultSearchJobDefault) 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/remote_restore/upload_vault_encryption_keys_parameters.go b/v1/client/remote_restore/upload_vault_encryption_keys_parameters.go deleted file mode 100644 index d478484b..00000000 --- a/v1/client/remote_restore/upload_vault_encryption_keys_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUploadVaultEncryptionKeysParams creates a new UploadVaultEncryptionKeysParams 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 NewUploadVaultEncryptionKeysParams() *UploadVaultEncryptionKeysParams { - return &UploadVaultEncryptionKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUploadVaultEncryptionKeysParamsWithTimeout creates a new UploadVaultEncryptionKeysParams object -// with the ability to set a timeout on a request. -func NewUploadVaultEncryptionKeysParamsWithTimeout(timeout time.Duration) *UploadVaultEncryptionKeysParams { - return &UploadVaultEncryptionKeysParams{ - timeout: timeout, - } -} - -// NewUploadVaultEncryptionKeysParamsWithContext creates a new UploadVaultEncryptionKeysParams object -// with the ability to set a context for a request. -func NewUploadVaultEncryptionKeysParamsWithContext(ctx context.Context) *UploadVaultEncryptionKeysParams { - return &UploadVaultEncryptionKeysParams{ - Context: ctx, - } -} - -// NewUploadVaultEncryptionKeysParamsWithHTTPClient creates a new UploadVaultEncryptionKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewUploadVaultEncryptionKeysParamsWithHTTPClient(client *http.Client) *UploadVaultEncryptionKeysParams { - return &UploadVaultEncryptionKeysParams{ - HTTPClient: client, - } -} - -/* -UploadVaultEncryptionKeysParams contains all the parameters to send to the API endpoint - - for the upload vault encryption keys operation. - - Typically these are written to a http.Request. -*/ -type UploadVaultEncryptionKeysParams struct { - - /* Body. - - Request to upload encryption keys of a remote Vault. - */ - Body []*models.VaultEncryptionKey - - /* ID. - - Specifies a unique id of the Vault. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upload vault encryption keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadVaultEncryptionKeysParams) WithDefaults() *UploadVaultEncryptionKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upload vault encryption keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadVaultEncryptionKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) WithTimeout(timeout time.Duration) *UploadVaultEncryptionKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) WithContext(ctx context.Context) *UploadVaultEncryptionKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) WithHTTPClient(client *http.Client) *UploadVaultEncryptionKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) WithBody(body []*models.VaultEncryptionKey) *UploadVaultEncryptionKeysParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) SetBody(body []*models.VaultEncryptionKey) { - o.Body = body -} - -// WithID adds the id to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) WithID(id int64) *UploadVaultEncryptionKeysParams { - o.SetID(id) - return o -} - -// SetID adds the id to the upload vault encryption keys params -func (o *UploadVaultEncryptionKeysParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadVaultEncryptionKeysParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/remote_restore/upload_vault_encryption_keys_responses.go b/v1/client/remote_restore/upload_vault_encryption_keys_responses.go deleted file mode 100644 index 9ad1298c..00000000 --- a/v1/client/remote_restore/upload_vault_encryption_keys_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UploadVaultEncryptionKeysReader is a Reader for the UploadVaultEncryptionKeys structure. -type UploadVaultEncryptionKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadVaultEncryptionKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUploadVaultEncryptionKeysNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUploadVaultEncryptionKeysDefault(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 - } -} - -// NewUploadVaultEncryptionKeysNoContent creates a UploadVaultEncryptionKeysNoContent with default headers values -func NewUploadVaultEncryptionKeysNoContent() *UploadVaultEncryptionKeysNoContent { - return &UploadVaultEncryptionKeysNoContent{} -} - -/* -UploadVaultEncryptionKeysNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UploadVaultEncryptionKeysNoContent struct { -} - -// IsSuccess returns true when this upload vault encryption keys no content response has a 2xx status code -func (o *UploadVaultEncryptionKeysNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upload vault encryption keys no content response has a 3xx status code -func (o *UploadVaultEncryptionKeysNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upload vault encryption keys no content response has a 4xx status code -func (o *UploadVaultEncryptionKeysNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this upload vault encryption keys no content response has a 5xx status code -func (o *UploadVaultEncryptionKeysNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this upload vault encryption keys no content response a status code equal to that given -func (o *UploadVaultEncryptionKeysNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the upload vault encryption keys no content response -func (o *UploadVaultEncryptionKeysNoContent) Code() int { - return 204 -} - -func (o *UploadVaultEncryptionKeysNoContent) Error() string { - return fmt.Sprintf("[PUT /public/remoteVaults/encryptionKeys/{id}][%d] uploadVaultEncryptionKeysNoContent", 204) -} - -func (o *UploadVaultEncryptionKeysNoContent) String() string { - return fmt.Sprintf("[PUT /public/remoteVaults/encryptionKeys/{id}][%d] uploadVaultEncryptionKeysNoContent", 204) -} - -func (o *UploadVaultEncryptionKeysNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUploadVaultEncryptionKeysDefault creates a UploadVaultEncryptionKeysDefault with default headers values -func NewUploadVaultEncryptionKeysDefault(code int) *UploadVaultEncryptionKeysDefault { - return &UploadVaultEncryptionKeysDefault{ - _statusCode: code, - } -} - -/* -UploadVaultEncryptionKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type UploadVaultEncryptionKeysDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upload vault encryption keys default response has a 2xx status code -func (o *UploadVaultEncryptionKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upload vault encryption keys default response has a 3xx status code -func (o *UploadVaultEncryptionKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upload vault encryption keys default response has a 4xx status code -func (o *UploadVaultEncryptionKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upload vault encryption keys default response has a 5xx status code -func (o *UploadVaultEncryptionKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upload vault encryption keys default response a status code equal to that given -func (o *UploadVaultEncryptionKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upload vault encryption keys default response -func (o *UploadVaultEncryptionKeysDefault) Code() int { - return o._statusCode -} - -func (o *UploadVaultEncryptionKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteVaults/encryptionKeys/{id}][%d] UploadVaultEncryptionKeys default %s", o._statusCode, payload) -} - -func (o *UploadVaultEncryptionKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/remoteVaults/encryptionKeys/{id}][%d] UploadVaultEncryptionKeys default %s", o._statusCode, payload) -} - -func (o *UploadVaultEncryptionKeysDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UploadVaultEncryptionKeysDefault) 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/reports/get_agent_deployment_report_parameters.go b/v1/client/reports/get_agent_deployment_report_parameters.go deleted file mode 100644 index dba957e5..00000000 --- a/v1/client/reports/get_agent_deployment_report_parameters.go +++ /dev/null @@ -1,320 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetAgentDeploymentReportParams creates a new GetAgentDeploymentReportParams 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 NewGetAgentDeploymentReportParams() *GetAgentDeploymentReportParams { - return &GetAgentDeploymentReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAgentDeploymentReportParamsWithTimeout creates a new GetAgentDeploymentReportParams object -// with the ability to set a timeout on a request. -func NewGetAgentDeploymentReportParamsWithTimeout(timeout time.Duration) *GetAgentDeploymentReportParams { - return &GetAgentDeploymentReportParams{ - timeout: timeout, - } -} - -// NewGetAgentDeploymentReportParamsWithContext creates a new GetAgentDeploymentReportParams object -// with the ability to set a context for a request. -func NewGetAgentDeploymentReportParamsWithContext(ctx context.Context) *GetAgentDeploymentReportParams { - return &GetAgentDeploymentReportParams{ - Context: ctx, - } -} - -// NewGetAgentDeploymentReportParamsWithHTTPClient creates a new GetAgentDeploymentReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAgentDeploymentReportParamsWithHTTPClient(client *http.Client) *GetAgentDeploymentReportParams { - return &GetAgentDeploymentReportParams{ - HTTPClient: client, - } -} - -/* -GetAgentDeploymentReportParams contains all the parameters to send to the API endpoint - - for the get agent deployment report operation. - - Typically these are written to a http.Request. -*/ -type GetAgentDeploymentReportParams struct { - - /* CompactVersion. - - Specifies the compact version of Cohesity agent. For example, 6.0.1. - Setting this parameter will filter the response based on installed agent - version. - */ - CompactVersion *string - - /* HealthStatus. - - Specifies the health status of the Cohesity agent. Setting this parameter - will filter the response based on agent health status. - Specifies the status of the agent running on a physical source. - 'kUnknown' indicates the Agent is not known. No attempt to connect - to the Agent has occurred. - 'kUnreachable' indicates the Agent is not reachable. - 'kHealthy' indicates the Agent is healthy. - 'kDegraded' indicates the Agent is running but in a degraded state. - */ - HealthStatus []string - - /* HostOsType. - - Specifies the host type on which the Cohesity agent is installed. - Setting this parameter will filter the response based on host OS type on - which agent is running. - 'kLinux' indicates the Linux operating system. - 'kWindows' indicates the Microsoft Windows operating system. - 'kAix' indicates the IBM AIX operating system. - 'kSolaris' indicates the Oracle Solaris operating system. - 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - 'kCockroachDB' indicates the CockroachDB database system. - 'kMySQL' indicates the MySQL database system. - 'kSapSybase' indicates the SapSybase database system. - 'kSapMaxDB' indicates the SapMaxDB database system. - 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - 'kDB2' indicates the DB2 database system. - 'kSapASE' indicates the SapASE database system. - 'kMariaDB' indicates the MariaDB database system. - 'kPostgreSQL' indicates the PostgreSQL database system. - 'kHPUX' indicates the HPUX database system. - 'kVOS' indicates the VOS database system. - 'kOther' indicates the other types of operating system. - */ - HostOsType []string - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get agent deployment report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAgentDeploymentReportParams) WithDefaults() *GetAgentDeploymentReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get agent deployment report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAgentDeploymentReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithTimeout(timeout time.Duration) *GetAgentDeploymentReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithContext(ctx context.Context) *GetAgentDeploymentReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithHTTPClient(client *http.Client) *GetAgentDeploymentReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCompactVersion adds the compactVersion to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithCompactVersion(compactVersion *string) *GetAgentDeploymentReportParams { - o.SetCompactVersion(compactVersion) - return o -} - -// SetCompactVersion adds the compactVersion to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetCompactVersion(compactVersion *string) { - o.CompactVersion = compactVersion -} - -// WithHealthStatus adds the healthStatus to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithHealthStatus(healthStatus []string) *GetAgentDeploymentReportParams { - o.SetHealthStatus(healthStatus) - return o -} - -// SetHealthStatus adds the healthStatus to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetHealthStatus(healthStatus []string) { - o.HealthStatus = healthStatus -} - -// WithHostOsType adds the hostOsType to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithHostOsType(hostOsType []string) *GetAgentDeploymentReportParams { - o.SetHostOsType(hostOsType) - return o -} - -// SetHostOsType adds the hostOsType to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetHostOsType(hostOsType []string) { - o.HostOsType = hostOsType -} - -// WithOutputFormat adds the outputFormat to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) WithOutputFormat(outputFormat *string) *GetAgentDeploymentReportParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get agent deployment report params -func (o *GetAgentDeploymentReportParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAgentDeploymentReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CompactVersion != nil { - - // query param compactVersion - var qrCompactVersion string - - if o.CompactVersion != nil { - qrCompactVersion = *o.CompactVersion - } - qCompactVersion := qrCompactVersion - if qCompactVersion != "" { - - if err := r.SetQueryParam("compactVersion", qCompactVersion); err != nil { - return err - } - } - } - - if o.HealthStatus != nil { - - // binding items for healthStatus - joinedHealthStatus := o.bindParamHealthStatus(reg) - - // query array param healthStatus - if err := r.SetQueryParam("healthStatus", joinedHealthStatus...); err != nil { - return err - } - } - - if o.HostOsType != nil { - - // binding items for hostOsType - joinedHostOsType := o.bindParamHostOsType(reg) - - // query array param hostOsType - if err := r.SetQueryParam("hostOsType", joinedHostOsType...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAgentDeploymentReport binds the parameter healthStatus -func (o *GetAgentDeploymentReportParams) bindParamHealthStatus(formats strfmt.Registry) []string { - healthStatusIR := o.HealthStatus - - var healthStatusIC []string - for _, healthStatusIIR := range healthStatusIR { // explode []string - - healthStatusIIV := healthStatusIIR // string as string - healthStatusIC = append(healthStatusIC, healthStatusIIV) - } - - // items.CollectionFormat: "" - healthStatusIS := swag.JoinByFormat(healthStatusIC, "") - - return healthStatusIS -} - -// bindParamGetAgentDeploymentReport binds the parameter hostOsType -func (o *GetAgentDeploymentReportParams) bindParamHostOsType(formats strfmt.Registry) []string { - hostOsTypeIR := o.HostOsType - - var hostOsTypeIC []string - for _, hostOsTypeIIR := range hostOsTypeIR { // explode []string - - hostOsTypeIIV := hostOsTypeIIR // string as string - hostOsTypeIC = append(hostOsTypeIC, hostOsTypeIIV) - } - - // items.CollectionFormat: "" - hostOsTypeIS := swag.JoinByFormat(hostOsTypeIC, "") - - return hostOsTypeIS -} diff --git a/v1/client/reports/get_agent_deployment_report_responses.go b/v1/client/reports/get_agent_deployment_report_responses.go deleted file mode 100644 index da8886e9..00000000 --- a/v1/client/reports/get_agent_deployment_report_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAgentDeploymentReportReader is a Reader for the GetAgentDeploymentReport structure. -type GetAgentDeploymentReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAgentDeploymentReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAgentDeploymentReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAgentDeploymentReportDefault(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 - } -} - -// NewGetAgentDeploymentReportOK creates a GetAgentDeploymentReportOK with default headers values -func NewGetAgentDeploymentReportOK() *GetAgentDeploymentReportOK { - return &GetAgentDeploymentReportOK{} -} - -/* -GetAgentDeploymentReportOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAgentDeploymentReportOK struct { - Payload []*models.AgentDeploymentStatusResponse -} - -// IsSuccess returns true when this get agent deployment report o k response has a 2xx status code -func (o *GetAgentDeploymentReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get agent deployment report o k response has a 3xx status code -func (o *GetAgentDeploymentReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get agent deployment report o k response has a 4xx status code -func (o *GetAgentDeploymentReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get agent deployment report o k response has a 5xx status code -func (o *GetAgentDeploymentReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get agent deployment report o k response a status code equal to that given -func (o *GetAgentDeploymentReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get agent deployment report o k response -func (o *GetAgentDeploymentReportOK) Code() int { - return 200 -} - -func (o *GetAgentDeploymentReportOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/agents][%d] getAgentDeploymentReportOK %s", 200, payload) -} - -func (o *GetAgentDeploymentReportOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/agents][%d] getAgentDeploymentReportOK %s", 200, payload) -} - -func (o *GetAgentDeploymentReportOK) GetPayload() []*models.AgentDeploymentStatusResponse { - return o.Payload -} - -func (o *GetAgentDeploymentReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAgentDeploymentReportDefault creates a GetAgentDeploymentReportDefault with default headers values -func NewGetAgentDeploymentReportDefault(code int) *GetAgentDeploymentReportDefault { - return &GetAgentDeploymentReportDefault{ - _statusCode: code, - } -} - -/* -GetAgentDeploymentReportDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAgentDeploymentReportDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get agent deployment report default response has a 2xx status code -func (o *GetAgentDeploymentReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get agent deployment report default response has a 3xx status code -func (o *GetAgentDeploymentReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get agent deployment report default response has a 4xx status code -func (o *GetAgentDeploymentReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get agent deployment report default response has a 5xx status code -func (o *GetAgentDeploymentReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get agent deployment report default response a status code equal to that given -func (o *GetAgentDeploymentReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get agent deployment report default response -func (o *GetAgentDeploymentReportDefault) Code() int { - return o._statusCode -} - -func (o *GetAgentDeploymentReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/agents][%d] GetAgentDeploymentReport default %s", o._statusCode, payload) -} - -func (o *GetAgentDeploymentReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/agents][%d] GetAgentDeploymentReport default %s", o._statusCode, payload) -} - -func (o *GetAgentDeploymentReportDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAgentDeploymentReportDefault) 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/reports/get_cloud_archive_report_request_parameters.go b/v1/client/reports/get_cloud_archive_report_request_parameters.go deleted file mode 100644 index 772d2487..00000000 --- a/v1/client/reports/get_cloud_archive_report_request_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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" -) - -// NewGetCloudArchiveReportRequestParams creates a new GetCloudArchiveReportRequestParams 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 NewGetCloudArchiveReportRequestParams() *GetCloudArchiveReportRequestParams { - return &GetCloudArchiveReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCloudArchiveReportRequestParamsWithTimeout creates a new GetCloudArchiveReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetCloudArchiveReportRequestParamsWithTimeout(timeout time.Duration) *GetCloudArchiveReportRequestParams { - return &GetCloudArchiveReportRequestParams{ - timeout: timeout, - } -} - -// NewGetCloudArchiveReportRequestParamsWithContext creates a new GetCloudArchiveReportRequestParams object -// with the ability to set a context for a request. -func NewGetCloudArchiveReportRequestParamsWithContext(ctx context.Context) *GetCloudArchiveReportRequestParams { - return &GetCloudArchiveReportRequestParams{ - Context: ctx, - } -} - -// NewGetCloudArchiveReportRequestParamsWithHTTPClient creates a new GetCloudArchiveReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCloudArchiveReportRequestParamsWithHTTPClient(client *http.Client) *GetCloudArchiveReportRequestParams { - return &GetCloudArchiveReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetCloudArchiveReportRequestParams contains all the parameters to send to the API endpoint - - for the get cloud archive report request operation. - - Typically these are written to a http.Request. -*/ -type GetCloudArchiveReportRequestParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cloud archive report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudArchiveReportRequestParams) WithDefaults() *GetCloudArchiveReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cloud archive report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudArchiveReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) WithTimeout(timeout time.Duration) *GetCloudArchiveReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) WithContext(ctx context.Context) *GetCloudArchiveReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) WithHTTPClient(client *http.Client) *GetCloudArchiveReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cloud archive report request params -func (o *GetCloudArchiveReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCloudArchiveReportRequestParams) 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/reports/get_cloud_archive_report_request_responses.go b/v1/client/reports/get_cloud_archive_report_request_responses.go deleted file mode 100644 index 1ebe74d6..00000000 --- a/v1/client/reports/get_cloud_archive_report_request_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetCloudArchiveReportRequestReader is a Reader for the GetCloudArchiveReportRequest structure. -type GetCloudArchiveReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCloudArchiveReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCloudArchiveReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCloudArchiveReportRequestDefault(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 - } -} - -// NewGetCloudArchiveReportRequestOK creates a GetCloudArchiveReportRequestOK with default headers values -func NewGetCloudArchiveReportRequestOK() *GetCloudArchiveReportRequestOK { - return &GetCloudArchiveReportRequestOK{} -} - -/* -GetCloudArchiveReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCloudArchiveReportRequestOK struct { - Payload *models.CloudArchiveSummary -} - -// IsSuccess returns true when this get cloud archive report request o k response has a 2xx status code -func (o *GetCloudArchiveReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cloud archive report request o k response has a 3xx status code -func (o *GetCloudArchiveReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud archive report request o k response has a 4xx status code -func (o *GetCloudArchiveReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cloud archive report request o k response has a 5xx status code -func (o *GetCloudArchiveReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud archive report request o k response a status code equal to that given -func (o *GetCloudArchiveReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cloud archive report request o k response -func (o *GetCloudArchiveReportRequestOK) Code() int { - return 200 -} - -func (o *GetCloudArchiveReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/cloudArchiveReport][%d] getCloudArchiveReportRequestOK %s", 200, payload) -} - -func (o *GetCloudArchiveReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/cloudArchiveReport][%d] getCloudArchiveReportRequestOK %s", 200, payload) -} - -func (o *GetCloudArchiveReportRequestOK) GetPayload() *models.CloudArchiveSummary { - return o.Payload -} - -func (o *GetCloudArchiveReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CloudArchiveSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudArchiveReportRequestDefault creates a GetCloudArchiveReportRequestDefault with default headers values -func NewGetCloudArchiveReportRequestDefault(code int) *GetCloudArchiveReportRequestDefault { - return &GetCloudArchiveReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetCloudArchiveReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCloudArchiveReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get cloud archive report request default response has a 2xx status code -func (o *GetCloudArchiveReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cloud archive report request default response has a 3xx status code -func (o *GetCloudArchiveReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cloud archive report request default response has a 4xx status code -func (o *GetCloudArchiveReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cloud archive report request default response has a 5xx status code -func (o *GetCloudArchiveReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cloud archive report request default response a status code equal to that given -func (o *GetCloudArchiveReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cloud archive report request default response -func (o *GetCloudArchiveReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetCloudArchiveReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/cloudArchiveReport][%d] GetCloudArchiveReportRequest default %s", o._statusCode, payload) -} - -func (o *GetCloudArchiveReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/cloudArchiveReport][%d] GetCloudArchiveReportRequest default %s", o._statusCode, payload) -} - -func (o *GetCloudArchiveReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetCloudArchiveReportRequestDefault) 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/reports/get_data_transfer_from_vaults_report_request_parameters.go b/v1/client/reports/get_data_transfer_from_vaults_report_request_parameters.go deleted file mode 100644 index 2501bb91..00000000 --- a/v1/client/reports/get_data_transfer_from_vaults_report_request_parameters.go +++ /dev/null @@ -1,329 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetDataTransferFromVaultsReportRequestParams creates a new GetDataTransferFromVaultsReportRequestParams 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 NewGetDataTransferFromVaultsReportRequestParams() *GetDataTransferFromVaultsReportRequestParams { - return &GetDataTransferFromVaultsReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTransferFromVaultsReportRequestParamsWithTimeout creates a new GetDataTransferFromVaultsReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetDataTransferFromVaultsReportRequestParamsWithTimeout(timeout time.Duration) *GetDataTransferFromVaultsReportRequestParams { - return &GetDataTransferFromVaultsReportRequestParams{ - timeout: timeout, - } -} - -// NewGetDataTransferFromVaultsReportRequestParamsWithContext creates a new GetDataTransferFromVaultsReportRequestParams object -// with the ability to set a context for a request. -func NewGetDataTransferFromVaultsReportRequestParamsWithContext(ctx context.Context) *GetDataTransferFromVaultsReportRequestParams { - return &GetDataTransferFromVaultsReportRequestParams{ - Context: ctx, - } -} - -// NewGetDataTransferFromVaultsReportRequestParamsWithHTTPClient creates a new GetDataTransferFromVaultsReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTransferFromVaultsReportRequestParamsWithHTTPClient(client *http.Client) *GetDataTransferFromVaultsReportRequestParams { - return &GetDataTransferFromVaultsReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetDataTransferFromVaultsReportRequestParams contains all the parameters to send to the API endpoint - - for the get data transfer from vaults report request operation. - - Typically these are written to a http.Request. -*/ -type GetDataTransferFromVaultsReportRequestParams struct { - - /* EndTimeMsecs. - - Filter by end time. Specify the end time as a Unix epoch Timestamp - (in milliseconds). - If startTimeMsecs and endTimeMsecs are not specified, - the time period is the last 7 days. - - Format: int64 - */ - EndTimeMsecs *int64 - - /* GroupBy. - - Specifies wheather the report should be grouped by target when scheduled - or downloaded. If not set or set to false, report is grouped by protection - jobs. It is ignored if outformat is not "csv" and response contains whole - report. - - Format: int32 - */ - GroupBy *int32 - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* StartTimeMsecs. - - Filter by a start time. Specify the start time as a Unix epoch Timestamp - (in milliseconds). - If startTimeMsecs and endTimeMsecs are not specified, - the time period is the last 7 days. - - Format: int64 - */ - StartTimeMsecs *int64 - - /* VaultIds. - - Filter by a list of Vault ids. - */ - VaultIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data transfer from vaults report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTransferFromVaultsReportRequestParams) WithDefaults() *GetDataTransferFromVaultsReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data transfer from vaults report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTransferFromVaultsReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithTimeout(timeout time.Duration) *GetDataTransferFromVaultsReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithContext(ctx context.Context) *GetDataTransferFromVaultsReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithHTTPClient(client *http.Client) *GetDataTransferFromVaultsReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeMsecs adds the endTimeMsecs to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithEndTimeMsecs(endTimeMsecs *int64) *GetDataTransferFromVaultsReportRequestParams { - o.SetEndTimeMsecs(endTimeMsecs) - return o -} - -// SetEndTimeMsecs adds the endTimeMsecs to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetEndTimeMsecs(endTimeMsecs *int64) { - o.EndTimeMsecs = endTimeMsecs -} - -// WithGroupBy adds the groupBy to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithGroupBy(groupBy *int32) *GetDataTransferFromVaultsReportRequestParams { - o.SetGroupBy(groupBy) - return o -} - -// SetGroupBy adds the groupBy to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetGroupBy(groupBy *int32) { - o.GroupBy = groupBy -} - -// WithOutputFormat adds the outputFormat to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithOutputFormat(outputFormat *string) *GetDataTransferFromVaultsReportRequestParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithStartTimeMsecs adds the startTimeMsecs to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithStartTimeMsecs(startTimeMsecs *int64) *GetDataTransferFromVaultsReportRequestParams { - o.SetStartTimeMsecs(startTimeMsecs) - return o -} - -// SetStartTimeMsecs adds the startTimeMsecs to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetStartTimeMsecs(startTimeMsecs *int64) { - o.StartTimeMsecs = startTimeMsecs -} - -// WithVaultIds adds the vaultIds to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) WithVaultIds(vaultIds []int64) *GetDataTransferFromVaultsReportRequestParams { - o.SetVaultIds(vaultIds) - return o -} - -// SetVaultIds adds the vaultIds to the get data transfer from vaults report request params -func (o *GetDataTransferFromVaultsReportRequestParams) SetVaultIds(vaultIds []int64) { - o.VaultIds = vaultIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTransferFromVaultsReportRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeMsecs != nil { - - // query param endTimeMsecs - var qrEndTimeMsecs int64 - - if o.EndTimeMsecs != nil { - qrEndTimeMsecs = *o.EndTimeMsecs - } - qEndTimeMsecs := swag.FormatInt64(qrEndTimeMsecs) - if qEndTimeMsecs != "" { - - if err := r.SetQueryParam("endTimeMsecs", qEndTimeMsecs); err != nil { - return err - } - } - } - - if o.GroupBy != nil { - - // query param groupBy - var qrGroupBy int32 - - if o.GroupBy != nil { - qrGroupBy = *o.GroupBy - } - qGroupBy := swag.FormatInt32(qrGroupBy) - if qGroupBy != "" { - - if err := r.SetQueryParam("groupBy", qGroupBy); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.StartTimeMsecs != nil { - - // query param startTimeMsecs - var qrStartTimeMsecs int64 - - if o.StartTimeMsecs != nil { - qrStartTimeMsecs = *o.StartTimeMsecs - } - qStartTimeMsecs := swag.FormatInt64(qrStartTimeMsecs) - if qStartTimeMsecs != "" { - - if err := r.SetQueryParam("startTimeMsecs", qStartTimeMsecs); err != nil { - return err - } - } - } - - if o.VaultIds != nil { - - // binding items for vaultIds - joinedVaultIds := o.bindParamVaultIds(reg) - - // query array param vaultIds - if err := r.SetQueryParam("vaultIds", joinedVaultIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDataTransferFromVaultsReportRequest binds the parameter vaultIds -func (o *GetDataTransferFromVaultsReportRequestParams) bindParamVaultIds(formats strfmt.Registry) []string { - vaultIdsIR := o.VaultIds - - var vaultIdsIC []string - for _, vaultIdsIIR := range vaultIdsIR { // explode []int64 - - vaultIdsIIV := swag.FormatInt64(vaultIdsIIR) // int64 as string - vaultIdsIC = append(vaultIdsIC, vaultIdsIIV) - } - - // items.CollectionFormat: "" - vaultIdsIS := swag.JoinByFormat(vaultIdsIC, "") - - return vaultIdsIS -} diff --git a/v1/client/reports/get_data_transfer_from_vaults_report_request_responses.go b/v1/client/reports/get_data_transfer_from_vaults_report_request_responses.go deleted file mode 100644 index 7a2e2a4c..00000000 --- a/v1/client/reports/get_data_transfer_from_vaults_report_request_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDataTransferFromVaultsReportRequestReader is a Reader for the GetDataTransferFromVaultsReportRequest structure. -type GetDataTransferFromVaultsReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTransferFromVaultsReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTransferFromVaultsReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTransferFromVaultsReportRequestDefault(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 - } -} - -// NewGetDataTransferFromVaultsReportRequestOK creates a GetDataTransferFromVaultsReportRequestOK with default headers values -func NewGetDataTransferFromVaultsReportRequestOK() *GetDataTransferFromVaultsReportRequestOK { - return &GetDataTransferFromVaultsReportRequestOK{} -} - -/* -GetDataTransferFromVaultsReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTransferFromVaultsReportRequestOK struct { - Payload *models.DataTransferFromVaultsSummaryResponse -} - -// IsSuccess returns true when this get data transfer from vaults report request o k response has a 2xx status code -func (o *GetDataTransferFromVaultsReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data transfer from vaults report request o k response has a 3xx status code -func (o *GetDataTransferFromVaultsReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data transfer from vaults report request o k response has a 4xx status code -func (o *GetDataTransferFromVaultsReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data transfer from vaults report request o k response has a 5xx status code -func (o *GetDataTransferFromVaultsReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data transfer from vaults report request o k response a status code equal to that given -func (o *GetDataTransferFromVaultsReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data transfer from vaults report request o k response -func (o *GetDataTransferFromVaultsReportRequestOK) Code() int { - return 200 -} - -func (o *GetDataTransferFromVaultsReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferFromVaults][%d] getDataTransferFromVaultsReportRequestOK %s", 200, payload) -} - -func (o *GetDataTransferFromVaultsReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferFromVaults][%d] getDataTransferFromVaultsReportRequestOK %s", 200, payload) -} - -func (o *GetDataTransferFromVaultsReportRequestOK) GetPayload() *models.DataTransferFromVaultsSummaryResponse { - return o.Payload -} - -func (o *GetDataTransferFromVaultsReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTransferFromVaultsSummaryResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTransferFromVaultsReportRequestDefault creates a GetDataTransferFromVaultsReportRequestDefault with default headers values -func NewGetDataTransferFromVaultsReportRequestDefault(code int) *GetDataTransferFromVaultsReportRequestDefault { - return &GetDataTransferFromVaultsReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetDataTransferFromVaultsReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTransferFromVaultsReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get data transfer from vaults report request default response has a 2xx status code -func (o *GetDataTransferFromVaultsReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data transfer from vaults report request default response has a 3xx status code -func (o *GetDataTransferFromVaultsReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data transfer from vaults report request default response has a 4xx status code -func (o *GetDataTransferFromVaultsReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data transfer from vaults report request default response has a 5xx status code -func (o *GetDataTransferFromVaultsReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data transfer from vaults report request default response a status code equal to that given -func (o *GetDataTransferFromVaultsReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data transfer from vaults report request default response -func (o *GetDataTransferFromVaultsReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTransferFromVaultsReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferFromVaults][%d] GetDataTransferFromVaultsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetDataTransferFromVaultsReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferFromVaults][%d] GetDataTransferFromVaultsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetDataTransferFromVaultsReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetDataTransferFromVaultsReportRequestDefault) 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/reports/get_data_transfer_to_vaults_report_request_parameters.go b/v1/client/reports/get_data_transfer_to_vaults_report_request_parameters.go deleted file mode 100644 index 71a6a7ad..00000000 --- a/v1/client/reports/get_data_transfer_to_vaults_report_request_parameters.go +++ /dev/null @@ -1,329 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetDataTransferToVaultsReportRequestParams creates a new GetDataTransferToVaultsReportRequestParams 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 NewGetDataTransferToVaultsReportRequestParams() *GetDataTransferToVaultsReportRequestParams { - return &GetDataTransferToVaultsReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTransferToVaultsReportRequestParamsWithTimeout creates a new GetDataTransferToVaultsReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetDataTransferToVaultsReportRequestParamsWithTimeout(timeout time.Duration) *GetDataTransferToVaultsReportRequestParams { - return &GetDataTransferToVaultsReportRequestParams{ - timeout: timeout, - } -} - -// NewGetDataTransferToVaultsReportRequestParamsWithContext creates a new GetDataTransferToVaultsReportRequestParams object -// with the ability to set a context for a request. -func NewGetDataTransferToVaultsReportRequestParamsWithContext(ctx context.Context) *GetDataTransferToVaultsReportRequestParams { - return &GetDataTransferToVaultsReportRequestParams{ - Context: ctx, - } -} - -// NewGetDataTransferToVaultsReportRequestParamsWithHTTPClient creates a new GetDataTransferToVaultsReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTransferToVaultsReportRequestParamsWithHTTPClient(client *http.Client) *GetDataTransferToVaultsReportRequestParams { - return &GetDataTransferToVaultsReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetDataTransferToVaultsReportRequestParams contains all the parameters to send to the API endpoint - - for the get data transfer to vaults report request operation. - - Typically these are written to a http.Request. -*/ -type GetDataTransferToVaultsReportRequestParams struct { - - /* EndTimeMsecs. - - Filter by end time. Specify the end time as a Unix epoch Timestamp - (in milliseconds). - If startTimeMsecs and endTimeMsecs are not specified, - the time period is the last 7 days. - - Format: int64 - */ - EndTimeMsecs *int64 - - /* GroupBy. - - Specifies wheather the report should be grouped by target when scheduled - or downloaded. If not set or set to false, report is grouped by protection - jobs. It is ignored if outformat is not "csv" and response contains whole - report. - - Format: int32 - */ - GroupBy *int32 - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* StartTimeMsecs. - - Filter by a start time. Specify the start time as a Unix epoch Timestamp - (in milliseconds). - If startTimeMsecs and endTimeMsecs are not specified, - the time period is the last 7 days. - - Format: int64 - */ - StartTimeMsecs *int64 - - /* VaultIds. - - Filter by a list of Vault ids. - */ - VaultIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data transfer to vaults report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTransferToVaultsReportRequestParams) WithDefaults() *GetDataTransferToVaultsReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data transfer to vaults report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTransferToVaultsReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithTimeout(timeout time.Duration) *GetDataTransferToVaultsReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithContext(ctx context.Context) *GetDataTransferToVaultsReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithHTTPClient(client *http.Client) *GetDataTransferToVaultsReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeMsecs adds the endTimeMsecs to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithEndTimeMsecs(endTimeMsecs *int64) *GetDataTransferToVaultsReportRequestParams { - o.SetEndTimeMsecs(endTimeMsecs) - return o -} - -// SetEndTimeMsecs adds the endTimeMsecs to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetEndTimeMsecs(endTimeMsecs *int64) { - o.EndTimeMsecs = endTimeMsecs -} - -// WithGroupBy adds the groupBy to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithGroupBy(groupBy *int32) *GetDataTransferToVaultsReportRequestParams { - o.SetGroupBy(groupBy) - return o -} - -// SetGroupBy adds the groupBy to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetGroupBy(groupBy *int32) { - o.GroupBy = groupBy -} - -// WithOutputFormat adds the outputFormat to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithOutputFormat(outputFormat *string) *GetDataTransferToVaultsReportRequestParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithStartTimeMsecs adds the startTimeMsecs to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithStartTimeMsecs(startTimeMsecs *int64) *GetDataTransferToVaultsReportRequestParams { - o.SetStartTimeMsecs(startTimeMsecs) - return o -} - -// SetStartTimeMsecs adds the startTimeMsecs to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetStartTimeMsecs(startTimeMsecs *int64) { - o.StartTimeMsecs = startTimeMsecs -} - -// WithVaultIds adds the vaultIds to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) WithVaultIds(vaultIds []int64) *GetDataTransferToVaultsReportRequestParams { - o.SetVaultIds(vaultIds) - return o -} - -// SetVaultIds adds the vaultIds to the get data transfer to vaults report request params -func (o *GetDataTransferToVaultsReportRequestParams) SetVaultIds(vaultIds []int64) { - o.VaultIds = vaultIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTransferToVaultsReportRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeMsecs != nil { - - // query param endTimeMsecs - var qrEndTimeMsecs int64 - - if o.EndTimeMsecs != nil { - qrEndTimeMsecs = *o.EndTimeMsecs - } - qEndTimeMsecs := swag.FormatInt64(qrEndTimeMsecs) - if qEndTimeMsecs != "" { - - if err := r.SetQueryParam("endTimeMsecs", qEndTimeMsecs); err != nil { - return err - } - } - } - - if o.GroupBy != nil { - - // query param groupBy - var qrGroupBy int32 - - if o.GroupBy != nil { - qrGroupBy = *o.GroupBy - } - qGroupBy := swag.FormatInt32(qrGroupBy) - if qGroupBy != "" { - - if err := r.SetQueryParam("groupBy", qGroupBy); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.StartTimeMsecs != nil { - - // query param startTimeMsecs - var qrStartTimeMsecs int64 - - if o.StartTimeMsecs != nil { - qrStartTimeMsecs = *o.StartTimeMsecs - } - qStartTimeMsecs := swag.FormatInt64(qrStartTimeMsecs) - if qStartTimeMsecs != "" { - - if err := r.SetQueryParam("startTimeMsecs", qStartTimeMsecs); err != nil { - return err - } - } - } - - if o.VaultIds != nil { - - // binding items for vaultIds - joinedVaultIds := o.bindParamVaultIds(reg) - - // query array param vaultIds - if err := r.SetQueryParam("vaultIds", joinedVaultIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDataTransferToVaultsReportRequest binds the parameter vaultIds -func (o *GetDataTransferToVaultsReportRequestParams) bindParamVaultIds(formats strfmt.Registry) []string { - vaultIdsIR := o.VaultIds - - var vaultIdsIC []string - for _, vaultIdsIIR := range vaultIdsIR { // explode []int64 - - vaultIdsIIV := swag.FormatInt64(vaultIdsIIR) // int64 as string - vaultIdsIC = append(vaultIdsIC, vaultIdsIIV) - } - - // items.CollectionFormat: "" - vaultIdsIS := swag.JoinByFormat(vaultIdsIC, "") - - return vaultIdsIS -} diff --git a/v1/client/reports/get_data_transfer_to_vaults_report_request_responses.go b/v1/client/reports/get_data_transfer_to_vaults_report_request_responses.go deleted file mode 100644 index b8b48ab4..00000000 --- a/v1/client/reports/get_data_transfer_to_vaults_report_request_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetDataTransferToVaultsReportRequestReader is a Reader for the GetDataTransferToVaultsReportRequest structure. -type GetDataTransferToVaultsReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTransferToVaultsReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTransferToVaultsReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTransferToVaultsReportRequestDefault(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 - } -} - -// NewGetDataTransferToVaultsReportRequestOK creates a GetDataTransferToVaultsReportRequestOK with default headers values -func NewGetDataTransferToVaultsReportRequestOK() *GetDataTransferToVaultsReportRequestOK { - return &GetDataTransferToVaultsReportRequestOK{} -} - -/* -GetDataTransferToVaultsReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTransferToVaultsReportRequestOK struct { - Payload *models.DataTransferToVaultsSummaryResponse -} - -// IsSuccess returns true when this get data transfer to vaults report request o k response has a 2xx status code -func (o *GetDataTransferToVaultsReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data transfer to vaults report request o k response has a 3xx status code -func (o *GetDataTransferToVaultsReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data transfer to vaults report request o k response has a 4xx status code -func (o *GetDataTransferToVaultsReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data transfer to vaults report request o k response has a 5xx status code -func (o *GetDataTransferToVaultsReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data transfer to vaults report request o k response a status code equal to that given -func (o *GetDataTransferToVaultsReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data transfer to vaults report request o k response -func (o *GetDataTransferToVaultsReportRequestOK) Code() int { - return 200 -} - -func (o *GetDataTransferToVaultsReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferToVaults][%d] getDataTransferToVaultsReportRequestOK %s", 200, payload) -} - -func (o *GetDataTransferToVaultsReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferToVaults][%d] getDataTransferToVaultsReportRequestOK %s", 200, payload) -} - -func (o *GetDataTransferToVaultsReportRequestOK) GetPayload() *models.DataTransferToVaultsSummaryResponse { - return o.Payload -} - -func (o *GetDataTransferToVaultsReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTransferToVaultsSummaryResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTransferToVaultsReportRequestDefault creates a GetDataTransferToVaultsReportRequestDefault with default headers values -func NewGetDataTransferToVaultsReportRequestDefault(code int) *GetDataTransferToVaultsReportRequestDefault { - return &GetDataTransferToVaultsReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetDataTransferToVaultsReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTransferToVaultsReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get data transfer to vaults report request default response has a 2xx status code -func (o *GetDataTransferToVaultsReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data transfer to vaults report request default response has a 3xx status code -func (o *GetDataTransferToVaultsReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data transfer to vaults report request default response has a 4xx status code -func (o *GetDataTransferToVaultsReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data transfer to vaults report request default response has a 5xx status code -func (o *GetDataTransferToVaultsReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data transfer to vaults report request default response a status code equal to that given -func (o *GetDataTransferToVaultsReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data transfer to vaults report request default response -func (o *GetDataTransferToVaultsReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTransferToVaultsReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferToVaults][%d] GetDataTransferToVaultsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetDataTransferToVaultsReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/dataTransferToVaults][%d] GetDataTransferToVaultsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetDataTransferToVaultsReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetDataTransferToVaultsReportRequestDefault) 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/reports/get_gdpr_report_parameters.go b/v1/client/reports/get_gdpr_report_parameters.go deleted file mode 100644 index f1a1dbdc..00000000 --- a/v1/client/reports/get_gdpr_report_parameters.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetGdprReportParams creates a new GetGdprReportParams 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 NewGetGdprReportParams() *GetGdprReportParams { - return &GetGdprReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetGdprReportParamsWithTimeout creates a new GetGdprReportParams object -// with the ability to set a timeout on a request. -func NewGetGdprReportParamsWithTimeout(timeout time.Duration) *GetGdprReportParams { - return &GetGdprReportParams{ - timeout: timeout, - } -} - -// NewGetGdprReportParamsWithContext creates a new GetGdprReportParams object -// with the ability to set a context for a request. -func NewGetGdprReportParamsWithContext(ctx context.Context) *GetGdprReportParams { - return &GetGdprReportParams{ - Context: ctx, - } -} - -// NewGetGdprReportParamsWithHTTPClient creates a new GetGdprReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetGdprReportParamsWithHTTPClient(client *http.Client) *GetGdprReportParams { - return &GetGdprReportParams{ - HTTPClient: client, - } -} - -/* -GetGdprReportParams contains all the parameters to send to the API endpoint - - for the get gdpr report operation. - - Typically these are written to a http.Request. -*/ -type GetGdprReportParams struct { - - /* AccessibleUsers. - - Specifies the users for which to get the accessible objects. - */ - AccessibleUsers []string - - /* Actions. - - Specifies the action for the audit logs. - */ - Actions []string - - /* EndTimeUsecs. - - Specifies the end time for the audit logsas a Unix epoch Timestamp - (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ID. - - Specifies the objects for which to get the gdpr information. - */ - ID []int64 - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* ParentSourceID. - - Specifies the parent sources of objects for which to get info for. - */ - ParentSourceID []int64 - - /* Search. - - Specifies the search string for the audit logs. - */ - Search *string - - /* StartTimeUsecs. - - Specifies the start time for the audit logs as a Unix epoch Timestamp - (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get gdpr report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGdprReportParams) WithDefaults() *GetGdprReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get gdpr report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGdprReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get gdpr report params -func (o *GetGdprReportParams) WithTimeout(timeout time.Duration) *GetGdprReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get gdpr report params -func (o *GetGdprReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get gdpr report params -func (o *GetGdprReportParams) WithContext(ctx context.Context) *GetGdprReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get gdpr report params -func (o *GetGdprReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get gdpr report params -func (o *GetGdprReportParams) WithHTTPClient(client *http.Client) *GetGdprReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get gdpr report params -func (o *GetGdprReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAccessibleUsers adds the accessibleUsers to the get gdpr report params -func (o *GetGdprReportParams) WithAccessibleUsers(accessibleUsers []string) *GetGdprReportParams { - o.SetAccessibleUsers(accessibleUsers) - return o -} - -// SetAccessibleUsers adds the accessibleUsers to the get gdpr report params -func (o *GetGdprReportParams) SetAccessibleUsers(accessibleUsers []string) { - o.AccessibleUsers = accessibleUsers -} - -// WithActions adds the actions to the get gdpr report params -func (o *GetGdprReportParams) WithActions(actions []string) *GetGdprReportParams { - o.SetActions(actions) - return o -} - -// SetActions adds the actions to the get gdpr report params -func (o *GetGdprReportParams) SetActions(actions []string) { - o.Actions = actions -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get gdpr report params -func (o *GetGdprReportParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetGdprReportParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get gdpr report params -func (o *GetGdprReportParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithID adds the id to the get gdpr report params -func (o *GetGdprReportParams) WithID(id []int64) *GetGdprReportParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get gdpr report params -func (o *GetGdprReportParams) SetID(id []int64) { - o.ID = id -} - -// WithOutputFormat adds the outputFormat to the get gdpr report params -func (o *GetGdprReportParams) WithOutputFormat(outputFormat *string) *GetGdprReportParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get gdpr report params -func (o *GetGdprReportParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithParentSourceID adds the parentSourceID to the get gdpr report params -func (o *GetGdprReportParams) WithParentSourceID(parentSourceID []int64) *GetGdprReportParams { - o.SetParentSourceID(parentSourceID) - return o -} - -// SetParentSourceID adds the parentSourceId to the get gdpr report params -func (o *GetGdprReportParams) SetParentSourceID(parentSourceID []int64) { - o.ParentSourceID = parentSourceID -} - -// WithSearch adds the search to the get gdpr report params -func (o *GetGdprReportParams) WithSearch(search *string) *GetGdprReportParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the get gdpr report params -func (o *GetGdprReportParams) SetSearch(search *string) { - o.Search = search -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get gdpr report params -func (o *GetGdprReportParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetGdprReportParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get gdpr report params -func (o *GetGdprReportParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetGdprReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AccessibleUsers != nil { - - // binding items for accessibleUsers - joinedAccessibleUsers := o.bindParamAccessibleUsers(reg) - - // query array param accessibleUsers - if err := r.SetQueryParam("accessibleUsers", joinedAccessibleUsers...); err != nil { - return err - } - } - - if o.Actions != nil { - - // binding items for actions - joinedActions := o.bindParamActions(reg) - - // query array param actions - if err := r.SetQueryParam("actions", joinedActions...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ID != nil { - - // binding items for id - joinedID := o.bindParamID(reg) - - // query array param id - if err := r.SetQueryParam("id", joinedID...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.ParentSourceID != nil { - - // binding items for parentSourceId - joinedParentSourceID := o.bindParamParentSourceID(reg) - - // query array param parentSourceId - if err := r.SetQueryParam("parentSourceId", joinedParentSourceID...); err != nil { - return err - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetGdprReport binds the parameter accessibleUsers -func (o *GetGdprReportParams) bindParamAccessibleUsers(formats strfmt.Registry) []string { - accessibleUsersIR := o.AccessibleUsers - - var accessibleUsersIC []string - for _, accessibleUsersIIR := range accessibleUsersIR { // explode []string - - accessibleUsersIIV := accessibleUsersIIR // string as string - accessibleUsersIC = append(accessibleUsersIC, accessibleUsersIIV) - } - - // items.CollectionFormat: "" - accessibleUsersIS := swag.JoinByFormat(accessibleUsersIC, "") - - return accessibleUsersIS -} - -// bindParamGetGdprReport binds the parameter actions -func (o *GetGdprReportParams) bindParamActions(formats strfmt.Registry) []string { - actionsIR := o.Actions - - var actionsIC []string - for _, actionsIIR := range actionsIR { // explode []string - - actionsIIV := actionsIIR // string as string - actionsIC = append(actionsIC, actionsIIV) - } - - // items.CollectionFormat: "" - actionsIS := swag.JoinByFormat(actionsIC, "") - - return actionsIS -} - -// bindParamGetGdprReport binds the parameter id -func (o *GetGdprReportParams) bindParamID(formats strfmt.Registry) []string { - iDIR := o.ID - - var iDIC []string - for _, iDIIR := range iDIR { // explode []int64 - - iDIIV := swag.FormatInt64(iDIIR) // int64 as string - iDIC = append(iDIC, iDIIV) - } - - // items.CollectionFormat: "" - iDIS := swag.JoinByFormat(iDIC, "") - - return iDIS -} - -// bindParamGetGdprReport binds the parameter parentSourceId -func (o *GetGdprReportParams) bindParamParentSourceID(formats strfmt.Registry) []string { - parentSourceIDIR := o.ParentSourceID - - var parentSourceIDIC []string - for _, parentSourceIDIIR := range parentSourceIDIR { // explode []int64 - - parentSourceIDIIV := swag.FormatInt64(parentSourceIDIIR) // int64 as string - parentSourceIDIC = append(parentSourceIDIC, parentSourceIDIIV) - } - - // items.CollectionFormat: "" - parentSourceIDIS := swag.JoinByFormat(parentSourceIDIC, "") - - return parentSourceIDIS -} diff --git a/v1/client/reports/get_gdpr_report_responses.go b/v1/client/reports/get_gdpr_report_responses.go deleted file mode 100644 index 83951b66..00000000 --- a/v1/client/reports/get_gdpr_report_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetGdprReportReader is a Reader for the GetGdprReport structure. -type GetGdprReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetGdprReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetGdprReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetGdprReportDefault(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 - } -} - -// NewGetGdprReportOK creates a GetGdprReportOK with default headers values -func NewGetGdprReportOK() *GetGdprReportOK { - return &GetGdprReportOK{} -} - -/* -GetGdprReportOK describes a response with status code 200, with default header values. - -GetGdprReportResponse defines the response for GetGdprReport. -*/ -type GetGdprReportOK struct { - Payload []*models.ObjectInformation -} - -// IsSuccess returns true when this get gdpr report o k response has a 2xx status code -func (o *GetGdprReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get gdpr report o k response has a 3xx status code -func (o *GetGdprReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get gdpr report o k response has a 4xx status code -func (o *GetGdprReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get gdpr report o k response has a 5xx status code -func (o *GetGdprReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get gdpr report o k response a status code equal to that given -func (o *GetGdprReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get gdpr report o k response -func (o *GetGdprReportOK) Code() int { - return 200 -} - -func (o *GetGdprReportOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/gdpr][%d] getGdprReportOK %s", 200, payload) -} - -func (o *GetGdprReportOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/gdpr][%d] getGdprReportOK %s", 200, payload) -} - -func (o *GetGdprReportOK) GetPayload() []*models.ObjectInformation { - return o.Payload -} - -func (o *GetGdprReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetGdprReportDefault creates a GetGdprReportDefault with default headers values -func NewGetGdprReportDefault(code int) *GetGdprReportDefault { - return &GetGdprReportDefault{ - _statusCode: code, - } -} - -/* -GetGdprReportDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetGdprReportDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get gdpr report default response has a 2xx status code -func (o *GetGdprReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get gdpr report default response has a 3xx status code -func (o *GetGdprReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get gdpr report default response has a 4xx status code -func (o *GetGdprReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get gdpr report default response has a 5xx status code -func (o *GetGdprReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get gdpr report default response a status code equal to that given -func (o *GetGdprReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get gdpr report default response -func (o *GetGdprReportDefault) Code() int { - return o._statusCode -} - -func (o *GetGdprReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/gdpr][%d] GetGdprReport default %s", o._statusCode, payload) -} - -func (o *GetGdprReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/gdpr][%d] GetGdprReport default %s", o._statusCode, payload) -} - -func (o *GetGdprReportDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetGdprReportDefault) 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/reports/get_protected_objects_trends_report_request_parameters.go b/v1/client/reports/get_protected_objects_trends_report_request_parameters.go deleted file mode 100644 index 84de14a2..00000000 --- a/v1/client/reports/get_protected_objects_trends_report_request_parameters.go +++ /dev/null @@ -1,579 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetProtectedObjectsTrendsReportRequestParams creates a new GetProtectedObjectsTrendsReportRequestParams 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 NewGetProtectedObjectsTrendsReportRequestParams() *GetProtectedObjectsTrendsReportRequestParams { - return &GetProtectedObjectsTrendsReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectedObjectsTrendsReportRequestParamsWithTimeout creates a new GetProtectedObjectsTrendsReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetProtectedObjectsTrendsReportRequestParamsWithTimeout(timeout time.Duration) *GetProtectedObjectsTrendsReportRequestParams { - return &GetProtectedObjectsTrendsReportRequestParams{ - timeout: timeout, - } -} - -// NewGetProtectedObjectsTrendsReportRequestParamsWithContext creates a new GetProtectedObjectsTrendsReportRequestParams object -// with the ability to set a context for a request. -func NewGetProtectedObjectsTrendsReportRequestParamsWithContext(ctx context.Context) *GetProtectedObjectsTrendsReportRequestParams { - return &GetProtectedObjectsTrendsReportRequestParams{ - Context: ctx, - } -} - -// NewGetProtectedObjectsTrendsReportRequestParamsWithHTTPClient creates a new GetProtectedObjectsTrendsReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectedObjectsTrendsReportRequestParamsWithHTTPClient(client *http.Client) *GetProtectedObjectsTrendsReportRequestParams { - return &GetProtectedObjectsTrendsReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetProtectedObjectsTrendsReportRequestParams contains all the parameters to send to the API endpoint - - for the get protected objects trends report request operation. - - Typically these are written to a http.Request. -*/ -type GetProtectedObjectsTrendsReportRequestParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EndTimeUsecs. - - Filter by end time. Snapshot summary statistics - for Job Runs that ended before the specified time are returned. - Specify the end time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Environments. - - Filter by a list of environment types such as 'kVMware', 'kView', etc. - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Environments []string - - /* JobIds. - - Filter by a list of Job ids. Snapshots summary statistics - for the specified Protection Jobs are reported. - */ - JobIds []int64 - - /* ProtectedObjectIds. - - Filter by a list of leaf Protection Sources Objects (such as VMs). - Snapshot summary statistics for the listed Protection Source Objects - are reported. - */ - ProtectedObjectIds []int64 - - /* RegisteredSourceID. - - Specifies an id of a top level Registered Source such as - a vCenter Server. If specified, Snapshot summary statistics for all - the leaf Protection Sources (such as VMs) that are children of this - Registered Source are reported. - NOTE: If specified, filtering by other fields is not supported. - - Format: int64 - */ - RegisteredSourceID *int64 - - /* Rollup. - - Roll up type for grouping. Valid values are day, week, month - */ - Rollup *string - - /* StartTimeUsecs. - - Filter by a start time. Snapshot summary statistics - for Job Runs that started after the specified time are reported. - Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* Timezone. - - Specifies the timezone to use when calculating day/week/month - Specify the timezone in the following format: "Area/Location", - for example: "America/New_York". - */ - Timezone string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protected objects trends report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsTrendsReportRequestParams) WithDefaults() *GetProtectedObjectsTrendsReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protected objects trends report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsTrendsReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithTimeout(timeout time.Duration) *GetProtectedObjectsTrendsReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithContext(ctx context.Context) *GetProtectedObjectsTrendsReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithHTTPClient(client *http.Client) *GetProtectedObjectsTrendsReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetProtectedObjectsTrendsReportRequestParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectedObjectsTrendsReportRequestParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvironments adds the environments to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithEnvironments(environments []string) *GetProtectedObjectsTrendsReportRequestParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithJobIds adds the jobIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithJobIds(jobIds []int64) *GetProtectedObjectsTrendsReportRequestParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithProtectedObjectIds adds the protectedObjectIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithProtectedObjectIds(protectedObjectIds []int64) *GetProtectedObjectsTrendsReportRequestParams { - o.SetProtectedObjectIds(protectedObjectIds) - return o -} - -// SetProtectedObjectIds adds the protectedObjectIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetProtectedObjectIds(protectedObjectIds []int64) { - o.ProtectedObjectIds = protectedObjectIds -} - -// WithRegisteredSourceID adds the registeredSourceID to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithRegisteredSourceID(registeredSourceID *int64) *GetProtectedObjectsTrendsReportRequestParams { - o.SetRegisteredSourceID(registeredSourceID) - return o -} - -// SetRegisteredSourceID adds the registeredSourceId to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetRegisteredSourceID(registeredSourceID *int64) { - o.RegisteredSourceID = registeredSourceID -} - -// WithRollup adds the rollup to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithRollup(rollup *string) *GetProtectedObjectsTrendsReportRequestParams { - o.SetRollup(rollup) - return o -} - -// SetRollup adds the rollup to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetRollup(rollup *string) { - o.Rollup = rollup -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectedObjectsTrendsReportRequestParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithTenantIds(tenantIds []string) *GetProtectedObjectsTrendsReportRequestParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithTimezone adds the timezone to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) WithTimezone(timezone string) *GetProtectedObjectsTrendsReportRequestParams { - o.SetTimezone(timezone) - return o -} - -// SetTimezone adds the timezone to the get protected objects trends report request params -func (o *GetProtectedObjectsTrendsReportRequestParams) SetTimezone(timezone string) { - o.Timezone = timezone -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectedObjectsTrendsReportRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.ProtectedObjectIds != nil { - - // binding items for protectedObjectIds - joinedProtectedObjectIds := o.bindParamProtectedObjectIds(reg) - - // query array param protectedObjectIds - if err := r.SetQueryParam("protectedObjectIds", joinedProtectedObjectIds...); err != nil { - return err - } - } - - if o.RegisteredSourceID != nil { - - // query param registeredSourceId - var qrRegisteredSourceID int64 - - if o.RegisteredSourceID != nil { - qrRegisteredSourceID = *o.RegisteredSourceID - } - qRegisteredSourceID := swag.FormatInt64(qrRegisteredSourceID) - if qRegisteredSourceID != "" { - - if err := r.SetQueryParam("registeredSourceId", qRegisteredSourceID); err != nil { - return err - } - } - } - - if o.Rollup != nil { - - // query param rollup - var qrRollup string - - if o.Rollup != nil { - qrRollup = *o.Rollup - } - qRollup := qrRollup - if qRollup != "" { - - if err := r.SetQueryParam("rollup", qRollup); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 - } - } - - // query param timezone - qrTimezone := o.Timezone - qTimezone := qrTimezone - if qTimezone != "" { - - if err := r.SetQueryParam("timezone", qTimezone); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectedObjectsTrendsReportRequest binds the parameter environments -func (o *GetProtectedObjectsTrendsReportRequestParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectedObjectsTrendsReportRequest binds the parameter jobIds -func (o *GetProtectedObjectsTrendsReportRequestParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamGetProtectedObjectsTrendsReportRequest binds the parameter protectedObjectIds -func (o *GetProtectedObjectsTrendsReportRequestParams) bindParamProtectedObjectIds(formats strfmt.Registry) []string { - protectedObjectIdsIR := o.ProtectedObjectIds - - var protectedObjectIdsIC []string - for _, protectedObjectIdsIIR := range protectedObjectIdsIR { // explode []int64 - - protectedObjectIdsIIV := swag.FormatInt64(protectedObjectIdsIIR) // int64 as string - protectedObjectIdsIC = append(protectedObjectIdsIC, protectedObjectIdsIIV) - } - - // items.CollectionFormat: "" - protectedObjectIdsIS := swag.JoinByFormat(protectedObjectIdsIC, "") - - return protectedObjectIdsIS -} - -// bindParamGetProtectedObjectsTrendsReportRequest binds the parameter tenantIds -func (o *GetProtectedObjectsTrendsReportRequestParams) 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/v1/client/reports/get_protected_objects_trends_report_request_responses.go b/v1/client/reports/get_protected_objects_trends_report_request_responses.go deleted file mode 100644 index d090b300..00000000 --- a/v1/client/reports/get_protected_objects_trends_report_request_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectedObjectsTrendsReportRequestReader is a Reader for the GetProtectedObjectsTrendsReportRequest structure. -type GetProtectedObjectsTrendsReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectedObjectsTrendsReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectedObjectsTrendsReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectedObjectsTrendsReportRequestDefault(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 - } -} - -// NewGetProtectedObjectsTrendsReportRequestOK creates a GetProtectedObjectsTrendsReportRequestOK with default headers values -func NewGetProtectedObjectsTrendsReportRequestOK() *GetProtectedObjectsTrendsReportRequestOK { - return &GetProtectedObjectsTrendsReportRequestOK{} -} - -/* -GetProtectedObjectsTrendsReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectedObjectsTrendsReportRequestOK struct { - Payload []*models.ProtectionTrend -} - -// IsSuccess returns true when this get protected objects trends report request o k response has a 2xx status code -func (o *GetProtectedObjectsTrendsReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protected objects trends report request o k response has a 3xx status code -func (o *GetProtectedObjectsTrendsReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protected objects trends report request o k response has a 4xx status code -func (o *GetProtectedObjectsTrendsReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protected objects trends report request o k response has a 5xx status code -func (o *GetProtectedObjectsTrendsReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protected objects trends report request o k response a status code equal to that given -func (o *GetProtectedObjectsTrendsReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protected objects trends report request o k response -func (o *GetProtectedObjectsTrendsReportRequestOK) Code() int { - return 200 -} - -func (o *GetProtectedObjectsTrendsReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectedObjectsTrends][%d] getProtectedObjectsTrendsReportRequestOK %s", 200, payload) -} - -func (o *GetProtectedObjectsTrendsReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectedObjectsTrends][%d] getProtectedObjectsTrendsReportRequestOK %s", 200, payload) -} - -func (o *GetProtectedObjectsTrendsReportRequestOK) GetPayload() []*models.ProtectionTrend { - return o.Payload -} - -func (o *GetProtectedObjectsTrendsReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectedObjectsTrendsReportRequestDefault creates a GetProtectedObjectsTrendsReportRequestDefault with default headers values -func NewGetProtectedObjectsTrendsReportRequestDefault(code int) *GetProtectedObjectsTrendsReportRequestDefault { - return &GetProtectedObjectsTrendsReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetProtectedObjectsTrendsReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectedObjectsTrendsReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protected objects trends report request default response has a 2xx status code -func (o *GetProtectedObjectsTrendsReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protected objects trends report request default response has a 3xx status code -func (o *GetProtectedObjectsTrendsReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protected objects trends report request default response has a 4xx status code -func (o *GetProtectedObjectsTrendsReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protected objects trends report request default response has a 5xx status code -func (o *GetProtectedObjectsTrendsReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protected objects trends report request default response a status code equal to that given -func (o *GetProtectedObjectsTrendsReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protected objects trends report request default response -func (o *GetProtectedObjectsTrendsReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectedObjectsTrendsReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectedObjectsTrends][%d] GetProtectedObjectsTrendsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsTrendsReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectedObjectsTrends][%d] GetProtectedObjectsTrendsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsTrendsReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectedObjectsTrendsReportRequestDefault) 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/reports/get_protection_sources_job_runs_report_request_parameters.go b/v1/client/reports/get_protection_sources_job_runs_report_request_parameters.go deleted file mode 100644 index 88537e27..00000000 --- a/v1/client/reports/get_protection_sources_job_runs_report_request_parameters.go +++ /dev/null @@ -1,554 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourcesJobRunsReportRequestParams creates a new GetProtectionSourcesJobRunsReportRequestParams 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 NewGetProtectionSourcesJobRunsReportRequestParams() *GetProtectionSourcesJobRunsReportRequestParams { - return &GetProtectionSourcesJobRunsReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourcesJobRunsReportRequestParamsWithTimeout creates a new GetProtectionSourcesJobRunsReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourcesJobRunsReportRequestParamsWithTimeout(timeout time.Duration) *GetProtectionSourcesJobRunsReportRequestParams { - return &GetProtectionSourcesJobRunsReportRequestParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourcesJobRunsReportRequestParamsWithContext creates a new GetProtectionSourcesJobRunsReportRequestParams object -// with the ability to set a context for a request. -func NewGetProtectionSourcesJobRunsReportRequestParamsWithContext(ctx context.Context) *GetProtectionSourcesJobRunsReportRequestParams { - return &GetProtectionSourcesJobRunsReportRequestParams{ - Context: ctx, - } -} - -// NewGetProtectionSourcesJobRunsReportRequestParamsWithHTTPClient creates a new GetProtectionSourcesJobRunsReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourcesJobRunsReportRequestParamsWithHTTPClient(client *http.Client) *GetProtectionSourcesJobRunsReportRequestParams { - return &GetProtectionSourcesJobRunsReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourcesJobRunsReportRequestParams contains all the parameters to send to the API endpoint - - for the get protection sources job runs report request operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourcesJobRunsReportRequestParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* EndTimeUsecs. - - Filter by a end time. Snapshots that ended before the - specified time are returned. - Specify the end time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Environments. - - Filter by a list of environment types such as 'kVMware', 'kView', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* JobIds. - - Filter by a list of Job ids. Snapshots for the specified - Protection Jobs are listed. - */ - JobIds []int64 - - /* OutputFormat. - - Specifies the format for the output such as 'cvs' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* PageCount. - - Specifies the number of Snapshots to return in the response for - pagination purposes. Used in combination with the paginationCookie in - the response to return multiple sets of Snapshots. - - Format: int32 - */ - PageCount *int32 - - /* ProtectionSourceIds. - - Filter by a list of leaf Protection Sources Objects (such as VMs). - Snapshots of the specified Protection Source Objects are returned. - */ - ProtectionSourceIds []int64 - - /* RunStatus. - - Filter by a list of run statuses such as 'kRunning', - 'kSuccess', 'kFailure' etc. - Snapshots of Job Runs with the specified run statuses are reported. - 'kSuccess' indicates that the Job Run was successful. - 'kRunning' indicates that the Job Run is currently running. - 'kWarning' indicates that the Job Run was successful but warnings were - issued. - 'kCancelled' indicates that the Job Run was canceled. - 'kError' indicates the Job Run encountered an error and did not run to - completion. - */ - RunStatus []string - - /* StartTimeUsecs. - - Filter by a start time. Snapshots that started after the - specified time are returned. - Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection sources job runs report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithDefaults() *GetProtectionSourcesJobRunsReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection sources job runs report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithTimeout(timeout time.Duration) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithContext(ctx context.Context) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithHTTPClient(client *http.Client) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvironments adds the environments to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithEnvironments(environments []string) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithJobIds adds the jobIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithJobIds(jobIds []int64) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithOutputFormat adds the outputFormat to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithOutputFormat(outputFormat *string) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithPageCount adds the pageCount to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithPageCount(pageCount *int32) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetPageCount(pageCount *int32) { - o.PageCount = pageCount -} - -// WithProtectionSourceIds adds the protectionSourceIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithProtectionSourceIds(protectionSourceIds []int64) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetProtectionSourceIds(protectionSourceIds) - return o -} - -// SetProtectionSourceIds adds the protectionSourceIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetProtectionSourceIds(protectionSourceIds []int64) { - o.ProtectionSourceIds = protectionSourceIds -} - -// WithRunStatus adds the runStatus to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithRunStatus(runStatus []string) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetRunStatus(runStatus) - return o -} - -// SetRunStatus adds the runStatus to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetRunStatus(runStatus []string) { - o.RunStatus = runStatus -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) WithTenantIds(tenantIds []string) *GetProtectionSourcesJobRunsReportRequestParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection sources job runs report request params -func (o *GetProtectionSourcesJobRunsReportRequestParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourcesJobRunsReportRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int32 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt32(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.ProtectionSourceIds != nil { - - // binding items for protectionSourceIds - joinedProtectionSourceIds := o.bindParamProtectionSourceIds(reg) - - // query array param protectionSourceIds - if err := r.SetQueryParam("protectionSourceIds", joinedProtectionSourceIds...); err != nil { - return err - } - } - - if o.RunStatus != nil { - - // binding items for runStatus - joinedRunStatus := o.bindParamRunStatus(reg) - - // query array param runStatus - if err := r.SetQueryParam("runStatus", joinedRunStatus...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionSourcesJobRunsReportRequest binds the parameter environments -func (o *GetProtectionSourcesJobRunsReportRequestParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectionSourcesJobRunsReportRequest binds the parameter jobIds -func (o *GetProtectionSourcesJobRunsReportRequestParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamGetProtectionSourcesJobRunsReportRequest binds the parameter protectionSourceIds -func (o *GetProtectionSourcesJobRunsReportRequestParams) bindParamProtectionSourceIds(formats strfmt.Registry) []string { - protectionSourceIdsIR := o.ProtectionSourceIds - - var protectionSourceIdsIC []string - for _, protectionSourceIdsIIR := range protectionSourceIdsIR { // explode []int64 - - protectionSourceIdsIIV := swag.FormatInt64(protectionSourceIdsIIR) // int64 as string - protectionSourceIdsIC = append(protectionSourceIdsIC, protectionSourceIdsIIV) - } - - // items.CollectionFormat: "" - protectionSourceIdsIS := swag.JoinByFormat(protectionSourceIdsIC, "") - - return protectionSourceIdsIS -} - -// bindParamGetProtectionSourcesJobRunsReportRequest binds the parameter runStatus -func (o *GetProtectionSourcesJobRunsReportRequestParams) bindParamRunStatus(formats strfmt.Registry) []string { - runStatusIR := o.RunStatus - - var runStatusIC []string - for _, runStatusIIR := range runStatusIR { // explode []string - - runStatusIIV := runStatusIIR // string as string - runStatusIC = append(runStatusIC, runStatusIIV) - } - - // items.CollectionFormat: "" - runStatusIS := swag.JoinByFormat(runStatusIC, "") - - return runStatusIS -} - -// bindParamGetProtectionSourcesJobRunsReportRequest binds the parameter tenantIds -func (o *GetProtectionSourcesJobRunsReportRequestParams) 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/v1/client/reports/get_protection_sources_job_runs_report_request_responses.go b/v1/client/reports/get_protection_sources_job_runs_report_request_responses.go deleted file mode 100644 index 2389fb72..00000000 --- a/v1/client/reports/get_protection_sources_job_runs_report_request_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionSourcesJobRunsReportRequestReader is a Reader for the GetProtectionSourcesJobRunsReportRequest structure. -type GetProtectionSourcesJobRunsReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourcesJobRunsReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourcesJobRunsReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourcesJobRunsReportRequestDefault(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 - } -} - -// NewGetProtectionSourcesJobRunsReportRequestOK creates a GetProtectionSourcesJobRunsReportRequestOK with default headers values -func NewGetProtectionSourcesJobRunsReportRequestOK() *GetProtectionSourcesJobRunsReportRequestOK { - return &GetProtectionSourcesJobRunsReportRequestOK{} -} - -/* -GetProtectionSourcesJobRunsReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourcesJobRunsReportRequestOK struct { - Payload []*models.ProtectionSourcesJobRunsReportElement -} - -// IsSuccess returns true when this get protection sources job runs report request o k response has a 2xx status code -func (o *GetProtectionSourcesJobRunsReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection sources job runs report request o k response has a 3xx status code -func (o *GetProtectionSourcesJobRunsReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection sources job runs report request o k response has a 4xx status code -func (o *GetProtectionSourcesJobRunsReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection sources job runs report request o k response has a 5xx status code -func (o *GetProtectionSourcesJobRunsReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection sources job runs report request o k response a status code equal to that given -func (o *GetProtectionSourcesJobRunsReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection sources job runs report request o k response -func (o *GetProtectionSourcesJobRunsReportRequestOK) Code() int { - return 200 -} - -func (o *GetProtectionSourcesJobRunsReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobRuns][%d] getProtectionSourcesJobRunsReportRequestOK %s", 200, payload) -} - -func (o *GetProtectionSourcesJobRunsReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobRuns][%d] getProtectionSourcesJobRunsReportRequestOK %s", 200, payload) -} - -func (o *GetProtectionSourcesJobRunsReportRequestOK) GetPayload() []*models.ProtectionSourcesJobRunsReportElement { - return o.Payload -} - -func (o *GetProtectionSourcesJobRunsReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourcesJobRunsReportRequestDefault creates a GetProtectionSourcesJobRunsReportRequestDefault with default headers values -func NewGetProtectionSourcesJobRunsReportRequestDefault(code int) *GetProtectionSourcesJobRunsReportRequestDefault { - return &GetProtectionSourcesJobRunsReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourcesJobRunsReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourcesJobRunsReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection sources job runs report request default response has a 2xx status code -func (o *GetProtectionSourcesJobRunsReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection sources job runs report request default response has a 3xx status code -func (o *GetProtectionSourcesJobRunsReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection sources job runs report request default response has a 4xx status code -func (o *GetProtectionSourcesJobRunsReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection sources job runs report request default response has a 5xx status code -func (o *GetProtectionSourcesJobRunsReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection sources job runs report request default response a status code equal to that given -func (o *GetProtectionSourcesJobRunsReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection sources job runs report request default response -func (o *GetProtectionSourcesJobRunsReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourcesJobRunsReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobRuns][%d] GetProtectionSourcesJobRunsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesJobRunsReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobRuns][%d] GetProtectionSourcesJobRunsReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesJobRunsReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionSourcesJobRunsReportRequestDefault) 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/reports/get_protection_sources_jobs_summary_report_request_parameters.go b/v1/client/reports/get_protection_sources_jobs_summary_report_request_parameters.go deleted file mode 100644 index 7d8f71b6..00000000 --- a/v1/client/reports/get_protection_sources_jobs_summary_report_request_parameters.go +++ /dev/null @@ -1,667 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourcesJobsSummaryReportRequestParams creates a new GetProtectionSourcesJobsSummaryReportRequestParams 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 NewGetProtectionSourcesJobsSummaryReportRequestParams() *GetProtectionSourcesJobsSummaryReportRequestParams { - return &GetProtectionSourcesJobsSummaryReportRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourcesJobsSummaryReportRequestParamsWithTimeout creates a new GetProtectionSourcesJobsSummaryReportRequestParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourcesJobsSummaryReportRequestParamsWithTimeout(timeout time.Duration) *GetProtectionSourcesJobsSummaryReportRequestParams { - return &GetProtectionSourcesJobsSummaryReportRequestParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourcesJobsSummaryReportRequestParamsWithContext creates a new GetProtectionSourcesJobsSummaryReportRequestParams object -// with the ability to set a context for a request. -func NewGetProtectionSourcesJobsSummaryReportRequestParamsWithContext(ctx context.Context) *GetProtectionSourcesJobsSummaryReportRequestParams { - return &GetProtectionSourcesJobsSummaryReportRequestParams{ - Context: ctx, - } -} - -// NewGetProtectionSourcesJobsSummaryReportRequestParamsWithHTTPClient creates a new GetProtectionSourcesJobsSummaryReportRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourcesJobsSummaryReportRequestParamsWithHTTPClient(client *http.Client) *GetProtectionSourcesJobsSummaryReportRequestParams { - return &GetProtectionSourcesJobsSummaryReportRequestParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourcesJobsSummaryReportRequestParams contains all the parameters to send to the API endpoint - - for the get protection sources jobs summary report request operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourcesJobsSummaryReportRequestParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* ConsecutiveFailures. - - Filters out those jobs which have number of consecutive run failures less - than consecutiveFailures. - - Format: int32 - */ - ConsecutiveFailures *int32 - - /* EndTimeUsecs. - - Filter by end time. Snapshot summary statistics - for Job Runs that ended before the specified time are returned. - Specify the end time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Environments. - - Filter by a list of environment types such as 'kVMware', 'kView', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* JobIds. - - Filter by a list of Job ids. Snapshots summary statistics - for the specified Protection Jobs are reported. - */ - JobIds []int64 - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* ProtectionSourceIds. - - Filter by a list of leaf Protection Sources Objects (such as VMs). - Snapshot summary statistics for the listed Protection Source Objects - are reported. - */ - ProtectionSourceIds []int64 - - /* RegisteredSourceID. - - Specifies an id of a top level Registered Source such as - a vCenter Server. If specified, Snapshot summary statistics for all - the leaf Protection Sources (such as VMs) that are children of this - Registered Source are reported. - NOTE: If specified, filtering by other fields is not supported. - - Format: int64 - */ - RegisteredSourceID *int64 - - /* ReportName. - - Specifies the custom report name the user wants to set for this report. - */ - ReportName *string - - /* ReportType. - - Specifies the report type that will be used to set the right label & - subject line for the report when downloaded or emailed because same API is - used for 3 reports currently - 1. kAvailableLocalSnapshotsReport - 2. kFailedObjectsReport - 3. kProtectionSummaryByObjectTypeReport - - Format: int32 - */ - ReportType *int32 - - /* StartTimeUsecs. - - Filter by a start time. Snapshot summary statistics - for Job Runs that started after the specified time are reported. - Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* Statuses. - - Filter by a list of run statuses. - 'kSuccess' indicates that the Job Run was successful. - 'kRunning' indicates that the Job Run is currently running. - 'kWarning' indicates that the Job Run was successful but warnings were - issued. - 'kCancelled' indicates that the Job Run was canceled. - 'kError' indicates the Job Run encountered an error and did not run to - completion. - */ - Statuses []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection sources jobs summary report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithDefaults() *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection sources jobs summary report request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithTimeout(timeout time.Duration) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithContext(ctx context.Context) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithHTTPClient(client *http.Client) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithConsecutiveFailures adds the consecutiveFailures to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithConsecutiveFailures(consecutiveFailures *int32) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetConsecutiveFailures(consecutiveFailures) - return o -} - -// SetConsecutiveFailures adds the consecutiveFailures to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetConsecutiveFailures(consecutiveFailures *int32) { - o.ConsecutiveFailures = consecutiveFailures -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvironments adds the environments to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithEnvironments(environments []string) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithJobIds adds the jobIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithJobIds(jobIds []int64) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithOutputFormat adds the outputFormat to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithOutputFormat(outputFormat *string) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithProtectionSourceIds adds the protectionSourceIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithProtectionSourceIds(protectionSourceIds []int64) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetProtectionSourceIds(protectionSourceIds) - return o -} - -// SetProtectionSourceIds adds the protectionSourceIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetProtectionSourceIds(protectionSourceIds []int64) { - o.ProtectionSourceIds = protectionSourceIds -} - -// WithRegisteredSourceID adds the registeredSourceID to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithRegisteredSourceID(registeredSourceID *int64) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetRegisteredSourceID(registeredSourceID) - return o -} - -// SetRegisteredSourceID adds the registeredSourceId to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetRegisteredSourceID(registeredSourceID *int64) { - o.RegisteredSourceID = registeredSourceID -} - -// WithReportName adds the reportName to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithReportName(reportName *string) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetReportName(reportName) - return o -} - -// SetReportName adds the reportName to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetReportName(reportName *string) { - o.ReportName = reportName -} - -// WithReportType adds the reportType to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithReportType(reportType *int32) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetReportType(reportType) - return o -} - -// SetReportType adds the reportType to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetReportType(reportType *int32) { - o.ReportType = reportType -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStatuses adds the statuses to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithStatuses(statuses []string) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetStatuses(statuses) - return o -} - -// SetStatuses adds the statuses to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetStatuses(statuses []string) { - o.Statuses = statuses -} - -// WithTenantIds adds the tenantIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WithTenantIds(tenantIds []string) *GetProtectionSourcesJobsSummaryReportRequestParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection sources jobs summary report request params -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.ConsecutiveFailures != nil { - - // query param consecutiveFailures - var qrConsecutiveFailures int32 - - if o.ConsecutiveFailures != nil { - qrConsecutiveFailures = *o.ConsecutiveFailures - } - qConsecutiveFailures := swag.FormatInt32(qrConsecutiveFailures) - if qConsecutiveFailures != "" { - - if err := r.SetQueryParam("consecutiveFailures", qConsecutiveFailures); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.ProtectionSourceIds != nil { - - // binding items for protectionSourceIds - joinedProtectionSourceIds := o.bindParamProtectionSourceIds(reg) - - // query array param protectionSourceIds - if err := r.SetQueryParam("protectionSourceIds", joinedProtectionSourceIds...); err != nil { - return err - } - } - - if o.RegisteredSourceID != nil { - - // query param registeredSourceId - var qrRegisteredSourceID int64 - - if o.RegisteredSourceID != nil { - qrRegisteredSourceID = *o.RegisteredSourceID - } - qRegisteredSourceID := swag.FormatInt64(qrRegisteredSourceID) - if qRegisteredSourceID != "" { - - if err := r.SetQueryParam("registeredSourceId", qRegisteredSourceID); err != nil { - return err - } - } - } - - if o.ReportName != nil { - - // query param reportName - var qrReportName string - - if o.ReportName != nil { - qrReportName = *o.ReportName - } - qReportName := qrReportName - if qReportName != "" { - - if err := r.SetQueryParam("reportName", qReportName); err != nil { - return err - } - } - } - - if o.ReportType != nil { - - // query param reportType - var qrReportType int32 - - if o.ReportType != nil { - qrReportType = *o.ReportType - } - qReportType := swag.FormatInt32(qrReportType) - if qReportType != "" { - - if err := r.SetQueryParam("reportType", qReportType); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.Statuses != nil { - - // binding items for statuses - joinedStatuses := o.bindParamStatuses(reg) - - // query array param statuses - if err := r.SetQueryParam("statuses", joinedStatuses...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionSourcesJobsSummaryReportRequest binds the parameter environments -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectionSourcesJobsSummaryReportRequest binds the parameter jobIds -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamGetProtectionSourcesJobsSummaryReportRequest binds the parameter protectionSourceIds -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) bindParamProtectionSourceIds(formats strfmt.Registry) []string { - protectionSourceIdsIR := o.ProtectionSourceIds - - var protectionSourceIdsIC []string - for _, protectionSourceIdsIIR := range protectionSourceIdsIR { // explode []int64 - - protectionSourceIdsIIV := swag.FormatInt64(protectionSourceIdsIIR) // int64 as string - protectionSourceIdsIC = append(protectionSourceIdsIC, protectionSourceIdsIIV) - } - - // items.CollectionFormat: "" - protectionSourceIdsIS := swag.JoinByFormat(protectionSourceIdsIC, "") - - return protectionSourceIdsIS -} - -// bindParamGetProtectionSourcesJobsSummaryReportRequest binds the parameter statuses -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) bindParamStatuses(formats strfmt.Registry) []string { - statusesIR := o.Statuses - - var statusesIC []string - for _, statusesIIR := range statusesIR { // explode []string - - statusesIIV := statusesIIR // string as string - statusesIC = append(statusesIC, statusesIIV) - } - - // items.CollectionFormat: "" - statusesIS := swag.JoinByFormat(statusesIC, "") - - return statusesIS -} - -// bindParamGetProtectionSourcesJobsSummaryReportRequest binds the parameter tenantIds -func (o *GetProtectionSourcesJobsSummaryReportRequestParams) 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/v1/client/reports/get_protection_sources_jobs_summary_report_request_responses.go b/v1/client/reports/get_protection_sources_jobs_summary_report_request_responses.go deleted file mode 100644 index 53318891..00000000 --- a/v1/client/reports/get_protection_sources_jobs_summary_report_request_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionSourcesJobsSummaryReportRequestReader is a Reader for the GetProtectionSourcesJobsSummaryReportRequest structure. -type GetProtectionSourcesJobsSummaryReportRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourcesJobsSummaryReportRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourcesJobsSummaryReportRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourcesJobsSummaryReportRequestDefault(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 - } -} - -// NewGetProtectionSourcesJobsSummaryReportRequestOK creates a GetProtectionSourcesJobsSummaryReportRequestOK with default headers values -func NewGetProtectionSourcesJobsSummaryReportRequestOK() *GetProtectionSourcesJobsSummaryReportRequestOK { - return &GetProtectionSourcesJobsSummaryReportRequestOK{} -} - -/* -GetProtectionSourcesJobsSummaryReportRequestOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourcesJobsSummaryReportRequestOK struct { - Payload *models.ProtectionSourcesJobsSummaryReportResponseWrapper -} - -// IsSuccess returns true when this get protection sources jobs summary report request o k response has a 2xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection sources jobs summary report request o k response has a 3xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection sources jobs summary report request o k response has a 4xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection sources jobs summary report request o k response has a 5xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection sources jobs summary report request o k response a status code equal to that given -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection sources jobs summary report request o k response -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) Code() int { - return 200 -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobsSummary][%d] getProtectionSourcesJobsSummaryReportRequestOK %s", 200, payload) -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobsSummary][%d] getProtectionSourcesJobsSummaryReportRequestOK %s", 200, payload) -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) GetPayload() *models.ProtectionSourcesJobsSummaryReportResponseWrapper { - return o.Payload -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionSourcesJobsSummaryReportResponseWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourcesJobsSummaryReportRequestDefault creates a GetProtectionSourcesJobsSummaryReportRequestDefault with default headers values -func NewGetProtectionSourcesJobsSummaryReportRequestDefault(code int) *GetProtectionSourcesJobsSummaryReportRequestDefault { - return &GetProtectionSourcesJobsSummaryReportRequestDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourcesJobsSummaryReportRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourcesJobsSummaryReportRequestDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get protection sources jobs summary report request default response has a 2xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection sources jobs summary report request default response has a 3xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection sources jobs summary report request default response has a 4xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection sources jobs summary report request default response has a 5xx status code -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection sources jobs summary report request default response a status code equal to that given -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection sources jobs summary report request default response -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobsSummary][%d] GetProtectionSourcesJobsSummaryReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/reports/protectionSourcesJobsSummary][%d] GetProtectionSourcesJobsSummaryReportRequest default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetProtectionSourcesJobsSummaryReportRequestDefault) 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/reports/reports_client.go b/v1/client/reports/reports_client.go deleted file mode 100644 index be5ed8b0..00000000 --- a/v1/client/reports/reports_client.go +++ /dev/null @@ -1,420 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package reports - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new reports API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new reports API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new reports API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for reports API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAgentDeploymentReport(params *GetAgentDeploymentReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAgentDeploymentReportOK, error) - - GetCloudArchiveReportRequest(params *GetCloudArchiveReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudArchiveReportRequestOK, error) - - GetDataTransferFromVaultsReportRequest(params *GetDataTransferFromVaultsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTransferFromVaultsReportRequestOK, error) - - GetDataTransferToVaultsReportRequest(params *GetDataTransferToVaultsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTransferToVaultsReportRequestOK, error) - - GetGdprReport(params *GetGdprReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGdprReportOK, error) - - GetProtectedObjectsTrendsReportRequest(params *GetProtectedObjectsTrendsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsTrendsReportRequestOK, error) - - GetProtectionSourcesJobRunsReportRequest(params *GetProtectionSourcesJobRunsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesJobRunsReportRequestOK, error) - - GetProtectionSourcesJobsSummaryReportRequest(params *GetProtectionSourcesJobsSummaryReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesJobsSummaryReportRequestOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetAgentDeploymentReport Get the list of all the installed agents which includes the health status and - -upgradability of the agent. -*/ -func (a *Client) GetAgentDeploymentReport(params *GetAgentDeploymentReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAgentDeploymentReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAgentDeploymentReportParams() - } - op := &runtime.ClientOperation{ - ID: "GetAgentDeploymentReport", - Method: "GET", - PathPattern: "/public/reports/agents", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAgentDeploymentReportReader{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.(*GetAgentDeploymentReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAgentDeploymentReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetCloudArchiveReportRequest gets summary statistics about succesful failed job runs queued archival jobs - - last run status by each protection job. - -Cohesity Cluster to Vaults (External Targets). -*/ -func (a *Client) GetCloudArchiveReportRequest(params *GetCloudArchiveReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudArchiveReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCloudArchiveReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetCloudArchiveReportRequest", - Method: "GET", - PathPattern: "/public/reports/cloudArchiveReport", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCloudArchiveReportRequestReader{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.(*GetCloudArchiveReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCloudArchiveReportRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetDataTransferFromVaultsReportRequest gets summary statistics about transferring data from vaults external targets to this cohesity cluster - - A Vault can provide an additional Cloud Tier where cold data of the - -Cohesity Cluster is stored in the Cloud. -A Vault can also provide archive storage for backup data. -This archive data is stored on Tapes and in Cloud Vaults. -*/ -func (a *Client) GetDataTransferFromVaultsReportRequest(params *GetDataTransferFromVaultsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTransferFromVaultsReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTransferFromVaultsReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTransferFromVaultsReportRequest", - Method: "GET", - PathPattern: "/public/reports/dataTransferFromVaults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTransferFromVaultsReportRequestReader{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.(*GetDataTransferFromVaultsReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTransferFromVaultsReportRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetDataTransferToVaultsReportRequest gets summary statistics about transferring data from the cohesity cluster to vaults external targets - - A Vault can provide an additional Cloud Tier where cold data of the - -Cohesity Cluster can be stored in the Cloud. -A Vault can also provide archive storage for backup data. -This archive data is stored on Tapes and in Cloud Vaults. -*/ -func (a *Client) GetDataTransferToVaultsReportRequest(params *GetDataTransferToVaultsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTransferToVaultsReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTransferToVaultsReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTransferToVaultsReportRequest", - Method: "GET", - PathPattern: "/public/reports/dataTransferToVaults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTransferToVaultsReportRequestReader{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.(*GetDataTransferToVaultsReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTransferToVaultsReportRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetGdprReport gets gdpr report related information - -Returns the GDPR report information. -*/ -func (a *Client) GetGdprReport(params *GetGdprReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGdprReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetGdprReportParams() - } - op := &runtime.ClientOperation{ - ID: "GetGdprReport", - Method: "GET", - PathPattern: "/public/reports/gdpr", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetGdprReportReader{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.(*GetGdprReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetGdprReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectedObjectsTrendsReportRequest gets protected objects trends grouped by days weeks months - - This gives a summary of protection trend for protected resources during the - -given time range. -If no roll up is specified, then the trends will be grouped by days. -*/ -func (a *Client) GetProtectedObjectsTrendsReportRequest(params *GetProtectedObjectsTrendsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsTrendsReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectedObjectsTrendsReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectedObjectsTrendsReportRequest", - Method: "GET", - PathPattern: "/public/reports/protectedObjectsTrends", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectedObjectsTrendsReportRequestReader{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.(*GetProtectedObjectsTrendsReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectedObjectsTrendsReportRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionSourcesJobRunsReportRequest gets protection details about the specified list of leaf protection source objects such as a v ms - - Returns the Snapshots that contain backups of the specified - -Protection Source Objects and match the specified filter criteria. -*/ -func (a *Client) GetProtectionSourcesJobRunsReportRequest(params *GetProtectionSourcesJobRunsReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesJobRunsReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourcesJobRunsReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSourcesJobRunsReportRequest", - Method: "GET", - PathPattern: "/public/reports/protectionSourcesJobRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourcesJobRunsReportRequestReader{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.(*GetProtectionSourcesJobRunsReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourcesJobRunsReportRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetProtectionSourcesJobsSummaryReportRequest gets job run snapshot summary statistics about the leaf protection sources objects that match the specified filter criteria - - For example, if two Job ids are passed in, Snapshot summary statistics about - -all the leaf Objects that have been protected by the two specified -Jobs are reported. -For example, if a top level registered Source id is passed in, summary -statistics about all the Snapshots backing up leaf Objects in -the specified Source are reported. -*/ -func (a *Client) GetProtectionSourcesJobsSummaryReportRequest(params *GetProtectionSourcesJobsSummaryReportRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesJobsSummaryReportRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourcesJobsSummaryReportRequestParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSourcesJobsSummaryReportRequest", - Method: "GET", - PathPattern: "/public/reports/protectionSourcesJobsSummary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourcesJobsSummaryReportRequestReader{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.(*GetProtectionSourcesJobsSummaryReportRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourcesJobsSummaryReportRequestDefault) - 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/restore/recover_vms_parameters.go b/v1/client/restore/recover_vms_parameters.go deleted file mode 100644 index 1065c18e..00000000 --- a/v1/client/restore/recover_vms_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRecoverVmsParams creates a new RecoverVmsParams 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 NewRecoverVmsParams() *RecoverVmsParams { - return &RecoverVmsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRecoverVmsParamsWithTimeout creates a new RecoverVmsParams object -// with the ability to set a timeout on a request. -func NewRecoverVmsParamsWithTimeout(timeout time.Duration) *RecoverVmsParams { - return &RecoverVmsParams{ - timeout: timeout, - } -} - -// NewRecoverVmsParamsWithContext creates a new RecoverVmsParams object -// with the ability to set a context for a request. -func NewRecoverVmsParamsWithContext(ctx context.Context) *RecoverVmsParams { - return &RecoverVmsParams{ - Context: ctx, - } -} - -// NewRecoverVmsParamsWithHTTPClient creates a new RecoverVmsParams object -// with the ability to set a custom HTTPClient for a request. -func NewRecoverVmsParamsWithHTTPClient(client *http.Client) *RecoverVmsParams { - return &RecoverVmsParams{ - HTTPClient: client, - } -} - -/* -RecoverVmsParams contains all the parameters to send to the API endpoint - - for the recover vms operation. - - Typically these are written to a http.Request. -*/ -type RecoverVmsParams struct { - - /* Body. - - Recover VM argument - */ - Body *models.RecoverArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the recover vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RecoverVmsParams) WithDefaults() *RecoverVmsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the recover vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RecoverVmsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the recover vms params -func (o *RecoverVmsParams) WithTimeout(timeout time.Duration) *RecoverVmsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the recover vms params -func (o *RecoverVmsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the recover vms params -func (o *RecoverVmsParams) WithContext(ctx context.Context) *RecoverVmsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the recover vms params -func (o *RecoverVmsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the recover vms params -func (o *RecoverVmsParams) WithHTTPClient(client *http.Client) *RecoverVmsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the recover vms params -func (o *RecoverVmsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the recover vms params -func (o *RecoverVmsParams) WithBody(body *models.RecoverArg) *RecoverVmsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the recover vms params -func (o *RecoverVmsParams) SetBody(body *models.RecoverArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RecoverVmsParams) 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/restore/recover_vms_responses.go b/v1/client/restore/recover_vms_responses.go deleted file mode 100644 index 2ce94cba..00000000 --- a/v1/client/restore/recover_vms_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RecoverVmsReader is a Reader for the RecoverVms structure. -type RecoverVmsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RecoverVmsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRecoverVmsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRecoverVmsDefault(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 - } -} - -// NewRecoverVmsOK creates a RecoverVmsOK with default headers values -func NewRecoverVmsOK() *RecoverVmsOK { - return &RecoverVmsOK{} -} - -/* -RecoverVmsOK describes a response with status code 200, with default header values. - -Success -*/ -type RecoverVmsOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this recover vms o k response has a 2xx status code -func (o *RecoverVmsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this recover vms o k response has a 3xx status code -func (o *RecoverVmsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this recover vms o k response has a 4xx status code -func (o *RecoverVmsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this recover vms o k response has a 5xx status code -func (o *RecoverVmsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this recover vms o k response a status code equal to that given -func (o *RecoverVmsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the recover vms o k response -func (o *RecoverVmsOK) Code() int { - return 200 -} - -func (o *RecoverVmsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restore][%d] recoverVmsOK %s", 200, payload) -} - -func (o *RecoverVmsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restore][%d] recoverVmsOK %s", 200, payload) -} - -func (o *RecoverVmsOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *RecoverVmsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRecoverVmsDefault creates a RecoverVmsDefault with default headers values -func NewRecoverVmsDefault(code int) *RecoverVmsDefault { - return &RecoverVmsDefault{ - _statusCode: code, - } -} - -/* -RecoverVmsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RecoverVmsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this recover vms default response has a 2xx status code -func (o *RecoverVmsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this recover vms default response has a 3xx status code -func (o *RecoverVmsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this recover vms default response has a 4xx status code -func (o *RecoverVmsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this recover vms default response has a 5xx status code -func (o *RecoverVmsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this recover vms default response a status code equal to that given -func (o *RecoverVmsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the recover vms default response -func (o *RecoverVmsDefault) Code() int { - return o._statusCode -} - -func (o *RecoverVmsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restore][%d] RecoverVms default %s", o._statusCode, payload) -} - -func (o *RecoverVmsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restore][%d] RecoverVms default %s", o._statusCode, payload) -} - -func (o *RecoverVmsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RecoverVmsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore/restore_client.go b/v1/client/restore/restore_client.go deleted file mode 100644 index 3c994be3..00000000 --- a/v1/client/restore/restore_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new restore API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new restore API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new restore API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for restore API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - RecoverVms(params *RecoverVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RecoverVmsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -RecoverVms recovers v ms -*/ -func (a *Client) RecoverVms(params *RecoverVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RecoverVmsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRecoverVmsParams() - } - op := &runtime.ClientOperation{ - ID: "RecoverVms", - Method: "POST", - PathPattern: "/restore", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RecoverVmsReader{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.(*RecoverVmsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RecoverVmsDefault) - 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/restore_app/check_restore_app_task_parameters.go b/v1/client/restore_app/check_restore_app_task_parameters.go deleted file mode 100644 index 22926586..00000000 --- a/v1/client/restore_app/check_restore_app_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCheckRestoreAppTaskParams creates a new CheckRestoreAppTaskParams 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 NewCheckRestoreAppTaskParams() *CheckRestoreAppTaskParams { - return &CheckRestoreAppTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCheckRestoreAppTaskParamsWithTimeout creates a new CheckRestoreAppTaskParams object -// with the ability to set a timeout on a request. -func NewCheckRestoreAppTaskParamsWithTimeout(timeout time.Duration) *CheckRestoreAppTaskParams { - return &CheckRestoreAppTaskParams{ - timeout: timeout, - } -} - -// NewCheckRestoreAppTaskParamsWithContext creates a new CheckRestoreAppTaskParams object -// with the ability to set a context for a request. -func NewCheckRestoreAppTaskParamsWithContext(ctx context.Context) *CheckRestoreAppTaskParams { - return &CheckRestoreAppTaskParams{ - Context: ctx, - } -} - -// NewCheckRestoreAppTaskParamsWithHTTPClient creates a new CheckRestoreAppTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCheckRestoreAppTaskParamsWithHTTPClient(client *http.Client) *CheckRestoreAppTaskParams { - return &CheckRestoreAppTaskParams{ - HTTPClient: client, - } -} - -/* -CheckRestoreAppTaskParams contains all the parameters to send to the API endpoint - - for the check restore app task operation. - - Typically these are written to a http.Request. -*/ -type CheckRestoreAppTaskParams struct { - - /* Body. - - Check Restore Application Task argument - */ - Body *models.CheckRestoreAppTaskArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the check restore app task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CheckRestoreAppTaskParams) WithDefaults() *CheckRestoreAppTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the check restore app task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CheckRestoreAppTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the check restore app task params -func (o *CheckRestoreAppTaskParams) WithTimeout(timeout time.Duration) *CheckRestoreAppTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the check restore app task params -func (o *CheckRestoreAppTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the check restore app task params -func (o *CheckRestoreAppTaskParams) WithContext(ctx context.Context) *CheckRestoreAppTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the check restore app task params -func (o *CheckRestoreAppTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the check restore app task params -func (o *CheckRestoreAppTaskParams) WithHTTPClient(client *http.Client) *CheckRestoreAppTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the check restore app task params -func (o *CheckRestoreAppTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the check restore app task params -func (o *CheckRestoreAppTaskParams) WithBody(body *models.CheckRestoreAppTaskArg) *CheckRestoreAppTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the check restore app task params -func (o *CheckRestoreAppTaskParams) SetBody(body *models.CheckRestoreAppTaskArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CheckRestoreAppTaskParams) 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/restore_app/check_restore_app_task_responses.go b/v1/client/restore_app/check_restore_app_task_responses.go deleted file mode 100644 index 898c053e..00000000 --- a/v1/client/restore_app/check_restore_app_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CheckRestoreAppTaskReader is a Reader for the CheckRestoreAppTask structure. -type CheckRestoreAppTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CheckRestoreAppTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCheckRestoreAppTaskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCheckRestoreAppTaskDefault(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 - } -} - -// NewCheckRestoreAppTaskOK creates a CheckRestoreAppTaskOK with default headers values -func NewCheckRestoreAppTaskOK() *CheckRestoreAppTaskOK { - return &CheckRestoreAppTaskOK{} -} - -/* -CheckRestoreAppTaskOK describes a response with status code 200, with default header values. - -Success -*/ -type CheckRestoreAppTaskOK struct { - Payload *models.CheckRestoreAppTaskResult -} - -// IsSuccess returns true when this check restore app task o k response has a 2xx status code -func (o *CheckRestoreAppTaskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this check restore app task o k response has a 3xx status code -func (o *CheckRestoreAppTaskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this check restore app task o k response has a 4xx status code -func (o *CheckRestoreAppTaskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this check restore app task o k response has a 5xx status code -func (o *CheckRestoreAppTaskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this check restore app task o k response a status code equal to that given -func (o *CheckRestoreAppTaskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the check restore app task o k response -func (o *CheckRestoreAppTaskOK) Code() int { - return 200 -} - -func (o *CheckRestoreAppTaskOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/validate][%d] checkRestoreAppTaskOK %s", 200, payload) -} - -func (o *CheckRestoreAppTaskOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/validate][%d] checkRestoreAppTaskOK %s", 200, payload) -} - -func (o *CheckRestoreAppTaskOK) GetPayload() *models.CheckRestoreAppTaskResult { - return o.Payload -} - -func (o *CheckRestoreAppTaskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CheckRestoreAppTaskResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCheckRestoreAppTaskDefault creates a CheckRestoreAppTaskDefault with default headers values -func NewCheckRestoreAppTaskDefault(code int) *CheckRestoreAppTaskDefault { - return &CheckRestoreAppTaskDefault{ - _statusCode: code, - } -} - -/* -CheckRestoreAppTaskDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type CheckRestoreAppTaskDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this check restore app task default response has a 2xx status code -func (o *CheckRestoreAppTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this check restore app task default response has a 3xx status code -func (o *CheckRestoreAppTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this check restore app task default response has a 4xx status code -func (o *CheckRestoreAppTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this check restore app task default response has a 5xx status code -func (o *CheckRestoreAppTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this check restore app task default response a status code equal to that given -func (o *CheckRestoreAppTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the check restore app task default response -func (o *CheckRestoreAppTaskDefault) Code() int { - return o._statusCode -} - -func (o *CheckRestoreAppTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/validate][%d] CheckRestoreAppTask default %s", o._statusCode, payload) -} - -func (o *CheckRestoreAppTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/validate][%d] CheckRestoreAppTask default %s", o._statusCode, payload) -} - -func (o *CheckRestoreAppTaskDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *CheckRestoreAppTaskDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore_app/get_restore_app_time_ranges_parameters.go b/v1/client/restore_app/get_restore_app_time_ranges_parameters.go deleted file mode 100644 index 8edc7e6b..00000000 --- a/v1/client/restore_app/get_restore_app_time_ranges_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGetRestoreAppTimeRangesParams creates a new GetRestoreAppTimeRangesParams 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 NewGetRestoreAppTimeRangesParams() *GetRestoreAppTimeRangesParams { - return &GetRestoreAppTimeRangesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreAppTimeRangesParamsWithTimeout creates a new GetRestoreAppTimeRangesParams object -// with the ability to set a timeout on a request. -func NewGetRestoreAppTimeRangesParamsWithTimeout(timeout time.Duration) *GetRestoreAppTimeRangesParams { - return &GetRestoreAppTimeRangesParams{ - timeout: timeout, - } -} - -// NewGetRestoreAppTimeRangesParamsWithContext creates a new GetRestoreAppTimeRangesParams object -// with the ability to set a context for a request. -func NewGetRestoreAppTimeRangesParamsWithContext(ctx context.Context) *GetRestoreAppTimeRangesParams { - return &GetRestoreAppTimeRangesParams{ - Context: ctx, - } -} - -// NewGetRestoreAppTimeRangesParamsWithHTTPClient creates a new GetRestoreAppTimeRangesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreAppTimeRangesParamsWithHTTPClient(client *http.Client) *GetRestoreAppTimeRangesParams { - return &GetRestoreAppTimeRangesParams{ - HTTPClient: client, - } -} - -/* -GetRestoreAppTimeRangesParams contains all the parameters to send to the API endpoint - - for the get restore app time ranges operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreAppTimeRangesParams struct { - - /* Body. - - Get Restore Application Time Ranges argument - */ - Body *models.GetRestoreAppTimeRangesArg - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore app time ranges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreAppTimeRangesParams) WithDefaults() *GetRestoreAppTimeRangesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore app time ranges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreAppTimeRangesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) WithTimeout(timeout time.Duration) *GetRestoreAppTimeRangesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) WithContext(ctx context.Context) *GetRestoreAppTimeRangesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) WithHTTPClient(client *http.Client) *GetRestoreAppTimeRangesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) WithBody(body *models.GetRestoreAppTimeRangesArg) *GetRestoreAppTimeRangesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get restore app time ranges params -func (o *GetRestoreAppTimeRangesParams) SetBody(body *models.GetRestoreAppTimeRangesArg) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreAppTimeRangesParams) 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/restore_app/get_restore_app_time_ranges_responses.go b/v1/client/restore_app/get_restore_app_time_ranges_responses.go deleted file mode 100644 index b5daf1ac..00000000 --- a/v1/client/restore_app/get_restore_app_time_ranges_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_app - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreAppTimeRangesReader is a Reader for the GetRestoreAppTimeRanges structure. -type GetRestoreAppTimeRangesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreAppTimeRangesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreAppTimeRangesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreAppTimeRangesDefault(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 - } -} - -// NewGetRestoreAppTimeRangesOK creates a GetRestoreAppTimeRangesOK with default headers values -func NewGetRestoreAppTimeRangesOK() *GetRestoreAppTimeRangesOK { - return &GetRestoreAppTimeRangesOK{} -} - -/* -GetRestoreAppTimeRangesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreAppTimeRangesOK struct { - Payload *models.GetRestoreAppTimeRangesResult -} - -// IsSuccess returns true when this get restore app time ranges o k response has a 2xx status code -func (o *GetRestoreAppTimeRangesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore app time ranges o k response has a 3xx status code -func (o *GetRestoreAppTimeRangesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore app time ranges o k response has a 4xx status code -func (o *GetRestoreAppTimeRangesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore app time ranges o k response has a 5xx status code -func (o *GetRestoreAppTimeRangesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore app time ranges o k response a status code equal to that given -func (o *GetRestoreAppTimeRangesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore app time ranges o k response -func (o *GetRestoreAppTimeRangesOK) Code() int { - return 200 -} - -func (o *GetRestoreAppTimeRangesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/timeRanges][%d] getRestoreAppTimeRangesOK %s", 200, payload) -} - -func (o *GetRestoreAppTimeRangesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/timeRanges][%d] getRestoreAppTimeRangesOK %s", 200, payload) -} - -func (o *GetRestoreAppTimeRangesOK) GetPayload() *models.GetRestoreAppTimeRangesResult { - return o.Payload -} - -func (o *GetRestoreAppTimeRangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetRestoreAppTimeRangesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreAppTimeRangesDefault creates a GetRestoreAppTimeRangesDefault with default headers values -func NewGetRestoreAppTimeRangesDefault(code int) *GetRestoreAppTimeRangesDefault { - return &GetRestoreAppTimeRangesDefault{ - _statusCode: code, - } -} - -/* -GetRestoreAppTimeRangesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetRestoreAppTimeRangesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get restore app time ranges default response has a 2xx status code -func (o *GetRestoreAppTimeRangesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore app time ranges default response has a 3xx status code -func (o *GetRestoreAppTimeRangesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore app time ranges default response has a 4xx status code -func (o *GetRestoreAppTimeRangesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore app time ranges default response has a 5xx status code -func (o *GetRestoreAppTimeRangesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore app time ranges default response a status code equal to that given -func (o *GetRestoreAppTimeRangesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore app time ranges default response -func (o *GetRestoreAppTimeRangesDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreAppTimeRangesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/timeRanges][%d] GetRestoreAppTimeRanges default %s", o._statusCode, payload) -} - -func (o *GetRestoreAppTimeRangesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreApp/timeRanges][%d] GetRestoreAppTimeRanges default %s", o._statusCode, payload) -} - -func (o *GetRestoreAppTimeRangesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetRestoreAppTimeRangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore_app/restore_app_client.go b/v1/client/restore_app/restore_app_client.go deleted file mode 100644 index 35be8045..00000000 --- a/v1/client/restore_app/restore_app_client.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_app - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new restore app API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new restore app API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new restore app API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for restore app API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CheckRestoreAppTask(params *CheckRestoreAppTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CheckRestoreAppTaskOK, error) - - GetRestoreAppTimeRanges(params *GetRestoreAppTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreAppTimeRangesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CheckRestoreAppTask validates whether parameters specified for restoring snapshots are valid -*/ -func (a *Client) CheckRestoreAppTask(params *CheckRestoreAppTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CheckRestoreAppTaskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCheckRestoreAppTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CheckRestoreAppTask", - Method: "POST", - PathPattern: "/restoreApp/validate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CheckRestoreAppTaskReader{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.(*CheckRestoreAppTaskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CheckRestoreAppTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRestoreAppTimeRanges gets valid time ranges for an application restore -*/ -func (a *Client) GetRestoreAppTimeRanges(params *GetRestoreAppTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreAppTimeRangesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreAppTimeRangesParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreAppTimeRanges", - Method: "POST", - PathPattern: "/restoreApp/timeRanges", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreAppTimeRangesReader{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.(*GetRestoreAppTimeRangesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreAppTimeRangesDefault) - 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/restore_files/restore_files_client.go b/v1/client/restore_files/restore_files_client.go deleted file mode 100644 index 1b749b79..00000000 --- a/v1/client/restore_files/restore_files_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_files - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new restore files API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new restore files API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new restore files API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for restore files API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - RestoreFiles(params *RestoreFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RestoreFilesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -RestoreFiles restores files -*/ -func (a *Client) RestoreFiles(params *RestoreFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RestoreFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRestoreFilesParams() - } - op := &runtime.ClientOperation{ - ID: "RestoreFiles", - Method: "POST", - PathPattern: "/restoreFiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RestoreFilesReader{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.(*RestoreFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RestoreFilesDefault) - 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/restore_files/restore_files_parameters.go b/v1/client/restore_files/restore_files_parameters.go deleted file mode 100644 index 256df351..00000000 --- a/v1/client/restore_files/restore_files_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_files - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRestoreFilesParams creates a new RestoreFilesParams 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 NewRestoreFilesParams() *RestoreFilesParams { - return &RestoreFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRestoreFilesParamsWithTimeout creates a new RestoreFilesParams object -// with the ability to set a timeout on a request. -func NewRestoreFilesParamsWithTimeout(timeout time.Duration) *RestoreFilesParams { - return &RestoreFilesParams{ - timeout: timeout, - } -} - -// NewRestoreFilesParamsWithContext creates a new RestoreFilesParams object -// with the ability to set a context for a request. -func NewRestoreFilesParamsWithContext(ctx context.Context) *RestoreFilesParams { - return &RestoreFilesParams{ - Context: ctx, - } -} - -// NewRestoreFilesParamsWithHTTPClient creates a new RestoreFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewRestoreFilesParamsWithHTTPClient(client *http.Client) *RestoreFilesParams { - return &RestoreFilesParams{ - HTTPClient: client, - } -} - -/* -RestoreFilesParams contains all the parameters to send to the API endpoint - - for the restore files operation. - - Typically these are written to a http.Request. -*/ -type RestoreFilesParams struct { - - /* Body. - - Restore Files argument - */ - Body *models.RestoreFileParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the restore files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RestoreFilesParams) WithDefaults() *RestoreFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the restore files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RestoreFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the restore files params -func (o *RestoreFilesParams) WithTimeout(timeout time.Duration) *RestoreFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the restore files params -func (o *RestoreFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the restore files params -func (o *RestoreFilesParams) WithContext(ctx context.Context) *RestoreFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the restore files params -func (o *RestoreFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the restore files params -func (o *RestoreFilesParams) WithHTTPClient(client *http.Client) *RestoreFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the restore files params -func (o *RestoreFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the restore files params -func (o *RestoreFilesParams) WithBody(body *models.RestoreFileParams) *RestoreFilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the restore files params -func (o *RestoreFilesParams) SetBody(body *models.RestoreFileParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RestoreFilesParams) 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/restore_files/restore_files_responses.go b/v1/client/restore_files/restore_files_responses.go deleted file mode 100644 index 0756f7f6..00000000 --- a/v1/client/restore_files/restore_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_files - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RestoreFilesReader is a Reader for the RestoreFiles structure. -type RestoreFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RestoreFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRestoreFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRestoreFilesDefault(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 - } -} - -// NewRestoreFilesOK creates a RestoreFilesOK with default headers values -func NewRestoreFilesOK() *RestoreFilesOK { - return &RestoreFilesOK{} -} - -/* -RestoreFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type RestoreFilesOK struct { - Payload *models.RestoreTaskWrapper -} - -// IsSuccess returns true when this restore files o k response has a 2xx status code -func (o *RestoreFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this restore files o k response has a 3xx status code -func (o *RestoreFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this restore files o k response has a 4xx status code -func (o *RestoreFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this restore files o k response has a 5xx status code -func (o *RestoreFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this restore files o k response a status code equal to that given -func (o *RestoreFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the restore files o k response -func (o *RestoreFilesOK) Code() int { - return 200 -} - -func (o *RestoreFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreFiles][%d] restoreFilesOK %s", 200, payload) -} - -func (o *RestoreFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreFiles][%d] restoreFilesOK %s", 200, payload) -} - -func (o *RestoreFilesOK) GetPayload() *models.RestoreTaskWrapper { - return o.Payload -} - -func (o *RestoreFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTaskWrapper) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRestoreFilesDefault creates a RestoreFilesDefault with default headers values -func NewRestoreFilesDefault(code int) *RestoreFilesDefault { - return &RestoreFilesDefault{ - _statusCode: code, - } -} - -/* -RestoreFilesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type RestoreFilesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this restore files default response has a 2xx status code -func (o *RestoreFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this restore files default response has a 3xx status code -func (o *RestoreFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this restore files default response has a 4xx status code -func (o *RestoreFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this restore files default response has a 5xx status code -func (o *RestoreFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this restore files default response a status code equal to that given -func (o *RestoreFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the restore files default response -func (o *RestoreFilesDefault) Code() int { - return o._statusCode -} - -func (o *RestoreFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreFiles][%d] RestoreFiles default %s", o._statusCode, payload) -} - -func (o *RestoreFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /restoreFiles][%d] RestoreFiles default %s", o._statusCode, payload) -} - -func (o *RestoreFilesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *RestoreFilesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore_tasks/ad_objects_restore_status_parameters.go b/v1/client/restore_tasks/ad_objects_restore_status_parameters.go deleted file mode 100644 index 8f2e8ab4..00000000 --- a/v1/client/restore_tasks/ad_objects_restore_status_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewAdObjectsRestoreStatusParams creates a new AdObjectsRestoreStatusParams 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 NewAdObjectsRestoreStatusParams() *AdObjectsRestoreStatusParams { - return &AdObjectsRestoreStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAdObjectsRestoreStatusParamsWithTimeout creates a new AdObjectsRestoreStatusParams object -// with the ability to set a timeout on a request. -func NewAdObjectsRestoreStatusParamsWithTimeout(timeout time.Duration) *AdObjectsRestoreStatusParams { - return &AdObjectsRestoreStatusParams{ - timeout: timeout, - } -} - -// NewAdObjectsRestoreStatusParamsWithContext creates a new AdObjectsRestoreStatusParams object -// with the ability to set a context for a request. -func NewAdObjectsRestoreStatusParamsWithContext(ctx context.Context) *AdObjectsRestoreStatusParams { - return &AdObjectsRestoreStatusParams{ - Context: ctx, - } -} - -// NewAdObjectsRestoreStatusParamsWithHTTPClient creates a new AdObjectsRestoreStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewAdObjectsRestoreStatusParamsWithHTTPClient(client *http.Client) *AdObjectsRestoreStatusParams { - return &AdObjectsRestoreStatusParams{ - HTTPClient: client, - } -} - -/* -AdObjectsRestoreStatusParams contains all the parameters to send to the API endpoint - - for the ad objects restore status operation. - - Typically these are written to a http.Request. -*/ -type AdObjectsRestoreStatusParams struct { - - /* RestoreTaskID. - - Specifies the restoreTaskId corresponding to which we need to get - information about the restore of the AD objects. - - Format: int64 - */ - RestoreTaskID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ad objects restore status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AdObjectsRestoreStatusParams) WithDefaults() *AdObjectsRestoreStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ad objects restore status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AdObjectsRestoreStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) WithTimeout(timeout time.Duration) *AdObjectsRestoreStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) WithContext(ctx context.Context) *AdObjectsRestoreStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) WithHTTPClient(client *http.Client) *AdObjectsRestoreStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRestoreTaskID adds the restoreTaskID to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) WithRestoreTaskID(restoreTaskID *int64) *AdObjectsRestoreStatusParams { - o.SetRestoreTaskID(restoreTaskID) - return o -} - -// SetRestoreTaskID adds the restoreTaskId to the ad objects restore status params -func (o *AdObjectsRestoreStatusParams) SetRestoreTaskID(restoreTaskID *int64) { - o.RestoreTaskID = restoreTaskID -} - -// WriteToRequest writes these params to a swagger request -func (o *AdObjectsRestoreStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.RestoreTaskID != nil { - - // query param restoreTaskId - var qrRestoreTaskID int64 - - if o.RestoreTaskID != nil { - qrRestoreTaskID = *o.RestoreTaskID - } - qRestoreTaskID := swag.FormatInt64(qrRestoreTaskID) - if qRestoreTaskID != "" { - - if err := r.SetQueryParam("restoreTaskId", qRestoreTaskID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/ad_objects_restore_status_responses.go b/v1/client/restore_tasks/ad_objects_restore_status_responses.go deleted file mode 100644 index 94c32120..00000000 --- a/v1/client/restore_tasks/ad_objects_restore_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AdObjectsRestoreStatusReader is a Reader for the AdObjectsRestoreStatus structure. -type AdObjectsRestoreStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AdObjectsRestoreStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAdObjectsRestoreStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAdObjectsRestoreStatusDefault(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 - } -} - -// NewAdObjectsRestoreStatusOK creates a AdObjectsRestoreStatusOK with default headers values -func NewAdObjectsRestoreStatusOK() *AdObjectsRestoreStatusOK { - return &AdObjectsRestoreStatusOK{} -} - -/* -AdObjectsRestoreStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type AdObjectsRestoreStatusOK struct { - Payload *models.AdObjectsRestoreStatus -} - -// IsSuccess returns true when this ad objects restore status o k response has a 2xx status code -func (o *AdObjectsRestoreStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ad objects restore status o k response has a 3xx status code -func (o *AdObjectsRestoreStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ad objects restore status o k response has a 4xx status code -func (o *AdObjectsRestoreStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ad objects restore status o k response has a 5xx status code -func (o *AdObjectsRestoreStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ad objects restore status o k response a status code equal to that given -func (o *AdObjectsRestoreStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ad objects restore status o k response -func (o *AdObjectsRestoreStatusOK) Code() int { - return 200 -} - -func (o *AdObjectsRestoreStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/status][%d] adObjectsRestoreStatusOK %s", 200, payload) -} - -func (o *AdObjectsRestoreStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/status][%d] adObjectsRestoreStatusOK %s", 200, payload) -} - -func (o *AdObjectsRestoreStatusOK) GetPayload() *models.AdObjectsRestoreStatus { - return o.Payload -} - -func (o *AdObjectsRestoreStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AdObjectsRestoreStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAdObjectsRestoreStatusDefault creates a AdObjectsRestoreStatusDefault with default headers values -func NewAdObjectsRestoreStatusDefault(code int) *AdObjectsRestoreStatusDefault { - return &AdObjectsRestoreStatusDefault{ - _statusCode: code, - } -} - -/* -AdObjectsRestoreStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type AdObjectsRestoreStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this ad objects restore status default response has a 2xx status code -func (o *AdObjectsRestoreStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ad objects restore status default response has a 3xx status code -func (o *AdObjectsRestoreStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ad objects restore status default response has a 4xx status code -func (o *AdObjectsRestoreStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ad objects restore status default response has a 5xx status code -func (o *AdObjectsRestoreStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ad objects restore status default response a status code equal to that given -func (o *AdObjectsRestoreStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ad objects restore status default response -func (o *AdObjectsRestoreStatusDefault) Code() int { - return o._statusCode -} - -func (o *AdObjectsRestoreStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/status][%d] AdObjectsRestoreStatus default %s", o._statusCode, payload) -} - -func (o *AdObjectsRestoreStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/status][%d] AdObjectsRestoreStatus default %s", o._statusCode, payload) -} - -func (o *AdObjectsRestoreStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AdObjectsRestoreStatusDefault) 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/restore_tasks/cancel_restore_task_parameters.go b/v1/client/restore_tasks/cancel_restore_task_parameters.go deleted file mode 100644 index 2094a098..00000000 --- a/v1/client/restore_tasks/cancel_restore_task_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewCancelRestoreTaskParams creates a new CancelRestoreTaskParams 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 NewCancelRestoreTaskParams() *CancelRestoreTaskParams { - return &CancelRestoreTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelRestoreTaskParamsWithTimeout creates a new CancelRestoreTaskParams object -// with the ability to set a timeout on a request. -func NewCancelRestoreTaskParamsWithTimeout(timeout time.Duration) *CancelRestoreTaskParams { - return &CancelRestoreTaskParams{ - timeout: timeout, - } -} - -// NewCancelRestoreTaskParamsWithContext creates a new CancelRestoreTaskParams object -// with the ability to set a context for a request. -func NewCancelRestoreTaskParamsWithContext(ctx context.Context) *CancelRestoreTaskParams { - return &CancelRestoreTaskParams{ - Context: ctx, - } -} - -// NewCancelRestoreTaskParamsWithHTTPClient creates a new CancelRestoreTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelRestoreTaskParamsWithHTTPClient(client *http.Client) *CancelRestoreTaskParams { - return &CancelRestoreTaskParams{ - HTTPClient: client, - } -} - -/* -CancelRestoreTaskParams contains all the parameters to send to the API endpoint - - for the cancel restore task operation. - - Typically these are written to a http.Request. -*/ -type CancelRestoreTaskParams struct { - - /* ID. - - Specifies a unique id for the Restore Task. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelRestoreTaskParams) WithDefaults() *CancelRestoreTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelRestoreTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel restore task params -func (o *CancelRestoreTaskParams) WithTimeout(timeout time.Duration) *CancelRestoreTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel restore task params -func (o *CancelRestoreTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel restore task params -func (o *CancelRestoreTaskParams) WithContext(ctx context.Context) *CancelRestoreTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel restore task params -func (o *CancelRestoreTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel restore task params -func (o *CancelRestoreTaskParams) WithHTTPClient(client *http.Client) *CancelRestoreTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel restore task params -func (o *CancelRestoreTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel restore task params -func (o *CancelRestoreTaskParams) WithID(id int64) *CancelRestoreTaskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel restore task params -func (o *CancelRestoreTaskParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelRestoreTaskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/cancel_restore_task_responses.go b/v1/client/restore_tasks/cancel_restore_task_responses.go deleted file mode 100644 index 5993b18a..00000000 --- a/v1/client/restore_tasks/cancel_restore_task_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CancelRestoreTaskReader is a Reader for the CancelRestoreTask structure. -type CancelRestoreTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelRestoreTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCancelRestoreTaskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelRestoreTaskDefault(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 - } -} - -// NewCancelRestoreTaskOK creates a CancelRestoreTaskOK with default headers values -func NewCancelRestoreTaskOK() *CancelRestoreTaskOK { - return &CancelRestoreTaskOK{} -} - -/* -CancelRestoreTaskOK describes a response with status code 200, with default header values. - -Success Response -*/ -type CancelRestoreTaskOK struct { -} - -// IsSuccess returns true when this cancel restore task o k response has a 2xx status code -func (o *CancelRestoreTaskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel restore task o k response has a 3xx status code -func (o *CancelRestoreTaskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel restore task o k response has a 4xx status code -func (o *CancelRestoreTaskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel restore task o k response has a 5xx status code -func (o *CancelRestoreTaskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel restore task o k response a status code equal to that given -func (o *CancelRestoreTaskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the cancel restore task o k response -func (o *CancelRestoreTaskOK) Code() int { - return 200 -} - -func (o *CancelRestoreTaskOK) Error() string { - return fmt.Sprintf("[PUT /public/restore/tasks/cancel/{id}][%d] cancelRestoreTaskOK", 200) -} - -func (o *CancelRestoreTaskOK) String() string { - return fmt.Sprintf("[PUT /public/restore/tasks/cancel/{id}][%d] cancelRestoreTaskOK", 200) -} - -func (o *CancelRestoreTaskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelRestoreTaskDefault creates a CancelRestoreTaskDefault with default headers values -func NewCancelRestoreTaskDefault(code int) *CancelRestoreTaskDefault { - return &CancelRestoreTaskDefault{ - _statusCode: code, - } -} - -/* -CancelRestoreTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelRestoreTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this cancel restore task default response has a 2xx status code -func (o *CancelRestoreTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel restore task default response has a 3xx status code -func (o *CancelRestoreTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel restore task default response has a 4xx status code -func (o *CancelRestoreTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel restore task default response has a 5xx status code -func (o *CancelRestoreTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel restore task default response a status code equal to that given -func (o *CancelRestoreTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel restore task default response -func (o *CancelRestoreTaskDefault) Code() int { - return o._statusCode -} - -func (o *CancelRestoreTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/tasks/cancel/{id}][%d] CancelRestoreTask default %s", o._statusCode, payload) -} - -func (o *CancelRestoreTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/tasks/cancel/{id}][%d] CancelRestoreTask default %s", o._statusCode, payload) -} - -func (o *CancelRestoreTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CancelRestoreTaskDefault) 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/restore_tasks/compare_ad_objects_parameters.go b/v1/client/restore_tasks/compare_ad_objects_parameters.go deleted file mode 100644 index 28b04b9e..00000000 --- a/v1/client/restore_tasks/compare_ad_objects_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCompareAdObjectsParams creates a new CompareAdObjectsParams 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 NewCompareAdObjectsParams() *CompareAdObjectsParams { - return &CompareAdObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCompareAdObjectsParamsWithTimeout creates a new CompareAdObjectsParams object -// with the ability to set a timeout on a request. -func NewCompareAdObjectsParamsWithTimeout(timeout time.Duration) *CompareAdObjectsParams { - return &CompareAdObjectsParams{ - timeout: timeout, - } -} - -// NewCompareAdObjectsParamsWithContext creates a new CompareAdObjectsParams object -// with the ability to set a context for a request. -func NewCompareAdObjectsParamsWithContext(ctx context.Context) *CompareAdObjectsParams { - return &CompareAdObjectsParams{ - Context: ctx, - } -} - -// NewCompareAdObjectsParamsWithHTTPClient creates a new CompareAdObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCompareAdObjectsParamsWithHTTPClient(client *http.Client) *CompareAdObjectsParams { - return &CompareAdObjectsParams{ - HTTPClient: client, - } -} - -/* -CompareAdObjectsParams contains all the parameters to send to the API endpoint - - for the compare ad objects operation. - - Typically these are written to a http.Request. -*/ -type CompareAdObjectsParams struct { - - /* Body. - - Specifies the Request to compare the AD Objects - from both Snapshot and Production AD. - */ - Body *models.CompareAdObjectsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the compare ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CompareAdObjectsParams) WithDefaults() *CompareAdObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the compare ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CompareAdObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the compare ad objects params -func (o *CompareAdObjectsParams) WithTimeout(timeout time.Duration) *CompareAdObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the compare ad objects params -func (o *CompareAdObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the compare ad objects params -func (o *CompareAdObjectsParams) WithContext(ctx context.Context) *CompareAdObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the compare ad objects params -func (o *CompareAdObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the compare ad objects params -func (o *CompareAdObjectsParams) WithHTTPClient(client *http.Client) *CompareAdObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the compare ad objects params -func (o *CompareAdObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the compare ad objects params -func (o *CompareAdObjectsParams) WithBody(body *models.CompareAdObjectsRequest) *CompareAdObjectsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the compare ad objects params -func (o *CompareAdObjectsParams) SetBody(body *models.CompareAdObjectsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CompareAdObjectsParams) 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/restore_tasks/compare_ad_objects_responses.go b/v1/client/restore_tasks/compare_ad_objects_responses.go deleted file mode 100644 index 20359a13..00000000 --- a/v1/client/restore_tasks/compare_ad_objects_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CompareAdObjectsReader is a Reader for the CompareAdObjects structure. -type CompareAdObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CompareAdObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCompareAdObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCompareAdObjectsDefault(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 - } -} - -// NewCompareAdObjectsOK creates a CompareAdObjectsOK with default headers values -func NewCompareAdObjectsOK() *CompareAdObjectsOK { - return &CompareAdObjectsOK{} -} - -/* -CompareAdObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type CompareAdObjectsOK struct { - Payload []*models.ComparedADObject -} - -// IsSuccess returns true when this compare ad objects o k response has a 2xx status code -func (o *CompareAdObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this compare ad objects o k response has a 3xx status code -func (o *CompareAdObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this compare ad objects o k response has a 4xx status code -func (o *CompareAdObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this compare ad objects o k response has a 5xx status code -func (o *CompareAdObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this compare ad objects o k response a status code equal to that given -func (o *CompareAdObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the compare ad objects o k response -func (o *CompareAdObjectsOK) Code() int { - return 200 -} - -func (o *CompareAdObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjectAttributes][%d] compareAdObjectsOK %s", 200, payload) -} - -func (o *CompareAdObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjectAttributes][%d] compareAdObjectsOK %s", 200, payload) -} - -func (o *CompareAdObjectsOK) GetPayload() []*models.ComparedADObject { - return o.Payload -} - -func (o *CompareAdObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCompareAdObjectsDefault creates a CompareAdObjectsDefault with default headers values -func NewCompareAdObjectsDefault(code int) *CompareAdObjectsDefault { - return &CompareAdObjectsDefault{ - _statusCode: code, - } -} - -/* -CompareAdObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type CompareAdObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this compare ad objects default response has a 2xx status code -func (o *CompareAdObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this compare ad objects default response has a 3xx status code -func (o *CompareAdObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this compare ad objects default response has a 4xx status code -func (o *CompareAdObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this compare ad objects default response has a 5xx status code -func (o *CompareAdObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this compare ad objects default response a status code equal to that given -func (o *CompareAdObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the compare ad objects default response -func (o *CompareAdObjectsDefault) Code() int { - return o._statusCode -} - -func (o *CompareAdObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjectAttributes][%d] CompareAdObjects default %s", o._statusCode, payload) -} - -func (o *CompareAdObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjectAttributes][%d] CompareAdObjects default %s", o._statusCode, payload) -} - -func (o *CompareAdObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CompareAdObjectsDefault) 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/restore_tasks/create_applications_clone_task_parameters.go b/v1/client/restore_tasks/create_applications_clone_task_parameters.go deleted file mode 100644 index b8a92a80..00000000 --- a/v1/client/restore_tasks/create_applications_clone_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateApplicationsCloneTaskParams creates a new CreateApplicationsCloneTaskParams 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 NewCreateApplicationsCloneTaskParams() *CreateApplicationsCloneTaskParams { - return &CreateApplicationsCloneTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateApplicationsCloneTaskParamsWithTimeout creates a new CreateApplicationsCloneTaskParams object -// with the ability to set a timeout on a request. -func NewCreateApplicationsCloneTaskParamsWithTimeout(timeout time.Duration) *CreateApplicationsCloneTaskParams { - return &CreateApplicationsCloneTaskParams{ - timeout: timeout, - } -} - -// NewCreateApplicationsCloneTaskParamsWithContext creates a new CreateApplicationsCloneTaskParams object -// with the ability to set a context for a request. -func NewCreateApplicationsCloneTaskParamsWithContext(ctx context.Context) *CreateApplicationsCloneTaskParams { - return &CreateApplicationsCloneTaskParams{ - Context: ctx, - } -} - -// NewCreateApplicationsCloneTaskParamsWithHTTPClient creates a new CreateApplicationsCloneTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateApplicationsCloneTaskParamsWithHTTPClient(client *http.Client) *CreateApplicationsCloneTaskParams { - return &CreateApplicationsCloneTaskParams{ - HTTPClient: client, - } -} - -/* -CreateApplicationsCloneTaskParams contains all the parameters to send to the API endpoint - - for the create applications clone task operation. - - Typically these are written to a http.Request. -*/ -type CreateApplicationsCloneTaskParams struct { - - /* Body. - - Request to create a Restore Task for cloning Applications like SQL DB. - */ - Body *models.ApplicationsRestoreTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create applications clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationsCloneTaskParams) WithDefaults() *CreateApplicationsCloneTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create applications clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationsCloneTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) WithTimeout(timeout time.Duration) *CreateApplicationsCloneTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) WithContext(ctx context.Context) *CreateApplicationsCloneTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) WithHTTPClient(client *http.Client) *CreateApplicationsCloneTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) WithBody(body *models.ApplicationsRestoreTaskRequest) *CreateApplicationsCloneTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create applications clone task params -func (o *CreateApplicationsCloneTaskParams) SetBody(body *models.ApplicationsRestoreTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateApplicationsCloneTaskParams) 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/restore_tasks/create_applications_clone_task_responses.go b/v1/client/restore_tasks/create_applications_clone_task_responses.go deleted file mode 100644 index fa397731..00000000 --- a/v1/client/restore_tasks/create_applications_clone_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateApplicationsCloneTaskReader is a Reader for the CreateApplicationsCloneTask structure. -type CreateApplicationsCloneTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateApplicationsCloneTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateApplicationsCloneTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateApplicationsCloneTaskDefault(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 - } -} - -// NewCreateApplicationsCloneTaskCreated creates a CreateApplicationsCloneTaskCreated with default headers values -func NewCreateApplicationsCloneTaskCreated() *CreateApplicationsCloneTaskCreated { - return &CreateApplicationsCloneTaskCreated{} -} - -/* -CreateApplicationsCloneTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateApplicationsCloneTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create applications clone task created response has a 2xx status code -func (o *CreateApplicationsCloneTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create applications clone task created response has a 3xx status code -func (o *CreateApplicationsCloneTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create applications clone task created response has a 4xx status code -func (o *CreateApplicationsCloneTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create applications clone task created response has a 5xx status code -func (o *CreateApplicationsCloneTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create applications clone task created response a status code equal to that given -func (o *CreateApplicationsCloneTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create applications clone task created response -func (o *CreateApplicationsCloneTaskCreated) Code() int { - return 201 -} - -func (o *CreateApplicationsCloneTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone][%d] createApplicationsCloneTaskCreated %s", 201, payload) -} - -func (o *CreateApplicationsCloneTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone][%d] createApplicationsCloneTaskCreated %s", 201, payload) -} - -func (o *CreateApplicationsCloneTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateApplicationsCloneTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateApplicationsCloneTaskDefault creates a CreateApplicationsCloneTaskDefault with default headers values -func NewCreateApplicationsCloneTaskDefault(code int) *CreateApplicationsCloneTaskDefault { - return &CreateApplicationsCloneTaskDefault{ - _statusCode: code, - } -} - -/* -CreateApplicationsCloneTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateApplicationsCloneTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create applications clone task default response has a 2xx status code -func (o *CreateApplicationsCloneTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create applications clone task default response has a 3xx status code -func (o *CreateApplicationsCloneTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create applications clone task default response has a 4xx status code -func (o *CreateApplicationsCloneTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create applications clone task default response has a 5xx status code -func (o *CreateApplicationsCloneTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create applications clone task default response a status code equal to that given -func (o *CreateApplicationsCloneTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create applications clone task default response -func (o *CreateApplicationsCloneTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateApplicationsCloneTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone][%d] CreateApplicationsCloneTask default %s", o._statusCode, payload) -} - -func (o *CreateApplicationsCloneTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsClone][%d] CreateApplicationsCloneTask default %s", o._statusCode, payload) -} - -func (o *CreateApplicationsCloneTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateApplicationsCloneTaskDefault) 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/restore_tasks/create_applications_recover_task_parameters.go b/v1/client/restore_tasks/create_applications_recover_task_parameters.go deleted file mode 100644 index 43a7f8f4..00000000 --- a/v1/client/restore_tasks/create_applications_recover_task_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateApplicationsRecoverTaskParams creates a new CreateApplicationsRecoverTaskParams 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 NewCreateApplicationsRecoverTaskParams() *CreateApplicationsRecoverTaskParams { - return &CreateApplicationsRecoverTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateApplicationsRecoverTaskParamsWithTimeout creates a new CreateApplicationsRecoverTaskParams object -// with the ability to set a timeout on a request. -func NewCreateApplicationsRecoverTaskParamsWithTimeout(timeout time.Duration) *CreateApplicationsRecoverTaskParams { - return &CreateApplicationsRecoverTaskParams{ - timeout: timeout, - } -} - -// NewCreateApplicationsRecoverTaskParamsWithContext creates a new CreateApplicationsRecoverTaskParams object -// with the ability to set a context for a request. -func NewCreateApplicationsRecoverTaskParamsWithContext(ctx context.Context) *CreateApplicationsRecoverTaskParams { - return &CreateApplicationsRecoverTaskParams{ - Context: ctx, - } -} - -// NewCreateApplicationsRecoverTaskParamsWithHTTPClient creates a new CreateApplicationsRecoverTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateApplicationsRecoverTaskParamsWithHTTPClient(client *http.Client) *CreateApplicationsRecoverTaskParams { - return &CreateApplicationsRecoverTaskParams{ - HTTPClient: client, - } -} - -/* -CreateApplicationsRecoverTaskParams contains all the parameters to send to the API endpoint - - for the create applications recover task operation. - - Typically these are written to a http.Request. -*/ -type CreateApplicationsRecoverTaskParams struct { - - /* Body. - - Request to create a Restore Task for recovering Applications like SQL DB. - volumes to mount points. - */ - Body *models.ApplicationsRestoreTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create applications recover task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationsRecoverTaskParams) WithDefaults() *CreateApplicationsRecoverTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create applications recover task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateApplicationsRecoverTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) WithTimeout(timeout time.Duration) *CreateApplicationsRecoverTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) WithContext(ctx context.Context) *CreateApplicationsRecoverTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) WithHTTPClient(client *http.Client) *CreateApplicationsRecoverTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) WithBody(body *models.ApplicationsRestoreTaskRequest) *CreateApplicationsRecoverTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create applications recover task params -func (o *CreateApplicationsRecoverTaskParams) SetBody(body *models.ApplicationsRestoreTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateApplicationsRecoverTaskParams) 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/restore_tasks/create_applications_recover_task_responses.go b/v1/client/restore_tasks/create_applications_recover_task_responses.go deleted file mode 100644 index 953af325..00000000 --- a/v1/client/restore_tasks/create_applications_recover_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateApplicationsRecoverTaskReader is a Reader for the CreateApplicationsRecoverTask structure. -type CreateApplicationsRecoverTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateApplicationsRecoverTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateApplicationsRecoverTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateApplicationsRecoverTaskDefault(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 - } -} - -// NewCreateApplicationsRecoverTaskCreated creates a CreateApplicationsRecoverTaskCreated with default headers values -func NewCreateApplicationsRecoverTaskCreated() *CreateApplicationsRecoverTaskCreated { - return &CreateApplicationsRecoverTaskCreated{} -} - -/* -CreateApplicationsRecoverTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateApplicationsRecoverTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create applications recover task created response has a 2xx status code -func (o *CreateApplicationsRecoverTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create applications recover task created response has a 3xx status code -func (o *CreateApplicationsRecoverTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create applications recover task created response has a 4xx status code -func (o *CreateApplicationsRecoverTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create applications recover task created response has a 5xx status code -func (o *CreateApplicationsRecoverTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create applications recover task created response a status code equal to that given -func (o *CreateApplicationsRecoverTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create applications recover task created response -func (o *CreateApplicationsRecoverTaskCreated) Code() int { - return 201 -} - -func (o *CreateApplicationsRecoverTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsRecover][%d] createApplicationsRecoverTaskCreated %s", 201, payload) -} - -func (o *CreateApplicationsRecoverTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsRecover][%d] createApplicationsRecoverTaskCreated %s", 201, payload) -} - -func (o *CreateApplicationsRecoverTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateApplicationsRecoverTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateApplicationsRecoverTaskDefault creates a CreateApplicationsRecoverTaskDefault with default headers values -func NewCreateApplicationsRecoverTaskDefault(code int) *CreateApplicationsRecoverTaskDefault { - return &CreateApplicationsRecoverTaskDefault{ - _statusCode: code, - } -} - -/* -CreateApplicationsRecoverTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateApplicationsRecoverTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create applications recover task default response has a 2xx status code -func (o *CreateApplicationsRecoverTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create applications recover task default response has a 3xx status code -func (o *CreateApplicationsRecoverTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create applications recover task default response has a 4xx status code -func (o *CreateApplicationsRecoverTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create applications recover task default response has a 5xx status code -func (o *CreateApplicationsRecoverTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create applications recover task default response a status code equal to that given -func (o *CreateApplicationsRecoverTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create applications recover task default response -func (o *CreateApplicationsRecoverTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateApplicationsRecoverTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsRecover][%d] CreateApplicationsRecoverTask default %s", o._statusCode, payload) -} - -func (o *CreateApplicationsRecoverTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/applicationsRecover][%d] CreateApplicationsRecoverTask default %s", o._statusCode, payload) -} - -func (o *CreateApplicationsRecoverTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateApplicationsRecoverTaskDefault) 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/restore_tasks/create_clone_task_parameters.go b/v1/client/restore_tasks/create_clone_task_parameters.go deleted file mode 100644 index 97bfc3fc..00000000 --- a/v1/client/restore_tasks/create_clone_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateCloneTaskParams creates a new CreateCloneTaskParams 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 NewCreateCloneTaskParams() *CreateCloneTaskParams { - return &CreateCloneTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCloneTaskParamsWithTimeout creates a new CreateCloneTaskParams object -// with the ability to set a timeout on a request. -func NewCreateCloneTaskParamsWithTimeout(timeout time.Duration) *CreateCloneTaskParams { - return &CreateCloneTaskParams{ - timeout: timeout, - } -} - -// NewCreateCloneTaskParamsWithContext creates a new CreateCloneTaskParams object -// with the ability to set a context for a request. -func NewCreateCloneTaskParamsWithContext(ctx context.Context) *CreateCloneTaskParams { - return &CreateCloneTaskParams{ - Context: ctx, - } -} - -// NewCreateCloneTaskParamsWithHTTPClient creates a new CreateCloneTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCloneTaskParamsWithHTTPClient(client *http.Client) *CreateCloneTaskParams { - return &CreateCloneTaskParams{ - HTTPClient: client, - } -} - -/* -CreateCloneTaskParams contains all the parameters to send to the API endpoint - - for the create clone task operation. - - Typically these are written to a http.Request. -*/ -type CreateCloneTaskParams struct { - - /* Body. - - Request to create a Restore Task for cloning VMs or a View. - */ - Body *models.CloneTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloneTaskParams) WithDefaults() *CreateCloneTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloneTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create clone task params -func (o *CreateCloneTaskParams) WithTimeout(timeout time.Duration) *CreateCloneTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create clone task params -func (o *CreateCloneTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create clone task params -func (o *CreateCloneTaskParams) WithContext(ctx context.Context) *CreateCloneTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create clone task params -func (o *CreateCloneTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create clone task params -func (o *CreateCloneTaskParams) WithHTTPClient(client *http.Client) *CreateCloneTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create clone task params -func (o *CreateCloneTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create clone task params -func (o *CreateCloneTaskParams) WithBody(body *models.CloneTaskRequest) *CreateCloneTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create clone task params -func (o *CreateCloneTaskParams) SetBody(body *models.CloneTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCloneTaskParams) 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/restore_tasks/create_clone_task_responses.go b/v1/client/restore_tasks/create_clone_task_responses.go deleted file mode 100644 index 0011524b..00000000 --- a/v1/client/restore_tasks/create_clone_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateCloneTaskReader is a Reader for the CreateCloneTask structure. -type CreateCloneTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCloneTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCloneTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCloneTaskDefault(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 - } -} - -// NewCreateCloneTaskCreated creates a CreateCloneTaskCreated with default headers values -func NewCreateCloneTaskCreated() *CreateCloneTaskCreated { - return &CreateCloneTaskCreated{} -} - -/* -CreateCloneTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateCloneTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create clone task created response has a 2xx status code -func (o *CreateCloneTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create clone task created response has a 3xx status code -func (o *CreateCloneTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create clone task created response has a 4xx status code -func (o *CreateCloneTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create clone task created response has a 5xx status code -func (o *CreateCloneTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create clone task created response a status code equal to that given -func (o *CreateCloneTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create clone task created response -func (o *CreateCloneTaskCreated) Code() int { - return 201 -} - -func (o *CreateCloneTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/clone][%d] createCloneTaskCreated %s", 201, payload) -} - -func (o *CreateCloneTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/clone][%d] createCloneTaskCreated %s", 201, payload) -} - -func (o *CreateCloneTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateCloneTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateCloneTaskDefault creates a CreateCloneTaskDefault with default headers values -func NewCreateCloneTaskDefault(code int) *CreateCloneTaskDefault { - return &CreateCloneTaskDefault{ - _statusCode: code, - } -} - -/* -CreateCloneTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCloneTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create clone task default response has a 2xx status code -func (o *CreateCloneTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create clone task default response has a 3xx status code -func (o *CreateCloneTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create clone task default response has a 4xx status code -func (o *CreateCloneTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create clone task default response has a 5xx status code -func (o *CreateCloneTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create clone task default response a status code equal to that given -func (o *CreateCloneTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create clone task default response -func (o *CreateCloneTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateCloneTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/clone][%d] CreateCloneTask default %s", o._statusCode, payload) -} - -func (o *CreateCloneTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/clone][%d] CreateCloneTask default %s", o._statusCode, payload) -} - -func (o *CreateCloneTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateCloneTaskDefault) 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/restore_tasks/create_deploy_task_parameters.go b/v1/client/restore_tasks/create_deploy_task_parameters.go deleted file mode 100644 index f100d5d6..00000000 --- a/v1/client/restore_tasks/create_deploy_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateDeployTaskParams creates a new CreateDeployTaskParams 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 NewCreateDeployTaskParams() *CreateDeployTaskParams { - return &CreateDeployTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDeployTaskParamsWithTimeout creates a new CreateDeployTaskParams object -// with the ability to set a timeout on a request. -func NewCreateDeployTaskParamsWithTimeout(timeout time.Duration) *CreateDeployTaskParams { - return &CreateDeployTaskParams{ - timeout: timeout, - } -} - -// NewCreateDeployTaskParamsWithContext creates a new CreateDeployTaskParams object -// with the ability to set a context for a request. -func NewCreateDeployTaskParamsWithContext(ctx context.Context) *CreateDeployTaskParams { - return &CreateDeployTaskParams{ - Context: ctx, - } -} - -// NewCreateDeployTaskParamsWithHTTPClient creates a new CreateDeployTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDeployTaskParamsWithHTTPClient(client *http.Client) *CreateDeployTaskParams { - return &CreateDeployTaskParams{ - HTTPClient: client, - } -} - -/* -CreateDeployTaskParams contains all the parameters to send to the API endpoint - - for the create deploy task operation. - - Typically these are written to a http.Request. -*/ -type CreateDeployTaskParams struct { - - /* Body. - - Request to create a Restore Task for deploying VMs or a View on cloud. - */ - Body *models.DeployTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create deploy task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDeployTaskParams) WithDefaults() *CreateDeployTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create deploy task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDeployTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create deploy task params -func (o *CreateDeployTaskParams) WithTimeout(timeout time.Duration) *CreateDeployTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create deploy task params -func (o *CreateDeployTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create deploy task params -func (o *CreateDeployTaskParams) WithContext(ctx context.Context) *CreateDeployTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create deploy task params -func (o *CreateDeployTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create deploy task params -func (o *CreateDeployTaskParams) WithHTTPClient(client *http.Client) *CreateDeployTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create deploy task params -func (o *CreateDeployTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create deploy task params -func (o *CreateDeployTaskParams) WithBody(body *models.DeployTaskRequest) *CreateDeployTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create deploy task params -func (o *CreateDeployTaskParams) SetBody(body *models.DeployTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDeployTaskParams) 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/restore_tasks/create_deploy_task_responses.go b/v1/client/restore_tasks/create_deploy_task_responses.go deleted file mode 100644 index 3caf20a9..00000000 --- a/v1/client/restore_tasks/create_deploy_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateDeployTaskReader is a Reader for the CreateDeployTask structure. -type CreateDeployTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDeployTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDeployTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDeployTaskDefault(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 - } -} - -// NewCreateDeployTaskCreated creates a CreateDeployTaskCreated with default headers values -func NewCreateDeployTaskCreated() *CreateDeployTaskCreated { - return &CreateDeployTaskCreated{} -} - -/* -CreateDeployTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateDeployTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create deploy task created response has a 2xx status code -func (o *CreateDeployTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create deploy task created response has a 3xx status code -func (o *CreateDeployTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create deploy task created response has a 4xx status code -func (o *CreateDeployTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create deploy task created response has a 5xx status code -func (o *CreateDeployTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create deploy task created response a status code equal to that given -func (o *CreateDeployTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create deploy task created response -func (o *CreateDeployTaskCreated) Code() int { - return 201 -} - -func (o *CreateDeployTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/deploy][%d] createDeployTaskCreated %s", 201, payload) -} - -func (o *CreateDeployTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/deploy][%d] createDeployTaskCreated %s", 201, payload) -} - -func (o *CreateDeployTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateDeployTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDeployTaskDefault creates a CreateDeployTaskDefault with default headers values -func NewCreateDeployTaskDefault(code int) *CreateDeployTaskDefault { - return &CreateDeployTaskDefault{ - _statusCode: code, - } -} - -/* -CreateDeployTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDeployTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create deploy task default response has a 2xx status code -func (o *CreateDeployTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create deploy task default response has a 3xx status code -func (o *CreateDeployTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create deploy task default response has a 4xx status code -func (o *CreateDeployTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create deploy task default response has a 5xx status code -func (o *CreateDeployTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create deploy task default response a status code equal to that given -func (o *CreateDeployTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create deploy task default response -func (o *CreateDeployTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateDeployTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/deploy][%d] CreateDeployTask default %s", o._statusCode, payload) -} - -func (o *CreateDeployTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/deploy][%d] CreateDeployTask default %s", o._statusCode, payload) -} - -func (o *CreateDeployTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateDeployTaskDefault) 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/restore_tasks/create_download_files_and_folders_parameters.go b/v1/client/restore_tasks/create_download_files_and_folders_parameters.go deleted file mode 100644 index 86cb7d7c..00000000 --- a/v1/client/restore_tasks/create_download_files_and_folders_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateDownloadFilesAndFoldersParams creates a new CreateDownloadFilesAndFoldersParams 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 NewCreateDownloadFilesAndFoldersParams() *CreateDownloadFilesAndFoldersParams { - return &CreateDownloadFilesAndFoldersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDownloadFilesAndFoldersParamsWithTimeout creates a new CreateDownloadFilesAndFoldersParams object -// with the ability to set a timeout on a request. -func NewCreateDownloadFilesAndFoldersParamsWithTimeout(timeout time.Duration) *CreateDownloadFilesAndFoldersParams { - return &CreateDownloadFilesAndFoldersParams{ - timeout: timeout, - } -} - -// NewCreateDownloadFilesAndFoldersParamsWithContext creates a new CreateDownloadFilesAndFoldersParams object -// with the ability to set a context for a request. -func NewCreateDownloadFilesAndFoldersParamsWithContext(ctx context.Context) *CreateDownloadFilesAndFoldersParams { - return &CreateDownloadFilesAndFoldersParams{ - Context: ctx, - } -} - -// NewCreateDownloadFilesAndFoldersParamsWithHTTPClient creates a new CreateDownloadFilesAndFoldersParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDownloadFilesAndFoldersParamsWithHTTPClient(client *http.Client) *CreateDownloadFilesAndFoldersParams { - return &CreateDownloadFilesAndFoldersParams{ - HTTPClient: client, - } -} - -/* -CreateDownloadFilesAndFoldersParams contains all the parameters to send to the API endpoint - - for the create download files and folders operation. - - Typically these are written to a http.Request. -*/ -type CreateDownloadFilesAndFoldersParams struct { - - /* Body. - - Request to create a task for downloading list of files or - folders. - */ - Body *models.DownloadFilesAndFoldersParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create download files and folders params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDownloadFilesAndFoldersParams) WithDefaults() *CreateDownloadFilesAndFoldersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create download files and folders params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDownloadFilesAndFoldersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) WithTimeout(timeout time.Duration) *CreateDownloadFilesAndFoldersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) WithContext(ctx context.Context) *CreateDownloadFilesAndFoldersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) WithHTTPClient(client *http.Client) *CreateDownloadFilesAndFoldersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) WithBody(body *models.DownloadFilesAndFoldersParams) *CreateDownloadFilesAndFoldersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create download files and folders params -func (o *CreateDownloadFilesAndFoldersParams) SetBody(body *models.DownloadFilesAndFoldersParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDownloadFilesAndFoldersParams) 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/restore_tasks/create_download_files_and_folders_responses.go b/v1/client/restore_tasks/create_download_files_and_folders_responses.go deleted file mode 100644 index 93a5e0d1..00000000 --- a/v1/client/restore_tasks/create_download_files_and_folders_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateDownloadFilesAndFoldersReader is a Reader for the CreateDownloadFilesAndFolders structure. -type CreateDownloadFilesAndFoldersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDownloadFilesAndFoldersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDownloadFilesAndFoldersCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDownloadFilesAndFoldersDefault(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 - } -} - -// NewCreateDownloadFilesAndFoldersCreated creates a CreateDownloadFilesAndFoldersCreated with default headers values -func NewCreateDownloadFilesAndFoldersCreated() *CreateDownloadFilesAndFoldersCreated { - return &CreateDownloadFilesAndFoldersCreated{} -} - -/* -CreateDownloadFilesAndFoldersCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateDownloadFilesAndFoldersCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create download files and folders created response has a 2xx status code -func (o *CreateDownloadFilesAndFoldersCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create download files and folders created response has a 3xx status code -func (o *CreateDownloadFilesAndFoldersCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create download files and folders created response has a 4xx status code -func (o *CreateDownloadFilesAndFoldersCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create download files and folders created response has a 5xx status code -func (o *CreateDownloadFilesAndFoldersCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create download files and folders created response a status code equal to that given -func (o *CreateDownloadFilesAndFoldersCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create download files and folders created response -func (o *CreateDownloadFilesAndFoldersCreated) Code() int { - return 201 -} - -func (o *CreateDownloadFilesAndFoldersCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/downloadFilesAndFolders][%d] createDownloadFilesAndFoldersCreated %s", 201, payload) -} - -func (o *CreateDownloadFilesAndFoldersCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/downloadFilesAndFolders][%d] createDownloadFilesAndFoldersCreated %s", 201, payload) -} - -func (o *CreateDownloadFilesAndFoldersCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateDownloadFilesAndFoldersCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDownloadFilesAndFoldersDefault creates a CreateDownloadFilesAndFoldersDefault with default headers values -func NewCreateDownloadFilesAndFoldersDefault(code int) *CreateDownloadFilesAndFoldersDefault { - return &CreateDownloadFilesAndFoldersDefault{ - _statusCode: code, - } -} - -/* -CreateDownloadFilesAndFoldersDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDownloadFilesAndFoldersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create download files and folders default response has a 2xx status code -func (o *CreateDownloadFilesAndFoldersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create download files and folders default response has a 3xx status code -func (o *CreateDownloadFilesAndFoldersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create download files and folders default response has a 4xx status code -func (o *CreateDownloadFilesAndFoldersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create download files and folders default response has a 5xx status code -func (o *CreateDownloadFilesAndFoldersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create download files and folders default response a status code equal to that given -func (o *CreateDownloadFilesAndFoldersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create download files and folders default response -func (o *CreateDownloadFilesAndFoldersDefault) Code() int { - return o._statusCode -} - -func (o *CreateDownloadFilesAndFoldersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/downloadFilesAndFolders][%d] CreateDownloadFilesAndFolders default %s", o._statusCode, payload) -} - -func (o *CreateDownloadFilesAndFoldersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/downloadFilesAndFolders][%d] CreateDownloadFilesAndFolders default %s", o._statusCode, payload) -} - -func (o *CreateDownloadFilesAndFoldersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateDownloadFilesAndFoldersDefault) 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/restore_tasks/create_recover_task_parameters.go b/v1/client/restore_tasks/create_recover_task_parameters.go deleted file mode 100644 index e7484a49..00000000 --- a/v1/client/restore_tasks/create_recover_task_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRecoverTaskParams creates a new CreateRecoverTaskParams 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 NewCreateRecoverTaskParams() *CreateRecoverTaskParams { - return &CreateRecoverTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRecoverTaskParamsWithTimeout creates a new CreateRecoverTaskParams object -// with the ability to set a timeout on a request. -func NewCreateRecoverTaskParamsWithTimeout(timeout time.Duration) *CreateRecoverTaskParams { - return &CreateRecoverTaskParams{ - timeout: timeout, - } -} - -// NewCreateRecoverTaskParamsWithContext creates a new CreateRecoverTaskParams object -// with the ability to set a context for a request. -func NewCreateRecoverTaskParamsWithContext(ctx context.Context) *CreateRecoverTaskParams { - return &CreateRecoverTaskParams{ - Context: ctx, - } -} - -// NewCreateRecoverTaskParamsWithHTTPClient creates a new CreateRecoverTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRecoverTaskParamsWithHTTPClient(client *http.Client) *CreateRecoverTaskParams { - return &CreateRecoverTaskParams{ - HTTPClient: client, - } -} - -/* -CreateRecoverTaskParams contains all the parameters to send to the API endpoint - - for the create recover task operation. - - Typically these are written to a http.Request. -*/ -type CreateRecoverTaskParams struct { - - /* Body. - - Request to create a Restore Task for recovering VMs or mounting - volumes to mount points. - */ - Body *models.RecoverTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create recover task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRecoverTaskParams) WithDefaults() *CreateRecoverTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create recover task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRecoverTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create recover task params -func (o *CreateRecoverTaskParams) WithTimeout(timeout time.Duration) *CreateRecoverTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create recover task params -func (o *CreateRecoverTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create recover task params -func (o *CreateRecoverTaskParams) WithContext(ctx context.Context) *CreateRecoverTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create recover task params -func (o *CreateRecoverTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create recover task params -func (o *CreateRecoverTaskParams) WithHTTPClient(client *http.Client) *CreateRecoverTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create recover task params -func (o *CreateRecoverTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create recover task params -func (o *CreateRecoverTaskParams) WithBody(body *models.RecoverTaskRequest) *CreateRecoverTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create recover task params -func (o *CreateRecoverTaskParams) SetBody(body *models.RecoverTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRecoverTaskParams) 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/restore_tasks/create_recover_task_responses.go b/v1/client/restore_tasks/create_recover_task_responses.go deleted file mode 100644 index a5cb2dac..00000000 --- a/v1/client/restore_tasks/create_recover_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRecoverTaskReader is a Reader for the CreateRecoverTask structure. -type CreateRecoverTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRecoverTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRecoverTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRecoverTaskDefault(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 - } -} - -// NewCreateRecoverTaskCreated creates a CreateRecoverTaskCreated with default headers values -func NewCreateRecoverTaskCreated() *CreateRecoverTaskCreated { - return &CreateRecoverTaskCreated{} -} - -/* -CreateRecoverTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRecoverTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create recover task created response has a 2xx status code -func (o *CreateRecoverTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create recover task created response has a 3xx status code -func (o *CreateRecoverTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create recover task created response has a 4xx status code -func (o *CreateRecoverTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create recover task created response has a 5xx status code -func (o *CreateRecoverTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create recover task created response a status code equal to that given -func (o *CreateRecoverTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create recover task created response -func (o *CreateRecoverTaskCreated) Code() int { - return 201 -} - -func (o *CreateRecoverTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/recover][%d] createRecoverTaskCreated %s", 201, payload) -} - -func (o *CreateRecoverTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/recover][%d] createRecoverTaskCreated %s", 201, payload) -} - -func (o *CreateRecoverTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateRecoverTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRecoverTaskDefault creates a CreateRecoverTaskDefault with default headers values -func NewCreateRecoverTaskDefault(code int) *CreateRecoverTaskDefault { - return &CreateRecoverTaskDefault{ - _statusCode: code, - } -} - -/* -CreateRecoverTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRecoverTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create recover task default response has a 2xx status code -func (o *CreateRecoverTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create recover task default response has a 3xx status code -func (o *CreateRecoverTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create recover task default response has a 4xx status code -func (o *CreateRecoverTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create recover task default response has a 5xx status code -func (o *CreateRecoverTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create recover task default response a status code equal to that given -func (o *CreateRecoverTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create recover task default response -func (o *CreateRecoverTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateRecoverTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/recover][%d] CreateRecoverTask default %s", o._statusCode, payload) -} - -func (o *CreateRecoverTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/recover][%d] CreateRecoverTask default %s", o._statusCode, payload) -} - -func (o *CreateRecoverTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRecoverTaskDefault) 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/restore_tasks/create_restore_files_task_parameters.go b/v1/client/restore_tasks/create_restore_files_task_parameters.go deleted file mode 100644 index 22ffc2d3..00000000 --- a/v1/client/restore_tasks/create_restore_files_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRestoreFilesTaskParams creates a new CreateRestoreFilesTaskParams 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 NewCreateRestoreFilesTaskParams() *CreateRestoreFilesTaskParams { - return &CreateRestoreFilesTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRestoreFilesTaskParamsWithTimeout creates a new CreateRestoreFilesTaskParams object -// with the ability to set a timeout on a request. -func NewCreateRestoreFilesTaskParamsWithTimeout(timeout time.Duration) *CreateRestoreFilesTaskParams { - return &CreateRestoreFilesTaskParams{ - timeout: timeout, - } -} - -// NewCreateRestoreFilesTaskParamsWithContext creates a new CreateRestoreFilesTaskParams object -// with the ability to set a context for a request. -func NewCreateRestoreFilesTaskParamsWithContext(ctx context.Context) *CreateRestoreFilesTaskParams { - return &CreateRestoreFilesTaskParams{ - Context: ctx, - } -} - -// NewCreateRestoreFilesTaskParamsWithHTTPClient creates a new CreateRestoreFilesTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRestoreFilesTaskParamsWithHTTPClient(client *http.Client) *CreateRestoreFilesTaskParams { - return &CreateRestoreFilesTaskParams{ - HTTPClient: client, - } -} - -/* -CreateRestoreFilesTaskParams contains all the parameters to send to the API endpoint - - for the create restore files task operation. - - Typically these are written to a http.Request. -*/ -type CreateRestoreFilesTaskParams struct { - - /* Body. - - Request to create a Restore Task for recovering files or folders. - */ - Body *models.RestoreFilesTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create restore files task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRestoreFilesTaskParams) WithDefaults() *CreateRestoreFilesTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create restore files task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRestoreFilesTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create restore files task params -func (o *CreateRestoreFilesTaskParams) WithTimeout(timeout time.Duration) *CreateRestoreFilesTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create restore files task params -func (o *CreateRestoreFilesTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create restore files task params -func (o *CreateRestoreFilesTaskParams) WithContext(ctx context.Context) *CreateRestoreFilesTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create restore files task params -func (o *CreateRestoreFilesTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create restore files task params -func (o *CreateRestoreFilesTaskParams) WithHTTPClient(client *http.Client) *CreateRestoreFilesTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create restore files task params -func (o *CreateRestoreFilesTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create restore files task params -func (o *CreateRestoreFilesTaskParams) WithBody(body *models.RestoreFilesTaskRequest) *CreateRestoreFilesTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create restore files task params -func (o *CreateRestoreFilesTaskParams) SetBody(body *models.RestoreFilesTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRestoreFilesTaskParams) 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/restore_tasks/create_restore_files_task_responses.go b/v1/client/restore_tasks/create_restore_files_task_responses.go deleted file mode 100644 index fd5af43d..00000000 --- a/v1/client/restore_tasks/create_restore_files_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRestoreFilesTaskReader is a Reader for the CreateRestoreFilesTask structure. -type CreateRestoreFilesTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRestoreFilesTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRestoreFilesTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRestoreFilesTaskDefault(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 - } -} - -// NewCreateRestoreFilesTaskCreated creates a CreateRestoreFilesTaskCreated with default headers values -func NewCreateRestoreFilesTaskCreated() *CreateRestoreFilesTaskCreated { - return &CreateRestoreFilesTaskCreated{} -} - -/* -CreateRestoreFilesTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRestoreFilesTaskCreated struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this create restore files task created response has a 2xx status code -func (o *CreateRestoreFilesTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create restore files task created response has a 3xx status code -func (o *CreateRestoreFilesTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create restore files task created response has a 4xx status code -func (o *CreateRestoreFilesTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create restore files task created response has a 5xx status code -func (o *CreateRestoreFilesTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create restore files task created response a status code equal to that given -func (o *CreateRestoreFilesTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create restore files task created response -func (o *CreateRestoreFilesTaskCreated) Code() int { - return 201 -} - -func (o *CreateRestoreFilesTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/files][%d] createRestoreFilesTaskCreated %s", 201, payload) -} - -func (o *CreateRestoreFilesTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/files][%d] createRestoreFilesTaskCreated %s", 201, payload) -} - -func (o *CreateRestoreFilesTaskCreated) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *CreateRestoreFilesTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRestoreFilesTaskDefault creates a CreateRestoreFilesTaskDefault with default headers values -func NewCreateRestoreFilesTaskDefault(code int) *CreateRestoreFilesTaskDefault { - return &CreateRestoreFilesTaskDefault{ - _statusCode: code, - } -} - -/* -CreateRestoreFilesTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRestoreFilesTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create restore files task default response has a 2xx status code -func (o *CreateRestoreFilesTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create restore files task default response has a 3xx status code -func (o *CreateRestoreFilesTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create restore files task default response has a 4xx status code -func (o *CreateRestoreFilesTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create restore files task default response has a 5xx status code -func (o *CreateRestoreFilesTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create restore files task default response a status code equal to that given -func (o *CreateRestoreFilesTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create restore files task default response -func (o *CreateRestoreFilesTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateRestoreFilesTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/files][%d] CreateRestoreFilesTask default %s", o._statusCode, payload) -} - -func (o *CreateRestoreFilesTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/files][%d] CreateRestoreFilesTask default %s", o._statusCode, payload) -} - -func (o *CreateRestoreFilesTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRestoreFilesTaskDefault) 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/restore_tasks/get_ad_domain_root_topology_parameters.go b/v1/client/restore_tasks/get_ad_domain_root_topology_parameters.go deleted file mode 100644 index c677f835..00000000 --- a/v1/client/restore_tasks/get_ad_domain_root_topology_parameters.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetAdDomainRootTopologyParams creates a new GetAdDomainRootTopologyParams 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 NewGetAdDomainRootTopologyParams() *GetAdDomainRootTopologyParams { - return &GetAdDomainRootTopologyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAdDomainRootTopologyParamsWithTimeout creates a new GetAdDomainRootTopologyParams object -// with the ability to set a timeout on a request. -func NewGetAdDomainRootTopologyParamsWithTimeout(timeout time.Duration) *GetAdDomainRootTopologyParams { - return &GetAdDomainRootTopologyParams{ - timeout: timeout, - } -} - -// NewGetAdDomainRootTopologyParamsWithContext creates a new GetAdDomainRootTopologyParams object -// with the ability to set a context for a request. -func NewGetAdDomainRootTopologyParamsWithContext(ctx context.Context) *GetAdDomainRootTopologyParams { - return &GetAdDomainRootTopologyParams{ - Context: ctx, - } -} - -// NewGetAdDomainRootTopologyParamsWithHTTPClient creates a new GetAdDomainRootTopologyParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAdDomainRootTopologyParamsWithHTTPClient(client *http.Client) *GetAdDomainRootTopologyParams { - return &GetAdDomainRootTopologyParams{ - HTTPClient: client, - } -} - -/* -GetAdDomainRootTopologyParams contains all the parameters to send to the API endpoint - - for the get ad domain root topology operation. - - Typically these are written to a http.Request. -*/ -type GetAdDomainRootTopologyParams struct { - - /* RestoreTaskID. - - Specifies the restoreTaskId corresponding to which we need to - get the ad topology. - - Format: int64 - */ - RestoreTaskID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ad domain root topology params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAdDomainRootTopologyParams) WithDefaults() *GetAdDomainRootTopologyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ad domain root topology params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAdDomainRootTopologyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) WithTimeout(timeout time.Duration) *GetAdDomainRootTopologyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) WithContext(ctx context.Context) *GetAdDomainRootTopologyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) WithHTTPClient(client *http.Client) *GetAdDomainRootTopologyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRestoreTaskID adds the restoreTaskID to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) WithRestoreTaskID(restoreTaskID int64) *GetAdDomainRootTopologyParams { - o.SetRestoreTaskID(restoreTaskID) - return o -} - -// SetRestoreTaskID adds the restoreTaskId to the get ad domain root topology params -func (o *GetAdDomainRootTopologyParams) SetRestoreTaskID(restoreTaskID int64) { - o.RestoreTaskID = restoreTaskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAdDomainRootTopologyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param restoreTaskId - qrRestoreTaskID := o.RestoreTaskID - qRestoreTaskID := swag.FormatInt64(qrRestoreTaskID) - if qRestoreTaskID != "" { - - if err := r.SetQueryParam("restoreTaskId", qRestoreTaskID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_ad_domain_root_topology_responses.go b/v1/client/restore_tasks/get_ad_domain_root_topology_responses.go deleted file mode 100644 index 5234a483..00000000 --- a/v1/client/restore_tasks/get_ad_domain_root_topology_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAdDomainRootTopologyReader is a Reader for the GetAdDomainRootTopology structure. -type GetAdDomainRootTopologyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAdDomainRootTopologyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAdDomainRootTopologyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAdDomainRootTopologyDefault(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 - } -} - -// NewGetAdDomainRootTopologyOK creates a GetAdDomainRootTopologyOK with default headers values -func NewGetAdDomainRootTopologyOK() *GetAdDomainRootTopologyOK { - return &GetAdDomainRootTopologyOK{} -} - -/* -GetAdDomainRootTopologyOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAdDomainRootTopologyOK struct { - Payload []*models.AdRootTopologyObject -} - -// IsSuccess returns true when this get ad domain root topology o k response has a 2xx status code -func (o *GetAdDomainRootTopologyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ad domain root topology o k response has a 3xx status code -func (o *GetAdDomainRootTopologyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ad domain root topology o k response has a 4xx status code -func (o *GetAdDomainRootTopologyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ad domain root topology o k response has a 5xx status code -func (o *GetAdDomainRootTopologyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ad domain root topology o k response a status code equal to that given -func (o *GetAdDomainRootTopologyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ad domain root topology o k response -func (o *GetAdDomainRootTopologyOK) Code() int { - return 200 -} - -func (o *GetAdDomainRootTopologyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adDomainRootTopology][%d] getAdDomainRootTopologyOK %s", 200, payload) -} - -func (o *GetAdDomainRootTopologyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adDomainRootTopology][%d] getAdDomainRootTopologyOK %s", 200, payload) -} - -func (o *GetAdDomainRootTopologyOK) GetPayload() []*models.AdRootTopologyObject { - return o.Payload -} - -func (o *GetAdDomainRootTopologyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAdDomainRootTopologyDefault creates a GetAdDomainRootTopologyDefault with default headers values -func NewGetAdDomainRootTopologyDefault(code int) *GetAdDomainRootTopologyDefault { - return &GetAdDomainRootTopologyDefault{ - _statusCode: code, - } -} - -/* -GetAdDomainRootTopologyDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAdDomainRootTopologyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get ad domain root topology default response has a 2xx status code -func (o *GetAdDomainRootTopologyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ad domain root topology default response has a 3xx status code -func (o *GetAdDomainRootTopologyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ad domain root topology default response has a 4xx status code -func (o *GetAdDomainRootTopologyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ad domain root topology default response has a 5xx status code -func (o *GetAdDomainRootTopologyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ad domain root topology default response a status code equal to that given -func (o *GetAdDomainRootTopologyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ad domain root topology default response -func (o *GetAdDomainRootTopologyDefault) Code() int { - return o._statusCode -} - -func (o *GetAdDomainRootTopologyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adDomainRootTopology][%d] GetAdDomainRootTopology default %s", o._statusCode, payload) -} - -func (o *GetAdDomainRootTopologyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adDomainRootTopology][%d] GetAdDomainRootTopology default %s", o._statusCode, payload) -} - -func (o *GetAdDomainRootTopologyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAdDomainRootTopologyDefault) 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/restore_tasks/get_ad_objects_parameters.go b/v1/client/restore_tasks/get_ad_objects_parameters.go deleted file mode 100644 index 0949b786..00000000 --- a/v1/client/restore_tasks/get_ad_objects_parameters.go +++ /dev/null @@ -1,508 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetAdObjectsParams creates a new GetAdObjectsParams 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 NewGetAdObjectsParams() *GetAdObjectsParams { - return &GetAdObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAdObjectsParamsWithTimeout creates a new GetAdObjectsParams object -// with the ability to set a timeout on a request. -func NewGetAdObjectsParamsWithTimeout(timeout time.Duration) *GetAdObjectsParams { - return &GetAdObjectsParams{ - timeout: timeout, - } -} - -// NewGetAdObjectsParamsWithContext creates a new GetAdObjectsParams object -// with the ability to set a context for a request. -func NewGetAdObjectsParamsWithContext(ctx context.Context) *GetAdObjectsParams { - return &GetAdObjectsParams{ - Context: ctx, - } -} - -// NewGetAdObjectsParamsWithHTTPClient creates a new GetAdObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAdObjectsParamsWithHTTPClient(client *http.Client) *GetAdObjectsParams { - return &GetAdObjectsParams{ - HTTPClient: client, - } -} - -/* -GetAdObjectsParams contains all the parameters to send to the API endpoint - - for the get ad objects operation. - - Typically these are written to a http.Request. -*/ -type GetAdObjectsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* Domain. - - domain of the AD object. - */ - Domain *string - - /* Email. - - Specifies the email of the AD object of type user or group. - */ - Email *string - - /* JobIds. - - Specifies the protection job Ids which have backed up Active Directory - Application Server. - */ - JobIds []int64 - - /* Name. - - Specifies the name of the AD object. - */ - Name *string - - /* ObjectType. - - Specifies the type of the AD Object. The type may be user, computer, - group or ou(organizational unit). - */ - ObjectType *string - - /* RegisteredSourceIds. - - Specifies the Active Directory Application Server Ids which contains - the AD objects. - */ - RegisteredSourceIds []int64 - - /* SamAccountName. - - Specifies the sam account name of the AD object. - */ - SamAccountName *string - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* ViewBoxIds. - - Filter by a list of Domains (View Boxes) ids. - Only items stored in the listed Domains (View Boxes) are returned. - */ - ViewBoxIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAdObjectsParams) WithDefaults() *GetAdObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAdObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ad objects params -func (o *GetAdObjectsParams) WithTimeout(timeout time.Duration) *GetAdObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ad objects params -func (o *GetAdObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ad objects params -func (o *GetAdObjectsParams) WithContext(ctx context.Context) *GetAdObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ad objects params -func (o *GetAdObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ad objects params -func (o *GetAdObjectsParams) WithHTTPClient(client *http.Client) *GetAdObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ad objects params -func (o *GetAdObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get ad objects params -func (o *GetAdObjectsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetAdObjectsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get ad objects params -func (o *GetAdObjectsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDomain adds the domain to the get ad objects params -func (o *GetAdObjectsParams) WithDomain(domain *string) *GetAdObjectsParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the get ad objects params -func (o *GetAdObjectsParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithEmail adds the email to the get ad objects params -func (o *GetAdObjectsParams) WithEmail(email *string) *GetAdObjectsParams { - o.SetEmail(email) - return o -} - -// SetEmail adds the email to the get ad objects params -func (o *GetAdObjectsParams) SetEmail(email *string) { - o.Email = email -} - -// WithJobIds adds the jobIds to the get ad objects params -func (o *GetAdObjectsParams) WithJobIds(jobIds []int64) *GetAdObjectsParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the get ad objects params -func (o *GetAdObjectsParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithName adds the name to the get ad objects params -func (o *GetAdObjectsParams) WithName(name *string) *GetAdObjectsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get ad objects params -func (o *GetAdObjectsParams) SetName(name *string) { - o.Name = name -} - -// WithObjectType adds the objectType to the get ad objects params -func (o *GetAdObjectsParams) WithObjectType(objectType *string) *GetAdObjectsParams { - o.SetObjectType(objectType) - return o -} - -// SetObjectType adds the objectType to the get ad objects params -func (o *GetAdObjectsParams) SetObjectType(objectType *string) { - o.ObjectType = objectType -} - -// WithRegisteredSourceIds adds the registeredSourceIds to the get ad objects params -func (o *GetAdObjectsParams) WithRegisteredSourceIds(registeredSourceIds []int64) *GetAdObjectsParams { - o.SetRegisteredSourceIds(registeredSourceIds) - return o -} - -// SetRegisteredSourceIds adds the registeredSourceIds to the get ad objects params -func (o *GetAdObjectsParams) SetRegisteredSourceIds(registeredSourceIds []int64) { - o.RegisteredSourceIds = registeredSourceIds -} - -// WithSamAccountName adds the samAccountName to the get ad objects params -func (o *GetAdObjectsParams) WithSamAccountName(samAccountName *string) *GetAdObjectsParams { - o.SetSamAccountName(samAccountName) - return o -} - -// SetSamAccountName adds the samAccountName to the get ad objects params -func (o *GetAdObjectsParams) SetSamAccountName(samAccountName *string) { - o.SamAccountName = samAccountName -} - -// WithTenantID adds the tenantID to the get ad objects params -func (o *GetAdObjectsParams) WithTenantID(tenantID *string) *GetAdObjectsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get ad objects params -func (o *GetAdObjectsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithViewBoxIds adds the viewBoxIds to the get ad objects params -func (o *GetAdObjectsParams) WithViewBoxIds(viewBoxIds []int64) *GetAdObjectsParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the get ad objects params -func (o *GetAdObjectsParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAdObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.Email != nil { - - // query param email - var qrEmail string - - if o.Email != nil { - qrEmail = *o.Email - } - qEmail := qrEmail - if qEmail != "" { - - if err := r.SetQueryParam("email", qEmail); err != nil { - return err - } - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if o.ObjectType != nil { - - // query param objectType - var qrObjectType string - - if o.ObjectType != nil { - qrObjectType = *o.ObjectType - } - qObjectType := qrObjectType - if qObjectType != "" { - - if err := r.SetQueryParam("objectType", qObjectType); err != nil { - return err - } - } - } - - if o.RegisteredSourceIds != nil { - - // binding items for registeredSourceIds - joinedRegisteredSourceIds := o.bindParamRegisteredSourceIds(reg) - - // query array param registeredSourceIds - if err := r.SetQueryParam("registeredSourceIds", joinedRegisteredSourceIds...); err != nil { - return err - } - } - - if o.SamAccountName != nil { - - // query param samAccountName - var qrSamAccountName string - - if o.SamAccountName != nil { - qrSamAccountName = *o.SamAccountName - } - qSamAccountName := qrSamAccountName - if qSamAccountName != "" { - - if err := r.SetQueryParam("samAccountName", qSamAccountName); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAdObjects binds the parameter jobIds -func (o *GetAdObjectsParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamGetAdObjects binds the parameter registeredSourceIds -func (o *GetAdObjectsParams) bindParamRegisteredSourceIds(formats strfmt.Registry) []string { - registeredSourceIdsIR := o.RegisteredSourceIds - - var registeredSourceIdsIC []string - for _, registeredSourceIdsIIR := range registeredSourceIdsIR { // explode []int64 - - registeredSourceIdsIIV := swag.FormatInt64(registeredSourceIdsIIR) // int64 as string - registeredSourceIdsIC = append(registeredSourceIdsIC, registeredSourceIdsIIV) - } - - // items.CollectionFormat: "" - registeredSourceIdsIS := swag.JoinByFormat(registeredSourceIdsIC, "") - - return registeredSourceIdsIS -} - -// bindParamGetAdObjects binds the parameter viewBoxIds -func (o *GetAdObjectsParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/restore_tasks/get_ad_objects_responses.go b/v1/client/restore_tasks/get_ad_objects_responses.go deleted file mode 100644 index 460bbb14..00000000 --- a/v1/client/restore_tasks/get_ad_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetAdObjectsReader is a Reader for the GetAdObjects structure. -type GetAdObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAdObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAdObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAdObjectsDefault(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 - } -} - -// NewGetAdObjectsOK creates a GetAdObjectsOK with default headers values -func NewGetAdObjectsOK() *GetAdObjectsOK { - return &GetAdObjectsOK{} -} - -/* -GetAdObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAdObjectsOK struct { - Payload *models.FileSearchResults -} - -// IsSuccess returns true when this get ad objects o k response has a 2xx status code -func (o *GetAdObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ad objects o k response has a 3xx status code -func (o *GetAdObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ad objects o k response has a 4xx status code -func (o *GetAdObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ad objects o k response has a 5xx status code -func (o *GetAdObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ad objects o k response a status code equal to that given -func (o *GetAdObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ad objects o k response -func (o *GetAdObjectsOK) Code() int { - return 200 -} - -func (o *GetAdObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/searchResults][%d] getAdObjectsOK %s", 200, payload) -} - -func (o *GetAdObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/searchResults][%d] getAdObjectsOK %s", 200, payload) -} - -func (o *GetAdObjectsOK) GetPayload() *models.FileSearchResults { - return o.Payload -} - -func (o *GetAdObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAdObjectsDefault creates a GetAdObjectsDefault with default headers values -func NewGetAdObjectsDefault(code int) *GetAdObjectsDefault { - return &GetAdObjectsDefault{ - _statusCode: code, - } -} - -/* -GetAdObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAdObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get ad objects default response has a 2xx status code -func (o *GetAdObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ad objects default response has a 3xx status code -func (o *GetAdObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ad objects default response has a 4xx status code -func (o *GetAdObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ad objects default response has a 5xx status code -func (o *GetAdObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ad objects default response a status code equal to that given -func (o *GetAdObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ad objects default response -func (o *GetAdObjectsDefault) Code() int { - return o._statusCode -} - -func (o *GetAdObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/searchResults][%d] GetAdObjects default %s", o._statusCode, payload) -} - -func (o *GetAdObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects/searchResults][%d] GetAdObjects default %s", o._statusCode, payload) -} - -func (o *GetAdObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetAdObjectsDefault) 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/restore_tasks/get_file_fstat_information_parameters.go b/v1/client/restore_tasks/get_file_fstat_information_parameters.go deleted file mode 100644 index 6574c29e..00000000 --- a/v1/client/restore_tasks/get_file_fstat_information_parameters.go +++ /dev/null @@ -1,522 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetFileFstatInformationParams creates a new GetFileFstatInformationParams 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 NewGetFileFstatInformationParams() *GetFileFstatInformationParams { - return &GetFileFstatInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileFstatInformationParamsWithTimeout creates a new GetFileFstatInformationParams object -// with the ability to set a timeout on a request. -func NewGetFileFstatInformationParamsWithTimeout(timeout time.Duration) *GetFileFstatInformationParams { - return &GetFileFstatInformationParams{ - timeout: timeout, - } -} - -// NewGetFileFstatInformationParamsWithContext creates a new GetFileFstatInformationParams object -// with the ability to set a context for a request. -func NewGetFileFstatInformationParamsWithContext(ctx context.Context) *GetFileFstatInformationParams { - return &GetFileFstatInformationParams{ - Context: ctx, - } -} - -// NewGetFileFstatInformationParamsWithHTTPClient creates a new GetFileFstatInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileFstatInformationParamsWithHTTPClient(client *http.Client) *GetFileFstatInformationParams { - return &GetFileFstatInformationParams{ - HTTPClient: client, - } -} - -/* -GetFileFstatInformationParams contains all the parameters to send to the API endpoint - - for the get file fstat information operation. - - Typically these are written to a http.Request. -*/ -type GetFileFstatInformationParams struct { - - /* AttemptNum. - - AttemptNum is the attempt number of the run that successfully created the - snapshot. - - Format: int64 - */ - AttemptNum *int64 - - /* EntityID. - - EntityId is the Id of the VM. - - Format: int64 - */ - EntityID int64 - - /* FilePath. - - FilePath is the full path of the file or directory whose stat needed. - */ - FilePath string - - /* JobID. - - JobId is the id of the local job that took the snapshot, which may or - may not match the JobUidObjectId below depending on whether the object - originally belonged to this local job or to a different remote job. - - Format: int64 - */ - JobID int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the job run that backed up the entity. - - Format: int64 - */ - JobInstanceID int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time in usecs of the job run that backed up - the entity. - - Format: int64 - */ - JobStartTimeUsecs int64 - - /* JobUIDObjectID. - - JobUidObjectId is the globally unique id of the job that the object - originally belonged to. If this object originally belonged to a job from a - remote cluster, this field will contain the JobId of the remote job, else - it will contain the JobId of the local job. - - Format: int64 - */ - JobUIDObjectID int64 - - /* UseLibrarian. - - Specifies whether to use Librarian for file stat. This will be true if the - browse is enabled via librarian. - */ - UseLibrarian *bool - - /* ViewBoxID. - - Id of the View Box if a View is being browsed. - - Format: int64 - */ - ViewBoxID *int64 - - /* ViewName. - - Name of the View if a View is being browsed. - */ - ViewName *string - - /* VolumeInfoCookie. - - VolumeInfoCookie is the cookie to be passed in calls to reading a VM dir - for this volume. - - Format: uint64 - */ - VolumeInfoCookie *uint64 - - /* VolumeName. - - VolumeName is the name of the volume that needs to be browsed. This should - match the name returned in VolumeInfo. - */ - VolumeName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file fstat information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileFstatInformationParams) WithDefaults() *GetFileFstatInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file fstat information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileFstatInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file fstat information params -func (o *GetFileFstatInformationParams) WithTimeout(timeout time.Duration) *GetFileFstatInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file fstat information params -func (o *GetFileFstatInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file fstat information params -func (o *GetFileFstatInformationParams) WithContext(ctx context.Context) *GetFileFstatInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file fstat information params -func (o *GetFileFstatInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file fstat information params -func (o *GetFileFstatInformationParams) WithHTTPClient(client *http.Client) *GetFileFstatInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file fstat information params -func (o *GetFileFstatInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttemptNum adds the attemptNum to the get file fstat information params -func (o *GetFileFstatInformationParams) WithAttemptNum(attemptNum *int64) *GetFileFstatInformationParams { - o.SetAttemptNum(attemptNum) - return o -} - -// SetAttemptNum adds the attemptNum to the get file fstat information params -func (o *GetFileFstatInformationParams) SetAttemptNum(attemptNum *int64) { - o.AttemptNum = attemptNum -} - -// WithEntityID adds the entityID to the get file fstat information params -func (o *GetFileFstatInformationParams) WithEntityID(entityID int64) *GetFileFstatInformationParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get file fstat information params -func (o *GetFileFstatInformationParams) SetEntityID(entityID int64) { - o.EntityID = entityID -} - -// WithFilePath adds the filePath to the get file fstat information params -func (o *GetFileFstatInformationParams) WithFilePath(filePath string) *GetFileFstatInformationParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the get file fstat information params -func (o *GetFileFstatInformationParams) SetFilePath(filePath string) { - o.FilePath = filePath -} - -// WithJobID adds the jobID to the get file fstat information params -func (o *GetFileFstatInformationParams) WithJobID(jobID int64) *GetFileFstatInformationParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get file fstat information params -func (o *GetFileFstatInformationParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the get file fstat information params -func (o *GetFileFstatInformationParams) WithJobInstanceID(jobInstanceID int64) *GetFileFstatInformationParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the get file fstat information params -func (o *GetFileFstatInformationParams) SetJobInstanceID(jobInstanceID int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the get file fstat information params -func (o *GetFileFstatInformationParams) WithJobStartTimeUsecs(jobStartTimeUsecs int64) *GetFileFstatInformationParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the get file fstat information params -func (o *GetFileFstatInformationParams) SetJobStartTimeUsecs(jobStartTimeUsecs int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WithJobUIDObjectID adds the jobUIDObjectID to the get file fstat information params -func (o *GetFileFstatInformationParams) WithJobUIDObjectID(jobUIDObjectID int64) *GetFileFstatInformationParams { - o.SetJobUIDObjectID(jobUIDObjectID) - return o -} - -// SetJobUIDObjectID adds the jobUidObjectId to the get file fstat information params -func (o *GetFileFstatInformationParams) SetJobUIDObjectID(jobUIDObjectID int64) { - o.JobUIDObjectID = jobUIDObjectID -} - -// WithUseLibrarian adds the useLibrarian to the get file fstat information params -func (o *GetFileFstatInformationParams) WithUseLibrarian(useLibrarian *bool) *GetFileFstatInformationParams { - o.SetUseLibrarian(useLibrarian) - return o -} - -// SetUseLibrarian adds the useLibrarian to the get file fstat information params -func (o *GetFileFstatInformationParams) SetUseLibrarian(useLibrarian *bool) { - o.UseLibrarian = useLibrarian -} - -// WithViewBoxID adds the viewBoxID to the get file fstat information params -func (o *GetFileFstatInformationParams) WithViewBoxID(viewBoxID *int64) *GetFileFstatInformationParams { - o.SetViewBoxID(viewBoxID) - return o -} - -// SetViewBoxID adds the viewBoxId to the get file fstat information params -func (o *GetFileFstatInformationParams) SetViewBoxID(viewBoxID *int64) { - o.ViewBoxID = viewBoxID -} - -// WithViewName adds the viewName to the get file fstat information params -func (o *GetFileFstatInformationParams) WithViewName(viewName *string) *GetFileFstatInformationParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get file fstat information params -func (o *GetFileFstatInformationParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WithVolumeInfoCookie adds the volumeInfoCookie to the get file fstat information params -func (o *GetFileFstatInformationParams) WithVolumeInfoCookie(volumeInfoCookie *uint64) *GetFileFstatInformationParams { - o.SetVolumeInfoCookie(volumeInfoCookie) - return o -} - -// SetVolumeInfoCookie adds the volumeInfoCookie to the get file fstat information params -func (o *GetFileFstatInformationParams) SetVolumeInfoCookie(volumeInfoCookie *uint64) { - o.VolumeInfoCookie = volumeInfoCookie -} - -// WithVolumeName adds the volumeName to the get file fstat information params -func (o *GetFileFstatInformationParams) WithVolumeName(volumeName *string) *GetFileFstatInformationParams { - o.SetVolumeName(volumeName) - return o -} - -// SetVolumeName adds the volumeName to the get file fstat information params -func (o *GetFileFstatInformationParams) SetVolumeName(volumeName *string) { - o.VolumeName = volumeName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileFstatInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AttemptNum != nil { - - // query param attemptNum - var qrAttemptNum int64 - - if o.AttemptNum != nil { - qrAttemptNum = *o.AttemptNum - } - qAttemptNum := swag.FormatInt64(qrAttemptNum) - if qAttemptNum != "" { - - if err := r.SetQueryParam("attemptNum", qAttemptNum); err != nil { - return err - } - } - } - - // query param entityId - qrEntityID := o.EntityID - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - - // query param filePath - qrFilePath := o.FilePath - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobInstanceId - qrJobInstanceID := o.JobInstanceID - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - - // query param jobStartTimeUsecs - qrJobStartTimeUsecs := o.JobStartTimeUsecs - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - - // query param jobUidObjectId - qrJobUIDObjectID := o.JobUIDObjectID - qJobUIDObjectID := swag.FormatInt64(qrJobUIDObjectID) - if qJobUIDObjectID != "" { - - if err := r.SetQueryParam("jobUidObjectId", qJobUIDObjectID); err != nil { - return err - } - } - - if o.UseLibrarian != nil { - - // query param useLibrarian - var qrUseLibrarian bool - - if o.UseLibrarian != nil { - qrUseLibrarian = *o.UseLibrarian - } - qUseLibrarian := swag.FormatBool(qrUseLibrarian) - if qUseLibrarian != "" { - - if err := r.SetQueryParam("useLibrarian", qUseLibrarian); err != nil { - return err - } - } - } - - if o.ViewBoxID != nil { - - // query param viewBoxId - var qrViewBoxID int64 - - if o.ViewBoxID != nil { - qrViewBoxID = *o.ViewBoxID - } - qViewBoxID := swag.FormatInt64(qrViewBoxID) - if qViewBoxID != "" { - - if err := r.SetQueryParam("viewBoxId", qViewBoxID); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if o.VolumeInfoCookie != nil { - - // query param volumeInfoCookie - var qrVolumeInfoCookie uint64 - - if o.VolumeInfoCookie != nil { - qrVolumeInfoCookie = *o.VolumeInfoCookie - } - qVolumeInfoCookie := swag.FormatUint64(qrVolumeInfoCookie) - if qVolumeInfoCookie != "" { - - if err := r.SetQueryParam("volumeInfoCookie", qVolumeInfoCookie); err != nil { - return err - } - } - } - - if o.VolumeName != nil { - - // query param volumeName - var qrVolumeName string - - if o.VolumeName != nil { - qrVolumeName = *o.VolumeName - } - qVolumeName := qrVolumeName - if qVolumeName != "" { - - if err := r.SetQueryParam("volumeName", qVolumeName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_file_fstat_information_responses.go b/v1/client/restore_tasks/get_file_fstat_information_responses.go deleted file mode 100644 index 63c152a8..00000000 --- a/v1/client/restore_tasks/get_file_fstat_information_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileFstatInformationReader is a Reader for the GetFileFstatInformation structure. -type GetFileFstatInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileFstatInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileFstatInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileFstatInformationDefault(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 - } -} - -// NewGetFileFstatInformationOK creates a GetFileFstatInformationOK with default headers values -func NewGetFileFstatInformationOK() *GetFileFstatInformationOK { - return &GetFileFstatInformationOK{} -} - -/* -GetFileFstatInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileFstatInformationOK struct { - Payload *models.FileFstatResult -} - -// IsSuccess returns true when this get file fstat information o k response has a 2xx status code -func (o *GetFileFstatInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file fstat information o k response has a 3xx status code -func (o *GetFileFstatInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file fstat information o k response has a 4xx status code -func (o *GetFileFstatInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file fstat information o k response has a 5xx status code -func (o *GetFileFstatInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file fstat information o k response a status code equal to that given -func (o *GetFileFstatInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file fstat information o k response -func (o *GetFileFstatInformationOK) Code() int { - return 200 -} - -func (o *GetFileFstatInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/fstats][%d] getFileFstatInformationOK %s", 200, payload) -} - -func (o *GetFileFstatInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/fstats][%d] getFileFstatInformationOK %s", 200, payload) -} - -func (o *GetFileFstatInformationOK) GetPayload() *models.FileFstatResult { - return o.Payload -} - -func (o *GetFileFstatInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileFstatResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileFstatInformationDefault creates a GetFileFstatInformationDefault with default headers values -func NewGetFileFstatInformationDefault(code int) *GetFileFstatInformationDefault { - return &GetFileFstatInformationDefault{ - _statusCode: code, - } -} - -/* -GetFileFstatInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileFstatInformationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get file fstat information default response has a 2xx status code -func (o *GetFileFstatInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file fstat information default response has a 3xx status code -func (o *GetFileFstatInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file fstat information default response has a 4xx status code -func (o *GetFileFstatInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file fstat information default response has a 5xx status code -func (o *GetFileFstatInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file fstat information default response a status code equal to that given -func (o *GetFileFstatInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file fstat information default response -func (o *GetFileFstatInformationDefault) Code() int { - return o._statusCode -} - -func (o *GetFileFstatInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/fstats][%d] GetFileFstatInformation default %s", o._statusCode, payload) -} - -func (o *GetFileFstatInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/fstats][%d] GetFileFstatInformation default %s", o._statusCode, payload) -} - -func (o *GetFileFstatInformationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetFileFstatInformationDefault) 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/restore_tasks/get_file_snapshots_information_parameters.go b/v1/client/restore_tasks/get_file_snapshots_information_parameters.go deleted file mode 100644 index 2dbbb5eb..00000000 --- a/v1/client/restore_tasks/get_file_snapshots_information_parameters.go +++ /dev/null @@ -1,283 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetFileSnapshotsInformationParams creates a new GetFileSnapshotsInformationParams 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 NewGetFileSnapshotsInformationParams() *GetFileSnapshotsInformationParams { - return &GetFileSnapshotsInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileSnapshotsInformationParamsWithTimeout creates a new GetFileSnapshotsInformationParams object -// with the ability to set a timeout on a request. -func NewGetFileSnapshotsInformationParamsWithTimeout(timeout time.Duration) *GetFileSnapshotsInformationParams { - return &GetFileSnapshotsInformationParams{ - timeout: timeout, - } -} - -// NewGetFileSnapshotsInformationParamsWithContext creates a new GetFileSnapshotsInformationParams object -// with the ability to set a context for a request. -func NewGetFileSnapshotsInformationParamsWithContext(ctx context.Context) *GetFileSnapshotsInformationParams { - return &GetFileSnapshotsInformationParams{ - Context: ctx, - } -} - -// NewGetFileSnapshotsInformationParamsWithHTTPClient creates a new GetFileSnapshotsInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileSnapshotsInformationParamsWithHTTPClient(client *http.Client) *GetFileSnapshotsInformationParams { - return &GetFileSnapshotsInformationParams{ - HTTPClient: client, - } -} - -/* -GetFileSnapshotsInformationParams contains all the parameters to send to the API endpoint - - for the get file snapshots information operation. - - Typically these are written to a http.Request. -*/ -type GetFileSnapshotsInformationParams struct { - - /* ClusterID. - - Specifies the Cohesity Cluster id where the Job was created. - This field is required. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation id of the Cohesity Cluster where the Job - was created. - An incarnation id is generated when a Cohesity Cluster is initially - created. This field is required. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* Filename. - - Specifies the name of the file or folder to find in the snapshots. - This field is required. - */ - Filename string - - /* JobID. - - Specifies the id of the Job that captured the snapshots. - These snapshots are searched for the specified files or folders. - This field is required. - - Format: int64 - */ - JobID int64 - - /* SourceID. - - Specifies the id of the Protection Source object (such as a VM) to search. - When a Job Run executes, snapshots of the specified Protection Source - object are captured. This operation searches the snapshots of the - object for the file or folder. This field is required. - - Format: int64 - */ - SourceID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file snapshots information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileSnapshotsInformationParams) WithDefaults() *GetFileSnapshotsInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file snapshots information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileSnapshotsInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithTimeout(timeout time.Duration) *GetFileSnapshotsInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithContext(ctx context.Context) *GetFileSnapshotsInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithHTTPClient(client *http.Client) *GetFileSnapshotsInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithClusterID(clusterID int64) *GetFileSnapshotsInformationParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetFileSnapshotsInformationParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithFilename adds the filename to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithFilename(filename string) *GetFileSnapshotsInformationParams { - o.SetFilename(filename) - return o -} - -// SetFilename adds the filename to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetFilename(filename string) { - o.Filename = filename -} - -// WithJobID adds the jobID to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithJobID(jobID int64) *GetFileSnapshotsInformationParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithSourceID adds the sourceID to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) WithSourceID(sourceID int64) *GetFileSnapshotsInformationParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get file snapshots information params -func (o *GetFileSnapshotsInformationParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileSnapshotsInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - // query param filename - qrFilename := o.Filename - qFilename := qrFilename - if qFilename != "" { - - if err := r.SetQueryParam("filename", qFilename); err != nil { - return err - } - } - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param sourceId - qrSourceID := o.SourceID - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_file_snapshots_information_responses.go b/v1/client/restore_tasks/get_file_snapshots_information_responses.go deleted file mode 100644 index 58fdce10..00000000 --- a/v1/client/restore_tasks/get_file_snapshots_information_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileSnapshotsInformationReader is a Reader for the GetFileSnapshotsInformation structure. -type GetFileSnapshotsInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileSnapshotsInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileSnapshotsInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileSnapshotsInformationDefault(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 - } -} - -// NewGetFileSnapshotsInformationOK creates a GetFileSnapshotsInformationOK with default headers values -func NewGetFileSnapshotsInformationOK() *GetFileSnapshotsInformationOK { - return &GetFileSnapshotsInformationOK{} -} - -/* -GetFileSnapshotsInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileSnapshotsInformationOK struct { - Payload []*models.FileSnapshotInformation -} - -// IsSuccess returns true when this get file snapshots information o k response has a 2xx status code -func (o *GetFileSnapshotsInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file snapshots information o k response has a 3xx status code -func (o *GetFileSnapshotsInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file snapshots information o k response has a 4xx status code -func (o *GetFileSnapshotsInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file snapshots information o k response has a 5xx status code -func (o *GetFileSnapshotsInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file snapshots information o k response a status code equal to that given -func (o *GetFileSnapshotsInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file snapshots information o k response -func (o *GetFileSnapshotsInformationOK) Code() int { - return 200 -} - -func (o *GetFileSnapshotsInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/snapshotsInformation][%d] getFileSnapshotsInformationOK %s", 200, payload) -} - -func (o *GetFileSnapshotsInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/snapshotsInformation][%d] getFileSnapshotsInformationOK %s", 200, payload) -} - -func (o *GetFileSnapshotsInformationOK) GetPayload() []*models.FileSnapshotInformation { - return o.Payload -} - -func (o *GetFileSnapshotsInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileSnapshotsInformationDefault creates a GetFileSnapshotsInformationDefault with default headers values -func NewGetFileSnapshotsInformationDefault(code int) *GetFileSnapshotsInformationDefault { - return &GetFileSnapshotsInformationDefault{ - _statusCode: code, - } -} - -/* -GetFileSnapshotsInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileSnapshotsInformationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get file snapshots information default response has a 2xx status code -func (o *GetFileSnapshotsInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file snapshots information default response has a 3xx status code -func (o *GetFileSnapshotsInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file snapshots information default response has a 4xx status code -func (o *GetFileSnapshotsInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file snapshots information default response has a 5xx status code -func (o *GetFileSnapshotsInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file snapshots information default response a status code equal to that given -func (o *GetFileSnapshotsInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file snapshots information default response -func (o *GetFileSnapshotsInformationDefault) Code() int { - return o._statusCode -} - -func (o *GetFileSnapshotsInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/snapshotsInformation][%d] GetFileSnapshotsInformation default %s", o._statusCode, payload) -} - -func (o *GetFileSnapshotsInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files/snapshotsInformation][%d] GetFileSnapshotsInformation default %s", o._statusCode, payload) -} - -func (o *GetFileSnapshotsInformationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetFileSnapshotsInformationDefault) 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/restore_tasks/get_one_drive_documents_parameters.go b/v1/client/restore_tasks/get_one_drive_documents_parameters.go deleted file mode 100644 index 5ebda4ff..00000000 --- a/v1/client/restore_tasks/get_one_drive_documents_parameters.go +++ /dev/null @@ -1,369 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetOneDriveDocumentsParams creates a new GetOneDriveDocumentsParams 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 NewGetOneDriveDocumentsParams() *GetOneDriveDocumentsParams { - return &GetOneDriveDocumentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOneDriveDocumentsParamsWithTimeout creates a new GetOneDriveDocumentsParams object -// with the ability to set a timeout on a request. -func NewGetOneDriveDocumentsParamsWithTimeout(timeout time.Duration) *GetOneDriveDocumentsParams { - return &GetOneDriveDocumentsParams{ - timeout: timeout, - } -} - -// NewGetOneDriveDocumentsParamsWithContext creates a new GetOneDriveDocumentsParams object -// with the ability to set a context for a request. -func NewGetOneDriveDocumentsParamsWithContext(ctx context.Context) *GetOneDriveDocumentsParams { - return &GetOneDriveDocumentsParams{ - Context: ctx, - } -} - -// NewGetOneDriveDocumentsParamsWithHTTPClient creates a new GetOneDriveDocumentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOneDriveDocumentsParamsWithHTTPClient(client *http.Client) *GetOneDriveDocumentsParams { - return &GetOneDriveDocumentsParams{ - HTTPClient: client, - } -} - -/* -GetOneDriveDocumentsParams contains all the parameters to send to the API endpoint - - for the get one drive documents operation. - - Typically these are written to a http.Request. -*/ -type GetOneDriveDocumentsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* DocumentName. - - Specifies the document(file/folder) name. - */ - DocumentName *string - - /* DomainIds. - - Specifies the domain Ids in which Users' OneDrives are registered. - */ - DomainIds []int64 - - /* MailboxIds. - - Specifies the Office365 User Ids which is teh owner of the OneDrive. - */ - MailboxIds []int64 - - /* ProtectionJobIds. - - Specifies the protection job Ids which have backed up mailbox(es) - continaing emails/folders. - */ - ProtectionJobIds []int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get one drive documents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOneDriveDocumentsParams) WithDefaults() *GetOneDriveDocumentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get one drive documents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOneDriveDocumentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithTimeout(timeout time.Duration) *GetOneDriveDocumentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithContext(ctx context.Context) *GetOneDriveDocumentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithHTTPClient(client *http.Client) *GetOneDriveDocumentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetOneDriveDocumentsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDocumentName adds the documentName to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithDocumentName(documentName *string) *GetOneDriveDocumentsParams { - o.SetDocumentName(documentName) - return o -} - -// SetDocumentName adds the documentName to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetDocumentName(documentName *string) { - o.DocumentName = documentName -} - -// WithDomainIds adds the domainIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithDomainIds(domainIds []int64) *GetOneDriveDocumentsParams { - o.SetDomainIds(domainIds) - return o -} - -// SetDomainIds adds the domainIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetDomainIds(domainIds []int64) { - o.DomainIds = domainIds -} - -// WithMailboxIds adds the mailboxIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithMailboxIds(mailboxIds []int64) *GetOneDriveDocumentsParams { - o.SetMailboxIds(mailboxIds) - return o -} - -// SetMailboxIds adds the mailboxIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetMailboxIds(mailboxIds []int64) { - o.MailboxIds = mailboxIds -} - -// WithProtectionJobIds adds the protectionJobIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithProtectionJobIds(protectionJobIds []int64) *GetOneDriveDocumentsParams { - o.SetProtectionJobIds(protectionJobIds) - return o -} - -// SetProtectionJobIds adds the protectionJobIds to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetProtectionJobIds(protectionJobIds []int64) { - o.ProtectionJobIds = protectionJobIds -} - -// WithTenantID adds the tenantID to the get one drive documents params -func (o *GetOneDriveDocumentsParams) WithTenantID(tenantID *string) *GetOneDriveDocumentsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get one drive documents params -func (o *GetOneDriveDocumentsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOneDriveDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.DocumentName != nil { - - // query param documentName - var qrDocumentName string - - if o.DocumentName != nil { - qrDocumentName = *o.DocumentName - } - qDocumentName := qrDocumentName - if qDocumentName != "" { - - if err := r.SetQueryParam("documentName", qDocumentName); err != nil { - return err - } - } - } - - if o.DomainIds != nil { - - // binding items for domainIds - joinedDomainIds := o.bindParamDomainIds(reg) - - // query array param domainIds - if err := r.SetQueryParam("domainIds", joinedDomainIds...); err != nil { - return err - } - } - - if o.MailboxIds != nil { - - // binding items for mailboxIds - joinedMailboxIds := o.bindParamMailboxIds(reg) - - // query array param mailboxIds - if err := r.SetQueryParam("mailboxIds", joinedMailboxIds...); err != nil { - return err - } - } - - if o.ProtectionJobIds != nil { - - // binding items for protectionJobIds - joinedProtectionJobIds := o.bindParamProtectionJobIds(reg) - - // query array param protectionJobIds - if err := r.SetQueryParam("protectionJobIds", joinedProtectionJobIds...); err != nil { - return err - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetOneDriveDocuments binds the parameter domainIds -func (o *GetOneDriveDocumentsParams) bindParamDomainIds(formats strfmt.Registry) []string { - domainIdsIR := o.DomainIds - - var domainIdsIC []string - for _, domainIdsIIR := range domainIdsIR { // explode []int64 - - domainIdsIIV := swag.FormatInt64(domainIdsIIR) // int64 as string - domainIdsIC = append(domainIdsIC, domainIdsIIV) - } - - // items.CollectionFormat: "" - domainIdsIS := swag.JoinByFormat(domainIdsIC, "") - - return domainIdsIS -} - -// bindParamGetOneDriveDocuments binds the parameter mailboxIds -func (o *GetOneDriveDocumentsParams) bindParamMailboxIds(formats strfmt.Registry) []string { - mailboxIdsIR := o.MailboxIds - - var mailboxIdsIC []string - for _, mailboxIdsIIR := range mailboxIdsIR { // explode []int64 - - mailboxIdsIIV := swag.FormatInt64(mailboxIdsIIR) // int64 as string - mailboxIdsIC = append(mailboxIdsIC, mailboxIdsIIV) - } - - // items.CollectionFormat: "" - mailboxIdsIS := swag.JoinByFormat(mailboxIdsIC, "") - - return mailboxIdsIS -} - -// bindParamGetOneDriveDocuments binds the parameter protectionJobIds -func (o *GetOneDriveDocumentsParams) bindParamProtectionJobIds(formats strfmt.Registry) []string { - protectionJobIdsIR := o.ProtectionJobIds - - var protectionJobIdsIC []string - for _, protectionJobIdsIIR := range protectionJobIdsIR { // explode []int64 - - protectionJobIdsIIV := swag.FormatInt64(protectionJobIdsIIR) // int64 as string - protectionJobIdsIC = append(protectionJobIdsIC, protectionJobIdsIIV) - } - - // items.CollectionFormat: "" - protectionJobIdsIS := swag.JoinByFormat(protectionJobIdsIC, "") - - return protectionJobIdsIS -} diff --git a/v1/client/restore_tasks/get_one_drive_documents_responses.go b/v1/client/restore_tasks/get_one_drive_documents_responses.go deleted file mode 100644 index de3bd8db..00000000 --- a/v1/client/restore_tasks/get_one_drive_documents_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetOneDriveDocumentsReader is a Reader for the GetOneDriveDocuments structure. -type GetOneDriveDocumentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOneDriveDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOneDriveDocumentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetOneDriveDocumentsDefault(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 - } -} - -// NewGetOneDriveDocumentsOK creates a GetOneDriveDocumentsOK with default headers values -func NewGetOneDriveDocumentsOK() *GetOneDriveDocumentsOK { - return &GetOneDriveDocumentsOK{} -} - -/* -GetOneDriveDocumentsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetOneDriveDocumentsOK struct { - Payload *models.FileSearchResults -} - -// IsSuccess returns true when this get one drive documents o k response has a 2xx status code -func (o *GetOneDriveDocumentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get one drive documents o k response has a 3xx status code -func (o *GetOneDriveDocumentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get one drive documents o k response has a 4xx status code -func (o *GetOneDriveDocumentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get one drive documents o k response has a 5xx status code -func (o *GetOneDriveDocumentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get one drive documents o k response a status code equal to that given -func (o *GetOneDriveDocumentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get one drive documents o k response -func (o *GetOneDriveDocumentsOK) Code() int { - return 200 -} - -func (o *GetOneDriveDocumentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/onedrive/documents][%d] getOneDriveDocumentsOK %s", 200, payload) -} - -func (o *GetOneDriveDocumentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/onedrive/documents][%d] getOneDriveDocumentsOK %s", 200, payload) -} - -func (o *GetOneDriveDocumentsOK) GetPayload() *models.FileSearchResults { - return o.Payload -} - -func (o *GetOneDriveDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOneDriveDocumentsDefault creates a GetOneDriveDocumentsDefault with default headers values -func NewGetOneDriveDocumentsDefault(code int) *GetOneDriveDocumentsDefault { - return &GetOneDriveDocumentsDefault{ - _statusCode: code, - } -} - -/* -GetOneDriveDocumentsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetOneDriveDocumentsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get one drive documents default response has a 2xx status code -func (o *GetOneDriveDocumentsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get one drive documents default response has a 3xx status code -func (o *GetOneDriveDocumentsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get one drive documents default response has a 4xx status code -func (o *GetOneDriveDocumentsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get one drive documents default response has a 5xx status code -func (o *GetOneDriveDocumentsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get one drive documents default response a status code equal to that given -func (o *GetOneDriveDocumentsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get one drive documents default response -func (o *GetOneDriveDocumentsDefault) Code() int { - return o._statusCode -} - -func (o *GetOneDriveDocumentsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/onedrive/documents][%d] GetOneDriveDocuments default %s", o._statusCode, payload) -} - -func (o *GetOneDriveDocumentsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/onedrive/documents][%d] GetOneDriveDocuments default %s", o._statusCode, payload) -} - -func (o *GetOneDriveDocumentsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetOneDriveDocumentsDefault) 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/restore_tasks/get_outlook_emails_parameters.go b/v1/client/restore_tasks/get_outlook_emails_parameters.go deleted file mode 100644 index 21ef0dad..00000000 --- a/v1/client/restore_tasks/get_outlook_emails_parameters.go +++ /dev/null @@ -1,784 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetOutlookEmailsParams creates a new GetOutlookEmailsParams 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 NewGetOutlookEmailsParams() *GetOutlookEmailsParams { - return &GetOutlookEmailsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOutlookEmailsParamsWithTimeout creates a new GetOutlookEmailsParams object -// with the ability to set a timeout on a request. -func NewGetOutlookEmailsParamsWithTimeout(timeout time.Duration) *GetOutlookEmailsParams { - return &GetOutlookEmailsParams{ - timeout: timeout, - } -} - -// NewGetOutlookEmailsParamsWithContext creates a new GetOutlookEmailsParams object -// with the ability to set a context for a request. -func NewGetOutlookEmailsParamsWithContext(ctx context.Context) *GetOutlookEmailsParams { - return &GetOutlookEmailsParams{ - Context: ctx, - } -} - -// NewGetOutlookEmailsParamsWithHTTPClient creates a new GetOutlookEmailsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOutlookEmailsParamsWithHTTPClient(client *http.Client) *GetOutlookEmailsParams { - return &GetOutlookEmailsParams{ - HTTPClient: client, - } -} - -/* -GetOutlookEmailsParams contains all the parameters to send to the API endpoint - - for the get outlook emails operation. - - Typically these are written to a http.Request. -*/ -type GetOutlookEmailsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* BccRecipientAddresses. - - Specifies the email addresses of the bcc recipients. - */ - BccRecipientAddresses []string - - /* CcRecipientAddresses. - - Specifies the email addresses of the cc recipients. - */ - CcRecipientAddresses []string - - /* DomainIds. - - Specifies the domain Ids in which mailboxes are registered. - */ - DomainIds []int64 - - /* EmailSubject. - - Specifies the subject of the email. - */ - EmailSubject *string - - /* FolderName. - - Specifies the parent folder name of the email. - */ - FolderName *string - - /* HasAttachments. - - Specifies whether the emails have any attachments. - */ - HasAttachments *bool - - /* MailboxIds. - - Specifies the mailbox Ids which contains the emails/folders. - */ - MailboxIds []int64 - - /* ProtectionJobIds. - - Specifies the protection job Ids which have backed up mailbox(es) - continaing emails/folders. - */ - ProtectionJobIds []int64 - - /* ReceivedEndTime. - - Specifies the unix end time for querying on email's received time. - - Format: int64 - */ - ReceivedEndTime *int64 - - /* ReceivedStartTime. - - Specifies the unix start time for querying on email's received time. - - Format: int64 - */ - ReceivedStartTime *int64 - - /* ReceivedTimeSeconds. - - Specifies the unix time when the email was received. - - Format: int64 - */ - ReceivedTimeSeconds *int64 - - /* RecipientAddresses. - - Specifies the email addresses of the recipients. - */ - RecipientAddresses []string - - /* SenderAddress. - - Specifies the email address of the sender. - */ - SenderAddress *string - - /* SentTimeSeconds. - - Specifies the unix time when the email was sent. - - Format: int64 - */ - SentTimeSeconds *int64 - - /* ShowOnlyEmailFolders. - - Specifies whether the query result should include only Email folders. - */ - ShowOnlyEmailFolders *bool - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get outlook emails params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOutlookEmailsParams) WithDefaults() *GetOutlookEmailsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get outlook emails params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOutlookEmailsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get outlook emails params -func (o *GetOutlookEmailsParams) WithTimeout(timeout time.Duration) *GetOutlookEmailsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get outlook emails params -func (o *GetOutlookEmailsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get outlook emails params -func (o *GetOutlookEmailsParams) WithContext(ctx context.Context) *GetOutlookEmailsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get outlook emails params -func (o *GetOutlookEmailsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get outlook emails params -func (o *GetOutlookEmailsParams) WithHTTPClient(client *http.Client) *GetOutlookEmailsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get outlook emails params -func (o *GetOutlookEmailsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get outlook emails params -func (o *GetOutlookEmailsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetOutlookEmailsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get outlook emails params -func (o *GetOutlookEmailsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithBccRecipientAddresses adds the bccRecipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) WithBccRecipientAddresses(bccRecipientAddresses []string) *GetOutlookEmailsParams { - o.SetBccRecipientAddresses(bccRecipientAddresses) - return o -} - -// SetBccRecipientAddresses adds the bccRecipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) SetBccRecipientAddresses(bccRecipientAddresses []string) { - o.BccRecipientAddresses = bccRecipientAddresses -} - -// WithCcRecipientAddresses adds the ccRecipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) WithCcRecipientAddresses(ccRecipientAddresses []string) *GetOutlookEmailsParams { - o.SetCcRecipientAddresses(ccRecipientAddresses) - return o -} - -// SetCcRecipientAddresses adds the ccRecipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) SetCcRecipientAddresses(ccRecipientAddresses []string) { - o.CcRecipientAddresses = ccRecipientAddresses -} - -// WithDomainIds adds the domainIds to the get outlook emails params -func (o *GetOutlookEmailsParams) WithDomainIds(domainIds []int64) *GetOutlookEmailsParams { - o.SetDomainIds(domainIds) - return o -} - -// SetDomainIds adds the domainIds to the get outlook emails params -func (o *GetOutlookEmailsParams) SetDomainIds(domainIds []int64) { - o.DomainIds = domainIds -} - -// WithEmailSubject adds the emailSubject to the get outlook emails params -func (o *GetOutlookEmailsParams) WithEmailSubject(emailSubject *string) *GetOutlookEmailsParams { - o.SetEmailSubject(emailSubject) - return o -} - -// SetEmailSubject adds the emailSubject to the get outlook emails params -func (o *GetOutlookEmailsParams) SetEmailSubject(emailSubject *string) { - o.EmailSubject = emailSubject -} - -// WithFolderName adds the folderName to the get outlook emails params -func (o *GetOutlookEmailsParams) WithFolderName(folderName *string) *GetOutlookEmailsParams { - o.SetFolderName(folderName) - return o -} - -// SetFolderName adds the folderName to the get outlook emails params -func (o *GetOutlookEmailsParams) SetFolderName(folderName *string) { - o.FolderName = folderName -} - -// WithHasAttachments adds the hasAttachments to the get outlook emails params -func (o *GetOutlookEmailsParams) WithHasAttachments(hasAttachments *bool) *GetOutlookEmailsParams { - o.SetHasAttachments(hasAttachments) - return o -} - -// SetHasAttachments adds the hasAttachments to the get outlook emails params -func (o *GetOutlookEmailsParams) SetHasAttachments(hasAttachments *bool) { - o.HasAttachments = hasAttachments -} - -// WithMailboxIds adds the mailboxIds to the get outlook emails params -func (o *GetOutlookEmailsParams) WithMailboxIds(mailboxIds []int64) *GetOutlookEmailsParams { - o.SetMailboxIds(mailboxIds) - return o -} - -// SetMailboxIds adds the mailboxIds to the get outlook emails params -func (o *GetOutlookEmailsParams) SetMailboxIds(mailboxIds []int64) { - o.MailboxIds = mailboxIds -} - -// WithProtectionJobIds adds the protectionJobIds to the get outlook emails params -func (o *GetOutlookEmailsParams) WithProtectionJobIds(protectionJobIds []int64) *GetOutlookEmailsParams { - o.SetProtectionJobIds(protectionJobIds) - return o -} - -// SetProtectionJobIds adds the protectionJobIds to the get outlook emails params -func (o *GetOutlookEmailsParams) SetProtectionJobIds(protectionJobIds []int64) { - o.ProtectionJobIds = protectionJobIds -} - -// WithReceivedEndTime adds the receivedEndTime to the get outlook emails params -func (o *GetOutlookEmailsParams) WithReceivedEndTime(receivedEndTime *int64) *GetOutlookEmailsParams { - o.SetReceivedEndTime(receivedEndTime) - return o -} - -// SetReceivedEndTime adds the receivedEndTime to the get outlook emails params -func (o *GetOutlookEmailsParams) SetReceivedEndTime(receivedEndTime *int64) { - o.ReceivedEndTime = receivedEndTime -} - -// WithReceivedStartTime adds the receivedStartTime to the get outlook emails params -func (o *GetOutlookEmailsParams) WithReceivedStartTime(receivedStartTime *int64) *GetOutlookEmailsParams { - o.SetReceivedStartTime(receivedStartTime) - return o -} - -// SetReceivedStartTime adds the receivedStartTime to the get outlook emails params -func (o *GetOutlookEmailsParams) SetReceivedStartTime(receivedStartTime *int64) { - o.ReceivedStartTime = receivedStartTime -} - -// WithReceivedTimeSeconds adds the receivedTimeSeconds to the get outlook emails params -func (o *GetOutlookEmailsParams) WithReceivedTimeSeconds(receivedTimeSeconds *int64) *GetOutlookEmailsParams { - o.SetReceivedTimeSeconds(receivedTimeSeconds) - return o -} - -// SetReceivedTimeSeconds adds the receivedTimeSeconds to the get outlook emails params -func (o *GetOutlookEmailsParams) SetReceivedTimeSeconds(receivedTimeSeconds *int64) { - o.ReceivedTimeSeconds = receivedTimeSeconds -} - -// WithRecipientAddresses adds the recipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) WithRecipientAddresses(recipientAddresses []string) *GetOutlookEmailsParams { - o.SetRecipientAddresses(recipientAddresses) - return o -} - -// SetRecipientAddresses adds the recipientAddresses to the get outlook emails params -func (o *GetOutlookEmailsParams) SetRecipientAddresses(recipientAddresses []string) { - o.RecipientAddresses = recipientAddresses -} - -// WithSenderAddress adds the senderAddress to the get outlook emails params -func (o *GetOutlookEmailsParams) WithSenderAddress(senderAddress *string) *GetOutlookEmailsParams { - o.SetSenderAddress(senderAddress) - return o -} - -// SetSenderAddress adds the senderAddress to the get outlook emails params -func (o *GetOutlookEmailsParams) SetSenderAddress(senderAddress *string) { - o.SenderAddress = senderAddress -} - -// WithSentTimeSeconds adds the sentTimeSeconds to the get outlook emails params -func (o *GetOutlookEmailsParams) WithSentTimeSeconds(sentTimeSeconds *int64) *GetOutlookEmailsParams { - o.SetSentTimeSeconds(sentTimeSeconds) - return o -} - -// SetSentTimeSeconds adds the sentTimeSeconds to the get outlook emails params -func (o *GetOutlookEmailsParams) SetSentTimeSeconds(sentTimeSeconds *int64) { - o.SentTimeSeconds = sentTimeSeconds -} - -// WithShowOnlyEmailFolders adds the showOnlyEmailFolders to the get outlook emails params -func (o *GetOutlookEmailsParams) WithShowOnlyEmailFolders(showOnlyEmailFolders *bool) *GetOutlookEmailsParams { - o.SetShowOnlyEmailFolders(showOnlyEmailFolders) - return o -} - -// SetShowOnlyEmailFolders adds the showOnlyEmailFolders to the get outlook emails params -func (o *GetOutlookEmailsParams) SetShowOnlyEmailFolders(showOnlyEmailFolders *bool) { - o.ShowOnlyEmailFolders = showOnlyEmailFolders -} - -// WithTenantID adds the tenantID to the get outlook emails params -func (o *GetOutlookEmailsParams) WithTenantID(tenantID *string) *GetOutlookEmailsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get outlook emails params -func (o *GetOutlookEmailsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOutlookEmailsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.BccRecipientAddresses != nil { - - // binding items for bccRecipientAddresses - joinedBccRecipientAddresses := o.bindParamBccRecipientAddresses(reg) - - // query array param bccRecipientAddresses - if err := r.SetQueryParam("bccRecipientAddresses", joinedBccRecipientAddresses...); err != nil { - return err - } - } - - if o.CcRecipientAddresses != nil { - - // binding items for ccRecipientAddresses - joinedCcRecipientAddresses := o.bindParamCcRecipientAddresses(reg) - - // query array param ccRecipientAddresses - if err := r.SetQueryParam("ccRecipientAddresses", joinedCcRecipientAddresses...); err != nil { - return err - } - } - - if o.DomainIds != nil { - - // binding items for domainIds - joinedDomainIds := o.bindParamDomainIds(reg) - - // query array param domainIds - if err := r.SetQueryParam("domainIds", joinedDomainIds...); err != nil { - return err - } - } - - if o.EmailSubject != nil { - - // query param emailSubject - var qrEmailSubject string - - if o.EmailSubject != nil { - qrEmailSubject = *o.EmailSubject - } - qEmailSubject := qrEmailSubject - if qEmailSubject != "" { - - if err := r.SetQueryParam("emailSubject", qEmailSubject); err != nil { - return err - } - } - } - - if o.FolderName != nil { - - // query param folderName - var qrFolderName string - - if o.FolderName != nil { - qrFolderName = *o.FolderName - } - qFolderName := qrFolderName - if qFolderName != "" { - - if err := r.SetQueryParam("folderName", qFolderName); err != nil { - return err - } - } - } - - if o.HasAttachments != nil { - - // query param hasAttachments - var qrHasAttachments bool - - if o.HasAttachments != nil { - qrHasAttachments = *o.HasAttachments - } - qHasAttachments := swag.FormatBool(qrHasAttachments) - if qHasAttachments != "" { - - if err := r.SetQueryParam("hasAttachments", qHasAttachments); err != nil { - return err - } - } - } - - if o.MailboxIds != nil { - - // binding items for mailboxIds - joinedMailboxIds := o.bindParamMailboxIds(reg) - - // query array param mailboxIds - if err := r.SetQueryParam("mailboxIds", joinedMailboxIds...); err != nil { - return err - } - } - - if o.ProtectionJobIds != nil { - - // binding items for protectionJobIds - joinedProtectionJobIds := o.bindParamProtectionJobIds(reg) - - // query array param protectionJobIds - if err := r.SetQueryParam("protectionJobIds", joinedProtectionJobIds...); err != nil { - return err - } - } - - if o.ReceivedEndTime != nil { - - // query param receivedEndTime - var qrReceivedEndTime int64 - - if o.ReceivedEndTime != nil { - qrReceivedEndTime = *o.ReceivedEndTime - } - qReceivedEndTime := swag.FormatInt64(qrReceivedEndTime) - if qReceivedEndTime != "" { - - if err := r.SetQueryParam("receivedEndTime", qReceivedEndTime); err != nil { - return err - } - } - } - - if o.ReceivedStartTime != nil { - - // query param receivedStartTime - var qrReceivedStartTime int64 - - if o.ReceivedStartTime != nil { - qrReceivedStartTime = *o.ReceivedStartTime - } - qReceivedStartTime := swag.FormatInt64(qrReceivedStartTime) - if qReceivedStartTime != "" { - - if err := r.SetQueryParam("receivedStartTime", qReceivedStartTime); err != nil { - return err - } - } - } - - if o.ReceivedTimeSeconds != nil { - - // query param receivedTimeSeconds - var qrReceivedTimeSeconds int64 - - if o.ReceivedTimeSeconds != nil { - qrReceivedTimeSeconds = *o.ReceivedTimeSeconds - } - qReceivedTimeSeconds := swag.FormatInt64(qrReceivedTimeSeconds) - if qReceivedTimeSeconds != "" { - - if err := r.SetQueryParam("receivedTimeSeconds", qReceivedTimeSeconds); err != nil { - return err - } - } - } - - if o.RecipientAddresses != nil { - - // binding items for recipientAddresses - joinedRecipientAddresses := o.bindParamRecipientAddresses(reg) - - // query array param recipientAddresses - if err := r.SetQueryParam("recipientAddresses", joinedRecipientAddresses...); err != nil { - return err - } - } - - if o.SenderAddress != nil { - - // query param senderAddress - var qrSenderAddress string - - if o.SenderAddress != nil { - qrSenderAddress = *o.SenderAddress - } - qSenderAddress := qrSenderAddress - if qSenderAddress != "" { - - if err := r.SetQueryParam("senderAddress", qSenderAddress); err != nil { - return err - } - } - } - - if o.SentTimeSeconds != nil { - - // query param sentTimeSeconds - var qrSentTimeSeconds int64 - - if o.SentTimeSeconds != nil { - qrSentTimeSeconds = *o.SentTimeSeconds - } - qSentTimeSeconds := swag.FormatInt64(qrSentTimeSeconds) - if qSentTimeSeconds != "" { - - if err := r.SetQueryParam("sentTimeSeconds", qSentTimeSeconds); err != nil { - return err - } - } - } - - if o.ShowOnlyEmailFolders != nil { - - // query param showOnlyEmailFolders - var qrShowOnlyEmailFolders bool - - if o.ShowOnlyEmailFolders != nil { - qrShowOnlyEmailFolders = *o.ShowOnlyEmailFolders - } - qShowOnlyEmailFolders := swag.FormatBool(qrShowOnlyEmailFolders) - if qShowOnlyEmailFolders != "" { - - if err := r.SetQueryParam("showOnlyEmailFolders", qShowOnlyEmailFolders); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetOutlookEmails binds the parameter bccRecipientAddresses -func (o *GetOutlookEmailsParams) bindParamBccRecipientAddresses(formats strfmt.Registry) []string { - bccRecipientAddressesIR := o.BccRecipientAddresses - - var bccRecipientAddressesIC []string - for _, bccRecipientAddressesIIR := range bccRecipientAddressesIR { // explode []string - - bccRecipientAddressesIIV := bccRecipientAddressesIIR // string as string - bccRecipientAddressesIC = append(bccRecipientAddressesIC, bccRecipientAddressesIIV) - } - - // items.CollectionFormat: "" - bccRecipientAddressesIS := swag.JoinByFormat(bccRecipientAddressesIC, "") - - return bccRecipientAddressesIS -} - -// bindParamGetOutlookEmails binds the parameter ccRecipientAddresses -func (o *GetOutlookEmailsParams) bindParamCcRecipientAddresses(formats strfmt.Registry) []string { - ccRecipientAddressesIR := o.CcRecipientAddresses - - var ccRecipientAddressesIC []string - for _, ccRecipientAddressesIIR := range ccRecipientAddressesIR { // explode []string - - ccRecipientAddressesIIV := ccRecipientAddressesIIR // string as string - ccRecipientAddressesIC = append(ccRecipientAddressesIC, ccRecipientAddressesIIV) - } - - // items.CollectionFormat: "" - ccRecipientAddressesIS := swag.JoinByFormat(ccRecipientAddressesIC, "") - - return ccRecipientAddressesIS -} - -// bindParamGetOutlookEmails binds the parameter domainIds -func (o *GetOutlookEmailsParams) bindParamDomainIds(formats strfmt.Registry) []string { - domainIdsIR := o.DomainIds - - var domainIdsIC []string - for _, domainIdsIIR := range domainIdsIR { // explode []int64 - - domainIdsIIV := swag.FormatInt64(domainIdsIIR) // int64 as string - domainIdsIC = append(domainIdsIC, domainIdsIIV) - } - - // items.CollectionFormat: "" - domainIdsIS := swag.JoinByFormat(domainIdsIC, "") - - return domainIdsIS -} - -// bindParamGetOutlookEmails binds the parameter mailboxIds -func (o *GetOutlookEmailsParams) bindParamMailboxIds(formats strfmt.Registry) []string { - mailboxIdsIR := o.MailboxIds - - var mailboxIdsIC []string - for _, mailboxIdsIIR := range mailboxIdsIR { // explode []int64 - - mailboxIdsIIV := swag.FormatInt64(mailboxIdsIIR) // int64 as string - mailboxIdsIC = append(mailboxIdsIC, mailboxIdsIIV) - } - - // items.CollectionFormat: "" - mailboxIdsIS := swag.JoinByFormat(mailboxIdsIC, "") - - return mailboxIdsIS -} - -// bindParamGetOutlookEmails binds the parameter protectionJobIds -func (o *GetOutlookEmailsParams) bindParamProtectionJobIds(formats strfmt.Registry) []string { - protectionJobIdsIR := o.ProtectionJobIds - - var protectionJobIdsIC []string - for _, protectionJobIdsIIR := range protectionJobIdsIR { // explode []int64 - - protectionJobIdsIIV := swag.FormatInt64(protectionJobIdsIIR) // int64 as string - protectionJobIdsIC = append(protectionJobIdsIC, protectionJobIdsIIV) - } - - // items.CollectionFormat: "" - protectionJobIdsIS := swag.JoinByFormat(protectionJobIdsIC, "") - - return protectionJobIdsIS -} - -// bindParamGetOutlookEmails binds the parameter recipientAddresses -func (o *GetOutlookEmailsParams) bindParamRecipientAddresses(formats strfmt.Registry) []string { - recipientAddressesIR := o.RecipientAddresses - - var recipientAddressesIC []string - for _, recipientAddressesIIR := range recipientAddressesIR { // explode []string - - recipientAddressesIIV := recipientAddressesIIR // string as string - recipientAddressesIC = append(recipientAddressesIC, recipientAddressesIIV) - } - - // items.CollectionFormat: "" - recipientAddressesIS := swag.JoinByFormat(recipientAddressesIC, "") - - return recipientAddressesIS -} diff --git a/v1/client/restore_tasks/get_outlook_emails_responses.go b/v1/client/restore_tasks/get_outlook_emails_responses.go deleted file mode 100644 index 06b51a38..00000000 --- a/v1/client/restore_tasks/get_outlook_emails_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetOutlookEmailsReader is a Reader for the GetOutlookEmails structure. -type GetOutlookEmailsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOutlookEmailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOutlookEmailsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetOutlookEmailsDefault(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 - } -} - -// NewGetOutlookEmailsOK creates a GetOutlookEmailsOK with default headers values -func NewGetOutlookEmailsOK() *GetOutlookEmailsOK { - return &GetOutlookEmailsOK{} -} - -/* -GetOutlookEmailsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetOutlookEmailsOK struct { - Payload *models.FileSearchResults -} - -// IsSuccess returns true when this get outlook emails o k response has a 2xx status code -func (o *GetOutlookEmailsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get outlook emails o k response has a 3xx status code -func (o *GetOutlookEmailsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get outlook emails o k response has a 4xx status code -func (o *GetOutlookEmailsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get outlook emails o k response has a 5xx status code -func (o *GetOutlookEmailsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get outlook emails o k response a status code equal to that given -func (o *GetOutlookEmailsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get outlook emails o k response -func (o *GetOutlookEmailsOK) Code() int { - return 200 -} - -func (o *GetOutlookEmailsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/outlook/emails][%d] getOutlookEmailsOK %s", 200, payload) -} - -func (o *GetOutlookEmailsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/outlook/emails][%d] getOutlookEmailsOK %s", 200, payload) -} - -func (o *GetOutlookEmailsOK) GetPayload() *models.FileSearchResults { - return o.Payload -} - -func (o *GetOutlookEmailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOutlookEmailsDefault creates a GetOutlookEmailsDefault with default headers values -func NewGetOutlookEmailsDefault(code int) *GetOutlookEmailsDefault { - return &GetOutlookEmailsDefault{ - _statusCode: code, - } -} - -/* -GetOutlookEmailsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetOutlookEmailsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get outlook emails default response has a 2xx status code -func (o *GetOutlookEmailsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get outlook emails default response has a 3xx status code -func (o *GetOutlookEmailsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get outlook emails default response has a 4xx status code -func (o *GetOutlookEmailsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get outlook emails default response has a 5xx status code -func (o *GetOutlookEmailsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get outlook emails default response a status code equal to that given -func (o *GetOutlookEmailsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get outlook emails default response -func (o *GetOutlookEmailsDefault) Code() int { - return o._statusCode -} - -func (o *GetOutlookEmailsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/outlook/emails][%d] GetOutlookEmails default %s", o._statusCode, payload) -} - -func (o *GetOutlookEmailsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/outlook/emails][%d] GetOutlookEmails default %s", o._statusCode, payload) -} - -func (o *GetOutlookEmailsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetOutlookEmailsDefault) 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/restore_tasks/get_restore_job_by_id_parameters.go b/v1/client/restore_tasks/get_restore_job_by_id_parameters.go deleted file mode 100644 index e8963adf..00000000 --- a/v1/client/restore_tasks/get_restore_job_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetRestoreJobByIDParams creates a new GetRestoreJobByIDParams 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 NewGetRestoreJobByIDParams() *GetRestoreJobByIDParams { - return &GetRestoreJobByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreJobByIDParamsWithTimeout creates a new GetRestoreJobByIDParams object -// with the ability to set a timeout on a request. -func NewGetRestoreJobByIDParamsWithTimeout(timeout time.Duration) *GetRestoreJobByIDParams { - return &GetRestoreJobByIDParams{ - timeout: timeout, - } -} - -// NewGetRestoreJobByIDParamsWithContext creates a new GetRestoreJobByIDParams object -// with the ability to set a context for a request. -func NewGetRestoreJobByIDParamsWithContext(ctx context.Context) *GetRestoreJobByIDParams { - return &GetRestoreJobByIDParams{ - Context: ctx, - } -} - -// NewGetRestoreJobByIDParamsWithHTTPClient creates a new GetRestoreJobByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreJobByIDParamsWithHTTPClient(client *http.Client) *GetRestoreJobByIDParams { - return &GetRestoreJobByIDParams{ - HTTPClient: client, - } -} - -/* -GetRestoreJobByIDParams contains all the parameters to send to the API endpoint - - for the get restore job by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreJobByIDParams struct { - - /* ID. - - Unique id of the Restore Job to return. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreJobByIDParams) WithDefaults() *GetRestoreJobByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore job by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreJobByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore job by Id params -func (o *GetRestoreJobByIDParams) WithTimeout(timeout time.Duration) *GetRestoreJobByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore job by Id params -func (o *GetRestoreJobByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore job by Id params -func (o *GetRestoreJobByIDParams) WithContext(ctx context.Context) *GetRestoreJobByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore job by Id params -func (o *GetRestoreJobByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore job by Id params -func (o *GetRestoreJobByIDParams) WithHTTPClient(client *http.Client) *GetRestoreJobByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore job by Id params -func (o *GetRestoreJobByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get restore job by Id params -func (o *GetRestoreJobByIDParams) WithID(id int64) *GetRestoreJobByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get restore job by Id params -func (o *GetRestoreJobByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreJobByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_restore_job_by_id_responses.go b/v1/client/restore_tasks/get_restore_job_by_id_responses.go deleted file mode 100644 index b15d0aae..00000000 --- a/v1/client/restore_tasks/get_restore_job_by_id_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreJobByIDReader is a Reader for the GetRestoreJobByID structure. -type GetRestoreJobByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreJobByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreJobByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreJobByIDDefault(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 - } -} - -// NewGetRestoreJobByIDOK creates a GetRestoreJobByIDOK with default headers values -func NewGetRestoreJobByIDOK() *GetRestoreJobByIDOK { - return &GetRestoreJobByIDOK{} -} - -/* -GetRestoreJobByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreJobByIDOK struct { - Payload []*models.RestoreTaskWrapper -} - -// IsSuccess returns true when this get restore job by Id o k response has a 2xx status code -func (o *GetRestoreJobByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore job by Id o k response has a 3xx status code -func (o *GetRestoreJobByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore job by Id o k response has a 4xx status code -func (o *GetRestoreJobByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore job by Id o k response has a 5xx status code -func (o *GetRestoreJobByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore job by Id o k response a status code equal to that given -func (o *GetRestoreJobByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore job by Id o k response -func (o *GetRestoreJobByIDOK) Code() int { - return 200 -} - -func (o *GetRestoreJobByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks/{id}][%d] getRestoreJobByIdOK %s", 200, payload) -} - -func (o *GetRestoreJobByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks/{id}][%d] getRestoreJobByIdOK %s", 200, payload) -} - -func (o *GetRestoreJobByIDOK) GetPayload() []*models.RestoreTaskWrapper { - return o.Payload -} - -func (o *GetRestoreJobByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreJobByIDDefault creates a GetRestoreJobByIDDefault with default headers values -func NewGetRestoreJobByIDDefault(code int) *GetRestoreJobByIDDefault { - return &GetRestoreJobByIDDefault{ - _statusCode: code, - } -} - -/* -GetRestoreJobByIDDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetRestoreJobByIDDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get restore job by Id default response has a 2xx status code -func (o *GetRestoreJobByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore job by Id default response has a 3xx status code -func (o *GetRestoreJobByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore job by Id default response has a 4xx status code -func (o *GetRestoreJobByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore job by Id default response has a 5xx status code -func (o *GetRestoreJobByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore job by Id default response a status code equal to that given -func (o *GetRestoreJobByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore job by Id default response -func (o *GetRestoreJobByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreJobByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks/{id}][%d] GetRestoreJobById default %s", o._statusCode, payload) -} - -func (o *GetRestoreJobByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks/{id}][%d] GetRestoreJobById default %s", o._statusCode, payload) -} - -func (o *GetRestoreJobByIDDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetRestoreJobByIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore_tasks/get_restore_jobs_parameters.go b/v1/client/restore_tasks/get_restore_jobs_parameters.go deleted file mode 100644 index b41fc597..00000000 --- a/v1/client/restore_tasks/get_restore_jobs_parameters.go +++ /dev/null @@ -1,497 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetRestoreJobsParams creates a new GetRestoreJobsParams 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 NewGetRestoreJobsParams() *GetRestoreJobsParams { - return &GetRestoreJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreJobsParamsWithTimeout creates a new GetRestoreJobsParams object -// with the ability to set a timeout on a request. -func NewGetRestoreJobsParamsWithTimeout(timeout time.Duration) *GetRestoreJobsParams { - return &GetRestoreJobsParams{ - timeout: timeout, - } -} - -// NewGetRestoreJobsParamsWithContext creates a new GetRestoreJobsParams object -// with the ability to set a context for a request. -func NewGetRestoreJobsParamsWithContext(ctx context.Context) *GetRestoreJobsParams { - return &GetRestoreJobsParams{ - Context: ctx, - } -} - -// NewGetRestoreJobsParamsWithHTTPClient creates a new GetRestoreJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreJobsParamsWithHTTPClient(client *http.Client) *GetRestoreJobsParams { - return &GetRestoreJobsParams{ - HTTPClient: client, - } -} - -/* -GetRestoreJobsParams contains all the parameters to send to the API endpoint - - for the get restore jobs operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreJobsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if all the restore tasks under the hierarchy - of given tenants be listed. If no tenant id is specified then restore - tasks under hierarchy of session user's tenant are listed. It is set true - by default for external APIs. - */ - AllUnderHierarchy *bool - - /* EndTimeUsecs. - - EndTimeUsecs is the end time in usecs. If not set, "now" is treated as the - end time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Ids. - - Ids are the ids of the restore jobs to filter. - */ - Ids []int64 - - /* LimitNumFinishedTasks. - - LimitNumFinishedTasks limits the number of finished restore tasks - returned. The newest finished tasks (by start time) are returned. - - Format: int64 - */ - LimitNumFinishedTasks *int64 - - /* RestoreTypes. - - If RestoreTypes is set then only the tasks corresponding to specified types - will be returned. User can specify kRecoverVMs, kCloneVMs, kRestoreFiles, - kRestoreApp, kCloneView. - */ - RestoreTypes []string - - /* StartTimeUsecs. - - StartTimeUsecs is the start time in usecs. If not set, historical - restore operations all the way to the beginning are looked at. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* StorageDomainIds. - - Filter by a list of Storage Domain IDs. This field applies only if - 'RestoreTypes' includes 'kCloneView'. Only task writing data to these - storage domains will be returned. - */ - StorageDomainIds []int64 - - /* TargetType. - - TargetType can be specified if requesting only tasks belonging to kLocal, - kArchival or kTape. - */ - TargetType *string - - /* TenantIds. - - TenantIds to filter restore tasks of given tenants. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreJobsParams) WithDefaults() *GetRestoreJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore jobs params -func (o *GetRestoreJobsParams) WithTimeout(timeout time.Duration) *GetRestoreJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore jobs params -func (o *GetRestoreJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore jobs params -func (o *GetRestoreJobsParams) WithContext(ctx context.Context) *GetRestoreJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore jobs params -func (o *GetRestoreJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore jobs params -func (o *GetRestoreJobsParams) WithHTTPClient(client *http.Client) *GetRestoreJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore jobs params -func (o *GetRestoreJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get restore jobs params -func (o *GetRestoreJobsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetRestoreJobsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get restore jobs params -func (o *GetRestoreJobsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get restore jobs params -func (o *GetRestoreJobsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetRestoreJobsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get restore jobs params -func (o *GetRestoreJobsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithIds adds the ids to the get restore jobs params -func (o *GetRestoreJobsParams) WithIds(ids []int64) *GetRestoreJobsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get restore jobs params -func (o *GetRestoreJobsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithLimitNumFinishedTasks adds the limitNumFinishedTasks to the get restore jobs params -func (o *GetRestoreJobsParams) WithLimitNumFinishedTasks(limitNumFinishedTasks *int64) *GetRestoreJobsParams { - o.SetLimitNumFinishedTasks(limitNumFinishedTasks) - return o -} - -// SetLimitNumFinishedTasks adds the limitNumFinishedTasks to the get restore jobs params -func (o *GetRestoreJobsParams) SetLimitNumFinishedTasks(limitNumFinishedTasks *int64) { - o.LimitNumFinishedTasks = limitNumFinishedTasks -} - -// WithRestoreTypes adds the restoreTypes to the get restore jobs params -func (o *GetRestoreJobsParams) WithRestoreTypes(restoreTypes []string) *GetRestoreJobsParams { - o.SetRestoreTypes(restoreTypes) - return o -} - -// SetRestoreTypes adds the restoreTypes to the get restore jobs params -func (o *GetRestoreJobsParams) SetRestoreTypes(restoreTypes []string) { - o.RestoreTypes = restoreTypes -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get restore jobs params -func (o *GetRestoreJobsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetRestoreJobsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get restore jobs params -func (o *GetRestoreJobsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStorageDomainIds adds the storageDomainIds to the get restore jobs params -func (o *GetRestoreJobsParams) WithStorageDomainIds(storageDomainIds []int64) *GetRestoreJobsParams { - o.SetStorageDomainIds(storageDomainIds) - return o -} - -// SetStorageDomainIds adds the storageDomainIds to the get restore jobs params -func (o *GetRestoreJobsParams) SetStorageDomainIds(storageDomainIds []int64) { - o.StorageDomainIds = storageDomainIds -} - -// WithTargetType adds the targetType to the get restore jobs params -func (o *GetRestoreJobsParams) WithTargetType(targetType *string) *GetRestoreJobsParams { - o.SetTargetType(targetType) - return o -} - -// SetTargetType adds the targetType to the get restore jobs params -func (o *GetRestoreJobsParams) SetTargetType(targetType *string) { - o.TargetType = targetType -} - -// WithTenantIds adds the tenantIds to the get restore jobs params -func (o *GetRestoreJobsParams) WithTenantIds(tenantIds []string) *GetRestoreJobsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get restore jobs params -func (o *GetRestoreJobsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.LimitNumFinishedTasks != nil { - - // query param limitNumFinishedTasks - var qrLimitNumFinishedTasks int64 - - if o.LimitNumFinishedTasks != nil { - qrLimitNumFinishedTasks = *o.LimitNumFinishedTasks - } - qLimitNumFinishedTasks := swag.FormatInt64(qrLimitNumFinishedTasks) - if qLimitNumFinishedTasks != "" { - - if err := r.SetQueryParam("limitNumFinishedTasks", qLimitNumFinishedTasks); err != nil { - return err - } - } - } - - if o.RestoreTypes != nil { - - // binding items for restoreTypes - joinedRestoreTypes := o.bindParamRestoreTypes(reg) - - // query array param restoreTypes - if err := r.SetQueryParam("restoreTypes", joinedRestoreTypes...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.StorageDomainIds != nil { - - // binding items for storageDomainIds - joinedStorageDomainIds := o.bindParamStorageDomainIds(reg) - - // query array param storageDomainIds - if err := r.SetQueryParam("storageDomainIds", joinedStorageDomainIds...); err != nil { - return err - } - } - - if o.TargetType != nil { - - // query param targetType - var qrTargetType string - - if o.TargetType != nil { - qrTargetType = *o.TargetType - } - qTargetType := qrTargetType - if qTargetType != "" { - - if err := r.SetQueryParam("targetType", qTargetType); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRestoreJobs binds the parameter ids -func (o *GetRestoreJobsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetRestoreJobs binds the parameter restoreTypes -func (o *GetRestoreJobsParams) bindParamRestoreTypes(formats strfmt.Registry) []string { - restoreTypesIR := o.RestoreTypes - - var restoreTypesIC []string - for _, restoreTypesIIR := range restoreTypesIR { // explode []string - - restoreTypesIIV := restoreTypesIIR // string as string - restoreTypesIC = append(restoreTypesIC, restoreTypesIIV) - } - - // items.CollectionFormat: "" - restoreTypesIS := swag.JoinByFormat(restoreTypesIC, "") - - return restoreTypesIS -} - -// bindParamGetRestoreJobs binds the parameter storageDomainIds -func (o *GetRestoreJobsParams) bindParamStorageDomainIds(formats strfmt.Registry) []string { - storageDomainIdsIR := o.StorageDomainIds - - var storageDomainIdsIC []string - for _, storageDomainIdsIIR := range storageDomainIdsIR { // explode []int64 - - storageDomainIdsIIV := swag.FormatInt64(storageDomainIdsIIR) // int64 as string - storageDomainIdsIC = append(storageDomainIdsIC, storageDomainIdsIIV) - } - - // items.CollectionFormat: "" - storageDomainIdsIS := swag.JoinByFormat(storageDomainIdsIC, "") - - return storageDomainIdsIS -} - -// bindParamGetRestoreJobs binds the parameter tenantIds -func (o *GetRestoreJobsParams) 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/v1/client/restore_tasks/get_restore_jobs_responses.go b/v1/client/restore_tasks/get_restore_jobs_responses.go deleted file mode 100644 index fac2a94f..00000000 --- a/v1/client/restore_tasks/get_restore_jobs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreJobsReader is a Reader for the GetRestoreJobs structure. -type GetRestoreJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreJobsDefault(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 - } -} - -// NewGetRestoreJobsOK creates a GetRestoreJobsOK with default headers values -func NewGetRestoreJobsOK() *GetRestoreJobsOK { - return &GetRestoreJobsOK{} -} - -/* -GetRestoreJobsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreJobsOK struct { - Payload []*models.RestoreTaskWrapper -} - -// IsSuccess returns true when this get restore jobs o k response has a 2xx status code -func (o *GetRestoreJobsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore jobs o k response has a 3xx status code -func (o *GetRestoreJobsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore jobs o k response has a 4xx status code -func (o *GetRestoreJobsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore jobs o k response has a 5xx status code -func (o *GetRestoreJobsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore jobs o k response a status code equal to that given -func (o *GetRestoreJobsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore jobs o k response -func (o *GetRestoreJobsOK) Code() int { - return 200 -} - -func (o *GetRestoreJobsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks][%d] getRestoreJobsOK %s", 200, payload) -} - -func (o *GetRestoreJobsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks][%d] getRestoreJobsOK %s", 200, payload) -} - -func (o *GetRestoreJobsOK) GetPayload() []*models.RestoreTaskWrapper { - return o.Payload -} - -func (o *GetRestoreJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreJobsDefault creates a GetRestoreJobsDefault with default headers values -func NewGetRestoreJobsDefault(code int) *GetRestoreJobsDefault { - return &GetRestoreJobsDefault{ - _statusCode: code, - } -} - -/* -GetRestoreJobsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetRestoreJobsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get restore jobs default response has a 2xx status code -func (o *GetRestoreJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore jobs default response has a 3xx status code -func (o *GetRestoreJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore jobs default response has a 4xx status code -func (o *GetRestoreJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore jobs default response has a 5xx status code -func (o *GetRestoreJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore jobs default response a status code equal to that given -func (o *GetRestoreJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore jobs default response -func (o *GetRestoreJobsDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks][%d] GetRestoreJobs default %s", o._statusCode, payload) -} - -func (o *GetRestoreJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /restoretasks][%d] GetRestoreJobs default %s", o._statusCode, payload) -} - -func (o *GetRestoreJobsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetRestoreJobsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/restore_tasks/get_restore_points_for_time_range_parameters.go b/v1/client/restore_tasks/get_restore_points_for_time_range_parameters.go deleted file mode 100644 index 8c2ea843..00000000 --- a/v1/client/restore_tasks/get_restore_points_for_time_range_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGetRestorePointsForTimeRangeParams creates a new GetRestorePointsForTimeRangeParams 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 NewGetRestorePointsForTimeRangeParams() *GetRestorePointsForTimeRangeParams { - return &GetRestorePointsForTimeRangeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestorePointsForTimeRangeParamsWithTimeout creates a new GetRestorePointsForTimeRangeParams object -// with the ability to set a timeout on a request. -func NewGetRestorePointsForTimeRangeParamsWithTimeout(timeout time.Duration) *GetRestorePointsForTimeRangeParams { - return &GetRestorePointsForTimeRangeParams{ - timeout: timeout, - } -} - -// NewGetRestorePointsForTimeRangeParamsWithContext creates a new GetRestorePointsForTimeRangeParams object -// with the ability to set a context for a request. -func NewGetRestorePointsForTimeRangeParamsWithContext(ctx context.Context) *GetRestorePointsForTimeRangeParams { - return &GetRestorePointsForTimeRangeParams{ - Context: ctx, - } -} - -// NewGetRestorePointsForTimeRangeParamsWithHTTPClient creates a new GetRestorePointsForTimeRangeParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestorePointsForTimeRangeParamsWithHTTPClient(client *http.Client) *GetRestorePointsForTimeRangeParams { - return &GetRestorePointsForTimeRangeParams{ - HTTPClient: client, - } -} - -/* -GetRestorePointsForTimeRangeParams contains all the parameters to send to the API endpoint - - for the get restore points for time range operation. - - Typically these are written to a http.Request. -*/ -type GetRestorePointsForTimeRangeParams struct { - - // Body. - Body *models.RestorePointsForTimeRangeParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore points for time range params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestorePointsForTimeRangeParams) WithDefaults() *GetRestorePointsForTimeRangeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore points for time range params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestorePointsForTimeRangeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) WithTimeout(timeout time.Duration) *GetRestorePointsForTimeRangeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) WithContext(ctx context.Context) *GetRestorePointsForTimeRangeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) WithHTTPClient(client *http.Client) *GetRestorePointsForTimeRangeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) WithBody(body *models.RestorePointsForTimeRangeParam) *GetRestorePointsForTimeRangeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get restore points for time range params -func (o *GetRestorePointsForTimeRangeParams) SetBody(body *models.RestorePointsForTimeRangeParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestorePointsForTimeRangeParams) 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/restore_tasks/get_restore_points_for_time_range_responses.go b/v1/client/restore_tasks/get_restore_points_for_time_range_responses.go deleted file mode 100644 index 0a8597d1..00000000 --- a/v1/client/restore_tasks/get_restore_points_for_time_range_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestorePointsForTimeRangeReader is a Reader for the GetRestorePointsForTimeRange structure. -type GetRestorePointsForTimeRangeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestorePointsForTimeRangeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGetRestorePointsForTimeRangeCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestorePointsForTimeRangeDefault(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 - } -} - -// NewGetRestorePointsForTimeRangeCreated creates a GetRestorePointsForTimeRangeCreated with default headers values -func NewGetRestorePointsForTimeRangeCreated() *GetRestorePointsForTimeRangeCreated { - return &GetRestorePointsForTimeRangeCreated{} -} - -/* -GetRestorePointsForTimeRangeCreated describes a response with status code 201, with default header values. - -Success -*/ -type GetRestorePointsForTimeRangeCreated struct { - Payload *models.RestorePointsForTimeRange -} - -// IsSuccess returns true when this get restore points for time range created response has a 2xx status code -func (o *GetRestorePointsForTimeRangeCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore points for time range created response has a 3xx status code -func (o *GetRestorePointsForTimeRangeCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore points for time range created response has a 4xx status code -func (o *GetRestorePointsForTimeRangeCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore points for time range created response has a 5xx status code -func (o *GetRestorePointsForTimeRangeCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore points for time range created response a status code equal to that given -func (o *GetRestorePointsForTimeRangeCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the get restore points for time range created response -func (o *GetRestorePointsForTimeRangeCreated) Code() int { - return 201 -} - -func (o *GetRestorePointsForTimeRangeCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/pointsForTimeRange][%d] getRestorePointsForTimeRangeCreated %s", 201, payload) -} - -func (o *GetRestorePointsForTimeRangeCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/pointsForTimeRange][%d] getRestorePointsForTimeRangeCreated %s", 201, payload) -} - -func (o *GetRestorePointsForTimeRangeCreated) GetPayload() *models.RestorePointsForTimeRange { - return o.Payload -} - -func (o *GetRestorePointsForTimeRangeCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestorePointsForTimeRange) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestorePointsForTimeRangeDefault creates a GetRestorePointsForTimeRangeDefault with default headers values -func NewGetRestorePointsForTimeRangeDefault(code int) *GetRestorePointsForTimeRangeDefault { - return &GetRestorePointsForTimeRangeDefault{ - _statusCode: code, - } -} - -/* -GetRestorePointsForTimeRangeDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRestorePointsForTimeRangeDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get restore points for time range default response has a 2xx status code -func (o *GetRestorePointsForTimeRangeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore points for time range default response has a 3xx status code -func (o *GetRestorePointsForTimeRangeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore points for time range default response has a 4xx status code -func (o *GetRestorePointsForTimeRangeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore points for time range default response has a 5xx status code -func (o *GetRestorePointsForTimeRangeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore points for time range default response a status code equal to that given -func (o *GetRestorePointsForTimeRangeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore points for time range default response -func (o *GetRestorePointsForTimeRangeDefault) Code() int { - return o._statusCode -} - -func (o *GetRestorePointsForTimeRangeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/pointsForTimeRange][%d] GetRestorePointsForTimeRange default %s", o._statusCode, payload) -} - -func (o *GetRestorePointsForTimeRangeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/pointsForTimeRange][%d] GetRestorePointsForTimeRange default %s", o._statusCode, payload) -} - -func (o *GetRestorePointsForTimeRangeDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRestorePointsForTimeRangeDefault) 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/restore_tasks/get_restore_task_by_id_parameters.go b/v1/client/restore_tasks/get_restore_task_by_id_parameters.go deleted file mode 100644 index 9e53a7fd..00000000 --- a/v1/client/restore_tasks/get_restore_task_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetRestoreTaskByIDParams creates a new GetRestoreTaskByIDParams 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 NewGetRestoreTaskByIDParams() *GetRestoreTaskByIDParams { - return &GetRestoreTaskByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreTaskByIDParamsWithTimeout creates a new GetRestoreTaskByIDParams object -// with the ability to set a timeout on a request. -func NewGetRestoreTaskByIDParamsWithTimeout(timeout time.Duration) *GetRestoreTaskByIDParams { - return &GetRestoreTaskByIDParams{ - timeout: timeout, - } -} - -// NewGetRestoreTaskByIDParamsWithContext creates a new GetRestoreTaskByIDParams object -// with the ability to set a context for a request. -func NewGetRestoreTaskByIDParamsWithContext(ctx context.Context) *GetRestoreTaskByIDParams { - return &GetRestoreTaskByIDParams{ - Context: ctx, - } -} - -// NewGetRestoreTaskByIDParamsWithHTTPClient creates a new GetRestoreTaskByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreTaskByIDParamsWithHTTPClient(client *http.Client) *GetRestoreTaskByIDParams { - return &GetRestoreTaskByIDParams{ - HTTPClient: client, - } -} - -/* -GetRestoreTaskByIDParams contains all the parameters to send to the API endpoint - - for the get restore task by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreTaskByIDParams struct { - - /* ID. - - Specifies a unique id for the Restore Task. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore task by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreTaskByIDParams) WithDefaults() *GetRestoreTaskByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore task by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreTaskByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) WithTimeout(timeout time.Duration) *GetRestoreTaskByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) WithContext(ctx context.Context) *GetRestoreTaskByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) WithHTTPClient(client *http.Client) *GetRestoreTaskByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) WithID(id int64) *GetRestoreTaskByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get restore task by Id params -func (o *GetRestoreTaskByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreTaskByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_restore_task_by_id_responses.go b/v1/client/restore_tasks/get_restore_task_by_id_responses.go deleted file mode 100644 index 27b94871..00000000 --- a/v1/client/restore_tasks/get_restore_task_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreTaskByIDReader is a Reader for the GetRestoreTaskByID structure. -type GetRestoreTaskByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreTaskByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreTaskByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreTaskByIDDefault(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 - } -} - -// NewGetRestoreTaskByIDOK creates a GetRestoreTaskByIDOK with default headers values -func NewGetRestoreTaskByIDOK() *GetRestoreTaskByIDOK { - return &GetRestoreTaskByIDOK{} -} - -/* -GetRestoreTaskByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreTaskByIDOK struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this get restore task by Id o k response has a 2xx status code -func (o *GetRestoreTaskByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore task by Id o k response has a 3xx status code -func (o *GetRestoreTaskByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore task by Id o k response has a 4xx status code -func (o *GetRestoreTaskByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore task by Id o k response has a 5xx status code -func (o *GetRestoreTaskByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore task by Id o k response a status code equal to that given -func (o *GetRestoreTaskByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore task by Id o k response -func (o *GetRestoreTaskByIDOK) Code() int { - return 200 -} - -func (o *GetRestoreTaskByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks/{id}][%d] getRestoreTaskByIdOK %s", 200, payload) -} - -func (o *GetRestoreTaskByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks/{id}][%d] getRestoreTaskByIdOK %s", 200, payload) -} - -func (o *GetRestoreTaskByIDOK) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *GetRestoreTaskByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreTaskByIDDefault creates a GetRestoreTaskByIDDefault with default headers values -func NewGetRestoreTaskByIDDefault(code int) *GetRestoreTaskByIDDefault { - return &GetRestoreTaskByIDDefault{ - _statusCode: code, - } -} - -/* -GetRestoreTaskByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRestoreTaskByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get restore task by Id default response has a 2xx status code -func (o *GetRestoreTaskByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore task by Id default response has a 3xx status code -func (o *GetRestoreTaskByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore task by Id default response has a 4xx status code -func (o *GetRestoreTaskByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore task by Id default response has a 5xx status code -func (o *GetRestoreTaskByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore task by Id default response a status code equal to that given -func (o *GetRestoreTaskByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore task by Id default response -func (o *GetRestoreTaskByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreTaskByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks/{id}][%d] GetRestoreTaskById default %s", o._statusCode, payload) -} - -func (o *GetRestoreTaskByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks/{id}][%d] GetRestoreTaskById default %s", o._statusCode, payload) -} - -func (o *GetRestoreTaskByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRestoreTaskByIDDefault) 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/restore_tasks/get_restore_tasks_parameters.go b/v1/client/restore_tasks/get_restore_tasks_parameters.go deleted file mode 100644 index 43c40c7d..00000000 --- a/v1/client/restore_tasks/get_restore_tasks_parameters.go +++ /dev/null @@ -1,472 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetRestoreTasksParams creates a new GetRestoreTasksParams 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 NewGetRestoreTasksParams() *GetRestoreTasksParams { - return &GetRestoreTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreTasksParamsWithTimeout creates a new GetRestoreTasksParams object -// with the ability to set a timeout on a request. -func NewGetRestoreTasksParamsWithTimeout(timeout time.Duration) *GetRestoreTasksParams { - return &GetRestoreTasksParams{ - timeout: timeout, - } -} - -// NewGetRestoreTasksParamsWithContext creates a new GetRestoreTasksParams object -// with the ability to set a context for a request. -func NewGetRestoreTasksParamsWithContext(ctx context.Context) *GetRestoreTasksParams { - return &GetRestoreTasksParams{ - Context: ctx, - } -} - -// NewGetRestoreTasksParamsWithHTTPClient creates a new GetRestoreTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreTasksParamsWithHTTPClient(client *http.Client) *GetRestoreTasksParams { - return &GetRestoreTasksParams{ - HTTPClient: client, - } -} - -/* -GetRestoreTasksParams contains all the parameters to send to the API endpoint - - for the get restore tasks operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreTasksParams struct { - - /* EndTimeUsecs. - - Filter by an end time specified as a Unix epoch Timestamp - (in microseconds). All Restore Tasks (both completed and running) - on the Cohesity Cluster that started after the specified start time - but before the specified end time are returned. - If not set, the end time is the current time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Environment. - - Specifies the environment like VMware, SQL, where the - Protection Source exists. - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Environment *string - - /* PageCount. - - Specifies the number of completed Restore Tasks to return in the response - for pagination purposes. Running Restore Tasks are always returned. - The newest completed Restore Tasks are returned. - - Format: int64 - */ - PageCount *int64 - - /* StartTimeUsecs. - - Filter by a start time specified as a Unix epoch Timestamp - (in microseconds). All Restore Tasks (both completed and running) - on the Cohesity Cluster that started after the specified start time - but before the specified end time are returned. - If not set, the start time is creation time of the Cohesity Cluster. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* StorageDomainIds. - - Filter by a list of Storage Domain IDs. This field applies only if - 'TaskTypes' includes 'kCloneView'. Only task writing data to these storage - domains will be returned. - */ - StorageDomainIds []int64 - - /* TaskIds. - - Filter by a list of Restore Task ids. - */ - TaskIds []int64 - - /* TaskTypes. - - Filter by the types of Restore Tasks such as 'kRecoverVMs', - 'kCloneVMs', 'kCloneView' or 'kMountVolumes'. - */ - TaskTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreTasksParams) WithDefaults() *GetRestoreTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore tasks params -func (o *GetRestoreTasksParams) WithTimeout(timeout time.Duration) *GetRestoreTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore tasks params -func (o *GetRestoreTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore tasks params -func (o *GetRestoreTasksParams) WithContext(ctx context.Context) *GetRestoreTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore tasks params -func (o *GetRestoreTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore tasks params -func (o *GetRestoreTasksParams) WithHTTPClient(client *http.Client) *GetRestoreTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore tasks params -func (o *GetRestoreTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get restore tasks params -func (o *GetRestoreTasksParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetRestoreTasksParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get restore tasks params -func (o *GetRestoreTasksParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvironment adds the environment to the get restore tasks params -func (o *GetRestoreTasksParams) WithEnvironment(environment *string) *GetRestoreTasksParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the get restore tasks params -func (o *GetRestoreTasksParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithPageCount adds the pageCount to the get restore tasks params -func (o *GetRestoreTasksParams) WithPageCount(pageCount *int64) *GetRestoreTasksParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get restore tasks params -func (o *GetRestoreTasksParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get restore tasks params -func (o *GetRestoreTasksParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetRestoreTasksParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get restore tasks params -func (o *GetRestoreTasksParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStorageDomainIds adds the storageDomainIds to the get restore tasks params -func (o *GetRestoreTasksParams) WithStorageDomainIds(storageDomainIds []int64) *GetRestoreTasksParams { - o.SetStorageDomainIds(storageDomainIds) - return o -} - -// SetStorageDomainIds adds the storageDomainIds to the get restore tasks params -func (o *GetRestoreTasksParams) SetStorageDomainIds(storageDomainIds []int64) { - o.StorageDomainIds = storageDomainIds -} - -// WithTaskIds adds the taskIds to the get restore tasks params -func (o *GetRestoreTasksParams) WithTaskIds(taskIds []int64) *GetRestoreTasksParams { - o.SetTaskIds(taskIds) - return o -} - -// SetTaskIds adds the taskIds to the get restore tasks params -func (o *GetRestoreTasksParams) SetTaskIds(taskIds []int64) { - o.TaskIds = taskIds -} - -// WithTaskTypes adds the taskTypes to the get restore tasks params -func (o *GetRestoreTasksParams) WithTaskTypes(taskTypes []string) *GetRestoreTasksParams { - o.SetTaskTypes(taskTypes) - return o -} - -// SetTaskTypes adds the taskTypes to the get restore tasks params -func (o *GetRestoreTasksParams) SetTaskTypes(taskTypes []string) { - o.TaskTypes = taskTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.StorageDomainIds != nil { - - // binding items for storageDomainIds - joinedStorageDomainIds := o.bindParamStorageDomainIds(reg) - - // query array param storageDomainIds - if err := r.SetQueryParam("storageDomainIds", joinedStorageDomainIds...); err != nil { - return err - } - } - - if o.TaskIds != nil { - - // binding items for taskIds - joinedTaskIds := o.bindParamTaskIds(reg) - - // query array param taskIds - if err := r.SetQueryParam("taskIds", joinedTaskIds...); err != nil { - return err - } - } - - if o.TaskTypes != nil { - - // binding items for taskTypes - joinedTaskTypes := o.bindParamTaskTypes(reg) - - // query array param taskTypes - if err := r.SetQueryParam("taskTypes", joinedTaskTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRestoreTasks binds the parameter storageDomainIds -func (o *GetRestoreTasksParams) bindParamStorageDomainIds(formats strfmt.Registry) []string { - storageDomainIdsIR := o.StorageDomainIds - - var storageDomainIdsIC []string - for _, storageDomainIdsIIR := range storageDomainIdsIR { // explode []int64 - - storageDomainIdsIIV := swag.FormatInt64(storageDomainIdsIIR) // int64 as string - storageDomainIdsIC = append(storageDomainIdsIC, storageDomainIdsIIV) - } - - // items.CollectionFormat: "" - storageDomainIdsIS := swag.JoinByFormat(storageDomainIdsIC, "") - - return storageDomainIdsIS -} - -// bindParamGetRestoreTasks binds the parameter taskIds -func (o *GetRestoreTasksParams) bindParamTaskIds(formats strfmt.Registry) []string { - taskIdsIR := o.TaskIds - - var taskIdsIC []string - for _, taskIdsIIR := range taskIdsIR { // explode []int64 - - taskIdsIIV := swag.FormatInt64(taskIdsIIR) // int64 as string - taskIdsIC = append(taskIdsIC, taskIdsIIV) - } - - // items.CollectionFormat: "" - taskIdsIS := swag.JoinByFormat(taskIdsIC, "") - - return taskIdsIS -} - -// bindParamGetRestoreTasks binds the parameter taskTypes -func (o *GetRestoreTasksParams) bindParamTaskTypes(formats strfmt.Registry) []string { - taskTypesIR := o.TaskTypes - - var taskTypesIC []string - for _, taskTypesIIR := range taskTypesIR { // explode []string - - taskTypesIIV := taskTypesIIR // string as string - taskTypesIC = append(taskTypesIC, taskTypesIIV) - } - - // items.CollectionFormat: "" - taskTypesIS := swag.JoinByFormat(taskTypesIC, "") - - return taskTypesIS -} diff --git a/v1/client/restore_tasks/get_restore_tasks_responses.go b/v1/client/restore_tasks/get_restore_tasks_responses.go deleted file mode 100644 index fe384b4f..00000000 --- a/v1/client/restore_tasks/get_restore_tasks_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreTasksReader is a Reader for the GetRestoreTasks structure. -type GetRestoreTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreTasksDefault(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 - } -} - -// NewGetRestoreTasksOK creates a GetRestoreTasksOK with default headers values -func NewGetRestoreTasksOK() *GetRestoreTasksOK { - return &GetRestoreTasksOK{} -} - -/* -GetRestoreTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreTasksOK struct { - Payload []*models.RestoreTask -} - -// IsSuccess returns true when this get restore tasks o k response has a 2xx status code -func (o *GetRestoreTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore tasks o k response has a 3xx status code -func (o *GetRestoreTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore tasks o k response has a 4xx status code -func (o *GetRestoreTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore tasks o k response has a 5xx status code -func (o *GetRestoreTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore tasks o k response a status code equal to that given -func (o *GetRestoreTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore tasks o k response -func (o *GetRestoreTasksOK) Code() int { - return 200 -} - -func (o *GetRestoreTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks][%d] getRestoreTasksOK %s", 200, payload) -} - -func (o *GetRestoreTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks][%d] getRestoreTasksOK %s", 200, payload) -} - -func (o *GetRestoreTasksOK) GetPayload() []*models.RestoreTask { - return o.Payload -} - -func (o *GetRestoreTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreTasksDefault creates a GetRestoreTasksDefault with default headers values -func NewGetRestoreTasksDefault(code int) *GetRestoreTasksDefault { - return &GetRestoreTasksDefault{ - _statusCode: code, - } -} - -/* -GetRestoreTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRestoreTasksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get restore tasks default response has a 2xx status code -func (o *GetRestoreTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore tasks default response has a 3xx status code -func (o *GetRestoreTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore tasks default response has a 4xx status code -func (o *GetRestoreTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore tasks default response has a 5xx status code -func (o *GetRestoreTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore tasks default response a status code equal to that given -func (o *GetRestoreTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore tasks default response -func (o *GetRestoreTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks][%d] GetRestoreTasks default %s", o._statusCode, payload) -} - -func (o *GetRestoreTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/tasks][%d] GetRestoreTasks default %s", o._statusCode, payload) -} - -func (o *GetRestoreTasksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRestoreTasksDefault) 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/restore_tasks/get_sharepoint_documents_parameters.go b/v1/client/restore_tasks/get_sharepoint_documents_parameters.go deleted file mode 100644 index 8d5faee3..00000000 --- a/v1/client/restore_tasks/get_sharepoint_documents_parameters.go +++ /dev/null @@ -1,369 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetSharepointDocumentsParams creates a new GetSharepointDocumentsParams 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 NewGetSharepointDocumentsParams() *GetSharepointDocumentsParams { - return &GetSharepointDocumentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSharepointDocumentsParamsWithTimeout creates a new GetSharepointDocumentsParams object -// with the ability to set a timeout on a request. -func NewGetSharepointDocumentsParamsWithTimeout(timeout time.Duration) *GetSharepointDocumentsParams { - return &GetSharepointDocumentsParams{ - timeout: timeout, - } -} - -// NewGetSharepointDocumentsParamsWithContext creates a new GetSharepointDocumentsParams object -// with the ability to set a context for a request. -func NewGetSharepointDocumentsParamsWithContext(ctx context.Context) *GetSharepointDocumentsParams { - return &GetSharepointDocumentsParams{ - Context: ctx, - } -} - -// NewGetSharepointDocumentsParamsWithHTTPClient creates a new GetSharepointDocumentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSharepointDocumentsParamsWithHTTPClient(client *http.Client) *GetSharepointDocumentsParams { - return &GetSharepointDocumentsParams{ - HTTPClient: client, - } -} - -/* -GetSharepointDocumentsParams contains all the parameters to send to the API endpoint - - for the get sharepoint documents operation. - - Typically these are written to a http.Request. -*/ -type GetSharepointDocumentsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* DocumentName. - - Specifies the document(file/folder) name. - */ - DocumentName *string - - /* DomainIds. - - Specifies the domain Ids in which Sharepoint Site's are registered. - */ - DomainIds []int64 - - /* ProtectionJobIds. - - Specifies the protection job Ids which have backed up sites - containing the documents. - */ - ProtectionJobIds []int64 - - /* SiteIds. - - Specifies the Office365 Sharepoint Site Id. - */ - SiteIds []int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get sharepoint documents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSharepointDocumentsParams) WithDefaults() *GetSharepointDocumentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get sharepoint documents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSharepointDocumentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithTimeout(timeout time.Duration) *GetSharepointDocumentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithContext(ctx context.Context) *GetSharepointDocumentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithHTTPClient(client *http.Client) *GetSharepointDocumentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetSharepointDocumentsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithDocumentName adds the documentName to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithDocumentName(documentName *string) *GetSharepointDocumentsParams { - o.SetDocumentName(documentName) - return o -} - -// SetDocumentName adds the documentName to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetDocumentName(documentName *string) { - o.DocumentName = documentName -} - -// WithDomainIds adds the domainIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithDomainIds(domainIds []int64) *GetSharepointDocumentsParams { - o.SetDomainIds(domainIds) - return o -} - -// SetDomainIds adds the domainIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetDomainIds(domainIds []int64) { - o.DomainIds = domainIds -} - -// WithProtectionJobIds adds the protectionJobIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithProtectionJobIds(protectionJobIds []int64) *GetSharepointDocumentsParams { - o.SetProtectionJobIds(protectionJobIds) - return o -} - -// SetProtectionJobIds adds the protectionJobIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetProtectionJobIds(protectionJobIds []int64) { - o.ProtectionJobIds = protectionJobIds -} - -// WithSiteIds adds the siteIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithSiteIds(siteIds []int64) *GetSharepointDocumentsParams { - o.SetSiteIds(siteIds) - return o -} - -// SetSiteIds adds the siteIds to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetSiteIds(siteIds []int64) { - o.SiteIds = siteIds -} - -// WithTenantID adds the tenantID to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) WithTenantID(tenantID *string) *GetSharepointDocumentsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get sharepoint documents params -func (o *GetSharepointDocumentsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSharepointDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.DocumentName != nil { - - // query param documentName - var qrDocumentName string - - if o.DocumentName != nil { - qrDocumentName = *o.DocumentName - } - qDocumentName := qrDocumentName - if qDocumentName != "" { - - if err := r.SetQueryParam("documentName", qDocumentName); err != nil { - return err - } - } - } - - if o.DomainIds != nil { - - // binding items for domainIds - joinedDomainIds := o.bindParamDomainIds(reg) - - // query array param domainIds - if err := r.SetQueryParam("domainIds", joinedDomainIds...); err != nil { - return err - } - } - - if o.ProtectionJobIds != nil { - - // binding items for protectionJobIds - joinedProtectionJobIds := o.bindParamProtectionJobIds(reg) - - // query array param protectionJobIds - if err := r.SetQueryParam("protectionJobIds", joinedProtectionJobIds...); err != nil { - return err - } - } - - if o.SiteIds != nil { - - // binding items for siteIds - joinedSiteIds := o.bindParamSiteIds(reg) - - // query array param siteIds - if err := r.SetQueryParam("siteIds", joinedSiteIds...); err != nil { - return err - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSharepointDocuments binds the parameter domainIds -func (o *GetSharepointDocumentsParams) bindParamDomainIds(formats strfmt.Registry) []string { - domainIdsIR := o.DomainIds - - var domainIdsIC []string - for _, domainIdsIIR := range domainIdsIR { // explode []int64 - - domainIdsIIV := swag.FormatInt64(domainIdsIIR) // int64 as string - domainIdsIC = append(domainIdsIC, domainIdsIIV) - } - - // items.CollectionFormat: "" - domainIdsIS := swag.JoinByFormat(domainIdsIC, "") - - return domainIdsIS -} - -// bindParamGetSharepointDocuments binds the parameter protectionJobIds -func (o *GetSharepointDocumentsParams) bindParamProtectionJobIds(formats strfmt.Registry) []string { - protectionJobIdsIR := o.ProtectionJobIds - - var protectionJobIdsIC []string - for _, protectionJobIdsIIR := range protectionJobIdsIR { // explode []int64 - - protectionJobIdsIIV := swag.FormatInt64(protectionJobIdsIIR) // int64 as string - protectionJobIdsIC = append(protectionJobIdsIC, protectionJobIdsIIV) - } - - // items.CollectionFormat: "" - protectionJobIdsIS := swag.JoinByFormat(protectionJobIdsIC, "") - - return protectionJobIdsIS -} - -// bindParamGetSharepointDocuments binds the parameter siteIds -func (o *GetSharepointDocumentsParams) bindParamSiteIds(formats strfmt.Registry) []string { - siteIdsIR := o.SiteIds - - var siteIdsIC []string - for _, siteIdsIIR := range siteIdsIR { // explode []int64 - - siteIdsIIV := swag.FormatInt64(siteIdsIIR) // int64 as string - siteIdsIC = append(siteIdsIC, siteIdsIIV) - } - - // items.CollectionFormat: "" - siteIdsIS := swag.JoinByFormat(siteIdsIC, "") - - return siteIdsIS -} diff --git a/v1/client/restore_tasks/get_sharepoint_documents_responses.go b/v1/client/restore_tasks/get_sharepoint_documents_responses.go deleted file mode 100644 index 268d55af..00000000 --- a/v1/client/restore_tasks/get_sharepoint_documents_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSharepointDocumentsReader is a Reader for the GetSharepointDocuments structure. -type GetSharepointDocumentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSharepointDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSharepointDocumentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSharepointDocumentsDefault(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 - } -} - -// NewGetSharepointDocumentsOK creates a GetSharepointDocumentsOK with default headers values -func NewGetSharepointDocumentsOK() *GetSharepointDocumentsOK { - return &GetSharepointDocumentsOK{} -} - -/* -GetSharepointDocumentsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSharepointDocumentsOK struct { - Payload *models.FileSearchResults -} - -// IsSuccess returns true when this get sharepoint documents o k response has a 2xx status code -func (o *GetSharepointDocumentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get sharepoint documents o k response has a 3xx status code -func (o *GetSharepointDocumentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get sharepoint documents o k response has a 4xx status code -func (o *GetSharepointDocumentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get sharepoint documents o k response has a 5xx status code -func (o *GetSharepointDocumentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get sharepoint documents o k response a status code equal to that given -func (o *GetSharepointDocumentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get sharepoint documents o k response -func (o *GetSharepointDocumentsOK) Code() int { - return 200 -} - -func (o *GetSharepointDocumentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/sharepoint/documents][%d] getSharepointDocumentsOK %s", 200, payload) -} - -func (o *GetSharepointDocumentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/sharepoint/documents][%d] getSharepointDocumentsOK %s", 200, payload) -} - -func (o *GetSharepointDocumentsOK) GetPayload() *models.FileSearchResults { - return o.Payload -} - -func (o *GetSharepointDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSharepointDocumentsDefault creates a GetSharepointDocumentsDefault with default headers values -func NewGetSharepointDocumentsDefault(code int) *GetSharepointDocumentsDefault { - return &GetSharepointDocumentsDefault{ - _statusCode: code, - } -} - -/* -GetSharepointDocumentsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSharepointDocumentsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get sharepoint documents default response has a 2xx status code -func (o *GetSharepointDocumentsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get sharepoint documents default response has a 3xx status code -func (o *GetSharepointDocumentsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get sharepoint documents default response has a 4xx status code -func (o *GetSharepointDocumentsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get sharepoint documents default response has a 5xx status code -func (o *GetSharepointDocumentsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get sharepoint documents default response a status code equal to that given -func (o *GetSharepointDocumentsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get sharepoint documents default response -func (o *GetSharepointDocumentsDefault) Code() int { - return o._statusCode -} - -func (o *GetSharepointDocumentsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/sharepoint/documents][%d] GetSharepointDocuments default %s", o._statusCode, payload) -} - -func (o *GetSharepointDocumentsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/office365/sharepoint/documents][%d] GetSharepointDocuments default %s", o._statusCode, payload) -} - -func (o *GetSharepointDocumentsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSharepointDocumentsDefault) 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/restore_tasks/get_virtual_disk_information_parameters.go b/v1/client/restore_tasks/get_virtual_disk_information_parameters.go deleted file mode 100644 index d74f52e3..00000000 --- a/v1/client/restore_tasks/get_virtual_disk_information_parameters.go +++ /dev/null @@ -1,447 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetVirtualDiskInformationParams creates a new GetVirtualDiskInformationParams 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 NewGetVirtualDiskInformationParams() *GetVirtualDiskInformationParams { - return &GetVirtualDiskInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVirtualDiskInformationParamsWithTimeout creates a new GetVirtualDiskInformationParams object -// with the ability to set a timeout on a request. -func NewGetVirtualDiskInformationParamsWithTimeout(timeout time.Duration) *GetVirtualDiskInformationParams { - return &GetVirtualDiskInformationParams{ - timeout: timeout, - } -} - -// NewGetVirtualDiskInformationParamsWithContext creates a new GetVirtualDiskInformationParams object -// with the ability to set a context for a request. -func NewGetVirtualDiskInformationParamsWithContext(ctx context.Context) *GetVirtualDiskInformationParams { - return &GetVirtualDiskInformationParams{ - Context: ctx, - } -} - -// NewGetVirtualDiskInformationParamsWithHTTPClient creates a new GetVirtualDiskInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVirtualDiskInformationParamsWithHTTPClient(client *http.Client) *GetVirtualDiskInformationParams { - return &GetVirtualDiskInformationParams{ - HTTPClient: client, - } -} - -/* -GetVirtualDiskInformationParams contains all the parameters to send to the API endpoint - - for the get virtual disk information operation. - - Typically these are written to a http.Request. -*/ -type GetVirtualDiskInformationParams struct { - - /* ClusterID. - - Specifies the Cohesity Cluster id where the Job was created. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation id of the Cohesity Cluster where the Job was - created. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* JobID. - - Specifies the id of the Job that captured the snapshot. - - Format: int64 - */ - JobID int64 - - /* JobRunID. - - Specifies the id of the Job Run that captured the snapshot. - - Format: int64 - */ - JobRunID int64 - - /* PointInTimeUsecs. - - PointInTimeUsecs is the time to get volume virtual disk info from - previously available full/incremental snapshot. - - Format: int64 - */ - PointInTimeUsecs *int64 - - /* SourceID. - - Specifies the Id of the Protection Source object. - - Format: int64 - */ - SourceID int64 - - /* StartTimeUsecs. - - Specifies the start time of the job run as a Unix epoch Timestamp in - microseconds. - - Format: int64 - */ - StartTimeUsecs int64 - - /* VaultID. - - Specifies the Id of the vault where snapshot was taken. - - Format: int64 - */ - VaultID *int64 - - /* VaultName. - - Specifies the name of the vault where snapshot was taken. - */ - VaultName *string - - /* VaultType. - - Specifes the type of the vault where snapshot was taken. - */ - VaultType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get virtual disk information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVirtualDiskInformationParams) WithDefaults() *GetVirtualDiskInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get virtual disk information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVirtualDiskInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithTimeout(timeout time.Duration) *GetVirtualDiskInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithContext(ctx context.Context) *GetVirtualDiskInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithHTTPClient(client *http.Client) *GetVirtualDiskInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithClusterID(clusterID int64) *GetVirtualDiskInformationParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetVirtualDiskInformationParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithJobID adds the jobID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithJobID(jobID int64) *GetVirtualDiskInformationParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobRunID adds the jobRunID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithJobRunID(jobRunID int64) *GetVirtualDiskInformationParams { - o.SetJobRunID(jobRunID) - return o -} - -// SetJobRunID adds the jobRunId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetJobRunID(jobRunID int64) { - o.JobRunID = jobRunID -} - -// WithPointInTimeUsecs adds the pointInTimeUsecs to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithPointInTimeUsecs(pointInTimeUsecs *int64) *GetVirtualDiskInformationParams { - o.SetPointInTimeUsecs(pointInTimeUsecs) - return o -} - -// SetPointInTimeUsecs adds the pointInTimeUsecs to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetPointInTimeUsecs(pointInTimeUsecs *int64) { - o.PointInTimeUsecs = pointInTimeUsecs -} - -// WithSourceID adds the sourceID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithSourceID(sourceID int64) *GetVirtualDiskInformationParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithStartTimeUsecs(startTimeUsecs int64) *GetVirtualDiskInformationParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithVaultID adds the vaultID to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithVaultID(vaultID *int64) *GetVirtualDiskInformationParams { - o.SetVaultID(vaultID) - return o -} - -// SetVaultID adds the vaultId to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetVaultID(vaultID *int64) { - o.VaultID = vaultID -} - -// WithVaultName adds the vaultName to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithVaultName(vaultName *string) *GetVirtualDiskInformationParams { - o.SetVaultName(vaultName) - return o -} - -// SetVaultName adds the vaultName to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetVaultName(vaultName *string) { - o.VaultName = vaultName -} - -// WithVaultType adds the vaultType to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) WithVaultType(vaultType *string) *GetVirtualDiskInformationParams { - o.SetVaultType(vaultType) - return o -} - -// SetVaultType adds the vaultType to the get virtual disk information params -func (o *GetVirtualDiskInformationParams) SetVaultType(vaultType *string) { - o.VaultType = vaultType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVirtualDiskInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobRunId - qrJobRunID := o.JobRunID - qJobRunID := swag.FormatInt64(qrJobRunID) - if qJobRunID != "" { - - if err := r.SetQueryParam("jobRunId", qJobRunID); err != nil { - return err - } - } - - if o.PointInTimeUsecs != nil { - - // query param pointInTimeUsecs - var qrPointInTimeUsecs int64 - - if o.PointInTimeUsecs != nil { - qrPointInTimeUsecs = *o.PointInTimeUsecs - } - qPointInTimeUsecs := swag.FormatInt64(qrPointInTimeUsecs) - if qPointInTimeUsecs != "" { - - if err := r.SetQueryParam("pointInTimeUsecs", qPointInTimeUsecs); err != nil { - return err - } - } - } - - // query param sourceId - qrSourceID := o.SourceID - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - if o.VaultID != nil { - - // query param vaultId - var qrVaultID int64 - - if o.VaultID != nil { - qrVaultID = *o.VaultID - } - qVaultID := swag.FormatInt64(qrVaultID) - if qVaultID != "" { - - if err := r.SetQueryParam("vaultId", qVaultID); err != nil { - return err - } - } - } - - if o.VaultName != nil { - - // query param vaultName - var qrVaultName string - - if o.VaultName != nil { - qrVaultName = *o.VaultName - } - qVaultName := qrVaultName - if qVaultName != "" { - - if err := r.SetQueryParam("vaultName", qVaultName); err != nil { - return err - } - } - } - - if o.VaultType != nil { - - // query param vaultType - var qrVaultType string - - if o.VaultType != nil { - qrVaultType = *o.VaultType - } - qVaultType := qrVaultType - if qVaultType != "" { - - if err := r.SetQueryParam("vaultType", qVaultType); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_virtual_disk_information_responses.go b/v1/client/restore_tasks/get_virtual_disk_information_responses.go deleted file mode 100644 index 909475d8..00000000 --- a/v1/client/restore_tasks/get_virtual_disk_information_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVirtualDiskInformationReader is a Reader for the GetVirtualDiskInformation structure. -type GetVirtualDiskInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVirtualDiskInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVirtualDiskInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVirtualDiskInformationDefault(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 - } -} - -// NewGetVirtualDiskInformationOK creates a GetVirtualDiskInformationOK with default headers values -func NewGetVirtualDiskInformationOK() *GetVirtualDiskInformationOK { - return &GetVirtualDiskInformationOK{} -} - -/* -GetVirtualDiskInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVirtualDiskInformationOK struct { - Payload []*models.VirtualDiskInformation -} - -// IsSuccess returns true when this get virtual disk information o k response has a 2xx status code -func (o *GetVirtualDiskInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get virtual disk information o k response has a 3xx status code -func (o *GetVirtualDiskInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get virtual disk information o k response has a 4xx status code -func (o *GetVirtualDiskInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get virtual disk information o k response has a 5xx status code -func (o *GetVirtualDiskInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get virtual disk information o k response a status code equal to that given -func (o *GetVirtualDiskInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get virtual disk information o k response -func (o *GetVirtualDiskInformationOK) Code() int { - return 200 -} - -func (o *GetVirtualDiskInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/virtualDiskInformation][%d] getVirtualDiskInformationOK %s", 200, payload) -} - -func (o *GetVirtualDiskInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/virtualDiskInformation][%d] getVirtualDiskInformationOK %s", 200, payload) -} - -func (o *GetVirtualDiskInformationOK) GetPayload() []*models.VirtualDiskInformation { - return o.Payload -} - -func (o *GetVirtualDiskInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVirtualDiskInformationDefault creates a GetVirtualDiskInformationDefault with default headers values -func NewGetVirtualDiskInformationDefault(code int) *GetVirtualDiskInformationDefault { - return &GetVirtualDiskInformationDefault{ - _statusCode: code, - } -} - -/* -GetVirtualDiskInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVirtualDiskInformationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get virtual disk information default response has a 2xx status code -func (o *GetVirtualDiskInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get virtual disk information default response has a 3xx status code -func (o *GetVirtualDiskInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get virtual disk information default response has a 4xx status code -func (o *GetVirtualDiskInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get virtual disk information default response has a 5xx status code -func (o *GetVirtualDiskInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get virtual disk information default response a status code equal to that given -func (o *GetVirtualDiskInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get virtual disk information default response -func (o *GetVirtualDiskInformationDefault) Code() int { - return o._statusCode -} - -func (o *GetVirtualDiskInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/virtualDiskInformation][%d] GetVirtualDiskInformation default %s", o._statusCode, payload) -} - -func (o *GetVirtualDiskInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/virtualDiskInformation][%d] GetVirtualDiskInformation default %s", o._statusCode, payload) -} - -func (o *GetVirtualDiskInformationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVirtualDiskInformationDefault) 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/restore_tasks/get_vm_directory_list_parameters.go b/v1/client/restore_tasks/get_vm_directory_list_parameters.go deleted file mode 100644 index 632c98dd..00000000 --- a/v1/client/restore_tasks/get_vm_directory_list_parameters.go +++ /dev/null @@ -1,632 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetVMDirectoryListParams creates a new GetVMDirectoryListParams 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 NewGetVMDirectoryListParams() *GetVMDirectoryListParams { - return &GetVMDirectoryListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVMDirectoryListParamsWithTimeout creates a new GetVMDirectoryListParams object -// with the ability to set a timeout on a request. -func NewGetVMDirectoryListParamsWithTimeout(timeout time.Duration) *GetVMDirectoryListParams { - return &GetVMDirectoryListParams{ - timeout: timeout, - } -} - -// NewGetVMDirectoryListParamsWithContext creates a new GetVMDirectoryListParams object -// with the ability to set a context for a request. -func NewGetVMDirectoryListParamsWithContext(ctx context.Context) *GetVMDirectoryListParams { - return &GetVMDirectoryListParams{ - Context: ctx, - } -} - -// NewGetVMDirectoryListParamsWithHTTPClient creates a new GetVMDirectoryListParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVMDirectoryListParamsWithHTTPClient(client *http.Client) *GetVMDirectoryListParams { - return &GetVMDirectoryListParams{ - HTTPClient: client, - } -} - -/* -GetVMDirectoryListParams contains all the parameters to send to the API endpoint - - for the get Vm directory list operation. - - Typically these are written to a http.Request. -*/ -type GetVMDirectoryListParams struct { - - /* AttemptNum. - - AttemptNum is the attempt number of the run that successfully created the - snapshot. - - Format: int64 - */ - AttemptNum *int64 - - /* BrowseIndexedData. - - Specifies whether to use indexed data in Librarian for browse. - */ - BrowseIndexedData *bool - - /* Cookie. - - Cookie is used for paginating results. If ReadDirResult returned partial - results, it will also return a cookie that can be used to resume the - listing. The value returned in ReadDirResult should be passed in the next - call. The first call should not have this value set. Note that this value - is only a suggestion and server is free to do a short read (return fewer - entries along with a cookie). - */ - Cookie *string - - /* DirPath. - - DirPath is the full path of the directory whose contents need to be listed. - */ - DirPath string - - /* EntityID. - - EntityId is the Id of the VM. - - Format: int64 - */ - EntityID int64 - - /* JobID. - - JobId is the id of the local job that took the snapshot, which may or - may not match the JobUidObjectId below depending on whether the object - originally belonged to this local job or to a different remote job. - - Format: int64 - */ - JobID int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the job run that backed up the entity. - - Format: int64 - */ - JobInstanceID int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time in usecs of the job run that backed up - the entity. - - Format: int64 - */ - JobStartTimeUsecs int64 - - /* JobUIDObjectID. - - JobUidObjectId is the globally unique id of the job that the object - originally belonged to. If this object originally belonged to a job from a - remote cluster, this field will contain the JobId of the remote job, else - it will contain the JobId of the local job. - - Format: int64 - */ - JobUIDObjectID int64 - - /* MaxEntries. - - MaxEntries is the maximum number of entries to return in this call. If - there are more entries, server will return a cookie in the response that - can be used to continue enumeration from the last call. - - Format: int32 - */ - MaxEntries *int32 - - /* StatFileEntries. - - StatFileEntries specifies whether file stat data is returned. - */ - StatFileEntries *bool - - /* ViewBoxID. - - Id of the View Box if a View is being browsed. - - Format: int64 - */ - ViewBoxID *int64 - - /* ViewName. - - Name of the View if a View is being browsed. - */ - ViewName *string - - /* VolumeInfoCookie. - - VolumeInfoCookie is the cookie to be passed in calls to reading a VM dir - for this volume. - - Format: uint64 - */ - VolumeInfoCookie *uint64 - - /* VolumeName. - - VolumeName is the name of the volume that needs to be browsed. This should - match the name returned in VolumeInfo. - */ - VolumeName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get Vm directory list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMDirectoryListParams) WithDefaults() *GetVMDirectoryListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get Vm directory list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMDirectoryListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithTimeout(timeout time.Duration) *GetVMDirectoryListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithContext(ctx context.Context) *GetVMDirectoryListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithHTTPClient(client *http.Client) *GetVMDirectoryListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttemptNum adds the attemptNum to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithAttemptNum(attemptNum *int64) *GetVMDirectoryListParams { - o.SetAttemptNum(attemptNum) - return o -} - -// SetAttemptNum adds the attemptNum to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetAttemptNum(attemptNum *int64) { - o.AttemptNum = attemptNum -} - -// WithBrowseIndexedData adds the browseIndexedData to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithBrowseIndexedData(browseIndexedData *bool) *GetVMDirectoryListParams { - o.SetBrowseIndexedData(browseIndexedData) - return o -} - -// SetBrowseIndexedData adds the browseIndexedData to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetBrowseIndexedData(browseIndexedData *bool) { - o.BrowseIndexedData = browseIndexedData -} - -// WithCookie adds the cookie to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithCookie(cookie *string) *GetVMDirectoryListParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithDirPath adds the dirPath to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithDirPath(dirPath string) *GetVMDirectoryListParams { - o.SetDirPath(dirPath) - return o -} - -// SetDirPath adds the dirPath to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetDirPath(dirPath string) { - o.DirPath = dirPath -} - -// WithEntityID adds the entityID to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithEntityID(entityID int64) *GetVMDirectoryListParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetEntityID(entityID int64) { - o.EntityID = entityID -} - -// WithJobID adds the jobID to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithJobID(jobID int64) *GetVMDirectoryListParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithJobInstanceID(jobInstanceID int64) *GetVMDirectoryListParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetJobInstanceID(jobInstanceID int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithJobStartTimeUsecs(jobStartTimeUsecs int64) *GetVMDirectoryListParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetJobStartTimeUsecs(jobStartTimeUsecs int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WithJobUIDObjectID adds the jobUIDObjectID to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithJobUIDObjectID(jobUIDObjectID int64) *GetVMDirectoryListParams { - o.SetJobUIDObjectID(jobUIDObjectID) - return o -} - -// SetJobUIDObjectID adds the jobUidObjectId to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetJobUIDObjectID(jobUIDObjectID int64) { - o.JobUIDObjectID = jobUIDObjectID -} - -// WithMaxEntries adds the maxEntries to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithMaxEntries(maxEntries *int32) *GetVMDirectoryListParams { - o.SetMaxEntries(maxEntries) - return o -} - -// SetMaxEntries adds the maxEntries to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetMaxEntries(maxEntries *int32) { - o.MaxEntries = maxEntries -} - -// WithStatFileEntries adds the statFileEntries to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithStatFileEntries(statFileEntries *bool) *GetVMDirectoryListParams { - o.SetStatFileEntries(statFileEntries) - return o -} - -// SetStatFileEntries adds the statFileEntries to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetStatFileEntries(statFileEntries *bool) { - o.StatFileEntries = statFileEntries -} - -// WithViewBoxID adds the viewBoxID to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithViewBoxID(viewBoxID *int64) *GetVMDirectoryListParams { - o.SetViewBoxID(viewBoxID) - return o -} - -// SetViewBoxID adds the viewBoxId to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetViewBoxID(viewBoxID *int64) { - o.ViewBoxID = viewBoxID -} - -// WithViewName adds the viewName to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithViewName(viewName *string) *GetVMDirectoryListParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WithVolumeInfoCookie adds the volumeInfoCookie to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithVolumeInfoCookie(volumeInfoCookie *uint64) *GetVMDirectoryListParams { - o.SetVolumeInfoCookie(volumeInfoCookie) - return o -} - -// SetVolumeInfoCookie adds the volumeInfoCookie to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetVolumeInfoCookie(volumeInfoCookie *uint64) { - o.VolumeInfoCookie = volumeInfoCookie -} - -// WithVolumeName adds the volumeName to the get Vm directory list params -func (o *GetVMDirectoryListParams) WithVolumeName(volumeName *string) *GetVMDirectoryListParams { - o.SetVolumeName(volumeName) - return o -} - -// SetVolumeName adds the volumeName to the get Vm directory list params -func (o *GetVMDirectoryListParams) SetVolumeName(volumeName *string) { - o.VolumeName = volumeName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVMDirectoryListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AttemptNum != nil { - - // query param attemptNum - var qrAttemptNum int64 - - if o.AttemptNum != nil { - qrAttemptNum = *o.AttemptNum - } - qAttemptNum := swag.FormatInt64(qrAttemptNum) - if qAttemptNum != "" { - - if err := r.SetQueryParam("attemptNum", qAttemptNum); err != nil { - return err - } - } - } - - if o.BrowseIndexedData != nil { - - // query param browseIndexedData - var qrBrowseIndexedData bool - - if o.BrowseIndexedData != nil { - qrBrowseIndexedData = *o.BrowseIndexedData - } - qBrowseIndexedData := swag.FormatBool(qrBrowseIndexedData) - if qBrowseIndexedData != "" { - - if err := r.SetQueryParam("browseIndexedData", qBrowseIndexedData); err != nil { - return err - } - } - } - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - // query param dirPath - qrDirPath := o.DirPath - qDirPath := qrDirPath - if qDirPath != "" { - - if err := r.SetQueryParam("dirPath", qDirPath); err != nil { - return err - } - } - - // query param entityId - qrEntityID := o.EntityID - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobInstanceId - qrJobInstanceID := o.JobInstanceID - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - - // query param jobStartTimeUsecs - qrJobStartTimeUsecs := o.JobStartTimeUsecs - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - - // query param jobUidObjectId - qrJobUIDObjectID := o.JobUIDObjectID - qJobUIDObjectID := swag.FormatInt64(qrJobUIDObjectID) - if qJobUIDObjectID != "" { - - if err := r.SetQueryParam("jobUidObjectId", qJobUIDObjectID); err != nil { - return err - } - } - - if o.MaxEntries != nil { - - // query param maxEntries - var qrMaxEntries int32 - - if o.MaxEntries != nil { - qrMaxEntries = *o.MaxEntries - } - qMaxEntries := swag.FormatInt32(qrMaxEntries) - if qMaxEntries != "" { - - if err := r.SetQueryParam("maxEntries", qMaxEntries); err != nil { - return err - } - } - } - - if o.StatFileEntries != nil { - - // query param statFileEntries - var qrStatFileEntries bool - - if o.StatFileEntries != nil { - qrStatFileEntries = *o.StatFileEntries - } - qStatFileEntries := swag.FormatBool(qrStatFileEntries) - if qStatFileEntries != "" { - - if err := r.SetQueryParam("statFileEntries", qStatFileEntries); err != nil { - return err - } - } - } - - if o.ViewBoxID != nil { - - // query param viewBoxId - var qrViewBoxID int64 - - if o.ViewBoxID != nil { - qrViewBoxID = *o.ViewBoxID - } - qViewBoxID := swag.FormatInt64(qrViewBoxID) - if qViewBoxID != "" { - - if err := r.SetQueryParam("viewBoxId", qViewBoxID); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if o.VolumeInfoCookie != nil { - - // query param volumeInfoCookie - var qrVolumeInfoCookie uint64 - - if o.VolumeInfoCookie != nil { - qrVolumeInfoCookie = *o.VolumeInfoCookie - } - qVolumeInfoCookie := swag.FormatUint64(qrVolumeInfoCookie) - if qVolumeInfoCookie != "" { - - if err := r.SetQueryParam("volumeInfoCookie", qVolumeInfoCookie); err != nil { - return err - } - } - } - - if o.VolumeName != nil { - - // query param volumeName - var qrVolumeName string - - if o.VolumeName != nil { - qrVolumeName = *o.VolumeName - } - qVolumeName := qrVolumeName - if qVolumeName != "" { - - if err := r.SetQueryParam("volumeName", qVolumeName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_vm_directory_list_responses.go b/v1/client/restore_tasks/get_vm_directory_list_responses.go deleted file mode 100644 index 365de643..00000000 --- a/v1/client/restore_tasks/get_vm_directory_list_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVMDirectoryListReader is a Reader for the GetVMDirectoryList structure. -type GetVMDirectoryListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVMDirectoryListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVMDirectoryListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVMDirectoryListDefault(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 - } -} - -// NewGetVMDirectoryListOK creates a GetVMDirectoryListOK with default headers values -func NewGetVMDirectoryListOK() *GetVMDirectoryListOK { - return &GetVMDirectoryListOK{} -} - -/* -GetVMDirectoryListOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVMDirectoryListOK struct { - Payload *models.VMDirectoryListResult -} - -// IsSuccess returns true when this get Vm directory list o k response has a 2xx status code -func (o *GetVMDirectoryListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get Vm directory list o k response has a 3xx status code -func (o *GetVMDirectoryListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Vm directory list o k response has a 4xx status code -func (o *GetVMDirectoryListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get Vm directory list o k response has a 5xx status code -func (o *GetVMDirectoryListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get Vm directory list o k response a status code equal to that given -func (o *GetVMDirectoryListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get Vm directory list o k response -func (o *GetVMDirectoryListOK) Code() int { - return 200 -} - -func (o *GetVMDirectoryListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/directoryList][%d] getVmDirectoryListOK %s", 200, payload) -} - -func (o *GetVMDirectoryListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/directoryList][%d] getVmDirectoryListOK %s", 200, payload) -} - -func (o *GetVMDirectoryListOK) GetPayload() *models.VMDirectoryListResult { - return o.Payload -} - -func (o *GetVMDirectoryListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VMDirectoryListResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVMDirectoryListDefault creates a GetVMDirectoryListDefault with default headers values -func NewGetVMDirectoryListDefault(code int) *GetVMDirectoryListDefault { - return &GetVMDirectoryListDefault{ - _statusCode: code, - } -} - -/* -GetVMDirectoryListDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVMDirectoryListDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get Vm directory list default response has a 2xx status code -func (o *GetVMDirectoryListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get Vm directory list default response has a 3xx status code -func (o *GetVMDirectoryListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get Vm directory list default response has a 4xx status code -func (o *GetVMDirectoryListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get Vm directory list default response has a 5xx status code -func (o *GetVMDirectoryListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get Vm directory list default response a status code equal to that given -func (o *GetVMDirectoryListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get Vm directory list default response -func (o *GetVMDirectoryListDefault) Code() int { - return o._statusCode -} - -func (o *GetVMDirectoryListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/directoryList][%d] GetVmDirectoryList default %s", o._statusCode, payload) -} - -func (o *GetVMDirectoryListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/directoryList][%d] GetVmDirectoryList default %s", o._statusCode, payload) -} - -func (o *GetVMDirectoryListDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVMDirectoryListDefault) 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/restore_tasks/get_vm_volumes_information_parameters.go b/v1/client/restore_tasks/get_vm_volumes_information_parameters.go deleted file mode 100644 index d17fb875..00000000 --- a/v1/client/restore_tasks/get_vm_volumes_information_parameters.go +++ /dev/null @@ -1,461 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewGetVMVolumesInformationParams creates a new GetVMVolumesInformationParams 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 NewGetVMVolumesInformationParams() *GetVMVolumesInformationParams { - return &GetVMVolumesInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVMVolumesInformationParamsWithTimeout creates a new GetVMVolumesInformationParams object -// with the ability to set a timeout on a request. -func NewGetVMVolumesInformationParamsWithTimeout(timeout time.Duration) *GetVMVolumesInformationParams { - return &GetVMVolumesInformationParams{ - timeout: timeout, - } -} - -// NewGetVMVolumesInformationParamsWithContext creates a new GetVMVolumesInformationParams object -// with the ability to set a context for a request. -func NewGetVMVolumesInformationParamsWithContext(ctx context.Context) *GetVMVolumesInformationParams { - return &GetVMVolumesInformationParams{ - Context: ctx, - } -} - -// NewGetVMVolumesInformationParamsWithHTTPClient creates a new GetVMVolumesInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVMVolumesInformationParamsWithHTTPClient(client *http.Client) *GetVMVolumesInformationParams { - return &GetVMVolumesInformationParams{ - HTTPClient: client, - } -} - -/* -GetVMVolumesInformationParams contains all the parameters to send to the API endpoint - - for the get Vm volumes information operation. - - Typically these are written to a http.Request. -*/ -type GetVMVolumesInformationParams struct { - - /* AttemptNumber. - - Specifies the number of the attempts made by the Job Run - to capture a snapshot of the object. For example, if an snapshot - is successfully captured after three attempts, this field equals 3. - - Format: int64 - */ - AttemptNumber *int64 - - /* ClusterID. - - Specifies the Cohesity Cluster id where the Job was created. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation id of the Cohesity Cluster where the Job - was created. - An incarnation id is generated when a Cohesity Cluster is initially - created. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* ComputeVolumeInfo. - - Specifies whether to compute volume information if it is not found. - If `ComputeVolumeInfo` is false and volume information is not found it - skips computation of volume information and returns KNotFound. - */ - ComputeVolumeInfo *bool - - /* JobID. - - Specifies the Job id for the Protection Job that is currently - associated with the object. - If the object was backed up on current Cohesity Cluster, this field - contains the id for the Job that captured this backup object. - If the object was backed up on a Primary Cluster and - replicated to this Cohesity Cluster, a new Inactive Job is created, - the object is now associated with new Inactive Job, and this field - contains the id of the new Inactive Job. - - Format: int64 - */ - JobID int64 - - /* JobRunID. - - Specifies the id of the Job Run that captured the snapshot. - - Format: int64 - */ - JobRunID int64 - - /* OriginalJobID. - - Specifies the id for the Protection Job that originally captured - the snapshots of the original object. If the object was backed up - on a Primary Cluster replicated to this Cohesity Cluster, - and a new Inactive Job is created, - this field still contains the id of the original Job and NOT the - id of the new Inactive Job. - This field is used in combination with the clusterId and - clusterIncarnationId to uniquely identify a Job. - - Format: int64 - */ - OriginalJobID int64 - - /* SourceID. - - Specifies the id of the VM object to search for volumes. - - Format: int64 - */ - SourceID int64 - - /* StartedTimeUsecs. - - Specifies the time when the Job Run starts capturing a snapshot. - Specified as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartedTimeUsecs int64 - - /* SupportedVolumesOnly. - - Specifies to return only supported volumes information. Unsupported - volumes are not returned if this flag is set to true. - Default is false. - */ - SupportedVolumesOnly *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get Vm volumes information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMVolumesInformationParams) WithDefaults() *GetVMVolumesInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get Vm volumes information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMVolumesInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithTimeout(timeout time.Duration) *GetVMVolumesInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithContext(ctx context.Context) *GetVMVolumesInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithHTTPClient(client *http.Client) *GetVMVolumesInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttemptNumber adds the attemptNumber to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithAttemptNumber(attemptNumber *int64) *GetVMVolumesInformationParams { - o.SetAttemptNumber(attemptNumber) - return o -} - -// SetAttemptNumber adds the attemptNumber to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetAttemptNumber(attemptNumber *int64) { - o.AttemptNumber = attemptNumber -} - -// WithClusterID adds the clusterID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithClusterID(clusterID int64) *GetVMVolumesInformationParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetVMVolumesInformationParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithComputeVolumeInfo adds the computeVolumeInfo to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithComputeVolumeInfo(computeVolumeInfo *bool) *GetVMVolumesInformationParams { - o.SetComputeVolumeInfo(computeVolumeInfo) - return o -} - -// SetComputeVolumeInfo adds the computeVolumeInfo to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetComputeVolumeInfo(computeVolumeInfo *bool) { - o.ComputeVolumeInfo = computeVolumeInfo -} - -// WithJobID adds the jobID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithJobID(jobID int64) *GetVMVolumesInformationParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WithJobRunID adds the jobRunID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithJobRunID(jobRunID int64) *GetVMVolumesInformationParams { - o.SetJobRunID(jobRunID) - return o -} - -// SetJobRunID adds the jobRunId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetJobRunID(jobRunID int64) { - o.JobRunID = jobRunID -} - -// WithOriginalJobID adds the originalJobID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithOriginalJobID(originalJobID int64) *GetVMVolumesInformationParams { - o.SetOriginalJobID(originalJobID) - return o -} - -// SetOriginalJobID adds the originalJobId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetOriginalJobID(originalJobID int64) { - o.OriginalJobID = originalJobID -} - -// WithSourceID adds the sourceID to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithSourceID(sourceID int64) *GetVMVolumesInformationParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WithStartedTimeUsecs adds the startedTimeUsecs to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithStartedTimeUsecs(startedTimeUsecs int64) *GetVMVolumesInformationParams { - o.SetStartedTimeUsecs(startedTimeUsecs) - return o -} - -// SetStartedTimeUsecs adds the startedTimeUsecs to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetStartedTimeUsecs(startedTimeUsecs int64) { - o.StartedTimeUsecs = startedTimeUsecs -} - -// WithSupportedVolumesOnly adds the supportedVolumesOnly to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) WithSupportedVolumesOnly(supportedVolumesOnly *bool) *GetVMVolumesInformationParams { - o.SetSupportedVolumesOnly(supportedVolumesOnly) - return o -} - -// SetSupportedVolumesOnly adds the supportedVolumesOnly to the get Vm volumes information params -func (o *GetVMVolumesInformationParams) SetSupportedVolumesOnly(supportedVolumesOnly *bool) { - o.SupportedVolumesOnly = supportedVolumesOnly -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVMVolumesInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AttemptNumber != nil { - - // query param attemptNumber - var qrAttemptNumber int64 - - if o.AttemptNumber != nil { - qrAttemptNumber = *o.AttemptNumber - } - qAttemptNumber := swag.FormatInt64(qrAttemptNumber) - if qAttemptNumber != "" { - - if err := r.SetQueryParam("attemptNumber", qAttemptNumber); err != nil { - return err - } - } - } - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - if o.ComputeVolumeInfo != nil { - - // query param computeVolumeInfo - var qrComputeVolumeInfo bool - - if o.ComputeVolumeInfo != nil { - qrComputeVolumeInfo = *o.ComputeVolumeInfo - } - qComputeVolumeInfo := swag.FormatBool(qrComputeVolumeInfo) - if qComputeVolumeInfo != "" { - - if err := r.SetQueryParam("computeVolumeInfo", qComputeVolumeInfo); err != nil { - return err - } - } - } - - // query param jobId - qrJobID := o.JobID - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - - // query param jobRunId - qrJobRunID := o.JobRunID - qJobRunID := swag.FormatInt64(qrJobRunID) - if qJobRunID != "" { - - if err := r.SetQueryParam("jobRunId", qJobRunID); err != nil { - return err - } - } - - // query param originalJobId - qrOriginalJobID := o.OriginalJobID - qOriginalJobID := swag.FormatInt64(qrOriginalJobID) - if qOriginalJobID != "" { - - if err := r.SetQueryParam("originalJobId", qOriginalJobID); err != nil { - return err - } - } - - // query param sourceId - qrSourceID := o.SourceID - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - - // query param startedTimeUsecs - qrStartedTimeUsecs := o.StartedTimeUsecs - qStartedTimeUsecs := swag.FormatInt64(qrStartedTimeUsecs) - if qStartedTimeUsecs != "" { - - if err := r.SetQueryParam("startedTimeUsecs", qStartedTimeUsecs); err != nil { - return err - } - } - - if o.SupportedVolumesOnly != nil { - - // query param supportedVolumesOnly - var qrSupportedVolumesOnly bool - - if o.SupportedVolumesOnly != nil { - qrSupportedVolumesOnly = *o.SupportedVolumesOnly - } - qSupportedVolumesOnly := swag.FormatBool(qrSupportedVolumesOnly) - if qSupportedVolumesOnly != "" { - - if err := r.SetQueryParam("supportedVolumesOnly", qSupportedVolumesOnly); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/get_vm_volumes_information_responses.go b/v1/client/restore_tasks/get_vm_volumes_information_responses.go deleted file mode 100644 index 548c397e..00000000 --- a/v1/client/restore_tasks/get_vm_volumes_information_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVMVolumesInformationReader is a Reader for the GetVMVolumesInformation structure. -type GetVMVolumesInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVMVolumesInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVMVolumesInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVMVolumesInformationDefault(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 - } -} - -// NewGetVMVolumesInformationOK creates a GetVMVolumesInformationOK with default headers values -func NewGetVMVolumesInformationOK() *GetVMVolumesInformationOK { - return &GetVMVolumesInformationOK{} -} - -/* -GetVMVolumesInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVMVolumesInformationOK struct { - Payload *models.VMVolumesInformation -} - -// IsSuccess returns true when this get Vm volumes information o k response has a 2xx status code -func (o *GetVMVolumesInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get Vm volumes information o k response has a 3xx status code -func (o *GetVMVolumesInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Vm volumes information o k response has a 4xx status code -func (o *GetVMVolumesInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get Vm volumes information o k response has a 5xx status code -func (o *GetVMVolumesInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get Vm volumes information o k response a status code equal to that given -func (o *GetVMVolumesInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get Vm volumes information o k response -func (o *GetVMVolumesInformationOK) Code() int { - return 200 -} - -func (o *GetVMVolumesInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/volumesInformation][%d] getVmVolumesInformationOK %s", 200, payload) -} - -func (o *GetVMVolumesInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/volumesInformation][%d] getVmVolumesInformationOK %s", 200, payload) -} - -func (o *GetVMVolumesInformationOK) GetPayload() *models.VMVolumesInformation { - return o.Payload -} - -func (o *GetVMVolumesInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VMVolumesInformation) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVMVolumesInformationDefault creates a GetVMVolumesInformationDefault with default headers values -func NewGetVMVolumesInformationDefault(code int) *GetVMVolumesInformationDefault { - return &GetVMVolumesInformationDefault{ - _statusCode: code, - } -} - -/* -GetVMVolumesInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVMVolumesInformationDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get Vm volumes information default response has a 2xx status code -func (o *GetVMVolumesInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get Vm volumes information default response has a 3xx status code -func (o *GetVMVolumesInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get Vm volumes information default response has a 4xx status code -func (o *GetVMVolumesInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get Vm volumes information default response has a 5xx status code -func (o *GetVMVolumesInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get Vm volumes information default response a status code equal to that given -func (o *GetVMVolumesInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get Vm volumes information default response -func (o *GetVMVolumesInformationDefault) Code() int { - return o._statusCode -} - -func (o *GetVMVolumesInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/volumesInformation][%d] GetVmVolumesInformation default %s", o._statusCode, payload) -} - -func (o *GetVMVolumesInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/vms/volumesInformation][%d] GetVmVolumesInformation default %s", o._statusCode, payload) -} - -func (o *GetVMVolumesInformationDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVMVolumesInformationDefault) 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/restore_tasks/list_org_vdc_networks_parameters.go b/v1/client/restore_tasks/list_org_vdc_networks_parameters.go deleted file mode 100644 index 465ddcb7..00000000 --- a/v1/client/restore_tasks/list_org_vdc_networks_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewListOrgVdcNetworksParams creates a new ListOrgVdcNetworksParams 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 NewListOrgVdcNetworksParams() *ListOrgVdcNetworksParams { - return &ListOrgVdcNetworksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListOrgVdcNetworksParamsWithTimeout creates a new ListOrgVdcNetworksParams object -// with the ability to set a timeout on a request. -func NewListOrgVdcNetworksParamsWithTimeout(timeout time.Duration) *ListOrgVdcNetworksParams { - return &ListOrgVdcNetworksParams{ - timeout: timeout, - } -} - -// NewListOrgVdcNetworksParamsWithContext creates a new ListOrgVdcNetworksParams object -// with the ability to set a context for a request. -func NewListOrgVdcNetworksParamsWithContext(ctx context.Context) *ListOrgVdcNetworksParams { - return &ListOrgVdcNetworksParams{ - Context: ctx, - } -} - -// NewListOrgVdcNetworksParamsWithHTTPClient creates a new ListOrgVdcNetworksParams object -// with the ability to set a custom HTTPClient for a request. -func NewListOrgVdcNetworksParamsWithHTTPClient(client *http.Client) *ListOrgVdcNetworksParams { - return &ListOrgVdcNetworksParams{ - HTTPClient: client, - } -} - -/* -ListOrgVdcNetworksParams contains all the parameters to send to the API endpoint - - for the list org vdc networks operation. - - Typically these are written to a http.Request. -*/ -type ListOrgVdcNetworksParams struct { - - /* ID. - - Specifies the ID of the virtual datacenter. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list org vdc networks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListOrgVdcNetworksParams) WithDefaults() *ListOrgVdcNetworksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list org vdc networks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListOrgVdcNetworksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) WithTimeout(timeout time.Duration) *ListOrgVdcNetworksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) WithContext(ctx context.Context) *ListOrgVdcNetworksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) WithHTTPClient(client *http.Client) *ListOrgVdcNetworksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) WithID(id int64) *ListOrgVdcNetworksParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list org vdc networks params -func (o *ListOrgVdcNetworksParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ListOrgVdcNetworksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/list_org_vdc_networks_responses.go b/v1/client/restore_tasks/list_org_vdc_networks_responses.go deleted file mode 100644 index 58b45e2c..00000000 --- a/v1/client/restore_tasks/list_org_vdc_networks_responses.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListOrgVdcNetworksReader is a Reader for the ListOrgVdcNetworks structure. -type ListOrgVdcNetworksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListOrgVdcNetworksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListOrgVdcNetworksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListOrgVdcNetworksDefault(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 - } -} - -// NewListOrgVdcNetworksOK creates a ListOrgVdcNetworksOK with default headers values -func NewListOrgVdcNetworksOK() *ListOrgVdcNetworksOK { - return &ListOrgVdcNetworksOK{} -} - -/* - ListOrgVdcNetworksOK describes a response with status code 200, with default header values. - - Specifies a wrapper around the response body of a response returned when - -fetching a list of Org VDC Networks. -*/ -type ListOrgVdcNetworksOK struct { - Payload *models.ListOrgVdcNetworksResponse -} - -// IsSuccess returns true when this list org vdc networks o k response has a 2xx status code -func (o *ListOrgVdcNetworksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list org vdc networks o k response has a 3xx status code -func (o *ListOrgVdcNetworksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list org vdc networks o k response has a 4xx status code -func (o *ListOrgVdcNetworksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list org vdc networks o k response has a 5xx status code -func (o *ListOrgVdcNetworksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list org vdc networks o k response a status code equal to that given -func (o *ListOrgVdcNetworksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list org vdc networks o k response -func (o *ListOrgVdcNetworksOK) Code() int { - return 200 -} - -func (o *ListOrgVdcNetworksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/orgVdcNetworks][%d] listOrgVdcNetworksOK %s", 200, payload) -} - -func (o *ListOrgVdcNetworksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/orgVdcNetworks][%d] listOrgVdcNetworksOK %s", 200, payload) -} - -func (o *ListOrgVdcNetworksOK) GetPayload() *models.ListOrgVdcNetworksResponse { - return o.Payload -} - -func (o *ListOrgVdcNetworksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListOrgVdcNetworksResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListOrgVdcNetworksDefault creates a ListOrgVdcNetworksDefault with default headers values -func NewListOrgVdcNetworksDefault(code int) *ListOrgVdcNetworksDefault { - return &ListOrgVdcNetworksDefault{ - _statusCode: code, - } -} - -/* -ListOrgVdcNetworksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListOrgVdcNetworksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list org vdc networks default response has a 2xx status code -func (o *ListOrgVdcNetworksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list org vdc networks default response has a 3xx status code -func (o *ListOrgVdcNetworksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list org vdc networks default response has a 4xx status code -func (o *ListOrgVdcNetworksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list org vdc networks default response has a 5xx status code -func (o *ListOrgVdcNetworksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list org vdc networks default response a status code equal to that given -func (o *ListOrgVdcNetworksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list org vdc networks default response -func (o *ListOrgVdcNetworksDefault) Code() int { - return o._statusCode -} - -func (o *ListOrgVdcNetworksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/orgVdcNetworks][%d] ListOrgVdcNetworks default %s", o._statusCode, payload) -} - -func (o *ListOrgVdcNetworksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/orgVdcNetworks][%d] ListOrgVdcNetworks default %s", o._statusCode, payload) -} - -func (o *ListOrgVdcNetworksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListOrgVdcNetworksDefault) 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/restore_tasks/list_storage_profiles_parameters.go b/v1/client/restore_tasks/list_storage_profiles_parameters.go deleted file mode 100644 index b54b9c8c..00000000 --- a/v1/client/restore_tasks/list_storage_profiles_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewListStorageProfilesParams creates a new ListStorageProfilesParams 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 NewListStorageProfilesParams() *ListStorageProfilesParams { - return &ListStorageProfilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListStorageProfilesParamsWithTimeout creates a new ListStorageProfilesParams object -// with the ability to set a timeout on a request. -func NewListStorageProfilesParamsWithTimeout(timeout time.Duration) *ListStorageProfilesParams { - return &ListStorageProfilesParams{ - timeout: timeout, - } -} - -// NewListStorageProfilesParamsWithContext creates a new ListStorageProfilesParams object -// with the ability to set a context for a request. -func NewListStorageProfilesParamsWithContext(ctx context.Context) *ListStorageProfilesParams { - return &ListStorageProfilesParams{ - Context: ctx, - } -} - -// NewListStorageProfilesParamsWithHTTPClient creates a new ListStorageProfilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListStorageProfilesParamsWithHTTPClient(client *http.Client) *ListStorageProfilesParams { - return &ListStorageProfilesParams{ - HTTPClient: client, - } -} - -/* -ListStorageProfilesParams contains all the parameters to send to the API endpoint - - for the list storage profiles operation. - - Typically these are written to a http.Request. -*/ -type ListStorageProfilesParams struct { - - /* ID. - - Specifies a unique id for the VDC. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list storage profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStorageProfilesParams) WithDefaults() *ListStorageProfilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list storage profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStorageProfilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list storage profiles params -func (o *ListStorageProfilesParams) WithTimeout(timeout time.Duration) *ListStorageProfilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list storage profiles params -func (o *ListStorageProfilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list storage profiles params -func (o *ListStorageProfilesParams) WithContext(ctx context.Context) *ListStorageProfilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list storage profiles params -func (o *ListStorageProfilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list storage profiles params -func (o *ListStorageProfilesParams) WithHTTPClient(client *http.Client) *ListStorageProfilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list storage profiles params -func (o *ListStorageProfilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the list storage profiles params -func (o *ListStorageProfilesParams) WithID(id int64) *ListStorageProfilesParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list storage profiles params -func (o *ListStorageProfilesParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ListStorageProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/list_storage_profiles_responses.go b/v1/client/restore_tasks/list_storage_profiles_responses.go deleted file mode 100644 index df6676e7..00000000 --- a/v1/client/restore_tasks/list_storage_profiles_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListStorageProfilesReader is a Reader for the ListStorageProfiles structure. -type ListStorageProfilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListStorageProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListStorageProfilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListStorageProfilesDefault(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 - } -} - -// NewListStorageProfilesOK creates a ListStorageProfilesOK with default headers values -func NewListStorageProfilesOK() *ListStorageProfilesOK { - return &ListStorageProfilesOK{} -} - -/* -ListStorageProfilesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListStorageProfilesOK struct { - Payload *models.ListStorageProfilesResponseBody -} - -// IsSuccess returns true when this list storage profiles o k response has a 2xx status code -func (o *ListStorageProfilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list storage profiles o k response has a 3xx status code -func (o *ListStorageProfilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list storage profiles o k response has a 4xx status code -func (o *ListStorageProfilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list storage profiles o k response has a 5xx status code -func (o *ListStorageProfilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list storage profiles o k response a status code equal to that given -func (o *ListStorageProfilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list storage profiles o k response -func (o *ListStorageProfilesOK) Code() int { - return 200 -} - -func (o *ListStorageProfilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/storageProfiles][%d] listStorageProfilesOK %s", 200, payload) -} - -func (o *ListStorageProfilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/storageProfiles][%d] listStorageProfilesOK %s", 200, payload) -} - -func (o *ListStorageProfilesOK) GetPayload() *models.ListStorageProfilesResponseBody { - return o.Payload -} - -func (o *ListStorageProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListStorageProfilesResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListStorageProfilesDefault creates a ListStorageProfilesDefault with default headers values -func NewListStorageProfilesDefault(code int) *ListStorageProfilesDefault { - return &ListStorageProfilesDefault{ - _statusCode: code, - } -} - -/* -ListStorageProfilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListStorageProfilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list storage profiles default response has a 2xx status code -func (o *ListStorageProfilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list storage profiles default response has a 3xx status code -func (o *ListStorageProfilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list storage profiles default response has a 4xx status code -func (o *ListStorageProfilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list storage profiles default response has a 5xx status code -func (o *ListStorageProfilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list storage profiles default response a status code equal to that given -func (o *ListStorageProfilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list storage profiles default response -func (o *ListStorageProfilesDefault) Code() int { - return o._statusCode -} - -func (o *ListStorageProfilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/storageProfiles][%d] ListStorageProfiles default %s", o._statusCode, payload) -} - -func (o *ListStorageProfilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/virtualDatacenters/{id}/storageProfiles][%d] ListStorageProfiles default %s", o._statusCode, payload) -} - -func (o *ListStorageProfilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListStorageProfilesDefault) 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/restore_tasks/public_destroy_clone_task_parameters.go b/v1/client/restore_tasks/public_destroy_clone_task_parameters.go deleted file mode 100644 index 9a36776d..00000000 --- a/v1/client/restore_tasks/public_destroy_clone_task_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewPublicDestroyCloneTaskParams creates a new PublicDestroyCloneTaskParams 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 NewPublicDestroyCloneTaskParams() *PublicDestroyCloneTaskParams { - return &PublicDestroyCloneTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPublicDestroyCloneTaskParamsWithTimeout creates a new PublicDestroyCloneTaskParams object -// with the ability to set a timeout on a request. -func NewPublicDestroyCloneTaskParamsWithTimeout(timeout time.Duration) *PublicDestroyCloneTaskParams { - return &PublicDestroyCloneTaskParams{ - timeout: timeout, - } -} - -// NewPublicDestroyCloneTaskParamsWithContext creates a new PublicDestroyCloneTaskParams object -// with the ability to set a context for a request. -func NewPublicDestroyCloneTaskParamsWithContext(ctx context.Context) *PublicDestroyCloneTaskParams { - return &PublicDestroyCloneTaskParams{ - Context: ctx, - } -} - -// NewPublicDestroyCloneTaskParamsWithHTTPClient creates a new PublicDestroyCloneTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewPublicDestroyCloneTaskParamsWithHTTPClient(client *http.Client) *PublicDestroyCloneTaskParams { - return &PublicDestroyCloneTaskParams{ - HTTPClient: client, - } -} - -/* -PublicDestroyCloneTaskParams contains all the parameters to send to the API endpoint - - for the public destroy clone task operation. - - Typically these are written to a http.Request. -*/ -type PublicDestroyCloneTaskParams struct { - - /* ID. - - Specifies a unique id of the Clone Task to destroy. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the public destroy clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublicDestroyCloneTaskParams) WithDefaults() *PublicDestroyCloneTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the public destroy clone task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublicDestroyCloneTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) WithTimeout(timeout time.Duration) *PublicDestroyCloneTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) WithContext(ctx context.Context) *PublicDestroyCloneTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) WithHTTPClient(client *http.Client) *PublicDestroyCloneTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) WithID(id int64) *PublicDestroyCloneTaskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the public destroy clone task params -func (o *PublicDestroyCloneTaskParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PublicDestroyCloneTaskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/public_destroy_clone_task_responses.go b/v1/client/restore_tasks/public_destroy_clone_task_responses.go deleted file mode 100644 index ec433678..00000000 --- a/v1/client/restore_tasks/public_destroy_clone_task_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// PublicDestroyCloneTaskReader is a Reader for the PublicDestroyCloneTask structure. -type PublicDestroyCloneTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PublicDestroyCloneTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewPublicDestroyCloneTaskNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPublicDestroyCloneTaskDefault(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 - } -} - -// NewPublicDestroyCloneTaskNoContent creates a PublicDestroyCloneTaskNoContent with default headers values -func NewPublicDestroyCloneTaskNoContent() *PublicDestroyCloneTaskNoContent { - return &PublicDestroyCloneTaskNoContent{} -} - -/* -PublicDestroyCloneTaskNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type PublicDestroyCloneTaskNoContent struct { -} - -// IsSuccess returns true when this public destroy clone task no content response has a 2xx status code -func (o *PublicDestroyCloneTaskNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this public destroy clone task no content response has a 3xx status code -func (o *PublicDestroyCloneTaskNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this public destroy clone task no content response has a 4xx status code -func (o *PublicDestroyCloneTaskNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this public destroy clone task no content response has a 5xx status code -func (o *PublicDestroyCloneTaskNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this public destroy clone task no content response a status code equal to that given -func (o *PublicDestroyCloneTaskNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the public destroy clone task no content response -func (o *PublicDestroyCloneTaskNoContent) Code() int { - return 204 -} - -func (o *PublicDestroyCloneTaskNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/restore/clone/{id}][%d] publicDestroyCloneTaskNoContent", 204) -} - -func (o *PublicDestroyCloneTaskNoContent) String() string { - return fmt.Sprintf("[DELETE /public/restore/clone/{id}][%d] publicDestroyCloneTaskNoContent", 204) -} - -func (o *PublicDestroyCloneTaskNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPublicDestroyCloneTaskDefault creates a PublicDestroyCloneTaskDefault with default headers values -func NewPublicDestroyCloneTaskDefault(code int) *PublicDestroyCloneTaskDefault { - return &PublicDestroyCloneTaskDefault{ - _statusCode: code, - } -} - -/* -PublicDestroyCloneTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type PublicDestroyCloneTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this public destroy clone task default response has a 2xx status code -func (o *PublicDestroyCloneTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this public destroy clone task default response has a 3xx status code -func (o *PublicDestroyCloneTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this public destroy clone task default response has a 4xx status code -func (o *PublicDestroyCloneTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this public destroy clone task default response has a 5xx status code -func (o *PublicDestroyCloneTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this public destroy clone task default response a status code equal to that given -func (o *PublicDestroyCloneTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the public destroy clone task default response -func (o *PublicDestroyCloneTaskDefault) Code() int { - return o._statusCode -} - -func (o *PublicDestroyCloneTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/restore/clone/{id}][%d] PublicDestroyCloneTask default %s", o._statusCode, payload) -} - -func (o *PublicDestroyCloneTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/restore/clone/{id}][%d] PublicDestroyCloneTask default %s", o._statusCode, payload) -} - -func (o *PublicDestroyCloneTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *PublicDestroyCloneTaskDefault) 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/restore_tasks/restore_tasks_client.go b/v1/client/restore_tasks/restore_tasks_client.go deleted file mode 100644 index 81d07676..00000000 --- a/v1/client/restore_tasks/restore_tasks_client.go +++ /dev/null @@ -1,1493 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new restore tasks API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new restore tasks API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new restore tasks API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for restore tasks API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AdObjectsRestoreStatus(params *AdObjectsRestoreStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdObjectsRestoreStatusOK, error) - - CancelRestoreTask(params *CancelRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelRestoreTaskOK, error) - - CompareAdObjects(params *CompareAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CompareAdObjectsOK, error) - - CreateApplicationsCloneTask(params *CreateApplicationsCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationsCloneTaskCreated, error) - - CreateApplicationsRecoverTask(params *CreateApplicationsRecoverTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationsRecoverTaskCreated, error) - - CreateCloneTask(params *CreateCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloneTaskCreated, error) - - CreateDeployTask(params *CreateDeployTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDeployTaskCreated, error) - - CreateDownloadFilesAndFolders(params *CreateDownloadFilesAndFoldersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDownloadFilesAndFoldersCreated, error) - - CreateRecoverTask(params *CreateRecoverTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRecoverTaskCreated, error) - - CreateRestoreFilesTask(params *CreateRestoreFilesTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRestoreFilesTaskCreated, error) - - GetAdDomainRootTopology(params *GetAdDomainRootTopologyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAdDomainRootTopologyOK, error) - - GetAdObjects(params *GetAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAdObjectsOK, error) - - GetFileFstatInformation(params *GetFileFstatInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileFstatInformationOK, error) - - GetFileSnapshotsInformation(params *GetFileSnapshotsInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileSnapshotsInformationOK, error) - - GetOneDriveDocuments(params *GetOneDriveDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOneDriveDocumentsOK, error) - - GetOutlookEmails(params *GetOutlookEmailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOutlookEmailsOK, error) - - GetRestoreJobByID(params *GetRestoreJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreJobByIDOK, error) - - GetRestoreJobs(params *GetRestoreJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreJobsOK, error) - - GetRestorePointsForTimeRange(params *GetRestorePointsForTimeRangeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestorePointsForTimeRangeCreated, error) - - GetRestoreTaskByID(params *GetRestoreTaskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreTaskByIDOK, error) - - GetRestoreTasks(params *GetRestoreTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreTasksOK, error) - - GetSharepointDocuments(params *GetSharepointDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSharepointDocumentsOK, error) - - GetVirtualDiskInformation(params *GetVirtualDiskInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVirtualDiskInformationOK, error) - - GetVMDirectoryList(params *GetVMDirectoryListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMDirectoryListOK, error) - - GetVMVolumesInformation(params *GetVMVolumesInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMVolumesInformationOK, error) - - ListOrgVdcNetworks(params *ListOrgVdcNetworksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListOrgVdcNetworksOK, error) - - ListStorageProfiles(params *ListStorageProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListStorageProfilesOK, error) - - PublicDestroyCloneTask(params *PublicDestroyCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublicDestroyCloneTaskNoContent, error) - - SearchAdObjects(params *SearchAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchAdObjectsOK, error) - - SearchObjects(params *SearchObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchObjectsOK, error) - - SearchProductionAdObjects(params *SearchProductionAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProductionAdObjectsOK, error) - - SearchRestoredFiles(params *SearchRestoredFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchRestoredFilesOK, error) - - UpdateRestoreTask(params *UpdateRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRestoreTaskOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - AdObjectsRestoreStatus Returns the Restore status of the AD objects which were restored from the - -snapshot AD to production AD as part of the restore task id specified in the -parameters. -*/ -func (a *Client) AdObjectsRestoreStatus(params *AdObjectsRestoreStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdObjectsRestoreStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAdObjectsRestoreStatusParams() - } - op := &runtime.ClientOperation{ - ID: "AdObjectsRestoreStatus", - Method: "GET", - PathPattern: "/public/restore/adObjects/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AdObjectsRestoreStatusReader{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.(*AdObjectsRestoreStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AdObjectsRestoreStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CancelRestoreTask cancels a recover or clone task with specified id -*/ -func (a *Client) CancelRestoreTask(params *CancelRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelRestoreTaskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelRestoreTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CancelRestoreTask", - Method: "PUT", - PathPattern: "/public/restore/tasks/cancel/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelRestoreTaskReader{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.(*CancelRestoreTaskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelRestoreTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CompareAdObjects compares the a d object from both snapshot and production a d and returns the attributes with status whether they differ or not - - Returns the list of AD Objects after comparing attributes of AD Object from - -both Snapshot and Production AD. -*/ -func (a *Client) CompareAdObjects(params *CompareAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CompareAdObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCompareAdObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "CompareAdObjects", - Method: "POST", - PathPattern: "/public/restore/adObjectAttributes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CompareAdObjectsReader{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.(*CompareAdObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CompareAdObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateApplicationsCloneTask creates a restore task for cloning applications like SQL databases - -Returns the created Restore Task. -*/ -func (a *Client) CreateApplicationsCloneTask(params *CreateApplicationsCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationsCloneTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateApplicationsCloneTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateApplicationsCloneTask", - Method: "POST", - PathPattern: "/public/restore/applicationsClone", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateApplicationsCloneTaskReader{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.(*CreateApplicationsCloneTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateApplicationsCloneTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateApplicationsRecoverTask creates a restore task for recovering applications like SQL databases - -Returns the created Restore Task. -*/ -func (a *Client) CreateApplicationsRecoverTask(params *CreateApplicationsRecoverTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateApplicationsRecoverTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateApplicationsRecoverTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateApplicationsRecoverTask", - Method: "POST", - PathPattern: "/public/restore/applicationsRecover", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateApplicationsRecoverTaskReader{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.(*CreateApplicationsRecoverTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateApplicationsRecoverTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateCloneTask creates a restore task for cloning v ms or a view - -Returns the created Restore Task that clones VMs or a View. -*/ -func (a *Client) CreateCloneTask(params *CreateCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloneTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCloneTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCloneTask", - Method: "POST", - PathPattern: "/public/restore/clone", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCloneTaskReader{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.(*CreateCloneTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCloneTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateDeployTask creates a restore task for deploying v ms or a view on cloud - - Returns the created Restore Task that deploys VMs on cloud. This operation - -returns the target where cloud is deployed. Currently, VMs can be deployed -in either AWS target or Azure target. -*/ -func (a *Client) CreateDeployTask(params *CreateDeployTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDeployTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDeployTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDeployTask", - Method: "POST", - PathPattern: "/public/restore/deploy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDeployTaskReader{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.(*CreateDeployTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDeployTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDownloadFilesAndFolders creates a download task for downloading files and folders - -Returns the created download Task information that downloads files and folders. -*/ -func (a *Client) CreateDownloadFilesAndFolders(params *CreateDownloadFilesAndFoldersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDownloadFilesAndFoldersCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDownloadFilesAndFoldersParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDownloadFilesAndFolders", - Method: "POST", - PathPattern: "/public/restore/downloadFilesAndFolders", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDownloadFilesAndFoldersReader{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.(*CreateDownloadFilesAndFoldersCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDownloadFilesAndFoldersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - CreateRecoverTask creates a restore task for recovering v ms or instantly mounting volumes - - Returns the created Restore Task. This operation returns the following - -types of Restore Tasks: 1) A Restore Task that recovers VMs back to the -original location or a new location. 2) A Restore Task that mounts the -volumes of a Server (such as a VM or Physical Server) onto the specified -target system. The Snapshots of the Server that contains the volumes -that are mounted is determined by Array of Objects. -The content of the Server is available from the mount point -for the Granular Level Recovery (GLR) of application data. For example -recovering Microsoft Exchange data using Kroll Ontrack® PowerControls™. - -NOTE: Volumes are mounted "instantly" if the Snapshot is stored locally on the -Cohesity Cluster. If the Snapshot is archival target, it will take longer -because it must be retrieved. -*/ -func (a *Client) CreateRecoverTask(params *CreateRecoverTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRecoverTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRecoverTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRecoverTask", - Method: "POST", - PathPattern: "/public/restore/recover", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRecoverTaskReader{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.(*CreateRecoverTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRecoverTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateRestoreFilesTask creates a restore task for recovering files and folders - -Returns the created Restore Task that recovers files and folders. -*/ -func (a *Client) CreateRestoreFilesTask(params *CreateRestoreFilesTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRestoreFilesTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRestoreFilesTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRestoreFilesTask", - Method: "POST", - PathPattern: "/public/restore/files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRestoreFilesTaskReader{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.(*CreateRestoreFilesTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRestoreFilesTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAdDomainRootTopology gets root topology for an a d domain - -Returns the root topology for an AD domain. -*/ -func (a *Client) GetAdDomainRootTopology(params *GetAdDomainRootTopologyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAdDomainRootTopologyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAdDomainRootTopologyParams() - } - op := &runtime.ClientOperation{ - ID: "GetAdDomainRootTopology", - Method: "GET", - PathPattern: "/public/restore/adDomainRootTopology", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAdDomainRootTopologyReader{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.(*GetAdDomainRootTopologyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAdDomainRootTopologyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetAdObjects Search for AD objects to recover that match the specified search and filter criterias - -provided in the request. -*/ -func (a *Client) GetAdObjects(params *GetAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAdObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAdObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAdObjects", - Method: "GET", - PathPattern: "/public/restore/adObjects/searchResults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAdObjectsReader{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.(*GetAdObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAdObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileFstatInformation gets the fstat information about file provided using query parameters -*/ -func (a *Client) GetFileFstatInformation(params *GetFileFstatInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileFstatInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileFstatInformationParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileFstatInformation", - Method: "GET", - PathPattern: "/public/restore/files/fstats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileFstatInformationReader{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.(*GetFileFstatInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileFstatInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileSnapshotsInformation gets the information about snapshots that contain the specified file or folder in addition information about the file or folder is provided -*/ -func (a *Client) GetFileSnapshotsInformation(params *GetFileSnapshotsInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileSnapshotsInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileSnapshotsInformationParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileSnapshotsInformation", - Method: "GET", - PathPattern: "/public/restore/files/snapshotsInformation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileSnapshotsInformationReader{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.(*GetFileSnapshotsInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileSnapshotsInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetOneDriveDocuments returns the one drive files and folders - - Search for OneDrive files and folder to recover that match the specified - -search and filter criterias on the Cohesity cluster. -*/ -func (a *Client) GetOneDriveDocuments(params *GetOneDriveDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOneDriveDocumentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetOneDriveDocumentsParams() - } - op := &runtime.ClientOperation{ - ID: "GetOneDriveDocuments", - Method: "GET", - PathPattern: "/public/restore/office365/onedrive/documents", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetOneDriveDocumentsReader{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.(*GetOneDriveDocumentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetOneDriveDocumentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetOutlookEmails returns the outlook emails and folders containing emails - - Search for Emails and Emails' folders to recover that match the specified - -search and filter criterias on the Cohesity cluster. -*/ -func (a *Client) GetOutlookEmails(params *GetOutlookEmailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOutlookEmailsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetOutlookEmailsParams() - } - op := &runtime.ClientOperation{ - ID: "GetOutlookEmails", - Method: "GET", - PathPattern: "/public/restore/office365/outlook/emails", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetOutlookEmailsReader{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.(*GetOutlookEmailsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetOutlookEmailsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRestoreJobByID lists details about a single restore job - -Returns the restore job object corresponding to the specified id. -*/ -func (a *Client) GetRestoreJobByID(params *GetRestoreJobByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreJobByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreJobByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreJobById", - Method: "GET", - PathPattern: "/restoretasks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreJobByIDReader{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.(*GetRestoreJobByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreJobByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRestoreJobs lists restore jobs filtered by the specified parameters - - If no parameters are specified, all Restore Jobs currently - -on the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetRestoreJobs(params *GetRestoreJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreJobsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreJobsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreJobs", - Method: "GET", - PathPattern: "/restoretasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreJobsReader{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.(*GetRestoreJobsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRestorePointsForTimeRange lists restore points in a give time range - -Returns the snapshots in the time range specified. -*/ -func (a *Client) GetRestorePointsForTimeRange(params *GetRestorePointsForTimeRangeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestorePointsForTimeRangeCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestorePointsForTimeRangeParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestorePointsForTimeRange", - Method: "POST", - PathPattern: "/public/restore/pointsForTimeRange", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestorePointsForTimeRangeReader{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.(*GetRestorePointsForTimeRangeCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestorePointsForTimeRangeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRestoreTaskByID lists details about a single restore task - -Returns the Restore Task corresponding to the specified Restore Task id. -*/ -func (a *Client) GetRestoreTaskByID(params *GetRestoreTaskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreTaskByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreTaskByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreTaskById", - Method: "GET", - PathPattern: "/public/restore/tasks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreTaskByIDReader{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.(*GetRestoreTaskByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreTaskByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRestoreTasks lists the restore tasks filtered by the specified parameters - - If no parameters are specified, all Restore Tasks found - -on the Cohesity Cluster are returned. Both running and completed -Restore Tasks are reported. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetRestoreTasks(params *GetRestoreTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreTasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreTasks", - Method: "GET", - PathPattern: "/public/restore/tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreTasksReader{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.(*GetRestoreTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetSharepointDocuments returns the sharepoint site s files and folders - - Search for Sharepoint files and folder to recover that match the specified - -search and filter criterias on the Cohesity cluster. -*/ -func (a *Client) GetSharepointDocuments(params *GetSharepointDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSharepointDocumentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSharepointDocumentsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSharepointDocuments", - Method: "GET", - PathPattern: "/public/restore/office365/sharepoint/documents", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSharepointDocumentsReader{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.(*GetSharepointDocumentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSharepointDocumentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVirtualDiskInformation fetches information of virtual disk -*/ -func (a *Client) GetVirtualDiskInformation(params *GetVirtualDiskInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVirtualDiskInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVirtualDiskInformationParams() - } - op := &runtime.ClientOperation{ - ID: "GetVirtualDiskInformation", - Method: "GET", - PathPattern: "/public/restore/virtualDiskInformation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVirtualDiskInformationReader{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.(*GetVirtualDiskInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVirtualDiskInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVMDirectoryList gets the directory list based on the given directory name and other query parameters -*/ -func (a *Client) GetVMDirectoryList(params *GetVMDirectoryListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMDirectoryListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVMDirectoryListParams() - } - op := &runtime.ClientOperation{ - ID: "GetVmDirectoryList", - Method: "GET", - PathPattern: "/public/restore/vms/directoryList", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVMDirectoryListReader{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.(*GetVMDirectoryListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVMDirectoryListDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetVMVolumesInformation gets information about the logical volumes found in a VM - - All required fields must be specified for this operation. - -To get values for these fields, invoke the GET /public/restore/objects -operation. -A specific Job Run is defined by the jobRunId, startedTimeUsecs, and -attemptNumber fields. -*/ -func (a *Client) GetVMVolumesInformation(params *GetVMVolumesInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMVolumesInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVMVolumesInformationParams() - } - op := &runtime.ClientOperation{ - ID: "GetVmVolumesInformation", - Method: "GET", - PathPattern: "/public/restore/vms/volumesInformation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVMVolumesInformationReader{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.(*GetVMVolumesInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVMVolumesInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListOrgVdcNetworks returns the org v d c network under a v d c in a v mware environment -*/ -func (a *Client) ListOrgVdcNetworks(params *ListOrgVdcNetworksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListOrgVdcNetworksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListOrgVdcNetworksParams() - } - op := &runtime.ClientOperation{ - ID: "ListOrgVdcNetworks", - Method: "GET", - PathPattern: "/public/virtualDatacenters/{id}/orgVdcNetworks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListOrgVdcNetworksReader{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.(*ListOrgVdcNetworksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListOrgVdcNetworksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListStorageProfiles fetches information of virtual disk -*/ -func (a *Client) ListStorageProfiles(params *ListStorageProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListStorageProfilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListStorageProfilesParams() - } - op := &runtime.ClientOperation{ - ID: "ListStorageProfiles", - Method: "GET", - PathPattern: "/public/virtualDatacenters/{id}/storageProfiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListStorageProfilesReader{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.(*ListStorageProfilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListStorageProfilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PublicDestroyCloneTask destroys a clone task with specified id -*/ -func (a *Client) PublicDestroyCloneTask(params *PublicDestroyCloneTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublicDestroyCloneTaskNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPublicDestroyCloneTaskParams() - } - op := &runtime.ClientOperation{ - ID: "PublicDestroyCloneTask", - Method: "DELETE", - PathPattern: "/public/restore/clone/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PublicDestroyCloneTaskReader{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.(*PublicDestroyCloneTaskNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PublicDestroyCloneTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchAdObjects searches for a d objects in both production and snapshot a d from given search base dn and offset - - Returns the list of AD Objects along with status whether they are missing in - -Production AD, equal or not equal. -*/ -func (a *Client) SearchAdObjects(params *SearchAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchAdObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchAdObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchAdObjects", - Method: "GET", - PathPattern: "/public/restore/adObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchAdObjectsReader{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.(*SearchAdObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchAdObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchObjects finds backup objects that match the specified search and filter criteria on the cohesity cluster - - If no search pattern or filter parameters are specified, all backup objects - -currently found on the Cohesity Cluster are returned. -Only leaf objects that have been protected by a Job are returned such as VMs, -Views and databases. -Specify a search pattern or parameters to filter the results that -are returned. - -The term "items" below refers to leaf backup objects such as VMs, -Views and databases. -*/ -func (a *Client) SearchObjects(params *SearchObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchObjects", - Method: "GET", - PathPattern: "/public/restore/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchObjectsReader{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.(*SearchObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchProductionAdObjects searches for a d objects that match the list of object guids sam account names and distinguished names provided in the request - - Returns the list of AD Objects that match the list of object guids, - -sam account names and distinguished names provided in the request. -*/ -func (a *Client) SearchProductionAdObjects(params *SearchProductionAdObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProductionAdObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchProductionAdObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchProductionAdObjects", - Method: "POST", - PathPattern: "/public/restore/adObjects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchProductionAdObjectsReader{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.(*SearchProductionAdObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchProductionAdObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - SearchRestoredFiles searches for files and folders to recover that match the specified search and filter criteria on the cohesity cluster - - Use the files and folders returned by this operation to populate the - -list of files and folders to recover in the -POST /public/restore/files operation. -If no search pattern or filter parameters are specified, all files -and folders currently found on the Cohesity Cluster are returned. -Specify a search pattern or parameters to filter the results that -are returned. - -The term "items" below refers to files and folders that are found -in the source objects (such as VMs). -*/ -func (a *Client) SearchRestoredFiles(params *SearchRestoredFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchRestoredFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchRestoredFilesParams() - } - op := &runtime.ClientOperation{ - ID: "SearchRestoredFiles", - Method: "GET", - PathPattern: "/public/restore/files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchRestoredFilesReader{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.(*SearchRestoredFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchRestoredFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateRestoreTask Updates an existing restore task with additional params which are needed for - -features like Hot-Standby. -*/ -func (a *Client) UpdateRestoreTask(params *UpdateRestoreTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRestoreTaskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRestoreTaskParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRestoreTask", - Method: "PUT", - PathPattern: "/public/restore/recover", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRestoreTaskReader{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.(*UpdateRestoreTaskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRestoreTaskDefault) - 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/restore_tasks/search_ad_objects_parameters.go b/v1/client/restore_tasks/search_ad_objects_parameters.go deleted file mode 100644 index 084d05bf..00000000 --- a/v1/client/restore_tasks/search_ad_objects_parameters.go +++ /dev/null @@ -1,421 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewSearchAdObjectsParams creates a new SearchAdObjectsParams 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 NewSearchAdObjectsParams() *SearchAdObjectsParams { - return &SearchAdObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchAdObjectsParamsWithTimeout creates a new SearchAdObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchAdObjectsParamsWithTimeout(timeout time.Duration) *SearchAdObjectsParams { - return &SearchAdObjectsParams{ - timeout: timeout, - } -} - -// NewSearchAdObjectsParamsWithContext creates a new SearchAdObjectsParams object -// with the ability to set a context for a request. -func NewSearchAdObjectsParamsWithContext(ctx context.Context) *SearchAdObjectsParams { - return &SearchAdObjectsParams{ - Context: ctx, - } -} - -// NewSearchAdObjectsParamsWithHTTPClient creates a new SearchAdObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchAdObjectsParamsWithHTTPClient(client *http.Client) *SearchAdObjectsParams { - return &SearchAdObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchAdObjectsParams contains all the parameters to send to the API endpoint - - for the search ad objects operation. - - Typically these are written to a http.Request. -*/ -type SearchAdObjectsParams struct { - - /* CompareObjects. - - Specifies the option to compare the properties from Snapshot AD and - Production AD if specifed and sets kNotEqual flag in the result when - there is mismatch. - */ - CompareObjects *bool - - /* ExcludeSystemProperties. - - Specifies the option to exclude the system attributes while comparing the - the objects from the Production AD and Snapshot AD. - */ - ExcludeSystemProperties *bool - - /* Filter. - - Specifies the filter which can be used for searching the AD Objects from - given Search Base DN. - There are two types of filters supported. They are: - 1) If the string does not contain LDAP delimiters '(' and ')', then it is - assumed to be ANR search "(anr=)" - Eg: "a" will result in query to return all ANR fields with "a" characters - (case insensitive) in them - 2) Search with OR and AND combination: - "(|(&(objectClass=user)(distinguishedName=CN=Jone - Doe,OU=Users,DC=corp,DC=cohesity,DC=com))(&(objectClass=user) - (sAMAccountName=jdoe)))" - */ - Filter *string - - /* NumObjects. - - Specifies the number of AD Objects to be fetched. - - Format: uint32 - */ - NumObjects *uint32 - - /* RecordOffset. - - Specifies the offset from which AD objects should be searched in both - the Snapshot and Production AD. - - Format: uint32 - */ - RecordOffset *uint32 - - /* RestoreTaskID. - - Specifies the restoreTaskId corresponding to which we need to search - AD objects. - - Format: int64 - */ - RestoreTaskID int64 - - /* SearchBaseDn. - - Specifies the search base distinguished name from where the search - should begin in the hierarchy of the AD in both Production - and Snapshot AD. - */ - SearchBaseDn *string - - /* SubtreeSearchScope. - - Specifies the search scope for the request. - If subtree search scope is true all the children of Search Base DN - are returned from given offset. If subtree search scope is false - only all objects which are one level from the Search Base DN are returned. - */ - SubtreeSearchScope *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchAdObjectsParams) WithDefaults() *SearchAdObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchAdObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search ad objects params -func (o *SearchAdObjectsParams) WithTimeout(timeout time.Duration) *SearchAdObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search ad objects params -func (o *SearchAdObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search ad objects params -func (o *SearchAdObjectsParams) WithContext(ctx context.Context) *SearchAdObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search ad objects params -func (o *SearchAdObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search ad objects params -func (o *SearchAdObjectsParams) WithHTTPClient(client *http.Client) *SearchAdObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search ad objects params -func (o *SearchAdObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCompareObjects adds the compareObjects to the search ad objects params -func (o *SearchAdObjectsParams) WithCompareObjects(compareObjects *bool) *SearchAdObjectsParams { - o.SetCompareObjects(compareObjects) - return o -} - -// SetCompareObjects adds the compareObjects to the search ad objects params -func (o *SearchAdObjectsParams) SetCompareObjects(compareObjects *bool) { - o.CompareObjects = compareObjects -} - -// WithExcludeSystemProperties adds the excludeSystemProperties to the search ad objects params -func (o *SearchAdObjectsParams) WithExcludeSystemProperties(excludeSystemProperties *bool) *SearchAdObjectsParams { - o.SetExcludeSystemProperties(excludeSystemProperties) - return o -} - -// SetExcludeSystemProperties adds the excludeSystemProperties to the search ad objects params -func (o *SearchAdObjectsParams) SetExcludeSystemProperties(excludeSystemProperties *bool) { - o.ExcludeSystemProperties = excludeSystemProperties -} - -// WithFilter adds the filter to the search ad objects params -func (o *SearchAdObjectsParams) WithFilter(filter *string) *SearchAdObjectsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the search ad objects params -func (o *SearchAdObjectsParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithNumObjects adds the numObjects to the search ad objects params -func (o *SearchAdObjectsParams) WithNumObjects(numObjects *uint32) *SearchAdObjectsParams { - o.SetNumObjects(numObjects) - return o -} - -// SetNumObjects adds the numObjects to the search ad objects params -func (o *SearchAdObjectsParams) SetNumObjects(numObjects *uint32) { - o.NumObjects = numObjects -} - -// WithRecordOffset adds the recordOffset to the search ad objects params -func (o *SearchAdObjectsParams) WithRecordOffset(recordOffset *uint32) *SearchAdObjectsParams { - o.SetRecordOffset(recordOffset) - return o -} - -// SetRecordOffset adds the recordOffset to the search ad objects params -func (o *SearchAdObjectsParams) SetRecordOffset(recordOffset *uint32) { - o.RecordOffset = recordOffset -} - -// WithRestoreTaskID adds the restoreTaskID to the search ad objects params -func (o *SearchAdObjectsParams) WithRestoreTaskID(restoreTaskID int64) *SearchAdObjectsParams { - o.SetRestoreTaskID(restoreTaskID) - return o -} - -// SetRestoreTaskID adds the restoreTaskId to the search ad objects params -func (o *SearchAdObjectsParams) SetRestoreTaskID(restoreTaskID int64) { - o.RestoreTaskID = restoreTaskID -} - -// WithSearchBaseDn adds the searchBaseDn to the search ad objects params -func (o *SearchAdObjectsParams) WithSearchBaseDn(searchBaseDn *string) *SearchAdObjectsParams { - o.SetSearchBaseDn(searchBaseDn) - return o -} - -// SetSearchBaseDn adds the searchBaseDn to the search ad objects params -func (o *SearchAdObjectsParams) SetSearchBaseDn(searchBaseDn *string) { - o.SearchBaseDn = searchBaseDn -} - -// WithSubtreeSearchScope adds the subtreeSearchScope to the search ad objects params -func (o *SearchAdObjectsParams) WithSubtreeSearchScope(subtreeSearchScope *bool) *SearchAdObjectsParams { - o.SetSubtreeSearchScope(subtreeSearchScope) - return o -} - -// SetSubtreeSearchScope adds the subtreeSearchScope to the search ad objects params -func (o *SearchAdObjectsParams) SetSubtreeSearchScope(subtreeSearchScope *bool) { - o.SubtreeSearchScope = subtreeSearchScope -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchAdObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CompareObjects != nil { - - // query param compareObjects - var qrCompareObjects bool - - if o.CompareObjects != nil { - qrCompareObjects = *o.CompareObjects - } - qCompareObjects := swag.FormatBool(qrCompareObjects) - if qCompareObjects != "" { - - if err := r.SetQueryParam("compareObjects", qCompareObjects); err != nil { - return err - } - } - } - - if o.ExcludeSystemProperties != nil { - - // query param excludeSystemProperties - var qrExcludeSystemProperties bool - - if o.ExcludeSystemProperties != nil { - qrExcludeSystemProperties = *o.ExcludeSystemProperties - } - qExcludeSystemProperties := swag.FormatBool(qrExcludeSystemProperties) - if qExcludeSystemProperties != "" { - - if err := r.SetQueryParam("excludeSystemProperties", qExcludeSystemProperties); err != nil { - return err - } - } - } - - if o.Filter != nil { - - // query param filter - var qrFilter string - - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - } - - if o.NumObjects != nil { - - // query param numObjects - var qrNumObjects uint32 - - if o.NumObjects != nil { - qrNumObjects = *o.NumObjects - } - qNumObjects := swag.FormatUint32(qrNumObjects) - if qNumObjects != "" { - - if err := r.SetQueryParam("numObjects", qNumObjects); err != nil { - return err - } - } - } - - if o.RecordOffset != nil { - - // query param recordOffset - var qrRecordOffset uint32 - - if o.RecordOffset != nil { - qrRecordOffset = *o.RecordOffset - } - qRecordOffset := swag.FormatUint32(qrRecordOffset) - if qRecordOffset != "" { - - if err := r.SetQueryParam("recordOffset", qRecordOffset); err != nil { - return err - } - } - } - - // query param restoreTaskId - qrRestoreTaskID := o.RestoreTaskID - qRestoreTaskID := swag.FormatInt64(qrRestoreTaskID) - if qRestoreTaskID != "" { - - if err := r.SetQueryParam("restoreTaskId", qRestoreTaskID); err != nil { - return err - } - } - - if o.SearchBaseDn != nil { - - // query param searchBaseDn - var qrSearchBaseDn string - - if o.SearchBaseDn != nil { - qrSearchBaseDn = *o.SearchBaseDn - } - qSearchBaseDn := qrSearchBaseDn - if qSearchBaseDn != "" { - - if err := r.SetQueryParam("searchBaseDn", qSearchBaseDn); err != nil { - return err - } - } - } - - if o.SubtreeSearchScope != nil { - - // query param subtreeSearchScope - var qrSubtreeSearchScope bool - - if o.SubtreeSearchScope != nil { - qrSubtreeSearchScope = *o.SubtreeSearchScope - } - qSubtreeSearchScope := swag.FormatBool(qrSubtreeSearchScope) - if qSubtreeSearchScope != "" { - - if err := r.SetQueryParam("subtreeSearchScope", qSubtreeSearchScope); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/restore_tasks/search_ad_objects_responses.go b/v1/client/restore_tasks/search_ad_objects_responses.go deleted file mode 100644 index fa51c61b..00000000 --- a/v1/client/restore_tasks/search_ad_objects_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchAdObjectsReader is a Reader for the SearchAdObjects structure. -type SearchAdObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchAdObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchAdObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchAdObjectsDefault(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 - } -} - -// NewSearchAdObjectsOK creates a SearchAdObjectsOK with default headers values -func NewSearchAdObjectsOK() *SearchAdObjectsOK { - return &SearchAdObjectsOK{} -} - -/* -SearchAdObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchAdObjectsOK struct { - Payload []*models.ADObject -} - -// IsSuccess returns true when this search ad objects o k response has a 2xx status code -func (o *SearchAdObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search ad objects o k response has a 3xx status code -func (o *SearchAdObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search ad objects o k response has a 4xx status code -func (o *SearchAdObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search ad objects o k response has a 5xx status code -func (o *SearchAdObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search ad objects o k response a status code equal to that given -func (o *SearchAdObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search ad objects o k response -func (o *SearchAdObjectsOK) Code() int { - return 200 -} - -func (o *SearchAdObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects][%d] searchAdObjectsOK %s", 200, payload) -} - -func (o *SearchAdObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects][%d] searchAdObjectsOK %s", 200, payload) -} - -func (o *SearchAdObjectsOK) GetPayload() []*models.ADObject { - return o.Payload -} - -func (o *SearchAdObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchAdObjectsDefault creates a SearchAdObjectsDefault with default headers values -func NewSearchAdObjectsDefault(code int) *SearchAdObjectsDefault { - return &SearchAdObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchAdObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchAdObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search ad objects default response has a 2xx status code -func (o *SearchAdObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search ad objects default response has a 3xx status code -func (o *SearchAdObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search ad objects default response has a 4xx status code -func (o *SearchAdObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search ad objects default response has a 5xx status code -func (o *SearchAdObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search ad objects default response a status code equal to that given -func (o *SearchAdObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search ad objects default response -func (o *SearchAdObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchAdObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects][%d] SearchAdObjects default %s", o._statusCode, payload) -} - -func (o *SearchAdObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/adObjects][%d] SearchAdObjects default %s", o._statusCode, payload) -} - -func (o *SearchAdObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchAdObjectsDefault) 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/restore_tasks/search_objects_parameters.go b/v1/client/restore_tasks/search_objects_parameters.go deleted file mode 100644 index 649a39e5..00000000 --- a/v1/client/restore_tasks/search_objects_parameters.go +++ /dev/null @@ -1,748 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewSearchObjectsParams creates a new SearchObjectsParams 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 NewSearchObjectsParams() *SearchObjectsParams { - return &SearchObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchObjectsParamsWithTimeout creates a new SearchObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchObjectsParamsWithTimeout(timeout time.Duration) *SearchObjectsParams { - return &SearchObjectsParams{ - timeout: timeout, - } -} - -// NewSearchObjectsParamsWithContext creates a new SearchObjectsParams object -// with the ability to set a context for a request. -func NewSearchObjectsParamsWithContext(ctx context.Context) *SearchObjectsParams { - return &SearchObjectsParams{ - Context: ctx, - } -} - -// NewSearchObjectsParamsWithHTTPClient creates a new SearchObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchObjectsParamsWithHTTPClient(client *http.Client) *SearchObjectsParams { - return &SearchObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchObjectsParams contains all the parameters to send to the API endpoint - - for the search objects operation. - - Typically these are written to a http.Request. -*/ -type SearchObjectsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* Application. - - Filter by application when the environment type is kSQL. - For example, if SQL is specified the SQL databases are returned. - */ - Application *string - - /* EndTimeUsecs. - - Filter by backup completion time by specify a backup - completion start and end times. Specified as a Unix epoch - Timestamp (in microseconds). - Only items created by backups that completed between the - specified start and end times are returned. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. - Only items from the specified environment types are returned. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* JobIds. - - Filter by a list of Protection Job ids. - Only items backed up by the specified Jobs are listed. - */ - JobIds []int64 - - /* Office365SourceTypes. - - Filter by Office365 types such as 'kUser', 'kSite', etc. - Only items from the specified source types are returned. - */ - Office365SourceTypes []string - - /* OperatingSystems. - - Filter by the Operating Systems running on VMs and Physical Servers. - This filter is applicable only to VMs and physical servers. - */ - OperatingSystems []string - - /* OwnerEntityID. - - Filter objects by the Entity id of the owner VM. For example, if a - ownerEntityId is provided while searching for SQL databases, - only SQL databases belonging to the VM with the specified id - are returned. - ownerEntityId is only significant if application is set to SQL. - - Format: int64 - */ - OwnerEntityID *int64 - - /* PageCount. - - Limit the number of items to return in the response for pagination - purposes. - - Format: int64 - */ - PageCount *int64 - - /* RegisteredSourceIds. - - Filter by a list of Registered Sources ids. Only items - from the listed Registered Sources are returned. - */ - RegisteredSourceIds []int64 - - /* Search. - - Filter by searching for sub-strings in the item name. The specified - string can match any part of the item name. - For example: "vm" or "123" both match the item name of "vm-123". - */ - Search *string - - /* StartIndex. - - Specifies an index number that can be used to return subsets of items - in multiple requests. - Break up the items to return into multiple requests - by setting pageCount and using startIndex to return a subsets of items. - For example, set startIndex to 0 to get the first set of items - for the first request. Increment startIndex by pageCount - to get the next set of items for a next request. - Continue until all items are returned and therefore the total number of - returned items is equal to totalCount. - - Format: int64 - */ - StartIndex *int64 - - /* StartTimeUsecs. - - Filter by backup completion time by specifying a backup - completion start and end times. Specified as a Unix epoch - Timestamp (in microseconds). - Only items created by backups that completed between the - specified start and end times are returned. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* ViewBoxIds. - - Filter by a list of Domains (View Boxes) ids. - Only items stored in the listed Domains (View Boxes) are returned. - */ - ViewBoxIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchObjectsParams) WithDefaults() *SearchObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search objects params -func (o *SearchObjectsParams) WithTimeout(timeout time.Duration) *SearchObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search objects params -func (o *SearchObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search objects params -func (o *SearchObjectsParams) WithContext(ctx context.Context) *SearchObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search objects params -func (o *SearchObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search objects params -func (o *SearchObjectsParams) WithHTTPClient(client *http.Client) *SearchObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search objects params -func (o *SearchObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the search objects params -func (o *SearchObjectsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *SearchObjectsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the search objects params -func (o *SearchObjectsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithApplication adds the application to the search objects params -func (o *SearchObjectsParams) WithApplication(application *string) *SearchObjectsParams { - o.SetApplication(application) - return o -} - -// SetApplication adds the application to the search objects params -func (o *SearchObjectsParams) SetApplication(application *string) { - o.Application = application -} - -// WithEndTimeUsecs adds the endTimeUsecs to the search objects params -func (o *SearchObjectsParams) WithEndTimeUsecs(endTimeUsecs *int64) *SearchObjectsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the search objects params -func (o *SearchObjectsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEnvironments adds the environments to the search objects params -func (o *SearchObjectsParams) WithEnvironments(environments []string) *SearchObjectsParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the search objects params -func (o *SearchObjectsParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithJobIds adds the jobIds to the search objects params -func (o *SearchObjectsParams) WithJobIds(jobIds []int64) *SearchObjectsParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the search objects params -func (o *SearchObjectsParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithOffice365SourceTypes adds the office365SourceTypes to the search objects params -func (o *SearchObjectsParams) WithOffice365SourceTypes(office365SourceTypes []string) *SearchObjectsParams { - o.SetOffice365SourceTypes(office365SourceTypes) - return o -} - -// SetOffice365SourceTypes adds the office365SourceTypes to the search objects params -func (o *SearchObjectsParams) SetOffice365SourceTypes(office365SourceTypes []string) { - o.Office365SourceTypes = office365SourceTypes -} - -// WithOperatingSystems adds the operatingSystems to the search objects params -func (o *SearchObjectsParams) WithOperatingSystems(operatingSystems []string) *SearchObjectsParams { - o.SetOperatingSystems(operatingSystems) - return o -} - -// SetOperatingSystems adds the operatingSystems to the search objects params -func (o *SearchObjectsParams) SetOperatingSystems(operatingSystems []string) { - o.OperatingSystems = operatingSystems -} - -// WithOwnerEntityID adds the ownerEntityID to the search objects params -func (o *SearchObjectsParams) WithOwnerEntityID(ownerEntityID *int64) *SearchObjectsParams { - o.SetOwnerEntityID(ownerEntityID) - return o -} - -// SetOwnerEntityID adds the ownerEntityId to the search objects params -func (o *SearchObjectsParams) SetOwnerEntityID(ownerEntityID *int64) { - o.OwnerEntityID = ownerEntityID -} - -// WithPageCount adds the pageCount to the search objects params -func (o *SearchObjectsParams) WithPageCount(pageCount *int64) *SearchObjectsParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the search objects params -func (o *SearchObjectsParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithRegisteredSourceIds adds the registeredSourceIds to the search objects params -func (o *SearchObjectsParams) WithRegisteredSourceIds(registeredSourceIds []int64) *SearchObjectsParams { - o.SetRegisteredSourceIds(registeredSourceIds) - return o -} - -// SetRegisteredSourceIds adds the registeredSourceIds to the search objects params -func (o *SearchObjectsParams) SetRegisteredSourceIds(registeredSourceIds []int64) { - o.RegisteredSourceIds = registeredSourceIds -} - -// WithSearch adds the search to the search objects params -func (o *SearchObjectsParams) WithSearch(search *string) *SearchObjectsParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the search objects params -func (o *SearchObjectsParams) SetSearch(search *string) { - o.Search = search -} - -// WithStartIndex adds the startIndex to the search objects params -func (o *SearchObjectsParams) WithStartIndex(startIndex *int64) *SearchObjectsParams { - o.SetStartIndex(startIndex) - return o -} - -// SetStartIndex adds the startIndex to the search objects params -func (o *SearchObjectsParams) SetStartIndex(startIndex *int64) { - o.StartIndex = startIndex -} - -// WithStartTimeUsecs adds the startTimeUsecs to the search objects params -func (o *SearchObjectsParams) WithStartTimeUsecs(startTimeUsecs *int64) *SearchObjectsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the search objects params -func (o *SearchObjectsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantID adds the tenantID to the search objects params -func (o *SearchObjectsParams) WithTenantID(tenantID *string) *SearchObjectsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the search objects params -func (o *SearchObjectsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithViewBoxIds adds the viewBoxIds to the search objects params -func (o *SearchObjectsParams) WithViewBoxIds(viewBoxIds []int64) *SearchObjectsParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the search objects params -func (o *SearchObjectsParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Application != nil { - - // query param application - var qrApplication string - - if o.Application != nil { - qrApplication = *o.Application - } - qApplication := qrApplication - if qApplication != "" { - - if err := r.SetQueryParam("application", qApplication); err != nil { - return err - } - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.Office365SourceTypes != nil { - - // binding items for office365SourceTypes - joinedOffice365SourceTypes := o.bindParamOffice365SourceTypes(reg) - - // query array param office365SourceTypes - if err := r.SetQueryParam("office365SourceTypes", joinedOffice365SourceTypes...); err != nil { - return err - } - } - - if o.OperatingSystems != nil { - - // binding items for operatingSystems - joinedOperatingSystems := o.bindParamOperatingSystems(reg) - - // query array param operatingSystems - if err := r.SetQueryParam("operatingSystems", joinedOperatingSystems...); err != nil { - return err - } - } - - if o.OwnerEntityID != nil { - - // query param ownerEntityId - var qrOwnerEntityID int64 - - if o.OwnerEntityID != nil { - qrOwnerEntityID = *o.OwnerEntityID - } - qOwnerEntityID := swag.FormatInt64(qrOwnerEntityID) - if qOwnerEntityID != "" { - - if err := r.SetQueryParam("ownerEntityId", qOwnerEntityID); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.RegisteredSourceIds != nil { - - // binding items for registeredSourceIds - joinedRegisteredSourceIds := o.bindParamRegisteredSourceIds(reg) - - // query array param registeredSourceIds - if err := r.SetQueryParam("registeredSourceIds", joinedRegisteredSourceIds...); err != nil { - return err - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.StartIndex != nil { - - // query param startIndex - var qrStartIndex int64 - - if o.StartIndex != nil { - qrStartIndex = *o.StartIndex - } - qStartIndex := swag.FormatInt64(qrStartIndex) - if qStartIndex != "" { - - if err := r.SetQueryParam("startIndex", qStartIndex); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchObjects binds the parameter environments -func (o *SearchObjectsParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamSearchObjects binds the parameter jobIds -func (o *SearchObjectsParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamSearchObjects binds the parameter office365SourceTypes -func (o *SearchObjectsParams) bindParamOffice365SourceTypes(formats strfmt.Registry) []string { - office365SourceTypesIR := o.Office365SourceTypes - - var office365SourceTypesIC []string - for _, office365SourceTypesIIR := range office365SourceTypesIR { // explode []string - - office365SourceTypesIIV := office365SourceTypesIIR // string as string - office365SourceTypesIC = append(office365SourceTypesIC, office365SourceTypesIIV) - } - - // items.CollectionFormat: "" - office365SourceTypesIS := swag.JoinByFormat(office365SourceTypesIC, "") - - return office365SourceTypesIS -} - -// bindParamSearchObjects binds the parameter operatingSystems -func (o *SearchObjectsParams) bindParamOperatingSystems(formats strfmt.Registry) []string { - operatingSystemsIR := o.OperatingSystems - - var operatingSystemsIC []string - for _, operatingSystemsIIR := range operatingSystemsIR { // explode []string - - operatingSystemsIIV := operatingSystemsIIR // string as string - operatingSystemsIC = append(operatingSystemsIC, operatingSystemsIIV) - } - - // items.CollectionFormat: "" - operatingSystemsIS := swag.JoinByFormat(operatingSystemsIC, "") - - return operatingSystemsIS -} - -// bindParamSearchObjects binds the parameter registeredSourceIds -func (o *SearchObjectsParams) bindParamRegisteredSourceIds(formats strfmt.Registry) []string { - registeredSourceIdsIR := o.RegisteredSourceIds - - var registeredSourceIdsIC []string - for _, registeredSourceIdsIIR := range registeredSourceIdsIR { // explode []int64 - - registeredSourceIdsIIV := swag.FormatInt64(registeredSourceIdsIIR) // int64 as string - registeredSourceIdsIC = append(registeredSourceIdsIC, registeredSourceIdsIIV) - } - - // items.CollectionFormat: "" - registeredSourceIdsIS := swag.JoinByFormat(registeredSourceIdsIC, "") - - return registeredSourceIdsIS -} - -// bindParamSearchObjects binds the parameter viewBoxIds -func (o *SearchObjectsParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/restore_tasks/search_objects_responses.go b/v1/client/restore_tasks/search_objects_responses.go deleted file mode 100644 index 5645f88d..00000000 --- a/v1/client/restore_tasks/search_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchObjectsReader is a Reader for the SearchObjects structure. -type SearchObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchObjectsDefault(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 - } -} - -// NewSearchObjectsOK creates a SearchObjectsOK with default headers values -func NewSearchObjectsOK() *SearchObjectsOK { - return &SearchObjectsOK{} -} - -/* -SearchObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchObjectsOK struct { - Payload *models.ObjectSearchResults -} - -// IsSuccess returns true when this search objects o k response has a 2xx status code -func (o *SearchObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search objects o k response has a 3xx status code -func (o *SearchObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search objects o k response has a 4xx status code -func (o *SearchObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search objects o k response has a 5xx status code -func (o *SearchObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search objects o k response a status code equal to that given -func (o *SearchObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search objects o k response -func (o *SearchObjectsOK) Code() int { - return 200 -} - -func (o *SearchObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/objects][%d] searchObjectsOK %s", 200, payload) -} - -func (o *SearchObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/objects][%d] searchObjectsOK %s", 200, payload) -} - -func (o *SearchObjectsOK) GetPayload() *models.ObjectSearchResults { - return o.Payload -} - -func (o *SearchObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchObjectsDefault creates a SearchObjectsDefault with default headers values -func NewSearchObjectsDefault(code int) *SearchObjectsDefault { - return &SearchObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search objects default response has a 2xx status code -func (o *SearchObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search objects default response has a 3xx status code -func (o *SearchObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search objects default response has a 4xx status code -func (o *SearchObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search objects default response has a 5xx status code -func (o *SearchObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search objects default response a status code equal to that given -func (o *SearchObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search objects default response -func (o *SearchObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/objects][%d] SearchObjects default %s", o._statusCode, payload) -} - -func (o *SearchObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/objects][%d] SearchObjects default %s", o._statusCode, payload) -} - -func (o *SearchObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchObjectsDefault) 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/restore_tasks/search_production_ad_objects_parameters.go b/v1/client/restore_tasks/search_production_ad_objects_parameters.go deleted file mode 100644 index b6438cab..00000000 --- a/v1/client/restore_tasks/search_production_ad_objects_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewSearchProductionAdObjectsParams creates a new SearchProductionAdObjectsParams 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 NewSearchProductionAdObjectsParams() *SearchProductionAdObjectsParams { - return &SearchProductionAdObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchProductionAdObjectsParamsWithTimeout creates a new SearchProductionAdObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchProductionAdObjectsParamsWithTimeout(timeout time.Duration) *SearchProductionAdObjectsParams { - return &SearchProductionAdObjectsParams{ - timeout: timeout, - } -} - -// NewSearchProductionAdObjectsParamsWithContext creates a new SearchProductionAdObjectsParams object -// with the ability to set a context for a request. -func NewSearchProductionAdObjectsParamsWithContext(ctx context.Context) *SearchProductionAdObjectsParams { - return &SearchProductionAdObjectsParams{ - Context: ctx, - } -} - -// NewSearchProductionAdObjectsParamsWithHTTPClient creates a new SearchProductionAdObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchProductionAdObjectsParamsWithHTTPClient(client *http.Client) *SearchProductionAdObjectsParams { - return &SearchProductionAdObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchProductionAdObjectsParams contains all the parameters to send to the API endpoint - - for the search production ad objects operation. - - Typically these are written to a http.Request. -*/ -type SearchProductionAdObjectsParams struct { - - /* Body. - - Specifies the Request to search the AD Objects from Production AD. - */ - Body *models.SearchProductionAdObjectsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search production ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProductionAdObjectsParams) WithDefaults() *SearchProductionAdObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search production ad objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProductionAdObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search production ad objects params -func (o *SearchProductionAdObjectsParams) WithTimeout(timeout time.Duration) *SearchProductionAdObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search production ad objects params -func (o *SearchProductionAdObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search production ad objects params -func (o *SearchProductionAdObjectsParams) WithContext(ctx context.Context) *SearchProductionAdObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search production ad objects params -func (o *SearchProductionAdObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search production ad objects params -func (o *SearchProductionAdObjectsParams) WithHTTPClient(client *http.Client) *SearchProductionAdObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search production ad objects params -func (o *SearchProductionAdObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the search production ad objects params -func (o *SearchProductionAdObjectsParams) WithBody(body *models.SearchProductionAdObjectsRequest) *SearchProductionAdObjectsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the search production ad objects params -func (o *SearchProductionAdObjectsParams) SetBody(body *models.SearchProductionAdObjectsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchProductionAdObjectsParams) 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/restore_tasks/search_production_ad_objects_responses.go b/v1/client/restore_tasks/search_production_ad_objects_responses.go deleted file mode 100644 index b79b01b8..00000000 --- a/v1/client/restore_tasks/search_production_ad_objects_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchProductionAdObjectsReader is a Reader for the SearchProductionAdObjects structure. -type SearchProductionAdObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchProductionAdObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchProductionAdObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchProductionAdObjectsDefault(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 - } -} - -// NewSearchProductionAdObjectsOK creates a SearchProductionAdObjectsOK with default headers values -func NewSearchProductionAdObjectsOK() *SearchProductionAdObjectsOK { - return &SearchProductionAdObjectsOK{} -} - -/* -SearchProductionAdObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchProductionAdObjectsOK struct { - Payload []*models.ADObject -} - -// IsSuccess returns true when this search production ad objects o k response has a 2xx status code -func (o *SearchProductionAdObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search production ad objects o k response has a 3xx status code -func (o *SearchProductionAdObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search production ad objects o k response has a 4xx status code -func (o *SearchProductionAdObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search production ad objects o k response has a 5xx status code -func (o *SearchProductionAdObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search production ad objects o k response a status code equal to that given -func (o *SearchProductionAdObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search production ad objects o k response -func (o *SearchProductionAdObjectsOK) Code() int { - return 200 -} - -func (o *SearchProductionAdObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjects][%d] searchProductionAdObjectsOK %s", 200, payload) -} - -func (o *SearchProductionAdObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjects][%d] searchProductionAdObjectsOK %s", 200, payload) -} - -func (o *SearchProductionAdObjectsOK) GetPayload() []*models.ADObject { - return o.Payload -} - -func (o *SearchProductionAdObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchProductionAdObjectsDefault creates a SearchProductionAdObjectsDefault with default headers values -func NewSearchProductionAdObjectsDefault(code int) *SearchProductionAdObjectsDefault { - return &SearchProductionAdObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchProductionAdObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchProductionAdObjectsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search production ad objects default response has a 2xx status code -func (o *SearchProductionAdObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search production ad objects default response has a 3xx status code -func (o *SearchProductionAdObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search production ad objects default response has a 4xx status code -func (o *SearchProductionAdObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search production ad objects default response has a 5xx status code -func (o *SearchProductionAdObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search production ad objects default response a status code equal to that given -func (o *SearchProductionAdObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search production ad objects default response -func (o *SearchProductionAdObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchProductionAdObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjects][%d] SearchProductionAdObjects default %s", o._statusCode, payload) -} - -func (o *SearchProductionAdObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/restore/adObjects][%d] SearchProductionAdObjects default %s", o._statusCode, payload) -} - -func (o *SearchProductionAdObjectsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchProductionAdObjectsDefault) 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/restore_tasks/search_restored_files_parameters.go b/v1/client/restore_tasks/search_restored_files_parameters.go deleted file mode 100644 index 83c5066d..00000000 --- a/v1/client/restore_tasks/search_restored_files_parameters.go +++ /dev/null @@ -1,875 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/go-openapi/swag" -) - -// NewSearchRestoredFilesParams creates a new SearchRestoredFilesParams 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 NewSearchRestoredFilesParams() *SearchRestoredFilesParams { - return &SearchRestoredFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchRestoredFilesParamsWithTimeout creates a new SearchRestoredFilesParams object -// with the ability to set a timeout on a request. -func NewSearchRestoredFilesParamsWithTimeout(timeout time.Duration) *SearchRestoredFilesParams { - return &SearchRestoredFilesParams{ - timeout: timeout, - } -} - -// NewSearchRestoredFilesParamsWithContext creates a new SearchRestoredFilesParams object -// with the ability to set a context for a request. -func NewSearchRestoredFilesParamsWithContext(ctx context.Context) *SearchRestoredFilesParams { - return &SearchRestoredFilesParams{ - Context: ctx, - } -} - -// NewSearchRestoredFilesParamsWithHTTPClient creates a new SearchRestoredFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchRestoredFilesParamsWithHTTPClient(client *http.Client) *SearchRestoredFilesParams { - return &SearchRestoredFilesParams{ - HTTPClient: client, - } -} - -/* -SearchRestoredFilesParams contains all the parameters to send to the API endpoint - - for the search restored files operation. - - Typically these are written to a http.Request. -*/ -type SearchRestoredFilesParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. - Only items from the specified environment types are returned. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - */ - Environments []string - - /* FolderOnly. - - Filter by folders or files. If true, only folders are returned. - If false, only files are returned. If not specified, both - files and folders are returned. - */ - FolderOnly *bool - - /* JobIds. - - Filter by a list of Protection Job ids. - Only items backed up by the specified Jobs are listed. - */ - JobIds []int64 - - /* MightHaveSnapshotTags. - - Specifies list of snapshot tags, one of which might be present in the - document. These are OR'ed together and the resulting criteria AND'ed - with the rest of the query. - */ - MightHaveSnapshotTags []string - - /* MightHaveTags. - - Specifies list of tags, one of which might be present in the document. - These are OR'ed together and the resulting criteria AND'ed with the - rest of the query. - */ - MightHaveTags []string - - /* MustHaveSnapshotTags. - - Specifies snapshot tags which must be all present in the document. - */ - MustHaveSnapshotTags []string - - /* MustHaveTags. - - Specifies tags which must be all present in the document. - */ - MustHaveTags []string - - /* PageCount. - - Limit the number of items to return in the response for pagination - purposes. - - Format: int64 - */ - PageCount *int64 - - /* PageSize. - - Specifies pagesize for pagination. Only valid for librarian queries. - Effective only when Paginate is set to true. - - Format: int32 - */ - PageSize *int32 - - /* Paginate. - - Specifies bool to control pagination of search results. Only valid - for librarian queries. If this is set to true and a pagination cookie - is provided, search will be resumed. - */ - Paginate *bool - - /* PaginationCookie. - - Specifies cookie for resuming search if pagination is being used. Only - valid for librarian queries. Effective only when Paginate is set to true. - */ - PaginationCookie *string - - /* RegisteredSourceIds. - - Filter by a list of Registered Sources ids. Only items - from the listed Registered Sources are returned. - */ - RegisteredSourceIds []int64 - - /* Search. - - Filter by searching for sub-strings in the item name. The specified - string can match any part of the item name. - For example: "vm" or "123" both match the item name of "vm-123". - */ - Search *string - - /* SourceIds. - - Filter by source ids. Only files and folders found in the listed sources - (such as VMs) are returned. - */ - SourceIds []int64 - - /* StartIndex. - - Specifies an index number that can be used to return subsets of items - in multiple requests. - Break up the items to return into multiple requests - by setting pageCount and using startIndex to return a subsets of items. - For example, set startIndex to 0 to get the first set of items - for the first request. Increment startIndex by pageCount - to get the next set of items for a next request. - Continue until all items are returned and therefore the total number of - returned items is equal to totalCount. - - Format: int64 - */ - StartIndex *int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* ViewBoxIds. - - Filter by a list of Domains (View Boxes) ids. - Only items stored in the listed Domains (View Boxes) are returned. - */ - ViewBoxIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search restored files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchRestoredFilesParams) WithDefaults() *SearchRestoredFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search restored files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchRestoredFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search restored files params -func (o *SearchRestoredFilesParams) WithTimeout(timeout time.Duration) *SearchRestoredFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search restored files params -func (o *SearchRestoredFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search restored files params -func (o *SearchRestoredFilesParams) WithContext(ctx context.Context) *SearchRestoredFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search restored files params -func (o *SearchRestoredFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search restored files params -func (o *SearchRestoredFilesParams) WithHTTPClient(client *http.Client) *SearchRestoredFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search restored files params -func (o *SearchRestoredFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the search restored files params -func (o *SearchRestoredFilesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *SearchRestoredFilesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the search restored files params -func (o *SearchRestoredFilesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEnvironments adds the environments to the search restored files params -func (o *SearchRestoredFilesParams) WithEnvironments(environments []string) *SearchRestoredFilesParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the search restored files params -func (o *SearchRestoredFilesParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithFolderOnly adds the folderOnly to the search restored files params -func (o *SearchRestoredFilesParams) WithFolderOnly(folderOnly *bool) *SearchRestoredFilesParams { - o.SetFolderOnly(folderOnly) - return o -} - -// SetFolderOnly adds the folderOnly to the search restored files params -func (o *SearchRestoredFilesParams) SetFolderOnly(folderOnly *bool) { - o.FolderOnly = folderOnly -} - -// WithJobIds adds the jobIds to the search restored files params -func (o *SearchRestoredFilesParams) WithJobIds(jobIds []int64) *SearchRestoredFilesParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the search restored files params -func (o *SearchRestoredFilesParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithMightHaveSnapshotTags adds the mightHaveSnapshotTags to the search restored files params -func (o *SearchRestoredFilesParams) WithMightHaveSnapshotTags(mightHaveSnapshotTags []string) *SearchRestoredFilesParams { - o.SetMightHaveSnapshotTags(mightHaveSnapshotTags) - return o -} - -// SetMightHaveSnapshotTags adds the mightHaveSnapshotTags to the search restored files params -func (o *SearchRestoredFilesParams) SetMightHaveSnapshotTags(mightHaveSnapshotTags []string) { - o.MightHaveSnapshotTags = mightHaveSnapshotTags -} - -// WithMightHaveTags adds the mightHaveTags to the search restored files params -func (o *SearchRestoredFilesParams) WithMightHaveTags(mightHaveTags []string) *SearchRestoredFilesParams { - o.SetMightHaveTags(mightHaveTags) - return o -} - -// SetMightHaveTags adds the mightHaveTags to the search restored files params -func (o *SearchRestoredFilesParams) SetMightHaveTags(mightHaveTags []string) { - o.MightHaveTags = mightHaveTags -} - -// WithMustHaveSnapshotTags adds the mustHaveSnapshotTags to the search restored files params -func (o *SearchRestoredFilesParams) WithMustHaveSnapshotTags(mustHaveSnapshotTags []string) *SearchRestoredFilesParams { - o.SetMustHaveSnapshotTags(mustHaveSnapshotTags) - return o -} - -// SetMustHaveSnapshotTags adds the mustHaveSnapshotTags to the search restored files params -func (o *SearchRestoredFilesParams) SetMustHaveSnapshotTags(mustHaveSnapshotTags []string) { - o.MustHaveSnapshotTags = mustHaveSnapshotTags -} - -// WithMustHaveTags adds the mustHaveTags to the search restored files params -func (o *SearchRestoredFilesParams) WithMustHaveTags(mustHaveTags []string) *SearchRestoredFilesParams { - o.SetMustHaveTags(mustHaveTags) - return o -} - -// SetMustHaveTags adds the mustHaveTags to the search restored files params -func (o *SearchRestoredFilesParams) SetMustHaveTags(mustHaveTags []string) { - o.MustHaveTags = mustHaveTags -} - -// WithPageCount adds the pageCount to the search restored files params -func (o *SearchRestoredFilesParams) WithPageCount(pageCount *int64) *SearchRestoredFilesParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the search restored files params -func (o *SearchRestoredFilesParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithPageSize adds the pageSize to the search restored files params -func (o *SearchRestoredFilesParams) WithPageSize(pageSize *int32) *SearchRestoredFilesParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the search restored files params -func (o *SearchRestoredFilesParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPaginate adds the paginate to the search restored files params -func (o *SearchRestoredFilesParams) WithPaginate(paginate *bool) *SearchRestoredFilesParams { - o.SetPaginate(paginate) - return o -} - -// SetPaginate adds the paginate to the search restored files params -func (o *SearchRestoredFilesParams) SetPaginate(paginate *bool) { - o.Paginate = paginate -} - -// WithPaginationCookie adds the paginationCookie to the search restored files params -func (o *SearchRestoredFilesParams) WithPaginationCookie(paginationCookie *string) *SearchRestoredFilesParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the search restored files params -func (o *SearchRestoredFilesParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithRegisteredSourceIds adds the registeredSourceIds to the search restored files params -func (o *SearchRestoredFilesParams) WithRegisteredSourceIds(registeredSourceIds []int64) *SearchRestoredFilesParams { - o.SetRegisteredSourceIds(registeredSourceIds) - return o -} - -// SetRegisteredSourceIds adds the registeredSourceIds to the search restored files params -func (o *SearchRestoredFilesParams) SetRegisteredSourceIds(registeredSourceIds []int64) { - o.RegisteredSourceIds = registeredSourceIds -} - -// WithSearch adds the search to the search restored files params -func (o *SearchRestoredFilesParams) WithSearch(search *string) *SearchRestoredFilesParams { - o.SetSearch(search) - return o -} - -// SetSearch adds the search to the search restored files params -func (o *SearchRestoredFilesParams) SetSearch(search *string) { - o.Search = search -} - -// WithSourceIds adds the sourceIds to the search restored files params -func (o *SearchRestoredFilesParams) WithSourceIds(sourceIds []int64) *SearchRestoredFilesParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the search restored files params -func (o *SearchRestoredFilesParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WithStartIndex adds the startIndex to the search restored files params -func (o *SearchRestoredFilesParams) WithStartIndex(startIndex *int64) *SearchRestoredFilesParams { - o.SetStartIndex(startIndex) - return o -} - -// SetStartIndex adds the startIndex to the search restored files params -func (o *SearchRestoredFilesParams) SetStartIndex(startIndex *int64) { - o.StartIndex = startIndex -} - -// WithTenantID adds the tenantID to the search restored files params -func (o *SearchRestoredFilesParams) WithTenantID(tenantID *string) *SearchRestoredFilesParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the search restored files params -func (o *SearchRestoredFilesParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithViewBoxIds adds the viewBoxIds to the search restored files params -func (o *SearchRestoredFilesParams) WithViewBoxIds(viewBoxIds []int64) *SearchRestoredFilesParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the search restored files params -func (o *SearchRestoredFilesParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchRestoredFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.FolderOnly != nil { - - // query param folderOnly - var qrFolderOnly bool - - if o.FolderOnly != nil { - qrFolderOnly = *o.FolderOnly - } - qFolderOnly := swag.FormatBool(qrFolderOnly) - if qFolderOnly != "" { - - if err := r.SetQueryParam("folderOnly", qFolderOnly); err != nil { - return err - } - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.MightHaveSnapshotTags != nil { - - // binding items for mightHaveSnapshotTags - joinedMightHaveSnapshotTags := o.bindParamMightHaveSnapshotTags(reg) - - // query array param mightHaveSnapshotTags - if err := r.SetQueryParam("mightHaveSnapshotTags", joinedMightHaveSnapshotTags...); err != nil { - return err - } - } - - if o.MightHaveTags != nil { - - // binding items for mightHaveTags - joinedMightHaveTags := o.bindParamMightHaveTags(reg) - - // query array param mightHaveTags - if err := r.SetQueryParam("mightHaveTags", joinedMightHaveTags...); err != nil { - return err - } - } - - if o.MustHaveSnapshotTags != nil { - - // binding items for mustHaveSnapshotTags - joinedMustHaveSnapshotTags := o.bindParamMustHaveSnapshotTags(reg) - - // query array param mustHaveSnapshotTags - if err := r.SetQueryParam("mustHaveSnapshotTags", joinedMustHaveSnapshotTags...); err != nil { - return err - } - } - - if o.MustHaveTags != nil { - - // binding items for mustHaveTags - joinedMustHaveTags := o.bindParamMustHaveTags(reg) - - // query array param mustHaveTags - if err := r.SetQueryParam("mustHaveTags", joinedMustHaveTags...); err != nil { - return err - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.PageSize != nil { - - // query param pageSize - var qrPageSize int32 - - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - - if err := r.SetQueryParam("pageSize", qPageSize); err != nil { - return err - } - } - } - - if o.Paginate != nil { - - // query param paginate - var qrPaginate bool - - if o.Paginate != nil { - qrPaginate = *o.Paginate - } - qPaginate := swag.FormatBool(qrPaginate) - if qPaginate != "" { - - if err := r.SetQueryParam("paginate", qPaginate); err != nil { - return err - } - } - } - - 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.RegisteredSourceIds != nil { - - // binding items for registeredSourceIds - joinedRegisteredSourceIds := o.bindParamRegisteredSourceIds(reg) - - // query array param registeredSourceIds - if err := r.SetQueryParam("registeredSourceIds", joinedRegisteredSourceIds...); err != nil { - return err - } - } - - if o.Search != nil { - - // query param search - var qrSearch string - - if o.Search != nil { - qrSearch = *o.Search - } - qSearch := qrSearch - if qSearch != "" { - - if err := r.SetQueryParam("search", qSearch); err != nil { - return err - } - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if o.StartIndex != nil { - - // query param startIndex - var qrStartIndex int64 - - if o.StartIndex != nil { - qrStartIndex = *o.StartIndex - } - qStartIndex := swag.FormatInt64(qrStartIndex) - if qStartIndex != "" { - - if err := r.SetQueryParam("startIndex", qStartIndex); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchRestoredFiles binds the parameter environments -func (o *SearchRestoredFilesParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamSearchRestoredFiles binds the parameter jobIds -func (o *SearchRestoredFilesParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamSearchRestoredFiles binds the parameter mightHaveSnapshotTags -func (o *SearchRestoredFilesParams) bindParamMightHaveSnapshotTags(formats strfmt.Registry) []string { - mightHaveSnapshotTagsIR := o.MightHaveSnapshotTags - - var mightHaveSnapshotTagsIC []string - for _, mightHaveSnapshotTagsIIR := range mightHaveSnapshotTagsIR { // explode []string - - mightHaveSnapshotTagsIIV := mightHaveSnapshotTagsIIR // string as string - mightHaveSnapshotTagsIC = append(mightHaveSnapshotTagsIC, mightHaveSnapshotTagsIIV) - } - - // items.CollectionFormat: "" - mightHaveSnapshotTagsIS := swag.JoinByFormat(mightHaveSnapshotTagsIC, "") - - return mightHaveSnapshotTagsIS -} - -// bindParamSearchRestoredFiles binds the parameter mightHaveTags -func (o *SearchRestoredFilesParams) bindParamMightHaveTags(formats strfmt.Registry) []string { - mightHaveTagsIR := o.MightHaveTags - - var mightHaveTagsIC []string - for _, mightHaveTagsIIR := range mightHaveTagsIR { // explode []string - - mightHaveTagsIIV := mightHaveTagsIIR // string as string - mightHaveTagsIC = append(mightHaveTagsIC, mightHaveTagsIIV) - } - - // items.CollectionFormat: "" - mightHaveTagsIS := swag.JoinByFormat(mightHaveTagsIC, "") - - return mightHaveTagsIS -} - -// bindParamSearchRestoredFiles binds the parameter mustHaveSnapshotTags -func (o *SearchRestoredFilesParams) bindParamMustHaveSnapshotTags(formats strfmt.Registry) []string { - mustHaveSnapshotTagsIR := o.MustHaveSnapshotTags - - var mustHaveSnapshotTagsIC []string - for _, mustHaveSnapshotTagsIIR := range mustHaveSnapshotTagsIR { // explode []string - - mustHaveSnapshotTagsIIV := mustHaveSnapshotTagsIIR // string as string - mustHaveSnapshotTagsIC = append(mustHaveSnapshotTagsIC, mustHaveSnapshotTagsIIV) - } - - // items.CollectionFormat: "" - mustHaveSnapshotTagsIS := swag.JoinByFormat(mustHaveSnapshotTagsIC, "") - - return mustHaveSnapshotTagsIS -} - -// bindParamSearchRestoredFiles binds the parameter mustHaveTags -func (o *SearchRestoredFilesParams) bindParamMustHaveTags(formats strfmt.Registry) []string { - mustHaveTagsIR := o.MustHaveTags - - var mustHaveTagsIC []string - for _, mustHaveTagsIIR := range mustHaveTagsIR { // explode []string - - mustHaveTagsIIV := mustHaveTagsIIR // string as string - mustHaveTagsIC = append(mustHaveTagsIC, mustHaveTagsIIV) - } - - // items.CollectionFormat: "" - mustHaveTagsIS := swag.JoinByFormat(mustHaveTagsIC, "") - - return mustHaveTagsIS -} - -// bindParamSearchRestoredFiles binds the parameter registeredSourceIds -func (o *SearchRestoredFilesParams) bindParamRegisteredSourceIds(formats strfmt.Registry) []string { - registeredSourceIdsIR := o.RegisteredSourceIds - - var registeredSourceIdsIC []string - for _, registeredSourceIdsIIR := range registeredSourceIdsIR { // explode []int64 - - registeredSourceIdsIIV := swag.FormatInt64(registeredSourceIdsIIR) // int64 as string - registeredSourceIdsIC = append(registeredSourceIdsIC, registeredSourceIdsIIV) - } - - // items.CollectionFormat: "" - registeredSourceIdsIS := swag.JoinByFormat(registeredSourceIdsIC, "") - - return registeredSourceIdsIS -} - -// bindParamSearchRestoredFiles binds the parameter sourceIds -func (o *SearchRestoredFilesParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} - -// bindParamSearchRestoredFiles binds the parameter viewBoxIds -func (o *SearchRestoredFilesParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/restore_tasks/search_restored_files_responses.go b/v1/client/restore_tasks/search_restored_files_responses.go deleted file mode 100644 index 2139f8d5..00000000 --- a/v1/client/restore_tasks/search_restored_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchRestoredFilesReader is a Reader for the SearchRestoredFiles structure. -type SearchRestoredFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchRestoredFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchRestoredFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchRestoredFilesDefault(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 - } -} - -// NewSearchRestoredFilesOK creates a SearchRestoredFilesOK with default headers values -func NewSearchRestoredFilesOK() *SearchRestoredFilesOK { - return &SearchRestoredFilesOK{} -} - -/* -SearchRestoredFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchRestoredFilesOK struct { - Payload *models.FileSearchResults -} - -// IsSuccess returns true when this search restored files o k response has a 2xx status code -func (o *SearchRestoredFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search restored files o k response has a 3xx status code -func (o *SearchRestoredFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search restored files o k response has a 4xx status code -func (o *SearchRestoredFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search restored files o k response has a 5xx status code -func (o *SearchRestoredFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search restored files o k response a status code equal to that given -func (o *SearchRestoredFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search restored files o k response -func (o *SearchRestoredFilesOK) Code() int { - return 200 -} - -func (o *SearchRestoredFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files][%d] searchRestoredFilesOK %s", 200, payload) -} - -func (o *SearchRestoredFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files][%d] searchRestoredFilesOK %s", 200, payload) -} - -func (o *SearchRestoredFilesOK) GetPayload() *models.FileSearchResults { - return o.Payload -} - -func (o *SearchRestoredFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileSearchResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchRestoredFilesDefault creates a SearchRestoredFilesDefault with default headers values -func NewSearchRestoredFilesDefault(code int) *SearchRestoredFilesDefault { - return &SearchRestoredFilesDefault{ - _statusCode: code, - } -} - -/* -SearchRestoredFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchRestoredFilesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search restored files default response has a 2xx status code -func (o *SearchRestoredFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search restored files default response has a 3xx status code -func (o *SearchRestoredFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search restored files default response has a 4xx status code -func (o *SearchRestoredFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search restored files default response has a 5xx status code -func (o *SearchRestoredFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search restored files default response a status code equal to that given -func (o *SearchRestoredFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search restored files default response -func (o *SearchRestoredFilesDefault) Code() int { - return o._statusCode -} - -func (o *SearchRestoredFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files][%d] SearchRestoredFiles default %s", o._statusCode, payload) -} - -func (o *SearchRestoredFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/restore/files][%d] SearchRestoredFiles default %s", o._statusCode, payload) -} - -func (o *SearchRestoredFilesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchRestoredFilesDefault) 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/restore_tasks/update_restore_task_parameters.go b/v1/client/restore_tasks/update_restore_task_parameters.go deleted file mode 100644 index 253cd661..00000000 --- a/v1/client/restore_tasks/update_restore_task_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateRestoreTaskParams creates a new UpdateRestoreTaskParams 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 NewUpdateRestoreTaskParams() *UpdateRestoreTaskParams { - return &UpdateRestoreTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRestoreTaskParamsWithTimeout creates a new UpdateRestoreTaskParams object -// with the ability to set a timeout on a request. -func NewUpdateRestoreTaskParamsWithTimeout(timeout time.Duration) *UpdateRestoreTaskParams { - return &UpdateRestoreTaskParams{ - timeout: timeout, - } -} - -// NewUpdateRestoreTaskParamsWithContext creates a new UpdateRestoreTaskParams object -// with the ability to set a context for a request. -func NewUpdateRestoreTaskParamsWithContext(ctx context.Context) *UpdateRestoreTaskParams { - return &UpdateRestoreTaskParams{ - Context: ctx, - } -} - -// NewUpdateRestoreTaskParamsWithHTTPClient creates a new UpdateRestoreTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRestoreTaskParamsWithHTTPClient(client *http.Client) *UpdateRestoreTaskParams { - return &UpdateRestoreTaskParams{ - HTTPClient: client, - } -} - -/* -UpdateRestoreTaskParams contains all the parameters to send to the API endpoint - - for the update restore task operation. - - Typically these are written to a http.Request. -*/ -type UpdateRestoreTaskParams struct { - - // Body. - Body *models.UpdateRestoreTaskParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRestoreTaskParams) WithDefaults() *UpdateRestoreTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update restore task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRestoreTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update restore task params -func (o *UpdateRestoreTaskParams) WithTimeout(timeout time.Duration) *UpdateRestoreTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update restore task params -func (o *UpdateRestoreTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update restore task params -func (o *UpdateRestoreTaskParams) WithContext(ctx context.Context) *UpdateRestoreTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update restore task params -func (o *UpdateRestoreTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update restore task params -func (o *UpdateRestoreTaskParams) WithHTTPClient(client *http.Client) *UpdateRestoreTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update restore task params -func (o *UpdateRestoreTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update restore task params -func (o *UpdateRestoreTaskParams) WithBody(body *models.UpdateRestoreTaskParams) *UpdateRestoreTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update restore task params -func (o *UpdateRestoreTaskParams) SetBody(body *models.UpdateRestoreTaskParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRestoreTaskParams) 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/restore_tasks/update_restore_task_responses.go b/v1/client/restore_tasks/update_restore_task_responses.go deleted file mode 100644 index 6efa60cb..00000000 --- a/v1/client/restore_tasks/update_restore_task_responses.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restore_tasks - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateRestoreTaskReader is a Reader for the UpdateRestoreTask structure. -type UpdateRestoreTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRestoreTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRestoreTaskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRestoreTaskDefault(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 - } -} - -// NewUpdateRestoreTaskOK creates a UpdateRestoreTaskOK with default headers values -func NewUpdateRestoreTaskOK() *UpdateRestoreTaskOK { - return &UpdateRestoreTaskOK{} -} - -/* - UpdateRestoreTaskOK describes a response with status code 200, with default header values. - - Specifies the response of the UpdateRestoreTask API. - -Success -*/ -type UpdateRestoreTaskOK struct { - Payload *models.RestoreTask -} - -// IsSuccess returns true when this update restore task o k response has a 2xx status code -func (o *UpdateRestoreTaskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update restore task o k response has a 3xx status code -func (o *UpdateRestoreTaskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update restore task o k response has a 4xx status code -func (o *UpdateRestoreTaskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update restore task o k response has a 5xx status code -func (o *UpdateRestoreTaskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update restore task o k response a status code equal to that given -func (o *UpdateRestoreTaskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update restore task o k response -func (o *UpdateRestoreTaskOK) Code() int { - return 200 -} - -func (o *UpdateRestoreTaskOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/recover][%d] updateRestoreTaskOK %s", 200, payload) -} - -func (o *UpdateRestoreTaskOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/recover][%d] updateRestoreTaskOK %s", 200, payload) -} - -func (o *UpdateRestoreTaskOK) GetPayload() *models.RestoreTask { - return o.Payload -} - -func (o *UpdateRestoreTaskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRestoreTaskDefault creates a UpdateRestoreTaskDefault with default headers values -func NewUpdateRestoreTaskDefault(code int) *UpdateRestoreTaskDefault { - return &UpdateRestoreTaskDefault{ - _statusCode: code, - } -} - -/* -UpdateRestoreTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRestoreTaskDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update restore task default response has a 2xx status code -func (o *UpdateRestoreTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update restore task default response has a 3xx status code -func (o *UpdateRestoreTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update restore task default response has a 4xx status code -func (o *UpdateRestoreTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update restore task default response has a 5xx status code -func (o *UpdateRestoreTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update restore task default response a status code equal to that given -func (o *UpdateRestoreTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update restore task default response -func (o *UpdateRestoreTaskDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRestoreTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/recover][%d] UpdateRestoreTask default %s", o._statusCode, payload) -} - -func (o *UpdateRestoreTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/restore/recover][%d] UpdateRestoreTask default %s", o._statusCode, payload) -} - -func (o *UpdateRestoreTaskDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateRestoreTaskDefault) 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/roles/create_role_parameters.go b/v1/client/roles/create_role_parameters.go deleted file mode 100644 index cd5d753a..00000000 --- a/v1/client/roles/create_role_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateRoleParams creates a new CreateRoleParams 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 NewCreateRoleParams() *CreateRoleParams { - return &CreateRoleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRoleParamsWithTimeout creates a new CreateRoleParams object -// with the ability to set a timeout on a request. -func NewCreateRoleParamsWithTimeout(timeout time.Duration) *CreateRoleParams { - return &CreateRoleParams{ - timeout: timeout, - } -} - -// NewCreateRoleParamsWithContext creates a new CreateRoleParams object -// with the ability to set a context for a request. -func NewCreateRoleParamsWithContext(ctx context.Context) *CreateRoleParams { - return &CreateRoleParams{ - Context: ctx, - } -} - -// NewCreateRoleParamsWithHTTPClient creates a new CreateRoleParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRoleParamsWithHTTPClient(client *http.Client) *CreateRoleParams { - return &CreateRoleParams{ - HTTPClient: client, - } -} - -/* -CreateRoleParams contains all the parameters to send to the API endpoint - - for the create role operation. - - Typically these are written to a http.Request. -*/ -type CreateRoleParams struct { - - /* Body. - - Request to create a new custom Role. - */ - Body *models.RoleCreateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRoleParams) WithDefaults() *CreateRoleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRoleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create role params -func (o *CreateRoleParams) WithTimeout(timeout time.Duration) *CreateRoleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create role params -func (o *CreateRoleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create role params -func (o *CreateRoleParams) WithContext(ctx context.Context) *CreateRoleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create role params -func (o *CreateRoleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create role params -func (o *CreateRoleParams) WithHTTPClient(client *http.Client) *CreateRoleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create role params -func (o *CreateRoleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create role params -func (o *CreateRoleParams) WithBody(body *models.RoleCreateParameters) *CreateRoleParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create role params -func (o *CreateRoleParams) SetBody(body *models.RoleCreateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRoleParams) 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/roles/create_role_responses.go b/v1/client/roles/create_role_responses.go deleted file mode 100644 index ef303b18..00000000 --- a/v1/client/roles/create_role_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateRoleReader is a Reader for the CreateRole structure. -type CreateRoleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRoleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRoleCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRoleDefault(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 - } -} - -// NewCreateRoleCreated creates a CreateRoleCreated with default headers values -func NewCreateRoleCreated() *CreateRoleCreated { - return &CreateRoleCreated{} -} - -/* -CreateRoleCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRoleCreated struct { - Payload *models.Role -} - -// IsSuccess returns true when this create role created response has a 2xx status code -func (o *CreateRoleCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create role created response has a 3xx status code -func (o *CreateRoleCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create role created response has a 4xx status code -func (o *CreateRoleCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create role created response has a 5xx status code -func (o *CreateRoleCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create role created response a status code equal to that given -func (o *CreateRoleCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create role created response -func (o *CreateRoleCreated) Code() int { - return 201 -} - -func (o *CreateRoleCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/roles][%d] createRoleCreated %s", 201, payload) -} - -func (o *CreateRoleCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/roles][%d] createRoleCreated %s", 201, payload) -} - -func (o *CreateRoleCreated) GetPayload() *models.Role { - return o.Payload -} - -func (o *CreateRoleCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Role) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRoleDefault creates a CreateRoleDefault with default headers values -func NewCreateRoleDefault(code int) *CreateRoleDefault { - return &CreateRoleDefault{ - _statusCode: code, - } -} - -/* -CreateRoleDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRoleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create role default response has a 2xx status code -func (o *CreateRoleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create role default response has a 3xx status code -func (o *CreateRoleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create role default response has a 4xx status code -func (o *CreateRoleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create role default response has a 5xx status code -func (o *CreateRoleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create role default response a status code equal to that given -func (o *CreateRoleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create role default response -func (o *CreateRoleDefault) Code() int { - return o._statusCode -} - -func (o *CreateRoleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/roles][%d] CreateRole default %s", o._statusCode, payload) -} - -func (o *CreateRoleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/roles][%d] CreateRole default %s", o._statusCode, payload) -} - -func (o *CreateRoleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateRoleDefault) 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/roles/delete_roles_parameters.go b/v1/client/roles/delete_roles_parameters.go deleted file mode 100644 index 02955195..00000000 --- a/v1/client/roles/delete_roles_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteRolesParams creates a new DeleteRolesParams 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 NewDeleteRolesParams() *DeleteRolesParams { - return &DeleteRolesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRolesParamsWithTimeout creates a new DeleteRolesParams object -// with the ability to set a timeout on a request. -func NewDeleteRolesParamsWithTimeout(timeout time.Duration) *DeleteRolesParams { - return &DeleteRolesParams{ - timeout: timeout, - } -} - -// NewDeleteRolesParamsWithContext creates a new DeleteRolesParams object -// with the ability to set a context for a request. -func NewDeleteRolesParamsWithContext(ctx context.Context) *DeleteRolesParams { - return &DeleteRolesParams{ - Context: ctx, - } -} - -// NewDeleteRolesParamsWithHTTPClient creates a new DeleteRolesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRolesParamsWithHTTPClient(client *http.Client) *DeleteRolesParams { - return &DeleteRolesParams{ - HTTPClient: client, - } -} - -/* -DeleteRolesParams contains all the parameters to send to the API endpoint - - for the delete roles operation. - - Typically these are written to a http.Request. -*/ -type DeleteRolesParams struct { - - /* Body. - - Request to delete one or more Roles. - */ - Body *models.RoleDeleteParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRolesParams) WithDefaults() *DeleteRolesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRolesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete roles params -func (o *DeleteRolesParams) WithTimeout(timeout time.Duration) *DeleteRolesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete roles params -func (o *DeleteRolesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete roles params -func (o *DeleteRolesParams) WithContext(ctx context.Context) *DeleteRolesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete roles params -func (o *DeleteRolesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete roles params -func (o *DeleteRolesParams) WithHTTPClient(client *http.Client) *DeleteRolesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete roles params -func (o *DeleteRolesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete roles params -func (o *DeleteRolesParams) WithBody(body *models.RoleDeleteParameters) *DeleteRolesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete roles params -func (o *DeleteRolesParams) SetBody(body *models.RoleDeleteParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRolesParams) 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/roles/delete_roles_responses.go b/v1/client/roles/delete_roles_responses.go deleted file mode 100644 index af38057b..00000000 --- a/v1/client/roles/delete_roles_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteRolesReader is a Reader for the DeleteRoles structure. -type DeleteRolesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRolesNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRolesDefault(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 - } -} - -// NewDeleteRolesNoContent creates a DeleteRolesNoContent with default headers values -func NewDeleteRolesNoContent() *DeleteRolesNoContent { - return &DeleteRolesNoContent{} -} - -/* -DeleteRolesNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRolesNoContent struct { -} - -// IsSuccess returns true when this delete roles no content response has a 2xx status code -func (o *DeleteRolesNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete roles no content response has a 3xx status code -func (o *DeleteRolesNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete roles no content response has a 4xx status code -func (o *DeleteRolesNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete roles no content response has a 5xx status code -func (o *DeleteRolesNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete roles no content response a status code equal to that given -func (o *DeleteRolesNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete roles no content response -func (o *DeleteRolesNoContent) Code() int { - return 204 -} - -func (o *DeleteRolesNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/roles][%d] deleteRolesNoContent", 204) -} - -func (o *DeleteRolesNoContent) String() string { - return fmt.Sprintf("[DELETE /public/roles][%d] deleteRolesNoContent", 204) -} - -func (o *DeleteRolesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRolesDefault creates a DeleteRolesDefault with default headers values -func NewDeleteRolesDefault(code int) *DeleteRolesDefault { - return &DeleteRolesDefault{ - _statusCode: code, - } -} - -/* -DeleteRolesDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRolesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete roles default response has a 2xx status code -func (o *DeleteRolesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete roles default response has a 3xx status code -func (o *DeleteRolesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete roles default response has a 4xx status code -func (o *DeleteRolesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete roles default response has a 5xx status code -func (o *DeleteRolesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete roles default response a status code equal to that given -func (o *DeleteRolesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete roles default response -func (o *DeleteRolesDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRolesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/roles][%d] DeleteRoles default %s", o._statusCode, payload) -} - -func (o *DeleteRolesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/roles][%d] DeleteRoles default %s", o._statusCode, payload) -} - -func (o *DeleteRolesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteRolesDefault) 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/roles/get_roles_parameters.go b/v1/client/roles/get_roles_parameters.go deleted file mode 100644 index 2c06d842..00000000 --- a/v1/client/roles/get_roles_parameters.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/go-openapi/swag" -) - -// NewGetRolesParams creates a new GetRolesParams 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 NewGetRolesParams() *GetRolesParams { - return &GetRolesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRolesParamsWithTimeout creates a new GetRolesParams object -// with the ability to set a timeout on a request. -func NewGetRolesParamsWithTimeout(timeout time.Duration) *GetRolesParams { - return &GetRolesParams{ - timeout: timeout, - } -} - -// NewGetRolesParamsWithContext creates a new GetRolesParams object -// with the ability to set a context for a request. -func NewGetRolesParamsWithContext(ctx context.Context) *GetRolesParams { - return &GetRolesParams{ - Context: ctx, - } -} - -// NewGetRolesParamsWithHTTPClient creates a new GetRolesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRolesParamsWithHTTPClient(client *http.Client) *GetRolesParams { - return &GetRolesParams{ - HTTPClient: client, - } -} - -/* -GetRolesParams contains all the parameters to send to the API endpoint - - for the get roles operation. - - Typically these are written to a http.Request. -*/ -type GetRolesParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Name. - - Specifies the name of the role. - */ - Name *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRolesParams) WithDefaults() *GetRolesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRolesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get roles params -func (o *GetRolesParams) WithTimeout(timeout time.Duration) *GetRolesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get roles params -func (o *GetRolesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get roles params -func (o *GetRolesParams) WithContext(ctx context.Context) *GetRolesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get roles params -func (o *GetRolesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get roles params -func (o *GetRolesParams) WithHTTPClient(client *http.Client) *GetRolesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get roles params -func (o *GetRolesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get roles params -func (o *GetRolesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetRolesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get roles params -func (o *GetRolesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithName adds the name to the get roles params -func (o *GetRolesParams) WithName(name *string) *GetRolesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get roles params -func (o *GetRolesParams) SetName(name *string) { - o.Name = name -} - -// WithTenantIds adds the tenantIds to the get roles params -func (o *GetRolesParams) WithTenantIds(tenantIds []string) *GetRolesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get roles params -func (o *GetRolesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRoles binds the parameter tenantIds -func (o *GetRolesParams) 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/v1/client/roles/get_roles_responses.go b/v1/client/roles/get_roles_responses.go deleted file mode 100644 index 80645228..00000000 --- a/v1/client/roles/get_roles_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRolesReader is a Reader for the GetRoles structure. -type GetRolesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRolesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRolesDefault(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 - } -} - -// NewGetRolesOK creates a GetRolesOK with default headers values -func NewGetRolesOK() *GetRolesOK { - return &GetRolesOK{} -} - -/* -GetRolesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRolesOK struct { - Payload []*models.Role -} - -// IsSuccess returns true when this get roles o k response has a 2xx status code -func (o *GetRolesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get roles o k response has a 3xx status code -func (o *GetRolesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get roles o k response has a 4xx status code -func (o *GetRolesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get roles o k response has a 5xx status code -func (o *GetRolesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get roles o k response a status code equal to that given -func (o *GetRolesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get roles o k response -func (o *GetRolesOK) Code() int { - return 200 -} - -func (o *GetRolesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/roles][%d] getRolesOK %s", 200, payload) -} - -func (o *GetRolesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/roles][%d] getRolesOK %s", 200, payload) -} - -func (o *GetRolesOK) GetPayload() []*models.Role { - return o.Payload -} - -func (o *GetRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRolesDefault creates a GetRolesDefault with default headers values -func NewGetRolesDefault(code int) *GetRolesDefault { - return &GetRolesDefault{ - _statusCode: code, - } -} - -/* -GetRolesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRolesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get roles default response has a 2xx status code -func (o *GetRolesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get roles default response has a 3xx status code -func (o *GetRolesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get roles default response has a 4xx status code -func (o *GetRolesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get roles default response has a 5xx status code -func (o *GetRolesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get roles default response a status code equal to that given -func (o *GetRolesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get roles default response -func (o *GetRolesDefault) Code() int { - return o._statusCode -} - -func (o *GetRolesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/roles][%d] GetRoles default %s", o._statusCode, payload) -} - -func (o *GetRolesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/roles][%d] GetRoles default %s", o._statusCode, payload) -} - -func (o *GetRolesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRolesDefault) 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/roles/roles_client.go b/v1/client/roles/roles_client.go deleted file mode 100644 index 1f14e550..00000000 --- a/v1/client/roles/roles_client.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new roles API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new roles API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new roles API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for roles API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error) - - DeleteRoles(params *DeleteRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRolesNoContent, error) - - GetRoles(params *GetRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRolesOK, error) - - UpdateRole(params *UpdateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRoleOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateRole creates a new custom role - - Returns the new custom role that was created. - -A custom role is a user-defined role that is created using the REST API, -the Cohesity Cluster or the CLI. -*/ -func (a *Client) CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRoleParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRole", - Method: "POST", - PathPattern: "/public/roles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRoleReader{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.(*CreateRoleCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRoleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteRoles deletes one or more custom roles - -Returns Success if all the specified Roles are deleted. -*/ -func (a *Client) DeleteRoles(params *DeleteRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRolesNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRolesParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRoles", - Method: "DELETE", - PathPattern: "/public/roles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRolesReader{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.(*DeleteRolesNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRolesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetRoles lists the roles defined on the cohesity cluster - - If the 'name' parameter is not specified, all roles defined on the - -Cohesity Cluster are returned. In addition, information about each role -is returned such as the name, description, assigned privileges, etc. -If an exact role name (such as COHESITY_VIEWER) is specified in the -'name' parameter, only information about that single role is returned. -*/ -func (a *Client) GetRoles(params *GetRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRolesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRolesParams() - } - op := &runtime.ClientOperation{ - ID: "GetRoles", - Method: "GET", - PathPattern: "/public/roles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRolesReader{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.(*GetRolesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRolesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateRole updates a user defined custom role - - For example, you could update the privileges assigned to a Role. - -Returns the updated role. -*/ -func (a *Client) UpdateRole(params *UpdateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRoleOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRoleParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRole", - Method: "PUT", - PathPattern: "/public/roles/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRoleReader{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.(*UpdateRoleOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRoleDefault) - 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/roles/update_role_parameters.go b/v1/client/roles/update_role_parameters.go deleted file mode 100644 index 13812e0e..00000000 --- a/v1/client/roles/update_role_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateRoleParams creates a new UpdateRoleParams 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 NewUpdateRoleParams() *UpdateRoleParams { - return &UpdateRoleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRoleParamsWithTimeout creates a new UpdateRoleParams object -// with the ability to set a timeout on a request. -func NewUpdateRoleParamsWithTimeout(timeout time.Duration) *UpdateRoleParams { - return &UpdateRoleParams{ - timeout: timeout, - } -} - -// NewUpdateRoleParamsWithContext creates a new UpdateRoleParams object -// with the ability to set a context for a request. -func NewUpdateRoleParamsWithContext(ctx context.Context) *UpdateRoleParams { - return &UpdateRoleParams{ - Context: ctx, - } -} - -// NewUpdateRoleParamsWithHTTPClient creates a new UpdateRoleParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRoleParamsWithHTTPClient(client *http.Client) *UpdateRoleParams { - return &UpdateRoleParams{ - HTTPClient: client, - } -} - -/* -UpdateRoleParams contains all the parameters to send to the API endpoint - - for the update role operation. - - Typically these are written to a http.Request. -*/ -type UpdateRoleParams struct { - - /* Body. - - Request to update a custom role. - */ - Body *models.RoleUpdateParameters - - /* Name. - - Specifies the name of the role to update. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRoleParams) WithDefaults() *UpdateRoleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRoleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update role params -func (o *UpdateRoleParams) WithTimeout(timeout time.Duration) *UpdateRoleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update role params -func (o *UpdateRoleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update role params -func (o *UpdateRoleParams) WithContext(ctx context.Context) *UpdateRoleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update role params -func (o *UpdateRoleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update role params -func (o *UpdateRoleParams) WithHTTPClient(client *http.Client) *UpdateRoleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update role params -func (o *UpdateRoleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update role params -func (o *UpdateRoleParams) WithBody(body *models.RoleUpdateParameters) *UpdateRoleParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update role params -func (o *UpdateRoleParams) SetBody(body *models.RoleUpdateParameters) { - o.Body = body -} - -// WithName adds the name to the update role params -func (o *UpdateRoleParams) WithName(name string) *UpdateRoleParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update role params -func (o *UpdateRoleParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRoleParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/roles/update_role_responses.go b/v1/client/roles/update_role_responses.go deleted file mode 100644 index d0addf17..00000000 --- a/v1/client/roles/update_role_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package roles - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateRoleReader is a Reader for the UpdateRole structure. -type UpdateRoleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRoleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRoleOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRoleDefault(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 - } -} - -// NewUpdateRoleOK creates a UpdateRoleOK with default headers values -func NewUpdateRoleOK() *UpdateRoleOK { - return &UpdateRoleOK{} -} - -/* -UpdateRoleOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRoleOK struct { - Payload *models.Role -} - -// IsSuccess returns true when this update role o k response has a 2xx status code -func (o *UpdateRoleOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update role o k response has a 3xx status code -func (o *UpdateRoleOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update role o k response has a 4xx status code -func (o *UpdateRoleOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update role o k response has a 5xx status code -func (o *UpdateRoleOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update role o k response a status code equal to that given -func (o *UpdateRoleOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update role o k response -func (o *UpdateRoleOK) Code() int { - return 200 -} - -func (o *UpdateRoleOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/roles/{name}][%d] updateRoleOK %s", 200, payload) -} - -func (o *UpdateRoleOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/roles/{name}][%d] updateRoleOK %s", 200, payload) -} - -func (o *UpdateRoleOK) GetPayload() *models.Role { - return o.Payload -} - -func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Role) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRoleDefault creates a UpdateRoleDefault with default headers values -func NewUpdateRoleDefault(code int) *UpdateRoleDefault { - return &UpdateRoleDefault{ - _statusCode: code, - } -} - -/* -UpdateRoleDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRoleDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update role default response has a 2xx status code -func (o *UpdateRoleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update role default response has a 3xx status code -func (o *UpdateRoleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update role default response has a 4xx status code -func (o *UpdateRoleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update role default response has a 5xx status code -func (o *UpdateRoleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update role default response a status code equal to that given -func (o *UpdateRoleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update role default response -func (o *UpdateRoleDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRoleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/roles/{name}][%d] UpdateRole default %s", o._statusCode, payload) -} - -func (o *UpdateRoleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/roles/{name}][%d] UpdateRole default %s", o._statusCode, payload) -} - -func (o *UpdateRoleDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateRoleDefault) 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/routes/add_route_parameters.go b/v1/client/routes/add_route_parameters.go deleted file mode 100644 index eac29a9a..00000000 --- a/v1/client/routes/add_route_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewAddRouteParams creates a new AddRouteParams 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 NewAddRouteParams() *AddRouteParams { - return &AddRouteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddRouteParamsWithTimeout creates a new AddRouteParams object -// with the ability to set a timeout on a request. -func NewAddRouteParamsWithTimeout(timeout time.Duration) *AddRouteParams { - return &AddRouteParams{ - timeout: timeout, - } -} - -// NewAddRouteParamsWithContext creates a new AddRouteParams object -// with the ability to set a context for a request. -func NewAddRouteParamsWithContext(ctx context.Context) *AddRouteParams { - return &AddRouteParams{ - Context: ctx, - } -} - -// NewAddRouteParamsWithHTTPClient creates a new AddRouteParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddRouteParamsWithHTTPClient(client *http.Client) *AddRouteParams { - return &AddRouteParams{ - HTTPClient: client, - } -} - -/* -AddRouteParams contains all the parameters to send to the API endpoint - - for the add route operation. - - Typically these are written to a http.Request. -*/ -type AddRouteParams struct { - - // Body. - Body *models.Route - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddRouteParams) WithDefaults() *AddRouteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddRouteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add route params -func (o *AddRouteParams) WithTimeout(timeout time.Duration) *AddRouteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add route params -func (o *AddRouteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add route params -func (o *AddRouteParams) WithContext(ctx context.Context) *AddRouteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add route params -func (o *AddRouteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add route params -func (o *AddRouteParams) WithHTTPClient(client *http.Client) *AddRouteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add route params -func (o *AddRouteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add route params -func (o *AddRouteParams) WithBody(body *models.Route) *AddRouteParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add route params -func (o *AddRouteParams) SetBody(body *models.Route) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddRouteParams) 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/routes/add_route_responses.go b/v1/client/routes/add_route_responses.go deleted file mode 100644 index f296a28a..00000000 --- a/v1/client/routes/add_route_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// AddRouteReader is a Reader for the AddRoute structure. -type AddRouteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAddRouteOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddRouteDefault(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 - } -} - -// NewAddRouteOK creates a AddRouteOK with default headers values -func NewAddRouteOK() *AddRouteOK { - return &AddRouteOK{} -} - -/* -AddRouteOK describes a response with status code 200, with default header values. - -Success -*/ -type AddRouteOK struct { - Payload *models.Route -} - -// IsSuccess returns true when this add route o k response has a 2xx status code -func (o *AddRouteOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add route o k response has a 3xx status code -func (o *AddRouteOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add route o k response has a 4xx status code -func (o *AddRouteOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this add route o k response has a 5xx status code -func (o *AddRouteOK) IsServerError() bool { - return false -} - -// IsCode returns true when this add route o k response a status code equal to that given -func (o *AddRouteOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the add route o k response -func (o *AddRouteOK) Code() int { - return 200 -} - -func (o *AddRouteOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/routes][%d] addRouteOK %s", 200, payload) -} - -func (o *AddRouteOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/routes][%d] addRouteOK %s", 200, payload) -} - -func (o *AddRouteOK) GetPayload() *models.Route { - return o.Payload -} - -func (o *AddRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Route) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddRouteDefault creates a AddRouteDefault with default headers values -func NewAddRouteDefault(code int) *AddRouteDefault { - return &AddRouteDefault{ - _statusCode: code, - } -} - -/* -AddRouteDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddRouteDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this add route default response has a 2xx status code -func (o *AddRouteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add route default response has a 3xx status code -func (o *AddRouteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add route default response has a 4xx status code -func (o *AddRouteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add route default response has a 5xx status code -func (o *AddRouteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add route default response a status code equal to that given -func (o *AddRouteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add route default response -func (o *AddRouteDefault) Code() int { - return o._statusCode -} - -func (o *AddRouteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/routes][%d] AddRoute default %s", o._statusCode, payload) -} - -func (o *AddRouteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/routes][%d] AddRoute default %s", o._statusCode, payload) -} - -func (o *AddRouteDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *AddRouteDefault) 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/routes/delete_route_parameters.go b/v1/client/routes/delete_route_parameters.go deleted file mode 100644 index 294db5bf..00000000 --- a/v1/client/routes/delete_route_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteRouteParams creates a new DeleteRouteParams 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 NewDeleteRouteParams() *DeleteRouteParams { - return &DeleteRouteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRouteParamsWithTimeout creates a new DeleteRouteParams object -// with the ability to set a timeout on a request. -func NewDeleteRouteParamsWithTimeout(timeout time.Duration) *DeleteRouteParams { - return &DeleteRouteParams{ - timeout: timeout, - } -} - -// NewDeleteRouteParamsWithContext creates a new DeleteRouteParams object -// with the ability to set a context for a request. -func NewDeleteRouteParamsWithContext(ctx context.Context) *DeleteRouteParams { - return &DeleteRouteParams{ - Context: ctx, - } -} - -// NewDeleteRouteParamsWithHTTPClient creates a new DeleteRouteParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRouteParamsWithHTTPClient(client *http.Client) *DeleteRouteParams { - return &DeleteRouteParams{ - HTTPClient: client, - } -} - -/* -DeleteRouteParams contains all the parameters to send to the API endpoint - - for the delete route operation. - - Typically these are written to a http.Request. -*/ -type DeleteRouteParams struct { - - // Body. - Body *models.DeleteRouteParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRouteParams) WithDefaults() *DeleteRouteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRouteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete route params -func (o *DeleteRouteParams) WithTimeout(timeout time.Duration) *DeleteRouteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete route params -func (o *DeleteRouteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete route params -func (o *DeleteRouteParams) WithContext(ctx context.Context) *DeleteRouteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete route params -func (o *DeleteRouteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete route params -func (o *DeleteRouteParams) WithHTTPClient(client *http.Client) *DeleteRouteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete route params -func (o *DeleteRouteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete route params -func (o *DeleteRouteParams) WithBody(body *models.DeleteRouteParam) *DeleteRouteParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete route params -func (o *DeleteRouteParams) SetBody(body *models.DeleteRouteParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRouteParams) 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/routes/delete_route_responses.go b/v1/client/routes/delete_route_responses.go deleted file mode 100644 index c5ef57b9..00000000 --- a/v1/client/routes/delete_route_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteRouteReader is a Reader for the DeleteRoute structure. -type DeleteRouteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRouteNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRouteDefault(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 - } -} - -// NewDeleteRouteNoContent creates a DeleteRouteNoContent with default headers values -func NewDeleteRouteNoContent() *DeleteRouteNoContent { - return &DeleteRouteNoContent{} -} - -/* -DeleteRouteNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRouteNoContent struct { -} - -// IsSuccess returns true when this delete route no content response has a 2xx status code -func (o *DeleteRouteNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete route no content response has a 3xx status code -func (o *DeleteRouteNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete route no content response has a 4xx status code -func (o *DeleteRouteNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete route no content response has a 5xx status code -func (o *DeleteRouteNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete route no content response a status code equal to that given -func (o *DeleteRouteNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete route no content response -func (o *DeleteRouteNoContent) Code() int { - return 204 -} - -func (o *DeleteRouteNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/routes][%d] deleteRouteNoContent", 204) -} - -func (o *DeleteRouteNoContent) String() string { - return fmt.Sprintf("[DELETE /public/routes][%d] deleteRouteNoContent", 204) -} - -func (o *DeleteRouteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRouteDefault creates a DeleteRouteDefault with default headers values -func NewDeleteRouteDefault(code int) *DeleteRouteDefault { - return &DeleteRouteDefault{ - _statusCode: code, - } -} - -/* -DeleteRouteDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRouteDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete route default response has a 2xx status code -func (o *DeleteRouteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete route default response has a 3xx status code -func (o *DeleteRouteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete route default response has a 4xx status code -func (o *DeleteRouteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete route default response has a 5xx status code -func (o *DeleteRouteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete route default response a status code equal to that given -func (o *DeleteRouteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete route default response -func (o *DeleteRouteDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRouteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/routes][%d] DeleteRoute default %s", o._statusCode, payload) -} - -func (o *DeleteRouteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/routes][%d] DeleteRoute default %s", o._statusCode, payload) -} - -func (o *DeleteRouteDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteRouteDefault) 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/routes/get_routes_parameters.go b/v1/client/routes/get_routes_parameters.go deleted file mode 100644 index 20fc3ff1..00000000 --- a/v1/client/routes/get_routes_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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" -) - -// NewGetRoutesParams creates a new GetRoutesParams 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 NewGetRoutesParams() *GetRoutesParams { - return &GetRoutesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRoutesParamsWithTimeout creates a new GetRoutesParams object -// with the ability to set a timeout on a request. -func NewGetRoutesParamsWithTimeout(timeout time.Duration) *GetRoutesParams { - return &GetRoutesParams{ - timeout: timeout, - } -} - -// NewGetRoutesParamsWithContext creates a new GetRoutesParams object -// with the ability to set a context for a request. -func NewGetRoutesParamsWithContext(ctx context.Context) *GetRoutesParams { - return &GetRoutesParams{ - Context: ctx, - } -} - -// NewGetRoutesParamsWithHTTPClient creates a new GetRoutesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRoutesParamsWithHTTPClient(client *http.Client) *GetRoutesParams { - return &GetRoutesParams{ - HTTPClient: client, - } -} - -/* -GetRoutesParams contains all the parameters to send to the API endpoint - - for the get routes operation. - - Typically these are written to a http.Request. -*/ -type GetRoutesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRoutesParams) WithDefaults() *GetRoutesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRoutesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get routes params -func (o *GetRoutesParams) WithTimeout(timeout time.Duration) *GetRoutesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get routes params -func (o *GetRoutesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get routes params -func (o *GetRoutesParams) WithContext(ctx context.Context) *GetRoutesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get routes params -func (o *GetRoutesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get routes params -func (o *GetRoutesParams) WithHTTPClient(client *http.Client) *GetRoutesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get routes params -func (o *GetRoutesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRoutesParams) 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/routes/get_routes_responses.go b/v1/client/routes/get_routes_responses.go deleted file mode 100644 index 6308a561..00000000 --- a/v1/client/routes/get_routes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRoutesReader is a Reader for the GetRoutes structure. -type GetRoutesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRoutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRoutesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRoutesDefault(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 - } -} - -// NewGetRoutesOK creates a GetRoutesOK with default headers values -func NewGetRoutesOK() *GetRoutesOK { - return &GetRoutesOK{} -} - -/* -GetRoutesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRoutesOK struct { - Payload []*models.Route -} - -// IsSuccess returns true when this get routes o k response has a 2xx status code -func (o *GetRoutesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get routes o k response has a 3xx status code -func (o *GetRoutesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get routes o k response has a 4xx status code -func (o *GetRoutesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get routes o k response has a 5xx status code -func (o *GetRoutesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get routes o k response a status code equal to that given -func (o *GetRoutesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get routes o k response -func (o *GetRoutesOK) Code() int { - return 200 -} - -func (o *GetRoutesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/routes][%d] getRoutesOK %s", 200, payload) -} - -func (o *GetRoutesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/routes][%d] getRoutesOK %s", 200, payload) -} - -func (o *GetRoutesOK) GetPayload() []*models.Route { - return o.Payload -} - -func (o *GetRoutesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRoutesDefault creates a GetRoutesDefault with default headers values -func NewGetRoutesDefault(code int) *GetRoutesDefault { - return &GetRoutesDefault{ - _statusCode: code, - } -} - -/* -GetRoutesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRoutesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get routes default response has a 2xx status code -func (o *GetRoutesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get routes default response has a 3xx status code -func (o *GetRoutesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get routes default response has a 4xx status code -func (o *GetRoutesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get routes default response has a 5xx status code -func (o *GetRoutesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get routes default response a status code equal to that given -func (o *GetRoutesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get routes default response -func (o *GetRoutesDefault) Code() int { - return o._statusCode -} - -func (o *GetRoutesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/routes][%d] GetRoutes default %s", o._statusCode, payload) -} - -func (o *GetRoutesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/routes][%d] GetRoutes default %s", o._statusCode, payload) -} - -func (o *GetRoutesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetRoutesDefault) 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/routes/routes_client.go b/v1/client/routes/routes_client.go deleted file mode 100644 index c20c05d5..00000000 --- a/v1/client/routes/routes_client.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new routes API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new routes API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new routes API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for routes API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddRoute(params *AddRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddRouteOK, error) - - DeleteRoute(params *DeleteRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRouteNoContent, error) - - GetRoutes(params *GetRoutesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRoutesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddRoute creates a static route on the cohesity cluster - -Returns the create status upon completion. -*/ -func (a *Client) AddRoute(params *AddRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddRouteOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddRouteParams() - } - op := &runtime.ClientOperation{ - ID: "AddRoute", - Method: "POST", - PathPattern: "/public/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddRouteReader{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.(*AddRouteOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddRouteDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteRoute deletes the specified static route from the cohesity cluster - -Returns the delete status upon completion. -*/ -func (a *Client) DeleteRoute(params *DeleteRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRouteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRouteParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRoute", - Method: "DELETE", - PathPattern: "/public/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRouteReader{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.(*DeleteRouteNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRouteDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRoutes lists the static routes for the cohesity cluster - -Returns the Static Routes for the Cohesity Cluster. -*/ -func (a *Client) GetRoutes(params *GetRoutesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRoutesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRoutesParams() - } - op := &runtime.ClientOperation{ - ID: "GetRoutes", - Method: "GET", - PathPattern: "/public/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRoutesReader{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.(*GetRoutesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRoutesDefault) - 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/s_m_b_file_opens/close_smb_file_open_parameters.go b/v1/client/s_m_b_file_opens/close_smb_file_open_parameters.go deleted file mode 100644 index fe7f4025..00000000 --- a/v1/client/s_m_b_file_opens/close_smb_file_open_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package s_m_b_file_opens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCloseSmbFileOpenParams creates a new CloseSmbFileOpenParams 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 NewCloseSmbFileOpenParams() *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloseSmbFileOpenParamsWithTimeout creates a new CloseSmbFileOpenParams object -// with the ability to set a timeout on a request. -func NewCloseSmbFileOpenParamsWithTimeout(timeout time.Duration) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - timeout: timeout, - } -} - -// NewCloseSmbFileOpenParamsWithContext creates a new CloseSmbFileOpenParams object -// with the ability to set a context for a request. -func NewCloseSmbFileOpenParamsWithContext(ctx context.Context) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - Context: ctx, - } -} - -// NewCloseSmbFileOpenParamsWithHTTPClient creates a new CloseSmbFileOpenParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloseSmbFileOpenParamsWithHTTPClient(client *http.Client) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - HTTPClient: client, - } -} - -/* -CloseSmbFileOpenParams contains all the parameters to send to the API endpoint - - for the close smb file open operation. - - Typically these are written to a http.Request. -*/ -type CloseSmbFileOpenParams struct { - - /* Body. - - Request to close an active SMB file open. - */ - Body *models.CloseSmbFileOpenParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the close smb file open params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloseSmbFileOpenParams) WithDefaults() *CloseSmbFileOpenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the close smb file open params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloseSmbFileOpenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the close smb file open params -func (o *CloseSmbFileOpenParams) WithTimeout(timeout time.Duration) *CloseSmbFileOpenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the close smb file open params -func (o *CloseSmbFileOpenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the close smb file open params -func (o *CloseSmbFileOpenParams) WithContext(ctx context.Context) *CloseSmbFileOpenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the close smb file open params -func (o *CloseSmbFileOpenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the close smb file open params -func (o *CloseSmbFileOpenParams) WithHTTPClient(client *http.Client) *CloseSmbFileOpenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the close smb file open params -func (o *CloseSmbFileOpenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the close smb file open params -func (o *CloseSmbFileOpenParams) WithBody(body *models.CloseSmbFileOpenParameters) *CloseSmbFileOpenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the close smb file open params -func (o *CloseSmbFileOpenParams) SetBody(body *models.CloseSmbFileOpenParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloseSmbFileOpenParams) 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/s_m_b_file_opens/close_smb_file_open_responses.go b/v1/client/s_m_b_file_opens/close_smb_file_open_responses.go deleted file mode 100644 index 92b5af1b..00000000 --- a/v1/client/s_m_b_file_opens/close_smb_file_open_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package s_m_b_file_opens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CloseSmbFileOpenReader is a Reader for the CloseSmbFileOpen structure. -type CloseSmbFileOpenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloseSmbFileOpenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCloseSmbFileOpenNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloseSmbFileOpenDefault(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 - } -} - -// NewCloseSmbFileOpenNoContent creates a CloseSmbFileOpenNoContent with default headers values -func NewCloseSmbFileOpenNoContent() *CloseSmbFileOpenNoContent { - return &CloseSmbFileOpenNoContent{} -} - -/* -CloseSmbFileOpenNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CloseSmbFileOpenNoContent struct { -} - -// IsSuccess returns true when this close smb file open no content response has a 2xx status code -func (o *CloseSmbFileOpenNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this close smb file open no content response has a 3xx status code -func (o *CloseSmbFileOpenNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this close smb file open no content response has a 4xx status code -func (o *CloseSmbFileOpenNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this close smb file open no content response has a 5xx status code -func (o *CloseSmbFileOpenNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this close smb file open no content response a status code equal to that given -func (o *CloseSmbFileOpenNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the close smb file open no content response -func (o *CloseSmbFileOpenNoContent) Code() int { - return 204 -} - -func (o *CloseSmbFileOpenNoContent) Error() string { - return fmt.Sprintf("[POST /public/smbFileOpens][%d] closeSmbFileOpenNoContent", 204) -} - -func (o *CloseSmbFileOpenNoContent) String() string { - return fmt.Sprintf("[POST /public/smbFileOpens][%d] closeSmbFileOpenNoContent", 204) -} - -func (o *CloseSmbFileOpenNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCloseSmbFileOpenDefault creates a CloseSmbFileOpenDefault with default headers values -func NewCloseSmbFileOpenDefault(code int) *CloseSmbFileOpenDefault { - return &CloseSmbFileOpenDefault{ - _statusCode: code, - } -} - -/* -CloseSmbFileOpenDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloseSmbFileOpenDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this close smb file open default response has a 2xx status code -func (o *CloseSmbFileOpenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this close smb file open default response has a 3xx status code -func (o *CloseSmbFileOpenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this close smb file open default response has a 4xx status code -func (o *CloseSmbFileOpenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this close smb file open default response has a 5xx status code -func (o *CloseSmbFileOpenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this close smb file open default response a status code equal to that given -func (o *CloseSmbFileOpenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the close smb file open default response -func (o *CloseSmbFileOpenDefault) Code() int { - return o._statusCode -} - -func (o *CloseSmbFileOpenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/smbFileOpens][%d] CloseSmbFileOpen default %s", o._statusCode, payload) -} - -func (o *CloseSmbFileOpenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/smbFileOpens][%d] CloseSmbFileOpen default %s", o._statusCode, payload) -} - -func (o *CloseSmbFileOpenDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CloseSmbFileOpenDefault) 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/s_m_b_file_opens/get_smb_file_opens_parameters.go b/v1/client/s_m_b_file_opens/get_smb_file_opens_parameters.go deleted file mode 100644 index 23059695..00000000 --- a/v1/client/s_m_b_file_opens/get_smb_file_opens_parameters.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package s_m_b_file_opens - -// 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/go-openapi/swag" -) - -// NewGetSmbFileOpensParams creates a new GetSmbFileOpensParams 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 NewGetSmbFileOpensParams() *GetSmbFileOpensParams { - return &GetSmbFileOpensParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSmbFileOpensParamsWithTimeout creates a new GetSmbFileOpensParams object -// with the ability to set a timeout on a request. -func NewGetSmbFileOpensParamsWithTimeout(timeout time.Duration) *GetSmbFileOpensParams { - return &GetSmbFileOpensParams{ - timeout: timeout, - } -} - -// NewGetSmbFileOpensParamsWithContext creates a new GetSmbFileOpensParams object -// with the ability to set a context for a request. -func NewGetSmbFileOpensParamsWithContext(ctx context.Context) *GetSmbFileOpensParams { - return &GetSmbFileOpensParams{ - Context: ctx, - } -} - -// NewGetSmbFileOpensParamsWithHTTPClient creates a new GetSmbFileOpensParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSmbFileOpensParamsWithHTTPClient(client *http.Client) *GetSmbFileOpensParams { - return &GetSmbFileOpensParams{ - HTTPClient: client, - } -} - -/* -GetSmbFileOpensParams contains all the parameters to send to the API endpoint - - for the get smb file opens operation. - - Typically these are written to a http.Request. -*/ -type GetSmbFileOpensParams struct { - - /* Cookie. - - Specifies the opaque string returned in the previous response. - If this is set, next set of active opens just after the previous - response are returned. If this is not set, first set of active opens - are returned. - */ - Cookie *string - - /* FilePath. - - Specifies the filepath in the view relative to the root filesystem. - If this field is specified, viewName field must also be specified. - */ - FilePath *string - - /* PageCount. - - Specifies the maximum number of active opens to return in the response. - This field cannot be set above 1000. If this is not set, maximum of 1000 - entries are returned. - - Format: int32 - */ - PageCount *int32 - - /* ViewName. - - Specifies the name of the View in which to search. If a view name is not - specified, all the views in the Cluster is searched. - This field is mandatory if filePath field is specified. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get smb file opens params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSmbFileOpensParams) WithDefaults() *GetSmbFileOpensParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get smb file opens params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSmbFileOpensParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get smb file opens params -func (o *GetSmbFileOpensParams) WithTimeout(timeout time.Duration) *GetSmbFileOpensParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get smb file opens params -func (o *GetSmbFileOpensParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get smb file opens params -func (o *GetSmbFileOpensParams) WithContext(ctx context.Context) *GetSmbFileOpensParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get smb file opens params -func (o *GetSmbFileOpensParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get smb file opens params -func (o *GetSmbFileOpensParams) WithHTTPClient(client *http.Client) *GetSmbFileOpensParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get smb file opens params -func (o *GetSmbFileOpensParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get smb file opens params -func (o *GetSmbFileOpensParams) WithCookie(cookie *string) *GetSmbFileOpensParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get smb file opens params -func (o *GetSmbFileOpensParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithFilePath adds the filePath to the get smb file opens params -func (o *GetSmbFileOpensParams) WithFilePath(filePath *string) *GetSmbFileOpensParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the get smb file opens params -func (o *GetSmbFileOpensParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithPageCount adds the pageCount to the get smb file opens params -func (o *GetSmbFileOpensParams) WithPageCount(pageCount *int32) *GetSmbFileOpensParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get smb file opens params -func (o *GetSmbFileOpensParams) SetPageCount(pageCount *int32) { - o.PageCount = pageCount -} - -// WithViewName adds the viewName to the get smb file opens params -func (o *GetSmbFileOpensParams) WithViewName(viewName *string) *GetSmbFileOpensParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get smb file opens params -func (o *GetSmbFileOpensParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSmbFileOpensParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int32 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt32(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/s_m_b_file_opens/get_smb_file_opens_responses.go b/v1/client/s_m_b_file_opens/get_smb_file_opens_responses.go deleted file mode 100644 index 86f2381e..00000000 --- a/v1/client/s_m_b_file_opens/get_smb_file_opens_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package s_m_b_file_opens - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSmbFileOpensReader is a Reader for the GetSmbFileOpens structure. -type GetSmbFileOpensReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSmbFileOpensReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSmbFileOpensOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSmbFileOpensDefault(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 - } -} - -// NewGetSmbFileOpensOK creates a GetSmbFileOpensOK with default headers values -func NewGetSmbFileOpensOK() *GetSmbFileOpensOK { - return &GetSmbFileOpensOK{} -} - -/* -GetSmbFileOpensOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSmbFileOpensOK struct { - Payload *models.SmbActiveFileOpensResponse -} - -// IsSuccess returns true when this get smb file opens o k response has a 2xx status code -func (o *GetSmbFileOpensOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get smb file opens o k response has a 3xx status code -func (o *GetSmbFileOpensOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get smb file opens o k response has a 4xx status code -func (o *GetSmbFileOpensOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get smb file opens o k response has a 5xx status code -func (o *GetSmbFileOpensOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get smb file opens o k response a status code equal to that given -func (o *GetSmbFileOpensOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get smb file opens o k response -func (o *GetSmbFileOpensOK) Code() int { - return 200 -} - -func (o *GetSmbFileOpensOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbFileOpens][%d] getSmbFileOpensOK %s", 200, payload) -} - -func (o *GetSmbFileOpensOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbFileOpens][%d] getSmbFileOpensOK %s", 200, payload) -} - -func (o *GetSmbFileOpensOK) GetPayload() *models.SmbActiveFileOpensResponse { - return o.Payload -} - -func (o *GetSmbFileOpensOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SmbActiveFileOpensResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSmbFileOpensDefault creates a GetSmbFileOpensDefault with default headers values -func NewGetSmbFileOpensDefault(code int) *GetSmbFileOpensDefault { - return &GetSmbFileOpensDefault{ - _statusCode: code, - } -} - -/* -GetSmbFileOpensDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSmbFileOpensDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get smb file opens default response has a 2xx status code -func (o *GetSmbFileOpensDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get smb file opens default response has a 3xx status code -func (o *GetSmbFileOpensDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get smb file opens default response has a 4xx status code -func (o *GetSmbFileOpensDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get smb file opens default response has a 5xx status code -func (o *GetSmbFileOpensDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get smb file opens default response a status code equal to that given -func (o *GetSmbFileOpensDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get smb file opens default response -func (o *GetSmbFileOpensDefault) Code() int { - return o._statusCode -} - -func (o *GetSmbFileOpensDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbFileOpens][%d] GetSmbFileOpens default %s", o._statusCode, payload) -} - -func (o *GetSmbFileOpensDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbFileOpens][%d] GetSmbFileOpens default %s", o._statusCode, payload) -} - -func (o *GetSmbFileOpensDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSmbFileOpensDefault) 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/s_m_b_file_opens/smb_file_opens_client.go b/v1/client/s_m_b_file_opens/smb_file_opens_client.go deleted file mode 100644 index fd6513fb..00000000 --- a/v1/client/s_m_b_file_opens/smb_file_opens_client.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package s_m_b_file_opens - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new s m b file opens API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new s m b file opens API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new s m b file opens API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for s m b file opens API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CloseSmbFileOpen(params *CloseSmbFileOpenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloseSmbFileOpenNoContent, error) - - GetSmbFileOpens(params *GetSmbFileOpensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSmbFileOpensOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CloseSmbFileOpen closes an active s m b file open - -Returns nothing upon success. -*/ -func (a *Client) CloseSmbFileOpen(params *CloseSmbFileOpenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloseSmbFileOpenNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloseSmbFileOpenParams() - } - op := &runtime.ClientOperation{ - ID: "CloseSmbFileOpen", - Method: "POST", - PathPattern: "/public/smbFileOpens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloseSmbFileOpenReader{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.(*CloseSmbFileOpenNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloseSmbFileOpenDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetSmbFileOpens lists the active s m b file opens that match the filter criteria specified using parameters - - If no parameters are specified, all active SMB file opens currently on the - -Cohesity Cluster are returned. Specifying parameters filters the results that -are returned. -*/ -func (a *Client) GetSmbFileOpens(params *GetSmbFileOpensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSmbFileOpensOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSmbFileOpensParams() - } - op := &runtime.ClientOperation{ - ID: "GetSmbFileOpens", - Method: "GET", - PathPattern: "/public/smbFileOpens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSmbFileOpensReader{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.(*GetSmbFileOpensOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSmbFileOpensDefault) - 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/scheduler/create_scheduler_job_parameters.go b/v1/client/scheduler/create_scheduler_job_parameters.go deleted file mode 100644 index d9252737..00000000 --- a/v1/client/scheduler/create_scheduler_job_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateSchedulerJobParams creates a new CreateSchedulerJobParams 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 NewCreateSchedulerJobParams() *CreateSchedulerJobParams { - return &CreateSchedulerJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateSchedulerJobParamsWithTimeout creates a new CreateSchedulerJobParams object -// with the ability to set a timeout on a request. -func NewCreateSchedulerJobParamsWithTimeout(timeout time.Duration) *CreateSchedulerJobParams { - return &CreateSchedulerJobParams{ - timeout: timeout, - } -} - -// NewCreateSchedulerJobParamsWithContext creates a new CreateSchedulerJobParams object -// with the ability to set a context for a request. -func NewCreateSchedulerJobParamsWithContext(ctx context.Context) *CreateSchedulerJobParams { - return &CreateSchedulerJobParams{ - Context: ctx, - } -} - -// NewCreateSchedulerJobParamsWithHTTPClient creates a new CreateSchedulerJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateSchedulerJobParamsWithHTTPClient(client *http.Client) *CreateSchedulerJobParams { - return &CreateSchedulerJobParams{ - HTTPClient: client, - } -} - -/* -CreateSchedulerJobParams contains all the parameters to send to the API endpoint - - for the create scheduler job operation. - - Typically these are written to a http.Request. -*/ -type CreateSchedulerJobParams struct { - - // Body. - Body *models.SchedulerProtoSchedulerJob - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create scheduler job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateSchedulerJobParams) WithDefaults() *CreateSchedulerJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create scheduler job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateSchedulerJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create scheduler job params -func (o *CreateSchedulerJobParams) WithTimeout(timeout time.Duration) *CreateSchedulerJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create scheduler job params -func (o *CreateSchedulerJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create scheduler job params -func (o *CreateSchedulerJobParams) WithContext(ctx context.Context) *CreateSchedulerJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create scheduler job params -func (o *CreateSchedulerJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create scheduler job params -func (o *CreateSchedulerJobParams) WithHTTPClient(client *http.Client) *CreateSchedulerJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create scheduler job params -func (o *CreateSchedulerJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create scheduler job params -func (o *CreateSchedulerJobParams) WithBody(body *models.SchedulerProtoSchedulerJob) *CreateSchedulerJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create scheduler job params -func (o *CreateSchedulerJobParams) SetBody(body *models.SchedulerProtoSchedulerJob) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateSchedulerJobParams) 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/scheduler/create_scheduler_job_responses.go b/v1/client/scheduler/create_scheduler_job_responses.go deleted file mode 100644 index 9c88a8fe..00000000 --- a/v1/client/scheduler/create_scheduler_job_responses.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateSchedulerJobReader is a Reader for the CreateSchedulerJob structure. -type CreateSchedulerJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateSchedulerJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateSchedulerJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 201: - result := NewCreateSchedulerJobCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateSchedulerJobDefault(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 - } -} - -// NewCreateSchedulerJobOK creates a CreateSchedulerJobOK with default headers values -func NewCreateSchedulerJobOK() *CreateSchedulerJobOK { - return &CreateSchedulerJobOK{} -} - -/* -CreateSchedulerJobOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateSchedulerJobOK struct { - Payload *models.SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter -} - -// IsSuccess returns true when this create scheduler job o k response has a 2xx status code -func (o *CreateSchedulerJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create scheduler job o k response has a 3xx status code -func (o *CreateSchedulerJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create scheduler job o k response has a 4xx status code -func (o *CreateSchedulerJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create scheduler job o k response has a 5xx status code -func (o *CreateSchedulerJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create scheduler job o k response a status code equal to that given -func (o *CreateSchedulerJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create scheduler job o k response -func (o *CreateSchedulerJobOK) Code() int { - return 200 -} - -func (o *CreateSchedulerJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] createSchedulerJobOK %s", 200, payload) -} - -func (o *CreateSchedulerJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] createSchedulerJobOK %s", 200, payload) -} - -func (o *CreateSchedulerJobOK) GetPayload() *models.SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter { - return o.Payload -} - -func (o *CreateSchedulerJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateSchedulerJobCreated creates a CreateSchedulerJobCreated with default headers values -func NewCreateSchedulerJobCreated() *CreateSchedulerJobCreated { - return &CreateSchedulerJobCreated{} -} - -/* -CreateSchedulerJobCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateSchedulerJobCreated struct { - Payload *models.SchedulerProtoSchedulerJob -} - -// IsSuccess returns true when this create scheduler job created response has a 2xx status code -func (o *CreateSchedulerJobCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create scheduler job created response has a 3xx status code -func (o *CreateSchedulerJobCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create scheduler job created response has a 4xx status code -func (o *CreateSchedulerJobCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create scheduler job created response has a 5xx status code -func (o *CreateSchedulerJobCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create scheduler job created response a status code equal to that given -func (o *CreateSchedulerJobCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create scheduler job created response -func (o *CreateSchedulerJobCreated) Code() int { - return 201 -} - -func (o *CreateSchedulerJobCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] createSchedulerJobCreated %s", 201, payload) -} - -func (o *CreateSchedulerJobCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] createSchedulerJobCreated %s", 201, payload) -} - -func (o *CreateSchedulerJobCreated) GetPayload() *models.SchedulerProtoSchedulerJob { - return o.Payload -} - -func (o *CreateSchedulerJobCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SchedulerProtoSchedulerJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateSchedulerJobDefault creates a CreateSchedulerJobDefault with default headers values -func NewCreateSchedulerJobDefault(code int) *CreateSchedulerJobDefault { - return &CreateSchedulerJobDefault{ - _statusCode: code, - } -} - -/* -CreateSchedulerJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateSchedulerJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create scheduler job default response has a 2xx status code -func (o *CreateSchedulerJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create scheduler job default response has a 3xx status code -func (o *CreateSchedulerJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create scheduler job default response has a 4xx status code -func (o *CreateSchedulerJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create scheduler job default response has a 5xx status code -func (o *CreateSchedulerJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create scheduler job default response a status code equal to that given -func (o *CreateSchedulerJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create scheduler job default response -func (o *CreateSchedulerJobDefault) Code() int { - return o._statusCode -} - -func (o *CreateSchedulerJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] CreateSchedulerJob default %s", o._statusCode, payload) -} - -func (o *CreateSchedulerJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/scheduler][%d] CreateSchedulerJob default %s", o._statusCode, payload) -} - -func (o *CreateSchedulerJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateSchedulerJobDefault) 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/scheduler/delete_scheduler_jobs_parameters.go b/v1/client/scheduler/delete_scheduler_jobs_parameters.go deleted file mode 100644 index 44d926f5..00000000 --- a/v1/client/scheduler/delete_scheduler_jobs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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" -) - -// NewDeleteSchedulerJobsParams creates a new DeleteSchedulerJobsParams 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 NewDeleteSchedulerJobsParams() *DeleteSchedulerJobsParams { - return &DeleteSchedulerJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteSchedulerJobsParamsWithTimeout creates a new DeleteSchedulerJobsParams object -// with the ability to set a timeout on a request. -func NewDeleteSchedulerJobsParamsWithTimeout(timeout time.Duration) *DeleteSchedulerJobsParams { - return &DeleteSchedulerJobsParams{ - timeout: timeout, - } -} - -// NewDeleteSchedulerJobsParamsWithContext creates a new DeleteSchedulerJobsParams object -// with the ability to set a context for a request. -func NewDeleteSchedulerJobsParamsWithContext(ctx context.Context) *DeleteSchedulerJobsParams { - return &DeleteSchedulerJobsParams{ - Context: ctx, - } -} - -// NewDeleteSchedulerJobsParamsWithHTTPClient creates a new DeleteSchedulerJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteSchedulerJobsParamsWithHTTPClient(client *http.Client) *DeleteSchedulerJobsParams { - return &DeleteSchedulerJobsParams{ - HTTPClient: client, - } -} - -/* -DeleteSchedulerJobsParams contains all the parameters to send to the API endpoint - - for the delete scheduler jobs operation. - - Typically these are written to a http.Request. -*/ -type DeleteSchedulerJobsParams struct { - - /* Ids. - - Array of ids - */ - Ids []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete scheduler jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSchedulerJobsParams) WithDefaults() *DeleteSchedulerJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete scheduler jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSchedulerJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) WithTimeout(timeout time.Duration) *DeleteSchedulerJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) WithContext(ctx context.Context) *DeleteSchedulerJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) WithHTTPClient(client *http.Client) *DeleteSchedulerJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) WithIds(ids []int64) *DeleteSchedulerJobsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the delete scheduler jobs params -func (o *DeleteSchedulerJobsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteSchedulerJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Ids != nil { - if err := r.SetBodyParam(o.Ids); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/scheduler/delete_scheduler_jobs_responses.go b/v1/client/scheduler/delete_scheduler_jobs_responses.go deleted file mode 100644 index 384717e4..00000000 --- a/v1/client/scheduler/delete_scheduler_jobs_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteSchedulerJobsReader is a Reader for the DeleteSchedulerJobs structure. -type DeleteSchedulerJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteSchedulerJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteSchedulerJobsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteSchedulerJobsDefault(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 - } -} - -// NewDeleteSchedulerJobsNoContent creates a DeleteSchedulerJobsNoContent with default headers values -func NewDeleteSchedulerJobsNoContent() *DeleteSchedulerJobsNoContent { - return &DeleteSchedulerJobsNoContent{} -} - -/* -DeleteSchedulerJobsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteSchedulerJobsNoContent struct { -} - -// IsSuccess returns true when this delete scheduler jobs no content response has a 2xx status code -func (o *DeleteSchedulerJobsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete scheduler jobs no content response has a 3xx status code -func (o *DeleteSchedulerJobsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete scheduler jobs no content response has a 4xx status code -func (o *DeleteSchedulerJobsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete scheduler jobs no content response has a 5xx status code -func (o *DeleteSchedulerJobsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete scheduler jobs no content response a status code equal to that given -func (o *DeleteSchedulerJobsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete scheduler jobs no content response -func (o *DeleteSchedulerJobsNoContent) Code() int { - return 204 -} - -func (o *DeleteSchedulerJobsNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/scheduler][%d] deleteSchedulerJobsNoContent", 204) -} - -func (o *DeleteSchedulerJobsNoContent) String() string { - return fmt.Sprintf("[DELETE /public/scheduler][%d] deleteSchedulerJobsNoContent", 204) -} - -func (o *DeleteSchedulerJobsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteSchedulerJobsDefault creates a DeleteSchedulerJobsDefault with default headers values -func NewDeleteSchedulerJobsDefault(code int) *DeleteSchedulerJobsDefault { - return &DeleteSchedulerJobsDefault{ - _statusCode: code, - } -} - -/* -DeleteSchedulerJobsDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteSchedulerJobsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete scheduler jobs default response has a 2xx status code -func (o *DeleteSchedulerJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete scheduler jobs default response has a 3xx status code -func (o *DeleteSchedulerJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete scheduler jobs default response has a 4xx status code -func (o *DeleteSchedulerJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete scheduler jobs default response has a 5xx status code -func (o *DeleteSchedulerJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete scheduler jobs default response a status code equal to that given -func (o *DeleteSchedulerJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete scheduler jobs default response -func (o *DeleteSchedulerJobsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteSchedulerJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/scheduler][%d] DeleteSchedulerJobs default %s", o._statusCode, payload) -} - -func (o *DeleteSchedulerJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/scheduler][%d] DeleteSchedulerJobs default %s", o._statusCode, payload) -} - -func (o *DeleteSchedulerJobsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteSchedulerJobsDefault) 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/scheduler/get_scheduler_jobs_parameters.go b/v1/client/scheduler/get_scheduler_jobs_parameters.go deleted file mode 100644 index 1d842b70..00000000 --- a/v1/client/scheduler/get_scheduler_jobs_parameters.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/go-openapi/swag" -) - -// NewGetSchedulerJobsParams creates a new GetSchedulerJobsParams 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 NewGetSchedulerJobsParams() *GetSchedulerJobsParams { - return &GetSchedulerJobsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSchedulerJobsParamsWithTimeout creates a new GetSchedulerJobsParams object -// with the ability to set a timeout on a request. -func NewGetSchedulerJobsParamsWithTimeout(timeout time.Duration) *GetSchedulerJobsParams { - return &GetSchedulerJobsParams{ - timeout: timeout, - } -} - -// NewGetSchedulerJobsParamsWithContext creates a new GetSchedulerJobsParams object -// with the ability to set a context for a request. -func NewGetSchedulerJobsParamsWithContext(ctx context.Context) *GetSchedulerJobsParams { - return &GetSchedulerJobsParams{ - Context: ctx, - } -} - -// NewGetSchedulerJobsParamsWithHTTPClient creates a new GetSchedulerJobsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSchedulerJobsParamsWithHTTPClient(client *http.Client) *GetSchedulerJobsParams { - return &GetSchedulerJobsParams{ - HTTPClient: client, - } -} - -/* -GetSchedulerJobsParams contains all the parameters to send to the API endpoint - - for the get scheduler jobs operation. - - Typically these are written to a http.Request. -*/ -type GetSchedulerJobsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* Ids. - - Specifies ids of scheduler jobs to fetch. - */ - Ids []int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get scheduler jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSchedulerJobsParams) WithDefaults() *GetSchedulerJobsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get scheduler jobs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSchedulerJobsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithTimeout(timeout time.Duration) *GetSchedulerJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithContext(ctx context.Context) *GetSchedulerJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithHTTPClient(client *http.Client) *GetSchedulerJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetSchedulerJobsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithIds adds the ids to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithIds(ids []int64) *GetSchedulerJobsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithTenantIds adds the tenantIds to the get scheduler jobs params -func (o *GetSchedulerJobsParams) WithTenantIds(tenantIds []string) *GetSchedulerJobsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get scheduler jobs params -func (o *GetSchedulerJobsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSchedulerJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSchedulerJobs binds the parameter ids -func (o *GetSchedulerJobsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetSchedulerJobs binds the parameter tenantIds -func (o *GetSchedulerJobsParams) 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/v1/client/scheduler/get_scheduler_jobs_responses.go b/v1/client/scheduler/get_scheduler_jobs_responses.go deleted file mode 100644 index 0def1746..00000000 --- a/v1/client/scheduler/get_scheduler_jobs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSchedulerJobsReader is a Reader for the GetSchedulerJobs structure. -type GetSchedulerJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSchedulerJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSchedulerJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSchedulerJobsDefault(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 - } -} - -// NewGetSchedulerJobsOK creates a GetSchedulerJobsOK with default headers values -func NewGetSchedulerJobsOK() *GetSchedulerJobsOK { - return &GetSchedulerJobsOK{} -} - -/* -GetSchedulerJobsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSchedulerJobsOK struct { - Payload *models.SchedulerProto -} - -// IsSuccess returns true when this get scheduler jobs o k response has a 2xx status code -func (o *GetSchedulerJobsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get scheduler jobs o k response has a 3xx status code -func (o *GetSchedulerJobsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get scheduler jobs o k response has a 4xx status code -func (o *GetSchedulerJobsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get scheduler jobs o k response has a 5xx status code -func (o *GetSchedulerJobsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get scheduler jobs o k response a status code equal to that given -func (o *GetSchedulerJobsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get scheduler jobs o k response -func (o *GetSchedulerJobsOK) Code() int { - return 200 -} - -func (o *GetSchedulerJobsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/scheduler][%d] getSchedulerJobsOK %s", 200, payload) -} - -func (o *GetSchedulerJobsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/scheduler][%d] getSchedulerJobsOK %s", 200, payload) -} - -func (o *GetSchedulerJobsOK) GetPayload() *models.SchedulerProto { - return o.Payload -} - -func (o *GetSchedulerJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SchedulerProto) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSchedulerJobsDefault creates a GetSchedulerJobsDefault with default headers values -func NewGetSchedulerJobsDefault(code int) *GetSchedulerJobsDefault { - return &GetSchedulerJobsDefault{ - _statusCode: code, - } -} - -/* -GetSchedulerJobsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSchedulerJobsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get scheduler jobs default response has a 2xx status code -func (o *GetSchedulerJobsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get scheduler jobs default response has a 3xx status code -func (o *GetSchedulerJobsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get scheduler jobs default response has a 4xx status code -func (o *GetSchedulerJobsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get scheduler jobs default response has a 5xx status code -func (o *GetSchedulerJobsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get scheduler jobs default response a status code equal to that given -func (o *GetSchedulerJobsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get scheduler jobs default response -func (o *GetSchedulerJobsDefault) Code() int { - return o._statusCode -} - -func (o *GetSchedulerJobsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/scheduler][%d] GetSchedulerJobs default %s", o._statusCode, payload) -} - -func (o *GetSchedulerJobsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/scheduler][%d] GetSchedulerJobs default %s", o._statusCode, payload) -} - -func (o *GetSchedulerJobsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSchedulerJobsDefault) 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/scheduler/scheduler_client.go b/v1/client/scheduler/scheduler_client.go deleted file mode 100644 index 6c80bb8c..00000000 --- a/v1/client/scheduler/scheduler_client.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new scheduler API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new scheduler API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new scheduler API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for scheduler API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateSchedulerJob(params *CreateSchedulerJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateSchedulerJobOK, *CreateSchedulerJobCreated, error) - - DeleteSchedulerJobs(params *DeleteSchedulerJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSchedulerJobsNoContent, error) - - GetSchedulerJobs(params *GetSchedulerJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSchedulerJobsOK, error) - - UpdateSchedulerJob(params *UpdateSchedulerJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSchedulerJobOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateSchedulerJob creates an email report scheduler job - - Returns the created email report scheduler job. - -An email report scheduler job generates a report with the specified parameters -and sends that report to the specified email accounts according to the defined -schedule. -This operation may also be used to send a report once (with no schedule), -by setting the EnableRecurring field to false. -*/ -func (a *Client) CreateSchedulerJob(params *CreateSchedulerJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateSchedulerJobOK, *CreateSchedulerJobCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateSchedulerJobParams() - } - op := &runtime.ClientOperation{ - ID: "CreateSchedulerJob", - Method: "POST", - PathPattern: "/public/scheduler", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateSchedulerJobReader{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, nil, err - } - switch value := result.(type) { - case *CreateSchedulerJobOK: - return value, nil, nil - case *CreateSchedulerJobCreated: - return nil, value, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateSchedulerJobDefault) - return nil, nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteSchedulerJobs deletes one or more email report schedule jobs - -Specify a list of email report schedule job ids to unschedule and delete. -*/ -func (a *Client) DeleteSchedulerJobs(params *DeleteSchedulerJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSchedulerJobsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteSchedulerJobsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteSchedulerJobs", - Method: "DELETE", - PathPattern: "/public/scheduler", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteSchedulerJobsReader{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.(*DeleteSchedulerJobsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteSchedulerJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetSchedulerJobs lists the email report schedule jobs that are scheduled to run - - Returns all the email report scheduler jobs that are scheduled to run. - -An email report scheduler job generates a report with the specified parameters -and sends that report to the specified email accounts according to the defined -schedule. -*/ -func (a *Client) GetSchedulerJobs(params *GetSchedulerJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSchedulerJobsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSchedulerJobsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSchedulerJobs", - Method: "GET", - PathPattern: "/public/scheduler", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSchedulerJobsReader{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.(*GetSchedulerJobsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSchedulerJobsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSchedulerJob updates an existing email report schedule job - -Returns the updated email report scheduler job. -*/ -func (a *Client) UpdateSchedulerJob(params *UpdateSchedulerJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSchedulerJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSchedulerJobParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSchedulerJob", - Method: "PUT", - PathPattern: "/public/scheduler", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSchedulerJobReader{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.(*UpdateSchedulerJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSchedulerJobDefault) - 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/scheduler/update_scheduler_job_parameters.go b/v1/client/scheduler/update_scheduler_job_parameters.go deleted file mode 100644 index b445ae09..00000000 --- a/v1/client/scheduler/update_scheduler_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateSchedulerJobParams creates a new UpdateSchedulerJobParams 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 NewUpdateSchedulerJobParams() *UpdateSchedulerJobParams { - return &UpdateSchedulerJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSchedulerJobParamsWithTimeout creates a new UpdateSchedulerJobParams object -// with the ability to set a timeout on a request. -func NewUpdateSchedulerJobParamsWithTimeout(timeout time.Duration) *UpdateSchedulerJobParams { - return &UpdateSchedulerJobParams{ - timeout: timeout, - } -} - -// NewUpdateSchedulerJobParamsWithContext creates a new UpdateSchedulerJobParams object -// with the ability to set a context for a request. -func NewUpdateSchedulerJobParamsWithContext(ctx context.Context) *UpdateSchedulerJobParams { - return &UpdateSchedulerJobParams{ - Context: ctx, - } -} - -// NewUpdateSchedulerJobParamsWithHTTPClient creates a new UpdateSchedulerJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSchedulerJobParamsWithHTTPClient(client *http.Client) *UpdateSchedulerJobParams { - return &UpdateSchedulerJobParams{ - HTTPClient: client, - } -} - -/* -UpdateSchedulerJobParams contains all the parameters to send to the API endpoint - - for the update scheduler job operation. - - Typically these are written to a http.Request. -*/ -type UpdateSchedulerJobParams struct { - - /* Body. - - Update Job Parameter. - */ - Body *models.SchedulerProtoSchedulerJob - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update scheduler job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSchedulerJobParams) WithDefaults() *UpdateSchedulerJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update scheduler job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSchedulerJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update scheduler job params -func (o *UpdateSchedulerJobParams) WithTimeout(timeout time.Duration) *UpdateSchedulerJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update scheduler job params -func (o *UpdateSchedulerJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update scheduler job params -func (o *UpdateSchedulerJobParams) WithContext(ctx context.Context) *UpdateSchedulerJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update scheduler job params -func (o *UpdateSchedulerJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update scheduler job params -func (o *UpdateSchedulerJobParams) WithHTTPClient(client *http.Client) *UpdateSchedulerJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update scheduler job params -func (o *UpdateSchedulerJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update scheduler job params -func (o *UpdateSchedulerJobParams) WithBody(body *models.SchedulerProtoSchedulerJob) *UpdateSchedulerJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update scheduler job params -func (o *UpdateSchedulerJobParams) SetBody(body *models.SchedulerProtoSchedulerJob) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSchedulerJobParams) 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/scheduler/update_scheduler_job_responses.go b/v1/client/scheduler/update_scheduler_job_responses.go deleted file mode 100644 index b9404868..00000000 --- a/v1/client/scheduler/update_scheduler_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package scheduler - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateSchedulerJobReader is a Reader for the UpdateSchedulerJob structure. -type UpdateSchedulerJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSchedulerJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSchedulerJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSchedulerJobDefault(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 - } -} - -// NewUpdateSchedulerJobOK creates a UpdateSchedulerJobOK with default headers values -func NewUpdateSchedulerJobOK() *UpdateSchedulerJobOK { - return &UpdateSchedulerJobOK{} -} - -/* -UpdateSchedulerJobOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSchedulerJobOK struct { - Payload *models.SchedulerProtoSchedulerJob -} - -// IsSuccess returns true when this update scheduler job o k response has a 2xx status code -func (o *UpdateSchedulerJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update scheduler job o k response has a 3xx status code -func (o *UpdateSchedulerJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update scheduler job o k response has a 4xx status code -func (o *UpdateSchedulerJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update scheduler job o k response has a 5xx status code -func (o *UpdateSchedulerJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update scheduler job o k response a status code equal to that given -func (o *UpdateSchedulerJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update scheduler job o k response -func (o *UpdateSchedulerJobOK) Code() int { - return 200 -} - -func (o *UpdateSchedulerJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/scheduler][%d] updateSchedulerJobOK %s", 200, payload) -} - -func (o *UpdateSchedulerJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/scheduler][%d] updateSchedulerJobOK %s", 200, payload) -} - -func (o *UpdateSchedulerJobOK) GetPayload() *models.SchedulerProtoSchedulerJob { - return o.Payload -} - -func (o *UpdateSchedulerJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SchedulerProtoSchedulerJob) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSchedulerJobDefault creates a UpdateSchedulerJobDefault with default headers values -func NewUpdateSchedulerJobDefault(code int) *UpdateSchedulerJobDefault { - return &UpdateSchedulerJobDefault{ - _statusCode: code, - } -} - -/* -UpdateSchedulerJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSchedulerJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update scheduler job default response has a 2xx status code -func (o *UpdateSchedulerJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update scheduler job default response has a 3xx status code -func (o *UpdateSchedulerJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update scheduler job default response has a 4xx status code -func (o *UpdateSchedulerJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update scheduler job default response has a 5xx status code -func (o *UpdateSchedulerJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update scheduler job default response a status code equal to that given -func (o *UpdateSchedulerJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update scheduler job default response -func (o *UpdateSchedulerJobDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSchedulerJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/scheduler][%d] UpdateSchedulerJob default %s", o._statusCode, payload) -} - -func (o *UpdateSchedulerJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/scheduler][%d] UpdateSchedulerJob default %s", o._statusCode, payload) -} - -func (o *UpdateSchedulerJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateSchedulerJobDefault) 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/search/search_client.go b/v1/client/search/search_client.go deleted file mode 100644 index 6a0c9a5e..00000000 --- a/v1/client/search/search_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new search API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new search API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new search API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for search API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - SearchProtectionRuns(params *SearchProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectionRunsOK, error) - - SearchProtectionSources(params *SearchProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectionSourcesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - SearchProtectionRuns Returns the information of latest snapshot of a particular object across - -all snapshot target locations. -*/ -func (a *Client) SearchProtectionRuns(params *SearchProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectionRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchProtectionRunsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchProtectionRuns", - Method: "GET", - PathPattern: "/public/search/protectionRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchProtectionRunsReader{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.(*SearchProtectionRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchProtectionRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SearchProtectionSources performs search on all the objects which are registered to a cluster - -Returns list of all the objects along with the protection status information. -*/ -func (a *Client) SearchProtectionSources(params *SearchProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectionSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchProtectionSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "SearchProtectionSources", - Method: "GET", - PathPattern: "/public/search/protectionSources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchProtectionSourcesReader{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.(*SearchProtectionSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchProtectionSourcesDefault) - 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/search/search_protection_runs_parameters.go b/v1/client/search/search_protection_runs_parameters.go deleted file mode 100644 index 541bb71d..00000000 --- a/v1/client/search/search_protection_runs_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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" -) - -// NewSearchProtectionRunsParams creates a new SearchProtectionRunsParams 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 NewSearchProtectionRunsParams() *SearchProtectionRunsParams { - return &SearchProtectionRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchProtectionRunsParamsWithTimeout creates a new SearchProtectionRunsParams object -// with the ability to set a timeout on a request. -func NewSearchProtectionRunsParamsWithTimeout(timeout time.Duration) *SearchProtectionRunsParams { - return &SearchProtectionRunsParams{ - timeout: timeout, - } -} - -// NewSearchProtectionRunsParamsWithContext creates a new SearchProtectionRunsParams object -// with the ability to set a context for a request. -func NewSearchProtectionRunsParamsWithContext(ctx context.Context) *SearchProtectionRunsParams { - return &SearchProtectionRunsParams{ - Context: ctx, - } -} - -// NewSearchProtectionRunsParamsWithHTTPClient creates a new SearchProtectionRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchProtectionRunsParamsWithHTTPClient(client *http.Client) *SearchProtectionRunsParams { - return &SearchProtectionRunsParams{ - HTTPClient: client, - } -} - -/* -SearchProtectionRunsParams contains all the parameters to send to the API endpoint - - for the search protection runs operation. - - Typically these are written to a http.Request. -*/ -type SearchProtectionRunsParams struct { - - /* UUID. - - Specifies the unique id of the Protection Source. - */ - UUID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectionRunsParams) WithDefaults() *SearchProtectionRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectionRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search protection runs params -func (o *SearchProtectionRunsParams) WithTimeout(timeout time.Duration) *SearchProtectionRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search protection runs params -func (o *SearchProtectionRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search protection runs params -func (o *SearchProtectionRunsParams) WithContext(ctx context.Context) *SearchProtectionRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search protection runs params -func (o *SearchProtectionRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search protection runs params -func (o *SearchProtectionRunsParams) WithHTTPClient(client *http.Client) *SearchProtectionRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search protection runs params -func (o *SearchProtectionRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithUUID adds the uuid to the search protection runs params -func (o *SearchProtectionRunsParams) WithUUID(uuid string) *SearchProtectionRunsParams { - o.SetUUID(uuid) - return o -} - -// SetUUID adds the uuid to the search protection runs params -func (o *SearchProtectionRunsParams) SetUUID(uuid string) { - o.UUID = uuid -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchProtectionRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param uuid - qrUUID := o.UUID - qUUID := qrUUID - if qUUID != "" { - - if err := r.SetQueryParam("uuid", qUUID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/search/search_protection_runs_responses.go b/v1/client/search/search_protection_runs_responses.go deleted file mode 100644 index 6c0a63b4..00000000 --- a/v1/client/search/search_protection_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchProtectionRunsReader is a Reader for the SearchProtectionRuns structure. -type SearchProtectionRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchProtectionRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchProtectionRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchProtectionRunsDefault(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 - } -} - -// NewSearchProtectionRunsOK creates a SearchProtectionRunsOK with default headers values -func NewSearchProtectionRunsOK() *SearchProtectionRunsOK { - return &SearchProtectionRunsOK{} -} - -/* -SearchProtectionRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchProtectionRunsOK struct { - Payload *models.ProtectionRunResponse -} - -// IsSuccess returns true when this search protection runs o k response has a 2xx status code -func (o *SearchProtectionRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search protection runs o k response has a 3xx status code -func (o *SearchProtectionRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search protection runs o k response has a 4xx status code -func (o *SearchProtectionRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search protection runs o k response has a 5xx status code -func (o *SearchProtectionRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search protection runs o k response a status code equal to that given -func (o *SearchProtectionRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search protection runs o k response -func (o *SearchProtectionRunsOK) Code() int { - return 200 -} - -func (o *SearchProtectionRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionRuns][%d] searchProtectionRunsOK %s", 200, payload) -} - -func (o *SearchProtectionRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionRuns][%d] searchProtectionRunsOK %s", 200, payload) -} - -func (o *SearchProtectionRunsOK) GetPayload() *models.ProtectionRunResponse { - return o.Payload -} - -func (o *SearchProtectionRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionRunResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchProtectionRunsDefault creates a SearchProtectionRunsDefault with default headers values -func NewSearchProtectionRunsDefault(code int) *SearchProtectionRunsDefault { - return &SearchProtectionRunsDefault{ - _statusCode: code, - } -} - -/* -SearchProtectionRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchProtectionRunsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search protection runs default response has a 2xx status code -func (o *SearchProtectionRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search protection runs default response has a 3xx status code -func (o *SearchProtectionRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search protection runs default response has a 4xx status code -func (o *SearchProtectionRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search protection runs default response has a 5xx status code -func (o *SearchProtectionRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search protection runs default response a status code equal to that given -func (o *SearchProtectionRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search protection runs default response -func (o *SearchProtectionRunsDefault) Code() int { - return o._statusCode -} - -func (o *SearchProtectionRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionRuns][%d] SearchProtectionRuns default %s", o._statusCode, payload) -} - -func (o *SearchProtectionRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionRuns][%d] SearchProtectionRuns default %s", o._statusCode, payload) -} - -func (o *SearchProtectionRunsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchProtectionRunsDefault) 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/search/search_protection_sources_parameters.go b/v1/client/search/search_protection_sources_parameters.go deleted file mode 100644 index 6db76664..00000000 --- a/v1/client/search/search_protection_sources_parameters.go +++ /dev/null @@ -1,728 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/go-openapi/swag" -) - -// NewSearchProtectionSourcesParams creates a new SearchProtectionSourcesParams 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 NewSearchProtectionSourcesParams() *SearchProtectionSourcesParams { - return &SearchProtectionSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchProtectionSourcesParamsWithTimeout creates a new SearchProtectionSourcesParams object -// with the ability to set a timeout on a request. -func NewSearchProtectionSourcesParamsWithTimeout(timeout time.Duration) *SearchProtectionSourcesParams { - return &SearchProtectionSourcesParams{ - timeout: timeout, - } -} - -// NewSearchProtectionSourcesParamsWithContext creates a new SearchProtectionSourcesParams object -// with the ability to set a context for a request. -func NewSearchProtectionSourcesParamsWithContext(ctx context.Context) *SearchProtectionSourcesParams { - return &SearchProtectionSourcesParams{ - Context: ctx, - } -} - -// NewSearchProtectionSourcesParamsWithHTTPClient creates a new SearchProtectionSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchProtectionSourcesParamsWithHTTPClient(client *http.Client) *SearchProtectionSourcesParams { - return &SearchProtectionSourcesParams{ - HTTPClient: client, - } -} - -/* -SearchProtectionSourcesParams contains all the parameters to send to the API endpoint - - for the search protection sources operation. - - Typically these are written to a http.Request. -*/ -type SearchProtectionSourcesParams struct { - - /* CountryList. - - Specifies the list of countries to which Office365 user belongs. - */ - CountryList []string - - /* DepartmentList. - - Specifies the list of departments to which an Office365 user may belong. - */ - DepartmentList []string - - /* Environments. - - Specifies the environment type by which Protection Sources will be - filtered. - Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - 'kVMware' indicates the VMware Protection Source environment. - 'kHyperV' indicates the HyperV Protection Source environment. - 'kSQL' indicates the SQL Protection Source environment. - 'kView' indicates the View Protection Source environment. - 'kPuppeteer' indicates the Cohesity's Remote Adapter. - 'kPhysical' indicates the physical Protection Source environment. - 'kPure' indicates the Pure Storage Protection Source environment. - 'kNimble' indicates the Nimble Storage Protection Source environment. - 'kAzure' indicates the Microsoft's Azure Protection Source environment. - 'kNetapp' indicates the Netapp Protection Source environment. - 'kAgent' indicates the Agent Protection Source environment. - 'kGenericNas' indicates the Generic Network Attached Storage Protection - Source environment. - 'kAcropolis' indicates the Acropolis Protection Source environment. - 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - 'kGPFS' indicates IBM's GPFS Protection Source environment. - 'kKVM' indicates the KVM Protection Source environment. - 'kAWS' indicates the AWS Protection Source environment. - 'kExchange' indicates the Exchange Protection Source environment. - 'kHyperVVSS' indicates the HyperV VSS Protection Source - environment. - 'kOracle' indicates the Oracle Protection Source environment. - 'kGCP' indicates the Google Cloud Platform Protection Source environment. - 'kFlashBlade' indicates the Flash Blade Protection Source environment. - 'kAWSNative' indicates the AWS Native Protection Source environment. - 'kO365' indicates the Office 365 Protection Source environment. - 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - 'kGCPNative' indicates the GCP Native Protection Source environment. - 'kAzureNative' indicates the Azure Native Protection Source environment. - 'kKubernetes' indicates a Kubernetes Protection Source environment. - 'kElastifile' indicates Elastifile Protection Source environment. - 'kAD' indicates Active Directory Protection Source environment. - 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - 'kCassandra' indicates Cassandra Protection Source environment. - 'kMongoDB' indicates MongoDB Protection Source environment. - 'kCouchbase' indicates Couchbase Protection Source environment. - 'kHdfs' indicates Hdfs Protection Source environment. - 'kHive' indicates Hive Protection Source environment. - 'kHBase' indicates HBase Protection Source environment. - 'kUDA' indicates Universal Data Adapter Protection Source environment. - 'kO365Teams' indicates the Office365 Teams Protection Source environment. - 'kO365Group' indicates the Office365 Groups Protection Source environment. - 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - */ - Environments []string - - /* LastProtectionJobRunStatus. - - Specifies the last Protection Job run status of the object. If specified, - objects will be filtered based on last job run status. - */ - LastProtectionJobRunStatus []int32 - - /* Office365ProtectionSourceTypes. - - Specifies the Array of Office365 source types. - */ - Office365ProtectionSourceTypes []string - - /* PageCount. - - Specifies the number of items to return in the response for pagination - purposes. Default the pageCount to MaxSearchResponseSize if this is - unspecified. - - Format: int32 - */ - PageCount *int32 - - /* PhysicalServerHostTypes. - - Specifies physical server host OS type. If specified, the physical server - objects will be filtered based on OS type of the server. - 'kLinux' indicates the Linux operating system. - 'kWindows' indicates the Microsoft Windows operating system. - 'kAix' indicates the IBM AIX operating system. - 'kSolaris' indicates the Oracle Solaris operating system. - 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - 'kCockroachDB' indicates the CockroachDB database system. - 'kMySQL' indicates the MySQL database system. - 'kSapSybase' indicates the SapSybase database system. - 'kSapMaxDB' indicates the SapMaxDB database system. - 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - 'kDB2' indicates the DB2 database system. - 'kSapASE' indicates the SapASE database system. - 'kMariaDB' indicates the MariaDB database system. - 'kPostgreSQL' indicates the PostgreSQL database system. - 'kHPUX' indicates the HPUX database system. - 'kVOS' indicates the VOS database system. - 'kOther' indicates the other types of operating system. - */ - PhysicalServerHostTypes []string - - /* ProtectionStatus. - - Specifies the protection status of the object. If specified, the objects - are filtered based on current protection status of that object on the - cluster. Possible values that can be passed are "protected", "unprotected" - or both. If not specified, all the objects are returned irrespective of - protection status of the object. - */ - ProtectionStatus []string - - /* RegisteredSourceUuids. - - Specifies the list of Registered Sources Uuids. Only items from the listed - Registered Sources are returned. - */ - RegisteredSourceUuids []string - - /* SearchString. - - Specifies the search string to query the name of the Protection Source or - the name of the job protecting a Protection Source. - */ - SearchString *string - - /* StartIndex. - - Specifies an index number that can be used to return subsets of items - in multiple requests. - Break up the items to return into multiple requests by setting pageCount - and using startIndex to return a subsets of items. - - For example, set startIndex to 0 to get the first set of items - for the first request. Increment startIndex by pageCount - to get the next set of items for a next request. - - Format: int32 - */ - StartIndex *int32 - - /* TitleList. - - Specifies the list of titles/desgination applicable to Office365 users. - */ - TitleList []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectionSourcesParams) WithDefaults() *SearchProtectionSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectionSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search protection sources params -func (o *SearchProtectionSourcesParams) WithTimeout(timeout time.Duration) *SearchProtectionSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search protection sources params -func (o *SearchProtectionSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search protection sources params -func (o *SearchProtectionSourcesParams) WithContext(ctx context.Context) *SearchProtectionSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search protection sources params -func (o *SearchProtectionSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search protection sources params -func (o *SearchProtectionSourcesParams) WithHTTPClient(client *http.Client) *SearchProtectionSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search protection sources params -func (o *SearchProtectionSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCountryList adds the countryList to the search protection sources params -func (o *SearchProtectionSourcesParams) WithCountryList(countryList []string) *SearchProtectionSourcesParams { - o.SetCountryList(countryList) - return o -} - -// SetCountryList adds the countryList to the search protection sources params -func (o *SearchProtectionSourcesParams) SetCountryList(countryList []string) { - o.CountryList = countryList -} - -// WithDepartmentList adds the departmentList to the search protection sources params -func (o *SearchProtectionSourcesParams) WithDepartmentList(departmentList []string) *SearchProtectionSourcesParams { - o.SetDepartmentList(departmentList) - return o -} - -// SetDepartmentList adds the departmentList to the search protection sources params -func (o *SearchProtectionSourcesParams) SetDepartmentList(departmentList []string) { - o.DepartmentList = departmentList -} - -// WithEnvironments adds the environments to the search protection sources params -func (o *SearchProtectionSourcesParams) WithEnvironments(environments []string) *SearchProtectionSourcesParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the search protection sources params -func (o *SearchProtectionSourcesParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithLastProtectionJobRunStatus adds the lastProtectionJobRunStatus to the search protection sources params -func (o *SearchProtectionSourcesParams) WithLastProtectionJobRunStatus(lastProtectionJobRunStatus []int32) *SearchProtectionSourcesParams { - o.SetLastProtectionJobRunStatus(lastProtectionJobRunStatus) - return o -} - -// SetLastProtectionJobRunStatus adds the lastProtectionJobRunStatus to the search protection sources params -func (o *SearchProtectionSourcesParams) SetLastProtectionJobRunStatus(lastProtectionJobRunStatus []int32) { - o.LastProtectionJobRunStatus = lastProtectionJobRunStatus -} - -// WithOffice365ProtectionSourceTypes adds the office365ProtectionSourceTypes to the search protection sources params -func (o *SearchProtectionSourcesParams) WithOffice365ProtectionSourceTypes(office365ProtectionSourceTypes []string) *SearchProtectionSourcesParams { - o.SetOffice365ProtectionSourceTypes(office365ProtectionSourceTypes) - return o -} - -// SetOffice365ProtectionSourceTypes adds the office365ProtectionSourceTypes to the search protection sources params -func (o *SearchProtectionSourcesParams) SetOffice365ProtectionSourceTypes(office365ProtectionSourceTypes []string) { - o.Office365ProtectionSourceTypes = office365ProtectionSourceTypes -} - -// WithPageCount adds the pageCount to the search protection sources params -func (o *SearchProtectionSourcesParams) WithPageCount(pageCount *int32) *SearchProtectionSourcesParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the search protection sources params -func (o *SearchProtectionSourcesParams) SetPageCount(pageCount *int32) { - o.PageCount = pageCount -} - -// WithPhysicalServerHostTypes adds the physicalServerHostTypes to the search protection sources params -func (o *SearchProtectionSourcesParams) WithPhysicalServerHostTypes(physicalServerHostTypes []string) *SearchProtectionSourcesParams { - o.SetPhysicalServerHostTypes(physicalServerHostTypes) - return o -} - -// SetPhysicalServerHostTypes adds the physicalServerHostTypes to the search protection sources params -func (o *SearchProtectionSourcesParams) SetPhysicalServerHostTypes(physicalServerHostTypes []string) { - o.PhysicalServerHostTypes = physicalServerHostTypes -} - -// WithProtectionStatus adds the protectionStatus to the search protection sources params -func (o *SearchProtectionSourcesParams) WithProtectionStatus(protectionStatus []string) *SearchProtectionSourcesParams { - o.SetProtectionStatus(protectionStatus) - return o -} - -// SetProtectionStatus adds the protectionStatus to the search protection sources params -func (o *SearchProtectionSourcesParams) SetProtectionStatus(protectionStatus []string) { - o.ProtectionStatus = protectionStatus -} - -// WithRegisteredSourceUuids adds the registeredSourceUuids to the search protection sources params -func (o *SearchProtectionSourcesParams) WithRegisteredSourceUuids(registeredSourceUuids []string) *SearchProtectionSourcesParams { - o.SetRegisteredSourceUuids(registeredSourceUuids) - return o -} - -// SetRegisteredSourceUuids adds the registeredSourceUuids to the search protection sources params -func (o *SearchProtectionSourcesParams) SetRegisteredSourceUuids(registeredSourceUuids []string) { - o.RegisteredSourceUuids = registeredSourceUuids -} - -// WithSearchString adds the searchString to the search protection sources params -func (o *SearchProtectionSourcesParams) WithSearchString(searchString *string) *SearchProtectionSourcesParams { - o.SetSearchString(searchString) - return o -} - -// SetSearchString adds the searchString to the search protection sources params -func (o *SearchProtectionSourcesParams) SetSearchString(searchString *string) { - o.SearchString = searchString -} - -// WithStartIndex adds the startIndex to the search protection sources params -func (o *SearchProtectionSourcesParams) WithStartIndex(startIndex *int32) *SearchProtectionSourcesParams { - o.SetStartIndex(startIndex) - return o -} - -// SetStartIndex adds the startIndex to the search protection sources params -func (o *SearchProtectionSourcesParams) SetStartIndex(startIndex *int32) { - o.StartIndex = startIndex -} - -// WithTitleList adds the titleList to the search protection sources params -func (o *SearchProtectionSourcesParams) WithTitleList(titleList []string) *SearchProtectionSourcesParams { - o.SetTitleList(titleList) - return o -} - -// SetTitleList adds the titleList to the search protection sources params -func (o *SearchProtectionSourcesParams) SetTitleList(titleList []string) { - o.TitleList = titleList -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchProtectionSourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CountryList != nil { - - // binding items for countryList - joinedCountryList := o.bindParamCountryList(reg) - - // query array param countryList - if err := r.SetQueryParam("countryList", joinedCountryList...); err != nil { - return err - } - } - - if o.DepartmentList != nil { - - // binding items for departmentList - joinedDepartmentList := o.bindParamDepartmentList(reg) - - // query array param departmentList - if err := r.SetQueryParam("departmentList", joinedDepartmentList...); err != nil { - return err - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.LastProtectionJobRunStatus != nil { - - // binding items for lastProtectionJobRunStatus - joinedLastProtectionJobRunStatus := o.bindParamLastProtectionJobRunStatus(reg) - - // query array param lastProtectionJobRunStatus - if err := r.SetQueryParam("lastProtectionJobRunStatus", joinedLastProtectionJobRunStatus...); err != nil { - return err - } - } - - if o.Office365ProtectionSourceTypes != nil { - - // binding items for office365ProtectionSourceTypes - joinedOffice365ProtectionSourceTypes := o.bindParamOffice365ProtectionSourceTypes(reg) - - // query array param office365ProtectionSourceTypes - if err := r.SetQueryParam("office365ProtectionSourceTypes", joinedOffice365ProtectionSourceTypes...); err != nil { - return err - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int32 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt32(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.PhysicalServerHostTypes != nil { - - // binding items for physicalServerHostTypes - joinedPhysicalServerHostTypes := o.bindParamPhysicalServerHostTypes(reg) - - // query array param physicalServerHostTypes - if err := r.SetQueryParam("physicalServerHostTypes", joinedPhysicalServerHostTypes...); err != nil { - return err - } - } - - if o.ProtectionStatus != nil { - - // binding items for protectionStatus - joinedProtectionStatus := o.bindParamProtectionStatus(reg) - - // query array param protectionStatus - if err := r.SetQueryParam("protectionStatus", joinedProtectionStatus...); err != nil { - return err - } - } - - if o.RegisteredSourceUuids != nil { - - // binding items for registeredSourceUuids - joinedRegisteredSourceUuids := o.bindParamRegisteredSourceUuids(reg) - - // query array param registeredSourceUuids - if err := r.SetQueryParam("registeredSourceUuids", joinedRegisteredSourceUuids...); err != nil { - return err - } - } - - if o.SearchString != nil { - - // query param searchString - var qrSearchString string - - if o.SearchString != nil { - qrSearchString = *o.SearchString - } - qSearchString := qrSearchString - if qSearchString != "" { - - if err := r.SetQueryParam("searchString", qSearchString); err != nil { - return err - } - } - } - - if o.StartIndex != nil { - - // query param startIndex - var qrStartIndex int32 - - if o.StartIndex != nil { - qrStartIndex = *o.StartIndex - } - qStartIndex := swag.FormatInt32(qrStartIndex) - if qStartIndex != "" { - - if err := r.SetQueryParam("startIndex", qStartIndex); err != nil { - return err - } - } - } - - if o.TitleList != nil { - - // binding items for titleList - joinedTitleList := o.bindParamTitleList(reg) - - // query array param titleList - if err := r.SetQueryParam("titleList", joinedTitleList...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchProtectionSources binds the parameter countryList -func (o *SearchProtectionSourcesParams) bindParamCountryList(formats strfmt.Registry) []string { - countryListIR := o.CountryList - - var countryListIC []string - for _, countryListIIR := range countryListIR { // explode []string - - countryListIIV := countryListIIR // string as string - countryListIC = append(countryListIC, countryListIIV) - } - - // items.CollectionFormat: "" - countryListIS := swag.JoinByFormat(countryListIC, "") - - return countryListIS -} - -// bindParamSearchProtectionSources binds the parameter departmentList -func (o *SearchProtectionSourcesParams) bindParamDepartmentList(formats strfmt.Registry) []string { - departmentListIR := o.DepartmentList - - var departmentListIC []string - for _, departmentListIIR := range departmentListIR { // explode []string - - departmentListIIV := departmentListIIR // string as string - departmentListIC = append(departmentListIC, departmentListIIV) - } - - // items.CollectionFormat: "" - departmentListIS := swag.JoinByFormat(departmentListIC, "") - - return departmentListIS -} - -// bindParamSearchProtectionSources binds the parameter environments -func (o *SearchProtectionSourcesParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamSearchProtectionSources binds the parameter lastProtectionJobRunStatus -func (o *SearchProtectionSourcesParams) bindParamLastProtectionJobRunStatus(formats strfmt.Registry) []string { - lastProtectionJobRunStatusIR := o.LastProtectionJobRunStatus - - var lastProtectionJobRunStatusIC []string - for _, lastProtectionJobRunStatusIIR := range lastProtectionJobRunStatusIR { // explode []int32 - - lastProtectionJobRunStatusIIV := swag.FormatInt32(lastProtectionJobRunStatusIIR) // int32 as string - lastProtectionJobRunStatusIC = append(lastProtectionJobRunStatusIC, lastProtectionJobRunStatusIIV) - } - - // items.CollectionFormat: "" - lastProtectionJobRunStatusIS := swag.JoinByFormat(lastProtectionJobRunStatusIC, "") - - return lastProtectionJobRunStatusIS -} - -// bindParamSearchProtectionSources binds the parameter office365ProtectionSourceTypes -func (o *SearchProtectionSourcesParams) bindParamOffice365ProtectionSourceTypes(formats strfmt.Registry) []string { - office365ProtectionSourceTypesIR := o.Office365ProtectionSourceTypes - - var office365ProtectionSourceTypesIC []string - for _, office365ProtectionSourceTypesIIR := range office365ProtectionSourceTypesIR { // explode []string - - office365ProtectionSourceTypesIIV := office365ProtectionSourceTypesIIR // string as string - office365ProtectionSourceTypesIC = append(office365ProtectionSourceTypesIC, office365ProtectionSourceTypesIIV) - } - - // items.CollectionFormat: "" - office365ProtectionSourceTypesIS := swag.JoinByFormat(office365ProtectionSourceTypesIC, "") - - return office365ProtectionSourceTypesIS -} - -// bindParamSearchProtectionSources binds the parameter physicalServerHostTypes -func (o *SearchProtectionSourcesParams) bindParamPhysicalServerHostTypes(formats strfmt.Registry) []string { - physicalServerHostTypesIR := o.PhysicalServerHostTypes - - var physicalServerHostTypesIC []string - for _, physicalServerHostTypesIIR := range physicalServerHostTypesIR { // explode []string - - physicalServerHostTypesIIV := physicalServerHostTypesIIR // string as string - physicalServerHostTypesIC = append(physicalServerHostTypesIC, physicalServerHostTypesIIV) - } - - // items.CollectionFormat: "" - physicalServerHostTypesIS := swag.JoinByFormat(physicalServerHostTypesIC, "") - - return physicalServerHostTypesIS -} - -// bindParamSearchProtectionSources binds the parameter protectionStatus -func (o *SearchProtectionSourcesParams) bindParamProtectionStatus(formats strfmt.Registry) []string { - protectionStatusIR := o.ProtectionStatus - - var protectionStatusIC []string - for _, protectionStatusIIR := range protectionStatusIR { // explode []string - - protectionStatusIIV := protectionStatusIIR // string as string - protectionStatusIC = append(protectionStatusIC, protectionStatusIIV) - } - - // items.CollectionFormat: "" - protectionStatusIS := swag.JoinByFormat(protectionStatusIC, "") - - return protectionStatusIS -} - -// bindParamSearchProtectionSources binds the parameter registeredSourceUuids -func (o *SearchProtectionSourcesParams) bindParamRegisteredSourceUuids(formats strfmt.Registry) []string { - registeredSourceUuidsIR := o.RegisteredSourceUuids - - var registeredSourceUuidsIC []string - for _, registeredSourceUuidsIIR := range registeredSourceUuidsIR { // explode []string - - registeredSourceUuidsIIV := registeredSourceUuidsIIR // string as string - registeredSourceUuidsIC = append(registeredSourceUuidsIC, registeredSourceUuidsIIV) - } - - // items.CollectionFormat: "" - registeredSourceUuidsIS := swag.JoinByFormat(registeredSourceUuidsIC, "") - - return registeredSourceUuidsIS -} - -// bindParamSearchProtectionSources binds the parameter titleList -func (o *SearchProtectionSourcesParams) bindParamTitleList(formats strfmt.Registry) []string { - titleListIR := o.TitleList - - var titleListIC []string - for _, titleListIIR := range titleListIR { // explode []string - - titleListIIV := titleListIIR // string as string - titleListIC = append(titleListIC, titleListIIV) - } - - // items.CollectionFormat: "" - titleListIS := swag.JoinByFormat(titleListIC, "") - - return titleListIS -} diff --git a/v1/client/search/search_protection_sources_responses.go b/v1/client/search/search_protection_sources_responses.go deleted file mode 100644 index 9f71c2f2..00000000 --- a/v1/client/search/search_protection_sources_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchProtectionSourcesReader is a Reader for the SearchProtectionSources structure. -type SearchProtectionSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchProtectionSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchProtectionSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchProtectionSourcesDefault(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 - } -} - -// NewSearchProtectionSourcesOK creates a SearchProtectionSourcesOK with default headers values -func NewSearchProtectionSourcesOK() *SearchProtectionSourcesOK { - return &SearchProtectionSourcesOK{} -} - -/* -SearchProtectionSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchProtectionSourcesOK struct { - Payload []*models.ProtectionSourceResponse -} - -// IsSuccess returns true when this search protection sources o k response has a 2xx status code -func (o *SearchProtectionSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search protection sources o k response has a 3xx status code -func (o *SearchProtectionSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search protection sources o k response has a 4xx status code -func (o *SearchProtectionSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search protection sources o k response has a 5xx status code -func (o *SearchProtectionSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search protection sources o k response a status code equal to that given -func (o *SearchProtectionSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search protection sources o k response -func (o *SearchProtectionSourcesOK) Code() int { - return 200 -} - -func (o *SearchProtectionSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionSources][%d] searchProtectionSourcesOK %s", 200, payload) -} - -func (o *SearchProtectionSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionSources][%d] searchProtectionSourcesOK %s", 200, payload) -} - -func (o *SearchProtectionSourcesOK) GetPayload() []*models.ProtectionSourceResponse { - return o.Payload -} - -func (o *SearchProtectionSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchProtectionSourcesDefault creates a SearchProtectionSourcesDefault with default headers values -func NewSearchProtectionSourcesDefault(code int) *SearchProtectionSourcesDefault { - return &SearchProtectionSourcesDefault{ - _statusCode: code, - } -} - -/* -SearchProtectionSourcesDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchProtectionSourcesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this search protection sources default response has a 2xx status code -func (o *SearchProtectionSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search protection sources default response has a 3xx status code -func (o *SearchProtectionSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search protection sources default response has a 4xx status code -func (o *SearchProtectionSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search protection sources default response has a 5xx status code -func (o *SearchProtectionSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search protection sources default response a status code equal to that given -func (o *SearchProtectionSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search protection sources default response -func (o *SearchProtectionSourcesDefault) Code() int { - return o._statusCode -} - -func (o *SearchProtectionSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionSources][%d] SearchProtectionSources default %s", o._statusCode, payload) -} - -func (o *SearchProtectionSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/search/protectionSources][%d] SearchProtectionSources default %s", o._statusCode, payload) -} - -func (o *SearchProtectionSourcesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *SearchProtectionSourcesDefault) 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/search_files/search_files_client.go b/v1/client/search_files/search_files_client.go deleted file mode 100644 index ecc66bf0..00000000 --- a/v1/client/search_files/search_files_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_files - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new search files API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new search files API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new search files API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for search files API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - SearchFiles(params *SearchFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchFilesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -SearchFiles searches for files -*/ -func (a *Client) SearchFiles(params *SearchFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchFilesParams() - } - op := &runtime.ClientOperation{ - ID: "SearchFiles", - Method: "GET", - PathPattern: "/searchfiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchFilesReader{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.(*SearchFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchFilesDefault) - 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/search_files/search_files_parameters.go b/v1/client/search_files/search_files_parameters.go deleted file mode 100644 index e5c9ffa1..00000000 --- a/v1/client/search_files/search_files_parameters.go +++ /dev/null @@ -1,1689 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_files - -// 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/go-openapi/swag" -) - -// NewSearchFilesParams creates a new SearchFilesParams 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 NewSearchFilesParams() *SearchFilesParams { - return &SearchFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchFilesParamsWithTimeout creates a new SearchFilesParams object -// with the ability to set a timeout on a request. -func NewSearchFilesParamsWithTimeout(timeout time.Duration) *SearchFilesParams { - return &SearchFilesParams{ - timeout: timeout, - } -} - -// NewSearchFilesParamsWithContext creates a new SearchFilesParams object -// with the ability to set a context for a request. -func NewSearchFilesParamsWithContext(ctx context.Context) *SearchFilesParams { - return &SearchFilesParams{ - Context: ctx, - } -} - -// NewSearchFilesParamsWithHTTPClient creates a new SearchFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchFilesParamsWithHTTPClient(client *http.Client) *SearchFilesParams { - return &SearchFilesParams{ - HTTPClient: client, - } -} - -/* -SearchFilesParams contains all the parameters to send to the API endpoint - - for the search files operation. - - Typically these are written to a http.Request. -*/ -type SearchFilesParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* BccRecipientAddresses. - - Specifies the email addresses of the bcc recipients. - */ - BccRecipientAddresses []string - - /* CcRecipientAddresses. - - Specifies the email addresses of the cc recipients. - */ - CcRecipientAddresses []string - - /* DocumentName. - - Specifies the document(file/folder) name. - */ - DocumentName *string - - /* Domain. - - domain of the AD object. - */ - Domain *string - - /* DomainIds. - - Specifies the domain Ids in which Users' OneDrives are registered. - */ - DomainIds []int64 - - /* Email. - - Specifies the email of the AD object of type user or group. - */ - Email *string - - /* EmailSubject. - - Specifies the subject of the email. - */ - EmailSubject *string - - /* EntityIds. - - EntityIds are the ids of the objects (e.g. VMs), the file backup came from. - */ - EntityIds []int64 - - /* EntityTypes. - - EntityTypes are the types of the entity being requested e.g. kView, - kVMware, kPhysical. - */ - EntityTypes []string - - /* Filename. - - Filename is the name of the file to search for. The term can match any - token in the real filename (i.e. "desktop" or "ini" would both match - "desktop.ini"). - */ - Filename *string - - /* FolderName. - - Specifies the parent folder name of the email. - */ - FolderName *string - - /* From. - - From is the start index used for ElasticSearch results pagination. - - Format: int64 - */ - From *int64 - - /* HasAttachments. - - Specifies whether the emails have any attachments. - */ - HasAttachments *bool - - /* IsFolder. - - IsFolder specifies whether to restrict the search to folders, files or - or both. If IsFolder is true, the search will be restricted to folders. - If it is false, only files will be searched. If it is not specified, both - files and folders will be searched. - */ - IsFolder *bool - - /* JobIds. - - JobIds are the ids of the jobs the file backup came from. - */ - JobIds []int64 - - /* MailboxIds. - - Specifies the Office365 User Ids which is teh owner of the OneDrive. - */ - MailboxIds []int64 - - /* MightHaveSnapshotTags. - - Specifies list of snapshot tags, one of which might be present in the - document. These are OR'ed together and the resulting criteria AND'ed - with the rest of the query. - */ - MightHaveSnapshotTags []string - - /* MightHaveTags. - - Specifies list of tags, one of which might be present in the document. - These are OR'ed together and the resulting criteria AND'ed with the - rest of the query. - */ - MightHaveTags []string - - /* MustHaveSnapshotTags. - - Specifies snapshot tags which must be all present in the document. - */ - MustHaveSnapshotTags []string - - /* MustHaveTags. - - Specifies tags which must be all present in the document. - */ - MustHaveTags []string - - /* Name. - - Specifies the name of the AD object. - */ - Name *string - - /* ObjectType. - - Specifies the type of the AD Object. The type may be user, computer, - group or ou(organizational unit). - */ - ObjectType *string - - /* Office365SearchType. - - Specifies the search type for Office365 applications. - - Format: int32 - */ - Office365SearchType *int32 - - /* PageSize. - - Specifies pagesize for pagination. Only valid for librarian queries. - Effective only when Paginate is set to true. - - Format: int32 - */ - PageSize *int32 - - /* Paginate. - - Specifies bool to control pagination of search results. Only valid - for librarian queries. If this is set to true and a pagination cookie - is provided, search will be resumed. - */ - Paginate *bool - - /* PaginationCookie. - - Specifies cookie for resuming search if pagination is being used. Only - valid for librarian queries. Effective only when Paginate is set to true. - */ - PaginationCookie *string - - /* ProtectionJobIds. - - Specifies the protection job Ids which have backed up mailbox(es) - continaing emails/folders. - */ - ProtectionJobIds []int64 - - /* ReceivedEndTime. - - Specifies the unix end time for querying on email's received time. - - Format: int64 - */ - ReceivedEndTime *int64 - - /* ReceivedStartTime. - - Specifies the unix start time for querying on email's received time. - - Format: int64 - */ - ReceivedStartTime *int64 - - /* ReceivedTimeSeconds. - - Specifies the unix time when the email was received. - - Format: int64 - */ - ReceivedTimeSeconds *int64 - - /* RecipientAddresses. - - Specifies the email addresses of the recipients. - */ - RecipientAddresses []string - - /* RegisteredSourceIds. - - RegisteredSourceIds are the Ids of the top-level registered entities the VM - belongs to. - */ - RegisteredSourceIds []int64 - - /* SamAccountName. - - Specifies the sam account name of the AD object. - */ - SamAccountName *string - - /* SenderAddress. - - Specifies the email address of the sender. - */ - SenderAddress *string - - /* SentTimeSeconds. - - Specifies the unix time when the email was sent. - - Format: int64 - */ - SentTimeSeconds *int64 - - /* ShowOnlyEmailFolders. - - Specifies whether the query result should include only Email folders. - */ - ShowOnlyEmailFolders *bool - - /* Size. - - Size is the number of results to return in each pagination query. - - Format: int64 - */ - Size *int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* ViewBoxIds. - - ViewBoxIds are the ids of the view boxes where the file was saved. - */ - ViewBoxIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchFilesParams) WithDefaults() *SearchFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search files params -func (o *SearchFilesParams) WithTimeout(timeout time.Duration) *SearchFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search files params -func (o *SearchFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search files params -func (o *SearchFilesParams) WithContext(ctx context.Context) *SearchFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search files params -func (o *SearchFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search files params -func (o *SearchFilesParams) WithHTTPClient(client *http.Client) *SearchFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search files params -func (o *SearchFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the search files params -func (o *SearchFilesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *SearchFilesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the search files params -func (o *SearchFilesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithBccRecipientAddresses adds the bccRecipientAddresses to the search files params -func (o *SearchFilesParams) WithBccRecipientAddresses(bccRecipientAddresses []string) *SearchFilesParams { - o.SetBccRecipientAddresses(bccRecipientAddresses) - return o -} - -// SetBccRecipientAddresses adds the bccRecipientAddresses to the search files params -func (o *SearchFilesParams) SetBccRecipientAddresses(bccRecipientAddresses []string) { - o.BccRecipientAddresses = bccRecipientAddresses -} - -// WithCcRecipientAddresses adds the ccRecipientAddresses to the search files params -func (o *SearchFilesParams) WithCcRecipientAddresses(ccRecipientAddresses []string) *SearchFilesParams { - o.SetCcRecipientAddresses(ccRecipientAddresses) - return o -} - -// SetCcRecipientAddresses adds the ccRecipientAddresses to the search files params -func (o *SearchFilesParams) SetCcRecipientAddresses(ccRecipientAddresses []string) { - o.CcRecipientAddresses = ccRecipientAddresses -} - -// WithDocumentName adds the documentName to the search files params -func (o *SearchFilesParams) WithDocumentName(documentName *string) *SearchFilesParams { - o.SetDocumentName(documentName) - return o -} - -// SetDocumentName adds the documentName to the search files params -func (o *SearchFilesParams) SetDocumentName(documentName *string) { - o.DocumentName = documentName -} - -// WithDomain adds the domain to the search files params -func (o *SearchFilesParams) WithDomain(domain *string) *SearchFilesParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the search files params -func (o *SearchFilesParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithDomainIds adds the domainIds to the search files params -func (o *SearchFilesParams) WithDomainIds(domainIds []int64) *SearchFilesParams { - o.SetDomainIds(domainIds) - return o -} - -// SetDomainIds adds the domainIds to the search files params -func (o *SearchFilesParams) SetDomainIds(domainIds []int64) { - o.DomainIds = domainIds -} - -// WithEmail adds the email to the search files params -func (o *SearchFilesParams) WithEmail(email *string) *SearchFilesParams { - o.SetEmail(email) - return o -} - -// SetEmail adds the email to the search files params -func (o *SearchFilesParams) SetEmail(email *string) { - o.Email = email -} - -// WithEmailSubject adds the emailSubject to the search files params -func (o *SearchFilesParams) WithEmailSubject(emailSubject *string) *SearchFilesParams { - o.SetEmailSubject(emailSubject) - return o -} - -// SetEmailSubject adds the emailSubject to the search files params -func (o *SearchFilesParams) SetEmailSubject(emailSubject *string) { - o.EmailSubject = emailSubject -} - -// WithEntityIds adds the entityIds to the search files params -func (o *SearchFilesParams) WithEntityIds(entityIds []int64) *SearchFilesParams { - o.SetEntityIds(entityIds) - return o -} - -// SetEntityIds adds the entityIds to the search files params -func (o *SearchFilesParams) SetEntityIds(entityIds []int64) { - o.EntityIds = entityIds -} - -// WithEntityTypes adds the entityTypes to the search files params -func (o *SearchFilesParams) WithEntityTypes(entityTypes []string) *SearchFilesParams { - o.SetEntityTypes(entityTypes) - return o -} - -// SetEntityTypes adds the entityTypes to the search files params -func (o *SearchFilesParams) SetEntityTypes(entityTypes []string) { - o.EntityTypes = entityTypes -} - -// WithFilename adds the filename to the search files params -func (o *SearchFilesParams) WithFilename(filename *string) *SearchFilesParams { - o.SetFilename(filename) - return o -} - -// SetFilename adds the filename to the search files params -func (o *SearchFilesParams) SetFilename(filename *string) { - o.Filename = filename -} - -// WithFolderName adds the folderName to the search files params -func (o *SearchFilesParams) WithFolderName(folderName *string) *SearchFilesParams { - o.SetFolderName(folderName) - return o -} - -// SetFolderName adds the folderName to the search files params -func (o *SearchFilesParams) SetFolderName(folderName *string) { - o.FolderName = folderName -} - -// WithFrom adds the from to the search files params -func (o *SearchFilesParams) WithFrom(from *int64) *SearchFilesParams { - o.SetFrom(from) - return o -} - -// SetFrom adds the from to the search files params -func (o *SearchFilesParams) SetFrom(from *int64) { - o.From = from -} - -// WithHasAttachments adds the hasAttachments to the search files params -func (o *SearchFilesParams) WithHasAttachments(hasAttachments *bool) *SearchFilesParams { - o.SetHasAttachments(hasAttachments) - return o -} - -// SetHasAttachments adds the hasAttachments to the search files params -func (o *SearchFilesParams) SetHasAttachments(hasAttachments *bool) { - o.HasAttachments = hasAttachments -} - -// WithIsFolder adds the isFolder to the search files params -func (o *SearchFilesParams) WithIsFolder(isFolder *bool) *SearchFilesParams { - o.SetIsFolder(isFolder) - return o -} - -// SetIsFolder adds the isFolder to the search files params -func (o *SearchFilesParams) SetIsFolder(isFolder *bool) { - o.IsFolder = isFolder -} - -// WithJobIds adds the jobIds to the search files params -func (o *SearchFilesParams) WithJobIds(jobIds []int64) *SearchFilesParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the search files params -func (o *SearchFilesParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithMailboxIds adds the mailboxIds to the search files params -func (o *SearchFilesParams) WithMailboxIds(mailboxIds []int64) *SearchFilesParams { - o.SetMailboxIds(mailboxIds) - return o -} - -// SetMailboxIds adds the mailboxIds to the search files params -func (o *SearchFilesParams) SetMailboxIds(mailboxIds []int64) { - o.MailboxIds = mailboxIds -} - -// WithMightHaveSnapshotTags adds the mightHaveSnapshotTags to the search files params -func (o *SearchFilesParams) WithMightHaveSnapshotTags(mightHaveSnapshotTags []string) *SearchFilesParams { - o.SetMightHaveSnapshotTags(mightHaveSnapshotTags) - return o -} - -// SetMightHaveSnapshotTags adds the mightHaveSnapshotTags to the search files params -func (o *SearchFilesParams) SetMightHaveSnapshotTags(mightHaveSnapshotTags []string) { - o.MightHaveSnapshotTags = mightHaveSnapshotTags -} - -// WithMightHaveTags adds the mightHaveTags to the search files params -func (o *SearchFilesParams) WithMightHaveTags(mightHaveTags []string) *SearchFilesParams { - o.SetMightHaveTags(mightHaveTags) - return o -} - -// SetMightHaveTags adds the mightHaveTags to the search files params -func (o *SearchFilesParams) SetMightHaveTags(mightHaveTags []string) { - o.MightHaveTags = mightHaveTags -} - -// WithMustHaveSnapshotTags adds the mustHaveSnapshotTags to the search files params -func (o *SearchFilesParams) WithMustHaveSnapshotTags(mustHaveSnapshotTags []string) *SearchFilesParams { - o.SetMustHaveSnapshotTags(mustHaveSnapshotTags) - return o -} - -// SetMustHaveSnapshotTags adds the mustHaveSnapshotTags to the search files params -func (o *SearchFilesParams) SetMustHaveSnapshotTags(mustHaveSnapshotTags []string) { - o.MustHaveSnapshotTags = mustHaveSnapshotTags -} - -// WithMustHaveTags adds the mustHaveTags to the search files params -func (o *SearchFilesParams) WithMustHaveTags(mustHaveTags []string) *SearchFilesParams { - o.SetMustHaveTags(mustHaveTags) - return o -} - -// SetMustHaveTags adds the mustHaveTags to the search files params -func (o *SearchFilesParams) SetMustHaveTags(mustHaveTags []string) { - o.MustHaveTags = mustHaveTags -} - -// WithName adds the name to the search files params -func (o *SearchFilesParams) WithName(name *string) *SearchFilesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the search files params -func (o *SearchFilesParams) SetName(name *string) { - o.Name = name -} - -// WithObjectType adds the objectType to the search files params -func (o *SearchFilesParams) WithObjectType(objectType *string) *SearchFilesParams { - o.SetObjectType(objectType) - return o -} - -// SetObjectType adds the objectType to the search files params -func (o *SearchFilesParams) SetObjectType(objectType *string) { - o.ObjectType = objectType -} - -// WithOffice365SearchType adds the office365SearchType to the search files params -func (o *SearchFilesParams) WithOffice365SearchType(office365SearchType *int32) *SearchFilesParams { - o.SetOffice365SearchType(office365SearchType) - return o -} - -// SetOffice365SearchType adds the office365SearchType to the search files params -func (o *SearchFilesParams) SetOffice365SearchType(office365SearchType *int32) { - o.Office365SearchType = office365SearchType -} - -// WithPageSize adds the pageSize to the search files params -func (o *SearchFilesParams) WithPageSize(pageSize *int32) *SearchFilesParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the search files params -func (o *SearchFilesParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPaginate adds the paginate to the search files params -func (o *SearchFilesParams) WithPaginate(paginate *bool) *SearchFilesParams { - o.SetPaginate(paginate) - return o -} - -// SetPaginate adds the paginate to the search files params -func (o *SearchFilesParams) SetPaginate(paginate *bool) { - o.Paginate = paginate -} - -// WithPaginationCookie adds the paginationCookie to the search files params -func (o *SearchFilesParams) WithPaginationCookie(paginationCookie *string) *SearchFilesParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the search files params -func (o *SearchFilesParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithProtectionJobIds adds the protectionJobIds to the search files params -func (o *SearchFilesParams) WithProtectionJobIds(protectionJobIds []int64) *SearchFilesParams { - o.SetProtectionJobIds(protectionJobIds) - return o -} - -// SetProtectionJobIds adds the protectionJobIds to the search files params -func (o *SearchFilesParams) SetProtectionJobIds(protectionJobIds []int64) { - o.ProtectionJobIds = protectionJobIds -} - -// WithReceivedEndTime adds the receivedEndTime to the search files params -func (o *SearchFilesParams) WithReceivedEndTime(receivedEndTime *int64) *SearchFilesParams { - o.SetReceivedEndTime(receivedEndTime) - return o -} - -// SetReceivedEndTime adds the receivedEndTime to the search files params -func (o *SearchFilesParams) SetReceivedEndTime(receivedEndTime *int64) { - o.ReceivedEndTime = receivedEndTime -} - -// WithReceivedStartTime adds the receivedStartTime to the search files params -func (o *SearchFilesParams) WithReceivedStartTime(receivedStartTime *int64) *SearchFilesParams { - o.SetReceivedStartTime(receivedStartTime) - return o -} - -// SetReceivedStartTime adds the receivedStartTime to the search files params -func (o *SearchFilesParams) SetReceivedStartTime(receivedStartTime *int64) { - o.ReceivedStartTime = receivedStartTime -} - -// WithReceivedTimeSeconds adds the receivedTimeSeconds to the search files params -func (o *SearchFilesParams) WithReceivedTimeSeconds(receivedTimeSeconds *int64) *SearchFilesParams { - o.SetReceivedTimeSeconds(receivedTimeSeconds) - return o -} - -// SetReceivedTimeSeconds adds the receivedTimeSeconds to the search files params -func (o *SearchFilesParams) SetReceivedTimeSeconds(receivedTimeSeconds *int64) { - o.ReceivedTimeSeconds = receivedTimeSeconds -} - -// WithRecipientAddresses adds the recipientAddresses to the search files params -func (o *SearchFilesParams) WithRecipientAddresses(recipientAddresses []string) *SearchFilesParams { - o.SetRecipientAddresses(recipientAddresses) - return o -} - -// SetRecipientAddresses adds the recipientAddresses to the search files params -func (o *SearchFilesParams) SetRecipientAddresses(recipientAddresses []string) { - o.RecipientAddresses = recipientAddresses -} - -// WithRegisteredSourceIds adds the registeredSourceIds to the search files params -func (o *SearchFilesParams) WithRegisteredSourceIds(registeredSourceIds []int64) *SearchFilesParams { - o.SetRegisteredSourceIds(registeredSourceIds) - return o -} - -// SetRegisteredSourceIds adds the registeredSourceIds to the search files params -func (o *SearchFilesParams) SetRegisteredSourceIds(registeredSourceIds []int64) { - o.RegisteredSourceIds = registeredSourceIds -} - -// WithSamAccountName adds the samAccountName to the search files params -func (o *SearchFilesParams) WithSamAccountName(samAccountName *string) *SearchFilesParams { - o.SetSamAccountName(samAccountName) - return o -} - -// SetSamAccountName adds the samAccountName to the search files params -func (o *SearchFilesParams) SetSamAccountName(samAccountName *string) { - o.SamAccountName = samAccountName -} - -// WithSenderAddress adds the senderAddress to the search files params -func (o *SearchFilesParams) WithSenderAddress(senderAddress *string) *SearchFilesParams { - o.SetSenderAddress(senderAddress) - return o -} - -// SetSenderAddress adds the senderAddress to the search files params -func (o *SearchFilesParams) SetSenderAddress(senderAddress *string) { - o.SenderAddress = senderAddress -} - -// WithSentTimeSeconds adds the sentTimeSeconds to the search files params -func (o *SearchFilesParams) WithSentTimeSeconds(sentTimeSeconds *int64) *SearchFilesParams { - o.SetSentTimeSeconds(sentTimeSeconds) - return o -} - -// SetSentTimeSeconds adds the sentTimeSeconds to the search files params -func (o *SearchFilesParams) SetSentTimeSeconds(sentTimeSeconds *int64) { - o.SentTimeSeconds = sentTimeSeconds -} - -// WithShowOnlyEmailFolders adds the showOnlyEmailFolders to the search files params -func (o *SearchFilesParams) WithShowOnlyEmailFolders(showOnlyEmailFolders *bool) *SearchFilesParams { - o.SetShowOnlyEmailFolders(showOnlyEmailFolders) - return o -} - -// SetShowOnlyEmailFolders adds the showOnlyEmailFolders to the search files params -func (o *SearchFilesParams) SetShowOnlyEmailFolders(showOnlyEmailFolders *bool) { - o.ShowOnlyEmailFolders = showOnlyEmailFolders -} - -// WithSize adds the size to the search files params -func (o *SearchFilesParams) WithSize(size *int64) *SearchFilesParams { - o.SetSize(size) - return o -} - -// SetSize adds the size to the search files params -func (o *SearchFilesParams) SetSize(size *int64) { - o.Size = size -} - -// WithTenantID adds the tenantID to the search files params -func (o *SearchFilesParams) WithTenantID(tenantID *string) *SearchFilesParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the search files params -func (o *SearchFilesParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithViewBoxIds adds the viewBoxIds to the search files params -func (o *SearchFilesParams) WithViewBoxIds(viewBoxIds []int64) *SearchFilesParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the search files params -func (o *SearchFilesParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.BccRecipientAddresses != nil { - - // binding items for bccRecipientAddresses - joinedBccRecipientAddresses := o.bindParamBccRecipientAddresses(reg) - - // query array param bccRecipientAddresses - if err := r.SetQueryParam("bccRecipientAddresses", joinedBccRecipientAddresses...); err != nil { - return err - } - } - - if o.CcRecipientAddresses != nil { - - // binding items for ccRecipientAddresses - joinedCcRecipientAddresses := o.bindParamCcRecipientAddresses(reg) - - // query array param ccRecipientAddresses - if err := r.SetQueryParam("ccRecipientAddresses", joinedCcRecipientAddresses...); err != nil { - return err - } - } - - if o.DocumentName != nil { - - // query param documentName - var qrDocumentName string - - if o.DocumentName != nil { - qrDocumentName = *o.DocumentName - } - qDocumentName := qrDocumentName - if qDocumentName != "" { - - if err := r.SetQueryParam("documentName", qDocumentName); err != nil { - return err - } - } - } - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.DomainIds != nil { - - // binding items for domainIds - joinedDomainIds := o.bindParamDomainIds(reg) - - // query array param domainIds - if err := r.SetQueryParam("domainIds", joinedDomainIds...); err != nil { - return err - } - } - - if o.Email != nil { - - // query param email - var qrEmail string - - if o.Email != nil { - qrEmail = *o.Email - } - qEmail := qrEmail - if qEmail != "" { - - if err := r.SetQueryParam("email", qEmail); err != nil { - return err - } - } - } - - if o.EmailSubject != nil { - - // query param emailSubject - var qrEmailSubject string - - if o.EmailSubject != nil { - qrEmailSubject = *o.EmailSubject - } - qEmailSubject := qrEmailSubject - if qEmailSubject != "" { - - if err := r.SetQueryParam("emailSubject", qEmailSubject); err != nil { - return err - } - } - } - - if o.EntityIds != nil { - - // binding items for entityIds - joinedEntityIds := o.bindParamEntityIds(reg) - - // query array param entityIds - if err := r.SetQueryParam("entityIds", joinedEntityIds...); err != nil { - return err - } - } - - if o.EntityTypes != nil { - - // binding items for entityTypes - joinedEntityTypes := o.bindParamEntityTypes(reg) - - // query array param entityTypes - if err := r.SetQueryParam("entityTypes", joinedEntityTypes...); err != nil { - return err - } - } - - if o.Filename != nil { - - // query param filename - var qrFilename string - - if o.Filename != nil { - qrFilename = *o.Filename - } - qFilename := qrFilename - if qFilename != "" { - - if err := r.SetQueryParam("filename", qFilename); err != nil { - return err - } - } - } - - if o.FolderName != nil { - - // query param folderName - var qrFolderName string - - if o.FolderName != nil { - qrFolderName = *o.FolderName - } - qFolderName := qrFolderName - if qFolderName != "" { - - if err := r.SetQueryParam("folderName", qFolderName); err != nil { - return err - } - } - } - - if o.From != nil { - - // query param from - var qrFrom int64 - - if o.From != nil { - qrFrom = *o.From - } - qFrom := swag.FormatInt64(qrFrom) - if qFrom != "" { - - if err := r.SetQueryParam("from", qFrom); err != nil { - return err - } - } - } - - if o.HasAttachments != nil { - - // query param hasAttachments - var qrHasAttachments bool - - if o.HasAttachments != nil { - qrHasAttachments = *o.HasAttachments - } - qHasAttachments := swag.FormatBool(qrHasAttachments) - if qHasAttachments != "" { - - if err := r.SetQueryParam("hasAttachments", qHasAttachments); err != nil { - return err - } - } - } - - if o.IsFolder != nil { - - // query param isFolder - var qrIsFolder bool - - if o.IsFolder != nil { - qrIsFolder = *o.IsFolder - } - qIsFolder := swag.FormatBool(qrIsFolder) - if qIsFolder != "" { - - if err := r.SetQueryParam("isFolder", qIsFolder); err != nil { - return err - } - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.MailboxIds != nil { - - // binding items for mailboxIds - joinedMailboxIds := o.bindParamMailboxIds(reg) - - // query array param mailboxIds - if err := r.SetQueryParam("mailboxIds", joinedMailboxIds...); err != nil { - return err - } - } - - if o.MightHaveSnapshotTags != nil { - - // binding items for mightHaveSnapshotTags - joinedMightHaveSnapshotTags := o.bindParamMightHaveSnapshotTags(reg) - - // query array param mightHaveSnapshotTags - if err := r.SetQueryParam("mightHaveSnapshotTags", joinedMightHaveSnapshotTags...); err != nil { - return err - } - } - - if o.MightHaveTags != nil { - - // binding items for mightHaveTags - joinedMightHaveTags := o.bindParamMightHaveTags(reg) - - // query array param mightHaveTags - if err := r.SetQueryParam("mightHaveTags", joinedMightHaveTags...); err != nil { - return err - } - } - - if o.MustHaveSnapshotTags != nil { - - // binding items for mustHaveSnapshotTags - joinedMustHaveSnapshotTags := o.bindParamMustHaveSnapshotTags(reg) - - // query array param mustHaveSnapshotTags - if err := r.SetQueryParam("mustHaveSnapshotTags", joinedMustHaveSnapshotTags...); err != nil { - return err - } - } - - if o.MustHaveTags != nil { - - // binding items for mustHaveTags - joinedMustHaveTags := o.bindParamMustHaveTags(reg) - - // query array param mustHaveTags - if err := r.SetQueryParam("mustHaveTags", joinedMustHaveTags...); err != nil { - return err - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if o.ObjectType != nil { - - // query param objectType - var qrObjectType string - - if o.ObjectType != nil { - qrObjectType = *o.ObjectType - } - qObjectType := qrObjectType - if qObjectType != "" { - - if err := r.SetQueryParam("objectType", qObjectType); err != nil { - return err - } - } - } - - if o.Office365SearchType != nil { - - // query param office365SearchType - var qrOffice365SearchType int32 - - if o.Office365SearchType != nil { - qrOffice365SearchType = *o.Office365SearchType - } - qOffice365SearchType := swag.FormatInt32(qrOffice365SearchType) - if qOffice365SearchType != "" { - - if err := r.SetQueryParam("office365SearchType", qOffice365SearchType); err != nil { - return err - } - } - } - - if o.PageSize != nil { - - // query param pageSize - var qrPageSize int32 - - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - - if err := r.SetQueryParam("pageSize", qPageSize); err != nil { - return err - } - } - } - - if o.Paginate != nil { - - // query param paginate - var qrPaginate bool - - if o.Paginate != nil { - qrPaginate = *o.Paginate - } - qPaginate := swag.FormatBool(qrPaginate) - if qPaginate != "" { - - if err := r.SetQueryParam("paginate", qPaginate); err != nil { - return err - } - } - } - - 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.ProtectionJobIds != nil { - - // binding items for protectionJobIds - joinedProtectionJobIds := o.bindParamProtectionJobIds(reg) - - // query array param protectionJobIds - if err := r.SetQueryParam("protectionJobIds", joinedProtectionJobIds...); err != nil { - return err - } - } - - if o.ReceivedEndTime != nil { - - // query param receivedEndTime - var qrReceivedEndTime int64 - - if o.ReceivedEndTime != nil { - qrReceivedEndTime = *o.ReceivedEndTime - } - qReceivedEndTime := swag.FormatInt64(qrReceivedEndTime) - if qReceivedEndTime != "" { - - if err := r.SetQueryParam("receivedEndTime", qReceivedEndTime); err != nil { - return err - } - } - } - - if o.ReceivedStartTime != nil { - - // query param receivedStartTime - var qrReceivedStartTime int64 - - if o.ReceivedStartTime != nil { - qrReceivedStartTime = *o.ReceivedStartTime - } - qReceivedStartTime := swag.FormatInt64(qrReceivedStartTime) - if qReceivedStartTime != "" { - - if err := r.SetQueryParam("receivedStartTime", qReceivedStartTime); err != nil { - return err - } - } - } - - if o.ReceivedTimeSeconds != nil { - - // query param receivedTimeSeconds - var qrReceivedTimeSeconds int64 - - if o.ReceivedTimeSeconds != nil { - qrReceivedTimeSeconds = *o.ReceivedTimeSeconds - } - qReceivedTimeSeconds := swag.FormatInt64(qrReceivedTimeSeconds) - if qReceivedTimeSeconds != "" { - - if err := r.SetQueryParam("receivedTimeSeconds", qReceivedTimeSeconds); err != nil { - return err - } - } - } - - if o.RecipientAddresses != nil { - - // binding items for recipientAddresses - joinedRecipientAddresses := o.bindParamRecipientAddresses(reg) - - // query array param recipientAddresses - if err := r.SetQueryParam("recipientAddresses", joinedRecipientAddresses...); err != nil { - return err - } - } - - if o.RegisteredSourceIds != nil { - - // binding items for registeredSourceIds - joinedRegisteredSourceIds := o.bindParamRegisteredSourceIds(reg) - - // query array param registeredSourceIds - if err := r.SetQueryParam("registeredSourceIds", joinedRegisteredSourceIds...); err != nil { - return err - } - } - - if o.SamAccountName != nil { - - // query param samAccountName - var qrSamAccountName string - - if o.SamAccountName != nil { - qrSamAccountName = *o.SamAccountName - } - qSamAccountName := qrSamAccountName - if qSamAccountName != "" { - - if err := r.SetQueryParam("samAccountName", qSamAccountName); err != nil { - return err - } - } - } - - if o.SenderAddress != nil { - - // query param senderAddress - var qrSenderAddress string - - if o.SenderAddress != nil { - qrSenderAddress = *o.SenderAddress - } - qSenderAddress := qrSenderAddress - if qSenderAddress != "" { - - if err := r.SetQueryParam("senderAddress", qSenderAddress); err != nil { - return err - } - } - } - - if o.SentTimeSeconds != nil { - - // query param sentTimeSeconds - var qrSentTimeSeconds int64 - - if o.SentTimeSeconds != nil { - qrSentTimeSeconds = *o.SentTimeSeconds - } - qSentTimeSeconds := swag.FormatInt64(qrSentTimeSeconds) - if qSentTimeSeconds != "" { - - if err := r.SetQueryParam("sentTimeSeconds", qSentTimeSeconds); err != nil { - return err - } - } - } - - if o.ShowOnlyEmailFolders != nil { - - // query param showOnlyEmailFolders - var qrShowOnlyEmailFolders bool - - if o.ShowOnlyEmailFolders != nil { - qrShowOnlyEmailFolders = *o.ShowOnlyEmailFolders - } - qShowOnlyEmailFolders := swag.FormatBool(qrShowOnlyEmailFolders) - if qShowOnlyEmailFolders != "" { - - if err := r.SetQueryParam("showOnlyEmailFolders", qShowOnlyEmailFolders); err != nil { - return err - } - } - } - - if o.Size != nil { - - // query param size - var qrSize int64 - - if o.Size != nil { - qrSize = *o.Size - } - qSize := swag.FormatInt64(qrSize) - if qSize != "" { - - if err := r.SetQueryParam("size", qSize); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchFiles binds the parameter bccRecipientAddresses -func (o *SearchFilesParams) bindParamBccRecipientAddresses(formats strfmt.Registry) []string { - bccRecipientAddressesIR := o.BccRecipientAddresses - - var bccRecipientAddressesIC []string - for _, bccRecipientAddressesIIR := range bccRecipientAddressesIR { // explode []string - - bccRecipientAddressesIIV := bccRecipientAddressesIIR // string as string - bccRecipientAddressesIC = append(bccRecipientAddressesIC, bccRecipientAddressesIIV) - } - - // items.CollectionFormat: "" - bccRecipientAddressesIS := swag.JoinByFormat(bccRecipientAddressesIC, "") - - return bccRecipientAddressesIS -} - -// bindParamSearchFiles binds the parameter ccRecipientAddresses -func (o *SearchFilesParams) bindParamCcRecipientAddresses(formats strfmt.Registry) []string { - ccRecipientAddressesIR := o.CcRecipientAddresses - - var ccRecipientAddressesIC []string - for _, ccRecipientAddressesIIR := range ccRecipientAddressesIR { // explode []string - - ccRecipientAddressesIIV := ccRecipientAddressesIIR // string as string - ccRecipientAddressesIC = append(ccRecipientAddressesIC, ccRecipientAddressesIIV) - } - - // items.CollectionFormat: "" - ccRecipientAddressesIS := swag.JoinByFormat(ccRecipientAddressesIC, "") - - return ccRecipientAddressesIS -} - -// bindParamSearchFiles binds the parameter domainIds -func (o *SearchFilesParams) bindParamDomainIds(formats strfmt.Registry) []string { - domainIdsIR := o.DomainIds - - var domainIdsIC []string - for _, domainIdsIIR := range domainIdsIR { // explode []int64 - - domainIdsIIV := swag.FormatInt64(domainIdsIIR) // int64 as string - domainIdsIC = append(domainIdsIC, domainIdsIIV) - } - - // items.CollectionFormat: "" - domainIdsIS := swag.JoinByFormat(domainIdsIC, "") - - return domainIdsIS -} - -// bindParamSearchFiles binds the parameter entityIds -func (o *SearchFilesParams) bindParamEntityIds(formats strfmt.Registry) []string { - entityIdsIR := o.EntityIds - - var entityIdsIC []string - for _, entityIdsIIR := range entityIdsIR { // explode []int64 - - entityIdsIIV := swag.FormatInt64(entityIdsIIR) // int64 as string - entityIdsIC = append(entityIdsIC, entityIdsIIV) - } - - // items.CollectionFormat: "" - entityIdsIS := swag.JoinByFormat(entityIdsIC, "") - - return entityIdsIS -} - -// bindParamSearchFiles binds the parameter entityTypes -func (o *SearchFilesParams) bindParamEntityTypes(formats strfmt.Registry) []string { - entityTypesIR := o.EntityTypes - - var entityTypesIC []string - for _, entityTypesIIR := range entityTypesIR { // explode []string - - entityTypesIIV := entityTypesIIR // string as string - entityTypesIC = append(entityTypesIC, entityTypesIIV) - } - - // items.CollectionFormat: "" - entityTypesIS := swag.JoinByFormat(entityTypesIC, "") - - return entityTypesIS -} - -// bindParamSearchFiles binds the parameter jobIds -func (o *SearchFilesParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamSearchFiles binds the parameter mailboxIds -func (o *SearchFilesParams) bindParamMailboxIds(formats strfmt.Registry) []string { - mailboxIdsIR := o.MailboxIds - - var mailboxIdsIC []string - for _, mailboxIdsIIR := range mailboxIdsIR { // explode []int64 - - mailboxIdsIIV := swag.FormatInt64(mailboxIdsIIR) // int64 as string - mailboxIdsIC = append(mailboxIdsIC, mailboxIdsIIV) - } - - // items.CollectionFormat: "" - mailboxIdsIS := swag.JoinByFormat(mailboxIdsIC, "") - - return mailboxIdsIS -} - -// bindParamSearchFiles binds the parameter mightHaveSnapshotTags -func (o *SearchFilesParams) bindParamMightHaveSnapshotTags(formats strfmt.Registry) []string { - mightHaveSnapshotTagsIR := o.MightHaveSnapshotTags - - var mightHaveSnapshotTagsIC []string - for _, mightHaveSnapshotTagsIIR := range mightHaveSnapshotTagsIR { // explode []string - - mightHaveSnapshotTagsIIV := mightHaveSnapshotTagsIIR // string as string - mightHaveSnapshotTagsIC = append(mightHaveSnapshotTagsIC, mightHaveSnapshotTagsIIV) - } - - // items.CollectionFormat: "" - mightHaveSnapshotTagsIS := swag.JoinByFormat(mightHaveSnapshotTagsIC, "") - - return mightHaveSnapshotTagsIS -} - -// bindParamSearchFiles binds the parameter mightHaveTags -func (o *SearchFilesParams) bindParamMightHaveTags(formats strfmt.Registry) []string { - mightHaveTagsIR := o.MightHaveTags - - var mightHaveTagsIC []string - for _, mightHaveTagsIIR := range mightHaveTagsIR { // explode []string - - mightHaveTagsIIV := mightHaveTagsIIR // string as string - mightHaveTagsIC = append(mightHaveTagsIC, mightHaveTagsIIV) - } - - // items.CollectionFormat: "" - mightHaveTagsIS := swag.JoinByFormat(mightHaveTagsIC, "") - - return mightHaveTagsIS -} - -// bindParamSearchFiles binds the parameter mustHaveSnapshotTags -func (o *SearchFilesParams) bindParamMustHaveSnapshotTags(formats strfmt.Registry) []string { - mustHaveSnapshotTagsIR := o.MustHaveSnapshotTags - - var mustHaveSnapshotTagsIC []string - for _, mustHaveSnapshotTagsIIR := range mustHaveSnapshotTagsIR { // explode []string - - mustHaveSnapshotTagsIIV := mustHaveSnapshotTagsIIR // string as string - mustHaveSnapshotTagsIC = append(mustHaveSnapshotTagsIC, mustHaveSnapshotTagsIIV) - } - - // items.CollectionFormat: "" - mustHaveSnapshotTagsIS := swag.JoinByFormat(mustHaveSnapshotTagsIC, "") - - return mustHaveSnapshotTagsIS -} - -// bindParamSearchFiles binds the parameter mustHaveTags -func (o *SearchFilesParams) bindParamMustHaveTags(formats strfmt.Registry) []string { - mustHaveTagsIR := o.MustHaveTags - - var mustHaveTagsIC []string - for _, mustHaveTagsIIR := range mustHaveTagsIR { // explode []string - - mustHaveTagsIIV := mustHaveTagsIIR // string as string - mustHaveTagsIC = append(mustHaveTagsIC, mustHaveTagsIIV) - } - - // items.CollectionFormat: "" - mustHaveTagsIS := swag.JoinByFormat(mustHaveTagsIC, "") - - return mustHaveTagsIS -} - -// bindParamSearchFiles binds the parameter protectionJobIds -func (o *SearchFilesParams) bindParamProtectionJobIds(formats strfmt.Registry) []string { - protectionJobIdsIR := o.ProtectionJobIds - - var protectionJobIdsIC []string - for _, protectionJobIdsIIR := range protectionJobIdsIR { // explode []int64 - - protectionJobIdsIIV := swag.FormatInt64(protectionJobIdsIIR) // int64 as string - protectionJobIdsIC = append(protectionJobIdsIC, protectionJobIdsIIV) - } - - // items.CollectionFormat: "" - protectionJobIdsIS := swag.JoinByFormat(protectionJobIdsIC, "") - - return protectionJobIdsIS -} - -// bindParamSearchFiles binds the parameter recipientAddresses -func (o *SearchFilesParams) bindParamRecipientAddresses(formats strfmt.Registry) []string { - recipientAddressesIR := o.RecipientAddresses - - var recipientAddressesIC []string - for _, recipientAddressesIIR := range recipientAddressesIR { // explode []string - - recipientAddressesIIV := recipientAddressesIIR // string as string - recipientAddressesIC = append(recipientAddressesIC, recipientAddressesIIV) - } - - // items.CollectionFormat: "" - recipientAddressesIS := swag.JoinByFormat(recipientAddressesIC, "") - - return recipientAddressesIS -} - -// bindParamSearchFiles binds the parameter registeredSourceIds -func (o *SearchFilesParams) bindParamRegisteredSourceIds(formats strfmt.Registry) []string { - registeredSourceIdsIR := o.RegisteredSourceIds - - var registeredSourceIdsIC []string - for _, registeredSourceIdsIIR := range registeredSourceIdsIR { // explode []int64 - - registeredSourceIdsIIV := swag.FormatInt64(registeredSourceIdsIIR) // int64 as string - registeredSourceIdsIC = append(registeredSourceIdsIC, registeredSourceIdsIIV) - } - - // items.CollectionFormat: "" - registeredSourceIdsIS := swag.JoinByFormat(registeredSourceIdsIC, "") - - return registeredSourceIdsIS -} - -// bindParamSearchFiles binds the parameter viewBoxIds -func (o *SearchFilesParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/search_files/search_files_responses.go b/v1/client/search_files/search_files_responses.go deleted file mode 100644 index 0b153356..00000000 --- a/v1/client/search_files/search_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_files - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchFilesReader is a Reader for the SearchFiles structure. -type SearchFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchFilesDefault(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 - } -} - -// NewSearchFilesOK creates a SearchFilesOK with default headers values -func NewSearchFilesOK() *SearchFilesOK { - return &SearchFilesOK{} -} - -/* -SearchFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchFilesOK struct { - Payload *models.FileResults -} - -// IsSuccess returns true when this search files o k response has a 2xx status code -func (o *SearchFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search files o k response has a 3xx status code -func (o *SearchFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search files o k response has a 4xx status code -func (o *SearchFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search files o k response has a 5xx status code -func (o *SearchFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search files o k response a status code equal to that given -func (o *SearchFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search files o k response -func (o *SearchFilesOK) Code() int { - return 200 -} - -func (o *SearchFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchfiles][%d] searchFilesOK %s", 200, payload) -} - -func (o *SearchFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchfiles][%d] searchFilesOK %s", 200, payload) -} - -func (o *SearchFilesOK) GetPayload() *models.FileResults { - return o.Payload -} - -func (o *SearchFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchFilesDefault creates a SearchFilesDefault with default headers values -func NewSearchFilesDefault(code int) *SearchFilesDefault { - return &SearchFilesDefault{ - _statusCode: code, - } -} - -/* -SearchFilesDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type SearchFilesDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this search files default response has a 2xx status code -func (o *SearchFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search files default response has a 3xx status code -func (o *SearchFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search files default response has a 4xx status code -func (o *SearchFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search files default response has a 5xx status code -func (o *SearchFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search files default response a status code equal to that given -func (o *SearchFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search files default response -func (o *SearchFilesDefault) Code() int { - return o._statusCode -} - -func (o *SearchFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchfiles][%d] SearchFiles default %s", o._statusCode, payload) -} - -func (o *SearchFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchfiles][%d] SearchFiles default %s", o._statusCode, payload) -} - -func (o *SearchFilesDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *SearchFilesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/search_vms/search_vms_client.go b/v1/client/search_vms/search_vms_client.go deleted file mode 100644 index b680ddc0..00000000 --- a/v1/client/search_vms/search_vms_client.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_vms - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new search vms API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new search vms API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new search vms API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for search vms API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - SearchVms(params *SearchVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchVmsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -SearchVms searches for v ms -*/ -func (a *Client) SearchVms(params *SearchVmsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchVmsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchVmsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchVms", - Method: "GET", - PathPattern: "/searchvms", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchVmsReader{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.(*SearchVmsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchVmsDefault) - 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/search_vms/search_vms_parameters.go b/v1/client/search_vms/search_vms_parameters.go deleted file mode 100644 index 1ec275ac..00000000 --- a/v1/client/search_vms/search_vms_parameters.go +++ /dev/null @@ -1,981 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_vms - -// 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/go-openapi/swag" -) - -// NewSearchVmsParams creates a new SearchVmsParams 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 NewSearchVmsParams() *SearchVmsParams { - return &SearchVmsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchVmsParamsWithTimeout creates a new SearchVmsParams object -// with the ability to set a timeout on a request. -func NewSearchVmsParamsWithTimeout(timeout time.Duration) *SearchVmsParams { - return &SearchVmsParams{ - timeout: timeout, - } -} - -// NewSearchVmsParamsWithContext creates a new SearchVmsParams object -// with the ability to set a context for a request. -func NewSearchVmsParamsWithContext(ctx context.Context) *SearchVmsParams { - return &SearchVmsParams{ - Context: ctx, - } -} - -// NewSearchVmsParamsWithHTTPClient creates a new SearchVmsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchVmsParamsWithHTTPClient(client *http.Client) *SearchVmsParams { - return &SearchVmsParams{ - HTTPClient: client, - } -} - -/* -SearchVmsParams contains all the parameters to send to the API endpoint - - for the search vms operation. - - Typically these are written to a http.Request. -*/ -type SearchVmsParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - of tenant with id TenantId should be returned. - */ - AllUnderHierarchy *bool - - /* EntityIds. - - EntityIds are the ids of the objects (e.g. VMs). - */ - EntityIds []int64 - - /* EntityTypes. - - EntityTypes are the types of the entity being requested e.g. kView, - kVMware, kPhysical. - */ - EntityTypes []string - - /* Environment. - - Environment is the type of application environment. For SQL, it will be - specified as SQL. - */ - Environment *string - - /* ExcludeJobTypes. - - Exclude search results for the specified job types. - */ - ExcludeJobTypes []string - - /* From. - - From is the start index (0-based) used for ElasticSearch results - pagination. - - Format: int64 - */ - From *int64 - - /* FromTimeUsecs. - - FromTimeUsecs is the start range for the time the VM backup was completed. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* JobIds. - - JobIds are the ids of the jobs the VM backup came from. - */ - JobIds []int64 - - /* JobTypes. - - JobTypes are the types of the job being requested e.g. kHyperV, - kHyperVVSS. It almost mirrors the EntityTypes except in few cases like - JobType for hypervEntities (HyperV, HyperV2k12) are different but the - EntityTypes for both the hypervEntities are same - */ - JobTypes []string - - /* Office365EntityTypes. - - Office365EntityTypes are the types of sub entities within an Office365 - entity. Refer main/magneto/base/entities/o365.proto for details. - */ - Office365EntityTypes []string - - /* OnlyLatestVersion. - - Include only latest version if following flag is passed as true. - */ - OnlyLatestVersion *bool - - /* OsTypes. - - OsTypes are the types of the OS being requested. It only applies to VMs - and physical servers. - */ - OsTypes []string - - /* OwnerEntityID. - - OwnerEntityId applies only if searching for applications e.g. SQL DB. - OwnerEntityId refers to the Entity Id of the owner VM. For example, if - OwnerEntityId is provided while searching for SQL DBs, only SQL DBs - belonging to the VM having Id specified by OwnerEntityId will be returned. - - Format: int64 - */ - OwnerEntityID *int64 - - /* RegisteredSourceIds. - - RegisteredSourceIds are the Ids of the top-level registered entities the VM - belongs to. - */ - RegisteredSourceIds []int64 - - /* RunTypes. - - RunTypes are the types of the run being requested e.g. kRegular, kFull - kLog, kSystem and kHydrateCDP. - */ - RunTypes []string - - /* ShowAll. - - If showAll is false then all those objects are returned which are stored - locally or those object which are archived but are file based. - */ - ShowAll *bool - - /* Size. - - Size is the number of results to return in each pagination query. - - Format: int64 - */ - Size *int64 - - /* TenantID. - - TenantId specifies the tenant whose action resulted in the audit log. - */ - TenantID *string - - /* ToTimeUsecs. - - ToTimeUsecs is the end range for the time the VM backup was completed. - - Format: int64 - */ - ToTimeUsecs *int64 - - /* ViewBoxIds. - - ViewBoxIds are the ids of the view boxes where the VM was saved. - */ - ViewBoxIds []int64 - - /* VMName. - - VmName is the name of the VM to search for. The term can match any - token in the real VM name (i.e. "vm" or "123" would both match - "vm-123"). - */ - VMName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchVmsParams) WithDefaults() *SearchVmsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search vms params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchVmsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search vms params -func (o *SearchVmsParams) WithTimeout(timeout time.Duration) *SearchVmsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search vms params -func (o *SearchVmsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search vms params -func (o *SearchVmsParams) WithContext(ctx context.Context) *SearchVmsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search vms params -func (o *SearchVmsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search vms params -func (o *SearchVmsParams) WithHTTPClient(client *http.Client) *SearchVmsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search vms params -func (o *SearchVmsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the search vms params -func (o *SearchVmsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *SearchVmsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the search vms params -func (o *SearchVmsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithEntityIds adds the entityIds to the search vms params -func (o *SearchVmsParams) WithEntityIds(entityIds []int64) *SearchVmsParams { - o.SetEntityIds(entityIds) - return o -} - -// SetEntityIds adds the entityIds to the search vms params -func (o *SearchVmsParams) SetEntityIds(entityIds []int64) { - o.EntityIds = entityIds -} - -// WithEntityTypes adds the entityTypes to the search vms params -func (o *SearchVmsParams) WithEntityTypes(entityTypes []string) *SearchVmsParams { - o.SetEntityTypes(entityTypes) - return o -} - -// SetEntityTypes adds the entityTypes to the search vms params -func (o *SearchVmsParams) SetEntityTypes(entityTypes []string) { - o.EntityTypes = entityTypes -} - -// WithEnvironment adds the environment to the search vms params -func (o *SearchVmsParams) WithEnvironment(environment *string) *SearchVmsParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the search vms params -func (o *SearchVmsParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithExcludeJobTypes adds the excludeJobTypes to the search vms params -func (o *SearchVmsParams) WithExcludeJobTypes(excludeJobTypes []string) *SearchVmsParams { - o.SetExcludeJobTypes(excludeJobTypes) - return o -} - -// SetExcludeJobTypes adds the excludeJobTypes to the search vms params -func (o *SearchVmsParams) SetExcludeJobTypes(excludeJobTypes []string) { - o.ExcludeJobTypes = excludeJobTypes -} - -// WithFrom adds the from to the search vms params -func (o *SearchVmsParams) WithFrom(from *int64) *SearchVmsParams { - o.SetFrom(from) - return o -} - -// SetFrom adds the from to the search vms params -func (o *SearchVmsParams) SetFrom(from *int64) { - o.From = from -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the search vms params -func (o *SearchVmsParams) WithFromTimeUsecs(fromTimeUsecs *int64) *SearchVmsParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the search vms params -func (o *SearchVmsParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithJobIds adds the jobIds to the search vms params -func (o *SearchVmsParams) WithJobIds(jobIds []int64) *SearchVmsParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the search vms params -func (o *SearchVmsParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithJobTypes adds the jobTypes to the search vms params -func (o *SearchVmsParams) WithJobTypes(jobTypes []string) *SearchVmsParams { - o.SetJobTypes(jobTypes) - return o -} - -// SetJobTypes adds the jobTypes to the search vms params -func (o *SearchVmsParams) SetJobTypes(jobTypes []string) { - o.JobTypes = jobTypes -} - -// WithOffice365EntityTypes adds the office365EntityTypes to the search vms params -func (o *SearchVmsParams) WithOffice365EntityTypes(office365EntityTypes []string) *SearchVmsParams { - o.SetOffice365EntityTypes(office365EntityTypes) - return o -} - -// SetOffice365EntityTypes adds the office365EntityTypes to the search vms params -func (o *SearchVmsParams) SetOffice365EntityTypes(office365EntityTypes []string) { - o.Office365EntityTypes = office365EntityTypes -} - -// WithOnlyLatestVersion adds the onlyLatestVersion to the search vms params -func (o *SearchVmsParams) WithOnlyLatestVersion(onlyLatestVersion *bool) *SearchVmsParams { - o.SetOnlyLatestVersion(onlyLatestVersion) - return o -} - -// SetOnlyLatestVersion adds the onlyLatestVersion to the search vms params -func (o *SearchVmsParams) SetOnlyLatestVersion(onlyLatestVersion *bool) { - o.OnlyLatestVersion = onlyLatestVersion -} - -// WithOsTypes adds the osTypes to the search vms params -func (o *SearchVmsParams) WithOsTypes(osTypes []string) *SearchVmsParams { - o.SetOsTypes(osTypes) - return o -} - -// SetOsTypes adds the osTypes to the search vms params -func (o *SearchVmsParams) SetOsTypes(osTypes []string) { - o.OsTypes = osTypes -} - -// WithOwnerEntityID adds the ownerEntityID to the search vms params -func (o *SearchVmsParams) WithOwnerEntityID(ownerEntityID *int64) *SearchVmsParams { - o.SetOwnerEntityID(ownerEntityID) - return o -} - -// SetOwnerEntityID adds the ownerEntityId to the search vms params -func (o *SearchVmsParams) SetOwnerEntityID(ownerEntityID *int64) { - o.OwnerEntityID = ownerEntityID -} - -// WithRegisteredSourceIds adds the registeredSourceIds to the search vms params -func (o *SearchVmsParams) WithRegisteredSourceIds(registeredSourceIds []int64) *SearchVmsParams { - o.SetRegisteredSourceIds(registeredSourceIds) - return o -} - -// SetRegisteredSourceIds adds the registeredSourceIds to the search vms params -func (o *SearchVmsParams) SetRegisteredSourceIds(registeredSourceIds []int64) { - o.RegisteredSourceIds = registeredSourceIds -} - -// WithRunTypes adds the runTypes to the search vms params -func (o *SearchVmsParams) WithRunTypes(runTypes []string) *SearchVmsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the search vms params -func (o *SearchVmsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithShowAll adds the showAll to the search vms params -func (o *SearchVmsParams) WithShowAll(showAll *bool) *SearchVmsParams { - o.SetShowAll(showAll) - return o -} - -// SetShowAll adds the showAll to the search vms params -func (o *SearchVmsParams) SetShowAll(showAll *bool) { - o.ShowAll = showAll -} - -// WithSize adds the size to the search vms params -func (o *SearchVmsParams) WithSize(size *int64) *SearchVmsParams { - o.SetSize(size) - return o -} - -// SetSize adds the size to the search vms params -func (o *SearchVmsParams) SetSize(size *int64) { - o.Size = size -} - -// WithTenantID adds the tenantID to the search vms params -func (o *SearchVmsParams) WithTenantID(tenantID *string) *SearchVmsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the search vms params -func (o *SearchVmsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WithToTimeUsecs adds the toTimeUsecs to the search vms params -func (o *SearchVmsParams) WithToTimeUsecs(toTimeUsecs *int64) *SearchVmsParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the search vms params -func (o *SearchVmsParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WithViewBoxIds adds the viewBoxIds to the search vms params -func (o *SearchVmsParams) WithViewBoxIds(viewBoxIds []int64) *SearchVmsParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the search vms params -func (o *SearchVmsParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WithVMName adds the vMName to the search vms params -func (o *SearchVmsParams) WithVMName(vMName *string) *SearchVmsParams { - o.SetVMName(vMName) - return o -} - -// SetVMName adds the vmName to the search vms params -func (o *SearchVmsParams) SetVMName(vMName *string) { - o.VMName = vMName -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchVmsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.EntityIds != nil { - - // binding items for entityIds - joinedEntityIds := o.bindParamEntityIds(reg) - - // query array param entityIds - if err := r.SetQueryParam("entityIds", joinedEntityIds...); err != nil { - return err - } - } - - if o.EntityTypes != nil { - - // binding items for entityTypes - joinedEntityTypes := o.bindParamEntityTypes(reg) - - // query array param entityTypes - if err := r.SetQueryParam("entityTypes", joinedEntityTypes...); err != nil { - return err - } - } - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - if o.ExcludeJobTypes != nil { - - // binding items for excludeJobTypes - joinedExcludeJobTypes := o.bindParamExcludeJobTypes(reg) - - // query array param excludeJobTypes - if err := r.SetQueryParam("excludeJobTypes", joinedExcludeJobTypes...); err != nil { - return err - } - } - - if o.From != nil { - - // query param from - var qrFrom int64 - - if o.From != nil { - qrFrom = *o.From - } - qFrom := swag.FormatInt64(qrFrom) - if qFrom != "" { - - if err := r.SetQueryParam("from", qFrom); err != nil { - return err - } - } - } - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.JobTypes != nil { - - // binding items for jobTypes - joinedJobTypes := o.bindParamJobTypes(reg) - - // query array param jobTypes - if err := r.SetQueryParam("jobTypes", joinedJobTypes...); err != nil { - return err - } - } - - if o.Office365EntityTypes != nil { - - // binding items for office365EntityTypes - joinedOffice365EntityTypes := o.bindParamOffice365EntityTypes(reg) - - // query array param office365EntityTypes - if err := r.SetQueryParam("office365EntityTypes", joinedOffice365EntityTypes...); err != nil { - return err - } - } - - if o.OnlyLatestVersion != nil { - - // query param onlyLatestVersion - var qrOnlyLatestVersion bool - - if o.OnlyLatestVersion != nil { - qrOnlyLatestVersion = *o.OnlyLatestVersion - } - qOnlyLatestVersion := swag.FormatBool(qrOnlyLatestVersion) - if qOnlyLatestVersion != "" { - - if err := r.SetQueryParam("onlyLatestVersion", qOnlyLatestVersion); err != nil { - return err - } - } - } - - if o.OsTypes != nil { - - // binding items for osTypes - joinedOsTypes := o.bindParamOsTypes(reg) - - // query array param osTypes - if err := r.SetQueryParam("osTypes", joinedOsTypes...); err != nil { - return err - } - } - - if o.OwnerEntityID != nil { - - // query param ownerEntityId - var qrOwnerEntityID int64 - - if o.OwnerEntityID != nil { - qrOwnerEntityID = *o.OwnerEntityID - } - qOwnerEntityID := swag.FormatInt64(qrOwnerEntityID) - if qOwnerEntityID != "" { - - if err := r.SetQueryParam("ownerEntityId", qOwnerEntityID); err != nil { - return err - } - } - } - - if o.RegisteredSourceIds != nil { - - // binding items for registeredSourceIds - joinedRegisteredSourceIds := o.bindParamRegisteredSourceIds(reg) - - // query array param registeredSourceIds - if err := r.SetQueryParam("registeredSourceIds", joinedRegisteredSourceIds...); err != nil { - return err - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.ShowAll != nil { - - // query param showAll - var qrShowAll bool - - if o.ShowAll != nil { - qrShowAll = *o.ShowAll - } - qShowAll := swag.FormatBool(qrShowAll) - if qShowAll != "" { - - if err := r.SetQueryParam("showAll", qShowAll); err != nil { - return err - } - } - } - - if o.Size != nil { - - // query param size - var qrSize int64 - - if o.Size != nil { - qrSize = *o.Size - } - qSize := swag.FormatInt64(qrSize) - if qSize != "" { - - if err := r.SetQueryParam("size", qSize); err != nil { - return err - } - } - } - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if o.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if o.VMName != nil { - - // query param vmName - var qrVMName string - - if o.VMName != nil { - qrVMName = *o.VMName - } - qVMName := qrVMName - if qVMName != "" { - - if err := r.SetQueryParam("vmName", qVMName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchVms binds the parameter entityIds -func (o *SearchVmsParams) bindParamEntityIds(formats strfmt.Registry) []string { - entityIdsIR := o.EntityIds - - var entityIdsIC []string - for _, entityIdsIIR := range entityIdsIR { // explode []int64 - - entityIdsIIV := swag.FormatInt64(entityIdsIIR) // int64 as string - entityIdsIC = append(entityIdsIC, entityIdsIIV) - } - - // items.CollectionFormat: "" - entityIdsIS := swag.JoinByFormat(entityIdsIC, "") - - return entityIdsIS -} - -// bindParamSearchVms binds the parameter entityTypes -func (o *SearchVmsParams) bindParamEntityTypes(formats strfmt.Registry) []string { - entityTypesIR := o.EntityTypes - - var entityTypesIC []string - for _, entityTypesIIR := range entityTypesIR { // explode []string - - entityTypesIIV := entityTypesIIR // string as string - entityTypesIC = append(entityTypesIC, entityTypesIIV) - } - - // items.CollectionFormat: "" - entityTypesIS := swag.JoinByFormat(entityTypesIC, "") - - return entityTypesIS -} - -// bindParamSearchVms binds the parameter excludeJobTypes -func (o *SearchVmsParams) bindParamExcludeJobTypes(formats strfmt.Registry) []string { - excludeJobTypesIR := o.ExcludeJobTypes - - var excludeJobTypesIC []string - for _, excludeJobTypesIIR := range excludeJobTypesIR { // explode []string - - excludeJobTypesIIV := excludeJobTypesIIR // string as string - excludeJobTypesIC = append(excludeJobTypesIC, excludeJobTypesIIV) - } - - // items.CollectionFormat: "" - excludeJobTypesIS := swag.JoinByFormat(excludeJobTypesIC, "") - - return excludeJobTypesIS -} - -// bindParamSearchVms binds the parameter jobIds -func (o *SearchVmsParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamSearchVms binds the parameter jobTypes -func (o *SearchVmsParams) bindParamJobTypes(formats strfmt.Registry) []string { - jobTypesIR := o.JobTypes - - var jobTypesIC []string - for _, jobTypesIIR := range jobTypesIR { // explode []string - - jobTypesIIV := jobTypesIIR // string as string - jobTypesIC = append(jobTypesIC, jobTypesIIV) - } - - // items.CollectionFormat: "" - jobTypesIS := swag.JoinByFormat(jobTypesIC, "") - - return jobTypesIS -} - -// bindParamSearchVms binds the parameter office365EntityTypes -func (o *SearchVmsParams) bindParamOffice365EntityTypes(formats strfmt.Registry) []string { - office365EntityTypesIR := o.Office365EntityTypes - - var office365EntityTypesIC []string - for _, office365EntityTypesIIR := range office365EntityTypesIR { // explode []string - - office365EntityTypesIIV := office365EntityTypesIIR // string as string - office365EntityTypesIC = append(office365EntityTypesIC, office365EntityTypesIIV) - } - - // items.CollectionFormat: "" - office365EntityTypesIS := swag.JoinByFormat(office365EntityTypesIC, "") - - return office365EntityTypesIS -} - -// bindParamSearchVms binds the parameter osTypes -func (o *SearchVmsParams) bindParamOsTypes(formats strfmt.Registry) []string { - osTypesIR := o.OsTypes - - var osTypesIC []string - for _, osTypesIIR := range osTypesIR { // explode []string - - osTypesIIV := osTypesIIR // string as string - osTypesIC = append(osTypesIC, osTypesIIV) - } - - // items.CollectionFormat: "" - osTypesIS := swag.JoinByFormat(osTypesIC, "") - - return osTypesIS -} - -// bindParamSearchVms binds the parameter registeredSourceIds -func (o *SearchVmsParams) bindParamRegisteredSourceIds(formats strfmt.Registry) []string { - registeredSourceIdsIR := o.RegisteredSourceIds - - var registeredSourceIdsIC []string - for _, registeredSourceIdsIIR := range registeredSourceIdsIR { // explode []int64 - - registeredSourceIdsIIV := swag.FormatInt64(registeredSourceIdsIIR) // int64 as string - registeredSourceIdsIC = append(registeredSourceIdsIC, registeredSourceIdsIIV) - } - - // items.CollectionFormat: "" - registeredSourceIdsIS := swag.JoinByFormat(registeredSourceIdsIC, "") - - return registeredSourceIdsIS -} - -// bindParamSearchVms binds the parameter runTypes -func (o *SearchVmsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} - -// bindParamSearchVms binds the parameter viewBoxIds -func (o *SearchVmsParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} diff --git a/v1/client/search_vms/search_vms_responses.go b/v1/client/search_vms/search_vms_responses.go deleted file mode 100644 index 0e0793e5..00000000 --- a/v1/client/search_vms/search_vms_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search_vms - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// SearchVmsReader is a Reader for the SearchVms structure. -type SearchVmsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchVmsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchVmsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchVmsDefault(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 - } -} - -// NewSearchVmsOK creates a SearchVmsOK with default headers values -func NewSearchVmsOK() *SearchVmsOK { - return &SearchVmsOK{} -} - -/* -SearchVmsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchVmsOK struct { - Payload *models.VMResults -} - -// IsSuccess returns true when this search vms o k response has a 2xx status code -func (o *SearchVmsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search vms o k response has a 3xx status code -func (o *SearchVmsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search vms o k response has a 4xx status code -func (o *SearchVmsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search vms o k response has a 5xx status code -func (o *SearchVmsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search vms o k response a status code equal to that given -func (o *SearchVmsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search vms o k response -func (o *SearchVmsOK) Code() int { - return 200 -} - -func (o *SearchVmsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchvms][%d] searchVmsOK %s", 200, payload) -} - -func (o *SearchVmsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchvms][%d] searchVmsOK %s", 200, payload) -} - -func (o *SearchVmsOK) GetPayload() *models.VMResults { - return o.Payload -} - -func (o *SearchVmsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VMResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchVmsDefault creates a SearchVmsDefault with default headers values -func NewSearchVmsDefault(code int) *SearchVmsDefault { - return &SearchVmsDefault{ - _statusCode: code, - } -} - -/* -SearchVmsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type SearchVmsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this search vms default response has a 2xx status code -func (o *SearchVmsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search vms default response has a 3xx status code -func (o *SearchVmsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search vms default response has a 4xx status code -func (o *SearchVmsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search vms default response has a 5xx status code -func (o *SearchVmsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search vms default response a status code equal to that given -func (o *SearchVmsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search vms default response -func (o *SearchVmsDefault) Code() int { - return o._statusCode -} - -func (o *SearchVmsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchvms][%d] SearchVms default %s", o._statusCode, payload) -} - -func (o *SearchVmsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /searchvms][%d] SearchVms default %s", o._statusCode, payload) -} - -func (o *SearchVmsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *SearchVmsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/snmp/get_snmp_config_parameters.go b/v1/client/snmp/get_snmp_config_parameters.go deleted file mode 100644 index c460abec..00000000 --- a/v1/client/snmp/get_snmp_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package snmp - -// 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" -) - -// NewGetSnmpConfigParams creates a new GetSnmpConfigParams 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 NewGetSnmpConfigParams() *GetSnmpConfigParams { - return &GetSnmpConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSnmpConfigParamsWithTimeout creates a new GetSnmpConfigParams object -// with the ability to set a timeout on a request. -func NewGetSnmpConfigParamsWithTimeout(timeout time.Duration) *GetSnmpConfigParams { - return &GetSnmpConfigParams{ - timeout: timeout, - } -} - -// NewGetSnmpConfigParamsWithContext creates a new GetSnmpConfigParams object -// with the ability to set a context for a request. -func NewGetSnmpConfigParamsWithContext(ctx context.Context) *GetSnmpConfigParams { - return &GetSnmpConfigParams{ - Context: ctx, - } -} - -// NewGetSnmpConfigParamsWithHTTPClient creates a new GetSnmpConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSnmpConfigParamsWithHTTPClient(client *http.Client) *GetSnmpConfigParams { - return &GetSnmpConfigParams{ - HTTPClient: client, - } -} - -/* -GetSnmpConfigParams contains all the parameters to send to the API endpoint - - for the get snmp config operation. - - Typically these are written to a http.Request. -*/ -type GetSnmpConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get snmp config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSnmpConfigParams) WithDefaults() *GetSnmpConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get snmp config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSnmpConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get snmp config params -func (o *GetSnmpConfigParams) WithTimeout(timeout time.Duration) *GetSnmpConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get snmp config params -func (o *GetSnmpConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get snmp config params -func (o *GetSnmpConfigParams) WithContext(ctx context.Context) *GetSnmpConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get snmp config params -func (o *GetSnmpConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get snmp config params -func (o *GetSnmpConfigParams) WithHTTPClient(client *http.Client) *GetSnmpConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get snmp config params -func (o *GetSnmpConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSnmpConfigParams) 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/snmp/get_snmp_config_responses.go b/v1/client/snmp/get_snmp_config_responses.go deleted file mode 100644 index e94aa3c3..00000000 --- a/v1/client/snmp/get_snmp_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package snmp - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSnmpConfigReader is a Reader for the GetSnmpConfig structure. -type GetSnmpConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSnmpConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSnmpConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSnmpConfigDefault(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 - } -} - -// NewGetSnmpConfigOK creates a GetSnmpConfigOK with default headers values -func NewGetSnmpConfigOK() *GetSnmpConfigOK { - return &GetSnmpConfigOK{} -} - -/* -GetSnmpConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSnmpConfigOK struct { - Payload *models.SnmpConfig -} - -// IsSuccess returns true when this get snmp config o k response has a 2xx status code -func (o *GetSnmpConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get snmp config o k response has a 3xx status code -func (o *GetSnmpConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get snmp config o k response has a 4xx status code -func (o *GetSnmpConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get snmp config o k response has a 5xx status code -func (o *GetSnmpConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get snmp config o k response a status code equal to that given -func (o *GetSnmpConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get snmp config o k response -func (o *GetSnmpConfigOK) Code() int { - return 200 -} - -func (o *GetSnmpConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/config][%d] getSnmpConfigOK %s", 200, payload) -} - -func (o *GetSnmpConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/config][%d] getSnmpConfigOK %s", 200, payload) -} - -func (o *GetSnmpConfigOK) GetPayload() *models.SnmpConfig { - return o.Payload -} - -func (o *GetSnmpConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SnmpConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSnmpConfigDefault creates a GetSnmpConfigDefault with default headers values -func NewGetSnmpConfigDefault(code int) *GetSnmpConfigDefault { - return &GetSnmpConfigDefault{ - _statusCode: code, - } -} - -/* -GetSnmpConfigDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetSnmpConfigDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get snmp config default response has a 2xx status code -func (o *GetSnmpConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get snmp config default response has a 3xx status code -func (o *GetSnmpConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get snmp config default response has a 4xx status code -func (o *GetSnmpConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get snmp config default response has a 5xx status code -func (o *GetSnmpConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get snmp config default response a status code equal to that given -func (o *GetSnmpConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get snmp config default response -func (o *GetSnmpConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetSnmpConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/config][%d] GetSnmpConfig default %s", o._statusCode, payload) -} - -func (o *GetSnmpConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /snmp/config][%d] GetSnmpConfig default %s", o._statusCode, payload) -} - -func (o *GetSnmpConfigDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetSnmpConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/snmp/snmp_client.go b/v1/client/snmp/snmp_client.go deleted file mode 100644 index 6e0b1c53..00000000 --- a/v1/client/snmp/snmp_client.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package snmp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new snmp API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new snmp API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new snmp API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for snmp API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetSnmpConfig(params *GetSnmpConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSnmpConfigOK, error) - - UpdateSnmpConfig(params *UpdateSnmpConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSnmpConfigOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetSnmpConfig gets the s n m p configuration of the cluster -*/ -func (a *Client) GetSnmpConfig(params *GetSnmpConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSnmpConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSnmpConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetSnmpConfig", - Method: "GET", - PathPattern: "/snmp/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSnmpConfigReader{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.(*GetSnmpConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSnmpConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSnmpConfig update SnmpConfig of the cluster -*/ -func (a *Client) UpdateSnmpConfig(params *UpdateSnmpConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSnmpConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSnmpConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSnmpConfig", - Method: "PUT", - PathPattern: "/snmp/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSnmpConfigReader{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.(*UpdateSnmpConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSnmpConfigDefault) - 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/snmp/update_snmp_config_parameters.go b/v1/client/snmp/update_snmp_config_parameters.go deleted file mode 100644 index e21bf329..00000000 --- a/v1/client/snmp/update_snmp_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package snmp - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateSnmpConfigParams creates a new UpdateSnmpConfigParams 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 NewUpdateSnmpConfigParams() *UpdateSnmpConfigParams { - return &UpdateSnmpConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSnmpConfigParamsWithTimeout creates a new UpdateSnmpConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateSnmpConfigParamsWithTimeout(timeout time.Duration) *UpdateSnmpConfigParams { - return &UpdateSnmpConfigParams{ - timeout: timeout, - } -} - -// NewUpdateSnmpConfigParamsWithContext creates a new UpdateSnmpConfigParams object -// with the ability to set a context for a request. -func NewUpdateSnmpConfigParamsWithContext(ctx context.Context) *UpdateSnmpConfigParams { - return &UpdateSnmpConfigParams{ - Context: ctx, - } -} - -// NewUpdateSnmpConfigParamsWithHTTPClient creates a new UpdateSnmpConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSnmpConfigParamsWithHTTPClient(client *http.Client) *UpdateSnmpConfigParams { - return &UpdateSnmpConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateSnmpConfigParams contains all the parameters to send to the API endpoint - - for the update snmp config operation. - - Typically these are written to a http.Request. -*/ -type UpdateSnmpConfigParams struct { - - /* Body. - - SnmpConfig response - */ - Body *models.SnmpConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update snmp config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSnmpConfigParams) WithDefaults() *UpdateSnmpConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update snmp config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSnmpConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update snmp config params -func (o *UpdateSnmpConfigParams) WithTimeout(timeout time.Duration) *UpdateSnmpConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update snmp config params -func (o *UpdateSnmpConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update snmp config params -func (o *UpdateSnmpConfigParams) WithContext(ctx context.Context) *UpdateSnmpConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update snmp config params -func (o *UpdateSnmpConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update snmp config params -func (o *UpdateSnmpConfigParams) WithHTTPClient(client *http.Client) *UpdateSnmpConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update snmp config params -func (o *UpdateSnmpConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update snmp config params -func (o *UpdateSnmpConfigParams) WithBody(body *models.SnmpConfig) *UpdateSnmpConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update snmp config params -func (o *UpdateSnmpConfigParams) SetBody(body *models.SnmpConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSnmpConfigParams) 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/snmp/update_snmp_config_responses.go b/v1/client/snmp/update_snmp_config_responses.go deleted file mode 100644 index 27c6d582..00000000 --- a/v1/client/snmp/update_snmp_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package snmp - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateSnmpConfigReader is a Reader for the UpdateSnmpConfig structure. -type UpdateSnmpConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSnmpConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSnmpConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSnmpConfigDefault(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 - } -} - -// NewUpdateSnmpConfigOK creates a UpdateSnmpConfigOK with default headers values -func NewUpdateSnmpConfigOK() *UpdateSnmpConfigOK { - return &UpdateSnmpConfigOK{} -} - -/* -UpdateSnmpConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSnmpConfigOK struct { - Payload *models.SnmpConfig -} - -// IsSuccess returns true when this update snmp config o k response has a 2xx status code -func (o *UpdateSnmpConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update snmp config o k response has a 3xx status code -func (o *UpdateSnmpConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update snmp config o k response has a 4xx status code -func (o *UpdateSnmpConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update snmp config o k response has a 5xx status code -func (o *UpdateSnmpConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update snmp config o k response a status code equal to that given -func (o *UpdateSnmpConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update snmp config o k response -func (o *UpdateSnmpConfigOK) Code() int { - return 200 -} - -func (o *UpdateSnmpConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /snmp/config][%d] updateSnmpConfigOK %s", 200, payload) -} - -func (o *UpdateSnmpConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /snmp/config][%d] updateSnmpConfigOK %s", 200, payload) -} - -func (o *UpdateSnmpConfigOK) GetPayload() *models.SnmpConfig { - return o.Payload -} - -func (o *UpdateSnmpConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SnmpConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSnmpConfigDefault creates a UpdateSnmpConfigDefault with default headers values -func NewUpdateSnmpConfigDefault(code int) *UpdateSnmpConfigDefault { - return &UpdateSnmpConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateSnmpConfigDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type UpdateSnmpConfigDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this update snmp config default response has a 2xx status code -func (o *UpdateSnmpConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update snmp config default response has a 3xx status code -func (o *UpdateSnmpConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update snmp config default response has a 4xx status code -func (o *UpdateSnmpConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update snmp config default response has a 5xx status code -func (o *UpdateSnmpConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update snmp config default response a status code equal to that given -func (o *UpdateSnmpConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update snmp config default response -func (o *UpdateSnmpConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSnmpConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /snmp/config][%d] UpdateSnmpConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSnmpConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /snmp/config][%d] UpdateSnmpConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSnmpConfigDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *UpdateSnmpConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/statistics/get_entities_parameters.go b/v1/client/statistics/get_entities_parameters.go deleted file mode 100644 index 989673f2..00000000 --- a/v1/client/statistics/get_entities_parameters.go +++ /dev/null @@ -1,346 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" -) - -// NewGetEntitiesParams creates a new GetEntitiesParams 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 NewGetEntitiesParams() *GetEntitiesParams { - return &GetEntitiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEntitiesParamsWithTimeout creates a new GetEntitiesParams object -// with the ability to set a timeout on a request. -func NewGetEntitiesParamsWithTimeout(timeout time.Duration) *GetEntitiesParams { - return &GetEntitiesParams{ - timeout: timeout, - } -} - -// NewGetEntitiesParamsWithContext creates a new GetEntitiesParams object -// with the ability to set a context for a request. -func NewGetEntitiesParamsWithContext(ctx context.Context) *GetEntitiesParams { - return &GetEntitiesParams{ - Context: ctx, - } -} - -// NewGetEntitiesParamsWithHTTPClient creates a new GetEntitiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEntitiesParamsWithHTTPClient(client *http.Client) *GetEntitiesParams { - return &GetEntitiesParams{ - HTTPClient: client, - } -} - -/* -GetEntitiesParams contains all the parameters to send to the API endpoint - - for the get entities operation. - - Typically these are written to a http.Request. -*/ -type GetEntitiesParams struct { - - /* EntityPrefix. - - Fetch only the entities having this prefix, otherwise all entities are - returned. - */ - EntityPrefix *string - - /* IncludeAggrMetricSources. - - Specifies whether to include the sources of aggregate metrics of an - entity. - */ - IncludeAggrMetricSources *bool - - /* MaxEntities. - - Specifies the maximum entities returned in the result. - By default this field is 500. - - Format: int32 - */ - MaxEntities *int32 - - /* MetricNames. - - Specifies the list of metric names to return such as 'kRandomIos' - which corresponds to 'Random IOs' in Advanced Diagnostics - of the Cohesity Dashboard. - */ - MetricNames []string - - /* SchemaName. - - Specifies the entity schema to search for entities. - */ - SchemaName string - - /* ViewName. - - Specifies a view name, only view entities which have name containing the - specified name will be returned. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitiesParams) WithDefaults() *GetEntitiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get entities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get entities params -func (o *GetEntitiesParams) WithTimeout(timeout time.Duration) *GetEntitiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get entities params -func (o *GetEntitiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get entities params -func (o *GetEntitiesParams) WithContext(ctx context.Context) *GetEntitiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get entities params -func (o *GetEntitiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get entities params -func (o *GetEntitiesParams) WithHTTPClient(client *http.Client) *GetEntitiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get entities params -func (o *GetEntitiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEntityPrefix adds the entityPrefix to the get entities params -func (o *GetEntitiesParams) WithEntityPrefix(entityPrefix *string) *GetEntitiesParams { - o.SetEntityPrefix(entityPrefix) - return o -} - -// SetEntityPrefix adds the entityPrefix to the get entities params -func (o *GetEntitiesParams) SetEntityPrefix(entityPrefix *string) { - o.EntityPrefix = entityPrefix -} - -// WithIncludeAggrMetricSources adds the includeAggrMetricSources to the get entities params -func (o *GetEntitiesParams) WithIncludeAggrMetricSources(includeAggrMetricSources *bool) *GetEntitiesParams { - o.SetIncludeAggrMetricSources(includeAggrMetricSources) - return o -} - -// SetIncludeAggrMetricSources adds the includeAggrMetricSources to the get entities params -func (o *GetEntitiesParams) SetIncludeAggrMetricSources(includeAggrMetricSources *bool) { - o.IncludeAggrMetricSources = includeAggrMetricSources -} - -// WithMaxEntities adds the maxEntities to the get entities params -func (o *GetEntitiesParams) WithMaxEntities(maxEntities *int32) *GetEntitiesParams { - o.SetMaxEntities(maxEntities) - return o -} - -// SetMaxEntities adds the maxEntities to the get entities params -func (o *GetEntitiesParams) SetMaxEntities(maxEntities *int32) { - o.MaxEntities = maxEntities -} - -// WithMetricNames adds the metricNames to the get entities params -func (o *GetEntitiesParams) WithMetricNames(metricNames []string) *GetEntitiesParams { - o.SetMetricNames(metricNames) - return o -} - -// SetMetricNames adds the metricNames to the get entities params -func (o *GetEntitiesParams) SetMetricNames(metricNames []string) { - o.MetricNames = metricNames -} - -// WithSchemaName adds the schemaName to the get entities params -func (o *GetEntitiesParams) WithSchemaName(schemaName string) *GetEntitiesParams { - o.SetSchemaName(schemaName) - return o -} - -// SetSchemaName adds the schemaName to the get entities params -func (o *GetEntitiesParams) SetSchemaName(schemaName string) { - o.SchemaName = schemaName -} - -// WithViewName adds the viewName to the get entities params -func (o *GetEntitiesParams) WithViewName(viewName *string) *GetEntitiesParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get entities params -func (o *GetEntitiesParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEntitiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EntityPrefix != nil { - - // query param entityPrefix - var qrEntityPrefix string - - if o.EntityPrefix != nil { - qrEntityPrefix = *o.EntityPrefix - } - qEntityPrefix := qrEntityPrefix - if qEntityPrefix != "" { - - if err := r.SetQueryParam("entityPrefix", qEntityPrefix); err != nil { - return err - } - } - } - - if o.IncludeAggrMetricSources != nil { - - // query param includeAggrMetricSources - var qrIncludeAggrMetricSources bool - - if o.IncludeAggrMetricSources != nil { - qrIncludeAggrMetricSources = *o.IncludeAggrMetricSources - } - qIncludeAggrMetricSources := swag.FormatBool(qrIncludeAggrMetricSources) - if qIncludeAggrMetricSources != "" { - - if err := r.SetQueryParam("includeAggrMetricSources", qIncludeAggrMetricSources); err != nil { - return err - } - } - } - - if o.MaxEntities != nil { - - // query param maxEntities - var qrMaxEntities int32 - - if o.MaxEntities != nil { - qrMaxEntities = *o.MaxEntities - } - qMaxEntities := swag.FormatInt32(qrMaxEntities) - if qMaxEntities != "" { - - if err := r.SetQueryParam("maxEntities", qMaxEntities); err != nil { - return err - } - } - } - - if o.MetricNames != nil { - - // binding items for metricNames - joinedMetricNames := o.bindParamMetricNames(reg) - - // query array param metricNames - if err := r.SetQueryParam("metricNames", joinedMetricNames...); err != nil { - return err - } - } - - // query param schemaName - qrSchemaName := o.SchemaName - qSchemaName := qrSchemaName - if qSchemaName != "" { - - if err := r.SetQueryParam("schemaName", qSchemaName); err != nil { - return err - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetEntities binds the parameter metricNames -func (o *GetEntitiesParams) bindParamMetricNames(formats strfmt.Registry) []string { - metricNamesIR := o.MetricNames - - var metricNamesIC []string - for _, metricNamesIIR := range metricNamesIR { // explode []string - - metricNamesIIV := metricNamesIIR // string as string - metricNamesIC = append(metricNamesIC, metricNamesIIV) - } - - // items.CollectionFormat: "" - metricNamesIS := swag.JoinByFormat(metricNamesIC, "") - - return metricNamesIS -} diff --git a/v1/client/statistics/get_entities_responses.go b/v1/client/statistics/get_entities_responses.go deleted file mode 100644 index 3bf576ff..00000000 --- a/v1/client/statistics/get_entities_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetEntitiesReader is a Reader for the GetEntities structure. -type GetEntitiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEntitiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEntitiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetEntitiesDefault(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 - } -} - -// NewGetEntitiesOK creates a GetEntitiesOK with default headers values -func NewGetEntitiesOK() *GetEntitiesOK { - return &GetEntitiesOK{} -} - -/* -GetEntitiesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEntitiesOK struct { - Payload []*models.EntityProto -} - -// IsSuccess returns true when this get entities o k response has a 2xx status code -func (o *GetEntitiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get entities o k response has a 3xx status code -func (o *GetEntitiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get entities o k response has a 4xx status code -func (o *GetEntitiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get entities o k response has a 5xx status code -func (o *GetEntitiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get entities o k response a status code equal to that given -func (o *GetEntitiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get entities o k response -func (o *GetEntitiesOK) Code() int { - return 200 -} - -func (o *GetEntitiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entities][%d] getEntitiesOK %s", 200, payload) -} - -func (o *GetEntitiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entities][%d] getEntitiesOK %s", 200, payload) -} - -func (o *GetEntitiesOK) GetPayload() []*models.EntityProto { - return o.Payload -} - -func (o *GetEntitiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEntitiesDefault creates a GetEntitiesDefault with default headers values -func NewGetEntitiesDefault(code int) *GetEntitiesDefault { - return &GetEntitiesDefault{ - _statusCode: code, - } -} - -/* -GetEntitiesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetEntitiesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get entities default response has a 2xx status code -func (o *GetEntitiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get entities default response has a 3xx status code -func (o *GetEntitiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get entities default response has a 4xx status code -func (o *GetEntitiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get entities default response has a 5xx status code -func (o *GetEntitiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get entities default response a status code equal to that given -func (o *GetEntitiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get entities default response -func (o *GetEntitiesDefault) Code() int { - return o._statusCode -} - -func (o *GetEntitiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entities][%d] GetEntities default %s", o._statusCode, payload) -} - -func (o *GetEntitiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entities][%d] GetEntities default %s", o._statusCode, payload) -} - -func (o *GetEntitiesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetEntitiesDefault) 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/statistics/get_entities_schema_parameters.go b/v1/client/statistics/get_entities_schema_parameters.go deleted file mode 100644 index a9334e14..00000000 --- a/v1/client/statistics/get_entities_schema_parameters.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" -) - -// NewGetEntitiesSchemaParams creates a new GetEntitiesSchemaParams 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 NewGetEntitiesSchemaParams() *GetEntitiesSchemaParams { - return &GetEntitiesSchemaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEntitiesSchemaParamsWithTimeout creates a new GetEntitiesSchemaParams object -// with the ability to set a timeout on a request. -func NewGetEntitiesSchemaParamsWithTimeout(timeout time.Duration) *GetEntitiesSchemaParams { - return &GetEntitiesSchemaParams{ - timeout: timeout, - } -} - -// NewGetEntitiesSchemaParamsWithContext creates a new GetEntitiesSchemaParams object -// with the ability to set a context for a request. -func NewGetEntitiesSchemaParamsWithContext(ctx context.Context) *GetEntitiesSchemaParams { - return &GetEntitiesSchemaParams{ - Context: ctx, - } -} - -// NewGetEntitiesSchemaParamsWithHTTPClient creates a new GetEntitiesSchemaParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEntitiesSchemaParamsWithHTTPClient(client *http.Client) *GetEntitiesSchemaParams { - return &GetEntitiesSchemaParams{ - HTTPClient: client, - } -} - -/* -GetEntitiesSchemaParams contains all the parameters to send to the API endpoint - - for the get entities schema operation. - - Typically these are written to a http.Request. -*/ -type GetEntitiesSchemaParams struct { - - /* MetricNames. - - Specifies the list of metric names to filter by such as 'kRandomIos' - which corresponds to 'Random IOs' in Advanced Diagnostics - of the Cohesity Dashboard. - */ - MetricNames []string - - /* SchemaNames. - - Specifies the list of schema names to filter by such as - 'kIceboxJobVaultStats' which corresponds to 'External Target Job Stats' - in Advanced Diagnostics of the Cohesity Dashboard. - */ - SchemaNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get entities schema params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitiesSchemaParams) WithDefaults() *GetEntitiesSchemaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get entities schema params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitiesSchemaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get entities schema params -func (o *GetEntitiesSchemaParams) WithTimeout(timeout time.Duration) *GetEntitiesSchemaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get entities schema params -func (o *GetEntitiesSchemaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get entities schema params -func (o *GetEntitiesSchemaParams) WithContext(ctx context.Context) *GetEntitiesSchemaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get entities schema params -func (o *GetEntitiesSchemaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get entities schema params -func (o *GetEntitiesSchemaParams) WithHTTPClient(client *http.Client) *GetEntitiesSchemaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get entities schema params -func (o *GetEntitiesSchemaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMetricNames adds the metricNames to the get entities schema params -func (o *GetEntitiesSchemaParams) WithMetricNames(metricNames []string) *GetEntitiesSchemaParams { - o.SetMetricNames(metricNames) - return o -} - -// SetMetricNames adds the metricNames to the get entities schema params -func (o *GetEntitiesSchemaParams) SetMetricNames(metricNames []string) { - o.MetricNames = metricNames -} - -// WithSchemaNames adds the schemaNames to the get entities schema params -func (o *GetEntitiesSchemaParams) WithSchemaNames(schemaNames []string) *GetEntitiesSchemaParams { - o.SetSchemaNames(schemaNames) - return o -} - -// SetSchemaNames adds the schemaNames to the get entities schema params -func (o *GetEntitiesSchemaParams) SetSchemaNames(schemaNames []string) { - o.SchemaNames = schemaNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEntitiesSchemaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.MetricNames != nil { - - // binding items for metricNames - joinedMetricNames := o.bindParamMetricNames(reg) - - // query array param metricNames - if err := r.SetQueryParam("metricNames", joinedMetricNames...); err != nil { - return err - } - } - - if o.SchemaNames != nil { - - // binding items for schemaNames - joinedSchemaNames := o.bindParamSchemaNames(reg) - - // query array param schemaNames - if err := r.SetQueryParam("schemaNames", joinedSchemaNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetEntitiesSchema binds the parameter metricNames -func (o *GetEntitiesSchemaParams) bindParamMetricNames(formats strfmt.Registry) []string { - metricNamesIR := o.MetricNames - - var metricNamesIC []string - for _, metricNamesIIR := range metricNamesIR { // explode []string - - metricNamesIIV := metricNamesIIR // string as string - metricNamesIC = append(metricNamesIC, metricNamesIIV) - } - - // items.CollectionFormat: "" - metricNamesIS := swag.JoinByFormat(metricNamesIC, "") - - return metricNamesIS -} - -// bindParamGetEntitiesSchema binds the parameter schemaNames -func (o *GetEntitiesSchemaParams) bindParamSchemaNames(formats strfmt.Registry) []string { - schemaNamesIR := o.SchemaNames - - var schemaNamesIC []string - for _, schemaNamesIIR := range schemaNamesIR { // explode []string - - schemaNamesIIV := schemaNamesIIR // string as string - schemaNamesIC = append(schemaNamesIC, schemaNamesIIV) - } - - // items.CollectionFormat: "" - schemaNamesIS := swag.JoinByFormat(schemaNamesIC, "") - - return schemaNamesIS -} diff --git a/v1/client/statistics/get_entities_schema_responses.go b/v1/client/statistics/get_entities_schema_responses.go deleted file mode 100644 index 9def4a98..00000000 --- a/v1/client/statistics/get_entities_schema_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetEntitiesSchemaReader is a Reader for the GetEntitiesSchema structure. -type GetEntitiesSchemaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEntitiesSchemaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEntitiesSchemaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetEntitiesSchemaDefault(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 - } -} - -// NewGetEntitiesSchemaOK creates a GetEntitiesSchemaOK with default headers values -func NewGetEntitiesSchemaOK() *GetEntitiesSchemaOK { - return &GetEntitiesSchemaOK{} -} - -/* -GetEntitiesSchemaOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEntitiesSchemaOK struct { - Payload []*models.EntitySchemaProto -} - -// IsSuccess returns true when this get entities schema o k response has a 2xx status code -func (o *GetEntitiesSchemaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get entities schema o k response has a 3xx status code -func (o *GetEntitiesSchemaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get entities schema o k response has a 4xx status code -func (o *GetEntitiesSchemaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get entities schema o k response has a 5xx status code -func (o *GetEntitiesSchemaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get entities schema o k response a status code equal to that given -func (o *GetEntitiesSchemaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get entities schema o k response -func (o *GetEntitiesSchemaOK) Code() int { - return 200 -} - -func (o *GetEntitiesSchemaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema][%d] getEntitiesSchemaOK %s", 200, payload) -} - -func (o *GetEntitiesSchemaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema][%d] getEntitiesSchemaOK %s", 200, payload) -} - -func (o *GetEntitiesSchemaOK) GetPayload() []*models.EntitySchemaProto { - return o.Payload -} - -func (o *GetEntitiesSchemaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEntitiesSchemaDefault creates a GetEntitiesSchemaDefault with default headers values -func NewGetEntitiesSchemaDefault(code int) *GetEntitiesSchemaDefault { - return &GetEntitiesSchemaDefault{ - _statusCode: code, - } -} - -/* -GetEntitiesSchemaDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetEntitiesSchemaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get entities schema default response has a 2xx status code -func (o *GetEntitiesSchemaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get entities schema default response has a 3xx status code -func (o *GetEntitiesSchemaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get entities schema default response has a 4xx status code -func (o *GetEntitiesSchemaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get entities schema default response has a 5xx status code -func (o *GetEntitiesSchemaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get entities schema default response a status code equal to that given -func (o *GetEntitiesSchemaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get entities schema default response -func (o *GetEntitiesSchemaDefault) Code() int { - return o._statusCode -} - -func (o *GetEntitiesSchemaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema][%d] GetEntitiesSchema default %s", o._statusCode, payload) -} - -func (o *GetEntitiesSchemaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema][%d] GetEntitiesSchema default %s", o._statusCode, payload) -} - -func (o *GetEntitiesSchemaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetEntitiesSchemaDefault) 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/statistics/get_entity_schema_by_name_parameters.go b/v1/client/statistics/get_entity_schema_by_name_parameters.go deleted file mode 100644 index 1c5b86ae..00000000 --- a/v1/client/statistics/get_entity_schema_by_name_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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" -) - -// NewGetEntitySchemaByNameParams creates a new GetEntitySchemaByNameParams 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 NewGetEntitySchemaByNameParams() *GetEntitySchemaByNameParams { - return &GetEntitySchemaByNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEntitySchemaByNameParamsWithTimeout creates a new GetEntitySchemaByNameParams object -// with the ability to set a timeout on a request. -func NewGetEntitySchemaByNameParamsWithTimeout(timeout time.Duration) *GetEntitySchemaByNameParams { - return &GetEntitySchemaByNameParams{ - timeout: timeout, - } -} - -// NewGetEntitySchemaByNameParamsWithContext creates a new GetEntitySchemaByNameParams object -// with the ability to set a context for a request. -func NewGetEntitySchemaByNameParamsWithContext(ctx context.Context) *GetEntitySchemaByNameParams { - return &GetEntitySchemaByNameParams{ - Context: ctx, - } -} - -// NewGetEntitySchemaByNameParamsWithHTTPClient creates a new GetEntitySchemaByNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEntitySchemaByNameParamsWithHTTPClient(client *http.Client) *GetEntitySchemaByNameParams { - return &GetEntitySchemaByNameParams{ - HTTPClient: client, - } -} - -/* -GetEntitySchemaByNameParams contains all the parameters to send to the API endpoint - - for the get entity schema by name operation. - - Typically these are written to a http.Request. -*/ -type GetEntitySchemaByNameParams struct { - - /* SchemaName. - - Name of the Schema - */ - SchemaName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get entity schema by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitySchemaByNameParams) WithDefaults() *GetEntitySchemaByNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get entity schema by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntitySchemaByNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) WithTimeout(timeout time.Duration) *GetEntitySchemaByNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) WithContext(ctx context.Context) *GetEntitySchemaByNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) WithHTTPClient(client *http.Client) *GetEntitySchemaByNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSchemaName adds the schemaName to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) WithSchemaName(schemaName string) *GetEntitySchemaByNameParams { - o.SetSchemaName(schemaName) - return o -} - -// SetSchemaName adds the schemaName to the get entity schema by name params -func (o *GetEntitySchemaByNameParams) SetSchemaName(schemaName string) { - o.SchemaName = schemaName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEntitySchemaByNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param schemaName - if err := r.SetPathParam("schemaName", o.SchemaName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/statistics/get_entity_schema_by_name_responses.go b/v1/client/statistics/get_entity_schema_by_name_responses.go deleted file mode 100644 index 03c94614..00000000 --- a/v1/client/statistics/get_entity_schema_by_name_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetEntitySchemaByNameReader is a Reader for the GetEntitySchemaByName structure. -type GetEntitySchemaByNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEntitySchemaByNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEntitySchemaByNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetEntitySchemaByNameDefault(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 - } -} - -// NewGetEntitySchemaByNameOK creates a GetEntitySchemaByNameOK with default headers values -func NewGetEntitySchemaByNameOK() *GetEntitySchemaByNameOK { - return &GetEntitySchemaByNameOK{} -} - -/* -GetEntitySchemaByNameOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEntitySchemaByNameOK struct { - Payload []*models.EntitySchemaProto -} - -// IsSuccess returns true when this get entity schema by name o k response has a 2xx status code -func (o *GetEntitySchemaByNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get entity schema by name o k response has a 3xx status code -func (o *GetEntitySchemaByNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get entity schema by name o k response has a 4xx status code -func (o *GetEntitySchemaByNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get entity schema by name o k response has a 5xx status code -func (o *GetEntitySchemaByNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get entity schema by name o k response a status code equal to that given -func (o *GetEntitySchemaByNameOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get entity schema by name o k response -func (o *GetEntitySchemaByNameOK) Code() int { - return 200 -} - -func (o *GetEntitySchemaByNameOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema/{schemaName}][%d] getEntitySchemaByNameOK %s", 200, payload) -} - -func (o *GetEntitySchemaByNameOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema/{schemaName}][%d] getEntitySchemaByNameOK %s", 200, payload) -} - -func (o *GetEntitySchemaByNameOK) GetPayload() []*models.EntitySchemaProto { - return o.Payload -} - -func (o *GetEntitySchemaByNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEntitySchemaByNameDefault creates a GetEntitySchemaByNameDefault with default headers values -func NewGetEntitySchemaByNameDefault(code int) *GetEntitySchemaByNameDefault { - return &GetEntitySchemaByNameDefault{ - _statusCode: code, - } -} - -/* -GetEntitySchemaByNameDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetEntitySchemaByNameDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get entity schema by name default response has a 2xx status code -func (o *GetEntitySchemaByNameDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get entity schema by name default response has a 3xx status code -func (o *GetEntitySchemaByNameDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get entity schema by name default response has a 4xx status code -func (o *GetEntitySchemaByNameDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get entity schema by name default response has a 5xx status code -func (o *GetEntitySchemaByNameDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get entity schema by name default response a status code equal to that given -func (o *GetEntitySchemaByNameDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get entity schema by name default response -func (o *GetEntitySchemaByNameDefault) Code() int { - return o._statusCode -} - -func (o *GetEntitySchemaByNameDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema/{schemaName}][%d] GetEntitySchemaByName default %s", o._statusCode, payload) -} - -func (o *GetEntitySchemaByNameDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/entitiesSchema/{schemaName}][%d] GetEntitySchemaByName default %s", o._statusCode, payload) -} - -func (o *GetEntitySchemaByNameDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetEntitySchemaByNameDefault) 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/statistics/get_file_downloads_counter_parameters.go b/v1/client/statistics/get_file_downloads_counter_parameters.go deleted file mode 100644 index 79ccfc6d..00000000 --- a/v1/client/statistics/get_file_downloads_counter_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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" -) - -// NewGetFileDownloadsCounterParams creates a new GetFileDownloadsCounterParams 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 NewGetFileDownloadsCounterParams() *GetFileDownloadsCounterParams { - return &GetFileDownloadsCounterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileDownloadsCounterParamsWithTimeout creates a new GetFileDownloadsCounterParams object -// with the ability to set a timeout on a request. -func NewGetFileDownloadsCounterParamsWithTimeout(timeout time.Duration) *GetFileDownloadsCounterParams { - return &GetFileDownloadsCounterParams{ - timeout: timeout, - } -} - -// NewGetFileDownloadsCounterParamsWithContext creates a new GetFileDownloadsCounterParams object -// with the ability to set a context for a request. -func NewGetFileDownloadsCounterParamsWithContext(ctx context.Context) *GetFileDownloadsCounterParams { - return &GetFileDownloadsCounterParams{ - Context: ctx, - } -} - -// NewGetFileDownloadsCounterParamsWithHTTPClient creates a new GetFileDownloadsCounterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileDownloadsCounterParamsWithHTTPClient(client *http.Client) *GetFileDownloadsCounterParams { - return &GetFileDownloadsCounterParams{ - HTTPClient: client, - } -} - -/* -GetFileDownloadsCounterParams contains all the parameters to send to the API endpoint - - for the get file downloads counter operation. - - Typically these are written to a http.Request. -*/ -type GetFileDownloadsCounterParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file downloads counter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileDownloadsCounterParams) WithDefaults() *GetFileDownloadsCounterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file downloads counter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileDownloadsCounterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) WithTimeout(timeout time.Duration) *GetFileDownloadsCounterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) WithContext(ctx context.Context) *GetFileDownloadsCounterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) WithHTTPClient(client *http.Client) *GetFileDownloadsCounterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file downloads counter params -func (o *GetFileDownloadsCounterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileDownloadsCounterParams) 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/statistics/get_file_downloads_counter_responses.go b/v1/client/statistics/get_file_downloads_counter_responses.go deleted file mode 100644 index aae96171..00000000 --- a/v1/client/statistics/get_file_downloads_counter_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileDownloadsCounterReader is a Reader for the GetFileDownloadsCounter structure. -type GetFileDownloadsCounterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileDownloadsCounterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileDownloadsCounterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileDownloadsCounterDefault(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 - } -} - -// NewGetFileDownloadsCounterOK creates a GetFileDownloadsCounterOK with default headers values -func NewGetFileDownloadsCounterOK() *GetFileDownloadsCounterOK { - return &GetFileDownloadsCounterOK{} -} - -/* -GetFileDownloadsCounterOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileDownloadsCounterOK struct { - Payload []*models.Counter -} - -// IsSuccess returns true when this get file downloads counter o k response has a 2xx status code -func (o *GetFileDownloadsCounterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file downloads counter o k response has a 3xx status code -func (o *GetFileDownloadsCounterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file downloads counter o k response has a 4xx status code -func (o *GetFileDownloadsCounterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file downloads counter o k response has a 5xx status code -func (o *GetFileDownloadsCounterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file downloads counter o k response a status code equal to that given -func (o *GetFileDownloadsCounterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file downloads counter o k response -func (o *GetFileDownloadsCounterOK) Code() int { - return 200 -} - -func (o *GetFileDownloadsCounterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/fileDownloads][%d] getFileDownloadsCounterOK %s", 200, payload) -} - -func (o *GetFileDownloadsCounterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/fileDownloads][%d] getFileDownloadsCounterOK %s", 200, payload) -} - -func (o *GetFileDownloadsCounterOK) GetPayload() []*models.Counter { - return o.Payload -} - -func (o *GetFileDownloadsCounterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileDownloadsCounterDefault creates a GetFileDownloadsCounterDefault with default headers values -func NewGetFileDownloadsCounterDefault(code int) *GetFileDownloadsCounterDefault { - return &GetFileDownloadsCounterDefault{ - _statusCode: code, - } -} - -/* -GetFileDownloadsCounterDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetFileDownloadsCounterDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get file downloads counter default response has a 2xx status code -func (o *GetFileDownloadsCounterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file downloads counter default response has a 3xx status code -func (o *GetFileDownloadsCounterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file downloads counter default response has a 4xx status code -func (o *GetFileDownloadsCounterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file downloads counter default response has a 5xx status code -func (o *GetFileDownloadsCounterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file downloads counter default response a status code equal to that given -func (o *GetFileDownloadsCounterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file downloads counter default response -func (o *GetFileDownloadsCounterDefault) Code() int { - return o._statusCode -} - -func (o *GetFileDownloadsCounterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/fileDownloads][%d] GetFileDownloadsCounter default %s", o._statusCode, payload) -} - -func (o *GetFileDownloadsCounterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/fileDownloads][%d] GetFileDownloadsCounter default %s", o._statusCode, payload) -} - -func (o *GetFileDownloadsCounterDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetFileDownloadsCounterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/statistics/get_progress_monitor_by_path_parameters.go b/v1/client/statistics/get_progress_monitor_by_path_parameters.go deleted file mode 100644 index c08311e3..00000000 --- a/v1/client/statistics/get_progress_monitor_by_path_parameters.go +++ /dev/null @@ -1,405 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGetProgressMonitorByPathParams creates a new GetProgressMonitorByPathParams 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 NewGetProgressMonitorByPathParams() *GetProgressMonitorByPathParams { - return &GetProgressMonitorByPathParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProgressMonitorByPathParamsWithTimeout creates a new GetProgressMonitorByPathParams object -// with the ability to set a timeout on a request. -func NewGetProgressMonitorByPathParamsWithTimeout(timeout time.Duration) *GetProgressMonitorByPathParams { - return &GetProgressMonitorByPathParams{ - timeout: timeout, - } -} - -// NewGetProgressMonitorByPathParamsWithContext creates a new GetProgressMonitorByPathParams object -// with the ability to set a context for a request. -func NewGetProgressMonitorByPathParamsWithContext(ctx context.Context) *GetProgressMonitorByPathParams { - return &GetProgressMonitorByPathParams{ - Context: ctx, - } -} - -// NewGetProgressMonitorByPathParamsWithHTTPClient creates a new GetProgressMonitorByPathParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProgressMonitorByPathParamsWithHTTPClient(client *http.Client) *GetProgressMonitorByPathParams { - return &GetProgressMonitorByPathParams{ - HTTPClient: client, - } -} - -/* -GetProgressMonitorByPathParams contains all the parameters to send to the API endpoint - - for the get progress monitor by path operation. - - Typically these are written to a http.Request. -*/ -type GetProgressMonitorByPathParams struct { - - // Body. - Body *models.GetTasksArg - - /* EndTimeSecs. - - Tasks that ended before this time. - - Format: int64 - */ - EndTimeSecs *int64 - - /* ExcludeSubTasks. - - Skip information about the sub tasks of the matching root and sub tasks. - By default, the entire task tree will be returned for matching tasks. - */ - ExcludeSubTasks *bool - - /* IncludeFinishedTasks. - - Returns finished tasks as well. - By default, Pulse only returns active tasks. - */ - IncludeFinishedTasks *bool - - /* MaxTasks. - - Only return at most these many matching tasks. This constraint is applied - with each query's result group. - - Format: int32 - */ - MaxTasks *int32 - - /* Path. - - Path of the tasks to get status from in Pulse - */ - Path string - - /* StartTimeSecs. - - Tasks that started after this time. - - Format: int64 - */ - StartTimeSecs *int64 - - /* TaskPathVec. - - The hierarchical paths to the names of the tasks being queried. - The task path-name specified here can be a prefix. - Clients can specify multiple paths/prefixes. Pulse will return one - ResultGroup for each path query. - - Each path is treated separately by Pulse, so if there are duplicate paths, - Pulse will return duplicate results. - - Both root tasks and sub tasks can be specified in @task_path_vec. - */ - TaskPathVec []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get progress monitor by path params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProgressMonitorByPathParams) WithDefaults() *GetProgressMonitorByPathParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get progress monitor by path params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProgressMonitorByPathParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithTimeout(timeout time.Duration) *GetProgressMonitorByPathParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithContext(ctx context.Context) *GetProgressMonitorByPathParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithHTTPClient(client *http.Client) *GetProgressMonitorByPathParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithBody(body *models.GetTasksArg) *GetProgressMonitorByPathParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetBody(body *models.GetTasksArg) { - o.Body = body -} - -// WithEndTimeSecs adds the endTimeSecs to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithEndTimeSecs(endTimeSecs *int64) *GetProgressMonitorByPathParams { - o.SetEndTimeSecs(endTimeSecs) - return o -} - -// SetEndTimeSecs adds the endTimeSecs to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetEndTimeSecs(endTimeSecs *int64) { - o.EndTimeSecs = endTimeSecs -} - -// WithExcludeSubTasks adds the excludeSubTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithExcludeSubTasks(excludeSubTasks *bool) *GetProgressMonitorByPathParams { - o.SetExcludeSubTasks(excludeSubTasks) - return o -} - -// SetExcludeSubTasks adds the excludeSubTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetExcludeSubTasks(excludeSubTasks *bool) { - o.ExcludeSubTasks = excludeSubTasks -} - -// WithIncludeFinishedTasks adds the includeFinishedTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithIncludeFinishedTasks(includeFinishedTasks *bool) *GetProgressMonitorByPathParams { - o.SetIncludeFinishedTasks(includeFinishedTasks) - return o -} - -// SetIncludeFinishedTasks adds the includeFinishedTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetIncludeFinishedTasks(includeFinishedTasks *bool) { - o.IncludeFinishedTasks = includeFinishedTasks -} - -// WithMaxTasks adds the maxTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithMaxTasks(maxTasks *int32) *GetProgressMonitorByPathParams { - o.SetMaxTasks(maxTasks) - return o -} - -// SetMaxTasks adds the maxTasks to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetMaxTasks(maxTasks *int32) { - o.MaxTasks = maxTasks -} - -// WithPath adds the path to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithPath(path string) *GetProgressMonitorByPathParams { - o.SetPath(path) - return o -} - -// SetPath adds the path to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetPath(path string) { - o.Path = path -} - -// WithStartTimeSecs adds the startTimeSecs to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithStartTimeSecs(startTimeSecs *int64) *GetProgressMonitorByPathParams { - o.SetStartTimeSecs(startTimeSecs) - return o -} - -// SetStartTimeSecs adds the startTimeSecs to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetStartTimeSecs(startTimeSecs *int64) { - o.StartTimeSecs = startTimeSecs -} - -// WithTaskPathVec adds the taskPathVec to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) WithTaskPathVec(taskPathVec []string) *GetProgressMonitorByPathParams { - o.SetTaskPathVec(taskPathVec) - return o -} - -// SetTaskPathVec adds the taskPathVec to the get progress monitor by path params -func (o *GetProgressMonitorByPathParams) SetTaskPathVec(taskPathVec []string) { - o.TaskPathVec = taskPathVec -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProgressMonitorByPathParams) 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 o.EndTimeSecs != nil { - - // query param endTimeSecs - var qrEndTimeSecs int64 - - if o.EndTimeSecs != nil { - qrEndTimeSecs = *o.EndTimeSecs - } - qEndTimeSecs := swag.FormatInt64(qrEndTimeSecs) - if qEndTimeSecs != "" { - - if err := r.SetQueryParam("endTimeSecs", qEndTimeSecs); err != nil { - return err - } - } - } - - if o.ExcludeSubTasks != nil { - - // query param excludeSubTasks - var qrExcludeSubTasks bool - - if o.ExcludeSubTasks != nil { - qrExcludeSubTasks = *o.ExcludeSubTasks - } - qExcludeSubTasks := swag.FormatBool(qrExcludeSubTasks) - if qExcludeSubTasks != "" { - - if err := r.SetQueryParam("excludeSubTasks", qExcludeSubTasks); err != nil { - return err - } - } - } - - if o.IncludeFinishedTasks != nil { - - // query param includeFinishedTasks - var qrIncludeFinishedTasks bool - - if o.IncludeFinishedTasks != nil { - qrIncludeFinishedTasks = *o.IncludeFinishedTasks - } - qIncludeFinishedTasks := swag.FormatBool(qrIncludeFinishedTasks) - if qIncludeFinishedTasks != "" { - - if err := r.SetQueryParam("includeFinishedTasks", qIncludeFinishedTasks); err != nil { - return err - } - } - } - - if o.MaxTasks != nil { - - // query param maxTasks - var qrMaxTasks int32 - - if o.MaxTasks != nil { - qrMaxTasks = *o.MaxTasks - } - qMaxTasks := swag.FormatInt32(qrMaxTasks) - if qMaxTasks != "" { - - if err := r.SetQueryParam("maxTasks", qMaxTasks); err != nil { - return err - } - } - } - - // path param path - if err := r.SetPathParam("path", o.Path); err != nil { - return err - } - - if o.StartTimeSecs != nil { - - // query param startTimeSecs - var qrStartTimeSecs int64 - - if o.StartTimeSecs != nil { - qrStartTimeSecs = *o.StartTimeSecs - } - qStartTimeSecs := swag.FormatInt64(qrStartTimeSecs) - if qStartTimeSecs != "" { - - if err := r.SetQueryParam("startTimeSecs", qStartTimeSecs); err != nil { - return err - } - } - } - - if o.TaskPathVec != nil { - - // binding items for taskPathVec - joinedTaskPathVec := o.bindParamTaskPathVec(reg) - - // query array param taskPathVec - if err := r.SetQueryParam("taskPathVec", joinedTaskPathVec...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProgressMonitorByPath binds the parameter taskPathVec -func (o *GetProgressMonitorByPathParams) bindParamTaskPathVec(formats strfmt.Registry) []string { - taskPathVecIR := o.TaskPathVec - - var taskPathVecIC []string - for _, taskPathVecIIR := range taskPathVecIR { // explode []string - - taskPathVecIIV := taskPathVecIIR // string as string - taskPathVecIC = append(taskPathVecIC, taskPathVecIIV) - } - - // items.CollectionFormat: "" - taskPathVecIS := swag.JoinByFormat(taskPathVecIC, "") - - return taskPathVecIS -} diff --git a/v1/client/statistics/get_progress_monitor_by_path_responses.go b/v1/client/statistics/get_progress_monitor_by_path_responses.go deleted file mode 100644 index f9e2ee36..00000000 --- a/v1/client/statistics/get_progress_monitor_by_path_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProgressMonitorByPathReader is a Reader for the GetProgressMonitorByPath structure. -type GetProgressMonitorByPathReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProgressMonitorByPathReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProgressMonitorByPathOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProgressMonitorByPathDefault(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 - } -} - -// NewGetProgressMonitorByPathOK creates a GetProgressMonitorByPathOK with default headers values -func NewGetProgressMonitorByPathOK() *GetProgressMonitorByPathOK { - return &GetProgressMonitorByPathOK{} -} - -/* -GetProgressMonitorByPathOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProgressMonitorByPathOK struct { - Payload *models.GetTasksResult -} - -// IsSuccess returns true when this get progress monitor by path o k response has a 2xx status code -func (o *GetProgressMonitorByPathOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get progress monitor by path o k response has a 3xx status code -func (o *GetProgressMonitorByPathOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get progress monitor by path o k response has a 4xx status code -func (o *GetProgressMonitorByPathOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get progress monitor by path o k response has a 5xx status code -func (o *GetProgressMonitorByPathOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get progress monitor by path o k response a status code equal to that given -func (o *GetProgressMonitorByPathOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get progress monitor by path o k response -func (o *GetProgressMonitorByPathOK) Code() int { - return 200 -} - -func (o *GetProgressMonitorByPathOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors/{path}][%d] getProgressMonitorByPathOK %s", 200, payload) -} - -func (o *GetProgressMonitorByPathOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors/{path}][%d] getProgressMonitorByPathOK %s", 200, payload) -} - -func (o *GetProgressMonitorByPathOK) GetPayload() *models.GetTasksResult { - return o.Payload -} - -func (o *GetProgressMonitorByPathOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetTasksResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProgressMonitorByPathDefault creates a GetProgressMonitorByPathDefault with default headers values -func NewGetProgressMonitorByPathDefault(code int) *GetProgressMonitorByPathDefault { - return &GetProgressMonitorByPathDefault{ - _statusCode: code, - } -} - -/* -GetProgressMonitorByPathDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetProgressMonitorByPathDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get progress monitor by path default response has a 2xx status code -func (o *GetProgressMonitorByPathDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get progress monitor by path default response has a 3xx status code -func (o *GetProgressMonitorByPathDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get progress monitor by path default response has a 4xx status code -func (o *GetProgressMonitorByPathDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get progress monitor by path default response has a 5xx status code -func (o *GetProgressMonitorByPathDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get progress monitor by path default response a status code equal to that given -func (o *GetProgressMonitorByPathDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get progress monitor by path default response -func (o *GetProgressMonitorByPathDefault) Code() int { - return o._statusCode -} - -func (o *GetProgressMonitorByPathDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors/{path}][%d] GetProgressMonitorByPath default %s", o._statusCode, payload) -} - -func (o *GetProgressMonitorByPathDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors/{path}][%d] GetProgressMonitorByPath default %s", o._statusCode, payload) -} - -func (o *GetProgressMonitorByPathDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetProgressMonitorByPathDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/statistics/get_progress_monitors_parameters.go b/v1/client/statistics/get_progress_monitors_parameters.go deleted file mode 100644 index 6f9cdc6a..00000000 --- a/v1/client/statistics/get_progress_monitors_parameters.go +++ /dev/null @@ -1,383 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewGetProgressMonitorsParams creates a new GetProgressMonitorsParams 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 NewGetProgressMonitorsParams() *GetProgressMonitorsParams { - return &GetProgressMonitorsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProgressMonitorsParamsWithTimeout creates a new GetProgressMonitorsParams object -// with the ability to set a timeout on a request. -func NewGetProgressMonitorsParamsWithTimeout(timeout time.Duration) *GetProgressMonitorsParams { - return &GetProgressMonitorsParams{ - timeout: timeout, - } -} - -// NewGetProgressMonitorsParamsWithContext creates a new GetProgressMonitorsParams object -// with the ability to set a context for a request. -func NewGetProgressMonitorsParamsWithContext(ctx context.Context) *GetProgressMonitorsParams { - return &GetProgressMonitorsParams{ - Context: ctx, - } -} - -// NewGetProgressMonitorsParamsWithHTTPClient creates a new GetProgressMonitorsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProgressMonitorsParamsWithHTTPClient(client *http.Client) *GetProgressMonitorsParams { - return &GetProgressMonitorsParams{ - HTTPClient: client, - } -} - -/* -GetProgressMonitorsParams contains all the parameters to send to the API endpoint - - for the get progress monitors operation. - - Typically these are written to a http.Request. -*/ -type GetProgressMonitorsParams struct { - - // Body. - Body *models.GetTasksArg - - /* EndTimeSecs. - - Tasks that ended before this time. - - Format: int64 - */ - EndTimeSecs *int64 - - /* ExcludeSubTasks. - - Skip information about the sub tasks of the matching root and sub tasks. - By default, the entire task tree will be returned for matching tasks. - */ - ExcludeSubTasks *bool - - /* IncludeFinishedTasks. - - Returns finished tasks as well. - By default, Pulse only returns active tasks. - */ - IncludeFinishedTasks *bool - - /* MaxTasks. - - Only return at most these many matching tasks. This constraint is applied - with each query's result group. - - Format: int32 - */ - MaxTasks *int32 - - /* StartTimeSecs. - - Tasks that started after this time. - - Format: int64 - */ - StartTimeSecs *int64 - - /* TaskPathVec. - - The hierarchical paths to the names of the tasks being queried. - The task path-name specified here can be a prefix. - Clients can specify multiple paths/prefixes. Pulse will return one - ResultGroup for each path query. - - Each path is treated separately by Pulse, so if there are duplicate paths, - Pulse will return duplicate results. - - Both root tasks and sub tasks can be specified in @task_path_vec. - */ - TaskPathVec []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get progress monitors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProgressMonitorsParams) WithDefaults() *GetProgressMonitorsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get progress monitors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProgressMonitorsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get progress monitors params -func (o *GetProgressMonitorsParams) WithTimeout(timeout time.Duration) *GetProgressMonitorsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get progress monitors params -func (o *GetProgressMonitorsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get progress monitors params -func (o *GetProgressMonitorsParams) WithContext(ctx context.Context) *GetProgressMonitorsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get progress monitors params -func (o *GetProgressMonitorsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get progress monitors params -func (o *GetProgressMonitorsParams) WithHTTPClient(client *http.Client) *GetProgressMonitorsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get progress monitors params -func (o *GetProgressMonitorsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get progress monitors params -func (o *GetProgressMonitorsParams) WithBody(body *models.GetTasksArg) *GetProgressMonitorsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get progress monitors params -func (o *GetProgressMonitorsParams) SetBody(body *models.GetTasksArg) { - o.Body = body -} - -// WithEndTimeSecs adds the endTimeSecs to the get progress monitors params -func (o *GetProgressMonitorsParams) WithEndTimeSecs(endTimeSecs *int64) *GetProgressMonitorsParams { - o.SetEndTimeSecs(endTimeSecs) - return o -} - -// SetEndTimeSecs adds the endTimeSecs to the get progress monitors params -func (o *GetProgressMonitorsParams) SetEndTimeSecs(endTimeSecs *int64) { - o.EndTimeSecs = endTimeSecs -} - -// WithExcludeSubTasks adds the excludeSubTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) WithExcludeSubTasks(excludeSubTasks *bool) *GetProgressMonitorsParams { - o.SetExcludeSubTasks(excludeSubTasks) - return o -} - -// SetExcludeSubTasks adds the excludeSubTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) SetExcludeSubTasks(excludeSubTasks *bool) { - o.ExcludeSubTasks = excludeSubTasks -} - -// WithIncludeFinishedTasks adds the includeFinishedTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) WithIncludeFinishedTasks(includeFinishedTasks *bool) *GetProgressMonitorsParams { - o.SetIncludeFinishedTasks(includeFinishedTasks) - return o -} - -// SetIncludeFinishedTasks adds the includeFinishedTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) SetIncludeFinishedTasks(includeFinishedTasks *bool) { - o.IncludeFinishedTasks = includeFinishedTasks -} - -// WithMaxTasks adds the maxTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) WithMaxTasks(maxTasks *int32) *GetProgressMonitorsParams { - o.SetMaxTasks(maxTasks) - return o -} - -// SetMaxTasks adds the maxTasks to the get progress monitors params -func (o *GetProgressMonitorsParams) SetMaxTasks(maxTasks *int32) { - o.MaxTasks = maxTasks -} - -// WithStartTimeSecs adds the startTimeSecs to the get progress monitors params -func (o *GetProgressMonitorsParams) WithStartTimeSecs(startTimeSecs *int64) *GetProgressMonitorsParams { - o.SetStartTimeSecs(startTimeSecs) - return o -} - -// SetStartTimeSecs adds the startTimeSecs to the get progress monitors params -func (o *GetProgressMonitorsParams) SetStartTimeSecs(startTimeSecs *int64) { - o.StartTimeSecs = startTimeSecs -} - -// WithTaskPathVec adds the taskPathVec to the get progress monitors params -func (o *GetProgressMonitorsParams) WithTaskPathVec(taskPathVec []string) *GetProgressMonitorsParams { - o.SetTaskPathVec(taskPathVec) - return o -} - -// SetTaskPathVec adds the taskPathVec to the get progress monitors params -func (o *GetProgressMonitorsParams) SetTaskPathVec(taskPathVec []string) { - o.TaskPathVec = taskPathVec -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProgressMonitorsParams) 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 o.EndTimeSecs != nil { - - // query param endTimeSecs - var qrEndTimeSecs int64 - - if o.EndTimeSecs != nil { - qrEndTimeSecs = *o.EndTimeSecs - } - qEndTimeSecs := swag.FormatInt64(qrEndTimeSecs) - if qEndTimeSecs != "" { - - if err := r.SetQueryParam("endTimeSecs", qEndTimeSecs); err != nil { - return err - } - } - } - - if o.ExcludeSubTasks != nil { - - // query param excludeSubTasks - var qrExcludeSubTasks bool - - if o.ExcludeSubTasks != nil { - qrExcludeSubTasks = *o.ExcludeSubTasks - } - qExcludeSubTasks := swag.FormatBool(qrExcludeSubTasks) - if qExcludeSubTasks != "" { - - if err := r.SetQueryParam("excludeSubTasks", qExcludeSubTasks); err != nil { - return err - } - } - } - - if o.IncludeFinishedTasks != nil { - - // query param includeFinishedTasks - var qrIncludeFinishedTasks bool - - if o.IncludeFinishedTasks != nil { - qrIncludeFinishedTasks = *o.IncludeFinishedTasks - } - qIncludeFinishedTasks := swag.FormatBool(qrIncludeFinishedTasks) - if qIncludeFinishedTasks != "" { - - if err := r.SetQueryParam("includeFinishedTasks", qIncludeFinishedTasks); err != nil { - return err - } - } - } - - if o.MaxTasks != nil { - - // query param maxTasks - var qrMaxTasks int32 - - if o.MaxTasks != nil { - qrMaxTasks = *o.MaxTasks - } - qMaxTasks := swag.FormatInt32(qrMaxTasks) - if qMaxTasks != "" { - - if err := r.SetQueryParam("maxTasks", qMaxTasks); err != nil { - return err - } - } - } - - if o.StartTimeSecs != nil { - - // query param startTimeSecs - var qrStartTimeSecs int64 - - if o.StartTimeSecs != nil { - qrStartTimeSecs = *o.StartTimeSecs - } - qStartTimeSecs := swag.FormatInt64(qrStartTimeSecs) - if qStartTimeSecs != "" { - - if err := r.SetQueryParam("startTimeSecs", qStartTimeSecs); err != nil { - return err - } - } - } - - if o.TaskPathVec != nil { - - // binding items for taskPathVec - joinedTaskPathVec := o.bindParamTaskPathVec(reg) - - // query array param taskPathVec - if err := r.SetQueryParam("taskPathVec", joinedTaskPathVec...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProgressMonitors binds the parameter taskPathVec -func (o *GetProgressMonitorsParams) bindParamTaskPathVec(formats strfmt.Registry) []string { - taskPathVecIR := o.TaskPathVec - - var taskPathVecIC []string - for _, taskPathVecIIR := range taskPathVecIR { // explode []string - - taskPathVecIIV := taskPathVecIIR // string as string - taskPathVecIC = append(taskPathVecIC, taskPathVecIIV) - } - - // items.CollectionFormat: "" - taskPathVecIS := swag.JoinByFormat(taskPathVecIC, "") - - return taskPathVecIS -} diff --git a/v1/client/statistics/get_progress_monitors_responses.go b/v1/client/statistics/get_progress_monitors_responses.go deleted file mode 100644 index 77bec1c3..00000000 --- a/v1/client/statistics/get_progress_monitors_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProgressMonitorsReader is a Reader for the GetProgressMonitors structure. -type GetProgressMonitorsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProgressMonitorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProgressMonitorsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProgressMonitorsDefault(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 - } -} - -// NewGetProgressMonitorsOK creates a GetProgressMonitorsOK with default headers values -func NewGetProgressMonitorsOK() *GetProgressMonitorsOK { - return &GetProgressMonitorsOK{} -} - -/* -GetProgressMonitorsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProgressMonitorsOK struct { - Payload *models.GetTasksResult -} - -// IsSuccess returns true when this get progress monitors o k response has a 2xx status code -func (o *GetProgressMonitorsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get progress monitors o k response has a 3xx status code -func (o *GetProgressMonitorsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get progress monitors o k response has a 4xx status code -func (o *GetProgressMonitorsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get progress monitors o k response has a 5xx status code -func (o *GetProgressMonitorsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get progress monitors o k response a status code equal to that given -func (o *GetProgressMonitorsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get progress monitors o k response -func (o *GetProgressMonitorsOK) Code() int { - return 200 -} - -func (o *GetProgressMonitorsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors][%d] getProgressMonitorsOK %s", 200, payload) -} - -func (o *GetProgressMonitorsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors][%d] getProgressMonitorsOK %s", 200, payload) -} - -func (o *GetProgressMonitorsOK) GetPayload() *models.GetTasksResult { - return o.Payload -} - -func (o *GetProgressMonitorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetTasksResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProgressMonitorsDefault creates a GetProgressMonitorsDefault with default headers values -func NewGetProgressMonitorsDefault(code int) *GetProgressMonitorsDefault { - return &GetProgressMonitorsDefault{ - _statusCode: code, - } -} - -/* -GetProgressMonitorsDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetProgressMonitorsDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get progress monitors default response has a 2xx status code -func (o *GetProgressMonitorsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get progress monitors default response has a 3xx status code -func (o *GetProgressMonitorsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get progress monitors default response has a 4xx status code -func (o *GetProgressMonitorsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get progress monitors default response has a 5xx status code -func (o *GetProgressMonitorsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get progress monitors default response a status code equal to that given -func (o *GetProgressMonitorsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get progress monitors default response -func (o *GetProgressMonitorsDefault) Code() int { - return o._statusCode -} - -func (o *GetProgressMonitorsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors][%d] GetProgressMonitors default %s", o._statusCode, payload) -} - -func (o *GetProgressMonitorsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /progressMonitors][%d] GetProgressMonitors default %s", o._statusCode, payload) -} - -func (o *GetProgressMonitorsDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetProgressMonitorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/statistics/get_tasks_parameters.go b/v1/client/statistics/get_tasks_parameters.go deleted file mode 100644 index 21818cee..00000000 --- a/v1/client/statistics/get_tasks_parameters.go +++ /dev/null @@ -1,409 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" -) - -// NewGetTasksParams creates a new GetTasksParams 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 NewGetTasksParams() *GetTasksParams { - return &GetTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTasksParamsWithTimeout creates a new GetTasksParams object -// with the ability to set a timeout on a request. -func NewGetTasksParamsWithTimeout(timeout time.Duration) *GetTasksParams { - return &GetTasksParams{ - timeout: timeout, - } -} - -// NewGetTasksParamsWithContext creates a new GetTasksParams object -// with the ability to set a context for a request. -func NewGetTasksParamsWithContext(ctx context.Context) *GetTasksParams { - return &GetTasksParams{ - Context: ctx, - } -} - -// NewGetTasksParamsWithHTTPClient creates a new GetTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTasksParamsWithHTTPClient(client *http.Client) *GetTasksParams { - return &GetTasksParams{ - HTTPClient: client, - } -} - -/* -GetTasksParams contains all the parameters to send to the API endpoint - - for the get tasks operation. - - Typically these are written to a http.Request. -*/ -type GetTasksParams struct { - - /* Attributes. - - If specified, tasks matching the current query are further filtered by - these KeyValuePairs. This gives client an ability to search by custom - attributes that they specified during the task creation. Only the Tasks - having 'all' of the specified key=value pairs will be returned. - Attributes passed in should be separated by commas and each must follow - the pattern "name:type:value". Valid types are "kInt64", "kDouble", - "kString", and "kBytes". - */ - Attributes []string - - /* EndTimeSeconds. - - Specifies an end time by which to filter tasks. Including a value - here will result in tasks only being included if the ended before - this time. - - Format: int64 - */ - EndTimeSeconds *int64 - - /* ExcludeSubTasks. - - Specifies whether or not to include subtasks. By default all subtasks - of any task matching a query will be returned. - */ - ExcludeSubTasks *bool - - /* IncludeFinishedTasks. - - Specifies whether or not to include finished tasks. By default, - Pulse will only include unfinished tasks. - */ - IncludeFinishedTasks *bool - - /* MaxTasks. - - Specifies the maximum number of tasks to display. Defaults to 100. - - Format: int32 - */ - MaxTasks *int32 - - /* StartTimeSeconds. - - Specifies a start time by which to filter tasks. Including a value - here will result in tasks only being included if they started after - the time specified. - - Format: int64 - */ - StartTimeSeconds *int64 - - /* TaskPaths. - - Specifies a list of tasks path by which to filter the results. Otherwise - all of the tasks will be returned. - */ - TaskPaths []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTasksParams) WithDefaults() *GetTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tasks params -func (o *GetTasksParams) WithTimeout(timeout time.Duration) *GetTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tasks params -func (o *GetTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tasks params -func (o *GetTasksParams) WithContext(ctx context.Context) *GetTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tasks params -func (o *GetTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tasks params -func (o *GetTasksParams) WithHTTPClient(client *http.Client) *GetTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tasks params -func (o *GetTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttributes adds the attributes to the get tasks params -func (o *GetTasksParams) WithAttributes(attributes []string) *GetTasksParams { - o.SetAttributes(attributes) - return o -} - -// SetAttributes adds the attributes to the get tasks params -func (o *GetTasksParams) SetAttributes(attributes []string) { - o.Attributes = attributes -} - -// WithEndTimeSeconds adds the endTimeSeconds to the get tasks params -func (o *GetTasksParams) WithEndTimeSeconds(endTimeSeconds *int64) *GetTasksParams { - o.SetEndTimeSeconds(endTimeSeconds) - return o -} - -// SetEndTimeSeconds adds the endTimeSeconds to the get tasks params -func (o *GetTasksParams) SetEndTimeSeconds(endTimeSeconds *int64) { - o.EndTimeSeconds = endTimeSeconds -} - -// WithExcludeSubTasks adds the excludeSubTasks to the get tasks params -func (o *GetTasksParams) WithExcludeSubTasks(excludeSubTasks *bool) *GetTasksParams { - o.SetExcludeSubTasks(excludeSubTasks) - return o -} - -// SetExcludeSubTasks adds the excludeSubTasks to the get tasks params -func (o *GetTasksParams) SetExcludeSubTasks(excludeSubTasks *bool) { - o.ExcludeSubTasks = excludeSubTasks -} - -// WithIncludeFinishedTasks adds the includeFinishedTasks to the get tasks params -func (o *GetTasksParams) WithIncludeFinishedTasks(includeFinishedTasks *bool) *GetTasksParams { - o.SetIncludeFinishedTasks(includeFinishedTasks) - return o -} - -// SetIncludeFinishedTasks adds the includeFinishedTasks to the get tasks params -func (o *GetTasksParams) SetIncludeFinishedTasks(includeFinishedTasks *bool) { - o.IncludeFinishedTasks = includeFinishedTasks -} - -// WithMaxTasks adds the maxTasks to the get tasks params -func (o *GetTasksParams) WithMaxTasks(maxTasks *int32) *GetTasksParams { - o.SetMaxTasks(maxTasks) - return o -} - -// SetMaxTasks adds the maxTasks to the get tasks params -func (o *GetTasksParams) SetMaxTasks(maxTasks *int32) { - o.MaxTasks = maxTasks -} - -// WithStartTimeSeconds adds the startTimeSeconds to the get tasks params -func (o *GetTasksParams) WithStartTimeSeconds(startTimeSeconds *int64) *GetTasksParams { - o.SetStartTimeSeconds(startTimeSeconds) - return o -} - -// SetStartTimeSeconds adds the startTimeSeconds to the get tasks params -func (o *GetTasksParams) SetStartTimeSeconds(startTimeSeconds *int64) { - o.StartTimeSeconds = startTimeSeconds -} - -// WithTaskPaths adds the taskPaths to the get tasks params -func (o *GetTasksParams) WithTaskPaths(taskPaths []string) *GetTasksParams { - o.SetTaskPaths(taskPaths) - return o -} - -// SetTaskPaths adds the taskPaths to the get tasks params -func (o *GetTasksParams) SetTaskPaths(taskPaths []string) { - o.TaskPaths = taskPaths -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Attributes != nil { - - // binding items for attributes - joinedAttributes := o.bindParamAttributes(reg) - - // query array param attributes - if err := r.SetQueryParam("attributes", joinedAttributes...); err != nil { - return err - } - } - - if o.EndTimeSeconds != nil { - - // query param endTimeSeconds - var qrEndTimeSeconds int64 - - if o.EndTimeSeconds != nil { - qrEndTimeSeconds = *o.EndTimeSeconds - } - qEndTimeSeconds := swag.FormatInt64(qrEndTimeSeconds) - if qEndTimeSeconds != "" { - - if err := r.SetQueryParam("endTimeSeconds", qEndTimeSeconds); err != nil { - return err - } - } - } - - if o.ExcludeSubTasks != nil { - - // query param excludeSubTasks - var qrExcludeSubTasks bool - - if o.ExcludeSubTasks != nil { - qrExcludeSubTasks = *o.ExcludeSubTasks - } - qExcludeSubTasks := swag.FormatBool(qrExcludeSubTasks) - if qExcludeSubTasks != "" { - - if err := r.SetQueryParam("excludeSubTasks", qExcludeSubTasks); err != nil { - return err - } - } - } - - if o.IncludeFinishedTasks != nil { - - // query param includeFinishedTasks - var qrIncludeFinishedTasks bool - - if o.IncludeFinishedTasks != nil { - qrIncludeFinishedTasks = *o.IncludeFinishedTasks - } - qIncludeFinishedTasks := swag.FormatBool(qrIncludeFinishedTasks) - if qIncludeFinishedTasks != "" { - - if err := r.SetQueryParam("includeFinishedTasks", qIncludeFinishedTasks); err != nil { - return err - } - } - } - - if o.MaxTasks != nil { - - // query param maxTasks - var qrMaxTasks int32 - - if o.MaxTasks != nil { - qrMaxTasks = *o.MaxTasks - } - qMaxTasks := swag.FormatInt32(qrMaxTasks) - if qMaxTasks != "" { - - if err := r.SetQueryParam("maxTasks", qMaxTasks); err != nil { - return err - } - } - } - - if o.StartTimeSeconds != nil { - - // query param startTimeSeconds - var qrStartTimeSeconds int64 - - if o.StartTimeSeconds != nil { - qrStartTimeSeconds = *o.StartTimeSeconds - } - qStartTimeSeconds := swag.FormatInt64(qrStartTimeSeconds) - if qStartTimeSeconds != "" { - - if err := r.SetQueryParam("startTimeSeconds", qStartTimeSeconds); err != nil { - return err - } - } - } - - if o.TaskPaths != nil { - - // binding items for taskPaths - joinedTaskPaths := o.bindParamTaskPaths(reg) - - // query array param taskPaths - if err := r.SetQueryParam("taskPaths", joinedTaskPaths...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTasks binds the parameter attributes -func (o *GetTasksParams) bindParamAttributes(formats strfmt.Registry) []string { - attributesIR := o.Attributes - - var attributesIC []string - for _, attributesIIR := range attributesIR { // explode []string - - attributesIIV := attributesIIR // string as string - attributesIC = append(attributesIC, attributesIIV) - } - - // items.CollectionFormat: "" - attributesIS := swag.JoinByFormat(attributesIC, "") - - return attributesIS -} - -// bindParamGetTasks binds the parameter taskPaths -func (o *GetTasksParams) bindParamTaskPaths(formats strfmt.Registry) []string { - taskPathsIR := o.TaskPaths - - var taskPathsIC []string - for _, taskPathsIIR := range taskPathsIR { // explode []string - - taskPathsIIV := taskPathsIIR // string as string - taskPathsIC = append(taskPathsIC, taskPathsIIV) - } - - // items.CollectionFormat: "" - taskPathsIS := swag.JoinByFormat(taskPathsIC, "") - - return taskPathsIS -} diff --git a/v1/client/statistics/get_tasks_responses.go b/v1/client/statistics/get_tasks_responses.go deleted file mode 100644 index 660c16d0..00000000 --- a/v1/client/statistics/get_tasks_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTasksReader is a Reader for the GetTasks structure. -type GetTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTasksDefault(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 - } -} - -// NewGetTasksOK creates a GetTasksOK with default headers values -func NewGetTasksOK() *GetTasksOK { - return &GetTasksOK{} -} - -/* -GetTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTasksOK struct { - Payload []*models.Task -} - -// IsSuccess returns true when this get tasks o k response has a 2xx status code -func (o *GetTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tasks o k response has a 3xx status code -func (o *GetTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tasks o k response has a 4xx status code -func (o *GetTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tasks o k response has a 5xx status code -func (o *GetTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tasks o k response a status code equal to that given -func (o *GetTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tasks o k response -func (o *GetTasksOK) Code() int { - return 200 -} - -func (o *GetTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tasks/status][%d] getTasksOK %s", 200, payload) -} - -func (o *GetTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tasks/status][%d] getTasksOK %s", 200, payload) -} - -func (o *GetTasksOK) GetPayload() []*models.Task { - return o.Payload -} - -func (o *GetTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTasksDefault creates a GetTasksDefault with default headers values -func NewGetTasksDefault(code int) *GetTasksDefault { - return &GetTasksDefault{ - _statusCode: code, - } -} - -/* -GetTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTasksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get tasks default response has a 2xx status code -func (o *GetTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tasks default response has a 3xx status code -func (o *GetTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tasks default response has a 4xx status code -func (o *GetTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tasks default response has a 5xx status code -func (o *GetTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tasks default response a status code equal to that given -func (o *GetTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tasks default response -func (o *GetTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tasks/status][%d] GetTasks default %s", o._statusCode, payload) -} - -func (o *GetTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tasks/status][%d] GetTasks default %s", o._statusCode, payload) -} - -func (o *GetTasksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTasksDefault) 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/statistics/get_time_series_schema_parameters.go b/v1/client/statistics/get_time_series_schema_parameters.go deleted file mode 100644 index 8d239a96..00000000 --- a/v1/client/statistics/get_time_series_schema_parameters.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" -) - -// NewGetTimeSeriesSchemaParams creates a new GetTimeSeriesSchemaParams 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 NewGetTimeSeriesSchemaParams() *GetTimeSeriesSchemaParams { - return &GetTimeSeriesSchemaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTimeSeriesSchemaParamsWithTimeout creates a new GetTimeSeriesSchemaParams object -// with the ability to set a timeout on a request. -func NewGetTimeSeriesSchemaParamsWithTimeout(timeout time.Duration) *GetTimeSeriesSchemaParams { - return &GetTimeSeriesSchemaParams{ - timeout: timeout, - } -} - -// NewGetTimeSeriesSchemaParamsWithContext creates a new GetTimeSeriesSchemaParams object -// with the ability to set a context for a request. -func NewGetTimeSeriesSchemaParamsWithContext(ctx context.Context) *GetTimeSeriesSchemaParams { - return &GetTimeSeriesSchemaParams{ - Context: ctx, - } -} - -// NewGetTimeSeriesSchemaParamsWithHTTPClient creates a new GetTimeSeriesSchemaParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTimeSeriesSchemaParamsWithHTTPClient(client *http.Client) *GetTimeSeriesSchemaParams { - return &GetTimeSeriesSchemaParams{ - HTTPClient: client, - } -} - -/* -GetTimeSeriesSchemaParams contains all the parameters to send to the API endpoint - - for the get time series schema operation. - - Typically these are written to a http.Request. -*/ -type GetTimeSeriesSchemaParams struct { - - /* EntityID. - - Specifies the id of the entity. - - Format: int64 - */ - EntityID int64 - - /* EntityName. - - Specifies the name of the entity. - */ - EntityName string - - /* EntityType. - - Specifies the type of the entity. - The following entity types are available: - cluster, viewbox. - EntityType represents the various values for the entity type. - 'Cluster' indicates entity type of Cluster. - 'StorageDomain' indicates entity type of Storage Domain. - */ - EntityType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get time series schema params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesSchemaParams) WithDefaults() *GetTimeSeriesSchemaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get time series schema params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesSchemaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithTimeout(timeout time.Duration) *GetTimeSeriesSchemaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithContext(ctx context.Context) *GetTimeSeriesSchemaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithHTTPClient(client *http.Client) *GetTimeSeriesSchemaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEntityID adds the entityID to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithEntityID(entityID int64) *GetTimeSeriesSchemaParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetEntityID(entityID int64) { - o.EntityID = entityID -} - -// WithEntityName adds the entityName to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithEntityName(entityName string) *GetTimeSeriesSchemaParams { - o.SetEntityName(entityName) - return o -} - -// SetEntityName adds the entityName to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetEntityName(entityName string) { - o.EntityName = entityName -} - -// WithEntityType adds the entityType to the get time series schema params -func (o *GetTimeSeriesSchemaParams) WithEntityType(entityType string) *GetTimeSeriesSchemaParams { - o.SetEntityType(entityType) - return o -} - -// SetEntityType adds the entityType to the get time series schema params -func (o *GetTimeSeriesSchemaParams) SetEntityType(entityType string) { - o.EntityType = entityType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTimeSeriesSchemaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param entityId - qrEntityID := o.EntityID - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - - // query param entityName - qrEntityName := o.EntityName - qEntityName := qrEntityName - if qEntityName != "" { - - if err := r.SetQueryParam("entityName", qEntityName); err != nil { - return err - } - } - - // query param entityType - qrEntityType := o.EntityType - qEntityType := qrEntityType - if qEntityType != "" { - - if err := r.SetQueryParam("entityType", qEntityType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/statistics/get_time_series_schema_responses.go b/v1/client/statistics/get_time_series_schema_responses.go deleted file mode 100644 index 9c635c22..00000000 --- a/v1/client/statistics/get_time_series_schema_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTimeSeriesSchemaReader is a Reader for the GetTimeSeriesSchema structure. -type GetTimeSeriesSchemaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTimeSeriesSchemaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTimeSeriesSchemaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTimeSeriesSchemaDefault(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 - } -} - -// NewGetTimeSeriesSchemaOK creates a GetTimeSeriesSchemaOK with default headers values -func NewGetTimeSeriesSchemaOK() *GetTimeSeriesSchemaOK { - return &GetTimeSeriesSchemaOK{} -} - -/* -GetTimeSeriesSchemaOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTimeSeriesSchemaOK struct { - Payload *models.TimeSeriesSchemaResponse -} - -// IsSuccess returns true when this get time series schema o k response has a 2xx status code -func (o *GetTimeSeriesSchemaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get time series schema o k response has a 3xx status code -func (o *GetTimeSeriesSchemaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get time series schema o k response has a 4xx status code -func (o *GetTimeSeriesSchemaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get time series schema o k response has a 5xx status code -func (o *GetTimeSeriesSchemaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get time series schema o k response a status code equal to that given -func (o *GetTimeSeriesSchemaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get time series schema o k response -func (o *GetTimeSeriesSchemaOK) Code() int { - return 200 -} - -func (o *GetTimeSeriesSchemaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesSchema][%d] getTimeSeriesSchemaOK %s", 200, payload) -} - -func (o *GetTimeSeriesSchemaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesSchema][%d] getTimeSeriesSchemaOK %s", 200, payload) -} - -func (o *GetTimeSeriesSchemaOK) GetPayload() *models.TimeSeriesSchemaResponse { - return o.Payload -} - -func (o *GetTimeSeriesSchemaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TimeSeriesSchemaResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTimeSeriesSchemaDefault creates a GetTimeSeriesSchemaDefault with default headers values -func NewGetTimeSeriesSchemaDefault(code int) *GetTimeSeriesSchemaDefault { - return &GetTimeSeriesSchemaDefault{ - _statusCode: code, - } -} - -/* -GetTimeSeriesSchemaDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTimeSeriesSchemaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get time series schema default response has a 2xx status code -func (o *GetTimeSeriesSchemaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get time series schema default response has a 3xx status code -func (o *GetTimeSeriesSchemaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get time series schema default response has a 4xx status code -func (o *GetTimeSeriesSchemaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get time series schema default response has a 5xx status code -func (o *GetTimeSeriesSchemaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get time series schema default response a status code equal to that given -func (o *GetTimeSeriesSchemaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get time series schema default response -func (o *GetTimeSeriesSchemaDefault) Code() int { - return o._statusCode -} - -func (o *GetTimeSeriesSchemaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesSchema][%d] GetTimeSeriesSchema default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesSchemaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesSchema][%d] GetTimeSeriesSchema default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesSchemaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTimeSeriesSchemaDefault) 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/statistics/get_time_series_stats_parameters.go b/v1/client/statistics/get_time_series_stats_parameters.go deleted file mode 100644 index bafe10af..00000000 --- a/v1/client/statistics/get_time_series_stats_parameters.go +++ /dev/null @@ -1,488 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/go-openapi/swag" -) - -// NewGetTimeSeriesStatsParams creates a new GetTimeSeriesStatsParams 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 NewGetTimeSeriesStatsParams() *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTimeSeriesStatsParamsWithTimeout creates a new GetTimeSeriesStatsParams object -// with the ability to set a timeout on a request. -func NewGetTimeSeriesStatsParamsWithTimeout(timeout time.Duration) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - timeout: timeout, - } -} - -// NewGetTimeSeriesStatsParamsWithContext creates a new GetTimeSeriesStatsParams object -// with the ability to set a context for a request. -func NewGetTimeSeriesStatsParamsWithContext(ctx context.Context) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - Context: ctx, - } -} - -// NewGetTimeSeriesStatsParamsWithHTTPClient creates a new GetTimeSeriesStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTimeSeriesStatsParamsWithHTTPClient(client *http.Client) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - HTTPClient: client, - } -} - -/* -GetTimeSeriesStatsParams contains all the parameters to send to the API endpoint - - for the get time series stats operation. - - Typically these are written to a http.Request. -*/ -type GetTimeSeriesStatsParams struct { - - /* EndTimeMsecs. - - Specifies the end time for the series of metric data. - Specify the end time as a Unix epoch Timestamp (in milliseconds). - If not specified, the data points up to the current time are returned. - - Format: int64 - */ - EndTimeMsecs *int64 - - /* EntityID. - - Specifies the id of the entity represented as a string. - Get the entityId by running the GET - public/statistics/entities operation. - */ - EntityID *string - - /* EntityIDList. - - Specifies an entity id list represented as a string. The stats result will - be the sum over all these entities. If both EntityIdList and EntityId are - specified, EntityId will be ignored. - */ - EntityIDList []string - - /* IncludeGrowthChange. - - Specifies if the response should return the difference of a data point - with the previous datapoint. Used for determining the - change in growth rate. Datapoint could be +x, 0, -x - showing the growth is up, no change or down respectively. - */ - IncludeGrowthChange *bool - - /* MetricName. - - Specifies the name of the metric such as the 'kDiskAwaitTimeMsecs' - which is displayed as 'Disk Health' in Advanced Diagnostics - of the Cohesity Dashboard. - */ - MetricName string - - /* ProrateDataPoints. - - Specifies to create pro rated data point for every rollup interval instead - of returning the actual raw data points. This should be used only when - rollup function is provided. - */ - ProrateDataPoints *bool - - /* RollupFunction. - - Specifies the rollup function to apply to the data points for - the time interval specified by rollupInternalSecs. - The following rollup functions are available: - sum, average, count, max, min, median, percentile95, latest, - and rate. For more information about the functions, see the - Advanced Diagnostics in the Cohesity online help. - If not specified, raw data is returned. - */ - RollupFunction *string - - /* RollupIntervalSecs. - - Specifies the time interval granularity (in seconds) - for the specified rollup function. - Only specify a value if Rollup function is also specified. - - Format: int32 - */ - RollupIntervalSecs *int32 - - /* SchemaName. - - Specifies the name of entity schema such as 'kIceboxJobVaultStats'. - */ - SchemaName string - - /* StartTimeMsecs. - - Specifies the start time for the series of metric data. - Specify the start time as a Unix epoch Timestamp (in milliseconds). - - Format: int64 - */ - StartTimeMsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get time series stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesStatsParams) WithDefaults() *GetTimeSeriesStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get time series stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithTimeout(timeout time.Duration) *GetTimeSeriesStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithContext(ctx context.Context) *GetTimeSeriesStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithHTTPClient(client *http.Client) *GetTimeSeriesStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeMsecs adds the endTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithEndTimeMsecs(endTimeMsecs *int64) *GetTimeSeriesStatsParams { - o.SetEndTimeMsecs(endTimeMsecs) - return o -} - -// SetEndTimeMsecs adds the endTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetEndTimeMsecs(endTimeMsecs *int64) { - o.EndTimeMsecs = endTimeMsecs -} - -// WithEntityID adds the entityID to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithEntityID(entityID *string) *GetTimeSeriesStatsParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetEntityID(entityID *string) { - o.EntityID = entityID -} - -// WithEntityIDList adds the entityIDList to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithEntityIDList(entityIDList []string) *GetTimeSeriesStatsParams { - o.SetEntityIDList(entityIDList) - return o -} - -// SetEntityIDList adds the entityIdList to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetEntityIDList(entityIDList []string) { - o.EntityIDList = entityIDList -} - -// WithIncludeGrowthChange adds the includeGrowthChange to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithIncludeGrowthChange(includeGrowthChange *bool) *GetTimeSeriesStatsParams { - o.SetIncludeGrowthChange(includeGrowthChange) - return o -} - -// SetIncludeGrowthChange adds the includeGrowthChange to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetIncludeGrowthChange(includeGrowthChange *bool) { - o.IncludeGrowthChange = includeGrowthChange -} - -// WithMetricName adds the metricName to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithMetricName(metricName string) *GetTimeSeriesStatsParams { - o.SetMetricName(metricName) - return o -} - -// SetMetricName adds the metricName to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetMetricName(metricName string) { - o.MetricName = metricName -} - -// WithProrateDataPoints adds the prorateDataPoints to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithProrateDataPoints(prorateDataPoints *bool) *GetTimeSeriesStatsParams { - o.SetProrateDataPoints(prorateDataPoints) - return o -} - -// SetProrateDataPoints adds the prorateDataPoints to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetProrateDataPoints(prorateDataPoints *bool) { - o.ProrateDataPoints = prorateDataPoints -} - -// WithRollupFunction adds the rollupFunction to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithRollupFunction(rollupFunction *string) *GetTimeSeriesStatsParams { - o.SetRollupFunction(rollupFunction) - return o -} - -// SetRollupFunction adds the rollupFunction to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetRollupFunction(rollupFunction *string) { - o.RollupFunction = rollupFunction -} - -// WithRollupIntervalSecs adds the rollupIntervalSecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithRollupIntervalSecs(rollupIntervalSecs *int32) *GetTimeSeriesStatsParams { - o.SetRollupIntervalSecs(rollupIntervalSecs) - return o -} - -// SetRollupIntervalSecs adds the rollupIntervalSecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetRollupIntervalSecs(rollupIntervalSecs *int32) { - o.RollupIntervalSecs = rollupIntervalSecs -} - -// WithSchemaName adds the schemaName to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithSchemaName(schemaName string) *GetTimeSeriesStatsParams { - o.SetSchemaName(schemaName) - return o -} - -// SetSchemaName adds the schemaName to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetSchemaName(schemaName string) { - o.SchemaName = schemaName -} - -// WithStartTimeMsecs adds the startTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithStartTimeMsecs(startTimeMsecs int64) *GetTimeSeriesStatsParams { - o.SetStartTimeMsecs(startTimeMsecs) - return o -} - -// SetStartTimeMsecs adds the startTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetStartTimeMsecs(startTimeMsecs int64) { - o.StartTimeMsecs = startTimeMsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTimeSeriesStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeMsecs != nil { - - // query param endTimeMsecs - var qrEndTimeMsecs int64 - - if o.EndTimeMsecs != nil { - qrEndTimeMsecs = *o.EndTimeMsecs - } - qEndTimeMsecs := swag.FormatInt64(qrEndTimeMsecs) - if qEndTimeMsecs != "" { - - if err := r.SetQueryParam("endTimeMsecs", qEndTimeMsecs); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID string - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := qrEntityID - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.EntityIDList != nil { - - // binding items for entityIdList - joinedEntityIDList := o.bindParamEntityIDList(reg) - - // query array param entityIdList - if err := r.SetQueryParam("entityIdList", joinedEntityIDList...); err != nil { - return err - } - } - - if o.IncludeGrowthChange != nil { - - // query param includeGrowthChange - var qrIncludeGrowthChange bool - - if o.IncludeGrowthChange != nil { - qrIncludeGrowthChange = *o.IncludeGrowthChange - } - qIncludeGrowthChange := swag.FormatBool(qrIncludeGrowthChange) - if qIncludeGrowthChange != "" { - - if err := r.SetQueryParam("includeGrowthChange", qIncludeGrowthChange); err != nil { - return err - } - } - } - - // query param metricName - qrMetricName := o.MetricName - qMetricName := qrMetricName - if qMetricName != "" { - - if err := r.SetQueryParam("metricName", qMetricName); err != nil { - return err - } - } - - if o.ProrateDataPoints != nil { - - // query param prorateDataPoints - var qrProrateDataPoints bool - - if o.ProrateDataPoints != nil { - qrProrateDataPoints = *o.ProrateDataPoints - } - qProrateDataPoints := swag.FormatBool(qrProrateDataPoints) - if qProrateDataPoints != "" { - - if err := r.SetQueryParam("prorateDataPoints", qProrateDataPoints); err != nil { - return err - } - } - } - - if o.RollupFunction != nil { - - // query param rollupFunction - var qrRollupFunction string - - if o.RollupFunction != nil { - qrRollupFunction = *o.RollupFunction - } - qRollupFunction := qrRollupFunction - if qRollupFunction != "" { - - if err := r.SetQueryParam("rollupFunction", qRollupFunction); err != nil { - return err - } - } - } - - if o.RollupIntervalSecs != nil { - - // query param rollupIntervalSecs - var qrRollupIntervalSecs int32 - - if o.RollupIntervalSecs != nil { - qrRollupIntervalSecs = *o.RollupIntervalSecs - } - qRollupIntervalSecs := swag.FormatInt32(qrRollupIntervalSecs) - if qRollupIntervalSecs != "" { - - if err := r.SetQueryParam("rollupIntervalSecs", qRollupIntervalSecs); err != nil { - return err - } - } - } - - // query param schemaName - qrSchemaName := o.SchemaName - qSchemaName := qrSchemaName - if qSchemaName != "" { - - if err := r.SetQueryParam("schemaName", qSchemaName); err != nil { - return err - } - } - - // query param startTimeMsecs - qrStartTimeMsecs := o.StartTimeMsecs - qStartTimeMsecs := swag.FormatInt64(qrStartTimeMsecs) - if qStartTimeMsecs != "" { - - if err := r.SetQueryParam("startTimeMsecs", qStartTimeMsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTimeSeriesStats binds the parameter entityIdList -func (o *GetTimeSeriesStatsParams) bindParamEntityIDList(formats strfmt.Registry) []string { - entityIDListIR := o.EntityIDList - - var entityIDListIC []string - for _, entityIDListIIR := range entityIDListIR { // explode []string - - entityIDListIIV := entityIDListIIR // string as string - entityIDListIC = append(entityIDListIC, entityIDListIIV) - } - - // items.CollectionFormat: "" - entityIDListIS := swag.JoinByFormat(entityIDListIC, "") - - return entityIDListIS -} diff --git a/v1/client/statistics/get_time_series_stats_responses.go b/v1/client/statistics/get_time_series_stats_responses.go deleted file mode 100644 index 820906bf..00000000 --- a/v1/client/statistics/get_time_series_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTimeSeriesStatsReader is a Reader for the GetTimeSeriesStats structure. -type GetTimeSeriesStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTimeSeriesStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTimeSeriesStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTimeSeriesStatsDefault(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 - } -} - -// NewGetTimeSeriesStatsOK creates a GetTimeSeriesStatsOK with default headers values -func NewGetTimeSeriesStatsOK() *GetTimeSeriesStatsOK { - return &GetTimeSeriesStatsOK{} -} - -/* -GetTimeSeriesStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTimeSeriesStatsOK struct { - Payload *models.MetricDataBlock -} - -// IsSuccess returns true when this get time series stats o k response has a 2xx status code -func (o *GetTimeSeriesStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get time series stats o k response has a 3xx status code -func (o *GetTimeSeriesStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get time series stats o k response has a 4xx status code -func (o *GetTimeSeriesStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get time series stats o k response has a 5xx status code -func (o *GetTimeSeriesStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get time series stats o k response a status code equal to that given -func (o *GetTimeSeriesStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get time series stats o k response -func (o *GetTimeSeriesStatsOK) Code() int { - return 200 -} - -func (o *GetTimeSeriesStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesStats][%d] getTimeSeriesStatsOK %s", 200, payload) -} - -func (o *GetTimeSeriesStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesStats][%d] getTimeSeriesStatsOK %s", 200, payload) -} - -func (o *GetTimeSeriesStatsOK) GetPayload() *models.MetricDataBlock { - return o.Payload -} - -func (o *GetTimeSeriesStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MetricDataBlock) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTimeSeriesStatsDefault creates a GetTimeSeriesStatsDefault with default headers values -func NewGetTimeSeriesStatsDefault(code int) *GetTimeSeriesStatsDefault { - return &GetTimeSeriesStatsDefault{ - _statusCode: code, - } -} - -/* -GetTimeSeriesStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTimeSeriesStatsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get time series stats default response has a 2xx status code -func (o *GetTimeSeriesStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get time series stats default response has a 3xx status code -func (o *GetTimeSeriesStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get time series stats default response has a 4xx status code -func (o *GetTimeSeriesStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get time series stats default response has a 5xx status code -func (o *GetTimeSeriesStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get time series stats default response a status code equal to that given -func (o *GetTimeSeriesStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get time series stats default response -func (o *GetTimeSeriesStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetTimeSeriesStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesStats][%d] GetTimeSeriesStats default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/statistics/timeSeriesStats][%d] GetTimeSeriesStats default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesStatsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTimeSeriesStatsDefault) 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/statistics/statistics_client.go b/v1/client/statistics/statistics_client.go deleted file mode 100644 index 61217c0e..00000000 --- a/v1/client/statistics/statistics_client.go +++ /dev/null @@ -1,467 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package statistics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new statistics API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new statistics API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new statistics API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for statistics API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetEntities(params *GetEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitiesOK, error) - - GetEntitiesSchema(params *GetEntitiesSchemaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitiesSchemaOK, error) - - GetEntitySchemaByName(params *GetEntitySchemaByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitySchemaByNameOK, error) - - GetFileDownloadsCounter(params *GetFileDownloadsCounterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileDownloadsCounterOK, error) - - GetProgressMonitorByPath(params *GetProgressMonitorByPathParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProgressMonitorByPathOK, error) - - GetProgressMonitors(params *GetProgressMonitorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProgressMonitorsOK, error) - - GetTasks(params *GetTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTasksOK, error) - - GetTimeSeriesSchema(params *GetTimeSeriesSchemaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesSchemaOK, error) - - GetTimeSeriesStats(params *GetTimeSeriesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesStatsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetEntities lists the entities for the specified schema - - An entity is an object found on the Cohesity Cluster, such as a disk or a - -Node. -In the Cohesity Dashboard, similar functionality is provided in Advanced -Diagnostics. -*/ -func (a *Client) GetEntities(params *GetEntitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEntitiesParams() - } - op := &runtime.ClientOperation{ - ID: "GetEntities", - Method: "GET", - PathPattern: "/public/statistics/entities", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetEntitiesReader{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.(*GetEntitiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetEntitiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetEntitiesSchema lists the entity schemas filtered by the specified parameters - - An entity schema specifies the meta-data associated with entity such as - -the list of attributes and a time series of data. -For example, for a Disk entity, the entity schema specifies the Node that is -using this Disk, the type of the Disk, and Metrics about the Disk such as Space -Usage, Read IOs and Write IOs. Metrics define data points (time series data) -to track over a period of time for a specific interval. -If no parameters are specified, all entity schemas found on the Cohesity -Cluster are returned. -Specifying parameters filters the results that are returned. -In the Cohesity Dashboard, similar functionality is provided in Advanced -Diagnostics. -*/ -func (a *Client) GetEntitiesSchema(params *GetEntitiesSchemaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitiesSchemaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEntitiesSchemaParams() - } - op := &runtime.ClientOperation{ - ID: "GetEntitiesSchema", - Method: "GET", - PathPattern: "/public/statistics/entitiesSchema", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetEntitiesSchemaReader{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.(*GetEntitiesSchemaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetEntitiesSchemaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetEntitySchemaByName gets the entity schema for the specified schema - - An entity schema specifies the meta-data associated with entity such as the - -list of attributes and a time series of data. -For example, for a Disk entity, the entity schema specifies the Node that is -using this Disk, the type of the Disk, and Metrics about the Disk such as -Space Usage, Read IOs and Write IOs. Metrics define data points (time series -data) to track over a period of time for a specific interval. -In the Cohesity Dashboard, similar functionality is provided in Advanced -Diagnostics. -*/ -func (a *Client) GetEntitySchemaByName(params *GetEntitySchemaByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntitySchemaByNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEntitySchemaByNameParams() - } - op := &runtime.ClientOperation{ - ID: "GetEntitySchemaByName", - Method: "GET", - PathPattern: "/public/statistics/entitiesSchema/{schemaName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetEntitySchemaByNameReader{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.(*GetEntitySchemaByNameOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetEntitySchemaByNameDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileDownloadsCounter gets the global stats counter to track the successful file downloads -*/ -func (a *Client) GetFileDownloadsCounter(params *GetFileDownloadsCounterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileDownloadsCounterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileDownloadsCounterParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileDownloadsCounter", - Method: "GET", - PathPattern: "/stats/fileDownloads", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileDownloadsCounterReader{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.(*GetFileDownloadsCounterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileDownloadsCounterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProgressMonitorByPath gets the progress and status of task from pulse for a given path -*/ -func (a *Client) GetProgressMonitorByPath(params *GetProgressMonitorByPathParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProgressMonitorByPathOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProgressMonitorByPathParams() - } - op := &runtime.ClientOperation{ - ID: "GetProgressMonitorByPath", - Method: "GET", - PathPattern: "/progressMonitors/{path}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProgressMonitorByPathReader{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.(*GetProgressMonitorByPathOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProgressMonitorByPathDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProgressMonitors gets the progress and status of tasks from pulse -*/ -func (a *Client) GetProgressMonitors(params *GetProgressMonitorsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProgressMonitorsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProgressMonitorsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProgressMonitors", - Method: "GET", - PathPattern: "/progressMonitors", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProgressMonitorsReader{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.(*GetProgressMonitorsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProgressMonitorsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTasks gets the progress and status of tasks -*/ -func (a *Client) GetTasks(params *GetTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetTasks", - Method: "GET", - PathPattern: "/public/tasks/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTasksReader{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.(*GetTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetTimeSeriesSchema Gets the Apollo schema information for an entity to list a series of data - -points. -*/ -func (a *Client) GetTimeSeriesSchema(params *GetTimeSeriesSchemaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesSchemaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTimeSeriesSchemaParams() - } - op := &runtime.ClientOperation{ - ID: "GetTimeSeriesSchema", - Method: "GET", - PathPattern: "/public/statistics/timeSeriesSchema", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTimeSeriesSchemaReader{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.(*GetTimeSeriesSchemaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTimeSeriesSchemaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetTimeSeriesStats lists a series of data points for an entity of a metric in a schema during the specified time period - - A Metric specifies a data point (such as CPU usage and IOPS) to track over a - -period of time. -For example for a disk in the Cluster, you can report on the 'Disk Health' -(kDiskAwaitTimeMsecs) Metric of the 'Disk Health Metrics' (kSentryDiskStats) -Schema for the last week. -You must specify the 'k' names as input and not the descriptive names. -You must also specify the id of the entity that you are reporting on such as -a Cluster, disk drive, job, etc. -Get the entityId by running the GET /public/statistics/entities operation. -In the Cohesity Dashboard, similar functionality is provided in Advanced -Diagnostics. -*/ -func (a *Client) GetTimeSeriesStats(params *GetTimeSeriesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTimeSeriesStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTimeSeriesStats", - Method: "GET", - PathPattern: "/public/statistics/timeSeriesStats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTimeSeriesStatsReader{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.(*GetTimeSeriesStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTimeSeriesStatsDefault) - 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/stats/get_active_alerts_stats_parameters.go b/v1/client/stats/get_active_alerts_stats_parameters.go deleted file mode 100644 index a29b8050..00000000 --- a/v1/client/stats/get_active_alerts_stats_parameters.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetActiveAlertsStatsParams creates a new GetActiveAlertsStatsParams 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 NewGetActiveAlertsStatsParams() *GetActiveAlertsStatsParams { - return &GetActiveAlertsStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveAlertsStatsParamsWithTimeout creates a new GetActiveAlertsStatsParams object -// with the ability to set a timeout on a request. -func NewGetActiveAlertsStatsParamsWithTimeout(timeout time.Duration) *GetActiveAlertsStatsParams { - return &GetActiveAlertsStatsParams{ - timeout: timeout, - } -} - -// NewGetActiveAlertsStatsParamsWithContext creates a new GetActiveAlertsStatsParams object -// with the ability to set a context for a request. -func NewGetActiveAlertsStatsParamsWithContext(ctx context.Context) *GetActiveAlertsStatsParams { - return &GetActiveAlertsStatsParams{ - Context: ctx, - } -} - -// NewGetActiveAlertsStatsParamsWithHTTPClient creates a new GetActiveAlertsStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveAlertsStatsParamsWithHTTPClient(client *http.Client) *GetActiveAlertsStatsParams { - return &GetActiveAlertsStatsParams{ - HTTPClient: client, - } -} - -/* -GetActiveAlertsStatsParams contains all the parameters to send to the API endpoint - - for the get active alerts stats operation. - - Typically these are written to a http.Request. -*/ -type GetActiveAlertsStatsParams struct { - - /* EndTimeUsecs. - - Specifies the end time Unix time epoch in microseconds to which the active alerts stats are computed. - - Format: int64 - */ - EndTimeUsecs int64 - - /* StartTimeUsecs. - - Specifies the start time Unix time epoch in microseconds from which the active alerts stats are computed. - - Format: int64 - */ - StartTimeUsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active alerts stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveAlertsStatsParams) WithDefaults() *GetActiveAlertsStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active alerts stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveAlertsStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) WithTimeout(timeout time.Duration) *GetActiveAlertsStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) WithContext(ctx context.Context) *GetActiveAlertsStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) WithHTTPClient(client *http.Client) *GetActiveAlertsStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) WithEndTimeUsecs(endTimeUsecs int64) *GetActiveAlertsStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) SetEndTimeUsecs(endTimeUsecs int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) WithStartTimeUsecs(startTimeUsecs int64) *GetActiveAlertsStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get active alerts stats params -func (o *GetActiveAlertsStatsParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveAlertsStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param endTimeUsecs - qrEndTimeUsecs := o.EndTimeUsecs - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_active_alerts_stats_responses.go b/v1/client/stats/get_active_alerts_stats_responses.go deleted file mode 100644 index b90682d9..00000000 --- a/v1/client/stats/get_active_alerts_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetActiveAlertsStatsReader is a Reader for the GetActiveAlertsStats structure. -type GetActiveAlertsStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveAlertsStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveAlertsStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveAlertsStatsDefault(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 - } -} - -// NewGetActiveAlertsStatsOK creates a GetActiveAlertsStatsOK with default headers values -func NewGetActiveAlertsStatsOK() *GetActiveAlertsStatsOK { - return &GetActiveAlertsStatsOK{} -} - -/* -GetActiveAlertsStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveAlertsStatsOK struct { - Payload *models.ActiveAlertsStats -} - -// IsSuccess returns true when this get active alerts stats o k response has a 2xx status code -func (o *GetActiveAlertsStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active alerts stats o k response has a 3xx status code -func (o *GetActiveAlertsStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active alerts stats o k response has a 4xx status code -func (o *GetActiveAlertsStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active alerts stats o k response has a 5xx status code -func (o *GetActiveAlertsStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active alerts stats o k response a status code equal to that given -func (o *GetActiveAlertsStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active alerts stats o k response -func (o *GetActiveAlertsStatsOK) Code() int { - return 200 -} - -func (o *GetActiveAlertsStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/alerts][%d] getActiveAlertsStatsOK %s", 200, payload) -} - -func (o *GetActiveAlertsStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/alerts][%d] getActiveAlertsStatsOK %s", 200, payload) -} - -func (o *GetActiveAlertsStatsOK) GetPayload() *models.ActiveAlertsStats { - return o.Payload -} - -func (o *GetActiveAlertsStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveAlertsStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveAlertsStatsDefault creates a GetActiveAlertsStatsDefault with default headers values -func NewGetActiveAlertsStatsDefault(code int) *GetActiveAlertsStatsDefault { - return &GetActiveAlertsStatsDefault{ - _statusCode: code, - } -} - -/* -GetActiveAlertsStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveAlertsStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get active alerts stats default response has a 2xx status code -func (o *GetActiveAlertsStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active alerts stats default response has a 3xx status code -func (o *GetActiveAlertsStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active alerts stats default response has a 4xx status code -func (o *GetActiveAlertsStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active alerts stats default response has a 5xx status code -func (o *GetActiveAlertsStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active alerts stats default response a status code equal to that given -func (o *GetActiveAlertsStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active alerts stats default response -func (o *GetActiveAlertsStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveAlertsStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/alerts][%d] GetActiveAlertsStats default %s", o._statusCode, payload) -} - -func (o *GetActiveAlertsStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/alerts][%d] GetActiveAlertsStats default %s", o._statusCode, payload) -} - -func (o *GetActiveAlertsStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetActiveAlertsStatsDefault) 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/v1/client/stats/get_consumer_stats_parameters.go b/v1/client/stats/get_consumer_stats_parameters.go deleted file mode 100644 index 3b63e11a..00000000 --- a/v1/client/stats/get_consumer_stats_parameters.go +++ /dev/null @@ -1,690 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetConsumerStatsParams creates a new GetConsumerStatsParams 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 NewGetConsumerStatsParams() *GetConsumerStatsParams { - return &GetConsumerStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetConsumerStatsParamsWithTimeout creates a new GetConsumerStatsParams object -// with the ability to set a timeout on a request. -func NewGetConsumerStatsParamsWithTimeout(timeout time.Duration) *GetConsumerStatsParams { - return &GetConsumerStatsParams{ - timeout: timeout, - } -} - -// NewGetConsumerStatsParamsWithContext creates a new GetConsumerStatsParams object -// with the ability to set a context for a request. -func NewGetConsumerStatsParamsWithContext(ctx context.Context) *GetConsumerStatsParams { - return &GetConsumerStatsParams{ - Context: ctx, - } -} - -// NewGetConsumerStatsParamsWithHTTPClient creates a new GetConsumerStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetConsumerStatsParamsWithHTTPClient(client *http.Client) *GetConsumerStatsParams { - return &GetConsumerStatsParams{ - HTTPClient: client, - } -} - -/* -GetConsumerStatsParams contains all the parameters to send to the API endpoint - - for the get consumer stats operation. - - Typically these are written to a http.Request. -*/ -type GetConsumerStatsParams struct { - - /* ConsumerEntityIDList. - - Specifies a list of consumer entity ids. If this field is specified, each - entity id must corresponds to the id in 'ConsumerIdList' in the same - index, and the length of 'ConsumerEntityIdList' and 'ConsumerIdList' must - be the same. - */ - ConsumerEntityIDList []string - - /* ConsumerIDList. - - Specifies a list of consumer ids. - */ - ConsumerIDList []int64 - - /* ConsumerType. - - Specifies the consumer type. - Type of the consumer can be one of the following three, - - 'kViews', indicates the stats info of Views used per organization (tenant) - per view box (storage domain). - 'kProtectionRuns', indicates the stats info of Protection Runs used per - organization (tenant) per view box (storage domain). - 'kReplicationRuns', indicates the stats info of Replication In used per - organization (tenant) per view box (storage domain). - 'kViewProtectionRuns', indicates the stats info of View Protection Runs used - per organization (tenant) per view box (storage domain). - */ - ConsumerType *string - - /* Cookie. - - Specifies the opaque string returned in the previous response. - If this is set, next set of active opens just after the previous - response are returned. If this is not set, first set of active opens - are returned. - */ - Cookie *string - - /* FetchProtectionEnvironment. - - Specifies whether to fetch protection environment for each consumer. This - field is applicable only if 'consumerType' is 'kProtectionRuns' or - 'kReplicationRuns'. - */ - FetchProtectionEnvironment *bool - - /* FetchProtectionPolicy. - - Specifies whether to fetch protection policy for each consumer. This field - is applicable only if 'consumerType' is 'kProtectionRuns' or - 'kReplicationRuns'. - */ - FetchProtectionPolicy *bool - - /* FetchTenantName. - - Specifies whether to fetch tenant (organization) name for each consumer. - */ - FetchTenantName *bool - - /* FetchViewBoxName. - - Specifies whether to fetch view box (storage domain) name for each - consumer. - */ - FetchViewBoxName *bool - - /* IncludeServiceProvider. - - Specifies whether to fetch the consumption of external service providers. - These information will be listed as a unique organization (tenant) in - response. By default it is false. - */ - IncludeServiceProvider *bool - - /* MaxCount. - - Specifies a limit on the number of stats groups returned. - - Format: int64 - */ - MaxCount *int64 - - /* MsecsBeforeCurrentTimeToCompare. - - Specifies the time in msecs before current time to compare with. - - Format: int64 - */ - MsecsBeforeCurrentTimeToCompare *int64 - - /* OrganizationsIDList. - - Specifies a list of organizations (tenant) id. - */ - OrganizationsIDList []string - - /* TenantIds. - - Specifies a list of organizations (tenant) id. This field is added to - allow tenantIds json tag. This list will be concatenated with - TenantsIdList to form full list of tenantsIdList. - */ - TenantIds []string - - /* ViewBoxesIDList. - - Specifies a list of view boxes (storage domain) id. - */ - ViewBoxesIDList []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get consumer stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetConsumerStatsParams) WithDefaults() *GetConsumerStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get consumer stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetConsumerStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get consumer stats params -func (o *GetConsumerStatsParams) WithTimeout(timeout time.Duration) *GetConsumerStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get consumer stats params -func (o *GetConsumerStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get consumer stats params -func (o *GetConsumerStatsParams) WithContext(ctx context.Context) *GetConsumerStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get consumer stats params -func (o *GetConsumerStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get consumer stats params -func (o *GetConsumerStatsParams) WithHTTPClient(client *http.Client) *GetConsumerStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get consumer stats params -func (o *GetConsumerStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConsumerEntityIDList adds the consumerEntityIDList to the get consumer stats params -func (o *GetConsumerStatsParams) WithConsumerEntityIDList(consumerEntityIDList []string) *GetConsumerStatsParams { - o.SetConsumerEntityIDList(consumerEntityIDList) - return o -} - -// SetConsumerEntityIDList adds the consumerEntityIdList to the get consumer stats params -func (o *GetConsumerStatsParams) SetConsumerEntityIDList(consumerEntityIDList []string) { - o.ConsumerEntityIDList = consumerEntityIDList -} - -// WithConsumerIDList adds the consumerIDList to the get consumer stats params -func (o *GetConsumerStatsParams) WithConsumerIDList(consumerIDList []int64) *GetConsumerStatsParams { - o.SetConsumerIDList(consumerIDList) - return o -} - -// SetConsumerIDList adds the consumerIdList to the get consumer stats params -func (o *GetConsumerStatsParams) SetConsumerIDList(consumerIDList []int64) { - o.ConsumerIDList = consumerIDList -} - -// WithConsumerType adds the consumerType to the get consumer stats params -func (o *GetConsumerStatsParams) WithConsumerType(consumerType *string) *GetConsumerStatsParams { - o.SetConsumerType(consumerType) - return o -} - -// SetConsumerType adds the consumerType to the get consumer stats params -func (o *GetConsumerStatsParams) SetConsumerType(consumerType *string) { - o.ConsumerType = consumerType -} - -// WithCookie adds the cookie to the get consumer stats params -func (o *GetConsumerStatsParams) WithCookie(cookie *string) *GetConsumerStatsParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get consumer stats params -func (o *GetConsumerStatsParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithFetchProtectionEnvironment adds the fetchProtectionEnvironment to the get consumer stats params -func (o *GetConsumerStatsParams) WithFetchProtectionEnvironment(fetchProtectionEnvironment *bool) *GetConsumerStatsParams { - o.SetFetchProtectionEnvironment(fetchProtectionEnvironment) - return o -} - -// SetFetchProtectionEnvironment adds the fetchProtectionEnvironment to the get consumer stats params -func (o *GetConsumerStatsParams) SetFetchProtectionEnvironment(fetchProtectionEnvironment *bool) { - o.FetchProtectionEnvironment = fetchProtectionEnvironment -} - -// WithFetchProtectionPolicy adds the fetchProtectionPolicy to the get consumer stats params -func (o *GetConsumerStatsParams) WithFetchProtectionPolicy(fetchProtectionPolicy *bool) *GetConsumerStatsParams { - o.SetFetchProtectionPolicy(fetchProtectionPolicy) - return o -} - -// SetFetchProtectionPolicy adds the fetchProtectionPolicy to the get consumer stats params -func (o *GetConsumerStatsParams) SetFetchProtectionPolicy(fetchProtectionPolicy *bool) { - o.FetchProtectionPolicy = fetchProtectionPolicy -} - -// WithFetchTenantName adds the fetchTenantName to the get consumer stats params -func (o *GetConsumerStatsParams) WithFetchTenantName(fetchTenantName *bool) *GetConsumerStatsParams { - o.SetFetchTenantName(fetchTenantName) - return o -} - -// SetFetchTenantName adds the fetchTenantName to the get consumer stats params -func (o *GetConsumerStatsParams) SetFetchTenantName(fetchTenantName *bool) { - o.FetchTenantName = fetchTenantName -} - -// WithFetchViewBoxName adds the fetchViewBoxName to the get consumer stats params -func (o *GetConsumerStatsParams) WithFetchViewBoxName(fetchViewBoxName *bool) *GetConsumerStatsParams { - o.SetFetchViewBoxName(fetchViewBoxName) - return o -} - -// SetFetchViewBoxName adds the fetchViewBoxName to the get consumer stats params -func (o *GetConsumerStatsParams) SetFetchViewBoxName(fetchViewBoxName *bool) { - o.FetchViewBoxName = fetchViewBoxName -} - -// WithIncludeServiceProvider adds the includeServiceProvider to the get consumer stats params -func (o *GetConsumerStatsParams) WithIncludeServiceProvider(includeServiceProvider *bool) *GetConsumerStatsParams { - o.SetIncludeServiceProvider(includeServiceProvider) - return o -} - -// SetIncludeServiceProvider adds the includeServiceProvider to the get consumer stats params -func (o *GetConsumerStatsParams) SetIncludeServiceProvider(includeServiceProvider *bool) { - o.IncludeServiceProvider = includeServiceProvider -} - -// WithMaxCount adds the maxCount to the get consumer stats params -func (o *GetConsumerStatsParams) WithMaxCount(maxCount *int64) *GetConsumerStatsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get consumer stats params -func (o *GetConsumerStatsParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WithMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get consumer stats params -func (o *GetConsumerStatsParams) WithMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) *GetConsumerStatsParams { - o.SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare) - return o -} - -// SetMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get consumer stats params -func (o *GetConsumerStatsParams) SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) { - o.MsecsBeforeCurrentTimeToCompare = msecsBeforeCurrentTimeToCompare -} - -// WithOrganizationsIDList adds the organizationsIDList to the get consumer stats params -func (o *GetConsumerStatsParams) WithOrganizationsIDList(organizationsIDList []string) *GetConsumerStatsParams { - o.SetOrganizationsIDList(organizationsIDList) - return o -} - -// SetOrganizationsIDList adds the organizationsIdList to the get consumer stats params -func (o *GetConsumerStatsParams) SetOrganizationsIDList(organizationsIDList []string) { - o.OrganizationsIDList = organizationsIDList -} - -// WithTenantIds adds the tenantIds to the get consumer stats params -func (o *GetConsumerStatsParams) WithTenantIds(tenantIds []string) *GetConsumerStatsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get consumer stats params -func (o *GetConsumerStatsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewBoxesIDList adds the viewBoxesIDList to the get consumer stats params -func (o *GetConsumerStatsParams) WithViewBoxesIDList(viewBoxesIDList []int64) *GetConsumerStatsParams { - o.SetViewBoxesIDList(viewBoxesIDList) - return o -} - -// SetViewBoxesIDList adds the viewBoxesIdList to the get consumer stats params -func (o *GetConsumerStatsParams) SetViewBoxesIDList(viewBoxesIDList []int64) { - o.ViewBoxesIDList = viewBoxesIDList -} - -// WriteToRequest writes these params to a swagger request -func (o *GetConsumerStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ConsumerEntityIDList != nil { - - // binding items for consumerEntityIdList - joinedConsumerEntityIDList := o.bindParamConsumerEntityIDList(reg) - - // query array param consumerEntityIdList - if err := r.SetQueryParam("consumerEntityIdList", joinedConsumerEntityIDList...); err != nil { - return err - } - } - - if o.ConsumerIDList != nil { - - // binding items for consumerIdList - joinedConsumerIDList := o.bindParamConsumerIDList(reg) - - // query array param consumerIdList - if err := r.SetQueryParam("consumerIdList", joinedConsumerIDList...); err != nil { - return err - } - } - - if o.ConsumerType != nil { - - // query param consumerType - var qrConsumerType string - - if o.ConsumerType != nil { - qrConsumerType = *o.ConsumerType - } - qConsumerType := qrConsumerType - if qConsumerType != "" { - - if err := r.SetQueryParam("consumerType", qConsumerType); err != nil { - return err - } - } - } - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.FetchProtectionEnvironment != nil { - - // query param fetchProtectionEnvironment - var qrFetchProtectionEnvironment bool - - if o.FetchProtectionEnvironment != nil { - qrFetchProtectionEnvironment = *o.FetchProtectionEnvironment - } - qFetchProtectionEnvironment := swag.FormatBool(qrFetchProtectionEnvironment) - if qFetchProtectionEnvironment != "" { - - if err := r.SetQueryParam("fetchProtectionEnvironment", qFetchProtectionEnvironment); err != nil { - return err - } - } - } - - if o.FetchProtectionPolicy != nil { - - // query param fetchProtectionPolicy - var qrFetchProtectionPolicy bool - - if o.FetchProtectionPolicy != nil { - qrFetchProtectionPolicy = *o.FetchProtectionPolicy - } - qFetchProtectionPolicy := swag.FormatBool(qrFetchProtectionPolicy) - if qFetchProtectionPolicy != "" { - - if err := r.SetQueryParam("fetchProtectionPolicy", qFetchProtectionPolicy); err != nil { - return err - } - } - } - - if o.FetchTenantName != nil { - - // query param fetchTenantName - var qrFetchTenantName bool - - if o.FetchTenantName != nil { - qrFetchTenantName = *o.FetchTenantName - } - qFetchTenantName := swag.FormatBool(qrFetchTenantName) - if qFetchTenantName != "" { - - if err := r.SetQueryParam("fetchTenantName", qFetchTenantName); err != nil { - return err - } - } - } - - if o.FetchViewBoxName != nil { - - // query param fetchViewBoxName - var qrFetchViewBoxName bool - - if o.FetchViewBoxName != nil { - qrFetchViewBoxName = *o.FetchViewBoxName - } - qFetchViewBoxName := swag.FormatBool(qrFetchViewBoxName) - if qFetchViewBoxName != "" { - - if err := r.SetQueryParam("fetchViewBoxName", qFetchViewBoxName); err != nil { - return err - } - } - } - - if o.IncludeServiceProvider != nil { - - // query param includeServiceProvider - var qrIncludeServiceProvider bool - - if o.IncludeServiceProvider != nil { - qrIncludeServiceProvider = *o.IncludeServiceProvider - } - qIncludeServiceProvider := swag.FormatBool(qrIncludeServiceProvider) - if qIncludeServiceProvider != "" { - - if err := r.SetQueryParam("includeServiceProvider", qIncludeServiceProvider); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.MsecsBeforeCurrentTimeToCompare != nil { - - // query param msecsBeforeCurrentTimeToCompare - var qrMsecsBeforeCurrentTimeToCompare int64 - - if o.MsecsBeforeCurrentTimeToCompare != nil { - qrMsecsBeforeCurrentTimeToCompare = *o.MsecsBeforeCurrentTimeToCompare - } - qMsecsBeforeCurrentTimeToCompare := swag.FormatInt64(qrMsecsBeforeCurrentTimeToCompare) - if qMsecsBeforeCurrentTimeToCompare != "" { - - if err := r.SetQueryParam("msecsBeforeCurrentTimeToCompare", qMsecsBeforeCurrentTimeToCompare); err != nil { - return err - } - } - } - - if o.OrganizationsIDList != nil { - - // binding items for organizationsIdList - joinedOrganizationsIDList := o.bindParamOrganizationsIDList(reg) - - // query array param organizationsIdList - if err := r.SetQueryParam("organizationsIdList", joinedOrganizationsIDList...); err != nil { - return err - } - } - - 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.ViewBoxesIDList != nil { - - // binding items for viewBoxesIdList - joinedViewBoxesIDList := o.bindParamViewBoxesIDList(reg) - - // query array param viewBoxesIdList - if err := r.SetQueryParam("viewBoxesIdList", joinedViewBoxesIDList...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetConsumerStats binds the parameter consumerEntityIdList -func (o *GetConsumerStatsParams) bindParamConsumerEntityIDList(formats strfmt.Registry) []string { - consumerEntityIDListIR := o.ConsumerEntityIDList - - var consumerEntityIDListIC []string - for _, consumerEntityIDListIIR := range consumerEntityIDListIR { // explode []string - - consumerEntityIDListIIV := consumerEntityIDListIIR // string as string - consumerEntityIDListIC = append(consumerEntityIDListIC, consumerEntityIDListIIV) - } - - // items.CollectionFormat: "" - consumerEntityIDListIS := swag.JoinByFormat(consumerEntityIDListIC, "") - - return consumerEntityIDListIS -} - -// bindParamGetConsumerStats binds the parameter consumerIdList -func (o *GetConsumerStatsParams) bindParamConsumerIDList(formats strfmt.Registry) []string { - consumerIDListIR := o.ConsumerIDList - - var consumerIDListIC []string - for _, consumerIDListIIR := range consumerIDListIR { // explode []int64 - - consumerIDListIIV := swag.FormatInt64(consumerIDListIIR) // int64 as string - consumerIDListIC = append(consumerIDListIC, consumerIDListIIV) - } - - // items.CollectionFormat: "" - consumerIDListIS := swag.JoinByFormat(consumerIDListIC, "") - - return consumerIDListIS -} - -// bindParamGetConsumerStats binds the parameter organizationsIdList -func (o *GetConsumerStatsParams) bindParamOrganizationsIDList(formats strfmt.Registry) []string { - organizationsIDListIR := o.OrganizationsIDList - - var organizationsIDListIC []string - for _, organizationsIDListIIR := range organizationsIDListIR { // explode []string - - organizationsIDListIIV := organizationsIDListIIR // string as string - organizationsIDListIC = append(organizationsIDListIC, organizationsIDListIIV) - } - - // items.CollectionFormat: "" - organizationsIDListIS := swag.JoinByFormat(organizationsIDListIC, "") - - return organizationsIDListIS -} - -// bindParamGetConsumerStats binds the parameter tenantIds -func (o *GetConsumerStatsParams) 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 -} - -// bindParamGetConsumerStats binds the parameter viewBoxesIdList -func (o *GetConsumerStatsParams) bindParamViewBoxesIDList(formats strfmt.Registry) []string { - viewBoxesIDListIR := o.ViewBoxesIDList - - var viewBoxesIDListIC []string - for _, viewBoxesIDListIIR := range viewBoxesIDListIR { // explode []int64 - - viewBoxesIDListIIV := swag.FormatInt64(viewBoxesIDListIIR) // int64 as string - viewBoxesIDListIC = append(viewBoxesIDListIC, viewBoxesIDListIIV) - } - - // items.CollectionFormat: "" - viewBoxesIDListIS := swag.JoinByFormat(viewBoxesIDListIC, "") - - return viewBoxesIDListIS -} diff --git a/v1/client/stats/get_consumer_stats_responses.go b/v1/client/stats/get_consumer_stats_responses.go deleted file mode 100644 index e7a3d7c5..00000000 --- a/v1/client/stats/get_consumer_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetConsumerStatsReader is a Reader for the GetConsumerStats structure. -type GetConsumerStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetConsumerStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetConsumerStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetConsumerStatsDefault(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 - } -} - -// NewGetConsumerStatsOK creates a GetConsumerStatsOK with default headers values -func NewGetConsumerStatsOK() *GetConsumerStatsOK { - return &GetConsumerStatsOK{} -} - -/* -GetConsumerStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetConsumerStatsOK struct { - Payload *models.GetConsumerStatsResult -} - -// IsSuccess returns true when this get consumer stats o k response has a 2xx status code -func (o *GetConsumerStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get consumer stats o k response has a 3xx status code -func (o *GetConsumerStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get consumer stats o k response has a 4xx status code -func (o *GetConsumerStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get consumer stats o k response has a 5xx status code -func (o *GetConsumerStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get consumer stats o k response a status code equal to that given -func (o *GetConsumerStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get consumer stats o k response -func (o *GetConsumerStatsOK) Code() int { - return 200 -} - -func (o *GetConsumerStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/consumers][%d] getConsumerStatsOK %s", 200, payload) -} - -func (o *GetConsumerStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/consumers][%d] getConsumerStatsOK %s", 200, payload) -} - -func (o *GetConsumerStatsOK) GetPayload() *models.GetConsumerStatsResult { - return o.Payload -} - -func (o *GetConsumerStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetConsumerStatsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetConsumerStatsDefault creates a GetConsumerStatsDefault with default headers values -func NewGetConsumerStatsDefault(code int) *GetConsumerStatsDefault { - return &GetConsumerStatsDefault{ - _statusCode: code, - } -} - -/* -GetConsumerStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetConsumerStatsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get consumer stats default response has a 2xx status code -func (o *GetConsumerStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get consumer stats default response has a 3xx status code -func (o *GetConsumerStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get consumer stats default response has a 4xx status code -func (o *GetConsumerStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get consumer stats default response has a 5xx status code -func (o *GetConsumerStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get consumer stats default response a status code equal to that given -func (o *GetConsumerStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get consumer stats default response -func (o *GetConsumerStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetConsumerStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/consumers][%d] GetConsumerStats default %s", o._statusCode, payload) -} - -func (o *GetConsumerStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/consumers][%d] GetConsumerStats default %s", o._statusCode, payload) -} - -func (o *GetConsumerStatsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetConsumerStatsDefault) 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/stats/get_file_distribution_stats_parameters.go b/v1/client/stats/get_file_distribution_stats_parameters.go deleted file mode 100644 index e0d41dc1..00000000 --- a/v1/client/stats/get_file_distribution_stats_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetFileDistributionStatsParams creates a new GetFileDistributionStatsParams 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 NewGetFileDistributionStatsParams() *GetFileDistributionStatsParams { - return &GetFileDistributionStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileDistributionStatsParamsWithTimeout creates a new GetFileDistributionStatsParams object -// with the ability to set a timeout on a request. -func NewGetFileDistributionStatsParamsWithTimeout(timeout time.Duration) *GetFileDistributionStatsParams { - return &GetFileDistributionStatsParams{ - timeout: timeout, - } -} - -// NewGetFileDistributionStatsParamsWithContext creates a new GetFileDistributionStatsParams object -// with the ability to set a context for a request. -func NewGetFileDistributionStatsParamsWithContext(ctx context.Context) *GetFileDistributionStatsParams { - return &GetFileDistributionStatsParams{ - Context: ctx, - } -} - -// NewGetFileDistributionStatsParamsWithHTTPClient creates a new GetFileDistributionStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileDistributionStatsParamsWithHTTPClient(client *http.Client) *GetFileDistributionStatsParams { - return &GetFileDistributionStatsParams{ - HTTPClient: client, - } -} - -/* -GetFileDistributionStatsParams contains all the parameters to send to the API endpoint - - for the get file distribution stats operation. - - Typically these are written to a http.Request. -*/ -type GetFileDistributionStatsParams struct { - - /* EntityType. - - Specifies the entity type on which file distribution stats are computed. - */ - EntityType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file distribution stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileDistributionStatsParams) WithDefaults() *GetFileDistributionStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file distribution stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileDistributionStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file distribution stats params -func (o *GetFileDistributionStatsParams) WithTimeout(timeout time.Duration) *GetFileDistributionStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file distribution stats params -func (o *GetFileDistributionStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file distribution stats params -func (o *GetFileDistributionStatsParams) WithContext(ctx context.Context) *GetFileDistributionStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file distribution stats params -func (o *GetFileDistributionStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file distribution stats params -func (o *GetFileDistributionStatsParams) WithHTTPClient(client *http.Client) *GetFileDistributionStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file distribution stats params -func (o *GetFileDistributionStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEntityType adds the entityType to the get file distribution stats params -func (o *GetFileDistributionStatsParams) WithEntityType(entityType string) *GetFileDistributionStatsParams { - o.SetEntityType(entityType) - return o -} - -// SetEntityType adds the entityType to the get file distribution stats params -func (o *GetFileDistributionStatsParams) SetEntityType(entityType string) { - o.EntityType = entityType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileDistributionStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param entityType - qrEntityType := o.EntityType - qEntityType := qrEntityType - if qEntityType != "" { - - if err := r.SetQueryParam("entityType", qEntityType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_file_distribution_stats_responses.go b/v1/client/stats/get_file_distribution_stats_responses.go deleted file mode 100644 index db8bd463..00000000 --- a/v1/client/stats/get_file_distribution_stats_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileDistributionStatsReader is a Reader for the GetFileDistributionStats structure. -type GetFileDistributionStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileDistributionStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileDistributionStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileDistributionStatsDefault(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 - } -} - -// NewGetFileDistributionStatsOK creates a GetFileDistributionStatsOK with default headers values -func NewGetFileDistributionStatsOK() *GetFileDistributionStatsOK { - return &GetFileDistributionStatsOK{} -} - -/* -GetFileDistributionStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileDistributionStatsOK struct { - Payload models.FileDistributionStatsList -} - -// IsSuccess returns true when this get file distribution stats o k response has a 2xx status code -func (o *GetFileDistributionStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file distribution stats o k response has a 3xx status code -func (o *GetFileDistributionStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file distribution stats o k response has a 4xx status code -func (o *GetFileDistributionStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file distribution stats o k response has a 5xx status code -func (o *GetFileDistributionStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file distribution stats o k response a status code equal to that given -func (o *GetFileDistributionStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file distribution stats o k response -func (o *GetFileDistributionStatsOK) Code() int { - return 200 -} - -func (o *GetFileDistributionStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/files][%d] getFileDistributionStatsOK %s", 200, payload) -} - -func (o *GetFileDistributionStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/files][%d] getFileDistributionStatsOK %s", 200, payload) -} - -func (o *GetFileDistributionStatsOK) GetPayload() models.FileDistributionStatsList { - return o.Payload -} - -func (o *GetFileDistributionStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileDistributionStatsDefault creates a GetFileDistributionStatsDefault with default headers values -func NewGetFileDistributionStatsDefault(code int) *GetFileDistributionStatsDefault { - return &GetFileDistributionStatsDefault{ - _statusCode: code, - } -} - -/* -GetFileDistributionStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileDistributionStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get file distribution stats default response has a 2xx status code -func (o *GetFileDistributionStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file distribution stats default response has a 3xx status code -func (o *GetFileDistributionStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file distribution stats default response has a 4xx status code -func (o *GetFileDistributionStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file distribution stats default response has a 5xx status code -func (o *GetFileDistributionStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file distribution stats default response a status code equal to that given -func (o *GetFileDistributionStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file distribution stats default response -func (o *GetFileDistributionStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetFileDistributionStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/files][%d] GetFileDistributionStats default %s", o._statusCode, payload) -} - -func (o *GetFileDistributionStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/files][%d] GetFileDistributionStats default %s", o._statusCode, payload) -} - -func (o *GetFileDistributionStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetFileDistributionStatsDefault) 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/v1/client/stats/get_last_protection_run_stats_parameters.go b/v1/client/stats/get_last_protection_run_stats_parameters.go deleted file mode 100644 index 0940984f..00000000 --- a/v1/client/stats/get_last_protection_run_stats_parameters.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetLastProtectionRunStatsParams creates a new GetLastProtectionRunStatsParams 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 NewGetLastProtectionRunStatsParams() *GetLastProtectionRunStatsParams { - return &GetLastProtectionRunStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLastProtectionRunStatsParamsWithTimeout creates a new GetLastProtectionRunStatsParams object -// with the ability to set a timeout on a request. -func NewGetLastProtectionRunStatsParamsWithTimeout(timeout time.Duration) *GetLastProtectionRunStatsParams { - return &GetLastProtectionRunStatsParams{ - timeout: timeout, - } -} - -// NewGetLastProtectionRunStatsParamsWithContext creates a new GetLastProtectionRunStatsParams object -// with the ability to set a context for a request. -func NewGetLastProtectionRunStatsParamsWithContext(ctx context.Context) *GetLastProtectionRunStatsParams { - return &GetLastProtectionRunStatsParams{ - Context: ctx, - } -} - -// NewGetLastProtectionRunStatsParamsWithHTTPClient creates a new GetLastProtectionRunStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLastProtectionRunStatsParamsWithHTTPClient(client *http.Client) *GetLastProtectionRunStatsParams { - return &GetLastProtectionRunStatsParams{ - HTTPClient: client, - } -} - -/* -GetLastProtectionRunStatsParams contains all the parameters to send to the API endpoint - - for the get last protection run stats operation. - - Typically these are written to a http.Request. -*/ -type GetLastProtectionRunStatsParams struct { - - /* FromTimeUsecs. - - Specifies the time in Unix timestamp epoch in microsecond which filters all the runs started after this value. If not specified, this will be set to 24 hours prior to toTimeUsecs parameter. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* ToTimeUsecs. - - Specifies the time in Unix timestamp epoch in microsecond which filters all the runs started before this value. If not specified, this will be set to 24 hours ahead of fromTimeUsecs parameter. - - Format: int64 - */ - ToTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get last protection run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLastProtectionRunStatsParams) WithDefaults() *GetLastProtectionRunStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get last protection run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLastProtectionRunStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) WithTimeout(timeout time.Duration) *GetLastProtectionRunStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) WithContext(ctx context.Context) *GetLastProtectionRunStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) WithHTTPClient(client *http.Client) *GetLastProtectionRunStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) WithFromTimeUsecs(fromTimeUsecs *int64) *GetLastProtectionRunStatsParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithToTimeUsecs adds the toTimeUsecs to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) WithToTimeUsecs(toTimeUsecs *int64) *GetLastProtectionRunStatsParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the get last protection run stats params -func (o *GetLastProtectionRunStatsParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLastProtectionRunStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_last_protection_run_stats_responses.go b/v1/client/stats/get_last_protection_run_stats_responses.go deleted file mode 100644 index d85019ad..00000000 --- a/v1/client/stats/get_last_protection_run_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetLastProtectionRunStatsReader is a Reader for the GetLastProtectionRunStats structure. -type GetLastProtectionRunStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLastProtectionRunStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLastProtectionRunStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLastProtectionRunStatsDefault(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 - } -} - -// NewGetLastProtectionRunStatsOK creates a GetLastProtectionRunStatsOK with default headers values -func NewGetLastProtectionRunStatsOK() *GetLastProtectionRunStatsOK { - return &GetLastProtectionRunStatsOK{} -} - -/* -GetLastProtectionRunStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetLastProtectionRunStatsOK struct { - Payload *models.LastProtectionRunStats -} - -// IsSuccess returns true when this get last protection run stats o k response has a 2xx status code -func (o *GetLastProtectionRunStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get last protection run stats o k response has a 3xx status code -func (o *GetLastProtectionRunStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get last protection run stats o k response has a 4xx status code -func (o *GetLastProtectionRunStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get last protection run stats o k response has a 5xx status code -func (o *GetLastProtectionRunStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get last protection run stats o k response a status code equal to that given -func (o *GetLastProtectionRunStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get last protection run stats o k response -func (o *GetLastProtectionRunStatsOK) Code() int { - return 200 -} - -func (o *GetLastProtectionRunStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns/lastRun][%d] getLastProtectionRunStatsOK %s", 200, payload) -} - -func (o *GetLastProtectionRunStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns/lastRun][%d] getLastProtectionRunStatsOK %s", 200, payload) -} - -func (o *GetLastProtectionRunStatsOK) GetPayload() *models.LastProtectionRunStats { - return o.Payload -} - -func (o *GetLastProtectionRunStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LastProtectionRunStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetLastProtectionRunStatsDefault creates a GetLastProtectionRunStatsDefault with default headers values -func NewGetLastProtectionRunStatsDefault(code int) *GetLastProtectionRunStatsDefault { - return &GetLastProtectionRunStatsDefault{ - _statusCode: code, - } -} - -/* -GetLastProtectionRunStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetLastProtectionRunStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get last protection run stats default response has a 2xx status code -func (o *GetLastProtectionRunStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get last protection run stats default response has a 3xx status code -func (o *GetLastProtectionRunStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get last protection run stats default response has a 4xx status code -func (o *GetLastProtectionRunStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get last protection run stats default response has a 5xx status code -func (o *GetLastProtectionRunStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get last protection run stats default response a status code equal to that given -func (o *GetLastProtectionRunStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get last protection run stats default response -func (o *GetLastProtectionRunStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetLastProtectionRunStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns/lastRun][%d] GetLastProtectionRunStats default %s", o._statusCode, payload) -} - -func (o *GetLastProtectionRunStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns/lastRun][%d] GetLastProtectionRunStats default %s", o._statusCode, payload) -} - -func (o *GetLastProtectionRunStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetLastProtectionRunStatsDefault) 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/v1/client/stats/get_protected_objects_summary_parameters.go b/v1/client/stats/get_protected_objects_summary_parameters.go deleted file mode 100644 index 6c7f3ae7..00000000 --- a/v1/client/stats/get_protected_objects_summary_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetProtectedObjectsSummaryParams creates a new GetProtectedObjectsSummaryParams 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 NewGetProtectedObjectsSummaryParams() *GetProtectedObjectsSummaryParams { - return &GetProtectedObjectsSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectedObjectsSummaryParamsWithTimeout creates a new GetProtectedObjectsSummaryParams object -// with the ability to set a timeout on a request. -func NewGetProtectedObjectsSummaryParamsWithTimeout(timeout time.Duration) *GetProtectedObjectsSummaryParams { - return &GetProtectedObjectsSummaryParams{ - timeout: timeout, - } -} - -// NewGetProtectedObjectsSummaryParamsWithContext creates a new GetProtectedObjectsSummaryParams object -// with the ability to set a context for a request. -func NewGetProtectedObjectsSummaryParamsWithContext(ctx context.Context) *GetProtectedObjectsSummaryParams { - return &GetProtectedObjectsSummaryParams{ - Context: ctx, - } -} - -// NewGetProtectedObjectsSummaryParamsWithHTTPClient creates a new GetProtectedObjectsSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectedObjectsSummaryParamsWithHTTPClient(client *http.Client) *GetProtectedObjectsSummaryParams { - return &GetProtectedObjectsSummaryParams{ - HTTPClient: client, - } -} - -/* -GetProtectedObjectsSummaryParams contains all the parameters to send to the API endpoint - - for the get protected objects summary operation. - - Typically these are written to a http.Request. -*/ -type GetProtectedObjectsSummaryParams struct { - - /* ExcludeTypes. - - Specifies the environment types to exclude. - */ - ExcludeTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protected objects summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsSummaryParams) WithDefaults() *GetProtectedObjectsSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protected objects summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) WithTimeout(timeout time.Duration) *GetProtectedObjectsSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) WithContext(ctx context.Context) *GetProtectedObjectsSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) WithHTTPClient(client *http.Client) *GetProtectedObjectsSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithExcludeTypes adds the excludeTypes to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) WithExcludeTypes(excludeTypes []string) *GetProtectedObjectsSummaryParams { - o.SetExcludeTypes(excludeTypes) - return o -} - -// SetExcludeTypes adds the excludeTypes to the get protected objects summary params -func (o *GetProtectedObjectsSummaryParams) SetExcludeTypes(excludeTypes []string) { - o.ExcludeTypes = excludeTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectedObjectsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ExcludeTypes != nil { - - // binding items for excludeTypes - joinedExcludeTypes := o.bindParamExcludeTypes(reg) - - // query array param excludeTypes - if err := r.SetQueryParam("excludeTypes", joinedExcludeTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectedObjectsSummary binds the parameter excludeTypes -func (o *GetProtectedObjectsSummaryParams) bindParamExcludeTypes(formats strfmt.Registry) []string { - excludeTypesIR := o.ExcludeTypes - - var excludeTypesIC []string - for _, excludeTypesIIR := range excludeTypesIR { // explode []string - - excludeTypesIIV := excludeTypesIIR // string as string - excludeTypesIC = append(excludeTypesIC, excludeTypesIIV) - } - - // items.CollectionFormat: "" - excludeTypesIS := swag.JoinByFormat(excludeTypesIC, "") - - return excludeTypesIS -} diff --git a/v1/client/stats/get_protected_objects_summary_responses.go b/v1/client/stats/get_protected_objects_summary_responses.go deleted file mode 100644 index 176d0fc2..00000000 --- a/v1/client/stats/get_protected_objects_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectedObjectsSummaryReader is a Reader for the GetProtectedObjectsSummary structure. -type GetProtectedObjectsSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectedObjectsSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectedObjectsSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectedObjectsSummaryDefault(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 - } -} - -// NewGetProtectedObjectsSummaryOK creates a GetProtectedObjectsSummaryOK with default headers values -func NewGetProtectedObjectsSummaryOK() *GetProtectedObjectsSummaryOK { - return &GetProtectedObjectsSummaryOK{} -} - -/* -GetProtectedObjectsSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectedObjectsSummaryOK struct { - Payload *models.ProtectedObjectsSummary -} - -// IsSuccess returns true when this get protected objects summary o k response has a 2xx status code -func (o *GetProtectedObjectsSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protected objects summary o k response has a 3xx status code -func (o *GetProtectedObjectsSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protected objects summary o k response has a 4xx status code -func (o *GetProtectedObjectsSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protected objects summary o k response has a 5xx status code -func (o *GetProtectedObjectsSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protected objects summary o k response a status code equal to that given -func (o *GetProtectedObjectsSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protected objects summary o k response -func (o *GetProtectedObjectsSummaryOK) Code() int { - return 200 -} - -func (o *GetProtectedObjectsSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionSummary][%d] getProtectedObjectsSummaryOK %s", 200, payload) -} - -func (o *GetProtectedObjectsSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionSummary][%d] getProtectedObjectsSummaryOK %s", 200, payload) -} - -func (o *GetProtectedObjectsSummaryOK) GetPayload() *models.ProtectedObjectsSummary { - return o.Payload -} - -func (o *GetProtectedObjectsSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectedObjectsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectedObjectsSummaryDefault creates a GetProtectedObjectsSummaryDefault with default headers values -func NewGetProtectedObjectsSummaryDefault(code int) *GetProtectedObjectsSummaryDefault { - return &GetProtectedObjectsSummaryDefault{ - _statusCode: code, - } -} - -/* -GetProtectedObjectsSummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectedObjectsSummaryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protected objects summary default response has a 2xx status code -func (o *GetProtectedObjectsSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protected objects summary default response has a 3xx status code -func (o *GetProtectedObjectsSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protected objects summary default response has a 4xx status code -func (o *GetProtectedObjectsSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protected objects summary default response has a 5xx status code -func (o *GetProtectedObjectsSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protected objects summary default response a status code equal to that given -func (o *GetProtectedObjectsSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protected objects summary default response -func (o *GetProtectedObjectsSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectedObjectsSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionSummary][%d] GetProtectedObjectsSummary default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionSummary][%d] GetProtectedObjectsSummary default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsSummaryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectedObjectsSummaryDefault) 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/v1/client/stats/get_protection_runs_stats_parameters.go b/v1/client/stats/get_protection_runs_stats_parameters.go deleted file mode 100644 index 007667e4..00000000 --- a/v1/client/stats/get_protection_runs_stats_parameters.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunsStatsParams creates a new GetProtectionRunsStatsParams 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 NewGetProtectionRunsStatsParams() *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunsStatsParamsWithTimeout creates a new GetProtectionRunsStatsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunsStatsParamsWithTimeout(timeout time.Duration) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunsStatsParamsWithContext creates a new GetProtectionRunsStatsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunsStatsParamsWithContext(ctx context.Context) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunsStatsParamsWithHTTPClient creates a new GetProtectionRunsStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunsStatsParamsWithHTTPClient(client *http.Client) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunsStatsParams contains all the parameters to send to the API endpoint - - for the get protection runs stats operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunsStatsParams struct { - - /* EndTimeUsecs. - - Specifies the end time in Unix timestamp epoch in microseconds where the end time of the Protection Run is lesser than the specified value. - - Format: int64 - */ - EndTimeUsecs int64 - - /* StartTimeUsecs. - - Specifies the start time in Unix timestamp epoch in microseconds where the end time of the Protection Run is greater than the specified value. - - Format: int64 - */ - StartTimeUsecs int64 - - /* Status. - - Specifies the Protection Run status for which stats has to be computed. - */ - Status string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection runs stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsStatsParams) WithDefaults() *GetProtectionRunsStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection runs stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithTimeout(timeout time.Duration) *GetProtectionRunsStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithContext(ctx context.Context) *GetProtectionRunsStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithHTTPClient(client *http.Client) *GetProtectionRunsStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithEndTimeUsecs(endTimeUsecs int64) *GetProtectionRunsStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetEndTimeUsecs(endTimeUsecs int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithStartTimeUsecs(startTimeUsecs int64) *GetProtectionRunsStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStatus adds the status to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithStatus(status string) *GetProtectionRunsStatsParams { - o.SetStatus(status) - return o -} - -// SetStatus adds the status to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetStatus(status string) { - o.Status = status -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunsStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param endTimeUsecs - qrEndTimeUsecs := o.EndTimeUsecs - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - // query param status - qrStatus := o.Status - qStatus := qrStatus - if qStatus != "" { - - if err := r.SetQueryParam("status", qStatus); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_protection_runs_stats_responses.go b/v1/client/stats/get_protection_runs_stats_responses.go deleted file mode 100644 index ef628444..00000000 --- a/v1/client/stats/get_protection_runs_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetProtectionRunsStatsReader is a Reader for the GetProtectionRunsStats structure. -type GetProtectionRunsStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunsStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunsStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunsStatsDefault(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 - } -} - -// NewGetProtectionRunsStatsOK creates a GetProtectionRunsStatsOK with default headers values -func NewGetProtectionRunsStatsOK() *GetProtectionRunsStatsOK { - return &GetProtectionRunsStatsOK{} -} - -/* -GetProtectionRunsStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunsStatsOK struct { - Payload *models.ProtectionRunsStats -} - -// IsSuccess returns true when this get protection runs stats o k response has a 2xx status code -func (o *GetProtectionRunsStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection runs stats o k response has a 3xx status code -func (o *GetProtectionRunsStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection runs stats o k response has a 4xx status code -func (o *GetProtectionRunsStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection runs stats o k response has a 5xx status code -func (o *GetProtectionRunsStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection runs stats o k response a status code equal to that given -func (o *GetProtectionRunsStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection runs stats o k response -func (o *GetProtectionRunsStatsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunsStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns][%d] getProtectionRunsStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunsStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns][%d] getProtectionRunsStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunsStatsOK) GetPayload() *models.ProtectionRunsStats { - return o.Payload -} - -func (o *GetProtectionRunsStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionRunsStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunsStatsDefault creates a GetProtectionRunsStatsDefault with default headers values -func NewGetProtectionRunsStatsDefault(code int) *GetProtectionRunsStatsDefault { - return &GetProtectionRunsStatsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunsStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunsStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection runs stats default response has a 2xx status code -func (o *GetProtectionRunsStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection runs stats default response has a 3xx status code -func (o *GetProtectionRunsStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection runs stats default response has a 4xx status code -func (o *GetProtectionRunsStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection runs stats default response has a 5xx status code -func (o *GetProtectionRunsStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection runs stats default response a status code equal to that given -func (o *GetProtectionRunsStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection runs stats default response -func (o *GetProtectionRunsStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunsStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns][%d] GetProtectionRunsStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/protectionRuns][%d] GetProtectionRunsStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionRunsStatsDefault) 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/v1/client/stats/get_restore_stats_parameters.go b/v1/client/stats/get_restore_stats_parameters.go deleted file mode 100644 index 61c4d45a..00000000 --- a/v1/client/stats/get_restore_stats_parameters.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetRestoreStatsParams creates a new GetRestoreStatsParams 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 NewGetRestoreStatsParams() *GetRestoreStatsParams { - return &GetRestoreStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRestoreStatsParamsWithTimeout creates a new GetRestoreStatsParams object -// with the ability to set a timeout on a request. -func NewGetRestoreStatsParamsWithTimeout(timeout time.Duration) *GetRestoreStatsParams { - return &GetRestoreStatsParams{ - timeout: timeout, - } -} - -// NewGetRestoreStatsParamsWithContext creates a new GetRestoreStatsParams object -// with the ability to set a context for a request. -func NewGetRestoreStatsParamsWithContext(ctx context.Context) *GetRestoreStatsParams { - return &GetRestoreStatsParams{ - Context: ctx, - } -} - -// NewGetRestoreStatsParamsWithHTTPClient creates a new GetRestoreStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRestoreStatsParamsWithHTTPClient(client *http.Client) *GetRestoreStatsParams { - return &GetRestoreStatsParams{ - HTTPClient: client, - } -} - -/* -GetRestoreStatsParams contains all the parameters to send to the API endpoint - - for the get restore stats operation. - - Typically these are written to a http.Request. -*/ -type GetRestoreStatsParams struct { - - /* EndTimeUsecs. - - Specifies the end time Unix time epoch in microseconds to which the restore stats are computed. - - Format: int64 - */ - EndTimeUsecs int64 - - /* StartTimeUsecs. - - Specifies the start time Unix time epoch in microseconds from which the restore stats are computed. - - Format: int64 - */ - StartTimeUsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get restore stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreStatsParams) WithDefaults() *GetRestoreStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get restore stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRestoreStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get restore stats params -func (o *GetRestoreStatsParams) WithTimeout(timeout time.Duration) *GetRestoreStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get restore stats params -func (o *GetRestoreStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get restore stats params -func (o *GetRestoreStatsParams) WithContext(ctx context.Context) *GetRestoreStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get restore stats params -func (o *GetRestoreStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get restore stats params -func (o *GetRestoreStatsParams) WithHTTPClient(client *http.Client) *GetRestoreStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get restore stats params -func (o *GetRestoreStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get restore stats params -func (o *GetRestoreStatsParams) WithEndTimeUsecs(endTimeUsecs int64) *GetRestoreStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get restore stats params -func (o *GetRestoreStatsParams) SetEndTimeUsecs(endTimeUsecs int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get restore stats params -func (o *GetRestoreStatsParams) WithStartTimeUsecs(startTimeUsecs int64) *GetRestoreStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get restore stats params -func (o *GetRestoreStatsParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRestoreStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param endTimeUsecs - qrEndTimeUsecs := o.EndTimeUsecs - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_restore_stats_responses.go b/v1/client/stats/get_restore_stats_responses.go deleted file mode 100644 index 12bbeb63..00000000 --- a/v1/client/stats/get_restore_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetRestoreStatsReader is a Reader for the GetRestoreStats structure. -type GetRestoreStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRestoreStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRestoreStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRestoreStatsDefault(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 - } -} - -// NewGetRestoreStatsOK creates a GetRestoreStatsOK with default headers values -func NewGetRestoreStatsOK() *GetRestoreStatsOK { - return &GetRestoreStatsOK{} -} - -/* -GetRestoreStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRestoreStatsOK struct { - Payload *models.RestoreStats -} - -// IsSuccess returns true when this get restore stats o k response has a 2xx status code -func (o *GetRestoreStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get restore stats o k response has a 3xx status code -func (o *GetRestoreStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get restore stats o k response has a 4xx status code -func (o *GetRestoreStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get restore stats o k response has a 5xx status code -func (o *GetRestoreStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get restore stats o k response a status code equal to that given -func (o *GetRestoreStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get restore stats o k response -func (o *GetRestoreStatsOK) Code() int { - return 200 -} - -func (o *GetRestoreStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/restores][%d] getRestoreStatsOK %s", 200, payload) -} - -func (o *GetRestoreStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/restores][%d] getRestoreStatsOK %s", 200, payload) -} - -func (o *GetRestoreStatsOK) GetPayload() *models.RestoreStats { - return o.Payload -} - -func (o *GetRestoreStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RestoreStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRestoreStatsDefault creates a GetRestoreStatsDefault with default headers values -func NewGetRestoreStatsDefault(code int) *GetRestoreStatsDefault { - return &GetRestoreStatsDefault{ - _statusCode: code, - } -} - -/* -GetRestoreStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRestoreStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get restore stats default response has a 2xx status code -func (o *GetRestoreStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get restore stats default response has a 3xx status code -func (o *GetRestoreStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get restore stats default response has a 4xx status code -func (o *GetRestoreStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get restore stats default response has a 5xx status code -func (o *GetRestoreStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get restore stats default response a status code equal to that given -func (o *GetRestoreStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get restore stats default response -func (o *GetRestoreStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetRestoreStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/restores][%d] GetRestoreStats default %s", o._statusCode, payload) -} - -func (o *GetRestoreStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/restores][%d] GetRestoreStats default %s", o._statusCode, payload) -} - -func (o *GetRestoreStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRestoreStatsDefault) 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/v1/client/stats/get_storage_stats_parameters.go b/v1/client/stats/get_storage_stats_parameters.go deleted file mode 100644 index c036ece1..00000000 --- a/v1/client/stats/get_storage_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetStorageStatsParams creates a new GetStorageStatsParams 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 NewGetStorageStatsParams() *GetStorageStatsParams { - return &GetStorageStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStorageStatsParamsWithTimeout creates a new GetStorageStatsParams object -// with the ability to set a timeout on a request. -func NewGetStorageStatsParamsWithTimeout(timeout time.Duration) *GetStorageStatsParams { - return &GetStorageStatsParams{ - timeout: timeout, - } -} - -// NewGetStorageStatsParamsWithContext creates a new GetStorageStatsParams object -// with the ability to set a context for a request. -func NewGetStorageStatsParamsWithContext(ctx context.Context) *GetStorageStatsParams { - return &GetStorageStatsParams{ - Context: ctx, - } -} - -// NewGetStorageStatsParamsWithHTTPClient creates a new GetStorageStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStorageStatsParamsWithHTTPClient(client *http.Client) *GetStorageStatsParams { - return &GetStorageStatsParams{ - HTTPClient: client, - } -} - -/* -GetStorageStatsParams contains all the parameters to send to the API endpoint - - for the get storage stats operation. - - Typically these are written to a http.Request. -*/ -type GetStorageStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get storage stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageStatsParams) WithDefaults() *GetStorageStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get storage stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get storage stats params -func (o *GetStorageStatsParams) WithTimeout(timeout time.Duration) *GetStorageStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get storage stats params -func (o *GetStorageStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get storage stats params -func (o *GetStorageStatsParams) WithContext(ctx context.Context) *GetStorageStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get storage stats params -func (o *GetStorageStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get storage stats params -func (o *GetStorageStatsParams) WithHTTPClient(client *http.Client) *GetStorageStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get storage stats params -func (o *GetStorageStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStorageStatsParams) 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/stats/get_storage_stats_responses.go b/v1/client/stats/get_storage_stats_responses.go deleted file mode 100644 index 7dedb609..00000000 --- a/v1/client/stats/get_storage_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetStorageStatsReader is a Reader for the GetStorageStats structure. -type GetStorageStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetStorageStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStorageStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetStorageStatsDefault(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 - } -} - -// NewGetStorageStatsOK creates a GetStorageStatsOK with default headers values -func NewGetStorageStatsOK() *GetStorageStatsOK { - return &GetStorageStatsOK{} -} - -/* -GetStorageStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStorageStatsOK struct { - Payload *models.StorageStats -} - -// IsSuccess returns true when this get storage stats o k response has a 2xx status code -func (o *GetStorageStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get storage stats o k response has a 3xx status code -func (o *GetStorageStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get storage stats o k response has a 4xx status code -func (o *GetStorageStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get storage stats o k response has a 5xx status code -func (o *GetStorageStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get storage stats o k response a status code equal to that given -func (o *GetStorageStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get storage stats o k response -func (o *GetStorageStatsOK) Code() int { - return 200 -} - -func (o *GetStorageStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/storage][%d] getStorageStatsOK %s", 200, payload) -} - -func (o *GetStorageStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/storage][%d] getStorageStatsOK %s", 200, payload) -} - -func (o *GetStorageStatsOK) GetPayload() *models.StorageStats { - return o.Payload -} - -func (o *GetStorageStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StorageStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetStorageStatsDefault creates a GetStorageStatsDefault with default headers values -func NewGetStorageStatsDefault(code int) *GetStorageStatsDefault { - return &GetStorageStatsDefault{ - _statusCode: code, - } -} - -/* -GetStorageStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetStorageStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get storage stats default response has a 2xx status code -func (o *GetStorageStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get storage stats default response has a 3xx status code -func (o *GetStorageStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get storage stats default response has a 4xx status code -func (o *GetStorageStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get storage stats default response has a 5xx status code -func (o *GetStorageStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get storage stats default response a status code equal to that given -func (o *GetStorageStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get storage stats default response -func (o *GetStorageStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetStorageStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/storage][%d] GetStorageStats default %s", o._statusCode, payload) -} - -func (o *GetStorageStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/storage][%d] GetStorageStats default %s", o._statusCode, payload) -} - -func (o *GetStorageStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetStorageStatsDefault) 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/v1/client/stats/get_tenant_stats_parameters.go b/v1/client/stats/get_tenant_stats_parameters.go deleted file mode 100644 index 2f9b7dda..00000000 --- a/v1/client/stats/get_tenant_stats_parameters.go +++ /dev/null @@ -1,528 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetTenantStatsParams creates a new GetTenantStatsParams 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 NewGetTenantStatsParams() *GetTenantStatsParams { - return &GetTenantStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantStatsParamsWithTimeout creates a new GetTenantStatsParams object -// with the ability to set a timeout on a request. -func NewGetTenantStatsParamsWithTimeout(timeout time.Duration) *GetTenantStatsParams { - return &GetTenantStatsParams{ - timeout: timeout, - } -} - -// NewGetTenantStatsParamsWithContext creates a new GetTenantStatsParams object -// with the ability to set a context for a request. -func NewGetTenantStatsParamsWithContext(ctx context.Context) *GetTenantStatsParams { - return &GetTenantStatsParams{ - Context: ctx, - } -} - -// NewGetTenantStatsParamsWithHTTPClient creates a new GetTenantStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantStatsParamsWithHTTPClient(client *http.Client) *GetTenantStatsParams { - return &GetTenantStatsParams{ - HTTPClient: client, - } -} - -/* -GetTenantStatsParams contains all the parameters to send to the API endpoint - - for the get tenant stats operation. - - Typically these are written to a http.Request. -*/ -type GetTenantStatsParams struct { - - /* ConsumerType. - - Specifies the consumer type. - Type of the consumer can be one of the following three, - - 'kViews', indicates the stats info of Views used per organization (tenant) - per view box (storage domain). - 'kProtectionRuns', indicates the stats info of Protection Runs used per - organization (tenant) per view box (storage domain). - 'kReplicationRuns', indicates the stats info of Replication In used per - organization (tenant) per view box (storage domain). - 'kViewProtectionRuns', indicates the stats info of View Protection Runs used - per organization (tenant) per view box (storage domain). - */ - ConsumerType *string - - /* Cookie. - - Specifies the opaque string returned in the previous response. - If this is set, next set of active opens just after the previous - response are returned. If this is not set, first set of active opens - are returned. - */ - Cookie *string - - /* IncludeServiceProvider. - - Specifies whether to fetch the consumption of external service providers. - These information will be listed as a unique organization (tenant) in - response. By default it is false. - */ - IncludeServiceProvider *bool - - /* MaxCount. - - Specifies a limit on the number of stats groups returned. - - Format: int64 - */ - MaxCount *int64 - - /* MsecsBeforeCurrentTimeToCompare. - - Specifies the time in msecs before current time to compare with. - - Format: int64 - */ - MsecsBeforeCurrentTimeToCompare *int64 - - /* OrganizationsIDList. - - Specifies a list of organizations (tenant) id. - */ - OrganizationsIDList []string - - /* OutputFormat. - - Specifies what format to return the data in. Defaults to proto, but can - select other options like csv. - */ - OutputFormat *string - - /* SkipGroupByTenant. - - Specifies if we should skip grouping by tenant. If false, and tenant has - multiple storage domains, then the stats for the storage domains will be - aggregated. If true, then the response will return each storage domain - cross tenant independently. - */ - SkipGroupByTenant *bool - - /* TenantIds. - - Specifies a list of organizations (tenant) id. This field is added to - allow tenantIds json tag. This list will be concatenated with - TenantsIdList to form full list of tenantsIdList. - */ - TenantIds []string - - /* ViewBoxesIDList. - - Specifies a list of view boxes (storage domain) id. - */ - ViewBoxesIDList []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenant stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantStatsParams) WithDefaults() *GetTenantStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenant stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenant stats params -func (o *GetTenantStatsParams) WithTimeout(timeout time.Duration) *GetTenantStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenant stats params -func (o *GetTenantStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenant stats params -func (o *GetTenantStatsParams) WithContext(ctx context.Context) *GetTenantStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenant stats params -func (o *GetTenantStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenant stats params -func (o *GetTenantStatsParams) WithHTTPClient(client *http.Client) *GetTenantStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenant stats params -func (o *GetTenantStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConsumerType adds the consumerType to the get tenant stats params -func (o *GetTenantStatsParams) WithConsumerType(consumerType *string) *GetTenantStatsParams { - o.SetConsumerType(consumerType) - return o -} - -// SetConsumerType adds the consumerType to the get tenant stats params -func (o *GetTenantStatsParams) SetConsumerType(consumerType *string) { - o.ConsumerType = consumerType -} - -// WithCookie adds the cookie to the get tenant stats params -func (o *GetTenantStatsParams) WithCookie(cookie *string) *GetTenantStatsParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get tenant stats params -func (o *GetTenantStatsParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithIncludeServiceProvider adds the includeServiceProvider to the get tenant stats params -func (o *GetTenantStatsParams) WithIncludeServiceProvider(includeServiceProvider *bool) *GetTenantStatsParams { - o.SetIncludeServiceProvider(includeServiceProvider) - return o -} - -// SetIncludeServiceProvider adds the includeServiceProvider to the get tenant stats params -func (o *GetTenantStatsParams) SetIncludeServiceProvider(includeServiceProvider *bool) { - o.IncludeServiceProvider = includeServiceProvider -} - -// WithMaxCount adds the maxCount to the get tenant stats params -func (o *GetTenantStatsParams) WithMaxCount(maxCount *int64) *GetTenantStatsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get tenant stats params -func (o *GetTenantStatsParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WithMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get tenant stats params -func (o *GetTenantStatsParams) WithMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) *GetTenantStatsParams { - o.SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare) - return o -} - -// SetMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get tenant stats params -func (o *GetTenantStatsParams) SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) { - o.MsecsBeforeCurrentTimeToCompare = msecsBeforeCurrentTimeToCompare -} - -// WithOrganizationsIDList adds the organizationsIDList to the get tenant stats params -func (o *GetTenantStatsParams) WithOrganizationsIDList(organizationsIDList []string) *GetTenantStatsParams { - o.SetOrganizationsIDList(organizationsIDList) - return o -} - -// SetOrganizationsIDList adds the organizationsIdList to the get tenant stats params -func (o *GetTenantStatsParams) SetOrganizationsIDList(organizationsIDList []string) { - o.OrganizationsIDList = organizationsIDList -} - -// WithOutputFormat adds the outputFormat to the get tenant stats params -func (o *GetTenantStatsParams) WithOutputFormat(outputFormat *string) *GetTenantStatsParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get tenant stats params -func (o *GetTenantStatsParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithSkipGroupByTenant adds the skipGroupByTenant to the get tenant stats params -func (o *GetTenantStatsParams) WithSkipGroupByTenant(skipGroupByTenant *bool) *GetTenantStatsParams { - o.SetSkipGroupByTenant(skipGroupByTenant) - return o -} - -// SetSkipGroupByTenant adds the skipGroupByTenant to the get tenant stats params -func (o *GetTenantStatsParams) SetSkipGroupByTenant(skipGroupByTenant *bool) { - o.SkipGroupByTenant = skipGroupByTenant -} - -// WithTenantIds adds the tenantIds to the get tenant stats params -func (o *GetTenantStatsParams) WithTenantIds(tenantIds []string) *GetTenantStatsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get tenant stats params -func (o *GetTenantStatsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewBoxesIDList adds the viewBoxesIDList to the get tenant stats params -func (o *GetTenantStatsParams) WithViewBoxesIDList(viewBoxesIDList []int64) *GetTenantStatsParams { - o.SetViewBoxesIDList(viewBoxesIDList) - return o -} - -// SetViewBoxesIDList adds the viewBoxesIdList to the get tenant stats params -func (o *GetTenantStatsParams) SetViewBoxesIDList(viewBoxesIDList []int64) { - o.ViewBoxesIDList = viewBoxesIDList -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ConsumerType != nil { - - // query param consumerType - var qrConsumerType string - - if o.ConsumerType != nil { - qrConsumerType = *o.ConsumerType - } - qConsumerType := qrConsumerType - if qConsumerType != "" { - - if err := r.SetQueryParam("consumerType", qConsumerType); err != nil { - return err - } - } - } - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.IncludeServiceProvider != nil { - - // query param includeServiceProvider - var qrIncludeServiceProvider bool - - if o.IncludeServiceProvider != nil { - qrIncludeServiceProvider = *o.IncludeServiceProvider - } - qIncludeServiceProvider := swag.FormatBool(qrIncludeServiceProvider) - if qIncludeServiceProvider != "" { - - if err := r.SetQueryParam("includeServiceProvider", qIncludeServiceProvider); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.MsecsBeforeCurrentTimeToCompare != nil { - - // query param msecsBeforeCurrentTimeToCompare - var qrMsecsBeforeCurrentTimeToCompare int64 - - if o.MsecsBeforeCurrentTimeToCompare != nil { - qrMsecsBeforeCurrentTimeToCompare = *o.MsecsBeforeCurrentTimeToCompare - } - qMsecsBeforeCurrentTimeToCompare := swag.FormatInt64(qrMsecsBeforeCurrentTimeToCompare) - if qMsecsBeforeCurrentTimeToCompare != "" { - - if err := r.SetQueryParam("msecsBeforeCurrentTimeToCompare", qMsecsBeforeCurrentTimeToCompare); err != nil { - return err - } - } - } - - if o.OrganizationsIDList != nil { - - // binding items for organizationsIdList - joinedOrganizationsIDList := o.bindParamOrganizationsIDList(reg) - - // query array param organizationsIdList - if err := r.SetQueryParam("organizationsIdList", joinedOrganizationsIDList...); err != nil { - return err - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.SkipGroupByTenant != nil { - - // query param skipGroupByTenant - var qrSkipGroupByTenant bool - - if o.SkipGroupByTenant != nil { - qrSkipGroupByTenant = *o.SkipGroupByTenant - } - qSkipGroupByTenant := swag.FormatBool(qrSkipGroupByTenant) - if qSkipGroupByTenant != "" { - - if err := r.SetQueryParam("skipGroupByTenant", qSkipGroupByTenant); err != nil { - return err - } - } - } - - 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.ViewBoxesIDList != nil { - - // binding items for viewBoxesIdList - joinedViewBoxesIDList := o.bindParamViewBoxesIDList(reg) - - // query array param viewBoxesIdList - if err := r.SetQueryParam("viewBoxesIdList", joinedViewBoxesIDList...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTenantStats binds the parameter organizationsIdList -func (o *GetTenantStatsParams) bindParamOrganizationsIDList(formats strfmt.Registry) []string { - organizationsIDListIR := o.OrganizationsIDList - - var organizationsIDListIC []string - for _, organizationsIDListIIR := range organizationsIDListIR { // explode []string - - organizationsIDListIIV := organizationsIDListIIR // string as string - organizationsIDListIC = append(organizationsIDListIC, organizationsIDListIIV) - } - - // items.CollectionFormat: "" - organizationsIDListIS := swag.JoinByFormat(organizationsIDListIC, "") - - return organizationsIDListIS -} - -// bindParamGetTenantStats binds the parameter tenantIds -func (o *GetTenantStatsParams) 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 -} - -// bindParamGetTenantStats binds the parameter viewBoxesIdList -func (o *GetTenantStatsParams) bindParamViewBoxesIDList(formats strfmt.Registry) []string { - viewBoxesIDListIR := o.ViewBoxesIDList - - var viewBoxesIDListIC []string - for _, viewBoxesIDListIIR := range viewBoxesIDListIR { // explode []int64 - - viewBoxesIDListIIV := swag.FormatInt64(viewBoxesIDListIIR) // int64 as string - viewBoxesIDListIC = append(viewBoxesIDListIC, viewBoxesIDListIIV) - } - - // items.CollectionFormat: "" - viewBoxesIDListIS := swag.JoinByFormat(viewBoxesIDListIC, "") - - return viewBoxesIDListIS -} diff --git a/v1/client/stats/get_tenant_stats_responses.go b/v1/client/stats/get_tenant_stats_responses.go deleted file mode 100644 index 326996d9..00000000 --- a/v1/client/stats/get_tenant_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTenantStatsReader is a Reader for the GetTenantStats structure. -type GetTenantStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantStatsDefault(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 - } -} - -// NewGetTenantStatsOK creates a GetTenantStatsOK with default headers values -func NewGetTenantStatsOK() *GetTenantStatsOK { - return &GetTenantStatsOK{} -} - -/* -GetTenantStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTenantStatsOK struct { - Payload *models.GetTenantStatsResult -} - -// IsSuccess returns true when this get tenant stats o k response has a 2xx status code -func (o *GetTenantStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenant stats o k response has a 3xx status code -func (o *GetTenantStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenant stats o k response has a 4xx status code -func (o *GetTenantStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenant stats o k response has a 5xx status code -func (o *GetTenantStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenant stats o k response a status code equal to that given -func (o *GetTenantStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenant stats o k response -func (o *GetTenantStatsOK) Code() int { - return 200 -} - -func (o *GetTenantStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/tenants][%d] getTenantStatsOK %s", 200, payload) -} - -func (o *GetTenantStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/tenants][%d] getTenantStatsOK %s", 200, payload) -} - -func (o *GetTenantStatsOK) GetPayload() *models.GetTenantStatsResult { - return o.Payload -} - -func (o *GetTenantStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetTenantStatsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantStatsDefault creates a GetTenantStatsDefault with default headers values -func NewGetTenantStatsDefault(code int) *GetTenantStatsDefault { - return &GetTenantStatsDefault{ - _statusCode: code, - } -} - -/* -GetTenantStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantStatsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get tenant stats default response has a 2xx status code -func (o *GetTenantStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenant stats default response has a 3xx status code -func (o *GetTenantStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenant stats default response has a 4xx status code -func (o *GetTenantStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenant stats default response has a 5xx status code -func (o *GetTenantStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenant stats default response a status code equal to that given -func (o *GetTenantStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenant stats default response -func (o *GetTenantStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/tenants][%d] GetTenantStats default %s", o._statusCode, payload) -} - -func (o *GetTenantStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/tenants][%d] GetTenantStats default %s", o._statusCode, payload) -} - -func (o *GetTenantStatsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTenantStatsDefault) 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/stats/get_vault_provider_stats_parameters.go b/v1/client/stats/get_vault_provider_stats_parameters.go deleted file mode 100644 index 465aa2be..00000000 --- a/v1/client/stats/get_vault_provider_stats_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetVaultProviderStatsParams creates a new GetVaultProviderStatsParams 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 NewGetVaultProviderStatsParams() *GetVaultProviderStatsParams { - return &GetVaultProviderStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultProviderStatsParamsWithTimeout creates a new GetVaultProviderStatsParams object -// with the ability to set a timeout on a request. -func NewGetVaultProviderStatsParamsWithTimeout(timeout time.Duration) *GetVaultProviderStatsParams { - return &GetVaultProviderStatsParams{ - timeout: timeout, - } -} - -// NewGetVaultProviderStatsParamsWithContext creates a new GetVaultProviderStatsParams object -// with the ability to set a context for a request. -func NewGetVaultProviderStatsParamsWithContext(ctx context.Context) *GetVaultProviderStatsParams { - return &GetVaultProviderStatsParams{ - Context: ctx, - } -} - -// NewGetVaultProviderStatsParamsWithHTTPClient creates a new GetVaultProviderStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultProviderStatsParamsWithHTTPClient(client *http.Client) *GetVaultProviderStatsParams { - return &GetVaultProviderStatsParams{ - HTTPClient: client, - } -} - -/* -GetVaultProviderStatsParams contains all the parameters to send to the API endpoint - - for the get vault provider stats operation. - - Typically these are written to a http.Request. -*/ -type GetVaultProviderStatsParams struct { - - /* RunType. - - Specifies the type of the runs. - */ - RunType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vault provider stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultProviderStatsParams) WithDefaults() *GetVaultProviderStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vault provider stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultProviderStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vault provider stats params -func (o *GetVaultProviderStatsParams) WithTimeout(timeout time.Duration) *GetVaultProviderStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vault provider stats params -func (o *GetVaultProviderStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vault provider stats params -func (o *GetVaultProviderStatsParams) WithContext(ctx context.Context) *GetVaultProviderStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vault provider stats params -func (o *GetVaultProviderStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vault provider stats params -func (o *GetVaultProviderStatsParams) WithHTTPClient(client *http.Client) *GetVaultProviderStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vault provider stats params -func (o *GetVaultProviderStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRunType adds the runType to the get vault provider stats params -func (o *GetVaultProviderStatsParams) WithRunType(runType string) *GetVaultProviderStatsParams { - o.SetRunType(runType) - return o -} - -// SetRunType adds the runType to the get vault provider stats params -func (o *GetVaultProviderStatsParams) SetRunType(runType string) { - o.RunType = runType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultProviderStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param runType - qrRunType := o.RunType - qRunType := qrRunType - if qRunType != "" { - - if err := r.SetQueryParam("runType", qRunType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_vault_provider_stats_responses.go b/v1/client/stats/get_vault_provider_stats_responses.go deleted file mode 100644 index 23b3381e..00000000 --- a/v1/client/stats/get_vault_provider_stats_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultProviderStatsReader is a Reader for the GetVaultProviderStats structure. -type GetVaultProviderStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultProviderStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultProviderStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultProviderStatsDefault(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 - } -} - -// NewGetVaultProviderStatsOK creates a GetVaultProviderStatsOK with default headers values -func NewGetVaultProviderStatsOK() *GetVaultProviderStatsOK { - return &GetVaultProviderStatsOK{} -} - -/* -GetVaultProviderStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultProviderStatsOK struct { - Payload models.VaultProviderStatsList -} - -// IsSuccess returns true when this get vault provider stats o k response has a 2xx status code -func (o *GetVaultProviderStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vault provider stats o k response has a 3xx status code -func (o *GetVaultProviderStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vault provider stats o k response has a 4xx status code -func (o *GetVaultProviderStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vault provider stats o k response has a 5xx status code -func (o *GetVaultProviderStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vault provider stats o k response a status code equal to that given -func (o *GetVaultProviderStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vault provider stats o k response -func (o *GetVaultProviderStatsOK) Code() int { - return 200 -} - -func (o *GetVaultProviderStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/providers][%d] getVaultProviderStatsOK %s", 200, payload) -} - -func (o *GetVaultProviderStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/providers][%d] getVaultProviderStatsOK %s", 200, payload) -} - -func (o *GetVaultProviderStatsOK) GetPayload() models.VaultProviderStatsList { - return o.Payload -} - -func (o *GetVaultProviderStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultProviderStatsDefault creates a GetVaultProviderStatsDefault with default headers values -func NewGetVaultProviderStatsDefault(code int) *GetVaultProviderStatsDefault { - return &GetVaultProviderStatsDefault{ - _statusCode: code, - } -} - -/* -GetVaultProviderStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultProviderStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get vault provider stats default response has a 2xx status code -func (o *GetVaultProviderStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vault provider stats default response has a 3xx status code -func (o *GetVaultProviderStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vault provider stats default response has a 4xx status code -func (o *GetVaultProviderStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vault provider stats default response has a 5xx status code -func (o *GetVaultProviderStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vault provider stats default response a status code equal to that given -func (o *GetVaultProviderStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vault provider stats default response -func (o *GetVaultProviderStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultProviderStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/providers][%d] GetVaultProviderStats default %s", o._statusCode, payload) -} - -func (o *GetVaultProviderStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/providers][%d] GetVaultProviderStats default %s", o._statusCode, payload) -} - -func (o *GetVaultProviderStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetVaultProviderStatsDefault) 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/v1/client/stats/get_vault_run_stats_parameters.go b/v1/client/stats/get_vault_run_stats_parameters.go deleted file mode 100644 index 22e54bea..00000000 --- a/v1/client/stats/get_vault_run_stats_parameters.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetVaultRunStatsParams creates a new GetVaultRunStatsParams 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 NewGetVaultRunStatsParams() *GetVaultRunStatsParams { - return &GetVaultRunStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultRunStatsParamsWithTimeout creates a new GetVaultRunStatsParams object -// with the ability to set a timeout on a request. -func NewGetVaultRunStatsParamsWithTimeout(timeout time.Duration) *GetVaultRunStatsParams { - return &GetVaultRunStatsParams{ - timeout: timeout, - } -} - -// NewGetVaultRunStatsParamsWithContext creates a new GetVaultRunStatsParams object -// with the ability to set a context for a request. -func NewGetVaultRunStatsParamsWithContext(ctx context.Context) *GetVaultRunStatsParams { - return &GetVaultRunStatsParams{ - Context: ctx, - } -} - -// NewGetVaultRunStatsParamsWithHTTPClient creates a new GetVaultRunStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultRunStatsParamsWithHTTPClient(client *http.Client) *GetVaultRunStatsParams { - return &GetVaultRunStatsParams{ - HTTPClient: client, - } -} - -/* -GetVaultRunStatsParams contains all the parameters to send to the API endpoint - - for the get vault run stats operation. - - Typically these are written to a http.Request. -*/ -type GetVaultRunStatsParams struct { - - /* EndTimeUsecs. - - Specifies the end time Unix time epoch in microseconds to which the vault run stats are computed. - - Format: int64 - */ - EndTimeUsecs int64 - - /* Interval. - - Specifies the interval by which runs will be grouped together in the returned trend line. - */ - Interval string - - /* RunType. - - Specifies the type of the run. - */ - RunType string - - /* StartTimeUsecs. - - Specifies the start time Unix time epoch in microseconds from which the vault run stats are computed. - - Format: int64 - */ - StartTimeUsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vault run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultRunStatsParams) WithDefaults() *GetVaultRunStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vault run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultRunStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vault run stats params -func (o *GetVaultRunStatsParams) WithTimeout(timeout time.Duration) *GetVaultRunStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vault run stats params -func (o *GetVaultRunStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vault run stats params -func (o *GetVaultRunStatsParams) WithContext(ctx context.Context) *GetVaultRunStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vault run stats params -func (o *GetVaultRunStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vault run stats params -func (o *GetVaultRunStatsParams) WithHTTPClient(client *http.Client) *GetVaultRunStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vault run stats params -func (o *GetVaultRunStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get vault run stats params -func (o *GetVaultRunStatsParams) WithEndTimeUsecs(endTimeUsecs int64) *GetVaultRunStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get vault run stats params -func (o *GetVaultRunStatsParams) SetEndTimeUsecs(endTimeUsecs int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithInterval adds the interval to the get vault run stats params -func (o *GetVaultRunStatsParams) WithInterval(interval string) *GetVaultRunStatsParams { - o.SetInterval(interval) - return o -} - -// SetInterval adds the interval to the get vault run stats params -func (o *GetVaultRunStatsParams) SetInterval(interval string) { - o.Interval = interval -} - -// WithRunType adds the runType to the get vault run stats params -func (o *GetVaultRunStatsParams) WithRunType(runType string) *GetVaultRunStatsParams { - o.SetRunType(runType) - return o -} - -// SetRunType adds the runType to the get vault run stats params -func (o *GetVaultRunStatsParams) SetRunType(runType string) { - o.RunType = runType -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get vault run stats params -func (o *GetVaultRunStatsParams) WithStartTimeUsecs(startTimeUsecs int64) *GetVaultRunStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get vault run stats params -func (o *GetVaultRunStatsParams) SetStartTimeUsecs(startTimeUsecs int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultRunStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param endTimeUsecs - qrEndTimeUsecs := o.EndTimeUsecs - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - - // query param interval - qrInterval := o.Interval - qInterval := qrInterval - if qInterval != "" { - - if err := r.SetQueryParam("interval", qInterval); err != nil { - return err - } - } - - // query param runType - qrRunType := o.RunType - qRunType := qrRunType - if qRunType != "" { - - if err := r.SetQueryParam("runType", qRunType); err != nil { - return err - } - } - - // query param startTimeUsecs - qrStartTimeUsecs := o.StartTimeUsecs - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_vault_run_stats_responses.go b/v1/client/stats/get_vault_run_stats_responses.go deleted file mode 100644 index 7a9cdd07..00000000 --- a/v1/client/stats/get_vault_run_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultRunStatsReader is a Reader for the GetVaultRunStats structure. -type GetVaultRunStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultRunStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultRunStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultRunStatsDefault(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 - } -} - -// NewGetVaultRunStatsOK creates a GetVaultRunStatsOK with default headers values -func NewGetVaultRunStatsOK() *GetVaultRunStatsOK { - return &GetVaultRunStatsOK{} -} - -/* -GetVaultRunStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultRunStatsOK struct { - Payload *models.VaultRunStatsSummary -} - -// IsSuccess returns true when this get vault run stats o k response has a 2xx status code -func (o *GetVaultRunStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vault run stats o k response has a 3xx status code -func (o *GetVaultRunStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vault run stats o k response has a 4xx status code -func (o *GetVaultRunStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vault run stats o k response has a 5xx status code -func (o *GetVaultRunStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vault run stats o k response a status code equal to that given -func (o *GetVaultRunStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vault run stats o k response -func (o *GetVaultRunStatsOK) Code() int { - return 200 -} - -func (o *GetVaultRunStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/runs][%d] getVaultRunStatsOK %s", 200, payload) -} - -func (o *GetVaultRunStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/runs][%d] getVaultRunStatsOK %s", 200, payload) -} - -func (o *GetVaultRunStatsOK) GetPayload() *models.VaultRunStatsSummary { - return o.Payload -} - -func (o *GetVaultRunStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VaultRunStatsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultRunStatsDefault creates a GetVaultRunStatsDefault with default headers values -func NewGetVaultRunStatsDefault(code int) *GetVaultRunStatsDefault { - return &GetVaultRunStatsDefault{ - _statusCode: code, - } -} - -/* -GetVaultRunStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultRunStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get vault run stats default response has a 2xx status code -func (o *GetVaultRunStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vault run stats default response has a 3xx status code -func (o *GetVaultRunStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vault run stats default response has a 4xx status code -func (o *GetVaultRunStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vault run stats default response has a 5xx status code -func (o *GetVaultRunStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vault run stats default response a status code equal to that given -func (o *GetVaultRunStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vault run stats default response -func (o *GetVaultRunStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultRunStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/runs][%d] GetVaultRunStats default %s", o._statusCode, payload) -} - -func (o *GetVaultRunStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults/runs][%d] GetVaultRunStats default %s", o._statusCode, payload) -} - -func (o *GetVaultRunStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetVaultRunStatsDefault) 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/v1/client/stats/get_vault_stats_parameters.go b/v1/client/stats/get_vault_stats_parameters.go deleted file mode 100644 index b5bad690..00000000 --- a/v1/client/stats/get_vault_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetVaultStatsParams creates a new GetVaultStatsParams 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 NewGetVaultStatsParams() *GetVaultStatsParams { - return &GetVaultStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultStatsParamsWithTimeout creates a new GetVaultStatsParams object -// with the ability to set a timeout on a request. -func NewGetVaultStatsParamsWithTimeout(timeout time.Duration) *GetVaultStatsParams { - return &GetVaultStatsParams{ - timeout: timeout, - } -} - -// NewGetVaultStatsParamsWithContext creates a new GetVaultStatsParams object -// with the ability to set a context for a request. -func NewGetVaultStatsParamsWithContext(ctx context.Context) *GetVaultStatsParams { - return &GetVaultStatsParams{ - Context: ctx, - } -} - -// NewGetVaultStatsParamsWithHTTPClient creates a new GetVaultStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultStatsParamsWithHTTPClient(client *http.Client) *GetVaultStatsParams { - return &GetVaultStatsParams{ - HTTPClient: client, - } -} - -/* -GetVaultStatsParams contains all the parameters to send to the API endpoint - - for the get vault stats operation. - - Typically these are written to a http.Request. -*/ -type GetVaultStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vault stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultStatsParams) WithDefaults() *GetVaultStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vault stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vault stats params -func (o *GetVaultStatsParams) WithTimeout(timeout time.Duration) *GetVaultStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vault stats params -func (o *GetVaultStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vault stats params -func (o *GetVaultStatsParams) WithContext(ctx context.Context) *GetVaultStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vault stats params -func (o *GetVaultStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vault stats params -func (o *GetVaultStatsParams) WithHTTPClient(client *http.Client) *GetVaultStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vault stats params -func (o *GetVaultStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultStatsParams) 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/stats/get_vault_stats_responses.go b/v1/client/stats/get_vault_stats_responses.go deleted file mode 100644 index b034b271..00000000 --- a/v1/client/stats/get_vault_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultStatsReader is a Reader for the GetVaultStats structure. -type GetVaultStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultStatsDefault(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 - } -} - -// NewGetVaultStatsOK creates a GetVaultStatsOK with default headers values -func NewGetVaultStatsOK() *GetVaultStatsOK { - return &GetVaultStatsOK{} -} - -/* -GetVaultStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultStatsOK struct { - Payload *models.VaultStats -} - -// IsSuccess returns true when this get vault stats o k response has a 2xx status code -func (o *GetVaultStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vault stats o k response has a 3xx status code -func (o *GetVaultStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vault stats o k response has a 4xx status code -func (o *GetVaultStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vault stats o k response has a 5xx status code -func (o *GetVaultStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vault stats o k response a status code equal to that given -func (o *GetVaultStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vault stats o k response -func (o *GetVaultStatsOK) Code() int { - return 200 -} - -func (o *GetVaultStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults][%d] getVaultStatsOK %s", 200, payload) -} - -func (o *GetVaultStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults][%d] getVaultStatsOK %s", 200, payload) -} - -func (o *GetVaultStatsOK) GetPayload() *models.VaultStats { - return o.Payload -} - -func (o *GetVaultStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VaultStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultStatsDefault creates a GetVaultStatsDefault with default headers values -func NewGetVaultStatsDefault(code int) *GetVaultStatsDefault { - return &GetVaultStatsDefault{ - _statusCode: code, - } -} - -/* -GetVaultStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get vault stats default response has a 2xx status code -func (o *GetVaultStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vault stats default response has a 3xx status code -func (o *GetVaultStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vault stats default response has a 4xx status code -func (o *GetVaultStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vault stats default response has a 5xx status code -func (o *GetVaultStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vault stats default response a status code equal to that given -func (o *GetVaultStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vault stats default response -func (o *GetVaultStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults][%d] GetVaultStats default %s", o._statusCode, payload) -} - -func (o *GetVaultStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/vaults][%d] GetVaultStats default %s", o._statusCode, payload) -} - -func (o *GetVaultStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetVaultStatsDefault) 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/v1/client/stats/get_view_box_stats_parameters.go b/v1/client/stats/get_view_box_stats_parameters.go deleted file mode 100644 index e6a543f2..00000000 --- a/v1/client/stats/get_view_box_stats_parameters.go +++ /dev/null @@ -1,412 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetViewBoxStatsParams creates a new GetViewBoxStatsParams 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 NewGetViewBoxStatsParams() *GetViewBoxStatsParams { - return &GetViewBoxStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewBoxStatsParamsWithTimeout creates a new GetViewBoxStatsParams object -// with the ability to set a timeout on a request. -func NewGetViewBoxStatsParamsWithTimeout(timeout time.Duration) *GetViewBoxStatsParams { - return &GetViewBoxStatsParams{ - timeout: timeout, - } -} - -// NewGetViewBoxStatsParamsWithContext creates a new GetViewBoxStatsParams object -// with the ability to set a context for a request. -func NewGetViewBoxStatsParamsWithContext(ctx context.Context) *GetViewBoxStatsParams { - return &GetViewBoxStatsParams{ - Context: ctx, - } -} - -// NewGetViewBoxStatsParamsWithHTTPClient creates a new GetViewBoxStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewBoxStatsParamsWithHTTPClient(client *http.Client) *GetViewBoxStatsParams { - return &GetViewBoxStatsParams{ - HTTPClient: client, - } -} - -/* -GetViewBoxStatsParams contains all the parameters to send to the API endpoint - - for the get view box stats operation. - - Typically these are written to a http.Request. -*/ -type GetViewBoxStatsParams struct { - - /* Cookie. - - Specifies the opaque string returned in the previous response. - If this is set, next set of active opens just after the previous - response are returned. If this is not set, first set of active opens - are returned. - */ - Cookie *string - - /* IncludeServiceProvider. - - Specifies whether to fetch the consumption of external service providers. - These information will be listed as a unique organization (tenant) in - response. By default it is false. - */ - IncludeServiceProvider *bool - - /* MaxCount. - - Specifies a limit on the number of stats groups returned. - - Format: int64 - */ - MaxCount *int64 - - /* MsecsBeforeCurrentTimeToCompare. - - Specifies the time in msecs before current time to compare with. - - Format: int64 - */ - MsecsBeforeCurrentTimeToCompare *int64 - - /* OrganizationsIDList. - - Specifies a list of organizations (tenant) id. - */ - OrganizationsIDList []string - - /* TenantIds. - - Specifies a list of organizations (tenant) id. This field is added to - allow tenantIds json tag. This list will be concatenated with - TenantsIdList to form full list of tenantsIdList. - */ - TenantIds []string - - /* ViewBoxesIDList. - - Specifies a list of view boxes (storage domain) id. - */ - ViewBoxesIDList []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view box stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxStatsParams) WithDefaults() *GetViewBoxStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view box stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view box stats params -func (o *GetViewBoxStatsParams) WithTimeout(timeout time.Duration) *GetViewBoxStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view box stats params -func (o *GetViewBoxStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view box stats params -func (o *GetViewBoxStatsParams) WithContext(ctx context.Context) *GetViewBoxStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view box stats params -func (o *GetViewBoxStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view box stats params -func (o *GetViewBoxStatsParams) WithHTTPClient(client *http.Client) *GetViewBoxStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view box stats params -func (o *GetViewBoxStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get view box stats params -func (o *GetViewBoxStatsParams) WithCookie(cookie *string) *GetViewBoxStatsParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get view box stats params -func (o *GetViewBoxStatsParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithIncludeServiceProvider adds the includeServiceProvider to the get view box stats params -func (o *GetViewBoxStatsParams) WithIncludeServiceProvider(includeServiceProvider *bool) *GetViewBoxStatsParams { - o.SetIncludeServiceProvider(includeServiceProvider) - return o -} - -// SetIncludeServiceProvider adds the includeServiceProvider to the get view box stats params -func (o *GetViewBoxStatsParams) SetIncludeServiceProvider(includeServiceProvider *bool) { - o.IncludeServiceProvider = includeServiceProvider -} - -// WithMaxCount adds the maxCount to the get view box stats params -func (o *GetViewBoxStatsParams) WithMaxCount(maxCount *int64) *GetViewBoxStatsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get view box stats params -func (o *GetViewBoxStatsParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WithMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get view box stats params -func (o *GetViewBoxStatsParams) WithMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) *GetViewBoxStatsParams { - o.SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare) - return o -} - -// SetMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get view box stats params -func (o *GetViewBoxStatsParams) SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) { - o.MsecsBeforeCurrentTimeToCompare = msecsBeforeCurrentTimeToCompare -} - -// WithOrganizationsIDList adds the organizationsIDList to the get view box stats params -func (o *GetViewBoxStatsParams) WithOrganizationsIDList(organizationsIDList []string) *GetViewBoxStatsParams { - o.SetOrganizationsIDList(organizationsIDList) - return o -} - -// SetOrganizationsIDList adds the organizationsIdList to the get view box stats params -func (o *GetViewBoxStatsParams) SetOrganizationsIDList(organizationsIDList []string) { - o.OrganizationsIDList = organizationsIDList -} - -// WithTenantIds adds the tenantIds to the get view box stats params -func (o *GetViewBoxStatsParams) WithTenantIds(tenantIds []string) *GetViewBoxStatsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get view box stats params -func (o *GetViewBoxStatsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewBoxesIDList adds the viewBoxesIDList to the get view box stats params -func (o *GetViewBoxStatsParams) WithViewBoxesIDList(viewBoxesIDList []int64) *GetViewBoxStatsParams { - o.SetViewBoxesIDList(viewBoxesIDList) - return o -} - -// SetViewBoxesIDList adds the viewBoxesIdList to the get view box stats params -func (o *GetViewBoxStatsParams) SetViewBoxesIDList(viewBoxesIDList []int64) { - o.ViewBoxesIDList = viewBoxesIDList -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewBoxStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.IncludeServiceProvider != nil { - - // query param includeServiceProvider - var qrIncludeServiceProvider bool - - if o.IncludeServiceProvider != nil { - qrIncludeServiceProvider = *o.IncludeServiceProvider - } - qIncludeServiceProvider := swag.FormatBool(qrIncludeServiceProvider) - if qIncludeServiceProvider != "" { - - if err := r.SetQueryParam("includeServiceProvider", qIncludeServiceProvider); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.MsecsBeforeCurrentTimeToCompare != nil { - - // query param msecsBeforeCurrentTimeToCompare - var qrMsecsBeforeCurrentTimeToCompare int64 - - if o.MsecsBeforeCurrentTimeToCompare != nil { - qrMsecsBeforeCurrentTimeToCompare = *o.MsecsBeforeCurrentTimeToCompare - } - qMsecsBeforeCurrentTimeToCompare := swag.FormatInt64(qrMsecsBeforeCurrentTimeToCompare) - if qMsecsBeforeCurrentTimeToCompare != "" { - - if err := r.SetQueryParam("msecsBeforeCurrentTimeToCompare", qMsecsBeforeCurrentTimeToCompare); err != nil { - return err - } - } - } - - if o.OrganizationsIDList != nil { - - // binding items for organizationsIdList - joinedOrganizationsIDList := o.bindParamOrganizationsIDList(reg) - - // query array param organizationsIdList - if err := r.SetQueryParam("organizationsIdList", joinedOrganizationsIDList...); err != nil { - return err - } - } - - 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.ViewBoxesIDList != nil { - - // binding items for viewBoxesIdList - joinedViewBoxesIDList := o.bindParamViewBoxesIDList(reg) - - // query array param viewBoxesIdList - if err := r.SetQueryParam("viewBoxesIdList", joinedViewBoxesIDList...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewBoxStats binds the parameter organizationsIdList -func (o *GetViewBoxStatsParams) bindParamOrganizationsIDList(formats strfmt.Registry) []string { - organizationsIDListIR := o.OrganizationsIDList - - var organizationsIDListIC []string - for _, organizationsIDListIIR := range organizationsIDListIR { // explode []string - - organizationsIDListIIV := organizationsIDListIIR // string as string - organizationsIDListIC = append(organizationsIDListIC, organizationsIDListIIV) - } - - // items.CollectionFormat: "" - organizationsIDListIS := swag.JoinByFormat(organizationsIDListIC, "") - - return organizationsIDListIS -} - -// bindParamGetViewBoxStats binds the parameter tenantIds -func (o *GetViewBoxStatsParams) 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 -} - -// bindParamGetViewBoxStats binds the parameter viewBoxesIdList -func (o *GetViewBoxStatsParams) bindParamViewBoxesIDList(formats strfmt.Registry) []string { - viewBoxesIDListIR := o.ViewBoxesIDList - - var viewBoxesIDListIC []string - for _, viewBoxesIDListIIR := range viewBoxesIDListIR { // explode []int64 - - viewBoxesIDListIIV := swag.FormatInt64(viewBoxesIDListIIR) // int64 as string - viewBoxesIDListIC = append(viewBoxesIDListIC, viewBoxesIDListIIV) - } - - // items.CollectionFormat: "" - viewBoxesIDListIS := swag.JoinByFormat(viewBoxesIDListIC, "") - - return viewBoxesIDListIS -} diff --git a/v1/client/stats/get_view_box_stats_responses.go b/v1/client/stats/get_view_box_stats_responses.go deleted file mode 100644 index 2093415a..00000000 --- a/v1/client/stats/get_view_box_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewBoxStatsReader is a Reader for the GetViewBoxStats structure. -type GetViewBoxStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewBoxStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewBoxStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewBoxStatsDefault(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 - } -} - -// NewGetViewBoxStatsOK creates a GetViewBoxStatsOK with default headers values -func NewGetViewBoxStatsOK() *GetViewBoxStatsOK { - return &GetViewBoxStatsOK{} -} - -/* -GetViewBoxStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewBoxStatsOK struct { - Payload *models.GetViewBoxStatsResult -} - -// IsSuccess returns true when this get view box stats o k response has a 2xx status code -func (o *GetViewBoxStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view box stats o k response has a 3xx status code -func (o *GetViewBoxStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view box stats o k response has a 4xx status code -func (o *GetViewBoxStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view box stats o k response has a 5xx status code -func (o *GetViewBoxStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view box stats o k response a status code equal to that given -func (o *GetViewBoxStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view box stats o k response -func (o *GetViewBoxStatsOK) Code() int { - return 200 -} - -func (o *GetViewBoxStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/viewBoxes][%d] getViewBoxStatsOK %s", 200, payload) -} - -func (o *GetViewBoxStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/viewBoxes][%d] getViewBoxStatsOK %s", 200, payload) -} - -func (o *GetViewBoxStatsOK) GetPayload() *models.GetViewBoxStatsResult { - return o.Payload -} - -func (o *GetViewBoxStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewBoxStatsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewBoxStatsDefault creates a GetViewBoxStatsDefault with default headers values -func NewGetViewBoxStatsDefault(code int) *GetViewBoxStatsDefault { - return &GetViewBoxStatsDefault{ - _statusCode: code, - } -} - -/* -GetViewBoxStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewBoxStatsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view box stats default response has a 2xx status code -func (o *GetViewBoxStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view box stats default response has a 3xx status code -func (o *GetViewBoxStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view box stats default response has a 4xx status code -func (o *GetViewBoxStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view box stats default response has a 5xx status code -func (o *GetViewBoxStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view box stats default response a status code equal to that given -func (o *GetViewBoxStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view box stats default response -func (o *GetViewBoxStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewBoxStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/viewBoxes][%d] GetViewBoxStats default %s", o._statusCode, payload) -} - -func (o *GetViewBoxStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/viewBoxes][%d] GetViewBoxStats default %s", o._statusCode, payload) -} - -func (o *GetViewBoxStatsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewBoxStatsDefault) 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/stats/get_view_protocol_stats_parameters.go b/v1/client/stats/get_view_protocol_stats_parameters.go deleted file mode 100644 index 4f085fde..00000000 --- a/v1/client/stats/get_view_protocol_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetViewProtocolStatsParams creates a new GetViewProtocolStatsParams 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 NewGetViewProtocolStatsParams() *GetViewProtocolStatsParams { - return &GetViewProtocolStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewProtocolStatsParamsWithTimeout creates a new GetViewProtocolStatsParams object -// with the ability to set a timeout on a request. -func NewGetViewProtocolStatsParamsWithTimeout(timeout time.Duration) *GetViewProtocolStatsParams { - return &GetViewProtocolStatsParams{ - timeout: timeout, - } -} - -// NewGetViewProtocolStatsParamsWithContext creates a new GetViewProtocolStatsParams object -// with the ability to set a context for a request. -func NewGetViewProtocolStatsParamsWithContext(ctx context.Context) *GetViewProtocolStatsParams { - return &GetViewProtocolStatsParams{ - Context: ctx, - } -} - -// NewGetViewProtocolStatsParamsWithHTTPClient creates a new GetViewProtocolStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewProtocolStatsParamsWithHTTPClient(client *http.Client) *GetViewProtocolStatsParams { - return &GetViewProtocolStatsParams{ - HTTPClient: client, - } -} - -/* -GetViewProtocolStatsParams contains all the parameters to send to the API endpoint - - for the get view protocol stats operation. - - Typically these are written to a http.Request. -*/ -type GetViewProtocolStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view protocol stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewProtocolStatsParams) WithDefaults() *GetViewProtocolStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view protocol stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewProtocolStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view protocol stats params -func (o *GetViewProtocolStatsParams) WithTimeout(timeout time.Duration) *GetViewProtocolStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view protocol stats params -func (o *GetViewProtocolStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view protocol stats params -func (o *GetViewProtocolStatsParams) WithContext(ctx context.Context) *GetViewProtocolStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view protocol stats params -func (o *GetViewProtocolStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view protocol stats params -func (o *GetViewProtocolStatsParams) WithHTTPClient(client *http.Client) *GetViewProtocolStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view protocol stats params -func (o *GetViewProtocolStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewProtocolStatsParams) 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/stats/get_view_protocol_stats_responses.go b/v1/client/stats/get_view_protocol_stats_responses.go deleted file mode 100644 index d538da54..00000000 --- a/v1/client/stats/get_view_protocol_stats_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewProtocolStatsReader is a Reader for the GetViewProtocolStats structure. -type GetViewProtocolStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewProtocolStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewProtocolStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewProtocolStatsDefault(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 - } -} - -// NewGetViewProtocolStatsOK creates a GetViewProtocolStatsOK with default headers values -func NewGetViewProtocolStatsOK() *GetViewProtocolStatsOK { - return &GetViewProtocolStatsOK{} -} - -/* -GetViewProtocolStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewProtocolStatsOK struct { - Payload models.ViewProtocolStatsList -} - -// IsSuccess returns true when this get view protocol stats o k response has a 2xx status code -func (o *GetViewProtocolStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view protocol stats o k response has a 3xx status code -func (o *GetViewProtocolStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view protocol stats o k response has a 4xx status code -func (o *GetViewProtocolStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view protocol stats o k response has a 5xx status code -func (o *GetViewProtocolStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view protocol stats o k response a status code equal to that given -func (o *GetViewProtocolStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view protocol stats o k response -func (o *GetViewProtocolStatsOK) Code() int { - return 200 -} - -func (o *GetViewProtocolStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views/protocols][%d] getViewProtocolStatsOK %s", 200, payload) -} - -func (o *GetViewProtocolStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views/protocols][%d] getViewProtocolStatsOK %s", 200, payload) -} - -func (o *GetViewProtocolStatsOK) GetPayload() models.ViewProtocolStatsList { - return o.Payload -} - -func (o *GetViewProtocolStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewProtocolStatsDefault creates a GetViewProtocolStatsDefault with default headers values -func NewGetViewProtocolStatsDefault(code int) *GetViewProtocolStatsDefault { - return &GetViewProtocolStatsDefault{ - _statusCode: code, - } -} - -/* -GetViewProtocolStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewProtocolStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view protocol stats default response has a 2xx status code -func (o *GetViewProtocolStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view protocol stats default response has a 3xx status code -func (o *GetViewProtocolStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view protocol stats default response has a 4xx status code -func (o *GetViewProtocolStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view protocol stats default response has a 5xx status code -func (o *GetViewProtocolStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view protocol stats default response a status code equal to that given -func (o *GetViewProtocolStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view protocol stats default response -func (o *GetViewProtocolStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewProtocolStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views/protocols][%d] GetViewProtocolStats default %s", o._statusCode, payload) -} - -func (o *GetViewProtocolStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views/protocols][%d] GetViewProtocolStats default %s", o._statusCode, payload) -} - -func (o *GetViewProtocolStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewProtocolStatsDefault) 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/v1/client/stats/get_view_stats_parameters.go b/v1/client/stats/get_view_stats_parameters.go deleted file mode 100644 index 7dc40497..00000000 --- a/v1/client/stats/get_view_stats_parameters.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetViewStatsParams creates a new GetViewStatsParams 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 NewGetViewStatsParams() *GetViewStatsParams { - return &GetViewStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewStatsParamsWithTimeout creates a new GetViewStatsParams object -// with the ability to set a timeout on a request. -func NewGetViewStatsParamsWithTimeout(timeout time.Duration) *GetViewStatsParams { - return &GetViewStatsParams{ - timeout: timeout, - } -} - -// NewGetViewStatsParamsWithContext creates a new GetViewStatsParams object -// with the ability to set a context for a request. -func NewGetViewStatsParamsWithContext(ctx context.Context) *GetViewStatsParams { - return &GetViewStatsParams{ - Context: ctx, - } -} - -// NewGetViewStatsParamsWithHTTPClient creates a new GetViewStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewStatsParamsWithHTTPClient(client *http.Client) *GetViewStatsParams { - return &GetViewStatsParams{ - HTTPClient: client, - } -} - -/* -GetViewStatsParams contains all the parameters to send to the API endpoint - - for the get view stats operation. - - Typically these are written to a http.Request. -*/ -type GetViewStatsParams struct { - - /* LastHours. - - Specifies the last hours of stats to sort. - - Format: int64 - */ - LastHours *int64 - - /* Metric. - - Specifies the metric to which stats has to be sorted. - */ - Metric *string - - /* NumTopViews. - - Specifies the number of views for which stats has to be computed. Specifying this field will return the Views sorted in the descending order on the metric specified. If specified, minimum value is 1. If not specified, all views will be returned. If metric is not specified, this parameter must also not be specified. - - Format: int64 - */ - NumTopViews *int64 - - /* Protocol. - - Specifies the protocol to sort. - */ - Protocol *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewStatsParams) WithDefaults() *GetViewStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view stats params -func (o *GetViewStatsParams) WithTimeout(timeout time.Duration) *GetViewStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view stats params -func (o *GetViewStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view stats params -func (o *GetViewStatsParams) WithContext(ctx context.Context) *GetViewStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view stats params -func (o *GetViewStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view stats params -func (o *GetViewStatsParams) WithHTTPClient(client *http.Client) *GetViewStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view stats params -func (o *GetViewStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLastHours adds the lastHours to the get view stats params -func (o *GetViewStatsParams) WithLastHours(lastHours *int64) *GetViewStatsParams { - o.SetLastHours(lastHours) - return o -} - -// SetLastHours adds the lastHours to the get view stats params -func (o *GetViewStatsParams) SetLastHours(lastHours *int64) { - o.LastHours = lastHours -} - -// WithMetric adds the metric to the get view stats params -func (o *GetViewStatsParams) WithMetric(metric *string) *GetViewStatsParams { - o.SetMetric(metric) - return o -} - -// SetMetric adds the metric to the get view stats params -func (o *GetViewStatsParams) SetMetric(metric *string) { - o.Metric = metric -} - -// WithNumTopViews adds the numTopViews to the get view stats params -func (o *GetViewStatsParams) WithNumTopViews(numTopViews *int64) *GetViewStatsParams { - o.SetNumTopViews(numTopViews) - return o -} - -// SetNumTopViews adds the numTopViews to the get view stats params -func (o *GetViewStatsParams) SetNumTopViews(numTopViews *int64) { - o.NumTopViews = numTopViews -} - -// WithProtocol adds the protocol to the get view stats params -func (o *GetViewStatsParams) WithProtocol(protocol *string) *GetViewStatsParams { - o.SetProtocol(protocol) - return o -} - -// SetProtocol adds the protocol to the get view stats params -func (o *GetViewStatsParams) SetProtocol(protocol *string) { - o.Protocol = protocol -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.LastHours != nil { - - // query param lastHours - var qrLastHours int64 - - if o.LastHours != nil { - qrLastHours = *o.LastHours - } - qLastHours := swag.FormatInt64(qrLastHours) - if qLastHours != "" { - - if err := r.SetQueryParam("lastHours", qLastHours); err != nil { - return err - } - } - } - - if o.Metric != nil { - - // query param metric - var qrMetric string - - if o.Metric != nil { - qrMetric = *o.Metric - } - qMetric := qrMetric - if qMetric != "" { - - if err := r.SetQueryParam("metric", qMetric); err != nil { - return err - } - } - } - - if o.NumTopViews != nil { - - // query param numTopViews - var qrNumTopViews int64 - - if o.NumTopViews != nil { - qrNumTopViews = *o.NumTopViews - } - qNumTopViews := swag.FormatInt64(qrNumTopViews) - if qNumTopViews != "" { - - if err := r.SetQueryParam("numTopViews", qNumTopViews); err != nil { - return err - } - } - } - - if o.Protocol != nil { - - // query param protocol - var qrProtocol string - - if o.Protocol != nil { - qrProtocol = *o.Protocol - } - qProtocol := qrProtocol - if qProtocol != "" { - - if err := r.SetQueryParam("protocol", qProtocol); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/stats/get_view_stats_responses.go b/v1/client/stats/get_view_stats_responses.go deleted file mode 100644 index 2cf544df..00000000 --- a/v1/client/stats/get_view_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewStatsReader is a Reader for the GetViewStats structure. -type GetViewStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewStatsDefault(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 - } -} - -// NewGetViewStatsOK creates a GetViewStatsOK with default headers values -func NewGetViewStatsOK() *GetViewStatsOK { - return &GetViewStatsOK{} -} - -/* -GetViewStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewStatsOK struct { - Payload *models.ViewStatsSnapshot -} - -// IsSuccess returns true when this get view stats o k response has a 2xx status code -func (o *GetViewStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view stats o k response has a 3xx status code -func (o *GetViewStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view stats o k response has a 4xx status code -func (o *GetViewStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view stats o k response has a 5xx status code -func (o *GetViewStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view stats o k response a status code equal to that given -func (o *GetViewStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view stats o k response -func (o *GetViewStatsOK) Code() int { - return 200 -} - -func (o *GetViewStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views][%d] getViewStatsOK %s", 200, payload) -} - -func (o *GetViewStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views][%d] getViewStatsOK %s", 200, payload) -} - -func (o *GetViewStatsOK) GetPayload() *models.ViewStatsSnapshot { - return o.Payload -} - -func (o *GetViewStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewStatsSnapshot) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewStatsDefault creates a GetViewStatsDefault with default headers values -func NewGetViewStatsDefault(code int) *GetViewStatsDefault { - return &GetViewStatsDefault{ - _statusCode: code, - } -} - -/* -GetViewStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view stats default response has a 2xx status code -func (o *GetViewStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view stats default response has a 3xx status code -func (o *GetViewStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view stats default response has a 4xx status code -func (o *GetViewStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view stats default response has a 5xx status code -func (o *GetViewStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view stats default response a status code equal to that given -func (o *GetViewStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view stats default response -func (o *GetViewStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views][%d] GetViewStats default %s", o._statusCode, payload) -} - -func (o *GetViewStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/stats/views][%d] GetViewStats default %s", o._statusCode, payload) -} - -func (o *GetViewStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewStatsDefault) 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/v1/client/stats/stats_client.go b/v1/client/stats/stats_client.go deleted file mode 100644 index 7a19cc45..00000000 --- a/v1/client/stats/stats_client.go +++ /dev/null @@ -1,687 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new stats API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new stats API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new stats API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for stats API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetActiveAlertsStats(params *GetActiveAlertsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveAlertsStatsOK, error) - - GetConsumerStats(params *GetConsumerStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetConsumerStatsOK, error) - - GetFileDistributionStats(params *GetFileDistributionStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileDistributionStatsOK, error) - - GetLastProtectionRunStats(params *GetLastProtectionRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLastProtectionRunStatsOK, error) - - GetProtectedObjectsSummary(params *GetProtectedObjectsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsSummaryOK, error) - - GetProtectionRunsStats(params *GetProtectionRunsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsStatsOK, error) - - GetRestoreStats(params *GetRestoreStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreStatsOK, error) - - GetStorageStats(params *GetStorageStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageStatsOK, error) - - GetTenantStats(params *GetTenantStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantStatsOK, error) - - GetVaultProviderStats(params *GetVaultProviderStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultProviderStatsOK, error) - - GetVaultRunStats(params *GetVaultRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultRunStatsOK, error) - - GetVaultStats(params *GetVaultStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultStatsOK, error) - - GetViewBoxStats(params *GetViewBoxStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxStatsOK, error) - - GetViewProtocolStats(params *GetViewProtocolStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewProtocolStatsOK, error) - - GetViewStats(params *GetViewStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewStatsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetActiveAlertsStats computes the statistics on the active alerts generated on the cluster - -Compute the statistics on the active Alerts generated on the cluster based on the provided time interval. -*/ -func (a *Client) GetActiveAlertsStats(params *GetActiveAlertsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveAlertsStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveAlertsStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveAlertsStats", - Method: "GET", - PathPattern: "/public/stats/alerts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveAlertsStatsReader{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.(*GetActiveAlertsStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveAlertsStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetConsumerStats gets the statistics of consumers -*/ -func (a *Client) GetConsumerStats(params *GetConsumerStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetConsumerStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetConsumerStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetConsumerStats", - Method: "GET", - PathPattern: "/public/stats/consumers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetConsumerStatsReader{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.(*GetConsumerStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetConsumerStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileDistributionStats computes the file distribution statistics on a given entity like cluster or storage domain - -Compute the file distribution statistics on a given entity like cluster or storage domain. -*/ -func (a *Client) GetFileDistributionStats(params *GetFileDistributionStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileDistributionStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileDistributionStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileDistributionStats", - Method: "GET", - PathPattern: "/public/stats/files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileDistributionStatsReader{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.(*GetFileDistributionStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileDistributionStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetLastProtectionRunStats computes stats on last protection run for every job - -Compute stats on last Protection Run for every job. -*/ -func (a *Client) GetLastProtectionRunStats(params *GetLastProtectionRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLastProtectionRunStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLastProtectionRunStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetLastProtectionRunStats", - Method: "GET", - PathPattern: "/public/stats/protectionRuns/lastRun", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetLastProtectionRunStatsReader{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.(*GetLastProtectionRunStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLastProtectionRunStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectedObjectsSummary computes the protected objects summary on the cluster - -Computes the protected objects summary on the cluster. -*/ -func (a *Client) GetProtectedObjectsSummary(params *GetProtectedObjectsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectedObjectsSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectedObjectsSummary", - Method: "GET", - PathPattern: "/public/stats/protectionSummary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectedObjectsSummaryReader{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.(*GetProtectedObjectsSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectedObjectsSummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionRunsStats computes the statistics on the protection runs for the cluster - -Compute the statistics of the Protection Runs based on the input filters. This endpoint provides a snapshot of count of Protection Runs of a specified status on a specified time interval. -*/ -func (a *Client) GetProtectionRunsStats(params *GetProtectionRunsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunsStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRunsStats", - Method: "GET", - PathPattern: "/public/stats/protectionRuns", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunsStatsReader{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.(*GetProtectionRunsStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunsStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRestoreStats computes the statistics on the restore tasks on the cluster - -Compute the statistics on the Restore tasks on the cluster based on the provided time interval. -*/ -func (a *Client) GetRestoreStats(params *GetRestoreStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRestoreStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRestoreStats", - Method: "GET", - PathPattern: "/public/stats/restores", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRestoreStatsReader{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.(*GetRestoreStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRestoreStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetStorageStats computes the storage stats on the cluster - -Computes the storage stats on the cluster. -*/ -func (a *Client) GetStorageStats(params *GetStorageStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStorageStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetStorageStats", - Method: "GET", - PathPattern: "/public/stats/storage", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetStorageStatsReader{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.(*GetStorageStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetStorageStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenantStats gets the statistics of organizations tenant -*/ -func (a *Client) GetTenantStats(params *GetTenantStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenantStats", - Method: "GET", - PathPattern: "/public/stats/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantStatsReader{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.(*GetTenantStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVaultProviderStats computes the size and count of entities on vaults - -Compute the size and count of entities on vaults. -*/ -func (a *Client) GetVaultProviderStats(params *GetVaultProviderStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultProviderStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultProviderStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaultProviderStats", - Method: "GET", - PathPattern: "/public/stats/vaults/providers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultProviderStatsReader{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.(*GetVaultProviderStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultProviderStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVaultRunStats computes the statistics on protection runs to or from a vault - -Compute the statistics on protection runs to or from a vault and return a trend line of the result. -*/ -func (a *Client) GetVaultRunStats(params *GetVaultRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultRunStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultRunStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaultRunStats", - Method: "GET", - PathPattern: "/public/stats/vaults/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultRunStatsReader{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.(*GetVaultRunStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultRunStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVaultStats computes the statistics on vaults - -Compute the statistics on vaults. -*/ -func (a *Client) GetVaultStats(params *GetVaultStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaultStats", - Method: "GET", - PathPattern: "/public/stats/vaults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultStatsReader{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.(*GetVaultStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewBoxStats gets the statistics of view boxes storage domain -*/ -func (a *Client) GetViewBoxStats(params *GetViewBoxStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewBoxStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewBoxStats", - Method: "GET", - PathPattern: "/public/stats/viewBoxes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewBoxStatsReader{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.(*GetViewBoxStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewBoxStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewProtocolStats computes the protocol statistics on views - -Compute the protocol statistics on Views. -*/ -func (a *Client) GetViewProtocolStats(params *GetViewProtocolStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewProtocolStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewProtocolStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewProtocolStats", - Method: "GET", - PathPattern: "/public/stats/views/protocols", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewProtocolStatsReader{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.(*GetViewProtocolStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewProtocolStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewStats computes the statistics on views - -Compute the statistics on Views. -*/ -func (a *Client) GetViewStats(params *GetViewStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewStats", - Method: "GET", - PathPattern: "/public/stats/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewStatsReader{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.(*GetViewStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewStatsDefault) - 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/tags/apply_tags_parameters.go b/v1/client/tags/apply_tags_parameters.go deleted file mode 100644 index 64ee276c..00000000 --- a/v1/client/tags/apply_tags_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tags - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewApplyTagsParams creates a new ApplyTagsParams 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 NewApplyTagsParams() *ApplyTagsParams { - return &ApplyTagsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewApplyTagsParamsWithTimeout creates a new ApplyTagsParams object -// with the ability to set a timeout on a request. -func NewApplyTagsParamsWithTimeout(timeout time.Duration) *ApplyTagsParams { - return &ApplyTagsParams{ - timeout: timeout, - } -} - -// NewApplyTagsParamsWithContext creates a new ApplyTagsParams object -// with the ability to set a context for a request. -func NewApplyTagsParamsWithContext(ctx context.Context) *ApplyTagsParams { - return &ApplyTagsParams{ - Context: ctx, - } -} - -// NewApplyTagsParamsWithHTTPClient creates a new ApplyTagsParams object -// with the ability to set a custom HTTPClient for a request. -func NewApplyTagsParamsWithHTTPClient(client *http.Client) *ApplyTagsParams { - return &ApplyTagsParams{ - HTTPClient: client, - } -} - -/* -ApplyTagsParams contains all the parameters to send to the API endpoint - - for the apply tags operation. - - Typically these are written to a http.Request. -*/ -type ApplyTagsParams struct { - - /* Body. - - Request to add or update document tags. - */ - Body *models.TagsOperationParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the apply tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyTagsParams) WithDefaults() *ApplyTagsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the apply tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyTagsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the apply tags params -func (o *ApplyTagsParams) WithTimeout(timeout time.Duration) *ApplyTagsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the apply tags params -func (o *ApplyTagsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the apply tags params -func (o *ApplyTagsParams) WithContext(ctx context.Context) *ApplyTagsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the apply tags params -func (o *ApplyTagsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the apply tags params -func (o *ApplyTagsParams) WithHTTPClient(client *http.Client) *ApplyTagsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the apply tags params -func (o *ApplyTagsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the apply tags params -func (o *ApplyTagsParams) WithBody(body *models.TagsOperationParameters) *ApplyTagsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the apply tags params -func (o *ApplyTagsParams) SetBody(body *models.TagsOperationParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ApplyTagsParams) 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/tags/apply_tags_responses.go b/v1/client/tags/apply_tags_responses.go deleted file mode 100644 index 9201a5c5..00000000 --- a/v1/client/tags/apply_tags_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tags - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ApplyTagsReader is a Reader for the ApplyTags structure. -type ApplyTagsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ApplyTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewApplyTagsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewApplyTagsDefault(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 - } -} - -// NewApplyTagsOK creates a ApplyTagsOK with default headers values -func NewApplyTagsOK() *ApplyTagsOK { - return &ApplyTagsOK{} -} - -/* -ApplyTagsOK describes a response with status code 200, with default header values. - -Tags Operation Response. -*/ -type ApplyTagsOK struct { - Payload *models.TagsOperationResult -} - -// IsSuccess returns true when this apply tags o k response has a 2xx status code -func (o *ApplyTagsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this apply tags o k response has a 3xx status code -func (o *ApplyTagsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this apply tags o k response has a 4xx status code -func (o *ApplyTagsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this apply tags o k response has a 5xx status code -func (o *ApplyTagsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this apply tags o k response a status code equal to that given -func (o *ApplyTagsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the apply tags o k response -func (o *ApplyTagsOK) Code() int { - return 200 -} - -func (o *ApplyTagsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/apply][%d] applyTagsOK %s", 200, payload) -} - -func (o *ApplyTagsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/apply][%d] applyTagsOK %s", 200, payload) -} - -func (o *ApplyTagsOK) GetPayload() *models.TagsOperationResult { - return o.Payload -} - -func (o *ApplyTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TagsOperationResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewApplyTagsDefault creates a ApplyTagsDefault with default headers values -func NewApplyTagsDefault(code int) *ApplyTagsDefault { - return &ApplyTagsDefault{ - _statusCode: code, - } -} - -/* -ApplyTagsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ApplyTagsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this apply tags default response has a 2xx status code -func (o *ApplyTagsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this apply tags default response has a 3xx status code -func (o *ApplyTagsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this apply tags default response has a 4xx status code -func (o *ApplyTagsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this apply tags default response has a 5xx status code -func (o *ApplyTagsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this apply tags default response a status code equal to that given -func (o *ApplyTagsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the apply tags default response -func (o *ApplyTagsDefault) Code() int { - return o._statusCode -} - -func (o *ApplyTagsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/apply][%d] ApplyTags default %s", o._statusCode, payload) -} - -func (o *ApplyTagsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/apply][%d] ApplyTags default %s", o._statusCode, payload) -} - -func (o *ApplyTagsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ApplyTagsDefault) 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/tags/remove_tags_parameters.go b/v1/client/tags/remove_tags_parameters.go deleted file mode 100644 index f205239f..00000000 --- a/v1/client/tags/remove_tags_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tags - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRemoveTagsParams creates a new RemoveTagsParams 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 NewRemoveTagsParams() *RemoveTagsParams { - return &RemoveTagsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveTagsParamsWithTimeout creates a new RemoveTagsParams object -// with the ability to set a timeout on a request. -func NewRemoveTagsParamsWithTimeout(timeout time.Duration) *RemoveTagsParams { - return &RemoveTagsParams{ - timeout: timeout, - } -} - -// NewRemoveTagsParamsWithContext creates a new RemoveTagsParams object -// with the ability to set a context for a request. -func NewRemoveTagsParamsWithContext(ctx context.Context) *RemoveTagsParams { - return &RemoveTagsParams{ - Context: ctx, - } -} - -// NewRemoveTagsParamsWithHTTPClient creates a new RemoveTagsParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveTagsParamsWithHTTPClient(client *http.Client) *RemoveTagsParams { - return &RemoveTagsParams{ - HTTPClient: client, - } -} - -/* -RemoveTagsParams contains all the parameters to send to the API endpoint - - for the remove tags operation. - - Typically these are written to a http.Request. -*/ -type RemoveTagsParams struct { - - /* Body. - - Request to add or update document tags. - */ - Body *models.TagsOperationParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveTagsParams) WithDefaults() *RemoveTagsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveTagsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove tags params -func (o *RemoveTagsParams) WithTimeout(timeout time.Duration) *RemoveTagsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove tags params -func (o *RemoveTagsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove tags params -func (o *RemoveTagsParams) WithContext(ctx context.Context) *RemoveTagsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove tags params -func (o *RemoveTagsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove tags params -func (o *RemoveTagsParams) WithHTTPClient(client *http.Client) *RemoveTagsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove tags params -func (o *RemoveTagsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the remove tags params -func (o *RemoveTagsParams) WithBody(body *models.TagsOperationParameters) *RemoveTagsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the remove tags params -func (o *RemoveTagsParams) SetBody(body *models.TagsOperationParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveTagsParams) 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/tags/remove_tags_responses.go b/v1/client/tags/remove_tags_responses.go deleted file mode 100644 index 0a511a49..00000000 --- a/v1/client/tags/remove_tags_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tags - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RemoveTagsReader is a Reader for the RemoveTags structure. -type RemoveTagsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRemoveTagsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveTagsDefault(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 - } -} - -// NewRemoveTagsOK creates a RemoveTagsOK with default headers values -func NewRemoveTagsOK() *RemoveTagsOK { - return &RemoveTagsOK{} -} - -/* -RemoveTagsOK describes a response with status code 200, with default header values. - -Tags Operation Response. -*/ -type RemoveTagsOK struct { - Payload *models.TagsOperationResult -} - -// IsSuccess returns true when this remove tags o k response has a 2xx status code -func (o *RemoveTagsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove tags o k response has a 3xx status code -func (o *RemoveTagsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove tags o k response has a 4xx status code -func (o *RemoveTagsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove tags o k response has a 5xx status code -func (o *RemoveTagsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this remove tags o k response a status code equal to that given -func (o *RemoveTagsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the remove tags o k response -func (o *RemoveTagsOK) Code() int { - return 200 -} - -func (o *RemoveTagsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/remove][%d] removeTagsOK %s", 200, payload) -} - -func (o *RemoveTagsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/remove][%d] removeTagsOK %s", 200, payload) -} - -func (o *RemoveTagsOK) GetPayload() *models.TagsOperationResult { - return o.Payload -} - -func (o *RemoveTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TagsOperationResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRemoveTagsDefault creates a RemoveTagsDefault with default headers values -func NewRemoveTagsDefault(code int) *RemoveTagsDefault { - return &RemoveTagsDefault{ - _statusCode: code, - } -} - -/* -RemoveTagsDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveTagsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this remove tags default response has a 2xx status code -func (o *RemoveTagsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove tags default response has a 3xx status code -func (o *RemoveTagsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove tags default response has a 4xx status code -func (o *RemoveTagsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove tags default response has a 5xx status code -func (o *RemoveTagsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove tags default response a status code equal to that given -func (o *RemoveTagsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove tags default response -func (o *RemoveTagsDefault) Code() int { - return o._statusCode -} - -func (o *RemoveTagsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/remove][%d] RemoveTags default %s", o._statusCode, payload) -} - -func (o *RemoveTagsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tags/remove][%d] RemoveTags default %s", o._statusCode, payload) -} - -func (o *RemoveTagsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RemoveTagsDefault) 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/tags/tags_client.go b/v1/client/tags/tags_client.go deleted file mode 100644 index 6617b96c..00000000 --- a/v1/client/tags/tags_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tags - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new tags API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new tags API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new tags API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for tags API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ApplyTags(params *ApplyTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyTagsOK, error) - - RemoveTags(params *RemoveTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveTagsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ApplyTags applies tags on existing objects in the cohesity cluster - -Returns No Error if tagging done properly -*/ -func (a *Client) ApplyTags(params *ApplyTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyTagsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewApplyTagsParams() - } - op := &runtime.ClientOperation{ - ID: "ApplyTags", - Method: "PUT", - PathPattern: "/public/tags/apply", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ApplyTagsReader{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.(*ApplyTagsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ApplyTagsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveTags removes tags on existing objects in the cohesity cluster - -Returns No Error if tagging done properly -*/ -func (a *Client) RemoveTags(params *RemoveTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveTagsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveTagsParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveTags", - Method: "PUT", - PathPattern: "/public/tags/remove", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveTagsReader{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.(*RemoveTagsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveTagsDefault) - 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/tenant/create_tenant_parameters.go b/v1/client/tenant/create_tenant_parameters.go deleted file mode 100644 index 16203119..00000000 --- a/v1/client/tenant/create_tenant_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateTenantParams creates a new CreateTenantParams 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 NewCreateTenantParams() *CreateTenantParams { - return &CreateTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTenantParamsWithTimeout creates a new CreateTenantParams object -// with the ability to set a timeout on a request. -func NewCreateTenantParamsWithTimeout(timeout time.Duration) *CreateTenantParams { - return &CreateTenantParams{ - timeout: timeout, - } -} - -// NewCreateTenantParamsWithContext creates a new CreateTenantParams object -// with the ability to set a context for a request. -func NewCreateTenantParamsWithContext(ctx context.Context) *CreateTenantParams { - return &CreateTenantParams{ - Context: ctx, - } -} - -// NewCreateTenantParamsWithHTTPClient creates a new CreateTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTenantParamsWithHTTPClient(client *http.Client) *CreateTenantParams { - return &CreateTenantParams{ - HTTPClient: client, - } -} - -/* -CreateTenantParams contains all the parameters to send to the API endpoint - - for the create tenant operation. - - Typically these are written to a http.Request. -*/ -type CreateTenantParams struct { - - /* Body. - - Request to add or create a new tenant. - */ - Body *models.TenantCreateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTenantParams) WithDefaults() *CreateTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create tenant params -func (o *CreateTenantParams) WithTimeout(timeout time.Duration) *CreateTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create tenant params -func (o *CreateTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create tenant params -func (o *CreateTenantParams) WithContext(ctx context.Context) *CreateTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create tenant params -func (o *CreateTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create tenant params -func (o *CreateTenantParams) WithHTTPClient(client *http.Client) *CreateTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create tenant params -func (o *CreateTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create tenant params -func (o *CreateTenantParams) WithBody(body *models.TenantCreateParameters) *CreateTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create tenant params -func (o *CreateTenantParams) SetBody(body *models.TenantCreateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTenantParams) 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/tenant/create_tenant_responses.go b/v1/client/tenant/create_tenant_responses.go deleted file mode 100644 index 3edb1d34..00000000 --- a/v1/client/tenant/create_tenant_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateTenantReader is a Reader for the CreateTenant structure. -type CreateTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTenantCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateTenantDefault(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 - } -} - -// NewCreateTenantCreated creates a CreateTenantCreated with default headers values -func NewCreateTenantCreated() *CreateTenantCreated { - return &CreateTenantCreated{} -} - -/* -CreateTenantCreated describes a response with status code 201, with default header values. - -Create Tenants response -*/ -type CreateTenantCreated struct { - Payload *models.Tenant -} - -// IsSuccess returns true when this create tenant created response has a 2xx status code -func (o *CreateTenantCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create tenant created response has a 3xx status code -func (o *CreateTenantCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create tenant created response has a 4xx status code -func (o *CreateTenantCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create tenant created response has a 5xx status code -func (o *CreateTenantCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create tenant created response a status code equal to that given -func (o *CreateTenantCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create tenant created response -func (o *CreateTenantCreated) Code() int { - return 201 -} - -func (o *CreateTenantCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/tenants][%d] createTenantCreated %s", 201, payload) -} - -func (o *CreateTenantCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/tenants][%d] createTenantCreated %s", 201, payload) -} - -func (o *CreateTenantCreated) GetPayload() *models.Tenant { - return o.Payload -} - -func (o *CreateTenantCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Tenant) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTenantDefault creates a CreateTenantDefault with default headers values -func NewCreateTenantDefault(code int) *CreateTenantDefault { - return &CreateTenantDefault{ - _statusCode: code, - } -} - -/* -CreateTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateTenantDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create tenant default response has a 2xx status code -func (o *CreateTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create tenant default response has a 3xx status code -func (o *CreateTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create tenant default response has a 4xx status code -func (o *CreateTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create tenant default response has a 5xx status code -func (o *CreateTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create tenant default response a status code equal to that given -func (o *CreateTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create tenant default response -func (o *CreateTenantDefault) Code() int { - return o._statusCode -} - -func (o *CreateTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/tenants][%d] CreateTenant default %s", o._statusCode, payload) -} - -func (o *CreateTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/tenants][%d] CreateTenant default %s", o._statusCode, payload) -} - -func (o *CreateTenantDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateTenantDefault) 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/tenant/delete_tenant_parameters.go b/v1/client/tenant/delete_tenant_parameters.go deleted file mode 100644 index 2d3219fe..00000000 --- a/v1/client/tenant/delete_tenant_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteTenantParams creates a new DeleteTenantParams 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 NewDeleteTenantParams() *DeleteTenantParams { - return &DeleteTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteTenantParamsWithTimeout creates a new DeleteTenantParams object -// with the ability to set a timeout on a request. -func NewDeleteTenantParamsWithTimeout(timeout time.Duration) *DeleteTenantParams { - return &DeleteTenantParams{ - timeout: timeout, - } -} - -// NewDeleteTenantParamsWithContext creates a new DeleteTenantParams object -// with the ability to set a context for a request. -func NewDeleteTenantParamsWithContext(ctx context.Context) *DeleteTenantParams { - return &DeleteTenantParams{ - Context: ctx, - } -} - -// NewDeleteTenantParamsWithHTTPClient creates a new DeleteTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteTenantParamsWithHTTPClient(client *http.Client) *DeleteTenantParams { - return &DeleteTenantParams{ - HTTPClient: client, - } -} - -/* -DeleteTenantParams contains all the parameters to send to the API endpoint - - for the delete tenant operation. - - Typically these are written to a http.Request. -*/ -type DeleteTenantParams struct { - - // Body. - Body *models.TenantIDData - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTenantParams) WithDefaults() *DeleteTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete tenant params -func (o *DeleteTenantParams) WithTimeout(timeout time.Duration) *DeleteTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete tenant params -func (o *DeleteTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete tenant params -func (o *DeleteTenantParams) WithContext(ctx context.Context) *DeleteTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete tenant params -func (o *DeleteTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete tenant params -func (o *DeleteTenantParams) WithHTTPClient(client *http.Client) *DeleteTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete tenant params -func (o *DeleteTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete tenant params -func (o *DeleteTenantParams) WithBody(body *models.TenantIDData) *DeleteTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete tenant params -func (o *DeleteTenantParams) SetBody(body *models.TenantIDData) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteTenantParams) 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/tenant/delete_tenant_responses.go b/v1/client/tenant/delete_tenant_responses.go deleted file mode 100644 index 5960f403..00000000 --- a/v1/client/tenant/delete_tenant_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteTenantReader is a Reader for the DeleteTenant structure. -type DeleteTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteTenantNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteTenantDefault(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 - } -} - -// NewDeleteTenantNoContent creates a DeleteTenantNoContent with default headers values -func NewDeleteTenantNoContent() *DeleteTenantNoContent { - return &DeleteTenantNoContent{} -} - -/* -DeleteTenantNoContent describes a response with status code 204, with default header values. - -Get Tenants Response. -*/ -type DeleteTenantNoContent struct { - Payload []*models.Tenant -} - -// IsSuccess returns true when this delete tenant no content response has a 2xx status code -func (o *DeleteTenantNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete tenant no content response has a 3xx status code -func (o *DeleteTenantNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete tenant no content response has a 4xx status code -func (o *DeleteTenantNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete tenant no content response has a 5xx status code -func (o *DeleteTenantNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete tenant no content response a status code equal to that given -func (o *DeleteTenantNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete tenant no content response -func (o *DeleteTenantNoContent) Code() int { - return 204 -} - -func (o *DeleteTenantNoContent) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/tenants][%d] deleteTenantNoContent %s", 204, payload) -} - -func (o *DeleteTenantNoContent) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/tenants][%d] deleteTenantNoContent %s", 204, payload) -} - -func (o *DeleteTenantNoContent) GetPayload() []*models.Tenant { - return o.Payload -} - -func (o *DeleteTenantNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteTenantDefault creates a DeleteTenantDefault with default headers values -func NewDeleteTenantDefault(code int) *DeleteTenantDefault { - return &DeleteTenantDefault{ - _statusCode: code, - } -} - -/* -DeleteTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteTenantDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete tenant default response has a 2xx status code -func (o *DeleteTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete tenant default response has a 3xx status code -func (o *DeleteTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete tenant default response has a 4xx status code -func (o *DeleteTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete tenant default response has a 5xx status code -func (o *DeleteTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete tenant default response a status code equal to that given -func (o *DeleteTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete tenant default response -func (o *DeleteTenantDefault) Code() int { - return o._statusCode -} - -func (o *DeleteTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/tenants][%d] DeleteTenant default %s", o._statusCode, payload) -} - -func (o *DeleteTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/tenants][%d] DeleteTenant default %s", o._statusCode, payload) -} - -func (o *DeleteTenantDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteTenantDefault) 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/tenant/download_tenants_proxy_parameters.go b/v1/client/tenant/download_tenants_proxy_parameters.go deleted file mode 100644 index f3c0fa20..00000000 --- a/v1/client/tenant/download_tenants_proxy_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewDownloadTenantsProxyParams creates a new DownloadTenantsProxyParams 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 NewDownloadTenantsProxyParams() *DownloadTenantsProxyParams { - return &DownloadTenantsProxyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadTenantsProxyParamsWithTimeout creates a new DownloadTenantsProxyParams object -// with the ability to set a timeout on a request. -func NewDownloadTenantsProxyParamsWithTimeout(timeout time.Duration) *DownloadTenantsProxyParams { - return &DownloadTenantsProxyParams{ - timeout: timeout, - } -} - -// NewDownloadTenantsProxyParamsWithContext creates a new DownloadTenantsProxyParams object -// with the ability to set a context for a request. -func NewDownloadTenantsProxyParamsWithContext(ctx context.Context) *DownloadTenantsProxyParams { - return &DownloadTenantsProxyParams{ - Context: ctx, - } -} - -// NewDownloadTenantsProxyParamsWithHTTPClient creates a new DownloadTenantsProxyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadTenantsProxyParamsWithHTTPClient(client *http.Client) *DownloadTenantsProxyParams { - return &DownloadTenantsProxyParams{ - HTTPClient: client, - } -} - -/* -DownloadTenantsProxyParams contains all the parameters to send to the API endpoint - - for the download tenants proxy operation. - - Typically these are written to a http.Request. -*/ -type DownloadTenantsProxyParams struct { - - /* ID. - - Specifies the id of the tenant. - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download tenants proxy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadTenantsProxyParams) WithDefaults() *DownloadTenantsProxyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download tenants proxy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadTenantsProxyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download tenants proxy params -func (o *DownloadTenantsProxyParams) WithTimeout(timeout time.Duration) *DownloadTenantsProxyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download tenants proxy params -func (o *DownloadTenantsProxyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download tenants proxy params -func (o *DownloadTenantsProxyParams) WithContext(ctx context.Context) *DownloadTenantsProxyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download tenants proxy params -func (o *DownloadTenantsProxyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download tenants proxy params -func (o *DownloadTenantsProxyParams) WithHTTPClient(client *http.Client) *DownloadTenantsProxyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download tenants proxy params -func (o *DownloadTenantsProxyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the download tenants proxy params -func (o *DownloadTenantsProxyParams) WithID(id *string) *DownloadTenantsProxyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the download tenants proxy params -func (o *DownloadTenantsProxyParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadTenantsProxyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/tenant/download_tenants_proxy_responses.go b/v1/client/tenant/download_tenants_proxy_responses.go deleted file mode 100644 index 2fd9a5b3..00000000 --- a/v1/client/tenant/download_tenants_proxy_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DownloadTenantsProxyReader is a Reader for the DownloadTenantsProxy structure. -type DownloadTenantsProxyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadTenantsProxyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadTenantsProxyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadTenantsProxyDefault(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 - } -} - -// NewDownloadTenantsProxyOK creates a DownloadTenantsProxyOK with default headers values -func NewDownloadTenantsProxyOK() *DownloadTenantsProxyOK { - return &DownloadTenantsProxyOK{} -} - -/* -DownloadTenantsProxyOK describes a response with status code 200, with default header values. - -Tenants Proxy Download Response. -*/ -type DownloadTenantsProxyOK struct { - Payload []uint8 -} - -// IsSuccess returns true when this download tenants proxy o k response has a 2xx status code -func (o *DownloadTenantsProxyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download tenants proxy o k response has a 3xx status code -func (o *DownloadTenantsProxyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download tenants proxy o k response has a 4xx status code -func (o *DownloadTenantsProxyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download tenants proxy o k response has a 5xx status code -func (o *DownloadTenantsProxyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download tenants proxy o k response a status code equal to that given -func (o *DownloadTenantsProxyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download tenants proxy o k response -func (o *DownloadTenantsProxyOK) Code() int { - return 200 -} - -func (o *DownloadTenantsProxyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/image][%d] downloadTenantsProxyOK %s", 200, payload) -} - -func (o *DownloadTenantsProxyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/image][%d] downloadTenantsProxyOK %s", 200, payload) -} - -func (o *DownloadTenantsProxyOK) GetPayload() []uint8 { - return o.Payload -} - -func (o *DownloadTenantsProxyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadTenantsProxyDefault creates a DownloadTenantsProxyDefault with default headers values -func NewDownloadTenantsProxyDefault(code int) *DownloadTenantsProxyDefault { - return &DownloadTenantsProxyDefault{ - _statusCode: code, - } -} - -/* -DownloadTenantsProxyDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadTenantsProxyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this download tenants proxy default response has a 2xx status code -func (o *DownloadTenantsProxyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download tenants proxy default response has a 3xx status code -func (o *DownloadTenantsProxyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download tenants proxy default response has a 4xx status code -func (o *DownloadTenantsProxyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download tenants proxy default response has a 5xx status code -func (o *DownloadTenantsProxyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download tenants proxy default response a status code equal to that given -func (o *DownloadTenantsProxyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download tenants proxy default response -func (o *DownloadTenantsProxyDefault) Code() int { - return o._statusCode -} - -func (o *DownloadTenantsProxyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/image][%d] DownloadTenantsProxy default %s", o._statusCode, payload) -} - -func (o *DownloadTenantsProxyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/image][%d] DownloadTenantsProxy default %s", o._statusCode, payload) -} - -func (o *DownloadTenantsProxyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DownloadTenantsProxyDefault) 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/tenant/get_tenants_parameters.go b/v1/client/tenant/get_tenants_parameters.go deleted file mode 100644 index a00f5f02..00000000 --- a/v1/client/tenant/get_tenants_parameters.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/go-openapi/swag" -) - -// NewGetTenantsParams creates a new GetTenantsParams 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 NewGetTenantsParams() *GetTenantsParams { - return &GetTenantsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantsParamsWithTimeout creates a new GetTenantsParams object -// with the ability to set a timeout on a request. -func NewGetTenantsParamsWithTimeout(timeout time.Duration) *GetTenantsParams { - return &GetTenantsParams{ - timeout: timeout, - } -} - -// NewGetTenantsParamsWithContext creates a new GetTenantsParams object -// with the ability to set a context for a request. -func NewGetTenantsParamsWithContext(ctx context.Context) *GetTenantsParams { - return &GetTenantsParams{ - Context: ctx, - } -} - -// NewGetTenantsParamsWithHTTPClient creates a new GetTenantsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantsParamsWithHTTPClient(client *http.Client) *GetTenantsParams { - return &GetTenantsParams{ - HTTPClient: client, - } -} - -/* -GetTenantsParams contains all the parameters to send to the API endpoint - - for the get tenants operation. - - Typically these are written to a http.Request. -*/ -type GetTenantsParams struct { - - // Hierarchy. - Hierarchy *bool - - // Ids. - Ids []string - - // IncludeSelf. - IncludeSelf *bool - - /* Properties. - - 'ViewBox' indicates view box data for tenant. - 'Vlan' indicates vlan data for tenant. - 'ProtectionPolicy' indicates protection policy for tenant. - 'ProtectionJob' indicates protection job for tenant. - 'Entity' indicates entity data for tenant. - 'Views' indicates view data for tenant. - 'ActiveDirectory' indicates active directory for tenant. - 'LdapProvider' indicates ldap provider for tenant. - 'SwiftConfig' indicates Swift configuration for tenant. - */ - Properties []string - - // SkipInvalidIds. - SkipInvalidIds *bool - - /* Status. - - Filter by tenant status. - */ - Status []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenants params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsParams) WithDefaults() *GetTenantsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenants params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenants params -func (o *GetTenantsParams) WithTimeout(timeout time.Duration) *GetTenantsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenants params -func (o *GetTenantsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenants params -func (o *GetTenantsParams) WithContext(ctx context.Context) *GetTenantsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenants params -func (o *GetTenantsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenants params -func (o *GetTenantsParams) WithHTTPClient(client *http.Client) *GetTenantsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenants params -func (o *GetTenantsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithHierarchy adds the hierarchy to the get tenants params -func (o *GetTenantsParams) WithHierarchy(hierarchy *bool) *GetTenantsParams { - o.SetHierarchy(hierarchy) - return o -} - -// SetHierarchy adds the hierarchy to the get tenants params -func (o *GetTenantsParams) SetHierarchy(hierarchy *bool) { - o.Hierarchy = hierarchy -} - -// WithIds adds the ids to the get tenants params -func (o *GetTenantsParams) WithIds(ids []string) *GetTenantsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get tenants params -func (o *GetTenantsParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeSelf adds the includeSelf to the get tenants params -func (o *GetTenantsParams) WithIncludeSelf(includeSelf *bool) *GetTenantsParams { - o.SetIncludeSelf(includeSelf) - return o -} - -// SetIncludeSelf adds the includeSelf to the get tenants params -func (o *GetTenantsParams) SetIncludeSelf(includeSelf *bool) { - o.IncludeSelf = includeSelf -} - -// WithProperties adds the properties to the get tenants params -func (o *GetTenantsParams) WithProperties(properties []string) *GetTenantsParams { - o.SetProperties(properties) - return o -} - -// SetProperties adds the properties to the get tenants params -func (o *GetTenantsParams) SetProperties(properties []string) { - o.Properties = properties -} - -// WithSkipInvalidIds adds the skipInvalidIds to the get tenants params -func (o *GetTenantsParams) WithSkipInvalidIds(skipInvalidIds *bool) *GetTenantsParams { - o.SetSkipInvalidIds(skipInvalidIds) - return o -} - -// SetSkipInvalidIds adds the skipInvalidIds to the get tenants params -func (o *GetTenantsParams) SetSkipInvalidIds(skipInvalidIds *bool) { - o.SkipInvalidIds = skipInvalidIds -} - -// WithStatus adds the status to the get tenants params -func (o *GetTenantsParams) WithStatus(status []string) *GetTenantsParams { - o.SetStatus(status) - return o -} - -// SetStatus adds the status to the get tenants params -func (o *GetTenantsParams) SetStatus(status []string) { - o.Status = status -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Hierarchy != nil { - - // query param hierarchy - var qrHierarchy bool - - if o.Hierarchy != nil { - qrHierarchy = *o.Hierarchy - } - qHierarchy := swag.FormatBool(qrHierarchy) - if qHierarchy != "" { - - if err := r.SetQueryParam("hierarchy", qHierarchy); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeSelf != nil { - - // query param includeSelf - var qrIncludeSelf bool - - if o.IncludeSelf != nil { - qrIncludeSelf = *o.IncludeSelf - } - qIncludeSelf := swag.FormatBool(qrIncludeSelf) - if qIncludeSelf != "" { - - if err := r.SetQueryParam("includeSelf", qIncludeSelf); err != nil { - return err - } - } - } - - if o.Properties != nil { - - // binding items for properties - joinedProperties := o.bindParamProperties(reg) - - // query array param properties - if err := r.SetQueryParam("properties", joinedProperties...); err != nil { - return err - } - } - - if o.SkipInvalidIds != nil { - - // query param skipInvalidIds - var qrSkipInvalidIds bool - - if o.SkipInvalidIds != nil { - qrSkipInvalidIds = *o.SkipInvalidIds - } - qSkipInvalidIds := swag.FormatBool(qrSkipInvalidIds) - if qSkipInvalidIds != "" { - - if err := r.SetQueryParam("skipInvalidIds", qSkipInvalidIds); err != nil { - return err - } - } - } - - if o.Status != nil { - - // binding items for status - joinedStatus := o.bindParamStatus(reg) - - // query array param status - if err := r.SetQueryParam("status", joinedStatus...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTenants binds the parameter ids -func (o *GetTenantsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetTenants binds the parameter properties -func (o *GetTenantsParams) bindParamProperties(formats strfmt.Registry) []string { - propertiesIR := o.Properties - - var propertiesIC []string - for _, propertiesIIR := range propertiesIR { // explode []string - - propertiesIIV := propertiesIIR // string as string - propertiesIC = append(propertiesIC, propertiesIIV) - } - - // items.CollectionFormat: "" - propertiesIS := swag.JoinByFormat(propertiesIC, "") - - return propertiesIS -} - -// bindParamGetTenants binds the parameter status -func (o *GetTenantsParams) bindParamStatus(formats strfmt.Registry) []string { - statusIR := o.Status - - var statusIC []string - for _, statusIIR := range statusIR { // explode []string - - statusIIV := statusIIR // string as string - statusIC = append(statusIC, statusIIV) - } - - // items.CollectionFormat: "" - statusIS := swag.JoinByFormat(statusIC, "") - - return statusIS -} diff --git a/v1/client/tenant/get_tenants_proxies_parameters.go b/v1/client/tenant/get_tenants_proxies_parameters.go deleted file mode 100644 index 65dd3f4a..00000000 --- a/v1/client/tenant/get_tenants_proxies_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/go-openapi/swag" -) - -// NewGetTenantsProxiesParams creates a new GetTenantsProxiesParams 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 NewGetTenantsProxiesParams() *GetTenantsProxiesParams { - return &GetTenantsProxiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantsProxiesParamsWithTimeout creates a new GetTenantsProxiesParams object -// with the ability to set a timeout on a request. -func NewGetTenantsProxiesParamsWithTimeout(timeout time.Duration) *GetTenantsProxiesParams { - return &GetTenantsProxiesParams{ - timeout: timeout, - } -} - -// NewGetTenantsProxiesParamsWithContext creates a new GetTenantsProxiesParams object -// with the ability to set a context for a request. -func NewGetTenantsProxiesParamsWithContext(ctx context.Context) *GetTenantsProxiesParams { - return &GetTenantsProxiesParams{ - Context: ctx, - } -} - -// NewGetTenantsProxiesParamsWithHTTPClient creates a new GetTenantsProxiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantsProxiesParamsWithHTTPClient(client *http.Client) *GetTenantsProxiesParams { - return &GetTenantsProxiesParams{ - HTTPClient: client, - } -} - -/* -GetTenantsProxiesParams contains all the parameters to send to the API endpoint - - for the get tenants proxies operation. - - Typically these are written to a http.Request. -*/ -type GetTenantsProxiesParams struct { - - // Ids. - Ids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenants proxies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsProxiesParams) WithDefaults() *GetTenantsProxiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenants proxies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsProxiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenants proxies params -func (o *GetTenantsProxiesParams) WithTimeout(timeout time.Duration) *GetTenantsProxiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenants proxies params -func (o *GetTenantsProxiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenants proxies params -func (o *GetTenantsProxiesParams) WithContext(ctx context.Context) *GetTenantsProxiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenants proxies params -func (o *GetTenantsProxiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenants proxies params -func (o *GetTenantsProxiesParams) WithHTTPClient(client *http.Client) *GetTenantsProxiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenants proxies params -func (o *GetTenantsProxiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get tenants proxies params -func (o *GetTenantsProxiesParams) WithIds(ids []string) *GetTenantsProxiesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get tenants proxies params -func (o *GetTenantsProxiesParams) SetIds(ids []string) { - o.Ids = ids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantsProxiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTenantsProxies binds the parameter ids -func (o *GetTenantsProxiesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v1/client/tenant/get_tenants_proxies_responses.go b/v1/client/tenant/get_tenants_proxies_responses.go deleted file mode 100644 index c1537bc6..00000000 --- a/v1/client/tenant/get_tenants_proxies_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTenantsProxiesReader is a Reader for the GetTenantsProxies structure. -type GetTenantsProxiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantsProxiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantsProxiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantsProxiesDefault(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 - } -} - -// NewGetTenantsProxiesOK creates a GetTenantsProxiesOK with default headers values -func NewGetTenantsProxiesOK() *GetTenantsProxiesOK { - return &GetTenantsProxiesOK{} -} - -/* -GetTenantsProxiesOK describes a response with status code 200, with default header values. - -Get Tenants Proxies Response. -*/ -type GetTenantsProxiesOK struct { - Payload []*models.TenantProxy -} - -// IsSuccess returns true when this get tenants proxies o k response has a 2xx status code -func (o *GetTenantsProxiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenants proxies o k response has a 3xx status code -func (o *GetTenantsProxiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenants proxies o k response has a 4xx status code -func (o *GetTenantsProxiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenants proxies o k response has a 5xx status code -func (o *GetTenantsProxiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenants proxies o k response a status code equal to that given -func (o *GetTenantsProxiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenants proxies o k response -func (o *GetTenantsProxiesOK) Code() int { - return 200 -} - -func (o *GetTenantsProxiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxies][%d] getTenantsProxiesOK %s", 200, payload) -} - -func (o *GetTenantsProxiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxies][%d] getTenantsProxiesOK %s", 200, payload) -} - -func (o *GetTenantsProxiesOK) GetPayload() []*models.TenantProxy { - return o.Payload -} - -func (o *GetTenantsProxiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantsProxiesDefault creates a GetTenantsProxiesDefault with default headers values -func NewGetTenantsProxiesDefault(code int) *GetTenantsProxiesDefault { - return &GetTenantsProxiesDefault{ - _statusCode: code, - } -} - -/* -GetTenantsProxiesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantsProxiesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get tenants proxies default response has a 2xx status code -func (o *GetTenantsProxiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenants proxies default response has a 3xx status code -func (o *GetTenantsProxiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenants proxies default response has a 4xx status code -func (o *GetTenantsProxiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenants proxies default response has a 5xx status code -func (o *GetTenantsProxiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenants proxies default response a status code equal to that given -func (o *GetTenantsProxiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenants proxies default response -func (o *GetTenantsProxiesDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantsProxiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxies][%d] GetTenantsProxies default %s", o._statusCode, payload) -} - -func (o *GetTenantsProxiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxies][%d] GetTenantsProxies default %s", o._statusCode, payload) -} - -func (o *GetTenantsProxiesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTenantsProxiesDefault) 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/tenant/get_tenants_proxy_config_parameters.go b/v1/client/tenant/get_tenants_proxy_config_parameters.go deleted file mode 100644 index f98b7c06..00000000 --- a/v1/client/tenant/get_tenants_proxy_config_parameters.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/go-openapi/swag" -) - -// NewGetTenantsProxyConfigParams creates a new GetTenantsProxyConfigParams 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 NewGetTenantsProxyConfigParams() *GetTenantsProxyConfigParams { - return &GetTenantsProxyConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantsProxyConfigParamsWithTimeout creates a new GetTenantsProxyConfigParams object -// with the ability to set a timeout on a request. -func NewGetTenantsProxyConfigParamsWithTimeout(timeout time.Duration) *GetTenantsProxyConfigParams { - return &GetTenantsProxyConfigParams{ - timeout: timeout, - } -} - -// NewGetTenantsProxyConfigParamsWithContext creates a new GetTenantsProxyConfigParams object -// with the ability to set a context for a request. -func NewGetTenantsProxyConfigParamsWithContext(ctx context.Context) *GetTenantsProxyConfigParams { - return &GetTenantsProxyConfigParams{ - Context: ctx, - } -} - -// NewGetTenantsProxyConfigParamsWithHTTPClient creates a new GetTenantsProxyConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantsProxyConfigParamsWithHTTPClient(client *http.Client) *GetTenantsProxyConfigParams { - return &GetTenantsProxyConfigParams{ - HTTPClient: client, - } -} - -/* -GetTenantsProxyConfigParams contains all the parameters to send to the API endpoint - - for the get tenants proxy config operation. - - Typically these are written to a http.Request. -*/ -type GetTenantsProxyConfigParams struct { - - /* ConnectionID. - - Specifies the id of the connection. - - Format: int64 - */ - ConnectionID *int64 - - /* ID. - - Specifies the id of the tenant. - */ - ID *string - - /* ValidateOnly. - - Specifies whether to only validate the config request. - */ - ValidateOnly *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenants proxy config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsProxyConfigParams) WithDefaults() *GetTenantsProxyConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenants proxy config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantsProxyConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithTimeout(timeout time.Duration) *GetTenantsProxyConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithContext(ctx context.Context) *GetTenantsProxyConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithHTTPClient(client *http.Client) *GetTenantsProxyConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConnectionID adds the connectionID to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithConnectionID(connectionID *int64) *GetTenantsProxyConfigParams { - o.SetConnectionID(connectionID) - return o -} - -// SetConnectionID adds the connectionId to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetConnectionID(connectionID *int64) { - o.ConnectionID = connectionID -} - -// WithID adds the id to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithID(id *string) *GetTenantsProxyConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetID(id *string) { - o.ID = id -} - -// WithValidateOnly adds the validateOnly to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) WithValidateOnly(validateOnly *bool) *GetTenantsProxyConfigParams { - o.SetValidateOnly(validateOnly) - return o -} - -// SetValidateOnly adds the validateOnly to the get tenants proxy config params -func (o *GetTenantsProxyConfigParams) SetValidateOnly(validateOnly *bool) { - o.ValidateOnly = validateOnly -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantsProxyConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ConnectionID != nil { - - // query param connectionId - var qrConnectionID int64 - - if o.ConnectionID != nil { - qrConnectionID = *o.ConnectionID - } - qConnectionID := swag.FormatInt64(qrConnectionID) - if qConnectionID != "" { - - if err := r.SetQueryParam("connectionId", qConnectionID); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.ValidateOnly != nil { - - // query param validateOnly - var qrValidateOnly bool - - if o.ValidateOnly != nil { - qrValidateOnly = *o.ValidateOnly - } - qValidateOnly := swag.FormatBool(qrValidateOnly) - if qValidateOnly != "" { - - if err := r.SetQueryParam("validateOnly", qValidateOnly); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/tenant/get_tenants_proxy_config_responses.go b/v1/client/tenant/get_tenants_proxy_config_responses.go deleted file mode 100644 index 393caa1f..00000000 --- a/v1/client/tenant/get_tenants_proxy_config_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTenantsProxyConfigReader is a Reader for the GetTenantsProxyConfig structure. -type GetTenantsProxyConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantsProxyConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantsProxyConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantsProxyConfigDefault(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 - } -} - -// NewGetTenantsProxyConfigOK creates a GetTenantsProxyConfigOK with default headers values -func NewGetTenantsProxyConfigOK() *GetTenantsProxyConfigOK { - return &GetTenantsProxyConfigOK{} -} - -/* -GetTenantsProxyConfigOK describes a response with status code 200, with default header values. - -Get Tenants Proxy Config Response. -*/ -type GetTenantsProxyConfigOK struct { - Payload []uint8 -} - -// IsSuccess returns true when this get tenants proxy config o k response has a 2xx status code -func (o *GetTenantsProxyConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenants proxy config o k response has a 3xx status code -func (o *GetTenantsProxyConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenants proxy config o k response has a 4xx status code -func (o *GetTenantsProxyConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenants proxy config o k response has a 5xx status code -func (o *GetTenantsProxyConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenants proxy config o k response a status code equal to that given -func (o *GetTenantsProxyConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenants proxy config o k response -func (o *GetTenantsProxyConfigOK) Code() int { - return 200 -} - -func (o *GetTenantsProxyConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/config][%d] getTenantsProxyConfigOK %s", 200, payload) -} - -func (o *GetTenantsProxyConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/config][%d] getTenantsProxyConfigOK %s", 200, payload) -} - -func (o *GetTenantsProxyConfigOK) GetPayload() []uint8 { - return o.Payload -} - -func (o *GetTenantsProxyConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantsProxyConfigDefault creates a GetTenantsProxyConfigDefault with default headers values -func NewGetTenantsProxyConfigDefault(code int) *GetTenantsProxyConfigDefault { - return &GetTenantsProxyConfigDefault{ - _statusCode: code, - } -} - -/* -GetTenantsProxyConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantsProxyConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get tenants proxy config default response has a 2xx status code -func (o *GetTenantsProxyConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenants proxy config default response has a 3xx status code -func (o *GetTenantsProxyConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenants proxy config default response has a 4xx status code -func (o *GetTenantsProxyConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenants proxy config default response has a 5xx status code -func (o *GetTenantsProxyConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenants proxy config default response a status code equal to that given -func (o *GetTenantsProxyConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenants proxy config default response -func (o *GetTenantsProxyConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantsProxyConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/config][%d] GetTenantsProxyConfig default %s", o._statusCode, payload) -} - -func (o *GetTenantsProxyConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants/proxy/config][%d] GetTenantsProxyConfig default %s", o._statusCode, payload) -} - -func (o *GetTenantsProxyConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTenantsProxyConfigDefault) 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/tenant/get_tenants_responses.go b/v1/client/tenant/get_tenants_responses.go deleted file mode 100644 index 0558a3e4..00000000 --- a/v1/client/tenant/get_tenants_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetTenantsReader is a Reader for the GetTenants structure. -type GetTenantsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantsDefault(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 - } -} - -// NewGetTenantsOK creates a GetTenantsOK with default headers values -func NewGetTenantsOK() *GetTenantsOK { - return &GetTenantsOK{} -} - -/* -GetTenantsOK describes a response with status code 200, with default header values. - -Get Tenants Response. -*/ -type GetTenantsOK struct { - Payload []*models.Tenant -} - -// IsSuccess returns true when this get tenants o k response has a 2xx status code -func (o *GetTenantsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenants o k response has a 3xx status code -func (o *GetTenantsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenants o k response has a 4xx status code -func (o *GetTenantsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenants o k response has a 5xx status code -func (o *GetTenantsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenants o k response a status code equal to that given -func (o *GetTenantsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenants o k response -func (o *GetTenantsOK) Code() int { - return 200 -} - -func (o *GetTenantsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants][%d] getTenantsOK %s", 200, payload) -} - -func (o *GetTenantsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants][%d] getTenantsOK %s", 200, payload) -} - -func (o *GetTenantsOK) GetPayload() []*models.Tenant { - return o.Payload -} - -func (o *GetTenantsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantsDefault creates a GetTenantsDefault with default headers values -func NewGetTenantsDefault(code int) *GetTenantsDefault { - return &GetTenantsDefault{ - _statusCode: code, - } -} - -/* -GetTenantsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get tenants default response has a 2xx status code -func (o *GetTenantsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenants default response has a 3xx status code -func (o *GetTenantsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenants default response has a 4xx status code -func (o *GetTenantsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenants default response has a 5xx status code -func (o *GetTenantsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenants default response a status code equal to that given -func (o *GetTenantsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenants default response -func (o *GetTenantsDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants][%d] GetTenants default %s", o._statusCode, payload) -} - -func (o *GetTenantsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/tenants][%d] GetTenants default %s", o._statusCode, payload) -} - -func (o *GetTenantsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetTenantsDefault) 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/tenant/tenant_client.go b/v1/client/tenant/tenant_client.go deleted file mode 100644 index b4c90315..00000000 --- a/v1/client/tenant/tenant_client.go +++ /dev/null @@ -1,795 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new tenant API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new tenant API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new tenant API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for tenant API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateTenant(params *CreateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTenantCreated, error) - - DeleteTenant(params *DeleteTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTenantNoContent, error) - - DownloadTenantsProxy(params *DownloadTenantsProxyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadTenantsProxyOK, error) - - GetTenants(params *GetTenantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsOK, error) - - GetTenantsProxies(params *GetTenantsProxiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsProxiesOK, error) - - GetTenantsProxyConfig(params *GetTenantsProxyConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsProxyConfigOK, error) - - UpdateTenant(params *UpdateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantOK, error) - - UpdateTenantActiveDirectory(params *UpdateTenantActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantActiveDirectoryOK, error) - - UpdateTenantEntity(params *UpdateTenantEntityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantEntityOK, error) - - UpdateTenantGroups(params *UpdateTenantGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantGroupsOK, error) - - UpdateTenantLdapProvider(params *UpdateTenantLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantLdapProviderOK, error) - - UpdateTenantProtectionJob(params *UpdateTenantProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantProtectionJobOK, error) - - UpdateTenantProtectionPolicy(params *UpdateTenantProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantProtectionPolicyOK, error) - - UpdateTenantUsers(params *UpdateTenantUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantUsersOK, error) - - UpdateTenantView(params *UpdateTenantViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantViewOK, error) - - UpdateTenantViewBox(params *UpdateTenantViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantViewBoxOK, error) - - UpdateTenantVlan(params *UpdateTenantVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantVlanOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateTenant creates add a new tenant to the cohesity cluster - - A tenant is required to support MultiTenant architecture for service provider - -(SP) to facilitate data and view segregations in the Cohesity Dashboard. - -Returns the created/added tenant. -*/ -func (a *Client) CreateTenant(params *CreateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTenantCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTenantParams() - } - op := &runtime.ClientOperation{ - ID: "CreateTenant", - Method: "POST", - PathPattern: "/public/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateTenantReader{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.(*CreateTenantCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteTenant deletes an existing tenant on the cohesity cluster - -Returns success if the specified tenant is deleted. -*/ -func (a *Client) DeleteTenant(params *DeleteTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTenantNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteTenantParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteTenant", - Method: "DELETE", - PathPattern: "/public/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteTenantReader{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.(*DeleteTenantNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadTenantsProxy downloads the tenants proxy - -Returns the tenant proxy to be downloaded. -*/ -func (a *Client) DownloadTenantsProxy(params *DownloadTenantsProxyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadTenantsProxyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadTenantsProxyParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadTenantsProxy", - Method: "GET", - PathPattern: "/public/tenants/proxy/image", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadTenantsProxyReader{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.(*DownloadTenantsProxyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadTenantsProxyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenants lists the tenants on the cohesity cluster filtered by tenant ID prefixed to list tenants for the respective tenant admin - -Returns the list of tenants. -*/ -func (a *Client) GetTenants(params *GetTenantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenants", - Method: "GET", - PathPattern: "/public/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantsReader{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.(*GetTenantsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenantsProxies lists proxies for tenant which are running within tenant s environment - -Returns the list of proxies. -*/ -func (a *Client) GetTenantsProxies(params *GetTenantsProxiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsProxiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantsProxiesParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenantsProxies", - Method: "GET", - PathPattern: "/public/tenants/proxies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantsProxiesReader{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.(*GetTenantsProxiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantsProxiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenantsProxyConfig gets proxy config for tenant - -Returns the config for tenants proxy. -*/ -func (a *Client) GetTenantsProxyConfig(params *GetTenantsProxyConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantsProxyConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantsProxyConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenantsProxyConfig", - Method: "GET", - PathPattern: "/public/tenants/proxy/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantsProxyConfigReader{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.(*GetTenantsProxyConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantsProxyConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenant updates an existing tenant on the cohesity cluster - -Returns the tenant that was updated on the Cohesity Cluster. -*/ -func (a *Client) UpdateTenant(params *UpdateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenant", - Method: "PUT", - PathPattern: "/public/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantReader{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.(*UpdateTenantOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantActiveDirectory updates active directory for an existing tenant on the cohesity cluster - - Returns success if the update for Active Directory is successful for specified - -tenant. -*/ -func (a *Client) UpdateTenantActiveDirectory(params *UpdateTenantActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantActiveDirectoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantActiveDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantActiveDirectory", - Method: "PUT", - PathPattern: "/public/tenants/activeDirectory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantActiveDirectoryReader{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.(*UpdateTenantActiveDirectoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantActiveDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantEntity updates entity permission for an existing tenant on the cohesity cluster - - Returns success if the update for entity permission data is successful for - -specified tenant. -*/ -func (a *Client) UpdateTenantEntity(params *UpdateTenantEntityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantEntityOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantEntityParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantEntity", - Method: "PUT", - PathPattern: "/public/tenants/entity", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantEntityReader{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.(*UpdateTenantEntityOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantEntityDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenantGroups updates existing groups to an existing tenant on the cohesity cluster - -Returns success if the update for groups is successful for specified tenant. -*/ -func (a *Client) UpdateTenantGroups(params *UpdateTenantGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantGroups", - Method: "PUT", - PathPattern: "/public/tenants/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantGroupsReader{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.(*UpdateTenantGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantLdapProvider updates ldap providers for an existing tenant on the cohesity cluster - - Returns success if the update for Ldap Providers is successful for specified - -tenant. -*/ -func (a *Client) UpdateTenantLdapProvider(params *UpdateTenantLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantLdapProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantLdapProvider", - Method: "PUT", - PathPattern: "/public/tenants/ldapProvider", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantLdapProviderReader{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.(*UpdateTenantLdapProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantProtectionJob updates protection job for an existing tenant on the cohesity cluster - - Returns success if the update for protection job is successful for specified - -tenant. -*/ -func (a *Client) UpdateTenantProtectionJob(params *UpdateTenantProtectionJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantProtectionJobOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantProtectionJobParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantProtectionJob", - Method: "PUT", - PathPattern: "/public/tenants/protectionJob", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantProtectionJobReader{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.(*UpdateTenantProtectionJobOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantProtectionJobDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantProtectionPolicy updates protection policy permission for an existing tenant on the cohesity cluster - - Returns success if the update for protection policy permission data is - -successful for the specified tenant. -*/ -func (a *Client) UpdateTenantProtectionPolicy(params *UpdateTenantProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantProtectionPolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantProtectionPolicy", - Method: "PUT", - PathPattern: "/public/tenants/policy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantProtectionPolicyReader{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.(*UpdateTenantProtectionPolicyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantProtectionPolicyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenantUsers updates existing users to an existing tenant on the cohesity cluster - -Returns success if the update for users data is successful for specified tenant. -*/ -func (a *Client) UpdateTenantUsers(params *UpdateTenantUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantUsersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantUsersParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantUsers", - Method: "PUT", - PathPattern: "/public/tenants/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantUsersReader{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.(*UpdateTenantUsersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantView updates views permission for an existing tenant on the cohesity cluster - - Returns success if the update for views permission data is successful for - -specified tenant. -*/ -func (a *Client) UpdateTenantView(params *UpdateTenantViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantViewOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantViewParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantView", - Method: "PUT", - PathPattern: "/public/tenants/view", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantViewReader{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.(*UpdateTenantViewOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateTenantViewBox updates view box for an existing tenant on the cohesity cluster - - Returns success if the update for view box data is successful for specified - -tenant. -*/ -func (a *Client) UpdateTenantViewBox(params *UpdateTenantViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantViewBoxOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantViewBoxParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantViewBox", - Method: "PUT", - PathPattern: "/public/tenants/viewBox", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantViewBoxReader{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.(*UpdateTenantViewBoxOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantViewBoxDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenantVlan updates vlan for an existing tenant on the cohesity cluster - -Returns success if the update for vlan data is successful for specified tenant. -*/ -func (a *Client) UpdateTenantVlan(params *UpdateTenantVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantVlanOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantVlanParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantVlan", - Method: "PUT", - PathPattern: "/public/tenants/vlan", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantVlanReader{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.(*UpdateTenantVlanOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantVlanDefault) - 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/tenant/update_tenant_active_directory_parameters.go b/v1/client/tenant/update_tenant_active_directory_parameters.go deleted file mode 100644 index 361fa951..00000000 --- a/v1/client/tenant/update_tenant_active_directory_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantActiveDirectoryParams creates a new UpdateTenantActiveDirectoryParams 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 NewUpdateTenantActiveDirectoryParams() *UpdateTenantActiveDirectoryParams { - return &UpdateTenantActiveDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantActiveDirectoryParamsWithTimeout creates a new UpdateTenantActiveDirectoryParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantActiveDirectoryParamsWithTimeout(timeout time.Duration) *UpdateTenantActiveDirectoryParams { - return &UpdateTenantActiveDirectoryParams{ - timeout: timeout, - } -} - -// NewUpdateTenantActiveDirectoryParamsWithContext creates a new UpdateTenantActiveDirectoryParams object -// with the ability to set a context for a request. -func NewUpdateTenantActiveDirectoryParamsWithContext(ctx context.Context) *UpdateTenantActiveDirectoryParams { - return &UpdateTenantActiveDirectoryParams{ - Context: ctx, - } -} - -// NewUpdateTenantActiveDirectoryParamsWithHTTPClient creates a new UpdateTenantActiveDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantActiveDirectoryParamsWithHTTPClient(client *http.Client) *UpdateTenantActiveDirectoryParams { - return &UpdateTenantActiveDirectoryParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantActiveDirectoryParams contains all the parameters to send to the API endpoint - - for the update tenant active directory operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantActiveDirectoryParams struct { - - /* Body. - - Request to update existing active directories. - */ - Body *models.TenantActiveDirectoryUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantActiveDirectoryParams) WithDefaults() *UpdateTenantActiveDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantActiveDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) WithTimeout(timeout time.Duration) *UpdateTenantActiveDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) WithContext(ctx context.Context) *UpdateTenantActiveDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) WithHTTPClient(client *http.Client) *UpdateTenantActiveDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) WithBody(body *models.TenantActiveDirectoryUpdateParameters) *UpdateTenantActiveDirectoryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant active directory params -func (o *UpdateTenantActiveDirectoryParams) SetBody(body *models.TenantActiveDirectoryUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantActiveDirectoryParams) 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/tenant/update_tenant_active_directory_responses.go b/v1/client/tenant/update_tenant_active_directory_responses.go deleted file mode 100644 index 17c13bb1..00000000 --- a/v1/client/tenant/update_tenant_active_directory_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantActiveDirectoryReader is a Reader for the UpdateTenantActiveDirectory structure. -type UpdateTenantActiveDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantActiveDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantActiveDirectoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantActiveDirectoryDefault(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 - } -} - -// NewUpdateTenantActiveDirectoryOK creates a UpdateTenantActiveDirectoryOK with default headers values -func NewUpdateTenantActiveDirectoryOK() *UpdateTenantActiveDirectoryOK { - return &UpdateTenantActiveDirectoryOK{} -} - -/* -UpdateTenantActiveDirectoryOK describes a response with status code 200, with default header values. - -Tenant Active Directory Mapping Response. -*/ -type UpdateTenantActiveDirectoryOK struct { - Payload *models.TenantActiveDirectoryUpdate -} - -// IsSuccess returns true when this update tenant active directory o k response has a 2xx status code -func (o *UpdateTenantActiveDirectoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant active directory o k response has a 3xx status code -func (o *UpdateTenantActiveDirectoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant active directory o k response has a 4xx status code -func (o *UpdateTenantActiveDirectoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant active directory o k response has a 5xx status code -func (o *UpdateTenantActiveDirectoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant active directory o k response a status code equal to that given -func (o *UpdateTenantActiveDirectoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant active directory o k response -func (o *UpdateTenantActiveDirectoryOK) Code() int { - return 200 -} - -func (o *UpdateTenantActiveDirectoryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/activeDirectory][%d] updateTenantActiveDirectoryOK %s", 200, payload) -} - -func (o *UpdateTenantActiveDirectoryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/activeDirectory][%d] updateTenantActiveDirectoryOK %s", 200, payload) -} - -func (o *UpdateTenantActiveDirectoryOK) GetPayload() *models.TenantActiveDirectoryUpdate { - return o.Payload -} - -func (o *UpdateTenantActiveDirectoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantActiveDirectoryUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantActiveDirectoryDefault creates a UpdateTenantActiveDirectoryDefault with default headers values -func NewUpdateTenantActiveDirectoryDefault(code int) *UpdateTenantActiveDirectoryDefault { - return &UpdateTenantActiveDirectoryDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantActiveDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantActiveDirectoryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant active directory default response has a 2xx status code -func (o *UpdateTenantActiveDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant active directory default response has a 3xx status code -func (o *UpdateTenantActiveDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant active directory default response has a 4xx status code -func (o *UpdateTenantActiveDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant active directory default response has a 5xx status code -func (o *UpdateTenantActiveDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant active directory default response a status code equal to that given -func (o *UpdateTenantActiveDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant active directory default response -func (o *UpdateTenantActiveDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantActiveDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/activeDirectory][%d] UpdateTenantActiveDirectory default %s", o._statusCode, payload) -} - -func (o *UpdateTenantActiveDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/activeDirectory][%d] UpdateTenantActiveDirectory default %s", o._statusCode, payload) -} - -func (o *UpdateTenantActiveDirectoryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantActiveDirectoryDefault) 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/tenant/update_tenant_entity_parameters.go b/v1/client/tenant/update_tenant_entity_parameters.go deleted file mode 100644 index e8a5d7eb..00000000 --- a/v1/client/tenant/update_tenant_entity_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantEntityParams creates a new UpdateTenantEntityParams 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 NewUpdateTenantEntityParams() *UpdateTenantEntityParams { - return &UpdateTenantEntityParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantEntityParamsWithTimeout creates a new UpdateTenantEntityParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantEntityParamsWithTimeout(timeout time.Duration) *UpdateTenantEntityParams { - return &UpdateTenantEntityParams{ - timeout: timeout, - } -} - -// NewUpdateTenantEntityParamsWithContext creates a new UpdateTenantEntityParams object -// with the ability to set a context for a request. -func NewUpdateTenantEntityParamsWithContext(ctx context.Context) *UpdateTenantEntityParams { - return &UpdateTenantEntityParams{ - Context: ctx, - } -} - -// NewUpdateTenantEntityParamsWithHTTPClient creates a new UpdateTenantEntityParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantEntityParamsWithHTTPClient(client *http.Client) *UpdateTenantEntityParams { - return &UpdateTenantEntityParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantEntityParams contains all the parameters to send to the API endpoint - - for the update tenant entity operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantEntityParams struct { - - /* Body. - - Request to associate entity for tenant. - */ - Body *models.TenantEntityUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant entity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantEntityParams) WithDefaults() *UpdateTenantEntityParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant entity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantEntityParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant entity params -func (o *UpdateTenantEntityParams) WithTimeout(timeout time.Duration) *UpdateTenantEntityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant entity params -func (o *UpdateTenantEntityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant entity params -func (o *UpdateTenantEntityParams) WithContext(ctx context.Context) *UpdateTenantEntityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant entity params -func (o *UpdateTenantEntityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant entity params -func (o *UpdateTenantEntityParams) WithHTTPClient(client *http.Client) *UpdateTenantEntityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant entity params -func (o *UpdateTenantEntityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant entity params -func (o *UpdateTenantEntityParams) WithBody(body *models.TenantEntityUpdateParameters) *UpdateTenantEntityParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant entity params -func (o *UpdateTenantEntityParams) SetBody(body *models.TenantEntityUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantEntityParams) 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/tenant/update_tenant_entity_responses.go b/v1/client/tenant/update_tenant_entity_responses.go deleted file mode 100644 index dc890b6c..00000000 --- a/v1/client/tenant/update_tenant_entity_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantEntityReader is a Reader for the UpdateTenantEntity structure. -type UpdateTenantEntityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantEntityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantEntityOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantEntityDefault(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 - } -} - -// NewUpdateTenantEntityOK creates a UpdateTenantEntityOK with default headers values -func NewUpdateTenantEntityOK() *UpdateTenantEntityOK { - return &UpdateTenantEntityOK{} -} - -/* -UpdateTenantEntityOK describes a response with status code 200, with default header values. - -Tenant Entity Update Response. -*/ -type UpdateTenantEntityOK struct { - Payload *models.TenantEntityUpdate -} - -// IsSuccess returns true when this update tenant entity o k response has a 2xx status code -func (o *UpdateTenantEntityOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant entity o k response has a 3xx status code -func (o *UpdateTenantEntityOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant entity o k response has a 4xx status code -func (o *UpdateTenantEntityOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant entity o k response has a 5xx status code -func (o *UpdateTenantEntityOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant entity o k response a status code equal to that given -func (o *UpdateTenantEntityOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant entity o k response -func (o *UpdateTenantEntityOK) Code() int { - return 200 -} - -func (o *UpdateTenantEntityOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/entity][%d] updateTenantEntityOK %s", 200, payload) -} - -func (o *UpdateTenantEntityOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/entity][%d] updateTenantEntityOK %s", 200, payload) -} - -func (o *UpdateTenantEntityOK) GetPayload() *models.TenantEntityUpdate { - return o.Payload -} - -func (o *UpdateTenantEntityOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantEntityUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantEntityDefault creates a UpdateTenantEntityDefault with default headers values -func NewUpdateTenantEntityDefault(code int) *UpdateTenantEntityDefault { - return &UpdateTenantEntityDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantEntityDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantEntityDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant entity default response has a 2xx status code -func (o *UpdateTenantEntityDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant entity default response has a 3xx status code -func (o *UpdateTenantEntityDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant entity default response has a 4xx status code -func (o *UpdateTenantEntityDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant entity default response has a 5xx status code -func (o *UpdateTenantEntityDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant entity default response a status code equal to that given -func (o *UpdateTenantEntityDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant entity default response -func (o *UpdateTenantEntityDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantEntityDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/entity][%d] UpdateTenantEntity default %s", o._statusCode, payload) -} - -func (o *UpdateTenantEntityDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/entity][%d] UpdateTenantEntity default %s", o._statusCode, payload) -} - -func (o *UpdateTenantEntityDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantEntityDefault) 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/tenant/update_tenant_groups_parameters.go b/v1/client/tenant/update_tenant_groups_parameters.go deleted file mode 100644 index 3e31d1e1..00000000 --- a/v1/client/tenant/update_tenant_groups_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantGroupsParams creates a new UpdateTenantGroupsParams 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 NewUpdateTenantGroupsParams() *UpdateTenantGroupsParams { - return &UpdateTenantGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantGroupsParamsWithTimeout creates a new UpdateTenantGroupsParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantGroupsParamsWithTimeout(timeout time.Duration) *UpdateTenantGroupsParams { - return &UpdateTenantGroupsParams{ - timeout: timeout, - } -} - -// NewUpdateTenantGroupsParamsWithContext creates a new UpdateTenantGroupsParams object -// with the ability to set a context for a request. -func NewUpdateTenantGroupsParamsWithContext(ctx context.Context) *UpdateTenantGroupsParams { - return &UpdateTenantGroupsParams{ - Context: ctx, - } -} - -// NewUpdateTenantGroupsParamsWithHTTPClient creates a new UpdateTenantGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantGroupsParamsWithHTTPClient(client *http.Client) *UpdateTenantGroupsParams { - return &UpdateTenantGroupsParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantGroupsParams contains all the parameters to send to the API endpoint - - for the update tenant groups operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantGroupsParams struct { - - /* Body. - - Request to update existing tenant groups. - */ - Body *models.TenantGroupUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantGroupsParams) WithDefaults() *UpdateTenantGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant groups params -func (o *UpdateTenantGroupsParams) WithTimeout(timeout time.Duration) *UpdateTenantGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant groups params -func (o *UpdateTenantGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant groups params -func (o *UpdateTenantGroupsParams) WithContext(ctx context.Context) *UpdateTenantGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant groups params -func (o *UpdateTenantGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant groups params -func (o *UpdateTenantGroupsParams) WithHTTPClient(client *http.Client) *UpdateTenantGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant groups params -func (o *UpdateTenantGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant groups params -func (o *UpdateTenantGroupsParams) WithBody(body *models.TenantGroupUpdateParameters) *UpdateTenantGroupsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant groups params -func (o *UpdateTenantGroupsParams) SetBody(body *models.TenantGroupUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantGroupsParams) 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/tenant/update_tenant_groups_responses.go b/v1/client/tenant/update_tenant_groups_responses.go deleted file mode 100644 index a013be2b..00000000 --- a/v1/client/tenant/update_tenant_groups_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantGroupsReader is a Reader for the UpdateTenantGroups structure. -type UpdateTenantGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantGroupsDefault(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 - } -} - -// NewUpdateTenantGroupsOK creates a UpdateTenantGroupsOK with default headers values -func NewUpdateTenantGroupsOK() *UpdateTenantGroupsOK { - return &UpdateTenantGroupsOK{} -} - -/* -UpdateTenantGroupsOK describes a response with status code 200, with default header values. - -Tenant Group Mapping Response. -*/ -type UpdateTenantGroupsOK struct { - Payload []*models.Group -} - -// IsSuccess returns true when this update tenant groups o k response has a 2xx status code -func (o *UpdateTenantGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant groups o k response has a 3xx status code -func (o *UpdateTenantGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant groups o k response has a 4xx status code -func (o *UpdateTenantGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant groups o k response has a 5xx status code -func (o *UpdateTenantGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant groups o k response a status code equal to that given -func (o *UpdateTenantGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant groups o k response -func (o *UpdateTenantGroupsOK) Code() int { - return 200 -} - -func (o *UpdateTenantGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/groups][%d] updateTenantGroupsOK %s", 200, payload) -} - -func (o *UpdateTenantGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/groups][%d] updateTenantGroupsOK %s", 200, payload) -} - -func (o *UpdateTenantGroupsOK) GetPayload() []*models.Group { - return o.Payload -} - -func (o *UpdateTenantGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantGroupsDefault creates a UpdateTenantGroupsDefault with default headers values -func NewUpdateTenantGroupsDefault(code int) *UpdateTenantGroupsDefault { - return &UpdateTenantGroupsDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantGroupsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant groups default response has a 2xx status code -func (o *UpdateTenantGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant groups default response has a 3xx status code -func (o *UpdateTenantGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant groups default response has a 4xx status code -func (o *UpdateTenantGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant groups default response has a 5xx status code -func (o *UpdateTenantGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant groups default response a status code equal to that given -func (o *UpdateTenantGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant groups default response -func (o *UpdateTenantGroupsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/groups][%d] UpdateTenantGroups default %s", o._statusCode, payload) -} - -func (o *UpdateTenantGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/groups][%d] UpdateTenantGroups default %s", o._statusCode, payload) -} - -func (o *UpdateTenantGroupsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantGroupsDefault) 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/tenant/update_tenant_ldap_provider_parameters.go b/v1/client/tenant/update_tenant_ldap_provider_parameters.go deleted file mode 100644 index c7121610..00000000 --- a/v1/client/tenant/update_tenant_ldap_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantLdapProviderParams creates a new UpdateTenantLdapProviderParams 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 NewUpdateTenantLdapProviderParams() *UpdateTenantLdapProviderParams { - return &UpdateTenantLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantLdapProviderParamsWithTimeout creates a new UpdateTenantLdapProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantLdapProviderParamsWithTimeout(timeout time.Duration) *UpdateTenantLdapProviderParams { - return &UpdateTenantLdapProviderParams{ - timeout: timeout, - } -} - -// NewUpdateTenantLdapProviderParamsWithContext creates a new UpdateTenantLdapProviderParams object -// with the ability to set a context for a request. -func NewUpdateTenantLdapProviderParamsWithContext(ctx context.Context) *UpdateTenantLdapProviderParams { - return &UpdateTenantLdapProviderParams{ - Context: ctx, - } -} - -// NewUpdateTenantLdapProviderParamsWithHTTPClient creates a new UpdateTenantLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantLdapProviderParamsWithHTTPClient(client *http.Client) *UpdateTenantLdapProviderParams { - return &UpdateTenantLdapProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantLdapProviderParams contains all the parameters to send to the API endpoint - - for the update tenant ldap provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantLdapProviderParams struct { - - /* Body. - - Request to update existing ldap providers. - */ - Body *models.TenantLdapProviderUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantLdapProviderParams) WithDefaults() *UpdateTenantLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) WithTimeout(timeout time.Duration) *UpdateTenantLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) WithContext(ctx context.Context) *UpdateTenantLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) WithHTTPClient(client *http.Client) *UpdateTenantLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) WithBody(body *models.TenantLdapProviderUpdateParameters) *UpdateTenantLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant ldap provider params -func (o *UpdateTenantLdapProviderParams) SetBody(body *models.TenantLdapProviderUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantLdapProviderParams) 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/tenant/update_tenant_ldap_provider_responses.go b/v1/client/tenant/update_tenant_ldap_provider_responses.go deleted file mode 100644 index 16772569..00000000 --- a/v1/client/tenant/update_tenant_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantLdapProviderReader is a Reader for the UpdateTenantLdapProvider structure. -type UpdateTenantLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantLdapProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantLdapProviderDefault(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 - } -} - -// NewUpdateTenantLdapProviderOK creates a UpdateTenantLdapProviderOK with default headers values -func NewUpdateTenantLdapProviderOK() *UpdateTenantLdapProviderOK { - return &UpdateTenantLdapProviderOK{} -} - -/* -UpdateTenantLdapProviderOK describes a response with status code 200, with default header values. - -Tenant Ldap Provider Mapping Response. -*/ -type UpdateTenantLdapProviderOK struct { - Payload *models.TenantLdapProviderUpdate -} - -// IsSuccess returns true when this update tenant ldap provider o k response has a 2xx status code -func (o *UpdateTenantLdapProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant ldap provider o k response has a 3xx status code -func (o *UpdateTenantLdapProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant ldap provider o k response has a 4xx status code -func (o *UpdateTenantLdapProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant ldap provider o k response has a 5xx status code -func (o *UpdateTenantLdapProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant ldap provider o k response a status code equal to that given -func (o *UpdateTenantLdapProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant ldap provider o k response -func (o *UpdateTenantLdapProviderOK) Code() int { - return 200 -} - -func (o *UpdateTenantLdapProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/ldapProvider][%d] updateTenantLdapProviderOK %s", 200, payload) -} - -func (o *UpdateTenantLdapProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/ldapProvider][%d] updateTenantLdapProviderOK %s", 200, payload) -} - -func (o *UpdateTenantLdapProviderOK) GetPayload() *models.TenantLdapProviderUpdate { - return o.Payload -} - -func (o *UpdateTenantLdapProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantLdapProviderUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantLdapProviderDefault creates a UpdateTenantLdapProviderDefault with default headers values -func NewUpdateTenantLdapProviderDefault(code int) *UpdateTenantLdapProviderDefault { - return &UpdateTenantLdapProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantLdapProviderDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant ldap provider default response has a 2xx status code -func (o *UpdateTenantLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant ldap provider default response has a 3xx status code -func (o *UpdateTenantLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant ldap provider default response has a 4xx status code -func (o *UpdateTenantLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant ldap provider default response has a 5xx status code -func (o *UpdateTenantLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant ldap provider default response a status code equal to that given -func (o *UpdateTenantLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant ldap provider default response -func (o *UpdateTenantLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/ldapProvider][%d] UpdateTenantLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateTenantLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/ldapProvider][%d] UpdateTenantLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateTenantLdapProviderDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantLdapProviderDefault) 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/tenant/update_tenant_parameters.go b/v1/client/tenant/update_tenant_parameters.go deleted file mode 100644 index c2d56f96..00000000 --- a/v1/client/tenant/update_tenant_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantParams creates a new UpdateTenantParams 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 NewUpdateTenantParams() *UpdateTenantParams { - return &UpdateTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantParamsWithTimeout creates a new UpdateTenantParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantParamsWithTimeout(timeout time.Duration) *UpdateTenantParams { - return &UpdateTenantParams{ - timeout: timeout, - } -} - -// NewUpdateTenantParamsWithContext creates a new UpdateTenantParams object -// with the ability to set a context for a request. -func NewUpdateTenantParamsWithContext(ctx context.Context) *UpdateTenantParams { - return &UpdateTenantParams{ - Context: ctx, - } -} - -// NewUpdateTenantParamsWithHTTPClient creates a new UpdateTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantParamsWithHTTPClient(client *http.Client) *UpdateTenantParams { - return &UpdateTenantParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantParams contains all the parameters to send to the API endpoint - - for the update tenant operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantParams struct { - - /* Body. - - Request to update existing tenant. - */ - Body *models.TenantUpdate - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantParams) WithDefaults() *UpdateTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant params -func (o *UpdateTenantParams) WithTimeout(timeout time.Duration) *UpdateTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant params -func (o *UpdateTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant params -func (o *UpdateTenantParams) WithContext(ctx context.Context) *UpdateTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant params -func (o *UpdateTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant params -func (o *UpdateTenantParams) WithHTTPClient(client *http.Client) *UpdateTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant params -func (o *UpdateTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant params -func (o *UpdateTenantParams) WithBody(body *models.TenantUpdate) *UpdateTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant params -func (o *UpdateTenantParams) SetBody(body *models.TenantUpdate) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantParams) 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/tenant/update_tenant_protection_job_parameters.go b/v1/client/tenant/update_tenant_protection_job_parameters.go deleted file mode 100644 index 7940116f..00000000 --- a/v1/client/tenant/update_tenant_protection_job_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantProtectionJobParams creates a new UpdateTenantProtectionJobParams 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 NewUpdateTenantProtectionJobParams() *UpdateTenantProtectionJobParams { - return &UpdateTenantProtectionJobParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantProtectionJobParamsWithTimeout creates a new UpdateTenantProtectionJobParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantProtectionJobParamsWithTimeout(timeout time.Duration) *UpdateTenantProtectionJobParams { - return &UpdateTenantProtectionJobParams{ - timeout: timeout, - } -} - -// NewUpdateTenantProtectionJobParamsWithContext creates a new UpdateTenantProtectionJobParams object -// with the ability to set a context for a request. -func NewUpdateTenantProtectionJobParamsWithContext(ctx context.Context) *UpdateTenantProtectionJobParams { - return &UpdateTenantProtectionJobParams{ - Context: ctx, - } -} - -// NewUpdateTenantProtectionJobParamsWithHTTPClient creates a new UpdateTenantProtectionJobParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantProtectionJobParamsWithHTTPClient(client *http.Client) *UpdateTenantProtectionJobParams { - return &UpdateTenantProtectionJobParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantProtectionJobParams contains all the parameters to send to the API endpoint - - for the update tenant protection job operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantProtectionJobParams struct { - - /* Body. - - Request to update existing protection jobs. - */ - Body *models.TenantProtectionJobUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantProtectionJobParams) WithDefaults() *UpdateTenantProtectionJobParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant protection job params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantProtectionJobParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) WithTimeout(timeout time.Duration) *UpdateTenantProtectionJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) WithContext(ctx context.Context) *UpdateTenantProtectionJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) WithHTTPClient(client *http.Client) *UpdateTenantProtectionJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) WithBody(body *models.TenantProtectionJobUpdateParameters) *UpdateTenantProtectionJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant protection job params -func (o *UpdateTenantProtectionJobParams) SetBody(body *models.TenantProtectionJobUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantProtectionJobParams) 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/tenant/update_tenant_protection_job_responses.go b/v1/client/tenant/update_tenant_protection_job_responses.go deleted file mode 100644 index a372365f..00000000 --- a/v1/client/tenant/update_tenant_protection_job_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantProtectionJobReader is a Reader for the UpdateTenantProtectionJob structure. -type UpdateTenantProtectionJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantProtectionJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantProtectionJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantProtectionJobDefault(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 - } -} - -// NewUpdateTenantProtectionJobOK creates a UpdateTenantProtectionJobOK with default headers values -func NewUpdateTenantProtectionJobOK() *UpdateTenantProtectionJobOK { - return &UpdateTenantProtectionJobOK{} -} - -/* -UpdateTenantProtectionJobOK describes a response with status code 200, with default header values. - -Tenant Protection Job Mapping Response. -*/ -type UpdateTenantProtectionJobOK struct { - Payload *models.TenantProtectionJobUpdate -} - -// IsSuccess returns true when this update tenant protection job o k response has a 2xx status code -func (o *UpdateTenantProtectionJobOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant protection job o k response has a 3xx status code -func (o *UpdateTenantProtectionJobOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant protection job o k response has a 4xx status code -func (o *UpdateTenantProtectionJobOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant protection job o k response has a 5xx status code -func (o *UpdateTenantProtectionJobOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant protection job o k response a status code equal to that given -func (o *UpdateTenantProtectionJobOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant protection job o k response -func (o *UpdateTenantProtectionJobOK) Code() int { - return 200 -} - -func (o *UpdateTenantProtectionJobOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/protectionJob][%d] updateTenantProtectionJobOK %s", 200, payload) -} - -func (o *UpdateTenantProtectionJobOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/protectionJob][%d] updateTenantProtectionJobOK %s", 200, payload) -} - -func (o *UpdateTenantProtectionJobOK) GetPayload() *models.TenantProtectionJobUpdate { - return o.Payload -} - -func (o *UpdateTenantProtectionJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantProtectionJobUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantProtectionJobDefault creates a UpdateTenantProtectionJobDefault with default headers values -func NewUpdateTenantProtectionJobDefault(code int) *UpdateTenantProtectionJobDefault { - return &UpdateTenantProtectionJobDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantProtectionJobDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantProtectionJobDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant protection job default response has a 2xx status code -func (o *UpdateTenantProtectionJobDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant protection job default response has a 3xx status code -func (o *UpdateTenantProtectionJobDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant protection job default response has a 4xx status code -func (o *UpdateTenantProtectionJobDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant protection job default response has a 5xx status code -func (o *UpdateTenantProtectionJobDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant protection job default response a status code equal to that given -func (o *UpdateTenantProtectionJobDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant protection job default response -func (o *UpdateTenantProtectionJobDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantProtectionJobDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/protectionJob][%d] UpdateTenantProtectionJob default %s", o._statusCode, payload) -} - -func (o *UpdateTenantProtectionJobDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/protectionJob][%d] UpdateTenantProtectionJob default %s", o._statusCode, payload) -} - -func (o *UpdateTenantProtectionJobDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantProtectionJobDefault) 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/tenant/update_tenant_protection_policy_parameters.go b/v1/client/tenant/update_tenant_protection_policy_parameters.go deleted file mode 100644 index e1f8a4db..00000000 --- a/v1/client/tenant/update_tenant_protection_policy_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantProtectionPolicyParams creates a new UpdateTenantProtectionPolicyParams 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 NewUpdateTenantProtectionPolicyParams() *UpdateTenantProtectionPolicyParams { - return &UpdateTenantProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantProtectionPolicyParamsWithTimeout creates a new UpdateTenantProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantProtectionPolicyParamsWithTimeout(timeout time.Duration) *UpdateTenantProtectionPolicyParams { - return &UpdateTenantProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewUpdateTenantProtectionPolicyParamsWithContext creates a new UpdateTenantProtectionPolicyParams object -// with the ability to set a context for a request. -func NewUpdateTenantProtectionPolicyParamsWithContext(ctx context.Context) *UpdateTenantProtectionPolicyParams { - return &UpdateTenantProtectionPolicyParams{ - Context: ctx, - } -} - -// NewUpdateTenantProtectionPolicyParamsWithHTTPClient creates a new UpdateTenantProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantProtectionPolicyParamsWithHTTPClient(client *http.Client) *UpdateTenantProtectionPolicyParams { - return &UpdateTenantProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the update tenant protection policy operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantProtectionPolicyParams struct { - - /* Body. - - Request to update existing protection policies. - */ - Body *models.TenantProtectionPolicyUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantProtectionPolicyParams) WithDefaults() *UpdateTenantProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) WithTimeout(timeout time.Duration) *UpdateTenantProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) WithContext(ctx context.Context) *UpdateTenantProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) WithHTTPClient(client *http.Client) *UpdateTenantProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) WithBody(body *models.TenantProtectionPolicyUpdateParameters) *UpdateTenantProtectionPolicyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant protection policy params -func (o *UpdateTenantProtectionPolicyParams) SetBody(body *models.TenantProtectionPolicyUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantProtectionPolicyParams) 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/tenant/update_tenant_protection_policy_responses.go b/v1/client/tenant/update_tenant_protection_policy_responses.go deleted file mode 100644 index 0d03da08..00000000 --- a/v1/client/tenant/update_tenant_protection_policy_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantProtectionPolicyReader is a Reader for the UpdateTenantProtectionPolicy structure. -type UpdateTenantProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantProtectionPolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantProtectionPolicyDefault(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 - } -} - -// NewUpdateTenantProtectionPolicyOK creates a UpdateTenantProtectionPolicyOK with default headers values -func NewUpdateTenantProtectionPolicyOK() *UpdateTenantProtectionPolicyOK { - return &UpdateTenantProtectionPolicyOK{} -} - -/* -UpdateTenantProtectionPolicyOK describes a response with status code 200, with default header values. - -Tenant Protection Policy Mapping Response. -*/ -type UpdateTenantProtectionPolicyOK struct { - Payload *models.TenantProtectionPolicyUpdate -} - -// IsSuccess returns true when this update tenant protection policy o k response has a 2xx status code -func (o *UpdateTenantProtectionPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant protection policy o k response has a 3xx status code -func (o *UpdateTenantProtectionPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant protection policy o k response has a 4xx status code -func (o *UpdateTenantProtectionPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant protection policy o k response has a 5xx status code -func (o *UpdateTenantProtectionPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant protection policy o k response a status code equal to that given -func (o *UpdateTenantProtectionPolicyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant protection policy o k response -func (o *UpdateTenantProtectionPolicyOK) Code() int { - return 200 -} - -func (o *UpdateTenantProtectionPolicyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/policy][%d] updateTenantProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateTenantProtectionPolicyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/policy][%d] updateTenantProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateTenantProtectionPolicyOK) GetPayload() *models.TenantProtectionPolicyUpdate { - return o.Payload -} - -func (o *UpdateTenantProtectionPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantProtectionPolicyUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantProtectionPolicyDefault creates a UpdateTenantProtectionPolicyDefault with default headers values -func NewUpdateTenantProtectionPolicyDefault(code int) *UpdateTenantProtectionPolicyDefault { - return &UpdateTenantProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantProtectionPolicyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant protection policy default response has a 2xx status code -func (o *UpdateTenantProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant protection policy default response has a 3xx status code -func (o *UpdateTenantProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant protection policy default response has a 4xx status code -func (o *UpdateTenantProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant protection policy default response has a 5xx status code -func (o *UpdateTenantProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant protection policy default response a status code equal to that given -func (o *UpdateTenantProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant protection policy default response -func (o *UpdateTenantProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/policy][%d] UpdateTenantProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateTenantProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/policy][%d] UpdateTenantProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateTenantProtectionPolicyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantProtectionPolicyDefault) 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/tenant/update_tenant_responses.go b/v1/client/tenant/update_tenant_responses.go deleted file mode 100644 index 05ab498b..00000000 --- a/v1/client/tenant/update_tenant_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantReader is a Reader for the UpdateTenant structure. -type UpdateTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantDefault(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 - } -} - -// NewUpdateTenantOK creates a UpdateTenantOK with default headers values -func NewUpdateTenantOK() *UpdateTenantOK { - return &UpdateTenantOK{} -} - -/* -UpdateTenantOK describes a response with status code 200, with default header values. - -Update Tenants Response -*/ -type UpdateTenantOK struct { - Payload *models.Tenant -} - -// IsSuccess returns true when this update tenant o k response has a 2xx status code -func (o *UpdateTenantOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant o k response has a 3xx status code -func (o *UpdateTenantOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant o k response has a 4xx status code -func (o *UpdateTenantOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant o k response has a 5xx status code -func (o *UpdateTenantOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant o k response a status code equal to that given -func (o *UpdateTenantOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant o k response -func (o *UpdateTenantOK) Code() int { - return 200 -} - -func (o *UpdateTenantOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants][%d] updateTenantOK %s", 200, payload) -} - -func (o *UpdateTenantOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants][%d] updateTenantOK %s", 200, payload) -} - -func (o *UpdateTenantOK) GetPayload() *models.Tenant { - return o.Payload -} - -func (o *UpdateTenantOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Tenant) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantDefault creates a UpdateTenantDefault with default headers values -func NewUpdateTenantDefault(code int) *UpdateTenantDefault { - return &UpdateTenantDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant default response has a 2xx status code -func (o *UpdateTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant default response has a 3xx status code -func (o *UpdateTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant default response has a 4xx status code -func (o *UpdateTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant default response has a 5xx status code -func (o *UpdateTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant default response a status code equal to that given -func (o *UpdateTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant default response -func (o *UpdateTenantDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants][%d] UpdateTenant default %s", o._statusCode, payload) -} - -func (o *UpdateTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants][%d] UpdateTenant default %s", o._statusCode, payload) -} - -func (o *UpdateTenantDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantDefault) 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/tenant/update_tenant_users_parameters.go b/v1/client/tenant/update_tenant_users_parameters.go deleted file mode 100644 index cf6a5a6a..00000000 --- a/v1/client/tenant/update_tenant_users_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantUsersParams creates a new UpdateTenantUsersParams 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 NewUpdateTenantUsersParams() *UpdateTenantUsersParams { - return &UpdateTenantUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantUsersParamsWithTimeout creates a new UpdateTenantUsersParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantUsersParamsWithTimeout(timeout time.Duration) *UpdateTenantUsersParams { - return &UpdateTenantUsersParams{ - timeout: timeout, - } -} - -// NewUpdateTenantUsersParamsWithContext creates a new UpdateTenantUsersParams object -// with the ability to set a context for a request. -func NewUpdateTenantUsersParamsWithContext(ctx context.Context) *UpdateTenantUsersParams { - return &UpdateTenantUsersParams{ - Context: ctx, - } -} - -// NewUpdateTenantUsersParamsWithHTTPClient creates a new UpdateTenantUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantUsersParamsWithHTTPClient(client *http.Client) *UpdateTenantUsersParams { - return &UpdateTenantUsersParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantUsersParams contains all the parameters to send to the API endpoint - - for the update tenant users operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantUsersParams struct { - - /* Body. - - Request to update existing users. - */ - Body *models.TenantUserUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantUsersParams) WithDefaults() *UpdateTenantUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant users params -func (o *UpdateTenantUsersParams) WithTimeout(timeout time.Duration) *UpdateTenantUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant users params -func (o *UpdateTenantUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant users params -func (o *UpdateTenantUsersParams) WithContext(ctx context.Context) *UpdateTenantUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant users params -func (o *UpdateTenantUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant users params -func (o *UpdateTenantUsersParams) WithHTTPClient(client *http.Client) *UpdateTenantUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant users params -func (o *UpdateTenantUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant users params -func (o *UpdateTenantUsersParams) WithBody(body *models.TenantUserUpdateParameters) *UpdateTenantUsersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant users params -func (o *UpdateTenantUsersParams) SetBody(body *models.TenantUserUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantUsersParams) 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/tenant/update_tenant_users_responses.go b/v1/client/tenant/update_tenant_users_responses.go deleted file mode 100644 index 002ba02b..00000000 --- a/v1/client/tenant/update_tenant_users_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantUsersReader is a Reader for the UpdateTenantUsers structure. -type UpdateTenantUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantUsersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantUsersDefault(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 - } -} - -// NewUpdateTenantUsersOK creates a UpdateTenantUsersOK with default headers values -func NewUpdateTenantUsersOK() *UpdateTenantUsersOK { - return &UpdateTenantUsersOK{} -} - -/* -UpdateTenantUsersOK describes a response with status code 200, with default header values. - -Tenant Users Mapping Response. -*/ -type UpdateTenantUsersOK struct { - Payload []*models.User -} - -// IsSuccess returns true when this update tenant users o k response has a 2xx status code -func (o *UpdateTenantUsersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant users o k response has a 3xx status code -func (o *UpdateTenantUsersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant users o k response has a 4xx status code -func (o *UpdateTenantUsersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant users o k response has a 5xx status code -func (o *UpdateTenantUsersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant users o k response a status code equal to that given -func (o *UpdateTenantUsersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant users o k response -func (o *UpdateTenantUsersOK) Code() int { - return 200 -} - -func (o *UpdateTenantUsersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/users][%d] updateTenantUsersOK %s", 200, payload) -} - -func (o *UpdateTenantUsersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/users][%d] updateTenantUsersOK %s", 200, payload) -} - -func (o *UpdateTenantUsersOK) GetPayload() []*models.User { - return o.Payload -} - -func (o *UpdateTenantUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantUsersDefault creates a UpdateTenantUsersDefault with default headers values -func NewUpdateTenantUsersDefault(code int) *UpdateTenantUsersDefault { - return &UpdateTenantUsersDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantUsersDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant users default response has a 2xx status code -func (o *UpdateTenantUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant users default response has a 3xx status code -func (o *UpdateTenantUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant users default response has a 4xx status code -func (o *UpdateTenantUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant users default response has a 5xx status code -func (o *UpdateTenantUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant users default response a status code equal to that given -func (o *UpdateTenantUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant users default response -func (o *UpdateTenantUsersDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/users][%d] UpdateTenantUsers default %s", o._statusCode, payload) -} - -func (o *UpdateTenantUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/users][%d] UpdateTenantUsers default %s", o._statusCode, payload) -} - -func (o *UpdateTenantUsersDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantUsersDefault) 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/tenant/update_tenant_view_box_parameters.go b/v1/client/tenant/update_tenant_view_box_parameters.go deleted file mode 100644 index 57f386a0..00000000 --- a/v1/client/tenant/update_tenant_view_box_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantViewBoxParams creates a new UpdateTenantViewBoxParams 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 NewUpdateTenantViewBoxParams() *UpdateTenantViewBoxParams { - return &UpdateTenantViewBoxParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantViewBoxParamsWithTimeout creates a new UpdateTenantViewBoxParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantViewBoxParamsWithTimeout(timeout time.Duration) *UpdateTenantViewBoxParams { - return &UpdateTenantViewBoxParams{ - timeout: timeout, - } -} - -// NewUpdateTenantViewBoxParamsWithContext creates a new UpdateTenantViewBoxParams object -// with the ability to set a context for a request. -func NewUpdateTenantViewBoxParamsWithContext(ctx context.Context) *UpdateTenantViewBoxParams { - return &UpdateTenantViewBoxParams{ - Context: ctx, - } -} - -// NewUpdateTenantViewBoxParamsWithHTTPClient creates a new UpdateTenantViewBoxParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantViewBoxParamsWithHTTPClient(client *http.Client) *UpdateTenantViewBoxParams { - return &UpdateTenantViewBoxParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantViewBoxParams contains all the parameters to send to the API endpoint - - for the update tenant view box operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantViewBoxParams struct { - - /* Body. - - Request to update existing tenant view box. - */ - Body *models.TenantViewBoxUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantViewBoxParams) WithDefaults() *UpdateTenantViewBoxParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantViewBoxParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant view box params -func (o *UpdateTenantViewBoxParams) WithTimeout(timeout time.Duration) *UpdateTenantViewBoxParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant view box params -func (o *UpdateTenantViewBoxParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant view box params -func (o *UpdateTenantViewBoxParams) WithContext(ctx context.Context) *UpdateTenantViewBoxParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant view box params -func (o *UpdateTenantViewBoxParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant view box params -func (o *UpdateTenantViewBoxParams) WithHTTPClient(client *http.Client) *UpdateTenantViewBoxParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant view box params -func (o *UpdateTenantViewBoxParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant view box params -func (o *UpdateTenantViewBoxParams) WithBody(body *models.TenantViewBoxUpdateParameters) *UpdateTenantViewBoxParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant view box params -func (o *UpdateTenantViewBoxParams) SetBody(body *models.TenantViewBoxUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantViewBoxParams) 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/tenant/update_tenant_view_box_responses.go b/v1/client/tenant/update_tenant_view_box_responses.go deleted file mode 100644 index 03cb88dd..00000000 --- a/v1/client/tenant/update_tenant_view_box_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantViewBoxReader is a Reader for the UpdateTenantViewBox structure. -type UpdateTenantViewBoxReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantViewBoxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantViewBoxOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantViewBoxDefault(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 - } -} - -// NewUpdateTenantViewBoxOK creates a UpdateTenantViewBoxOK with default headers values -func NewUpdateTenantViewBoxOK() *UpdateTenantViewBoxOK { - return &UpdateTenantViewBoxOK{} -} - -/* -UpdateTenantViewBoxOK describes a response with status code 200, with default header values. - -Tenant View Box Update Response. -*/ -type UpdateTenantViewBoxOK struct { - Payload *models.TenantViewBoxUpdate -} - -// IsSuccess returns true when this update tenant view box o k response has a 2xx status code -func (o *UpdateTenantViewBoxOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant view box o k response has a 3xx status code -func (o *UpdateTenantViewBoxOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant view box o k response has a 4xx status code -func (o *UpdateTenantViewBoxOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant view box o k response has a 5xx status code -func (o *UpdateTenantViewBoxOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant view box o k response a status code equal to that given -func (o *UpdateTenantViewBoxOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant view box o k response -func (o *UpdateTenantViewBoxOK) Code() int { - return 200 -} - -func (o *UpdateTenantViewBoxOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/viewBox][%d] updateTenantViewBoxOK %s", 200, payload) -} - -func (o *UpdateTenantViewBoxOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/viewBox][%d] updateTenantViewBoxOK %s", 200, payload) -} - -func (o *UpdateTenantViewBoxOK) GetPayload() *models.TenantViewBoxUpdate { - return o.Payload -} - -func (o *UpdateTenantViewBoxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantViewBoxUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantViewBoxDefault creates a UpdateTenantViewBoxDefault with default headers values -func NewUpdateTenantViewBoxDefault(code int) *UpdateTenantViewBoxDefault { - return &UpdateTenantViewBoxDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantViewBoxDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantViewBoxDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant view box default response has a 2xx status code -func (o *UpdateTenantViewBoxDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant view box default response has a 3xx status code -func (o *UpdateTenantViewBoxDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant view box default response has a 4xx status code -func (o *UpdateTenantViewBoxDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant view box default response has a 5xx status code -func (o *UpdateTenantViewBoxDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant view box default response a status code equal to that given -func (o *UpdateTenantViewBoxDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant view box default response -func (o *UpdateTenantViewBoxDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantViewBoxDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/viewBox][%d] UpdateTenantViewBox default %s", o._statusCode, payload) -} - -func (o *UpdateTenantViewBoxDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/viewBox][%d] UpdateTenantViewBox default %s", o._statusCode, payload) -} - -func (o *UpdateTenantViewBoxDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantViewBoxDefault) 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/tenant/update_tenant_view_parameters.go b/v1/client/tenant/update_tenant_view_parameters.go deleted file mode 100644 index 038640a6..00000000 --- a/v1/client/tenant/update_tenant_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantViewParams creates a new UpdateTenantViewParams 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 NewUpdateTenantViewParams() *UpdateTenantViewParams { - return &UpdateTenantViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantViewParamsWithTimeout creates a new UpdateTenantViewParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantViewParamsWithTimeout(timeout time.Duration) *UpdateTenantViewParams { - return &UpdateTenantViewParams{ - timeout: timeout, - } -} - -// NewUpdateTenantViewParamsWithContext creates a new UpdateTenantViewParams object -// with the ability to set a context for a request. -func NewUpdateTenantViewParamsWithContext(ctx context.Context) *UpdateTenantViewParams { - return &UpdateTenantViewParams{ - Context: ctx, - } -} - -// NewUpdateTenantViewParamsWithHTTPClient creates a new UpdateTenantViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantViewParamsWithHTTPClient(client *http.Client) *UpdateTenantViewParams { - return &UpdateTenantViewParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantViewParams contains all the parameters to send to the API endpoint - - for the update tenant view operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantViewParams struct { - - /* Body. - - Request to update existing views. - */ - Body *models.TenantViewUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantViewParams) WithDefaults() *UpdateTenantViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant view params -func (o *UpdateTenantViewParams) WithTimeout(timeout time.Duration) *UpdateTenantViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant view params -func (o *UpdateTenantViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant view params -func (o *UpdateTenantViewParams) WithContext(ctx context.Context) *UpdateTenantViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant view params -func (o *UpdateTenantViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant view params -func (o *UpdateTenantViewParams) WithHTTPClient(client *http.Client) *UpdateTenantViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant view params -func (o *UpdateTenantViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant view params -func (o *UpdateTenantViewParams) WithBody(body *models.TenantViewUpdateParameters) *UpdateTenantViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant view params -func (o *UpdateTenantViewParams) SetBody(body *models.TenantViewUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantViewParams) 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/tenant/update_tenant_view_responses.go b/v1/client/tenant/update_tenant_view_responses.go deleted file mode 100644 index 762451af..00000000 --- a/v1/client/tenant/update_tenant_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantViewReader is a Reader for the UpdateTenantView structure. -type UpdateTenantViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantViewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantViewDefault(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 - } -} - -// NewUpdateTenantViewOK creates a UpdateTenantViewOK with default headers values -func NewUpdateTenantViewOK() *UpdateTenantViewOK { - return &UpdateTenantViewOK{} -} - -/* -UpdateTenantViewOK describes a response with status code 200, with default header values. - -Tenant View Mapping Response. -*/ -type UpdateTenantViewOK struct { - Payload *models.TenantViewUpdate -} - -// IsSuccess returns true when this update tenant view o k response has a 2xx status code -func (o *UpdateTenantViewOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant view o k response has a 3xx status code -func (o *UpdateTenantViewOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant view o k response has a 4xx status code -func (o *UpdateTenantViewOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant view o k response has a 5xx status code -func (o *UpdateTenantViewOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant view o k response a status code equal to that given -func (o *UpdateTenantViewOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant view o k response -func (o *UpdateTenantViewOK) Code() int { - return 200 -} - -func (o *UpdateTenantViewOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/view][%d] updateTenantViewOK %s", 200, payload) -} - -func (o *UpdateTenantViewOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/view][%d] updateTenantViewOK %s", 200, payload) -} - -func (o *UpdateTenantViewOK) GetPayload() *models.TenantViewUpdate { - return o.Payload -} - -func (o *UpdateTenantViewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantViewUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantViewDefault creates a UpdateTenantViewDefault with default headers values -func NewUpdateTenantViewDefault(code int) *UpdateTenantViewDefault { - return &UpdateTenantViewDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant view default response has a 2xx status code -func (o *UpdateTenantViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant view default response has a 3xx status code -func (o *UpdateTenantViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant view default response has a 4xx status code -func (o *UpdateTenantViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant view default response has a 5xx status code -func (o *UpdateTenantViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant view default response a status code equal to that given -func (o *UpdateTenantViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant view default response -func (o *UpdateTenantViewDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/view][%d] UpdateTenantView default %s", o._statusCode, payload) -} - -func (o *UpdateTenantViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/view][%d] UpdateTenantView default %s", o._statusCode, payload) -} - -func (o *UpdateTenantViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantViewDefault) 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/tenant/update_tenant_vlan_parameters.go b/v1/client/tenant/update_tenant_vlan_parameters.go deleted file mode 100644 index e4b65348..00000000 --- a/v1/client/tenant/update_tenant_vlan_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateTenantVlanParams creates a new UpdateTenantVlanParams 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 NewUpdateTenantVlanParams() *UpdateTenantVlanParams { - return &UpdateTenantVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantVlanParamsWithTimeout creates a new UpdateTenantVlanParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantVlanParamsWithTimeout(timeout time.Duration) *UpdateTenantVlanParams { - return &UpdateTenantVlanParams{ - timeout: timeout, - } -} - -// NewUpdateTenantVlanParamsWithContext creates a new UpdateTenantVlanParams object -// with the ability to set a context for a request. -func NewUpdateTenantVlanParamsWithContext(ctx context.Context) *UpdateTenantVlanParams { - return &UpdateTenantVlanParams{ - Context: ctx, - } -} - -// NewUpdateTenantVlanParamsWithHTTPClient creates a new UpdateTenantVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantVlanParamsWithHTTPClient(client *http.Client) *UpdateTenantVlanParams { - return &UpdateTenantVlanParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantVlanParams contains all the parameters to send to the API endpoint - - for the update tenant vlan operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantVlanParams struct { - - /* Body. - - Request to update existing tenant vlan. - */ - Body *models.TenantVlanUpdateParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantVlanParams) WithDefaults() *UpdateTenantVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant vlan params -func (o *UpdateTenantVlanParams) WithTimeout(timeout time.Duration) *UpdateTenantVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant vlan params -func (o *UpdateTenantVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant vlan params -func (o *UpdateTenantVlanParams) WithContext(ctx context.Context) *UpdateTenantVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant vlan params -func (o *UpdateTenantVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant vlan params -func (o *UpdateTenantVlanParams) WithHTTPClient(client *http.Client) *UpdateTenantVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant vlan params -func (o *UpdateTenantVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant vlan params -func (o *UpdateTenantVlanParams) WithBody(body *models.TenantVlanUpdateParameters) *UpdateTenantVlanParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant vlan params -func (o *UpdateTenantVlanParams) SetBody(body *models.TenantVlanUpdateParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantVlanParams) 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/tenant/update_tenant_vlan_responses.go b/v1/client/tenant/update_tenant_vlan_responses.go deleted file mode 100644 index 4443fc8a..00000000 --- a/v1/client/tenant/update_tenant_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateTenantVlanReader is a Reader for the UpdateTenantVlan structure. -type UpdateTenantVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantVlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantVlanDefault(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 - } -} - -// NewUpdateTenantVlanOK creates a UpdateTenantVlanOK with default headers values -func NewUpdateTenantVlanOK() *UpdateTenantVlanOK { - return &UpdateTenantVlanOK{} -} - -/* -UpdateTenantVlanOK describes a response with status code 200, with default header values. - -Tenant Vlan Update Response. -*/ -type UpdateTenantVlanOK struct { - Payload *models.TenantVlanUpdate -} - -// IsSuccess returns true when this update tenant vlan o k response has a 2xx status code -func (o *UpdateTenantVlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant vlan o k response has a 3xx status code -func (o *UpdateTenantVlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant vlan o k response has a 4xx status code -func (o *UpdateTenantVlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant vlan o k response has a 5xx status code -func (o *UpdateTenantVlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant vlan o k response a status code equal to that given -func (o *UpdateTenantVlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant vlan o k response -func (o *UpdateTenantVlanOK) Code() int { - return 200 -} - -func (o *UpdateTenantVlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/vlan][%d] updateTenantVlanOK %s", 200, payload) -} - -func (o *UpdateTenantVlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/vlan][%d] updateTenantVlanOK %s", 200, payload) -} - -func (o *UpdateTenantVlanOK) GetPayload() *models.TenantVlanUpdate { - return o.Payload -} - -func (o *UpdateTenantVlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantVlanUpdate) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantVlanDefault creates a UpdateTenantVlanDefault with default headers values -func NewUpdateTenantVlanDefault(code int) *UpdateTenantVlanDefault { - return &UpdateTenantVlanDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantVlanDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update tenant vlan default response has a 2xx status code -func (o *UpdateTenantVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant vlan default response has a 3xx status code -func (o *UpdateTenantVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant vlan default response has a 4xx status code -func (o *UpdateTenantVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant vlan default response has a 5xx status code -func (o *UpdateTenantVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant vlan default response a status code equal to that given -func (o *UpdateTenantVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant vlan default response -func (o *UpdateTenantVlanDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/vlan][%d] UpdateTenantVlan default %s", o._statusCode, payload) -} - -func (o *UpdateTenantVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/tenants/vlan][%d] UpdateTenantVlan default %s", o._statusCode, payload) -} - -func (o *UpdateTenantVlanDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateTenantVlanDefault) 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/vaults/create_vault_parameters.go b/v1/client/vaults/create_vault_parameters.go deleted file mode 100644 index 1100cde0..00000000 --- a/v1/client/vaults/create_vault_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateVaultParams creates a new CreateVaultParams 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 NewCreateVaultParams() *CreateVaultParams { - return &CreateVaultParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVaultParamsWithTimeout creates a new CreateVaultParams object -// with the ability to set a timeout on a request. -func NewCreateVaultParamsWithTimeout(timeout time.Duration) *CreateVaultParams { - return &CreateVaultParams{ - timeout: timeout, - } -} - -// NewCreateVaultParamsWithContext creates a new CreateVaultParams object -// with the ability to set a context for a request. -func NewCreateVaultParamsWithContext(ctx context.Context) *CreateVaultParams { - return &CreateVaultParams{ - Context: ctx, - } -} - -// NewCreateVaultParamsWithHTTPClient creates a new CreateVaultParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateVaultParamsWithHTTPClient(client *http.Client) *CreateVaultParams { - return &CreateVaultParams{ - HTTPClient: client, - } -} - -/* -CreateVaultParams contains all the parameters to send to the API endpoint - - for the create vault operation. - - Typically these are written to a http.Request. -*/ -type CreateVaultParams struct { - - /* Body. - - Request to create a new Vault. - */ - Body *models.Vault - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVaultParams) WithDefaults() *CreateVaultParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVaultParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create vault params -func (o *CreateVaultParams) WithTimeout(timeout time.Duration) *CreateVaultParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create vault params -func (o *CreateVaultParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create vault params -func (o *CreateVaultParams) WithContext(ctx context.Context) *CreateVaultParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create vault params -func (o *CreateVaultParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create vault params -func (o *CreateVaultParams) WithHTTPClient(client *http.Client) *CreateVaultParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create vault params -func (o *CreateVaultParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create vault params -func (o *CreateVaultParams) WithBody(body *models.Vault) *CreateVaultParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create vault params -func (o *CreateVaultParams) SetBody(body *models.Vault) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVaultParams) 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/vaults/create_vault_responses.go b/v1/client/vaults/create_vault_responses.go deleted file mode 100644 index 4ebf0565..00000000 --- a/v1/client/vaults/create_vault_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateVaultReader is a Reader for the CreateVault structure. -type CreateVaultReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVaultReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateVaultCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateVaultDefault(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 - } -} - -// NewCreateVaultCreated creates a CreateVaultCreated with default headers values -func NewCreateVaultCreated() *CreateVaultCreated { - return &CreateVaultCreated{} -} - -/* -CreateVaultCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateVaultCreated struct { - Payload *models.Vault -} - -// IsSuccess returns true when this create vault created response has a 2xx status code -func (o *CreateVaultCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create vault created response has a 3xx status code -func (o *CreateVaultCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create vault created response has a 4xx status code -func (o *CreateVaultCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create vault created response has a 5xx status code -func (o *CreateVaultCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create vault created response a status code equal to that given -func (o *CreateVaultCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create vault created response -func (o *CreateVaultCreated) Code() int { - return 201 -} - -func (o *CreateVaultCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vaults][%d] createVaultCreated %s", 201, payload) -} - -func (o *CreateVaultCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vaults][%d] createVaultCreated %s", 201, payload) -} - -func (o *CreateVaultCreated) GetPayload() *models.Vault { - return o.Payload -} - -func (o *CreateVaultCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vault) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVaultDefault creates a CreateVaultDefault with default headers values -func NewCreateVaultDefault(code int) *CreateVaultDefault { - return &CreateVaultDefault{ - _statusCode: code, - } -} - -/* -CreateVaultDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateVaultDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create vault default response has a 2xx status code -func (o *CreateVaultDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create vault default response has a 3xx status code -func (o *CreateVaultDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create vault default response has a 4xx status code -func (o *CreateVaultDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create vault default response has a 5xx status code -func (o *CreateVaultDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create vault default response a status code equal to that given -func (o *CreateVaultDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create vault default response -func (o *CreateVaultDefault) Code() int { - return o._statusCode -} - -func (o *CreateVaultDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vaults][%d] CreateVault default %s", o._statusCode, payload) -} - -func (o *CreateVaultDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vaults][%d] CreateVault default %s", o._statusCode, payload) -} - -func (o *CreateVaultDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateVaultDefault) 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/vaults/delete_vault_parameters.go b/v1/client/vaults/delete_vault_parameters.go deleted file mode 100644 index d8aeb035..00000000 --- a/v1/client/vaults/delete_vault_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteVaultParams creates a new DeleteVaultParams 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 NewDeleteVaultParams() *DeleteVaultParams { - return &DeleteVaultParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteVaultParamsWithTimeout creates a new DeleteVaultParams object -// with the ability to set a timeout on a request. -func NewDeleteVaultParamsWithTimeout(timeout time.Duration) *DeleteVaultParams { - return &DeleteVaultParams{ - timeout: timeout, - } -} - -// NewDeleteVaultParamsWithContext creates a new DeleteVaultParams object -// with the ability to set a context for a request. -func NewDeleteVaultParamsWithContext(ctx context.Context) *DeleteVaultParams { - return &DeleteVaultParams{ - Context: ctx, - } -} - -// NewDeleteVaultParamsWithHTTPClient creates a new DeleteVaultParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteVaultParamsWithHTTPClient(client *http.Client) *DeleteVaultParams { - return &DeleteVaultParams{ - HTTPClient: client, - } -} - -/* -DeleteVaultParams contains all the parameters to send to the API endpoint - - for the delete vault operation. - - Typically these are written to a http.Request. -*/ -type DeleteVaultParams struct { - - /* Body. - - Request to delete vault. - */ - Body *models.VaultDeleteParams - - /* ID. - - Specifies a unique id of the Vault. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteVaultParams) WithDefaults() *DeleteVaultParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteVaultParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete vault params -func (o *DeleteVaultParams) WithTimeout(timeout time.Duration) *DeleteVaultParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete vault params -func (o *DeleteVaultParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete vault params -func (o *DeleteVaultParams) WithContext(ctx context.Context) *DeleteVaultParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete vault params -func (o *DeleteVaultParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete vault params -func (o *DeleteVaultParams) WithHTTPClient(client *http.Client) *DeleteVaultParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete vault params -func (o *DeleteVaultParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete vault params -func (o *DeleteVaultParams) WithBody(body *models.VaultDeleteParams) *DeleteVaultParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete vault params -func (o *DeleteVaultParams) SetBody(body *models.VaultDeleteParams) { - o.Body = body -} - -// WithID adds the id to the delete vault params -func (o *DeleteVaultParams) WithID(id int64) *DeleteVaultParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete vault params -func (o *DeleteVaultParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteVaultParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vaults/delete_vault_responses.go b/v1/client/vaults/delete_vault_responses.go deleted file mode 100644 index 98e1efa3..00000000 --- a/v1/client/vaults/delete_vault_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteVaultReader is a Reader for the DeleteVault structure. -type DeleteVaultReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteVaultReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteVaultNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteVaultDefault(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 - } -} - -// NewDeleteVaultNoContent creates a DeleteVaultNoContent with default headers values -func NewDeleteVaultNoContent() *DeleteVaultNoContent { - return &DeleteVaultNoContent{} -} - -/* -DeleteVaultNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteVaultNoContent struct { -} - -// IsSuccess returns true when this delete vault no content response has a 2xx status code -func (o *DeleteVaultNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete vault no content response has a 3xx status code -func (o *DeleteVaultNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete vault no content response has a 4xx status code -func (o *DeleteVaultNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete vault no content response has a 5xx status code -func (o *DeleteVaultNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete vault no content response a status code equal to that given -func (o *DeleteVaultNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete vault no content response -func (o *DeleteVaultNoContent) Code() int { - return 204 -} - -func (o *DeleteVaultNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/vaults/{id}][%d] deleteVaultNoContent", 204) -} - -func (o *DeleteVaultNoContent) String() string { - return fmt.Sprintf("[DELETE /public/vaults/{id}][%d] deleteVaultNoContent", 204) -} - -func (o *DeleteVaultNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteVaultDefault creates a DeleteVaultDefault with default headers values -func NewDeleteVaultDefault(code int) *DeleteVaultDefault { - return &DeleteVaultDefault{ - _statusCode: code, - } -} - -/* -DeleteVaultDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteVaultDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete vault default response has a 2xx status code -func (o *DeleteVaultDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete vault default response has a 3xx status code -func (o *DeleteVaultDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete vault default response has a 4xx status code -func (o *DeleteVaultDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete vault default response has a 5xx status code -func (o *DeleteVaultDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete vault default response a status code equal to that given -func (o *DeleteVaultDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete vault default response -func (o *DeleteVaultDefault) Code() int { - return o._statusCode -} - -func (o *DeleteVaultDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/vaults/{id}][%d] DeleteVault default %s", o._statusCode, payload) -} - -func (o *DeleteVaultDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/vaults/{id}][%d] DeleteVault default %s", o._statusCode, payload) -} - -func (o *DeleteVaultDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteVaultDefault) 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/vaults/get_archive_media_info_parameters.go b/v1/client/vaults/get_archive_media_info_parameters.go deleted file mode 100644 index f146221f..00000000 --- a/v1/client/vaults/get_archive_media_info_parameters.go +++ /dev/null @@ -1,302 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" -) - -// NewGetArchiveMediaInfoParams creates a new GetArchiveMediaInfoParams 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 NewGetArchiveMediaInfoParams() *GetArchiveMediaInfoParams { - return &GetArchiveMediaInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetArchiveMediaInfoParamsWithTimeout creates a new GetArchiveMediaInfoParams object -// with the ability to set a timeout on a request. -func NewGetArchiveMediaInfoParamsWithTimeout(timeout time.Duration) *GetArchiveMediaInfoParams { - return &GetArchiveMediaInfoParams{ - timeout: timeout, - } -} - -// NewGetArchiveMediaInfoParamsWithContext creates a new GetArchiveMediaInfoParams object -// with the ability to set a context for a request. -func NewGetArchiveMediaInfoParamsWithContext(ctx context.Context) *GetArchiveMediaInfoParams { - return &GetArchiveMediaInfoParams{ - Context: ctx, - } -} - -// NewGetArchiveMediaInfoParamsWithHTTPClient creates a new GetArchiveMediaInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetArchiveMediaInfoParamsWithHTTPClient(client *http.Client) *GetArchiveMediaInfoParams { - return &GetArchiveMediaInfoParams{ - HTTPClient: client, - } -} - -/* -GetArchiveMediaInfoParams contains all the parameters to send to the API endpoint - - for the get archive media info operation. - - Typically these are written to a http.Request. -*/ -type GetArchiveMediaInfoParams struct { - - /* ClusterID. - - Specifies the id of the Cohesity Cluster that archived to a - QStar media Vault. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation id of the Cohesity Cluster that archived - to a QStar media Vault. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* EntityIds. - - Specifies an array of entityIds to optionally filter by. - An entityId is a unique id for a VM assigned by the Cohesity Cluster. - */ - EntityIds []int64 - - /* QstarArchiveJobID. - - Specifies the id of the Job that archived to a QStar media Vault. - - Format: int64 - */ - QstarArchiveJobID int64 - - /* QstarRestoreTaskID. - - Specifies the id of the restore task to optionally filter by. - The restore task that is restoring data from the specified media Vault. - - Format: int64 - */ - QstarRestoreTaskID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get archive media info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetArchiveMediaInfoParams) WithDefaults() *GetArchiveMediaInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get archive media info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetArchiveMediaInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithTimeout(timeout time.Duration) *GetArchiveMediaInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithContext(ctx context.Context) *GetArchiveMediaInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithHTTPClient(client *http.Client) *GetArchiveMediaInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithClusterID(clusterID int64) *GetArchiveMediaInfoParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetArchiveMediaInfoParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithEntityIds adds the entityIds to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithEntityIds(entityIds []int64) *GetArchiveMediaInfoParams { - o.SetEntityIds(entityIds) - return o -} - -// SetEntityIds adds the entityIds to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetEntityIds(entityIds []int64) { - o.EntityIds = entityIds -} - -// WithQstarArchiveJobID adds the qstarArchiveJobID to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithQstarArchiveJobID(qstarArchiveJobID int64) *GetArchiveMediaInfoParams { - o.SetQstarArchiveJobID(qstarArchiveJobID) - return o -} - -// SetQstarArchiveJobID adds the qstarArchiveJobId to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetQstarArchiveJobID(qstarArchiveJobID int64) { - o.QstarArchiveJobID = qstarArchiveJobID -} - -// WithQstarRestoreTaskID adds the qstarRestoreTaskID to the get archive media info params -func (o *GetArchiveMediaInfoParams) WithQstarRestoreTaskID(qstarRestoreTaskID *int64) *GetArchiveMediaInfoParams { - o.SetQstarRestoreTaskID(qstarRestoreTaskID) - return o -} - -// SetQstarRestoreTaskID adds the qstarRestoreTaskId to the get archive media info params -func (o *GetArchiveMediaInfoParams) SetQstarRestoreTaskID(qstarRestoreTaskID *int64) { - o.QstarRestoreTaskID = qstarRestoreTaskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetArchiveMediaInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - if o.EntityIds != nil { - - // binding items for entityIds - joinedEntityIds := o.bindParamEntityIds(reg) - - // query array param entityIds - if err := r.SetQueryParam("entityIds", joinedEntityIds...); err != nil { - return err - } - } - - // query param qstarArchiveJobId - qrQstarArchiveJobID := o.QstarArchiveJobID - qQstarArchiveJobID := swag.FormatInt64(qrQstarArchiveJobID) - if qQstarArchiveJobID != "" { - - if err := r.SetQueryParam("qstarArchiveJobId", qQstarArchiveJobID); err != nil { - return err - } - } - - if o.QstarRestoreTaskID != nil { - - // query param qstarRestoreTaskId - var qrQstarRestoreTaskID int64 - - if o.QstarRestoreTaskID != nil { - qrQstarRestoreTaskID = *o.QstarRestoreTaskID - } - qQstarRestoreTaskID := swag.FormatInt64(qrQstarRestoreTaskID) - if qQstarRestoreTaskID != "" { - - if err := r.SetQueryParam("qstarRestoreTaskId", qQstarRestoreTaskID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetArchiveMediaInfo binds the parameter entityIds -func (o *GetArchiveMediaInfoParams) bindParamEntityIds(formats strfmt.Registry) []string { - entityIdsIR := o.EntityIds - - var entityIdsIC []string - for _, entityIdsIIR := range entityIdsIR { // explode []int64 - - entityIdsIIV := swag.FormatInt64(entityIdsIIR) // int64 as string - entityIdsIC = append(entityIdsIC, entityIdsIIV) - } - - // items.CollectionFormat: "" - entityIdsIS := swag.JoinByFormat(entityIdsIC, "") - - return entityIdsIS -} diff --git a/v1/client/vaults/get_archive_media_info_responses.go b/v1/client/vaults/get_archive_media_info_responses.go deleted file mode 100644 index 3865da50..00000000 --- a/v1/client/vaults/get_archive_media_info_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetArchiveMediaInfoReader is a Reader for the GetArchiveMediaInfo structure. -type GetArchiveMediaInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetArchiveMediaInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetArchiveMediaInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetArchiveMediaInfoDefault(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 - } -} - -// NewGetArchiveMediaInfoOK creates a GetArchiveMediaInfoOK with default headers values -func NewGetArchiveMediaInfoOK() *GetArchiveMediaInfoOK { - return &GetArchiveMediaInfoOK{} -} - -/* -GetArchiveMediaInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetArchiveMediaInfoOK struct { - Payload []*models.TapeMediaInformation -} - -// IsSuccess returns true when this get archive media info o k response has a 2xx status code -func (o *GetArchiveMediaInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get archive media info o k response has a 3xx status code -func (o *GetArchiveMediaInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get archive media info o k response has a 4xx status code -func (o *GetArchiveMediaInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get archive media info o k response has a 5xx status code -func (o *GetArchiveMediaInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get archive media info o k response a status code equal to that given -func (o *GetArchiveMediaInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get archive media info o k response -func (o *GetArchiveMediaInfoOK) Code() int { - return 200 -} - -func (o *GetArchiveMediaInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/archiveMediaInfo][%d] getArchiveMediaInfoOK %s", 200, payload) -} - -func (o *GetArchiveMediaInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/archiveMediaInfo][%d] getArchiveMediaInfoOK %s", 200, payload) -} - -func (o *GetArchiveMediaInfoOK) GetPayload() []*models.TapeMediaInformation { - return o.Payload -} - -func (o *GetArchiveMediaInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetArchiveMediaInfoDefault creates a GetArchiveMediaInfoDefault with default headers values -func NewGetArchiveMediaInfoDefault(code int) *GetArchiveMediaInfoDefault { - return &GetArchiveMediaInfoDefault{ - _statusCode: code, - } -} - -/* -GetArchiveMediaInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetArchiveMediaInfoDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get archive media info default response has a 2xx status code -func (o *GetArchiveMediaInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get archive media info default response has a 3xx status code -func (o *GetArchiveMediaInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get archive media info default response has a 4xx status code -func (o *GetArchiveMediaInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get archive media info default response has a 5xx status code -func (o *GetArchiveMediaInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get archive media info default response a status code equal to that given -func (o *GetArchiveMediaInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get archive media info default response -func (o *GetArchiveMediaInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetArchiveMediaInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/archiveMediaInfo][%d] GetArchiveMediaInfo default %s", o._statusCode, payload) -} - -func (o *GetArchiveMediaInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/archiveMediaInfo][%d] GetArchiveMediaInfo default %s", o._statusCode, payload) -} - -func (o *GetArchiveMediaInfoDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetArchiveMediaInfoDefault) 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/vaults/get_bandwidth_settings_parameters.go b/v1/client/vaults/get_bandwidth_settings_parameters.go deleted file mode 100644 index 4da45fa1..00000000 --- a/v1/client/vaults/get_bandwidth_settings_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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" -) - -// NewGetBandwidthSettingsParams creates a new GetBandwidthSettingsParams 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 NewGetBandwidthSettingsParams() *GetBandwidthSettingsParams { - return &GetBandwidthSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBandwidthSettingsParamsWithTimeout creates a new GetBandwidthSettingsParams object -// with the ability to set a timeout on a request. -func NewGetBandwidthSettingsParamsWithTimeout(timeout time.Duration) *GetBandwidthSettingsParams { - return &GetBandwidthSettingsParams{ - timeout: timeout, - } -} - -// NewGetBandwidthSettingsParamsWithContext creates a new GetBandwidthSettingsParams object -// with the ability to set a context for a request. -func NewGetBandwidthSettingsParamsWithContext(ctx context.Context) *GetBandwidthSettingsParams { - return &GetBandwidthSettingsParams{ - Context: ctx, - } -} - -// NewGetBandwidthSettingsParamsWithHTTPClient creates a new GetBandwidthSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBandwidthSettingsParamsWithHTTPClient(client *http.Client) *GetBandwidthSettingsParams { - return &GetBandwidthSettingsParams{ - HTTPClient: client, - } -} - -/* -GetBandwidthSettingsParams contains all the parameters to send to the API endpoint - - for the get bandwidth settings operation. - - Typically these are written to a http.Request. -*/ -type GetBandwidthSettingsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get bandwidth settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBandwidthSettingsParams) WithDefaults() *GetBandwidthSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get bandwidth settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBandwidthSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) WithTimeout(timeout time.Duration) *GetBandwidthSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) WithContext(ctx context.Context) *GetBandwidthSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) WithHTTPClient(client *http.Client) *GetBandwidthSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get bandwidth settings params -func (o *GetBandwidthSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBandwidthSettingsParams) 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/vaults/get_bandwidth_settings_responses.go b/v1/client/vaults/get_bandwidth_settings_responses.go deleted file mode 100644 index 4b75c46d..00000000 --- a/v1/client/vaults/get_bandwidth_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBandwidthSettingsReader is a Reader for the GetBandwidthSettings structure. -type GetBandwidthSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBandwidthSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBandwidthSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBandwidthSettingsDefault(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 - } -} - -// NewGetBandwidthSettingsOK creates a GetBandwidthSettingsOK with default headers values -func NewGetBandwidthSettingsOK() *GetBandwidthSettingsOK { - return &GetBandwidthSettingsOK{} -} - -/* -GetBandwidthSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBandwidthSettingsOK struct { - Payload *models.VaultBandwidthLimits -} - -// IsSuccess returns true when this get bandwidth settings o k response has a 2xx status code -func (o *GetBandwidthSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get bandwidth settings o k response has a 3xx status code -func (o *GetBandwidthSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bandwidth settings o k response has a 4xx status code -func (o *GetBandwidthSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bandwidth settings o k response has a 5xx status code -func (o *GetBandwidthSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get bandwidth settings o k response a status code equal to that given -func (o *GetBandwidthSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get bandwidth settings o k response -func (o *GetBandwidthSettingsOK) Code() int { - return 200 -} - -func (o *GetBandwidthSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/bandwidthSettings][%d] getBandwidthSettingsOK %s", 200, payload) -} - -func (o *GetBandwidthSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/bandwidthSettings][%d] getBandwidthSettingsOK %s", 200, payload) -} - -func (o *GetBandwidthSettingsOK) GetPayload() *models.VaultBandwidthLimits { - return o.Payload -} - -func (o *GetBandwidthSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VaultBandwidthLimits) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBandwidthSettingsDefault creates a GetBandwidthSettingsDefault with default headers values -func NewGetBandwidthSettingsDefault(code int) *GetBandwidthSettingsDefault { - return &GetBandwidthSettingsDefault{ - _statusCode: code, - } -} - -/* -GetBandwidthSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBandwidthSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get bandwidth settings default response has a 2xx status code -func (o *GetBandwidthSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get bandwidth settings default response has a 3xx status code -func (o *GetBandwidthSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get bandwidth settings default response has a 4xx status code -func (o *GetBandwidthSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get bandwidth settings default response has a 5xx status code -func (o *GetBandwidthSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get bandwidth settings default response a status code equal to that given -func (o *GetBandwidthSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get bandwidth settings default response -func (o *GetBandwidthSettingsDefault) Code() int { - return o._statusCode -} - -func (o *GetBandwidthSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/bandwidthSettings][%d] GetBandwidthSettings default %s", o._statusCode, payload) -} - -func (o *GetBandwidthSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/bandwidthSettings][%d] GetBandwidthSettings default %s", o._statusCode, payload) -} - -func (o *GetBandwidthSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetBandwidthSettingsDefault) 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/vaults/get_vault_by_id_parameters.go b/v1/client/vaults/get_vault_by_id_parameters.go deleted file mode 100644 index 8c326e61..00000000 --- a/v1/client/vaults/get_vault_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" -) - -// NewGetVaultByIDParams creates a new GetVaultByIDParams 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 NewGetVaultByIDParams() *GetVaultByIDParams { - return &GetVaultByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultByIDParamsWithTimeout creates a new GetVaultByIDParams object -// with the ability to set a timeout on a request. -func NewGetVaultByIDParamsWithTimeout(timeout time.Duration) *GetVaultByIDParams { - return &GetVaultByIDParams{ - timeout: timeout, - } -} - -// NewGetVaultByIDParamsWithContext creates a new GetVaultByIDParams object -// with the ability to set a context for a request. -func NewGetVaultByIDParamsWithContext(ctx context.Context) *GetVaultByIDParams { - return &GetVaultByIDParams{ - Context: ctx, - } -} - -// NewGetVaultByIDParamsWithHTTPClient creates a new GetVaultByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultByIDParamsWithHTTPClient(client *http.Client) *GetVaultByIDParams { - return &GetVaultByIDParams{ - HTTPClient: client, - } -} - -/* -GetVaultByIDParams contains all the parameters to send to the API endpoint - - for the get vault by Id operation. - - Typically these are written to a http.Request. -*/ -type GetVaultByIDParams struct { - - /* ID. - - Specifies a unique id of the Vault. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vault by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultByIDParams) WithDefaults() *GetVaultByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vault by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vault by Id params -func (o *GetVaultByIDParams) WithTimeout(timeout time.Duration) *GetVaultByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vault by Id params -func (o *GetVaultByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vault by Id params -func (o *GetVaultByIDParams) WithContext(ctx context.Context) *GetVaultByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vault by Id params -func (o *GetVaultByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vault by Id params -func (o *GetVaultByIDParams) WithHTTPClient(client *http.Client) *GetVaultByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vault by Id params -func (o *GetVaultByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get vault by Id params -func (o *GetVaultByIDParams) WithID(id int64) *GetVaultByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get vault by Id params -func (o *GetVaultByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vaults/get_vault_by_id_responses.go b/v1/client/vaults/get_vault_by_id_responses.go deleted file mode 100644 index e1a14bae..00000000 --- a/v1/client/vaults/get_vault_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultByIDReader is a Reader for the GetVaultByID structure. -type GetVaultByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultByIDDefault(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 - } -} - -// NewGetVaultByIDOK creates a GetVaultByIDOK with default headers values -func NewGetVaultByIDOK() *GetVaultByIDOK { - return &GetVaultByIDOK{} -} - -/* -GetVaultByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultByIDOK struct { - Payload *models.Vault -} - -// IsSuccess returns true when this get vault by Id o k response has a 2xx status code -func (o *GetVaultByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vault by Id o k response has a 3xx status code -func (o *GetVaultByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vault by Id o k response has a 4xx status code -func (o *GetVaultByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vault by Id o k response has a 5xx status code -func (o *GetVaultByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vault by Id o k response a status code equal to that given -func (o *GetVaultByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vault by Id o k response -func (o *GetVaultByIDOK) Code() int { - return 200 -} - -func (o *GetVaultByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/{id}][%d] getVaultByIdOK %s", 200, payload) -} - -func (o *GetVaultByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/{id}][%d] getVaultByIdOK %s", 200, payload) -} - -func (o *GetVaultByIDOK) GetPayload() *models.Vault { - return o.Payload -} - -func (o *GetVaultByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vault) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultByIDDefault creates a GetVaultByIDDefault with default headers values -func NewGetVaultByIDDefault(code int) *GetVaultByIDDefault { - return &GetVaultByIDDefault{ - _statusCode: code, - } -} - -/* -GetVaultByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get vault by Id default response has a 2xx status code -func (o *GetVaultByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vault by Id default response has a 3xx status code -func (o *GetVaultByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vault by Id default response has a 4xx status code -func (o *GetVaultByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vault by Id default response has a 5xx status code -func (o *GetVaultByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vault by Id default response a status code equal to that given -func (o *GetVaultByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vault by Id default response -func (o *GetVaultByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/{id}][%d] GetVaultById default %s", o._statusCode, payload) -} - -func (o *GetVaultByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/{id}][%d] GetVaultById default %s", o._statusCode, payload) -} - -func (o *GetVaultByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVaultByIDDefault) 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/vaults/get_vault_encryption_key_parameters.go b/v1/client/vaults/get_vault_encryption_key_parameters.go deleted file mode 100644 index ada3e2b0..00000000 --- a/v1/client/vaults/get_vault_encryption_key_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" -) - -// NewGetVaultEncryptionKeyParams creates a new GetVaultEncryptionKeyParams 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 NewGetVaultEncryptionKeyParams() *GetVaultEncryptionKeyParams { - return &GetVaultEncryptionKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultEncryptionKeyParamsWithTimeout creates a new GetVaultEncryptionKeyParams object -// with the ability to set a timeout on a request. -func NewGetVaultEncryptionKeyParamsWithTimeout(timeout time.Duration) *GetVaultEncryptionKeyParams { - return &GetVaultEncryptionKeyParams{ - timeout: timeout, - } -} - -// NewGetVaultEncryptionKeyParamsWithContext creates a new GetVaultEncryptionKeyParams object -// with the ability to set a context for a request. -func NewGetVaultEncryptionKeyParamsWithContext(ctx context.Context) *GetVaultEncryptionKeyParams { - return &GetVaultEncryptionKeyParams{ - Context: ctx, - } -} - -// NewGetVaultEncryptionKeyParamsWithHTTPClient creates a new GetVaultEncryptionKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultEncryptionKeyParamsWithHTTPClient(client *http.Client) *GetVaultEncryptionKeyParams { - return &GetVaultEncryptionKeyParams{ - HTTPClient: client, - } -} - -/* -GetVaultEncryptionKeyParams contains all the parameters to send to the API endpoint - - for the get vault encryption key operation. - - Typically these are written to a http.Request. -*/ -type GetVaultEncryptionKeyParams struct { - - /* ID. - - Specifies a unique id of the Vault. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vault encryption key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultEncryptionKeyParams) WithDefaults() *GetVaultEncryptionKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vault encryption key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultEncryptionKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) WithTimeout(timeout time.Duration) *GetVaultEncryptionKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) WithContext(ctx context.Context) *GetVaultEncryptionKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) WithHTTPClient(client *http.Client) *GetVaultEncryptionKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) WithID(id int64) *GetVaultEncryptionKeyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get vault encryption key params -func (o *GetVaultEncryptionKeyParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultEncryptionKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vaults/get_vault_encryption_key_responses.go b/v1/client/vaults/get_vault_encryption_key_responses.go deleted file mode 100644 index c01c46ea..00000000 --- a/v1/client/vaults/get_vault_encryption_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultEncryptionKeyReader is a Reader for the GetVaultEncryptionKey structure. -type GetVaultEncryptionKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultEncryptionKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultEncryptionKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultEncryptionKeyDefault(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 - } -} - -// NewGetVaultEncryptionKeyOK creates a GetVaultEncryptionKeyOK with default headers values -func NewGetVaultEncryptionKeyOK() *GetVaultEncryptionKeyOK { - return &GetVaultEncryptionKeyOK{} -} - -/* -GetVaultEncryptionKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultEncryptionKeyOK struct { - Payload *models.VaultEncryptionKey -} - -// IsSuccess returns true when this get vault encryption key o k response has a 2xx status code -func (o *GetVaultEncryptionKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vault encryption key o k response has a 3xx status code -func (o *GetVaultEncryptionKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vault encryption key o k response has a 4xx status code -func (o *GetVaultEncryptionKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vault encryption key o k response has a 5xx status code -func (o *GetVaultEncryptionKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vault encryption key o k response a status code equal to that given -func (o *GetVaultEncryptionKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vault encryption key o k response -func (o *GetVaultEncryptionKeyOK) Code() int { - return 200 -} - -func (o *GetVaultEncryptionKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/encryptionKey/{id}][%d] getVaultEncryptionKeyOK %s", 200, payload) -} - -func (o *GetVaultEncryptionKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/encryptionKey/{id}][%d] getVaultEncryptionKeyOK %s", 200, payload) -} - -func (o *GetVaultEncryptionKeyOK) GetPayload() *models.VaultEncryptionKey { - return o.Payload -} - -func (o *GetVaultEncryptionKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VaultEncryptionKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultEncryptionKeyDefault creates a GetVaultEncryptionKeyDefault with default headers values -func NewGetVaultEncryptionKeyDefault(code int) *GetVaultEncryptionKeyDefault { - return &GetVaultEncryptionKeyDefault{ - _statusCode: code, - } -} - -/* -GetVaultEncryptionKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultEncryptionKeyDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get vault encryption key default response has a 2xx status code -func (o *GetVaultEncryptionKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vault encryption key default response has a 3xx status code -func (o *GetVaultEncryptionKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vault encryption key default response has a 4xx status code -func (o *GetVaultEncryptionKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vault encryption key default response has a 5xx status code -func (o *GetVaultEncryptionKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vault encryption key default response a status code equal to that given -func (o *GetVaultEncryptionKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vault encryption key default response -func (o *GetVaultEncryptionKeyDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultEncryptionKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/encryptionKey/{id}][%d] GetVaultEncryptionKey default %s", o._statusCode, payload) -} - -func (o *GetVaultEncryptionKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults/encryptionKey/{id}][%d] GetVaultEncryptionKey default %s", o._statusCode, payload) -} - -func (o *GetVaultEncryptionKeyDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVaultEncryptionKeyDefault) 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/vaults/get_vaults_parameters.go b/v1/client/vaults/get_vaults_parameters.go deleted file mode 100644 index 9ec64b95..00000000 --- a/v1/client/vaults/get_vaults_parameters.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" -) - -// NewGetVaultsParams creates a new GetVaultsParams 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 NewGetVaultsParams() *GetVaultsParams { - return &GetVaultsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVaultsParamsWithTimeout creates a new GetVaultsParams object -// with the ability to set a timeout on a request. -func NewGetVaultsParamsWithTimeout(timeout time.Duration) *GetVaultsParams { - return &GetVaultsParams{ - timeout: timeout, - } -} - -// NewGetVaultsParamsWithContext creates a new GetVaultsParams object -// with the ability to set a context for a request. -func NewGetVaultsParamsWithContext(ctx context.Context) *GetVaultsParams { - return &GetVaultsParams{ - Context: ctx, - } -} - -// NewGetVaultsParamsWithHTTPClient creates a new GetVaultsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVaultsParamsWithHTTPClient(client *http.Client) *GetVaultsParams { - return &GetVaultsParams{ - HTTPClient: client, - } -} - -/* -GetVaultsParams contains all the parameters to send to the API endpoint - - for the get vaults operation. - - Typically these are written to a http.Request. -*/ -type GetVaultsParams struct { - - /* GlobalID. - - Specifies the global Identifier of the vault to be returned. If empty, - all Vaults are returned. - */ - GlobalID *string - - /* ID. - - Specifies the id of Vault to return. If empty, all Vaults are returned. - - Format: int64 - */ - ID *int64 - - /* IncludeFortKnoxVault. - - Specifies if Vaults that are RPaaS vaults should be returned. - */ - IncludeFortKnoxVault *bool - - /* IncludeMarkedForRemoval. - - Specifies if Vaults that are marked for removal should be returned. - */ - IncludeMarkedForRemoval *bool - - /* Name. - - Specifies the name of the Vault to return. If empty, all Vaults are - returned. - */ - Name *string - - /* TenantIds. - - Specifies a list of tenant ids. Only vaults assigned to these tenants - will be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vaults params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultsParams) WithDefaults() *GetVaultsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vaults params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVaultsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vaults params -func (o *GetVaultsParams) WithTimeout(timeout time.Duration) *GetVaultsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vaults params -func (o *GetVaultsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vaults params -func (o *GetVaultsParams) WithContext(ctx context.Context) *GetVaultsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vaults params -func (o *GetVaultsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vaults params -func (o *GetVaultsParams) WithHTTPClient(client *http.Client) *GetVaultsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vaults params -func (o *GetVaultsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithGlobalID adds the globalID to the get vaults params -func (o *GetVaultsParams) WithGlobalID(globalID *string) *GetVaultsParams { - o.SetGlobalID(globalID) - return o -} - -// SetGlobalID adds the globalId to the get vaults params -func (o *GetVaultsParams) SetGlobalID(globalID *string) { - o.GlobalID = globalID -} - -// WithID adds the id to the get vaults params -func (o *GetVaultsParams) WithID(id *int64) *GetVaultsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get vaults params -func (o *GetVaultsParams) SetID(id *int64) { - o.ID = id -} - -// WithIncludeFortKnoxVault adds the includeFortKnoxVault to the get vaults params -func (o *GetVaultsParams) WithIncludeFortKnoxVault(includeFortKnoxVault *bool) *GetVaultsParams { - o.SetIncludeFortKnoxVault(includeFortKnoxVault) - return o -} - -// SetIncludeFortKnoxVault adds the includeFortKnoxVault to the get vaults params -func (o *GetVaultsParams) SetIncludeFortKnoxVault(includeFortKnoxVault *bool) { - o.IncludeFortKnoxVault = includeFortKnoxVault -} - -// WithIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get vaults params -func (o *GetVaultsParams) WithIncludeMarkedForRemoval(includeMarkedForRemoval *bool) *GetVaultsParams { - o.SetIncludeMarkedForRemoval(includeMarkedForRemoval) - return o -} - -// SetIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get vaults params -func (o *GetVaultsParams) SetIncludeMarkedForRemoval(includeMarkedForRemoval *bool) { - o.IncludeMarkedForRemoval = includeMarkedForRemoval -} - -// WithName adds the name to the get vaults params -func (o *GetVaultsParams) WithName(name *string) *GetVaultsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get vaults params -func (o *GetVaultsParams) SetName(name *string) { - o.Name = name -} - -// WithTenantIds adds the tenantIds to the get vaults params -func (o *GetVaultsParams) WithTenantIds(tenantIds []string) *GetVaultsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get vaults params -func (o *GetVaultsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVaultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.GlobalID != nil { - - // query param globalId - var qrGlobalID string - - if o.GlobalID != nil { - qrGlobalID = *o.GlobalID - } - qGlobalID := qrGlobalID - if qGlobalID != "" { - - if err := r.SetQueryParam("globalId", qGlobalID); err != nil { - return err - } - } - } - - if o.ID != nil { - - // query param id - var qrID int64 - - if o.ID != nil { - qrID = *o.ID - } - qID := swag.FormatInt64(qrID) - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.IncludeFortKnoxVault != nil { - - // query param includeFortKnoxVault - var qrIncludeFortKnoxVault bool - - if o.IncludeFortKnoxVault != nil { - qrIncludeFortKnoxVault = *o.IncludeFortKnoxVault - } - qIncludeFortKnoxVault := swag.FormatBool(qrIncludeFortKnoxVault) - if qIncludeFortKnoxVault != "" { - - if err := r.SetQueryParam("includeFortKnoxVault", qIncludeFortKnoxVault); err != nil { - return err - } - } - } - - if o.IncludeMarkedForRemoval != nil { - - // query param includeMarkedForRemoval - var qrIncludeMarkedForRemoval bool - - if o.IncludeMarkedForRemoval != nil { - qrIncludeMarkedForRemoval = *o.IncludeMarkedForRemoval - } - qIncludeMarkedForRemoval := swag.FormatBool(qrIncludeMarkedForRemoval) - if qIncludeMarkedForRemoval != "" { - - if err := r.SetQueryParam("includeMarkedForRemoval", qIncludeMarkedForRemoval); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetVaults binds the parameter tenantIds -func (o *GetVaultsParams) 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/v1/client/vaults/get_vaults_responses.go b/v1/client/vaults/get_vaults_responses.go deleted file mode 100644 index fdc7caf6..00000000 --- a/v1/client/vaults/get_vaults_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVaultsReader is a Reader for the GetVaults structure. -type GetVaultsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVaultsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVaultsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVaultsDefault(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 - } -} - -// NewGetVaultsOK creates a GetVaultsOK with default headers values -func NewGetVaultsOK() *GetVaultsOK { - return &GetVaultsOK{} -} - -/* -GetVaultsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVaultsOK struct { - Payload []*models.Vault -} - -// IsSuccess returns true when this get vaults o k response has a 2xx status code -func (o *GetVaultsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vaults o k response has a 3xx status code -func (o *GetVaultsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vaults o k response has a 4xx status code -func (o *GetVaultsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vaults o k response has a 5xx status code -func (o *GetVaultsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vaults o k response a status code equal to that given -func (o *GetVaultsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vaults o k response -func (o *GetVaultsOK) Code() int { - return 200 -} - -func (o *GetVaultsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults][%d] getVaultsOK %s", 200, payload) -} - -func (o *GetVaultsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults][%d] getVaultsOK %s", 200, payload) -} - -func (o *GetVaultsOK) GetPayload() []*models.Vault { - return o.Payload -} - -func (o *GetVaultsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVaultsDefault creates a GetVaultsDefault with default headers values -func NewGetVaultsDefault(code int) *GetVaultsDefault { - return &GetVaultsDefault{ - _statusCode: code, - } -} - -/* -GetVaultsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVaultsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get vaults default response has a 2xx status code -func (o *GetVaultsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vaults default response has a 3xx status code -func (o *GetVaultsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vaults default response has a 4xx status code -func (o *GetVaultsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vaults default response has a 5xx status code -func (o *GetVaultsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vaults default response a status code equal to that given -func (o *GetVaultsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vaults default response -func (o *GetVaultsDefault) Code() int { - return o._statusCode -} - -func (o *GetVaultsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults][%d] GetVaults default %s", o._statusCode, payload) -} - -func (o *GetVaultsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vaults][%d] GetVaults default %s", o._statusCode, payload) -} - -func (o *GetVaultsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVaultsDefault) 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/vaults/update_bandwidth_settings_parameters.go b/v1/client/vaults/update_bandwidth_settings_parameters.go deleted file mode 100644 index 2b2df4ab..00000000 --- a/v1/client/vaults/update_bandwidth_settings_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateBandwidthSettingsParams creates a new UpdateBandwidthSettingsParams 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 NewUpdateBandwidthSettingsParams() *UpdateBandwidthSettingsParams { - return &UpdateBandwidthSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateBandwidthSettingsParamsWithTimeout creates a new UpdateBandwidthSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateBandwidthSettingsParamsWithTimeout(timeout time.Duration) *UpdateBandwidthSettingsParams { - return &UpdateBandwidthSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateBandwidthSettingsParamsWithContext creates a new UpdateBandwidthSettingsParams object -// with the ability to set a context for a request. -func NewUpdateBandwidthSettingsParamsWithContext(ctx context.Context) *UpdateBandwidthSettingsParams { - return &UpdateBandwidthSettingsParams{ - Context: ctx, - } -} - -// NewUpdateBandwidthSettingsParamsWithHTTPClient creates a new UpdateBandwidthSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateBandwidthSettingsParamsWithHTTPClient(client *http.Client) *UpdateBandwidthSettingsParams { - return &UpdateBandwidthSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateBandwidthSettingsParams contains all the parameters to send to the API endpoint - - for the update bandwidth settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateBandwidthSettingsParams struct { - - /* Body. - - Request to update global bandwidth limits settings. - */ - Body *models.VaultBandwidthLimits - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update bandwidth settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBandwidthSettingsParams) WithDefaults() *UpdateBandwidthSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update bandwidth settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateBandwidthSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) WithTimeout(timeout time.Duration) *UpdateBandwidthSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) WithContext(ctx context.Context) *UpdateBandwidthSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) WithHTTPClient(client *http.Client) *UpdateBandwidthSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) WithBody(body *models.VaultBandwidthLimits) *UpdateBandwidthSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update bandwidth settings params -func (o *UpdateBandwidthSettingsParams) SetBody(body *models.VaultBandwidthLimits) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateBandwidthSettingsParams) 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/vaults/update_bandwidth_settings_responses.go b/v1/client/vaults/update_bandwidth_settings_responses.go deleted file mode 100644 index cc0c4604..00000000 --- a/v1/client/vaults/update_bandwidth_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateBandwidthSettingsReader is a Reader for the UpdateBandwidthSettings structure. -type UpdateBandwidthSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateBandwidthSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateBandwidthSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateBandwidthSettingsDefault(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 - } -} - -// NewUpdateBandwidthSettingsOK creates a UpdateBandwidthSettingsOK with default headers values -func NewUpdateBandwidthSettingsOK() *UpdateBandwidthSettingsOK { - return &UpdateBandwidthSettingsOK{} -} - -/* -UpdateBandwidthSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateBandwidthSettingsOK struct { - Payload *models.VaultBandwidthLimits -} - -// IsSuccess returns true when this update bandwidth settings o k response has a 2xx status code -func (o *UpdateBandwidthSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update bandwidth settings o k response has a 3xx status code -func (o *UpdateBandwidthSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update bandwidth settings o k response has a 4xx status code -func (o *UpdateBandwidthSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update bandwidth settings o k response has a 5xx status code -func (o *UpdateBandwidthSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update bandwidth settings o k response a status code equal to that given -func (o *UpdateBandwidthSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update bandwidth settings o k response -func (o *UpdateBandwidthSettingsOK) Code() int { - return 200 -} - -func (o *UpdateBandwidthSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/bandwidthSettings][%d] updateBandwidthSettingsOK %s", 200, payload) -} - -func (o *UpdateBandwidthSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/bandwidthSettings][%d] updateBandwidthSettingsOK %s", 200, payload) -} - -func (o *UpdateBandwidthSettingsOK) GetPayload() *models.VaultBandwidthLimits { - return o.Payload -} - -func (o *UpdateBandwidthSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VaultBandwidthLimits) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateBandwidthSettingsDefault creates a UpdateBandwidthSettingsDefault with default headers values -func NewUpdateBandwidthSettingsDefault(code int) *UpdateBandwidthSettingsDefault { - return &UpdateBandwidthSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateBandwidthSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateBandwidthSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update bandwidth settings default response has a 2xx status code -func (o *UpdateBandwidthSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update bandwidth settings default response has a 3xx status code -func (o *UpdateBandwidthSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update bandwidth settings default response has a 4xx status code -func (o *UpdateBandwidthSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update bandwidth settings default response has a 5xx status code -func (o *UpdateBandwidthSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update bandwidth settings default response a status code equal to that given -func (o *UpdateBandwidthSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update bandwidth settings default response -func (o *UpdateBandwidthSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateBandwidthSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/bandwidthSettings][%d] UpdateBandwidthSettings default %s", o._statusCode, payload) -} - -func (o *UpdateBandwidthSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/bandwidthSettings][%d] UpdateBandwidthSettings default %s", o._statusCode, payload) -} - -func (o *UpdateBandwidthSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateBandwidthSettingsDefault) 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/vaults/update_vault_parameters.go b/v1/client/vaults/update_vault_parameters.go deleted file mode 100644 index cb3c3416..00000000 --- a/v1/client/vaults/update_vault_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateVaultParams creates a new UpdateVaultParams 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 NewUpdateVaultParams() *UpdateVaultParams { - return &UpdateVaultParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateVaultParamsWithTimeout creates a new UpdateVaultParams object -// with the ability to set a timeout on a request. -func NewUpdateVaultParamsWithTimeout(timeout time.Duration) *UpdateVaultParams { - return &UpdateVaultParams{ - timeout: timeout, - } -} - -// NewUpdateVaultParamsWithContext creates a new UpdateVaultParams object -// with the ability to set a context for a request. -func NewUpdateVaultParamsWithContext(ctx context.Context) *UpdateVaultParams { - return &UpdateVaultParams{ - Context: ctx, - } -} - -// NewUpdateVaultParamsWithHTTPClient creates a new UpdateVaultParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateVaultParamsWithHTTPClient(client *http.Client) *UpdateVaultParams { - return &UpdateVaultParams{ - HTTPClient: client, - } -} - -/* -UpdateVaultParams contains all the parameters to send to the API endpoint - - for the update vault operation. - - Typically these are written to a http.Request. -*/ -type UpdateVaultParams struct { - - /* Body. - - Request to update a Vault's settings. - */ - Body *models.Vault - - /* ID. - - Specifies a unique id of the Vault. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateVaultParams) WithDefaults() *UpdateVaultParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update vault params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateVaultParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update vault params -func (o *UpdateVaultParams) WithTimeout(timeout time.Duration) *UpdateVaultParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update vault params -func (o *UpdateVaultParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update vault params -func (o *UpdateVaultParams) WithContext(ctx context.Context) *UpdateVaultParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update vault params -func (o *UpdateVaultParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update vault params -func (o *UpdateVaultParams) WithHTTPClient(client *http.Client) *UpdateVaultParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update vault params -func (o *UpdateVaultParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update vault params -func (o *UpdateVaultParams) WithBody(body *models.Vault) *UpdateVaultParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update vault params -func (o *UpdateVaultParams) SetBody(body *models.Vault) { - o.Body = body -} - -// WithID adds the id to the update vault params -func (o *UpdateVaultParams) WithID(id int64) *UpdateVaultParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update vault params -func (o *UpdateVaultParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateVaultParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vaults/update_vault_responses.go b/v1/client/vaults/update_vault_responses.go deleted file mode 100644 index 58757ee2..00000000 --- a/v1/client/vaults/update_vault_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateVaultReader is a Reader for the UpdateVault structure. -type UpdateVaultReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateVaultReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateVaultOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateVaultDefault(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 - } -} - -// NewUpdateVaultOK creates a UpdateVaultOK with default headers values -func NewUpdateVaultOK() *UpdateVaultOK { - return &UpdateVaultOK{} -} - -/* -UpdateVaultOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateVaultOK struct { - Payload *models.Vault -} - -// IsSuccess returns true when this update vault o k response has a 2xx status code -func (o *UpdateVaultOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update vault o k response has a 3xx status code -func (o *UpdateVaultOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update vault o k response has a 4xx status code -func (o *UpdateVaultOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update vault o k response has a 5xx status code -func (o *UpdateVaultOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update vault o k response a status code equal to that given -func (o *UpdateVaultOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update vault o k response -func (o *UpdateVaultOK) Code() int { - return 200 -} - -func (o *UpdateVaultOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/{id}][%d] updateVaultOK %s", 200, payload) -} - -func (o *UpdateVaultOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/{id}][%d] updateVaultOK %s", 200, payload) -} - -func (o *UpdateVaultOK) GetPayload() *models.Vault { - return o.Payload -} - -func (o *UpdateVaultOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vault) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateVaultDefault creates a UpdateVaultDefault with default headers values -func NewUpdateVaultDefault(code int) *UpdateVaultDefault { - return &UpdateVaultDefault{ - _statusCode: code, - } -} - -/* -UpdateVaultDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateVaultDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update vault default response has a 2xx status code -func (o *UpdateVaultDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update vault default response has a 3xx status code -func (o *UpdateVaultDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update vault default response has a 4xx status code -func (o *UpdateVaultDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update vault default response has a 5xx status code -func (o *UpdateVaultDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update vault default response a status code equal to that given -func (o *UpdateVaultDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update vault default response -func (o *UpdateVaultDefault) Code() int { - return o._statusCode -} - -func (o *UpdateVaultDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/{id}][%d] UpdateVault default %s", o._statusCode, payload) -} - -func (o *UpdateVaultDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vaults/{id}][%d] UpdateVault default %s", o._statusCode, payload) -} - -func (o *UpdateVaultDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateVaultDefault) 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/vaults/vaults_client.go b/v1/client/vaults/vaults_client.go deleted file mode 100644 index 18224e34..00000000 --- a/v1/client/vaults/vaults_client.go +++ /dev/null @@ -1,468 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vaults - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new vaults API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new vaults API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new vaults API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for vaults API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateVault(params *CreateVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVaultCreated, error) - - DeleteVault(params *DeleteVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteVaultNoContent, error) - - GetArchiveMediaInfo(params *GetArchiveMediaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetArchiveMediaInfoOK, error) - - GetBandwidthSettings(params *GetBandwidthSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBandwidthSettingsOK, error) - - GetVaultByID(params *GetVaultByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultByIDOK, error) - - GetVaultEncryptionKey(params *GetVaultEncryptionKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultEncryptionKeyOK, error) - - GetVaults(params *GetVaultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultsOK, error) - - UpdateBandwidthSettings(params *UpdateBandwidthSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBandwidthSettingsOK, error) - - UpdateVault(params *UpdateVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateVaultOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateVault creates a new vault external target - - Returns the created Vault. - -A Vault is equivalent to an External Target in the Cohesity Dashboard. -*/ -func (a *Client) CreateVault(params *CreateVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVaultCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateVaultParams() - } - op := &runtime.ClientOperation{ - ID: "CreateVault", - Method: "POST", - PathPattern: "/public/vaults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateVaultReader{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.(*CreateVaultCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateVaultDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteVault deletes a vault external target - - Returns delete status upon completion. - -A Vault is equivalent to an External Target in the Cohesity Dashboard. -*/ -func (a *Client) DeleteVault(params *DeleteVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteVaultNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteVaultParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteVault", - Method: "DELETE", - PathPattern: "/public/vaults/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteVaultReader{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.(*DeleteVaultNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteVaultDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetArchiveMediaInfo lists the media information for the specified archive service - - Returns the media information about the specified archive service uid - -(such as a QStar tape archive service). - -An archive service uid is uniquely identified using a combination of the -following fields: clusterIncarnationId, entityIds and clusterId. -These are all required fields. -*/ -func (a *Client) GetArchiveMediaInfo(params *GetArchiveMediaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetArchiveMediaInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetArchiveMediaInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetArchiveMediaInfo", - Method: "GET", - PathPattern: "/public/vaults/archiveMediaInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetArchiveMediaInfoReader{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.(*GetArchiveMediaInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetArchiveMediaInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBandwidthSettings lists the upload and download bandwidth limit and bandwidth overrides settings - -Returns the upload and download bandwidth limits. -*/ -func (a *Client) GetBandwidthSettings(params *GetBandwidthSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBandwidthSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBandwidthSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "GetBandwidthSettings", - Method: "GET", - PathPattern: "/public/vaults/bandwidthSettings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBandwidthSettingsReader{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.(*GetBandwidthSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBandwidthSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetVaultByID lists details about a single vault external target - - Returns the Vault corresponding to the specified Vault Id. - -A Vault is equivalent to an External Target in the Cohesity Dashboard. -*/ -func (a *Client) GetVaultByID(params *GetVaultByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaultById", - Method: "GET", - PathPattern: "/public/vaults/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultByIDReader{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.(*GetVaultByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetVaultEncryptionKey gets encryption information for a vault external target a vault is equivalent to an external target in the cohesity dashboard - - Get encryption information (such as the encryption key) - -for the specified Vault (External Target). -To restore data to a remote Cluster (for example to support a disaster -recovery scenario), you must get the encryption key of the Vault -and store it outside the local source Cluster, before disaster strikes. -If you have the encryption key and the local source Cluster goes down, -you can restore the data to a remote Cluster from the Vault. -The local source Cluster is the Cluster that archived the data on the Vault. -*/ -func (a *Client) GetVaultEncryptionKey(params *GetVaultEncryptionKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultEncryptionKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultEncryptionKeyParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaultEncryptionKey", - Method: "GET", - PathPattern: "/public/vaults/encryptionKey/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultEncryptionKeyReader{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.(*GetVaultEncryptionKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultEncryptionKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetVaults lists the vaults external targets registered on the cohesity cluster filtered by the specified parameters - - If no parameters are specified, all Vaults (External Targets) currently - -registered on the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -A Vault is equivalent to an External Target in the Cohesity Dashboard. -*/ -func (a *Client) GetVaults(params *GetVaultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVaultsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVaultsParams() - } - op := &runtime.ClientOperation{ - ID: "GetVaults", - Method: "GET", - PathPattern: "/public/vaults", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVaultsReader{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.(*GetVaultsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVaultsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateBandwidthSettings updates bandwidth limits - -Returns the updated bandwidth limits. -*/ -func (a *Client) UpdateBandwidthSettings(params *UpdateBandwidthSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateBandwidthSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateBandwidthSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateBandwidthSettings", - Method: "PUT", - PathPattern: "/public/vaults/bandwidthSettings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateBandwidthSettingsReader{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.(*UpdateBandwidthSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateBandwidthSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateVault updates a vault external target - - Update the settings of a Vault. - -A Vault is equivalent to an External Target in the Cohesity Dashboard. -Returns the updated Vault. -*/ -func (a *Client) UpdateVault(params *UpdateVaultParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateVaultOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateVaultParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateVault", - Method: "PUT", - PathPattern: "/public/vaults/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateVaultReader{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.(*UpdateVaultOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateVaultDefault) - 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/view_boxes/create_view_box_parameters.go b/v1/client/view_boxes/create_view_box_parameters.go deleted file mode 100644 index 350658f2..00000000 --- a/v1/client/view_boxes/create_view_box_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateViewBoxParams creates a new CreateViewBoxParams 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 NewCreateViewBoxParams() *CreateViewBoxParams { - return &CreateViewBoxParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewBoxParamsWithTimeout creates a new CreateViewBoxParams object -// with the ability to set a timeout on a request. -func NewCreateViewBoxParamsWithTimeout(timeout time.Duration) *CreateViewBoxParams { - return &CreateViewBoxParams{ - timeout: timeout, - } -} - -// NewCreateViewBoxParamsWithContext creates a new CreateViewBoxParams object -// with the ability to set a context for a request. -func NewCreateViewBoxParamsWithContext(ctx context.Context) *CreateViewBoxParams { - return &CreateViewBoxParams{ - Context: ctx, - } -} - -// NewCreateViewBoxParamsWithHTTPClient creates a new CreateViewBoxParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewBoxParamsWithHTTPClient(client *http.Client) *CreateViewBoxParams { - return &CreateViewBoxParams{ - HTTPClient: client, - } -} - -/* -CreateViewBoxParams contains all the parameters to send to the API endpoint - - for the create view box operation. - - Typically these are written to a http.Request. -*/ -type CreateViewBoxParams struct { - - /* Body. - - Request to create a Storage Domain (View Box) configuration. - */ - Body *models.CreateViewBoxParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewBoxParams) WithDefaults() *CreateViewBoxParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewBoxParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view box params -func (o *CreateViewBoxParams) WithTimeout(timeout time.Duration) *CreateViewBoxParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view box params -func (o *CreateViewBoxParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view box params -func (o *CreateViewBoxParams) WithContext(ctx context.Context) *CreateViewBoxParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view box params -func (o *CreateViewBoxParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view box params -func (o *CreateViewBoxParams) WithHTTPClient(client *http.Client) *CreateViewBoxParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view box params -func (o *CreateViewBoxParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view box params -func (o *CreateViewBoxParams) WithBody(body *models.CreateViewBoxParams) *CreateViewBoxParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view box params -func (o *CreateViewBoxParams) SetBody(body *models.CreateViewBoxParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewBoxParams) 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/view_boxes/create_view_box_responses.go b/v1/client/view_boxes/create_view_box_responses.go deleted file mode 100644 index 39af64a6..00000000 --- a/v1/client/view_boxes/create_view_box_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateViewBoxReader is a Reader for the CreateViewBox structure. -type CreateViewBoxReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewBoxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewBoxCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewBoxDefault(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 - } -} - -// NewCreateViewBoxCreated creates a CreateViewBoxCreated with default headers values -func NewCreateViewBoxCreated() *CreateViewBoxCreated { - return &CreateViewBoxCreated{} -} - -/* -CreateViewBoxCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewBoxCreated struct { - Payload *models.ViewBox -} - -// IsSuccess returns true when this create view box created response has a 2xx status code -func (o *CreateViewBoxCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view box created response has a 3xx status code -func (o *CreateViewBoxCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view box created response has a 4xx status code -func (o *CreateViewBoxCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view box created response has a 5xx status code -func (o *CreateViewBoxCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view box created response a status code equal to that given -func (o *CreateViewBoxCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view box created response -func (o *CreateViewBoxCreated) Code() int { - return 201 -} - -func (o *CreateViewBoxCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewBoxes][%d] createViewBoxCreated %s", 201, payload) -} - -func (o *CreateViewBoxCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewBoxes][%d] createViewBoxCreated %s", 201, payload) -} - -func (o *CreateViewBoxCreated) GetPayload() *models.ViewBox { - return o.Payload -} - -func (o *CreateViewBoxCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewBox) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewBoxDefault creates a CreateViewBoxDefault with default headers values -func NewCreateViewBoxDefault(code int) *CreateViewBoxDefault { - return &CreateViewBoxDefault{ - _statusCode: code, - } -} - -/* -CreateViewBoxDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewBoxDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create view box default response has a 2xx status code -func (o *CreateViewBoxDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view box default response has a 3xx status code -func (o *CreateViewBoxDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view box default response has a 4xx status code -func (o *CreateViewBoxDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view box default response has a 5xx status code -func (o *CreateViewBoxDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view box default response a status code equal to that given -func (o *CreateViewBoxDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view box default response -func (o *CreateViewBoxDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewBoxDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewBoxes][%d] CreateViewBox default %s", o._statusCode, payload) -} - -func (o *CreateViewBoxDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewBoxes][%d] CreateViewBox default %s", o._statusCode, payload) -} - -func (o *CreateViewBoxDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateViewBoxDefault) 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/view_boxes/delete_view_box_parameters.go b/v1/client/view_boxes/delete_view_box_parameters.go deleted file mode 100644 index 414435a6..00000000 --- a/v1/client/view_boxes/delete_view_box_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/go-openapi/swag" -) - -// NewDeleteViewBoxParams creates a new DeleteViewBoxParams 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 NewDeleteViewBoxParams() *DeleteViewBoxParams { - return &DeleteViewBoxParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewBoxParamsWithTimeout creates a new DeleteViewBoxParams object -// with the ability to set a timeout on a request. -func NewDeleteViewBoxParamsWithTimeout(timeout time.Duration) *DeleteViewBoxParams { - return &DeleteViewBoxParams{ - timeout: timeout, - } -} - -// NewDeleteViewBoxParamsWithContext creates a new DeleteViewBoxParams object -// with the ability to set a context for a request. -func NewDeleteViewBoxParamsWithContext(ctx context.Context) *DeleteViewBoxParams { - return &DeleteViewBoxParams{ - Context: ctx, - } -} - -// NewDeleteViewBoxParamsWithHTTPClient creates a new DeleteViewBoxParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewBoxParamsWithHTTPClient(client *http.Client) *DeleteViewBoxParams { - return &DeleteViewBoxParams{ - HTTPClient: client, - } -} - -/* -DeleteViewBoxParams contains all the parameters to send to the API endpoint - - for the delete view box operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewBoxParams struct { - - /* ID. - - Id of the Storage Domain (View Box) - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewBoxParams) WithDefaults() *DeleteViewBoxParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewBoxParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view box params -func (o *DeleteViewBoxParams) WithTimeout(timeout time.Duration) *DeleteViewBoxParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view box params -func (o *DeleteViewBoxParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view box params -func (o *DeleteViewBoxParams) WithContext(ctx context.Context) *DeleteViewBoxParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view box params -func (o *DeleteViewBoxParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view box params -func (o *DeleteViewBoxParams) WithHTTPClient(client *http.Client) *DeleteViewBoxParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view box params -func (o *DeleteViewBoxParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete view box params -func (o *DeleteViewBoxParams) WithID(id int64) *DeleteViewBoxParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete view box params -func (o *DeleteViewBoxParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewBoxParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/view_boxes/delete_view_box_responses.go b/v1/client/view_boxes/delete_view_box_responses.go deleted file mode 100644 index 95df8a22..00000000 --- a/v1/client/view_boxes/delete_view_box_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteViewBoxReader is a Reader for the DeleteViewBox structure. -type DeleteViewBoxReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewBoxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewBoxNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewBoxDefault(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 - } -} - -// NewDeleteViewBoxNoContent creates a DeleteViewBoxNoContent with default headers values -func NewDeleteViewBoxNoContent() *DeleteViewBoxNoContent { - return &DeleteViewBoxNoContent{} -} - -/* -DeleteViewBoxNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewBoxNoContent struct { -} - -// IsSuccess returns true when this delete view box no content response has a 2xx status code -func (o *DeleteViewBoxNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view box no content response has a 3xx status code -func (o *DeleteViewBoxNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view box no content response has a 4xx status code -func (o *DeleteViewBoxNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view box no content response has a 5xx status code -func (o *DeleteViewBoxNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view box no content response a status code equal to that given -func (o *DeleteViewBoxNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view box no content response -func (o *DeleteViewBoxNoContent) Code() int { - return 204 -} - -func (o *DeleteViewBoxNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/viewBoxes/{id}][%d] deleteViewBoxNoContent", 204) -} - -func (o *DeleteViewBoxNoContent) String() string { - return fmt.Sprintf("[DELETE /public/viewBoxes/{id}][%d] deleteViewBoxNoContent", 204) -} - -func (o *DeleteViewBoxNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewBoxDefault creates a DeleteViewBoxDefault with default headers values -func NewDeleteViewBoxDefault(code int) *DeleteViewBoxDefault { - return &DeleteViewBoxDefault{ - _statusCode: code, - } -} - -/* -DeleteViewBoxDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewBoxDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete view box default response has a 2xx status code -func (o *DeleteViewBoxDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view box default response has a 3xx status code -func (o *DeleteViewBoxDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view box default response has a 4xx status code -func (o *DeleteViewBoxDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view box default response has a 5xx status code -func (o *DeleteViewBoxDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view box default response a status code equal to that given -func (o *DeleteViewBoxDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view box default response -func (o *DeleteViewBoxDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewBoxDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewBoxes/{id}][%d] DeleteViewBox default %s", o._statusCode, payload) -} - -func (o *DeleteViewBoxDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewBoxes/{id}][%d] DeleteViewBox default %s", o._statusCode, payload) -} - -func (o *DeleteViewBoxDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteViewBoxDefault) 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/view_boxes/get_view_box_by_id_parameters.go b/v1/client/view_boxes/get_view_box_by_id_parameters.go deleted file mode 100644 index eac53243..00000000 --- a/v1/client/view_boxes/get_view_box_by_id_parameters.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/go-openapi/swag" -) - -// NewGetViewBoxByIDParams creates a new GetViewBoxByIDParams 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 NewGetViewBoxByIDParams() *GetViewBoxByIDParams { - return &GetViewBoxByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewBoxByIDParamsWithTimeout creates a new GetViewBoxByIDParams object -// with the ability to set a timeout on a request. -func NewGetViewBoxByIDParamsWithTimeout(timeout time.Duration) *GetViewBoxByIDParams { - return &GetViewBoxByIDParams{ - timeout: timeout, - } -} - -// NewGetViewBoxByIDParamsWithContext creates a new GetViewBoxByIDParams object -// with the ability to set a context for a request. -func NewGetViewBoxByIDParamsWithContext(ctx context.Context) *GetViewBoxByIDParams { - return &GetViewBoxByIDParams{ - Context: ctx, - } -} - -// NewGetViewBoxByIDParamsWithHTTPClient creates a new GetViewBoxByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewBoxByIDParamsWithHTTPClient(client *http.Client) *GetViewBoxByIDParams { - return &GetViewBoxByIDParams{ - HTTPClient: client, - } -} - -/* -GetViewBoxByIDParams contains all the parameters to send to the API endpoint - - for the get view box by Id operation. - - Typically these are written to a http.Request. -*/ -type GetViewBoxByIDParams struct { - - /* FetchStats. - - Specifies whether to include usage and performance statistics. - */ - FetchStats *bool - - /* ID. - - Id of the Storage Domain (View Box) - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view box by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxByIDParams) WithDefaults() *GetViewBoxByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view box by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view box by Id params -func (o *GetViewBoxByIDParams) WithTimeout(timeout time.Duration) *GetViewBoxByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view box by Id params -func (o *GetViewBoxByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view box by Id params -func (o *GetViewBoxByIDParams) WithContext(ctx context.Context) *GetViewBoxByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view box by Id params -func (o *GetViewBoxByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view box by Id params -func (o *GetViewBoxByIDParams) WithHTTPClient(client *http.Client) *GetViewBoxByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view box by Id params -func (o *GetViewBoxByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFetchStats adds the fetchStats to the get view box by Id params -func (o *GetViewBoxByIDParams) WithFetchStats(fetchStats *bool) *GetViewBoxByIDParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get view box by Id params -func (o *GetViewBoxByIDParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithID adds the id to the get view box by Id params -func (o *GetViewBoxByIDParams) WithID(id int64) *GetViewBoxByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get view box by Id params -func (o *GetViewBoxByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewBoxByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/view_boxes/get_view_box_by_id_responses.go b/v1/client/view_boxes/get_view_box_by_id_responses.go deleted file mode 100644 index 9c17d411..00000000 --- a/v1/client/view_boxes/get_view_box_by_id_responses.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewBoxByIDReader is a Reader for the GetViewBoxByID structure. -type GetViewBoxByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewBoxByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewBoxByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetViewBoxByIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewGetViewBoxByIDDefault(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 - } -} - -// NewGetViewBoxByIDOK creates a GetViewBoxByIDOK with default headers values -func NewGetViewBoxByIDOK() *GetViewBoxByIDOK { - return &GetViewBoxByIDOK{} -} - -/* -GetViewBoxByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewBoxByIDOK struct { - Payload *models.ViewBox -} - -// IsSuccess returns true when this get view box by Id o k response has a 2xx status code -func (o *GetViewBoxByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view box by Id o k response has a 3xx status code -func (o *GetViewBoxByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view box by Id o k response has a 4xx status code -func (o *GetViewBoxByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view box by Id o k response has a 5xx status code -func (o *GetViewBoxByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view box by Id o k response a status code equal to that given -func (o *GetViewBoxByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view box by Id o k response -func (o *GetViewBoxByIDOK) Code() int { - return 200 -} - -func (o *GetViewBoxByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] getViewBoxByIdOK %s", 200, payload) -} - -func (o *GetViewBoxByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] getViewBoxByIdOK %s", 200, payload) -} - -func (o *GetViewBoxByIDOK) GetPayload() *models.ViewBox { - return o.Payload -} - -func (o *GetViewBoxByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewBox) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewBoxByIDNotFound creates a GetViewBoxByIDNotFound with default headers values -func NewGetViewBoxByIDNotFound() *GetViewBoxByIDNotFound { - return &GetViewBoxByIDNotFound{} -} - -/* -GetViewBoxByIDNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetViewBoxByIDNotFound struct { -} - -// IsSuccess returns true when this get view box by Id not found response has a 2xx status code -func (o *GetViewBoxByIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get view box by Id not found response has a 3xx status code -func (o *GetViewBoxByIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view box by Id not found response has a 4xx status code -func (o *GetViewBoxByIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get view box by Id not found response has a 5xx status code -func (o *GetViewBoxByIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get view box by Id not found response a status code equal to that given -func (o *GetViewBoxByIDNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get view box by Id not found response -func (o *GetViewBoxByIDNotFound) Code() int { - return 404 -} - -func (o *GetViewBoxByIDNotFound) Error() string { - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] getViewBoxByIdNotFound", 404) -} - -func (o *GetViewBoxByIDNotFound) String() string { - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] getViewBoxByIdNotFound", 404) -} - -func (o *GetViewBoxByIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetViewBoxByIDDefault creates a GetViewBoxByIDDefault with default headers values -func NewGetViewBoxByIDDefault(code int) *GetViewBoxByIDDefault { - return &GetViewBoxByIDDefault{ - _statusCode: code, - } -} - -/* -GetViewBoxByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewBoxByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view box by Id default response has a 2xx status code -func (o *GetViewBoxByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view box by Id default response has a 3xx status code -func (o *GetViewBoxByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view box by Id default response has a 4xx status code -func (o *GetViewBoxByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view box by Id default response has a 5xx status code -func (o *GetViewBoxByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view box by Id default response a status code equal to that given -func (o *GetViewBoxByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view box by Id default response -func (o *GetViewBoxByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetViewBoxByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] GetViewBoxById default %s", o._statusCode, payload) -} - -func (o *GetViewBoxByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes/{id}][%d] GetViewBoxById default %s", o._statusCode, payload) -} - -func (o *GetViewBoxByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewBoxByIDDefault) 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/view_boxes/get_view_boxes_parameters.go b/v1/client/view_boxes/get_view_boxes_parameters.go deleted file mode 100644 index 9807e024..00000000 --- a/v1/client/view_boxes/get_view_boxes_parameters.go +++ /dev/null @@ -1,489 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/go-openapi/swag" -) - -// NewGetViewBoxesParams creates a new GetViewBoxesParams 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 NewGetViewBoxesParams() *GetViewBoxesParams { - return &GetViewBoxesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewBoxesParamsWithTimeout creates a new GetViewBoxesParams object -// with the ability to set a timeout on a request. -func NewGetViewBoxesParamsWithTimeout(timeout time.Duration) *GetViewBoxesParams { - return &GetViewBoxesParams{ - timeout: timeout, - } -} - -// NewGetViewBoxesParamsWithContext creates a new GetViewBoxesParams object -// with the ability to set a context for a request. -func NewGetViewBoxesParamsWithContext(ctx context.Context) *GetViewBoxesParams { - return &GetViewBoxesParams{ - Context: ctx, - } -} - -// NewGetViewBoxesParamsWithHTTPClient creates a new GetViewBoxesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewBoxesParamsWithHTTPClient(client *http.Client) *GetViewBoxesParams { - return &GetViewBoxesParams{ - HTTPClient: client, - } -} - -/* -GetViewBoxesParams contains all the parameters to send to the API endpoint - - for the get view boxes operation. - - Typically these are written to a http.Request. -*/ -type GetViewBoxesParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* ClusterPartitionIds. - - Filter by a list of Cluster Partition Ids. - */ - ClusterPartitionIds []int64 - - /* FetchStats. - - Specifies whether to include usage and performance statistics. - */ - FetchStats *bool - - /* FetchTimeSeriesSchema. - - Specifies whether to get time series schema info of the view box. - */ - FetchTimeSeriesSchema *bool - - /* Ids. - - Filter by a list of Storage Domain (View Box) ids. - If empty, View Boxes are not filtered by id. - */ - Ids []int64 - - /* MatchPartialNames. - - If true, the names in 'names' field are matched by prefix rather than - exactly matched. - */ - MatchPartialNames *bool - - /* Names. - - Filter by a list of Storage Domain (View Box) Names. - If empty, Storage Domains (View Boxes) are not filtered by Name. - */ - Names []string - - /* TemplateID. - - Filter list of Storage Domain (View Box) by the properties of the template - like dedup, compression. - If empty, Storage Domains (View Boxes) are not filtered. - - Format: int64 - */ - TemplateID *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view boxes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxesParams) WithDefaults() *GetViewBoxesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view boxes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewBoxesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view boxes params -func (o *GetViewBoxesParams) WithTimeout(timeout time.Duration) *GetViewBoxesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view boxes params -func (o *GetViewBoxesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view boxes params -func (o *GetViewBoxesParams) WithContext(ctx context.Context) *GetViewBoxesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view boxes params -func (o *GetViewBoxesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view boxes params -func (o *GetViewBoxesParams) WithHTTPClient(client *http.Client) *GetViewBoxesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view boxes params -func (o *GetViewBoxesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get view boxes params -func (o *GetViewBoxesParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetViewBoxesParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get view boxes params -func (o *GetViewBoxesParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithClusterPartitionIds adds the clusterPartitionIds to the get view boxes params -func (o *GetViewBoxesParams) WithClusterPartitionIds(clusterPartitionIds []int64) *GetViewBoxesParams { - o.SetClusterPartitionIds(clusterPartitionIds) - return o -} - -// SetClusterPartitionIds adds the clusterPartitionIds to the get view boxes params -func (o *GetViewBoxesParams) SetClusterPartitionIds(clusterPartitionIds []int64) { - o.ClusterPartitionIds = clusterPartitionIds -} - -// WithFetchStats adds the fetchStats to the get view boxes params -func (o *GetViewBoxesParams) WithFetchStats(fetchStats *bool) *GetViewBoxesParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get view boxes params -func (o *GetViewBoxesParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithFetchTimeSeriesSchema adds the fetchTimeSeriesSchema to the get view boxes params -func (o *GetViewBoxesParams) WithFetchTimeSeriesSchema(fetchTimeSeriesSchema *bool) *GetViewBoxesParams { - o.SetFetchTimeSeriesSchema(fetchTimeSeriesSchema) - return o -} - -// SetFetchTimeSeriesSchema adds the fetchTimeSeriesSchema to the get view boxes params -func (o *GetViewBoxesParams) SetFetchTimeSeriesSchema(fetchTimeSeriesSchema *bool) { - o.FetchTimeSeriesSchema = fetchTimeSeriesSchema -} - -// WithIds adds the ids to the get view boxes params -func (o *GetViewBoxesParams) WithIds(ids []int64) *GetViewBoxesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get view boxes params -func (o *GetViewBoxesParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithMatchPartialNames adds the matchPartialNames to the get view boxes params -func (o *GetViewBoxesParams) WithMatchPartialNames(matchPartialNames *bool) *GetViewBoxesParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get view boxes params -func (o *GetViewBoxesParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithNames adds the names to the get view boxes params -func (o *GetViewBoxesParams) WithNames(names []string) *GetViewBoxesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get view boxes params -func (o *GetViewBoxesParams) SetNames(names []string) { - o.Names = names -} - -// WithTemplateID adds the templateID to the get view boxes params -func (o *GetViewBoxesParams) WithTemplateID(templateID *int64) *GetViewBoxesParams { - o.SetTemplateID(templateID) - return o -} - -// SetTemplateID adds the templateId to the get view boxes params -func (o *GetViewBoxesParams) SetTemplateID(templateID *int64) { - o.TemplateID = templateID -} - -// WithTenantIds adds the tenantIds to the get view boxes params -func (o *GetViewBoxesParams) WithTenantIds(tenantIds []string) *GetViewBoxesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get view boxes params -func (o *GetViewBoxesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewBoxesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.ClusterPartitionIds != nil { - - // binding items for clusterPartitionIds - joinedClusterPartitionIds := o.bindParamClusterPartitionIds(reg) - - // query array param clusterPartitionIds - if err := r.SetQueryParam("clusterPartitionIds", joinedClusterPartitionIds...); err != nil { - return err - } - } - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.FetchTimeSeriesSchema != nil { - - // query param fetchTimeSeriesSchema - var qrFetchTimeSeriesSchema bool - - if o.FetchTimeSeriesSchema != nil { - qrFetchTimeSeriesSchema = *o.FetchTimeSeriesSchema - } - qFetchTimeSeriesSchema := swag.FormatBool(qrFetchTimeSeriesSchema) - if qFetchTimeSeriesSchema != "" { - - if err := r.SetQueryParam("fetchTimeSeriesSchema", qFetchTimeSeriesSchema); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.TemplateID != nil { - - // query param templateId - var qrTemplateID int64 - - if o.TemplateID != nil { - qrTemplateID = *o.TemplateID - } - qTemplateID := swag.FormatInt64(qrTemplateID) - if qTemplateID != "" { - - if err := r.SetQueryParam("templateId", qTemplateID); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewBoxes binds the parameter clusterPartitionIds -func (o *GetViewBoxesParams) bindParamClusterPartitionIds(formats strfmt.Registry) []string { - clusterPartitionIdsIR := o.ClusterPartitionIds - - var clusterPartitionIdsIC []string - for _, clusterPartitionIdsIIR := range clusterPartitionIdsIR { // explode []int64 - - clusterPartitionIdsIIV := swag.FormatInt64(clusterPartitionIdsIIR) // int64 as string - clusterPartitionIdsIC = append(clusterPartitionIdsIC, clusterPartitionIdsIIV) - } - - // items.CollectionFormat: "" - clusterPartitionIdsIS := swag.JoinByFormat(clusterPartitionIdsIC, "") - - return clusterPartitionIdsIS -} - -// bindParamGetViewBoxes binds the parameter ids -func (o *GetViewBoxesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetViewBoxes binds the parameter names -func (o *GetViewBoxesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetViewBoxes binds the parameter tenantIds -func (o *GetViewBoxesParams) 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/v1/client/view_boxes/get_view_boxes_responses.go b/v1/client/view_boxes/get_view_boxes_responses.go deleted file mode 100644 index f3a5dd80..00000000 --- a/v1/client/view_boxes/get_view_boxes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewBoxesReader is a Reader for the GetViewBoxes structure. -type GetViewBoxesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewBoxesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewBoxesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewBoxesDefault(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 - } -} - -// NewGetViewBoxesOK creates a GetViewBoxesOK with default headers values -func NewGetViewBoxesOK() *GetViewBoxesOK { - return &GetViewBoxesOK{} -} - -/* -GetViewBoxesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewBoxesOK struct { - Payload []*models.ViewBox -} - -// IsSuccess returns true when this get view boxes o k response has a 2xx status code -func (o *GetViewBoxesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view boxes o k response has a 3xx status code -func (o *GetViewBoxesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view boxes o k response has a 4xx status code -func (o *GetViewBoxesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view boxes o k response has a 5xx status code -func (o *GetViewBoxesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view boxes o k response a status code equal to that given -func (o *GetViewBoxesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view boxes o k response -func (o *GetViewBoxesOK) Code() int { - return 200 -} - -func (o *GetViewBoxesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes][%d] getViewBoxesOK %s", 200, payload) -} - -func (o *GetViewBoxesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes][%d] getViewBoxesOK %s", 200, payload) -} - -func (o *GetViewBoxesOK) GetPayload() []*models.ViewBox { - return o.Payload -} - -func (o *GetViewBoxesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewBoxesDefault creates a GetViewBoxesDefault with default headers values -func NewGetViewBoxesDefault(code int) *GetViewBoxesDefault { - return &GetViewBoxesDefault{ - _statusCode: code, - } -} - -/* -GetViewBoxesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewBoxesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view boxes default response has a 2xx status code -func (o *GetViewBoxesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view boxes default response has a 3xx status code -func (o *GetViewBoxesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view boxes default response has a 4xx status code -func (o *GetViewBoxesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view boxes default response has a 5xx status code -func (o *GetViewBoxesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view boxes default response a status code equal to that given -func (o *GetViewBoxesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view boxes default response -func (o *GetViewBoxesDefault) Code() int { - return o._statusCode -} - -func (o *GetViewBoxesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes][%d] GetViewBoxes default %s", o._statusCode, payload) -} - -func (o *GetViewBoxesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewBoxes][%d] GetViewBoxes default %s", o._statusCode, payload) -} - -func (o *GetViewBoxesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewBoxesDefault) 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/view_boxes/update_view_box_parameters.go b/v1/client/view_boxes/update_view_box_parameters.go deleted file mode 100644 index f0d096e0..00000000 --- a/v1/client/view_boxes/update_view_box_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewBoxParams creates a new UpdateViewBoxParams 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 NewUpdateViewBoxParams() *UpdateViewBoxParams { - return &UpdateViewBoxParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewBoxParamsWithTimeout creates a new UpdateViewBoxParams object -// with the ability to set a timeout on a request. -func NewUpdateViewBoxParamsWithTimeout(timeout time.Duration) *UpdateViewBoxParams { - return &UpdateViewBoxParams{ - timeout: timeout, - } -} - -// NewUpdateViewBoxParamsWithContext creates a new UpdateViewBoxParams object -// with the ability to set a context for a request. -func NewUpdateViewBoxParamsWithContext(ctx context.Context) *UpdateViewBoxParams { - return &UpdateViewBoxParams{ - Context: ctx, - } -} - -// NewUpdateViewBoxParamsWithHTTPClient creates a new UpdateViewBoxParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewBoxParamsWithHTTPClient(client *http.Client) *UpdateViewBoxParams { - return &UpdateViewBoxParams{ - HTTPClient: client, - } -} - -/* -UpdateViewBoxParams contains all the parameters to send to the API endpoint - - for the update view box operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewBoxParams struct { - - /* Body. - - Request to update a Storage Domain (View Box) configuration. - */ - Body *models.CreateViewBoxParams - - /* ID. - - Id of the Storage Domain (View Box) - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewBoxParams) WithDefaults() *UpdateViewBoxParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view box params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewBoxParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view box params -func (o *UpdateViewBoxParams) WithTimeout(timeout time.Duration) *UpdateViewBoxParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view box params -func (o *UpdateViewBoxParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view box params -func (o *UpdateViewBoxParams) WithContext(ctx context.Context) *UpdateViewBoxParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view box params -func (o *UpdateViewBoxParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view box params -func (o *UpdateViewBoxParams) WithHTTPClient(client *http.Client) *UpdateViewBoxParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view box params -func (o *UpdateViewBoxParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view box params -func (o *UpdateViewBoxParams) WithBody(body *models.CreateViewBoxParams) *UpdateViewBoxParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view box params -func (o *UpdateViewBoxParams) SetBody(body *models.CreateViewBoxParams) { - o.Body = body -} - -// WithID adds the id to the update view box params -func (o *UpdateViewBoxParams) WithID(id int64) *UpdateViewBoxParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update view box params -func (o *UpdateViewBoxParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewBoxParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/view_boxes/update_view_box_responses.go b/v1/client/view_boxes/update_view_box_responses.go deleted file mode 100644 index b846bfc3..00000000 --- a/v1/client/view_boxes/update_view_box_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewBoxReader is a Reader for the UpdateViewBox structure. -type UpdateViewBoxReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewBoxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewBoxOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewBoxDefault(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 - } -} - -// NewUpdateViewBoxOK creates a UpdateViewBoxOK with default headers values -func NewUpdateViewBoxOK() *UpdateViewBoxOK { - return &UpdateViewBoxOK{} -} - -/* -UpdateViewBoxOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewBoxOK struct { - Payload *models.ViewBox -} - -// IsSuccess returns true when this update view box o k response has a 2xx status code -func (o *UpdateViewBoxOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view box o k response has a 3xx status code -func (o *UpdateViewBoxOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view box o k response has a 4xx status code -func (o *UpdateViewBoxOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view box o k response has a 5xx status code -func (o *UpdateViewBoxOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view box o k response a status code equal to that given -func (o *UpdateViewBoxOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view box o k response -func (o *UpdateViewBoxOK) Code() int { - return 200 -} - -func (o *UpdateViewBoxOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewBoxes/{id}][%d] updateViewBoxOK %s", 200, payload) -} - -func (o *UpdateViewBoxOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewBoxes/{id}][%d] updateViewBoxOK %s", 200, payload) -} - -func (o *UpdateViewBoxOK) GetPayload() *models.ViewBox { - return o.Payload -} - -func (o *UpdateViewBoxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewBox) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewBoxDefault creates a UpdateViewBoxDefault with default headers values -func NewUpdateViewBoxDefault(code int) *UpdateViewBoxDefault { - return &UpdateViewBoxDefault{ - _statusCode: code, - } -} - -/* -UpdateViewBoxDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewBoxDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view box default response has a 2xx status code -func (o *UpdateViewBoxDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view box default response has a 3xx status code -func (o *UpdateViewBoxDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view box default response has a 4xx status code -func (o *UpdateViewBoxDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view box default response has a 5xx status code -func (o *UpdateViewBoxDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view box default response a status code equal to that given -func (o *UpdateViewBoxDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view box default response -func (o *UpdateViewBoxDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewBoxDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewBoxes/{id}][%d] UpdateViewBox default %s", o._statusCode, payload) -} - -func (o *UpdateViewBoxDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewBoxes/{id}][%d] UpdateViewBox default %s", o._statusCode, payload) -} - -func (o *UpdateViewBoxDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewBoxDefault) 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/view_boxes/view_boxes_client.go b/v1/client/view_boxes/view_boxes_client.go deleted file mode 100644 index c6134d26..00000000 --- a/v1/client/view_boxes/view_boxes_client.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view_boxes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new view boxes API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new view boxes API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new view boxes API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for view boxes API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateViewBox(params *CreateViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewBoxCreated, error) - - DeleteViewBox(params *DeleteViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewBoxNoContent, error) - - GetViewBoxByID(params *GetViewBoxByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxByIDOK, error) - - GetViewBoxes(params *GetViewBoxesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxesOK, error) - - UpdateViewBox(params *UpdateViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewBoxOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateViewBox creates a domain view box - -Returns the created Domain (View Box). -*/ -func (a *Client) CreateViewBox(params *CreateViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewBoxCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewBoxParams() - } - op := &runtime.ClientOperation{ - ID: "CreateViewBox", - Method: "POST", - PathPattern: "/public/viewBoxes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewBoxReader{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.(*CreateViewBoxCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewBoxDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewBox deletes a domain view box - -Returns delete status upon completion. -*/ -func (a *Client) DeleteViewBox(params *DeleteViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewBoxNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewBoxParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewBox", - Method: "DELETE", - PathPattern: "/public/viewBoxes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewBoxReader{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.(*DeleteViewBoxNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewBoxDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetViewBoxByID lists details about a single domain view box - - Returns the Domain (View Box) corresponding to the specified Domain (View Box) - -Id. -*/ -func (a *Client) GetViewBoxByID(params *GetViewBoxByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewBoxByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewBoxById", - Method: "GET", - PathPattern: "/public/viewBoxes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewBoxByIDReader{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.(*GetViewBoxByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewBoxByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetViewBoxes lists domains view boxes filtered by the specified parameters - - If no parameters are specified, all Domains (View Boxes) currently on - -the Cohesity Cluster are returned. -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetViewBoxes(params *GetViewBoxesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewBoxesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewBoxesParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewBoxes", - Method: "GET", - PathPattern: "/public/viewBoxes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewBoxesReader{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.(*GetViewBoxesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewBoxesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewBox updates a domain view box - -Returns the updated Domain (View Box). -*/ -func (a *Client) UpdateViewBox(params *UpdateViewBoxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewBoxOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewBoxParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewBox", - Method: "PUT", - PathPattern: "/public/viewBoxes/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewBoxReader{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.(*UpdateViewBoxOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewBoxDefault) - 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/views/activate_view_aliases_parameters.go b/v1/client/views/activate_view_aliases_parameters.go deleted file mode 100644 index 47750105..00000000 --- a/v1/client/views/activate_view_aliases_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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" -) - -// NewActivateViewAliasesParams creates a new ActivateViewAliasesParams 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 NewActivateViewAliasesParams() *ActivateViewAliasesParams { - return &ActivateViewAliasesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewActivateViewAliasesParamsWithTimeout creates a new ActivateViewAliasesParams object -// with the ability to set a timeout on a request. -func NewActivateViewAliasesParamsWithTimeout(timeout time.Duration) *ActivateViewAliasesParams { - return &ActivateViewAliasesParams{ - timeout: timeout, - } -} - -// NewActivateViewAliasesParamsWithContext creates a new ActivateViewAliasesParams object -// with the ability to set a context for a request. -func NewActivateViewAliasesParamsWithContext(ctx context.Context) *ActivateViewAliasesParams { - return &ActivateViewAliasesParams{ - Context: ctx, - } -} - -// NewActivateViewAliasesParamsWithHTTPClient creates a new ActivateViewAliasesParams object -// with the ability to set a custom HTTPClient for a request. -func NewActivateViewAliasesParamsWithHTTPClient(client *http.Client) *ActivateViewAliasesParams { - return &ActivateViewAliasesParams{ - HTTPClient: client, - } -} - -/* -ActivateViewAliasesParams contains all the parameters to send to the API endpoint - - for the activate view aliases operation. - - Typically these are written to a http.Request. -*/ -type ActivateViewAliasesParams struct { - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the activate view aliases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ActivateViewAliasesParams) WithDefaults() *ActivateViewAliasesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the activate view aliases params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ActivateViewAliasesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the activate view aliases params -func (o *ActivateViewAliasesParams) WithTimeout(timeout time.Duration) *ActivateViewAliasesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the activate view aliases params -func (o *ActivateViewAliasesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the activate view aliases params -func (o *ActivateViewAliasesParams) WithContext(ctx context.Context) *ActivateViewAliasesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the activate view aliases params -func (o *ActivateViewAliasesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the activate view aliases params -func (o *ActivateViewAliasesParams) WithHTTPClient(client *http.Client) *ActivateViewAliasesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the activate view aliases params -func (o *ActivateViewAliasesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the activate view aliases params -func (o *ActivateViewAliasesParams) WithName(name string) *ActivateViewAliasesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the activate view aliases params -func (o *ActivateViewAliasesParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *ActivateViewAliasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/activate_view_aliases_responses.go b/v1/client/views/activate_view_aliases_responses.go deleted file mode 100644 index 750426c3..00000000 --- a/v1/client/views/activate_view_aliases_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ActivateViewAliasesReader is a Reader for the ActivateViewAliases structure. -type ActivateViewAliasesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ActivateViewAliasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewActivateViewAliasesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewActivateViewAliasesDefault(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 - } -} - -// NewActivateViewAliasesOK creates a ActivateViewAliasesOK with default headers values -func NewActivateViewAliasesOK() *ActivateViewAliasesOK { - return &ActivateViewAliasesOK{} -} - -/* -ActivateViewAliasesOK describes a response with status code 200, with default header values. - -Success -*/ -type ActivateViewAliasesOK struct { - Payload *models.ActivateViewAliasesResult -} - -// IsSuccess returns true when this activate view aliases o k response has a 2xx status code -func (o *ActivateViewAliasesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this activate view aliases o k response has a 3xx status code -func (o *ActivateViewAliasesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this activate view aliases o k response has a 4xx status code -func (o *ActivateViewAliasesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this activate view aliases o k response has a 5xx status code -func (o *ActivateViewAliasesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this activate view aliases o k response a status code equal to that given -func (o *ActivateViewAliasesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the activate view aliases o k response -func (o *ActivateViewAliasesOK) Code() int { - return 200 -} - -func (o *ActivateViewAliasesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases/{name}/activate][%d] activateViewAliasesOK %s", 200, payload) -} - -func (o *ActivateViewAliasesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases/{name}/activate][%d] activateViewAliasesOK %s", 200, payload) -} - -func (o *ActivateViewAliasesOK) GetPayload() *models.ActivateViewAliasesResult { - return o.Payload -} - -func (o *ActivateViewAliasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActivateViewAliasesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewActivateViewAliasesDefault creates a ActivateViewAliasesDefault with default headers values -func NewActivateViewAliasesDefault(code int) *ActivateViewAliasesDefault { - return &ActivateViewAliasesDefault{ - _statusCode: code, - } -} - -/* -ActivateViewAliasesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ActivateViewAliasesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this activate view aliases default response has a 2xx status code -func (o *ActivateViewAliasesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this activate view aliases default response has a 3xx status code -func (o *ActivateViewAliasesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this activate view aliases default response has a 4xx status code -func (o *ActivateViewAliasesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this activate view aliases default response has a 5xx status code -func (o *ActivateViewAliasesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this activate view aliases default response a status code equal to that given -func (o *ActivateViewAliasesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the activate view aliases default response -func (o *ActivateViewAliasesDefault) Code() int { - return o._statusCode -} - -func (o *ActivateViewAliasesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases/{name}/activate][%d] ActivateViewAliases default %s", o._statusCode, payload) -} - -func (o *ActivateViewAliasesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases/{name}/activate][%d] ActivateViewAliases default %s", o._statusCode, payload) -} - -func (o *ActivateViewAliasesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ActivateViewAliasesDefault) 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/views/clear_nlm_locks_parameters.go b/v1/client/views/clear_nlm_locks_parameters.go deleted file mode 100644 index 5c7abd0e..00000000 --- a/v1/client/views/clear_nlm_locks_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewClearNlmLocksParams creates a new ClearNlmLocksParams 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 NewClearNlmLocksParams() *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewClearNlmLocksParamsWithTimeout creates a new ClearNlmLocksParams object -// with the ability to set a timeout on a request. -func NewClearNlmLocksParamsWithTimeout(timeout time.Duration) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - timeout: timeout, - } -} - -// NewClearNlmLocksParamsWithContext creates a new ClearNlmLocksParams object -// with the ability to set a context for a request. -func NewClearNlmLocksParamsWithContext(ctx context.Context) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - Context: ctx, - } -} - -// NewClearNlmLocksParamsWithHTTPClient creates a new ClearNlmLocksParams object -// with the ability to set a custom HTTPClient for a request. -func NewClearNlmLocksParamsWithHTTPClient(client *http.Client) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - HTTPClient: client, - } -} - -/* -ClearNlmLocksParams contains all the parameters to send to the API endpoint - - for the clear nlm locks operation. - - Typically these are written to a http.Request. -*/ -type ClearNlmLocksParams struct { - - /* Body. - - Request to clear NLM locks. - */ - Body *models.ClearNlmLocksParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clear nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearNlmLocksParams) WithDefaults() *ClearNlmLocksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clear nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearNlmLocksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clear nlm locks params -func (o *ClearNlmLocksParams) WithTimeout(timeout time.Duration) *ClearNlmLocksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clear nlm locks params -func (o *ClearNlmLocksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clear nlm locks params -func (o *ClearNlmLocksParams) WithContext(ctx context.Context) *ClearNlmLocksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clear nlm locks params -func (o *ClearNlmLocksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clear nlm locks params -func (o *ClearNlmLocksParams) WithHTTPClient(client *http.Client) *ClearNlmLocksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clear nlm locks params -func (o *ClearNlmLocksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clear nlm locks params -func (o *ClearNlmLocksParams) WithBody(body *models.ClearNlmLocksParameters) *ClearNlmLocksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clear nlm locks params -func (o *ClearNlmLocksParams) SetBody(body *models.ClearNlmLocksParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ClearNlmLocksParams) 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/views/clear_nlm_locks_responses.go b/v1/client/views/clear_nlm_locks_responses.go deleted file mode 100644 index b2f6c8f3..00000000 --- a/v1/client/views/clear_nlm_locks_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ClearNlmLocksReader is a Reader for the ClearNlmLocks structure. -type ClearNlmLocksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ClearNlmLocksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewClearNlmLocksNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewClearNlmLocksDefault(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 - } -} - -// NewClearNlmLocksNoContent creates a ClearNlmLocksNoContent with default headers values -func NewClearNlmLocksNoContent() *ClearNlmLocksNoContent { - return &ClearNlmLocksNoContent{} -} - -/* -ClearNlmLocksNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ClearNlmLocksNoContent struct { -} - -// IsSuccess returns true when this clear nlm locks no content response has a 2xx status code -func (o *ClearNlmLocksNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clear nlm locks no content response has a 3xx status code -func (o *ClearNlmLocksNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clear nlm locks no content response has a 4xx status code -func (o *ClearNlmLocksNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this clear nlm locks no content response has a 5xx status code -func (o *ClearNlmLocksNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this clear nlm locks no content response a status code equal to that given -func (o *ClearNlmLocksNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the clear nlm locks no content response -func (o *ClearNlmLocksNoContent) Code() int { - return 204 -} - -func (o *ClearNlmLocksNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/nlmLocks][%d] clearNlmLocksNoContent", 204) -} - -func (o *ClearNlmLocksNoContent) String() string { - return fmt.Sprintf("[DELETE /public/nlmLocks][%d] clearNlmLocksNoContent", 204) -} - -func (o *ClearNlmLocksNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewClearNlmLocksDefault creates a ClearNlmLocksDefault with default headers values -func NewClearNlmLocksDefault(code int) *ClearNlmLocksDefault { - return &ClearNlmLocksDefault{ - _statusCode: code, - } -} - -/* -ClearNlmLocksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ClearNlmLocksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this clear nlm locks default response has a 2xx status code -func (o *ClearNlmLocksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clear nlm locks default response has a 3xx status code -func (o *ClearNlmLocksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clear nlm locks default response has a 4xx status code -func (o *ClearNlmLocksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clear nlm locks default response has a 5xx status code -func (o *ClearNlmLocksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clear nlm locks default response a status code equal to that given -func (o *ClearNlmLocksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clear nlm locks default response -func (o *ClearNlmLocksDefault) Code() int { - return o._statusCode -} - -func (o *ClearNlmLocksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/nlmLocks][%d] ClearNlmLocks default %s", o._statusCode, payload) -} - -func (o *ClearNlmLocksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/nlmLocks][%d] ClearNlmLocks default %s", o._statusCode, payload) -} - -func (o *ClearNlmLocksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ClearNlmLocksDefault) 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/views/clone_directory_parameters.go b/v1/client/views/clone_directory_parameters.go deleted file mode 100644 index ae8c6fe3..00000000 --- a/v1/client/views/clone_directory_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCloneDirectoryParams creates a new CloneDirectoryParams 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 NewCloneDirectoryParams() *CloneDirectoryParams { - return &CloneDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneDirectoryParamsWithTimeout creates a new CloneDirectoryParams object -// with the ability to set a timeout on a request. -func NewCloneDirectoryParamsWithTimeout(timeout time.Duration) *CloneDirectoryParams { - return &CloneDirectoryParams{ - timeout: timeout, - } -} - -// NewCloneDirectoryParamsWithContext creates a new CloneDirectoryParams object -// with the ability to set a context for a request. -func NewCloneDirectoryParamsWithContext(ctx context.Context) *CloneDirectoryParams { - return &CloneDirectoryParams{ - Context: ctx, - } -} - -// NewCloneDirectoryParamsWithHTTPClient creates a new CloneDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneDirectoryParamsWithHTTPClient(client *http.Client) *CloneDirectoryParams { - return &CloneDirectoryParams{ - HTTPClient: client, - } -} - -/* -CloneDirectoryParams contains all the parameters to send to the API endpoint - - for the clone directory operation. - - Typically these are written to a http.Request. -*/ -type CloneDirectoryParams struct { - - /* Body. - - Request to clone a directory. - */ - Body *models.CloneDirectoryParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneDirectoryParams) WithDefaults() *CloneDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone directory params -func (o *CloneDirectoryParams) WithTimeout(timeout time.Duration) *CloneDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone directory params -func (o *CloneDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone directory params -func (o *CloneDirectoryParams) WithContext(ctx context.Context) *CloneDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone directory params -func (o *CloneDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone directory params -func (o *CloneDirectoryParams) WithHTTPClient(client *http.Client) *CloneDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone directory params -func (o *CloneDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone directory params -func (o *CloneDirectoryParams) WithBody(body *models.CloneDirectoryParams) *CloneDirectoryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone directory params -func (o *CloneDirectoryParams) SetBody(body *models.CloneDirectoryParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneDirectoryParams) 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/views/clone_directory_responses.go b/v1/client/views/clone_directory_responses.go deleted file mode 100644 index 6c08fe09..00000000 --- a/v1/client/views/clone_directory_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CloneDirectoryReader is a Reader for the CloneDirectory structure. -type CloneDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCloneDirectoryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneDirectoryDefault(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 - } -} - -// NewCloneDirectoryCreated creates a CloneDirectoryCreated with default headers values -func NewCloneDirectoryCreated() *CloneDirectoryCreated { - return &CloneDirectoryCreated{} -} - -/* -CloneDirectoryCreated describes a response with status code 201, with default header values. - -Success -*/ -type CloneDirectoryCreated struct { -} - -// IsSuccess returns true when this clone directory created response has a 2xx status code -func (o *CloneDirectoryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone directory created response has a 3xx status code -func (o *CloneDirectoryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone directory created response has a 4xx status code -func (o *CloneDirectoryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone directory created response has a 5xx status code -func (o *CloneDirectoryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this clone directory created response a status code equal to that given -func (o *CloneDirectoryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the clone directory created response -func (o *CloneDirectoryCreated) Code() int { - return 201 -} - -func (o *CloneDirectoryCreated) Error() string { - return fmt.Sprintf("[POST /public/views/cloneDirectory][%d] cloneDirectoryCreated", 201) -} - -func (o *CloneDirectoryCreated) String() string { - return fmt.Sprintf("[POST /public/views/cloneDirectory][%d] cloneDirectoryCreated", 201) -} - -func (o *CloneDirectoryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCloneDirectoryDefault creates a CloneDirectoryDefault with default headers values -func NewCloneDirectoryDefault(code int) *CloneDirectoryDefault { - return &CloneDirectoryDefault{ - _statusCode: code, - } -} - -/* -CloneDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloneDirectoryDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this clone directory default response has a 2xx status code -func (o *CloneDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone directory default response has a 3xx status code -func (o *CloneDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone directory default response has a 4xx status code -func (o *CloneDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone directory default response has a 5xx status code -func (o *CloneDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone directory default response a status code equal to that given -func (o *CloneDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone directory default response -func (o *CloneDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *CloneDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/cloneDirectory][%d] CloneDirectory default %s", o._statusCode, payload) -} - -func (o *CloneDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/cloneDirectory][%d] CloneDirectory default %s", o._statusCode, payload) -} - -func (o *CloneDirectoryDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CloneDirectoryDefault) 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/views/clone_view_parameters.go b/v1/client/views/clone_view_parameters.go deleted file mode 100644 index 2540b35a..00000000 --- a/v1/client/views/clone_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCloneViewParams creates a new CloneViewParams 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 NewCloneViewParams() *CloneViewParams { - return &CloneViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneViewParamsWithTimeout creates a new CloneViewParams object -// with the ability to set a timeout on a request. -func NewCloneViewParamsWithTimeout(timeout time.Duration) *CloneViewParams { - return &CloneViewParams{ - timeout: timeout, - } -} - -// NewCloneViewParamsWithContext creates a new CloneViewParams object -// with the ability to set a context for a request. -func NewCloneViewParamsWithContext(ctx context.Context) *CloneViewParams { - return &CloneViewParams{ - Context: ctx, - } -} - -// NewCloneViewParamsWithHTTPClient creates a new CloneViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneViewParamsWithHTTPClient(client *http.Client) *CloneViewParams { - return &CloneViewParams{ - HTTPClient: client, - } -} - -/* -CloneViewParams contains all the parameters to send to the API endpoint - - for the clone view operation. - - Typically these are written to a http.Request. -*/ -type CloneViewParams struct { - - /* Body. - - Request to clone a View. - */ - Body *models.CloneViewRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewParams) WithDefaults() *CloneViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone view params -func (o *CloneViewParams) WithTimeout(timeout time.Duration) *CloneViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone view params -func (o *CloneViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone view params -func (o *CloneViewParams) WithContext(ctx context.Context) *CloneViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone view params -func (o *CloneViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone view params -func (o *CloneViewParams) WithHTTPClient(client *http.Client) *CloneViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone view params -func (o *CloneViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone view params -func (o *CloneViewParams) WithBody(body *models.CloneViewRequest) *CloneViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone view params -func (o *CloneViewParams) SetBody(body *models.CloneViewRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneViewParams) 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/views/clone_view_responses.go b/v1/client/views/clone_view_responses.go deleted file mode 100644 index 506762af..00000000 --- a/v1/client/views/clone_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CloneViewReader is a Reader for the CloneView structure. -type CloneViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCloneViewCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneViewDefault(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 - } -} - -// NewCloneViewCreated creates a CloneViewCreated with default headers values -func NewCloneViewCreated() *CloneViewCreated { - return &CloneViewCreated{} -} - -/* -CloneViewCreated describes a response with status code 201, with default header values. - -Success -*/ -type CloneViewCreated struct { - Payload *models.View -} - -// IsSuccess returns true when this clone view created response has a 2xx status code -func (o *CloneViewCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone view created response has a 3xx status code -func (o *CloneViewCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone view created response has a 4xx status code -func (o *CloneViewCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone view created response has a 5xx status code -func (o *CloneViewCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this clone view created response a status code equal to that given -func (o *CloneViewCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the clone view created response -func (o *CloneViewCreated) Code() int { - return 201 -} - -func (o *CloneViewCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/clone][%d] cloneViewCreated %s", 201, payload) -} - -func (o *CloneViewCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/clone][%d] cloneViewCreated %s", 201, payload) -} - -func (o *CloneViewCreated) GetPayload() *models.View { - return o.Payload -} - -func (o *CloneViewCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCloneViewDefault creates a CloneViewDefault with default headers values -func NewCloneViewDefault(code int) *CloneViewDefault { - return &CloneViewDefault{ - _statusCode: code, - } -} - -/* -CloneViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloneViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this clone view default response has a 2xx status code -func (o *CloneViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone view default response has a 3xx status code -func (o *CloneViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone view default response has a 4xx status code -func (o *CloneViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone view default response has a 5xx status code -func (o *CloneViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone view default response a status code equal to that given -func (o *CloneViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone view default response -func (o *CloneViewDefault) Code() int { - return o._statusCode -} - -func (o *CloneViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/clone][%d] CloneView default %s", o._statusCode, payload) -} - -func (o *CloneViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/clone][%d] CloneView default %s", o._statusCode, payload) -} - -func (o *CloneViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CloneViewDefault) 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/views/create_view_alias_parameters.go b/v1/client/views/create_view_alias_parameters.go deleted file mode 100644 index 5546156b..00000000 --- a/v1/client/views/create_view_alias_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateViewAliasParams creates a new CreateViewAliasParams 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 NewCreateViewAliasParams() *CreateViewAliasParams { - return &CreateViewAliasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewAliasParamsWithTimeout creates a new CreateViewAliasParams object -// with the ability to set a timeout on a request. -func NewCreateViewAliasParamsWithTimeout(timeout time.Duration) *CreateViewAliasParams { - return &CreateViewAliasParams{ - timeout: timeout, - } -} - -// NewCreateViewAliasParamsWithContext creates a new CreateViewAliasParams object -// with the ability to set a context for a request. -func NewCreateViewAliasParamsWithContext(ctx context.Context) *CreateViewAliasParams { - return &CreateViewAliasParams{ - Context: ctx, - } -} - -// NewCreateViewAliasParamsWithHTTPClient creates a new CreateViewAliasParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewAliasParamsWithHTTPClient(client *http.Client) *CreateViewAliasParams { - return &CreateViewAliasParams{ - HTTPClient: client, - } -} - -/* -CreateViewAliasParams contains all the parameters to send to the API endpoint - - for the create view alias operation. - - Typically these are written to a http.Request. -*/ -type CreateViewAliasParams struct { - - /* Body. - - Request to create a View Alias. - */ - Body *models.ViewAlias - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewAliasParams) WithDefaults() *CreateViewAliasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewAliasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view alias params -func (o *CreateViewAliasParams) WithTimeout(timeout time.Duration) *CreateViewAliasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view alias params -func (o *CreateViewAliasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view alias params -func (o *CreateViewAliasParams) WithContext(ctx context.Context) *CreateViewAliasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view alias params -func (o *CreateViewAliasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view alias params -func (o *CreateViewAliasParams) WithHTTPClient(client *http.Client) *CreateViewAliasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view alias params -func (o *CreateViewAliasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view alias params -func (o *CreateViewAliasParams) WithBody(body *models.ViewAlias) *CreateViewAliasParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view alias params -func (o *CreateViewAliasParams) SetBody(body *models.ViewAlias) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewAliasParams) 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/views/create_view_alias_responses.go b/v1/client/views/create_view_alias_responses.go deleted file mode 100644 index bc02a9bf..00000000 --- a/v1/client/views/create_view_alias_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateViewAliasReader is a Reader for the CreateViewAlias structure. -type CreateViewAliasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewAliasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewAliasCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewAliasDefault(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 - } -} - -// NewCreateViewAliasCreated creates a CreateViewAliasCreated with default headers values -func NewCreateViewAliasCreated() *CreateViewAliasCreated { - return &CreateViewAliasCreated{} -} - -/* -CreateViewAliasCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewAliasCreated struct { - Payload *models.CreateViewAliasResponseBody -} - -// IsSuccess returns true when this create view alias created response has a 2xx status code -func (o *CreateViewAliasCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view alias created response has a 3xx status code -func (o *CreateViewAliasCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view alias created response has a 4xx status code -func (o *CreateViewAliasCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view alias created response has a 5xx status code -func (o *CreateViewAliasCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view alias created response a status code equal to that given -func (o *CreateViewAliasCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view alias created response -func (o *CreateViewAliasCreated) Code() int { - return 201 -} - -func (o *CreateViewAliasCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases][%d] createViewAliasCreated %s", 201, payload) -} - -func (o *CreateViewAliasCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases][%d] createViewAliasCreated %s", 201, payload) -} - -func (o *CreateViewAliasCreated) GetPayload() *models.CreateViewAliasResponseBody { - return o.Payload -} - -func (o *CreateViewAliasCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateViewAliasResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewAliasDefault creates a CreateViewAliasDefault with default headers values -func NewCreateViewAliasDefault(code int) *CreateViewAliasDefault { - return &CreateViewAliasDefault{ - _statusCode: code, - } -} - -/* -CreateViewAliasDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewAliasDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create view alias default response has a 2xx status code -func (o *CreateViewAliasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view alias default response has a 3xx status code -func (o *CreateViewAliasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view alias default response has a 4xx status code -func (o *CreateViewAliasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view alias default response has a 5xx status code -func (o *CreateViewAliasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view alias default response a status code equal to that given -func (o *CreateViewAliasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view alias default response -func (o *CreateViewAliasDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewAliasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases][%d] CreateViewAlias default %s", o._statusCode, payload) -} - -func (o *CreateViewAliasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewAliases][%d] CreateViewAlias default %s", o._statusCode, payload) -} - -func (o *CreateViewAliasDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateViewAliasDefault) 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/views/create_view_parameters.go b/v1/client/views/create_view_parameters.go deleted file mode 100644 index 41daeeb8..00000000 --- a/v1/client/views/create_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateViewParams creates a new CreateViewParams 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 NewCreateViewParams() *CreateViewParams { - return &CreateViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewParamsWithTimeout creates a new CreateViewParams object -// with the ability to set a timeout on a request. -func NewCreateViewParamsWithTimeout(timeout time.Duration) *CreateViewParams { - return &CreateViewParams{ - timeout: timeout, - } -} - -// NewCreateViewParamsWithContext creates a new CreateViewParams object -// with the ability to set a context for a request. -func NewCreateViewParamsWithContext(ctx context.Context) *CreateViewParams { - return &CreateViewParams{ - Context: ctx, - } -} - -// NewCreateViewParamsWithHTTPClient creates a new CreateViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewParamsWithHTTPClient(client *http.Client) *CreateViewParams { - return &CreateViewParams{ - HTTPClient: client, - } -} - -/* -CreateViewParams contains all the parameters to send to the API endpoint - - for the create view operation. - - Typically these are written to a http.Request. -*/ -type CreateViewParams struct { - - /* Body. - - Request to create a View. - */ - Body *models.CreateViewRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewParams) WithDefaults() *CreateViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view params -func (o *CreateViewParams) WithTimeout(timeout time.Duration) *CreateViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view params -func (o *CreateViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view params -func (o *CreateViewParams) WithContext(ctx context.Context) *CreateViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view params -func (o *CreateViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view params -func (o *CreateViewParams) WithHTTPClient(client *http.Client) *CreateViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view params -func (o *CreateViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view params -func (o *CreateViewParams) WithBody(body *models.CreateViewRequest) *CreateViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view params -func (o *CreateViewParams) SetBody(body *models.CreateViewRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewParams) 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/views/create_view_responses.go b/v1/client/views/create_view_responses.go deleted file mode 100644 index cc5f376b..00000000 --- a/v1/client/views/create_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateViewReader is a Reader for the CreateView structure. -type CreateViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewDefault(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 - } -} - -// NewCreateViewCreated creates a CreateViewCreated with default headers values -func NewCreateViewCreated() *CreateViewCreated { - return &CreateViewCreated{} -} - -/* -CreateViewCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewCreated struct { - Payload *models.View -} - -// IsSuccess returns true when this create view created response has a 2xx status code -func (o *CreateViewCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view created response has a 3xx status code -func (o *CreateViewCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view created response has a 4xx status code -func (o *CreateViewCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view created response has a 5xx status code -func (o *CreateViewCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view created response a status code equal to that given -func (o *CreateViewCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view created response -func (o *CreateViewCreated) Code() int { - return 201 -} - -func (o *CreateViewCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views][%d] createViewCreated %s", 201, payload) -} - -func (o *CreateViewCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views][%d] createViewCreated %s", 201, payload) -} - -func (o *CreateViewCreated) GetPayload() *models.View { - return o.Payload -} - -func (o *CreateViewCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewDefault creates a CreateViewDefault with default headers values -func NewCreateViewDefault(code int) *CreateViewDefault { - return &CreateViewDefault{ - _statusCode: code, - } -} - -/* -CreateViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create view default response has a 2xx status code -func (o *CreateViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view default response has a 3xx status code -func (o *CreateViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view default response has a 4xx status code -func (o *CreateViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view default response has a 5xx status code -func (o *CreateViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view default response a status code equal to that given -func (o *CreateViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view default response -func (o *CreateViewDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views][%d] CreateView default %s", o._statusCode, payload) -} - -func (o *CreateViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views][%d] CreateView default %s", o._statusCode, payload) -} - -func (o *CreateViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateViewDefault) 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/views/create_view_user_quota_parameters.go b/v1/client/views/create_view_user_quota_parameters.go deleted file mode 100644 index bf2b627f..00000000 --- a/v1/client/views/create_view_user_quota_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateViewUserQuotaParams creates a new CreateViewUserQuotaParams 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 NewCreateViewUserQuotaParams() *CreateViewUserQuotaParams { - return &CreateViewUserQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewUserQuotaParamsWithTimeout creates a new CreateViewUserQuotaParams object -// with the ability to set a timeout on a request. -func NewCreateViewUserQuotaParamsWithTimeout(timeout time.Duration) *CreateViewUserQuotaParams { - return &CreateViewUserQuotaParams{ - timeout: timeout, - } -} - -// NewCreateViewUserQuotaParamsWithContext creates a new CreateViewUserQuotaParams object -// with the ability to set a context for a request. -func NewCreateViewUserQuotaParamsWithContext(ctx context.Context) *CreateViewUserQuotaParams { - return &CreateViewUserQuotaParams{ - Context: ctx, - } -} - -// NewCreateViewUserQuotaParamsWithHTTPClient creates a new CreateViewUserQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewUserQuotaParamsWithHTTPClient(client *http.Client) *CreateViewUserQuotaParams { - return &CreateViewUserQuotaParams{ - HTTPClient: client, - } -} - -/* -CreateViewUserQuotaParams contains all the parameters to send to the API endpoint - - for the create view user quota operation. - - Typically these are written to a http.Request. -*/ -type CreateViewUserQuotaParams struct { - - /* Body. - - update user quota params. - */ - Body *models.ViewUserQuotaParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view user quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewUserQuotaParams) WithDefaults() *CreateViewUserQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view user quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewUserQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view user quota params -func (o *CreateViewUserQuotaParams) WithTimeout(timeout time.Duration) *CreateViewUserQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view user quota params -func (o *CreateViewUserQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view user quota params -func (o *CreateViewUserQuotaParams) WithContext(ctx context.Context) *CreateViewUserQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view user quota params -func (o *CreateViewUserQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view user quota params -func (o *CreateViewUserQuotaParams) WithHTTPClient(client *http.Client) *CreateViewUserQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view user quota params -func (o *CreateViewUserQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view user quota params -func (o *CreateViewUserQuotaParams) WithBody(body *models.ViewUserQuotaParameters) *CreateViewUserQuotaParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view user quota params -func (o *CreateViewUserQuotaParams) SetBody(body *models.ViewUserQuotaParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewUserQuotaParams) 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/views/create_view_user_quota_responses.go b/v1/client/views/create_view_user_quota_responses.go deleted file mode 100644 index 56feb6ee..00000000 --- a/v1/client/views/create_view_user_quota_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateViewUserQuotaReader is a Reader for the CreateViewUserQuota structure. -type CreateViewUserQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewUserQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateViewUserQuotaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewUserQuotaDefault(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 - } -} - -// NewCreateViewUserQuotaOK creates a CreateViewUserQuotaOK with default headers values -func NewCreateViewUserQuotaOK() *CreateViewUserQuotaOK { - return &CreateViewUserQuotaOK{} -} - -/* -CreateViewUserQuotaOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateViewUserQuotaOK struct { - Payload *models.UserQuotaAndUsage -} - -// IsSuccess returns true when this create view user quota o k response has a 2xx status code -func (o *CreateViewUserQuotaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view user quota o k response has a 3xx status code -func (o *CreateViewUserQuotaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view user quota o k response has a 4xx status code -func (o *CreateViewUserQuotaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view user quota o k response has a 5xx status code -func (o *CreateViewUserQuotaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create view user quota o k response a status code equal to that given -func (o *CreateViewUserQuotaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create view user quota o k response -func (o *CreateViewUserQuotaOK) Code() int { - return 200 -} - -func (o *CreateViewUserQuotaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewUserQuotas][%d] createViewUserQuotaOK %s", 200, payload) -} - -func (o *CreateViewUserQuotaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewUserQuotas][%d] createViewUserQuotaOK %s", 200, payload) -} - -func (o *CreateViewUserQuotaOK) GetPayload() *models.UserQuotaAndUsage { - return o.Payload -} - -func (o *CreateViewUserQuotaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserQuotaAndUsage) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewUserQuotaDefault creates a CreateViewUserQuotaDefault with default headers values -func NewCreateViewUserQuotaDefault(code int) *CreateViewUserQuotaDefault { - return &CreateViewUserQuotaDefault{ - _statusCode: code, - } -} - -/* -CreateViewUserQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewUserQuotaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create view user quota default response has a 2xx status code -func (o *CreateViewUserQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view user quota default response has a 3xx status code -func (o *CreateViewUserQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view user quota default response has a 4xx status code -func (o *CreateViewUserQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view user quota default response has a 5xx status code -func (o *CreateViewUserQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view user quota default response a status code equal to that given -func (o *CreateViewUserQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view user quota default response -func (o *CreateViewUserQuotaDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewUserQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewUserQuotas][%d] CreateViewUserQuota default %s", o._statusCode, payload) -} - -func (o *CreateViewUserQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/viewUserQuotas][%d] CreateViewUserQuota default %s", o._statusCode, payload) -} - -func (o *CreateViewUserQuotaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateViewUserQuotaDefault) 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/views/delete_view_alias_parameters.go b/v1/client/views/delete_view_alias_parameters.go deleted file mode 100644 index d17f952e..00000000 --- a/v1/client/views/delete_view_alias_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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" -) - -// NewDeleteViewAliasParams creates a new DeleteViewAliasParams 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 NewDeleteViewAliasParams() *DeleteViewAliasParams { - return &DeleteViewAliasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewAliasParamsWithTimeout creates a new DeleteViewAliasParams object -// with the ability to set a timeout on a request. -func NewDeleteViewAliasParamsWithTimeout(timeout time.Duration) *DeleteViewAliasParams { - return &DeleteViewAliasParams{ - timeout: timeout, - } -} - -// NewDeleteViewAliasParamsWithContext creates a new DeleteViewAliasParams object -// with the ability to set a context for a request. -func NewDeleteViewAliasParamsWithContext(ctx context.Context) *DeleteViewAliasParams { - return &DeleteViewAliasParams{ - Context: ctx, - } -} - -// NewDeleteViewAliasParamsWithHTTPClient creates a new DeleteViewAliasParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewAliasParamsWithHTTPClient(client *http.Client) *DeleteViewAliasParams { - return &DeleteViewAliasParams{ - HTTPClient: client, - } -} - -/* -DeleteViewAliasParams contains all the parameters to send to the API endpoint - - for the delete view alias operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewAliasParams struct { - - /* Name. - - Specifies the View Alias name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewAliasParams) WithDefaults() *DeleteViewAliasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewAliasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view alias params -func (o *DeleteViewAliasParams) WithTimeout(timeout time.Duration) *DeleteViewAliasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view alias params -func (o *DeleteViewAliasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view alias params -func (o *DeleteViewAliasParams) WithContext(ctx context.Context) *DeleteViewAliasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view alias params -func (o *DeleteViewAliasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view alias params -func (o *DeleteViewAliasParams) WithHTTPClient(client *http.Client) *DeleteViewAliasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view alias params -func (o *DeleteViewAliasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete view alias params -func (o *DeleteViewAliasParams) WithName(name string) *DeleteViewAliasParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete view alias params -func (o *DeleteViewAliasParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewAliasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/delete_view_alias_responses.go b/v1/client/views/delete_view_alias_responses.go deleted file mode 100644 index e7ed1bb4..00000000 --- a/v1/client/views/delete_view_alias_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteViewAliasReader is a Reader for the DeleteViewAlias structure. -type DeleteViewAliasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewAliasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewAliasNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewAliasDefault(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 - } -} - -// NewDeleteViewAliasNoContent creates a DeleteViewAliasNoContent with default headers values -func NewDeleteViewAliasNoContent() *DeleteViewAliasNoContent { - return &DeleteViewAliasNoContent{} -} - -/* -DeleteViewAliasNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewAliasNoContent struct { -} - -// IsSuccess returns true when this delete view alias no content response has a 2xx status code -func (o *DeleteViewAliasNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view alias no content response has a 3xx status code -func (o *DeleteViewAliasNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view alias no content response has a 4xx status code -func (o *DeleteViewAliasNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view alias no content response has a 5xx status code -func (o *DeleteViewAliasNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view alias no content response a status code equal to that given -func (o *DeleteViewAliasNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view alias no content response -func (o *DeleteViewAliasNoContent) Code() int { - return 204 -} - -func (o *DeleteViewAliasNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/viewAliases/{name}][%d] deleteViewAliasNoContent", 204) -} - -func (o *DeleteViewAliasNoContent) String() string { - return fmt.Sprintf("[DELETE /public/viewAliases/{name}][%d] deleteViewAliasNoContent", 204) -} - -func (o *DeleteViewAliasNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewAliasDefault creates a DeleteViewAliasDefault with default headers values -func NewDeleteViewAliasDefault(code int) *DeleteViewAliasDefault { - return &DeleteViewAliasDefault{ - _statusCode: code, - } -} - -/* -DeleteViewAliasDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewAliasDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete view alias default response has a 2xx status code -func (o *DeleteViewAliasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view alias default response has a 3xx status code -func (o *DeleteViewAliasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view alias default response has a 4xx status code -func (o *DeleteViewAliasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view alias default response has a 5xx status code -func (o *DeleteViewAliasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view alias default response a status code equal to that given -func (o *DeleteViewAliasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view alias default response -func (o *DeleteViewAliasDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewAliasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewAliases/{name}][%d] DeleteViewAlias default %s", o._statusCode, payload) -} - -func (o *DeleteViewAliasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewAliases/{name}][%d] DeleteViewAlias default %s", o._statusCode, payload) -} - -func (o *DeleteViewAliasDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteViewAliasDefault) 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/views/delete_view_by_id_parameters.go b/v1/client/views/delete_view_by_id_parameters.go deleted file mode 100644 index c02762ef..00000000 --- a/v1/client/views/delete_view_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewDeleteViewByIDParams creates a new DeleteViewByIDParams 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 NewDeleteViewByIDParams() *DeleteViewByIDParams { - return &DeleteViewByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewByIDParamsWithTimeout creates a new DeleteViewByIDParams object -// with the ability to set a timeout on a request. -func NewDeleteViewByIDParamsWithTimeout(timeout time.Duration) *DeleteViewByIDParams { - return &DeleteViewByIDParams{ - timeout: timeout, - } -} - -// NewDeleteViewByIDParamsWithContext creates a new DeleteViewByIDParams object -// with the ability to set a context for a request. -func NewDeleteViewByIDParamsWithContext(ctx context.Context) *DeleteViewByIDParams { - return &DeleteViewByIDParams{ - Context: ctx, - } -} - -// NewDeleteViewByIDParamsWithHTTPClient creates a new DeleteViewByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewByIDParamsWithHTTPClient(client *http.Client) *DeleteViewByIDParams { - return &DeleteViewByIDParams{ - HTTPClient: client, - } -} - -/* -DeleteViewByIDParams contains all the parameters to send to the API endpoint - - for the delete view by Id operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewByIDParams struct { - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewByIDParams) WithDefaults() *DeleteViewByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view by Id params -func (o *DeleteViewByIDParams) WithTimeout(timeout time.Duration) *DeleteViewByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view by Id params -func (o *DeleteViewByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view by Id params -func (o *DeleteViewByIDParams) WithContext(ctx context.Context) *DeleteViewByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view by Id params -func (o *DeleteViewByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view by Id params -func (o *DeleteViewByIDParams) WithHTTPClient(client *http.Client) *DeleteViewByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view by Id params -func (o *DeleteViewByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete view by Id params -func (o *DeleteViewByIDParams) WithID(id int64) *DeleteViewByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete view by Id params -func (o *DeleteViewByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/delete_view_by_id_responses.go b/v1/client/views/delete_view_by_id_responses.go deleted file mode 100644 index 3fa5ce61..00000000 --- a/v1/client/views/delete_view_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteViewByIDReader is a Reader for the DeleteViewByID structure. -type DeleteViewByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewByIDDefault(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 - } -} - -// NewDeleteViewByIDNoContent creates a DeleteViewByIDNoContent with default headers values -func NewDeleteViewByIDNoContent() *DeleteViewByIDNoContent { - return &DeleteViewByIDNoContent{} -} - -/* -DeleteViewByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewByIDNoContent struct { -} - -// IsSuccess returns true when this delete view by Id no content response has a 2xx status code -func (o *DeleteViewByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view by Id no content response has a 3xx status code -func (o *DeleteViewByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view by Id no content response has a 4xx status code -func (o *DeleteViewByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view by Id no content response has a 5xx status code -func (o *DeleteViewByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view by Id no content response a status code equal to that given -func (o *DeleteViewByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view by Id no content response -func (o *DeleteViewByIDNoContent) Code() int { - return 204 -} - -func (o *DeleteViewByIDNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/views/id/{id}][%d] deleteViewByIdNoContent", 204) -} - -func (o *DeleteViewByIDNoContent) String() string { - return fmt.Sprintf("[DELETE /public/views/id/{id}][%d] deleteViewByIdNoContent", 204) -} - -func (o *DeleteViewByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewByIDDefault creates a DeleteViewByIDDefault with default headers values -func NewDeleteViewByIDDefault(code int) *DeleteViewByIDDefault { - return &DeleteViewByIDDefault{ - _statusCode: code, - } -} - -/* -DeleteViewByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete view by Id default response has a 2xx status code -func (o *DeleteViewByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view by Id default response has a 3xx status code -func (o *DeleteViewByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view by Id default response has a 4xx status code -func (o *DeleteViewByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view by Id default response has a 5xx status code -func (o *DeleteViewByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view by Id default response a status code equal to that given -func (o *DeleteViewByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view by Id default response -func (o *DeleteViewByIDDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/views/id/{id}][%d] DeleteViewById default %s", o._statusCode, payload) -} - -func (o *DeleteViewByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/views/id/{id}][%d] DeleteViewById default %s", o._statusCode, payload) -} - -func (o *DeleteViewByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteViewByIDDefault) 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/views/delete_view_parameters.go b/v1/client/views/delete_view_parameters.go deleted file mode 100644 index 84deb0a6..00000000 --- a/v1/client/views/delete_view_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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" -) - -// NewDeleteViewParams creates a new DeleteViewParams 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 NewDeleteViewParams() *DeleteViewParams { - return &DeleteViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewParamsWithTimeout creates a new DeleteViewParams object -// with the ability to set a timeout on a request. -func NewDeleteViewParamsWithTimeout(timeout time.Duration) *DeleteViewParams { - return &DeleteViewParams{ - timeout: timeout, - } -} - -// NewDeleteViewParamsWithContext creates a new DeleteViewParams object -// with the ability to set a context for a request. -func NewDeleteViewParamsWithContext(ctx context.Context) *DeleteViewParams { - return &DeleteViewParams{ - Context: ctx, - } -} - -// NewDeleteViewParamsWithHTTPClient creates a new DeleteViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewParamsWithHTTPClient(client *http.Client) *DeleteViewParams { - return &DeleteViewParams{ - HTTPClient: client, - } -} - -/* -DeleteViewParams contains all the parameters to send to the API endpoint - - for the delete view operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewParams struct { - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewParams) WithDefaults() *DeleteViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view params -func (o *DeleteViewParams) WithTimeout(timeout time.Duration) *DeleteViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view params -func (o *DeleteViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view params -func (o *DeleteViewParams) WithContext(ctx context.Context) *DeleteViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view params -func (o *DeleteViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view params -func (o *DeleteViewParams) WithHTTPClient(client *http.Client) *DeleteViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view params -func (o *DeleteViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete view params -func (o *DeleteViewParams) WithName(name string) *DeleteViewParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete view params -func (o *DeleteViewParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/delete_view_responses.go b/v1/client/views/delete_view_responses.go deleted file mode 100644 index 67551fcb..00000000 --- a/v1/client/views/delete_view_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteViewReader is a Reader for the DeleteView structure. -type DeleteViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewDefault(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 - } -} - -// NewDeleteViewNoContent creates a DeleteViewNoContent with default headers values -func NewDeleteViewNoContent() *DeleteViewNoContent { - return &DeleteViewNoContent{} -} - -/* -DeleteViewNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewNoContent struct { -} - -// IsSuccess returns true when this delete view no content response has a 2xx status code -func (o *DeleteViewNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view no content response has a 3xx status code -func (o *DeleteViewNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view no content response has a 4xx status code -func (o *DeleteViewNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view no content response has a 5xx status code -func (o *DeleteViewNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view no content response a status code equal to that given -func (o *DeleteViewNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view no content response -func (o *DeleteViewNoContent) Code() int { - return 204 -} - -func (o *DeleteViewNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/views/{name}][%d] deleteViewNoContent", 204) -} - -func (o *DeleteViewNoContent) String() string { - return fmt.Sprintf("[DELETE /public/views/{name}][%d] deleteViewNoContent", 204) -} - -func (o *DeleteViewNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewDefault creates a DeleteViewDefault with default headers values -func NewDeleteViewDefault(code int) *DeleteViewDefault { - return &DeleteViewDefault{ - _statusCode: code, - } -} - -/* -DeleteViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete view default response has a 2xx status code -func (o *DeleteViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view default response has a 3xx status code -func (o *DeleteViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view default response has a 4xx status code -func (o *DeleteViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view default response has a 5xx status code -func (o *DeleteViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view default response a status code equal to that given -func (o *DeleteViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view default response -func (o *DeleteViewDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/views/{name}][%d] DeleteView default %s", o._statusCode, payload) -} - -func (o *DeleteViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/views/{name}][%d] DeleteView default %s", o._statusCode, payload) -} - -func (o *DeleteViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteViewDefault) 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/views/delete_view_users_quota_parameters.go b/v1/client/views/delete_view_users_quota_parameters.go deleted file mode 100644 index fa3a6e90..00000000 --- a/v1/client/views/delete_view_users_quota_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewDeleteViewUsersQuotaParams creates a new DeleteViewUsersQuotaParams 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 NewDeleteViewUsersQuotaParams() *DeleteViewUsersQuotaParams { - return &DeleteViewUsersQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewUsersQuotaParamsWithTimeout creates a new DeleteViewUsersQuotaParams object -// with the ability to set a timeout on a request. -func NewDeleteViewUsersQuotaParamsWithTimeout(timeout time.Duration) *DeleteViewUsersQuotaParams { - return &DeleteViewUsersQuotaParams{ - timeout: timeout, - } -} - -// NewDeleteViewUsersQuotaParamsWithContext creates a new DeleteViewUsersQuotaParams object -// with the ability to set a context for a request. -func NewDeleteViewUsersQuotaParamsWithContext(ctx context.Context) *DeleteViewUsersQuotaParams { - return &DeleteViewUsersQuotaParams{ - Context: ctx, - } -} - -// NewDeleteViewUsersQuotaParamsWithHTTPClient creates a new DeleteViewUsersQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewUsersQuotaParamsWithHTTPClient(client *http.Client) *DeleteViewUsersQuotaParams { - return &DeleteViewUsersQuotaParams{ - HTTPClient: client, - } -} - -/* -DeleteViewUsersQuotaParams contains all the parameters to send to the API endpoint - - for the delete view users quota operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewUsersQuotaParams struct { - - /* Body. - - update user quota params. - */ - Body *models.DeleteViewUsersQuotaParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view users quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewUsersQuotaParams) WithDefaults() *DeleteViewUsersQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view users quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewUsersQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) WithTimeout(timeout time.Duration) *DeleteViewUsersQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) WithContext(ctx context.Context) *DeleteViewUsersQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) WithHTTPClient(client *http.Client) *DeleteViewUsersQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) WithBody(body *models.DeleteViewUsersQuotaParameters) *DeleteViewUsersQuotaParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete view users quota params -func (o *DeleteViewUsersQuotaParams) SetBody(body *models.DeleteViewUsersQuotaParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewUsersQuotaParams) 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/views/delete_view_users_quota_responses.go b/v1/client/views/delete_view_users_quota_responses.go deleted file mode 100644 index 1db6553e..00000000 --- a/v1/client/views/delete_view_users_quota_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// DeleteViewUsersQuotaReader is a Reader for the DeleteViewUsersQuota structure. -type DeleteViewUsersQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewUsersQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewUsersQuotaNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewUsersQuotaDefault(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 - } -} - -// NewDeleteViewUsersQuotaNoContent creates a DeleteViewUsersQuotaNoContent with default headers values -func NewDeleteViewUsersQuotaNoContent() *DeleteViewUsersQuotaNoContent { - return &DeleteViewUsersQuotaNoContent{} -} - -/* -DeleteViewUsersQuotaNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewUsersQuotaNoContent struct { -} - -// IsSuccess returns true when this delete view users quota no content response has a 2xx status code -func (o *DeleteViewUsersQuotaNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view users quota no content response has a 3xx status code -func (o *DeleteViewUsersQuotaNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view users quota no content response has a 4xx status code -func (o *DeleteViewUsersQuotaNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view users quota no content response has a 5xx status code -func (o *DeleteViewUsersQuotaNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view users quota no content response a status code equal to that given -func (o *DeleteViewUsersQuotaNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view users quota no content response -func (o *DeleteViewUsersQuotaNoContent) Code() int { - return 204 -} - -func (o *DeleteViewUsersQuotaNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/viewUserQuotas][%d] deleteViewUsersQuotaNoContent", 204) -} - -func (o *DeleteViewUsersQuotaNoContent) String() string { - return fmt.Sprintf("[DELETE /public/viewUserQuotas][%d] deleteViewUsersQuotaNoContent", 204) -} - -func (o *DeleteViewUsersQuotaNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewUsersQuotaDefault creates a DeleteViewUsersQuotaDefault with default headers values -func NewDeleteViewUsersQuotaDefault(code int) *DeleteViewUsersQuotaDefault { - return &DeleteViewUsersQuotaDefault{ - _statusCode: code, - } -} - -/* -DeleteViewUsersQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewUsersQuotaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete view users quota default response has a 2xx status code -func (o *DeleteViewUsersQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view users quota default response has a 3xx status code -func (o *DeleteViewUsersQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view users quota default response has a 4xx status code -func (o *DeleteViewUsersQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view users quota default response has a 5xx status code -func (o *DeleteViewUsersQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view users quota default response a status code equal to that given -func (o *DeleteViewUsersQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view users quota default response -func (o *DeleteViewUsersQuotaDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewUsersQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewUserQuotas][%d] DeleteViewUsersQuota default %s", o._statusCode, payload) -} - -func (o *DeleteViewUsersQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/viewUserQuotas][%d] DeleteViewUsersQuota default %s", o._statusCode, payload) -} - -func (o *DeleteViewUsersQuotaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteViewUsersQuotaDefault) 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/views/get_file_lock_status_by_id_parameters.go b/v1/client/views/get_file_lock_status_by_id_parameters.go deleted file mode 100644 index 0641668f..00000000 --- a/v1/client/views/get_file_lock_status_by_id_parameters.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetFileLockStatusByIDParams creates a new GetFileLockStatusByIDParams 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 NewGetFileLockStatusByIDParams() *GetFileLockStatusByIDParams { - return &GetFileLockStatusByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileLockStatusByIDParamsWithTimeout creates a new GetFileLockStatusByIDParams object -// with the ability to set a timeout on a request. -func NewGetFileLockStatusByIDParamsWithTimeout(timeout time.Duration) *GetFileLockStatusByIDParams { - return &GetFileLockStatusByIDParams{ - timeout: timeout, - } -} - -// NewGetFileLockStatusByIDParamsWithContext creates a new GetFileLockStatusByIDParams object -// with the ability to set a context for a request. -func NewGetFileLockStatusByIDParamsWithContext(ctx context.Context) *GetFileLockStatusByIDParams { - return &GetFileLockStatusByIDParams{ - Context: ctx, - } -} - -// NewGetFileLockStatusByIDParamsWithHTTPClient creates a new GetFileLockStatusByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileLockStatusByIDParamsWithHTTPClient(client *http.Client) *GetFileLockStatusByIDParams { - return &GetFileLockStatusByIDParams{ - HTTPClient: client, - } -} - -/* -GetFileLockStatusByIDParams contains all the parameters to send to the API endpoint - - for the get file lock status by Id operation. - - Typically these are written to a http.Request. -*/ -type GetFileLockStatusByIDParams struct { - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - /* Path. - - Specifies the file path that needs to be locked. - */ - Path *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file lock status by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusByIDParams) WithDefaults() *GetFileLockStatusByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file lock status by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) WithTimeout(timeout time.Duration) *GetFileLockStatusByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) WithContext(ctx context.Context) *GetFileLockStatusByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) WithHTTPClient(client *http.Client) *GetFileLockStatusByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) WithID(id int64) *GetFileLockStatusByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) SetID(id int64) { - o.ID = id -} - -// WithPath adds the path to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) WithPath(path *string) *GetFileLockStatusByIDParams { - o.SetPath(path) - return o -} - -// SetPath adds the path to the get file lock status by Id params -func (o *GetFileLockStatusByIDParams) SetPath(path *string) { - o.Path = path -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileLockStatusByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.Path != nil { - - // query param path - var qrPath string - - if o.Path != nil { - qrPath = *o.Path - } - qPath := qrPath - if qPath != "" { - - if err := r.SetQueryParam("path", qPath); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/get_file_lock_status_by_id_responses.go b/v1/client/views/get_file_lock_status_by_id_responses.go deleted file mode 100644 index 2de7cb34..00000000 --- a/v1/client/views/get_file_lock_status_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileLockStatusByIDReader is a Reader for the GetFileLockStatusByID structure. -type GetFileLockStatusByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileLockStatusByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileLockStatusByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileLockStatusByIDDefault(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 - } -} - -// NewGetFileLockStatusByIDOK creates a GetFileLockStatusByIDOK with default headers values -func NewGetFileLockStatusByIDOK() *GetFileLockStatusByIDOK { - return &GetFileLockStatusByIDOK{} -} - -/* -GetFileLockStatusByIDOK describes a response with status code 200, with default header values. - -Get lock file status response -*/ -type GetFileLockStatusByIDOK struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this get file lock status by Id o k response has a 2xx status code -func (o *GetFileLockStatusByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file lock status by Id o k response has a 3xx status code -func (o *GetFileLockStatusByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file lock status by Id o k response has a 4xx status code -func (o *GetFileLockStatusByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file lock status by Id o k response has a 5xx status code -func (o *GetFileLockStatusByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file lock status by Id o k response a status code equal to that given -func (o *GetFileLockStatusByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file lock status by Id o k response -func (o *GetFileLockStatusByIDOK) Code() int { - return 200 -} - -func (o *GetFileLockStatusByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}/fileLocks][%d] getFileLockStatusByIdOK %s", 200, payload) -} - -func (o *GetFileLockStatusByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}/fileLocks][%d] getFileLockStatusByIdOK %s", 200, payload) -} - -func (o *GetFileLockStatusByIDOK) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *GetFileLockStatusByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileLockStatusByIDDefault creates a GetFileLockStatusByIDDefault with default headers values -func NewGetFileLockStatusByIDDefault(code int) *GetFileLockStatusByIDDefault { - return &GetFileLockStatusByIDDefault{ - _statusCode: code, - } -} - -/* -GetFileLockStatusByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileLockStatusByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get file lock status by Id default response has a 2xx status code -func (o *GetFileLockStatusByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file lock status by Id default response has a 3xx status code -func (o *GetFileLockStatusByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file lock status by Id default response has a 4xx status code -func (o *GetFileLockStatusByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file lock status by Id default response has a 5xx status code -func (o *GetFileLockStatusByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file lock status by Id default response a status code equal to that given -func (o *GetFileLockStatusByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file lock status by Id default response -func (o *GetFileLockStatusByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetFileLockStatusByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}/fileLocks][%d] GetFileLockStatusById default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}/fileLocks][%d] GetFileLockStatusById default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetFileLockStatusByIDDefault) 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/views/get_file_lock_status_parameters.go b/v1/client/views/get_file_lock_status_parameters.go deleted file mode 100644 index ea55e5ba..00000000 --- a/v1/client/views/get_file_lock_status_parameters.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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" -) - -// NewGetFileLockStatusParams creates a new GetFileLockStatusParams 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 NewGetFileLockStatusParams() *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileLockStatusParamsWithTimeout creates a new GetFileLockStatusParams object -// with the ability to set a timeout on a request. -func NewGetFileLockStatusParamsWithTimeout(timeout time.Duration) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - timeout: timeout, - } -} - -// NewGetFileLockStatusParamsWithContext creates a new GetFileLockStatusParams object -// with the ability to set a context for a request. -func NewGetFileLockStatusParamsWithContext(ctx context.Context) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - Context: ctx, - } -} - -// NewGetFileLockStatusParamsWithHTTPClient creates a new GetFileLockStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileLockStatusParamsWithHTTPClient(client *http.Client) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - HTTPClient: client, - } -} - -/* -GetFileLockStatusParams contains all the parameters to send to the API endpoint - - for the get file lock status operation. - - Typically these are written to a http.Request. -*/ -type GetFileLockStatusParams struct { - - /* Name. - - Specifies the View name. - */ - Name string - - /* Path. - - Specifies the file path that needs to be locked. - */ - Path *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file lock status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusParams) WithDefaults() *GetFileLockStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file lock status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file lock status params -func (o *GetFileLockStatusParams) WithTimeout(timeout time.Duration) *GetFileLockStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file lock status params -func (o *GetFileLockStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file lock status params -func (o *GetFileLockStatusParams) WithContext(ctx context.Context) *GetFileLockStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file lock status params -func (o *GetFileLockStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file lock status params -func (o *GetFileLockStatusParams) WithHTTPClient(client *http.Client) *GetFileLockStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file lock status params -func (o *GetFileLockStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the get file lock status params -func (o *GetFileLockStatusParams) WithName(name string) *GetFileLockStatusParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get file lock status params -func (o *GetFileLockStatusParams) SetName(name string) { - o.Name = name -} - -// WithPath adds the path to the get file lock status params -func (o *GetFileLockStatusParams) WithPath(path *string) *GetFileLockStatusParams { - o.SetPath(path) - return o -} - -// SetPath adds the path to the get file lock status params -func (o *GetFileLockStatusParams) SetPath(path *string) { - o.Path = path -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileLockStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if o.Path != nil { - - // query param path - var qrPath string - - if o.Path != nil { - qrPath = *o.Path - } - qPath := qrPath - if qPath != "" { - - if err := r.SetQueryParam("path", qPath); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/get_file_lock_status_responses.go b/v1/client/views/get_file_lock_status_responses.go deleted file mode 100644 index 352323e6..00000000 --- a/v1/client/views/get_file_lock_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetFileLockStatusReader is a Reader for the GetFileLockStatus structure. -type GetFileLockStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileLockStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileLockStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileLockStatusDefault(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 - } -} - -// NewGetFileLockStatusOK creates a GetFileLockStatusOK with default headers values -func NewGetFileLockStatusOK() *GetFileLockStatusOK { - return &GetFileLockStatusOK{} -} - -/* -GetFileLockStatusOK describes a response with status code 200, with default header values. - -Get lock file status response -*/ -type GetFileLockStatusOK struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this get file lock status o k response has a 2xx status code -func (o *GetFileLockStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file lock status o k response has a 3xx status code -func (o *GetFileLockStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file lock status o k response has a 4xx status code -func (o *GetFileLockStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file lock status o k response has a 5xx status code -func (o *GetFileLockStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file lock status o k response a status code equal to that given -func (o *GetFileLockStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file lock status o k response -func (o *GetFileLockStatusOK) Code() int { - return 200 -} - -func (o *GetFileLockStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}/fileLocks][%d] getFileLockStatusOK %s", 200, payload) -} - -func (o *GetFileLockStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}/fileLocks][%d] getFileLockStatusOK %s", 200, payload) -} - -func (o *GetFileLockStatusOK) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *GetFileLockStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileLockStatusDefault creates a GetFileLockStatusDefault with default headers values -func NewGetFileLockStatusDefault(code int) *GetFileLockStatusDefault { - return &GetFileLockStatusDefault{ - _statusCode: code, - } -} - -/* -GetFileLockStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileLockStatusDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get file lock status default response has a 2xx status code -func (o *GetFileLockStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file lock status default response has a 3xx status code -func (o *GetFileLockStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file lock status default response has a 4xx status code -func (o *GetFileLockStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file lock status default response has a 5xx status code -func (o *GetFileLockStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file lock status default response a status code equal to that given -func (o *GetFileLockStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file lock status default response -func (o *GetFileLockStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetFileLockStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}/fileLocks][%d] GetFileLockStatus default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}/fileLocks][%d] GetFileLockStatus default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetFileLockStatusDefault) 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/views/get_nfs_connections_parameters.go b/v1/client/views/get_nfs_connections_parameters.go deleted file mode 100644 index cdafb438..00000000 --- a/v1/client/views/get_nfs_connections_parameters.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetNfsConnectionsParams creates a new GetNfsConnectionsParams 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 NewGetNfsConnectionsParams() *GetNfsConnectionsParams { - return &GetNfsConnectionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNfsConnectionsParamsWithTimeout creates a new GetNfsConnectionsParams object -// with the ability to set a timeout on a request. -func NewGetNfsConnectionsParamsWithTimeout(timeout time.Duration) *GetNfsConnectionsParams { - return &GetNfsConnectionsParams{ - timeout: timeout, - } -} - -// NewGetNfsConnectionsParamsWithContext creates a new GetNfsConnectionsParams object -// with the ability to set a context for a request. -func NewGetNfsConnectionsParamsWithContext(ctx context.Context) *GetNfsConnectionsParams { - return &GetNfsConnectionsParams{ - Context: ctx, - } -} - -// NewGetNfsConnectionsParamsWithHTTPClient creates a new GetNfsConnectionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNfsConnectionsParamsWithHTTPClient(client *http.Client) *GetNfsConnectionsParams { - return &GetNfsConnectionsParams{ - HTTPClient: client, - } -} - -/* -GetNfsConnectionsParams contains all the parameters to send to the API endpoint - - for the get nfs connections operation. - - Typically these are written to a http.Request. -*/ -type GetNfsConnectionsParams struct { - - /* MaxCount. - - Maximum number of results to return. - - Format: int32 - */ - MaxCount *int32 - - /* ViewIds. - - List of ids of views whose connections are to be fetched. - */ - ViewIds []int64 - - /* ViewNames. - - Parameters to get Nfs Connections. - List of names of views whose connections are to be fetched. - */ - ViewNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get nfs connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNfsConnectionsParams) WithDefaults() *GetNfsConnectionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get nfs connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNfsConnectionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get nfs connections params -func (o *GetNfsConnectionsParams) WithTimeout(timeout time.Duration) *GetNfsConnectionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get nfs connections params -func (o *GetNfsConnectionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get nfs connections params -func (o *GetNfsConnectionsParams) WithContext(ctx context.Context) *GetNfsConnectionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get nfs connections params -func (o *GetNfsConnectionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get nfs connections params -func (o *GetNfsConnectionsParams) WithHTTPClient(client *http.Client) *GetNfsConnectionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get nfs connections params -func (o *GetNfsConnectionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMaxCount adds the maxCount to the get nfs connections params -func (o *GetNfsConnectionsParams) WithMaxCount(maxCount *int32) *GetNfsConnectionsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get nfs connections params -func (o *GetNfsConnectionsParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithViewIds adds the viewIds to the get nfs connections params -func (o *GetNfsConnectionsParams) WithViewIds(viewIds []int64) *GetNfsConnectionsParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get nfs connections params -func (o *GetNfsConnectionsParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WithViewNames adds the viewNames to the get nfs connections params -func (o *GetNfsConnectionsParams) WithViewNames(viewNames []string) *GetNfsConnectionsParams { - o.SetViewNames(viewNames) - return o -} - -// SetViewNames adds the viewNames to the get nfs connections params -func (o *GetNfsConnectionsParams) SetViewNames(viewNames []string) { - o.ViewNames = viewNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNfsConnectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if o.ViewNames != nil { - - // binding items for viewNames - joinedViewNames := o.bindParamViewNames(reg) - - // query array param viewNames - if err := r.SetQueryParam("viewNames", joinedViewNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetNfsConnections binds the parameter viewIds -func (o *GetNfsConnectionsParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} - -// bindParamGetNfsConnections binds the parameter viewNames -func (o *GetNfsConnectionsParams) bindParamViewNames(formats strfmt.Registry) []string { - viewNamesIR := o.ViewNames - - var viewNamesIC []string - for _, viewNamesIIR := range viewNamesIR { // explode []string - - viewNamesIIV := viewNamesIIR // string as string - viewNamesIC = append(viewNamesIC, viewNamesIIV) - } - - // items.CollectionFormat: "" - viewNamesIS := swag.JoinByFormat(viewNamesIC, "") - - return viewNamesIS -} diff --git a/v1/client/views/get_nfs_connections_responses.go b/v1/client/views/get_nfs_connections_responses.go deleted file mode 100644 index 34a18c28..00000000 --- a/v1/client/views/get_nfs_connections_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetNfsConnectionsReader is a Reader for the GetNfsConnections structure. -type GetNfsConnectionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNfsConnectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNfsConnectionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNfsConnectionsDefault(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 - } -} - -// NewGetNfsConnectionsOK creates a GetNfsConnectionsOK with default headers values -func NewGetNfsConnectionsOK() *GetNfsConnectionsOK { - return &GetNfsConnectionsOK{} -} - -/* -GetNfsConnectionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNfsConnectionsOK struct { - Payload []*models.NfsConnection -} - -// IsSuccess returns true when this get nfs connections o k response has a 2xx status code -func (o *GetNfsConnectionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get nfs connections o k response has a 3xx status code -func (o *GetNfsConnectionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get nfs connections o k response has a 4xx status code -func (o *GetNfsConnectionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get nfs connections o k response has a 5xx status code -func (o *GetNfsConnectionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get nfs connections o k response a status code equal to that given -func (o *GetNfsConnectionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get nfs connections o k response -func (o *GetNfsConnectionsOK) Code() int { - return 200 -} - -func (o *GetNfsConnectionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nfsConnections][%d] getNfsConnectionsOK %s", 200, payload) -} - -func (o *GetNfsConnectionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nfsConnections][%d] getNfsConnectionsOK %s", 200, payload) -} - -func (o *GetNfsConnectionsOK) GetPayload() []*models.NfsConnection { - return o.Payload -} - -func (o *GetNfsConnectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNfsConnectionsDefault creates a GetNfsConnectionsDefault with default headers values -func NewGetNfsConnectionsDefault(code int) *GetNfsConnectionsDefault { - return &GetNfsConnectionsDefault{ - _statusCode: code, - } -} - -/* -GetNfsConnectionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNfsConnectionsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get nfs connections default response has a 2xx status code -func (o *GetNfsConnectionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get nfs connections default response has a 3xx status code -func (o *GetNfsConnectionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get nfs connections default response has a 4xx status code -func (o *GetNfsConnectionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get nfs connections default response has a 5xx status code -func (o *GetNfsConnectionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get nfs connections default response a status code equal to that given -func (o *GetNfsConnectionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get nfs connections default response -func (o *GetNfsConnectionsDefault) Code() int { - return o._statusCode -} - -func (o *GetNfsConnectionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nfsConnections][%d] GetNfsConnections default %s", o._statusCode, payload) -} - -func (o *GetNfsConnectionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nfsConnections][%d] GetNfsConnections default %s", o._statusCode, payload) -} - -func (o *GetNfsConnectionsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetNfsConnectionsDefault) 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/views/get_qo_s_policies_parameters.go b/v1/client/views/get_qo_s_policies_parameters.go deleted file mode 100644 index 5d5c021b..00000000 --- a/v1/client/views/get_qo_s_policies_parameters.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetQoSPoliciesParams creates a new GetQoSPoliciesParams 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 NewGetQoSPoliciesParams() *GetQoSPoliciesParams { - return &GetQoSPoliciesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetQoSPoliciesParamsWithTimeout creates a new GetQoSPoliciesParams object -// with the ability to set a timeout on a request. -func NewGetQoSPoliciesParamsWithTimeout(timeout time.Duration) *GetQoSPoliciesParams { - return &GetQoSPoliciesParams{ - timeout: timeout, - } -} - -// NewGetQoSPoliciesParamsWithContext creates a new GetQoSPoliciesParams object -// with the ability to set a context for a request. -func NewGetQoSPoliciesParamsWithContext(ctx context.Context) *GetQoSPoliciesParams { - return &GetQoSPoliciesParams{ - Context: ctx, - } -} - -// NewGetQoSPoliciesParamsWithHTTPClient creates a new GetQoSPoliciesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetQoSPoliciesParamsWithHTTPClient(client *http.Client) *GetQoSPoliciesParams { - return &GetQoSPoliciesParams{ - HTTPClient: client, - } -} - -/* -GetQoSPoliciesParams contains all the parameters to send to the API endpoint - - for the get qo s policies operation. - - Typically these are written to a http.Request. -*/ -type GetQoSPoliciesParams struct { - - /* Ids. - - Specifies the Ids of QoS Policies to filter by. - */ - Ids []int64 - - /* Names. - - Specifies the names of QoS Policies to filter by. - */ - Names []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get qo s policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetQoSPoliciesParams) WithDefaults() *GetQoSPoliciesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get qo s policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetQoSPoliciesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get qo s policies params -func (o *GetQoSPoliciesParams) WithTimeout(timeout time.Duration) *GetQoSPoliciesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get qo s policies params -func (o *GetQoSPoliciesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get qo s policies params -func (o *GetQoSPoliciesParams) WithContext(ctx context.Context) *GetQoSPoliciesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get qo s policies params -func (o *GetQoSPoliciesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get qo s policies params -func (o *GetQoSPoliciesParams) WithHTTPClient(client *http.Client) *GetQoSPoliciesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get qo s policies params -func (o *GetQoSPoliciesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get qo s policies params -func (o *GetQoSPoliciesParams) WithIds(ids []int64) *GetQoSPoliciesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get qo s policies params -func (o *GetQoSPoliciesParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithNames adds the names to the get qo s policies params -func (o *GetQoSPoliciesParams) WithNames(names []string) *GetQoSPoliciesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get qo s policies params -func (o *GetQoSPoliciesParams) SetNames(names []string) { - o.Names = names -} - -// WriteToRequest writes these params to a swagger request -func (o *GetQoSPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetQoSPolicies binds the parameter ids -func (o *GetQoSPoliciesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetQoSPolicies binds the parameter names -func (o *GetQoSPoliciesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} diff --git a/v1/client/views/get_qo_s_policies_responses.go b/v1/client/views/get_qo_s_policies_responses.go deleted file mode 100644 index eead7543..00000000 --- a/v1/client/views/get_qo_s_policies_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetQoSPoliciesReader is a Reader for the GetQoSPolicies structure. -type GetQoSPoliciesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetQoSPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetQoSPoliciesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetQoSPoliciesDefault(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 - } -} - -// NewGetQoSPoliciesOK creates a GetQoSPoliciesOK with default headers values -func NewGetQoSPoliciesOK() *GetQoSPoliciesOK { - return &GetQoSPoliciesOK{} -} - -/* -GetQoSPoliciesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetQoSPoliciesOK struct { - Payload []*models.QoSPolicy -} - -// IsSuccess returns true when this get qo s policies o k response has a 2xx status code -func (o *GetQoSPoliciesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get qo s policies o k response has a 3xx status code -func (o *GetQoSPoliciesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get qo s policies o k response has a 4xx status code -func (o *GetQoSPoliciesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get qo s policies o k response has a 5xx status code -func (o *GetQoSPoliciesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get qo s policies o k response a status code equal to that given -func (o *GetQoSPoliciesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get qo s policies o k response -func (o *GetQoSPoliciesOK) Code() int { - return 200 -} - -func (o *GetQoSPoliciesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/qosPolicies][%d] getQoSPoliciesOK %s", 200, payload) -} - -func (o *GetQoSPoliciesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/qosPolicies][%d] getQoSPoliciesOK %s", 200, payload) -} - -func (o *GetQoSPoliciesOK) GetPayload() []*models.QoSPolicy { - return o.Payload -} - -func (o *GetQoSPoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetQoSPoliciesDefault creates a GetQoSPoliciesDefault with default headers values -func NewGetQoSPoliciesDefault(code int) *GetQoSPoliciesDefault { - return &GetQoSPoliciesDefault{ - _statusCode: code, - } -} - -/* -GetQoSPoliciesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetQoSPoliciesDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get qo s policies default response has a 2xx status code -func (o *GetQoSPoliciesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get qo s policies default response has a 3xx status code -func (o *GetQoSPoliciesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get qo s policies default response has a 4xx status code -func (o *GetQoSPoliciesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get qo s policies default response has a 5xx status code -func (o *GetQoSPoliciesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get qo s policies default response a status code equal to that given -func (o *GetQoSPoliciesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get qo s policies default response -func (o *GetQoSPoliciesDefault) Code() int { - return o._statusCode -} - -func (o *GetQoSPoliciesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/qosPolicies][%d] GetQoSPolicies default %s", o._statusCode, payload) -} - -func (o *GetQoSPoliciesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/qosPolicies][%d] GetQoSPolicies default %s", o._statusCode, payload) -} - -func (o *GetQoSPoliciesDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetQoSPoliciesDefault) 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/views/get_smb_connections_parameters.go b/v1/client/views/get_smb_connections_parameters.go deleted file mode 100644 index ba216923..00000000 --- a/v1/client/views/get_smb_connections_parameters.go +++ /dev/null @@ -1,291 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetSmbConnectionsParams creates a new GetSmbConnectionsParams 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 NewGetSmbConnectionsParams() *GetSmbConnectionsParams { - return &GetSmbConnectionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSmbConnectionsParamsWithTimeout creates a new GetSmbConnectionsParams object -// with the ability to set a timeout on a request. -func NewGetSmbConnectionsParamsWithTimeout(timeout time.Duration) *GetSmbConnectionsParams { - return &GetSmbConnectionsParams{ - timeout: timeout, - } -} - -// NewGetSmbConnectionsParamsWithContext creates a new GetSmbConnectionsParams object -// with the ability to set a context for a request. -func NewGetSmbConnectionsParamsWithContext(ctx context.Context) *GetSmbConnectionsParams { - return &GetSmbConnectionsParams{ - Context: ctx, - } -} - -// NewGetSmbConnectionsParamsWithHTTPClient creates a new GetSmbConnectionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSmbConnectionsParamsWithHTTPClient(client *http.Client) *GetSmbConnectionsParams { - return &GetSmbConnectionsParams{ - HTTPClient: client, - } -} - -/* -GetSmbConnectionsParams contains all the parameters to send to the API endpoint - - for the get smb connections operation. - - Typically these are written to a http.Request. -*/ -type GetSmbConnectionsParams struct { - - /* IncludeSid. - - Specifies whether to include list of sids in the result. - */ - IncludeSid *bool - - /* MaxCount. - - Maximum number of results to return. - - Format: int32 - */ - MaxCount *int32 - - /* ViewIds. - - List of ids of views whose connections are to be fetched. - */ - ViewIds []int64 - - /* ViewNames. - - Parameters to get Smb Connections. - List of names of views whose connections are to be fetched. - */ - ViewNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get smb connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSmbConnectionsParams) WithDefaults() *GetSmbConnectionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get smb connections params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSmbConnectionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get smb connections params -func (o *GetSmbConnectionsParams) WithTimeout(timeout time.Duration) *GetSmbConnectionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get smb connections params -func (o *GetSmbConnectionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get smb connections params -func (o *GetSmbConnectionsParams) WithContext(ctx context.Context) *GetSmbConnectionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get smb connections params -func (o *GetSmbConnectionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get smb connections params -func (o *GetSmbConnectionsParams) WithHTTPClient(client *http.Client) *GetSmbConnectionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get smb connections params -func (o *GetSmbConnectionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeSid adds the includeSid to the get smb connections params -func (o *GetSmbConnectionsParams) WithIncludeSid(includeSid *bool) *GetSmbConnectionsParams { - o.SetIncludeSid(includeSid) - return o -} - -// SetIncludeSid adds the includeSid to the get smb connections params -func (o *GetSmbConnectionsParams) SetIncludeSid(includeSid *bool) { - o.IncludeSid = includeSid -} - -// WithMaxCount adds the maxCount to the get smb connections params -func (o *GetSmbConnectionsParams) WithMaxCount(maxCount *int32) *GetSmbConnectionsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get smb connections params -func (o *GetSmbConnectionsParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithViewIds adds the viewIds to the get smb connections params -func (o *GetSmbConnectionsParams) WithViewIds(viewIds []int64) *GetSmbConnectionsParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get smb connections params -func (o *GetSmbConnectionsParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WithViewNames adds the viewNames to the get smb connections params -func (o *GetSmbConnectionsParams) WithViewNames(viewNames []string) *GetSmbConnectionsParams { - o.SetViewNames(viewNames) - return o -} - -// SetViewNames adds the viewNames to the get smb connections params -func (o *GetSmbConnectionsParams) SetViewNames(viewNames []string) { - o.ViewNames = viewNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSmbConnectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IncludeSid != nil { - - // query param includeSid - var qrIncludeSid bool - - if o.IncludeSid != nil { - qrIncludeSid = *o.IncludeSid - } - qIncludeSid := swag.FormatBool(qrIncludeSid) - if qIncludeSid != "" { - - if err := r.SetQueryParam("includeSid", qIncludeSid); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if o.ViewNames != nil { - - // binding items for viewNames - joinedViewNames := o.bindParamViewNames(reg) - - // query array param viewNames - if err := r.SetQueryParam("viewNames", joinedViewNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSmbConnections binds the parameter viewIds -func (o *GetSmbConnectionsParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} - -// bindParamGetSmbConnections binds the parameter viewNames -func (o *GetSmbConnectionsParams) bindParamViewNames(formats strfmt.Registry) []string { - viewNamesIR := o.ViewNames - - var viewNamesIC []string - for _, viewNamesIIR := range viewNamesIR { // explode []string - - viewNamesIIV := viewNamesIIR // string as string - viewNamesIC = append(viewNamesIC, viewNamesIIV) - } - - // items.CollectionFormat: "" - viewNamesIS := swag.JoinByFormat(viewNamesIC, "") - - return viewNamesIS -} diff --git a/v1/client/views/get_smb_connections_responses.go b/v1/client/views/get_smb_connections_responses.go deleted file mode 100644 index fc5e0c57..00000000 --- a/v1/client/views/get_smb_connections_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetSmbConnectionsReader is a Reader for the GetSmbConnections structure. -type GetSmbConnectionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSmbConnectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSmbConnectionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSmbConnectionsDefault(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 - } -} - -// NewGetSmbConnectionsOK creates a GetSmbConnectionsOK with default headers values -func NewGetSmbConnectionsOK() *GetSmbConnectionsOK { - return &GetSmbConnectionsOK{} -} - -/* -GetSmbConnectionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSmbConnectionsOK struct { - Payload []*models.SmbConnection -} - -// IsSuccess returns true when this get smb connections o k response has a 2xx status code -func (o *GetSmbConnectionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get smb connections o k response has a 3xx status code -func (o *GetSmbConnectionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get smb connections o k response has a 4xx status code -func (o *GetSmbConnectionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get smb connections o k response has a 5xx status code -func (o *GetSmbConnectionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get smb connections o k response a status code equal to that given -func (o *GetSmbConnectionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get smb connections o k response -func (o *GetSmbConnectionsOK) Code() int { - return 200 -} - -func (o *GetSmbConnectionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbConnections][%d] getSmbConnectionsOK %s", 200, payload) -} - -func (o *GetSmbConnectionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbConnections][%d] getSmbConnectionsOK %s", 200, payload) -} - -func (o *GetSmbConnectionsOK) GetPayload() []*models.SmbConnection { - return o.Payload -} - -func (o *GetSmbConnectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSmbConnectionsDefault creates a GetSmbConnectionsDefault with default headers values -func NewGetSmbConnectionsDefault(code int) *GetSmbConnectionsDefault { - return &GetSmbConnectionsDefault{ - _statusCode: code, - } -} - -/* -GetSmbConnectionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSmbConnectionsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get smb connections default response has a 2xx status code -func (o *GetSmbConnectionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get smb connections default response has a 3xx status code -func (o *GetSmbConnectionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get smb connections default response has a 4xx status code -func (o *GetSmbConnectionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get smb connections default response has a 5xx status code -func (o *GetSmbConnectionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get smb connections default response a status code equal to that given -func (o *GetSmbConnectionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get smb connections default response -func (o *GetSmbConnectionsDefault) Code() int { - return o._statusCode -} - -func (o *GetSmbConnectionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbConnections][%d] GetSmbConnections default %s", o._statusCode, payload) -} - -func (o *GetSmbConnectionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/smbConnections][%d] GetSmbConnections default %s", o._statusCode, payload) -} - -func (o *GetSmbConnectionsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetSmbConnectionsDefault) 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/views/get_view_by_id_parameters.go b/v1/client/views/get_view_by_id_parameters.go deleted file mode 100644 index a1935426..00000000 --- a/v1/client/views/get_view_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetViewByIDParams creates a new GetViewByIDParams 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 NewGetViewByIDParams() *GetViewByIDParams { - return &GetViewByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewByIDParamsWithTimeout creates a new GetViewByIDParams object -// with the ability to set a timeout on a request. -func NewGetViewByIDParamsWithTimeout(timeout time.Duration) *GetViewByIDParams { - return &GetViewByIDParams{ - timeout: timeout, - } -} - -// NewGetViewByIDParamsWithContext creates a new GetViewByIDParams object -// with the ability to set a context for a request. -func NewGetViewByIDParamsWithContext(ctx context.Context) *GetViewByIDParams { - return &GetViewByIDParams{ - Context: ctx, - } -} - -// NewGetViewByIDParamsWithHTTPClient creates a new GetViewByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewByIDParamsWithHTTPClient(client *http.Client) *GetViewByIDParams { - return &GetViewByIDParams{ - HTTPClient: client, - } -} - -/* -GetViewByIDParams contains all the parameters to send to the API endpoint - - for the get view by Id operation. - - Typically these are written to a http.Request. -*/ -type GetViewByIDParams struct { - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByIDParams) WithDefaults() *GetViewByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view by Id params -func (o *GetViewByIDParams) WithTimeout(timeout time.Duration) *GetViewByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view by Id params -func (o *GetViewByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view by Id params -func (o *GetViewByIDParams) WithContext(ctx context.Context) *GetViewByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view by Id params -func (o *GetViewByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view by Id params -func (o *GetViewByIDParams) WithHTTPClient(client *http.Client) *GetViewByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view by Id params -func (o *GetViewByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get view by Id params -func (o *GetViewByIDParams) WithID(id int64) *GetViewByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get view by Id params -func (o *GetViewByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/get_view_by_id_responses.go b/v1/client/views/get_view_by_id_responses.go deleted file mode 100644 index 9bc6c49f..00000000 --- a/v1/client/views/get_view_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewByIDReader is a Reader for the GetViewByID structure. -type GetViewByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewByIDDefault(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 - } -} - -// NewGetViewByIDOK creates a GetViewByIDOK with default headers values -func NewGetViewByIDOK() *GetViewByIDOK { - return &GetViewByIDOK{} -} - -/* -GetViewByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewByIDOK struct { - Payload *models.View -} - -// IsSuccess returns true when this get view by Id o k response has a 2xx status code -func (o *GetViewByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view by Id o k response has a 3xx status code -func (o *GetViewByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view by Id o k response has a 4xx status code -func (o *GetViewByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view by Id o k response has a 5xx status code -func (o *GetViewByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view by Id o k response a status code equal to that given -func (o *GetViewByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view by Id o k response -func (o *GetViewByIDOK) Code() int { - return 200 -} - -func (o *GetViewByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}][%d] getViewByIdOK %s", 200, payload) -} - -func (o *GetViewByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}][%d] getViewByIdOK %s", 200, payload) -} - -func (o *GetViewByIDOK) GetPayload() *models.View { - return o.Payload -} - -func (o *GetViewByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewByIDDefault creates a GetViewByIDDefault with default headers values -func NewGetViewByIDDefault(code int) *GetViewByIDDefault { - return &GetViewByIDDefault{ - _statusCode: code, - } -} - -/* -GetViewByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view by Id default response has a 2xx status code -func (o *GetViewByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view by Id default response has a 3xx status code -func (o *GetViewByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view by Id default response has a 4xx status code -func (o *GetViewByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view by Id default response has a 5xx status code -func (o *GetViewByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view by Id default response a status code equal to that given -func (o *GetViewByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view by Id default response -func (o *GetViewByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetViewByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}][%d] GetViewById default %s", o._statusCode, payload) -} - -func (o *GetViewByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/id/{id}][%d] GetViewById default %s", o._statusCode, payload) -} - -func (o *GetViewByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewByIDDefault) 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/views/get_view_by_name_parameters.go b/v1/client/views/get_view_by_name_parameters.go deleted file mode 100644 index 8379ec5f..00000000 --- a/v1/client/views/get_view_by_name_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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" -) - -// NewGetViewByNameParams creates a new GetViewByNameParams 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 NewGetViewByNameParams() *GetViewByNameParams { - return &GetViewByNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewByNameParamsWithTimeout creates a new GetViewByNameParams object -// with the ability to set a timeout on a request. -func NewGetViewByNameParamsWithTimeout(timeout time.Duration) *GetViewByNameParams { - return &GetViewByNameParams{ - timeout: timeout, - } -} - -// NewGetViewByNameParamsWithContext creates a new GetViewByNameParams object -// with the ability to set a context for a request. -func NewGetViewByNameParamsWithContext(ctx context.Context) *GetViewByNameParams { - return &GetViewByNameParams{ - Context: ctx, - } -} - -// NewGetViewByNameParamsWithHTTPClient creates a new GetViewByNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewByNameParamsWithHTTPClient(client *http.Client) *GetViewByNameParams { - return &GetViewByNameParams{ - HTTPClient: client, - } -} - -/* -GetViewByNameParams contains all the parameters to send to the API endpoint - - for the get view by name operation. - - Typically these are written to a http.Request. -*/ -type GetViewByNameParams struct { - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByNameParams) WithDefaults() *GetViewByNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view by name params -func (o *GetViewByNameParams) WithTimeout(timeout time.Duration) *GetViewByNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view by name params -func (o *GetViewByNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view by name params -func (o *GetViewByNameParams) WithContext(ctx context.Context) *GetViewByNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view by name params -func (o *GetViewByNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view by name params -func (o *GetViewByNameParams) WithHTTPClient(client *http.Client) *GetViewByNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view by name params -func (o *GetViewByNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the get view by name params -func (o *GetViewByNameParams) WithName(name string) *GetViewByNameParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get view by name params -func (o *GetViewByNameParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewByNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/get_view_by_name_responses.go b/v1/client/views/get_view_by_name_responses.go deleted file mode 100644 index cbee1405..00000000 --- a/v1/client/views/get_view_by_name_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewByNameReader is a Reader for the GetViewByName structure. -type GetViewByNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewByNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewByNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewByNameDefault(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 - } -} - -// NewGetViewByNameOK creates a GetViewByNameOK with default headers values -func NewGetViewByNameOK() *GetViewByNameOK { - return &GetViewByNameOK{} -} - -/* -GetViewByNameOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewByNameOK struct { - Payload *models.View -} - -// IsSuccess returns true when this get view by name o k response has a 2xx status code -func (o *GetViewByNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view by name o k response has a 3xx status code -func (o *GetViewByNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view by name o k response has a 4xx status code -func (o *GetViewByNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view by name o k response has a 5xx status code -func (o *GetViewByNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view by name o k response a status code equal to that given -func (o *GetViewByNameOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view by name o k response -func (o *GetViewByNameOK) Code() int { - return 200 -} - -func (o *GetViewByNameOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}][%d] getViewByNameOK %s", 200, payload) -} - -func (o *GetViewByNameOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}][%d] getViewByNameOK %s", 200, payload) -} - -func (o *GetViewByNameOK) GetPayload() *models.View { - return o.Payload -} - -func (o *GetViewByNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewByNameDefault creates a GetViewByNameDefault with default headers values -func NewGetViewByNameDefault(code int) *GetViewByNameDefault { - return &GetViewByNameDefault{ - _statusCode: code, - } -} - -/* -GetViewByNameDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewByNameDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view by name default response has a 2xx status code -func (o *GetViewByNameDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view by name default response has a 3xx status code -func (o *GetViewByNameDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view by name default response has a 4xx status code -func (o *GetViewByNameDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view by name default response has a 5xx status code -func (o *GetViewByNameDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view by name default response a status code equal to that given -func (o *GetViewByNameDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view by name default response -func (o *GetViewByNameDefault) Code() int { - return o._statusCode -} - -func (o *GetViewByNameDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}][%d] GetViewByName default %s", o._statusCode, payload) -} - -func (o *GetViewByNameDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views/{name}][%d] GetViewByName default %s", o._statusCode, payload) -} - -func (o *GetViewByNameDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewByNameDefault) 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/views/get_view_dir_quota_info_parameters.go b/v1/client/views/get_view_dir_quota_info_parameters.go deleted file mode 100644 index 51f0844c..00000000 --- a/v1/client/views/get_view_dir_quota_info_parameters.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetViewDirQuotaInfoParams creates a new GetViewDirQuotaInfoParams 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 NewGetViewDirQuotaInfoParams() *GetViewDirQuotaInfoParams { - return &GetViewDirQuotaInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewDirQuotaInfoParamsWithTimeout creates a new GetViewDirQuotaInfoParams object -// with the ability to set a timeout on a request. -func NewGetViewDirQuotaInfoParamsWithTimeout(timeout time.Duration) *GetViewDirQuotaInfoParams { - return &GetViewDirQuotaInfoParams{ - timeout: timeout, - } -} - -// NewGetViewDirQuotaInfoParamsWithContext creates a new GetViewDirQuotaInfoParams object -// with the ability to set a context for a request. -func NewGetViewDirQuotaInfoParamsWithContext(ctx context.Context) *GetViewDirQuotaInfoParams { - return &GetViewDirQuotaInfoParams{ - Context: ctx, - } -} - -// NewGetViewDirQuotaInfoParamsWithHTTPClient creates a new GetViewDirQuotaInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewDirQuotaInfoParamsWithHTTPClient(client *http.Client) *GetViewDirQuotaInfoParams { - return &GetViewDirQuotaInfoParams{ - HTTPClient: client, - } -} - -/* -GetViewDirQuotaInfoParams contains all the parameters to send to the API endpoint - - for the get view dir quota info operation. - - Typically these are written to a http.Request. -*/ -type GetViewDirQuotaInfoParams struct { - - /* Cookie. - - Cookie should be used from previous call to list user quota overrides. It - resumes (or gives the next set of values) from the result of the previous - call. - - Format: int64 - */ - Cookie *int64 - - /* OutputFormat. - - Specifies the format for the output such as 'csv' or 'json'. - If not specified, the json format is returned. - If 'csv' is specified, a comma-separated list with a heading - row is returned. - */ - OutputFormat *string - - /* PageCount. - - Specifies the max entries that should be returned in the result. - - Format: int64 - */ - PageCount *int64 - - /* ViewName. - - The name of the view. - */ - ViewName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view dir quota info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewDirQuotaInfoParams) WithDefaults() *GetViewDirQuotaInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view dir quota info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewDirQuotaInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithTimeout(timeout time.Duration) *GetViewDirQuotaInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithContext(ctx context.Context) *GetViewDirQuotaInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithHTTPClient(client *http.Client) *GetViewDirQuotaInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithCookie(cookie *int64) *GetViewDirQuotaInfoParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetCookie(cookie *int64) { - o.Cookie = cookie -} - -// WithOutputFormat adds the outputFormat to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithOutputFormat(outputFormat *string) *GetViewDirQuotaInfoParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithPageCount adds the pageCount to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithPageCount(pageCount *int64) *GetViewDirQuotaInfoParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithViewName adds the viewName to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) WithViewName(viewName string) *GetViewDirQuotaInfoParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get view dir quota info params -func (o *GetViewDirQuotaInfoParams) SetViewName(viewName string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewDirQuotaInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie int64 - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := swag.FormatInt64(qrCookie) - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - // query param viewName - qrViewName := o.ViewName - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/get_view_dir_quota_info_responses.go b/v1/client/views/get_view_dir_quota_info_responses.go deleted file mode 100644 index dd0ad619..00000000 --- a/v1/client/views/get_view_dir_quota_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewDirQuotaInfoReader is a Reader for the GetViewDirQuotaInfo structure. -type GetViewDirQuotaInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewDirQuotaInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewDirQuotaInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewDirQuotaInfoDefault(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 - } -} - -// NewGetViewDirQuotaInfoOK creates a GetViewDirQuotaInfoOK with default headers values -func NewGetViewDirQuotaInfoOK() *GetViewDirQuotaInfoOK { - return &GetViewDirQuotaInfoOK{} -} - -/* -GetViewDirQuotaInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewDirQuotaInfoOK struct { - Payload *models.DirQuotaInfo -} - -// IsSuccess returns true when this get view dir quota info o k response has a 2xx status code -func (o *GetViewDirQuotaInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view dir quota info o k response has a 3xx status code -func (o *GetViewDirQuotaInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view dir quota info o k response has a 4xx status code -func (o *GetViewDirQuotaInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view dir quota info o k response has a 5xx status code -func (o *GetViewDirQuotaInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view dir quota info o k response a status code equal to that given -func (o *GetViewDirQuotaInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view dir quota info o k response -func (o *GetViewDirQuotaInfoOK) Code() int { - return 200 -} - -func (o *GetViewDirQuotaInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewDirectoryQuotas][%d] getViewDirQuotaInfoOK %s", 200, payload) -} - -func (o *GetViewDirQuotaInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewDirectoryQuotas][%d] getViewDirQuotaInfoOK %s", 200, payload) -} - -func (o *GetViewDirQuotaInfoOK) GetPayload() *models.DirQuotaInfo { - return o.Payload -} - -func (o *GetViewDirQuotaInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DirQuotaInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewDirQuotaInfoDefault creates a GetViewDirQuotaInfoDefault with default headers values -func NewGetViewDirQuotaInfoDefault(code int) *GetViewDirQuotaInfoDefault { - return &GetViewDirQuotaInfoDefault{ - _statusCode: code, - } -} - -/* -GetViewDirQuotaInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewDirQuotaInfoDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view dir quota info default response has a 2xx status code -func (o *GetViewDirQuotaInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view dir quota info default response has a 3xx status code -func (o *GetViewDirQuotaInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view dir quota info default response has a 4xx status code -func (o *GetViewDirQuotaInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view dir quota info default response has a 5xx status code -func (o *GetViewDirQuotaInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view dir quota info default response a status code equal to that given -func (o *GetViewDirQuotaInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view dir quota info default response -func (o *GetViewDirQuotaInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetViewDirQuotaInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewDirectoryQuotas][%d] GetViewDirQuotaInfo default %s", o._statusCode, payload) -} - -func (o *GetViewDirQuotaInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewDirectoryQuotas][%d] GetViewDirQuotaInfo default %s", o._statusCode, payload) -} - -func (o *GetViewDirQuotaInfoDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewDirQuotaInfoDefault) 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/views/get_view_user_quotas_parameters.go b/v1/client/views/get_view_user_quotas_parameters.go deleted file mode 100644 index 6e7470d5..00000000 --- a/v1/client/views/get_view_user_quotas_parameters.go +++ /dev/null @@ -1,720 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetViewUserQuotasParams creates a new GetViewUserQuotasParams 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 NewGetViewUserQuotasParams() *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewUserQuotasParamsWithTimeout creates a new GetViewUserQuotasParams object -// with the ability to set a timeout on a request. -func NewGetViewUserQuotasParamsWithTimeout(timeout time.Duration) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - timeout: timeout, - } -} - -// NewGetViewUserQuotasParamsWithContext creates a new GetViewUserQuotasParams object -// with the ability to set a context for a request. -func NewGetViewUserQuotasParamsWithContext(ctx context.Context) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - Context: ctx, - } -} - -// NewGetViewUserQuotasParamsWithHTTPClient creates a new GetViewUserQuotasParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewUserQuotasParamsWithHTTPClient(client *http.Client) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - HTTPClient: client, - } -} - -/* -GetViewUserQuotasParams contains all the parameters to send to the API endpoint - - for the get view user quotas operation. - - Typically these are written to a http.Request. -*/ -type GetViewUserQuotasParams struct { - - /* Cookie. - - Cookie should be used from previous call to list user quota overrides. It - resumes (or gives the next set of values) from the result of the previous - call. - */ - Cookie *string - - /* ExcludeUsersWithinAlertThreshold. - - This field can be set only when includeUsage is set to true. - By default, all the users with logical usage > 0 will be returned in the - result. If this field is set to true, only the list of users who has - exceeded the alert threshold will be returned. - */ - ExcludeUsersWithinAlertThreshold *bool - - /* IncludeUsage. - - If set to true, the logical usage info is included only for users with - quota overrides. By default, it is set to false. - */ - IncludeUsage *bool - - /* IncludeUserWithQuotaOnly. - - If set to true, the result will only contain user with user quota enabled. - By default, this field is set to false, and it's only in effect when - 'SummaryOnly' is set to false and 'ViewName' is specified. - */ - IncludeUserWithQuotaOnly *bool - - /* MaxViewID. - - Related to fetching a particular user's quota and usage in all his views. - It only pertains to the scenario where either UnixUid or Sid is specified, - and ViewName is nil. Specify the maxViewId for All the views returned - would have view_id's less than or equal to the given MaxViewId if it is - >= 0. - - Format: int64 - */ - MaxViewID *int64 - - /* OutputFormat. - - OutputFormat is the Output format for the output. If it is not specified, - default is json. - */ - OutputFormat *string - - /* PageCount. - - Specifies the max entries that should be returned in the result. - - Format: int64 - */ - PageCount *int64 - - /* Sid. - - If interested in a user via smb_client, include SID. - Otherwise, If a valid unix-id to SID mappings are available (i.e., when - mixed mode is enabled) the server will perform the necessary id mapping - and return the correct usage irrespective of whether the unix id / SID is - provided. - The string is of following format - - S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-...-SubAuthorityn. - */ - Sid *string - - /* SummaryOnly. - - Specifies a flag to just return a summary. If set to true, and if ViewName - is not nil, it returns the summary of users for a view. Otherwise if - UserId not nil, and ViewName is nil then it fetches the summary for a - user in his views. By default, it is set to false. - */ - SummaryOnly *bool - - /* TopQuotas. - - TopQuotas is the quotas sorted by quota usage in descending order. - This parameter defines number of results returned. No pagination cookie is - returned if this is set to true. - - Format: int64 - */ - TopQuotas *int64 - - /* UnixUID. - - If interested in a user via unix-identifier, include UnixUid. - Otherwise, If a valid unix-id to SID mappings are available (i.e., when - mixed mode is enabled) the server will perform the necessary id mapping - and return the correct usage irrespective of whether the unix id / SID is - provided. - - Format: uint32 - */ - UnixUID *uint32 - - /* UserSidsForView. - - While making a query for a view, this specifies a list of specific users - with their Sid for the result. - */ - UserSidsForView []string - - /* UserUnixIdsForView. - - While making a query for a view, this specifies a list of specific users - with their unix uid for the result. - */ - UserUnixIdsForView []uint32 - - /* ViewName. - - Specifies the name of the input view. If given, there could be three - scenarios with the viewName input parameter: - It gives the user quota overrides for this view, and the user quota - settings. Returns 'usersQuotaAndUsage'. - If given along with the user id, it returns the quota policy for this - user on this view. Returns 'usersQuotaAndUsage'. - If given along with SummaryOnly as true, a user quota summary for - this view would be returned. Returns 'summaryForView'. - If not given, then the user id is checked. - */ - ViewName *string - - /* ViewNamesForUser. - - While making a query for a user, this specifies a list of specific views - for the result. - */ - ViewNamesForUser []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view user quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewUserQuotasParams) WithDefaults() *GetViewUserQuotasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view user quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewUserQuotasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view user quotas params -func (o *GetViewUserQuotasParams) WithTimeout(timeout time.Duration) *GetViewUserQuotasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view user quotas params -func (o *GetViewUserQuotasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view user quotas params -func (o *GetViewUserQuotasParams) WithContext(ctx context.Context) *GetViewUserQuotasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view user quotas params -func (o *GetViewUserQuotasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view user quotas params -func (o *GetViewUserQuotasParams) WithHTTPClient(client *http.Client) *GetViewUserQuotasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view user quotas params -func (o *GetViewUserQuotasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get view user quotas params -func (o *GetViewUserQuotasParams) WithCookie(cookie *string) *GetViewUserQuotasParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get view user quotas params -func (o *GetViewUserQuotasParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithExcludeUsersWithinAlertThreshold adds the excludeUsersWithinAlertThreshold to the get view user quotas params -func (o *GetViewUserQuotasParams) WithExcludeUsersWithinAlertThreshold(excludeUsersWithinAlertThreshold *bool) *GetViewUserQuotasParams { - o.SetExcludeUsersWithinAlertThreshold(excludeUsersWithinAlertThreshold) - return o -} - -// SetExcludeUsersWithinAlertThreshold adds the excludeUsersWithinAlertThreshold to the get view user quotas params -func (o *GetViewUserQuotasParams) SetExcludeUsersWithinAlertThreshold(excludeUsersWithinAlertThreshold *bool) { - o.ExcludeUsersWithinAlertThreshold = excludeUsersWithinAlertThreshold -} - -// WithIncludeUsage adds the includeUsage to the get view user quotas params -func (o *GetViewUserQuotasParams) WithIncludeUsage(includeUsage *bool) *GetViewUserQuotasParams { - o.SetIncludeUsage(includeUsage) - return o -} - -// SetIncludeUsage adds the includeUsage to the get view user quotas params -func (o *GetViewUserQuotasParams) SetIncludeUsage(includeUsage *bool) { - o.IncludeUsage = includeUsage -} - -// WithIncludeUserWithQuotaOnly adds the includeUserWithQuotaOnly to the get view user quotas params -func (o *GetViewUserQuotasParams) WithIncludeUserWithQuotaOnly(includeUserWithQuotaOnly *bool) *GetViewUserQuotasParams { - o.SetIncludeUserWithQuotaOnly(includeUserWithQuotaOnly) - return o -} - -// SetIncludeUserWithQuotaOnly adds the includeUserWithQuotaOnly to the get view user quotas params -func (o *GetViewUserQuotasParams) SetIncludeUserWithQuotaOnly(includeUserWithQuotaOnly *bool) { - o.IncludeUserWithQuotaOnly = includeUserWithQuotaOnly -} - -// WithMaxViewID adds the maxViewID to the get view user quotas params -func (o *GetViewUserQuotasParams) WithMaxViewID(maxViewID *int64) *GetViewUserQuotasParams { - o.SetMaxViewID(maxViewID) - return o -} - -// SetMaxViewID adds the maxViewId to the get view user quotas params -func (o *GetViewUserQuotasParams) SetMaxViewID(maxViewID *int64) { - o.MaxViewID = maxViewID -} - -// WithOutputFormat adds the outputFormat to the get view user quotas params -func (o *GetViewUserQuotasParams) WithOutputFormat(outputFormat *string) *GetViewUserQuotasParams { - o.SetOutputFormat(outputFormat) - return o -} - -// SetOutputFormat adds the outputFormat to the get view user quotas params -func (o *GetViewUserQuotasParams) SetOutputFormat(outputFormat *string) { - o.OutputFormat = outputFormat -} - -// WithPageCount adds the pageCount to the get view user quotas params -func (o *GetViewUserQuotasParams) WithPageCount(pageCount *int64) *GetViewUserQuotasParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the get view user quotas params -func (o *GetViewUserQuotasParams) SetPageCount(pageCount *int64) { - o.PageCount = pageCount -} - -// WithSid adds the sid to the get view user quotas params -func (o *GetViewUserQuotasParams) WithSid(sid *string) *GetViewUserQuotasParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get view user quotas params -func (o *GetViewUserQuotasParams) SetSid(sid *string) { - o.Sid = sid -} - -// WithSummaryOnly adds the summaryOnly to the get view user quotas params -func (o *GetViewUserQuotasParams) WithSummaryOnly(summaryOnly *bool) *GetViewUserQuotasParams { - o.SetSummaryOnly(summaryOnly) - return o -} - -// SetSummaryOnly adds the summaryOnly to the get view user quotas params -func (o *GetViewUserQuotasParams) SetSummaryOnly(summaryOnly *bool) { - o.SummaryOnly = summaryOnly -} - -// WithTopQuotas adds the topQuotas to the get view user quotas params -func (o *GetViewUserQuotasParams) WithTopQuotas(topQuotas *int64) *GetViewUserQuotasParams { - o.SetTopQuotas(topQuotas) - return o -} - -// SetTopQuotas adds the topQuotas to the get view user quotas params -func (o *GetViewUserQuotasParams) SetTopQuotas(topQuotas *int64) { - o.TopQuotas = topQuotas -} - -// WithUnixUID adds the unixUID to the get view user quotas params -func (o *GetViewUserQuotasParams) WithUnixUID(unixUID *uint32) *GetViewUserQuotasParams { - o.SetUnixUID(unixUID) - return o -} - -// SetUnixUID adds the unixUid to the get view user quotas params -func (o *GetViewUserQuotasParams) SetUnixUID(unixUID *uint32) { - o.UnixUID = unixUID -} - -// WithUserSidsForView adds the userSidsForView to the get view user quotas params -func (o *GetViewUserQuotasParams) WithUserSidsForView(userSidsForView []string) *GetViewUserQuotasParams { - o.SetUserSidsForView(userSidsForView) - return o -} - -// SetUserSidsForView adds the userSidsForView to the get view user quotas params -func (o *GetViewUserQuotasParams) SetUserSidsForView(userSidsForView []string) { - o.UserSidsForView = userSidsForView -} - -// WithUserUnixIdsForView adds the userUnixIdsForView to the get view user quotas params -func (o *GetViewUserQuotasParams) WithUserUnixIdsForView(userUnixIdsForView []uint32) *GetViewUserQuotasParams { - o.SetUserUnixIdsForView(userUnixIdsForView) - return o -} - -// SetUserUnixIdsForView adds the userUnixIdsForView to the get view user quotas params -func (o *GetViewUserQuotasParams) SetUserUnixIdsForView(userUnixIdsForView []uint32) { - o.UserUnixIdsForView = userUnixIdsForView -} - -// WithViewName adds the viewName to the get view user quotas params -func (o *GetViewUserQuotasParams) WithViewName(viewName *string) *GetViewUserQuotasParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get view user quotas params -func (o *GetViewUserQuotasParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WithViewNamesForUser adds the viewNamesForUser to the get view user quotas params -func (o *GetViewUserQuotasParams) WithViewNamesForUser(viewNamesForUser []string) *GetViewUserQuotasParams { - o.SetViewNamesForUser(viewNamesForUser) - return o -} - -// SetViewNamesForUser adds the viewNamesForUser to the get view user quotas params -func (o *GetViewUserQuotasParams) SetViewNamesForUser(viewNamesForUser []string) { - o.ViewNamesForUser = viewNamesForUser -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewUserQuotasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.ExcludeUsersWithinAlertThreshold != nil { - - // query param excludeUsersWithinAlertThreshold - var qrExcludeUsersWithinAlertThreshold bool - - if o.ExcludeUsersWithinAlertThreshold != nil { - qrExcludeUsersWithinAlertThreshold = *o.ExcludeUsersWithinAlertThreshold - } - qExcludeUsersWithinAlertThreshold := swag.FormatBool(qrExcludeUsersWithinAlertThreshold) - if qExcludeUsersWithinAlertThreshold != "" { - - if err := r.SetQueryParam("excludeUsersWithinAlertThreshold", qExcludeUsersWithinAlertThreshold); err != nil { - return err - } - } - } - - if o.IncludeUsage != nil { - - // query param includeUsage - var qrIncludeUsage bool - - if o.IncludeUsage != nil { - qrIncludeUsage = *o.IncludeUsage - } - qIncludeUsage := swag.FormatBool(qrIncludeUsage) - if qIncludeUsage != "" { - - if err := r.SetQueryParam("includeUsage", qIncludeUsage); err != nil { - return err - } - } - } - - if o.IncludeUserWithQuotaOnly != nil { - - // query param includeUserWithQuotaOnly - var qrIncludeUserWithQuotaOnly bool - - if o.IncludeUserWithQuotaOnly != nil { - qrIncludeUserWithQuotaOnly = *o.IncludeUserWithQuotaOnly - } - qIncludeUserWithQuotaOnly := swag.FormatBool(qrIncludeUserWithQuotaOnly) - if qIncludeUserWithQuotaOnly != "" { - - if err := r.SetQueryParam("includeUserWithQuotaOnly", qIncludeUserWithQuotaOnly); err != nil { - return err - } - } - } - - if o.MaxViewID != nil { - - // query param maxViewId - var qrMaxViewID int64 - - if o.MaxViewID != nil { - qrMaxViewID = *o.MaxViewID - } - qMaxViewID := swag.FormatInt64(qrMaxViewID) - if qMaxViewID != "" { - - if err := r.SetQueryParam("maxViewId", qMaxViewID); err != nil { - return err - } - } - } - - if o.OutputFormat != nil { - - // query param outputFormat - var qrOutputFormat string - - if o.OutputFormat != nil { - qrOutputFormat = *o.OutputFormat - } - qOutputFormat := qrOutputFormat - if qOutputFormat != "" { - - if err := r.SetQueryParam("outputFormat", qOutputFormat); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int64 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt64(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.Sid != nil { - - // query param sid - var qrSid string - - if o.Sid != nil { - qrSid = *o.Sid - } - qSid := qrSid - if qSid != "" { - - if err := r.SetQueryParam("sid", qSid); err != nil { - return err - } - } - } - - if o.SummaryOnly != nil { - - // query param summaryOnly - var qrSummaryOnly bool - - if o.SummaryOnly != nil { - qrSummaryOnly = *o.SummaryOnly - } - qSummaryOnly := swag.FormatBool(qrSummaryOnly) - if qSummaryOnly != "" { - - if err := r.SetQueryParam("summaryOnly", qSummaryOnly); err != nil { - return err - } - } - } - - if o.TopQuotas != nil { - - // query param topQuotas - var qrTopQuotas int64 - - if o.TopQuotas != nil { - qrTopQuotas = *o.TopQuotas - } - qTopQuotas := swag.FormatInt64(qrTopQuotas) - if qTopQuotas != "" { - - if err := r.SetQueryParam("topQuotas", qTopQuotas); err != nil { - return err - } - } - } - - if o.UnixUID != nil { - - // query param unixUid - var qrUnixUID uint32 - - if o.UnixUID != nil { - qrUnixUID = *o.UnixUID - } - qUnixUID := swag.FormatUint32(qrUnixUID) - if qUnixUID != "" { - - if err := r.SetQueryParam("unixUid", qUnixUID); err != nil { - return err - } - } - } - - if o.UserSidsForView != nil { - - // binding items for userSidsForView - joinedUserSidsForView := o.bindParamUserSidsForView(reg) - - // query array param userSidsForView - if err := r.SetQueryParam("userSidsForView", joinedUserSidsForView...); err != nil { - return err - } - } - - if o.UserUnixIdsForView != nil { - - // binding items for userUnixIdsForView - joinedUserUnixIdsForView := o.bindParamUserUnixIdsForView(reg) - - // query array param userUnixIdsForView - if err := r.SetQueryParam("userUnixIdsForView", joinedUserUnixIdsForView...); err != nil { - return err - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if o.ViewNamesForUser != nil { - - // binding items for viewNamesForUser - joinedViewNamesForUser := o.bindParamViewNamesForUser(reg) - - // query array param viewNamesForUser - if err := r.SetQueryParam("viewNamesForUser", joinedViewNamesForUser...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewUserQuotas binds the parameter userSidsForView -func (o *GetViewUserQuotasParams) bindParamUserSidsForView(formats strfmt.Registry) []string { - userSidsForViewIR := o.UserSidsForView - - var userSidsForViewIC []string - for _, userSidsForViewIIR := range userSidsForViewIR { // explode []string - - userSidsForViewIIV := userSidsForViewIIR // string as string - userSidsForViewIC = append(userSidsForViewIC, userSidsForViewIIV) - } - - // items.CollectionFormat: "" - userSidsForViewIS := swag.JoinByFormat(userSidsForViewIC, "") - - return userSidsForViewIS -} - -// bindParamGetViewUserQuotas binds the parameter userUnixIdsForView -func (o *GetViewUserQuotasParams) bindParamUserUnixIdsForView(formats strfmt.Registry) []string { - userUnixIdsForViewIR := o.UserUnixIdsForView - - var userUnixIdsForViewIC []string - for _, userUnixIdsForViewIIR := range userUnixIdsForViewIR { // explode []uint32 - - userUnixIdsForViewIIV := swag.FormatUint32(userUnixIdsForViewIIR) // uint32 as string - userUnixIdsForViewIC = append(userUnixIdsForViewIC, userUnixIdsForViewIIV) - } - - // items.CollectionFormat: "" - userUnixIdsForViewIS := swag.JoinByFormat(userUnixIdsForViewIC, "") - - return userUnixIdsForViewIS -} - -// bindParamGetViewUserQuotas binds the parameter viewNamesForUser -func (o *GetViewUserQuotasParams) bindParamViewNamesForUser(formats strfmt.Registry) []string { - viewNamesForUserIR := o.ViewNamesForUser - - var viewNamesForUserIC []string - for _, viewNamesForUserIIR := range viewNamesForUserIR { // explode []string - - viewNamesForUserIIV := viewNamesForUserIIR // string as string - viewNamesForUserIC = append(viewNamesForUserIC, viewNamesForUserIIV) - } - - // items.CollectionFormat: "" - viewNamesForUserIS := swag.JoinByFormat(viewNamesForUserIC, "") - - return viewNamesForUserIS -} diff --git a/v1/client/views/get_view_user_quotas_responses.go b/v1/client/views/get_view_user_quotas_responses.go deleted file mode 100644 index 8a05ba90..00000000 --- a/v1/client/views/get_view_user_quotas_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewUserQuotasReader is a Reader for the GetViewUserQuotas structure. -type GetViewUserQuotasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewUserQuotasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewUserQuotasOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewUserQuotasDefault(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 - } -} - -// NewGetViewUserQuotasOK creates a GetViewUserQuotasOK with default headers values -func NewGetViewUserQuotasOK() *GetViewUserQuotasOK { - return &GetViewUserQuotasOK{} -} - -/* -GetViewUserQuotasOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewUserQuotasOK struct { - Payload *models.ViewUserQuotas -} - -// IsSuccess returns true when this get view user quotas o k response has a 2xx status code -func (o *GetViewUserQuotasOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view user quotas o k response has a 3xx status code -func (o *GetViewUserQuotasOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view user quotas o k response has a 4xx status code -func (o *GetViewUserQuotasOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view user quotas o k response has a 5xx status code -func (o *GetViewUserQuotasOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view user quotas o k response a status code equal to that given -func (o *GetViewUserQuotasOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view user quotas o k response -func (o *GetViewUserQuotasOK) Code() int { - return 200 -} - -func (o *GetViewUserQuotasOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewUserQuotas][%d] getViewUserQuotasOK %s", 200, payload) -} - -func (o *GetViewUserQuotasOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewUserQuotas][%d] getViewUserQuotasOK %s", 200, payload) -} - -func (o *GetViewUserQuotasOK) GetPayload() *models.ViewUserQuotas { - return o.Payload -} - -func (o *GetViewUserQuotasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewUserQuotas) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewUserQuotasDefault creates a GetViewUserQuotasDefault with default headers values -func NewGetViewUserQuotasDefault(code int) *GetViewUserQuotasDefault { - return &GetViewUserQuotasDefault{ - _statusCode: code, - } -} - -/* -GetViewUserQuotasDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewUserQuotasDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get view user quotas default response has a 2xx status code -func (o *GetViewUserQuotasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view user quotas default response has a 3xx status code -func (o *GetViewUserQuotasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view user quotas default response has a 4xx status code -func (o *GetViewUserQuotasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view user quotas default response has a 5xx status code -func (o *GetViewUserQuotasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view user quotas default response a status code equal to that given -func (o *GetViewUserQuotasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view user quotas default response -func (o *GetViewUserQuotasDefault) Code() int { - return o._statusCode -} - -func (o *GetViewUserQuotasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewUserQuotas][%d] GetViewUserQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewUserQuotasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/viewUserQuotas][%d] GetViewUserQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewUserQuotasDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewUserQuotasDefault) 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/views/get_views_by_share_name_parameters.go b/v1/client/views/get_views_by_share_name_parameters.go deleted file mode 100644 index b6652fea..00000000 --- a/v1/client/views/get_views_by_share_name_parameters.go +++ /dev/null @@ -1,353 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetViewsByShareNameParams creates a new GetViewsByShareNameParams 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 NewGetViewsByShareNameParams() *GetViewsByShareNameParams { - return &GetViewsByShareNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewsByShareNameParamsWithTimeout creates a new GetViewsByShareNameParams object -// with the ability to set a timeout on a request. -func NewGetViewsByShareNameParamsWithTimeout(timeout time.Duration) *GetViewsByShareNameParams { - return &GetViewsByShareNameParams{ - timeout: timeout, - } -} - -// NewGetViewsByShareNameParamsWithContext creates a new GetViewsByShareNameParams object -// with the ability to set a context for a request. -func NewGetViewsByShareNameParamsWithContext(ctx context.Context) *GetViewsByShareNameParams { - return &GetViewsByShareNameParams{ - Context: ctx, - } -} - -// NewGetViewsByShareNameParamsWithHTTPClient creates a new GetViewsByShareNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewsByShareNameParamsWithHTTPClient(client *http.Client) *GetViewsByShareNameParams { - return &GetViewsByShareNameParams{ - HTTPClient: client, - } -} - -/* -GetViewsByShareNameParams contains all the parameters to send to the API endpoint - - for the get views by share name operation. - - Typically these are written to a http.Request. -*/ -type GetViewsByShareNameParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* MatchPartialNames. - - If true, the names in viewNames are matched by prefix rather than - exactly matched. - */ - MatchPartialNames *bool - - /* MaxCount. - - Specifies a limit on the number of Views returned. - - Format: int32 - */ - MaxCount *int32 - - /* PaginationCookie. - - Expected to be empty in the first call to GetViewsByShareName. - To get the next set of results, set this value to the pagination cookie - value returned in the response of the previous call. - */ - PaginationCookie *string - - /* ShareName. - - The share name(substring) that needs to be searched against existing views - and aliases. - */ - ShareName *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get views by share name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsByShareNameParams) WithDefaults() *GetViewsByShareNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get views by share name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsByShareNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get views by share name params -func (o *GetViewsByShareNameParams) WithTimeout(timeout time.Duration) *GetViewsByShareNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get views by share name params -func (o *GetViewsByShareNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get views by share name params -func (o *GetViewsByShareNameParams) WithContext(ctx context.Context) *GetViewsByShareNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get views by share name params -func (o *GetViewsByShareNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get views by share name params -func (o *GetViewsByShareNameParams) WithHTTPClient(client *http.Client) *GetViewsByShareNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get views by share name params -func (o *GetViewsByShareNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get views by share name params -func (o *GetViewsByShareNameParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetViewsByShareNameParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get views by share name params -func (o *GetViewsByShareNameParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithMatchPartialNames adds the matchPartialNames to the get views by share name params -func (o *GetViewsByShareNameParams) WithMatchPartialNames(matchPartialNames *bool) *GetViewsByShareNameParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get views by share name params -func (o *GetViewsByShareNameParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithMaxCount adds the maxCount to the get views by share name params -func (o *GetViewsByShareNameParams) WithMaxCount(maxCount *int32) *GetViewsByShareNameParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get views by share name params -func (o *GetViewsByShareNameParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithPaginationCookie adds the paginationCookie to the get views by share name params -func (o *GetViewsByShareNameParams) WithPaginationCookie(paginationCookie *string) *GetViewsByShareNameParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get views by share name params -func (o *GetViewsByShareNameParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithShareName adds the shareName to the get views by share name params -func (o *GetViewsByShareNameParams) WithShareName(shareName *string) *GetViewsByShareNameParams { - o.SetShareName(shareName) - return o -} - -// SetShareName adds the shareName to the get views by share name params -func (o *GetViewsByShareNameParams) SetShareName(shareName *string) { - o.ShareName = shareName -} - -// WithTenantIds adds the tenantIds to the get views by share name params -func (o *GetViewsByShareNameParams) WithTenantIds(tenantIds []string) *GetViewsByShareNameParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get views by share name params -func (o *GetViewsByShareNameParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewsByShareNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - 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.ShareName != nil { - - // query param shareName - var qrShareName string - - if o.ShareName != nil { - qrShareName = *o.ShareName - } - qShareName := qrShareName - if qShareName != "" { - - if err := r.SetQueryParam("shareName", qShareName); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewsByShareName binds the parameter tenantIds -func (o *GetViewsByShareNameParams) 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/v1/client/views/get_views_by_share_name_responses.go b/v1/client/views/get_views_by_share_name_responses.go deleted file mode 100644 index 26f0b8e7..00000000 --- a/v1/client/views/get_views_by_share_name_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewsByShareNameReader is a Reader for the GetViewsByShareName structure. -type GetViewsByShareNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewsByShareNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewsByShareNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewsByShareNameDefault(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 - } -} - -// NewGetViewsByShareNameOK creates a GetViewsByShareNameOK with default headers values -func NewGetViewsByShareNameOK() *GetViewsByShareNameOK { - return &GetViewsByShareNameOK{} -} - -/* -GetViewsByShareNameOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewsByShareNameOK struct { - Payload *models.GetViewsByShareNameResult -} - -// IsSuccess returns true when this get views by share name o k response has a 2xx status code -func (o *GetViewsByShareNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get views by share name o k response has a 3xx status code -func (o *GetViewsByShareNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get views by share name o k response has a 4xx status code -func (o *GetViewsByShareNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get views by share name o k response has a 5xx status code -func (o *GetViewsByShareNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get views by share name o k response a status code equal to that given -func (o *GetViewsByShareNameOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get views by share name o k response -func (o *GetViewsByShareNameOK) Code() int { - return 200 -} - -func (o *GetViewsByShareNameOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/shares][%d] getViewsByShareNameOK %s", 200, payload) -} - -func (o *GetViewsByShareNameOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/shares][%d] getViewsByShareNameOK %s", 200, payload) -} - -func (o *GetViewsByShareNameOK) GetPayload() *models.GetViewsByShareNameResult { - return o.Payload -} - -func (o *GetViewsByShareNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewsByShareNameResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewsByShareNameDefault creates a GetViewsByShareNameDefault with default headers values -func NewGetViewsByShareNameDefault(code int) *GetViewsByShareNameDefault { - return &GetViewsByShareNameDefault{ - _statusCode: code, - } -} - -/* -GetViewsByShareNameDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewsByShareNameDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get views by share name default response has a 2xx status code -func (o *GetViewsByShareNameDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get views by share name default response has a 3xx status code -func (o *GetViewsByShareNameDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get views by share name default response has a 4xx status code -func (o *GetViewsByShareNameDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get views by share name default response has a 5xx status code -func (o *GetViewsByShareNameDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get views by share name default response a status code equal to that given -func (o *GetViewsByShareNameDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get views by share name default response -func (o *GetViewsByShareNameDefault) Code() int { - return o._statusCode -} - -func (o *GetViewsByShareNameDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/shares][%d] GetViewsByShareName default %s", o._statusCode, payload) -} - -func (o *GetViewsByShareNameDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/shares][%d] GetViewsByShareName default %s", o._statusCode, payload) -} - -func (o *GetViewsByShareNameDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewsByShareNameDefault) 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/views/get_views_parameters.go b/v1/client/views/get_views_parameters.go deleted file mode 100644 index fabd9074..00000000 --- a/v1/client/views/get_views_parameters.go +++ /dev/null @@ -1,793 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewGetViewsParams creates a new GetViewsParams 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 NewGetViewsParams() *GetViewsParams { - return &GetViewsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewsParamsWithTimeout creates a new GetViewsParams object -// with the ability to set a timeout on a request. -func NewGetViewsParamsWithTimeout(timeout time.Duration) *GetViewsParams { - return &GetViewsParams{ - timeout: timeout, - } -} - -// NewGetViewsParamsWithContext creates a new GetViewsParams object -// with the ability to set a context for a request. -func NewGetViewsParamsWithContext(ctx context.Context) *GetViewsParams { - return &GetViewsParams{ - Context: ctx, - } -} - -// NewGetViewsParamsWithHTTPClient creates a new GetViewsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewsParamsWithHTTPClient(client *http.Client) *GetViewsParams { - return &GetViewsParams{ - HTTPClient: client, - } -} - -/* -GetViewsParams contains all the parameters to send to the API endpoint - - for the get views operation. - - Typically these are written to a http.Request. -*/ -type GetViewsParams struct { - - /* SortByLogicalUsage. - - If set to true, the list is sorted descending by logical usage. - */ - SortByLogicalUsage *bool - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* IncludeInactive. - - Specifies if inactive Views on this Remote Cluster (which have - Snapshots copied by replication) should also be returned. - Inactive Views are not counted towards the maxCount. - By default, this field is set to false. - */ - IncludeInactive *bool - - /* IncludeProtectionJobs. - - Specifies if Protection Jobs information needs to be returned along with - view metadata. By default, if not set or set to true, Job information is - returned. - */ - IncludeProtectionJobs *bool - - /* IncludeStats. - - If set to true, stats of views will be returned. By default this parameter - is set to false. - */ - IncludeStats *bool - - /* IncludeViewsWithAntivirusEnabledOnly. - - If set to true, the list will contain only the views for which antivirus - scan is enabled. - */ - IncludeViewsWithAntivirusEnabledOnly *bool - - /* IncludeViewsWithDataLockEnabledOnly. - - If set to true, the list will contain only the views for which either - file level data lock is enabled or view level data lock is enabled. - */ - IncludeViewsWithDataLockEnabledOnly *bool - - /* JobIds. - - Filter by Protection Job ids. Return Views that are being protected by - listed Jobs, which are specified by ids. - */ - JobIds []int64 - - /* MatchAliasNames. - - If true, view aliases are also matched with the names in viewNames. - */ - MatchAliasNames *bool - - /* MatchPartialNames. - - If true, the names in viewNames are matched by prefix rather than - exactly matched. - */ - MatchPartialNames *bool - - /* MaxCount. - - Specifies a limit on the number of Views returned. - - Format: int32 - */ - MaxCount *int32 - - /* MaxViewID. - - If the number of Views to return exceeds the maxCount specified in the - original request, specify the id of the last View - from the viewList in the previous response - to get the next set of Views. - - Format: int64 - */ - MaxViewID *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* ViewBoxIds. - - Filter by a list of Storage Domains (View Boxes) specified by id. - */ - ViewBoxIds []int64 - - /* ViewBoxNames. - - Filter by a list of View Box names. - */ - ViewBoxNames []string - - /* ViewIds. - - Filter by a list of View ids. - */ - ViewIds []int64 - - /* ViewNames. - - Filter by a list of View names. - */ - ViewNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get views params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsParams) WithDefaults() *GetViewsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get views params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get views params -func (o *GetViewsParams) WithTimeout(timeout time.Duration) *GetViewsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get views params -func (o *GetViewsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get views params -func (o *GetViewsParams) WithContext(ctx context.Context) *GetViewsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get views params -func (o *GetViewsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get views params -func (o *GetViewsParams) WithHTTPClient(client *http.Client) *GetViewsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get views params -func (o *GetViewsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSortByLogicalUsage adds the sortByLogicalUsage to the get views params -func (o *GetViewsParams) WithSortByLogicalUsage(sortByLogicalUsage *bool) *GetViewsParams { - o.SetSortByLogicalUsage(sortByLogicalUsage) - return o -} - -// SetSortByLogicalUsage adds the sortByLogicalUsage to the get views params -func (o *GetViewsParams) SetSortByLogicalUsage(sortByLogicalUsage *bool) { - o.SortByLogicalUsage = sortByLogicalUsage -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get views params -func (o *GetViewsParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetViewsParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get views params -func (o *GetViewsParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithIncludeInactive adds the includeInactive to the get views params -func (o *GetViewsParams) WithIncludeInactive(includeInactive *bool) *GetViewsParams { - o.SetIncludeInactive(includeInactive) - return o -} - -// SetIncludeInactive adds the includeInactive to the get views params -func (o *GetViewsParams) SetIncludeInactive(includeInactive *bool) { - o.IncludeInactive = includeInactive -} - -// WithIncludeProtectionJobs adds the includeProtectionJobs to the get views params -func (o *GetViewsParams) WithIncludeProtectionJobs(includeProtectionJobs *bool) *GetViewsParams { - o.SetIncludeProtectionJobs(includeProtectionJobs) - return o -} - -// SetIncludeProtectionJobs adds the includeProtectionJobs to the get views params -func (o *GetViewsParams) SetIncludeProtectionJobs(includeProtectionJobs *bool) { - o.IncludeProtectionJobs = includeProtectionJobs -} - -// WithIncludeStats adds the includeStats to the get views params -func (o *GetViewsParams) WithIncludeStats(includeStats *bool) *GetViewsParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the get views params -func (o *GetViewsParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeViewsWithAntivirusEnabledOnly adds the includeViewsWithAntivirusEnabledOnly to the get views params -func (o *GetViewsParams) WithIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly *bool) *GetViewsParams { - o.SetIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly) - return o -} - -// SetIncludeViewsWithAntivirusEnabledOnly adds the includeViewsWithAntivirusEnabledOnly to the get views params -func (o *GetViewsParams) SetIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly *bool) { - o.IncludeViewsWithAntivirusEnabledOnly = includeViewsWithAntivirusEnabledOnly -} - -// WithIncludeViewsWithDataLockEnabledOnly adds the includeViewsWithDataLockEnabledOnly to the get views params -func (o *GetViewsParams) WithIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly *bool) *GetViewsParams { - o.SetIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly) - return o -} - -// SetIncludeViewsWithDataLockEnabledOnly adds the includeViewsWithDataLockEnabledOnly to the get views params -func (o *GetViewsParams) SetIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly *bool) { - o.IncludeViewsWithDataLockEnabledOnly = includeViewsWithDataLockEnabledOnly -} - -// WithJobIds adds the jobIds to the get views params -func (o *GetViewsParams) WithJobIds(jobIds []int64) *GetViewsParams { - o.SetJobIds(jobIds) - return o -} - -// SetJobIds adds the jobIds to the get views params -func (o *GetViewsParams) SetJobIds(jobIds []int64) { - o.JobIds = jobIds -} - -// WithMatchAliasNames adds the matchAliasNames to the get views params -func (o *GetViewsParams) WithMatchAliasNames(matchAliasNames *bool) *GetViewsParams { - o.SetMatchAliasNames(matchAliasNames) - return o -} - -// SetMatchAliasNames adds the matchAliasNames to the get views params -func (o *GetViewsParams) SetMatchAliasNames(matchAliasNames *bool) { - o.MatchAliasNames = matchAliasNames -} - -// WithMatchPartialNames adds the matchPartialNames to the get views params -func (o *GetViewsParams) WithMatchPartialNames(matchPartialNames *bool) *GetViewsParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get views params -func (o *GetViewsParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithMaxCount adds the maxCount to the get views params -func (o *GetViewsParams) WithMaxCount(maxCount *int32) *GetViewsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get views params -func (o *GetViewsParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithMaxViewID adds the maxViewID to the get views params -func (o *GetViewsParams) WithMaxViewID(maxViewID *int64) *GetViewsParams { - o.SetMaxViewID(maxViewID) - return o -} - -// SetMaxViewID adds the maxViewId to the get views params -func (o *GetViewsParams) SetMaxViewID(maxViewID *int64) { - o.MaxViewID = maxViewID -} - -// WithTenantIds adds the tenantIds to the get views params -func (o *GetViewsParams) WithTenantIds(tenantIds []string) *GetViewsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get views params -func (o *GetViewsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewBoxIds adds the viewBoxIds to the get views params -func (o *GetViewsParams) WithViewBoxIds(viewBoxIds []int64) *GetViewsParams { - o.SetViewBoxIds(viewBoxIds) - return o -} - -// SetViewBoxIds adds the viewBoxIds to the get views params -func (o *GetViewsParams) SetViewBoxIds(viewBoxIds []int64) { - o.ViewBoxIds = viewBoxIds -} - -// WithViewBoxNames adds the viewBoxNames to the get views params -func (o *GetViewsParams) WithViewBoxNames(viewBoxNames []string) *GetViewsParams { - o.SetViewBoxNames(viewBoxNames) - return o -} - -// SetViewBoxNames adds the viewBoxNames to the get views params -func (o *GetViewsParams) SetViewBoxNames(viewBoxNames []string) { - o.ViewBoxNames = viewBoxNames -} - -// WithViewIds adds the viewIds to the get views params -func (o *GetViewsParams) WithViewIds(viewIds []int64) *GetViewsParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get views params -func (o *GetViewsParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WithViewNames adds the viewNames to the get views params -func (o *GetViewsParams) WithViewNames(viewNames []string) *GetViewsParams { - o.SetViewNames(viewNames) - return o -} - -// SetViewNames adds the viewNames to the get views params -func (o *GetViewsParams) SetViewNames(viewNames []string) { - o.ViewNames = viewNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.SortByLogicalUsage != nil { - - // query param SortByLogicalUsage - var qrSortByLogicalUsage bool - - if o.SortByLogicalUsage != nil { - qrSortByLogicalUsage = *o.SortByLogicalUsage - } - qSortByLogicalUsage := swag.FormatBool(qrSortByLogicalUsage) - if qSortByLogicalUsage != "" { - - if err := r.SetQueryParam("SortByLogicalUsage", qSortByLogicalUsage); err != nil { - return err - } - } - } - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.IncludeInactive != nil { - - // query param includeInactive - var qrIncludeInactive bool - - if o.IncludeInactive != nil { - qrIncludeInactive = *o.IncludeInactive - } - qIncludeInactive := swag.FormatBool(qrIncludeInactive) - if qIncludeInactive != "" { - - if err := r.SetQueryParam("includeInactive", qIncludeInactive); err != nil { - return err - } - } - } - - if o.IncludeProtectionJobs != nil { - - // query param includeProtectionJobs - var qrIncludeProtectionJobs bool - - if o.IncludeProtectionJobs != nil { - qrIncludeProtectionJobs = *o.IncludeProtectionJobs - } - qIncludeProtectionJobs := swag.FormatBool(qrIncludeProtectionJobs) - if qIncludeProtectionJobs != "" { - - if err := r.SetQueryParam("includeProtectionJobs", qIncludeProtectionJobs); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); err != nil { - return err - } - } - } - - if o.IncludeViewsWithAntivirusEnabledOnly != nil { - - // query param includeViewsWithAntivirusEnabledOnly - var qrIncludeViewsWithAntivirusEnabledOnly bool - - if o.IncludeViewsWithAntivirusEnabledOnly != nil { - qrIncludeViewsWithAntivirusEnabledOnly = *o.IncludeViewsWithAntivirusEnabledOnly - } - qIncludeViewsWithAntivirusEnabledOnly := swag.FormatBool(qrIncludeViewsWithAntivirusEnabledOnly) - if qIncludeViewsWithAntivirusEnabledOnly != "" { - - if err := r.SetQueryParam("includeViewsWithAntivirusEnabledOnly", qIncludeViewsWithAntivirusEnabledOnly); err != nil { - return err - } - } - } - - if o.IncludeViewsWithDataLockEnabledOnly != nil { - - // query param includeViewsWithDataLockEnabledOnly - var qrIncludeViewsWithDataLockEnabledOnly bool - - if o.IncludeViewsWithDataLockEnabledOnly != nil { - qrIncludeViewsWithDataLockEnabledOnly = *o.IncludeViewsWithDataLockEnabledOnly - } - qIncludeViewsWithDataLockEnabledOnly := swag.FormatBool(qrIncludeViewsWithDataLockEnabledOnly) - if qIncludeViewsWithDataLockEnabledOnly != "" { - - if err := r.SetQueryParam("includeViewsWithDataLockEnabledOnly", qIncludeViewsWithDataLockEnabledOnly); err != nil { - return err - } - } - } - - if o.JobIds != nil { - - // binding items for jobIds - joinedJobIds := o.bindParamJobIds(reg) - - // query array param jobIds - if err := r.SetQueryParam("jobIds", joinedJobIds...); err != nil { - return err - } - } - - if o.MatchAliasNames != nil { - - // query param matchAliasNames - var qrMatchAliasNames bool - - if o.MatchAliasNames != nil { - qrMatchAliasNames = *o.MatchAliasNames - } - qMatchAliasNames := swag.FormatBool(qrMatchAliasNames) - if qMatchAliasNames != "" { - - if err := r.SetQueryParam("matchAliasNames", qMatchAliasNames); err != nil { - return err - } - } - } - - if o.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.MaxViewID != nil { - - // query param maxViewId - var qrMaxViewID int64 - - if o.MaxViewID != nil { - qrMaxViewID = *o.MaxViewID - } - qMaxViewID := swag.FormatInt64(qrMaxViewID) - if qMaxViewID != "" { - - if err := r.SetQueryParam("maxViewId", qMaxViewID); err != nil { - return err - } - } - } - - 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.ViewBoxIds != nil { - - // binding items for viewBoxIds - joinedViewBoxIds := o.bindParamViewBoxIds(reg) - - // query array param viewBoxIds - if err := r.SetQueryParam("viewBoxIds", joinedViewBoxIds...); err != nil { - return err - } - } - - if o.ViewBoxNames != nil { - - // binding items for viewBoxNames - joinedViewBoxNames := o.bindParamViewBoxNames(reg) - - // query array param viewBoxNames - if err := r.SetQueryParam("viewBoxNames", joinedViewBoxNames...); err != nil { - return err - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if o.ViewNames != nil { - - // binding items for viewNames - joinedViewNames := o.bindParamViewNames(reg) - - // query array param viewNames - if err := r.SetQueryParam("viewNames", joinedViewNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViews binds the parameter jobIds -func (o *GetViewsParams) bindParamJobIds(formats strfmt.Registry) []string { - jobIdsIR := o.JobIds - - var jobIdsIC []string - for _, jobIdsIIR := range jobIdsIR { // explode []int64 - - jobIdsIIV := swag.FormatInt64(jobIdsIIR) // int64 as string - jobIdsIC = append(jobIdsIC, jobIdsIIV) - } - - // items.CollectionFormat: "" - jobIdsIS := swag.JoinByFormat(jobIdsIC, "") - - return jobIdsIS -} - -// bindParamGetViews binds the parameter tenantIds -func (o *GetViewsParams) 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 -} - -// bindParamGetViews binds the parameter viewBoxIds -func (o *GetViewsParams) bindParamViewBoxIds(formats strfmt.Registry) []string { - viewBoxIdsIR := o.ViewBoxIds - - var viewBoxIdsIC []string - for _, viewBoxIdsIIR := range viewBoxIdsIR { // explode []int64 - - viewBoxIdsIIV := swag.FormatInt64(viewBoxIdsIIR) // int64 as string - viewBoxIdsIC = append(viewBoxIdsIC, viewBoxIdsIIV) - } - - // items.CollectionFormat: "" - viewBoxIdsIS := swag.JoinByFormat(viewBoxIdsIC, "") - - return viewBoxIdsIS -} - -// bindParamGetViews binds the parameter viewBoxNames -func (o *GetViewsParams) bindParamViewBoxNames(formats strfmt.Registry) []string { - viewBoxNamesIR := o.ViewBoxNames - - var viewBoxNamesIC []string - for _, viewBoxNamesIIR := range viewBoxNamesIR { // explode []string - - viewBoxNamesIIV := viewBoxNamesIIR // string as string - viewBoxNamesIC = append(viewBoxNamesIC, viewBoxNamesIIV) - } - - // items.CollectionFormat: "" - viewBoxNamesIS := swag.JoinByFormat(viewBoxNamesIC, "") - - return viewBoxNamesIS -} - -// bindParamGetViews binds the parameter viewIds -func (o *GetViewsParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} - -// bindParamGetViews binds the parameter viewNames -func (o *GetViewsParams) bindParamViewNames(formats strfmt.Registry) []string { - viewNamesIR := o.ViewNames - - var viewNamesIC []string - for _, viewNamesIIR := range viewNamesIR { // explode []string - - viewNamesIIV := viewNamesIIR // string as string - viewNamesIC = append(viewNamesIC, viewNamesIIV) - } - - // items.CollectionFormat: "" - viewNamesIS := swag.JoinByFormat(viewNamesIC, "") - - return viewNamesIS -} diff --git a/v1/client/views/get_views_responses.go b/v1/client/views/get_views_responses.go deleted file mode 100644 index 0d7efa36..00000000 --- a/v1/client/views/get_views_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetViewsReader is a Reader for the GetViews structure. -type GetViewsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewsDefault(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 - } -} - -// NewGetViewsOK creates a GetViewsOK with default headers values -func NewGetViewsOK() *GetViewsOK { - return &GetViewsOK{} -} - -/* -GetViewsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewsOK struct { - Payload *models.GetViewsResult -} - -// IsSuccess returns true when this get views o k response has a 2xx status code -func (o *GetViewsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get views o k response has a 3xx status code -func (o *GetViewsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get views o k response has a 4xx status code -func (o *GetViewsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get views o k response has a 5xx status code -func (o *GetViewsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get views o k response a status code equal to that given -func (o *GetViewsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get views o k response -func (o *GetViewsOK) Code() int { - return 200 -} - -func (o *GetViewsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views][%d] getViewsOK %s", 200, payload) -} - -func (o *GetViewsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views][%d] getViewsOK %s", 200, payload) -} - -func (o *GetViewsOK) GetPayload() *models.GetViewsResult { - return o.Payload -} - -func (o *GetViewsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewsDefault creates a GetViewsDefault with default headers values -func NewGetViewsDefault(code int) *GetViewsDefault { - return &GetViewsDefault{ - _statusCode: code, - } -} - -/* -GetViewsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get views default response has a 2xx status code -func (o *GetViewsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get views default response has a 3xx status code -func (o *GetViewsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get views default response has a 4xx status code -func (o *GetViewsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get views default response has a 5xx status code -func (o *GetViewsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get views default response a status code equal to that given -func (o *GetViewsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get views default response -func (o *GetViewsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views][%d] GetViews default %s", o._statusCode, payload) -} - -func (o *GetViewsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/views][%d] GetViews default %s", o._statusCode, payload) -} - -func (o *GetViewsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetViewsDefault) 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/views/list_nlm_locks_parameters.go b/v1/client/views/list_nlm_locks_parameters.go deleted file mode 100644 index 242d69bc..00000000 --- a/v1/client/views/list_nlm_locks_parameters.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" -) - -// NewListNlmLocksParams creates a new ListNlmLocksParams 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 NewListNlmLocksParams() *ListNlmLocksParams { - return &ListNlmLocksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListNlmLocksParamsWithTimeout creates a new ListNlmLocksParams object -// with the ability to set a timeout on a request. -func NewListNlmLocksParamsWithTimeout(timeout time.Duration) *ListNlmLocksParams { - return &ListNlmLocksParams{ - timeout: timeout, - } -} - -// NewListNlmLocksParamsWithContext creates a new ListNlmLocksParams object -// with the ability to set a context for a request. -func NewListNlmLocksParamsWithContext(ctx context.Context) *ListNlmLocksParams { - return &ListNlmLocksParams{ - Context: ctx, - } -} - -// NewListNlmLocksParamsWithHTTPClient creates a new ListNlmLocksParams object -// with the ability to set a custom HTTPClient for a request. -func NewListNlmLocksParamsWithHTTPClient(client *http.Client) *ListNlmLocksParams { - return &ListNlmLocksParams{ - HTTPClient: client, - } -} - -/* -ListNlmLocksParams contains all the parameters to send to the API endpoint - - for the list nlm locks operation. - - Typically these are written to a http.Request. -*/ -type ListNlmLocksParams struct { - - /* Cookie. - - Specifies the opaque string returned in the previous response. - If this is set, next set of active opens just after the previous - response are returned. If this is not set, first set of NLM locks - are returned. - */ - Cookie *string - - /* FilePath. - - Specifies the filepath in the view relative to the root filesystem. - If this field is specified, viewName field must also be specified. - */ - FilePath *string - - /* PageCount. - - Specifies the maximum number of NLM locks to return in the response. - This field cannot be set above 1000. If this is not set, maximum of 1000 - entries are returned. - - Format: int32 - */ - PageCount *int32 - - /* ViewName. - - Specifies the name of the View in which to search. If a view name is not - specified, all the views in the Cluster is searched. - This field is mandatory if filePath field is specified. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListNlmLocksParams) WithDefaults() *ListNlmLocksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListNlmLocksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list nlm locks params -func (o *ListNlmLocksParams) WithTimeout(timeout time.Duration) *ListNlmLocksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list nlm locks params -func (o *ListNlmLocksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list nlm locks params -func (o *ListNlmLocksParams) WithContext(ctx context.Context) *ListNlmLocksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list nlm locks params -func (o *ListNlmLocksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list nlm locks params -func (o *ListNlmLocksParams) WithHTTPClient(client *http.Client) *ListNlmLocksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list nlm locks params -func (o *ListNlmLocksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the list nlm locks params -func (o *ListNlmLocksParams) WithCookie(cookie *string) *ListNlmLocksParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the list nlm locks params -func (o *ListNlmLocksParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithFilePath adds the filePath to the list nlm locks params -func (o *ListNlmLocksParams) WithFilePath(filePath *string) *ListNlmLocksParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the list nlm locks params -func (o *ListNlmLocksParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithPageCount adds the pageCount to the list nlm locks params -func (o *ListNlmLocksParams) WithPageCount(pageCount *int32) *ListNlmLocksParams { - o.SetPageCount(pageCount) - return o -} - -// SetPageCount adds the pageCount to the list nlm locks params -func (o *ListNlmLocksParams) SetPageCount(pageCount *int32) { - o.PageCount = pageCount -} - -// WithViewName adds the viewName to the list nlm locks params -func (o *ListNlmLocksParams) WithViewName(viewName *string) *ListNlmLocksParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the list nlm locks params -func (o *ListNlmLocksParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *ListNlmLocksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.PageCount != nil { - - // query param pageCount - var qrPageCount int32 - - if o.PageCount != nil { - qrPageCount = *o.PageCount - } - qPageCount := swag.FormatInt32(qrPageCount) - if qPageCount != "" { - - if err := r.SetQueryParam("pageCount", qPageCount); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/list_nlm_locks_responses.go b/v1/client/views/list_nlm_locks_responses.go deleted file mode 100644 index 121afddb..00000000 --- a/v1/client/views/list_nlm_locks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ListNlmLocksReader is a Reader for the ListNlmLocks structure. -type ListNlmLocksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListNlmLocksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListNlmLocksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListNlmLocksDefault(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 - } -} - -// NewListNlmLocksOK creates a ListNlmLocksOK with default headers values -func NewListNlmLocksOK() *ListNlmLocksOK { - return &ListNlmLocksOK{} -} - -/* -ListNlmLocksOK describes a response with status code 200, with default header values. - -Success -*/ -type ListNlmLocksOK struct { - Payload *models.ListNlmLocksResponse -} - -// IsSuccess returns true when this list nlm locks o k response has a 2xx status code -func (o *ListNlmLocksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list nlm locks o k response has a 3xx status code -func (o *ListNlmLocksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list nlm locks o k response has a 4xx status code -func (o *ListNlmLocksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list nlm locks o k response has a 5xx status code -func (o *ListNlmLocksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list nlm locks o k response a status code equal to that given -func (o *ListNlmLocksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list nlm locks o k response -func (o *ListNlmLocksOK) Code() int { - return 200 -} - -func (o *ListNlmLocksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nlmLocks][%d] listNlmLocksOK %s", 200, payload) -} - -func (o *ListNlmLocksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nlmLocks][%d] listNlmLocksOK %s", 200, payload) -} - -func (o *ListNlmLocksOK) GetPayload() *models.ListNlmLocksResponse { - return o.Payload -} - -func (o *ListNlmLocksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListNlmLocksResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListNlmLocksDefault creates a ListNlmLocksDefault with default headers values -func NewListNlmLocksDefault(code int) *ListNlmLocksDefault { - return &ListNlmLocksDefault{ - _statusCode: code, - } -} - -/* -ListNlmLocksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListNlmLocksDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this list nlm locks default response has a 2xx status code -func (o *ListNlmLocksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list nlm locks default response has a 3xx status code -func (o *ListNlmLocksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list nlm locks default response has a 4xx status code -func (o *ListNlmLocksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list nlm locks default response has a 5xx status code -func (o *ListNlmLocksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list nlm locks default response a status code equal to that given -func (o *ListNlmLocksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list nlm locks default response -func (o *ListNlmLocksDefault) Code() int { - return o._statusCode -} - -func (o *ListNlmLocksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nlmLocks][%d] ListNlmLocks default %s", o._statusCode, payload) -} - -func (o *ListNlmLocksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/nlmLocks][%d] ListNlmLocks default %s", o._statusCode, payload) -} - -func (o *ListNlmLocksDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *ListNlmLocksDefault) 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/views/lock_file_by_id_parameters.go b/v1/client/views/lock_file_by_id_parameters.go deleted file mode 100644 index 246c7bc9..00000000 --- a/v1/client/views/lock_file_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewLockFileByIDParams creates a new LockFileByIDParams 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 NewLockFileByIDParams() *LockFileByIDParams { - return &LockFileByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLockFileByIDParamsWithTimeout creates a new LockFileByIDParams object -// with the ability to set a timeout on a request. -func NewLockFileByIDParamsWithTimeout(timeout time.Duration) *LockFileByIDParams { - return &LockFileByIDParams{ - timeout: timeout, - } -} - -// NewLockFileByIDParamsWithContext creates a new LockFileByIDParams object -// with the ability to set a context for a request. -func NewLockFileByIDParamsWithContext(ctx context.Context) *LockFileByIDParams { - return &LockFileByIDParams{ - Context: ctx, - } -} - -// NewLockFileByIDParamsWithHTTPClient creates a new LockFileByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewLockFileByIDParamsWithHTTPClient(client *http.Client) *LockFileByIDParams { - return &LockFileByIDParams{ - HTTPClient: client, - } -} - -/* -LockFileByIDParams contains all the parameters to send to the API endpoint - - for the lock file by Id operation. - - Typically these are written to a http.Request. -*/ -type LockFileByIDParams struct { - - /* Body. - - Request to lock a file. - */ - Body *models.LockFileParams - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the lock file by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileByIDParams) WithDefaults() *LockFileByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the lock file by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the lock file by Id params -func (o *LockFileByIDParams) WithTimeout(timeout time.Duration) *LockFileByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the lock file by Id params -func (o *LockFileByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the lock file by Id params -func (o *LockFileByIDParams) WithContext(ctx context.Context) *LockFileByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the lock file by Id params -func (o *LockFileByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the lock file by Id params -func (o *LockFileByIDParams) WithHTTPClient(client *http.Client) *LockFileByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the lock file by Id params -func (o *LockFileByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the lock file by Id params -func (o *LockFileByIDParams) WithBody(body *models.LockFileParams) *LockFileByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the lock file by Id params -func (o *LockFileByIDParams) SetBody(body *models.LockFileParams) { - o.Body = body -} - -// WithID adds the id to the lock file by Id params -func (o *LockFileByIDParams) WithID(id int64) *LockFileByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the lock file by Id params -func (o *LockFileByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *LockFileByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/lock_file_by_id_responses.go b/v1/client/views/lock_file_by_id_responses.go deleted file mode 100644 index b50890c5..00000000 --- a/v1/client/views/lock_file_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LockFileByIDReader is a Reader for the LockFileByID structure. -type LockFileByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LockFileByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewLockFileByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLockFileByIDDefault(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 - } -} - -// NewLockFileByIDOK creates a LockFileByIDOK with default headers values -func NewLockFileByIDOK() *LockFileByIDOK { - return &LockFileByIDOK{} -} - -/* -LockFileByIDOK describes a response with status code 200, with default header values. - -Get lock file status response -*/ -type LockFileByIDOK struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this lock file by Id o k response has a 2xx status code -func (o *LockFileByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this lock file by Id o k response has a 3xx status code -func (o *LockFileByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this lock file by Id o k response has a 4xx status code -func (o *LockFileByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this lock file by Id o k response has a 5xx status code -func (o *LockFileByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this lock file by Id o k response a status code equal to that given -func (o *LockFileByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the lock file by Id o k response -func (o *LockFileByIDOK) Code() int { - return 200 -} - -func (o *LockFileByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/id/{id}/fileLocks][%d] lockFileByIdOK %s", 200, payload) -} - -func (o *LockFileByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/id/{id}/fileLocks][%d] lockFileByIdOK %s", 200, payload) -} - -func (o *LockFileByIDOK) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *LockFileByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLockFileByIDDefault creates a LockFileByIDDefault with default headers values -func NewLockFileByIDDefault(code int) *LockFileByIDDefault { - return &LockFileByIDDefault{ - _statusCode: code, - } -} - -/* -LockFileByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type LockFileByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this lock file by Id default response has a 2xx status code -func (o *LockFileByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this lock file by Id default response has a 3xx status code -func (o *LockFileByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this lock file by Id default response has a 4xx status code -func (o *LockFileByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this lock file by Id default response has a 5xx status code -func (o *LockFileByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this lock file by Id default response a status code equal to that given -func (o *LockFileByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the lock file by Id default response -func (o *LockFileByIDDefault) Code() int { - return o._statusCode -} - -func (o *LockFileByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/id/{id}/fileLocks][%d] LockFileById default %s", o._statusCode, payload) -} - -func (o *LockFileByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/id/{id}/fileLocks][%d] LockFileById default %s", o._statusCode, payload) -} - -func (o *LockFileByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *LockFileByIDDefault) 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/views/lock_file_parameters.go b/v1/client/views/lock_file_parameters.go deleted file mode 100644 index ba21eed8..00000000 --- a/v1/client/views/lock_file_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewLockFileParams creates a new LockFileParams 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 NewLockFileParams() *LockFileParams { - return &LockFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLockFileParamsWithTimeout creates a new LockFileParams object -// with the ability to set a timeout on a request. -func NewLockFileParamsWithTimeout(timeout time.Duration) *LockFileParams { - return &LockFileParams{ - timeout: timeout, - } -} - -// NewLockFileParamsWithContext creates a new LockFileParams object -// with the ability to set a context for a request. -func NewLockFileParamsWithContext(ctx context.Context) *LockFileParams { - return &LockFileParams{ - Context: ctx, - } -} - -// NewLockFileParamsWithHTTPClient creates a new LockFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewLockFileParamsWithHTTPClient(client *http.Client) *LockFileParams { - return &LockFileParams{ - HTTPClient: client, - } -} - -/* -LockFileParams contains all the parameters to send to the API endpoint - - for the lock file operation. - - Typically these are written to a http.Request. -*/ -type LockFileParams struct { - - /* Body. - - Request to lock a file. - */ - Body *models.LockFileParams - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the lock file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileParams) WithDefaults() *LockFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the lock file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the lock file params -func (o *LockFileParams) WithTimeout(timeout time.Duration) *LockFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the lock file params -func (o *LockFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the lock file params -func (o *LockFileParams) WithContext(ctx context.Context) *LockFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the lock file params -func (o *LockFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the lock file params -func (o *LockFileParams) WithHTTPClient(client *http.Client) *LockFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the lock file params -func (o *LockFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the lock file params -func (o *LockFileParams) WithBody(body *models.LockFileParams) *LockFileParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the lock file params -func (o *LockFileParams) SetBody(body *models.LockFileParams) { - o.Body = body -} - -// WithName adds the name to the lock file params -func (o *LockFileParams) WithName(name string) *LockFileParams { - o.SetName(name) - return o -} - -// SetName adds the name to the lock file params -func (o *LockFileParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *LockFileParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/lock_file_responses.go b/v1/client/views/lock_file_responses.go deleted file mode 100644 index cb1e5787..00000000 --- a/v1/client/views/lock_file_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// LockFileReader is a Reader for the LockFile structure. -type LockFileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LockFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewLockFileOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLockFileDefault(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 - } -} - -// NewLockFileOK creates a LockFileOK with default headers values -func NewLockFileOK() *LockFileOK { - return &LockFileOK{} -} - -/* -LockFileOK describes a response with status code 200, with default header values. - -Get lock file status response -*/ -type LockFileOK struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this lock file o k response has a 2xx status code -func (o *LockFileOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this lock file o k response has a 3xx status code -func (o *LockFileOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this lock file o k response has a 4xx status code -func (o *LockFileOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this lock file o k response has a 5xx status code -func (o *LockFileOK) IsServerError() bool { - return false -} - -// IsCode returns true when this lock file o k response a status code equal to that given -func (o *LockFileOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the lock file o k response -func (o *LockFileOK) Code() int { - return 200 -} - -func (o *LockFileOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/{name}/fileLocks][%d] lockFileOK %s", 200, payload) -} - -func (o *LockFileOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/{name}/fileLocks][%d] lockFileOK %s", 200, payload) -} - -func (o *LockFileOK) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *LockFileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLockFileDefault creates a LockFileDefault with default headers values -func NewLockFileDefault(code int) *LockFileDefault { - return &LockFileDefault{ - _statusCode: code, - } -} - -/* -LockFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type LockFileDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this lock file default response has a 2xx status code -func (o *LockFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this lock file default response has a 3xx status code -func (o *LockFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this lock file default response has a 4xx status code -func (o *LockFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this lock file default response has a 5xx status code -func (o *LockFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this lock file default response a status code equal to that given -func (o *LockFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the lock file default response -func (o *LockFileDefault) Code() int { - return o._statusCode -} - -func (o *LockFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/{name}/fileLocks][%d] LockFile default %s", o._statusCode, payload) -} - -func (o *LockFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/{name}/fileLocks][%d] LockFile default %s", o._statusCode, payload) -} - -func (o *LockFileDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *LockFileDefault) 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/views/overwrite_view_parameters.go b/v1/client/views/overwrite_view_parameters.go deleted file mode 100644 index 79e6ea5b..00000000 --- a/v1/client/views/overwrite_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewOverwriteViewParams creates a new OverwriteViewParams 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 NewOverwriteViewParams() *OverwriteViewParams { - return &OverwriteViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewOverwriteViewParamsWithTimeout creates a new OverwriteViewParams object -// with the ability to set a timeout on a request. -func NewOverwriteViewParamsWithTimeout(timeout time.Duration) *OverwriteViewParams { - return &OverwriteViewParams{ - timeout: timeout, - } -} - -// NewOverwriteViewParamsWithContext creates a new OverwriteViewParams object -// with the ability to set a context for a request. -func NewOverwriteViewParamsWithContext(ctx context.Context) *OverwriteViewParams { - return &OverwriteViewParams{ - Context: ctx, - } -} - -// NewOverwriteViewParamsWithHTTPClient creates a new OverwriteViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewOverwriteViewParamsWithHTTPClient(client *http.Client) *OverwriteViewParams { - return &OverwriteViewParams{ - HTTPClient: client, - } -} - -/* -OverwriteViewParams contains all the parameters to send to the API endpoint - - for the overwrite view operation. - - Typically these are written to a http.Request. -*/ -type OverwriteViewParams struct { - - /* Body. - - Request to overwrite a Target view with contents of a Source view. - */ - Body *models.OverwriteViewParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the overwrite view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *OverwriteViewParams) WithDefaults() *OverwriteViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the overwrite view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *OverwriteViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the overwrite view params -func (o *OverwriteViewParams) WithTimeout(timeout time.Duration) *OverwriteViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the overwrite view params -func (o *OverwriteViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the overwrite view params -func (o *OverwriteViewParams) WithContext(ctx context.Context) *OverwriteViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the overwrite view params -func (o *OverwriteViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the overwrite view params -func (o *OverwriteViewParams) WithHTTPClient(client *http.Client) *OverwriteViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the overwrite view params -func (o *OverwriteViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the overwrite view params -func (o *OverwriteViewParams) WithBody(body *models.OverwriteViewParam) *OverwriteViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the overwrite view params -func (o *OverwriteViewParams) SetBody(body *models.OverwriteViewParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *OverwriteViewParams) 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/views/overwrite_view_responses.go b/v1/client/views/overwrite_view_responses.go deleted file mode 100644 index d2f8f43b..00000000 --- a/v1/client/views/overwrite_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// OverwriteViewReader is a Reader for the OverwriteView structure. -type OverwriteViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *OverwriteViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewOverwriteViewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewOverwriteViewDefault(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 - } -} - -// NewOverwriteViewOK creates a OverwriteViewOK with default headers values -func NewOverwriteViewOK() *OverwriteViewOK { - return &OverwriteViewOK{} -} - -/* -OverwriteViewOK describes a response with status code 200, with default header values. - -Success -*/ -type OverwriteViewOK struct { - Payload *models.View -} - -// IsSuccess returns true when this overwrite view o k response has a 2xx status code -func (o *OverwriteViewOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this overwrite view o k response has a 3xx status code -func (o *OverwriteViewOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this overwrite view o k response has a 4xx status code -func (o *OverwriteViewOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this overwrite view o k response has a 5xx status code -func (o *OverwriteViewOK) IsServerError() bool { - return false -} - -// IsCode returns true when this overwrite view o k response a status code equal to that given -func (o *OverwriteViewOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the overwrite view o k response -func (o *OverwriteViewOK) Code() int { - return 200 -} - -func (o *OverwriteViewOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/overwrite][%d] overwriteViewOK %s", 200, payload) -} - -func (o *OverwriteViewOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/overwrite][%d] overwriteViewOK %s", 200, payload) -} - -func (o *OverwriteViewOK) GetPayload() *models.View { - return o.Payload -} - -func (o *OverwriteViewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewOverwriteViewDefault creates a OverwriteViewDefault with default headers values -func NewOverwriteViewDefault(code int) *OverwriteViewDefault { - return &OverwriteViewDefault{ - _statusCode: code, - } -} - -/* -OverwriteViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type OverwriteViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this overwrite view default response has a 2xx status code -func (o *OverwriteViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this overwrite view default response has a 3xx status code -func (o *OverwriteViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this overwrite view default response has a 4xx status code -func (o *OverwriteViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this overwrite view default response has a 5xx status code -func (o *OverwriteViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this overwrite view default response a status code equal to that given -func (o *OverwriteViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the overwrite view default response -func (o *OverwriteViewDefault) Code() int { - return o._statusCode -} - -func (o *OverwriteViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/overwrite][%d] OverwriteView default %s", o._statusCode, payload) -} - -func (o *OverwriteViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/overwrite][%d] OverwriteView default %s", o._statusCode, payload) -} - -func (o *OverwriteViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *OverwriteViewDefault) 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/views/rename_view_by_id_parameters.go b/v1/client/views/rename_view_by_id_parameters.go deleted file mode 100644 index 9b152996..00000000 --- a/v1/client/views/rename_view_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRenameViewByIDParams creates a new RenameViewByIDParams 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 NewRenameViewByIDParams() *RenameViewByIDParams { - return &RenameViewByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRenameViewByIDParamsWithTimeout creates a new RenameViewByIDParams object -// with the ability to set a timeout on a request. -func NewRenameViewByIDParamsWithTimeout(timeout time.Duration) *RenameViewByIDParams { - return &RenameViewByIDParams{ - timeout: timeout, - } -} - -// NewRenameViewByIDParamsWithContext creates a new RenameViewByIDParams object -// with the ability to set a context for a request. -func NewRenameViewByIDParamsWithContext(ctx context.Context) *RenameViewByIDParams { - return &RenameViewByIDParams{ - Context: ctx, - } -} - -// NewRenameViewByIDParamsWithHTTPClient creates a new RenameViewByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewRenameViewByIDParamsWithHTTPClient(client *http.Client) *RenameViewByIDParams { - return &RenameViewByIDParams{ - HTTPClient: client, - } -} - -/* -RenameViewByIDParams contains all the parameters to send to the API endpoint - - for the rename view by Id operation. - - Typically these are written to a http.Request. -*/ -type RenameViewByIDParams struct { - - /* Body. - - Request to rename a View. - */ - Body *models.RenameViewParam - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the rename view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenameViewByIDParams) WithDefaults() *RenameViewByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the rename view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenameViewByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the rename view by Id params -func (o *RenameViewByIDParams) WithTimeout(timeout time.Duration) *RenameViewByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the rename view by Id params -func (o *RenameViewByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the rename view by Id params -func (o *RenameViewByIDParams) WithContext(ctx context.Context) *RenameViewByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the rename view by Id params -func (o *RenameViewByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the rename view by Id params -func (o *RenameViewByIDParams) WithHTTPClient(client *http.Client) *RenameViewByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the rename view by Id params -func (o *RenameViewByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the rename view by Id params -func (o *RenameViewByIDParams) WithBody(body *models.RenameViewParam) *RenameViewByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the rename view by Id params -func (o *RenameViewByIDParams) SetBody(body *models.RenameViewParam) { - o.Body = body -} - -// WithID adds the id to the rename view by Id params -func (o *RenameViewByIDParams) WithID(id int64) *RenameViewByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the rename view by Id params -func (o *RenameViewByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RenameViewByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/rename_view_by_id_responses.go b/v1/client/views/rename_view_by_id_responses.go deleted file mode 100644 index d755e086..00000000 --- a/v1/client/views/rename_view_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RenameViewByIDReader is a Reader for the RenameViewByID structure. -type RenameViewByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RenameViewByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRenameViewByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRenameViewByIDDefault(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 - } -} - -// NewRenameViewByIDOK creates a RenameViewByIDOK with default headers values -func NewRenameViewByIDOK() *RenameViewByIDOK { - return &RenameViewByIDOK{} -} - -/* -RenameViewByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type RenameViewByIDOK struct { - Payload *models.View -} - -// IsSuccess returns true when this rename view by Id o k response has a 2xx status code -func (o *RenameViewByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this rename view by Id o k response has a 3xx status code -func (o *RenameViewByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this rename view by Id o k response has a 4xx status code -func (o *RenameViewByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this rename view by Id o k response has a 5xx status code -func (o *RenameViewByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this rename view by Id o k response a status code equal to that given -func (o *RenameViewByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the rename view by Id o k response -func (o *RenameViewByIDOK) Code() int { - return 200 -} - -func (o *RenameViewByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/id/{id}][%d] renameViewByIdOK %s", 200, payload) -} - -func (o *RenameViewByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/id/{id}][%d] renameViewByIdOK %s", 200, payload) -} - -func (o *RenameViewByIDOK) GetPayload() *models.View { - return o.Payload -} - -func (o *RenameViewByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenameViewByIDDefault creates a RenameViewByIDDefault with default headers values -func NewRenameViewByIDDefault(code int) *RenameViewByIDDefault { - return &RenameViewByIDDefault{ - _statusCode: code, - } -} - -/* -RenameViewByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type RenameViewByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this rename view by Id default response has a 2xx status code -func (o *RenameViewByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this rename view by Id default response has a 3xx status code -func (o *RenameViewByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this rename view by Id default response has a 4xx status code -func (o *RenameViewByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this rename view by Id default response has a 5xx status code -func (o *RenameViewByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this rename view by Id default response a status code equal to that given -func (o *RenameViewByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the rename view by Id default response -func (o *RenameViewByIDDefault) Code() int { - return o._statusCode -} - -func (o *RenameViewByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/id/{id}][%d] RenameViewById default %s", o._statusCode, payload) -} - -func (o *RenameViewByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/id/{id}][%d] RenameViewById default %s", o._statusCode, payload) -} - -func (o *RenameViewByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RenameViewByIDDefault) 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/views/rename_view_parameters.go b/v1/client/views/rename_view_parameters.go deleted file mode 100644 index 820dc943..00000000 --- a/v1/client/views/rename_view_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewRenameViewParams creates a new RenameViewParams 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 NewRenameViewParams() *RenameViewParams { - return &RenameViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRenameViewParamsWithTimeout creates a new RenameViewParams object -// with the ability to set a timeout on a request. -func NewRenameViewParamsWithTimeout(timeout time.Duration) *RenameViewParams { - return &RenameViewParams{ - timeout: timeout, - } -} - -// NewRenameViewParamsWithContext creates a new RenameViewParams object -// with the ability to set a context for a request. -func NewRenameViewParamsWithContext(ctx context.Context) *RenameViewParams { - return &RenameViewParams{ - Context: ctx, - } -} - -// NewRenameViewParamsWithHTTPClient creates a new RenameViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewRenameViewParamsWithHTTPClient(client *http.Client) *RenameViewParams { - return &RenameViewParams{ - HTTPClient: client, - } -} - -/* -RenameViewParams contains all the parameters to send to the API endpoint - - for the rename view operation. - - Typically these are written to a http.Request. -*/ -type RenameViewParams struct { - - /* Body. - - Request to rename a View. - */ - Body *models.RenameViewParam - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the rename view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenameViewParams) WithDefaults() *RenameViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the rename view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RenameViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the rename view params -func (o *RenameViewParams) WithTimeout(timeout time.Duration) *RenameViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the rename view params -func (o *RenameViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the rename view params -func (o *RenameViewParams) WithContext(ctx context.Context) *RenameViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the rename view params -func (o *RenameViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the rename view params -func (o *RenameViewParams) WithHTTPClient(client *http.Client) *RenameViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the rename view params -func (o *RenameViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the rename view params -func (o *RenameViewParams) WithBody(body *models.RenameViewParam) *RenameViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the rename view params -func (o *RenameViewParams) SetBody(body *models.RenameViewParam) { - o.Body = body -} - -// WithName adds the name to the rename view params -func (o *RenameViewParams) WithName(name string) *RenameViewParams { - o.SetName(name) - return o -} - -// SetName adds the name to the rename view params -func (o *RenameViewParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *RenameViewParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/rename_view_responses.go b/v1/client/views/rename_view_responses.go deleted file mode 100644 index 321163b0..00000000 --- a/v1/client/views/rename_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RenameViewReader is a Reader for the RenameView structure. -type RenameViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RenameViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRenameViewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRenameViewDefault(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 - } -} - -// NewRenameViewOK creates a RenameViewOK with default headers values -func NewRenameViewOK() *RenameViewOK { - return &RenameViewOK{} -} - -/* -RenameViewOK describes a response with status code 200, with default header values. - -Success -*/ -type RenameViewOK struct { - Payload *models.View -} - -// IsSuccess returns true when this rename view o k response has a 2xx status code -func (o *RenameViewOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this rename view o k response has a 3xx status code -func (o *RenameViewOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this rename view o k response has a 4xx status code -func (o *RenameViewOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this rename view o k response has a 5xx status code -func (o *RenameViewOK) IsServerError() bool { - return false -} - -// IsCode returns true when this rename view o k response a status code equal to that given -func (o *RenameViewOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the rename view o k response -func (o *RenameViewOK) Code() int { - return 200 -} - -func (o *RenameViewOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/{name}][%d] renameViewOK %s", 200, payload) -} - -func (o *RenameViewOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/{name}][%d] renameViewOK %s", 200, payload) -} - -func (o *RenameViewOK) GetPayload() *models.View { - return o.Payload -} - -func (o *RenameViewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRenameViewDefault creates a RenameViewDefault with default headers values -func NewRenameViewDefault(code int) *RenameViewDefault { - return &RenameViewDefault{ - _statusCode: code, - } -} - -/* -RenameViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type RenameViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this rename view default response has a 2xx status code -func (o *RenameViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this rename view default response has a 3xx status code -func (o *RenameViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this rename view default response has a 4xx status code -func (o *RenameViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this rename view default response has a 5xx status code -func (o *RenameViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this rename view default response a status code equal to that given -func (o *RenameViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the rename view default response -func (o *RenameViewDefault) Code() int { - return o._statusCode -} - -func (o *RenameViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/{name}][%d] RenameView default %s", o._statusCode, payload) -} - -func (o *RenameViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/views/rename/{name}][%d] RenameView default %s", o._statusCode, payload) -} - -func (o *RenameViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RenameViewDefault) 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/views/update_user_quota_settings_parameters.go b/v1/client/views/update_user_quota_settings_parameters.go deleted file mode 100644 index 22d770c9..00000000 --- a/v1/client/views/update_user_quota_settings_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateUserQuotaSettingsParams creates a new UpdateUserQuotaSettingsParams 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 NewUpdateUserQuotaSettingsParams() *UpdateUserQuotaSettingsParams { - return &UpdateUserQuotaSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserQuotaSettingsParamsWithTimeout creates a new UpdateUserQuotaSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateUserQuotaSettingsParamsWithTimeout(timeout time.Duration) *UpdateUserQuotaSettingsParams { - return &UpdateUserQuotaSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateUserQuotaSettingsParamsWithContext creates a new UpdateUserQuotaSettingsParams object -// with the ability to set a context for a request. -func NewUpdateUserQuotaSettingsParamsWithContext(ctx context.Context) *UpdateUserQuotaSettingsParams { - return &UpdateUserQuotaSettingsParams{ - Context: ctx, - } -} - -// NewUpdateUserQuotaSettingsParamsWithHTTPClient creates a new UpdateUserQuotaSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserQuotaSettingsParamsWithHTTPClient(client *http.Client) *UpdateUserQuotaSettingsParams { - return &UpdateUserQuotaSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateUserQuotaSettingsParams contains all the parameters to send to the API endpoint - - for the update user quota settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserQuotaSettingsParams struct { - - /* Body. - - update user quota metadata params. - */ - Body *models.UpdateUserQuotaSettingsForView - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user quota settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserQuotaSettingsParams) WithDefaults() *UpdateUserQuotaSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user quota settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserQuotaSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) WithTimeout(timeout time.Duration) *UpdateUserQuotaSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) WithContext(ctx context.Context) *UpdateUserQuotaSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) WithHTTPClient(client *http.Client) *UpdateUserQuotaSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) WithBody(body *models.UpdateUserQuotaSettingsForView) *UpdateUserQuotaSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update user quota settings params -func (o *UpdateUserQuotaSettingsParams) SetBody(body *models.UpdateUserQuotaSettingsForView) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserQuotaSettingsParams) 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/views/update_user_quota_settings_responses.go b/v1/client/views/update_user_quota_settings_responses.go deleted file mode 100644 index 0bf1df34..00000000 --- a/v1/client/views/update_user_quota_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateUserQuotaSettingsReader is a Reader for the UpdateUserQuotaSettings structure. -type UpdateUserQuotaSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserQuotaSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserQuotaSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserQuotaSettingsDefault(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 - } -} - -// NewUpdateUserQuotaSettingsOK creates a UpdateUserQuotaSettingsOK with default headers values -func NewUpdateUserQuotaSettingsOK() *UpdateUserQuotaSettingsOK { - return &UpdateUserQuotaSettingsOK{} -} - -/* -UpdateUserQuotaSettingsOK describes a response with status code 200, with default header values. - -The User Quota settings applied to a view. -*/ -type UpdateUserQuotaSettingsOK struct { - Payload *models.UserQuotaSettings -} - -// IsSuccess returns true when this update user quota settings o k response has a 2xx status code -func (o *UpdateUserQuotaSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user quota settings o k response has a 3xx status code -func (o *UpdateUserQuotaSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user quota settings o k response has a 4xx status code -func (o *UpdateUserQuotaSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user quota settings o k response has a 5xx status code -func (o *UpdateUserQuotaSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user quota settings o k response a status code equal to that given -func (o *UpdateUserQuotaSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user quota settings o k response -func (o *UpdateUserQuotaSettingsOK) Code() int { - return 200 -} - -func (o *UpdateUserQuotaSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotasSettings][%d] updateUserQuotaSettingsOK %s", 200, payload) -} - -func (o *UpdateUserQuotaSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotasSettings][%d] updateUserQuotaSettingsOK %s", 200, payload) -} - -func (o *UpdateUserQuotaSettingsOK) GetPayload() *models.UserQuotaSettings { - return o.Payload -} - -func (o *UpdateUserQuotaSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserQuotaSettings) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserQuotaSettingsDefault creates a UpdateUserQuotaSettingsDefault with default headers values -func NewUpdateUserQuotaSettingsDefault(code int) *UpdateUserQuotaSettingsDefault { - return &UpdateUserQuotaSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateUserQuotaSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserQuotaSettingsDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update user quota settings default response has a 2xx status code -func (o *UpdateUserQuotaSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user quota settings default response has a 3xx status code -func (o *UpdateUserQuotaSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user quota settings default response has a 4xx status code -func (o *UpdateUserQuotaSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user quota settings default response has a 5xx status code -func (o *UpdateUserQuotaSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user quota settings default response a status code equal to that given -func (o *UpdateUserQuotaSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user quota settings default response -func (o *UpdateUserQuotaSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserQuotaSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotasSettings][%d] UpdateUserQuotaSettings default %s", o._statusCode, payload) -} - -func (o *UpdateUserQuotaSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotasSettings][%d] UpdateUserQuotaSettings default %s", o._statusCode, payload) -} - -func (o *UpdateUserQuotaSettingsDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateUserQuotaSettingsDefault) 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/views/update_view_alias_parameters.go b/v1/client/views/update_view_alias_parameters.go deleted file mode 100644 index b4c5f40d..00000000 --- a/v1/client/views/update_view_alias_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewAliasParams creates a new UpdateViewAliasParams 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 NewUpdateViewAliasParams() *UpdateViewAliasParams { - return &UpdateViewAliasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewAliasParamsWithTimeout creates a new UpdateViewAliasParams object -// with the ability to set a timeout on a request. -func NewUpdateViewAliasParamsWithTimeout(timeout time.Duration) *UpdateViewAliasParams { - return &UpdateViewAliasParams{ - timeout: timeout, - } -} - -// NewUpdateViewAliasParamsWithContext creates a new UpdateViewAliasParams object -// with the ability to set a context for a request. -func NewUpdateViewAliasParamsWithContext(ctx context.Context) *UpdateViewAliasParams { - return &UpdateViewAliasParams{ - Context: ctx, - } -} - -// NewUpdateViewAliasParamsWithHTTPClient creates a new UpdateViewAliasParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewAliasParamsWithHTTPClient(client *http.Client) *UpdateViewAliasParams { - return &UpdateViewAliasParams{ - HTTPClient: client, - } -} - -/* -UpdateViewAliasParams contains all the parameters to send to the API endpoint - - for the update view alias operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewAliasParams struct { - - /* Body. - - Request to update a View. - */ - Body *models.UpdateViewAliasParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewAliasParams) WithDefaults() *UpdateViewAliasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view alias params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewAliasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view alias params -func (o *UpdateViewAliasParams) WithTimeout(timeout time.Duration) *UpdateViewAliasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view alias params -func (o *UpdateViewAliasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view alias params -func (o *UpdateViewAliasParams) WithContext(ctx context.Context) *UpdateViewAliasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view alias params -func (o *UpdateViewAliasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view alias params -func (o *UpdateViewAliasParams) WithHTTPClient(client *http.Client) *UpdateViewAliasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view alias params -func (o *UpdateViewAliasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view alias params -func (o *UpdateViewAliasParams) WithBody(body *models.UpdateViewAliasParam) *UpdateViewAliasParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view alias params -func (o *UpdateViewAliasParams) SetBody(body *models.UpdateViewAliasParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewAliasParams) 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/views/update_view_alias_responses.go b/v1/client/views/update_view_alias_responses.go deleted file mode 100644 index 3f11d68e..00000000 --- a/v1/client/views/update_view_alias_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewAliasReader is a Reader for the UpdateViewAlias structure. -type UpdateViewAliasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewAliasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpdateViewAliasCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewAliasDefault(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 - } -} - -// NewUpdateViewAliasCreated creates a UpdateViewAliasCreated with default headers values -func NewUpdateViewAliasCreated() *UpdateViewAliasCreated { - return &UpdateViewAliasCreated{} -} - -/* -UpdateViewAliasCreated describes a response with status code 201, with default header values. - -Success -*/ -type UpdateViewAliasCreated struct { - Payload *models.ViewAlias -} - -// IsSuccess returns true when this update view alias created response has a 2xx status code -func (o *UpdateViewAliasCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view alias created response has a 3xx status code -func (o *UpdateViewAliasCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view alias created response has a 4xx status code -func (o *UpdateViewAliasCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view alias created response has a 5xx status code -func (o *UpdateViewAliasCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this update view alias created response a status code equal to that given -func (o *UpdateViewAliasCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the update view alias created response -func (o *UpdateViewAliasCreated) Code() int { - return 201 -} - -func (o *UpdateViewAliasCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewAliases][%d] updateViewAliasCreated %s", 201, payload) -} - -func (o *UpdateViewAliasCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewAliases][%d] updateViewAliasCreated %s", 201, payload) -} - -func (o *UpdateViewAliasCreated) GetPayload() *models.ViewAlias { - return o.Payload -} - -func (o *UpdateViewAliasCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewAlias) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewAliasDefault creates a UpdateViewAliasDefault with default headers values -func NewUpdateViewAliasDefault(code int) *UpdateViewAliasDefault { - return &UpdateViewAliasDefault{ - _statusCode: code, - } -} - -/* -UpdateViewAliasDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewAliasDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view alias default response has a 2xx status code -func (o *UpdateViewAliasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view alias default response has a 3xx status code -func (o *UpdateViewAliasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view alias default response has a 4xx status code -func (o *UpdateViewAliasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view alias default response has a 5xx status code -func (o *UpdateViewAliasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view alias default response a status code equal to that given -func (o *UpdateViewAliasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view alias default response -func (o *UpdateViewAliasDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewAliasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewAliases][%d] UpdateViewAlias default %s", o._statusCode, payload) -} - -func (o *UpdateViewAliasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewAliases][%d] UpdateViewAlias default %s", o._statusCode, payload) -} - -func (o *UpdateViewAliasDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewAliasDefault) 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/views/update_view_by_name_parameters.go b/v1/client/views/update_view_by_name_parameters.go deleted file mode 100644 index 686dbfc1..00000000 --- a/v1/client/views/update_view_by_name_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewByNameParams creates a new UpdateViewByNameParams 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 NewUpdateViewByNameParams() *UpdateViewByNameParams { - return &UpdateViewByNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewByNameParamsWithTimeout creates a new UpdateViewByNameParams object -// with the ability to set a timeout on a request. -func NewUpdateViewByNameParamsWithTimeout(timeout time.Duration) *UpdateViewByNameParams { - return &UpdateViewByNameParams{ - timeout: timeout, - } -} - -// NewUpdateViewByNameParamsWithContext creates a new UpdateViewByNameParams object -// with the ability to set a context for a request. -func NewUpdateViewByNameParamsWithContext(ctx context.Context) *UpdateViewByNameParams { - return &UpdateViewByNameParams{ - Context: ctx, - } -} - -// NewUpdateViewByNameParamsWithHTTPClient creates a new UpdateViewByNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewByNameParamsWithHTTPClient(client *http.Client) *UpdateViewByNameParams { - return &UpdateViewByNameParams{ - HTTPClient: client, - } -} - -/* -UpdateViewByNameParams contains all the parameters to send to the API endpoint - - for the update view by name operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewByNameParams struct { - - /* Body. - - Request to update a view. - */ - Body *models.UpdateViewParam - - /* Name. - - Specifies the View name. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewByNameParams) WithDefaults() *UpdateViewByNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewByNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view by name params -func (o *UpdateViewByNameParams) WithTimeout(timeout time.Duration) *UpdateViewByNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view by name params -func (o *UpdateViewByNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view by name params -func (o *UpdateViewByNameParams) WithContext(ctx context.Context) *UpdateViewByNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view by name params -func (o *UpdateViewByNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view by name params -func (o *UpdateViewByNameParams) WithHTTPClient(client *http.Client) *UpdateViewByNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view by name params -func (o *UpdateViewByNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view by name params -func (o *UpdateViewByNameParams) WithBody(body *models.UpdateViewParam) *UpdateViewByNameParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view by name params -func (o *UpdateViewByNameParams) SetBody(body *models.UpdateViewParam) { - o.Body = body -} - -// WithName adds the name to the update view by name params -func (o *UpdateViewByNameParams) WithName(name string) *UpdateViewByNameParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update view by name params -func (o *UpdateViewByNameParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewByNameParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/views/update_view_by_name_responses.go b/v1/client/views/update_view_by_name_responses.go deleted file mode 100644 index 4c012fab..00000000 --- a/v1/client/views/update_view_by_name_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewByNameReader is a Reader for the UpdateViewByName structure. -type UpdateViewByNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewByNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewByNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewByNameDefault(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 - } -} - -// NewUpdateViewByNameOK creates a UpdateViewByNameOK with default headers values -func NewUpdateViewByNameOK() *UpdateViewByNameOK { - return &UpdateViewByNameOK{} -} - -/* -UpdateViewByNameOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewByNameOK struct { - Payload *models.View -} - -// IsSuccess returns true when this update view by name o k response has a 2xx status code -func (o *UpdateViewByNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view by name o k response has a 3xx status code -func (o *UpdateViewByNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view by name o k response has a 4xx status code -func (o *UpdateViewByNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view by name o k response has a 5xx status code -func (o *UpdateViewByNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view by name o k response a status code equal to that given -func (o *UpdateViewByNameOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view by name o k response -func (o *UpdateViewByNameOK) Code() int { - return 200 -} - -func (o *UpdateViewByNameOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views/{name}][%d] updateViewByNameOK %s", 200, payload) -} - -func (o *UpdateViewByNameOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views/{name}][%d] updateViewByNameOK %s", 200, payload) -} - -func (o *UpdateViewByNameOK) GetPayload() *models.View { - return o.Payload -} - -func (o *UpdateViewByNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewByNameDefault creates a UpdateViewByNameDefault with default headers values -func NewUpdateViewByNameDefault(code int) *UpdateViewByNameDefault { - return &UpdateViewByNameDefault{ - _statusCode: code, - } -} - -/* -UpdateViewByNameDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewByNameDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view by name default response has a 2xx status code -func (o *UpdateViewByNameDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view by name default response has a 3xx status code -func (o *UpdateViewByNameDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view by name default response has a 4xx status code -func (o *UpdateViewByNameDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view by name default response has a 5xx status code -func (o *UpdateViewByNameDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view by name default response a status code equal to that given -func (o *UpdateViewByNameDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view by name default response -func (o *UpdateViewByNameDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewByNameDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views/{name}][%d] UpdateViewByName default %s", o._statusCode, payload) -} - -func (o *UpdateViewByNameDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views/{name}][%d] UpdateViewByName default %s", o._statusCode, payload) -} - -func (o *UpdateViewByNameDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewByNameDefault) 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/views/update_view_dir_quota_parameters.go b/v1/client/views/update_view_dir_quota_parameters.go deleted file mode 100644 index 27b2ce0c..00000000 --- a/v1/client/views/update_view_dir_quota_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewDirQuotaParams creates a new UpdateViewDirQuotaParams 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 NewUpdateViewDirQuotaParams() *UpdateViewDirQuotaParams { - return &UpdateViewDirQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewDirQuotaParamsWithTimeout creates a new UpdateViewDirQuotaParams object -// with the ability to set a timeout on a request. -func NewUpdateViewDirQuotaParamsWithTimeout(timeout time.Duration) *UpdateViewDirQuotaParams { - return &UpdateViewDirQuotaParams{ - timeout: timeout, - } -} - -// NewUpdateViewDirQuotaParamsWithContext creates a new UpdateViewDirQuotaParams object -// with the ability to set a context for a request. -func NewUpdateViewDirQuotaParamsWithContext(ctx context.Context) *UpdateViewDirQuotaParams { - return &UpdateViewDirQuotaParams{ - Context: ctx, - } -} - -// NewUpdateViewDirQuotaParamsWithHTTPClient creates a new UpdateViewDirQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewDirQuotaParamsWithHTTPClient(client *http.Client) *UpdateViewDirQuotaParams { - return &UpdateViewDirQuotaParams{ - HTTPClient: client, - } -} - -/* -UpdateViewDirQuotaParams contains all the parameters to send to the API endpoint - - for the update view dir quota operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewDirQuotaParams struct { - - /* Body. - - Request to update view directory quota policy. - */ - Body *models.UpdateDirQuotaArgs - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view dir quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewDirQuotaParams) WithDefaults() *UpdateViewDirQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view dir quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewDirQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view dir quota params -func (o *UpdateViewDirQuotaParams) WithTimeout(timeout time.Duration) *UpdateViewDirQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view dir quota params -func (o *UpdateViewDirQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view dir quota params -func (o *UpdateViewDirQuotaParams) WithContext(ctx context.Context) *UpdateViewDirQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view dir quota params -func (o *UpdateViewDirQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view dir quota params -func (o *UpdateViewDirQuotaParams) WithHTTPClient(client *http.Client) *UpdateViewDirQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view dir quota params -func (o *UpdateViewDirQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view dir quota params -func (o *UpdateViewDirQuotaParams) WithBody(body *models.UpdateDirQuotaArgs) *UpdateViewDirQuotaParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view dir quota params -func (o *UpdateViewDirQuotaParams) SetBody(body *models.UpdateDirQuotaArgs) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewDirQuotaParams) 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/views/update_view_dir_quota_responses.go b/v1/client/views/update_view_dir_quota_responses.go deleted file mode 100644 index 8a67cb93..00000000 --- a/v1/client/views/update_view_dir_quota_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewDirQuotaReader is a Reader for the UpdateViewDirQuota structure. -type UpdateViewDirQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewDirQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewDirQuotaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewDirQuotaDefault(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 - } -} - -// NewUpdateViewDirQuotaOK creates a UpdateViewDirQuotaOK with default headers values -func NewUpdateViewDirQuotaOK() *UpdateViewDirQuotaOK { - return &UpdateViewDirQuotaOK{} -} - -/* -UpdateViewDirQuotaOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewDirQuotaOK struct { - Payload *models.DirQuotaInfo -} - -// IsSuccess returns true when this update view dir quota o k response has a 2xx status code -func (o *UpdateViewDirQuotaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view dir quota o k response has a 3xx status code -func (o *UpdateViewDirQuotaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view dir quota o k response has a 4xx status code -func (o *UpdateViewDirQuotaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view dir quota o k response has a 5xx status code -func (o *UpdateViewDirQuotaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view dir quota o k response a status code equal to that given -func (o *UpdateViewDirQuotaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view dir quota o k response -func (o *UpdateViewDirQuotaOK) Code() int { - return 200 -} - -func (o *UpdateViewDirQuotaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewDirectoryQuotas][%d] updateViewDirQuotaOK %s", 200, payload) -} - -func (o *UpdateViewDirQuotaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewDirectoryQuotas][%d] updateViewDirQuotaOK %s", 200, payload) -} - -func (o *UpdateViewDirQuotaOK) GetPayload() *models.DirQuotaInfo { - return o.Payload -} - -func (o *UpdateViewDirQuotaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DirQuotaInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewDirQuotaDefault creates a UpdateViewDirQuotaDefault with default headers values -func NewUpdateViewDirQuotaDefault(code int) *UpdateViewDirQuotaDefault { - return &UpdateViewDirQuotaDefault{ - _statusCode: code, - } -} - -/* -UpdateViewDirQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewDirQuotaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view dir quota default response has a 2xx status code -func (o *UpdateViewDirQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view dir quota default response has a 3xx status code -func (o *UpdateViewDirQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view dir quota default response has a 4xx status code -func (o *UpdateViewDirQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view dir quota default response has a 5xx status code -func (o *UpdateViewDirQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view dir quota default response a status code equal to that given -func (o *UpdateViewDirQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view dir quota default response -func (o *UpdateViewDirQuotaDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewDirQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewDirectoryQuotas][%d] UpdateViewDirQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewDirQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewDirectoryQuotas][%d] UpdateViewDirQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewDirQuotaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewDirQuotaDefault) 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/views/update_view_parameters.go b/v1/client/views/update_view_parameters.go deleted file mode 100644 index 8a3e27a7..00000000 --- a/v1/client/views/update_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewParams creates a new UpdateViewParams 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 NewUpdateViewParams() *UpdateViewParams { - return &UpdateViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewParamsWithTimeout creates a new UpdateViewParams object -// with the ability to set a timeout on a request. -func NewUpdateViewParamsWithTimeout(timeout time.Duration) *UpdateViewParams { - return &UpdateViewParams{ - timeout: timeout, - } -} - -// NewUpdateViewParamsWithContext creates a new UpdateViewParams object -// with the ability to set a context for a request. -func NewUpdateViewParamsWithContext(ctx context.Context) *UpdateViewParams { - return &UpdateViewParams{ - Context: ctx, - } -} - -// NewUpdateViewParamsWithHTTPClient creates a new UpdateViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewParamsWithHTTPClient(client *http.Client) *UpdateViewParams { - return &UpdateViewParams{ - HTTPClient: client, - } -} - -/* -UpdateViewParams contains all the parameters to send to the API endpoint - - for the update view operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewParams struct { - - /* Body. - - Request to update a view. - */ - Body *models.UpdateViewParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewParams) WithDefaults() *UpdateViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view params -func (o *UpdateViewParams) WithTimeout(timeout time.Duration) *UpdateViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view params -func (o *UpdateViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view params -func (o *UpdateViewParams) WithContext(ctx context.Context) *UpdateViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view params -func (o *UpdateViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view params -func (o *UpdateViewParams) WithHTTPClient(client *http.Client) *UpdateViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view params -func (o *UpdateViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view params -func (o *UpdateViewParams) WithBody(body *models.UpdateViewParam) *UpdateViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view params -func (o *UpdateViewParams) SetBody(body *models.UpdateViewParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewParams) 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/views/update_view_responses.go b/v1/client/views/update_view_responses.go deleted file mode 100644 index 03f37983..00000000 --- a/v1/client/views/update_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewReader is a Reader for the UpdateView structure. -type UpdateViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewDefault(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 - } -} - -// NewUpdateViewOK creates a UpdateViewOK with default headers values -func NewUpdateViewOK() *UpdateViewOK { - return &UpdateViewOK{} -} - -/* -UpdateViewOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewOK struct { - Payload *models.View -} - -// IsSuccess returns true when this update view o k response has a 2xx status code -func (o *UpdateViewOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view o k response has a 3xx status code -func (o *UpdateViewOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view o k response has a 4xx status code -func (o *UpdateViewOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view o k response has a 5xx status code -func (o *UpdateViewOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view o k response a status code equal to that given -func (o *UpdateViewOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view o k response -func (o *UpdateViewOK) Code() int { - return 200 -} - -func (o *UpdateViewOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views][%d] updateViewOK %s", 200, payload) -} - -func (o *UpdateViewOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views][%d] updateViewOK %s", 200, payload) -} - -func (o *UpdateViewOK) GetPayload() *models.View { - return o.Payload -} - -func (o *UpdateViewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewDefault creates a UpdateViewDefault with default headers values -func NewUpdateViewDefault(code int) *UpdateViewDefault { - return &UpdateViewDefault{ - _statusCode: code, - } -} - -/* -UpdateViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view default response has a 2xx status code -func (o *UpdateViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view default response has a 3xx status code -func (o *UpdateViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view default response has a 4xx status code -func (o *UpdateViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view default response has a 5xx status code -func (o *UpdateViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view default response a status code equal to that given -func (o *UpdateViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view default response -func (o *UpdateViewDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views][%d] UpdateView default %s", o._statusCode, payload) -} - -func (o *UpdateViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/views][%d] UpdateView default %s", o._statusCode, payload) -} - -func (o *UpdateViewDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewDefault) 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/views/update_view_user_quota_parameters.go b/v1/client/views/update_view_user_quota_parameters.go deleted file mode 100644 index 16d6ab13..00000000 --- a/v1/client/views/update_view_user_quota_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateViewUserQuotaParams creates a new UpdateViewUserQuotaParams 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 NewUpdateViewUserQuotaParams() *UpdateViewUserQuotaParams { - return &UpdateViewUserQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewUserQuotaParamsWithTimeout creates a new UpdateViewUserQuotaParams object -// with the ability to set a timeout on a request. -func NewUpdateViewUserQuotaParamsWithTimeout(timeout time.Duration) *UpdateViewUserQuotaParams { - return &UpdateViewUserQuotaParams{ - timeout: timeout, - } -} - -// NewUpdateViewUserQuotaParamsWithContext creates a new UpdateViewUserQuotaParams object -// with the ability to set a context for a request. -func NewUpdateViewUserQuotaParamsWithContext(ctx context.Context) *UpdateViewUserQuotaParams { - return &UpdateViewUserQuotaParams{ - Context: ctx, - } -} - -// NewUpdateViewUserQuotaParamsWithHTTPClient creates a new UpdateViewUserQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewUserQuotaParamsWithHTTPClient(client *http.Client) *UpdateViewUserQuotaParams { - return &UpdateViewUserQuotaParams{ - HTTPClient: client, - } -} - -/* -UpdateViewUserQuotaParams contains all the parameters to send to the API endpoint - - for the update view user quota operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewUserQuotaParams struct { - - /* Body. - - update user quota params. - */ - Body *models.ViewUserQuotaParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view user quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaParams) WithDefaults() *UpdateViewUserQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view user quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view user quota params -func (o *UpdateViewUserQuotaParams) WithTimeout(timeout time.Duration) *UpdateViewUserQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view user quota params -func (o *UpdateViewUserQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view user quota params -func (o *UpdateViewUserQuotaParams) WithContext(ctx context.Context) *UpdateViewUserQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view user quota params -func (o *UpdateViewUserQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view user quota params -func (o *UpdateViewUserQuotaParams) WithHTTPClient(client *http.Client) *UpdateViewUserQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view user quota params -func (o *UpdateViewUserQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view user quota params -func (o *UpdateViewUserQuotaParams) WithBody(body *models.ViewUserQuotaParameters) *UpdateViewUserQuotaParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view user quota params -func (o *UpdateViewUserQuotaParams) SetBody(body *models.ViewUserQuotaParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewUserQuotaParams) 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/views/update_view_user_quota_responses.go b/v1/client/views/update_view_user_quota_responses.go deleted file mode 100644 index 16a852ad..00000000 --- a/v1/client/views/update_view_user_quota_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateViewUserQuotaReader is a Reader for the UpdateViewUserQuota structure. -type UpdateViewUserQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewUserQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpdateViewUserQuotaCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewUserQuotaDefault(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 - } -} - -// NewUpdateViewUserQuotaCreated creates a UpdateViewUserQuotaCreated with default headers values -func NewUpdateViewUserQuotaCreated() *UpdateViewUserQuotaCreated { - return &UpdateViewUserQuotaCreated{} -} - -/* -UpdateViewUserQuotaCreated describes a response with status code 201, with default header values. - -Success -*/ -type UpdateViewUserQuotaCreated struct { - Payload *models.UserQuotaAndUsage -} - -// IsSuccess returns true when this update view user quota created response has a 2xx status code -func (o *UpdateViewUserQuotaCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view user quota created response has a 3xx status code -func (o *UpdateViewUserQuotaCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view user quota created response has a 4xx status code -func (o *UpdateViewUserQuotaCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view user quota created response has a 5xx status code -func (o *UpdateViewUserQuotaCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this update view user quota created response a status code equal to that given -func (o *UpdateViewUserQuotaCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the update view user quota created response -func (o *UpdateViewUserQuotaCreated) Code() int { - return 201 -} - -func (o *UpdateViewUserQuotaCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotas][%d] updateViewUserQuotaCreated %s", 201, payload) -} - -func (o *UpdateViewUserQuotaCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotas][%d] updateViewUserQuotaCreated %s", 201, payload) -} - -func (o *UpdateViewUserQuotaCreated) GetPayload() *models.UserQuotaAndUsage { - return o.Payload -} - -func (o *UpdateViewUserQuotaCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserQuotaAndUsage) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewUserQuotaDefault creates a UpdateViewUserQuotaDefault with default headers values -func NewUpdateViewUserQuotaDefault(code int) *UpdateViewUserQuotaDefault { - return &UpdateViewUserQuotaDefault{ - _statusCode: code, - } -} - -/* -UpdateViewUserQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewUserQuotaDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update view user quota default response has a 2xx status code -func (o *UpdateViewUserQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view user quota default response has a 3xx status code -func (o *UpdateViewUserQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view user quota default response has a 4xx status code -func (o *UpdateViewUserQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view user quota default response has a 5xx status code -func (o *UpdateViewUserQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view user quota default response a status code equal to that given -func (o *UpdateViewUserQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view user quota default response -func (o *UpdateViewUserQuotaDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewUserQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotas][%d] UpdateViewUserQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/viewUserQuotas][%d] UpdateViewUserQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateViewUserQuotaDefault) 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/views/views_client.go b/v1/client/views/views_client.go deleted file mode 100644 index bde89257..00000000 --- a/v1/client/views/views_client.go +++ /dev/null @@ -1,1507 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package views - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new views API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new views API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new views API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for views API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ActivateViewAliases(params *ActivateViewAliasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivateViewAliasesOK, error) - - ClearNlmLocks(params *ClearNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearNlmLocksNoContent, error) - - CloneDirectory(params *CloneDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneDirectoryCreated, error) - - CloneView(params *CloneViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewCreated, error) - - CreateView(params *CreateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewCreated, error) - - CreateViewAlias(params *CreateViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewAliasCreated, error) - - CreateViewUserQuota(params *CreateViewUserQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewUserQuotaOK, error) - - DeleteView(params *DeleteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewNoContent, error) - - DeleteViewAlias(params *DeleteViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewAliasNoContent, error) - - DeleteViewByID(params *DeleteViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewByIDNoContent, error) - - DeleteViewUsersQuota(params *DeleteViewUsersQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewUsersQuotaNoContent, error) - - GetFileLockStatus(params *GetFileLockStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusOK, error) - - GetFileLockStatusByID(params *GetFileLockStatusByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusByIDOK, error) - - GetNfsConnections(params *GetNfsConnectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNfsConnectionsOK, error) - - GetQoSPolicies(params *GetQoSPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetQoSPoliciesOK, error) - - GetSmbConnections(params *GetSmbConnectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSmbConnectionsOK, error) - - GetViewByID(params *GetViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByIDOK, error) - - GetViewByName(params *GetViewByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByNameOK, error) - - GetViewDirQuotaInfo(params *GetViewDirQuotaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewDirQuotaInfoOK, error) - - GetViewUserQuotas(params *GetViewUserQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewUserQuotasOK, error) - - GetViews(params *GetViewsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsOK, error) - - GetViewsByShareName(params *GetViewsByShareNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsByShareNameOK, error) - - ListNlmLocks(params *ListNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListNlmLocksOK, error) - - LockFile(params *LockFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileOK, error) - - LockFileByID(params *LockFileByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileByIDOK, error) - - OverwriteView(params *OverwriteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverwriteViewOK, error) - - RenameView(params *RenameViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RenameViewOK, error) - - RenameViewByID(params *RenameViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RenameViewByIDOK, error) - - UpdateUserQuotaSettings(params *UpdateUserQuotaSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserQuotaSettingsOK, error) - - UpdateView(params *UpdateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewOK, error) - - UpdateViewAlias(params *UpdateViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewAliasCreated, error) - - UpdateViewByName(params *UpdateViewByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewByNameOK, error) - - UpdateViewDirQuota(params *UpdateViewDirQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewDirQuotaOK, error) - - UpdateViewUserQuota(params *UpdateViewUserQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ActivateViewAliases activates the view aliases of a view from it s source view - -Returns error if op fails. -*/ -func (a *Client) ActivateViewAliases(params *ActivateViewAliasesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivateViewAliasesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewActivateViewAliasesParams() - } - op := &runtime.ClientOperation{ - ID: "ActivateViewAliases", - Method: "POST", - PathPattern: "/public/viewAliases/{name}/activate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ActivateViewAliasesReader{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.(*ActivateViewAliasesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ActivateViewAliasesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ClearNlmLocks clears n l m locks that match the filter criteria specified using parameters - -Returns nothing upon success. -*/ -func (a *Client) ClearNlmLocks(params *ClearNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearNlmLocksNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewClearNlmLocksParams() - } - op := &runtime.ClientOperation{ - ID: "ClearNlmLocks", - Method: "DELETE", - PathPattern: "/public/nlmLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ClearNlmLocksReader{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.(*ClearNlmLocksNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ClearNlmLocksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloneDirectory clones a directory of a view - -Returns error if op fails. -*/ -func (a *Client) CloneDirectory(params *CloneDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneDirectoryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "CloneDirectory", - Method: "POST", - PathPattern: "/public/views/cloneDirectory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneDirectoryReader{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.(*CloneDirectoryCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloneView clones a view - -Returns the cloned View. -*/ -func (a *Client) CloneView(params *CloneViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneViewParams() - } - op := &runtime.ClientOperation{ - ID: "CloneView", - Method: "POST", - PathPattern: "/public/views/clone", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneViewReader{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.(*CloneViewCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateView creates a view - -Returns the created View. -*/ -func (a *Client) CreateView(params *CreateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewParams() - } - op := &runtime.ClientOperation{ - ID: "CreateView", - Method: "POST", - PathPattern: "/public/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewReader{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.(*CreateViewCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateViewAlias creates a view alias a view alias allows a directory inside the view to be mounted without specifying the entire path - -Returns the created View Alias. -*/ -func (a *Client) CreateViewAlias(params *CreateViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewAliasCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewAliasParams() - } - op := &runtime.ClientOperation{ - ID: "CreateViewAlias", - Method: "POST", - PathPattern: "/public/viewAliases", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewAliasReader{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.(*CreateViewAliasCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewAliasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateViewUserQuota creates a new quota policy for a user in a view - -Returns error if op fails. -*/ -func (a *Client) CreateViewUserQuota(params *CreateViewUserQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewUserQuotaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewUserQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "CreateViewUserQuota", - Method: "POST", - PathPattern: "/public/viewUserQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewUserQuotaReader{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.(*CreateViewUserQuotaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewUserQuotaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteView deletes a view - -Returns delete status upon completion. -*/ -func (a *Client) DeleteView(params *DeleteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteView", - Method: "DELETE", - PathPattern: "/public/views/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewReader{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.(*DeleteViewNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewAlias deletes a view alias - -Returns delete status upon completion. -*/ -func (a *Client) DeleteViewAlias(params *DeleteViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewAliasNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewAliasParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewAlias", - Method: "DELETE", - PathPattern: "/public/viewAliases/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewAliasReader{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.(*DeleteViewAliasNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewAliasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewByID deletes a view - -Returns delete status upon completion. -*/ -func (a *Client) DeleteViewByID(params *DeleteViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewByIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewById", - Method: "DELETE", - PathPattern: "/public/views/id/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewByIDReader{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.(*DeleteViewByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewUsersQuota deletes the quota policy overrides for users in a view - -Returns error if op fails. -*/ -func (a *Client) DeleteViewUsersQuota(params *DeleteViewUsersQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewUsersQuotaNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewUsersQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewUsersQuota", - Method: "DELETE", - PathPattern: "/public/viewUserQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewUsersQuotaReader{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.(*DeleteViewUsersQuotaNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewUsersQuotaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileLockStatus fetches the lock status of a file in a view - -Returns error if op fails. -*/ -func (a *Client) GetFileLockStatus(params *GetFileLockStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileLockStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileLockStatus", - Method: "GET", - PathPattern: "/public/views/{name}/fileLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileLockStatusReader{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.(*GetFileLockStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileLockStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileLockStatusByID fetches the lock status of a file in a view - -Returns error if op fails. -*/ -func (a *Client) GetFileLockStatusByID(params *GetFileLockStatusByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileLockStatusByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileLockStatusById", - Method: "GET", - PathPattern: "/public/views/id/{id}/fileLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileLockStatusByIDReader{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.(*GetFileLockStatusByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileLockStatusByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNfsConnections fetches nfs connection status of a view - -Returns error if op fails. -*/ -func (a *Client) GetNfsConnections(params *GetNfsConnectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNfsConnectionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNfsConnectionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNfsConnections", - Method: "GET", - PathPattern: "/public/nfsConnections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNfsConnectionsReader{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.(*GetNfsConnectionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNfsConnectionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetQoSPolicies fetches qo s policies of a view - -Returns error if op fails. -*/ -func (a *Client) GetQoSPolicies(params *GetQoSPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetQoSPoliciesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetQoSPoliciesParams() - } - op := &runtime.ClientOperation{ - ID: "GetQoSPolicies", - Method: "GET", - PathPattern: "/public/qosPolicies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetQoSPoliciesReader{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.(*GetQoSPoliciesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetQoSPoliciesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSmbConnections fetches smb connection status of a view - -Returns error if op fails. -*/ -func (a *Client) GetSmbConnections(params *GetSmbConnectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSmbConnectionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSmbConnectionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSmbConnections", - Method: "GET", - PathPattern: "/public/smbConnections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSmbConnectionsReader{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.(*GetSmbConnectionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSmbConnectionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewByID lists details about a single view - -Returns the View corresponding to the specified View id. -*/ -func (a *Client) GetViewByID(params *GetViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewById", - Method: "GET", - PathPattern: "/public/views/id/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewByIDReader{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.(*GetViewByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewByName lists details about a single view - -Returns the View corresponding to the specified View name. -*/ -func (a *Client) GetViewByName(params *GetViewByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewByNameParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewByName", - Method: "GET", - PathPattern: "/public/views/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewByNameReader{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.(*GetViewByNameOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewByNameDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewDirQuotaInfo gets directory quota info for a view returns error if op fails -*/ -func (a *Client) GetViewDirQuotaInfo(params *GetViewDirQuotaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewDirQuotaInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewDirQuotaInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewDirQuotaInfo", - Method: "GET", - PathPattern: "/public/viewDirectoryQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewDirQuotaInfoReader{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.(*GetViewDirQuotaInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewDirQuotaInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewUserQuotas gets the quota policies usage and summary for a view for all its users it can also fetch the quota policies usage and summary for a user in all his views - -Returns error if op fails. -*/ -func (a *Client) GetViewUserQuotas(params *GetViewUserQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewUserQuotasOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewUserQuotasParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewUserQuotas", - Method: "GET", - PathPattern: "/public/viewUserQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewUserQuotasReader{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.(*GetViewUserQuotasOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewUserQuotasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetViews lists views filtered by some parameters - - If no parameters are specified, all Views on the Cohesity Cluster are returned. - -Specifying parameters filters the results that are returned. -NOTE: If maxCount is set and the number of Views returned exceeds the maxCount, -there are more Views to return. -To get the next set of Views, send another request and specify the id of the -last View returned in viewList from the previous response. -*/ -func (a *Client) GetViews(params *GetViewsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViews", - Method: "GET", - PathPattern: "/public/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewsReader{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.(*GetViewsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetViewsByShareName lists shares filtered by name - - If no parameters are specified, all shares on the Cohesity Cluster are - -returned. Specifying share name/prefix filters the results that are returned. -NOTE: If maxCount is set and the number of Views returned exceeds the maxCount, -there are more Views to return. -To get the next set of Views, send another request and specify the pagination -cookie from the previous response. -*/ -func (a *Client) GetViewsByShareName(params *GetViewsByShareNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsByShareNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewsByShareNameParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewsByShareName", - Method: "GET", - PathPattern: "/public/shares", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewsByShareNameReader{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.(*GetViewsByShareNameOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewsByShareNameDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ListNlmLocks lists the n l m locks that match the filter criteria specified using parameters - - If no parameters are specified, all NLM locks currently on the Cohesity Cluster - -are returned. Specifying parameters filters the results that are returned. -*/ -func (a *Client) ListNlmLocks(params *ListNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListNlmLocksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListNlmLocksParams() - } - op := &runtime.ClientOperation{ - ID: "ListNlmLocks", - Method: "GET", - PathPattern: "/public/nlmLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListNlmLocksReader{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.(*ListNlmLocksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListNlmLocksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LockFile locks a file in a view and optionally update its expiry timestamp - -Returns error if op fails. -*/ -func (a *Client) LockFile(params *LockFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLockFileParams() - } - op := &runtime.ClientOperation{ - ID: "LockFile", - Method: "POST", - PathPattern: "/public/views/{name}/fileLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LockFileReader{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.(*LockFileOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LockFileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LockFileByID locks a file in a view and optionally update its expiry timestamp - -Returns error if op fails. -*/ -func (a *Client) LockFileByID(params *LockFileByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLockFileByIDParams() - } - op := &runtime.ClientOperation{ - ID: "LockFileById", - Method: "POST", - PathPattern: "/public/views/id/{id}/fileLocks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LockFileByIDReader{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.(*LockFileByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LockFileByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - OverwriteView overwrites a target view with contents of a source view - - Specifies source and target view names as params. - -Returns the modified Target View. -*/ -func (a *Client) OverwriteView(params *OverwriteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverwriteViewOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewOverwriteViewParams() - } - op := &runtime.ClientOperation{ - ID: "OverwriteView", - Method: "POST", - PathPattern: "/public/views/overwrite", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &OverwriteViewReader{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.(*OverwriteViewOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*OverwriteViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RenameView renames a view - - Specify original name of the View in the 'name' parameter. - -Returns the renamed View. -*/ -func (a *Client) RenameView(params *RenameViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RenameViewOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRenameViewParams() - } - op := &runtime.ClientOperation{ - ID: "RenameView", - Method: "POST", - PathPattern: "/public/views/rename/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RenameViewReader{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.(*RenameViewOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RenameViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - RenameViewByID renames a view - - Specify unique id of the View in the 'id' parameter. - -Returns the renamed View. -*/ -func (a *Client) RenameViewByID(params *RenameViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RenameViewByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRenameViewByIDParams() - } - op := &runtime.ClientOperation{ - ID: "RenameViewById", - Method: "POST", - PathPattern: "/public/views/rename/id/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RenameViewByIDReader{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.(*RenameViewByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RenameViewByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUserQuotaSettings updates the user quota settings in a view - -Returns error if op fails. -*/ -func (a *Client) UpdateUserQuotaSettings(params *UpdateUserQuotaSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserQuotaSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserQuotaSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUserQuotaSettings", - Method: "PUT", - PathPattern: "/public/viewUserQuotasSettings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserQuotaSettingsReader{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.(*UpdateUserQuotaSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserQuotaSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateView updates a view - -Returns the updated View. -*/ -func (a *Client) UpdateView(params *UpdateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateView", - Method: "PUT", - PathPattern: "/public/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewReader{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.(*UpdateViewOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewAlias updates a view alias a view alias allows a directory inside the view to be mounted without specifying the entire path - -Returns the updated View Alias. -*/ -func (a *Client) UpdateViewAlias(params *UpdateViewAliasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewAliasCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewAliasParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewAlias", - Method: "PUT", - PathPattern: "/public/viewAliases", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewAliasReader{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.(*UpdateViewAliasCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewAliasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewByName updates a view - -Returns the updated View. -*/ -func (a *Client) UpdateViewByName(params *UpdateViewByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewByNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewByNameParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewByName", - Method: "PUT", - PathPattern: "/public/views/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewByNameReader{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.(*UpdateViewByNameOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewByNameDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewDirQuota updates a directory quota policy for a view returns error if op fails -*/ -func (a *Client) UpdateViewDirQuota(params *UpdateViewDirQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewDirQuotaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewDirQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewDirQuota", - Method: "PUT", - PathPattern: "/public/viewDirectoryQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewDirQuotaReader{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.(*UpdateViewDirQuotaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewDirQuotaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewUserQuota updates a new quota policy for a user in a view - -Returns error if op fails. -*/ -func (a *Client) UpdateViewUserQuota(params *UpdateViewUserQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewUserQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewUserQuota", - Method: "PUT", - PathPattern: "/public/viewUserQuotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewUserQuotaReader{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.(*UpdateViewUserQuotaCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewUserQuotaDefault) - 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/vlan/create_bifrost_vlan_parameters.go b/v1/client/vlan/create_bifrost_vlan_parameters.go deleted file mode 100644 index 65559a9d..00000000 --- a/v1/client/vlan/create_bifrost_vlan_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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" -) - -// NewCreateBifrostVlanParams creates a new CreateBifrostVlanParams 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 NewCreateBifrostVlanParams() *CreateBifrostVlanParams { - return &CreateBifrostVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateBifrostVlanParamsWithTimeout creates a new CreateBifrostVlanParams object -// with the ability to set a timeout on a request. -func NewCreateBifrostVlanParamsWithTimeout(timeout time.Duration) *CreateBifrostVlanParams { - return &CreateBifrostVlanParams{ - timeout: timeout, - } -} - -// NewCreateBifrostVlanParamsWithContext creates a new CreateBifrostVlanParams object -// with the ability to set a context for a request. -func NewCreateBifrostVlanParamsWithContext(ctx context.Context) *CreateBifrostVlanParams { - return &CreateBifrostVlanParams{ - Context: ctx, - } -} - -// NewCreateBifrostVlanParamsWithHTTPClient creates a new CreateBifrostVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateBifrostVlanParamsWithHTTPClient(client *http.Client) *CreateBifrostVlanParams { - return &CreateBifrostVlanParams{ - HTTPClient: client, - } -} - -/* -CreateBifrostVlanParams contains all the parameters to send to the API endpoint - - for the create bifrost vlan operation. - - Typically these are written to a http.Request. -*/ -type CreateBifrostVlanParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create bifrost vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBifrostVlanParams) WithDefaults() *CreateBifrostVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create bifrost vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateBifrostVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create bifrost vlan params -func (o *CreateBifrostVlanParams) WithTimeout(timeout time.Duration) *CreateBifrostVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create bifrost vlan params -func (o *CreateBifrostVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create bifrost vlan params -func (o *CreateBifrostVlanParams) WithContext(ctx context.Context) *CreateBifrostVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create bifrost vlan params -func (o *CreateBifrostVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create bifrost vlan params -func (o *CreateBifrostVlanParams) WithHTTPClient(client *http.Client) *CreateBifrostVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create bifrost vlan params -func (o *CreateBifrostVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateBifrostVlanParams) 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/vlan/create_bifrost_vlan_responses.go b/v1/client/vlan/create_bifrost_vlan_responses.go deleted file mode 100644 index d72be2b6..00000000 --- a/v1/client/vlan/create_bifrost_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateBifrostVlanReader is a Reader for the CreateBifrostVlan structure. -type CreateBifrostVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateBifrostVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateBifrostVlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateBifrostVlanDefault(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 - } -} - -// NewCreateBifrostVlanOK creates a CreateBifrostVlanOK with default headers values -func NewCreateBifrostVlanOK() *CreateBifrostVlanOK { - return &CreateBifrostVlanOK{} -} - -/* -CreateBifrostVlanOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateBifrostVlanOK struct { - Payload *models.BifrostConfig -} - -// IsSuccess returns true when this create bifrost vlan o k response has a 2xx status code -func (o *CreateBifrostVlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create bifrost vlan o k response has a 3xx status code -func (o *CreateBifrostVlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create bifrost vlan o k response has a 4xx status code -func (o *CreateBifrostVlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create bifrost vlan o k response has a 5xx status code -func (o *CreateBifrostVlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create bifrost vlan o k response a status code equal to that given -func (o *CreateBifrostVlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create bifrost vlan o k response -func (o *CreateBifrostVlanOK) Code() int { - return 200 -} - -func (o *CreateBifrostVlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/bifrost/vlans][%d] createBifrostVlanOK %s", 200, payload) -} - -func (o *CreateBifrostVlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/bifrost/vlans][%d] createBifrostVlanOK %s", 200, payload) -} - -func (o *CreateBifrostVlanOK) GetPayload() *models.BifrostConfig { - return o.Payload -} - -func (o *CreateBifrostVlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BifrostConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateBifrostVlanDefault creates a CreateBifrostVlanDefault with default headers values -func NewCreateBifrostVlanDefault(code int) *CreateBifrostVlanDefault { - return &CreateBifrostVlanDefault{ - _statusCode: code, - } -} - -/* -CreateBifrostVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateBifrostVlanDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create bifrost vlan default response has a 2xx status code -func (o *CreateBifrostVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create bifrost vlan default response has a 3xx status code -func (o *CreateBifrostVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create bifrost vlan default response has a 4xx status code -func (o *CreateBifrostVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create bifrost vlan default response has a 5xx status code -func (o *CreateBifrostVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create bifrost vlan default response a status code equal to that given -func (o *CreateBifrostVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create bifrost vlan default response -func (o *CreateBifrostVlanDefault) Code() int { - return o._statusCode -} - -func (o *CreateBifrostVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/bifrost/vlans][%d] CreateBifrostVlan default %s", o._statusCode, payload) -} - -func (o *CreateBifrostVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/bifrost/vlans][%d] CreateBifrostVlan default %s", o._statusCode, payload) -} - -func (o *CreateBifrostVlanDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateBifrostVlanDefault) 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/vlan/create_vlan_parameters.go b/v1/client/vlan/create_vlan_parameters.go deleted file mode 100644 index 16296de1..00000000 --- a/v1/client/vlan/create_vlan_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewCreateVlanParams creates a new CreateVlanParams 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 NewCreateVlanParams() *CreateVlanParams { - return &CreateVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVlanParamsWithTimeout creates a new CreateVlanParams object -// with the ability to set a timeout on a request. -func NewCreateVlanParamsWithTimeout(timeout time.Duration) *CreateVlanParams { - return &CreateVlanParams{ - timeout: timeout, - } -} - -// NewCreateVlanParamsWithContext creates a new CreateVlanParams object -// with the ability to set a context for a request. -func NewCreateVlanParamsWithContext(ctx context.Context) *CreateVlanParams { - return &CreateVlanParams{ - Context: ctx, - } -} - -// NewCreateVlanParamsWithHTTPClient creates a new CreateVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateVlanParamsWithHTTPClient(client *http.Client) *CreateVlanParams { - return &CreateVlanParams{ - HTTPClient: client, - } -} - -/* -CreateVlanParams contains all the parameters to send to the API endpoint - - for the create vlan operation. - - Typically these are written to a http.Request. -*/ -type CreateVlanParams struct { - - // Body. - Body *models.Vlan - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVlanParams) WithDefaults() *CreateVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create vlan params -func (o *CreateVlanParams) WithTimeout(timeout time.Duration) *CreateVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create vlan params -func (o *CreateVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create vlan params -func (o *CreateVlanParams) WithContext(ctx context.Context) *CreateVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create vlan params -func (o *CreateVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create vlan params -func (o *CreateVlanParams) WithHTTPClient(client *http.Client) *CreateVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create vlan params -func (o *CreateVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create vlan params -func (o *CreateVlanParams) WithBody(body *models.Vlan) *CreateVlanParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create vlan params -func (o *CreateVlanParams) SetBody(body *models.Vlan) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVlanParams) 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/vlan/create_vlan_responses.go b/v1/client/vlan/create_vlan_responses.go deleted file mode 100644 index 71c99f5d..00000000 --- a/v1/client/vlan/create_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// CreateVlanReader is a Reader for the CreateVlan structure. -type CreateVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateVlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateVlanDefault(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 - } -} - -// NewCreateVlanOK creates a CreateVlanOK with default headers values -func NewCreateVlanOK() *CreateVlanOK { - return &CreateVlanOK{} -} - -/* -CreateVlanOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateVlanOK struct { - Payload *models.Vlan -} - -// IsSuccess returns true when this create vlan o k response has a 2xx status code -func (o *CreateVlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create vlan o k response has a 3xx status code -func (o *CreateVlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create vlan o k response has a 4xx status code -func (o *CreateVlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create vlan o k response has a 5xx status code -func (o *CreateVlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create vlan o k response a status code equal to that given -func (o *CreateVlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create vlan o k response -func (o *CreateVlanOK) Code() int { - return 200 -} - -func (o *CreateVlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vlans][%d] createVlanOK %s", 200, payload) -} - -func (o *CreateVlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vlans][%d] createVlanOK %s", 200, payload) -} - -func (o *CreateVlanOK) GetPayload() *models.Vlan { - return o.Payload -} - -func (o *CreateVlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vlan) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVlanDefault creates a CreateVlanDefault with default headers values -func NewCreateVlanDefault(code int) *CreateVlanDefault { - return &CreateVlanDefault{ - _statusCode: code, - } -} - -/* -CreateVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateVlanDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create vlan default response has a 2xx status code -func (o *CreateVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create vlan default response has a 3xx status code -func (o *CreateVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create vlan default response has a 4xx status code -func (o *CreateVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create vlan default response has a 5xx status code -func (o *CreateVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create vlan default response a status code equal to that given -func (o *CreateVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create vlan default response -func (o *CreateVlanDefault) Code() int { - return o._statusCode -} - -func (o *CreateVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vlans][%d] CreateVlan default %s", o._statusCode, payload) -} - -func (o *CreateVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/vlans][%d] CreateVlan default %s", o._statusCode, payload) -} - -func (o *CreateVlanDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateVlanDefault) 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/vlan/get_bifrost_tenant_vlans_parameters.go b/v1/client/vlan/get_bifrost_tenant_vlans_parameters.go deleted file mode 100644 index 8903fa61..00000000 --- a/v1/client/vlan/get_bifrost_tenant_vlans_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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" -) - -// NewGetBifrostTenantVlansParams creates a new GetBifrostTenantVlansParams 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 NewGetBifrostTenantVlansParams() *GetBifrostTenantVlansParams { - return &GetBifrostTenantVlansParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBifrostTenantVlansParamsWithTimeout creates a new GetBifrostTenantVlansParams object -// with the ability to set a timeout on a request. -func NewGetBifrostTenantVlansParamsWithTimeout(timeout time.Duration) *GetBifrostTenantVlansParams { - return &GetBifrostTenantVlansParams{ - timeout: timeout, - } -} - -// NewGetBifrostTenantVlansParamsWithContext creates a new GetBifrostTenantVlansParams object -// with the ability to set a context for a request. -func NewGetBifrostTenantVlansParamsWithContext(ctx context.Context) *GetBifrostTenantVlansParams { - return &GetBifrostTenantVlansParams{ - Context: ctx, - } -} - -// NewGetBifrostTenantVlansParamsWithHTTPClient creates a new GetBifrostTenantVlansParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBifrostTenantVlansParamsWithHTTPClient(client *http.Client) *GetBifrostTenantVlansParams { - return &GetBifrostTenantVlansParams{ - HTTPClient: client, - } -} - -/* -GetBifrostTenantVlansParams contains all the parameters to send to the API endpoint - - for the get bifrost tenant vlans operation. - - Typically these are written to a http.Request. -*/ -type GetBifrostTenantVlansParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get bifrost tenant vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBifrostTenantVlansParams) WithDefaults() *GetBifrostTenantVlansParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get bifrost tenant vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBifrostTenantVlansParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) WithTimeout(timeout time.Duration) *GetBifrostTenantVlansParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) WithContext(ctx context.Context) *GetBifrostTenantVlansParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) WithHTTPClient(client *http.Client) *GetBifrostTenantVlansParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get bifrost tenant vlans params -func (o *GetBifrostTenantVlansParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBifrostTenantVlansParams) 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/vlan/get_bifrost_tenant_vlans_responses.go b/v1/client/vlan/get_bifrost_tenant_vlans_responses.go deleted file mode 100644 index de094511..00000000 --- a/v1/client/vlan/get_bifrost_tenant_vlans_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetBifrostTenantVlansReader is a Reader for the GetBifrostTenantVlans structure. -type GetBifrostTenantVlansReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBifrostTenantVlansReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBifrostTenantVlansOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBifrostTenantVlansDefault(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 - } -} - -// NewGetBifrostTenantVlansOK creates a GetBifrostTenantVlansOK with default headers values -func NewGetBifrostTenantVlansOK() *GetBifrostTenantVlansOK { - return &GetBifrostTenantVlansOK{} -} - -/* -GetBifrostTenantVlansOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBifrostTenantVlansOK struct { - Payload []*models.BifrostConfig -} - -// IsSuccess returns true when this get bifrost tenant vlans o k response has a 2xx status code -func (o *GetBifrostTenantVlansOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get bifrost tenant vlans o k response has a 3xx status code -func (o *GetBifrostTenantVlansOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bifrost tenant vlans o k response has a 4xx status code -func (o *GetBifrostTenantVlansOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bifrost tenant vlans o k response has a 5xx status code -func (o *GetBifrostTenantVlansOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get bifrost tenant vlans o k response a status code equal to that given -func (o *GetBifrostTenantVlansOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get bifrost tenant vlans o k response -func (o *GetBifrostTenantVlansOK) Code() int { - return 200 -} - -func (o *GetBifrostTenantVlansOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/bifrost/vlans][%d] getBifrostTenantVlansOK %s", 200, payload) -} - -func (o *GetBifrostTenantVlansOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/bifrost/vlans][%d] getBifrostTenantVlansOK %s", 200, payload) -} - -func (o *GetBifrostTenantVlansOK) GetPayload() []*models.BifrostConfig { - return o.Payload -} - -func (o *GetBifrostTenantVlansOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBifrostTenantVlansDefault creates a GetBifrostTenantVlansDefault with default headers values -func NewGetBifrostTenantVlansDefault(code int) *GetBifrostTenantVlansDefault { - return &GetBifrostTenantVlansDefault{ - _statusCode: code, - } -} - -/* -GetBifrostTenantVlansDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBifrostTenantVlansDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get bifrost tenant vlans default response has a 2xx status code -func (o *GetBifrostTenantVlansDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get bifrost tenant vlans default response has a 3xx status code -func (o *GetBifrostTenantVlansDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get bifrost tenant vlans default response has a 4xx status code -func (o *GetBifrostTenantVlansDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get bifrost tenant vlans default response has a 5xx status code -func (o *GetBifrostTenantVlansDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get bifrost tenant vlans default response a status code equal to that given -func (o *GetBifrostTenantVlansDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get bifrost tenant vlans default response -func (o *GetBifrostTenantVlansDefault) Code() int { - return o._statusCode -} - -func (o *GetBifrostTenantVlansDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/bifrost/vlans][%d] GetBifrostTenantVlans default %s", o._statusCode, payload) -} - -func (o *GetBifrostTenantVlansDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/bifrost/vlans][%d] GetBifrostTenantVlans default %s", o._statusCode, payload) -} - -func (o *GetBifrostTenantVlansDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetBifrostTenantVlansDefault) 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/vlan/get_vlan_by_id_parameters.go b/v1/client/vlan/get_vlan_by_id_parameters.go deleted file mode 100644 index edc619a3..00000000 --- a/v1/client/vlan/get_vlan_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/go-openapi/swag" -) - -// NewGetVlanByIDParams creates a new GetVlanByIDParams 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 NewGetVlanByIDParams() *GetVlanByIDParams { - return &GetVlanByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVlanByIDParamsWithTimeout creates a new GetVlanByIDParams object -// with the ability to set a timeout on a request. -func NewGetVlanByIDParamsWithTimeout(timeout time.Duration) *GetVlanByIDParams { - return &GetVlanByIDParams{ - timeout: timeout, - } -} - -// NewGetVlanByIDParamsWithContext creates a new GetVlanByIDParams object -// with the ability to set a context for a request. -func NewGetVlanByIDParamsWithContext(ctx context.Context) *GetVlanByIDParams { - return &GetVlanByIDParams{ - Context: ctx, - } -} - -// NewGetVlanByIDParamsWithHTTPClient creates a new GetVlanByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVlanByIDParamsWithHTTPClient(client *http.Client) *GetVlanByIDParams { - return &GetVlanByIDParams{ - HTTPClient: client, - } -} - -/* -GetVlanByIDParams contains all the parameters to send to the API endpoint - - for the get vlan by Id operation. - - Typically these are written to a http.Request. -*/ -type GetVlanByIDParams struct { - - /* ID. - - Specifies the id of the VLAN. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vlan by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVlanByIDParams) WithDefaults() *GetVlanByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vlan by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVlanByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vlan by Id params -func (o *GetVlanByIDParams) WithTimeout(timeout time.Duration) *GetVlanByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vlan by Id params -func (o *GetVlanByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vlan by Id params -func (o *GetVlanByIDParams) WithContext(ctx context.Context) *GetVlanByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vlan by Id params -func (o *GetVlanByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vlan by Id params -func (o *GetVlanByIDParams) WithHTTPClient(client *http.Client) *GetVlanByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vlan by Id params -func (o *GetVlanByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get vlan by Id params -func (o *GetVlanByIDParams) WithID(id int32) *GetVlanByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get vlan by Id params -func (o *GetVlanByIDParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVlanByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vlan/get_vlan_by_id_responses.go b/v1/client/vlan/get_vlan_by_id_responses.go deleted file mode 100644 index b911fbb9..00000000 --- a/v1/client/vlan/get_vlan_by_id_responses.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVlanByIDReader is a Reader for the GetVlanByID structure. -type GetVlanByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVlanByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVlanByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetVlanByIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewGetVlanByIDDefault(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 - } -} - -// NewGetVlanByIDOK creates a GetVlanByIDOK with default headers values -func NewGetVlanByIDOK() *GetVlanByIDOK { - return &GetVlanByIDOK{} -} - -/* -GetVlanByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVlanByIDOK struct { - Payload *models.Vlan -} - -// IsSuccess returns true when this get vlan by Id o k response has a 2xx status code -func (o *GetVlanByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vlan by Id o k response has a 3xx status code -func (o *GetVlanByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vlan by Id o k response has a 4xx status code -func (o *GetVlanByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vlan by Id o k response has a 5xx status code -func (o *GetVlanByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vlan by Id o k response a status code equal to that given -func (o *GetVlanByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vlan by Id o k response -func (o *GetVlanByIDOK) Code() int { - return 200 -} - -func (o *GetVlanByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans/{id}][%d] getVlanByIdOK %s", 200, payload) -} - -func (o *GetVlanByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans/{id}][%d] getVlanByIdOK %s", 200, payload) -} - -func (o *GetVlanByIDOK) GetPayload() *models.Vlan { - return o.Payload -} - -func (o *GetVlanByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vlan) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVlanByIDNotFound creates a GetVlanByIDNotFound with default headers values -func NewGetVlanByIDNotFound() *GetVlanByIDNotFound { - return &GetVlanByIDNotFound{} -} - -/* -GetVlanByIDNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type GetVlanByIDNotFound struct { -} - -// IsSuccess returns true when this get vlan by Id not found response has a 2xx status code -func (o *GetVlanByIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get vlan by Id not found response has a 3xx status code -func (o *GetVlanByIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vlan by Id not found response has a 4xx status code -func (o *GetVlanByIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get vlan by Id not found response has a 5xx status code -func (o *GetVlanByIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get vlan by Id not found response a status code equal to that given -func (o *GetVlanByIDNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the get vlan by Id not found response -func (o *GetVlanByIDNotFound) Code() int { - return 404 -} - -func (o *GetVlanByIDNotFound) Error() string { - return fmt.Sprintf("[GET /public/vlans/{id}][%d] getVlanByIdNotFound", 404) -} - -func (o *GetVlanByIDNotFound) String() string { - return fmt.Sprintf("[GET /public/vlans/{id}][%d] getVlanByIdNotFound", 404) -} - -func (o *GetVlanByIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetVlanByIDDefault creates a GetVlanByIDDefault with default headers values -func NewGetVlanByIDDefault(code int) *GetVlanByIDDefault { - return &GetVlanByIDDefault{ - _statusCode: code, - } -} - -/* -GetVlanByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVlanByIDDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get vlan by Id default response has a 2xx status code -func (o *GetVlanByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vlan by Id default response has a 3xx status code -func (o *GetVlanByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vlan by Id default response has a 4xx status code -func (o *GetVlanByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vlan by Id default response has a 5xx status code -func (o *GetVlanByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vlan by Id default response a status code equal to that given -func (o *GetVlanByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vlan by Id default response -func (o *GetVlanByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetVlanByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans/{id}][%d] GetVlanById default %s", o._statusCode, payload) -} - -func (o *GetVlanByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans/{id}][%d] GetVlanById default %s", o._statusCode, payload) -} - -func (o *GetVlanByIDDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVlanByIDDefault) 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/vlan/get_vlans_parameters.go b/v1/client/vlan/get_vlans_parameters.go deleted file mode 100644 index fe64689c..00000000 --- a/v1/client/vlan/get_vlans_parameters.go +++ /dev/null @@ -1,316 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/go-openapi/swag" -) - -// NewGetVlansParams creates a new GetVlansParams 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 NewGetVlansParams() *GetVlansParams { - return &GetVlansParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVlansParamsWithTimeout creates a new GetVlansParams object -// with the ability to set a timeout on a request. -func NewGetVlansParamsWithTimeout(timeout time.Duration) *GetVlansParams { - return &GetVlansParams{ - timeout: timeout, - } -} - -// NewGetVlansParamsWithContext creates a new GetVlansParams object -// with the ability to set a context for a request. -func NewGetVlansParamsWithContext(ctx context.Context) *GetVlansParams { - return &GetVlansParams{ - Context: ctx, - } -} - -// NewGetVlansParamsWithHTTPClient creates a new GetVlansParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVlansParamsWithHTTPClient(client *http.Client) *GetVlansParams { - return &GetVlansParams{ - HTTPClient: client, - } -} - -/* -GetVlansParams contains all the parameters to send to the API endpoint - - for the get vlans operation. - - Typically these are written to a http.Request. -*/ -type GetVlansParams struct { - - /* AllUnderHierarchy. - - AllUnderHierarchy specifies if objects of all the tenants under the - hierarchy of the logged in user's organization should be returned. - */ - AllUnderHierarchy *bool - - /* CompressIpsToRanges. - - Compress Ips list to list of contigous ip ranges with(startIp, endIp) - */ - CompressIpsToRanges *bool - - /* SkipPrimaryAndBondIface. - - SkipPrimaryAndBondIface is to filter interfaces entries which are primary - interface or bond interfaces. - */ - SkipPrimaryAndBondIface *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be - returned. - */ - TenantIds []string - - /* VlanID. - - Vlan Id to filter vlans. - - Format: int32 - */ - VlanID *int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVlansParams) WithDefaults() *GetVlansParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVlansParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vlans params -func (o *GetVlansParams) WithTimeout(timeout time.Duration) *GetVlansParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vlans params -func (o *GetVlansParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vlans params -func (o *GetVlansParams) WithContext(ctx context.Context) *GetVlansParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vlans params -func (o *GetVlansParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vlans params -func (o *GetVlansParams) WithHTTPClient(client *http.Client) *GetVlansParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vlans params -func (o *GetVlansParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAllUnderHierarchy adds the allUnderHierarchy to the get vlans params -func (o *GetVlansParams) WithAllUnderHierarchy(allUnderHierarchy *bool) *GetVlansParams { - o.SetAllUnderHierarchy(allUnderHierarchy) - return o -} - -// SetAllUnderHierarchy adds the allUnderHierarchy to the get vlans params -func (o *GetVlansParams) SetAllUnderHierarchy(allUnderHierarchy *bool) { - o.AllUnderHierarchy = allUnderHierarchy -} - -// WithCompressIpsToRanges adds the compressIpsToRanges to the get vlans params -func (o *GetVlansParams) WithCompressIpsToRanges(compressIpsToRanges *bool) *GetVlansParams { - o.SetCompressIpsToRanges(compressIpsToRanges) - return o -} - -// SetCompressIpsToRanges adds the compressIpsToRanges to the get vlans params -func (o *GetVlansParams) SetCompressIpsToRanges(compressIpsToRanges *bool) { - o.CompressIpsToRanges = compressIpsToRanges -} - -// WithSkipPrimaryAndBondIface adds the skipPrimaryAndBondIface to the get vlans params -func (o *GetVlansParams) WithSkipPrimaryAndBondIface(skipPrimaryAndBondIface *bool) *GetVlansParams { - o.SetSkipPrimaryAndBondIface(skipPrimaryAndBondIface) - return o -} - -// SetSkipPrimaryAndBondIface adds the skipPrimaryAndBondIface to the get vlans params -func (o *GetVlansParams) SetSkipPrimaryAndBondIface(skipPrimaryAndBondIface *bool) { - o.SkipPrimaryAndBondIface = skipPrimaryAndBondIface -} - -// WithTenantIds adds the tenantIds to the get vlans params -func (o *GetVlansParams) WithTenantIds(tenantIds []string) *GetVlansParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get vlans params -func (o *GetVlansParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithVlanID adds the vlanID to the get vlans params -func (o *GetVlansParams) WithVlanID(vlanID *int32) *GetVlansParams { - o.SetVlanID(vlanID) - return o -} - -// SetVlanID adds the vlanId to the get vlans params -func (o *GetVlansParams) SetVlanID(vlanID *int32) { - o.VlanID = vlanID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVlansParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AllUnderHierarchy != nil { - - // query param allUnderHierarchy - var qrAllUnderHierarchy bool - - if o.AllUnderHierarchy != nil { - qrAllUnderHierarchy = *o.AllUnderHierarchy - } - qAllUnderHierarchy := swag.FormatBool(qrAllUnderHierarchy) - if qAllUnderHierarchy != "" { - - if err := r.SetQueryParam("allUnderHierarchy", qAllUnderHierarchy); err != nil { - return err - } - } - } - - if o.CompressIpsToRanges != nil { - - // query param compressIpsToRanges - var qrCompressIpsToRanges bool - - if o.CompressIpsToRanges != nil { - qrCompressIpsToRanges = *o.CompressIpsToRanges - } - qCompressIpsToRanges := swag.FormatBool(qrCompressIpsToRanges) - if qCompressIpsToRanges != "" { - - if err := r.SetQueryParam("compressIpsToRanges", qCompressIpsToRanges); err != nil { - return err - } - } - } - - if o.SkipPrimaryAndBondIface != nil { - - // query param skipPrimaryAndBondIface - var qrSkipPrimaryAndBondIface bool - - if o.SkipPrimaryAndBondIface != nil { - qrSkipPrimaryAndBondIface = *o.SkipPrimaryAndBondIface - } - qSkipPrimaryAndBondIface := swag.FormatBool(qrSkipPrimaryAndBondIface) - if qSkipPrimaryAndBondIface != "" { - - if err := r.SetQueryParam("skipPrimaryAndBondIface", qSkipPrimaryAndBondIface); err != nil { - return err - } - } - } - - 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.VlanID != nil { - - // query param vlanId - var qrVlanID int32 - - if o.VlanID != nil { - qrVlanID = *o.VlanID - } - qVlanID := swag.FormatInt32(qrVlanID) - if qVlanID != "" { - - if err := r.SetQueryParam("vlanId", qVlanID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetVlans binds the parameter tenantIds -func (o *GetVlansParams) 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/v1/client/vlan/get_vlans_responses.go b/v1/client/vlan/get_vlans_responses.go deleted file mode 100644 index c31f67dc..00000000 --- a/v1/client/vlan/get_vlans_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVlansReader is a Reader for the GetVlans structure. -type GetVlansReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVlansReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVlansOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVlansDefault(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 - } -} - -// NewGetVlansOK creates a GetVlansOK with default headers values -func NewGetVlansOK() *GetVlansOK { - return &GetVlansOK{} -} - -/* -GetVlansOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVlansOK struct { - Payload []*models.Vlan -} - -// IsSuccess returns true when this get vlans o k response has a 2xx status code -func (o *GetVlansOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vlans o k response has a 3xx status code -func (o *GetVlansOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vlans o k response has a 4xx status code -func (o *GetVlansOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vlans o k response has a 5xx status code -func (o *GetVlansOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vlans o k response a status code equal to that given -func (o *GetVlansOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vlans o k response -func (o *GetVlansOK) Code() int { - return 200 -} - -func (o *GetVlansOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans][%d] getVlansOK %s", 200, payload) -} - -func (o *GetVlansOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans][%d] getVlansOK %s", 200, payload) -} - -func (o *GetVlansOK) GetPayload() []*models.Vlan { - return o.Payload -} - -func (o *GetVlansOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVlansDefault creates a GetVlansDefault with default headers values -func NewGetVlansDefault(code int) *GetVlansDefault { - return &GetVlansDefault{ - _statusCode: code, - } -} - -/* -GetVlansDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVlansDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this get vlans default response has a 2xx status code -func (o *GetVlansDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vlans default response has a 3xx status code -func (o *GetVlansDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vlans default response has a 4xx status code -func (o *GetVlansDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vlans default response has a 5xx status code -func (o *GetVlansDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vlans default response a status code equal to that given -func (o *GetVlansDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vlans default response -func (o *GetVlansDefault) Code() int { - return o._statusCode -} - -func (o *GetVlansDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans][%d] GetVlans default %s", o._statusCode, payload) -} - -func (o *GetVlansDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /public/vlans][%d] GetVlans default %s", o._statusCode, payload) -} - -func (o *GetVlansDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *GetVlansDefault) 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/vlan/remove_vlan_parameters.go b/v1/client/vlan/remove_vlan_parameters.go deleted file mode 100644 index 0855b99b..00000000 --- a/v1/client/vlan/remove_vlan_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/go-openapi/swag" -) - -// NewRemoveVlanParams creates a new RemoveVlanParams 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 NewRemoveVlanParams() *RemoveVlanParams { - return &RemoveVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveVlanParamsWithTimeout creates a new RemoveVlanParams object -// with the ability to set a timeout on a request. -func NewRemoveVlanParamsWithTimeout(timeout time.Duration) *RemoveVlanParams { - return &RemoveVlanParams{ - timeout: timeout, - } -} - -// NewRemoveVlanParamsWithContext creates a new RemoveVlanParams object -// with the ability to set a context for a request. -func NewRemoveVlanParamsWithContext(ctx context.Context) *RemoveVlanParams { - return &RemoveVlanParams{ - Context: ctx, - } -} - -// NewRemoveVlanParamsWithHTTPClient creates a new RemoveVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveVlanParamsWithHTTPClient(client *http.Client) *RemoveVlanParams { - return &RemoveVlanParams{ - HTTPClient: client, - } -} - -/* -RemoveVlanParams contains all the parameters to send to the API endpoint - - for the remove vlan operation. - - Typically these are written to a http.Request. -*/ -type RemoveVlanParams struct { - - /* ID. - - Specifies the id of the VLAN. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveVlanParams) WithDefaults() *RemoveVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove vlan params -func (o *RemoveVlanParams) WithTimeout(timeout time.Duration) *RemoveVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove vlan params -func (o *RemoveVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove vlan params -func (o *RemoveVlanParams) WithContext(ctx context.Context) *RemoveVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove vlan params -func (o *RemoveVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove vlan params -func (o *RemoveVlanParams) WithHTTPClient(client *http.Client) *RemoveVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove vlan params -func (o *RemoveVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the remove vlan params -func (o *RemoveVlanParams) WithID(id int32) *RemoveVlanParams { - o.SetID(id) - return o -} - -// SetID adds the id to the remove vlan params -func (o *RemoveVlanParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveVlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vlan/remove_vlan_responses.go b/v1/client/vlan/remove_vlan_responses.go deleted file mode 100644 index 03cfd09f..00000000 --- a/v1/client/vlan/remove_vlan_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// RemoveVlanReader is a Reader for the RemoveVlan structure. -type RemoveVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveVlanNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveVlanDefault(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 - } -} - -// NewRemoveVlanNoContent creates a RemoveVlanNoContent with default headers values -func NewRemoveVlanNoContent() *RemoveVlanNoContent { - return &RemoveVlanNoContent{} -} - -/* -RemoveVlanNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveVlanNoContent struct { -} - -// IsSuccess returns true when this remove vlan no content response has a 2xx status code -func (o *RemoveVlanNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove vlan no content response has a 3xx status code -func (o *RemoveVlanNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove vlan no content response has a 4xx status code -func (o *RemoveVlanNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove vlan no content response has a 5xx status code -func (o *RemoveVlanNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove vlan no content response a status code equal to that given -func (o *RemoveVlanNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove vlan no content response -func (o *RemoveVlanNoContent) Code() int { - return 204 -} - -func (o *RemoveVlanNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/vlans/{id}][%d] removeVlanNoContent", 204) -} - -func (o *RemoveVlanNoContent) String() string { - return fmt.Sprintf("[DELETE /public/vlans/{id}][%d] removeVlanNoContent", 204) -} - -func (o *RemoveVlanNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveVlanDefault creates a RemoveVlanDefault with default headers values -func NewRemoveVlanDefault(code int) *RemoveVlanDefault { - return &RemoveVlanDefault{ - _statusCode: code, - } -} - -/* -RemoveVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveVlanDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this remove vlan default response has a 2xx status code -func (o *RemoveVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove vlan default response has a 3xx status code -func (o *RemoveVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove vlan default response has a 4xx status code -func (o *RemoveVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove vlan default response has a 5xx status code -func (o *RemoveVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove vlan default response a status code equal to that given -func (o *RemoveVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove vlan default response -func (o *RemoveVlanDefault) Code() int { - return o._statusCode -} - -func (o *RemoveVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/vlans/{id}][%d] RemoveVlan default %s", o._statusCode, payload) -} - -func (o *RemoveVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/vlans/{id}][%d] RemoveVlan default %s", o._statusCode, payload) -} - -func (o *RemoveVlanDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *RemoveVlanDefault) 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/vlan/update_vlan_parameters.go b/v1/client/vlan/update_vlan_parameters.go deleted file mode 100644 index 33ff8351..00000000 --- a/v1/client/vlan/update_vlan_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// NewUpdateVlanParams creates a new UpdateVlanParams 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 NewUpdateVlanParams() *UpdateVlanParams { - return &UpdateVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateVlanParamsWithTimeout creates a new UpdateVlanParams object -// with the ability to set a timeout on a request. -func NewUpdateVlanParamsWithTimeout(timeout time.Duration) *UpdateVlanParams { - return &UpdateVlanParams{ - timeout: timeout, - } -} - -// NewUpdateVlanParamsWithContext creates a new UpdateVlanParams object -// with the ability to set a context for a request. -func NewUpdateVlanParamsWithContext(ctx context.Context) *UpdateVlanParams { - return &UpdateVlanParams{ - Context: ctx, - } -} - -// NewUpdateVlanParamsWithHTTPClient creates a new UpdateVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateVlanParamsWithHTTPClient(client *http.Client) *UpdateVlanParams { - return &UpdateVlanParams{ - HTTPClient: client, - } -} - -/* -UpdateVlanParams contains all the parameters to send to the API endpoint - - for the update vlan operation. - - Typically these are written to a http.Request. -*/ -type UpdateVlanParams struct { - - // Body. - Body *models.Vlan - - /* ID. - - Specifies the id of the VLAN. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateVlanParams) WithDefaults() *UpdateVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update vlan params -func (o *UpdateVlanParams) WithTimeout(timeout time.Duration) *UpdateVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update vlan params -func (o *UpdateVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update vlan params -func (o *UpdateVlanParams) WithContext(ctx context.Context) *UpdateVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update vlan params -func (o *UpdateVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update vlan params -func (o *UpdateVlanParams) WithHTTPClient(client *http.Client) *UpdateVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update vlan params -func (o *UpdateVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update vlan params -func (o *UpdateVlanParams) WithBody(body *models.Vlan) *UpdateVlanParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update vlan params -func (o *UpdateVlanParams) SetBody(body *models.Vlan) { - o.Body = body -} - -// WithID adds the id to the update vlan params -func (o *UpdateVlanParams) WithID(id int32) *UpdateVlanParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update vlan params -func (o *UpdateVlanParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateVlanParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vlan/update_vlan_responses.go b/v1/client/vlan/update_vlan_responses.go deleted file mode 100644 index a855793f..00000000 --- a/v1/client/vlan/update_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// UpdateVlanReader is a Reader for the UpdateVlan structure. -type UpdateVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateVlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateVlanDefault(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 - } -} - -// NewUpdateVlanOK creates a UpdateVlanOK with default headers values -func NewUpdateVlanOK() *UpdateVlanOK { - return &UpdateVlanOK{} -} - -/* -UpdateVlanOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateVlanOK struct { - Payload *models.Vlan -} - -// IsSuccess returns true when this update vlan o k response has a 2xx status code -func (o *UpdateVlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update vlan o k response has a 3xx status code -func (o *UpdateVlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update vlan o k response has a 4xx status code -func (o *UpdateVlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update vlan o k response has a 5xx status code -func (o *UpdateVlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update vlan o k response a status code equal to that given -func (o *UpdateVlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update vlan o k response -func (o *UpdateVlanOK) Code() int { - return 200 -} - -func (o *UpdateVlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vlans/{id}][%d] updateVlanOK %s", 200, payload) -} - -func (o *UpdateVlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vlans/{id}][%d] updateVlanOK %s", 200, payload) -} - -func (o *UpdateVlanOK) GetPayload() *models.Vlan { - return o.Payload -} - -func (o *UpdateVlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Vlan) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateVlanDefault creates a UpdateVlanDefault with default headers values -func NewUpdateVlanDefault(code int) *UpdateVlanDefault { - return &UpdateVlanDefault{ - _statusCode: code, - } -} - -/* -UpdateVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateVlanDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this update vlan default response has a 2xx status code -func (o *UpdateVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update vlan default response has a 3xx status code -func (o *UpdateVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update vlan default response has a 4xx status code -func (o *UpdateVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update vlan default response has a 5xx status code -func (o *UpdateVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update vlan default response a status code equal to that given -func (o *UpdateVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update vlan default response -func (o *UpdateVlanDefault) Code() int { - return o._statusCode -} - -func (o *UpdateVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vlans/{id}][%d] UpdateVlan default %s", o._statusCode, payload) -} - -func (o *UpdateVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /public/vlans/{id}][%d] UpdateVlan default %s", o._statusCode, payload) -} - -func (o *UpdateVlanDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UpdateVlanDefault) 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/vlan/vlan_client.go b/v1/client/vlan/vlan_client.go deleted file mode 100644 index 342ede54..00000000 --- a/v1/client/vlan/vlan_client.go +++ /dev/null @@ -1,360 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vlan - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new vlan API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new vlan API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new vlan API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for vlan API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateBifrostVlan(params *CreateBifrostVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBifrostVlanOK, error) - - CreateVlan(params *CreateVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVlanOK, error) - - GetBifrostTenantVlans(params *GetBifrostTenantVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBifrostTenantVlansOK, error) - - GetVlanByID(params *GetVlanByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVlanByIDOK, error) - - GetVlans(params *GetVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVlansOK, error) - - RemoveVlan(params *RemoveVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveVlanNoContent, error) - - UpdateVlan(params *UpdateVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateVlanOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateBifrostVlan creates a bifrost v l a n of the cohesity cluster - -Returns the created Bifrost VLAN on the Cohesity Cluster. -*/ -func (a *Client) CreateBifrostVlan(params *CreateBifrostVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBifrostVlanOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateBifrostVlanParams() - } - op := &runtime.ClientOperation{ - ID: "CreateBifrostVlan", - Method: "POST", - PathPattern: "/public/bifrost/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateBifrostVlanReader{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.(*CreateBifrostVlanOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateBifrostVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateVlan creates a v l a n of the cohesity cluster - -Returns the created VLAN on the Cohesity Cluster. -*/ -func (a *Client) CreateVlan(params *CreateVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateVlanOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateVlanParams() - } - op := &runtime.ClientOperation{ - ID: "CreateVlan", - Method: "POST", - PathPattern: "/public/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateVlanReader{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.(*CreateVlanOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBifrostTenantVlans lists the bifrost tenant v l a ns for the cohesity cluster - -Returns the Bifrost Tenant VLANs for the Cohesity Cluster. -*/ -func (a *Client) GetBifrostTenantVlans(params *GetBifrostTenantVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBifrostTenantVlansOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBifrostTenantVlansParams() - } - op := &runtime.ClientOperation{ - ID: "GetBifrostTenantVlans", - Method: "GET", - PathPattern: "/public/bifrost/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBifrostTenantVlansReader{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.(*GetBifrostTenantVlansOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBifrostTenantVlansDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetVlanByID lists the details about a single v l a n - - Returns the VLAN corresponding to the specified VLAN ID or a specified - -vlan interface group name. -Example: /public/vlans/intf_group1.20 -*/ -func (a *Client) GetVlanByID(params *GetVlanByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVlanByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVlanByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetVlanById", - Method: "GET", - PathPattern: "/public/vlans/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVlanByIDReader{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.(*GetVlanByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVlanByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVlans lists the v l a ns for the cohesity cluster - -Returns the VLANs for the Cohesity Cluster. -*/ -func (a *Client) GetVlans(params *GetVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVlansOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVlansParams() - } - op := &runtime.ClientOperation{ - ID: "GetVlans", - Method: "GET", - PathPattern: "/public/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVlansReader{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.(*GetVlansOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVlansDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveVlan removes the specified v l a n from the cohesity cluster - -Returns the delete status upon completion. -*/ -func (a *Client) RemoveVlan(params *RemoveVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveVlanNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveVlanParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveVlan", - Method: "DELETE", - PathPattern: "/public/vlans/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveVlanReader{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.(*RemoveVlanNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateVlan creates or updates a v l a n of the cohesity cluster - -Returns the created or updated VLAN on the Cohesity Cluster. -*/ -func (a *Client) UpdateVlan(params *UpdateVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateVlanOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateVlanParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateVlan", - Method: "PUT", - PathPattern: "/public/vlans/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateVlanReader{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.(*UpdateVlanOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateVlanDefault) - 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/vm/get_vm_volume_info_parameters.go b/v1/client/vm/get_vm_volume_info_parameters.go deleted file mode 100644 index 8d51ea29..00000000 --- a/v1/client/vm/get_vm_volume_info_parameters.go +++ /dev/null @@ -1,534 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vm - -// 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/go-openapi/swag" -) - -// NewGetVMVolumeInfoParams creates a new GetVMVolumeInfoParams 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 NewGetVMVolumeInfoParams() *GetVMVolumeInfoParams { - return &GetVMVolumeInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVMVolumeInfoParamsWithTimeout creates a new GetVMVolumeInfoParams object -// with the ability to set a timeout on a request. -func NewGetVMVolumeInfoParamsWithTimeout(timeout time.Duration) *GetVMVolumeInfoParams { - return &GetVMVolumeInfoParams{ - timeout: timeout, - } -} - -// NewGetVMVolumeInfoParamsWithContext creates a new GetVMVolumeInfoParams object -// with the ability to set a context for a request. -func NewGetVMVolumeInfoParamsWithContext(ctx context.Context) *GetVMVolumeInfoParams { - return &GetVMVolumeInfoParams{ - Context: ctx, - } -} - -// NewGetVMVolumeInfoParamsWithHTTPClient creates a new GetVMVolumeInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVMVolumeInfoParamsWithHTTPClient(client *http.Client) *GetVMVolumeInfoParams { - return &GetVMVolumeInfoParams{ - HTTPClient: client, - } -} - -/* -GetVMVolumeInfoParams contains all the parameters to send to the API endpoint - - for the get Vm volume info operation. - - Typically these are written to a http.Request. -*/ -type GetVMVolumeInfoParams struct { - - /* AttemptNum. - - AttemptNum is the attempt number of the run that successfully created the - snapshot. - - Format: int64 - */ - AttemptNum *int64 - - /* ClusterID. - - ClusterId is the Id of the cluster used for constructing JobUid. - - Format: int64 - */ - ClusterID *int64 - - /* ClusterIncarnationID. - - ClusterIncarnationId is the incarnation Id of the cluster used for - constructing JobUid. - - Format: int64 - */ - ClusterIncarnationID *int64 - - /* ComputeVolumeInfo. - - If volume information is not already computed then `ComputeVolumeInfo` - computes the volume information if it's true, else returns KNotFound. - */ - ComputeVolumeInfo *bool - - /* EntityID. - - EntityId is the Id of the VM. - - Format: int64 - */ - EntityID *int64 - - /* JobID. - - JobId is the id of the local job that took the snapshot, which may or - may not match the JobUidObjectId below depending on whether the object - originally belonged to this local job or to a different remote job. - - Format: int64 - */ - JobID *int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the job run that backed up the entity. - - Format: int64 - */ - JobInstanceID *int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time in usecs of the job run that backed up - the entity. - - Format: int64 - */ - JobStartTimeUsecs *int64 - - /* JobUIDObjectID. - - JobUidObjectId is the globally unique id of the job that the object - originally belonged to. If this object originally belonged to a job from a - remote cluster, this field will contain the JobId of the remote job, else - it will contain the JobId of the local job. - - Format: int64 - */ - JobUIDObjectID *int64 - - /* PointInTimeUsecs. - - PointInTimeUsecs is the time to get volume info from previously available - snapshot before this time. - - Format: int64 - */ - PointInTimeUsecs *int64 - - /* SupportedVolumesOnly. - - Specifies to return only supported volumes information. Unsupported - volumes are not returned if this flag is set to true. - Default is false. - */ - SupportedVolumesOnly *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get Vm volume info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMVolumeInfoParams) WithDefaults() *GetVMVolumeInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get Vm volume info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVMVolumeInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithTimeout(timeout time.Duration) *GetVMVolumeInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithContext(ctx context.Context) *GetVMVolumeInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithHTTPClient(client *http.Client) *GetVMVolumeInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttemptNum adds the attemptNum to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithAttemptNum(attemptNum *int64) *GetVMVolumeInfoParams { - o.SetAttemptNum(attemptNum) - return o -} - -// SetAttemptNum adds the attemptNum to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetAttemptNum(attemptNum *int64) { - o.AttemptNum = attemptNum -} - -// WithClusterID adds the clusterID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithClusterID(clusterID *int64) *GetVMVolumeInfoParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithClusterIncarnationID(clusterIncarnationID *int64) *GetVMVolumeInfoParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetClusterIncarnationID(clusterIncarnationID *int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithComputeVolumeInfo adds the computeVolumeInfo to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithComputeVolumeInfo(computeVolumeInfo *bool) *GetVMVolumeInfoParams { - o.SetComputeVolumeInfo(computeVolumeInfo) - return o -} - -// SetComputeVolumeInfo adds the computeVolumeInfo to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetComputeVolumeInfo(computeVolumeInfo *bool) { - o.ComputeVolumeInfo = computeVolumeInfo -} - -// WithEntityID adds the entityID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithEntityID(entityID *int64) *GetVMVolumeInfoParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithJobID adds the jobID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithJobID(jobID *int64) *GetVMVolumeInfoParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithJobInstanceID(jobInstanceID *int64) *GetVMVolumeInfoParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetJobInstanceID(jobInstanceID *int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithJobStartTimeUsecs(jobStartTimeUsecs *int64) *GetVMVolumeInfoParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetJobStartTimeUsecs(jobStartTimeUsecs *int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WithJobUIDObjectID adds the jobUIDObjectID to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithJobUIDObjectID(jobUIDObjectID *int64) *GetVMVolumeInfoParams { - o.SetJobUIDObjectID(jobUIDObjectID) - return o -} - -// SetJobUIDObjectID adds the jobUidObjectId to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetJobUIDObjectID(jobUIDObjectID *int64) { - o.JobUIDObjectID = jobUIDObjectID -} - -// WithPointInTimeUsecs adds the pointInTimeUsecs to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithPointInTimeUsecs(pointInTimeUsecs *int64) *GetVMVolumeInfoParams { - o.SetPointInTimeUsecs(pointInTimeUsecs) - return o -} - -// SetPointInTimeUsecs adds the pointInTimeUsecs to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetPointInTimeUsecs(pointInTimeUsecs *int64) { - o.PointInTimeUsecs = pointInTimeUsecs -} - -// WithSupportedVolumesOnly adds the supportedVolumesOnly to the get Vm volume info params -func (o *GetVMVolumeInfoParams) WithSupportedVolumesOnly(supportedVolumesOnly *bool) *GetVMVolumeInfoParams { - o.SetSupportedVolumesOnly(supportedVolumesOnly) - return o -} - -// SetSupportedVolumesOnly adds the supportedVolumesOnly to the get Vm volume info params -func (o *GetVMVolumeInfoParams) SetSupportedVolumesOnly(supportedVolumesOnly *bool) { - o.SupportedVolumesOnly = supportedVolumesOnly -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVMVolumeInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AttemptNum != nil { - - // query param attemptNum - var qrAttemptNum int64 - - if o.AttemptNum != nil { - qrAttemptNum = *o.AttemptNum - } - qAttemptNum := swag.FormatInt64(qrAttemptNum) - if qAttemptNum != "" { - - if err := r.SetQueryParam("attemptNum", qAttemptNum); err != nil { - return err - } - } - } - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.ClusterIncarnationID != nil { - - // query param clusterIncarnationId - var qrClusterIncarnationID int64 - - if o.ClusterIncarnationID != nil { - qrClusterIncarnationID = *o.ClusterIncarnationID - } - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - } - - if o.ComputeVolumeInfo != nil { - - // query param computeVolumeInfo - var qrComputeVolumeInfo bool - - if o.ComputeVolumeInfo != nil { - qrComputeVolumeInfo = *o.ComputeVolumeInfo - } - qComputeVolumeInfo := swag.FormatBool(qrComputeVolumeInfo) - if qComputeVolumeInfo != "" { - - if err := r.SetQueryParam("computeVolumeInfo", qComputeVolumeInfo); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if o.JobInstanceID != nil { - - // query param jobInstanceId - var qrJobInstanceID int64 - - if o.JobInstanceID != nil { - qrJobInstanceID = *o.JobInstanceID - } - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - } - - if o.JobStartTimeUsecs != nil { - - // query param jobStartTimeUsecs - var qrJobStartTimeUsecs int64 - - if o.JobStartTimeUsecs != nil { - qrJobStartTimeUsecs = *o.JobStartTimeUsecs - } - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - } - - if o.JobUIDObjectID != nil { - - // query param jobUidObjectId - var qrJobUIDObjectID int64 - - if o.JobUIDObjectID != nil { - qrJobUIDObjectID = *o.JobUIDObjectID - } - qJobUIDObjectID := swag.FormatInt64(qrJobUIDObjectID) - if qJobUIDObjectID != "" { - - if err := r.SetQueryParam("jobUidObjectId", qJobUIDObjectID); err != nil { - return err - } - } - } - - if o.PointInTimeUsecs != nil { - - // query param pointInTimeUsecs - var qrPointInTimeUsecs int64 - - if o.PointInTimeUsecs != nil { - qrPointInTimeUsecs = *o.PointInTimeUsecs - } - qPointInTimeUsecs := swag.FormatInt64(qrPointInTimeUsecs) - if qPointInTimeUsecs != "" { - - if err := r.SetQueryParam("pointInTimeUsecs", qPointInTimeUsecs); err != nil { - return err - } - } - } - - if o.SupportedVolumesOnly != nil { - - // query param supportedVolumesOnly - var qrSupportedVolumesOnly bool - - if o.SupportedVolumesOnly != nil { - qrSupportedVolumesOnly = *o.SupportedVolumesOnly - } - qSupportedVolumesOnly := swag.FormatBool(qrSupportedVolumesOnly) - if qSupportedVolumesOnly != "" { - - if err := r.SetQueryParam("supportedVolumesOnly", qSupportedVolumesOnly); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vm/get_vm_volume_info_responses.go b/v1/client/vm/get_vm_volume_info_responses.go deleted file mode 100644 index 03dc1891..00000000 --- a/v1/client/vm/get_vm_volume_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vm - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// GetVMVolumeInfoReader is a Reader for the GetVMVolumeInfo structure. -type GetVMVolumeInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVMVolumeInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVMVolumeInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVMVolumeInfoDefault(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 - } -} - -// NewGetVMVolumeInfoOK creates a GetVMVolumeInfoOK with default headers values -func NewGetVMVolumeInfoOK() *GetVMVolumeInfoOK { - return &GetVMVolumeInfoOK{} -} - -/* -GetVMVolumeInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVMVolumeInfoOK struct { - Payload *models.VolumeInfoResult -} - -// IsSuccess returns true when this get Vm volume info o k response has a 2xx status code -func (o *GetVMVolumeInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get Vm volume info o k response has a 3xx status code -func (o *GetVMVolumeInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Vm volume info o k response has a 4xx status code -func (o *GetVMVolumeInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get Vm volume info o k response has a 5xx status code -func (o *GetVMVolumeInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get Vm volume info o k response a status code equal to that given -func (o *GetVMVolumeInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get Vm volume info o k response -func (o *GetVMVolumeInfoOK) Code() int { - return 200 -} - -func (o *GetVMVolumeInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/volumeInfo][%d] getVmVolumeInfoOK %s", 200, payload) -} - -func (o *GetVMVolumeInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/volumeInfo][%d] getVmVolumeInfoOK %s", 200, payload) -} - -func (o *GetVMVolumeInfoOK) GetPayload() *models.VolumeInfoResult { - return o.Payload -} - -func (o *GetVMVolumeInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VolumeInfoResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVMVolumeInfoDefault creates a GetVMVolumeInfoDefault with default headers values -func NewGetVMVolumeInfoDefault(code int) *GetVMVolumeInfoDefault { - return &GetVMVolumeInfoDefault{ - _statusCode: code, - } -} - -/* -GetVMVolumeInfoDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type GetVMVolumeInfoDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this get Vm volume info default response has a 2xx status code -func (o *GetVMVolumeInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get Vm volume info default response has a 3xx status code -func (o *GetVMVolumeInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get Vm volume info default response has a 4xx status code -func (o *GetVMVolumeInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get Vm volume info default response has a 5xx status code -func (o *GetVMVolumeInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get Vm volume info default response a status code equal to that given -func (o *GetVMVolumeInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get Vm volume info default response -func (o *GetVMVolumeInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetVMVolumeInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/volumeInfo][%d] GetVmVolumeInfo default %s", o._statusCode, payload) -} - -func (o *GetVMVolumeInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/volumeInfo][%d] GetVmVolumeInfo default %s", o._statusCode, payload) -} - -func (o *GetVMVolumeInfoDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *GetVMVolumeInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/vm/read_dir_parameters.go b/v1/client/vm/read_dir_parameters.go deleted file mode 100644 index 98e3bd01..00000000 --- a/v1/client/vm/read_dir_parameters.go +++ /dev/null @@ -1,818 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vm - -// 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/go-openapi/swag" -) - -// NewReadDirParams creates a new ReadDirParams 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 NewReadDirParams() *ReadDirParams { - return &ReadDirParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReadDirParamsWithTimeout creates a new ReadDirParams object -// with the ability to set a timeout on a request. -func NewReadDirParamsWithTimeout(timeout time.Duration) *ReadDirParams { - return &ReadDirParams{ - timeout: timeout, - } -} - -// NewReadDirParamsWithContext creates a new ReadDirParams object -// with the ability to set a context for a request. -func NewReadDirParamsWithContext(ctx context.Context) *ReadDirParams { - return &ReadDirParams{ - Context: ctx, - } -} - -// NewReadDirParamsWithHTTPClient creates a new ReadDirParams object -// with the ability to set a custom HTTPClient for a request. -func NewReadDirParamsWithHTTPClient(client *http.Client) *ReadDirParams { - return &ReadDirParams{ - HTTPClient: client, - } -} - -/* -ReadDirParams contains all the parameters to send to the API endpoint - - for the read dir operation. - - Typically these are written to a http.Request. -*/ -type ReadDirParams struct { - - /* AttemptNum. - - AttemptNum is the attempt number of the run that successfully created the - snapshot. - - Format: int64 - */ - AttemptNum *int64 - - /* ClusterID. - - ClusterId is the Id of the cluster used for constructing JobUid. - - Format: int64 - */ - ClusterID *int64 - - /* ClusterIncarnationID. - - ClusterIncarnationId is the incarnation Id of the cluster used for - constructing JobUid. - - Format: int64 - */ - ClusterIncarnationID *int64 - - /* Cookie. - - Cookie is used for paginating results. If ReadDirResult returned partial - results, it will also return a cookie that can be used to resume the - listing. The value returned in ReadDirResult should be passed in the next - call. The first call should not have this value set. Note that this value - is only a suggestion and server is free to do a short read (return fewer - entries along with a cookie). - */ - Cookie *string - - /* DirPath. - - DirPath is the full path of the directory whose contents need to be listed. - */ - DirPath *string - - /* EntityID. - - EntityId is the Id of the VM. - - Format: int64 - */ - EntityID *int64 - - /* JobID. - - JobId is the id of the local job that took the snapshot, which may or - may not match the JobUidObjectId below depending on whether the object - originally belonged to this local job or to a different remote job. - - Format: int64 - */ - JobID *int64 - - /* JobInstanceID. - - JobInstanceId is the Id of the job run that backed up the entity. - - Format: int64 - */ - JobInstanceID *int64 - - /* JobStartTimeUsecs. - - JobStartTimeUsecs is the start time in usecs of the job run that backed up - the entity. - - Format: int64 - */ - JobStartTimeUsecs *int64 - - /* JobUIDObjectID. - - JobUidObjectId is the globally unique id of the job that the object - originally belonged to. If this object originally belonged to a job from a - remote cluster, this field will contain the JobId of the remote job, else - it will contain the JobId of the local job. - - Format: int64 - */ - JobUIDObjectID *int64 - - /* MaxEntries. - - MaxEntries is the maximum number of entries to return in this call. If - there are more entries, server will return a cookie in the response that - can be used to continue enumeration from the last call. - - Format: int32 - */ - MaxEntries *int32 - - /* PointInTimeUsecs. - - PointInTimeUsecs is the time to read directory from previously available - snapshot before this time. - - Format: int64 - */ - PointInTimeUsecs *int64 - - /* ProtectionSourceEnvironment. - - Specifies the environment type of the registered source. - */ - ProtectionSourceEnvironment *string - - /* StatFileEntries. - - StatFileEntries specifies whether file stat data is returned. - */ - StatFileEntries *bool - - /* UseLibrarian. - - Specifies whether to use indexed data in Librarian for browse. - */ - UseLibrarian *bool - - /* ViewBoxID. - - Id of the View Box if a View is being browsed. - - Format: int64 - */ - ViewBoxID *int64 - - /* ViewName. - - Name of the View if a View is being browsed. - */ - ViewName *string - - /* VolumeInfoCookie. - - VolumeInfoCookie is the cookie to be passed in calls to reading a VM dir - for this volume. - - Format: uint64 - */ - VolumeInfoCookie *uint64 - - /* VolumeName. - - VolumeName is the name of the volume that needs to be browsed. This should - match the name returned in VolumeInfo. - */ - VolumeName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the read dir params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadDirParams) WithDefaults() *ReadDirParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the read dir params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadDirParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the read dir params -func (o *ReadDirParams) WithTimeout(timeout time.Duration) *ReadDirParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read dir params -func (o *ReadDirParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read dir params -func (o *ReadDirParams) WithContext(ctx context.Context) *ReadDirParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read dir params -func (o *ReadDirParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read dir params -func (o *ReadDirParams) WithHTTPClient(client *http.Client) *ReadDirParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read dir params -func (o *ReadDirParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAttemptNum adds the attemptNum to the read dir params -func (o *ReadDirParams) WithAttemptNum(attemptNum *int64) *ReadDirParams { - o.SetAttemptNum(attemptNum) - return o -} - -// SetAttemptNum adds the attemptNum to the read dir params -func (o *ReadDirParams) SetAttemptNum(attemptNum *int64) { - o.AttemptNum = attemptNum -} - -// WithClusterID adds the clusterID to the read dir params -func (o *ReadDirParams) WithClusterID(clusterID *int64) *ReadDirParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the read dir params -func (o *ReadDirParams) SetClusterID(clusterID *int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the read dir params -func (o *ReadDirParams) WithClusterIncarnationID(clusterIncarnationID *int64) *ReadDirParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the read dir params -func (o *ReadDirParams) SetClusterIncarnationID(clusterIncarnationID *int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithCookie adds the cookie to the read dir params -func (o *ReadDirParams) WithCookie(cookie *string) *ReadDirParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the read dir params -func (o *ReadDirParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithDirPath adds the dirPath to the read dir params -func (o *ReadDirParams) WithDirPath(dirPath *string) *ReadDirParams { - o.SetDirPath(dirPath) - return o -} - -// SetDirPath adds the dirPath to the read dir params -func (o *ReadDirParams) SetDirPath(dirPath *string) { - o.DirPath = dirPath -} - -// WithEntityID adds the entityID to the read dir params -func (o *ReadDirParams) WithEntityID(entityID *int64) *ReadDirParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the read dir params -func (o *ReadDirParams) SetEntityID(entityID *int64) { - o.EntityID = entityID -} - -// WithJobID adds the jobID to the read dir params -func (o *ReadDirParams) WithJobID(jobID *int64) *ReadDirParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the read dir params -func (o *ReadDirParams) SetJobID(jobID *int64) { - o.JobID = jobID -} - -// WithJobInstanceID adds the jobInstanceID to the read dir params -func (o *ReadDirParams) WithJobInstanceID(jobInstanceID *int64) *ReadDirParams { - o.SetJobInstanceID(jobInstanceID) - return o -} - -// SetJobInstanceID adds the jobInstanceId to the read dir params -func (o *ReadDirParams) SetJobInstanceID(jobInstanceID *int64) { - o.JobInstanceID = jobInstanceID -} - -// WithJobStartTimeUsecs adds the jobStartTimeUsecs to the read dir params -func (o *ReadDirParams) WithJobStartTimeUsecs(jobStartTimeUsecs *int64) *ReadDirParams { - o.SetJobStartTimeUsecs(jobStartTimeUsecs) - return o -} - -// SetJobStartTimeUsecs adds the jobStartTimeUsecs to the read dir params -func (o *ReadDirParams) SetJobStartTimeUsecs(jobStartTimeUsecs *int64) { - o.JobStartTimeUsecs = jobStartTimeUsecs -} - -// WithJobUIDObjectID adds the jobUIDObjectID to the read dir params -func (o *ReadDirParams) WithJobUIDObjectID(jobUIDObjectID *int64) *ReadDirParams { - o.SetJobUIDObjectID(jobUIDObjectID) - return o -} - -// SetJobUIDObjectID adds the jobUidObjectId to the read dir params -func (o *ReadDirParams) SetJobUIDObjectID(jobUIDObjectID *int64) { - o.JobUIDObjectID = jobUIDObjectID -} - -// WithMaxEntries adds the maxEntries to the read dir params -func (o *ReadDirParams) WithMaxEntries(maxEntries *int32) *ReadDirParams { - o.SetMaxEntries(maxEntries) - return o -} - -// SetMaxEntries adds the maxEntries to the read dir params -func (o *ReadDirParams) SetMaxEntries(maxEntries *int32) { - o.MaxEntries = maxEntries -} - -// WithPointInTimeUsecs adds the pointInTimeUsecs to the read dir params -func (o *ReadDirParams) WithPointInTimeUsecs(pointInTimeUsecs *int64) *ReadDirParams { - o.SetPointInTimeUsecs(pointInTimeUsecs) - return o -} - -// SetPointInTimeUsecs adds the pointInTimeUsecs to the read dir params -func (o *ReadDirParams) SetPointInTimeUsecs(pointInTimeUsecs *int64) { - o.PointInTimeUsecs = pointInTimeUsecs -} - -// WithProtectionSourceEnvironment adds the protectionSourceEnvironment to the read dir params -func (o *ReadDirParams) WithProtectionSourceEnvironment(protectionSourceEnvironment *string) *ReadDirParams { - o.SetProtectionSourceEnvironment(protectionSourceEnvironment) - return o -} - -// SetProtectionSourceEnvironment adds the protectionSourceEnvironment to the read dir params -func (o *ReadDirParams) SetProtectionSourceEnvironment(protectionSourceEnvironment *string) { - o.ProtectionSourceEnvironment = protectionSourceEnvironment -} - -// WithStatFileEntries adds the statFileEntries to the read dir params -func (o *ReadDirParams) WithStatFileEntries(statFileEntries *bool) *ReadDirParams { - o.SetStatFileEntries(statFileEntries) - return o -} - -// SetStatFileEntries adds the statFileEntries to the read dir params -func (o *ReadDirParams) SetStatFileEntries(statFileEntries *bool) { - o.StatFileEntries = statFileEntries -} - -// WithUseLibrarian adds the useLibrarian to the read dir params -func (o *ReadDirParams) WithUseLibrarian(useLibrarian *bool) *ReadDirParams { - o.SetUseLibrarian(useLibrarian) - return o -} - -// SetUseLibrarian adds the useLibrarian to the read dir params -func (o *ReadDirParams) SetUseLibrarian(useLibrarian *bool) { - o.UseLibrarian = useLibrarian -} - -// WithViewBoxID adds the viewBoxID to the read dir params -func (o *ReadDirParams) WithViewBoxID(viewBoxID *int64) *ReadDirParams { - o.SetViewBoxID(viewBoxID) - return o -} - -// SetViewBoxID adds the viewBoxId to the read dir params -func (o *ReadDirParams) SetViewBoxID(viewBoxID *int64) { - o.ViewBoxID = viewBoxID -} - -// WithViewName adds the viewName to the read dir params -func (o *ReadDirParams) WithViewName(viewName *string) *ReadDirParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the read dir params -func (o *ReadDirParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WithVolumeInfoCookie adds the volumeInfoCookie to the read dir params -func (o *ReadDirParams) WithVolumeInfoCookie(volumeInfoCookie *uint64) *ReadDirParams { - o.SetVolumeInfoCookie(volumeInfoCookie) - return o -} - -// SetVolumeInfoCookie adds the volumeInfoCookie to the read dir params -func (o *ReadDirParams) SetVolumeInfoCookie(volumeInfoCookie *uint64) { - o.VolumeInfoCookie = volumeInfoCookie -} - -// WithVolumeName adds the volumeName to the read dir params -func (o *ReadDirParams) WithVolumeName(volumeName *string) *ReadDirParams { - o.SetVolumeName(volumeName) - return o -} - -// SetVolumeName adds the volumeName to the read dir params -func (o *ReadDirParams) SetVolumeName(volumeName *string) { - o.VolumeName = volumeName -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadDirParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AttemptNum != nil { - - // query param attemptNum - var qrAttemptNum int64 - - if o.AttemptNum != nil { - qrAttemptNum = *o.AttemptNum - } - qAttemptNum := swag.FormatInt64(qrAttemptNum) - if qAttemptNum != "" { - - if err := r.SetQueryParam("attemptNum", qAttemptNum); err != nil { - return err - } - } - } - - if o.ClusterID != nil { - - // query param clusterId - var qrClusterID int64 - - if o.ClusterID != nil { - qrClusterID = *o.ClusterID - } - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - } - - if o.ClusterIncarnationID != nil { - - // query param clusterIncarnationId - var qrClusterIncarnationID int64 - - if o.ClusterIncarnationID != nil { - qrClusterIncarnationID = *o.ClusterIncarnationID - } - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - } - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.DirPath != nil { - - // query param dirPath - var qrDirPath string - - if o.DirPath != nil { - qrDirPath = *o.DirPath - } - qDirPath := qrDirPath - if qDirPath != "" { - - if err := r.SetQueryParam("dirPath", qDirPath); err != nil { - return err - } - } - } - - if o.EntityID != nil { - - // query param entityId - var qrEntityID int64 - - if o.EntityID != nil { - qrEntityID = *o.EntityID - } - qEntityID := swag.FormatInt64(qrEntityID) - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - } - - if o.JobID != nil { - - // query param jobId - var qrJobID int64 - - if o.JobID != nil { - qrJobID = *o.JobID - } - qJobID := swag.FormatInt64(qrJobID) - if qJobID != "" { - - if err := r.SetQueryParam("jobId", qJobID); err != nil { - return err - } - } - } - - if o.JobInstanceID != nil { - - // query param jobInstanceId - var qrJobInstanceID int64 - - if o.JobInstanceID != nil { - qrJobInstanceID = *o.JobInstanceID - } - qJobInstanceID := swag.FormatInt64(qrJobInstanceID) - if qJobInstanceID != "" { - - if err := r.SetQueryParam("jobInstanceId", qJobInstanceID); err != nil { - return err - } - } - } - - if o.JobStartTimeUsecs != nil { - - // query param jobStartTimeUsecs - var qrJobStartTimeUsecs int64 - - if o.JobStartTimeUsecs != nil { - qrJobStartTimeUsecs = *o.JobStartTimeUsecs - } - qJobStartTimeUsecs := swag.FormatInt64(qrJobStartTimeUsecs) - if qJobStartTimeUsecs != "" { - - if err := r.SetQueryParam("jobStartTimeUsecs", qJobStartTimeUsecs); err != nil { - return err - } - } - } - - if o.JobUIDObjectID != nil { - - // query param jobUidObjectId - var qrJobUIDObjectID int64 - - if o.JobUIDObjectID != nil { - qrJobUIDObjectID = *o.JobUIDObjectID - } - qJobUIDObjectID := swag.FormatInt64(qrJobUIDObjectID) - if qJobUIDObjectID != "" { - - if err := r.SetQueryParam("jobUidObjectId", qJobUIDObjectID); err != nil { - return err - } - } - } - - if o.MaxEntries != nil { - - // query param maxEntries - var qrMaxEntries int32 - - if o.MaxEntries != nil { - qrMaxEntries = *o.MaxEntries - } - qMaxEntries := swag.FormatInt32(qrMaxEntries) - if qMaxEntries != "" { - - if err := r.SetQueryParam("maxEntries", qMaxEntries); err != nil { - return err - } - } - } - - if o.PointInTimeUsecs != nil { - - // query param pointInTimeUsecs - var qrPointInTimeUsecs int64 - - if o.PointInTimeUsecs != nil { - qrPointInTimeUsecs = *o.PointInTimeUsecs - } - qPointInTimeUsecs := swag.FormatInt64(qrPointInTimeUsecs) - if qPointInTimeUsecs != "" { - - if err := r.SetQueryParam("pointInTimeUsecs", qPointInTimeUsecs); err != nil { - return err - } - } - } - - if o.ProtectionSourceEnvironment != nil { - - // query param protectionSourceEnvironment - var qrProtectionSourceEnvironment string - - if o.ProtectionSourceEnvironment != nil { - qrProtectionSourceEnvironment = *o.ProtectionSourceEnvironment - } - qProtectionSourceEnvironment := qrProtectionSourceEnvironment - if qProtectionSourceEnvironment != "" { - - if err := r.SetQueryParam("protectionSourceEnvironment", qProtectionSourceEnvironment); err != nil { - return err - } - } - } - - if o.StatFileEntries != nil { - - // query param statFileEntries - var qrStatFileEntries bool - - if o.StatFileEntries != nil { - qrStatFileEntries = *o.StatFileEntries - } - qStatFileEntries := swag.FormatBool(qrStatFileEntries) - if qStatFileEntries != "" { - - if err := r.SetQueryParam("statFileEntries", qStatFileEntries); err != nil { - return err - } - } - } - - if o.UseLibrarian != nil { - - // query param useLibrarian - var qrUseLibrarian bool - - if o.UseLibrarian != nil { - qrUseLibrarian = *o.UseLibrarian - } - qUseLibrarian := swag.FormatBool(qrUseLibrarian) - if qUseLibrarian != "" { - - if err := r.SetQueryParam("useLibrarian", qUseLibrarian); err != nil { - return err - } - } - } - - if o.ViewBoxID != nil { - - // query param viewBoxId - var qrViewBoxID int64 - - if o.ViewBoxID != nil { - qrViewBoxID = *o.ViewBoxID - } - qViewBoxID := swag.FormatInt64(qrViewBoxID) - if qViewBoxID != "" { - - if err := r.SetQueryParam("viewBoxId", qViewBoxID); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if o.VolumeInfoCookie != nil { - - // query param volumeInfoCookie - var qrVolumeInfoCookie uint64 - - if o.VolumeInfoCookie != nil { - qrVolumeInfoCookie = *o.VolumeInfoCookie - } - qVolumeInfoCookie := swag.FormatUint64(qrVolumeInfoCookie) - if qVolumeInfoCookie != "" { - - if err := r.SetQueryParam("volumeInfoCookie", qVolumeInfoCookie); err != nil { - return err - } - } - } - - if o.VolumeName != nil { - - // query param volumeName - var qrVolumeName string - - if o.VolumeName != nil { - qrVolumeName = *o.VolumeName - } - qVolumeName := qrVolumeName - if qVolumeName != "" { - - if err := r.SetQueryParam("volumeName", qVolumeName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/vm/read_dir_responses.go b/v1/client/vm/read_dir_responses.go deleted file mode 100644 index 1e6b6a9e..00000000 --- a/v1/client/vm/read_dir_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vm - -// 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/satwik-miyyapuram-cohesity/go-sdk/v1/models" -) - -// ReadDirReader is a Reader for the ReadDir structure. -type ReadDirReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadDirReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewReadDirOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewReadDirDefault(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 - } -} - -// NewReadDirOK creates a ReadDirOK with default headers values -func NewReadDirOK() *ReadDirOK { - return &ReadDirOK{} -} - -/* -ReadDirOK describes a response with status code 200, with default header values. - -Success -*/ -type ReadDirOK struct { - Payload *models.ReadDirResult -} - -// IsSuccess returns true when this read dir o k response has a 2xx status code -func (o *ReadDirOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this read dir o k response has a 3xx status code -func (o *ReadDirOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read dir o k response has a 4xx status code -func (o *ReadDirOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this read dir o k response has a 5xx status code -func (o *ReadDirOK) IsServerError() bool { - return false -} - -// IsCode returns true when this read dir o k response a status code equal to that given -func (o *ReadDirOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the read dir o k response -func (o *ReadDirOK) Code() int { - return 200 -} - -func (o *ReadDirOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/directoryList][%d] readDirOK %s", 200, payload) -} - -func (o *ReadDirOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/directoryList][%d] readDirOK %s", 200, payload) -} - -func (o *ReadDirOK) GetPayload() *models.ReadDirResult { - return o.Payload -} - -func (o *ReadDirOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReadDirResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadDirDefault creates a ReadDirDefault with default headers values -func NewReadDirDefault(code int) *ReadDirDefault { - return &ReadDirDefault{ - _statusCode: code, - } -} - -/* -ReadDirDefault describes a response with status code -1, with default header values. - -(empty) -*/ -type ReadDirDefault struct { - _statusCode int - - Payload *models.PrivateError -} - -// IsSuccess returns true when this read dir default response has a 2xx status code -func (o *ReadDirDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this read dir default response has a 3xx status code -func (o *ReadDirDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this read dir default response has a 4xx status code -func (o *ReadDirDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this read dir default response has a 5xx status code -func (o *ReadDirDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this read dir default response a status code equal to that given -func (o *ReadDirDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the read dir default response -func (o *ReadDirDefault) Code() int { - return o._statusCode -} - -func (o *ReadDirDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/directoryList][%d] ReadDir default %s", o._statusCode, payload) -} - -func (o *ReadDirDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /vm/directoryList][%d] ReadDir default %s", o._statusCode, payload) -} - -func (o *ReadDirDefault) GetPayload() *models.PrivateError { - return o.Payload -} - -func (o *ReadDirDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PrivateError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/vm/vm_client.go b/v1/client/vm/vm_client.go deleted file mode 100644 index fdb01386..00000000 --- a/v1/client/vm/vm_client.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package vm - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new vm API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new vm API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new vm API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for vm API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetVMVolumeInfo(params *GetVMVolumeInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMVolumeInfoOK, error) - - ReadDir(params *ReadDirParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadDirOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetVMVolumeInfo gets volume information for v ms -*/ -func (a *Client) GetVMVolumeInfo(params *GetVMVolumeInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVMVolumeInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVMVolumeInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetVmVolumeInfo", - Method: "GET", - PathPattern: "/vm/volumeInfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVMVolumeInfoReader{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.(*GetVMVolumeInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVMVolumeInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ReadDir gets the directory listing for a VM -*/ -func (a *Client) ReadDir(params *ReadDirParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadDirOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewReadDirParams() - } - op := &runtime.ClientOperation{ - ID: "ReadDir", - Method: "GET", - PathPattern: "/vm/directoryList", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ReadDirReader{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.(*ReadDirOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ReadDirDefault) - 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/models/a_a_g_database_copy_info.go b/v1/models/a_a_g_database_copy_info.go deleted file mode 100644 index 9e3ff44b..00000000 --- a/v1/models/a_a_g_database_copy_info.go +++ /dev/null @@ -1,119 +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" -) - -// AAGDatabaseCopyInfo This specifies the information about the AAG database copy on a replica. -// -// swagger:model AAGDatabaseCopyInfo -type AAGDatabaseCopyInfo struct { - - // The name of the database. - DatabaseName *string `json:"databaseName,omitempty"` - - // The entity id of the replica on which this AAG database copy is present. - HostEntityID *int64 `json:"hostEntityId,omitempty"` - - // The name of the instance in which the AAG database copy is present on - // the replica. - InstanceName *string `json:"instanceName,omitempty"` - - // The SQL id of the database on this replica. - SQLID *SQLID `json:"sqlId,omitempty"` -} - -// Validate validates this a a g database copy info -func (m *AAGDatabaseCopyInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSQLID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGDatabaseCopyInfo) validateSQLID(formats strfmt.Registry) error { - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if m.SQLID != nil { - if err := m.SQLID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a a g database copy info based on the context it is used -func (m *AAGDatabaseCopyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSQLID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGDatabaseCopyInfo) contextValidateSQLID(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLID != nil { - - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if err := m.SQLID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AAGDatabaseCopyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGDatabaseCopyInfo) UnmarshalBinary(b []byte) error { - var res AAGDatabaseCopyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_a_g_db_info.go b/v1/models/a_a_g_db_info.go deleted file mode 100644 index 51364ca1..00000000 --- a/v1/models/a_a_g_db_info.go +++ /dev/null @@ -1,61 +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" -) - -// AAGDbInfo Information about one database that belongs to an AAG. This does not -// refer to a local database on one instance, but represents a synchronized -// database at the AAG level. -// Each AAG database shares the same information across each of its replicas. -// It will however have a different entity id on -// each of its replicas. We store the common information here. -// If we break the AAG, each replica's db will become an independent db. -// -// swagger:model AAGDbInfo -type AAGDbInfo struct { - - // The name of the database. - DatabaseName *string `json:"databaseName,omitempty"` - - // The unique identifier of the database within the availability group. - // This identifer is the same for all replicas on which the - // database has been joined to the AAG. - GroupDatabaseID *string `json:"groupDatabaseId,omitempty"` -} - -// Validate validates this a a g db info -func (m *AAGDbInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a a g db info based on context it is used -func (m *AAGDbInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AAGDbInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGDbInfo) UnmarshalBinary(b []byte) error { - var res AAGDbInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_a_g_info.go b/v1/models/a_a_g_info.go deleted file mode 100644 index 82fbc24c..00000000 --- a/v1/models/a_a_g_info.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AAGInfo SQL AAG Info. -// -// Specifies the information about the AAG. -// -// swagger:model AAGInfo -type AAGInfo struct { - - // Specifies the list of AAG replicas that are part of the AAG. - AagReplicas []*AAGReplicaInfo `json:"aagReplicas"` - - // Specifies the name about the AAG. - Name *string `json:"name,omitempty"` -} - -// Validate validates this a a g info -func (m *AAGInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagReplicas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGInfo) validateAagReplicas(formats strfmt.Registry) error { - if swag.IsZero(m.AagReplicas) { // not required - return nil - } - - for i := 0; i < len(m.AagReplicas); i++ { - if swag.IsZero(m.AagReplicas[i]) { // not required - continue - } - - if m.AagReplicas[i] != nil { - if err := m.AagReplicas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagReplicas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagReplicas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a a g info based on the context it is used -func (m *AAGInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAagReplicas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGInfo) contextValidateAagReplicas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AagReplicas); i++ { - - if m.AagReplicas[i] != nil { - - if swag.IsZero(m.AagReplicas[i]) { // not required - return nil - } - - if err := m.AagReplicas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagReplicas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagReplicas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AAGInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGInfo) UnmarshalBinary(b []byte) error { - var res AAGInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_a_g_replica_info.go b/v1/models/a_a_g_replica_info.go deleted file mode 100644 index 0b6edfce..00000000 --- a/v1/models/a_a_g_replica_info.go +++ /dev/null @@ -1,398 +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" -) - -// AAGReplicaInfo SQL AAG replica info -// -// Specifies the information about the AAG replica. -// -// swagger:model AAGReplicaInfo -type AAGReplicaInfo struct { - - // Specifies the availability mode of the replica. - // Enum: ["kSync","kAsync"] - AvailabilityMode *string `json:"availabilityMode,omitempty"` - - // Specifies the time when replica is created. - CreateDateMsecs *int64 `json:"createDateMsecs,omitempty"` - - // Specifies the host name of the replica. - HostName *string `json:"hostName,omitempty"` - - // Specifies the backup priority. - LastModifiedMsecs *int32 `json:"lastModifiedMsecs,omitempty"` - - // Specifies the operational state of the replica. - // kFailedNoQuorum, kNull - // Enum: ["kPendingFailover","kPending","kOnline","kOffline","kFailed"] - OperationalState *string `json:"operationalState,omitempty"` - - // Specifies what are the types of connections primary role allows. - // Enum: ["kNone","kReadOnly","kAll","kReadWrite"] - PrimaryRoleAllowConnections *string `json:"primaryRoleAllowConnections,omitempty"` - - // Specifies the role of replica. - // Enum: ["kResolving","kPrimary","kSecondary"] - Role *string `json:"role,omitempty"` - - // Specifies what are the types of connections secondary role allows. - // Enum: ["kNone","kReadOnly","kAll","kReadWrite"] - SecondaryRoleAllowConnections *string `json:"secondaryRoleAllowConnections,omitempty"` - - // Specifies the instance name along with the host name on which the - // AAG databases are hosted. - ServerName *string `json:"serverName,omitempty"` - - // Specifies the synchronization health of the replica. - // Enum: ["kNotHealthy","kPartiallyHealthy","kHealthy"] - SynchronizationHealth *string `json:"synchronizationHealth,omitempty"` -} - -// Validate validates this a a g replica info -func (m *AAGReplicaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAvailabilityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperationalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryRoleAllowConnections(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryRoleAllowConnections(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSynchronizationHealth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aAGReplicaInfoTypeAvailabilityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSync","kAsync"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypeAvailabilityModePropEnum = append(aAGReplicaInfoTypeAvailabilityModePropEnum, v) - } -} - -const ( - - // AAGReplicaInfoAvailabilityModeKSync captures enum value "kSync" - AAGReplicaInfoAvailabilityModeKSync string = "kSync" - - // AAGReplicaInfoAvailabilityModeKAsync captures enum value "kAsync" - AAGReplicaInfoAvailabilityModeKAsync string = "kAsync" -) - -// prop value enum -func (m *AAGReplicaInfo) validateAvailabilityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypeAvailabilityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) validateAvailabilityMode(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityMode) { // not required - return nil - } - - // value enum - if err := m.validateAvailabilityModeEnum("availabilityMode", "body", *m.AvailabilityMode); err != nil { - return err - } - - return nil -} - -var aAGReplicaInfoTypeOperationalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPendingFailover","kPending","kOnline","kOffline","kFailed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypeOperationalStatePropEnum = append(aAGReplicaInfoTypeOperationalStatePropEnum, v) - } -} - -const ( - - // AAGReplicaInfoOperationalStateKPendingFailover captures enum value "kPendingFailover" - AAGReplicaInfoOperationalStateKPendingFailover string = "kPendingFailover" - - // AAGReplicaInfoOperationalStateKPending captures enum value "kPending" - AAGReplicaInfoOperationalStateKPending string = "kPending" - - // AAGReplicaInfoOperationalStateKOnline captures enum value "kOnline" - AAGReplicaInfoOperationalStateKOnline string = "kOnline" - - // AAGReplicaInfoOperationalStateKOffline captures enum value "kOffline" - AAGReplicaInfoOperationalStateKOffline string = "kOffline" - - // AAGReplicaInfoOperationalStateKFailed captures enum value "kFailed" - AAGReplicaInfoOperationalStateKFailed string = "kFailed" -) - -// prop value enum -func (m *AAGReplicaInfo) validateOperationalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypeOperationalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) validateOperationalState(formats strfmt.Registry) error { - if swag.IsZero(m.OperationalState) { // not required - return nil - } - - // value enum - if err := m.validateOperationalStateEnum("operationalState", "body", *m.OperationalState); err != nil { - return err - } - - return nil -} - -var aAGReplicaInfoTypePrimaryRoleAllowConnectionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kReadOnly","kAll","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypePrimaryRoleAllowConnectionsPropEnum = append(aAGReplicaInfoTypePrimaryRoleAllowConnectionsPropEnum, v) - } -} - -const ( - - // AAGReplicaInfoPrimaryRoleAllowConnectionsKNone captures enum value "kNone" - AAGReplicaInfoPrimaryRoleAllowConnectionsKNone string = "kNone" - - // AAGReplicaInfoPrimaryRoleAllowConnectionsKReadOnly captures enum value "kReadOnly" - AAGReplicaInfoPrimaryRoleAllowConnectionsKReadOnly string = "kReadOnly" - - // AAGReplicaInfoPrimaryRoleAllowConnectionsKAll captures enum value "kAll" - AAGReplicaInfoPrimaryRoleAllowConnectionsKAll string = "kAll" - - // AAGReplicaInfoPrimaryRoleAllowConnectionsKReadWrite captures enum value "kReadWrite" - AAGReplicaInfoPrimaryRoleAllowConnectionsKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *AAGReplicaInfo) validatePrimaryRoleAllowConnectionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypePrimaryRoleAllowConnectionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) validatePrimaryRoleAllowConnections(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryRoleAllowConnections) { // not required - return nil - } - - // value enum - if err := m.validatePrimaryRoleAllowConnectionsEnum("primaryRoleAllowConnections", "body", *m.PrimaryRoleAllowConnections); err != nil { - return err - } - - return nil -} - -var aAGReplicaInfoTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kResolving","kPrimary","kSecondary"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypeRolePropEnum = append(aAGReplicaInfoTypeRolePropEnum, v) - } -} - -const ( - - // AAGReplicaInfoRoleKResolving captures enum value "kResolving" - AAGReplicaInfoRoleKResolving string = "kResolving" - - // AAGReplicaInfoRoleKPrimary captures enum value "kPrimary" - AAGReplicaInfoRoleKPrimary string = "kPrimary" - - // AAGReplicaInfoRoleKSecondary captures enum value "kSecondary" - AAGReplicaInfoRoleKSecondary string = "kSecondary" -) - -// prop value enum -func (m *AAGReplicaInfo) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) 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 -} - -var aAGReplicaInfoTypeSecondaryRoleAllowConnectionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kReadOnly","kAll","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypeSecondaryRoleAllowConnectionsPropEnum = append(aAGReplicaInfoTypeSecondaryRoleAllowConnectionsPropEnum, v) - } -} - -const ( - - // AAGReplicaInfoSecondaryRoleAllowConnectionsKNone captures enum value "kNone" - AAGReplicaInfoSecondaryRoleAllowConnectionsKNone string = "kNone" - - // AAGReplicaInfoSecondaryRoleAllowConnectionsKReadOnly captures enum value "kReadOnly" - AAGReplicaInfoSecondaryRoleAllowConnectionsKReadOnly string = "kReadOnly" - - // AAGReplicaInfoSecondaryRoleAllowConnectionsKAll captures enum value "kAll" - AAGReplicaInfoSecondaryRoleAllowConnectionsKAll string = "kAll" - - // AAGReplicaInfoSecondaryRoleAllowConnectionsKReadWrite captures enum value "kReadWrite" - AAGReplicaInfoSecondaryRoleAllowConnectionsKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *AAGReplicaInfo) validateSecondaryRoleAllowConnectionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypeSecondaryRoleAllowConnectionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) validateSecondaryRoleAllowConnections(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryRoleAllowConnections) { // not required - return nil - } - - // value enum - if err := m.validateSecondaryRoleAllowConnectionsEnum("secondaryRoleAllowConnections", "body", *m.SecondaryRoleAllowConnections); err != nil { - return err - } - - return nil -} - -var aAGReplicaInfoTypeSynchronizationHealthPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNotHealthy","kPartiallyHealthy","kHealthy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aAGReplicaInfoTypeSynchronizationHealthPropEnum = append(aAGReplicaInfoTypeSynchronizationHealthPropEnum, v) - } -} - -const ( - - // AAGReplicaInfoSynchronizationHealthKNotHealthy captures enum value "kNotHealthy" - AAGReplicaInfoSynchronizationHealthKNotHealthy string = "kNotHealthy" - - // AAGReplicaInfoSynchronizationHealthKPartiallyHealthy captures enum value "kPartiallyHealthy" - AAGReplicaInfoSynchronizationHealthKPartiallyHealthy string = "kPartiallyHealthy" - - // AAGReplicaInfoSynchronizationHealthKHealthy captures enum value "kHealthy" - AAGReplicaInfoSynchronizationHealthKHealthy string = "kHealthy" -) - -// prop value enum -func (m *AAGReplicaInfo) validateSynchronizationHealthEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aAGReplicaInfoTypeSynchronizationHealthPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AAGReplicaInfo) validateSynchronizationHealth(formats strfmt.Registry) error { - if swag.IsZero(m.SynchronizationHealth) { // not required - return nil - } - - // value enum - if err := m.validateSynchronizationHealthEnum("synchronizationHealth", "body", *m.SynchronizationHealth); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this a a g replica info based on context it is used -func (m *AAGReplicaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AAGReplicaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGReplicaInfo) UnmarshalBinary(b []byte) error { - var res AAGReplicaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_a_g_replica_info_db_info.go b/v1/models/a_a_g_replica_info_db_info.go deleted file mode 100644 index 9f0d87bf..00000000 --- a/v1/models/a_a_g_replica_info_db_info.go +++ /dev/null @@ -1,120 +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" -) - -// AAGReplicaInfoDbInfo Infomation about one local database on this replica. -// -// When populated by the agent, this is only populated for replica on which -// the agent resides. -// -// swagger:model AAGReplicaInfo_DbInfo -type AAGReplicaInfoDbInfo struct { - - // The name of database. - DatabaseName *string `json:"databaseName,omitempty"` - - // The entity id of the database on this replica. Only set if its host - // has been registered with Cohesity. - EntityID *int64 `json:"entityId,omitempty"` - - // The SQL id of the database on this replica. Only set if its host - // has not been registered with Cohesity. - SQLID *SQLID `json:"sqlId,omitempty"` -} - -// Validate validates this a a g replica info db info -func (m *AAGReplicaInfoDbInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSQLID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGReplicaInfoDbInfo) validateSQLID(formats strfmt.Registry) error { - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if m.SQLID != nil { - if err := m.SQLID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a a g replica info db info based on the context it is used -func (m *AAGReplicaInfoDbInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSQLID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGReplicaInfoDbInfo) contextValidateSQLID(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLID != nil { - - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if err := m.SQLID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AAGReplicaInfoDbInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGReplicaInfoDbInfo) UnmarshalBinary(b []byte) error { - var res AAGReplicaInfoDbInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_attribute_restore_param.go b/v1/models/a_d_attribute_restore_param.go deleted file mode 100644 index ebc435b1..00000000 --- a/v1/models/a_d_attribute_restore_param.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ADAttributeRestoreParam AD attribute recovery parameters for one or more AD objects. -// -// swagger:model ADAttributeRestoreParam -type ADAttributeRestoreParam struct { - - // Array of LDAP property names to excluded from 'property_vec'. Excluded - // property name cannot contain wildcard character '*'. Property names are - // case insensitive. - ExcludedPropertyVec []string `json:"excludedPropertyVec"` - - // Array of source and destination object guid pairs to restore attributes. - // Pair source guid refers to guid in AD snapshot in source_server - // endpoint. Destination guid refers to guid in production AD. If destination - // guid is empty, then source guid in AD snapshot should exist in production - // AD. - GuidpairVec []*ADGUIDPair `json:"guidpairVec"` - - // Attribute restore option flags of type ADAttributeOptionFlags. - OptionFlags *uint32 `json:"optionFlags,omitempty"` - - // Array of LDAP property(attribute) names. The name can be standard or - // custom property defined in AD schema partition. The property can contain - // wildcard character '*'. If this array is empty, then '*' is assigned, - // means restore all properties except default system excluded properties. - // Wildcards will be expanded. If 'memberOf' property is included, group - // membership of the objects specified in 'guid_vec' will be restored. - // Property that does not exist for an object is ignored and no error - // info is returned for that property. Property names are case insensitive. - // Caller may check the ADAttributeFlags.kSystem obtained during object - // compare to exclude system properties. - PropertyVec []string `json:"propertyVec"` - - // When restoring a GPO, need to know the absolute path for SYSVOL folder. - SrcSysvolFolder *string `json:"srcSysvolFolder,omitempty"` -} - -// Validate validates this a d attribute restore param -func (m *ADAttributeRestoreParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGuidpairVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADAttributeRestoreParam) validateGuidpairVec(formats strfmt.Registry) error { - if swag.IsZero(m.GuidpairVec) { // not required - return nil - } - - for i := 0; i < len(m.GuidpairVec); i++ { - if swag.IsZero(m.GuidpairVec[i]) { // not required - continue - } - - if m.GuidpairVec[i] != nil { - if err := m.GuidpairVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("guidpairVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("guidpairVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a d attribute restore param based on the context it is used -func (m *ADAttributeRestoreParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGuidpairVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADAttributeRestoreParam) contextValidateGuidpairVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GuidpairVec); i++ { - - if m.GuidpairVec[i] != nil { - - if swag.IsZero(m.GuidpairVec[i]) { // not required - return nil - } - - if err := m.GuidpairVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("guidpairVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("guidpairVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADAttributeRestoreParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADAttributeRestoreParam) UnmarshalBinary(b []byte) error { - var res ADAttributeRestoreParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_database_info.go b/v1/models/a_d_database_info.go deleted file mode 100644 index c8b97836..00000000 --- a/v1/models/a_d_database_info.go +++ /dev/null @@ -1,81 +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" -) - -// ADDatabaseInfo Information about AD Database (NTDS or ADAM) and their support files. If you -// change this message, update $ADDatabaseInfo in -// magneto/agents/windows/ad/scripts/ad_entityhierarchy.psm1 to maintain JSON -// compatibility. -// -// swagger:model ADDatabaseInfo -type ADDatabaseInfo struct { - - // NTDS.DIT db file path. Example:C:\Windows\NTDS\ntds.dit. - DbFilePath *string `json:"dbFilePath,omitempty"` - - // NTDS.DIT database file size on disk file system. -1 if it could not be - // obtained. - DbFileSizeBytes *int64 `json:"dbFileSizeBytes,omitempty"` - - // Volume device id where the DB file mount point lives. This should be - // included in VSS snapshot. - // Example: 63f6b242-8ec1-11e8-80e0-00505685e2a9 - DbVolumeGUID *string `json:"dbVolumeGuid,omitempty"` - - // LDAP TCP port on which this DB is listening. - LdapPort *uint32 `json:"ldapPort,omitempty"` - - // LDAP SSL port on which this DB is listening. Note that DC does not enable - // SSL by default even though a port number is assigned. SSL must be - // configured. - LdapSslPort *uint32 `json:"ldapSslPort,omitempty"` - - // Log directory. Example:C:\Windows\NTDS - LogDirPath *string `json:"logDirPath,omitempty"` - - // Volume device id where the LOG dir mount point lives. This should be - // included in VSS snapshot. - // Example: 63f6b242-8ec1-11e8-80e0-00505685e2a9 - LogVolumeGUID *string `json:"logVolumeGuid,omitempty"` - - // Name of database. Example:NTDS , qa01ds1, qa01ds2 - Name *string `json:"name,omitempty"` -} - -// Validate validates this a d database info -func (m *ADDatabaseInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a d database info based on context it is used -func (m *ADDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADDatabaseInfo) UnmarshalBinary(b []byte) error { - var res ADDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_domain.go b/v1/models/a_d_domain.go deleted file mode 100644 index a2b966d9..00000000 --- a/v1/models/a_d_domain.go +++ /dev/null @@ -1,139 +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" -) - -// ADDomain Represents an AD domain. All fields are case insensitive. If you change this -// message, update $ADDomain in -// magneto/agents/windows/ad/scripts/ad_entityhierarchy.psm1 to maintain JSON -// compatibility. -// -// swagger:model ADDomain -type ADDomain struct { - - // DNS root. Example: tme.local - DNSRoot *string `json:"dnsRoot,omitempty"` - - // Domain functional level numeric. (Get-ADDomain).DomainMode - // Windows2012R2Domain - DomainMode *int32 `json:"domainMode,omitempty"` - - // Forest. Example: qa01.eng.cohesity.com - Forest *string `json:"forest,omitempty"` - - // Forest functional level. (Get-ADForest).ForestMode - // Windows2012R2Forest - ForestMode *int32 `json:"forestMode,omitempty"` - - // Identity of the domain. - ID *ADDomainIdentity `json:"id,omitempty"` - - // NetBIOS name. Example: TME - NetbiosName *string `json:"netbiosName,omitempty"` - - // Parent domain name. - ParentDomain *string `json:"parentDomain,omitempty"` - - // AD Schema version obtained from (Get-ADObject - // (Get-ADRootDSE).schemaNamingContext -Property objectVersion). - SchemaVersion *uint32 `json:"schemaVersion,omitempty"` - - // Tombstone lifetime in days. Default is 180 days. - TombstoneDays *uint32 `json:"tombstoneDays,omitempty"` -} - -// Validate validates this a d domain -func (m *ADDomain) 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 *ADDomain) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -// ContextValidate validate this a d domain based on the context it is used -func (m *ADDomain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADDomain) 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 -} - -// MarshalBinary interface implementation -func (m *ADDomain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADDomain) UnmarshalBinary(b []byte) error { - var res ADDomain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_domain_controller.go b/v1/models/a_d_domain_controller.go deleted file mode 100644 index 9f6e2923..00000000 --- a/v1/models/a_d_domain_controller.go +++ /dev/null @@ -1,317 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ADDomainController Represents an AD domain controller. All fields are case insensitive. If you -// change this message, update $ADDomainController in -// magneto/agents/windows/ad/scripts/ad_entityhierarchy.psm1 to maintain JSON -// compatibility. -// -// swagger:model ADDomainController -type ADDomainController struct { - - // ADAM database(s) present on this domain controller. - AdamDbVec []*ADDatabaseInfo `json:"adamDbVec"` - - // Whether backing up this DC is supported or not due to system or - // implementation limitations. If the value is false, reason - // string below can be used to specify why its not supported. At least one - // reason should be present when this value is false. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Free form text for the reasons why backup is not supported for this AD DC. - // This is valid only if backup_supported = false. The first element in - // this vector should show the important reason why its not supported. - // For example, if the db is dismounted for error cases, subsequent elements - // may show missing NTDS.DIT file. - BackupUnsupportedReasonVec []string `json:"backupUnsupportedReasonVec"` - - // Domain hosted on this DC. - Domain *ADDomain `json:"domain,omitempty"` - - // List of FSMO roles assigned to this DC. - FsmoRoleVec []string `json:"fsmoRoleVec"` - - // FQDN host name of the DC. Eg: TME-AD.tme.local - HostName *string `json:"hostName,omitempty"` - - // Is this DC a Global Catalog Server? From powershell: - // (Get-ADDomainController).IsGlobalCatalog. - IsGlobalCatalog *bool `json:"isGlobalCatalog,omitempty"` - - // Is this DC hosting a ReadOnly copy of AD? - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // AD database (NTDS.DIT) properties. - NtdsDb *ADDatabaseInfo `json:"ntdsDb,omitempty"` - - // AD Sysvol folder properties. - SysvolFolder *ADSysvolInfo `json:"sysvolFolder,omitempty"` - - // UTC time offset of this DC in minutes. It can be + or -. Eg: -480 is - // Pacific. - Utcoffsetmin *int32 `json:"utcoffsetmin,omitempty"` - - // VSS writers that should be included by Magneto during backup of this AD DC - // to get system state backup. This would include multiple writers such as - // System Writers, NTDS, ADAM (if installed). The writers in this list should - // be included with explicit components selection in - // PrepareVSSSnapshotArg.VSSWriterAdditionalOption proto. - // Note: AD does not support VSS writer involved restore. Its a copy of NTDS - // directory in DSRM mode and then a reboot. So there is no VSS writers for - // restore. - VssBackupWritersVec []string `json:"vssBackupWritersVec"` -} - -// Validate validates this a d domain controller -func (m *ADDomainController) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdamDbVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNtdsDb(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSysvolFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADDomainController) validateAdamDbVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdamDbVec) { // not required - return nil - } - - for i := 0; i < len(m.AdamDbVec); i++ { - if swag.IsZero(m.AdamDbVec[i]) { // not required - continue - } - - if m.AdamDbVec[i] != nil { - if err := m.AdamDbVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adamDbVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adamDbVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADDomainController) validateDomain(formats strfmt.Registry) error { - if swag.IsZero(m.Domain) { // not required - return nil - } - - if m.Domain != nil { - if err := m.Domain.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -func (m *ADDomainController) validateNtdsDb(formats strfmt.Registry) error { - if swag.IsZero(m.NtdsDb) { // not required - return nil - } - - if m.NtdsDb != nil { - if err := m.NtdsDb.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntdsDb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntdsDb") - } - return err - } - } - - return nil -} - -func (m *ADDomainController) validateSysvolFolder(formats strfmt.Registry) error { - if swag.IsZero(m.SysvolFolder) { // not required - return nil - } - - if m.SysvolFolder != nil { - if err := m.SysvolFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sysvolFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sysvolFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d domain controller based on the context it is used -func (m *ADDomainController) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdamDbVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNtdsDb(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSysvolFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADDomainController) contextValidateAdamDbVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdamDbVec); i++ { - - if m.AdamDbVec[i] != nil { - - if swag.IsZero(m.AdamDbVec[i]) { // not required - return nil - } - - if err := m.AdamDbVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adamDbVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adamDbVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADDomainController) contextValidateDomain(ctx context.Context, formats strfmt.Registry) error { - - if m.Domain != nil { - - if swag.IsZero(m.Domain) { // not required - return nil - } - - if err := m.Domain.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -func (m *ADDomainController) contextValidateNtdsDb(ctx context.Context, formats strfmt.Registry) error { - - if m.NtdsDb != nil { - - if swag.IsZero(m.NtdsDb) { // not required - return nil - } - - if err := m.NtdsDb.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntdsDb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntdsDb") - } - return err - } - } - - return nil -} - -func (m *ADDomainController) contextValidateSysvolFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.SysvolFolder != nil { - - if swag.IsZero(m.SysvolFolder) { // not required - return nil - } - - if err := m.SysvolFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sysvolFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sysvolFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADDomainController) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADDomainController) UnmarshalBinary(b []byte) error { - var res ADDomainController - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_domain_identity.go b/v1/models/a_d_domain_identity.go deleted file mode 100644 index 1885f075..00000000 --- a/v1/models/a_d_domain_identity.go +++ /dev/null @@ -1,64 +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" -) - -// ADDomainIdentity AD domain identity. These fields returned by AD powershell. All field values -// are case insensitive. If you change this message, update $ADDomainIdentity -// in magneto/agents/windows/ad/scripts/ad_entityhierarchy.psm1 to maintain -// JSON compatibility. -// -// swagger:model ADDomainIdentity -type ADDomainIdentity struct { - - // Distinguished Name (Suffix) of the domain. Example: DC=tme,DC=local - Dn *string `json:"dn,omitempty"` - - // Display Name. Example: tme.local - Name *string `json:"name,omitempty"` - - // Unique objectGUID for an AD domain. This is a unqiue identifier that - // can be used to compare domains. It would be in the format without {} - // Example: 299331af-deb3-4cdd-8e2c-d11cde7112ce - ObjectGUID *string `json:"objectGuid,omitempty"` - - // DomainSID. Example: S-1-5-21-2329549007-3075497753-1539959636 - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this a d domain identity -func (m *ADDomainIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a d domain identity based on context it is used -func (m *ADDomainIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADDomainIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADDomainIdentity) UnmarshalBinary(b []byte) error { - var res ADDomainIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_guid_pair.go b/v1/models/a_d_guid_pair.go deleted file mode 100644 index dc537061..00000000 --- a/v1/models/a_d_guid_pair.go +++ /dev/null @@ -1,55 +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" -) - -// ADGUIDPair AD object guid string pair. -// -// swagger:model ADGuidPair -type ADGUIDPair struct { - - // Destination guid in production AD object corresponding to source. If - // empty, it assumed to be 'source' guid. - Destination *string `json:"destination,omitempty"` - - // Source guid string of an AD object in mounted AD snapshot. This cannot be - // empty. - Source *string `json:"source,omitempty"` -} - -// Validate validates this a d Guid pair -func (m *ADGUIDPair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a d Guid pair based on context it is used -func (m *ADGUIDPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADGUIDPair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADGUIDPair) UnmarshalBinary(b []byte) error { - var res ADGUIDPair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_object.go b/v1/models/a_d_object.go deleted file mode 100644 index 026ed400..00000000 --- a/v1/models/a_d_object.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ADObject AD Object -// -// Represents the details about an AD object. -// -// swagger:model ADObject -type ADObject struct { - - // Specifies the 'description' of an AD object. - Description *string `json:"description,omitempty"` - - // Specifies the guid of object in the Production AD which is equivalent to - // the object in the Snapshot AD. - DestinationGUID *string `json:"destinationGuid,omitempty"` - - // Specifies the display name of the AD object. - DisplayName *string `json:"displayName,omitempty"` - - // Specifies the distinguished name of the AD object. - // Eg: CN=Jone Doe,OU=Users,DC=corp,DC=cohesity,DC=com - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Specifies the error message while fetching the AD object. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the class name of an AD Object such as 'user','computer', - // 'organizationalUnit'. - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the SearchResultFlags of the AD object. - // 'kEqual' indicates the AD Object from Snapshot and Production - // AD are equal. - // 'kNotEqual' indicates the AD Object from snapshot and production - // AD are not equal. - // 'kRestorePasswordRequired' indicates when restoring this AD Object from - // Snapshot AD to Production AD, a password is required. - // 'kMovedOnDestination' indicates the object has moved to another container or - // OU in Production AD compared to Snapshot AD. - // 'kDisableSupported' indicates the enable and disable is supported on the AD - // Object. AD Objects of type 'User' and 'Computers' support this operation. - SearchResultFlags []string `json:"searchResultFlags"` - - // Specifies the guid of the AD object in Snapshot AD. - SourceGUID *string `json:"sourceGuid,omitempty"` -} - -// Validate validates this a d object -func (m *ADObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchResultFlags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aDObjectSearchResultFlagsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEqual","kNotEqual","kRestorePasswordRequired","kMovedOnDestination","kDisableSupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aDObjectSearchResultFlagsItemsEnum = append(aDObjectSearchResultFlagsItemsEnum, v) - } -} - -func (m *ADObject) validateSearchResultFlagsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aDObjectSearchResultFlagsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ADObject) validateSearchResultFlags(formats strfmt.Registry) error { - if swag.IsZero(m.SearchResultFlags) { // not required - return nil - } - - for i := 0; i < len(m.SearchResultFlags); i++ { - - // value enum - if err := m.validateSearchResultFlagsItemsEnum("searchResultFlags"+"."+strconv.Itoa(i), "body", m.SearchResultFlags[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this a d object based on context it is used -func (m *ADObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADObject) UnmarshalBinary(b []byte) error { - var res ADObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_object_restore_param.go b/v1/models/a_d_object_restore_param.go deleted file mode 100644 index ff3827b6..00000000 --- a/v1/models/a_d_object_restore_param.go +++ /dev/null @@ -1,136 +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" -) - -// ADObjectRestoreParam Restore AD objects from recycle bin or from a mounted AD snapshot database. -// -// swagger:model ADObjectRestoreParam -type ADObjectRestoreParam struct { - - // For restoring user type objects (user, inetOrgPerson or - // organizationalPerson LDAP classes) that is returned in search result with - // 'kRestorePasswordRequired' flag, an initial password is required. The - // password is UTF8 string encoded. Password cannot be empty - // and must satisfy production AD password complexity. If - // 'kFromDestRecycleBinIfFound' is true and the user is restored from - // production AD recycle bin, password will not be changed and the restored - // user retains their original password. For non-user type objects, this - // password value is ignored. The username field is ignored in the - // credentials. - Credentials *Credentials `json:"credentials,omitempty"` - - // Array of AD object guids to restore either from recycle bin or from AD - // snapshot. The guid should not exist in production AD. If it exits, then - // kDuplicate error is output in status. - GUIDVec []string `json:"guidVec"` - - // Restore option flags of type ADObjectRestoreOptionFlags. - OptionFlags *uint32 `json:"optionFlags,omitempty"` - - // Distinguished name(DN) of the target Organization Unit (OU) to restore - // non-OU object. This can be empty, in which case objects are restored - // to their original OU. The 'credential' specified must have privileges to - // add objects to this OU. Example: 'OU=SJC,OU=EngOU,DC=contoso,DC=com'. - // This parameter is ignored for OU objects. - OuPath *string `json:"ouPath,omitempty"` - - // When restoring a GPO, need to know the absolute path for SYSVOL folder. - SrcSysvolFolder *string `json:"srcSysvolFolder,omitempty"` -} - -// Validate validates this a d object restore param -func (m *ADObjectRestoreParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreParam) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d object restore param based on the context it is used -func (m *ADObjectRestoreParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreParam) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADObjectRestoreParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADObjectRestoreParam) UnmarshalBinary(b []byte) error { - var res ADObjectRestoreParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_object_restore_status.go b/v1/models/a_d_object_restore_status.go deleted file mode 100644 index 1767ac8c..00000000 --- a/v1/models/a_d_object_restore_status.go +++ /dev/null @@ -1,197 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ADObjectRestoreStatus AD object restore status for an object such as user, computer, group, etc. -// -// swagger:model ADObjectRestoreStatus -type ADObjectRestoreStatus struct { - - // Destination guid string of the AD object that is newly created on - // production AD corresponding to 'source_guid'. If the object was restored - // from production AD recycle Bin, this value can be empty or set to same - // value as 'source_guid'. If this value is non-empty and is different from - // source_guid, implying production AD object is a new object created - // in production AD as part of restore. - DestGUID *string `json:"destGuid,omitempty"` - - // Object result flags of type ADObjectFlags. - ObjectFlags *uint32 `json:"objectFlags,omitempty"` - - // AD object attribute(property) restore status vector. - PropertyStatusVec []*ADObjectRestoreStatusADAttributeRestoreStatus `json:"propertyStatusVec"` - - // Source guid of AD object that was restored. This - // will not be empty. This is populated from the source of request argument. - SourceGUID *string `json:"sourceGuid,omitempty"` - - // Error status at object level. Callers should inspect 'property_status_vec' - // for individual attribute restore failures. The attribute restore failures - // will not be rolled into this status. - Status *ErrorProto `json:"status,omitempty"` - - // Time taken in milliseconds to restore the individual object or attribute - // update. If this object restore was part of a batch, it shows the time - // taken once the operation was dispatched to AD for the object. This time - // can be useful in answering why some objects took long time to restore. - // Note that this time is not the elapsed time when the request was made - // from Magneto. - TimetakenMs *uint64 `json:"timetakenMs,omitempty"` -} - -// Validate validates this a d object restore status -func (m *ADObjectRestoreStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePropertyStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreStatus) validatePropertyStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.PropertyStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.PropertyStatusVec); i++ { - if swag.IsZero(m.PropertyStatusVec[i]) { // not required - continue - } - - if m.PropertyStatusVec[i] != nil { - if err := m.PropertyStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("propertyStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("propertyStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADObjectRestoreStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d object restore status based on the context it is used -func (m *ADObjectRestoreStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePropertyStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreStatus) contextValidatePropertyStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PropertyStatusVec); i++ { - - if m.PropertyStatusVec[i] != nil { - - if swag.IsZero(m.PropertyStatusVec[i]) { // not required - return nil - } - - if err := m.PropertyStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("propertyStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("propertyStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADObjectRestoreStatus) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADObjectRestoreStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADObjectRestoreStatus) UnmarshalBinary(b []byte) error { - var res ADObjectRestoreStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_object_restore_status_a_d_attribute_restore_status.go b/v1/models/a_d_object_restore_status_a_d_attribute_restore_status.go deleted file mode 100644 index 1d1426af..00000000 --- a/v1/models/a_d_object_restore_status_a_d_attribute_restore_status.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ADObjectRestoreStatusADAttributeRestoreStatus AD attribute (property) restore status for a specific property. -// -// swagger:model ADObjectRestoreStatus_ADAttributeRestoreStatus -type ADObjectRestoreStatusADAttributeRestoreStatus struct { - - // Error status. If the 'attrstatus_vec' is empty or contains kNoError, - // treat the attribute restore as success. For multi-valued properties such - // as 'memberOf', this vector may contain failure to add or remove specific - // value within the multi-value set. - AttrstatusVec []*ErrorProto `json:"attrstatusVec"` - - // LDAP name of the attribute. - LdapName *string `json:"ldapName,omitempty"` -} - -// Validate validates this a d object restore status a d attribute restore status -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttrstatusVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) validateAttrstatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttrstatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AttrstatusVec); i++ { - if swag.IsZero(m.AttrstatusVec[i]) { // not required - continue - } - - if m.AttrstatusVec[i] != nil { - if err := m.AttrstatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrstatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrstatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a d object restore status a d attribute restore status based on the context it is used -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttrstatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) contextValidateAttrstatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttrstatusVec); i++ { - - if m.AttrstatusVec[i] != nil { - - if swag.IsZero(m.AttrstatusVec[i]) { // not required - return nil - } - - if err := m.AttrstatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrstatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrstatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADObjectRestoreStatusADAttributeRestoreStatus) UnmarshalBinary(b []byte) error { - var res ADObjectRestoreStatusADAttributeRestoreStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_restore_status.go b/v1/models/a_d_restore_status.go deleted file mode 100644 index d5844d31..00000000 --- a/v1/models/a_d_restore_status.go +++ /dev/null @@ -1,167 +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" -) - -// ADRestoreStatus Represents AD restore status for object/attribute recovery. Each -// ADRestoreStatus entry will contain object_info: information about the object -// getting restored and status: status of the restore operation. object_info -// is used to generate the audit information of the AD restore operations. -// -// swagger:model ADRestoreStatus -type ADRestoreStatus struct { - - // The audit information about the AD object which was being recovered. - // This field will contain values like name,objectGUID,DN,objectClass and - // this information is used by the UI to show the audit information. - ObjectInfo *CompareADObjectsResultADObject `json:"objectInfo,omitempty"` - - // Status object for AD objects/attributes for which the restores - // were done. This is an echo of the restore status sent by the agent - // for restore RPC call. - Status *ADObjectRestoreStatus `json:"status,omitempty"` -} - -// Validate validates this a d restore status -func (m *ADRestoreStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADRestoreStatus) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *ADRestoreStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d restore status based on the context it is used -func (m *ADRestoreStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADRestoreStatus) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *ADRestoreStatus) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADRestoreStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADRestoreStatus) UnmarshalBinary(b []byte) error { - var res ADRestoreStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_sysvol_info.go b/v1/models/a_d_sysvol_info.go deleted file mode 100644 index 9961e393..00000000 --- a/v1/models/a_d_sysvol_info.go +++ /dev/null @@ -1,59 +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" -) - -// ADSysvolInfo Information about AD SYSVOL folder. -// -// If you change this message, update $ADSysvolInfo in -// magneto/agents/windows/ad/scripts/ad_entityhierarchy.psm1 to maintain JSON -// compatibility. -// -// swagger:model ADSysvolInfo -type ADSysvolInfo struct { - - // SYSVOL location. Example:C:\Windows\SYSVOL. - SysvolFolderPath *string `json:"sysvolFolderPath,omitempty"` - - // Volume device id where the SYSVOL folder lives. This should be - // included in VSS snapshot. - // Example: 63f6b242-8ec1-11e8-80e0-00505685e2a9 - SysvolVolumeGUID *string `json:"sysvolVolumeGuid,omitempty"` -} - -// Validate validates this a d sysvol info -func (m *ADSysvolInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a d sysvol info based on context it is used -func (m *ADSysvolInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADSysvolInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADSysvolInfo) UnmarshalBinary(b []byte) error { - var res ADSysvolInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_update_restore_task_options.go b/v1/models/a_d_update_restore_task_options.go deleted file mode 100644 index e9b7ce89..00000000 --- a/v1/models/a_d_update_restore_task_options.go +++ /dev/null @@ -1,165 +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" -) - -// ADUpdateRestoreTaskOptions AD specific options to update an AD restore task. -// -// swagger:model ADUpdateRestoreTaskOptions -type ADUpdateRestoreTaskOptions struct { - - // Object attributes restore params with the list of attributes to be - // restored. This is set only when type is kObjectAttributes. - ObjectAttributesParam *ADAttributeRestoreParam `json:"objectAttributesParam,omitempty"` - - // Object restore params with info about objects to be restored. This is - // set only when type is kObjects. - ObjectParam *ADObjectRestoreParam `json:"objectParam,omitempty"` - - // Specifies the AD restore request type. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this a d update restore task options -func (m *ADUpdateRestoreTaskOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectAttributesParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectParam(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADUpdateRestoreTaskOptions) validateObjectAttributesParam(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectAttributesParam) { // not required - return nil - } - - if m.ObjectAttributesParam != nil { - if err := m.ObjectAttributesParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectAttributesParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectAttributesParam") - } - return err - } - } - - return nil -} - -func (m *ADUpdateRestoreTaskOptions) validateObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectParam) { // not required - return nil - } - - if m.ObjectParam != nil { - if err := m.ObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectParam") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d update restore task options based on the context it is used -func (m *ADUpdateRestoreTaskOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectAttributesParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADUpdateRestoreTaskOptions) contextValidateObjectAttributesParam(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectAttributesParam != nil { - - if swag.IsZero(m.ObjectAttributesParam) { // not required - return nil - } - - if err := m.ObjectAttributesParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectAttributesParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectAttributesParam") - } - return err - } - } - - return nil -} - -func (m *ADUpdateRestoreTaskOptions) contextValidateObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectParam != nil { - - if swag.IsZero(m.ObjectParam) { // not required - return nil - } - - if err := m.ObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectParam") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADUpdateRestoreTaskOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADUpdateRestoreTaskOptions) UnmarshalBinary(b []byte) error { - var res ADUpdateRestoreTaskOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_d_user_info.go b/v1/models/a_d_user_info.go deleted file mode 100644 index d35dfb42..00000000 --- a/v1/models/a_d_user_info.go +++ /dev/null @@ -1,59 +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" -) - -// ADUserInfo IdP User Information. -// -// Specifies an AD User's information logged in using an active directory. -// This information is not stored on the Cluster. -// -// swagger:model ADUserInfo -type ADUserInfo struct { - - // Specifies the SIDs of the groups. - GroupSids []string `json:"groupSids"` - - // Specifies the groups this user is a part of. - Groups []string `json:"groups"` - - // Specifies whether this is a floating user or not. - IsFloatingUser *bool `json:"isFloatingUser,omitempty"` -} - -// Validate validates this a d user info -func (m *ADUserInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a d user info based on context it is used -func (m *ADUserInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADUserInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADUserInfo) UnmarshalBinary(b []byte) error { - var res ADUserInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_m_q_p_target_config.go b/v1/models/a_m_q_p_target_config.go deleted file mode 100644 index ec69a81a..00000000 --- a/v1/models/a_m_q_p_target_config.go +++ /dev/null @@ -1,68 +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" -) - -// AMQPTargetConfig Specifies the AMQP target config. -// -// swagger:model AMQPTargetConfig -type AMQPTargetConfig struct { - - // Specifies the certificate. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the exchange. - Exchange *string `json:"exchange,omitempty"` - - // Specifies the filer id. - FilerID *int64 `json:"filerId,omitempty"` - - // Specifies the password. - Password *string `json:"password,omitempty"` - - // Specifies the server ip. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the username. - Username *string `json:"username,omitempty"` - - // Specifies the virtual host. - VirtualHost *string `json:"virtualHost,omitempty"` -} - -// Validate validates this a m q p target config -func (m *AMQPTargetConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a m q p target config based on context it is used -func (m *AMQPTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AMQPTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AMQPTargetConfig) UnmarshalBinary(b []byte) error { - var res AMQPTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_fleet_params.go b/v1/models/a_w_s_fleet_params.go deleted file mode 100644 index 633a38ad..00000000 --- a/v1/models/a_w_s_fleet_params.go +++ /dev/null @@ -1,303 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AWSFleetParams Params for AWS fleets deployment. -// -// swagger:model AWSFleetParams -type AWSFleetParams struct { - - // Fleet's subnet type. This field should always be set when specifying - // fleet params. - FleetSubnetType *int32 `json:"fleetSubnetType,omitempty"` - - // Optional list of tags to be associated with the fleets. - FleetTagVec []*AWSFleetParamsTag `json:"fleetTagVec"` - - // Network information for the fleet. This will be only set when - // fleet_subnet_type is kCustom. - NetworkParams *AWSFleetParamsNetworkParams `json:"networkParams,omitempty"` - - // Map for a region to network params, as network params can be defined - // per region. Only set when kCustom fleet subnet type is being used. - NetworkParamsMap []*AWSFleetParamsNetworkParamsMapEntry `json:"networkParamsMap"` - - // Network information for the fleet. This will be only set when - // fleet_subnet_type is kCustom. - NetworkParamsVec []*AWSFleetParamsNetworkParams `json:"networkParamsVec"` -} - -// Validate validates this a w s fleet params -func (m *AWSFleetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetTagVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParamsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSFleetParams) validateFleetTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.FleetTagVec) { // not required - return nil - } - - for i := 0; i < len(m.FleetTagVec); i++ { - if swag.IsZero(m.FleetTagVec[i]) { // not required - continue - } - - if m.FleetTagVec[i] != nil { - if err := m.FleetTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AWSFleetParams) validateNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if m.NetworkParams != nil { - if err := m.NetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -func (m *AWSFleetParams) validateNetworkParamsMap(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParamsMap) { // not required - return nil - } - - for i := 0; i < len(m.NetworkParamsMap); i++ { - if swag.IsZero(m.NetworkParamsMap[i]) { // not required - continue - } - - if m.NetworkParamsMap[i] != nil { - if err := m.NetworkParamsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AWSFleetParams) validateNetworkParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.NetworkParamsVec); i++ { - if swag.IsZero(m.NetworkParamsVec[i]) { // not required - continue - } - - if m.NetworkParamsVec[i] != nil { - if err := m.NetworkParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a w s fleet params based on the context it is used -func (m *AWSFleetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFleetTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParamsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSFleetParams) contextValidateFleetTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FleetTagVec); i++ { - - if m.FleetTagVec[i] != nil { - - if swag.IsZero(m.FleetTagVec[i]) { // not required - return nil - } - - if err := m.FleetTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AWSFleetParams) contextValidateNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkParams != nil { - - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if err := m.NetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -func (m *AWSFleetParams) contextValidateNetworkParamsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkParamsMap); i++ { - - if m.NetworkParamsMap[i] != nil { - - if swag.IsZero(m.NetworkParamsMap[i]) { // not required - return nil - } - - if err := m.NetworkParamsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AWSFleetParams) contextValidateNetworkParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkParamsVec); i++ { - - if m.NetworkParamsVec[i] != nil { - - if swag.IsZero(m.NetworkParamsVec[i]) { // not required - return nil - } - - if err := m.NetworkParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSFleetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSFleetParams) UnmarshalBinary(b []byte) error { - var res AWSFleetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_fleet_params_network_params.go b/v1/models/a_w_s_fleet_params_network_params.go deleted file mode 100644 index a0ff7ac6..00000000 --- a/v1/models/a_w_s_fleet_params_network_params.go +++ /dev/null @@ -1,56 +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" -) - -// AWSFleetParamsNetworkParams Network params for a VM. -// -// swagger:model AWSFleetParams_NetworkParams -type AWSFleetParamsNetworkParams struct { - - // Region for the VM. - Region *string `json:"region,omitempty"` - - // Subnet for the VM. - Subnet *string `json:"subnet,omitempty"` - - // VPC for the VM. - Vpc *string `json:"vpc,omitempty"` -} - -// Validate validates this a w s fleet params network params -func (m *AWSFleetParamsNetworkParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a w s fleet params network params based on context it is used -func (m *AWSFleetParamsNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AWSFleetParamsNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSFleetParamsNetworkParams) UnmarshalBinary(b []byte) error { - var res AWSFleetParamsNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_fleet_params_network_params_map_entry.go b/v1/models/a_w_s_fleet_params_network_params_map_entry.go deleted file mode 100644 index e947fd56..00000000 --- a/v1/models/a_w_s_fleet_params_network_params_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// AWSFleetParamsNetworkParamsMapEntry a w s fleet params network params map entry -// -// swagger:model AWSFleetParams_NetworkParamsMapEntry -type AWSFleetParamsNetworkParamsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *AWSFleetParamsNetworkParams `json:"value,omitempty"` -} - -// Validate validates this a w s fleet params network params map entry -func (m *AWSFleetParamsNetworkParamsMapEntry) 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 -} - -func (m *AWSFleetParamsNetworkParamsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a w s fleet params network params map entry based on the context it is used -func (m *AWSFleetParamsNetworkParamsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSFleetParamsNetworkParamsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSFleetParamsNetworkParamsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSFleetParamsNetworkParamsMapEntry) UnmarshalBinary(b []byte) error { - var res AWSFleetParamsNetworkParamsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_fleet_params_tag.go b/v1/models/a_w_s_fleet_params_tag.go deleted file mode 100644 index 2f7e273b..00000000 --- a/v1/models/a_w_s_fleet_params_tag.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" -) - -// AWSFleetParamsTag Tag information. -// -// swagger:model AWSFleetParams_Tag -type AWSFleetParamsTag struct { - - // Key for the tag. - Key *string `json:"key,omitempty"` - - // Value for the tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this a w s fleet params tag -func (m *AWSFleetParamsTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a w s fleet params tag based on context it is used -func (m *AWSFleetParamsTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AWSFleetParamsTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSFleetParamsTag) UnmarshalBinary(b []byte) error { - var res AWSFleetParamsTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_native_backup_source_params.go b/v1/models/a_w_s_native_backup_source_params.go deleted file mode 100644 index 0dd3ead7..00000000 --- a/v1/models/a_w_s_native_backup_source_params.go +++ /dev/null @@ -1,109 +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" -) - -// AWSNativeBackupSourceParams Message defining the object-level params in AWS native backup. -// -// swagger:model AWSNativeBackupSourceParams -type AWSNativeBackupSourceParams struct { - - // Specifies the different criteria to exclude volumes from backup. - VolumeExclusionParams *EBSVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this a w s native backup source params -func (m *AWSNativeBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSNativeBackupSourceParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a w s native backup source params based on the context it is used -func (m *AWSNativeBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSNativeBackupSourceParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSNativeBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSNativeBackupSourceParams) UnmarshalBinary(b []byte) error { - var res AWSNativeBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_native_env_params.go b/v1/models/a_w_s_native_env_params.go deleted file mode 100644 index 4068b6e1..00000000 --- a/v1/models/a_w_s_native_env_params.go +++ /dev/null @@ -1,109 +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" -) - -// AWSNativeEnvParams Message defining the job-level params in AWS native backup. -// -// swagger:model AWSNativeEnvParams -type AWSNativeEnvParams struct { - - // Specifies the different criteria to exclude volumes from backup. - VolumeExclusionParams *EBSVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this a w s native env params -func (m *AWSNativeEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSNativeEnvParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a w s native env params based on the context it is used -func (m *AWSNativeEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSNativeEnvParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSNativeEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSNativeEnvParams) UnmarshalBinary(b []byte) error { - var res AWSNativeEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_snapshot_manager_backup_source_params.go b/v1/models/a_w_s_snapshot_manager_backup_source_params.go deleted file mode 100644 index 63e95ddd..00000000 --- a/v1/models/a_w_s_snapshot_manager_backup_source_params.go +++ /dev/null @@ -1,109 +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" -) - -// AWSSnapshotManagerBackupSourceParams Message defining the object-level params in AWS snapshot manager backup. -// -// swagger:model AWSSnapshotManagerBackupSourceParams -type AWSSnapshotManagerBackupSourceParams struct { - - // Specifies the different criteria to exclude volumes from backup. - VolumeExclusionParams *EBSVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this a w s snapshot manager backup source params -func (m *AWSSnapshotManagerBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSSnapshotManagerBackupSourceParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a w s snapshot manager backup source params based on the context it is used -func (m *AWSSnapshotManagerBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSSnapshotManagerBackupSourceParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSSnapshotManagerBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSSnapshotManagerBackupSourceParams) UnmarshalBinary(b []byte) error { - var res AWSSnapshotManagerBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/a_w_s_snapshot_manager_params.go b/v1/models/a_w_s_snapshot_manager_params.go deleted file mode 100644 index 35617564..00000000 --- a/v1/models/a_w_s_snapshot_manager_params.go +++ /dev/null @@ -1,121 +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" -) - -// AWSSnapshotManagerParams Proto to encapsulate additional params for AWS snapshot manager jobs. -// -// swagger:model AWSSnapshotManagerParams -type AWSSnapshotManagerParams struct { - - // The frequency of AMI creation. This should be set if the option to create - // AMI is set. A value of n creates an AMI from the snapshots after every n - // runs. eg. n = 2 implies every alternate backup run starting from the first - // will create an AMI. - AmiCreationFrequency *int32 `json:"amiCreationFrequency,omitempty"` - - // Whether we need to create an AMI for this run. - CreateAmiForRun *bool `json:"createAmiForRun,omitempty"` - - // Whether we need to create an AMI after taking snapshots of the instance. - ShouldCreateAmi *bool `json:"shouldCreateAmi,omitempty"` - - // Specifies the different criteria to exclude volumes from backup. - VolumeExclusionParams *EBSVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this a w s snapshot manager params -func (m *AWSSnapshotManagerParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSSnapshotManagerParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a w s snapshot manager params based on the context it is used -func (m *AWSSnapshotManagerParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSSnapshotManagerParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSSnapshotManagerParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSSnapshotManagerParams) UnmarshalBinary(b []byte) error { - var res AWSSnapshotManagerParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aag_and_databases.go b/v1/models/aag_and_databases.go deleted file mode 100644 index d7a2ad6e..00000000 --- a/v1/models/aag_and_databases.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AagAndDatabases AAG And Databases. -// -// Specifies an AAG and the database members of the AAG. -// -// swagger:model AagAndDatabases -type AagAndDatabases struct { - - // Specifies an AAG Protection Source object on a VM or a Physical host. - Aag *ProtectionSource `json:"aag,omitempty"` - - // Specifies databases found that are members of the AAG. - Databases []*ProtectionSource `json:"databases"` -} - -// Validate validates this aag and databases -func (m *AagAndDatabases) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAag(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabases(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AagAndDatabases) validateAag(formats strfmt.Registry) error { - if swag.IsZero(m.Aag) { // not required - return nil - } - - if m.Aag != nil { - if err := m.Aag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aag") - } - return err - } - } - - return nil -} - -func (m *AagAndDatabases) validateDatabases(formats strfmt.Registry) error { - if swag.IsZero(m.Databases) { // not required - return nil - } - - for i := 0; i < len(m.Databases); i++ { - if swag.IsZero(m.Databases[i]) { // not required - continue - } - - if m.Databases[i] != nil { - if err := m.Databases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aag and databases based on the context it is used -func (m *AagAndDatabases) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAag(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabases(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AagAndDatabases) contextValidateAag(ctx context.Context, formats strfmt.Registry) error { - - if m.Aag != nil { - - if swag.IsZero(m.Aag) { // not required - return nil - } - - if err := m.Aag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aag") - } - return err - } - } - - return nil -} - -func (m *AagAndDatabases) contextValidateDatabases(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Databases); i++ { - - if m.Databases[i] != nil { - - if swag.IsZero(m.Databases[i]) { // not required - return nil - } - - if err := m.Databases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AagAndDatabases) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AagAndDatabases) UnmarshalBinary(b []byte) error { - var res AagAndDatabases - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/abort_incomplete_multipart_upload_action.go b/v1/models/abort_incomplete_multipart_upload_action.go deleted file mode 100644 index f1b1f8a1..00000000 --- a/v1/models/abort_incomplete_multipart_upload_action.go +++ /dev/null @@ -1,51 +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" -) - -// AbortIncompleteMultipartUploadAction Proto to define Lifecycle AbortIncompleteMultipartUploadAction. -// -// swagger:model AbortIncompleteMultipartUploadAction -type AbortIncompleteMultipartUploadAction struct { - - // Specifies the number of days after which to abort an incomplete multipart - // upload. - DaysAfterInitiation *int64 `json:"daysAfterInitiation,omitempty"` -} - -// Validate validates this abort incomplete multipart upload action -func (m *AbortIncompleteMultipartUploadAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this abort incomplete multipart upload action based on context it is used -func (m *AbortIncompleteMultipartUploadAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AbortIncompleteMultipartUploadAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AbortIncompleteMultipartUploadAction) UnmarshalBinary(b []byte) error { - var res AbortIncompleteMultipartUploadAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/access_token.go b/v1/models/access_token.go deleted file mode 100644 index 507af2fa..00000000 --- a/v1/models/access_token.go +++ /dev/null @@ -1,59 +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" -) - -// AccessToken Access Token. -// -// Specifies an Access Token that provides permissions for a client to access -// the Cohesity REST API available from a Cohesity Cluster. -// -// swagger:model AccessToken -type AccessToken struct { - - // Generated access token. - AccessToken *string `json:"accessToken,omitempty"` - - // Privileges for the user. - Privileges []string `json:"privileges"` - - // Access token type. - TokenType *string `json:"tokenType,omitempty"` -} - -// Validate validates this access token -func (m *AccessToken) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this access token based on context it is used -func (m *AccessToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccessToken) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccessToken) UnmarshalBinary(b []byte) error { - var res AccessToken - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/access_token_credential.go b/v1/models/access_token_credential.go deleted file mode 100644 index ec5ff37c..00000000 --- a/v1/models/access_token_credential.go +++ /dev/null @@ -1,130 +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" -) - -// AccessTokenCredential Create Access Token Credential Request. -// -// Specifies the Cohesity credentials required for generating an access token. -// -// swagger:model AccessTokenCredential -type AccessTokenCredential struct { - - // Specifies the certificate for logging in the cert base auth cluster. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the domain the user is logging in to. For a Local user model, - // the domain is always LOCAL. For LDAP/AD user models, the domain will map to - // an LDAP connection string. A user is uniquely identified by a - // combination of username and domain. If this is not set, LOCAL is assumed. - Domain *string `json:"domain,omitempty"` - - // Specifies OTP code for MFA verification. - OtpCode *string `json:"otpCode,omitempty"` - - // Specifies OTP type for MFA verification. - // 'Totp' implies the code is TOTP. - // 'Email' implies the code is email OTP. - // Enum: ["Totp","Email"] - OtpType *string `json:"otpType,omitempty"` - - // Specifies the password of the Cohesity user account. - Password *string `json:"password,omitempty"` - - // Specifies the matching private key of the above certificate. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies the login name of the Cohesity user. - Username *string `json:"username,omitempty"` -} - -// Validate validates this access token credential -func (m *AccessTokenCredential) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOtpType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var accessTokenCredentialTypeOtpTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Totp","Email"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - accessTokenCredentialTypeOtpTypePropEnum = append(accessTokenCredentialTypeOtpTypePropEnum, v) - } -} - -const ( - - // AccessTokenCredentialOtpTypeTotp captures enum value "Totp" - AccessTokenCredentialOtpTypeTotp string = "Totp" - - // AccessTokenCredentialOtpTypeEmail captures enum value "Email" - AccessTokenCredentialOtpTypeEmail string = "Email" -) - -// prop value enum -func (m *AccessTokenCredential) validateOtpTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, accessTokenCredentialTypeOtpTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AccessTokenCredential) validateOtpType(formats strfmt.Registry) error { - if swag.IsZero(m.OtpType) { // not required - return nil - } - - // value enum - if err := m.validateOtpTypeEnum("otpType", "body", *m.OtpType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this access token credential based on context it is used -func (m *AccessTokenCredential) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccessTokenCredential) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccessTokenCredential) UnmarshalBinary(b []byte) error { - var res AccessTokenCredential - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acl_proto.go b/v1/models/acl_proto.go deleted file mode 100644 index f4334e04..00000000 --- a/v1/models/acl_proto.go +++ /dev/null @@ -1,230 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ACLProto Protobuf that describes the access control list (ACL) permissions for a -// bucket or for an object. -// -// swagger:model ACLProto -type ACLProto struct { - - // CommonACL of the Swift container. - CommonACL *CommonACLProto `json:"commonAcl,omitempty"` - - // grant vec - GrantVec []*ACLProtoGrant `json:"grantVec"` - - // KeystoneACL of the Swift container. - KeystoneACL *KeystoneACLProto `json:"keystoneAcl,omitempty"` - - // Swift ACL strings. - SwiftReadACL *string `json:"swiftReadAcl,omitempty"` - - // swift write Acl - SwiftWriteACL *string `json:"swiftWriteAcl,omitempty"` -} - -// Validate validates this ACL proto -func (m *ACLProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCommonACL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGrantVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeystoneACL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLProto) validateCommonACL(formats strfmt.Registry) error { - if swag.IsZero(m.CommonACL) { // not required - return nil - } - - if m.CommonACL != nil { - if err := m.CommonACL.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonAcl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonAcl") - } - return err - } - } - - return nil -} - -func (m *ACLProto) validateGrantVec(formats strfmt.Registry) error { - if swag.IsZero(m.GrantVec) { // not required - return nil - } - - for i := 0; i < len(m.GrantVec); i++ { - if swag.IsZero(m.GrantVec[i]) { // not required - continue - } - - if m.GrantVec[i] != nil { - if err := m.GrantVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ACLProto) validateKeystoneACL(formats strfmt.Registry) error { - if swag.IsZero(m.KeystoneACL) { // not required - return nil - } - - if m.KeystoneACL != nil { - if err := m.KeystoneACL.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneAcl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneAcl") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ACL proto based on the context it is used -func (m *ACLProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCommonACL(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGrantVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeystoneACL(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLProto) contextValidateCommonACL(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonACL != nil { - - if swag.IsZero(m.CommonACL) { // not required - return nil - } - - if err := m.CommonACL.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonAcl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonAcl") - } - return err - } - } - - return nil -} - -func (m *ACLProto) contextValidateGrantVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GrantVec); i++ { - - if m.GrantVec[i] != nil { - - if swag.IsZero(m.GrantVec[i]) { // not required - return nil - } - - if err := m.GrantVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ACLProto) contextValidateKeystoneACL(ctx context.Context, formats strfmt.Registry) error { - - if m.KeystoneACL != nil { - - if swag.IsZero(m.KeystoneACL) { // not required - return nil - } - - if err := m.KeystoneACL.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneAcl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneAcl") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ACLProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ACLProto) UnmarshalBinary(b []byte) error { - var res ACLProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acl_proto_grant.go b/v1/models/acl_proto_grant.go deleted file mode 100644 index 00be8e00..00000000 --- a/v1/models/acl_proto_grant.go +++ /dev/null @@ -1,113 +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" -) - -// ACLProtoGrant Message to define a grantee and its permission. -// -// swagger:model ACLProto_Grant -type ACLProtoGrant struct { - - // Identifier of a grantee. It can be either a registered user or one of - // Amazon S3 predefined group. - Grantee *GranteeProto `json:"grantee,omitempty"` - - // Vector of permission granted to this grantee. - PermissionVec []int32 `json:"permissionVec"` -} - -// Validate validates this ACL proto grant -func (m *ACLProtoGrant) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGrantee(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLProtoGrant) validateGrantee(formats strfmt.Registry) error { - if swag.IsZero(m.Grantee) { // not required - return nil - } - - if m.Grantee != nil { - if err := m.Grantee.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantee") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantee") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ACL proto grant based on the context it is used -func (m *ACLProtoGrant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGrantee(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLProtoGrant) contextValidateGrantee(ctx context.Context, formats strfmt.Registry) error { - - if m.Grantee != nil { - - if swag.IsZero(m.Grantee) { // not required - return nil - } - - if err := m.Grantee.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantee") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantee") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ACLProtoGrant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ACLProtoGrant) UnmarshalBinary(b []byte) error { - var res ACLProtoGrant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_backup_job_params.go b/v1/models/acropolis_backup_job_params.go deleted file mode 100644 index 0c56523c..00000000 --- a/v1/models/acropolis_backup_job_params.go +++ /dev/null @@ -1,191 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AcropolisBackupJobParams Acropolis Backup Job Parameters. -// -// Message to capture any additional backup params for Acropolis environment. -// -// swagger:model AcropolisBackupJobParams -type AcropolisBackupJobParams struct { - - // List of Virtual Disk(s) to be excluded from the backup job. These disks - // will be excluded for all VMs in this environment unless overriden by the - // disk exclusion/inclusion list from - // BackupSourceParams.AcropolisBackupSourceParams. - AcropolisDiskExclusionInfo []*AcropolisDiskFilterProto `json:"acropolisDiskExclusionInfo"` - - // List of Virtual Disk(s) to be included from the backup job. These disks - // will be included for all VMs in this environment and all other disks will - // be excluded. It can be overriden by the disk exclusion/inclusion list from - // BackupSourceParams.AcropolisBackupSourceParams. - AcropolisDiskInclusionInfo []*AcropolisDiskFilterProto `json:"acropolisDiskInclusionInfo"` -} - -// Validate validates this acropolis backup job params -func (m *AcropolisBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisDiskInclusionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisBackupJobParams) validateAcropolisDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.AcropolisDiskExclusionInfo); i++ { - if swag.IsZero(m.AcropolisDiskExclusionInfo[i]) { // not required - continue - } - - if m.AcropolisDiskExclusionInfo[i] != nil { - if err := m.AcropolisDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisBackupJobParams) validateAcropolisDiskInclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisDiskInclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.AcropolisDiskInclusionInfo); i++ { - if swag.IsZero(m.AcropolisDiskInclusionInfo[i]) { // not required - continue - } - - if m.AcropolisDiskInclusionInfo[i] != nil { - if err := m.AcropolisDiskInclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this acropolis backup job params based on the context it is used -func (m *AcropolisBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisDiskInclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisBackupJobParams) contextValidateAcropolisDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AcropolisDiskExclusionInfo); i++ { - - if m.AcropolisDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.AcropolisDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.AcropolisDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisBackupJobParams) contextValidateAcropolisDiskInclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AcropolisDiskInclusionInfo); i++ { - - if m.AcropolisDiskInclusionInfo[i] != nil { - - if swag.IsZero(m.AcropolisDiskInclusionInfo[i]) { // not required - return nil - } - - if err := m.AcropolisDiskInclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisBackupJobParams) UnmarshalBinary(b []byte) error { - var res AcropolisBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_backup_params.go b/v1/models/acropolis_backup_params.go deleted file mode 100644 index 12dab109..00000000 --- a/v1/models/acropolis_backup_params.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" -) - -// AcropolisBackupParams This message contains additional params for backups in Acropolis -// environment. -// -// swagger:model AcropolisBackupParams -type AcropolisBackupParams struct { - - // If this flag is set to true, then each backup task will also use root - // entity for requesting permit from master. This will be useful to throttle - // overall number of VMs backed up at Acropolis Cluster level. - IncludeRootEntityForBackupTaskLock *bool `json:"includeRootEntityForBackupTaskLock,omitempty"` -} - -// Validate validates this acropolis backup params -func (m *AcropolisBackupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this acropolis backup params based on context it is used -func (m *AcropolisBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisBackupParams) UnmarshalBinary(b []byte) error { - var res AcropolisBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_backup_source_params.go b/v1/models/acropolis_backup_source_params.go deleted file mode 100644 index fd8151b8..00000000 --- a/v1/models/acropolis_backup_source_params.go +++ /dev/null @@ -1,190 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AcropolisBackupSourceParams Acropolis Backup Source Parameters. -// -// Message to capture additional backup params for a Acropolis type source. -// -// swagger:model AcropolisBackupSourceParams -type AcropolisBackupSourceParams struct { - - // List of Virtual Disk(s) to be excluded from the from the backup job for - // the source. Overrides the exclusion list requested (if any) through - // EnvBackupParams.AcropolisBackupEnvParams. - AcropolisDiskExclusionInfo []*AcropolisDiskFilterProto `json:"acropolisDiskExclusionInfo"` - - // List of Virtual Disk(s) to be included from the from the backup job for - // the source. These disks will be only included for the source and all other - // disks will be excluded. Overrides the disk exclusion/inclusion list from - // EnvBackupParams.AcropolisBackupEnvParams. - AcropolisDiskInclusionInfo []*AcropolisDiskFilterProto `json:"acropolisDiskInclusionInfo"` -} - -// Validate validates this acropolis backup source params -func (m *AcropolisBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisDiskInclusionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisBackupSourceParams) validateAcropolisDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.AcropolisDiskExclusionInfo); i++ { - if swag.IsZero(m.AcropolisDiskExclusionInfo[i]) { // not required - continue - } - - if m.AcropolisDiskExclusionInfo[i] != nil { - if err := m.AcropolisDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisBackupSourceParams) validateAcropolisDiskInclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisDiskInclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.AcropolisDiskInclusionInfo); i++ { - if swag.IsZero(m.AcropolisDiskInclusionInfo[i]) { // not required - continue - } - - if m.AcropolisDiskInclusionInfo[i] != nil { - if err := m.AcropolisDiskInclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this acropolis backup source params based on the context it is used -func (m *AcropolisBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisDiskInclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisBackupSourceParams) contextValidateAcropolisDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AcropolisDiskExclusionInfo); i++ { - - if m.AcropolisDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.AcropolisDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.AcropolisDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisBackupSourceParams) contextValidateAcropolisDiskInclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AcropolisDiskInclusionInfo); i++ { - - if m.AcropolisDiskInclusionInfo[i] != nil { - - if swag.IsZero(m.AcropolisDiskInclusionInfo[i]) { // not required - return nil - } - - if err := m.AcropolisDiskInclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisBackupSourceParams) UnmarshalBinary(b []byte) error { - var res AcropolisBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_disk_filter_proto.go b/v1/models/acropolis_disk_filter_proto.go deleted file mode 100644 index 488f3f26..00000000 --- a/v1/models/acropolis_disk_filter_proto.go +++ /dev/null @@ -1,55 +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" -) - -// AcropolisDiskFilterProto Acropolis Disk Filter Proto. -// -// This message contains basic info of the disk to be filtered from backup. -// -// swagger:model AcropolisDiskFilterProto -type AcropolisDiskFilterProto struct { - - // Bus type (SCSI, IDE, PCI, SATA, SPAPR, NVME). - BusType *string `json:"busType,omitempty"` - - // Index/Unit number of the disk. - Index *int32 `json:"index,omitempty"` -} - -// Validate validates this acropolis disk filter proto -func (m *AcropolisDiskFilterProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this acropolis disk filter proto based on context it is used -func (m *AcropolisDiskFilterProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisDiskFilterProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisDiskFilterProto) UnmarshalBinary(b []byte) error { - var res AcropolisDiskFilterProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_protection_source.go b/v1/models/acropolis_protection_source.go deleted file mode 100644 index c3ebe80f..00000000 --- a/v1/models/acropolis_protection_source.go +++ /dev/null @@ -1,237 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AcropolisProtectionSource Acropolis Protection Source. -// -// Specifies a Protection Source in Acropolis environment. -// -// swagger:model AcropolisProtectionSource -type AcropolisProtectionSource struct { - - // Specifies the UUID of the Acropolis cluster instance to which this - // entity belongs to. - ClusterUUID *string `json:"clusterUuid,omitempty"` - - // Specifies a description about the Protection Source. - Description *string `json:"description,omitempty"` - - // Specifies whether the VM is an agent VM. This is applicable to - // acropolis entity of type kVirtualMachine. - MountPath *bool `json:"mountPath,omitempty"` - - // Specifies the name of the Acropolis Object. - Name *string `json:"name,omitempty"` - - // Specifies enabled capabilities for NGT on the VM. This is applicable to - // acropolis entity of type kVirtualMachine. - NgtCapabilities []int32 `json:"ngtCapabilities"` - - // Specifies if NGT is enabled on the VM. This is applicable to acropolis - // entity of type kVirtualMachine. - NgtEnableStatus *int32 `json:"ngtEnableStatus,omitempty"` - - // Specified if NGT is installed on the VM. This is applicable to acropolis - // entity of type kVirtualMachine. - NgtInstallStatus *int32 `json:"ngtInstallStatus,omitempty"` - - // Specifies if NGT on the VM is reachable from Controller VM. - // This is applicable to acropolis entity of type kVirtualMachine. - NgtReachable *bool `json:"ngtReachable,omitempty"` - - // Specifies version of NGT installed on the VM. This is applicable to - // acropolis entity of type kVirtualMachine. - NgtVersion *string `json:"ngtVersion,omitempty"` - - // Specifies the type of an Acropolis Protection Source Object such as - // 'kPrismCentral', 'kHost', 'kNetwork', etc. - // Enum: ["kPrismCentral","kStandaloneCluster","kOtherHypervisorCluster","kCluster","kHost","kVirtualMachine","kNetwork","kStorageContainer"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID of the Acropolis Object. This is unique within the - // cluster instance. Together with clusterUuid, this entity is unique - // within the Acropolis environment. - UUID *string `json:"uuid,omitempty"` - - // Specifies the version of an Acropolis cluster or standalone cluster. - Version *string `json:"version,omitempty"` - - // Specifies an array of virtual disks that are part of the Virtual Machine. - // This is populated for entities of type 'kVirtualMachine'. - VirtualDisks []*VirtualDiskConfig `json:"virtualDisks"` -} - -// Validate validates this acropolis protection source -func (m *AcropolisProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var acropolisProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrismCentral","kStandaloneCluster","kOtherHypervisorCluster","kCluster","kHost","kVirtualMachine","kNetwork","kStorageContainer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - acropolisProtectionSourceTypeTypePropEnum = append(acropolisProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // AcropolisProtectionSourceTypeKPrismCentral captures enum value "kPrismCentral" - AcropolisProtectionSourceTypeKPrismCentral string = "kPrismCentral" - - // AcropolisProtectionSourceTypeKStandaloneCluster captures enum value "kStandaloneCluster" - AcropolisProtectionSourceTypeKStandaloneCluster string = "kStandaloneCluster" - - // AcropolisProtectionSourceTypeKOtherHypervisorCluster captures enum value "kOtherHypervisorCluster" - AcropolisProtectionSourceTypeKOtherHypervisorCluster string = "kOtherHypervisorCluster" - - // AcropolisProtectionSourceTypeKCluster captures enum value "kCluster" - AcropolisProtectionSourceTypeKCluster string = "kCluster" - - // AcropolisProtectionSourceTypeKHost captures enum value "kHost" - AcropolisProtectionSourceTypeKHost string = "kHost" - - // AcropolisProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - AcropolisProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // AcropolisProtectionSourceTypeKNetwork captures enum value "kNetwork" - AcropolisProtectionSourceTypeKNetwork string = "kNetwork" - - // AcropolisProtectionSourceTypeKStorageContainer captures enum value "kStorageContainer" - AcropolisProtectionSourceTypeKStorageContainer string = "kStorageContainer" -) - -// prop value enum -func (m *AcropolisProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, acropolisProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AcropolisProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionSource) validateVirtualDisks(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDisks) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDisks); i++ { - if swag.IsZero(m.VirtualDisks[i]) { // not required - continue - } - - if m.VirtualDisks[i] != nil { - if err := m.VirtualDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this acropolis protection source based on the context it is used -func (m *AcropolisProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVirtualDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisProtectionSource) contextValidateVirtualDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDisks); i++ { - - if m.VirtualDisks[i] != nil { - - if swag.IsZero(m.VirtualDisks[i]) { // not required - return nil - } - - if err := m.VirtualDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisProtectionSource) UnmarshalBinary(b []byte) error { - var res AcropolisProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/acropolis_restore_parameters.go b/v1/models/acropolis_restore_parameters.go deleted file mode 100644 index 6f17dbaa..00000000 --- a/v1/models/acropolis_restore_parameters.go +++ /dev/null @@ -1,92 +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" -) - -// AcropolisRestoreParameters This field defines the Acropolis specific params for restore tasks of type -// kRecoverVMs. -// -// swagger:model AcropolisRestoreParameters -type AcropolisRestoreParameters struct { - - // Specifies whether the network should be left in disabled state. - // Attached network is enabled by default. Set this flag to true to - // disable it. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies a network configuration to be attached to the cloned or - // recovered object. - // For kCloneVMs and kRecoverVMs tasks, original network configuration - // is detached if the cloned or recovered object is kept under a different - // parent Protection Source or a different Resource Pool. - // By default, for kRecoverVMs task, original network configuration is - // preserved if the recovered object is kept under the same parent - // Protection Source and the same Resource Pool. - // Specify this field to override the preserved network configuration or - // to attach a new network configuration to the cloned or recovered objects. - // You can get the networkId of the kNetwork object by setting - // includeNetworks to 'true' in the GET /public/protectionSources operation. - // In the response, get the id of the desired kNetwork object, the resource - // pool, and the registered parent Protection Source. - NetworkID *int64 `json:"networkId,omitempty"` - - // Specifies the power state of the cloned or recovered objects. - // By default, the cloned or recovered objects are powered off. - PoweredOn *bool `json:"poweredOn,omitempty"` - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // A storage container where the VM's files should be restored to. This - // field is optional if the VM is being restored to its original parent - // source. If not specified, the VM's files will be restored to their - // original storage container(s). This field is mandatory if the VMs are - // being restored to a different parent source. - StorageContainerID *int64 `json:"storageContainerId,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this acropolis restore parameters -func (m *AcropolisRestoreParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this acropolis restore parameters based on context it is used -func (m *AcropolisRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisRestoreParameters) UnmarshalBinary(b []byte) error { - var res AcropolisRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/activate_view_aliases_result.go b/v1/models/activate_view_aliases_result.go deleted file mode 100644 index b86dec88..00000000 --- a/v1/models/activate_view_aliases_result.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ActivateViewAliasesResult Activate View Aliases Result. -// -// Specifies the information of activated alias views created -// for a view. -// -// swagger:model ActivateViewAliasesResult -type ActivateViewAliasesResult struct { - - // Aliases created for the view. A view alias allows a directory path inside - // a view to be mounted using the alias name. - Aliases []*ViewAlias `json:"aliases"` -} - -// Validate validates this activate view aliases result -func (m *ActivateViewAliasesResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAliases(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActivateViewAliasesResult) validateAliases(formats strfmt.Registry) error { - if swag.IsZero(m.Aliases) { // not required - return nil - } - - for i := 0; i < len(m.Aliases); i++ { - if swag.IsZero(m.Aliases[i]) { // not required - continue - } - - if m.Aliases[i] != nil { - if err := m.Aliases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this activate view aliases result based on the context it is used -func (m *ActivateViewAliasesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAliases(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActivateViewAliasesResult) contextValidateAliases(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Aliases); i++ { - - if m.Aliases[i] != nil { - - if swag.IsZero(m.Aliases[i]) { // not required - return nil - } - - if err := m.Aliases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActivateViewAliasesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActivateViewAliasesResult) UnmarshalBinary(b []byte) error { - var res ActivateViewAliasesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/active_alerts_stats.go b/v1/models/active_alerts_stats.go deleted file mode 100644 index eaab3d63..00000000 --- a/v1/models/active_alerts_stats.go +++ /dev/null @@ -1,115 +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" -) - -// ActiveAlertsStats Active Alert Statistics. -// -// Specifies the active alert statistics details. -// -// swagger:model ActiveAlertsStats -type ActiveAlertsStats struct { - - // Specifies the count of active critical Alerts excluding alerts that belong to other bucket. - NumCriticalAlerts *int64 `json:"numCriticalAlerts,omitempty"` - - // Specifies the count of active critical alerts categories. - NumCriticalAlertsCategories *int64 `json:"numCriticalAlertsCategories,omitempty"` - - // Specifies the count of active service Alerts. - NumDataServiceAlerts *int64 `json:"numDataServiceAlerts,omitempty"` - - // Specifies the count of active service critical Alerts. - NumDataServiceCriticalAlerts *int64 `json:"numDataServiceCriticalAlerts,omitempty"` - - // Specifies the count of active service info Alerts. - NumDataServiceInfoAlerts *int64 `json:"numDataServiceInfoAlerts,omitempty"` - - // Specifies the count of active service warning Alerts. - NumDataServiceWarningAlerts *int64 `json:"numDataServiceWarningAlerts,omitempty"` - - // Specifies the count of active hardware Alerts. - NumHardwareAlerts *int64 `json:"numHardwareAlerts,omitempty"` - - // Specifies the count of active hardware critical Alerts. - NumHardwareCriticalAlerts *int64 `json:"numHardwareCriticalAlerts,omitempty"` - - // Specifies the count of active hardware info Alerts. - NumHardwareInfoAlerts *int64 `json:"numHardwareInfoAlerts,omitempty"` - - // Specifies the count of active hardware warning Alerts. - NumHardwareWarningAlerts *int64 `json:"numHardwareWarningAlerts,omitempty"` - - // Specifies the count of active info Alerts excluding alerts that belong to other bucket. - NumInfoAlerts *int64 `json:"numInfoAlerts,omitempty"` - - // Specifies the count of active info alerts categories. - NumInfoAlertsCategories *int64 `json:"numInfoAlertsCategories,omitempty"` - - // Specifies the count of active Alerts of maintenance bucket - NumMaintenanceAlerts *int64 `json:"numMaintenanceAlerts,omitempty"` - - // Specifies the count of active other critical Alerts. - NumMaintenanceCriticalAlerts *int64 `json:"numMaintenanceCriticalAlerts,omitempty"` - - // Specifies the count of active other info Alerts. - NumMaintenanceInfoAlerts *int64 `json:"numMaintenanceInfoAlerts,omitempty"` - - // Specifies the count of active other warning Alerts. - NumMaintenanceWarningAlerts *int64 `json:"numMaintenanceWarningAlerts,omitempty"` - - // Specifies the count of active software Alerts. - NumSoftwareAlerts *int64 `json:"numSoftwareAlerts,omitempty"` - - // Specifies the count of active software critical Alerts. - NumSoftwareCriticalAlerts *int64 `json:"numSoftwareCriticalAlerts,omitempty"` - - // Specifies the count of active software info Alerts. - NumSoftwareInfoAlerts *int64 `json:"numSoftwareInfoAlerts,omitempty"` - - // Specifies the count of active software warning Alerts. - NumSoftwareWarningAlerts *int64 `json:"numSoftwareWarningAlerts,omitempty"` - - // Specifies the count of active warning Alerts excluding alerts that belong to other bucket. - NumWarningAlerts *int64 `json:"numWarningAlerts,omitempty"` - - // Specifies the count of active warning alerts categories. - NumWarningAlertsCategories *int64 `json:"numWarningAlertsCategories,omitempty"` -} - -// Validate validates this active alerts stats -func (m *ActiveAlertsStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this active alerts stats based on context it is used -func (m *ActiveAlertsStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveAlertsStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveAlertsStats) UnmarshalBinary(b []byte) error { - var res ActiveAlertsStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/active_directory_entry.go b/v1/models/active_directory_entry.go deleted file mode 100644 index cff1387b..00000000 --- a/v1/models/active_directory_entry.go +++ /dev/null @@ -1,297 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ActiveDirectoryEntry Active Directory. -// -// Specifies the join settings for a Microsoft Active Directory domain. -// -// swagger:model ActiveDirectoryEntry -type ActiveDirectoryEntry struct { - - // Specifies the fully qualified domain name (FQDN) of an Active Directory. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the fallback id mapping info which is used when an ID mapping - // for a user is not found via the above IdMappingInfo. Only supported for - // two types of fallback mapping types - 'kRid' and 'kFixed'. - FallbackUserIDMappingInfo *UserIDMapping `json:"fallbackUserIdMappingInfo,omitempty"` - - // Specifies if Active Directory entry should be force removed from cluster. - ForceRemove *bool `json:"forceRemove,omitempty"` - - // Specifies the list of trusted domains that were set by the user to be - // ignored during trusted domain discovery. - IgnoredTrustedDomains []string `json:"ignoredTrustedDomains"` - - // Specifies the LDAP provider id which is map to this Active Directory - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Array of Machine Accounts. - // - // Specifies an array of computer names used to identify the Cohesity - // Cluster on the domain. - MachineAccounts []string `json:"machineAccounts"` - - // Specifies whether to use 'whitelistedDomains' only for authentication. - OnlyUseWhitelistedDomains *bool `json:"onlyUseWhitelistedDomains,omitempty"` - - // Specifies an optional Organizational Unit name. - OuName *string `json:"ouName,omitempty"` - - // Specifies the password for the specified userName. - Password *string `json:"password,omitempty"` - - // Specifies Map of Active Directory domain names to its preferred domain - // controllers. - PreferredDomainControllers []*PreferredDomainController `json:"preferredDomainControllers"` - - // Specifies the task path for AD joining task. - TaskPath *string `json:"taskPath,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the trusted domains of the Active Directory domain. - // Read Only: true - TrustedDomains []string `json:"trustedDomains"` - - // Specifies whether Trusted Domain discovery is disabled. - TrustedDomainsEnabled *bool `json:"trustedDomainsEnabled,omitempty"` - - // Specifies the SID of the Active Directory domain user to be mapped to - // Unix root user. - UnixRootSid *string `json:"unixRootSid,omitempty"` - - // Specifies the information about how the Unix and Windows users are mapped - // for this domain. - UserIDMappingInfo *UserIDMapping `json:"userIdMappingInfo,omitempty"` - - // Specifies a userName that has administrative privileges in the domain. - UserName *string `json:"userName,omitempty"` - - // Specifies the Whitelisted Domains of the Active Directory domain. - WhitelistedDomains []string `json:"whitelistedDomains"` - - // Specifies an optional Workgroup name. - Workgroup *string `json:"workgroup,omitempty"` -} - -// Validate validates this active directory entry -func (m *ActiveDirectoryEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreferredDomainControllers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryEntry) validateFallbackUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if m.FallbackUserIDMappingInfo != nil { - if err := m.FallbackUserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *ActiveDirectoryEntry) validatePreferredDomainControllers(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredDomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - continue - } - - if m.PreferredDomainControllers[i] != nil { - if err := m.PreferredDomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectoryEntry) validateUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if m.UserIDMappingInfo != nil { - if err := m.UserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this active directory entry based on the context it is used -func (m *ActiveDirectoryEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreferredDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTrustedDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryEntry) contextValidateFallbackUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackUserIDMappingInfo != nil { - - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if err := m.FallbackUserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *ActiveDirectoryEntry) contextValidatePreferredDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - - if m.PreferredDomainControllers[i] != nil { - - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - return nil - } - - if err := m.PreferredDomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectoryEntry) contextValidateTrustedDomains(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "trustedDomains", "body", []string(m.TrustedDomains)); err != nil { - return err - } - - return nil -} - -func (m *ActiveDirectoryEntry) contextValidateUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserIDMappingInfo != nil { - - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if err := m.UserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryEntry) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/active_directory_principal.go b/v1/models/active_directory_principal.go deleted file mode 100644 index 80c4a67c..00000000 --- a/v1/models/active_directory_principal.go +++ /dev/null @@ -1,134 +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" -) - -// ActiveDirectoryPrincipal Active Directory Principal. -// -// Specifies information about a single principal in an Active Directory. -// -// swagger:model ActiveDirectoryPrincipal -type ActiveDirectoryPrincipal struct { - - // Specifies the domain name of the where the principal' account is - // maintained. - Domain *string `json:"domain,omitempty"` - - // Specifies the full name (first and last names) of the principal. - FullName *string `json:"fullName,omitempty"` - - // Specifies the object class of the principal (either 'kGroup' or 'kUser'). - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the principal. - PrincipalName *string `json:"principalName,omitempty"` - - // Specifies the unique Security id (SID) of the principal. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this active directory principal -func (m *ActiveDirectoryPrincipal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var activeDirectoryPrincipalTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - activeDirectoryPrincipalTypeObjectClassPropEnum = append(activeDirectoryPrincipalTypeObjectClassPropEnum, v) - } -} - -const ( - - // ActiveDirectoryPrincipalObjectClassKUser captures enum value "kUser" - ActiveDirectoryPrincipalObjectClassKUser string = "kUser" - - // ActiveDirectoryPrincipalObjectClassKGroup captures enum value "kGroup" - ActiveDirectoryPrincipalObjectClassKGroup string = "kGroup" - - // ActiveDirectoryPrincipalObjectClassKComputer captures enum value "kComputer" - ActiveDirectoryPrincipalObjectClassKComputer string = "kComputer" - - // ActiveDirectoryPrincipalObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - ActiveDirectoryPrincipalObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // ActiveDirectoryPrincipalObjectClassKServiceAccount captures enum value "kServiceAccount" - ActiveDirectoryPrincipalObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *ActiveDirectoryPrincipal) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, activeDirectoryPrincipalTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ActiveDirectoryPrincipal) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this active directory principal based on context it is used -func (m *ActiveDirectoryPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryPrincipal) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryPrincipal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/active_directory_principals_add_parameters.go b/v1/models/active_directory_principals_add_parameters.go deleted file mode 100644 index 6a1cb086..00000000 --- a/v1/models/active_directory_principals_add_parameters.go +++ /dev/null @@ -1,156 +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" -) - -// ActiveDirectoryPrincipalsAddParameters Add Groups or Users Request. -// -// Specifies the settings for adding new users and groups -// for Active Directory principals. -// These users and groups are added to the Cohesity Cluster. -// You cannot create users and groups in the default Cohesity domain -// called 'LOCAL' using this operation. -// -// swagger:model ActiveDirectoryPrincipalsAddParameters -type ActiveDirectoryPrincipalsAddParameters struct { - - // Specifies a description about the user or group. - Description *string `json:"description,omitempty"` - - // Specifies the domain of the Active Directory where the - // referenced principal is stored. - Domain *string `json:"domain,omitempty"` - - // Specifies the type of the referenced Active Directory principal. - // If 'kGroup', the referenced Active Directory principal is a group. - // If 'kUser', the referenced Active Directory principal is a user. - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the Active Directory principal, - // that will be referenced by the group or user. - // The name of the Active Directory principal is used for naming - // the new group or user on the Cohesity Cluster. - PrincipalName *string `json:"principalName,omitempty"` - - // Whether the principal is a restricted principal. A restricted principal - // can only view the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with this user or group - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this group or user. - // For example if the 'joe' user is added for the Active Directory - // 'joe' user principal and is associated with the Cohesity - // 'View' role, 'joe' can log in to the Cohesity Dashboard - // and has a read-only view of the data on the Cohesity Cluster. - Roles []string `json:"roles"` -} - -// Validate validates this active directory principals add parameters -func (m *ActiveDirectoryPrincipalsAddParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var activeDirectoryPrincipalsAddParametersTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - activeDirectoryPrincipalsAddParametersTypeObjectClassPropEnum = append(activeDirectoryPrincipalsAddParametersTypeObjectClassPropEnum, v) - } -} - -const ( - - // ActiveDirectoryPrincipalsAddParametersObjectClassKUser captures enum value "kUser" - ActiveDirectoryPrincipalsAddParametersObjectClassKUser string = "kUser" - - // ActiveDirectoryPrincipalsAddParametersObjectClassKGroup captures enum value "kGroup" - ActiveDirectoryPrincipalsAddParametersObjectClassKGroup string = "kGroup" - - // ActiveDirectoryPrincipalsAddParametersObjectClassKComputer captures enum value "kComputer" - ActiveDirectoryPrincipalsAddParametersObjectClassKComputer string = "kComputer" - - // ActiveDirectoryPrincipalsAddParametersObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - ActiveDirectoryPrincipalsAddParametersObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // ActiveDirectoryPrincipalsAddParametersObjectClassKServiceAccount captures enum value "kServiceAccount" - ActiveDirectoryPrincipalsAddParametersObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *ActiveDirectoryPrincipalsAddParameters) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, activeDirectoryPrincipalsAddParametersTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ActiveDirectoryPrincipalsAddParameters) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this active directory principals add parameters based on context it is used -func (m *ActiveDirectoryPrincipalsAddParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryPrincipalsAddParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryPrincipalsAddParameters) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryPrincipalsAddParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_attribute.go b/v1/models/ad_attribute.go deleted file mode 100644 index 4f215133..00000000 --- a/v1/models/ad_attribute.go +++ /dev/null @@ -1,281 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AdAttribute AdAttribute -// -// Represnts the information about the AD attribute of the object. -// It also contains information regarding whether it is system attribute -// and whether the attribute is equal on both Snapshot and Production -// AD. -// -// swagger:model AdAttribute -type AdAttribute struct { - - // Specifies the flags related to the attribute of the AD object. - // 'kEqual' indicates the attribute value of AD object from Snapshot and - // Production AD are equal. - // 'kNotEqual' indicates the attribute value of AD object from Snapshot and - // Production AD are not equal. - // 'kNotFound' indicates attribute of the AD object is missing from both - // Snapshot and Production AD. - // 'kSystem' indicates this is system attribute. This can only be updated - // by the AD internal component. - // 'kMultiValue' indicates that the attribute is mutli-value attribute. This - // attribute supports mutli-value merge during attribute restore operation. - AdAttributeFlags []string `json:"adAttributeFlags"` - - // Specifies the value of the attribute of the AD object present on the - // Production AD. - DestinationValue *AttributeValue `json:"destinationValue,omitempty"` - - // Specifies the error message regarding the attribute - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the name of the attribute of the AD object. - Name *string `json:"name,omitempty"` - - // Specifies the value of the attribute of the AD object here if attribute - // is equal on both Snapshot and Production AD. I - SameValue *AttributeValue `json:"sameValue,omitempty"` - - // Specifies the value of the attribute of the AD object present on the - // Snapshot AD. - SourceValue *AttributeValue `json:"sourceValue,omitempty"` -} - -// Validate validates this ad attribute -func (m *AdAttribute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdAttributeFlags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestinationValue(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSameValue(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var adAttributeAdAttributeFlagsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEqual","kNotEqual","kNotFound","kSystem","kMultiValue"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - adAttributeAdAttributeFlagsItemsEnum = append(adAttributeAdAttributeFlagsItemsEnum, v) - } -} - -func (m *AdAttribute) validateAdAttributeFlagsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, adAttributeAdAttributeFlagsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdAttribute) validateAdAttributeFlags(formats strfmt.Registry) error { - if swag.IsZero(m.AdAttributeFlags) { // not required - return nil - } - - for i := 0; i < len(m.AdAttributeFlags); i++ { - - // value enum - if err := m.validateAdAttributeFlagsItemsEnum("adAttributeFlags"+"."+strconv.Itoa(i), "body", m.AdAttributeFlags[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *AdAttribute) validateDestinationValue(formats strfmt.Registry) error { - if swag.IsZero(m.DestinationValue) { // not required - return nil - } - - if m.DestinationValue != nil { - if err := m.DestinationValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destinationValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destinationValue") - } - return err - } - } - - return nil -} - -func (m *AdAttribute) validateSameValue(formats strfmt.Registry) error { - if swag.IsZero(m.SameValue) { // not required - return nil - } - - if m.SameValue != nil { - if err := m.SameValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameValue") - } - return err - } - } - - return nil -} - -func (m *AdAttribute) validateSourceValue(formats strfmt.Registry) error { - if swag.IsZero(m.SourceValue) { // not required - return nil - } - - if m.SourceValue != nil { - if err := m.SourceValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceValue") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad attribute based on the context it is used -func (m *AdAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestinationValue(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSameValue(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdAttribute) contextValidateDestinationValue(ctx context.Context, formats strfmt.Registry) error { - - if m.DestinationValue != nil { - - if swag.IsZero(m.DestinationValue) { // not required - return nil - } - - if err := m.DestinationValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destinationValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destinationValue") - } - return err - } - } - - return nil -} - -func (m *AdAttribute) contextValidateSameValue(ctx context.Context, formats strfmt.Registry) error { - - if m.SameValue != nil { - - if swag.IsZero(m.SameValue) { // not required - return nil - } - - if err := m.SameValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameValue") - } - return err - } - } - - return nil -} - -func (m *AdAttribute) contextValidateSourceValue(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceValue != nil { - - if swag.IsZero(m.SourceValue) { // not required - return nil - } - - if err := m.SourceValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceValue") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdAttribute) UnmarshalBinary(b []byte) error { - var res AdAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_domain.go b/v1/models/ad_domain.go deleted file mode 100644 index b3666922..00000000 --- a/v1/models/ad_domain.go +++ /dev/null @@ -1,126 +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" -) - -// AdDomain AD Domain. -// -// Specifies information about an AD Domain. -// -// swagger:model AdDomain -type AdDomain struct { - - // Specifies DNS root. - DNSRoot *string `json:"dnsRoot,omitempty"` - - // Specifies AD forest name. - Forest *string `json:"forest,omitempty"` - - // Specifies Identity information of the domain. - Identity *AdDomainIdentity `json:"identity,omitempty"` - - // Specifies AD NetBIOS name. - NetbiosName *string `json:"netbiosName,omitempty"` - - // Specifies parent domain name. - ParentDomain *string `json:"parentDomain,omitempty"` - - // Specifies tombstone time in days. - TombstoneDays *uint32 `json:"tombstoneDays,omitempty"` -} - -// Validate validates this ad domain -func (m *AdDomain) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIdentity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdDomain) validateIdentity(formats strfmt.Registry) error { - if swag.IsZero(m.Identity) { // not required - return nil - } - - if m.Identity != nil { - if err := m.Identity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("identity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("identity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad domain based on the context it is used -func (m *AdDomain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIdentity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdDomain) contextValidateIdentity(ctx context.Context, formats strfmt.Registry) error { - - if m.Identity != nil { - - if swag.IsZero(m.Identity) { // not required - return nil - } - - if err := m.Identity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("identity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("identity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdDomain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdDomain) UnmarshalBinary(b []byte) error { - var res AdDomain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_domain_controller.go b/v1/models/ad_domain_controller.go deleted file mode 100644 index 44d56d06..00000000 --- a/v1/models/ad_domain_controller.go +++ /dev/null @@ -1,129 +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" -) - -// AdDomainController AD Domain Controller. -// -// Specifies information about an AD domain controller. -// -// swagger:model AdDomainController -type AdDomainController struct { - - // Specifies whether backup of this domain controller is supported. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Specifies any reason(s) for domain controller backup not supported. - BackupUnsupportedReasons []string `json:"backupUnsupportedReasons"` - - // Specifies Domain hosted on this domain controller. - Domain *AdDomain `json:"domain,omitempty"` - - // Specifies FQDN host name of the domain controller. - HostName *string `json:"hostName,omitempty"` - - // Specifies whether this domain controller is a global catalog server. - IsGlobalCatalog *bool `json:"isGlobalCatalog,omitempty"` - - // Specifies whether this domain controller is read only. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // Specifies UTC time offset of this domain controller in minutes. - UtcOffsetMin *int32 `json:"utcOffsetMin,omitempty"` -} - -// Validate validates this ad domain controller -func (m *AdDomainController) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdDomainController) validateDomain(formats strfmt.Registry) error { - if swag.IsZero(m.Domain) { // not required - return nil - } - - if m.Domain != nil { - if err := m.Domain.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad domain controller based on the context it is used -func (m *AdDomainController) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdDomainController) contextValidateDomain(ctx context.Context, formats strfmt.Registry) error { - - if m.Domain != nil { - - if swag.IsZero(m.Domain) { // not required - return nil - } - - if err := m.Domain.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdDomainController) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdDomainController) UnmarshalBinary(b []byte) error { - var res AdDomainController - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_domain_identity.go b/v1/models/ad_domain_identity.go deleted file mode 100644 index 70d9da55..00000000 --- a/v1/models/ad_domain_identity.go +++ /dev/null @@ -1,61 +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" -) - -// AdDomainIdentity AD Domain Identity. -// -// AD domain identity information. -// -// swagger:model AdDomainIdentity -type AdDomainIdentity struct { - - // Specifies distinguished name of the domain. - Dn *string `json:"dn,omitempty"` - - // Specifies Unique objectGUID for an AD domain. - GUID *string `json:"guid,omitempty"` - - // Specifies display name of the domain. - Name *string `json:"name,omitempty"` - - // Specifies domain SID. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this ad domain identity -func (m *AdDomainIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ad domain identity based on context it is used -func (m *AdDomainIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdDomainIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdDomainIdentity) UnmarshalBinary(b []byte) error { - var res AdDomainIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_object_attribute_parameters.go b/v1/models/ad_object_attribute_parameters.go deleted file mode 100644 index a8d2aa00..00000000 --- a/v1/models/ad_object_attribute_parameters.go +++ /dev/null @@ -1,149 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AdObjectAttributeParameters AD Object Attribute Parameters -// -// AdObjectAttributeParameters are AD attribute recovery parameters for one -// or more AD objects -// -// swagger:model AdObjectAttributeParameters -type AdObjectAttributeParameters struct { - - // Specifies the array of source and destination object guid pairs to - // restore attributes. - AdGUIDPairs []*RestoreAdGUIDPair `json:"adGuidPairs"` - - // Specifies the array of LDAP property names to excluded from - // 'property_vec'. Excluded property name cannot contain wildcard character - // '*'. Property names are case insensitive. - ExcludeLdapProperties []string `json:"excludeLdapProperties"` - - // Specifies the array of LDAP property(attribute) names. The name can be - // standard or custom property defined in AD schema partition. The property - // can contain wildcard character '*'. If this array is empty, then '*' is - // assigned, means restore all properties except default system excluded - // properties. Wildcards will be expanded. If 'memberOf' property is - // included, group membership of the objects specified in 'guid_vec' will be - // restored. Property that does not exist for an object is ignored and no - // error info is returned for that property. Property names are case - // insensitive. - LdapProperties []string `json:"ldapProperties"` - - // Specifies the Option to merge multi-valued values vs clearing and setting - // values from the AD snapshot. Defaults is to overwrite production AD - // values from the source AD snapshot. When updating group membership (using - // 'memberOf' property), setting this option to true will result in group - // membership merge. This is useful in cases where production AD has later - // updates that should not be overridden while restoring an attribute. - MergeMultiValProperties *bool `json:"mergeMultiValProperties,omitempty"` -} - -// Validate validates this ad object attribute parameters -func (m *AdObjectAttributeParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdGUIDPairs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectAttributeParameters) validateAdGUIDPairs(formats strfmt.Registry) error { - if swag.IsZero(m.AdGUIDPairs) { // not required - return nil - } - - for i := 0; i < len(m.AdGUIDPairs); i++ { - if swag.IsZero(m.AdGUIDPairs[i]) { // not required - continue - } - - if m.AdGUIDPairs[i] != nil { - if err := m.AdGUIDPairs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adGuidPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adGuidPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ad object attribute parameters based on the context it is used -func (m *AdObjectAttributeParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdGUIDPairs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectAttributeParameters) contextValidateAdGUIDPairs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdGUIDPairs); i++ { - - if m.AdGUIDPairs[i] != nil { - - if swag.IsZero(m.AdGUIDPairs[i]) { // not required - return nil - } - - if err := m.AdGUIDPairs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adGuidPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adGuidPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdObjectAttributeParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdObjectAttributeParameters) UnmarshalBinary(b []byte) error { - var res AdObjectAttributeParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_object_meta_data.go b/v1/models/ad_object_meta_data.go deleted file mode 100644 index e20edb96..00000000 --- a/v1/models/ad_object_meta_data.go +++ /dev/null @@ -1,71 +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" -) - -// AdObjectMetaData AD object Meta Data. -// -// Specifies details about the AD objects. -// -// swagger:model AdObjectMetaData -type AdObjectMetaData struct { - - // Specifies the Distinguished name of the AD object. - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Domain of the AD object. - Domain *string `json:"domain,omitempty"` - - // Specifies the email of the AD object of type user or group. - Email *string `json:"email,omitempty"` - - // Specifies the Guid of the AD object. - GUID *string `json:"guid,omitempty"` - - // Specifies the name of the AD object. - Name *string `json:"name,omitempty"` - - // Specifies the type of the AD Object. The type may be user, computer, - // group or ou. - ObjectType *string `json:"objectType,omitempty"` - - // Specifies the sam account name of the AD object. - SamAccountName *string `json:"samAccountName,omitempty"` -} - -// Validate validates this ad object meta data -func (m *AdObjectMetaData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ad object meta data based on context it is used -func (m *AdObjectMetaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdObjectMetaData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdObjectMetaData) UnmarshalBinary(b []byte) error { - var res AdObjectMetaData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_object_restore_information.go b/v1/models/ad_object_restore_information.go deleted file mode 100644 index 291b4fa6..00000000 --- a/v1/models/ad_object_restore_information.go +++ /dev/null @@ -1,137 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AdObjectRestoreInformation AD Object Restore Information. -// -// Represents the details about the restore of the AD object. -// -// swagger:model AdObjectRestoreInformation -type AdObjectRestoreInformation struct { - - // Specifies the list of attributes of the AD object whose restore failed. - AttributeRestoreInfo []*AttributeRestoreInformation `json:"attributeRestoreInfo"` - - // Specifies the error message while restoring the AD Object. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the name of the AD object. - Name *string `json:"name,omitempty"` - - // Specifies the start time of the restore of the AD object specified as a - // Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the time taken for restore of AD Object and its attributes in - // milliseconds. - TimeTakenMsecs *uint64 `json:"timeTakenMsecs,omitempty"` -} - -// Validate validates this ad object restore information -func (m *AdObjectRestoreInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectRestoreInformation) validateAttributeRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeRestoreInfo) { // not required - return nil - } - - for i := 0; i < len(m.AttributeRestoreInfo); i++ { - if swag.IsZero(m.AttributeRestoreInfo[i]) { // not required - continue - } - - if m.AttributeRestoreInfo[i] != nil { - if err := m.AttributeRestoreInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeRestoreInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeRestoreInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ad object restore information based on the context it is used -func (m *AdObjectRestoreInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectRestoreInformation) contextValidateAttributeRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeRestoreInfo); i++ { - - if m.AttributeRestoreInfo[i] != nil { - - if swag.IsZero(m.AttributeRestoreInfo[i]) { // not required - return nil - } - - if err := m.AttributeRestoreInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeRestoreInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeRestoreInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdObjectRestoreInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdObjectRestoreInformation) UnmarshalBinary(b []byte) error { - var res AdObjectRestoreInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_object_restore_parameters.go b/v1/models/ad_object_restore_parameters.go deleted file mode 100644 index d0286227..00000000 --- a/v1/models/ad_object_restore_parameters.go +++ /dev/null @@ -1,85 +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" -) - -// AdObjectRestoreParameters AD Object Restore Parameters -// -// AdObjectRestoreParameters are the parameters to restore AD objects from -// recycle bin or from a mounted AD snapshot database. -// -// swagger:model AdObjectRestoreParameters -type AdObjectRestoreParameters struct { - - // Specifies the option for AD 'user' type of objects to change password when - // they next logon. - ChangePasswordOnNextLogon *bool `json:"changePasswordOnNextLogon,omitempty"` - - // Specifies the option to leave the restored object in disabled state for - // AD 'account' type of objects that support disabled state so that admin can - // do manual inspection before enabling the account. This property has no - // effect when restoring object from recycle bin. 'User' and 'Computer' are - // AD account types having enable/disable option. - LeaveStateDisabled *bool `json:"leaveStateDisabled,omitempty"` - - // Specifies the array of AD object guids to restore either from recycle bin - // or from AD snapshot. The guid should not exist in production AD. If it - // exits, then kDuplicate error is output in status. - ObjectGuids []string `json:"objectGuids"` - - // Specifies the Distinguished name(DN) of the target Organization Unit (OU) - // to restore non-OU object. This can be empty, in which case objects are - // restored to their original OU. The 'credential' specified must have - // privileges to add objects to this OU. Example: - // 'OU=SJC,OU=EngOU,DC=contoso,DC=com'. This parameter is ignored for OU - // objects. - OrganizationUnitPath *string `json:"organizationUnitPath,omitempty"` - - // Specifies the password for restoring user type objects (user, - // inetOrgPerson or organizationalPerson LDAP classes) that is returned in - // search result with 'kRestorePasswordRequired' flag, an initial password - // is required. The password is UTF8 string encoded in base64 format. - // Password cannot be empty and must satisfy production AD password - // complexity. If 'kFromDestRecycleBinIfFound' is true and the user is - // restored from production AD recycle bin, password will not be changed and - // the restored user retains their original password. For non-user type - // objects, this password value is ignored. - Password *string `json:"password,omitempty"` -} - -// Validate validates this ad object restore parameters -func (m *AdObjectRestoreParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ad object restore parameters based on context it is used -func (m *AdObjectRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdObjectRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdObjectRestoreParameters) UnmarshalBinary(b []byte) error { - var res AdObjectRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_objects_restore_status.go b/v1/models/ad_objects_restore_status.go deleted file mode 100644 index 725174c5..00000000 --- a/v1/models/ad_objects_restore_status.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AdObjectsRestoreStatus Ad Objects Restore Status. -// -// Represents the details about the status of restore of the AD objects. -// It also has details about the number of objects whose restore is -// successfull, failure or in progress. -// -// swagger:model AdObjectsRestoreStatus -type AdObjectsRestoreStatus struct { - - // Specifies the status of all the AD Objects which were requested to - // be restored. - AdObjectsRestoreInfo []*AdObjectRestoreInformation `json:"adObjectsRestoreInfo"` - - // Specifies the number of AD Objects whose restore has failed. - NumObjectsFailed *int32 `json:"numObjectsFailed,omitempty"` - - // Specifies the number of AD Objects whose restore is in progress. - NumObjectsRunning *int32 `json:"numObjectsRunning,omitempty"` - - // Specifies the number of AD Objects whose restore is successfull. - NumObjectsSucceeded *int32 `json:"numObjectsSucceeded,omitempty"` -} - -// Validate validates this ad objects restore status -func (m *AdObjectsRestoreStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdObjectsRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectsRestoreStatus) validateAdObjectsRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AdObjectsRestoreInfo) { // not required - return nil - } - - for i := 0; i < len(m.AdObjectsRestoreInfo); i++ { - if swag.IsZero(m.AdObjectsRestoreInfo[i]) { // not required - continue - } - - if m.AdObjectsRestoreInfo[i] != nil { - if err := m.AdObjectsRestoreInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectsRestoreInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectsRestoreInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ad objects restore status based on the context it is used -func (m *AdObjectsRestoreStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdObjectsRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdObjectsRestoreStatus) contextValidateAdObjectsRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdObjectsRestoreInfo); i++ { - - if m.AdObjectsRestoreInfo[i] != nil { - - if swag.IsZero(m.AdObjectsRestoreInfo[i]) { // not required - return nil - } - - if err := m.AdObjectsRestoreInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectsRestoreInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectsRestoreInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdObjectsRestoreStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdObjectsRestoreStatus) UnmarshalBinary(b []byte) error { - var res AdObjectsRestoreStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_protection_source.go b/v1/models/ad_protection_source.go deleted file mode 100644 index 05c58ecf..00000000 --- a/v1/models/ad_protection_source.go +++ /dev/null @@ -1,180 +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" -) - -// AdProtectionSource AD Protection Source. -// -// Specifies an object representing an AD entity. -// -// swagger:model AdProtectionSource -type AdProtectionSource struct { - - // Specifies the domain controller residing in this physical machine. - DomainController *AdDomainController `json:"domainController,omitempty"` - - // Specifies the domain name corresponding to the domain controller. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the domain name of the AD entity. - Name *string `json:"name,omitempty"` - - // Specifies the entity id of the owner entity. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the type of the managed object in AD Protection Source. - // Specifies the kind of AD protection source. - // 'kRootContainer' indicates the entity is a root container to an AD - // domain controller. - // 'kDomainController' indicates the domain controller hosted in this physical - // server. - // Enum: ["kRootContainer","kDomainController"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the AD entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this ad protection source -func (m *AdProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainController(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdProtectionSource) validateDomainController(formats strfmt.Registry) error { - if swag.IsZero(m.DomainController) { // not required - return nil - } - - if m.DomainController != nil { - if err := m.DomainController.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainController") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainController") - } - return err - } - } - - return nil -} - -var adProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRootContainer","kDomainController"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - adProtectionSourceTypeTypePropEnum = append(adProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // AdProtectionSourceTypeKRootContainer captures enum value "kRootContainer" - AdProtectionSourceTypeKRootContainer string = "kRootContainer" - - // AdProtectionSourceTypeKDomainController captures enum value "kDomainController" - AdProtectionSourceTypeKDomainController string = "kDomainController" -) - -// prop value enum -func (m *AdProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, adProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this ad protection source based on the context it is used -func (m *AdProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomainController(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdProtectionSource) contextValidateDomainController(ctx context.Context, formats strfmt.Registry) error { - - if m.DomainController != nil { - - if swag.IsZero(m.DomainController) { // not required - return nil - } - - if err := m.DomainController.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainController") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainController") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdProtectionSource) UnmarshalBinary(b []byte) error { - var res AdProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_restore_options.go b/v1/models/ad_restore_options.go deleted file mode 100644 index 5636b31e..00000000 --- a/v1/models/ad_restore_options.go +++ /dev/null @@ -1,228 +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" -) - -// AdRestoreOptions AD Restore Options -// -// AdRestoreOptions are the AD specific options for the restore task being -// updated -// -// swagger:model AdRestoreOptions -type AdRestoreOptions struct { - - // Specifies the object attributes restore parameters with the list of - // attributes to be restored. This is set only when type is - // kObjectAttributes. - ObjectAttributeParameters *AdObjectAttributeParameters `json:"objectAttributeParameters,omitempty"` - - // Specifies the object restore params with info about objects to be - // restored. This is set only when type is kObjects. - ObjectParameters *AdObjectRestoreParameters `json:"objectParameters,omitempty"` - - // Specifies the AD restore request type. - // Specifies the action type of AD restore. - // - // 'kNone' specifies no special behaviour. - // 'kObjects' specifies the user action to restore AD objects from a mounted - // AD snapshot database. - // 'kObjectAttributes' specifies the user action to restore attributes of an - // AD object from a mounted AD snapshot database. - // Enum: ["kNone","kObjects","kObjectAttributes"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this ad restore options -func (m *AdRestoreOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectAttributeParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRestoreOptions) validateObjectAttributeParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectAttributeParameters) { // not required - return nil - } - - if m.ObjectAttributeParameters != nil { - if err := m.ObjectAttributeParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectAttributeParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectAttributeParameters") - } - return err - } - } - - return nil -} - -func (m *AdRestoreOptions) validateObjectParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectParameters) { // not required - return nil - } - - if m.ObjectParameters != nil { - if err := m.ObjectParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectParameters") - } - return err - } - } - - return nil -} - -var adRestoreOptionsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kObjects","kObjectAttributes"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - adRestoreOptionsTypeTypePropEnum = append(adRestoreOptionsTypeTypePropEnum, v) - } -} - -const ( - - // AdRestoreOptionsTypeKNone captures enum value "kNone" - AdRestoreOptionsTypeKNone string = "kNone" - - // AdRestoreOptionsTypeKObjects captures enum value "kObjects" - AdRestoreOptionsTypeKObjects string = "kObjects" - - // AdRestoreOptionsTypeKObjectAttributes captures enum value "kObjectAttributes" - AdRestoreOptionsTypeKObjectAttributes string = "kObjectAttributes" -) - -// prop value enum -func (m *AdRestoreOptions) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, adRestoreOptionsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdRestoreOptions) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this ad restore options based on the context it is used -func (m *AdRestoreOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectAttributeParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRestoreOptions) contextValidateObjectAttributeParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectAttributeParameters != nil { - - if swag.IsZero(m.ObjectAttributeParameters) { // not required - return nil - } - - if err := m.ObjectAttributeParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectAttributeParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectAttributeParameters") - } - return err - } - } - - return nil -} - -func (m *AdRestoreOptions) contextValidateObjectParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectParameters != nil { - - if swag.IsZero(m.ObjectParameters) { // not required - return nil - } - - if err := m.ObjectParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdRestoreOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdRestoreOptions) UnmarshalBinary(b []byte) error { - var res AdRestoreOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_restore_parameters.go b/v1/models/ad_restore_parameters.go deleted file mode 100644 index a8a25994..00000000 --- a/v1/models/ad_restore_parameters.go +++ /dev/null @@ -1,171 +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" -) - -// AdRestoreParameters AD Application Server Restore Parameters. -// -// Specifies the parameters specific to Application domain controller. -// -// swagger:model AdRestoreParameters -type AdRestoreParameters struct { - - // Specifies the Active Directory options for the Restore task. - AdOptions *AdRestoreOptions `json:"adOptions,omitempty"` - - // Specifies the credentials which are needed to connect to Production AD. - Credentials *Credentials `json:"credentials,omitempty"` - - // Specifies the option to mount the AD snapshot database and restore - // the AD objects in a single restore task. - // AdOptions must be set if this is set to true. - MountAndRestore *bool `json:"mountAndRestore,omitempty"` - - // Specifies the port on which the AD domain controller's NTDS database will - // be mounted. - Port *int32 `json:"port,omitempty"` -} - -// Validate validates this ad restore parameters -func (m *AdRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRestoreParameters) validateAdOptions(formats strfmt.Registry) error { - if swag.IsZero(m.AdOptions) { // not required - return nil - } - - if m.AdOptions != nil { - if err := m.AdOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adOptions") - } - return err - } - } - - return nil -} - -func (m *AdRestoreParameters) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad restore parameters based on the context it is used -func (m *AdRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRestoreParameters) contextValidateAdOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.AdOptions != nil { - - if swag.IsZero(m.AdOptions) { // not required - return nil - } - - if err := m.AdOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adOptions") - } - return err - } - } - - return nil -} - -func (m *AdRestoreParameters) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdRestoreParameters) UnmarshalBinary(b []byte) error { - var res AdRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ad_root_topology_object.go b/v1/models/ad_root_topology_object.go deleted file mode 100644 index 90aab783..00000000 --- a/v1/models/ad_root_topology_object.go +++ /dev/null @@ -1,77 +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" -) - -// AdRootTopologyObject AD Root Topology Object. -// -// Represents a node in AD Topology tree. -// -// swagger:model AdRootTopologyObject -type AdRootTopologyObject struct { - - // Specifies the array of children of this object. - ChildObjects []interface{} `json:"childObjects"` - - // Specifies the 'description' of an object. - Description *string `json:"description,omitempty"` - - // Specifies the guid of matching 'source_guid' from production AD. - // This is looked up based on source_guid or distinguishedName - // attribute value. - DestGUID *string `json:"destGuid,omitempty"` - - // Specifies the display name of the object in AD Topology tree. - DisplayName *string `json:"displayName,omitempty"` - - // Specifies the distinguished name of the object in AD Topology tree. - // Eg: CN=Jone Doe,OU=Users,DC=corp,DC=cohesity,DC=com - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Specifies the AD error while fetching the ADRootTopologyObject. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the LDAP class name such as 'user','computer', - // 'organizationalUnit'. - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the guid string of the object in AD snapshot database. - SourceGUID *string `json:"sourceGuid,omitempty"` -} - -// Validate validates this ad root topology object -func (m *AdRootTopologyObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ad root topology object based on context it is used -func (m *AdRootTopologyObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdRootTopologyObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdRootTopologyObject) UnmarshalBinary(b []byte) error { - var res AdRootTopologyObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/adapter_specific_flags_proto.go b/v1/models/adapter_specific_flags_proto.go deleted file mode 100644 index d4d917c3..00000000 --- a/v1/models/adapter_specific_flags_proto.go +++ /dev/null @@ -1,52 +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" -) - -// AdapterSpecificFlagsProto o365::AdapterSpecificFlags::sharepoint_adapter_flags -// o365/o365.proto 101 -// -// swagger:model AdapterSpecificFlagsProto -type AdapterSpecificFlagsProto struct { - - // The type of environment this proto pertains to. Each environment type can - // have its own extension for storing information. - EnvType *int32 `json:"envType,omitempty"` -} - -// Validate validates this adapter specific flags proto -func (m *AdapterSpecificFlagsProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this adapter specific flags proto based on context it is used -func (m *AdapterSpecificFlagsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdapterSpecificFlagsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdapterSpecificFlagsProto) UnmarshalBinary(b []byte) error { - var res AdapterSpecificFlagsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/add_snapshot_arg_extended_information.go b/v1/models/add_snapshot_arg_extended_information.go deleted file mode 100644 index 2f532f00..00000000 --- a/v1/models/add_snapshot_arg_extended_information.go +++ /dev/null @@ -1,270 +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" -) - -// AddSnapshotArgExtendedInformation This represents a union for capturing environment specific extended -// information. -// NOTE: This presently contains information for VMware but it can be -// extended to contain information regarding any new environment (such as -// HyperV) as needed. Only one of the fields should be set for a snapshot -// at a time and type determines the field that will be used. -// -// swagger:model AddSnapshotArg_ExtendedInformation -type AddSnapshotArgExtendedInformation struct { - - // O365 specific information. - O365AddSnapshotArg *O365AddSnapshotArg `json:"o365AddSnapshotArg,omitempty"` - - // record stats - RecordStats *AddSnapshotArgExtendedInformationRecordStats `json:"recordStats,omitempty"` - - // The type of environment this extended info pertains to. - Type *int32 `json:"type,omitempty"` - - // UDA specific information. - UdaAddSnapshotArg *AddSnapshotArgExtendedInformationUdaAddSnapshotArg `json:"udaAddSnapshotArg,omitempty"` - - // VMware specific information. - VmwareAddSnapshotArg *VMwareAddSnapshotArg `json:"vmwareAddSnapshotArg,omitempty"` -} - -// Validate validates this add snapshot arg extended information -func (m *AddSnapshotArgExtendedInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateO365AddSnapshotArg(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecordStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaAddSnapshotArg(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareAddSnapshotArg(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AddSnapshotArgExtendedInformation) validateO365AddSnapshotArg(formats strfmt.Registry) error { - if swag.IsZero(m.O365AddSnapshotArg) { // not required - return nil - } - - if m.O365AddSnapshotArg != nil { - if err := m.O365AddSnapshotArg.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365AddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365AddSnapshotArg") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) validateRecordStats(formats strfmt.Registry) error { - if swag.IsZero(m.RecordStats) { // not required - return nil - } - - if m.RecordStats != nil { - if err := m.RecordStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recordStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recordStats") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) validateUdaAddSnapshotArg(formats strfmt.Registry) error { - if swag.IsZero(m.UdaAddSnapshotArg) { // not required - return nil - } - - if m.UdaAddSnapshotArg != nil { - if err := m.UdaAddSnapshotArg.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaAddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaAddSnapshotArg") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) validateVmwareAddSnapshotArg(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareAddSnapshotArg) { // not required - return nil - } - - if m.VmwareAddSnapshotArg != nil { - if err := m.VmwareAddSnapshotArg.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareAddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareAddSnapshotArg") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add snapshot arg extended information based on the context it is used -func (m *AddSnapshotArgExtendedInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateO365AddSnapshotArg(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecordStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaAddSnapshotArg(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareAddSnapshotArg(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AddSnapshotArgExtendedInformation) contextValidateO365AddSnapshotArg(ctx context.Context, formats strfmt.Registry) error { - - if m.O365AddSnapshotArg != nil { - - if swag.IsZero(m.O365AddSnapshotArg) { // not required - return nil - } - - if err := m.O365AddSnapshotArg.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365AddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365AddSnapshotArg") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) contextValidateRecordStats(ctx context.Context, formats strfmt.Registry) error { - - if m.RecordStats != nil { - - if swag.IsZero(m.RecordStats) { // not required - return nil - } - - if err := m.RecordStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recordStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recordStats") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) contextValidateUdaAddSnapshotArg(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaAddSnapshotArg != nil { - - if swag.IsZero(m.UdaAddSnapshotArg) { // not required - return nil - } - - if err := m.UdaAddSnapshotArg.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaAddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaAddSnapshotArg") - } - return err - } - } - - return nil -} - -func (m *AddSnapshotArgExtendedInformation) contextValidateVmwareAddSnapshotArg(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareAddSnapshotArg != nil { - - if swag.IsZero(m.VmwareAddSnapshotArg) { // not required - return nil - } - - if err := m.VmwareAddSnapshotArg.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareAddSnapshotArg") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareAddSnapshotArg") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformation) UnmarshalBinary(b []byte) error { - var res AddSnapshotArgExtendedInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/add_snapshot_arg_extended_information_record_stats.go b/v1/models/add_snapshot_arg_extended_information_record_stats.go deleted file mode 100644 index d7e6c136..00000000 --- a/v1/models/add_snapshot_arg_extended_information_record_stats.go +++ /dev/null @@ -1,56 +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" -) - -// AddSnapshotArgExtendedInformationRecordStats Generic proto to keep a count of mutations of an entities records. -// -// swagger:model AddSnapshotArg_ExtendedInformation_RecordStats -type AddSnapshotArgExtendedInformationRecordStats struct { - - // added - Added *int64 `json:"added,omitempty"` - - // deleted - Deleted *int64 `json:"deleted,omitempty"` - - // modified - Modified *int64 `json:"modified,omitempty"` -} - -// Validate validates this add snapshot arg extended information record stats -func (m *AddSnapshotArgExtendedInformationRecordStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add snapshot arg extended information record stats based on context it is used -func (m *AddSnapshotArgExtendedInformationRecordStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformationRecordStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformationRecordStats) UnmarshalBinary(b []byte) error { - var res AddSnapshotArgExtendedInformationRecordStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/add_snapshot_arg_extended_information_uda_add_snapshot_arg.go b/v1/models/add_snapshot_arg_extended_information_uda_add_snapshot_arg.go deleted file mode 100644 index b17d741b..00000000 --- a/v1/models/add_snapshot_arg_extended_information_uda_add_snapshot_arg.go +++ /dev/null @@ -1,50 +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" -) - -// AddSnapshotArgExtendedInformationUdaAddSnapshotArg add snapshot arg extended information uda add snapshot arg -// -// swagger:model AddSnapshotArg_ExtendedInformation_UdaAddSnapshotArg -type AddSnapshotArgExtendedInformationUdaAddSnapshotArg struct { - - // entity support - EntitySupport *bool `json:"entitySupport,omitempty"` -} - -// Validate validates this add snapshot arg extended information uda add snapshot arg -func (m *AddSnapshotArgExtendedInformationUdaAddSnapshotArg) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add snapshot arg extended information uda add snapshot arg based on context it is used -func (m *AddSnapshotArgExtendedInformationUdaAddSnapshotArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformationUdaAddSnapshotArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddSnapshotArgExtendedInformationUdaAddSnapshotArg) UnmarshalBinary(b []byte) error { - var res AddSnapshotArgExtendedInformationUdaAddSnapshotArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/add_snapshot_arg_key_value_pair.go b/v1/models/add_snapshot_arg_key_value_pair.go deleted file mode 100644 index 995ccc0b..00000000 --- a/v1/models/add_snapshot_arg_key_value_pair.go +++ /dev/null @@ -1,56 +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" -) - -// AddSnapshotArgKeyValuePair Key-Value pair to store attributes. -// -// These attributes will be indexed as a json map in the -// elasticsearch documents. -// -// swagger:model AddSnapshotArg_KeyValuePair -type AddSnapshotArgKeyValuePair struct { - - // Name of the key. - XKey *string `json:"xKey,omitempty"` - - // Value of the key. - XValue *string `json:"xValue,omitempty"` -} - -// Validate validates this add snapshot arg key value pair -func (m *AddSnapshotArgKeyValuePair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add snapshot arg key value pair based on context it is used -func (m *AddSnapshotArgKeyValuePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddSnapshotArgKeyValuePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddSnapshotArgKeyValuePair) UnmarshalBinary(b []byte) error { - var res AddSnapshotArgKeyValuePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/added_active_directory_principal.go b/v1/models/added_active_directory_principal.go deleted file mode 100644 index 86c889b7..00000000 --- a/v1/models/added_active_directory_principal.go +++ /dev/null @@ -1,165 +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" -) - -// AddedActiveDirectoryPrincipal Non-LOCAL Group or User. -// -// Specifies a group or user added to the Cohesity Cluster for an Active -// Directory principal. -// -// swagger:model AddedActiveDirectoryPrincipal -type AddedActiveDirectoryPrincipal struct { - - // Specifies the epoch time in milliseconds when the group or user - // was added to the Cohesity Cluster. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies a description about the user or group. - Description *string `json:"description,omitempty"` - - // Specifies the domain of the Active Directory where the - // referenced principal is stored. - Domain *string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the group or user - // was last modified on the Cohesity Cluster. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the type of the referenced Active Directory principal. - // If 'kGroup', the referenced Active Directory principal is a group. - // If 'kUser', the referenced Active Directory principal is a user. - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the Active Directory principal, - // that will be referenced by the group or user. - // The name of the Active Directory principal is used for naming - // the new group or user on the Cohesity Cluster. - PrincipalName *string `json:"principalName,omitempty"` - - // Whether the principal is a restricted principal. A restricted principal - // can only view the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with this user or group - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this group or user. - // For example if the 'joe' user is added for the Active Directory - // 'joe' user principal and is associated with the Cohesity - // 'View' role, 'joe' can log in to the Cohesity Dashboard - // and has a read-only view of the data on the Cohesity Cluster. - Roles []string `json:"roles"` - - // Specifies the unique Security ID (SID) of the Active Directory principal - // associated with this group or user. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this added active directory principal -func (m *AddedActiveDirectoryPrincipal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addedActiveDirectoryPrincipalTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addedActiveDirectoryPrincipalTypeObjectClassPropEnum = append(addedActiveDirectoryPrincipalTypeObjectClassPropEnum, v) - } -} - -const ( - - // AddedActiveDirectoryPrincipalObjectClassKUser captures enum value "kUser" - AddedActiveDirectoryPrincipalObjectClassKUser string = "kUser" - - // AddedActiveDirectoryPrincipalObjectClassKGroup captures enum value "kGroup" - AddedActiveDirectoryPrincipalObjectClassKGroup string = "kGroup" - - // AddedActiveDirectoryPrincipalObjectClassKComputer captures enum value "kComputer" - AddedActiveDirectoryPrincipalObjectClassKComputer string = "kComputer" - - // AddedActiveDirectoryPrincipalObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - AddedActiveDirectoryPrincipalObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // AddedActiveDirectoryPrincipalObjectClassKServiceAccount captures enum value "kServiceAccount" - AddedActiveDirectoryPrincipalObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *AddedActiveDirectoryPrincipal) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addedActiveDirectoryPrincipalTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AddedActiveDirectoryPrincipal) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this added active directory principal based on context it is used -func (m *AddedActiveDirectoryPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddedActiveDirectoryPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddedActiveDirectoryPrincipal) UnmarshalBinary(b []byte) error { - var res AddedActiveDirectoryPrincipal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/added_idp_principal.go b/v1/models/added_idp_principal.go deleted file mode 100644 index b5295556..00000000 --- a/v1/models/added_idp_principal.go +++ /dev/null @@ -1,162 +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" -) - -// AddedIdpPrincipal Non-LOCAL Group or User. -// -// Specifies a group or user added to the Cohesity Cluster for an Idp -// principal. -// -// swagger:model AddedIdpPrincipal -type AddedIdpPrincipal struct { - - // Specifies the epoch time in milliseconds when the group or user - // was added to the Cohesity Cluster. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the name of the Idp where the - // referenced principal is stored. - Domain *string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the group or user - // was last modified on the Cohesity Cluster. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the type of the referenced Idp principal. - // If 'kGroup', the referenced Idp principal is a group. - // If 'kUser', the referenced Idp principal is a user. - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the Idp principal, - // that will be referenced by the group or user. - // The name of the Idp principal is used for naming - // the new group or user on the Cohesity Cluster. - PrincipalName *string `json:"principalName,omitempty"` - - // Whether the principal is a restricted principal. A restricted principal - // can only view the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with this user or group - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this group or user. - // For example if the 'joe' user is added for the Active Directory - // 'joe' user principal and is associated with the Cohesity - // 'View' role, 'joe' can log in to the Cohesity Dashboard - // and has a read-only view of the data on the Cohesity Cluster. - Roles []string `json:"roles"` - - // Specifies the unique Security ID (SID) of the Idp principal - // associated with this group or user. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this added idp principal -func (m *AddedIdpPrincipal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addedIdpPrincipalTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addedIdpPrincipalTypeObjectClassPropEnum = append(addedIdpPrincipalTypeObjectClassPropEnum, v) - } -} - -const ( - - // AddedIdpPrincipalObjectClassKUser captures enum value "kUser" - AddedIdpPrincipalObjectClassKUser string = "kUser" - - // AddedIdpPrincipalObjectClassKGroup captures enum value "kGroup" - AddedIdpPrincipalObjectClassKGroup string = "kGroup" - - // AddedIdpPrincipalObjectClassKComputer captures enum value "kComputer" - AddedIdpPrincipalObjectClassKComputer string = "kComputer" - - // AddedIdpPrincipalObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - AddedIdpPrincipalObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // AddedIdpPrincipalObjectClassKServiceAccount captures enum value "kServiceAccount" - AddedIdpPrincipalObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *AddedIdpPrincipal) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addedIdpPrincipalTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AddedIdpPrincipal) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this added idp principal based on context it is used -func (m *AddedIdpPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddedIdpPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddedIdpPrincipal) UnmarshalBinary(b []byte) error { - var res AddedIdpPrincipal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/additional_connector_params.go b/v1/models/additional_connector_params.go deleted file mode 100644 index bf936625..00000000 --- a/v1/models/additional_connector_params.go +++ /dev/null @@ -1,191 +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" -) - -// AdditionalConnectorParams Message that encapsulates the additional connector params to establish a -// connection with a particular environment. -// -// swagger:model AdditionalConnectorParams -type AdditionalConnectorParams struct { - - // Endpoint URL for querying the MS graph token fetched from - // openid-configuration. - GraphTokenEndpoint *string `json:"graphTokenEndpoint,omitempty"` - - // Max http sessions per context for VMWare vAPI calls. - MaxVmwareHTTPSessions *int32 `json:"maxVmwareHttpSessions,omitempty"` - - // Endpoint or host url where all the graph calls are made. It is fetched - // from openid-configuration. - MsgraphHost *string `json:"msgraphHost,omitempty"` - - // A token used only in O365 Emulator identifying the information of number - // of Users, Sites, Groups, Teams & Public Folders and their ids. - O365EmulatorEntityInfo *string `json:"o365EmulatorEntityInfo,omitempty"` - - // Optional o365_region proto to store the region info to be used while - // making ews/graph api calls in o365 adapter. - O365Region *O365RegionProto `json:"o365Region,omitempty"` - - // Whether we should skip creating autodiscove proxy. This is needed only - // during fetching eh and in public folder backups setup. - OutlookSkipCreatingAutodiscoverProxy *bool `json:"outlookSkipCreatingAutodiscoverProxy,omitempty"` - - // RegisteredEntitySfdcParams contains soap_endpoint_url and - // metadata_endpoint_url which are needed for connecting to Sfdc in connector - // params. - RegisteredEntitySfdcParams *RegisteredEntitySfdcParams `json:"registeredEntitySfdcParams,omitempty"` - - // Wheather to use GetSearchableMailboxes EWS API while descovering User - // Mailboxes or not. - UseGetSearchableMailboxesAPI *bool `json:"useGetSearchableMailboxesApi,omitempty"` - - // Whether OAuth should be used for authentication with EWS API (outlook - // backup), applicable only for Exchange Online. - UseOutlookEwsOauth *bool `json:"useOutlookEwsOauth,omitempty"` -} - -// Validate validates this additional connector params -func (m *AdditionalConnectorParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateO365Region(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntitySfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdditionalConnectorParams) validateO365Region(formats strfmt.Registry) error { - if swag.IsZero(m.O365Region) { // not required - return nil - } - - if m.O365Region != nil { - if err := m.O365Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Region") - } - return err - } - } - - return nil -} - -func (m *AdditionalConnectorParams) validateRegisteredEntitySfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntitySfdcParams) { // not required - return nil - } - - if m.RegisteredEntitySfdcParams != nil { - if err := m.RegisteredEntitySfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntitySfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntitySfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this additional connector params based on the context it is used -func (m *AdditionalConnectorParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateO365Region(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntitySfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdditionalConnectorParams) contextValidateO365Region(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Region != nil { - - if swag.IsZero(m.O365Region) { // not required - return nil - } - - if err := m.O365Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Region") - } - return err - } - } - - return nil -} - -func (m *AdditionalConnectorParams) contextValidateRegisteredEntitySfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntitySfdcParams != nil { - - if swag.IsZero(m.RegisteredEntitySfdcParams) { // not required - return nil - } - - if err := m.RegisteredEntitySfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntitySfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntitySfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdditionalConnectorParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdditionalConnectorParams) UnmarshalBinary(b []byte) error { - var res AdditionalConnectorParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/additional_entity_info.go b/v1/models/additional_entity_info.go deleted file mode 100644 index c2b798fa..00000000 --- a/v1/models/additional_entity_info.go +++ /dev/null @@ -1,55 +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" -) - -// AdditionalEntityInfo This message capture the entity info for additional environments supported -// by an entity. E.g. a O365 user entity supports both mailbox and onedrive -// environments. -// -// swagger:model AdditionalEntityInfo -type AdditionalEntityInfo struct { - - // The environemnt. - Env *int32 `json:"env,omitempty"` - - // Id to uniquely identify this additional entity. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this additional entity info -func (m *AdditionalEntityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this additional entity info based on context it is used -func (m *AdditionalEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdditionalEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdditionalEntityInfo) UnmarshalBinary(b []byte) error { - var res AdditionalEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/additional_oracle_d_b_params.go b/v1/models/additional_oracle_d_b_params.go deleted file mode 100644 index 4adced2e..00000000 --- a/v1/models/additional_oracle_d_b_params.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AdditionalOracleDBParams Message to capture additional channel information for Oracle Database. -// -// swagger:model AdditionalOracleDBParams -type AdditionalOracleDBParams struct { - - // Database app id. - AppEntityID *int64 `json:"appEntityId,omitempty"` - - // The following proto message should be renamed to a more general message - // to represent parameters pertaining to a single unique Oracle database. - // Uniqueness of an Oracle database should be strictly determined by its - // database unique name. i.e. all backup parameters needed for a unique - // Oracle database should be expressed in the following proto. - // - // It is a vector for future support of backing up Data Guard sources. We - // may or may not need this to be vector to support Data Guard sources. For - // now, the size of this vector is always 1. When we rename this proto in - // the future, if we determine there is no need to use a vector for Data - // Guard support, we can choose to remove 'repeated'. - DbInfoChannelVec []*OracleDBChannelInfo `json:"dbInfoChannelVec"` -} - -// Validate validates this additional oracle d b params -func (m *AdditionalOracleDBParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbInfoChannelVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdditionalOracleDBParams) validateDbInfoChannelVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbInfoChannelVec) { // not required - return nil - } - - for i := 0; i < len(m.DbInfoChannelVec); i++ { - if swag.IsZero(m.DbInfoChannelVec[i]) { // not required - continue - } - - if m.DbInfoChannelVec[i] != nil { - if err := m.DbInfoChannelVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoChannelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoChannelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this additional oracle d b params based on the context it is used -func (m *AdditionalOracleDBParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbInfoChannelVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdditionalOracleDBParams) contextValidateDbInfoChannelVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbInfoChannelVec); i++ { - - if m.DbInfoChannelVec[i] != nil { - - if swag.IsZero(m.DbInfoChannelVec[i]) { // not required - return nil - } - - if err := m.DbInfoChannelVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoChannelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoChannelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdditionalOracleDBParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdditionalOracleDBParams) UnmarshalBinary(b []byte) error { - var res AdditionalOracleDBParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/additional_run_info.go b/v1/models/additional_run_info.go deleted file mode 100644 index 15185935..00000000 --- a/v1/models/additional_run_info.go +++ /dev/null @@ -1,22 +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 - -// AdditionalRunInfo Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// AdditionalRunInfo extension Location Extn -// ============================================================================= -// oracle::OracleAdditionalRunInfo:: oracle/oracle.proto 100 -// oracle_additional_run_info -// o365::O365AdditionalRunInfo:: o365/o365.proto 101 -// o365_additional_run_info -// sfdc::SfdcAdditionalRunInfo:: sfdc/sfdc.proto 102 -// sfdc_additional_run_info -// ============================================================================= -// -// swagger:model AdditionalRunInfo -type AdditionalRunInfo interface{} diff --git a/v1/models/advanced_settings.go b/v1/models/advanced_settings.go deleted file mode 100644 index 33c89686..00000000 --- a/v1/models/advanced_settings.go +++ /dev/null @@ -1,72 +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" -) - -// AdvancedSettings This is used to regulate certain gflag values from the UI. The values -// passed by the user from the UI will be used for the respective gflags. -// -// Message to capture SQL gflags. -// -// swagger:model AdvancedSettings -type AdvancedSettings struct { - - // Whether to report error if SQL database is cloned. - ClonedDbBackupStatus *int32 `json:"clonedDbBackupStatus,omitempty"` - - // Whether to report error if SQL database is not online, it includes states - // such as offline, restoring as well as any other state for which db is not - // online. - DbBackupIfNotOnlineStatus *int32 `json:"dbBackupIfNotOnlineStatus,omitempty"` - - // Fail the backup job when the database is missing. The database may be - // missing if it is deleted or corrupted. - MissingDbBackupStatus *int32 `json:"missingDbBackupStatus,omitempty"` - - // Fail the backup job when database is offline or restoring. - OfflineRestoringDbBackupStatus *int32 `json:"offlineRestoringDbBackupStatus,omitempty"` - - // Whether to skip backup for read-only SQL databases - ReadOnlyDbBackupStatus *int32 `json:"readOnlyDbBackupStatus,omitempty"` - - // Whether to report error for all faulty dbs in non-autoprotect jobs. This - // will fail backup job if any db is offline/restoring/cloned etc. - ReportAllNonAutoprotectDbErrors *int32 `json:"reportAllNonAutoprotectDbErrors,omitempty"` -} - -// Validate validates this advanced settings -func (m *AdvancedSettings) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this advanced settings based on context it is used -func (m *AdvancedSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdvancedSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdvancedSettings) UnmarshalBinary(b []byte) error { - var res AdvancedSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/agent_certificate_information.go b/v1/models/agent_certificate_information.go deleted file mode 100644 index b28b4bcb..00000000 --- a/v1/models/agent_certificate_information.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" -) - -// AgentCertificateInformation Below proto contains all the infromations related to Agent Certificates. -// -// swagger:model AgentCertificateInformation -type AgentCertificateInformation struct { - - // cert type - CertType *int32 `json:"certType,omitempty"` - - // Expiry time for the certificate. - ExpiryTimeEpoch *uint64 `json:"expiryTimeEpoch,omitempty"` -} - -// Validate validates this agent certificate information -func (m *AgentCertificateInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this agent certificate information based on context it is used -func (m *AgentCertificateInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AgentCertificateInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentCertificateInformation) UnmarshalBinary(b []byte) error { - var res AgentCertificateInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/agent_deployment_status_response.go b/v1/models/agent_deployment_status_response.go deleted file mode 100644 index b47ea585..00000000 --- a/v1/models/agent_deployment_status_response.go +++ /dev/null @@ -1,443 +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" -) - -// AgentDeploymentStatusResponse Agent Deployment Status Response. -// -// Specifies the overview of the agent deployment status. -// -// swagger:model AgentDeploymentStatusResponse -type AgentDeploymentStatusResponse struct { - - // Specifies the certificate expiry time for agent. - CertificateExpiryTimeUsecs *int64 `json:"certificateExpiryTimeUsecs,omitempty"` - - // Specifies the agent certificate status. - CertificateIssuer *string `json:"certificateIssuer,omitempty"` - - // Specifies the status of the certificate. - // CertificateStatus specifies the status of the agent certificate - // Enum: ["Active","Expired"] - CertificateStatus *string `json:"certificateStatus,omitempty"` - - // Specifies the compact version of Cohesity agent. For example, 6.0.1. - CompactVersion *string `json:"compactVersion,omitempty"` - - // Specifies the health status of the Cohesity agent. - // Specifies the status of the agent running on a physical source. - // 'kUnknown' indicates the Agent is not known. No attempt to connect - // to the Agent has occurred. - // 'kUnreachable' indicates the Agent is not reachable. - // 'kHealthy' indicates the Agent is healthy. - // 'kDegraded' indicates the Agent is running but in a degraded state. - // Enum: ["kUnknown","kUnreachable","kHealthy","kDegraded"] - HealthStatus *string `json:"healthStatus,omitempty"` - - // Specifies the IP of the host on which the agent is installed. - HostIP *string `json:"hostIp,omitempty"` - - // Specifies the host type on which the agent is installed. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostOsType *string `json:"hostOsType,omitempty"` - - // Specifies the status of the last upgrade attempt. - // Specifies the status of the upgrade of the agent on a physical server. - // 'kIdle' indicates there is no agent upgrade in progress. - // 'kAccepted' indicates the Agent upgrade is accepted. - // 'kStarted' indicates the Agent upgrade is in progress. - // 'kFinished' indicates the Agent upgrade is completed. - // 'kScheduled' indicates that the Agent is scheduled for upgrade. - // Enum: ["kIdle","kAccepted","kStarted","kFinished","kScheduled"] - LastUpgradeStatus *string `json:"lastUpgradeStatus,omitempty"` - - // Specifies the upgradability of the agent running on the server. - // Specifies the upgradability of the agent running on the physical server. - // 'kUpgradable' indicates the Agent can be upgraded to the agent software - // version on the cluster. - // 'kCurrent' indicates the Agent is running the latest version. - // 'kUnknown' indicates the Agent's version is not known. - // 'kNonUpgradableInvalidVersion' indicates the Agent's version is invalid. - // 'kNonUpgradableAgentIsNewer' indicates the Agent's version is newer than - // the agent software version the cluster. - // 'kNonUpgradableAgentIsOld' indicates the Agent's version is too old that - // does not support upgrades. - // Enum: ["kUpgradable","kCurrent","kUnknown","kNonUpgradableInvalidVersion","kNonUpgradableAgentIsNewer","kNonUpgradableAgentIsOld"] - Upgradability *string `json:"upgradability,omitempty"` - - // Specifies detailed message about the agent upgrade failure. This field - // is not set for successful upgrade. - UpgradeStatusMessage *string `json:"upgradeStatusMessage,omitempty"` - - // Specifies the Cohesity software version of the agent. For example: - // 6.0.1-release-YYYYMMDD_ - Version *string `json:"version,omitempty"` -} - -// Validate validates this agent deployment status response -func (m *AgentDeploymentStatusResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHealthStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostOsType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastUpgradeStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpgradability(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var agentDeploymentStatusResponseTypeCertificateStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Expired"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentDeploymentStatusResponseTypeCertificateStatusPropEnum = append(agentDeploymentStatusResponseTypeCertificateStatusPropEnum, v) - } -} - -const ( - - // AgentDeploymentStatusResponseCertificateStatusActive captures enum value "Active" - AgentDeploymentStatusResponseCertificateStatusActive string = "Active" - - // AgentDeploymentStatusResponseCertificateStatusExpired captures enum value "Expired" - AgentDeploymentStatusResponseCertificateStatusExpired string = "Expired" -) - -// prop value enum -func (m *AgentDeploymentStatusResponse) validateCertificateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentDeploymentStatusResponseTypeCertificateStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentDeploymentStatusResponse) validateCertificateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.CertificateStatus) { // not required - return nil - } - - // value enum - if err := m.validateCertificateStatusEnum("certificateStatus", "body", *m.CertificateStatus); err != nil { - return err - } - - return nil -} - -var agentDeploymentStatusResponseTypeHealthStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kUnreachable","kHealthy","kDegraded"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentDeploymentStatusResponseTypeHealthStatusPropEnum = append(agentDeploymentStatusResponseTypeHealthStatusPropEnum, v) - } -} - -const ( - - // AgentDeploymentStatusResponseHealthStatusKUnknown captures enum value "kUnknown" - AgentDeploymentStatusResponseHealthStatusKUnknown string = "kUnknown" - - // AgentDeploymentStatusResponseHealthStatusKUnreachable captures enum value "kUnreachable" - AgentDeploymentStatusResponseHealthStatusKUnreachable string = "kUnreachable" - - // AgentDeploymentStatusResponseHealthStatusKHealthy captures enum value "kHealthy" - AgentDeploymentStatusResponseHealthStatusKHealthy string = "kHealthy" - - // AgentDeploymentStatusResponseHealthStatusKDegraded captures enum value "kDegraded" - AgentDeploymentStatusResponseHealthStatusKDegraded string = "kDegraded" -) - -// prop value enum -func (m *AgentDeploymentStatusResponse) validateHealthStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentDeploymentStatusResponseTypeHealthStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentDeploymentStatusResponse) validateHealthStatus(formats strfmt.Registry) error { - if swag.IsZero(m.HealthStatus) { // not required - return nil - } - - // value enum - if err := m.validateHealthStatusEnum("healthStatus", "body", *m.HealthStatus); err != nil { - return err - } - - return nil -} - -var agentDeploymentStatusResponseTypeHostOsTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentDeploymentStatusResponseTypeHostOsTypePropEnum = append(agentDeploymentStatusResponseTypeHostOsTypePropEnum, v) - } -} - -const ( - - // AgentDeploymentStatusResponseHostOsTypeKLinux captures enum value "kLinux" - AgentDeploymentStatusResponseHostOsTypeKLinux string = "kLinux" - - // AgentDeploymentStatusResponseHostOsTypeKWindows captures enum value "kWindows" - AgentDeploymentStatusResponseHostOsTypeKWindows string = "kWindows" - - // AgentDeploymentStatusResponseHostOsTypeKAix captures enum value "kAix" - AgentDeploymentStatusResponseHostOsTypeKAix string = "kAix" - - // AgentDeploymentStatusResponseHostOsTypeKSolaris captures enum value "kSolaris" - AgentDeploymentStatusResponseHostOsTypeKSolaris string = "kSolaris" - - // AgentDeploymentStatusResponseHostOsTypeKSapHana captures enum value "kSapHana" - AgentDeploymentStatusResponseHostOsTypeKSapHana string = "kSapHana" - - // AgentDeploymentStatusResponseHostOsTypeKSapOracle captures enum value "kSapOracle" - AgentDeploymentStatusResponseHostOsTypeKSapOracle string = "kSapOracle" - - // AgentDeploymentStatusResponseHostOsTypeKCockroachDB captures enum value "kCockroachDB" - AgentDeploymentStatusResponseHostOsTypeKCockroachDB string = "kCockroachDB" - - // AgentDeploymentStatusResponseHostOsTypeKMySQL captures enum value "kMySQL" - AgentDeploymentStatusResponseHostOsTypeKMySQL string = "kMySQL" - - // AgentDeploymentStatusResponseHostOsTypeKOther captures enum value "kOther" - AgentDeploymentStatusResponseHostOsTypeKOther string = "kOther" - - // AgentDeploymentStatusResponseHostOsTypeKSapSybase captures enum value "kSapSybase" - AgentDeploymentStatusResponseHostOsTypeKSapSybase string = "kSapSybase" - - // AgentDeploymentStatusResponseHostOsTypeKSapMaxDB captures enum value "kSapMaxDB" - AgentDeploymentStatusResponseHostOsTypeKSapMaxDB string = "kSapMaxDB" - - // AgentDeploymentStatusResponseHostOsTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - AgentDeploymentStatusResponseHostOsTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // AgentDeploymentStatusResponseHostOsTypeKDB2 captures enum value "kDB2" - AgentDeploymentStatusResponseHostOsTypeKDB2 string = "kDB2" - - // AgentDeploymentStatusResponseHostOsTypeKSapASE captures enum value "kSapASE" - AgentDeploymentStatusResponseHostOsTypeKSapASE string = "kSapASE" - - // AgentDeploymentStatusResponseHostOsTypeKMariaDB captures enum value "kMariaDB" - AgentDeploymentStatusResponseHostOsTypeKMariaDB string = "kMariaDB" - - // AgentDeploymentStatusResponseHostOsTypeKPostgreSQL captures enum value "kPostgreSQL" - AgentDeploymentStatusResponseHostOsTypeKPostgreSQL string = "kPostgreSQL" - - // AgentDeploymentStatusResponseHostOsTypeKVOS captures enum value "kVOS" - AgentDeploymentStatusResponseHostOsTypeKVOS string = "kVOS" - - // AgentDeploymentStatusResponseHostOsTypeKHPUX captures enum value "kHPUX" - AgentDeploymentStatusResponseHostOsTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *AgentDeploymentStatusResponse) validateHostOsTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentDeploymentStatusResponseTypeHostOsTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentDeploymentStatusResponse) validateHostOsType(formats strfmt.Registry) error { - if swag.IsZero(m.HostOsType) { // not required - return nil - } - - // value enum - if err := m.validateHostOsTypeEnum("hostOsType", "body", *m.HostOsType); err != nil { - return err - } - - return nil -} - -var agentDeploymentStatusResponseTypeLastUpgradeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIdle","kAccepted","kStarted","kFinished","kScheduled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentDeploymentStatusResponseTypeLastUpgradeStatusPropEnum = append(agentDeploymentStatusResponseTypeLastUpgradeStatusPropEnum, v) - } -} - -const ( - - // AgentDeploymentStatusResponseLastUpgradeStatusKIdle captures enum value "kIdle" - AgentDeploymentStatusResponseLastUpgradeStatusKIdle string = "kIdle" - - // AgentDeploymentStatusResponseLastUpgradeStatusKAccepted captures enum value "kAccepted" - AgentDeploymentStatusResponseLastUpgradeStatusKAccepted string = "kAccepted" - - // AgentDeploymentStatusResponseLastUpgradeStatusKStarted captures enum value "kStarted" - AgentDeploymentStatusResponseLastUpgradeStatusKStarted string = "kStarted" - - // AgentDeploymentStatusResponseLastUpgradeStatusKFinished captures enum value "kFinished" - AgentDeploymentStatusResponseLastUpgradeStatusKFinished string = "kFinished" - - // AgentDeploymentStatusResponseLastUpgradeStatusKScheduled captures enum value "kScheduled" - AgentDeploymentStatusResponseLastUpgradeStatusKScheduled string = "kScheduled" -) - -// prop value enum -func (m *AgentDeploymentStatusResponse) validateLastUpgradeStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentDeploymentStatusResponseTypeLastUpgradeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentDeploymentStatusResponse) validateLastUpgradeStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastUpgradeStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastUpgradeStatusEnum("lastUpgradeStatus", "body", *m.LastUpgradeStatus); err != nil { - return err - } - - return nil -} - -var agentDeploymentStatusResponseTypeUpgradabilityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUpgradable","kCurrent","kUnknown","kNonUpgradableInvalidVersion","kNonUpgradableAgentIsNewer","kNonUpgradableAgentIsOld"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentDeploymentStatusResponseTypeUpgradabilityPropEnum = append(agentDeploymentStatusResponseTypeUpgradabilityPropEnum, v) - } -} - -const ( - - // AgentDeploymentStatusResponseUpgradabilityKUpgradable captures enum value "kUpgradable" - AgentDeploymentStatusResponseUpgradabilityKUpgradable string = "kUpgradable" - - // AgentDeploymentStatusResponseUpgradabilityKCurrent captures enum value "kCurrent" - AgentDeploymentStatusResponseUpgradabilityKCurrent string = "kCurrent" - - // AgentDeploymentStatusResponseUpgradabilityKUnknown captures enum value "kUnknown" - AgentDeploymentStatusResponseUpgradabilityKUnknown string = "kUnknown" - - // AgentDeploymentStatusResponseUpgradabilityKNonUpgradableInvalidVersion captures enum value "kNonUpgradableInvalidVersion" - AgentDeploymentStatusResponseUpgradabilityKNonUpgradableInvalidVersion string = "kNonUpgradableInvalidVersion" - - // AgentDeploymentStatusResponseUpgradabilityKNonUpgradableAgentIsNewer captures enum value "kNonUpgradableAgentIsNewer" - AgentDeploymentStatusResponseUpgradabilityKNonUpgradableAgentIsNewer string = "kNonUpgradableAgentIsNewer" - - // AgentDeploymentStatusResponseUpgradabilityKNonUpgradableAgentIsOld captures enum value "kNonUpgradableAgentIsOld" - AgentDeploymentStatusResponseUpgradabilityKNonUpgradableAgentIsOld string = "kNonUpgradableAgentIsOld" -) - -// prop value enum -func (m *AgentDeploymentStatusResponse) validateUpgradabilityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentDeploymentStatusResponseTypeUpgradabilityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentDeploymentStatusResponse) validateUpgradability(formats strfmt.Registry) error { - if swag.IsZero(m.Upgradability) { // not required - return nil - } - - // value enum - if err := m.validateUpgradabilityEnum("upgradability", "body", *m.Upgradability); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this agent deployment status response based on context it is used -func (m *AgentDeploymentStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AgentDeploymentStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentDeploymentStatusResponse) UnmarshalBinary(b []byte) error { - var res AgentDeploymentStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/agent_info_proto_installed_subcomponent_version.go b/v1/models/agent_info_proto_installed_subcomponent_version.go deleted file mode 100644 index a7e02336..00000000 --- a/v1/models/agent_info_proto_installed_subcomponent_version.go +++ /dev/null @@ -1,60 +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" -) - -// AgentInfoProtoInstalledSubcomponentVersion Subcomponent version. The interpretation of the version is based on -// operating system. -// -// swagger:model AgentInfoProto_InstalledSubcomponent_Version -type AgentInfoProtoInstalledSubcomponentVersion struct { - - // build ver - BuildVer *int32 `json:"buildVer,omitempty"` - - // major ver - MajorVer *int32 `json:"majorVer,omitempty"` - - // minor ver - MinorVer *int32 `json:"minorVer,omitempty"` - - // revision num - RevisionNum *int32 `json:"revisionNum,omitempty"` -} - -// Validate validates this agent info proto installed subcomponent version -func (m *AgentInfoProtoInstalledSubcomponentVersion) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this agent info proto installed subcomponent version based on context it is used -func (m *AgentInfoProtoInstalledSubcomponentVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AgentInfoProtoInstalledSubcomponentVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentInfoProtoInstalledSubcomponentVersion) UnmarshalBinary(b []byte) error { - var res AgentInfoProtoInstalledSubcomponentVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/agent_information.go b/v1/models/agent_information.go deleted file mode 100644 index 313cc94b..00000000 --- a/v1/models/agent_information.go +++ /dev/null @@ -1,557 +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" -) - -// AgentInformation Agent Information. -// -// Specifies information about the Agent software running on the server or -// the Virtual Machine. -// -// swagger:model AgentInformation -type AgentInformation struct { - - // Specifies the version if Cristie BMR product is installed on the host. - CbmrVersion *string `json:"cbmrVersion,omitempty"` - - // Specifies the status of FileCbt driver associated with the agent. - FileCbtInfo *CbtInfo `json:"fileCbtInfo,omitempty"` - - // Specifies the host type where the agent is running. This is only set for - // persistent agents. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the agent's id. - ID *int64 `json:"id,omitempty"` - - // Specifies the agent's name. - Name *string `json:"name,omitempty"` - - // Specifies whether oracle multi node multi channel is supported or not. - OracleMultiNodeChannelSupported *bool `json:"oracleMultiNodeChannelSupported,omitempty"` - - // Specifies registration information for an Agent. - RegistrationInfo *RegisteredSourceInfo `json:"registrationInfo,omitempty"` - - // Specifies whether source side dedup is enabled or not. - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // Specifies the agent status. - // Specifies the status of the agent running on a physical source. - // 'kUnknown' indicates the Agent is not known. No attempt to connect - // to the Agent has occurred. - // 'kUnreachable' indicates the Agent is not reachable. - // 'kHealthy' indicates the Agent is healthy. - // 'kDegraded' indicates the Agent is running but in a degraded state. - // Enum: ["kUnknown","kUnreachable","kHealthy","kDegraded"] - Status *string `json:"status,omitempty"` - - // Specifies additional details about the agent status. - StatusMessage *string `json:"statusMessage,omitempty"` - - // Specifies the upgradability of the agent running on the physical server. - // Specifies the upgradability of the agent running on the physical server. - // 'kUpgradable' indicates the Agent can be upgraded to the agent software - // version on the cluster. - // 'kCurrent' indicates the Agent is running the latest version. - // 'kUnknown' indicates the Agent's version is not known. - // 'kNonUpgradableInvalidVersion' indicates the Agent's version is invalid. - // 'kNonUpgradableAgentIsNewer' indicates the Agent's version is newer than - // the agent software version the cluster. - // 'kNonUpgradableAgentIsOld' indicates the Agent's version is too old that - // does not support upgrades. - // Enum: ["kUpgradable","kCurrent","kUnknown","kNonUpgradableInvalidVersion","kNonUpgradableAgentIsNewer","kNonUpgradableAgentIsOld"] - Upgradability *string `json:"upgradability,omitempty"` - - // Specifies the status of the upgrade of the agent on a physical server. - // Specifies the status of the upgrade of the agent on a physical server. - // 'kIdle' indicates there is no agent upgrade in progress. - // 'kAccepted' indicates the Agent upgrade is accepted. - // 'kStarted' indicates the Agent upgrade is in progress. - // 'kFinished' indicates the Agent upgrade is completed. - // 'kScheduled' indicates that the Agent is scheduled for upgrade. - // Enum: ["kIdle","kAccepted","kStarted","kFinished","kScheduled"] - UpgradeStatus *string `json:"upgradeStatus,omitempty"` - - // Specifies detailed message about the agent upgrade failure. This field - // is not set for successful upgrade. - UpgradeStatusMessage *string `json:"upgradeStatusMessage,omitempty"` - - // Specifies the version of the Agent software. - Version *string `json:"version,omitempty"` - - // Specifies the status of VolCbt driver associated with the agent. - VolCbtInfo *CbtInfo `json:"volCbtInfo,omitempty"` -} - -// Validate validates this agent information -func (m *AgentInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileCbtInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegistrationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpgradability(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpgradeStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolCbtInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentInformation) validateFileCbtInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FileCbtInfo) { // not required - return nil - } - - if m.FileCbtInfo != nil { - if err := m.FileCbtInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCbtInfo") - } - return err - } - } - - return nil -} - -var agentInformationTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeHostTypePropEnum = append(agentInformationTypeHostTypePropEnum, v) - } -} - -const ( - - // AgentInformationHostTypeKLinux captures enum value "kLinux" - AgentInformationHostTypeKLinux string = "kLinux" - - // AgentInformationHostTypeKWindows captures enum value "kWindows" - AgentInformationHostTypeKWindows string = "kWindows" - - // AgentInformationHostTypeKAix captures enum value "kAix" - AgentInformationHostTypeKAix string = "kAix" - - // AgentInformationHostTypeKSolaris captures enum value "kSolaris" - AgentInformationHostTypeKSolaris string = "kSolaris" - - // AgentInformationHostTypeKSapHana captures enum value "kSapHana" - AgentInformationHostTypeKSapHana string = "kSapHana" - - // AgentInformationHostTypeKSapOracle captures enum value "kSapOracle" - AgentInformationHostTypeKSapOracle string = "kSapOracle" - - // AgentInformationHostTypeKCockroachDB captures enum value "kCockroachDB" - AgentInformationHostTypeKCockroachDB string = "kCockroachDB" - - // AgentInformationHostTypeKMySQL captures enum value "kMySQL" - AgentInformationHostTypeKMySQL string = "kMySQL" - - // AgentInformationHostTypeKOther captures enum value "kOther" - AgentInformationHostTypeKOther string = "kOther" - - // AgentInformationHostTypeKSapSybase captures enum value "kSapSybase" - AgentInformationHostTypeKSapSybase string = "kSapSybase" - - // AgentInformationHostTypeKSapMaxDB captures enum value "kSapMaxDB" - AgentInformationHostTypeKSapMaxDB string = "kSapMaxDB" - - // AgentInformationHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - AgentInformationHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // AgentInformationHostTypeKDB2 captures enum value "kDB2" - AgentInformationHostTypeKDB2 string = "kDB2" - - // AgentInformationHostTypeKSapASE captures enum value "kSapASE" - AgentInformationHostTypeKSapASE string = "kSapASE" - - // AgentInformationHostTypeKMariaDB captures enum value "kMariaDB" - AgentInformationHostTypeKMariaDB string = "kMariaDB" - - // AgentInformationHostTypeKPostgreSQL captures enum value "kPostgreSQL" - AgentInformationHostTypeKPostgreSQL string = "kPostgreSQL" - - // AgentInformationHostTypeKVOS captures enum value "kVOS" - AgentInformationHostTypeKVOS string = "kVOS" - - // AgentInformationHostTypeKHPUX captures enum value "kHPUX" - AgentInformationHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *AgentInformation) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *AgentInformation) validateRegistrationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegistrationInfo) { // not required - 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 -} - -var agentInformationTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kUnreachable","kHealthy","kDegraded"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeStatusPropEnum = append(agentInformationTypeStatusPropEnum, v) - } -} - -const ( - - // AgentInformationStatusKUnknown captures enum value "kUnknown" - AgentInformationStatusKUnknown string = "kUnknown" - - // AgentInformationStatusKUnreachable captures enum value "kUnreachable" - AgentInformationStatusKUnreachable string = "kUnreachable" - - // AgentInformationStatusKHealthy captures enum value "kHealthy" - AgentInformationStatusKHealthy string = "kHealthy" - - // AgentInformationStatusKDegraded captures enum value "kDegraded" - AgentInformationStatusKDegraded string = "kDegraded" -) - -// prop value enum -func (m *AgentInformation) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var agentInformationTypeUpgradabilityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUpgradable","kCurrent","kUnknown","kNonUpgradableInvalidVersion","kNonUpgradableAgentIsNewer","kNonUpgradableAgentIsOld"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeUpgradabilityPropEnum = append(agentInformationTypeUpgradabilityPropEnum, v) - } -} - -const ( - - // AgentInformationUpgradabilityKUpgradable captures enum value "kUpgradable" - AgentInformationUpgradabilityKUpgradable string = "kUpgradable" - - // AgentInformationUpgradabilityKCurrent captures enum value "kCurrent" - AgentInformationUpgradabilityKCurrent string = "kCurrent" - - // AgentInformationUpgradabilityKUnknown captures enum value "kUnknown" - AgentInformationUpgradabilityKUnknown string = "kUnknown" - - // AgentInformationUpgradabilityKNonUpgradableInvalidVersion captures enum value "kNonUpgradableInvalidVersion" - AgentInformationUpgradabilityKNonUpgradableInvalidVersion string = "kNonUpgradableInvalidVersion" - - // AgentInformationUpgradabilityKNonUpgradableAgentIsNewer captures enum value "kNonUpgradableAgentIsNewer" - AgentInformationUpgradabilityKNonUpgradableAgentIsNewer string = "kNonUpgradableAgentIsNewer" - - // AgentInformationUpgradabilityKNonUpgradableAgentIsOld captures enum value "kNonUpgradableAgentIsOld" - AgentInformationUpgradabilityKNonUpgradableAgentIsOld string = "kNonUpgradableAgentIsOld" -) - -// prop value enum -func (m *AgentInformation) validateUpgradabilityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeUpgradabilityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateUpgradability(formats strfmt.Registry) error { - if swag.IsZero(m.Upgradability) { // not required - return nil - } - - // value enum - if err := m.validateUpgradabilityEnum("upgradability", "body", *m.Upgradability); err != nil { - return err - } - - return nil -} - -var agentInformationTypeUpgradeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIdle","kAccepted","kStarted","kFinished","kScheduled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeUpgradeStatusPropEnum = append(agentInformationTypeUpgradeStatusPropEnum, v) - } -} - -const ( - - // AgentInformationUpgradeStatusKIdle captures enum value "kIdle" - AgentInformationUpgradeStatusKIdle string = "kIdle" - - // AgentInformationUpgradeStatusKAccepted captures enum value "kAccepted" - AgentInformationUpgradeStatusKAccepted string = "kAccepted" - - // AgentInformationUpgradeStatusKStarted captures enum value "kStarted" - AgentInformationUpgradeStatusKStarted string = "kStarted" - - // AgentInformationUpgradeStatusKFinished captures enum value "kFinished" - AgentInformationUpgradeStatusKFinished string = "kFinished" - - // AgentInformationUpgradeStatusKScheduled captures enum value "kScheduled" - AgentInformationUpgradeStatusKScheduled string = "kScheduled" -) - -// prop value enum -func (m *AgentInformation) validateUpgradeStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeUpgradeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateUpgradeStatus(formats strfmt.Registry) error { - if swag.IsZero(m.UpgradeStatus) { // not required - return nil - } - - // value enum - if err := m.validateUpgradeStatusEnum("upgradeStatus", "body", *m.UpgradeStatus); err != nil { - return err - } - - return nil -} - -func (m *AgentInformation) validateVolCbtInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolCbtInfo) { // not required - return nil - } - - if m.VolCbtInfo != nil { - if err := m.VolCbtInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volCbtInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this agent information based on the context it is used -func (m *AgentInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileCbtInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistrationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolCbtInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentInformation) contextValidateFileCbtInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FileCbtInfo != nil { - - if swag.IsZero(m.FileCbtInfo) { // not required - return nil - } - - if err := m.FileCbtInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCbtInfo") - } - return err - } - } - - return nil -} - -func (m *AgentInformation) 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 *AgentInformation) contextValidateVolCbtInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VolCbtInfo != nil { - - if swag.IsZero(m.VolCbtInfo) { // not required - return nil - } - - if err := m.VolCbtInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volCbtInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AgentInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentInformation) UnmarshalBinary(b []byte) error { - var res AgentInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/agent_upgrade_task_info.go b/v1/models/agent_upgrade_task_info.go deleted file mode 100644 index 98cdd249..00000000 --- a/v1/models/agent_upgrade_task_info.go +++ /dev/null @@ -1,56 +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" -) - -// AgentUpgradeTaskInfo Parameters for agent upgrade op. -// -// swagger:model AgentUpgradeTaskInfo -type AgentUpgradeTaskInfo struct { - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Denotes the start time of the agent upgrade task. - StartTimeUsecs *string `json:"startTimeUsecs,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this agent upgrade task info -func (m *AgentUpgradeTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this agent upgrade task info based on context it is used -func (m *AgentUpgradeTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeTaskInfo) UnmarshalBinary(b []byte) error { - var res AgentUpgradeTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aggregated_subtree_info.go b/v1/models/aggregated_subtree_info.go deleted file mode 100644 index 89bbe23f..00000000 --- a/v1/models/aggregated_subtree_info.go +++ /dev/null @@ -1,301 +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" -) - -// AggregatedSubtreeInfo Aggregated Subtree Info. -// -// Aggregated information about a node subtree. -// -// swagger:model AggregatedSubtreeInfo -type AggregatedSubtreeInfo struct { - - // Specifies the environment such as 'kSQL' or 'kVMware', where the - // Protection Source exists. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the number of leaf nodes under the subtree of this node. - LeavesCount *int64 `json:"leavesCount,omitempty"` - - // Specifies the total logical size of the data under the subtree - // of this node. - TotalLogicalSize *int64 `json:"totalLogicalSize,omitempty"` -} - -// Validate validates this aggregated subtree info -func (m *AggregatedSubtreeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aggregatedSubtreeInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aggregatedSubtreeInfoTypeEnvironmentPropEnum = append(aggregatedSubtreeInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // AggregatedSubtreeInfoEnvironmentKVMware captures enum value "kVMware" - AggregatedSubtreeInfoEnvironmentKVMware string = "kVMware" - - // AggregatedSubtreeInfoEnvironmentKHyperV captures enum value "kHyperV" - AggregatedSubtreeInfoEnvironmentKHyperV string = "kHyperV" - - // AggregatedSubtreeInfoEnvironmentKSQL captures enum value "kSQL" - AggregatedSubtreeInfoEnvironmentKSQL string = "kSQL" - - // AggregatedSubtreeInfoEnvironmentKView captures enum value "kView" - AggregatedSubtreeInfoEnvironmentKView string = "kView" - - // AggregatedSubtreeInfoEnvironmentKPuppeteer captures enum value "kPuppeteer" - AggregatedSubtreeInfoEnvironmentKPuppeteer string = "kPuppeteer" - - // AggregatedSubtreeInfoEnvironmentKPhysical captures enum value "kPhysical" - AggregatedSubtreeInfoEnvironmentKPhysical string = "kPhysical" - - // AggregatedSubtreeInfoEnvironmentKPure captures enum value "kPure" - AggregatedSubtreeInfoEnvironmentKPure string = "kPure" - - // AggregatedSubtreeInfoEnvironmentKNimble captures enum value "kNimble" - AggregatedSubtreeInfoEnvironmentKNimble string = "kNimble" - - // AggregatedSubtreeInfoEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - AggregatedSubtreeInfoEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // AggregatedSubtreeInfoEnvironmentKAzure captures enum value "kAzure" - AggregatedSubtreeInfoEnvironmentKAzure string = "kAzure" - - // AggregatedSubtreeInfoEnvironmentKNetapp captures enum value "kNetapp" - AggregatedSubtreeInfoEnvironmentKNetapp string = "kNetapp" - - // AggregatedSubtreeInfoEnvironmentKAgent captures enum value "kAgent" - AggregatedSubtreeInfoEnvironmentKAgent string = "kAgent" - - // AggregatedSubtreeInfoEnvironmentKGenericNas captures enum value "kGenericNas" - AggregatedSubtreeInfoEnvironmentKGenericNas string = "kGenericNas" - - // AggregatedSubtreeInfoEnvironmentKAcropolis captures enum value "kAcropolis" - AggregatedSubtreeInfoEnvironmentKAcropolis string = "kAcropolis" - - // AggregatedSubtreeInfoEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - AggregatedSubtreeInfoEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // AggregatedSubtreeInfoEnvironmentKIsilon captures enum value "kIsilon" - AggregatedSubtreeInfoEnvironmentKIsilon string = "kIsilon" - - // AggregatedSubtreeInfoEnvironmentKGPFS captures enum value "kGPFS" - AggregatedSubtreeInfoEnvironmentKGPFS string = "kGPFS" - - // AggregatedSubtreeInfoEnvironmentKKVM captures enum value "kKVM" - AggregatedSubtreeInfoEnvironmentKKVM string = "kKVM" - - // AggregatedSubtreeInfoEnvironmentKAWS captures enum value "kAWS" - AggregatedSubtreeInfoEnvironmentKAWS string = "kAWS" - - // AggregatedSubtreeInfoEnvironmentKExchange captures enum value "kExchange" - AggregatedSubtreeInfoEnvironmentKExchange string = "kExchange" - - // AggregatedSubtreeInfoEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - AggregatedSubtreeInfoEnvironmentKHyperVVSS string = "kHyperVVSS" - - // AggregatedSubtreeInfoEnvironmentKOracle captures enum value "kOracle" - AggregatedSubtreeInfoEnvironmentKOracle string = "kOracle" - - // AggregatedSubtreeInfoEnvironmentKGCP captures enum value "kGCP" - AggregatedSubtreeInfoEnvironmentKGCP string = "kGCP" - - // AggregatedSubtreeInfoEnvironmentKFlashBlade captures enum value "kFlashBlade" - AggregatedSubtreeInfoEnvironmentKFlashBlade string = "kFlashBlade" - - // AggregatedSubtreeInfoEnvironmentKAWSNative captures enum value "kAWSNative" - AggregatedSubtreeInfoEnvironmentKAWSNative string = "kAWSNative" - - // AggregatedSubtreeInfoEnvironmentKO365 captures enum value "kO365" - AggregatedSubtreeInfoEnvironmentKO365 string = "kO365" - - // AggregatedSubtreeInfoEnvironmentKO365Outlook captures enum value "kO365Outlook" - AggregatedSubtreeInfoEnvironmentKO365Outlook string = "kO365Outlook" - - // AggregatedSubtreeInfoEnvironmentKHyperFlex captures enum value "kHyperFlex" - AggregatedSubtreeInfoEnvironmentKHyperFlex string = "kHyperFlex" - - // AggregatedSubtreeInfoEnvironmentKGCPNative captures enum value "kGCPNative" - AggregatedSubtreeInfoEnvironmentKGCPNative string = "kGCPNative" - - // AggregatedSubtreeInfoEnvironmentKAzureNative captures enum value "kAzureNative" - AggregatedSubtreeInfoEnvironmentKAzureNative string = "kAzureNative" - - // AggregatedSubtreeInfoEnvironmentKKubernetes captures enum value "kKubernetes" - AggregatedSubtreeInfoEnvironmentKKubernetes string = "kKubernetes" - - // AggregatedSubtreeInfoEnvironmentKElastifile captures enum value "kElastifile" - AggregatedSubtreeInfoEnvironmentKElastifile string = "kElastifile" - - // AggregatedSubtreeInfoEnvironmentKAD captures enum value "kAD" - AggregatedSubtreeInfoEnvironmentKAD string = "kAD" - - // AggregatedSubtreeInfoEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - AggregatedSubtreeInfoEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // AggregatedSubtreeInfoEnvironmentKCassandra captures enum value "kCassandra" - AggregatedSubtreeInfoEnvironmentKCassandra string = "kCassandra" - - // AggregatedSubtreeInfoEnvironmentKMongoDB captures enum value "kMongoDB" - AggregatedSubtreeInfoEnvironmentKMongoDB string = "kMongoDB" - - // AggregatedSubtreeInfoEnvironmentKCouchbase captures enum value "kCouchbase" - AggregatedSubtreeInfoEnvironmentKCouchbase string = "kCouchbase" - - // AggregatedSubtreeInfoEnvironmentKHdfs captures enum value "kHdfs" - AggregatedSubtreeInfoEnvironmentKHdfs string = "kHdfs" - - // AggregatedSubtreeInfoEnvironmentKHive captures enum value "kHive" - AggregatedSubtreeInfoEnvironmentKHive string = "kHive" - - // AggregatedSubtreeInfoEnvironmentKHBase captures enum value "kHBase" - AggregatedSubtreeInfoEnvironmentKHBase string = "kHBase" - - // AggregatedSubtreeInfoEnvironmentKUDA captures enum value "kUDA" - AggregatedSubtreeInfoEnvironmentKUDA string = "kUDA" - - // AggregatedSubtreeInfoEnvironmentKO365Teams captures enum value "kO365Teams" - AggregatedSubtreeInfoEnvironmentKO365Teams string = "kO365Teams" - - // AggregatedSubtreeInfoEnvironmentKO365Group captures enum value "kO365Group" - AggregatedSubtreeInfoEnvironmentKO365Group string = "kO365Group" - - // AggregatedSubtreeInfoEnvironmentKO365Exchange captures enum value "kO365Exchange" - AggregatedSubtreeInfoEnvironmentKO365Exchange string = "kO365Exchange" - - // AggregatedSubtreeInfoEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - AggregatedSubtreeInfoEnvironmentKO365OneDrive string = "kO365OneDrive" - - // AggregatedSubtreeInfoEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - AggregatedSubtreeInfoEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // AggregatedSubtreeInfoEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - AggregatedSubtreeInfoEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *AggregatedSubtreeInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aggregatedSubtreeInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AggregatedSubtreeInfo) 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 validates this aggregated subtree info based on context it is used -func (m *AggregatedSubtreeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AggregatedSubtreeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AggregatedSubtreeInfo) UnmarshalBinary(b []byte) error { - var res AggregatedSubtreeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/airgap_config.go b/v1/models/airgap_config.go deleted file mode 100644 index c5a34664..00000000 --- a/v1/models/airgap_config.go +++ /dev/null @@ -1,110 +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" -) - -// AirgapConfig Structure to hold Airgap Configuration -// -// swagger:model AirgapConfig -type AirgapConfig struct { - - // Airgap Status - // 'kEnable' indicates that Airgap is enbaled - // 'kDisable' indicates that Airgap is disabled - // Enum: ["kEnable","kDisable"] - AirgapStatus *string `json:"airgapStatus,omitempty"` - - // Exception firewall profile names - ExceptionProfiles []string `json:"exceptionProfiles"` -} - -// Validate validates this airgap config -func (m *AirgapConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAirgapStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var airgapConfigTypeAirgapStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEnable","kDisable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - airgapConfigTypeAirgapStatusPropEnum = append(airgapConfigTypeAirgapStatusPropEnum, v) - } -} - -const ( - - // AirgapConfigAirgapStatusKEnable captures enum value "kEnable" - AirgapConfigAirgapStatusKEnable string = "kEnable" - - // AirgapConfigAirgapStatusKDisable captures enum value "kDisable" - AirgapConfigAirgapStatusKDisable string = "kDisable" -) - -// prop value enum -func (m *AirgapConfig) validateAirgapStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, airgapConfigTypeAirgapStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AirgapConfig) validateAirgapStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AirgapStatus) { // not required - return nil - } - - // value enum - if err := m.validateAirgapStatusEnum("airgapStatus", "body", *m.AirgapStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this airgap config based on context it is used -func (m *AirgapConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AirgapConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AirgapConfig) UnmarshalBinary(b []byte) error { - var res AirgapConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert.go b/v1/models/alert.go deleted file mode 100644 index 99d65fa1..00000000 --- a/v1/models/alert.go +++ /dev/null @@ -1,721 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Alert Alert. -// -// Specifies information about an Alert such as the type, id assigned by -// the Cohesity Cluster, number of duplicates, severity, etc. -// -// swagger:model Alert -type Alert struct { - - // Specifies the category of an Alert. - // kDisk - Alert associated with the disk. - // kNode - Alert associated with general hardware on a specific node. - // kCluster - Alert associated with general hardware in cluster level. - // kChassis - Alert associated with the Chassis. - // kPowerSupply - Alert associated with the power supply. - // kCPU - Alert associated with the CPU usage. - // kMemory - Alert associated with the RAM/Memory. - // kTemperature - Alert associated with the temperature. - // kFan - Alert associated with the fan. - // kNIC - Alert associated with network chips and interfaces. - // kFirmware - Alert associated with the firmware. - // kNodeHealth - Alert associated with node health status. - // kOperatingSystem - Alert associated with operating systems. - // kDataPath - Alert associated with data management in the cluster. - // kMetadata - Alert associated with metadata management. - // kIndexing - Alert associated with indexing services. - // kHelios - Alert associated with Helios. - // kAppMarketPlace - Alert associated with App MarketPlace. - // kSystemService -Alert associated with System service apps. - // kLicense - Alert associated with licensing. - // kSecurity - Alert associated with security. - // kUpgrade - Alert associated with upgrade activities. - // kClusterManagement - Alert associated with cluster management activities. - // kAuditLog - Alert associated with audit log events. - // kNetworking - Alert associated with networking issue. - // kConfiguration - Alert associated with cluster or system configurations. - // kStorageUsage - Alert associated with the disk/domain/cluster storage usage. - // kFaultTolerance - Alert associated with the fault tolerance in different levels. - // kBackupRestore - Alert associated with Backup-Restore job. - // kArchivalRestore - Alert associated with Archival-Restore job. - // kRemoteReplication - Alert associated with Replication job. - // kQuota - Alert associated with Quotas. - // kCDP - Alert associated with Continuous Data Protection. - // kViewFailover - Alert associated with view Failover. - // kDisasterRecovery - Alert associated with Disaster Recovery. - // Enum: ["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"] - AlertCategory *string `json:"alertCategory,omitempty"` - - // Specifies a unique code that categorizes the Alert, - // for example: CE00200014, where CE stands for Cohesity Error, the alert - // state next 3 digits is the id of the Alert Category - // (e.g. 002 for 'kNode') and the last 5 digits is the id of - // the Alert Type (e.g. 00014 for 'kNodeHighCpuUsage'). - AlertCode *string `json:"alertCode,omitempty"` - - // Specifies documentation about the Alert such as name, description, cause - // and how to resolve the Alert. - AlertDocument *AlertDocument `json:"alertDocument,omitempty"` - - // Specifies the current state of the Alert. - // kAlertNote - Alerts that are just for note. - // kAlertOpen - Alerts that are unresolved. - // kAlertResolved - Alerts that are already marked as resolved. - // kAlertSuppressed - Alerts that are suppressed due to snooze settings. - // Enum: ["kNote","kOpen","kResolved","kSuppressed"] - AlertState *string `json:"alertState,omitempty"` - - // Specifies a 5 digit unique digital id for the Alert Type, such as 00014 - // for 'kNodeHighCpuUsage'. This id is used in alertCode. - AlertType *int32 `json:"alertType,omitempty"` - - // Specifies the Alert type bucket. - // Specifies the Alert type bucket. - // kHardware - Alerts related to hardware on which Cohesity software is running. - // kSoftware - Alerts which are related to software components. - // kDataService - Alerts related to data services. - // kMaintenance - Alerts relates to maintenance activities. - // Enum: ["kHardware","kSoftware","kDataService","kMaintenance"] - AlertTypeBucket *string `json:"alertTypeBucket,omitempty"` - - // Specifies id of the cluster where the alert was raised. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies name of the cluster where the alert was raised. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies total count of duplicated Alerts even if there are more than - // 25 occurrences. - DedupCount *int32 `json:"dedupCount,omitempty"` - - // Specifies Unix epoch Timestamps (in microseconds) for the last 25 - // occurrences of duplicated Alerts that are stored with the original/primary - // Alert. Alerts are grouped into one Alert if the Alerts - // are the same type, are reporting on the same Object - // and occur within one hour. - // 'dedupCount' always reports the total count of duplicated Alerts - // even if there are more than 25 occurrences. - // For example, if there are 100 occurrences of this Alert, - // dedupTimestamps stores the timestamps of the - // last 25 occurrences and dedupCount equals 100. - DedupTimestamps []int64 `json:"dedupTimestamps"` - - // Specifies source where the event occurred. - EventSource *string `json:"eventSource,omitempty"` - - // Specifies Unix epoch Timestamp (in microseconds) of the first - // occurrence of the Alert. - FirstTimestampUsecs *int64 `json:"firstTimestampUsecs,omitempty"` - - // Specifies unique id of this Alert. - ID *string `json:"id,omitempty"` - - // Specifies the labels for which this alert has been raised. - LabelIds []string `json:"labelIds"` - - // Specifies Unix epoch Timestamp (in microseconds) of the most - // recent occurrence of the Alert. - LatestTimestampUsecs *int64 `json:"latestTimestampUsecs,omitempty"` - - // Specifies array of key-value pairs associated with the Alert. - // The Cohesity Cluster may autogenerate properties depending on - // the Alert type. This list includes both autogenerated and specified - // properties. - PropertyList []*AlertProperty `json:"propertyList"` - - // Specifies the region id of the cluster. - RegionID *string `json:"regionId,omitempty"` - - // Specifies information about the Alert Resolution such as a summary, - // id assigned by the Cohesity Cluster, user who resolved the Alerts, etc. - ResolutionDetails *AlertResolutionDetails `json:"resolutionDetails,omitempty"` - - // Resolution Id String - ResolutionIDString *string `json:"resolutionIdString,omitempty"` - - // Specifies Unix epoch Timestamps in microseconds when alert is resolved. - ResolvedTimestampUsecs *int64 `json:"resolvedTimestampUsecs,omitempty"` - - // Specifies the severity level of an Alert. - // kCritical - Alerts whose severity type is Critical. - // kWarning - Alerts whose severity type is Warning. - // kInfo - Alerts whose severity type is Info. - // Enum: ["kCritical","kWarning","kInfo"] - Severity *string `json:"severity,omitempty"` - - // Specifies unique id generated when the Alert is suppressed by the admin. - SuppressionID *int64 `json:"suppressionId,omitempty"` - - // Specifies the tenants for which this alert has been raised. - TenantIds []string `json:"tenantIds"` - - // Vaults where source object associated with alert is vaulted. - Vaults []*AlertVaultInfo `json:"vaults"` -} - -// Validate validates this alert -func (m *Alert) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertCategory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertDocument(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertTypeBucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePropertyList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResolutionDetails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSeverity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var alertTypeAlertCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTypeAlertCategoryPropEnum = append(alertTypeAlertCategoryPropEnum, v) - } -} - -const ( - - // AlertAlertCategoryKDisk captures enum value "kDisk" - AlertAlertCategoryKDisk string = "kDisk" - - // AlertAlertCategoryKNode captures enum value "kNode" - AlertAlertCategoryKNode string = "kNode" - - // AlertAlertCategoryKCluster captures enum value "kCluster" - AlertAlertCategoryKCluster string = "kCluster" - - // AlertAlertCategoryKChassis captures enum value "kChassis" - AlertAlertCategoryKChassis string = "kChassis" - - // AlertAlertCategoryKPowerSupply captures enum value "kPowerSupply" - AlertAlertCategoryKPowerSupply string = "kPowerSupply" - - // AlertAlertCategoryKCPU captures enum value "kCPU" - AlertAlertCategoryKCPU string = "kCPU" - - // AlertAlertCategoryKMemory captures enum value "kMemory" - AlertAlertCategoryKMemory string = "kMemory" - - // AlertAlertCategoryKTemperature captures enum value "kTemperature" - AlertAlertCategoryKTemperature string = "kTemperature" - - // AlertAlertCategoryKFan captures enum value "kFan" - AlertAlertCategoryKFan string = "kFan" - - // AlertAlertCategoryKNIC captures enum value "kNIC" - AlertAlertCategoryKNIC string = "kNIC" - - // AlertAlertCategoryKFirmware captures enum value "kFirmware" - AlertAlertCategoryKFirmware string = "kFirmware" - - // AlertAlertCategoryKNodeHealth captures enum value "kNodeHealth" - AlertAlertCategoryKNodeHealth string = "kNodeHealth" - - // AlertAlertCategoryKOperatingSystem captures enum value "kOperatingSystem" - AlertAlertCategoryKOperatingSystem string = "kOperatingSystem" - - // AlertAlertCategoryKDataPath captures enum value "kDataPath" - AlertAlertCategoryKDataPath string = "kDataPath" - - // AlertAlertCategoryKMetadata captures enum value "kMetadata" - AlertAlertCategoryKMetadata string = "kMetadata" - - // AlertAlertCategoryKIndexing captures enum value "kIndexing" - AlertAlertCategoryKIndexing string = "kIndexing" - - // AlertAlertCategoryKHelios captures enum value "kHelios" - AlertAlertCategoryKHelios string = "kHelios" - - // AlertAlertCategoryKAppMarketPlace captures enum value "kAppMarketPlace" - AlertAlertCategoryKAppMarketPlace string = "kAppMarketPlace" - - // AlertAlertCategoryKSystemService captures enum value "kSystemService" - AlertAlertCategoryKSystemService string = "kSystemService" - - // AlertAlertCategoryKLicense captures enum value "kLicense" - AlertAlertCategoryKLicense string = "kLicense" - - // AlertAlertCategoryKSecurity captures enum value "kSecurity" - AlertAlertCategoryKSecurity string = "kSecurity" - - // AlertAlertCategoryKUpgrade captures enum value "kUpgrade" - AlertAlertCategoryKUpgrade string = "kUpgrade" - - // AlertAlertCategoryKClusterManagement captures enum value "kClusterManagement" - AlertAlertCategoryKClusterManagement string = "kClusterManagement" - - // AlertAlertCategoryKAuditLog captures enum value "kAuditLog" - AlertAlertCategoryKAuditLog string = "kAuditLog" - - // AlertAlertCategoryKNetworking captures enum value "kNetworking" - AlertAlertCategoryKNetworking string = "kNetworking" - - // AlertAlertCategoryKConfiguration captures enum value "kConfiguration" - AlertAlertCategoryKConfiguration string = "kConfiguration" - - // AlertAlertCategoryKStorageUsage captures enum value "kStorageUsage" - AlertAlertCategoryKStorageUsage string = "kStorageUsage" - - // AlertAlertCategoryKFaultTolerance captures enum value "kFaultTolerance" - AlertAlertCategoryKFaultTolerance string = "kFaultTolerance" - - // AlertAlertCategoryKBackupRestore captures enum value "kBackupRestore" - AlertAlertCategoryKBackupRestore string = "kBackupRestore" - - // AlertAlertCategoryKArchivalRestore captures enum value "kArchivalRestore" - AlertAlertCategoryKArchivalRestore string = "kArchivalRestore" - - // AlertAlertCategoryKRemoteReplication captures enum value "kRemoteReplication" - AlertAlertCategoryKRemoteReplication string = "kRemoteReplication" - - // AlertAlertCategoryKQuota captures enum value "kQuota" - AlertAlertCategoryKQuota string = "kQuota" - - // AlertAlertCategoryKCDP captures enum value "kCDP" - AlertAlertCategoryKCDP string = "kCDP" - - // AlertAlertCategoryKViewFailover captures enum value "kViewFailover" - AlertAlertCategoryKViewFailover string = "kViewFailover" - - // AlertAlertCategoryKDisasterRecovery captures enum value "kDisasterRecovery" - AlertAlertCategoryKDisasterRecovery string = "kDisasterRecovery" -) - -// prop value enum -func (m *Alert) validateAlertCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTypeAlertCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Alert) validateAlertCategory(formats strfmt.Registry) error { - if swag.IsZero(m.AlertCategory) { // not required - return nil - } - - // value enum - if err := m.validateAlertCategoryEnum("alertCategory", "body", *m.AlertCategory); err != nil { - return err - } - - return nil -} - -func (m *Alert) validateAlertDocument(formats strfmt.Registry) error { - if swag.IsZero(m.AlertDocument) { // not required - return nil - } - - if m.AlertDocument != nil { - if err := m.AlertDocument.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertDocument") - } - return err - } - } - - return nil -} - -var alertTypeAlertStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNote","kOpen","kResolved","kSuppressed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTypeAlertStatePropEnum = append(alertTypeAlertStatePropEnum, v) - } -} - -const ( - - // AlertAlertStateKNote captures enum value "kNote" - AlertAlertStateKNote string = "kNote" - - // AlertAlertStateKOpen captures enum value "kOpen" - AlertAlertStateKOpen string = "kOpen" - - // AlertAlertStateKResolved captures enum value "kResolved" - AlertAlertStateKResolved string = "kResolved" - - // AlertAlertStateKSuppressed captures enum value "kSuppressed" - AlertAlertStateKSuppressed string = "kSuppressed" -) - -// prop value enum -func (m *Alert) validateAlertStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTypeAlertStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Alert) validateAlertState(formats strfmt.Registry) error { - if swag.IsZero(m.AlertState) { // not required - return nil - } - - // value enum - if err := m.validateAlertStateEnum("alertState", "body", *m.AlertState); err != nil { - return err - } - - return nil -} - -var alertTypeAlertTypeBucketPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHardware","kSoftware","kDataService","kMaintenance"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTypeAlertTypeBucketPropEnum = append(alertTypeAlertTypeBucketPropEnum, v) - } -} - -const ( - - // AlertAlertTypeBucketKHardware captures enum value "kHardware" - AlertAlertTypeBucketKHardware string = "kHardware" - - // AlertAlertTypeBucketKSoftware captures enum value "kSoftware" - AlertAlertTypeBucketKSoftware string = "kSoftware" - - // AlertAlertTypeBucketKDataService captures enum value "kDataService" - AlertAlertTypeBucketKDataService string = "kDataService" - - // AlertAlertTypeBucketKMaintenance captures enum value "kMaintenance" - AlertAlertTypeBucketKMaintenance string = "kMaintenance" -) - -// prop value enum -func (m *Alert) validateAlertTypeBucketEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTypeAlertTypeBucketPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Alert) validateAlertTypeBucket(formats strfmt.Registry) error { - if swag.IsZero(m.AlertTypeBucket) { // not required - return nil - } - - // value enum - if err := m.validateAlertTypeBucketEnum("alertTypeBucket", "body", *m.AlertTypeBucket); err != nil { - return err - } - - return nil -} - -func (m *Alert) validatePropertyList(formats strfmt.Registry) error { - if swag.IsZero(m.PropertyList) { // not required - return nil - } - - for i := 0; i < len(m.PropertyList); i++ { - if swag.IsZero(m.PropertyList[i]) { // not required - continue - } - - if m.PropertyList[i] != nil { - if err := m.PropertyList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("propertyList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("propertyList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Alert) validateResolutionDetails(formats strfmt.Registry) error { - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if m.ResolutionDetails != nil { - if err := m.ResolutionDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -var alertTypeSeverityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCritical","kWarning","kInfo"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTypeSeverityPropEnum = append(alertTypeSeverityPropEnum, v) - } -} - -const ( - - // AlertSeverityKCritical captures enum value "kCritical" - AlertSeverityKCritical string = "kCritical" - - // AlertSeverityKWarning captures enum value "kWarning" - AlertSeverityKWarning string = "kWarning" - - // AlertSeverityKInfo captures enum value "kInfo" - AlertSeverityKInfo string = "kInfo" -) - -// prop value enum -func (m *Alert) validateSeverityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTypeSeverityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Alert) validateSeverity(formats strfmt.Registry) error { - if swag.IsZero(m.Severity) { // not required - return nil - } - - // value enum - if err := m.validateSeverityEnum("severity", "body", *m.Severity); err != nil { - return err - } - - return nil -} - -func (m *Alert) validateVaults(formats strfmt.Registry) error { - if swag.IsZero(m.Vaults) { // not required - return nil - } - - for i := 0; i < len(m.Vaults); i++ { - if swag.IsZero(m.Vaults[i]) { // not required - continue - } - - if m.Vaults[i] != nil { - if err := m.Vaults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this alert based on the context it is used -func (m *Alert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertDocument(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePropertyList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResolutionDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Alert) contextValidateAlertDocument(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertDocument != nil { - - if swag.IsZero(m.AlertDocument) { // not required - return nil - } - - if err := m.AlertDocument.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertDocument") - } - return err - } - } - - return nil -} - -func (m *Alert) contextValidatePropertyList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PropertyList); i++ { - - if m.PropertyList[i] != nil { - - if swag.IsZero(m.PropertyList[i]) { // not required - return nil - } - - if err := m.PropertyList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("propertyList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("propertyList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Alert) contextValidateResolutionDetails(ctx context.Context, formats strfmt.Registry) error { - - if m.ResolutionDetails != nil { - - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if err := m.ResolutionDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -func (m *Alert) contextValidateVaults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vaults); i++ { - - if m.Vaults[i] != nil { - - if swag.IsZero(m.Vaults[i]) { // not required - return nil - } - - if err := m.Vaults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Alert) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Alert) UnmarshalBinary(b []byte) error { - var res Alert - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_category_name.go b/v1/models/alert_category_name.go deleted file mode 100644 index ba6a90d1..00000000 --- a/v1/models/alert_category_name.go +++ /dev/null @@ -1,245 +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" -) - -// AlertCategoryName Alert Category Name -// -// AlertCategoryName returns alert category and its public facing string. -// -// swagger:model AlertCategoryName -type AlertCategoryName struct { - - // Specifies alert category. - // Specifies the category of an Alert. - // kDisk - Alert associated with the disk. - // kNode - Alert associated with general hardware on a specific node. - // kCluster - Alert associated with general hardware in cluster level. - // kChassis - Alert associated with the Chassis. - // kPowerSupply - Alert associated with the power supply. - // kCPU - Alert associated with the CPU usage. - // kMemory - Alert associated with the RAM/Memory. - // kTemperature - Alert associated with the temperature. - // kFan - Alert associated with the fan. - // kNIC - Alert associated with network chips and interfaces. - // kFirmware - Alert associated with the firmware. - // kNodeHealth - Alert associated with node health status. - // kOperatingSystem - Alert associated with operating systems. - // kDataPath - Alert associated with data management in the cluster. - // kMetadata - Alert associated with metadata management. - // kIndexing - Alert associated with indexing services. - // kHelios - Alert associated with Helios. - // kAppMarketPlace - Alert associated with App MarketPlace. - // kSystemService -Alert associated with System service apps. - // kLicense - Alert associated with licensing. - // kSecurity - Alert associated with security. - // kUpgrade - Alert associated with upgrade activities. - // kClusterManagement - Alert associated with cluster management activities. - // kAuditLog - Alert associated with audit log events. - // kNetworking - Alert associated with networking issue. - // kConfiguration - Alert associated with cluster or system configurations. - // kStorageUsage - Alert associated with the disk/domain/cluster storage usage. - // kFaultTolerance - Alert associated with the fault tolerance in different levels. - // kBackupRestore - Alert associated with Backup-Restore job. - // kArchivalRestore - Alert associated with Archival-Restore job. - // kRemoteReplication - Alert associated with Replication job. - // kQuota - Alert associated with Quotas. - // kCDP - Alert associated with Continuous Data Protection. - // kViewFailover - Alert associated with view Failover. - // kDisasterRecovery - Alert associated with Disaster Recovery. - // Enum: ["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"] - Category *string `json:"category,omitempty"` - - // Specifies public facing string for alert enums. - Name *string `json:"name,omitempty"` -} - -// Validate validates this alert category name -func (m *AlertCategoryName) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var alertCategoryNameTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertCategoryNameTypeCategoryPropEnum = append(alertCategoryNameTypeCategoryPropEnum, v) - } -} - -const ( - - // AlertCategoryNameCategoryKDisk captures enum value "kDisk" - AlertCategoryNameCategoryKDisk string = "kDisk" - - // AlertCategoryNameCategoryKNode captures enum value "kNode" - AlertCategoryNameCategoryKNode string = "kNode" - - // AlertCategoryNameCategoryKCluster captures enum value "kCluster" - AlertCategoryNameCategoryKCluster string = "kCluster" - - // AlertCategoryNameCategoryKChassis captures enum value "kChassis" - AlertCategoryNameCategoryKChassis string = "kChassis" - - // AlertCategoryNameCategoryKPowerSupply captures enum value "kPowerSupply" - AlertCategoryNameCategoryKPowerSupply string = "kPowerSupply" - - // AlertCategoryNameCategoryKCPU captures enum value "kCPU" - AlertCategoryNameCategoryKCPU string = "kCPU" - - // AlertCategoryNameCategoryKMemory captures enum value "kMemory" - AlertCategoryNameCategoryKMemory string = "kMemory" - - // AlertCategoryNameCategoryKTemperature captures enum value "kTemperature" - AlertCategoryNameCategoryKTemperature string = "kTemperature" - - // AlertCategoryNameCategoryKFan captures enum value "kFan" - AlertCategoryNameCategoryKFan string = "kFan" - - // AlertCategoryNameCategoryKNIC captures enum value "kNIC" - AlertCategoryNameCategoryKNIC string = "kNIC" - - // AlertCategoryNameCategoryKFirmware captures enum value "kFirmware" - AlertCategoryNameCategoryKFirmware string = "kFirmware" - - // AlertCategoryNameCategoryKNodeHealth captures enum value "kNodeHealth" - AlertCategoryNameCategoryKNodeHealth string = "kNodeHealth" - - // AlertCategoryNameCategoryKOperatingSystem captures enum value "kOperatingSystem" - AlertCategoryNameCategoryKOperatingSystem string = "kOperatingSystem" - - // AlertCategoryNameCategoryKDataPath captures enum value "kDataPath" - AlertCategoryNameCategoryKDataPath string = "kDataPath" - - // AlertCategoryNameCategoryKMetadata captures enum value "kMetadata" - AlertCategoryNameCategoryKMetadata string = "kMetadata" - - // AlertCategoryNameCategoryKIndexing captures enum value "kIndexing" - AlertCategoryNameCategoryKIndexing string = "kIndexing" - - // AlertCategoryNameCategoryKHelios captures enum value "kHelios" - AlertCategoryNameCategoryKHelios string = "kHelios" - - // AlertCategoryNameCategoryKAppMarketPlace captures enum value "kAppMarketPlace" - AlertCategoryNameCategoryKAppMarketPlace string = "kAppMarketPlace" - - // AlertCategoryNameCategoryKSystemService captures enum value "kSystemService" - AlertCategoryNameCategoryKSystemService string = "kSystemService" - - // AlertCategoryNameCategoryKLicense captures enum value "kLicense" - AlertCategoryNameCategoryKLicense string = "kLicense" - - // AlertCategoryNameCategoryKSecurity captures enum value "kSecurity" - AlertCategoryNameCategoryKSecurity string = "kSecurity" - - // AlertCategoryNameCategoryKUpgrade captures enum value "kUpgrade" - AlertCategoryNameCategoryKUpgrade string = "kUpgrade" - - // AlertCategoryNameCategoryKClusterManagement captures enum value "kClusterManagement" - AlertCategoryNameCategoryKClusterManagement string = "kClusterManagement" - - // AlertCategoryNameCategoryKAuditLog captures enum value "kAuditLog" - AlertCategoryNameCategoryKAuditLog string = "kAuditLog" - - // AlertCategoryNameCategoryKNetworking captures enum value "kNetworking" - AlertCategoryNameCategoryKNetworking string = "kNetworking" - - // AlertCategoryNameCategoryKConfiguration captures enum value "kConfiguration" - AlertCategoryNameCategoryKConfiguration string = "kConfiguration" - - // AlertCategoryNameCategoryKStorageUsage captures enum value "kStorageUsage" - AlertCategoryNameCategoryKStorageUsage string = "kStorageUsage" - - // AlertCategoryNameCategoryKFaultTolerance captures enum value "kFaultTolerance" - AlertCategoryNameCategoryKFaultTolerance string = "kFaultTolerance" - - // AlertCategoryNameCategoryKBackupRestore captures enum value "kBackupRestore" - AlertCategoryNameCategoryKBackupRestore string = "kBackupRestore" - - // AlertCategoryNameCategoryKArchivalRestore captures enum value "kArchivalRestore" - AlertCategoryNameCategoryKArchivalRestore string = "kArchivalRestore" - - // AlertCategoryNameCategoryKRemoteReplication captures enum value "kRemoteReplication" - AlertCategoryNameCategoryKRemoteReplication string = "kRemoteReplication" - - // AlertCategoryNameCategoryKQuota captures enum value "kQuota" - AlertCategoryNameCategoryKQuota string = "kQuota" - - // AlertCategoryNameCategoryKCDP captures enum value "kCDP" - AlertCategoryNameCategoryKCDP string = "kCDP" - - // AlertCategoryNameCategoryKViewFailover captures enum value "kViewFailover" - AlertCategoryNameCategoryKViewFailover string = "kViewFailover" - - // AlertCategoryNameCategoryKDisasterRecovery captures enum value "kDisasterRecovery" - AlertCategoryNameCategoryKDisasterRecovery string = "kDisasterRecovery" -) - -// prop value enum -func (m *AlertCategoryName) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertCategoryNameTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertCategoryName) validateCategory(formats strfmt.Registry) error { - if swag.IsZero(m.Category) { // not required - return nil - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alert category name based on context it is used -func (m *AlertCategoryName) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertCategoryName) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertCategoryName) UnmarshalBinary(b []byte) error { - var res AlertCategoryName - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_document.go b/v1/models/alert_document.go deleted file mode 100644 index 63f0024c..00000000 --- a/v1/models/alert_document.go +++ /dev/null @@ -1,70 +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" -) - -// AlertDocument Alert Document. -// -// Specifies documentation about the Alert such as name, description, cause -// and how to resolve the Alert. -// -// swagger:model AlertDocument -type AlertDocument struct { - - // Specifies cause of the Alert that is included in the body of the email - // or any other type of notification. - AlertCause *string `json:"alertCause,omitempty"` - - // Specifies brief description about the Alert that is used in the subject - // line when sending a notification email for an Alert. - AlertDescription *string `json:"alertDescription,omitempty"` - - // Specifies instructions describing how to resolve the Alert that is - // included in the body of the email or any other type of notification. - AlertHelpText *string `json:"alertHelpText,omitempty"` - - // Specifies short name that describes the Alert type such as DiskBad, - // HighCpuUsage, FrequentProcessRestarts, etc. - AlertName *string `json:"alertName,omitempty"` - - // Short description for the alert. If present, this will be used - // for SNMP instead of the alert_description. - Alert255CharDesc *string `json:"alert_255CharDesc,omitempty"` -} - -// Validate validates this alert document -func (m *AlertDocument) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this alert document based on context it is used -func (m *AlertDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertDocument) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertDocument) UnmarshalBinary(b []byte) error { - var res AlertDocument - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_metadata.go b/v1/models/alert_metadata.go deleted file mode 100644 index 57397e97..00000000 --- a/v1/models/alert_metadata.go +++ /dev/null @@ -1,408 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AlertMetadata Alert Metadata -// -// AlertMetadata specifies metadata for a given alert type. All the alerts of a -// given alert type share the same metadata. -// -// swagger:model AlertMetadata -type AlertMetadata struct { - - // Specifies alert documentation one per each language supported. - AlertDocumentList []*AlertDocument `json:"alertDocumentList"` - - // Specifies the Alert type bucket. - // Specifies the Alert type bucket. - // kHardware - Alerts related to hardware on which Cohesity software is running. - // kSoftware - Alerts which are related to software components. - // kDataService - Alerts related to data services. - // kMaintenance - Alerts relates to maintenance activities. - // Enum: ["kHardware","kSoftware","kDataService","kMaintenance"] - AlertTypeBucket *string `json:"alertTypeBucket,omitempty"` - - // Specifies unique id for the alert type. - AlertTypeID *int32 `json:"alertTypeId,omitempty"` - - // Specifies category of the alert type. - // Specifies the category of an Alert. - // kDisk - Alert associated with the disk. - // kNode - Alert associated with general hardware on a specific node. - // kCluster - Alert associated with general hardware in cluster level. - // kChassis - Alert associated with the Chassis. - // kPowerSupply - Alert associated with the power supply. - // kCPU - Alert associated with the CPU usage. - // kMemory - Alert associated with the RAM/Memory. - // kTemperature - Alert associated with the temperature. - // kFan - Alert associated with the fan. - // kNIC - Alert associated with network chips and interfaces. - // kFirmware - Alert associated with the firmware. - // kNodeHealth - Alert associated with node health status. - // kOperatingSystem - Alert associated with operating systems. - // kDataPath - Alert associated with data management in the cluster. - // kMetadata - Alert associated with metadata management. - // kIndexing - Alert associated with indexing services. - // kHelios - Alert associated with Helios. - // kAppMarketPlace - Alert associated with App MarketPlace. - // kSystemService -Alert associated with System service apps. - // kLicense - Alert associated with licensing. - // kSecurity - Alert associated with security. - // kUpgrade - Alert associated with upgrade activities. - // kClusterManagement - Alert associated with cluster management activities. - // kAuditLog - Alert associated with audit log events. - // kNetworking - Alert associated with networking issue. - // kConfiguration - Alert associated with cluster or system configurations. - // kStorageUsage - Alert associated with the disk/domain/cluster storage usage. - // kFaultTolerance - Alert associated with the fault tolerance in different levels. - // kBackupRestore - Alert associated with Backup-Restore job. - // kArchivalRestore - Alert associated with Archival-Restore job. - // kRemoteReplication - Alert associated with Replication job. - // kQuota - Alert associated with Quotas. - // kCDP - Alert associated with Continuous Data Protection. - // kViewFailover - Alert associated with view Failover. - // kDisasterRecovery - Alert associated with Disaster Recovery. - // Enum: ["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"] - Category *string `json:"category,omitempty"` - - // Specifies dedup interval in seconds. If the same alert is raised multiple - // times by any client in this duration, only one of them will be reported. - DedupIntervalSeconds *int32 `json:"dedupIntervalSeconds,omitempty"` - - // Specifies if the alerts are to be deduped until the current one (if - // any) is resolved. - DedupUntilResolved *bool `json:"dedupUntilResolved,omitempty"` - - // Specifies whether to show the alert in the iris UI and CLI. - HideAlertFromUser *bool `json:"hideAlertFromUser,omitempty"` - - // Specifies whether to ignore duplicate occurrences completely. - IgnoreDuplicateOccurrences *bool `json:"ignoreDuplicateOccurrences,omitempty"` - - // Specifies properties that serve as primary keys. - PrimaryKeyList []string `json:"primaryKeyList"` - - // Specifies list of properties that the client is supposed to provide when - // alert of this type is raised. - PropertyList []string `json:"propertyList"` - - // Specifies whether to send support notification for the alert. - SendSupportNotification *bool `json:"sendSupportNotification,omitempty"` - - // Specifies whether an SNMP notification is sent when an alert is raised. - SnmpNotification *bool `json:"snmpNotification,omitempty"` - - // Specifies whether an syslog notification is sent when an alert is raised. - SyslogNotification *bool `json:"syslogNotification,omitempty"` - - // Specifies version of the metadata. - Version *int32 `json:"version,omitempty"` -} - -// Validate validates this alert metadata -func (m *AlertMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertDocumentList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertTypeBucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertMetadata) validateAlertDocumentList(formats strfmt.Registry) error { - if swag.IsZero(m.AlertDocumentList) { // not required - return nil - } - - for i := 0; i < len(m.AlertDocumentList); i++ { - if swag.IsZero(m.AlertDocumentList[i]) { // not required - continue - } - - if m.AlertDocumentList[i] != nil { - if err := m.AlertDocumentList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertDocumentList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertDocumentList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var alertMetadataTypeAlertTypeBucketPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHardware","kSoftware","kDataService","kMaintenance"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertMetadataTypeAlertTypeBucketPropEnum = append(alertMetadataTypeAlertTypeBucketPropEnum, v) - } -} - -const ( - - // AlertMetadataAlertTypeBucketKHardware captures enum value "kHardware" - AlertMetadataAlertTypeBucketKHardware string = "kHardware" - - // AlertMetadataAlertTypeBucketKSoftware captures enum value "kSoftware" - AlertMetadataAlertTypeBucketKSoftware string = "kSoftware" - - // AlertMetadataAlertTypeBucketKDataService captures enum value "kDataService" - AlertMetadataAlertTypeBucketKDataService string = "kDataService" - - // AlertMetadataAlertTypeBucketKMaintenance captures enum value "kMaintenance" - AlertMetadataAlertTypeBucketKMaintenance string = "kMaintenance" -) - -// prop value enum -func (m *AlertMetadata) validateAlertTypeBucketEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertMetadataTypeAlertTypeBucketPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertMetadata) validateAlertTypeBucket(formats strfmt.Registry) error { - if swag.IsZero(m.AlertTypeBucket) { // not required - return nil - } - - // value enum - if err := m.validateAlertTypeBucketEnum("alertTypeBucket", "body", *m.AlertTypeBucket); err != nil { - return err - } - - return nil -} - -var alertMetadataTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertMetadataTypeCategoryPropEnum = append(alertMetadataTypeCategoryPropEnum, v) - } -} - -const ( - - // AlertMetadataCategoryKDisk captures enum value "kDisk" - AlertMetadataCategoryKDisk string = "kDisk" - - // AlertMetadataCategoryKNode captures enum value "kNode" - AlertMetadataCategoryKNode string = "kNode" - - // AlertMetadataCategoryKCluster captures enum value "kCluster" - AlertMetadataCategoryKCluster string = "kCluster" - - // AlertMetadataCategoryKChassis captures enum value "kChassis" - AlertMetadataCategoryKChassis string = "kChassis" - - // AlertMetadataCategoryKPowerSupply captures enum value "kPowerSupply" - AlertMetadataCategoryKPowerSupply string = "kPowerSupply" - - // AlertMetadataCategoryKCPU captures enum value "kCPU" - AlertMetadataCategoryKCPU string = "kCPU" - - // AlertMetadataCategoryKMemory captures enum value "kMemory" - AlertMetadataCategoryKMemory string = "kMemory" - - // AlertMetadataCategoryKTemperature captures enum value "kTemperature" - AlertMetadataCategoryKTemperature string = "kTemperature" - - // AlertMetadataCategoryKFan captures enum value "kFan" - AlertMetadataCategoryKFan string = "kFan" - - // AlertMetadataCategoryKNIC captures enum value "kNIC" - AlertMetadataCategoryKNIC string = "kNIC" - - // AlertMetadataCategoryKFirmware captures enum value "kFirmware" - AlertMetadataCategoryKFirmware string = "kFirmware" - - // AlertMetadataCategoryKNodeHealth captures enum value "kNodeHealth" - AlertMetadataCategoryKNodeHealth string = "kNodeHealth" - - // AlertMetadataCategoryKOperatingSystem captures enum value "kOperatingSystem" - AlertMetadataCategoryKOperatingSystem string = "kOperatingSystem" - - // AlertMetadataCategoryKDataPath captures enum value "kDataPath" - AlertMetadataCategoryKDataPath string = "kDataPath" - - // AlertMetadataCategoryKMetadata captures enum value "kMetadata" - AlertMetadataCategoryKMetadata string = "kMetadata" - - // AlertMetadataCategoryKIndexing captures enum value "kIndexing" - AlertMetadataCategoryKIndexing string = "kIndexing" - - // AlertMetadataCategoryKHelios captures enum value "kHelios" - AlertMetadataCategoryKHelios string = "kHelios" - - // AlertMetadataCategoryKAppMarketPlace captures enum value "kAppMarketPlace" - AlertMetadataCategoryKAppMarketPlace string = "kAppMarketPlace" - - // AlertMetadataCategoryKSystemService captures enum value "kSystemService" - AlertMetadataCategoryKSystemService string = "kSystemService" - - // AlertMetadataCategoryKLicense captures enum value "kLicense" - AlertMetadataCategoryKLicense string = "kLicense" - - // AlertMetadataCategoryKSecurity captures enum value "kSecurity" - AlertMetadataCategoryKSecurity string = "kSecurity" - - // AlertMetadataCategoryKUpgrade captures enum value "kUpgrade" - AlertMetadataCategoryKUpgrade string = "kUpgrade" - - // AlertMetadataCategoryKClusterManagement captures enum value "kClusterManagement" - AlertMetadataCategoryKClusterManagement string = "kClusterManagement" - - // AlertMetadataCategoryKAuditLog captures enum value "kAuditLog" - AlertMetadataCategoryKAuditLog string = "kAuditLog" - - // AlertMetadataCategoryKNetworking captures enum value "kNetworking" - AlertMetadataCategoryKNetworking string = "kNetworking" - - // AlertMetadataCategoryKConfiguration captures enum value "kConfiguration" - AlertMetadataCategoryKConfiguration string = "kConfiguration" - - // AlertMetadataCategoryKStorageUsage captures enum value "kStorageUsage" - AlertMetadataCategoryKStorageUsage string = "kStorageUsage" - - // AlertMetadataCategoryKFaultTolerance captures enum value "kFaultTolerance" - AlertMetadataCategoryKFaultTolerance string = "kFaultTolerance" - - // AlertMetadataCategoryKBackupRestore captures enum value "kBackupRestore" - AlertMetadataCategoryKBackupRestore string = "kBackupRestore" - - // AlertMetadataCategoryKArchivalRestore captures enum value "kArchivalRestore" - AlertMetadataCategoryKArchivalRestore string = "kArchivalRestore" - - // AlertMetadataCategoryKRemoteReplication captures enum value "kRemoteReplication" - AlertMetadataCategoryKRemoteReplication string = "kRemoteReplication" - - // AlertMetadataCategoryKQuota captures enum value "kQuota" - AlertMetadataCategoryKQuota string = "kQuota" - - // AlertMetadataCategoryKCDP captures enum value "kCDP" - AlertMetadataCategoryKCDP string = "kCDP" - - // AlertMetadataCategoryKViewFailover captures enum value "kViewFailover" - AlertMetadataCategoryKViewFailover string = "kViewFailover" - - // AlertMetadataCategoryKDisasterRecovery captures enum value "kDisasterRecovery" - AlertMetadataCategoryKDisasterRecovery string = "kDisasterRecovery" -) - -// prop value enum -func (m *AlertMetadata) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertMetadataTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertMetadata) validateCategory(formats strfmt.Registry) error { - if swag.IsZero(m.Category) { // not required - return nil - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this alert metadata based on the context it is used -func (m *AlertMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertDocumentList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertMetadata) contextValidateAlertDocumentList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AlertDocumentList); i++ { - - if m.AlertDocumentList[i] != nil { - - if swag.IsZero(m.AlertDocumentList[i]) { // not required - return nil - } - - if err := m.AlertDocumentList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertDocumentList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertDocumentList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertMetadata) UnmarshalBinary(b []byte) error { - var res AlertMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_property.go b/v1/models/alert_property.go deleted file mode 100644 index a2c1b8c7..00000000 --- a/v1/models/alert_property.go +++ /dev/null @@ -1,55 +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" -) - -// AlertProperty Alert Key-Value Pair -// -// Specifies a key-value pair associated with an Alert. -// -// swagger:model AlertProperty -type AlertProperty struct { - - // Specifies name of the property. - Key *string `json:"key,omitempty"` - - // Specifies value of the property. - Value *string `json:"value,omitempty"` -} - -// Validate validates this alert property -func (m *AlertProperty) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this alert property based on context it is used -func (m *AlertProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertProperty) UnmarshalBinary(b []byte) error { - var res AlertProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_resolution.go b/v1/models/alert_resolution.go deleted file mode 100644 index 8ceb76d7..00000000 --- a/v1/models/alert_resolution.go +++ /dev/null @@ -1,120 +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" -) - -// AlertResolution Alert Resolution. -// -// Provides Resolution details and the list of Alerts resolved by a Resolution, -// which are specified by Alert Ids. -// -// swagger:model AlertResolution -type AlertResolution struct { - - // Specifies list of Alerts resolved by a Resolution, which are specified by - // Alert Ids. - AlertIDList []string `json:"alertIdList"` - - // Specifies information about the Alert Resolution such as a summary, - // id assigned by the Cohesity Cluster, user who resolved the Alerts, etc. - ResolutionDetails *AlertResolutionDetails `json:"resolutionDetails,omitempty"` - - // Specifies unique tenantIds of the alert contained in this resolution. - TenantIds []string `json:"tenantIds"` -} - -// Validate validates this alert resolution -func (m *AlertResolution) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResolutionDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertResolution) validateResolutionDetails(formats strfmt.Registry) error { - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if m.ResolutionDetails != nil { - if err := m.ResolutionDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -// ContextValidate validate this alert resolution based on the context it is used -func (m *AlertResolution) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResolutionDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertResolution) contextValidateResolutionDetails(ctx context.Context, formats strfmt.Registry) error { - - if m.ResolutionDetails != nil { - - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if err := m.ResolutionDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertResolution) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertResolution) UnmarshalBinary(b []byte) error { - var res AlertResolution - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_resolution_details.go b/v1/models/alert_resolution_details.go deleted file mode 100644 index 990e8f4c..00000000 --- a/v1/models/alert_resolution_details.go +++ /dev/null @@ -1,66 +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" -) - -// AlertResolutionDetails Alert Resolution. -// -// Specifies information about the Alert Resolution such as a summary, -// id assigned by the Cohesity Cluster, user who resolved the Alerts, etc. -// -// swagger:model AlertResolutionDetails -type AlertResolutionDetails struct { - - // Specifies detailed notes about the Resolution. - ResolutionDetails *string `json:"resolutionDetails,omitempty"` - - // Specifies Unique id assigned by the Cohesity Cluster for this Resolution. - ResolutionID *int64 `json:"resolutionId,omitempty"` - - // Specifies short description about the Resolution. - ResolutionSummary *string `json:"resolutionSummary,omitempty"` - - // Specifies unix epoch timestamp (in microseconds) when the Alerts were - // resolved. - TimestampUsecs *int64 `json:"timestampUsecs,omitempty"` - - // Specifies name of the Cohesity Cluster user who resolved the Alerts. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this alert resolution details -func (m *AlertResolutionDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this alert resolution details based on context it is used -func (m *AlertResolutionDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertResolutionDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertResolutionDetails) UnmarshalBinary(b []byte) error { - var res AlertResolutionDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_resolution_info.go b/v1/models/alert_resolution_info.go deleted file mode 100644 index 52986f82..00000000 --- a/v1/models/alert_resolution_info.go +++ /dev/null @@ -1,55 +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" -) - -// AlertResolutionInfo Alert Resolution Info. -// -// Short description and detailed notes about the Resolution. -// -// swagger:model AlertResolutionInfo -type AlertResolutionInfo struct { - - // Specifies detailed notes about the Resolution. - ResolutionDetails *string `json:"resolutionDetails,omitempty"` - - // Specifies short description about the Resolution. - ResolutionSummary *string `json:"resolutionSummary,omitempty"` -} - -// Validate validates this alert resolution info -func (m *AlertResolutionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this alert resolution info based on context it is used -func (m *AlertResolutionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertResolutionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertResolutionInfo) UnmarshalBinary(b []byte) error { - var res AlertResolutionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_resolution_request.go b/v1/models/alert_resolution_request.go deleted file mode 100644 index 0140da4a..00000000 --- a/v1/models/alert_resolution_request.go +++ /dev/null @@ -1,116 +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" -) - -// AlertResolutionRequest Create Alert Resolution Request. -// -// Request that provides the details of a resolution and the list of -// Alert Ids to be marked resolved. -// -// swagger:model AlertResolutionRequest -type AlertResolutionRequest struct { - - // Specifies list of alerts resolved by a Resolution, which are specified by - // Alert Ids. - AlertIDList []string `json:"alertIdList"` - - // Specifies short description and detailed notes about the Resolution. - ResolutionDetails *AlertResolutionInfo `json:"resolutionDetails,omitempty"` -} - -// Validate validates this alert resolution request -func (m *AlertResolutionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResolutionDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertResolutionRequest) validateResolutionDetails(formats strfmt.Registry) error { - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if m.ResolutionDetails != nil { - if err := m.ResolutionDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -// ContextValidate validate this alert resolution request based on the context it is used -func (m *AlertResolutionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResolutionDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertResolutionRequest) contextValidateResolutionDetails(ctx context.Context, formats strfmt.Registry) error { - - if m.ResolutionDetails != nil { - - if swag.IsZero(m.ResolutionDetails) { // not required - return nil - } - - if err := m.ResolutionDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resolutionDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resolutionDetails") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertResolutionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertResolutionRequest) UnmarshalBinary(b []byte) error { - var res AlertResolutionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alert_vault_info.go b/v1/models/alert_vault_info.go deleted file mode 100644 index 0fbf8a24..00000000 --- a/v1/models/alert_vault_info.go +++ /dev/null @@ -1,61 +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" -) - -// AlertVaultInfo Vault info in an alert -// -// Specifies vault info associated with an Alert. -// -// swagger:model AlertVaultInfo -type AlertVaultInfo struct { - - // Specifies Global vault id. - GlobalVaultID *string `json:"globalVaultId,omitempty"` - - // Specifies id of region where vault resides. - RegionID *string `json:"regionId,omitempty"` - - // Specifies id of region where vault resides. - RegionName *string `json:"regionName,omitempty"` - - // Specifies name of vault. - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this alert vault info -func (m *AlertVaultInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this alert vault info based on context it is used -func (m *AlertVaultInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertVaultInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertVaultInfo) UnmarshalBinary(b []byte) error { - var res AlertVaultInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alerting_config.go b/v1/models/alerting_config.go deleted file mode 100644 index e10f2f9d..00000000 --- a/v1/models/alerting_config.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AlertingConfig Alerting Config. -// -// Specifies optional settings for alerting. -// -// swagger:model AlertingConfig -type AlertingConfig struct { - - // Exists to maintain backwards compatibility with versions before eff8198. - EmailAddresses []string `json:"emailAddresses"` - - // Specifies additional email addresses where alert notifications (configured - // in the AlertingPolicy) must be sent. - EmailDeliveryTargets []*EmailDeliveryTarget `json:"emailDeliveryTargets"` - - // Specifies the boolean to raise per object alert for failures. - RaiseObjectLevelFailureAlert *bool `json:"raiseObjectLevelFailureAlert,omitempty"` - - // Specifies the boolean to raise per object alert for failures after each - // attempt. - RaiseObjectLevelFailureAlertAfterEachAttempt *bool `json:"raiseObjectLevelFailureAlertAfterEachAttempt,omitempty"` - - // Specifies the boolean to raise per object alert for failures after last - // attempt. - RaiseObjectLevelFailureAlertAfterLastAttempt *bool `json:"raiseObjectLevelFailureAlertAfterLastAttempt,omitempty"` -} - -// Validate validates this alerting config -func (m *AlertingConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEmailDeliveryTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertingConfig) validateEmailDeliveryTargets(formats strfmt.Registry) error { - if swag.IsZero(m.EmailDeliveryTargets) { // not required - return nil - } - - for i := 0; i < len(m.EmailDeliveryTargets); i++ { - if swag.IsZero(m.EmailDeliveryTargets[i]) { // not required - continue - } - - if m.EmailDeliveryTargets[i] != nil { - if err := m.EmailDeliveryTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this alerting config based on the context it is used -func (m *AlertingConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEmailDeliveryTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertingConfig) contextValidateEmailDeliveryTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EmailDeliveryTargets); i++ { - - if m.EmailDeliveryTargets[i] != nil { - - if swag.IsZero(m.EmailDeliveryTargets[i]) { // not required - return nil - } - - if err := m.EmailDeliveryTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertingConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertingConfig) UnmarshalBinary(b []byte) error { - var res AlertingConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/alerting_policy_proto.go b/v1/models/alerting_policy_proto.go deleted file mode 100644 index 105c59e9..00000000 --- a/v1/models/alerting_policy_proto.go +++ /dev/null @@ -1,142 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AlertingPolicyProto alerting policy proto -// -// swagger:model AlertingPolicyProto -type AlertingPolicyProto struct { - - // The delivery targets to be alerted. - DeliveryTargetVec []*DeliveryRuleProtoDeliveryTarget `json:"deliveryTargetVec"` - - // The email addresses to send alerts to. - // This field has been deprecated in favor of the field delivery_target_vec. - // The clients should take care to ensure that the emails stored in here - // are migrated to that field, or else utilise both the fields when trying - // to obtain the complete list of delivery targets. - Emails []string `json:"emails"` - - // 'policy' is declared as int32 because ORing the enums will generate values - // which are invalid as enums. Protobuf doesn't allow those invalid enums - // to be set. - Policy *int32 `json:"policy,omitempty"` - - // Raise per object alert for failures. - RaiseObjectLevelFailureAlert *bool `json:"raiseObjectLevelFailureAlert,omitempty"` - - // Raise per object alert for failures after each backup attempt. - RaiseObjectLevelFailureAlertAfterEachAttempt *bool `json:"raiseObjectLevelFailureAlertAfterEachAttempt,omitempty"` - - // Raise per object alert for failures after last backup attempt. - RaiseObjectLevelFailureAlertAfterLastAttempt *bool `json:"raiseObjectLevelFailureAlertAfterLastAttempt,omitempty"` -} - -// Validate validates this alerting policy proto -func (m *AlertingPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeliveryTargetVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertingPolicyProto) validateDeliveryTargetVec(formats strfmt.Registry) error { - if swag.IsZero(m.DeliveryTargetVec) { // not required - return nil - } - - for i := 0; i < len(m.DeliveryTargetVec); i++ { - if swag.IsZero(m.DeliveryTargetVec[i]) { // not required - continue - } - - if m.DeliveryTargetVec[i] != nil { - if err := m.DeliveryTargetVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deliveryTargetVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deliveryTargetVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this alerting policy proto based on the context it is used -func (m *AlertingPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeliveryTargetVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertingPolicyProto) contextValidateDeliveryTargetVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeliveryTargetVec); i++ { - - if m.DeliveryTargetVec[i] != nil { - - if swag.IsZero(m.DeliveryTargetVec[i]) { // not required - return nil - } - - if err := m.DeliveryTargetVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deliveryTargetVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deliveryTargetVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertingPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertingPolicyProto) UnmarshalBinary(b []byte) error { - var res AlertingPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/amazon_cloud_credentials.go b/v1/models/amazon_cloud_credentials.go deleted file mode 100644 index e01f8848..00000000 --- a/v1/models/amazon_cloud_credentials.go +++ /dev/null @@ -1,318 +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" -) - -// AmazonCloudCredentials Amazon Cloud Credentials. -// -// Specifies the cloud credentials to connect to a Amazon -// service account. Glacier, S3, and S3-compatible clouds all use these -// credentials. -// -// swagger:model AmazonCloudCredentials -type AmazonCloudCredentials struct { - - // Specifies whether this vault supports AWS Lambda based GC. A Lambda - // function needs to be deployed in the customer's AWS environment or the IAM - // user should have permissions to create one. - IsLambdaBasedGCEnabled *bool `json:"IsLambdaBasedGCEnabled,omitempty"` - - // Specifies the access key for Amazon service account. - // See the Cohesity online help for the value to specify for this field - // based on the current S3 Compatible Vault (External Target) type. - // For example for Iron Mountain, specify the user name from Iron Mountain - // for this field. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // Specifies the auth method used for the request - // See the Cohesity online help for the value to specify for this field - // based on the current S3-compatible Vault (External Target) type. - // Specifies the authentication method to be used for API calls. - // 'kUseIAMUser' indicates a user based authentication. - // 'kUseIAMRole' indicates a role based authentication, used only for AWS CE. - // 'kUseHelios' indicates a Helios based authentication. - // Enum: ["kUseIAMUser","kUseIAMRole","kUseHelios"] - AuthMethod *string `json:"authMethod,omitempty"` - - // Specifies the C2S Access Portal (CAP) which is used to get the aws - // credentials in Amazon Commercial Cloud Service(C2S). - C2sAccessPortal *C2SAccessPortal `json:"c2sAccessPortal,omitempty"` - - // Specifies the credential blob to authenticate with credential endpoint. - CredentialBlob *string `json:"credentialBlob,omitempty"` - - // Specifies the credential process that generates the security token. - CredentialEndpoint *string `json:"credentialEndpoint,omitempty"` - - // Specifies the iam role arn Amazon service account. - // See the Cohesity online help for the value to specify for this field - // based on the current S3-compatible Vault (External Target) type. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // Specifies a read-only iam role arn Amazon service account. - // See the Cohesity online help for the value to specify for this field - // based on the current S3-compatible Vault (External Target) type. - ReadOnlyIamRoleArn *string `json:"readOnlyIamRoleArn,omitempty"` - - // Specifies the region to use for the Amazon service account. - Region *string `json:"region,omitempty"` - - // Specifies the secret access key for Amazon service account. - // See the Cohesity online help for the value to specify for this field - // based on the current S3-compatible Vault (External Target) type. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specifies the URL (Endpoint) for the service such as s3like.notamazon.com. - // This field is only significant for S3-compatible cloud services. - ServiceURL *string `json:"serviceUrl,omitempty"` - - // Specifies the version of the S3 Compliance. - // This field must be set to 2 or 4 and the default version is 2. - // This field is only significant for S3-compatible cloud services. - // See the Cohesity online help for the supported S3-compatible Vault - // (External Target) types and the value to specify for this field - // based on the current S3-compatible Vault (External Target) type. - SignatureVersion *int32 `json:"signatureVersion,omitempty"` - - // Specifies the storage class of AWS. - // AmazonTierType specifies the storage class for AWS. - // 'kAmazonS3Standard' indicates a tier type of Amazon properties that is - // accessed frequently. - // 'kAmazonS3StandardIA' indicates a tier type of Amazon properties that is - // accessed less frequently, but requires rapid access when needed. - // 'kAmazonGlacier' indicates a tier type of Amazon properties that is accessed - // rarely. - // 'kAmazonS3OneZoneIA' indicates a tier type of Amazon properties for - // long-lived, but less frequently accessed data. - // 'kAmazonS3IntelligentTiering' indicates a tier type of Amazon properties for - // data with unknown or changing access patterns. - // 'kAmazonS3Glacier' indicates a tier type of Amazon properties for - // data that provides secure, durable object storage for long-term data - // retention and digital preservation. It provides three options for access to - // archives, from a few minutes to several hours. - // 'kAmazonS3GlacierDeepArchive' indicates a tier type of Amazon properties for - // data that provides secure, durable object storage for long-term data - // retention and digital preservation. It provides two access options ranging - // from 12 to 48 hours. - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonGlacier","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAmazonS3GlacierIR"] - TierType *string `json:"tierType,omitempty"` - - // Specifies the list of all tiers for Amazon account. - Tiers []string `json:"tiers"` - - // Specifies whether to use http or https to connect to the service. - // If true, a secure connection (https) is used. - // This field is only significant for S3-compatible cloud services. - UseHTTPS *bool `json:"useHttps,omitempty"` -} - -// Validate validates this amazon cloud credentials -func (m *AmazonCloudCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateC2sAccessPortal(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var amazonCloudCredentialsTypeAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - amazonCloudCredentialsTypeAuthMethodPropEnum = append(amazonCloudCredentialsTypeAuthMethodPropEnum, v) - } -} - -const ( - - // AmazonCloudCredentialsAuthMethodKUseIAMUser captures enum value "kUseIAMUser" - AmazonCloudCredentialsAuthMethodKUseIAMUser string = "kUseIAMUser" - - // AmazonCloudCredentialsAuthMethodKUseIAMRole captures enum value "kUseIAMRole" - AmazonCloudCredentialsAuthMethodKUseIAMRole string = "kUseIAMRole" - - // AmazonCloudCredentialsAuthMethodKUseHelios captures enum value "kUseHelios" - AmazonCloudCredentialsAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AmazonCloudCredentials) validateAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, amazonCloudCredentialsTypeAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AmazonCloudCredentials) validateAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateAuthMethodEnum("authMethod", "body", *m.AuthMethod); err != nil { - return err - } - - return nil -} - -func (m *AmazonCloudCredentials) validateC2sAccessPortal(formats strfmt.Registry) error { - if swag.IsZero(m.C2sAccessPortal) { // not required - return nil - } - - if m.C2sAccessPortal != nil { - if err := m.C2sAccessPortal.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sAccessPortal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sAccessPortal") - } - return err - } - } - - return nil -} - -var amazonCloudCredentialsTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonGlacier","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAmazonS3GlacierIR"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - amazonCloudCredentialsTypeTierTypePropEnum = append(amazonCloudCredentialsTypeTierTypePropEnum, v) - } -} - -const ( - - // AmazonCloudCredentialsTierTypeKAmazonS3Standard captures enum value "kAmazonS3Standard" - AmazonCloudCredentialsTierTypeKAmazonS3Standard string = "kAmazonS3Standard" - - // AmazonCloudCredentialsTierTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - AmazonCloudCredentialsTierTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // AmazonCloudCredentialsTierTypeKAmazonGlacier captures enum value "kAmazonGlacier" - AmazonCloudCredentialsTierTypeKAmazonGlacier string = "kAmazonGlacier" - - // AmazonCloudCredentialsTierTypeKAmazonS3OneZoneIA captures enum value "kAmazonS3OneZoneIA" - AmazonCloudCredentialsTierTypeKAmazonS3OneZoneIA string = "kAmazonS3OneZoneIA" - - // AmazonCloudCredentialsTierTypeKAmazonS3IntelligentTiering captures enum value "kAmazonS3IntelligentTiering" - AmazonCloudCredentialsTierTypeKAmazonS3IntelligentTiering string = "kAmazonS3IntelligentTiering" - - // AmazonCloudCredentialsTierTypeKAmazonS3Glacier captures enum value "kAmazonS3Glacier" - AmazonCloudCredentialsTierTypeKAmazonS3Glacier string = "kAmazonS3Glacier" - - // AmazonCloudCredentialsTierTypeKAmazonS3GlacierDeepArchive captures enum value "kAmazonS3GlacierDeepArchive" - AmazonCloudCredentialsTierTypeKAmazonS3GlacierDeepArchive string = "kAmazonS3GlacierDeepArchive" - - // AmazonCloudCredentialsTierTypeKAmazonS3GlacierIR captures enum value "kAmazonS3GlacierIR" - AmazonCloudCredentialsTierTypeKAmazonS3GlacierIR string = "kAmazonS3GlacierIR" -) - -// prop value enum -func (m *AmazonCloudCredentials) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, amazonCloudCredentialsTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AmazonCloudCredentials) validateTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TierType) { // not required - return nil - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this amazon cloud credentials based on the context it is used -func (m *AmazonCloudCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateC2sAccessPortal(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AmazonCloudCredentials) contextValidateC2sAccessPortal(ctx context.Context, formats strfmt.Registry) error { - - if m.C2sAccessPortal != nil { - - if swag.IsZero(m.C2sAccessPortal) { // not required - return nil - } - - if err := m.C2sAccessPortal.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sAccessPortal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sAccessPortal") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AmazonCloudCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AmazonCloudCredentials) UnmarshalBinary(b []byte) error { - var res AmazonCloudCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/analyse_jar_arg.go b/v1/models/analyse_jar_arg.go deleted file mode 100644 index 7ba20bfb..00000000 --- a/v1/models/analyse_jar_arg.go +++ /dev/null @@ -1,63 +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" -) - -// AnalyseJarArg Analyse Jar File. -// -// API to analyse a JAR file. This JAR may contain multiple mappers/reducers. -// Jar will be analysed and list of all mappers/reducers found in the jar will -// be returned. -// -// swagger:model AnalyseJarArg -type AnalyseJarArg struct { - - // Name of the JAR to be analysed. - JarName *string `json:"jarName,omitempty"` - - // Path of the jar file. - JarPath *string `json:"jarPath,omitempty"` - - // jar relative path - JarRelativePath *string `json:"jarRelativePath,omitempty"` - - // If this flag is true, then also save mapper and reducers in scribe. - SaveEntities *bool `json:"saveEntities,omitempty"` -} - -// Validate validates this analyse jar arg -func (m *AnalyseJarArg) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this analyse jar arg based on context it is used -func (m *AnalyseJarArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AnalyseJarArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AnalyseJarArg) UnmarshalBinary(b []byte) error { - var res AnalyseJarArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/analyse_jar_result.go b/v1/models/analyse_jar_result.go deleted file mode 100644 index 6472b439..00000000 --- a/v1/models/analyse_jar_result.go +++ /dev/null @@ -1,115 +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" -) - -// AnalyseJarResult analyse jar result -// -// swagger:model AnalyseJarResult -type AnalyseJarResult struct { - - // Status code of http rpc. - Error *ErrorProto `json:"error,omitempty"` - - // Name of all mapper classes found in jar file. - Mappers []string `json:"mappers"` - - // Name of all reducers classes found in jar file. - Reducers []string `json:"reducers"` -} - -// Validate validates this analyse jar result -func (m *AnalyseJarResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AnalyseJarResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this analyse jar result based on the context it is used -func (m *AnalyseJarResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AnalyseJarResult) 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 -} - -// MarshalBinary interface implementation -func (m *AnalyseJarResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AnalyseJarResult) UnmarshalBinary(b []byte) error { - var res AnalyseJarResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/analysis_run_once_params.go b/v1/models/analysis_run_once_params.go deleted file mode 100644 index 750edce9..00000000 --- a/v1/models/analysis_run_once_params.go +++ /dev/null @@ -1,51 +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" -) - -// AnalysisRunOnceParams analysis run once params -// -// swagger:model AnalysisRunOnceParams -type AnalysisRunOnceParams struct { - - // If true then only walk the previous checkpoint keeper file and regroup - // the metadata. - OnlyWalkCheckpoint *bool `json:"onlyWalkCheckpoint,omitempty"` -} - -// Validate validates this analysis run once params -func (m *AnalysisRunOnceParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this analysis run once params based on context it is used -func (m *AnalysisRunOnceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AnalysisRunOnceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AnalysisRunOnceParams) UnmarshalBinary(b []byte) error { - var res AnalysisRunOnceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/analysis_task_info.go b/v1/models/analysis_task_info.go deleted file mode 100644 index d3c2b984..00000000 --- a/v1/models/analysis_task_info.go +++ /dev/null @@ -1,59 +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" -) - -// AnalysisTaskInfo Parameters for a analysis op. -// -// swagger:model AnalysisTaskInfo -type AnalysisTaskInfo struct { - - // Id of that particular instance. - InstanceID *string `json:"instanceId,omitempty"` - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Denotes the start time of the tieringtask, needed for deeplinking. - StartTimeUsecs *string `json:"startTimeUsecs,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this analysis task info -func (m *AnalysisTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this analysis task info based on context it is used -func (m *AnalysisTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AnalysisTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AnalysisTaskInfo) UnmarshalBinary(b []byte) error { - var res AnalysisTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_scan_config.go b/v1/models/antivirus_scan_config.go deleted file mode 100644 index 4a309cd3..00000000 --- a/v1/models/antivirus_scan_config.go +++ /dev/null @@ -1,133 +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" -) - -// AntivirusScanConfig Antivirus scan config -// -// Specifies the antivirus scan config settings for this View. -// -// swagger:model AntivirusScanConfig -type AntivirusScanConfig struct { - - // Specifies whether block access to the file when antivirus scan fails. - BlockAccessOnScanFailure *bool `json:"blockAccessOnScanFailure,omitempty"` - - // Specifies whether the antivirus service is enabled or not. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies maximum file size that will be sent to antivirus server for - // scanning. if greater than zero, the file size that exceeds this size - // would be skipped from virus scan. - MaximumScanFileSize *int64 `json:"maximumScanFileSize,omitempty"` - - // Files extension that meets these filter criteria will be sent to - // antivirus server for the scan. - ScanFilter *FileExtensionFilter `json:"scanFilter,omitempty"` - - // Specifies whether to scan a file when it is opened. - ScanOnAccess *bool `json:"scanOnAccess,omitempty"` - - // Specifies whether to scan a file when it is closed after modify. - ScanOnClose *bool `json:"scanOnClose,omitempty"` - - // Specifies the maximum amount of time that a scan can take before timing - // out. - ScanTimeoutUsecs *int32 `json:"scanTimeoutUsecs,omitempty"` -} - -// Validate validates this antivirus scan config -func (m *AntivirusScanConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScanFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusScanConfig) validateScanFilter(formats strfmt.Registry) error { - if swag.IsZero(m.ScanFilter) { // not required - return nil - } - - if m.ScanFilter != nil { - if err := m.ScanFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scanFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scanFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this antivirus scan config based on the context it is used -func (m *AntivirusScanConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScanFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusScanConfig) contextValidateScanFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.ScanFilter != nil { - - if swag.IsZero(m.ScanFilter) { // not required - return nil - } - - if err := m.ScanFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scanFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scanFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusScanConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusScanConfig) UnmarshalBinary(b []byte) error { - var res AntivirusScanConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_service_config.go b/v1/models/antivirus_service_config.go deleted file mode 100644 index 652ebbe9..00000000 --- a/v1/models/antivirus_service_config.go +++ /dev/null @@ -1,90 +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" -) - -// AntivirusServiceConfig Antivirus Service Config. -// -// Specifies configuration settings for antivirus service provider. -// -// swagger:model AntivirusServiceConfig -type AntivirusServiceConfig struct { - - // Specifies the description of the Antivirus service. This could be any - // additional information admin might associate with the Antivirus service. - Description *string `json:"description,omitempty"` - - // Specifies the ICAP uri for this Antivirus service. It is of the form - // icap://[:]/ - // Required: true - IcapURI *string `json:"icapUri"` - - // Specifies the tag of antivirus service. This is service-specific "cookie" - // sent from Antivirus server to clients that represents a service's current - // state. This tag validates that previous Antivirus server responses can - // still be considered fresh by an Antivirus client that may be caching them. - // If a change on the AV server invalidates previous responses, the AV server - // can invalidate portions of the Antivirus client's cache by changing its - // service tag. - Tag *string `json:"tag,omitempty"` - - // Specifies the tag Id of antivirus service. - TagID *int64 `json:"tagId,omitempty"` -} - -// Validate validates this antivirus service config -func (m *AntivirusServiceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIcapURI(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceConfig) validateIcapURI(formats strfmt.Registry) error { - - if err := validate.Required("icapUri", "body", m.IcapURI); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this antivirus service config based on context it is used -func (m *AntivirusServiceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceConfig) UnmarshalBinary(b []byte) error { - var res AntivirusServiceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_service_config_params.go b/v1/models/antivirus_service_config_params.go deleted file mode 100644 index a47dc6c5..00000000 --- a/v1/models/antivirus_service_config_params.go +++ /dev/null @@ -1,78 +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" -) - -// AntivirusServiceConfigParams Antivirus Service Config parameters. -// -// Specifies the parameters for an Antivirus service provider. -// -// swagger:model AntivirusServiceConfigParams -type AntivirusServiceConfigParams struct { - - // Specifies the description of the Antivirus service. This could be any - // additional information admin might associate with the Antivirus service. - Description *string `json:"description,omitempty"` - - // Specifies the ICAP uri for this Antivirus service. It is of the form - // icap://[:]/ - // Required: true - IcapURI *string `json:"icapUri"` -} - -// Validate validates this antivirus service config params -func (m *AntivirusServiceConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIcapURI(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceConfigParams) validateIcapURI(formats strfmt.Registry) error { - - if err := validate.Required("icapUri", "body", m.IcapURI); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this antivirus service config params based on context it is used -func (m *AntivirusServiceConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceConfigParams) UnmarshalBinary(b []byte) error { - var res AntivirusServiceConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_service_group.go b/v1/models/antivirus_service_group.go deleted file mode 100644 index 46a9beea..00000000 --- a/v1/models/antivirus_service_group.go +++ /dev/null @@ -1,164 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AntivirusServiceGroup Antivirus Group Config. -// -// Specifies the configuration settings for an Antivirus service group. -// -// swagger:model AntivirusServiceGroup -type AntivirusServiceGroup struct { - - // Specifies the Antivirus Services belonging to this antivirus group. - AntivirusServices []*AntivirusServiceConfig `json:"antivirusServices"` - - // Specifies the description of the Antivirus service group. - Description *string `json:"description,omitempty"` - - // Specifies the Id of the Antivirus service group. - // Required: true - ID *int64 `json:"id"` - - // Specifies whether the antivirus service group is enabled or not. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies the name of the Antivirus service group. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this antivirus service group -func (m *AntivirusServiceGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroup) validateAntivirusServices(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusServices) { // not required - return nil - } - - for i := 0; i < len(m.AntivirusServices); i++ { - if swag.IsZero(m.AntivirusServices[i]) { // not required - continue - } - - if m.AntivirusServices[i] != nil { - if err := m.AntivirusServices[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AntivirusServiceGroup) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *AntivirusServiceGroup) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this antivirus service group based on the context it is used -func (m *AntivirusServiceGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAntivirusServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroup) contextValidateAntivirusServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AntivirusServices); i++ { - - if m.AntivirusServices[i] != nil { - - if swag.IsZero(m.AntivirusServices[i]) { // not required - return nil - } - - if err := m.AntivirusServices[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceGroup) UnmarshalBinary(b []byte) error { - var res AntivirusServiceGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_service_group_params.go b/v1/models/antivirus_service_group_params.go deleted file mode 100644 index 610663a8..00000000 --- a/v1/models/antivirus_service_group_params.go +++ /dev/null @@ -1,142 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AntivirusServiceGroupParams Specifies the configuration settings for an Antivirus service group. -// -// swagger:model AntivirusServiceGroupParams -type AntivirusServiceGroupParams struct { - - // Specifies the Antivirus services for this provider. - AntivirusServices []*AntivirusServiceConfigParams `json:"antivirusServices"` - - // Specifies the description of the Antivirus service group. - Description *string `json:"description,omitempty"` - - // Specifies the name of the Antivirus service group. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this antivirus service group params -func (m *AntivirusServiceGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroupParams) validateAntivirusServices(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusServices) { // not required - return nil - } - - for i := 0; i < len(m.AntivirusServices); i++ { - if swag.IsZero(m.AntivirusServices[i]) { // not required - continue - } - - if m.AntivirusServices[i] != nil { - if err := m.AntivirusServices[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AntivirusServiceGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this antivirus service group params based on the context it is used -func (m *AntivirusServiceGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAntivirusServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroupParams) contextValidateAntivirusServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AntivirusServices); i++ { - - if m.AntivirusServices[i] != nil { - - if swag.IsZero(m.AntivirusServices[i]) { // not required - return nil - } - - if err := m.AntivirusServices[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceGroupParams) UnmarshalBinary(b []byte) error { - var res AntivirusServiceGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/antivirus_service_group_state_params.go b/v1/models/antivirus_service_group_state_params.go deleted file mode 100644 index c22126ee..00000000 --- a/v1/models/antivirus_service_group_state_params.go +++ /dev/null @@ -1,89 +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" -) - -// AntivirusServiceGroupStateParams Specifies the configuration settings to change the state of an Antivirus -// service group. -// -// swagger:model AntivirusServiceGroupStateParams -type AntivirusServiceGroupStateParams struct { - - // Specifies the enable flag to enable the Antivirus service group. - // Required: true - Enable *bool `json:"enable"` - - // Specifies the Id of the Antivirus service group. - // Required: true - ID *int64 `json:"id"` -} - -// Validate validates this antivirus service group state params -func (m *AntivirusServiceGroupStateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnable(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroupStateParams) validateEnable(formats strfmt.Registry) error { - - if err := validate.Required("enable", "body", m.Enable); err != nil { - return err - } - - return nil -} - -func (m *AntivirusServiceGroupStateParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this antivirus service group state params based on context it is used -func (m *AntivirusServiceGroupStateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceGroupStateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceGroupStateParams) UnmarshalBinary(b []byte) error { - var res AntivirusServiceGroupStateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/api_key.go b/v1/models/api_key.go deleted file mode 100644 index 146bf1d0..00000000 --- a/v1/models/api_key.go +++ /dev/null @@ -1,81 +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" -) - -// APIKey API key. -// -// Specifies the parameters of an API key. -// -// swagger:model ApiKey -type APIKey struct { - - // Specifies the API key created time in milli seconds. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the user sid who created this API key. - CreatedUserSid *string `json:"createdUserSid,omitempty"` - - // Specifies the username who created this API key. - CreatedUsername *string `json:"createdUsername,omitempty"` - - // Specifies a time stamp when the API key will expire in milli seconds. - ExpiringTimeMsecs *int64 `json:"expiringTimeMsecs,omitempty"` - - // Specifies the API key id. - ID *string `json:"id,omitempty"` - - // Specifies if the API key is active. Only an active and not expired API key - // can be used for authentication. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies if the API key is expired. Expired API keys cannot be used for - // authentication. - IsExpired *bool `json:"isExpired,omitempty"` - - // Specifies the API key name. - Name *string `json:"name,omitempty"` - - // Specifies the user sid who owns this API key. - OwnerUserSid *string `json:"ownerUserSid,omitempty"` - - // Specifies the username who owns this API key. - OwnerUsername *string `json:"ownerUsername,omitempty"` -} - -// Validate validates this Api key -func (m *APIKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Api key based on context it is used -func (m *APIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *APIKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *APIKey) UnmarshalBinary(b []byte) error { - var res APIKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/api_request_attr.go b/v1/models/api_request_attr.go deleted file mode 100644 index 4c73ce83..00000000 --- a/v1/models/api_request_attr.go +++ /dev/null @@ -1,65 +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" -) - -// APIRequestAttr Message to represent attributes of the client invoking Magneto REST APIs. -// -// swagger:model APIRequestAttr -type APIRequestAttr struct { - - // The timeout to be used with this request. If specified (> 0), the request - // will be timed out if it has been waiting in the queue for longer than this - // value. - TimeoutSecs *int32 `json:"timeoutSecs,omitempty"` - - // Specifies the request type. - Type *int32 `json:"type,omitempty"` - - // Indicates whether this request should be sent to read replica. Data served - // by read replica will be lagging Magneto master by a small duration. - // The decision to re-route to read replica is actually made by the - // magneto-service go client, not Magneto master - // Why we chose to have it here - // 1) Go magneto service does not support default parameters. - // 2) We did not want to change the magneto service function signatures to - // include new variable. - UseReadReplica *bool `json:"useReadReplica,omitempty"` -} - -// Validate validates this API request attr -func (m *APIRequestAttr) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this API request attr based on context it is used -func (m *APIRequestAttr) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *APIRequestAttr) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *APIRequestAttr) UnmarshalBinary(b []byte) error { - var res APIRequestAttr - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/api_version.go b/v1/models/api_version.go deleted file mode 100644 index f6ffd929..00000000 --- a/v1/models/api_version.go +++ /dev/null @@ -1,67 +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" -) - -// APIVersion API version -// -// swagger:model APIVersion -type APIVersion struct { - - // Denotes the version of exporting metadata. - ExportMetadataVersion *int32 `json:"exportMetadataVersion,omitempty"` - - // The version number of the Magneto Master API. This should be bumped up - // whenever there is an incompatible change in the records persisted to WAL - // by the Magneto Master. - // - // NOTE: master_version field number was accidently changed from 3 to 4 in - // 6.4.0a, 6.2.1a, 6.1.1f. We should NOT bump up the default value in any - // release which is <= 6.4.0a. - MasterVersion *int32 `json:"masterVersion,omitempty"` - - // The version number of the Magneto Replication API. - // TODO(mark): Remove this field. - ReplicationVersion *int32 `json:"replicationVersion,omitempty"` - - // The version number of the Magneto API. This should be bumped up whenever - // there is an incompatible change in the RPCs sent or received by Magneto. - Version *int32 `json:"version,omitempty"` -} - -// Validate validates this API version -func (m *APIVersion) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this API version based on context it is used -func (m *APIVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *APIVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *APIVersion) UnmarshalBinary(b []byte) error { - var res APIVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app.go b/v1/models/app.go deleted file mode 100644 index a42c9616..00000000 --- a/v1/models/app.go +++ /dev/null @@ -1,469 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// App App information. -// -// App provides information about an application. -// -// swagger:model App -type App struct { - - // Specifies unique id allocated by the AppStore. - AppID *int64 `json:"appId,omitempty"` - - // Specifies the list of clusters on which the app is installed for a - // particular account Id. - Clusters []*ClusterInfo `json:"clusters"` - - // Specifies app download progress percentage. - DownloadProgressPct *float64 `json:"downloadProgressPct,omitempty"` - - // Specifies if an external ip is required for the app. - ExternalIPRequired *bool `json:"externalIpRequired,omitempty"` - - // List of external network information available for the app. - ExternalNetworks []*ExternalNetworkInfo `json:"externalNetworks"` - - // Specifies app installation status. - // Specifies status of the app installation. - // kNotInstalled - App yet to be installed. - // kInstallInProgress - App installation is in progress. - // kInstalled - App is installed successfully and can be launched. - // kInstallFailed - App installation failed. - // kUninstallInProgress - App uninstallation is in progress. - // kUninstallFailed - App uninstallation failed. - // kDownloadNotStarted - App download has not started. - // kDownloadInProgress - App download in progress. - // kDownloadComplete - App download completed. - // kDownloadFailed - App download failed. - // Enum: ["kNotInstalled","kInstallInProgress","kInstalled","kInstallFailed","kUninstallInProgress","kUninstallFailed","kDownloadNotStarted","kDownloadInProgress","kDownloadComplete","kDownloadFailed"] - InstallState *string `json:"installState,omitempty"` - - // Specifies timestamp when the app was installed. - InstallTime *int64 `json:"installTime,omitempty"` - - // List of applicable instance size specifications (e.g. small/medium/large) - // for the app. Used to determine container resources. - InstanceSizes []string `json:"instanceSizes"` - - // Specifies whether the app currently installed on all clusters is the - // latest version or not. - IsLatest *bool `json:"isLatest,omitempty"` - - // Specifies application version assigned by the AppStore for the latest - // version of an app. - LatestVersion *int64 `json:"latestVersion,omitempty"` - - // Specifies metadata information about the app. - Metadata *AppMetadata `json:"metadata,omitempty"` - - // Specifies privileges that are required for this app. - // App privilege information. - // - // Specifies privileges that are required for this app. - // kReadAccess - App needs views for read access. - // kReadWriteAccess - App needs views for Read/write access. - // kManagementAccess - App needs management access via iris API. - // kAutoMountAccess - Whether to allow auto-mounting all the views. - // kUnrestrictedAppUIAccess - Whether app requires unrestricted UI access (i.e. without passing app access token in URL). - // kAuditLogViewReadAccess - Whether app requires read access to the internal audit log view. - // kProtectedObjectAccess - Whether app requires read access to protected objects. - RequiredPrivileges []string `json:"requiredPrivileges"` - - // Specifies timestamp when the app was uninstalled. - UninstallTime *int64 `json:"uninstallTime,omitempty"` - - // Specifies application version assigned by the AppStore. - Version *int64 `json:"version,omitempty"` - - // List of vm name info objects. - VMNameInfoList []*VMNameInfo `json:"vmNameInfoList"` -} - -// Validate validates this app -func (m *App) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalNetworks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstallState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRequiredPrivileges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMNameInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *App) validateClusters(formats strfmt.Registry) error { - if swag.IsZero(m.Clusters) { // not required - return nil - } - - for i := 0; i < len(m.Clusters); i++ { - if swag.IsZero(m.Clusters[i]) { // not required - continue - } - - if m.Clusters[i] != nil { - if err := m.Clusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *App) validateExternalNetworks(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalNetworks) { // not required - return nil - } - - for i := 0; i < len(m.ExternalNetworks); i++ { - if swag.IsZero(m.ExternalNetworks[i]) { // not required - continue - } - - if m.ExternalNetworks[i] != nil { - if err := m.ExternalNetworks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var appTypeInstallStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNotInstalled","kInstallInProgress","kInstalled","kInstallFailed","kUninstallInProgress","kUninstallFailed","kDownloadNotStarted","kDownloadInProgress","kDownloadComplete","kDownloadFailed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appTypeInstallStatePropEnum = append(appTypeInstallStatePropEnum, v) - } -} - -const ( - - // AppInstallStateKNotInstalled captures enum value "kNotInstalled" - AppInstallStateKNotInstalled string = "kNotInstalled" - - // AppInstallStateKInstallInProgress captures enum value "kInstallInProgress" - AppInstallStateKInstallInProgress string = "kInstallInProgress" - - // AppInstallStateKInstalled captures enum value "kInstalled" - AppInstallStateKInstalled string = "kInstalled" - - // AppInstallStateKInstallFailed captures enum value "kInstallFailed" - AppInstallStateKInstallFailed string = "kInstallFailed" - - // AppInstallStateKUninstallInProgress captures enum value "kUninstallInProgress" - AppInstallStateKUninstallInProgress string = "kUninstallInProgress" - - // AppInstallStateKUninstallFailed captures enum value "kUninstallFailed" - AppInstallStateKUninstallFailed string = "kUninstallFailed" - - // AppInstallStateKDownloadNotStarted captures enum value "kDownloadNotStarted" - AppInstallStateKDownloadNotStarted string = "kDownloadNotStarted" - - // AppInstallStateKDownloadInProgress captures enum value "kDownloadInProgress" - AppInstallStateKDownloadInProgress string = "kDownloadInProgress" - - // AppInstallStateKDownloadComplete captures enum value "kDownloadComplete" - AppInstallStateKDownloadComplete string = "kDownloadComplete" - - // AppInstallStateKDownloadFailed captures enum value "kDownloadFailed" - AppInstallStateKDownloadFailed string = "kDownloadFailed" -) - -// prop value enum -func (m *App) validateInstallStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appTypeInstallStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *App) validateInstallState(formats strfmt.Registry) error { - if swag.IsZero(m.InstallState) { // not required - return nil - } - - // value enum - if err := m.validateInstallStateEnum("installState", "body", *m.InstallState); err != nil { - return err - } - - return nil -} - -func (m *App) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -var appRequiredPrivilegesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kReadAccess","kReadWriteAccess","kManagementAccess","kAutoMountAccess","kUnrestrictedAppUIAccess","kAuditLogViewReadAccess","kProtectedObjectAccess"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appRequiredPrivilegesItemsEnum = append(appRequiredPrivilegesItemsEnum, v) - } -} - -func (m *App) validateRequiredPrivilegesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appRequiredPrivilegesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *App) validateRequiredPrivileges(formats strfmt.Registry) error { - if swag.IsZero(m.RequiredPrivileges) { // not required - return nil - } - - for i := 0; i < len(m.RequiredPrivileges); i++ { - - // value enum - if err := m.validateRequiredPrivilegesItemsEnum("requiredPrivileges"+"."+strconv.Itoa(i), "body", m.RequiredPrivileges[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *App) validateVMNameInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.VMNameInfoList) { // not required - return nil - } - - for i := 0; i < len(m.VMNameInfoList); i++ { - if swag.IsZero(m.VMNameInfoList[i]) { // not required - continue - } - - if m.VMNameInfoList[i] != nil { - if err := m.VMNameInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmNameInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmNameInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this app based on the context it is used -func (m *App) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternalNetworks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMNameInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *App) contextValidateClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Clusters); i++ { - - if m.Clusters[i] != nil { - - if swag.IsZero(m.Clusters[i]) { // not required - return nil - } - - if err := m.Clusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *App) contextValidateExternalNetworks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExternalNetworks); i++ { - - if m.ExternalNetworks[i] != nil { - - if swag.IsZero(m.ExternalNetworks[i]) { // not required - return nil - } - - if err := m.ExternalNetworks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *App) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *App) contextValidateVMNameInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMNameInfoList); i++ { - - if m.VMNameInfoList[i] != nil { - - if swag.IsZero(m.VMNameInfoList[i]) { // not required - return nil - } - - if err := m.VMNameInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmNameInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmNameInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *App) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *App) UnmarshalBinary(b []byte) error { - var res App - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_credentials.go b/v1/models/app_credentials.go deleted file mode 100644 index acb260fb..00000000 --- a/v1/models/app_credentials.go +++ /dev/null @@ -1,112 +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" -) - -// AppCredentials Message that encapsulates the Application specific credentials. -// -// swagger:model AppCredentials -type AppCredentials struct { - - // Application specific credentials. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Application type to which the credentials apply. - EnvType *int32 `json:"envType,omitempty"` -} - -// Validate validates this app credentials -func (m *AppCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppCredentials) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this app credentials based on the context it is used -func (m *AppCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppCredentials) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppCredentials) UnmarshalBinary(b []byte) error { - var res AppCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_entity_backup_status_info.go b/v1/models/app_entity_backup_status_info.go deleted file mode 100644 index 73deafd6..00000000 --- a/v1/models/app_entity_backup_status_info.go +++ /dev/null @@ -1,161 +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" -) - -// AppEntityBackupStatusInfo App Entity Backup State Info -// -// Specifies the app level backup status and information. -// -// swagger:model AppEntityBackupStatusInfo -type AppEntityBackupStatusInfo struct { - - // Specifies the Id of the App entity. This is typically a database entity - // in case of SQL, Oracle jobs etc. - AppID *int64 `json:"appId,omitempty"` - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies the name of the app entity. - 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 - // host or virtual machine. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the backup status for this app entity. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` - - // Specifies the warnings that occurred (if any) while running this task. - Warnings []string `json:"warnings"` -} - -// Validate validates this app entity backup status info -func (m *AppEntityBackupStatusInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var appEntityBackupStatusInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appEntityBackupStatusInfoTypeStatusPropEnum = append(appEntityBackupStatusInfoTypeStatusPropEnum, v) - } -} - -const ( - - // AppEntityBackupStatusInfoStatusKAccepted captures enum value "kAccepted" - AppEntityBackupStatusInfoStatusKAccepted string = "kAccepted" - - // AppEntityBackupStatusInfoStatusKRunning captures enum value "kRunning" - AppEntityBackupStatusInfoStatusKRunning string = "kRunning" - - // AppEntityBackupStatusInfoStatusKCanceling captures enum value "kCanceling" - AppEntityBackupStatusInfoStatusKCanceling string = "kCanceling" - - // AppEntityBackupStatusInfoStatusKCanceled captures enum value "kCanceled" - AppEntityBackupStatusInfoStatusKCanceled string = "kCanceled" - - // AppEntityBackupStatusInfoStatusKSuccess captures enum value "kSuccess" - AppEntityBackupStatusInfoStatusKSuccess string = "kSuccess" - - // AppEntityBackupStatusInfoStatusKFailure captures enum value "kFailure" - AppEntityBackupStatusInfoStatusKFailure string = "kFailure" - - // AppEntityBackupStatusInfoStatusKWarning captures enum value "kWarning" - AppEntityBackupStatusInfoStatusKWarning string = "kWarning" - - // AppEntityBackupStatusInfoStatusKOnHold captures enum value "kOnHold" - AppEntityBackupStatusInfoStatusKOnHold string = "kOnHold" - - // AppEntityBackupStatusInfoStatusKMissed captures enum value "kMissed" - AppEntityBackupStatusInfoStatusKMissed string = "kMissed" - - // AppEntityBackupStatusInfoStatusKFinalizing captures enum value "kFinalizing" - AppEntityBackupStatusInfoStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *AppEntityBackupStatusInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appEntityBackupStatusInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppEntityBackupStatusInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this app entity backup status info based on context it is used -func (m *AppEntityBackupStatusInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AppEntityBackupStatusInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppEntityBackupStatusInfo) UnmarshalBinary(b []byte) error { - var res AppEntityBackupStatusInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_info.go b/v1/models/app_info.go deleted file mode 100644 index 87be738c..00000000 --- a/v1/models/app_info.go +++ /dev/null @@ -1,61 +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" -) - -// AppInfo App Information. -// -// Specifies the App information. -// -// swagger:model AppInfo -type AppInfo struct { - - // Specifies the unique instance Id of the App. - AppInstanceID *int64 `json:"appInstanceId,omitempty"` - - // Specifies the name of the App. - AppName *string `json:"appName,omitempty"` - - // Specifies the unique id of the App. - AppUID *int64 `json:"appUid,omitempty"` - - // Specifies the version of the App. - AppVersion *int64 `json:"appVersion,omitempty"` -} - -// Validate validates this app info -func (m *AppInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this app info based on context it is used -func (m *AppInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AppInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppInfo) UnmarshalBinary(b []byte) error { - var res AppInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_instance.go b/v1/models/app_instance.go deleted file mode 100644 index e77fc5cb..00000000 --- a/v1/models/app_instance.go +++ /dev/null @@ -1,495 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AppInstance App Instance. -// -// AppInstance provides application instance's information. -// -// swagger:model AppInstance -type AppInstance struct { - - // Specifies the token to access with the app. - AppAccessToken *string `json:"appAccessToken,omitempty"` - - // Specifies unique id across all instances of all apps. - AppInstanceID *int64 `json:"appInstanceId,omitempty"` - - // Specifies name of the app that is launched in this instance. - AppName *string `json:"appName,omitempty"` - - // Specifies id of the app that is launched in this instance. - AppUID *int64 `json:"appUid,omitempty"` - - // Specifies the version of the app that is launched in this instance. - AppVersion *int64 `json:"appVersion,omitempty"` - - // Specifies timestamp (in microseconds) when the app instance was first - // created. - CreatedTimeUsecs *int64 `json:"createdTimeUsecs,omitempty"` - - // Specifies a unique identifier generated by the client to let the backend - // identify retries of the app launch request. - CreationUID *string `json:"creationUid,omitempty"` - - // Deployment parameters used to launch the app instance. - DeploymentParameters *string `json:"deploymentParameters,omitempty"` - - // Specifies user configured description for the app instance. - Description *string `json:"description,omitempty"` - - // Specifies version of the app provided by the developer. - DevVersion *string `json:"devVersion,omitempty"` - - // Specifies duration (in microseconds) for which the app instance has run. - DurationUsecs *int64 `json:"durationUsecs,omitempty"` - - // Specifies list of nodeports exposed by app instance. - ExposedNodePorts []*NodePort `json:"exposedNodePorts"` - - // Specifies the failure reasons for the app - FailureReasons []*FailureReason `json:"failureReasons"` - - // Specifies the reason the app instance is unhealthy. Only set if app - // instance is unhealthy. - HealthDetail *string `json:"healthDetail,omitempty"` - - // Specifies the current health status of the app instance. - HealthStatus *int32 `json:"healthStatus,omitempty"` - - // Specifies app ui http config. If set to true, the App's UI uses https. - // Otherwise it uses http. - HTTPSUI *bool `json:"httpsUi,omitempty"` - - // namespace - Namespace *string `json:"namespace,omitempty"` - - // Specifies the ip of the node which can be used to contact app instance - // external services. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the node port on which the app instance services external - // requests. - NodePort *int32 `json:"nodePort,omitempty"` - - // Specifies settings used to launch an app instance. - Settings *AppInstanceSettings `json:"settings,omitempty"` - - // Specifies the current state of the app instance. - // Specifies operational status of an app instance. - // kInitializing - The app instance has been launched or resumed, but is not fully running yet. - // kRunning - The app instance is running. Check health_status for the actual health. - // kPausing - The app instance is being paused. - // kPaused - The app instance has been paused. - // kTerminating - The app instance is being terminated. - // kTerminated - The app instance has been terminated. - // kFailed - The app instance has failed due to an unrecoverable error. - // Enum: ["kInitializing","kRunning","kPausing","kPaused","kTerminating","kTerminated","kFailed"] - State *string `json:"state,omitempty"` - - // Specifies the failure reason when the app instance's state is kFailed. - StateDetail *string `json:"stateDetail,omitempty"` - - // Specifies UI Tag ClusterIP Service Ip Address - UIClusterIPSvcAddr *string `json:"uiClusterIPSvcAddr,omitempty"` - - // Specifies UI Tag ClusterIP Service Port - UIClusterIPSvcPort *int32 `json:"uiClusterIPSvcPort,omitempty"` - - // Specifies if the app instance is upgradable - UpgradableNewerVersionPresent *bool `json:"upgradableNewerVersionPresent,omitempty"` - - // Specifies username and corresponding ssh key to be inserted into the VMs. - UserSSHKey *UserSSHKey `json:"userSshKey,omitempty"` - - // Specifies list of all VM groups for this application. Each VM group - // contains a list of VMs. Information needed for UI like the nodePort, the - // port type etc. is stored for each VM. - VMGroups []*VMGroup `json:"vmGroups"` -} - -// Validate validates this app instance -func (m *AppInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExposedNodePorts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailureReasons(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserSSHKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppInstance) validateExposedNodePorts(formats strfmt.Registry) error { - if swag.IsZero(m.ExposedNodePorts) { // not required - return nil - } - - for i := 0; i < len(m.ExposedNodePorts); i++ { - if swag.IsZero(m.ExposedNodePorts[i]) { // not required - continue - } - - if m.ExposedNodePorts[i] != nil { - if err := m.ExposedNodePorts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exposedNodePorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exposedNodePorts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AppInstance) validateFailureReasons(formats strfmt.Registry) error { - if swag.IsZero(m.FailureReasons) { // not required - return nil - } - - for i := 0; i < len(m.FailureReasons); i++ { - if swag.IsZero(m.FailureReasons[i]) { // not required - continue - } - - if m.FailureReasons[i] != nil { - if err := m.FailureReasons[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failureReasons" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failureReasons" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AppInstance) validateSettings(formats strfmt.Registry) error { - if swag.IsZero(m.Settings) { // not required - return nil - } - - if m.Settings != nil { - if err := m.Settings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -var appInstanceTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInitializing","kRunning","kPausing","kPaused","kTerminating","kTerminated","kFailed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appInstanceTypeStatePropEnum = append(appInstanceTypeStatePropEnum, v) - } -} - -const ( - - // AppInstanceStateKInitializing captures enum value "kInitializing" - AppInstanceStateKInitializing string = "kInitializing" - - // AppInstanceStateKRunning captures enum value "kRunning" - AppInstanceStateKRunning string = "kRunning" - - // AppInstanceStateKPausing captures enum value "kPausing" - AppInstanceStateKPausing string = "kPausing" - - // AppInstanceStateKPaused captures enum value "kPaused" - AppInstanceStateKPaused string = "kPaused" - - // AppInstanceStateKTerminating captures enum value "kTerminating" - AppInstanceStateKTerminating string = "kTerminating" - - // AppInstanceStateKTerminated captures enum value "kTerminated" - AppInstanceStateKTerminated string = "kTerminated" - - // AppInstanceStateKFailed captures enum value "kFailed" - AppInstanceStateKFailed string = "kFailed" -) - -// prop value enum -func (m *AppInstance) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appInstanceTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppInstance) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -func (m *AppInstance) validateUserSSHKey(formats strfmt.Registry) error { - if swag.IsZero(m.UserSSHKey) { // not required - return nil - } - - if m.UserSSHKey != nil { - if err := m.UserSSHKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userSshKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userSshKey") - } - return err - } - } - - return nil -} - -func (m *AppInstance) validateVMGroups(formats strfmt.Registry) error { - if swag.IsZero(m.VMGroups) { // not required - return nil - } - - for i := 0; i < len(m.VMGroups); i++ { - if swag.IsZero(m.VMGroups[i]) { // not required - continue - } - - if m.VMGroups[i] != nil { - if err := m.VMGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this app instance based on the context it is used -func (m *AppInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExposedNodePorts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFailureReasons(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserSSHKey(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppInstance) contextValidateExposedNodePorts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExposedNodePorts); i++ { - - if m.ExposedNodePorts[i] != nil { - - if swag.IsZero(m.ExposedNodePorts[i]) { // not required - return nil - } - - if err := m.ExposedNodePorts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exposedNodePorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exposedNodePorts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AppInstance) contextValidateFailureReasons(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailureReasons); i++ { - - if m.FailureReasons[i] != nil { - - if swag.IsZero(m.FailureReasons[i]) { // not required - return nil - } - - if err := m.FailureReasons[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failureReasons" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failureReasons" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AppInstance) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.Settings != nil { - - if swag.IsZero(m.Settings) { // not required - return nil - } - - if err := m.Settings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -func (m *AppInstance) contextValidateUserSSHKey(ctx context.Context, formats strfmt.Registry) error { - - if m.UserSSHKey != nil { - - if swag.IsZero(m.UserSSHKey) { // not required - return nil - } - - if err := m.UserSSHKey.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userSshKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userSshKey") - } - return err - } - } - - return nil -} - -func (m *AppInstance) contextValidateVMGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMGroups); i++ { - - if m.VMGroups[i] != nil { - - if swag.IsZero(m.VMGroups[i]) { // not required - return nil - } - - if err := m.VMGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppInstance) UnmarshalBinary(b []byte) error { - var res AppInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_instance_id_parameter.go b/v1/models/app_instance_id_parameter.go deleted file mode 100644 index 4e0a39ec..00000000 --- a/v1/models/app_instance_id_parameter.go +++ /dev/null @@ -1,72 +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" -) - -// AppInstanceIDParameter AppInstanceIdParameter specifies app instance Id in path parameter. -// -// swagger:model AppInstanceIdParameter -type AppInstanceIDParameter struct { - - // Specifies the app instance Id. - // In: path - // Required: true - AppInstanceID *int64 `json:"appInstanceId"` -} - -// Validate validates this app instance Id parameter -func (m *AppInstanceIDParameter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppInstanceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppInstanceIDParameter) validateAppInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("appInstanceId", "body", m.AppInstanceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this app instance Id parameter based on context it is used -func (m *AppInstanceIDParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AppInstanceIDParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppInstanceIDParameter) UnmarshalBinary(b []byte) error { - var res AppInstanceIDParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_instance_settings.go b/v1/models/app_instance_settings.go deleted file mode 100644 index 4f6adf3a..00000000 --- a/v1/models/app_instance_settings.go +++ /dev/null @@ -1,401 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AppInstanceSettings App instance settings. -// -// AppInstanceSettings provides settings used while launching an app instance. -// Current settings include QoSTier to be used for the instance and views -// allowed to be accessed by the instance. -// -// swagger:model AppInstanceSettings -type AppInstanceSettings struct { - - // External network information of the app instance. - ExternalNetworkInfo *ExternalNetworkInfo `json:"externalNetworkInfo,omitempty"` - - // Instance size specification (e.g. small/medium/large). Used to determine - // container resources. - InstanceSize *string `json:"instanceSize,omitempty"` - - // Specifies which protected objects are allowed to be accessed by an app - // instance. - ProtectedObjectPrivileges *ProtectedObjectPrivileges `json:"protectedObjectPrivileges,omitempty"` - - // Specifies QoSTier of the app instance. - // Specifies QoS Tier for an app instance. App instances are allocated - // resources such as memory, CPU and IO based on their QoS Tier. - // kLow - Low QoS Tier. - // kMedium - Medium QoS Tier. - // kHigh - High QoS Tier. - // kMax - Max QoS Tier. - // Enum: ["kLow","kMedium","kHigh","kMax"] - QosTier *string `json:"qosTier,omitempty"` - - // Specifies views allowed to be accessed in read only mode by the app - // instance. - ReadViewPrivileges *ViewPrivileges `json:"readViewPrivileges,omitempty"` - - // Specifies views allowed to be accessed in read/write mode by the app - // instance. - ReadWriteViewPrivileges *ViewPrivileges `json:"readWriteViewPrivileges,omitempty"` - - // List of vm-name, replica count pairs to be used at the time of app - // instance launch. - VMNumReplicasList []*VMNumReplicas `json:"vmNumReplicasList"` -} - -// Validate validates this app instance settings -func (m *AppInstanceSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExternalNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedObjectPrivileges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReadViewPrivileges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReadWriteViewPrivileges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMNumReplicasList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppInstanceSettings) validateExternalNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalNetworkInfo) { // not required - return nil - } - - if m.ExternalNetworkInfo != nil { - if err := m.ExternalNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) validateProtectedObjectPrivileges(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedObjectPrivileges) { // not required - return nil - } - - if m.ProtectedObjectPrivileges != nil { - if err := m.ProtectedObjectPrivileges.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjectPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjectPrivileges") - } - return err - } - } - - return nil -} - -var appInstanceSettingsTypeQosTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh","kMax"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appInstanceSettingsTypeQosTierPropEnum = append(appInstanceSettingsTypeQosTierPropEnum, v) - } -} - -const ( - - // AppInstanceSettingsQosTierKLow captures enum value "kLow" - AppInstanceSettingsQosTierKLow string = "kLow" - - // AppInstanceSettingsQosTierKMedium captures enum value "kMedium" - AppInstanceSettingsQosTierKMedium string = "kMedium" - - // AppInstanceSettingsQosTierKHigh captures enum value "kHigh" - AppInstanceSettingsQosTierKHigh string = "kHigh" - - // AppInstanceSettingsQosTierKMax captures enum value "kMax" - AppInstanceSettingsQosTierKMax string = "kMax" -) - -// prop value enum -func (m *AppInstanceSettings) validateQosTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appInstanceSettingsTypeQosTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppInstanceSettings) validateQosTier(formats strfmt.Registry) error { - if swag.IsZero(m.QosTier) { // not required - return nil - } - - // value enum - if err := m.validateQosTierEnum("qosTier", "body", *m.QosTier); err != nil { - return err - } - - return nil -} - -func (m *AppInstanceSettings) validateReadViewPrivileges(formats strfmt.Registry) error { - if swag.IsZero(m.ReadViewPrivileges) { // not required - return nil - } - - if m.ReadViewPrivileges != nil { - if err := m.ReadViewPrivileges.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readViewPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readViewPrivileges") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) validateReadWriteViewPrivileges(formats strfmt.Registry) error { - if swag.IsZero(m.ReadWriteViewPrivileges) { // not required - return nil - } - - if m.ReadWriteViewPrivileges != nil { - if err := m.ReadWriteViewPrivileges.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readWriteViewPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readWriteViewPrivileges") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) validateVMNumReplicasList(formats strfmt.Registry) error { - if swag.IsZero(m.VMNumReplicasList) { // not required - return nil - } - - for i := 0; i < len(m.VMNumReplicasList); i++ { - if swag.IsZero(m.VMNumReplicasList[i]) { // not required - continue - } - - if m.VMNumReplicasList[i] != nil { - if err := m.VMNumReplicasList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmNumReplicasList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmNumReplicasList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this app instance settings based on the context it is used -func (m *AppInstanceSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExternalNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedObjectPrivileges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReadViewPrivileges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReadWriteViewPrivileges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMNumReplicasList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppInstanceSettings) contextValidateExternalNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalNetworkInfo != nil { - - if swag.IsZero(m.ExternalNetworkInfo) { // not required - return nil - } - - if err := m.ExternalNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) contextValidateProtectedObjectPrivileges(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectedObjectPrivileges != nil { - - if swag.IsZero(m.ProtectedObjectPrivileges) { // not required - return nil - } - - if err := m.ProtectedObjectPrivileges.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjectPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjectPrivileges") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) contextValidateReadViewPrivileges(ctx context.Context, formats strfmt.Registry) error { - - if m.ReadViewPrivileges != nil { - - if swag.IsZero(m.ReadViewPrivileges) { // not required - return nil - } - - if err := m.ReadViewPrivileges.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readViewPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readViewPrivileges") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) contextValidateReadWriteViewPrivileges(ctx context.Context, formats strfmt.Registry) error { - - if m.ReadWriteViewPrivileges != nil { - - if swag.IsZero(m.ReadWriteViewPrivileges) { // not required - return nil - } - - if err := m.ReadWriteViewPrivileges.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readWriteViewPrivileges") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readWriteViewPrivileges") - } - return err - } - } - - return nil -} - -func (m *AppInstanceSettings) contextValidateVMNumReplicasList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMNumReplicasList); i++ { - - if m.VMNumReplicasList[i] != nil { - - if swag.IsZero(m.VMNumReplicasList[i]) { // not required - return nil - } - - if err := m.VMNumReplicasList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmNumReplicasList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmNumReplicasList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppInstanceSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppInstanceSettings) UnmarshalBinary(b []byte) error { - var res AppInstanceSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_metadata.go b/v1/models/app_metadata.go deleted file mode 100644 index b7e483d8..00000000 --- a/v1/models/app_metadata.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/strfmt" - "github.com/go-openapi/swag" -) - -// AppMetadata App metadata information. -// -// AppMetadata provides metadata information about an application. -// -// swagger:model AppMetadata -type AppMetadata struct { - - // Specifies author of the app. - Author *string `json:"author,omitempty"` - - // Specifies date when the first version of the app was created. - CreatedDate *string `json:"createdDate,omitempty"` - - // Deployment parameters required for the app launch. - DeploymentParameters *string `json:"deploymentParameters,omitempty"` - - // Specifies description about what app does. - Description *string `json:"description,omitempty"` - - // Specifies version of the app provided by the developer. - DevVersion *string `json:"devVersion,omitempty"` - - // Specifies application icon. - IconImage *string `json:"iconImage,omitempty"` - - // Specifies date when the app was last modified. - LastModifiedDate *string `json:"lastModifiedDate,omitempty"` - - // Specifies name of the app. - Name *string `json:"name,omitempty"` -} - -// Validate validates this app metadata -func (m *AppMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this app metadata based on context it is used -func (m *AppMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AppMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppMetadata) UnmarshalBinary(b []byte) error { - var res AppMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_owner_restore_info.go b/v1/models/app_owner_restore_info.go deleted file mode 100644 index 70499222..00000000 --- a/v1/models/app_owner_restore_info.go +++ /dev/null @@ -1,171 +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" -) - -// AppOwnerRestoreInfo Message that captures information about an application's owner. -// -// swagger:model AppOwnerRestoreInfo -type AppOwnerRestoreInfo struct { - - // The information about the owner object and its job details. - // This should be set to an object such as a VM. - // - // In the SQL and Oracle applications, this also specifies the - // full/incremental snapshot to use for non-PIT restore operations, and - // optionally PIT restore operations as well. - OwnerObject *RestoreObject `json:"ownerObject,omitempty"` - - // The params to restore the owner object. - OwnerRestoreParams *RestoreObjectParams `json:"ownerRestoreParams,omitempty"` - - // If this is set to true, then the owner object needs to be restored. The - // restore options that follow only apply if this field is set to true. If - // this field is not set, then the application objects will be restored to - // the original owner from where they were backed up. - PerformRestore *bool `json:"performRestore,omitempty"` -} - -// Validate validates this app owner restore info -func (m *AppOwnerRestoreInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOwnerObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppOwnerRestoreInfo) validateOwnerObject(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerObject) { // not required - return nil - } - - if m.OwnerObject != nil { - if err := m.OwnerObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObject") - } - return err - } - } - - return nil -} - -func (m *AppOwnerRestoreInfo) validateOwnerRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerRestoreParams) { // not required - return nil - } - - if m.OwnerRestoreParams != nil { - if err := m.OwnerRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this app owner restore info based on the context it is used -func (m *AppOwnerRestoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOwnerObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppOwnerRestoreInfo) contextValidateOwnerObject(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerObject != nil { - - if swag.IsZero(m.OwnerObject) { // not required - return nil - } - - if err := m.OwnerObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObject") - } - return err - } - } - - return nil -} - -func (m *AppOwnerRestoreInfo) contextValidateOwnerRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerRestoreParams != nil { - - if swag.IsZero(m.OwnerRestoreParams) { // not required - return nil - } - - if err := m.OwnerRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppOwnerRestoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppOwnerRestoreInfo) UnmarshalBinary(b []byte) error { - var res AppOwnerRestoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/app_run_history.go b/v1/models/app_run_history.go deleted file mode 100644 index 3112a5a9..00000000 --- a/v1/models/app_run_history.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AppRunHistory Application Run History. -// -// AppRunHistory is the struct containing the run information of the -// application instances. An application instance can be run only once. Each -// run of the application creates a new application instance. -// -// swagger:model AppRunHistory -type AppRunHistory struct { - - // AppInfo is the information about the map reduce application. - AppInfo *MapReduceInfo `json:"appInfo,omitempty"` - - // InstancesWrapper is the slice containing the information about the map - // reduce application instances. - MrInstances []*MapReduceInstanceWrapper `json:"mrInstances"` -} - -// Validate validates this app run history -func (m *AppRunHistory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMrInstances(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppRunHistory) validateAppInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AppInfo) { // not required - return nil - } - - if m.AppInfo != nil { - if err := m.AppInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appInfo") - } - return err - } - } - - return nil -} - -func (m *AppRunHistory) validateMrInstances(formats strfmt.Registry) error { - if swag.IsZero(m.MrInstances) { // not required - return nil - } - - for i := 0; i < len(m.MrInstances); i++ { - if swag.IsZero(m.MrInstances[i]) { // not required - continue - } - - if m.MrInstances[i] != nil { - if err := m.MrInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInstances" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this app run history based on the context it is used -func (m *AppRunHistory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMrInstances(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppRunHistory) contextValidateAppInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AppInfo != nil { - - if swag.IsZero(m.AppInfo) { // not required - return nil - } - - if err := m.AppInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appInfo") - } - return err - } - } - - return nil -} - -func (m *AppRunHistory) contextValidateMrInstances(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MrInstances); i++ { - - if m.MrInstances[i] != nil { - - if swag.IsZero(m.MrInstances[i]) { // not required - return nil - } - - if err := m.MrInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInstances" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppRunHistory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppRunHistory) UnmarshalBinary(b []byte) error { - var res AppRunHistory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/append_hosts_parameters.go b/v1/models/append_hosts_parameters.go deleted file mode 100644 index 2fda9f73..00000000 --- a/v1/models/append_hosts_parameters.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AppendHostsParameters Append Hosts Parameters. -// -// Specifies the parameters needed for an append hosts request. -// -// swagger:model AppendHostsParameters -type AppendHostsParameters struct { - - // Specifies the list of host entries to be added to the Cluster's - // etc/hosts file. - Hosts []*HostEntry `json:"hosts"` -} - -// Validate validates this append hosts parameters -func (m *AppendHostsParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppendHostsParameters) validateHosts(formats strfmt.Registry) error { - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this append hosts parameters based on the context it is used -func (m *AppendHostsParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppendHostsParameters) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppendHostsParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppendHostsParameters) UnmarshalBinary(b []byte) error { - var res AppendHostsParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_info.go b/v1/models/application_info.go deleted file mode 100644 index f7a878bb..00000000 --- a/v1/models/application_info.go +++ /dev/null @@ -1,369 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ApplicationInfo Application Information. -// -// Specifies the application registered on the Cohesity Cluster. -// -// swagger:model ApplicationInfo -type ApplicationInfo struct { - - // Application Server and the subtrees below them. - // - // Specifies the application 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 or a Physical Server. - // overrideDescription: true - ApplicationTreeInfo []*ProtectionSourceNode `json:"applicationTreeInfo"` - - // Specifies the environment type of the application such as 'kSQL', - // 'kExchange' registered on the Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` -} - -// Validate validates this application info -func (m *ApplicationInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationTreeInfo(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 *ApplicationInfo) validateApplicationTreeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationTreeInfo) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationTreeInfo); i++ { - if swag.IsZero(m.ApplicationTreeInfo[i]) { // not required - continue - } - - if m.ApplicationTreeInfo[i] != nil { - if err := m.ApplicationTreeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationTreeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationTreeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var applicationInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - applicationInfoTypeEnvironmentPropEnum = append(applicationInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ApplicationInfoEnvironmentKVMware captures enum value "kVMware" - ApplicationInfoEnvironmentKVMware string = "kVMware" - - // ApplicationInfoEnvironmentKHyperV captures enum value "kHyperV" - ApplicationInfoEnvironmentKHyperV string = "kHyperV" - - // ApplicationInfoEnvironmentKSQL captures enum value "kSQL" - ApplicationInfoEnvironmentKSQL string = "kSQL" - - // ApplicationInfoEnvironmentKView captures enum value "kView" - ApplicationInfoEnvironmentKView string = "kView" - - // ApplicationInfoEnvironmentKPuppeteer captures enum value "kPuppeteer" - ApplicationInfoEnvironmentKPuppeteer string = "kPuppeteer" - - // ApplicationInfoEnvironmentKPhysical captures enum value "kPhysical" - ApplicationInfoEnvironmentKPhysical string = "kPhysical" - - // ApplicationInfoEnvironmentKPure captures enum value "kPure" - ApplicationInfoEnvironmentKPure string = "kPure" - - // ApplicationInfoEnvironmentKNimble captures enum value "kNimble" - ApplicationInfoEnvironmentKNimble string = "kNimble" - - // ApplicationInfoEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ApplicationInfoEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ApplicationInfoEnvironmentKAzure captures enum value "kAzure" - ApplicationInfoEnvironmentKAzure string = "kAzure" - - // ApplicationInfoEnvironmentKNetapp captures enum value "kNetapp" - ApplicationInfoEnvironmentKNetapp string = "kNetapp" - - // ApplicationInfoEnvironmentKAgent captures enum value "kAgent" - ApplicationInfoEnvironmentKAgent string = "kAgent" - - // ApplicationInfoEnvironmentKGenericNas captures enum value "kGenericNas" - ApplicationInfoEnvironmentKGenericNas string = "kGenericNas" - - // ApplicationInfoEnvironmentKAcropolis captures enum value "kAcropolis" - ApplicationInfoEnvironmentKAcropolis string = "kAcropolis" - - // ApplicationInfoEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ApplicationInfoEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ApplicationInfoEnvironmentKIsilon captures enum value "kIsilon" - ApplicationInfoEnvironmentKIsilon string = "kIsilon" - - // ApplicationInfoEnvironmentKGPFS captures enum value "kGPFS" - ApplicationInfoEnvironmentKGPFS string = "kGPFS" - - // ApplicationInfoEnvironmentKKVM captures enum value "kKVM" - ApplicationInfoEnvironmentKKVM string = "kKVM" - - // ApplicationInfoEnvironmentKAWS captures enum value "kAWS" - ApplicationInfoEnvironmentKAWS string = "kAWS" - - // ApplicationInfoEnvironmentKExchange captures enum value "kExchange" - ApplicationInfoEnvironmentKExchange string = "kExchange" - - // ApplicationInfoEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ApplicationInfoEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ApplicationInfoEnvironmentKOracle captures enum value "kOracle" - ApplicationInfoEnvironmentKOracle string = "kOracle" - - // ApplicationInfoEnvironmentKGCP captures enum value "kGCP" - ApplicationInfoEnvironmentKGCP string = "kGCP" - - // ApplicationInfoEnvironmentKFlashBlade captures enum value "kFlashBlade" - ApplicationInfoEnvironmentKFlashBlade string = "kFlashBlade" - - // ApplicationInfoEnvironmentKAWSNative captures enum value "kAWSNative" - ApplicationInfoEnvironmentKAWSNative string = "kAWSNative" - - // ApplicationInfoEnvironmentKO365 captures enum value "kO365" - ApplicationInfoEnvironmentKO365 string = "kO365" - - // ApplicationInfoEnvironmentKO365Outlook captures enum value "kO365Outlook" - ApplicationInfoEnvironmentKO365Outlook string = "kO365Outlook" - - // ApplicationInfoEnvironmentKHyperFlex captures enum value "kHyperFlex" - ApplicationInfoEnvironmentKHyperFlex string = "kHyperFlex" - - // ApplicationInfoEnvironmentKGCPNative captures enum value "kGCPNative" - ApplicationInfoEnvironmentKGCPNative string = "kGCPNative" - - // ApplicationInfoEnvironmentKAzureNative captures enum value "kAzureNative" - ApplicationInfoEnvironmentKAzureNative string = "kAzureNative" - - // ApplicationInfoEnvironmentKKubernetes captures enum value "kKubernetes" - ApplicationInfoEnvironmentKKubernetes string = "kKubernetes" - - // ApplicationInfoEnvironmentKElastifile captures enum value "kElastifile" - ApplicationInfoEnvironmentKElastifile string = "kElastifile" - - // ApplicationInfoEnvironmentKAD captures enum value "kAD" - ApplicationInfoEnvironmentKAD string = "kAD" - - // ApplicationInfoEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ApplicationInfoEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ApplicationInfoEnvironmentKCassandra captures enum value "kCassandra" - ApplicationInfoEnvironmentKCassandra string = "kCassandra" - - // ApplicationInfoEnvironmentKMongoDB captures enum value "kMongoDB" - ApplicationInfoEnvironmentKMongoDB string = "kMongoDB" - - // ApplicationInfoEnvironmentKCouchbase captures enum value "kCouchbase" - ApplicationInfoEnvironmentKCouchbase string = "kCouchbase" - - // ApplicationInfoEnvironmentKHdfs captures enum value "kHdfs" - ApplicationInfoEnvironmentKHdfs string = "kHdfs" - - // ApplicationInfoEnvironmentKHive captures enum value "kHive" - ApplicationInfoEnvironmentKHive string = "kHive" - - // ApplicationInfoEnvironmentKHBase captures enum value "kHBase" - ApplicationInfoEnvironmentKHBase string = "kHBase" - - // ApplicationInfoEnvironmentKUDA captures enum value "kUDA" - ApplicationInfoEnvironmentKUDA string = "kUDA" - - // ApplicationInfoEnvironmentKO365Teams captures enum value "kO365Teams" - ApplicationInfoEnvironmentKO365Teams string = "kO365Teams" - - // ApplicationInfoEnvironmentKO365Group captures enum value "kO365Group" - ApplicationInfoEnvironmentKO365Group string = "kO365Group" - - // ApplicationInfoEnvironmentKO365Exchange captures enum value "kO365Exchange" - ApplicationInfoEnvironmentKO365Exchange string = "kO365Exchange" - - // ApplicationInfoEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ApplicationInfoEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ApplicationInfoEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ApplicationInfoEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ApplicationInfoEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ApplicationInfoEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ApplicationInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, applicationInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ApplicationInfo) 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 application info based on the context it is used -func (m *ApplicationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationTreeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationInfo) contextValidateApplicationTreeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationTreeInfo); i++ { - - if m.ApplicationTreeInfo[i] != nil { - - if swag.IsZero(m.ApplicationTreeInfo[i]) { // not required - return nil - } - - if err := m.ApplicationTreeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationTreeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationTreeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationInfo) UnmarshalBinary(b []byte) error { - var res ApplicationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_parameters.go b/v1/models/application_parameters.go deleted file mode 100644 index f530dffb..00000000 --- a/v1/models/application_parameters.go +++ /dev/null @@ -1,52 +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" -) - -// ApplicationParameters Application specific parameters. -// -// swagger:model ApplicationParameters -type ApplicationParameters struct { - - // If true, after the Cohesity Cluster successfully captures a Snapshot - // during a Job Run, the Cluster truncates the Exchange transaction logs on - // a Microsoft Exchange Server. The default value is false. - TruncateExchangeLog *bool `json:"truncateExchangeLog,omitempty"` -} - -// Validate validates this application parameters -func (m *ApplicationParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application parameters based on context it is used -func (m *ApplicationParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationParameters) UnmarshalBinary(b []byte) error { - var res ApplicationParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_restore_object.go b/v1/models/application_restore_object.go deleted file mode 100644 index 28b668db..00000000 --- a/v1/models/application_restore_object.go +++ /dev/null @@ -1,227 +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" -) - -// ApplicationRestoreObject Application Server object to restore. -// -// Specifies the Application Server to restore and parameters specific to -// that application. -// -// swagger:model ApplicationRestoreObject -type ApplicationRestoreObject struct { - - // Specifies parameters specific to Active Directory Application Server. - AdRestoreParameters *AdRestoreParameters `json:"adRestoreParameters,omitempty"` - - // Specifies the Application Server to restore (for example, kSQL). - ApplicationServerID *int64 `json:"applicationServerId,omitempty"` - - // Specifies parameters speicific to Exchange Application Server. - ExchangeRestoreParameters *ExchangeRestoreParameters `json:"exchangeRestoreParameters,omitempty"` - - // Specifies parameters specific to this Application Server. - SQLRestoreParameters *SQLRestoreParameters `json:"sqlRestoreParameters,omitempty"` - - // Specifies the target host if the application is to be restored to a - // different host. If this is empty, then the application is restored to - // the original host, which is the hosting Protection Source. - TargetHostID *int64 `json:"targetHostId,omitempty"` - - // Specifies the registered root node, like vCenter, of targetHost. - // If this is empty, then it is assumed the root node of the target - // host is the same as the host Protection Source of the application. - TargetRootNodeID *int64 `json:"targetRootNodeId,omitempty"` -} - -// Validate validates this application restore object -func (m *ApplicationRestoreObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdRestoreParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeRestoreParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLRestoreParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationRestoreObject) validateAdRestoreParameters(formats strfmt.Registry) error { - if swag.IsZero(m.AdRestoreParameters) { // not required - return nil - } - - if m.AdRestoreParameters != nil { - if err := m.AdRestoreParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreObject) validateExchangeRestoreParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeRestoreParameters) { // not required - return nil - } - - if m.ExchangeRestoreParameters != nil { - if err := m.ExchangeRestoreParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreObject) validateSQLRestoreParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SQLRestoreParameters) { // not required - return nil - } - - if m.SQLRestoreParameters != nil { - if err := m.SQLRestoreParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlRestoreParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this application restore object based on the context it is used -func (m *ApplicationRestoreObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdRestoreParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeRestoreParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLRestoreParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationRestoreObject) contextValidateAdRestoreParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.AdRestoreParameters != nil { - - if swag.IsZero(m.AdRestoreParameters) { // not required - return nil - } - - if err := m.AdRestoreParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreObject) contextValidateExchangeRestoreParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeRestoreParameters != nil { - - if swag.IsZero(m.ExchangeRestoreParameters) { // not required - return nil - } - - if err := m.ExchangeRestoreParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreObject) contextValidateSQLRestoreParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLRestoreParameters != nil { - - if swag.IsZero(m.SQLRestoreParameters) { // not required - return nil - } - - if err := m.SQLRestoreParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlRestoreParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationRestoreObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationRestoreObject) UnmarshalBinary(b []byte) error { - var res ApplicationRestoreObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_restore_parameters.go b/v1/models/application_restore_parameters.go deleted file mode 100644 index 23d8c628..00000000 --- a/v1/models/application_restore_parameters.go +++ /dev/null @@ -1,478 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ApplicationRestoreParameters Application Restore Parameters. -// -// Specifies the information regarding the application restore parameters. -// -// swagger:model ApplicationRestoreParameters -type ApplicationRestoreParameters struct { - - // Specifies the Environment of the Application server to restore like - // 'kSQL','kAD',or 'kExchange'. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - ApplicationEnvironment *string `json:"applicationEnvironment,omitempty"` - - // Specifies the Application Server objects whose data should be restored. - ApplicationRestoreObjects []*ApplicationRestoreObject `json:"applicationRestoreObjects"` - - // Specifies the restore information for the Protection Source object that - // registered and hosts the Application Servers. This provides the - // snapshot details from which the application should be restored. - HostingProtectionSource *RestoreObjectDetails `json:"hostingProtectionSource,omitempty"` - - // Specifies the list of hosting protection source and Application restore - // objects tuple. - ProtectionSourceAndApplicationObjects []*ProtectionSourceAndApplicationRestoreObjects `json:"protectionSourceAndApplicationObjects"` -} - -// Validate validates this application restore parameters -func (m *ApplicationRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostingProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSourceAndApplicationObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var applicationRestoreParametersTypeApplicationEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - applicationRestoreParametersTypeApplicationEnvironmentPropEnum = append(applicationRestoreParametersTypeApplicationEnvironmentPropEnum, v) - } -} - -const ( - - // ApplicationRestoreParametersApplicationEnvironmentKVMware captures enum value "kVMware" - ApplicationRestoreParametersApplicationEnvironmentKVMware string = "kVMware" - - // ApplicationRestoreParametersApplicationEnvironmentKHyperV captures enum value "kHyperV" - ApplicationRestoreParametersApplicationEnvironmentKHyperV string = "kHyperV" - - // ApplicationRestoreParametersApplicationEnvironmentKSQL captures enum value "kSQL" - ApplicationRestoreParametersApplicationEnvironmentKSQL string = "kSQL" - - // ApplicationRestoreParametersApplicationEnvironmentKView captures enum value "kView" - ApplicationRestoreParametersApplicationEnvironmentKView string = "kView" - - // ApplicationRestoreParametersApplicationEnvironmentKPuppeteer captures enum value "kPuppeteer" - ApplicationRestoreParametersApplicationEnvironmentKPuppeteer string = "kPuppeteer" - - // ApplicationRestoreParametersApplicationEnvironmentKPhysical captures enum value "kPhysical" - ApplicationRestoreParametersApplicationEnvironmentKPhysical string = "kPhysical" - - // ApplicationRestoreParametersApplicationEnvironmentKPure captures enum value "kPure" - ApplicationRestoreParametersApplicationEnvironmentKPure string = "kPure" - - // ApplicationRestoreParametersApplicationEnvironmentKNimble captures enum value "kNimble" - ApplicationRestoreParametersApplicationEnvironmentKNimble string = "kNimble" - - // ApplicationRestoreParametersApplicationEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ApplicationRestoreParametersApplicationEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ApplicationRestoreParametersApplicationEnvironmentKAzure captures enum value "kAzure" - ApplicationRestoreParametersApplicationEnvironmentKAzure string = "kAzure" - - // ApplicationRestoreParametersApplicationEnvironmentKNetapp captures enum value "kNetapp" - ApplicationRestoreParametersApplicationEnvironmentKNetapp string = "kNetapp" - - // ApplicationRestoreParametersApplicationEnvironmentKAgent captures enum value "kAgent" - ApplicationRestoreParametersApplicationEnvironmentKAgent string = "kAgent" - - // ApplicationRestoreParametersApplicationEnvironmentKGenericNas captures enum value "kGenericNas" - ApplicationRestoreParametersApplicationEnvironmentKGenericNas string = "kGenericNas" - - // ApplicationRestoreParametersApplicationEnvironmentKAcropolis captures enum value "kAcropolis" - ApplicationRestoreParametersApplicationEnvironmentKAcropolis string = "kAcropolis" - - // ApplicationRestoreParametersApplicationEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ApplicationRestoreParametersApplicationEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ApplicationRestoreParametersApplicationEnvironmentKIsilon captures enum value "kIsilon" - ApplicationRestoreParametersApplicationEnvironmentKIsilon string = "kIsilon" - - // ApplicationRestoreParametersApplicationEnvironmentKGPFS captures enum value "kGPFS" - ApplicationRestoreParametersApplicationEnvironmentKGPFS string = "kGPFS" - - // ApplicationRestoreParametersApplicationEnvironmentKKVM captures enum value "kKVM" - ApplicationRestoreParametersApplicationEnvironmentKKVM string = "kKVM" - - // ApplicationRestoreParametersApplicationEnvironmentKAWS captures enum value "kAWS" - ApplicationRestoreParametersApplicationEnvironmentKAWS string = "kAWS" - - // ApplicationRestoreParametersApplicationEnvironmentKExchange captures enum value "kExchange" - ApplicationRestoreParametersApplicationEnvironmentKExchange string = "kExchange" - - // ApplicationRestoreParametersApplicationEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ApplicationRestoreParametersApplicationEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ApplicationRestoreParametersApplicationEnvironmentKOracle captures enum value "kOracle" - ApplicationRestoreParametersApplicationEnvironmentKOracle string = "kOracle" - - // ApplicationRestoreParametersApplicationEnvironmentKGCP captures enum value "kGCP" - ApplicationRestoreParametersApplicationEnvironmentKGCP string = "kGCP" - - // ApplicationRestoreParametersApplicationEnvironmentKFlashBlade captures enum value "kFlashBlade" - ApplicationRestoreParametersApplicationEnvironmentKFlashBlade string = "kFlashBlade" - - // ApplicationRestoreParametersApplicationEnvironmentKAWSNative captures enum value "kAWSNative" - ApplicationRestoreParametersApplicationEnvironmentKAWSNative string = "kAWSNative" - - // ApplicationRestoreParametersApplicationEnvironmentKO365 captures enum value "kO365" - ApplicationRestoreParametersApplicationEnvironmentKO365 string = "kO365" - - // ApplicationRestoreParametersApplicationEnvironmentKO365Outlook captures enum value "kO365Outlook" - ApplicationRestoreParametersApplicationEnvironmentKO365Outlook string = "kO365Outlook" - - // ApplicationRestoreParametersApplicationEnvironmentKHyperFlex captures enum value "kHyperFlex" - ApplicationRestoreParametersApplicationEnvironmentKHyperFlex string = "kHyperFlex" - - // ApplicationRestoreParametersApplicationEnvironmentKGCPNative captures enum value "kGCPNative" - ApplicationRestoreParametersApplicationEnvironmentKGCPNative string = "kGCPNative" - - // ApplicationRestoreParametersApplicationEnvironmentKAzureNative captures enum value "kAzureNative" - ApplicationRestoreParametersApplicationEnvironmentKAzureNative string = "kAzureNative" - - // ApplicationRestoreParametersApplicationEnvironmentKKubernetes captures enum value "kKubernetes" - ApplicationRestoreParametersApplicationEnvironmentKKubernetes string = "kKubernetes" - - // ApplicationRestoreParametersApplicationEnvironmentKElastifile captures enum value "kElastifile" - ApplicationRestoreParametersApplicationEnvironmentKElastifile string = "kElastifile" - - // ApplicationRestoreParametersApplicationEnvironmentKAD captures enum value "kAD" - ApplicationRestoreParametersApplicationEnvironmentKAD string = "kAD" - - // ApplicationRestoreParametersApplicationEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ApplicationRestoreParametersApplicationEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ApplicationRestoreParametersApplicationEnvironmentKCassandra captures enum value "kCassandra" - ApplicationRestoreParametersApplicationEnvironmentKCassandra string = "kCassandra" - - // ApplicationRestoreParametersApplicationEnvironmentKMongoDB captures enum value "kMongoDB" - ApplicationRestoreParametersApplicationEnvironmentKMongoDB string = "kMongoDB" - - // ApplicationRestoreParametersApplicationEnvironmentKCouchbase captures enum value "kCouchbase" - ApplicationRestoreParametersApplicationEnvironmentKCouchbase string = "kCouchbase" - - // ApplicationRestoreParametersApplicationEnvironmentKHdfs captures enum value "kHdfs" - ApplicationRestoreParametersApplicationEnvironmentKHdfs string = "kHdfs" - - // ApplicationRestoreParametersApplicationEnvironmentKHive captures enum value "kHive" - ApplicationRestoreParametersApplicationEnvironmentKHive string = "kHive" - - // ApplicationRestoreParametersApplicationEnvironmentKHBase captures enum value "kHBase" - ApplicationRestoreParametersApplicationEnvironmentKHBase string = "kHBase" - - // ApplicationRestoreParametersApplicationEnvironmentKUDA captures enum value "kUDA" - ApplicationRestoreParametersApplicationEnvironmentKUDA string = "kUDA" - - // ApplicationRestoreParametersApplicationEnvironmentKO365Teams captures enum value "kO365Teams" - ApplicationRestoreParametersApplicationEnvironmentKO365Teams string = "kO365Teams" - - // ApplicationRestoreParametersApplicationEnvironmentKO365Group captures enum value "kO365Group" - ApplicationRestoreParametersApplicationEnvironmentKO365Group string = "kO365Group" - - // ApplicationRestoreParametersApplicationEnvironmentKO365Exchange captures enum value "kO365Exchange" - ApplicationRestoreParametersApplicationEnvironmentKO365Exchange string = "kO365Exchange" - - // ApplicationRestoreParametersApplicationEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ApplicationRestoreParametersApplicationEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ApplicationRestoreParametersApplicationEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ApplicationRestoreParametersApplicationEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ApplicationRestoreParametersApplicationEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ApplicationRestoreParametersApplicationEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ApplicationRestoreParameters) validateApplicationEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, applicationRestoreParametersTypeApplicationEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ApplicationRestoreParameters) validateApplicationEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateApplicationEnvironmentEnum("applicationEnvironment", "body", *m.ApplicationEnvironment); err != nil { - return err - } - - return nil -} - -func (m *ApplicationRestoreParameters) validateApplicationRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationRestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - continue - } - - if m.ApplicationRestoreObjects[i] != nil { - if err := m.ApplicationRestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationRestoreParameters) validateHostingProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HostingProtectionSource) { // not required - return nil - } - - if m.HostingProtectionSource != nil { - if err := m.HostingProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreParameters) validateProtectionSourceAndApplicationObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSourceAndApplicationObjects) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionSourceAndApplicationObjects); i++ { - if swag.IsZero(m.ProtectionSourceAndApplicationObjects[i]) { // not required - continue - } - - if m.ProtectionSourceAndApplicationObjects[i] != nil { - if err := m.ProtectionSourceAndApplicationObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application restore parameters based on the context it is used -func (m *ApplicationRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostingProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSourceAndApplicationObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationRestoreParameters) contextValidateApplicationRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - - if m.ApplicationRestoreObjects[i] != nil { - - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - return nil - } - - if err := m.ApplicationRestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationRestoreParameters) contextValidateHostingProtectionSource(ctx context.Context, formats strfmt.Registry) error { - - if m.HostingProtectionSource != nil { - - if swag.IsZero(m.HostingProtectionSource) { // not required - return nil - } - - if err := m.HostingProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ApplicationRestoreParameters) contextValidateProtectionSourceAndApplicationObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionSourceAndApplicationObjects); i++ { - - if m.ProtectionSourceAndApplicationObjects[i] != nil { - - if swag.IsZero(m.ProtectionSourceAndApplicationObjects[i]) { // not required - return nil - } - - if err := m.ProtectionSourceAndApplicationObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationRestoreParameters) UnmarshalBinary(b []byte) error { - var res ApplicationRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_server_info.go b/v1/models/application_server_info.go deleted file mode 100644 index 6e15f6b1..00000000 --- a/v1/models/application_server_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationServerInfo Application Server Info -// -// Specifies the Information about the Exchange Server Node. -// -// swagger:model ApplicationServerInfo -type ApplicationServerInfo struct { - - // Specifies the list of all the copies of the Exchange databases(that are - // part of DAG) that are present on this Exchange Node. - DatabaseCopyInfoList []*ExchangeDatabaseCopyInfo `json:"databaseCopyInfoList"` - - // Specifies the list of all the databases available on the standalone - // Exchange server node. This is populated for the Standlone Exchange - // Servers. - DatabaseInfoList []*ExchangeDatabaseInfo `json:"databaseInfoList"` - - // Specifies the fully qualified domain name of the Exchange Server. - Fqdn *string `json:"fqdn,omitempty"` - - // Specifies the Guid of the Exchange Application Server. - GUID *string `json:"guid,omitempty"` - - // Specifies the display name of the Exchange Application Server. - Name *string `json:"name,omitempty"` - - // Specifies the total size of all Exchange database copies in all the - // Exchange Application Servers that are part of the DAG. - TotalSizeBytes *int64 `json:"totalSizeBytes,omitempty"` -} - -// Validate validates this application server info -func (m *ApplicationServerInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseCopyInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationServerInfo) validateDatabaseCopyInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseCopyInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DatabaseCopyInfoList); i++ { - if swag.IsZero(m.DatabaseCopyInfoList[i]) { // not required - continue - } - - if m.DatabaseCopyInfoList[i] != nil { - if err := m.DatabaseCopyInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationServerInfo) validateDatabaseInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DatabaseInfoList); i++ { - if swag.IsZero(m.DatabaseInfoList[i]) { // not required - continue - } - - if m.DatabaseInfoList[i] != nil { - if err := m.DatabaseInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application server info based on the context it is used -func (m *ApplicationServerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseCopyInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabaseInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationServerInfo) contextValidateDatabaseCopyInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatabaseCopyInfoList); i++ { - - if m.DatabaseCopyInfoList[i] != nil { - - if swag.IsZero(m.DatabaseCopyInfoList[i]) { // not required - return nil - } - - if err := m.DatabaseCopyInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationServerInfo) contextValidateDatabaseInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatabaseInfoList); i++ { - - if m.DatabaseInfoList[i] != nil { - - if swag.IsZero(m.DatabaseInfoList[i]) { // not required - return nil - } - - if err := m.DatabaseInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationServerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationServerInfo) UnmarshalBinary(b []byte) error { - var res ApplicationServerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/application_special_parameters.go b/v1/models/application_special_parameters.go deleted file mode 100644 index 8165d567..00000000 --- a/v1/models/application_special_parameters.go +++ /dev/null @@ -1,58 +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" -) - -// ApplicationSpecialParameters Application Special Job Parameters. -// -// Specifies additional special settings applicable for a Protection Source -// of 'kSQL'/'kOracle' type in a Protection Job. -// -// swagger:model ApplicationSpecialParameters -type ApplicationSpecialParameters struct { - - // Array of Ids of Application Entities like SQL/Oracle instances, and - // databases that should be protected in a Protection Source. - // - // Specifies the subset of application entities like SQL/Oracle instances, and - // databases to protect in a Protection Source of type 'kSQL'/'kOracle'. If - // not specified, all application entities on the Protection Source. - ApplicationEntityIds []int64 `json:"applicationEntityIds"` -} - -// Validate validates this application special parameters -func (m *ApplicationSpecialParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application special parameters based on context it is used -func (m *ApplicationSpecialParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationSpecialParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationSpecialParameters) UnmarshalBinary(b []byte) error { - var res ApplicationSpecialParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/applications_restore_task_request.go b/v1/models/applications_restore_task_request.go deleted file mode 100644 index 35e79ed8..00000000 --- a/v1/models/applications_restore_task_request.go +++ /dev/null @@ -1,562 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ApplicationsRestoreTaskRequest Create Applications Restore Task Request. -// -// Specifies the request to create a restore task for restoring Application -// Servers like SQL or Exchange servers hosted by a Protection Source. -// -// swagger:model ApplicationsRestoreTaskRequest -type ApplicationsRestoreTaskRequest struct { - - // Specifies the Environment of the Application to restore like 'kSQL', or - // 'kExchange'. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // Required: true - // 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"] - ApplicationEnvironment *string `json:"applicationEnvironment"` - - // Specifies the Application Server objects whose data should be restored - // and the restore parameters for each of them. - // This field will be deprecated. Use the field - // ProtectionSourceAndApplicationRestoreObjects. - // deprecated: true - ApplicationRestoreObjects []*ApplicationRestoreObject `json:"applicationRestoreObjects"` - - // Specifies the restore information for the Protection Source object that - // registered and hosts the Application Servers. This provides the - // snapshot details from which the applications should be restored. - // This field will be deprecated. Use the field - // ProtectionSourceAndApplicationRestoreObjects. - // deprecated: true - // Required: true - HostingProtectionSource *RestoreObjectDetails `json:"hostingProtectionSource"` - - // Specifies a name for the new task to be created. This field has to be - // set, and it needs to be unique across all restore tasks. - // Required: true - Name *string `json:"name"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies the list of hosting protection source and Application restore - // objects tuple. - ProtectionSourceAndApplicationObjects []*ProtectionSourceAndApplicationRestoreObjects `json:"protectionSourceAndApplicationObjects"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` - - // Specifies VLAN parameters for the restore operation. - VlanParameters *VlanParameters `json:"vlanParameters,omitempty"` -} - -// Validate validates this applications restore task request -func (m *ApplicationsRestoreTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostingProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSourceAndApplicationObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var applicationsRestoreTaskRequestTypeApplicationEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - applicationsRestoreTaskRequestTypeApplicationEnvironmentPropEnum = append(applicationsRestoreTaskRequestTypeApplicationEnvironmentPropEnum, v) - } -} - -const ( - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKVMware captures enum value "kVMware" - ApplicationsRestoreTaskRequestApplicationEnvironmentKVMware string = "kVMware" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperV captures enum value "kHyperV" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperV string = "kHyperV" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKSQL captures enum value "kSQL" - ApplicationsRestoreTaskRequestApplicationEnvironmentKSQL string = "kSQL" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKView captures enum value "kView" - ApplicationsRestoreTaskRequestApplicationEnvironmentKView string = "kView" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKPuppeteer captures enum value "kPuppeteer" - ApplicationsRestoreTaskRequestApplicationEnvironmentKPuppeteer string = "kPuppeteer" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKPhysical captures enum value "kPhysical" - ApplicationsRestoreTaskRequestApplicationEnvironmentKPhysical string = "kPhysical" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKPure captures enum value "kPure" - ApplicationsRestoreTaskRequestApplicationEnvironmentKPure string = "kPure" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKNimble captures enum value "kNimble" - ApplicationsRestoreTaskRequestApplicationEnvironmentKNimble string = "kNimble" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ApplicationsRestoreTaskRequestApplicationEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAzure captures enum value "kAzure" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAzure string = "kAzure" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKNetapp captures enum value "kNetapp" - ApplicationsRestoreTaskRequestApplicationEnvironmentKNetapp string = "kNetapp" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAgent captures enum value "kAgent" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAgent string = "kAgent" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKGenericNas captures enum value "kGenericNas" - ApplicationsRestoreTaskRequestApplicationEnvironmentKGenericNas string = "kGenericNas" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAcropolis captures enum value "kAcropolis" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAcropolis string = "kAcropolis" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ApplicationsRestoreTaskRequestApplicationEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKIsilon captures enum value "kIsilon" - ApplicationsRestoreTaskRequestApplicationEnvironmentKIsilon string = "kIsilon" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKGPFS captures enum value "kGPFS" - ApplicationsRestoreTaskRequestApplicationEnvironmentKGPFS string = "kGPFS" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKKVM captures enum value "kKVM" - ApplicationsRestoreTaskRequestApplicationEnvironmentKKVM string = "kKVM" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAWS captures enum value "kAWS" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAWS string = "kAWS" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKExchange captures enum value "kExchange" - ApplicationsRestoreTaskRequestApplicationEnvironmentKExchange string = "kExchange" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKOracle captures enum value "kOracle" - ApplicationsRestoreTaskRequestApplicationEnvironmentKOracle string = "kOracle" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKGCP captures enum value "kGCP" - ApplicationsRestoreTaskRequestApplicationEnvironmentKGCP string = "kGCP" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKFlashBlade captures enum value "kFlashBlade" - ApplicationsRestoreTaskRequestApplicationEnvironmentKFlashBlade string = "kFlashBlade" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAWSNative captures enum value "kAWSNative" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAWSNative string = "kAWSNative" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365 captures enum value "kO365" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365 string = "kO365" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Outlook captures enum value "kO365Outlook" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Outlook string = "kO365Outlook" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperFlex captures enum value "kHyperFlex" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHyperFlex string = "kHyperFlex" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKGCPNative captures enum value "kGCPNative" - ApplicationsRestoreTaskRequestApplicationEnvironmentKGCPNative string = "kGCPNative" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAzureNative captures enum value "kAzureNative" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAzureNative string = "kAzureNative" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKKubernetes captures enum value "kKubernetes" - ApplicationsRestoreTaskRequestApplicationEnvironmentKKubernetes string = "kKubernetes" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKElastifile captures enum value "kElastifile" - ApplicationsRestoreTaskRequestApplicationEnvironmentKElastifile string = "kElastifile" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKAD captures enum value "kAD" - ApplicationsRestoreTaskRequestApplicationEnvironmentKAD string = "kAD" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ApplicationsRestoreTaskRequestApplicationEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKCassandra captures enum value "kCassandra" - ApplicationsRestoreTaskRequestApplicationEnvironmentKCassandra string = "kCassandra" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKMongoDB captures enum value "kMongoDB" - ApplicationsRestoreTaskRequestApplicationEnvironmentKMongoDB string = "kMongoDB" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKCouchbase captures enum value "kCouchbase" - ApplicationsRestoreTaskRequestApplicationEnvironmentKCouchbase string = "kCouchbase" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHdfs captures enum value "kHdfs" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHdfs string = "kHdfs" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHive captures enum value "kHive" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHive string = "kHive" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKHBase captures enum value "kHBase" - ApplicationsRestoreTaskRequestApplicationEnvironmentKHBase string = "kHBase" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKUDA captures enum value "kUDA" - ApplicationsRestoreTaskRequestApplicationEnvironmentKUDA string = "kUDA" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Teams captures enum value "kO365Teams" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Teams string = "kO365Teams" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Group captures enum value "kO365Group" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Group string = "kO365Group" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Exchange captures enum value "kO365Exchange" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Exchange string = "kO365Exchange" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ApplicationsRestoreTaskRequestApplicationEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ApplicationsRestoreTaskRequestApplicationEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ApplicationsRestoreTaskRequest) validateApplicationEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, applicationsRestoreTaskRequestTypeApplicationEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateApplicationEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("applicationEnvironment", "body", m.ApplicationEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateApplicationEnvironmentEnum("applicationEnvironment", "body", *m.ApplicationEnvironment); err != nil { - return err - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateApplicationRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationRestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - continue - } - - if m.ApplicationRestoreObjects[i] != nil { - if err := m.ApplicationRestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateHostingProtectionSource(formats strfmt.Registry) error { - - if err := validate.Required("hostingProtectionSource", "body", m.HostingProtectionSource); err != nil { - return err - } - - if m.HostingProtectionSource != nil { - if err := m.HostingProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateProtectionSourceAndApplicationObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSourceAndApplicationObjects) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionSourceAndApplicationObjects); i++ { - if swag.IsZero(m.ProtectionSourceAndApplicationObjects[i]) { // not required - continue - } - - if m.ProtectionSourceAndApplicationObjects[i] != nil { - if err := m.ProtectionSourceAndApplicationObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) validateVlanParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if m.VlanParameters != nil { - if err := m.VlanParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this applications restore task request based on the context it is used -func (m *ApplicationsRestoreTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostingProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSourceAndApplicationObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationsRestoreTaskRequest) contextValidateApplicationRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - - if m.ApplicationRestoreObjects[i] != nil { - - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - return nil - } - - if err := m.ApplicationRestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) contextValidateHostingProtectionSource(ctx context.Context, formats strfmt.Registry) error { - - if m.HostingProtectionSource != nil { - - if err := m.HostingProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) contextValidateProtectionSourceAndApplicationObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionSourceAndApplicationObjects); i++ { - - if m.ProtectionSourceAndApplicationObjects[i] != nil { - - if swag.IsZero(m.ProtectionSourceAndApplicationObjects[i]) { // not required - return nil - } - - if err := m.ProtectionSourceAndApplicationObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceAndApplicationObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationsRestoreTaskRequest) contextValidateVlanParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParameters != nil { - - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if err := m.VlanParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationsRestoreTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationsRestoreTaskRequest) UnmarshalBinary(b []byte) error { - var res ApplicationsRestoreTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/applications_wrapper.go b/v1/models/applications_wrapper.go deleted file mode 100644 index 78f9f9be..00000000 --- a/v1/models/applications_wrapper.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationsWrapper Applications Wrapper. -// -// ApplicationsWrapper is the struct to define the list of map-reduce -// applications. -// -// swagger:model ApplicationsWrapper -type ApplicationsWrapper struct { - - // Applications specifies the list of available map-reduce applications - // in analytics workbench. - Applications []*MapReduceInfo `json:"applications"` -} - -// Validate validates this applications wrapper -func (m *ApplicationsWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationsWrapper) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - if swag.IsZero(m.Applications[i]) { // not required - continue - } - - if m.Applications[i] != nil { - if err := m.Applications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this applications wrapper based on the context it is used -func (m *ApplicationsWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplications(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationsWrapper) contextValidateApplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Applications); i++ { - - if m.Applications[i] != nil { - - if swag.IsZero(m.Applications[i]) { // not required - return nil - } - - if err := m.Applications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationsWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationsWrapper) UnmarshalBinary(b []byte) error { - var res ApplicationsWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/apps_config.go b/v1/models/apps_config.go deleted file mode 100644 index 01173920..00000000 --- a/v1/models/apps_config.go +++ /dev/null @@ -1,242 +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" -) - -// AppsConfig Athena Apps Configuration. -// -// swagger:model AppsConfig -type AppsConfig struct { - - // Whether to allow pod external traffic. - AllowExternalTraffic *bool `json:"allowExternalTraffic,omitempty"` - - // Whether to allow apps unrestricted view access. - AllowUnrestictedViewAccess *bool `json:"allowUnrestictedViewAccess,omitempty"` - - // Specifies the various modes for running apps. - // 'kDisabled' specifies that apps are disabled. - // 'kBareMetal' specifies that apps could only run in containers - // on the node (no VM). - // 'kVmOnly' specifies that apps could only run in containers on a VM - // hosted by the node. - // Enum: ["kDisabled","kBareMetal","kVmOnly"] - AppsMode *string `json:"appsMode,omitempty"` - - // The subnet for Athena apps. - AppsSubnet *Subnet `json:"appsSubnet,omitempty"` - - // Specifies the various modes for running marketplace apps. - // 'kDisabled' specifies that marketplace apps are disabled. - // 'kBareMetal' specifies that marketplace apps could only run in containers - // on the node (no VM). - // 'kVmOnly' specifies that marketplace apps could only run in containers - // on a VM hosted by the node. - // Enum: ["kDisabled","kBareMetal","kVmOnly"] - MarketplaceAppsMode *string `json:"marketplaceAppsMode,omitempty"` - - // The system memory to overcommit for apps. - OvercommitMemoryPct *int32 `json:"overcommitMemoryPct,omitempty"` - - // The CPU millicores to reserve for apps. - ReservedCPUMillicores *int32 `json:"reservedCpuMillicores,omitempty"` - - // The system memory to reserve for apps. - ReservedMemoryPct *int32 `json:"reservedMemoryPct,omitempty"` -} - -// Validate validates this apps config -func (m *AppsConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppsMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppsSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMarketplaceAppsMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var appsConfigTypeAppsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kBareMetal","kVmOnly"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appsConfigTypeAppsModePropEnum = append(appsConfigTypeAppsModePropEnum, v) - } -} - -const ( - - // AppsConfigAppsModeKDisabled captures enum value "kDisabled" - AppsConfigAppsModeKDisabled string = "kDisabled" - - // AppsConfigAppsModeKBareMetal captures enum value "kBareMetal" - AppsConfigAppsModeKBareMetal string = "kBareMetal" - - // AppsConfigAppsModeKVMOnly captures enum value "kVmOnly" - AppsConfigAppsModeKVMOnly string = "kVmOnly" -) - -// prop value enum -func (m *AppsConfig) validateAppsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appsConfigTypeAppsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppsConfig) validateAppsMode(formats strfmt.Registry) error { - if swag.IsZero(m.AppsMode) { // not required - return nil - } - - // value enum - if err := m.validateAppsModeEnum("appsMode", "body", *m.AppsMode); err != nil { - return err - } - - return nil -} - -func (m *AppsConfig) validateAppsSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if m.AppsSubnet != nil { - if err := m.AppsSubnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -var appsConfigTypeMarketplaceAppsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kBareMetal","kVmOnly"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appsConfigTypeMarketplaceAppsModePropEnum = append(appsConfigTypeMarketplaceAppsModePropEnum, v) - } -} - -const ( - - // AppsConfigMarketplaceAppsModeKDisabled captures enum value "kDisabled" - AppsConfigMarketplaceAppsModeKDisabled string = "kDisabled" - - // AppsConfigMarketplaceAppsModeKBareMetal captures enum value "kBareMetal" - AppsConfigMarketplaceAppsModeKBareMetal string = "kBareMetal" - - // AppsConfigMarketplaceAppsModeKVMOnly captures enum value "kVmOnly" - AppsConfigMarketplaceAppsModeKVMOnly string = "kVmOnly" -) - -// prop value enum -func (m *AppsConfig) validateMarketplaceAppsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appsConfigTypeMarketplaceAppsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppsConfig) validateMarketplaceAppsMode(formats strfmt.Registry) error { - if swag.IsZero(m.MarketplaceAppsMode) { // not required - return nil - } - - // value enum - if err := m.validateMarketplaceAppsModeEnum("marketplaceAppsMode", "body", *m.MarketplaceAppsMode); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this apps config based on the context it is used -func (m *AppsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppsSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppsConfig) contextValidateAppsSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.AppsSubnet != nil { - - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if err := m.AppsSubnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppsConfig) UnmarshalBinary(b []byte) error { - var res AppsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/archival_external_target.go b/v1/models/archival_external_target.go deleted file mode 100644 index 6a840c50..00000000 --- a/v1/models/archival_external_target.go +++ /dev/null @@ -1,120 +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" -) - -// ArchivalExternalTarget Archival Target. -// -// Specifies settings about the Archival External Target (such as Tape or AWS). -// -// swagger:model ArchivalExternalTarget -type ArchivalExternalTarget struct { - - // Specifies the id of Archival Vault assigned by the Cohesity Cluster. - VaultID *int64 `json:"vaultId,omitempty"` - - // Name of the Archival Vault. - VaultName *string `json:"vaultName,omitempty"` - - // Specifies the type of the Archival External Target such as 'kCloud', - // 'kTape' or 'kNas'. - // 'kCloud' indicates the archival location as Cloud. - // 'kTape' indicates the archival location as Tape. - // 'kNas' indicates the archival location as Network Attached Storage (Nas). - // Enum: ["kCloud","kTape","kNas"] - VaultType *string `json:"vaultType,omitempty"` -} - -// Validate validates this archival external target -func (m *ArchivalExternalTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVaultType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalExternalTargetTypeVaultTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCloud","kTape","kNas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalExternalTargetTypeVaultTypePropEnum = append(archivalExternalTargetTypeVaultTypePropEnum, v) - } -} - -const ( - - // ArchivalExternalTargetVaultTypeKCloud captures enum value "kCloud" - ArchivalExternalTargetVaultTypeKCloud string = "kCloud" - - // ArchivalExternalTargetVaultTypeKTape captures enum value "kTape" - ArchivalExternalTargetVaultTypeKTape string = "kTape" - - // ArchivalExternalTargetVaultTypeKNas captures enum value "kNas" - ArchivalExternalTargetVaultTypeKNas string = "kNas" -) - -// prop value enum -func (m *ArchivalExternalTarget) validateVaultTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalExternalTargetTypeVaultTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalExternalTarget) validateVaultType(formats strfmt.Registry) error { - if swag.IsZero(m.VaultType) { // not required - return nil - } - - // value enum - if err := m.validateVaultTypeEnum("vaultType", "body", *m.VaultType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this archival external target based on context it is used -func (m *ArchivalExternalTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalExternalTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalExternalTarget) UnmarshalBinary(b []byte) error { - var res ArchivalExternalTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/archival_info_base.go b/v1/models/archival_info_base.go deleted file mode 100644 index 9cf6e726..00000000 --- a/v1/models/archival_info_base.go +++ /dev/null @@ -1,326 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalInfoBase archival info base -// -// swagger:model ArchivalInfoBase -type ArchivalInfoBase struct { - - // WORM related properties for this archive. - ArchiveWormProperties *ArchiveWORMProperties `json:"archiveWormProperties,omitempty"` - - // Average logical bytes transfer rate in bytes per second as seen by Icebox. - AvgLogicalTransferRateBps *int64 `json:"avgLogicalTransferRateBps,omitempty"` - - // Number of physical bytes transferred for this archival so far. This takes - // into account compression/padding and encryption (if any). If an archive - // task is cancelled, this and above 'logical_bytes_transferred' field will - // contain the number of bytes transferred when cancellation was issued to - // Icebox. Actual cancellation of the archive task is performed - // asynchronously in the background by Icebox. While task is being cancelled, - // Icebox might have transferred more data to the archive target. So this - // below field may not accurately represent the total bytes transferred. - BytesTransferred *int64 `json:"bytesTransferred,omitempty"` - - // Time when this archival ended. If not set, then the archival has not ended - // yet. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Mapping from global hash string id of protected entity to front end size - // info calculated by icebox during archival. Currently it only applies to - // object protection archive in DMaaS. - EntityStringIDToFrontEndSizeInfoMap []*ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry `json:"entityStringIdToFrontEndSizeInfoMap"` - - // If the archival has completed, the following indicates whether there was - // an error in its completion. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Set to true if this is a CAD archive in the cloud domain format. - IsCadArchive *bool `json:"isCadArchive,omitempty"` - - // Whether this is a cloud domain archive. - IsCloudDomainArchive *bool `json:"isCloudDomainArchive,omitempty"` - - // Whether this is an incremental archive. If set to true, this is an - // incremental archive, otherwise this is a full archive. - IsIncrementalArchive *bool `json:"isIncrementalArchive,omitempty"` - - // Number of logical bytes transferred for this archival so far. This - // value can never exceed the value of the above field 'logical_size_bytes'. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Total logical size of the archive, before compression and encryption. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // If the copy task that this ArchivalInfoBase is a part of was created to - // only extend the expiration time of a previous successful archive task, - // this field will contain the UID of that previous archive task. - OriginalTaskUID *UniversalIDProto `json:"originalTaskUid,omitempty"` - - // The root path of the progress monitor for this task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Time when this archival was started. If not set, then archival has not - // been started yet. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Message to display in the UI if any manual intervention is needed to make - // forward progress for the archival task. This message is mainly relevant - // for tape based archival tasks where a backup admin might be asked to load - // new media when the tape library does not have any more media to use. - UserActionRequiredMsg *string `json:"userActionRequiredMsg,omitempty"` -} - -// Validate validates this archival info base -func (m *ArchivalInfoBase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveWormProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityStringIDToFrontEndSizeInfoMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalInfoBase) validateArchiveWormProperties(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveWormProperties) { // not required - return nil - } - - if m.ArchiveWormProperties != nil { - if err := m.ArchiveWormProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveWormProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveWormProperties") - } - return err - } - } - - return nil -} - -func (m *ArchivalInfoBase) validateEntityStringIDToFrontEndSizeInfoMap(formats strfmt.Registry) error { - if swag.IsZero(m.EntityStringIDToFrontEndSizeInfoMap) { // not required - return nil - } - - for i := 0; i < len(m.EntityStringIDToFrontEndSizeInfoMap); i++ { - if swag.IsZero(m.EntityStringIDToFrontEndSizeInfoMap[i]) { // not required - continue - } - - if m.EntityStringIDToFrontEndSizeInfoMap[i] != nil { - if err := m.EntityStringIDToFrontEndSizeInfoMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityStringIdToFrontEndSizeInfoMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityStringIdToFrontEndSizeInfoMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ArchivalInfoBase) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *ArchivalInfoBase) validateOriginalTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTaskUID) { // not required - return nil - } - - if m.OriginalTaskUID != nil { - if err := m.OriginalTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTaskUid") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival info base based on the context it is used -func (m *ArchivalInfoBase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchiveWormProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityStringIDToFrontEndSizeInfoMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalInfoBase) contextValidateArchiveWormProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchiveWormProperties != nil { - - if swag.IsZero(m.ArchiveWormProperties) { // not required - return nil - } - - if err := m.ArchiveWormProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveWormProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveWormProperties") - } - return err - } - } - - return nil -} - -func (m *ArchivalInfoBase) contextValidateEntityStringIDToFrontEndSizeInfoMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityStringIDToFrontEndSizeInfoMap); i++ { - - if m.EntityStringIDToFrontEndSizeInfoMap[i] != nil { - - if swag.IsZero(m.EntityStringIDToFrontEndSizeInfoMap[i]) { // not required - return nil - } - - if err := m.EntityStringIDToFrontEndSizeInfoMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityStringIdToFrontEndSizeInfoMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityStringIdToFrontEndSizeInfoMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ArchivalInfoBase) 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 -} - -func (m *ArchivalInfoBase) contextValidateOriginalTaskUID(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTaskUID != nil { - - if swag.IsZero(m.OriginalTaskUID) { // not required - return nil - } - - if err := m.OriginalTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTaskUid") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalInfoBase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalInfoBase) UnmarshalBinary(b []byte) error { - var res ArchivalInfoBase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/archival_info_base_entity_string_id_to_front_end_size_info_map_entry.go b/v1/models/archival_info_base_entity_string_id_to_front_end_size_info_map_entry.go deleted file mode 100644 index c7c119fb..00000000 --- a/v1/models/archival_info_base_entity_string_id_to_front_end_size_info_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry archival info base entity string Id to front end size info map entry -// -// swagger:model ArchivalInfoBase_EntityStringIdToFrontEndSizeInfoMapEntry -type ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *SizeInfo `json:"value,omitempty"` -} - -// Validate validates this archival info base entity string Id to front end size info map entry -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) 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 -} - -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival info base entity string Id to front end size info map entry based on the context it is used -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry) UnmarshalBinary(b []byte) error { - var res ArchivalInfoBaseEntityStringIDToFrontEndSizeInfoMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/archival_target.go b/v1/models/archival_target.go deleted file mode 100644 index e44f8cfb..00000000 --- a/v1/models/archival_target.go +++ /dev/null @@ -1,133 +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" -) - -// ArchivalTarget Message that specifies the details about an archival target (such as cloud -// or tape) where backup snapshots may be archived to. -// -// swagger:model ArchivalTarget -type ArchivalTarget struct { - - // Tier settings in case of cloud target. - // Contains default tier type and information for moving snapshot data across - // cloud tiers. - CloudTierSetting *ClusterConfigProtoVaultCloudTierSetting `json:"cloudTierSetting,omitempty"` - - // The name of the archival target. - Name *string `json:"name,omitempty"` - - // OwnershipContext of an archival target. - OwnershipContext *int32 `json:"ownershipContext,omitempty"` - - // The type of the archival target. - Type *int32 `json:"type,omitempty"` - - // Usage of the archival target. Regular archival and RPaas archival are - // potential UsageType. By default it is regular archival. - // A vault can only be used for one UsageType and UsageType should not be - // changed once set. - // - // Note: This field will be deprecated in future. Use OwnershipContext - // instead. - UsageType *int32 `json:"usageType,omitempty"` - - // The id of the archival vault. - VaultID *int64 `json:"vaultId,omitempty"` -} - -// Validate validates this archival target -func (m *ArchivalTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudTierSetting(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTarget) validateCloudTierSetting(formats strfmt.Registry) error { - if swag.IsZero(m.CloudTierSetting) { // not required - return nil - } - - if m.CloudTierSetting != nil { - if err := m.CloudTierSetting.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierSetting") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierSetting") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival target based on the context it is used -func (m *ArchivalTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudTierSetting(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTarget) contextValidateCloudTierSetting(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudTierSetting != nil { - - if swag.IsZero(m.CloudTierSetting) { // not required - return nil - } - - if err := m.CloudTierSetting.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierSetting") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierSetting") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTarget) UnmarshalBinary(b []byte) error { - var res ArchivalTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/archive_w_o_r_m_properties.go b/v1/models/archive_w_o_r_m_properties.go deleted file mode 100644 index 3f2c4fc6..00000000 --- a/v1/models/archive_w_o_r_m_properties.go +++ /dev/null @@ -1,75 +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" -) - -// ArchiveWORMProperties archive w o r m properties -// -// swagger:model ArchiveWORMProperties -type ArchiveWORMProperties struct { - - // Indicates the reason of archive not being worm compliant. - ArchiveWormNonComplianceReason *string `json:"archiveWormNonComplianceReason,omitempty"` - - // Retention time for objects protected by data lock in external targets. - ExternalTargetDataLockRetentionSecs *int64 `json:"externalTargetDataLockRetentionSecs,omitempty"` - - // Indicates whether this archive run is WORM compliant. For an archive to be - // compliant, the following criteria must be met: - // 1. The external target must be capable of supporting object-level - // time-based locks. - // 2. The protection policy must have DataLock enabled for the archival - // section. - // 3. 'WORM on external target' must be chosen in the archival section of - // the policy - // 4. The archival job should have succeeded in adding/extending locks - // on all new and referred objects. - IsArchiveWormCompliant *bool `json:"isArchiveWormCompliant,omitempty"` - - // Mode of data lock retention set on the target. Today we only support - // kAdministrative and kCompliance. Legal hold on the objects in the external - // target is not supported. - PolicyType *int32 `json:"policyType,omitempty"` - - // Time at which the WORM protection expires. It will be populated with - // the same value from ArchivalJobParams.DataLockConstraintsProto. - // data_lock_expiry_usecs when is_archive_worm_compliant is true. - WormExpiryTimeUsecs *int64 `json:"wormExpiryTimeUsecs,omitempty"` -} - -// Validate validates this archive w o r m properties -func (m *ArchiveWORMProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this archive w o r m properties based on context it is used -func (m *ArchiveWORMProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchiveWORMProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchiveWORMProperties) UnmarshalBinary(b []byte) error { - var res ArchiveWORMProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/array_info.go b/v1/models/array_info.go deleted file mode 100644 index f2c9ee2b..00000000 --- a/v1/models/array_info.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArrayInfo Proto that contains specific information about an array. -// -// swagger:model ArrayInfo -type ArrayInfo struct { - - // List of data network interfaces on the array. - DataNetworkInterfaceVec []*PrivateNetworkInterface `json:"dataNetworkInterfaceVec"` - - // Unique identifier of this array. - ID *string `json:"id,omitempty"` - - // The total capacity in bytes of this array. - LogicalCapacityBytes *int64 `json:"logicalCapacityBytes,omitempty"` - - // The array's total physical space usage (including snapshots) in bytes. - PhysicalSpaceUsedBytes *int64 `json:"physicalSpaceUsedBytes,omitempty"` - - // The revision of the array. - Revision *string `json:"revision,omitempty"` - - // Purity s/w version running on this array. - Version *string `json:"version,omitempty"` -} - -// Validate validates this array info -func (m *ArrayInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataNetworkInterfaceVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArrayInfo) validateDataNetworkInterfaceVec(formats strfmt.Registry) error { - if swag.IsZero(m.DataNetworkInterfaceVec) { // not required - return nil - } - - for i := 0; i < len(m.DataNetworkInterfaceVec); i++ { - if swag.IsZero(m.DataNetworkInterfaceVec[i]) { // not required - continue - } - - if m.DataNetworkInterfaceVec[i] != nil { - if err := m.DataNetworkInterfaceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataNetworkInterfaceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataNetworkInterfaceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this array info based on the context it is used -func (m *ArrayInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataNetworkInterfaceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArrayInfo) contextValidateDataNetworkInterfaceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataNetworkInterfaceVec); i++ { - - if m.DataNetworkInterfaceVec[i] != nil { - - if swag.IsZero(m.DataNetworkInterfaceVec[i]) { // not required - return nil - } - - if err := m.DataNetworkInterfaceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataNetworkInterfaceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataNetworkInterfaceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArrayInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArrayInfo) UnmarshalBinary(b []byte) error { - var res ArrayInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/athena_token.go b/v1/models/athena_token.go deleted file mode 100644 index 0fe8161a..00000000 --- a/v1/models/athena_token.go +++ /dev/null @@ -1,56 +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" -) - -// AthenaToken Athena Token. -// -// Specifies an Athena Token that provides permissions for an Athena -// trusted user to access the Cohesity REST APIs. -// -// swagger:model AthenaToken -type AthenaToken struct { - - // Generated access token. - Token *string `json:"token,omitempty"` - - // Token type. - TokenType *string `json:"tokenType,omitempty"` -} - -// Validate validates this athena token -func (m *AthenaToken) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this athena token based on context it is used -func (m *AthenaToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AthenaToken) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AthenaToken) UnmarshalBinary(b []byte) error { - var res AthenaToken - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/athena_token_parameters.go b/v1/models/athena_token_parameters.go deleted file mode 100644 index ed139f4e..00000000 --- a/v1/models/athena_token_parameters.go +++ /dev/null @@ -1,166 +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" -) - -// AthenaTokenParameters Athena Token Parameters. -// -// Specifies the user information and the secret required for generating an -// access token for Athena. Athena gets this access token on behalf of a -// Cluster user who is trusted by Athena. -// -// swagger:model AthenaTokenParameters -type AthenaTokenParameters struct { - - // Specifies information about the App. It is used when audit logs are - // generated. - // Required: true - AppInfo *AppInfo `json:"appInfo"` - - // Specifies the domain the user is logging in to. For a Local user model, - // the domain is always LOCAL. For LDAP/AD user models, the domain will map - // to an LDAP connection string. A user is uniquely identified by a - // combination of username and domain. If this field is not set, - // LOCAL domain is assumed. - Domain *string `json:"domain,omitempty"` - - // Specifies an encrypted phrase. Encryption is done by a shared secret key. - // The key and the phrase are known between iris and athena. It is off the - // format "ProcessName:%s;PID:%d". Athena must set it to "athena_exec" and - // the pid of the process. There is no such process running on that node - // this request will be rejected. - // Required: true - EncryptedPassPhrase *string `json:"encryptedPassPhrase"` - - // Specifies the unique Security ID (SID) of the user. The request must have - // one form of user identification. It could be either the username and the - // domain combination or the sid and the domain combination. - Sid *string `json:"sid,omitempty"` - - // Specifies the Tenant Id of the user. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the login name of the Cohesity user. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this athena token parameters -func (m *AthenaTokenParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptedPassPhrase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AthenaTokenParameters) validateAppInfo(formats strfmt.Registry) error { - - if err := validate.Required("appInfo", "body", m.AppInfo); err != nil { - return err - } - - if m.AppInfo != nil { - if err := m.AppInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appInfo") - } - return err - } - } - - return nil -} - -func (m *AthenaTokenParameters) validateEncryptedPassPhrase(formats strfmt.Registry) error { - - if err := validate.Required("encryptedPassPhrase", "body", m.EncryptedPassPhrase); err != nil { - return err - } - - return nil -} - -func (m *AthenaTokenParameters) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this athena token parameters based on the context it is used -func (m *AthenaTokenParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AthenaTokenParameters) contextValidateAppInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AppInfo != nil { - - if err := m.AppInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AthenaTokenParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AthenaTokenParameters) UnmarshalBinary(b []byte) error { - var res AthenaTokenParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/attachment.go b/v1/models/attachment.go deleted file mode 100644 index 143fb7c1..00000000 --- a/v1/models/attachment.go +++ /dev/null @@ -1,65 +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" -) - -// Attachment Message encapsulating the details of an attachment. -// -// swagger:model Attachment -type Attachment struct { - - // Content type of the attachment. - ContentType *string `json:"contentType,omitempty"` - - // Id of the attachment. - ID *string `json:"id,omitempty"` - - // Is the attachment inline? - Inline *bool `json:"inline,omitempty"` - - // Name of the attachment. - Name *string `json:"name,omitempty"` - - // Size of the attachment in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Type of attachment. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this attachment -func (m *Attachment) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this attachment based on context it is used -func (m *Attachment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Attachment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Attachment) UnmarshalBinary(b []byte) error { - var res Attachment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/attribute_filter_params.go b/v1/models/attribute_filter_params.go deleted file mode 100644 index 6aa60f9a..00000000 --- a/v1/models/attribute_filter_params.go +++ /dev/null @@ -1,70 +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" -) - -// AttributeFilterParams Attribute Filter Params. -// -// Specifies the filter parameters which can be used to provide exclusions OR -// inclusions of entities based on attributes within entity proto within -// backup jobs. -// Currently this is only used by O365 adapter but can be used by others as -// well to introduce attribute based filtering by adding corresponding -// 'AttributeType'. -// -// eg: For providing a matching criteria on all kUser entities belonging to -// the department - 'Engineering', following should be the message: -// -// { -// attr_key: kDepartment -// attr_value_vec: 'Engineering' -// } -// -// swagger:model AttributeFilterParams -type AttributeFilterParams struct { - - // Specifies the attribute key whose values are to be matched for entity - // inclusions/exclusions. - AttrKey *int32 `json:"attrKey,omitempty"` - - // Specifies the list of attribute values against which entity attribute - // values are to be matched against. - AttrValueVec []string `json:"attrValueVec"` -} - -// Validate validates this attribute filter params -func (m *AttributeFilterParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this attribute filter params based on context it is used -func (m *AttributeFilterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AttributeFilterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AttributeFilterParams) UnmarshalBinary(b []byte) error { - var res AttributeFilterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/attribute_filter_policy.go b/v1/models/attribute_filter_policy.go deleted file mode 100644 index 80367dfc..00000000 --- a/v1/models/attribute_filter_policy.go +++ /dev/null @@ -1,206 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AttributeFilterPolicy Attribute Filter Policy. -// -// Specifies the filter policy which can be applied on the entities being -// backed up within a job. The filter policy supports both inclusions & -// exclusions. In scenarios where, there is an overlap between inclusions -// and exclusions, it the adapter's responsibility to choose the precedence. -// -// Currently this is only used by O365 within Mailbox & OneDrive backup params. -// Precedence is given to inclusion. -// -// Eg: To create an inclusion filter within a job for autoprotection on -// department as 'Engineering' & display_name starting with [A, B, C], below -// is the param: -// -// inclusion_attr_params: { -// attr_key: kDepartment -// attr_value_vec: "Engineering" -// } -// inclusion_attr_params: { -// attr_key: kDisplayNamePrefixAlphabet -// attr_value_vec: "A" -// attr_value_vec: "B" -// attr_value_vec: "C" -// } -// -// swagger:model AttributeFilterPolicy -type AttributeFilterPolicy struct { - - // Specifies the exclusion attributes. - ExclusionAttrParams []*AttributeFilterParams `json:"exclusionAttrParams"` - - // Specifies the inclusion attributes. - InclusionAttrParams []*AttributeFilterParams `json:"inclusionAttrParams"` -} - -// Validate validates this attribute filter policy -func (m *AttributeFilterPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExclusionAttrParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInclusionAttrParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AttributeFilterPolicy) validateExclusionAttrParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExclusionAttrParams) { // not required - return nil - } - - for i := 0; i < len(m.ExclusionAttrParams); i++ { - if swag.IsZero(m.ExclusionAttrParams[i]) { // not required - continue - } - - if m.ExclusionAttrParams[i] != nil { - if err := m.ExclusionAttrParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionAttrParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionAttrParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AttributeFilterPolicy) validateInclusionAttrParams(formats strfmt.Registry) error { - if swag.IsZero(m.InclusionAttrParams) { // not required - return nil - } - - for i := 0; i < len(m.InclusionAttrParams); i++ { - if swag.IsZero(m.InclusionAttrParams[i]) { // not required - continue - } - - if m.InclusionAttrParams[i] != nil { - if err := m.InclusionAttrParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionAttrParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionAttrParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this attribute filter policy based on the context it is used -func (m *AttributeFilterPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExclusionAttrParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInclusionAttrParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AttributeFilterPolicy) contextValidateExclusionAttrParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExclusionAttrParams); i++ { - - if m.ExclusionAttrParams[i] != nil { - - if swag.IsZero(m.ExclusionAttrParams[i]) { // not required - return nil - } - - if err := m.ExclusionAttrParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionAttrParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionAttrParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AttributeFilterPolicy) contextValidateInclusionAttrParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InclusionAttrParams); i++ { - - if m.InclusionAttrParams[i] != nil { - - if swag.IsZero(m.InclusionAttrParams[i]) { // not required - return nil - } - - if err := m.InclusionAttrParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionAttrParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionAttrParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AttributeFilterPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AttributeFilterPolicy) UnmarshalBinary(b []byte) error { - var res AttributeFilterPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/attribute_restore_information.go b/v1/models/attribute_restore_information.go deleted file mode 100644 index dfacc695..00000000 --- a/v1/models/attribute_restore_information.go +++ /dev/null @@ -1,55 +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" -) - -// AttributeRestoreInformation Attribute Restore Information. -// -// Represents the details about the restore of the AD attribute. -// -// swagger:model AttributeRestoreInformation -type AttributeRestoreInformation struct { - - // Specifes the error messages corresponding to restore of the attribute. - ErrorMessage []string `json:"errorMessage"` - - // Specifies the name of the attribute of the AD object. - Name *string `json:"name,omitempty"` -} - -// Validate validates this attribute restore information -func (m *AttributeRestoreInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this attribute restore information based on context it is used -func (m *AttributeRestoreInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AttributeRestoreInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AttributeRestoreInformation) UnmarshalBinary(b []byte) error { - var res AttributeRestoreInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/attribute_value.go b/v1/models/attribute_value.go deleted file mode 100644 index 970f1a23..00000000 --- a/v1/models/attribute_value.go +++ /dev/null @@ -1,110 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AttributeValue AttributeValue -// -// Represents the information about the values of attribute of the ADObject. -// -// swagger:model AttributeValue -type AttributeValue struct { - - // Specifies the flags related to the attribute values of the AD object. - // 'kError' indicates error in conversion of AD Object value to string. - // The value in the AdAttributValue contains the error message. - // 'kTruncated' indicates the multi valued attribute is truncated when value - // exceeded 'truncate_multivalues' value specified in the request. - // 'kCSV' indicates content in 'values' is a comma separated value (CSV) format - // of a complex object. - Flags []string `json:"flags"` - - // Specifies list of values for the attribute. - Values []string `json:"values"` -} - -// Validate validates this attribute value -func (m *AttributeValue) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFlags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var attributeValueFlagsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kTruncated","kCSV"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - attributeValueFlagsItemsEnum = append(attributeValueFlagsItemsEnum, v) - } -} - -func (m *AttributeValue) validateFlagsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, attributeValueFlagsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *AttributeValue) validateFlags(formats strfmt.Registry) error { - if swag.IsZero(m.Flags) { // not required - return nil - } - - for i := 0; i < len(m.Flags); i++ { - - // value enum - if err := m.validateFlagsItemsEnum("flags"+"."+strconv.Itoa(i), "body", m.Flags[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this attribute value based on context it is used -func (m *AttributeValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AttributeValue) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AttributeValue) UnmarshalBinary(b []byte) error { - var res AttributeValue - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/audit_log_settings.go b/v1/models/audit_log_settings.go deleted file mode 100644 index 057c0c69..00000000 --- a/v1/models/audit_log_settings.go +++ /dev/null @@ -1,52 +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" -) - -// AuditLogSettings AuditLogSettings specifies struct with audt log configuration. Make these -// settings in such a way that zero values are cluster default when bb is not -// present. -// -// swagger:model AuditLogSettings -type AuditLogSettings struct { - - // ReadLogging specifies whether read logs needs to be captured. - ReadLogging *bool `json:"readLogging,omitempty"` -} - -// Validate validates this audit log settings -func (m *AuditLogSettings) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this audit log settings based on context it is used -func (m *AuditLogSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogSettings) UnmarshalBinary(b []byte) error { - var res AuditLogSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/audit_logs_tile.go b/v1/models/audit_logs_tile.go deleted file mode 100644 index ee46cbf7..00000000 --- a/v1/models/audit_logs_tile.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AuditLogsTile Audit Logs Tile. -// -// Audit logs for Dashboard. -// -// swagger:model AuditLogsTile -type AuditLogsTile struct { - - // Array of Cluster Audit Logs. - // - // Specifies a list of Cluster audit logs that match the specified - // filter criteria up to the limit specified in pageCount. - ClusterAuditLogs []*ClusterAuditLog `json:"clusterAuditLogs"` - - // Specifies the total number of logs that match the specified - // filter criteria. (This number might be larger than the size of the - // Cluster Audit Logs array.) - // This count is provided to indicate if additional requests must be - // made to get the full result. - TotalCount *int64 `json:"totalCount,omitempty"` -} - -// Validate validates this audit logs tile -func (m *AuditLogsTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterAuditLogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuditLogsTile) validateClusterAuditLogs(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterAuditLogs) { // not required - return nil - } - - for i := 0; i < len(m.ClusterAuditLogs); i++ { - if swag.IsZero(m.ClusterAuditLogs[i]) { // not required - continue - } - - if m.ClusterAuditLogs[i] != nil { - if err := m.ClusterAuditLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this audit logs tile based on the context it is used -func (m *AuditLogsTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterAuditLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuditLogsTile) contextValidateClusterAuditLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterAuditLogs); i++ { - - if m.ClusterAuditLogs[i] != nil { - - if swag.IsZero(m.ClusterAuditLogs[i]) { // not required - return nil - } - - if err := m.ClusterAuditLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogsTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogsTile) UnmarshalBinary(b []byte) error { - var res AuditLogsTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aurora_cluster_info.go b/v1/models/aurora_cluster_info.go deleted file mode 100644 index 35f0ff31..00000000 --- a/v1/models/aurora_cluster_info.go +++ /dev/null @@ -1,69 +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" -) - -// AuroraClusterInfo Message that contains the information of the Aurora database cluster. -// -// swagger:model AuroraClusterInfo -type AuroraClusterInfo struct { - - // Aws region of the Aurora DB cluster and S3 bucket. - AwsRegion *string `json:"awsRegion,omitempty"` - - // Contains the database port of the Aurora cluster. - DatabasePort *string `json:"databasePort,omitempty"` - - // Contains the postgres db user IAM role Arn. - DbAccessIamRoleArn *string `json:"dbAccessIamRoleArn,omitempty"` - - // Database user for managing the databases on the Aurora cluster. - // This user will have exclusive access on all the databases created for the - // protection group and recovery for a particular tenant. - DbUserName *string `json:"dbUserName,omitempty"` - - // Contains the host name of the Aurora cluster. This is the writer - // end point of the Aurora cluster. - HostName *string `json:"hostName,omitempty"` - - // Contains the kms encryption key used for encryption of data on the - // Aurora cluster. - KmsKeyArn *string `json:"kmsKeyArn,omitempty"` -} - -// Validate validates this aurora cluster info -func (m *AuroraClusterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aurora cluster info based on context it is used -func (m *AuroraClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuroraClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuroraClusterInfo) UnmarshalBinary(b []byte) error { - var res AuroraClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_credentials.go b/v1/models/aws_credentials.go deleted file mode 100644 index 5585adbb..00000000 --- a/v1/models/aws_credentials.go +++ /dev/null @@ -1,373 +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" -) - -// AwsCredentials AWS source Credentials. -// -// Specifies the credentials to authenticate with AWS Cloud Platform. -// -// swagger:model AwsCredentials -type AwsCredentials struct { - - // Specifies Access key of the AWS account. - AccessKey *string `json:"accessKey,omitempty"` - - // Specifies Amazon Resource Name (owner ID) of the IAM user, act as an - // unique identifier of as AWS entity. - AmazonResourceName *string `json:"amazonResourceName,omitempty"` - - // Specifies the authentication method to be used for API calls. - // Specifies the authentication method to be used for API calls. - // 'kUseIAMUser' indicates a user based authentication. - // 'kUseIAMRole' indicates a role based authentication, used only for AWS CE. - // 'kUseHelios' indicates a Helios based authentication. - // Enum: ["kUseIAMUser","kUseIAMRole","kUseHelios"] - AuthMethod *string `json:"authMethod,omitempty"` - - // Specifies the entity type such as 'kIAMUser' if the environment is kAWS. - // Specifies the type of an AWS source entity. - // 'kIAMUser' indicates a unique user within an AWS account. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kEC2Instance' indicates a Virtual Machine running in AWS environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within AWS. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kKeyPair' represents a pair of public and private key used to login into a Virtual Machine. - // 'kTag' represents a tag attached to EC2 instance. - // 'kRDSOptionGroup' represents a RDS option group for configuring database features. - // 'kRDSParameterGroup' represents a RDS parameter group. - // 'kRDSInstance' represents a RDS DB instance. - // 'kRDSSubnet' represents a RDS subnet. - // 'kRDSTag' represents a tag attached to RDS instance. - // 'kAuroraTag' represents a tag attached to an Aurora cluster. - // 'kAccount' represents an AWS account. - // 'kAuroraCluster' represents an Aurora cluster. - // 'kSubTaskPermit' entity type will be used by slave sub-tasks to take permit for native backups, - // so that we can control the number of concurrent sub-tasks independent of the number of VMs being backed up concurrently. - // This does not represent any entity type in AWS entity hierarchy. - // 'kS3Bucket' represents an S3 bucket. - // 'kS3Tag' represents an S3 tag attached to S3 Bucket. - // 'kKmsKey' represents a KMS key. - // Enum: ["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"] - AwsType *string `json:"awsType,omitempty"` - - // Specifies the C2S Access Portal (CAP) server info. - C2sServerInfo *C2SServerInfo `json:"c2sServerInfo,omitempty"` - - // Specifies the IAM role which will be used to access the security - // credentials required for API calls. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // Specifies Secret Access key of the AWS account. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specifies the subscription type of AWS such as 'kAWSCommercial' or - // 'kAWSGovCloud'. - // Specifies the subscription type of an AWS source entity. - // 'kAWSCommercial' indicates a standard AWS subscription. - // 'kAWSGovCloud' indicates a govt AWS subscription. - // Enum: ["kAWSCommercial","kAWSGovCloud"] - SubscriptionType *string `json:"subscriptionType,omitempty"` -} - -// Validate validates this aws credentials -func (m *AwsCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateC2sServerInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsCredentialsTypeAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsCredentialsTypeAuthMethodPropEnum = append(awsCredentialsTypeAuthMethodPropEnum, v) - } -} - -const ( - - // AwsCredentialsAuthMethodKUseIAMUser captures enum value "kUseIAMUser" - AwsCredentialsAuthMethodKUseIAMUser string = "kUseIAMUser" - - // AwsCredentialsAuthMethodKUseIAMRole captures enum value "kUseIAMRole" - AwsCredentialsAuthMethodKUseIAMRole string = "kUseIAMRole" - - // AwsCredentialsAuthMethodKUseHelios captures enum value "kUseHelios" - AwsCredentialsAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AwsCredentials) validateAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsCredentialsTypeAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsCredentials) validateAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateAuthMethodEnum("authMethod", "body", *m.AuthMethod); err != nil { - return err - } - - return nil -} - -var awsCredentialsTypeAwsTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsCredentialsTypeAwsTypePropEnum = append(awsCredentialsTypeAwsTypePropEnum, v) - } -} - -const ( - - // AwsCredentialsAwsTypeKIAMUser captures enum value "kIAMUser" - AwsCredentialsAwsTypeKIAMUser string = "kIAMUser" - - // AwsCredentialsAwsTypeKRegion captures enum value "kRegion" - AwsCredentialsAwsTypeKRegion string = "kRegion" - - // AwsCredentialsAwsTypeKAvailabilityZone captures enum value "kAvailabilityZone" - AwsCredentialsAwsTypeKAvailabilityZone string = "kAvailabilityZone" - - // AwsCredentialsAwsTypeKEC2Instance captures enum value "kEC2Instance" - AwsCredentialsAwsTypeKEC2Instance string = "kEC2Instance" - - // AwsCredentialsAwsTypeKVPC captures enum value "kVPC" - AwsCredentialsAwsTypeKVPC string = "kVPC" - - // AwsCredentialsAwsTypeKSubnet captures enum value "kSubnet" - AwsCredentialsAwsTypeKSubnet string = "kSubnet" - - // AwsCredentialsAwsTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AwsCredentialsAwsTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AwsCredentialsAwsTypeKInstanceType captures enum value "kInstanceType" - AwsCredentialsAwsTypeKInstanceType string = "kInstanceType" - - // AwsCredentialsAwsTypeKKeyPair captures enum value "kKeyPair" - AwsCredentialsAwsTypeKKeyPair string = "kKeyPair" - - // AwsCredentialsAwsTypeKTag captures enum value "kTag" - AwsCredentialsAwsTypeKTag string = "kTag" - - // AwsCredentialsAwsTypeKRDSOptionGroup captures enum value "kRDSOptionGroup" - AwsCredentialsAwsTypeKRDSOptionGroup string = "kRDSOptionGroup" - - // AwsCredentialsAwsTypeKRDSParameterGroup captures enum value "kRDSParameterGroup" - AwsCredentialsAwsTypeKRDSParameterGroup string = "kRDSParameterGroup" - - // AwsCredentialsAwsTypeKRDSInstance captures enum value "kRDSInstance" - AwsCredentialsAwsTypeKRDSInstance string = "kRDSInstance" - - // AwsCredentialsAwsTypeKRDSSubnet captures enum value "kRDSSubnet" - AwsCredentialsAwsTypeKRDSSubnet string = "kRDSSubnet" - - // AwsCredentialsAwsTypeKRDSTag captures enum value "kRDSTag" - AwsCredentialsAwsTypeKRDSTag string = "kRDSTag" - - // AwsCredentialsAwsTypeKAuroraTag captures enum value "kAuroraTag" - AwsCredentialsAwsTypeKAuroraTag string = "kAuroraTag" - - // AwsCredentialsAwsTypeKAccount captures enum value "kAccount" - AwsCredentialsAwsTypeKAccount string = "kAccount" - - // AwsCredentialsAwsTypeKAuroraCluster captures enum value "kAuroraCluster" - AwsCredentialsAwsTypeKAuroraCluster string = "kAuroraCluster" - - // AwsCredentialsAwsTypeKSubTaskPermit captures enum value "kSubTaskPermit" - AwsCredentialsAwsTypeKSubTaskPermit string = "kSubTaskPermit" - - // AwsCredentialsAwsTypeKS3Bucket captures enum value "kS3Bucket" - AwsCredentialsAwsTypeKS3Bucket string = "kS3Bucket" - - // AwsCredentialsAwsTypeKS3Tag captures enum value "kS3Tag" - AwsCredentialsAwsTypeKS3Tag string = "kS3Tag" - - // AwsCredentialsAwsTypeKKmsKey captures enum value "kKmsKey" - AwsCredentialsAwsTypeKKmsKey string = "kKmsKey" -) - -// prop value enum -func (m *AwsCredentials) validateAwsTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsCredentialsTypeAwsTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsCredentials) validateAwsType(formats strfmt.Registry) error { - if swag.IsZero(m.AwsType) { // not required - return nil - } - - // value enum - if err := m.validateAwsTypeEnum("awsType", "body", *m.AwsType); err != nil { - return err - } - - return nil -} - -func (m *AwsCredentials) validateC2sServerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.C2sServerInfo) { // not required - return nil - } - - if m.C2sServerInfo != nil { - if err := m.C2sServerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sServerInfo") - } - return err - } - } - - return nil -} - -var awsCredentialsTypeSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSCommercial","kAWSGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsCredentialsTypeSubscriptionTypePropEnum = append(awsCredentialsTypeSubscriptionTypePropEnum, v) - } -} - -const ( - - // AwsCredentialsSubscriptionTypeKAWSCommercial captures enum value "kAWSCommercial" - AwsCredentialsSubscriptionTypeKAWSCommercial string = "kAWSCommercial" - - // AwsCredentialsSubscriptionTypeKAWSGovCloud captures enum value "kAWSGovCloud" - AwsCredentialsSubscriptionTypeKAWSGovCloud string = "kAWSGovCloud" -) - -// prop value enum -func (m *AwsCredentials) validateSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsCredentialsTypeSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsCredentials) validateSubscriptionType(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionType) { // not required - return nil - } - - // value enum - if err := m.validateSubscriptionTypeEnum("subscriptionType", "body", *m.SubscriptionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws credentials based on the context it is used -func (m *AwsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateC2sServerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCredentials) contextValidateC2sServerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.C2sServerInfo != nil { - - if swag.IsZero(m.C2sServerInfo) { // not required - return nil - } - - if err := m.C2sServerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sServerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCredentials) UnmarshalBinary(b []byte) error { - var res AwsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_entity.go b/v1/models/aws_entity.go deleted file mode 100644 index bc073b51..00000000 --- a/v1/models/aws_entity.go +++ /dev/null @@ -1,55 +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" -) - -// AwsEntity Message to capture details about entities used for RDS Postgres workflows on -// DMaaS. -// -// swagger:model AwsEntity -type AwsEntity struct { - - // Contains the name of the entity. - DisplayName *string `json:"displayName,omitempty"` - - // The id generated by magneto for the given entity. This is unique - // across one cluster. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this aws entity -func (m *AwsEntity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws entity based on context it is used -func (m *AwsEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsEntity) UnmarshalBinary(b []byte) error { - var res AwsEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_fleet_public_params.go b/v1/models/aws_fleet_public_params.go deleted file mode 100644 index 51d7c522..00000000 --- a/v1/models/aws_fleet_public_params.go +++ /dev/null @@ -1,245 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsFleetPublicParams AWS Fleet Parameters. -// -// Specifies various resources when deploying a VM to Fleet instances. -// -// swagger:model AwsFleetPublicParams -type AwsFleetPublicParams struct { - - // Specifies the subnet type of the fleet. - // Specifies the type of the fleet subnet. - // 'kCluster' implies same subnet as of Cluster, valid only for Cloud Edition - // cluster. - // 'kSourceVM' implies same subnet as of source vm. - // 'kCustom' implies the custome subnet. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetType *string `json:"fleetSubnetType,omitempty"` - - // Specifies the tag information for the fleet. - FleetTags []*FleetTag `json:"fleetTags"` - - // Specifies the list of network params for the fleet. - NetworkParamsList []*FleetNetworkParams `json:"networkParamsList"` -} - -// Validate validates this aws fleet public params -func (m *AwsFleetPublicParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetSubnetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParamsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsFleetPublicParamsTypeFleetSubnetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsFleetPublicParamsTypeFleetSubnetTypePropEnum = append(awsFleetPublicParamsTypeFleetSubnetTypePropEnum, v) - } -} - -const ( - - // AwsFleetPublicParamsFleetSubnetTypeKCluster captures enum value "kCluster" - AwsFleetPublicParamsFleetSubnetTypeKCluster string = "kCluster" - - // AwsFleetPublicParamsFleetSubnetTypeKSourceVM captures enum value "kSourceVM" - AwsFleetPublicParamsFleetSubnetTypeKSourceVM string = "kSourceVM" - - // AwsFleetPublicParamsFleetSubnetTypeKCustom captures enum value "kCustom" - AwsFleetPublicParamsFleetSubnetTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *AwsFleetPublicParams) validateFleetSubnetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsFleetPublicParamsTypeFleetSubnetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsFleetPublicParams) validateFleetSubnetType(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetType) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetTypeEnum("fleetSubnetType", "body", *m.FleetSubnetType); err != nil { - return err - } - - return nil -} - -func (m *AwsFleetPublicParams) validateFleetTags(formats strfmt.Registry) error { - if swag.IsZero(m.FleetTags) { // not required - return nil - } - - for i := 0; i < len(m.FleetTags); i++ { - if swag.IsZero(m.FleetTags[i]) { // not required - continue - } - - if m.FleetTags[i] != nil { - if err := m.FleetTags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsFleetPublicParams) validateNetworkParamsList(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParamsList) { // not required - return nil - } - - for i := 0; i < len(m.NetworkParamsList); i++ { - if swag.IsZero(m.NetworkParamsList[i]) { // not required - continue - } - - if m.NetworkParamsList[i] != nil { - if err := m.NetworkParamsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws fleet public params based on the context it is used -func (m *AwsFleetPublicParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFleetTags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParamsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsFleetPublicParams) contextValidateFleetTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FleetTags); i++ { - - if m.FleetTags[i] != nil { - - if swag.IsZero(m.FleetTags[i]) { // not required - return nil - } - - if err := m.FleetTags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsFleetPublicParams) contextValidateNetworkParamsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkParamsList); i++ { - - if m.NetworkParamsList[i] != nil { - - if swag.IsZero(m.NetworkParamsList[i]) { // not required - return nil - } - - if err := m.NetworkParamsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsFleetPublicParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsFleetPublicParams) UnmarshalBinary(b []byte) error { - var res AwsFleetPublicParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_kms_configuration.go b/v1/models/aws_kms_configuration.go deleted file mode 100644 index 6e9bee11..00000000 --- a/v1/models/aws_kms_configuration.go +++ /dev/null @@ -1,148 +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" -) - -// AwsKmsConfiguration AwsKmsConfiguration to define AWS KMS config. -// -// swagger:model AwsKmsConfiguration -type AwsKmsConfiguration struct { - - // Access key id needed to access the cloud account. - // When update cluster config, should encrypte accessKeyId with cluster ID. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // Specifies the authentication method to be used for API calls. - // Specifies the authentication method to be used for API calls. - // 'kUseIAMUser' indicates a user based authentication. - // 'kUseIAMRole' indicates a role based authentication, used only for AWS CE. - // 'kUseHelios' indicates a Helios based authentication. - // Enum: ["kUseIAMUser","kUseIAMRole","kUseHelios"] - AuthMethod *string `json:"authMethod,omitempty"` - - // Specify the ca certificate path. - CaCertificate *string `json:"caCertificate,omitempty"` - - // The string alias of the CMK. - CmkAlias *string `json:"cmkAlias,omitempty"` - - // The Amazon Resource Number of AWS Customer Managed Key. - CmkArn *string `json:"cmkArn,omitempty"` - - // AWS keyId, and alias. - // Only need one of them to connect AWS. - // Alias is better, because keyId maybe rotated by AWS. - // The unique key id of the CMK. - CmkKeyID *string `json:"cmkKeyId,omitempty"` - - // Specifies the IAM role which will be used to access the security - // credentials required for API calls. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // AWS region, e.g. us-east-1, us-west-2, for the AWS Glacier service to - // be used to authenticate resources within this region by the configured - // AWS account. - Region *string `json:"region,omitempty"` - - // Secret access key needed to access the cloud account. This is - // encrypted with the cluster id. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specify whether to verify SSL when connect with AWS KMS. - // Default is true. - VerifySSL *bool `json:"verifySSL,omitempty"` -} - -// Validate validates this aws kms configuration -func (m *AwsKmsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsKmsConfigurationTypeAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsKmsConfigurationTypeAuthMethodPropEnum = append(awsKmsConfigurationTypeAuthMethodPropEnum, v) - } -} - -const ( - - // AwsKmsConfigurationAuthMethodKUseIAMUser captures enum value "kUseIAMUser" - AwsKmsConfigurationAuthMethodKUseIAMUser string = "kUseIAMUser" - - // AwsKmsConfigurationAuthMethodKUseIAMRole captures enum value "kUseIAMRole" - AwsKmsConfigurationAuthMethodKUseIAMRole string = "kUseIAMRole" - - // AwsKmsConfigurationAuthMethodKUseHelios captures enum value "kUseHelios" - AwsKmsConfigurationAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AwsKmsConfiguration) validateAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsKmsConfigurationTypeAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsKmsConfiguration) validateAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateAuthMethodEnum("authMethod", "body", *m.AuthMethod); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws kms configuration based on context it is used -func (m *AwsKmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsKmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsKmsConfiguration) UnmarshalBinary(b []byte) error { - var res AwsKmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_kms_update_params.go b/v1/models/aws_kms_update_params.go deleted file mode 100644 index 0cc8719d..00000000 --- a/v1/models/aws_kms_update_params.go +++ /dev/null @@ -1,66 +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" -) - -// AwsKmsUpdateParams AwsKmsUpdateParams to define AWS KMS config. -// -// swagger:model AwsKmsUpdateParams -type AwsKmsUpdateParams struct { - - // Access key id needed to access the cloud account. - // When update cluster config, should encrypte accessKeyId with cluster ID. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // Specify the ca certificate path. - CaCertificatePath *string `json:"caCertificatePath,omitempty"` - - // Specifies the IAM role which will be used to access the security - // credentials required for API calls. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // Secret access key needed to access the cloud account. This is - // encrypted with the cluster id. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specify whether to verify SSL when connect with AWS KMS. - // Default is true. - VerifySSL *bool `json:"verifySSL,omitempty"` -} - -// Validate validates this aws kms update params -func (m *AwsKmsUpdateParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws kms update params based on context it is used -func (m *AwsKmsUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsKmsUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsKmsUpdateParams) UnmarshalBinary(b []byte) error { - var res AwsKmsUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_params.go b/v1/models/aws_params.go deleted file mode 100644 index d0a60b10..00000000 --- a/v1/models/aws_params.go +++ /dev/null @@ -1,190 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsParams AWS Parameters. -// -// Specifies various resources when converting and deploying a VM to AWS. -// -// swagger:model AwsParams -type AwsParams struct { - - // Specifies the list of Custom Tag Parameters to be applied to resources - // created in AWS Cloudspin. - CustomTagList []*CustomTagParams `json:"customTagList"` - - // Specifies id of the AWS instance type in which to deploy the VM. - InstanceID *int64 `json:"instanceId,omitempty"` - - // Specifies ids of the network security groups within above VPC. - NetworkSecurityGroupIds []int64 `json:"networkSecurityGroupIds"` - - // Specifies Amazon RDS parameters. - RdsParams *RdsParams `json:"rdsParams,omitempty"` - - // Specifies id of the AWS region in which to deploy the VM. - Region *int64 `json:"region,omitempty"` - - // Specifies id of the subnet within above VPC. - SubnetID *int64 `json:"subnetId,omitempty"` - - // Specifies id of the Virtual Private Cloud to chose for the instance type. - VirtualPrivateCloudID *int64 `json:"virtualPrivateCloudId,omitempty"` -} - -// Validate validates this aws params -func (m *AwsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCustomTagList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsParams) validateCustomTagList(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTagList) { // not required - return nil - } - - for i := 0; i < len(m.CustomTagList); i++ { - if swag.IsZero(m.CustomTagList[i]) { // not required - continue - } - - if m.CustomTagList[i] != nil { - if err := m.CustomTagList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsParams) validateRdsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RdsParams) { // not required - return nil - } - - if m.RdsParams != nil { - if err := m.RdsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws params based on the context it is used -func (m *AwsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomTagList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsParams) contextValidateCustomTagList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTagList); i++ { - - if m.CustomTagList[i] != nil { - - if swag.IsZero(m.CustomTagList[i]) { // not required - return nil - } - - if err := m.CustomTagList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsParams) contextValidateRdsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsParams != nil { - - if swag.IsZero(m.RdsParams) { // not required - return nil - } - - if err := m.RdsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsParams) UnmarshalBinary(b []byte) error { - var res AwsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_protection_source.go b/v1/models/aws_protection_source.go deleted file mode 100644 index 41b95e70..00000000 --- a/v1/models/aws_protection_source.go +++ /dev/null @@ -1,962 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsProtectionSource AWS Protection Source. -// -// Specifies a Protection Source in AWS environment. -// -// swagger:model AwsProtectionSource -type AwsProtectionSource struct { - - // Specifies Access key of the AWS account. - AccessKey *string `json:"accessKey,omitempty"` - - // Specifies Amazon Resource Name (owner ID) of the IAM user, act as an - // unique identifier of as AWS entity. - AmazonResourceName *string `json:"amazonResourceName,omitempty"` - - // Specifies the authentication method to be used for API calls. - // Specifies the authentication method to be used for API calls. - // 'kUseIAMUser' indicates a user based authentication. - // 'kUseIAMRole' indicates a role based authentication, used only for AWS CE. - // 'kUseHelios' indicates a Helios based authentication. - // Enum: ["kUseIAMUser","kUseIAMRole","kUseHelios"] - AuthMethod *string `json:"authMethod,omitempty"` - - // Specifies information related to AWS fleets launched for various purposes. - // This will only be set for kIAMUser entity. - AwsFleetParams *AwsFleetPublicParams `json:"awsFleetParams,omitempty"` - - // Specifies the entity type such as 'kIAMUser' if the environment is kAWS. - // Specifies the type of an AWS source entity. - // 'kIAMUser' indicates a unique user within an AWS account. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kEC2Instance' indicates a Virtual Machine running in AWS environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within AWS. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kKeyPair' represents a pair of public and private key used to login into a Virtual Machine. - // 'kTag' represents a tag attached to EC2 instance. - // 'kRDSOptionGroup' represents a RDS option group for configuring database features. - // 'kRDSParameterGroup' represents a RDS parameter group. - // 'kRDSInstance' represents a RDS DB instance. - // 'kRDSSubnet' represents a RDS subnet. - // 'kRDSTag' represents a tag attached to RDS instance. - // 'kAuroraTag' represents a tag attached to an Aurora cluster. - // 'kAccount' represents an AWS account. - // 'kAuroraCluster' represents an Aurora cluster. - // 'kSubTaskPermit' entity type will be used by slave sub-tasks to take permit for native backups, - // so that we can control the number of concurrent sub-tasks independent of the number of VMs being backed up concurrently. - // This does not represent any entity type in AWS entity hierarchy. - // 'kS3Bucket' represents an S3 bucket. - // 'kS3Tag' represents an S3 tag attached to S3 Bucket. - // 'kKmsKey' represents a KMS key. - // Enum: ["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"] - AwsType *string `json:"awsType,omitempty"` - - // Specifies the C2S Access Portal (CAP) server info. - C2sServerInfo *C2SServerInfo `json:"c2sServerInfo,omitempty"` - - // Specifies information related to cluster. This is only valid for CE - // clusters. This is only populated for kIAMUser entity. - ClusterNetworkInfo *FleetNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Specifies DB engine version info of the entity. This is populated only - // for RDSInstance, RDSOptionGroup and RDSParameterGroup entity types. - DbEngineID *string `json:"dbEngineId,omitempty"` - - // Specifies the OS type of the Protection Source of type 'kVirtualMachine' - // such as 'kWindows' or 'kLinux'. - // overrideDescription: true - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the IAM role which will be used to access the security - // credentials required for API calls. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // Specifies the IP address of the entity of type 'kVirtualMachine'. - IPAddresses *string `json:"ipAddresses,omitempty"` - - // Specifies the name of the Object set by the Cloud Provider. - // If the provider did not set a name for the object, this field is not set. - Name *string `json:"name,omitempty"` - - // Specifies the owner id of the resource in AWS environment. With type, - // name and ownerId gives a globally unique identity to the AWS entity. - OwnerID *string `json:"ownerId,omitempty"` - - // Specifies the Protection Source id of the registered Physical Host. - // If the cloud entity is protected using a Physical Agent, it must be - // registered as a physical host. - PhysicalSourceID *int64 `json:"physicalSourceId,omitempty"` - - // Specifies the region Id of the entity if the entity is an EC2 instance. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the unique Id of the resource given by the cloud provider. - ResourceID *string `json:"resourceId,omitempty"` - - // Specifies the id of the "convert and deploy" restore task that - // created the entity in the cloud. - // - // It is required to support the DR-to-cloud usecase where we replicate an - // on-prem entity to a cluster running in cloud, bring it up using - // "convert and deploy" mechanism, protect it using a cloud job that uses - // physical adapter, and convert it back to the on-prem format before - // replication. - // - // Before replicating, we need to update the backup task state of the backed - // up entity using the on-prem entity and on-prem entity's parent. - // The id is used to lookup the restore entity that contains details about - // the on-prem entity. - // - // It is set at the time of refreshing the cloud entity hierarchy if all the - // following conditions are met: - // Name of the current entity matches with name of any cloud entity - // deployed using the "convert and deploy" restore task. - // Restore entity associated with the above matched cloud entity has - // 'failed_over' flag set to true in its cloud extension. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Specifies S3 entity specific params. - S3EntityInfo *S3EntityInfo `json:"s3EntityInfo,omitempty"` - - // Specifies Secret Access key of the AWS account. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specifies the subscription type of AWS such as 'kAWSCommercial' or - // 'kAWSGovCloud'. - // Specifies the subscription type of an AWS source entity. - // 'kAWSCommercial' indicates a standard AWS subscription. - // 'kAWSGovCloud' indicates a govt AWS subscription. - // Enum: ["kAWSCommercial","kAWSGovCloud"] - SubscriptionType *string `json:"subscriptionType,omitempty"` - - // Specifies the list of AWS tag attributes. - TagAttributes []*TagAttribute `json:"tagAttributes"` - - // Specifies the type of an AWS Protection Source Object such as - // 'kStorageContainer', 'kVirtualMachine', 'kVirtualNetwork', etc. - // Specifies the type of an AWS source entity. - // 'kIAMUser' indicates a unique user within an AWS account. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kEC2Instance' indicates a Virtual Machine running in AWS environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within AWS. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kKeyPair' represents a pair of public and private key used to login into a Virtual Machine. - // 'kTag' represents a tag attached to EC2 instance. - // 'kRDSOptionGroup' represents a RDS option group for configuring database features. - // 'kRDSParameterGroup' represents a RDS parameter group. - // 'kRDSInstance' represents a RDS DB instance. - // 'kRDSSubnet' represents a RDS subnet. - // 'kRDSTag' represents a tag attached to RDS instance. - // 'kAuroraTag' represents a tag attached to an Aurora cluster. - // 'kAccount' represents an AWS account. - // 'kAuroraCluster' represents an Aurora cluster. - // 'kSubTaskPermit' entity type will be used by slave sub-tasks to take permit for native backups, - // so that we can control the number of concurrent sub-tasks independent of the number of VMs being backed up concurrently. - // This does not represent any entity type in AWS entity hierarchy. - // 'kS3Bucket' represents an S3 bucket. - // 'kS3Tag' represents an S3 tag attached to S3 Bucket. - // 'kKmsKey' represents a KMS key. - // Enum: ["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"] - Type *string `json:"type,omitempty"` - - // Specifies the account id derived from the ARN of the user. - UserAccountID *string `json:"userAccountId,omitempty"` - - // Specifies the Amazon Resource Name (ARN) of the user. - UserResourceName *string `json:"userResourceName,omitempty"` - - // Specified the list of EBS volumes attached to the entity if the entity is - // an EC2 instance. - Volumes []*EbsVolumeInfo `json:"volumes"` -} - -// Validate validates this aws protection source -func (m *AwsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateC2sServerInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3EntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsProtectionSourceTypeAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionSourceTypeAuthMethodPropEnum = append(awsProtectionSourceTypeAuthMethodPropEnum, v) - } -} - -const ( - - // AwsProtectionSourceAuthMethodKUseIAMUser captures enum value "kUseIAMUser" - AwsProtectionSourceAuthMethodKUseIAMUser string = "kUseIAMUser" - - // AwsProtectionSourceAuthMethodKUseIAMRole captures enum value "kUseIAMRole" - AwsProtectionSourceAuthMethodKUseIAMRole string = "kUseIAMRole" - - // AwsProtectionSourceAuthMethodKUseHelios captures enum value "kUseHelios" - AwsProtectionSourceAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AwsProtectionSource) validateAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionSourceTypeAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionSource) validateAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateAuthMethodEnum("authMethod", "body", *m.AuthMethod); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionSource) validateAwsFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if m.AwsFleetParams != nil { - if err := m.AwsFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -var awsProtectionSourceTypeAwsTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionSourceTypeAwsTypePropEnum = append(awsProtectionSourceTypeAwsTypePropEnum, v) - } -} - -const ( - - // AwsProtectionSourceAwsTypeKIAMUser captures enum value "kIAMUser" - AwsProtectionSourceAwsTypeKIAMUser string = "kIAMUser" - - // AwsProtectionSourceAwsTypeKRegion captures enum value "kRegion" - AwsProtectionSourceAwsTypeKRegion string = "kRegion" - - // AwsProtectionSourceAwsTypeKAvailabilityZone captures enum value "kAvailabilityZone" - AwsProtectionSourceAwsTypeKAvailabilityZone string = "kAvailabilityZone" - - // AwsProtectionSourceAwsTypeKEC2Instance captures enum value "kEC2Instance" - AwsProtectionSourceAwsTypeKEC2Instance string = "kEC2Instance" - - // AwsProtectionSourceAwsTypeKVPC captures enum value "kVPC" - AwsProtectionSourceAwsTypeKVPC string = "kVPC" - - // AwsProtectionSourceAwsTypeKSubnet captures enum value "kSubnet" - AwsProtectionSourceAwsTypeKSubnet string = "kSubnet" - - // AwsProtectionSourceAwsTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AwsProtectionSourceAwsTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AwsProtectionSourceAwsTypeKInstanceType captures enum value "kInstanceType" - AwsProtectionSourceAwsTypeKInstanceType string = "kInstanceType" - - // AwsProtectionSourceAwsTypeKKeyPair captures enum value "kKeyPair" - AwsProtectionSourceAwsTypeKKeyPair string = "kKeyPair" - - // AwsProtectionSourceAwsTypeKTag captures enum value "kTag" - AwsProtectionSourceAwsTypeKTag string = "kTag" - - // AwsProtectionSourceAwsTypeKRDSOptionGroup captures enum value "kRDSOptionGroup" - AwsProtectionSourceAwsTypeKRDSOptionGroup string = "kRDSOptionGroup" - - // AwsProtectionSourceAwsTypeKRDSParameterGroup captures enum value "kRDSParameterGroup" - AwsProtectionSourceAwsTypeKRDSParameterGroup string = "kRDSParameterGroup" - - // AwsProtectionSourceAwsTypeKRDSInstance captures enum value "kRDSInstance" - AwsProtectionSourceAwsTypeKRDSInstance string = "kRDSInstance" - - // AwsProtectionSourceAwsTypeKRDSSubnet captures enum value "kRDSSubnet" - AwsProtectionSourceAwsTypeKRDSSubnet string = "kRDSSubnet" - - // AwsProtectionSourceAwsTypeKRDSTag captures enum value "kRDSTag" - AwsProtectionSourceAwsTypeKRDSTag string = "kRDSTag" - - // AwsProtectionSourceAwsTypeKAuroraTag captures enum value "kAuroraTag" - AwsProtectionSourceAwsTypeKAuroraTag string = "kAuroraTag" - - // AwsProtectionSourceAwsTypeKAccount captures enum value "kAccount" - AwsProtectionSourceAwsTypeKAccount string = "kAccount" - - // AwsProtectionSourceAwsTypeKAuroraCluster captures enum value "kAuroraCluster" - AwsProtectionSourceAwsTypeKAuroraCluster string = "kAuroraCluster" - - // AwsProtectionSourceAwsTypeKSubTaskPermit captures enum value "kSubTaskPermit" - AwsProtectionSourceAwsTypeKSubTaskPermit string = "kSubTaskPermit" - - // AwsProtectionSourceAwsTypeKS3Bucket captures enum value "kS3Bucket" - AwsProtectionSourceAwsTypeKS3Bucket string = "kS3Bucket" - - // AwsProtectionSourceAwsTypeKS3Tag captures enum value "kS3Tag" - AwsProtectionSourceAwsTypeKS3Tag string = "kS3Tag" - - // AwsProtectionSourceAwsTypeKKmsKey captures enum value "kKmsKey" - AwsProtectionSourceAwsTypeKKmsKey string = "kKmsKey" -) - -// prop value enum -func (m *AwsProtectionSource) validateAwsTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionSourceTypeAwsTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionSource) validateAwsType(formats strfmt.Registry) error { - if swag.IsZero(m.AwsType) { // not required - return nil - } - - // value enum - if err := m.validateAwsTypeEnum("awsType", "body", *m.AwsType); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionSource) validateC2sServerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.C2sServerInfo) { // not required - return nil - } - - if m.C2sServerInfo != nil { - if err := m.C2sServerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sServerInfo") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionSource) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -var awsProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionSourceTypeHostTypePropEnum = append(awsProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // AwsProtectionSourceHostTypeKLinux captures enum value "kLinux" - AwsProtectionSourceHostTypeKLinux string = "kLinux" - - // AwsProtectionSourceHostTypeKWindows captures enum value "kWindows" - AwsProtectionSourceHostTypeKWindows string = "kWindows" - - // AwsProtectionSourceHostTypeKAix captures enum value "kAix" - AwsProtectionSourceHostTypeKAix string = "kAix" - - // AwsProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - AwsProtectionSourceHostTypeKSolaris string = "kSolaris" - - // AwsProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - AwsProtectionSourceHostTypeKSapHana string = "kSapHana" - - // AwsProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - AwsProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // AwsProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - AwsProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // AwsProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - AwsProtectionSourceHostTypeKMySQL string = "kMySQL" - - // AwsProtectionSourceHostTypeKOther captures enum value "kOther" - AwsProtectionSourceHostTypeKOther string = "kOther" - - // AwsProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - AwsProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // AwsProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - AwsProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // AwsProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - AwsProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // AwsProtectionSourceHostTypeKDB2 captures enum value "kDB2" - AwsProtectionSourceHostTypeKDB2 string = "kDB2" - - // AwsProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - AwsProtectionSourceHostTypeKSapASE string = "kSapASE" - - // AwsProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - AwsProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // AwsProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - AwsProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // AwsProtectionSourceHostTypeKVOS captures enum value "kVOS" - AwsProtectionSourceHostTypeKVOS string = "kVOS" - - // AwsProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - AwsProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *AwsProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionSource) validateS3EntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.S3EntityInfo) { // not required - return nil - } - - if m.S3EntityInfo != nil { - if err := m.S3EntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3EntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3EntityInfo") - } - return err - } - } - - return nil -} - -var awsProtectionSourceTypeSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSCommercial","kAWSGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionSourceTypeSubscriptionTypePropEnum = append(awsProtectionSourceTypeSubscriptionTypePropEnum, v) - } -} - -const ( - - // AwsProtectionSourceSubscriptionTypeKAWSCommercial captures enum value "kAWSCommercial" - AwsProtectionSourceSubscriptionTypeKAWSCommercial string = "kAWSCommercial" - - // AwsProtectionSourceSubscriptionTypeKAWSGovCloud captures enum value "kAWSGovCloud" - AwsProtectionSourceSubscriptionTypeKAWSGovCloud string = "kAWSGovCloud" -) - -// prop value enum -func (m *AwsProtectionSource) validateSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionSourceTypeSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionSource) validateSubscriptionType(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionType) { // not required - return nil - } - - // value enum - if err := m.validateSubscriptionTypeEnum("subscriptionType", "body", *m.SubscriptionType); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionSource) validateTagAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributes) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributes); i++ { - if swag.IsZero(m.TagAttributes[i]) { // not required - continue - } - - if m.TagAttributes[i] != nil { - if err := m.TagAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var awsProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kKeyPair","kTag","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAccount","kAuroraCluster","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionSourceTypeTypePropEnum = append(awsProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // AwsProtectionSourceTypeKIAMUser captures enum value "kIAMUser" - AwsProtectionSourceTypeKIAMUser string = "kIAMUser" - - // AwsProtectionSourceTypeKRegion captures enum value "kRegion" - AwsProtectionSourceTypeKRegion string = "kRegion" - - // AwsProtectionSourceTypeKAvailabilityZone captures enum value "kAvailabilityZone" - AwsProtectionSourceTypeKAvailabilityZone string = "kAvailabilityZone" - - // AwsProtectionSourceTypeKEC2Instance captures enum value "kEC2Instance" - AwsProtectionSourceTypeKEC2Instance string = "kEC2Instance" - - // AwsProtectionSourceTypeKVPC captures enum value "kVPC" - AwsProtectionSourceTypeKVPC string = "kVPC" - - // AwsProtectionSourceTypeKSubnet captures enum value "kSubnet" - AwsProtectionSourceTypeKSubnet string = "kSubnet" - - // AwsProtectionSourceTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AwsProtectionSourceTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AwsProtectionSourceTypeKInstanceType captures enum value "kInstanceType" - AwsProtectionSourceTypeKInstanceType string = "kInstanceType" - - // AwsProtectionSourceTypeKKeyPair captures enum value "kKeyPair" - AwsProtectionSourceTypeKKeyPair string = "kKeyPair" - - // AwsProtectionSourceTypeKTag captures enum value "kTag" - AwsProtectionSourceTypeKTag string = "kTag" - - // AwsProtectionSourceTypeKRDSOptionGroup captures enum value "kRDSOptionGroup" - AwsProtectionSourceTypeKRDSOptionGroup string = "kRDSOptionGroup" - - // AwsProtectionSourceTypeKRDSParameterGroup captures enum value "kRDSParameterGroup" - AwsProtectionSourceTypeKRDSParameterGroup string = "kRDSParameterGroup" - - // AwsProtectionSourceTypeKRDSInstance captures enum value "kRDSInstance" - AwsProtectionSourceTypeKRDSInstance string = "kRDSInstance" - - // AwsProtectionSourceTypeKRDSSubnet captures enum value "kRDSSubnet" - AwsProtectionSourceTypeKRDSSubnet string = "kRDSSubnet" - - // AwsProtectionSourceTypeKRDSTag captures enum value "kRDSTag" - AwsProtectionSourceTypeKRDSTag string = "kRDSTag" - - // AwsProtectionSourceTypeKAuroraTag captures enum value "kAuroraTag" - AwsProtectionSourceTypeKAuroraTag string = "kAuroraTag" - - // AwsProtectionSourceTypeKAccount captures enum value "kAccount" - AwsProtectionSourceTypeKAccount string = "kAccount" - - // AwsProtectionSourceTypeKAuroraCluster captures enum value "kAuroraCluster" - AwsProtectionSourceTypeKAuroraCluster string = "kAuroraCluster" - - // AwsProtectionSourceTypeKSubTaskPermit captures enum value "kSubTaskPermit" - AwsProtectionSourceTypeKSubTaskPermit string = "kSubTaskPermit" - - // AwsProtectionSourceTypeKS3Bucket captures enum value "kS3Bucket" - AwsProtectionSourceTypeKS3Bucket string = "kS3Bucket" - - // AwsProtectionSourceTypeKS3Tag captures enum value "kS3Tag" - AwsProtectionSourceTypeKS3Tag string = "kS3Tag" - - // AwsProtectionSourceTypeKKmsKey captures enum value "kKmsKey" - AwsProtectionSourceTypeKKmsKey string = "kKmsKey" -) - -// prop value enum -func (m *AwsProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionSource) validateVolumes(formats strfmt.Registry) error { - if swag.IsZero(m.Volumes) { // not required - return nil - } - - for i := 0; i < len(m.Volumes); i++ { - if swag.IsZero(m.Volumes[i]) { // not required - continue - } - - if m.Volumes[i] != nil { - if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws protection source based on the context it is used -func (m *AwsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateC2sServerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3EntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsProtectionSource) contextValidateAwsFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetParams != nil { - - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if err := m.AwsFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionSource) contextValidateC2sServerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.C2sServerInfo != nil { - - if swag.IsZero(m.C2sServerInfo) { // not required - return nil - } - - if err := m.C2sServerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sServerInfo") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionSource) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionSource) contextValidateS3EntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.S3EntityInfo != nil { - - if swag.IsZero(m.S3EntityInfo) { // not required - return nil - } - - if err := m.S3EntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3EntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3EntityInfo") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributes); i++ { - - if m.TagAttributes[i] != nil { - - if swag.IsZero(m.TagAttributes[i]) { // not required - return nil - } - - if err := m.TagAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsProtectionSource) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Volumes); i++ { - - if m.Volumes[i] != nil { - - if swag.IsZero(m.Volumes[i]) { // not required - return nil - } - - if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsProtectionSource) UnmarshalBinary(b []byte) error { - var res AwsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_r_d_s_postgres_env_backup_params.go b/v1/models/aws_r_d_s_postgres_env_backup_params.go deleted file mode 100644 index ea0d5e0c..00000000 --- a/v1/models/aws_r_d_s_postgres_env_backup_params.go +++ /dev/null @@ -1,11 +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 - -// AwsRDSPostgresEnvBackupParams Aws RDS Postgres Ingest environment specific parameters. -// -// swagger:model AwsRDSPostgresEnvBackupParams -type AwsRDSPostgresEnvBackupParams interface{} diff --git a/v1/models/aws_snapshot_manager_parameters.go b/v1/models/aws_snapshot_manager_parameters.go deleted file mode 100644 index b4f85658..00000000 --- a/v1/models/aws_snapshot_manager_parameters.go +++ /dev/null @@ -1,63 +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" -) - -// AwsSnapshotManagerParameters AWS SnapshotManager Parameters. -// -// Protection Job parameters applicable to 'kAWSSnapshotManager' Environment -// type. -// Specifies additional job parameters applicable for 'kAWSSnapshotManager' -// Environment type Protection Sources in a Protection Job. -// -// swagger:model AwsSnapshotManagerParameters -type AwsSnapshotManagerParameters struct { - - // Specifies the frequency of AMI creation. This should be set if the option - // to create AMI is set. A value of n creates an AMI from the snapshots after - // every n runs. eg. n = 2 implies every alternate backup run starting from - // the first will create an AMI. - AmiCreationFrequency *int32 `json:"amiCreationFrequency,omitempty"` - - // If true, creates an AMI after taking snapshots of the instance. It should - // be set only while backing up EC2 instances. - // CreateAmi creates AMI for the protection job. - CreateAmi *bool `json:"createAmi,omitempty"` -} - -// Validate validates this aws snapshot manager parameters -func (m *AwsSnapshotManagerParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws snapshot manager parameters based on context it is used -func (m *AwsSnapshotManagerParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSnapshotManagerParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSnapshotManagerParameters) UnmarshalBinary(b []byte) error { - var res AwsSnapshotManagerParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_target_params.go b/v1/models/aws_target_params.go deleted file mode 100644 index 89473fc7..00000000 --- a/v1/models/aws_target_params.go +++ /dev/null @@ -1,166 +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" -) - -// AwsTargetParams Defines the Aws target related information required for recovery. -// -// swagger:model AwsTargetParams -type AwsTargetParams struct { - - // Custom destination Server configuration parameters where the RDS - // Postgres database will be recovered." - CustomServerConfig *AwsTargetParamsNetworkConfig `json:"customServerConfig,omitempty"` - - // If set to true means we are recovering to a know source and - // 'known_source_config' will be populated else 'custom_server_config' will - // be populated. - IsKnownSource *bool `json:"isKnownSource,omitempty"` - - // Populated in case of a known target. - KnownSourceConfig *AwsTargetParamsNetworkConfig `json:"knownSourceConfig,omitempty"` -} - -// Validate validates this aws target params -func (m *AwsTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCustomServerConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKnownSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParams) validateCustomServerConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CustomServerConfig) { // not required - return nil - } - - if m.CustomServerConfig != nil { - if err := m.CustomServerConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customServerConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParams) validateKnownSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.KnownSourceConfig) { // not required - return nil - } - - if m.KnownSourceConfig != nil { - if err := m.KnownSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params based on the context it is used -func (m *AwsTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomServerConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKnownSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParams) contextValidateCustomServerConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.CustomServerConfig != nil { - - if swag.IsZero(m.CustomServerConfig) { // not required - return nil - } - - if err := m.CustomServerConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customServerConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParams) contextValidateKnownSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.KnownSourceConfig != nil { - - if swag.IsZero(m.KnownSourceConfig) { // not required - return nil - } - - if err := m.KnownSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParams) UnmarshalBinary(b []byte) error { - var res AwsTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/aws_target_params_network_config.go b/v1/models/aws_target_params_network_config.go deleted file mode 100644 index b4aaa4c8..00000000 --- a/v1/models/aws_target_params_network_config.go +++ /dev/null @@ -1,274 +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" -) - -// AwsTargetParamsNetworkConfig Proto to define the network configuration to be applied to the target -// restore. -// -// swagger:model AwsTargetParams_NetworkConfig -type AwsTargetParamsNetworkConfig struct { - - // Postgres Server login credentials. - Credentials *CredentialsProto `json:"credentials,omitempty"` - - // instance in which to deploy the Rds Postgres database. - Instance *AwsEntity `json:"instance,omitempty"` - - // Ip in which to deploy the Rds Postgres database. - IP *string `json:"ip,omitempty"` - - // If set to true means we are recovering to the same destination where - // the backup is made from. We are not needed to fill any other config if - // this is set to true. Magneto itself will fetch the config in this case. - IsNewSource *bool `json:"isNewSource,omitempty"` - - // Port to use to connect to the RDS Postgres server. - Port *int32 `json:"port,omitempty"` - - // Region in which to deploy the Rds Postgres database. - Region *AwsEntity `json:"region,omitempty"` - - // Target source details where RDS Postgres database will be recovered. - Source *AwsEntity `json:"source,omitempty"` -} - -// Validate validates this aws target params network config -func (m *AwsTargetParamsNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstance(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsNetworkConfig) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) validateInstance(formats strfmt.Registry) error { - if swag.IsZero(m.Instance) { // not required - return nil - } - - if m.Instance != nil { - if err := m.Instance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instance") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params network config based on the context it is used -func (m *AwsTargetParamsNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstance(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsNetworkConfig) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) contextValidateInstance(ctx context.Context, formats strfmt.Registry) error { - - if m.Instance != nil { - - if swag.IsZero(m.Instance) { // not required - return nil - } - - if err := m.Instance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instance") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsNetworkConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsNetworkConfig) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/axon_error.go b/v1/models/axon_error.go deleted file mode 100644 index be54ff92..00000000 --- a/v1/models/axon_error.go +++ /dev/null @@ -1,92 +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" -) - -// AxonError AxonError Error -// -// # Format of error returned by APIs -// -// swagger:model AxonError -type AxonError struct { - - // code - Code *int64 `json:"code,omitempty"` - - // debug info - DebugInfo *string `json:"debugInfo,omitempty"` - - // details - Details *string `json:"details,omitempty"` - - // request ID - RequestID *string `json:"requestId,omitempty"` - - // summary - Summary *string `json:"summary,omitempty"` - - // timestamp - // Format: date-time - // Format: date-time - Timestamp *strfmt.DateTime `json:"timestamp,omitempty"` -} - -// Validate validates this axon error -func (m *AxonError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimestamp(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AxonError) validateTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.Timestamp) { // not required - return nil - } - - if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this axon error based on context it is used -func (m *AxonError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AxonError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AxonError) UnmarshalBinary(b []byte) error { - var res AxonError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_application.go b/v1/models/azure_application.go deleted file mode 100644 index 09202639..00000000 --- a/v1/models/azure_application.go +++ /dev/null @@ -1,56 +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" -) - -// AzureApplication Message that represents an Azure application. -// -// swagger:model AzureApplication -type AzureApplication struct { - - // Id of the Azure application. - ApplicationID *string `json:"application_id,omitempty"` - - // Object Id of the Azure application. - ApplicationObjectID *string `json:"application_object_id,omitempty"` - - // Encrypted application key. - EncryptedApplicationKey *string `json:"encrypted_application_key,omitempty"` -} - -// Validate validates this azure application -func (m *AzureApplication) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this azure application based on context it is used -func (m *AzureApplication) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureApplication) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureApplication) UnmarshalBinary(b []byte) error { - var res AzureApplication - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_cloud_credentials.go b/v1/models/azure_cloud_credentials.go deleted file mode 100644 index e1c7fe79..00000000 --- a/v1/models/azure_cloud_credentials.go +++ /dev/null @@ -1,202 +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" -) - -// AzureCloudCredentials Azure Cloud Credentials. -// -// Specifies the cloud credentials to connect to a Microsoft -// Azure service account. -// -// swagger:model AzureCloudCredentials -type AzureCloudCredentials struct { - - // Specifies the auth method used for the request - // 'kAzureAuthNone' indicates no authentication. - // 'kAzureClientSecret' indicates a client authentication. - // 'kAzureManagedIdentity' indicates a Azure based authentication. - // 'kUseHelios' indicates a Helios authentication. - // Enum: ["kAzureAuthNone","kAzureClientSecret","kAzureManagedIdentity","kUseHelios"] - AuthMethod *string `json:"authMethod,omitempty"` - - // Specifies the client id of the managed identity assigned to the cluster. - // This is used only for clusters running as Azure VMs where authentication - // is done using AD. - ClientID *string `json:"clientId,omitempty"` - - // Specifies if write once read many (WORM) protection is enabled for the - // Azure container or not. - IsWormEnabled *bool `json:"isWormEnabled,omitempty"` - - // Specifies the region for Azure account. This is only populated for - // FortKnox vaults. - Region *string `json:"region,omitempty"` - - // Specifies the access key to use when accessing a storage tier - // in a Azure cloud service. - StorageAccessKey *string `json:"storageAccessKey,omitempty"` - - // Specifies the account name to use when accessing a storage tier - // in a Azure cloud service. - StorageAccountName *string `json:"storageAccountName,omitempty"` - - // Specifies the storage class of Azure. - // AzureTierType specifies the storage class for Azure. - // 'kAzureTierHot' indicates a tier type of Azure properties that is accessed - // frequently. - // 'kAzureTierCool' indicates a tier type of Azure properties that is - // accessed less frequently, and stored for at least 30 days. - // 'kAzureTierArchive' indicates a tier type of Azure properties that is - // accessed rarely and stored for at least 180 days. - // Enum: ["kAzureTierHot","kAzureTierCool","kAzureTierArchive"] - TierType *string `json:"tierType,omitempty"` - - // Specifies the list of all tiers for Amazon account. - Tiers []string `json:"tiers"` -} - -// Validate validates this azure cloud credentials -func (m *AzureCloudCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureCloudCredentialsTypeAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureAuthNone","kAzureClientSecret","kAzureManagedIdentity","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCloudCredentialsTypeAuthMethodPropEnum = append(azureCloudCredentialsTypeAuthMethodPropEnum, v) - } -} - -const ( - - // AzureCloudCredentialsAuthMethodKAzureAuthNone captures enum value "kAzureAuthNone" - AzureCloudCredentialsAuthMethodKAzureAuthNone string = "kAzureAuthNone" - - // AzureCloudCredentialsAuthMethodKAzureClientSecret captures enum value "kAzureClientSecret" - AzureCloudCredentialsAuthMethodKAzureClientSecret string = "kAzureClientSecret" - - // AzureCloudCredentialsAuthMethodKAzureManagedIdentity captures enum value "kAzureManagedIdentity" - AzureCloudCredentialsAuthMethodKAzureManagedIdentity string = "kAzureManagedIdentity" - - // AzureCloudCredentialsAuthMethodKUseHelios captures enum value "kUseHelios" - AzureCloudCredentialsAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AzureCloudCredentials) validateAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCloudCredentialsTypeAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCloudCredentials) validateAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateAuthMethodEnum("authMethod", "body", *m.AuthMethod); err != nil { - return err - } - - return nil -} - -var azureCloudCredentialsTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureTierHot","kAzureTierCool","kAzureTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCloudCredentialsTypeTierTypePropEnum = append(azureCloudCredentialsTypeTierTypePropEnum, v) - } -} - -const ( - - // AzureCloudCredentialsTierTypeKAzureTierHot captures enum value "kAzureTierHot" - AzureCloudCredentialsTierTypeKAzureTierHot string = "kAzureTierHot" - - // AzureCloudCredentialsTierTypeKAzureTierCool captures enum value "kAzureTierCool" - AzureCloudCredentialsTierTypeKAzureTierCool string = "kAzureTierCool" - - // AzureCloudCredentialsTierTypeKAzureTierArchive captures enum value "kAzureTierArchive" - AzureCloudCredentialsTierTypeKAzureTierArchive string = "kAzureTierArchive" -) - -// prop value enum -func (m *AzureCloudCredentials) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCloudCredentialsTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCloudCredentials) validateTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TierType) { // not required - return nil - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure cloud credentials based on context it is used -func (m *AzureCloudCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureCloudCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureCloudCredentials) UnmarshalBinary(b []byte) error { - var res AzureCloudCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_credentials.go b/v1/models/azure_credentials.go deleted file mode 100644 index 95ae1aa5..00000000 --- a/v1/models/azure_credentials.go +++ /dev/null @@ -1,245 +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" -) - -// AzureCredentials Azure source Credentials. -// -// Specifies the credentials to authenticate with Azure Cloud Platform. -// -// swagger:model AzureCredentials -type AzureCredentials struct { - - // Specifies Application Id of the active directory of Azure account. - ApplicationID *string `json:"applicationId,omitempty"` - - // Specifies Application key of the active directory of Azure account. - ApplicationKey *string `json:"applicationKey,omitempty"` - - // Specifies the entity type such as 'kSubscription' if the environment is - // kAzure. - // Specifies the type of an Azure source entity. - // 'kSubscription' indicates a billing unit within Azure account. - // 'kResourceGroup' indicates a container that holds related resources. - // 'kVirtualMachine' indicates a Virtual Machine in Azure environment. - // 'kStorageAccount' represents a collection of storage containers. - // 'kStorageKey' indicates a key required to access the storage account. - // 'kStorageContainer' represents a storage container within a storage account. - // 'kStorageBlob' represents a storage blog within a storage container. - // 'kStorageResourceGroup' indicates a container that holds related - // storage resources. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kVirtualNetwork' represents a virtual network. - // 'kNetworkResourceGroup' indicates a container that holds related - // network resources. - // 'kSubnet' represents a subnet within the virtual network. - // 'kComputeOptions' indicates the number of CPU cores and memory size - // available for a type of a Virtual Machine. - // 'kAvailabilitySet' indicates the availability set. - // Enum: ["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"] - AzureType *string `json:"azureType,omitempty"` - - // Specifies Azure stack hub domain name for where the given subscription is - // present. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the region in which the Azure Stack will be registered. - Region *string `json:"region,omitempty"` - - // Specifies Subscription id inside a customer's Azure account. It represents - // sub-section within the Azure account where a customer allows us to - // create VMs, storage account etc. - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // Specifies the subscription type of Azure such as 'kAzureCommercial', - // 'kAzureGovCloud', 'kAzureStackCommercial' or 'kAzureStackADFS'. - // Specifies the subscription type of an Azure source entity. - // 'kAzureCommercial' indicates a standard Azure subscription. - // 'kAzureGovCloud' indicates a govt Azure subscription. - // 'kAzureStackCommercial' indicates a stack commercial Azure subscription. - // 'kAzureStackADFS' indicates a ADFS Azure subbscription. - // Enum: ["kAzureCommercial","kAzureGovCloud","kAzureStackCommercial","kAzureStackADFS"] - SubscriptionType *string `json:"subscriptionType,omitempty"` - - // Specifies Tenant Id of the active directory of Azure account. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this azure credentials -func (m *AzureCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureCredentialsTypeAzureTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCredentialsTypeAzureTypePropEnum = append(azureCredentialsTypeAzureTypePropEnum, v) - } -} - -const ( - - // AzureCredentialsAzureTypeKSubscription captures enum value "kSubscription" - AzureCredentialsAzureTypeKSubscription string = "kSubscription" - - // AzureCredentialsAzureTypeKResourceGroup captures enum value "kResourceGroup" - AzureCredentialsAzureTypeKResourceGroup string = "kResourceGroup" - - // AzureCredentialsAzureTypeKVirtualMachine captures enum value "kVirtualMachine" - AzureCredentialsAzureTypeKVirtualMachine string = "kVirtualMachine" - - // AzureCredentialsAzureTypeKStorageAccount captures enum value "kStorageAccount" - AzureCredentialsAzureTypeKStorageAccount string = "kStorageAccount" - - // AzureCredentialsAzureTypeKStorageKey captures enum value "kStorageKey" - AzureCredentialsAzureTypeKStorageKey string = "kStorageKey" - - // AzureCredentialsAzureTypeKStorageContainer captures enum value "kStorageContainer" - AzureCredentialsAzureTypeKStorageContainer string = "kStorageContainer" - - // AzureCredentialsAzureTypeKStorageBlob captures enum value "kStorageBlob" - AzureCredentialsAzureTypeKStorageBlob string = "kStorageBlob" - - // AzureCredentialsAzureTypeKStorageResourceGroup captures enum value "kStorageResourceGroup" - AzureCredentialsAzureTypeKStorageResourceGroup string = "kStorageResourceGroup" - - // AzureCredentialsAzureTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AzureCredentialsAzureTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AzureCredentialsAzureTypeKVirtualNetwork captures enum value "kVirtualNetwork" - AzureCredentialsAzureTypeKVirtualNetwork string = "kVirtualNetwork" - - // AzureCredentialsAzureTypeKNetworkResourceGroup captures enum value "kNetworkResourceGroup" - AzureCredentialsAzureTypeKNetworkResourceGroup string = "kNetworkResourceGroup" - - // AzureCredentialsAzureTypeKSubnet captures enum value "kSubnet" - AzureCredentialsAzureTypeKSubnet string = "kSubnet" - - // AzureCredentialsAzureTypeKComputeOptions captures enum value "kComputeOptions" - AzureCredentialsAzureTypeKComputeOptions string = "kComputeOptions" - - // AzureCredentialsAzureTypeKAvailabilitySet captures enum value "kAvailabilitySet" - AzureCredentialsAzureTypeKAvailabilitySet string = "kAvailabilitySet" -) - -// prop value enum -func (m *AzureCredentials) validateAzureTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCredentialsTypeAzureTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCredentials) validateAzureType(formats strfmt.Registry) error { - if swag.IsZero(m.AzureType) { // not required - return nil - } - - // value enum - if err := m.validateAzureTypeEnum("azureType", "body", *m.AzureType); err != nil { - return err - } - - return nil -} - -var azureCredentialsTypeSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureCommercial","kAzureGovCloud","kAzureStackCommercial","kAzureStackADFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCredentialsTypeSubscriptionTypePropEnum = append(azureCredentialsTypeSubscriptionTypePropEnum, v) - } -} - -const ( - - // AzureCredentialsSubscriptionTypeKAzureCommercial captures enum value "kAzureCommercial" - AzureCredentialsSubscriptionTypeKAzureCommercial string = "kAzureCommercial" - - // AzureCredentialsSubscriptionTypeKAzureGovCloud captures enum value "kAzureGovCloud" - AzureCredentialsSubscriptionTypeKAzureGovCloud string = "kAzureGovCloud" - - // AzureCredentialsSubscriptionTypeKAzureStackCommercial captures enum value "kAzureStackCommercial" - AzureCredentialsSubscriptionTypeKAzureStackCommercial string = "kAzureStackCommercial" - - // AzureCredentialsSubscriptionTypeKAzureStackADFS captures enum value "kAzureStackADFS" - AzureCredentialsSubscriptionTypeKAzureStackADFS string = "kAzureStackADFS" -) - -// prop value enum -func (m *AzureCredentials) validateSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCredentialsTypeSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCredentials) validateSubscriptionType(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionType) { // not required - return nil - } - - // value enum - if err := m.validateSubscriptionTypeEnum("subscriptionType", "body", *m.SubscriptionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure credentials based on context it is used -func (m *AzureCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureCredentials) UnmarshalBinary(b []byte) error { - var res AzureCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_kms_configuration.go b/v1/models/azure_kms_configuration.go deleted file mode 100644 index 38a9b33b..00000000 --- a/v1/models/azure_kms_configuration.go +++ /dev/null @@ -1,214 +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" -) - -// AzureKmsConfiguration AzureKmsConfiguration to define Azure KMS config. -// -// swagger:model AzureKmsConfiguration -type AzureKmsConfiguration struct { - - // Specifies the cohesity managed key vault details. - CohesityKeyVault *KeyVaultParams `json:"cohesityKeyVault,omitempty"` - - // Specifies the customer managed key vault details. - CustomerKeyVault *KeyVaultParams `json:"customerKeyVault,omitempty"` - - // Specifies if its a cohesity managed or customer managed key vault. - // 'kCohesityManaged' indicates an internal KMS object. - // 'kCustomerManaged' indicates an Aws KMS object. - // Enum: ["kCohesityManaged","kCustomerManaged"] - VaultOwner *string `json:"vaultOwner,omitempty"` -} - -// Validate validates this azure kms configuration -func (m *AzureKmsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCohesityKeyVault(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomerKeyVault(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultOwner(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureKmsConfiguration) validateCohesityKeyVault(formats strfmt.Registry) error { - if swag.IsZero(m.CohesityKeyVault) { // not required - return nil - } - - if m.CohesityKeyVault != nil { - if err := m.CohesityKeyVault.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesityKeyVault") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesityKeyVault") - } - return err - } - } - - return nil -} - -func (m *AzureKmsConfiguration) validateCustomerKeyVault(formats strfmt.Registry) error { - if swag.IsZero(m.CustomerKeyVault) { // not required - return nil - } - - if m.CustomerKeyVault != nil { - if err := m.CustomerKeyVault.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customerKeyVault") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customerKeyVault") - } - return err - } - } - - return nil -} - -var azureKmsConfigurationTypeVaultOwnerPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCohesityManaged","kCustomerManaged"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureKmsConfigurationTypeVaultOwnerPropEnum = append(azureKmsConfigurationTypeVaultOwnerPropEnum, v) - } -} - -const ( - - // AzureKmsConfigurationVaultOwnerKCohesityManaged captures enum value "kCohesityManaged" - AzureKmsConfigurationVaultOwnerKCohesityManaged string = "kCohesityManaged" - - // AzureKmsConfigurationVaultOwnerKCustomerManaged captures enum value "kCustomerManaged" - AzureKmsConfigurationVaultOwnerKCustomerManaged string = "kCustomerManaged" -) - -// prop value enum -func (m *AzureKmsConfiguration) validateVaultOwnerEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureKmsConfigurationTypeVaultOwnerPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureKmsConfiguration) validateVaultOwner(formats strfmt.Registry) error { - if swag.IsZero(m.VaultOwner) { // not required - return nil - } - - // value enum - if err := m.validateVaultOwnerEnum("vaultOwner", "body", *m.VaultOwner); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure kms configuration based on the context it is used -func (m *AzureKmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCohesityKeyVault(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomerKeyVault(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureKmsConfiguration) contextValidateCohesityKeyVault(ctx context.Context, formats strfmt.Registry) error { - - if m.CohesityKeyVault != nil { - - if swag.IsZero(m.CohesityKeyVault) { // not required - return nil - } - - if err := m.CohesityKeyVault.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesityKeyVault") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesityKeyVault") - } - return err - } - } - - return nil -} - -func (m *AzureKmsConfiguration) contextValidateCustomerKeyVault(ctx context.Context, formats strfmt.Registry) error { - - if m.CustomerKeyVault != nil { - - if swag.IsZero(m.CustomerKeyVault) { // not required - return nil - } - - if err := m.CustomerKeyVault.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customerKeyVault") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customerKeyVault") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureKmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureKmsConfiguration) UnmarshalBinary(b []byte) error { - var res AzureKmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_kms_credentials.go b/v1/models/azure_kms_credentials.go deleted file mode 100644 index c423e7c5..00000000 --- a/v1/models/azure_kms_credentials.go +++ /dev/null @@ -1,124 +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" -) - -// AzureKmsCredentials AzureKmsCredentials specifies the credentials to access Microsoft Azure. -// -// swagger:model AzureKmsCredentials -type AzureKmsCredentials struct { - - // Specifies the client id assigned to the cluster. - ClientID *string `json:"clientId,omitempty"` - - // Specifies the Secret access key needed to access the cloud account. - ClientSecretKey *string `json:"clientSecretKey,omitempty"` - - // Specifies Authentication method to be used for API calls. - // 'kAzureAuthNone' indicates no authentication. - // 'kAzureClientSecret' indicates a client authentication. - // 'kAzureManagedIdentity' indicates a Azure based authentication. - // 'kUseHelios' indicates a Helios authentication. - // Enum: ["kAzureAuthNone","kAzureClientSecret","kAzureManagedIdentity","kUseHelios"] - MicrosoftAuthMethod *string `json:"microsoftAuthMethod,omitempty"` - - // Specifies the tenant id assigned to the cluster. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this azure kms credentials -func (m *AzureKmsCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMicrosoftAuthMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureKmsCredentialsTypeMicrosoftAuthMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureAuthNone","kAzureClientSecret","kAzureManagedIdentity","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureKmsCredentialsTypeMicrosoftAuthMethodPropEnum = append(azureKmsCredentialsTypeMicrosoftAuthMethodPropEnum, v) - } -} - -const ( - - // AzureKmsCredentialsMicrosoftAuthMethodKAzureAuthNone captures enum value "kAzureAuthNone" - AzureKmsCredentialsMicrosoftAuthMethodKAzureAuthNone string = "kAzureAuthNone" - - // AzureKmsCredentialsMicrosoftAuthMethodKAzureClientSecret captures enum value "kAzureClientSecret" - AzureKmsCredentialsMicrosoftAuthMethodKAzureClientSecret string = "kAzureClientSecret" - - // AzureKmsCredentialsMicrosoftAuthMethodKAzureManagedIdentity captures enum value "kAzureManagedIdentity" - AzureKmsCredentialsMicrosoftAuthMethodKAzureManagedIdentity string = "kAzureManagedIdentity" - - // AzureKmsCredentialsMicrosoftAuthMethodKUseHelios captures enum value "kUseHelios" - AzureKmsCredentialsMicrosoftAuthMethodKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AzureKmsCredentials) validateMicrosoftAuthMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureKmsCredentialsTypeMicrosoftAuthMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureKmsCredentials) validateMicrosoftAuthMethod(formats strfmt.Registry) error { - if swag.IsZero(m.MicrosoftAuthMethod) { // not required - return nil - } - - // value enum - if err := m.validateMicrosoftAuthMethodEnum("microsoftAuthMethod", "body", *m.MicrosoftAuthMethod); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure kms credentials based on context it is used -func (m *AzureKmsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureKmsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureKmsCredentials) UnmarshalBinary(b []byte) error { - var res AzureKmsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_managed_disk_params.go b/v1/models/azure_managed_disk_params.go deleted file mode 100644 index 909756c6..00000000 --- a/v1/models/azure_managed_disk_params.go +++ /dev/null @@ -1,54 +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" -) - -// AzureManagedDiskParams Contains managed disk parameters needed to deploy to Azure using managed -// disk. -// -// swagger:model AzureManagedDiskParams -type AzureManagedDiskParams struct { - - // SKU type for data disks. - DataDisksSkuType *int32 `json:"dataDisksSkuType,omitempty"` - - // SKU type for OS disk. - OsDiskSkuType *int32 `json:"osDiskSkuType,omitempty"` -} - -// Validate validates this azure managed disk params -func (m *AzureManagedDiskParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this azure managed disk params based on context it is used -func (m *AzureManagedDiskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureManagedDiskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureManagedDiskParams) UnmarshalBinary(b []byte) error { - var res AzureManagedDiskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_params.go b/v1/models/azure_params.go deleted file mode 100644 index 4768f96f..00000000 --- a/v1/models/azure_params.go +++ /dev/null @@ -1,221 +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" -) - -// AzureParams Azure Parameters. -// -// Specifies various resources when converting and deploying a VM to Azure. -// -// swagger:model AzureParams -type AzureParams struct { - - // Specifies id of the Availability set in which the VM is to be restored. - AvailabilitySetID *int64 `json:"availabilitySetId,omitempty"` - - // Specifies the disk type used by the data. - // 'kPremiumSSD' is disk type backed by SSDs, delivers high performance, low - // latency disk support for VMs running I/O intensive workloads. - // 'kStandardSSD' implies disk type that offers more consistent performance and - // reliability than HDD. - // 'kStandardHDD' implies disk type backed by HDDs, delivers cost effective - // storage. - // Enum: ["kPremiumSSD","kStandardSSD","kStandardHDD"] - DataDiskType *string `json:"dataDiskType,omitempty"` - - // Specifies Type of VM (e.g. small, medium, large) when cloning the VM in - // Azure. - InstanceID *int64 `json:"instanceId,omitempty"` - - // Specifies id of the resource group for the selected virtual network. - NetworkResourceGroupID *int64 `json:"networkResourceGroupId,omitempty"` - - // Specifies the disk type used by the OS. - // 'kPremiumSSD' is disk type backed by SSDs, delivers high performance, low - // latency disk support for VMs running I/O intensive workloads. - // 'kStandardSSD' implies disk type that offers more consistent performance and - // reliability than HDD. - // 'kStandardHDD' implies disk type backed by HDDs, delivers cost effective - // storage. - // Enum: ["kPremiumSSD","kStandardSSD","kStandardHDD"] - OsDiskType *string `json:"osDiskType,omitempty"` - - // Specifies id of the Azure resource group. Its value is globally unique - // within Azure. - ResourceGroup *int64 `json:"resourceGroup,omitempty"` - - // Specifies id of the storage account that will contain the storage - // container within which we will create the blob that will become the VHD - // disk for the cloned VM. - StorageAccount *int64 `json:"storageAccount,omitempty"` - - // Specifies id of the storage container within the above storage account. - StorageContainer *int64 `json:"storageContainer,omitempty"` - - // Specifies id of the resource group for the selected storage account. - StorageResourceGroupID *int64 `json:"storageResourceGroupId,omitempty"` - - // Specifies Id of the subnet within the above virtual network. - SubnetID *int64 `json:"subnetId,omitempty"` - - // Specifies the resource group where temporary VM needs to be created. - TempVMResourceGroupID *int64 `json:"tempVmResourceGroupId,omitempty"` - - // Specifies the Storage account where temporary VM needs to be created. - TempVMStorageAccountID *int64 `json:"tempVmStorageAccountId,omitempty"` - - // Specifies the Storage container where temporary VM needs to be created. - TempVMStorageContainerID *int64 `json:"tempVmStorageContainerId,omitempty"` - - // Specifies the Subnet where temporary VM needs to be created. - TempVMSubnetID *int64 `json:"tempVmSubnetId,omitempty"` - - // Specifies the Virtual network where temporary VM needs to be created. - TempVMVirtualNetworkID *int64 `json:"tempVmVirtualNetworkId,omitempty"` - - // Specifies Id of the Virtual Network. - VirtualNetworkID *int64 `json:"virtualNetworkId,omitempty"` -} - -// Validate validates this azure params -func (m *AzureParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataDiskType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOsDiskType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureParamsTypeDataDiskTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPremiumSSD","kStandardSSD","kStandardHDD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureParamsTypeDataDiskTypePropEnum = append(azureParamsTypeDataDiskTypePropEnum, v) - } -} - -const ( - - // AzureParamsDataDiskTypeKPremiumSSD captures enum value "kPremiumSSD" - AzureParamsDataDiskTypeKPremiumSSD string = "kPremiumSSD" - - // AzureParamsDataDiskTypeKStandardSSD captures enum value "kStandardSSD" - AzureParamsDataDiskTypeKStandardSSD string = "kStandardSSD" - - // AzureParamsDataDiskTypeKStandardHDD captures enum value "kStandardHDD" - AzureParamsDataDiskTypeKStandardHDD string = "kStandardHDD" -) - -// prop value enum -func (m *AzureParams) validateDataDiskTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureParamsTypeDataDiskTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureParams) validateDataDiskType(formats strfmt.Registry) error { - if swag.IsZero(m.DataDiskType) { // not required - return nil - } - - // value enum - if err := m.validateDataDiskTypeEnum("dataDiskType", "body", *m.DataDiskType); err != nil { - return err - } - - return nil -} - -var azureParamsTypeOsDiskTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPremiumSSD","kStandardSSD","kStandardHDD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureParamsTypeOsDiskTypePropEnum = append(azureParamsTypeOsDiskTypePropEnum, v) - } -} - -const ( - - // AzureParamsOsDiskTypeKPremiumSSD captures enum value "kPremiumSSD" - AzureParamsOsDiskTypeKPremiumSSD string = "kPremiumSSD" - - // AzureParamsOsDiskTypeKStandardSSD captures enum value "kStandardSSD" - AzureParamsOsDiskTypeKStandardSSD string = "kStandardSSD" - - // AzureParamsOsDiskTypeKStandardHDD captures enum value "kStandardHDD" - AzureParamsOsDiskTypeKStandardHDD string = "kStandardHDD" -) - -// prop value enum -func (m *AzureParams) validateOsDiskTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureParamsTypeOsDiskTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureParams) validateOsDiskType(formats strfmt.Registry) error { - if swag.IsZero(m.OsDiskType) { // not required - return nil - } - - // value enum - if err := m.validateOsDiskTypeEnum("osDiskType", "body", *m.OsDiskType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure params based on context it is used -func (m *AzureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureParams) UnmarshalBinary(b []byte) error { - var res AzureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_protection_source.go b/v1/models/azure_protection_source.go deleted file mode 100644 index a3acc2f1..00000000 --- a/v1/models/azure_protection_source.go +++ /dev/null @@ -1,588 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureProtectionSource Azure Protection Source. -// -// Specifies a Protection Source in Azure environment. -// -// swagger:model AzureProtectionSource -type AzureProtectionSource struct { - - // Specifies Application Id of the active directory of Azure account. - ApplicationID *string `json:"applicationId,omitempty"` - - // Specifies Application key of the active directory of Azure account. - ApplicationKey *string `json:"applicationKey,omitempty"` - - // Specifies the entity type such as 'kSubscription' if the environment is - // kAzure. - // Specifies the type of an Azure source entity. - // 'kSubscription' indicates a billing unit within Azure account. - // 'kResourceGroup' indicates a container that holds related resources. - // 'kVirtualMachine' indicates a Virtual Machine in Azure environment. - // 'kStorageAccount' represents a collection of storage containers. - // 'kStorageKey' indicates a key required to access the storage account. - // 'kStorageContainer' represents a storage container within a storage account. - // 'kStorageBlob' represents a storage blog within a storage container. - // 'kStorageResourceGroup' indicates a container that holds related - // storage resources. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kVirtualNetwork' represents a virtual network. - // 'kNetworkResourceGroup' indicates a container that holds related - // network resources. - // 'kSubnet' represents a subnet within the virtual network. - // 'kComputeOptions' indicates the number of CPU cores and memory size - // available for a type of a Virtual Machine. - // 'kAvailabilitySet' indicates the availability set. - // Enum: ["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"] - AzureType *string `json:"azureType,omitempty"` - - // Specifies Azure stack hub domain name for where the given subscription is - // present. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the OS type of the Protection Source of type 'kVirtualMachine' - // such as 'kWindows' or 'kLinux'. - // overrideDescription: true - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies a list of IP addresses for entities of type 'kVirtualMachine'. - IPAddresses []string `json:"ipAddresses"` - - // Specifies whether VM is managed or not for entities of type - // 'kVirtualMachine'. - IsManagedVM *bool `json:"isManagedVm,omitempty"` - - // Specifies the physical location of the resource group. - Location *string `json:"location,omitempty"` - - // Specifies the amount of memory in MegaBytes of the Azure resource of - // type 'kComputeOptions'. - MemoryMbytes *int64 `json:"memoryMbytes,omitempty"` - - // Specifies the name of the Object set by the Cloud Provider. - // If the provider did not set a name for the object, this field is not set. - Name *string `json:"name,omitempty"` - - // Specifies the number of CPU cores of the Azure resource of - // type 'kComputeOptions'. - NumCores *int32 `json:"numCores,omitempty"` - - // Specifies the Protection Source id of the registered Physical Host. - // If the cloud entity is protected using a Physical Agent, it must be - // registered as a physical host. - PhysicalSourceID *int64 `json:"physicalSourceId,omitempty"` - - // Specifies the region in which the Azure Stack will be registered. - Region *string `json:"region,omitempty"` - - // Specifies the unique Id of the resource given by the cloud provider. - ResourceID *string `json:"resourceId,omitempty"` - - // Specifies the id of the "convert and deploy" restore task that - // created the entity in the cloud. - // - // It is required to support the DR-to-cloud usecase where we replicate an - // on-prem entity to a cluster running in cloud, bring it up using - // "convert and deploy" mechanism, protect it using a cloud job that uses - // physical adapter, and convert it back to the on-prem format before - // replication. - // - // Before replicating, we need to update the backup task state of the backed - // up entity using the on-prem entity and on-prem entity's parent. - // The id is used to lookup the restore entity that contains details about - // the on-prem entity. - // - // It is set at the time of refreshing the cloud entity hierarchy if all the - // following conditions are met: - // Name of the current entity matches with name of any cloud entity - // deployed using the "convert and deploy" restore task. - // Restore entity associated with the above matched cloud entity has - // 'failed_over' flag set to true in its cloud extension. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Specifies Subscription id inside a customer's Azure account. It represents - // sub-section within the Azure account where a customer allows us to - // create VMs, storage account etc. - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // Specifies the subscription type of Azure such as 'kAzureCommercial', - // 'kAzureGovCloud', 'kAzureStackCommercial' or 'kAzureStackADFS'. - // Specifies the subscription type of an Azure source entity. - // 'kAzureCommercial' indicates a standard Azure subscription. - // 'kAzureGovCloud' indicates a govt Azure subscription. - // 'kAzureStackCommercial' indicates a stack commercial Azure subscription. - // 'kAzureStackADFS' indicates a ADFS Azure subbscription. - // Enum: ["kAzureCommercial","kAzureGovCloud","kAzureStackCommercial","kAzureStackADFS"] - SubscriptionType *string `json:"subscriptionType,omitempty"` - - // Specifies the list of Azure tag attributes. - TagAttributes []*TagAttribute `json:"tagAttributes"` - - // Specifies Tenant Id of the active directory of Azure account. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the type of an Azure Protection Source Object such as - // 'kStorageContainer', 'kVirtualMachine', 'kVirtualNetwork', etc. - // Specifies the type of an Azure source entity. - // 'kSubscription' indicates a billing unit within Azure account. - // 'kResourceGroup' indicates a container that holds related resources. - // 'kVirtualMachine' indicates a Virtual Machine in Azure environment. - // 'kStorageAccount' represents a collection of storage containers. - // 'kStorageKey' indicates a key required to access the storage account. - // 'kStorageContainer' represents a storage container within a storage account. - // 'kStorageBlob' represents a storage blog within a storage container. - // 'kStorageResourceGroup' indicates a container that holds related - // storage resources. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kVirtualNetwork' represents a virtual network. - // 'kNetworkResourceGroup' indicates a container that holds related - // network resources. - // 'kSubnet' represents a subnet within the virtual network. - // 'kComputeOptions' indicates the number of CPU cores and memory size - // available for a type of a Virtual Machine. - // 'kAvailabilitySet' indicates the availability set. - // Enum: ["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this azure protection source -func (m *AzureProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureProtectionSourceTypeAzureTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionSourceTypeAzureTypePropEnum = append(azureProtectionSourceTypeAzureTypePropEnum, v) - } -} - -const ( - - // AzureProtectionSourceAzureTypeKSubscription captures enum value "kSubscription" - AzureProtectionSourceAzureTypeKSubscription string = "kSubscription" - - // AzureProtectionSourceAzureTypeKResourceGroup captures enum value "kResourceGroup" - AzureProtectionSourceAzureTypeKResourceGroup string = "kResourceGroup" - - // AzureProtectionSourceAzureTypeKVirtualMachine captures enum value "kVirtualMachine" - AzureProtectionSourceAzureTypeKVirtualMachine string = "kVirtualMachine" - - // AzureProtectionSourceAzureTypeKStorageAccount captures enum value "kStorageAccount" - AzureProtectionSourceAzureTypeKStorageAccount string = "kStorageAccount" - - // AzureProtectionSourceAzureTypeKStorageKey captures enum value "kStorageKey" - AzureProtectionSourceAzureTypeKStorageKey string = "kStorageKey" - - // AzureProtectionSourceAzureTypeKStorageContainer captures enum value "kStorageContainer" - AzureProtectionSourceAzureTypeKStorageContainer string = "kStorageContainer" - - // AzureProtectionSourceAzureTypeKStorageBlob captures enum value "kStorageBlob" - AzureProtectionSourceAzureTypeKStorageBlob string = "kStorageBlob" - - // AzureProtectionSourceAzureTypeKStorageResourceGroup captures enum value "kStorageResourceGroup" - AzureProtectionSourceAzureTypeKStorageResourceGroup string = "kStorageResourceGroup" - - // AzureProtectionSourceAzureTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AzureProtectionSourceAzureTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AzureProtectionSourceAzureTypeKVirtualNetwork captures enum value "kVirtualNetwork" - AzureProtectionSourceAzureTypeKVirtualNetwork string = "kVirtualNetwork" - - // AzureProtectionSourceAzureTypeKNetworkResourceGroup captures enum value "kNetworkResourceGroup" - AzureProtectionSourceAzureTypeKNetworkResourceGroup string = "kNetworkResourceGroup" - - // AzureProtectionSourceAzureTypeKSubnet captures enum value "kSubnet" - AzureProtectionSourceAzureTypeKSubnet string = "kSubnet" - - // AzureProtectionSourceAzureTypeKComputeOptions captures enum value "kComputeOptions" - AzureProtectionSourceAzureTypeKComputeOptions string = "kComputeOptions" - - // AzureProtectionSourceAzureTypeKAvailabilitySet captures enum value "kAvailabilitySet" - AzureProtectionSourceAzureTypeKAvailabilitySet string = "kAvailabilitySet" -) - -// prop value enum -func (m *AzureProtectionSource) validateAzureTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionSourceTypeAzureTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionSource) validateAzureType(formats strfmt.Registry) error { - if swag.IsZero(m.AzureType) { // not required - return nil - } - - // value enum - if err := m.validateAzureTypeEnum("azureType", "body", *m.AzureType); err != nil { - return err - } - - return nil -} - -var azureProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionSourceTypeHostTypePropEnum = append(azureProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // AzureProtectionSourceHostTypeKLinux captures enum value "kLinux" - AzureProtectionSourceHostTypeKLinux string = "kLinux" - - // AzureProtectionSourceHostTypeKWindows captures enum value "kWindows" - AzureProtectionSourceHostTypeKWindows string = "kWindows" - - // AzureProtectionSourceHostTypeKAix captures enum value "kAix" - AzureProtectionSourceHostTypeKAix string = "kAix" - - // AzureProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - AzureProtectionSourceHostTypeKSolaris string = "kSolaris" - - // AzureProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - AzureProtectionSourceHostTypeKSapHana string = "kSapHana" - - // AzureProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - AzureProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // AzureProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - AzureProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // AzureProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - AzureProtectionSourceHostTypeKMySQL string = "kMySQL" - - // AzureProtectionSourceHostTypeKOther captures enum value "kOther" - AzureProtectionSourceHostTypeKOther string = "kOther" - - // AzureProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - AzureProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // AzureProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - AzureProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // AzureProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - AzureProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // AzureProtectionSourceHostTypeKDB2 captures enum value "kDB2" - AzureProtectionSourceHostTypeKDB2 string = "kDB2" - - // AzureProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - AzureProtectionSourceHostTypeKSapASE string = "kSapASE" - - // AzureProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - AzureProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // AzureProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - AzureProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // AzureProtectionSourceHostTypeKVOS captures enum value "kVOS" - AzureProtectionSourceHostTypeKVOS string = "kVOS" - - // AzureProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - AzureProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *AzureProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -var azureProtectionSourceTypeSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureCommercial","kAzureGovCloud","kAzureStackCommercial","kAzureStackADFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionSourceTypeSubscriptionTypePropEnum = append(azureProtectionSourceTypeSubscriptionTypePropEnum, v) - } -} - -const ( - - // AzureProtectionSourceSubscriptionTypeKAzureCommercial captures enum value "kAzureCommercial" - AzureProtectionSourceSubscriptionTypeKAzureCommercial string = "kAzureCommercial" - - // AzureProtectionSourceSubscriptionTypeKAzureGovCloud captures enum value "kAzureGovCloud" - AzureProtectionSourceSubscriptionTypeKAzureGovCloud string = "kAzureGovCloud" - - // AzureProtectionSourceSubscriptionTypeKAzureStackCommercial captures enum value "kAzureStackCommercial" - AzureProtectionSourceSubscriptionTypeKAzureStackCommercial string = "kAzureStackCommercial" - - // AzureProtectionSourceSubscriptionTypeKAzureStackADFS captures enum value "kAzureStackADFS" - AzureProtectionSourceSubscriptionTypeKAzureStackADFS string = "kAzureStackADFS" -) - -// prop value enum -func (m *AzureProtectionSource) validateSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionSourceTypeSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionSource) validateSubscriptionType(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionType) { // not required - return nil - } - - // value enum - if err := m.validateSubscriptionTypeEnum("subscriptionType", "body", *m.SubscriptionType); err != nil { - return err - } - - return nil -} - -func (m *AzureProtectionSource) validateTagAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributes) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributes); i++ { - if swag.IsZero(m.TagAttributes[i]) { // not required - continue - } - - if m.TagAttributes[i] != nil { - if err := m.TagAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var azureProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSubscription","kResourceGroup","kVirtualMachine","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kStorageResourceGroup","kNetworkSecurityGroup","kVirtualNetwork","kNetworkResourceGroup","kSubnet","kComputeOptions","kAvailabilitySet"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionSourceTypeTypePropEnum = append(azureProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // AzureProtectionSourceTypeKSubscription captures enum value "kSubscription" - AzureProtectionSourceTypeKSubscription string = "kSubscription" - - // AzureProtectionSourceTypeKResourceGroup captures enum value "kResourceGroup" - AzureProtectionSourceTypeKResourceGroup string = "kResourceGroup" - - // AzureProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - AzureProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // AzureProtectionSourceTypeKStorageAccount captures enum value "kStorageAccount" - AzureProtectionSourceTypeKStorageAccount string = "kStorageAccount" - - // AzureProtectionSourceTypeKStorageKey captures enum value "kStorageKey" - AzureProtectionSourceTypeKStorageKey string = "kStorageKey" - - // AzureProtectionSourceTypeKStorageContainer captures enum value "kStorageContainer" - AzureProtectionSourceTypeKStorageContainer string = "kStorageContainer" - - // AzureProtectionSourceTypeKStorageBlob captures enum value "kStorageBlob" - AzureProtectionSourceTypeKStorageBlob string = "kStorageBlob" - - // AzureProtectionSourceTypeKStorageResourceGroup captures enum value "kStorageResourceGroup" - AzureProtectionSourceTypeKStorageResourceGroup string = "kStorageResourceGroup" - - // AzureProtectionSourceTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - AzureProtectionSourceTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // AzureProtectionSourceTypeKVirtualNetwork captures enum value "kVirtualNetwork" - AzureProtectionSourceTypeKVirtualNetwork string = "kVirtualNetwork" - - // AzureProtectionSourceTypeKNetworkResourceGroup captures enum value "kNetworkResourceGroup" - AzureProtectionSourceTypeKNetworkResourceGroup string = "kNetworkResourceGroup" - - // AzureProtectionSourceTypeKSubnet captures enum value "kSubnet" - AzureProtectionSourceTypeKSubnet string = "kSubnet" - - // AzureProtectionSourceTypeKComputeOptions captures enum value "kComputeOptions" - AzureProtectionSourceTypeKComputeOptions string = "kComputeOptions" - - // AzureProtectionSourceTypeKAvailabilitySet captures enum value "kAvailabilitySet" - AzureProtectionSourceTypeKAvailabilitySet string = "kAvailabilitySet" -) - -// prop value enum -func (m *AzureProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure protection source based on the context it is used -func (m *AzureProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributes); i++ { - - if m.TagAttributes[i] != nil { - - if swag.IsZero(m.TagAttributes[i]) { // not required - return nil - } - - if err := m.TagAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureProtectionSource) UnmarshalBinary(b []byte) error { - var res AzureProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_sql_env_backup_params_proto.go b/v1/models/azure_sql_env_backup_params_proto.go deleted file mode 100644 index 5f195d6d..00000000 --- a/v1/models/azure_sql_env_backup_params_proto.go +++ /dev/null @@ -1,177 +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" -) - -// AzureSQLEnvBackupParamsProto Azure SQL environent specific Backup Parameters. -// -// Message to capture additional backup params specific to Azure SQL. -// -// swagger:model AzureSqlEnvBackupParamsProto -type AzureSQLEnvBackupParamsProto struct { - - // If the flag is set to true, a copy of the database is created during - // backup, and the backup is performed from the copied database. This backup - // will be transactionally consistent. - // If the flag is set to false, the backup is performed from the production - // database while transactions are in progress. In this case, the backup will - // be transactionally inconsistent, and recovery can fail or the recovered - // database may be in an inconsistent state. - CopyDatabase *bool `json:"copyDatabase,omitempty"` - - // SKU for the copy db. - CopyDbSku *EntitySKU `json:"copyDbSku,omitempty"` - - // The type of temporary disk to be provisioned for database backup. - DiskType *int32 `json:"diskType,omitempty"` - - // SQL package options to be used by backup. - SQLPackageOptions *SQLPackage `json:"sqlPackageOptions,omitempty"` - - // Size of the disk we will attach to rigel to use for exporting this DB. - TempDiskSizeGb *int32 `json:"tempDiskSizeGb,omitempty"` -} - -// Validate validates this azure Sql env backup params proto -func (m *AzureSQLEnvBackupParamsProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyDbSku(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLPackageOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLEnvBackupParamsProto) validateCopyDbSku(formats strfmt.Registry) error { - if swag.IsZero(m.CopyDbSku) { // not required - return nil - } - - if m.CopyDbSku != nil { - if err := m.CopyDbSku.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyDbSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyDbSku") - } - return err - } - } - - return nil -} - -func (m *AzureSQLEnvBackupParamsProto) validateSQLPackageOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if m.SQLPackageOptions != nil { - if err := m.SQLPackageOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure Sql env backup params proto based on the context it is used -func (m *AzureSQLEnvBackupParamsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyDbSku(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLPackageOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLEnvBackupParamsProto) contextValidateCopyDbSku(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyDbSku != nil { - - if swag.IsZero(m.CopyDbSku) { // not required - return nil - } - - if err := m.CopyDbSku.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyDbSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyDbSku") - } - return err - } - } - - return nil -} - -func (m *AzureSQLEnvBackupParamsProto) contextValidateSQLPackageOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLPackageOptions != nil { - - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if err := m.SQLPackageOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLEnvBackupParamsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLEnvBackupParamsProto) UnmarshalBinary(b []byte) error { - var res AzureSQLEnvBackupParamsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/azure_subscription.go b/v1/models/azure_subscription.go deleted file mode 100644 index 1f37462a..00000000 --- a/v1/models/azure_subscription.go +++ /dev/null @@ -1,50 +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" -) - -// AzureSubscription Message that represents an Azure subscription. -// -// swagger:model AzureSubscription -type AzureSubscription struct { - - // Id of the Azure subscription. - SubscriptionID *string `json:"subscription_id,omitempty"` -} - -// Validate validates this azure subscription -func (m *AzureSubscription) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this azure subscription based on context it is used -func (m *AzureSubscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSubscription) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSubscription) UnmarshalBinary(b []byte) error { - var res AzureSubscription - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_attempt_state_proto.go b/v1/models/backup_job_attempt_state_proto.go deleted file mode 100644 index fc53fa8f..00000000 --- a/v1/models/backup_job_attempt_state_proto.go +++ /dev/null @@ -1,405 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobAttemptStateProto This message contains persistent information about a specific backup -// instance attempt. It could either be active, or could have finished. -// -// swagger:model BackupJobAttemptStateProto -type BackupJobAttemptStateProto struct { - - // A list of active tasks for the job run attempt. - ActiveTasks []*BackupTaskStateProto `json:"activeTasks"` - - // Contains basic information about the backup run attempt. - Base *BackupJobTaskStateBaseProto `json:"base,omitempty"` - - // A list of sources that the job should not backup. These sources can be at - // any level in the entity hierarchy. - ExcludeSources []*BackupJobProtoExcludeSource `json:"excludeSources"` - - // A list of sources that the job should not backup. These sources can be at - // any level in the entity hierarchy. - // TODO(Chinmaya): Remove after removing references. - ExcludeSourcesDEPRECATED []*PrivateEntityProto `json:"excludeSources_DEPRECATED"` - - // This will be set to true if the backup attempt was started despite a - // scheduling failure (in this case, the attempt will abort early). We do - // this so that the user can see that the attempt is marked as failed and - // also so that they can get alerts when we fail to schedule. - FailedToSchedule *bool `json:"failedToSchedule,omitempty"` - - // A list of finished tasks for the job run attempt. Also contains failed - // and cancelled tasks. - FinishedTasks []*BackupTaskStateProto `json:"finishedTasks"` - - // The start time corresponding to the first attempt of this backup job run. - FirstAttemptStartTimeUsecs *int64 `json:"firstAttemptStartTimeUsecs,omitempty"` - - // The maximum number of attempts allowed for this run. - // This is normally a property of the backup job, but we capture it here - // at the beginning of a backup run since the value stored in the backup job - // can change while a run (and its attempts) is ongoing. - MaxAttempts *int32 `json:"maxAttempts,omitempty"` - - // Number of backup tasks that were cancelled. - NumCancelledTasks *int64 `json:"numCancelledTasks,omitempty"` - - // Number of backup tasks that failed. - NumFailedTasks *int64 `json:"numFailedTasks,omitempty"` - - // Number of backup tasks that were skipped. - NumSkippedTasks *int64 `json:"numSkippedTasks,omitempty"` - - // Number of backup tasks that were successful. - NumSuccessfulTasks *int64 `json:"numSuccessfulTasks,omitempty"` - - // TODO(mark): Mark this field as deprecated once Iris stops using it. - // Whether the backup snapshots created by this attempt have been deleted - // (due to either retention policies or because the user asked us to). - SnapshotsDeleted *bool `json:"snapshotsDeleted,omitempty"` - - // Whether all required stats counters and containers have been created for - // this job. - StatsContainersCreated *bool `json:"statsContainersCreated,omitempty"` - - // Id of the task that manages the storage based snapshots of entities - // backed up in this attempt. This field will be set only if storage based - // snapshots is enabled for the backup run this attempt state proto is part - // of. - StorageSnapshotTaskID *int64 `json:"storageSnapshotTaskId,omitempty"` -} - -// Validate validates this backup job attempt state proto -func (m *BackupJobAttemptStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeSourcesDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFinishedTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobAttemptStateProto) validateActiveTasks(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveTasks) { // not required - return nil - } - - for i := 0; i < len(m.ActiveTasks); i++ { - if swag.IsZero(m.ActiveTasks[i]) { // not required - continue - } - - if m.ActiveTasks[i] != nil { - if err := m.ActiveTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) validateBase(formats strfmt.Registry) error { - if swag.IsZero(m.Base) { // not required - return nil - } - - if m.Base != nil { - if err := m.Base.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupJobAttemptStateProto) validateExcludeSources(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeSources) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeSources); i++ { - if swag.IsZero(m.ExcludeSources[i]) { // not required - continue - } - - if m.ExcludeSources[i] != nil { - if err := m.ExcludeSources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) validateExcludeSourcesDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeSourcesDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeSourcesDEPRECATED); i++ { - if swag.IsZero(m.ExcludeSourcesDEPRECATED[i]) { // not required - continue - } - - if m.ExcludeSourcesDEPRECATED[i] != nil { - if err := m.ExcludeSourcesDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) validateFinishedTasks(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedTasks) { // not required - return nil - } - - for i := 0; i < len(m.FinishedTasks); i++ { - if swag.IsZero(m.FinishedTasks[i]) { // not required - continue - } - - if m.FinishedTasks[i] != nil { - if err := m.FinishedTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job attempt state proto based on the context it is used -func (m *BackupJobAttemptStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBase(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeSourcesDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFinishedTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobAttemptStateProto) contextValidateActiveTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveTasks); i++ { - - if m.ActiveTasks[i] != nil { - - if swag.IsZero(m.ActiveTasks[i]) { // not required - return nil - } - - if err := m.ActiveTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) contextValidateBase(ctx context.Context, formats strfmt.Registry) error { - - if m.Base != nil { - - if swag.IsZero(m.Base) { // not required - return nil - } - - if err := m.Base.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupJobAttemptStateProto) contextValidateExcludeSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeSources); i++ { - - if m.ExcludeSources[i] != nil { - - if swag.IsZero(m.ExcludeSources[i]) { // not required - return nil - } - - if err := m.ExcludeSources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) contextValidateExcludeSourcesDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeSourcesDEPRECATED); i++ { - - if m.ExcludeSourcesDEPRECATED[i] != nil { - - if swag.IsZero(m.ExcludeSourcesDEPRECATED[i]) { // not required - return nil - } - - if err := m.ExcludeSourcesDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobAttemptStateProto) contextValidateFinishedTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FinishedTasks); i++ { - - if m.FinishedTasks[i] != nil { - - if swag.IsZero(m.FinishedTasks[i]) { // not required - return nil - } - - if err := m.FinishedTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobAttemptStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobAttemptStateProto) UnmarshalBinary(b []byte) error { - var res BackupJobAttemptStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_audit.go b/v1/models/backup_job_audit.go deleted file mode 100644 index 7e875bfb..00000000 --- a/v1/models/backup_job_audit.go +++ /dev/null @@ -1,166 +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" -) - -// BackupJobAudit BackupJobAudit defines the struct for backup job audit trail. An audit trail -// contains the log of changes made to a backup job over time. -// -// swagger:model BackupJobAudit -type BackupJobAudit struct { - - // After is the struct for BackupJobWrapper after the change. - After *BackupJobWrapper `json:"after,omitempty"` - - // Before is the struct for BackupJobWrapper before the change. - Before *BackupJobWrapper `json:"before,omitempty"` - - // Changes contain the BackupJobFields that have been changed. For example, if - // only job name and job description have changed, then Changes will contain - // [KBackupJobName, KBackupJobDescription]. - Changes []int64 `json:"changes"` -} - -// Validate validates this backup job audit -func (m *BackupJobAudit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAfter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBefore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobAudit) validateAfter(formats strfmt.Registry) error { - if swag.IsZero(m.After) { // not required - return nil - } - - if m.After != nil { - if err := m.After.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("after") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("after") - } - return err - } - } - - return nil -} - -func (m *BackupJobAudit) validateBefore(formats strfmt.Registry) error { - if swag.IsZero(m.Before) { // not required - return nil - } - - if m.Before != nil { - if err := m.Before.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("before") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("before") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job audit based on the context it is used -func (m *BackupJobAudit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAfter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBefore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobAudit) contextValidateAfter(ctx context.Context, formats strfmt.Registry) error { - - if m.After != nil { - - if swag.IsZero(m.After) { // not required - return nil - } - - if err := m.After.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("after") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("after") - } - return err - } - } - - return nil -} - -func (m *BackupJobAudit) contextValidateBefore(ctx context.Context, formats strfmt.Registry) error { - - if m.Before != nil { - - if swag.IsZero(m.Before) { // not required - return nil - } - - if err := m.Before.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("before") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("before") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobAudit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobAudit) UnmarshalBinary(b []byte) error { - var res BackupJobAudit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_pre_or_post_script.go b/v1/models/backup_job_pre_or_post_script.go deleted file mode 100644 index 0b8877a4..00000000 --- a/v1/models/backup_job_pre_or_post_script.go +++ /dev/null @@ -1,274 +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" -) - -// BackupJobPreOrPostScript A message to encapsulate the pre and post scripts associated with a backup -// job. Pre script is executed before backup run of a job starts. Post script -// is executed after backup run of a job finishes. -// Currently, pre and post script is only supported for backup job of type -// 'kPuppeteer' and agent-based backup jobs. -// -// swagger:model BackupJobPreOrPostScript -type BackupJobPreOrPostScript struct { - - // Script specific to the incremental/regular backup. If the script is not - // specified, incremental backup run will fail. - // For agent-based backup jobs, only following script is considered. The - // script file will be looked in the agent installation directory. If the - // file is not present, then it will be logged in Pulse and backup job - // continues without throwing any error/warning. - BackupScript *ScriptPathAndParams `json:"backupScript,omitempty"` - - // Script specific to the full backup. If the script is not specified, full - // backup run will fail. - FullBackupScript *ScriptPathAndParams `json:"fullBackupScript,omitempty"` - - // Script specific to the log backup. If the script is not specified, log - // backup run will fail. - LogBackupScript *ScriptPathAndParams `json:"logBackupScript,omitempty"` - - // Connector params for the host on which script is executed. This field is - // mandatory for job of type kPuppeteer and optional for other job types. - RemoteHostParams *RemoteHostConnectorParams `json:"remoteHostParams,omitempty"` -} - -// Validate validates this backup job pre or post script -func (m *BackupJobPreOrPostScript) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteHostParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobPreOrPostScript) validateBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.BackupScript) { // not required - return nil - } - - if m.BackupScript != nil { - if err := m.BackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobPreOrPostScript) validateFullBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupScript) { // not required - 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 -} - -func (m *BackupJobPreOrPostScript) validateLogBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.LogBackupScript) { // not required - 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 -} - -func (m *BackupJobPreOrPostScript) validateRemoteHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteHostParams) { // not required - return nil - } - - if m.RemoteHostParams != nil { - if err := m.RemoteHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHostParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job pre or post script based on the context it is used -func (m *BackupJobPreOrPostScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobPreOrPostScript) contextValidateBackupScript(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupScript != nil { - - if swag.IsZero(m.BackupScript) { // not required - return nil - } - - if err := m.BackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobPreOrPostScript) 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 *BackupJobPreOrPostScript) 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 *BackupJobPreOrPostScript) contextValidateRemoteHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteHostParams != nil { - - if swag.IsZero(m.RemoteHostParams) { // not required - return nil - } - - if err := m.RemoteHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHostParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobPreOrPostScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobPreOrPostScript) UnmarshalBinary(b []byte) error { - var res BackupJobPreOrPostScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto.go b/v1/models/backup_job_proto.go deleted file mode 100644 index 6f9a7656..00000000 --- a/v1/models/backup_job_proto.go +++ /dev/null @@ -1,2343 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobProto backup job proto -// -// swagger:model BackupJobProto -type BackupJobProto struct { - - // NOTE: Atmost one of abort_in_exclusion_window and pause_in_blackout_window - // will be set to true. - // This field determines whether a backup run should be aborted when it hits - // an exclusion window (assuming that it was started earlier when it was not - // in an exclusion window). - AbortInExclusionWindow *bool `json:"abortInExclusionWindow,omitempty"` - - // Determines the alerting policy for jobs. - AlertingPolicy *AlertingPolicyProto `json:"alertingPolicy,omitempty"` - - // If job deletion status is kDeleteJobAndBackups and this field is set to - // true, then it implies that expiration requests for all archival snapshots - // of this job (if any) have been acknowledged by Icebox. - // NOTE: This field may remain false for some period of time even if - // is_deleted field is set to true for the job. - AllArchivalSnapshotsExpired *bool `json:"allArchivalSnapshotsExpired,omitempty"` - - // Indicates that all the internal replication views have been deleted. - AllInternalReplicationViewsDeleted *bool `json:"allInternalReplicationViewsDeleted,omitempty"` - - // Denotes whether for this host based backup jobs we allow parallel runs or - // not. This is only supported by VMware adapter. - AllowParallelRuns *bool `json:"allowParallelRuns,omitempty"` - - // The backup QoS principal to use for the backup job. - BackupQosPrincipal *int32 `json:"backupQosPrincipal,omitempty"` - - // This contains additional backup params that are applicable to sources - // that are captured as part of the backup job. - // NOTE: The sources could point to higher level entities (such as a - // "Cluster" in VMware environment), but the source params captured here - // will not be for the matching higher level entity, but instead be for - // leaf-level entities (such as VMs). - BackupSourceParams []*BackupSourceParams `json:"backupSourceParams"` - - // Post backup script associated with the backup job for cloud based - // backups. (AWS, Azure, GCP) - CloudPostBackupScript *CloudBackupJobPreOrPostScript `json:"cloudPostBackupScript,omitempty"` - - // Post Snapshot script associated with the backup job for cloud - // based backups. (AWS, Azure, GCP) - CloudPostSnapshotScript *CloudBackupJobPreOrPostScript `json:"cloudPostSnapshotScript,omitempty"` - - // Pre backup script associated with the backup job for cloud based - // backups. (AWS, Azure, GCP) - CloudPreBackupScript *CloudBackupJobPreOrPostScript `json:"cloudPreBackupScript,omitempty"` - - // Common Backup Configuration Parameters - ConfigVec []*ConfigurationParams `json:"configVec"` - - // Whether to continue backing up on quiesce failure. - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // If set to false, a remote view will not be created. - // If set to true and: - // 1) Remote view name is not provided by the user, a remote view is created - // with the same name as source view name. - // 2) Remote view name is provided by the user, a remote view is created with - // the given name. - // NOTE: From 6.6 onwards, remote view is always created for view backups if - // policy has replication. Hence, this bool is only used for Remote Adapter - // jobs (kPuppeteer). - CreateRemoteView *bool `json:"createRemoteView,omitempty"` - - // This will contain the details of network used in transferring the data - // from source account to Cohesity cluster. - // - // Currently it is being used for Azure Native Backups. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // List of source ids for which source side dedup is disabled from the backup - // job. - DedupDisabledSourceIDVec []int64 `json:"dedupDisabledSourceIdVec"` - - // Determines if the job (and associated backups) should be deleted. Once a - // job has been deleted, its status cannot be changed. - DeletionStatus *int32 `json:"deletionStatus,omitempty"` - - // Job description (as entered by the user). - Description *string `json:"description,omitempty"` - - // dr to cloud params - DrToCloudParams *BackupJobProtoDRToCloudParams `json:"drToCloudParams,omitempty"` - - // The parent source in entity hierarchy. This may be set for environments - // such as SQL and Oracle, where the 'parent_source' may be a SQL/Oracle - // root container, while the real parent source in entity hierarchy might be - // a Physical container or a vCenter. - // - // We need to send this to the Rx cluster via Replication or Remote restore - // to generate entity mappings correctly. - // - // NOTE: This field is set only by Magneto. - EhParentSource *EntityProto `json:"ehParentSource,omitempty"` - - // The time (in usecs) after which no backup for the job should be scheduled. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Job level additional environment specific backup params. If this is not - // specified, we will take default actions (for example for NAS environments, - // we will backup all objects within the source). - EnvBackupParams *EnvBackupParams `json:"envBackupParams,omitempty"` - - // The list of sources to exclude from backups. These can have non-leaf-level - // entities, but it's up to the creator to ensure that a child of these - // sources hasn't been explicitly added to 'sources'. - ExcludeSources []*BackupJobProtoExcludeSource `json:"excludeSources"` - - // The list of sources to exclude from backups. These can have non-leaf-level - // entities, but it's up to the creator to ensure that a child of these - // sources hasn't been explicitly added to 'sources'. - ExcludeSourcesDEPRECATED []*EntityProto `json:"excludeSources_DEPRECATED"` - - // Do not run backups in these time-ranges. - ExclusionRanges []*BackupJobProtoExclusionTimeRange `json:"exclusionRanges"` - - // Determines how often full backups should be run. - FullBackupJobPolicy *JobPolicyProto `json:"fullBackupJobPolicy,omitempty"` - - // Same as 'sla_time_mins' above, but applies to full backups. - // NOTE: This value is considered only for full backups that are excepted - // i.e either scheduled or the first full backup and not for full backups - // that happen as a result of incremental backup failure. - FullBackupSLATimeMins *int64 `json:"fullBackupSlaTimeMins,omitempty"` - - // Determines global include and exclude filters which are applied to all - // sources in a physical job. - GlobalIncludeExclude *PhysicalFileBackupParamsGlobalIncludeExclude `json:"globalIncludeExclude,omitempty"` - - // Specifies the list of errors, that should not be persisted in error_db - IgnorableErrorsInErrorDb []*ErrorProto `json:"ignorableErrorsInErrorDb"` - - // Determines the indexing policy (in Yoda) for objects backed up by this - // job. - IndexingPolicy *IndexingPolicyProto `json:"indexingPolicy,omitempty"` - - // Whether the backup job is active or not. Details about what an active job - // is can be found here: https://goo.gl/1mLvS3. - IsActive *bool `json:"isActive,omitempty"` - - // If set to true and backup job policy has CDP parameters as well as - // snapshot replication target policy is specified then data is synchronously - // replicated to the replication target through Atom service. - IsCdpSyncReplicationEnabled *bool `json:"isCdpSyncReplicationEnabled,omitempty"` - - // Denotes whether the backup job is CloudArchiveDirect (excluding NAS direct - // archive in native format). NAS direct archive jobs in native format can be - // identified by checking for the 'is_direct_archive_enabled' field. - IsCloudArchiveDirect *bool `json:"isCloudArchiveDirect,omitempty"` - - // Indicates if Magneto should continue taking source snapshots even if there - // is a pending run. - IsContinuousSnapshottingEnabled *bool `json:"isContinuousSnapshottingEnabled,omitempty"` - - // Tracks whether the backup job has actually been deleted. - // NOTE: If job deletion status is kDeleteJobAndBackups and this field is - // true, then it only implies that all local snapshots have been deleted. - // Status of whether all archival snapshots have been expired can be inferred - // through 'all_archival_snapshots_expired' field. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // This field is set to true if this is a direct archive backup job. - IsDirectArchiveEnabled *bool `json:"isDirectArchiveEnabled,omitempty"` - - // This field is set to true if native format should be used for archiving. - // Applicable for only direct archive jobs. - IsDirectArchiveNativeFormatEnabled *bool `json:"isDirectArchiveNativeFormatEnabled,omitempty"` - - // Whether the backup job is an internal job. These jobs are hidden from the - // user, and are created internally. - IsInternal *bool `json:"isInternal,omitempty"` - - // Whether the backup job is paused. New backup runs are not scheduled for - // the paused backup job. Active run of a backup job (if any) is not - // impacted. - IsPaused *bool `json:"isPaused,omitempty"` - - // Whether the backup job is an RPO policy job. These jobs are hidden from - // the user, and are created internally to have a backup schedule for the - // given source. - IsRpoJob *bool `json:"isRpoJob,omitempty"` - - // A map from entity id of the source to whether the source backup is paused. - IsSourcePausedMap []*BackupJobProtoIsSourcePausedMapEntry `json:"isSourcePausedMap"` - - // Time when this job was first created. - JobCreationTimeUsecs *int64 `json:"jobCreationTimeUsecs,omitempty"` - - // A unique id for locally created jobs. This should only be used to identify - // jobs created on the local cluster. When Iris communicates with Magneto, - // Iris can continue to use this job_id field, which will always be assumed - // to refer to locally created jobs. - // - // For remotely created jobs, the 'job_uid' field should be used. The only - // time Iris should ever need to refer to a remote job is when restoring an - // object from a remote snapshot. In all such cases, Iris should use the - // job_uid field. - JobID *int64 `json:"jobId,omitempty"` - - // Determines how often the job should run and how long the snapshots of the - // job should be retained at various targets. - JobPolicy *JobPolicyProto `json:"jobPolicy,omitempty"` - - // The globally unique id of the job. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Time when this job description was last updated. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // Time when the job was last paused or unpaused. - LastPauseModificationTimeUsecs *int64 `json:"lastPauseModificationTimeUsecs,omitempty"` - - // Last reason for pausing the backup job. Capturing the reason will help in - // resuming only the jobs that were paused because of a reason once the - // reason for pausing is not applicable. - LastPauseReason *int32 `json:"lastPauseReason,omitempty"` - - // Time when this job description was last updated. - LastStartTimeModificationTimeUsecs *int64 `json:"lastStartTimeModificationTimeUsecs,omitempty"` - - // The user who modified the job most recently. - LastUpdatedUsername *string `json:"lastUpdatedUsername,omitempty"` - - // This is set to true by the user if nutanix snapshot is requested - // This is applicable in case if the vcenter in question is registered as a - // management server on a prism endpoint. This flag will be ignored at the - // backend if it is not feasible to leverage nutanix snapshot. - LeverageNutanixSnapshots *bool `json:"leverageNutanixSnapshots,omitempty"` - - // This is set to true by the user in order to backup the objects via a - // dedicated storage area network (SAN), as opposed to transport via LAN or - // management network. - // NOTE: Not all adapters support this method. Currently only VMware. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Whether to leverage the storage array based snapshots for this backup - // job. To leverage storage snapshots, the storage array has to be registered - // as a source. If storage based snapshots can not be taken, job will - // fallback to the default backup method. - // NOTE: This will be set for Pure snapshots. - LeverageStorageSnapshots *bool `json:"leverageStorageSnapshots,omitempty"` - - // This is set to true by the user if hyperflex snapshots are requested - // NOTE: If this is set to true, then leverage_storage_snapshots above should - // be false. - LeverageStorageSnapshotsForHyperflex *bool `json:"leverageStorageSnapshotsForHyperflex,omitempty"` - - // Determines how often log backups should be run (for SQL jobs). - LogBackupJobPolicy *JobPolicyProto `json:"logBackupJobPolicy,omitempty"` - - // Same as 'sla_time_mins' above, but applies to log backups. - LogBackupSLATimeMins *int64 `json:"logBackupSlaTimeMins,omitempty"` - - // Determines the maximum number of source snapshots allowed for a given - // entity in the job. This is only applicable if - // 'is_continuous_snapshotting_enabled' is set to true. - MaxAllowedSourceSnapshots *int32 `json:"maxAllowedSourceSnapshots,omitempty"` - - // The name of this backup job. This must be unique across all jobs. - Name *string `json:"name,omitempty"` - - // Specifies how many recent snapshots of each backed up entity to retain on - // the primary environment. If not specified, then snapshots will not be - // be deleted from the primary environment. - // NOTE: This is only applicable for certain environments like kPure. - NumSnapshotsToKeepOnPrimary *int64 `json:"numSnapshotsToKeepOnPrimary,omitempty"` - - // The universal Id of the ObjectBackupSpecification which is used by this - // backup job.This is relavent only for internal jobs. - ObjectBackupSpecUID *UniversalIDProto `json:"objectBackupSpecUid,omitempty"` - - // The registered source managing all the sources being backed up. This field - // is optional. - ParentSource *EntityProto `json:"parentSource,omitempty"` - - // This field determines whether a backup run should be paused when it hits - // a blackout window (assuming that it was started earlier when it was not - // in an blackout window). The backup run will get resumed when the blackout - // period ends. - PauseInBlackoutWindow *bool `json:"pauseInBlackoutWindow,omitempty"` - - // Whether or not to perform source side dedup. - PerformBrickBasedDedup *bool `json:"performBrickBasedDedup,omitempty"` - - // Whether or not to perform source side dedup. - PerformSourceSideDedup *bool `json:"performSourceSideDedup,omitempty"` - - // Epoch time in milliseconds when the policy was last applied to this job. - // This field will be used to determine whether a policy has changed after - // it was applied to a particular job. - PolicyAppliedTimeMsecs *int64 `json:"policyAppliedTimeMsecs,omitempty"` - - // Id of the policy being applied to the backup job. It is expected to be of - // the form "cluster_id:cluster_instance_id:local_identifier". - PolicyID *string `json:"policyId,omitempty"` - - // The name of the policy referred to by policy_uid. This field can be stale - // and should not be relied upon for the latest name. - PolicyName *string `json:"policyName,omitempty"` - - // Post backup script associated with the backup job. - PostBackupScript *BackupJobPreOrPostScript `json:"postBackupScript,omitempty"` - - // Post snapshot script associated with the backup job. - PostSnapshotScript *BackupJobPreOrPostScript `json:"postSnapshotScript,omitempty"` - - // Pre script associated with the backup job. This field must be specified - // for 'kPuppeteer' job. - PreScript *BackupJobPreOrPostScript `json:"preScript,omitempty"` - - // The globally unique id of the original remote job from which this job was - // derived. - PrimaryJobUID *UniversalIDProto `json:"primaryJobUid,omitempty"` - - // The priority for the job. This is used at admission time - all admitted - // jobs are treated equally. This is also used to determine the Madrox - // replication priority. - Priority *int32 `json:"priority,omitempty"` - - // Whether to take app-consistent snapshots by quiescing apps and the - // filesystem before taking a backup. - Quiesce *bool `json:"quiesce,omitempty"` - - // The globally unique ids of all remote jobs that are linked to this job - // (because of incoming replications). This field will only be populated for - // locally created jobs. This field is populated only for the local(stub) job - // during incoming replications. In the most common case of one cluster - // replicating to another, this field will only have one entry (which is the - // id of the job on Tx side) and matches the primary_job_uid. - // This will have multiple entries in the following situation: - // A->B, A->C replication. - // The backup is failed over to B, and B now starts replicating to C. - // In this case, the stub job at C will have two entries. One is the job - // id from cluster A, and another is the local(stub) job uid from B. - // Also note that since the job originated from A, primary_job_uid for - // all the replicated instances of this job across multiple clusters will - // remain the same (which is equal to the job id from the original cluster - // A). - RemoteJobUids []*UniversalIDProto `json:"remoteJobUids"` - - // A human readable name of the remote view. A remote view is created with - // name overwriting the latest snapshot. - // NOTE: From 6.6 onwards, we support protecting multiple views within a - // protection group, 'remote_view_params' is the new field which captures - // this information for view backups, 'remote_view_name' here is now only - // used for Remote Adapter jobs (kPuppeteer). - RemoteViewName *string `json:"remoteViewName,omitempty"` - - // remote view params - RemoteViewParams *BackupJobProtoRemoteViewParams `json:"remoteViewParams,omitempty"` - - // The features that are strictly required to be supported by the cluster - // of the backup job. This is currently used in the following cases: - // 1. Tx cluster looks at the Rx cluster's supported features and replicates - // the backup job only if all the features captured here are supported. - // 2. When performing remote restore of a backup job from an archival, this - // job will be retrieved only if the cluster supports all the features - // listed here. - RequiredFeatureVec []string `json:"requiredFeatureVec"` - - // Whether to skip Rigel for backup or not. This field is applicable only for - // DMaaS. This field is currently being used in DRaaS workflows only. - SkipRigelForBackup *bool `json:"skipRigelForBackup,omitempty"` - - // If set to true, skips tenant related validations. Default is false. - SkipTenantValidations *bool `json:"skipTenantValidations,omitempty"` - - // If specified, this variable determines the amount of time (after backup - // has started) in which backup is expected to finish for this job. An SLA - // violation is counted against this job if the amount of time taken exceeds - // this amount. - SLATimeMins *int64 `json:"slaTimeMins,omitempty"` - - // Determines include and exclude filters which are applied to entities in - // a backup source. For SQL, this will be applicable only for auto protect - // sources. - SourceFilters *SourceFilters `json:"sourceFilters,omitempty"` - - // The list of sources that should be backed up. A source in this list could - // be a descendant of another source in the list (this will be used when - // specifying override backup schedules). - Sources []*BackupJobProtoBackupSource `json:"sources"` - - // User provided resource(s) for creating a standby VM for each entity - // present in this backup job. For example in case of VMware, the user will - // provide the vCenter, datastore and resource pool on which the standby VM - // should be created. - // TODO(hmehra) Can the user edit this after the job is created or the - // resources have been specified? - StandbyResourceVec []*StandbyResource `json:"standbyResourceVec"` - - // The time when the backup runs for the job should start. This is only - // applicable if the policy for the job has a daily or monthly schedule. - StartTime *Time `json:"startTime,omitempty"` - - // Whether this backup job has a policy for storage array snapshot based - // backups. - StorageArraySnapshot *bool `json:"storageArraySnapshot,omitempty"` - - // Scheduling and retention policy for stubbing jobs. - StubbingPolicy *StubbingPolicyProto `json:"stubbingPolicy,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 - // create a 'kPuppeteer' job to backup Oracle DB for 'payroll' department. - // User can specify following tags: 'payroll', 'Oracle_DB'. - TagVec []string `json:"tagVec"` - - // This is a vector of timeouts, for different backup - // types(kFull, kRegular). A cancellation will automatically gets triggered - // if the backup tasks inside a run has been running for more than this - // timeout duration. - TaskTimeoutVec []*CancellationTimeout `json:"taskTimeoutVec"` - - // Timezone of the backup job. All time fields (i.e., TimeOfDay) in this - // backup job are stored wrt to this timezone. - // - // The time zones have unique names of the form "Area/Location", - // e.g. "America/New_York". We are using "America/Los_Angeles" as a default - // value so as to be backward compatible with pre-2.7 code. - Timezone *string `json:"timezone,omitempty"` - - // Whether to truncate logs after a backup run. This is currently only - // relevant for full or incremental backups in a SQL environment. - TruncateLogs *bool `json:"truncateLogs,omitempty"` - - // The type of environment this backup job corresponds to. - Type *int32 `json:"type,omitempty"` - - // Information if any about the user that owns this job. - UserInfo *UserInformation `json:"userInfo,omitempty"` - - // The view box to which data will be written. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this backup job proto -func (m *BackupJobProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupSourceParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudPostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudPostSnapshotScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudPreBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDrToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEhParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeSourcesDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExclusionRanges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullBackupJobPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalIncludeExclude(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnorableErrorsInErrorDb(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsSourcePausedMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupJobPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectBackupSpecUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostSnapshotScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteJobUids(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyResourceVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStubbingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskTimeoutVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProto) validateAlertingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingPolicy) { // not required - return nil - } - - if m.AlertingPolicy != nil { - if err := m.AlertingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateBackupSourceParams(formats strfmt.Registry) error { - if swag.IsZero(m.BackupSourceParams) { // not required - return nil - } - - for i := 0; i < len(m.BackupSourceParams); i++ { - if swag.IsZero(m.BackupSourceParams[i]) { // not required - continue - } - - if m.BackupSourceParams[i] != nil { - if err := m.BackupSourceParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupSourceParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupSourceParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateCloudPostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.CloudPostBackupScript) { // not required - return nil - } - - if m.CloudPostBackupScript != nil { - if err := m.CloudPostBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPostBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPostBackupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateCloudPostSnapshotScript(formats strfmt.Registry) error { - if swag.IsZero(m.CloudPostSnapshotScript) { // not required - return nil - } - - if m.CloudPostSnapshotScript != nil { - if err := m.CloudPostSnapshotScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPostSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPostSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateCloudPreBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.CloudPreBackupScript) { // not required - return nil - } - - if m.CloudPreBackupScript != nil { - if err := m.CloudPreBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPreBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPreBackupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateConfigVec(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigVec) { // not required - return nil - } - - for i := 0; i < len(m.ConfigVec); i++ { - if swag.IsZero(m.ConfigVec[i]) { // not required - continue - } - - if m.ConfigVec[i] != nil { - if err := m.ConfigVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateDrToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DrToCloudParams) { // not required - return nil - } - - if m.DrToCloudParams != nil { - if err := m.DrToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drToCloudParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateEhParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.EhParentSource) { // not required - return nil - } - - if m.EhParentSource != nil { - if err := m.EhParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ehParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ehParentSource") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateEnvBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.EnvBackupParams) { // not required - return nil - } - - if m.EnvBackupParams != nil { - if err := m.EnvBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("envBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("envBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateExcludeSources(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeSources) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeSources); i++ { - if swag.IsZero(m.ExcludeSources[i]) { // not required - continue - } - - if m.ExcludeSources[i] != nil { - if err := m.ExcludeSources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateExcludeSourcesDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeSourcesDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeSourcesDEPRECATED); i++ { - if swag.IsZero(m.ExcludeSourcesDEPRECATED[i]) { // not required - continue - } - - if m.ExcludeSourcesDEPRECATED[i] != nil { - if err := m.ExcludeSourcesDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateExclusionRanges(formats strfmt.Registry) error { - if swag.IsZero(m.ExclusionRanges) { // not required - return nil - } - - for i := 0; i < len(m.ExclusionRanges); i++ { - if swag.IsZero(m.ExclusionRanges[i]) { // not required - continue - } - - if m.ExclusionRanges[i] != nil { - if err := m.ExclusionRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateFullBackupJobPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupJobPolicy) { // not required - return nil - } - - if m.FullBackupJobPolicy != nil { - if err := m.FullBackupJobPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupJobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupJobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateGlobalIncludeExclude(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalIncludeExclude) { // not required - return nil - } - - if m.GlobalIncludeExclude != nil { - if err := m.GlobalIncludeExclude.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeExclude") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeExclude") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateIgnorableErrorsInErrorDb(formats strfmt.Registry) error { - if swag.IsZero(m.IgnorableErrorsInErrorDb) { // not required - return nil - } - - for i := 0; i < len(m.IgnorableErrorsInErrorDb); i++ { - if swag.IsZero(m.IgnorableErrorsInErrorDb[i]) { // not required - continue - } - - if m.IgnorableErrorsInErrorDb[i] != nil { - if err := m.IgnorableErrorsInErrorDb[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateIsSourcePausedMap(formats strfmt.Registry) error { - if swag.IsZero(m.IsSourcePausedMap) { // not required - return nil - } - - for i := 0; i < len(m.IsSourcePausedMap); i++ { - if swag.IsZero(m.IsSourcePausedMap[i]) { // not required - continue - } - - if m.IsSourcePausedMap[i] != nil { - if err := m.IsSourcePausedMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isSourcePausedMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isSourcePausedMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateJobPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.JobPolicy) { // not required - return nil - } - - if m.JobPolicy != nil { - if err := m.JobPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *BackupJobProto) validateLogBackupJobPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.LogBackupJobPolicy) { // not required - return nil - } - - if m.LogBackupJobPolicy != nil { - if err := m.LogBackupJobPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupJobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupJobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateObjectBackupSpecUID(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectBackupSpecUID) { // not required - return nil - } - - if m.ObjectBackupSpecUID != nil { - if err := m.ObjectBackupSpecUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupSpecUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupSpecUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validatePostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScript) { // not required - 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 -} - -func (m *BackupJobProto) validatePostSnapshotScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if m.PostSnapshotScript != nil { - if err := m.PostSnapshotScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validatePreScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if m.PreScript != nil { - if err := m.PreScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validatePrimaryJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryJobUID) { // not required - return nil - } - - if m.PrimaryJobUID != nil { - if err := m.PrimaryJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateRemoteJobUids(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteJobUids) { // not required - return nil - } - - for i := 0; i < len(m.RemoteJobUids); i++ { - if swag.IsZero(m.RemoteJobUids[i]) { // not required - continue - } - - if m.RemoteJobUids[i] != nil { - if err := m.RemoteJobUids[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteJobUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteJobUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateRemoteViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteViewParams) { // not required - return nil - } - - if m.RemoteViewParams != nil { - if err := m.RemoteViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateSourceFilters(formats strfmt.Registry) error { - if swag.IsZero(m.SourceFilters) { // not required - return nil - } - - if m.SourceFilters != nil { - if err := m.SourceFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceFilters") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateStandbyResourceVec(formats strfmt.Registry) error { - if swag.IsZero(m.StandbyResourceVec) { // not required - return nil - } - - for i := 0; i < len(m.StandbyResourceVec); i++ { - if swag.IsZero(m.StandbyResourceVec[i]) { // not required - continue - } - - if m.StandbyResourceVec[i] != nil { - if err := m.StandbyResourceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyResourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyResourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *BackupJobProto) validateStubbingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StubbingPolicy) { // not required - return nil - } - - if m.StubbingPolicy != nil { - if err := m.StubbingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stubbingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stubbingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) validateTaskTimeoutVec(formats strfmt.Registry) error { - if swag.IsZero(m.TaskTimeoutVec) { // not required - return nil - } - - for i := 0; i < len(m.TaskTimeoutVec); i++ { - if swag.IsZero(m.TaskTimeoutVec[i]) { // not required - continue - } - - if m.TaskTimeoutVec[i] != nil { - if err := m.TaskTimeoutVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job proto based on the context it is used -func (m *BackupJobProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupSourceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudPostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudPostSnapshotScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudPreBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfigVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDrToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEhParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnvBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeSourcesDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExclusionRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullBackupJobPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalIncludeExclude(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnorableErrorsInErrorDb(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsSourcePausedMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupJobPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectBackupSpecUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostSnapshotScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteJobUids(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandbyResourceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStubbingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskTimeoutVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProto) contextValidateAlertingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertingPolicy != nil { - - if swag.IsZero(m.AlertingPolicy) { // not required - return nil - } - - if err := m.AlertingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateBackupSourceParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupSourceParams); i++ { - - if m.BackupSourceParams[i] != nil { - - if swag.IsZero(m.BackupSourceParams[i]) { // not required - return nil - } - - if err := m.BackupSourceParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupSourceParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupSourceParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateCloudPostBackupScript(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudPostBackupScript != nil { - - if swag.IsZero(m.CloudPostBackupScript) { // not required - return nil - } - - if err := m.CloudPostBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPostBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPostBackupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateCloudPostSnapshotScript(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudPostSnapshotScript != nil { - - if swag.IsZero(m.CloudPostSnapshotScript) { // not required - return nil - } - - if err := m.CloudPostSnapshotScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPostSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPostSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateCloudPreBackupScript(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudPreBackupScript != nil { - - if swag.IsZero(m.CloudPreBackupScript) { // not required - return nil - } - - if err := m.CloudPreBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPreBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPreBackupScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateConfigVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConfigVec); i++ { - - if m.ConfigVec[i] != nil { - - if swag.IsZero(m.ConfigVec[i]) { // not required - return nil - } - - if err := m.ConfigVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateDrToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DrToCloudParams != nil { - - if swag.IsZero(m.DrToCloudParams) { // not required - return nil - } - - if err := m.DrToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drToCloudParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateEhParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.EhParentSource != nil { - - if swag.IsZero(m.EhParentSource) { // not required - return nil - } - - if err := m.EhParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ehParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ehParentSource") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateEnvBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EnvBackupParams != nil { - - if swag.IsZero(m.EnvBackupParams) { // not required - return nil - } - - if err := m.EnvBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("envBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("envBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateExcludeSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeSources); i++ { - - if m.ExcludeSources[i] != nil { - - if swag.IsZero(m.ExcludeSources[i]) { // not required - return nil - } - - if err := m.ExcludeSources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateExcludeSourcesDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeSourcesDEPRECATED); i++ { - - if m.ExcludeSourcesDEPRECATED[i] != nil { - - if swag.IsZero(m.ExcludeSourcesDEPRECATED[i]) { // not required - return nil - } - - if err := m.ExcludeSourcesDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSources_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateExclusionRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExclusionRanges); i++ { - - if m.ExclusionRanges[i] != nil { - - if swag.IsZero(m.ExclusionRanges[i]) { // not required - return nil - } - - if err := m.ExclusionRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateFullBackupJobPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FullBackupJobPolicy != nil { - - if swag.IsZero(m.FullBackupJobPolicy) { // not required - return nil - } - - if err := m.FullBackupJobPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupJobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupJobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateGlobalIncludeExclude(ctx context.Context, formats strfmt.Registry) error { - - if m.GlobalIncludeExclude != nil { - - if swag.IsZero(m.GlobalIncludeExclude) { // not required - return nil - } - - if err := m.GlobalIncludeExclude.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeExclude") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeExclude") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateIgnorableErrorsInErrorDb(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IgnorableErrorsInErrorDb); i++ { - - if m.IgnorableErrorsInErrorDb[i] != nil { - - if swag.IsZero(m.IgnorableErrorsInErrorDb[i]) { // not required - return nil - } - - if err := m.IgnorableErrorsInErrorDb[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateIsSourcePausedMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IsSourcePausedMap); i++ { - - if m.IsSourcePausedMap[i] != nil { - - if swag.IsZero(m.IsSourcePausedMap[i]) { // not required - return nil - } - - if err := m.IsSourcePausedMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isSourcePausedMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isSourcePausedMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateJobPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.JobPolicy != nil { - - if swag.IsZero(m.JobPolicy) { // not required - return nil - } - - if err := m.JobPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) 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 -} - -func (m *BackupJobProto) contextValidateLogBackupJobPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.LogBackupJobPolicy != nil { - - if swag.IsZero(m.LogBackupJobPolicy) { // not required - return nil - } - - if err := m.LogBackupJobPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupJobPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupJobPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateObjectBackupSpecUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectBackupSpecUID != nil { - - if swag.IsZero(m.ObjectBackupSpecUID) { // not required - return nil - } - - if err := m.ObjectBackupSpecUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupSpecUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupSpecUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) 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 *BackupJobProto) contextValidatePostSnapshotScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostSnapshotScript != nil { - - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if err := m.PostSnapshotScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidatePreScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScript != nil { - - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if err := m.PreScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidatePrimaryJobUID(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryJobUID != nil { - - if swag.IsZero(m.PrimaryJobUID) { // not required - return nil - } - - if err := m.PrimaryJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateRemoteJobUids(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteJobUids); i++ { - - if m.RemoteJobUids[i] != nil { - - if swag.IsZero(m.RemoteJobUids[i]) { // not required - return nil - } - - if err := m.RemoteJobUids[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteJobUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteJobUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateRemoteViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteViewParams != nil { - - if swag.IsZero(m.RemoteViewParams) { // not required - return nil - } - - if err := m.RemoteViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateSourceFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceFilters != nil { - - if swag.IsZero(m.SourceFilters) { // not required - return nil - } - - if err := m.SourceFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceFilters") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateStandbyResourceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StandbyResourceVec); i++ { - - if m.StandbyResourceVec[i] != nil { - - if swag.IsZero(m.StandbyResourceVec[i]) { // not required - return nil - } - - if err := m.StandbyResourceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyResourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyResourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) 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 -} - -func (m *BackupJobProto) contextValidateStubbingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StubbingPolicy != nil { - - if swag.IsZero(m.StubbingPolicy) { // not required - return nil - } - - if err := m.StubbingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stubbingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stubbingPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobProto) contextValidateTaskTimeoutVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskTimeoutVec); i++ { - - if m.TaskTimeoutVec[i] != nil { - - if swag.IsZero(m.TaskTimeoutVec[i]) { // not required - return nil - } - - if err := m.TaskTimeoutVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobProto) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProto) UnmarshalBinary(b []byte) error { - var res BackupJobProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_backup_source.go b/v1/models/backup_job_proto_backup_source.go deleted file mode 100644 index 968650ff..00000000 --- a/v1/models/backup_job_proto_backup_source.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobProtoBackupSource backup job proto backup source -// -// swagger:model BackupJobProto_BackupSource -type BackupJobProtoBackupSource struct { - - // Source entities. - // NOTE: Multiple sources can be specified here for non-leaf-level entities - // in the hierarchy. The sources obtained after expanding these will be - // intersected among each other to form the final set of sources. - // e.g. this can be used to backup only those VMs that have both the - // tags 'SQL' and '3hrs'. - Entities []*EntityProto `json:"entities"` -} - -// Validate validates this backup job proto backup source -func (m *BackupJobProtoBackupSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntities(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoBackupSource) validateEntities(formats strfmt.Registry) error { - if swag.IsZero(m.Entities) { // not required - return nil - } - - for i := 0; i < len(m.Entities); i++ { - if swag.IsZero(m.Entities[i]) { // not required - continue - } - - if m.Entities[i] != nil { - if err := m.Entities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job proto backup source based on the context it is used -func (m *BackupJobProtoBackupSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoBackupSource) contextValidateEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Entities); i++ { - - if m.Entities[i] != nil { - - if swag.IsZero(m.Entities[i]) { // not required - return nil - } - - if err := m.Entities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoBackupSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoBackupSource) UnmarshalBinary(b []byte) error { - var res BackupJobProtoBackupSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_d_r_to_cloud_params.go b/v1/models/backup_job_proto_d_r_to_cloud_params.go deleted file mode 100644 index 456386b6..00000000 --- a/v1/models/backup_job_proto_d_r_to_cloud_params.go +++ /dev/null @@ -1,63 +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" -) - -// BackupJobProtoDRToCloudParams DR to Cloud Parameters. -// -// A Proto needed in case objects backed up by this job need to DR to cloud. -// "Fail over" signifies the mechanism to move the workload to cloud. -// -// swagger:model BackupJobProto_DRToCloudParams -type BackupJobProtoDRToCloudParams struct { - - // Whether the objects in this job will be failed over to cloud. - // In case of VMs, we need to fetch information about the logical volumes - // present on the VM. Magneto might fail backup of a VM in case volume - // information can not be fetched (maybe because the agent is not installed - // or if the VM is turned off etc.). - // - // The VM will be backed up using the physical agent when it is running in - // the cloud. We might choose to backup the VM in the cloud using native - // API at a later point. - // - // This flag makes sense when configuring a job to backup on-prem VMs. - NeedToFailOver *bool `json:"needToFailOver,omitempty"` -} - -// Validate validates this backup job proto d r to cloud params -func (m *BackupJobProtoDRToCloudParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job proto d r to cloud params based on context it is used -func (m *BackupJobProtoDRToCloudParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoDRToCloudParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoDRToCloudParams) UnmarshalBinary(b []byte) error { - var res BackupJobProtoDRToCloudParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_exclude_source.go b/v1/models/backup_job_proto_exclude_source.go deleted file mode 100644 index b3421719..00000000 --- a/v1/models/backup_job_proto_exclude_source.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobProtoExcludeSource backup job proto exclude source -// -// swagger:model BackupJobProto_ExcludeSource -type BackupJobProtoExcludeSource struct { - - // An intersection of leaf-level entities will be obtained after expanding - // the following entities. - Entities []*EntityProto `json:"entities"` -} - -// Validate validates this backup job proto exclude source -func (m *BackupJobProtoExcludeSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntities(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoExcludeSource) validateEntities(formats strfmt.Registry) error { - if swag.IsZero(m.Entities) { // not required - return nil - } - - for i := 0; i < len(m.Entities); i++ { - if swag.IsZero(m.Entities[i]) { // not required - continue - } - - if m.Entities[i] != nil { - if err := m.Entities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job proto exclude source based on the context it is used -func (m *BackupJobProtoExcludeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoExcludeSource) contextValidateEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Entities); i++ { - - if m.Entities[i] != nil { - - if swag.IsZero(m.Entities[i]) { // not required - return nil - } - - if err := m.Entities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoExcludeSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoExcludeSource) UnmarshalBinary(b []byte) error { - var res BackupJobProtoExcludeSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_exclusion_time_range.go b/v1/models/backup_job_proto_exclusion_time_range.go deleted file mode 100644 index 6791487b..00000000 --- a/v1/models/backup_job_proto_exclusion_time_range.go +++ /dev/null @@ -1,164 +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" -) - -// BackupJobProtoExclusionTimeRange A proto to specify a time range within a single day when backups are not -// permitted to run. -// -// swagger:model BackupJobProto_ExclusionTimeRange -type BackupJobProtoExclusionTimeRange struct { - - // If the day is not set, the time range applies to all days. - Day *int32 `json:"day,omitempty"` - - // End time of the time range. - EndTime *Time `json:"endTime,omitempty"` - - // Start time of the time range. - StartTime *Time `json:"startTime,omitempty"` -} - -// Validate validates this backup job proto exclusion time range -func (m *BackupJobProtoExclusionTimeRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoExclusionTimeRange) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *BackupJobProtoExclusionTimeRange) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this backup job proto exclusion time range based on the context it is used -func (m *BackupJobProtoExclusionTimeRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoExclusionTimeRange) 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 *BackupJobProtoExclusionTimeRange) 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 -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoExclusionTimeRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoExclusionTimeRange) UnmarshalBinary(b []byte) error { - var res BackupJobProtoExclusionTimeRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_is_source_paused_map_entry.go b/v1/models/backup_job_proto_is_source_paused_map_entry.go deleted file mode 100644 index 315efdc2..00000000 --- a/v1/models/backup_job_proto_is_source_paused_map_entry.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" -) - -// BackupJobProtoIsSourcePausedMapEntry backup job proto is source paused map entry -// -// swagger:model BackupJobProto_IsSourcePausedMapEntry -type BackupJobProtoIsSourcePausedMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *bool `json:"value,omitempty"` -} - -// Validate validates this backup job proto is source paused map entry -func (m *BackupJobProtoIsSourcePausedMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job proto is source paused map entry based on context it is used -func (m *BackupJobProtoIsSourcePausedMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoIsSourcePausedMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoIsSourcePausedMapEntry) UnmarshalBinary(b []byte) error { - var res BackupJobProtoIsSourcePausedMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_remote_view_params.go b/v1/models/backup_job_proto_remote_view_params.go deleted file mode 100644 index bb67580e..00000000 --- a/v1/models/backup_job_proto_remote_view_params.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobProtoRemoteViewParams For view backups, this field stores the remote view name parameters. -// -// From 6.6 onwards, we always create remote view for view backups if policy -// has replication, hence 'create_remote_view' bool is not added here. -// -// swagger:model BackupJobProto_RemoteViewParams -type BackupJobProtoRemoteViewParams struct { - - // A map from view id on source cluster to the view name params on remote - // cluster. This is applicable for view backups with replication configured - // in the policy. - RemoteViewMap []*BackupJobProtoRemoteViewParamsRemoteViewMapEntry `json:"remoteViewMap"` -} - -// Validate validates this backup job proto remote view params -func (m *BackupJobProtoRemoteViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteViewMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoRemoteViewParams) validateRemoteViewMap(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteViewMap) { // not required - return nil - } - - for i := 0; i < len(m.RemoteViewMap); i++ { - if swag.IsZero(m.RemoteViewMap[i]) { // not required - continue - } - - if m.RemoteViewMap[i] != nil { - if err := m.RemoteViewMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job proto remote view params based on the context it is used -func (m *BackupJobProtoRemoteViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteViewMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoRemoteViewParams) contextValidateRemoteViewMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteViewMap); i++ { - - if m.RemoteViewMap[i] != nil { - - if swag.IsZero(m.RemoteViewMap[i]) { // not required - return nil - } - - if err := m.RemoteViewMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParams) UnmarshalBinary(b []byte) error { - var res BackupJobProtoRemoteViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_remote_view_params_remote_view_map_entry.go b/v1/models/backup_job_proto_remote_view_params_remote_view_map_entry.go deleted file mode 100644 index 9a230835..00000000 --- a/v1/models/backup_job_proto_remote_view_params_remote_view_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// BackupJobProtoRemoteViewParamsRemoteViewMapEntry backup job proto remote view params remote view map entry -// -// swagger:model BackupJobProto_RemoteViewParams_RemoteViewMapEntry -type BackupJobProtoRemoteViewParamsRemoteViewMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *BackupJobProtoRemoteViewParamsRemoteViewParamsPerView `json:"value,omitempty"` -} - -// Validate validates this backup job proto remote view params remote view map entry -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) 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 -} - -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job proto remote view params remote view map entry based on the context it is used -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParamsRemoteViewMapEntry) UnmarshalBinary(b []byte) error { - var res BackupJobProtoRemoteViewParamsRemoteViewMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_proto_remote_view_params_remote_view_params_per_view.go b/v1/models/backup_job_proto_remote_view_params_remote_view_params_per_view.go deleted file mode 100644 index 39efe148..00000000 --- a/v1/models/backup_job_proto_remote_view_params_remote_view_params_per_view.go +++ /dev/null @@ -1,54 +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" -) - -// BackupJobProtoRemoteViewParamsRemoteViewParamsPerView backup job proto remote view params remote view params per view -// -// swagger:model BackupJobProto_RemoteViewParams_RemoteViewParamsPerView -type BackupJobProtoRemoteViewParamsRemoteViewParamsPerView struct { - - // If 'use_same_name_as_source_view' is false, below name should be - // populated. - RemoteViewName *string `json:"remoteViewName,omitempty"` - - // Whether remote view name will be same as the source view name. - UseSameNameAsSourceView *bool `json:"useSameNameAsSourceView,omitempty"` -} - -// Validate validates this backup job proto remote view params remote view params per view -func (m *BackupJobProtoRemoteViewParamsRemoteViewParamsPerView) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job proto remote view params remote view params per view based on context it is used -func (m *BackupJobProtoRemoteViewParamsRemoteViewParamsPerView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParamsRemoteViewParamsPerView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobProtoRemoteViewParamsRemoteViewParamsPerView) UnmarshalBinary(b []byte) error { - var res BackupJobProtoRemoteViewParamsRemoteViewParamsPerView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_run_state_proto.go b/v1/models/backup_job_run_state_proto.go deleted file mode 100644 index e455551c..00000000 --- a/v1/models/backup_job_run_state_proto.go +++ /dev/null @@ -1,1129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobRunStateProto This message contains persistent information about a specific backup -// instance run (which could include one or more backup run attempts). -// -// swagger:model BackupJobRunStateProto -type BackupJobRunStateProto struct { - - // If there is an ongoing active attempt, this field contains that attempt. - ActiveAttempt *BackupJobAttemptStateProto `json:"activeAttempt,omitempty"` - - // Refer to RunBackupJobOnceArg.additional_param_vec for details about how - // this is used. - AdditionalParamVec []*BackupTaskAdditionalParams `json:"additionalParamVec"` - - // Additional environment specific information stored at the run level. - AdditionalRunInfo AdditionalRunInfo `json:"additionalRunInfo,omitempty"` - - // In case of direct archive we want to generate archive uid at the time of - // backup run creation. This field will be used to store this. - // - // Please note that we currently support only one archival target for direct - // archive job. - ArchiveJobUID *UniversalIDProto `json:"archiveJobUid,omitempty"` - - // Contains basic information about the backup run. - Base *BackupJobTaskStateBaseProto `json:"base,omitempty"` - - // Action to take on the backup run when blackout window starts. This is - // inherited from the job settings and policy. However, this can be - // overridden kNone in the following cases: - // (a) An OOB run is triggered during an exclusion window. - // (b) A paused run is resumed by user during an exclusion window. - BlackoutWindowAction *int32 `json:"blackoutWindowAction,omitempty"` - - // This field specifies the copy snapshot params of the backup run. Note that - // this list MUST contain at least the params for the 'kLocal' target. - // Params for other targets can be specified if the snapshots have to be - // copied to those targets. - // - // Note that this field must be set if the above field 'is_out_of_band_run' - // is set to true and is used to override the copy targets of the backup run - // as defined in the job policy. - CopySnapshotParamsVec []*CopySnapshotParams `json:"copySnapshotParamsVec"` - - // The time beyond which the backup run should not be allowed to run - // (cancelled or paused based on blackout_window_action). - // NOTE: This field is deprecated as of 6.7. Instead of saving the deadline - // time within the run, we rely on periodically checking for exclusion window - // ranges configured in the policy to figure out whether a run should be - // canceled or paused/resumed. - DeadlineTimeUsecs *int64 `json:"deadlineTimeUsecs,omitempty"` - - // DRToCloud params, the backup job was configured with, when the backup run - // happened. - DrToCloudParams *BackupJobProtoDRToCloudParams `json:"drToCloudParams,omitempty"` - - // Run level additional environment specific backup params. If this is not - // specified, we will take default actions (for example for NAS environments, - // we will backup all objects within the source). - EnvBackupParams *EnvBackupParams `json:"envBackupParams,omitempty"` - - // The list of all finished attempts corresponding to this backup run. - FinishedAttempts []*BackupJobAttemptStateProto `json:"finishedAttempts"` - - // Specifies the list of errors, that should be ignored in error - // messages, error files - IgnorableErrorsInErrorDb []*PrivateErrorProto `json:"ignorableErrorsInErrorDb"` - - // Whether this run has been triggered by a failover operation. - IsFailoverRun *bool `json:"isFailoverRun,omitempty"` - - // Whether this is a missed run created due to scheduling constraints. - IsMissedRun *bool `json:"isMissedRun,omitempty"` - - // Whether this is a out of band (OOB) backup run scheduled by a user. An - // OOB snapshot and the list of targets (if any) to which the snapshot was - // copied to are ignored when determining: - // 1. If backup run needs to be scheduled for the backup job and - // 2. If the snapshots of another backup run needs to be copied to a target - // to satisfy the backup job policy. - IsOutOfBandRun *bool `json:"isOutOfBandRun,omitempty"` - - // A list of the latest finished task for each source in the job run. - LatestFinishedTasks []*BackupTaskStateProto `json:"latestFinishedTasks"` - - // This is set to true by the user if nutanix snapshots are requested - // This is applicable in case if the vcenter in question is registered as a - // management server on a prism endpoint. This flag will be ignored at the - // backend if it is not feasible to leverage nutanix snapshot. - LeverageNutanixSnapshots *bool `json:"leverageNutanixSnapshots,omitempty"` - - // This is set to true by the user in order to backup the objects via SAN - // transport, as opposed to NBDSSL transport. - // NOTE: Not all adapters support this method. Currently only VMware. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Whether to leverage the storage array based snapshots for this backup - // run. If storage based snapshots can not be taken for the sources, then - // we will fallback to the default backup method. - LeverageStorageSnapshots *bool `json:"leverageStorageSnapshots,omitempty"` - - // Whether the metadata for this backup run has been deleted from the - // master's state. If this field is true, it also implies that the backup - // snapshots on SnapFS have been deleted (i.e., 'snapshots_deleted' has to - // be true as well). - MetadataDeleted *bool `json:"metadataDeleted,omitempty"` - - // This will be populated with the timestamp at which the run's metadata - // was marked as deleted (should be set only when 'metadata_deleted' is - // true). - MetadataDeletedTimestampUsecs *int64 `json:"metadataDeletedTimestampUsecs,omitempty"` - - // Total number of application instances backed up by this run. For example, - // if the environment type is kSQL, this number is for the SQL server - // instances. - // - // TODO(abhijit): Deprecate this since we do not backup instances - // themselves. We only backup databases. - NumAppInstances *int32 `json:"numAppInstances,omitempty"` - - // Total number of application objects whose backup was cancelled. - NumCancelledAppObjects *int32 `json:"numCancelledAppObjects,omitempty"` - - // Number of backup tasks that were cancelled in the run so far. - NumCancelledTasks *int64 `json:"numCancelledTasks,omitempty"` - - // Total number of application objects that failed the backup. - NumFailedAppObjects *int32 `json:"numFailedAppObjects,omitempty"` - - // Number of backup tasks that failed in the run so far. - NumFailedTasks *int64 `json:"numFailedTasks,omitempty"` - - // Number of backup tasks that were skipped in the run so far. - NumSkippedTasks *int64 `json:"numSkippedTasks,omitempty"` - - // Total number of application objects successfully backed up by this run. - // For example, for SQL and Oracle environments, this will be the number - // of databases successfully backed up by this run. - NumSuccessfulAppObjects *int32 `json:"numSuccessfulAppObjects,omitempty"` - - // Number of backup tasks that were successful in the run so far. - NumSuccessfulTasks *int64 `json:"numSuccessfulTasks,omitempty"` - - // The name of the original cluster on which this run executed. - OriginClusterName *string `json:"originClusterName,omitempty"` - - // The originator type for this run. This specifies the origin from where - // this run came to this cluster. The possibilities are: - // 1) kLocal: This is a local run. - // 2) kRemote: This is a remote replicated run. - // 3) kArchival: This run was remote restored by Icebox. - OriginatorType *int32 `json:"originatorType,omitempty"` - - // Retention policy that applies to this run. - // We can no longer depend on protection policy settings - // for retentions due to multiple schedule support in CBS. - // At the time of scheduling, the best schedule is picked - // from amongst possible schedules and the retention - // policy associated with that schedule is preserved here - // to be used during a backup run. - // This object will be nuked after copy task generation. - // TODO(Suchi): Nuke the object when support for job runs - // with multiple schedules is added. - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` - - // Optional field to add some label to the run. - // Currently this is used only for labelling backup runs when run-now is - // requested for failover. - RunLabel *string `json:"runLabel,omitempty"` - - // This is a vector of timeouts, taken from the policy,for different backup - // types(kFull, kRegular). A cancellation will automatically gets triggered - // if the backup run has been running for more than this timeout duration. - RunTimeoutVec []*CancellationTimeout `json:"runTimeoutVec"` - - // If this backup run was received via an incoming replication from another - // cluster, and the replication failed with an error, this field will contain - // the details of the replication error. If this field is set, the snapshots - // for the sources may not exist on SnapFS, and hence the backup run should - // be considered as an invalid run entirely. - RxReplicationError *PrivateErrorProto `json:"rxReplicationError,omitempty"` - - // A list of targets where the snapshots of this backup run will possibly be - // copied to. If the backup run encounters an error, the snapshots may not - // actually end up being copied to these targets. - SnapshotTargetsDEPRECATED []*SnapshotTarget `json:"snapshotTargets_DEPRECATED"` - - // Whether the backup snapshots created on SnapFS by this run have been - // deleted (due to either retention policies or because the user asked us - // to). The metadata for such backup runs might still be preserved in the - // master's state (unless the 'metadata_deleted' field is also set to true). - SnapshotsDeleted *bool `json:"snapshotsDeleted,omitempty"` - - // This will be populated with the timestamp at which the run was marked as - // removed. - SnapshotsDeletedTimestampUsecs *int64 `json:"snapshotsDeletedTimestampUsecs,omitempty"` - - // The environment type of the sources that are being backed up. This can - // possibly be different than the environment type of the backup job itself - // (e.g., a SQL backup job can be backing up SQL databases that are running - // within a VMware source environment). - SourceEnvType *int32 `json:"sourceEnvType,omitempty"` - - // This field is set to true if the run is created for backup of type - // storage array snapshot. - StorageArraySnapshot *bool `json:"storageArraySnapshot,omitempty"` - - // Same as above, but applies to all the tasks inside this backup run. - TaskTimeoutVec []*CancellationTimeout `json:"taskTimeoutVec"` - - // WORM protection details. This field is inherited from protection policy - // at the start of a backup run. For copy tasks of type kLocal, the - // data_lock_constraints field in CopyBackupRunTaskStateProto has higher - // precedence over this. - WormRetention *WormRetentionProto `json:"wormRetention,omitempty"` - - // Magneto will create root progress monitor task path for Yoda AddSnapshot - // RPCs. This field stores that path. - YodaProgressMonitorRootPath *string `json:"yodaProgressMonitorRootPath,omitempty"` -} - -// Validate validates this backup job run state proto -func (m *BackupJobRunStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveAttempt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdditionalParamVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchiveJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopySnapshotParamsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDrToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFinishedAttempts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnorableErrorsInErrorDb(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatestFinishedTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeoutVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRxReplicationError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTargetsDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskTimeoutVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobRunStateProto) validateActiveAttempt(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveAttempt) { // not required - return nil - } - - if m.ActiveAttempt != nil { - if err := m.ActiveAttempt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeAttempt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeAttempt") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateAdditionalParamVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalParamVec) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalParamVec); i++ { - if swag.IsZero(m.AdditionalParamVec[i]) { // not required - continue - } - - if m.AdditionalParamVec[i] != nil { - if err := m.AdditionalParamVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParamVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParamVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateArchiveJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveJobUID) { // not required - return nil - } - - if m.ArchiveJobUID != nil { - if err := m.ArchiveJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateBase(formats strfmt.Registry) error { - if swag.IsZero(m.Base) { // not required - return nil - } - - if m.Base != nil { - if err := m.Base.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateCopySnapshotParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.CopySnapshotParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.CopySnapshotParamsVec); i++ { - if swag.IsZero(m.CopySnapshotParamsVec[i]) { // not required - continue - } - - if m.CopySnapshotParamsVec[i] != nil { - if err := m.CopySnapshotParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateDrToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DrToCloudParams) { // not required - return nil - } - - if m.DrToCloudParams != nil { - if err := m.DrToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drToCloudParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateEnvBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.EnvBackupParams) { // not required - return nil - } - - if m.EnvBackupParams != nil { - if err := m.EnvBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("envBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("envBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateFinishedAttempts(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedAttempts) { // not required - return nil - } - - for i := 0; i < len(m.FinishedAttempts); i++ { - if swag.IsZero(m.FinishedAttempts[i]) { // not required - continue - } - - if m.FinishedAttempts[i] != nil { - if err := m.FinishedAttempts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateIgnorableErrorsInErrorDb(formats strfmt.Registry) error { - if swag.IsZero(m.IgnorableErrorsInErrorDb) { // not required - return nil - } - - for i := 0; i < len(m.IgnorableErrorsInErrorDb); i++ { - if swag.IsZero(m.IgnorableErrorsInErrorDb[i]) { // not required - continue - } - - if m.IgnorableErrorsInErrorDb[i] != nil { - if err := m.IgnorableErrorsInErrorDb[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateLatestFinishedTasks(formats strfmt.Registry) error { - if swag.IsZero(m.LatestFinishedTasks) { // not required - return nil - } - - for i := 0; i < len(m.LatestFinishedTasks); i++ { - if swag.IsZero(m.LatestFinishedTasks[i]) { // not required - continue - } - - if m.LatestFinishedTasks[i] != nil { - if err := m.LatestFinishedTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestFinishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestFinishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateRunTimeoutVec(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeoutVec) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeoutVec); i++ { - if swag.IsZero(m.RunTimeoutVec[i]) { // not required - continue - } - - if m.RunTimeoutVec[i] != nil { - if err := m.RunTimeoutVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateRxReplicationError(formats strfmt.Registry) error { - if swag.IsZero(m.RxReplicationError) { // not required - return nil - } - - if m.RxReplicationError != nil { - if err := m.RxReplicationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rxReplicationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rxReplicationError") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) validateSnapshotTargetsDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetsDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotTargetsDEPRECATED); i++ { - if swag.IsZero(m.SnapshotTargetsDEPRECATED[i]) { // not required - continue - } - - if m.SnapshotTargetsDEPRECATED[i] != nil { - if err := m.SnapshotTargetsDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargets_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargets_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateTaskTimeoutVec(formats strfmt.Registry) error { - if swag.IsZero(m.TaskTimeoutVec) { // not required - return nil - } - - for i := 0; i < len(m.TaskTimeoutVec); i++ { - if swag.IsZero(m.TaskTimeoutVec[i]) { // not required - continue - } - - if m.TaskTimeoutVec[i] != nil { - if err := m.TaskTimeoutVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) validateWormRetention(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetention) { // not required - return nil - } - - if m.WormRetention != nil { - if err := m.WormRetention.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormRetention") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job run state proto based on the context it is used -func (m *BackupJobRunStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveAttempt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdditionalParamVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchiveJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBase(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopySnapshotParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDrToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnvBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFinishedAttempts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnorableErrorsInErrorDb(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLatestFinishedTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeoutVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRxReplicationError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTargetsDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskTimeoutVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWormRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobRunStateProto) contextValidateActiveAttempt(ctx context.Context, formats strfmt.Registry) error { - - if m.ActiveAttempt != nil { - - if swag.IsZero(m.ActiveAttempt) { // not required - return nil - } - - if err := m.ActiveAttempt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeAttempt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeAttempt") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateAdditionalParamVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalParamVec); i++ { - - if m.AdditionalParamVec[i] != nil { - - if swag.IsZero(m.AdditionalParamVec[i]) { // not required - return nil - } - - if err := m.AdditionalParamVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParamVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParamVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateArchiveJobUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchiveJobUID != nil { - - if swag.IsZero(m.ArchiveJobUID) { // not required - return nil - } - - if err := m.ArchiveJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateBase(ctx context.Context, formats strfmt.Registry) error { - - if m.Base != nil { - - if swag.IsZero(m.Base) { // not required - return nil - } - - if err := m.Base.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateCopySnapshotParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopySnapshotParamsVec); i++ { - - if m.CopySnapshotParamsVec[i] != nil { - - if swag.IsZero(m.CopySnapshotParamsVec[i]) { // not required - return nil - } - - if err := m.CopySnapshotParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateDrToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DrToCloudParams != nil { - - if swag.IsZero(m.DrToCloudParams) { // not required - return nil - } - - if err := m.DrToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drToCloudParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateEnvBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EnvBackupParams != nil { - - if swag.IsZero(m.EnvBackupParams) { // not required - return nil - } - - if err := m.EnvBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("envBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("envBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateFinishedAttempts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FinishedAttempts); i++ { - - if m.FinishedAttempts[i] != nil { - - if swag.IsZero(m.FinishedAttempts[i]) { // not required - return nil - } - - if err := m.FinishedAttempts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateIgnorableErrorsInErrorDb(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IgnorableErrorsInErrorDb); i++ { - - if m.IgnorableErrorsInErrorDb[i] != nil { - - if swag.IsZero(m.IgnorableErrorsInErrorDb[i]) { // not required - return nil - } - - if err := m.IgnorableErrorsInErrorDb[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignorableErrorsInErrorDb" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateLatestFinishedTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LatestFinishedTasks); i++ { - - if m.LatestFinishedTasks[i] != nil { - - if swag.IsZero(m.LatestFinishedTasks[i]) { // not required - return nil - } - - if err := m.LatestFinishedTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestFinishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestFinishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateRunTimeoutVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeoutVec); i++ { - - if m.RunTimeoutVec[i] != nil { - - if swag.IsZero(m.RunTimeoutVec[i]) { // not required - return nil - } - - if err := m.RunTimeoutVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateRxReplicationError(ctx context.Context, formats strfmt.Registry) error { - - if m.RxReplicationError != nil { - - if swag.IsZero(m.RxReplicationError) { // not required - return nil - } - - if err := m.RxReplicationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rxReplicationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rxReplicationError") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateSnapshotTargetsDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotTargetsDEPRECATED); i++ { - - if m.SnapshotTargetsDEPRECATED[i] != nil { - - if swag.IsZero(m.SnapshotTargetsDEPRECATED[i]) { // not required - return nil - } - - if err := m.SnapshotTargetsDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargets_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargets_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateTaskTimeoutVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskTimeoutVec); i++ { - - if m.TaskTimeoutVec[i] != nil { - - if swag.IsZero(m.TaskTimeoutVec[i]) { // not required - return nil - } - - if err := m.TaskTimeoutVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobRunStateProto) contextValidateWormRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.WormRetention != nil { - - if swag.IsZero(m.WormRetention) { // not required - return nil - } - - if err := m.WormRetention.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormRetention") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobRunStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobRunStateProto) UnmarshalBinary(b []byte) error { - var res BackupJobRunStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_runs_proto.go b/v1/models/backup_job_runs_proto.go deleted file mode 100644 index 1943a5de..00000000 --- a/v1/models/backup_job_runs_proto.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobRunsProto A message to encapsulate a job description and runs associated with the job. -// -// It's possible for some of the runs to have used a previous version of the -// job description (as only the latest description is placed in this message). -// -// swagger:model BackupJobRunsProto -type BackupJobRunsProto struct { - - // The job for which jobs runs are being sent back. - JobDescription *BackupJobProto `json:"jobDescription,omitempty"` - - // Runs satisfying the filter criteria. For each job, runs are guaranteed to - // be sorted in descending order of the start time of the run. The first - // entry in the list is the newest run, and the last entry is the oldest run. - ProtectionRuns []*ProtectionRunStateProto `json:"protectionRuns"` -} - -// Validate validates this backup job runs proto -func (m *BackupJobRunsProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobRunsProto) validateJobDescription(formats strfmt.Registry) error { - if swag.IsZero(m.JobDescription) { // not required - return nil - } - - if m.JobDescription != nil { - if err := m.JobDescription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobDescription") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunsProto) validateProtectionRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRuns) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionRuns); i++ { - if swag.IsZero(m.ProtectionRuns[i]) { // not required - continue - } - - if m.ProtectionRuns[i] != nil { - if err := m.ProtectionRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job runs proto based on the context it is used -func (m *BackupJobRunsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobDescription(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobRunsProto) contextValidateJobDescription(ctx context.Context, formats strfmt.Registry) error { - - if m.JobDescription != nil { - - if swag.IsZero(m.JobDescription) { // not required - return nil - } - - if err := m.JobDescription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobDescription") - } - return err - } - } - - return nil -} - -func (m *BackupJobRunsProto) contextValidateProtectionRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionRuns); i++ { - - if m.ProtectionRuns[i] != nil { - - if swag.IsZero(m.ProtectionRuns[i]) { // not required - return nil - } - - if err := m.ProtectionRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobRunsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobRunsProto) UnmarshalBinary(b []byte) error { - var res BackupJobRunsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_summary_proto.go b/v1/models/backup_job_summary_proto.go deleted file mode 100644 index 72d4fbd2..00000000 --- a/v1/models/backup_job_summary_proto.go +++ /dev/null @@ -1,449 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobSummaryProto backup job summary proto -// -// swagger:model BackupJobSummaryProto -type BackupJobSummaryProto struct { - - // Information about change mode (if any) running for this backup job. - ActiveChangeModeState *ChangeBackupJobModeProto `json:"activeChangeModeState,omitempty"` - - // List of tenant ids that are authorized to access/modify this backup job - // when multi-tenancy is enabled in the cluster. - AuthorizedTenantIDVec []string `json:"authorizedTenantIdVec"` - - // Average run time for a successful instance of the job. - AvgRunTimeUsecs *int64 `json:"avgRunTimeUsecs,omitempty"` - - // Information about last finished change mode operation (if any). - FinishedChangeModeState *ChangeBackupJobModeProto `json:"finishedChangeModeState,omitempty"` - - // Entities which are not valid for a job. Currently used only for O365 - // OneDrive case. - InvalidEntityInfoVec []*BackupJobSummaryProtoMissingEntityInfo `json:"invalidEntityInfoVec"` - - // Denotes whether the backup job is CloudArchiveDirect (excluding NAS direct - // archive in native format). NAS direct archive jobs in native format can be - // identified by checking for the 'is_direct_archive_enabled' field in the - // job_description proto. - // TODO(prem): This field is redundant, since the same information is - // populated in job description during CloudArchiveDirect job creation. - // Remove this field once Iris stops referring to it. - IsCloudArchiveDirect *bool `json:"isCloudArchiveDirect,omitempty"` - - // Set to true if it is protected by protectonce policy. - // NOTE: Below field is filled only while sending response to iris. - // Internally master can infer whether this is a protect-once job by looking - // at the policy. - IsProtectOnce *bool `json:"isProtectOnce,omitempty"` - - // The job for which summary is being described below. - JobDescription *BackupJobProto `json:"jobDescription,omitempty"` - - // Information about the most recent protection run of the job. - LastProtectionRun *ProtectionRunStateProto `json:"lastProtectionRun,omitempty"` - - // Time taken for the slowest successful run of the job. - MaxRunTimeUsecs *int64 `json:"maxRunTimeUsecs,omitempty"` - - // Time taken for the fastest successful run of the job. - MinRunTimeUsecs *int64 `json:"minRunTimeUsecs,omitempty"` - - // Deprecated fields below. - MissingEntityIDVec []int64 `json:"missingEntityIdVec"` - - // missing entity info vec - MissingEntityInfoVec []*BackupJobSummaryProtoMissingEntityInfo `json:"missingEntityInfoVec"` - - // num cancelled job runs - NumCancelledJobRuns *int64 `json:"numCancelledJobRuns,omitempty"` - - // num failed job runs - NumFailedJobRuns *int64 `json:"numFailedJobRuns,omitempty"` - - // Number of objects backed up by various runs of the job. NOTE: If an object - // was backed up in two different runs of the same job, it will be counted - // twice. - NumObjectsBackedUp *int64 `json:"numObjectsBackedUp,omitempty"` - - // Total number of SLA violations. - NumSLAViolations *int64 `json:"numSlaViolations,omitempty"` - - // Number of successful, failed and cancelled runs the job has had. - NumSuccessfulJobRuns *int64 `json:"numSuccessfulJobRuns,omitempty"` - - // Total amount of data read from the source of the backup. - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Logical size of all the backups combined. This is the amount of data we - // would have read from the source(s) had each run of the backup job been a - // full-backup. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Physical size in bytes of all entities backed up by this job over all - // finished backups combined. This field could be empty if there is no known - // information. - TotalPhysicalBackupSizeBytes *int64 `json:"totalPhysicalBackupSizeBytes,omitempty"` -} - -// Validate validates this backup job summary proto -func (m *BackupJobSummaryProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveChangeModeState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFinishedChangeModeState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInvalidEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastProtectionRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMissingEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryProto) validateActiveChangeModeState(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveChangeModeState) { // not required - return nil - } - - if m.ActiveChangeModeState != nil { - if err := m.ActiveChangeModeState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeChangeModeState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeChangeModeState") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) validateFinishedChangeModeState(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedChangeModeState) { // not required - return nil - } - - if m.FinishedChangeModeState != nil { - if err := m.FinishedChangeModeState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedChangeModeState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedChangeModeState") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) validateInvalidEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.InvalidEntityInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.InvalidEntityInfoVec); i++ { - if swag.IsZero(m.InvalidEntityInfoVec[i]) { // not required - continue - } - - if m.InvalidEntityInfoVec[i] != nil { - if err := m.InvalidEntityInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("invalidEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("invalidEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobSummaryProto) validateJobDescription(formats strfmt.Registry) error { - if swag.IsZero(m.JobDescription) { // not required - return nil - } - - if m.JobDescription != nil { - if err := m.JobDescription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobDescription") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) validateLastProtectionRun(formats strfmt.Registry) error { - if swag.IsZero(m.LastProtectionRun) { // not required - return nil - } - - if m.LastProtectionRun != nil { - if err := m.LastProtectionRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastProtectionRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastProtectionRun") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) validateMissingEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.MissingEntityInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.MissingEntityInfoVec); i++ { - if swag.IsZero(m.MissingEntityInfoVec[i]) { // not required - continue - } - - if m.MissingEntityInfoVec[i] != nil { - if err := m.MissingEntityInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job summary proto based on the context it is used -func (m *BackupJobSummaryProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveChangeModeState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFinishedChangeModeState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInvalidEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobDescription(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastProtectionRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMissingEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryProto) contextValidateActiveChangeModeState(ctx context.Context, formats strfmt.Registry) error { - - if m.ActiveChangeModeState != nil { - - if swag.IsZero(m.ActiveChangeModeState) { // not required - return nil - } - - if err := m.ActiveChangeModeState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeChangeModeState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeChangeModeState") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) contextValidateFinishedChangeModeState(ctx context.Context, formats strfmt.Registry) error { - - if m.FinishedChangeModeState != nil { - - if swag.IsZero(m.FinishedChangeModeState) { // not required - return nil - } - - if err := m.FinishedChangeModeState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedChangeModeState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedChangeModeState") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) contextValidateInvalidEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InvalidEntityInfoVec); i++ { - - if m.InvalidEntityInfoVec[i] != nil { - - if swag.IsZero(m.InvalidEntityInfoVec[i]) { // not required - return nil - } - - if err := m.InvalidEntityInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("invalidEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("invalidEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobSummaryProto) contextValidateJobDescription(ctx context.Context, formats strfmt.Registry) error { - - if m.JobDescription != nil { - - if swag.IsZero(m.JobDescription) { // not required - return nil - } - - if err := m.JobDescription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobDescription") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) contextValidateLastProtectionRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastProtectionRun != nil { - - if swag.IsZero(m.LastProtectionRun) { // not required - return nil - } - - if err := m.LastProtectionRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastProtectionRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastProtectionRun") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryProto) contextValidateMissingEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MissingEntityInfoVec); i++ { - - if m.MissingEntityInfoVec[i] != nil { - - if swag.IsZero(m.MissingEntityInfoVec[i]) { // not required - return nil - } - - if err := m.MissingEntityInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobSummaryProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobSummaryProto) UnmarshalBinary(b []byte) error { - var res BackupJobSummaryProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_summary_proto_missing_entity_info.go b/v1/models/backup_job_summary_proto_missing_entity_info.go deleted file mode 100644 index 5d529a3b..00000000 --- a/v1/models/backup_job_summary_proto_missing_entity_info.go +++ /dev/null @@ -1,116 +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" -) - -// BackupJobSummaryProtoMissingEntityInfo Information about missing entities. Filled only if -// "return_missing_entities" was true. -// -// swagger:model BackupJobSummaryProto_MissingEntityInfo -type BackupJobSummaryProtoMissingEntityInfo struct { - - // entity Id - EntityID *int64 `json:"entityId,omitempty"` - - // entity name - EntityName *string `json:"entityName,omitempty"` - - // parent source - ParentSource *PrivateEntityProto `json:"parentSource,omitempty"` -} - -// Validate validates this backup job summary proto missing entity info -func (m *BackupJobSummaryProtoMissingEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryProtoMissingEntityInfo) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job summary proto missing entity info based on the context it is used -func (m *BackupJobSummaryProtoMissingEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryProtoMissingEntityInfo) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobSummaryProtoMissingEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobSummaryProtoMissingEntityInfo) UnmarshalBinary(b []byte) error { - var res BackupJobSummaryProtoMissingEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_summary_wrapper.go b/v1/models/backup_job_summary_wrapper.go deleted file mode 100644 index 870b2831..00000000 --- a/v1/models/backup_job_summary_wrapper.go +++ /dev/null @@ -1,173 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobSummaryWrapper BackupJobSummaryWrapper defines the struct for backup job summary with -// aggregations for metrics of job runs. -// -// swagger:model BackupJobSummaryWrapper -type BackupJobSummaryWrapper struct { - - // BackupJobSummary is the struct for BackupJobSummaryProto used by magneto. - BackupJobSummary *BackupJobSummaryProto `json:"backupJobSummary,omitempty"` - - // Basic information of tenants having access to this backup job. - Tenants []*TenantInfo `json:"tenants"` -} - -// Validate validates this backup job summary wrapper -func (m *BackupJobSummaryWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupJobSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryWrapper) validateBackupJobSummary(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJobSummary) { // not required - return nil - } - - if m.BackupJobSummary != nil { - if err := m.BackupJobSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobSummary") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryWrapper) validateTenants(formats strfmt.Registry) error { - if swag.IsZero(m.Tenants) { // not required - return nil - } - - for i := 0; i < len(m.Tenants); i++ { - if swag.IsZero(m.Tenants[i]) { // not required - continue - } - - if m.Tenants[i] != nil { - if err := m.Tenants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job summary wrapper based on the context it is used -func (m *BackupJobSummaryWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupJobSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenants(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobSummaryWrapper) contextValidateBackupJobSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupJobSummary != nil { - - if swag.IsZero(m.BackupJobSummary) { // not required - return nil - } - - if err := m.BackupJobSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobSummary") - } - return err - } - } - - return nil -} - -func (m *BackupJobSummaryWrapper) contextValidateTenants(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tenants); i++ { - - if m.Tenants[i] != nil { - - if swag.IsZero(m.Tenants[i]) { // not required - return nil - } - - if err := m.Tenants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobSummaryWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobSummaryWrapper) UnmarshalBinary(b []byte) error { - var res BackupJobSummaryWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_task_state_base_proto.go b/v1/models/backup_job_task_state_base_proto.go deleted file mode 100644 index acc0c718..00000000 --- a/v1/models/backup_job_task_state_base_proto.go +++ /dev/null @@ -1,890 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobTaskStateBaseProto backup job task state base proto -// -// swagger:model BackupJobTaskStateBaseProto -type BackupJobTaskStateBaseProto struct { - - // The time at which the backup task was admitted to run on a Magneto slave. - // This field will be set only after the status changes to 'kAdmitted'. - // Using this field, amount of time spent in the waiting/queued state and the - // amount of time taken taken to actually run the task can be determined. - // wait time = admitted_time_usecs - start_time_usecs - // run time = end_time_usecs - admitted_time_usecs - // - // Please note that this field is only set for backup task. It is not - // applicable for the top level backup job. - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // The attempt number of the job run this proto is a part of. - AttemptNum *int32 `json:"attemptNum,omitempty"` - - // The type of the scheduled backup run. - BackupType *int32 `json:"backupType,omitempty"` - - // If the job was cancelled, this will contain the reason for cancellation. - CancellationReason *int32 `json:"cancellationReason,omitempty"` - - // Whether this job or task has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // Connector group id associated with the task. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Whether to continue backing up on quiesce failure. - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // List of source ids for which source side dedup is disabled from the backup - // job. - DedupDisabledSourceIDVec []int64 `json:"dedupDisabledSourceIdVec"` - - // Whether or not to do brick based file backup. - EnableBrickLevelChecksum *bool `json:"enableBrickLevelChecksum,omitempty"` - - // If status is kFinished, this field contains the end time for the backup - // job or task. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Map from entity id to cancellation reason. This map contains the entity - // ids of object which need to be cancel. If multiple cancellation requests - // with different sets of entity ids will be added in this map. - EntityIdsToCancel []*BackupJobTaskStateBaseProtoEntityIdsToCancelEntry `json:"entityIdsToCancel"` - - // The error encountered by this job or task instance (if any). Only valid if - // the status of the job is kFinished. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Determines global include and exclude filters which are applied to all - // sources in a physical backup job. - GlobalIncludeExclude *PhysicalFileBackupParamsGlobalIncludeExclude `json:"globalIncludeExclude,omitempty"` - - // The inode id floor set on the view associated with this backup run or - // backup task after the backup for the run or task is complete. This can be - // used to do incremental archival of a subsequent backup run or task (by - // only archiving those SnapTree nodes whose inode id is greater than this - // value of this floor). - InodeIDFloor *int64 `json:"inodeIdFloor,omitempty"` - - // Whether this is run/attempt/task was created as part of an auto protection - // job. - IsAutoprotect *bool `json:"isAutoprotect,omitempty"` - - // Whether this is a full or regular backup of the job/task. - // NOTE: This can possibly be set to true even if the scheduled backup type - // is kRegular (e.g., when this corresponds to the first backup run of the - // job/task or if no previous snapshot information is found). - IsFullBackup *bool `json:"isFullBackup,omitempty"` - - // Specifies whether the tiering goal has been met. - IsTieringGoalMet *bool `json:"isTieringGoalMet,omitempty"` - - // The id of the locally created job whose data this proto represents. This - // field should only be used for jobs created on the local cluster. For jobs - // created remotely, the job_uid field below should be used. - JobID *int64 `json:"jobId,omitempty"` - - // A cluster wide unique instance id. Each time a job is run it gets a new - // instance id. This helps identify different runs of a job. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // The globally unique id of the job whose data this proto represents. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Network realm id associated with the task. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` - - // The pause state of the protection group run or task. This field will be - // populated throughout the life of job run or task. - PauseState *BackupJobTaskStateBaseProtoPauseState `json:"pauseState,omitempty"` - - // Whether or not to do brick based dedup. - PerformBrickBasedDedup *bool `json:"performBrickBasedDedup,omitempty"` - - // Whether or not to do source side dedup. - PerformSourceSideDedup *bool `json:"performSourceSideDedup,omitempty"` - - // Denotes time when gatekeeper permit is granted to the backup task. If the - // backup task is rescheduled on new slave due to errors, the field is - // updated to time when permit is granted again. - PermitGrantTimeUsecs *int64 `json:"permitGrantTimeUsecs,omitempty"` - - // Field to indicate whether parallel backup is enabled for physical files - PhysicalFileParallelBackupEnabled *bool `json:"physicalFileParallelBackupEnabled,omitempty"` - - // The globally unique id of the original remote job from which this job - // (whose data this proto represents) was derived. - PrimaryJobUID *UniversalIDProto `json:"primaryJobUid,omitempty"` - - // This field means slightly different things depending on the type of - // proto this base proto is a member of: - // If this is a member of BackupJobAttemptStateProto, the value refers to - // the root path of a Pulse task tracking the progress of a backup run - // attempt. - // If this is a member of BackupJobRunStateProto, the field is not set. - // If this is a member of BackupTaskStateProto, the value refers to - // the full path of a Pulse task tracking the progress of backup of an - // individual object (i.e, VM in vmware env) within that backup run. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // Whether to take app-consistent snapshots by quiescing apps and the - // filesystem before taking a backup. - Quiesce *bool `json:"quiesce,omitempty"` - - // SLA deadline implied by protection policy, if applicable. - // For RPO jobs, this is the RPO deadline. - SLADeadlineTimeUsecs *int64 `json:"slaDeadlineTimeUsecs,omitempty"` - - // True if the job SLA was violated. Only valid if status is kFinished. - SLAViolated *bool `json:"slaViolated,omitempty"` - - // Determines include and exclude filters which are applied to entities in - // a backup source. For SQL, this will be applicable only for auto protect - // sources. - SourceFilters *SourceFilters `json:"sourceFilters,omitempty"` - - // A list of sources being protected, along with the scheduled time for which - // it is being backed up. - Sources []*BackupJobTaskStateBaseProtoSourceState `json:"sources"` - - // The start time for this backup job or task. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Id of the Stats counter used to track the physical bytes written by the - // backup task or the backup attempt. This field is not populated if this - // proto is part of BackupJobRunStateProto. - StatsCounterID *string `json:"statsCounterId,omitempty"` - - // Current state of the job or task. - Status *int32 `json:"status,omitempty"` - - // Denotes time when gatekeeper permit is granted to the backup subtask. The - // key of map is subtask id and value is time when the permit was granted to - // subtask. - // TODO(prem): Get rid after removing all references. - SubtaskToPermitGrantTimeUsecsMapDEPRECATED []*BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry `json:"subtaskToPermitGrantTimeUsecsMap_DEPRECATED"` - - // List of successfully protected entities by the task. - SuccessfullyProtectedEntities []*PrivateEntityProto `json:"successfullyProtectedEntities"` - - // Total amount of data read from the source of the backup (so far). - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Total amount of data successfully tiered from the NAS source. - TotalBytesTiered *int64 `json:"totalBytesTiered,omitempty"` - - // Total amount of data to be read from the source of the backup. This field - // is set only if this base proto is a member of a BackupTaskStateProto. - TotalBytesToReadFromSource *int64 `json:"totalBytesToReadFromSource,omitempty"` - - // Logical size of this backup job or task. This is the amount of data we - // would have read from the source(s) had this been a full backup. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Total amount of time a task/run has been in paused state. This information - // along with start_time_usecs, will be used to calculate the active running - // duration of a backup run/task. - TotalPauseTimeUsecs *int64 `json:"totalPauseTimeUsecs,omitempty"` - - // Total amount of physical space used by Cohesity to store this backup job - // or task. Savings achieved from all underlying storage technologies - // (including things like compression, and deduplication) is taken into - // account. To give a concrete example, if the logical backup size is 1GB, - // but only 1MB was used by Cohesity to store it (as the rest of the data - // was de-duplicated), this variable would reflect 1MB. - // - // This value means slightly different things depending on the type of - // proto this base proto is a member of: - // If this is a member of BackupJobAttemptStateProto, this value reflects - // the total physical space used by a specific job run attempt. - // If this is a member of BackupJobRunStateProto, this value reflects - // the total physical space used across all attempts in the job run. - // If this is a member of BackupTaskStateProto, this value reflects the - // cumulative total physical space used by that task. - // - // This value might change over time even after a job run finishes, - // e.g., if bridge performs post-dedup. However the expectation is that - // after some time, this value will become relatively stable (when it is a - // member of BackupJobAttemptStateProto). - TotalPhysicalBackupSizeBytes *int64 `json:"totalPhysicalBackupSizeBytes,omitempty"` - - // The size of the source being backed up in this backup job or task. Size of - // a leaf level source/entity in the backup task is used to determine the - // weight to be assigned to that task in the backup job progress monitor. - // Please note that value of this field is based on the size of the VM disks - // before any snapshot is taken, while the value of the below field - // 'total_logical_backup_size_bytes' is based on the size of the VM disks - // after the snapshot is taken. - TotalSourceSizeBytes *int64 `json:"totalSourceSizeBytes,omitempty"` - - // In some apps, the usage size may differ from the logical size - // E.g. in SQL the file is pre-allocated. In that case the usage - // of actual data in the file maybe lower than the file size - TotalUsageSizeBytes *int64 `json:"totalUsageSizeBytes,omitempty"` - - // The type of environment that the job/task is operating on. - Type *int32 `json:"type,omitempty"` - - // A message displayed to the user for this job or task instance (if any). - // Only valid if the status of the job is kFinished. This is used for - // informing the user about a finished job or task, when there is not an - // error. - UserMessage *string `json:"userMessage,omitempty"` - - // The view box to which backed up data must be saved. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // The view name where snapshots will be kept for this backup run or backup - // task. This will not be set for some environments like kView and - // kPuppeteer. If this is not set for other supported environments, a default - // view for the environment will be used. - ViewName *string `json:"viewName,omitempty"` - - // Details of why the task is waiting, this is set when the task is waiting. - // This is only considered when status is kReadyToSchedule. This is currently - // populated when this task is waiting for a task in an older run to finish. - // This might happen becuase we have parallel runs and the older task is - // holding lock on the entity to be backed up. - WaitingReason *string `json:"waitingReason,omitempty"` - - // The warnings encountered by this job or task instance (if any) during the - // backup run. - Warnings []*PrivateErrorProto `json:"warnings"` -} - -// Validate validates this backup job task state base proto -func (m *BackupJobTaskStateBaseProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityIdsToCancel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalIncludeExclude(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePauseState(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubtaskToPermitGrantTimeUsecsMapDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSuccessfullyProtectedEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateEntityIdsToCancel(formats strfmt.Registry) error { - if swag.IsZero(m.EntityIdsToCancel) { // not required - return nil - } - - for i := 0; i < len(m.EntityIdsToCancel); i++ { - if swag.IsZero(m.EntityIdsToCancel[i]) { // not required - continue - } - - if m.EntityIdsToCancel[i] != nil { - if err := m.EntityIdsToCancel[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityIdsToCancel" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityIdsToCancel" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *BackupJobTaskStateBaseProto) validateGlobalIncludeExclude(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalIncludeExclude) { // not required - return nil - } - - if m.GlobalIncludeExclude != nil { - if err := m.GlobalIncludeExclude.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeExclude") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeExclude") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *BackupJobTaskStateBaseProto) validatePauseState(formats strfmt.Registry) error { - if swag.IsZero(m.PauseState) { // not required - return nil - } - - if m.PauseState != nil { - if err := m.PauseState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseState") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validatePrimaryJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryJobUID) { // not required - return nil - } - - if m.PrimaryJobUID != nil { - if err := m.PrimaryJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateSourceFilters(formats strfmt.Registry) error { - if swag.IsZero(m.SourceFilters) { // not required - return nil - } - - if m.SourceFilters != nil { - if err := m.SourceFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceFilters") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateSubtaskToPermitGrantTimeUsecsMapDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED); i++ { - if swag.IsZero(m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i]) { // not required - continue - } - - if m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i] != nil { - if err := m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subtaskToPermitGrantTimeUsecsMap_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subtaskToPermitGrantTimeUsecsMap_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateSuccessfullyProtectedEntities(formats strfmt.Registry) error { - if swag.IsZero(m.SuccessfullyProtectedEntities) { // not required - return nil - } - - for i := 0; i < len(m.SuccessfullyProtectedEntities); i++ { - if swag.IsZero(m.SuccessfullyProtectedEntities[i]) { // not required - continue - } - - if m.SuccessfullyProtectedEntities[i] != nil { - if err := m.SuccessfullyProtectedEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("successfullyProtectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("successfullyProtectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job task state base proto based on the context it is used -func (m *BackupJobTaskStateBaseProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityIdsToCancel(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalIncludeExclude(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePauseState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubtaskToPermitGrantTimeUsecsMapDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSuccessfullyProtectedEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateEntityIdsToCancel(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityIdsToCancel); i++ { - - if m.EntityIdsToCancel[i] != nil { - - if swag.IsZero(m.EntityIdsToCancel[i]) { // not required - return nil - } - - if err := m.EntityIdsToCancel[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityIdsToCancel" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityIdsToCancel" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) 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 -} - -func (m *BackupJobTaskStateBaseProto) contextValidateGlobalIncludeExclude(ctx context.Context, formats strfmt.Registry) error { - - if m.GlobalIncludeExclude != nil { - - if swag.IsZero(m.GlobalIncludeExclude) { // not required - return nil - } - - if err := m.GlobalIncludeExclude.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeExclude") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeExclude") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) 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 -} - -func (m *BackupJobTaskStateBaseProto) contextValidatePauseState(ctx context.Context, formats strfmt.Registry) error { - - if m.PauseState != nil { - - if swag.IsZero(m.PauseState) { // not required - return nil - } - - if err := m.PauseState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseState") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidatePrimaryJobUID(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryJobUID != nil { - - if swag.IsZero(m.PrimaryJobUID) { // not required - return nil - } - - if err := m.PrimaryJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryJobUid") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateSourceFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceFilters != nil { - - if swag.IsZero(m.SourceFilters) { // not required - return nil - } - - if err := m.SourceFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceFilters") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateSubtaskToPermitGrantTimeUsecsMapDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED); i++ { - - if m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i] != nil { - - if swag.IsZero(m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i]) { // not required - return nil - } - - if err := m.SubtaskToPermitGrantTimeUsecsMapDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subtaskToPermitGrantTimeUsecsMap_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subtaskToPermitGrantTimeUsecsMap_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateSuccessfullyProtectedEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SuccessfullyProtectedEntities); i++ { - - if m.SuccessfullyProtectedEntities[i] != nil { - - if swag.IsZero(m.SuccessfullyProtectedEntities[i]) { // not required - return nil - } - - if err := m.SuccessfullyProtectedEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("successfullyProtectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("successfullyProtectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProto) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProto) UnmarshalBinary(b []byte) error { - var res BackupJobTaskStateBaseProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_task_state_base_proto_entity_ids_to_cancel_entry.go b/v1/models/backup_job_task_state_base_proto_entity_ids_to_cancel_entry.go deleted file mode 100644 index f4f02673..00000000 --- a/v1/models/backup_job_task_state_base_proto_entity_ids_to_cancel_entry.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" -) - -// BackupJobTaskStateBaseProtoEntityIdsToCancelEntry backup job task state base proto entity ids to cancel entry -// -// swagger:model BackupJobTaskStateBaseProto_EntityIdsToCancelEntry -type BackupJobTaskStateBaseProtoEntityIdsToCancelEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *int32 `json:"value,omitempty"` -} - -// Validate validates this backup job task state base proto entity ids to cancel entry -func (m *BackupJobTaskStateBaseProtoEntityIdsToCancelEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job task state base proto entity ids to cancel entry based on context it is used -func (m *BackupJobTaskStateBaseProtoEntityIdsToCancelEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoEntityIdsToCancelEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoEntityIdsToCancelEntry) UnmarshalBinary(b []byte) error { - var res BackupJobTaskStateBaseProtoEntityIdsToCancelEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_task_state_base_proto_pause_state.go b/v1/models/backup_job_task_state_base_proto_pause_state.go deleted file mode 100644 index 1492e835..00000000 --- a/v1/models/backup_job_task_state_base_proto_pause_state.go +++ /dev/null @@ -1,69 +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" -) - -// BackupJobTaskStateBaseProtoPauseState backup job task state base proto pause state -// -// swagger:model BackupJobTaskStateBaseProto_PauseState -type BackupJobTaskStateBaseProtoPauseState struct { - - // Time of blackout window triggered pause request. This field gets - // populated when blackout window triggers pause and gets cleared when - // blackout window triggers resume. - BlackoutWindowPauseRequestedTimeUsecs *int64 `json:"blackoutWindowPauseRequestedTimeUsecs,omitempty"` - - // Pause status for the job run or task. - // Pause is only allowed in kRunning state, and resume is allowed only in - // kPaused state. If the status is kPausing/kResuming, we do not allow any - // user operations (including cancellation). - Status *int32 `json:"status,omitempty"` - - // Time of user initiated pause request. This field gets populated on user - // initiated pause and gets cleared on user initiated resume. - UserInitiatedPauseRequestedTimeUsecs *int64 `json:"userInitiatedPauseRequestedTimeUsecs,omitempty"` - - // Indicates whether the user initiated a resume operation in the middle of - // a blackout window. Whenever this is set to true, this particular run - // becomes exempt from future blackout-window-related interrupts. Note that - // this may also be set when cancelation is requested for a run that is - // paused. - UserInitiatedResumeDuringBlackoutWindow *bool `json:"userInitiatedResumeDuringBlackoutWindow,omitempty"` -} - -// Validate validates this backup job task state base proto pause state -func (m *BackupJobTaskStateBaseProtoPauseState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job task state base proto pause state based on context it is used -func (m *BackupJobTaskStateBaseProtoPauseState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoPauseState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoPauseState) UnmarshalBinary(b []byte) error { - var res BackupJobTaskStateBaseProtoPauseState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_task_state_base_proto_source_state.go b/v1/models/backup_job_task_state_base_proto_source_state.go deleted file mode 100644 index 101b9d67..00000000 --- a/v1/models/backup_job_task_state_base_proto_source_state.go +++ /dev/null @@ -1,304 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobTaskStateBaseProtoSourceState backup job task state base proto source state -// -// swagger:model BackupJobTaskStateBaseProto_SourceState -type BackupJobTaskStateBaseProtoSourceState struct { - - // This will be populated for attempts. These entities will be used to - // form an intersection to obtain the sources. - AttemptSourceVec []*PrivateEntityProto `json:"attemptSourceVec"` - - // Additional backup params for the source. - BackupSourceParams *BackupSourceParams `json:"backupSourceParams,omitempty"` - - // The delay(w.r.t ideal schedule) with which this task/job was scheduled. - // For a job with 3 hr backup interval with a previous run at 3:00pm and - // if this run has scheduled_time_usecs of 6:15pm, the value will be - // 15*60(15 min). This can be used to schedule next run at 9pm. - NextRunAdvancementTimeSecs *int64 `json:"nextRunAdvancementTimeSecs,omitempty"` - - // Set of entities protected by this task in case the task is run for - // a non leaf entity to protect multiple descendent leaf level objects. - // This is used for nosql entity types like cassandra where the backup - // task is run one per namespace to backup various tables within the - // namespace. - ProtectedEntities []*PrivateEntityProto `json:"protectedEntities"` - - // The time at which this task/job was supposed to be scheduled. This is - // useful to track failures across multiple runs, as these failures have to - // be counted against a particular scheduled time. - ScheduledTimeUsecs *int64 `json:"scheduledTimeUsecs,omitempty"` - - // The source description. - // TODO(Chinmaya): For now this will be populated for both tasks and - // attempts so that Rx cluster can handle the proto. Change this to be - // only populated for tasks after versions < 3.9 are deprecated. - Source *PrivateEntityProto `json:"source,omitempty"` -} - -// Validate validates this backup job task state base proto source state -func (m *BackupJobTaskStateBaseProtoSourceState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttemptSourceVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupSourceParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) validateAttemptSourceVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttemptSourceVec) { // not required - return nil - } - - for i := 0; i < len(m.AttemptSourceVec); i++ { - if swag.IsZero(m.AttemptSourceVec[i]) { // not required - continue - } - - if m.AttemptSourceVec[i] != nil { - if err := m.AttemptSourceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attemptSourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attemptSourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) validateBackupSourceParams(formats strfmt.Registry) error { - if swag.IsZero(m.BackupSourceParams) { // not required - return nil - } - - if m.BackupSourceParams != nil { - if err := m.BackupSourceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupSourceParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) validateProtectedEntities(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedEntities) { // not required - return nil - } - - for i := 0; i < len(m.ProtectedEntities); i++ { - if swag.IsZero(m.ProtectedEntities[i]) { // not required - continue - } - - if m.ProtectedEntities[i] != nil { - if err := m.ProtectedEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup job task state base proto source state based on the context it is used -func (m *BackupJobTaskStateBaseProtoSourceState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttemptSourceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupSourceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) contextValidateAttemptSourceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttemptSourceVec); i++ { - - if m.AttemptSourceVec[i] != nil { - - if swag.IsZero(m.AttemptSourceVec[i]) { // not required - return nil - } - - if err := m.AttemptSourceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attemptSourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attemptSourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) contextValidateBackupSourceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupSourceParams != nil { - - if swag.IsZero(m.BackupSourceParams) { // not required - return nil - } - - if err := m.BackupSourceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupSourceParams") - } - return err - } - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) contextValidateProtectedEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectedEntities); i++ { - - if m.ProtectedEntities[i] != nil { - - if swag.IsZero(m.ProtectedEntities[i]) { // not required - return nil - } - - if err := m.ProtectedEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobTaskStateBaseProtoSourceState) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoSourceState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoSourceState) UnmarshalBinary(b []byte) error { - var res BackupJobTaskStateBaseProtoSourceState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_task_state_base_proto_subtask_to_permit_grant_time_usecs_map_d_e_p_r_e_c_a_t_e_d_entry.go b/v1/models/backup_job_task_state_base_proto_subtask_to_permit_grant_time_usecs_map_d_e_p_r_e_c_a_t_e_d_entry.go deleted file mode 100644 index bb0b840d..00000000 --- a/v1/models/backup_job_task_state_base_proto_subtask_to_permit_grant_time_usecs_map_d_e_p_r_e_c_a_t_e_d_entry.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" -) - -// BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry backup job task state base proto subtask to permit grant time usecs map d e p r e c a t e d entry -// -// swagger:model BackupJobTaskStateBaseProto_SubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry -type BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this backup job task state base proto subtask to permit grant time usecs map d e p r e c a t e d entry -func (m *BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup job task state base proto subtask to permit grant time usecs map d e p r e c a t e d entry based on context it is used -func (m *BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry) UnmarshalBinary(b []byte) error { - var res BackupJobTaskStateBaseProtoSubtaskToPermitGrantTimeUsecsMapDEPRECATEDEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_job_wrapper.go b/v1/models/backup_job_wrapper.go deleted file mode 100644 index b4e97755..00000000 --- a/v1/models/backup_job_wrapper.go +++ /dev/null @@ -1,235 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupJobWrapper BackupJobWrapper defines the struct for backup job. -// -// swagger:model BackupJobWrapper -type BackupJobWrapper struct { - - // BackupJob is the struct for BackupJobProto used by magneto. - BackupJob *BackupJobProto `json:"backupJob,omitempty"` - - // A list of protected entities according to the request. This field will - // only be populated if the request contains 'entities_to_protect' field. - ProtectedEntities []*CreateBackupJobResultProtectedEntity `json:"protectedEntities"` - - // Tenant information of tenants having access to the backup job. - Tenants []*TenantInfo `json:"tenants"` -} - -// Validate validates this backup job wrapper -func (m *BackupJobWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupJob(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobWrapper) validateBackupJob(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJob) { // not required - return nil - } - - if m.BackupJob != nil { - if err := m.BackupJob.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJob") - } - return err - } - } - - return nil -} - -func (m *BackupJobWrapper) validateProtectedEntities(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedEntities) { // not required - return nil - } - - for i := 0; i < len(m.ProtectedEntities); i++ { - if swag.IsZero(m.ProtectedEntities[i]) { // not required - continue - } - - if m.ProtectedEntities[i] != nil { - if err := m.ProtectedEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobWrapper) validateTenants(formats strfmt.Registry) error { - if swag.IsZero(m.Tenants) { // not required - return nil - } - - for i := 0; i < len(m.Tenants); i++ { - if swag.IsZero(m.Tenants[i]) { // not required - continue - } - - if m.Tenants[i] != nil { - if err := m.Tenants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup job wrapper based on the context it is used -func (m *BackupJobWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupJob(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenants(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupJobWrapper) contextValidateBackupJob(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupJob != nil { - - if swag.IsZero(m.BackupJob) { // not required - return nil - } - - if err := m.BackupJob.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJob") - } - return err - } - } - - return nil -} - -func (m *BackupJobWrapper) contextValidateProtectedEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectedEntities); i++ { - - if m.ProtectedEntities[i] != nil { - - if swag.IsZero(m.ProtectedEntities[i]) { // not required - return nil - } - - if err := m.ProtectedEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupJobWrapper) contextValidateTenants(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tenants); i++ { - - if m.Tenants[i] != nil { - - if swag.IsZero(m.Tenants[i]) { // not required - return nil - } - - if err := m.Tenants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupJobWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupJobWrapper) UnmarshalBinary(b []byte) error { - var res BackupJobWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto.go b/v1/models/backup_policy_proto.go deleted file mode 100644 index 71ae07a9..00000000 --- a/v1/models/backup_policy_proto.go +++ /dev/null @@ -1,351 +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" -) - -// BackupPolicyProto DEPRECATED in 5.0! -// -// If a backup does not get a chance to when it's due (either due to the system -// being busy or a conflict with another instance of the same job), the backup -// will still be run when the conflicts go away. But, if there are multiple -// instances of the same job that are due to be run, only the latest instance -// would be run. -// -// swagger:model BackupPolicyProto -type BackupPolicyProto struct { - - // Set if periodicity is kContinuous. - ContinuousSchedule *BackupPolicyProtoContinuousSchedule `json:"continuousSchedule,omitempty"` - - // Set if periodicity is kDaily. - DailySchedule *BackupPolicyProtoDailySchedule `json:"dailySchedule,omitempty"` - - // Set if periodicity is kMonthly. - MonthlySchedule *BackupPolicyProtoMonthlySchedule `json:"monthlySchedule,omitempty"` - - // A backup schedule can have an optional name. - Name *string `json:"name,omitempty"` - - // Specifies how to determine the expiration time for snapshots created by - // a backup run. The snapshots will be marked as expiring (i.e., eligible - // to be garbage collected) in 'num_days_to_keep' days from when the - // snapshots were created. - NumDaysToKeep *int64 `json:"numDaysToKeep,omitempty"` - - // The number of retries to perform (for retryable errors) before giving up. - NumRetries *int32 `json:"numRetries,omitempty"` - - // Set if periodicity is kOneOff. - OneOffSchedule *BackupPolicyProtoOneOffSchedule `json:"oneOffSchedule,omitempty"` - - // Determines how often the job should be run. - Periodicity *int32 `json:"periodicity,omitempty"` - - // The number of minutes to wait before retrying a failed job. - RetryDelayMins *int32 `json:"retryDelayMins,omitempty"` - - // Determines when this schedule ends (if at all). - ScheduleEnd *BackupPolicyProtoScheduleEnd `json:"scheduleEnd,omitempty"` - - // This field determines the amount of time (in minutes) after which a - // scheduled job will not be started. For example, if a job is scheduled to - // be run every Sunday at 5am, and this field is set to 30 minutes, but the - // job was unable to start by 5:30am on a Sunday due to other conflicts (say - // too many other jobs were already running), Magneto will not attempt to - // start the job until the next scheduled time (on the following Sunday). - // If this field is not set, the interval will be determined by the Magneto - // flag --magneto_master_default_start_window_interval_mins. - StartWindowIntervalMins *int32 `json:"startWindowIntervalMins,omitempty"` - - // Whether to truncate logs after a backup run. This is currently only - // relevant for full or incremental backups in a SQL environment. - TruncateLogs *bool `json:"truncateLogs,omitempty"` -} - -// Validate validates this backup policy proto -func (m *BackupPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContinuousSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDailySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthlySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneOffSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScheduleEnd(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProto) validateContinuousSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSchedule) { // not required - 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 -} - -func (m *BackupPolicyProto) validateDailySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DailySchedule) { // not required - 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 -} - -func (m *BackupPolicyProto) validateMonthlySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthlySchedule) { // not required - 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 -} - -func (m *BackupPolicyProto) validateOneOffSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.OneOffSchedule) { // not required - return nil - } - - if m.OneOffSchedule != nil { - if err := m.OneOffSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneOffSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneOffSchedule") - } - return err - } - } - - return nil -} - -func (m *BackupPolicyProto) validateScheduleEnd(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduleEnd) { // not required - return nil - } - - if m.ScheduleEnd != nil { - if err := m.ScheduleEnd.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scheduleEnd") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scheduleEnd") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup policy proto based on the context it is used -func (m *BackupPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateContinuousSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDailySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthlySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneOffSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScheduleEnd(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProto) 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 *BackupPolicyProto) 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 *BackupPolicyProto) 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 *BackupPolicyProto) contextValidateOneOffSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.OneOffSchedule != nil { - - if swag.IsZero(m.OneOffSchedule) { // not required - return nil - } - - if err := m.OneOffSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneOffSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneOffSchedule") - } - return err - } - } - - return nil -} - -func (m *BackupPolicyProto) contextValidateScheduleEnd(ctx context.Context, formats strfmt.Registry) error { - - if m.ScheduleEnd != nil { - - if swag.IsZero(m.ScheduleEnd) { // not required - return nil - } - - if err := m.ScheduleEnd.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scheduleEnd") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scheduleEnd") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProto) UnmarshalBinary(b []byte) error { - var res BackupPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_continuous_schedule.go b/v1/models/backup_policy_proto_continuous_schedule.go deleted file mode 100644 index ae39a571..00000000 --- a/v1/models/backup_policy_proto_continuous_schedule.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupPolicyProtoContinuousSchedule backup policy proto continuous schedule -// -// swagger:model BackupPolicyProto_ContinuousSchedule -type BackupPolicyProtoContinuousSchedule struct { - - // If this field is set, backups will be performed periodically every - // 'interval_mins' number of minutes. NOTE: This is the interval between - // the start time of two successive backups. - BackupIntervalMins *int64 `json:"backupIntervalMins,omitempty"` - - // Do not start backups in these time-ranges. It's possible for a - // previously started backup to spill over into an exclusion range. - // - // NOTE: This field has been deprecated. Use the exclusion_ranges field - // defined within BackupPolicyProto instead. - ExclusionRanges []*BackupPolicyProtoExclusionTimeRange `json:"exclusionRanges"` -} - -// Validate validates this backup policy proto continuous schedule -func (m *BackupPolicyProtoContinuousSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExclusionRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoContinuousSchedule) validateExclusionRanges(formats strfmt.Registry) error { - if swag.IsZero(m.ExclusionRanges) { // not required - return nil - } - - for i := 0; i < len(m.ExclusionRanges); i++ { - if swag.IsZero(m.ExclusionRanges[i]) { // not required - continue - } - - if m.ExclusionRanges[i] != nil { - if err := m.ExclusionRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup policy proto continuous schedule based on the context it is used -func (m *BackupPolicyProtoContinuousSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExclusionRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoContinuousSchedule) contextValidateExclusionRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExclusionRanges); i++ { - - if m.ExclusionRanges[i] != nil { - - if swag.IsZero(m.ExclusionRanges[i]) { // not required - return nil - } - - if err := m.ExclusionRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoContinuousSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoContinuousSchedule) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoContinuousSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_daily_schedule.go b/v1/models/backup_policy_proto_daily_schedule.go deleted file mode 100644 index 5fc3676c..00000000 --- a/v1/models/backup_policy_proto_daily_schedule.go +++ /dev/null @@ -1,115 +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" -) - -// BackupPolicyProtoDailySchedule The daily schedule encompasses weekly schedules as well. This has been -// done so there is only one way of specifying a schedule (backing up daily -// is the same as backing up weekly, but on all days of the week). -// -// swagger:model BackupPolicyProto_DailySchedule -type BackupPolicyProtoDailySchedule struct { - - // The days of the week backup must be performed. If no days are specified, - // then the backup will be performed on all days. - Days []int32 `json:"days"` - - // The time when daily backups should be performed. - Time *Time `json:"time,omitempty"` -} - -// Validate validates this backup policy proto daily schedule -func (m *BackupPolicyProtoDailySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoDailySchedule) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup policy proto daily schedule based on the context it is used -func (m *BackupPolicyProtoDailySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoDailySchedule) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoDailySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoDailySchedule) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoDailySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_exclusion_time_range.go b/v1/models/backup_policy_proto_exclusion_time_range.go deleted file mode 100644 index 888a3488..00000000 --- a/v1/models/backup_policy_proto_exclusion_time_range.go +++ /dev/null @@ -1,164 +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" -) - -// BackupPolicyProtoExclusionTimeRange A proto to specify a time range within a single day when backups are not -// permitted to run. -// -// swagger:model BackupPolicyProto_ExclusionTimeRange -type BackupPolicyProtoExclusionTimeRange struct { - - // If the day is not set, the time range applies to all days. - Day *int32 `json:"day,omitempty"` - - // End time of the time range. - EndTime *Time `json:"endTime,omitempty"` - - // Start time of the time range. - StartTime *Time `json:"startTime,omitempty"` -} - -// Validate validates this backup policy proto exclusion time range -func (m *BackupPolicyProtoExclusionTimeRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoExclusionTimeRange) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *BackupPolicyProtoExclusionTimeRange) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this backup policy proto exclusion time range based on the context it is used -func (m *BackupPolicyProtoExclusionTimeRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoExclusionTimeRange) 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 *BackupPolicyProtoExclusionTimeRange) 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 -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoExclusionTimeRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoExclusionTimeRange) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoExclusionTimeRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_monthly_schedule.go b/v1/models/backup_policy_proto_monthly_schedule.go deleted file mode 100644 index 8a137255..00000000 --- a/v1/models/backup_policy_proto_monthly_schedule.go +++ /dev/null @@ -1,116 +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" -) - -// BackupPolicyProtoMonthlySchedule backup policy proto monthly schedule -// -// swagger:model BackupPolicyProto_MonthlySchedule -type BackupPolicyProtoMonthlySchedule struct { - - // Count of the day on which to perform the backup (look above for a more - // detailed description). - Count *int32 `json:"count,omitempty"` - - // The day of the month the backup is to be performed. - Day *int32 `json:"day,omitempty"` - - // Time when the monthly backup should be performed. - Time *Time `json:"time,omitempty"` -} - -// Validate validates this backup policy proto monthly schedule -func (m *BackupPolicyProtoMonthlySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoMonthlySchedule) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup policy proto monthly schedule based on the context it is used -func (m *BackupPolicyProtoMonthlySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoMonthlySchedule) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoMonthlySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoMonthlySchedule) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoMonthlySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_one_off_schedule.go b/v1/models/backup_policy_proto_one_off_schedule.go deleted file mode 100644 index 2ac53b87..00000000 --- a/v1/models/backup_policy_proto_one_off_schedule.go +++ /dev/null @@ -1,109 +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" -) - -// BackupPolicyProtoOneOffSchedule backup policy proto one off schedule -// -// swagger:model BackupPolicyProto_OneOffSchedule -type BackupPolicyProtoOneOffSchedule struct { - - // The time when the one-off backup should be performed. - Time *Time `json:"time,omitempty"` -} - -// Validate validates this backup policy proto one off schedule -func (m *BackupPolicyProtoOneOffSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoOneOffSchedule) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup policy proto one off schedule based on the context it is used -func (m *BackupPolicyProtoOneOffSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicyProtoOneOffSchedule) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoOneOffSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoOneOffSchedule) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoOneOffSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_policy_proto_schedule_end.go b/v1/models/backup_policy_proto_schedule_end.go deleted file mode 100644 index bbf7c790..00000000 --- a/v1/models/backup_policy_proto_schedule_end.go +++ /dev/null @@ -1,54 +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" -) - -// BackupPolicyProtoScheduleEnd Only one of the following fields should be set. -// -// swagger:model BackupPolicyProto_ScheduleEnd -type BackupPolicyProtoScheduleEnd struct { - - // If specified, the backup job will no longer be run after it has been run - // these many times. - EndAfterNumBackups *int64 `json:"endAfterNumBackups,omitempty"` - - // If specified, the backup job will no longer be run after this time. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` -} - -// Validate validates this backup policy proto schedule end -func (m *BackupPolicyProtoScheduleEnd) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup policy proto schedule end based on context it is used -func (m *BackupPolicyProtoScheduleEnd) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicyProtoScheduleEnd) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicyProtoScheduleEnd) UnmarshalBinary(b []byte) error { - var res BackupPolicyProtoScheduleEnd - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_run.go b/v1/models/backup_run.go deleted file mode 100644 index 9a6b0f93..00000000 --- a/v1/models/backup_run.go +++ /dev/null @@ -1,655 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// BackupRun Backup Run Task. -// -// Specifies details about the Backup task for a Job Run. -// A Backup task captures the original backup snapshots for each Protection -// Source in the Job. -// -// swagger:model BackupRun -type BackupRun struct { - - // Specifies the environment type that the task is protecting. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies the id of the Job Run that ran the backup task and - // the copy tasks. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies a message after finishing the task successfully. This field - // is optionally populated when the status is equal to 'kSuccess'. - Message *string `json:"message,omitempty"` - - // Specifies if the metadata and snapshots associated with this Job Run - // have been deleted. - // This field is set to true when the snapshots, which are marked - // for deletion, are removed by garbage collection. - // The associated metadata is also deleted. - MetadataDeleted *bool `json:"metadataDeleted,omitempty"` - - // Specifies if app-consistent snapshot was captured. This field is set to - // true, if an app-consistent snapshot was taken by - // quiescing applications and the file system before taking a backup. - Quiesced *bool `json:"quiesced,omitempty"` - - // Specifies the type of backup such as 'kRegular', 'kFull', 'kLog' or - // 'kSystem'. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - RunType *string `json:"runType,omitempty"` - - // Specifies if the SLA was violated for the Job Run. This field is set - // to true, if time to complete the Job Run is longer than the SLA - // specified. This field is populated when the status is - // set to 'kSuccess' or 'kFailure'. - SLAViolated *bool `json:"slaViolated,omitempty"` - - // Specifies if backup snapshots associated - // with this Job Run have been marked for deletion because of the - // retention settings in the Policy or - // if they were manually deleted from the Cohesity Dashboard. - SnapshotsDeleted *bool `json:"snapshotsDeleted,omitempty"` - - // Specifies if backup snapshots associated - // with this Job Run have been marked for deletion because of the - // retention settings in the Policy or - // if they were manually deleted from the Cohesity Dashboard. - SnapshotsDeletedTimeUsecs *int64 `json:"snapshotsDeletedTimeUsecs,omitempty"` - - // Array of Source Object Backup Status. - // - // Specifies the status of backing up each source objects (such as VMs) - // associated with the job. - SourceBackupStatus []*SourceBackupStatus `json:"sourceBackupStatus"` - - // Specifies the aggregated stats of all Backup Run tasks in a - // Protection Run. - Stats *ProtectionJobRunStats `json:"stats,omitempty"` - - // Specifies the status of Backup task such as 'kRunning', 'kSuccess', - // 'kFailure' etc. - // kWarning, kOnHold, kMissed, kFinalizing, kWaitingToRetry. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure"] - Status *string `json:"status,omitempty"` - - // Array of Warnings. - // - // Specifies the warnings that occurred (if any) while running this task. - Warnings []string `json:"warnings"` - - // Specifies WORM retention type for the snapshot as given by the policy. - // When a WORM retention type is specified, the snapshot will be kept until - // the maximum of the snapshot retention time. During that time, the - // snapshot cannot be deleted. - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this backup run -func (m *BackupRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var backupRunTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunTypeEnvironmentPropEnum = append(backupRunTypeEnvironmentPropEnum, v) - } -} - -const ( - - // BackupRunEnvironmentKVMware captures enum value "kVMware" - BackupRunEnvironmentKVMware string = "kVMware" - - // BackupRunEnvironmentKHyperV captures enum value "kHyperV" - BackupRunEnvironmentKHyperV string = "kHyperV" - - // BackupRunEnvironmentKSQL captures enum value "kSQL" - BackupRunEnvironmentKSQL string = "kSQL" - - // BackupRunEnvironmentKView captures enum value "kView" - BackupRunEnvironmentKView string = "kView" - - // BackupRunEnvironmentKPuppeteer captures enum value "kPuppeteer" - BackupRunEnvironmentKPuppeteer string = "kPuppeteer" - - // BackupRunEnvironmentKPhysical captures enum value "kPhysical" - BackupRunEnvironmentKPhysical string = "kPhysical" - - // BackupRunEnvironmentKPure captures enum value "kPure" - BackupRunEnvironmentKPure string = "kPure" - - // BackupRunEnvironmentKNimble captures enum value "kNimble" - BackupRunEnvironmentKNimble string = "kNimble" - - // BackupRunEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - BackupRunEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // BackupRunEnvironmentKAzure captures enum value "kAzure" - BackupRunEnvironmentKAzure string = "kAzure" - - // BackupRunEnvironmentKNetapp captures enum value "kNetapp" - BackupRunEnvironmentKNetapp string = "kNetapp" - - // BackupRunEnvironmentKAgent captures enum value "kAgent" - BackupRunEnvironmentKAgent string = "kAgent" - - // BackupRunEnvironmentKGenericNas captures enum value "kGenericNas" - BackupRunEnvironmentKGenericNas string = "kGenericNas" - - // BackupRunEnvironmentKAcropolis captures enum value "kAcropolis" - BackupRunEnvironmentKAcropolis string = "kAcropolis" - - // BackupRunEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - BackupRunEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // BackupRunEnvironmentKIsilon captures enum value "kIsilon" - BackupRunEnvironmentKIsilon string = "kIsilon" - - // BackupRunEnvironmentKGPFS captures enum value "kGPFS" - BackupRunEnvironmentKGPFS string = "kGPFS" - - // BackupRunEnvironmentKKVM captures enum value "kKVM" - BackupRunEnvironmentKKVM string = "kKVM" - - // BackupRunEnvironmentKAWS captures enum value "kAWS" - BackupRunEnvironmentKAWS string = "kAWS" - - // BackupRunEnvironmentKExchange captures enum value "kExchange" - BackupRunEnvironmentKExchange string = "kExchange" - - // BackupRunEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - BackupRunEnvironmentKHyperVVSS string = "kHyperVVSS" - - // BackupRunEnvironmentKOracle captures enum value "kOracle" - BackupRunEnvironmentKOracle string = "kOracle" - - // BackupRunEnvironmentKGCP captures enum value "kGCP" - BackupRunEnvironmentKGCP string = "kGCP" - - // BackupRunEnvironmentKFlashBlade captures enum value "kFlashBlade" - BackupRunEnvironmentKFlashBlade string = "kFlashBlade" - - // BackupRunEnvironmentKAWSNative captures enum value "kAWSNative" - BackupRunEnvironmentKAWSNative string = "kAWSNative" - - // BackupRunEnvironmentKO365 captures enum value "kO365" - BackupRunEnvironmentKO365 string = "kO365" - - // BackupRunEnvironmentKO365Outlook captures enum value "kO365Outlook" - BackupRunEnvironmentKO365Outlook string = "kO365Outlook" - - // BackupRunEnvironmentKHyperFlex captures enum value "kHyperFlex" - BackupRunEnvironmentKHyperFlex string = "kHyperFlex" - - // BackupRunEnvironmentKGCPNative captures enum value "kGCPNative" - BackupRunEnvironmentKGCPNative string = "kGCPNative" - - // BackupRunEnvironmentKAzureNative captures enum value "kAzureNative" - BackupRunEnvironmentKAzureNative string = "kAzureNative" - - // BackupRunEnvironmentKKubernetes captures enum value "kKubernetes" - BackupRunEnvironmentKKubernetes string = "kKubernetes" - - // BackupRunEnvironmentKElastifile captures enum value "kElastifile" - BackupRunEnvironmentKElastifile string = "kElastifile" - - // BackupRunEnvironmentKAD captures enum value "kAD" - BackupRunEnvironmentKAD string = "kAD" - - // BackupRunEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - BackupRunEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // BackupRunEnvironmentKCassandra captures enum value "kCassandra" - BackupRunEnvironmentKCassandra string = "kCassandra" - - // BackupRunEnvironmentKMongoDB captures enum value "kMongoDB" - BackupRunEnvironmentKMongoDB string = "kMongoDB" - - // BackupRunEnvironmentKCouchbase captures enum value "kCouchbase" - BackupRunEnvironmentKCouchbase string = "kCouchbase" - - // BackupRunEnvironmentKHdfs captures enum value "kHdfs" - BackupRunEnvironmentKHdfs string = "kHdfs" - - // BackupRunEnvironmentKHive captures enum value "kHive" - BackupRunEnvironmentKHive string = "kHive" - - // BackupRunEnvironmentKHBase captures enum value "kHBase" - BackupRunEnvironmentKHBase string = "kHBase" - - // BackupRunEnvironmentKUDA captures enum value "kUDA" - BackupRunEnvironmentKUDA string = "kUDA" - - // BackupRunEnvironmentKO365Teams captures enum value "kO365Teams" - BackupRunEnvironmentKO365Teams string = "kO365Teams" - - // BackupRunEnvironmentKO365Group captures enum value "kO365Group" - BackupRunEnvironmentKO365Group string = "kO365Group" - - // BackupRunEnvironmentKO365Exchange captures enum value "kO365Exchange" - BackupRunEnvironmentKO365Exchange string = "kO365Exchange" - - // BackupRunEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - BackupRunEnvironmentKO365OneDrive string = "kO365OneDrive" - - // BackupRunEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - BackupRunEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // BackupRunEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - BackupRunEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *BackupRun) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRun) 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 -} - -var backupRunTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunTypeRunTypePropEnum = append(backupRunTypeRunTypePropEnum, v) - } -} - -const ( - - // BackupRunRunTypeKRegular captures enum value "kRegular" - BackupRunRunTypeKRegular string = "kRegular" - - // BackupRunRunTypeKFull captures enum value "kFull" - BackupRunRunTypeKFull string = "kFull" - - // BackupRunRunTypeKLog captures enum value "kLog" - BackupRunRunTypeKLog string = "kLog" - - // BackupRunRunTypeKSystem captures enum value "kSystem" - BackupRunRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *BackupRun) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRun) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -func (m *BackupRun) validateSourceBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SourceBackupStatus) { // not required - return nil - } - - for i := 0; i < len(m.SourceBackupStatus); i++ { - if swag.IsZero(m.SourceBackupStatus[i]) { // not required - continue - } - - if m.SourceBackupStatus[i] != nil { - if err := m.SourceBackupStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceBackupStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceBackupStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupRun) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var backupRunTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunTypeStatusPropEnum = append(backupRunTypeStatusPropEnum, v) - } -} - -const ( - - // BackupRunStatusKAccepted captures enum value "kAccepted" - BackupRunStatusKAccepted string = "kAccepted" - - // BackupRunStatusKRunning captures enum value "kRunning" - BackupRunStatusKRunning string = "kRunning" - - // BackupRunStatusKCanceling captures enum value "kCanceling" - BackupRunStatusKCanceling string = "kCanceling" - - // BackupRunStatusKCanceled captures enum value "kCanceled" - BackupRunStatusKCanceled string = "kCanceled" - - // BackupRunStatusKSuccess captures enum value "kSuccess" - BackupRunStatusKSuccess string = "kSuccess" - - // BackupRunStatusKFailure captures enum value "kFailure" - BackupRunStatusKFailure string = "kFailure" -) - -// prop value enum -func (m *BackupRun) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRun) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var backupRunTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunTypeWormRetentionTypePropEnum = append(backupRunTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // BackupRunWormRetentionTypeKNone captures enum value "kNone" - BackupRunWormRetentionTypeKNone string = "kNone" - - // BackupRunWormRetentionTypeKCompliance captures enum value "kCompliance" - BackupRunWormRetentionTypeKCompliance string = "kCompliance" - - // BackupRunWormRetentionTypeKAdministrative captures enum value "kAdministrative" - BackupRunWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *BackupRun) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRun) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this backup run based on the context it is used -func (m *BackupRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceBackupStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRun) contextValidateSourceBackupStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceBackupStatus); i++ { - - if m.SourceBackupStatus[i] != nil { - - if swag.IsZero(m.SourceBackupStatus[i]) { // not required - return nil - } - - if err := m.SourceBackupStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceBackupStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceBackupStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupRun) 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 -} - -// MarshalBinary interface implementation -func (m *BackupRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRun) UnmarshalBinary(b []byte) error { - var res BackupRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_run_id.go b/v1/models/backup_run_id.go deleted file mode 100644 index 87cf94fb..00000000 --- a/v1/models/backup_run_id.go +++ /dev/null @@ -1,112 +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" -) - -// BackupRunID This captures information about identifying a backup run. -// -// swagger:model BackupRunId -type BackupRunID struct { - - // UID of the job. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Start time of the backup run. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` -} - -// Validate validates this backup run Id -func (m *BackupRunID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunID) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this backup run Id based on the context it is used -func (m *BackupRunID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunID) 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 -} - -// MarshalBinary interface implementation -func (m *BackupRunID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRunID) UnmarshalBinary(b []byte) error { - var res BackupRunID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_script.go b/v1/models/backup_script.go deleted file mode 100644 index 18e477aa..00000000 --- a/v1/models/backup_script.go +++ /dev/null @@ -1,270 +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" -) - -// BackupScript Backup Script. -// -// Specifies details about the pre and post backup scripts for 'kPhysical' -// jobs. -// -// 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"` - - // 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 - // password-less access. So only username field is required. - Username *string `json:"username,omitempty"` -} - -// Validate validates this backup script -func (m *BackupScript) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteHost(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupScript) validateFullBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupScript) { // not required - 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 -} - -func (m *BackupScript) validateIncrementalBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalBackupScript) { // not required - 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 -} - -func (m *BackupScript) validateLogBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.LogBackupScript) { // not required - 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 -} - -func (m *BackupScript) validateRemoteHost(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteHost) { // not required - 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 -} - -// ContextValidate validate this backup script based on the context it is used -func (m *BackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFullBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteHost(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *BackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupScript) UnmarshalBinary(b []byte) error { - var res BackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/backup_source_params.go b/v1/models/backup_source_params.go deleted file mode 100644 index 7f9ff227..00000000 --- a/v1/models/backup_source_params.go +++ /dev/null @@ -1,744 +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" -) - -// BackupSourceParams Backup Source Parameters. -// -// Message to capture any additional backup params at the source level. -// -// swagger:model BackupSourceParams -type BackupSourceParams struct { - - // This is applicable to sources of type kVirtualMachine (kAcropolis - // environment). - AcropolisParams *AcropolisBackupSourceParams `json:"acropolisParams,omitempty"` - - // If we are backing up an application (such as SQL), this contains - // the entity ids of the app entities (such as SQL instances and databases) - // that will be protected on the backup source. - // - // If this vector is empty, it implies that we are protecting all app - // entities on the source. - AppEntityIDVec []int64 `json:"appEntityIdVec"` - - // This is applicable to sources of type kAWS with native backup. - AwsNativeParams *AWSNativeBackupSourceParams `json:"awsNativeParams,omitempty"` - - // This is applicable to sources of type kAWS with snapshot manager backup. - AwsSnapshotManagerParams *AWSSnapshotManagerBackupSourceParams `json:"awsSnapshotManagerParams,omitempty"` - - // This is applicable to source type kGCP. - GcpNativeParams *GCPNativeObjectParams `json:"gcpNativeParams,omitempty"` - - // This is applicable to sources of type kVirtualMachine (kHyperV - // environment). - HypervParams *HyperVBackupSourceParams `json:"hypervParams,omitempty"` - - // This is applicable to namepace sources for Kubernetes environment. - KubernetesParams *KubernetesBackupSourceParams `json:"kubernetesParams,omitempty"` - - // This is applicable to sources of type kOracle databases. These are - // additional backup parameters for kOracle. - // NOTE: For logging this proto use GetProtoString(oracle_params); to remove - // credentials from DB information. - OracleParams *OracleSourceParams `json:"oracleParams,omitempty"` - - // This is applicable to sources of type kHost (kPhysical environment). - PhysicalParams *PhysicalBackupSourceParams `json:"physicalParams,omitempty"` - - // This is applicable to kAwsS3 job type. - S3BucketParamsProto *S3BucketParamsProto `json:"s3BucketParamsProto,omitempty"` - - // This is applicable to sources of type kSfdc. - SfdcParams *SfdcBackupSourceParamsProto `json:"sfdcParams,omitempty"` - - // This is applicable to sources of type kSite in o365 domain. - SharepointParams *SharepointBackupSourceParams `json:"sharepointParams,omitempty"` - - // Set to true, if indexing is not required for given source. - SkipIndexing *bool `json:"skipIndexing,omitempty"` - - // Source entity id. - // NOTE: This is expected to point to a leaf-level entity. - SourceID *int64 `json:"sourceId,omitempty"` - - // Uda source params. - UdaBackupSourceParams *UdaBackupSourceParams `json:"udaBackupSourceParams,omitempty"` - - // This is applicable to sources of type kVirtualMachine (kVMware - // environment). - VmwareParams *VMwareBackupSourceParams `json:"vmwareParams,omitempty"` -} - -// Validate validates this backup source params -func (m *BackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsNativeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsSnapshotManagerParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpNativeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BucketParamsProto(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaBackupSourceParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupSourceParams) validateAcropolisParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateAwsNativeParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsNativeParams) { // not required - return nil - } - - if m.AwsNativeParams != nil { - if err := m.AwsNativeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsNativeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsNativeParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateAwsSnapshotManagerParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsSnapshotManagerParams) { // not required - return nil - } - - if m.AwsSnapshotManagerParams != nil { - if err := m.AwsSnapshotManagerParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotManagerParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateGcpNativeParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpNativeParams) { // not required - return nil - } - - if m.GcpNativeParams != nil { - if err := m.GcpNativeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpNativeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpNativeParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateS3BucketParamsProto(formats strfmt.Registry) error { - if swag.IsZero(m.S3BucketParamsProto) { // not required - return nil - } - - if m.S3BucketParamsProto != nil { - if err := m.S3BucketParamsProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketParamsProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketParamsProto") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateSharepointParams(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if m.SharepointParams != nil { - if err := m.SharepointParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateUdaBackupSourceParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaBackupSourceParams) { // not required - return nil - } - - if m.UdaBackupSourceParams != nil { - if err := m.UdaBackupSourceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupSourceParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup source params based on the context it is used -func (m *BackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsNativeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsSnapshotManagerParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpNativeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3BucketParamsProto(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaBackupSourceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupSourceParams) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateAwsNativeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsNativeParams != nil { - - if swag.IsZero(m.AwsNativeParams) { // not required - return nil - } - - if err := m.AwsNativeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsNativeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsNativeParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateAwsSnapshotManagerParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsSnapshotManagerParams != nil { - - if swag.IsZero(m.AwsSnapshotManagerParams) { // not required - return nil - } - - if err := m.AwsSnapshotManagerParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotManagerParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateGcpNativeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpNativeParams != nil { - - if swag.IsZero(m.GcpNativeParams) { // not required - return nil - } - - if err := m.GcpNativeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpNativeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpNativeParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateS3BucketParamsProto(ctx context.Context, formats strfmt.Registry) error { - - if m.S3BucketParamsProto != nil { - - if swag.IsZero(m.S3BucketParamsProto) { // not required - return nil - } - - if err := m.S3BucketParamsProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketParamsProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketParamsProto") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateSharepointParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointParams != nil { - - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if err := m.SharepointParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateUdaBackupSourceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaBackupSourceParams != nil { - - if swag.IsZero(m.UdaBackupSourceParams) { // not required - return nil - } - - if err := m.UdaBackupSourceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupSourceParams") - } - return err - } - } - - return nil -} - -func (m *BackupSourceParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupSourceParams) UnmarshalBinary(b []byte) error { - var res BackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_source_stats.go b/v1/models/backup_source_stats.go deleted file mode 100644 index bf677fa5..00000000 --- a/v1/models/backup_source_stats.go +++ /dev/null @@ -1,120 +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" -) - -// BackupSourceStats Backup Run Statistics. -// -// Specifies statistics about a Backup task in a Protection Job Run. -// Specifies statistics for one backup task. One backup task is used to -// backup on Protection Source. This structure is also used to aggregate -// stats of a Backup tasks in a Protection Job Run. -// -// swagger:model BackupSourceStats -type BackupSourceStats struct { - - // Specifies the total amount of data successfully tiered from the source. - TotalBytesTiered *int64 `json:"TotalBytesTiered,omitempty"` - - // Specifies the time the task was unqueued from the queue to start running. - // This field can be used to determine the following times: - // initial-wait-time = admittedTimeUsecs - startTimeUsecs - // run-time = endTimeUsecs - admittedTimeUsecs - // If the task ends up waiting in other queues, then actual run-time will - // be smaller than the run-time computed this way. - // This field is only populated for Backup tasks currently. - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // Specifies the end time of the Protection Run. The end time - // is specified as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the time when gatekeeper permit is granted to the backup task. - // If the backup task is rescheduled due to errors, the field is updated to - // the time when permit is granted again. - PermitGrantTimeUsecs *int64 `json:"permitGrantTimeUsecs,omitempty"` - - // "Specifies the duration between the startTime and when gatekeeper permit is - // granted to the backup task. If the backup task is rescheduled due to - // errors, the field is updated considering the time when permit is granted - // again. - // Queue duration = PermitGrantTimeUsecs - StartTimeUsecs" - QueueDurationUsecs *int64 `json:"queueDurationUsecs,omitempty"` - - // Specifies the start time of the Protection Run. The start time - // is specified as a Unix epoch Timestamp (in microseconds). - // This time is when the task is queued to an internal queue where tasks - // are waiting to run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the actual execution time for the protection run to complete - // the backup task and the copy tasks. This time will not include the - // time waited in various internal queues. - // This field is only populated for Backup tasks currently. - TimeTakenUsecs *int64 `json:"timeTakenUsecs,omitempty"` - - // Specifies the total amount of data read from the source (so far). - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Specifies the total amount of data expected to be read from the - // source. - TotalBytesToReadFromSource *int64 `json:"totalBytesToReadFromSource,omitempty"` - - // Specifies the size of the source object (such as a VM) protected by - // this task on the primary storage after the snapshot is taken. - // The logical size of the data on the source if the - // data is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Specifies the total amount of physical space used on the Cohesity - // Cluster to store the protected object after being reduced by change-block - // tracking, compression and deduplication. For example, if the logical - // backup size is 1GB, but only 1MB was used on the Cohesity Cluster - // to store it, this field be equal to 1MB. - TotalPhysicalBackupSizeBytes *int64 `json:"totalPhysicalBackupSizeBytes,omitempty"` - - // Specifies the size of the source object (such as a VM) protected by - // this task on the primary storage before the snapshot is taken. - // The logical size of the data on the source if the - // data is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - TotalSourceSizeBytes *int64 `json:"totalSourceSizeBytes,omitempty"` -} - -// Validate validates this backup source stats -func (m *BackupSourceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup source stats based on context it is used -func (m *BackupSourceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupSourceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupSourceStats) UnmarshalBinary(b []byte) error { - var res BackupSourceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_additional_params.go b/v1/models/backup_task_additional_params.go deleted file mode 100644 index 9e58fb1c..00000000 --- a/v1/models/backup_task_additional_params.go +++ /dev/null @@ -1,1361 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupTaskAdditionalParams Message to encapsulate the additional parameters associated with a backup -// task. -// -// Refer to RunBackupJobOnceArg.additional_param_vec for details about how -// this is used. -// -// swagger:model BackupTaskAdditionalParams -type BackupTaskAdditionalParams struct { - - // The Acropolis environment specific params. - AcropolisParams *AcropolisBackupParams `json:"acropolisParams,omitempty"` - - // Analysis specific runonce params. - AnalysisParams *AnalysisRunOnceParams `json:"analysisParams,omitempty"` - - // If we are backing up an application (such as SQL), this contains - // the entity ids of the app entities (such as SQL instances and databases) - // that will be backed up. - // - // If this vector is empty, it implies that we are protecting all app - // entities on 'source_entity'. - AppEntityIDVec []int64 `json:"appEntityIdVec"` - - // Parameters for Cassandra backup. - CassandraBackupParams *CassandraBackupParams `json:"cassandraBackupParams,omitempty"` - - // Parameters specific to hydration task done in context of CDP. - CdpHydrationParams *CdpHydrationParams `json:"cdpHydrationParams,omitempty"` - - // Parameters for a log run done for CDP protected entities. - CdpLogRunParams *CdpLogRunParams `json:"cdpLogRunParams,omitempty"` - - // Common parameters for CDP enabled entities. - CdpParams *CdpCommonBackupParams `json:"cdpParams,omitempty"` - - // If the task is backing up a cloud VM that was created using - // 'convert and deploy', the following may be set. - CloudVMParams *CloudVMBackupParams `json:"cloudVmParams,omitempty"` - - // Common Backup configuration params. - ConfigVec []*ConfigurationParams `json:"configVec"` - - // Parameters for externally triggered backup. - ExternallyTriggeredBackupParams *ExternallyTriggeredBackupParams `json:"externallyTriggeredBackupParams,omitempty"` - - // For backing up kubernetes environment, we need additional paramaters. - KubernetesParams *KubernetesBackupParams `json:"kubernetesParams,omitempty"` - - // NoSql application specific connection params. - NosqlConnectParams *NoSQLConnectParams `json:"nosqlConnectParams,omitempty"` - - // O365 backup specific additional params. - O365Params *O365BackupParams `json:"o365Params,omitempty"` - - // The Oracle environment specific params. - OracleParams *OracleBackupParams `json:"oracleParams,omitempty"` - - // The outlook environment specific params. - OutlookParams *OutlookBackupParams `json:"outlookParams,omitempty"` - - // The Physical environment specific params. - PhysicalParams *PhysicalBackupParams `json:"physicalParams,omitempty"` - - // Post-script that must be executed after finishing the backup. - PostBackupTaskScript *RemoteScriptProto `json:"postBackupTaskScript,omitempty"` - - // Script that must be executed immediately after a snapshot has been - // created on the source. - PostSnapshotScript *RemoteScriptProto `json:"postSnapshotScript,omitempty"` - - // Pre-script that must be executed before taking the backup. - PreBackupTaskScript *RemoteScriptProto `json:"preBackupTaskScript,omitempty"` - - // Additional parameters for SAN backup. - SanBackupParams *SANBackupParams `json:"sanBackupParams,omitempty"` - - // Parameters for Sfdc backup. - SfdcBackupParams *SfdcBackupJobParams `json:"sfdcBackupParams,omitempty"` - - // The leaf level source entity if any that is associated with the task. If - // this is specified, the params are applicable only to this entity when this - // proto is part of a backup job run. - SourceEntity *PrivateEntityProto `json:"sourceEntity,omitempty"` - - // The SQL specific params to customize a SQL backup job run. - SQLParams *SQLBackupParams `json:"sqlParams,omitempty"` - - // Parameters for UDA backup. - UdaBackupParams *UdaBackupParams `json:"udaBackupParams,omitempty"` - - // Uptiering specific runonce params. - UptierParams *UptieringRunOnceParams `json:"uptierParams,omitempty"` - - // The VMware environment specific params. - VmwareParams *VMwareBackupParams `json:"vmwareParams,omitempty"` -} - -// Validate validates this backup task additional params -func (m *BackupTaskAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAnalysisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpHydrationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpLogRunParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudVMParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternallyTriggeredBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupTaskScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostSnapshotScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreBackupTaskScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptierParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskAdditionalParams) validateAcropolisParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateAnalysisParams(formats strfmt.Registry) error { - if swag.IsZero(m.AnalysisParams) { // not required - return nil - } - - if m.AnalysisParams != nil { - if err := m.AnalysisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateCassandraBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraBackupParams) { // not required - return nil - } - - if m.CassandraBackupParams != nil { - if err := m.CassandraBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateCdpHydrationParams(formats strfmt.Registry) error { - if swag.IsZero(m.CdpHydrationParams) { // not required - return nil - } - - if m.CdpHydrationParams != nil { - if err := m.CdpHydrationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpHydrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpHydrationParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateCdpLogRunParams(formats strfmt.Registry) error { - if swag.IsZero(m.CdpLogRunParams) { // not required - return nil - } - - if m.CdpLogRunParams != nil { - if err := m.CdpLogRunParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpLogRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpLogRunParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateCdpParams(formats strfmt.Registry) error { - if swag.IsZero(m.CdpParams) { // not required - return nil - } - - if m.CdpParams != nil { - if err := m.CdpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateCloudVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.CloudVMParams) { // not required - return nil - } - - if m.CloudVMParams != nil { - if err := m.CloudVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudVmParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateConfigVec(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigVec) { // not required - return nil - } - - for i := 0; i < len(m.ConfigVec); i++ { - if swag.IsZero(m.ConfigVec[i]) { // not required - continue - } - - if m.ConfigVec[i] != nil { - if err := m.ConfigVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateExternallyTriggeredBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExternallyTriggeredBackupParams) { // not required - return nil - } - - if m.ExternallyTriggeredBackupParams != nil { - if err := m.ExternallyTriggeredBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateNosqlConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if m.NosqlConnectParams != nil { - if err := m.NosqlConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateOutlookParams(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookParams) { // not required - return nil - } - - if m.OutlookParams != nil { - if err := m.OutlookParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validatePostBackupTaskScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupTaskScript) { // not required - return nil - } - - if m.PostBackupTaskScript != nil { - if err := m.PostBackupTaskScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupTaskScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupTaskScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validatePostSnapshotScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if m.PostSnapshotScript != nil { - if err := m.PostSnapshotScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validatePreBackupTaskScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreBackupTaskScript) { // not required - return nil - } - - if m.PreBackupTaskScript != nil { - if err := m.PreBackupTaskScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupTaskScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupTaskScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateSanBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.SanBackupParams) { // not required - return nil - } - - if m.SanBackupParams != nil { - if err := m.SanBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateSfdcBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcBackupParams) { // not required - return nil - } - - if m.SfdcBackupParams != nil { - if err := m.SfdcBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateSourceEntity(formats strfmt.Registry) error { - if swag.IsZero(m.SourceEntity) { // not required - return nil - } - - if m.SourceEntity != nil { - if err := m.SourceEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateSQLParams(formats strfmt.Registry) error { - if swag.IsZero(m.SQLParams) { // not required - return nil - } - - if m.SQLParams != nil { - if err := m.SQLParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateUdaBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaBackupParams) { // not required - return nil - } - - if m.UdaBackupParams != nil { - if err := m.UdaBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateUptierParams(formats strfmt.Registry) error { - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if m.UptierParams != nil { - if err := m.UptierParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup task additional params based on the context it is used -func (m *BackupTaskAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAnalysisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpHydrationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpLogRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfigVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternallyTriggeredBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupTaskScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostSnapshotScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreBackupTaskScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSanBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUptierParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateAnalysisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AnalysisParams != nil { - - if swag.IsZero(m.AnalysisParams) { // not required - return nil - } - - if err := m.AnalysisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateCassandraBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraBackupParams != nil { - - if swag.IsZero(m.CassandraBackupParams) { // not required - return nil - } - - if err := m.CassandraBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateCdpHydrationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpHydrationParams != nil { - - if swag.IsZero(m.CdpHydrationParams) { // not required - return nil - } - - if err := m.CdpHydrationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpHydrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpHydrationParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateCdpLogRunParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpLogRunParams != nil { - - if swag.IsZero(m.CdpLogRunParams) { // not required - return nil - } - - if err := m.CdpLogRunParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpLogRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpLogRunParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateCdpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpParams != nil { - - if swag.IsZero(m.CdpParams) { // not required - return nil - } - - if err := m.CdpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateCloudVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudVMParams != nil { - - if swag.IsZero(m.CloudVMParams) { // not required - return nil - } - - if err := m.CloudVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudVmParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateConfigVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConfigVec); i++ { - - if m.ConfigVec[i] != nil { - - if swag.IsZero(m.ConfigVec[i]) { // not required - return nil - } - - if err := m.ConfigVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateExternallyTriggeredBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternallyTriggeredBackupParams != nil { - - if swag.IsZero(m.ExternallyTriggeredBackupParams) { // not required - return nil - } - - if err := m.ExternallyTriggeredBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateNosqlConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlConnectParams != nil { - - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if err := m.NosqlConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateOutlookParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookParams != nil { - - if swag.IsZero(m.OutlookParams) { // not required - return nil - } - - if err := m.OutlookParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidatePostBackupTaskScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostBackupTaskScript != nil { - - if swag.IsZero(m.PostBackupTaskScript) { // not required - return nil - } - - if err := m.PostBackupTaskScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupTaskScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupTaskScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidatePostSnapshotScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostSnapshotScript != nil { - - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if err := m.PostSnapshotScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidatePreBackupTaskScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreBackupTaskScript != nil { - - if swag.IsZero(m.PreBackupTaskScript) { // not required - return nil - } - - if err := m.PreBackupTaskScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupTaskScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupTaskScript") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateSanBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SanBackupParams != nil { - - if swag.IsZero(m.SanBackupParams) { // not required - return nil - } - - if err := m.SanBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateSfdcBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcBackupParams != nil { - - if swag.IsZero(m.SfdcBackupParams) { // not required - return nil - } - - if err := m.SfdcBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateSourceEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceEntity != nil { - - if swag.IsZero(m.SourceEntity) { // not required - return nil - } - - if err := m.SourceEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateSQLParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLParams != nil { - - if swag.IsZero(m.SQLParams) { // not required - return nil - } - - if err := m.SQLParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateUdaBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaBackupParams != nil { - - if swag.IsZero(m.UdaBackupParams) { // not required - return nil - } - - if err := m.UdaBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateUptierParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UptierParams != nil { - - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if err := m.UptierParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskAdditionalParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskAdditionalParams) UnmarshalBinary(b []byte) error { - var res BackupTaskAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_info.go b/v1/models/backup_task_info.go deleted file mode 100644 index 704a5eca..00000000 --- a/v1/models/backup_task_info.go +++ /dev/null @@ -1,59 +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" -) - -// BackupTaskInfo Parameters for a backup op. -// -// swagger:model BackupTaskInfo -type BackupTaskInfo struct { - - // Id of that particular instance - InstanceID *string `json:"instanceId,omitempty"` - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Denotes the start time of the backuptask, needed for deeplinking. - StartTimeUsecs *string `json:"startTimeUsecs,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this backup task info -func (m *BackupTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup task info based on context it is used -func (m *BackupTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskInfo) UnmarshalBinary(b []byte) error { - var res BackupTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_state_proto.go b/v1/models/backup_task_state_proto.go deleted file mode 100644 index d6da9a12..00000000 --- a/v1/models/backup_task_state_proto.go +++ /dev/null @@ -1,1066 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupTaskStateProto Persistent state for a single task. This could either be incremental, or the -// full-state of a task. -// -// swagger:model BackupTaskStateProto -type BackupTaskStateProto struct { - - // Denotes the target for action executor(Bridge / BridgeProxy) on which task - // on slave should execute actions. - ActionExecutorTargetType *int32 `json:"actionExecutorTargetType,omitempty"` - - // Adapters can utilize this field to establish initial flags for backup - // operations. For instance, if a critical decision must be maintained - // consistently throughout the entire backup task, Adapters can use this - // field to set and persist relevant information at the start of the backup. - AdapterSpecificFlags *AdapterSpecificFlagsProto `json:"adapterSpecificFlags,omitempty"` - - // Any environment specific additional parameters associated with a backup - // task. - AdditionalParams *BackupTaskAdditionalParams `json:"additionalParams,omitempty"` - - // The incarnation id of the agent assigned to this task. If -1, the agent - // incarnation id hasn't been assigned yet. - AgentIncarnationID *int64 `json:"agentIncarnationId,omitempty"` - - // The state of application specific entities (if any) that are being - // backed up by this task. Note that this is populated for Iris on the fly. - AppEntityStateVec []*BackupTaskStateProtoAppEntityState `json:"appEntityStateVec"` - - // True if the backed up data has been verified. Only valid if the status of - // the task is kFinished. - BackupVerified *bool `json:"backupVerified,omitempty"` - - // Contains basic information about the backup task. - Base *BackupJobTaskStateBaseProto `json:"base,omitempty"` - - // Contains information about the snapshot that should be used by the current - // task to backup the source entity. - CurrentSnapshotInfo *SnapshotInfoProto `json:"currentSnapshotInfo,omitempty"` - - // Stats for each of the entities that was backed up in this task. Key is the - // entity id. This map will include all types of entities (ex: app entities - // for database backups). - // - // Note that this map is required to contain all the leaf level entities - // that are backed up. Non-leaf level entities can be included when there is - // no ambiguity (in cases where hierarchy rooted a non-leaf entity is a tree - // and not a DAG). - EntityBackupStats []*BackupTaskStateProtoEntityBackupStatsEntry `json:"entityBackupStats"` - - // in progress state - InProgressState *BackupTaskStateProtoInProgressTaskStateProto `json:"inProgressState,omitempty"` - - // Whether to limit resource hogging by a single task. - // If set, permit on dummy entity is requested to limit resource hogging. - // Due to the flag controlled limit in the number of these - // permits, number of parallel subtasks can be controlled, in turn limiting - // resource hogging by one large task. - // This field can be deprecated once fairness is introduced in resource - // manager. - // Note: This is only applicable to VMWare for now. - LimitResourceHoggingBySingleTask *bool `json:"limitResourceHoggingBySingleTask,omitempty"` - - // The registered vCenter or ESXi host under which the source corresponding - // to this backup task is running. - ParentSource *PrivateEntityProto `json:"parentSource,omitempty"` - - // Contains backed up size of base.sources(0) by last successful task. - PreviousBackupSize *int64 `json:"previousBackupSize,omitempty"` - - // Start time of the job that created the snapshot in the above - // 'previous_snapshot_info'. - PreviousRunStartTimeUsecs *int64 `json:"previousRunStartTimeUsecs,omitempty"` - - // Contains information about the snapshot used by the last task that - // successfully backed up base.sources(0). - PreviousSnapshotInfo *SnapshotInfoProto `json:"previousSnapshotInfo,omitempty"` - - // The name of the QoS principal to use when backing up data. - QosPrincipalName *string `json:"qosPrincipalName,omitempty"` - - // Records whether querying changed blocks failed. - QueryChangedBlocksError *bool `json:"queryChangedBlocksError,omitempty"` - - // If a newer successful snapshot for the source is available than the one - // that was selected during run creation, consider reselecting the previous - // snapshot. It's possible that during the creation of the initial run, there - // was an ongoing previous run that wasn't taken into account. However, by - // the time this task was scheduled, the previous run had been successfully - // completed, making it a viable option for selection. - ReconsiderChosenPrevSnapshot *bool `json:"reconsiderChosenPrevSnapshot,omitempty"` - - // If this backup task was received via an incoming replication from another - // cluster, and the replication failed with an error, this field will contain - // the details of the replication error. If this field is set, the snapshots - // for the sources may not exist on SnapFS, and hence this task should be - // considered as failed task. - RxReplicationError *PrivateErrorProto `json:"rxReplicationError,omitempty"` - - // Records whether utilizing SAN transport failed. - SanTransportError *bool `json:"sanTransportError,omitempty"` - - // Constituent id (and the gandalf session id) where this task has been - // scheduled. If -1, the task is not running at any slave. It's possible - // that the task was previously scheduled, but is now being re-scheduled. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // scheduled gandalf session Id - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // Denotes the setting type of whether the slave task stores its checkpoint - // state in scribe. - SlaveTaskStateInScribeSetting *int32 `json:"slaveTaskStateInScribeSetting,omitempty"` - - // Whether the local snapshot for the task has been deleted. - SnapshotDeleted *bool `json:"snapshotDeleted,omitempty"` - - // Contains delta changes to the snapshot for the current task. Only one of - // current_snapshot_info and snapshot_delta can be set in the - // BackupSnapshotProto in a persistent record. - SnapshotDelta SnapshotDeltaProto `json:"snapshotDelta,omitempty"` - - // An optional space usage policy configured while registering the entity. - SpaceUsagePolicy *SpaceUsagePolicy `json:"spaceUsagePolicy,omitempty"` - - // The container id that stats for this task should be written to. This - // container records total physical bytes written for the task. - StatsContainerID *int64 `json:"statsContainerId,omitempty"` - - // Contains the info about the storage snapshot of an entity. 'error' field - // within this proto should be used to determine whether the storage snapshot - // succeeded or not. If not, regular method should be used to backup the - // entity. - StorageSnapshotInfo *EntitySnapshotInfoProto `json:"storageSnapshotInfo,omitempty"` - - // A cluster wide unique task instance id for a task (under a job). - TaskID *int64 `json:"taskId,omitempty"` - - // This value is incremented when a task is restarted on a slave when the - // backup source host changes. - // TODO(gaurav): Deprecate this field after all clusters have migrated to - // 5.1. - TaskVersion *int32 `json:"taskVersion,omitempty"` - - // A way to connect to the source (vCenter managing the VM in case of VMware - // VMs). - TransientConnectorParams *ConnectorParams `json:"transientConnectorParams,omitempty"` - - // The datacenter under which the VM corresponding to this backup task is - // located. This is set only for the VMware env. - TransientDatacenterEntity *PrivateEntityProto `json:"transientDatacenterEntity,omitempty"` - - // The host on which the source corresponding to this backup task is - // currently known to be running (for example, an ESXi host in a VMware - // environment). - TransientHostEntity *PrivateEntityProto `json:"transientHostEntity,omitempty"` - - // A way to connect to the VCD source. It is only populated in VCD - // environment. - TransientVcdConnectorParams *ConnectorParams `json:"transientVcdConnectorParams,omitempty"` - - // Whether to use the UUID of the virtual disk when computing its encoded - // filename. - // NOTE: This is only applicable in a VMware environment. - UseUUIDForEncodedFilename *bool `json:"useUuidForEncodedFilename,omitempty"` - - // Whether to use the UUID of the virtual disk when matching it with a - // virtual disk of the previous snapshot. - // NOTE: This is only applicable in a VMware environment. - UseUUIDToMatchPreviousVmdk *bool `json:"useUuidToMatchPreviousVmdk,omitempty"` - - // If populated, Contains info on the vApp this entity belongs to. - // Note: This is populated only for environments of type kvCloudDirector. - VappInfo *BackupTaskStateVappInfoProto `json:"vappInfo,omitempty"` -} - -// Validate validates this backup task state proto -func (m *BackupTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdapterSpecificFlags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppEntityStateVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityBackupStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInProgressState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreviousSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRxReplicationError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpaceUsagePolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTransientConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTransientDatacenterEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTransientHostEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTransientVcdConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVappInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProto) validateAdapterSpecificFlags(formats strfmt.Registry) error { - if swag.IsZero(m.AdapterSpecificFlags) { // not required - return nil - } - - if m.AdapterSpecificFlags != nil { - if err := m.AdapterSpecificFlags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adapterSpecificFlags") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adapterSpecificFlags") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if m.AdditionalParams != nil { - if err := m.AdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateAppEntityStateVec(formats strfmt.Registry) error { - if swag.IsZero(m.AppEntityStateVec) { // not required - return nil - } - - for i := 0; i < len(m.AppEntityStateVec); i++ { - if swag.IsZero(m.AppEntityStateVec[i]) { // not required - continue - } - - if m.AppEntityStateVec[i] != nil { - if err := m.AppEntityStateVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntityStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntityStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskStateProto) validateBase(formats strfmt.Registry) error { - if swag.IsZero(m.Base) { // not required - return nil - } - - if m.Base != nil { - if err := m.Base.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateCurrentSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentSnapshotInfo) { // not required - return nil - } - - if m.CurrentSnapshotInfo != nil { - if err := m.CurrentSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateEntityBackupStats(formats strfmt.Registry) error { - if swag.IsZero(m.EntityBackupStats) { // not required - return nil - } - - for i := 0; i < len(m.EntityBackupStats); i++ { - if swag.IsZero(m.EntityBackupStats[i]) { // not required - continue - } - - if m.EntityBackupStats[i] != nil { - if err := m.EntityBackupStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityBackupStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityBackupStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskStateProto) validateInProgressState(formats strfmt.Registry) error { - if swag.IsZero(m.InProgressState) { // not required - return nil - } - - if m.InProgressState != nil { - if err := m.InProgressState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inProgressState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inProgressState") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validatePreviousSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PreviousSnapshotInfo) { // not required - return nil - } - - if m.PreviousSnapshotInfo != nil { - if err := m.PreviousSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("previousSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("previousSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateRxReplicationError(formats strfmt.Registry) error { - if swag.IsZero(m.RxReplicationError) { // not required - return nil - } - - if m.RxReplicationError != nil { - if err := m.RxReplicationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rxReplicationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rxReplicationError") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateSpaceUsagePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SpaceUsagePolicy) { // not required - return nil - } - - if m.SpaceUsagePolicy != nil { - if err := m.SpaceUsagePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spaceUsagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spaceUsagePolicy") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateStorageSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.StorageSnapshotInfo) { // not required - return nil - } - - if m.StorageSnapshotInfo != nil { - if err := m.StorageSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateTransientConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.TransientConnectorParams) { // not required - return nil - } - - if m.TransientConnectorParams != nil { - if err := m.TransientConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientConnectorParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateTransientDatacenterEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TransientDatacenterEntity) { // not required - return nil - } - - if m.TransientDatacenterEntity != nil { - if err := m.TransientDatacenterEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientDatacenterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientDatacenterEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateTransientHostEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TransientHostEntity) { // not required - return nil - } - - if m.TransientHostEntity != nil { - if err := m.TransientHostEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientHostEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateTransientVcdConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.TransientVcdConnectorParams) { // not required - return nil - } - - if m.TransientVcdConnectorParams != nil { - if err := m.TransientVcdConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientVcdConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientVcdConnectorParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) validateVappInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VappInfo) { // not required - return nil - } - - if m.VappInfo != nil { - if err := m.VappInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup task state proto based on the context it is used -func (m *BackupTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdapterSpecificFlags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppEntityStateVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBase(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCurrentSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityBackupStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInProgressState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreviousSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRxReplicationError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpaceUsagePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTransientConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTransientDatacenterEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTransientHostEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTransientVcdConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVappInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProto) contextValidateAdapterSpecificFlags(ctx context.Context, formats strfmt.Registry) error { - - if m.AdapterSpecificFlags != nil { - - if swag.IsZero(m.AdapterSpecificFlags) { // not required - return nil - } - - if err := m.AdapterSpecificFlags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adapterSpecificFlags") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adapterSpecificFlags") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdditionalParams != nil { - - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if err := m.AdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateAppEntityStateVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppEntityStateVec); i++ { - - if m.AppEntityStateVec[i] != nil { - - if swag.IsZero(m.AppEntityStateVec[i]) { // not required - return nil - } - - if err := m.AppEntityStateVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntityStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntityStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateBase(ctx context.Context, formats strfmt.Registry) error { - - if m.Base != nil { - - if swag.IsZero(m.Base) { // not required - return nil - } - - if err := m.Base.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateCurrentSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CurrentSnapshotInfo != nil { - - if swag.IsZero(m.CurrentSnapshotInfo) { // not required - return nil - } - - if err := m.CurrentSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateEntityBackupStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityBackupStats); i++ { - - if m.EntityBackupStats[i] != nil { - - if swag.IsZero(m.EntityBackupStats[i]) { // not required - return nil - } - - if err := m.EntityBackupStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityBackupStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityBackupStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateInProgressState(ctx context.Context, formats strfmt.Registry) error { - - if m.InProgressState != nil { - - if swag.IsZero(m.InProgressState) { // not required - return nil - } - - if err := m.InProgressState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inProgressState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inProgressState") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidatePreviousSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PreviousSnapshotInfo != nil { - - if swag.IsZero(m.PreviousSnapshotInfo) { // not required - return nil - } - - if err := m.PreviousSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("previousSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("previousSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateRxReplicationError(ctx context.Context, formats strfmt.Registry) error { - - if m.RxReplicationError != nil { - - if swag.IsZero(m.RxReplicationError) { // not required - return nil - } - - if err := m.RxReplicationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rxReplicationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rxReplicationError") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateSpaceUsagePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SpaceUsagePolicy != nil { - - if swag.IsZero(m.SpaceUsagePolicy) { // not required - return nil - } - - if err := m.SpaceUsagePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spaceUsagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spaceUsagePolicy") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateStorageSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageSnapshotInfo != nil { - - if swag.IsZero(m.StorageSnapshotInfo) { // not required - return nil - } - - if err := m.StorageSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateTransientConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TransientConnectorParams != nil { - - if swag.IsZero(m.TransientConnectorParams) { // not required - return nil - } - - if err := m.TransientConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientConnectorParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateTransientDatacenterEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TransientDatacenterEntity != nil { - - if swag.IsZero(m.TransientDatacenterEntity) { // not required - return nil - } - - if err := m.TransientDatacenterEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientDatacenterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientDatacenterEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateTransientHostEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TransientHostEntity != nil { - - if swag.IsZero(m.TransientHostEntity) { // not required - return nil - } - - if err := m.TransientHostEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientHostEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateTransientVcdConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TransientVcdConnectorParams != nil { - - if swag.IsZero(m.TransientVcdConnectorParams) { // not required - return nil - } - - if err := m.TransientVcdConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transientVcdConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transientVcdConnectorParams") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProto) contextValidateVappInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VappInfo != nil { - - if swag.IsZero(m.VappInfo) { // not required - return nil - } - - if err := m.VappInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskStateProto) UnmarshalBinary(b []byte) error { - var res BackupTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_state_proto_app_entity_state.go b/v1/models/backup_task_state_proto_app_entity_state.go deleted file mode 100644 index 61ba9ef9..00000000 --- a/v1/models/backup_task_state_proto_app_entity_state.go +++ /dev/null @@ -1,248 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupTaskStateProtoAppEntityState If this backup task is backing up application entities (such as -// SQL/Oracle dbs), this message contains the state of those entities. -// Note that this information is populated for Iris on the fly, and is not -// persisted in Magneto's WAL. -// -// swagger:model BackupTaskStateProto_AppEntityState -type BackupTaskStateProtoAppEntityState struct { - - // The application entity being backed up. - AppEntity *PrivateEntityProto `json:"appEntity,omitempty"` - - // The end time of the backup. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered (if any) during backup. Only valid if - // the 'public_status' is kFinished. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The progress monitor path. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // The relative snapshot dir where the application level data is stored. - RelativeSnapshotDir *string `json:"relativeSnapshotDir,omitempty"` - - // The start time of the backup. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The total number of bytes read from source. - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // The total number of logical bytes to be backed up. - TotalLogicalBytes *int64 `json:"totalLogicalBytes,omitempty"` - - // The warnings encountered (if any) during backup. - Warnings []*PrivateErrorProto `json:"warnings"` -} - -// Validate validates this backup task state proto app entity state -func (m *BackupTaskStateProtoAppEntityState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProtoAppEntityState) validateAppEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if m.AppEntity != nil { - if err := m.AppEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProtoAppEntityState) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *BackupTaskStateProtoAppEntityState) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup task state proto app entity state based on the context it is used -func (m *BackupTaskStateProtoAppEntityState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProtoAppEntityState) contextValidateAppEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AppEntity != nil { - - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if err := m.AppEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *BackupTaskStateProtoAppEntityState) 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 -} - -func (m *BackupTaskStateProtoAppEntityState) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskStateProtoAppEntityState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskStateProtoAppEntityState) UnmarshalBinary(b []byte) error { - var res BackupTaskStateProtoAppEntityState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_state_proto_entity_backup_stats_entry.go b/v1/models/backup_task_state_proto_entity_backup_stats_entry.go deleted file mode 100644 index 998954e2..00000000 --- a/v1/models/backup_task_state_proto_entity_backup_stats_entry.go +++ /dev/null @@ -1,112 +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" -) - -// BackupTaskStateProtoEntityBackupStatsEntry backup task state proto entity backup stats entry -// -// swagger:model BackupTaskStateProto_EntityBackupStatsEntry -type BackupTaskStateProtoEntityBackupStatsEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *EntityBackupStats `json:"value,omitempty"` -} - -// Validate validates this backup task state proto entity backup stats entry -func (m *BackupTaskStateProtoEntityBackupStatsEntry) 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 -} - -func (m *BackupTaskStateProtoEntityBackupStatsEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup task state proto entity backup stats entry based on the context it is used -func (m *BackupTaskStateProtoEntityBackupStatsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProtoEntityBackupStatsEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskStateProtoEntityBackupStatsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskStateProtoEntityBackupStatsEntry) UnmarshalBinary(b []byte) error { - var res BackupTaskStateProtoEntityBackupStatsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_state_proto_in_progress_task_state_proto.go b/v1/models/backup_task_state_proto_in_progress_task_state_proto.go deleted file mode 100644 index 19af7a47..00000000 --- a/v1/models/backup_task_state_proto_in_progress_task_state_proto.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupTaskStateProtoInProgressTaskStateProto State maintained for the task only as long as the task is pending. Cleared -// when the task is finished or cancelled. -// -// swagger:model BackupTaskStateProto_InProgressTaskStateProto -type BackupTaskStateProtoInProgressTaskStateProto struct { - - // acquired app entity lock vec - AcquiredAppEntityLockVec []*PrivateEntityProto `json:"acquiredAppEntityLockVec"` -} - -// Validate validates this backup task state proto in progress task state proto -func (m *BackupTaskStateProtoInProgressTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcquiredAppEntityLockVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProtoInProgressTaskStateProto) validateAcquiredAppEntityLockVec(formats strfmt.Registry) error { - if swag.IsZero(m.AcquiredAppEntityLockVec) { // not required - return nil - } - - for i := 0; i < len(m.AcquiredAppEntityLockVec); i++ { - if swag.IsZero(m.AcquiredAppEntityLockVec[i]) { // not required - continue - } - - if m.AcquiredAppEntityLockVec[i] != nil { - if err := m.AcquiredAppEntityLockVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acquiredAppEntityLockVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acquiredAppEntityLockVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup task state proto in progress task state proto based on the context it is used -func (m *BackupTaskStateProtoInProgressTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcquiredAppEntityLockVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTaskStateProtoInProgressTaskStateProto) contextValidateAcquiredAppEntityLockVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AcquiredAppEntityLockVec); i++ { - - if m.AcquiredAppEntityLockVec[i] != nil { - - if swag.IsZero(m.AcquiredAppEntityLockVec[i]) { // not required - return nil - } - - if err := m.AcquiredAppEntityLockVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acquiredAppEntityLockVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acquiredAppEntityLockVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskStateProtoInProgressTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskStateProtoInProgressTaskStateProto) UnmarshalBinary(b []byte) error { - var res BackupTaskStateProtoInProgressTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_task_state_vapp_info_proto.go b/v1/models/backup_task_state_vapp_info_proto.go deleted file mode 100644 index 9c3cf1a4..00000000 --- a/v1/models/backup_task_state_vapp_info_proto.go +++ /dev/null @@ -1,81 +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" -) - -// BackupTaskStateVappInfoProto This message contains information on the VApp being being backed up. -// -// swagger:model BackupTaskStateVappInfoProto -type BackupTaskStateVappInfoProto struct { - - // The catalog to which the template belongs to. This is only applicable if - // is_vapp_template_backup is true. - CatalogUUID *string `json:"catalogUuid,omitempty"` - - // Whether the vApp is being backed up during a vApp template backup. - IsVappTemplateBackup *bool `json:"isVappTemplateBackup,omitempty"` - - // Wehther the VApp is deployed. - VappDeployed *bool `json:"vappDeployed,omitempty"` - - // Contains the vApp entity id. - VappEntity *int64 `json:"vappEntity,omitempty"` - - // Contains the VApp href. - VappHref *string `json:"vappHref,omitempty"` - - // Contains the VApp Id. - VappID *string `json:"vappId,omitempty"` - - // Wehther the VApp is in maintenance mode. - VappInMaintenanceMode *bool `json:"vappInMaintenanceMode,omitempty"` - - // Contains the entire VApp info fetched from VCD in xml format. - VappInfoXML *string `json:"vappInfoXml,omitempty"` - - // Contains the VApp name. - VappName *string `json:"vappName,omitempty"` - - // Contains the vApp's network config XML string. - VappNetworkXML *string `json:"vappNetworkXml,omitempty"` - - // Contains the VApp's vDC Id. - VdcID *string `json:"vdcId,omitempty"` -} - -// Validate validates this backup task state vapp info proto -func (m *BackupTaskStateVappInfoProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup task state vapp info proto based on context it is used -func (m *BackupTaskStateVappInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTaskStateVappInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTaskStateVappInfoProto) UnmarshalBinary(b []byte) error { - var res BackupTaskStateVappInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bandwidth_limit.go b/v1/models/bandwidth_limit.go deleted file mode 100644 index b522fec7..00000000 --- a/v1/models/bandwidth_limit.go +++ /dev/null @@ -1,146 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BandwidthLimit Bandwidth Limit. -// -// Specifies settings for limiting the data transfer rate between -// the local and remote Clusters or bandwidth limiting schedule for apollo. -// Only one of RateLimitBytesPerSec or IoRate should be set in this struct and -// corresponding BandwidthLimitOverrides should also be in the same unit. -// -// swagger:model BandwidthLimit -type BandwidthLimit struct { - - // Array of Override Bandwidth Limits. - // - // Specifies a list of override bandwidth limits and time periods - // when those limits override the rateLimitBytesPerSec limit. - // If overlapping time periods are specified, the last one in the - // array takes precedence. - BandwidthLimitOverrides []*BandwidthLimitOverride `json:"bandwidthLimitOverrides"` - - // Specifies the default IO Rate of the throttling schedule. This value is - // internally mapped to some notion of how many resources a process should be - // consuming. - IoRate *int32 `json:"ioRate,omitempty"` - - // Specifies the maximum allowed data transfer rate between the local Cluster - // and remote Clusters. The value is specified in bytes per second. - // If not set, the data transfer rate is not limited. - RateLimitBytesPerSec *int64 `json:"rateLimitBytesPerSec,omitempty"` - - // Specifies a time zone for the specified time period. - // The time zone is defined in the following format: "Area/Location", - // for example: "America/New_York". - Timezone *string `json:"timezone,omitempty"` -} - -// Validate validates this bandwidth limit -func (m *BandwidthLimit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBandwidthLimitOverrides(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimit) validateBandwidthLimitOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.BandwidthLimitOverrides) { // not required - return nil - } - - for i := 0; i < len(m.BandwidthLimitOverrides); i++ { - if swag.IsZero(m.BandwidthLimitOverrides[i]) { // not required - continue - } - - if m.BandwidthLimitOverrides[i] != nil { - if err := m.BandwidthLimitOverrides[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this bandwidth limit based on the context it is used -func (m *BandwidthLimit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBandwidthLimitOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimit) contextValidateBandwidthLimitOverrides(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BandwidthLimitOverrides); i++ { - - if m.BandwidthLimitOverrides[i] != nil { - - if swag.IsZero(m.BandwidthLimitOverrides[i]) { // not required - return nil - } - - if err := m.BandwidthLimitOverrides[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BandwidthLimit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BandwidthLimit) UnmarshalBinary(b []byte) error { - var res BandwidthLimit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bandwidth_limit_override.go b/v1/models/bandwidth_limit_override.go deleted file mode 100644 index ab3b1032..00000000 --- a/v1/models/bandwidth_limit_override.go +++ /dev/null @@ -1,122 +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" -) - -// BandwidthLimitOverride Bandwidth Limit Override -// -// Specifies bandwidth limit override value to be enforced during -// the specified daily time period for the specified days of the week. -// -// swagger:model BandwidthLimitOverride -type BandwidthLimitOverride struct { - - // Specifies the value to override the regular maximum bandwidth rate - // (rateLimitBytesPerSec) for the specified time period. - // The value is specified in bytes per second. - BytesPerSecond *int64 `json:"bytesPerSecond,omitempty"` - - // Specifies the value to override the default IO rate for the specified - // time period. - IoRate *int32 `json:"ioRate,omitempty"` - - // Specifies a daily time period and days of the week when the - // regular maximum bandwidth rate should be overridden. - TimePeriods *TimeOfAWeek `json:"timePeriods,omitempty"` -} - -// Validate validates this bandwidth limit override -func (m *BandwidthLimitOverride) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimePeriods(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimitOverride) validateTimePeriods(formats strfmt.Registry) error { - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if m.TimePeriods != nil { - if err := m.TimePeriods.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bandwidth limit override based on the context it is used -func (m *BandwidthLimitOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimePeriods(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimitOverride) contextValidateTimePeriods(ctx context.Context, formats strfmt.Registry) error { - - if m.TimePeriods != nil { - - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if err := m.TimePeriods.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BandwidthLimitOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BandwidthLimitOverride) UnmarshalBinary(b []byte) error { - var res BandwidthLimitOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/banner.go b/v1/models/banner.go deleted file mode 100644 index a2e4fd00..00000000 --- a/v1/models/banner.go +++ /dev/null @@ -1,69 +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" -) - -// Banner Banner is used for storing the banner content in scribe and also for -// transferring it over the wire. -// -// swagger:model Banner -type Banner struct { - - // Specifies a banner_id which can uniquely identify a banner. This may be - // the cluster_id, or the tenant_id, or the group_id, or the user SID etc. - // If this field is nil, the it is assumed to be the cluster_id. - // The content is stored against this 'row' in Scribe. - BannerID *string `json:"bannerId,omitempty"` - - // Specifies the content of the banner. - Content *string `json:"content,omitempty"` - - // createdTimeMsecs field is deprecated. - // Timestamp at which banner was created. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // description field is deprecated. - // Specifies the description of this banner. - Description *string `json:"description,omitempty"` - - // lastUpdatedTimeMsecs field is deprecated. - // Timestamp at which banner was last updated. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` -} - -// Validate validates this banner -func (m *Banner) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this banner based on context it is used -func (m *Banner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Banner) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Banner) UnmarshalBinary(b []byte) error { - var res Banner - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/banner_update_parameters.go b/v1/models/banner_update_parameters.go deleted file mode 100644 index 91309d4b..00000000 --- a/v1/models/banner_update_parameters.go +++ /dev/null @@ -1,56 +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" -) - -// BannerUpdateParameters Banner Update Request. -// -// Specifies the settings used to update a new banner. -// -// swagger:model BannerUpdateParameters -type BannerUpdateParameters struct { - - // Specifies the content of the banner. - Content *string `json:"content,omitempty"` - - // description field is deprecated. - // Specifies the description of this banner. - Description *string `json:"description,omitempty"` -} - -// Validate validates this banner update parameters -func (m *BannerUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this banner update parameters based on context it is used -func (m *BannerUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BannerUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BannerUpdateParameters) UnmarshalBinary(b []byte) error { - var res BannerUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/basic_cluster_info.go b/v1/models/basic_cluster_info.go deleted file mode 100644 index b9bc0958..00000000 --- a/v1/models/basic_cluster_info.go +++ /dev/null @@ -1,310 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// BasicClusterInfo Basic Cohesity Cluster Information. -// -// Specifies basic information about the Cohesity Cluster. -// -// swagger:model BasicClusterInfo -type BasicClusterInfo struct { - - // Specifies the authentication scheme for the cluster. - // 'kPasswordOnly' indicates the normal cohesity authentication type. - // 'kCertificateOnly' indicates that certificate based authentication has - // been enabled and the password based authentication has been turned off. - // 'kPasswordAndCertificate' indicates that both the authenticatio schemes - // are required. - // Enum: ["kPasswordOnly","kCertificateOnly","kPasswordAndCertificate"] - AuthenticationType *string `json:"authenticationType,omitempty"` - - // Specifies if banner is enabled on the cluster. - BannerEnabled *bool `json:"bannerEnabled,omitempty"` - - // Specifies a list of domains joined to the Cohesity Cluster with their - // trust relationships. - ClusterDomains []*Domain `json:"clusterDomains"` - - // This field is deprecated. Specifies the current release of the Cohesity - // software running on this Cohesity Cluster. - // deprecated: true - ClusterSoftwareVersion *string `json:"clusterSoftwareVersion,omitempty"` - - // Specifies the type of Cohesity Cluster. - // 'kPhysical' indicates the Cohesity Cluster is hosted directly on hardware. - // 'kVirtualRobo' indicates the Cohesity Cluster is hosted in a VM on - // a ESXi Host of a VMware vCenter Server using Cohesity's Virtual Edition. - // 'kMicrosoftCloud' indicates the Cohesity Cluster is hosted in a VM - // on Microsoft Azure using Cohesity's Cloud Edition. - // 'kAmazonCloud' indicates the Cohesity Cluster is hosted in a VM - // on Amazon S3 using Cohesity's Cloud Edition. - // 'kGoogleCloud' indicates the Cohesity Cluster is hosted in a VM - // on Google Cloud Platform using Cohesity's Cloud Edition. - // Enum: ["kPhysical","kVirtualRobo","kMicrosoftCloud","kAmazonCloud","kGoogleCloud"] - ClusterType *string `json:"clusterType,omitempty"` - - // Specifies if dodin mode is enabled on the cluster. - DodinModeEnabled *bool `json:"dodinModeEnabled,omitempty"` - - // Array of Domains. - // - // Specifies a list of domains joined to the Cohesity Cluster, - // including the default LOCAL Cohesity domain used to store the - // local Cohesity users. - Domains []string `json:"domains"` - - // Specifies the HeliosControlPlaneEnv. - // Read Only: true - HeliosControlPlaneEnv *string `json:"heliosControlPlaneEnv,omitempty"` - - // Specifies Idp is configured for the Cluster. - IdpConfigured *bool `json:"idpConfigured,omitempty"` - - // Specifies Idp is configured for a Tenant. - IdpTenantExists *bool `json:"idpTenantExists,omitempty"` - - // Specifies the language and locale for the Cohesity Cluster. - LanguageLocale *string `json:"languageLocale,omitempty"` - - // Specifies whether server is running in mcm-mode. If set to true, - // it is in mcm-mode. - McmMode *bool `json:"mcmMode,omitempty"` - - // Specifies whether server is running in mcm-on-prem-mode. If set to true, - // it is in mcm on prem mode. This need mcm-mode to be true. - McmOnPremMode *bool `json:"mcmOnPremMode,omitempty"` - - // Specifies if multi-tenancy is enabled on the cluster. - MultiTenancyEnabled *bool `json:"multiTenancyEnabled,omitempty"` - - // Specifies the name of the Cohesity Cluster. - Name *string `json:"name,omitempty"` -} - -// Validate validates this basic cluster info -func (m *BasicClusterInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var basicClusterInfoTypeAuthenticationTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPasswordOnly","kCertificateOnly","kPasswordAndCertificate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - basicClusterInfoTypeAuthenticationTypePropEnum = append(basicClusterInfoTypeAuthenticationTypePropEnum, v) - } -} - -const ( - - // BasicClusterInfoAuthenticationTypeKPasswordOnly captures enum value "kPasswordOnly" - BasicClusterInfoAuthenticationTypeKPasswordOnly string = "kPasswordOnly" - - // BasicClusterInfoAuthenticationTypeKCertificateOnly captures enum value "kCertificateOnly" - BasicClusterInfoAuthenticationTypeKCertificateOnly string = "kCertificateOnly" - - // BasicClusterInfoAuthenticationTypeKPasswordAndCertificate captures enum value "kPasswordAndCertificate" - BasicClusterInfoAuthenticationTypeKPasswordAndCertificate string = "kPasswordAndCertificate" -) - -// prop value enum -func (m *BasicClusterInfo) validateAuthenticationTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, basicClusterInfoTypeAuthenticationTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BasicClusterInfo) validateAuthenticationType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationType) { // not required - return nil - } - - // value enum - if err := m.validateAuthenticationTypeEnum("authenticationType", "body", *m.AuthenticationType); err != nil { - return err - } - - return nil -} - -func (m *BasicClusterInfo) validateClusterDomains(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterDomains) { // not required - return nil - } - - for i := 0; i < len(m.ClusterDomains); i++ { - if swag.IsZero(m.ClusterDomains[i]) { // not required - continue - } - - if m.ClusterDomains[i] != nil { - if err := m.ClusterDomains[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var basicClusterInfoTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical","kVirtualRobo","kMicrosoftCloud","kAmazonCloud","kGoogleCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - basicClusterInfoTypeClusterTypePropEnum = append(basicClusterInfoTypeClusterTypePropEnum, v) - } -} - -const ( - - // BasicClusterInfoClusterTypeKPhysical captures enum value "kPhysical" - BasicClusterInfoClusterTypeKPhysical string = "kPhysical" - - // BasicClusterInfoClusterTypeKVirtualRobo captures enum value "kVirtualRobo" - BasicClusterInfoClusterTypeKVirtualRobo string = "kVirtualRobo" - - // BasicClusterInfoClusterTypeKMicrosoftCloud captures enum value "kMicrosoftCloud" - BasicClusterInfoClusterTypeKMicrosoftCloud string = "kMicrosoftCloud" - - // BasicClusterInfoClusterTypeKAmazonCloud captures enum value "kAmazonCloud" - BasicClusterInfoClusterTypeKAmazonCloud string = "kAmazonCloud" - - // BasicClusterInfoClusterTypeKGoogleCloud captures enum value "kGoogleCloud" - BasicClusterInfoClusterTypeKGoogleCloud string = "kGoogleCloud" -) - -// prop value enum -func (m *BasicClusterInfo) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, basicClusterInfoTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BasicClusterInfo) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterType) { // not required - return nil - } - - // value enum - if err := m.validateClusterTypeEnum("clusterType", "body", *m.ClusterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this basic cluster info based on the context it is used -func (m *BasicClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHeliosControlPlaneEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BasicClusterInfo) contextValidateClusterDomains(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterDomains); i++ { - - if m.ClusterDomains[i] != nil { - - if swag.IsZero(m.ClusterDomains[i]) { // not required - return nil - } - - if err := m.ClusterDomains[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BasicClusterInfo) contextValidateHeliosControlPlaneEnv(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "heliosControlPlaneEnv", "body", m.HeliosControlPlaneEnv); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BasicClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BasicClusterInfo) UnmarshalBinary(b []byte) error { - var res BasicClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/basic_task_info.go b/v1/models/basic_task_info.go deleted file mode 100644 index 67bf27c7..00000000 --- a/v1/models/basic_task_info.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" -) - -// BasicTaskInfo BasicTaskInfo handles the basic elements of the notification task. -// -// swagger:model BasicTaskInfo -type BasicTaskInfo struct { - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this basic task info -func (m *BasicTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this basic task info based on context it is used -func (m *BasicTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BasicTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BasicTaskInfo) UnmarshalBinary(b []byte) error { - var res BasicTaskInfo - 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 deleted file mode 100644 index d54eda4e..00000000 --- a/v1/models/bifrost_config.go +++ /dev/null @@ -1,152 +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" -) - -// BifrostConfig BifrostConfig. -// -// Specifies the settings of a BifrostConfig. -// Its used by both Request and Response structures. -// -// swagger:model BifrostConfig -type BifrostConfig struct { - - // Specifies the bifrost image version. - ImageVersion *string `json:"ImageVersion,omitempty"` - - // Specifies the cpu for the bifrost config. - CPU *int32 `json:"cpu,omitempty"` - - // Specifies a description of the VLAN. - Description *string `json:"description,omitempty"` - - // Specifies the id of the VLAN tag. - ID *int32 `json:"id,omitempty"` - - // Specifies the interface group name of the VLAN. It is in the format of - // .. - IfaceGroupName *string `json:"ifaceGroupName,omitempty"` - - // Specifies the memory for the bifrost config. - Memory *int32 `json:"memory,omitempty"` - - // Specifies the mtu for the bifrost vlan. - Mtu *int32 `json:"mtu,omitempty"` - - // 4 types of States - // UNKNOWN - // ACTIVE - // DISABLED - // DELETING - State *string `json:"state,omitempty"` - - // subnet - Subnet *BifrostConfigSubnet `json:"subnet,omitempty"` - - // Specifies the tenant id that this vlan belongs to. - TenantID *string `json:"tenantId,omitempty"` - - // Two types of bifrost vlans. - // INTERNAL - // EXTERNAL - Type *string `json:"type,omitempty"` - - // Specifies the VLAN name of the vlanId. - VlanName *string `json:"vlanName,omitempty"` -} - -// Validate validates this bifrost config -func (m *BifrostConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConfig) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -// ContextValidate validate this bifrost config based on the context it is used -func (m *BifrostConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *BifrostConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConfig) UnmarshalBinary(b []byte) error { - var res BifrostConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/bifrost_subnet.go b/v1/models/bifrost_subnet.go deleted file mode 100644 index e3443da6..00000000 --- a/v1/models/bifrost_subnet.go +++ /dev/null @@ -1,69 +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" -) - -// BifrostSubnet BifrostSubnet. -// -// Specifies the settings of a Bifrost Subnet. -// -// swagger:model BifrostSubnet -type BifrostSubnet struct { - - // Specifies the Gateway of the VLAN. It can carry V4 or V6 in case of - // requests, and carrises V4 in case of response. - Gateway *string `json:"gateway,omitempty"` - - // Specifies either an IPv6 address or an IPv4 address. - IPCidr *string `json:"ipCidr,omitempty"` - - // Array of IPs. - // - // Specifies a list of IPs in the VLAN. - Ips []string `json:"ips"` - - // Specifies the netmask using bits. - NetmaskBits *int32 `json:"netmaskBits,omitempty"` - - // Specifies the netmask using an IP4 address. - // The netmask can only be set using netmaskIp4 if the IP address - // is an IPv4 address. - NetmaskIp4 *string `json:"netmaskIp4,omitempty"` -} - -// Validate validates this bifrost subnet -func (m *BifrostSubnet) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this bifrost subnet based on context it is used -func (m *BifrostSubnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostSubnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostSubnet) UnmarshalBinary(b []byte) error { - var res BifrostSubnet - 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 deleted file mode 100644 index 189afaab..00000000 --- a/v1/models/blackout_period.go +++ /dev/null @@ -1,240 +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" -) - -// BlackoutPeriod QuietTime Period. -// -// Specifies a time range in a single day when new Job Runs of -// Protection Jobs cannot be started. For example, a Protection Job -// with a daily schedule could define a QuietTime period for Sunday. -// -// swagger:model BlackoutPeriod -type BlackoutPeriod struct { - - // Specified the Id for a snapshot copy policy. This is generated when the - // policy is created. - ID *string `json:"Id,omitempty"` - - // QuietTime Day. - // - // Specifies a day in the week when no new Job Runs should be started - // such as 'kSunday'. - // If not set, the time range applies to all days. - // Specifies a day in a week such as 'kSunday', 'kMonday', etc. - // Enum: ["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"] - Day *string `json:"day,omitempty"` - - // end time - EndTime *BlackoutPeriodEndTime `json:"endTime,omitempty"` - - // start time - StartTime *BlackoutPeriodStartTime `json:"startTime,omitempty"` -} - -// Validate validates this blackout period -func (m *BlackoutPeriod) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDay(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var blackoutPeriodTypeDayPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - blackoutPeriodTypeDayPropEnum = append(blackoutPeriodTypeDayPropEnum, v) - } -} - -const ( - - // BlackoutPeriodDayKSunday captures enum value "kSunday" - BlackoutPeriodDayKSunday string = "kSunday" - - // BlackoutPeriodDayKMonday captures enum value "kMonday" - BlackoutPeriodDayKMonday string = "kMonday" - - // BlackoutPeriodDayKTuesday captures enum value "kTuesday" - BlackoutPeriodDayKTuesday string = "kTuesday" - - // BlackoutPeriodDayKWednesday captures enum value "kWednesday" - BlackoutPeriodDayKWednesday string = "kWednesday" - - // BlackoutPeriodDayKThursday captures enum value "kThursday" - BlackoutPeriodDayKThursday string = "kThursday" - - // BlackoutPeriodDayKFriday captures enum value "kFriday" - BlackoutPeriodDayKFriday string = "kFriday" - - // BlackoutPeriodDayKSaturday captures enum value "kSaturday" - BlackoutPeriodDayKSaturday string = "kSaturday" -) - -// prop value enum -func (m *BlackoutPeriod) validateDayEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, blackoutPeriodTypeDayPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BlackoutPeriod) validateDay(formats strfmt.Registry) error { - if swag.IsZero(m.Day) { // not required - return nil - } - - // value enum - if err := m.validateDayEnum("day", "body", *m.Day); err != nil { - return err - } - - return nil -} - -func (m *BlackoutPeriod) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *BlackoutPeriod) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this blackout period based on the context it is used -func (m *BlackoutPeriod) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *BlackoutPeriod) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BlackoutPeriod) UnmarshalBinary(b []byte) error { - var res BlackoutPeriod - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/bond_slave_info.go b/v1/models/bond_slave_info.go deleted file mode 100644 index 44565329..00000000 --- a/v1/models/bond_slave_info.go +++ /dev/null @@ -1,175 +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" -) - -// BondSlaveInfo bond slave info -// -// swagger:model BondSlaveInfo -type BondSlaveInfo struct { - - // Bond seocondary link state. - LinkState *string `json:"linkState,omitempty"` - - // Mac address of the bond secondary interface. - MacAddr *string `json:"macAddr,omitempty"` - - // Bond secondary name. - Name *string `json:"name,omitempty"` - - // Bond seocondarys slot info. - Slot *string `json:"slot,omitempty"` - - // Bond seocondary Speed. - Speed *string `json:"speed,omitempty"` - - // Interface Stats. - Stats *InterfaceStats `json:"stats,omitempty"` - - // Bond secondary uplink switch info. - UplinkSwitchInfo *UplinkSwitchInfo `json:"uplinkSwitchInfo,omitempty"` -} - -// Validate validates this bond slave info -func (m *BondSlaveInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUplinkSwitchInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BondSlaveInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *BondSlaveInfo) validateUplinkSwitchInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UplinkSwitchInfo) { // not required - return nil - } - - if m.UplinkSwitchInfo != nil { - if err := m.UplinkSwitchInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkSwitchInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkSwitchInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bond slave info based on the context it is used -func (m *BondSlaveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUplinkSwitchInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BondSlaveInfo) 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 -} - -func (m *BondSlaveInfo) contextValidateUplinkSwitchInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UplinkSwitchInfo != nil { - - if swag.IsZero(m.UplinkSwitchInfo) { // not required - return nil - } - - if err := m.UplinkSwitchInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkSwitchInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkSwitchInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BondSlaveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BondSlaveInfo) UnmarshalBinary(b []byte) error { - var res BondSlaveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bonding_opts.go b/v1/models/bonding_opts.go deleted file mode 100644 index 0223b21a..00000000 --- a/v1/models/bonding_opts.go +++ /dev/null @@ -1,56 +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" -) - -// BondingOpts Bonding Opts -// -// swagger:model BondingOpts -type BondingOpts struct { - - // lacp rate - LacpRate *string `json:"lacpRate,omitempty"` - - // mode - Mode *string `json:"mode,omitempty"` - - // xmit hash policy - XmitHashPolicy *string `json:"xmitHashPolicy,omitempty"` -} - -// Validate validates this bonding opts -func (m *BondingOpts) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this bonding opts based on context it is used -func (m *BondingOpts) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BondingOpts) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BondingOpts) UnmarshalBinary(b []byte) error { - var res BondingOpts - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bucket_info.go b/v1/models/bucket_info.go deleted file mode 100644 index f2bcfa85..00000000 --- a/v1/models/bucket_info.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" -) - -// BucketInfo Proto that contains specific information about a couchbase bucket. -// -// swagger:model BucketInfo -type BucketInfo struct { - - // Type of this bucket. - BucketType *string `json:"bucketType,omitempty"` - - // Number of documents in this bucket. - DocumentCount *int64 `json:"documentCount,omitempty"` -} - -// Validate validates this bucket info -func (m *BucketInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this bucket info based on context it is used -func (m *BucketInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BucketInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BucketInfo) UnmarshalBinary(b []byte) error { - var res BucketInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bucket_ownership_controls.go b/v1/models/bucket_ownership_controls.go deleted file mode 100644 index 3ffa75bf..00000000 --- a/v1/models/bucket_ownership_controls.go +++ /dev/null @@ -1,110 +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" -) - -// BucketOwnershipControls Protobuf that describes the bucket ownership control configuarion that is -// used to manage the ownership of objects in a bucket. -// -// swagger:model BucketOwnershipControls -type BucketOwnershipControls struct { - - // Rule for bucket ownership control. - Rule *OwnershipControlsRule `json:"rule,omitempty"` -} - -// Validate validates this bucket ownership controls -func (m *BucketOwnershipControls) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BucketOwnershipControls) validateRule(formats strfmt.Registry) error { - if swag.IsZero(m.Rule) { // not required - return nil - } - - if m.Rule != nil { - if err := m.Rule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bucket ownership controls based on the context it is used -func (m *BucketOwnershipControls) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BucketOwnershipControls) contextValidateRule(ctx context.Context, formats strfmt.Registry) error { - - if m.Rule != nil { - - if swag.IsZero(m.Rule) { // not required - return nil - } - - if err := m.Rule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BucketOwnershipControls) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BucketOwnershipControls) UnmarshalBinary(b []byte) error { - var res BucketOwnershipControls - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bucket_policy.go b/v1/models/bucket_policy.go deleted file mode 100644 index 212f4abd..00000000 --- a/v1/models/bucket_policy.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BucketPolicy Protobuf that describes the policy set on a bucket. -// -// swagger:model BucketPolicy -type BucketPolicy struct { - - // The identifier for the bucket policy. - ID *string `json:"id,omitempty"` - - // Raw JSON string of the stored policy. - RawPolicyStr *string `json:"rawPolicyStr,omitempty"` - - // This field defines the statement to execute for each request. - StatementVec []*Statement `json:"statementVec"` - - // This field specifies the language syntax rules that are to be used to - // process the policy. - Version *string `json:"version,omitempty"` -} - -// Validate validates this bucket policy -func (m *BucketPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatementVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BucketPolicy) validateStatementVec(formats strfmt.Registry) error { - if swag.IsZero(m.StatementVec) { // not required - return nil - } - - for i := 0; i < len(m.StatementVec); i++ { - if swag.IsZero(m.StatementVec[i]) { // not required - continue - } - - if m.StatementVec[i] != nil { - if err := m.StatementVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statementVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statementVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this bucket policy based on the context it is used -func (m *BucketPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatementVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BucketPolicy) contextValidateStatementVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatementVec); i++ { - - if m.StatementVec[i] != nil { - - if swag.IsZero(m.StatementVec[i]) { // not required - return nil - } - - if err := m.StatementVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statementVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statementVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BucketPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BucketPolicy) UnmarshalBinary(b []byte) error { - var res BucketPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bulk_install_app_task_info.go b/v1/models/bulk_install_app_task_info.go deleted file mode 100644 index 187cd048..00000000 --- a/v1/models/bulk_install_app_task_info.go +++ /dev/null @@ -1,180 +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" -) - -// BulkInstallAppTaskInfo Bulk Install App Task Information. -// -// Parameters for a bulk install app task. -// -// swagger:model BulkInstallAppTaskInfo -type BulkInstallAppTaskInfo struct { - - // Job id of the task. - JobID *string `json:"jobId,omitempty"` - - // Number of machines on which task is started. - NumMachinesFailed *int32 `json:"numMachinesFailed,omitempty"` - - // Number of machines on which task is started. - NumMachinesPassed *int32 `json:"numMachinesPassed,omitempty"` - - // Number of machines on which task is started. - NumMachinesTotal *int32 `json:"numMachinesTotal,omitempty"` - - // Application being registered. - // This param is used to indicate the app for which the job is created. - // 'oracle' indicates that the job was created for oracle app. - // 'msSql' indicates that the job was created for msSql app. - // 'physical' indicates that the job was created for physical machine. - // Enum: ["oracle","msSql","physical"] - RegisteringApp *string `json:"registeringApp,omitempty"` - - // Current state of the task. - // This param is used to indicate the state of the job created by the bulk - // install app. - // 'started' indicates that the job has been started by the user. - // 'completed' indicates that the job has completed. - // Enum: ["started","completed"] - State *string `json:"state,omitempty"` -} - -// Validate validates this bulk install app task info -func (m *BulkInstallAppTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegisteringApp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var bulkInstallAppTaskInfoTypeRegisteringAppPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["oracle","msSql","physical"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bulkInstallAppTaskInfoTypeRegisteringAppPropEnum = append(bulkInstallAppTaskInfoTypeRegisteringAppPropEnum, v) - } -} - -const ( - - // BulkInstallAppTaskInfoRegisteringAppOracle captures enum value "oracle" - BulkInstallAppTaskInfoRegisteringAppOracle string = "oracle" - - // BulkInstallAppTaskInfoRegisteringAppMsSQL captures enum value "msSql" - BulkInstallAppTaskInfoRegisteringAppMsSQL string = "msSql" - - // BulkInstallAppTaskInfoRegisteringAppPhysical captures enum value "physical" - BulkInstallAppTaskInfoRegisteringAppPhysical string = "physical" -) - -// prop value enum -func (m *BulkInstallAppTaskInfo) validateRegisteringAppEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bulkInstallAppTaskInfoTypeRegisteringAppPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BulkInstallAppTaskInfo) validateRegisteringApp(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteringApp) { // not required - return nil - } - - // value enum - if err := m.validateRegisteringAppEnum("registeringApp", "body", *m.RegisteringApp); err != nil { - return err - } - - return nil -} - -var bulkInstallAppTaskInfoTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["started","completed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bulkInstallAppTaskInfoTypeStatePropEnum = append(bulkInstallAppTaskInfoTypeStatePropEnum, v) - } -} - -const ( - - // BulkInstallAppTaskInfoStateStarted captures enum value "started" - BulkInstallAppTaskInfoStateStarted string = "started" - - // BulkInstallAppTaskInfoStateCompleted captures enum value "completed" - BulkInstallAppTaskInfoStateCompleted string = "completed" -) - -// prop value enum -func (m *BulkInstallAppTaskInfo) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bulkInstallAppTaskInfoTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BulkInstallAppTaskInfo) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this bulk install app task info based on context it is used -func (m *BulkInstallAppTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BulkInstallAppTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BulkInstallAppTaskInfo) UnmarshalBinary(b []byte) error { - var res BulkInstallAppTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/c2_s_access_portal.go b/v1/models/c2_s_access_portal.go deleted file mode 100644 index 2e607a99..00000000 --- a/v1/models/c2_s_access_portal.go +++ /dev/null @@ -1,65 +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" -) - -// C2SAccessPortal C2S Access Portal (CAP). -// -// Specifies information required to connect to CAP to get AWS credentials. -// C2SAccessPortal(CAP) is AWS commercial cloud service access portal. -// -// swagger:model C2SAccessPortal -type C2SAccessPortal struct { - - // Name of the agency. - Agency *string `json:"agency,omitempty"` - - // The base url of C2S CAP server. - BaseURL *string `json:"baseUrl,omitempty"` - - // Encrypted password of the client private key. - ClientCertificatePassword *string `json:"clientCertificatePassword,omitempty"` - - // Name of the mission. - Mission *string `json:"mission,omitempty"` - - // Role type. - Role *string `json:"role,omitempty"` -} - -// Validate validates this c2 s access portal -func (m *C2SAccessPortal) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this c2 s access portal based on context it is used -func (m *C2SAccessPortal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *C2SAccessPortal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *C2SAccessPortal) UnmarshalBinary(b []byte) error { - var res C2SAccessPortal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/c2_s_c_a_p_server_info.go b/v1/models/c2_s_c_a_p_server_info.go deleted file mode 100644 index 6176b9f5..00000000 --- a/v1/models/c2_s_c_a_p_server_info.go +++ /dev/null @@ -1,82 +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" -) - -// C2SCAPServerInfo In amazon C2S, we can not provide aws credentials directly. We need to -// contact C2S Access Portal (CAP) to get the aws credentials. The following -// contains information required to contact the C2S CAP server to get the aws -// credentials. -// Client needs to provide client certficate and CA certificate to check chain -// of trust. If the file is encrypted with password, client needs to provide -// password which will be used to parse cerficate to get client certificate and -// client private key. -// -// swagger:model C2SCAPServerInfo -type C2SCAPServerInfo struct { - - // Name of the agency. For example "FBI". - Agency *string `json:"agency,omitempty"` - - // The base url of C2S CAP server. - BaseURL *string `json:"base_url,omitempty"` - - // Client Certificate. - ClientCertificate *string `json:"client_certificate,omitempty"` - - // Client private key. - ClientPrivateKey *string `json:"client_private_key,omitempty"` - - // Decrypted or plain text password. - DecryptedPassword *string `json:"decrypted_password,omitempty"` - - // Name of the mission. For example "Backup". - Mission *string `json:"mission,omitempty"` - - // Password for decrypting the client private key, if encrypted. We encrypt - // this password, we should always decrypt this whenever we need to use this. - Password []uint8 `json:"password"` - - // Role type. For example "RWDEVELOPER". - Role *string `json:"role,omitempty"` - - // Server CA certificate. - ServerCaCertificate *string `json:"server_ca_certificate,omitempty"` -} - -// Validate validates this c2 s c a p server info -func (m *C2SCAPServerInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this c2 s c a p server info based on context it is used -func (m *C2SCAPServerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *C2SCAPServerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *C2SCAPServerInfo) UnmarshalBinary(b []byte) error { - var res C2SCAPServerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/c2_s_server_info.go b/v1/models/c2_s_server_info.go deleted file mode 100644 index ed927ced..00000000 --- a/v1/models/c2_s_server_info.go +++ /dev/null @@ -1,124 +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" -) - -// C2SServerInfo Data definition related to C2S Server Info while register AWS source. -// -// C2S Server Info. -// -// Specifies information required to connect to CAP to get AWS credentials. -// C2SAccessPortal(CAP) is AWS commercial cloud service access portal. -// -// swagger:model C2SServerInfo -type C2SServerInfo struct { - - // Specifies the C2S Access Portal (CAP) which is used to get the aws - // credentials in Amazon Commercial Cloud Service(C2S). - C2sAccessPortal *C2SAccessPortal `json:"c2sAccessPortal,omitempty"` - - // Specifies the CA (certificate authority) trusted certificate. - CaTrustedCertificate *string `json:"caTrustedCertificate,omitempty"` - - // Specifies the client CA certificate. This certificate is in pem format. - ClientCertificate *string `json:"clientCertificate,omitempty"` - - // Specifies the client private key. This certificate is in pem format. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` -} - -// Validate validates this c2 s server info -func (m *C2SServerInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateC2sAccessPortal(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *C2SServerInfo) validateC2sAccessPortal(formats strfmt.Registry) error { - if swag.IsZero(m.C2sAccessPortal) { // not required - return nil - } - - if m.C2sAccessPortal != nil { - if err := m.C2sAccessPortal.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sAccessPortal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sAccessPortal") - } - return err - } - } - - return nil -} - -// ContextValidate validate this c2 s server info based on the context it is used -func (m *C2SServerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateC2sAccessPortal(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *C2SServerInfo) contextValidateC2sAccessPortal(ctx context.Context, formats strfmt.Registry) error { - - if m.C2sAccessPortal != nil { - - if swag.IsZero(m.C2sAccessPortal) { // not required - return nil - } - - if err := m.C2sAccessPortal.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2sAccessPortal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2sAccessPortal") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *C2SServerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *C2SServerInfo) UnmarshalBinary(b []byte) error { - var res C2SServerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/c_b_m_r_info.go b/v1/models/c_b_m_r_info.go deleted file mode 100644 index 01aaabd9..00000000 --- a/v1/models/c_b_m_r_info.go +++ /dev/null @@ -1,50 +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" -) - -// CBMRInfo Contains information about the CBMR product installed on the given host. -// -// swagger:model CBMRInfo -type CBMRInfo struct { - - // version - Version *string `json:"version,omitempty"` -} - -// Validate validates this c b m r info -func (m *CBMRInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this c b m r info based on context it is used -func (m *CBMRInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CBMRInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CBMRInfo) UnmarshalBinary(b []byte) error { - var res CBMRInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/c_d_b_entity_info.go b/v1/models/c_d_b_entity_info.go deleted file mode 100644 index 336d5197..00000000 --- a/v1/models/c_d_b_entity_info.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CDBEntityInfo c d b entity info -// -// swagger:model CDBEntityInfo -type CDBEntityInfo struct { - - // Repeated field of pdb entity information for a given CDB. This structure - // is used to retrieve the information about all the pdbs inside a given db. - PdbEntityInfoVec []*PDBEntityInfo `json:"pdbEntityInfoVec"` -} - -// Validate validates this c d b entity info -func (m *CDBEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePdbEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CDBEntityInfo) validatePdbEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.PdbEntityInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.PdbEntityInfoVec); i++ { - if swag.IsZero(m.PdbEntityInfoVec[i]) { // not required - continue - } - - if m.PdbEntityInfoVec[i] != nil { - if err := m.PdbEntityInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this c d b entity info based on the context it is used -func (m *CDBEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePdbEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CDBEntityInfo) contextValidatePdbEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PdbEntityInfoVec); i++ { - - if m.PdbEntityInfoVec[i] != nil { - - if swag.IsZero(m.PdbEntityInfoVec[i]) { // not required - return nil - } - - if err := m.PdbEntityInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CDBEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CDBEntityInfo) UnmarshalBinary(b []byte) error { - var res CDBEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cancel_protection_job_run_param.go b/v1/models/cancel_protection_job_run_param.go deleted file mode 100644 index 7bd44c83..00000000 --- a/v1/models/cancel_protection_job_run_param.go +++ /dev/null @@ -1,125 +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" -) - -// CancelProtectionJobRunParam Cancel a Protection Job Run. -// -// swagger:model CancelProtectionJobRunParam -type CancelProtectionJobRunParam struct { - - // CopyTaskUid is the Uid of a copy task. If a particular copy task is to be - // cancelled, this field should be set to the id of that particular copy task. - // For example, if replication task is to be canceled, CopyTaskUid of the - // replication task has to be specified. - CopyTaskUID *UniversalID `json:"copyTaskUid,omitempty"` - - // Run Id of a Protection Job Run that needs to be cancelled. If this Run - // id does not match the id of an active Run in the Protection job, the job - // Run is not cancelled and an error will be - // returned. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // List of entity ids for which we need to cancel the backup tasks. If this - // is provided it will not cancel the complete run but will cancel only - // subset of backup tasks (if backup tasks are cancelled correspoding copy - // task will also get cancelled). If the backup tasks are completed - // successfully it will not cancel those backup tasks. - TaskIDList []int64 `json:"taskIdList"` -} - -// Validate validates this cancel protection job run param -func (m *CancelProtectionJobRunParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelProtectionJobRunParam) validateCopyTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.CopyTaskUID) { // not required - return nil - } - - if m.CopyTaskUID != nil { - if err := m.CopyTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskUid") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cancel protection job run param based on the context it is used -func (m *CancelProtectionJobRunParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelProtectionJobRunParam) contextValidateCopyTaskUID(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyTaskUID != nil { - - if swag.IsZero(m.CopyTaskUID) { // not required - return nil - } - - if err := m.CopyTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskUid") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelProtectionJobRunParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelProtectionJobRunParam) UnmarshalBinary(b []byte) error { - var res CancelProtectionJobRunParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cancellation_timeout.go b/v1/models/cancellation_timeout.go deleted file mode 100644 index 18f2548b..00000000 --- a/v1/models/cancellation_timeout.go +++ /dev/null @@ -1,54 +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" -) - -// CancellationTimeout Message for specifying timeout duration for auto-cancellation of task/run. -// -// swagger:model CancellationTimeout -type CancellationTimeout struct { - - // The backup type to which this timeout applies to. - BackupType *int32 `json:"backupType,omitempty"` - - // The duration of timeout after which the run/task will get cancelled - // automatically. - TimeoutMins *int64 `json:"timeoutMins,omitempty"` -} - -// Validate validates this cancellation timeout -func (m *CancellationTimeout) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cancellation timeout based on context it is used -func (m *CancellationTimeout) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancellationTimeout) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancellationTimeout) UnmarshalBinary(b []byte) error { - var res CancellationTimeout - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cancellation_timeout_params.go b/v1/models/cancellation_timeout_params.go deleted file mode 100644 index 0496887f..00000000 --- a/v1/models/cancellation_timeout_params.go +++ /dev/null @@ -1,127 +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" -) - -// CancellationTimeoutParams CancellationTimeoutParams. -// -// Specifies timeout to apply to backup. -// -// swagger:model CancellationTimeoutParams -type CancellationTimeoutParams struct { - - // The backup run type to which this timeout applies to. - // Currently, the only value that can be set here is kFull and kRegular. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - BackupType *string `json:"backupType,omitempty"` - - // Time in mins for the timeout. - TimeoutMins *int64 `json:"timeoutMins,omitempty"` -} - -// Validate validates this cancellation timeout params -func (m *CancellationTimeoutParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cancellationTimeoutParamsTypeBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cancellationTimeoutParamsTypeBackupTypePropEnum = append(cancellationTimeoutParamsTypeBackupTypePropEnum, v) - } -} - -const ( - - // CancellationTimeoutParamsBackupTypeKRegular captures enum value "kRegular" - CancellationTimeoutParamsBackupTypeKRegular string = "kRegular" - - // CancellationTimeoutParamsBackupTypeKFull captures enum value "kFull" - CancellationTimeoutParamsBackupTypeKFull string = "kFull" - - // CancellationTimeoutParamsBackupTypeKLog captures enum value "kLog" - CancellationTimeoutParamsBackupTypeKLog string = "kLog" - - // CancellationTimeoutParamsBackupTypeKSystem captures enum value "kSystem" - CancellationTimeoutParamsBackupTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *CancellationTimeoutParams) validateBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cancellationTimeoutParamsTypeBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CancellationTimeoutParams) validateBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupType) { // not required - return nil - } - - // value enum - if err := m.validateBackupTypeEnum("backupType", "body", *m.BackupType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cancellation timeout params based on context it is used -func (m *CancellationTimeoutParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancellationTimeoutParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancellationTimeoutParams) UnmarshalBinary(b []byte) error { - var res CancellationTimeoutParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/capacity_by_tier.go b/v1/models/capacity_by_tier.go deleted file mode 100644 index 40dbecc6..00000000 --- a/v1/models/capacity_by_tier.go +++ /dev/null @@ -1,123 +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" -) - -// CapacityByTier Capacity By Tier. -// -// CapacityByTier provides the physical capacity in bytes of each storage -// tier. -// -// swagger:model CapacityByTier -type CapacityByTier struct { - - // StorageTier is the type of StorageTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - StorageTier *string `json:"storageTier,omitempty"` - - // TierMaxPhysicalCapacityBytes is the maximum physical capacity in bytes of - // the storage tier. - TierMaxPhysicalCapacityBytes *int64 `json:"tierMaxPhysicalCapacityBytes,omitempty"` -} - -// Validate validates this capacity by tier -func (m *CapacityByTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var capacityByTierTypeStorageTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - capacityByTierTypeStorageTierPropEnum = append(capacityByTierTypeStorageTierPropEnum, v) - } -} - -const ( - - // CapacityByTierStorageTierPCIeSSD captures enum value "PCIeSSD" - CapacityByTierStorageTierPCIeSSD string = "PCIeSSD" - - // CapacityByTierStorageTierSATADashSSD captures enum value "SATA-SSD" - CapacityByTierStorageTierSATADashSSD string = "SATA-SSD" - - // CapacityByTierStorageTierSATADashHDD captures enum value "SATA-HDD" - CapacityByTierStorageTierSATADashHDD string = "SATA-HDD" - - // CapacityByTierStorageTierCLOUD captures enum value "CLOUD" - CapacityByTierStorageTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *CapacityByTier) validateStorageTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, capacityByTierTypeStorageTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CapacityByTier) validateStorageTier(formats strfmt.Registry) error { - if swag.IsZero(m.StorageTier) { // not required - return nil - } - - // value enum - if err := m.validateStorageTierEnum("storageTier", "body", *m.StorageTier); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this capacity by tier based on context it is used -func (m *CapacityByTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CapacityByTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CapacityByTier) UnmarshalBinary(b []byte) error { - var res CapacityByTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_additional_params.go b/v1/models/cassandra_additional_params.go deleted file mode 100644 index 0402fbd3..00000000 --- a/v1/models/cassandra_additional_params.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CassandraAdditionalParams Contains additional parameters required by the agents to backup data from -// Cassandra. -// -// swagger:model CassandraAdditionalParams -type CassandraAdditionalParams struct { - - // Cassandra classpath suffix. - CassandraClasspathSuffix *string `json:"cassandraClasspathSuffix,omitempty"` - - // Required in compaction. - CassandraPartitioner *string `json:"cassandraPartitioner,omitempty"` - - // Cassandra and DSE Versions. - // Discovery code will attempt to discover the versions. - CassandraVersion *string `json:"cassandraVersion,omitempty"` - - // Commit Log Backup location used for PITR feature - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - // Data center information is required for backup and recovery. - DataCenterVec []string `json:"dataCenterVec"` - - // In case this Cassandra has a Solr node. - DseSolrInfo *DSESolrInfo `json:"dseSolrInfo,omitempty"` - - // dse version - DseVersion *string `json:"dseVersion,omitempty"` - - // Map of nodes to tiered storage directories - TieredStorageDirsMap []*NodeToTieredStorageDirectoriesMap `json:"tieredStorageDirsMap"` -} - -// Validate validates this cassandra additional params -func (m *CassandraAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDseSolrInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieredStorageDirsMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraAdditionalParams) validateDseSolrInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if m.DseSolrInfo != nil { - if err := m.DseSolrInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraAdditionalParams) validateTieredStorageDirsMap(formats strfmt.Registry) error { - if swag.IsZero(m.TieredStorageDirsMap) { // not required - return nil - } - - for i := 0; i < len(m.TieredStorageDirsMap); i++ { - if swag.IsZero(m.TieredStorageDirsMap[i]) { // not required - continue - } - - if m.TieredStorageDirsMap[i] != nil { - if err := m.TieredStorageDirsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieredStorageDirsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieredStorageDirsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cassandra additional params based on the context it is used -func (m *CassandraAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDseSolrInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieredStorageDirsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraAdditionalParams) contextValidateDseSolrInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DseSolrInfo != nil { - - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if err := m.DseSolrInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraAdditionalParams) contextValidateTieredStorageDirsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TieredStorageDirsMap); i++ { - - if m.TieredStorageDirsMap[i] != nil { - - if swag.IsZero(m.TieredStorageDirsMap[i]) { // not required - return nil - } - - if err := m.TieredStorageDirsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieredStorageDirsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieredStorageDirsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraAdditionalParams) UnmarshalBinary(b []byte) error { - var res CassandraAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_backup_job_params.go b/v1/models/cassandra_backup_job_params.go deleted file mode 100644 index d07c8d54..00000000 --- a/v1/models/cassandra_backup_job_params.go +++ /dev/null @@ -1,140 +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" -) - -// CassandraBackupJobParams Contains any additional cassandra environment specific backup params at the -// job level. -// -// swagger:model CassandraBackupJobParams -type CassandraBackupJobParams struct { - - // Additional parameters required for Cassandra backup. - CassandraAdditionalInfo *CassandraAdditionalParams `json:"cassandraAdditionalInfo,omitempty"` - - // whether special graph handling is enabled - GraphHandlingEnabled *bool `json:"graphHandlingEnabled,omitempty"` - - // If this backup job is only responsible for the log backups. Presently this - // is used for cassandra log backups. - IsOnlyLogBackupJob *bool `json:"isOnlyLogBackupJob,omitempty"` - - // Whether this is a system keyspace backup - IsSystemKsBackup *bool `json:"isSystemKsBackup,omitempty"` - - // Start time of the current job (slave start time) - JobStartTimeInUsecs *int64 `json:"jobStartTimeInUsecs,omitempty"` - - // Make source primary for log-backup in this job run - MakePrimaryLogBackup *bool `json:"makePrimaryLogBackup,omitempty"` - - // End time of the previous job (set in snapshot_info) - PreviousJobEndTimeInUsecs *int64 `json:"previousJobEndTimeInUsecs,omitempty"` - - // Retention period in seconds. This is read from the policy currently - // attached to the protection job. This field is used only in case of log - // backups and ignored for other backups. - RetentionPeriodInSecs *int64 `json:"retentionPeriodInSecs,omitempty"` - - // Whether cassandra roles backup/restore is enabled or not. - RolesGflagEnabled *bool `json:"rolesGflagEnabled,omitempty"` - - // The data centers selected for backup. - SelectedDataCenterVec []string `json:"selectedDataCenterVec"` -} - -// Validate validates this cassandra backup job params -func (m *CassandraBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAdditionalInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraBackupJobParams) validateCassandraAdditionalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAdditionalInfo) { // not required - return nil - } - - if m.CassandraAdditionalInfo != nil { - if err := m.CassandraAdditionalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra backup job params based on the context it is used -func (m *CassandraBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraAdditionalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraBackupJobParams) contextValidateCassandraAdditionalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraAdditionalInfo != nil { - - if swag.IsZero(m.CassandraAdditionalInfo) { // not required - return nil - } - - if err := m.CassandraAdditionalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraBackupJobParams) UnmarshalBinary(b []byte) error { - var res CassandraBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_backup_params.go b/v1/models/cassandra_backup_params.go deleted file mode 100644 index 4ef90a86..00000000 --- a/v1/models/cassandra_backup_params.go +++ /dev/null @@ -1,109 +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" -) - -// CassandraBackupParams Message contains Cassandra backup info. -// -// swagger:model CassandraBackupParams -type CassandraBackupParams struct { - - // Run parameters, used for setting current cluster as primary. - RunParams *CassandraBackupRunParams `json:"runParams,omitempty"` -} - -// Validate validates this cassandra backup params -func (m *CassandraBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraBackupParams) validateRunParams(formats strfmt.Registry) error { - if swag.IsZero(m.RunParams) { // not required - return nil - } - - if m.RunParams != nil { - if err := m.RunParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra backup params based on the context it is used -func (m *CassandraBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraBackupParams) contextValidateRunParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RunParams != nil { - - if swag.IsZero(m.RunParams) { // not required - return nil - } - - if err := m.RunParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraBackupParams) UnmarshalBinary(b []byte) error { - var res CassandraBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_backup_run_params.go b/v1/models/cassandra_backup_run_params.go deleted file mode 100644 index 7f5d35cc..00000000 --- a/v1/models/cassandra_backup_run_params.go +++ /dev/null @@ -1,50 +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" -) - -// CassandraBackupRunParams Message contains Cassandra backup run info. -// -// swagger:model CassandraBackupRunParams -type CassandraBackupRunParams struct { - - // Run params, used for setting current cluster as primary for Log backup. - SetPrimaryForLog *bool `json:"setPrimaryForLog,omitempty"` -} - -// Validate validates this cassandra backup run params -func (m *CassandraBackupRunParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra backup run params based on context it is used -func (m *CassandraBackupRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraBackupRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraBackupRunParams) UnmarshalBinary(b []byte) error { - var res CassandraBackupRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_cluster.go b/v1/models/cassandra_cluster.go deleted file mode 100644 index cfa3d825..00000000 --- a/v1/models/cassandra_cluster.go +++ /dev/null @@ -1,55 +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" -) - -// CassandraCluster Cassandra Cluster Info. -// -// Specifies an Object containing information about a Cassandra cluster. -// -// swagger:model CassandraCluster -type CassandraCluster struct { - - // Primary host from this Cassandra cluster. - PrimaryHost *string `json:"primaryHost,omitempty"` - - // Seeds of this Cassandra Cluster. - Seeds []string `json:"seeds"` -} - -// Validate validates this cassandra cluster -func (m *CassandraCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra cluster based on context it is used -func (m *CassandraCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraCluster) UnmarshalBinary(b []byte) error { - var res CassandraCluster - 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 deleted file mode 100644 index 4ee5f1d5..00000000 --- a/v1/models/cassandra_connect_params.go +++ /dev/null @@ -1,207 +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" -) - -// CassandraConnectParams Cassandra Connect Params. -// -// Specifies an Object containing information about a registered cassandra -// source. -// -// swagger:model CassandraConnectParams -type CassandraConnectParams struct { - - // Specifies the ports related info. - CassandraPortsInfo *CassandraPortsInfo `json:"cassandraPortsInfo,omitempty"` - - // Specifies the security related info. - CassandraSecurityInfo *CassandraSecurityInfo `json:"cassandraSecurityInfo,omitempty"` - - // Cassandra version - CassandraVersion *string `json:"cassandraVersion,omitempty"` - - // Specifies the commit log archival location for cassandra node - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - // Specifies the Directory path containing Config YAML for discovery. - ConfigDirectory *string `json:"configDirectory,omitempty"` - - // Specifies the List of all physical data center or virtual data center. - // In most cases, the data centers will be listed after discovery operation - // however, if they are not listed, you must manually type the data center - // names. Leaving the field blank will disallow data center-specific backup - // or restore. Entering a subset of all data centers may cause problems - // in data movement. - DataCenters []string `json:"dataCenters"` - - // Specifies the Directory from where DSE specific configuration can be read. - DseConfigDirectory *string `json:"dseConfigDirectory,omitempty"` - - // Specifies whether this cluster has DSE Authenticator. - IsDseAuthenticator *bool `json:"isDseAuthenticator,omitempty"` - - // Specifies whether this cluster has DSE tiered storage. - IsDseTieredStorage *bool `json:"isDseTieredStorage,omitempty"` - - // Specifies if JMX Authentication enabled in this cluster. - IsJmxAuthEnable *bool `json:"isJmxAuthEnable,omitempty"` - - // Specifies the Kerberos Principal for Kerberos connection - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Specifies the Primary Host for the Cassandra cluster. - PrimaryHost *string `json:"primaryHost,omitempty"` - - // Specifies the Seed nodes of this Cassandra cluster. - Seeds []string `json:"seeds"` - - // Specifies the Solr node IP Addresses - SolrNodes []string `json:"solrNodes"` - - // Specifies the Solr node Port. - SolrPort *int32 `json:"solrPort,omitempty"` -} - -// Validate validates this cassandra connect params -func (m *CassandraConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraPortsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraSecurityInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraConnectParams) validateCassandraPortsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraPortsInfo) { // not required - return nil - } - - if m.CassandraPortsInfo != nil { - if err := m.CassandraPortsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortsInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraConnectParams) validateCassandraSecurityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if m.CassandraSecurityInfo != nil { - if err := m.CassandraSecurityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra connect params based on the context it is used -func (m *CassandraConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraPortsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraSecurityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraConnectParams) contextValidateCassandraPortsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraPortsInfo != nil { - - if swag.IsZero(m.CassandraPortsInfo) { // not required - return nil - } - - if err := m.CassandraPortsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortsInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraConnectParams) contextValidateCassandraSecurityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraSecurityInfo != nil { - - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if err := m.CassandraSecurityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraConnectParams) UnmarshalBinary(b []byte) error { - var res CassandraConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_discovery_params.go b/v1/models/cassandra_discovery_params.go deleted file mode 100644 index 03f6ddc6..00000000 --- a/v1/models/cassandra_discovery_params.go +++ /dev/null @@ -1,139 +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" -) - -// CassandraDiscoveryParams Contains minimum parameters required to connect to the primary host of a -// cassandra cluster and discover the cluster. -// -// swagger:model CassandraDiscoveryParams -type CassandraDiscoveryParams struct { - - // Dir containing Config YAML for discovery. - CassandraConfigDirectory *string `json:"cassandraConfigDirectory,omitempty"` - - // Directory from where DSE specific configuration can be read. - DseConfigDirectory *string `json:"dseConfigDirectory,omitempty"` - - // If this is set to true, Cassandra discovery will attempt to connect to - // Cassandra to fetch additional configuration information. When setting to - // true, ensure that required connection details have been provided to the - // discovery API request to faciliate this connection. - IsCassandraConnectionAllowed *bool `json:"isCassandraConnectionAllowed,omitempty"` - - // If DSE Authenticator is enabled. - IsDseAuthenticator *bool `json:"isDseAuthenticator,omitempty"` - - // If DSE Tiered storage is enabled. - IsDseTieredStorage *bool `json:"isDseTieredStorage,omitempty"` - - // If this field is true, imanis will try to discover graph keyspaces on - // the client cluster - IsGraphDiscoveryEnabled *bool `json:"isGraphDiscoveryEnabled,omitempty"` - - // If this field is true, Imanis will try to discover the supported system - // keyspaces on the client cluster - IsSystemKsDiscoveryEnabled *bool `json:"isSystemKsDiscoveryEnabled,omitempty"` - - // Primary host for the Cassandra cluster. - PrimaryHost *string `json:"primaryHost,omitempty"` - - // SSH credentials required for scp backup. - SSHCredentials *PrivateCredentials `json:"sshCredentials,omitempty"` -} - -// Validate validates this cassandra discovery params -func (m *CassandraDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraDiscoveryParams) validateSSHCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if m.SSHCredentials != nil { - if err := m.SSHCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra discovery params based on the context it is used -func (m *CassandraDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraDiscoveryParams) contextValidateSSHCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHCredentials != nil { - - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if err := m.SSHCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraDiscoveryParams) UnmarshalBinary(b []byte) error { - var res CassandraDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_keyspace.go b/v1/models/cassandra_keyspace.go deleted file mode 100644 index 6f9d4204..00000000 --- a/v1/models/cassandra_keyspace.go +++ /dev/null @@ -1,173 +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" -) - -// CassandraKeyspace Cassandra Keyspace Info. -// -// Specifies an Object containing information about a Cassandra Keyspace. -// -// swagger:model CassandraKeyspace -type CassandraKeyspace struct { - - // Number of documents in this bucket. - ChildrenCount *uint32 `json:"childrenCount,omitempty"` - - // If the replication strategy is set as kNetwork, then - // dc_list will have a list of data centers to which the - // keyspace is being replicated to. - DcList []string `json:"dcList"` - - // Replication stragegy for the keyspace. - // Specifies the type of an Cassandra source entity. - // Enum: ["kSimple","kNetwork","kUnsupported"] - ReplicationStrategy *string `json:"replicationStrategy,omitempty"` - - // Specifies Type of Keyspace. - // Specifies the type of an Cassandra keyspace entity. - // Enum: ["kRegular","kGraph","kSystem"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this cassandra keyspace -func (m *CassandraKeyspace) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationStrategy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraKeyspaceTypeReplicationStrategyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSimple","kNetwork","kUnsupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraKeyspaceTypeReplicationStrategyPropEnum = append(cassandraKeyspaceTypeReplicationStrategyPropEnum, v) - } -} - -const ( - - // CassandraKeyspaceReplicationStrategyKSimple captures enum value "kSimple" - CassandraKeyspaceReplicationStrategyKSimple string = "kSimple" - - // CassandraKeyspaceReplicationStrategyKNetwork captures enum value "kNetwork" - CassandraKeyspaceReplicationStrategyKNetwork string = "kNetwork" - - // CassandraKeyspaceReplicationStrategyKUnsupported captures enum value "kUnsupported" - CassandraKeyspaceReplicationStrategyKUnsupported string = "kUnsupported" -) - -// prop value enum -func (m *CassandraKeyspace) validateReplicationStrategyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraKeyspaceTypeReplicationStrategyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraKeyspace) validateReplicationStrategy(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationStrategy) { // not required - return nil - } - - // value enum - if err := m.validateReplicationStrategyEnum("replicationStrategy", "body", *m.ReplicationStrategy); err != nil { - return err - } - - return nil -} - -var cassandraKeyspaceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kGraph","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraKeyspaceTypeTypePropEnum = append(cassandraKeyspaceTypeTypePropEnum, v) - } -} - -const ( - - // CassandraKeyspaceTypeKRegular captures enum value "kRegular" - CassandraKeyspaceTypeKRegular string = "kRegular" - - // CassandraKeyspaceTypeKGraph captures enum value "kGraph" - CassandraKeyspaceTypeKGraph string = "kGraph" - - // CassandraKeyspaceTypeKSystem captures enum value "kSystem" - CassandraKeyspaceTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *CassandraKeyspace) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraKeyspaceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraKeyspace) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra keyspace based on context it is used -func (m *CassandraKeyspace) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraKeyspace) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraKeyspace) UnmarshalBinary(b []byte) error { - var res CassandraKeyspace - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_log_recover_job_params.go b/v1/models/cassandra_log_recover_job_params.go deleted file mode 100644 index 73345f81..00000000 --- a/v1/models/cassandra_log_recover_job_params.go +++ /dev/null @@ -1,63 +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" -) - -// CassandraLogRecoverJobParams Contains additional params for cassandra log recovery workflow. -// -// swagger:model CassandraLogRecoverJobParams -type CassandraLogRecoverJobParams struct { - - // This is the end time from when logs should be replayed. - EndTimeForLogReplayInUsecs *int64 `json:"endTimeForLogReplayInUsecs,omitempty"` - - // The view box name where commit logs are present. - LogBackupViewBoxName *string `json:"logBackupViewBoxName,omitempty"` - - // The view name from where commit logs should be restored. - LogBackupViewName *string `json:"logBackupViewName,omitempty"` - - // Objects are of the form keyspace.table. If a full keyspace is selected to - // be restored, it is expanded before passing to imanis. - ObjectNames []string `json:"objectNames"` - - // This is the start time from when logs should be replayed. - StartTimeForLogReplayInUsecs *int64 `json:"startTimeForLogReplayInUsecs,omitempty"` -} - -// Validate validates this cassandra log recover job params -func (m *CassandraLogRecoverJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra log recover job params based on context it is used -func (m *CassandraLogRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraLogRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraLogRecoverJobParams) UnmarshalBinary(b []byte) error { - var res CassandraLogRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_port_info.go b/v1/models/cassandra_port_info.go deleted file mode 100644 index 4a51696f..00000000 --- a/v1/models/cassandra_port_info.go +++ /dev/null @@ -1,62 +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" -) - -// CassandraPortInfo Holds information on various Cassandra ports. -// -// swagger:model CassandraPortInfo -type CassandraPortInfo struct { - - // jmx port - JmxPort *uint32 `json:"jmxPort,omitempty"` - - // native transport port - NativeTransportPort *uint32 `json:"nativeTransportPort,omitempty"` - - // rpc port - RPCPort *uint32 `json:"rpcPort,omitempty"` - - // ssl storage port - SslStoragePort *uint32 `json:"sslStoragePort,omitempty"` - - // storage port - StoragePort *uint32 `json:"storagePort,omitempty"` -} - -// Validate validates this cassandra port info -func (m *CassandraPortInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra port info based on context it is used -func (m *CassandraPortInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraPortInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraPortInfo) UnmarshalBinary(b []byte) error { - var res CassandraPortInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_ports_info.go b/v1/models/cassandra_ports_info.go deleted file mode 100644 index 99727d94..00000000 --- a/v1/models/cassandra_ports_info.go +++ /dev/null @@ -1,65 +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" -) - -// CassandraPortsInfo Cassandra Ports Info. -// -// Specifies an Object containing information on various Cassandra ports. -// -// swagger:model CassandraPortsInfo -type CassandraPortsInfo struct { - - // Specifies the Cassandra JMX port. - JmxPort *uint32 `json:"jmxPort,omitempty"` - - // Specifies the port for the CQL native transport. - NativeTransportPort *uint32 `json:"nativeTransportPort,omitempty"` - - // Specifies the Remote Procedure Call (RPC) port for general mechanism - // for client-server applications. - RPCPort *uint32 `json:"rpcPort,omitempty"` - - // Specifies the SSL port for encrypted communication. - SslStoragePort *uint32 `json:"sslStoragePort,omitempty"` - - // Specifies the TCP port for data. Internally used by Cassandra bulk loader. - StoragePort *uint32 `json:"storagePort,omitempty"` -} - -// Validate validates this cassandra ports info -func (m *CassandraPortsInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra ports info based on context it is used -func (m *CassandraPortsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraPortsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraPortsInfo) UnmarshalBinary(b []byte) error { - var res CassandraPortsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_protection_source.go b/v1/models/cassandra_protection_source.go deleted file mode 100644 index 807a754a..00000000 --- a/v1/models/cassandra_protection_source.go +++ /dev/null @@ -1,285 +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" -) - -// CassandraProtectionSource Cassandra Protection Source. -// -// Specifies an Object representing Cassandra. -// -// swagger:model CassandraProtectionSource -type CassandraProtectionSource struct { - - // Information of a Cassandra cluster, only valid for an entity of type - // kCluster. - ClusterInfo *CassandraCluster `json:"clusterInfo,omitempty"` - - // Information of a cassandra keyspapce, only valid for an entity of type - // kKeyspace. - KeyspaceInfo *CassandraKeyspace `json:"keyspaceInfo,omitempty"` - - // Specifies the instance name of the Cassandra entity. - Name *string `json:"name,omitempty"` - - // Information of a cassandra table, only valid for an entity of type - // kTable. - TableInfo *CassandraTable `json:"tableInfo,omitempty"` - - // Specifies the type of the managed Object in Cassandra Protection Source. - // Replication strategy options for a keyspace. - // 'kCluster' indicates a Cassandra cluster distributed over several physical - // nodes. - // 'kKeyspace' indicates a Keyspace enclosing one or more tables. - // 'kTable' indicates a Table in the Cassandra environment. - // Enum: ["kCluster","kKeyspace","kTable"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Cassandra entity. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a table can be the string - // . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this cassandra protection source -func (m *CassandraProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyspaceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraProtectionSource) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraProtectionSource) validateKeyspaceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.KeyspaceInfo) { // not required - return nil - } - - if m.KeyspaceInfo != nil { - if err := m.KeyspaceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyspaceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyspaceInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraProtectionSource) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -var cassandraProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kKeyspace","kTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraProtectionSourceTypeTypePropEnum = append(cassandraProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // CassandraProtectionSourceTypeKCluster captures enum value "kCluster" - CassandraProtectionSourceTypeKCluster string = "kCluster" - - // CassandraProtectionSourceTypeKKeyspace captures enum value "kKeyspace" - CassandraProtectionSourceTypeKKeyspace string = "kKeyspace" - - // CassandraProtectionSourceTypeKTable captures enum value "kTable" - CassandraProtectionSourceTypeKTable string = "kTable" -) - -// prop value enum -func (m *CassandraProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cassandra protection source based on the context it is used -func (m *CassandraProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeyspaceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraProtectionSource) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraProtectionSource) contextValidateKeyspaceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.KeyspaceInfo != nil { - - if swag.IsZero(m.KeyspaceInfo) { // not required - return nil - } - - if err := m.KeyspaceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyspaceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyspaceInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraProtectionSource) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraProtectionSource) UnmarshalBinary(b []byte) error { - var res CassandraProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_recover_job_params.go b/v1/models/cassandra_recover_job_params.go deleted file mode 100644 index 08a3df7c..00000000 --- a/v1/models/cassandra_recover_job_params.go +++ /dev/null @@ -1,208 +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" -) - -// CassandraRecoverJobParams Contains any additional cassandra environment specific params for the -// recover job. -// -// swagger:model CassandraRecoverJobParams -type CassandraRecoverJobParams struct { - - // Additional parameters required for Cassandra recovery. - // TODO (faizan.khan) : Remove this. - CassandraAdditionalInfo *CassandraAdditionalParams `json:"cassandraAdditionalInfo,omitempty"` - - // The task id which will be used by the finalise restore job. - FinaliseRestoreTaskID *int64 `json:"finaliseRestoreTaskId,omitempty"` - - // whether special graph handling is enabled - GraphHandlingEnabled *bool `json:"graphHandlingEnabled,omitempty"` - - // Whether the call is for the finalise restore phase. - IsFinalisePhase *bool `json:"isFinalisePhase,omitempty"` - - // Whether this is a live table restore - IsLiveTableRestore *bool `json:"isLiveTableRestore,omitempty"` - - // Whether this is a system keyspace recovery - IsSystemKsRecovery *bool `json:"isSystemKsRecovery,omitempty"` - - // Additional params for log recovery. - LogRecoverParams *CassandraLogRecoverJobParams `json:"logRecoverParams,omitempty"` - - // Logs will be restored to this location. - LogRestoreDirectory *string `json:"logRestoreDirectory,omitempty"` - - // Option to restart Cassandra services after point in time recovery. - RestartAllowed *bool `json:"restartAllowed,omitempty"` - - // Option command for restarting Cassandra services - RestartCommand *string `json:"restartCommand,omitempty"` - - // Option to restart Cassandra services immediately after the recovery. - RestartImmediately *bool `json:"restartImmediately,omitempty"` - - // Option to restart Cassandra services at the specified time - RestartTime *int64 `json:"restartTime,omitempty"` - - // Whether to restore/skip roles and permissions in the job run. - RestoreRolesAndPermissions *bool `json:"restoreRolesAndPermissions,omitempty"` - - // Whether the gflag to restore cassandra roles is enabled. - RolesGflagEnabled *bool `json:"rolesGflagEnabled,omitempty"` - - // The data centers selected for recovery. - SelectedDataCenterVec []string `json:"selectedDataCenterVec"` - - // Cassandra staging directory - StagingDirectoryVec []string `json:"stagingDirectoryVec"` - - // A suffix that is to be applied to all recovered entities - // TODO (faizan.khan) : Remove this. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this cassandra recover job params -func (m *CassandraRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAdditionalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogRecoverParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraRecoverJobParams) validateCassandraAdditionalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAdditionalInfo) { // not required - return nil - } - - if m.CassandraAdditionalInfo != nil { - if err := m.CassandraAdditionalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraRecoverJobParams) validateLogRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.LogRecoverParams) { // not required - return nil - } - - if m.LogRecoverParams != nil { - if err := m.LogRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRecoverParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra recover job params based on the context it is used -func (m *CassandraRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraAdditionalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraRecoverJobParams) contextValidateCassandraAdditionalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraAdditionalInfo != nil { - - if swag.IsZero(m.CassandraAdditionalInfo) { // not required - return nil - } - - if err := m.CassandraAdditionalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraRecoverJobParams) contextValidateLogRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LogRecoverParams != nil { - - if swag.IsZero(m.LogRecoverParams) { // not required - return nil - } - - if err := m.LogRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRecoverParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraRecoverJobParams) UnmarshalBinary(b []byte) error { - var res CassandraRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_security_info.go b/v1/models/cassandra_security_info.go deleted file mode 100644 index 92d87ecd..00000000 --- a/v1/models/cassandra_security_info.go +++ /dev/null @@ -1,133 +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" -) - -// CassandraSecurityInfo CassandraSecurityInfo Cassandra security info. -// -// Specifies an Object containing information on Cassandra security. -// -// swagger:model CassandraSecurityInfo -type CassandraSecurityInfo struct { - - // Is Cassandra authentication required ? - CassandraAuthRequired *bool `json:"cassandraAuthRequired,omitempty"` - - // Cassandra Authentication type. - // Enum: [PASSWORD KERBEROS LDAP] - // Specifies the Cassandra auth type. - // 'PASSWORD' - // 'KERBEROS' - // 'LDAP' - // Enum: ["PASSWORD","KERBEROS","LDAP"] - CassandraAuthType *string `json:"cassandraAuthType,omitempty"` - - // Cassandra Authenticator/Authorizer. - CassandraAuthorizer *string `json:"cassandraAuthorizer,omitempty"` - - // Is Client Encryption enabled for this cluster ? - ClientEncryption *bool `json:"clientEncryption,omitempty"` - - // Is DSE Authorization enabled for this cluster ? - DseAuthorization *bool `json:"dseAuthorization,omitempty"` - - // Is 'Server encryption request client authentication' enabled for this cluster ? - ServerEncryptionReqClientAuth *bool `json:"serverEncryptionReqClientAuth,omitempty"` - - // 'Server internal node Encryption' type for this cluster. - ServerInternodeEncryptionType *string `json:"serverInternodeEncryptionType,omitempty"` -} - -// Validate validates this cassandra security info -func (m *CassandraSecurityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraSecurityInfoTypeCassandraAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PASSWORD","KERBEROS","LDAP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraSecurityInfoTypeCassandraAuthTypePropEnum = append(cassandraSecurityInfoTypeCassandraAuthTypePropEnum, v) - } -} - -const ( - - // CassandraSecurityInfoCassandraAuthTypePASSWORD captures enum value "PASSWORD" - CassandraSecurityInfoCassandraAuthTypePASSWORD string = "PASSWORD" - - // CassandraSecurityInfoCassandraAuthTypeKERBEROS captures enum value "KERBEROS" - CassandraSecurityInfoCassandraAuthTypeKERBEROS string = "KERBEROS" - - // CassandraSecurityInfoCassandraAuthTypeLDAP captures enum value "LDAP" - CassandraSecurityInfoCassandraAuthTypeLDAP string = "LDAP" -) - -// prop value enum -func (m *CassandraSecurityInfo) validateCassandraAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraSecurityInfoTypeCassandraAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraSecurityInfo) validateCassandraAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAuthType) { // not required - return nil - } - - // value enum - if err := m.validateCassandraAuthTypeEnum("cassandraAuthType", "body", *m.CassandraAuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra security info based on context it is used -func (m *CassandraSecurityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSecurityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSecurityInfo) UnmarshalBinary(b []byte) error { - var res CassandraSecurityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_table.go b/v1/models/cassandra_table.go deleted file mode 100644 index 5a9ae3ce..00000000 --- a/v1/models/cassandra_table.go +++ /dev/null @@ -1,111 +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" -) - -// CassandraTable Cassandra Table Info. -// -// Specifies an Object containing information about a Cassandra Table. -// -// swagger:model CassandraTable -type CassandraTable struct { - - // Specifies Type of Table. - // Specifies the type of an Cassandra table entity. - // Enum: ["kRegular","kGraph","kSystem"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this cassandra table -func (m *CassandraTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraTableTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kGraph","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraTableTypeTypePropEnum = append(cassandraTableTypeTypePropEnum, v) - } -} - -const ( - - // CassandraTableTypeKRegular captures enum value "kRegular" - CassandraTableTypeKRegular string = "kRegular" - - // CassandraTableTypeKGraph captures enum value "kGraph" - CassandraTableTypeKGraph string = "kGraph" - - // CassandraTableTypeKSystem captures enum value "kSystem" - CassandraTableTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *CassandraTable) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraTableTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraTable) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra table based on context it is used -func (m *CassandraTable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraTable) UnmarshalBinary(b []byte) error { - var res CassandraTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cbt_info.go b/v1/models/cbt_info.go deleted file mode 100644 index 1bad5ea3..00000000 --- a/v1/models/cbt_info.go +++ /dev/null @@ -1,185 +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" -) - -// CbtInfo Cbt Info. -// -// Specifies information about the Cbt Driver associated with agent. -// -// swagger:model CbtInfo -type CbtInfo struct { - - // Specifies whether the cbt driver is installed or not. - IsInstalled *bool `json:"isInstalled,omitempty"` - - // Specifies the reboot status of the host post cbt driver installation. - // Only applicable for volcbt driver. - // Specifies the reboot status of the source post volcbt driver - // installation. - // 'kRebooted' indicates the source has been rebooted post volcbt driver - // installation. - // 'kNeedsReboot' indicates the source has not been rebooted post - // volcbt driver installation. - // 'kInternalError' indicates that there was an error while fetching - // reboot status from source. - // Enum: ["kRebooted","kNeedsReboot","kInternalError"] - RebootStatus *string `json:"rebootStatus,omitempty"` - - // Specifies the status of the cbt driver. - // Specifies the service state of the cbt driver. - // 'kRunning' indicates the cbt driver is running. - // 'kStopped' indicates the service is stopped. - // 'kPaused' indicates the service is paused (it - // is a Windows-specific state). - // 'kUnknown' indicates the service with the specified - // name is not known on the system. - // Enum: ["kRunning","kStopped","kPaused","kUnknown"] - ServiceState *string `json:"serviceState,omitempty"` -} - -// Validate validates this cbt info -func (m *CbtInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRebootStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cbtInfoTypeRebootStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRebooted","kNeedsReboot","kInternalError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cbtInfoTypeRebootStatusPropEnum = append(cbtInfoTypeRebootStatusPropEnum, v) - } -} - -const ( - - // CbtInfoRebootStatusKRebooted captures enum value "kRebooted" - CbtInfoRebootStatusKRebooted string = "kRebooted" - - // CbtInfoRebootStatusKNeedsReboot captures enum value "kNeedsReboot" - CbtInfoRebootStatusKNeedsReboot string = "kNeedsReboot" - - // CbtInfoRebootStatusKInternalError captures enum value "kInternalError" - CbtInfoRebootStatusKInternalError string = "kInternalError" -) - -// prop value enum -func (m *CbtInfo) validateRebootStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cbtInfoTypeRebootStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CbtInfo) validateRebootStatus(formats strfmt.Registry) error { - if swag.IsZero(m.RebootStatus) { // not required - return nil - } - - // value enum - if err := m.validateRebootStatusEnum("rebootStatus", "body", *m.RebootStatus); err != nil { - return err - } - - return nil -} - -var cbtInfoTypeServiceStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRunning","kStopped","kPaused","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cbtInfoTypeServiceStatePropEnum = append(cbtInfoTypeServiceStatePropEnum, v) - } -} - -const ( - - // CbtInfoServiceStateKRunning captures enum value "kRunning" - CbtInfoServiceStateKRunning string = "kRunning" - - // CbtInfoServiceStateKStopped captures enum value "kStopped" - CbtInfoServiceStateKStopped string = "kStopped" - - // CbtInfoServiceStateKPaused captures enum value "kPaused" - CbtInfoServiceStateKPaused string = "kPaused" - - // CbtInfoServiceStateKUnknown captures enum value "kUnknown" - CbtInfoServiceStateKUnknown string = "kUnknown" -) - -// prop value enum -func (m *CbtInfo) validateServiceStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cbtInfoTypeServiceStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CbtInfo) validateServiceState(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceState) { // not required - return nil - } - - // value enum - if err := m.validateServiceStateEnum("serviceState", "body", *m.ServiceState); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cbt info based on context it is used -func (m *CbtInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CbtInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CbtInfo) UnmarshalBinary(b []byte) error { - var res CbtInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_common_backup_params.go b/v1/models/cdp_common_backup_params.go deleted file mode 100644 index 07e24dd5..00000000 --- a/v1/models/cdp_common_backup_params.go +++ /dev/null @@ -1,52 +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" -) - -// CdpCommonBackupParams cdp common backup params -// -// swagger:model CdpCommonBackupParams -type CdpCommonBackupParams struct { - - // Whether the CDP journal is sharded for the entity being backed up, one use - // of this information is to determine whether CDP entities created on - // the Rx side should be sharding enabled. - IsJournalSharded *bool `json:"isJournalSharded,omitempty"` -} - -// Validate validates this cdp common backup params -func (m *CdpCommonBackupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cdp common backup params based on context it is used -func (m *CdpCommonBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CdpCommonBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpCommonBackupParams) UnmarshalBinary(b []byte) error { - var res CdpCommonBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_hydration_params.go b/v1/models/cdp_hydration_params.go deleted file mode 100644 index f15f4e52..00000000 --- a/v1/models/cdp_hydration_params.go +++ /dev/null @@ -1,145 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CdpHydrationParams CDP hydration parameters. These will be used to create a hydrated view using -// Atom logs. This op is treated similar to a backup run. -// -// swagger:model CdpHydrationParams -type CdpHydrationParams struct { - - // Unique task id for the CDP hydration slave helper op. This is required to - // request for a permit from the CDP hydration slave helper op. - CdpHydrationTaskID *int64 `json:"cdpHydrationTaskId,omitempty"` - - // CDP entity version. v1 entities move log files and apply them to base - // disks. v2 entities only apply log files. - CdpVersion *int32 `json:"cdpVersion,omitempty"` - - // Logs for the various disks of the VM. - DiskLogsVec []*CdpHydrationParamsDiskLog `json:"diskLogsVec"` - - // In some cases, it may happen that we just want to clone the log files and - // don't need to hydrate the snapshot. This variable can mark those cases. - HydrationNeeded *bool `json:"hydrationNeeded,omitempty"` - - // The time in usecs till which we need the the logs to be played on - // the base VMDK. - HydrationTimeUsecs *int64 `json:"hydrationTimeUsecs,omitempty"` - - // CDP hydration version. v1 version is the default way for hydration and v2 - // version provides improved performance compared with v1. - HydrationVersion *int32 `json:"hydrationVersion,omitempty"` - - // CDP Directory in which logs are placed in SnapFS. - LogViewDir *string `json:"logViewDir,omitempty"` -} - -// Validate validates this cdp hydration params -func (m *CdpHydrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskLogsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParams) validateDiskLogsVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskLogsVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskLogsVec); i++ { - if swag.IsZero(m.DiskLogsVec[i]) { // not required - continue - } - - if m.DiskLogsVec[i] != nil { - if err := m.DiskLogsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cdp hydration params based on the context it is used -func (m *CdpHydrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskLogsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParams) contextValidateDiskLogsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskLogsVec); i++ { - - if m.DiskLogsVec[i] != nil { - - if swag.IsZero(m.DiskLogsVec[i]) { // not required - return nil - } - - if err := m.DiskLogsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpHydrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpHydrationParams) UnmarshalBinary(b []byte) error { - var res CdpHydrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_hydration_params_disk_log.go b/v1/models/cdp_hydration_params_disk_log.go deleted file mode 100644 index d0b220d0..00000000 --- a/v1/models/cdp_hydration_params_disk_log.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CdpHydrationParamsDiskLog Message encapsulating the log data for each disk of the VM entity. -// -// swagger:model CdpHydrationParams_DiskLog -type CdpHydrationParamsDiskLog struct { - - // Disk information of the VM. - DiskInfo *CdpHydrationParamsVirtualDiskInfo `json:"diskInfo,omitempty"` - - // List of log files per disk. - LogDataVec []*CdpHydrationParamsLogData `json:"logDataVec"` -} - -// Validate validates this cdp hydration params disk log -func (m *CdpHydrationParamsDiskLog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogDataVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsDiskLog) validateDiskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DiskInfo) { // not required - return nil - } - - if m.DiskInfo != nil { - if err := m.DiskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfo") - } - return err - } - } - - return nil -} - -func (m *CdpHydrationParamsDiskLog) validateLogDataVec(formats strfmt.Registry) error { - if swag.IsZero(m.LogDataVec) { // not required - return nil - } - - for i := 0; i < len(m.LogDataVec); i++ { - if swag.IsZero(m.LogDataVec[i]) { // not required - continue - } - - if m.LogDataVec[i] != nil { - if err := m.LogDataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cdp hydration params disk log based on the context it is used -func (m *CdpHydrationParamsDiskLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogDataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsDiskLog) contextValidateDiskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskInfo != nil { - - if swag.IsZero(m.DiskInfo) { // not required - return nil - } - - if err := m.DiskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfo") - } - return err - } - } - - return nil -} - -func (m *CdpHydrationParamsDiskLog) contextValidateLogDataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LogDataVec); i++ { - - if m.LogDataVec[i] != nil { - - if swag.IsZero(m.LogDataVec[i]) { // not required - return nil - } - - if err := m.LogDataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpHydrationParamsDiskLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpHydrationParamsDiskLog) UnmarshalBinary(b []byte) error { - var res CdpHydrationParamsDiskLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_hydration_params_log_data.go b/v1/models/cdp_hydration_params_log_data.go deleted file mode 100644 index b80679b7..00000000 --- a/v1/models/cdp_hydration_params_log_data.go +++ /dev/null @@ -1,179 +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" -) - -// CdpHydrationParamsLogData cdp hydration params log data -// -// swagger:model CdpHydrationParams_LogData -type CdpHydrationParamsLogData struct { - - // End sequence number in the log file till which the data needs to be - // applied. If this not populated, hydration_time_usecs must be used for - // determining the point till which the log needs to be applied for - // hydration. - EndSeqNumber *Sequencer `json:"endSeqNumber,omitempty"` - - // Whether the CDP journal is sharded. Due to the possibility of sharded - // and non-sharded files in CDP sync replication, this flag is added to the - // file level. - IsJournalSharded *bool `json:"isJournalSharded,omitempty"` - - // Full path + name of the log file that needs to be processed. - LogFileName *string `json:"logFileName,omitempty"` - - // Log files are cloned from Atom's view into Magneto's view. It may - // happen that the log file contains sequence numbers that spans across - // hydration events. In such cases, we will mark them for removal only - // when the last sequence number in the log file has been processed in - // the current hydration event. - RemovalNeeded *bool `json:"removalNeeded,omitempty"` - - // Start sequence number in the log file from which the data needs to be - // applied for hydration. - StartSeqNumber *Sequencer `json:"startSeqNumber,omitempty"` -} - -// Validate validates this cdp hydration params log data -func (m *CdpHydrationParamsLogData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndSeqNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartSeqNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsLogData) validateEndSeqNumber(formats strfmt.Registry) error { - if swag.IsZero(m.EndSeqNumber) { // not required - return nil - } - - if m.EndSeqNumber != nil { - if err := m.EndSeqNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSeqNumber") - } - return err - } - } - - return nil -} - -func (m *CdpHydrationParamsLogData) validateStartSeqNumber(formats strfmt.Registry) error { - if swag.IsZero(m.StartSeqNumber) { // not required - return nil - } - - if m.StartSeqNumber != nil { - if err := m.StartSeqNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSeqNumber") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp hydration params log data based on the context it is used -func (m *CdpHydrationParamsLogData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndSeqNumber(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartSeqNumber(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsLogData) contextValidateEndSeqNumber(ctx context.Context, formats strfmt.Registry) error { - - if m.EndSeqNumber != nil { - - if swag.IsZero(m.EndSeqNumber) { // not required - return nil - } - - if err := m.EndSeqNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSeqNumber") - } - return err - } - } - - return nil -} - -func (m *CdpHydrationParamsLogData) contextValidateStartSeqNumber(ctx context.Context, formats strfmt.Registry) error { - - if m.StartSeqNumber != nil { - - if swag.IsZero(m.StartSeqNumber) { // not required - return nil - } - - if err := m.StartSeqNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSeqNumber") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpHydrationParamsLogData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpHydrationParamsLogData) UnmarshalBinary(b []byte) error { - var res CdpHydrationParamsLogData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_hydration_params_virtual_disk_info.go b/v1/models/cdp_hydration_params_virtual_disk_info.go deleted file mode 100644 index e0496adf..00000000 --- a/v1/models/cdp_hydration_params_virtual_disk_info.go +++ /dev/null @@ -1,116 +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" -) - -// CdpHydrationParamsVirtualDiskInfo cdp hydration params virtual disk info -// -// swagger:model CdpHydrationParams_VirtualDiskInfo -type CdpHydrationParamsVirtualDiskInfo struct { - - // The sequence number till which logs were applied on the base VMDK on - // which hydration is being performed. - BaseSeqNumber *Sequencer `json:"baseSeqNumber,omitempty"` - - // Name of the disk file. - FileName *string `json:"fileName,omitempty"` - - // Unique disk id within the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this cdp hydration params virtual disk info -func (m *CdpHydrationParamsVirtualDiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBaseSeqNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsVirtualDiskInfo) validateBaseSeqNumber(formats strfmt.Registry) error { - if swag.IsZero(m.BaseSeqNumber) { // not required - return nil - } - - if m.BaseSeqNumber != nil { - if err := m.BaseSeqNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseSeqNumber") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp hydration params virtual disk info based on the context it is used -func (m *CdpHydrationParamsVirtualDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBaseSeqNumber(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpHydrationParamsVirtualDiskInfo) contextValidateBaseSeqNumber(ctx context.Context, formats strfmt.Registry) error { - - if m.BaseSeqNumber != nil { - - if swag.IsZero(m.BaseSeqNumber) { // not required - return nil - } - - if err := m.BaseSeqNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseSeqNumber") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpHydrationParamsVirtualDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpHydrationParamsVirtualDiskInfo) UnmarshalBinary(b []byte) error { - var res CdpHydrationParamsVirtualDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_io_filter_state.go b/v1/models/cdp_io_filter_state.go deleted file mode 100644 index 85b1c968..00000000 --- a/v1/models/cdp_io_filter_state.go +++ /dev/null @@ -1,63 +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" -) - -// CdpIoFilterState CdpIoFilterState specifies the current state of the CDP IO Filter for a -// single Protection Source. -// -// swagger:model CdpIoFilterState -type CdpIoFilterState struct { - - // Specifies the message of the error, which was encountered duing the last - // upgrade. If this is specified, then it means that the last upgrade failed. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the current status of the IO Filter. - // See magneto/base/entities.proto > IOFilterState > FilterStatus - FilterStatus *string `json:"filterStatus,omitempty"` - - // Specifies the current upgradability status of the IO Filter. - // See magneto/base/common.proto > Upgradability - Upgradability *string `json:"upgradability,omitempty"` - - // Specifies the current version of the IO filter. - Version *string `json:"version,omitempty"` -} - -// Validate validates this cdp io filter state -func (m *CdpIoFilterState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cdp io filter state based on context it is used -func (m *CdpIoFilterState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CdpIoFilterState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpIoFilterState) UnmarshalBinary(b []byte) error { - var res CdpIoFilterState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_log_run_params.go b/v1/models/cdp_log_run_params.go deleted file mode 100644 index 4666a9bb..00000000 --- a/v1/models/cdp_log_run_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CdpLogRunParams CDP log run parameters. These will be used to move logs from Atom's view to -// Magneto's backup view in a log run -// -// swagger:model CdpLogRunParams -type CdpLogRunParams struct { - - // Logs for the various disks of the VM. - DiskLogsVec []*CdpLogRunParamsDiskLog `json:"diskLogsVec"` - - // List of epoch(s) to be consumed by the log run. - EpochDataVec []*CdpLogRunParamsEpochData `json:"epochDataVec"` - - // The time in usecs to sync the disk sequence numbers for this log run. - // All IOs that will be consumed in this log run will have end time less than - // this specified time. - LogRunTimeUsecs *int64 `json:"logRunTimeUsecs,omitempty"` -} - -// Validate validates this cdp log run params -func (m *CdpLogRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskLogsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEpochDataVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParams) validateDiskLogsVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskLogsVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskLogsVec); i++ { - if swag.IsZero(m.DiskLogsVec[i]) { // not required - continue - } - - if m.DiskLogsVec[i] != nil { - if err := m.DiskLogsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CdpLogRunParams) validateEpochDataVec(formats strfmt.Registry) error { - if swag.IsZero(m.EpochDataVec) { // not required - return nil - } - - for i := 0; i < len(m.EpochDataVec); i++ { - if swag.IsZero(m.EpochDataVec[i]) { // not required - continue - } - - if m.EpochDataVec[i] != nil { - if err := m.EpochDataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("epochDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("epochDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cdp log run params based on the context it is used -func (m *CdpLogRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskLogsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEpochDataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParams) contextValidateDiskLogsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskLogsVec); i++ { - - if m.DiskLogsVec[i] != nil { - - if swag.IsZero(m.DiskLogsVec[i]) { // not required - return nil - } - - if err := m.DiskLogsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLogsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CdpLogRunParams) contextValidateEpochDataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EpochDataVec); i++ { - - if m.EpochDataVec[i] != nil { - - if swag.IsZero(m.EpochDataVec[i]) { // not required - return nil - } - - if err := m.EpochDataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("epochDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("epochDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLogRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLogRunParams) UnmarshalBinary(b []byte) error { - var res CdpLogRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_log_run_params_disk_log.go b/v1/models/cdp_log_run_params_disk_log.go deleted file mode 100644 index 1842a56c..00000000 --- a/v1/models/cdp_log_run_params_disk_log.go +++ /dev/null @@ -1,236 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CdpLogRunParamsDiskLog Message encapsulating the log data for each disk of the VM entity. -// -// swagger:model CdpLogRunParams_DiskLog -type CdpLogRunParamsDiskLog struct { - - // IO data events consumed by a log run. - // Events are consumed either from last log run to the current time or from - // first VADP backup run to the current time. - DataEventsVec []*DataEvent `json:"dataEventsVec"` - - // Disk information of the VM. - DiskInfo *CdpLogRunParamsVirtualDiskInfo `json:"diskInfo,omitempty"` - - // List of log files per disk. - LogDataVec []*CdpLogRunParamsLogData `json:"logDataVec"` -} - -// Validate validates this cdp log run params disk log -func (m *CdpLogRunParamsDiskLog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataEventsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogDataVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParamsDiskLog) validateDataEventsVec(formats strfmt.Registry) error { - if swag.IsZero(m.DataEventsVec) { // not required - return nil - } - - for i := 0; i < len(m.DataEventsVec); i++ { - if swag.IsZero(m.DataEventsVec[i]) { // not required - continue - } - - if m.DataEventsVec[i] != nil { - if err := m.DataEventsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataEventsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataEventsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CdpLogRunParamsDiskLog) validateDiskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DiskInfo) { // not required - return nil - } - - if m.DiskInfo != nil { - if err := m.DiskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfo") - } - return err - } - } - - return nil -} - -func (m *CdpLogRunParamsDiskLog) validateLogDataVec(formats strfmt.Registry) error { - if swag.IsZero(m.LogDataVec) { // not required - return nil - } - - for i := 0; i < len(m.LogDataVec); i++ { - if swag.IsZero(m.LogDataVec[i]) { // not required - continue - } - - if m.LogDataVec[i] != nil { - if err := m.LogDataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cdp log run params disk log based on the context it is used -func (m *CdpLogRunParamsDiskLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataEventsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogDataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParamsDiskLog) contextValidateDataEventsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataEventsVec); i++ { - - if m.DataEventsVec[i] != nil { - - if swag.IsZero(m.DataEventsVec[i]) { // not required - return nil - } - - if err := m.DataEventsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataEventsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataEventsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CdpLogRunParamsDiskLog) contextValidateDiskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskInfo != nil { - - if swag.IsZero(m.DiskInfo) { // not required - return nil - } - - if err := m.DiskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfo") - } - return err - } - } - - return nil -} - -func (m *CdpLogRunParamsDiskLog) contextValidateLogDataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LogDataVec); i++ { - - if m.LogDataVec[i] != nil { - - if swag.IsZero(m.LogDataVec[i]) { // not required - return nil - } - - if err := m.LogDataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLogRunParamsDiskLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLogRunParamsDiskLog) UnmarshalBinary(b []byte) error { - var res CdpLogRunParamsDiskLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_log_run_params_epoch_data.go b/v1/models/cdp_log_run_params_epoch_data.go deleted file mode 100644 index b1cead81..00000000 --- a/v1/models/cdp_log_run_params_epoch_data.go +++ /dev/null @@ -1,112 +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" -) - -// CdpLogRunParamsEpochData cdp log run params epoch data -// -// swagger:model CdpLogRunParams_EpochData -type CdpLogRunParamsEpochData struct { - - // Epoch details. - Epoch *EpochProto `json:"epoch,omitempty"` - - // Whether this epoch is removed from Atom's view. - Removed *bool `json:"removed,omitempty"` -} - -// Validate validates this cdp log run params epoch data -func (m *CdpLogRunParamsEpochData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEpoch(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParamsEpochData) validateEpoch(formats strfmt.Registry) error { - if swag.IsZero(m.Epoch) { // not required - return nil - } - - if m.Epoch != nil { - if err := m.Epoch.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("epoch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("epoch") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp log run params epoch data based on the context it is used -func (m *CdpLogRunParamsEpochData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEpoch(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpLogRunParamsEpochData) contextValidateEpoch(ctx context.Context, formats strfmt.Registry) error { - - if m.Epoch != nil { - - if swag.IsZero(m.Epoch) { // not required - return nil - } - - if err := m.Epoch.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("epoch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("epoch") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLogRunParamsEpochData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLogRunParamsEpochData) UnmarshalBinary(b []byte) error { - var res CdpLogRunParamsEpochData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_log_run_params_log_data.go b/v1/models/cdp_log_run_params_log_data.go deleted file mode 100644 index 5d4a07ba..00000000 --- a/v1/models/cdp_log_run_params_log_data.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" -) - -// CdpLogRunParamsLogData cdp log run params log data -// -// swagger:model CdpLogRunParams_LogData -type CdpLogRunParamsLogData struct { - - // Full path + name of the log file that needs to be processed. - LogFilePath *string `json:"logFilePath,omitempty"` - - // Whether this log file should be removed from Atom's view. - Remove *bool `json:"remove,omitempty"` -} - -// Validate validates this cdp log run params log data -func (m *CdpLogRunParamsLogData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cdp log run params log data based on context it is used -func (m *CdpLogRunParamsLogData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLogRunParamsLogData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLogRunParamsLogData) UnmarshalBinary(b []byte) error { - var res CdpLogRunParamsLogData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cdp_log_run_params_virtual_disk_info.go b/v1/models/cdp_log_run_params_virtual_disk_info.go deleted file mode 100644 index b22c7730..00000000 --- a/v1/models/cdp_log_run_params_virtual_disk_info.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" -) - -// CdpLogRunParamsVirtualDiskInfo cdp log run params virtual disk info -// -// swagger:model CdpLogRunParams_VirtualDiskInfo -type CdpLogRunParamsVirtualDiskInfo struct { - - // Name of the disk file. - FileName *string `json:"fileName,omitempty"` - - // Unique disk id within the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this cdp log run params virtual disk info -func (m *CdpLogRunParamsVirtualDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cdp log run params virtual disk info based on context it is used -func (m *CdpLogRunParamsVirtualDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLogRunParamsVirtualDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLogRunParamsVirtualDiskInfo) UnmarshalBinary(b []byte) error { - var res CdpLogRunParamsVirtualDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/centrify_zone.go b/v1/models/centrify_zone.go deleted file mode 100644 index dff0f248..00000000 --- a/v1/models/centrify_zone.go +++ /dev/null @@ -1,151 +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" -) - -// CentrifyZone Centrify Zone. -// -// Specifies the properties associated to a Centrify zone of an Active -// Directory domain. -// -// swagger:model CentrifyZone -type CentrifyZone struct { - - // Specifies the schema of this Centrify zone. - // The below list of schemas and their values are taken from the document - // Centrify Server Suite 2016 Windows API Programmer's Guide - // https://docs.centrify.com/en/css/suite2016/centrify-win-progguide.pdf - // 'kCentrifyDynamicSchema_1_0' specifies dynamic schema, version 1.0. - // 'kCentrifyDynamicSchema_2_0' specifies dynamic schema, version 2.0. - // 'kCentrifyDynamicSchema_3_0' specifies dynamic schema, version 3.0. - // 'kCentrifyDynamicSchema_5_0' specifies dynamic schema, version 5.0. - // 'kCentrifySfu_3_0' specifies sfu schema, version 3.0. - // 'kCentrifySfu_3_0_V5' specifies sfu schema, 3.0.5. - // 'kCentrifySfu_4_0' specifies sfu schema, version 4.0. - // 'kCentrifyCdcRfc2307' specifies cdcrfc2307 schema. - // 'kCentrifyCdcRfc2307_2' specifies cdcrfc2307, version 2. - // 'kCentrifyCdcRfc2307_3' specifies cdcrfc2307, version 3. - // Enum: ["kCentrifyDynamicSchema_1_0","kCentrifyDynamicSchema_2_0","kCentrifySfu_3_0","kCentrifySfu_4_0","kCentrifyCdcRfc2307","kCentrifyDynamicSchema_3_0","kCentrifyCdcRfc2307_2","kCentrifyDynamicSchema_5_0","kCentrifyCdcRfc2307_3","kCentrifySfu_3_0_V5"] - CentrifySchema *string `json:"centrifySchema,omitempty"` - - // Specifies a description of the Centrify zone. - Description *string `json:"description,omitempty"` - - // Specifies the distinguished name of the Centrify zone. - DistinguishedName *string `json:"distinguishedName,omitempty"` -} - -// Validate validates this centrify zone -func (m *CentrifyZone) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCentrifySchema(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var centrifyZoneTypeCentrifySchemaPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCentrifyDynamicSchema_1_0","kCentrifyDynamicSchema_2_0","kCentrifySfu_3_0","kCentrifySfu_4_0","kCentrifyCdcRfc2307","kCentrifyDynamicSchema_3_0","kCentrifyCdcRfc2307_2","kCentrifyDynamicSchema_5_0","kCentrifyCdcRfc2307_3","kCentrifySfu_3_0_V5"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - centrifyZoneTypeCentrifySchemaPropEnum = append(centrifyZoneTypeCentrifySchemaPropEnum, v) - } -} - -const ( - - // CentrifyZoneCentrifySchemaKCentrifyDynamicSchema10 captures enum value "kCentrifyDynamicSchema_1_0" - CentrifyZoneCentrifySchemaKCentrifyDynamicSchema10 string = "kCentrifyDynamicSchema_1_0" - - // CentrifyZoneCentrifySchemaKCentrifyDynamicSchema20 captures enum value "kCentrifyDynamicSchema_2_0" - CentrifyZoneCentrifySchemaKCentrifyDynamicSchema20 string = "kCentrifyDynamicSchema_2_0" - - // CentrifyZoneCentrifySchemaKCentrifySfu30 captures enum value "kCentrifySfu_3_0" - CentrifyZoneCentrifySchemaKCentrifySfu30 string = "kCentrifySfu_3_0" - - // CentrifyZoneCentrifySchemaKCentrifySfu40 captures enum value "kCentrifySfu_4_0" - CentrifyZoneCentrifySchemaKCentrifySfu40 string = "kCentrifySfu_4_0" - - // CentrifyZoneCentrifySchemaKCentrifyCdcRfc2307 captures enum value "kCentrifyCdcRfc2307" - CentrifyZoneCentrifySchemaKCentrifyCdcRfc2307 string = "kCentrifyCdcRfc2307" - - // CentrifyZoneCentrifySchemaKCentrifyDynamicSchema30 captures enum value "kCentrifyDynamicSchema_3_0" - CentrifyZoneCentrifySchemaKCentrifyDynamicSchema30 string = "kCentrifyDynamicSchema_3_0" - - // CentrifyZoneCentrifySchemaKCentrifyCdcRfc23072 captures enum value "kCentrifyCdcRfc2307_2" - CentrifyZoneCentrifySchemaKCentrifyCdcRfc23072 string = "kCentrifyCdcRfc2307_2" - - // CentrifyZoneCentrifySchemaKCentrifyDynamicSchema50 captures enum value "kCentrifyDynamicSchema_5_0" - CentrifyZoneCentrifySchemaKCentrifyDynamicSchema50 string = "kCentrifyDynamicSchema_5_0" - - // CentrifyZoneCentrifySchemaKCentrifyCdcRfc23073 captures enum value "kCentrifyCdcRfc2307_3" - CentrifyZoneCentrifySchemaKCentrifyCdcRfc23073 string = "kCentrifyCdcRfc2307_3" - - // CentrifyZoneCentrifySchemaKCentrifySfu30V5 captures enum value "kCentrifySfu_3_0_V5" - CentrifyZoneCentrifySchemaKCentrifySfu30V5 string = "kCentrifySfu_3_0_V5" -) - -// prop value enum -func (m *CentrifyZone) validateCentrifySchemaEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, centrifyZoneTypeCentrifySchemaPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CentrifyZone) validateCentrifySchema(formats strfmt.Registry) error { - if swag.IsZero(m.CentrifySchema) { // not required - return nil - } - - // value enum - if err := m.validateCentrifySchemaEnum("centrifySchema", "body", *m.CentrifySchema); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this centrify zone based on context it is used -func (m *CentrifyZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CentrifyZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CentrifyZone) UnmarshalBinary(b []byte) error { - var res CentrifyZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/certificate_based_authentication_credentials.go b/v1/models/certificate_based_authentication_credentials.go deleted file mode 100644 index 2d01fc8d..00000000 --- a/v1/models/certificate_based_authentication_credentials.go +++ /dev/null @@ -1,56 +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" -) - -// CertificateBasedAuthenticationCredentials Message that encapsulates credentials for certificate based authentication. -// -// swagger:model CertificateBasedAuthenticationCredentials -type CertificateBasedAuthenticationCredentials struct { - - // Optional passphrase string for the certificate. - Passphrase *string `json:"passphrase,omitempty"` - - // Certificate private key for that user. - PrivateKey *string `json:"privateKey,omitempty"` - - // Username that has to be authenticated. - Username *string `json:"username,omitempty"` -} - -// Validate validates this certificate based authentication credentials -func (m *CertificateBasedAuthenticationCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this certificate based authentication credentials based on context it is used -func (m *CertificateBasedAuthenticationCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CertificateBasedAuthenticationCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CertificateBasedAuthenticationCredentials) UnmarshalBinary(b []byte) error { - var res CertificateBasedAuthenticationCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/certificate_details.go b/v1/models/certificate_details.go deleted file mode 100644 index 0dd558e1..00000000 --- a/v1/models/certificate_details.go +++ /dev/null @@ -1,126 +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" -) - -// CertificateDetails Certificate Details. -// -// Specifies details about a certificate. -// -// swagger:model CertificateDetails -type CertificateDetails struct { - - // Specifies the filename of the certificate. This is unique to each - // certificate generated. - CertFileName *string `json:"certFileName,omitempty"` - - // Specifies the date in epoch till when the certificate is valid. - ExpiryDate *string `json:"expiryDate,omitempty"` - - // Each certificate can be deployed to multiple hosts. List of all hosts - // is returned after deployment. - HostIps []string `json:"hostIps"` - - // Specifies the type of the host such as 'kSapHana', 'kSapOracle', etc. - // Specifies the host type of host for generating and deploying a - // Certificate. - // 'kOther' indicates it is any of the other hosts. - // 'kSapOracle' indicates it is a SAP Oracle host. - // 'kSapHana' indicates it is a SAP HANA host. - // Enum: ["kOther","kSapOracle","kSapHana"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this certificate details -func (m *CertificateDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var certificateDetailsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOther","kSapOracle","kSapHana"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - certificateDetailsTypeTypePropEnum = append(certificateDetailsTypeTypePropEnum, v) - } -} - -const ( - - // CertificateDetailsTypeKOther captures enum value "kOther" - CertificateDetailsTypeKOther string = "kOther" - - // CertificateDetailsTypeKSapOracle captures enum value "kSapOracle" - CertificateDetailsTypeKSapOracle string = "kSapOracle" - - // CertificateDetailsTypeKSapHana captures enum value "kSapHana" - CertificateDetailsTypeKSapHana string = "kSapHana" -) - -// prop value enum -func (m *CertificateDetails) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, certificateDetailsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CertificateDetails) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this certificate details based on context it is used -func (m *CertificateDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CertificateDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CertificateDetails) UnmarshalBinary(b []byte) error { - var res CertificateDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/change_backup_job_activation_param.go b/v1/models/change_backup_job_activation_param.go deleted file mode 100644 index 012bbb48..00000000 --- a/v1/models/change_backup_job_activation_param.go +++ /dev/null @@ -1,67 +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" -) - -// ChangeBackupJobActivationParam ChangeBackupJobActivationParam is the struct for activating or -// de-activating a backup job in order to support remote replication. -// -// swagger:model ChangeBackupJobActivationParam -type ChangeBackupJobActivationParam struct { - - // BackupJobId is the Id of the backup job. - BackupJobID *int64 `json:"backupJobId,omitempty"` - - // IsOperationActivate is the flag to specify whether the operation is - // activate or de-activate. - IsOperationActivate *bool `json:"isOperationActivate,omitempty"` - - // ParentEntityId is the entity Id of the parent source. - ParentEntityID *int64 `json:"parentEntityId,omitempty"` - - // Id of the policy. If it is specified, job will get the new Policy. This - // field is only used during activation and ignored during de-activation. - PolicyID *string `json:"policyId,omitempty"` - - // If the request is to de-activate the backup job, this field is used to - // specify whether to power off VMs in VMware environment. Please note that - // this field is ignored if the request is not to de-activate the backup job. - PowerOff *bool `json:"powerOff,omitempty"` -} - -// Validate validates this change backup job activation param -func (m *ChangeBackupJobActivationParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change backup job activation param based on context it is used -func (m *ChangeBackupJobActivationParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChangeBackupJobActivationParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChangeBackupJobActivationParam) UnmarshalBinary(b []byte) error { - var res ChangeBackupJobActivationParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/change_backup_job_mode_proto.go b/v1/models/change_backup_job_mode_proto.go deleted file mode 100644 index 2b48a118..00000000 --- a/v1/models/change_backup_job_mode_proto.go +++ /dev/null @@ -1,111 +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" -) - -// ChangeBackupJobModeProto A wrapper proto that contains the activate and deactivate of a job state -// proto. This will be used for WAL-logging. -// -// swagger:model ChangeBackupJobModeProto -type ChangeBackupJobModeProto struct { - - // Information associated with the deactivate backup job task (active or - // finished). - DeactivateJobState *DeactivateJobStateProto `json:"deactivateJobState,omitempty"` -} - -// Validate validates this change backup job mode proto -func (m *ChangeBackupJobModeProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeactivateJobState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChangeBackupJobModeProto) validateDeactivateJobState(formats strfmt.Registry) error { - if swag.IsZero(m.DeactivateJobState) { // not required - return nil - } - - if m.DeactivateJobState != nil { - if err := m.DeactivateJobState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivateJobState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivateJobState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this change backup job mode proto based on the context it is used -func (m *ChangeBackupJobModeProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeactivateJobState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChangeBackupJobModeProto) contextValidateDeactivateJobState(ctx context.Context, formats strfmt.Registry) error { - - if m.DeactivateJobState != nil { - - if swag.IsZero(m.DeactivateJobState) { // not required - return nil - } - - if err := m.DeactivateJobState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivateJobState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivateJobState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ChangeBackupJobModeProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChangeBackupJobModeProto) UnmarshalBinary(b []byte) error { - var res ChangeBackupJobModeProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/change_protection_job_state_param.go b/v1/models/change_protection_job_state_param.go deleted file mode 100644 index 97ad81e9..00000000 --- a/v1/models/change_protection_job_state_param.go +++ /dev/null @@ -1,61 +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" -) - -// ChangeProtectionJobStateParam Change Protection Job State Parameters. -// -// Specifies if the Run state of a Protection Job should change. -// -// swagger:model ChangeProtectionJobStateParam -type ChangeProtectionJobStateParam struct { - - // If true, the specified Protection Job is paused and no new Runs - // of the Job are started. Any Runs that were executing continue to run. - // If false and the Protection Job was in a paused state, the - // Protection Job resumes and new Runs are started according to the - // schedule defined in the associated Policy. - Pause *bool `json:"pause,omitempty"` - - // Specifies the reason of pausing the job so that depending on the pause - // reason, only specific jobs can be resumed. All the jobs paused manually by - // the user will be identified by nil PauseReason. - PauseReason *int32 `json:"pauseReason,omitempty"` -} - -// Validate validates this change protection job state param -func (m *ChangeProtectionJobStateParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change protection job state param based on context it is used -func (m *ChangeProtectionJobStateParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChangeProtectionJobStateParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChangeProtectionJobStateParam) UnmarshalBinary(b []byte) error { - var res ChangeProtectionJobStateParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/change_service_state_parameters.go b/v1/models/change_service_state_parameters.go deleted file mode 100644 index ed291eae..00000000 --- a/v1/models/change_service_state_parameters.go +++ /dev/null @@ -1,216 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ChangeServiceStateParameters Change Service State Parameters. -// -// Specifies the parameters needed to change the state of one or more -// services running on the Cluster. -// -// swagger:model ChangeServiceStateParameters -type ChangeServiceStateParameters struct { - - // Specifies the action to take on the specified service. - // 'kStop' indicates that the specified services will be stopped. - // 'kStart' indicates that the specified services will be started. - // 'kRestart' indicates that the specified services will be restarted. - // Enum: ["kStop","kStart","kRestart"] - Action *string `json:"action,omitempty"` - - // Specifies the list of services to take the specified action on. - // If none are specified, all Cluster services will be affected. It should - // also be noted that some Cluster services are not stoppable and may - // not be affected by the action specified. - // 'kApollo' is a service for reclaiming freed disk sectors on Nodes in the - // SnapFS distributed file system. - // 'kBridge' is a service for managing the SnapFS distributed file system. - // 'kGenie' is a service that is responsible for monitoring hardware health - // on the Cluster. - // 'kGenieGofer' is a service that links the Genie service to other services - // on the Cluster. - // 'kMagneto' is the data protection service of the Cohesity Data Platform. - // 'kIris' is the service which serves REST API calls to the UI, CLI, and any - // scripts written by customers. - // 'kIrisProxy' is a service that links the Iris service to other services - // on the Cluster. - // 'kScribe' is the service responsible for storing filesystem metadata. - // 'kStats' is the service that is responsible for retrieving and aggregating - // disk metrics across the Cluster. - // 'kYoda' is an elastic search indexing service. - // 'kAlerts' is a publisher and subscribing service for alerts. - // 'kKeychain' is a service for managing disk encryption keys. - // 'kLogWatcher' is a service that scans the log directory and reduces - // the number of logs if required. - // 'kStatsCollector' is a service that periodically logs system stats. - // 'kGandalf' is a distributed lock service and coordination manager. - // 'kNexus' indicates the Nexus service. This is the service that is - // responsible for creation of Clusters and configuration of Nodes and - // networking. - // 'kNexusProxy' is a service that links the Nexus service to other services - // on the Cluster. - // 'kStorageProxy' is a service for accessing data on external entities. - // 'kRtClient' is a reverse tunneling client service. - // 'kVaultProxy' is a service for managing external targets that Clusters - // can be backed up to. - // 'kSmbProxy' is an SMB protocol service. - // 'kBridgeProxy' is the service that links the Bridge service to other - // services on the Cluster. - // 'kLibrarian' is an elastic search indexing service. - // 'kGroot' is a service for managing replication of SQL databases across - // multiple nodes in a Cluster. - // 'kEagleAgent' is a service that is responsible for retrieving information - // on Cluster health. - // 'kAthena' is a service for running distributed containerized applications - // on the Cohesity Data Platform. - // 'kBifrostBroker' is a service for communicating with the Cohesity proxies - // for multitenancy. - // 'kSmb2Proxy' is a new SMB protocol service. - // 'kOs' can be specified in order to do a full reboot. - // 'kAtom' is a service for receiving data for the Continuous Data Protection. - // 'kPatch' is a service for downloading and applying patches. - // 'kCompass' is a service for serving dns request for external and internal - // traffic. - // 'kEtlServer' is a service responsible for ETling data for globalsearch. - // 'kIcebox' is service that links Icebox service to other services on cluster. - // kScribe, kStats, kYoda, kAlerts, kKeychain, kLogWatcher, kStatsCollecter, - // kGandalf, kNexus, kNexusProxy, kStorageProxy, kRtClient, kVaultProxy, - // kSmbProxy, kBridgeProxy, kLibrarian, kGroot, kEagleAgent, kAthena, - // kBifrostBroker, kSmb2Proxy, kOs, kAtom, kIcebox - Services []string `json:"services"` -} - -// Validate validates this change service state parameters -func (m *ChangeServiceStateParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServices(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var changeServiceStateParametersTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStop","kStart","kRestart"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - changeServiceStateParametersTypeActionPropEnum = append(changeServiceStateParametersTypeActionPropEnum, v) - } -} - -const ( - - // ChangeServiceStateParametersActionKStop captures enum value "kStop" - ChangeServiceStateParametersActionKStop string = "kStop" - - // ChangeServiceStateParametersActionKStart captures enum value "kStart" - ChangeServiceStateParametersActionKStart string = "kStart" - - // ChangeServiceStateParametersActionKRestart captures enum value "kRestart" - ChangeServiceStateParametersActionKRestart string = "kRestart" -) - -// prop value enum -func (m *ChangeServiceStateParameters) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeServiceStateParametersTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ChangeServiceStateParameters) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -var changeServiceStateParametersServicesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - changeServiceStateParametersServicesItemsEnum = append(changeServiceStateParametersServicesItemsEnum, v) - } -} - -func (m *ChangeServiceStateParameters) validateServicesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeServiceStateParametersServicesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ChangeServiceStateParameters) validateServices(formats strfmt.Registry) error { - if swag.IsZero(m.Services) { // not required - return nil - } - - for i := 0; i < len(m.Services); i++ { - - // value enum - if err := m.validateServicesItemsEnum("services"+"."+strconv.Itoa(i), "body", m.Services[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this change service state parameters based on context it is used -func (m *ChangeServiceStateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChangeServiceStateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChangeServiceStateParameters) UnmarshalBinary(b []byte) error { - var res ChangeServiceStateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/change_service_state_result.go b/v1/models/change_service_state_result.go deleted file mode 100644 index 37ebc82a..00000000 --- a/v1/models/change_service_state_result.go +++ /dev/null @@ -1,57 +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" -) - -// ChangeServiceStateResult Change Service State Result. -// -// Specifies the result returned after a successful request to change the -// state of services running on the Cluster. -// -// swagger:model ChangeServiceStateResult -type ChangeServiceStateResult struct { - - // Specifies a description of the result of the operation. - Message *string `json:"message,omitempty"` - - // Specifies a URL which can be queried to check the status of the - // operation. - StatusURL *string `json:"statusUrl,omitempty"` -} - -// Validate validates this change service state result -func (m *ChangeServiceStateResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change service state result based on context it is used -func (m *ChangeServiceStateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChangeServiceStateResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChangeServiceStateResult) UnmarshalBinary(b []byte) error { - var res ChangeServiceStateResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/chassis_info.go b/v1/models/chassis_info.go deleted file mode 100644 index cf02929b..00000000 --- a/v1/models/chassis_info.go +++ /dev/null @@ -1,65 +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" -) - -// ChassisInfo Chassis Information. -// -// ChassisInfo is the struct for the Chassis. -// -// swagger:model ChassisInfo -type ChassisInfo struct { - - // ChassisId is a unique id assigned to the chassis. - ChassisID *int64 `json:"chassisId,omitempty"` - - // ChassisName is the name of the chassis. This could be the chassis serial - // number by default. - ChassisName *string `json:"chassisName,omitempty"` - - // Chassis serial. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Location is the location of the chassis within the rack. - Location *string `json:"location,omitempty"` - - // Rack is the rack within which this chassis lives. - RackID *int64 `json:"rackId,omitempty"` -} - -// Validate validates this chassis info -func (m *ChassisInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this chassis info based on context it is used -func (m *ChassisInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChassisInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChassisInfo) UnmarshalBinary(b []byte) error { - var res ChassisInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/check_restore_app_task_arg.go b/v1/models/check_restore_app_task_arg.go deleted file mode 100644 index 516daad0..00000000 --- a/v1/models/check_restore_app_task_arg.go +++ /dev/null @@ -1,217 +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" -) - -// CheckRestoreAppTaskArg API to check the feasibility of an application restore task and, if exactly -// one entity is being restored, return the display info for all the snapshots -// in the restore path. For example, during SQL/Oracle DB restore this RPC is -// invoked at the point when Iris accepts user input for the recovery point, -// and is used to perform recovery path analysis and either return the snapshot -// sizes if recovery is possible to the given point in time or return an error -// otherwise. -// -// swagger:model CheckRestoreAppTaskArg -type CheckRestoreAppTaskArg struct { - - // Specifies the request attributes. - APIRequestAttr *APIRequestAttr `json:"apiRequestAttr,omitempty"` - - // Specifies the API version used by this arg. - APIVersion *APIVersion `json:"apiVersion,omitempty"` - - // Information about the application restore task. - RestoreAppParams *RestoreAppParams `json:"restoreAppParams,omitempty"` -} - -// Validate validates this check restore app task arg -func (m *CheckRestoreAppTaskArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAPIRequestAttr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAPIVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskArg) validateAPIRequestAttr(formats strfmt.Registry) error { - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if m.APIRequestAttr != nil { - if err := m.APIRequestAttr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskArg) validateAPIVersion(formats strfmt.Registry) error { - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if m.APIVersion != nil { - if err := m.APIVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskArg) validateRestoreAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if m.RestoreAppParams != nil { - if err := m.RestoreAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this check restore app task arg based on the context it is used -func (m *CheckRestoreAppTaskArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAPIRequestAttr(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAPIVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskArg) contextValidateAPIRequestAttr(ctx context.Context, formats strfmt.Registry) error { - - if m.APIRequestAttr != nil { - - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if err := m.APIRequestAttr.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskArg) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.APIVersion != nil { - - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if err := m.APIVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskArg) contextValidateRestoreAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAppParams != nil { - - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if err := m.RestoreAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CheckRestoreAppTaskArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CheckRestoreAppTaskArg) UnmarshalBinary(b []byte) error { - var res CheckRestoreAppTaskArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/check_restore_app_task_result.go b/v1/models/check_restore_app_task_result.go deleted file mode 100644 index 61c515c0..00000000 --- a/v1/models/check_restore_app_task_result.go +++ /dev/null @@ -1,164 +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" -) - -// CheckRestoreAppTaskResult check restore app task result -// -// swagger:model CheckRestoreAppTaskResult -type CheckRestoreAppTaskResult struct { - - // If exactly one entity is being restored, this is populated with the - // display info for that entity. - EntityInfo *CheckRestoreAppTaskResultEntityInfo `json:"entityInfo,omitempty"` - - // Error encountered by the RPC. - Error *PrivateErrorProto `json:"error,omitempty"` - - // User message (if any) associated with the restore request. - UserMessage *string `json:"userMessage,omitempty"` -} - -// Validate validates this check restore app task result -func (m *CheckRestoreAppTaskResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskResult) validateEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityInfo) { // not required - return nil - } - - if m.EntityInfo != nil { - if err := m.EntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityInfo") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this check restore app task result based on the context it is used -func (m *CheckRestoreAppTaskResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskResult) contextValidateEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityInfo != nil { - - if swag.IsZero(m.EntityInfo) { // not required - return nil - } - - if err := m.EntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityInfo") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResult) 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 -} - -// MarshalBinary interface implementation -func (m *CheckRestoreAppTaskResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CheckRestoreAppTaskResult) UnmarshalBinary(b []byte) error { - var res CheckRestoreAppTaskResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/check_restore_app_task_result_entity_info.go b/v1/models/check_restore_app_task_result_entity_info.go deleted file mode 100644 index 16b080f7..00000000 --- a/v1/models/check_restore_app_task_result_entity_info.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CheckRestoreAppTaskResultEntityInfo Encapsulates info about an entity being restored to be displayed to the -// user. -// -// swagger:model CheckRestoreAppTaskResult_EntityInfo -type CheckRestoreAppTaskResultEntityInfo struct { - - // The entity being restored. - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // Display info about the full or incremental snapshot anchoring the - // restore. - FullSnapshotInfo *CheckRestoreAppTaskResultFullSnapshotInfo `json:"fullSnapshotInfo,omitempty"` - - // Display info about all the log snapshots in the restore path. - LogSnapshotInfoVec []*CheckRestoreAppTaskResultLogSnapshotInfo `json:"logSnapshotInfoVec"` -} - -// Validate validates this check restore app task result entity info -func (m *CheckRestoreAppTaskResultEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogSnapshotInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) validateFullSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FullSnapshotInfo) { // not required - return nil - } - - if m.FullSnapshotInfo != nil { - if err := m.FullSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) validateLogSnapshotInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.LogSnapshotInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.LogSnapshotInfoVec); i++ { - if swag.IsZero(m.LogSnapshotInfoVec[i]) { // not required - continue - } - - if m.LogSnapshotInfoVec[i] != nil { - if err := m.LogSnapshotInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSnapshotInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSnapshotInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this check restore app task result entity info based on the context it is used -func (m *CheckRestoreAppTaskResultEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogSnapshotInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) contextValidateFullSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FullSnapshotInfo != nil { - - if swag.IsZero(m.FullSnapshotInfo) { // not required - return nil - } - - if err := m.FullSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *CheckRestoreAppTaskResultEntityInfo) contextValidateLogSnapshotInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LogSnapshotInfoVec); i++ { - - if m.LogSnapshotInfoVec[i] != nil { - - if swag.IsZero(m.LogSnapshotInfoVec[i]) { // not required - return nil - } - - if err := m.LogSnapshotInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSnapshotInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSnapshotInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultEntityInfo) UnmarshalBinary(b []byte) error { - var res CheckRestoreAppTaskResultEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/check_restore_app_task_result_full_snapshot_info.go b/v1/models/check_restore_app_task_result_full_snapshot_info.go deleted file mode 100644 index 7121aacd..00000000 --- a/v1/models/check_restore_app_task_result_full_snapshot_info.go +++ /dev/null @@ -1,58 +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" -) - -// CheckRestoreAppTaskResultFullSnapshotInfo Encapsulates info about a full or incremental snapshot to be displayed to -// the user. -// -// swagger:model CheckRestoreAppTaskResult_FullSnapshotInfo -type CheckRestoreAppTaskResultFullSnapshotInfo struct { - - // The type of backup, whether it is full or incremental. - BackupType *int32 `json:"backupType,omitempty"` - - // Number of bytes to transfer in order to restore to this snapshot. Should - // be the same as the logical size of the entity that was backed up. - EntitySize *int64 `json:"entitySize,omitempty"` - - // The start time of the backup job run containing this snapshot. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` -} - -// Validate validates this check restore app task result full snapshot info -func (m *CheckRestoreAppTaskResultFullSnapshotInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this check restore app task result full snapshot info based on context it is used -func (m *CheckRestoreAppTaskResultFullSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultFullSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultFullSnapshotInfo) UnmarshalBinary(b []byte) error { - var res CheckRestoreAppTaskResultFullSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/check_restore_app_task_result_log_snapshot_info.go b/v1/models/check_restore_app_task_result_log_snapshot_info.go deleted file mode 100644 index fa01db6e..00000000 --- a/v1/models/check_restore_app_task_result_log_snapshot_info.go +++ /dev/null @@ -1,54 +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" -) - -// CheckRestoreAppTaskResultLogSnapshotInfo Encapsulates info about a log snapshot to be displayed to the user. -// -// swagger:model CheckRestoreAppTaskResult_LogSnapshotInfo -type CheckRestoreAppTaskResultLogSnapshotInfo struct { - - // The start time of the backup job run containing this snapshot. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Number of bytes to transfer in order to restore to this snapshot, which - // in this case is the same as the snapshot size. - SnapshotSize *int64 `json:"snapshotSize,omitempty"` -} - -// Validate validates this check restore app task result log snapshot info -func (m *CheckRestoreAppTaskResultLogSnapshotInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this check restore app task result log snapshot info based on context it is used -func (m *CheckRestoreAppTaskResultLogSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultLogSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CheckRestoreAppTaskResultLogSnapshotInfo) UnmarshalBinary(b []byte) error { - var res CheckRestoreAppTaskResultLogSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cifs_share_info.go b/v1/models/cifs_share_info.go deleted file mode 100644 index 0109cd7e..00000000 --- a/v1/models/cifs_share_info.go +++ /dev/null @@ -1,68 +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" -) - -// CifsShareInfo CIFS Share Information. -// -// Specifies information about a CIFS share of a NetApp volume. -// -// swagger:model CifsShareInfo -type CifsShareInfo struct { - - // Array of Access Control Lists. - // - // Specifies the ACLs for this share. - Acls []string `json:"acls"` - - // Specifies the name of the CIFS share. - // This can be different from the volume name that this share belongs to. - // A single volume can export multiple CIFS shares, - // each with unique settings such as permissions. - Name *string `json:"name,omitempty"` - - // Specifies the path of this share under the Vserver's root. - Path *string `json:"path,omitempty"` - - // Specifies the CIFS server name (such as 'NETAPP-01') specified by the - // system administrator. - // This name is searchable within the active directory domain. - ServerName *string `json:"serverName,omitempty"` -} - -// Validate validates this cifs share info -func (m *CifsShareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cifs share info based on context it is used -func (m *CifsShareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CifsShareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CifsShareInfo) UnmarshalBinary(b []byte) error { - var res CifsShareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/classification_info.go b/v1/models/classification_info.go deleted file mode 100644 index 819c6324..00000000 --- a/v1/models/classification_info.go +++ /dev/null @@ -1,60 +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" -) - -// ClassificationInfo ClassificationInfo holds information about the Datahawk Classification -// subscription such as if it is active or not. -// -// swagger:model ClassificationInfo -type ClassificationInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the Datahawk Classification subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this classification info -func (m *ClassificationInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this classification info based on context it is used -func (m *ClassificationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClassificationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClassificationInfo) UnmarshalBinary(b []byte) error { - var res ClassificationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clear_nlm_locks_parameters.go b/v1/models/clear_nlm_locks_parameters.go deleted file mode 100644 index 686fe370..00000000 --- a/v1/models/clear_nlm_locks_parameters.go +++ /dev/null @@ -1,61 +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" -) - -// ClearNlmLocksParameters Clear NLM Locks Parameters. -// -// Specifies parameters required to force clear NLM Locks. -// -// swagger:model ClearNlmLocksParameters -type ClearNlmLocksParameters struct { - - // Specifies the id of the client, related NLM locks needs to be clear. - ClientID *string `json:"clientId,omitempty"` - - // Specifies the filepath in the view relative to the root filesystem. - // If this field is specified, viewName field must also be specified. - FilePath *string `json:"filePath,omitempty"` - - // Specifies the name of the View in which to search. If a view name is not - // specified, all the views in the Cluster is searched. - // This field is mandatory if filePath field is specified. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this clear nlm locks parameters -func (m *ClearNlmLocksParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clear nlm locks parameters based on context it is used -func (m *ClearNlmLocksParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClearNlmLocksParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClearNlmLocksParameters) UnmarshalBinary(b []byte) error { - var res ClearNlmLocksParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/client_subnet_whitelist.go b/v1/models/client_subnet_whitelist.go deleted file mode 100644 index fe1c6cfe..00000000 --- a/v1/models/client_subnet_whitelist.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClientSubnetWhitelist ClientSubnetWhitelist is the struct containing the external client subnets -// that can communicate with this cluster. -// -// swagger:model ClientSubnetWhitelist -type ClientSubnetWhitelist struct { - - // ClientSubnetWhitelist is the list of client subnets. - ClientSubnetWhitelist []*PrivateSubnet `json:"clientSubnetWhitelist"` -} - -// Validate validates this client subnet whitelist -func (m *ClientSubnetWhitelist) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClientSubnetWhitelist) validateClientSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - continue - } - - if m.ClientSubnetWhitelist[i] != nil { - if err := m.ClientSubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this client subnet whitelist based on the context it is used -func (m *ClientSubnetWhitelist) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClientSubnetWhitelist) contextValidateClientSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - - if m.ClientSubnetWhitelist[i] != nil { - - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClientSubnetWhitelist) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClientSubnetWhitelist) UnmarshalBinary(b []byte) error { - var res ClientSubnetWhitelist - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_app_view_info_oracle.go b/v1/models/clone_app_view_info_oracle.go deleted file mode 100644 index 2441576d..00000000 --- a/v1/models/clone_app_view_info_oracle.go +++ /dev/null @@ -1,51 +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" -) - -// CloneAppViewInfoOracle This message encapsulates backup view Clone operation information of a -// Oracle DB. -// -// swagger:model CloneAppViewInfoOracle -type CloneAppViewInfoOracle struct { - - // mount path info vec - MountPathInfoVec []string `json:"mountPathInfoVec"` -} - -// Validate validates this clone app view info oracle -func (m *CloneAppViewInfoOracle) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clone app view info oracle based on context it is used -func (m *CloneAppViewInfoOracle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneAppViewInfoOracle) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneAppViewInfoOracle) UnmarshalBinary(b []byte) error { - var res CloneAppViewInfoOracle - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_app_view_info_proto.go b/v1/models/clone_app_view_info_proto.go deleted file mode 100644 index 364a600a..00000000 --- a/v1/models/clone_app_view_info_proto.go +++ /dev/null @@ -1,110 +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" -) - -// CloneAppViewInfoProto This message encapsulates the information of Clone operation of backup view -// of an App. -// -// swagger:model CloneAppViewInfoProto -type CloneAppViewInfoProto struct { - - // oracle app view restore info - OracleAppViewRestoreInfo *CloneAppViewInfoOracle `json:"oracleAppViewRestoreInfo,omitempty"` -} - -// Validate validates this clone app view info proto -func (m *CloneAppViewInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOracleAppViewRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneAppViewInfoProto) validateOracleAppViewRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OracleAppViewRestoreInfo) { // not required - return nil - } - - if m.OracleAppViewRestoreInfo != nil { - if err := m.OracleAppViewRestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleAppViewRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleAppViewRestoreInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone app view info proto based on the context it is used -func (m *CloneAppViewInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleAppViewRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneAppViewInfoProto) contextValidateOracleAppViewRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleAppViewRestoreInfo != nil { - - if swag.IsZero(m.OracleAppViewRestoreInfo) { // not required - return nil - } - - if err := m.OracleAppViewRestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleAppViewRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleAppViewRestoreInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneAppViewInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneAppViewInfoProto) UnmarshalBinary(b []byte) error { - var res CloneAppViewInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_app_view_params.go b/v1/models/clone_app_view_params.go deleted file mode 100644 index c9c1c59c..00000000 --- a/v1/models/clone_app_view_params.go +++ /dev/null @@ -1,56 +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" -) - -// CloneAppViewParams This message encapsulates the generic information required for cloning and -// App view. -// -// swagger:model CloneAppViewParams -type CloneAppViewParams struct { - - // Mount path identifier, which identifies the sub-dir where the cohesity - // view for App recovery will be mounted. - MountPathIdentifier *string `json:"mountPathIdentifier,omitempty"` - - // Read only view expose param, if this is set, the expose view will be - // mounted with read only. - ReadOnlyViewExpose *bool `json:"readOnlyViewExpose,omitempty"` -} - -// Validate validates this clone app view params -func (m *CloneAppViewParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clone app view params based on context it is used -func (m *CloneAppViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneAppViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneAppViewParams) UnmarshalBinary(b []byte) error { - var res CloneAppViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_arg.go b/v1/models/clone_arg.go deleted file mode 100644 index 4c05d479..00000000 --- a/v1/models/clone_arg.go +++ /dev/null @@ -1,836 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloneArg CloneArg represents the argument for clone VM operations. -// -// swagger:model CloneArg -type CloneArg struct { - - // Type of restore to perform. - Action *int32 `json:"action,omitempty"` - - // ContinueRestoreOnError specifies whether to continue with the clone - // operation if clone of any object fails. - ContinueRestoreOnError *bool `json:"continueRestoreOnError,omitempty"` - - // Parameters to deploy VMs to cloud. Only populate this if deploying VMs - // to cloud. - DeployVmsToCloudParams *DeployVMsToCloudParams `json:"deployVmsToCloudParams,omitempty"` - - // Defines the HyperV specific params for restore tasks. - HypervParams *RestoreHyperVVMParams `json:"hypervParams,omitempty"` - - // Name is the name of the clone task. This field has to be set, and it needs - // to be unique across all clone tasks using the specified view name. - Name *string `json:"name,omitempty"` - - // Objects is the list of objects to clone. - Objects []*RestoreObject `json:"objects"` - - // PowerStateConfig is the power state configuration to be applied to the - // restored object. - // - // By default, objects are cloned in the powered off state. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // PreserveTags specifies whether or not to preserve tags during the - // operations. This is used for VMware and HyperV. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // RenameRestoredObjectParam can be used to specify the transformation - // ( i.e prefix/suffix) to be applied to the source object name to derive the - // new name of the cloned object. - // - // By default, objects are cloned with their original name. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // Specifies the name transformation to be applied to the vApp during restore. - RenameRestoredVappParams *RenameObjectParamProto `json:"renameRestoredVappParams,omitempty"` - - // ResourcePoolEntity is the resource pool entity where the cloned objects - // will be attached. This field is mandatory. - ResourcePoolEntity *PrivateEntityProto `json:"resourcePoolEntity,omitempty"` - - // RestoreParentSource is the optional registered parent source to which - // objects are to be cloned. If not specified, objects are cloned back to - // the original source that was managing the objects. - RestoreParentSource *PrivateEntityProto `json:"restoreParentSource,omitempty"` - - // Vlan Params associated with the restore. - // If this is not specified, then the VLAN settings will be automatically - // selected from one of the following options: - // a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be - // automatically based on the client's (e.g. ESXI host) IP address. - // b. If VLANs are not configured on Cohesity, then the partition hostname or - // VIPs will be used for restores. - RestoreVlanParams *VlanParams `json:"restoreVlanParams,omitempty"` - - // RestoredObjectsNetworkConfig is the network configuration to be applied to - // the cloned object. - // - // By default, objects are cloned with network detached/disabled. This field - // can be used to specify the network configuration if user wants to attach - // network. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Specifies whether to skip image deploy or not. - // This flag can be set to true to just create the image and not deploy the - // VM. This flag is applicable for restore type kConvertAndDeployVMs. - // This flag is set to true during the DR operation that is invoked via - // runbooks, the creation of image(AMI in case of AWS) and snapshots of the - // data disk is achieved by invoking a restore of type kConvertAndDeployVMs - // and orchestration of the VMs is achieved by runbooks. - SkipImageDeploy *bool `json:"skipImageDeploy,omitempty"` - - // Specifies whether to skip Rigel in case of restore or not. - SkipRigelForRestore *bool `json:"skipRigelForRestore,omitempty"` - - // Specifies the way data needs to be retrieved/restored from the vault. - VaultRestoreParams *VaultParamsRestoreParams `json:"vaultRestoreParams,omitempty"` - - // Specifies the Vcd config info parameter for restore tasks. - VcdConfigParams *RestoredObjectVCDConfigProto `json:"vcdConfigParams,omitempty"` - - // ViewName is the target view into which the objects are to be cloned. - ViewName *string `json:"viewName,omitempty"` - - // ViewParams are the parameters to clone a view. - ViewParams *CloneViewRequest `json:"viewParams,omitempty"` - - // Defines special VMWare specific params that are not provided at top level. - VmwareParams *RestoreVMwareVMParams `json:"vmwareParams,omitempty"` -} - -// Validate validates this clone arg -func (m *CloneArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredVappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfigParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneArg) validateDeployVmsToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if m.DeployVmsToCloudParams != nil { - if err := m.DeployVmsToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneArg) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateRenameRestoredVappParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if m.RenameRestoredVappParams != nil { - if err := m.RenameRestoredVappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateRestoreVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if m.RestoreVlanParams != nil { - if err := m.RestoreVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateVaultRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if m.VaultRestoreParams != nil { - if err := m.VaultRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateVcdConfigParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if m.VcdConfigParams != nil { - if err := m.VcdConfigParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone arg based on the context it is used -func (m *CloneArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredVappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaultRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfigParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneArg) contextValidateDeployVmsToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudParams != nil { - - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if err := m.DeployVmsToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneArg) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateRenameRestoredVappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredVappParams != nil { - - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if err := m.RenameRestoredVappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateRestoreVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVlanParams != nil { - - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if err := m.RestoreVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateVaultRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VaultRestoreParams != nil { - - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if err := m.VaultRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateVcdConfigParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfigParams != nil { - - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if err := m.VcdConfigParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CloneArg) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneArg) UnmarshalBinary(b []byte) error { - var res CloneArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_directory_params.go b/v1/models/clone_directory_params.go deleted file mode 100644 index 0c4dcf41..00000000 --- a/v1/models/clone_directory_params.go +++ /dev/null @@ -1,59 +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" -) - -// CloneDirectoryParams Clone Directory Request Params. -// -// Specifies the params that have to be provided to clone a directory. -// -// swagger:model CloneDirectoryParams -type CloneDirectoryParams struct { - - // Name of the new directory which will contain the clone contents. - DestinationDirectoryName *string `json:"destinationDirectoryName,omitempty"` - - // Specifies the path of the destination parent directory. The source dir - // would be cloned as a child of destination parent dir. - DestinationParentDirectoryPath *string `json:"destinationParentDirectoryPath,omitempty"` - - // Specifies the path of the source directory - SourceDirectoryPath *string `json:"sourceDirectoryPath,omitempty"` -} - -// Validate validates this clone directory params -func (m *CloneDirectoryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clone directory params based on context it is used -func (m *CloneDirectoryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneDirectoryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneDirectoryParams) UnmarshalBinary(b []byte) error { - var res CloneDirectoryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_refresh_request.go b/v1/models/clone_refresh_request.go deleted file mode 100644 index 8e3c1d21..00000000 --- a/v1/models/clone_refresh_request.go +++ /dev/null @@ -1,226 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloneRefreshRequest Clone Refresh Request Parameters. -// -// Specifies the settings for creating a new clone refresh task. -// -// swagger:model CloneRefreshRequest -type CloneRefreshRequest struct { - - // Specifies the ID of the clone task. This is required to determine the - // details of the clone to be refreshed as clone task contains the details - // of the clone. - CloneTaskID *int64 `json:"cloneTaskId,omitempty"` - - // Specifies if the Restore Task should continue when some operations on some - // objects fail. If true, the Cohesity Cluster ignores intermittent - // errors and restores as many objects as possible. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the name of the Restore Task. This field must be set and - // must be a unique name. - // Required: true - Name *string `json:"name"` - - // Specify a new registered parent Protection Source. If specified - // the selected objects are cloned or recovered to this new Protection - // Source. If not specified, objects are cloned or recovered - // to the original Protection Source that was managing them. - NewParentID *int64 `json:"newParentId,omitempty"` - - // Array of Objects. - // - // Specifies a list of Protection Source objects or Protection Job objects - // (with specified Protection Source objects). - Objects []*RestoreObjectDetails `json:"objects"` - - // Specifies a point in time (unix epoch) to which the database needs to be - // refreshed. This helps granular refresh of the database. - // If this is set, relevant archive logs (redo logs) will also be re-played - // to match with the specified time. For this, the log backup should be - // enabled in the backup policy. - // If this is not set, then only the incremental backup data will be used to - // refresh the target database. - RefreshTimeSecs *int64 `json:"refreshTimeSecs,omitempty"` - - // Specifies the ID of the source database in the backup job snapshot. This - // is the entity ID of the database, which needs to be used as a source - // during the refresh process. - SourceDatabaseID *int64 `json:"sourceDatabaseId,omitempty"` - - // Specifies VLAN parameters for the restore operation. - VlanParameters *VlanParameters `json:"vlanParameters,omitempty"` -} - -// Validate validates this clone refresh request -func (m *CloneRefreshRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneRefreshRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CloneRefreshRequest) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneRefreshRequest) validateVlanParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if m.VlanParameters != nil { - if err := m.VlanParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone refresh request based on the context it is used -func (m *CloneRefreshRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneRefreshRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneRefreshRequest) contextValidateVlanParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParameters != nil { - - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if err := m.VlanParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneRefreshRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneRefreshRequest) UnmarshalBinary(b []byte) error { - var res CloneRefreshRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_task_info.go b/v1/models/clone_task_info.go deleted file mode 100644 index 1ce3294f..00000000 --- a/v1/models/clone_task_info.go +++ /dev/null @@ -1,55 +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" -) - -// CloneTaskInfo Clone Task Information. -// -// Parameters for a clone op. -// -// swagger:model CloneTaskInfo -type CloneTaskInfo struct { - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this clone task info -func (m *CloneTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clone task info based on context it is used -func (m *CloneTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneTaskInfo) UnmarshalBinary(b []byte) error { - var res CloneTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_task_request.go b/v1/models/clone_task_request.go deleted file mode 100644 index 3afc5564..00000000 --- a/v1/models/clone_task_request.go +++ /dev/null @@ -1,487 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloneTaskRequest Clone Restore Task Request. -// -// Specifies the settings for a Restore Task that clones VMs or Views. -// -// swagger:model CloneTaskRequest -type CloneTaskRequest struct { - - // clone view parameters - CloneViewParameters *CloneTaskRequestCloneViewParameters `json:"cloneViewParameters,omitempty"` - - // Specifies if the Restore Task should continue when some operations on some - // objects fail. If true, the Cohesity Cluster ignores intermittent - // errors and restores as many objects as possible. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the way data needs to be retrieved from the external target. - // This information will be filled in by Iris and Magneto will pass it along - // to the Icebox as it is to support bulk retrieval from Glacier. - // Specifies the type of Restore Task. - // - // 'kStandard' specifies retrievals that allow to access any of your archives - // within several hours. Standard retrievals typically complete within 3–5 - // hours. This is the default option for retrieval requests that do not specify - // the retrieval option. - // 'kBulk' specifies retrievals that are Glacier’s lowest-cost retrieval - // option, which can be used to retrieve large amounts, even petabytes, of data - // inexpensively in a day. Bulk retrieval typically complete within 5–12 hours. - // 'kExpedited' specifies retrievals that allows to quickly access your data - // when occasional urgent requests for a subset of archives are required. For - // all but the largest archives (250 MB+), data accessed using Expedited - // retrievals are typically made available within 1–5 minutes. - // Enum: ["kStandard","kBulk","kExpedited"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` - - // Specifies additional parameters for 'kHyperV' restore objects. - HypervParameters *HypervCloneParameters `json:"hypervParameters,omitempty"` - - // Specifies the name of the Restore Task. This field must be set and - // must be a unique name. - // Required: true - Name *string `json:"name"` - - // Specify a new registered parent Protection Source. If specified - // the selected objects are cloned or recovered to this new Protection - // Source. If not specified, objects are cloned or recovered - // to the original Protection Source that was managing them. - NewParentID *int64 `json:"newParentId,omitempty"` - - // Array of Objects. - // - // Specifies a list of Protection Source objects or Protection Job objects - // (with specified Protection Source objects). - Objects []*RestoreObjectDetails `json:"objects"` - - // Specifies the name of the View where the cloned VMs are stored. - // This field is required for a 'kCloneVMs' Restore Task. - TargetViewName *string `json:"targetViewName,omitempty"` - - // Specifies the type of Restore Task such as 'kCloneVMs' or 'kCloneView'. - // 'kCloneVMs' specifies a Restore Task that clones VMs. - // 'kCloneView' specifies a Restore Task that clones a View. - // Required: true - // Enum: ["kCloneVMs","kCloneView"] - Type *string `json:"type"` - - // Specifies VLAN parameters for the restore operation. - VlanParameters *VlanParameters `json:"vlanParameters,omitempty"` - - // Specifies additional parameters for 'kVmware' restore objects. - VmwareParameters *VmwareCloneParameters `json:"vmwareParameters,omitempty"` -} - -// Validate validates this clone task request -func (m *CloneTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloneViewParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneTaskRequest) validateCloneViewParameters(formats strfmt.Registry) error { - if swag.IsZero(m.CloneViewParameters) { // not required - 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 -} - -var cloneTaskRequestTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kBulk","kExpedited"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloneTaskRequestTypeGlacierRetrievalTypePropEnum = append(cloneTaskRequestTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // CloneTaskRequestGlacierRetrievalTypeKStandard captures enum value "kStandard" - CloneTaskRequestGlacierRetrievalTypeKStandard string = "kStandard" - - // CloneTaskRequestGlacierRetrievalTypeKBulk captures enum value "kBulk" - CloneTaskRequestGlacierRetrievalTypeKBulk string = "kBulk" - - // CloneTaskRequestGlacierRetrievalTypeKExpedited captures enum value "kExpedited" - CloneTaskRequestGlacierRetrievalTypeKExpedited string = "kExpedited" -) - -// prop value enum -func (m *CloneTaskRequest) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloneTaskRequestTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloneTaskRequest) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -func (m *CloneTaskRequest) validateHypervParameters(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if m.HypervParameters != nil { - if err := m.HypervParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *CloneTaskRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CloneTaskRequest) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var cloneTaskRequestTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCloneVMs","kCloneView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloneTaskRequestTypeTypePropEnum = append(cloneTaskRequestTypeTypePropEnum, v) - } -} - -const ( - - // CloneTaskRequestTypeKCloneVMs captures enum value "kCloneVMs" - CloneTaskRequestTypeKCloneVMs string = "kCloneVMs" - - // CloneTaskRequestTypeKCloneView captures enum value "kCloneView" - CloneTaskRequestTypeKCloneView string = "kCloneView" -) - -// prop value enum -func (m *CloneTaskRequest) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloneTaskRequestTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloneTaskRequest) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *CloneTaskRequest) validateVlanParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if m.VlanParameters != nil { - if err := m.VlanParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *CloneTaskRequest) validateVmwareParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if m.VmwareParameters != nil { - if err := m.VmwareParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone task request based on the context it is used -func (m *CloneTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloneViewParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *CloneTaskRequest) contextValidateHypervParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParameters != nil { - - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if err := m.HypervParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *CloneTaskRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneTaskRequest) contextValidateVlanParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParameters != nil { - - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if err := m.VlanParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *CloneTaskRequest) contextValidateVmwareParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParameters != nil { - - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if err := m.VmwareParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneTaskRequest) UnmarshalBinary(b []byte) error { - var res CloneTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index db40c758..00000000 --- a/v1/models/clone_view_request.go +++ /dev/null @@ -1,1048 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloneViewRequest Clone View Request. -// -// Specifies the settings for cloning an existing View. -// -// swagger:model CloneViewRequest -type CloneViewRequest struct { - - // Array of Security Identifiers (SIDs) - // - // Specifies the list of security identifiers (SIDs) for the restricted - // Principals who have access to this View. - AccessSids []string `json:"accessSids"` - - // Specifies the antivirus scan config settings for this View. - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - // Specifies the name of the new View that is cloned from the source View. - CloneViewName *string `json:"cloneViewName,omitempty"` - - // DataLock (Write Once Read Many) lock expiry epoch time in microseconds. If - // specified, a view will be marked as a DataLock view. If a view is marked - // as a DataLock view, only a Data Security Officer (a user having Data - // Security Privilege) can delete the view until the lock expiry time. - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - // Specifies an optional text description about the View. - Description *string `json:"description,omitempty"` - - // Specifies whether fast durable handle is enabled. If enabled, view open - // handle will be kept in memory, which results in a higher performance. But - // the handles cannot be recovered if node or service crashes. - EnableFastDurableHandle *bool `json:"enableFastDurableHandle,omitempty"` - - // Specifies if Filer Audit Logging is enabled for this view. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Specifies whether to enable live indexing for the view. - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - // Specifies whether view is blur enabled. - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - // If set, mixed mode (NFS and SMB) access is enabled for this view. - // This field is deprecated. Use the field SecurityMode. - // deprecated: true - EnableMixedModePermissions *bool `json:"enableMixedModePermissions,omitempty"` - - // If set, it enables discovery of view for NFS. - EnableNfsViewDiscovery *bool `json:"enableNfsViewDiscovery,omitempty"` - - // Specifies whether to enable offline file caching of the view. - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - // Specifies if access-based enumeration should be enabled. - // If 'true', only files and folders that the user has permissions to - // access are visible on the SMB share for that user. - EnableSmbAccessBasedEnumeration *bool `json:"enableSmbAccessBasedEnumeration,omitempty"` - - // Specifies the SMB encryption for the View. If set, it enables the SMB - // encryption for the View. Encryption is supported only by SMB 3.x dialects. - // Dialects that do not support would still access data in unencrypted - // format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // Specifies whether SMB opportunistic lock is enabled. - EnableSmbOplock *bool `json:"enableSmbOplock,omitempty"` - - // If set, it enables discovery of view for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View. - // If set, encryption is enforced for all the sessions for the View. When - // enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Optional filtering criteria that should be satisfied by all the files - // created in this view. It does not affect existing files. - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - // Optional config that enables file locking for this view. It cannot be - // disabled during the edit of a view, if it has been enabled during the - // creation of the view. Also, it cannot be enabled if it was disabled - // during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies whether view is for externally triggered backup target. - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - // Specifies if the view is a read only view. User will no longer be able to - // write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // logical quota - LogicalQuota *CloneViewRequestLogicalQuota `json:"logicalQuota,omitempty"` - - // Array of Netgroups. - // - // Specifies a list of Netgroups that have permissions to access the - // View. (Overrides the Netgroups specified at the global Cohesity - // Cluster level.) - NetgroupWhitelist []*NisNetgroup `json:"netgroupWhitelist"` - - // Specifies the NFS all squash config. - NfsAllSquash *NfsSquash `json:"nfsAllSquash,omitempty"` - - // Specifies the NFS root permission config of the view file system. - NfsRootPermissions *NfsRootPermissions `json:"nfsRootPermissions,omitempty"` - - // Specifies the NFS root squash config. - NfsRootSquash *NfsSquash `json:"nfsRootSquash,omitempty"` - - // Specifies whether view level client netgroup allowlist overrides cluster - // and global setting. - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - // Specifies whether view level client subnet allowlist overrides cluster and - // global setting. - OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - - // 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. - // 'kS3Only' enables protocol access to S3 only. - // 'kSwiftOnly' enables protocol access to Swift only. - // 'kUnknown' indicates that the protocol access of a view does not match - // any of the above. In this case, the constant is used as 'catch-all'. - // Enum: ["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"] - ProtocolAccess *string `json:"protocolAccess,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies the security mode used for this view. - // Currently we support the following modes: Native, Unified and NTFS style. - // 'kNativeMode' indicates a native security mode. - // 'kUnifiedMode' indicates a unified security mode. - // 'kNtfsMode' indicates a NTFS style security mode. - // Enum: ["kNativeMode","kUnifiedMode","kNtfsMode"] - SecurityMode *string `json:"securityMode,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies the SMB permissions for the View. - SmbPermissionsInfo *SmbPermissionsInfo `json:"smbPermissionsInfo,omitempty"` - - // Specifies the name of the source View that will be cloned. - SourceViewName *string `json:"sourceViewName,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from - // the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // Array of Subnets. - // - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View. (Overrides the Subnets specified at the global - // Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this view. - SuperUserSids []string `json:"superUserSids"` - - // Specifies the Keystone project domain. - SwiftProjectDomain *string `json:"swiftProjectDomain,omitempty"` - - // Specifies the Keystone project name. - SwiftProjectName *string `json:"swiftProjectName,omitempty"` - - // Optional tenant id who has access to this View. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether view lock is enabled. If enabled the view cannot be - // modified or deleted until unlock. By default it is disabled. - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - // Specifies the pinning config of this view. - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` -} - -// Validate validates this clone view request -func (m *CloneViewRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusScanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileExtensionFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsAllSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootPermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPermissionsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPinningConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneViewRequest) validateAntivirusScanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if m.AntivirusScanConfig != nil { - if err := m.AntivirusScanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateFileExtensionFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if m.FileExtensionFilter != nil { - if err := m.FileExtensionFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateLogicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalQuota) { // not required - 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 -} - -func (m *CloneViewRequest) validateNetgroupWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - continue - } - - if m.NetgroupWhitelist[i] != nil { - if err := m.NetgroupWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) validateNfsAllSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if m.NfsAllSquash != nil { - if err := m.NfsAllSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateNfsRootPermissions(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if m.NfsRootPermissions != nil { - if err := m.NfsRootPermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateNfsRootSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if m.NfsRootSquash != nil { - if err := m.NfsRootSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -var cloneViewRequestTypeProtocolAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloneViewRequestTypeProtocolAccessPropEnum = append(cloneViewRequestTypeProtocolAccessPropEnum, v) - } -} - -const ( - - // CloneViewRequestProtocolAccessKAll captures enum value "kAll" - CloneViewRequestProtocolAccessKAll string = "kAll" - - // CloneViewRequestProtocolAccessKNFSOnly captures enum value "kNFSOnly" - CloneViewRequestProtocolAccessKNFSOnly string = "kNFSOnly" - - // CloneViewRequestProtocolAccessKSMBOnly captures enum value "kSMBOnly" - CloneViewRequestProtocolAccessKSMBOnly string = "kSMBOnly" - - // CloneViewRequestProtocolAccessKS3Only captures enum value "kS3Only" - CloneViewRequestProtocolAccessKS3Only string = "kS3Only" - - // CloneViewRequestProtocolAccessKSwiftOnly captures enum value "kSwiftOnly" - CloneViewRequestProtocolAccessKSwiftOnly string = "kSwiftOnly" - - // CloneViewRequestProtocolAccessKUnknown captures enum value "kUnknown" - CloneViewRequestProtocolAccessKUnknown string = "kUnknown" -) - -// prop value enum -func (m *CloneViewRequest) validateProtocolAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloneViewRequestTypeProtocolAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloneViewRequest) validateProtocolAccess(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - // value enum - if err := m.validateProtocolAccessEnum("protocolAccess", "body", *m.ProtocolAccess); err != nil { - return err - } - - return nil -} - -func (m *CloneViewRequest) validateQos(formats strfmt.Registry) error { - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -var cloneViewRequestTypeSecurityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNativeMode","kUnifiedMode","kNtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloneViewRequestTypeSecurityModePropEnum = append(cloneViewRequestTypeSecurityModePropEnum, v) - } -} - -const ( - - // CloneViewRequestSecurityModeKNativeMode captures enum value "kNativeMode" - CloneViewRequestSecurityModeKNativeMode string = "kNativeMode" - - // CloneViewRequestSecurityModeKUnifiedMode captures enum value "kUnifiedMode" - CloneViewRequestSecurityModeKUnifiedMode string = "kUnifiedMode" - - // CloneViewRequestSecurityModeKNtfsMode captures enum value "kNtfsMode" - CloneViewRequestSecurityModeKNtfsMode string = "kNtfsMode" -) - -// prop value enum -func (m *CloneViewRequest) validateSecurityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloneViewRequestTypeSecurityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloneViewRequest) validateSecurityMode(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityMode) { // not required - return nil - } - - // value enum - if err := m.validateSecurityModeEnum("securityMode", "body", *m.SecurityMode); err != nil { - return err - } - - return nil -} - -func (m *CloneViewRequest) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) validateSmbPermissionsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if m.SmbPermissionsInfo != nil { - if err := m.SmbPermissionsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) validateViewPinningConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if m.ViewPinningConfig != nil { - if err := m.ViewPinningConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - 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 - - if err := m.contextValidateAntivirusScanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileExtensionFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsAllSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootPermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPermissionsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewPinningConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneViewRequest) contextValidateAntivirusScanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AntivirusScanConfig != nil { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if err := m.AntivirusScanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateFileExtensionFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileExtensionFilter != nil { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if err := m.FileExtensionFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -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 -} - -func (m *CloneViewRequest) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - - if m.NetgroupWhitelist[i] != nil { - - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - return nil - } - - if err := m.NetgroupWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) contextValidateNfsAllSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsAllSquash != nil { - - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if err := m.NfsAllSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateNfsRootPermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootPermissions != nil { - - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if err := m.NfsRootPermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateNfsRootSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootSquash != nil { - - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if err := m.NfsRootSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) contextValidateSmbPermissionsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbPermissionsInfo != nil { - - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if err := m.SmbPermissionsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *CloneViewRequest) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewRequest) contextValidateViewPinningConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewPinningConfig != nil { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if err := m.ViewPinningConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneViewRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneViewRequest) UnmarshalBinary(b []byte) error { - var res CloneViewRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return 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/close_smb_file_open_parameters.go b/v1/models/close_smb_file_open_parameters.go deleted file mode 100644 index 41523999..00000000 --- a/v1/models/close_smb_file_open_parameters.go +++ /dev/null @@ -1,61 +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" -) - -// CloseSmbFileOpenParameters Close SMB File Open Parameters. -// -// Specifies parameters required to force close an active SMB file open. -// -// swagger:model CloseSmbFileOpenParameters -type CloseSmbFileOpenParameters struct { - - // Specifies the filepath in the view relative to the root filesystem. - // If this field is specified, viewName field must also be specified. - FilePath *string `json:"filePath,omitempty"` - - // Specifies the id of the active open. - OpenID *int64 `json:"openId,omitempty"` - - // Specifies the name of the View in which to search. If a view name is not - // specified, all the views in the Cluster is searched. - // This field is mandatory if filePath field is specified. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this close smb file open parameters -func (m *CloseSmbFileOpenParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this close smb file open parameters based on context it is used -func (m *CloseSmbFileOpenParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloseSmbFileOpenParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloseSmbFileOpenParameters) UnmarshalBinary(b []byte) error { - var res CloseSmbFileOpenParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_archival_direct_config.go b/v1/models/cloud_archival_direct_config.go deleted file mode 100644 index 567c2d2a..00000000 --- a/v1/models/cloud_archival_direct_config.go +++ /dev/null @@ -1,114 +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" -) - -// CloudArchivalDirectConfig CloudArchivalDirectConfig specifies the properties of vaults used to perform -// Cloud Archive Direct (CAD) -// -// swagger:model CloudArchivalDirectConfig -type CloudArchivalDirectConfig struct { - - // Specifies a namespace under the bucket used for archival. - BucketNamesapce *string `json:"bucketNamesapce,omitempty"` - - // Specifies quota limit in bytes for physical usage associated with - // this vault during the first CAD job. - PhysicalQuota *QuotaPolicy `json:"physicalQuota,omitempty"` -} - -// Validate validates this cloud archival direct config -func (m *CloudArchivalDirectConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePhysicalQuota(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudArchivalDirectConfig) validatePhysicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalQuota) { // not required - 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 -} - -// ContextValidate validate this cloud archival direct config based on the context it is used -func (m *CloudArchivalDirectConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePhysicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudArchivalDirectConfig) 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 -} - -// MarshalBinary interface implementation -func (m *CloudArchivalDirectConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudArchivalDirectConfig) UnmarshalBinary(b []byte) error { - var res CloudArchivalDirectConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_archival_info.go b/v1/models/cloud_archival_info.go deleted file mode 100644 index 6871e54a..00000000 --- a/v1/models/cloud_archival_info.go +++ /dev/null @@ -1,293 +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" -) - -// CloudArchivalInfo Cloud Archival Info. -// -// Specifies the cloud archival for active and finished tasks. -// -// swagger:model CloudArchivalInfo -type CloudArchivalInfo struct { - - // Specifies if the task if active or finished. - IsActiveTask *bool `json:"isActiveTask,omitempty"` - - // Specifies the public status type. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - PublicStatus *string `json:"publicStatus,omitempty"` - - // Specifies the status type. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` - - // Specifies the id of Archival Vault assigned by the Cohesity Cluster. - VaultID *int64 `json:"vaultId,omitempty"` - - // Name of the Archival Vault. - VaultName *string `json:"vaultName,omitempty"` - - // Specifies the type of the Archival External Target such as 'kCloud', - // 'kTape' or 'kNas'. - // 'kCloud' indicates the archival location as Cloud. - // 'kTape' indicates the archival location as Tape. - // 'kNas' indicates the archival location as Network Attached Storage (Nas). - // Enum: ["kCloud","kTape","kNas"] - VaultType *string `json:"vaultType,omitempty"` -} - -// Validate validates this cloud archival info -func (m *CloudArchivalInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePublicStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cloudArchivalInfoTypePublicStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudArchivalInfoTypePublicStatusPropEnum = append(cloudArchivalInfoTypePublicStatusPropEnum, v) - } -} - -const ( - - // CloudArchivalInfoPublicStatusKAccepted captures enum value "kAccepted" - CloudArchivalInfoPublicStatusKAccepted string = "kAccepted" - - // CloudArchivalInfoPublicStatusKRunning captures enum value "kRunning" - CloudArchivalInfoPublicStatusKRunning string = "kRunning" - - // CloudArchivalInfoPublicStatusKCanceling captures enum value "kCanceling" - CloudArchivalInfoPublicStatusKCanceling string = "kCanceling" - - // CloudArchivalInfoPublicStatusKCanceled captures enum value "kCanceled" - CloudArchivalInfoPublicStatusKCanceled string = "kCanceled" - - // CloudArchivalInfoPublicStatusKSuccess captures enum value "kSuccess" - CloudArchivalInfoPublicStatusKSuccess string = "kSuccess" - - // CloudArchivalInfoPublicStatusKFailure captures enum value "kFailure" - CloudArchivalInfoPublicStatusKFailure string = "kFailure" - - // CloudArchivalInfoPublicStatusKWarning captures enum value "kWarning" - CloudArchivalInfoPublicStatusKWarning string = "kWarning" - - // CloudArchivalInfoPublicStatusKOnHold captures enum value "kOnHold" - CloudArchivalInfoPublicStatusKOnHold string = "kOnHold" - - // CloudArchivalInfoPublicStatusKMissed captures enum value "kMissed" - CloudArchivalInfoPublicStatusKMissed string = "kMissed" - - // CloudArchivalInfoPublicStatusKFinalizing captures enum value "kFinalizing" - CloudArchivalInfoPublicStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *CloudArchivalInfo) validatePublicStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudArchivalInfoTypePublicStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudArchivalInfo) validatePublicStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PublicStatus) { // not required - return nil - } - - // value enum - if err := m.validatePublicStatusEnum("publicStatus", "body", *m.PublicStatus); err != nil { - return err - } - - return nil -} - -var cloudArchivalInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudArchivalInfoTypeStatusPropEnum = append(cloudArchivalInfoTypeStatusPropEnum, v) - } -} - -const ( - - // CloudArchivalInfoStatusKAccepted captures enum value "kAccepted" - CloudArchivalInfoStatusKAccepted string = "kAccepted" - - // CloudArchivalInfoStatusKRunning captures enum value "kRunning" - CloudArchivalInfoStatusKRunning string = "kRunning" - - // CloudArchivalInfoStatusKCanceling captures enum value "kCanceling" - CloudArchivalInfoStatusKCanceling string = "kCanceling" - - // CloudArchivalInfoStatusKCanceled captures enum value "kCanceled" - CloudArchivalInfoStatusKCanceled string = "kCanceled" - - // CloudArchivalInfoStatusKSuccess captures enum value "kSuccess" - CloudArchivalInfoStatusKSuccess string = "kSuccess" - - // CloudArchivalInfoStatusKFailure captures enum value "kFailure" - CloudArchivalInfoStatusKFailure string = "kFailure" - - // CloudArchivalInfoStatusKWarning captures enum value "kWarning" - CloudArchivalInfoStatusKWarning string = "kWarning" - - // CloudArchivalInfoStatusKOnHold captures enum value "kOnHold" - CloudArchivalInfoStatusKOnHold string = "kOnHold" - - // CloudArchivalInfoStatusKMissed captures enum value "kMissed" - CloudArchivalInfoStatusKMissed string = "kMissed" - - // CloudArchivalInfoStatusKFinalizing captures enum value "kFinalizing" - CloudArchivalInfoStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *CloudArchivalInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudArchivalInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudArchivalInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var cloudArchivalInfoTypeVaultTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCloud","kTape","kNas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudArchivalInfoTypeVaultTypePropEnum = append(cloudArchivalInfoTypeVaultTypePropEnum, v) - } -} - -const ( - - // CloudArchivalInfoVaultTypeKCloud captures enum value "kCloud" - CloudArchivalInfoVaultTypeKCloud string = "kCloud" - - // CloudArchivalInfoVaultTypeKTape captures enum value "kTape" - CloudArchivalInfoVaultTypeKTape string = "kTape" - - // CloudArchivalInfoVaultTypeKNas captures enum value "kNas" - CloudArchivalInfoVaultTypeKNas string = "kNas" -) - -// prop value enum -func (m *CloudArchivalInfo) validateVaultTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudArchivalInfoTypeVaultTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudArchivalInfo) validateVaultType(formats strfmt.Registry) error { - if swag.IsZero(m.VaultType) { // not required - return nil - } - - // value enum - if err := m.validateVaultTypeEnum("vaultType", "body", *m.VaultType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cloud archival info based on context it is used -func (m *CloudArchivalInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudArchivalInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudArchivalInfo) UnmarshalBinary(b []byte) error { - var res CloudArchivalInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_archive_run.go b/v1/models/cloud_archive_run.go deleted file mode 100644 index 43cc6cc2..00000000 --- a/v1/models/cloud_archive_run.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudArchiveRun Cloud Archive Run. -// -// Specifies the info about cloud archive run. -// -// swagger:model CloudArchiveRun -type CloudArchiveRun struct { - - // Specifies the archival info. - ArchivalInfo []*CloudArchivalInfo `json:"archivalInfo"` -} - -// Validate validates this cloud archive run -func (m *CloudArchiveRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudArchiveRun) validateArchivalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalInfo); i++ { - if swag.IsZero(m.ArchivalInfo[i]) { // not required - continue - } - - if m.ArchivalInfo[i] != nil { - if err := m.ArchivalInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud archive run based on the context it is used -func (m *CloudArchiveRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudArchiveRun) contextValidateArchivalInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalInfo); i++ { - - if m.ArchivalInfo[i] != nil { - - if swag.IsZero(m.ArchivalInfo[i]) { // not required - return nil - } - - if err := m.ArchivalInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudArchiveRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudArchiveRun) UnmarshalBinary(b []byte) error { - var res CloudArchiveRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_archive_summary.go b/v1/models/cloud_archive_summary.go deleted file mode 100644 index 662e826e..00000000 --- a/v1/models/cloud_archive_summary.go +++ /dev/null @@ -1,377 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloudArchiveSummary Data Transfer to Vault Summary. -// -// Specifies statistics about the transfer of data from this Cohesity -// Cluster to a Vault. -// -// swagger:model CloudArchiveSummary -type CloudArchiveSummary struct { - - // Specifies the id of the job. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the name of the Protection Job. - JobName *string `json:"jobName,omitempty"` - - // Specifies the type of the Protection Job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - JobType *string `json:"jobType,omitempty"` - - // Specifies the number of failed runs for a Protection Job. - NumberOfFailedRuns *int32 `json:"numberOfFailedRuns,omitempty"` - - // Specifies the number of queued runs for a Protection Job. - NumberOfQueuedRuns *int32 `json:"numberOfQueuedRuns,omitempty"` - - // Specifies the number of successful runs for a Protection Job. - NumberOfSuccessfulRuns *int32 `json:"numberOfSuccessfulRuns,omitempty"` - - // Specifies the list of cloud archive runs. - Runs []*CloudArchiveRun `json:"runs"` -} - -// Validate validates this cloud archive summary -func (m *CloudArchiveSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cloudArchiveSummaryTypeJobTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudArchiveSummaryTypeJobTypePropEnum = append(cloudArchiveSummaryTypeJobTypePropEnum, v) - } -} - -const ( - - // CloudArchiveSummaryJobTypeKVMware captures enum value "kVMware" - CloudArchiveSummaryJobTypeKVMware string = "kVMware" - - // CloudArchiveSummaryJobTypeKHyperV captures enum value "kHyperV" - CloudArchiveSummaryJobTypeKHyperV string = "kHyperV" - - // CloudArchiveSummaryJobTypeKSQL captures enum value "kSQL" - CloudArchiveSummaryJobTypeKSQL string = "kSQL" - - // CloudArchiveSummaryJobTypeKView captures enum value "kView" - CloudArchiveSummaryJobTypeKView string = "kView" - - // CloudArchiveSummaryJobTypeKPuppeteer captures enum value "kPuppeteer" - CloudArchiveSummaryJobTypeKPuppeteer string = "kPuppeteer" - - // CloudArchiveSummaryJobTypeKPhysical captures enum value "kPhysical" - CloudArchiveSummaryJobTypeKPhysical string = "kPhysical" - - // CloudArchiveSummaryJobTypeKPure captures enum value "kPure" - CloudArchiveSummaryJobTypeKPure string = "kPure" - - // CloudArchiveSummaryJobTypeKNimble captures enum value "kNimble" - CloudArchiveSummaryJobTypeKNimble string = "kNimble" - - // CloudArchiveSummaryJobTypeKIbmFlashSystem captures enum value "kIbmFlashSystem" - CloudArchiveSummaryJobTypeKIbmFlashSystem string = "kIbmFlashSystem" - - // CloudArchiveSummaryJobTypeKAzure captures enum value "kAzure" - CloudArchiveSummaryJobTypeKAzure string = "kAzure" - - // CloudArchiveSummaryJobTypeKNetapp captures enum value "kNetapp" - CloudArchiveSummaryJobTypeKNetapp string = "kNetapp" - - // CloudArchiveSummaryJobTypeKAgent captures enum value "kAgent" - CloudArchiveSummaryJobTypeKAgent string = "kAgent" - - // CloudArchiveSummaryJobTypeKGenericNas captures enum value "kGenericNas" - CloudArchiveSummaryJobTypeKGenericNas string = "kGenericNas" - - // CloudArchiveSummaryJobTypeKAcropolis captures enum value "kAcropolis" - CloudArchiveSummaryJobTypeKAcropolis string = "kAcropolis" - - // CloudArchiveSummaryJobTypeKPhysicalFiles captures enum value "kPhysicalFiles" - CloudArchiveSummaryJobTypeKPhysicalFiles string = "kPhysicalFiles" - - // CloudArchiveSummaryJobTypeKIsilon captures enum value "kIsilon" - CloudArchiveSummaryJobTypeKIsilon string = "kIsilon" - - // CloudArchiveSummaryJobTypeKGPFS captures enum value "kGPFS" - CloudArchiveSummaryJobTypeKGPFS string = "kGPFS" - - // CloudArchiveSummaryJobTypeKKVM captures enum value "kKVM" - CloudArchiveSummaryJobTypeKKVM string = "kKVM" - - // CloudArchiveSummaryJobTypeKAWS captures enum value "kAWS" - CloudArchiveSummaryJobTypeKAWS string = "kAWS" - - // CloudArchiveSummaryJobTypeKExchange captures enum value "kExchange" - CloudArchiveSummaryJobTypeKExchange string = "kExchange" - - // CloudArchiveSummaryJobTypeKHyperVVSS captures enum value "kHyperVVSS" - CloudArchiveSummaryJobTypeKHyperVVSS string = "kHyperVVSS" - - // CloudArchiveSummaryJobTypeKOracle captures enum value "kOracle" - CloudArchiveSummaryJobTypeKOracle string = "kOracle" - - // CloudArchiveSummaryJobTypeKGCP captures enum value "kGCP" - CloudArchiveSummaryJobTypeKGCP string = "kGCP" - - // CloudArchiveSummaryJobTypeKFlashBlade captures enum value "kFlashBlade" - CloudArchiveSummaryJobTypeKFlashBlade string = "kFlashBlade" - - // CloudArchiveSummaryJobTypeKAWSNative captures enum value "kAWSNative" - CloudArchiveSummaryJobTypeKAWSNative string = "kAWSNative" - - // CloudArchiveSummaryJobTypeKO365 captures enum value "kO365" - CloudArchiveSummaryJobTypeKO365 string = "kO365" - - // CloudArchiveSummaryJobTypeKO365Outlook captures enum value "kO365Outlook" - CloudArchiveSummaryJobTypeKO365Outlook string = "kO365Outlook" - - // CloudArchiveSummaryJobTypeKHyperFlex captures enum value "kHyperFlex" - CloudArchiveSummaryJobTypeKHyperFlex string = "kHyperFlex" - - // CloudArchiveSummaryJobTypeKGCPNative captures enum value "kGCPNative" - CloudArchiveSummaryJobTypeKGCPNative string = "kGCPNative" - - // CloudArchiveSummaryJobTypeKAzureNative captures enum value "kAzureNative" - CloudArchiveSummaryJobTypeKAzureNative string = "kAzureNative" - - // CloudArchiveSummaryJobTypeKKubernetes captures enum value "kKubernetes" - CloudArchiveSummaryJobTypeKKubernetes string = "kKubernetes" - - // CloudArchiveSummaryJobTypeKElastifile captures enum value "kElastifile" - CloudArchiveSummaryJobTypeKElastifile string = "kElastifile" - - // CloudArchiveSummaryJobTypeKAD captures enum value "kAD" - CloudArchiveSummaryJobTypeKAD string = "kAD" - - // CloudArchiveSummaryJobTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - CloudArchiveSummaryJobTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // CloudArchiveSummaryJobTypeKCassandra captures enum value "kCassandra" - CloudArchiveSummaryJobTypeKCassandra string = "kCassandra" - - // CloudArchiveSummaryJobTypeKMongoDB captures enum value "kMongoDB" - CloudArchiveSummaryJobTypeKMongoDB string = "kMongoDB" - - // CloudArchiveSummaryJobTypeKCouchbase captures enum value "kCouchbase" - CloudArchiveSummaryJobTypeKCouchbase string = "kCouchbase" - - // CloudArchiveSummaryJobTypeKHdfs captures enum value "kHdfs" - CloudArchiveSummaryJobTypeKHdfs string = "kHdfs" - - // CloudArchiveSummaryJobTypeKHive captures enum value "kHive" - CloudArchiveSummaryJobTypeKHive string = "kHive" - - // CloudArchiveSummaryJobTypeKHBase captures enum value "kHBase" - CloudArchiveSummaryJobTypeKHBase string = "kHBase" - - // CloudArchiveSummaryJobTypeKUDA captures enum value "kUDA" - CloudArchiveSummaryJobTypeKUDA string = "kUDA" - - // CloudArchiveSummaryJobTypeKO365Teams captures enum value "kO365Teams" - CloudArchiveSummaryJobTypeKO365Teams string = "kO365Teams" - - // CloudArchiveSummaryJobTypeKO365Group captures enum value "kO365Group" - CloudArchiveSummaryJobTypeKO365Group string = "kO365Group" - - // CloudArchiveSummaryJobTypeKO365Exchange captures enum value "kO365Exchange" - CloudArchiveSummaryJobTypeKO365Exchange string = "kO365Exchange" - - // CloudArchiveSummaryJobTypeKO365OneDrive captures enum value "kO365OneDrive" - CloudArchiveSummaryJobTypeKO365OneDrive string = "kO365OneDrive" - - // CloudArchiveSummaryJobTypeKO365Sharepoint captures enum value "kO365Sharepoint" - CloudArchiveSummaryJobTypeKO365Sharepoint string = "kO365Sharepoint" - - // CloudArchiveSummaryJobTypeKO365PublicFolders captures enum value "kO365PublicFolders" - CloudArchiveSummaryJobTypeKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *CloudArchiveSummary) validateJobTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudArchiveSummaryTypeJobTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudArchiveSummary) validateJobType(formats strfmt.Registry) error { - if swag.IsZero(m.JobType) { // not required - return nil - } - - // value enum - if err := m.validateJobTypeEnum("jobType", "body", *m.JobType); err != nil { - return err - } - - return nil -} - -func (m *CloudArchiveSummary) validateRuns(formats strfmt.Registry) error { - if swag.IsZero(m.Runs) { // not required - return nil - } - - for i := 0; i < len(m.Runs); i++ { - if swag.IsZero(m.Runs[i]) { // not required - continue - } - - if m.Runs[i] != nil { - if err := m.Runs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud archive summary based on the context it is used -func (m *CloudArchiveSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudArchiveSummary) contextValidateRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Runs); i++ { - - if m.Runs[i] != nil { - - if swag.IsZero(m.Runs[i]) { // not required - return nil - } - - if err := m.Runs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudArchiveSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudArchiveSummary) UnmarshalBinary(b []byte) error { - var res CloudArchiveSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_backup_job_pre_or_post_script.go b/v1/models/cloud_backup_job_pre_or_post_script.go deleted file mode 100644 index c0be0914..00000000 --- a/v1/models/cloud_backup_job_pre_or_post_script.go +++ /dev/null @@ -1,161 +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" -) - -// CloudBackupJobPreOrPostScript A message to encapsulate the pre-backup and post-backup and post-snapshot -// scripts for Cloud Adapter (AWS, Azure, GCP) based backups. -// -// swagger:model CloudBackupJobPreOrPostScript -type CloudBackupJobPreOrPostScript struct { - - // Specific for machines that are running the bash shell. - LinuxScript *ScriptPathAndParams `json:"linuxScript,omitempty"` - - // Specific for machines that are running the powershell. - WindowsScript *ScriptPathAndParams `json:"windowsScript,omitempty"` -} - -// Validate validates this cloud backup job pre or post script -func (m *CloudBackupJobPreOrPostScript) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLinuxScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWindowsScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudBackupJobPreOrPostScript) validateLinuxScript(formats strfmt.Registry) error { - if swag.IsZero(m.LinuxScript) { // not required - return nil - } - - if m.LinuxScript != nil { - if err := m.LinuxScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxScript") - } - return err - } - } - - return nil -} - -func (m *CloudBackupJobPreOrPostScript) validateWindowsScript(formats strfmt.Registry) error { - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if m.WindowsScript != nil { - if err := m.WindowsScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud backup job pre or post script based on the context it is used -func (m *CloudBackupJobPreOrPostScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLinuxScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWindowsScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudBackupJobPreOrPostScript) contextValidateLinuxScript(ctx context.Context, formats strfmt.Registry) error { - - if m.LinuxScript != nil { - - if swag.IsZero(m.LinuxScript) { // not required - return nil - } - - if err := m.LinuxScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxScript") - } - return err - } - } - - return nil -} - -func (m *CloudBackupJobPreOrPostScript) contextValidateWindowsScript(ctx context.Context, formats strfmt.Registry) error { - - if m.WindowsScript != nil { - - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if err := m.WindowsScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudBackupJobPreOrPostScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudBackupJobPreOrPostScript) UnmarshalBinary(b []byte) error { - var res CloudBackupJobPreOrPostScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_deploy_info_proto.go b/v1/models/cloud_deploy_info_proto.go deleted file mode 100644 index d021c026..00000000 --- a/v1/models/cloud_deploy_info_proto.go +++ /dev/null @@ -1,281 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudDeployInfoProto Message that encapsulates information about cloud deploy tasks for any of -// the cloud environments we support. Environment specific infos are defined as -// extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. The -// extension applies to both CloudDeployInfoProto as well as CloudDeployEntity. -// -// CloudDeployInfoProto extension Location Extension -// ============================================================================= -// aws::CloudDeployInfo::aws_cloud_deploy_info aws/aws.proto 100 -// azure::CloudDeployInfo::azure_cloud_deploy_info azure/azure.proto 101 -// gcp::CloudDeployInfo::gcp_cloud_deploy_info gcp/gcp.proto 102 -// aws::ReplicationInfo::aws_replication_info aws/aws.proto 103 -// azure::ReplicationInfo::azure_replication_info azure/azure.proto 104 -// ============================================================================= -// -// CloudDeployInfoProto.CloudDeployEntity extension Location Extension -// ============================================================================= -// aws::CloudDeployEntityInfo::aws_cloud_deploy_entity_info -// aws/aws.proto 100 -// vmware::RestoreEntityInfo::vmware_cloud_deploy_entity_info -// vmware/vmware.proto 101 -// azure::CloudDeployEntityInfo::azure_cloud_deploy_entity_info -// azure/azure.proto 102 -// gcp::CloudDeployEntityInfo::gcp_cloud_deploy_entity_info -// gcp/gcp.proto 103 -// hyperv::RestoreEntityInfo::hyperv_cloud_deploy_entity_info -// hyperv/hyperv.proto 104 -// aws::ReplicationEntityInfo::aws_replication_entity_info -// aws/aws.proto 105 -// aws::ReplicationEntityInfo::azure_replication_entity_info -// azure/azure.proto 106 -// ============================================================================= -// -// swagger:model CloudDeployInfoProto -type CloudDeployInfoProto struct { - - // Contains the file paths and the information of the entities deployed to - // cloud. - CloudDeployEntityVec []*CloudDeployInfoProtoCloudDeployEntity `json:"cloudDeployEntityVec"` - - // Whether this Cloud deploy info is for incremental cloudspin. - IsIncremental *bool `json:"isIncremental,omitempty"` - - // This will be filled by some restore ops to checkpoint their restore state. - RestoreInfo *RestoreInfoProto `json:"restoreInfo,omitempty"` - - // Specifies the target type for the task. The field is only valid if the - // task has got a permit. - TargetType *int32 `json:"targetType,omitempty"` - - // Total bytes transferred to source. - TotalBytesTransferredToSource *int64 `json:"totalBytesTransferredToSource,omitempty"` - - // The type of environment this cloud deploy info pertains to. - Type *int32 `json:"type,omitempty"` - - // Warnings if any. These warnings will be propogated to the UI by master. - Warnings []*ErrorProto `json:"warnings"` -} - -// Validate validates this cloud deploy info proto -func (m *CloudDeployInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudDeployEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployInfoProto) validateCloudDeployEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.CloudDeployEntityVec); i++ { - if swag.IsZero(m.CloudDeployEntityVec[i]) { // not required - continue - } - - if m.CloudDeployEntityVec[i] != nil { - if err := m.CloudDeployEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloudDeployInfoProto) validateRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if m.RestoreInfo != nil { - if err := m.RestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *CloudDeployInfoProto) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud deploy info proto based on the context it is used -func (m *CloudDeployInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudDeployEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployInfoProto) contextValidateCloudDeployEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudDeployEntityVec); i++ { - - if m.CloudDeployEntityVec[i] != nil { - - if swag.IsZero(m.CloudDeployEntityVec[i]) { // not required - return nil - } - - if err := m.CloudDeployEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloudDeployInfoProto) contextValidateRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreInfo != nil { - - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if err := m.RestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *CloudDeployInfoProto) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDeployInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDeployInfoProto) UnmarshalBinary(b []byte) error { - var res CloudDeployInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_deploy_info_proto_cloud_deploy_entity.go b/v1/models/cloud_deploy_info_proto_cloud_deploy_entity.go deleted file mode 100644 index c77f868e..00000000 --- a/v1/models/cloud_deploy_info_proto_cloud_deploy_entity.go +++ /dev/null @@ -1,186 +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" -) - -// CloudDeployInfoProtoCloudDeployEntity cloud deploy info proto cloud deploy entity -// -// swagger:model CloudDeployInfoProto_CloudDeployEntity -type CloudDeployInfoProtoCloudDeployEntity struct { - - // Optional name that should be used for deployed VM. - DeployedVMName *string `json:"deployedVmName,omitempty"` - - // The entity that was deployed to cloud. - Entity *EntityProto `json:"entity,omitempty"` - - // If cloud deploy of the 'entity' failed, this field may contain the cause - // of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // Directory where files of the entity's previous snapshot were cloned to. - // Path is relative to the destination view. - PreviousRelativeCloneDirPath *string `json:"previousRelativeCloneDirPath,omitempty"` - - // All the paths that the entity's previous snapshot files were cloned to. - // Each path is relative to the destination view. - PreviousRelativeClonePaths []string `json:"previousRelativeClonePaths"` - - // Progress monitor task path for this entity which is relative to the root - // path of the cloud deploy task progress monitor. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // All the paths that the entity's files were cloned to. Each path is - // relative to the destination view. - RelativeClonePaths []string `json:"relativeClonePaths"` - - // The status of the entity. - Status *int32 `json:"status,omitempty"` -} - -// Validate validates this cloud deploy info proto cloud deploy entity -func (m *CloudDeployInfoProtoCloudDeployEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployInfoProtoCloudDeployEntity) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CloudDeployInfoProtoCloudDeployEntity) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this cloud deploy info proto cloud deploy entity based on the context it is used -func (m *CloudDeployInfoProtoCloudDeployEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployInfoProtoCloudDeployEntity) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CloudDeployInfoProtoCloudDeployEntity) 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 -} - -// MarshalBinary interface implementation -func (m *CloudDeployInfoProtoCloudDeployEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDeployInfoProtoCloudDeployEntity) UnmarshalBinary(b []byte) error { - var res CloudDeployInfoProtoCloudDeployEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_deploy_target.go b/v1/models/cloud_deploy_target.go deleted file mode 100644 index db74956e..00000000 --- a/v1/models/cloud_deploy_target.go +++ /dev/null @@ -1,175 +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" -) - -// CloudDeployTarget Message that specifies the details about CloudDeploy target where backup -// snapshots may be converted and stored. -// -// swagger:model CloudDeployTarget -type CloudDeployTarget struct { - - // Contains information needed to identify various resources when deploying - // VMs to Cloud. - // - // Note that only the id field would be set for all the entities in - // DeployVMsToCloudParams. This is ok as we don't replicate the policy to - // remote cluster currently. When we decide to replicate the policy to remote - // clusters, we need to populate the remaining fields. - DeployVmsToCloudParams *DeployVMsToCloudParams `json:"deployVmsToCloudParams,omitempty"` - - // Entity corresponding to the cloud deploy target. - // - // Although we use EntityProto here, only the id field would be set in this - // proto. This is ok as we don't replicate the policy to remote cluster - // currently. When we decide to replicate the policy to remote clusters, we - // need to populate the remaining fields. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // The type of the CloudDeploy target. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this cloud deploy target -func (m *CloudDeployTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTarget) validateDeployVmsToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if m.DeployVmsToCloudParams != nil { - if err := m.DeployVmsToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTarget) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud deploy target based on the context it is used -func (m *CloudDeployTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTarget) contextValidateDeployVmsToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudParams != nil { - - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if err := m.DeployVmsToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTarget) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDeployTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDeployTarget) UnmarshalBinary(b []byte) error { - var res CloudDeployTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_deploy_target_details.go b/v1/models/cloud_deploy_target_details.go deleted file mode 100644 index ce5b4c36..00000000 --- a/v1/models/cloud_deploy_target_details.go +++ /dev/null @@ -1,283 +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" -) - -// CloudDeployTargetDetails Message that specifies the details about CloudDeploy target where backup -// snapshots may be converted and stored. -// -// swagger:model CloudDeployTargetDetails -type CloudDeployTargetDetails struct { - - // Contains information needed to identify various resources when deploying - // VMs to Cloud. - // - // Specifies various resources when converting and deploying a VM to AWS. - AwsParams *AwsParams `json:"awsParams,omitempty"` - - // Specifies various resources when converting and deploying a VM to Azure. - AzureParams *AzureParams `json:"azureParams,omitempty"` - - // Specifies various resources when converting and deploying a VM to Gcp. - GcpParams *GcpParams `json:"gcpParams,omitempty"` - - // Entity corresponding to the cloud deploy target. - // - // Specifies the id field inside the EntityProto. - ID *int64 `json:"id,omitempty"` - - // Specifies the inner object's name or a human-readable string made off the - // salient attributes. This is only plumbed when Entity objects are exposed - // to Iris BE or to Yoda. - Name *string `json:"name,omitempty"` - - // Specifies the type of the CloudDeploy target. - // 'kAzure' indicates that Azure as a cloud deploy target type. - // 'kAWS' indicates that AWS as a cloud deploy target type. - // 'kGCP' indicates that GCP as a cloud deploy target type. - // Enum: ["kAzure","kAWS","kGCP"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this cloud deploy target details -func (m *CloudDeployTargetDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTargetDetails) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTargetDetails) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTargetDetails) validateGcpParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -var cloudDeployTargetDetailsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzure","kAWS","kGCP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudDeployTargetDetailsTypeTypePropEnum = append(cloudDeployTargetDetailsTypeTypePropEnum, v) - } -} - -const ( - - // CloudDeployTargetDetailsTypeKAzure captures enum value "kAzure" - CloudDeployTargetDetailsTypeKAzure string = "kAzure" - - // CloudDeployTargetDetailsTypeKAWS captures enum value "kAWS" - CloudDeployTargetDetailsTypeKAWS string = "kAWS" - - // CloudDeployTargetDetailsTypeKGCP captures enum value "kGCP" - CloudDeployTargetDetailsTypeKGCP string = "kGCP" -) - -// prop value enum -func (m *CloudDeployTargetDetails) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudDeployTargetDetailsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudDeployTargetDetails) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cloud deploy target details based on the context it is used -func (m *CloudDeployTargetDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTargetDetails) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTargetDetails) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CloudDeployTargetDetails) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDeployTargetDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDeployTargetDetails) UnmarshalBinary(b []byte) error { - var res CloudDeployTargetDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_deploy_task_state_proto.go b/v1/models/cloud_deploy_task_state_proto.go deleted file mode 100644 index a24cb05b..00000000 --- a/v1/models/cloud_deploy_task_state_proto.go +++ /dev/null @@ -1,118 +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" -) - -// CloudDeployTaskStateProto Contains state for a cloud deploy task. -// -// swagger:model CloudDeployTaskStateProto -type CloudDeployTaskStateProto struct { - - // Proto to capture progress from the slave for the cloud deploy task. - CloudDeployInfo *CloudDeployInfoProto `json:"cloudDeployInfo,omitempty"` - - // The scheduled constituent id of this task. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // The scheduled gandalf session id of this task. - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // A unique id assigned by the master for this task. - TaskID *int64 `json:"taskId,omitempty"` -} - -// Validate validates this cloud deploy task state proto -func (m *CloudDeployTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudDeployInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTaskStateProto) validateCloudDeployInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployInfo) { // not required - return nil - } - - if m.CloudDeployInfo != nil { - if err := m.CloudDeployInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud deploy task state proto based on the context it is used -func (m *CloudDeployTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudDeployInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDeployTaskStateProto) contextValidateCloudDeployInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudDeployInfo != nil { - - if swag.IsZero(m.CloudDeployInfo) { // not required - return nil - } - - if err := m.CloudDeployInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDeployTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDeployTaskStateProto) UnmarshalBinary(b []byte) error { - var res CloudDeployTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_domain_list.go b/v1/models/cloud_domain_list.go deleted file mode 100644 index 3627cfb7..00000000 --- a/v1/models/cloud_domain_list.go +++ /dev/null @@ -1,57 +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" -) - -// CloudDomainList CloudDomainList specfies the cloud domain information associated with the -// vault. -// -// swagger:model CloudDomainList -type CloudDomainList struct { - - // Specifies the Id of the cloud domain. - DomainID *int64 `json:"domainId,omitempty"` - - // Specifies the Id of the ViewBox related to the cloud domain. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the Name of the ViewBox related to the cloud domain. - ViewBoxName *string `json:"viewBoxName,omitempty"` -} - -// Validate validates this cloud domain list -func (m *CloudDomainList) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud domain list based on context it is used -func (m *CloudDomainList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDomainList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDomainList) UnmarshalBinary(b []byte) error { - var res CloudDomainList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_domain_migration_query_result.go b/v1/models/cloud_domain_migration_query_result.go deleted file mode 100644 index 354bd868..00000000 --- a/v1/models/cloud_domain_migration_query_result.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudDomainMigrationQueryResult Cloud Domain Migration Query Response. -// -// CloudDomainMigrationQueryResult represents the info returned while querying -// cloud domain migration. -// -// swagger:model CloudDomainMigrationQueryResult -type CloudDomainMigrationQueryResult struct { - - // Specifies the list of the application jobs discovered. - AppJobUIDList []*UniversalID `json:"appJobUidList"` - - // Specifies the Id of a specific cloud domain present inside the vault, that - // needs to be migrated. If not set, all cloud domains found in the vault or - // under the 'domain_namespace' specified in CADConfig will be migrated. - CloudDomainID *int64 `json:"cloudDomainId,omitempty"` - - // Specifies the common job info. - CommonJobInfo *CommonJobInfo `json:"commonJobInfo,omitempty"` - - // Specifies if the migration mode is CAD or not. - IsCadMode *bool `json:"isCadMode,omitempty"` - - // Specifies whether the protection jobs/objects in the cloud domain are - // ready to be migrated. This is set after required snap trees have been - // downloaded and CM tables have been populated. - IsMigrationReady *bool `json:"isMigrationReady,omitempty"` - - // Specifies the Number of bytes downloaded by this job. The downloaded bytes - // are for reading metadata object, data objects and index files. - NumOfBytesDownloaded *int64 `json:"numOfBytesDownloaded,omitempty"` -} - -// Validate validates this cloud domain migration query result -func (m *CloudDomainMigrationQueryResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppJobUIDList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonJobInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDomainMigrationQueryResult) validateAppJobUIDList(formats strfmt.Registry) error { - if swag.IsZero(m.AppJobUIDList) { // not required - return nil - } - - for i := 0; i < len(m.AppJobUIDList); i++ { - if swag.IsZero(m.AppJobUIDList[i]) { // not required - continue - } - - if m.AppJobUIDList[i] != nil { - if err := m.AppJobUIDList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appJobUidList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appJobUidList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloudDomainMigrationQueryResult) validateCommonJobInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CommonJobInfo) { // not required - return nil - } - - if m.CommonJobInfo != nil { - if err := m.CommonJobInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonJobInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonJobInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud domain migration query result based on the context it is used -func (m *CloudDomainMigrationQueryResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppJobUIDList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCommonJobInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDomainMigrationQueryResult) contextValidateAppJobUIDList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppJobUIDList); i++ { - - if m.AppJobUIDList[i] != nil { - - if swag.IsZero(m.AppJobUIDList[i]) { // not required - return nil - } - - if err := m.AppJobUIDList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appJobUidList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appJobUidList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloudDomainMigrationQueryResult) contextValidateCommonJobInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonJobInfo != nil { - - if swag.IsZero(m.CommonJobInfo) { // not required - return nil - } - - if err := m.CommonJobInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonJobInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonJobInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDomainMigrationQueryResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDomainMigrationQueryResult) UnmarshalBinary(b []byte) error { - var res CloudDomainMigrationQueryResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_network_configuration.go b/v1/models/cloud_network_configuration.go deleted file mode 100644 index 9c14d085..00000000 --- a/v1/models/cloud_network_configuration.go +++ /dev/null @@ -1,67 +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" -) - -// CloudNetworkConfiguration Cloud Network Configuration. -// -// Specifies all of the parameters needed for network configuration of -// the new Cloud Cluster. -// -// swagger:model CloudNetworkConfiguration -type CloudNetworkConfiguration struct { - - // Specifies the default gateway IP address (or addresses) for the Cluster - // network. - ClusterGateway *string `json:"clusterGateway,omitempty"` - - // Specifies the subnet mask (or masks) of the Cluster network. - ClusterSubnetMask *string `json:"clusterSubnetMask,omitempty"` - - // Specifies the list of DNS Servers this cluster should be configured with. - DNSServers []string `json:"dnsServers"` - - // Specifies the list of domain names this cluster should be configured - // with. - DomainNames []string `json:"domainNames"` - - // Specifies the list of NTP Servers this cluster should be configured with. - NtpServers []string `json:"ntpServers"` -} - -// Validate validates this cloud network configuration -func (m *CloudNetworkConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud network configuration based on context it is used -func (m *CloudNetworkConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudNetworkConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudNetworkConfiguration) UnmarshalBinary(b []byte) error { - var res CloudNetworkConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_parameters.go b/v1/models/cloud_parameters.go deleted file mode 100644 index 1aa0264d..00000000 --- a/v1/models/cloud_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// CloudParameters Cloud Parameters. -// -// Specifies Cloud parameters that are applicable to all Protection -// Sources in a Protection Job in certain scenarios. -// -// swagger:model CloudParameters -type CloudParameters struct { - - // Specifies whether the Protection Sources in this Protection Job - // will be failed over to Cloud. This flag is applicable to backup - // on-prem Sources. - FailoverToCloud *bool `json:"failoverToCloud,omitempty"` -} - -// Validate validates this cloud parameters -func (m *CloudParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud parameters based on context it is used -func (m *CloudParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudParameters) UnmarshalBinary(b []byte) error { - var res CloudParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cloud_vm_backup_params.go b/v1/models/cloud_vm_backup_params.go deleted file mode 100644 index 1870589d..00000000 --- a/v1/models/cloud_vm_backup_params.go +++ /dev/null @@ -1,113 +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" -) - -// CloudVMBackupParams If a cloud VM is created using 'convert and deploy' of an on-prem vm, the -// following contains additional parameters for cloud VM backup job run. -// -// swagger:model CloudVMBackupParams -type CloudVMBackupParams struct { - - // The following contains information about the onprem entity. - RestoreEntity *RestoreInfoProtoRestoreEntity `json:"restoreEntity,omitempty"` - - // View where snapshot of the onprem VM is stored. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this cloud VM backup params -func (m *CloudVMBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudVMBackupParams) validateRestoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreEntity) { // not required - return nil - } - - if m.RestoreEntity != nil { - if err := m.RestoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud VM backup params based on the context it is used -func (m *CloudVMBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudVMBackupParams) contextValidateRestoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreEntity != nil { - - if swag.IsZero(m.RestoreEntity) { // not required - return nil - } - - if err := m.RestoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudVMBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudVMBackupParams) UnmarshalBinary(b []byte) error { - var res CloudVMBackupParams - 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 deleted file mode 100644 index a62d3ec7..00000000 --- a/v1/models/cluster.go +++ /dev/null @@ -1,1359 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Cluster Cohesity Cluster. -// -// Specifies information about the Cohesity Cluster. -// -// swagger:model Cluster -type Cluster struct { - - // Specifies the default AES Encryption mode on the cluster. - AesEncryptionMode *string `json:"aesEncryptionMode,omitempty"` - - // Specifies the AMQP target config. - AmqpTargetConfig *AMQPTargetConfig `json:"amqpTargetConfig,omitempty"` - - // The subnet for Athena apps. - AppsSubnet *Subnet `json:"appsSubnet,omitempty"` - - // Specifies the number of racks in cluster with at least one rack assigned. - AssignedRacksCount *int32 `json:"assignedRacksCount,omitempty"` - - // Information about storage available for metadata - AvailableMetadataSpace *int64 `json:"availableMetadataSpace,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. - BannerEnabled *bool `json:"bannerEnabled,omitempty"` - - // Specifies the number of chassis in cluster. - ChassisCount *int32 `json:"chassisCount,omitempty"` - - // Specifies the type from which the cluster was claimed to Helios. - // 'kCohesity' implies Cohesity cluster is claimed. - // 'kIBMStroageProtect' implies IBM storage protect cluster is claimed. - // Enum: ["kCohesity","kIBMStorageProtect"] - ClaimType *string `json:"claimType,omitempty"` - - // Cluster Audit Log Configuration. - ClusterAuditLogConfig *ClusterAuditLogConfiguration `json:"clusterAuditLogConfig,omitempty"` - - // Specifies the size of Cloud Edition(CE) Cluster such as kSmall, kNextGen. - // Specifies the clustersize of the cloud edition(CE) clusters. - // 'kSmall' indicates small cluster size of CE. - // 'kMedium' indicates medium cluster size of CE. - // 'kLarge' indicates large cluster size of CE. - // 'kXLarge' indicates extra large cluster size of CE. - // 'kNextGen' indicates next gen CE. - // Enum: ["kSmall","kMedium","kLarge","kXLarge","kNextGen"] - ClusterSize *string `json:"clusterSize,omitempty"` - - // Specifies the current release of the Cohesity software running on - // this Cohesity Cluster. - ClusterSoftwareVersion *string `json:"clusterSoftwareVersion,omitempty"` - - // Specifies the type of Cluster such as kPhysical. - // 'kPhysical' indicates the Cohesity Cluster is hosted directly on hardware. - // 'kVirtualRobo' indicates the Cohesity Cluster is hosted in a VM on - // a ESXi Host of a VMware vCenter Server using Cohesity's Virtual Edition. - // 'kMicrosoftCloud' indicates the Cohesity Cluster is hosted in a VM - // on Microsoft Azure using Cohesity's Cloud Edition. - // 'kAmazonCloud' indicates the Cohesity Cluster is hosted in a VM - // on Amazon S3 using Cohesity's Cloud Edition. - // 'kGoogleCloud' indicates the Cohesity Cluster is hosted in a VM - // on Google Cloud Platform using Cohesity's Cloud Edition. - // Enum: ["kPhysical","kVirtualRobo","kMicrosoftCloud","kAmazonCloud","kGoogleCloud"] - ClusterType *string `json:"clusterType,omitempty"` - - // Specifies the time when the Cohesity Cluster was created. - // This value is specified as a Unix epoch Timestamp (in microseconds). - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the time scheduled by the Cohesity Cluster to - // start the current running operation. - CurrentOpScheduledTimeSecs *int64 `json:"currentOpScheduledTimeSecs,omitempty"` - - // Specifies the current Cluster-level operation in progress. - // 'kUpgrade' indicates the Cohesity Cluster is upgrading to a new release. - // 'kRemoveNode' indicates the Cohesity Cluster is removing a Node - // from the Cluster. - // 'kNone' indicates no action is occurring on the Cohesity Cluster. - // 'kDestroy' indicates the Cohesity Cluster is getting destoryed. - // 'kClean' indicates the Cohesity Cluster is getting cleaned. - // 'kRestartServices' indicates the Cohesity Cluster is restarting the - // services. - // 'kRestartSystemServices' indicates the Cohesity Cluster is restarting the - // system services. - // Enum: ["kRemoveNode","kUpgrade","kNone","kDestroy","kClean","kRestartServices","kRestartSystemServices"] - CurrentOperation *string `json:"currentOperation,omitempty"` - - // Specifies the current system time on the Cohesity Cluster. - // This value is specified as a Unix epoch Timestamp (in microseconds). - CurrentTimeMsecs *int64 `json:"currentTimeMsecs,omitempty"` - - // Specifies the number of disks on the cluster by Storage Tier. - // Read Only: true - DiskCountByTier []*CountByTier `json:"diskCountByTier"` - - // Array of IP Addresses of DNS Servers. - // - // Specifies the IP addresses of the DNS Servers used by the Cohesity - // Cluster. - DNSServerIps []string `json:"dnsServerIps"` - - // Array of Domain Names. - // - // The first domain name specified in the array is the fully qualified - // domain name assigned to the Cohesity Cluster. Any additional - // domain names specified are used for the domain search list for - // hostname look-up. - DomainNames []string `json:"domainNames"` - - // Specifies if Cohesity can receive monitoring information from the - // Cohesity Cluster. - // If 'true', remote monitoring of the Cohesity Cluster is allowed. - EnableActiveMonitoring *bool `json:"enableActiveMonitoring,omitempty"` - - // Specifies whether to enable downloading patches from Cohesity download - // site. - EnablePatchesDownload *bool `json:"enablePatchesDownload,omitempty"` - - // If 'true', Cohesity's upgrade server is polled for new releases. - EnableUpgradePkgPolling *bool `json:"enableUpgradePkgPolling,omitempty"` - - // If 'true', the entire Cohesity Cluster is encrypted including all View - // Boxes. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the period of time (in seconds) when encryption keys are rotated. - // By default, the encryption keys are rotated every 77760000 seconds - // (30 days). - EncryptionKeyRotationPeriodSecs *int64 `json:"encryptionKeyRotationPeriodSecs,omitempty"` - - // eula config - EulaConfig *ClusterEulaConfig `json:"eulaConfig,omitempty"` - - // Specifies the level which 'MetadataFaultToleranceFactor' applies to. - // 'kNode' indicates 'MetadataFaultToleranceFactor' applies to Node level. - // 'kChassis' indicates 'MetadataFaultToleranceFactor' applies to Chassis - // level. - // 'kRack' indicates 'MetadataFaultToleranceFactor' applies to Rack level. - // Enum: ["kNode","kChassis","kRack"] - FaultToleranceLevel *string `json:"faultToleranceLevel,omitempty"` - - // Filer Audit Log Configuration. - FilerAuditLogConfig *FilerAuditLogConfiguration `json:"filerAuditLogConfig,omitempty"` - - // Specifies if the Cohesity Cluster should operate in the FIPS mode, - // which is compliant with the Federal Information Processing Standard - // 140-2 certification. - FipsModeEnabled *bool `json:"fipsModeEnabled,omitempty"` - - // Specifies the gateway IP address. - Gateway *string `json:"gateway,omitempty"` - - // Specifies whether Google Analytics is enabled. - GoogleAnalyticsEnabled *bool `json:"googleAnalyticsEnabled,omitempty"` - - // Specifies if hardware encryption(SED) is enabled. - HardwareEncryptionEnabled *bool `json:"hardwareEncryptionEnabled,omitempty"` - - // Specifies a hardware type for motherboard of the nodes - // that make up this Cohesity Cluster such as S2600WB for Ivy Bridge - // or S2600TP for Haswell. - HardwareInfo *ClusterHardwareInfo `json:"hardwareInfo,omitempty"` - - // Specifies the unique id of Cohesity Cluster. - ID *int64 `json:"id,omitempty"` - - // Specifies the unique incarnation id of the Cohesity Cluster. - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // IP preference - IPPreference *int32 `json:"ipPreference,omitempty"` - - // Specifies whether or not athena subnet is clashing with some other - // internal subnet - IsAthenaSubnetClash *bool `json:"isAthenaSubnetClash,omitempty"` - - // Specifies if MFA is enabled on cluster. - IsClusterMfaEnabled *bool `json:"isClusterMfaEnabled,omitempty"` - - // Specifies what version of the documentation is used. - // If 'true', the version of documentation stored locally on the Cohesity - // Cluster is used. - // If 'false', the documentation stored on a Cohesity Web Server - // is used. The default is 'false'. - // Cohesity recommends accessing the Help from the Cohesity Web site which - // provides the newest and most complete version of Help. - IsDocumentationLocal *bool `json:"isDocumentationLocal,omitempty"` - - // Flag to indicate if the current upgrade has been aborted. - IsUpgradeAborted *bool `json:"isUpgradeAborted,omitempty"` - - // Specifies the KMS Server Id. - // This can only be set when the encryption is enabled on cluster. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Specifies the language and locale for this Cohesity Cluster. - LanguageLocale *string `json:"languageLocale,omitempty"` - - // license state - LicenseState *ClusterLicenseState `json:"licenseState,omitempty"` - - // Domain name for SMB local authentication. - LocalAuthDomainName *string `json:"localAuthDomainName,omitempty"` - - // Specifies whether to enable local groups on cluster. Once it is enabled, - // it cannot be disabled. - LocalGroupsEnabled *bool `json:"localGroupsEnabled,omitempty"` - - // Specifies metadata fault tolerance setting for the cluster. This denotes - // the number of simultaneous failures[node] supported by metadata services - // like gandalf and scribe. - MetadataFaultToleranceFactor *int32 `json:"metadataFaultToleranceFactor,omitempty"` - - // Specifies minimum failure domains needed in the cluster. - MinimumFailureDomainsNeeded *int32 `json:"minimumFailureDomainsNeeded,omitempty"` - - // Specifies if multi tenancy is enabled in the cluster. Authentication & - // Authorization will always use tenant_id, however, some UI elements may be - // disabled when multi tenancy is disabled. - MultiTenancyEnabled *bool `json:"multiTenancyEnabled,omitempty"` - - // Specifies the name of the Cohesity Cluster. - Name *string `json:"name,omitempty"` - - // Specifies the number of Nodes in the Cohesity Cluster. - NodeCount *int64 `json:"nodeCount,omitempty"` - - // IP addresses of nodes in the cluster - NodeIps *string `json:"nodeIps,omitempty"` - - // Specifies if the ntp/primary secondary scheme should be disabled for this - // cluster. - NtpSettings *NtpSettingsConfig `json:"ntpSettings,omitempty"` - - // Specifies the patch version applied to cluster. - PatchVersion *string `json:"patchVersion,omitempty"` - - // Specifies the rebalance delay in seconds for cluster PcieSSD storage tier. - PcieSsdTierRebalanceDelaySecs *int32 `json:"pcieSsdTierRebalanceDelaySecs,omitempty"` - - // Specifies if protorpc encryption is enabled or not. - ProtoRPCEncryptionEnabled *bool `json:"protoRpcEncryptionEnabled,omitempty"` - - // The subnet reserved for ProxyVM - ProxyVMSubnet *string `json:"proxyVMSubnet,omitempty"` - - // If 'true', Cohesity's Remote Tunnel is enabled. - // Cohesity can access the Cluster and provide remote assistance - // via a Remote Tunnel. - ReverseTunnelEnabled *bool `json:"reverseTunnelEnabled,omitempty"` - - // ReverseTunnelEndTimeMsecs specifies the end time in milliseconds since - // epoch until when the reverse tunnel will stay enabled. - ReverseTunnelEndTimeMsecs *int64 `json:"reverseTunnelEndTimeMsecs,omitempty"` - - // Specifies the list of domain names for S3 - // Virtual Hosted Style Paths. If set, all the Cohesity S3 Views in the - // cluster can be accessed using any of the specified domain names. - S3VirtualHostedDomainNames []string `json:"s3VirtualHostedDomainNames"` - - // Specifies the admission control for cluster SATAHDD storage tier. - SataHddTierAdmissionControl *int32 `json:"sataHddTierAdmissionControl,omitempty"` - - // Specifies the time series schema info of the cluster. - SchemaInfoList []*SchemaInfo `json:"schemaInfoList"` - - // Specifies if Security Mode DOD is enabled or not. - SecurityModeDod *bool `json:"securityModeDod,omitempty"` - - // Specifies if Active Directory should be disabled for authentication of SMB - // shares. If 'true', Active Directory is disabled. - SmbAdDisabled *bool `json:"smbAdDisabled,omitempty"` - - // Specifies whether SMB multichannel is enabled on the cluster. When this is - // set to true, then any SMB3 multichannel enabled client can establish - // multiple TCP connection per session to the Server. - SmbMultichannelEnabled *bool `json:"smbMultichannelEnabled,omitempty"` - - // Specifies if split key host access is enabled. - SplitKeyHostAccess *bool `json:"splitKeyHostAccess,omitempty"` - - // Specifies statistics about this Cohesity Cluster. - Stats *ClusterStats `json:"stats,omitempty"` - - // TODO(mitch) StigMode is deprecated. Should it still be in this list?? - StigMode *bool `json:"stigMode,omitempty"` - - // Information about supported configuration. For example, it contains - // minimum number of nodes supported for the cluster. - SupportedConfig *SupportedConfig `json:"supportedConfig,omitempty"` - - // Syslog servers. - SyslogServers []*OldSyslogServer `json:"syslogServers"` - - // Specifies the Cohesity release that this Cluster is being upgraded to - // if an upgrade operation is in progress. - TargetSoftwareVersion *string `json:"targetSoftwareVersion,omitempty"` - - // In case multi tenancy is enabled, this flag controls whether multiple - // tenants can be placed on the same viewbox. Once set to true, this flag - // should never become false. - TenantViewboxSharingEnabled *bool `json:"tenantViewboxSharingEnabled,omitempty"` - - // Tiering Audit Log Configuration. - TieringAuditLogConfig *TieringAuditLogConfiguration `json:"tieringAuditLogConfig,omitempty"` - - // Specifies the timezone to use for showing time in emails, reports, - // filer audit logs, etc. - Timezone *string `json:"timezone,omitempty"` - - // Trust Domain. - TrustDomain *string `json:"trustDomain,omitempty"` - - // Specifies if the cluster is in Turbo mode. - TurboMode *bool `json:"turboMode,omitempty"` - - // Error string to capture why the upgrade failed. - UpgradeFailureErrorString *string `json:"upgradeFailureErrorString,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"` - - // UsedMetadataSpacePct measures the percentage about storage used for - // metadata over the total storage available for metadata - UsedMetadataSpacePct *float64 `json:"usedMetadataSpacePct,omitempty"` -} - -// Validate validates this cluster -func (m *Cluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAmqpTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppsSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterSize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentOperation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskCountByTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEulaConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFaultToleranceLevel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilerAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHardwareInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLicenseState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNtpSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportedConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyslogServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieringAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Cluster) validateAmqpTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AmqpTargetConfig) { // not required - return nil - } - - if m.AmqpTargetConfig != nil { - if err := m.AmqpTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amqpTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amqpTargetConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateAppsSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if m.AppsSubnet != nil { - if err := m.AppsSubnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -var clusterTypeClaimTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCohesity","kIBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeClaimTypePropEnum = append(clusterTypeClaimTypePropEnum, v) - } -} - -const ( - - // ClusterClaimTypeKCohesity captures enum value "kCohesity" - ClusterClaimTypeKCohesity string = "kCohesity" - - // ClusterClaimTypeKIBMStorageProtect captures enum value "kIBMStorageProtect" - ClusterClaimTypeKIBMStorageProtect string = "kIBMStorageProtect" -) - -// prop value enum -func (m *Cluster) validateClaimTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeClaimTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateClaimType(formats strfmt.Registry) error { - if swag.IsZero(m.ClaimType) { // not required - return nil - } - - // value enum - if err := m.validateClaimTypeEnum("claimType", "body", *m.ClaimType); err != nil { - return err - } - - return nil -} - -func (m *Cluster) validateClusterAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if m.ClusterAuditLogConfig != nil { - if err := m.ClusterAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -var clusterTypeClusterSizePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSmall","kMedium","kLarge","kXLarge","kNextGen"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeClusterSizePropEnum = append(clusterTypeClusterSizePropEnum, v) - } -} - -const ( - - // ClusterClusterSizeKSmall captures enum value "kSmall" - ClusterClusterSizeKSmall string = "kSmall" - - // ClusterClusterSizeKMedium captures enum value "kMedium" - ClusterClusterSizeKMedium string = "kMedium" - - // ClusterClusterSizeKLarge captures enum value "kLarge" - ClusterClusterSizeKLarge string = "kLarge" - - // ClusterClusterSizeKXLarge captures enum value "kXLarge" - ClusterClusterSizeKXLarge string = "kXLarge" - - // ClusterClusterSizeKNextGen captures enum value "kNextGen" - ClusterClusterSizeKNextGen string = "kNextGen" -) - -// prop value enum -func (m *Cluster) validateClusterSizeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeClusterSizePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateClusterSize(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterSize) { // not required - return nil - } - - // value enum - if err := m.validateClusterSizeEnum("clusterSize", "body", *m.ClusterSize); err != nil { - return err - } - - return nil -} - -var clusterTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical","kVirtualRobo","kMicrosoftCloud","kAmazonCloud","kGoogleCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeClusterTypePropEnum = append(clusterTypeClusterTypePropEnum, v) - } -} - -const ( - - // ClusterClusterTypeKPhysical captures enum value "kPhysical" - ClusterClusterTypeKPhysical string = "kPhysical" - - // ClusterClusterTypeKVirtualRobo captures enum value "kVirtualRobo" - ClusterClusterTypeKVirtualRobo string = "kVirtualRobo" - - // ClusterClusterTypeKMicrosoftCloud captures enum value "kMicrosoftCloud" - ClusterClusterTypeKMicrosoftCloud string = "kMicrosoftCloud" - - // ClusterClusterTypeKAmazonCloud captures enum value "kAmazonCloud" - ClusterClusterTypeKAmazonCloud string = "kAmazonCloud" - - // ClusterClusterTypeKGoogleCloud captures enum value "kGoogleCloud" - ClusterClusterTypeKGoogleCloud string = "kGoogleCloud" -) - -// prop value enum -func (m *Cluster) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterType) { // not required - return nil - } - - // value enum - if err := m.validateClusterTypeEnum("clusterType", "body", *m.ClusterType); err != nil { - return err - } - - return nil -} - -var clusterTypeCurrentOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRemoveNode","kUpgrade","kNone","kDestroy","kClean","kRestartServices","kRestartSystemServices"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeCurrentOperationPropEnum = append(clusterTypeCurrentOperationPropEnum, v) - } -} - -const ( - - // ClusterCurrentOperationKRemoveNode captures enum value "kRemoveNode" - ClusterCurrentOperationKRemoveNode string = "kRemoveNode" - - // ClusterCurrentOperationKUpgrade captures enum value "kUpgrade" - ClusterCurrentOperationKUpgrade string = "kUpgrade" - - // ClusterCurrentOperationKNone captures enum value "kNone" - ClusterCurrentOperationKNone string = "kNone" - - // ClusterCurrentOperationKDestroy captures enum value "kDestroy" - ClusterCurrentOperationKDestroy string = "kDestroy" - - // ClusterCurrentOperationKClean captures enum value "kClean" - ClusterCurrentOperationKClean string = "kClean" - - // ClusterCurrentOperationKRestartServices captures enum value "kRestartServices" - ClusterCurrentOperationKRestartServices string = "kRestartServices" - - // ClusterCurrentOperationKRestartSystemServices captures enum value "kRestartSystemServices" - ClusterCurrentOperationKRestartSystemServices string = "kRestartSystemServices" -) - -// prop value enum -func (m *Cluster) validateCurrentOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeCurrentOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateCurrentOperation(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentOperation) { // not required - return nil - } - - // value enum - if err := m.validateCurrentOperationEnum("currentOperation", "body", *m.CurrentOperation); err != nil { - return err - } - - return nil -} - -func (m *Cluster) validateDiskCountByTier(formats strfmt.Registry) error { - if swag.IsZero(m.DiskCountByTier) { // not required - return nil - } - - for i := 0; i < len(m.DiskCountByTier); i++ { - if swag.IsZero(m.DiskCountByTier[i]) { // not required - continue - } - - if m.DiskCountByTier[i] != nil { - if err := m.DiskCountByTier[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Cluster) validateEulaConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EulaConfig) { // not required - 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 -} - -var clusterTypeFaultToleranceLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNode","kChassis","kRack"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeFaultToleranceLevelPropEnum = append(clusterTypeFaultToleranceLevelPropEnum, v) - } -} - -const ( - - // ClusterFaultToleranceLevelKNode captures enum value "kNode" - ClusterFaultToleranceLevelKNode string = "kNode" - - // ClusterFaultToleranceLevelKChassis captures enum value "kChassis" - ClusterFaultToleranceLevelKChassis string = "kChassis" - - // ClusterFaultToleranceLevelKRack captures enum value "kRack" - ClusterFaultToleranceLevelKRack string = "kRack" -) - -// prop value enum -func (m *Cluster) validateFaultToleranceLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeFaultToleranceLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateFaultToleranceLevel(formats strfmt.Registry) error { - if swag.IsZero(m.FaultToleranceLevel) { // not required - return nil - } - - // value enum - if err := m.validateFaultToleranceLevelEnum("faultToleranceLevel", "body", *m.FaultToleranceLevel); err != nil { - return err - } - - return nil -} - -func (m *Cluster) validateFilerAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilerAuditLogConfig) { // not required - return nil - } - - if m.FilerAuditLogConfig != nil { - if err := m.FilerAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateHardwareInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HardwareInfo) { // not required - return nil - } - - if m.HardwareInfo != nil { - if err := m.HardwareInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hardwareInfo") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateLicenseState(formats strfmt.Registry) error { - if swag.IsZero(m.LicenseState) { // not required - 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 -} - -func (m *Cluster) validateNtpSettings(formats strfmt.Registry) error { - if swag.IsZero(m.NtpSettings) { // not required - return nil - } - - if m.NtpSettings != nil { - if err := m.NtpSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpSettings") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Cluster) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *Cluster) validateSupportedConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedConfig) { // not required - return nil - } - - if m.SupportedConfig != nil { - if err := m.SupportedConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("supportedConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("supportedConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateSyslogServers(formats strfmt.Registry) error { - if swag.IsZero(m.SyslogServers) { // not required - return nil - } - - for i := 0; i < len(m.SyslogServers); i++ { - if swag.IsZero(m.SyslogServers[i]) { // not required - continue - } - - if m.SyslogServers[i] != nil { - if err := m.SyslogServers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Cluster) validateTieringAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.TieringAuditLogConfig) { // not required - return nil - } - - if m.TieringAuditLogConfig != nil { - if err := m.TieringAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringAuditLogConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster based on the context it is used -func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAmqpTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppsSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskCountByTier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEulaConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilerAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHardwareInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLicenseState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNtpSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSupportedConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyslogServers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieringAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Cluster) contextValidateAmqpTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AmqpTargetConfig != nil { - - if swag.IsZero(m.AmqpTargetConfig) { // not required - return nil - } - - if err := m.AmqpTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amqpTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amqpTargetConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateAppsSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.AppsSubnet != nil { - - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if err := m.AppsSubnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateClusterAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterAuditLogConfig != nil { - - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if err := m.ClusterAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateDiskCountByTier(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "diskCountByTier", "body", []*CountByTier(m.DiskCountByTier)); err != nil { - return err - } - - for i := 0; i < len(m.DiskCountByTier); i++ { - - if m.DiskCountByTier[i] != nil { - - if swag.IsZero(m.DiskCountByTier[i]) { // not required - return nil - } - - if err := m.DiskCountByTier[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *Cluster) contextValidateFilerAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilerAuditLogConfig != nil { - - if swag.IsZero(m.FilerAuditLogConfig) { // not required - return nil - } - - if err := m.FilerAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateHardwareInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.HardwareInfo != nil { - - if swag.IsZero(m.HardwareInfo) { // not required - return nil - } - - if err := m.HardwareInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hardwareInfo") - } - return err - } - } - - return nil -} - -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 -} - -func (m *Cluster) contextValidateNtpSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.NtpSettings != nil { - - if swag.IsZero(m.NtpSettings) { // not required - return nil - } - - if err := m.NtpSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpSettings") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Cluster) 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 -} - -func (m *Cluster) contextValidateSupportedConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SupportedConfig != nil { - - if swag.IsZero(m.SupportedConfig) { // not required - return nil - } - - if err := m.SupportedConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("supportedConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("supportedConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateSyslogServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SyslogServers); i++ { - - if m.SyslogServers[i] != nil { - - if swag.IsZero(m.SyslogServers[i]) { // not required - return nil - } - - if err := m.SyslogServers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Cluster) contextValidateTieringAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringAuditLogConfig != nil { - - if swag.IsZero(m.TieringAuditLogConfig) { // not required - return nil - } - - if err := m.TieringAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringAuditLogConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Cluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Cluster) UnmarshalBinary(b []byte) error { - var res Cluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_audit_log.go b/v1/models/cluster_audit_log.go deleted file mode 100644 index 8d5a8464..00000000 --- a/v1/models/cluster_audit_log.go +++ /dev/null @@ -1,214 +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" -) - -// ClusterAuditLog Cluster Audit Log. -// -// Specifies information about a single Cluster audit log. -// When an action (such as pausing a Protection Job) occurs, an audit log is -// generated that provides details about the action. -// -// swagger:model ClusterAuditLog -type ClusterAuditLog struct { - - // Specifies the action that caused the log to be generated. - Action *string `json:"action,omitempty"` - - // Specifies the information of the cluster. - ClusterInfo *string `json:"clusterInfo,omitempty"` - - // Specifies more information about the action. - Details *string `json:"details,omitempty"` - - // Specifies the domain of the user who caused the action - // that generated the log. - Domain *string `json:"domain,omitempty"` - - // Specifies the id of the entity (object) that the action is invoked on. - EntityID *string `json:"entityId,omitempty"` - - // Specifies the entity (object) name that the action is invoked on. - // For example, if a Job called BackupEng is paused, this field - // returns BackupEng. - EntityName *string `json:"entityName,omitempty"` - - // Specifies the type of the entity (object) that the action is invoked on. - // For example, if a Job called BackupEng is paused, this field - // returns 'Protection Job'. - EntityType *string `json:"entityType,omitempty"` - - // Specifies the time when the log was generated. - // The time is specified using a human readable timestamp. - HumanTimestamp *string `json:"humanTimestamp,omitempty"` - - // Specifies if the log was generated during impersonation. - Impersonation *bool `json:"impersonation,omitempty"` - - // Specifies the IP address of the user making this action. - IP *string `json:"ip,omitempty"` - - // Specifies the record after the action is invoked. - NewRecord *string `json:"newRecord,omitempty"` - - // Specifies the tenant information of the actual user whose action generated - // the log in case of impersonation. - OriginalTenant *Tenant `json:"originalTenant,omitempty"` - - // Specifies the record before the action is invoked. - PreviousRecord *string `json:"previousRecord,omitempty"` - - // Specifies the tenant information of the user whose action generated the log. - Tenant *Tenant `json:"tenant,omitempty"` - - // Specifies the time when the log was generated. - // The time is specified using a Unix epoch Timestamp (in microseconds). - TimestampUsecs *int64 `json:"timestampUsecs,omitempty"` - - // Specifies the user who caused the action that generated the log. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this cluster audit log -func (m *ClusterAuditLog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOriginalTenant(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenant(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterAuditLog) validateOriginalTenant(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTenant) { // not required - return nil - } - - if m.OriginalTenant != nil { - if err := m.OriginalTenant.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTenant") - } - return err - } - } - - return nil -} - -func (m *ClusterAuditLog) validateTenant(formats strfmt.Registry) error { - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if m.Tenant != nil { - if err := m.Tenant.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster audit log based on the context it is used -func (m *ClusterAuditLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOriginalTenant(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenant(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterAuditLog) contextValidateOriginalTenant(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTenant != nil { - - if swag.IsZero(m.OriginalTenant) { // not required - return nil - } - - if err := m.OriginalTenant.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTenant") - } - return err - } - } - - return nil -} - -func (m *ClusterAuditLog) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { - - if m.Tenant != nil { - - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if err := m.Tenant.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterAuditLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterAuditLog) UnmarshalBinary(b []byte) error { - var res ClusterAuditLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_audit_log_configuration.go b/v1/models/cluster_audit_log_configuration.go deleted file mode 100644 index 5ef4d61b..00000000 --- a/v1/models/cluster_audit_log_configuration.go +++ /dev/null @@ -1,111 +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" -) - -// ClusterAuditLogConfiguration Cluster Audit Log Configuration. -// -// Specifies the settings of the Cluster audit log configuration. -// -// swagger:model ClusterAuditLogConfiguration -type ClusterAuditLogConfiguration struct { - - // Specifies if the Cluster audit logging is enabled on the - // Cohesity Cluster. - // If 'true', Cluster audit logging is enabled. Otherwise, it is disabled. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the number of days to keep (retain) the Cluster audit logs. - // Audit logs generated before the period of time specified by - // retentionPeriodDays are removed from the Cohesity Cluster. - // Required: true - RetentionPeriodDays *int32 `json:"retentionPeriodDays"` - - // Specifies if the Cluster audit logging includes prev value and new value. - // Required: true - VerboseAudit *bool `json:"verboseAudit"` -} - -// Validate validates this cluster audit log configuration -func (m *ClusterAuditLogConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPeriodDays(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVerboseAudit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterAuditLogConfiguration) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *ClusterAuditLogConfiguration) validateRetentionPeriodDays(formats strfmt.Registry) error { - - if err := validate.Required("retentionPeriodDays", "body", m.RetentionPeriodDays); err != nil { - return err - } - - return nil -} - -func (m *ClusterAuditLogConfiguration) validateVerboseAudit(formats strfmt.Registry) error { - - if err := validate.Required("verboseAudit", "body", m.VerboseAudit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster audit log configuration based on context it is used -func (m *ClusterAuditLogConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterAuditLogConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterAuditLogConfiguration) UnmarshalBinary(b []byte) error { - var res ClusterAuditLogConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_audit_logs_search_result.go b/v1/models/cluster_audit_logs_search_result.go deleted file mode 100644 index 1d15625a..00000000 --- a/v1/models/cluster_audit_logs_search_result.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterAuditLogsSearchResult Cluster Audit Log Filter Result. -// -// Returns the Cluster audit logs that match the specified filter criteria -// up to the limit specified in pageCount. -// -// swagger:model ClusterAuditLogsSearchResult -type ClusterAuditLogsSearchResult struct { - - // Array of Cluster Audit Logs. - // - // Specifies a list of Cluster audit logs that match the specified - // filter criteria up to the limit specified in pageCount. - ClusterAuditLogs []*ClusterAuditLog `json:"clusterAuditLogs"` - - // Specifies the total number of logs that match the specified - // filter criteria. (This number might be larger than the size of the - // Cluster Audit Logs array.) - // This count is provided to indicate if additional requests must be - // made to get the full result. - TotalCount *int64 `json:"totalCount,omitempty"` -} - -// Validate validates this cluster audit logs search result -func (m *ClusterAuditLogsSearchResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterAuditLogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterAuditLogsSearchResult) validateClusterAuditLogs(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterAuditLogs) { // not required - return nil - } - - for i := 0; i < len(m.ClusterAuditLogs); i++ { - if swag.IsZero(m.ClusterAuditLogs[i]) { // not required - continue - } - - if m.ClusterAuditLogs[i] != nil { - if err := m.ClusterAuditLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster audit logs search result based on the context it is used -func (m *ClusterAuditLogsSearchResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterAuditLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterAuditLogsSearchResult) contextValidateClusterAuditLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterAuditLogs); i++ { - - if m.ClusterAuditLogs[i] != nil { - - if swag.IsZero(m.ClusterAuditLogs[i]) { // not required - return nil - } - - if err := m.ClusterAuditLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterAuditLogsSearchResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterAuditLogsSearchResult) UnmarshalBinary(b []byte) error { - var res ClusterAuditLogsSearchResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_n_t_p_auth_key_info.go b/v1/models/cluster_config_proto_n_t_p_auth_key_info.go deleted file mode 100644 index d456fa12..00000000 --- a/v1/models/cluster_config_proto_n_t_p_auth_key_info.go +++ /dev/null @@ -1,56 +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" -) - -// ClusterConfigProtoNTPAuthKeyInfo List of ntp server auth keys configured for this cluster. -// -// swagger:model ClusterConfigProto_NTPAuthKeyInfo -type ClusterConfigProtoNTPAuthKeyInfo struct { - - // This contains the ntp server address - NtpServer *string `json:"ntpServer,omitempty"` - - // This contains the key id as provided by the user. - NtpServerAuthKeyID *int32 `json:"ntpServerAuthKeyId,omitempty"` - - // This contains the SHA1 key value as provided by the user. - NtpServerAuthKeyValue *string `json:"ntpServerAuthKeyValue,omitempty"` -} - -// Validate validates this cluster config proto n t p auth key info -func (m *ClusterConfigProtoNTPAuthKeyInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto n t p auth key info based on context it is used -func (m *ClusterConfigProtoNTPAuthKeyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoNTPAuthKeyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoNTPAuthKeyInfo) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoNTPAuthKeyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_qo_s_mapping.go b/v1/models/cluster_config_proto_qo_s_mapping.go deleted file mode 100644 index 218ba315..00000000 --- a/v1/models/cluster_config_proto_qo_s_mapping.go +++ /dev/null @@ -1,126 +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" -) - -// ClusterConfigProtoQoSMapping Mapping from a QoSContext to a QoSPrincipal. -// NOTE: 'type' and 'priority' fields have been converted from required to -// optional in v2.5. Adding a new value to an enumeration for which there is -// a required field in any message breaks the software upgrade process. -// During an upgrade, it is common for different cluster nodes to run -// different versions of the code for a short period of time. So if a node -// running a newer version of the code goes ahead and sets the required field -// to the newly added enum value, the old code running on other nodes may go -// into crash loops due to protobuf parse failures. -// -// If a new enum value is added to either QoSMapping.Type or -// QoSPrincipal.Priority in a future version, direct upgrades must be -// disallowed from a pre-2.5 version to that version (without upgrading to -// 2.5 first). Contact nexus team for getting an appropriate restriction into -// the upgrade compatibility list. -// -// swagger:model ClusterConfigProto_QoSMapping -type ClusterConfigProtoQoSMapping struct { - - // Principal id of the QoS principal to which qos_context maps to. - PrincipalID *int64 `json:"principalId,omitempty"` - - // qos context - QosContext *ClusterConfigProtoQoSMappingQoSContext `json:"qosContext,omitempty"` -} - -// Validate validates this cluster config proto qo s mapping -func (m *ClusterConfigProtoQoSMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQosContext(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoQoSMapping) validateQosContext(formats strfmt.Registry) error { - if swag.IsZero(m.QosContext) { // not required - return nil - } - - if m.QosContext != nil { - if err := m.QosContext.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosContext") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosContext") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster config proto qo s mapping based on the context it is used -func (m *ClusterConfigProtoQoSMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQosContext(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoQoSMapping) contextValidateQosContext(ctx context.Context, formats strfmt.Registry) error { - - if m.QosContext != nil { - - if swag.IsZero(m.QosContext) { // not required - return nil - } - - if err := m.QosContext.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosContext") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosContext") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoQoSMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoQoSMapping) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoQoSMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_qo_s_mapping_qo_s_context.go b/v1/models/cluster_config_proto_qo_s_mapping_qo_s_context.go deleted file mode 100644 index 3ebaee2f..00000000 --- a/v1/models/cluster_config_proto_qo_s_mapping_qo_s_context.go +++ /dev/null @@ -1,65 +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" -) - -// ClusterConfigProtoQoSMappingQoSContext QoSContext captures the properties that are relevant for QoS in a -// request. If a new field is added to QoSContext, cluster_config.h should -// be changed to enhance the hasher (QoSContextHash) and comparator -// (QoSContextEqual) for QoSContext. -// -// swagger:model ClusterConfigProto_QoSMapping_QoSContext -type ClusterConfigProtoQoSMappingQoSContext struct { - - // Component from which request is coming. - Component *int32 `json:"component,omitempty"` - - // Priority of a request. - Priority *int32 `json:"priority,omitempty"` - - // type - Type *int32 `json:"type,omitempty"` - - // View box id of a request. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // View id of a request. - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this cluster config proto qo s mapping qo s context -func (m *ClusterConfigProtoQoSMappingQoSContext) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto qo s mapping qo s context based on context it is used -func (m *ClusterConfigProtoQoSMappingQoSContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoQoSMappingQoSContext) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoQoSMappingQoSContext) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoQoSMappingQoSContext - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_s_id.go b/v1/models/cluster_config_proto_s_id.go deleted file mode 100644 index e6d39928..00000000 --- a/v1/models/cluster_config_proto_s_id.go +++ /dev/null @@ -1,61 +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" -) - -// ClusterConfigProtoSID Represents the security identifier that uniquely defines a security -// principal. SIDs are associated with users and groups. -// Reference: https://msdn.microsoft.com/en-us/library/aa379597.aspx -// -// swagger:model ClusterConfigProto_SID -type ClusterConfigProtoSID struct { - - // The authority under which the SID was created. This is always 6 bytes - // long. - IdentifierAuthority []uint8 `json:"identifierAuthority"` - - // The revision level of the SID. - RevisionLevel *int32 `json:"revisionLevel,omitempty"` - - // List of ids relative to the identifier_authority that uniquely - // identify a principal. The last entry in this list is the RID, which - // uniquely identifies the principal within a domain. - SubAuthority []uint32 `json:"subAuthority"` -} - -// Validate validates this cluster config proto s ID -func (m *ClusterConfigProtoSID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto s ID based on context it is used -func (m *ClusterConfigProtoSID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoSID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoSID) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoSID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_storage_policy_override.go b/v1/models/cluster_config_proto_storage_policy_override.go deleted file mode 100644 index d8a23641..00000000 --- a/v1/models/cluster_config_proto_storage_policy_override.go +++ /dev/null @@ -1,56 +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" -) - -// ClusterConfigProtoStoragePolicyOverride The following describes the overridden storage policy. -// -// swagger:model ClusterConfigProto_StoragePolicyOverride -type ClusterConfigProtoStoragePolicyOverride struct { - - // If the following id set to true, we would disable dedup for writes made - // in this view irrespective of the view box's storage policy. - DisableDedup *bool `json:"disableDedup,omitempty"` - - // If this is set to true, we will not do inline dedup and compression even - // if deduplicate_compress_delay_secs is set to 0 in the view box's storage - // policy. - DisableInlineDedupAndCompression *bool `json:"disableInlineDedupAndCompression,omitempty"` -} - -// Validate validates this cluster config proto storage policy override -func (m *ClusterConfigProtoStoragePolicyOverride) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto storage policy override based on context it is used -func (m *ClusterConfigProtoStoragePolicyOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoStoragePolicyOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoStoragePolicyOverride) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoStoragePolicyOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_subnet.go b/v1/models/cluster_config_proto_subnet.go deleted file mode 100644 index 5c25b8dc..00000000 --- a/v1/models/cluster_config_proto_subnet.go +++ /dev/null @@ -1,86 +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" -) - -// ClusterConfigProtoSubnet The following message defines a subnet. -// -// swagger:model ClusterConfigProto_Subnet -type ClusterConfigProtoSubnet struct { - - // The component that has claimed this subnet. - Component *int32 `json:"component,omitempty"` - - // Description of the subnet. - Description *string `json:"description,omitempty"` - - // Gateway for the subnet. - Gateway *string `json:"gateway,omitempty"` - - // ID for this subnet. - ID *int32 `json:"id,omitempty"` - - // ip is subnet IP address given either in v4 or v6. Netmask is - // specified by giving CIDR length in netmask_bits for ipv6. - // For IPv4 addresses, netmask_ip4 field is set in dotted decimal. - IP *string `json:"ip,omitempty"` - - // netmask bits - NetmaskBits *int32 `json:"netmaskBits,omitempty"` - - // netmask ip4 - NetmaskIp4 *string `json:"netmaskIp4,omitempty"` - - // Whether clients from this subnet can mount using NFS protocol. - NfsAccess *int32 `json:"nfsAccess,omitempty"` - - // Whether all clients from this subnet can map view with - // view_all_squash_uid/view_all_squash_gid configured in the view. - NfsAllSquash *bool `json:"nfsAllSquash,omitempty"` - - // Whether clients from this subnet can mount as root on NFS. - NfsRootSquash *bool `json:"nfsRootSquash,omitempty"` - - // Whether clients from this subnet can accept requests using S3 protocol. - S3Access *int32 `json:"s3Access,omitempty"` - - // Whether clients from this subnet can mount using SMB protocol. - SmbAccess *int32 `json:"smbAccess,omitempty"` -} - -// Validate validates this cluster config proto subnet -func (m *ClusterConfigProtoSubnet) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto subnet based on context it is used -func (m *ClusterConfigProtoSubnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoSubnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoSubnet) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoSubnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties.go deleted file mode 100644 index 5ceae14c..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties.go +++ /dev/null @@ -1,314 +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" -) - -// ClusterConfigProtoVaultCloudProperties The following represents the cloud properties proto which handles -// different properties supported by different cloud providers. -// -// swagger:model ClusterConfigProto_Vault_CloudProperties -type ClusterConfigProtoVaultCloudProperties struct { - - // amazon properties - AmazonProperties *ClusterConfigProtoVaultCloudPropertiesAmazonProperties `json:"amazonProperties,omitempty"` - - // azure properties - AzureProperties *ClusterConfigProtoVaultCloudPropertiesAzureProperties `json:"azureProperties,omitempty"` - - // google properties - GoogleProperties *ClusterConfigProtoVaultCloudPropertiesGoogleProperties `json:"googleProperties,omitempty"` - - // oracle properties - OracleProperties *ClusterConfigProtoVaultCloudPropertiesOracleProperties `json:"oracleProperties,omitempty"` - - // Encapsulates various properties of S3 Compatible targets. - S3CompatibleProperties *ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties `json:"s3CompatibleProperties,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties -func (m *ClusterConfigProtoVaultCloudProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAmazonProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogleProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3CompatibleProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) validateAmazonProperties(formats strfmt.Registry) error { - if swag.IsZero(m.AmazonProperties) { // not required - return nil - } - - if m.AmazonProperties != nil { - if err := m.AmazonProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amazonProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amazonProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) validateAzureProperties(formats strfmt.Registry) error { - if swag.IsZero(m.AzureProperties) { // not required - return nil - } - - if m.AzureProperties != nil { - if err := m.AzureProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) validateGoogleProperties(formats strfmt.Registry) error { - if swag.IsZero(m.GoogleProperties) { // not required - return nil - } - - if m.GoogleProperties != nil { - if err := m.GoogleProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) validateOracleProperties(formats strfmt.Registry) error { - if swag.IsZero(m.OracleProperties) { // not required - return nil - } - - if m.OracleProperties != nil { - if err := m.OracleProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) validateS3CompatibleProperties(formats strfmt.Registry) error { - if swag.IsZero(m.S3CompatibleProperties) { // not required - return nil - } - - if m.S3CompatibleProperties != nil { - if err := m.S3CompatibleProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompatibleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompatibleProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster config proto vault cloud properties based on the context it is used -func (m *ClusterConfigProtoVaultCloudProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAmazonProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogleProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3CompatibleProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) contextValidateAmazonProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.AmazonProperties != nil { - - if swag.IsZero(m.AmazonProperties) { // not required - return nil - } - - if err := m.AmazonProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amazonProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amazonProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) contextValidateAzureProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureProperties != nil { - - if swag.IsZero(m.AzureProperties) { // not required - return nil - } - - if err := m.AzureProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) contextValidateGoogleProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.GoogleProperties != nil { - - if swag.IsZero(m.GoogleProperties) { // not required - return nil - } - - if err := m.GoogleProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) contextValidateOracleProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleProperties != nil { - - if swag.IsZero(m.OracleProperties) { // not required - return nil - } - - if err := m.OracleProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleProperties") - } - return err - } - } - - return nil -} - -func (m *ClusterConfigProtoVaultCloudProperties) contextValidateS3CompatibleProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.S3CompatibleProperties != nil { - - if swag.IsZero(m.S3CompatibleProperties) { // not required - return nil - } - - if err := m.S3CompatibleProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompatibleProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompatibleProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties_amazon_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties_amazon_properties.go deleted file mode 100644 index b6cac869..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties_amazon_properties.go +++ /dev/null @@ -1,58 +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" -) - -// ClusterConfigProtoVaultCloudPropertiesAmazonProperties cluster config proto vault cloud properties amazon properties -// -// swagger:model ClusterConfigProto_Vault_CloudProperties_AmazonProperties -type ClusterConfigProtoVaultCloudPropertiesAmazonProperties struct { - - // Whether this vault supports AWS Lambda based GC. A Lambda function - // needs to be deployed in the customer's AWS environment or the IAM - // user should have permissions to create one. - EnableLambdaBasedGc *bool `json:"enableLambdaBasedGc,omitempty"` - - // Version of the Lambda function deployed in the cloud. - LambdaFunctionVersion *int32 `json:"lambdaFunctionVersion,omitempty"` - - // tier type - TierType *int32 `json:"tierType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties amazon properties -func (m *ClusterConfigProtoVaultCloudPropertiesAmazonProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto vault cloud properties amazon properties based on context it is used -func (m *ClusterConfigProtoVaultCloudPropertiesAmazonProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesAmazonProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesAmazonProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudPropertiesAmazonProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties_azure_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties_azure_properties.go deleted file mode 100644 index af11991c..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties_azure_properties.go +++ /dev/null @@ -1,64 +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" -) - -// ClusterConfigProtoVaultCloudPropertiesAzureProperties cluster config proto vault cloud properties azure properties -// -// swagger:model ClusterConfigProto_Vault_CloudProperties_AzureProperties -type ClusterConfigProtoVaultCloudPropertiesAzureProperties struct { - - // Whether this vault supports Azure function based GC. An Azure - // function needs to be deployed in the customer's Azure environment. - EnableLambdaBasedGc *bool `json:"enableLambdaBasedGc,omitempty"` - - // Version of the Lambda function deployed in the cloud. - LambdaFunctionVersion *int32 `json:"lambdaFunctionVersion,omitempty"` - - // tier type - TierType *int32 `json:"tierType,omitempty"` - - // Indicates whether write once read many (WORM) protection is enabled - // for the Azure container. When set to true, the following fields must - // be populated in CloudCredentials.Microsoft in order to query the - // immutability policy duration of an Azure container: resource_group, - // subscription_id, application_id, application_key and tenant_id. - WormEnabled *bool `json:"wormEnabled,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties azure properties -func (m *ClusterConfigProtoVaultCloudPropertiesAzureProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto vault cloud properties azure properties based on context it is used -func (m *ClusterConfigProtoVaultCloudPropertiesAzureProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesAzureProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesAzureProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudPropertiesAzureProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties_google_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties_google_properties.go deleted file mode 100644 index 346f8154..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties_google_properties.go +++ /dev/null @@ -1,50 +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" -) - -// ClusterConfigProtoVaultCloudPropertiesGoogleProperties cluster config proto vault cloud properties google properties -// -// swagger:model ClusterConfigProto_Vault_CloudProperties_GoogleProperties -type ClusterConfigProtoVaultCloudPropertiesGoogleProperties struct { - - // tier type - TierType *int32 `json:"tierType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties google properties -func (m *ClusterConfigProtoVaultCloudPropertiesGoogleProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto vault cloud properties google properties based on context it is used -func (m *ClusterConfigProtoVaultCloudPropertiesGoogleProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesGoogleProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesGoogleProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudPropertiesGoogleProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties_oracle_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties_oracle_properties.go deleted file mode 100644 index 54529402..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties_oracle_properties.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" -) - -// ClusterConfigProtoVaultCloudPropertiesOracleProperties cluster config proto vault cloud properties oracle properties -// -// swagger:model ClusterConfigProto_Vault_CloudProperties_OracleProperties -type ClusterConfigProtoVaultCloudPropertiesOracleProperties struct { - - // Tenant part of the REST endpoints for Oracle S3 compatible vaults. - Tenant *string `json:"tenant,omitempty"` - - // tier type - TierType *int32 `json:"tierType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties oracle properties -func (m *ClusterConfigProtoVaultCloudPropertiesOracleProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto vault cloud properties oracle properties based on context it is used -func (m *ClusterConfigProtoVaultCloudPropertiesOracleProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesOracleProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesOracleProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudPropertiesOracleProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_properties_s3_compatible_properties.go b/v1/models/cluster_config_proto_vault_cloud_properties_s3_compatible_properties.go deleted file mode 100644 index 454d2930..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_properties_s3_compatible_properties.go +++ /dev/null @@ -1,50 +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" -) - -// ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties cluster config proto vault cloud properties s3 compatible properties -// -// swagger:model ClusterConfigProto_Vault_CloudProperties_S3CompatibleProperties -type ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties struct { - - // tier type - TierType *int32 `json:"tierType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud properties s3 compatible properties -func (m *ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster config proto vault cloud properties s3 compatible properties based on context it is used -func (m *ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudPropertiesS3CompatibleProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index 8cd24473..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_tier_info.go +++ /dev/null @@ -1,127 +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" -) - -// ClusterConfigProtoVaultCloudTierInfo Proto representing snapshot tier info for a cloud target. -// -// swagger:model ClusterConfigProto_Vault_CloudTierInfo -type ClusterConfigProtoVaultCloudTierInfo struct { - - // Flag that determines whether this tiering info is to be honored or - // not. By default this tiering setting will be ignored. This must be - // explicitly set to true in order to honor this setting. - HonorTierInfo *bool `json:"honorTierInfo,omitempty"` - - // 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) - // 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. - // The snapshot will reside in S3 (default tier) for 1 month, then 1 - // month in glacier tier, and then another 1 month in deep glacier before - // being deleted. - NumSecsToMoveAfter *int64 `json:"numSecsToMoveAfter,omitempty"` - - // Represents the target tier to which a archive snapshot needs to be - // moved/migrated. Currently we only allow down-tiering (i.e. moving - // snapshots to a colder tier compared to current tier). - TargetTierType *ClusterConfigProtoVaultCloudTierType `json:"targetTierType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud tier info -func (m *ClusterConfigProtoVaultCloudTierInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierInfo) validateTargetTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TargetTierType) { // not required - return nil - } - - if m.TargetTierType != nil { - if err := m.TargetTierType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTierType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTierType") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster config proto vault cloud tier info based on the context it is used -func (m *ClusterConfigProtoVaultCloudTierInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetTierType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierInfo) contextValidateTargetTierType(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetTierType != nil { - - if swag.IsZero(m.TargetTierType) { // not required - return nil - } - - if err := m.TargetTierType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTierType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTierType") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierInfo) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudTierInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_tier_setting.go b/v1/models/cluster_config_proto_vault_cloud_tier_setting.go deleted file mode 100644 index 8cf60732..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_tier_setting.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterConfigProtoVaultCloudTierSetting Proto representing snapshot tier setting for a cloud target. -// -// swagger:model ClusterConfigProto_Vault_CloudTierSetting -type ClusterConfigProtoVaultCloudTierSetting struct { - - // Information about tiering/migrating the cloud snapshots. - TierInfoVec []*ClusterConfigProtoVaultCloudTierInfo `json:"tierInfoVec"` -} - -// Validate validates this cluster config proto vault cloud tier setting -func (m *ClusterConfigProtoVaultCloudTierSetting) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTierInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierSetting) validateTierInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.TierInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.TierInfoVec); i++ { - if swag.IsZero(m.TierInfoVec[i]) { // not required - continue - } - - if m.TierInfoVec[i] != nil { - if err := m.TierInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster config proto vault cloud tier setting based on the context it is used -func (m *ClusterConfigProtoVaultCloudTierSetting) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTierInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierSetting) contextValidateTierInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TierInfoVec); i++ { - - if m.TierInfoVec[i] != nil { - - if swag.IsZero(m.TierInfoVec[i]) { // not required - return nil - } - - if err := m.TierInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierSetting) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierSetting) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudTierSetting - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_config_proto_vault_cloud_tier_type.go b/v1/models/cluster_config_proto_vault_cloud_tier_type.go deleted file mode 100644 index fc58ab96..00000000 --- a/v1/models/cluster_config_proto_vault_cloud_tier_type.go +++ /dev/null @@ -1,116 +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" -) - -// ClusterConfigProtoVaultCloudTierType Proto representing a cloud tier type. -// -// swagger:model ClusterConfigProto_Vault_CloudTierType -type ClusterConfigProtoVaultCloudTierType struct { - - // Field represeting cloud properties, which contains different - // properties (tiers/classes) supported by different cloud providers. In - // case of Oracle cloud, the 'tenant' property of OracleProperties - // message would not be populated for this use case. - CloudProperties *ClusterConfigProtoVaultCloudProperties `json:"cloudProperties,omitempty"` - - // Field representing the cloud type. - // Currently tiers are supported for kAzure, kGoogle, kAmazon, kOracle. - CloudType *int32 `json:"cloudType,omitempty"` -} - -// Validate validates this cluster config proto vault cloud tier type -func (m *ClusterConfigProtoVaultCloudTierType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierType) validateCloudProperties(formats strfmt.Registry) error { - if swag.IsZero(m.CloudProperties) { // not required - return nil - } - - if m.CloudProperties != nil { - if err := m.CloudProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster config proto vault cloud tier type based on the context it is used -func (m *ClusterConfigProtoVaultCloudTierType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterConfigProtoVaultCloudTierType) contextValidateCloudProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudProperties != nil { - - if swag.IsZero(m.CloudProperties) { // not required - return nil - } - - if err := m.CloudProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConfigProtoVaultCloudTierType) UnmarshalBinary(b []byte) error { - var res ClusterConfigProtoVaultCloudTierType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_creation_progress_result.go b/v1/models/cluster_creation_progress_result.go deleted file mode 100644 index da4674b3..00000000 --- a/v1/models/cluster_creation_progress_result.go +++ /dev/null @@ -1,80 +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" -) - -// ClusterCreationProgressResult Cluster Creation Progress Result. -// -// Specifies the values returned after a successful request to get the -// Cluster creation progress. -// -// swagger:model ClusterCreationProgressResult -type ClusterCreationProgressResult struct { - - // Specifies an approximate completion percentage for the Cluster creation - // process. - CompletionPercentage *int32 `json:"completionPercentage,omitempty"` - - // Specifies a description of an error if any error was encountered during - // Cluster creation. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies a list of events that took place during Cluster creation. - Events []string `json:"events"` - - // Specifies whether or not the Cluster is still in the process of being - // created. Once the creation process is complete, this will be set to - // false and then, shortly afterward, all Cluster services will restart. The - // Cluster will be unreachable for about a minute while the services are - // being restarted. - InProgress *bool `json:"inProgress,omitempty"` - - // Specifies an optional message describing the current state of the - // creation progress operation. - Message *string `json:"message,omitempty"` - - // Specifies an estimated number of seconds until the Cluster creation - // process is complete. - SecondsRemaining *int64 `json:"secondsRemaining,omitempty"` - - // Specifies whether or not any warnings were encountered during Cluster - // creation. - WarningsFound *bool `json:"warningsFound,omitempty"` -} - -// Validate validates this cluster creation progress result -func (m *ClusterCreationProgressResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster creation progress result based on context it is used -func (m *ClusterCreationProgressResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreationProgressResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreationProgressResult) UnmarshalBinary(b []byte) error { - var res ClusterCreationProgressResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} 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_hardware_info.go b/v1/models/cluster_hardware_info.go deleted file mode 100644 index 62fe4687..00000000 --- a/v1/models/cluster_hardware_info.go +++ /dev/null @@ -1,57 +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" -) - -// ClusterHardwareInfo Cohesity Cluster Hardware. -// -// Specifies a hardware type for motherboard of the Nodes -// that make up this Cohesity Cluster such as S2600WB for Ivy Bridge -// or S2600TP for Haswell. -// -// swagger:model ClusterHardwareInfo -type ClusterHardwareInfo struct { - - // hardware models - HardwareModels []string `json:"hardwareModels"` - - // hardware vendors - HardwareVendors []string `json:"hardwareVendors"` -} - -// Validate validates this cluster hardware info -func (m *ClusterHardwareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster hardware info based on context it is used -func (m *ClusterHardwareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterHardwareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterHardwareInfo) UnmarshalBinary(b []byte) error { - var res ClusterHardwareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_identifier.go b/v1/models/cluster_identifier.go deleted file mode 100644 index 55d263e6..00000000 --- a/v1/models/cluster_identifier.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" -) - -// ClusterIdentifier ClusterIdentifier uniquely identifies a cluster. -// -// swagger:model ClusterIdentifier -type ClusterIdentifier struct { - - // Specifies the cluster id of the cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` -} - -// Validate validates this cluster identifier -func (m *ClusterIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster identifier based on context it is used -func (m *ClusterIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterIdentifier) UnmarshalBinary(b []byte) error { - var res ClusterIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_info.go b/v1/models/cluster_info.go deleted file mode 100644 index d0743cc7..00000000 --- a/v1/models/cluster_info.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" -) - -// ClusterInfo cluster info -// -// swagger:model ClusterInfo -type ClusterInfo struct { - - // Specifies the id of the cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster. - IncarnationID *int64 `json:"incarnationId,omitempty"` -} - -// Validate validates this cluster info -func (m *ClusterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster info based on context it is used -func (m *ClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterInfo) UnmarshalBinary(b []byte) error { - var res ClusterInfo - 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_list_master_resp.go b/v1/models/cluster_list_master_resp.go deleted file mode 100644 index 823bcc67..00000000 --- a/v1/models/cluster_list_master_resp.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterListMasterResp ClusterListMasterResp is the struct to specify cluster list master -// details response. -// -// swagger:model ClusterListMasterResp -type ClusterListMasterResp struct { - - // List of all ServicesLockInfo details requested. - ServicesLockInfoVec []*ServicesLockInfo `json:"services_lock_info_vec"` -} - -// Validate validates this cluster list master resp -func (m *ClusterListMasterResp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServicesLockInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterListMasterResp) validateServicesLockInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.ServicesLockInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.ServicesLockInfoVec); i++ { - if swag.IsZero(m.ServicesLockInfoVec[i]) { // not required - continue - } - - if m.ServicesLockInfoVec[i] != nil { - if err := m.ServicesLockInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services_lock_info_vec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services_lock_info_vec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster list master resp based on the context it is used -func (m *ClusterListMasterResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServicesLockInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterListMasterResp) contextValidateServicesLockInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServicesLockInfoVec); i++ { - - if m.ServicesLockInfoVec[i] != nil { - - if swag.IsZero(m.ServicesLockInfoVec[i]) { // not required - return nil - } - - if err := m.ServicesLockInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services_lock_info_vec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services_lock_info_vec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterListMasterResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterListMasterResp) UnmarshalBinary(b []byte) error { - var res ClusterListMasterResp - 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 deleted file mode 100644 index 857d1b6b..00000000 --- a/v1/models/cluster_networking_endpoint.go +++ /dev/null @@ -1,58 +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" -) - -// ClusterNetworkingEndpoint Cluster Networking Endpoint. -// -// Specifies information about end point. -// -// swagger:model ClusterNetworkingEndpoint -type ClusterNetworkingEndpoint struct { - - // The Fully Qualified Domain Name. - Fqdn *string `json:"fqdn,omitempty"` - - // The IPv4 address. - IPV4Addr *string `json:"ipv4Addr,omitempty"` - - // The IPv6 address. - IPV6Addr *string `json:"ipv6Addr,omitempty"` -} - -// Validate validates this cluster networking endpoint -func (m *ClusterNetworkingEndpoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster networking endpoint based on context it is used -func (m *ClusterNetworkingEndpoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNetworkingEndpoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNetworkingEndpoint) UnmarshalBinary(b []byte) error { - var res ClusterNetworkingEndpoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_networking_info.go b/v1/models/cluster_networking_info.go deleted file mode 100644 index fa73af8c..00000000 --- a/v1/models/cluster_networking_info.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterNetworkingInfo Information about network addresses configured on the given box. -// -// This is needed for dealing with Windows/Oracle Cluster resources that we -// discover and protect automagically. -// -// swagger:model ClusterNetworkingInfo -type ClusterNetworkingInfo struct { - - // The list of resources on the the system that are accessible by an - // IP address. - ResourceVec []*ClusterNetworkingInfoResource `json:"resourceVec"` -} - -// Validate validates this cluster networking info -func (m *ClusterNetworkingInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourceVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingInfo) validateResourceVec(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceVec) { // not required - return nil - } - - for i := 0; i < len(m.ResourceVec); i++ { - if swag.IsZero(m.ResourceVec[i]) { // not required - continue - } - - if m.ResourceVec[i] != nil { - if err := m.ResourceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster networking info based on the context it is used -func (m *ClusterNetworkingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingInfo) contextValidateResourceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResourceVec); i++ { - - if m.ResourceVec[i] != nil { - - if swag.IsZero(m.ResourceVec[i]) { // not required - return nil - } - - if err := m.ResourceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNetworkingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNetworkingInfo) UnmarshalBinary(b []byte) error { - var res ClusterNetworkingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_networking_info_endpoint.go b/v1/models/cluster_networking_info_endpoint.go deleted file mode 100644 index ecc405d3..00000000 --- a/v1/models/cluster_networking_info_endpoint.go +++ /dev/null @@ -1,68 +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" -) - -// ClusterNetworkingInfoEndpoint Captures information about a single "physical" or "clustered resource" -// -// endpoint. Magneto can connect to any one of the specified addresses. -// -// swagger:model ClusterNetworkingInfo_Endpoint -type ClusterNetworkingInfoEndpoint struct { - - // The Fully Qualified Domain Name. - Fqdn *string `json:"fqdn,omitempty"` - - // The IPv4 address. - IPV4Addr *string `json:"ipv4Addr,omitempty"` - - // The IPv6 address. - IPV6Addr *string `json:"ipv6Addr,omitempty"` - - // If this endpoint is preferred. Currently preference is tagged for - // entries found using 'olsnodes -s' command. - IsPreferredEndpoint *bool `json:"isPreferredEndpoint,omitempty"` - - // Contains a copy of the preferred address among the above addresses. - PreferredAddress *string `json:"preferredAddress,omitempty"` - - // Subnet in IPv4 address format. - SubnetIp4Addr *string `json:"subnetIp4Addr,omitempty"` -} - -// Validate validates this cluster networking info endpoint -func (m *ClusterNetworkingInfoEndpoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster networking info endpoint based on context it is used -func (m *ClusterNetworkingInfoEndpoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNetworkingInfoEndpoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNetworkingInfoEndpoint) UnmarshalBinary(b []byte) error { - var res ClusterNetworkingInfoEndpoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_networking_info_resource.go b/v1/models/cluster_networking_info_resource.go deleted file mode 100644 index 969a2cb7..00000000 --- a/v1/models/cluster_networking_info_resource.go +++ /dev/null @@ -1,159 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterNetworkingInfoResource Represents a resource that has an IP address. -// -// swagger:model ClusterNetworkingInfo_Resource -type ClusterNetworkingInfoResource struct { - - // The endpoints by which the resource is accessible. - EndpointVec []*ClusterNetworkingInfoEndpoint `json:"endpointVec"` - - // GUID from the Windows Cluster API that identifies the resource. We need - // this for kSQL resources in order to implement a stable UID of the - // kPhysical/kWindowsCluster objects. It is used to identify nodes in - // the SQL topology tree. It is unique and consistent across all nodes of - // a WSFC. - // If the resource is a standalone kServer not part of WSFC, this field - // is not set. - // If the resource is of type kServer part of WSFC, this field is set to - // the label of a node in a WSFC, eg. (id:2) - // If the resource is of type kAAG, this field is set to the resource ID - // of the AAG in the WSFC. eg. (id:f9332cdf-84c2-4b7c-961c-2fcbaae690f8) - // If the resource is of type kSQL, this field is set to the resource ID - // of the FCI in the WSFC. eg. (id:b1h124hl-fal1-15ja-af81-asfkih0812ho) - ID *string `json:"id,omitempty"` - - // The name of the SQL Clustered Instance (aka FCI Instance). Only applies - // to resources of type kSQL. - InstanceName *string `json:"instanceName,omitempty"` - - // Set to 'true' when the information pertains to kServer and is produced - // by the cluster node on which the Agent is running. This information is - // complete unlike the non-native objects do not have the full networking - // info but are sufficient for connectivity. The point here is to surface - // complete and stable information that is only available on the given - // cluster node. - IsNative *bool `json:"isNative,omitempty"` - - // The name of the resource. Useful for capturing the names of resources - // of type kSQL, kSqlAAG and kServer for SQL topology detection. Note that - // the name only makes sense in the context of the type of resource. - // kSqlAAG: AAG group name - // kSQL: FCI Virtual Server Name - // kServer: NetBIOS Name/Hostname - Name *string `json:"name,omitempty"` - - // The type of the resource. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this cluster networking info resource -func (m *ClusterNetworkingInfoResource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpointVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingInfoResource) validateEndpointVec(formats strfmt.Registry) error { - if swag.IsZero(m.EndpointVec) { // not required - return nil - } - - for i := 0; i < len(m.EndpointVec); i++ { - if swag.IsZero(m.EndpointVec[i]) { // not required - continue - } - - if m.EndpointVec[i] != nil { - if err := m.EndpointVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster networking info resource based on the context it is used -func (m *ClusterNetworkingInfoResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpointVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingInfoResource) contextValidateEndpointVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EndpointVec); i++ { - - if m.EndpointVec[i] != nil { - - if swag.IsZero(m.EndpointVec[i]) { // not required - return nil - } - - if err := m.EndpointVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNetworkingInfoResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNetworkingInfoResource) UnmarshalBinary(b []byte) error { - var res ClusterNetworkingInfoResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_networking_resource_information.go b/v1/models/cluster_networking_resource_information.go deleted file mode 100644 index e0120c52..00000000 --- a/v1/models/cluster_networking_resource_information.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterNetworkingResourceInformation Cluster Networking Resource Information. -// -// Specifies a resource with IP address. -// -// swagger:model ClusterNetworkingResourceInformation -type ClusterNetworkingResourceInformation struct { - - // The endpoints by which the resource is accessible. - Endpoints []*ClusterNetworkingEndpoint `json:"endpoints"` - - // The type of the resource. - Type *string `json:"type,omitempty"` -} - -// Validate validates this cluster networking resource information -func (m *ClusterNetworkingResourceInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingResourceInformation) validateEndpoints(formats strfmt.Registry) error { - if swag.IsZero(m.Endpoints) { // not required - return nil - } - - for i := 0; i < len(m.Endpoints); i++ { - if swag.IsZero(m.Endpoints[i]) { // not required - continue - } - - if m.Endpoints[i] != nil { - if err := m.Endpoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster networking resource information based on the context it is used -func (m *ClusterNetworkingResourceInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpoints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNetworkingResourceInformation) contextValidateEndpoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Endpoints); i++ { - - if m.Endpoints[i] != nil { - - if swag.IsZero(m.Endpoints[i]) { // not required - return nil - } - - if err := m.Endpoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNetworkingResourceInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNetworkingResourceInformation) UnmarshalBinary(b []byte) error { - var res ClusterNetworkingResourceInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_partition.go b/v1/models/cluster_partition.go deleted file mode 100644 index e4356125..00000000 --- a/v1/models/cluster_partition.go +++ /dev/null @@ -1,152 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterPartition Cluster Partition. -// -// Provides details about a Cluster Partition. -// -// swagger:model ClusterPartition -type ClusterPartition struct { - - // Specifies that hostname that resolves to one or more Virtual IP - // Addresses (VIPs). - HostName *string `json:"hostName,omitempty"` - - // Specifies a unique identifier for the Cluster Partition. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the Cluster Partition. - Name *string `json:"name,omitempty"` - - // Array of Node Ids. - // - // Specifies a list of Node Ids that assigned to the Cluster Partition. - NodeIds []int64 `json:"nodeIds"` - - // Array of VIPs. - // - // Specifies a list of Virtual IP Addresses (VIPs) that route - // network traffic to the Cluster Partition. - Vips []string `json:"vips"` - - // Array of VLAN IPs. - // - // Specifies a list of VLAN IP Addresses that route network traffic - // within certain VLANs to the Cluster Partition. - VlanIps []string `json:"vlanIps"` - - // Array of VLANs. - // - // Specifies a list of VLANs for the Cluster Partition. - Vlans []*Vlan `json:"vlans"` -} - -// Validate validates this cluster partition -func (m *ClusterPartition) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlans(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterPartition) validateVlans(formats strfmt.Registry) error { - if swag.IsZero(m.Vlans) { // not required - return nil - } - - for i := 0; i < len(m.Vlans); i++ { - if swag.IsZero(m.Vlans[i]) { // not required - continue - } - - if m.Vlans[i] != nil { - if err := m.Vlans[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster partition based on the context it is used -func (m *ClusterPartition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlans(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterPartition) contextValidateVlans(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vlans); i++ { - - if m.Vlans[i] != nil { - - if swag.IsZero(m.Vlans[i]) { // not required - return nil - } - - if err := m.Vlans[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterPartition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterPartition) UnmarshalBinary(b []byte) error { - var res ClusterPartition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_public_keys.go b/v1/models/cluster_public_keys.go deleted file mode 100644 index 5c78ffe6..00000000 --- a/v1/models/cluster_public_keys.go +++ /dev/null @@ -1,52 +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" -) - -// ClusterPublicKeys Cluster Public Keys. -// -// Specifies public keys stored on the Cluster. -// -// swagger:model ClusterPublicKeys -type ClusterPublicKeys struct { - - // Specifies the SSH public key used to login to Cluster nodes. - SSHPublicKey *string `json:"sshPublicKey,omitempty"` -} - -// Validate validates this cluster public keys -func (m *ClusterPublicKeys) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster public keys based on context it is used -func (m *ClusterPublicKeys) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterPublicKeys) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterPublicKeys) UnmarshalBinary(b []byte) error { - var res ClusterPublicKeys - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_stats.go b/v1/models/cluster_stats.go deleted file mode 100644 index b5c4e21e..00000000 --- a/v1/models/cluster_stats.go +++ /dev/null @@ -1,325 +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" -) - -// ClusterStats Cohesity Cluster Statistics. -// -// Specifies statistics about this Cohesity Cluster. -// -// swagger:model ClusterStats -type ClusterStats struct { - - // cloud usage perf stats - CloudUsagePerfStats *ClusterStatsCloudUsagePerfStats `json:"cloudUsagePerfStats,omitempty"` - - // Provides the ratio of Cluster Logical Data (totalLogicalUsageBytes) - // Managed to Cluster Storage Used (totalPhysicalUsageBytes) - DataReductionRatio *float64 `json:"dataReductionRatio,omitempty"` - - // Data Usage Statistics. - // - // Specifies the data usage metric of the data stored by the Cohesity - // Cluster. - DataUsageStats *DataUsageStats `json:"dataUsageStats,omitempty"` - - // 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"` - - // usage perf stats - UsagePerfStats *ClusterStatsUsagePerfStats `json:"usagePerfStats,omitempty"` -} - -// Validate validates this cluster stats -func (m *ClusterStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataUsageStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStats) validateCloudUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.CloudUsagePerfStats) { // not required - 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 -} - -func (m *ClusterStats) validateDataUsageStats(formats strfmt.Registry) error { - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if m.DataUsageStats != nil { - if err := m.DataUsageStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -func (m *ClusterStats) validateLocalUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.LocalUsagePerfStats) { // not required - 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 -} - -func (m *ClusterStats) validateLogicalStats(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalStats) { // not required - 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 -} - -func (m *ClusterStats) validateUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.UsagePerfStats) { // not required - 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 -} - -// ContextValidate validate this cluster stats based on the context it is used -func (m *ClusterStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataUsageStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *ClusterStats) contextValidateDataUsageStats(ctx context.Context, formats strfmt.Registry) error { - - if m.DataUsageStats != nil { - - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if err := m.DataUsageStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *ClusterStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStats) UnmarshalBinary(b []byte) error { - var res ClusterStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/cluster_status_result.go b/v1/models/cluster_status_result.go deleted file mode 100644 index abde79d3..00000000 --- a/v1/models/cluster_status_result.go +++ /dev/null @@ -1,488 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterStatusResult Cluster Status Result. -// -// Specifies the result of getting the status of a Cluster. -// -// swagger:model ClusterStatusResult -type ClusterStatusResult struct { - - // Specifies Airgap config - AirgapConfig *AirgapConfig `json:"airgapConfig,omitempty"` - - // Specifies the ID of the Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation ID of the Cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the current operation being run on the Cluster. - // 'kNone' indicates that there is no current operation taking place. - // 'kDestroy' indicates that the Cluster is currently being destroyed. - // 'kUpgrade' indicates that the Cluster is currently being upgraded. - // 'kClean' indicates that the Cluster is being cleaned. - // 'kRemoveNode' indicates that a Node is being removed from the Cluster. - // 'kRestartServices' indicates that the services on the Cluster are currently - // being restarted. - // Enum: ["kNone","kDestroy","kUpgrade","kClean","kRemoveNode","kRestartServices"] - CurrentOperation *string `json:"currentOperation,omitempty"` - - // Specifies an optional message describing details of the Cluster status. - Message *string `json:"message,omitempty"` - - // Specifies the name of the Cluster. - Name *string `json:"name,omitempty"` - - // Specifies the status of each Node on the Cluster. - NodeStatuses []*NodeStatusResult `json:"nodeStatuses"` - - // Specifies the current healing state of the Cluster. - // 'kNoRemoval' indicates that there are no removal operations currently - // happening on the Cluster. - // 'kNodeRemoval' indicates that there is a Node being removed from the - // Cluster. - // 'kDiskRemoval' indicates that there is a Disk being removed from the - // Cluster. - // 'kNodeAndDiskRemoval' indicates that there is a Node and a Disk being - // removed from the Cluster. - // Enum: ["kNoRemoval","kNodeRemoval","kDiskRemoval","kNodeAndDiskRemoval"] - RemovalState *string `json:"removalState,omitempty"` - - // Specifies whether or not the services are synced with the list of - // stopped services. - ServicesSynced *bool `json:"servicesSynced,omitempty"` - - // Specifies the software version of the Cluster. - SoftwareVersion *string `json:"softwareVersion,omitempty"` - - // Specifies the list of stopped services on the Cluster. - // 'kApollo' is a service for reclaiming freed disk sectors on Nodes in the - // SnapFS distributed file system. - // 'kBridge' is a service for managing the SnapFS distributed file system. - // 'kGenie' is a service that is responsible for monitoring hardware health - // on the Cluster. - // 'kGenieGofer' is a service that links the Genie service to other services - // on the Cluster. - // 'kMagneto' is the data protection service of the Cohesity Data Platform. - // 'kIris' is the service which serves REST API calls to the UI, CLI, and any - // scripts written by customers. - // 'kIrisProxy' is a service that links the Iris service to other services - // on the Cluster. - // 'kScribe' is the service responsible for storing filesystem metadata. - // 'kStats' is the service that is responsible for retrieving and aggregating - // disk metrics across the Cluster. - // 'kYoda' is an elastic search indexing service. - // 'kAlerts' is a publisher and subscribing service for alerts. - // 'kKeychain' is a service for managing disk encryption keys. - // 'kLogWatcher' is a service that scans the log directory and reduces - // the number of logs if required. - // 'kStatsCollector' is a service that periodically logs system stats. - // 'kGandalf' is a distributed lock service and coordination manager. - // 'kNexus' indicates the Nexus service. This is the service that is - // responsible for creation of Clusters and configuration of Nodes and - // networking. - // 'kNexusProxy' is a service that links the Nexus service to other services - // on the Cluster. - // 'kStorageProxy' is a service for accessing data on external entities. - // 'kRtClient' is a reverse tunneling client service. - // 'kVaultProxy' is a service for managing external targets that Clusters - // can be backed up to. - // 'kSmbProxy' is an SMB protocol service. - // 'kBridgeProxy' is the service that links the Bridge service to other - // services on the Cluster. - // 'kLibrarian' is an elastic search indexing service. - // 'kGroot' is a service for managing replication of SQL databases across - // multiple nodes in a Cluster. - // 'kEagleAgent' is a service that is responsible for retrieving information - // on Cluster health. - // 'kAthena' is a service for running distributed containerized applications - // on the Cohesity Data Platform. - // 'kBifrostBroker' is a service for communicating with the Cohesity proxies - // for multitenancy. - // 'kSmb2Proxy' is a new SMB protocol service. - // 'kOs' can be specified in order to do a full reboot. - // 'kAtom' is a service for receiving data for the Continuous Data Protection. - // 'kPatch' is a service for downloading and applying patches. - // 'kCompass' is a service for serving dns request for external and internal - // traffic. - // 'kEtlServer' is a service responsible for ETling data for globalsearch. - // 'kIcebox' is service that links Icebox service to other services on cluster. - // kScribe, kStats, kYoda, kAlerts, kKeychain, kLogWatcher, kStatsCollecter, - // kGandalf, kNexus, kNexusProxy, kStorageProxy, kRtClient, kVaultProxy, - // kSmbProxy, kBridgeProxy, kLibrarian, kGroot, kEagleAgent, kAthena, - // kBifrostBroker, kSmb2Proxy, kOs, kAtom, kIcebox - StoppedServices []string `json:"stoppedServices"` - - // Specifies the status of each system app on the Cluster - SystemAppStatus []*SystemAppStatusResult `json:"systemAppStatus"` -} - -// Validate validates this cluster status result -func (m *ClusterStatusResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAirgapConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentOperation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeStatuses(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoppedServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemAppStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStatusResult) validateAirgapConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AirgapConfig) { // not required - return nil - } - - if m.AirgapConfig != nil { - if err := m.AirgapConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("airgapConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("airgapConfig") - } - return err - } - } - - return nil -} - -var clusterStatusResultTypeCurrentOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kDestroy","kUpgrade","kClean","kRemoveNode","kRestartServices"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterStatusResultTypeCurrentOperationPropEnum = append(clusterStatusResultTypeCurrentOperationPropEnum, v) - } -} - -const ( - - // ClusterStatusResultCurrentOperationKNone captures enum value "kNone" - ClusterStatusResultCurrentOperationKNone string = "kNone" - - // ClusterStatusResultCurrentOperationKDestroy captures enum value "kDestroy" - ClusterStatusResultCurrentOperationKDestroy string = "kDestroy" - - // ClusterStatusResultCurrentOperationKUpgrade captures enum value "kUpgrade" - ClusterStatusResultCurrentOperationKUpgrade string = "kUpgrade" - - // ClusterStatusResultCurrentOperationKClean captures enum value "kClean" - ClusterStatusResultCurrentOperationKClean string = "kClean" - - // ClusterStatusResultCurrentOperationKRemoveNode captures enum value "kRemoveNode" - ClusterStatusResultCurrentOperationKRemoveNode string = "kRemoveNode" - - // ClusterStatusResultCurrentOperationKRestartServices captures enum value "kRestartServices" - ClusterStatusResultCurrentOperationKRestartServices string = "kRestartServices" -) - -// prop value enum -func (m *ClusterStatusResult) validateCurrentOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterStatusResultTypeCurrentOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterStatusResult) validateCurrentOperation(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentOperation) { // not required - return nil - } - - // value enum - if err := m.validateCurrentOperationEnum("currentOperation", "body", *m.CurrentOperation); err != nil { - return err - } - - return nil -} - -func (m *ClusterStatusResult) validateNodeStatuses(formats strfmt.Registry) error { - if swag.IsZero(m.NodeStatuses) { // not required - return nil - } - - for i := 0; i < len(m.NodeStatuses); i++ { - if swag.IsZero(m.NodeStatuses[i]) { // not required - continue - } - - if m.NodeStatuses[i] != nil { - if err := m.NodeStatuses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeStatuses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeStatuses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var clusterStatusResultTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoRemoval","kNodeRemoval","kDiskRemoval","kNodeAndDiskRemoval"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterStatusResultTypeRemovalStatePropEnum = append(clusterStatusResultTypeRemovalStatePropEnum, v) - } -} - -const ( - - // ClusterStatusResultRemovalStateKNoRemoval captures enum value "kNoRemoval" - ClusterStatusResultRemovalStateKNoRemoval string = "kNoRemoval" - - // ClusterStatusResultRemovalStateKNodeRemoval captures enum value "kNodeRemoval" - ClusterStatusResultRemovalStateKNodeRemoval string = "kNodeRemoval" - - // ClusterStatusResultRemovalStateKDiskRemoval captures enum value "kDiskRemoval" - ClusterStatusResultRemovalStateKDiskRemoval string = "kDiskRemoval" - - // ClusterStatusResultRemovalStateKNodeAndDiskRemoval captures enum value "kNodeAndDiskRemoval" - ClusterStatusResultRemovalStateKNodeAndDiskRemoval string = "kNodeAndDiskRemoval" -) - -// prop value enum -func (m *ClusterStatusResult) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterStatusResultTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterStatusResult) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -var clusterStatusResultStoppedServicesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterStatusResultStoppedServicesItemsEnum = append(clusterStatusResultStoppedServicesItemsEnum, v) - } -} - -func (m *ClusterStatusResult) validateStoppedServicesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterStatusResultStoppedServicesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterStatusResult) validateStoppedServices(formats strfmt.Registry) error { - if swag.IsZero(m.StoppedServices) { // not required - return nil - } - - for i := 0; i < len(m.StoppedServices); i++ { - - // value enum - if err := m.validateStoppedServicesItemsEnum("stoppedServices"+"."+strconv.Itoa(i), "body", m.StoppedServices[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ClusterStatusResult) validateSystemAppStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SystemAppStatus) { // not required - return nil - } - - for i := 0; i < len(m.SystemAppStatus); i++ { - if swag.IsZero(m.SystemAppStatus[i]) { // not required - continue - } - - if m.SystemAppStatus[i] != nil { - if err := m.SystemAppStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemAppStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemAppStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster status result based on the context it is used -func (m *ClusterStatusResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAirgapConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeStatuses(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemAppStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStatusResult) contextValidateAirgapConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AirgapConfig != nil { - - if swag.IsZero(m.AirgapConfig) { // not required - return nil - } - - if err := m.AirgapConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("airgapConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("airgapConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterStatusResult) contextValidateNodeStatuses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeStatuses); i++ { - - if m.NodeStatuses[i] != nil { - - if swag.IsZero(m.NodeStatuses[i]) { // not required - return nil - } - - if err := m.NodeStatuses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeStatuses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeStatuses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterStatusResult) contextValidateSystemAppStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SystemAppStatus); i++ { - - if m.SystemAppStatus[i] != nil { - - if swag.IsZero(m.SystemAppStatus[i]) { // not required - return nil - } - - if err := m.SystemAppStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemAppStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemAppStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatusResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatusResult) UnmarshalBinary(b []byte) error { - var res ClusterStatusResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_upgrade_status.go b/v1/models/cluster_upgrade_status.go deleted file mode 100644 index c789dd87..00000000 --- a/v1/models/cluster_upgrade_status.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterUpgradeStatus ClusterUpgradeStatus indicates the upgrade status of a cluster. -// -// swagger:model ClusterUpgradeStatus -type ClusterUpgradeStatus struct { - - // NodesUpgradeStatus contains an array of upgrade statuses per node if an - // upgrade is in progress, and nil otherwise. - NodesUpgradeStatus []*NodeUpgradeStatus `json:"nodesUpgradeStatus"` - - // TargetSwVersion contains the target software version if an upgrade is in - // progress, and nil otherwise. - TargetSwVersion *string `json:"targetSwVersion,omitempty"` - - // UpgradeInProgress indicates if there is a cluster upgrade in progress. - UpgradeInProgress *bool `json:"upgradeInProgress,omitempty"` - - // UpgradeStartTimeSecs is the cluster upgrade start time in seconds since - // epoch. - UpgradeStartTimeSecs *int64 `json:"upgradeStartTimeSecs,omitempty"` -} - -// Validate validates this cluster upgrade status -func (m *ClusterUpgradeStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodesUpgradeStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterUpgradeStatus) validateNodesUpgradeStatus(formats strfmt.Registry) error { - if swag.IsZero(m.NodesUpgradeStatus) { // not required - return nil - } - - for i := 0; i < len(m.NodesUpgradeStatus); i++ { - if swag.IsZero(m.NodesUpgradeStatus[i]) { // not required - continue - } - - if m.NodesUpgradeStatus[i] != nil { - if err := m.NodesUpgradeStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesUpgradeStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesUpgradeStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster upgrade status based on the context it is used -func (m *ClusterUpgradeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodesUpgradeStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterUpgradeStatus) contextValidateNodesUpgradeStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesUpgradeStatus); i++ { - - if m.NodesUpgradeStatus[i] != nil { - - if swag.IsZero(m.NodesUpgradeStatus[i]) { // not required - return nil - } - - if err := m.NodesUpgradeStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesUpgradeStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesUpgradeStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterUpgradeStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterUpgradeStatus) UnmarshalBinary(b []byte) error { - var res ClusterUpgradeStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/collection_info.go b/v1/models/collection_info.go deleted file mode 100644 index 76f537ae..00000000 --- a/v1/models/collection_info.go +++ /dev/null @@ -1,59 +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" -) - -// CollectionInfo Proto that contains specific information about a mongodb collection. -// -// swagger:model CollectionInfo -type CollectionInfo struct { - - // Set to true if this is a capped Collection. - IsCappedCollection *bool `json:"isCappedCollection,omitempty"` - - // Set to true if this Collection is a view. - IsMongoView *bool `json:"isMongoView,omitempty"` - - // Set to true if this is a timeseries Collection. - IsTimeseriesCollection *bool `json:"isTimeseriesCollection,omitempty"` - - // Size of this Collection. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this collection info -func (m *CollectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this collection info based on context it is used -func (m *CollectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CollectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CollectionInfo) UnmarshalBinary(b []byte) error { - var res CollectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/common_acl_proto.go b/v1/models/common_acl_proto.go deleted file mode 100644 index 2d277675..00000000 --- a/v1/models/common_acl_proto.go +++ /dev/null @@ -1,115 +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" -) - -// CommonACLProto Protobuf that describes the Common access control list (ACL) permissions -// for a swift container. -// TODO (avinash_aita): Verify the '.rlistings' write ACL behavior. If -// necessary, remove persisting 'write_rlistings' field and fail such requests. -// -// swagger:model CommonACLProto -type CommonACLProto struct { - - // Read permissions granted to grantees. - ReadGrantees *CommonACLProtoGrantees `json:"readGrantees,omitempty"` - - // Write permissions granted to grantees. - WriteRlistings *bool `json:"writeRlistings,omitempty"` -} - -// Validate validates this common ACL proto -func (m *CommonACLProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReadGrantees(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonACLProto) validateReadGrantees(formats strfmt.Registry) error { - if swag.IsZero(m.ReadGrantees) { // not required - return nil - } - - if m.ReadGrantees != nil { - if err := m.ReadGrantees.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readGrantees") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common ACL proto based on the context it is used -func (m *CommonACLProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReadGrantees(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonACLProto) contextValidateReadGrantees(ctx context.Context, formats strfmt.Registry) error { - - if m.ReadGrantees != nil { - - if swag.IsZero(m.ReadGrantees) { // not required - return nil - } - - if err := m.ReadGrantees.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readGrantees") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonACLProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonACLProto) UnmarshalBinary(b []byte) error { - var res CommonACLProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/common_acl_proto_grantees.go b/v1/models/common_acl_proto_grantees.go deleted file mode 100644 index 8567d3a6..00000000 --- a/v1/models/common_acl_proto_grantees.go +++ /dev/null @@ -1,60 +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" -) - -// CommonACLProtoGrantees common ACL proto grantees -// -// swagger:model CommonACLProto_Grantees -type CommonACLProtoGrantees struct { - - // This field indicates if all users are granted ACL permission. - AllUsers *bool `json:"allUsers,omitempty"` - - // This field holds a list of referers who are denied ACL permission. - DeniedReferrerVec []string `json:"deniedReferrerVec"` - - // This field holds a list of referers who are granted ACL permission. - GrantedReferrerVec []string `json:"grantedReferrerVec"` - - // This fields indicates if container GET and HEAD operations are permitted - // provided that read access is granted (using referer ACL) on objects. - Rlistings *bool `json:"rlistings,omitempty"` -} - -// Validate validates this common ACL proto grantees -func (m *CommonACLProtoGrantees) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common ACL proto grantees based on context it is used -func (m *CommonACLProtoGrantees) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonACLProtoGrantees) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonACLProtoGrantees) UnmarshalBinary(b []byte) error { - var res CommonACLProtoGrantees - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/common_job_info.go b/v1/models/common_job_info.go deleted file mode 100644 index 5827366c..00000000 --- a/v1/models/common_job_info.go +++ /dev/null @@ -1,192 +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" -) - -// CommonJobInfo Common job Info. -// -// CommonJobInfo specifies the basic metadata used in all types of job. -// -// swagger:model CommonJobInfo -type CommonJobInfo struct { - - // Specifies the Timestamp in microseconds when this job was finished. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the error message reported when a search fails. - Error *string `json:"error,omitempty"` - - // Specifies the name of the job. - JobName *string `json:"jobName,omitempty"` - - // Specifies the Job Uid. - JobUID *UniversalID `json:"jobUid,omitempty"` - - // Specifies the Timestamp in microseconds when this job was started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the status of the job. - // 'kJobRunning' indicates that the Job/task is currently running. - // 'kJobFinished' indicates that the Job/task completed and finished. - // 'kJobFailed' indicates that the Job/task failed and did not complete. - // 'kJobCanceled' indicates that the Job/task was canceled. - // 'kJobPaused' indicates the Job/task is paused. - // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] - Status *string `json:"status,omitempty"` - - // Specifies the Vault Id associated with the job. - VaultID *int64 `json:"vaultId,omitempty"` -} - -// Validate validates this common job info -func (m *CommonJobInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonJobInfo) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -var commonJobInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonJobInfoTypeStatusPropEnum = append(commonJobInfoTypeStatusPropEnum, v) - } -} - -const ( - - // CommonJobInfoStatusKJobRunning captures enum value "kJobRunning" - CommonJobInfoStatusKJobRunning string = "kJobRunning" - - // CommonJobInfoStatusKJobFinished captures enum value "kJobFinished" - CommonJobInfoStatusKJobFinished string = "kJobFinished" - - // CommonJobInfoStatusKJobFailed captures enum value "kJobFailed" - CommonJobInfoStatusKJobFailed string = "kJobFailed" - - // CommonJobInfoStatusKJobCanceled captures enum value "kJobCanceled" - CommonJobInfoStatusKJobCanceled string = "kJobCanceled" - - // CommonJobInfoStatusKJobPaused captures enum value "kJobPaused" - CommonJobInfoStatusKJobPaused string = "kJobPaused" -) - -// prop value enum -func (m *CommonJobInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonJobInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonJobInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common job info based on the context it is used -func (m *CommonJobInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonJobInfo) 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 -} - -// MarshalBinary interface implementation -func (m *CommonJobInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonJobInfo) UnmarshalBinary(b []byte) error { - var res CommonJobInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/compare_a_d_objects_result_a_d_attribute.go b/v1/models/compare_a_d_objects_result_a_d_attribute.go deleted file mode 100644 index 93cbaa79..00000000 --- a/v1/models/compare_a_d_objects_result_a_d_attribute.go +++ /dev/null @@ -1,271 +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" -) - -// CompareADObjectsResultADAttribute Represents an AD attribute(property). -// -// swagger:model CompareADObjectsResult_ADAttribute -type CompareADObjectsResultADAttribute struct { - - // Object result flags of type ADAttributeFlags. - AttrFlags *uint32 `json:"attrFlags,omitempty"` - - // Destination attribute value if dest value exists - // (!ADAttributeFlags.kNotFound) and is different from source. - DestValue *CompareADObjectsResultADAttributeValue `json:"destValue,omitempty"` - - // LDAP attribute name. - LdapName *string `json:"ldapName,omitempty"` - - // if the attribute values are same (ADAttributeFlags.kEqual), the value is - // put here to avoid duplication in 'source_value' and 'dest_value'. - SameValue *CompareADObjectsResultADAttributeValue `json:"sameValue,omitempty"` - - // Source attribute value if source value exists - // (!ADAttributeFlags.kNotFound) and is different from destination. - SourceValue *CompareADObjectsResultADAttributeValue `json:"sourceValue,omitempty"` - - // Error status for the attribute compare or value access. - Status *ErrorProto `json:"status,omitempty"` -} - -// Validate validates this compare a d objects result a d attribute -func (m *CompareADObjectsResultADAttribute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDestValue(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSameValue(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceValue(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareADObjectsResultADAttribute) validateDestValue(formats strfmt.Registry) error { - if swag.IsZero(m.DestValue) { // not required - return nil - } - - if m.DestValue != nil { - if err := m.DestValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) validateSameValue(formats strfmt.Registry) error { - if swag.IsZero(m.SameValue) { // not required - return nil - } - - if m.SameValue != nil { - if err := m.SameValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) validateSourceValue(formats strfmt.Registry) error { - if swag.IsZero(m.SourceValue) { // not required - return nil - } - - if m.SourceValue != nil { - if err := m.SourceValue.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this compare a d objects result a d attribute based on the context it is used -func (m *CompareADObjectsResultADAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestValue(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSameValue(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceValue(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareADObjectsResultADAttribute) contextValidateDestValue(ctx context.Context, formats strfmt.Registry) error { - - if m.DestValue != nil { - - if swag.IsZero(m.DestValue) { // not required - return nil - } - - if err := m.DestValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) contextValidateSameValue(ctx context.Context, formats strfmt.Registry) error { - - if m.SameValue != nil { - - if swag.IsZero(m.SameValue) { // not required - return nil - } - - if err := m.SameValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) contextValidateSourceValue(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceValue != nil { - - if swag.IsZero(m.SourceValue) { // not required - return nil - } - - if err := m.SourceValue.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceValue") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceValue") - } - return err - } - } - - return nil -} - -func (m *CompareADObjectsResultADAttribute) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CompareADObjectsResultADAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompareADObjectsResultADAttribute) UnmarshalBinary(b []byte) error { - var res CompareADObjectsResultADAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/compare_a_d_objects_result_a_d_attribute_value.go b/v1/models/compare_a_d_objects_result_a_d_attribute_value.go deleted file mode 100644 index 8ad3ae49..00000000 --- a/v1/models/compare_a_d_objects_result_a_d_attribute_value.go +++ /dev/null @@ -1,57 +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" -) - -// CompareADObjectsResultADAttributeValue Represents an AD attribute value in string format. -// -// swagger:model CompareADObjectsResult_ADAttributeValue -type CompareADObjectsResultADAttributeValue struct { - - // Object result flags of type ADAttributeValueFlags. - ValueFlags *uint32 `json:"valueFlags,omitempty"` - - // String representation of attribute value. For single valued property, - // only one value will be present here. For multi-valued properties such as - // group membership, this field will contain values that are in same order - // as contained in AD. Each AD attribute value will be converted to string. - // If this property is not set, then the property has null value. - ValueVec []string `json:"valueVec"` -} - -// Validate validates this compare a d objects result a d attribute value -func (m *CompareADObjectsResultADAttributeValue) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this compare a d objects result a d attribute value based on context it is used -func (m *CompareADObjectsResultADAttributeValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CompareADObjectsResultADAttributeValue) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompareADObjectsResultADAttributeValue) UnmarshalBinary(b []byte) error { - var res CompareADObjectsResultADAttributeValue - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/compare_a_d_objects_result_a_d_object.go b/v1/models/compare_a_d_objects_result_a_d_object.go deleted file mode 100644 index 9f344b89..00000000 --- a/v1/models/compare_a_d_objects_result_a_d_object.go +++ /dev/null @@ -1,207 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CompareADObjectsResultADObject Represents an AD object record returned from object compare. -// -// swagger:model CompareADObjectsResult_ADObject -type CompareADObjectsResultADObject struct { - - // Array of AD attributes of AD object. This will contain distinct - // attributes from source and destination objects. - AttributeVec []*CompareADObjectsResultADAttribute `json:"attributeVec"` - - // Object guid from dest_server. If empty, compare could not find an AD - // object corresponding to 'source_guid' even after looking up based - // on source_guid, source DN or source SAM account name. The SAM is - // applicable only for account type objects. - DestGUID *string `json:"destGuid,omitempty"` - - // Number of attributes in destination object including system properties - // compared. This count is useful for debugging. - DestPropCount *uint32 `json:"destPropCount,omitempty"` - - // Number of attributes not compared due to - // ADCompareOptionFlags.kExcludeSysProps. This count is useful for - // debugging. - ExcludedPropCount *uint32 `json:"excludedPropCount,omitempty"` - - // Number of AD attributes compared based on 'ADCompareOptionFlagsType' - // flags and found to be mismatched. If this is non-zero, compared objects - // are different. If this is 0 ann'dest_guid' is empty, then object is - // missing. - MismatchPropCount *uint32 `json:"mismatchPropCount,omitempty"` - - // Object result flags of type ADObjectFlags. - ObjectFlags *uint32 `json:"objectFlags,omitempty"` - - // Object guid from $SourceServer. Guid string with or without '{}' braces. - SourceGUID *string `json:"sourceGuid,omitempty"` - - // Number of attributes in source object including system properties - // compared. This count is useful for debugging. - SourcePropCount *uint32 `json:"sourcePropCount,omitempty"` - - // Error status for object. This status will be set to 'kNotFound' when - // source_guid or dest_guid could not be resolved. To find out whether - // destination object is missing, use flag - // 'ADObjectFlags.kDestinationNotFound'. - Status *ErrorProto `json:"status,omitempty"` -} - -// Validate validates this compare a d objects result a d object -func (m *CompareADObjectsResultADObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareADObjectsResultADObject) validateAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.AttributeVec); i++ { - if swag.IsZero(m.AttributeVec[i]) { // not required - continue - } - - if m.AttributeVec[i] != nil { - if err := m.AttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CompareADObjectsResultADObject) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this compare a d objects result a d object based on the context it is used -func (m *CompareADObjectsResultADObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareADObjectsResultADObject) contextValidateAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeVec); i++ { - - if m.AttributeVec[i] != nil { - - if swag.IsZero(m.AttributeVec[i]) { // not required - return nil - } - - if err := m.AttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CompareADObjectsResultADObject) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CompareADObjectsResultADObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompareADObjectsResultADObject) UnmarshalBinary(b []byte) error { - var res CompareADObjectsResultADObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/compare_ad_objects_request.go b/v1/models/compare_ad_objects_request.go deleted file mode 100644 index c1438a05..00000000 --- a/v1/models/compare_ad_objects_request.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CompareAdObjectsRequest Compare AD Objects Request. -// -// Specifies the request to compare AD objects from Snapshot and Production AD. -// -// swagger:model CompareAdObjectsRequest -type CompareAdObjectsRequest struct { - - // Specifies the Restore Task Id corresponding to which we need to compare - // the AD objects. - // Required: true - RestoreTaskID *int64 `json:"RestoreTaskId"` - - // Specifies the option to get object attributes from Snapshot AD when - // destination guid is missing in GuidPair. This helps to show attributes of - // AD object from Snapshot AD when the object is missing in Production AD. - AllowEmptyDestGuids *bool `json:"allowEmptyDestGuids,omitempty"` - - // Specifies the option to exclude AD system attributes when comparing two AD - // object attributes. If the objects have same guid, most of the system - // attributes would match.If the AD object was recovered through a restore, - // then many system attributes will be different. Default compares all - // attributes. - ExcludeSysAttributes *bool `json:"excludeSysAttributes,omitempty"` - - // Specifies the option to not return attributes where source and destination - // values are null values. This reduces noise of the properties in the - // objects returned. - FilterNullValueAttributes *bool `json:"filterNullValueAttributes,omitempty"` - - // Specifies the option to not return attributes where source and - // destination values are same. Use this flag to return only values - // that are different. - FilterSameValueAttributes *bool `json:"filterSameValueAttributes,omitempty"` - - // Specifies the GuidPair of the AD Objects which we want to compare - // from both Snapshot and Production AD. - // Required: true - GUIDPairs []*GUIDPair `json:"guidPairs"` - - // Specifies the option to do quick compare of specified guid between Snapshot - // AD and Production AD. If at least one attribute mismatch is found, comparison - // stops and returns with AdObjectFlag kNotEqual. - QuickCompare *bool `json:"quickCompare,omitempty"` -} - -// Validate validates this compare ad objects request -func (m *CompareAdObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreTaskID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGUIDPairs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareAdObjectsRequest) validateRestoreTaskID(formats strfmt.Registry) error { - - if err := validate.Required("RestoreTaskId", "body", m.RestoreTaskID); err != nil { - return err - } - - return nil -} - -func (m *CompareAdObjectsRequest) validateGUIDPairs(formats strfmt.Registry) error { - - if err := validate.Required("guidPairs", "body", m.GUIDPairs); err != nil { - return err - } - - for i := 0; i < len(m.GUIDPairs); i++ { - if swag.IsZero(m.GUIDPairs[i]) { // not required - continue - } - - if m.GUIDPairs[i] != nil { - if err := m.GUIDPairs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("guidPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("guidPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this compare ad objects request based on the context it is used -func (m *CompareAdObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGUIDPairs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CompareAdObjectsRequest) contextValidateGUIDPairs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GUIDPairs); i++ { - - if m.GUIDPairs[i] != nil { - - if swag.IsZero(m.GUIDPairs[i]) { // not required - return nil - } - - if err := m.GUIDPairs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("guidPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("guidPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CompareAdObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompareAdObjectsRequest) UnmarshalBinary(b []byte) error { - var res CompareAdObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/compared_a_d_object.go b/v1/models/compared_a_d_object.go deleted file mode 100644 index f2ab94c3..00000000 --- a/v1/models/compared_a_d_object.go +++ /dev/null @@ -1,200 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ComparedADObject ComparedADObject -// -// Represents the details about an AD object and its properties. -// The attributes of the AD Object contain the information about whether -// they are equal on both Snapshot AD and Production AD as well as value of -// attribute on both Production and Snapshot AD. -// -// swagger:model ComparedADObject -type ComparedADObject struct { - - // Specifies the list of AD attributes for the AD object. - AdAttributes []*AdAttribute `json:"adAttributes"` - - // Specifies the flags related to this AD Object. - // 'kEqual' indicates all the attributes of the AD Object on the Snapshot - // and Production are equal. - // 'kNotEqual' indicates atleast one of the attribute of the AD Object on the - // Snapshot and Production AD are not equal. - // 'kRestorePasswordRequired' indicates the AD Object is of 'User' object class - // type. when restoring this object from Snapshot AD to Priduction AD, - // a password is required. - // 'kMovedOnDestination' indicates the object has moved to another - // container or OU in production AD compared to AD snapshot. In this case, - // the distinguishedName will be different for these objects - // 'kDestinationNotFound' indicates the object corresponding to dest_guid - // specified is missing from Production AD. Caller should check this flag - // and empty 'dest_guid' first to find out destination is missing. - // 'kDisableSupported' indicates the enable and disable is supported on the AD - // Object. AD Objects of type 'User' and 'Computers' support this operation. - AdObjectFlags []string `json:"adObjectFlags"` - - // Specifies the guid of the object in the Production AD which is equivalent - // to the one in the Snapshot AD. - DestinationGUID *string `json:"destinationGuid,omitempty"` - - // Specifies the error message while fetching the AD object. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the number of attributes of AD Object mismatched on the - // Snapshot and Production AD. - MismatchAttrCount *uint32 `json:"mismatchAttrCount,omitempty"` - - // Specifies the guid of the AD object in the Snapshot AD. - SourceGUID *string `json:"sourceGuid,omitempty"` -} - -// Validate validates this compared a d object -func (m *ComparedADObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdObjectFlags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ComparedADObject) validateAdAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.AdAttributes) { // not required - return nil - } - - for i := 0; i < len(m.AdAttributes); i++ { - if swag.IsZero(m.AdAttributes[i]) { // not required - continue - } - - if m.AdAttributes[i] != nil { - if err := m.AdAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var comparedADObjectAdObjectFlagsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEqual","kNotEqual","kRestorePasswordRequired","kMovedOnDestination","kDestinationNotFound","kDisableSupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - comparedADObjectAdObjectFlagsItemsEnum = append(comparedADObjectAdObjectFlagsItemsEnum, v) - } -} - -func (m *ComparedADObject) validateAdObjectFlagsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, comparedADObjectAdObjectFlagsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ComparedADObject) validateAdObjectFlags(formats strfmt.Registry) error { - if swag.IsZero(m.AdObjectFlags) { // not required - return nil - } - - for i := 0; i < len(m.AdObjectFlags); i++ { - - // value enum - if err := m.validateAdObjectFlagsItemsEnum("adObjectFlags"+"."+strconv.Itoa(i), "body", m.AdObjectFlags[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this compared a d object based on the context it is used -func (m *ComparedADObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ComparedADObject) contextValidateAdAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdAttributes); i++ { - - if m.AdAttributes[i] != nil { - - if swag.IsZero(m.AdAttributes[i]) { // not required - return nil - } - - if err := m.AdAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ComparedADObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ComparedADObject) UnmarshalBinary(b []byte) error { - var res ComparedADObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/component_removal_progress.go b/v1/models/component_removal_progress.go deleted file mode 100644 index 1ba88c90..00000000 --- a/v1/models/component_removal_progress.go +++ /dev/null @@ -1,64 +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" -) - -// ComponentRemovalProgress ComponentRemovalProgress is the struct to define the removal progress of -// an entity w.r.t a given component. -// -// swagger:model ComponentRemovalProgress -type ComponentRemovalProgress struct { - - // If there is no progress for certain threshold time, - // set this flag to true - IsRemovalStuck *bool `json:"isRemovalStuck,omitempty"` - - // Progress percentage - ProgressPercentage *int64 `json:"progressPercentage,omitempty"` - - // Removal progress details. - RemovalProgress *string `json:"removalProgress,omitempty"` - - // Name of the component. - ServiceName *string `json:"serviceName,omitempty"` - - // Time remaining - TimeRemaining *int64 `json:"timeRemaining,omitempty"` -} - -// Validate validates this component removal progress -func (m *ComponentRemovalProgress) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this component removal progress based on context it is used -func (m *ComponentRemovalProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ComponentRemovalProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ComponentRemovalProgress) UnmarshalBinary(b []byte) error { - var res ComponentRemovalProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/condition.go b/v1/models/condition.go deleted file mode 100644 index ae5f3093..00000000 --- a/v1/models/condition.go +++ /dev/null @@ -1,140 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Condition Protobuf that describes the condition. -// -// swagger:model Condition -type Condition struct { - - // This field describes the operator to use to perform the condition checks. - CondOperator *int32 `json:"condOperator,omitempty"` - - // This field describes the condition keys and the values specified for that - // key. An example of key is "s3:x-amz-acl" with values like "public-read", - // meaning that the request should include "public-read" in the ACL header. - ConditionKeyValuesMap []*ConditionConditionKeyValuesMapEntry `json:"conditionKeyValuesMap"` - - // This field describes whether the condition matches all of the input values - // matches against any at least one of the values in - // 'condition_key_values_map'. - ForAllValues *bool `json:"forAllValues,omitempty"` - - // This field describes whether the condition matches any of the input values - // matches against any one of the values in 'condition_key_values_map'. - ForAnyValue *bool `json:"forAnyValue,omitempty"` - - // This field describes whether to evaluate condition as true if the - // condition key does not exist and if it exists then it should match the - // values from 'condition_key_values_map'. - IfExists *bool `json:"ifExists,omitempty"` -} - -// Validate validates this condition -func (m *Condition) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConditionKeyValuesMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Condition) validateConditionKeyValuesMap(formats strfmt.Registry) error { - if swag.IsZero(m.ConditionKeyValuesMap) { // not required - return nil - } - - for i := 0; i < len(m.ConditionKeyValuesMap); i++ { - if swag.IsZero(m.ConditionKeyValuesMap[i]) { // not required - continue - } - - if m.ConditionKeyValuesMap[i] != nil { - if err := m.ConditionKeyValuesMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditionKeyValuesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditionKeyValuesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this condition based on the context it is used -func (m *Condition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConditionKeyValuesMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Condition) contextValidateConditionKeyValuesMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConditionKeyValuesMap); i++ { - - if m.ConditionKeyValuesMap[i] != nil { - - if swag.IsZero(m.ConditionKeyValuesMap[i]) { // not required - return nil - } - - if err := m.ConditionKeyValuesMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditionKeyValuesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditionKeyValuesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Condition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Condition) UnmarshalBinary(b []byte) error { - var res Condition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/condition_condition_key_values_map_entry.go b/v1/models/condition_condition_key_values_map_entry.go deleted file mode 100644 index 3878de53..00000000 --- a/v1/models/condition_condition_key_values_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// ConditionConditionKeyValuesMapEntry condition condition key values map entry -// -// swagger:model Condition_ConditionKeyValuesMapEntry -type ConditionConditionKeyValuesMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *ConditionKeyValues `json:"value,omitempty"` -} - -// Validate validates this condition condition key values map entry -func (m *ConditionConditionKeyValuesMapEntry) 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 -} - -func (m *ConditionConditionKeyValuesMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this condition condition key values map entry based on the context it is used -func (m *ConditionConditionKeyValuesMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConditionConditionKeyValuesMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConditionConditionKeyValuesMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConditionConditionKeyValuesMapEntry) UnmarshalBinary(b []byte) error { - var res ConditionConditionKeyValuesMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/condition_key_values.go b/v1/models/condition_key_values.go deleted file mode 100644 index d69c85ac..00000000 --- a/v1/models/condition_key_values.go +++ /dev/null @@ -1,50 +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" -) - -// ConditionKeyValues Protobuf that describes values for a condition key. -// -// swagger:model ConditionKeyValues -type ConditionKeyValues struct { - - // This field specifies the values for the key. - ValueVec []string `json:"valueVec"` -} - -// Validate validates this condition key values -func (m *ConditionKeyValues) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this condition key values based on context it is used -func (m *ConditionKeyValues) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConditionKeyValues) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConditionKeyValues) UnmarshalBinary(b []byte) error { - var res ConditionKeyValues - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/configuration_params.go b/v1/models/configuration_params.go deleted file mode 100644 index 6fb8c973..00000000 --- a/v1/models/configuration_params.go +++ /dev/null @@ -1,56 +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" -) - -// ConfigurationParams Message that represents a Configuration key value param. -// -// swagger:model ConfigurationParams -type ConfigurationParams struct { - - // key - Key *string `json:"key,omitempty"` - - // reason - Reason *string `json:"reason,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this configuration params -func (m *ConfigurationParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this configuration params based on context it is used -func (m *ConfigurationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigurationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigurationParams) UnmarshalBinary(b []byte) error { - var res ConfigurationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/connector_parameters.go b/v1/models/connector_parameters.go deleted file mode 100644 index 3e04829b..00000000 --- a/v1/models/connector_parameters.go +++ /dev/null @@ -1,317 +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" -) - -// ConnectorParameters Connector Parameters. -// -// Specifies the parameters required to establish a connection with -// a particular environment. -// -// swagger:model ConnectorParameters -type ConnectorParameters struct { - - // ID of the Bifrost (HyX or Rigel) network realm (i.e. a connection) - // associated with the source. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the Id of the connector group. Each connector group is - // collection of Rigel/hyx. - // Each entity will be tagged with connector group id. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Specify an IP address or URL of the environment. - // (such as the IP address of the vCenter Server for a VMware environment). - Endpoint *string `json:"endpoint,omitempty"` - - // Specifies the environment like VMware, SQL, where the - // Protection Source exists. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies a Unique id that is generated when the Source is registered. - // This is a convenience field that is used to maintain an index to different - // connection params. - ID *int64 `json:"id,omitempty"` - - // Version is updated each time the connector parameters are updated. - // This is used to discard older connector parameters. - Version *int64 `json:"version,omitempty"` -} - -// Validate validates this connector parameters -func (m *ConnectorParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var connectorParametersTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - connectorParametersTypeEnvironmentPropEnum = append(connectorParametersTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ConnectorParametersEnvironmentKVMware captures enum value "kVMware" - ConnectorParametersEnvironmentKVMware string = "kVMware" - - // ConnectorParametersEnvironmentKHyperV captures enum value "kHyperV" - ConnectorParametersEnvironmentKHyperV string = "kHyperV" - - // ConnectorParametersEnvironmentKSQL captures enum value "kSQL" - ConnectorParametersEnvironmentKSQL string = "kSQL" - - // ConnectorParametersEnvironmentKView captures enum value "kView" - ConnectorParametersEnvironmentKView string = "kView" - - // ConnectorParametersEnvironmentKPuppeteer captures enum value "kPuppeteer" - ConnectorParametersEnvironmentKPuppeteer string = "kPuppeteer" - - // ConnectorParametersEnvironmentKPhysical captures enum value "kPhysical" - ConnectorParametersEnvironmentKPhysical string = "kPhysical" - - // ConnectorParametersEnvironmentKPure captures enum value "kPure" - ConnectorParametersEnvironmentKPure string = "kPure" - - // ConnectorParametersEnvironmentKNimble captures enum value "kNimble" - ConnectorParametersEnvironmentKNimble string = "kNimble" - - // ConnectorParametersEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ConnectorParametersEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ConnectorParametersEnvironmentKAzure captures enum value "kAzure" - ConnectorParametersEnvironmentKAzure string = "kAzure" - - // ConnectorParametersEnvironmentKNetapp captures enum value "kNetapp" - ConnectorParametersEnvironmentKNetapp string = "kNetapp" - - // ConnectorParametersEnvironmentKAgent captures enum value "kAgent" - ConnectorParametersEnvironmentKAgent string = "kAgent" - - // ConnectorParametersEnvironmentKGenericNas captures enum value "kGenericNas" - ConnectorParametersEnvironmentKGenericNas string = "kGenericNas" - - // ConnectorParametersEnvironmentKAcropolis captures enum value "kAcropolis" - ConnectorParametersEnvironmentKAcropolis string = "kAcropolis" - - // ConnectorParametersEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ConnectorParametersEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ConnectorParametersEnvironmentKIsilon captures enum value "kIsilon" - ConnectorParametersEnvironmentKIsilon string = "kIsilon" - - // ConnectorParametersEnvironmentKGPFS captures enum value "kGPFS" - ConnectorParametersEnvironmentKGPFS string = "kGPFS" - - // ConnectorParametersEnvironmentKKVM captures enum value "kKVM" - ConnectorParametersEnvironmentKKVM string = "kKVM" - - // ConnectorParametersEnvironmentKAWS captures enum value "kAWS" - ConnectorParametersEnvironmentKAWS string = "kAWS" - - // ConnectorParametersEnvironmentKExchange captures enum value "kExchange" - ConnectorParametersEnvironmentKExchange string = "kExchange" - - // ConnectorParametersEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ConnectorParametersEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ConnectorParametersEnvironmentKOracle captures enum value "kOracle" - ConnectorParametersEnvironmentKOracle string = "kOracle" - - // ConnectorParametersEnvironmentKGCP captures enum value "kGCP" - ConnectorParametersEnvironmentKGCP string = "kGCP" - - // ConnectorParametersEnvironmentKFlashBlade captures enum value "kFlashBlade" - ConnectorParametersEnvironmentKFlashBlade string = "kFlashBlade" - - // ConnectorParametersEnvironmentKAWSNative captures enum value "kAWSNative" - ConnectorParametersEnvironmentKAWSNative string = "kAWSNative" - - // ConnectorParametersEnvironmentKO365 captures enum value "kO365" - ConnectorParametersEnvironmentKO365 string = "kO365" - - // ConnectorParametersEnvironmentKO365Outlook captures enum value "kO365Outlook" - ConnectorParametersEnvironmentKO365Outlook string = "kO365Outlook" - - // ConnectorParametersEnvironmentKHyperFlex captures enum value "kHyperFlex" - ConnectorParametersEnvironmentKHyperFlex string = "kHyperFlex" - - // ConnectorParametersEnvironmentKGCPNative captures enum value "kGCPNative" - ConnectorParametersEnvironmentKGCPNative string = "kGCPNative" - - // ConnectorParametersEnvironmentKAzureNative captures enum value "kAzureNative" - ConnectorParametersEnvironmentKAzureNative string = "kAzureNative" - - // ConnectorParametersEnvironmentKKubernetes captures enum value "kKubernetes" - ConnectorParametersEnvironmentKKubernetes string = "kKubernetes" - - // ConnectorParametersEnvironmentKElastifile captures enum value "kElastifile" - ConnectorParametersEnvironmentKElastifile string = "kElastifile" - - // ConnectorParametersEnvironmentKAD captures enum value "kAD" - ConnectorParametersEnvironmentKAD string = "kAD" - - // ConnectorParametersEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ConnectorParametersEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ConnectorParametersEnvironmentKCassandra captures enum value "kCassandra" - ConnectorParametersEnvironmentKCassandra string = "kCassandra" - - // ConnectorParametersEnvironmentKMongoDB captures enum value "kMongoDB" - ConnectorParametersEnvironmentKMongoDB string = "kMongoDB" - - // ConnectorParametersEnvironmentKCouchbase captures enum value "kCouchbase" - ConnectorParametersEnvironmentKCouchbase string = "kCouchbase" - - // ConnectorParametersEnvironmentKHdfs captures enum value "kHdfs" - ConnectorParametersEnvironmentKHdfs string = "kHdfs" - - // ConnectorParametersEnvironmentKHive captures enum value "kHive" - ConnectorParametersEnvironmentKHive string = "kHive" - - // ConnectorParametersEnvironmentKHBase captures enum value "kHBase" - ConnectorParametersEnvironmentKHBase string = "kHBase" - - // ConnectorParametersEnvironmentKUDA captures enum value "kUDA" - ConnectorParametersEnvironmentKUDA string = "kUDA" - - // ConnectorParametersEnvironmentKO365Teams captures enum value "kO365Teams" - ConnectorParametersEnvironmentKO365Teams string = "kO365Teams" - - // ConnectorParametersEnvironmentKO365Group captures enum value "kO365Group" - ConnectorParametersEnvironmentKO365Group string = "kO365Group" - - // ConnectorParametersEnvironmentKO365Exchange captures enum value "kO365Exchange" - ConnectorParametersEnvironmentKO365Exchange string = "kO365Exchange" - - // ConnectorParametersEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ConnectorParametersEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ConnectorParametersEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ConnectorParametersEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ConnectorParametersEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ConnectorParametersEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ConnectorParameters) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, connectorParametersTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConnectorParameters) 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 validates this connector parameters based on context it is used -func (m *ConnectorParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorParameters) UnmarshalBinary(b []byte) error { - var res ConnectorParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/connector_params.go b/v1/models/connector_params.go deleted file mode 100644 index 8ab1451f..00000000 --- a/v1/models/connector_params.go +++ /dev/null @@ -1,342 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConnectorParams Message that encapsulates the various params required to establish a -// connection with a particular environment. -// -// swagger:model ConnectorParams -type ConnectorParams struct { - - // Optional additional connector params might be needed to connect to an - // environment. - AdditionalParams *AdditionalConnectorParams `json:"additionalParams,omitempty"` - - // For some of the environments connection to endpoint is done through an - // agent. This captures the agent endpoint information. - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - // Optional agent port to use when connecting to the server. - // If this is not specified, then environment specific default port will be - // used. - AgentPort *int32 `json:"agentPort,omitempty"` - - // 'network_realm_id' maintains the collection of connector_group_id. - // Connector group id for the environment. If it is set, Magneto will - // fetch the bifrost server based on . - // - // For communication with iris, this field will be deprecated soon and - // network_realm_info_vec should be used instead. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Credentials that will be used to login to the environment. - Credentials *Credentials `json:"credentials,omitempty"` - - // The endpoint URL of the environment (such as the address of the vCenter - // instance for a VMware environment, etc). - Endpoint *string `json:"endpoint,omitempty"` - - // Optionally the entity associated with the endpoint can be passed. - // Information within the entity could be used in creation of an appropriate - // connector context. - Entity *EntityProto `json:"entity,omitempty"` - - // The host environment type. This is set for kPhysical type environment. - HostType *int32 `json:"hostType,omitempty"` - - // A unique id associated with this connector params. This is a convenience - // field and is used to maintain an index to different connection params. - // This is generated at the time when the source is registered with Magneto. - ID *int64 `json:"id,omitempty"` - - // The network-realm id of the tenant through which this source is - // accessible. This realm could be a collection of hyxes. If this - // is set(>= 0), tenant_id must also be set. Value of '0' has special - // semantics, refer bifrost/base/constant.cc. - // - // This field should be used only for communication between magneto master - // and slave. - // For communication with iris, this field will be deprecated soon and - // network_realm_info_vec should be used instead. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` - - // The network-realm info vec of the tenant through which this source is - // accessible. Each realm could be a collection of hyxes. If this - // is set, tenant_id must also be set. Realm value of '0' has special - // semantics, refer bifrost/base/constant.cc. - NetworkRealmInfoVec []*NetworkRealmInfo `json:"networkRealmInfoVec"` - - // If set to true, inter agent communcation will be enabled and for every - // GetAgentInfo call we will fill subnet information of all the nodes in - // clustered entity. - PopulateSubnetForAllClusterNodes *bool `json:"populateSubnetForAllClusterNodes,omitempty"` - - // Optional port to use when connecting to the server. - // If this is not specified, then environment specific default port will be - // used. - Port *int32 `json:"port,omitempty"` - - // The tenant_id for the environment. This is used to remotely access - // connectors and executors via bifrost. - TenantID *string `json:"tenantId,omitempty"` - - // The type of environment to connect to. - Type *int32 `json:"type,omitempty"` - - // A version that is associated with the params. This is updated anytime - // any of the params change. This is used to discard older connector params. - Version *int64 `json:"version,omitempty"` -} - -// Validate validates this connector params -func (m *ConnectorParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkRealmInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorParams) validateAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if m.AdditionalParams != nil { - if err := m.AdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) validateNetworkRealmInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkRealmInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.NetworkRealmInfoVec); i++ { - if swag.IsZero(m.NetworkRealmInfoVec[i]) { // not required - continue - } - - if m.NetworkRealmInfoVec[i] != nil { - if err := m.NetworkRealmInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this connector params based on the context it is used -func (m *ConnectorParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkRealmInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorParams) contextValidateAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdditionalParams != nil { - - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if err := m.AdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *ConnectorParams) contextValidateNetworkRealmInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkRealmInfoVec); i++ { - - if m.NetworkRealmInfoVec[i] != nil { - - if swag.IsZero(m.NetworkRealmInfoVec[i]) { // not required - return nil - } - - if err := m.NetworkRealmInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorParams) UnmarshalBinary(b []byte) error { - var res ConnectorParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/consumer.go b/v1/models/consumer.go deleted file mode 100644 index 7ed5bb0c..00000000 --- a/v1/models/consumer.go +++ /dev/null @@ -1,129 +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" -) - -// Consumer Consumer. -// -// Consumer is the storage consumer of a group. -// -// swagger:model Consumer -type Consumer struct { - - // Specifies the id of the consumer. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the consumer. - Name *string `json:"name,omitempty"` - - // Specifies the type of the consumer. - // Type of the consumer can be one of the following three, - // - // 'kViews', indicates the stats info of Views used per organization (tenant) - // per view box (storage domain). - // 'kProtectionRuns', indicates the stats info of Protection Runs used per - // organization (tenant) per view box (storage domain). - // 'kReplicationRuns', indicates the stats info of Replication In used per - // organization (tenant) per view box (storage domain). - // 'kViewProtectionRuns', indicates the stats info of View Protection Runs used - // per organization (tenant) per view box (storage domain). - // Enum: ["kViews","kProtectionRuns","kReplicationRuns","kViewProtectionRuns"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this consumer -func (m *Consumer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var consumerTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kViews","kProtectionRuns","kReplicationRuns","kViewProtectionRuns"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - consumerTypeTypePropEnum = append(consumerTypeTypePropEnum, v) - } -} - -const ( - - // ConsumerTypeKViews captures enum value "kViews" - ConsumerTypeKViews string = "kViews" - - // ConsumerTypeKProtectionRuns captures enum value "kProtectionRuns" - ConsumerTypeKProtectionRuns string = "kProtectionRuns" - - // ConsumerTypeKReplicationRuns captures enum value "kReplicationRuns" - ConsumerTypeKReplicationRuns string = "kReplicationRuns" - - // ConsumerTypeKViewProtectionRuns captures enum value "kViewProtectionRuns" - ConsumerTypeKViewProtectionRuns string = "kViewProtectionRuns" -) - -// prop value enum -func (m *Consumer) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, consumerTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Consumer) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this consumer based on context it is used -func (m *Consumer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Consumer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Consumer) UnmarshalBinary(b []byte) error { - var res Consumer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/consumer_stats.go b/v1/models/consumer_stats.go deleted file mode 100644 index 3b1476b2..00000000 --- a/v1/models/consumer_stats.go +++ /dev/null @@ -1,554 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ConsumerStats ConsumerStats is the stats of a single consumer. A consumer is a entity -// which consumes the storage space of a storage domain. A consumer can be a -// View, Protection Job or a Replication Job. -// -// swagger:model ConsumerStats -type ConsumerStats struct { - - // Specifies the type of the consumer. - // Type of the consumer can be one of the following three, - // - // 'kViews', indicates the stats info of Views used per organization (tenant) - // per view box (storage domain). - // 'kProtectionRuns', indicates the stats info of Protection Runs used per - // organization (tenant) per view box (storage domain). - // 'kReplicationRuns', indicates the stats info of Replication In used per - // organization (tenant) per view box (storage domain). - // 'kViewProtectionRuns', indicates the stats info of View Protection Runs used - // per organization (tenant) per view box (storage domain). - // Enum: ["kViews","kProtectionRuns","kReplicationRuns","kViewProtectionRuns"] - ConsumerType *string `json:"consumerType,omitempty"` - - // Specifies a list of groups associated to this consumer. - GroupList []*StatsGroup `json:"groupList"` - - // Specifies the id of the consumer. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the consumer. - Name *string `json:"name,omitempty"` - - // Specifies the source environment of the protection job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - ProtectionEnvironment *string `json:"protectionEnvironment,omitempty"` - - // Specifies the name of the protection policy for 'kProtectionRuns' and - // 'kReplicationRuns' consumer. - ProtectionPolicyName *string `json:"protectionPolicyName,omitempty"` - - // Specifies the hard limit of logical quota of the consumer. This field - // will be returned only if consumer type is view. - QuotaHardLimitBytes *int64 `json:"quotaHardLimitBytes,omitempty"` - - // Specifies a list of schemaInfos of the consumer. - SchemaInfoList []*UsageSchemaInfo `json:"schemaInfoList"` - - // Specifies details of statistics of the consumer. - Stats *DataUsageStats `json:"stats,omitempty"` -} - -// Validate validates this consumer stats -func (m *ConsumerStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConsumerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroupList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var consumerStatsTypeConsumerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kViews","kProtectionRuns","kReplicationRuns","kViewProtectionRuns"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - consumerStatsTypeConsumerTypePropEnum = append(consumerStatsTypeConsumerTypePropEnum, v) - } -} - -const ( - - // ConsumerStatsConsumerTypeKViews captures enum value "kViews" - ConsumerStatsConsumerTypeKViews string = "kViews" - - // ConsumerStatsConsumerTypeKProtectionRuns captures enum value "kProtectionRuns" - ConsumerStatsConsumerTypeKProtectionRuns string = "kProtectionRuns" - - // ConsumerStatsConsumerTypeKReplicationRuns captures enum value "kReplicationRuns" - ConsumerStatsConsumerTypeKReplicationRuns string = "kReplicationRuns" - - // ConsumerStatsConsumerTypeKViewProtectionRuns captures enum value "kViewProtectionRuns" - ConsumerStatsConsumerTypeKViewProtectionRuns string = "kViewProtectionRuns" -) - -// prop value enum -func (m *ConsumerStats) validateConsumerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, consumerStatsTypeConsumerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConsumerStats) validateConsumerType(formats strfmt.Registry) error { - if swag.IsZero(m.ConsumerType) { // not required - return nil - } - - // value enum - if err := m.validateConsumerTypeEnum("consumerType", "body", *m.ConsumerType); err != nil { - return err - } - - return nil -} - -func (m *ConsumerStats) validateGroupList(formats strfmt.Registry) error { - if swag.IsZero(m.GroupList) { // not required - return nil - } - - for i := 0; i < len(m.GroupList); i++ { - if swag.IsZero(m.GroupList[i]) { // not required - continue - } - - if m.GroupList[i] != nil { - if err := m.GroupList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var consumerStatsTypeProtectionEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - consumerStatsTypeProtectionEnvironmentPropEnum = append(consumerStatsTypeProtectionEnvironmentPropEnum, v) - } -} - -const ( - - // ConsumerStatsProtectionEnvironmentKVMware captures enum value "kVMware" - ConsumerStatsProtectionEnvironmentKVMware string = "kVMware" - - // ConsumerStatsProtectionEnvironmentKHyperV captures enum value "kHyperV" - ConsumerStatsProtectionEnvironmentKHyperV string = "kHyperV" - - // ConsumerStatsProtectionEnvironmentKSQL captures enum value "kSQL" - ConsumerStatsProtectionEnvironmentKSQL string = "kSQL" - - // ConsumerStatsProtectionEnvironmentKView captures enum value "kView" - ConsumerStatsProtectionEnvironmentKView string = "kView" - - // ConsumerStatsProtectionEnvironmentKPuppeteer captures enum value "kPuppeteer" - ConsumerStatsProtectionEnvironmentKPuppeteer string = "kPuppeteer" - - // ConsumerStatsProtectionEnvironmentKPhysical captures enum value "kPhysical" - ConsumerStatsProtectionEnvironmentKPhysical string = "kPhysical" - - // ConsumerStatsProtectionEnvironmentKPure captures enum value "kPure" - ConsumerStatsProtectionEnvironmentKPure string = "kPure" - - // ConsumerStatsProtectionEnvironmentKNimble captures enum value "kNimble" - ConsumerStatsProtectionEnvironmentKNimble string = "kNimble" - - // ConsumerStatsProtectionEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ConsumerStatsProtectionEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ConsumerStatsProtectionEnvironmentKAzure captures enum value "kAzure" - ConsumerStatsProtectionEnvironmentKAzure string = "kAzure" - - // ConsumerStatsProtectionEnvironmentKNetapp captures enum value "kNetapp" - ConsumerStatsProtectionEnvironmentKNetapp string = "kNetapp" - - // ConsumerStatsProtectionEnvironmentKAgent captures enum value "kAgent" - ConsumerStatsProtectionEnvironmentKAgent string = "kAgent" - - // ConsumerStatsProtectionEnvironmentKGenericNas captures enum value "kGenericNas" - ConsumerStatsProtectionEnvironmentKGenericNas string = "kGenericNas" - - // ConsumerStatsProtectionEnvironmentKAcropolis captures enum value "kAcropolis" - ConsumerStatsProtectionEnvironmentKAcropolis string = "kAcropolis" - - // ConsumerStatsProtectionEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ConsumerStatsProtectionEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ConsumerStatsProtectionEnvironmentKIsilon captures enum value "kIsilon" - ConsumerStatsProtectionEnvironmentKIsilon string = "kIsilon" - - // ConsumerStatsProtectionEnvironmentKGPFS captures enum value "kGPFS" - ConsumerStatsProtectionEnvironmentKGPFS string = "kGPFS" - - // ConsumerStatsProtectionEnvironmentKKVM captures enum value "kKVM" - ConsumerStatsProtectionEnvironmentKKVM string = "kKVM" - - // ConsumerStatsProtectionEnvironmentKAWS captures enum value "kAWS" - ConsumerStatsProtectionEnvironmentKAWS string = "kAWS" - - // ConsumerStatsProtectionEnvironmentKExchange captures enum value "kExchange" - ConsumerStatsProtectionEnvironmentKExchange string = "kExchange" - - // ConsumerStatsProtectionEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ConsumerStatsProtectionEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ConsumerStatsProtectionEnvironmentKOracle captures enum value "kOracle" - ConsumerStatsProtectionEnvironmentKOracle string = "kOracle" - - // ConsumerStatsProtectionEnvironmentKGCP captures enum value "kGCP" - ConsumerStatsProtectionEnvironmentKGCP string = "kGCP" - - // ConsumerStatsProtectionEnvironmentKFlashBlade captures enum value "kFlashBlade" - ConsumerStatsProtectionEnvironmentKFlashBlade string = "kFlashBlade" - - // ConsumerStatsProtectionEnvironmentKAWSNative captures enum value "kAWSNative" - ConsumerStatsProtectionEnvironmentKAWSNative string = "kAWSNative" - - // ConsumerStatsProtectionEnvironmentKO365 captures enum value "kO365" - ConsumerStatsProtectionEnvironmentKO365 string = "kO365" - - // ConsumerStatsProtectionEnvironmentKO365Outlook captures enum value "kO365Outlook" - ConsumerStatsProtectionEnvironmentKO365Outlook string = "kO365Outlook" - - // ConsumerStatsProtectionEnvironmentKHyperFlex captures enum value "kHyperFlex" - ConsumerStatsProtectionEnvironmentKHyperFlex string = "kHyperFlex" - - // ConsumerStatsProtectionEnvironmentKGCPNative captures enum value "kGCPNative" - ConsumerStatsProtectionEnvironmentKGCPNative string = "kGCPNative" - - // ConsumerStatsProtectionEnvironmentKAzureNative captures enum value "kAzureNative" - ConsumerStatsProtectionEnvironmentKAzureNative string = "kAzureNative" - - // ConsumerStatsProtectionEnvironmentKKubernetes captures enum value "kKubernetes" - ConsumerStatsProtectionEnvironmentKKubernetes string = "kKubernetes" - - // ConsumerStatsProtectionEnvironmentKElastifile captures enum value "kElastifile" - ConsumerStatsProtectionEnvironmentKElastifile string = "kElastifile" - - // ConsumerStatsProtectionEnvironmentKAD captures enum value "kAD" - ConsumerStatsProtectionEnvironmentKAD string = "kAD" - - // ConsumerStatsProtectionEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ConsumerStatsProtectionEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ConsumerStatsProtectionEnvironmentKCassandra captures enum value "kCassandra" - ConsumerStatsProtectionEnvironmentKCassandra string = "kCassandra" - - // ConsumerStatsProtectionEnvironmentKMongoDB captures enum value "kMongoDB" - ConsumerStatsProtectionEnvironmentKMongoDB string = "kMongoDB" - - // ConsumerStatsProtectionEnvironmentKCouchbase captures enum value "kCouchbase" - ConsumerStatsProtectionEnvironmentKCouchbase string = "kCouchbase" - - // ConsumerStatsProtectionEnvironmentKHdfs captures enum value "kHdfs" - ConsumerStatsProtectionEnvironmentKHdfs string = "kHdfs" - - // ConsumerStatsProtectionEnvironmentKHive captures enum value "kHive" - ConsumerStatsProtectionEnvironmentKHive string = "kHive" - - // ConsumerStatsProtectionEnvironmentKHBase captures enum value "kHBase" - ConsumerStatsProtectionEnvironmentKHBase string = "kHBase" - - // ConsumerStatsProtectionEnvironmentKUDA captures enum value "kUDA" - ConsumerStatsProtectionEnvironmentKUDA string = "kUDA" - - // ConsumerStatsProtectionEnvironmentKO365Teams captures enum value "kO365Teams" - ConsumerStatsProtectionEnvironmentKO365Teams string = "kO365Teams" - - // ConsumerStatsProtectionEnvironmentKO365Group captures enum value "kO365Group" - ConsumerStatsProtectionEnvironmentKO365Group string = "kO365Group" - - // ConsumerStatsProtectionEnvironmentKO365Exchange captures enum value "kO365Exchange" - ConsumerStatsProtectionEnvironmentKO365Exchange string = "kO365Exchange" - - // ConsumerStatsProtectionEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ConsumerStatsProtectionEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ConsumerStatsProtectionEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ConsumerStatsProtectionEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ConsumerStatsProtectionEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ConsumerStatsProtectionEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ConsumerStats) validateProtectionEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, consumerStatsTypeProtectionEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConsumerStats) validateProtectionEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateProtectionEnvironmentEnum("protectionEnvironment", "body", *m.ProtectionEnvironment); err != nil { - return err - } - - return nil -} - -func (m *ConsumerStats) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConsumerStats) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this consumer stats based on the context it is used -func (m *ConsumerStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConsumerStats) contextValidateGroupList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GroupList); i++ { - - if m.GroupList[i] != nil { - - if swag.IsZero(m.GroupList[i]) { // not required - return nil - } - - if err := m.GroupList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConsumerStats) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConsumerStats) 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 -} - -// MarshalBinary interface implementation -func (m *ConsumerStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConsumerStats) UnmarshalBinary(b []byte) error { - var res ConsumerStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/container_info.go b/v1/models/container_info.go deleted file mode 100644 index 4d4f32b2..00000000 --- a/v1/models/container_info.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/strfmt" - "github.com/go-openapi/swag" -) - -// ContainerInfo container info -// -// swagger:model ContainerInfo -type ContainerInfo struct { - - // Creation time of the container. - CreatedAt *string `json:"createdAt,omitempty"` - - // Container Id. - ID *int32 `json:"id,omitempty"` - - // Indicates if NFS interface is enabled on the container. - IsNfsInterface *bool `json:"isNfsInterface,omitempty"` - - // Indicates if SMB interface is enabled on the container. - IsSmbInterface *bool `json:"isSmbInterface,omitempty"` - - // Container name. - Name *string `json:"name,omitempty"` - - // Elastifile supports NFS as of now and does not support SMB for cloud - // deployments yet. SMB is in beta phase for on-prem deployments. - // List of protocols enabled on this container: - SupportedProtocolVec []int32 `json:"supportedProtocolVec"` - - // Used capacity of a container. - UsedBytes *int64 `json:"usedBytes,omitempty"` - - // Container uuid. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this container info -func (m *ContainerInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this container info based on context it is used -func (m *ContainerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ContainerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ContainerInfo) UnmarshalBinary(b []byte) error { - var res ContainerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/continuous_schedule.go b/v1/models/continuous_schedule.go deleted file mode 100644 index 5ec2157b..00000000 --- a/v1/models/continuous_schedule.go +++ /dev/null @@ -1,55 +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" -) - -// ContinuousSchedule Continuous Schedule. -// -// 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. -// -// swagger:model ContinuousSchedule -type ContinuousSchedule struct { - - // If specified, this field defines the time interval in minutes when - // new Job Runs are started. - BackupIntervalMins *int64 `json:"backupIntervalMins,omitempty"` -} - -// Validate validates this continuous schedule -func (m *ContinuousSchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this continuous schedule based on context it is used -func (m *ContinuousSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ContinuousSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ContinuousSchedule) UnmarshalBinary(b []byte) error { - var res ContinuousSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_run_state_proto.go b/v1/models/copy_backup_run_state_proto.go deleted file mode 100644 index e3e4d249..00000000 --- a/v1/models/copy_backup_run_state_proto.go +++ /dev/null @@ -1,390 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyBackupRunStateProto This message contains persistent information about all tasks that copy the -// snapshots of a specific backup run to one or more targets. -// -// swagger:model CopyBackupRunStateProto -type CopyBackupRunStateProto struct { - - // A list of active copy tasks for the backup run. - ActiveTasks []*CopyBackupRunTaskStateProto `json:"activeTasks"` - - // If this is an out of band copy run, this will specify the targets (and - // retention settings on those targets) that the backup run snapshots need to - // be copied to. This will not be populated for a regular copy run. - CopySnapshotParamsVec []*CopySnapshotParams `json:"copySnapshotParamsVec"` - - // The time the tasks to copy the backup run's snapshots finished. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Will contain any error encountered by the task. - Error *PrivateErrorProto `json:"error,omitempty"` - - // A list of finished copy tasks for the backup run. - FinishedTasks []*CopyBackupRunTaskStateProto `json:"finishedTasks"` - - // Denotes whether this copy run was initiated by a user with DSO role, this - // could be relevant for out of band copy runs triggered via 'Edit Run'. - InitiatedByDsoRole *bool `json:"initiatedByDsoRole,omitempty"` - - // Whether this copy run was created for cascaded replication/archival. - IsCascadedCopy *bool `json:"isCascadedCopy,omitempty"` - - // Indicates whether the copy run was initialized by garbage collection - // in order to update the snapshot expiry on the external target. - IsGcInitiated *bool `json:"isGcInitiated,omitempty"` - - // Whether this is an out of band (OOB) copy run triggered by the user. - IsOutOfBandRun *bool `json:"isOutOfBandRun,omitempty"` - - // The instance id of the backup run whose snapshots are to be copied. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // The globally unique id of the backup job whose snapshots are to be copied. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Indicates whether the backup run corresponding to this copy run should be - // locked or not. - LockingRequired *bool `json:"lockingRequired,omitempty"` - - // The start time of the backup run whose snapshots are to be copied. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // The time the tasks to copy the backup run's snapshots started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The overall status of the copy tasks. - Status *int32 `json:"status,omitempty"` - - // This field will only be populated when this proto is returned in an - // external HTTP RPC response (e.g., for Iris). The copy run returned - // in the external call is created by merging all the copy runs for the - // backup run. This field will contain the sum total of the duration of each - // of the copy runs that were merged. - TotalDurationUsecs *int64 `json:"totalDurationUsecs,omitempty"` -} - -// Validate validates this copy backup run state proto -func (m *CopyBackupRunStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopySnapshotParamsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFinishedTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunStateProto) validateActiveTasks(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveTasks) { // not required - return nil - } - - for i := 0; i < len(m.ActiveTasks); i++ { - if swag.IsZero(m.ActiveTasks[i]) { // not required - continue - } - - if m.ActiveTasks[i] != nil { - if err := m.ActiveTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) validateCopySnapshotParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.CopySnapshotParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.CopySnapshotParamsVec); i++ { - if swag.IsZero(m.CopySnapshotParamsVec[i]) { // not required - continue - } - - if m.CopySnapshotParamsVec[i] != nil { - if err := m.CopySnapshotParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *CopyBackupRunStateProto) validateFinishedTasks(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedTasks) { // not required - return nil - } - - for i := 0; i < len(m.FinishedTasks); i++ { - if swag.IsZero(m.FinishedTasks[i]) { // not required - continue - } - - if m.FinishedTasks[i] != nil { - if err := m.FinishedTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this copy backup run state proto based on the context it is used -func (m *CopyBackupRunStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopySnapshotParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFinishedTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunStateProto) contextValidateActiveTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveTasks); i++ { - - if m.ActiveTasks[i] != nil { - - if swag.IsZero(m.ActiveTasks[i]) { // not required - return nil - } - - if err := m.ActiveTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) contextValidateCopySnapshotParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopySnapshotParamsVec); i++ { - - if m.CopySnapshotParamsVec[i] != nil { - - if swag.IsZero(m.CopySnapshotParamsVec[i]) { // not required - return nil - } - - if err := m.CopySnapshotParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) 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 -} - -func (m *CopyBackupRunStateProto) contextValidateFinishedTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FinishedTasks); i++ { - - if m.FinishedTasks[i] != nil { - - if swag.IsZero(m.FinishedTasks[i]) { // not required - return nil - } - - if err := m.FinishedTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunStateProto) 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 -} - -// MarshalBinary interface implementation -func (m *CopyBackupRunStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupRunStateProto) UnmarshalBinary(b []byte) error { - var res CopyBackupRunStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_run_task_state_proto.go b/v1/models/copy_backup_run_task_state_proto.go deleted file mode 100644 index 3f6bac95..00000000 --- a/v1/models/copy_backup_run_task_state_proto.go +++ /dev/null @@ -1,1141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyBackupRunTaskStateProto This message contains persistent information about a task that copies the -// snapshots of a specific backup run to a particular target. -// -// swagger:model CopyBackupRunTaskStateProto -type CopyBackupRunTaskStateProto struct { - - // A list of active sub tasks that copy the snapshot of leaf-level entity to - // the snapshot target. - ActiveCopySubTasks []*CopyBackupSubTaskStateProto `json:"activeCopySubTasks"` - - // If this is an archive task, this field will contain some basic info about - // the archive task. - ArchivalInfo *ArchivalInfoBase `json:"archivalInfo,omitempty"` - - // The type of the backup run whose snapshots are being copied. - BackupType *int32 `json:"backupType,omitempty"` - - // If this is a replication task, this will contain the constituent id of the - // Bridge instance where this task has been scheduled (if the task has been - // scheduled). - BridgeConstituentID *int64 `json:"bridgeConstituentId,omitempty"` - - // Whether this copy task has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // If this is a vm deploy task, then this is the temporary view name where - // the VM files will be cloned. The view would be deleted at the end of the - // copy task. This view name holds name for both cloud vm deploy and onprem - // vm deploy. - CloudDeployViewName *string `json:"cloudDeployViewName,omitempty"` - - // Whether to allow copy of partially successful run or not. If set to false, - // copy task is failed if the backup run does not finish successfully. Else, - // copy task copies successful tasks. - CopyPartiallySuccessfulRun *bool `json:"copyPartiallySuccessfulRun,omitempty"` - - // Contains information about the objects which were copied as part of the - // copy task. - CopyTaskObjectInfoVec []*CopyObjectBaseInfo `json:"copyTaskObjectInfoVec"` - - // The timeout duration taken from the policy(based on full/incremental - // backup). A cancellation will automatically gets triggered if the copy - // task has been running for more than this timeout duration(currently - // applicable for archival). - CopyTaskTimeoutMins *int64 `json:"copyTaskTimeoutMins,omitempty"` - - // copy task type - CopyTaskType *int32 `json:"copyTaskType,omitempty"` - - // Data lock contraints if any applicable to this copy task. For copy tasks - // of type kLocal, if this is set it should take precedence over the backup - // run's setting. - DataLockConstraints *DataLockConstraintsProto `json:"dataLockConstraints,omitempty"` - - // Whether to disable creation of MegaFiles on the Rx cluster for a - // replication task, even if the Rx cluster supports it. - DisableRxMegafile *bool `json:"disableRxMegafile,omitempty"` - - // If this bool is set and the sub-task is finished but the copy task is not - // finished, while returning the response to iris display all it's sub-tasks - // as pending. - DisplaySubTasksStatusBasedOnParent *bool `json:"displaySubTasksStatusBasedOnParent,omitempty"` - - // The time this task finished. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // A map that specifies expiry time overrides for specific entities. The key - // in the map is the id of an entity, and the value is the expiry time that - // should be used for that entity. - EntityExpiryTimeUsecsMap []*CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry `json:"entityExpiryTimeUsecsMap"` - - // A map that specifies legal hold status for specific entities. The key - // in the map is the id of an entity, and the value is the boolean indicating - // if the entity is on legal hold. - EntityLegalHoldMap []*CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry `json:"entityLegalHoldMap"` - - // Will contain any error encountered by this task. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The time (in usecs) when the snapshots should be expired at the target. - // If this field is not set, it implies that the snapshots should never be - // expired at the target. Expiry time can be subjected to WORM retention. - // Whether WORM property is set for a given run can always be looked up in - // the corresponding BackupJobRunStateProto.base. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Boolean to tell whether to fail the progress monitor if there an - // kAlreadyExists error in creating the progress monitor for cloud spin - // tasks. - FailProgressMonitorOnAlreadyExistsError *bool `json:"failProgressMonitorOnAlreadyExistsError,omitempty"` - - // A list of finished sub tasks that copy the snapshot of leaf-level entity - // to the snapshot target.. - FinishedCopySubTasks []*CopyBackupSubTaskStateProto `json:"finishedCopySubTasks"` - - // A list of granularity buckets that triggered this copy task. - GranularityBucketVec []*GranularityBucket `json:"granularityBucketVec"` - - // Whether this is an out of band (OOB) copy task triggered by the user. - IsOutOfBandTask *bool `json:"isOutOfBandTask,omitempty"` - - // The instance id of the backup run whose snapshots are to be copied. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // The globally unique id of the backup job whose snapshots are to be copied. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // If legal hold is set on the run, then this run is not deletable. - // expiry_time_usecs remain irrelevant while the run/objects are on - // legal hold. It is possible to extend expiry_time_usecs while the - // run is on the legal hold, but it can not be shortened. - LegalHoldEnabled *bool `json:"legalHoldEnabled,omitempty"` - - // If specified, this task will be linked to the given copy task. - LinkedTaskInfo *CopyBackupRunTaskStateProtoLinkedTaskInfo `json:"linkedTaskInfo,omitempty"` - - // If this is a copy to local task, this field will contain some basic info - // about the copy to local task. - LocalCopyInfo *LocalCopyInfoBase `json:"localCopyInfo,omitempty"` - - // Whether any metadata for this copy task has been deleted from the master's - // state. This will only be set for copy tasks that use object level copy. - MetadataDeleted *bool `json:"metadataDeleted,omitempty"` - - // Whether this task performs granular copy of snapshots at an object level. - // This field can only be set for snapshot target of type 'kRemote'. If set - // to true, this task will create and schedule child copy tasks as soon as - // the backup of an object finishes. Else, this task is expected to wait for - // the backup run to finish before starting the copy task. - ObjectLevelCopy *bool `json:"objectLevelCopy,omitempty"` - - // This field will be populated when the copy task target also happens to be - // the primary backup target, for eg. in case of CloudArchiveDirect job. - PrimaryBackupRunStats *PrimaryBackupRunStats `json:"primaryBackupRunStats,omitempty"` - - // Full path of the Pulse task tracking the progress of this task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export except for - // archive task, i.e., this field is always stamped for archive task. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // If this is a replication task, this field will contain some basic info - // about the replication task. - ReplicationInfo *ReplicationInfoBase `json:"replicationInfo,omitempty"` - - // The retention policy that should be used to determine the expiry time of - // this copy task. - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` - - // The start time of the backup run whose snapshots are to be copied. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Set to true in case leaf level entities need to be converted to on-prem - // format for "DR to cloud" failback use case. - ShouldConvert *bool `json:"shouldConvert,omitempty"` - - // True if the SLA for the copy task was violated. - SLAViolated *bool `json:"slaViolated,omitempty"` - - // The target location where the snapshots should be copied to. - SnapshotTarget *SnapshotTarget `json:"snapshotTarget,omitempty"` - - // The time this task started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The status of this task. - Status *int32 `json:"status,omitempty"` - - // The globally unique id for this task. - TaskUID *UniversalIDProto `json:"taskUid,omitempty"` - - // This boolean is used for kOnPremDeploy, kCloudSpin and kCloudReplication - // copy tasks. All the copy tasks will have this bit set to true if they goes - // in kScheduled state. The copy tasks which have started before the upgrade - // will go directy from kStarted to kAccepted state. - TaskWithScheduledState *bool `json:"taskWithScheduledState,omitempty"` - - // This field will only be populated when this proto is returned in an - // external HTTP RPC response (e.g., for Iris). The copy task returned - // in the external call is created by merging all the copy tasks for the - // backup run and target. This field will contain the sum total of the - // duration of each of the copy tasks that were merged. - TotalDurationUsecs *int64 `json:"totalDurationUsecs,omitempty"` - - // A message displayed to the user for this job or task instance (if any). - // Only valid if the status of the job is kFinished. This is used for - // informing the user about a finished job or task, when there is not an - // error. - UserMessage *string `json:"userMessage,omitempty"` - - // Currently we are using this field for o365 view based replication, where - // we are doing replication using view cloning, object_level_copy will be set - // to false in this case which means instead of copying each object's - // snapshot we will be cloning the whole view with all objects snapshots - // present there. - ViewLevelCopy *bool `json:"viewLevelCopy,omitempty"` - - // Whether setting max expiry time for local backup task in yoda is enabled. - // Once this feature is enabled, maximum expiry time of all the copy tasks - // in the run will be set to the local backup in yoda initially and then - // once all copy tasks are completed expiry time will be reset to the - // correct value. - YodaMaxExpiryTimeLocalTaskEnabled *bool `json:"yodaMaxExpiryTimeLocalTaskEnabled,omitempty"` -} - -// Validate validates this copy backup run task state proto -func (m *CopyBackupRunTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveCopySubTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyTaskObjectInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityExpiryTimeUsecsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityLegalHoldMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFinishedCopySubTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGranularityBucketVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinkedTaskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalCopyInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryBackupRunStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateActiveCopySubTasks(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveCopySubTasks) { // not required - return nil - } - - for i := 0; i < len(m.ActiveCopySubTasks); i++ { - if swag.IsZero(m.ActiveCopySubTasks[i]) { // not required - continue - } - - if m.ActiveCopySubTasks[i] != nil { - if err := m.ActiveCopySubTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeCopySubTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeCopySubTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateArchivalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if m.ArchivalInfo != nil { - if err := m.ArchivalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateCopyTaskObjectInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.CopyTaskObjectInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.CopyTaskObjectInfoVec); i++ { - if swag.IsZero(m.CopyTaskObjectInfoVec[i]) { // not required - continue - } - - if m.CopyTaskObjectInfoVec[i] != nil { - if err := m.CopyTaskObjectInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskObjectInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskObjectInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateDataLockConstraints(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateEntityExpiryTimeUsecsMap(formats strfmt.Registry) error { - if swag.IsZero(m.EntityExpiryTimeUsecsMap) { // not required - return nil - } - - for i := 0; i < len(m.EntityExpiryTimeUsecsMap); i++ { - if swag.IsZero(m.EntityExpiryTimeUsecsMap[i]) { // not required - continue - } - - if m.EntityExpiryTimeUsecsMap[i] != nil { - if err := m.EntityExpiryTimeUsecsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityExpiryTimeUsecsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityExpiryTimeUsecsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateEntityLegalHoldMap(formats strfmt.Registry) error { - if swag.IsZero(m.EntityLegalHoldMap) { // not required - return nil - } - - for i := 0; i < len(m.EntityLegalHoldMap); i++ { - if swag.IsZero(m.EntityLegalHoldMap[i]) { // not required - continue - } - - if m.EntityLegalHoldMap[i] != nil { - if err := m.EntityLegalHoldMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityLegalHoldMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityLegalHoldMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *CopyBackupRunTaskStateProto) validateFinishedCopySubTasks(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedCopySubTasks) { // not required - return nil - } - - for i := 0; i < len(m.FinishedCopySubTasks); i++ { - if swag.IsZero(m.FinishedCopySubTasks[i]) { // not required - continue - } - - if m.FinishedCopySubTasks[i] != nil { - if err := m.FinishedCopySubTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedCopySubTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedCopySubTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateGranularityBucketVec(formats strfmt.Registry) error { - if swag.IsZero(m.GranularityBucketVec) { // not required - return nil - } - - for i := 0; i < len(m.GranularityBucketVec); i++ { - if swag.IsZero(m.GranularityBucketVec[i]) { // not required - continue - } - - if m.GranularityBucketVec[i] != nil { - if err := m.GranularityBucketVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucketVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucketVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *CopyBackupRunTaskStateProto) validateLinkedTaskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LinkedTaskInfo) { // not required - return nil - } - - if m.LinkedTaskInfo != nil { - if err := m.LinkedTaskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linkedTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linkedTaskInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateLocalCopyInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalCopyInfo) { // not required - return nil - } - - if m.LocalCopyInfo != nil { - if err := m.LocalCopyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localCopyInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validatePrimaryBackupRunStats(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryBackupRunStats) { // not required - return nil - } - - if m.PrimaryBackupRunStats != nil { - if err := m.PrimaryBackupRunStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupRunStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupRunStats") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateReplicationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if m.ReplicationInfo != nil { - if err := m.ReplicationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -// ContextValidate validate this copy backup run task state proto based on the context it is used -func (m *CopyBackupRunTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveCopySubTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyTaskObjectInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityExpiryTimeUsecsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityLegalHoldMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFinishedCopySubTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGranularityBucketVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLinkedTaskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalCopyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryBackupRunStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateActiveCopySubTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveCopySubTasks); i++ { - - if m.ActiveCopySubTasks[i] != nil { - - if swag.IsZero(m.ActiveCopySubTasks[i]) { // not required - return nil - } - - if err := m.ActiveCopySubTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeCopySubTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeCopySubTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateArchivalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalInfo != nil { - - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if err := m.ArchivalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateCopyTaskObjectInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyTaskObjectInfoVec); i++ { - - if m.CopyTaskObjectInfoVec[i] != nil { - - if swag.IsZero(m.CopyTaskObjectInfoVec[i]) { // not required - return nil - } - - if err := m.CopyTaskObjectInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskObjectInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskObjectInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateEntityExpiryTimeUsecsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityExpiryTimeUsecsMap); i++ { - - if m.EntityExpiryTimeUsecsMap[i] != nil { - - if swag.IsZero(m.EntityExpiryTimeUsecsMap[i]) { // not required - return nil - } - - if err := m.EntityExpiryTimeUsecsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityExpiryTimeUsecsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityExpiryTimeUsecsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateEntityLegalHoldMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityLegalHoldMap); i++ { - - if m.EntityLegalHoldMap[i] != nil { - - if swag.IsZero(m.EntityLegalHoldMap[i]) { // not required - return nil - } - - if err := m.EntityLegalHoldMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityLegalHoldMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityLegalHoldMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) 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 -} - -func (m *CopyBackupRunTaskStateProto) contextValidateFinishedCopySubTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FinishedCopySubTasks); i++ { - - if m.FinishedCopySubTasks[i] != nil { - - if swag.IsZero(m.FinishedCopySubTasks[i]) { // not required - return nil - } - - if err := m.FinishedCopySubTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedCopySubTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedCopySubTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateGranularityBucketVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GranularityBucketVec); i++ { - - if m.GranularityBucketVec[i] != nil { - - if swag.IsZero(m.GranularityBucketVec[i]) { // not required - return nil - } - - if err := m.GranularityBucketVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucketVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucketVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) 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 -} - -func (m *CopyBackupRunTaskStateProto) contextValidateLinkedTaskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LinkedTaskInfo != nil { - - if swag.IsZero(m.LinkedTaskInfo) { // not required - return nil - } - - if err := m.LinkedTaskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linkedTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linkedTaskInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateLocalCopyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalCopyInfo != nil { - - if swag.IsZero(m.LocalCopyInfo) { // not required - return nil - } - - if err := m.LocalCopyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localCopyInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidatePrimaryBackupRunStats(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryBackupRunStats != nil { - - if swag.IsZero(m.PrimaryBackupRunStats) { // not required - return nil - } - - if err := m.PrimaryBackupRunStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupRunStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupRunStats") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateReplicationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationInfo != nil { - - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if err := m.ReplicationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProto) 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 -} - -// MarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProto) UnmarshalBinary(b []byte) error { - var res CopyBackupRunTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_run_task_state_proto_entity_expiry_time_usecs_map_entry.go b/v1/models/copy_backup_run_task_state_proto_entity_expiry_time_usecs_map_entry.go deleted file mode 100644 index 58d36607..00000000 --- a/v1/models/copy_backup_run_task_state_proto_entity_expiry_time_usecs_map_entry.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" -) - -// CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry copy backup run task state proto entity expiry time usecs map entry -// -// swagger:model CopyBackupRunTaskStateProto_EntityExpiryTimeUsecsMapEntry -type CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this copy backup run task state proto entity expiry time usecs map entry -func (m *CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this copy backup run task state proto entity expiry time usecs map entry based on context it is used -func (m *CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry) UnmarshalBinary(b []byte) error { - var res CopyBackupRunTaskStateProtoEntityExpiryTimeUsecsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_run_task_state_proto_entity_legal_hold_map_entry.go b/v1/models/copy_backup_run_task_state_proto_entity_legal_hold_map_entry.go deleted file mode 100644 index baec6880..00000000 --- a/v1/models/copy_backup_run_task_state_proto_entity_legal_hold_map_entry.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" -) - -// CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry copy backup run task state proto entity legal hold map entry -// -// swagger:model CopyBackupRunTaskStateProto_EntityLegalHoldMapEntry -type CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *bool `json:"value,omitempty"` -} - -// Validate validates this copy backup run task state proto entity legal hold map entry -func (m *CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this copy backup run task state proto entity legal hold map entry based on context it is used -func (m *CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry) UnmarshalBinary(b []byte) error { - var res CopyBackupRunTaskStateProtoEntityLegalHoldMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_run_task_state_proto_linked_task_info.go b/v1/models/copy_backup_run_task_state_proto_linked_task_info.go deleted file mode 100644 index f4b3d418..00000000 --- a/v1/models/copy_backup_run_task_state_proto_linked_task_info.go +++ /dev/null @@ -1,160 +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" -) - -// CopyBackupRunTaskStateProtoLinkedTaskInfo copy backup run task state proto linked task info -// -// swagger:model CopyBackupRunTaskStateProto_LinkedTaskInfo -type CopyBackupRunTaskStateProtoLinkedTaskInfo struct { - - // The target location where the snapshot was copied to. - SnapshotTarget *SnapshotTarget `json:"snapshotTarget,omitempty"` - - // The globally unique id of the copy task. - TaskUID *UniversalIDProto `json:"taskUid,omitempty"` -} - -// Validate validates this copy backup run task state proto linked task info -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -// ContextValidate validate this copy backup run task state proto linked task info based on the context it is used -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) 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 -} - -// MarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupRunTaskStateProtoLinkedTaskInfo) UnmarshalBinary(b []byte) error { - var res CopyBackupRunTaskStateProtoLinkedTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_backup_sub_task_state_proto.go b/v1/models/copy_backup_sub_task_state_proto.go deleted file mode 100644 index ed5e64b8..00000000 --- a/v1/models/copy_backup_sub_task_state_proto.go +++ /dev/null @@ -1,737 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyBackupSubTaskStateProto This message contains persistent information about a sub task that copies -// the snapshot of a leaf level entity in a backup run to a particular target. -// -// swagger:model CopyBackupSubTaskStateProto -type CopyBackupSubTaskStateProto struct { - - // Target for action executor on which the slave task will execute actions. - // e.g Bridge/Bridge_Proxy. - ActionExecutorTargetType *int32 `json:"actionExecutorTargetType,omitempty"` - - // If this is a first object level replication task (or if previous object - // level replication tasks failed) this field will contain the uid of the - // last replication task (if it exists) performed using the old style (i.e., - // all backup tasks in same replication task) protocol for the same target. - // View associated with the 'ancestor_replication_uid_hint' can be used by - // Madrox to efficiently compute diffs for this object level replication - // task. - AncestorReplicationUIDHint *UniversalIDProto `json:"ancestorReplicationUidHint,omitempty"` - - // Id of the task that performed the backup of the above entity. Due to - // retries on errors, a leaf level entity can have more than one attempt and - // thus have more than one snapshot. If job policy dictates that snapshots - // from even failed attempt/task needs to be copied, then there can be more - // than one copy sub-task for an entity. This field is used to make sure that - // only one copy sub-task is created for a backup task. - BackupTaskID *int64 `json:"backupTaskId,omitempty"` - - // If this is a replication task, this will contain the constituent id of the - // Bridge instance where this task has been scheduled (if the task has been - // scheduled). - BridgeConstituentID *int64 `json:"bridgeConstituentId,omitempty"` - - // Whether this copy task has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // If this is a cloud deploy sub-task, then the state of the cloud deploy - // task is stored here. - CloudDeployTaskState *CloudDeployTaskStateProto `json:"cloudDeployTaskState,omitempty"` - - // Id of the conversion cleanup task. The cleanup task is supposed to delete - // residual state of the conversion task. - ConversionCleanupTaskID *int64 `json:"conversionCleanupTaskId,omitempty"` - - // Id of the conversion task. In the event of DR-to-cloud scenario while - // replicating the VM (that was failed over to cloud) back to on-prem, we - // convert the on cloud format of the VM back to on-prem format, e.g. - // on Azure we backup a VM (that came from on-prem VMWare environment) using - // physical agent that backs up logical volumes as VHD files. While - // replicating the backup to on-prem we convert the VM backup to VMWare VMDK - // format. - ConversionTaskID *int64 `json:"conversionTaskId,omitempty"` - - // The timeout duration taken from the policy(based on full/incremental - // backup). A cancellation will automatically gets triggered if the copy - // sub-task has been running for more than this timeout duration. - CopySubTaskTimeoutMins *int64 `json:"copySubTaskTimeoutMins,omitempty"` - - // Whether to disable creation of MegaFiles on the Rx cluster for a - // replication sub-task, even if the Rx cluster supports it. - DisableRxMegafile *bool `json:"disableRxMegafile,omitempty"` - - // The time this task finished. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Leaf level source entity whose snapshot is being copied by this task. - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // Leaf level source entities whose snapshot is being copied by this task, - // This will be populated only if view replication is enabled. - EntityVec []*PrivateEntityProto `json:"entityVec"` - - // Will contain any error encountered by this task. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Boolean to tell whether to fail the progress monitor if there an - // kAlreadyExists error in creating the progress monitor for cloud spin - // tasks. - FailProgressMonitorOnAlreadyExistsError *bool `json:"failProgressMonitorOnAlreadyExistsError,omitempty"` - - // Whether this sub_task is the last to be spawned. Applicable for - // "view_level_copy" replications, where the last replication is supposed to - // start after the protection run view is finalized. - IsFinalRequest *bool `json:"isFinalRequest,omitempty"` - - // Whether this is an out of band (OOB) copy sub-task triggered by the user. - IsOutOfBandSubTask *bool `json:"isOutOfBandSubTask,omitempty"` - - // The instance id of the backup run whose snapshot is to be copied. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // The globally unique id of the backup job whose snapshot is to be copied. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Whether this task performs granular copy of snapshots at an object level. - // This field can only be set for snapshot target of type 'kRemote'. If set - // to true, this task will create and schedule child copy tasks as soon as - // the backup of an object finishes. Else, this task is expected to wait for - // the backup run to finish before starting the copy task. - ObjectLevelCopy *bool `json:"objectLevelCopy,omitempty"` - - // If this is an onprem deploy sub-task, then the state of the onprem deploy - // task is stored here. - OnpremDeployTaskState *OnPremDeployTaskStateProto `json:"onpremDeployTaskState,omitempty"` - - // The globally unique id of the parent copy backup run task that spawned - // this child copy task. - ParentTaskUID *UniversalIDProto `json:"parentTaskUid,omitempty"` - - // Full path of the Pulse task tracking the progress of this sub task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // If this is a replication task, this field will contain some basic info - // about the replication task. - ReplicationInfo *ReplicationInfoBase `json:"replicationInfo,omitempty"` - - // The start time of the backup run whose snapshot is to be copied. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Set to true if entity being copied needs to be converted to on-prem format - // for "DR to cloud" failback use case. - ShouldConvert *bool `json:"shouldConvert,omitempty"` - - // The target location where the snapshots should be copied to. - SnapshotTarget *SnapshotTarget `json:"snapshotTarget,omitempty"` - - // The time this task started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The status of this task. - Status *int32 `json:"status,omitempty"` - - // The globally unique id of this task. - TaskUID *UniversalIDProto `json:"taskUid,omitempty"` - - // This field will only be populated when this proto is returned in an - // external HTTP RPC response (e.g., for Iris). The copy sub-task returned - // in the external call is created by merging all the copy sub-tasks for the - // backup task and target. This field will contain the sum total of the - // duration of each of the copy sub-tasks that were merged. - TotalDurationUsecs *int64 `json:"totalDurationUsecs,omitempty"` -} - -// Validate validates this copy backup sub task state proto -func (m *CopyBackupSubTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAncestorReplicationUIDHint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnpremDeployTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateAncestorReplicationUIDHint(formats strfmt.Registry) error { - if swag.IsZero(m.AncestorReplicationUIDHint) { // not required - return nil - } - - if m.AncestorReplicationUIDHint != nil { - if err := m.AncestorReplicationUIDHint.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ancestorReplicationUidHint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ancestorReplicationUidHint") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateCloudDeployTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployTaskState) { // not required - return nil - } - - if m.CloudDeployTaskState != nil { - if err := m.CloudDeployTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployTaskState") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.EntityVec) { // not required - return nil - } - - for i := 0; i < len(m.EntityVec); i++ { - if swag.IsZero(m.EntityVec[i]) { // not required - continue - } - - if m.EntityVec[i] != nil { - if err := m.EntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *CopyBackupSubTaskStateProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *CopyBackupSubTaskStateProto) validateOnpremDeployTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.OnpremDeployTaskState) { // not required - return nil - } - - if m.OnpremDeployTaskState != nil { - if err := m.OnpremDeployTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTaskState") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateParentTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentTaskUID) { // not required - return nil - } - - if m.ParentTaskUID != nil { - if err := m.ParentTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentTaskUid") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateReplicationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if m.ReplicationInfo != nil { - if err := m.ReplicationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -// ContextValidate validate this copy backup sub task state proto based on the context it is used -func (m *CopyBackupSubTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAncestorReplicationUIDHint(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnpremDeployTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateAncestorReplicationUIDHint(ctx context.Context, formats strfmt.Registry) error { - - if m.AncestorReplicationUIDHint != nil { - - if swag.IsZero(m.AncestorReplicationUIDHint) { // not required - return nil - } - - if err := m.AncestorReplicationUIDHint.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ancestorReplicationUidHint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ancestorReplicationUidHint") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateCloudDeployTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudDeployTaskState != nil { - - if swag.IsZero(m.CloudDeployTaskState) { // not required - return nil - } - - if err := m.CloudDeployTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployTaskState") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityVec); i++ { - - if m.EntityVec[i] != nil { - - if swag.IsZero(m.EntityVec[i]) { // not required - return nil - } - - if err := m.EntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) 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 -} - -func (m *CopyBackupSubTaskStateProto) 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 -} - -func (m *CopyBackupSubTaskStateProto) contextValidateOnpremDeployTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.OnpremDeployTaskState != nil { - - if swag.IsZero(m.OnpremDeployTaskState) { // not required - return nil - } - - if err := m.OnpremDeployTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTaskState") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateParentTaskUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentTaskUID != nil { - - if swag.IsZero(m.ParentTaskUID) { // not required - return nil - } - - if err := m.ParentTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentTaskUid") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateReplicationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationInfo != nil { - - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if err := m.ReplicationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -func (m *CopyBackupSubTaskStateProto) 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 -} - -// MarshalBinary interface implementation -func (m *CopyBackupSubTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyBackupSubTaskStateProto) UnmarshalBinary(b []byte) error { - var res CopyBackupSubTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_object_base_info.go b/v1/models/copy_object_base_info.go deleted file mode 100644 index 2f75899e..00000000 --- a/v1/models/copy_object_base_info.go +++ /dev/null @@ -1,303 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyObjectBaseInfo Proto containing information about leaf level object which was copied -// to some replication/archival target as part of a copy task/sub-task. -// -// swagger:model CopyObjectBaseInfo -type CopyObjectBaseInfo struct { - - // End time of the task/sub-task which copied the object to the target. - // If not specified, then the copy task/sub-task has not yet ended. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Leaf level entity being copied to the target. - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // Contains the error (if any) encountered by the copy task/sub-task which - // copied this object. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Expiry time of the copy snapshot for the particular object. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Denotes whether the object copy snapshot has been manually deleted. - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - // Denotes whether legal hold is enabled for the object. If this field is - // set to true, then the copy snapshot cannot be deleted. Any expiry time - // set for this object will become irrelevant. - LegalHoldEnabled *bool `json:"legalHoldEnabled,omitempty"` - - // Denotes the pulse progress monitor path for the copy task/sub-task - // which copied the given object. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // Start time of the task/sub-task which copied the object to the target. - // If not specified, then the copy task/sub-task has not yet started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // stats - Stats *CopyObjectBaseInfoStats `json:"stats,omitempty"` - - // Contains any warnings(if any) encountered by the copy task/sub-task which - // copied this object. - Warnings []*PrivateErrorProto `json:"warnings"` -} - -// Validate validates this copy object base info -func (m *CopyObjectBaseInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyObjectBaseInfo) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CopyObjectBaseInfo) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *CopyObjectBaseInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *CopyObjectBaseInfo) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this copy object base info based on the context it is used -func (m *CopyObjectBaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyObjectBaseInfo) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *CopyObjectBaseInfo) 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 -} - -func (m *CopyObjectBaseInfo) 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 -} - -func (m *CopyObjectBaseInfo) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CopyObjectBaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyObjectBaseInfo) UnmarshalBinary(b []byte) error { - var res CopyObjectBaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_object_base_info_stats.go b/v1/models/copy_object_base_info_stats.go deleted file mode 100644 index 494c7fae..00000000 --- a/v1/models/copy_object_base_info_stats.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyObjectBaseInfoStats copy object base info stats -// -// swagger:model CopyObjectBaseInfo_Stats -type CopyObjectBaseInfoStats struct { - - // Average logical bytes transfer rate in bytes per second. - AvgLogicalTransferRateBps *int64 `json:"avgLogicalTransferRateBps,omitempty"` - - // Total amount of data read from the source of the backup (so far). - BytesReadFromSource *int64 `json:"bytesReadFromSource,omitempty"` - - // This field is only applicable for NAS and file backup jobs. It indicates - // whether the file walk portion of the backup has completed. - FileWalkDone *bool `json:"fileWalkDone,omitempty"` - - // Front end size calculated by icebox during archival. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // Specifies the logical bytes transferred to the copy target (so far). - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Specifies total logical size of object in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the physical bytes transferred to the copy target (so far). - // Refer to 'bytes_transferred' field in ReplicationInfoBase and - // ArchivalInfoBase protos for more information on this field. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` - - // The total number of file and directory entities that have changed since - // last backup. Only applicable to file based backups. - TotalChangedFileCount *int64 `json:"totalChangedFileCount,omitempty"` - - // The total number of file and directory entities visited in this - // backup. Only applicable to file based backups. - TotalFileCount *int64 `json:"totalFileCount,omitempty"` -} - -// Validate validates this copy object base info stats -func (m *CopyObjectBaseInfoStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyObjectBaseInfoStats) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this copy object base info stats based on the context it is used -func (m *CopyObjectBaseInfoStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyObjectBaseInfoStats) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CopyObjectBaseInfoStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyObjectBaseInfoStats) UnmarshalBinary(b []byte) error { - var res CopyObjectBaseInfoStats - 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 deleted file mode 100644 index 3079feb6..00000000 --- a/v1/models/copy_run.go +++ /dev/null @@ -1,504 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CopyRun Copy Run Task. -// -// Specifies details about the Copy Run for a backup run of a Job Run. -// A Copy task copies snapshots resulted from a backup run to a snapshot -// target which could be 'kLocal', 'kArchival', or 'kRemote'. -// -// swagger:model CopyRun -type CopyRun struct { - - // Specifies the status information of each task that copies the snapshot - // taken for a Protection Source. - CopySnapshotTasks []*CopySnapshotTaskStatus `json:"copySnapshotTasks"` - - // Specifies the datalock constraints for a copy run task. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies expiry time of the copies of the snapshots in this Protection - // Run. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies whether legal hold is enabled on this run. It is true if the - // run is put on legal hold. Independent of this flag, some of the entities - // may be on legal hold. - HoldForLegalPurpose *bool `json:"holdForLegalPurpose,omitempty"` - - // Specifies the list of Protection Source Ids and the legal hold status. - LegalHoldings []*LegalHoldings `json:"legalHoldings"` - - // Specifies start time of the copy run. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Specifies the aggregated information of all the copy tasks. - Stats *CopyRunStats `json:"stats,omitempty"` - - // Specifies the aggregated status of copy tasks such as 'kRunning', - // 'kSuccess', 'kFailure' etc. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` - - // Specifies the target of the copy task such as an external target or a - // Remote Cohesity Cluster. - Target *SnapshotTargetSettings `json:"target,omitempty"` - - // task Uid - TaskUID *CopyRunTaskUID `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 - // relevant for tape based archival tasks where a backup admin might be - // asked to load a new media when the tape library does not have any more - // media to use. - UserActionMessage *string `json:"userActionMessage,omitempty"` -} - -// Validate validates this copy run -func (m *CopyRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopySnapshotTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLegalHoldings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyRun) validateCopySnapshotTasks(formats strfmt.Registry) error { - if swag.IsZero(m.CopySnapshotTasks) { // not required - return nil - } - - for i := 0; i < len(m.CopySnapshotTasks); i++ { - if swag.IsZero(m.CopySnapshotTasks[i]) { // not required - continue - } - - if m.CopySnapshotTasks[i] != nil { - if err := m.CopySnapshotTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyRun) validateDataLockConstraints(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *CopyRun) validateLegalHoldings(formats strfmt.Registry) error { - if swag.IsZero(m.LegalHoldings) { // not required - return nil - } - - for i := 0; i < len(m.LegalHoldings); i++ { - if swag.IsZero(m.LegalHoldings[i]) { // not required - continue - } - - if m.LegalHoldings[i] != nil { - if err := m.LegalHoldings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("legalHoldings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("legalHoldings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyRun) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var copyRunTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - copyRunTypeStatusPropEnum = append(copyRunTypeStatusPropEnum, v) - } -} - -const ( - - // CopyRunStatusKAccepted captures enum value "kAccepted" - CopyRunStatusKAccepted string = "kAccepted" - - // CopyRunStatusKRunning captures enum value "kRunning" - CopyRunStatusKRunning string = "kRunning" - - // CopyRunStatusKCanceling captures enum value "kCanceling" - CopyRunStatusKCanceling string = "kCanceling" - - // CopyRunStatusKCanceled captures enum value "kCanceled" - CopyRunStatusKCanceled string = "kCanceled" - - // CopyRunStatusKSuccess captures enum value "kSuccess" - CopyRunStatusKSuccess string = "kSuccess" - - // CopyRunStatusKFailure captures enum value "kFailure" - CopyRunStatusKFailure string = "kFailure" - - // CopyRunStatusKWarning captures enum value "kWarning" - CopyRunStatusKWarning string = "kWarning" - - // CopyRunStatusKOnHold captures enum value "kOnHold" - CopyRunStatusKOnHold string = "kOnHold" - - // CopyRunStatusKMissed captures enum value "kMissed" - CopyRunStatusKMissed string = "kMissed" - - // CopyRunStatusKFinalizing captures enum value "kFinalizing" - CopyRunStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *CopyRun) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, copyRunTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CopyRun) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *CopyRun) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -func (m *CopyRun) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -// ContextValidate validate this copy run based on the context it is used -func (m *CopyRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopySnapshotTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLegalHoldings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopyRun) contextValidateCopySnapshotTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopySnapshotTasks); i++ { - - if m.CopySnapshotTasks[i] != nil { - - if swag.IsZero(m.CopySnapshotTasks[i]) { // not required - return nil - } - - if err := m.CopySnapshotTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copySnapshotTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copySnapshotTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyRun) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *CopyRun) contextValidateLegalHoldings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LegalHoldings); i++ { - - if m.LegalHoldings[i] != nil { - - if swag.IsZero(m.LegalHoldings[i]) { // not required - return nil - } - - if err := m.LegalHoldings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("legalHoldings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("legalHoldings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CopyRun) 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 -} - -func (m *CopyRun) 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 -} - -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 -} - -// MarshalBinary interface implementation -func (m *CopyRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyRun) UnmarshalBinary(b []byte) error { - var res CopyRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_run_stats.go b/v1/models/copy_run_stats.go deleted file mode 100644 index 5c362636..00000000 --- a/v1/models/copy_run_stats.go +++ /dev/null @@ -1,76 +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" -) - -// CopyRunStats Stats for one copy task or aggregated stats of a Copy Run in a -// Protection Job Run. -// -// swagger:model CopyRunStats -type CopyRunStats struct { - - // Specifies the time when this replication ended. If not set, then the - // replication has not ended yet. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies whether this archival is incremental for archival targets. - IsIncremental *bool `json:"isIncremental,omitempty"` - - // Specifies the number of logical bytes transferred for this replication - // so far. This value can never exceed the total logical size of the - // replicated view. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Specifies the total amount of logical data to be transferred for this - // replication. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies average logical bytes transfer rate in bytes per second for - // archchival targets. - LogicalTransferRateBps *int64 `json:"logicalTransferRateBps,omitempty"` - - // Specifies the number of physical bytes sent over the wire for - // replication targets. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` - - // Specifies the time when this replication was started. If not set, then - // replication has not been started yet. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this copy run stats -func (m *CopyRunStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this copy run stats based on context it is used -func (m *CopyRunStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CopyRunStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyRunStats) UnmarshalBinary(b []byte) error { - var res CopyRunStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/copy_snapshot_params.go b/v1/models/copy_snapshot_params.go deleted file mode 100644 index fed33b2c..00000000 --- a/v1/models/copy_snapshot_params.go +++ /dev/null @@ -1,205 +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" -) - -// CopySnapshotParams Message to specify the target along with the expiry time to which the -// snapshots captured by the backup run should be copied to. -// -// swagger:model CopySnapshotParams -type CopySnapshotParams struct { - - // If this is true, then only snapshots from a fully successful - // run will be considered for being copied. If - // this is false, then snapshots from a partially successful - // run will also be eligible to be copied. - CopyOnlyFullySuccessfulRuns *bool `json:"copyOnlyFullySuccessfulRuns,omitempty"` - - // If this is set to true, place all the objects specified as per entity_vec - // above on legal hold. If entity_vec is empty or not specified, places the - // backup run on legal hold. - EnableLegalHold *bool `json:"enableLegalHold,omitempty"` - - // If this is set to true, remove legal hold from all the objects specified - // as per entity_vec above. If entity_vec is empty or not specified, removes - // legal hold from the backup run. - ReleaseLegalHold *bool `json:"releaseLegalHold,omitempty"` - - // Retention policy for the snapshots after they are copied to the target. - // - // a) If the snapshots are being copied for the first time to the target: - // - // . If this field not specified, the snapshots will never expire. - // - // . If this is specified, the expiry time will be determined as: - // (duration specified in retention_policy) + (time copy finishes). - // - // - // b) If the snapshots were already copied (either partially or fully) to the - // target earlier: - // - // . If this field is not specified, any existing expiry time of the - // snapshots at the target will not be updated. - // - // . If this is specified and retention_policy.num_days_to_keep is not 0, - // the new expiry time will be determined as: - // (duration specified in retention_policy) + - // max(time copy finishes, - // time snapshots were previously going to expire). - // - // Note that in this case, retention_policy.num_days_to_keep can be - // negative too, which would imply that the retention at at the target - // is to be reduced. - // - // . If this is specified and retention_policy.num_days_to_keep is 0, the - // snapshots will be set to expire immediately at the target. - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` - - // The target location where the snapshots should be copied to. Target can be - // one of kLocal, kRemote and kArchival. - SnapshotTarget *SnapshotTarget `json:"snapshotTarget,omitempty"` -} - -// Validate validates this copy snapshot params -func (m *CopySnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopySnapshotParams) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *CopySnapshotParams) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this copy snapshot params based on the context it is used -func (m *CopySnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopySnapshotParams) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *CopySnapshotParams) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CopySnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopySnapshotParams) UnmarshalBinary(b []byte) error { - var res CopySnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_snapshot_task_status.go b/v1/models/copy_snapshot_task_status.go deleted file mode 100644 index d818d341..00000000 --- a/v1/models/copy_snapshot_task_status.go +++ /dev/null @@ -1,265 +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" -) - -// CopySnapshotTaskStatus Copy Snapshot Task Status. -// -// Specifies the status of the copy task that copies the snapshot of a -// Protection Source object to a target. -// -// swagger:model CopySnapshotTaskStatus -type CopySnapshotTaskStatus struct { - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies the source object whose snapshot is replicated. - // This is specified for replication targets. - Source *ProtectionSource `json:"source,omitempty"` - - // Specifies the stats of the replication or the archival task. - Stats *CopyRunStats `json:"stats,omitempty"` - - // Specifies the status of the source object being protected. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` - - // Specifies the end time of the copy task. The end time - // is specified as a Unix epoch Timestamp (in microseconds). - TaskEndTimeUsecs *int64 `json:"taskEndTimeUsecs,omitempty"` - - // Specifies the start time of the copy task. The start time - // is specified as a Unix epoch Timestamp (in microseconds). - // Copy run task is started after completing backup tasks. - // It may spawn sub-tasks to copy or replicate individual snapshots. - TaskStartTimeUsecs *int64 `json:"taskStartTimeUsecs,omitempty"` -} - -// Validate validates this copy snapshot task status -func (m *CopySnapshotTaskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopySnapshotTaskStatus) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CopySnapshotTaskStatus) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var copySnapshotTaskStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - copySnapshotTaskStatusTypeStatusPropEnum = append(copySnapshotTaskStatusTypeStatusPropEnum, v) - } -} - -const ( - - // CopySnapshotTaskStatusStatusKAccepted captures enum value "kAccepted" - CopySnapshotTaskStatusStatusKAccepted string = "kAccepted" - - // CopySnapshotTaskStatusStatusKRunning captures enum value "kRunning" - CopySnapshotTaskStatusStatusKRunning string = "kRunning" - - // CopySnapshotTaskStatusStatusKCanceling captures enum value "kCanceling" - CopySnapshotTaskStatusStatusKCanceling string = "kCanceling" - - // CopySnapshotTaskStatusStatusKCanceled captures enum value "kCanceled" - CopySnapshotTaskStatusStatusKCanceled string = "kCanceled" - - // CopySnapshotTaskStatusStatusKSuccess captures enum value "kSuccess" - CopySnapshotTaskStatusStatusKSuccess string = "kSuccess" - - // CopySnapshotTaskStatusStatusKFailure captures enum value "kFailure" - CopySnapshotTaskStatusStatusKFailure string = "kFailure" - - // CopySnapshotTaskStatusStatusKWarning captures enum value "kWarning" - CopySnapshotTaskStatusStatusKWarning string = "kWarning" - - // CopySnapshotTaskStatusStatusKOnHold captures enum value "kOnHold" - CopySnapshotTaskStatusStatusKOnHold string = "kOnHold" - - // CopySnapshotTaskStatusStatusKMissed captures enum value "kMissed" - CopySnapshotTaskStatusStatusKMissed string = "kMissed" - - // CopySnapshotTaskStatusStatusKFinalizing captures enum value "kFinalizing" - CopySnapshotTaskStatusStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *CopySnapshotTaskStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, copySnapshotTaskStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CopySnapshotTaskStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this copy snapshot task status based on the context it is used -func (m *CopySnapshotTaskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CopySnapshotTaskStatus) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CopySnapshotTaskStatus) 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 -} - -// MarshalBinary interface implementation -func (m *CopySnapshotTaskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopySnapshotTaskStatus) UnmarshalBinary(b []byte) error { - var res CopySnapshotTaskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/couchbase_backup_job_params.go b/v1/models/couchbase_backup_job_params.go deleted file mode 100644 index 57c97f8c..00000000 --- a/v1/models/couchbase_backup_job_params.go +++ /dev/null @@ -1,12 +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 - -// CouchbaseBackupJobParams Contains any additional couchbase environment specific backup params at the -// job level. -// -// swagger:model CouchbaseBackupJobParams -type CouchbaseBackupJobParams interface{} diff --git a/v1/models/couchbase_bucket.go b/v1/models/couchbase_bucket.go deleted file mode 100644 index 107b4b4b..00000000 --- a/v1/models/couchbase_bucket.go +++ /dev/null @@ -1,55 +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" -) - -// CouchbaseBucket Couchbase Bucket Info. -// -// Specifies an Object containing information about a couchbase Bucket. -// -// swagger:model CouchbaseBucket -type CouchbaseBucket struct { - - // Type of this bucket. - BucketType *string `json:"bucketType,omitempty"` - - // Number of documents in this bucket. - DocumentCount *int64 `json:"documentCount,omitempty"` -} - -// Validate validates this couchbase bucket -func (m *CouchbaseBucket) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this couchbase bucket based on context it is used -func (m *CouchbaseBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseBucket) UnmarshalBinary(b []byte) error { - var res CouchbaseBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/couchbase_cluster.go b/v1/models/couchbase_cluster.go deleted file mode 100644 index 8867e34c..00000000 --- a/v1/models/couchbase_cluster.go +++ /dev/null @@ -1,52 +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" -) - -// CouchbaseCluster Couchbase Cluster Info. -// -// Specifies an Object containing information about a couchbase cluster. -// -// swagger:model CouchbaseCluster -type CouchbaseCluster struct { - - // Seeds of this Couchbase Cluster. - Seeds []string `json:"seeds"` -} - -// Validate validates this couchbase cluster -func (m *CouchbaseCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this couchbase cluster based on context it is used -func (m *CouchbaseCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseCluster) UnmarshalBinary(b []byte) error { - var res CouchbaseCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/couchbase_connect_params.go b/v1/models/couchbase_connect_params.go deleted file mode 100644 index 28e3f764..00000000 --- a/v1/models/couchbase_connect_params.go +++ /dev/null @@ -1,62 +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" -) - -// CouchbaseConnectParams Couchbase Connect Params. -// -// Specifies an Object containing information about a registered couchbase -// source. -// -// swagger:model CouchbaseConnectParams -type CouchbaseConnectParams struct { - - // Specifies the Carrier direct/sll port. - CarrierDirectPort *int32 `json:"carrierDirectPort,omitempty"` - - // Specifies the HTTP direct/sll port. - HTTPDirectPort *int32 `json:"httpDirectPort,omitempty"` - - // Specifies whether this cluster allows connection through SSL only. - RequiresSsl *bool `json:"requiresSsl,omitempty"` - - // Specifies the Seeds of this Couchbase Cluster. - Seeds []string `json:"seeds"` -} - -// Validate validates this couchbase connect params -func (m *CouchbaseConnectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this couchbase connect params based on context it is used -func (m *CouchbaseConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseConnectParams) UnmarshalBinary(b []byte) error { - var res CouchbaseConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/couchbase_protection_source.go b/v1/models/couchbase_protection_source.go deleted file mode 100644 index 956bf920..00000000 --- a/v1/models/couchbase_protection_source.go +++ /dev/null @@ -1,226 +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" -) - -// CouchbaseProtectionSource Couchbase Protection Source. -// -// Specifies an Object representing Couchbase. -// -// swagger:model CouchbaseProtectionSource -type CouchbaseProtectionSource struct { - - // Information of a Couchbase Bucket, only valid for an entity of type - // kBucket. - BucketInfo *CouchbaseBucket `json:"bucketInfo,omitempty"` - - // Information of a couchbase cluster, only valid for an entity of type - // kCluster. - ClusterInfo *CouchbaseCluster `json:"clusterInfo,omitempty"` - - // Specifies the instance name of the Couchbase entity. - Name *string `json:"name,omitempty"` - - // Specifies the type of the managed Object in Couchbase Protection Source. - // Specifies the type of an Couchbase source entity. - // 'kCluster' indicates a Couchbase cluster distributed over several physical - // nodes. - // 'kBucket' indicates a bucket within the Couchbase environment. - // Enum: ["kCluster","kBucket"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Couchbase entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this couchbase protection source -func (m *CouchbaseProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CouchbaseProtectionSource) validateBucketInfo(formats strfmt.Registry) error { - if swag.IsZero(m.BucketInfo) { // not required - return nil - } - - if m.BucketInfo != nil { - if err := m.BucketInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketInfo") - } - return err - } - } - - return nil -} - -func (m *CouchbaseProtectionSource) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -var couchbaseProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kBucket"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - couchbaseProtectionSourceTypeTypePropEnum = append(couchbaseProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // CouchbaseProtectionSourceTypeKCluster captures enum value "kCluster" - CouchbaseProtectionSourceTypeKCluster string = "kCluster" - - // CouchbaseProtectionSourceTypeKBucket captures enum value "kBucket" - CouchbaseProtectionSourceTypeKBucket string = "kBucket" -) - -// prop value enum -func (m *CouchbaseProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, couchbaseProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CouchbaseProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this couchbase protection source based on the context it is used -func (m *CouchbaseProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBucketInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CouchbaseProtectionSource) contextValidateBucketInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.BucketInfo != nil { - - if swag.IsZero(m.BucketInfo) { // not required - return nil - } - - if err := m.BucketInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketInfo") - } - return err - } - } - - return nil -} - -func (m *CouchbaseProtectionSource) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseProtectionSource) UnmarshalBinary(b []byte) error { - var res CouchbaseProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/couchbase_recover_job_params.go b/v1/models/couchbase_recover_job_params.go deleted file mode 100644 index c3c97cdb..00000000 --- a/v1/models/couchbase_recover_job_params.go +++ /dev/null @@ -1,69 +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" -) - -// CouchbaseRecoverJobParams Contains any additional couchbase environment specific params for the -// recover job. -// -// swagger:model CouchbaseRecoverJobParams -type CouchbaseRecoverJobParams struct { - - // Whether to append documents into the bucket at the destination - AppendDocuments *bool `json:"appendDocuments,omitempty"` - - // Whether to recover only the bucket configuration - DdlOnlyRecovery *bool `json:"ddlOnlyRecovery,omitempty"` - - // Specify the document type recovery option. - DocumentsFilterType *int32 `json:"documentsFilterType,omitempty"` - - // A filter expression to match Documents content to be restored. - FilterExpression *string `json:"filterExpression,omitempty"` - - // A regular expression to match Documents ID's to be restored. - IDRegex *string `json:"idRegex,omitempty"` - - // Whether to replace existing users with users from the bucket - OverwriteUsers *bool `json:"overwriteUsers,omitempty"` - - // A suffix that is to be applied to all recovered entities - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this couchbase recover job params -func (m *CouchbaseRecoverJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this couchbase recover job params based on context it is used -func (m *CouchbaseRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseRecoverJobParams) UnmarshalBinary(b []byte) error { - var res CouchbaseRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/count_by_tier.go b/v1/models/count_by_tier.go deleted file mode 100644 index 3cd08d8a..00000000 --- a/v1/models/count_by_tier.go +++ /dev/null @@ -1,121 +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" -) - -// CountByTier Disk count By Tier. -// -// CountByTier provides the disk count of each storage tier. -// -// swagger:model CountByTier -type CountByTier struct { - - // DiskCount is the disk number of the storage tier. - DiskCount *int64 `json:"diskCount,omitempty"` - - // StorageTier is the type of StorageTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - StorageTier *string `json:"storageTier,omitempty"` -} - -// Validate validates this count by tier -func (m *CountByTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var countByTierTypeStorageTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - countByTierTypeStorageTierPropEnum = append(countByTierTypeStorageTierPropEnum, v) - } -} - -const ( - - // CountByTierStorageTierPCIeSSD captures enum value "PCIeSSD" - CountByTierStorageTierPCIeSSD string = "PCIeSSD" - - // CountByTierStorageTierSATADashSSD captures enum value "SATA-SSD" - CountByTierStorageTierSATADashSSD string = "SATA-SSD" - - // CountByTierStorageTierSATADashHDD captures enum value "SATA-HDD" - CountByTierStorageTierSATADashHDD string = "SATA-HDD" - - // CountByTierStorageTierCLOUD captures enum value "CLOUD" - CountByTierStorageTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *CountByTier) validateStorageTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, countByTierTypeStorageTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CountByTier) validateStorageTier(formats strfmt.Registry) error { - if swag.IsZero(m.StorageTier) { // not required - return nil - } - - // value enum - if err := m.validateStorageTierEnum("storageTier", "body", *m.StorageTier); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this count by tier based on context it is used -func (m *CountByTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CountByTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CountByTier) UnmarshalBinary(b []byte) error { - var res CountByTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/counter.go b/v1/models/counter.go deleted file mode 100644 index 55c66d9e..00000000 --- a/v1/models/counter.go +++ /dev/null @@ -1,112 +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" -) - -// Counter Proto to define the counter identifier and the value associated with it. -// -// swagger:model Counter -type Counter struct { - - // Id of a counter. - ID *CounterIdentifier `json:"id,omitempty"` - - // Value associated with the counter. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this counter -func (m *Counter) 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 *Counter) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -// ContextValidate validate this counter based on the context it is used -func (m *Counter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Counter) 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 -} - -// MarshalBinary interface implementation -func (m *Counter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Counter) UnmarshalBinary(b []byte) error { - var res Counter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/counter_identifier.go b/v1/models/counter_identifier.go deleted file mode 100644 index 4819af7d..00000000 --- a/v1/models/counter_identifier.go +++ /dev/null @@ -1,112 +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" -) - -// CounterIdentifier Counter is uniquely identified by pair. -// -// swagger:model CounterIdentifier -type CounterIdentifier struct { - - // Unique name of a counter within the above namespace. - Name *string `json:"name,omitempty"` - - // Namespace to which the counter belongs. - Ns *CounterNamespace `json:"ns,omitempty"` -} - -// Validate validates this counter identifier -func (m *CounterIdentifier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CounterIdentifier) validateNs(formats strfmt.Registry) error { - if swag.IsZero(m.Ns) { // not required - return nil - } - - if m.Ns != nil { - if err := m.Ns.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ns") - } - return err - } - } - - return nil -} - -// ContextValidate validate this counter identifier based on the context it is used -func (m *CounterIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CounterIdentifier) contextValidateNs(ctx context.Context, formats strfmt.Registry) error { - - if m.Ns != nil { - - if swag.IsZero(m.Ns) { // not required - return nil - } - - if err := m.Ns.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ns") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CounterIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CounterIdentifier) UnmarshalBinary(b []byte) error { - var res CounterIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/counter_namespace.go b/v1/models/counter_namespace.go deleted file mode 100644 index 1286be28..00000000 --- a/v1/models/counter_namespace.go +++ /dev/null @@ -1,50 +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" -) - -// CounterNamespace Proto to define the namespace of a counter. -// -// swagger:model CounterNamespace -type CounterNamespace struct { - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this counter namespace -func (m *CounterNamespace) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this counter namespace based on context it is used -func (m *CounterNamespace) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CounterNamespace) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CounterNamespace) UnmarshalBinary(b []byte) error { - var res CounterNamespace - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document.go b/v1/models/cracked_file_document.go deleted file mode 100644 index 7f097e75..00000000 --- a/v1/models/cracked_file_document.go +++ /dev/null @@ -1,967 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CrackedFileDocument cracked file document -// -// swagger:model CrackedFileDocument -type CrackedFileDocument struct { - - // ad object metadata - AdObjectMetadata *CrackedFileDocumentADObjectMetadata `json:"adObjectMetadata,omitempty"` - - // Type of data. - DataType *int32 `json:"dataType,omitempty"` - - // Inferred document type. - DocumentType *string `json:"documentType,omitempty"` - - // elasticsearch doc type - ElasticsearchDocType *string `json:"elasticsearchDocType,omitempty"` - - // These are never set! They are provided here as a useful configuration - // default. - ElasticsearchIndexName *string `json:"elasticsearchIndexName,omitempty"` - - // exchange mailbox metadata - ExchangeMailboxMetadata *CrackedFileDocumentExchangeMailboxMetadata `json:"exchangeMailboxMetadata,omitempty"` - - // Specifies the file category. - FileCategory *int32 `json:"fileCategory,omitempty"` - - // file versions - FileVersions []*CrackedFileDocumentFileVersion `json:"fileVersions"` - - // filename - Filename *string `json:"filename,omitempty"` - - // Previous to 6.1, we used to have is_directory field which got renamed to - // data_type in 6.1. Documents indexed before 6.1 in Elasticsearch will - // still have the field stored as is_directory. We need to have a field with - // name is_directory present in proto so that during parsing of a cfiledoc - // from json to proto in iris, is_directory field is not dropped. - // Note that this field will *never* be set by Yoda and is only added to - // support parsing of old documents present in ES. This field should not be - // used in code anywhere. - // TODO(anshu): Remove this field once we have migrated cfiledb to Librarian. - IsDirectory *bool `json:"isDirectory,omitempty"` - - // The mode in which writer was while writing this document in librarian. - LibrarianMode *int32 `json:"librarianMode,omitempty"` - - // magneto entity metadata - MagnetoEntityMetadata *CrackedFileDocumentMagnetoEntityMetadata `json:"magnetoEntityMetadata,omitempty"` - - // mailbox item metadata - MailboxItemMetadata *CrackedFileDocumentMailboxItemMetadata `json:"mailboxItemMetadata,omitempty"` - - // nosql metadata - NosqlMetadata *CrackedFileDocumentNoSQLMetadata `json:"nosqlMetadata,omitempty"` - - // o365 group metadata - O365GroupMetadata *CrackedFileDocumentO365GroupMetadata `json:"o365GroupMetadata,omitempty"` - - // o365 teams metadata - O365TeamsMetadata *CrackedFileDocumentO365TeamsMetadata `json:"o365TeamsMetadata,omitempty"` - - // This is neither stored in the key, nor value. This field exists only for - // returning complete info. - // We use a separate instance of db per object id. - ObjectID *MagnetoObjectID `json:"objectId,omitempty"` - - // one drive metadata - OneDriveMetadata *CrackedFileDocumentOneDriveMetadata `json:"oneDriveMetadata,omitempty"` - - // public folder metadata - PublicFolderMetadata *CrackedFileDocumentPublicFolderMetadata `json:"publicFolderMetadata,omitempty"` - - // Crc32(BinarySerializ(cohesity.magneto.EntityProto)) - // This is kept as a int64 to permit filtering by exact queries. - RegisteredSourceHash *uint64 `json:"registeredSourceHash,omitempty"` - - // String id corresponding to the field above. - // TODO(Shreshtha/Richa) : Populate this field in ops creating - // CrackedFileDocument. - RegisteredSourceStringID *string `json:"registeredSourceStringId,omitempty"` - - // sharepoint metadata - SharepointMetadata *CrackedFileDocumentSharepointMetadata `json:"sharepointMetadata,omitempty"` - - // Field to store snapshot tags. This is a copy of keys in - // snapshot_tags_association_map below and only used for indexing. - SnapshotTagVec []string `json:"snapshotTagVec"` - - // Map from index into snapshot tags to list of snapshot ranges. - SnapshotTagsAssociationMap []*CrackedFileDocumentSnapshotTagsAssociationMapEntry `json:"snapshotTagsAssociationMap"` - - // Field to store document level tags. - TagVec []string `json:"tagVec"` - - // todo(prann) : cleanup and reserve this - TeamsChannelMetadata *CrackedFileDocumentTeamsChannelMetadata `json:"teamsChannelMetadata,omitempty"` - - // The Tenant ID that owns this file. This is always indexed even if no - // tenant id owns this document. In case no tenant id owns this document, an - // empty string is indexed to denote that no tenant owns this document. - TenantID *string `json:"tenantId,omitempty"` - - // uda metadata - UdaMetadata *CrackedFileDocumentUdaMetadata `json:"udaMetadata,omitempty"` - - // versions - Versions []*CrackedFileDocumentVersionInfo `json:"versions"` - - // view box id (storage container) - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this cracked file document -func (m *CrackedFileDocument) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdObjectMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeMailboxMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileVersions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMagnetoEntityMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMailboxItemMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365GroupMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365TeamsMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTagsAssociationMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsChannelMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocument) validateAdObjectMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.AdObjectMetadata) { // not required - return nil - } - - if m.AdObjectMetadata != nil { - if err := m.AdObjectMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateExchangeMailboxMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeMailboxMetadata) { // not required - return nil - } - - if m.ExchangeMailboxMetadata != nil { - if err := m.ExchangeMailboxMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeMailboxMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeMailboxMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateFileVersions(formats strfmt.Registry) error { - if swag.IsZero(m.FileVersions) { // not required - return nil - } - - for i := 0; i < len(m.FileVersions); i++ { - if swag.IsZero(m.FileVersions[i]) { // not required - continue - } - - if m.FileVersions[i] != nil { - if err := m.FileVersions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocument) validateMagnetoEntityMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.MagnetoEntityMetadata) { // not required - return nil - } - - if m.MagnetoEntityMetadata != nil { - if err := m.MagnetoEntityMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("magnetoEntityMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("magnetoEntityMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateMailboxItemMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxItemMetadata) { // not required - return nil - } - - if m.MailboxItemMetadata != nil { - if err := m.MailboxItemMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxItemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxItemMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateNosqlMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlMetadata) { // not required - return nil - } - - if m.NosqlMetadata != nil { - if err := m.NosqlMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateO365GroupMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.O365GroupMetadata) { // not required - return nil - } - - if m.O365GroupMetadata != nil { - if err := m.O365GroupMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365GroupMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365GroupMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateO365TeamsMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.O365TeamsMetadata) { // not required - return nil - } - - if m.O365TeamsMetadata != nil { - if err := m.O365TeamsMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365TeamsMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365TeamsMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateObjectID(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if m.ObjectID != nil { - if err := m.ObjectID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateOneDriveMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveMetadata) { // not required - return nil - } - - if m.OneDriveMetadata != nil { - if err := m.OneDriveMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validatePublicFolderMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFolderMetadata) { // not required - return nil - } - - if m.PublicFolderMetadata != nil { - if err := m.PublicFolderMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateSharepointMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointMetadata) { // not required - return nil - } - - if m.SharepointMetadata != nil { - if err := m.SharepointMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateSnapshotTagsAssociationMap(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTagsAssociationMap) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotTagsAssociationMap); i++ { - if swag.IsZero(m.SnapshotTagsAssociationMap[i]) { // not required - continue - } - - if m.SnapshotTagsAssociationMap[i] != nil { - if err := m.SnapshotTagsAssociationMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTagsAssociationMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTagsAssociationMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocument) validateTeamsChannelMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsChannelMetadata) { // not required - return nil - } - - if m.TeamsChannelMetadata != nil { - if err := m.TeamsChannelMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateUdaMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.UdaMetadata) { // not required - return nil - } - - if m.UdaMetadata != nil { - if err := m.UdaMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required - return nil - } - - for i := 0; i < len(m.Versions); i++ { - if swag.IsZero(m.Versions[i]) { // not required - continue - } - - if m.Versions[i] != nil { - if err := m.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cracked file document based on the context it is used -func (m *CrackedFileDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdObjectMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeMailboxMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMagnetoEntityMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMailboxItemMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365GroupMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365TeamsMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTagsAssociationMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsChannelMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocument) contextValidateAdObjectMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.AdObjectMetadata != nil { - - if swag.IsZero(m.AdObjectMetadata) { // not required - return nil - } - - if err := m.AdObjectMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateExchangeMailboxMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeMailboxMetadata != nil { - - if swag.IsZero(m.ExchangeMailboxMetadata) { // not required - return nil - } - - if err := m.ExchangeMailboxMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeMailboxMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeMailboxMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateFileVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileVersions); i++ { - - if m.FileVersions[i] != nil { - - if swag.IsZero(m.FileVersions[i]) { // not required - return nil - } - - if err := m.FileVersions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateMagnetoEntityMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.MagnetoEntityMetadata != nil { - - if swag.IsZero(m.MagnetoEntityMetadata) { // not required - return nil - } - - if err := m.MagnetoEntityMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("magnetoEntityMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("magnetoEntityMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateMailboxItemMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxItemMetadata != nil { - - if swag.IsZero(m.MailboxItemMetadata) { // not required - return nil - } - - if err := m.MailboxItemMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxItemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxItemMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateNosqlMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlMetadata != nil { - - if swag.IsZero(m.NosqlMetadata) { // not required - return nil - } - - if err := m.NosqlMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateO365GroupMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.O365GroupMetadata != nil { - - if swag.IsZero(m.O365GroupMetadata) { // not required - return nil - } - - if err := m.O365GroupMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365GroupMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365GroupMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateO365TeamsMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.O365TeamsMetadata != nil { - - if swag.IsZero(m.O365TeamsMetadata) { // not required - return nil - } - - if err := m.O365TeamsMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365TeamsMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365TeamsMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateObjectID(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectID != nil { - - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if err := m.ObjectID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateOneDriveMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveMetadata != nil { - - if swag.IsZero(m.OneDriveMetadata) { // not required - return nil - } - - if err := m.OneDriveMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidatePublicFolderMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFolderMetadata != nil { - - if swag.IsZero(m.PublicFolderMetadata) { // not required - return nil - } - - if err := m.PublicFolderMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateSharepointMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointMetadata != nil { - - if swag.IsZero(m.SharepointMetadata) { // not required - return nil - } - - if err := m.SharepointMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateSnapshotTagsAssociationMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotTagsAssociationMap); i++ { - - if m.SnapshotTagsAssociationMap[i] != nil { - - if swag.IsZero(m.SnapshotTagsAssociationMap[i]) { // not required - return nil - } - - if err := m.SnapshotTagsAssociationMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTagsAssociationMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTagsAssociationMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateTeamsChannelMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsChannelMetadata != nil { - - if swag.IsZero(m.TeamsChannelMetadata) { // not required - return nil - } - - if err := m.TeamsChannelMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateUdaMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaMetadata != nil { - - if swag.IsZero(m.UdaMetadata) { // not required - return nil - } - - if err := m.UdaMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocument) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Versions); i++ { - - if m.Versions[i] != nil { - - if swag.IsZero(m.Versions[i]) { // not required - return nil - } - - if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocument) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocument) UnmarshalBinary(b []byte) error { - var res CrackedFileDocument - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_a_d_object_metadata.go b/v1/models/cracked_file_document_a_d_object_metadata.go deleted file mode 100644 index ac653803..00000000 --- a/v1/models/cracked_file_document_a_d_object_metadata.go +++ /dev/null @@ -1,78 +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" -) - -// CrackedFileDocumentADObjectMetadata Message used to store metadata of AD Object. -// -// swagger:model CrackedFileDocument_ADObjectMetadata -type CrackedFileDocumentADObjectMetadata struct { - - // The distinguished name of the AD object. - // Ex: CN=Helen Wilson,OU=Engineering,DC=luwak1,DC=local. - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // The domain of the AD object. - // Ex: luwak3.local, sanjose.luwak1.local. - Domain *string `json:"domain,omitempty"` - - // The email corresponding to the AD object of type user or group. - Email *string `json:"email,omitempty"` - - // The guid of the AD object. This is a unique identifier of the AD Object. - // The guids are 16 bytes in length. - // Ex: e00ddf26d9fc3943bd82245e3764da61, 47c4458e2e0aef42be0bda64216814bd, - // etc. - GUID *string `json:"guid,omitempty"` - - // The name of the AD Object. It is usually concatenation of first name and - // last name. The character set supported for this string is UTF-8. - // Ex: Helen Wilson, Michelle Sander, etc. - Name *string `json:"name,omitempty"` - - // The type of the AD object. The object types are user, computer, - // group or ou. - ObjectType *string `json:"objectType,omitempty"` - - // The sam account name of the AD Object. The character set supported for - // this string is UTF-8. - // Ex: luwak1241000, win7-adamlong-01$, etc. - SamAccountName *string `json:"samAccountName,omitempty"` -} - -// Validate validates this cracked file document a d object metadata -func (m *CrackedFileDocumentADObjectMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document a d object metadata based on context it is used -func (m *CrackedFileDocumentADObjectMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentADObjectMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentADObjectMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentADObjectMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_exchange_mailbox_metadata.go b/v1/models/cracked_file_document_exchange_mailbox_metadata.go deleted file mode 100644 index 4360d00c..00000000 --- a/v1/models/cracked_file_document_exchange_mailbox_metadata.go +++ /dev/null @@ -1,62 +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" -) - -// CrackedFileDocumentExchangeMailboxMetadata Message used to store metadata of a Mailbox in the Exchange database. -// -// swagger:model CrackedFileDocument_ExchangeMailboxMetadata -type CrackedFileDocumentExchangeMailboxMetadata struct { - - // The name of the Exchange database to which the mailbox belongs. - DatabaseName *string `json:"databaseName,omitempty"` - - // The email corresponding to the mailbox. - Email *string `json:"email,omitempty"` - - // The guid of the mailbox. This is a unique identifier of the mailbox. - // The guids are 16 bytes in length. - // Ex: e00ddf26d9fc3943bd82245e3764da61, 47c4458e2e0aef42be0bda64216814bd, - // etc. - GUID *string `json:"guid,omitempty"` - - // The name of the mailbox. - Name *string `json:"name,omitempty"` -} - -// Validate validates this cracked file document exchange mailbox metadata -func (m *CrackedFileDocumentExchangeMailboxMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document exchange mailbox metadata based on context it is used -func (m *CrackedFileDocumentExchangeMailboxMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentExchangeMailboxMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentExchangeMailboxMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentExchangeMailboxMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_file_version.go b/v1/models/cracked_file_document_file_version.go deleted file mode 100644 index 348c4f8a..00000000 --- a/v1/models/cracked_file_document_file_version.go +++ /dev/null @@ -1,259 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CrackedFileDocumentFileVersion Since a file rarely changes, we keep the size,mtime info factored out for -// a continuous run of jobs. If you were to take the instance_ids arrays in -// order and juxtapose them, they'll be sorted. This representation allows us -// to perform deletes efficiently as well, though in some cases can take as -// much space as the scheme above. We only store job id for each file -// versions, the snapshot_timestamp per instance_id is stored in a separate -// key. -// -// swagger:model CrackedFileDocument_FileVersion -type CrackedFileDocumentFileVersion struct { - - // Source inode id metadata for certain adapters e.g. Netapp. - BackupSourceInodeID *int64 `json:"backupSourceInodeId,omitempty"` - - // We don't use this field anymore in storage. But it is more convenient to - // give out versions in this format. - InstanceIds []*MagnetoInstanceID `json:"instanceIds"` - - // Ranges of instance ids which contain this particular file version. - // These ranges are sorted i.e. upper_limit of ith range is less than - // lower_limit of (i+1)th range. Only last range in this vector can be an - // open range. - JobInstanceIDRangeVec []*CrackedFileDocumentInstanceIDRange `json:"jobInstanceIdRangeVec"` - - // TODO(anshu): Remove this once we migrate to using - // job_instance_id_range_vec. - JobInstanceIds []int64 `json:"jobInstanceIds"` - - // mtime usecs - MtimeUsecs *uint64 `json:"mtimeUsecs,omitempty"` - - // size bytes - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Metadata associated with this doc version. Version equality is most - // likely affected by this. This proto is checked as a whole for equality - // after the equality check on "size_bytes" and "mtime_usecs". - VersionMetadata *CrackedFileDocumentFileVersionVersionMetadata `json:"versionMetadata,omitempty"` -} - -// Validate validates this cracked file document file version -func (m *CrackedFileDocumentFileVersion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstanceIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobInstanceIDRangeVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersionMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentFileVersion) validateInstanceIds(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceIds) { // not required - return nil - } - - for i := 0; i < len(m.InstanceIds); i++ { - if swag.IsZero(m.InstanceIds[i]) { // not required - continue - } - - if m.InstanceIds[i] != nil { - if err := m.InstanceIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocumentFileVersion) validateJobInstanceIDRangeVec(formats strfmt.Registry) error { - if swag.IsZero(m.JobInstanceIDRangeVec) { // not required - return nil - } - - for i := 0; i < len(m.JobInstanceIDRangeVec); i++ { - if swag.IsZero(m.JobInstanceIDRangeVec[i]) { // not required - continue - } - - if m.JobInstanceIDRangeVec[i] != nil { - if err := m.JobInstanceIDRangeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobInstanceIdRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobInstanceIdRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocumentFileVersion) validateVersionMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.VersionMetadata) { // not required - return nil - } - - if m.VersionMetadata != nil { - if err := m.VersionMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document file version based on the context it is used -func (m *CrackedFileDocumentFileVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstanceIds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobInstanceIDRangeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersionMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentFileVersion) contextValidateInstanceIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InstanceIds); i++ { - - if m.InstanceIds[i] != nil { - - if swag.IsZero(m.InstanceIds[i]) { // not required - return nil - } - - if err := m.InstanceIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocumentFileVersion) contextValidateJobInstanceIDRangeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.JobInstanceIDRangeVec); i++ { - - if m.JobInstanceIDRangeVec[i] != nil { - - if swag.IsZero(m.JobInstanceIDRangeVec[i]) { // not required - return nil - } - - if err := m.JobInstanceIDRangeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobInstanceIdRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobInstanceIdRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CrackedFileDocumentFileVersion) contextValidateVersionMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.VersionMetadata != nil { - - if swag.IsZero(m.VersionMetadata) { // not required - return nil - } - - if err := m.VersionMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentFileVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentFileVersion) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentFileVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_file_version_version_metadata.go b/v1/models/cracked_file_document_file_version_version_metadata.go deleted file mode 100644 index 1de937b6..00000000 --- a/v1/models/cracked_file_document_file_version_version_metadata.go +++ /dev/null @@ -1,54 +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" -) - -// CrackedFileDocumentFileVersionVersionMetadata For a particular version, some client might be interested in keeping -// some unique identifier (often source generated), which will be required -// for recovery/download workflows. Please note that, having this -// version_metadata in the version mostly likely requires the particular -// adapter to define a custom comparator for version equality. -// -// swagger:model CrackedFileDocument_FileVersion_VersionMetadata -type CrackedFileDocumentFileVersionVersionMetadata struct { - - // unique item identifier - UniqueItemIdentifier *string `json:"uniqueItemIdentifier,omitempty"` -} - -// Validate validates this cracked file document file version version metadata -func (m *CrackedFileDocumentFileVersionVersionMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document file version version metadata based on context it is used -func (m *CrackedFileDocumentFileVersionVersionMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentFileVersionVersionMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentFileVersionVersionMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentFileVersionVersionMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_instance_id_range.go b/v1/models/cracked_file_document_instance_id_range.go deleted file mode 100644 index 564b312c..00000000 --- a/v1/models/cracked_file_document_instance_id_range.go +++ /dev/null @@ -1,54 +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" -) - -// CrackedFileDocumentInstanceIDRange Proto to store a range of instance_ids. -// -// swagger:model CrackedFileDocument_InstanceIdRange -type CrackedFileDocumentInstanceIDRange struct { - - // First value in this range. - LowerLimit *int64 `json:"lowerLimit,omitempty"` - - // Last value in this range. In case of an open range, this value would be - // set to -1. - UpperLimit *int64 `json:"upperLimit,omitempty"` -} - -// Validate validates this cracked file document instance Id range -func (m *CrackedFileDocumentInstanceIDRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document instance Id range based on context it is used -func (m *CrackedFileDocumentInstanceIDRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentInstanceIDRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentInstanceIDRange) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentInstanceIDRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_magneto_entity_metadata.go b/v1/models/cracked_file_document_magneto_entity_metadata.go deleted file mode 100644 index 00f5d239..00000000 --- a/v1/models/cracked_file_document_magneto_entity_metadata.go +++ /dev/null @@ -1,54 +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" -) - -// CrackedFileDocumentMagnetoEntityMetadata Message used to store any magneto entity metadata for this document. -// -// This is currently only used by NoSQL adapters to populate the information -// corresponding to the current entity, since the entity proto inside the -// object_id field corresponds to the source for NoSQL adapters. -// -// swagger:model CrackedFileDocument_MagnetoEntityMetadata -type CrackedFileDocumentMagnetoEntityMetadata struct { - - // Specifies the magneto entity id for this entity. - MagnetoEntityID *int64 `json:"magnetoEntityId,omitempty"` -} - -// Validate validates this cracked file document magneto entity metadata -func (m *CrackedFileDocumentMagnetoEntityMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document magneto entity metadata based on context it is used -func (m *CrackedFileDocumentMagnetoEntityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentMagnetoEntityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentMagnetoEntityMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentMagnetoEntityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_mailbox_item_metadata.go b/v1/models/cracked_file_document_mailbox_item_metadata.go deleted file mode 100644 index cfac05a3..00000000 --- a/v1/models/cracked_file_document_mailbox_item_metadata.go +++ /dev/null @@ -1,276 +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" -) - -// CrackedFileDocumentMailboxItemMetadata Message used to store metadata of a Mailbox Item. -// -// swagger:model CrackedFileDocument_MailboxItemMetadata -type CrackedFileDocumentMailboxItemMetadata struct { - - // List of BccRecipient's email address. - BccRecipientsEmail []string `json:"bccRecipientsEmail"` - - // Birthday of the contact stored in seconds from epoch. - BirthdaySecs *int64 `json:"birthdaySecs,omitempty"` - - // List of CcRecipient's email address. - CcRecipientsEmail []string `json:"ccRecipientsEmail"` - - // Task completion date stored in seconds from epoch. - CompletionDateSecs *int64 `json:"completionDateSecs,omitempty"` - - // Email addresses assigned to the contact. - ContactEmailAddressesVec []string `json:"contactEmailAddressesVec"` - - // Seconds from epoch at which the item is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // Task due date stored in seconds from epoch. - DueDateSecs *int64 `json:"dueDateSecs,omitempty"` - - // Email addresses assigned to the Contact. This field is deprecated now. - // TODO(richa): Reserve this field after iris changes are done to no - // longer use this field. - EmailAddressesVec []string `json:"emailAddressesVec"` - - // Seconds from epoch of the end date/time for the single occurence events. - EndTimeSecs *int64 `json:"endTimeSecs,omitempty"` - - // Contact item type specific fields - // First name of the Contact. - FirstName *string `json:"firstName,omitempty"` - - // Date/time for the first occurence of the recurring events. - FirstOccurrence *ItemMetaDataOccurrence `json:"firstOccurrence,omitempty"` - - // Unique key (within the mailbox) generated for folder by magneto. - FolderKey *int64 `json:"folderKey,omitempty"` - - // Name of the folder in which mailbox item exists in case of an email, and - // display name of folder, in case of an email folder. - FolderName *string `json:"folderName,omitempty"` - - // Specifies which folder root the email belongs to. - FolderRootType *int32 `json:"folderRootType,omitempty"` - - // Email address from whom the mail is received. - FromEmail *string `json:"fromEmail,omitempty"` - - // The fully qualified path (valid inside the current object) of the parent - // of this item (item itself can be folder or mails). - FullItemParentPath *string `json:"fullItemParentPath,omitempty"` - - // Does the item have attachments? - HasAttachments *bool `json:"hasAttachments,omitempty"` - - // Item importance. - Importance *int32 `json:"importance,omitempty"` - - // Is this recurring calendar event or task. - IsRecurring *bool `json:"isRecurring,omitempty"` - - // Unique key (within the mailbox) for the mailbox item provided by - // magneto. This is neither indexed nor stored and is populated only while - // returning mailbox item in search result. - ItemKey *string `json:"itemKey,omitempty"` - - // The item was last modified by. - LastModifiedName *string `json:"lastModifiedName,omitempty"` - - // Seconds from epoch at which the item was last modified. - LastModifiedTimeSecs *int64 `json:"lastModifiedTimeSecs,omitempty"` - - // Last name of the Contact. - LastName *string `json:"lastName,omitempty"` - - // Date/time for the last occurence of the recurring events. - LastOccurrence *ItemMetaDataOccurrence `json:"lastOccurrence,omitempty"` - - // Middle name of the Contact. - MiddleName *string `json:"middleName,omitempty"` - - // Vector of optional attendees for this event. - OptionalAttendeesEmailVec []string `json:"optionalAttendeesEmailVec"` - - // Calendar item type specific fields - // Appointment/meeting Organizer. - OrganizerEmail *string `json:"organizerEmail,omitempty"` - - // Seconds from epoch at which the mail is received. - ReceivedTime *int64 `json:"receivedTime,omitempty"` - - // Recurrence pattern information for the recurring calendar events and - // tasks. - RecurrencePattern *int32 `json:"recurrencePattern,omitempty"` - - // Vector of required attendees for this event. - RequiredAttendeesEmailVec []string `json:"requiredAttendeesEmailVec"` - - // Item sensitivity. - Sensitivity *int32 `json:"sensitivity,omitempty"` - - // Seconds from epoch at which the mail is sent. - SentTime *int64 `json:"sentTime,omitempty"` - - // Seconds from epoch of the start date/time for the single occurence - // events. - StartTimeSecs *int64 `json:"startTimeSecs,omitempty"` - - // Subject of the item. - Subject *string `json:"subject,omitempty"` - - // Task items specific fields. - // Task owner. - TaskOwner *string `json:"taskOwner,omitempty"` - - // Status of the task. - TaskStatus *int32 `json:"taskStatus,omitempty"` - - // List of ToRecipient's email address. - ToRecipientsEmail []string `json:"toRecipientsEmail"` -} - -// Validate validates this cracked file document mailbox item metadata -func (m *CrackedFileDocumentMailboxItemMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFirstOccurrence(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastOccurrence(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentMailboxItemMetadata) validateFirstOccurrence(formats strfmt.Registry) error { - if swag.IsZero(m.FirstOccurrence) { // not required - return nil - } - - if m.FirstOccurrence != nil { - if err := m.FirstOccurrence.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstOccurrence") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentMailboxItemMetadata) validateLastOccurrence(formats strfmt.Registry) error { - if swag.IsZero(m.LastOccurrence) { // not required - return nil - } - - if m.LastOccurrence != nil { - if err := m.LastOccurrence.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastOccurrence") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document mailbox item metadata based on the context it is used -func (m *CrackedFileDocumentMailboxItemMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFirstOccurrence(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastOccurrence(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentMailboxItemMetadata) contextValidateFirstOccurrence(ctx context.Context, formats strfmt.Registry) error { - - if m.FirstOccurrence != nil { - - if swag.IsZero(m.FirstOccurrence) { // not required - return nil - } - - if err := m.FirstOccurrence.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstOccurrence") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentMailboxItemMetadata) contextValidateLastOccurrence(ctx context.Context, formats strfmt.Registry) error { - - if m.LastOccurrence != nil { - - if swag.IsZero(m.LastOccurrence) { // not required - return nil - } - - if err := m.LastOccurrence.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastOccurrence") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentMailboxItemMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentMailboxItemMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentMailboxItemMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_no_sql_metadata.go b/v1/models/cracked_file_document_no_sql_metadata.go deleted file mode 100644 index 8db0c8e2..00000000 --- a/v1/models/cracked_file_document_no_sql_metadata.go +++ /dev/null @@ -1,62 +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" -) - -// CrackedFileDocumentNoSQLMetadata Message used to store metadata for NoSQL documents. -// -// swagger:model CrackedFileDocument_NoSqlMetadata -type CrackedFileDocumentNoSQLMetadata struct { - - // Single string list of associated graph objects, if any - CassandraAssociatedGraphObjects []string `json:"cassandraAssociatedGraphObjects"` - - // doc type - DocType *int32 `json:"docType,omitempty"` - - // This field is populated if doc_type is 'kCassandraKeyspace' - KeyspaceType *int32 `json:"keyspaceType,omitempty"` - - // Fully Qualified Name(includes parent name) of the NoSQL document. - Name *string `json:"name,omitempty"` - - // Parent name, if parent exists. - ParentName *string `json:"parentName,omitempty"` -} - -// Validate validates this cracked file document no Sql metadata -func (m *CrackedFileDocumentNoSQLMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document no Sql metadata based on context it is used -func (m *CrackedFileDocumentNoSQLMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentNoSQLMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentNoSQLMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentNoSQLMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_o365_group_metadata.go b/v1/models/cracked_file_document_o365_group_metadata.go deleted file mode 100644 index bdeb857a..00000000 --- a/v1/models/cracked_file_document_o365_group_metadata.go +++ /dev/null @@ -1,217 +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" -) - -// CrackedFileDocumentO365GroupMetadata Message used to store metadata for documents of an O365 group. -// -// swagger:model CrackedFileDocument_O365GroupMetadata -type CrackedFileDocumentO365GroupMetadata struct { - - // doc type - DocType *int32 `json:"docType,omitempty"` - - // Captures the Item metatdata info. This is populated only if the - // doc_type is 'kEmail'. - EmailMetadata *ItemMetaData `json:"emailMetadata,omitempty"` - - // Captures the Folder metadata info. This is populated only if the - // doc_type is 'kEmailFolder'. - FolderMetadata *FolderContentInfo `json:"folderMetadata,omitempty"` - - // Captures the Group Site Item metatdata info. This is populated only if - // the doc_type is 'kSiteDoclib, kFile and kDirectory'. - SiteMetadata *CrackedFileDocumentSharepointMetadata `json:"siteMetadata,omitempty"` -} - -// Validate validates this cracked file document o365 group metadata -func (m *CrackedFileDocumentO365GroupMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEmailMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFolderMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) validateEmailMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.EmailMetadata) { // not required - return nil - } - - if m.EmailMetadata != nil { - if err := m.EmailMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) validateFolderMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.FolderMetadata) { // not required - return nil - } - - if m.FolderMetadata != nil { - if err := m.FolderMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) validateSiteMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.SiteMetadata) { // not required - return nil - } - - if m.SiteMetadata != nil { - if err := m.SiteMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document o365 group metadata based on the context it is used -func (m *CrackedFileDocumentO365GroupMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEmailMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFolderMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) contextValidateEmailMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.EmailMetadata != nil { - - if swag.IsZero(m.EmailMetadata) { // not required - return nil - } - - if err := m.EmailMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) contextValidateFolderMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.FolderMetadata != nil { - - if swag.IsZero(m.FolderMetadata) { // not required - return nil - } - - if err := m.FolderMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365GroupMetadata) contextValidateSiteMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteMetadata != nil { - - if swag.IsZero(m.SiteMetadata) { // not required - return nil - } - - if err := m.SiteMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentO365GroupMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentO365GroupMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentO365GroupMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_o365_teams_channel_files_metadata.go b/v1/models/cracked_file_document_o365_teams_channel_files_metadata.go deleted file mode 100644 index cb6cc2bd..00000000 --- a/v1/models/cracked_file_document_o365_teams_channel_files_metadata.go +++ /dev/null @@ -1,66 +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" -) - -// CrackedFileDocumentO365TeamsChannelFilesMetadata Metadata for teams channels files. File category is saved in the -// file_category field. Filepath, channel id and drive id will be part of -// file name. -// If the current item is a doclib, the filename will consist channel-id -// and doclib id only. Doclib name is saved in metadata field drive_name. -// -// swagger:model CrackedFileDocument_O365TeamsChannelFilesMetadata -type CrackedFileDocumentO365TeamsChannelFilesMetadata struct { - - // Seconds from epoch at which the file/folder is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // doc type - DocType *int32 `json:"docType,omitempty"` - - // Name of the drive for this item - DriveName *string `json:"driveName,omitempty"` - - // Id of this item - ID *string `json:"id,omitempty"` - - // Size of the file/folder in bytes. - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` -} - -// Validate validates this cracked file document o365 teams channel files metadata -func (m *CrackedFileDocumentO365TeamsChannelFilesMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document o365 teams channel files metadata based on context it is used -func (m *CrackedFileDocumentO365TeamsChannelFilesMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentO365TeamsChannelFilesMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentO365TeamsChannelFilesMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentO365TeamsChannelFilesMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_o365_teams_metadata.go b/v1/models/cracked_file_document_o365_teams_metadata.go deleted file mode 100644 index 5468018d..00000000 --- a/v1/models/cracked_file_document_o365_teams_metadata.go +++ /dev/null @@ -1,163 +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" -) - -// CrackedFileDocumentO365TeamsMetadata Metadata for teams items: channels, files etc. -// -// swagger:model CrackedFileDocument_O365TeamsMetadata -type CrackedFileDocumentO365TeamsMetadata struct { - - // Metdata document type. - DocType *int32 `json:"docType,omitempty"` - - // Metadata relating to file of a teams channel for this item. - TeamsChannelFileMetadata *CrackedFileDocumentO365TeamsChannelFilesMetadata `json:"teamsChannelFileMetadata,omitempty"` - - // Metadata relating to channels of a teams for this item. - TeamsChannelMetadata *CrackedFileDocumentTeamsChannelMetadata `json:"teamsChannelMetadata,omitempty"` -} - -// Validate validates this cracked file document o365 teams metadata -func (m *CrackedFileDocumentO365TeamsMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTeamsChannelFileMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsChannelMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentO365TeamsMetadata) validateTeamsChannelFileMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsChannelFileMetadata) { // not required - return nil - } - - if m.TeamsChannelFileMetadata != nil { - if err := m.TeamsChannelFileMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelFileMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelFileMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365TeamsMetadata) validateTeamsChannelMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsChannelMetadata) { // not required - return nil - } - - if m.TeamsChannelMetadata != nil { - if err := m.TeamsChannelMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document o365 teams metadata based on the context it is used -func (m *CrackedFileDocumentO365TeamsMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTeamsChannelFileMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsChannelMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentO365TeamsMetadata) contextValidateTeamsChannelFileMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsChannelFileMetadata != nil { - - if swag.IsZero(m.TeamsChannelFileMetadata) { // not required - return nil - } - - if err := m.TeamsChannelFileMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelFileMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelFileMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentO365TeamsMetadata) contextValidateTeamsChannelMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsChannelMetadata != nil { - - if swag.IsZero(m.TeamsChannelMetadata) { // not required - return nil - } - - if err := m.TeamsChannelMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsChannelMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsChannelMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentO365TeamsMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentO365TeamsMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentO365TeamsMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_one_drive_metadata.go b/v1/models/cracked_file_document_one_drive_metadata.go deleted file mode 100644 index 8076d2e2..00000000 --- a/v1/models/cracked_file_document_one_drive_metadata.go +++ /dev/null @@ -1,132 +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" -) - -// CrackedFileDocumentOneDriveMetadata Message used to store metadata for one drive documents. -// -// swagger:model CrackedFileDocument_OneDriveMetadata -type CrackedFileDocumentOneDriveMetadata struct { - - // Seconds from epoch at which the file/folder is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // doc type - DocType *int32 `json:"docType,omitempty"` - - // Type of the drive for this file/folder. - DriveType *int32 `json:"driveType,omitempty"` - - // The email of the owner of the file. - // TODO(tauseef): Mark this as reserved once Op cleanup is done. - OwnerEmail *string `json:"ownerEmail,omitempty"` - - // Specifies the collection of identity resources that represent creators' - // or owners' details for this Drive Item. This can hold user, application, - // device or group identities. Both name & email address within each - // identity are indexed. - OwnerIDSet *IdentitySet `json:"ownerIdSet,omitempty"` - - // The owner's name of the file. - // TODO(tauseef): Mark this as reserved once Op cleanup is done. - OwnerName *string `json:"ownerName,omitempty"` - - // Size of the file/folder in bytes. - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` -} - -// Validate validates this cracked file document one drive metadata -func (m *CrackedFileDocumentOneDriveMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOwnerIDSet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentOneDriveMetadata) validateOwnerIDSet(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerIDSet) { // not required - return nil - } - - if m.OwnerIDSet != nil { - if err := m.OwnerIDSet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerIdSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerIdSet") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document one drive metadata based on the context it is used -func (m *CrackedFileDocumentOneDriveMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOwnerIDSet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentOneDriveMetadata) contextValidateOwnerIDSet(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerIDSet != nil { - - if swag.IsZero(m.OwnerIDSet) { // not required - return nil - } - - if err := m.OwnerIDSet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerIdSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerIdSet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentOneDriveMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentOneDriveMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentOneDriveMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_public_folder_metadata.go b/v1/models/cracked_file_document_public_folder_metadata.go deleted file mode 100644 index 65d382c0..00000000 --- a/v1/models/cracked_file_document_public_folder_metadata.go +++ /dev/null @@ -1,170 +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" -) - -// CrackedFileDocumentPublicFolderMetadata Message used to store the metadata for Public Folder data type. -// -// Refer https://bit.ly/3gocxcw for details. -// -// swagger:model CrackedFileDocument_PublicFolderMetadata -type CrackedFileDocumentPublicFolderMetadata struct { - - // Metdata document type. - DocType *int32 `json:"docType,omitempty"` - - // Captures the Folder metadata info. This is populated only if the - // doc_type is 'kFolder'. - FolderMetadata *FolderContentInfo `json:"folderMetadata,omitempty"` - - // Specifies the type of folder if the doc_type is 'kFolder' - FolderType FolderType `json:"folderType,omitempty"` - - // Captures the Item metatdata info. This is populated only if the doc_type - // is not 'kFolder'. - ItemMetadata *ItemMetaData `json:"itemMetadata,omitempty"` -} - -// Validate validates this cracked file document public folder metadata -func (m *CrackedFileDocumentPublicFolderMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFolderMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateItemMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentPublicFolderMetadata) validateFolderMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.FolderMetadata) { // not required - return nil - } - - if m.FolderMetadata != nil { - if err := m.FolderMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentPublicFolderMetadata) validateItemMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ItemMetadata) { // not required - return nil - } - - if m.ItemMetadata != nil { - if err := m.ItemMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("itemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("itemMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document public folder metadata based on the context it is used -func (m *CrackedFileDocumentPublicFolderMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFolderMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateItemMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentPublicFolderMetadata) contextValidateFolderMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.FolderMetadata != nil { - - if swag.IsZero(m.FolderMetadata) { // not required - return nil - } - - if err := m.FolderMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentPublicFolderMetadata) contextValidateItemMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ItemMetadata != nil { - - if swag.IsZero(m.ItemMetadata) { // not required - return nil - } - - if err := m.ItemMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("itemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("itemMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentPublicFolderMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentPublicFolderMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentPublicFolderMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_sharepoint_lists_metadata.go b/v1/models/cracked_file_document_sharepoint_lists_metadata.go deleted file mode 100644 index 4b9a7641..00000000 --- a/v1/models/cracked_file_document_sharepoint_lists_metadata.go +++ /dev/null @@ -1,56 +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" -) - -// CrackedFileDocumentSharepointListsMetadata Contains metadata specific to sharepoint lists. -// -// swagger:model CrackedFileDocument_SharepointListsMetadata -type CrackedFileDocumentSharepointListsMetadata struct { - - // No. of items in the sharepoint list. - ItemCount *int32 `json:"itemCount,omitempty"` - - // Name of the list. - ListName *string `json:"listName,omitempty"` - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this cracked file document sharepoint lists metadata -func (m *CrackedFileDocumentSharepointListsMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document sharepoint lists metadata based on context it is used -func (m *CrackedFileDocumentSharepointListsMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentSharepointListsMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentSharepointListsMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentSharepointListsMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_sharepoint_metadata.go b/v1/models/cracked_file_document_sharepoint_metadata.go deleted file mode 100644 index 8b8bc153..00000000 --- a/v1/models/cracked_file_document_sharepoint_metadata.go +++ /dev/null @@ -1,184 +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" -) - -// CrackedFileDocumentSharepointMetadata Message used to store the metadata for SharePoint Document Library. -// -// swagger:model CrackedFileDocument_SharepointMetadata -type CrackedFileDocumentSharepointMetadata struct { - - // Seconds from epoch at which the file/folder is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // doc type - DocType *int32 `json:"docType,omitempty"` - - // Type of the drive for this file/folder/doclib. - DriveType *int32 `json:"driveType,omitempty"` - - // Metadata related to the sharepoint list. This is populated iff the Type - // is kSiteList. - ListMetadata *CrackedFileDocumentSharepointListsMetadata `json:"listMetadata,omitempty"` - - // The email of the owner of the file. - // TODO(tauseef): Mark this as reserved once Op cleanup is done. - OwnerEmail *string `json:"ownerEmail,omitempty"` - - // Specifies the collection of identity resources that represent creators' - // or owners' details for this Site Item. This can hold user, application, - // device or group identities. Both name & email address within each - // identity are indexed. - OwnerIDSet *IdentitySet `json:"ownerIdSet,omitempty"` - - // The owner's name of the file. - // TODO(tauseef): Mark this as reserved once Op cleanup is done. - OwnerName *string `json:"ownerName,omitempty"` - - // Size of the file/folder in bytes. - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` -} - -// Validate validates this cracked file document sharepoint metadata -func (m *CrackedFileDocumentSharepointMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateListMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerIDSet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentSharepointMetadata) validateListMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ListMetadata) { // not required - return nil - } - - if m.ListMetadata != nil { - if err := m.ListMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentSharepointMetadata) validateOwnerIDSet(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerIDSet) { // not required - return nil - } - - if m.OwnerIDSet != nil { - if err := m.OwnerIDSet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerIdSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerIdSet") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document sharepoint metadata based on the context it is used -func (m *CrackedFileDocumentSharepointMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateListMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerIDSet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentSharepointMetadata) contextValidateListMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ListMetadata != nil { - - if swag.IsZero(m.ListMetadata) { // not required - return nil - } - - if err := m.ListMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listMetadata") - } - return err - } - } - - return nil -} - -func (m *CrackedFileDocumentSharepointMetadata) contextValidateOwnerIDSet(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerIDSet != nil { - - if swag.IsZero(m.OwnerIDSet) { // not required - return nil - } - - if err := m.OwnerIDSet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerIdSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerIdSet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentSharepointMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentSharepointMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentSharepointMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_snapshot_tags_association_map_entry.go b/v1/models/cracked_file_document_snapshot_tags_association_map_entry.go deleted file mode 100644 index e3e89b6a..00000000 --- a/v1/models/cracked_file_document_snapshot_tags_association_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// CrackedFileDocumentSnapshotTagsAssociationMapEntry cracked file document snapshot tags association map entry -// -// swagger:model CrackedFileDocument_SnapshotTagsAssociationMapEntry -type CrackedFileDocumentSnapshotTagsAssociationMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *TaggedSnapshots `json:"value,omitempty"` -} - -// Validate validates this cracked file document snapshot tags association map entry -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) 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 -} - -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document snapshot tags association map entry based on the context it is used -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentSnapshotTagsAssociationMapEntry) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentSnapshotTagsAssociationMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_teams_channel_metadata.go b/v1/models/cracked_file_document_teams_channel_metadata.go deleted file mode 100644 index 21c58b7b..00000000 --- a/v1/models/cracked_file_document_teams_channel_metadata.go +++ /dev/null @@ -1,66 +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" -) - -// CrackedFileDocumentTeamsChannelMetadata Message used to store metadata for MS Teams channels. Id of channel will -// be saved in the filename field. -// -// swagger:model CrackedFileDocument_TeamsChannelMetadata -type CrackedFileDocumentTeamsChannelMetadata struct { - - // Email id of the channel. - ChannelEmail *string `json:"channelEmail,omitempty"` - - // Name of channel. - ChannelName *string `json:"channelName,omitempty"` - - // channel type - ChannelType *int32 `json:"channelType,omitempty"` - - // Seconds from epoch at which the channel is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // Ids of the owners of the channel. - OwnerIds []string `json:"ownerIds"` - - // Names of the owners of the channel. - OwnerNames []string `json:"ownerNames"` -} - -// Validate validates this cracked file document teams channel metadata -func (m *CrackedFileDocumentTeamsChannelMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document teams channel metadata based on context it is used -func (m *CrackedFileDocumentTeamsChannelMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentTeamsChannelMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentTeamsChannelMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentTeamsChannelMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_uda_metadata.go b/v1/models/cracked_file_document_uda_metadata.go deleted file mode 100644 index fc4c8906..00000000 --- a/v1/models/cracked_file_document_uda_metadata.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" -) - -// CrackedFileDocumentUdaMetadata Specify UDA specific metadata. -// -// swagger:model CrackedFileDocument_UdaMetadata -type CrackedFileDocumentUdaMetadata struct { - - // Type of entity being indexed. - EntityType *string `json:"entityType,omitempty"` - - // Full name of UDA entity being indexed. - FullName *string `json:"fullName,omitempty"` -} - -// Validate validates this cracked file document uda metadata -func (m *CrackedFileDocumentUdaMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cracked file document uda metadata based on context it is used -func (m *CrackedFileDocumentUdaMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentUdaMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentUdaMetadata) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentUdaMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cracked_file_document_version_info.go b/v1/models/cracked_file_document_version_info.go deleted file mode 100644 index e44b770e..00000000 --- a/v1/models/cracked_file_document_version_info.go +++ /dev/null @@ -1,129 +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" -) - -// CrackedFileDocumentVersionInfo These are the old versioning format fields. This takes a lot of space. -// -// Essentially we end up storing 5 8 byte ints, with 6 tags. This exists only -// because of migration. When we read an old doc where this field is -// populated, we convert it internally to the new format. -// TODO(apurv): Remove this. -// DEPRECATED. -// -// swagger:model CrackedFileDocument_VersionInfo -type CrackedFileDocumentVersionInfo struct { - - // Extracted tags from file content. - // Unused as of now, but plan is to do content analysis and add tags like: - // _has_ssn, _has_cc, .... - ContentAnalysisTags []string `json:"contentAnalysisTags"` - - // instance Id - InstanceID *MagnetoInstanceID `json:"instanceId,omitempty"` - - // mtime usecs - MtimeUsecs *int64 `json:"mtimeUsecs,omitempty"` - - // size bytes - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // snapshot timestamp usecs - SnapshotTimestampUsecs *int64 `json:"snapshotTimestampUsecs,omitempty"` -} - -// Validate validates this cracked file document version info -func (m *CrackedFileDocumentVersionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstanceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentVersionInfo) validateInstanceID(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if m.InstanceID != nil { - if err := m.InstanceID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cracked file document version info based on the context it is used -func (m *CrackedFileDocumentVersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstanceID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CrackedFileDocumentVersionInfo) contextValidateInstanceID(ctx context.Context, formats strfmt.Registry) error { - - if m.InstanceID != nil { - - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if err := m.InstanceID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CrackedFileDocumentVersionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CrackedFileDocumentVersionInfo) UnmarshalBinary(b []byte) error { - var res CrackedFileDocumentVersionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_active_directory_entry_params.go b/v1/models/create_active_directory_entry_params.go deleted file mode 100644 index 5c978a9b..00000000 --- a/v1/models/create_active_directory_entry_params.go +++ /dev/null @@ -1,299 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateActiveDirectoryEntryParams Specifies the params to join a Microsoft Active Directory domain. -// -// swagger:model CreateActiveDirectoryEntryParams -type CreateActiveDirectoryEntryParams struct { - - // Specifies the fully qualified domain name (FQDN) of an Active Directory. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the fallback id mapping info which is used when an ID mapping - // for a user is not found via the above IdMappingInfo. Only supported for - // two types of fallback mapping types - 'kRid' and 'kFixed'. - FallbackUserIDMappingInfo *UserIDMapping `json:"fallbackUserIdMappingInfo,omitempty"` - - // Specifies if Active Directory entry should be force removed from cluster. - ForceRemove *bool `json:"forceRemove,omitempty"` - - // Specifies the list of trusted domains that were set by the user to be - // ignored during trusted domain discovery. - IgnoredTrustedDomains []string `json:"ignoredTrustedDomains"` - - // Specifies the LDAP provider id which is map to this Active Directory - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Array of Machine Accounts. - // - // Specifies an array of computer names used to identify the Cohesity - // Cluster on the domain. - MachineAccounts []string `json:"machineAccounts"` - - // Specifies whether to use 'whitelistedDomains' only for authentication. - OnlyUseWhitelistedDomains *bool `json:"onlyUseWhitelistedDomains,omitempty"` - - // Specifies an optional Organizational Unit name. - OuName *string `json:"ouName,omitempty"` - - // Specifies whether the specified machine accounts should overwrite the - // existing machine accounts in this domain. - OverwriteExistingAccounts *bool `json:"overwriteExistingAccounts,omitempty"` - - // Specifies the password for the specified userName. - Password *string `json:"password,omitempty"` - - // Specifies Map of Active Directory domain names to its preferred domain - // controllers. - PreferredDomainControllers []*PreferredDomainController `json:"preferredDomainControllers"` - - // Specifies the task path for AD joining task. - TaskPath *string `json:"taskPath,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the trusted domains of the Active Directory domain. - // Read Only: true - TrustedDomains []string `json:"trustedDomains"` - - // Specifies whether Trusted Domain discovery is disabled. - TrustedDomainsEnabled *bool `json:"trustedDomainsEnabled,omitempty"` - - // Specifies the SID of the Active Directory domain user to be mapped to - // Unix root user. - UnixRootSid *string `json:"unixRootSid,omitempty"` - - // Specifies the information about how the Unix and Windows users are mapped - // for this domain. - UserIDMappingInfo *UserIDMapping `json:"userIdMappingInfo,omitempty"` - - // Specifies a userName that has administrative privileges in the domain. - UserName *string `json:"userName,omitempty"` - - // Specifies the Whitelisted Domains of the Active Directory domain. - WhitelistedDomains []string `json:"whitelistedDomains"` - - // Specifies an optional Workgroup name. - Workgroup *string `json:"workgroup,omitempty"` -} - -// Validate validates this create active directory entry params -func (m *CreateActiveDirectoryEntryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreferredDomainControllers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateActiveDirectoryEntryParams) validateFallbackUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if m.FallbackUserIDMappingInfo != nil { - if err := m.FallbackUserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *CreateActiveDirectoryEntryParams) validatePreferredDomainControllers(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredDomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - continue - } - - if m.PreferredDomainControllers[i] != nil { - if err := m.PreferredDomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateActiveDirectoryEntryParams) validateUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if m.UserIDMappingInfo != nil { - if err := m.UserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create active directory entry params based on the context it is used -func (m *CreateActiveDirectoryEntryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreferredDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTrustedDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateActiveDirectoryEntryParams) contextValidateFallbackUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackUserIDMappingInfo != nil { - - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if err := m.FallbackUserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *CreateActiveDirectoryEntryParams) contextValidatePreferredDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - - if m.PreferredDomainControllers[i] != nil { - - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - return nil - } - - if err := m.PreferredDomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateActiveDirectoryEntryParams) contextValidateTrustedDomains(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "trustedDomains", "body", []string(m.TrustedDomains)); err != nil { - return err - } - - return nil -} - -func (m *CreateActiveDirectoryEntryParams) contextValidateUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserIDMappingInfo != nil { - - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if err := m.UserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateActiveDirectoryEntryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateActiveDirectoryEntryParams) UnmarshalBinary(b []byte) error { - var res CreateActiveDirectoryEntryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_api_key_params.go b/v1/models/create_api_key_params.go deleted file mode 100644 index abadc946..00000000 --- a/v1/models/create_api_key_params.go +++ /dev/null @@ -1,80 +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" -) - -// CreateAPIKeyParams Parameters to create an API key. -// -// Specifies the parameters to create an API key. -// -// swagger:model CreateApiKeyParams -type CreateAPIKeyParams struct { - - // Specifies a time stamp when the API key will expire in milli seconds. - ExpiringTimeMsecs *int64 `json:"expiringTimeMsecs,omitempty"` - - // Specifies if the API key is active. Only an active and not expired API key - // can be used for authentication. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies the name of API key. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this create Api key params -func (m *CreateAPIKeyParams) 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 *CreateAPIKeyParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create Api key params based on context it is used -func (m *CreateAPIKeyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateAPIKeyParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateAPIKeyParams) UnmarshalBinary(b []byte) error { - var res CreateAPIKeyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_backup_job_arg.go b/v1/models/create_backup_job_arg.go deleted file mode 100644 index 1edf32b5..00000000 --- a/v1/models/create_backup_job_arg.go +++ /dev/null @@ -1,166 +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" -) - -// CreateBackupJobArg CreateBackupJobArg is the struct for parameters for creating a backup job. -// -// swagger:model CreateBackupJobArg -type CreateBackupJobArg struct { - - // BackupJobWrapper is the struct for the backup job. - BackupJob *BackupJobWrapper `json:"backupJob,omitempty"` - - // Entities to be protected with the given RPO policy id. Either - // 'job_description' or this field should be populated for CreateBackupJob - // request. - EntitiesToProtect *CreateBackupJobArgEntitiesToProtect `json:"entitiesToProtect,omitempty"` - - // RunOnceImmediately determines if job will be scheduled once (as a one-off - // run) as soon as possible. All job admission constraints will be honored. - RunOnceImmediately *bool `json:"runOnceImmediately,omitempty"` -} - -// Validate validates this create backup job arg -func (m *CreateBackupJobArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupJob(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntitiesToProtect(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateBackupJobArg) validateBackupJob(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJob) { // not required - return nil - } - - if m.BackupJob != nil { - if err := m.BackupJob.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJob") - } - return err - } - } - - return nil -} - -func (m *CreateBackupJobArg) validateEntitiesToProtect(formats strfmt.Registry) error { - if swag.IsZero(m.EntitiesToProtect) { // not required - return nil - } - - if m.EntitiesToProtect != nil { - if err := m.EntitiesToProtect.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entitiesToProtect") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entitiesToProtect") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create backup job arg based on the context it is used -func (m *CreateBackupJobArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupJob(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntitiesToProtect(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateBackupJobArg) contextValidateBackupJob(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupJob != nil { - - if swag.IsZero(m.BackupJob) { // not required - return nil - } - - if err := m.BackupJob.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJob") - } - return err - } - } - - return nil -} - -func (m *CreateBackupJobArg) contextValidateEntitiesToProtect(ctx context.Context, formats strfmt.Registry) error { - - if m.EntitiesToProtect != nil { - - if swag.IsZero(m.EntitiesToProtect) { // not required - return nil - } - - if err := m.EntitiesToProtect.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entitiesToProtect") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entitiesToProtect") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateBackupJobArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBackupJobArg) UnmarshalBinary(b []byte) error { - var res CreateBackupJobArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_backup_job_arg_entities_to_protect.go b/v1/models/create_backup_job_arg_entities_to_protect.go deleted file mode 100644 index 661fa050..00000000 --- a/v1/models/create_backup_job_arg_entities_to_protect.go +++ /dev/null @@ -1,60 +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" -) - -// CreateBackupJobArgEntitiesToProtect A message to hold the entities which should be protected with the given -// RPO policy. -// -// swagger:model CreateBackupJobArg_EntitiesToProtect -type CreateBackupJobArgEntitiesToProtect struct { - - // A list of entity ids to be protected. - EntityIDVec []int64 `json:"entityIdVec"` - - // Environment type of the protection required for the given entity ids. - // This field is needed to resolve ambiguousness between different possible - // types of protection for the given entities. For instance, a physical - // server can be protected as Block based or File based. - ProtectionEnv *int32 `json:"protectionEnv,omitempty"` - - // The RPO policy id to which the entities are being assigned. - RpoPolicyID *string `json:"rpoPolicyId,omitempty"` -} - -// Validate validates this create backup job arg entities to protect -func (m *CreateBackupJobArgEntitiesToProtect) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create backup job arg entities to protect based on context it is used -func (m *CreateBackupJobArgEntitiesToProtect) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateBackupJobArgEntitiesToProtect) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBackupJobArgEntitiesToProtect) UnmarshalBinary(b []byte) error { - var res CreateBackupJobArgEntitiesToProtect - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_backup_job_result_protected_entity.go b/v1/models/create_backup_job_result_protected_entity.go deleted file mode 100644 index c007af8d..00000000 --- a/v1/models/create_backup_job_result_protected_entity.go +++ /dev/null @@ -1,163 +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" -) - -// CreateBackupJobResultProtectedEntity A message to encapsulate protected entity and its backup job uid. -// -// swagger:model CreateBackupJobResult_ProtectedEntity -type CreateBackupJobResultProtectedEntity struct { - - // The id of the protected entity. - EntityID *int64 `json:"entityId,omitempty"` - - // Error encountered while protecting the entity. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Globally unique id of the hidden backup job that got created. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` -} - -// Validate validates this create backup job result protected entity -func (m *CreateBackupJobResultProtectedEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateBackupJobResultProtectedEntity) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *CreateBackupJobResultProtectedEntity) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this create backup job result protected entity based on the context it is used -func (m *CreateBackupJobResultProtectedEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateBackupJobResultProtectedEntity) 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 -} - -func (m *CreateBackupJobResultProtectedEntity) 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 -} - -// MarshalBinary interface implementation -func (m *CreateBackupJobResultProtectedEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBackupJobResultProtectedEntity) UnmarshalBinary(b []byte) error { - var res CreateBackupJobResultProtectedEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_bond_parameters.go b/v1/models/create_bond_parameters.go deleted file mode 100644 index 15998e34..00000000 --- a/v1/models/create_bond_parameters.go +++ /dev/null @@ -1,144 +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" -) - -// CreateBondParameters Create Bond Parameters. -// -// Specifies the parameters needed to create a bond. -// -// swagger:model CreateBondParameters -type CreateBondParameters struct { - - // Specifies the bonding mode to use for this bond. If not specified, - // this value will default to 'kActiveBackup'. - // 'kActiveBackup' indicates active backup bonding mode. - // 'k802_3ad' indicates 802.3ad bonding mode. - // Enum: ["kActiveBackup","k802_3ad"] - BondingMode *string `json:"bondingMode,omitempty"` - - // Specifies a unique name to identify the bond being created. - // Required: true - Name *string `json:"name"` - - // Specifies the names of the secondaries of this bond. - // Required: true - Slaves []string `json:"slaves"` -} - -// Validate validates this create bond parameters -func (m *CreateBondParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondingMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSlaves(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createBondParametersTypeBondingModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kActiveBackup","k802_3ad"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createBondParametersTypeBondingModePropEnum = append(createBondParametersTypeBondingModePropEnum, v) - } -} - -const ( - - // CreateBondParametersBondingModeKActiveBackup captures enum value "kActiveBackup" - CreateBondParametersBondingModeKActiveBackup string = "kActiveBackup" - - // CreateBondParametersBondingModeK8023ad captures enum value "k802_3ad" - CreateBondParametersBondingModeK8023ad string = "k802_3ad" -) - -// prop value enum -func (m *CreateBondParameters) validateBondingModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createBondParametersTypeBondingModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateBondParameters) validateBondingMode(formats strfmt.Registry) error { - if swag.IsZero(m.BondingMode) { // not required - return nil - } - - // value enum - if err := m.validateBondingModeEnum("bondingMode", "body", *m.BondingMode); err != nil { - return err - } - - return nil -} - -func (m *CreateBondParameters) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateBondParameters) validateSlaves(formats strfmt.Registry) error { - - if err := validate.Required("slaves", "body", m.Slaves); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create bond parameters based on context it is used -func (m *CreateBondParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateBondParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBondParameters) UnmarshalBinary(b []byte) error { - var res CreateBondParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_bond_result.go b/v1/models/create_bond_result.go deleted file mode 100644 index 112aeea6..00000000 --- a/v1/models/create_bond_result.go +++ /dev/null @@ -1,52 +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" -) - -// CreateBondResult Create Bond Result. -// -// Specifies the result of a request to create a new bond. -// -// swagger:model CreateBondResult -type CreateBondResult struct { - - // Specifies a message describing the result of the operation. - Message *string `json:"message,omitempty"` -} - -// Validate validates this create bond result -func (m *CreateBondResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create bond result based on context it is used -func (m *CreateBondResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateBondResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBondResult) UnmarshalBinary(b []byte) error { - var res CreateBondResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_cloud_cluster_parameters.go b/v1/models/create_cloud_cluster_parameters.go deleted file mode 100644 index 2b5256fb..00000000 --- a/v1/models/create_cloud_cluster_parameters.go +++ /dev/null @@ -1,259 +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" -) - -// CreateCloudClusterParameters Create Cloud Cluster Parameters. -// -// Specifies the parameters needed for creation of a new Cluster. -// -// swagger:model CreateCloudClusterParameters -type CreateCloudClusterParameters struct { - - // Specifies the name of the new Cluster. - // Required: true - ClusterName *string `json:"clusterName"` - - // Specifies the size of the cluster. It is set as Large by default if the - // parameter is not specified. - // Enum: ["Small","Medium","Large","XLarge"] - ClusterSize *string `json:"clusterSize,omitempty"` - - // Specifies the encryption configuration parameters. - EncryptionConfig *EncryptionConfiguration `json:"encryptionConfig,omitempty"` - - // Specifies IP preference. - IPPreference *int32 `json:"ipPreference,omitempty"` - - // Specifies the metadata fault tolerance. - MetadataFaultTolerance *int32 `json:"metadataFaultTolerance,omitempty"` - - // Specifies the network configuration parameters. - // Required: true - NetworkConfig *CloudNetworkConfiguration `json:"networkConfig"` - - // Specifies the configuration for the nodes in the new cluster. - // Required: true - NodeIps []string `json:"nodeIps"` -} - -// Validate validates this create cloud cluster parameters -func (m *CreateCloudClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterSize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeIps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateCloudClusterParameters) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -var createCloudClusterParametersTypeClusterSizePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Small","Medium","Large","XLarge"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createCloudClusterParametersTypeClusterSizePropEnum = append(createCloudClusterParametersTypeClusterSizePropEnum, v) - } -} - -const ( - - // CreateCloudClusterParametersClusterSizeSmall captures enum value "Small" - CreateCloudClusterParametersClusterSizeSmall string = "Small" - - // CreateCloudClusterParametersClusterSizeMedium captures enum value "Medium" - CreateCloudClusterParametersClusterSizeMedium string = "Medium" - - // CreateCloudClusterParametersClusterSizeLarge captures enum value "Large" - CreateCloudClusterParametersClusterSizeLarge string = "Large" - - // CreateCloudClusterParametersClusterSizeXLarge captures enum value "XLarge" - CreateCloudClusterParametersClusterSizeXLarge string = "XLarge" -) - -// prop value enum -func (m *CreateCloudClusterParameters) validateClusterSizeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createCloudClusterParametersTypeClusterSizePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateCloudClusterParameters) validateClusterSize(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterSize) { // not required - return nil - } - - // value enum - if err := m.validateClusterSizeEnum("clusterSize", "body", *m.ClusterSize); err != nil { - return err - } - - return nil -} - -func (m *CreateCloudClusterParameters) validateEncryptionConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if m.EncryptionConfig != nil { - if err := m.EncryptionConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreateCloudClusterParameters) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *CreateCloudClusterParameters) validateNodeIps(formats strfmt.Registry) error { - - if err := validate.Required("nodeIps", "body", m.NodeIps); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create cloud cluster parameters based on the context it is used -func (m *CreateCloudClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateCloudClusterParameters) contextValidateEncryptionConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionConfig != nil { - - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if err := m.EncryptionConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreateCloudClusterParameters) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 *CreateCloudClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCloudClusterParameters) UnmarshalBinary(b []byte) error { - var res CreateCloudClusterParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_cloud_domain_migration_parameters.go b/v1/models/create_cloud_domain_migration_parameters.go deleted file mode 100644 index 91e8c7d9..00000000 --- a/v1/models/create_cloud_domain_migration_parameters.go +++ /dev/null @@ -1,69 +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" -) - -// CreateCloudDomainMigrationParameters Cloud Domain Migration Params. -// -// CreateCloudDomainMigrationParameters represents the parameters needed to -// schedule the cloud domain migration. -// -// swagger:model CreateCloudDomainMigrationParameters -type CreateCloudDomainMigrationParameters struct { - - // Specifies the Id of a specific cloud domain present inside the vault, that - // needs to be migrated. If not set, all cloud domains found in the vault or - // under the 'domain_namespace' specified in CADConfig will be migrated. - CloudDomainID *int64 `json:"cloudDomainId,omitempty"` - - // Specifies if the migration mode is CAD or not. - IsCadMode *bool `json:"isCadMode,omitempty"` - - // Specifies the Unique identifier of the domain migration request and can be - // used to query the status of the migration. - MigrationUID *string `json:"migrationUid,omitempty"` - - // Specifies Id of the vault. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the id of the viewbox for the request in case migration mode is - // Incremental Forever. Not set for CAD mode migration. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this create cloud domain migration parameters -func (m *CreateCloudDomainMigrationParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create cloud domain migration parameters based on context it is used -func (m *CreateCloudDomainMigrationParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCloudDomainMigrationParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCloudDomainMigrationParameters) UnmarshalBinary(b []byte) error { - var res CreateCloudDomainMigrationParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_cluster_result.go b/v1/models/create_cluster_result.go deleted file mode 100644 index 95335594..00000000 --- a/v1/models/create_cluster_result.go +++ /dev/null @@ -1,205 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateClusterResult Create Cluster Result. -// -// Specifies the immediate result of a Cluster creation request. Contains -// validation results for each node. If the request is valid, it also -// indicates that the individual node bringup operation is started in -// the background. -// -// swagger:model CreateClusterResult -type CreateClusterResult struct { - - // Specifies the ID of the new Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the name of the new Cluster. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the software version of the new Cluster. - ClusterSwVersion *string `json:"clusterSwVersion,omitempty"` - - // Specifies the status of the Nodes in the Cluster. All Nodes that - // are accepted to the Cluster are appended to this list. - HealthyNodes []*NodeStatus `json:"healthyNodes"` - - // Specifies the Incarnation ID of the new Cluster. - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // Specifies an optional message field. - Message *string `json:"message,omitempty"` - - // Specifies the status of the Nodes in the Cluster. All Nodes that are - // not accepted to the Cluster are appended to this list. - UnhealthyNodes []*NodeStatus `json:"unhealthyNodes"` -} - -// Validate validates this create cluster result -func (m *CreateClusterResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHealthyNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnhealthyNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateClusterResult) validateHealthyNodes(formats strfmt.Registry) error { - if swag.IsZero(m.HealthyNodes) { // not required - return nil - } - - for i := 0; i < len(m.HealthyNodes); i++ { - if swag.IsZero(m.HealthyNodes[i]) { // not required - continue - } - - if m.HealthyNodes[i] != nil { - if err := m.HealthyNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("healthyNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("healthyNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateClusterResult) validateUnhealthyNodes(formats strfmt.Registry) error { - if swag.IsZero(m.UnhealthyNodes) { // not required - return nil - } - - for i := 0; i < len(m.UnhealthyNodes); i++ { - if swag.IsZero(m.UnhealthyNodes[i]) { // not required - continue - } - - if m.UnhealthyNodes[i] != nil { - if err := m.UnhealthyNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unhealthyNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unhealthyNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create cluster result based on the context it is used -func (m *CreateClusterResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHealthyNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnhealthyNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateClusterResult) contextValidateHealthyNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HealthyNodes); i++ { - - if m.HealthyNodes[i] != nil { - - if swag.IsZero(m.HealthyNodes[i]) { // not required - return nil - } - - if err := m.HealthyNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("healthyNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("healthyNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateClusterResult) contextValidateUnhealthyNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UnhealthyNodes); i++ { - - if m.UnhealthyNodes[i] != nil { - - if swag.IsZero(m.UnhealthyNodes[i]) { // not required - return nil - } - - if err := m.UnhealthyNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unhealthyNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unhealthyNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateClusterResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateClusterResult) UnmarshalBinary(b []byte) error { - var res CreateClusterResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_idp_configuration_request.go b/v1/models/create_idp_configuration_request.go deleted file mode 100644 index eac701f4..00000000 --- a/v1/models/create_idp_configuration_request.go +++ /dev/null @@ -1,108 +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" -) - -// CreateIdpConfigurationRequest Create IdP Configuration Request. -// -// Specifies the configuration for an IdP service to be created. -// -// swagger:model CreateIdpConfigurationRequest -type CreateIdpConfigurationRequest struct { - - // Specifies whether to allow local authentication. When IdP is configured, - // only IdP users are allowed to login to the Cluster. Local login is - // disabled except for users with admin role. If this flag is set to true, - // local (non-IdP) logins are allowed for all local and AD users. Local or - // AD users with admin role can login always independent of this flag's - // setting. - AllowLocalAuthentication *bool `json:"allowLocalAuthentication,omitempty"` - - // Specifies the certificate generated for the app by the IdP service when - // the Cluster is registered as an app. This is required to verify the - // SAML response. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the filename used to upload the certificate. - CertificateFilename *string `json:"certificateFilename,omitempty"` - - // Specifies a unique name for this IdP configuration. - Domain *string `json:"domain,omitempty"` - - // Specifies a flag to enable or disable this IdP service. When it is set - // to true, IdP service is enabled. When it is set to false, IdP service - // is disabled. When an IdP service is created, it is set to true. - Enable *bool `json:"enable,omitempty"` - - // Specifies the IdP provided Issuer ID for the app. - // For example, exkh1aov1nhHrgFhN0h7. - IssuerID *string `json:"issuerId,omitempty"` - - // Specifies the name of the vendor providing IdP service. - Name *string `json:"name,omitempty"` - - // Specifies a list of roles assigned to an IdP user if samlAttributeName is - // not given. - Roles []string `json:"roles"` - - // Specifies the SAML attribute name that contains a comma separated list - // of Cluster roles. Either this field or roles must be set. This field - // takes higher precedence than the roles field. - SamlAttributeName *string `json:"samlAttributeName,omitempty"` - - // Specifies whether to sign the SAML request or not. When it is set - // to true, SAML request will be signed. When it is set to false, SAML - // request is not signed. Default is false. Set this flag to true if - // the IdP site is configured to expect the SAML request from the Cluster - // signed. If this is set to true, users must get the Cluster's certificate - // and upload it on the IdP site. - SignRequest *bool `json:"signRequest,omitempty"` - - // Specifies the SSO URL of the IdP service for the customer. This is the - // URL given by IdP when the customer created an account. Customers may use - // this for several clusters that are registered with on IdP site. - // For example, dev-332534.oktapreview.com - SsoURL *string `json:"ssoUrl,omitempty"` - - // Specifies the Tenant Id if the IdP is configured for a Tenant. If this is - // not set, this IdP configuration is used for the Cluster level users and - // for all users of Tenants not having an IdP configuration. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this create idp configuration request -func (m *CreateIdpConfigurationRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create idp configuration request based on context it is used -func (m *CreateIdpConfigurationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateIdpConfigurationRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateIdpConfigurationRequest) UnmarshalBinary(b []byte) error { - var res CreateIdpConfigurationRequest - 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_physical_cluster_parameters.go b/v1/models/create_physical_cluster_parameters.go deleted file mode 100644 index 63c9e749..00000000 --- a/v1/models/create_physical_cluster_parameters.go +++ /dev/null @@ -1,314 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreatePhysicalClusterParameters Create Physical Cluster Parameters. -// -// Specifies the parameters needed for creation of a new Cluster. -// -// swagger:model CreatePhysicalClusterParameters -type CreatePhysicalClusterParameters struct { - - // Specifies if API based GET should be enabled for cluster destroy - // params. - AllowAPIBasedFetch *bool `json:"allowApiBasedFetch,omitempty"` - - // Specifies HMAC secret key that will be used to validate OTP used - // for destroy request. This is b32 format of the HMAC key. - // This should only be set/modified during cluster creation. - ClusterDestroyHmacKey *string `json:"clusterDestroyHmacKey,omitempty"` - - // Specifies the name of the new Cluster. - // Required: true - ClusterName *string `json:"clusterName"` - - // Specifies if cluster destroy op is enabled on this cluster. - // This should only be set/modified during cluster creation. - EnableClusterDestroy *bool `json:"enableClusterDestroy,omitempty"` - - // Specifies the encryption configuration parameters. - EncryptionConfig *EncryptionConfiguration `json:"encryptionConfig,omitempty"` - - // Specifies IP preference. - IPPreference *int32 `json:"ipPreference,omitempty"` - - // Specifies the IPMI configuration parameters. - // Required: true - IpmiConfig *IpmiConfiguration `json:"ipmiConfig"` - - // Specifies the metadata fault tolerance. - MetadataFaultTolerance *int32 `json:"metadataFaultTolerance,omitempty"` - - // Specifies the network configuration parameters. - // Required: true - NetworkConfig *NetworkConfiguration `json:"networkConfig"` - - // Specifies the configuration for the nodes in the new cluster. - // Required: true - NodeConfigs []*PhysicalNodeConfiguration `json:"nodeConfigs"` - - // Specifies Trust Domain used for Service Identity. - TrustDomain *string `json:"trustDomain,omitempty"` -} - -// Validate validates this create physical cluster parameters -func (m *CreatePhysicalClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIpmiConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreatePhysicalClusterParameters) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *CreatePhysicalClusterParameters) validateEncryptionConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if m.EncryptionConfig != nil { - if err := m.EncryptionConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreatePhysicalClusterParameters) validateIpmiConfig(formats strfmt.Registry) error { - - if err := validate.Required("ipmiConfig", "body", m.IpmiConfig); err != nil { - return err - } - - if m.IpmiConfig != nil { - if err := m.IpmiConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipmiConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipmiConfig") - } - return err - } - } - - return nil -} - -func (m *CreatePhysicalClusterParameters) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *CreatePhysicalClusterParameters) validateNodeConfigs(formats strfmt.Registry) error { - - if err := validate.Required("nodeConfigs", "body", m.NodeConfigs); err != nil { - return err - } - - for i := 0; i < len(m.NodeConfigs); i++ { - if swag.IsZero(m.NodeConfigs[i]) { // not required - continue - } - - if m.NodeConfigs[i] != nil { - if err := m.NodeConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create physical cluster parameters based on the context it is used -func (m *CreatePhysicalClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIpmiConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreatePhysicalClusterParameters) contextValidateEncryptionConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionConfig != nil { - - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if err := m.EncryptionConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreatePhysicalClusterParameters) contextValidateIpmiConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.IpmiConfig != nil { - - if err := m.IpmiConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipmiConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipmiConfig") - } - return err - } - } - - return nil -} - -func (m *CreatePhysicalClusterParameters) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *CreatePhysicalClusterParameters) contextValidateNodeConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeConfigs); i++ { - - if m.NodeConfigs[i] != nil { - - if swag.IsZero(m.NodeConfigs[i]) { // not required - return nil - } - - if err := m.NodeConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreatePhysicalClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreatePhysicalClusterParameters) UnmarshalBinary(b []byte) error { - var res CreatePhysicalClusterParameters - 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 deleted file mode 100644 index 3ac40a85..00000000 --- a/v1/models/create_remote_vault_restore_task_parameters.go +++ /dev/null @@ -1,285 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateRemoteVaultRestoreTaskParameters Create Remote Vault Restore Task Request. -// -// Specifies settings required to create a task that restores the -// index and/or the Snapshots of a Protection Job from a remote Vault -// to the current Cluster. -// -// swagger:model CreateRemoteVaultRestoreTaskParameters -type CreateRemoteVaultRestoreTaskParameters struct { - - // Specifies the way data needs to be retrieved from the external target. - // This information will be filled in by Iris and Magneto will pass it along - // to the Icebox as it is to support bulk retrieval from Glacier. - // Specifies the type of Restore Task. - // - // 'kStandard' specifies retrievals that allow to access any of your archives - // within several hours. Standard retrievals typically complete within 3–5 - // hours. This is the default option for retrieval requests that do not specify - // the retrieval option. - // 'kBulk' specifies retrievals that are Glacier’s lowest-cost retrieval - // option, which can be used to retrieve large amounts, even petabytes, of data - // inexpensively in a day. Bulk retrieval typically complete within 5–12 hours. - // 'kExpedited' specifies retrievals that allows to quickly access your data - // when occasional urgent requests for a subset of archives are required. For - // all but the largest archives (250 MB+), data accessed using Expedited - // retrievals are typically made available within 1–5 minutes. - // Enum: ["kStandard","kBulk","kExpedited"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` - - // Array of Restore Objects. - // - // Specifies the list of Snapshots and the index to be restored from the - // remote Vault. The data on the remote Vault may have been - // originally archived from multiple remote Clusters. - RestoreObjects []*IndexAndSnapshots `json:"restoreObjects"` - - // search job Uid - // Required: true - SearchJobUID *CreateRemoteVaultRestoreTaskParametersSearchJobUID `json:"searchJobUid"` - - // Specifies a name of the restore task. - // Required: true - TaskName *string `json:"taskName"` - - // Specifies the id of the Vault that contains the index and - // Snapshots to restore to the current Cluster. - // This is the id assigned by the Cohesity Cluster when Vault was - // registered as an External Target. - // Required: true - VaultID *int64 `json:"vaultId"` -} - -// Validate validates this create remote vault restore task parameters -func (m *CreateRemoteVaultRestoreTaskParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createRemoteVaultRestoreTaskParametersTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kBulk","kExpedited"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createRemoteVaultRestoreTaskParametersTypeGlacierRetrievalTypePropEnum = append(createRemoteVaultRestoreTaskParametersTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKStandard captures enum value "kStandard" - CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKStandard string = "kStandard" - - // CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKBulk captures enum value "kBulk" - CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKBulk string = "kBulk" - - // CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKExpedited captures enum value "kExpedited" - CreateRemoteVaultRestoreTaskParametersGlacierRetrievalTypeKExpedited string = "kExpedited" -) - -// prop value enum -func (m *CreateRemoteVaultRestoreTaskParameters) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createRemoteVaultRestoreTaskParametersTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateRemoteVaultRestoreTaskParameters) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -func (m *CreateRemoteVaultRestoreTaskParameters) validateRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.RestoreObjects); i++ { - if swag.IsZero(m.RestoreObjects[i]) { // not required - continue - } - - if m.RestoreObjects[i] != nil { - if err := m.RestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *CreateRemoteVaultRestoreTaskParameters) validateTaskName(formats strfmt.Registry) error { - - if err := validate.Required("taskName", "body", m.TaskName); err != nil { - return err - } - - return nil -} - -func (m *CreateRemoteVaultRestoreTaskParameters) validateVaultID(formats strfmt.Registry) error { - - if err := validate.Required("vaultId", "body", m.VaultID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create remote vault restore task parameters based on the context it is used -func (m *CreateRemoteVaultRestoreTaskParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRemoteVaultRestoreTaskParameters) contextValidateRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreObjects); i++ { - - if m.RestoreObjects[i] != nil { - - if swag.IsZero(m.RestoreObjects[i]) { // not required - return nil - } - - if err := m.RestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *CreateRemoteVaultRestoreTaskParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRemoteVaultRestoreTaskParameters) UnmarshalBinary(b []byte) error { - var res CreateRemoteVaultRestoreTaskParameters - 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_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_remote_vault_search_job_parameters.go b/v1/models/create_remote_vault_search_job_parameters.go deleted file mode 100644 index 8b0e8530..00000000 --- a/v1/models/create_remote_vault_search_job_parameters.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateRemoteVaultSearchJobParameters Create Remote Vault Search Request. -// -// Specifies settings required to create a search of a -// remote Vault for data that has been archived from other Clusters. -// -// swagger:model CreateRemoteVaultSearchJobParameters -type CreateRemoteVaultSearchJobParameters struct { - - // Filter by specifying a list of remote job uids in form of - // clusterId:clusterIncarnationId:jobId. - JobUids []string `json:"JobUids"` - - // Filter by specifying a Cluster id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Filter by specifying a Cluster name prefix string. - // Only Clusters with names that start with this prefix string are returned - // in the search result. - // If not set, all Clusters archiving data to the Vault - // are returned in the search results. - ClusterMatchString *string `json:"clusterMatchString,omitempty"` - - // Array of Encryption Keys. - // - // Specifies an optional list of encryption keys that may be needed to - // search and restore data that was archived to a remote Vault. - // Archived data cannot be searched or restored without the - // corresponding encryption key used by the original Cluster - // to archive the data. - // Encryption keys can be uploaded using the REST API - // public/remoteVaults/encryptionKeys operation. - // If the key is already uploaded, this field does not need to be - // specified. - EncryptionKeys []*VaultEncryptionKey `json:"encryptionKeys"` - - // Filter by a end time specified as a Unix epoch Timestamp - // (in microseconds). Only Job Runs that completed before the specified - // end time are included in the search results. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Filter by specifying a Protection Job name prefix string. - // Only Protection Jobs with names that start with this prefix string - // are returned in the search result. - // If not set, all Protection Jobs archiving data to the Vault - // are returned in the search results. - JobMatchString *string `json:"jobMatchString,omitempty"` - - // Specifies the search Job name. - // Required: true - SearchJobName *string `json:"searchJobName"` - - // Filter by a start time specified as a Unix epoch Timestamp - // (in microseconds). Only Job Runs that started after the specified - // time are included in the search results. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the id of the Vault to search. This id was assigned by the - // local Cohesity Cluster when Vault was registered as an External Target. - // Required: true - VaultID *int64 `json:"vaultId"` -} - -// Validate validates this create remote vault search job parameters -func (m *CreateRemoteVaultSearchJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEncryptionKeys(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRemoteVaultSearchJobParameters) validateEncryptionKeys(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionKeys) { // not required - return nil - } - - for i := 0; i < len(m.EncryptionKeys); i++ { - if swag.IsZero(m.EncryptionKeys[i]) { // not required - continue - } - - if m.EncryptionKeys[i] != nil { - if err := m.EncryptionKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateRemoteVaultSearchJobParameters) validateSearchJobName(formats strfmt.Registry) error { - - if err := validate.Required("searchJobName", "body", m.SearchJobName); err != nil { - return err - } - - return nil -} - -func (m *CreateRemoteVaultSearchJobParameters) validateVaultID(formats strfmt.Registry) error { - - if err := validate.Required("vaultId", "body", m.VaultID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create remote vault search job parameters based on the context it is used -func (m *CreateRemoteVaultSearchJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionKeys(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRemoteVaultSearchJobParameters) contextValidateEncryptionKeys(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EncryptionKeys); i++ { - - if m.EncryptionKeys[i] != nil { - - if swag.IsZero(m.EncryptionKeys[i]) { // not required - return nil - } - - if err := m.EncryptionKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRemoteVaultSearchJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRemoteVaultSearchJobParameters) UnmarshalBinary(b []byte) error { - var res CreateRemoteVaultSearchJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_view_alias_response_body.go b/v1/models/create_view_alias_response_body.go deleted file mode 100644 index 2e2e772c..00000000 --- a/v1/models/create_view_alias_response_body.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateViewAliasResponseBody Specifies the response body of creating view alias. -// -// swagger:model CreateViewAliasResponseBody -type CreateViewAliasResponseBody struct { - - // Alias name. - AliasName *string `json:"aliasName,omitempty"` - - // Specifies whether to enable filer audit log on this view alias. - EnableFilerAuditLog *bool `json:"enableFilerAuditLog,omitempty"` - - // Specifies the SMB encryption for the View Alias. If set, it enables the - // SMB encryption for the View Alias. Encryption is supported only by SMB 3.x - // dialects. Dialects that do not support would still access data in - // unencrypted format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // If set, it enables discovery of view alias for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View Alias. - // If set, encryption is enforced for all the sessions for the View Alias. - // When enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Specifies the creating view alias message. - Message *string `json:"message,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View Alias. (Overrides the Subnets specified at the global - // Cohesity Cluster level and View level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this alias. - SuperUserSids []string `json:"superUserSids"` - - // View name. - ViewName *string `json:"viewName,omitempty"` - - // View path for the alias. - ViewPath *string `json:"viewPath,omitempty"` -} - -// Validate validates this create view alias response body -func (m *CreateViewAliasResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewAliasResponseBody) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewAliasResponseBody) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create view alias response body based on the context it is used -func (m *CreateViewAliasResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewAliasResponseBody) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewAliasResponseBody) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewAliasResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewAliasResponseBody) UnmarshalBinary(b []byte) error { - var res CreateViewAliasResponseBody - 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 deleted file mode 100644 index beda0e15..00000000 --- a/v1/models/create_view_box_params.go +++ /dev/null @@ -1,434 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateViewBoxParams Storage Domain (View Box) Request. -// -// Provides details about the Storage Domain (View Box). -// -// swagger:model CreateViewBoxParams -type CreateViewBoxParams struct { - - // Specifies an active directory domain that this view box is mapped to. - AdDomainName *string `json:"adDomainName,omitempty"` - - // Specifies the default brick size used by the viewbox. - BrickSize *int32 `json:"brickSize,omitempty"` - - // Array of Subnets. - // - // Specifies the Subnets from which this Storage Domain (View Box) accepts - // requests. - ClientSubnetWhiteList []*Subnet `json:"clientSubnetWhiteList"` - - // Specifies the cloud down water-fall threshold percentage. This indicates - // how full should a viewbox at least be before we down water-fall its data - // to cloud tier. If this field is set, the physical quota limit must be set - // also and will be used as viewbox capacity. - CloudDownWaterfallThresholdPct *int32 `json:"cloudDownWaterfallThresholdPct,omitempty"` - - // Specifies the cloud down water-fall threshold seconds. This indicates - // what's the time threshold on water-falling data to cloud tier. - CloudDownWaterfallThresholdSecs *int32 `json:"cloudDownWaterfallThresholdSecs,omitempty"` - - // Specifies the Cluster Partition id where the Storage Domain (View Box) is - // located. - // 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 whether DEK(Data Encryption Key) rotation is enabled for this - // viewbox. This is applicable only when the viewbox uses AWS or similar KMS - // in which the KEK (Key Encryption Key) is not created and maintained by - // Cohesity. For Internal KMS and keys stored in Safenet servers, DEK - // rotation will not be performed. - DekRotationEnabled *bool `json:"dekRotationEnabled,omitempty"` - - // Specifies whether this viewbox can be used as a staging area while copying - // a largedataset that can't fit on the cluster to an external target. The - // amount of data that can be stored on the viewbox can be specified using - // 'physical_quota'. - DirectArchiveEnabled *bool `json:"directArchiveEnabled,omitempty"` - - // Specifies the Kerberos domain that this view box is mapped to. - KerberosRealmName *string `json:"kerberosRealmName,omitempty"` - - // Specifies the associated KMS Server ID. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // When set, the following provides the LDAP provider the view box is - // mapped to. For any view from this view box, when accessed via NFS the - // following LDAP provider is looked up for getting Unix IDs of the - // corresponding user. Similarly, when a view is accessed via SMB and if - // the AD user's domain matches with the view box's AD, the following LDAP - // provider will be used to lookup Unix IDs for the corresponding AD user. - // Additionally there is also a mapping between LDAP provider and AD domain - // that is stored in AD provider config. It will be used if AD is not set - // on the view box. - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Specifies the name of the Storage Domain (View Box). - // Required: true - Name *string `json:"name"` - - // Specifies the NIS domain that this view box is mapped to. - NisDomainNameVec []string `json:"nisDomainNameVec"` - - // physical quota - PhysicalQuota *CreateViewBoxParamsPhysicalQuota `json:"physicalQuota,omitempty"` - - // Specifies whether creation of a S3 bucket is allowed in this - // Storage Domain (View Box). - // When a new S3 bucket creation request arrives, we'll look at all the View - // Boxes and the first Storage Domain (View Box) that allows creating S3 - // buckets in it will be the one where the bucket will be placed. - S3BucketsAllowed *bool `json:"s3BucketsAllowed,omitempty"` - - // Specifies the storage options applied to the Storage Domain (View Box). - StoragePolicy *StoragePolicy `json:"storagePolicy,omitempty"` - - // Optional ids for the tenants that this view box belongs. This must be - // checked before granting access to users. Unless the cluster enables view - // box sharing between tenants is allowed, there shall be at most one item - // in this list. Note that if all tenant may be deleted - such viewboxes - // must be garbage collected. This is currently done by a background thread - // in iris. - TenantIDVec []string `json:"tenantIdVec"` - - // Specifies the brick size to be used by the viewbox for creating any new - // blobs. - UpdatedBrickSize *int32 `json:"updatedBrickSize,omitempty"` -} - -// Validate validates this create view box params -func (m *CreateViewBoxParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnetWhiteList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterPartitionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultViewQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewBoxParams) validateClientSubnetWhiteList(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhiteList) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhiteList); i++ { - if swag.IsZero(m.ClientSubnetWhiteList[i]) { // not required - continue - } - - if m.ClientSubnetWhiteList[i] != nil { - if err := m.ClientSubnetWhiteList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewBoxParams) validateClusterPartitionID(formats strfmt.Registry) error { - - if err := validate.Required("clusterPartitionId", "body", m.ClusterPartitionID); err != nil { - return err - } - - return nil -} - -func (m *CreateViewBoxParams) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - 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 -} - -func (m *CreateViewBoxParams) validateDefaultViewQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultViewQuotaPolicy) { // not required - 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 -} - -func (m *CreateViewBoxParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateViewBoxParams) validatePhysicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalQuota) { // not required - 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 -} - -func (m *CreateViewBoxParams) validateStoragePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if m.StoragePolicy != nil { - if err := m.StoragePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create view box params based on the context it is used -func (m *CreateViewBoxParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhiteList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultViewQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewBoxParams) contextValidateClientSubnetWhiteList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhiteList); i++ { - - if m.ClientSubnetWhiteList[i] != nil { - - if swag.IsZero(m.ClientSubnetWhiteList[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhiteList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *CreateViewBoxParams) contextValidateStoragePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicy != nil { - - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if err := m.StoragePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewBoxParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewBoxParams) UnmarshalBinary(b []byte) error { - var res CreateViewBoxParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index aa709c5a..00000000 --- a/v1/models/create_view_request.go +++ /dev/null @@ -1,1147 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateViewRequest Create View Request. -// -// Specifies the information required for creating a new View. -// -// swagger:model CreateViewRequest -type CreateViewRequest struct { - - // Array of Security Identifiers (SIDs) - // - // Specifies the list of security identifiers (SIDs) for the restricted - // Principals who have access to this View. - AccessSids []string `json:"accessSids"` - - // Specifies the antivirus scan config settings for this View. - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - // Specifies whether to support case insensitive file/folder names. This - // parameter can only be set during create and cannot be changed. - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - // Specifies an optional text description about the View. - Description *string `json:"description,omitempty"` - - // Specifies whether fast durable handle is enabled. If enabled, view open - // handle will be kept in memory, which results in a higher performance. But - // the handles cannot be recovered if node or service crashes. - EnableFastDurableHandle *bool `json:"enableFastDurableHandle,omitempty"` - - // Specifies if Filer Audit Logging is enabled for this view. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Specifies whether to enable live indexing for the view. - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - // To enable blur on a new view - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - // If set, mixed mode (NFS and SMB) access is enabled for this view. - // This field is deprecated. Use the field SecurityMode. - // deprecated: true - EnableMixedModePermissions *bool `json:"enableMixedModePermissions,omitempty"` - - // If set, it enables discovery of view for NFS. - EnableNfsViewDiscovery *bool `json:"enableNfsViewDiscovery,omitempty"` - - // Specifies whether to enable offline file caching of the view. - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - // Specifies if access-based enumeration should be enabled. - // If 'true', only files and folders that the user has permissions to - // access are visible on the SMB share for that user. - EnableSmbAccessBasedEnumeration *bool `json:"enableSmbAccessBasedEnumeration,omitempty"` - - // Specifies the SMB encryption for the View. If set, it enables the SMB - // encryption for the View. Encryption is supported only by SMB 3.x dialects. - // Dialects that do not support would still access data in unencrypted - // format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // Specifies whether SMB opportunistic lock is enabled. - EnableSmbOplock *bool `json:"enableSmbOplock,omitempty"` - - // If set, it enables discovery of view for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View. - // If set, encryption is enforced for all the sessions for the View. When - // enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Optional filtering criteria that should be satisfied by all the files - // created in this view. It does not affect existing files. - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - // Optional config that enables file locking for this view. It cannot be - // disabled during the edit of a view, if it has been enabled during the - // creation of the view. Also, it cannot be enabled if it was disabled - // during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies whether view is for externally triggered backup target. - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - // Specifies if the view is a read only view. User will no longer be able to - // write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // logical quota - LogicalQuota *CreateViewRequestLogicalQuota `json:"logicalQuota,omitempty"` - - // Specifies the name of the new View to create. - // Required: true - Name *string `json:"name"` - - // Array of Netgroups. - // - // Specifies a list of Netgroups that have permissions to access the - // View. (Overrides the Netgroups specified at the global Cohesity - // Cluster level.) - NetgroupWhitelist []*NisNetgroup `json:"netgroupWhitelist"` - - // Specifies the NFS all squash config. - NfsAllSquash *NfsSquash `json:"nfsAllSquash,omitempty"` - - // Specifies the NFS root permission config of the view file system. - NfsRootPermissions *NfsRootPermissions `json:"nfsRootPermissions,omitempty"` - - // Specifies the NFS root squash config. - NfsRootSquash *NfsSquash `json:"nfsRootSquash,omitempty"` - - // Specifies whether view level client netgroup allowlist overrides cluster - // and global setting. - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - // Specifies whether view level client subnet allowlist overrides cluster and - // global setting. - OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - - // 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. - // 'kS3Only' enables protocol access to S3 only. - // 'kSwiftOnly' enables protocol access to Swift only. - // 'kUnknown' indicates that the protocol access of a view does not match - // any of the above. In this case, the constant is used as 'catch-all'. - // Enum: ["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"] - ProtocolAccess *string `json:"protocolAccess,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies whether to support s3 folder support feature on the view. This - // parameter can only be set during create and cannot be changed. - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - // Specifies key mapping config of S3 storage. - // Configuration of S3 key mapping. - // - // Specifies the type of S3 key mapping config. - // Enum: ["kRandom","kShort","kLong","kHierarchical","kObjectId"] - S3KeyMappingConfig *string `json:"s3KeyMappingConfig,omitempty"` - - // Specifies the security mode used for this view. - // Currently we support the following modes: Native, Unified and NTFS style. - // 'kNativeMode' indicates a native security mode. - // 'kUnifiedMode' indicates a unified security mode. - // 'kNtfsMode' indicates a NTFS style security mode. - // Enum: ["kNativeMode","kUnifiedMode","kNtfsMode"] - SecurityMode *string `json:"securityMode,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies the SMB permissions for the View. - SmbPermissionsInfo *SmbPermissionsInfo `json:"smbPermissionsInfo,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from - // the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // Array of Subnets. - // - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View. (Overrides the Subnets specified at the global - // Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this view. - SuperUserSids []string `json:"superUserSids"` - - // Specifies the Keystone project domain. - SwiftProjectDomain *string `json:"swiftProjectDomain,omitempty"` - - // Specifies the Keystone project name. - SwiftProjectName *string `json:"swiftProjectName,omitempty"` - - // Specifies the Keystone user domain. - SwiftUserDomain *string `json:"swiftUserDomain,omitempty"` - - // Specifies the Keystone username. - SwiftUsername *string `json:"swiftUsername,omitempty"` - - // Optional tenant id who has access to this View. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the id of the Storage Domain (View Box) where the View will be - // created. - // Required: true - ViewBoxID *int64 `json:"viewBoxId"` - - // Specifies whether view lock is enabled. If enabled the view cannot be - // modified or deleted until unlock. By default it is disabled. - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - // Specifies the pinning config of this view. - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` -} - -// Validate validates this create view request -func (m *CreateViewRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusScanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileExtensionFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsAllSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootPermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3KeyMappingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPermissionsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewBoxID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPinningConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewRequest) validateAntivirusScanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if m.AntivirusScanConfig != nil { - if err := m.AntivirusScanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateFileExtensionFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if m.FileExtensionFilter != nil { - if err := m.FileExtensionFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateLogicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalQuota) { // not required - 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 -} - -func (m *CreateViewRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateViewRequest) validateNetgroupWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - continue - } - - if m.NetgroupWhitelist[i] != nil { - if err := m.NetgroupWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) validateNfsAllSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if m.NfsAllSquash != nil { - if err := m.NfsAllSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateNfsRootPermissions(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if m.NfsRootPermissions != nil { - if err := m.NfsRootPermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateNfsRootSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if m.NfsRootSquash != nil { - if err := m.NfsRootSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -var createViewRequestTypeProtocolAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createViewRequestTypeProtocolAccessPropEnum = append(createViewRequestTypeProtocolAccessPropEnum, v) - } -} - -const ( - - // CreateViewRequestProtocolAccessKAll captures enum value "kAll" - CreateViewRequestProtocolAccessKAll string = "kAll" - - // CreateViewRequestProtocolAccessKNFSOnly captures enum value "kNFSOnly" - CreateViewRequestProtocolAccessKNFSOnly string = "kNFSOnly" - - // CreateViewRequestProtocolAccessKSMBOnly captures enum value "kSMBOnly" - CreateViewRequestProtocolAccessKSMBOnly string = "kSMBOnly" - - // CreateViewRequestProtocolAccessKS3Only captures enum value "kS3Only" - CreateViewRequestProtocolAccessKS3Only string = "kS3Only" - - // CreateViewRequestProtocolAccessKSwiftOnly captures enum value "kSwiftOnly" - CreateViewRequestProtocolAccessKSwiftOnly string = "kSwiftOnly" - - // CreateViewRequestProtocolAccessKUnknown captures enum value "kUnknown" - CreateViewRequestProtocolAccessKUnknown string = "kUnknown" -) - -// prop value enum -func (m *CreateViewRequest) validateProtocolAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createViewRequestTypeProtocolAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateViewRequest) validateProtocolAccess(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - // value enum - if err := m.validateProtocolAccessEnum("protocolAccess", "body", *m.ProtocolAccess); err != nil { - return err - } - - return nil -} - -func (m *CreateViewRequest) validateQos(formats strfmt.Registry) error { - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -var createViewRequestTypeS3KeyMappingConfigPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRandom","kShort","kLong","kHierarchical","kObjectId"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createViewRequestTypeS3KeyMappingConfigPropEnum = append(createViewRequestTypeS3KeyMappingConfigPropEnum, v) - } -} - -const ( - - // CreateViewRequestS3KeyMappingConfigKRandom captures enum value "kRandom" - CreateViewRequestS3KeyMappingConfigKRandom string = "kRandom" - - // CreateViewRequestS3KeyMappingConfigKShort captures enum value "kShort" - CreateViewRequestS3KeyMappingConfigKShort string = "kShort" - - // CreateViewRequestS3KeyMappingConfigKLong captures enum value "kLong" - CreateViewRequestS3KeyMappingConfigKLong string = "kLong" - - // CreateViewRequestS3KeyMappingConfigKHierarchical captures enum value "kHierarchical" - CreateViewRequestS3KeyMappingConfigKHierarchical string = "kHierarchical" - - // CreateViewRequestS3KeyMappingConfigKObjectID captures enum value "kObjectId" - CreateViewRequestS3KeyMappingConfigKObjectID string = "kObjectId" -) - -// prop value enum -func (m *CreateViewRequest) validateS3KeyMappingConfigEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createViewRequestTypeS3KeyMappingConfigPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateViewRequest) validateS3KeyMappingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.S3KeyMappingConfig) { // not required - return nil - } - - // value enum - if err := m.validateS3KeyMappingConfigEnum("s3KeyMappingConfig", "body", *m.S3KeyMappingConfig); err != nil { - return err - } - - return nil -} - -var createViewRequestTypeSecurityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNativeMode","kUnifiedMode","kNtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createViewRequestTypeSecurityModePropEnum = append(createViewRequestTypeSecurityModePropEnum, v) - } -} - -const ( - - // CreateViewRequestSecurityModeKNativeMode captures enum value "kNativeMode" - CreateViewRequestSecurityModeKNativeMode string = "kNativeMode" - - // CreateViewRequestSecurityModeKUnifiedMode captures enum value "kUnifiedMode" - CreateViewRequestSecurityModeKUnifiedMode string = "kUnifiedMode" - - // CreateViewRequestSecurityModeKNtfsMode captures enum value "kNtfsMode" - CreateViewRequestSecurityModeKNtfsMode string = "kNtfsMode" -) - -// prop value enum -func (m *CreateViewRequest) validateSecurityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createViewRequestTypeSecurityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateViewRequest) validateSecurityMode(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityMode) { // not required - return nil - } - - // value enum - if err := m.validateSecurityModeEnum("securityMode", "body", *m.SecurityMode); err != nil { - return err - } - - return nil -} - -func (m *CreateViewRequest) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) validateSmbPermissionsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if m.SmbPermissionsInfo != nil { - if err := m.SmbPermissionsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) validateViewBoxID(formats strfmt.Registry) error { - - if err := validate.Required("viewBoxId", "body", m.ViewBoxID); err != nil { - return err - } - - return nil -} - -func (m *CreateViewRequest) validateViewPinningConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if m.ViewPinningConfig != nil { - if err := m.ViewPinningConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - 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 - - if err := m.contextValidateAntivirusScanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileExtensionFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsAllSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootPermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPermissionsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewPinningConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewRequest) contextValidateAntivirusScanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AntivirusScanConfig != nil { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if err := m.AntivirusScanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateFileExtensionFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileExtensionFilter != nil { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if err := m.FileExtensionFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -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 -} - -func (m *CreateViewRequest) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - - if m.NetgroupWhitelist[i] != nil { - - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - return nil - } - - if err := m.NetgroupWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) contextValidateNfsAllSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsAllSquash != nil { - - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if err := m.NfsAllSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateNfsRootPermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootPermissions != nil { - - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if err := m.NfsRootPermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateNfsRootSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootSquash != nil { - - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if err := m.NfsRootSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) contextValidateSmbPermissionsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbPermissionsInfo != nil { - - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if err := m.SmbPermissionsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *CreateViewRequest) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateViewRequest) contextValidateViewPinningConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewPinningConfig != nil { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if err := m.ViewPinningConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewRequest) UnmarshalBinary(b []byte) error { - var res CreateViewRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return 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/create_virtual_cluster_parameters.go b/v1/models/create_virtual_cluster_parameters.go deleted file mode 100644 index 1aa5533a..00000000 --- a/v1/models/create_virtual_cluster_parameters.go +++ /dev/null @@ -1,252 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateVirtualClusterParameters Create Virtual Cluster Parameters. -// -// Specifies the parameters needed for creation of a new Cluster. -// -// swagger:model CreateVirtualClusterParameters -type CreateVirtualClusterParameters struct { - - // Specifies the name of the new Cluster. - // Required: true - ClusterName *string `json:"clusterName"` - - // Specifies the encryption configuration parameters. - EncryptionConfig *EncryptionConfiguration `json:"encryptionConfig,omitempty"` - - // Specifies IP preference. - IPPreference *int32 `json:"ipPreference,omitempty"` - - // Specifies the metadata fault tolerance. - MetadataFaultTolerance *int32 `json:"metadataFaultTolerance,omitempty"` - - // Specifies the network configuration parameters. - // Required: true - NetworkConfig *NetworkConfiguration `json:"networkConfig"` - - // Specifies the configuration for the nodes in the new cluster. - // Required: true - NodeConfigs []*VirtualNodeConfiguration `json:"nodeConfigs"` - - // Specifies Trust Domain used for Service Identity. - TrustDomain *string `json:"trustDomain,omitempty"` -} - -// Validate validates this create virtual cluster parameters -func (m *CreateVirtualClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateVirtualClusterParameters) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *CreateVirtualClusterParameters) validateEncryptionConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if m.EncryptionConfig != nil { - if err := m.EncryptionConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreateVirtualClusterParameters) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *CreateVirtualClusterParameters) validateNodeConfigs(formats strfmt.Registry) error { - - if err := validate.Required("nodeConfigs", "body", m.NodeConfigs); err != nil { - return err - } - - for i := 0; i < len(m.NodeConfigs); i++ { - if swag.IsZero(m.NodeConfigs[i]) { // not required - continue - } - - if m.NodeConfigs[i] != nil { - if err := m.NodeConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create virtual cluster parameters based on the context it is used -func (m *CreateVirtualClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateVirtualClusterParameters) contextValidateEncryptionConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionConfig != nil { - - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if err := m.EncryptionConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *CreateVirtualClusterParameters) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *CreateVirtualClusterParameters) contextValidateNodeConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeConfigs); i++ { - - if m.NodeConfigs[i] != nil { - - if swag.IsZero(m.NodeConfigs[i]) { // not required - return nil - } - - if err := m.NodeConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateVirtualClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateVirtualClusterParameters) UnmarshalBinary(b []byte) error { - var res CreateVirtualClusterParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/created_api_key.go b/v1/models/created_api_key.go deleted file mode 100644 index 51d9366c..00000000 --- a/v1/models/created_api_key.go +++ /dev/null @@ -1,84 +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" -) - -// CreatedAPIKey Created API key. -// -// Specifies a created API key. -// -// swagger:model CreatedApiKey -type CreatedAPIKey struct { - - // Specifies the API key created time in milli seconds. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the user sid who created this API key. - CreatedUserSid *string `json:"createdUserSid,omitempty"` - - // Specifies the username who created this API key. - CreatedUsername *string `json:"createdUsername,omitempty"` - - // Specifies a time stamp when the API key will expire in milli seconds. - ExpiringTimeMsecs *int64 `json:"expiringTimeMsecs,omitempty"` - - // Specifies the API key id. - ID *string `json:"id,omitempty"` - - // Specifies if the API key is active. Only an active and not expired API key - // can be used for authentication. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies if the API key is expired. Expired API keys cannot be used for - // authentication. - IsExpired *bool `json:"isExpired,omitempty"` - - // Specifies the created key. - Key *string `json:"key,omitempty"` - - // Specifies the API key name. - Name *string `json:"name,omitempty"` - - // Specifies the user sid who owns this API key. - OwnerUserSid *string `json:"ownerUserSid,omitempty"` - - // Specifies the username who owns this API key. - OwnerUsername *string `json:"ownerUsername,omitempty"` -} - -// Validate validates this created Api key -func (m *CreatedAPIKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this created Api key based on context it is used -func (m *CreatedAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreatedAPIKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreatedAPIKey) UnmarshalBinary(b []byte) error { - var res CreatedAPIKey - 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 deleted file mode 100644 index 23d898df..00000000 --- a/v1/models/created_remote_vault_search_job_uid.go +++ /dev/null @@ -1,112 +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" -) - -// CreatedRemoteVaultSearchJobUID Remote Vault Search Job Uid. -// -// Specifies the Uid of the Job created to search the -// remote vault. -// -// swagger:model CreatedRemoteVaultSearchJobUid -type CreatedRemoteVaultSearchJobUID struct { - - // search job Uid - SearchJobUID *CreatedRemoteVaultSearchJobUIDSearchJobUID `json:"searchJobUid,omitempty"` -} - -// Validate validates this created remote vault search job Uid -func (m *CreatedRemoteVaultSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreatedRemoteVaultSearchJobUID) validateSearchJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobUID) { // not required - 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 -} - -// ContextValidate validate this created remote vault search job Uid based on the context it is used -func (m *CreatedRemoteVaultSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *CreatedRemoteVaultSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreatedRemoteVaultSearchJobUID) UnmarshalBinary(b []byte) error { - var res CreatedRemoteVaultSearchJobUID - 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_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/credentials.go b/v1/models/credentials.go deleted file mode 100644 index b8df0662..00000000 --- a/v1/models/credentials.go +++ /dev/null @@ -1,55 +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" -) - -// Credentials Credentials. -// -// Specifies credentials to access a target source. -// -// swagger:model Credentials -type Credentials struct { - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` -} - -// Validate validates this credentials -func (m *Credentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this credentials based on context it is used -func (m *Credentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Credentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Credentials) UnmarshalBinary(b []byte) error { - var res Credentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/credentials_proto.go b/v1/models/credentials_proto.go deleted file mode 100644 index f2e1912d..00000000 --- a/v1/models/credentials_proto.go +++ /dev/null @@ -1,65 +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" -) - -// CredentialsProto Message that encapsulates credentials to authenticate to an environment. -// -// Copied from: base/credentials.proto -> message Credentials. -// -// swagger:model CredentialsProto -type CredentialsProto struct { - - // AES256 encrypted password. The key for encryption should be obtained from - // KMS. This field stores the encrypted password when the credentials are - // being sent to bifrost. - EncryptedPassword []uint8 `json:"encryptedPassword"` - - // This field is not used in storage, other than historical records. The - // field is only set for inflight rpcs. - Password []uint8 `json:"password"` - - // The token to use for authentication. For example, in a SAN environment, - // this can be the API token that is used to create a REST session. - Token *string `json:"token,omitempty"` - - // The username and password to use for authentication. - Username *string `json:"username,omitempty"` -} - -// Validate validates this credentials proto -func (m *CredentialsProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this credentials proto based on context it is used -func (m *CredentialsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CredentialsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CredentialsProto) UnmarshalBinary(b []byte) error { - var res CredentialsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cryptsoft_kms_config_response.go b/v1/models/cryptsoft_kms_config_response.go deleted file mode 100644 index 6da0a05d..00000000 --- a/v1/models/cryptsoft_kms_config_response.go +++ /dev/null @@ -1,63 +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" -) - -// CryptsoftKmsConfigResponse CryptsoftKmsConfigResponse specifies response parameters for cryptsoftKMS. -// -// swagger:model CryptsoftKmsConfigResponse -type CryptsoftKmsConfigResponse struct { - - // AdditonalServerAddress for the KMS server. - AdditionalServerAddress []string `json:"additionalServerAddress"` - - // Specifies expiry date of client certificate. - ClientCertificateExpiryDate *int64 `json:"clientCertificateExpiryDate,omitempty"` - - // Specifies protocol version used to communicate with the KMS. - KmipProtocolVersion *string `json:"kmipProtocolVersion,omitempty"` - - // Specifies the KMS IP address. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies port on which the server is listening. - // Default port is 5696. - ServerPort *int32 `json:"serverPort,omitempty"` -} - -// Validate validates this cryptsoft kms config response -func (m *CryptsoftKmsConfigResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cryptsoft kms config response based on context it is used -func (m *CryptsoftKmsConfigResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CryptsoftKmsConfigResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CryptsoftKmsConfigResponse) UnmarshalBinary(b []byte) error { - var res CryptsoftKmsConfigResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cryptsoft_kms_configuration.go b/v1/models/cryptsoft_kms_configuration.go deleted file mode 100644 index 63ca73cc..00000000 --- a/v1/models/cryptsoft_kms_configuration.go +++ /dev/null @@ -1,70 +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" -) - -// CryptsoftKmsConfiguration Specifies the parameters for kmip KMS configuration. -// -// swagger:model CryptsoftKmsConfiguration -type CryptsoftKmsConfiguration struct { - - // AdditonalServerAddress for the KMS server. - AdditionalServerAddress []string `json:"additionalServerAddress"` - - // Specifies the CA certificate in PEM format. - CaCertificate *string `json:"caCertificate,omitempty"` - - // Specifies the client certificate. - // It is in PEM format. - ClientCertificate *string `json:"clientCertificate,omitempty"` - - // Specifies the client private key. - ClientKey *string `json:"clientKey,omitempty"` - - // Specifies protocol version used to communicate with the KMS. - KmipProtocolVersion *string `json:"kmipProtocolVersion,omitempty"` - - // Specifies the KMS IP address. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies port on which the server is listening. - // Default port is 5696. - ServerPort *int32 `json:"serverPort,omitempty"` -} - -// Validate validates this cryptsoft kms configuration -func (m *CryptsoftKmsConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cryptsoft kms configuration based on context it is used -func (m *CryptsoftKmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CryptsoftKmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CryptsoftKmsConfiguration) UnmarshalBinary(b []byte) error { - var res CryptsoftKmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cryptsoft_kms_update_params.go b/v1/models/cryptsoft_kms_update_params.go deleted file mode 100644 index 51f1f0c2..00000000 --- a/v1/models/cryptsoft_kms_update_params.go +++ /dev/null @@ -1,70 +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" -) - -// CryptsoftKmsUpdateParams CryptsoftKmsUpdateParams to define CryptsoftKms. -// -// swagger:model CryptsoftKmsUpdateParams -type CryptsoftKmsUpdateParams struct { - - // AdditonalServerAddress for the KMS server. - AdditionalServerAddress []string `json:"additionalServerAddress"` - - // Specifies the CA certificate in PEM format. - CaCertificate *string `json:"caCertificate,omitempty"` - - // Specifies the client certificate. - // It is in PEM format. - ClientCertificate *string `json:"clientCertificate,omitempty"` - - // Specifies the client private key. - ClientKey *string `json:"clientKey,omitempty"` - - // Specifies protocol version used to communicate with the KMS. - KmipProtocolVersion *string `json:"kmipProtocolVersion,omitempty"` - - // Specifies the KMS IP address. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies port on which the server is listening. - // Default port is 5696. - ServerPort *int32 `json:"serverPort,omitempty"` -} - -// Validate validates this cryptsoft kms update params -func (m *CryptsoftKmsUpdateParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cryptsoft kms update params based on context it is used -func (m *CryptsoftKmsUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CryptsoftKmsUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CryptsoftKmsUpdateParams) UnmarshalBinary(b []byte) error { - var res CryptsoftKmsUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/custom_attribute.go b/v1/models/custom_attribute.go deleted file mode 100644 index d3d12c58..00000000 --- a/v1/models/custom_attribute.go +++ /dev/null @@ -1,62 +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" -) - -// CustomAttribute Message representing a VMware Custom attribute so that it can be used as an -// attribute of a VMware entity. -// -// swagger:model CustomAttribute -type CustomAttribute struct { - - // The key of the custom attribute. - Key *int32 `json:"key,omitempty"` - - // The name of the custom attribute. Name is case sensitive. - // eg. "Last Backup" - Name *string `json:"name,omitempty"` - - // The ManagedObjectType of the custom attribute. - Type *string `json:"type,omitempty"` - - // The value of the custom attribute. - // eg. "10-25-2019 10:00 am" - Value *string `json:"value,omitempty"` -} - -// Validate validates this custom attribute -func (m *CustomAttribute) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this custom attribute based on context it is used -func (m *CustomAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CustomAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CustomAttribute) UnmarshalBinary(b []byte) error { - var res CustomAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/custom_tag.go b/v1/models/custom_tag.go deleted file mode 100644 index 3923f8ee..00000000 --- a/v1/models/custom_tag.go +++ /dev/null @@ -1,55 +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" -) - -// CustomTag Custom Tag Information. -// -// swagger:model CustomTag -type CustomTag struct { - - // Key for the tag. - Key *string `json:"key,omitempty"` - - // Value for the tag. Note that if the provided tag value's length is more - // than the maximum length allowed by AWS (256 unicode characters), then the - // value would be automatically truncated before setting. - Value *string `json:"value,omitempty"` -} - -// Validate validates this custom tag -func (m *CustomTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this custom tag based on context it is used -func (m *CustomTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CustomTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CustomTag) UnmarshalBinary(b []byte) error { - var res CustomTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/custom_tag_params.go b/v1/models/custom_tag_params.go deleted file mode 100644 index e45c25ea..00000000 --- a/v1/models/custom_tag_params.go +++ /dev/null @@ -1,56 +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" -) - -// CustomTagParams Custom Tag Parameters. -// -// Specifies the key, value pair for Custom Tag to be applied to the resources -// created in AWS Cloudspin. -// -// swagger:model CustomTagParams -type CustomTagParams struct { - - // Specifies the key for the custom tag. - Key *string `json:"key,omitempty"` - - // Specifies the value for the custom tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this custom tag params -func (m *CustomTagParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this custom tag params based on context it is used -func (m *CustomTagParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CustomTagParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CustomTagParams) UnmarshalBinary(b []byte) error { - var res CustomTagParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/custom_unix_id_attributes.go b/v1/models/custom_unix_id_attributes.go deleted file mode 100644 index 799919da..00000000 --- a/v1/models/custom_unix_id_attributes.go +++ /dev/null @@ -1,59 +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" -) - -// CustomUnixIDAttributes Custom Unix ID Attributes. -// -// Specifies the custom attributes when mapping type is set to -// 'kCustomAttributes'. It defines the attribute names to derive the mapping -// for a user of an Active Directory domain. -// -// swagger:model CustomUnixIdAttributes -type CustomUnixIDAttributes struct { - - // Specifies the custom field name in Active Directory user properties to get - // the GID. - GidAttrName *string `json:"gidAttrName,omitempty"` - - // Specifies the custom field name in Active Directory user properties to get - // the UID. - UIDAttrName *string `json:"uidAttrName,omitempty"` -} - -// Validate validates this custom unix Id attributes -func (m *CustomUnixIDAttributes) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this custom unix Id attributes based on context it is used -func (m *CustomUnixIDAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CustomUnixIDAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CustomUnixIDAttributes) UnmarshalBinary(b []byte) error { - var res CustomUnixIDAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/d_b_entity_info.go b/v1/models/d_b_entity_info.go deleted file mode 100644 index 32b952eb..00000000 --- a/v1/models/d_b_entity_info.go +++ /dev/null @@ -1,416 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DBEntityInfo d b entity info -// -// swagger:model DBEntityInfo -type DBEntityInfo struct { - - // If archivelog mode is enabled for the database. - ArchivelogEnabled *bool `json:"archivelogEnabled,omitempty"` - - // If the block change tracking(bct) is enabled for the database. - BctEnabled *bool `json:"bctEnabled,omitempty"` - - // Container Database(CDB) info from this database. - CdbEntityInfo *CDBEntityInfo `json:"cdbEntityInfo,omitempty"` - - // Character set. - CharacterSet *string `json:"characterSet,omitempty"` - - // Oracle compatible parameter. - // COMPATIBLE is oracle parameter that enables us to use a new release of - // Oracle while ensuring the ability to downgrade the database to an earlier - // release. - // Required for PDB plug/unplug operations for now. - Compatibility *string `json:"compatibility,omitempty"` - - // The domain for database. - DbDomain *string `json:"dbDomain,omitempty"` - - // Type of oracle database edition. - DbEdition *int32 `json:"dbEdition,omitempty"` - - // Database type. - DbType *int32 `json:"dbType,omitempty"` - - // DB Unique Name. - DbUniqueName *string `json:"dbUniqueName,omitempty"` - - // DG Entity Info from this database. - DgEntityInfo *DGEntityInfo `json:"dgEntityInfo,omitempty"` - - // Flash/Fast Recovery area size in the Oracle DB. - // https://tinyurl.com/ybvby6fm - FraSize *int64 `json:"fraSize,omitempty"` - - // List of hosts for the current DB entity. - HostVec []*Host `json:"hostVec"` - - // The maximum number of datafiles. - MaxDatafiles *int64 `json:"maxDatafiles,omitempty"` - - // The maximum number of instances. - MaxInstances *int64 `json:"maxInstances,omitempty"` - - // The maximum number of log history. - MaxLogHistory *int64 `json:"maxLogHistory,omitempty"` - - // The maximum number of logfiles. - MaxLogfiles *int64 `json:"maxLogfiles,omitempty"` - - // The maximum number of log members. - MaxLogmembers *int64 `json:"maxLogmembers,omitempty"` - - // open mode - OpenMode *int32 `json:"openMode,omitempty"` - - // Pluggable Database(PDB) info from this database. - // This structure is populated for individual pdb level entity. The pdb - // entity will be available directly. - // In the future, all the pdb entities will be accessed only via this field. - // and the CDBEntityInfo will only be used in few places like - // discovery/registration. - PdbEntityInfo *PDBEntityInfo `json:"pdbEntityInfo,omitempty"` - - // System Global Area size in Oracle DB. - // https://tinyurl.com/y9o4ho6d - SgaTargetSize *string `json:"sgaTargetSize,omitempty"` - - // shared pool size in Oracle DB. - // https://tinyurl.com/y84a8lpl - SharedPoolSize *string `json:"sharedPoolSize,omitempty"` - - // Size of the DB. This includes the size consumed by datafiles, - // controlfiles, redo log files and temp files. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Path to the spfile. - SpfilePath *string `json:"spfilePath,omitempty"` - - // The num of transparent data encryption(tde) tablespace in database. - TdeEncryptedTsCount *int64 `json:"tdeEncryptedTsCount,omitempty"` - - // #tempfiles in the Oracle DB. - // https://tinyurl.com/y873lpna - TempFilesCount *int64 `json:"tempFilesCount,omitempty"` - - // Tempfile information of the database. - TempfileInfoVec []*DBEntityInfoTempfileInfoRow `json:"tempfileInfoVec"` - - // Oracle database instance version - Version *string `json:"version,omitempty"` -} - -// Validate validates this d b entity info -func (m *DBEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCdbEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDgEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePdbEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempfileInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DBEntityInfo) validateCdbEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CdbEntityInfo) { // not required - return nil - } - - if m.CdbEntityInfo != nil { - if err := m.CdbEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) validateDgEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DgEntityInfo) { // not required - return nil - } - - if m.DgEntityInfo != nil { - if err := m.DgEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dgEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dgEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) validateHostVec(formats strfmt.Registry) error { - if swag.IsZero(m.HostVec) { // not required - return nil - } - - for i := 0; i < len(m.HostVec); i++ { - if swag.IsZero(m.HostVec[i]) { // not required - continue - } - - if m.HostVec[i] != nil { - if err := m.HostVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DBEntityInfo) validatePdbEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PdbEntityInfo) { // not required - return nil - } - - if m.PdbEntityInfo != nil { - if err := m.PdbEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) validateTempfileInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.TempfileInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.TempfileInfoVec); i++ { - if swag.IsZero(m.TempfileInfoVec[i]) { // not required - continue - } - - if m.TempfileInfoVec[i] != nil { - if err := m.TempfileInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempfileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempfileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this d b entity info based on the context it is used -func (m *DBEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCdbEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDgEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePdbEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempfileInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DBEntityInfo) contextValidateCdbEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdbEntityInfo != nil { - - if swag.IsZero(m.CdbEntityInfo) { // not required - return nil - } - - if err := m.CdbEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) contextValidateDgEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DgEntityInfo != nil { - - if swag.IsZero(m.DgEntityInfo) { // not required - return nil - } - - if err := m.DgEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dgEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dgEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) contextValidateHostVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostVec); i++ { - - if m.HostVec[i] != nil { - - if swag.IsZero(m.HostVec[i]) { // not required - return nil - } - - if err := m.HostVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DBEntityInfo) contextValidatePdbEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PdbEntityInfo != nil { - - if swag.IsZero(m.PdbEntityInfo) { // not required - return nil - } - - if err := m.PdbEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *DBEntityInfo) contextValidateTempfileInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TempfileInfoVec); i++ { - - if m.TempfileInfoVec[i] != nil { - - if swag.IsZero(m.TempfileInfoVec[i]) { // not required - return nil - } - - if err := m.TempfileInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempfileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempfileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DBEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DBEntityInfo) UnmarshalBinary(b []byte) error { - var res DBEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/d_b_entity_info_tempfile_info_row.go b/v1/models/d_b_entity_info_tempfile_info_row.go deleted file mode 100644 index b17e7f59..00000000 --- a/v1/models/d_b_entity_info_tempfile_info_row.go +++ /dev/null @@ -1,66 +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" -) - -// DBEntityInfoTempfileInfoRow d b entity info tempfile info row -// -// swagger:model DBEntityInfo_TempfileInfoRow -type DBEntityInfoTempfileInfoRow struct { - - // Name of the container of the tempfile. This field will be empty in case - // of Non-CDB database. - ContainerName *string `json:"containerName,omitempty"` - - // Create size of the tempfile in bytes. - CreateSizeBytes *int64 `json:"createSizeBytes,omitempty"` - - // Path of the tempfile. - Path *string `json:"path,omitempty"` - - // Status of the tempfile. - Status *int32 `json:"status,omitempty"` - - // Name of the tablespace for the tempfile. - TablespaceName *string `json:"tablespaceName,omitempty"` - - // Tempfile number extracted from the RMAN catalog at the backup time. - TempfileNumber *int32 `json:"tempfileNumber,omitempty"` -} - -// Validate validates this d b entity info tempfile info row -func (m *DBEntityInfoTempfileInfoRow) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this d b entity info tempfile info row based on context it is used -func (m *DBEntityInfoTempfileInfoRow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DBEntityInfoTempfileInfoRow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DBEntityInfoTempfileInfoRow) UnmarshalBinary(b []byte) error { - var res DBEntityInfoTempfileInfoRow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/d_g_entity_info.go b/v1/models/d_g_entity_info.go deleted file mode 100644 index 011bf54c..00000000 --- a/v1/models/d_g_entity_info.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" -) - -// DGEntityInfo d g entity info -// -// swagger:model DGEntityInfo -type DGEntityInfo struct { - - // Role for this setting. - Role *int32 `json:"role,omitempty"` - - // Type of the standby database. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this d g entity info -func (m *DGEntityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this d g entity info based on context it is used -func (m *DGEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DGEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DGEntityInfo) UnmarshalBinary(b []byte) error { - var res DGEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/d_h_c_p_conf.go b/v1/models/d_h_c_p_conf.go deleted file mode 100644 index 6d562c00..00000000 --- a/v1/models/d_h_c_p_conf.go +++ /dev/null @@ -1,128 +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" -) - -// DHCPConf DHCPConf DHCP Server Configuration -// -// swagger:model DHCPConf -type DHCPConf struct { - - // domain of the hosts allocated by this server - DNSDomain *string `json:"dnsDomain,omitempty"` - - // DNS name servers sent by DHCP server - DNSNameservers []string `json:"dnsNameservers"` - - // DNS search domains sent by DHCP server - DNSSearchDomains []string `json:"dnsSearchDomains"` - - // Extra DHCP options to be sent - ExtraOptions map[string]string `json:"extraOptions,omitempty"` - - // IP address of the DHCP server - // Required: true - IPAddress *string `json:"ipAddress"` - - // MAC address of the DHCP server - // Required: true - MacAddress *string `json:"macAddress"` - - // Metadata about this dhcp server - Metadata map[string]string `json:"metadata,omitempty"` - - // MTU sent by DHCP server - // Maximum: 8942 - // Minimum: 1442 - Mtu *int32 `json:"mtu,omitempty"` -} - -// Validate validates this d h c p conf -func (m *DHCPConf) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMacAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMtu(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DHCPConf) validateIPAddress(formats strfmt.Registry) error { - - if err := validate.Required("ipAddress", "body", m.IPAddress); err != nil { - return err - } - - return nil -} - -func (m *DHCPConf) validateMacAddress(formats strfmt.Registry) error { - - if err := validate.Required("macAddress", "body", m.MacAddress); err != nil { - return err - } - - return nil -} - -func (m *DHCPConf) validateMtu(formats strfmt.Registry) error { - if swag.IsZero(m.Mtu) { // not required - return nil - } - - if err := validate.MinimumInt("mtu", "body", int64(*m.Mtu), 1442, false); err != nil { - return err - } - - if err := validate.MaximumInt("mtu", "body", int64(*m.Mtu), 8942, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this d h c p conf based on context it is used -func (m *DHCPConf) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DHCPConf) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DHCPConf) UnmarshalBinary(b []byte) error { - var res DHCPConf - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/d_s_e_solr_info.go b/v1/models/d_s_e_solr_info.go deleted file mode 100644 index 08ba6fb4..00000000 --- a/v1/models/d_s_e_solr_info.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" -) - -// DSESolrInfo Message to hold information about DSE Solr node. -// -// swagger:model DSESolrInfo -type DSESolrInfo struct { - - // Solr node IP Addresses. - SolrNodeVec []string `json:"solrNodeVec"` - - // Solr node Port. - SolrPort *uint32 `json:"solrPort,omitempty"` -} - -// Validate validates this d s e solr info -func (m *DSESolrInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this d s e solr info based on context it is used -func (m *DSESolrInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DSESolrInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DSESolrInfo) UnmarshalBinary(b []byte) error { - var res DSESolrInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dag_application_server_info.go b/v1/models/dag_application_server_info.go deleted file mode 100644 index 7fcf9e5c..00000000 --- a/v1/models/dag_application_server_info.go +++ /dev/null @@ -1,152 +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" -) - -// DagApplicationServerInfo Exchange DAG Application Server Information -// -// Specifies the information about the status of the Exchange Application -// Server which is a member of the DAG. -// -// swagger:model DagApplicationServerInfo -type DagApplicationServerInfo struct { - - // Specifies the fully qualified domain name of the Exchange Server. - Fqdn *string `json:"fqdn,omitempty"` - - // Specifies the Guid of the Exchange Application Server. - GUID *string `json:"guid,omitempty"` - - // Specifies the entity id of the Exchange Application server. - ID *int64 `json:"id,omitempty"` - - // Specifies the display name of the Exchange Application Server. - Name *string `json:"name,omitempty"` - - // Specifies the entity id of the owner entity of the Exchange Application - // Server. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the status of the registration of the Exchange Application - // Server. - // Specifies the status of registration of Exchange Application Server. - // 'kUnknown' indicates the status is not known. - // 'kHealthy' indicates the status is healty and is registered as - // Exchange Server. - // 'kUnHealthy' indicates the exchange application is registered on the - // physical server but it is unreachable now. - // 'kUnregistered' indicates the server is not registered as physical source. - // 'kUnreachable' indicates the server is not reachable from the cohesity - // cluster or the cohesity protection server is not installed on the exchange - // server. - // 'kDetached' indicates the server is removed from the ExchangeDAG. - // Enum: ["kUnknown","kHealthy","kUnHealthy","kUnregistered","kUreachable","kDetached"] - Status *string `json:"status,omitempty"` - - // Specifies the total size of all Exchange database copies in all the - // Exchange Application Servers that are part of the DAG. - TotalSizeBytes *int64 `json:"totalSizeBytes,omitempty"` -} - -// Validate validates this dag application server info -func (m *DagApplicationServerInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dagApplicationServerInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kHealthy","kUnHealthy","kUnregistered","kUreachable","kDetached"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dagApplicationServerInfoTypeStatusPropEnum = append(dagApplicationServerInfoTypeStatusPropEnum, v) - } -} - -const ( - - // DagApplicationServerInfoStatusKUnknown captures enum value "kUnknown" - DagApplicationServerInfoStatusKUnknown string = "kUnknown" - - // DagApplicationServerInfoStatusKHealthy captures enum value "kHealthy" - DagApplicationServerInfoStatusKHealthy string = "kHealthy" - - // DagApplicationServerInfoStatusKUnHealthy captures enum value "kUnHealthy" - DagApplicationServerInfoStatusKUnHealthy string = "kUnHealthy" - - // DagApplicationServerInfoStatusKUnregistered captures enum value "kUnregistered" - DagApplicationServerInfoStatusKUnregistered string = "kUnregistered" - - // DagApplicationServerInfoStatusKUreachable captures enum value "kUreachable" - DagApplicationServerInfoStatusKUreachable string = "kUreachable" - - // DagApplicationServerInfoStatusKDetached captures enum value "kDetached" - DagApplicationServerInfoStatusKDetached string = "kDetached" -) - -// prop value enum -func (m *DagApplicationServerInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dagApplicationServerInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DagApplicationServerInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this dag application server info based on context it is used -func (m *DagApplicationServerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DagApplicationServerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DagApplicationServerInfo) UnmarshalBinary(b []byte) error { - var res DagApplicationServerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dag_info.go b/v1/models/dag_info.go deleted file mode 100644 index 8ad59b97..00000000 --- a/v1/models/dag_info.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DagInfo Exchange DAG Information -// -// Specifies the information about the DAG(Database availability group). -// -// swagger:model DagInfo -type DagInfo struct { - - // Specifies the status of all the Exchange Application Servers that are part - // of this DAG. - DagApplicationServerInfoList []*DagApplicationServerInfo `json:"dagApplicationServerInfoList"` - - // Specifies information about the preference order while choosing - // between which database copy of the database which is part of DAG should - // be protected. - ExchangeDagProtectionPreference *ExchangeDAGProtectionPreference `json:"exchangeDagProtectionPreference,omitempty"` - - // Specifies Unique GUID for the DAG. - GUID *string `json:"guid,omitempty"` - - // Specifies display name of the DAG. - Name *string `json:"name,omitempty"` -} - -// Validate validates this dag info -func (m *DagInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDagApplicationServerInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeDagProtectionPreference(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DagInfo) validateDagApplicationServerInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DagApplicationServerInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DagApplicationServerInfoList); i++ { - if swag.IsZero(m.DagApplicationServerInfoList[i]) { // not required - continue - } - - if m.DagApplicationServerInfoList[i] != nil { - if err := m.DagApplicationServerInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagApplicationServerInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagApplicationServerInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DagInfo) validateExchangeDagProtectionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if m.ExchangeDagProtectionPreference != nil { - if err := m.ExchangeDagProtectionPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -// ContextValidate validate this dag info based on the context it is used -func (m *DagInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDagApplicationServerInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeDagProtectionPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DagInfo) contextValidateDagApplicationServerInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DagApplicationServerInfoList); i++ { - - if m.DagApplicationServerInfoList[i] != nil { - - if swag.IsZero(m.DagApplicationServerInfoList[i]) { // not required - return nil - } - - if err := m.DagApplicationServerInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagApplicationServerInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagApplicationServerInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DagInfo) contextValidateExchangeDagProtectionPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeDagProtectionPreference != nil { - - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if err := m.ExchangeDagProtectionPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DagInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DagInfo) UnmarshalBinary(b []byte) error { - var res DagInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/daily_schedule.go b/v1/models/daily_schedule.go deleted file mode 100644 index 638abf0f..00000000 --- a/v1/models/daily_schedule.go +++ /dev/null @@ -1,112 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DailySchedule Daily & Weekly Schedule. -// -// Specifies a daily or weekly backup schedule. -// -// swagger:model DailySchedule -type DailySchedule struct { - - // Array of Days. - // - // Specifies a list of days of the week when to start Job Runs. - // If no days are specified, the Jobs Runs will run every day of the week. - // Specifies a day in a week such as 'kSunday', 'kMonday', etc. - Days []string `json:"days"` - - // Specifies a factor to multiply the unit by, to - // determine the copy schedule. For example if set to 2 and the - // unit is hourly, then Snapshots from the first eligible Job - // Run for every 2 hour period is copied. Only applies to Minutes, Hours and - // Days - Frequency *int64 `json:"frequency,omitempty"` -} - -// Validate validates this daily schedule -func (m *DailySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dailyScheduleDaysItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dailyScheduleDaysItemsEnum = append(dailyScheduleDaysItemsEnum, v) - } -} - -func (m *DailySchedule) validateDaysItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dailyScheduleDaysItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *DailySchedule) validateDays(formats strfmt.Registry) error { - if swag.IsZero(m.Days) { // not required - return nil - } - - for i := 0; i < len(m.Days); i++ { - - // value enum - if err := m.validateDaysItemsEnum("days"+"."+strconv.Itoa(i), "body", m.Days[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this daily schedule based on context it is used -func (m *DailySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DailySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DailySchedule) UnmarshalBinary(b []byte) error { - var res DailySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dashboard.go b/v1/models/dashboard.go deleted file mode 100644 index b38a57c0..00000000 --- a/v1/models/dashboard.go +++ /dev/null @@ -1,522 +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" -) - -// Dashboard Dashboard. -// -// Data shown on Dashboard. -// -// swagger:model Dashboard -type Dashboard struct { - - // Audit Logs. - AuditLogs *AuditLogsTile `json:"auditLogs,omitempty"` - - // Id of the cluster for which dashboard is given. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Cluster Health and alerts. - Health *HealthTile `json:"health,omitempty"` - - // IOPs. - Iops *IopsTile `json:"iops,omitempty"` - - // Protection Job Runs. - JobRuns *JobRunsTile `json:"jobRuns,omitempty"` - - // ProtectedObjects related stats. - ProtectedObjects *ProtectedObjectsTile `json:"protectedObjects,omitempty"` - - // Protection related stats. - Protection *ProtectionTile `json:"protection,omitempty"` - - // Recoveries related stats. - Recoveries *RecoveriesTile `json:"recoveries,omitempty"` - - // Storage efficiency stats. - StorageEfficiency *StorageEfficiencyTile `json:"storageEfficiency,omitempty"` - - // Throughput. - Throughput *ThroughputTile `json:"throughput,omitempty"` -} - -// Validate validates this dashboard -func (m *Dashboard) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuditLogs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHealth(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIops(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtection(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveries(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageEfficiency(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThroughput(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Dashboard) validateAuditLogs(formats strfmt.Registry) error { - if swag.IsZero(m.AuditLogs) { // not required - return nil - } - - if m.AuditLogs != nil { - if err := m.AuditLogs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateHealth(formats strfmt.Registry) error { - if swag.IsZero(m.Health) { // not required - return nil - } - - if m.Health != nil { - if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateIops(formats strfmt.Registry) error { - if swag.IsZero(m.Iops) { // not required - return nil - } - - if m.Iops != nil { - if err := m.Iops.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iops") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iops") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateJobRuns(formats strfmt.Registry) error { - if swag.IsZero(m.JobRuns) { // not required - return nil - } - - if m.JobRuns != nil { - if err := m.JobRuns.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateProtectedObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedObjects) { // not required - return nil - } - - if m.ProtectedObjects != nil { - if err := m.ProtectedObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjects") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateProtection(formats strfmt.Registry) error { - if swag.IsZero(m.Protection) { // not required - return nil - } - - if m.Protection != nil { - if err := m.Protection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protection") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateRecoveries(formats strfmt.Registry) error { - if swag.IsZero(m.Recoveries) { // not required - return nil - } - - if m.Recoveries != nil { - if err := m.Recoveries.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveries") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveries") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateStorageEfficiency(formats strfmt.Registry) error { - if swag.IsZero(m.StorageEfficiency) { // not required - return nil - } - - if m.StorageEfficiency != nil { - if err := m.StorageEfficiency.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageEfficiency") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageEfficiency") - } - return err - } - } - - return nil -} - -func (m *Dashboard) validateThroughput(formats strfmt.Registry) error { - if swag.IsZero(m.Throughput) { // not required - return nil - } - - if m.Throughput != nil { - if err := m.Throughput.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throughput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throughput") - } - return err - } - } - - return nil -} - -// ContextValidate validate this dashboard based on the context it is used -func (m *Dashboard) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuditLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHealth(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIops(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtection(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveries(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageEfficiency(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThroughput(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Dashboard) contextValidateAuditLogs(ctx context.Context, formats strfmt.Registry) error { - - if m.AuditLogs != nil { - - if swag.IsZero(m.AuditLogs) { // not required - return nil - } - - if err := m.AuditLogs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { - - if m.Health != nil { - - if swag.IsZero(m.Health) { // not required - return nil - } - - if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateIops(ctx context.Context, formats strfmt.Registry) error { - - if m.Iops != nil { - - if swag.IsZero(m.Iops) { // not required - return nil - } - - if err := m.Iops.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iops") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iops") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateJobRuns(ctx context.Context, formats strfmt.Registry) error { - - if m.JobRuns != nil { - - if swag.IsZero(m.JobRuns) { // not required - return nil - } - - if err := m.JobRuns.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateProtectedObjects(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectedObjects != nil { - - if swag.IsZero(m.ProtectedObjects) { // not required - return nil - } - - if err := m.ProtectedObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjects") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateProtection(ctx context.Context, formats strfmt.Registry) error { - - if m.Protection != nil { - - if swag.IsZero(m.Protection) { // not required - return nil - } - - if err := m.Protection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protection") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateRecoveries(ctx context.Context, formats strfmt.Registry) error { - - if m.Recoveries != nil { - - if swag.IsZero(m.Recoveries) { // not required - return nil - } - - if err := m.Recoveries.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveries") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveries") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateStorageEfficiency(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageEfficiency != nil { - - if swag.IsZero(m.StorageEfficiency) { // not required - return nil - } - - if err := m.StorageEfficiency.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageEfficiency") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageEfficiency") - } - return err - } - } - - return nil -} - -func (m *Dashboard) contextValidateThroughput(ctx context.Context, formats strfmt.Registry) error { - - if m.Throughput != nil { - - if swag.IsZero(m.Throughput) { // not required - return nil - } - - if err := m.Throughput.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throughput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throughput") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Dashboard) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Dashboard) UnmarshalBinary(b []byte) error { - var res Dashboard - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dashboard_response.go b/v1/models/dashboard_response.go deleted file mode 100644 index 12fe9609..00000000 --- a/v1/models/dashboard_response.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DashboardResponse dashboard response -// -// swagger:model DashboardResponse -type DashboardResponse struct { - - // Specifies the dashboard of the local cluster or a remote cluster whose - // id is set in clusterId query parameter when the query parameter - // allClusters is not given or set to false. Otherwise this field is - // populated with aggregated dashboard values for all the dashboards in the - // dashboards field. - Dashboard *Dashboard `json:"dashboard,omitempty"` - - // Specifies a list of dashboards of all the clusters in the SPOG setup if - // the query parameter allClusters is set to true. Otherwise this field is - // not populated. When populated the dashboard field is also populated with - // aggregated dashboard values. - Dashboards []*Dashboard `json:"dashboards"` -} - -// Validate validates this dashboard response -func (m *DashboardResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDashboard(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDashboards(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DashboardResponse) validateDashboard(formats strfmt.Registry) error { - if swag.IsZero(m.Dashboard) { // not required - return nil - } - - if m.Dashboard != nil { - if err := m.Dashboard.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dashboard") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dashboard") - } - return err - } - } - - return nil -} - -func (m *DashboardResponse) validateDashboards(formats strfmt.Registry) error { - if swag.IsZero(m.Dashboards) { // not required - return nil - } - - for i := 0; i < len(m.Dashboards); i++ { - if swag.IsZero(m.Dashboards[i]) { // not required - continue - } - - if m.Dashboards[i] != nil { - if err := m.Dashboards[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dashboards" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dashboards" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this dashboard response based on the context it is used -func (m *DashboardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDashboard(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDashboards(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DashboardResponse) contextValidateDashboard(ctx context.Context, formats strfmt.Registry) error { - - if m.Dashboard != nil { - - if swag.IsZero(m.Dashboard) { // not required - return nil - } - - if err := m.Dashboard.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dashboard") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dashboard") - } - return err - } - } - - return nil -} - -func (m *DashboardResponse) contextValidateDashboards(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Dashboards); i++ { - - if m.Dashboards[i] != nil { - - if swag.IsZero(m.Dashboards[i]) { // not required - return nil - } - - if err := m.Dashboards[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dashboards" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dashboards" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DashboardResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DashboardResponse) UnmarshalBinary(b []byte) error { - var res DashboardResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_event.go b/v1/models/data_event.go deleted file mode 100644 index 87f9de9f..00000000 --- a/v1/models/data_event.go +++ /dev/null @@ -1,70 +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" -) - -// DataEvent Data event to be published/shared to magneto for further processing. -// -// DataEvent extensions Location No. -// ============================================================================= -// vmware.VMwareDataEvent vmware_event.proto 100 -// magneto.MongoDBDataEvent mongodb_event.proto 101 -// ============================================================================= -// -// swagger:model DataEvent -type DataEvent struct { - - // Amount of data written to SnapFS in this event. - DataSize *int64 `json:"dataSize,omitempty"` - - // ID of the epoch where this DataEvent belongs. This is only set for the - // entities with sharded log journal. - EpochID *int64 `json:"epochId,omitempty"` - - // File in which this data is written. This file path is the absolute path - // starting from the view_name in the AtomEntityProto. This is not set for - // entities using CDP sharding. - FilePath *string `json:"filePath,omitempty"` - - // This field denotes the location of the associated shard locator file. - // This is supposed to be set for the entities using sharding to store the - // data. - ShardLocatorFilePath *string `json:"shardLocatorFilePath,omitempty"` -} - -// Validate validates this data event -func (m *DataEvent) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data event based on context it is used -func (m *DataEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataEvent) UnmarshalBinary(b []byte) error { - var res DataEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_insights_info.go b/v1/models/data_insights_info.go deleted file mode 100644 index b4ac92bd..00000000 --- a/v1/models/data_insights_info.go +++ /dev/null @@ -1,60 +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" -) - -// DataInsightsInfo DataInsightsInfo holds information about the Data Insights -// subscription such as if it is active or not. -// -// swagger:model DataInsightsInfo -type DataInsightsInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the Data Insights subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this data insights info -func (m *DataInsightsInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data insights info based on context it is used -func (m *DataInsightsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataInsightsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataInsightsInfo) UnmarshalBinary(b []byte) error { - var res DataInsightsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_lock_config.go b/v1/models/data_lock_config.go deleted file mode 100644 index 83ec9292..00000000 --- a/v1/models/data_lock_config.go +++ /dev/null @@ -1,121 +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" -) - -// DataLockConfig Specifies WORM retention type for the 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. -// -// swagger:model DataLockConfig -type DataLockConfig struct { - - // Specifies last N days to keep Snapshots under datalock in a protection - // group. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention - // type is specified, the snapshots of the Protection Jobs using this policy - // will be kept until the maximum of the snapshot retention time. During - // that time, the snapshots cannot be deleted. - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this data lock config -func (m *DataLockConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataLockConfigTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataLockConfigTypeWormRetentionTypePropEnum = append(dataLockConfigTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // DataLockConfigWormRetentionTypeKNone captures enum value "kNone" - DataLockConfigWormRetentionTypeKNone string = "kNone" - - // DataLockConfigWormRetentionTypeKCompliance captures enum value "kCompliance" - DataLockConfigWormRetentionTypeKCompliance string = "kCompliance" - - // DataLockConfigWormRetentionTypeKAdministrative captures enum value "kAdministrative" - DataLockConfigWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *DataLockConfig) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataLockConfigTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataLockConfig) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data lock config based on context it is used -func (m *DataLockConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataLockConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataLockConfig) UnmarshalBinary(b []byte) error { - var res DataLockConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_lock_constraints.go b/v1/models/data_lock_constraints.go deleted file mode 100644 index 6da6fd6b..00000000 --- a/v1/models/data_lock_constraints.go +++ /dev/null @@ -1,120 +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" -) - -// DataLockConstraints DataLock Constraints -// -// # Specifies the datalock retention type and expiry time when datalock expires -// -// swagger:model DataLockConstraints -type DataLockConstraints struct { - - // Specifies expiry time to keep Snapshots under datalock in a protection - // group. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention - // type is specified, the snapshots of the Protection Jobs using this policy - // will be kept until the maximum of the snapshot retention time. During - // that time, the snapshots cannot be deleted. - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this data lock constraints -func (m *DataLockConstraints) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataLockConstraintsTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataLockConstraintsTypeWormRetentionTypePropEnum = append(dataLockConstraintsTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // DataLockConstraintsWormRetentionTypeKNone captures enum value "kNone" - DataLockConstraintsWormRetentionTypeKNone string = "kNone" - - // DataLockConstraintsWormRetentionTypeKCompliance captures enum value "kCompliance" - DataLockConstraintsWormRetentionTypeKCompliance string = "kCompliance" - - // DataLockConstraintsWormRetentionTypeKAdministrative captures enum value "kAdministrative" - DataLockConstraintsWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *DataLockConstraints) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataLockConstraintsTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataLockConstraints) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data lock constraints based on context it is used -func (m *DataLockConstraints) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataLockConstraints) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataLockConstraints) UnmarshalBinary(b []byte) error { - var res DataLockConstraints - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_lock_constraints_proto.go b/v1/models/data_lock_constraints_proto.go deleted file mode 100644 index 4fa7617d..00000000 --- a/v1/models/data_lock_constraints_proto.go +++ /dev/null @@ -1,59 +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" -) - -// DataLockConstraintsProto Message that specifies the datalock attributes. This proto will be populated -// from worm_retention field in RetentionPolicyProto. -// -// swagger:model DataLockConstraintsProto -type DataLockConstraintsProto struct { - - // Expiry time for datalock in usecs. It represents the absolute time when - // this data lock expires. - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - // Whether objects in the external target associated with this policy need to - // be made immutable. - EnableWormOnExternalTarget *bool `json:"enableWormOnExternalTarget,omitempty"` - - // Datalock policy. - PolicyType *int32 `json:"policyType,omitempty"` -} - -// Validate validates this data lock constraints proto -func (m *DataLockConstraintsProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data lock constraints proto based on context it is used -func (m *DataLockConstraintsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataLockConstraintsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataLockConstraintsProto) UnmarshalBinary(b []byte) error { - var res DataLockConstraintsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_migration_job_parameters.go b/v1/models/data_migration_job_parameters.go deleted file mode 100644 index 21e6efb6..00000000 --- a/v1/models/data_migration_job_parameters.go +++ /dev/null @@ -1,254 +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" -) - -// DataMigrationJobParameters Data Migration Job Parameters. -// -// Specifies parameters applicable for data migration jobs in NAS environment. -// -// swagger:model DataMigrationJobParameters -type DataMigrationJobParameters struct { - - // Identifies the cold files in the NAS source. Files that haven't been - // accessed/modified in the last cold_file_window are migrated. - ColdFileWindow *int64 `json:"coldFileWindow,omitempty"` - - // Delete migrated data if no symlink at source is pointing to it. - DeleteOrphanData *bool `json:"deleteOrphanData,omitempty"` - - // The filtering policy to decide which objects within a source should be - // migrated. If this is not specified, then all the objects within the - // source will be migrated based on the migration policy. - FilePathFilter *FilePathFilter `json:"filePathFilter,omitempty"` - - // Specifies policy to select a file to migrate based on its creation, last - // access or modification time. - // eg. A file can be selected to migrate if it has not been accessed/modified - // in the ColdFileWindow. - // enum: kOlderThan, kLastAccessed, kLastModified. - // Specifies policy for file selection in data migration jobs based on time. - // 'kOlderThan': Migrate the files that are older than cold file window. - // 'kLastAccessed': Migrate the files that are not accessed in cold file window. - // 'kLastModified': Migrate the files that have not been modified in cold file window. - // Enum: ["kOlderThan","kLastAccessed","kLastModified"] - FileSelectionPolicy *string `json:"fileSelectionPolicy,omitempty"` - - // Gives the size criteria to be used for selecting the files to be migrated - // in bytes. The cold files that are equal and greater than this size are - // migrated. - FileSizeBytes *int64 `json:"fileSizeBytes,omitempty"` - - // Specifies policy to select a file to migrate based on its size. - // eg. A file can be selected to migrate if its size is greater than or - // smaller than the FileSizeBytes. - // enum: kGreaterThan, kSmallerThan. - // Specifies policy for file selection in data migration jobs based on file size. - // 'kGreaterThan': Migrate the files whose size are greater than specified file size. - // 'kSmallerThan': Migrate the files whose size are smaller than specified file size. - // Enum: ["kGreaterThan","kSmallerThan"] - FileSizePolicy *string `json:"fileSizePolicy,omitempty"` - - // Specifies if data is to be migrated without stub. - MigrateWithoutStub *bool `json:"migrateWithoutStub,omitempty"` - - // Mount path where the target view must be mounted on all NFS clients for - // accessing the migrated data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // The target view name to which the data will be migrated. - TargetViewName *string `json:"targetViewName,omitempty"` -} - -// Validate validates this data migration job parameters -func (m *DataMigrationJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePathFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSelectionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSizePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataMigrationJobParameters) validateFilePathFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if m.FilePathFilter != nil { - if err := m.FilePathFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -var dataMigrationJobParametersTypeFileSelectionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOlderThan","kLastAccessed","kLastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataMigrationJobParametersTypeFileSelectionPolicyPropEnum = append(dataMigrationJobParametersTypeFileSelectionPolicyPropEnum, v) - } -} - -const ( - - // DataMigrationJobParametersFileSelectionPolicyKOlderThan captures enum value "kOlderThan" - DataMigrationJobParametersFileSelectionPolicyKOlderThan string = "kOlderThan" - - // DataMigrationJobParametersFileSelectionPolicyKLastAccessed captures enum value "kLastAccessed" - DataMigrationJobParametersFileSelectionPolicyKLastAccessed string = "kLastAccessed" - - // DataMigrationJobParametersFileSelectionPolicyKLastModified captures enum value "kLastModified" - DataMigrationJobParametersFileSelectionPolicyKLastModified string = "kLastModified" -) - -// prop value enum -func (m *DataMigrationJobParameters) validateFileSelectionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataMigrationJobParametersTypeFileSelectionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataMigrationJobParameters) validateFileSelectionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FileSelectionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateFileSelectionPolicyEnum("fileSelectionPolicy", "body", *m.FileSelectionPolicy); err != nil { - return err - } - - return nil -} - -var dataMigrationJobParametersTypeFileSizePolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGreaterThan","kSmallerThan"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataMigrationJobParametersTypeFileSizePolicyPropEnum = append(dataMigrationJobParametersTypeFileSizePolicyPropEnum, v) - } -} - -const ( - - // DataMigrationJobParametersFileSizePolicyKGreaterThan captures enum value "kGreaterThan" - DataMigrationJobParametersFileSizePolicyKGreaterThan string = "kGreaterThan" - - // DataMigrationJobParametersFileSizePolicyKSmallerThan captures enum value "kSmallerThan" - DataMigrationJobParametersFileSizePolicyKSmallerThan string = "kSmallerThan" -) - -// prop value enum -func (m *DataMigrationJobParameters) validateFileSizePolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataMigrationJobParametersTypeFileSizePolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataMigrationJobParameters) validateFileSizePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FileSizePolicy) { // not required - return nil - } - - // value enum - if err := m.validateFileSizePolicyEnum("fileSizePolicy", "body", *m.FileSizePolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this data migration job parameters based on the context it is used -func (m *DataMigrationJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilePathFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataMigrationJobParameters) contextValidateFilePathFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePathFilter != nil { - - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if err := m.FilePathFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataMigrationJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataMigrationJobParameters) UnmarshalBinary(b []byte) error { - var res DataMigrationJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_migration_policy.go b/v1/models/data_migration_policy.go deleted file mode 100644 index 25f703fd..00000000 --- a/v1/models/data_migration_policy.go +++ /dev/null @@ -1,176 +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" -) - -// DataMigrationPolicy Data Migration Policy. -// -// Specifies settings for data migration in NAS environment. This also -// specifies the retention policy that should be applied to files after they -// have been moved to cohesity cluster. -// -// swagger:model DataMigrationPolicy -type DataMigrationPolicy struct { - - // Specifies how many days to retain Snapshots on the Cohesity Cluster. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies schedule for the data migration job. - SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"` - - // Specifies WORM retention type for the files. When a WORM retention - // type is specified, the files will be kept until the maximum of the - // retention time. During that time, the files cannot be deleted. - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this data migration policy -func (m *DataMigrationPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataMigrationPolicy) validateSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SchedulingPolicy) { // not required - return nil - } - - if m.SchedulingPolicy != nil { - if err := m.SchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulingPolicy") - } - return err - } - } - - return nil -} - -var dataMigrationPolicyTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataMigrationPolicyTypeWormRetentionTypePropEnum = append(dataMigrationPolicyTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // DataMigrationPolicyWormRetentionTypeKNone captures enum value "kNone" - DataMigrationPolicyWormRetentionTypeKNone string = "kNone" - - // DataMigrationPolicyWormRetentionTypeKCompliance captures enum value "kCompliance" - DataMigrationPolicyWormRetentionTypeKCompliance string = "kCompliance" - - // DataMigrationPolicyWormRetentionTypeKAdministrative captures enum value "kAdministrative" - DataMigrationPolicyWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *DataMigrationPolicy) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataMigrationPolicyTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataMigrationPolicy) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this data migration policy based on the context it is used -func (m *DataMigrationPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataMigrationPolicy) contextValidateSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SchedulingPolicy != nil { - - if swag.IsZero(m.SchedulingPolicy) { // not required - return nil - } - - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataMigrationPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataMigrationPolicy) UnmarshalBinary(b []byte) error { - var res DataMigrationPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_protect_azure_info.go b/v1/models/data_protect_azure_info.go deleted file mode 100644 index 5021dc8a..00000000 --- a/v1/models/data_protect_azure_info.go +++ /dev/null @@ -1,125 +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" -) - -// DataProtectAzureInfo DataProtectAzureInfo holds information about the Data Protect -// subscription in Azure data plane such as if it is active or not. -// -// swagger:model DataProtectAzureInfo -type DataProtectAzureInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the dmaas subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the quantity of the subscription. - Quantity *int64 `json:"quantity,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` - - // Specifies the Tiering information for the Data Protect subscription - Tiering *TieringInfo `json:"tiering,omitempty"` -} - -// Validate validates this data protect azure info -func (m *DataProtectAzureInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiering(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataProtectAzureInfo) validateTiering(formats strfmt.Registry) error { - if swag.IsZero(m.Tiering) { // not required - return nil - } - - if m.Tiering != nil { - if err := m.Tiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiering") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data protect azure info based on the context it is used -func (m *DataProtectAzureInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataProtectAzureInfo) contextValidateTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.Tiering != nil { - - if swag.IsZero(m.Tiering) { // not required - return nil - } - - if err := m.Tiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiering") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataProtectAzureInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataProtectAzureInfo) UnmarshalBinary(b []byte) error { - var res DataProtectAzureInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_protect_info.go b/v1/models/data_protect_info.go deleted file mode 100644 index e7e7439c..00000000 --- a/v1/models/data_protect_info.go +++ /dev/null @@ -1,131 +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" -) - -// DataProtectInfo DMaaSSubscriptionInfo holds information about the Data Protect -// subscription such as if it is active or not. -// -// swagger:model DataProtectInfo -type DataProtectInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the dmaas subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is AWS Subscription. - IsAwsSubscription *bool `json:"isAwsSubscription,omitempty"` - - // Specifies whether the subscription is a Cohesity Paid subscription. - IsCohesitySubscription *bool `json:"isCohesitySubscription,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the quantity of the subscription. - Quantity *int64 `json:"quantity,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` - - // Specifies the Tiering information for the Data Protect subscription - Tiering *TieringInfo `json:"tiering,omitempty"` -} - -// Validate validates this data protect info -func (m *DataProtectInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiering(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataProtectInfo) validateTiering(formats strfmt.Registry) error { - if swag.IsZero(m.Tiering) { // not required - return nil - } - - if m.Tiering != nil { - if err := m.Tiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiering") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data protect info based on the context it is used -func (m *DataProtectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataProtectInfo) contextValidateTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.Tiering != nil { - - if swag.IsZero(m.Tiering) { // not required - return nil - } - - if err := m.Tiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiering") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataProtectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataProtectInfo) UnmarshalBinary(b []byte) error { - var res DataProtectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_from_vault_per_task.go b/v1/models/data_transfer_from_vault_per_task.go deleted file mode 100644 index 568eeb33..00000000 --- a/v1/models/data_transfer_from_vault_per_task.go +++ /dev/null @@ -1,66 +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" -) - -// DataTransferFromVaultPerTask Data Transfer From Vault Per Task. -// -// Specifies statistics about the transfer of data from a Vault -// (External Target) to this Cohesity Cluster for a recover or -// clone task. -// -// swagger:model DataTransferFromVaultPerTask -type DataTransferFromVaultPerTask struct { - - // Specifies the total number of logical bytes that are transferred from - // this Vault to the Cohesity Cluster for this task. - // The logical size is when the data is fully hydrated or expanded. - NumLogicalBytesTransferred *int64 `json:"numLogicalBytesTransferred,omitempty"` - - // Specifies the total number of physical bytes that are transferred - // from this Vault to the Cohesity Cluster for this task. - NumPhysicalBytesTransferred *int64 `json:"numPhysicalBytesTransferred,omitempty"` - - // Specifies the task name. - TaskName *string `json:"taskName,omitempty"` - - // Specifies the task type. - TaskType *string `json:"taskType,omitempty"` -} - -// Validate validates this data transfer from vault per task -func (m *DataTransferFromVaultPerTask) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data transfer from vault per task based on context it is used -func (m *DataTransferFromVaultPerTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferFromVaultPerTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferFromVaultPerTask) UnmarshalBinary(b []byte) error { - var res DataTransferFromVaultPerTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_from_vault_summary.go b/v1/models/data_transfer_from_vault_summary.go deleted file mode 100644 index 5a76961c..00000000 --- a/v1/models/data_transfer_from_vault_summary.go +++ /dev/null @@ -1,152 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTransferFromVaultSummary Data Transfer From Vault Summary. -// -// Specifies summary statistics about the transfer of data from a Vault -// to this Cohesity Cluster. -// -// swagger:model DataTransferFromVaultSummary -type DataTransferFromVaultSummary struct { - - // Array of Data Transferred Per Task. - // - // Specifies the transfer of data from this Vault to this Cohesity Cluster - // for each clone or recover task. - DataTransferPerTask []*DataTransferFromVaultPerTask `json:"dataTransferPerTask"` - - // Specifies the total number of logical bytes that have been transferred - // from this Vault (External Target) to this Cohesity Cluster. - // The logical size is when the data is fully hydrated or expanded. - NumLogicalBytesTransferred *int64 `json:"numLogicalBytesTransferred,omitempty"` - - // Specifies the total number of physical bytes that have been transferred - // from this Vault (External Target) to the Cohesity Cluster. - NumPhysicalBytesTransferred *int64 `json:"numPhysicalBytesTransferred,omitempty"` - - // Specifies the number of recover or clone tasks that have transferred data - // from this Vault (External Target) to this Cohesity Cluster. - NumTasks *int64 `json:"numTasks,omitempty"` - - // Array of Physical Data Transferred Per Day. - // - // Specifies the physical data transferred from this Vault - // to the Cohesity Cluster during the time period specified using the - // startTimeMsecs and endTimeMsecs parameters. - // For each day in the time period, an array element is returned, - // for example if 7 days are specified, 7 array elements are returned. - PhysicalDataTransferredBytesDuringTimeRange []int64 `json:"physicalDataTransferredBytesDuringTimeRange"` - - // Specifies the name of the Vault (External Target). - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this data transfer from vault summary -func (m *DataTransferFromVaultSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferPerTask(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferFromVaultSummary) validateDataTransferPerTask(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferPerTask) { // not required - return nil - } - - for i := 0; i < len(m.DataTransferPerTask); i++ { - if swag.IsZero(m.DataTransferPerTask[i]) { // not required - continue - } - - if m.DataTransferPerTask[i] != nil { - if err := m.DataTransferPerTask[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferPerTask" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferPerTask" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data transfer from vault summary based on the context it is used -func (m *DataTransferFromVaultSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferPerTask(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferFromVaultSummary) contextValidateDataTransferPerTask(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataTransferPerTask); i++ { - - if m.DataTransferPerTask[i] != nil { - - if swag.IsZero(m.DataTransferPerTask[i]) { // not required - return nil - } - - if err := m.DataTransferPerTask[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferPerTask" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferPerTask" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferFromVaultSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferFromVaultSummary) UnmarshalBinary(b []byte) error { - var res DataTransferFromVaultSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_from_vaults_summary_response.go b/v1/models/data_transfer_from_vaults_summary_response.go deleted file mode 100644 index e9d2acf3..00000000 --- a/v1/models/data_transfer_from_vaults_summary_response.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTransferFromVaultsSummaryResponse Data Transfer from Vaults Summary Response. -// -// Provides summary statistics about the transfer of data from Vaults -// (External Targets) to this Cohesity Cluster. -// -// swagger:model DataTransferFromVaultsSummaryResponse -type DataTransferFromVaultsSummaryResponse struct { - - // Array of Summary Data Transfer Statistics. - // - // Specifies summary statistics about the transfer of data from - // Vaults to the Cohesity Cluster. - DataTransferSummary []*DataTransferFromVaultSummary `json:"dataTransferSummary"` -} - -// Validate validates this data transfer from vaults summary response -func (m *DataTransferFromVaultsSummaryResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferFromVaultsSummaryResponse) validateDataTransferSummary(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferSummary) { // not required - return nil - } - - for i := 0; i < len(m.DataTransferSummary); i++ { - if swag.IsZero(m.DataTransferSummary[i]) { // not required - continue - } - - if m.DataTransferSummary[i] != nil { - if err := m.DataTransferSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data transfer from vaults summary response based on the context it is used -func (m *DataTransferFromVaultsSummaryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferFromVaultsSummaryResponse) contextValidateDataTransferSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataTransferSummary); i++ { - - if m.DataTransferSummary[i] != nil { - - if swag.IsZero(m.DataTransferSummary[i]) { // not required - return nil - } - - if err := m.DataTransferSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferFromVaultsSummaryResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferFromVaultsSummaryResponse) UnmarshalBinary(b []byte) error { - var res DataTransferFromVaultsSummaryResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_info.go b/v1/models/data_transfer_info.go deleted file mode 100644 index 8a3ce94f..00000000 --- a/v1/models/data_transfer_info.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTransferInfo This proto contains information of the network which will be used at the -// source side for data transfer from the source to the Cohesity cluster. -// Currently, this is populated only in case of Native Backup/Restore of -// Azure Managed VMs. -// -// swagger:model DataTransferInfo -type DataTransferInfo struct { - - // Whether to use private network or public network. - IsPrivateNetwork *bool `json:"isPrivateNetwork,omitempty"` - - // Information required to create endpoints in private networks for all the - // regions whose VMs are getting protected. - PrivateNetworkInfoVec []*DataTransferInfoPrivateNetworkInfo `json:"privateNetworkInfoVec"` - - // Whether to use private network info which was used in backup of VMs. - // This should be populated only for restore job. - // is_private_network should be true if this is set and its corresponding - // backup job should also have is_private_network to be true. - UseProtectionJobInfo *bool `json:"useProtectionJobInfo,omitempty"` -} - -// Validate validates this data transfer info -func (m *DataTransferInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateNetworkInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfo) validatePrivateNetworkInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.PrivateNetworkInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.PrivateNetworkInfoVec); i++ { - if swag.IsZero(m.PrivateNetworkInfoVec[i]) { // not required - continue - } - - if m.PrivateNetworkInfoVec[i] != nil { - if err := m.PrivateNetworkInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateNetworkInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateNetworkInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data transfer info based on the context it is used -func (m *DataTransferInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrivateNetworkInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfo) contextValidatePrivateNetworkInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PrivateNetworkInfoVec); i++ { - - if m.PrivateNetworkInfoVec[i] != nil { - - if swag.IsZero(m.PrivateNetworkInfoVec[i]) { // not required - return nil - } - - if err := m.PrivateNetworkInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateNetworkInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateNetworkInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferInfo) UnmarshalBinary(b []byte) error { - var res DataTransferInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_info_private_network_info.go b/v1/models/data_transfer_info_private_network_info.go deleted file mode 100644 index eb022fc9..00000000 --- a/v1/models/data_transfer_info_private_network_info.go +++ /dev/null @@ -1,216 +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" -) - -// DataTransferInfoPrivateNetworkInfo Information required to create a endpoint in private network. -// -// swagger:model DataTransferInfo_PrivateNetworkInfo -type DataTransferInfoPrivateNetworkInfo struct { - - // Region/location of the virtual network. - Location *string `json:"location,omitempty"` - - // Deprecated fields below. - // - // Proto of the region of the virtual network. - Region *EntityProto `json:"region,omitempty"` - - // Subnet in which we will create a private endpoint. - Subnet *EntityProto `json:"subnet,omitempty"` - - // Vitual network in which we will create a private endpoint. - Vpn *EntityProto `json:"vpn,omitempty"` -} - -// Validate validates this data transfer info private network info -func (m *DataTransferInfoPrivateNetworkInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfoPrivateNetworkInfo) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DataTransferInfoPrivateNetworkInfo) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *DataTransferInfoPrivateNetworkInfo) validateVpn(formats strfmt.Registry) error { - if swag.IsZero(m.Vpn) { // not required - return nil - } - - if m.Vpn != nil { - if err := m.Vpn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpn") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data transfer info private network info based on the context it is used -func (m *DataTransferInfoPrivateNetworkInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpn(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfoPrivateNetworkInfo) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DataTransferInfoPrivateNetworkInfo) 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 *DataTransferInfoPrivateNetworkInfo) contextValidateVpn(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpn != nil { - - if swag.IsZero(m.Vpn) { // not required - return nil - } - - if err := m.Vpn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpn") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferInfoPrivateNetworkInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferInfoPrivateNetworkInfo) UnmarshalBinary(b []byte) error { - var res DataTransferInfoPrivateNetworkInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_to_vault_per_protection_job.go b/v1/models/data_transfer_to_vault_per_protection_job.go deleted file mode 100644 index 20ceb84e..00000000 --- a/v1/models/data_transfer_to_vault_per_protection_job.go +++ /dev/null @@ -1,66 +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" -) - -// DataTransferToVaultPerProtectionJob Data Transfer to Vault Per Protection Job. -// -// Specifies statistics about the transfer of data from this Cohesity -// Cluster to this Vault for a Protection Job. -// -// swagger:model DataTransferToVaultPerProtectionJob -type DataTransferToVaultPerProtectionJob struct { - - // Specifies the total number of logical bytes that are transferred - // from this Cohesity Cluster to this Vault for this Protection Job. - // The logical size is when the data is fully hydrated or expanded. - NumLogicalBytesTransferred *int64 `json:"numLogicalBytesTransferred,omitempty"` - - // Specifies the total number of physical bytes that are transferred - // from this Cohesity Cluster to this Vault for this Protection Job. - NumPhysicalBytesTransferred *int64 `json:"numPhysicalBytesTransferred,omitempty"` - - // Specifies the name of the Protection Job. - ProtectionJobName *string `json:"protectionJobName,omitempty"` - - // Specifies the total number of storage bytes consumed that are transferred - // from this Cohesity Cluster to this vault for this Protection Job. - StorageConsumed *int64 `json:"storageConsumed,omitempty"` -} - -// Validate validates this data transfer to vault per protection job -func (m *DataTransferToVaultPerProtectionJob) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data transfer to vault per protection job based on context it is used -func (m *DataTransferToVaultPerProtectionJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferToVaultPerProtectionJob) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferToVaultPerProtectionJob) UnmarshalBinary(b []byte) error { - var res DataTransferToVaultPerProtectionJob - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_to_vault_summary.go b/v1/models/data_transfer_to_vault_summary.go deleted file mode 100644 index e425fcf9..00000000 --- a/v1/models/data_transfer_to_vault_summary.go +++ /dev/null @@ -1,301 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataTransferToVaultSummary Data Transfer to Vault Summary. -// -// Specifies statistics about the transfer of data from this Cohesity -// Cluster to a Vault. -// -// swagger:model DataTransferToVaultSummary -type DataTransferToVaultSummary struct { - - // Array of Data Transfer Statistics Per Protection Jobs. - // - // Specifies the data transfer summary statistics for each Protection Job - // that is transferring data from this Cohesity Cluster to this - // Vault (External Target). - DataTransferPerProtectionJob []*DataTransferToVaultPerProtectionJob `json:"dataTransferPerProtectionJob"` - - // Array of Logical Data Transferred Per Day. - // - // Specifies the logical data transferred from this Cohesity Cluster - // to this Vault during the time period specified using the - // startTimeMsecs and endTimeMsecs parameters. - // For each day in the time period, an array element is returned, - // for example if 7 days are specified, 7 array elements are returned. - // The logical size is when the data is fully hydrated or expanded. - LogicalDataTransferredBytesDuringTimeRange []int64 `json:"logicalDataTransferredBytesDuringTimeRange"` - - // Specifies the total number of logical bytes that are transferred - // from this Cohesity Cluster to this Vault. - // The logical size is when the data is fully hydrated or expanded. - NumLogicalBytesTransferred *int64 `json:"numLogicalBytesTransferred,omitempty"` - - // Specifies the total number of physical bytes that are transferred - // from this Cohesity Cluster to this Vault. - NumPhysicalBytesTransferred *int64 `json:"numPhysicalBytesTransferred,omitempty"` - - // Specifies the number of Protection Jobs that transfer data to - // this Vault. - NumProtectionJobs *int64 `json:"numProtectionJobs,omitempty"` - - // Array of Physical Data Transferred Per Day. - // - // Specifies the physical data transferred from this Cohesity Cluster - // to this Vault during the time period specified using the - // startTimeMsecs and endTimeMsecs parameters. - // For each day in the time period, an array element is returned, - // for example if 7 days are specified, 7 array elements are returned. - PhysicalDataTransferredBytesDuringTimeRange []int64 `json:"physicalDataTransferredBytesDuringTimeRange"` - - // Specifies the storage consumed on the Vault as of last day in the - // specified time range. - StorageConsumedBytes *int64 `json:"storageConsumedBytes,omitempty"` - - // The vault Id associated with the vault. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the name of the Vault (External Target). - VaultName *string `json:"vaultName,omitempty"` - - // Specifies the type of Vault. - // 'kNearline' indicates a Google Nearline Vault. - // 'kGlacier' indicates an AWS Glacier Vault. - // 'kS3' indicates an AWS S3 Vault. - // 'kAzureStandard' indicates a Microsoft Azure Standard Vault. - // 'kS3Compatible' indicates an S3 Compatible Vault. - // (See the online help for supported types.) - // 'kQStarTape' indicates a QStar Tape Vault. - // 'kGoogleStandard' indicates a Google Standard Vault. - // 'kGoogleDRA' indicates a Google DRA Vault. - // 'kAmazonS3StandardIA' indicates an Amazon S3 Standard-IA Vault. - // 'kAWSGovCloud' indicates an AWS Gov Cloud Vault. - // 'kNAS' indicates a NAS Vault. - // 'kColdline' indicates a Google Coldline Vault. - // 'kAzureGovCloud' indicates a Microsoft Azure Gov Cloud Vault. - // 'kAzureArchive' indicates an Azure Archive Vault. - // 'kAzure' indicates an Azure Vault. - // 'kGoogle' indicates a Google Vault. - // 'kAmazon' indicates an Amazon Vault. - // 'kOracle' indicates an Oracle Vault. - // 'kOracleTierStandard' indicates an Oracle Tier Standard Vault. - // 'kOracleTierArchive' indicates an Oracle Tier Archive Vault. - // 'kAmazonC2S' indicates an Amazon Commercial Cloud Services Vault. - // Enum: ["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"] - VaultType *string `json:"vaultType,omitempty"` -} - -// Validate validates this data transfer to vault summary -func (m *DataTransferToVaultSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferPerProtectionJob(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferToVaultSummary) validateDataTransferPerProtectionJob(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferPerProtectionJob) { // not required - return nil - } - - for i := 0; i < len(m.DataTransferPerProtectionJob); i++ { - if swag.IsZero(m.DataTransferPerProtectionJob[i]) { // not required - continue - } - - if m.DataTransferPerProtectionJob[i] != nil { - if err := m.DataTransferPerProtectionJob[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferPerProtectionJob" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferPerProtectionJob" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var dataTransferToVaultSummaryTypeVaultTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTransferToVaultSummaryTypeVaultTypePropEnum = append(dataTransferToVaultSummaryTypeVaultTypePropEnum, v) - } -} - -const ( - - // DataTransferToVaultSummaryVaultTypeKNearline captures enum value "kNearline" - DataTransferToVaultSummaryVaultTypeKNearline string = "kNearline" - - // DataTransferToVaultSummaryVaultTypeKGlacier captures enum value "kGlacier" - DataTransferToVaultSummaryVaultTypeKGlacier string = "kGlacier" - - // DataTransferToVaultSummaryVaultTypeKS3 captures enum value "kS3" - DataTransferToVaultSummaryVaultTypeKS3 string = "kS3" - - // DataTransferToVaultSummaryVaultTypeKAzureStandard captures enum value "kAzureStandard" - DataTransferToVaultSummaryVaultTypeKAzureStandard string = "kAzureStandard" - - // DataTransferToVaultSummaryVaultTypeKS3Compatible captures enum value "kS3Compatible" - DataTransferToVaultSummaryVaultTypeKS3Compatible string = "kS3Compatible" - - // DataTransferToVaultSummaryVaultTypeKQStarTape captures enum value "kQStarTape" - DataTransferToVaultSummaryVaultTypeKQStarTape string = "kQStarTape" - - // DataTransferToVaultSummaryVaultTypeKGoogleStandard captures enum value "kGoogleStandard" - DataTransferToVaultSummaryVaultTypeKGoogleStandard string = "kGoogleStandard" - - // DataTransferToVaultSummaryVaultTypeKGoogleDRA captures enum value "kGoogleDRA" - DataTransferToVaultSummaryVaultTypeKGoogleDRA string = "kGoogleDRA" - - // DataTransferToVaultSummaryVaultTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - DataTransferToVaultSummaryVaultTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // DataTransferToVaultSummaryVaultTypeKAWSGovCloud captures enum value "kAWSGovCloud" - DataTransferToVaultSummaryVaultTypeKAWSGovCloud string = "kAWSGovCloud" - - // DataTransferToVaultSummaryVaultTypeKNAS captures enum value "kNAS" - DataTransferToVaultSummaryVaultTypeKNAS string = "kNAS" - - // DataTransferToVaultSummaryVaultTypeKColdline captures enum value "kColdline" - DataTransferToVaultSummaryVaultTypeKColdline string = "kColdline" - - // DataTransferToVaultSummaryVaultTypeKAzureGovCloud captures enum value "kAzureGovCloud" - DataTransferToVaultSummaryVaultTypeKAzureGovCloud string = "kAzureGovCloud" - - // DataTransferToVaultSummaryVaultTypeKAzureArchive captures enum value "kAzureArchive" - DataTransferToVaultSummaryVaultTypeKAzureArchive string = "kAzureArchive" - - // DataTransferToVaultSummaryVaultTypeKAzure captures enum value "kAzure" - DataTransferToVaultSummaryVaultTypeKAzure string = "kAzure" - - // DataTransferToVaultSummaryVaultTypeKGoogle captures enum value "kGoogle" - DataTransferToVaultSummaryVaultTypeKGoogle string = "kGoogle" - - // DataTransferToVaultSummaryVaultTypeKAmazon captures enum value "kAmazon" - DataTransferToVaultSummaryVaultTypeKAmazon string = "kAmazon" - - // DataTransferToVaultSummaryVaultTypeKOracle captures enum value "kOracle" - DataTransferToVaultSummaryVaultTypeKOracle string = "kOracle" - - // DataTransferToVaultSummaryVaultTypeKOracleTierStandard captures enum value "kOracleTierStandard" - DataTransferToVaultSummaryVaultTypeKOracleTierStandard string = "kOracleTierStandard" - - // DataTransferToVaultSummaryVaultTypeKOracleTierArchive captures enum value "kOracleTierArchive" - DataTransferToVaultSummaryVaultTypeKOracleTierArchive string = "kOracleTierArchive" - - // DataTransferToVaultSummaryVaultTypeKAmazonC2S captures enum value "kAmazonC2S" - DataTransferToVaultSummaryVaultTypeKAmazonC2S string = "kAmazonC2S" -) - -// prop value enum -func (m *DataTransferToVaultSummary) validateVaultTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTransferToVaultSummaryTypeVaultTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTransferToVaultSummary) validateVaultType(formats strfmt.Registry) error { - if swag.IsZero(m.VaultType) { // not required - return nil - } - - // value enum - if err := m.validateVaultTypeEnum("vaultType", "body", *m.VaultType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this data transfer to vault summary based on the context it is used -func (m *DataTransferToVaultSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferPerProtectionJob(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferToVaultSummary) contextValidateDataTransferPerProtectionJob(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataTransferPerProtectionJob); i++ { - - if m.DataTransferPerProtectionJob[i] != nil { - - if swag.IsZero(m.DataTransferPerProtectionJob[i]) { // not required - return nil - } - - if err := m.DataTransferPerProtectionJob[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferPerProtectionJob" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferPerProtectionJob" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferToVaultSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferToVaultSummary) UnmarshalBinary(b []byte) error { - var res DataTransferToVaultSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_transfer_to_vaults_summary_response.go b/v1/models/data_transfer_to_vaults_summary_response.go deleted file mode 100644 index d29fed6a..00000000 --- a/v1/models/data_transfer_to_vaults_summary_response.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTransferToVaultsSummaryResponse Data Transfer to Vaults Summary Response. -// -// Provides summary statistics about the transfer of data from this -// Cohesity Cluster to Vaults (External Targets). -// -// swagger:model DataTransferToVaultsSummaryResponse -type DataTransferToVaultsSummaryResponse struct { - - // Array of Summary Data Transfer Statistics. - // - // Specifies summary statistics about the transfer of data from - // the Cohesity Cluster to Vaults. - DataTransferSummary []*DataTransferToVaultSummary `json:"dataTransferSummary"` -} - -// Validate validates this data transfer to vaults summary response -func (m *DataTransferToVaultsSummaryResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferToVaultsSummaryResponse) validateDataTransferSummary(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferSummary) { // not required - return nil - } - - for i := 0; i < len(m.DataTransferSummary); i++ { - if swag.IsZero(m.DataTransferSummary[i]) { // not required - continue - } - - if m.DataTransferSummary[i] != nil { - if err := m.DataTransferSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data transfer to vaults summary response based on the context it is used -func (m *DataTransferToVaultsSummaryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferToVaultsSummaryResponse) contextValidateDataTransferSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataTransferSummary); i++ { - - if m.DataTransferSummary[i] != nil { - - if swag.IsZero(m.DataTransferSummary[i]) { // not required - return nil - } - - if err := m.DataTransferSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferToVaultsSummaryResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferToVaultsSummaryResponse) UnmarshalBinary(b []byte) error { - var res DataTransferToVaultsSummaryResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_uptier_job_parameters.go b/v1/models/data_uptier_job_parameters.go deleted file mode 100644 index 037b799b..00000000 --- a/v1/models/data_uptier_job_parameters.go +++ /dev/null @@ -1,196 +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" -) - -// DataUptierJobParameters Data Uptier Job Parameters. -// -// swagger:model DataUptierJobParameters -type DataUptierJobParameters struct { - - // Specifies policy to select a file to uptier based on file access or - // modification time. - // eg. A file can be selected to uptier if it has been accessed in the - // HotFileWindow or it is modified. - // enum: kLastAccessed, kLastModified. - // Specifies policy for file selection in data uptier jobs. - // 'kLastAccessed': Uptier the files which are accessed for at least num_file_access in - // hot_file_window. - // 'kLastModified': Uptier the files which are modified. - // Enum: ["kLastAccessed","kLastModified"] - FileSelectionPolicy *string `json:"fileSelectionPolicy,omitempty"` - - // Gives the size criteria to be used for selecting the files to be uptiered - // in bytes. The hot files that are smaller or greater than this size are - // uptiered. - FileSizeBytes *int64 `json:"fileSizeBytes,omitempty"` - - // Specifies policy to select a file to uptier based on its size. - // eg. A file can be selected to uptier if its size is greater than or - // smaller than the FileSizeBytes. - // enum: kGreaterThan, kSmallerThan. - // Specifies policy for file selection in data uptier jobs based on file size. - // 'kGreaterThan': Uptier the files having size greater than file_size. - // 'kSmallerThan': Uptier the files having size smaller than file_size. - // Enum: ["kGreaterThan","kSmallerThan"] - FileSizePolicy *string `json:"fileSizePolicy,omitempty"` - - // Identifies the hot files in the NAS source. Files that have been - // modified in the last hot_file_window are uptiered. Applicable only when - // file_select_policy is kLastAccessed. - HotFileWindow *int64 `json:"hotFileWindow,omitempty"` - - // Specifies whether uptier all files found in the view by overriding - // the FileUptierSelectionPolicy & FileUptierSizePolicy constraints. - // Default value false. - IncludeAllFiles *bool `json:"includeAllFiles,omitempty"` - - // Mount path where the Cohesity target view is mounted on NFS clients while - // migrating the data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Number of times file must be accessed within hot_file_window in order to - // qualify for uptiering. Applicable only when file_select_policy is - // kLastAccessed. - NumFileAccess *uint32 `json:"numFileAccess,omitempty"` - - // The source view name from which the data will be uptiered. - SourceViewName *string `json:"sourceViewName,omitempty"` -} - -// Validate validates this data uptier job parameters -func (m *DataUptierJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileSelectionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSizePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataUptierJobParametersTypeFileSelectionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLastAccessed","kLastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataUptierJobParametersTypeFileSelectionPolicyPropEnum = append(dataUptierJobParametersTypeFileSelectionPolicyPropEnum, v) - } -} - -const ( - - // DataUptierJobParametersFileSelectionPolicyKLastAccessed captures enum value "kLastAccessed" - DataUptierJobParametersFileSelectionPolicyKLastAccessed string = "kLastAccessed" - - // DataUptierJobParametersFileSelectionPolicyKLastModified captures enum value "kLastModified" - DataUptierJobParametersFileSelectionPolicyKLastModified string = "kLastModified" -) - -// prop value enum -func (m *DataUptierJobParameters) validateFileSelectionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataUptierJobParametersTypeFileSelectionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataUptierJobParameters) validateFileSelectionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FileSelectionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateFileSelectionPolicyEnum("fileSelectionPolicy", "body", *m.FileSelectionPolicy); err != nil { - return err - } - - return nil -} - -var dataUptierJobParametersTypeFileSizePolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGreaterThan","kSmallerThan"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataUptierJobParametersTypeFileSizePolicyPropEnum = append(dataUptierJobParametersTypeFileSizePolicyPropEnum, v) - } -} - -const ( - - // DataUptierJobParametersFileSizePolicyKGreaterThan captures enum value "kGreaterThan" - DataUptierJobParametersFileSizePolicyKGreaterThan string = "kGreaterThan" - - // DataUptierJobParametersFileSizePolicyKSmallerThan captures enum value "kSmallerThan" - DataUptierJobParametersFileSizePolicyKSmallerThan string = "kSmallerThan" -) - -// prop value enum -func (m *DataUptierJobParameters) validateFileSizePolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataUptierJobParametersTypeFileSizePolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataUptierJobParameters) validateFileSizePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FileSizePolicy) { // not required - return nil - } - - // value enum - if err := m.validateFileSizePolicyEnum("fileSizePolicy", "body", *m.FileSizePolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data uptier job parameters based on context it is used -func (m *DataUptierJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataUptierJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataUptierJobParameters) UnmarshalBinary(b []byte) error { - var res DataUptierJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/data_usage_stats.go b/v1/models/data_usage_stats.go deleted file mode 100644 index e8a70e96..00000000 --- a/v1/models/data_usage_stats.go +++ /dev/null @@ -1,201 +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" -) - -// DataUsageStats Data Usage Statistics. -// -// Specifies the data usage metric of the data stored on the Cohesity -// Cluster or Storage Domains (View Boxes). -// -// swagger:model DataUsageStats -type DataUsageStats struct { - - // Specifies the total data written on cloud tiers, as computed by the - // Cohesity Cluster. - CloudDataWrittenBytes *int64 `json:"cloudDataWrittenBytes,omitempty"` - - // Specifies Timestamp of CloudDataWrittenBytes. - CloudDataWrittenBytesTimestampUsec *int64 `json:"cloudDataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the total cloud capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. - CloudTotalPhysicalUsageBytes *int64 `json:"cloudTotalPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of CloudTotalPhysicalUsageBytes. - CloudTotalPhysicalUsageBytesTimestampUsec *int64 `json:"cloudTotalPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the data read from the protected objects by the Cohesity Cluster - // before any data reduction using deduplication and compression. - DataInBytes *int64 `json:"dataInBytes,omitempty"` - - // Specifies the size of the data has been reduced by change-block - // tracking and deduplication but before compression or data is replicated to - // other nodes as per RF or Erasure Coding policy. - DataInBytesAfterDedup *int64 `json:"dataInBytesAfterDedup,omitempty"` - - // Specifies Timestamp of DataInBytesAfterDedup. - DataInBytesAfterDedupTimestampUsec *int64 `json:"dataInBytesAfterDedupTimestampUsec,omitempty"` - - // Specifies the storage used before any data reduction - // using deduplication and compression. - DataInBytesPrev *int64 `json:"dataInBytesPrev,omitempty"` - - // Specifies the Timestamp of DataInBytesPrevTimestampUsec - DataInBytesPrevTimestampUsec *int64 `json:"dataInBytesPrevTimestampUsec,omitempty"` - - // Specifies Timestamp of DataInBytes. - DataInBytesTimestampUsec *int64 `json:"dataInBytesTimestampUsec,omitempty"` - - // Specifies the logical data used by Data Protect on Cohesity cluster. - DataProtectLogicalUsageBytes *int64 `json:"dataProtectLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of DataProtectLogicalUsageBytes. - DataProtectLogicalUsageBytesTimestampUsec *int64 `json:"dataProtectLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the physical data used by Data Protect on Cohesity cluster. - DataProtectPhysicalUsageBytes *int64 `json:"dataProtectPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of DataProtectPhysicalUsageBytes. - DataProtectPhysicalUsageBytesTimestampUsec *int64 `json:"dataProtectPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the data written after it has been reduced by deduplication and - // compression. This does not include resiliency impact. - DataWrittenBytes *int64 `json:"dataWrittenBytes,omitempty"` - - // Specifies the data written after it has been reduced by deduplication and - // compression at a previous time. This does not include resiliency impact. - DataWrittenBytesPrev *int64 `json:"dataWrittenBytesPrev,omitempty"` - - // Specifies Timestamp of DataWrittenBytesPrev - DataWrittenBytesPrevTimestampUsec *int64 `json:"dataWrittenBytesPrevTimestampUsec,omitempty"` - - // Specifies Timestamp of DataWrittenBytes. - DataWrittenBytesTimestampUsec *int64 `json:"dataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the logical data used by File services on Cohesity cluster. - FileServicesLogicalUsageBytes *int64 `json:"fileServicesLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of FileServicesLogicalUsageBytes. - FileServicesLogicalUsageBytesTimestampUsec *int64 `json:"fileServicesLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the physical data used by File services on Cohesity cluster. - FileServicesPhysicalUsageBytes *int64 `json:"fileServicesPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of FileServicesPhysicalUsageBytes. - FileServicesPhysicalUsageBytesTimestampUsec *int64 `json:"fileServicesPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the total data written on local tiers, as computed by the - // Cohesity Cluster, after the size of the data has been reduced by - // change-block tracking, deduplication and compression. This does not - // include resiliency impact. - LocalDataWrittenBytes *int64 `json:"localDataWrittenBytes,omitempty"` - - // Specifies Timestamp of LocalDataWrittenBytes. - LocalDataWrittenBytesTimestampUsec *int64 `json:"localDataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the size of the data has been replicated to other nodes as per - // RF or Erasure Coding policy. - LocalTierResiliencyImpactBytes *int64 `json:"localTierResiliencyImpactBytes,omitempty"` - - // Specifies the size of the data has been replicated to other nodes as per - // RF or Erasure Coding policy at a specific time. - LocalTierResiliencyImpactBytesPrev *int64 `json:"localTierResiliencyImpactBytesPrev,omitempty"` - - // Specifies Timestamp of LocalTierResiliencyImpactBytesPrev. - LocalTierResiliencyImpactBytesPrevTimestampUsec *int64 `json:"localTierResiliencyImpactBytesPrevTimestampUsec,omitempty"` - - // Specifies Timestamp of LocalTierResiliencyImpactBytes. - LocalTierResiliencyImpactBytesTimestampUsec *int64 `json:"localTierResiliencyImpactBytesTimestampUsec,omitempty"` - - // Specifies the total local capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. - LocalTotalPhysicalUsageBytes *int64 `json:"localTotalPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of LocalTotalPhysicalUsageBytes. - LocalTotalPhysicalUsageBytesTimestampUsec *int64 `json:"localTotalPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the number of directories. - NumDirectories *int64 `json:"numDirectories,omitempty"` - - // Specifies the number of directories at a specific time. - NumDirectoriesPrev *int64 `json:"numDirectoriesPrev,omitempty"` - - // Specifies the number of files. - NumFiles *int64 `json:"numFiles,omitempty"` - - // Specifies the number of files at a specific time. - NumFilesPrev *int64 `json:"numFilesPrev,omitempty"` - - // Specifies Timestamp of OutdatedLogicalUsageBytes. - OutdatedLogicalUsageBytesTimestampUsec *int64 `json:"outdatedLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the total capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. This includes resiliency impact. - StorageConsumedBytes *int64 `json:"storageConsumedBytes,omitempty"` - - // Specifies the total capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication at a previous time to compare. This - // includes resiliency impact. - StorageConsumedBytesPrev *int64 `json:"storageConsumedBytesPrev,omitempty"` - - // Specifies Timestamp of StorageConsumedBytesPrev. - StorageConsumedBytesPrevTimestampUsec *int64 `json:"storageConsumedBytesPrevTimestampUsec,omitempty"` - - // Specifies Timestamp of StorageConsumedBytes. - StorageConsumedBytesTimestampUsec *int64 `json:"storageConsumedBytesTimestampUsec,omitempty"` - - // Provides the combined data residing on protected objects. - // The size of data before reduction by deduplication and compression. - TotalLogicalUsageBytes *int64 `json:"totalLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of TotalLogicalUsageBytes. - TotalLogicalUsageBytesTimestampUsec *int64 `json:"totalLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the unique physical data usage in bytes. - UniquePhysicalDataBytes *int64 `json:"uniquePhysicalDataBytes,omitempty"` - - // Specifies Timestamp of UniquePhysicalDataBytes. - UniquePhysicalDataBytesTimestampUsec *int64 `json:"uniquePhysicalDataBytesTimestampUsec,omitempty"` -} - -// Validate validates this data usage stats -func (m *DataUsageStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data usage stats based on context it is used -func (m *DataUsageStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataUsageStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataUsageStats) UnmarshalBinary(b []byte) error { - var res DataUsageStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/database_copy_error.go b/v1/models/database_copy_error.go deleted file mode 100644 index 23da34b9..00000000 --- a/v1/models/database_copy_error.go +++ /dev/null @@ -1,56 +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" -) - -// DatabaseCopyError Database copy error in a DAG. -// -// swagger:model DatabaseCopyError -type DatabaseCopyError struct { - - // Error message. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Exchange event log event id of error. - EventID *int32 `json:"eventId,omitempty"` - - // If DB copy is suspended, reasons for suspension. - SuspendComment *string `json:"suspendComment,omitempty"` -} - -// Validate validates this database copy error -func (m *DatabaseCopyError) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this database copy error based on context it is used -func (m *DatabaseCopyError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DatabaseCopyError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DatabaseCopyError) UnmarshalBinary(b []byte) error { - var res DatabaseCopyError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/database_info.go b/v1/models/database_info.go deleted file mode 100644 index 8b256c2d..00000000 --- a/v1/models/database_info.go +++ /dev/null @@ -1,11 +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 - -// DatabaseInfo Proto that contains specific information about a hive database. -// -// swagger:model DatabaseInfo -type DatabaseInfo interface{} diff --git a/v1/models/datastore_info.go b/v1/models/datastore_info.go deleted file mode 100644 index e19c8627..00000000 --- a/v1/models/datastore_info.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" -) - -// DatastoreInfo Datastore Information. -// -// swagger:model DatastoreInfo -type DatastoreInfo struct { - - // Specifies the capacity of the datastore in bytes. - Capacity *uint64 `json:"capacity,omitempty"` - - // Specifies the available space on the datastore in bytes. - FreeSpace *uint64 `json:"freeSpace,omitempty"` -} - -// Validate validates this datastore info -func (m *DatastoreInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this datastore info based on context it is used -func (m *DatastoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DatastoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DatastoreInfo) UnmarshalBinary(b []byte) error { - var res DatastoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/date_time.go b/v1/models/date_time.go deleted file mode 100644 index 0aaf2ff7..00000000 --- a/v1/models/date_time.go +++ /dev/null @@ -1,118 +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" -) - -// DateTime Message encapsulating date and time information. -// -// swagger:model DateTime -type DateTime struct { - - // Indicates day of the month. - DayOfTheMonth *int32 `json:"dayOfTheMonth,omitempty"` - - // Indicates month for specific date. - Month *int32 `json:"month,omitempty"` - - // Indicates the time in 24 hrs format. - Time *Time `json:"time,omitempty"` - - // Indicates year for specific date. - Year *int32 `json:"year,omitempty"` -} - -// Validate validates this date time -func (m *DateTime) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DateTime) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this date time based on the context it is used -func (m *DateTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DateTime) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DateTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DateTime) UnmarshalBinary(b []byte) error { - var res DateTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/day_time.go b/v1/models/day_time.go deleted file mode 100644 index 75296873..00000000 --- a/v1/models/day_time.go +++ /dev/null @@ -1,178 +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" -) - -// DayTime Specifies the DayTime parameters definition. -// -// swagger:model DayTime -type DayTime struct { - - // Specifies the day of the week (such as 'kMonday') for scheduling - // throttling. - // Specifies a day in a week such as 'kSunday', 'kMonday', etc. - // Enum: ["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"] - Day *string `json:"day,omitempty"` - - // Specifies the information regarding the scheduled time. - Time *Time `json:"time,omitempty"` -} - -// Validate validates this day time -func (m *DayTime) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDay(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dayTimeTypeDayPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dayTimeTypeDayPropEnum = append(dayTimeTypeDayPropEnum, v) - } -} - -const ( - - // DayTimeDayKSunday captures enum value "kSunday" - DayTimeDayKSunday string = "kSunday" - - // DayTimeDayKMonday captures enum value "kMonday" - DayTimeDayKMonday string = "kMonday" - - // DayTimeDayKTuesday captures enum value "kTuesday" - DayTimeDayKTuesday string = "kTuesday" - - // DayTimeDayKWednesday captures enum value "kWednesday" - DayTimeDayKWednesday string = "kWednesday" - - // DayTimeDayKThursday captures enum value "kThursday" - DayTimeDayKThursday string = "kThursday" - - // DayTimeDayKFriday captures enum value "kFriday" - DayTimeDayKFriday string = "kFriday" - - // DayTimeDayKSaturday captures enum value "kSaturday" - DayTimeDayKSaturday string = "kSaturday" -) - -// prop value enum -func (m *DayTime) validateDayEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dayTimeTypeDayPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DayTime) validateDay(formats strfmt.Registry) error { - if swag.IsZero(m.Day) { // not required - return nil - } - - // value enum - if err := m.validateDayEnum("day", "body", *m.Day); err != nil { - return err - } - - return nil -} - -func (m *DayTime) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this day time based on the context it is used -func (m *DayTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DayTime) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DayTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DayTime) UnmarshalBinary(b []byte) error { - var res DayTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/day_time_window.go b/v1/models/day_time_window.go deleted file mode 100644 index 910c578d..00000000 --- a/v1/models/day_time_window.go +++ /dev/null @@ -1,160 +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" -) - -// DayTimeWindow Specifies the DayTimeWindow parameters definition. -// -// swagger:model DayTimeWindow -type DayTimeWindow struct { - - // EndTime of the throttling window. - EndTime *DayTime `json:"endTime,omitempty"` - - // StartTime of the throttling window. - StartTime *DayTime `json:"startTime,omitempty"` -} - -// Validate validates this day time window -func (m *DayTimeWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DayTimeWindow) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *DayTimeWindow) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this day time window based on the context it is used -func (m *DayTimeWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DayTimeWindow) 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 *DayTimeWindow) 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 -} - -// MarshalBinary interface implementation -func (m *DayTimeWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DayTimeWindow) UnmarshalBinary(b []byte) error { - var res DayTimeWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/db_file_info.go b/v1/models/db_file_info.go deleted file mode 100644 index e4706456..00000000 --- a/v1/models/db_file_info.go +++ /dev/null @@ -1,128 +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" -) - -// DbFileInfo Database File Information. -// -// Specifies information about a database file. -// -// swagger:model DbFileInfo -type DbFileInfo struct { - - // Specifies the format type of the file that SQL database stores the data. - // Specifies the format type of the file that SQL database stores the data. - // 'kRows' refers to a data file - // 'kLog' refers to a log file - // 'kFileStream' refers to a directory containing FILESTREAM data - // 'kNotSupportedType' is for information purposes only. Not supported. - // 'kFullText' refers to a full-text catalog. - // Enum: ["kRows","kLog","kFileStream","kNotSupportedType","kFullText"] - FileType *string `json:"fileType,omitempty"` - - // Specifies the full path of the database file on the SQL host machine. - FullPath *string `json:"fullPath,omitempty"` - - // Specifies the last known size of the database file. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this db file info -func (m *DbFileInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dbFileInfoTypeFileTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRows","kLog","kFileStream","kNotSupportedType","kFullText"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dbFileInfoTypeFileTypePropEnum = append(dbFileInfoTypeFileTypePropEnum, v) - } -} - -const ( - - // DbFileInfoFileTypeKRows captures enum value "kRows" - DbFileInfoFileTypeKRows string = "kRows" - - // DbFileInfoFileTypeKLog captures enum value "kLog" - DbFileInfoFileTypeKLog string = "kLog" - - // DbFileInfoFileTypeKFileStream captures enum value "kFileStream" - DbFileInfoFileTypeKFileStream string = "kFileStream" - - // DbFileInfoFileTypeKNotSupportedType captures enum value "kNotSupportedType" - DbFileInfoFileTypeKNotSupportedType string = "kNotSupportedType" - - // DbFileInfoFileTypeKFullText captures enum value "kFullText" - DbFileInfoFileTypeKFullText string = "kFullText" -) - -// prop value enum -func (m *DbFileInfo) validateFileTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dbFileInfoTypeFileTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DbFileInfo) validateFileType(formats strfmt.Registry) error { - if swag.IsZero(m.FileType) { // not required - return nil - } - - // value enum - if err := m.validateFileTypeEnum("fileType", "body", *m.FileType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this db file info based on context it is used -func (m *DbFileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DbFileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DbFileInfo) UnmarshalBinary(b []byte) error { - var res DbFileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deactivate_job_entities_info_proto.go b/v1/models/deactivate_job_entities_info_proto.go deleted file mode 100644 index 56ca6b3f..00000000 --- a/v1/models/deactivate_job_entities_info_proto.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeactivateJobEntitiesInfoProto Message that encapsulates information about the deactivate of entities -// protected by the backup job for any of the environments we support. -// -// Please note that for VMware env, we do not need any environment specific -// information. Thus extensions are not yet defined. -// -// swagger:model DeactivateJobEntitiesInfoProto -type DeactivateJobEntitiesInfoProto struct { - - // Contains information about the deactivated entities. - DeactivatedEntityVec []*DeactivateJobEntitiesInfoProtoDeactivatedEntity `json:"deactivatedEntityVec"` - - // The type of environment this deactivate backup job info pertains to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this deactivate job entities info proto -func (m *DeactivateJobEntitiesInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeactivatedEntityVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobEntitiesInfoProto) validateDeactivatedEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.DeactivatedEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.DeactivatedEntityVec); i++ { - if swag.IsZero(m.DeactivatedEntityVec[i]) { // not required - continue - } - - if m.DeactivatedEntityVec[i] != nil { - if err := m.DeactivatedEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivatedEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivatedEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this deactivate job entities info proto based on the context it is used -func (m *DeactivateJobEntitiesInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeactivatedEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobEntitiesInfoProto) contextValidateDeactivatedEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeactivatedEntityVec); i++ { - - if m.DeactivatedEntityVec[i] != nil { - - if swag.IsZero(m.DeactivatedEntityVec[i]) { // not required - return nil - } - - if err := m.DeactivatedEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivatedEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivatedEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeactivateJobEntitiesInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeactivateJobEntitiesInfoProto) UnmarshalBinary(b []byte) error { - var res DeactivateJobEntitiesInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deactivate_job_entities_info_proto_deactivated_entity.go b/v1/models/deactivate_job_entities_info_proto_deactivated_entity.go deleted file mode 100644 index c71f4095..00000000 --- a/v1/models/deactivate_job_entities_info_proto_deactivated_entity.go +++ /dev/null @@ -1,164 +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" -) - -// DeactivateJobEntitiesInfoProtoDeactivatedEntity deactivate job entities info proto deactivated entity -// -// swagger:model DeactivateJobEntitiesInfoProto_DeactivatedEntity -type DeactivateJobEntitiesInfoProtoDeactivatedEntity struct { - - // The entity to be deactivated. - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // If the deactivate of this entity failed, this field will contain the - // cause of the failure. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The deactivate status of the entity. - Status *int32 `json:"status,omitempty"` -} - -// Validate validates this deactivate job entities info proto deactivated entity -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this deactivate job entities info proto deactivated entity based on the context it is used -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) 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 -} - -// MarshalBinary interface implementation -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeactivateJobEntitiesInfoProtoDeactivatedEntity) UnmarshalBinary(b []byte) error { - var res DeactivateJobEntitiesInfoProtoDeactivatedEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deactivate_job_state_proto.go b/v1/models/deactivate_job_state_proto.go deleted file mode 100644 index fb2311b2..00000000 --- a/v1/models/deactivate_job_state_proto.go +++ /dev/null @@ -1,295 +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" -) - -// DeactivateJobStateProto Message to define all the information associated with the deactivate backup -// job task. -// -// swagger:model DeactivateJobStateProto -type DeactivateJobStateProto struct { - - // Whether to deactivate (i.e., Power off VMs in VMware env) leaf level - // entities protected by the backup job. - DeactivateEntities *bool `json:"deactivateEntities,omitempty"` - - // Master populates the information about the entities to be deactivated. - // Slave populates the progress and status of the task. - // Please note that this field will be set only if the above field - // 'deactivate_entities' is set to true. - DeactivateInfo *DeactivateJobEntitiesInfoProto `json:"deactivateInfo,omitempty"` - - // If the deactivate task has finished, this field contains the end time for - // the task. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered by task (if any). Only valid if the task has - // finished. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The globally unique id of the backup job to deactivate. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // A way to connect to the parent source of this backup job. - ParentSourceConnectionParams *ConnectorParams `json:"parentSourceConnectionParams,omitempty"` - - // Constituent id (and the gandalf session id) where this task has been - // scheduled. If -1, the task is not running at any slave. It's possible - // that the task was previously scheduled, but is now being re-scheduled. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // scheduled gandalf session Id - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // The start time for this deactivate task. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Status of the deactivate backup job task. - Status *int32 `json:"status,omitempty"` - - // A unique id of the deactivate backup job task. - TaskID *int64 `json:"taskId,omitempty"` - - // The user who requested this deactivate operation. - User *string `json:"user,omitempty"` -} - -// Validate validates this deactivate job state proto -func (m *DeactivateJobStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeactivateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSourceConnectionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobStateProto) validateDeactivateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DeactivateInfo) { // not required - return nil - } - - if m.DeactivateInfo != nil { - if err := m.DeactivateInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivateInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivateInfo") - } - return err - } - } - - return nil -} - -func (m *DeactivateJobStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *DeactivateJobStateProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *DeactivateJobStateProto) validateParentSourceConnectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if m.ParentSourceConnectionParams != nil { - if err := m.ParentSourceConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deactivate job state proto based on the context it is used -func (m *DeactivateJobStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeactivateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeactivateJobStateProto) contextValidateDeactivateInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DeactivateInfo != nil { - - if swag.IsZero(m.DeactivateInfo) { // not required - return nil - } - - if err := m.DeactivateInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deactivateInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deactivateInfo") - } - return err - } - } - - return nil -} - -func (m *DeactivateJobStateProto) 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 -} - -func (m *DeactivateJobStateProto) 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 -} - -func (m *DeactivateJobStateProto) contextValidateParentSourceConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSourceConnectionParams != nil { - - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if err := m.ParentSourceConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeactivateJobStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeactivateJobStateProto) UnmarshalBinary(b []byte) error { - var res DeactivateJobStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_backup_job_runs_param.go b/v1/models/delete_backup_job_runs_param.go deleted file mode 100644 index d015ecd7..00000000 --- a/v1/models/delete_backup_job_runs_param.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeleteBackupJobRunsParam DeleteBackupJobRunsParam is struct to delete backup runs of a job. -// -// swagger:model DeleteBackupJobRunsParam -type DeleteBackupJobRunsParam struct { - - // in: body - JobRuns []*DeleteJobRun `json:"jobRuns"` -} - -// Validate validates this delete backup job runs param -func (m *DeleteBackupJobRunsParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteBackupJobRunsParam) validateJobRuns(formats strfmt.Registry) error { - if swag.IsZero(m.JobRuns) { // not required - return nil - } - - for i := 0; i < len(m.JobRuns); i++ { - if swag.IsZero(m.JobRuns[i]) { // not required - continue - } - - if m.JobRuns[i] != nil { - if err := m.JobRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete backup job runs param based on the context it is used -func (m *DeleteBackupJobRunsParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteBackupJobRunsParam) contextValidateJobRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.JobRuns); i++ { - - if m.JobRuns[i] != nil { - - if swag.IsZero(m.JobRuns[i]) { // not required - return nil - } - - if err := m.JobRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteBackupJobRunsParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteBackupJobRunsParam) UnmarshalBinary(b []byte) error { - var res DeleteBackupJobRunsParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_infected_file_params.go b/v1/models/delete_infected_file_params.go deleted file mode 100644 index a4f4c4ef..00000000 --- a/v1/models/delete_infected_file_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeleteInfectedFileParams Specifies the parameters to delete the infected files. -// -// swagger:model DeleteInfectedFileParams -type DeleteInfectedFileParams struct { - - // Specifies the list of infected file path. - InfectedFileIds []*InfectedFileParam `json:"infectedFileIds"` -} - -// Validate validates this delete infected file params -func (m *DeleteInfectedFileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFileIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFileParams) validateInfectedFileIds(formats strfmt.Registry) error { - if swag.IsZero(m.InfectedFileIds) { // not required - return nil - } - - for i := 0; i < len(m.InfectedFileIds); i++ { - if swag.IsZero(m.InfectedFileIds[i]) { // not required - continue - } - - if m.InfectedFileIds[i] != nil { - if err := m.InfectedFileIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete infected file params based on the context it is used -func (m *DeleteInfectedFileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFileIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFileParams) contextValidateInfectedFileIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFileIds); i++ { - - if m.InfectedFileIds[i] != nil { - - if swag.IsZero(m.InfectedFileIds[i]) { // not required - return nil - } - - if err := m.InfectedFileIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteInfectedFileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteInfectedFileParams) UnmarshalBinary(b []byte) error { - var res DeleteInfectedFileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_infected_file_response.go b/v1/models/delete_infected_file_response.go deleted file mode 100644 index 082cc593..00000000 --- a/v1/models/delete_infected_file_response.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeleteInfectedFileResponse Specifies delete infected files response. -// -// swagger:model DeleteInfectedFileResponse -type DeleteInfectedFileResponse struct { - - // Specifies the failed delete infected files. - DeleteFailedInfectedFiles []*InfectedFileID `json:"deleteFailedInfectedFiles"` - - // Specifies the successfully deleted infected files. - DeleteSucceededInfectedFiles []*InfectedFileID `json:"deleteSucceededInfectedFiles"` -} - -// Validate validates this delete infected file response -func (m *DeleteInfectedFileResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeleteFailedInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeleteSucceededInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFileResponse) validateDeleteFailedInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.DeleteFailedInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.DeleteFailedInfectedFiles); i++ { - if swag.IsZero(m.DeleteFailedInfectedFiles[i]) { // not required - continue - } - - if m.DeleteFailedInfectedFiles[i] != nil { - if err := m.DeleteFailedInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeleteInfectedFileResponse) validateDeleteSucceededInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.DeleteSucceededInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.DeleteSucceededInfectedFiles); i++ { - if swag.IsZero(m.DeleteSucceededInfectedFiles[i]) { // not required - continue - } - - if m.DeleteSucceededInfectedFiles[i] != nil { - if err := m.DeleteSucceededInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete infected file response based on the context it is used -func (m *DeleteInfectedFileResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeleteFailedInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeleteSucceededInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFileResponse) contextValidateDeleteFailedInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeleteFailedInfectedFiles); i++ { - - if m.DeleteFailedInfectedFiles[i] != nil { - - if swag.IsZero(m.DeleteFailedInfectedFiles[i]) { // not required - return nil - } - - if err := m.DeleteFailedInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeleteInfectedFileResponse) contextValidateDeleteSucceededInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeleteSucceededInfectedFiles); i++ { - - if m.DeleteSucceededInfectedFiles[i] != nil { - - if swag.IsZero(m.DeleteSucceededInfectedFiles[i]) { // not required - return nil - } - - if err := m.DeleteSucceededInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteInfectedFileResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteInfectedFileResponse) UnmarshalBinary(b []byte) error { - var res DeleteInfectedFileResponse - 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/delete_job_run.go b/v1/models/delete_job_run.go deleted file mode 100644 index 9c9d9ac0..00000000 --- a/v1/models/delete_job_run.go +++ /dev/null @@ -1,112 +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" -) - -// DeleteJobRun DeleteJobRun is struct to specify a backup run of a job. -// -// swagger:model DeleteJobRun -type DeleteJobRun struct { - - // JobUid is the Uid of job whose backup run is to be deleted. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // RunStartTimeUsecs is the start time of the backup run to be deleted. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` -} - -// Validate validates this delete job run -func (m *DeleteJobRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteJobRun) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this delete job run based on the context it is used -func (m *DeleteJobRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteJobRun) 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 -} - -// MarshalBinary interface implementation -func (m *DeleteJobRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteJobRun) UnmarshalBinary(b []byte) error { - var res DeleteJobRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_protection_job_param.go b/v1/models/delete_protection_job_param.go deleted file mode 100644 index 5ebfa5a8..00000000 --- a/v1/models/delete_protection_job_param.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" -) - -// DeleteProtectionJobParam Delete Protection Job Parameters. -// -// DeleteProtectionJobParam is the struct for deleting a protection job. -// -// swagger:model DeleteProtectionJobParam -type DeleteProtectionJobParam struct { - - // Specifies if Snapshots generated by the Protection Job should also be - // deleted when the Job is deleted. - DeleteSnapshots *bool `json:"deleteSnapshots,omitempty"` -} - -// Validate validates this delete protection job param -func (m *DeleteProtectionJobParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this delete protection job param based on context it is used -func (m *DeleteProtectionJobParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteProtectionJobParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteProtectionJobParam) UnmarshalBinary(b []byte) error { - var res DeleteProtectionJobParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_route_param.go b/v1/models/delete_route_param.go deleted file mode 100644 index 6193b633..00000000 --- a/v1/models/delete_route_param.go +++ /dev/null @@ -1,66 +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" -) - -// DeleteRouteParam Delete Route Parameters. -// -// Specifies the delete param of a Static Route. -// -// swagger:model DeleteRouteParam -type DeleteRouteParam struct { - - // Destination network. - // - // Specifies the destination network of the Static Route. - // overrideDescription: true - DestNetwork *string `json:"destNetwork,omitempty"` - - // Specifies the network interfaces name to use for communicating with the - // destination network. - IfName *string `json:"ifName,omitempty"` - - // Specifies the network interfaces group or vlan interface group to - // use for communicating with the destination network. - IfaceGroupName *string `json:"ifaceGroupName,omitempty"` - - // Specifies the network node group to represent a group of nodes. - NodeGroupName *string `json:"nodeGroupName,omitempty"` -} - -// Validate validates this delete route param -func (m *DeleteRouteParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this delete route param based on context it is used -func (m *DeleteRouteParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteRouteParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteRouteParam) UnmarshalBinary(b []byte) error { - var res DeleteRouteParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_view_users_quota_parameters.go b/v1/models/delete_view_users_quota_parameters.go deleted file mode 100644 index 946c73d4..00000000 --- a/v1/models/delete_view_users_quota_parameters.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeleteViewUsersQuotaParameters Delete View Users Quota Parameters. -// -// Specifies the user ids to remove the corresponding quota overrides in view. -// -// swagger:model DeleteViewUsersQuotaParameters -type DeleteViewUsersQuotaParameters struct { - - // Delete all existing user quota override policies. - DeleteAll *bool `json:"deleteAll,omitempty"` - - // The user ids whose policy needs to be deleted. - UserIds []*UserID `json:"userIds"` - - // View name of input view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this delete view users quota parameters -func (m *DeleteViewUsersQuotaParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteViewUsersQuotaParameters) validateUserIds(formats strfmt.Registry) error { - if swag.IsZero(m.UserIds) { // not required - return nil - } - - for i := 0; i < len(m.UserIds); i++ { - if swag.IsZero(m.UserIds[i]) { // not required - continue - } - - if m.UserIds[i] != nil { - if err := m.UserIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete view users quota parameters based on the context it is used -func (m *DeleteViewUsersQuotaParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteViewUsersQuotaParameters) contextValidateUserIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UserIds); i++ { - - if m.UserIds[i] != nil { - - if swag.IsZero(m.UserIds[i]) { // not required - return nil - } - - if err := m.UserIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteViewUsersQuotaParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteViewUsersQuotaParameters) UnmarshalBinary(b []byte) error { - var res DeleteViewUsersQuotaParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delivery_rule_proto_delivery_target.go b/v1/models/delivery_rule_proto_delivery_target.go deleted file mode 100644 index bee7315e..00000000 --- a/v1/models/delivery_rule_proto_delivery_target.go +++ /dev/null @@ -1,84 +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" -) - -// DeliveryRuleProtoDeliveryTarget Delivery targets for the notifications. For now only email delivery is -// supported. In future, we can potentially add other delivery targets such -// as paging, SMS, etc. -// -// swagger:model DeliveryRuleProto_DeliveryTarget -type DeliveryRuleProtoDeliveryTarget struct { - - // List of email addresses to send notifications. - EmailAddress *string `json:"emailAddress,omitempty"` - - // email recipient type - EmailRecipientType *int32 `json:"emailRecipientType,omitempty"` - - // Specifies the curl options used to invoke above rest external api. - ExternalAPICurlOptions *string `json:"externalApiCurlOptions,omitempty"` - - // Specifies the external api to be invoked when an alert matching this - // rule is raised. - ExternalAPIURL *string `json:"externalApiUrl,omitempty"` - - // Locale for the delivery target. - Locale *string `json:"locale,omitempty"` - - // Need to send snmp notification for matched alerts. - SnmpNotification *bool `json:"snmpNotification,omitempty"` - - // Need to write syslog for matched alerts. - SyslogNotification *bool `json:"syslogNotification,omitempty"` - - // Tenant who has been assigned this target. - // This field is not populated within AlertsDataProto persisted in Gandalf. - // This is a convenience field and is populated on the fly by the Alerts - // component for delivery targets in the delivery_target_list within - // AlertProto. This field is utilized by NotificationDeliveryHelper to - // group delivery targets so that we could send out a single email to all - // the email addresses registered with the same locale by a given tenant - // or by the SP admin. Another approach could have been to use an internal - // object, but since the AlertProto contains a list of type - // DeliveryTarget, this field has been added to make it convenient to pass - // around an AlertProto object. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this delivery rule proto delivery target -func (m *DeliveryRuleProtoDeliveryTarget) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this delivery rule proto delivery target based on context it is used -func (m *DeliveryRuleProtoDeliveryTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeliveryRuleProtoDeliveryTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeliveryRuleProtoDeliveryTarget) UnmarshalBinary(b []byte) error { - var res DeliveryRuleProtoDeliveryTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_arg.go b/v1/models/deploy_arg.go deleted file mode 100644 index 91434fa0..00000000 --- a/v1/models/deploy_arg.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeployArg DeployArg represents the argument for cloud deploy VM operations. -// -// swagger:model DeployArg -type DeployArg struct { - - // Type of restore to perform. - Action *int32 `json:"action,omitempty"` - - // Parameters to deploy VMs to cloud. Only populate this if deploying VMs - // to cloud. - DeployVmsToCloudParams *DeployVMsToCloudParams `json:"deployVmsToCloudParams,omitempty"` - - // Name is the name of the cloud deploy task. This field has to be set, and - // it needs to be unique across all cloud tasks. - Name *string `json:"name,omitempty"` - - // Objects is the list of objects to cloud deploy. - Objects []*RestoreObject `json:"objects"` - - // RestoreParentSource is the registered parent source to which objects are - // to be deployed. - RestoreParentSource *PrivateEntityProto `json:"restoreParentSource,omitempty"` -} - -// Validate validates this deploy arg -func (m *DeployArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployArg) validateDeployVmsToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if m.DeployVmsToCloudParams != nil { - if err := m.DeployVmsToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *DeployArg) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployArg) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy arg based on the context it is used -func (m *DeployArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployArg) contextValidateDeployVmsToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudParams != nil { - - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if err := m.DeployVmsToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *DeployArg) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployArg) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployArg) UnmarshalBinary(b []byte) error { - var res DeployArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_cert_parameters.go b/v1/models/deploy_cert_parameters.go deleted file mode 100644 index e4f8b36a..00000000 --- a/v1/models/deploy_cert_parameters.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeployCertParameters Deploy host global certificate Request. -// -// Specifies the parameters used to generate and deploy a certificate. -// -// swagger:model DeployCertParameters -type DeployCertParameters struct { - - // Specifies the filename of the certificate. - CertFileName *string `json:"certFileName,omitempty"` - - // Specifies the list of all hosts on which the certificate is to - // be deployed. - HostsInfoList []*HostInfo `json:"hostsInfoList"` - - // Specifies the type of the host such as 'kSapHana', 'kSapOracle', etc. - // Specifies the host type of host for generating and deploying a - // Certificate. - // 'kOther' indicates it is any of the other hosts. - // 'kSapOracle' indicates it is a SAP Oracle host. - // 'kSapHana' indicates it is a SAP HANA host. - // Enum: ["kOther","kSapOracle","kSapHana"] - Type *string `json:"type,omitempty"` - - // Specifies the number of days after which the certificate will expire. The - // user has to input the number of days (from the current date) till when the - // certificate is valid. - ValidDays *int64 `json:"validDays,omitempty"` -} - -// Validate validates this deploy cert parameters -func (m *DeployCertParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostsInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployCertParameters) validateHostsInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.HostsInfoList) { // not required - return nil - } - - for i := 0; i < len(m.HostsInfoList); i++ { - if swag.IsZero(m.HostsInfoList[i]) { // not required - continue - } - - if m.HostsInfoList[i] != nil { - if err := m.HostsInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostsInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostsInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var deployCertParametersTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOther","kSapOracle","kSapHana"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - deployCertParametersTypeTypePropEnum = append(deployCertParametersTypeTypePropEnum, v) - } -} - -const ( - - // DeployCertParametersTypeKOther captures enum value "kOther" - DeployCertParametersTypeKOther string = "kOther" - - // DeployCertParametersTypeKSapOracle captures enum value "kSapOracle" - DeployCertParametersTypeKSapOracle string = "kSapOracle" - - // DeployCertParametersTypeKSapHana captures enum value "kSapHana" - DeployCertParametersTypeKSapHana string = "kSapHana" -) - -// prop value enum -func (m *DeployCertParameters) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, deployCertParametersTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DeployCertParameters) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this deploy cert parameters based on the context it is used -func (m *DeployCertParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostsInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployCertParameters) contextValidateHostsInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostsInfoList); i++ { - - if m.HostsInfoList[i] != nil { - - if swag.IsZero(m.HostsInfoList[i]) { // not required - return nil - } - - if err := m.HostsInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostsInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostsInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployCertParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployCertParameters) UnmarshalBinary(b []byte) error { - var res DeployCertParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_d_b_instances_to_r_d_s_params.go b/v1/models/deploy_d_b_instances_to_r_d_s_params.go deleted file mode 100644 index 6d1577af..00000000 --- a/v1/models/deploy_d_b_instances_to_r_d_s_params.go +++ /dev/null @@ -1,285 +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" -) - -// DeployDBInstancesToRDSParams Contains RDS specfic options that can be supplied while restoring the RDS -// DB instance. -// -// swagger:model DeployDBInstancesToRDSParams -type DeployDBInstancesToRDSParams struct { - - // Whether to enable auto minor version upgrade in the restored DB. - AutoMinorVersionUpgrade *bool `json:"autoMinorVersionUpgrade,omitempty"` - - // Entity representing the availability zone to use while restoring the DB. - AvailabilityZone *EntityProto `json:"availabilityZone,omitempty"` - - // Whether to enable copying of tags to snapshots of the DB. - CopyTagsToSnapshots *bool `json:"copyTagsToSnapshots,omitempty"` - - // The DB instance identifier to use for the restored DB. This field is - // required. - DbInstanceID *string `json:"dbInstanceId,omitempty"` - - // Entity representing the RDS option group to use while restoring the DB. - DbOptionGroup *EntityProto `json:"dbOptionGroup,omitempty"` - - // Entity representing the RDS parameter group to use while restoring the DB. - DbParameterGroup *EntityProto `json:"dbParameterGroup,omitempty"` - - // Port to use for the DB in the restored RDS instance. - DbPort *int32 `json:"dbPort,omitempty"` - - // Whether to enable IAM authentication for the DB. - IamDbAuthentication *bool `json:"iamDbAuthentication,omitempty"` - - // Whether this is a multi-az deployment or not. - MultiAzDeployment *bool `json:"multiAzDeployment,omitempty"` - - // If this is set, we will restore DB to the specified point in time. - PointInTimeParams *DeployDBInstancesToRDSParamsPointInTimeRestoreParams `json:"pointInTimeParams,omitempty"` - - // Whether this DB will be publicly accessible or not. - PublicAccessibility *bool `json:"publicAccessibility,omitempty"` -} - -// Validate validates this deploy d b instances to r d s params -func (m *DeployDBInstancesToRDSParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAvailabilityZone(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbOptionGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbParameterGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePointInTimeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployDBInstancesToRDSParams) validateAvailabilityZone(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if m.AvailabilityZone != nil { - if err := m.AvailabilityZone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) validateDbOptionGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if m.DbOptionGroup != nil { - if err := m.DbOptionGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) validateDbParameterGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if m.DbParameterGroup != nil { - if err := m.DbParameterGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) validatePointInTimeParams(formats strfmt.Registry) error { - if swag.IsZero(m.PointInTimeParams) { // not required - return nil - } - - if m.PointInTimeParams != nil { - if err := m.PointInTimeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pointInTimeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pointInTimeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy d b instances to r d s params based on the context it is used -func (m *DeployDBInstancesToRDSParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAvailabilityZone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbOptionGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbParameterGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePointInTimeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployDBInstancesToRDSParams) contextValidateAvailabilityZone(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilityZone != nil { - - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if err := m.AvailabilityZone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) contextValidateDbOptionGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbOptionGroup != nil { - - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if err := m.DbOptionGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) contextValidateDbParameterGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbParameterGroup != nil { - - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if err := m.DbParameterGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -func (m *DeployDBInstancesToRDSParams) contextValidatePointInTimeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PointInTimeParams != nil { - - if swag.IsZero(m.PointInTimeParams) { // not required - return nil - } - - if err := m.PointInTimeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pointInTimeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pointInTimeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployDBInstancesToRDSParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployDBInstancesToRDSParams) UnmarshalBinary(b []byte) error { - var res DeployDBInstancesToRDSParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_d_b_instances_to_r_d_s_params_point_in_time_restore_params.go b/v1/models/deploy_d_b_instances_to_r_d_s_params_point_in_time_restore_params.go deleted file mode 100644 index aa6a1c20..00000000 --- a/v1/models/deploy_d_b_instances_to_r_d_s_params_point_in_time_restore_params.go +++ /dev/null @@ -1,51 +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" -) - -// DeployDBInstancesToRDSParamsPointInTimeRestoreParams Message to capture details of a point in time that the DB needs to be -// restored to. -// -// swagger:model DeployDBInstancesToRDSParams_PointInTimeRestoreParams -type DeployDBInstancesToRDSParamsPointInTimeRestoreParams struct { - - // Time in milliseconds since epoch that the DB needs to be restored to. - TimestampMsecs *int64 `json:"timestampMsecs,omitempty"` -} - -// Validate validates this deploy d b instances to r d s params point in time restore params -func (m *DeployDBInstancesToRDSParamsPointInTimeRestoreParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this deploy d b instances to r d s params point in time restore params based on context it is used -func (m *DeployDBInstancesToRDSParamsPointInTimeRestoreParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeployDBInstancesToRDSParamsPointInTimeRestoreParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployDBInstancesToRDSParamsPointInTimeRestoreParams) UnmarshalBinary(b []byte) error { - var res DeployDBInstancesToRDSParamsPointInTimeRestoreParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_fleet_params.go b/v1/models/deploy_fleet_params.go deleted file mode 100644 index 49ce0048..00000000 --- a/v1/models/deploy_fleet_params.go +++ /dev/null @@ -1,109 +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" -) - -// DeployFleetParams Contains Fleet specific params. -// -// swagger:model DeployFleetParams -type DeployFleetParams struct { - - // Contains AWS Fleet specific params. - AwsFleetParams *AWSFleetParams `json:"awsFleetParams,omitempty"` -} - -// Validate validates this deploy fleet params -func (m *DeployFleetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsFleetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployFleetParams) validateAwsFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if m.AwsFleetParams != nil { - if err := m.AwsFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy fleet params based on the context it is used -func (m *DeployFleetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployFleetParams) contextValidateAwsFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetParams != nil { - - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if err := m.AwsFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployFleetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployFleetParams) UnmarshalBinary(b []byte) error { - var res DeployFleetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_task_request.go b/v1/models/deploy_task_request.go deleted file mode 100644 index e7a5a721..00000000 --- a/v1/models/deploy_task_request.go +++ /dev/null @@ -1,203 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeployTaskRequest Deploy Task Request. -// -// Specifies the settings for a Deploy Task that deploys VMs on cloud. -// -// swagger:model DeployTaskRequest -type DeployTaskRequest struct { - - // Specifies the name of the Deploy Task. This field must be set and must be - // a unique name. - // Required: true - Name *string `json:"name"` - - // Specifies a new registered parent Protection Source. If specified - // the selected objects are cloned or recovered to this new Protection - // Source. If not specified, objects are cloned or recovered - // to the original Protection Source that was managing them. - NewParentID *int64 `json:"newParentId,omitempty"` - - // Array of Objects. - // - // Specifies a list of Protection Source objects or Protection Job objects - // (with specified Protection Source objects). - Objects []*RestoreObjectDetails `json:"objects"` - - // Specifies the details about CloudDeploy target where backup snapshots - // may be converted and stored. - Target *CloudDeployTargetDetails `json:"target,omitempty"` -} - -// Validate validates this deploy task request -func (m *DeployTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployTaskRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *DeployTaskRequest) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployTaskRequest) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this deploy task request based on the context it is used -func (m *DeployTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployTaskRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployTaskRequest) 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 -} - -// MarshalBinary interface implementation -func (m *DeployTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployTaskRequest) UnmarshalBinary(b []byte) error { - var res DeployTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_a_w_s_params.go b/v1/models/deploy_v_ms_to_a_w_s_params.go deleted file mode 100644 index 7f3172b6..00000000 --- a/v1/models/deploy_v_ms_to_a_w_s_params.go +++ /dev/null @@ -1,702 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeployVMsToAWSParams Contains AWS specific information needed to identify various resources -// when converting and deploying a VM to AWS. -// -// swagger:model DeployVMsToAWSParams -type DeployVMsToAWSParams struct { - - // This field will be populated for Aurora restores. - // Proto containing the parameters required for restoring RDS Aurora cluster. - AuroraParams *DeployDBInstancesToRDSParams `json:"auroraParams,omitempty"` - - // Custom Tags to be applied to permanent and temporary resources during AWS - // Cloudspin / Convert and Deploy. - CustomTagVec []*CustomTag `json:"customTagVec"` - - // This field defines the encryption params for restore task of type - // kRecoverVMs. For recovery to original location, this will not be set. - EncryptionParams *EncryptionParams `json:"encryptionParams,omitempty"` - - // Type of VM when cloning the VM in AWS as an instance. - InstanceType *EntityProto `json:"instanceType,omitempty"` - - // Optional key-pair (public-private) name that can be used to login to an - // VM instance. In such case, user should have already created a key-pair and - // have a copy of the private key. - KeyPairName *EntityProto `json:"keyPairName,omitempty"` - - // Names of the network security groups within the above VPC. At least - // one entry should be present. - NetworkSecurityGroups []*EntityProto `json:"networkSecurityGroups"` - - // Name of the subnet within the above VPC which will be associated with the - // proxy vm. - ProxyVMSubnet *EntityProto `json:"proxyVmSubnet,omitempty"` - - // Virtual Private Cloud (VPC) in which the proxy vm will be deployed. - ProxyVMVpc *EntityProto `json:"proxyVmVpc,omitempty"` - - // Proto containing the additional parameters required for restoring RDS DB. - // This field will only be populated for RDS restores. - RdsParams *DeployDBInstancesToRDSParams `json:"rdsParams,omitempty"` - - // Name of the AWS region in which to deploy the VM. - Region *EntityProto `json:"region,omitempty"` - - // Name of the optional subnet within the above VPC. - Subnet *EntityProto `json:"subnet,omitempty"` - - // The Virtual Private Cloud (VPC) to choose for the instance. - Vpc *EntityProto `json:"vpc,omitempty"` -} - -// Validate validates this deploy v ms to a w s params -func (m *DeployVMsToAWSParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuroraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomTagVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstanceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyPairName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkSecurityGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyVMSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyVMVpc(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToAWSParams) validateAuroraParams(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraParams) { // not required - return nil - } - - if m.AuroraParams != nil { - if err := m.AuroraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateCustomTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTagVec) { // not required - return nil - } - - for i := 0; i < len(m.CustomTagVec); i++ { - if swag.IsZero(m.CustomTagVec[i]) { // not required - continue - } - - if m.CustomTagVec[i] != nil { - if err := m.CustomTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateEncryptionParams(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if m.EncryptionParams != nil { - if err := m.EncryptionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateInstanceType(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceType) { // not required - return nil - } - - if m.InstanceType != nil { - if err := m.InstanceType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceType") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateKeyPairName(formats strfmt.Registry) error { - if swag.IsZero(m.KeyPairName) { // not required - return nil - } - - if m.KeyPairName != nil { - if err := m.KeyPairName.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyPairName") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyPairName") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateNetworkSecurityGroups(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkSecurityGroups) { // not required - return nil - } - - for i := 0; i < len(m.NetworkSecurityGroups); i++ { - if swag.IsZero(m.NetworkSecurityGroups[i]) { // not required - continue - } - - if m.NetworkSecurityGroups[i] != nil { - if err := m.NetworkSecurityGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateProxyVMSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyVMSubnet) { // not required - return nil - } - - if m.ProxyVMSubnet != nil { - if err := m.ProxyVMSubnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyVmSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyVmSubnet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateProxyVMVpc(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyVMVpc) { // not required - return nil - } - - if m.ProxyVMVpc != nil { - if err := m.ProxyVMVpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyVmVpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyVmVpc") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateRdsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RdsParams) { // not required - return nil - } - - if m.RdsParams != nil { - if err := m.RdsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *DeployVMsToAWSParams) validateVpc(formats strfmt.Registry) error { - if swag.IsZero(m.Vpc) { // not required - return nil - } - - if m.Vpc != nil { - if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to a w s params based on the context it is used -func (m *DeployVMsToAWSParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuroraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEncryptionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstanceType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeyPairName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkSecurityGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyVMSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyVMVpc(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateAuroraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraParams != nil { - - if swag.IsZero(m.AuroraParams) { // not required - return nil - } - - if err := m.AuroraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateCustomTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTagVec); i++ { - - if m.CustomTagVec[i] != nil { - - if swag.IsZero(m.CustomTagVec[i]) { // not required - return nil - } - - if err := m.CustomTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateEncryptionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionParams != nil { - - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if err := m.EncryptionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateInstanceType(ctx context.Context, formats strfmt.Registry) error { - - if m.InstanceType != nil { - - if swag.IsZero(m.InstanceType) { // not required - return nil - } - - if err := m.InstanceType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceType") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateKeyPairName(ctx context.Context, formats strfmt.Registry) error { - - if m.KeyPairName != nil { - - if swag.IsZero(m.KeyPairName) { // not required - return nil - } - - if err := m.KeyPairName.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyPairName") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyPairName") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateNetworkSecurityGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkSecurityGroups); i++ { - - if m.NetworkSecurityGroups[i] != nil { - - if swag.IsZero(m.NetworkSecurityGroups[i]) { // not required - return nil - } - - if err := m.NetworkSecurityGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateProxyVMSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyVMSubnet != nil { - - if swag.IsZero(m.ProxyVMSubnet) { // not required - return nil - } - - if err := m.ProxyVMSubnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyVmSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyVmSubnet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateProxyVMVpc(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyVMVpc != nil { - - if swag.IsZero(m.ProxyVMVpc) { // not required - return nil - } - - if err := m.ProxyVMVpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyVmVpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyVmVpc") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateRdsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsParams != nil { - - if swag.IsZero(m.RdsParams) { // not required - return nil - } - - if err := m.RdsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAWSParams) 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 *DeployVMsToAWSParams) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpc != nil { - - if swag.IsZero(m.Vpc) { // not required - return nil - } - - if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToAWSParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToAWSParams) UnmarshalBinary(b []byte) error { - var res DeployVMsToAWSParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_azure_params.go b/v1/models/deploy_v_ms_to_azure_params.go deleted file mode 100644 index 18e0ccb5..00000000 --- a/v1/models/deploy_v_ms_to_azure_params.go +++ /dev/null @@ -1,1095 +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" -) - -// DeployVMsToAzureParams Contains Azure specific information needed to identify various resources -// when converting and deploying a VM to Azure. -// -// swagger:model DeployVMsToAzureParams -type DeployVMsToAzureParams struct { - - // Name of the Availability set in which the VM is to be restored. - AvailabilitySet *EntityProto `json:"availabilitySet,omitempty"` - - // Managed disk parameter if deployment is using managed disks. - AzureManagedDiskParams *AzureManagedDiskParams `json:"azureManagedDiskParams,omitempty"` - - // Type of VM (e.g. small, medium, large) when cloning the VM in Azure. - ComputeOptions *EntityProto `json:"computeOptions,omitempty"` - - // NOTE:: Not using as of now, we will use it in cloudspin/clone/failover to - // azure. - // Will contain the details of network used in transferring the data from - // source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // Name of the Azure resource group that has the virtual network mentioned - // below. - NetworkResourceGroup *EntityProto `json:"networkResourceGroup,omitempty"` - - // Name of the network security group. It's location should be same as the - // storage account. - NetworkSecurityGroup *EntityProto `json:"networkSecurityGroup,omitempty"` - - // Location of the VM to be recovered. - Region *EntityProto `json:"region,omitempty"` - - // Name of the Azure resource group. Its value is globally unique within - // Azure. - ResourceGroup *EntityProto `json:"resourceGroup,omitempty"` - - // Name of the storage account that will contain the storage container within - // which we will create the blob that will become the VHD disk for the - // cloned VM. - StorageAccount *EntityProto `json:"storageAccount,omitempty"` - - // Name of the storage container within the above storage account. - StorageContainer *EntityProto `json:"storageContainer,omitempty"` - - // The storage key for the above storage account. - StorageKey *EntityProto `json:"storageKey,omitempty"` - - // Name of the Azure resource group that has the storage account mentioned - // below. - StorageResourceGroup *EntityProto `json:"storageResourceGroup,omitempty"` - - // Name of the subnet within the above virtual network. - Subnet *EntityProto `json:"subnet,omitempty"` - - // The subscription for the tenant to deploy the VM to. - Subscription *EntityProto `json:"subscription,omitempty"` - - // Next few fields are for getting additional resources for creating - // temporary resources in Azure to create a temporary VM to convert the - // VM so that the guest VM will be Azure Compatible. The values are optional - // for customer to provide. - // - // Name of the resource group where the temporary VM needs to be created. - TempVMResourceGroup *EntityProto `json:"tempVmResourceGroup,omitempty"` - - // Name of the Storage Account where the temporary VM needs to be created. - TempVMStorageAccount *EntityProto `json:"tempVmStorageAccount,omitempty"` - - // Name of the Storage container where the temporary VM's OS Disk needs to - // be created. - TempVMStorageContainer *EntityProto `json:"tempVmStorageContainer,omitempty"` - - // Name of the Subnet within the temp_vm_virtual_network where the temporary - // vm needs to be created. - TempVMSubnet *EntityProto `json:"tempVmSubnet,omitempty"` - - // Name of the Virtual Network where the temporary VM needs to be created. - TempVMVirtualNetwork *EntityProto `json:"tempVmVirtualNetwork,omitempty"` - - // Name of the Virtual Network. - VirtualNetwork *EntityProto `json:"virtualNetwork,omitempty"` -} - -// Validate validates this deploy v ms to azure params -func (m *DeployVMsToAzureParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAvailabilitySet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureManagedDiskParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateComputeOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkSecurityGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempVMResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempVMStorageAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempVMStorageContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempVMSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTempVMVirtualNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualNetwork(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToAzureParams) validateAvailabilitySet(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilitySet) { // not required - return nil - } - - if m.AvailabilitySet != nil { - if err := m.AvailabilitySet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilitySet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilitySet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateAzureManagedDiskParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureManagedDiskParams) { // not required - return nil - } - - if m.AzureManagedDiskParams != nil { - if err := m.AzureManagedDiskParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureManagedDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureManagedDiskParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateComputeOptions(formats strfmt.Registry) error { - if swag.IsZero(m.ComputeOptions) { // not required - return nil - } - - if m.ComputeOptions != nil { - if err := m.ComputeOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("computeOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("computeOptions") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateNetworkResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkResourceGroup) { // not required - return nil - } - - if m.NetworkResourceGroup != nil { - if err := m.NetworkResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateNetworkSecurityGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkSecurityGroup) { // not required - return nil - } - - if m.NetworkSecurityGroup != nil { - if err := m.NetworkSecurityGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkSecurityGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkSecurityGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceGroup) { // not required - return nil - } - - if m.ResourceGroup != nil { - if err := m.ResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateStorageAccount(formats strfmt.Registry) error { - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if m.StorageAccount != nil { - if err := m.StorageAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if m.StorageContainer != nil { - if err := m.StorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateStorageKey(formats strfmt.Registry) error { - if swag.IsZero(m.StorageKey) { // not required - return nil - } - - if m.StorageKey != nil { - if err := m.StorageKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageKey") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateStorageResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if m.StorageResourceGroup != nil { - if err := m.StorageResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *DeployVMsToAzureParams) validateSubscription(formats strfmt.Registry) error { - if swag.IsZero(m.Subscription) { // not required - return nil - } - - if m.Subscription != nil { - if err := m.Subscription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscription") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateTempVMResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.TempVMResourceGroup) { // not required - return nil - } - - if m.TempVMResourceGroup != nil { - if err := m.TempVMResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateTempVMStorageAccount(formats strfmt.Registry) error { - if swag.IsZero(m.TempVMStorageAccount) { // not required - return nil - } - - if m.TempVMStorageAccount != nil { - if err := m.TempVMStorageAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmStorageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmStorageAccount") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateTempVMStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.TempVMStorageContainer) { // not required - return nil - } - - if m.TempVMStorageContainer != nil { - if err := m.TempVMStorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmStorageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmStorageContainer") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateTempVMSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.TempVMSubnet) { // not required - return nil - } - - if m.TempVMSubnet != nil { - if err := m.TempVMSubnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmSubnet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateTempVMVirtualNetwork(formats strfmt.Registry) error { - if swag.IsZero(m.TempVMVirtualNetwork) { // not required - return nil - } - - if m.TempVMVirtualNetwork != nil { - if err := m.TempVMVirtualNetwork.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmVirtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmVirtualNetwork") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) validateVirtualNetwork(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualNetwork) { // not required - return nil - } - - if m.VirtualNetwork != nil { - if err := m.VirtualNetwork.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualNetwork") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to azure params based on the context it is used -func (m *DeployVMsToAzureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAvailabilitySet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureManagedDiskParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateComputeOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkSecurityGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageKey(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubscription(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempVMResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempVMStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempVMStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempVMSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTempVMVirtualNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateAvailabilitySet(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilitySet != nil { - - if swag.IsZero(m.AvailabilitySet) { // not required - return nil - } - - if err := m.AvailabilitySet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilitySet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilitySet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateAzureManagedDiskParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureManagedDiskParams != nil { - - if swag.IsZero(m.AzureManagedDiskParams) { // not required - return nil - } - - if err := m.AzureManagedDiskParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureManagedDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureManagedDiskParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateComputeOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.ComputeOptions != nil { - - if swag.IsZero(m.ComputeOptions) { // not required - return nil - } - - if err := m.ComputeOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("computeOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("computeOptions") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateNetworkResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkResourceGroup != nil { - - if swag.IsZero(m.NetworkResourceGroup) { // not required - return nil - } - - if err := m.NetworkResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateNetworkSecurityGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkSecurityGroup != nil { - - if swag.IsZero(m.NetworkSecurityGroup) { // not required - return nil - } - - if err := m.NetworkSecurityGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkSecurityGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkSecurityGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceGroup != nil { - - if swag.IsZero(m.ResourceGroup) { // not required - return nil - } - - if err := m.ResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageAccount != nil { - - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if err := m.StorageAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageContainer != nil { - - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if err := m.StorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateStorageKey(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageKey != nil { - - if swag.IsZero(m.StorageKey) { // not required - return nil - } - - if err := m.StorageKey.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageKey") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateStorageResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageResourceGroup != nil { - - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if err := m.StorageResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) 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 *DeployVMsToAzureParams) contextValidateSubscription(ctx context.Context, formats strfmt.Registry) error { - - if m.Subscription != nil { - - if swag.IsZero(m.Subscription) { // not required - return nil - } - - if err := m.Subscription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscription") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateTempVMResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.TempVMResourceGroup != nil { - - if swag.IsZero(m.TempVMResourceGroup) { // not required - return nil - } - - if err := m.TempVMResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmResourceGroup") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateTempVMStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.TempVMStorageAccount != nil { - - if swag.IsZero(m.TempVMStorageAccount) { // not required - return nil - } - - if err := m.TempVMStorageAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmStorageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmStorageAccount") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateTempVMStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.TempVMStorageContainer != nil { - - if swag.IsZero(m.TempVMStorageContainer) { // not required - return nil - } - - if err := m.TempVMStorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmStorageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmStorageContainer") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateTempVMSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.TempVMSubnet != nil { - - if swag.IsZero(m.TempVMSubnet) { // not required - return nil - } - - if err := m.TempVMSubnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmSubnet") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateTempVMVirtualNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.TempVMVirtualNetwork != nil { - - if swag.IsZero(m.TempVMVirtualNetwork) { // not required - return nil - } - - if err := m.TempVMVirtualNetwork.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tempVmVirtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tempVmVirtualNetwork") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToAzureParams) contextValidateVirtualNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualNetwork != nil { - - if swag.IsZero(m.VirtualNetwork) { // not required - return nil - } - - if err := m.VirtualNetwork.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualNetwork") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToAzureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToAzureParams) UnmarshalBinary(b []byte) error { - var res DeployVMsToAzureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_cloud_params.go b/v1/models/deploy_v_ms_to_cloud_params.go deleted file mode 100644 index 59b610e2..00000000 --- a/v1/models/deploy_v_ms_to_cloud_params.go +++ /dev/null @@ -1,365 +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" -) - -// DeployVMsToCloudParams Contains Cloud specific information needed to identify various resources -// when deploying a VM to Cloud. -// -// swagger:model DeployVMsToCloudParams -type DeployVMsToCloudParams struct { - - // deploy fleet params - DeployFleetParams *DeployFleetParams `json:"deployFleetParams,omitempty"` - - // deploy vms to aws params - DeployVmsToAwsParams *DeployVMsToAWSParams `json:"deployVmsToAwsParams,omitempty"` - - // deploy vms to azure params - DeployVmsToAzureParams *DeployVMsToAzureParams `json:"deployVmsToAzureParams,omitempty"` - - // deploy vms to gcp params - DeployVmsToGcpParams *DeployVMsToGCPParams `json:"deployVmsToGcpParams,omitempty"` - - // replicate snapshots to aws params - ReplicateSnapshotsToAwsParams *ReplicateSnapshotsToAWSParams `json:"replicateSnapshotsToAwsParams,omitempty"` - - // replicate snapshots to azure params - ReplicateSnapshotsToAzureParams *ReplicateSnapshotsToAzureParams `json:"replicateSnapshotsToAzureParams,omitempty"` -} - -// Validate validates this deploy v ms to cloud params -func (m *DeployVMsToCloudParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicateSnapshotsToAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicateSnapshotsToAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToCloudParams) validateDeployFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployFleetParams) { // not required - return nil - } - - if m.DeployFleetParams != nil { - if err := m.DeployFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployFleetParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) validateDeployVmsToAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToAwsParams) { // not required - return nil - } - - if m.DeployVmsToAwsParams != nil { - if err := m.DeployVmsToAwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToAwsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToAwsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) validateDeployVmsToAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToAzureParams) { // not required - return nil - } - - if m.DeployVmsToAzureParams != nil { - if err := m.DeployVmsToAzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToAzureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToAzureParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) validateDeployVmsToGcpParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToGcpParams) { // not required - return nil - } - - if m.DeployVmsToGcpParams != nil { - if err := m.DeployVmsToGcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToGcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToGcpParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) validateReplicateSnapshotsToAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicateSnapshotsToAwsParams) { // not required - return nil - } - - if m.ReplicateSnapshotsToAwsParams != nil { - if err := m.ReplicateSnapshotsToAwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicateSnapshotsToAwsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicateSnapshotsToAwsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) validateReplicateSnapshotsToAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicateSnapshotsToAzureParams) { // not required - return nil - } - - if m.ReplicateSnapshotsToAzureParams != nil { - if err := m.ReplicateSnapshotsToAzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicateSnapshotsToAzureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicateSnapshotsToAzureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to cloud params based on the context it is used -func (m *DeployVMsToCloudParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicateSnapshotsToAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicateSnapshotsToAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateDeployFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployFleetParams != nil { - - if swag.IsZero(m.DeployFleetParams) { // not required - return nil - } - - if err := m.DeployFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployFleetParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateDeployVmsToAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToAwsParams != nil { - - if swag.IsZero(m.DeployVmsToAwsParams) { // not required - return nil - } - - if err := m.DeployVmsToAwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToAwsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToAwsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateDeployVmsToAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToAzureParams != nil { - - if swag.IsZero(m.DeployVmsToAzureParams) { // not required - return nil - } - - if err := m.DeployVmsToAzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToAzureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToAzureParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateDeployVmsToGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToGcpParams != nil { - - if swag.IsZero(m.DeployVmsToGcpParams) { // not required - return nil - } - - if err := m.DeployVmsToGcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToGcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToGcpParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateReplicateSnapshotsToAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicateSnapshotsToAwsParams != nil { - - if swag.IsZero(m.ReplicateSnapshotsToAwsParams) { // not required - return nil - } - - if err := m.ReplicateSnapshotsToAwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicateSnapshotsToAwsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicateSnapshotsToAwsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToCloudParams) contextValidateReplicateSnapshotsToAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicateSnapshotsToAzureParams != nil { - - if swag.IsZero(m.ReplicateSnapshotsToAzureParams) { // not required - return nil - } - - if err := m.ReplicateSnapshotsToAzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicateSnapshotsToAzureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicateSnapshotsToAzureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToCloudParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToCloudParams) UnmarshalBinary(b []byte) error { - var res DeployVMsToCloudParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_cloud_task_state_proto.go b/v1/models/deploy_v_ms_to_cloud_task_state_proto.go deleted file mode 100644 index 2b7041a0..00000000 --- a/v1/models/deploy_v_ms_to_cloud_task_state_proto.go +++ /dev/null @@ -1,110 +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" -) - -// DeployVMsToCloudTaskStateProto Persistent state for a convert and deploy VMs to cloud task. -// -// swagger:model DeployVMsToCloudTaskStateProto -type DeployVMsToCloudTaskStateProto struct { - - // This captures all the necessary information required to deploy VMs to - // cloud. - DeployVmsToCloudParams *DeployVMsToCloudParams `json:"deployVmsToCloudParams,omitempty"` -} - -// Validate validates this deploy v ms to cloud task state proto -func (m *DeployVMsToCloudTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToCloudParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToCloudTaskStateProto) validateDeployVmsToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if m.DeployVmsToCloudParams != nil { - if err := m.DeployVmsToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to cloud task state proto based on the context it is used -func (m *DeployVMsToCloudTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToCloudTaskStateProto) contextValidateDeployVmsToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudParams != nil { - - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if err := m.DeployVmsToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToCloudTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToCloudTaskStateProto) UnmarshalBinary(b []byte) error { - var res DeployVMsToCloudTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_g_c_p_params.go b/v1/models/deploy_v_ms_to_g_c_p_params.go deleted file mode 100644 index 2d378f4f..00000000 --- a/v1/models/deploy_v_ms_to_g_c_p_params.go +++ /dev/null @@ -1,264 +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" -) - -// DeployVMsToGCPParams Contains GCP specific information needed to identify various resources -// when converting and deploying a VM to GCP. -// -// swagger:model DeployVMsToGCPParams -type DeployVMsToGCPParams struct { - - // Project id in which to deploy the VM. - ProjectID *EntityProto `json:"projectId,omitempty"` - - // Region in which to deploy the VM. - Region *EntityProto `json:"region,omitempty"` - - // Name of the subnet in which to deploy the VM. The name of the VPC netowrk - // can be obtained from this subnet entity. - Subnet *EntityProto `json:"subnet,omitempty"` - - // Zone in which to deploy the VM. - Zone *EntityProto `json:"zone,omitempty"` -} - -// Validate validates this deploy v ms to g c p params -func (m *DeployVMsToGCPParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateZone(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToGCPParams) validateProjectID(formats strfmt.Registry) error { - if swag.IsZero(m.ProjectID) { // not required - return nil - } - - if m.ProjectID != nil { - if err := m.ProjectID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectId") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToGCPParams) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToGCPParams) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *DeployVMsToGCPParams) validateZone(formats strfmt.Registry) error { - if swag.IsZero(m.Zone) { // not required - return nil - } - - if m.Zone != nil { - if err := m.Zone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zone") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to g c p params based on the context it is used -func (m *DeployVMsToGCPParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProjectID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateZone(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToGCPParams) contextValidateProjectID(ctx context.Context, formats strfmt.Registry) error { - - if m.ProjectID != nil { - - if swag.IsZero(m.ProjectID) { // not required - return nil - } - - if err := m.ProjectID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectId") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToGCPParams) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *DeployVMsToGCPParams) 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 *DeployVMsToGCPParams) contextValidateZone(ctx context.Context, formats strfmt.Registry) error { - - if m.Zone != nil { - - if swag.IsZero(m.Zone) { // not required - return nil - } - - if err := m.Zone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zone") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToGCPParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToGCPParams) UnmarshalBinary(b []byte) error { - var res DeployVMsToGCPParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_v_ms_to_on_prem_params.go b/v1/models/deploy_v_ms_to_on_prem_params.go deleted file mode 100644 index af570b1b..00000000 --- a/v1/models/deploy_v_ms_to_on_prem_params.go +++ /dev/null @@ -1,110 +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" -) - -// DeployVMsToOnPremParams Contains the onprem specific information needed to identify various -// resources when deploying a VM. -// -// swagger:model DeployVMsToOnPremParams -type DeployVMsToOnPremParams struct { - - // Deploy params specific to VMware. - DeployVmsToVmwareParams *RestoreVMwareVMParams `json:"deployVmsToVmwareParams,omitempty"` -} - -// Validate validates this deploy v ms to on prem params -func (m *DeployVMsToOnPremParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToOnPremParams) validateDeployVmsToVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToVmwareParams) { // not required - return nil - } - - if m.DeployVmsToVmwareParams != nil { - if err := m.DeployVmsToVmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToVmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToVmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy v ms to on prem params based on the context it is used -func (m *DeployVMsToOnPremParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVMsToOnPremParams) contextValidateDeployVmsToVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToVmwareParams != nil { - - if swag.IsZero(m.DeployVmsToVmwareParams) { // not required - return nil - } - - if err := m.DeployVmsToVmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToVmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToVmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVMsToOnPremParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVMsToOnPremParams) UnmarshalBinary(b []byte) error { - var res DeployVMsToOnPremParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/deploy_vms_to_cloud.go b/v1/models/deploy_vms_to_cloud.go deleted file mode 100644 index 1829e13f..00000000 --- a/v1/models/deploy_vms_to_cloud.go +++ /dev/null @@ -1,217 +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" -) - -// DeployVmsToCloud DeployVmsToCloud Parameters. -// -// Specifies the details about deploying vms to specific clouds where backup -// may be stored and converted. -// -// swagger:model DeployVmsToCloud -type DeployVmsToCloud struct { - - // Contains information needed to identify various resources when deploying - // VMs to Cloud. - // - // Specifies various resources when converting and deploying a VM to AWS. - AwsParams *AwsParams `json:"awsParams,omitempty"` - - // Specifies various resources when converting and deploying a VM to Azure. - AzureParams *AzureParams `json:"azureParams,omitempty"` - - // Specifies various resources when deploying vms to fleet instances. - FleetParams *FleetParams `json:"fleetParams,omitempty"` -} - -// Validate validates this deploy vms to cloud -func (m *DeployVmsToCloud) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVmsToCloud) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVmsToCloud) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *DeployVmsToCloud) validateFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FleetParams) { // not required - return nil - } - - if m.FleetParams != nil { - if err := m.FleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deploy vms to cloud based on the context it is used -func (m *DeployVmsToCloud) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeployVmsToCloud) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *DeployVmsToCloud) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *DeployVmsToCloud) contextValidateFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FleetParams != nil { - - if swag.IsZero(m.FleetParams) { // not required - return nil - } - - if err := m.FleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeployVmsToCloud) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeployVmsToCloud) UnmarshalBinary(b []byte) error { - var res DeployVmsToCloud - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_clone_app_task_info_proto.go b/v1/models/destroy_clone_app_task_info_proto.go deleted file mode 100644 index 7e2b0db3..00000000 --- a/v1/models/destroy_clone_app_task_info_proto.go +++ /dev/null @@ -1,240 +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" -) - -// DestroyCloneAppTaskInfoProto Message that captures the destroy clone application task state. -// Application specific destroy clone infos are defined as extensions to this -// proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// DestroyCloneAppTaskInfoProto extension -// Location -// Extension -// ============================================================================= -// sql::DestroyCloneTaskInfo::sql_destroy_clone_app_task_info -// sql/sql.proto -// 100 -// oracle::DestroyCloneTaskInfo::oracle_destroy_clone_app_task_info -// oracle/oracle.proto -// 101 -// ad::DestroyTaskInfo::ad_destroy_app_task_info -// ad/ad.proto -// 102 -// exchange::DestroyTaskInfo::exchange_destroy_app_task_info -// exchange/exchange.proto -// 103 -// ============================================================================= -// -// swagger:model DestroyCloneAppTaskInfoProto -type DestroyCloneAppTaskInfoProto struct { - - // The application environment. - AppEnv *int32 `json:"appEnv,omitempty"` - - // If an error is encountered during destroy it is set here. - Error *ErrorProto `json:"error,omitempty"` - - // This will be set to true if the task is complete on the slave. - Finished *bool `json:"finished,omitempty"` - - // The target entity on which the application was cloned. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // Credentials if any needed to log into the target entity. - TargetEntityCredentials *Credentials `json:"targetEntityCredentials,omitempty"` -} - -// Validate validates this destroy clone app task info proto -func (m *DestroyCloneAppTaskInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntityCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyCloneAppTaskInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *DestroyCloneAppTaskInfoProto) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyCloneAppTaskInfoProto) validateTargetEntityCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if m.TargetEntityCredentials != nil { - if err := m.TargetEntityCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this destroy clone app task info proto based on the context it is used -func (m *DestroyCloneAppTaskInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntityCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyCloneAppTaskInfoProto) 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 -} - -func (m *DestroyCloneAppTaskInfoProto) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyCloneAppTaskInfoProto) contextValidateTargetEntityCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntityCredentials != nil { - - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if err := m.TargetEntityCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DestroyCloneAppTaskInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyCloneAppTaskInfoProto) UnmarshalBinary(b []byte) error { - var res DestroyCloneAppTaskInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_cloned_entity_info_proto.go b/v1/models/destroy_cloned_entity_info_proto.go deleted file mode 100644 index 5b5a68cf..00000000 --- a/v1/models/destroy_cloned_entity_info_proto.go +++ /dev/null @@ -1,188 +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" -) - -// DestroyClonedEntityInfoProto Message that encapsulates information about a cloned entity that needs to be -// destroyed. Environment specific information are defined as extensions to -// this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// DestroyClonedEntityInfoProto.ClonedEntity extension Location Extension -// ============================================================================= -// azure::ClonedEntityInfo::azure_cloned_entity_info azure/azure.proto 100 -// aws::ClonedEntityInfo::aws_cloned_entity_info aws/aws.proto 101 -// ============================================================================= -// -// swagger:model DestroyClonedEntityInfoProto -type DestroyClonedEntityInfoProto struct { - - // The following field is set by the master in order for slave to identify - // the entities that need to be destroyed. - ClonedEntity *DestroyClonedEntityInfoProtoClonedEntity `json:"clonedEntity,omitempty"` - - // cloned entity status - ClonedEntityStatus *int32 `json:"clonedEntityStatus,omitempty"` - - // The state of the destroy/teardown of a cloned entity (i.e, VM). - // - // The following two fields are set by the slave in order for the master to - // find status of the destroy operation. - DestroyClonedEntityState *int32 `json:"destroyClonedEntityState,omitempty"` - - // If the destruction of this entity failed, this field will contain the - // cause of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // The full external view name where cloned objects are placed. - FullViewName *string `json:"fullViewName,omitempty"` - - // The type of environment this destroy cloned entity info pertains to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this destroy cloned entity info proto -func (m *DestroyClonedEntityInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClonedEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedEntityInfoProto) validateClonedEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ClonedEntity) { // not required - return nil - } - - if m.ClonedEntity != nil { - if err := m.ClonedEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clonedEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clonedEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedEntityInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this destroy cloned entity info proto based on the context it is used -func (m *DestroyClonedEntityInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClonedEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedEntityInfoProto) contextValidateClonedEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ClonedEntity != nil { - - if swag.IsZero(m.ClonedEntity) { // not required - return nil - } - - if err := m.ClonedEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clonedEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clonedEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedEntityInfoProto) 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 -} - -// MarshalBinary interface implementation -func (m *DestroyClonedEntityInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyClonedEntityInfoProto) UnmarshalBinary(b []byte) error { - var res DestroyClonedEntityInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_cloned_entity_info_proto_cloned_entity.go b/v1/models/destroy_cloned_entity_info_proto_cloned_entity.go deleted file mode 100644 index bd0d347b..00000000 --- a/v1/models/destroy_cloned_entity_info_proto_cloned_entity.go +++ /dev/null @@ -1,116 +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" -) - -// DestroyClonedEntityInfoProtoClonedEntity destroy cloned entity info proto cloned entity -// -// swagger:model DestroyClonedEntityInfoProto_ClonedEntity -type DestroyClonedEntityInfoProtoClonedEntity struct { - - // Proto of the entity created by the clone operation. This field might be - // empty if the clone operation failed. If so, destroy task will make the - // best effort to cleanup this failed cloned entity (i.e, delete the files - // referred by 'relative_restore_path_vec' from the view). - Entity *EntityProto `json:"entity,omitempty"` - - // Path of all files created by the clone operation. Each path is relative - // to the clone view. - RelativeRestorePathVec []string `json:"relativeRestorePathVec"` -} - -// Validate validates this destroy cloned entity info proto cloned entity -func (m *DestroyClonedEntityInfoProtoClonedEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedEntityInfoProtoClonedEntity) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this destroy cloned entity info proto cloned entity based on the context it is used -func (m *DestroyClonedEntityInfoProtoClonedEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedEntityInfoProtoClonedEntity) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DestroyClonedEntityInfoProtoClonedEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyClonedEntityInfoProtoClonedEntity) UnmarshalBinary(b []byte) error { - var res DestroyClonedEntityInfoProtoClonedEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_cloned_task_state_proto.go b/v1/models/destroy_cloned_task_state_proto.go deleted file mode 100644 index d9c15879..00000000 --- a/v1/models/destroy_cloned_task_state_proto.go +++ /dev/null @@ -1,642 +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" -) - -// DestroyClonedTaskStateProto destroy cloned task state proto -// -// swagger:model DestroyClonedTaskStateProto -type DestroyClonedTaskStateProto struct { - - // Denotes the target for action executor(Bridge/Bridge_Proxy) on which task - // on slave should execute actions. - ActionExecutorTargetType *int32 `json:"actionExecutorTargetType,omitempty"` - - // The name of the clone task. - CloneTaskName *string `json:"cloneTaskName,omitempty"` - - // The EntityProto of the datastore that corresponds to the above - // 'view_name'. This field will be empty if no datastore is associated with - // the clone view. - DatastoreEntity *EntityProto `json:"datastoreEntity,omitempty"` - - // The following field is only relevant for a destroy for task of type - // kConvertAndDeployVMs. - // - // Master populates information regarding deploy vm to cloud task state. This - // is needed during restore task of type kConvertAndDeployVMs. We use it - // during destroy clone to delete VMs, network entities and storage blobs. - DeployVmsToCloudTaskState *DeployVMsToCloudTaskStateProto `json:"deployVmsToCloudTaskState,omitempty"` - - // Master populates the information about the destroy clone application task. - // Slave populates the progress and status of the task. - DestroyCloneAppTaskInfo *DestroyCloneAppTaskInfoProto `json:"destroyCloneAppTaskInfo,omitempty"` - - // Master populates the information about the destroy clone task. Slave - // populates the progress and status of the task. - DestroyCloneVMTaskInfo *DestroyClonedVMTaskInfoProto `json:"destroyCloneVmTaskInfo,omitempty"` - - // Master populates the information about the destroy mount volumes task, - // Slave populate the progress and status of the task. - DestroyMountVolumesTaskInfo *DestroyMountVolumesTaskInfoProto `json:"destroyMountVolumesTaskInfo,omitempty"` - - // If the destroy clone task has finished, this field contains the end time - // of the task. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered by task (if any). Only valid if the task has - // finished. - Error *ErrorProto `json:"error,omitempty"` - - // A folder entity where the cloned objects are placed. This folder will - // be deleted after all cloned entity are destroyed. - FolderEntity *EntityProto `json:"folderEntity,omitempty"` - - // flag used to perform force delete, ignore error on delete steps - ForceDelete *bool `json:"forceDelete,omitempty"` - - // The full external view name where cloned objects are placed. - FullViewName *string `json:"fullViewName,omitempty"` - - // A way to connect to the parent source. We do not use the connection param - // info of the corresponding clone task as it might have changed. - // - // Note: In case of kConvertAndDeployVMs to Azure, we need the original - // ConnectorParams of the corresponding deploy to Azure task (i.e. original - // Azure subscription id). - ParentSourceConnectionParams *ConnectorParams `json:"parentSourceConnectionParams,omitempty"` - - // The id of the task that triggered the destroy task. - // This will be used by refresh task to mark the destroy task as internal - // sub-task. - ParentTaskID *int64 `json:"parentTaskId,omitempty"` - - // The unique id of the task that performed the clone operation. - PerformCloneTaskID *int64 `json:"performCloneTaskId,omitempty"` - - // The type of the restore/clone operation that is being destroyed. - RestoreType *int32 `json:"restoreType,omitempty"` - - // Constituent id (and the gandalf session id) where this task has been - // scheduled. If -1, the task is not running at any slave. It's possible - // that the task was previously scheduled, but is now being re-scheduled. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // scheduled gandalf session Id - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // The start time of this destroy clone task. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Status of the destroy clone task. - Status *int32 `json:"status,omitempty"` - - // A globally unique id of this destroy clone task. - TaskID *int64 `json:"taskId,omitempty"` - - // The type of environment that is being operated on. - Type *int32 `json:"type,omitempty"` - - // The user who requested this destroy clone task. - User *string `json:"user,omitempty"` - - // Specifies information about the user who made the request. - UserInfo *UserInformation `json:"userInfo,omitempty"` - - // VCD config for the restored object. - VcdConfig *RestoredObjectVCDConfigProto `json:"vcdConfig,omitempty"` - - // The view box id to which 'view_name' belongs to. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // The view name as provided by the user for the clone operation. - ViewNameDEPRECATED *string `json:"viewName_DEPRECATED,omitempty"` -} - -// Validate validates this destroy cloned task state proto -func (m *DestroyClonedTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloudTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestroyCloneAppTaskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestroyCloneVMTaskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestroyMountVolumesTaskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFolderEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSourceConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedTaskStateProto) validateDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if m.DatastoreEntity != nil { - if err := m.DatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateDeployVmsToCloudTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if m.DeployVmsToCloudTaskState != nil { - if err := m.DeployVmsToCloudTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateDestroyCloneAppTaskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DestroyCloneAppTaskInfo) { // not required - return nil - } - - if m.DestroyCloneAppTaskInfo != nil { - if err := m.DestroyCloneAppTaskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyCloneAppTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyCloneAppTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateDestroyCloneVMTaskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DestroyCloneVMTaskInfo) { // not required - return nil - } - - if m.DestroyCloneVMTaskInfo != nil { - if err := m.DestroyCloneVMTaskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyCloneVmTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyCloneVmTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateDestroyMountVolumesTaskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DestroyMountVolumesTaskInfo) { // not required - return nil - } - - if m.DestroyMountVolumesTaskInfo != nil { - if err := m.DestroyMountVolumesTaskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyMountVolumesTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyMountVolumesTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *DestroyClonedTaskStateProto) validateFolderEntity(formats strfmt.Registry) error { - if swag.IsZero(m.FolderEntity) { // not required - return nil - } - - if m.FolderEntity != nil { - if err := m.FolderEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateParentSourceConnectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if m.ParentSourceConnectionParams != nil { - if err := m.ParentSourceConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) validateVcdConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if m.VcdConfig != nil { - if err := m.VcdConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this destroy cloned task state proto based on the context it is used -func (m *DestroyClonedTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloudTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDestroyCloneAppTaskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDestroyCloneVMTaskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDestroyMountVolumesTaskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFolderEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreEntity != nil { - - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if err := m.DatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateDeployVmsToCloudTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudTaskState != nil { - - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if err := m.DeployVmsToCloudTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateDestroyCloneAppTaskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DestroyCloneAppTaskInfo != nil { - - if swag.IsZero(m.DestroyCloneAppTaskInfo) { // not required - return nil - } - - if err := m.DestroyCloneAppTaskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyCloneAppTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyCloneAppTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateDestroyCloneVMTaskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DestroyCloneVMTaskInfo != nil { - - if swag.IsZero(m.DestroyCloneVMTaskInfo) { // not required - return nil - } - - if err := m.DestroyCloneVMTaskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyCloneVmTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyCloneVmTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateDestroyMountVolumesTaskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DestroyMountVolumesTaskInfo != nil { - - if swag.IsZero(m.DestroyMountVolumesTaskInfo) { // not required - return nil - } - - if err := m.DestroyMountVolumesTaskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyMountVolumesTaskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyMountVolumesTaskInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) 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 -} - -func (m *DestroyClonedTaskStateProto) contextValidateFolderEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.FolderEntity != nil { - - if swag.IsZero(m.FolderEntity) { // not required - return nil - } - - if err := m.FolderEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateParentSourceConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSourceConnectionParams != nil { - - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if err := m.ParentSourceConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *DestroyClonedTaskStateProto) contextValidateVcdConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfig != nil { - - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if err := m.VcdConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DestroyClonedTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyClonedTaskStateProto) UnmarshalBinary(b []byte) error { - var res DestroyClonedTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_cloned_vm_task_info_proto.go b/v1/models/destroy_cloned_vm_task_info_proto.go deleted file mode 100644 index c8c541e4..00000000 --- a/v1/models/destroy_cloned_vm_task_info_proto.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DestroyClonedVMTaskInfoProto Message that encapsulates information about the destroy clone task for any -// environment we support. Environment specific information are defined as -// extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// DestroyClonedVMTaskInfoProto extension Location Extension -// ============================================================================= -// vmware::DestroyClonedTaskInfo:: -// vmware_destroy_cloned_vm_task_info vmware/vmware.proto 100 -// hyperv::DestroyClonedTaskInfo:: -// hyperv_destroy_cloned_vm_task_info hyperv/hyperv.proto 101 -// ============================================================================= -// -// swagger:model DestroyClonedVMTaskInfoProto -type DestroyClonedVMTaskInfoProto struct { - - // If datastore was not unmounted, this field contains the reason for the - // same. - DatastoreNotUnmountedReason *string `json:"datastoreNotUnmountedReason,omitempty"` - - // Whether the datastore corresponding to the clone view was unmounted from - // primary environment. - DatastoreUnmounted *bool `json:"datastoreUnmounted,omitempty"` - - // Vector of all cloned entities that this destroy task will teardown. - DestroyClonedEntityInfoVec []*DestroyClonedEntityInfoProto `json:"destroyClonedEntityInfoVec"` - - // The type of environment this destroy clone task info pertains to. - Type *int32 `json:"type,omitempty"` - - // Whether the clone view was deleted by the destroy task. - ViewDeleted *bool `json:"viewDeleted,omitempty"` -} - -// Validate validates this destroy cloned VM task info proto -func (m *DestroyClonedVMTaskInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDestroyClonedEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedVMTaskInfoProto) validateDestroyClonedEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DestroyClonedEntityInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DestroyClonedEntityInfoVec); i++ { - if swag.IsZero(m.DestroyClonedEntityInfoVec[i]) { // not required - continue - } - - if m.DestroyClonedEntityInfoVec[i] != nil { - if err := m.DestroyClonedEntityInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyClonedEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyClonedEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this destroy cloned VM task info proto based on the context it is used -func (m *DestroyClonedVMTaskInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestroyClonedEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyClonedVMTaskInfoProto) contextValidateDestroyClonedEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DestroyClonedEntityInfoVec); i++ { - - if m.DestroyClonedEntityInfoVec[i] != nil { - - if swag.IsZero(m.DestroyClonedEntityInfoVec[i]) { // not required - return nil - } - - if err := m.DestroyClonedEntityInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyClonedEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyClonedEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DestroyClonedVMTaskInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyClonedVMTaskInfoProto) UnmarshalBinary(b []byte) error { - var res DestroyClonedVMTaskInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/destroy_mount_volumes_task_info_proto.go b/v1/models/destroy_mount_volumes_task_info_proto.go deleted file mode 100644 index 54d7da60..00000000 --- a/v1/models/destroy_mount_volumes_task_info_proto.go +++ /dev/null @@ -1,283 +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" -) - -// DestroyMountVolumesTaskInfoProto Message that captures the destroy mount volumes task state. -// -// swagger:model DestroyMountVolumesTaskInfoProto -type DestroyMountVolumesTaskInfoProto struct { - - // If an error is encountered during destroy it is set here. - Error *ErrorProto `json:"error,omitempty"` - - // This will be set to true if the task is complete on the slave. - Finished *bool `json:"finished,omitempty"` - - // This is the host name of the ESXi host. It is used if - // magneto_vmware_use_fqdn_for_guest_file_operations is set. - HostName *string `json:"hostName,omitempty"` - - // This contains the mount volumes info proto and the associated setup - // restore disks state. This starts out with contents from the original mount - // volumes info task, but later gets mutated by slave to contain destroy - // related information. - MountVolumesInfoProto *MountVolumesInfoProto `json:"mountVolumesInfoProto,omitempty"` - - // This is the timestamp at which the slave task started. - SlaveTaskStartTimeUsecs *int64 `json:"slaveTaskStartTimeUsecs,omitempty"` - - // The target entity on which the mount volumes operation was performed. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // This will be set to true in two cases: - // 1. If persistent agent was used for IVM. - // 2. If user chose ephemeral agent during IVM but the host already had - // persistent agent installed. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Environment specific additional params if any. - // This is populated for VMware environments and used to determine whether to - // cleanup restore mountpoints within a VM. - VmwareParams *MountVolumesVMwareParams `json:"vmwareParams,omitempty"` -} - -// Validate validates this destroy mount volumes task info proto -func (m *DestroyMountVolumesTaskInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumesInfoProto(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *DestroyMountVolumesTaskInfoProto) validateMountVolumesInfoProto(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumesInfoProto) { // not required - return nil - } - - if m.MountVolumesInfoProto != nil { - if err := m.MountVolumesInfoProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesInfoProto") - } - return err - } - } - - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this destroy mount volumes task info proto based on the context it is used -func (m *DestroyMountVolumesTaskInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumesInfoProto(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) 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 -} - -func (m *DestroyMountVolumesTaskInfoProto) contextValidateMountVolumesInfoProto(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumesInfoProto != nil { - - if swag.IsZero(m.MountVolumesInfoProto) { // not required - return nil - } - - if err := m.MountVolumesInfoProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesInfoProto") - } - return err - } - } - - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *DestroyMountVolumesTaskInfoProto) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DestroyMountVolumesTaskInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DestroyMountVolumesTaskInfoProto) UnmarshalBinary(b []byte) error { - var res DestroyMountVolumesTaskInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/device_node.go b/v1/models/device_node.go deleted file mode 100644 index ba6d6114..00000000 --- a/v1/models/device_node.go +++ /dev/null @@ -1,168 +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" -) - -// DeviceNode Device Node. -// -// Specifies the list of devices that need to be combined to form the -// storage space. -// Only one of the fields is populated with a device node. -// If the device node is a leaf node, leafNode is populated with details -// about the partition blocks in the file. -// If the device node is an intermediate node, intermediateNode is -// populated with a device sub-tree. -// -// swagger:model DeviceNode -type DeviceNode struct { - - // Specifies an intermediate node of the logical device tree. - IntermediateNode *DeviceTreeDetails `json:"intermediateNode,omitempty"` - - // Specifies the leaf node of the device tree. - LeafNode *FilePartitionBlock `json:"leafNode,omitempty"` -} - -// Validate validates this device node -func (m *DeviceNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIntermediateNode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLeafNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceNode) validateIntermediateNode(formats strfmt.Registry) error { - if swag.IsZero(m.IntermediateNode) { // not required - return nil - } - - if m.IntermediateNode != nil { - if err := m.IntermediateNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intermediateNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intermediateNode") - } - return err - } - } - - return nil -} - -func (m *DeviceNode) validateLeafNode(formats strfmt.Registry) error { - if swag.IsZero(m.LeafNode) { // not required - return nil - } - - if m.LeafNode != nil { - if err := m.LeafNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leafNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leafNode") - } - return err - } - } - - return nil -} - -// ContextValidate validate this device node based on the context it is used -func (m *DeviceNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIntermediateNode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLeafNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceNode) contextValidateIntermediateNode(ctx context.Context, formats strfmt.Registry) error { - - if m.IntermediateNode != nil { - - if swag.IsZero(m.IntermediateNode) { // not required - return nil - } - - if err := m.IntermediateNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intermediateNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intermediateNode") - } - return err - } - } - - return nil -} - -func (m *DeviceNode) contextValidateLeafNode(ctx context.Context, formats strfmt.Registry) error { - - if m.LeafNode != nil { - - if swag.IsZero(m.LeafNode) { // not required - return nil - } - - if err := m.LeafNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leafNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leafNode") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceNode) UnmarshalBinary(b []byte) error { - var res DeviceNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/device_tree.go b/v1/models/device_tree.go deleted file mode 100644 index 029433ef..00000000 --- a/v1/models/device_tree.go +++ /dev/null @@ -1,146 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeviceTree A logical volume is built on a tree where leaves are the slices of -// partitions (PartitionSlice) defined below and intermediate nodes are -// assembled by combining nodes in some mode (linear layout, striped, mirrored, -// RAID etc). -// A DeviceTree is a block device formed by combining one or more Devices -// using a combining strategy. -// -// swagger:model DeviceTree -type DeviceTree struct { - - // child vec - ChildVec []*DeviceTreeChildDevice `json:"childVec"` - - // Internal device identifier of the device to be activated as a thin volume. - DeviceID *int64 `json:"deviceId,omitempty"` - - // The length of this device. This should match the length which is - // computable based on children and combining strategy. - // - // e.g. if there is only one partition slice in an LVM volume, 'length' in - // the partition slice is equal to 'device_length'. - DeviceLength *int64 `json:"deviceLength,omitempty"` - - // In case data is striped, this represents the length of the stripe. - // The number of stripes is defined by the size of child_vec above. - StripeSize *int32 `json:"stripeSize,omitempty"` - - // Chunk size. Only populated if device type is thin pool. - ThinPoolChunkSize *int64 `json:"thinPoolChunkSize,omitempty"` - - // How to combine the children. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this device tree -func (m *DeviceTree) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChildVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTree) validateChildVec(formats strfmt.Registry) error { - if swag.IsZero(m.ChildVec) { // not required - return nil - } - - for i := 0; i < len(m.ChildVec); i++ { - if swag.IsZero(m.ChildVec[i]) { // not required - continue - } - - if m.ChildVec[i] != nil { - if err := m.ChildVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this device tree based on the context it is used -func (m *DeviceTree) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChildVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTree) contextValidateChildVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildVec); i++ { - - if m.ChildVec[i] != nil { - - if swag.IsZero(m.ChildVec[i]) { // not required - return nil - } - - if err := m.ChildVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTree) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTree) UnmarshalBinary(b []byte) error { - var res DeviceTree - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/device_tree_child_device.go b/v1/models/device_tree_child_device.go deleted file mode 100644 index 9e4cfb20..00000000 --- a/v1/models/device_tree_child_device.go +++ /dev/null @@ -1,163 +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" -) - -// DeviceTreeChildDevice The list of devices that need to be combined. -// -// swagger:model DeviceTree_ChildDevice -type DeviceTreeChildDevice struct { - - // Recursion: This device is defined recursively. - Device *DeviceTree `json:"device,omitempty"` - - // This specifies how the parent device is using this child device. - DeviceType *int32 `json:"deviceType,omitempty"` - - // Base case: this is a partition slice. - PartitionSlice *DeviceTreePartitionSlice `json:"partitionSlice,omitempty"` -} - -// Validate validates this device tree child device -func (m *DeviceTreeChildDevice) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDevice(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePartitionSlice(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeChildDevice) validateDevice(formats strfmt.Registry) error { - if swag.IsZero(m.Device) { // not required - return nil - } - - if m.Device != nil { - if err := m.Device.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("device") - } - return err - } - } - - return nil -} - -func (m *DeviceTreeChildDevice) validatePartitionSlice(formats strfmt.Registry) error { - if swag.IsZero(m.PartitionSlice) { // not required - return nil - } - - if m.PartitionSlice != nil { - if err := m.PartitionSlice.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("partitionSlice") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("partitionSlice") - } - return err - } - } - - return nil -} - -// ContextValidate validate this device tree child device based on the context it is used -func (m *DeviceTreeChildDevice) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDevice(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePartitionSlice(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeChildDevice) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { - - if m.Device != nil { - - if swag.IsZero(m.Device) { // not required - return nil - } - - if err := m.Device.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("device") - } - return err - } - } - - return nil -} - -func (m *DeviceTreeChildDevice) contextValidatePartitionSlice(ctx context.Context, formats strfmt.Registry) error { - - if m.PartitionSlice != nil { - - if swag.IsZero(m.PartitionSlice) { // not required - return nil - } - - if err := m.PartitionSlice.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("partitionSlice") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("partitionSlice") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreeChildDevice) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreeChildDevice) UnmarshalBinary(b []byte) error { - var res DeviceTreeChildDevice - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/device_tree_details.go b/v1/models/device_tree_details.go deleted file mode 100644 index bcce32ae..00000000 --- a/v1/models/device_tree_details.go +++ /dev/null @@ -1,228 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeviceTreeDetails Device Tree. -// -// Specifies a logical volume stored as a tree where the leaves are -// the blocks of partitions and intermediate nodes are assembled by combining -// nodes using one of the following modes: linear layout, striped, -// mirrored, RAID etc. -// A deviceTree is a block device formed by combining one or more Devices -// using a combining strategy. -// -// swagger:model DeviceTreeDetails -type DeviceTreeDetails struct { - - // Specifies how to combine the children of this node. - // The combining strategy for child devices. Some of these strategies imply - // constraint on the number of child devices. e.g. RAID5 will have 5 - // children. - // 'LINEAR' indicates children are juxtaposed to form this device. - // 'STRIPE' indicates children are striped. - // 'MIRROR' indicates children are mirrored. - // 'RAID5' - // 'RAID6' - // 'ZERO' - // 'THIN' - // 'THINPOOL' - // 'SNAPSHOT' - // 'CACHE' - // 'CACHEPOOL' - // Enum: ["LINEAR","STRIPE","MIRROR","RAID5","RAID6","ZERO","THIN","THINPOOL","SNAPSHOT","CACHE","CACHEPOOL"] - CombineMethod *string `json:"combineMethod,omitempty"` - - // Specifies the length of this device. This number should match the - // length that is calculated from the children and combining method. - DeviceLength *int64 `json:"deviceLength,omitempty"` - - // Specifies the children of this node in the device tree. - DeviceNodes []*DeviceNode `json:"deviceNodes"` - - // Specifies the size of the striped data if the data is striped. - StripeSize *int32 `json:"stripeSize,omitempty"` -} - -// Validate validates this device tree details -func (m *DeviceTreeDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCombineMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeviceNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var deviceTreeDetailsTypeCombineMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LINEAR","STRIPE","MIRROR","RAID5","RAID6","ZERO","THIN","THINPOOL","SNAPSHOT","CACHE","CACHEPOOL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - deviceTreeDetailsTypeCombineMethodPropEnum = append(deviceTreeDetailsTypeCombineMethodPropEnum, v) - } -} - -const ( - - // DeviceTreeDetailsCombineMethodLINEAR captures enum value "LINEAR" - DeviceTreeDetailsCombineMethodLINEAR string = "LINEAR" - - // DeviceTreeDetailsCombineMethodSTRIPE captures enum value "STRIPE" - DeviceTreeDetailsCombineMethodSTRIPE string = "STRIPE" - - // DeviceTreeDetailsCombineMethodMIRROR captures enum value "MIRROR" - DeviceTreeDetailsCombineMethodMIRROR string = "MIRROR" - - // DeviceTreeDetailsCombineMethodRAID5 captures enum value "RAID5" - DeviceTreeDetailsCombineMethodRAID5 string = "RAID5" - - // DeviceTreeDetailsCombineMethodRAID6 captures enum value "RAID6" - DeviceTreeDetailsCombineMethodRAID6 string = "RAID6" - - // DeviceTreeDetailsCombineMethodZERO captures enum value "ZERO" - DeviceTreeDetailsCombineMethodZERO string = "ZERO" - - // DeviceTreeDetailsCombineMethodTHIN captures enum value "THIN" - DeviceTreeDetailsCombineMethodTHIN string = "THIN" - - // DeviceTreeDetailsCombineMethodTHINPOOL captures enum value "THINPOOL" - DeviceTreeDetailsCombineMethodTHINPOOL string = "THINPOOL" - - // DeviceTreeDetailsCombineMethodSNAPSHOT captures enum value "SNAPSHOT" - DeviceTreeDetailsCombineMethodSNAPSHOT string = "SNAPSHOT" - - // DeviceTreeDetailsCombineMethodCACHE captures enum value "CACHE" - DeviceTreeDetailsCombineMethodCACHE string = "CACHE" - - // DeviceTreeDetailsCombineMethodCACHEPOOL captures enum value "CACHEPOOL" - DeviceTreeDetailsCombineMethodCACHEPOOL string = "CACHEPOOL" -) - -// prop value enum -func (m *DeviceTreeDetails) validateCombineMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, deviceTreeDetailsTypeCombineMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DeviceTreeDetails) validateCombineMethod(formats strfmt.Registry) error { - if swag.IsZero(m.CombineMethod) { // not required - return nil - } - - // value enum - if err := m.validateCombineMethodEnum("combineMethod", "body", *m.CombineMethod); err != nil { - return err - } - - return nil -} - -func (m *DeviceTreeDetails) validateDeviceNodes(formats strfmt.Registry) error { - if swag.IsZero(m.DeviceNodes) { // not required - return nil - } - - for i := 0; i < len(m.DeviceNodes); i++ { - if swag.IsZero(m.DeviceNodes[i]) { // not required - continue - } - - if m.DeviceNodes[i] != nil { - if err := m.DeviceNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this device tree details based on the context it is used -func (m *DeviceTreeDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeviceNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeDetails) contextValidateDeviceNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeviceNodes); i++ { - - if m.DeviceNodes[i] != nil { - - if swag.IsZero(m.DeviceNodes[i]) { // not required - return nil - } - - if err := m.DeviceNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreeDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreeDetails) UnmarshalBinary(b []byte) error { - var res DeviceTreeDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/device_tree_partition_slice.go b/v1/models/device_tree_partition_slice.go deleted file mode 100644 index a5530534..00000000 --- a/v1/models/device_tree_partition_slice.go +++ /dev/null @@ -1,71 +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" -) - -// DeviceTreePartitionSlice This defines the leaf of the device tree mentioned above. -// -// swagger:model DeviceTree_PartitionSlice -type DeviceTreePartitionSlice struct { - - // The disk to use. - DiskFileName *string `json:"diskFileName,omitempty"` - - // The length of data for the LVM volume (for which this device tree is - // being built) in bytes. It does not include size of the LVM meta data. - Length *int64 `json:"length,omitempty"` - - // Each LVM partition starts with LVM meta data. After the meta data there - // can be data for one or more LVM volumes. - // - // This field indicates the offset in bytes (relative to partition) where - // data for various LVM volumes starts on the partition. - // NOTE: If this device tree represents first LVM volume on the partition, - // 'lvm_data_offset' is equal to 'offset'. - LvmDataOffset *int64 `json:"lvmDataOffset,omitempty"` - - // This is the offset (in bytes) where data for the LVM volume (for which - // this device tree is being build) starts relative to the start of the - // partition above. - Offset *int64 `json:"offset,omitempty"` - - // The partition to use in the disk above. - PartitionNumber *int32 `json:"partitionNumber,omitempty"` -} - -// Validate validates this device tree partition slice -func (m *DeviceTreePartitionSlice) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this device tree partition slice based on context it is used -func (m *DeviceTreePartitionSlice) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreePartitionSlice) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreePartitionSlice) UnmarshalBinary(b []byte) error { - var res DeviceTreePartitionSlice - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dir_entry.go b/v1/models/dir_entry.go deleted file mode 100644 index 5c06b9c5..00000000 --- a/v1/models/dir_entry.go +++ /dev/null @@ -1,119 +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" -) - -// DirEntry DirEntry is the struct to represent a file or a folder. -// -// swagger:model DirEntry -type DirEntry struct { - - // FstatInfo is the stat information for the file. - FstatInfo *FileStatInfo `json:"fstatInfo,omitempty"` - - // FullPath is the full path of the file/directory. - FullPath *string `json:"fullPath,omitempty"` - - // Name is the name of the file or folder. For /test/file.txt, name will be - // file.txt. - Name *string `json:"name,omitempty"` - - // DirEntryType is the type of entry i.e. file/folder. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this dir entry -func (m *DirEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFstatInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirEntry) validateFstatInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if m.FstatInfo != nil { - if err := m.FstatInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this dir entry based on the context it is used -func (m *DirEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFstatInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirEntry) contextValidateFstatInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FstatInfo != nil { - - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if err := m.FstatInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DirEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DirEntry) UnmarshalBinary(b []byte) error { - var res DirEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dir_quota_config.go b/v1/models/dir_quota_config.go deleted file mode 100644 index bbd2221f..00000000 --- a/v1/models/dir_quota_config.go +++ /dev/null @@ -1,55 +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" -) - -// DirQuotaConfig Directory Quota Configuration. -// -// Specifies the configuration object of a directory quota. -// -// swagger:model DirQuotaConfig -type DirQuotaConfig struct { - - // Specifies whether the directory quota is enabled on the view. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this dir quota config -func (m *DirQuotaConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this dir quota config based on context it is used -func (m *DirQuotaConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DirQuotaConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DirQuotaConfig) UnmarshalBinary(b []byte) error { - var res DirQuotaConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dir_quota_info.go b/v1/models/dir_quota_info.go deleted file mode 100644 index eedd93a6..00000000 --- a/v1/models/dir_quota_info.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DirQuotaInfo Directory Quota Info. -// -// Specifies the configuration and policy details for directory quota in a -// view. -// -// swagger:model DirQuotaInfo -type DirQuotaInfo struct { - - // Specifies the directory quota configuration. - Config *DirQuotaConfig `json:"config,omitempty"` - - // This cookie can be used in the succeeding call to list user quotas and - // usages to get the next set of user quota overrides. If set to nil, it - // means that there's no more results that the server could provide. - Cookie *int64 `json:"cookie,omitempty"` - - // Specifies the list of directory quota policies applied on the view. - Quotas []*DirQuotaPolicy `json:"quotas"` -} - -// Validate validates this dir quota info -func (m *DirQuotaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQuotas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirQuotaInfo) validateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.Config) { // not required - return nil - } - - if m.Config != nil { - if err := m.Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *DirQuotaInfo) validateQuotas(formats strfmt.Registry) error { - if swag.IsZero(m.Quotas) { // not required - return nil - } - - for i := 0; i < len(m.Quotas); i++ { - if swag.IsZero(m.Quotas[i]) { // not required - continue - } - - if m.Quotas[i] != nil { - if err := m.Quotas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this dir quota info based on the context it is used -func (m *DirQuotaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQuotas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirQuotaInfo) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.Config != nil { - - if swag.IsZero(m.Config) { // not required - return nil - } - - if err := m.Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *DirQuotaInfo) contextValidateQuotas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Quotas); i++ { - - if m.Quotas[i] != nil { - - if swag.IsZero(m.Quotas[i]) { // not required - return nil - } - - if err := m.Quotas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DirQuotaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DirQuotaInfo) UnmarshalBinary(b []byte) error { - var res DirQuotaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dir_quota_policy.go b/v1/models/dir_quota_policy.go deleted file mode 100644 index bc4e3580..00000000 --- a/v1/models/dir_quota_policy.go +++ /dev/null @@ -1,127 +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" -) - -// DirQuotaPolicy Directory Quota Policy. -// -// Specifies a policy configuration for the directory quota. A policy is the -// sole entity which describes the usage limits of a directory in a view. -// -// `DirPath` is the identifier of a policy. It must be specified for adding, -// updating or removing a policy. If `Policy` is not set, then it is considered -// to be removed. -// -// swagger:model DirQuotaPolicy -type DirQuotaPolicy struct { - - // Specifies the path of the directory in the view. - DirPath *string `json:"dirPath,omitempty"` - - // Denotes directory quota walk is pending or not. - DirWalkPending *bool `json:"dirWalkPending,omitempty"` - - // Specifies the quota policy to be applied to the directory. - Policy *QuotaPolicy `json:"policy,omitempty"` - - // Specifies the current usage (in bytes) by the directory in the view. - // This is set by the response received from bridge when querying directory - // quota usage. - UsageBytes *int64 `json:"usageBytes,omitempty"` -} - -// Validate validates this dir quota policy -func (m *DirQuotaPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirQuotaPolicy) validatePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.Policy) { // not required - return nil - } - - if m.Policy != nil { - if err := m.Policy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this dir quota policy based on the context it is used -func (m *DirQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DirQuotaPolicy) contextValidatePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.Policy != nil { - - if swag.IsZero(m.Policy) { // not required - return nil - } - - if err := m.Policy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DirQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DirQuotaPolicy) UnmarshalBinary(b []byte) error { - var res DirQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk.go b/v1/models/disk.go deleted file mode 100644 index a971bd8b..00000000 --- a/v1/models/disk.go +++ /dev/null @@ -1,334 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Disk Disk in a Volume. -// -// Specifies information about a disk and partitions in a volume. -// -// swagger:model Disk -type Disk struct { - - // Array of Disk Blocks. - // - // Specifies a set of disk blocks by defining the location and offset of - // disk blocks in a disk. - DiskBlocks []*DiskBlock `json:"diskBlocks"` - - // Specifies the format of the virtual disk. - // 'kVMDK' indicates VMware's Virtual Disk format. - // 'kVHD' indicates Microsoft's Virtual Hard Drive format. - // 'kVHDx' indicates Microsoft's Hyper-V Virtual Hard Drive format. - // 'kRaw' indicates Raw disk format used by KVM, Acropolis. - // 'kUnknow' indicates Unknown disk format. - // Enum: ["kVMDK","kVHD","kVHDx","kRaw","kUnknown"] - DiskFormat *string `json:"diskFormat,omitempty"` - - // Array of Partitions. - // - // Specifies information about all the partitions in this disk. - DiskPartitions []*DiskPartition `json:"diskPartitions"` - - // Specifies partition table format on a disk. - // 'kNoPartition' indicates missing partition table. - // 'kMBRPartition' indicates partition table is in Master Boot Record format. - // 'kGPTPartition' indicates partition table is in Guid Partition Table format. - // 'kSGIPartition' indicates partition table uses SGI scheme. - // 'kSUNPartition' indicates partition table uses SUN scheme. - // Enum: ["kNoPartition","kMBRPartition","kGPTPartition","kSGIPartition","kSUNPartition"] - PartitionTableFormat *string `json:"partitionTableFormat,omitempty"` - - // Specifies the sector size of hard disk. It is used for mapping the disk - // blocks of the disk file into a linear list of sectors. - SectorSizeBytes *int64 `json:"sectorSizeBytes,omitempty"` - - // Specifies the disk uuid. - UUID *string `json:"uuid,omitempty"` - - // Specifies the disk file name. This is the VMDK name and not the - // flat file name. - VmdkFileName *string `json:"vmdkFileName,omitempty"` - - // Specifies the disk size in bytes. - VmdkSizeBytes *int64 `json:"vmdkSizeBytes,omitempty"` -} - -// Validate validates this disk -func (m *Disk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskBlocks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskFormat(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskPartitions(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePartitionTableFormat(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Disk) validateDiskBlocks(formats strfmt.Registry) error { - if swag.IsZero(m.DiskBlocks) { // not required - return nil - } - - for i := 0; i < len(m.DiskBlocks); i++ { - if swag.IsZero(m.DiskBlocks[i]) { // not required - continue - } - - if m.DiskBlocks[i] != nil { - if err := m.DiskBlocks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskBlocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskBlocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var diskTypeDiskFormatPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMDK","kVHD","kVHDx","kRaw","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypeDiskFormatPropEnum = append(diskTypeDiskFormatPropEnum, v) - } -} - -const ( - - // DiskDiskFormatKVMDK captures enum value "kVMDK" - DiskDiskFormatKVMDK string = "kVMDK" - - // DiskDiskFormatKVHD captures enum value "kVHD" - DiskDiskFormatKVHD string = "kVHD" - - // DiskDiskFormatKVHDx captures enum value "kVHDx" - DiskDiskFormatKVHDx string = "kVHDx" - - // DiskDiskFormatKRaw captures enum value "kRaw" - DiskDiskFormatKRaw string = "kRaw" - - // DiskDiskFormatKUnknown captures enum value "kUnknown" - DiskDiskFormatKUnknown string = "kUnknown" -) - -// prop value enum -func (m *Disk) validateDiskFormatEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypeDiskFormatPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Disk) validateDiskFormat(formats strfmt.Registry) error { - if swag.IsZero(m.DiskFormat) { // not required - return nil - } - - // value enum - if err := m.validateDiskFormatEnum("diskFormat", "body", *m.DiskFormat); err != nil { - return err - } - - return nil -} - -func (m *Disk) validateDiskPartitions(formats strfmt.Registry) error { - if swag.IsZero(m.DiskPartitions) { // not required - return nil - } - - for i := 0; i < len(m.DiskPartitions); i++ { - if swag.IsZero(m.DiskPartitions[i]) { // not required - continue - } - - if m.DiskPartitions[i] != nil { - if err := m.DiskPartitions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskPartitions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskPartitions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var diskTypePartitionTableFormatPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoPartition","kMBRPartition","kGPTPartition","kSGIPartition","kSUNPartition"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypePartitionTableFormatPropEnum = append(diskTypePartitionTableFormatPropEnum, v) - } -} - -const ( - - // DiskPartitionTableFormatKNoPartition captures enum value "kNoPartition" - DiskPartitionTableFormatKNoPartition string = "kNoPartition" - - // DiskPartitionTableFormatKMBRPartition captures enum value "kMBRPartition" - DiskPartitionTableFormatKMBRPartition string = "kMBRPartition" - - // DiskPartitionTableFormatKGPTPartition captures enum value "kGPTPartition" - DiskPartitionTableFormatKGPTPartition string = "kGPTPartition" - - // DiskPartitionTableFormatKSGIPartition captures enum value "kSGIPartition" - DiskPartitionTableFormatKSGIPartition string = "kSGIPartition" - - // DiskPartitionTableFormatKSUNPartition captures enum value "kSUNPartition" - DiskPartitionTableFormatKSUNPartition string = "kSUNPartition" -) - -// prop value enum -func (m *Disk) validatePartitionTableFormatEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypePartitionTableFormatPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Disk) validatePartitionTableFormat(formats strfmt.Registry) error { - if swag.IsZero(m.PartitionTableFormat) { // not required - return nil - } - - // value enum - if err := m.validatePartitionTableFormatEnum("partitionTableFormat", "body", *m.PartitionTableFormat); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this disk based on the context it is used -func (m *Disk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskBlocks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskPartitions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Disk) contextValidateDiskBlocks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskBlocks); i++ { - - if m.DiskBlocks[i] != nil { - - if swag.IsZero(m.DiskBlocks[i]) { // not required - return nil - } - - if err := m.DiskBlocks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskBlocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskBlocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Disk) contextValidateDiskPartitions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskPartitions); i++ { - - if m.DiskPartitions[i] != nil { - - if swag.IsZero(m.DiskPartitions[i]) { // not required - return nil - } - - if err := m.DiskPartitions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskPartitions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskPartitions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Disk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Disk) UnmarshalBinary(b []byte) error { - var res Disk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_attach_params.go b/v1/models/disk_attach_params.go deleted file mode 100644 index c1bea0d2..00000000 --- a/v1/models/disk_attach_params.go +++ /dev/null @@ -1,59 +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" -) - -// DiskAttachParams Message contains the params to attach the temp disk for the backup/restore. -// -// swagger:model DiskAttachParams -type DiskAttachParams struct { - - // azure disk - AzureDisk *int32 `json:"azureDisk,omitempty"` - - // Size of the disk to be provisioned. - Size *int64 `json:"size,omitempty"` - - // Instance id of VM where the disk will be attached to. - // Rigel instance ID in case of Azure SQL backup. - // This is a optional param, If not set then magneto slave will use the - // Rigel assigned by permit grant to fetch in instance id. - VMInstanceIDStr *string `json:"vmInstanceIdStr,omitempty"` -} - -// Validate validates this disk attach params -func (m *DiskAttachParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk attach params based on context it is used -func (m *DiskAttachParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskAttachParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskAttachParams) UnmarshalBinary(b []byte) error { - var res DiskAttachParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_block.go b/v1/models/disk_block.go deleted file mode 100644 index fc07485f..00000000 --- a/v1/models/disk_block.go +++ /dev/null @@ -1,58 +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" -) - -// DiskBlock Disk Block. -// -// Specifies a contiguous block by defining an offset and -// length of the block. -// -// swagger:model DiskBlock -type DiskBlock struct { - - // Specifies the length of the block in bytes. - LengthBytes *int64 `json:"lengthBytes,omitempty"` - - // Specifies the offset of the block (in bytes) from the beginning - // of the containing object such as a physical disk or a - // virtual disk file. - OffsetBytes *int64 `json:"offsetBytes,omitempty"` -} - -// Validate validates this disk block -func (m *DiskBlock) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk block based on context it is used -func (m *DiskBlock) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskBlock) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskBlock) UnmarshalBinary(b []byte) error { - var res DiskBlock - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_delete_result.go b/v1/models/disk_delete_result.go deleted file mode 100644 index 0ff20fec..00000000 --- a/v1/models/disk_delete_result.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DiskDeleteResult DiskDeleteResult -// -// swagger:model DiskDeleteResult -type DiskDeleteResult struct { - - // Id of the disk to be marked for deletion. - ID *int64 `json:"id,omitempty"` - - // MarkDiskForRemoval indicates if the disk is marked for removal - MarkDiskForRemoval *bool `json:"markDiskForRemoval,omitempty"` - - // TimestampSecs specifies the last run time - // of the pre-checks execution in Unix epoch timestamp in seconds - TimestampSecs *int64 `json:"timestampSecs,omitempty"` - - // ValidationChecks specifies list of pre-check validations - ValidationChecks []*PreCheckValidation `json:"validationChecks"` -} - -// Validate validates this disk delete result -func (m *DiskDeleteResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskDeleteResult) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this disk delete result based on the context it is used -func (m *DiskDeleteResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskDeleteResult) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DiskDeleteResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskDeleteResult) UnmarshalBinary(b []byte) error { - var res DiskDeleteResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_hardware_info.go b/v1/models/disk_hardware_info.go deleted file mode 100644 index 0a5824c6..00000000 --- a/v1/models/disk_hardware_info.go +++ /dev/null @@ -1,59 +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" -) - -// DiskHardwareInfo DiskHardwareInfo provides the information regarding the hardware. -// -// swagger:model DiskHardwareInfo -type DiskHardwareInfo struct { - - // Description is the description of the disk. - Description *string `json:"description,omitempty"` - - // Make specifies the make of the disk. - Make *string `json:"make,omitempty"` - - // Model specifies the model of the disk. - Model *string `json:"model,omitempty"` - - // Disk Serial. - Serial *string `json:"serial,omitempty"` -} - -// Validate validates this disk hardware info -func (m *DiskHardwareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk hardware info based on context it is used -func (m *DiskHardwareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskHardwareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskHardwareInfo) UnmarshalBinary(b []byte) error { - var res DiskHardwareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_info.go b/v1/models/disk_info.go deleted file mode 100644 index 5dc26e00..00000000 --- a/v1/models/disk_info.go +++ /dev/null @@ -1,140 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DiskInfo Message representing information related to a disk attached to GCP instance. -// -// swagger:model DiskInfo -type DiskInfo struct { - - // Name of the device. Eg - /dev/xvde. - DeviceName *string `json:"deviceName,omitempty"` - - // Name of the disk. Eg - instance1-disk. - DiskName *string `json:"diskName,omitempty"` - - // Type of the disk. Eg - Balanced persistent disk etc. - DiskType *string `json:"diskType,omitempty"` - - // ID of the disk. - ID *int64 `json:"id,omitempty"` - - // True if the disk is attached as root device for a GCP instance, - // else default is false. - IsBootable *bool `json:"isBootable,omitempty"` - - // label vec - LabelVec []*DiskInfoLabel `json:"labelVec"` - - // Size of the disk in bytes. - SizeGb *int64 `json:"sizeGb,omitempty"` -} - -// Validate validates this disk info -func (m *DiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLabelVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskInfo) validateLabelVec(formats strfmt.Registry) error { - if swag.IsZero(m.LabelVec) { // not required - return nil - } - - for i := 0; i < len(m.LabelVec); i++ { - if swag.IsZero(m.LabelVec[i]) { // not required - continue - } - - if m.LabelVec[i] != nil { - if err := m.LabelVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this disk info based on the context it is used -func (m *DiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLabelVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskInfo) contextValidateLabelVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelVec); i++ { - - if m.LabelVec[i] != nil { - - if swag.IsZero(m.LabelVec[i]) { // not required - return nil - } - - if err := m.LabelVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskInfo) UnmarshalBinary(b []byte) error { - var res DiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_info_label.go b/v1/models/disk_info_label.go deleted file mode 100644 index 42fb9f47..00000000 --- a/v1/models/disk_info_label.go +++ /dev/null @@ -1,57 +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" -) - -// DiskInfoLabel Label definition for labels on the disk. -// -// swagger:model DiskInfo_Label -type DiskInfoLabel struct { - - // Key for the label. Note that if the provided label key's length is more - // than the maximum length allowed by GCP(currently 63), then the value - // would be automatically truncated before setting. - Key *string `json:"key,omitempty"` - - // Value for the label. Note that if the provided label value's length is - // more than the maximum length allowed by GCP(currently 63), then the - // value would be automatically truncated before setting. - Value *string `json:"value,omitempty"` -} - -// Validate validates this disk info label -func (m *DiskInfoLabel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk info label based on context it is used -func (m *DiskInfoLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskInfoLabel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskInfoLabel) UnmarshalBinary(b []byte) error { - var res DiskInfoLabel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_internal.go b/v1/models/disk_internal.go deleted file mode 100644 index d488801d..00000000 --- a/v1/models/disk_internal.go +++ /dev/null @@ -1,657 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DiskInternal DiskInternal is the struct for a Disk. -// -// swagger:model DiskInternal -type DiskInternal struct { - - // AvoidAccess specifies whether a disk is marked AvoidAccess. - AvoidAccess *bool `json:"avoidAccess,omitempty"` - - // CancelRemoval specifies whether a MarkedForRemoval disk should - // cancel the removal state and reset to kDontRemove. - CancelRemoval *bool `json:"cancelRemoval,omitempty"` - - // CurrentNodeId is the Id of the Node to which the Disk belongs. - CurrentNodeID *int64 `json:"currentNodeId,omitempty"` - - // CurrentNodeIp is the Ip of the Node to which the Disk belongs. - CurrentNodeIP *string `json:"currentNodeIp,omitempty"` - - // DesiredWalLocation is the new desired location of write ahead logs(wal). - // 'kHomePartition' indicates desired wal location to be the home partition. - // 'kDisk' indicates desired wal location to be the same disk as chunk repo. - // 'kScribe' indicates desired wal location to be scribe. - // 'kScribeTable' indicates chunk repository state is kept as key-value - // pairs in scribe. - // Enum: ["kHomePartition","kDisk","kScribe","kScribeTable"] - DesiredWalLocation *string `json:"desiredWalLocation,omitempty"` - - // HardwareInfo describes the hardware of the node. - HardwareInfo *DiskHardwareInfo `json:"hardwareInfo,omitempty"` - - // Id is the Id of the Disk. - ID *int64 `json:"id,omitempty"` - - // LastNodeId is the Node id of the node where this disk was last known to - // reside. - LastNodeID *int64 `json:"lastNodeId,omitempty"` - - // LocationInChassis is the location of the disk in the chassis. - LocationInChassis *string `json:"locationInChassis,omitempty"` - - // MaxPhysicalCapacityBytes specifies the maximum physical capacity of the - // disk in bytes. - MaxPhysicalCapacityBytes *int64 `json:"maxPhysicalCapacityBytes,omitempty"` - - // MaxUsableCapacityBytes is the maximum capacity of the disk in bytes that - // can be used. - MaxUsableCapacityBytes *int64 `json:"maxUsableCapacityBytes,omitempty"` - - // MountPath is the mount path of the disk. - MountPath *string `json:"mountPath,omitempty"` - - // MountProtocol is the mount protocol of the disk. - MountProtocol *int32 `json:"mountProtocol,omitempty"` - - // PrecheckTimestampSecs specifies the last run time - // of the pre-checks execution in Unix epoch timestamp in seconds - PrecheckTimestampSecs *int64 `json:"precheckTimestampSecs,omitempty"` - - // ProgressPercentage is the overall progress percentage - // in removing the entity. - ProgressPercentage *int64 `json:"progressPercentage,omitempty"` - - // Removal progress for various components which are not acked yet. - RemovalProgressList []*ComponentRemovalProgress `json:"removalProgressList"` - - // RemovalReason specifies the removal reason of the disk. - // 'kAutoHealthCheck' means the entity health is bad. - // 'kUserGracefulRemoval' means user initiated a graceful removal. - // 'kUserAvoidAccess' means user initiated a mark offline. - // 'kUserGracefulNodeRemoval' mean users initiated graceful node removal. - // 'kUserRemoveDownNode' mean user initiated graceful removal of down node. - RemovalReason []string `json:"removalReason"` - - // RemovalState specifies the removal state of the disk. - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["kDontRemove","kMarkedForRemoval","kOkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // RemovalTimestampSecs specifies the Unix epoch timestamp (in seconds) - // when the entity was marked for removal. - RemovalTimestampSecs *int64 `json:"removalTimestampSecs,omitempty"` - - // ReservationList is a slice containing the space reservation made by - // various components. - Reservations []*DiskReservation `json:"reservations"` - - // Services already acked for removal of this entity. - ServicesAckedList []string `json:"servicesAckedList"` - - // [For CLI displays the string with ServicesNotAcked] - // ServicesNotAcked specifies services that have not ACKed yet in string - // format after the entity is marked for removal. - ServicesNotAcked *string `json:"servicesNotAcked,omitempty"` - - // Services not acked yet for removal of this entity. - ServicesNotAckedList []string `json:"servicesNotAckedList"` - - // SpaceAvail shows how much disk space is available. - SpaceAvail *int64 `json:"spaceAvail,omitempty"` - - // SpaceUsed shows how much of the disk space is used. - SpaceUsed *int64 `json:"spaceUsed,omitempty"` - - // Stats describes the disk stats. - Stats *DiskStats `json:"stats,omitempty"` - - // StorageTier is the type of StorageTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - StorageTier *string `json:"storageTier,omitempty"` - - // TimeRemaining is the overall total duration left to remove the entity. - TimeRemaining *int64 `json:"timeRemaining,omitempty"` - - // UsageInPercentage shows how much of the disk space is used in percentage. - UsageInPercentage *int64 `json:"usageInPercentage,omitempty"` - - // If ValidateOnly is true, MarkDiskForRemoval API returns only the - // pre-check validations. Default is set to false. - ValidateOnly *bool `json:"validateOnly,omitempty"` - - // ValidationChecks specifies list of pre-check validations - ValidationChecks []*PreCheckValidation `json:"validationChecks"` - - // Vault Id is the optional vault id that this disk resides on. - VaultID *int64 `json:"vaultId,omitempty"` -} - -// Validate validates this disk internal -func (m *DiskInternal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDesiredWalLocation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHardwareInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalProgressList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReservations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskInternalTypeDesiredWalLocationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHomePartition","kDisk","kScribe","kScribeTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskInternalTypeDesiredWalLocationPropEnum = append(diskInternalTypeDesiredWalLocationPropEnum, v) - } -} - -const ( - - // DiskInternalDesiredWalLocationKHomePartition captures enum value "kHomePartition" - DiskInternalDesiredWalLocationKHomePartition string = "kHomePartition" - - // DiskInternalDesiredWalLocationKDisk captures enum value "kDisk" - DiskInternalDesiredWalLocationKDisk string = "kDisk" - - // DiskInternalDesiredWalLocationKScribe captures enum value "kScribe" - DiskInternalDesiredWalLocationKScribe string = "kScribe" - - // DiskInternalDesiredWalLocationKScribeTable captures enum value "kScribeTable" - DiskInternalDesiredWalLocationKScribeTable string = "kScribeTable" -) - -// prop value enum -func (m *DiskInternal) validateDesiredWalLocationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskInternalTypeDesiredWalLocationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskInternal) validateDesiredWalLocation(formats strfmt.Registry) error { - if swag.IsZero(m.DesiredWalLocation) { // not required - return nil - } - - // value enum - if err := m.validateDesiredWalLocationEnum("desiredWalLocation", "body", *m.DesiredWalLocation); err != nil { - return err - } - - return nil -} - -func (m *DiskInternal) validateHardwareInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HardwareInfo) { // not required - return nil - } - - if m.HardwareInfo != nil { - if err := m.HardwareInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hardwareInfo") - } - return err - } - } - - return nil -} - -func (m *DiskInternal) validateRemovalProgressList(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalProgressList) { // not required - return nil - } - - for i := 0; i < len(m.RemovalProgressList); i++ { - if swag.IsZero(m.RemovalProgressList[i]) { // not required - continue - } - - if m.RemovalProgressList[i] != nil { - if err := m.RemovalProgressList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var diskInternalRemovalReasonItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAutoHealthCheck","kUserGracefulRemoval","kUserAvoidAccess","kUserGracefulNodeRemoval","kUserRemoveDownNode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskInternalRemovalReasonItemsEnum = append(diskInternalRemovalReasonItemsEnum, v) - } -} - -func (m *DiskInternal) validateRemovalReasonItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskInternalRemovalReasonItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskInternal) validateRemovalReason(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalReason) { // not required - return nil - } - - for i := 0; i < len(m.RemovalReason); i++ { - - // value enum - if err := m.validateRemovalReasonItemsEnum("removalReason"+"."+strconv.Itoa(i), "body", m.RemovalReason[i]); err != nil { - return err - } - - } - - return nil -} - -var diskInternalTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDontRemove","kMarkedForRemoval","kOkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskInternalTypeRemovalStatePropEnum = append(diskInternalTypeRemovalStatePropEnum, v) - } -} - -const ( - - // DiskInternalRemovalStateKDontRemove captures enum value "kDontRemove" - DiskInternalRemovalStateKDontRemove string = "kDontRemove" - - // DiskInternalRemovalStateKMarkedForRemoval captures enum value "kMarkedForRemoval" - DiskInternalRemovalStateKMarkedForRemoval string = "kMarkedForRemoval" - - // DiskInternalRemovalStateKOkToRemove captures enum value "kOkToRemove" - DiskInternalRemovalStateKOkToRemove string = "kOkToRemove" -) - -// prop value enum -func (m *DiskInternal) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskInternalTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskInternal) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -func (m *DiskInternal) validateReservations(formats strfmt.Registry) error { - if swag.IsZero(m.Reservations) { // not required - return nil - } - - for i := 0; i < len(m.Reservations); i++ { - if swag.IsZero(m.Reservations[i]) { // not required - continue - } - - if m.Reservations[i] != nil { - if err := m.Reservations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DiskInternal) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var diskInternalTypeStorageTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskInternalTypeStorageTierPropEnum = append(diskInternalTypeStorageTierPropEnum, v) - } -} - -const ( - - // DiskInternalStorageTierPCIeSSD captures enum value "PCIeSSD" - DiskInternalStorageTierPCIeSSD string = "PCIeSSD" - - // DiskInternalStorageTierSATADashSSD captures enum value "SATA-SSD" - DiskInternalStorageTierSATADashSSD string = "SATA-SSD" - - // DiskInternalStorageTierSATADashHDD captures enum value "SATA-HDD" - DiskInternalStorageTierSATADashHDD string = "SATA-HDD" - - // DiskInternalStorageTierCLOUD captures enum value "CLOUD" - DiskInternalStorageTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *DiskInternal) validateStorageTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskInternalTypeStorageTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskInternal) validateStorageTier(formats strfmt.Registry) error { - if swag.IsZero(m.StorageTier) { // not required - return nil - } - - // value enum - if err := m.validateStorageTierEnum("storageTier", "body", *m.StorageTier); err != nil { - return err - } - - return nil -} - -func (m *DiskInternal) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this disk internal based on the context it is used -func (m *DiskInternal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHardwareInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemovalProgressList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReservations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskInternal) contextValidateHardwareInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.HardwareInfo != nil { - - if swag.IsZero(m.HardwareInfo) { // not required - return nil - } - - if err := m.HardwareInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hardwareInfo") - } - return err - } - } - - return nil -} - -func (m *DiskInternal) contextValidateRemovalProgressList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemovalProgressList); i++ { - - if m.RemovalProgressList[i] != nil { - - if swag.IsZero(m.RemovalProgressList[i]) { // not required - return nil - } - - if err := m.RemovalProgressList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DiskInternal) contextValidateReservations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Reservations); i++ { - - if m.Reservations[i] != nil { - - if swag.IsZero(m.Reservations[i]) { // not required - return nil - } - - if err := m.Reservations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reservations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reservations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DiskInternal) 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 -} - -func (m *DiskInternal) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DiskInternal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskInternal) UnmarshalBinary(b []byte) error { - var res DiskInternal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_partition.go b/v1/models/disk_partition.go deleted file mode 100644 index f55aabcf..00000000 --- a/v1/models/disk_partition.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/strfmt" - "github.com/go-openapi/swag" -) - -// DiskPartition Disk Partition. -// -// Specifies information about each partition in a physical disk. -// -// swagger:model DiskPartition -type DiskPartition struct { - - // Specifies the length of the block in bytes. - LengthBytes *int64 `json:"lengthBytes,omitempty"` - - // Specifies a unique number of the partition within the linear disk file. - Number *int64 `json:"number,omitempty"` - - // Specifies the offset of the block (in bytes) from the beginning - // of the containing object such as a physical disk or a - // virtual disk file. - OffsetBytes *int64 `json:"offsetBytes,omitempty"` - - // Specifies the partition type uuid. - // If disk is unpartitioned, this field is not set. - // If disk is MBR partitioned, this field is set to a partition type. - // If disk is GPT partitioned, this field is set to a partition type - // GUID. - TypeUUID *string `json:"typeUuid,omitempty"` - - // Specifies the partition uuid. - // If disk is unpartitioned, this field is not set. - // If disk is MBR partitioned, this field is not set. - // If disk is GPT partitioned, this field is set to a partition GUID. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this disk partition -func (m *DiskPartition) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk partition based on context it is used -func (m *DiskPartition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskPartition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskPartition) UnmarshalBinary(b []byte) error { - var res DiskPartition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_reservation.go b/v1/models/disk_reservation.go deleted file mode 100644 index 3e324a3d..00000000 --- a/v1/models/disk_reservation.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" -) - -// DiskReservation DiskReservation represents the disk reservation of a component. -// -// swagger:model DiskReservation -type DiskReservation struct { - - // component - Component *int64 `json:"component,omitempty"` - - // reserved bytes - ReservedBytes *int64 `json:"reservedBytes,omitempty"` -} - -// Validate validates this disk reservation -func (m *DiskReservation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk reservation based on context it is used -func (m *DiskReservation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskReservation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskReservation) UnmarshalBinary(b []byte) error { - var res DiskReservation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_stats.go b/v1/models/disk_stats.go deleted file mode 100644 index 17e09759..00000000 --- a/v1/models/disk_stats.go +++ /dev/null @@ -1,112 +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" -) - -// DiskStats DiskStats provides various statistics for the disk. -// -// swagger:model DiskStats -type DiskStats struct { - - // Id is the Id of the Disk. - ID *int64 `json:"id,omitempty"` - - // UsagePerfStats provides the usage and performance stats for the disk. - UsagePerfStats *UsageAndPerformanceStats `json:"usagePerfStats,omitempty"` -} - -// Validate validates this disk stats -func (m *DiskStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskStats) validateUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.UsagePerfStats) { // not required - 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 -} - -// ContextValidate validate this disk stats based on the context it is used -func (m *DiskStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskStats) 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 -} - -// MarshalBinary interface implementation -func (m *DiskStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskStats) UnmarshalBinary(b []byte) error { - var res DiskStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/disk_unit.go b/v1/models/disk_unit.go deleted file mode 100644 index 49e7cef7..00000000 --- a/v1/models/disk_unit.go +++ /dev/null @@ -1,59 +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" -) - -// DiskUnit Disk Unit. -// -// Specifies information about a disk unit in a controller. -// -// swagger:model DiskUnit -type DiskUnit struct { - - // Specifies the Id of the controller bus that controls the disk. - BusNumber *int64 `json:"busNumber,omitempty"` - - // Specifies the controller type like SCSI, or IDE etc. - ControllerType *string `json:"controllerType,omitempty"` - - // Specifies the disk file name. This is the VMDK name and not the - // flat file name. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this disk unit -func (m *DiskUnit) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disk unit based on context it is used -func (m *DiskUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskUnit) UnmarshalBinary(b []byte) error { - var res DiskUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/dns_delegation_zone.go b/v1/models/dns_delegation_zone.go deleted file mode 100644 index 0626912a..00000000 --- a/v1/models/dns_delegation_zone.go +++ /dev/null @@ -1,56 +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" -) - -// DNSDelegationZone Dns delegation zone -// -// swagger:model DnsDelegationZone -type DNSDelegationZone struct { - - // Specifies the dns zone name. - DNSZoneName *string `json:"dnsZoneName,omitempty"` - - // Specifies list of vips that will be resolved to. - DNSZoneResolvedVips []string `json:"dnsZoneResolvedVips"` - - // Specifies list of vips part of dns delegation zone. - DNSZoneVips []string `json:"dnsZoneVips"` -} - -// Validate validates this Dns delegation zone -func (m *DNSDelegationZone) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Dns delegation zone based on context it is used -func (m *DNSDelegationZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DNSDelegationZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DNSDelegationZone) UnmarshalBinary(b []byte) error { - var res DNSDelegationZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/doc_error.go b/v1/models/doc_error.go deleted file mode 100644 index 7d7a6e6f..00000000 --- a/v1/models/doc_error.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" -) - -// DocError DocError are document error incurred in yoda service while tagging. -// -// swagger:model DocError -type DocError struct { - - // DocumentId is document which caused the error. - DocumentID *string `json:"documentId,omitempty"` - - // ErrorString is the error converted to string. - ErrorString *string `json:"errorString,omitempty"` -} - -// Validate validates this doc error -func (m *DocError) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this doc error based on context it is used -func (m *DocError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DocError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DocError) UnmarshalBinary(b []byte) error { - var res DocError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/domain.go b/v1/models/domain.go deleted file mode 100644 index 039d1eb4..00000000 --- a/v1/models/domain.go +++ /dev/null @@ -1,55 +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" -) - -// Domain Domain. -// -// Specifies a domain and its trusted domains. -// -// swagger:model Domain -type Domain struct { - - // Specifies the domain name. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a list of trusted domains of this domain. - TrustedDomains []string `json:"trustedDomains"` -} - -// Validate validates this domain -func (m *Domain) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this domain based on context it is used -func (m *Domain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Domain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Domain) UnmarshalBinary(b []byte) error { - var res Domain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/domain_controllers.go b/v1/models/domain_controllers.go deleted file mode 100644 index 96d46956..00000000 --- a/v1/models/domain_controllers.go +++ /dev/null @@ -1,52 +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" -) - -// DomainControllers Domain Controllers. -// -// Domain Controllers for a domain of an Active Directory domain. -// -// swagger:model DomainControllers -type DomainControllers struct { - - // Domain Controllers of a domain of an Active Directory domain. - DomainControllers []string `json:"domainControllers"` -} - -// Validate validates this domain controllers -func (m *DomainControllers) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this domain controllers based on context it is used -func (m *DomainControllers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DomainControllers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainControllers) UnmarshalBinary(b []byte) error { - var res DomainControllers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_cft_params.go b/v1/models/download_cft_params.go deleted file mode 100644 index 09fd9e69..00000000 --- a/v1/models/download_cft_params.go +++ /dev/null @@ -1,54 +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" -) - -// DownloadCftParams Structure to get the CFT/Json file. -// -// swagger:model DownloadCftParams -type DownloadCftParams struct { - - // Specifies the file name of the cloud formation template. - FileName *string `json:"fileName,omitempty"` - - // Specifies the file path of the template. If passed null, - // "/home/cohesity/bin" will be considered as file path. - FilePath *string `json:"filePath,omitempty"` -} - -// Validate validates this download cft params -func (m *DownloadCftParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this download cft params based on context it is used -func (m *DownloadCftParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadCftParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadCftParams) UnmarshalBinary(b []byte) error { - var res DownloadCftParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_cft_response.go b/v1/models/download_cft_response.go deleted file mode 100644 index e894114b..00000000 --- a/v1/models/download_cft_response.go +++ /dev/null @@ -1,55 +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" -) - -// DownloadCftResponse CFT/Json file response. -// -// swagger:model DownloadCftResponse -type DownloadCftResponse struct { - - // Specifies the content of the file. - Content []uint8 `json:"content"` - - // Specifies the content of the CFT. - // in: body - // Specifies the file name of the cloud formation template. - FileName *string `json:"fileName,omitempty"` -} - -// Validate validates this download cft response -func (m *DownloadCftResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this download cft response based on context it is used -func (m *DownloadCftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadCftResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadCftResponse) UnmarshalBinary(b []byte) error { - var res DownloadCftResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_chats_params.go b/v1/models/download_chats_params.go deleted file mode 100644 index 69f3862a..00000000 --- a/v1/models/download_chats_params.go +++ /dev/null @@ -1,60 +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" -) - -// DownloadChatsParams Message containing params for downloading chat/post messages for -// user/teams/channel. -// -// swagger:model DownloadChatsParams -type DownloadChatsParams struct { - - // List of channel IDs whose chats needs to be downloaded. This will only be - // populated when specific channel's posts needs to be downloaded. If this is - // not populated full teams posts will be downloaded. - ChannelIdsVec []string `json:"channelIdsVec"` - - // File type which will be downloaded containing chat messages. - DownloadFileType *int32 `json:"downloadFileType,omitempty"` - - // HTML template for the downloaded chats. IRIS will populate this by - // reading the template locally. - HTMLTemplate *string `json:"htmlTemplate,omitempty"` -} - -// Validate validates this download chats params -func (m *DownloadChatsParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this download chats params based on context it is used -func (m *DownloadChatsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadChatsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadChatsParams) UnmarshalBinary(b []byte) error { - var res DownloadChatsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_files_and_folders_params.go b/v1/models/download_files_and_folders_params.go deleted file mode 100644 index 13075d3b..00000000 --- a/v1/models/download_files_and_folders_params.go +++ /dev/null @@ -1,195 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DownloadFilesAndFoldersParams Download Files And Folders Parameters. -// -// DownloadFilesAndFoldersParams holds the information to create a task for -// downloading list of files or folders -// -// swagger:model DownloadFilesAndFoldersParams -type DownloadFilesAndFoldersParams struct { - - // Specifies the absolute paths for list of files and folders to download. - FilesAndFoldersInfo []*FilesAndFoldersInfo `json:"filesAndFoldersInfo"` - - // Specifies the name of the Download Task. This field must be set and must - // be a unique name. - // Required: true - Name *string `json:"name"` - - // Specifies the details of the task that is created in order to download - // the specified list of files and folders. - SourceObjectInfo *RestoreObjectDetails `json:"sourceObjectInfo,omitempty"` -} - -// Validate validates this download files and folders params -func (m *DownloadFilesAndFoldersParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFoldersInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceObjectInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersParams) validateFilesAndFoldersInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FilesAndFoldersInfo) { // not required - return nil - } - - for i := 0; i < len(m.FilesAndFoldersInfo); i++ { - if swag.IsZero(m.FilesAndFoldersInfo[i]) { // not required - continue - } - - if m.FilesAndFoldersInfo[i] != nil { - if err := m.FilesAndFoldersInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFoldersInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFoldersInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DownloadFilesAndFoldersParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *DownloadFilesAndFoldersParams) validateSourceObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SourceObjectInfo) { // not required - 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 -} - -// ContextValidate validate this download files and folders params based on the context it is used -func (m *DownloadFilesAndFoldersParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFoldersInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersParams) contextValidateFilesAndFoldersInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFoldersInfo); i++ { - - if m.FilesAndFoldersInfo[i] != nil { - - if swag.IsZero(m.FilesAndFoldersInfo[i]) { // not required - return nil - } - - if err := m.FilesAndFoldersInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFoldersInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFoldersInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DownloadFilesAndFoldersParams) 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 -} - -// MarshalBinary interface implementation -func (m *DownloadFilesAndFoldersParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadFilesAndFoldersParams) UnmarshalBinary(b []byte) error { - var res DownloadFilesAndFoldersParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_package_parameters.go b/v1/models/download_package_parameters.go deleted file mode 100644 index a4c06aff..00000000 --- a/v1/models/download_package_parameters.go +++ /dev/null @@ -1,74 +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" -) - -// DownloadPackageParameters Download Package Parameters. -// -// Specifies the parameters needed for a request to download a new software -// package to a Cluster. -// -// swagger:model DownloadPackageParameters -type DownloadPackageParameters struct { - - // Specifies a URL from which the package can be downloaded to the Cluster. - // Required: true - URL *string `json:"url"` -} - -// Validate validates this download package parameters -func (m *DownloadPackageParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadPackageParameters) validateURL(formats strfmt.Registry) error { - - if err := validate.Required("url", "body", m.URL); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this download package parameters based on context it is used -func (m *DownloadPackageParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadPackageParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadPackageParameters) UnmarshalBinary(b []byte) error { - var res DownloadPackageParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/download_package_result.go b/v1/models/download_package_result.go deleted file mode 100644 index fd835f29..00000000 --- a/v1/models/download_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" -) - -// DownloadPackageResult Download Package Result. -// -// Specifies the result of a request to download a package to a Cluster. -// -// swagger:model DownloadPackageResult -type DownloadPackageResult struct { - - // Specifies a message describing the result of the request to download - // a package to a Cluster. - Message *string `json:"message,omitempty"` -} - -// Validate validates this download package result -func (m *DownloadPackageResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this download package result based on context it is used -func (m *DownloadPackageResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadPackageResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadPackageResult) UnmarshalBinary(b []byte) error { - var res DownloadPackageResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_exclusion_params.go b/v1/models/e_b_s_volume_exclusion_params.go deleted file mode 100644 index 6f9a5662..00000000 --- a/v1/models/e_b_s_volume_exclusion_params.go +++ /dev/null @@ -1,150 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EBSVolumeExclusionParams Message defining the different criteria to exclude EBS volumes from -// backup. This is used to specify both object-level (BackupSourceParams) and -// job-level (EnvBackupParams) exclusion criteria. -// If a criterion is specified at both object-level and job-level, then -// job-level setting will be ignored. -// -// swagger:model EBSVolumeExclusionParams -type EBSVolumeExclusionParams struct { - - // List of device names to exclude. Eg - /dev/sda1, /dev/xvdb. - DeviceNameVec []string `json:"deviceNameVec"` - - // Any volume larger than this size will be excluded. - MaxVolumeSizeBytes *int64 `json:"maxVolumeSizeBytes,omitempty"` - - // Raw boolean query given as input by the user to exclude volume based - // on tags. - // In the current version, the query contains only tags. - // Example query 1: "K1" = "V1" AND "K2" IN ("V2", "V3") AND "K4" != "V4" - // Example query 2: "K1" != "V1" OR "K2" NOT IN ("V2", "V3") OR "K4" != "V4" - // All Keys and Values must be wrapped inside double quotes. - // Comparision Operators supported : =, !=, IN, NOT IN. - // Logical Operators supported : AND, OR. - // We cannot have AND, OR together in the query. Only one of them is allowed. - // The processed form for this query is stored in the above tag_params_vec. - RawQuery *string `json:"rawQuery,omitempty"` - - // List of Tag Params to exclude EBS volumes. - TagParamsVec []*EBSVolumeExclusionParamsTagParams `json:"tagParamsVec"` - - // List of volume IDs to exclude. - // This field is only for object-level exclusions. - VolumeIDVec []string `json:"volumeIdVec"` - - // List of volume types to exclude. Eg - gp2, gp3, io1. - VolumeTypeVec []string `json:"volumeTypeVec"` -} - -// Validate validates this e b s volume exclusion params -func (m *EBSVolumeExclusionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeExclusionParams) validateTagParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.TagParamsVec); i++ { - if swag.IsZero(m.TagParamsVec[i]) { // not required - continue - } - - if m.TagParamsVec[i] != nil { - if err := m.TagParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this e b s volume exclusion params based on the context it is used -func (m *EBSVolumeExclusionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeExclusionParams) contextValidateTagParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagParamsVec); i++ { - - if m.TagParamsVec[i] != nil { - - if swag.IsZero(m.TagParamsVec[i]) { // not required - return nil - } - - if err := m.TagParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeExclusionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeExclusionParams) UnmarshalBinary(b []byte) error { - var res EBSVolumeExclusionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_exclusion_params_tag.go b/v1/models/e_b_s_volume_exclusion_params_tag.go deleted file mode 100644 index b74d1498..00000000 --- a/v1/models/e_b_s_volume_exclusion_params_tag.go +++ /dev/null @@ -1,55 +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" -) - -// EBSVolumeExclusionParamsTag Tag definition for tags on the EBS Volume. -// -// swagger:model EBSVolumeExclusionParams_Tag -type EBSVolumeExclusionParamsTag struct { - - // Key for the tag. - Key *string `json:"key,omitempty"` - - // Value for the tag. Note that if the provided tag value's length is more - // than the maximum length allowed by AWS, then the value would be - // automatically truncated before setting. - Value *string `json:"value,omitempty"` -} - -// Validate validates this e b s volume exclusion params tag -func (m *EBSVolumeExclusionParamsTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this e b s volume exclusion params tag based on context it is used -func (m *EBSVolumeExclusionParamsTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeExclusionParamsTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeExclusionParamsTag) UnmarshalBinary(b []byte) error { - var res EBSVolumeExclusionParamsTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_exclusion_params_tag_params.go b/v1/models/e_b_s_volume_exclusion_params_tag_params.go deleted file mode 100644 index fab7a64f..00000000 --- a/v1/models/e_b_s_volume_exclusion_params_tag_params.go +++ /dev/null @@ -1,190 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EBSVolumeExclusionParamsTagParams Specifies the tag vectors used to exclude EBS volumes attached to EC2 -// instances at global and object level. Contains two vectors: exclusion and -// inclusion. -// E.g., {exclusion_tag_vec: [(K1, V1), (K2, V2)], -// inclusion_tag_vec: [(K3, V3)]}. -// => This will exclude a particular volume iff it has all -// the tags in exclusion_tag_vec((K1, V1), (K2, V2)) and has none of the -// tags in the inclusion_tag_vec((K3, V3)). -// -// swagger:model EBSVolumeExclusionParams_TagParams -type EBSVolumeExclusionParamsTagParams struct { - - // exclusion tag vec - ExclusionTagVec []*EBSVolumeExclusionParamsTag `json:"exclusionTagVec"` - - // inclusion tag vec - InclusionTagVec []*EBSVolumeExclusionParamsTag `json:"inclusionTagVec"` -} - -// Validate validates this e b s volume exclusion params tag params -func (m *EBSVolumeExclusionParamsTagParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExclusionTagVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInclusionTagVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeExclusionParamsTagParams) validateExclusionTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.ExclusionTagVec) { // not required - return nil - } - - for i := 0; i < len(m.ExclusionTagVec); i++ { - if swag.IsZero(m.ExclusionTagVec[i]) { // not required - continue - } - - if m.ExclusionTagVec[i] != nil { - if err := m.ExclusionTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EBSVolumeExclusionParamsTagParams) validateInclusionTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.InclusionTagVec) { // not required - return nil - } - - for i := 0; i < len(m.InclusionTagVec); i++ { - if swag.IsZero(m.InclusionTagVec[i]) { // not required - continue - } - - if m.InclusionTagVec[i] != nil { - if err := m.InclusionTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this e b s volume exclusion params tag params based on the context it is used -func (m *EBSVolumeExclusionParamsTagParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExclusionTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInclusionTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeExclusionParamsTagParams) contextValidateExclusionTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExclusionTagVec); i++ { - - if m.ExclusionTagVec[i] != nil { - - if swag.IsZero(m.ExclusionTagVec[i]) { // not required - return nil - } - - if err := m.ExclusionTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EBSVolumeExclusionParamsTagParams) contextValidateInclusionTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InclusionTagVec); i++ { - - if m.InclusionTagVec[i] != nil { - - if swag.IsZero(m.InclusionTagVec[i]) { // not required - return nil - } - - if err := m.InclusionTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeExclusionParamsTagParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeExclusionParamsTagParams) UnmarshalBinary(b []byte) error { - var res EBSVolumeExclusionParamsTagParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_info.go b/v1/models/e_b_s_volume_info.go deleted file mode 100644 index 34cbb334..00000000 --- a/v1/models/e_b_s_volume_info.go +++ /dev/null @@ -1,140 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EBSVolumeInfo Message representing information related to a volume attached to an EC2 -// instance. -// -// swagger:model EBSVolumeInfo -type EBSVolumeInfo struct { - - // Name of the device. Eg - /dev/sdb. - DeviceName *string `json:"deviceName,omitempty"` - - // ID of the volume. - ID *string `json:"id,omitempty"` - - // True iff the volume is attached as root device for an instance. - IsRootDevice *bool `json:"isRootDevice,omitempty"` - - // Name of the volume. - Name *string `json:"name,omitempty"` - - // Size of the volume in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // tag vec - TagVec []*EBSVolumeInfoTag `json:"tagVec"` - - // Type of the volume. Eg - gp2, io1. - Type *string `json:"type,omitempty"` -} - -// Validate validates this e b s volume info -func (m *EBSVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeInfo) validateTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagVec) { // not required - return nil - } - - for i := 0; i < len(m.TagVec); i++ { - if swag.IsZero(m.TagVec[i]) { // not required - continue - } - - if m.TagVec[i] != nil { - if err := m.TagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this e b s volume info based on the context it is used -func (m *EBSVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EBSVolumeInfo) contextValidateTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagVec); i++ { - - if m.TagVec[i] != nil { - - if swag.IsZero(m.TagVec[i]) { // not required - return nil - } - - if err := m.TagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeInfo) UnmarshalBinary(b []byte) error { - var res EBSVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_info_tag.go b/v1/models/e_b_s_volume_info_tag.go deleted file mode 100644 index ed962455..00000000 --- a/v1/models/e_b_s_volume_info_tag.go +++ /dev/null @@ -1,55 +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" -) - -// EBSVolumeInfoTag Tag definition for tags on the EBS Volume. -// -// swagger:model EBSVolumeInfo_Tag -type EBSVolumeInfoTag struct { - - // Key for the tag. - Key *string `json:"key,omitempty"` - - // Value for the tag. Note that if the provided tag value's length is more - // than the maximum length allowed by AWS, then the value would be - // automatically truncated before setting. - Value *string `json:"value,omitempty"` -} - -// Validate validates this e b s volume info tag -func (m *EBSVolumeInfoTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this e b s volume info tag based on context it is used -func (m *EBSVolumeInfoTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeInfoTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeInfoTag) UnmarshalBinary(b []byte) error { - var res EBSVolumeInfoTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/e_b_s_volume_tag.go b/v1/models/e_b_s_volume_tag.go deleted file mode 100644 index 95f49b40..00000000 --- a/v1/models/e_b_s_volume_tag.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" -) - -// EBSVolumeTag Tag for the EBSVolume for AWS EC2 instance. -// -// swagger:model EBSVolumeTag -type EBSVolumeTag struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this e b s volume tag -func (m *EBSVolumeTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this e b s volume tag based on context it is used -func (m *EBSVolumeTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EBSVolumeTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSVolumeTag) UnmarshalBinary(b []byte) error { - var res EBSVolumeTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ebs_volume_info.go b/v1/models/ebs_volume_info.go deleted file mode 100644 index 31d24f81..00000000 --- a/v1/models/ebs_volume_info.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EbsVolumeInfo AWS Volume Info. -// -// Specifies information about an AWS volume attached to an EC2 instance. -// -// swagger:model EbsVolumeInfo -type EbsVolumeInfo struct { - - // Specifies the name of the device. Eg - /dev/sdb. - DeviceName *string `json:"deviceName,omitempty"` - - // Specifies the ID of the volume. - ID *string `json:"id,omitempty"` - - // Specifies if the volume is attached as root device. - IsRootDevice *bool `json:"isRootDevice,omitempty"` - - // Specifies the name of the volume. - Name *string `json:"name,omitempty"` - - // Specifies the size of the volume in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the list of tags on EBS volume. - Tags []*EBSVolumeTag `json:"tags"` - - // Specifies the type of the volume. Eg - gp2, io1. - Type *string `json:"type,omitempty"` -} - -// Validate validates this ebs volume info -func (m *EbsVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EbsVolumeInfo) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - for i := 0; i < len(m.Tags); i++ { - if swag.IsZero(m.Tags[i]) { // not required - continue - } - - if m.Tags[i] != nil { - if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ebs volume info based on the context it is used -func (m *EbsVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EbsVolumeInfo) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tags); i++ { - - if m.Tags[i] != nil { - - if swag.IsZero(m.Tags[i]) { // not required - return nil - } - - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EbsVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EbsVolumeInfo) UnmarshalBinary(b []byte) error { - var res EbsVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/edit_hosts_parameters.go b/v1/models/edit_hosts_parameters.go deleted file mode 100644 index 802bf293..00000000 --- a/v1/models/edit_hosts_parameters.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EditHostsParameters Edit Hosts Parameters. -// -// Specifies the parameters needed for an edit hosts request. -// -// swagger:model EditHostsParameters -type EditHostsParameters struct { - - // Specifies the list of host entries to be edited. Each IP address listed - // in the list of host entries will have its corresponding domain names in - // the /etc/hosts file replaced with the domain names specified here. - Hosts []*HostEntry `json:"hosts"` -} - -// Validate validates this edit hosts parameters -func (m *EditHostsParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EditHostsParameters) validateHosts(formats strfmt.Registry) error { - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this edit hosts parameters based on the context it is used -func (m *EditHostsParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EditHostsParameters) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EditHostsParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EditHostsParameters) UnmarshalBinary(b []byte) error { - var res EditHostsParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/elastifile_cluster.go b/v1/models/elastifile_cluster.go deleted file mode 100644 index f8f9a628..00000000 --- a/v1/models/elastifile_cluster.go +++ /dev/null @@ -1,64 +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" -) - -// ElastifileCluster Elastifile Cluster. -// -// Specifies information about a Elastifile Cluster. -// -// swagger:model ElastifileCluster -type ElastifileCluster struct { - - // IP addresses of Elastifile nodes. - EnodeIPAddressVec []string `json:"enodeIpAddressVec"` - - // Specifies the load balancer VIP if present. - LoadBalancerVip *string `json:"loadBalancerVip,omitempty"` - - // Specifies name of a Elastifile Cluster - Name *string `json:"name,omitempty"` - - // Specifies the UUID of a Elastifile Cluster. - UUID *string `json:"uuid,omitempty"` - - // Specifies the version of a Elastifile Cluster. - Version *string `json:"version,omitempty"` -} - -// Validate validates this elastifile cluster -func (m *ElastifileCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this elastifile cluster based on context it is used -func (m *ElastifileCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileCluster) UnmarshalBinary(b []byte) error { - var res ElastifileCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/elastifile_container.go b/v1/models/elastifile_container.go deleted file mode 100644 index 257e24d6..00000000 --- a/v1/models/elastifile_container.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ElastifileContainer Elastifile Container. -// -// Specifies information about container in an Elastifile Cluster. -// -// swagger:model ElastifileContainer -type ElastifileContainer struct { - - // Specifies the creation date of the container. - CreatedAt *string `json:"createdAt,omitempty"` - - // Specifies id of a Elastifile Container in a Cluster. - ID *int32 `json:"id,omitempty"` - - // Specifies if the container has NFS volumes or not. - IsNfsInterface *bool `json:"isNfsInterface,omitempty"` - - // Specifies if the container has SMB volumes or not. - IsSmbInterface *bool `json:"isSmbInterface,omitempty"` - - // Specifies the name of the container. - Name *string `json:"name,omitempty"` - - // Specifies Elastifile supported Protocol information enabled on Elastifile - // container. - // 'kNfs' indicates NFS protocol in an elastifile container. - // 'kSmb' indicates SMB protocol in an elastifile container. - Protocols []string `json:"protocols"` - - // Specifies the bytes used by the container. - UsedBytes *int64 `json:"usedBytes,omitempty"` - - // Specifies the UUID of the container. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this elastifile container -func (m *ElastifileContainer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var elastifileContainerProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - elastifileContainerProtocolsItemsEnum = append(elastifileContainerProtocolsItemsEnum, v) - } -} - -func (m *ElastifileContainer) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, elastifileContainerProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ElastifileContainer) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this elastifile container based on context it is used -func (m *ElastifileContainer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileContainer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileContainer) UnmarshalBinary(b []byte) error { - var res ElastifileContainer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/elastifile_protection_source.go b/v1/models/elastifile_protection_source.go deleted file mode 100644 index 15cd8e9b..00000000 --- a/v1/models/elastifile_protection_source.go +++ /dev/null @@ -1,222 +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" -) - -// ElastifileProtectionSource Elastifile Protection Source. -// -// Specifies a Protection Source in Elastifile environment. -// -// swagger:model ElastifileProtectionSource -type ElastifileProtectionSource struct { - - // Specifies information of Elastifile Cluster. This is set only - // when the entity type is 'kCluster'. - Cluster *ElastifileCluster `json:"cluster,omitempty"` - - // Specifies a container in an Elastifile Cluster. This is set only - // when the entity type is 'kContainer'. - Container *ElastifileContainer `json:"container,omitempty"` - - // Specifies a unique name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies the type of the entity in an Elastifile file system - // like 'kCluster', 'kContainer'. - // 'kCluster' indicates an Elastifile Cluster. - // 'kContainer' indicates a container on Elastifile cluster. - // Enum: ["kCluster","kContainer"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this elastifile protection source -func (m *ElastifileProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileProtectionSource) validateCluster(formats strfmt.Registry) error { - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionSource) validateContainer(formats strfmt.Registry) error { - if swag.IsZero(m.Container) { // not required - return nil - } - - if m.Container != nil { - if err := m.Container.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("container") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("container") - } - return err - } - } - - return nil -} - -var elastifileProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kContainer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - elastifileProtectionSourceTypeTypePropEnum = append(elastifileProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // ElastifileProtectionSourceTypeKCluster captures enum value "kCluster" - ElastifileProtectionSourceTypeKCluster string = "kCluster" - - // ElastifileProtectionSourceTypeKContainer captures enum value "kContainer" - ElastifileProtectionSourceTypeKContainer string = "kContainer" -) - -// prop value enum -func (m *ElastifileProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, elastifileProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ElastifileProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this elastifile protection source based on the context it is used -func (m *ElastifileProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileProtectionSource) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.Cluster != nil { - - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionSource) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.Container != nil { - - if swag.IsZero(m.Container) { // not required - return nil - } - - if err := m.Container.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("container") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("container") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileProtectionSource) UnmarshalBinary(b []byte) error { - var res ElastifileProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/email_delivery_target.go b/v1/models/email_delivery_target.go deleted file mode 100644 index c6cba764..00000000 --- a/v1/models/email_delivery_target.go +++ /dev/null @@ -1,116 +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" -) - -// EmailDeliveryTarget EmailDeliveryTarget -// Specifies the email address and the locale setting for it. -// -// swagger:model EmailDeliveryTarget -type EmailDeliveryTarget struct { - - // email address - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies the language in which the emails sent to the above defined - // mail address should be in. - Locale *string `json:"locale,omitempty"` - - // Specifies the recipient type on how the emails are to received. - // The email recipient type. - // 'kTo' indicates the primary receiver type - // 'kCc' indicates the carbon copy receiver type - // Enum: ["kTo","kCc"] - RecipientType *string `json:"recipientType,omitempty"` -} - -// Validate validates this email delivery target -func (m *EmailDeliveryTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecipientType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var emailDeliveryTargetTypeRecipientTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kTo","kCc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - emailDeliveryTargetTypeRecipientTypePropEnum = append(emailDeliveryTargetTypeRecipientTypePropEnum, v) - } -} - -const ( - - // EmailDeliveryTargetRecipientTypeKTo captures enum value "kTo" - EmailDeliveryTargetRecipientTypeKTo string = "kTo" - - // EmailDeliveryTargetRecipientTypeKCc captures enum value "kCc" - EmailDeliveryTargetRecipientTypeKCc string = "kCc" -) - -// prop value enum -func (m *EmailDeliveryTarget) validateRecipientTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, emailDeliveryTargetTypeRecipientTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *EmailDeliveryTarget) validateRecipientType(formats strfmt.Registry) error { - if swag.IsZero(m.RecipientType) { // not required - return nil - } - - // value enum - if err := m.validateRecipientTypeEnum("recipientType", "body", *m.RecipientType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this email delivery target based on context it is used -func (m *EmailDeliveryTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EmailDeliveryTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EmailDeliveryTarget) UnmarshalBinary(b []byte) error { - var res EmailDeliveryTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/email_meta_data.go b/v1/models/email_meta_data.go deleted file mode 100644 index c1a21906..00000000 --- a/v1/models/email_meta_data.go +++ /dev/null @@ -1,112 +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" -) - -// EmailMetaData Email Meta Data. -// -// Specifies details about the emails and the folder containing emails. -// -// swagger:model EmailMetaData -type EmailMetaData struct { - - // AllUnderHierarchy specifies if logs of all the tenants under the hierarchy - // of tenant with id TenantId should be returned. - AllUnderHierarchy *bool `json:"allUnderHierarchy,omitempty"` - - // Specifies the email addresses of the bcc recipients. - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - // Specifies the email addresses of the cc recipients. - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - // Specifies the directory path to the item. - DirectoryPath *string `json:"directoryPath,omitempty"` - - // Specifies the domain Ids in which mailboxes are registered. - DomainIds []int64 `json:"domainIds"` - - // Specifies the subject of the email. - EmailSubject *string `json:"emailSubject,omitempty"` - - // Specifes the Parent Folder key. - FolderKey *int64 `json:"folderKey,omitempty"` - - // Specifies the parent folder name of the email. - FolderName *string `json:"folderName,omitempty"` - - // Specifies whether the emails have any attachments. - HasAttachments *bool `json:"hasAttachments,omitempty"` - - // Specifies the Key(unique within mailbox) for Outlook item such as Email. - // This key is not indexed but used for identifying the item while restore. - ItemKey *string `json:"itemKey,omitempty"` - - // Specifies the mailbox Ids which contains the emails/folders. - MailboxIds []int64 `json:"mailboxIds"` - - // Specifies the protection job Ids which have backed up mailbox(es) - // continaing emails/folders. - ProtectionJobIds []int64 `json:"protectionJobIds"` - - // Specifies the unix end time for querying on email's received time. - ReceivedEndTime *int64 `json:"receivedEndTime,omitempty"` - - // Specifies the unix start time for querying on email's received time. - ReceivedStartTime *int64 `json:"receivedStartTime,omitempty"` - - // Specifies the unix time when the email was received. - ReceivedTimeSeconds *int64 `json:"receivedTimeSeconds,omitempty"` - - // Specifies the email addresses of the recipients. - RecipientAddresses []string `json:"recipientAddresses"` - - // Specifies the email address of the sender. - SenderAddress *string `json:"senderAddress,omitempty"` - - // Specifies the unix time when the email was sent. - SentTimeSeconds *int64 `json:"sentTimeSeconds,omitempty"` - - // Specifies whether the query result should include only Email folders. - ShowOnlyEmailFolders *bool `json:"showOnlyEmailFolders,omitempty"` - - // TenantId specifies the tenant whose action resulted in the audit log. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this email meta data -func (m *EmailMetaData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this email meta data based on context it is used -func (m *EmailMetaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EmailMetaData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EmailMetaData) UnmarshalBinary(b []byte) error { - var res EmailMetaData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/encryption_configuration.go b/v1/models/encryption_configuration.go deleted file mode 100644 index 303f7150..00000000 --- a/v1/models/encryption_configuration.go +++ /dev/null @@ -1,68 +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" -) - -// EncryptionConfiguration Encryption Configuration. -// -// Specifies the parameters the user wants to use when configuring encryption -// for the new Cluster. -// -// swagger:model EncryptionConfiguration -type EncryptionConfiguration struct { - - // Specifies whether or not to enable FIPS mode. EnableSoftwareEncryption - // must be set to true in order to enable FIPS. - EnableFipsMode *bool `json:"enableFipsMode,omitempty"` - - // Specifies whether or not to enable hardware encryption. If hardware - // encryption is enabled, all data disks of the Cluster will be encrypted. - // This can only be enabled at Cluster creation time and cannot be disabled - // later. - EnableHardwareEncryption *bool `json:"enableHardwareEncryption,omitempty"` - - // Specifies whether or not to enable software encryption. If software - // encryption is enabled, all data on the Cluster will be encrypted. This - // can only be enabled at Cluster creation time and cannot be disabled later. - EnableSoftwareEncryption *bool `json:"enableSoftwareEncryption,omitempty"` - - // Specifies the rotation period for encryption keys in days. - RotationPeriod *int32 `json:"rotationPeriod,omitempty"` -} - -// Validate validates this encryption configuration -func (m *EncryptionConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this encryption configuration based on context it is used -func (m *EncryptionConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EncryptionConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EncryptionConfiguration) UnmarshalBinary(b []byte) error { - var res EncryptionConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/encryption_params.go b/v1/models/encryption_params.go deleted file mode 100644 index e9c873b3..00000000 --- a/v1/models/encryption_params.go +++ /dev/null @@ -1,118 +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" -) - -// EncryptionParams Encryption params for restore type krecoverVms. -// -// swagger:model EncryptionParams -type EncryptionParams struct { - - // String containing kms key arn in case of custom key option. - // Example: arn:aws:kms:::key/ - CustomKmsKeyArn *string `json:"customKmsKeyArn,omitempty"` - - // KMS key to be used to encrypt the restored volume. This is only - // valid for selection from dropdown. - KmsKey *EntityProto `json:"kmsKey,omitempty"` - - // Whether to encrypt the restored instance's volumes or not. For recovery to - // new location, this will be true by default. - ShouldEncrypt *bool `json:"shouldEncrypt,omitempty"` -} - -// Validate validates this encryption params -func (m *EncryptionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKmsKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EncryptionParams) validateKmsKey(formats strfmt.Registry) error { - if swag.IsZero(m.KmsKey) { // not required - return nil - } - - if m.KmsKey != nil { - if err := m.KmsKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKey") - } - return err - } - } - - return nil -} - -// ContextValidate validate this encryption params based on the context it is used -func (m *EncryptionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKmsKey(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EncryptionParams) contextValidateKmsKey(ctx context.Context, formats strfmt.Registry) error { - - if m.KmsKey != nil { - - if swag.IsZero(m.KmsKey) { // not required - return nil - } - - if err := m.KmsKey.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKey") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EncryptionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EncryptionParams) UnmarshalBinary(b []byte) error { - var res EncryptionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity.go b/v1/models/entity.go deleted file mode 100644 index dfc58de8..00000000 --- a/v1/models/entity.go +++ /dev/null @@ -1,602 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Entity Message encapsulating a Kubernetes entity -// -// swagger:model Entity -type Entity struct { - - // Software version of the agent running in the DataMover pod. - DatamoverAgentVersion *string `json:"datamoverAgentVersion,omitempty"` - - // Location of the datamover image specified by the user. - DatamoverImageLocation *string `json:"datamoverImageLocation,omitempty"` - - // Type of service to be deployed for communication with DataMover pods. - // Currently, LoadBalancer and NodePort are supported. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // Indicates if deployed datamover needs to be upgraded - // for this kubernetes entity. - DatamoverUpgradability *int32 `json:"datamoverUpgradability,omitempty"` - - // VLAN information of the default VLAN. - DefaultVlanParams *VlanParams `json:"defaultVlanParams,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // K8s distribution. This will only be applicable to kCluster entities. - Distribution *int32 `json:"distribution,omitempty"` - - // Location of the init container image specified by the user. - InitContainerImageLocation *string `json:"initContainerImageLocation,omitempty"` - - // IP mode of the kubernetes source. - IPMode *IPMode `json:"ipMode,omitempty"` - - // Label attributes vector contains info about the label nodes corresponding - // to the current entity's labels. - // TODO(jhwang): Make it applicable to non-kNamespace type entities also. - LabelAttributesVec []*LabelAttributesInfo `json:"labelAttributesVec"` - - // List of labels associated with this entity in the form "key:value". - // Currently, only populated for PVCs to be used for label based - // include/exclude filters. - LabelVec []string `json:"labelVec"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Namespace of object, if applicable. - // For a PV, this field stores the namespace of the PVC which is bound to the - // PV. - Namespace *string `json:"namespace,omitempty"` - - // Name of the PVC which is bound to the PV. Applicable only to - // 'kPersistentVolume' type entity. - PvcName *string `json:"pvcName,omitempty"` - - // Contains generic annotations to be put on services. - ServiceAnnotations []*EntityServiceAnnotationsEntry `json:"serviceAnnotations"` - - // A mapping from datamover services to corresponding unique connector_params - // IDs. This will be generated during registration and updated during - // refresh. Applicable only for 'kCluster' type entities. - ServicesToConnectorIdsMap []*EntityServicesToConnectorIdsMapEntry `json:"servicesToConnectorIdsMap"` - - // This is populated for the root entity only (type kCluster). - StorageClassVec []*EntityStorageClassInfo `json:"storageClassVec"` - - // Custom tolerations for Datamover pods. - TolerationsVec []*PodInfoPodSpecToleration `json:"tolerationsVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` - - // Location of the Velero AWS plugin image specified by the user. - VeleroAwsPluginImageLocation *string `json:"veleroAwsPluginImageLocation,omitempty"` - - // Location of the Velero image specified by the user. - VeleroImageLocation *string `json:"veleroImageLocation,omitempty"` - - // Location of the Velero Openshift plugin image specified by the user. - VeleroOpenshiftPluginImageLocation *string `json:"veleroOpenshiftPluginImageLocation,omitempty"` - - // Indicates if deployed Velero image needs to be upgraded - // for this kubernetes entity. - VeleroUpgradability *int32 `json:"veleroUpgradability,omitempty"` - - // Velero version deployed. - VeleroVersion *string `json:"veleroVersion,omitempty"` - - // Kubernetes cluster version. - Version *string `json:"version,omitempty"` - - // VLAN information provided during registration. - VlanInfoVec []*VlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this entity -func (m *Entity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServicesToConnectorIdsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClassVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTolerationsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Entity) validateDefaultVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if m.DefaultVlanParams != nil { - if err := m.DefaultVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *Entity) validateIPMode(formats strfmt.Registry) error { - if swag.IsZero(m.IPMode) { // not required - return nil - } - - if m.IPMode != nil { - if err := m.IPMode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipMode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipMode") - } - return err - } - } - - return nil -} - -func (m *Entity) validateLabelAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.LabelAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.LabelAttributesVec); i++ { - if swag.IsZero(m.LabelAttributesVec[i]) { // not required - continue - } - - if m.LabelAttributesVec[i] != nil { - if err := m.LabelAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) validateServicesToConnectorIdsMap(formats strfmt.Registry) error { - if swag.IsZero(m.ServicesToConnectorIdsMap) { // not required - return nil - } - - for i := 0; i < len(m.ServicesToConnectorIdsMap); i++ { - if swag.IsZero(m.ServicesToConnectorIdsMap[i]) { // not required - continue - } - - if m.ServicesToConnectorIdsMap[i] != nil { - if err := m.ServicesToConnectorIdsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) validateStorageClassVec(formats strfmt.Registry) error { - if swag.IsZero(m.StorageClassVec) { // not required - return nil - } - - for i := 0; i < len(m.StorageClassVec); i++ { - if swag.IsZero(m.StorageClassVec[i]) { // not required - continue - } - - if m.StorageClassVec[i] != nil { - if err := m.StorageClassVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) validateTolerationsVec(formats strfmt.Registry) error { - if swag.IsZero(m.TolerationsVec) { // not required - return nil - } - - for i := 0; i < len(m.TolerationsVec); i++ { - if swag.IsZero(m.TolerationsVec[i]) { // not required - continue - } - - if m.TolerationsVec[i] != nil { - if err := m.TolerationsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity based on the context it is used -func (m *Entity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPMode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabelAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServicesToConnectorIdsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageClassVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTolerationsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Entity) contextValidateDefaultVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultVlanParams != nil { - - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if err := m.DefaultVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *Entity) contextValidateIPMode(ctx context.Context, formats strfmt.Registry) error { - - if m.IPMode != nil { - - if swag.IsZero(m.IPMode) { // not required - return nil - } - - if err := m.IPMode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipMode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipMode") - } - return err - } - } - - return nil -} - -func (m *Entity) contextValidateLabelAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelAttributesVec); i++ { - - if m.LabelAttributesVec[i] != nil { - - if swag.IsZero(m.LabelAttributesVec[i]) { // not required - return nil - } - - if err := m.LabelAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) contextValidateServicesToConnectorIdsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServicesToConnectorIdsMap); i++ { - - if m.ServicesToConnectorIdsMap[i] != nil { - - if swag.IsZero(m.ServicesToConnectorIdsMap[i]) { // not required - return nil - } - - if err := m.ServicesToConnectorIdsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) contextValidateStorageClassVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageClassVec); i++ { - - if m.StorageClassVec[i] != nil { - - if swag.IsZero(m.StorageClassVec[i]) { // not required - return nil - } - - if err := m.StorageClassVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) contextValidateTolerationsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TolerationsVec); i++ { - - if m.TolerationsVec[i] != nil { - - if swag.IsZero(m.TolerationsVec[i]) { // not required - return nil - } - - if err := m.TolerationsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Entity) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Entity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Entity) UnmarshalBinary(b []byte) error { - var res Entity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_access_info.go b/v1/models/entity_access_info.go deleted file mode 100644 index 5e04dd52..00000000 --- a/v1/models/entity_access_info.go +++ /dev/null @@ -1,139 +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" -) - -// EntityAccessInfo entity access info -// -// swagger:model EntityAccessInfo -type EntityAccessInfo struct { - - // The endpoint information of the delegate agent to access the entity. - // NOTE: This takes precedence when estabilishing connections to over - // endpoint. This is presently used in Hyper-V environment. - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - // The agent port information to reach the agent. - AgentPort *int32 `json:"agentPort,omitempty"` - - // Credentials that will be used to login to the environment. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // The endpoint URL to access the entity. - Endpoint *string `json:"endpoint,omitempty"` - - // Optional type of the host (such as Windows/Linux). - HostType *int32 `json:"hostType,omitempty"` - - // Stores the region name which decides the endpoint to be used by all - // o365 connector ops. - Office365Region *string `json:"office365Region,omitempty"` - - // The list of entity ids of the windows physical host which will be used for - // backup and recovery of templates of the site that belong to a o365 domain. - // This will be used for Exchange Online PST download as well. - ProxyEntityIDVec []int64 `json:"proxyEntityIdVec"` - - // The type of environment behind the endpoint. - Type *int32 `json:"type,omitempty"` - - // Whether OAuth should be used for authentication with EWS API (outlook - // backup), applicable only for Exchange Online. - UseOutlookEwsOauth *bool `json:"useOutlookEwsOauth,omitempty"` -} - -// Validate validates this entity access info -func (m *EntityAccessInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityAccessInfo) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity access info based on the context it is used -func (m *EntityAccessInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityAccessInfo) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityAccessInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityAccessInfo) UnmarshalBinary(b []byte) error { - var res EntityAccessInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_arg_wrapper.go b/v1/models/entity_arg_wrapper.go deleted file mode 100644 index c6512b42..00000000 --- a/v1/models/entity_arg_wrapper.go +++ /dev/null @@ -1,372 +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" -) - -// EntityArgWrapper EntityArgWrapper is a wrapper for protobuf args needed by create, update and -// delete operations on backup sources. -// -// swagger:model EntityArgWrapper -type EntityArgWrapper struct { - - // Specifies the Bifrost realm to be associated with the source root. - // Whenever needed, the workflows related to this source would then - // only use Bifrosts from the specified realm. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // This helps to set the exchange dag backup preference. - DagBackupPreference *ExchangeDAGBackupPreference `json:"dagBackupPreference,omitempty"` - - // If set, user has encrypted the credential with ecryption key. - // It is assumed that credentials are first encrypted using - // internal magento key and then encrypted using encryption key. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Entity specifies the backup source to be updated (for update and delete - // operations only). - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // EntityAccessInfo specifies the access info for the backup source. - // Only needed for create and update operations. - EntityInfo *EntityAccessInfo `json:"entityInfo,omitempty"` - - // ForceRegister is applicable to Physical Environment. By default, the agent - // running on a physical host will fail the registration, if it is already - // registered as part of another cluster. By setting this option to true, - // agent can be forced to register with the current cluster. This is a hidden - // parameter and should not be documented externally. - ForceRegister *bool `json:"forceRegister,omitempty"` - - // Set to true if credentials are encrypted by internal magneto key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // This is applicable only for physical hosts. This indicates the physical - // host will be used as proxy host. - IsProxyHost *bool `json:"isProxyHost,omitempty"` - - // Specifies the last time this source was updated. If this is - // passed into a PUT request, then the backend will validate that the - // timestamp passed in matches the time that the source was - // actually last modified. If the two timestamps do not match, then the - // request will be rejected with a stale error. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // ReRegister is applicable to Physical Environment. By default, the - // agent running on a physical host will fail the registration, if it is - // already registered with the cluster. By setting this option to true, agent - // can be re-registered with the current cluster. - ReRegister *bool `json:"reRegister,omitempty"` - - // RegisteredEntityParams contains all params specified by the user while - // registering the entity. - RegisteredEntityParams *RegisteredEntityParams `json:"registeredEntityParams,omitempty"` - - // RestoreConfig is applicable to Physical Environment. The ReRegister option - // needs to be true if RestoreConfig is true. By setting this option to true, - // the agent configuration can be restored. - RestoreConfig *bool `json:"restoreConfig,omitempty"` - - // RetryEntityRegistration will force to retry a physical host registration. - RetryEntityRegistration *bool `json:"retryEntityRegistration,omitempty"` - - // This controls whether to use source side dedup on the source or not. - // This is only applicable to sources which support source side dedup - // (e.g., Linux physical servers). - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // ThrottlingPolicy is the throttling policy that should be applied to the - // entity when pulling data from the primary storage. - ThrottlingPolicy *ThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // This option is available only for VMWare VM entities. It indicates that - // persistent agent is available on the VM. - VMUsesPersistentAgent *bool `json:"vmUsesPersistentAgent,omitempty"` -} - -// Validate validates this entity arg wrapper -func (m *EntityArgWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDagBackupPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntityParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityArgWrapper) validateDagBackupPreference(formats strfmt.Registry) error { - if swag.IsZero(m.DagBackupPreference) { // not required - return nil - } - - if m.DagBackupPreference != nil { - if err := m.DagBackupPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagBackupPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagBackupPreference") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) validateEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityInfo) { // not required - return nil - } - - if m.EntityInfo != nil { - if err := m.EntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityInfo") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) validateRegisteredEntityParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntityParams) { // not required - return nil - } - - if m.RegisteredEntityParams != nil { - if err := m.RegisteredEntityParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityParams") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -// ContextValidate validate this entity arg wrapper based on the context it is used -func (m *EntityArgWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDagBackupPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntityParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityArgWrapper) contextValidateDagBackupPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.DagBackupPreference != nil { - - if swag.IsZero(m.DagBackupPreference) { // not required - return nil - } - - if err := m.DagBackupPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagBackupPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagBackupPreference") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) contextValidateEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityInfo != nil { - - if swag.IsZero(m.EntityInfo) { // not required - return nil - } - - if err := m.EntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityInfo") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) contextValidateRegisteredEntityParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntityParams != nil { - - if swag.IsZero(m.RegisteredEntityParams) { // not required - return nil - } - - if err := m.RegisteredEntityParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityParams") - } - return err - } - } - - return nil -} - -func (m *EntityArgWrapper) 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 -} - -// MarshalBinary interface implementation -func (m *EntityArgWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityArgWrapper) UnmarshalBinary(b []byte) error { - var res EntityArgWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_attribute_map_entry.go b/v1/models/entity_attribute_map_entry.go deleted file mode 100644 index 7bf1c40d..00000000 --- a/v1/models/entity_attribute_map_entry.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" -) - -// EntityAttributeMapEntry entity attribute map entry -// -// swagger:model Entity_AttributeMapEntry -type EntityAttributeMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this entity attribute map entry -func (m *EntityAttributeMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity attribute map entry based on context it is used -func (m *EntityAttributeMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityAttributeMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityAttributeMapEntry) UnmarshalBinary(b []byte) error { - var res EntityAttributeMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_backup_stats.go b/v1/models/entity_backup_stats.go deleted file mode 100644 index 24e57996..00000000 --- a/v1/models/entity_backup_stats.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityBackupStats entity backup stats -// -// swagger:model EntityBackupStats -type EntityBackupStats struct { - - // Bytes read from the source during the current backup task. For example, - // we only read the changed data during an incremental backup. - BytesRead *int64 `json:"bytesRead,omitempty"` - - // Bytes written to SnapFS (<=bytes_read due to dedup and compression). - BytesWritten *int64 `json:"bytesWritten,omitempty"` - - // entity size info - EntitySizeInfo *EntitySizeInfo `json:"entitySizeInfo,omitempty"` - - // This indicates the subset of EntitySizeInfo.source_data_size_bytes that - // is protected. This suffers for both the sources of ambiguity mentioned - // for EntitySizeInfo.source_data_size_bytes. - // - // Additional ambiguity / limitation : - // E.g. For VMware, the VMware tools based info does not provide details that - // can be used to remove info for volumes that are part of the excluded disk. - // - // Due to the above ambiguity, this can be accurate only for agent based - // adapters. - SourceProtectedDataSizeBytes *int64 `json:"sourceProtectedDataSizeBytes,omitempty"` - - // source protected data size bytes computation method - SourceProtectedDataSizeBytesComputationMethod *int32 `json:"sourceProtectedDataSizeBytesComputationMethod,omitempty"` - - // Total logical size of the source that is protected. This is optional. When - // not set, we assume that the full logical size of the entity - // (EntitySizeInfo.source_provisioned_logical_size_bytes) is protected. - // This field is present to account for the case where there are disk - // exclusions for a protected VM. - SourceProtectedLogicalSizeBytes *int64 `json:"sourceProtectedLogicalSizeBytes,omitempty"` -} - -// Validate validates this entity backup stats -func (m *EntityBackupStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntitySizeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityBackupStats) validateEntitySizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntitySizeInfo) { // not required - return nil - } - - if m.EntitySizeInfo != nil { - if err := m.EntitySizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entitySizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entitySizeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity backup stats based on the context it is used -func (m *EntityBackupStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntitySizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityBackupStats) contextValidateEntitySizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntitySizeInfo != nil { - - if swag.IsZero(m.EntitySizeInfo) { // not required - return nil - } - - if err := m.EntitySizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entitySizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entitySizeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityBackupStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityBackupStats) UnmarshalBinary(b []byte) error { - var res EntityBackupStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_common_info.go b/v1/models/entity_common_info.go deleted file mode 100644 index 9e49de4b..00000000 --- a/v1/models/entity_common_info.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/strfmt" - "github.com/go-openapi/swag" -) - -// EntityCommonInfo The following proto contains information common to all types of cloud -// entities. -// -// swagger:model EntityCommonInfo -type EntityCommonInfo struct { - - // Id given to the entity by the cloud provider. - // - // In case of Azure, depending upon the type of the entity, Azure returns - // unix path style id. Examples: - // - // Id for a subscription: /subscriptions/3215d0a4-e99d-4b0c-b106-e2a7708e0024 - // Id for a resource group: - // subscriptions/3215d0a4-e99d-4b0c-b106-e2a7708e0024/resourceGroups/tumri - // - // For storage container and storage key we generate the id ourself. - // - // storage container: /c/ - // storage key: /k/ - ID *string `json:"id,omitempty"` - - // Name of the entity. It is set to the name given to the entity by the cloud - // provider. If the cloud provider doesn't provide name for the entity, it - // wont' be set. This could be set to the virtual machine name if the entity - // type is kVirtualMachine. - Name *string `json:"name,omitempty"` - - // If this entity is protected using Physical Agent, it must be registered - // as a physical host. The following is id of the entity corresponding to the - // physical host. - PhysicalEntityID *int64 `json:"physicalEntityId,omitempty"` - - // The following is set to id of the "convert and deploy" restore task that - // created the entity in the cloud. - // - // It is required to support the DR-to-cloud usecase where we replicate an - // on-prem entity to a cluster running in cloud, bring it up using - // "convert and deploy" mechanism, protect it using a cloud job that uses - // physical adapter, and convert it back to the on-prem format before - // replication. - // - // Before replicating, we need to update the backup task state of the backed - // up entity using the on-prem entity and on-prem entity's parent. - // The id is used to lookup the restore entity that contains details about - // the on-prem entity. - // - // It is set at the time of refreshing the cloud entity hierarchy if all the - // following conditions are met: - // Name of the current entity matches with name of any cloud entity - // deployed using the "convert and deploy" restore task. - // Restore entity associated with the above matched cloud entity has - // 'failed_over' flag set to true in its cloud extension. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Type of subscription. - SubscriptionType *int32 `json:"subscriptionType,omitempty"` -} - -// Validate validates this entity common info -func (m *EntityCommonInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity common info based on context it is used -func (m *EntityCommonInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityCommonInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityCommonInfo) UnmarshalBinary(b []byte) error { - var res EntityCommonInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_external_metadata_proto.go b/v1/models/entity_external_metadata_proto.go deleted file mode 100644 index 2ed9df42..00000000 --- a/v1/models/entity_external_metadata_proto.go +++ /dev/null @@ -1,218 +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" -) - -// EntityExternalMetadataProto Message to store external metadata as part of EntityHierarchyProto. -// Adapters can add thier specific extensions. -// -// extension Location No. -// ============================================================================= -// azure_sql_entity_metadata magneto/connectors/azure/azure.proto 100 -// -// swagger:model EntityExternalMetadataProto -type EntityExternalMetadataProto struct { - - // Connector params required to connect to the external entity if applicable. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Information about maintenance mode, if applicable. - // Maintenance mode is currently supported only for top-level registered - // entities. - MaintenanceModeConfig *MaintenanceModeConfigProto `json:"maintenanceModeConfig,omitempty"` - - // These params may be specified for uda entities. - UdaParams *RegisteredEntityUdaParams `json:"udaParams,omitempty"` -} - -// Validate validates this entity external metadata proto -func (m *EntityExternalMetadataProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceModeConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityExternalMetadataProto) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *EntityExternalMetadataProto) validateMaintenanceModeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if m.MaintenanceModeConfig != nil { - if err := m.MaintenanceModeConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *EntityExternalMetadataProto) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity external metadata proto based on the context it is used -func (m *EntityExternalMetadataProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceModeConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityExternalMetadataProto) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *EntityExternalMetadataProto) contextValidateMaintenanceModeConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceModeConfig != nil { - - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if err := m.MaintenanceModeConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *EntityExternalMetadataProto) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityExternalMetadataProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityExternalMetadataProto) UnmarshalBinary(b []byte) error { - var res EntityExternalMetadataProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_group_membership_info.go b/v1/models/entity_group_membership_info.go deleted file mode 100644 index 5f3e2e0e..00000000 --- a/v1/models/entity_group_membership_info.go +++ /dev/null @@ -1,55 +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" -) - -// EntityGroupMembershipInfo The entity-ids of security groups which this user entity is member of. -// -// This is filled for only user entities and only for security groups. -// -// swagger:model Entity_GroupMembershipInfo -type EntityGroupMembershipInfo struct { - - // The entity id of security group. - GroupEntityID *int64 `json:"groupEntityId,omitempty"` - - // The uuid of security group. - GroupGraphUUID *string `json:"groupGraphUuid,omitempty"` -} - -// Validate validates this entity group membership info -func (m *EntityGroupMembershipInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity group membership info based on context it is used -func (m *EntityGroupMembershipInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityGroupMembershipInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityGroupMembershipInfo) UnmarshalBinary(b []byte) error { - var res EntityGroupMembershipInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_group_params.go b/v1/models/entity_group_params.go deleted file mode 100644 index d619a0d9..00000000 --- a/v1/models/entity_group_params.go +++ /dev/null @@ -1,70 +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" -) - -// EntityGroupParams entity group params -// -// swagger:model Entity_GroupParams -type EntityGroupParams struct { - - // Group type. Currently, it can have "Unified", "DynamicMembership" or - // null values. - GroupTypeVec []string `json:"groupTypeVec"` - - // Whether the group created should be mail-enabled. - MailEnabled *bool `json:"mailEnabled,omitempty"` - - // The number of members in the group. - NumMembers *int64 `json:"numMembers,omitempty"` - - // Specifies the group resources that are provisioned as part of Microsoft - // 365 group creation. - ResourceProvisioningOptions []string `json:"resourceProvisioningOptions"` - - // Whether the group created should be security-enabled. - SecurityEnabled *bool `json:"securityEnabled,omitempty"` - - // The id of the site that is associated with this group. - SiteID *string `json:"siteId,omitempty"` - - // Specifies the visibility - private, public, or hiddenmembership - Visibility *string `json:"visibility,omitempty"` -} - -// Validate validates this entity group params -func (m *EntityGroupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity group params based on context it is used -func (m *EntityGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityGroupParams) UnmarshalBinary(b []byte) error { - var res EntityGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_hierarchy_proto.go b/v1/models/entity_hierarchy_proto.go deleted file mode 100644 index a95e6d53..00000000 --- a/v1/models/entity_hierarchy_proto.go +++ /dev/null @@ -1,551 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityHierarchyProto This message can either represent a single-entity, a hierarchy of entities, -// -// or multiple hierarchies of entities rooted at a fake "super root" entity. -// -// swagger:model EntityHierarchyProto -type EntityHierarchyProto struct { - - // Aggregated information about all the entities rooted at this node that are - // being protected by a CDP backup job. - AggregatedCdpProtectedInfoVec *EntityHierarchyProtoAggregatedEntityInfo `json:"aggregatedCdpProtectedInfoVec,omitempty"` - - // Aggregated information about all the entities rooted at this node that are - // being protected by some backup job. There is one entry for each - // environment being backed up. The aggregated information for the entity - // hierarchy's environment will be available at the 0th index of the vector. - AggregatedProtectedInfoVec []*EntityHierarchyProtoAggregatedEntityInfo `json:"aggregatedProtectedInfoVec"` - - // Aggregated information about all the entities rooted at this node that are - // not being protected by any backup job. There is one entry for each - // environment being backed up. The aggregated information for the entity - // hierarchy's environment will be available at the 0th index of the vector. - // - // NOTE: This includes entities that were protected at some point in the past - // (and may even have snapshots to restore from), but are no longer being - // actively protected. - AggregatedUnprotectedInfoVec []*EntityHierarchyProtoAggregatedEntityInfo `json:"aggregatedUnprotectedInfoVec"` - - // The list of auxiliary children for this node in the hierarchy. The - // auxiliary children can be used to extend the entity hierarchy to contain - // application level entities. The application level entities may be in a - // different environment. For example, the SQL server instances running on - // a VM will be in this list. - // These are only present when exporting the data to Iris. - // See HierarchyNode message below for the WAL format. - AuxChildren []interface{} `json:"auxChildren"` - - // Complete sub-trees rooted at this node: - // These are only present when exporting the data to Iris. - // See HierarchyNode message below for the WAL format. - Children []interface{} `json:"children"` - - // The entity at the current node. This is set for all entities except the - // super root entity. - Entity *PrivateEntityProto `json:"entity,omitempty"` - - // Information about ongoing operations on the entity. Note that this is - // populated only in Iris response. Magneto stores this information - // seperately in 'EntityOperationManager'. - EntityOperationInfo *EntityOperationInfoProto `json:"entityOperationInfo,omitempty"` - - // This stores the external metadata for any entity. Note that this is - // populated only in Iris responses. - ExternalMetadata *EntityExternalMetadataProto `json:"externalMetadata,omitempty"` - - // We maintain a "super root" entity to encapsulate a forest of trees (each - // tree representing a different entity hierarchy). For instance, if there - // are two independent vCenter hosts, they are two separate hierarchies, and - // are both children of this super root entity. - IsSuperRootEntity *bool `json:"isSuperRootEntity,omitempty"` - - // Time (in usecs) when the hierarchy info of this entity last updated. - // Note: For the View entity, following used for CAS error check for parallel - // update in view_box hierarchy by refresh and view backup/restore related - // APIs. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // Only valid for leaf-level objects. The logical size of the leaf-level - // object in bytes. If this is set to 0xDEADBAAD, then it will be shown as - // "N/A" in the UI, for entities that we cannot get the real logical size. - LogicalSizeInBytes *int64 `json:"logicalSizeInBytes,omitempty"` - - // Immediate parent. Currently used only for O365 site entities. - Parent *EntityHierarchyProto `json:"parent,omitempty"` - - // Only valid for leaf-level objects. The physical size of the leaf-level - // object in bytes. Currently only populated for Hyper-V VMs. - PhysicalSizeInBytes *int64 `json:"physicalSizeInBytes,omitempty"` - - // Information about top-level entities. This is only valid for entities that - // are explicitly registered by the end-user (and are children of the - // super-root node). - RegisteredEntityInfo *RegisteredEntityInfo `json:"registeredEntityInfo,omitempty"` - - // Only valid for leaf-level objects. Total bytes downtiered from the - // leaf-level object so far. - TotalDowntieredSizeInBytes *int64 `json:"totalDowntieredSizeInBytes,omitempty"` - - // Only valid for leaf-level objects. Total bytes uptiered to the - // leaf-level object so far. - TotalUptieredSizeInBytes *int64 `json:"totalUptieredSizeInBytes,omitempty"` -} - -// Validate validates this entity hierarchy proto -func (m *EntityHierarchyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAggregatedCdpProtectedInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAggregatedProtectedInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAggregatedUnprotectedInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityOperationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntityInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityHierarchyProto) validateAggregatedCdpProtectedInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AggregatedCdpProtectedInfoVec) { // not required - return nil - } - - if m.AggregatedCdpProtectedInfoVec != nil { - if err := m.AggregatedCdpProtectedInfoVec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedCdpProtectedInfoVec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedCdpProtectedInfoVec") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) validateAggregatedProtectedInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AggregatedProtectedInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.AggregatedProtectedInfoVec); i++ { - if swag.IsZero(m.AggregatedProtectedInfoVec[i]) { // not required - continue - } - - if m.AggregatedProtectedInfoVec[i] != nil { - if err := m.AggregatedProtectedInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedProtectedInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedProtectedInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyProto) validateAggregatedUnprotectedInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AggregatedUnprotectedInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.AggregatedUnprotectedInfoVec); i++ { - if swag.IsZero(m.AggregatedUnprotectedInfoVec[i]) { // not required - continue - } - - if m.AggregatedUnprotectedInfoVec[i] != nil { - if err := m.AggregatedUnprotectedInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedUnprotectedInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedUnprotectedInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyProto) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) validateEntityOperationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityOperationInfo) { // not required - return nil - } - - if m.EntityOperationInfo != nil { - if err := m.EntityOperationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityOperationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityOperationInfo") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) validateExternalMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalMetadata) { // not required - return nil - } - - if m.ExternalMetadata != nil { - if err := m.ExternalMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalMetadata") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) validateParent(formats strfmt.Registry) error { - if swag.IsZero(m.Parent) { // not required - return nil - } - - if m.Parent != nil { - if err := m.Parent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parent") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) validateRegisteredEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntityInfo) { // not required - return nil - } - - if m.RegisteredEntityInfo != nil { - if err := m.RegisteredEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity hierarchy proto based on the context it is used -func (m *EntityHierarchyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAggregatedCdpProtectedInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAggregatedProtectedInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAggregatedUnprotectedInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityOperationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternalMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityHierarchyProto) contextValidateAggregatedCdpProtectedInfoVec(ctx context.Context, formats strfmt.Registry) error { - - if m.AggregatedCdpProtectedInfoVec != nil { - - if swag.IsZero(m.AggregatedCdpProtectedInfoVec) { // not required - return nil - } - - if err := m.AggregatedCdpProtectedInfoVec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedCdpProtectedInfoVec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedCdpProtectedInfoVec") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateAggregatedProtectedInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AggregatedProtectedInfoVec); i++ { - - if m.AggregatedProtectedInfoVec[i] != nil { - - if swag.IsZero(m.AggregatedProtectedInfoVec[i]) { // not required - return nil - } - - if err := m.AggregatedProtectedInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedProtectedInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedProtectedInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateAggregatedUnprotectedInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AggregatedUnprotectedInfoVec); i++ { - - if m.AggregatedUnprotectedInfoVec[i] != nil { - - if swag.IsZero(m.AggregatedUnprotectedInfoVec[i]) { // not required - return nil - } - - if err := m.AggregatedUnprotectedInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aggregatedUnprotectedInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aggregatedUnprotectedInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateEntityOperationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityOperationInfo != nil { - - if swag.IsZero(m.EntityOperationInfo) { // not required - return nil - } - - if err := m.EntityOperationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityOperationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityOperationInfo") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateExternalMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalMetadata != nil { - - if swag.IsZero(m.ExternalMetadata) { // not required - return nil - } - - if err := m.ExternalMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalMetadata") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - if m.Parent != nil { - - if swag.IsZero(m.Parent) { // not required - return nil - } - - if err := m.Parent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parent") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyProto) contextValidateRegisteredEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntityInfo != nil { - - if swag.IsZero(m.RegisteredEntityInfo) { // not required - return nil - } - - if err := m.RegisteredEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityHierarchyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityHierarchyProto) UnmarshalBinary(b []byte) error { - var res EntityHierarchyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_hierarchy_proto_aggregated_entity_info.go b/v1/models/entity_hierarchy_proto_aggregated_entity_info.go deleted file mode 100644 index 0fd766cc..00000000 --- a/v1/models/entity_hierarchy_proto_aggregated_entity_info.go +++ /dev/null @@ -1,70 +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" -) - -// EntityHierarchyProtoAggregatedEntityInfo entity hierarchy proto aggregated entity info -// -// swagger:model EntityHierarchyProto_AggregatedEntityInfo -type EntityHierarchyProtoAggregatedEntityInfo struct { - - // logical archived size in bytes - LogicalArchivedSizeInBytes *int64 `json:"logicalArchivedSizeInBytes,omitempty"` - - // The following counts are set in the "protected" instance of this - // sub-message when replication/archiving was recently applied to the given - // Entity object via a policy. That is, we have a recent run that performed - // replication/archiving. - // - // These fields contain a sum of logical sizes of all the leaf-level - // entities that are in the subtree rooted at this node. - LogicalReplicatedSizeInBytes *int64 `json:"logicalReplicatedSizeInBytes,omitempty"` - - // The total number of leaf-level entities that are part of the subtree - // rooted at this node. - NumEntities *int64 `json:"numEntities,omitempty"` - - // The sum of logical sizes of all the leaf-level entities that are part of - // the subtree rooted at this node. - TotalLogicalSizeInBytes *int64 `json:"totalLogicalSizeInBytes,omitempty"` - - // The environment type for the aggregated info. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this entity hierarchy proto aggregated entity info -func (m *EntityHierarchyProtoAggregatedEntityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity hierarchy proto aggregated entity info based on context it is used -func (m *EntityHierarchyProtoAggregatedEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityHierarchyProtoAggregatedEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityHierarchyProtoAggregatedEntityInfo) UnmarshalBinary(b []byte) error { - var res EntityHierarchyProtoAggregatedEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_hierarchy_wrapper.go b/v1/models/entity_hierarchy_wrapper.go deleted file mode 100644 index bfca5942..00000000 --- a/v1/models/entity_hierarchy_wrapper.go +++ /dev/null @@ -1,288 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityHierarchyWrapper EntityHierarchyWrapper is a wrapper over the Magneto protobuf for backup -// objects along with their children hierarchy. -// -// swagger:model EntityHierarchyWrapper -type EntityHierarchyWrapper struct { - - // EntityHierarchy is the protobuf for the registered entity along with its - // children hierarchy. - EntityHierarchy *EntityHierarchyProto `json:"entityHierarchy,omitempty"` - - // Specifies the cursor based pagination parameters for Protection Source to - // fetch the next set of sources within a level. - EntityPaginationParams *PaginationParameters `json:"entityPaginationParams,omitempty"` - - // Specifies permission information for the entities. - EntityPermissionInfo []*EntityPermissionInfo `json:"entityPermissionInfo"` - - // Specifies the object protection info for entities (if any) in the source. - ObjectProtectionInfo []*GetEntityHierarchyResultObjectBasedProtectionInfo `json:"objectProtectionInfo"` -} - -// Validate validates this entity hierarchy wrapper -func (m *EntityHierarchyWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityHierarchy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityPaginationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityPermissionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectProtectionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityHierarchyWrapper) validateEntityHierarchy(formats strfmt.Registry) error { - if swag.IsZero(m.EntityHierarchy) { // not required - return nil - } - - if m.EntityHierarchy != nil { - if err := m.EntityHierarchy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityHierarchy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityHierarchy") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyWrapper) validateEntityPaginationParams(formats strfmt.Registry) error { - if swag.IsZero(m.EntityPaginationParams) { // not required - return nil - } - - if m.EntityPaginationParams != nil { - if err := m.EntityPaginationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPaginationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPaginationParams") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyWrapper) validateEntityPermissionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityPermissionInfo) { // not required - return nil - } - - for i := 0; i < len(m.EntityPermissionInfo); i++ { - if swag.IsZero(m.EntityPermissionInfo[i]) { // not required - continue - } - - if m.EntityPermissionInfo[i] != nil { - if err := m.EntityPermissionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyWrapper) validateObjectProtectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectProtectionInfo) { // not required - return nil - } - - for i := 0; i < len(m.ObjectProtectionInfo); i++ { - if swag.IsZero(m.ObjectProtectionInfo[i]) { // not required - continue - } - - if m.ObjectProtectionInfo[i] != nil { - if err := m.ObjectProtectionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity hierarchy wrapper based on the context it is used -func (m *EntityHierarchyWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityHierarchy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityPaginationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityPermissionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectProtectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityHierarchyWrapper) contextValidateEntityHierarchy(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityHierarchy != nil { - - if swag.IsZero(m.EntityHierarchy) { // not required - return nil - } - - if err := m.EntityHierarchy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityHierarchy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityHierarchy") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyWrapper) contextValidateEntityPaginationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityPaginationParams != nil { - - if swag.IsZero(m.EntityPaginationParams) { // not required - return nil - } - - if err := m.EntityPaginationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPaginationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPaginationParams") - } - return err - } - } - - return nil -} - -func (m *EntityHierarchyWrapper) contextValidateEntityPermissionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityPermissionInfo); i++ { - - if m.EntityPermissionInfo[i] != nil { - - if swag.IsZero(m.EntityPermissionInfo[i]) { // not required - return nil - } - - if err := m.EntityPermissionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityHierarchyWrapper) contextValidateObjectProtectionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectProtectionInfo); i++ { - - if m.ObjectProtectionInfo[i] != nil { - - if swag.IsZero(m.ObjectProtectionInfo[i]) { // not required - return nil - } - - if err := m.ObjectProtectionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityHierarchyWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityHierarchyWrapper) UnmarshalBinary(b []byte) error { - var res EntityHierarchyWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_i_a_m_info.go b/v1/models/entity_i_a_m_info.go deleted file mode 100644 index 90a2b9b4..00000000 --- a/v1/models/entity_i_a_m_info.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" -) - -// EntityIAMInfo IAM specific information. -// -// swagger:model Entity_IAMInfo -type EntityIAMInfo struct { - - // The email of the GCP service account. - ClientEmail *string `json:"clientEmail,omitempty"` - - // The project id of this entity. - ProjectID *string `json:"projectId,omitempty"` -} - -// Validate validates this entity i a m info -func (m *EntityIAMInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity i a m info based on context it is used -func (m *EntityIAMInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityIAMInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityIAMInfo) UnmarshalBinary(b []byte) error { - var res EntityIAMInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_id_proto.go b/v1/models/entity_id_proto.go deleted file mode 100644 index 5a400a30..00000000 --- a/v1/models/entity_id_proto.go +++ /dev/null @@ -1,117 +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" -) - -// EntityIDProto entity Id proto -// -// swagger:model EntityIdProto -type EntityIDProto struct { - - // Unique integer entity id generated by magneto for the given entity. This - // is unique across one cluster. Two different Cohesity clusters may have - // same int_id for two different entities. - IntID *int64 `json:"intId,omitempty"` - - // String entity id generated by magneto for the given entity. - // Note: Although the proto supports multiple versions of string ids, today - // magneto assumes that there will only be a single string id generated for a - // given entity. - StringIds *StringEntityIdsProto `json:"stringIds,omitempty"` -} - -// Validate validates this entity Id proto -func (m *EntityIDProto) 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 *EntityIDProto) 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 entity Id proto based on the context it is used -func (m *EntityIDProto) 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 *EntityIDProto) 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 *EntityIDProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityIDProto) UnmarshalBinary(b []byte) error { - var res EntityIDProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_identifier.go b/v1/models/entity_identifier.go deleted file mode 100644 index c8540cc8..00000000 --- a/v1/models/entity_identifier.go +++ /dev/null @@ -1,111 +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" -) - -// EntityIdentifier Entity Identifier. -// -// Specifies a unique identifier for the entity. -// -// swagger:model EntityIdentifier -type EntityIdentifier struct { - - // Specifies the unique identifier for the entity in the source Cluster. - EntityID *Value `json:"entityId,omitempty"` -} - -// Validate validates this entity identifier -func (m *EntityIdentifier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityIdentifier) 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 entity identifier based on the context it is used -func (m *EntityIdentifier) 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 *EntityIdentifier) 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 -} - -// MarshalBinary interface implementation -func (m *EntityIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityIdentifier) UnmarshalBinary(b []byte) error { - var res EntityIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_operation_info_proto.go b/v1/models/entity_operation_info_proto.go deleted file mode 100644 index eb02a1ac..00000000 --- a/v1/models/entity_operation_info_proto.go +++ /dev/null @@ -1,164 +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" -) - -// EntityOperationInfoProto Wrapper message containing the status and the specification of the -// operations. This proto is returned in the Get APIs. -// -// swagger:model EntityOperationInfoProto -type EntityOperationInfoProto struct { - - // The entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // The specification of the operations. - Spec *EntityOperationSpecProto `json:"spec,omitempty"` - - // The last known status of the operations. - Status *EntityOperationStatusProto `json:"status,omitempty"` -} - -// Validate validates this entity operation info proto -func (m *EntityOperationInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationInfoProto) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *EntityOperationInfoProto) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity operation info proto based on the context it is used -func (m *EntityOperationInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationInfoProto) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *EntityOperationInfoProto) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityOperationInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityOperationInfoProto) UnmarshalBinary(b []byte) error { - var res EntityOperationInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_operation_spec_proto.go b/v1/models/entity_operation_spec_proto.go deleted file mode 100644 index 7c9b59d2..00000000 --- a/v1/models/entity_operation_spec_proto.go +++ /dev/null @@ -1,112 +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" -) - -// EntityOperationSpecProto Message defining async operations that can be performed on an entity. -// -// swagger:model EntityOperationSpecProto -type EntityOperationSpecProto struct { - - // If specified, magneto will store the intent for unregister request and - // respond back to iris. Magneto will later internally delete all the - // active jobs associated with the entity and then proceed for - // unregistration. Note that to use this 'delete_entity' must be true. - MarkSourceForUnregistrationParams *EntityOperationSpecProtoMarkSourceForUnregistrationParams `json:"markSourceForUnregistrationParams,omitempty"` -} - -// Validate validates this entity operation spec proto -func (m *EntityOperationSpecProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMarkSourceForUnregistrationParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationSpecProto) validateMarkSourceForUnregistrationParams(formats strfmt.Registry) error { - if swag.IsZero(m.MarkSourceForUnregistrationParams) { // not required - return nil - } - - if m.MarkSourceForUnregistrationParams != nil { - if err := m.MarkSourceForUnregistrationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("markSourceForUnregistrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("markSourceForUnregistrationParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity operation spec proto based on the context it is used -func (m *EntityOperationSpecProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMarkSourceForUnregistrationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationSpecProto) contextValidateMarkSourceForUnregistrationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MarkSourceForUnregistrationParams != nil { - - if swag.IsZero(m.MarkSourceForUnregistrationParams) { // not required - return nil - } - - if err := m.MarkSourceForUnregistrationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("markSourceForUnregistrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("markSourceForUnregistrationParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityOperationSpecProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityOperationSpecProto) UnmarshalBinary(b []byte) error { - var res EntityOperationSpecProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_operation_spec_proto_mark_source_for_unregistration_params.go b/v1/models/entity_operation_spec_proto_mark_source_for_unregistration_params.go deleted file mode 100644 index 1c8bd1e3..00000000 --- a/v1/models/entity_operation_spec_proto_mark_source_for_unregistration_params.go +++ /dev/null @@ -1,51 +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" -) - -// EntityOperationSpecProtoMarkSourceForUnregistrationParams Mark entity for unregistration. This deletes all the active jobs(if any) -// and proceed for unregistration. -// -// swagger:model EntityOperationSpecProto_MarkSourceForUnregistrationParams -type EntityOperationSpecProtoMarkSourceForUnregistrationParams struct { - - // Indicates whether to delete the active jobs along with snapshots. - ShouldDeleteSnapshots *bool `json:"shouldDeleteSnapshots,omitempty"` -} - -// Validate validates this entity operation spec proto mark source for unregistration params -func (m *EntityOperationSpecProtoMarkSourceForUnregistrationParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity operation spec proto mark source for unregistration params based on context it is used -func (m *EntityOperationSpecProtoMarkSourceForUnregistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityOperationSpecProtoMarkSourceForUnregistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityOperationSpecProtoMarkSourceForUnregistrationParams) UnmarshalBinary(b []byte) error { - var res EntityOperationSpecProtoMarkSourceForUnregistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_operation_status_proto.go b/v1/models/entity_operation_status_proto.go deleted file mode 100644 index 63ccdbca..00000000 --- a/v1/models/entity_operation_status_proto.go +++ /dev/null @@ -1,110 +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" -) - -// EntityOperationStatusProto Message defining the current status of the operations performed on the -// entity. -// -// swagger:model EntityOperationStatusProto -type EntityOperationStatusProto struct { - - // Status of Unregistration. - Unregister *EntityOperationStatusProtoUnregistration `json:"unregister,omitempty"` -} - -// Validate validates this entity operation status proto -func (m *EntityOperationStatusProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnregister(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationStatusProto) validateUnregister(formats strfmt.Registry) error { - if swag.IsZero(m.Unregister) { // not required - return nil - } - - if m.Unregister != nil { - if err := m.Unregister.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unregister") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unregister") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity operation status proto based on the context it is used -func (m *EntityOperationStatusProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUnregister(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityOperationStatusProto) contextValidateUnregister(ctx context.Context, formats strfmt.Registry) error { - - if m.Unregister != nil { - - if swag.IsZero(m.Unregister) { // not required - return nil - } - - if err := m.Unregister.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unregister") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unregister") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityOperationStatusProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityOperationStatusProto) UnmarshalBinary(b []byte) error { - var res EntityOperationStatusProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_operation_status_proto_unregistration.go b/v1/models/entity_operation_status_proto_unregistration.go deleted file mode 100644 index 49c7df94..00000000 --- a/v1/models/entity_operation_status_proto_unregistration.go +++ /dev/null @@ -1,50 +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" -) - -// EntityOperationStatusProtoUnregistration entity operation status proto unregistration -// -// swagger:model EntityOperationStatusProto_Unregistration -type EntityOperationStatusProtoUnregistration struct { - - // Indicates whether unregistration of the above entity is in progress. - UnregisterInProgress *bool `json:"unregisterInProgress,omitempty"` -} - -// Validate validates this entity operation status proto unregistration -func (m *EntityOperationStatusProtoUnregistration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity operation status proto unregistration based on context it is used -func (m *EntityOperationStatusProtoUnregistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityOperationStatusProtoUnregistration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityOperationStatusProtoUnregistration) UnmarshalBinary(b []byte) error { - var res EntityOperationStatusProtoUnregistration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_permission_info.go b/v1/models/entity_permission_info.go deleted file mode 100644 index 3a45a1af..00000000 --- a/v1/models/entity_permission_info.go +++ /dev/null @@ -1,152 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityPermissionInfo Message describing permissions that are defined for an entity. -// -// swagger:model EntityPermissionInfo -type EntityPermissionInfo struct { - - // Entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // If the permission was inferred. Inferred means, an explicit permission - // was not set on the current entity. But this entity inherited permissions - // by virtue of a permission assignment to an ancestor. This bit is - // populated only when sending back the permission info result to iris. - IsInferred *bool `json:"isInferred,omitempty"` - - // Specifies whether this object was originally registered by the SP or not. - // - // This is required so that we can differentiate between objects registered - // before and after upgrade. For all objects registered pre-6.7, - // registering_tenant_id would be nil and this can lead us to believe that - // the object was originally registered by the SP, which might not be the - // case. To avoid this, we will use registering_tenant_id in combination with - // this field. - // - // This gets set when a registered entity is assigned to a tenant by the SP. - IsRegisteredBySp *bool `json:"isRegisteredBySp,omitempty"` - - // Time when permissions for this entity was last updated. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // List of permissions defined on the entity. - Permissions []*EntityPermissionInfoPermission `json:"permissions"` - - // Tenant ID of the user that registered this object. This will only be - // populated if this is a root entity. - RegisteringTenantID *string `json:"registeringTenantId,omitempty"` - - // Tenant ID, if any, that owns this object. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this entity permission info -func (m *EntityPermissionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInfo) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity permission info based on the context it is used -func (m *EntityPermissionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInfo) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityPermissionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityPermissionInfo) UnmarshalBinary(b []byte) error { - var res EntityPermissionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_permission_info_permission.go b/v1/models/entity_permission_info_permission.go deleted file mode 100644 index 5b6e8edc..00000000 --- a/v1/models/entity_permission_info_permission.go +++ /dev/null @@ -1,112 +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" -) - -// EntityPermissionInfoPermission Message describing a permission entry that can be associated with any -// object. -// TODO(Chinmaya): Move this to a more common place if it is useful for -// setting permissions on other objects such as Views and Viewboxes. -// -// swagger:model EntityPermissionInfo_Permission -type EntityPermissionInfoPermission struct { - - // The SID of the user or the group which has permission on this entity. - Sid *ClusterConfigProtoSID `json:"sid,omitempty"` -} - -// Validate validates this entity permission info permission -func (m *EntityPermissionInfoPermission) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSid(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInfoPermission) validateSid(formats strfmt.Registry) error { - if swag.IsZero(m.Sid) { // not required - return nil - } - - if m.Sid != nil { - if err := m.Sid.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sid") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity permission info permission based on the context it is used -func (m *EntityPermissionInfoPermission) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSid(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInfoPermission) contextValidateSid(ctx context.Context, formats strfmt.Registry) error { - - if m.Sid != nil { - - if swag.IsZero(m.Sid) { // not required - return nil - } - - if err := m.Sid.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sid") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityPermissionInfoPermission) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityPermissionInfoPermission) UnmarshalBinary(b []byte) error { - var res EntityPermissionInfoPermission - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_permission_information.go b/v1/models/entity_permission_information.go deleted file mode 100644 index c43c836a..00000000 --- a/v1/models/entity_permission_information.go +++ /dev/null @@ -1,253 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityPermissionInformation Entity Permission Information. -// -// Specifies the permission information of entities. -// -// swagger:model EntityPermissionInformation -type EntityPermissionInformation struct { - - // Specifies the entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies groups that have access to entity in case of restricted user. - Groups []*GroupInfo `json:"groups"` - - // Specifies whether the Entity Permission Information is inferred or not. - // For example, SQL application hosted over vCenter will have inferred entity - // permission information. - IsInferred *bool `json:"isInferred,omitempty"` - - // Specifies whether this entity is registered by the SP or not. This will be - // populated only if the entity is a root entity. Refer to - // magneto/base/permissions.proto for details. - IsRegisteredBySp *bool `json:"isRegisteredBySp,omitempty"` - - // Specifies the tenant id that registered this entity. This will be - // populated only if the entity is a root entity. - RegisteringTenantID *string `json:"registeringTenantId,omitempty"` - - // Specifies basic information of the tenant having access to the entity. - Tenant *TenantInfo `json:"tenant,omitempty"` - - // Specifies users that have access to entity in case of restricted user. - Users []*UserInfo `json:"users"` -} - -// Validate validates this entity permission information -func (m *EntityPermissionInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenant(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInformation) validateGroups(formats strfmt.Registry) error { - if swag.IsZero(m.Groups) { // not required - return nil - } - - for i := 0; i < len(m.Groups); i++ { - if swag.IsZero(m.Groups[i]) { // not required - continue - } - - if m.Groups[i] != nil { - if err := m.Groups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityPermissionInformation) validateTenant(formats strfmt.Registry) error { - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if m.Tenant != nil { - if err := m.Tenant.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -func (m *EntityPermissionInformation) validateUsers(formats strfmt.Registry) error { - if swag.IsZero(m.Users) { // not required - return nil - } - - for i := 0; i < len(m.Users); i++ { - if swag.IsZero(m.Users[i]) { // not required - continue - } - - if m.Users[i] != nil { - if err := m.Users[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity permission information based on the context it is used -func (m *EntityPermissionInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenant(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityPermissionInformation) contextValidateGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Groups); i++ { - - if m.Groups[i] != nil { - - if swag.IsZero(m.Groups[i]) { // not required - return nil - } - - if err := m.Groups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityPermissionInformation) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { - - if m.Tenant != nil { - - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if err := m.Tenant.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -func (m *EntityPermissionInformation) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Users); i++ { - - if m.Users[i] != nil { - - if swag.IsZero(m.Users[i]) { // not required - return nil - } - - if err := m.Users[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityPermissionInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityPermissionInformation) UnmarshalBinary(b []byte) error { - var res EntityPermissionInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_private_endpoint_connection.go b/v1/models/entity_private_endpoint_connection.go deleted file mode 100644 index 1ffb0d45..00000000 --- a/v1/models/entity_private_endpoint_connection.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" -) - -// EntityPrivateEndpointConnection Private endpoint connections present for the azure entity. -// -// swagger:model Entity_PrivateEndpointConnection -type EntityPrivateEndpointConnection struct { - - // The azure id of the private endpoint on this entity. - PrivateEndpointID *string `json:"privateEndpointId,omitempty"` - - // The azure id of the subnet configured for this private endpoint. - SubnetID *string `json:"subnetId,omitempty"` -} - -// Validate validates this entity private endpoint connection -func (m *EntityPrivateEndpointConnection) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity private endpoint connection based on context it is used -func (m *EntityPrivateEndpointConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityPrivateEndpointConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityPrivateEndpointConnection) UnmarshalBinary(b []byte) error { - var res EntityPrivateEndpointConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_proto.go b/v1/models/entity_proto.go deleted file mode 100644 index ff22f024..00000000 --- a/v1/models/entity_proto.go +++ /dev/null @@ -1,243 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntityProto Entity. -// -// Specifies the attributes and the latest statistics about an entity. -// -// swagger:model EntityProto -type EntityProto struct { - - // Array of Attributes. - // - // List of attributes of an entity. - AttributeVec []*KeyValuePair `json:"attributeVec"` - - // Specifies a globally unique identifier of an entity. - EntityID *EntityIdentifier `json:"entityId,omitempty"` - - // Array of Metric Statistics. - // - // List of the latest statistics for all metrics defined in the schema - // that this entity belongs to. - // If statistics for a metric is not available, then that data point is not - // returned. - LatestMetricVec []*MetricValue `json:"latestMetricVec"` -} - -// Validate validates this entity proto -func (m *EntityProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatestMetricVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityProto) validateAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.AttributeVec); i++ { - if swag.IsZero(m.AttributeVec[i]) { // not required - continue - } - - if m.AttributeVec[i] != nil { - if err := m.AttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityProto) 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 -} - -func (m *EntityProto) validateLatestMetricVec(formats strfmt.Registry) error { - if swag.IsZero(m.LatestMetricVec) { // not required - return nil - } - - for i := 0; i < len(m.LatestMetricVec); i++ { - if swag.IsZero(m.LatestMetricVec[i]) { // not required - continue - } - - if m.LatestMetricVec[i] != nil { - if err := m.LatestMetricVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestMetricVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestMetricVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity proto based on the context it is used -func (m *EntityProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLatestMetricVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityProto) contextValidateAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeVec); i++ { - - if m.AttributeVec[i] != nil { - - if swag.IsZero(m.AttributeVec[i]) { // not required - return nil - } - - if err := m.AttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntityProto) 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 -} - -func (m *EntityProto) contextValidateLatestMetricVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LatestMetricVec); i++ { - - if m.LatestMetricVec[i] != nil { - - if swag.IsZero(m.LatestMetricVec[i]) { // not required - return nil - } - - if err := m.LatestMetricVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestMetricVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestMetricVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityProto) UnmarshalBinary(b []byte) error { - var res EntityProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_proto_size_info_entry.go b/v1/models/entity_proto_size_info_entry.go deleted file mode 100644 index d2704164..00000000 --- a/v1/models/entity_proto_size_info_entry.go +++ /dev/null @@ -1,112 +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" -) - -// EntityProtoSizeInfoEntry entity proto size info entry -// -// swagger:model EntityProto_SizeInfoEntry -type EntityProtoSizeInfoEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *EntitySizeInfo `json:"value,omitempty"` -} - -// Validate validates this entity proto size info entry -func (m *EntityProtoSizeInfoEntry) 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 -} - -func (m *EntityProtoSizeInfoEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity proto size info entry based on the context it is used -func (m *EntityProtoSizeInfoEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityProtoSizeInfoEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityProtoSizeInfoEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityProtoSizeInfoEntry) UnmarshalBinary(b []byte) error { - var res EntityProtoSizeInfoEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_s_k_u.go b/v1/models/entity_s_k_u.go deleted file mode 100644 index fe9b41ff..00000000 --- a/v1/models/entity_s_k_u.go +++ /dev/null @@ -1,63 +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" -) - -// EntitySKU Sku of the entity. -// -// swagger:model Entity_SKU -type EntitySKU struct { - - // Capacity of the sku. - // For azure sql dbs, this is the number of cores. - Capacity *int32 `json:"capacity,omitempty"` - - // Can be one of Name_Type enum above. - Name *string `json:"name,omitempty"` - - // Enum representation of name for UI selection purpose. - NameType *int32 `json:"nameType,omitempty"` - - // Can be one of Tier_Type enum above. - Tier *string `json:"tier,omitempty"` - - // Enum representation of tier for UI selection purpose. - TierType *int32 `json:"tierType,omitempty"` -} - -// Validate validates this entity s k u -func (m *EntitySKU) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity s k u based on context it is used -func (m *EntitySKU) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySKU) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySKU) UnmarshalBinary(b []byte) error { - var res EntitySKU - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto.go b/v1/models/entity_schema_proto.go deleted file mode 100644 index 6c2580b3..00000000 --- a/v1/models/entity_schema_proto.go +++ /dev/null @@ -1,284 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntitySchemaProto Entity Schema. -// -// Specifies the meta-data associated with entity such as the list of -// attributes and time series data. -// -// swagger:model EntitySchemaProto -type EntitySchemaProto struct { - - // attributes descriptor - AttributesDescriptor *EntitySchemaProtoAttributesDescriptor `json:"attributesDescriptor,omitempty"` - - // Timeseries for an entity schema is rolled up based on this setting. - // Rollup is disabled by default. - // Rollups cannot be done for metrics with value_type other than kInt64 - // or kDouble. - EnableRollup *bool `json:"enableRollup,omitempty"` - - // Time to live for all entities for this schema. Entities will be deleted - // if no stats has been published for this TTL time. - EntitiesTimeToLiveSecs *int64 `json:"entitiesTimeToLiveSecs,omitempty"` - - // Defines the interval used to flush in memory stats to scribe table. - // During this time if the stats server is down before flushing, it could - // loose some of the stats. Modules can flush any critical stats - // via AddEntitiesStats API. But this should be used very judiciously as - // it causes lot of overhead for stats. - FlushIntervalSecs *int32 `json:"flushIntervalSecs,omitempty"` - - // Specifies if this schema should be displayed in Advanced Diagnostics - // of the Cohesity Dashboard. If false, the schema is displayed. - IsInternalSchema *bool `json:"isInternalSchema,omitempty"` - - // Use can change the flush interval secs via gflag and this store the - // largest interval seconds set. This is used to round up the timestamp - // to this flush interval secs during range scan. - LargestFlushIntervalSecs *int32 `json:"largestFlushIntervalSecs,omitempty"` - - // Specifies a name that uniquely identifies an entity schema such as - // 'kBridgeClusterStats'. Name cannot have ':' as character. - Name *string `json:"name,omitempty"` - - // rollup granularity vec - RollupGranularityVec []*EntitySchemaProtoGranularity `json:"rollupGranularityVec"` - - // Specifies the name of the Schema as displayed in Advanced Diagnostics - // of the Cohesity Dashboard. For example for the 'kBridgeClusterStats' - // Schema, the descriptive name is 'Cluster Physical Stats'. - SchemaDescriptiveName *string `json:"schemaDescriptiveName,omitempty"` - - // Specifies an optional informational description about the schema. - SchemaHelpText *string `json:"schemaHelpText,omitempty"` - - // Array of Time Series. - // - // List of time series of data (set of data points) for metrics. - TimeSeriesDescriptorVec []*EntitySchemaProtoTimeSeriesDescriptor `json:"timeSeriesDescriptorVec"` - - // Specifies how long the timeseries data of this schema will be stored. - // After expiry the entire data point(all metrics) is garbage collected. - TimeToLiveSecs *int64 `json:"timeToLiveSecs,omitempty"` - - // Specifies the version of the entity schema. - Version *int64 `json:"version,omitempty"` -} - -// Validate validates this entity schema proto -func (m *EntitySchemaProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributesDescriptor(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRollupGranularityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeSeriesDescriptorVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProto) validateAttributesDescriptor(formats strfmt.Registry) error { - if swag.IsZero(m.AttributesDescriptor) { // not required - return nil - } - - if m.AttributesDescriptor != nil { - if err := m.AttributesDescriptor.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributesDescriptor") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributesDescriptor") - } - return err - } - } - - return nil -} - -func (m *EntitySchemaProto) validateRollupGranularityVec(formats strfmt.Registry) error { - if swag.IsZero(m.RollupGranularityVec) { // not required - return nil - } - - for i := 0; i < len(m.RollupGranularityVec); i++ { - if swag.IsZero(m.RollupGranularityVec[i]) { // not required - continue - } - - if m.RollupGranularityVec[i] != nil { - if err := m.RollupGranularityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rollupGranularityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rollupGranularityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntitySchemaProto) validateTimeSeriesDescriptorVec(formats strfmt.Registry) error { - if swag.IsZero(m.TimeSeriesDescriptorVec) { // not required - return nil - } - - for i := 0; i < len(m.TimeSeriesDescriptorVec); i++ { - if swag.IsZero(m.TimeSeriesDescriptorVec[i]) { // not required - continue - } - - if m.TimeSeriesDescriptorVec[i] != nil { - if err := m.TimeSeriesDescriptorVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeSeriesDescriptorVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeSeriesDescriptorVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity schema proto based on the context it is used -func (m *EntitySchemaProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributesDescriptor(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRollupGranularityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeSeriesDescriptorVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProto) contextValidateAttributesDescriptor(ctx context.Context, formats strfmt.Registry) error { - - if m.AttributesDescriptor != nil { - - if swag.IsZero(m.AttributesDescriptor) { // not required - return nil - } - - if err := m.AttributesDescriptor.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributesDescriptor") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributesDescriptor") - } - return err - } - } - - return nil -} - -func (m *EntitySchemaProto) contextValidateRollupGranularityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RollupGranularityVec); i++ { - - if m.RollupGranularityVec[i] != nil { - - if swag.IsZero(m.RollupGranularityVec[i]) { // not required - return nil - } - - if err := m.RollupGranularityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rollupGranularityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rollupGranularityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *EntitySchemaProto) contextValidateTimeSeriesDescriptorVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeSeriesDescriptorVec); i++ { - - if m.TimeSeriesDescriptorVec[i] != nil { - - if swag.IsZero(m.TimeSeriesDescriptorVec[i]) { // not required - return nil - } - - if err := m.TimeSeriesDescriptorVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeSeriesDescriptorVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeSeriesDescriptorVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProto) UnmarshalBinary(b []byte) error { - var res EntitySchemaProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto_attributes_descriptor.go b/v1/models/entity_schema_proto_attributes_descriptor.go deleted file mode 100644 index a96685b7..00000000 --- a/v1/models/entity_schema_proto_attributes_descriptor.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EntitySchemaProtoAttributesDescriptor Attributes Descriptor. -// -// Specifies a list of attributes about an entity. -// -// swagger:model EntitySchemaProto_AttributesDescriptor -type EntitySchemaProtoAttributesDescriptor struct { - - // Array of Attributes. - // - // List of attributes about an entity. - AttributeVec []*EntitySchemaProtoKeyValueDescriptor `json:"attributeVec"` - - // Specifies the attribute to use as a unique identifier for the entity. - // This value is returned in entityId when the GET - // public/statistics/entities operation is run. - KeyAttributeNameIndex *int32 `json:"keyAttributeNameIndex,omitempty"` -} - -// Validate validates this entity schema proto attributes descriptor -func (m *EntitySchemaProtoAttributesDescriptor) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProtoAttributesDescriptor) validateAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.AttributeVec); i++ { - if swag.IsZero(m.AttributeVec[i]) { // not required - continue - } - - if m.AttributeVec[i] != nil { - if err := m.AttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this entity schema proto attributes descriptor based on the context it is used -func (m *EntitySchemaProtoAttributesDescriptor) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProtoAttributesDescriptor) contextValidateAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeVec); i++ { - - if m.AttributeVec[i] != nil { - - if swag.IsZero(m.AttributeVec[i]) { // not required - return nil - } - - if err := m.AttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProtoAttributesDescriptor) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProtoAttributesDescriptor) UnmarshalBinary(b []byte) error { - var res EntitySchemaProtoAttributesDescriptor - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto_granularity.go b/v1/models/entity_schema_proto_granularity.go deleted file mode 100644 index 53d588cd..00000000 --- a/v1/models/entity_schema_proto_granularity.go +++ /dev/null @@ -1,62 +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" -) - -// EntitySchemaProtoGranularity Rolling up or Down sampling is performed on timeseries data to reduce -// space usage by timeseries. Rollup Granularity is defined per entity -// schema but rollup function is not defined. Instead we create rolledup -// values for all the rollup functions. -// -// swagger:model EntitySchemaProto_Granularity -type EntitySchemaProtoGranularity struct { - - // Defines the rollup interval or a bucket size. All data points within - // one time bucket are rolled up to one summary data point using the - // defined rollup function. For example, say, raw metric is published - // at ~30 secs granularity. To generate a hourly or a daily summary - // time series, client can define rolled up metrics having interval - // 3600 secs and 86400 secs respectively. - RollupIntervalSecs *int32 `json:"rollupIntervalSecs,omitempty"` - - // Defines the duration for which the rolled up data is to be stored. - // Once the lifespan has elapsed, expired data is garbage collected. - TimeToLiveSecs *int64 `json:"timeToLiveSecs,omitempty"` -} - -// Validate validates this entity schema proto granularity -func (m *EntitySchemaProtoGranularity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity schema proto granularity based on context it is used -func (m *EntitySchemaProtoGranularity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProtoGranularity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProtoGranularity) UnmarshalBinary(b []byte) error { - var res EntitySchemaProtoGranularity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto_key_value_descriptor.go b/v1/models/entity_schema_proto_key_value_descriptor.go deleted file mode 100644 index 6df404dd..00000000 --- a/v1/models/entity_schema_proto_key_value_descriptor.go +++ /dev/null @@ -1,59 +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" -) - -// EntitySchemaProtoKeyValueDescriptor Key/Value Pair. -// -// Specifies a key/value pair. -// -// swagger:model EntitySchemaProto_KeyValueDescriptor -type EntitySchemaProtoKeyValueDescriptor struct { - - // Specifies the name of a key. - KeyName *string `json:"keyName,omitempty"` - - // Specifies the type of the value that is associated with the key. - // 0 specifies a value type of Int64. - // 1 specifies a value type of Double. - // 2 specifies a value type of String. - // 3 specifies a value type of Bytes. - ValueType *int32 `json:"valueType,omitempty"` -} - -// Validate validates this entity schema proto key value descriptor -func (m *EntitySchemaProtoKeyValueDescriptor) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity schema proto key value descriptor based on context it is used -func (m *EntitySchemaProtoKeyValueDescriptor) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProtoKeyValueDescriptor) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProtoKeyValueDescriptor) UnmarshalBinary(b []byte) error { - var res EntitySchemaProtoKeyValueDescriptor - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto_time_series_descriptor.go b/v1/models/entity_schema_proto_time_series_descriptor.go deleted file mode 100644 index 05beb782..00000000 --- a/v1/models/entity_schema_proto_time_series_descriptor.go +++ /dev/null @@ -1,142 +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" -) - -// EntitySchemaProtoTimeSeriesDescriptor Time Series. -// -// Specifies the meta-data required to define a time series of data -// (set of data points) for a metric. -// -// swagger:model EntitySchemaProto_TimeSeriesDescriptor -type EntitySchemaProtoTimeSeriesDescriptor struct { - - // Specifies a descriptive name for the metric that is displayed in the - // Advanced Diagnostics of the Cohesity Dashboard. - // For example for the 'kUnmorphedUsageBytes' metric, the descriptive - // name is "Total Logical Space Used". - MetricDescriptiveName *string `json:"metricDescriptiveName,omitempty"` - - // Specifies the name of the metric such as 'kUnmorphedUsageBytes'. - // It should be unique in an entity schema. - MetricName *string `json:"metricName,omitempty"` - - // metric unit - MetricUnit *EntitySchemaProtoTimeSeriesDescriptorMetricUnit `json:"metricUnit,omitempty"` - - // Specifies a suggestion for the interval to collect raw data points. - RawMetricPublishIntervalHintSecs *int32 `json:"rawMetricPublishIntervalHintSecs,omitempty"` - - // Specifies how long the data point will be stored. - // Note: In statsv2, as timeseries data of an entity is stored per - // scribe row with metrics as columns, it is good to have - // time_to_live_secs per schema(defined below) - // For existing schemas, we will consider highest time_to_live_secs - // of all metrics as expiration time for all metrics defined in schema. - TimeToLiveSecs *int64 `json:"timeToLiveSecs,omitempty"` - - // Specifies the value type for this metric. - // A metric of type 'string" is not supported, instead use 'bytes'. - // Note that an aggregate metric of type 'bytes' is not supported. - // 0 specifies a value type of Int64. - // 1 specifies a value type of Double. - // 2 specifies a value type of String. - // 3 specifies a value type of Bytes. - ValueType *int32 `json:"valueType,omitempty"` -} - -// Validate validates this entity schema proto time series descriptor -func (m *EntitySchemaProtoTimeSeriesDescriptor) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetricUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProtoTimeSeriesDescriptor) validateMetricUnit(formats strfmt.Registry) error { - if swag.IsZero(m.MetricUnit) { // not required - return nil - } - - if m.MetricUnit != nil { - if err := m.MetricUnit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metricUnit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metricUnit") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity schema proto time series descriptor based on the context it is used -func (m *EntitySchemaProtoTimeSeriesDescriptor) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetricUnit(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySchemaProtoTimeSeriesDescriptor) contextValidateMetricUnit(ctx context.Context, formats strfmt.Registry) error { - - if m.MetricUnit != nil { - - if swag.IsZero(m.MetricUnit) { // not required - return nil - } - - if err := m.MetricUnit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metricUnit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metricUnit") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProtoTimeSeriesDescriptor) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProtoTimeSeriesDescriptor) UnmarshalBinary(b []byte) error { - var res EntitySchemaProtoTimeSeriesDescriptor - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_schema_proto_time_series_descriptor_metric_unit.go b/v1/models/entity_schema_proto_time_series_descriptor_metric_unit.go deleted file mode 100644 index 762998f0..00000000 --- a/v1/models/entity_schema_proto_time_series_descriptor_metric_unit.go +++ /dev/null @@ -1,62 +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" -) - -// EntitySchemaProtoTimeSeriesDescriptorMetricUnit Metric Unit. -// -// Specifies the unit of measure for the metric. -// O specifies a unit of space used such as free disk space. -// 1 specifies a Unix epoch Timestamp (in microseconds). -// 2 specifies a Unix epoch Timestamp (in milliseconds). -// 3 specifies a Unix epoch Timestamp (in seconds). -// 4 specifies a Unix epoch Timestamp (in minutes). -// 5 specifies a counter such as the read IO metric. -// 6 specifies the temperature in Centigrade. -// 7 specifies the temperature in Fahrenheit. -// 8 specifies revolutions per minute such as a CPU fan speed. -// 9 specifies a percentage such as CPU or memory usage. -// -// swagger:model EntitySchemaProto_TimeSeriesDescriptor_MetricUnit -type EntitySchemaProtoTimeSeriesDescriptorMetricUnit struct { - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this entity schema proto time series descriptor metric unit -func (m *EntitySchemaProtoTimeSeriesDescriptorMetricUnit) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity schema proto time series descriptor metric unit based on context it is used -func (m *EntitySchemaProtoTimeSeriesDescriptorMetricUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySchemaProtoTimeSeriesDescriptorMetricUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySchemaProtoTimeSeriesDescriptorMetricUnit) UnmarshalBinary(b []byte) error { - var res EntitySchemaProtoTimeSeriesDescriptorMetricUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_service_annotations_entry.go b/v1/models/entity_service_annotations_entry.go deleted file mode 100644 index 85d82618..00000000 --- a/v1/models/entity_service_annotations_entry.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" -) - -// EntityServiceAnnotationsEntry entity service annotations entry -// -// swagger:model Entity_ServiceAnnotationsEntry -type EntityServiceAnnotationsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this entity service annotations entry -func (m *EntityServiceAnnotationsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity service annotations entry based on context it is used -func (m *EntityServiceAnnotationsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityServiceAnnotationsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityServiceAnnotationsEntry) UnmarshalBinary(b []byte) error { - var res EntityServiceAnnotationsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_services_to_connector_ids_map_entry.go b/v1/models/entity_services_to_connector_ids_map_entry.go deleted file mode 100644 index ead0a378..00000000 --- a/v1/models/entity_services_to_connector_ids_map_entry.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" -) - -// EntityServicesToConnectorIdsMapEntry entity services to connector ids map entry -// -// swagger:model Entity_ServicesToConnectorIdsMapEntry -type EntityServicesToConnectorIdsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this entity services to connector ids map entry -func (m *EntityServicesToConnectorIdsMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity services to connector ids map entry based on context it is used -func (m *EntityServicesToConnectorIdsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityServicesToConnectorIdsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityServicesToConnectorIdsMapEntry) UnmarshalBinary(b []byte) error { - var res EntityServicesToConnectorIdsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_site_params.go b/v1/models/entity_site_params.go deleted file mode 100644 index 6507c314..00000000 --- a/v1/models/entity_site_params.go +++ /dev/null @@ -1,61 +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" -) - -// EntitySiteParams entity site params -// -// swagger:model Entity_SiteParams -type EntitySiteParams struct { - - // Whether the site is associated with a group. This implies the site - // associated with group which is NOT team and both is_team_site and - // is_private_channel_site is false - IsGroupSite *bool `json:"isGroupSite,omitempty"` - - // Whether the site is associted with MS teams private channel. If this is - // true, then is_team_site is true and is_group_site is false. - IsPrivateChannelSite *bool `json:"isPrivateChannelSite,omitempty"` - - // Whether the site is associated with a team. This implies is_group_site - // is also true and is_private_channel_site is false (site associated with - // group which is team). - IsTeamSite *bool `json:"isTeamSite,omitempty"` -} - -// Validate validates this entity site params -func (m *EntitySiteParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity site params based on context it is used -func (m *EntitySiteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySiteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySiteParams) UnmarshalBinary(b []byte) error { - var res EntitySiteParams - 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 deleted file mode 100644 index efb2fed6..00000000 --- a/v1/models/entity_size_info.go +++ /dev/null @@ -1,82 +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" -) - -// EntitySizeInfo Contains the size information for an entity. -// -// swagger:model EntitySizeInfo -type EntitySizeInfo struct { - - // Size of the data on the source as seen by the application level. This is - // optional. This field is provided to account for the volume size as seen by - // the OS on the source. This can be populated for certain adapters - // 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 - // that case, this value is set to 30GB. - // - // This suffers from the following two uncertainties: - // 1. Unclear whether to include externally attached storage in the - // calculations. - // - // 2. This data is available only for agent based backups, some NAS backups - // and for some VMs with guest tools installed. - // - // Due to the above ambiguities, this is used only for some status reporting - // purposes. - SourceDataSizeBytes *int64 `json:"sourceDataSizeBytes,omitempty"` - - // Space provisioned for the protected entity at the source storage. - // - // VMWare: For a thin provisoned volume of 100GB that is taking up 10GB of - // space on underlying storage, this value is 100GB. - // - // Windows: A volume that is 100GB will have this field set to 100GB. - // - // The primary intent of this should be to display some stats in the UI (e.g. - // in vCenter source hierarchy, show the VM size). - // - // This field suffers from the following ambiguity: - // It is unclear whether to include externally attached storage in this - // calculation. - SourceProvisionedLogicalSizeBytes *int64 `json:"sourceProvisionedLogicalSizeBytes,omitempty"` -} - -// Validate validates this entity size info -func (m *EntitySizeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity size info based on context it is used -func (m *EntitySizeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySizeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySizeInfo) UnmarshalBinary(b []byte) error { - var res EntitySizeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_snapshot_info_proto.go b/v1/models/entity_snapshot_info_proto.go deleted file mode 100644 index 14523fe0..00000000 --- a/v1/models/entity_snapshot_info_proto.go +++ /dev/null @@ -1,182 +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" -) - -// EntitySnapshotInfoProto Message that encapsulates information about the entity snapshot for any of -// the environments we support. Environment specific infos are defined as -// extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// EntitySnapshotInfoProto extension Location Extn -// ============================================================================= -// vmware::EntitySnapshotInfo::vmware_entity_snapshot_info -// vmware/vmware.proto 100 -// hyperv::EntitySnapshotInfo::hyperv_vss_entity_snapshot_info -// hyperv/hyperv.proto 101 -// ============================================================================= -// -// swagger:model EntitySnapshotInfoProto -type EntitySnapshotInfoProto struct { - - // The id of the source entity. - EntityID *int64 `json:"entityId,omitempty"` - - // Error (if any) encountered while taking the entity snapshot. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Id of the group snapshot task that took this storage snapshot. - GroupSnapshotTaskID *int64 `json:"groupSnapshotTaskId,omitempty"` - - // Time (in usecs) at which snapshot of the entity was taken. - SnapshotTimeUsecs *int64 `json:"snapshotTimeUsecs,omitempty"` - - // Captures the snapshot type for some objects such as VM. - SnapshotType *ObjectSnapshotType `json:"snapshotType,omitempty"` -} - -// Validate validates this entity snapshot info proto -func (m *EntitySnapshotInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySnapshotInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *EntitySnapshotInfoProto) validateSnapshotType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotType) { // not required - return nil - } - - if m.SnapshotType != nil { - if err := m.SnapshotType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotType") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity snapshot info proto based on the context it is used -func (m *EntitySnapshotInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntitySnapshotInfoProto) 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 -} - -func (m *EntitySnapshotInfoProto) contextValidateSnapshotType(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotType != nil { - - if swag.IsZero(m.SnapshotType) { // not required - return nil - } - - if err := m.SnapshotType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotType") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntitySnapshotInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntitySnapshotInfoProto) UnmarshalBinary(b []byte) error { - var res EntitySnapshotInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_storage_class_info.go b/v1/models/entity_storage_class_info.go deleted file mode 100644 index 39f010b4..00000000 --- a/v1/models/entity_storage_class_info.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" -) - -// EntityStorageClassInfo Information about a StorageClass. -// -// swagger:model Entity_StorageClassInfo -type EntityStorageClassInfo struct { - - // Name of the storage class. - Name *string `json:"name,omitempty"` - - // Name of the storage provisioner. - Provisioner *string `json:"provisioner,omitempty"` -} - -// Validate validates this entity storage class info -func (m *EntityStorageClassInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity storage class info based on context it is used -func (m *EntityStorageClassInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityStorageClassInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityStorageClassInfo) UnmarshalBinary(b []byte) error { - var res EntityStorageClassInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_team_params.go b/v1/models/entity_team_params.go deleted file mode 100644 index 20595594..00000000 --- a/v1/models/entity_team_params.go +++ /dev/null @@ -1,56 +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" -) - -// EntityTeamParams entity team params -// -// swagger:model Entity_TeamParams -type EntityTeamParams struct { - - // The number of channels present in the team. - ChannelCount *int64 `json:"channelCount,omitempty"` - - // The number of members in the group. - NumMembers *int64 `json:"numMembers,omitempty"` - - // The id of the site that is associated with this team. - SiteID *string `json:"siteId,omitempty"` -} - -// Validate validates this entity team params -func (m *EntityTeamParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity team params based on context it is used -func (m *EntityTeamParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityTeamParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityTeamParams) UnmarshalBinary(b []byte) error { - var res EntityTeamParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_version_tuple.go b/v1/models/entity_version_tuple.go deleted file mode 100644 index 85abc937..00000000 --- a/v1/models/entity_version_tuple.go +++ /dev/null @@ -1,56 +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" -) - -// EntityVersionTuple entity version tuple -// -// swagger:model Entity_VersionTuple -type EntityVersionTuple struct { - - // Generation of the netapp version. - Generation *int32 `json:"generation,omitempty"` - - // Major number of the netapp version. - MajorVersion *int32 `json:"majorVersion,omitempty"` - - // Minor number of the netapp version. - MinorVersion *int32 `json:"minorVersion,omitempty"` -} - -// Validate validates this entity version tuple -func (m *EntityVersionTuple) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity version tuple based on context it is used -func (m *EntityVersionTuple) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityVersionTuple) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityVersionTuple) UnmarshalBinary(b []byte) error { - var res EntityVersionTuple - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_vmware_custom_attributes_map_entry.go b/v1/models/entity_vmware_custom_attributes_map_entry.go deleted file mode 100644 index 2d8b5d25..00000000 --- a/v1/models/entity_vmware_custom_attributes_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// EntityVmwareCustomAttributesMapEntry entity vmware custom attributes map entry -// -// swagger:model Entity_VmwareCustomAttributesMapEntry -type EntityVmwareCustomAttributesMapEntry struct { - - // key - Key *int32 `json:"key,omitempty"` - - // value - Value *CustomAttribute `json:"value,omitempty"` -} - -// Validate validates this entity vmware custom attributes map entry -func (m *EntityVmwareCustomAttributesMapEntry) 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 -} - -func (m *EntityVmwareCustomAttributesMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity vmware custom attributes map entry based on the context it is used -func (m *EntityVmwareCustomAttributesMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityVmwareCustomAttributesMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityVmwareCustomAttributesMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityVmwareCustomAttributesMapEntry) UnmarshalBinary(b []byte) error { - var res EntityVmwareCustomAttributesMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_volume_info.go b/v1/models/entity_volume_info.go deleted file mode 100644 index 1ff0b346..00000000 --- a/v1/models/entity_volume_info.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/strfmt" - "github.com/go-openapi/swag" -) - -// EntityVolumeInfo entity volume info -// -// swagger:model Entity_VolumeInfo -type EntityVolumeInfo struct { - - // If this is a local volume, the path to the device that hosts the - // volume. - DevicePath *string `json:"devicePath,omitempty"` - - // Whether this volume supports extended attributes (like ACLs) when - // performing file backups. - ExtendedAttributesSupported *bool `json:"extendedAttributesSupported,omitempty"` - - // Whether the volume is boot volume or has system files - IsBootVolume *bool `json:"isBootVolume,omitempty"` - - // Whether this is a cohesity mount volume - IsCohesityMountVolume *bool `json:"isCohesityMountVolume,omitempty"` - - // This is set to true if the volume is protected as part of a backup job. - IsProtected *bool `json:"isProtected,omitempty"` - - // Whether this is a ReFS volume - IsRefsVolume *bool `json:"isRefsVolume,omitempty"` - - // Whether this is a shared volume, (e.g. for VCS clusters) - IsSharedVolume *bool `json:"isSharedVolume,omitempty"` - - // Logical size of the volume in bytes. - LogicalSizeBytes *uint64 `json:"logicalSizeBytes,omitempty"` - - // Mount points where the volume is mounted. For ex: 'C:\', '/mnt/foo' etc. - MountPointVec []string `json:"mountPointVec"` - - // Mount type of volume i.e. nfs, autofs, ext4 etc. - MountType *string `json:"mountType,omitempty"` - - // If this is a network attached volume, the full path to connect to the - // volume (e.g., (IP or hostname):/path/to/share for NFS volumes). - NetworkPath *string `json:"networkPath,omitempty"` - - // Used size of the volume in bytes. - UsedSizeBytes *uint64 `json:"usedSizeBytes,omitempty"` - - // Instead of storing all information about remote volumes(logical size, - // mount point, ...) this field store count of particular type of remote - // volumes(eg. mount_type=nfs, volume_count=3) - VolumeCount *int64 `json:"volumeCount,omitempty"` - - // Volume GUID. This may not be present for all volumes (for example, this - // will not be present for non-LVM volumes or network attached volumes). - VolumeGUID *string `json:"volumeGuid,omitempty"` - - // The volume label that can be used for displaying additional - // identifying information regarding volume. - VolumeLabel *string `json:"volumeLabel,omitempty"` -} - -// Validate validates this entity volume info -func (m *EntityVolumeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity volume info based on context it is used -func (m *EntityVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityVolumeInfo) UnmarshalBinary(b []byte) error { - var res EntityVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_vss_writer_info.go b/v1/models/entity_vss_writer_info.go deleted file mode 100644 index 49a459c4..00000000 --- a/v1/models/entity_vss_writer_info.go +++ /dev/null @@ -1,54 +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" -) - -// EntityVssWriterInfo Information about VSS writer found on Windows source. -// -// swagger:model Entity_VssWriterInfo -type EntityVssWriterInfo struct { - - // If true, VSS writer will be in the default exclude list during - // physical volume based backup. - IsDefaultExcluded *bool `json:"isDefaultExcluded,omitempty"` - - // VSS writer name. - VssWriterName *string `json:"vssWriterName,omitempty"` -} - -// Validate validates this entity vss writer info -func (m *EntityVssWriterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity vss writer info based on context it is used -func (m *EntityVssWriterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityVssWriterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityVssWriterInfo) UnmarshalBinary(b []byte) error { - var res EntityVssWriterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/env_backup_params.go b/v1/models/env_backup_params.go deleted file mode 100644 index 77f46c01..00000000 --- a/v1/models/env_backup_params.go +++ /dev/null @@ -1,1337 +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" -) - -// EnvBackupParams Message to capture any additional environment specific backup params at the -// job level. -// -// swagger:model EnvBackupParams -type EnvBackupParams struct { - - // This is applicable to Acropolis environment. - AcropolisBackupJobParams *AcropolisBackupJobParams `json:"acropolisBackupJobParams,omitempty"` - - // This is applicable to AWS native backups. - AwsNativeEnvParams *AWSNativeEnvParams `json:"awsNativeEnvParams,omitempty"` - - // This is applicable to Aws RDS Postgres environments. - AwsRdsPostgresEnvParams AwsRDSPostgresEnvBackupParams `json:"awsRdsPostgresEnvParams,omitempty"` - - // This is applicable to Azure Sql environments. - AzureSQLEnvParams *AzureSQLEnvBackupParamsProto `json:"azureSqlEnvParams,omitempty"` - - // This is applicable to Exchange environments. - ExchangeBackupJobParams *ExchangeBackupJobParams `json:"exchangeBackupJobParams,omitempty"` - - // This is applicable to externally triggered backups. - ExternallyTriggeredJobParams *ExternallyTriggeredJobParams `json:"externallyTriggeredJobParams,omitempty"` - - // This is applicable to stubbing in NAS environments. - FileStubbingParams *FileStubbingParams `json:"fileStubbingParams,omitempty"` - - // This is applicable to uptiering in NAS environments. - FileUptieringParams *FileUptieringParams `json:"fileUptieringParams,omitempty"` - - // This is applicable to GCP native backups. - GcpNativeJobParams *GCPNativeJobParams `json:"gcpNativeJobParams,omitempty"` - - // This is applicable to HyperV type of environments. - HypervBackupParams *HyperVBackupEnvParams `json:"hypervBackupParams,omitempty"` - - // This is applicable to Isilon type of environments. - IsilonEnvParams *IsilonEnvParams `json:"isilonEnvParams,omitempty"` - - // This is applicable to Kubernetes type of environments. - KubernetesEnvParams *KubernetesEnvParams `json:"kubernetesEnvParams,omitempty"` - - // This is applicable to analysis of NAS environments. - NasAnalysisJobParams *NasAnalysisJobParams `json:"nasAnalysisJobParams,omitempty"` - - // This is applicable to NAS type of environments. - NasBackupParams *NasBackupParams `json:"nasBackupParams,omitempty"` - - // This is applicable to NoSql DB environments. - NosqlBackupJobParams *NoSQLBackupJobParams `json:"nosqlBackupJobParams,omitempty"` - - // This is applicable to stubbing in o365 environments. - O365BackupParams *O365BackupEnvParams `json:"o365BackupParams,omitempty"` - - // This is applicable to Oracle environments. - OracleBackupJobParams *OracleBackupJobParams `json:"oracleBackupJobParams,omitempty"` - - // This is applicable to Outlook type of environments. - OutlookBackupParams *OutlookBackupEnvParams `json:"outlookBackupParams,omitempty"` - - // This is applicable to Physical type of environments. - PhysicalBackupParams *PhysicalBackupEnvParams `json:"physicalBackupParams,omitempty"` - - // This is applicable to kAwsS3 job type. - S3BackupJobParams *S3BackupJobParams `json:"s3BackupJobParams,omitempty"` - - // This is applicable to SAN environments. - SanBackupJobParams *SanBackupJobParams `json:"sanBackupJobParams,omitempty"` - - // This is applicable to SFDC type of environments. - SfdcBackupJobParams *SfdcBackupJobParams `json:"sfdcBackupJobParams,omitempty"` - - // This is applicable to snapshot manager jobs. - SnapshotManagerParams *SnapshotManagerParams `json:"snapshotManagerParams,omitempty"` - - // This is applicable to SQL environments. - SQLBackupJobParams *SQLBackupJobParams `json:"sqlBackupJobParams,omitempty"` - - // This is applicable to UDA environments. - UdaBackupJobParams *UdaBackupJobParams `json:"udaBackupJobParams,omitempty"` - - // This is applicable to VMware type of environments. - VmwareBackupParams *VMwareBackupEnvParams `json:"vmwareBackupParams,omitempty"` -} - -// Validate validates this env backup params -func (m *EnvBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsNativeEnvParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureSQLEnvParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternallyTriggeredJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileStubbingParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileUptieringParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpNativeJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonEnvParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesEnvParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasAnalysisJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365BackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareBackupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvBackupParams) validateAcropolisBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisBackupJobParams) { // not required - return nil - } - - if m.AcropolisBackupJobParams != nil { - if err := m.AcropolisBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateAwsNativeEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsNativeEnvParams) { // not required - return nil - } - - if m.AwsNativeEnvParams != nil { - if err := m.AwsNativeEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsNativeEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsNativeEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateAzureSQLEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureSQLEnvParams) { // not required - return nil - } - - if m.AzureSQLEnvParams != nil { - if err := m.AzureSQLEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateExchangeBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeBackupJobParams) { // not required - return nil - } - - if m.ExchangeBackupJobParams != nil { - if err := m.ExchangeBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateExternallyTriggeredJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExternallyTriggeredJobParams) { // not required - return nil - } - - if m.ExternallyTriggeredJobParams != nil { - if err := m.ExternallyTriggeredJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateFileStubbingParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileStubbingParams) { // not required - return nil - } - - if m.FileStubbingParams != nil { - if err := m.FileStubbingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileStubbingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileStubbingParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateFileUptieringParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileUptieringParams) { // not required - return nil - } - - if m.FileUptieringParams != nil { - if err := m.FileUptieringParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileUptieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileUptieringParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateGcpNativeJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpNativeJobParams) { // not required - return nil - } - - if m.GcpNativeJobParams != nil { - if err := m.GcpNativeJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpNativeJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpNativeJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateHypervBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervBackupParams) { // not required - return nil - } - - if m.HypervBackupParams != nil { - if err := m.HypervBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateIsilonEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if m.IsilonEnvParams != nil { - if err := m.IsilonEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateKubernetesEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesEnvParams) { // not required - return nil - } - - if m.KubernetesEnvParams != nil { - if err := m.KubernetesEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateNasAnalysisJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.NasAnalysisJobParams) { // not required - return nil - } - - if m.NasAnalysisJobParams != nil { - if err := m.NasAnalysisJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasAnalysisJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasAnalysisJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateNasBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.NasBackupParams) { // not required - return nil - } - - if m.NasBackupParams != nil { - if err := m.NasBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateNosqlBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlBackupJobParams) { // not required - return nil - } - - if m.NosqlBackupJobParams != nil { - if err := m.NosqlBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateO365BackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.O365BackupParams) { // not required - return nil - } - - if m.O365BackupParams != nil { - if err := m.O365BackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365BackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365BackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateOracleBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleBackupJobParams) { // not required - return nil - } - - if m.OracleBackupJobParams != nil { - if err := m.OracleBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateOutlookBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookBackupParams) { // not required - return nil - } - - if m.OutlookBackupParams != nil { - if err := m.OutlookBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validatePhysicalBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalBackupParams) { // not required - return nil - } - - if m.PhysicalBackupParams != nil { - if err := m.PhysicalBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateS3BackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.S3BackupJobParams) { // not required - return nil - } - - if m.S3BackupJobParams != nil { - if err := m.S3BackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateSanBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.SanBackupJobParams) { // not required - return nil - } - - if m.SanBackupJobParams != nil { - if err := m.SanBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateSfdcBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcBackupJobParams) { // not required - return nil - } - - if m.SfdcBackupJobParams != nil { - if err := m.SfdcBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateSnapshotManagerParams(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotManagerParams) { // not required - return nil - } - - if m.SnapshotManagerParams != nil { - if err := m.SnapshotManagerParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateSQLBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.SQLBackupJobParams) { // not required - return nil - } - - if m.SQLBackupJobParams != nil { - if err := m.SQLBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateUdaBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaBackupJobParams) { // not required - return nil - } - - if m.UdaBackupJobParams != nil { - if err := m.UdaBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) validateVmwareBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareBackupParams) { // not required - return nil - } - - if m.VmwareBackupParams != nil { - if err := m.VmwareBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareBackupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this env backup params based on the context it is used -func (m *EnvBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsNativeEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureSQLEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternallyTriggeredJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileStubbingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileUptieringParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpNativeJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasAnalysisJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365BackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3BackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSanBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvBackupParams) contextValidateAcropolisBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisBackupJobParams != nil { - - if swag.IsZero(m.AcropolisBackupJobParams) { // not required - return nil - } - - if err := m.AcropolisBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateAwsNativeEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsNativeEnvParams != nil { - - if swag.IsZero(m.AwsNativeEnvParams) { // not required - return nil - } - - if err := m.AwsNativeEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsNativeEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsNativeEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateAzureSQLEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLEnvParams != nil { - - if swag.IsZero(m.AzureSQLEnvParams) { // not required - return nil - } - - if err := m.AzureSQLEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateExchangeBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeBackupJobParams != nil { - - if swag.IsZero(m.ExchangeBackupJobParams) { // not required - return nil - } - - if err := m.ExchangeBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateExternallyTriggeredJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternallyTriggeredJobParams != nil { - - if swag.IsZero(m.ExternallyTriggeredJobParams) { // not required - return nil - } - - if err := m.ExternallyTriggeredJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateFileStubbingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileStubbingParams != nil { - - if swag.IsZero(m.FileStubbingParams) { // not required - return nil - } - - if err := m.FileStubbingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileStubbingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileStubbingParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateFileUptieringParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileUptieringParams != nil { - - if swag.IsZero(m.FileUptieringParams) { // not required - return nil - } - - if err := m.FileUptieringParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileUptieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileUptieringParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateGcpNativeJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpNativeJobParams != nil { - - if swag.IsZero(m.GcpNativeJobParams) { // not required - return nil - } - - if err := m.GcpNativeJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpNativeJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpNativeJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateHypervBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervBackupParams != nil { - - if swag.IsZero(m.HypervBackupParams) { // not required - return nil - } - - if err := m.HypervBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateIsilonEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonEnvParams != nil { - - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if err := m.IsilonEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateKubernetesEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesEnvParams != nil { - - if swag.IsZero(m.KubernetesEnvParams) { // not required - return nil - } - - if err := m.KubernetesEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesEnvParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateNasAnalysisJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasAnalysisJobParams != nil { - - if swag.IsZero(m.NasAnalysisJobParams) { // not required - return nil - } - - if err := m.NasAnalysisJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasAnalysisJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasAnalysisJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateNasBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasBackupParams != nil { - - if swag.IsZero(m.NasBackupParams) { // not required - return nil - } - - if err := m.NasBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateNosqlBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlBackupJobParams != nil { - - if swag.IsZero(m.NosqlBackupJobParams) { // not required - return nil - } - - if err := m.NosqlBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateO365BackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.O365BackupParams != nil { - - if swag.IsZero(m.O365BackupParams) { // not required - return nil - } - - if err := m.O365BackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365BackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365BackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateOracleBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleBackupJobParams != nil { - - if swag.IsZero(m.OracleBackupJobParams) { // not required - return nil - } - - if err := m.OracleBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateOutlookBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookBackupParams != nil { - - if swag.IsZero(m.OutlookBackupParams) { // not required - return nil - } - - if err := m.OutlookBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidatePhysicalBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalBackupParams != nil { - - if swag.IsZero(m.PhysicalBackupParams) { // not required - return nil - } - - if err := m.PhysicalBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalBackupParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateS3BackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3BackupJobParams != nil { - - if swag.IsZero(m.S3BackupJobParams) { // not required - return nil - } - - if err := m.S3BackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateSanBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SanBackupJobParams != nil { - - if swag.IsZero(m.SanBackupJobParams) { // not required - return nil - } - - if err := m.SanBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateSfdcBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcBackupJobParams != nil { - - if swag.IsZero(m.SfdcBackupJobParams) { // not required - return nil - } - - if err := m.SfdcBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateSnapshotManagerParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerParams != nil { - - if swag.IsZero(m.SnapshotManagerParams) { // not required - return nil - } - - if err := m.SnapshotManagerParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateSQLBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLBackupJobParams != nil { - - if swag.IsZero(m.SQLBackupJobParams) { // not required - return nil - } - - if err := m.SQLBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateUdaBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaBackupJobParams != nil { - - if swag.IsZero(m.UdaBackupJobParams) { // not required - return nil - } - - if err := m.UdaBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *EnvBackupParams) contextValidateVmwareBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareBackupParams != nil { - - if swag.IsZero(m.VmwareBackupParams) { // not required - return nil - } - - if err := m.VmwareBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareBackupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EnvBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EnvBackupParams) UnmarshalBinary(b []byte) error { - var res EnvBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/environment_type_job_parameters.go b/v1/models/environment_type_job_parameters.go deleted file mode 100644 index 92614ada..00000000 --- a/v1/models/environment_type_job_parameters.go +++ /dev/null @@ -1,634 +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" -) - -// EnvironmentTypeJobParameters Environment Specific Common Job Parameters. -// -// Specifies additional parameters that are common to all Protection -// Sources in a Protection Job created for a particular environment type. -// -// swagger:model EnvironmentTypeJobParameters -type EnvironmentTypeJobParameters struct { - - // Specifies additional special parameters that are applicable only to - // snaphot manger jobs. - AwsSnapshotParameters *AwsSnapshotManagerParameters `json:"awsSnapshotParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kExchange' type. - ExchangeParameters *ExchangeEnvJobParameters `json:"exchangeParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // externally triggered backup jobs of 'kView' type. - ExternallyTriggeredJobParameters *ExternallyTriggeredEnvJobParameters `json:"externallyTriggeredJobParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kHyperV' type. - HypervParameters *HypervEnvJobParameters `json:"hypervParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kGenericNas' type. - NasParameters *NasEnvJobParameters `json:"nasParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // types of 'kO365Outlook' type which incorporates both Mailbox & OneDrive - // backup parameters. - Office365Parameters *Office365EnvJobParameters `json:"office365Parameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kOracle' type. - OracleParameters *OracleEnvJobParameters `json:"oracleParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Sources of 'kPhysical' type in a kPhysical environment. - PhysicalParameters *PhysicalEnvJobParameters `json:"physicalParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // SAN Types. - PureParameters *SanEnvJobParameters `json:"pureParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kSQL' type. - SQLParameters *SQLEnvJobParameters `json:"sqlParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Types of 'kVMware' type. - VmwareParameters *VmwareEnvJobParameters `json:"vmwareParameters,omitempty"` -} - -// Validate validates this environment type job parameters -func (m *EnvironmentTypeJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsSnapshotParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternallyTriggeredJobParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Parameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvironmentTypeJobParameters) validateAwsSnapshotParameters(formats strfmt.Registry) error { - if swag.IsZero(m.AwsSnapshotParameters) { // not required - return nil - } - - if m.AwsSnapshotParameters != nil { - if err := m.AwsSnapshotParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateExchangeParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeParameters) { // not required - return nil - } - - if m.ExchangeParameters != nil { - if err := m.ExchangeParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateExternallyTriggeredJobParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ExternallyTriggeredJobParameters) { // not required - return nil - } - - if m.ExternallyTriggeredJobParameters != nil { - if err := m.ExternallyTriggeredJobParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateHypervParameters(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if m.HypervParameters != nil { - if err := m.HypervParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateNasParameters(formats strfmt.Registry) error { - if swag.IsZero(m.NasParameters) { // not required - return nil - } - - if m.NasParameters != nil { - if err := m.NasParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateOffice365Parameters(formats strfmt.Registry) error { - if swag.IsZero(m.Office365Parameters) { // not required - return nil - } - - if m.Office365Parameters != nil { - if err := m.Office365Parameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Parameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Parameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateOracleParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParameters) { // not required - return nil - } - - if m.OracleParameters != nil { - if err := m.OracleParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validatePhysicalParameters(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParameters) { // not required - return nil - } - - if m.PhysicalParameters != nil { - if err := m.PhysicalParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validatePureParameters(formats strfmt.Registry) error { - if swag.IsZero(m.PureParameters) { // not required - return nil - } - - if m.PureParameters != nil { - if err := m.PureParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateSQLParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SQLParameters) { // not required - return nil - } - - if m.SQLParameters != nil { - if err := m.SQLParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) validateVmwareParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if m.VmwareParameters != nil { - if err := m.VmwareParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this environment type job parameters based on the context it is used -func (m *EnvironmentTypeJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsSnapshotParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternallyTriggeredJobParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Parameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateAwsSnapshotParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsSnapshotParameters != nil { - - if swag.IsZero(m.AwsSnapshotParameters) { // not required - return nil - } - - if err := m.AwsSnapshotParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateExchangeParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParameters != nil { - - if swag.IsZero(m.ExchangeParameters) { // not required - return nil - } - - if err := m.ExchangeParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateExternallyTriggeredJobParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternallyTriggeredJobParameters != nil { - - if swag.IsZero(m.ExternallyTriggeredJobParameters) { // not required - return nil - } - - if err := m.ExternallyTriggeredJobParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateHypervParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParameters != nil { - - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if err := m.HypervParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateNasParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.NasParameters != nil { - - if swag.IsZero(m.NasParameters) { // not required - return nil - } - - if err := m.NasParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateOffice365Parameters(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Parameters != nil { - - if swag.IsZero(m.Office365Parameters) { // not required - return nil - } - - if err := m.Office365Parameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Parameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Parameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateOracleParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParameters != nil { - - if swag.IsZero(m.OracleParameters) { // not required - return nil - } - - if err := m.OracleParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidatePhysicalParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParameters != nil { - - if swag.IsZero(m.PhysicalParameters) { // not required - return nil - } - - if err := m.PhysicalParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidatePureParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.PureParameters != nil { - - if swag.IsZero(m.PureParameters) { // not required - return nil - } - - if err := m.PureParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateSQLParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLParameters != nil { - - if swag.IsZero(m.SQLParameters) { // not required - return nil - } - - if err := m.SQLParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlParameters") - } - return err - } - } - - return nil -} - -func (m *EnvironmentTypeJobParameters) contextValidateVmwareParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParameters != nil { - - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if err := m.VmwareParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EnvironmentTypeJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EnvironmentTypeJobParameters) UnmarshalBinary(b []byte) error { - var res EnvironmentTypeJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/epoch_proto.go b/v1/models/epoch_proto.go deleted file mode 100644 index 376cf22a..00000000 --- a/v1/models/epoch_proto.go +++ /dev/null @@ -1,55 +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" -) - -// EpochProto Message encapsulating the information regarding an Epoch. -// -// swagger:model EpochProto -type EpochProto struct { - - // Epoch ID of an epoch. - EpochID *int64 `json:"epochId,omitempty"` - - // Scribe version for this epoch after it's read from scribe. - // Note: Internal in-memory use only. There is no guarantee when this - // scribe version is updated. - ScribeVersion *int64 `json:"scribeVersion,omitempty"` -} - -// Validate validates this epoch proto -func (m *EpochProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this epoch proto based on context it is used -func (m *EpochProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EpochProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EpochProto) UnmarshalBinary(b []byte) error { - var res EpochProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/erasure_coding_info.go b/v1/models/erasure_coding_info.go deleted file mode 100644 index 063676ec..00000000 --- a/v1/models/erasure_coding_info.go +++ /dev/null @@ -1,63 +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" -) - -// ErasureCodingInfo Erasure Coding Information. -// -// Specifies information for erasure coding. -// -// swagger:model ErasureCodingInfo -type ErasureCodingInfo struct { - - // Specifies whether Erasure coding is enabled on the Storage Domain - // (View Box). - ErasureCodingEnabled *bool `json:"erasureCodingEnabled,omitempty"` - - // Specifies if erasure coding should occur inline (as the data is being - // written). This field is only relevant if erasure coding is enabled. - InlineErasureCoding *bool `json:"inlineErasureCoding,omitempty"` - - // The number of coded stripes. - NumCodedStripes *int32 `json:"numCodedStripes,omitempty"` - - // The number of stripes containing data. - NumDataStripes *int32 `json:"numDataStripes,omitempty"` -} - -// Validate validates this erasure coding info -func (m *ErasureCodingInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this erasure coding info based on context it is used -func (m *ErasureCodingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErasureCodingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErasureCodingInfo) UnmarshalBinary(b []byte) error { - var res ErasureCodingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/error.go b/v1/models/error.go deleted file mode 100644 index 7233cea0..00000000 --- a/v1/models/error.go +++ /dev/null @@ -1,55 +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" -) - -// Error Error. -// -// Specifies the error object with error code and a message. -// -// swagger:model Error -type Error struct { - - // Specifies the error code. - ErrorCode *int64 `json:"errorCode,omitempty"` - - // Specifies the error message. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this error -func (m *Error) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this error based on context it is used -func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Error) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Error) UnmarshalBinary(b []byte) error { - var res Error - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/error_proto.go b/v1/models/error_proto.go deleted file mode 100644 index 0aff1727..00000000 --- a/v1/models/error_proto.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" -) - -// ErrorProto error proto -// -// swagger:model ErrorProto -type ErrorProto struct { - - // An optional detail. - ErrorMsg *string `json:"errorMsg,omitempty"` - - // Error. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this error proto -func (m *ErrorProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this error proto based on context it is used -func (m *ErrorProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErrorProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErrorProto) UnmarshalBinary(b []byte) error { - var res ErrorProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/eula_config.go b/v1/models/eula_config.go deleted file mode 100644 index 2022016c..00000000 --- a/v1/models/eula_config.go +++ /dev/null @@ -1,130 +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" -) - -// EulaConfig EULA Configuration. -// -// Specifies the End User License Agreement acceptance information. -// -// swagger:model EulaConfig -type EulaConfig struct { - - // Specifies the license key. - // Required: true - LicenseKey *string `json:"licenseKey"` - - // Specifies the login account name for the Cohesity user who accepted - // the End User License Agreement. - // Read Only: true - SignedByUser *string `json:"signedByUser,omitempty"` - - // Specifies the time that the End User License Agreement was accepted. - // Read Only: true - SignedTime *int64 `json:"signedTime,omitempty"` - - // Specifies the version of the End User License Agreement that was accepted. - // Required: true - SignedVersion *int64 `json:"signedVersion"` -} - -// Validate validates this eula config -func (m *EulaConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLicenseKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSignedVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EulaConfig) validateLicenseKey(formats strfmt.Registry) error { - - if err := validate.Required("licenseKey", "body", m.LicenseKey); err != nil { - return err - } - - return nil -} - -func (m *EulaConfig) validateSignedVersion(formats strfmt.Registry) error { - - if err := validate.Required("signedVersion", "body", m.SignedVersion); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this eula config based on the context it is used -func (m *EulaConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSignedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSignedTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EulaConfig) contextValidateSignedByUser(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "signedByUser", "body", m.SignedByUser); err != nil { - return err - } - - return nil -} - -func (m *EulaConfig) contextValidateSignedTime(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "signedTime", "body", m.SignedTime); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EulaConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EulaConfig) UnmarshalBinary(b []byte) error { - var res EulaConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ews_to_pst_conversion_params.go b/v1/models/ews_to_pst_conversion_params.go deleted file mode 100644 index e7565fd4..00000000 --- a/v1/models/ews_to_pst_conversion_params.go +++ /dev/null @@ -1,69 +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" -) - -// EwsToPstConversionParams ews to pst conversion params -// -// swagger:model EwsToPstConversionParams -type EwsToPstConversionParams struct { - - // Create Msg files or Pst. - // false value indicates only create msg files. - // Default value is true. - CreatePst *bool `json:"createPst,omitempty"` - - // Encrypted version of the pst_password above. The plain password should be - // cleared and the encrypted form should be persisted in the restore task - // state proto. - EncryptedPstPassword *string `json:"encryptedPstPassword,omitempty"` - - // ConvertEwsToPst flags of type ConvertEwsToPSTOptionFlags. - OptionFlags *uint32 `json:"optionFlags,omitempty"` - - // Name prefix for generated PST files. - PstNamePrefix *string `json:"pstNamePrefix,omitempty"` - - // Optional password to be set for the output PSTs. - PstPassword *string `json:"pstPassword,omitempty"` - - // PST rotation size in bytes. - PstSizeThreshold *int64 `json:"pstSizeThreshold,omitempty"` -} - -// Validate validates this ews to pst conversion params -func (m *EwsToPstConversionParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ews to pst conversion params based on context it is used -func (m *EwsToPstConversionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EwsToPstConversionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EwsToPstConversionParams) UnmarshalBinary(b []byte) error { - var res EwsToPstConversionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_backup_job_params.go b/v1/models/exchange_backup_job_params.go deleted file mode 100644 index 30a308e2..00000000 --- a/v1/models/exchange_backup_job_params.go +++ /dev/null @@ -1,54 +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" -) - -// ExchangeBackupJobParams Exchange Backup Job Parameters. -// -// Message to capture additional backup job params specific to Exchange. -// -// swagger:model ExchangeBackupJobParams -type ExchangeBackupJobParams struct { - - // Whether the backups should be copy-only. - // If this is set to true, then Exchange server will not truncate logs after - // backup. - IsCopyOnlyFull *bool `json:"isCopyOnlyFull,omitempty"` -} - -// Validate validates this exchange backup job params -func (m *ExchangeBackupJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange backup job params based on context it is used -func (m *ExchangeBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeBackupJobParams) UnmarshalBinary(b []byte) error { - var res ExchangeBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g.go b/v1/models/exchange_d_a_g.go deleted file mode 100644 index 8df6a1a4..00000000 --- a/v1/models/exchange_d_a_g.go +++ /dev/null @@ -1,112 +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" -) - -// ExchangeDAG Represents top level Exchange DAG information.The DAG may or may not have an -// Admin Access Point (AAP). For IP-less DAGs, there won't be an AAP. We do not -// care about AAP, so it is not included in this DAG proto. -// -// swagger:model ExchangeDAG -type ExchangeDAG struct { - - // Exchange DAG identity. When queried, if id.guid is empty, then its not a - // valid DAG. - ID *ExchangeDAGIdentity `json:"id,omitempty"` -} - -// Validate validates this exchange d a g -func (m *ExchangeDAG) 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 *ExchangeDAG) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -// ContextValidate validate this exchange d a g based on the context it is used -func (m *ExchangeDAG) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAG) 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 -} - -// MarshalBinary interface implementation -func (m *ExchangeDAG) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAG) UnmarshalBinary(b []byte) error { - var res ExchangeDAG - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_backup_preference.go b/v1/models/exchange_d_a_g_backup_preference.go deleted file mode 100644 index ccdd9750..00000000 --- a/v1/models/exchange_d_a_g_backup_preference.go +++ /dev/null @@ -1,61 +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" -) - -// ExchangeDAGBackupPreference Contains params specified by the user while updating an Exchange DAG backup -// preference. -// -// swagger:model ExchangeDAGBackupPreference -type ExchangeDAGBackupPreference struct { - - // If we have more than one passive copy of a DAG database, this option - // will specify which one among them should be considered for backup. - PassivePreference *int32 `json:"passivePreference,omitempty"` - - // User specified backup preference order while choosing between passive - // copies. This is set only when 'passive_preference' = kUserSpecified. - // Passive copy present on server[0] will get the highest preference - // and server[n-1] will get the least preference while choosing for backup. - PassivePreferenceServerGUIDVec []string `json:"passivePreferenceServerGuidVec"` - - // Consider active copy or not for backup. - Preference *int32 `json:"preference,omitempty"` -} - -// Validate validates this exchange d a g backup preference -func (m *ExchangeDAGBackupPreference) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange d a g backup preference based on context it is used -func (m *ExchangeDAGBackupPreference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGBackupPreference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGBackupPreference) UnmarshalBinary(b []byte) error { - var res ExchangeDAGBackupPreference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_database.go b/v1/models/exchange_d_a_g_database.go deleted file mode 100644 index efb0823c..00000000 --- a/v1/models/exchange_d_a_g_database.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeDAGDatabase Exchange DAG database Information -// -// Specifies the information about all the copies of the database that -// is part of DAG. -// -// swagger:model ExchangeDAGDatabase -type ExchangeDAGDatabase struct { - - // Specifies about all the copies of this DAG database. This include - // active and passive copy of the database. - DatabaseCopyInfoList []*ExchangeDatabaseCopyInfo `json:"databaseCopyInfoList"` - - // Specifies the guid of the database. - GUID *string `json:"guid,omitempty"` - - // Specifies the name of the database. - Name *string `json:"name,omitempty"` -} - -// Validate validates this exchange d a g database -func (m *ExchangeDAGDatabase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseCopyInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGDatabase) validateDatabaseCopyInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseCopyInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DatabaseCopyInfoList); i++ { - if swag.IsZero(m.DatabaseCopyInfoList[i]) { // not required - continue - } - - if m.DatabaseCopyInfoList[i] != nil { - if err := m.DatabaseCopyInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this exchange d a g database based on the context it is used -func (m *ExchangeDAGDatabase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseCopyInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGDatabase) contextValidateDatabaseCopyInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatabaseCopyInfoList); i++ { - - if m.DatabaseCopyInfoList[i] != nil { - - if swag.IsZero(m.DatabaseCopyInfoList[i]) { // not required - return nil - } - - if err := m.DatabaseCopyInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseCopyInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGDatabase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGDatabase) UnmarshalBinary(b []byte) error { - var res ExchangeDAGDatabase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_database_copy.go b/v1/models/exchange_d_a_g_database_copy.go deleted file mode 100644 index a38f5055..00000000 --- a/v1/models/exchange_d_a_g_database_copy.go +++ /dev/null @@ -1,189 +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" -) - -// ExchangeDAGDatabaseCopy Information about a DAG Database copy status on a member Exchange server in -// DAG. Note that this information may become stale as it contains status -// information. If a DB is created in DAG node, it becomes active copy on that -// node with single copy. This information is assembled from -// Get-MailboxDatabase and Get-MailboxDatabaseCopyStatus PowerShell cmdlets. -// -// swagger:model ExchangeDAGDatabaseCopy -type ExchangeDAGDatabaseCopy struct { - - // Activation preference number assigned for this database on a node. - // This is 1 based number assigned in Exchange Admin Console. - ActivationPreference *uint32 `json:"activationPreference,omitempty"` - - // Active copy of the database. Look for active_copy=true and - // status=kHealthy to find active mounted copy of a database. - ActiveCopy *bool `json:"activeCopy,omitempty"` - - // Database copy error details. - CopyError *DatabaseCopyError `json:"copyError,omitempty"` - - // Guid of the DAG db copy. This is unique to a copy of the database on a - // specific node. Use the ExchangeDatabase::guid to identify the parent - // database for which this copy exists. - CopyGUID *string `json:"copyGuid,omitempty"` - - // Database copy status. If the status is in error state, the error info - // will be present in error object. - CopyStatus *int32 `json:"copyStatus,omitempty"` - - // Parent database information. - Db *ExchangeDatabase `json:"db,omitempty"` - - // Outstanding logs to copy for the database copy on this node. - // 1 = Unknown. This is the 'CopyQueueLength' cmdlet param. - MaxLogToCopy *int64 `json:"maxLogToCopy,omitempty"` - - // Outstanding logs to replay for the database copy on this node. - // 1 = Unknown. This is the 'ReplayQueueLength'. - MaxLogToReplay *int64 `json:"maxLogToReplay,omitempty"` -} - -// Validate validates this exchange d a g database copy -func (m *ExchangeDAGDatabaseCopy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDb(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGDatabaseCopy) validateCopyError(formats strfmt.Registry) error { - if swag.IsZero(m.CopyError) { // not required - return nil - } - - if m.CopyError != nil { - if err := m.CopyError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyError") - } - return err - } - } - - return nil -} - -func (m *ExchangeDAGDatabaseCopy) validateDb(formats strfmt.Registry) error { - if swag.IsZero(m.Db) { // not required - return nil - } - - if m.Db != nil { - if err := m.Db.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("db") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("db") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange d a g database copy based on the context it is used -func (m *ExchangeDAGDatabaseCopy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDb(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGDatabaseCopy) contextValidateCopyError(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyError != nil { - - if swag.IsZero(m.CopyError) { // not required - return nil - } - - if err := m.CopyError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyError") - } - return err - } - } - - return nil -} - -func (m *ExchangeDAGDatabaseCopy) contextValidateDb(ctx context.Context, formats strfmt.Registry) error { - - if m.Db != nil { - - if swag.IsZero(m.Db) { // not required - return nil - } - - if err := m.Db.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("db") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("db") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGDatabaseCopy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGDatabaseCopy) UnmarshalBinary(b []byte) error { - var res ExchangeDAGDatabaseCopy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_identity.go b/v1/models/exchange_d_a_g_identity.go deleted file mode 100644 index 422180ad..00000000 --- a/v1/models/exchange_d_a_g_identity.go +++ /dev/null @@ -1,57 +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" -) - -// ExchangeDAGIdentity Exchange DAG Identity. Fields returned by PowerShell: -// -// Get-DatabaseAvailabilityGroup -Status. All fields are case insensitive. -// -// swagger:model ExchangeDAGIdentity -type ExchangeDAGIdentity struct { - - // unique guid for the server in AD. This is unqiue identifier that can be - // used to compare DAG. - GUID *string `json:"guid,omitempty"` - - // Display Name. This is the Identity, which is unique within AD forest. - // Example: DAG-Exchange - Name *string `json:"name,omitempty"` -} - -// Validate validates this exchange d a g identity -func (m *ExchangeDAGIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange d a g identity based on context it is used -func (m *ExchangeDAGIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGIdentity) UnmarshalBinary(b []byte) error { - var res ExchangeDAGIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_info.go b/v1/models/exchange_d_a_g_info.go deleted file mode 100644 index 64fd4907..00000000 --- a/v1/models/exchange_d_a_g_info.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeDAGInfo Contains information about a Database Availability Group (aka DAG). -// -// This information is constructed by magneto based on the Exchange -// information returned by the agent for each exchange node. -// See https://bit.ly/2JBN3uF for DAG details. -// -// swagger:model ExchangeDAGInfo -type ExchangeDAGInfo struct { - - // DAG backup preference. - BackupPreference *ExchangeDAGBackupPreference `json:"backupPreference,omitempty"` - - // Exchange DAG identity. - ID *ExchangeDAGIdentity `json:"id,omitempty"` - - // All the servers that belong to this DAG. - ServerVec []*ExchangeServer `json:"serverVec"` -} - -// Validate validates this exchange d a g info -func (m *ExchangeDAGInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGInfo) validateBackupPreference(formats strfmt.Registry) error { - if swag.IsZero(m.BackupPreference) { // not required - return nil - } - - if m.BackupPreference != nil { - if err := m.BackupPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPreference") - } - return err - } - } - - return nil -} - -func (m *ExchangeDAGInfo) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *ExchangeDAGInfo) validateServerVec(formats strfmt.Registry) error { - if swag.IsZero(m.ServerVec) { // not required - return nil - } - - for i := 0; i < len(m.ServerVec); i++ { - if swag.IsZero(m.ServerVec[i]) { // not required - continue - } - - if m.ServerVec[i] != nil { - if err := m.ServerVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this exchange d a g info based on the context it is used -func (m *ExchangeDAGInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServerVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDAGInfo) contextValidateBackupPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupPreference != nil { - - if swag.IsZero(m.BackupPreference) { // not required - return nil - } - - if err := m.BackupPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPreference") - } - return err - } - } - - return nil -} - -func (m *ExchangeDAGInfo) 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 -} - -func (m *ExchangeDAGInfo) contextValidateServerVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServerVec); i++ { - - if m.ServerVec[i] != nil { - - if swag.IsZero(m.ServerVec[i]) { // not required - return nil - } - - if err := m.ServerVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGInfo) UnmarshalBinary(b []byte) error { - var res ExchangeDAGInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_d_a_g_protection_preference.go b/v1/models/exchange_d_a_g_protection_preference.go deleted file mode 100644 index eacac638..00000000 --- a/v1/models/exchange_d_a_g_protection_preference.go +++ /dev/null @@ -1,74 +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" -) - -// ExchangeDAGProtectionPreference Exchange DAG Backup preference -// -// Specifies the information about the preference order while choosing -// between which database copy of the database which is part of DAG should -// be protected. -// -// swagger:model ExchangeDAGProtectionPreference -type ExchangeDAGProtectionPreference struct { - - // Specifies the preference order of the exchange servers from which passive - // database copies should be protected. - // The preference order is descending which indicates that passive database - // copy in the first server in the list gets the highest preference. - PassiveCopyPreferenceServerGUIDList []string `json:"passiveCopyPreferenceServerGuidList"` - - // Specifies that only passive database copies should be protected if - // this is set to true. - // If this is set to false, both active and passive database copies can be - // protected. - PassiveOnly *bool `json:"passiveOnly,omitempty"` - - // Specifies to use the user specified preference order of exchange servers - // from which the passive database copies should be protected if this is - // set to true. - // - // Every copy of an Exchange database in a DAG is assigned an activation - // preference number. This number is used by the system as part of the - // passive database activation process. - // If this bool flag is set to false, the reverse order of activation - // is used while choosing between passive copies. - UseUserSpecifiedPassivePreferenceOrder *bool `json:"useUserSpecifiedPassivePreferenceOrder,omitempty"` -} - -// Validate validates this exchange d a g protection preference -func (m *ExchangeDAGProtectionPreference) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange d a g protection preference based on context it is used -func (m *ExchangeDAGProtectionPreference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDAGProtectionPreference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDAGProtectionPreference) UnmarshalBinary(b []byte) error { - var res ExchangeDAGProtectionPreference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_dag_hosts_response.go b/v1/models/exchange_dag_hosts_response.go deleted file mode 100644 index 3adc06ec..00000000 --- a/v1/models/exchange_dag_hosts_response.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeDagHostsResponse Exchange DAG Hosts Response. -// -// Specifies if the endpoint provided in the request is standalone exchange -// server or not. If the endpoint is not a standalone exchange server, the list -// of hosts which belong to the Exchange DAG are returned. -// -// swagger:model ExchangeDagHostsResponse -type ExchangeDagHostsResponse struct { - - // Specifies information about the preference order while choosing - // between which database copy of the exchange database, which is part of - // DAG, should be protected. - ExchangeDagProtectionPreference *ExchangeDAGProtectionPreference `json:"exchangeDagProtectionPreference,omitempty"` - - // Specifies the list of exchange hosts that belong to Exchange DAG. - ExchangeHostInfoList []*ExchangeHostInfo `json:"exchangeHostInfoList"` - - // Specifies the Unique GUID for the DAG. - GUID *string `json:"guid,omitempty"` - - // Specifies if the endpoint provided in the request is a standlone exchange - // server or not. exchangeHostInfoList is not populated if it is a standalone - // exchange server. - IsStandaloneHost *bool `json:"isStandaloneHost,omitempty"` - - // Specifies the display name of the DAG. - Name *string `json:"name,omitempty"` - - // Specifies the Protection Source Id of the Exchange DAG if it is already - // created. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` -} - -// Validate validates this exchange dag hosts response -func (m *ExchangeDagHostsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExchangeDagProtectionPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeHostInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDagHostsResponse) validateExchangeDagProtectionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if m.ExchangeDagProtectionPreference != nil { - if err := m.ExchangeDagProtectionPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *ExchangeDagHostsResponse) validateExchangeHostInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeHostInfoList) { // not required - return nil - } - - for i := 0; i < len(m.ExchangeHostInfoList); i++ { - if swag.IsZero(m.ExchangeHostInfoList[i]) { // not required - continue - } - - if m.ExchangeHostInfoList[i] != nil { - if err := m.ExchangeHostInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeHostInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeHostInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this exchange dag hosts response based on the context it is used -func (m *ExchangeDagHostsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExchangeDagProtectionPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeHostInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDagHostsResponse) contextValidateExchangeDagProtectionPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeDagProtectionPreference != nil { - - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if err := m.ExchangeDagProtectionPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *ExchangeDagHostsResponse) contextValidateExchangeHostInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExchangeHostInfoList); i++ { - - if m.ExchangeHostInfoList[i] != nil { - - if swag.IsZero(m.ExchangeHostInfoList[i]) { // not required - return nil - } - - if err := m.ExchangeHostInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeHostInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeHostInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDagHostsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDagHostsResponse) UnmarshalBinary(b []byte) error { - var res ExchangeDagHostsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_database.go b/v1/models/exchange_database.go deleted file mode 100644 index d3b7cac6..00000000 --- a/v1/models/exchange_database.go +++ /dev/null @@ -1,364 +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" -) - -// ExchangeDatabase Information about Exchange mailbox Database that is common for standalone or -// DAG enabled database copy. -// -// swagger:model ExchangeDatabase -type ExchangeDatabase struct { - - // There is a current VSS backup that is in progress for this database on - // this node or on another DAG node. If another backup is dispatched, it will - // fail. - BackupInProgress *bool `json:"backupInProgress,omitempty"` - - // Whether backing up this DB is supported or not due to system or - // implementation limitations. If the value is false, reason - // string below can be used to say why its not supported. At least one reason - // should be present when this value is false. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Last backup times. - BackupTimes *ExchangeDatabaseBackupTimes `json:"backupTimes,omitempty"` - - // Free form text for the reasons why backup is not supported for this DB. - // This is valid only if backup_supported = false. The first element in - // this vector is the top reason why its not supported. For example, if the - // db is dismounted for error cases, subsequent elements may show missing EDB - // file. - BackupUnsupportedReasonVec []string `json:"backupUnsupportedReasonVec"` - - // Content index state for the database. If indexing state is not success, - // then logs will not be truncated in the database after VSS backup. - ContentIndexState *int32 `json:"contentIndexState,omitempty"` - - // When this DB was created in local time. - CreatedDate *LocalTime `json:"createdDate,omitempty"` - - // EDB info. - Edb *ExchangeEDBInfo `json:"edb,omitempty"` - - // This indicates whether only full backup of this database is supported. For - // example when circular logging is enabled, only full backup will be - // supported as Exchange will recycle logs. This flag is valid only when - // 'backup_support' = true. - FullBackupOnly *bool `json:"fullBackupOnly,omitempty"` - - // Identity of the database. - ID *ExchangeDatabaseIdentity `json:"id,omitempty"` - - // LOG and checkpoint info. - Log *ExchangeLogInfo `json:"log,omitempty"` - - // Master server type of the database. Tells whether its standalone/DAG. - MasterType *int32 `json:"masterType,omitempty"` - - // There is a current run of Exchange DB maintenance in progress at this - // time. VSS backup should not have issue with online maintenance. So this - // info is captured for debugging purpose. - OnlineMaintenanceInProgress *bool `json:"onlineMaintenanceInProgress,omitempty"` - - // This is a special type of db: Recovery database. Exchange does not support - // backing this type of db. - Recovery *bool `json:"recovery,omitempty"` - - // Replay Lag Time in hours configured in Exchange Admin Console for the - // database. This value is specific to an Exchange server node. - ReplayLagHours *uint32 `json:"replayLagHours,omitempty"` - - // Computed state of the database. - State *int32 `json:"state,omitempty"` - - // Database type. Mailbox, Public folder, etc. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this exchange database -func (m *ExchangeDatabase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupTimes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEdb(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLog(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabase) validateBackupTimes(formats strfmt.Registry) error { - if swag.IsZero(m.BackupTimes) { // not required - return nil - } - - if m.BackupTimes != nil { - if err := m.BackupTimes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupTimes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupTimes") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) validateCreatedDate(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedDate) { // not required - return nil - } - - if m.CreatedDate != nil { - if err := m.CreatedDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("createdDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("createdDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) validateEdb(formats strfmt.Registry) error { - if swag.IsZero(m.Edb) { // not required - return nil - } - - if m.Edb != nil { - if err := m.Edb.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("edb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("edb") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *ExchangeDatabase) validateLog(formats strfmt.Registry) error { - if swag.IsZero(m.Log) { // not required - return nil - } - - if m.Log != nil { - if err := m.Log.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange database based on the context it is used -func (m *ExchangeDatabase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupTimes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedDate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEdb(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLog(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabase) contextValidateBackupTimes(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupTimes != nil { - - if swag.IsZero(m.BackupTimes) { // not required - return nil - } - - if err := m.BackupTimes.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupTimes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupTimes") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) contextValidateCreatedDate(ctx context.Context, formats strfmt.Registry) error { - - if m.CreatedDate != nil { - - if swag.IsZero(m.CreatedDate) { // not required - return nil - } - - if err := m.CreatedDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("createdDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("createdDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) contextValidateEdb(ctx context.Context, formats strfmt.Registry) error { - - if m.Edb != nil { - - if swag.IsZero(m.Edb) { // not required - return nil - } - - if err := m.Edb.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("edb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("edb") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabase) 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 -} - -func (m *ExchangeDatabase) contextValidateLog(ctx context.Context, formats strfmt.Registry) error { - - if m.Log != nil { - - if swag.IsZero(m.Log) { // not required - return nil - } - - if err := m.Log.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabase) UnmarshalBinary(b []byte) error { - var res ExchangeDatabase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_database_backup_times.go b/v1/models/exchange_database_backup_times.go deleted file mode 100644 index 4198a11a..00000000 --- a/v1/models/exchange_database_backup_times.go +++ /dev/null @@ -1,264 +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" -) - -// ExchangeDatabaseBackupTimes Backup times for a database as resported by Exchange Server. All times are -// in local time. -// -// swagger:model ExchangeDatabaseBackupTimes -type ExchangeDatabaseBackupTimes struct { - - // Last copy backup done time. - LastCopyBackupDate *LocalTime `json:"lastCopyBackupDate,omitempty"` - - // Last differential backup done time. Note that Cohesity will not do - // differential backup. - LastDifferentialBackupDate *LocalTime `json:"lastDifferentialBackupDate,omitempty"` - - // Last full backup done time. - LastFullBackupDate *LocalTime `json:"lastFullBackupDate,omitempty"` - - // Last incremental backup done time. - LastIncrementalBackupDate *LocalTime `json:"lastIncrementalBackupDate,omitempty"` -} - -// Validate validates this exchange database backup times -func (m *ExchangeDatabaseBackupTimes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastCopyBackupDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastDifferentialBackupDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastFullBackupDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastIncrementalBackupDate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabaseBackupTimes) validateLastCopyBackupDate(formats strfmt.Registry) error { - if swag.IsZero(m.LastCopyBackupDate) { // not required - return nil - } - - if m.LastCopyBackupDate != nil { - if err := m.LastCopyBackupDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastCopyBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastCopyBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) validateLastDifferentialBackupDate(formats strfmt.Registry) error { - if swag.IsZero(m.LastDifferentialBackupDate) { // not required - return nil - } - - if m.LastDifferentialBackupDate != nil { - if err := m.LastDifferentialBackupDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDifferentialBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDifferentialBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) validateLastFullBackupDate(formats strfmt.Registry) error { - if swag.IsZero(m.LastFullBackupDate) { // not required - return nil - } - - if m.LastFullBackupDate != nil { - if err := m.LastFullBackupDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastFullBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastFullBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) validateLastIncrementalBackupDate(formats strfmt.Registry) error { - if swag.IsZero(m.LastIncrementalBackupDate) { // not required - return nil - } - - if m.LastIncrementalBackupDate != nil { - if err := m.LastIncrementalBackupDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastIncrementalBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastIncrementalBackupDate") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange database backup times based on the context it is used -func (m *ExchangeDatabaseBackupTimes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastCopyBackupDate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastDifferentialBackupDate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastFullBackupDate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastIncrementalBackupDate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabaseBackupTimes) contextValidateLastCopyBackupDate(ctx context.Context, formats strfmt.Registry) error { - - if m.LastCopyBackupDate != nil { - - if swag.IsZero(m.LastCopyBackupDate) { // not required - return nil - } - - if err := m.LastCopyBackupDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastCopyBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastCopyBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) contextValidateLastDifferentialBackupDate(ctx context.Context, formats strfmt.Registry) error { - - if m.LastDifferentialBackupDate != nil { - - if swag.IsZero(m.LastDifferentialBackupDate) { // not required - return nil - } - - if err := m.LastDifferentialBackupDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDifferentialBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDifferentialBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) contextValidateLastFullBackupDate(ctx context.Context, formats strfmt.Registry) error { - - if m.LastFullBackupDate != nil { - - if swag.IsZero(m.LastFullBackupDate) { // not required - return nil - } - - if err := m.LastFullBackupDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastFullBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastFullBackupDate") - } - return err - } - } - - return nil -} - -func (m *ExchangeDatabaseBackupTimes) contextValidateLastIncrementalBackupDate(ctx context.Context, formats strfmt.Registry) error { - - if m.LastIncrementalBackupDate != nil { - - if swag.IsZero(m.LastIncrementalBackupDate) { // not required - return nil - } - - if err := m.LastIncrementalBackupDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastIncrementalBackupDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastIncrementalBackupDate") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabaseBackupTimes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabaseBackupTimes) UnmarshalBinary(b []byte) error { - var res ExchangeDatabaseBackupTimes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_database_copy_info.go b/v1/models/exchange_database_copy_info.go deleted file mode 100644 index 354b1746..00000000 --- a/v1/models/exchange_database_copy_info.go +++ /dev/null @@ -1,167 +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" -) - -// ExchangeDatabaseCopyInfo Exchange Database Copy Information -// -// Specifies the information about the copy of the Exchange Database on -// particular Exchange Application Server that is part of DAG. -// -// swagger:model ExchangeDatabaseCopyInfo -type ExchangeDatabaseCopyInfo struct { - - // Specifies the activation preference number assigned for this database - // copy. - ActivationPreferenceNumber *uint32 `json:"activationPreferenceNumber,omitempty"` - - // Specifies the entity id of the Exchange Application Server which has - // this database copy. - AppServerID *int64 `json:"appServerId,omitempty"` - - // Specifies if backup is supported for the Exchange database copy. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Specifies any reason(s) for Exchange database backup not supported. - BackupUnsupportedReasons []string `json:"backupUnsupportedReasons"` - - // Specifies the Guid of the Exchange Database Copy. - CopyGUID *string `json:"copyGuid,omitempty"` - - // Specifies the time when the database is created in Unix epoch time - // in milliseconds. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the state of the Exchange database copy. - // Specifies the state of Exchange Database Copy. - // - // - // 'kUnknown' indicates the status is not known. - // 'kMounted' indicates the exchange database copy is mounted and healthy. - // 'kError' indicates the exchange database copy is unmounted or - // partially mounted or is in error state. - // Enum: ["kUnknown","kMounted","kError"] - DatabaseState *string `json:"databaseState,omitempty"` - - // Specifies the size of the Exchange database copy in bytes. - DbSizeBytes *int64 `json:"dbSizeBytes,omitempty"` - - // Specifies the guid of the Exchange Database. - Dbguid *string `json:"dbguid,omitempty"` - - // Specifies the fully qualified domain name of the Exchange Server on which - // the database copy is hosted. - Fqdn *string `json:"fqdn,omitempty"` - - // Specifies if the Exchange database copy present on the Exchange - // Application server is active or passive. - IsActiveCopy *bool `json:"isActiveCopy,omitempty"` - - // Specifes the name of the Exchange Database. - Name *string `json:"name,omitempty"` - - // Specifies the owner entity id of the Exchange Application Server which - // has this database copy. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the display name of the Exchange Application Server on which - // the database copy is hosted. - ServerName *string `json:"serverName,omitempty"` - - // Specifies UTC time offset of database creation time. - UtcOffsetMin *int64 `json:"utcOffsetMin,omitempty"` -} - -// Validate validates this exchange database copy info -func (m *ExchangeDatabaseCopyInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var exchangeDatabaseCopyInfoTypeDatabaseStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kMounted","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeDatabaseCopyInfoTypeDatabaseStatePropEnum = append(exchangeDatabaseCopyInfoTypeDatabaseStatePropEnum, v) - } -} - -const ( - - // ExchangeDatabaseCopyInfoDatabaseStateKUnknown captures enum value "kUnknown" - ExchangeDatabaseCopyInfoDatabaseStateKUnknown string = "kUnknown" - - // ExchangeDatabaseCopyInfoDatabaseStateKMounted captures enum value "kMounted" - ExchangeDatabaseCopyInfoDatabaseStateKMounted string = "kMounted" - - // ExchangeDatabaseCopyInfoDatabaseStateKError captures enum value "kError" - ExchangeDatabaseCopyInfoDatabaseStateKError string = "kError" -) - -// prop value enum -func (m *ExchangeDatabaseCopyInfo) validateDatabaseStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeDatabaseCopyInfoTypeDatabaseStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeDatabaseCopyInfo) validateDatabaseState(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseState) { // not required - return nil - } - - // value enum - if err := m.validateDatabaseStateEnum("databaseState", "body", *m.DatabaseState); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this exchange database copy info based on context it is used -func (m *ExchangeDatabaseCopyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabaseCopyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabaseCopyInfo) UnmarshalBinary(b []byte) error { - var res ExchangeDatabaseCopyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_database_identity.go b/v1/models/exchange_database_identity.go deleted file mode 100644 index 55ceb54f..00000000 --- a/v1/models/exchange_database_identity.go +++ /dev/null @@ -1,56 +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" -) - -// ExchangeDatabaseIdentity Exchange Database Identity. These fields are case insensitive. Obtained -// from (Get-MailboxDatabase -status) -// -// swagger:model ExchangeDatabaseIdentity -type ExchangeDatabaseIdentity struct { - - // Guid of the database. This is globally unique. However note that - // defragmenting (using ESEUTIL.EXE) a database will result in this guid - // being changed for a database. - GUID *string `json:"guid,omitempty"` - - // Display name of the database. Eg. DB01 - Name *string `json:"name,omitempty"` -} - -// Validate validates this exchange database identity -func (m *ExchangeDatabaseIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange database identity based on context it is used -func (m *ExchangeDatabaseIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabaseIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabaseIdentity) UnmarshalBinary(b []byte) error { - var res ExchangeDatabaseIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_database_info.go b/v1/models/exchange_database_info.go deleted file mode 100644 index b38fd9f3..00000000 --- a/v1/models/exchange_database_info.go +++ /dev/null @@ -1,147 +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" -) - -// ExchangeDatabaseInfo Exchange Database Information -// -// Specifies the information about the Exchange Database. -// -// swagger:model ExchangeDatabaseInfo -type ExchangeDatabaseInfo struct { - - // Specifies the entity id of the Exchange Application Server which has - // this database copy. - AppServerID *int64 `json:"appServerId,omitempty"` - - // Specifies if backup is supported for the Exchange database copy. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Specifies any reason(s) for Exchange database backup not supported. - BackupUnsupportedReasons []string `json:"backupUnsupportedReasons"` - - // Specifies the time when the database is created in Unix epoch time - // in milliseconds. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the state of the Exchange database copy. - // Specifies the state of Exchange Database Copy. - // - // - // 'kUnknown' indicates the status is not known. - // 'kMounted' indicates the exchange database copy is mounted and healthy. - // 'kError' indicates the exchange database copy is unmounted or - // partially mounted or is in error state. - // Enum: ["kUnknown","kMounted","kError"] - DatabaseState *string `json:"databaseState,omitempty"` - - // Specifies the size of the Exchange database copy in bytes. - DbSizeBytes *int64 `json:"dbSizeBytes,omitempty"` - - // Specifies the guid of the Exchange Database. - Dbguid *string `json:"dbguid,omitempty"` - - // Specifes the name of the Exchange Database. - Name *string `json:"name,omitempty"` - - // Specifies the owner entity id of the Exchange Application Server which - // has this database copy. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies UTC time offset of database creation time. - UtcOffsetMin *int64 `json:"utcOffsetMin,omitempty"` -} - -// Validate validates this exchange database info -func (m *ExchangeDatabaseInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var exchangeDatabaseInfoTypeDatabaseStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kMounted","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeDatabaseInfoTypeDatabaseStatePropEnum = append(exchangeDatabaseInfoTypeDatabaseStatePropEnum, v) - } -} - -const ( - - // ExchangeDatabaseInfoDatabaseStateKUnknown captures enum value "kUnknown" - ExchangeDatabaseInfoDatabaseStateKUnknown string = "kUnknown" - - // ExchangeDatabaseInfoDatabaseStateKMounted captures enum value "kMounted" - ExchangeDatabaseInfoDatabaseStateKMounted string = "kMounted" - - // ExchangeDatabaseInfoDatabaseStateKError captures enum value "kError" - ExchangeDatabaseInfoDatabaseStateKError string = "kError" -) - -// prop value enum -func (m *ExchangeDatabaseInfo) validateDatabaseStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeDatabaseInfoTypeDatabaseStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeDatabaseInfo) validateDatabaseState(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseState) { // not required - return nil - } - - // value enum - if err := m.validateDatabaseStateEnum("databaseState", "body", *m.DatabaseState); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this exchange database info based on context it is used -func (m *ExchangeDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabaseInfo) UnmarshalBinary(b []byte) error { - var res ExchangeDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_e_d_b_info.go b/v1/models/exchange_e_d_b_info.go deleted file mode 100644 index 9a7abbd6..00000000 --- a/v1/models/exchange_e_d_b_info.go +++ /dev/null @@ -1,79 +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" -) - -// ExchangeEDBInfo Information about an Exchange Database. Note that there may be tmp.edb file -// in the EDB folder that would be ignored by backup. -// -// swagger:model ExchangeEDBInfo -type ExchangeEDBInfo struct { - - // EDB database size reported by Exchange for mounted database. This is 0 - // bytes for dismounted databases. -1 if it could not be obtained. - DbSizeBytes *int64 `json:"dbSizeBytes,omitempty"` - - // EDB file path. This file path will be common for all nodes within a DAG. - // Examples: C:\DB\employee.edb, C:\MyMounts\exch\contractors.edb. - // In a DAG under steady state, all copies of the database will point to same - // mountpoint path on each DAG node. However when a database copy is moved, - // 'file_path' may be different until replication brings it in sync. A full - // backup must be taken when DB file path changes. - FilePath *string `json:"filePath,omitempty"` - - // EDB database file size on disk reported by file system (NTFS/ReFS). -1 if - // it could not be obtained. - FileSizeBytes *int64 `json:"fileSizeBytes,omitempty"` - - // Windows file system type string such as 'NTFS,ReFS,CSVFS' of the 'volume'. - // Exchange VSS has restriction that CSVFS and non-CSVFS volumes cannot be - // mixed in same snapshot set. - FileSystem *string `json:"fileSystem,omitempty"` - - // Current schema version of the database. Eg: 0.135. May be used for - // compatibility checks during database restore. - SchemaVersion *string `json:"schemaVersion,omitempty"` - - // Volume device id where the EDB file mount point lives. This is unique to - // an Exchange server node in a DAG, so each DAG node will have different - // volume id that should be included in VSS snapshot. - // Example: \\?\Volume{63f6b242-8ec1-11e8-80e0-00505685e2a9}\ - Volume *string `json:"volume,omitempty"` -} - -// Validate validates this exchange e d b info -func (m *ExchangeEDBInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange e d b info based on context it is used -func (m *ExchangeEDBInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeEDBInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeEDBInfo) UnmarshalBinary(b []byte) error { - var res ExchangeEDBInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_env_job_parameters.go b/v1/models/exchange_env_job_parameters.go deleted file mode 100644 index 1bede613..00000000 --- a/v1/models/exchange_env_job_parameters.go +++ /dev/null @@ -1,52 +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" -) - -// ExchangeEnvJobParameters Exchange Environment Job Parameters. -// -// Specifies job parameters applicable for the Exchange Protection Jobs. -// -// swagger:model ExchangeEnvJobParameters -type ExchangeEnvJobParameters struct { - - // Specifies whether the backups should be copy-only. - BackupsCopyOnly *bool `json:"backupsCopyOnly,omitempty"` -} - -// Validate validates this exchange env job parameters -func (m *ExchangeEnvJobParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange env job parameters based on context it is used -func (m *ExchangeEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeEnvJobParameters) UnmarshalBinary(b []byte) error { - var res ExchangeEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_host_info.go b/v1/models/exchange_host_info.go deleted file mode 100644 index f46a2e5d..00000000 --- a/v1/models/exchange_host_info.go +++ /dev/null @@ -1,202 +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" -) - -// ExchangeHostInfo Exchange Host Info -// -// Specifies the Information about the Exchange host. -// -// swagger:model ExchangeHostInfo -type ExchangeHostInfo struct { - - // Specifies the status of the agent on the Exchange host. - // Specifies the status of agent on Exchange Application Server. - // 'kSupported' indicates the agent is supported for Exchange data protection. - // 'kUnSupported' indicates the agent is not supported for Exchange data - // protection. - // 'kUpgrade' indicates the agent of server need to be upgraded. - // Enum: ["kSupported","kUpgrade","kUnsupported"] - AgentStatus *string `json:"agentStatus,omitempty"` - - // Specifies the endpoint of the Exchange host. - Endpoint *string `json:"endpoint,omitempty"` - - // Specifies the guid of the Exchange host. - GUID *string `json:"guid,omitempty"` - - // Specifies the display name of the Exchange host. - Name *string `json:"name,omitempty"` - - // Specifies the Protection source id of the Physical Host if the - // Exchange application is already registered on the physical host - // with the above endpoint. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies the status of the registration of the Exchange Host. - // Specifies the status of registration of Exchange Application Server. - // 'kUnknown' indicates the status is not known. - // 'kHealthy' indicates the status is healty and is registered as - // Exchange Server. - // 'kUnHealthy' indicates the exchange application is registered on the - // physical server but it is unreachable now. - // 'kUnregistered' indicates the server is not registered as physical source. - // 'kUnreachable' indicates the server is not reachable from the cohesity - // cluster or the cohesity protection server is not installed on the exchange - // server. - // 'kDetached' indicates the server is removed from the ExchangeDAG. - // Enum: ["kUnknown","kHealthy","kUnHealthy","kUnregistered","kUreachable","kDetached"] - Status *string `json:"status,omitempty"` -} - -// Validate validates this exchange host info -func (m *ExchangeHostInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var exchangeHostInfoTypeAgentStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSupported","kUpgrade","kUnsupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeHostInfoTypeAgentStatusPropEnum = append(exchangeHostInfoTypeAgentStatusPropEnum, v) - } -} - -const ( - - // ExchangeHostInfoAgentStatusKSupported captures enum value "kSupported" - ExchangeHostInfoAgentStatusKSupported string = "kSupported" - - // ExchangeHostInfoAgentStatusKUpgrade captures enum value "kUpgrade" - ExchangeHostInfoAgentStatusKUpgrade string = "kUpgrade" - - // ExchangeHostInfoAgentStatusKUnsupported captures enum value "kUnsupported" - ExchangeHostInfoAgentStatusKUnsupported string = "kUnsupported" -) - -// prop value enum -func (m *ExchangeHostInfo) validateAgentStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeHostInfoTypeAgentStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeHostInfo) validateAgentStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatus) { // not required - return nil - } - - // value enum - if err := m.validateAgentStatusEnum("agentStatus", "body", *m.AgentStatus); err != nil { - return err - } - - return nil -} - -var exchangeHostInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kHealthy","kUnHealthy","kUnregistered","kUreachable","kDetached"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeHostInfoTypeStatusPropEnum = append(exchangeHostInfoTypeStatusPropEnum, v) - } -} - -const ( - - // ExchangeHostInfoStatusKUnknown captures enum value "kUnknown" - ExchangeHostInfoStatusKUnknown string = "kUnknown" - - // ExchangeHostInfoStatusKHealthy captures enum value "kHealthy" - ExchangeHostInfoStatusKHealthy string = "kHealthy" - - // ExchangeHostInfoStatusKUnHealthy captures enum value "kUnHealthy" - ExchangeHostInfoStatusKUnHealthy string = "kUnHealthy" - - // ExchangeHostInfoStatusKUnregistered captures enum value "kUnregistered" - ExchangeHostInfoStatusKUnregistered string = "kUnregistered" - - // ExchangeHostInfoStatusKUreachable captures enum value "kUreachable" - ExchangeHostInfoStatusKUreachable string = "kUreachable" - - // ExchangeHostInfoStatusKDetached captures enum value "kDetached" - ExchangeHostInfoStatusKDetached string = "kDetached" -) - -// prop value enum -func (m *ExchangeHostInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeHostInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeHostInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this exchange host info based on context it is used -func (m *ExchangeHostInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeHostInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeHostInfo) UnmarshalBinary(b []byte) error { - var res ExchangeHostInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_log_info.go b/v1/models/exchange_log_info.go deleted file mode 100644 index 4e90e646..00000000 --- a/v1/models/exchange_log_info.go +++ /dev/null @@ -1,89 +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" -) - -// ExchangeLogInfo Information about an Exchange Database log file group and checkpoint file. -// -// swagger:model ExchangeLogInfo -type ExchangeLogInfo struct { - - // Checkpoint file name that lives in log folder. This file contains - // information about log generation commited to EDB. This file is named as - // .chk. Eg: E00.chk. - CheckpointFileName *string `json:"checkpointFileName,omitempty"` - - // Is circular logging enabled for this database. If this is true, then - // incremental backup should not be performed. Only full backup should - // be supported. - CircularLogging *bool `json:"circularLogging,omitempty"` - - // Log file prefix for a database. Eg: E00. - // The log file themselves have a file extension of .LOG. Log files are named - // with a numeric sequence number. Example E00000006A0.log. There may be - // temp log file such as E00tmp.log that is being populated. - FilePrefix *string `json:"filePrefix,omitempty"` - - // Windows file system type string such as 'NTFS,ReFS,CSVFS' of the 'volume'. - // Exchange VSS has restriction that CSVFS and non-CSVFS volumes cannot be - // mixed in same snapshot set. - FileSystem *string `json:"fileSystem,omitempty"` - - // LOG files folder path. This file path will be common for all nodes within - // a DAG. - FolderPath *string `json:"folderPath,omitempty"` - - // This is per log file size in bytes. This is NOT the total size - // of all log files. Default size is 1MiB. - SingleLogSize *uint32 `json:"singleLogSize,omitempty"` - - // Approximate total size of LOG directory. It gets total number of files in - // 'folder_path' and multiplies it with 1MiB. Some files (.CHK) are smaller. - // Accurate size computation may take a long time, so its not performed. This - // approximate size is sufficient for reporting purposes. If -1, it could not - // be computed or resulted in error. - TotalSize *int64 `json:"totalSize,omitempty"` - - // Volume device id where the log folder mount point lives. This is unique to - // an Exchange server in DAG, so each DAG node will have different volume id - // that should be included in VSS snapshot. - // Example: \\?\Volume{63f6b242-8ec1-11e8-80e0-00505685e2a9}\ - Volume *string `json:"volume,omitempty"` -} - -// Validate validates this exchange log info -func (m *ExchangeLogInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange log info based on context it is used -func (m *ExchangeLogInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeLogInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeLogInfo) UnmarshalBinary(b []byte) error { - var res ExchangeLogInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_protection_source.go b/v1/models/exchange_protection_source.go deleted file mode 100644 index 2bd5c0ef..00000000 --- a/v1/models/exchange_protection_source.go +++ /dev/null @@ -1,333 +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" -) - -// ExchangeProtectionSource Exchange Protection Source. -// -// Specifies an object representing an Exchange entity. -// DAG - Database availability group -// -// swagger:model ExchangeProtectionSource -type ExchangeProtectionSource struct { - - // Specifies the Exchange DAG information if ExchangeProtectionSourceType is - // 'kExchangeDAG'. - DagInfo *DagInfo `json:"DagInfo,omitempty"` - - // Specifies the Exchange Application server information if - // ExchangeProtectionSourceType is 'kExchangeNode'. - ApplicationServerInfo *ApplicationServerInfo `json:"applicationServerInfo,omitempty"` - - // Specifies the Exchange DAG Database copy information if - // ExchangeProtectionSourceType is 'kExchangeDAGDatabaseCopy'. - DagDatabaseCopyInfo *ExchangeDatabaseCopyInfo `json:"dagDatabaseCopyInfo,omitempty"` - - // Specifies the Exchange DAG Database information if - // ExchangeProtectionSourceType is 'kExchangeDAGDatabase' - DagDatabaseInfo *ExchangeDAGDatabase `json:"dagDatabaseInfo,omitempty"` - - // name - Name *string `json:"name,omitempty"` - - // Specifies the entity id of the owner of the Exchange Protection Source. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the Exchange Standalone Database information if - // ExchangeProtectionSourceType is 'kExchangeStandaloneDatabase'. - StandaloneDatabaseCopyInfo *ExchangeDatabaseInfo `json:"standaloneDatabaseCopyInfo,omitempty"` - - // Specifies the type of the Exchange Protection Source. - Type *int32 `json:"type,omitempty"` - - // Specifies the UUID for the Exchange entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this exchange protection source -func (m *ExchangeProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDagInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationServerInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagDatabaseCopyInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagDatabaseInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneDatabaseCopyInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionSource) validateDagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DagInfo) { // not required - return nil - } - - if m.DagInfo != nil { - if err := m.DagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("DagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("DagInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) validateApplicationServerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationServerInfo) { // not required - return nil - } - - if m.ApplicationServerInfo != nil { - if err := m.ApplicationServerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationServerInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) validateDagDatabaseCopyInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DagDatabaseCopyInfo) { // not required - return nil - } - - if m.DagDatabaseCopyInfo != nil { - if err := m.DagDatabaseCopyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseCopyInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) validateDagDatabaseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DagDatabaseInfo) { // not required - return nil - } - - if m.DagDatabaseInfo != nil { - if err := m.DagDatabaseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) validateStandaloneDatabaseCopyInfo(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneDatabaseCopyInfo) { // not required - return nil - } - - if m.StandaloneDatabaseCopyInfo != nil { - if err := m.StandaloneDatabaseCopyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDatabaseCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDatabaseCopyInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange protection source based on the context it is used -func (m *ExchangeProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateApplicationServerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagDatabaseCopyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagDatabaseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneDatabaseCopyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionSource) contextValidateDagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DagInfo != nil { - - if swag.IsZero(m.DagInfo) { // not required - return nil - } - - if err := m.DagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("DagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("DagInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) contextValidateApplicationServerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ApplicationServerInfo != nil { - - if swag.IsZero(m.ApplicationServerInfo) { // not required - return nil - } - - if err := m.ApplicationServerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationServerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationServerInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) contextValidateDagDatabaseCopyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DagDatabaseCopyInfo != nil { - - if swag.IsZero(m.DagDatabaseCopyInfo) { // not required - return nil - } - - if err := m.DagDatabaseCopyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseCopyInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) contextValidateDagDatabaseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DagDatabaseInfo != nil { - - if swag.IsZero(m.DagDatabaseInfo) { // not required - return nil - } - - if err := m.DagDatabaseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *ExchangeProtectionSource) contextValidateStandaloneDatabaseCopyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneDatabaseCopyInfo != nil { - - if swag.IsZero(m.StandaloneDatabaseCopyInfo) { // not required - return nil - } - - if err := m.StandaloneDatabaseCopyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDatabaseCopyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDatabaseCopyInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeProtectionSource) UnmarshalBinary(b []byte) error { - var res ExchangeProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_restore_parameters.go b/v1/models/exchange_restore_parameters.go deleted file mode 100644 index 41d4b165..00000000 --- a/v1/models/exchange_restore_parameters.go +++ /dev/null @@ -1,172 +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" -) - -// ExchangeRestoreParameters Exchange Application Server Restore Parameters. -// -// Specifies the exchange restore parameters. -// -// swagger:model ExchangeRestoreParameters -type ExchangeRestoreParameters struct { - - // Specifies the Exchange restore type. - // Specifies the type of Exchange restore. - // - // 'kNone' specifies no special behaviour. - // 'kView' specifies the option to create a view which cann be used by the - // external tools like Kroll to perform mailbox or mail-item recovery. - // 'kDatabase' specifies the option to restore an Exchange database. - // Enum: ["kNone","kView","kDatabase"] - Type *string `json:"type,omitempty"` - - // Specifies the paramters for the restore of type kView. - ViewParameters *ExchangeRestoreViewParameters `json:"viewParameters,omitempty"` -} - -// Validate validates this exchange restore parameters -func (m *ExchangeRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var exchangeRestoreParametersTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kView","kDatabase"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeRestoreParametersTypeTypePropEnum = append(exchangeRestoreParametersTypeTypePropEnum, v) - } -} - -const ( - - // ExchangeRestoreParametersTypeKNone captures enum value "kNone" - ExchangeRestoreParametersTypeKNone string = "kNone" - - // ExchangeRestoreParametersTypeKView captures enum value "kView" - ExchangeRestoreParametersTypeKView string = "kView" - - // ExchangeRestoreParametersTypeKDatabase captures enum value "kDatabase" - ExchangeRestoreParametersTypeKDatabase string = "kDatabase" -) - -// prop value enum -func (m *ExchangeRestoreParameters) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeRestoreParametersTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeRestoreParameters) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *ExchangeRestoreParameters) validateViewParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParameters) { // not required - return nil - } - - if m.ViewParameters != nil { - if err := m.ViewParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange restore parameters based on the context it is used -func (m *ExchangeRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeRestoreParameters) contextValidateViewParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParameters != nil { - - if swag.IsZero(m.ViewParameters) { // not required - return nil - } - - if err := m.ViewParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeRestoreParameters) UnmarshalBinary(b []byte) error { - var res ExchangeRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_restore_view_parameters.go b/v1/models/exchange_restore_view_parameters.go deleted file mode 100644 index 8a3cf61a..00000000 --- a/v1/models/exchange_restore_view_parameters.go +++ /dev/null @@ -1,59 +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" -) - -// ExchangeRestoreViewParameters exchange restore view parameters -// -// swagger:model ExchangeRestoreViewParameters -type ExchangeRestoreViewParameters struct { - - // Specifies whether we should allow all the IP addresses to be part of the - // allowlist. If this parameter is set to false, then only the machine - // on which the view is mounted will be allowed. - Endpoint *bool `json:"endpoint,omitempty"` - - // Specifies the path of the SMB share. - MountPoint *string `json:"mountPoint,omitempty"` - - // Specifies the view to which the files of an Exchange database has to be - // cloned. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this exchange restore view parameters -func (m *ExchangeRestoreViewParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange restore view parameters based on context it is used -func (m *ExchangeRestoreViewParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeRestoreViewParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeRestoreViewParameters) UnmarshalBinary(b []byte) error { - var res ExchangeRestoreViewParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server.go b/v1/models/exchange_server.go deleted file mode 100644 index 5d2b6eed..00000000 --- a/v1/models/exchange_server.go +++ /dev/null @@ -1,129 +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" -) - -// ExchangeServer Exchange Server. This message is created and maintained by magneto. -// -// swagger:model ExchangeServer -type ExchangeServer struct { - - // Status conveying whether the agent on the Exchange server is supported for - // backups or not. - AgentSupportedStatus *int32 `json:"agentSupportedStatus,omitempty"` - - // The entity id of the Exchange source which hosts this Exchange server. - // This field will only be set when this Exchange server is registered as - // Exchange entity. - ExchangeID *int64 `json:"exchangeId,omitempty"` - - // Identity of the server. - ID *ExchangeServerIdentity `json:"id,omitempty"` - - // Time (in usecs) when the agent info was fetched. - LastAgentInfoTimeUsecs *int64 `json:"lastAgentInfoTimeUsecs,omitempty"` - - // The owner entity id on which this Exchange server is running. - // This field will only be set when the Exchange server is registered as - // Exchange entity. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Exchange server status. - Status *int32 `json:"status,omitempty"` -} - -// Validate validates this exchange server -func (m *ExchangeServer) 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 *ExchangeServer) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -// ContextValidate validate this exchange server based on the context it is used -func (m *ExchangeServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServer) 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 -} - -// MarshalBinary interface implementation -func (m *ExchangeServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServer) UnmarshalBinary(b []byte) error { - var res ExchangeServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server_d_a_g_node.go b/v1/models/exchange_server_d_a_g_node.go deleted file mode 100644 index aeeb587a..00000000 --- a/v1/models/exchange_server_d_a_g_node.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeServerDAGNode Represents an Exchange server DAG Node. Database copies can exist -// independently on each node on non-shared storage. Normally a file share acts -// as witness for DAG. A failover cluster is created behind the DAG to handle -// database switchover or node failover. -// -// swagger:model ExchangeServerDAGNode -type ExchangeServerDAGNode struct { - - // This member server is marked for deletion in AD. At some time in future, - // this member server will be removed. - Deleted *bool `json:"deleted,omitempty"` - - // This member server is in DAG maintenance or failover cluster maintenance - // mode. They should not be included in backup. - Maintenance *bool `json:"maintenance,omitempty"` - - // This member server is operational and healthy. If false, it should not be - // included in backup. - Operational *bool `json:"operational,omitempty"` - - // Array of other Exchange server identifiers in the DAG. - OtherDagServerIDVec []*ExchangeServerIdentity `json:"otherDagServerIdVec"` - - // This member server is the primary active manager (PAM) role owner in DAG. - // It coordinates DB/server switchover and failover. It also holds the - // cluster quorum resource. - Primaryactivemanager *bool `json:"primaryactivemanager,omitempty"` - - // DAG node information. - Server *ExchangeServerNode `json:"server,omitempty"` -} - -// Validate validates this exchange server d a g node -func (m *ExchangeServerDAGNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOtherDagServerIDVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerDAGNode) validateOtherDagServerIDVec(formats strfmt.Registry) error { - if swag.IsZero(m.OtherDagServerIDVec) { // not required - return nil - } - - for i := 0; i < len(m.OtherDagServerIDVec); i++ { - if swag.IsZero(m.OtherDagServerIDVec[i]) { // not required - continue - } - - if m.OtherDagServerIDVec[i] != nil { - if err := m.OtherDagServerIDVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("otherDagServerIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("otherDagServerIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeServerDAGNode) validateServer(formats strfmt.Registry) error { - if swag.IsZero(m.Server) { // not required - return nil - } - - if m.Server != nil { - if err := m.Server.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("server") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("server") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange server d a g node based on the context it is used -func (m *ExchangeServerDAGNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOtherDagServerIDVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerDAGNode) contextValidateOtherDagServerIDVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OtherDagServerIDVec); i++ { - - if m.OtherDagServerIDVec[i] != nil { - - if swag.IsZero(m.OtherDagServerIDVec[i]) { // not required - return nil - } - - if err := m.OtherDagServerIDVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("otherDagServerIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("otherDagServerIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeServerDAGNode) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { - - if m.Server != nil { - - if swag.IsZero(m.Server) { // not required - return nil - } - - if err := m.Server.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("server") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("server") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeServerDAGNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServerDAGNode) UnmarshalBinary(b []byte) error { - var res ExchangeServerDAGNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server_identity.go b/v1/models/exchange_server_identity.go deleted file mode 100644 index 7a2a952f..00000000 --- a/v1/models/exchange_server_identity.go +++ /dev/null @@ -1,60 +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" -) - -// ExchangeServerIdentity Exchange Server Identity. Fields returned by PowerShell: Get-MailboxServer -// Status. All fields are case insensitive. -// -// swagger:model ExchangeServerIdentity -type ExchangeServerIdentity struct { - - // Fully Qualified Domain Name (FQDN) of the Exchange sever. Obtained from - // (Get-ExchangeServer).NetWorkAddress protocol type:'ncacn_ip_tcp'. - Fqdn *string `json:"fqdn,omitempty"` - - // unique guid for the server in AD. This is a unqiue identifier that can be - // used to compare servers. - GUID *string `json:"guid,omitempty"` - - // Display Name. Example: EXCH12-MAILB01. This is also the identity, which is - // unique within an AD forest. - Name *string `json:"name,omitempty"` -} - -// Validate validates this exchange server identity -func (m *ExchangeServerIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange server identity based on context it is used -func (m *ExchangeServerIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeServerIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServerIdentity) UnmarshalBinary(b []byte) error { - var res ExchangeServerIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server_info.go b/v1/models/exchange_server_info.go deleted file mode 100644 index 6e15f751..00000000 --- a/v1/models/exchange_server_info.go +++ /dev/null @@ -1,198 +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" -) - -// ExchangeServerInfo Information about an Exchange Server. Obtained from fields returned by -// Get-MailboxServer -Status -// -// swagger:model ExchangeServerInfo -type ExchangeServerInfo struct { - - // Whether backing up this Server is supported or not due to system or - // implementation limitations. If the value is false, reason string below can - // be used to say why its not supported. - BackupSupported *bool `json:"backupSupported,omitempty"` - - // Free form text for the reasons why backup is not supported for this - // Server. This is valid only if backup_supported = false. - BackupUnsupportedReasonVec []string `json:"backupUnsupportedReasonVec"` - - // Default dir path for creating future mailbox databases. This path does not - // correspond to current database directory. - DefaultDataDirPath *string `json:"defaultDataDirPath,omitempty"` - - // Identity of the server. - ID *ExchangeServerIdentity `json:"id,omitempty"` - - // Exchange organization distinguished name. This may be used in database - // restore cases to match backed up org vs restoring org. Exchange allows - // only recovery DB to be created on foreign organizations. Example: CN=First - // Organization,CN=Microsoft - // Exchange,CN=Services,CN=Configuration,DC=Exch16-OnPrem,DC=com - OrganizationDn *string `json:"organizationDn,omitempty"` - - // Role of the exchange server. - Role *int32 `json:"role,omitempty"` - - // Offset from UTC in minutes for this Exchange server machine. This number - // can be positive or negative. For example -480 is Pacific Time zone. - UtcOffsetmin *int32 `json:"utcOffsetmin,omitempty"` - - // Server version. - Version *ExchangeServerVersion `json:"version,omitempty"` - - // VSS writers that should be included during backup. For Exchange 2013 - // onwards, it will be a single 'Microsoft Exchange Writer'. For Exchange - // 2010 DAG, it will also include 'Microsoft Exchange Replica Writer'. - VssBackupWritersVec []string `json:"vssBackupWritersVec"` - - // VSS writer that should be included during restore. Its value will be - // 'Microsoft Exchange Writer'. Replica writer should not be included during - // VSS restore. - VssRestoreWriter *string `json:"vssRestoreWriter,omitempty"` -} - -// Validate validates this exchange server info -func (m *ExchangeServerInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerInfo) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *ExchangeServerInfo) validateVersion(formats strfmt.Registry) error { - if swag.IsZero(m.Version) { // not required - return nil - } - - if m.Version != nil { - if err := m.Version.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("version") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("version") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange server info based on the context it is used -func (m *ExchangeServerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerInfo) 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 -} - -func (m *ExchangeServerInfo) contextValidateVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.Version != nil { - - if swag.IsZero(m.Version) { // not required - return nil - } - - if err := m.Version.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("version") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("version") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeServerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServerInfo) UnmarshalBinary(b []byte) error { - var res ExchangeServerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server_node.go b/v1/models/exchange_server_node.go deleted file mode 100644 index b702417e..00000000 --- a/v1/models/exchange_server_node.go +++ /dev/null @@ -1,115 +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" -) - -// ExchangeServerNode Represents an Exchange server that is standalone or DAG node. -// -// This object can be used when discovering a Windows box without knowing -// whether its standalone or DAG Exchange server. -// -// swagger:model ExchangeServerNode -type ExchangeServerNode struct { - - // Exchange server info - Serverinfo *ExchangeServerInfo `json:"serverinfo,omitempty"` - - // Exchange server type. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this exchange server node -func (m *ExchangeServerNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServerinfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerNode) validateServerinfo(formats strfmt.Registry) error { - if swag.IsZero(m.Serverinfo) { // not required - return nil - } - - if m.Serverinfo != nil { - if err := m.Serverinfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverinfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverinfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange server node based on the context it is used -func (m *ExchangeServerNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServerinfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeServerNode) contextValidateServerinfo(ctx context.Context, formats strfmt.Registry) error { - - if m.Serverinfo != nil { - - if swag.IsZero(m.Serverinfo) { // not required - return nil - } - - if err := m.Serverinfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverinfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverinfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeServerNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServerNode) UnmarshalBinary(b []byte) error { - var res ExchangeServerNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_server_version.go b/v1/models/exchange_server_version.go deleted file mode 100644 index 2e5f0d3f..00000000 --- a/v1/models/exchange_server_version.go +++ /dev/null @@ -1,70 +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" -) - -// ExchangeServerVersion Exchange Server Version. -// -// swagger:model ExchangeServerVersion -type ExchangeServerVersion struct { - - // build ver - BuildVer *int32 `json:"buildVer,omitempty"` - - // Display version string. From Get-exchangeserver | fl AdminDisplayVersion - // Example: Version 15.0 (Build 1365.1) - // Mapping located at https://goo.gl/9JQNfT - // Microsot does not provide any mechanism to get nice display name like - // 'Exchange Server 2013 CU19' - DisplayVersion *string `json:"displayVersion,omitempty"` - - // Parsed file version of store service number from - // Get-Command Microsoft.Exchange.Store.Service.exe | - // ForEach-Object {$_.FileVersionInfo.ProductVersion} = 15.00.1365.000 - // If this is set to -1, that means the version number is unknown. - // It follows Microsoft convention https://goo.gl/536Ztg - MajorVer *int32 `json:"majorVer,omitempty"` - - // minor ver - MinorVer *int32 `json:"minorVer,omitempty"` - - // revision num - RevisionNum *int32 `json:"revisionNum,omitempty"` -} - -// Validate validates this exchange server version -func (m *ExchangeServerVersion) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this exchange server version based on context it is used -func (m *ExchangeServerVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeServerVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeServerVersion) UnmarshalBinary(b []byte) error { - var res ExchangeServerVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/exchange_topology.go b/v1/models/exchange_topology.go deleted file mode 100644 index 0a414c0b..00000000 --- a/v1/models/exchange_topology.go +++ /dev/null @@ -1,344 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeTopology Represents Exchange onprem host topology queried from a specific Cohesity -// source. This topology may be a DAG node or standalone Exchange server. -// -// swagger:model ExchangeTopology -type ExchangeTopology struct { - - // This Exchange organization represents DAG. If this is non-null, - // 'standalone_server' must be null. - Dag *ExchangeDAG `json:"dag,omitempty"` - - // DAG enabled database copies that are hosted on the 'dag_node'. A database - // copy may be active or passive. - DagDbCopyVec []*ExchangeDAGDatabaseCopy `json:"dagDbCopyVec"` - - // DAG Exchange server node details. If 'dag' is not-null this will be - // populated. The DAG node contains identities of other DAG nodes of 'dag'. - DagNode *ExchangeServerDAGNode `json:"dagNode,omitempty"` - - // Standalone databases. This can be populated for DAG or Standalone Exchange - // server as DAG may host standalone DBs that are not yet part of - // DAG (it has only one copy). - StandaloneDbVec []*ExchangeDatabase `json:"standaloneDbVec"` - - // Exchange standalone (non-DAG) server. If this is non-null, 'dag' must be - // null as an Exchange server cannot exist both as standalone and part of - // DAG. - StandaloneServer *ExchangeServerNode `json:"standaloneServer,omitempty"` -} - -// Validate validates this exchange topology -func (m *ExchangeTopology) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDag(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagDbCopyVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagNode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneDbVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneServer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTopology) validateDag(formats strfmt.Registry) error { - if swag.IsZero(m.Dag) { // not required - return nil - } - - if m.Dag != nil { - if err := m.Dag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dag") - } - return err - } - } - - return nil -} - -func (m *ExchangeTopology) validateDagDbCopyVec(formats strfmt.Registry) error { - if swag.IsZero(m.DagDbCopyVec) { // not required - return nil - } - - for i := 0; i < len(m.DagDbCopyVec); i++ { - if swag.IsZero(m.DagDbCopyVec[i]) { // not required - continue - } - - if m.DagDbCopyVec[i] != nil { - if err := m.DagDbCopyVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDbCopyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDbCopyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeTopology) validateDagNode(formats strfmt.Registry) error { - if swag.IsZero(m.DagNode) { // not required - return nil - } - - if m.DagNode != nil { - if err := m.DagNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagNode") - } - return err - } - } - - return nil -} - -func (m *ExchangeTopology) validateStandaloneDbVec(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneDbVec) { // not required - return nil - } - - for i := 0; i < len(m.StandaloneDbVec); i++ { - if swag.IsZero(m.StandaloneDbVec[i]) { // not required - continue - } - - if m.StandaloneDbVec[i] != nil { - if err := m.StandaloneDbVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDbVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDbVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeTopology) validateStandaloneServer(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneServer) { // not required - return nil - } - - if m.StandaloneServer != nil { - if err := m.StandaloneServer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneServer") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange topology based on the context it is used -func (m *ExchangeTopology) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDag(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagDbCopyVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagNode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneDbVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneServer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTopology) contextValidateDag(ctx context.Context, formats strfmt.Registry) error { - - if m.Dag != nil { - - if swag.IsZero(m.Dag) { // not required - return nil - } - - if err := m.Dag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dag") - } - return err - } - } - - return nil -} - -func (m *ExchangeTopology) contextValidateDagDbCopyVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DagDbCopyVec); i++ { - - if m.DagDbCopyVec[i] != nil { - - if swag.IsZero(m.DagDbCopyVec[i]) { // not required - return nil - } - - if err := m.DagDbCopyVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDbCopyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDbCopyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeTopology) contextValidateDagNode(ctx context.Context, formats strfmt.Registry) error { - - if m.DagNode != nil { - - if swag.IsZero(m.DagNode) { // not required - return nil - } - - if err := m.DagNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagNode") - } - return err - } - } - - return nil -} - -func (m *ExchangeTopology) contextValidateStandaloneDbVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StandaloneDbVec); i++ { - - if m.StandaloneDbVec[i] != nil { - - if swag.IsZero(m.StandaloneDbVec[i]) { // not required - return nil - } - - if err := m.StandaloneDbVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDbVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDbVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeTopology) contextValidateStandaloneServer(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneServer != nil { - - if swag.IsZero(m.StandaloneServer) { // not required - return nil - } - - if err := m.StandaloneServer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneServer") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeTopology) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeTopology) UnmarshalBinary(b []byte) error { - var res ExchangeTopology - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/expand_cloud_cluster_parameters.go b/v1/models/expand_cloud_cluster_parameters.go deleted file mode 100644 index 248ddc5a..00000000 --- a/v1/models/expand_cloud_cluster_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" -) - -// ExpandCloudClusterParameters Expand Cloud Cluster Parameters. -// -// Specifies the parameters needed to expand a Cohesity Cloud Edition Cluster. -// -// swagger:model ExpandCloudClusterParameters -type ExpandCloudClusterParameters struct { - - // Specifies the list of IPs of the new Nodes. - // Required: true - NodeIps []string `json:"nodeIps"` -} - -// Validate validates this expand cloud cluster parameters -func (m *ExpandCloudClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeIps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExpandCloudClusterParameters) validateNodeIps(formats strfmt.Registry) error { - - if err := validate.Required("nodeIps", "body", m.NodeIps); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this expand cloud cluster parameters based on context it is used -func (m *ExpandCloudClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExpandCloudClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExpandCloudClusterParameters) UnmarshalBinary(b []byte) error { - var res ExpandCloudClusterParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/expand_physical_cluster_parameters.go b/v1/models/expand_physical_cluster_parameters.go deleted file mode 100644 index f9d384ef..00000000 --- a/v1/models/expand_physical_cluster_parameters.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExpandPhysicalClusterParameters Expand Physical Cluster Parameters. -// -// Specifies the parameters needed to expand a Cohesity Physical -// Edition Cluster. -// -// swagger:model ExpandPhysicalClusterParameters -type ExpandPhysicalClusterParameters struct { - - // ChassisSerialToRackId map. - ChassisSerialToRackIDMap map[string]int64 `json:"chassisSerialToRackIdMap,omitempty"` - - // Specifies the configuration details of the Nodes in the Cluster. - // Required: true - NodeConfigs []*PhysicalNodeConfiguration `json:"nodeConfigs"` - - // Specifies the virtual IPs to add to the Cluster. - Vips []string `json:"vips"` -} - -// Validate validates this expand physical cluster parameters -func (m *ExpandPhysicalClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExpandPhysicalClusterParameters) validateNodeConfigs(formats strfmt.Registry) error { - - if err := validate.Required("nodeConfigs", "body", m.NodeConfigs); err != nil { - return err - } - - for i := 0; i < len(m.NodeConfigs); i++ { - if swag.IsZero(m.NodeConfigs[i]) { // not required - continue - } - - if m.NodeConfigs[i] != nil { - if err := m.NodeConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this expand physical cluster parameters based on the context it is used -func (m *ExpandPhysicalClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExpandPhysicalClusterParameters) contextValidateNodeConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeConfigs); i++ { - - if m.NodeConfigs[i] != nil { - - if swag.IsZero(m.NodeConfigs[i]) { // not required - return nil - } - - if err := m.NodeConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExpandPhysicalClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExpandPhysicalClusterParameters) UnmarshalBinary(b []byte) error { - var res ExpandPhysicalClusterParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/expiration_action.go b/v1/models/expiration_action.go deleted file mode 100644 index 08960619..00000000 --- a/v1/models/expiration_action.go +++ /dev/null @@ -1,57 +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" -) - -// ExpirationAction Proto to define Lifecycle current version ExpirationAction. -// -// swagger:model ExpirationAction -type ExpirationAction struct { - - // Timestamp in usecs for the date the object is subject to the rule. - DateUsecs *int64 `json:"dateUsecs,omitempty"` - - // Lifetime in days, of the objects that are subject to the rule. - Days *uint64 `json:"days,omitempty"` - - // Indicates whether Amazon S3 will remove a delete marker with no noncurrent - // versions. If set, the delete marker will be expired. - ExpiredObjectDeleteMarker *bool `json:"expiredObjectDeleteMarker,omitempty"` -} - -// Validate validates this expiration action -func (m *ExpirationAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this expiration action based on context it is used -func (m *ExpirationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExpirationAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExpirationAction) UnmarshalBinary(b []byte) error { - var res ExpirationAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/extended_field_uri.go b/v1/models/extended_field_uri.go deleted file mode 100644 index 6e994da0..00000000 --- a/v1/models/extended_field_uri.go +++ /dev/null @@ -1,54 +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" -) - -// ExtendedFieldURI Represents an element that identifies an extended MAPI property. -// -// swagger:model ExtendedFieldURI -type ExtendedFieldURI struct { - - // Identifies the property tag. It should be a hexadecimal number as a - // string. - PropertyTag *string `json:"propertyTag,omitempty"` - - // Represents the property type of a property tag. - PropertyType *int32 `json:"propertyType,omitempty"` -} - -// Validate validates this extended field URI -func (m *ExtendedFieldURI) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this extended field URI based on context it is used -func (m *ExtendedFieldURI) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExtendedFieldURI) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedFieldURI) UnmarshalBinary(b []byte) error { - var res ExtendedFieldURI - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/extended_retention_policy.go b/v1/models/extended_retention_policy.go deleted file mode 100644 index 0ab23f17..00000000 --- a/v1/models/extended_retention_policy.go +++ /dev/null @@ -1,270 +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" -) - -// ExtendedRetentionPolicy Extended Retention Policy. -// -// Specifies additional retention policies to apply to backup snapshots. -// -// swagger:model ExtendedRetentionPolicy -type ExtendedRetentionPolicy struct { - - // Specified the Id for a snapshot copy policy. This is generated when the - // policy is created. - ID *string `json:"Id,omitempty"` - - // The backup run type to which this extended retention applies to. If this is - // not set, the extended retention will be applicable to all non-log backup - // types. Currently, the only value that can be set here is kFull. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies WORM retention type for snapshots under extended retention. - DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` - - // Specifies the number of days to retain copied Snapshots on the target. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies a factor to multiply the periodicity by, to determine the copy - // schedule. - // For example if set to 2 and the periodicity is hourly, then Snapshots - // from the first eligible Job Run for every 2 hour period is copied. - Multiplier *int32 `json:"multiplier,omitempty"` - - // Specifies the frequency that Snapshots should be copied to the - // specified target. Used in combination with multiplier. - // 'kEvery' means that the Snapshot copy occurs after the number of - // Job Runs equals the number specified in the multiplier. - // 'kHour' means that the Snapshot copy occurs hourly at the frequency - // set in the multiplier, for example if multiplier is 2, the copy occurs - // every 2 hours. - // 'kDay' means that the Snapshot copy occurs daily at the frequency - // set in the multiplier. - // 'kWeek' means that the Snapshot copy occurs weekly at the frequency - // set in the multiplier. - // 'kMonth' means that the Snapshot copy occurs monthly at the frequency - // set in the multiplier. - // 'kYear' means that the Snapshot copy occurs yearly at the frequency - // set in the multiplier. - // Enum: ["kEvery","kHour","kDay","kWeek","kMonth","kYear"] - Periodicity *string `json:"periodicity,omitempty"` -} - -// Validate validates this extended retention policy -func (m *ExtendedRetentionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var extendedRetentionPolicyTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - extendedRetentionPolicyTypeBackupRunTypePropEnum = append(extendedRetentionPolicyTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // ExtendedRetentionPolicyBackupRunTypeKRegular captures enum value "kRegular" - ExtendedRetentionPolicyBackupRunTypeKRegular string = "kRegular" - - // ExtendedRetentionPolicyBackupRunTypeKFull captures enum value "kFull" - ExtendedRetentionPolicyBackupRunTypeKFull string = "kFull" - - // ExtendedRetentionPolicyBackupRunTypeKLog captures enum value "kLog" - ExtendedRetentionPolicyBackupRunTypeKLog string = "kLog" - - // ExtendedRetentionPolicyBackupRunTypeKSystem captures enum value "kSystem" - ExtendedRetentionPolicyBackupRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *ExtendedRetentionPolicy) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, extendedRetentionPolicyTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExtendedRetentionPolicy) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *ExtendedRetentionPolicy) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -var extendedRetentionPolicyTypePeriodicityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEvery","kHour","kDay","kWeek","kMonth","kYear"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - extendedRetentionPolicyTypePeriodicityPropEnum = append(extendedRetentionPolicyTypePeriodicityPropEnum, v) - } -} - -const ( - - // ExtendedRetentionPolicyPeriodicityKEvery captures enum value "kEvery" - ExtendedRetentionPolicyPeriodicityKEvery string = "kEvery" - - // ExtendedRetentionPolicyPeriodicityKHour captures enum value "kHour" - ExtendedRetentionPolicyPeriodicityKHour string = "kHour" - - // ExtendedRetentionPolicyPeriodicityKDay captures enum value "kDay" - ExtendedRetentionPolicyPeriodicityKDay string = "kDay" - - // ExtendedRetentionPolicyPeriodicityKWeek captures enum value "kWeek" - ExtendedRetentionPolicyPeriodicityKWeek string = "kWeek" - - // ExtendedRetentionPolicyPeriodicityKMonth captures enum value "kMonth" - ExtendedRetentionPolicyPeriodicityKMonth string = "kMonth" - - // ExtendedRetentionPolicyPeriodicityKYear captures enum value "kYear" - ExtendedRetentionPolicyPeriodicityKYear string = "kYear" -) - -// prop value enum -func (m *ExtendedRetentionPolicy) validatePeriodicityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, extendedRetentionPolicyTypePeriodicityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExtendedRetentionPolicy) validatePeriodicity(formats strfmt.Registry) error { - if swag.IsZero(m.Periodicity) { // not required - return nil - } - - // value enum - if err := m.validatePeriodicityEnum("periodicity", "body", *m.Periodicity); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this extended retention policy based on the context it is used -func (m *ExtendedRetentionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtendedRetentionPolicy) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExtendedRetentionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedRetentionPolicy) UnmarshalBinary(b []byte) error { - var res ExtendedRetentionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/extended_retention_policy_proto.go b/v1/models/extended_retention_policy_proto.go deleted file mode 100644 index add661ee..00000000 --- a/v1/models/extended_retention_policy_proto.go +++ /dev/null @@ -1,184 +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" -) - -// ExtendedRetentionPolicyProto Message that specifies additional retention policies to apply to backup -// snapshots. -// -// swagger:model ExtendedRetentionPolicyProto -type ExtendedRetentionPolicyProto struct { - - // The backup type to which this extended retention applies to. If this is - // not set, the extended retention will be applicable to all non-log backup - // types. - // - // Currently, the only value that can be set here is kFull (Magneto will - // return an error if it is set to anything else). - BackupType *int32 `json:"backupType,omitempty"` - - // If this is false, then only snapshots from the first completely successful - // run in the given time granularity will be considered eligible for this - // extended retention policy. If this is true, then snapshots from the first - // partially successful run will also be considered eligible. - CopyPartiallySuccessfulRun *bool `json:"copyPartiallySuccessfulRun,omitempty"` - - // The granularity bucket frequency which determines the backup snapshots - // that this extended retention policy applies to. - GranularityBucket *GranularityBucket `json:"granularityBucket,omitempty"` - - // This id uniquely identifies this entry in the ProtectionPolicyProto. - // - // If this message is from global policy, this id is generated by Helios. - // Otherwise, it is generated by Iris. Magneto treats this as an opaque - // identifier. - ID *string `json:"id,omitempty"` - - // The retention that applies to the backup snapshots matched by the above - // granularity bucket. - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` -} - -// Validate validates this extended retention policy proto -func (m *ExtendedRetentionPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGranularityBucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtendedRetentionPolicyProto) validateGranularityBucket(formats strfmt.Registry) error { - if swag.IsZero(m.GranularityBucket) { // not required - return nil - } - - if m.GranularityBucket != nil { - if err := m.GranularityBucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucket") - } - return err - } - } - - return nil -} - -func (m *ExtendedRetentionPolicyProto) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this extended retention policy proto based on the context it is used -func (m *ExtendedRetentionPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGranularityBucket(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtendedRetentionPolicyProto) contextValidateGranularityBucket(ctx context.Context, formats strfmt.Registry) error { - - if m.GranularityBucket != nil { - - if swag.IsZero(m.GranularityBucket) { // not required - return nil - } - - if err := m.GranularityBucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucket") - } - return err - } - } - - return nil -} - -func (m *ExtendedRetentionPolicyProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExtendedRetentionPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedRetentionPolicyProto) UnmarshalBinary(b []byte) error { - var res ExtendedRetentionPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/external_client_subnets.go b/v1/models/external_client_subnets.go deleted file mode 100644 index 1b9e0d9b..00000000 --- a/v1/models/external_client_subnets.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExternalClientSubnets Specifies the external Client Subnets that can communicate with this cluster. -// -// swagger:model ExternalClientSubnets -type ExternalClientSubnets struct { - - // Specifies the Client Subnets for the cluster. - ClientSubnets []*Subnet `json:"clientSubnets"` -} - -// Validate validates this external client subnets -func (m *ExternalClientSubnets) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalClientSubnets) validateClientSubnets(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnets) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnets); i++ { - if swag.IsZero(m.ClientSubnets[i]) { // not required - continue - } - - if m.ClientSubnets[i] != nil { - if err := m.ClientSubnets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this external client subnets based on the context it is used -func (m *ExternalClientSubnets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalClientSubnets) contextValidateClientSubnets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnets); i++ { - - if m.ClientSubnets[i] != nil { - - if swag.IsZero(m.ClientSubnets[i]) { // not required - return nil - } - - if err := m.ClientSubnets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternalClientSubnets) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternalClientSubnets) UnmarshalBinary(b []byte) error { - var res ExternalClientSubnets - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/external_network_info.go b/v1/models/external_network_info.go deleted file mode 100644 index 3a8ed1c8..00000000 --- a/v1/models/external_network_info.go +++ /dev/null @@ -1,60 +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" -) - -// ExternalNetworkInfo Specifies the external network information of the app instance. -// -// This is used to display the list of external networks, from which one can -// potentially be selected for an app instance. -// -// swagger:model ExternalNetworkInfo -type ExternalNetworkInfo struct { - - // Name of axon network corresponding to this external network. Used for - // internal purposes only. - AxonNetworkName *string `json:"axonNetworkName,omitempty"` - - // VLAN id of the network. - VlanID *int32 `json:"vlanId,omitempty"` - - // Display name for the UI to select the external network. - VlanNetworkName *string `json:"vlanNetworkName,omitempty"` -} - -// Validate validates this external network info -func (m *ExternalNetworkInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this external network info based on context it is used -func (m *ExternalNetworkInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternalNetworkInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternalNetworkInfo) UnmarshalBinary(b []byte) error { - var res ExternalNetworkInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/externally_triggered_backup_params.go b/v1/models/externally_triggered_backup_params.go deleted file mode 100644 index 3cc543ce..00000000 --- a/v1/models/externally_triggered_backup_params.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" -) - -// ExternallyTriggeredBackupParams Message contains params for externally triggered backup. -// -// swagger:model ExternallyTriggeredBackupParams -type ExternallyTriggeredBackupParams struct { - - // The start time when the job instance is triggered. - JobInstanceStartTime *int64 `json:"jobInstanceStartTime,omitempty"` - - // The tag from the start backup request. - Tag *string `json:"tag,omitempty"` -} - -// Validate validates this externally triggered backup params -func (m *ExternallyTriggeredBackupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this externally triggered backup params based on context it is used -func (m *ExternallyTriggeredBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredBackupParams) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/externally_triggered_env_job_parameters.go b/v1/models/externally_triggered_env_job_parameters.go deleted file mode 100644 index cfe91c08..00000000 --- a/v1/models/externally_triggered_env_job_parameters.go +++ /dev/null @@ -1,163 +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" -) - -// ExternallyTriggeredEnvJobParameters Externally Triggered Backup Environment Job Parameters. -// -// swagger:model ExternallyTriggeredEnvJobParameters -type ExternallyTriggeredEnvJobParameters struct { - - // Specifies the client type of the externally triggered job - // kGeneric implies generic externally triggered backups. - // kSbt implies externally triggered backups for SBT. - // Enum: ["kGeneric","kSbt"] - ClientType *string `json:"clientType,omitempty"` - - // Specifies the catalog view associated with this job. - SbtParams *ExternallyTriggeredSbtParameters `json:"sbtParams,omitempty"` -} - -// Validate validates this externally triggered env job parameters -func (m *ExternallyTriggeredEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSbtParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var externallyTriggeredEnvJobParametersTypeClientTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGeneric","kSbt"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - externallyTriggeredEnvJobParametersTypeClientTypePropEnum = append(externallyTriggeredEnvJobParametersTypeClientTypePropEnum, v) - } -} - -const ( - - // ExternallyTriggeredEnvJobParametersClientTypeKGeneric captures enum value "kGeneric" - ExternallyTriggeredEnvJobParametersClientTypeKGeneric string = "kGeneric" - - // ExternallyTriggeredEnvJobParametersClientTypeKSbt captures enum value "kSbt" - ExternallyTriggeredEnvJobParametersClientTypeKSbt string = "kSbt" -) - -// prop value enum -func (m *ExternallyTriggeredEnvJobParameters) validateClientTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, externallyTriggeredEnvJobParametersTypeClientTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExternallyTriggeredEnvJobParameters) validateClientType(formats strfmt.Registry) error { - if swag.IsZero(m.ClientType) { // not required - return nil - } - - // value enum - if err := m.validateClientTypeEnum("clientType", "body", *m.ClientType); err != nil { - return err - } - - return nil -} - -func (m *ExternallyTriggeredEnvJobParameters) validateSbtParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if m.SbtParams != nil { - if err := m.SbtParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this externally triggered env job parameters based on the context it is used -func (m *ExternallyTriggeredEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternallyTriggeredEnvJobParameters) contextValidateSbtParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtParams != nil { - - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if err := m.SbtParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredEnvJobParameters) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/externally_triggered_job_params.go b/v1/models/externally_triggered_job_params.go deleted file mode 100644 index fc58345f..00000000 --- a/v1/models/externally_triggered_job_params.go +++ /dev/null @@ -1,121 +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" -) - -// ExternallyTriggeredJobParams Externally Triggered Backup Job Enviroment Parameters. -// -// Message to capture any additional backup params specific to externally -// triggered backup job. -// -// swagger:model ExternallyTriggeredJobParams -type ExternallyTriggeredJobParams struct { - - // The client type for this job. - ClientType *int32 `json:"clientType,omitempty"` - - // The SBT parameters. - SbtParams *ExternallyTriggeredJobParamsExternallyTriggeredSbtParams `json:"sbtParams,omitempty"` - - // All the tags populated in the runs of the externally triggered job. - // This field is only for the convenience of UI filtering the runs based - // on the tag. It should be populated only for the Iris query requests - // and should never be persisted. - Tags []string `json:"tags"` -} - -// Validate validates this externally triggered job params -func (m *ExternallyTriggeredJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSbtParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternallyTriggeredJobParams) validateSbtParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if m.SbtParams != nil { - if err := m.SbtParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this externally triggered job params based on the context it is used -func (m *ExternallyTriggeredJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternallyTriggeredJobParams) contextValidateSbtParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtParams != nil { - - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if err := m.SbtParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredJobParams) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/externally_triggered_job_params_externally_triggered_sbt_params.go b/v1/models/externally_triggered_job_params_externally_triggered_sbt_params.go deleted file mode 100644 index efc35774..00000000 --- a/v1/models/externally_triggered_job_params_externally_triggered_sbt_params.go +++ /dev/null @@ -1,50 +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" -) - -// ExternallyTriggeredJobParamsExternallyTriggeredSbtParams The parameters for the client type of kSbt. -// -// swagger:model ExternallyTriggeredJobParams_ExternallyTriggeredSbtParams -type ExternallyTriggeredJobParamsExternallyTriggeredSbtParams struct { - - // The catalog view associated with the job. - CatalogView *string `json:"catalogView,omitempty"` -} - -// Validate validates this externally triggered job params externally triggered sbt params -func (m *ExternallyTriggeredJobParamsExternallyTriggeredSbtParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this externally triggered job params externally triggered sbt params based on context it is used -func (m *ExternallyTriggeredJobParamsExternallyTriggeredSbtParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredJobParamsExternallyTriggeredSbtParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredJobParamsExternallyTriggeredSbtParams) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredJobParamsExternallyTriggeredSbtParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/externally_triggered_sbt_parameters.go b/v1/models/externally_triggered_sbt_parameters.go deleted file mode 100644 index 4341131b..00000000 --- a/v1/models/externally_triggered_sbt_parameters.go +++ /dev/null @@ -1,50 +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" -) - -// ExternallyTriggeredSbtParameters Externally Triggered SBT Job Parameters. -// -// swagger:model ExternallyTriggeredSbtParameters -type ExternallyTriggeredSbtParameters struct { - - // Specifies the catalog view associated with this job. - CatalogView *string `json:"catalogView,omitempty"` -} - -// Validate validates this externally triggered sbt parameters -func (m *ExternallyTriggeredSbtParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this externally triggered sbt parameters based on context it is used -func (m *ExternallyTriggeredSbtParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredSbtParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredSbtParameters) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredSbtParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/extract_file_range_result.go b/v1/models/extract_file_range_result.go deleted file mode 100644 index 601e0900..00000000 --- a/v1/models/extract_file_range_result.go +++ /dev/null @@ -1,126 +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" -) - -// ExtractFileRangeResult Extract File Range Result. -// -// This will capture output of ExtractFileRange and ExtractNFSFileRange. -// -// swagger:model ExtractFileRangeResult -type ExtractFileRangeResult struct { - - // The actual data bytes. - Data []uint8 `json:"data"` - - // Will be true if start_offset > file length or EOF is reached. This is an - // alternative to using file_length to determine when entire file is read. - // Used when fetching from a view. - EOF *bool `json:"eof,omitempty"` - - // Success/error status of the operation. - Error *ErrorProto `json:"error,omitempty"` - - // The total length of the file. This field would be set provided no error - // had occurred (indicated by error field above). - FileLength *int64 `json:"fileLength,omitempty"` - - // The offset from which data was read. - StartOffset *int64 `json:"startOffset,omitempty"` -} - -// Validate validates this extract file range result -func (m *ExtractFileRangeResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtractFileRangeResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this extract file range result based on the context it is used -func (m *ExtractFileRangeResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtractFileRangeResult) 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 -} - -// MarshalBinary interface implementation -func (m *ExtractFileRangeResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtractFileRangeResult) UnmarshalBinary(b []byte) error { - var res ExtractFileRangeResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/failure_reason.go b/v1/models/failure_reason.go deleted file mode 100644 index 56bb3c7d..00000000 --- a/v1/models/failure_reason.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" -) - -// FailureReason Failure reason -// -// swagger:model FailureReason -type FailureReason struct { - - // code - Code *string `json:"code,omitempty"` - - // summary - Summary *string `json:"summary,omitempty"` -} - -// Validate validates this failure reason -func (m *FailureReason) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this failure reason based on context it is used -func (m *FailureReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailureReason) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailureReason) UnmarshalBinary(b []byte) error { - var res FailureReason - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/field_info.go b/v1/models/field_info.go deleted file mode 100644 index 705e1353..00000000 --- a/v1/models/field_info.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/strfmt" - "github.com/go-openapi/swag" -) - -// FieldInfo Proto that contains specific information about an Sfdc Field. -// -// swagger:model FieldInfo -type FieldInfo struct { - - // Data Type of the field. Salesforce supports various data types. - // More on this here - - // https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/ - // object_reference/field_types.htm - // https://developer.salesforce.com/docs/ - // atlas.en-us.220.0.object_reference.meta/object_reference/ - // primitive_data_types.htm - DataType *string `json:"dataType,omitempty"` - - // field type - FieldType *int32 `json:"fieldType,omitempty"` - - // Max length of field. - Length *uint32 `json:"length,omitempty"` - - // Name of the field. - Name *string `json:"name,omitempty"` - - // The maximum number of digits in a numeric value, - // or the length of a text value. - Precision *uint32 `json:"precision,omitempty"` - - // The number of digits to the right of the decimal point in a numeric value. - // Must be less than the precision value. - Scale *uint32 `json:"scale,omitempty"` -} - -// Validate validates this field info -func (m *FieldInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this field info based on context it is used -func (m *FieldInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FieldInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FieldInfo) UnmarshalBinary(b []byte) error { - var res FieldInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_distribution_metrics.go b/v1/models/file_distribution_metrics.go deleted file mode 100644 index 25df5022..00000000 --- a/v1/models/file_distribution_metrics.go +++ /dev/null @@ -1,55 +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" -) - -// FileDistributionMetrics File distribution Metrics. -// -// Specifies the File distribution metrics. -// -// swagger:model FileDistributionMetrics -type FileDistributionMetrics struct { - - // Specifies the name of the metric. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the value of specified metric name. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this file distribution metrics -func (m *FileDistributionMetrics) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file distribution metrics based on context it is used -func (m *FileDistributionMetrics) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileDistributionMetrics) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileDistributionMetrics) UnmarshalBinary(b []byte) error { - var res FileDistributionMetrics - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_distribution_stats.go b/v1/models/file_distribution_stats.go deleted file mode 100644 index 149f990f..00000000 --- a/v1/models/file_distribution_stats.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileDistributionStats File distribution Statistics. -// -// Specifies the File distribution stats. -// -// swagger:model FileDistributionStats -type FileDistributionStats struct { - - // Specifies the cluster Id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster Incarnation Id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the id of the entity for which file distribution stats are computed. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the name of the entity for which file distribution stats are computed. - EntityName *string `json:"entityName,omitempty"` - - // Specifies the list of file stats for different file extensions. - MetricsList []*FileDistributionMetrics `json:"metricsList"` -} - -// Validate validates this file distribution stats -func (m *FileDistributionStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetricsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileDistributionStats) validateMetricsList(formats strfmt.Registry) error { - if swag.IsZero(m.MetricsList) { // not required - return nil - } - - for i := 0; i < len(m.MetricsList); i++ { - if swag.IsZero(m.MetricsList[i]) { // not required - continue - } - - if m.MetricsList[i] != nil { - if err := m.MetricsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metricsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metricsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file distribution stats based on the context it is used -func (m *FileDistributionStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetricsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileDistributionStats) contextValidateMetricsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MetricsList); i++ { - - if m.MetricsList[i] != nil { - - if swag.IsZero(m.MetricsList[i]) { // not required - return nil - } - - if err := m.MetricsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metricsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metricsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileDistributionStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileDistributionStats) UnmarshalBinary(b []byte) error { - var res FileDistributionStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_distribution_stats_list.go b/v1/models/file_distribution_stats_list.go deleted file mode 100644 index 44da628f..00000000 --- a/v1/models/file_distribution_stats_list.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileDistributionStatsList File distribution Statistics List. -// -// Specifies the File distribution stats list. -// -// swagger:model FileDistributionStatsList -type FileDistributionStatsList []*FileDistributionStats - -// Validate validates this file distribution stats list -func (m FileDistributionStatsList) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this file distribution stats list based on the context it is used -func (m FileDistributionStatsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/models/file_extension_filter.go b/v1/models/file_extension_filter.go deleted file mode 100644 index d4cabd99..00000000 --- a/v1/models/file_extension_filter.go +++ /dev/null @@ -1,113 +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" -) - -// FileExtensionFilter file extension filter -// -// swagger:model FileExtensionFilter -type FileExtensionFilter struct { - - // The list of file extensions to apply - FileExtensionsList []string `json:"fileExtensionsList"` - - // If set, it enables the file extension filter - IsEnabled *bool `json:"isEnabled,omitempty"` - - // The mode applied to the list of file extensions - // 'kWhitelist' indicates a allowlist extension filter. - // 'kBlacklist' indicates a denylist extension filter. - // Enum: ["kWhitelist","kBlacklist"] - Mode *string `json:"mode,omitempty"` -} - -// Validate validates this file extension filter -func (m *FileExtensionFilter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileExtensionFilterTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kWhitelist","kBlacklist"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileExtensionFilterTypeModePropEnum = append(fileExtensionFilterTypeModePropEnum, v) - } -} - -const ( - - // FileExtensionFilterModeKWhitelist captures enum value "kWhitelist" - FileExtensionFilterModeKWhitelist string = "kWhitelist" - - // FileExtensionFilterModeKBlacklist captures enum value "kBlacklist" - FileExtensionFilterModeKBlacklist string = "kBlacklist" -) - -// prop value enum -func (m *FileExtensionFilter) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileExtensionFilterTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileExtensionFilter) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file extension filter based on context it is used -func (m *FileExtensionFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileExtensionFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileExtensionFilter) UnmarshalBinary(b []byte) error { - var res FileExtensionFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_fstat_result.go b/v1/models/file_fstat_result.go deleted file mode 100644 index 02520662..00000000 --- a/v1/models/file_fstat_result.go +++ /dev/null @@ -1,116 +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" -) - -// FileFstatResult File Fstat Result. -// -// FileFstatResult is the struct to return the result of file Fstats. -// -// swagger:model FileFstatResult -type FileFstatResult struct { - - // Cookie is used for paginating results. If ReadVMDirResult is returning - // partial results, this field will be set. Supplying this cookie will - // resume listing from where this result left off. - Cookie *uint64 `json:"cookie,omitempty"` - - // FstatInfo is the stat information for the file. - FstatInfo *FileStatInfo `json:"fstatInfo,omitempty"` -} - -// Validate validates this file fstat result -func (m *FileFstatResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFstatInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileFstatResult) validateFstatInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if m.FstatInfo != nil { - if err := m.FstatInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file fstat result based on the context it is used -func (m *FileFstatResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFstatInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileFstatResult) contextValidateFstatInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FstatInfo != nil { - - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if err := m.FstatInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileFstatResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileFstatResult) UnmarshalBinary(b []byte) error { - var res FileFstatResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_id.go b/v1/models/file_id.go deleted file mode 100644 index 4ca88fc7..00000000 --- a/v1/models/file_id.go +++ /dev/null @@ -1,56 +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" -) - -// FileID Specifies the file Identifier. A file is identified with these three Ids. -// -// swagger:model FileId -type FileID struct { - - // Specifies the entity id of the file. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the root inode id of the file system that file belongs to. - RootInodeID *int64 `json:"rootInodeId,omitempty"` - - // Specifies the id of the View the file belongs to. - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this file Id -func (m *FileID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file Id based on context it is used -func (m *FileID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileID) UnmarshalBinary(b []byte) error { - var res FileID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_info.go b/v1/models/file_info.go deleted file mode 100644 index 14784a7e..00000000 --- a/v1/models/file_info.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" -) - -// FileInfo Information about a file. -// -// swagger:model FileInfo -type FileInfo struct { - - // Modification time of file/directory - Mtime *int64 `json:"mtime,omitempty"` - - // Size of file/directory - Size *int64 `json:"size,omitempty"` -} - -// Validate validates this file info -func (m *FileInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file info based on context it is used -func (m *FileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileInfo) UnmarshalBinary(b []byte) error { - var res FileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_level_data_lock_config.go b/v1/models/file_level_data_lock_config.go deleted file mode 100644 index d1209df3..00000000 --- a/v1/models/file_level_data_lock_config.go +++ /dev/null @@ -1,212 +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" -) - -// FileLevelDataLockConfig File Level Data Lock Configurations. -// -// Specifies a config to lock files in a view - to protect from malicious or -// an accidental attempt to delete or modify the files in this view. -// -// swagger:model FileLevelDataLockConfig -type FileLevelDataLockConfig struct { - - // Specifies the duration to lock a file that has not been accessed or - // modified (ie. has been idle) for a certain duration of time in - // milliseconds. Do not set if it is required to disable auto lock. - AutoLockAfterDurationIdle *uint64 `json:"autoLockAfterDurationIdle,omitempty"` - - // Specifies a global default retention duration for files in this view, if - // file lock is enabled for this view. Also, it is a required field if file - // lock is enabled. Set to -1 if the required default retention period is - // forever. - DefaultFileRetentionDurationMsecs *int64 `json:"defaultFileRetentionDurationMsecs,omitempty"` - - // Specifies a definite timestamp in milliseconds for retaining the file. - ExpiryTimestampMsecs *uint64 `json:"expiryTimestampMsecs,omitempty"` - - // Specifies the supported mechanisms to explicity lock a file from NFS/SMB - // interface. Supported locking protocols: kSetReadOnly, kSetAtime. - // 'kSetReadOnly' is compatible with Isilon/Netapp behaviour. This locks the - // file and the retention duration is determined in this order: - // 1) atime, if set by user/application and within min and max retention - // duration. - // 2) Min retention duration, if set. - // 3) Otherwise, file is switched to expired data automatically. - // 'kSetAtime' is compatible with Data Domain behaviour. - // Enum: ["kSetReadOnly","kSetAtime"] - LockingProtocol *string `json:"lockingProtocol,omitempty"` - - // Specifies a maximum duration in milliseconds for which any file in this - // view can be retained for. Set to -1 if the required retention duration is - // forever. If set, it should be greater than or equal to the default - // retention period as well as the min retention period. - MaxRetentionDurationMsecs *int64 `json:"maxRetentionDurationMsecs,omitempty"` - - // Specifies a minimum retention duration in milliseconds after a file gets - // locked. The file cannot be modified or deleted during this timeframe. Set - // to -1 if the required retention duration is forever. This should be set - // less than or equal to the default retention duration. - MinRetentionDurationMsecs *int64 `json:"minRetentionDurationMsecs,omitempty"` - - // Specifies the mode of file level datalock. - // Enterprise mode can be upgraded to Compliance mode, but Compliance mode - // cannot be downgraded to Enterprise mode, unless view's - // FileLevelDataLockConfig has coexisting_lock_mode set. - // kCompliance: This mode would disallow all user to delete/modify file or - // view under any condition when it 's in locked status except for deleting - // view when the view is empty. - // kEnterprise: This mode would follow the rules as compliance mode for - // normal users. But it would allow the storage admin - // (1) to delete view or file anytime no matter - // it is in locked status or expired. - // (2) to rename the view - // (3) to bring back the retention period when it's in locked mode - // A lock mode of a file in a view can be in one of the following: - // - // 'kCompliance': Default mode of datalock, in this mode, Data Security Admin - // cannot modify/delete this view when datalock is in effect. Data Security - // Admin can delete this view when datalock is expired. - // 'kEnterprise' : In this mode, Data Security Admin can change view name or - // delete view when datalock is in effect. Datalock in this mode can be - // upgraded to 'kCompliance' mode. - // Enum: ["kCompliance","kEnterprise"] - Mode *string `json:"mode,omitempty"` -} - -// Validate validates this file level data lock config -func (m *FileLevelDataLockConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockingProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileLevelDataLockConfigTypeLockingProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSetReadOnly","kSetAtime"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLevelDataLockConfigTypeLockingProtocolPropEnum = append(fileLevelDataLockConfigTypeLockingProtocolPropEnum, v) - } -} - -const ( - - // FileLevelDataLockConfigLockingProtocolKSetReadOnly captures enum value "kSetReadOnly" - FileLevelDataLockConfigLockingProtocolKSetReadOnly string = "kSetReadOnly" - - // FileLevelDataLockConfigLockingProtocolKSetAtime captures enum value "kSetAtime" - FileLevelDataLockConfigLockingProtocolKSetAtime string = "kSetAtime" -) - -// prop value enum -func (m *FileLevelDataLockConfig) validateLockingProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLevelDataLockConfigTypeLockingProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLevelDataLockConfig) validateLockingProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.LockingProtocol) { // not required - return nil - } - - // value enum - if err := m.validateLockingProtocolEnum("lockingProtocol", "body", *m.LockingProtocol); err != nil { - return err - } - - return nil -} - -var fileLevelDataLockConfigTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCompliance","kEnterprise"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLevelDataLockConfigTypeModePropEnum = append(fileLevelDataLockConfigTypeModePropEnum, v) - } -} - -const ( - - // FileLevelDataLockConfigModeKCompliance captures enum value "kCompliance" - FileLevelDataLockConfigModeKCompliance string = "kCompliance" - - // FileLevelDataLockConfigModeKEnterprise captures enum value "kEnterprise" - FileLevelDataLockConfigModeKEnterprise string = "kEnterprise" -) - -// prop value enum -func (m *FileLevelDataLockConfig) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLevelDataLockConfigTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLevelDataLockConfig) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file level data lock config based on context it is used -func (m *FileLevelDataLockConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileLevelDataLockConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileLevelDataLockConfig) UnmarshalBinary(b []byte) error { - var res FileLevelDataLockConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_lock_status.go b/v1/models/file_lock_status.go deleted file mode 100644 index 1add96f3..00000000 --- a/v1/models/file_lock_status.go +++ /dev/null @@ -1,128 +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" -) - -// FileLockStatus File Lock Status. -// -// Specifies the information of lock status for a file. -// -// swagger:model FileLockStatus -type FileLockStatus struct { - - // Specifies a expiry timestamp in milliseconds until the file is locked. - ExpiryTimestampMsecs *int64 `json:"expiryTimestampMsecs,omitempty"` - - // Specifies a override timestamp in milliseconds when an expired file is - // kept on hold. - HoldTimestampMsecs *int64 `json:"holdTimestampMsecs,omitempty"` - - // Specifies the timestamp at which the file was locked. - LockTimestampMsecs *int64 `json:"lockTimestampMsecs,omitempty"` - - // Specifies the mode of the file lock. 'kCompliance', 'kEnterprise'. - // A lock mode of a file in a view can be in one of the following: - // - // 'kCompliance': Default mode of datalock, in this mode, Data Security Admin - // cannot modify/delete this view when datalock is in effect. Data Security - // Admin can delete this view when datalock is expired. - // 'kEnterprise' : In this mode, Data Security Admin can change view name or - // delete view when datalock is in effect. Datalock in this mode can be - // upgraded to 'kCompliance' mode. - // Enum: ["kCompliance","kEnterprise"] - Mode *string `json:"mode,omitempty"` - - // Specifies the lock state of the file. - State *int32 `json:"state,omitempty"` -} - -// Validate validates this file lock status -func (m *FileLockStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileLockStatusTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCompliance","kEnterprise"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLockStatusTypeModePropEnum = append(fileLockStatusTypeModePropEnum, v) - } -} - -const ( - - // FileLockStatusModeKCompliance captures enum value "kCompliance" - FileLockStatusModeKCompliance string = "kCompliance" - - // FileLockStatusModeKEnterprise captures enum value "kEnterprise" - FileLockStatusModeKEnterprise string = "kEnterprise" -) - -// prop value enum -func (m *FileLockStatus) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLockStatusTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLockStatus) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file lock status based on context it is used -func (m *FileLockStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileLockStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileLockStatus) UnmarshalBinary(b []byte) error { - var res FileLockStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_nlm_locks.go b/v1/models/file_nlm_locks.go deleted file mode 100644 index a9bc3cc7..00000000 --- a/v1/models/file_nlm_locks.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileNlmLocks Specifies per-file NLM locks -// -// swagger:model FileNlmLocks -type FileNlmLocks struct { - - // File identitfiers - FileID *FileID `json:"fileId,omitempty"` - - // Specifies the list of NLM locks in a view. - NlmLocks []*NlmLock `json:"nlmLocks"` -} - -// Validate validates this file nlm locks -func (m *FileNlmLocks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNlmLocks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileNlmLocks) validateFileID(formats strfmt.Registry) error { - if swag.IsZero(m.FileID) { // not required - return nil - } - - if m.FileID != nil { - if err := m.FileID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileId") - } - return err - } - } - - return nil -} - -func (m *FileNlmLocks) validateNlmLocks(formats strfmt.Registry) error { - if swag.IsZero(m.NlmLocks) { // not required - return nil - } - - for i := 0; i < len(m.NlmLocks); i++ { - if swag.IsZero(m.NlmLocks[i]) { // not required - continue - } - - if m.NlmLocks[i] != nil { - if err := m.NlmLocks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file nlm locks based on the context it is used -func (m *FileNlmLocks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNlmLocks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileNlmLocks) contextValidateFileID(ctx context.Context, formats strfmt.Registry) error { - - if m.FileID != nil { - - if swag.IsZero(m.FileID) { // not required - return nil - } - - if err := m.FileID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileId") - } - return err - } - } - - return nil -} - -func (m *FileNlmLocks) contextValidateNlmLocks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NlmLocks); i++ { - - if m.NlmLocks[i] != nil { - - if swag.IsZero(m.NlmLocks[i]) { // not required - return nil - } - - if err := m.NlmLocks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileNlmLocks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileNlmLocks) UnmarshalBinary(b []byte) error { - var res FileNlmLocks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_partition_block.go b/v1/models/file_partition_block.go deleted file mode 100644 index 59b99c9e..00000000 --- a/v1/models/file_partition_block.go +++ /dev/null @@ -1,64 +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" -) - -// FilePartitionBlock File Partition Block. -// -// Defines a leaf node of a device tree. This refers to a logical -// partition in a virtual disk file. -// -// swagger:model FilePartitionBlock -type FilePartitionBlock struct { - - // Specifies the disk file name where the logical partition is. - DiskFileName *string `json:"diskFileName,omitempty"` - - // Specifies the length of the block in bytes. - LengthBytes *int64 `json:"lengthBytes,omitempty"` - - // Specifies a unique number of the partition within the linear disk file. - Number *int64 `json:"number,omitempty"` - - // Specifies the offset of the block (in bytes) from the beginning - // of the containing object such as a physical disk or a - // virtual disk file. - OffsetBytes *int64 `json:"offsetBytes,omitempty"` -} - -// Validate validates this file partition block -func (m *FilePartitionBlock) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file partition block based on context it is used -func (m *FilePartitionBlock) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilePartitionBlock) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilePartitionBlock) UnmarshalBinary(b []byte) error { - var res FilePartitionBlock - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_path_filter.go b/v1/models/file_path_filter.go deleted file mode 100644 index 1813ce29..00000000 --- a/v1/models/file_path_filter.go +++ /dev/null @@ -1,71 +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" -) - -// FilePathFilter File or Directory Path Filter. -// -// Specifies filters to match files and directories on a Server. -// Two kinds of filters are supported. a) prefix which always starts -// with '/'. b) posix which always starts with '*' (cannot be "*" only). -// Regular expressions are not supported. -// If a directory is matched, the action is applicable to all of its -// descendants. File paths not matching any protectFilters are not backed up. -// -// An example is: -// Protect Filters: "/" -// Exclude Filters: "/tmp", "*.mp4" -// Using such a policy will include everything under the root directory except -// the /tmp directory and all the mp4 files. -// -// swagger:model FilePathFilter -type FilePathFilter struct { - - // Array of Excluded File Path Filters. - // - // Specifies filters to match files or directories that should be removed - // from the list of objects matching ProtectFilters. - ExcludeFilters []string `json:"excludeFilters"` - - // Array of Protected File Path Filters. - // - // Specifies filters to match files or directories that should be protected. - ProtectFilters []string `json:"protectFilters"` -} - -// Validate validates this file path filter -func (m *FilePathFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file path filter based on context it is used -func (m *FilePathFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilePathFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilePathFilter) UnmarshalBinary(b []byte) error { - var res FilePathFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_path_parameters.go b/v1/models/file_path_parameters.go deleted file mode 100644 index 5b95e4f9..00000000 --- a/v1/models/file_path_parameters.go +++ /dev/null @@ -1,67 +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" -) - -// FilePathParameters File or Directory to Protect. -// -// Specifies a file or a directory to protect in a Physical Server. -// If a directory is specified, all of its descendants are also backed up. -// Optionally, files or subdirectories can be explicitly excluded. -// -// swagger:model FilePathParameters -type FilePathParameters struct { - - // Specifies absolute path to a file or a directory in a Physical Server - // to protect. - BackupFilePath *string `json:"backupFilePath,omitempty"` - - // Array of Excluded File Paths. - // - // Specifies absolute paths to descendant files or subdirectories - // of backupFilePath that should not be protected. - ExcludedFilePaths []string `json:"excludedFilePaths"` - - // Specifies if any subdirectories under backupFilePath, where local or - // network volumes are mounted, should be excluded from being protected. - // If true, the volumes are not protected. - // deprecated: true - SkipNestedVolumes *bool `json:"skipNestedVolumes,omitempty"` -} - -// Validate validates this file path parameters -func (m *FilePathParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file path parameters based on context it is used -func (m *FilePathParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilePathParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilePathParameters) UnmarshalBinary(b []byte) error { - var res FilePathParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_results.go b/v1/models/file_results.go deleted file mode 100644 index 6be97d4c..00000000 --- a/v1/models/file_results.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileResults FileResults is a struct containing the array of files as well as a count to -// indicate to the client if further paginated queries are needed to get the -// full result. -// -// swagger:model FileResults -type FileResults struct { - - // Count is the total number of items stored in the ElasticSearch. - Count *int64 `json:"count,omitempty"` - - // Files lists the individual files fetched by this query. - Files []*YodaFileSearchResult `json:"files"` - - // Specifies cookie for resuming search if pagination is being used. - // For Librarian queries only. - PaginationCookie *string `json:"paginationCookie,omitempty"` -} - -// Validate validates this file results -func (m *FileResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileResults) validateFiles(formats strfmt.Registry) error { - if swag.IsZero(m.Files) { // not required - return nil - } - - for i := 0; i < len(m.Files); i++ { - if swag.IsZero(m.Files[i]) { // not required - continue - } - - if m.Files[i] != nil { - if err := m.Files[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file results based on the context it is used -func (m *FileResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileResults) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Files); i++ { - - if m.Files[i] != nil { - - if swag.IsZero(m.Files[i]) { // not required - return nil - } - - if err := m.Files[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileResults) UnmarshalBinary(b []byte) error { - var res FileResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_search_result.go b/v1/models/file_search_result.go deleted file mode 100644 index 3cdc7c33..00000000 --- a/v1/models/file_search_result.go +++ /dev/null @@ -1,533 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FileSearchResult File/Folder Search Result. -// -// Specifies details about the found file or folder. -// -// swagger:model FileSearchResult -type FileSearchResult struct { - - // Specifies the metadata about the AD objects. - AdObjectMetaData *AdObjectMetaData `json:"adObjectMetaData,omitempty"` - - // Specifies the inferred document type. - DocumentType *string `json:"documentType,omitempty"` - - // Specifies the metadata about the Outlook Emails. - EmailMetaData *EmailMetaData `json:"emailMetaData,omitempty"` - - // Array of File Versions. - // - // Specifies the different snapshot versions of a file or folder - // that were captured at different times. - FileVersions []*FileVersion `json:"fileVersions"` - - // Specifies the name of the found file or folder. - Filename *string `json:"filename,omitempty"` - - // Specifies if the found item is a folder. - // If true, the found item is a folder. - IsFolder *bool `json:"isFolder,omitempty"` - - // Specifies the Job id for the Protection Job that is currently - // associated with object that contains the backed up file or folder. - // If the file or folder was backed up on current Cohesity Cluster, - // this field contains the id for the Job that captured the object - // that contains the file or folder. - // If the file or folder was backed up on a Primary Cluster and - // replicated to this Cohesity Cluster, a new Inactive Job is created, - // the object that contains the file or folder is now associated - // with new Inactive Job, and this field - // contains the id of the new Inactive Job. - JobID *int64 `json:"jobId,omitempty"` - - // job Uid - JobUID *FileSearchResultJobUID `json:"jobUid,omitempty"` - - // Specifies the metadata about the OneDrive documents. - OneDriveDocumentMetadata *OneDriveDocumentMetadata `json:"oneDriveDocumentMetadata,omitempty"` - - // Specifies the Protection Source to which the file or folder belongs. - ProtectionSource *ProtectionSource `json:"protectionSource,omitempty"` - - // Specifies the id of the top-level registered source (such as a - // vCenter Server) where the source object that contains the - // the file or folder is stored. - RegisteredSourceID *int64 `json:"registeredSourceId,omitempty"` - - // Specifies the metadata about the Sharepoint documents. - SharepointDocumentMetadata *SharepointDocumentMetadata `json:"sharepointDocumentMetadata,omitempty"` - - // Snapshot tags present on this document - SnapshotTags []string `json:"snapshotTags"` - - // Specifies the source id of the object that contains the file or folder. - SourceID *int64 `json:"sourceId,omitempty"` - - // Tags present on this document. - Tags []string `json:"tags"` - - // Mapping from snapshot tags to. - TagsToSnapshotsMap map[string][]int64 `json:"tagsToSnapshotsMap,omitempty"` - - // Specifies the type of the file document such as KDirectory, kFile, etc. - // Enum: ["kDirectory","kFile","kEmail","kSymlink"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the Domain (View Box) where the source object that - // contains the file or folder is stored. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this file search result -func (m *FileSearchResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdObjectMetaData(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmailMetaData(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileVersions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveDocumentMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointDocumentMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSearchResult) validateAdObjectMetaData(formats strfmt.Registry) error { - if swag.IsZero(m.AdObjectMetaData) { // not required - return nil - } - - if m.AdObjectMetaData != nil { - if err := m.AdObjectMetaData.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectMetaData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectMetaData") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) validateEmailMetaData(formats strfmt.Registry) error { - if swag.IsZero(m.EmailMetaData) { // not required - return nil - } - - if m.EmailMetaData != nil { - if err := m.EmailMetaData.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailMetaData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailMetaData") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) validateFileVersions(formats strfmt.Registry) error { - if swag.IsZero(m.FileVersions) { // not required - return nil - } - - for i := 0; i < len(m.FileVersions); i++ { - if swag.IsZero(m.FileVersions[i]) { // not required - continue - } - - if m.FileVersions[i] != nil { - if err := m.FileVersions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileSearchResult) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *FileSearchResult) validateOneDriveDocumentMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveDocumentMetadata) { // not required - return nil - } - - if m.OneDriveDocumentMetadata != nil { - if err := m.OneDriveDocumentMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveDocumentMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveDocumentMetadata") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *FileSearchResult) validateSharepointDocumentMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointDocumentMetadata) { // not required - return nil - } - - if m.SharepointDocumentMetadata != nil { - if err := m.SharepointDocumentMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointDocumentMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointDocumentMetadata") - } - return err - } - } - - return nil -} - -var fileSearchResultTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDirectory","kFile","kEmail","kSymlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileSearchResultTypeTypePropEnum = append(fileSearchResultTypeTypePropEnum, v) - } -} - -const ( - - // FileSearchResultTypeKDirectory captures enum value "kDirectory" - FileSearchResultTypeKDirectory string = "kDirectory" - - // FileSearchResultTypeKFile captures enum value "kFile" - FileSearchResultTypeKFile string = "kFile" - - // FileSearchResultTypeKEmail captures enum value "kEmail" - FileSearchResultTypeKEmail string = "kEmail" - - // FileSearchResultTypeKSymlink captures enum value "kSymlink" - FileSearchResultTypeKSymlink string = "kSymlink" -) - -// prop value enum -func (m *FileSearchResult) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileSearchResultTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileSearchResult) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this file search result based on the context it is used -func (m *FileSearchResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdObjectMetaData(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmailMetaData(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveDocumentMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointDocumentMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSearchResult) contextValidateAdObjectMetaData(ctx context.Context, formats strfmt.Registry) error { - - if m.AdObjectMetaData != nil { - - if swag.IsZero(m.AdObjectMetaData) { // not required - return nil - } - - if err := m.AdObjectMetaData.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adObjectMetaData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adObjectMetaData") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) contextValidateEmailMetaData(ctx context.Context, formats strfmt.Registry) error { - - if m.EmailMetaData != nil { - - if swag.IsZero(m.EmailMetaData) { // not required - return nil - } - - if err := m.EmailMetaData.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailMetaData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailMetaData") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) contextValidateFileVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileVersions); i++ { - - if m.FileVersions[i] != nil { - - if swag.IsZero(m.FileVersions[i]) { // not required - return nil - } - - if err := m.FileVersions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *FileSearchResult) contextValidateOneDriveDocumentMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveDocumentMetadata != nil { - - if swag.IsZero(m.OneDriveDocumentMetadata) { // not required - return nil - } - - if err := m.OneDriveDocumentMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveDocumentMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveDocumentMetadata") - } - return err - } - } - - return nil -} - -func (m *FileSearchResult) 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 *FileSearchResult) contextValidateSharepointDocumentMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointDocumentMetadata != nil { - - if swag.IsZero(m.SharepointDocumentMetadata) { // not required - return nil - } - - if err := m.SharepointDocumentMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointDocumentMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointDocumentMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileSearchResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSearchResult) UnmarshalBinary(b []byte) error { - var res FileSearchResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/file_search_results.go b/v1/models/file_search_results.go deleted file mode 100644 index f52840de..00000000 --- a/v1/models/file_search_results.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileSearchResults File/Folder Search Result. -// -// Specifies an array of found files and folders. In addition, a count is -// provided to indicate if additional requests must be made to get -// the full result. -// -// swagger:model FileSearchResults -type FileSearchResults struct { - - // Array of Files and Folders. - // - // Specifies the list of files and folders returned by this request that - // match the specified search and filter criteria. - // The number of files returned is limited by the pageCount field. - Files []*FileSearchResult `json:"files"` - - // Specifies cookie for resuming search if pagination is being used. - // For Librarian queries only. - PaginationCookie *string `json:"paginationCookie,omitempty"` - - // Specifies the total number of files and folders that match the filter and - // search criteria. Use this value to determine how many additional - // requests are required to get the full result. - TotalCount *int64 `json:"totalCount,omitempty"` -} - -// Validate validates this file search results -func (m *FileSearchResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSearchResults) validateFiles(formats strfmt.Registry) error { - if swag.IsZero(m.Files) { // not required - return nil - } - - for i := 0; i < len(m.Files); i++ { - if swag.IsZero(m.Files[i]) { // not required - continue - } - - if m.Files[i] != nil { - if err := m.Files[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file search results based on the context it is used -func (m *FileSearchResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSearchResults) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Files); i++ { - - if m.Files[i] != nil { - - if swag.IsZero(m.Files[i]) { // not required - return nil - } - - if err := m.Files[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileSearchResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSearchResults) UnmarshalBinary(b []byte) error { - var res FileSearchResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_snapshot_information.go b/v1/models/file_snapshot_information.go deleted file mode 100644 index 6c34fa54..00000000 --- a/v1/models/file_snapshot_information.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileSnapshotInformation File/Folder Snapshot Information. -// -// Specifies the information about the snapshot that contains the file -// or folder. In addition, information about the file or folder is -// provided. -// -// swagger:model FileSnapshotInformation -type FileSnapshotInformation struct { - - // If true, this snapshot is located on an archival target - // (such as a tape or AWS). - HasArchivalCopy *bool `json:"hasArchivalCopy,omitempty"` - - // If true, this snapshot is located on a local Cohesity Cluster. - HasLocalCopy *bool `json:"hasLocalCopy,omitempty"` - - // If true, this snapshot is located on a Remote Cohesity Cluster. - HasRemoteCopy *bool `json:"hasRemoteCopy,omitempty"` - - // Specifies the time when the file or folder was last modified. - // Specified as a Unix epoch Timestamp (in microseconds). - ModifiedTimeUsecs *int64 `json:"modifiedTimeUsecs,omitempty"` - - // Specifies the list of replication information about the current snapshot. - ReplicaInfoList []*ReplicaInfo `json:"replicaInfoList"` - - // Specifies the size of the file or folder in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the snapshot that contains the specified file or folder. - Snapshot *SnapshotAttempt `json:"snapshot,omitempty"` -} - -// Validate validates this file snapshot information -func (m *FileSnapshotInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshot(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSnapshotInformation) validateReplicaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.ReplicaInfoList); i++ { - if swag.IsZero(m.ReplicaInfoList[i]) { // not required - continue - } - - if m.ReplicaInfoList[i] != nil { - if err := m.ReplicaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileSnapshotInformation) validateSnapshot(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshot) { // not required - return nil - } - - if m.Snapshot != nil { - if err := m.Snapshot.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshot") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file snapshot information based on the context it is used -func (m *FileSnapshotInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshot(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSnapshotInformation) contextValidateReplicaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicaInfoList); i++ { - - if m.ReplicaInfoList[i] != nil { - - if swag.IsZero(m.ReplicaInfoList[i]) { // not required - return nil - } - - if err := m.ReplicaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileSnapshotInformation) contextValidateSnapshot(ctx context.Context, formats strfmt.Registry) error { - - if m.Snapshot != nil { - - if swag.IsZero(m.Snapshot) { // not required - return nil - } - - if err := m.Snapshot.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshot") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileSnapshotInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSnapshotInformation) UnmarshalBinary(b []byte) error { - var res FileSnapshotInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_stat_info.go b/v1/models/file_stat_info.go deleted file mode 100644 index 9f76e3aa..00000000 --- a/v1/models/file_stat_info.go +++ /dev/null @@ -1,125 +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" -) - -// FileStatInfo Represents fstat result on a file. -// -// swagger:model FileStatInfo -type FileStatInfo struct { - - // Source inode id metadata for certain adapters e.g. Netapp. - BackupSourceInodeID *int64 `json:"backupSourceInodeId,omitempty"` - - // If this is a file, the mtime as returned by stat. - MtimeUsecs *int64 `json:"mtimeUsecs,omitempty"` - - // Metadata for the sharepoint item in browse. This will be set only if we - // are quering for sharepoint site. This is used to further different between - // item types, for example a kDirectory item in sharepoint site could be a - // Document library (kSiteDoclib), list (kSiteList) or folder (kDirectory). - SharepointItemMetadata *SharepointItemMetadata `json:"sharepointItemMetadata,omitempty"` - - // If this is a file, the size of the file as returned by stat. - Size *int64 `json:"size,omitempty"` - - // The type of this entity. This field will not be populated for ReadDir - // results, since the DirEntry already contains the type information. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this file stat info -func (m *FileStatInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharepointItemMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStatInfo) validateSharepointItemMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointItemMetadata) { // not required - return nil - } - - if m.SharepointItemMetadata != nil { - if err := m.SharepointItemMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointItemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointItemMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file stat info based on the context it is used -func (m *FileStatInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharepointItemMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStatInfo) contextValidateSharepointItemMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointItemMetadata != nil { - - if swag.IsZero(m.SharepointItemMetadata) { // not required - return nil - } - - if err := m.SharepointItemMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointItemMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointItemMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileStatInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStatInfo) UnmarshalBinary(b []byte) error { - var res FileStatInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_stat_result.go b/v1/models/file_stat_result.go deleted file mode 100644 index d2c18223..00000000 --- a/v1/models/file_stat_result.go +++ /dev/null @@ -1,212 +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" -) - -// FileStatResult Response for a FileStat call. -// -// swagger:model FileStatResult -type FileStatResult struct { - - // Cookie that need to be send while browsing the vm, this should be same as - // what is passed in VMVolumeInfoResult. - BrowsingCookie *VMBrowsingCookie `json:"browsingCookie,omitempty"` - - // Status code. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Stat information for the file. - FstatInfo *FileStatInfo `json:"fstatInfo,omitempty"` -} - -// Validate validates this file stat result -func (m *FileStatResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBrowsingCookie(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFstatInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStatResult) validateBrowsingCookie(formats strfmt.Registry) error { - if swag.IsZero(m.BrowsingCookie) { // not required - return nil - } - - if m.BrowsingCookie != nil { - if err := m.BrowsingCookie.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("browsingCookie") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("browsingCookie") - } - return err - } - } - - return nil -} - -func (m *FileStatResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *FileStatResult) validateFstatInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if m.FstatInfo != nil { - if err := m.FstatInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file stat result based on the context it is used -func (m *FileStatResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBrowsingCookie(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFstatInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStatResult) contextValidateBrowsingCookie(ctx context.Context, formats strfmt.Registry) error { - - if m.BrowsingCookie != nil { - - if swag.IsZero(m.BrowsingCookie) { // not required - return nil - } - - if err := m.BrowsingCookie.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("browsingCookie") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("browsingCookie") - } - return err - } - } - - return nil -} - -func (m *FileStatResult) 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 -} - -func (m *FileStatResult) contextValidateFstatInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FstatInfo != nil { - - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if err := m.FstatInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileStatResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStatResult) UnmarshalBinary(b []byte) error { - var res FileStatResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_stubbing_params.go b/v1/models/file_stubbing_params.go deleted file mode 100644 index 00226f8d..00000000 --- a/v1/models/file_stubbing_params.go +++ /dev/null @@ -1,543 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileStubbingParams File Stubbing Parameters -// Message to capture the additional stubbing params for a file-based -// environment. -// -// swagger:model FileStubbingParams -type FileStubbingParams struct { - - // File access time buckets. - AccessTimeBuckets []*NasAnalysisJobParamsAccessTimeBucket `json:"accessTimeBuckets"` - - // Identifies the cold files in the NAS source. Files that haven't been - // accessed/modified in the last cold_file_window msecs or are older than - // cold_window_msecs are migrated. - ColdFileWindow *int64 `json:"coldFileWindow,omitempty"` - - // Delete migrated data if no symlink at source is pointing to it. - DeleteOrphanData *bool `json:"deleteOrphanData,omitempty"` - - // Denied file type buckets. This is list is mutually exclusive of allowed - // buckets. This is used only when allowed buckets contain 'Other-*' bucket - // in which case we will have to deny all the extensions which are not - // present allowed buckets. This field is only used for communication between - // master and slave. Iris only uses the 'file_type_buckets' field. - DeniedFileTypeBuckets []*NasAnalysisJobParamsFileTypeBucket `json:"deniedFileTypeBuckets"` - - // Audit log the file tiering activity. - EnableAuditLogging *bool `json:"enableAuditLogging,omitempty"` - - // Enable checksum verification for downtier job. - EnableChecksumVerification *bool `json:"enableChecksumVerification,omitempty"` - - // File migrate policy based on file access/modify time and age. Depcrecated. - FileSelectPolicy *int32 `json:"fileSelectPolicy,omitempty"` - - // Gives the size criteria to be used for selecting the files to be migrated. - // The cold files that are equal and greater than file_size or - // smaller than file_size are migrated. - FileSize *int64 `json:"fileSize,omitempty"` - - // File size buckets. - FileSizeBuckets []*NasAnalysisJobParamsFileSizeBucket `json:"fileSizeBuckets"` - - // File size policy for selecting files to migrate. Depcrecated. - FileSizePolicy *int32 `json:"fileSizePolicy,omitempty"` - - // Allowed file type buckets. - FileTypeBuckets []*NasAnalysisJobParamsFileTypeBucket `json:"fileTypeBuckets"` - - // The filtering policy to decide which objects within a source should be - // stubbed. If this is not specified, then all the objects within the - // source will be migrated based on the migration policy. - // We use the filtering_policy in NasBackupParams. So this field is - // deprecated. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // Migrate data without stub. - MigrateWithoutStub *bool `json:"migrateWithoutStub,omitempty"` - - // File modification time buckets. - ModTimeBuckets []*NasAnalysisJobParamsModTimeBucket `json:"modTimeBuckets"` - - // Mount path where the Cohesity target view must be mounted on all - // NFS clients for accessing the migrated data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // nfs_mount_path_prefix contains the parent directory path where respective - // view name will be suffixed to form a complete mount path where Cohesity - // target view will be mounted on NFS clients for accessing the migrated - // data. - NfsMountPathPrefix *string `json:"nfsMountPathPrefix,omitempty"` - - // The object's entity id to TargetViewData map where the data will be - // migrated. - TargetViewMap []*FileStubbingParamsTargetViewMapEntry `json:"targetViewMap"` - - // The target view name to which the data will be migrated. - TargetViewName *string `json:"targetViewName,omitempty"` - - // target_view_prefix is used to support multiple objects in a single - // tiering job. It helps in generating view name which are reasonably - // close to the original share name. - TargetViewPrefix *string `json:"targetViewPrefix,omitempty"` - - // Tiering Goal, i.e. the maximum amount of data that should be present - // on source after downtiering. - TieringGoal *int64 `json:"tieringGoal,omitempty"` -} - -// Validate validates this file stubbing params -func (m *FileStubbingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessTimeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeniedFileTypeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSizeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileTypeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateModTimeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetViewMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStubbingParams) validateAccessTimeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.AccessTimeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.AccessTimeBuckets); i++ { - if swag.IsZero(m.AccessTimeBuckets[i]) { // not required - continue - } - - if m.AccessTimeBuckets[i] != nil { - if err := m.AccessTimeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) validateDeniedFileTypeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.DeniedFileTypeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.DeniedFileTypeBuckets); i++ { - if swag.IsZero(m.DeniedFileTypeBuckets[i]) { // not required - continue - } - - if m.DeniedFileTypeBuckets[i] != nil { - if err := m.DeniedFileTypeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deniedFileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deniedFileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) validateFileSizeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.FileSizeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.FileSizeBuckets); i++ { - if swag.IsZero(m.FileSizeBuckets[i]) { // not required - continue - } - - if m.FileSizeBuckets[i] != nil { - if err := m.FileSizeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) validateFileTypeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.FileTypeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.FileTypeBuckets); i++ { - if swag.IsZero(m.FileTypeBuckets[i]) { // not required - continue - } - - if m.FileTypeBuckets[i] != nil { - if err := m.FileTypeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *FileStubbingParams) validateModTimeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.ModTimeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.ModTimeBuckets); i++ { - if swag.IsZero(m.ModTimeBuckets[i]) { // not required - continue - } - - if m.ModTimeBuckets[i] != nil { - if err := m.ModTimeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) validateTargetViewMap(formats strfmt.Registry) error { - if swag.IsZero(m.TargetViewMap) { // not required - return nil - } - - for i := 0; i < len(m.TargetViewMap); i++ { - if swag.IsZero(m.TargetViewMap[i]) { // not required - continue - } - - if m.TargetViewMap[i] != nil { - if err := m.TargetViewMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file stubbing params based on the context it is used -func (m *FileStubbingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAccessTimeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeniedFileTypeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileSizeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileTypeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateModTimeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetViewMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStubbingParams) contextValidateAccessTimeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AccessTimeBuckets); i++ { - - if m.AccessTimeBuckets[i] != nil { - - if swag.IsZero(m.AccessTimeBuckets[i]) { // not required - return nil - } - - if err := m.AccessTimeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) contextValidateDeniedFileTypeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeniedFileTypeBuckets); i++ { - - if m.DeniedFileTypeBuckets[i] != nil { - - if swag.IsZero(m.DeniedFileTypeBuckets[i]) { // not required - return nil - } - - if err := m.DeniedFileTypeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deniedFileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deniedFileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) contextValidateFileSizeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileSizeBuckets); i++ { - - if m.FileSizeBuckets[i] != nil { - - if swag.IsZero(m.FileSizeBuckets[i]) { // not required - return nil - } - - if err := m.FileSizeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) contextValidateFileTypeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileTypeBuckets); i++ { - - if m.FileTypeBuckets[i] != nil { - - if swag.IsZero(m.FileTypeBuckets[i]) { // not required - return nil - } - - if err := m.FileTypeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *FileStubbingParams) contextValidateModTimeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ModTimeBuckets); i++ { - - if m.ModTimeBuckets[i] != nil { - - if swag.IsZero(m.ModTimeBuckets[i]) { // not required - return nil - } - - if err := m.ModTimeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileStubbingParams) contextValidateTargetViewMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TargetViewMap); i++ { - - if m.TargetViewMap[i] != nil { - - if swag.IsZero(m.TargetViewMap[i]) { // not required - return nil - } - - if err := m.TargetViewMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileStubbingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStubbingParams) UnmarshalBinary(b []byte) error { - var res FileStubbingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_stubbing_params_target_view_data.go b/v1/models/file_stubbing_params_target_view_data.go deleted file mode 100644 index d812d3c5..00000000 --- a/v1/models/file_stubbing_params_target_view_data.go +++ /dev/null @@ -1,54 +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" -) - -// FileStubbingParamsTargetViewData file stubbing params target view data -// -// swagger:model FileStubbingParams_TargetViewData -type FileStubbingParamsTargetViewData struct { - - // Mount path where the Cohesity target view must be mounted on all - // NFS clients for accessing the migrated data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // The target view name to which the data will be migrated. - TargetViewName *string `json:"targetViewName,omitempty"` -} - -// Validate validates this file stubbing params target view data -func (m *FileStubbingParamsTargetViewData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file stubbing params target view data based on context it is used -func (m *FileStubbingParamsTargetViewData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileStubbingParamsTargetViewData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStubbingParamsTargetViewData) UnmarshalBinary(b []byte) error { - var res FileStubbingParamsTargetViewData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_stubbing_params_target_view_map_entry.go b/v1/models/file_stubbing_params_target_view_map_entry.go deleted file mode 100644 index fb3468d6..00000000 --- a/v1/models/file_stubbing_params_target_view_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// FileStubbingParamsTargetViewMapEntry file stubbing params target view map entry -// -// swagger:model FileStubbingParams_TargetViewMapEntry -type FileStubbingParamsTargetViewMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *FileStubbingParamsTargetViewData `json:"value,omitempty"` -} - -// Validate validates this file stubbing params target view map entry -func (m *FileStubbingParamsTargetViewMapEntry) 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 -} - -func (m *FileStubbingParamsTargetViewMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file stubbing params target view map entry based on the context it is used -func (m *FileStubbingParamsTargetViewMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileStubbingParamsTargetViewMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileStubbingParamsTargetViewMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStubbingParamsTargetViewMapEntry) UnmarshalBinary(b []byte) error { - var res FileStubbingParamsTargetViewMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_system_info.go b/v1/models/file_system_info.go deleted file mode 100644 index ed3c433e..00000000 --- a/v1/models/file_system_info.go +++ /dev/null @@ -1,133 +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" -) - -// FileSystemInfo Proto that contains specific information about a file system. -// -// swagger:model FileSystemInfo -type FileSystemInfo struct { - - // The creation time in msecs of the file system. - CreationTimeMsecs *int64 `json:"creationTimeMsecs,omitempty"` - - // The total capacity in bytes of this file system. - LogicalCapacityBytes *int64 `json:"logicalCapacityBytes,omitempty"` - - // The file system's logical space usage in bytes. - LogicalUsageInBytes *int64 `json:"logicalUsageInBytes,omitempty"` - - // Information about a NFS export. Only valid if this file system is exposed - // through NFS protocol. - NfsInfo *NfsInfo `json:"nfsInfo,omitempty"` - - // Whether the .snapshot directory is enabled on the file system. Only if it - // is enabled we can backup this file system. - SnapshotDirEnabled *bool `json:"snapshotDirEnabled,omitempty"` - - // List of protocols enabled on this file system. - SupportedProtocolVec []int32 `json:"supportedProtocolVec"` - - // The file system's total physical space usage (including snapshots) in - // bytes. - TotalPhysicalUsageInBytes *int64 `json:"totalPhysicalUsageInBytes,omitempty"` - - // The file system' physical space usage (excluding snapshots) in bytes. - UniqueUsageInBytes *int64 `json:"uniqueUsageInBytes,omitempty"` -} - -// Validate validates this file system info -func (m *FileSystemInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSystemInfo) validateNfsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if m.NfsInfo != nil { - if err := m.NfsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file system info based on the context it is used -func (m *FileSystemInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNfsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileSystemInfo) contextValidateNfsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsInfo != nil { - - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if err := m.NfsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileSystemInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSystemInfo) UnmarshalBinary(b []byte) error { - var res FileSystemInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_uptiering_params.go b/v1/models/file_uptiering_params.go deleted file mode 100644 index 9d934932..00000000 --- a/v1/models/file_uptiering_params.go +++ /dev/null @@ -1,158 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileUptieringParams File Uptiering Parameters for NAS migration. -// -// swagger:model FileUptieringParams -type FileUptieringParams struct { - - // If enabled, audit log the files which are uptiered. - EnableAuditLogging *bool `json:"enableAuditLogging,omitempty"` - - // File uptier policy based on file access/modify time. - FileSelectPolicy *int32 `json:"fileSelectPolicy,omitempty"` - - // Gives the size criteria to be used for selecting the files to be uptiered. - // The hot files, which are greater or smaller than file_size, are uptiered. - FileSize *int64 `json:"fileSize,omitempty"` - - // File size policy for selecting files to uptier. - FileSizePolicy *int32 `json:"fileSizePolicy,omitempty"` - - // Identifies the hot files in the view. Files which are accessed - // num_file_access times in hot_file_window msecs, are uptiered. It is only - // applicable when file_select_policy is kLastAccessed and num_file_access is - // greater than 1. - HotFileWindow *int64 `json:"hotFileWindow,omitempty"` - - // Mount path where the Cohesity target view is mounted on NFS clients while - // migrating the data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Number of times file must be accessed within hot_file_window in order to - // qualify for uptiering. Applicable only when file_select_policy is - // kLastAccessed. - NumFileAccess *uint32 `json:"numFileAccess,omitempty"` - - // The object's entity id to SourceViewData map from which the data will be - // uptieried. - SourceViewMap []*FileUptieringParamsSourceViewMapEntry `json:"sourceViewMap"` - - // The source view name from which the data will be uptiered. - SourceViewName *string `json:"sourceViewName,omitempty"` - - // If set, all files in the view will be uptiered regardless of - // file_select_policy, num_file_access, hot_file_window, file_size - // constraints. - UptierAllFiles *bool `json:"uptierAllFiles,omitempty"` -} - -// Validate validates this file uptiering params -func (m *FileUptieringParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceViewMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileUptieringParams) validateSourceViewMap(formats strfmt.Registry) error { - if swag.IsZero(m.SourceViewMap) { // not required - return nil - } - - for i := 0; i < len(m.SourceViewMap); i++ { - if swag.IsZero(m.SourceViewMap[i]) { // not required - continue - } - - if m.SourceViewMap[i] != nil { - if err := m.SourceViewMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file uptiering params based on the context it is used -func (m *FileUptieringParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceViewMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileUptieringParams) contextValidateSourceViewMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceViewMap); i++ { - - if m.SourceViewMap[i] != nil { - - if swag.IsZero(m.SourceViewMap[i]) { // not required - return nil - } - - if err := m.SourceViewMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceViewMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceViewMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileUptieringParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileUptieringParams) UnmarshalBinary(b []byte) error { - var res FileUptieringParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_uptiering_params_source_view_data.go b/v1/models/file_uptiering_params_source_view_data.go deleted file mode 100644 index 5ccaa510..00000000 --- a/v1/models/file_uptiering_params_source_view_data.go +++ /dev/null @@ -1,54 +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" -) - -// FileUptieringParamsSourceViewData file uptiering params source view data -// -// swagger:model FileUptieringParams_SourceViewData -type FileUptieringParamsSourceViewData struct { - - // Mount path where the Cohesity view must be mounted on all NFS clients - // while migrating the data. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // The source view name from which the data will be uptiered. - SourceViewName *string `json:"sourceViewName,omitempty"` -} - -// Validate validates this file uptiering params source view data -func (m *FileUptieringParamsSourceViewData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file uptiering params source view data based on context it is used -func (m *FileUptieringParamsSourceViewData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileUptieringParamsSourceViewData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileUptieringParamsSourceViewData) UnmarshalBinary(b []byte) error { - var res FileUptieringParamsSourceViewData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_uptiering_params_source_view_map_entry.go b/v1/models/file_uptiering_params_source_view_map_entry.go deleted file mode 100644 index 4f4ad13f..00000000 --- a/v1/models/file_uptiering_params_source_view_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// FileUptieringParamsSourceViewMapEntry file uptiering params source view map entry -// -// swagger:model FileUptieringParams_SourceViewMapEntry -type FileUptieringParamsSourceViewMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *FileUptieringParamsSourceViewData `json:"value,omitempty"` -} - -// Validate validates this file uptiering params source view map entry -func (m *FileUptieringParamsSourceViewMapEntry) 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 -} - -func (m *FileUptieringParamsSourceViewMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file uptiering params source view map entry based on the context it is used -func (m *FileUptieringParamsSourceViewMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileUptieringParamsSourceViewMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileUptieringParamsSourceViewMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileUptieringParamsSourceViewMapEntry) UnmarshalBinary(b []byte) error { - var res FileUptieringParamsSourceViewMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/file_version.go b/v1/models/file_version.go deleted file mode 100644 index 06cc6771..00000000 --- a/v1/models/file_version.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileVersion File/Folder Version. -// -// Specifies information about a single file or folder. -// -// swagger:model FileVersion -type FileVersion struct { - - // Specifies the time when the file or folder was last modified. - // Specified as a Unix epoch Timestamp (in microseconds). - ModifiedTimeUsecs *int64 `json:"modifiedTimeUsecs,omitempty"` - - // Specifies the size of the file or folder (in bytes) - // from the most recent snapshot. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Array of Snapshots. - // - // Specifies the available snapshots of the file or folder. When a Job Run - // executes, it captures a snapshot of object (such as a VM) - // that contains the file or folder. - Snapshots []*SnapshotAttempt `json:"snapshots"` -} - -// Validate validates this file version -func (m *FileVersion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileVersion) validateSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshots) { // not required - return nil - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this file version based on the context it is used -func (m *FileVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileVersion) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileVersion) UnmarshalBinary(b []byte) error { - var res FileVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/filename_pattern_to_directory.go b/v1/models/filename_pattern_to_directory.go deleted file mode 100644 index 2967d9e7..00000000 --- a/v1/models/filename_pattern_to_directory.go +++ /dev/null @@ -1,57 +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" -) - -// FilenamePatternToDirectory Filename Pattern to Directory. -// -// Specifies a filename pattern and the directory path where to keep files -// matching that pattern. -// -// swagger:model FilenamePatternToDirectory -type FilenamePatternToDirectory struct { - - // Specifies the directory where to keep the files matching the pattern. - Directory *string `json:"directory,omitempty"` - - // Specifies a pattern to be matched with filenames. This can be a - // regex expression. - FilenamePattern *string `json:"filenamePattern,omitempty"` -} - -// Validate validates this filename pattern to directory -func (m *FilenamePatternToDirectory) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filename pattern to directory based on context it is used -func (m *FilenamePatternToDirectory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilenamePatternToDirectory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilenamePatternToDirectory) UnmarshalBinary(b []byte) error { - var res FilenamePatternToDirectory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/filer_audit_log_configuration.go b/v1/models/filer_audit_log_configuration.go deleted file mode 100644 index 250175b0..00000000 --- a/v1/models/filer_audit_log_configuration.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" - "github.com/go-openapi/validate" -) - -// FilerAuditLogConfiguration Filer Audit Log Configuration. -// -// Specifies the settings of the filer audit log configuration. -// -// swagger:model FilerAuditLogConfiguration -type FilerAuditLogConfiguration struct { - - // Specifies if filer audit logging is enabled on the Cohesity Cluster. - // If 'true', filer audit logging is enabled. Otherwise, it is disabled. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the number of days to keep (retain) the filer audit logs. - // Audit logs generated before the period of time specified by - // retentionPeriodDays are removed from the Cohesity Cluster. - // Required: true - RetentionPeriodDays *int32 `json:"retentionPeriodDays"` -} - -// Validate validates this filer audit log configuration -func (m *FilerAuditLogConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPeriodDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerAuditLogConfiguration) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *FilerAuditLogConfiguration) validateRetentionPeriodDays(formats strfmt.Registry) error { - - if err := validate.Required("retentionPeriodDays", "body", m.RetentionPeriodDays); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this filer audit log configuration based on context it is used -func (m *FilerAuditLogConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilerAuditLogConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerAuditLogConfiguration) UnmarshalBinary(b []byte) error { - var res FilerAuditLogConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/files_and_folders_info.go b/v1/models/files_and_folders_info.go deleted file mode 100644 index 381efd9f..00000000 --- a/v1/models/files_and_folders_info.go +++ /dev/null @@ -1,56 +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" -) - -// FilesAndFoldersInfo File and Folders Information. -// -// FilesAndFolders specifies the metadata information about the files and(or) -// folders for creating a download task. -// -// swagger:model FilesAndFoldersInfo -type FilesAndFoldersInfo struct { - - // AbsolutePath specifies the absolute path of the specified file or folder. - AbsolutePath *string `json:"absolutePath,omitempty"` - - // IsDirectory specifies if specified object is a directory or not. - IsDirectory *bool `json:"isDirectory,omitempty"` -} - -// Validate validates this files and folders info -func (m *FilesAndFoldersInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this files and folders info based on context it is used -func (m *FilesAndFoldersInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilesAndFoldersInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesAndFoldersInfo) UnmarshalBinary(b []byte) error { - var res FilesAndFoldersInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/files_to_directory_mapping.go b/v1/models/files_to_directory_mapping.go deleted file mode 100644 index 18df63f3..00000000 --- a/v1/models/files_to_directory_mapping.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" -) - -// FilesToDirectoryMapping A message that specifes files and their corresponding direcory. -// -// swagger:model FilesToDirectoryMapping -type FilesToDirectoryMapping struct { - - // Source file name. The file name can be a regex matching source files. - FilePattern *string `json:"filePattern,omitempty"` - - // Target directtory for the source file pattern. - TargetDirectory *string `json:"targetDirectory,omitempty"` -} - -// Validate validates this files to directory mapping -func (m *FilesToDirectoryMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this files to directory mapping based on context it is used -func (m *FilesToDirectoryMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilesToDirectoryMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesToDirectoryMapping) UnmarshalBinary(b []byte) error { - var res FilesToDirectoryMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fileset_info.go b/v1/models/fileset_info.go deleted file mode 100644 index 4fb30b81..00000000 --- a/v1/models/fileset_info.go +++ /dev/null @@ -1,90 +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" -) - -// FilesetInfo Message to encapsulate information about a fileset. -// -// Within the GPFS file systems one can define filesets, which are treated as -// subdirectories within the file system. Filesets are groupings of files. -// Filesets are quite similar to volumes and can be treated as independent -// entities. They can have snapshots, quota, permissions of their own. -// -// swagger:model FilesetInfo -type FilesetInfo struct { - - // Name of the filesystem associated with this fileset. Keeping this - // separately so that we do not have to parse the path while creating a - // CreateFilesetSnapshot request to get the filesystem. - FilesystemName *string `json:"filesystemName,omitempty"` - - // Unique identifier for the file set which doesn't change for a fileset even - // after gpfs cluster upgrade. It is file system uuid appended to fileset id. - Fsid *string `json:"fsid,omitempty"` - - // The fileset identifier. Field is deprecated because this field is set to - // oid Field of the fileset which is known to change when the gpfs cluster - // upgrades. - ID *uint64 `json:"id,omitempty"` - - // If the given fileset is an Independent fileset or not. - // GPFS does not support fileset level snapshots for dependent filesets but - // only for independent filesets. - // Dependent filesets: Inode space is inherited from the file system or - // independent fileset to which the fileset belongs. Currently we do not - // support nested filesets. - // Ref: https://www.ibm.com/support/knowledgecenter/STXKQY_4.2.1/ - // com.ibm.spectrum.scale.v4r21.doc/bl1hlp_filesfilesets.htm - IsIndependentFileset *bool `json:"isIndependentFileset,omitempty"` - - // The absolute path of the fileset. - Path *string `json:"path,omitempty"` - - // GPFS supports NFS, SMB2, SMB3 and does not support SMB3.1. - // List of protocols enabled on this fileset. - SupportedProtocolVec []int32 `json:"supportedProtocolVec"` - - // Use fsid as entity hash comparator. - UseFsidAsHashComparator *bool `json:"useFsidAsHashComparator,omitempty"` - - // If set to true, path will be used for uniqueness for fileset in entity - // comparator. - UsePathEntityHashComparator *bool `json:"usePathEntityHashComparator,omitempty"` -} - -// Validate validates this fileset info -func (m *FilesetInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fileset info based on context it is used -func (m *FilesetInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilesetInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesetInfo) UnmarshalBinary(b []byte) error { - var res FilesetInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/filesystem_info.go b/v1/models/filesystem_info.go deleted file mode 100644 index b02d3e21..00000000 --- a/v1/models/filesystem_info.go +++ /dev/null @@ -1,64 +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" -) - -// FilesystemInfo Message to encapsulate information about a file system which is hosted by a -// GPFS server. GPFS Servers can host multiple file systems. -// File systems are supported by one or more network shared disks (NSDs). -// -// swagger:model FilesystemInfo -type FilesystemInfo struct { - - // The total capacity in bytes of this filesystem. - CapacityBytes *uint64 `json:"capacityBytes,omitempty"` - - // Globally unique ID of the filesystem. - // TODO(Kavita): Make sure this is an immutable ID that will not change when - // the filesystem is migrated to a different host. Otherwise it might lead to - // issues. - ID *string `json:"id,omitempty"` - - // The default mount point of the filesystem. - Path *string `json:"path,omitempty"` - - // The used space in bytes of this filesystem. - UsedBytes *uint64 `json:"usedBytes,omitempty"` -} - -// Validate validates this filesystem info -func (m *FilesystemInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filesystem info based on context it is used -func (m *FilesystemInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilesystemInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesystemInfo) UnmarshalBinary(b []byte) error { - var res FilesystemInfo - 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 deleted file mode 100644 index 974a04d3..00000000 --- a/v1/models/filesystem_volume.go +++ /dev/null @@ -1,258 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FilesystemVolume Filesystem Volume. -// -// Specifies information about a filesystem volume. -// -// swagger:model FilesystemVolume -type FilesystemVolume struct { - - // Array of Disks and Partitions. - // - // Specifies information about all the disks and partitions needed to - // mount this logical volume. - Disks []*Disk `json:"disks"` - - // Specifies a description about the filesystem. - DisplayName *string `json:"displayName,omitempty"` - - // Specifies type of the filesystem on this volume. - FilesystemType *string `json:"filesystemType,omitempty"` - - // Specifies the uuid of the filesystem. - FilesystemUUID *string `json:"filesystemUuid,omitempty"` - - // If true, this is a supported filesystem volume type. - IsSupported *bool `json:"isSupported,omitempty"` - - // logical volume - LogicalVolume *FilesystemVolumeLogicalVolume `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 - // mounting the only one partition present on the disk. - // 'kLVM' indicates a logical volume on Linux managed by a Logical Volume - // Manager. In order to access the data, deviceTree must be created based - // on the specification in logicalVolume.deviceTree. - // 'kLDM' indicates a logical volume on Windows managed by Logical Disk - // Manager. - // Enum: ["kSimpleVolume","kLVM","kLDM"] - LogicalVolumeType *string `json:"logicalVolumeType,omitempty"` - - // Specifies the name of the volume such as /C. - Name *string `json:"name,omitempty"` - - // VolumeGuid is the Volume guid. - // This is populated for kPhysical environments. - VolumeGUID *string `json:"volumeGuid,omitempty"` -} - -// Validate validates this filesystem volume -func (m *FilesystemVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalVolume(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalVolumeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesystemVolume) validateDisks(formats strfmt.Registry) error { - if swag.IsZero(m.Disks) { // not required - return nil - } - - for i := 0; i < len(m.Disks); i++ { - if swag.IsZero(m.Disks[i]) { // not required - continue - } - - if m.Disks[i] != nil { - if err := m.Disks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilesystemVolume) validateLogicalVolume(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalVolume) { // not required - 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 -} - -var filesystemVolumeTypeLogicalVolumeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSimpleVolume","kLVM","kLDM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filesystemVolumeTypeLogicalVolumeTypePropEnum = append(filesystemVolumeTypeLogicalVolumeTypePropEnum, v) - } -} - -const ( - - // FilesystemVolumeLogicalVolumeTypeKSimpleVolume captures enum value "kSimpleVolume" - FilesystemVolumeLogicalVolumeTypeKSimpleVolume string = "kSimpleVolume" - - // FilesystemVolumeLogicalVolumeTypeKLVM captures enum value "kLVM" - FilesystemVolumeLogicalVolumeTypeKLVM string = "kLVM" - - // FilesystemVolumeLogicalVolumeTypeKLDM captures enum value "kLDM" - FilesystemVolumeLogicalVolumeTypeKLDM string = "kLDM" -) - -// prop value enum -func (m *FilesystemVolume) validateLogicalVolumeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filesystemVolumeTypeLogicalVolumeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilesystemVolume) validateLogicalVolumeType(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalVolumeType) { // not required - return nil - } - - // value enum - if err := m.validateLogicalVolumeTypeEnum("logicalVolumeType", "body", *m.LogicalVolumeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this filesystem volume based on the context it is used -func (m *FilesystemVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesystemVolume) contextValidateDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Disks); i++ { - - if m.Disks[i] != nil { - - if swag.IsZero(m.Disks[i]) { // not required - return nil - } - - if err := m.Disks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *FilesystemVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesystemVolume) UnmarshalBinary(b []byte) error { - var res FilesystemVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/filter_ip_config.go b/v1/models/filter_ip_config.go deleted file mode 100644 index f4c068c5..00000000 --- a/v1/models/filter_ip_config.go +++ /dev/null @@ -1,56 +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" -) - -// FilterIPConfig Specifies the list of IP addresses that are allowed or denied at the job -// level. Allowed IPs and Denied IPs cannot be used together. -// -// swagger:model FilterIpConfig -type FilterIPConfig struct { - - // Specifies the IP addresses that should be used exclusively at the job - // level. Cannot be set if deniedIpAddresses is set. - AllowedIPAddresses []string `json:"allowedIpAddresses"` - - // Specifies the IP addresses that should not be used at the job level. - // Cannot be set if allowedIpAddresses is set. - DeniedIPAddresses []string `json:"deniedIpAddresses"` -} - -// Validate validates this filter Ip config -func (m *FilterIPConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filter Ip config based on context it is used -func (m *FilterIPConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilterIPConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilterIPConfig) UnmarshalBinary(b []byte) error { - var res FilterIPConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/filtering_policy_proto.go b/v1/models/filtering_policy_proto.go deleted file mode 100644 index c04e911e..00000000 --- a/v1/models/filtering_policy_proto.go +++ /dev/null @@ -1,67 +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" -) - -// FilteringPolicyProto Filtering Policy Proto. -// -// Proto to encapsulate the filtering policy for backup objects like files or -// directories. If an object is not matched by any of the 'allow_filters', it -// will be excluded in the backup. If an object is matched by one of the -// 'deny_filters', it will always be excluded in the backup. Basically -// 'deny_filters' overwrite 'allow_filters' if they both match the same object. -// Currently we only support two kinds of filter: prefix which always starts -// with '/', or postfix which always starts with '*' (cannot be "*" only). We -// don't support regular expression right now. -// A concrete example is: -// Allow filters: "/" -// Deny filters: "/tmp", "*.mp4" -// Using such a policy will include everything under the root directory except -// the /tmp directory and all the mp4 files. -// -// swagger:model FilteringPolicyProto -type FilteringPolicyProto struct { - - // List of filters to allow matched objects for backup. - AllowFilters []string `json:"allowFilters"` - - // List of filters to deny matched objects for backup. - DenyFilters []string `json:"denyFilters"` -} - -// Validate validates this filtering policy proto -func (m *FilteringPolicyProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filtering policy proto based on context it is used -func (m *FilteringPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilteringPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilteringPolicyProto) UnmarshalBinary(b []byte) error { - var res FilteringPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fixed_unix_id_mapping.go b/v1/models/fixed_unix_id_mapping.go deleted file mode 100644 index f51129ef..00000000 --- a/v1/models/fixed_unix_id_mapping.go +++ /dev/null @@ -1,56 +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" -) - -// FixedUnixIDMapping Fixed Unix ID Mapping. -// -// Specifies the fields when mapping type is set to 'kFixed'. It maps all -// Active Directory users of a domain to a fixed Unix uid, and gid. -// -// swagger:model FixedUnixIdMapping -type FixedUnixIDMapping struct { - - // Specifies the fixed Unix GID, when mapping type is set to kFixed. - Gid *int64 `json:"gid,omitempty"` - - // Specifies the fixed Unix UID, when mapping type is set to kFixed. - UID *int64 `json:"uid,omitempty"` -} - -// Validate validates this fixed unix Id mapping -func (m *FixedUnixIDMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fixed unix Id mapping based on context it is used -func (m *FixedUnixIDMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FixedUnixIDMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FixedUnixIDMapping) UnmarshalBinary(b []byte) error { - var res FixedUnixIDMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/flash_blade_file_system.go b/v1/models/flash_blade_file_system.go deleted file mode 100644 index e149028d..00000000 --- a/v1/models/flash_blade_file_system.go +++ /dev/null @@ -1,187 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FlashBladeFileSystem Flash Blade File System. -// -// Specifies information about a Flash Blade File System in a Storage Array. -// -// swagger:model FlashBladeFileSystem -type FlashBladeFileSystem struct { - - // Specifies whether the .snapshot directory exists on the file system. - // Backup is enabled only if the directory exists. - BackupEnabled *bool `json:"backupEnabled,omitempty"` - - // Specifies the time when the filesystem was created in Unix epoch time - // in milliseconds. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the total capacity in bytes of the file system. - LogicalCapacityBytes *int64 `json:"logicalCapacityBytes,omitempty"` - - // Specifies the size of logical data currently represented on the - // file system in bytes. - LogicalUsedBytes *int64 `json:"logicalUsedBytes,omitempty"` - - // Specifies information about an NFS export. This field is set if the file - // system supports protocol type 'kNfs'. - NfsInfo *FlashBladeNfsInfo `json:"nfsInfo,omitempty"` - - // Specifies the size of physical data currently consumed by the file - // system. This includes the space used for the snapshots. - PhysicalUsedBytes *int64 `json:"physicalUsedBytes,omitempty"` - - // List of Protocols. - // - // Specifies the list of protocols enabled on the file system. - // 'kNfs' indicates NFS exports are supported on Pure FlashBlade File System. - // 'kCifs2' indicates CIFS/SMB Shares are supported on Pure FlashBlade File - // System. - // 'kHttp' indicates object protocol over HTTP and HTTPS are supported. - Protocols []string `json:"protocols"` - - // Specifies the size of physical data consumed by the file system - // itself not including the size of the snapshots. - UniqueUsedBytes *int64 `json:"uniqueUsedBytes,omitempty"` -} - -// Validate validates this flash blade file system -func (m *FlashBladeFileSystem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeFileSystem) validateNfsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if m.NfsInfo != nil { - if err := m.NfsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -var flashBladeFileSystemProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs2","kHttp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashBladeFileSystemProtocolsItemsEnum = append(flashBladeFileSystemProtocolsItemsEnum, v) - } -} - -func (m *FlashBladeFileSystem) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashBladeFileSystemProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashBladeFileSystem) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this flash blade file system based on the context it is used -func (m *FlashBladeFileSystem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNfsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeFileSystem) contextValidateNfsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsInfo != nil { - - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if err := m.NfsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeFileSystem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeFileSystem) UnmarshalBinary(b []byte) error { - var res FlashBladeFileSystem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/flash_blade_network_interface.go b/v1/models/flash_blade_network_interface.go deleted file mode 100644 index 86dd3f80..00000000 --- a/v1/models/flash_blade_network_interface.go +++ /dev/null @@ -1,58 +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" -) - -// FlashBladeNetworkInterface Flash Blade Network Interface. -// -// Specifies network interface detail of a Flash Blade Storage Array. -// -// swagger:model FlashBladeNetworkInterface -type FlashBladeNetworkInterface struct { - - // Specifies the IP address of the Pure Storage FlashBlade Array. - IPAddress *string `json:"ipAddress,omitempty"` - - // Specifies the name of the network interface. - Name *string `json:"name,omitempty"` - - // Specifies the id of the VLAN network of the Pure Storage FlashBlade Array. - Vlan *int32 `json:"vlan,omitempty"` -} - -// Validate validates this flash blade network interface -func (m *FlashBladeNetworkInterface) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this flash blade network interface based on context it is used -func (m *FlashBladeNetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeNetworkInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeNetworkInterface) UnmarshalBinary(b []byte) error { - var res FlashBladeNetworkInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/flash_blade_nfs_info.go b/v1/models/flash_blade_nfs_info.go deleted file mode 100644 index 71bf8b6d..00000000 --- a/v1/models/flash_blade_nfs_info.go +++ /dev/null @@ -1,67 +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" -) - -// FlashBladeNfsInfo Flash Blade NFS Information. -// -// Specifies information specific to NFS protocol exposed by Pure Flash Blade -// file system. -// -// swagger:model FlashBladeNfsInfo -type FlashBladeNfsInfo struct { - - // Specifies NFS protocol export rules. Rules are in the form host(options). - // host represents one of the following categories: - // - // IP address in the form ddd.ddd.ddd.ddd for IPv4, or - // xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx for IPv6. - // - // Netmask in the form ddd.ddd.ddd.ddd/dd for IPv4, or - // xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx for IPv6. - // - // Wildcard in the form * to represent all clients - // - // options in parenthesis represents a comma-separated list of NFS export - // options. - // Valid export options are rw, ro, root_squash, no_root_squash, and - // fileid_32bit. - ExportRules *string `json:"exportRules,omitempty"` -} - -// Validate validates this flash blade nfs info -func (m *FlashBladeNfsInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this flash blade nfs info based on context it is used -func (m *FlashBladeNfsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeNfsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeNfsInfo) UnmarshalBinary(b []byte) error { - var res FlashBladeNfsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/flash_blade_protection_source.go b/v1/models/flash_blade_protection_source.go deleted file mode 100644 index 6dc2155c..00000000 --- a/v1/models/flash_blade_protection_source.go +++ /dev/null @@ -1,223 +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" -) - -// FlashBladeProtectionSource Pure Storage FlashBlade Protection Source. -// -// Specifies a Protection Source in Pure Storage FlashBlade environment. -// -// swagger:model FlashBladeProtectionSource -type FlashBladeProtectionSource struct { - - // Specifies a Pure Storage FlashBlade File System information. - // This is set only when the object type is 'kFileSystem'. - FileSystem *FlashBladeFileSystem `json:"fileSystem,omitempty"` - - // Specifies a unique name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies a Pure Storage FlashBlade Array information. This is set only - // when the object type is 'kStorageArray'. - StorageArray *FlashBladeStorageArray `json:"storageArray,omitempty"` - - // Specifies the type of managed object in a Pure Storage FlashBlade - // like 'kStorageArray' or 'kFileSystem'. - // 'kStorageArray' indicates a top level Pure Storage FlashBlade array. - // 'kFileSystem' indicates a Pure Storage FlashBlade file system within the - // array. - // Enum: ["kStorageArray","kFileSystem"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this flash blade protection source -func (m *FlashBladeProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileSystem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArray(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeProtectionSource) validateFileSystem(formats strfmt.Registry) error { - if swag.IsZero(m.FileSystem) { // not required - return nil - } - - if m.FileSystem != nil { - if err := m.FileSystem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSystem") - } - return err - } - } - - return nil -} - -func (m *FlashBladeProtectionSource) validateStorageArray(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if m.StorageArray != nil { - if err := m.StorageArray.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -var flashBladeProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray","kFileSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashBladeProtectionSourceTypeTypePropEnum = append(flashBladeProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // FlashBladeProtectionSourceTypeKStorageArray captures enum value "kStorageArray" - FlashBladeProtectionSourceTypeKStorageArray string = "kStorageArray" - - // FlashBladeProtectionSourceTypeKFileSystem captures enum value "kFileSystem" - FlashBladeProtectionSourceTypeKFileSystem string = "kFileSystem" -) - -// prop value enum -func (m *FlashBladeProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashBladeProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashBladeProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this flash blade protection source based on the context it is used -func (m *FlashBladeProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileSystem(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArray(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeProtectionSource) contextValidateFileSystem(ctx context.Context, formats strfmt.Registry) error { - - if m.FileSystem != nil { - - if swag.IsZero(m.FileSystem) { // not required - return nil - } - - if err := m.FileSystem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSystem") - } - return err - } - } - - return nil -} - -func (m *FlashBladeProtectionSource) contextValidateStorageArray(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArray != nil { - - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if err := m.StorageArray.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeProtectionSource) UnmarshalBinary(b []byte) error { - var res FlashBladeProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/flash_blade_storage_array.go b/v1/models/flash_blade_storage_array.go deleted file mode 100644 index 19976c26..00000000 --- a/v1/models/flash_blade_storage_array.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FlashBladeStorageArray Flash Blade Storage Array. -// -// Specifies information about a Pure Storage FlashBlade Array. -// -// swagger:model FlashBladeStorageArray -type FlashBladeStorageArray struct { - - // Specifies the total capacity in bytes of the Pure Storage FlashBlade - // Array. - CapacityBytes *int64 `json:"capacityBytes,omitempty"` - - // Specifies a unique id of a Pure Storage FlashBlade Array. - // The id is unique across Cohesity Clusters. - ID *string `json:"id,omitempty"` - - // Specifies the network interfaces of the Pure Storage FlashBlade Array. - Networks []*FlashBladeNetworkInterface `json:"networks"` - - // Specifies the space used for physical data in bytes. - PhysicalUsedBytes *int64 `json:"physicalUsedBytes,omitempty"` - - // Specifies the revision of the Pure Storage FlashBlade software. - Revision *string `json:"revision,omitempty"` - - // Specifies the software version running on the Pure Storage FlashBlade - // Array. - Version *string `json:"version,omitempty"` -} - -// Validate validates this flash blade storage array -func (m *FlashBladeStorageArray) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeStorageArray) validateNetworks(formats strfmt.Registry) error { - if swag.IsZero(m.Networks) { // not required - return nil - } - - for i := 0; i < len(m.Networks); i++ { - if swag.IsZero(m.Networks[i]) { // not required - continue - } - - if m.Networks[i] != nil { - if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this flash blade storage array based on the context it is used -func (m *FlashBladeStorageArray) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeStorageArray) contextValidateNetworks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Networks); i++ { - - if m.Networks[i] != nil { - - if swag.IsZero(m.Networks[i]) { // not required - return nil - } - - if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeStorageArray) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeStorageArray) UnmarshalBinary(b []byte) error { - var res FlashBladeStorageArray - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fleet_network_params.go b/v1/models/fleet_network_params.go deleted file mode 100644 index f8a68ca9..00000000 --- a/v1/models/fleet_network_params.go +++ /dev/null @@ -1,61 +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" -) - -// FleetNetworkParams Fleet Network Parameters. -// -// Specifies the various network params for the fleet. -// -// swagger:model FleetNetworkParams -type FleetNetworkParams struct { - - // Specifies the project id for the fleet in case of GCP Source. - ProjectID *string `json:"projectId,omitempty"` - - // Specifies the region for the fleet. - Region *string `json:"region,omitempty"` - - // Specifies the subnet for the fleet. - Subnet *string `json:"subnet,omitempty"` - - // Specifies the vpc for the fleet. - Vpc *string `json:"vpc,omitempty"` -} - -// Validate validates this fleet network params -func (m *FleetNetworkParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fleet network params based on context it is used -func (m *FleetNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetNetworkParams) UnmarshalBinary(b []byte) error { - var res FleetNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fleet_network_params_network_params.go b/v1/models/fleet_network_params_network_params.go deleted file mode 100644 index fe87e1fb..00000000 --- a/v1/models/fleet_network_params_network_params.go +++ /dev/null @@ -1,62 +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" -) - -// FleetNetworkParamsNetworkParams Network params for the fleet. -// -// swagger:model FleetNetworkParams_NetworkParams -type FleetNetworkParamsNetworkParams struct { - - // Project ID for the fleet. - ProjectID *string `json:"projectId,omitempty"` - - // Region for the fleet. - Region *string `json:"region,omitempty"` - - // Subnet for the fleet. - Subnet *string `json:"subnet,omitempty"` - - // VPC for the fleet. - Vpc *string `json:"vpc,omitempty"` - - // Zone for the fleet. - Zone *string `json:"zone,omitempty"` -} - -// Validate validates this fleet network params network params -func (m *FleetNetworkParamsNetworkParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fleet network params network params based on context it is used -func (m *FleetNetworkParamsNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetNetworkParamsNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetNetworkParamsNetworkParams) UnmarshalBinary(b []byte) error { - var res FleetNetworkParamsNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fleet_params.go b/v1/models/fleet_params.go deleted file mode 100644 index de85f745..00000000 --- a/v1/models/fleet_params.go +++ /dev/null @@ -1,234 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FleetParams Fleet Parameters. -// -// Specifies various resources when deploying a VM to Fleet instances. -// -// swagger:model FleetParams -type FleetParams struct { - - // Specifies the network params for the fleet. - FleetNetworkParams *FleetNetworkParams `json:"fleetNetworkParams,omitempty"` - - // Specifies the subnet type of the fleet. - // Specifies the type of the fleet subnet. - // 'kCluster' implies same subnet as of Cluster, valid only for Cloud Edition - // cluster. - // 'kSourceVM' implies same subnet as of source vm. - // 'kCustom' implies the custome subnet. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetType *string `json:"fleetSubnetType,omitempty"` - - // Specifies the tag information for the fleet. - FleetTags []*FleetTag `json:"fleetTags"` -} - -// Validate validates this fleet params -func (m *FleetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetNetworkParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetSubnetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetTags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FleetParams) validateFleetNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.FleetNetworkParams) { // not required - return nil - } - - if m.FleetNetworkParams != nil { - if err := m.FleetNetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParams") - } - return err - } - } - - return nil -} - -var fleetParamsTypeFleetSubnetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fleetParamsTypeFleetSubnetTypePropEnum = append(fleetParamsTypeFleetSubnetTypePropEnum, v) - } -} - -const ( - - // FleetParamsFleetSubnetTypeKCluster captures enum value "kCluster" - FleetParamsFleetSubnetTypeKCluster string = "kCluster" - - // FleetParamsFleetSubnetTypeKSourceVM captures enum value "kSourceVM" - FleetParamsFleetSubnetTypeKSourceVM string = "kSourceVM" - - // FleetParamsFleetSubnetTypeKCustom captures enum value "kCustom" - FleetParamsFleetSubnetTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *FleetParams) validateFleetSubnetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fleetParamsTypeFleetSubnetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FleetParams) validateFleetSubnetType(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetType) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetTypeEnum("fleetSubnetType", "body", *m.FleetSubnetType); err != nil { - return err - } - - return nil -} - -func (m *FleetParams) validateFleetTags(formats strfmt.Registry) error { - if swag.IsZero(m.FleetTags) { // not required - return nil - } - - for i := 0; i < len(m.FleetTags); i++ { - if swag.IsZero(m.FleetTags[i]) { // not required - continue - } - - if m.FleetTags[i] != nil { - if err := m.FleetTags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this fleet params based on the context it is used -func (m *FleetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFleetNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFleetTags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FleetParams) contextValidateFleetNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FleetNetworkParams != nil { - - if swag.IsZero(m.FleetNetworkParams) { // not required - return nil - } - - if err := m.FleetNetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParams") - } - return err - } - } - - return nil -} - -func (m *FleetParams) contextValidateFleetTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FleetTags); i++ { - - if m.FleetTags[i] != nil { - - if swag.IsZero(m.FleetTags[i]) { // not required - return nil - } - - if err := m.FleetTags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FleetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetParams) UnmarshalBinary(b []byte) error { - var res FleetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fleet_tag.go b/v1/models/fleet_tag.go deleted file mode 100644 index ad4bcfb8..00000000 --- a/v1/models/fleet_tag.go +++ /dev/null @@ -1,55 +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" -) - -// FleetTag Fleet Tag Parameters. -// -// Specfies the key,value pair for the fleet tag. -// -// swagger:model FleetTag -type FleetTag struct { - - // Specifies the key for the fleet tag. - Key *string `json:"key,omitempty"` - - // Specifies the value for the fleet tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this fleet tag -func (m *FleetTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fleet tag based on context it is used -func (m *FleetTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetTag) UnmarshalBinary(b []byte) error { - var res FleetTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/folder_content_info.go b/v1/models/folder_content_info.go deleted file mode 100644 index 3146560a..00000000 --- a/v1/models/folder_content_info.go +++ /dev/null @@ -1,295 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FolderContentInfo Creates the info about the content in the folder. -// -// swagger:model FolderContentInfo -type FolderContentInfo struct { - - // Total number of child folders in the public folder. - ChildFolderCount *int32 `json:"childFolderCount,omitempty"` - - // The display name of the public folder. - DisplayName *string `json:"displayName,omitempty"` - - // List of extended properties of this folder. - ExtendedPropertyVec []*FolderContentInfoExtendedProperty `json:"extendedPropertyVec"` - - // Represents the folder class for a given folder. - FolderClass *string `json:"folderClass,omitempty"` - - // The id of the given folder. - FolderID *FolderID `json:"folderId,omitempty"` - - // The id of the parent folder of given folder. - ParentFolderID *FolderID `json:"parentFolderId,omitempty"` - - // Permissions for this folder. - PermissionSet *PermissionSet `json:"permissionSet,omitempty"` - - // Token identifying the current synchronized state of the folder. - SyncState *string `json:"syncState,omitempty"` - - // Total number of entities (mails, posts) in the public folder. - TotalCount *int32 `json:"totalCount,omitempty"` - - // The EWS Folder type. - Type *int32 `json:"type,omitempty"` - - // Total number of unread entities in the public folder. - UnreadCount *int32 `json:"unreadCount,omitempty"` -} - -// Validate validates this folder content info -func (m *FolderContentInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExtendedPropertyVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFolderID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentFolderID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissionSet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FolderContentInfo) validateExtendedPropertyVec(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedPropertyVec) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedPropertyVec); i++ { - if swag.IsZero(m.ExtendedPropertyVec[i]) { // not required - continue - } - - if m.ExtendedPropertyVec[i] != nil { - if err := m.ExtendedPropertyVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedPropertyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedPropertyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FolderContentInfo) validateFolderID(formats strfmt.Registry) error { - if swag.IsZero(m.FolderID) { // not required - return nil - } - - if m.FolderID != nil { - if err := m.FolderID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderId") - } - return err - } - } - - return nil -} - -func (m *FolderContentInfo) validateParentFolderID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentFolderID) { // not required - return nil - } - - if m.ParentFolderID != nil { - if err := m.ParentFolderID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentFolderId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentFolderId") - } - return err - } - } - - return nil -} - -func (m *FolderContentInfo) validatePermissionSet(formats strfmt.Registry) error { - if swag.IsZero(m.PermissionSet) { // not required - return nil - } - - if m.PermissionSet != nil { - if err := m.PermissionSet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissionSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissionSet") - } - return err - } - } - - return nil -} - -// ContextValidate validate this folder content info based on the context it is used -func (m *FolderContentInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExtendedPropertyVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFolderID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentFolderID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissionSet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FolderContentInfo) contextValidateExtendedPropertyVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedPropertyVec); i++ { - - if m.ExtendedPropertyVec[i] != nil { - - if swag.IsZero(m.ExtendedPropertyVec[i]) { // not required - return nil - } - - if err := m.ExtendedPropertyVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedPropertyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedPropertyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FolderContentInfo) contextValidateFolderID(ctx context.Context, formats strfmt.Registry) error { - - if m.FolderID != nil { - - if swag.IsZero(m.FolderID) { // not required - return nil - } - - if err := m.FolderID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderId") - } - return err - } - } - - return nil -} - -func (m *FolderContentInfo) contextValidateParentFolderID(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentFolderID != nil { - - if swag.IsZero(m.ParentFolderID) { // not required - return nil - } - - if err := m.ParentFolderID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentFolderId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentFolderId") - } - return err - } - } - - return nil -} - -func (m *FolderContentInfo) contextValidatePermissionSet(ctx context.Context, formats strfmt.Registry) error { - - if m.PermissionSet != nil { - - if swag.IsZero(m.PermissionSet) { // not required - return nil - } - - if err := m.PermissionSet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissionSet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissionSet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FolderContentInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FolderContentInfo) UnmarshalBinary(b []byte) error { - var res FolderContentInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/folder_content_info_extended_property.go b/v1/models/folder_content_info_extended_property.go deleted file mode 100644 index a09f7f0f..00000000 --- a/v1/models/folder_content_info_extended_property.go +++ /dev/null @@ -1,114 +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" -) - -// FolderContentInfoExtendedProperty A message that captures the extended properties of the folder. -// -// swagger:model FolderContentInfo_ExtendedProperty -type FolderContentInfoExtendedProperty struct { - - // Extended MAPI property. - ExtendedFieldURI *ExtendedFieldURI `json:"extendedFieldUri,omitempty"` - - // Value of the extended MAPI property. If the property_type in - // extended_field_uri is kBinary, this field stores the value in the - // base64 format. - Value *string `json:"value,omitempty"` -} - -// Validate validates this folder content info extended property -func (m *FolderContentInfoExtendedProperty) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExtendedFieldURI(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FolderContentInfoExtendedProperty) validateExtendedFieldURI(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedFieldURI) { // not required - return nil - } - - if m.ExtendedFieldURI != nil { - if err := m.ExtendedFieldURI.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedFieldUri") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedFieldUri") - } - return err - } - } - - return nil -} - -// ContextValidate validate this folder content info extended property based on the context it is used -func (m *FolderContentInfoExtendedProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExtendedFieldURI(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FolderContentInfoExtendedProperty) contextValidateExtendedFieldURI(ctx context.Context, formats strfmt.Registry) error { - - if m.ExtendedFieldURI != nil { - - if swag.IsZero(m.ExtendedFieldURI) { // not required - return nil - } - - if err := m.ExtendedFieldURI.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedFieldUri") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedFieldUri") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FolderContentInfoExtendedProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FolderContentInfoExtendedProperty) UnmarshalBinary(b []byte) error { - var res FolderContentInfoExtendedProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/folder_id.go b/v1/models/folder_id.go deleted file mode 100644 index 25ed7ee3..00000000 --- a/v1/models/folder_id.go +++ /dev/null @@ -1,57 +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" -) - -// FolderID Represent an element that contains the identifier and change key of a -// folder. -// -// swagger:model FolderId -type FolderID struct { - - // Change key of a folder. - ChangeKey *string `json:"changeKey,omitempty"` - - // Identifier of a folder. - ID *string `json:"id,omitempty"` - - // Replica ID of the folder. As of now, only used in PublicFolder workflows. - ReplicaID *string `json:"replicaId,omitempty"` -} - -// Validate validates this folder Id -func (m *FolderID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this folder Id based on context it is used -func (m *FolderID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FolderID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FolderID) UnmarshalBinary(b []byte) error { - var res FolderID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/folder_result.go b/v1/models/folder_result.go deleted file mode 100644 index a326f330..00000000 --- a/v1/models/folder_result.go +++ /dev/null @@ -1,56 +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" -) - -// FolderResult Individual Folder that shows the level as well. -// -// swagger:model FolderResult -type FolderResult struct { - - // Display Name of the folder. - DisplayName *string `json:"displayName,omitempty"` - - // Id of the folder. - ID *int64 `json:"id,omitempty"` - - // Level of the folder with topmost folder having a level of 0. - Level *int32 `json:"level,omitempty"` -} - -// Validate validates this folder result -func (m *FolderResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this folder result based on context it is used -func (m *FolderResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FolderResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FolderResult) UnmarshalBinary(b []byte) error { - var res FolderResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/folder_type.go b/v1/models/folder_type.go deleted file mode 100644 index 6d5a0729..00000000 --- a/v1/models/folder_type.go +++ /dev/null @@ -1,11 +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 - -// FolderType Enum for indicating the type of an outlook folder. -// -// swagger:model FolderType -type FolderType interface{} diff --git a/v1/models/fort_knox_azure_info.go b/v1/models/fort_knox_azure_info.go deleted file mode 100644 index 5df53e71..00000000 --- a/v1/models/fort_knox_azure_info.go +++ /dev/null @@ -1,63 +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" -) - -// FortKnoxAzureInfo FortKnoxAzureInfo holds information about the Fortknox -// Azure or Azure FreeTrial subscription such as if it is active. -// -// swagger:model FortKnoxAzureInfo -type FortKnoxAzureInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the quantity of the subscription. - Quantity *int64 `json:"quantity,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this fort knox azure info -func (m *FortKnoxAzureInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fort knox azure info based on context it is used -func (m *FortKnoxAzureInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FortKnoxAzureInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FortKnoxAzureInfo) UnmarshalBinary(b []byte) error { - var res FortKnoxAzureInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/fort_knox_cold_info.go b/v1/models/fort_knox_cold_info.go deleted file mode 100644 index a3cd1cec..00000000 --- a/v1/models/fort_knox_cold_info.go +++ /dev/null @@ -1,63 +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" -) - -// FortKnoxColdInfo FortKnoxColdInfo holds information about the Fortknox -// AwsCold or AwsCold FreeTrial subscription such as if it is active. -// -// swagger:model FortKnoxColdInfo -type FortKnoxColdInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the quantity of the subscription. - Quantity *int64 `json:"quantity,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this fort knox cold info -func (m *FortKnoxColdInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fort knox cold info based on context it is used -func (m *FortKnoxColdInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FortKnoxColdInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FortKnoxColdInfo) UnmarshalBinary(b []byte) error { - var res FortKnoxColdInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/free_node_information.go b/v1/models/free_node_information.go deleted file mode 100644 index 54dabfb3..00000000 --- a/v1/models/free_node_information.go +++ /dev/null @@ -1,91 +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" -) - -// FreeNodeInformation Free Node Information. -// -// Specifies the Metadata of a free Node on the network. -// -// swagger:model FreeNodeInformation -type FreeNodeInformation struct { - - // Specifies the serial number of the Chassis the Node is installed in. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Specifies whether or not this is the Node that is sending the response. - ConnectedTo *bool `json:"connectedTo,omitempty"` - - // Free node hostname. - Hostname *string `json:"hostname,omitempty"` - - // Specifies the ID of the node. - ID *int64 `json:"id,omitempty"` - - // Deprecated. Specifies the IP address of the Node. Use Ips instead. - IP *string `json:"ip,omitempty"` - - // Specifies the IPMI IP of the Node. - IpmiIP *string `json:"ipmiIp,omitempty"` - - // List of discovered ipv4/ipv6 addresses of the node. - // Ip field returns ips as comma separated single string which is incorrect. - Ips []string `json:"ips"` - - // Specifies the serial number of the Node. - NodeSerial *string `json:"nodeSerial,omitempty"` - - // Specifies the postition for the UI to display the Node in the Cluster - // creation page. - NodeUISlot *string `json:"nodeUiSlot,omitempty"` - - // Specifies the number of Node slots present in the Chassis where this - // Node is installed. - NumSlotsInChassis *uint32 `json:"numSlotsInChassis,omitempty"` - - // Specifies the product model of the node. - ProductModel *string `json:"productModel,omitempty"` - - // Specifies the number of the slot the Node is installed in. - SlotNumber *string `json:"slotNumber,omitempty"` - - // Specifies the version of the software installed on the Node. - SoftwareVersion *string `json:"softwareVersion,omitempty"` -} - -// Validate validates this free node information -func (m *FreeNodeInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this free node information based on context it is used -func (m *FreeNodeInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FreeNodeInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FreeNodeInformation) UnmarshalBinary(b []byte) error { - var res FreeNodeInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/full_snapshot_info.go b/v1/models/full_snapshot_info.go deleted file mode 100644 index 1ad99cb1..00000000 --- a/v1/models/full_snapshot_info.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FullSnapshotInfo Specifies the info regarding how to restore to a particular full or -// incremental snapshot. -// -// swagger:model FullSnapshotInfo -type FullSnapshotInfo struct { - - // Specifies the full or incremental snapshot. - RestoreInfo *RestoreInfo `json:"restoreInfo,omitempty"` - - // Specifies the location holding snapshot copies that may be used for - // restore. - SnapshotTarget []*SnapshotTargetSettings `json:"snapshotTarget"` -} - -// Validate validates this full snapshot info -func (m *FullSnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullSnapshotInfo) validateRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if m.RestoreInfo != nil { - if err := m.RestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *FullSnapshotInfo) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotTarget); i++ { - if swag.IsZero(m.SnapshotTarget[i]) { // not required - continue - } - - if m.SnapshotTarget[i] != nil { - if err := m.SnapshotTarget[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this full snapshot info based on the context it is used -func (m *FullSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullSnapshotInfo) contextValidateRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreInfo != nil { - - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if err := m.RestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *FullSnapshotInfo) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotTarget); i++ { - - if m.SnapshotTarget[i] != nil { - - if swag.IsZero(m.SnapshotTarget[i]) { // not required - return nil - } - - if err := m.SnapshotTarget[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FullSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FullSnapshotInfo) UnmarshalBinary(b []byte) error { - var res FullSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_attributes.go b/v1/models/g_c_p_attributes.go deleted file mode 100644 index 09e57716..00000000 --- a/v1/models/g_c_p_attributes.go +++ /dev/null @@ -1,69 +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" -) - -// GCPAttributes Message representing a GCP tag/metadata/label that can be used as an -// attribute of a GCP entity. -// -// swagger:model GCPAttributes -type GCPAttributes struct { - - // Entity id corresponding to the tag entity. - EntityID *int64 `json:"entityId,omitempty"` - - // Deprecated fields below. - // In case of labels and metadata key-value pairs, this corresponds to the - // key. In case of network tags, this contains the tag. - KeyDEPRECATED *string `json:"key_DEPRECATED,omitempty"` - - // Display name of the tag. - Name *string `json:"name,omitempty"` - - // The type of tag this entity refers to. - Type *int32 `json:"type,omitempty"` - - // The instance UUID of the tag object. - UUID *string `json:"uuid,omitempty"` - - // In case of labels and metadata key-value pairs, this corresponds to the - // value. - ValueDEPRECATED *string `json:"value_DEPRECATED,omitempty"` -} - -// Validate validates this g c p attributes -func (m *GCPAttributes) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this g c p attributes based on context it is used -func (m *GCPAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GCPAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPAttributes) UnmarshalBinary(b []byte) error { - var res GCPAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_disk_exclusion_object_params.go b/v1/models/g_c_p_disk_exclusion_object_params.go deleted file mode 100644 index 267e6e8d..00000000 --- a/v1/models/g_c_p_disk_exclusion_object_params.go +++ /dev/null @@ -1,51 +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" -) - -// GCPDiskExclusionObjectParams Message defining the different criteria to exclude GCP disks from -// object-level backup. All the disk name present here will be excluded. -// -// swagger:model GCPDiskExclusionObjectParams -type GCPDiskExclusionObjectParams struct { - - // List of disk name to exclude. Eg - [instance1-disk, instance2-disk] - DiskNameVec []string `json:"diskNameVec"` -} - -// Validate validates this g c p disk exclusion object params -func (m *GCPDiskExclusionObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this g c p disk exclusion object params based on context it is used -func (m *GCPDiskExclusionObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GCPDiskExclusionObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPDiskExclusionObjectParams) UnmarshalBinary(b []byte) error { - var res GCPDiskExclusionObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_fleet_params.go b/v1/models/g_c_p_fleet_params.go deleted file mode 100644 index 85d2f7ad..00000000 --- a/v1/models/g_c_p_fleet_params.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GCPFleetParams Params for GCP fleets deployment. -// -// swagger:model GCPFleetParams -type GCPFleetParams struct { - - // List of network parameters for GCP fleets. This will always be set. - FleetNetworkParamsVec []*PrivateFleetNetworkParams `json:"fleetNetworkParamsVec"` - - // Optional list of network tags to be associated with the fleets. - // Network tags as oppose to other tags do not have key value pair. - FleetNwTagVec []string `json:"fleetNwTagVec"` - - // Resource ID of the encryption key managed via Google cloud KMS. - // Only set if we want to use customer managed encryption. - KmsKeyName *string `json:"kmsKeyName,omitempty"` - - // GCP Service account to be attached to fleet instances. - ServiceAccountName *string `json:"serviceAccountName,omitempty"` -} - -// Validate validates this g c p fleet params -func (m *GCPFleetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetNetworkParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPFleetParams) validateFleetNetworkParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.FleetNetworkParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.FleetNetworkParamsVec); i++ { - if swag.IsZero(m.FleetNetworkParamsVec[i]) { // not required - continue - } - - if m.FleetNetworkParamsVec[i] != nil { - if err := m.FleetNetworkParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this g c p fleet params based on the context it is used -func (m *GCPFleetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFleetNetworkParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPFleetParams) contextValidateFleetNetworkParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FleetNetworkParamsVec); i++ { - - if m.FleetNetworkParamsVec[i] != nil { - - if swag.IsZero(m.FleetNetworkParamsVec[i]) { // not required - return nil - } - - if err := m.FleetNetworkParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GCPFleetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPFleetParams) UnmarshalBinary(b []byte) error { - var res GCPFleetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_job_disk_exclusion_rule.go b/v1/models/g_c_p_job_disk_exclusion_rule.go deleted file mode 100644 index 228450dd..00000000 --- a/v1/models/g_c_p_job_disk_exclusion_rule.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GCPJobDiskExclusionRule Message defining the different criteria to exclude GCP disks from -// job-level backup. The values set will be used for AND operation. -// For E.g:(Balanced-Persistant && instance1-disk) -// -// swagger:model GCPJobDiskExclusionRule -type GCPJobDiskExclusionRule struct { - - // Disk name to exclude. Eg - instance1-disk - DiskName *string `json:"diskName,omitempty"` - - // Disk types to exclude. Eg - Balanced-Persistant etc. - DiskType *string `json:"diskType,omitempty"` - - // Specifies the label vectors used to exclude GCP disks attached to GCP - // instances at global and object level. - // E.g., {label_vec: [(K1, V1), (K2, V2)], - // => This will exclude a particular disk if it has all - // the tags in label_vec((K1, V1), (K2, V2)) - LabelVec []*GCPJobDiskExclusionRuleLabel `json:"labelVec"` -} - -// Validate validates this g c p job disk exclusion rule -func (m *GCPJobDiskExclusionRule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLabelVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPJobDiskExclusionRule) validateLabelVec(formats strfmt.Registry) error { - if swag.IsZero(m.LabelVec) { // not required - return nil - } - - for i := 0; i < len(m.LabelVec); i++ { - if swag.IsZero(m.LabelVec[i]) { // not required - continue - } - - if m.LabelVec[i] != nil { - if err := m.LabelVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this g c p job disk exclusion rule based on the context it is used -func (m *GCPJobDiskExclusionRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLabelVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPJobDiskExclusionRule) contextValidateLabelVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelVec); i++ { - - if m.LabelVec[i] != nil { - - if swag.IsZero(m.LabelVec[i]) { // not required - return nil - } - - if err := m.LabelVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GCPJobDiskExclusionRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPJobDiskExclusionRule) UnmarshalBinary(b []byte) error { - var res GCPJobDiskExclusionRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_job_disk_exclusion_rule_label.go b/v1/models/g_c_p_job_disk_exclusion_rule_label.go deleted file mode 100644 index 7e35974f..00000000 --- a/v1/models/g_c_p_job_disk_exclusion_rule_label.go +++ /dev/null @@ -1,57 +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" -) - -// GCPJobDiskExclusionRuleLabel Label definition for labels on the disks. -// -// swagger:model GCPJobDiskExclusionRule_Label -type GCPJobDiskExclusionRuleLabel struct { - - // Key for the label. Note that if the provided label key's length is more - // than the maximum length allowed by GCP(currently 63), then the value - // would be automatically truncated before setting. - Key *string `json:"key,omitempty"` - - // Value for the label. Note that if the provided label value's length is - // more than the maximum length allowed by GCP(currently 63), then the - // value would be automatically truncated before setting. - Value *string `json:"value,omitempty"` -} - -// Validate validates this g c p job disk exclusion rule label -func (m *GCPJobDiskExclusionRuleLabel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this g c p job disk exclusion rule label based on context it is used -func (m *GCPJobDiskExclusionRuleLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GCPJobDiskExclusionRuleLabel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPJobDiskExclusionRuleLabel) UnmarshalBinary(b []byte) error { - var res GCPJobDiskExclusionRuleLabel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_native_job_params.go b/v1/models/g_c_p_native_job_params.go deleted file mode 100644 index ac54bd14..00000000 --- a/v1/models/g_c_p_native_job_params.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GCPNativeJobParams Message defining the job-level params in GCP native backup. -// -// swagger:model GCPNativeJobParams -type GCPNativeJobParams struct { - - // Specifies the disk exclusion raw query used to exclude disks from backup. - DiskExclusionRawQuery *string `json:"diskExclusionRawQuery,omitempty"` - - // Specifies the different criteria to exclude disks from backup. - // The values set in disk_exclusion_params will be used for OR operation. - // For E.g: if disk_exclusion_params has values - // [(Balanced-Persistant && instance1-disk),((k1:v1) && (k2:v2))] - // then the exclusion criteria will be - // (Balanced-Persistant && instance1-disk) || ((k1:v1) && (k2:v2)) - DiskExclusionRuleVec []*GCPJobDiskExclusionRule `json:"diskExclusionRuleVec"` - - // Specifies whether to exclude VM without disk. - ExcludeVMWithoutDisk *bool `json:"excludeVmWithoutDisk,omitempty"` -} - -// Validate validates this g c p native job params -func (m *GCPNativeJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskExclusionRuleVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPNativeJobParams) validateDiskExclusionRuleVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskExclusionRuleVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskExclusionRuleVec); i++ { - if swag.IsZero(m.DiskExclusionRuleVec[i]) { // not required - continue - } - - if m.DiskExclusionRuleVec[i] != nil { - if err := m.DiskExclusionRuleVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskExclusionRuleVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskExclusionRuleVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this g c p native job params based on the context it is used -func (m *GCPNativeJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskExclusionRuleVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPNativeJobParams) contextValidateDiskExclusionRuleVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskExclusionRuleVec); i++ { - - if m.DiskExclusionRuleVec[i] != nil { - - if swag.IsZero(m.DiskExclusionRuleVec[i]) { // not required - return nil - } - - if err := m.DiskExclusionRuleVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskExclusionRuleVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskExclusionRuleVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GCPNativeJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPNativeJobParams) UnmarshalBinary(b []byte) error { - var res GCPNativeJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/g_c_p_native_object_params.go b/v1/models/g_c_p_native_object_params.go deleted file mode 100644 index 8f603780..00000000 --- a/v1/models/g_c_p_native_object_params.go +++ /dev/null @@ -1,109 +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" -) - -// GCPNativeObjectParams Message defining object-level specific params for GCP Native backup. -// -// swagger:model GCPNativeObjectParams -type GCPNativeObjectParams struct { - - // Specifies the criteria for GCP VM disk exclusion. - DiskExclusionParams *GCPDiskExclusionObjectParams `json:"diskExclusionParams,omitempty"` -} - -// Validate validates this g c p native object params -func (m *GCPNativeObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPNativeObjectParams) validateDiskExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.DiskExclusionParams) { // not required - return nil - } - - if m.DiskExclusionParams != nil { - if err := m.DiskExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this g c p native object params based on the context it is used -func (m *GCPNativeObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GCPNativeObjectParams) contextValidateDiskExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskExclusionParams != nil { - - if swag.IsZero(m.DiskExclusionParams) { // not required - return nil - } - - if err := m.DiskExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GCPNativeObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPNativeObjectParams) UnmarshalBinary(b []byte) error { - var res GCPNativeObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_credentials.go b/v1/models/gcp_credentials.go deleted file mode 100644 index 07f13014..00000000 --- a/v1/models/gcp_credentials.go +++ /dev/null @@ -1,169 +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" -) - -// GcpCredentials GCP source Credentials. -// -// Specifies the credentials to authenticate with Google Cloud Platform. -// -// swagger:model GcpCredentials -type GcpCredentials struct { - - // Specifies Client email address associated with the service account. - ClientEmailAddress *string `json:"clientEmailAddress,omitempty"` - - // Specifies Client private associated with the service account. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` - - // Specifies the entity type such as 'kIAMUser' if the environment is kGCP. - // Specifies the type of a GCP source entity. - // 'kIAMUser' indicates a unique user within a GCP account. - // 'kProject' represents compute resources and storage. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kVirtualMachine' indicates a Virtual Machine running in GCP environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within GCP. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kLabel' represents a label present on the instances. - // 'kMetaData' represents a custom metadata present on instances. - // 'kTag' represents a network tag on instances. - // 'kVPCConnector' represents a VPC connector used for serverless VPC access. - // Enum: ["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"] - GcpType *string `json:"gcpType,omitempty"` - - // Specifies Id of the project associated with Google cloud account. - ProjectID *string `json:"projectId,omitempty"` - - // Specifies the VPC Network to deploy proxy VMs. - VpcNetwork *string `json:"vpcNetwork,omitempty"` - - // Specifies the subnetwork to deploy proxy VMs. - VpcSubnetwork *string `json:"vpcSubnetwork,omitempty"` -} - -// Validate validates this gcp credentials -func (m *GcpCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGcpType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gcpCredentialsTypeGcpTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpCredentialsTypeGcpTypePropEnum = append(gcpCredentialsTypeGcpTypePropEnum, v) - } -} - -const ( - - // GcpCredentialsGcpTypeKIAMUser captures enum value "kIAMUser" - GcpCredentialsGcpTypeKIAMUser string = "kIAMUser" - - // GcpCredentialsGcpTypeKProject captures enum value "kProject" - GcpCredentialsGcpTypeKProject string = "kProject" - - // GcpCredentialsGcpTypeKRegion captures enum value "kRegion" - GcpCredentialsGcpTypeKRegion string = "kRegion" - - // GcpCredentialsGcpTypeKAvailabilityZone captures enum value "kAvailabilityZone" - GcpCredentialsGcpTypeKAvailabilityZone string = "kAvailabilityZone" - - // GcpCredentialsGcpTypeKVirtualMachine captures enum value "kVirtualMachine" - GcpCredentialsGcpTypeKVirtualMachine string = "kVirtualMachine" - - // GcpCredentialsGcpTypeKVPC captures enum value "kVPC" - GcpCredentialsGcpTypeKVPC string = "kVPC" - - // GcpCredentialsGcpTypeKSubnet captures enum value "kSubnet" - GcpCredentialsGcpTypeKSubnet string = "kSubnet" - - // GcpCredentialsGcpTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - GcpCredentialsGcpTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // GcpCredentialsGcpTypeKInstanceType captures enum value "kInstanceType" - GcpCredentialsGcpTypeKInstanceType string = "kInstanceType" - - // GcpCredentialsGcpTypeKLabel captures enum value "kLabel" - GcpCredentialsGcpTypeKLabel string = "kLabel" - - // GcpCredentialsGcpTypeKMetadata captures enum value "kMetadata" - GcpCredentialsGcpTypeKMetadata string = "kMetadata" - - // GcpCredentialsGcpTypeKTag captures enum value "kTag" - GcpCredentialsGcpTypeKTag string = "kTag" - - // GcpCredentialsGcpTypeKVPCConnector captures enum value "kVPCConnector" - GcpCredentialsGcpTypeKVPCConnector string = "kVPCConnector" -) - -// prop value enum -func (m *GcpCredentials) validateGcpTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpCredentialsTypeGcpTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpCredentials) validateGcpType(formats strfmt.Registry) error { - if swag.IsZero(m.GcpType) { // not required - return nil - } - - // value enum - if err := m.validateGcpTypeEnum("gcpType", "body", *m.GcpType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this gcp credentials based on context it is used -func (m *GcpCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpCredentials) UnmarshalBinary(b []byte) error { - var res GcpCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_disk_info.go b/v1/models/gcp_disk_info.go deleted file mode 100644 index e4e3a36b..00000000 --- a/v1/models/gcp_disk_info.go +++ /dev/null @@ -1,67 +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" -) - -// GcpDiskInfo GCP disk Info. -// -// Specified info about the GCP disk. -// -// swagger:model GcpDiskInfo -type GcpDiskInfo struct { - - // Specifies the name of the device. Eg - /dev/sdb. - DeviceName *string `json:"deviceName,omitempty"` - - // Specified ID of the disk. - ID *int64 `json:"id,omitempty"` - - // Specifies if the disk is attached as root device. - IsRootDevice *bool `json:"isRootDevice,omitempty"` - - // Specifies the name of the disk. - Name *string `json:"name,omitempty"` - - // Specifies the size of the device. - SizeGb *int64 `json:"sizeGb,omitempty"` - - // Specifies the type of the disk. - Type *string `json:"type,omitempty"` -} - -// Validate validates this gcp disk info -func (m *GcpDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gcp disk info based on context it is used -func (m *GcpDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpDiskInfo) UnmarshalBinary(b []byte) error { - var res GcpDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_fleet_network_params.go b/v1/models/gcp_fleet_network_params.go deleted file mode 100644 index d2db56a0..00000000 --- a/v1/models/gcp_fleet_network_params.go +++ /dev/null @@ -1,237 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GcpFleetNetworkParams gcp fleet network params -// -// swagger:model GcpFleetNetworkParams -type GcpFleetNetworkParams struct { - - // Specifies the priority of the subnet type. - // Specifies the priority of the fleet subnet type for GCP. - // 'kPrimary' implies first priority to subnet type. - // 'kSecondary' implies second priority to subnet type. - // 'kTertiary' implies third priority to subnet type. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetPriority *string `json:"fleetSubnetPriority,omitempty"` - - // Specifies the subnet type of the fleet. - // Specifies the type of the fleet subnet for GCP. - // 'kCluster' implies same subnet as of Cluster (for CE and NGCE cluster). - // 'kSourceVM' implies same subnet as of source vm. - // 'kCustom' implies the custome subnet. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetType *string `json:"fleetSubnetType,omitempty"` - - // Specifies the list of network params for the fleet. - NetworkParamsList []*FleetNetworkParams `json:"networkParamsList"` -} - -// Validate validates this gcp fleet network params -func (m *GcpFleetNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetSubnetPriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetSubnetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParamsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gcpFleetNetworkParamsTypeFleetSubnetPriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpFleetNetworkParamsTypeFleetSubnetPriorityPropEnum = append(gcpFleetNetworkParamsTypeFleetSubnetPriorityPropEnum, v) - } -} - -const ( - - // GcpFleetNetworkParamsFleetSubnetPriorityKCluster captures enum value "kCluster" - GcpFleetNetworkParamsFleetSubnetPriorityKCluster string = "kCluster" - - // GcpFleetNetworkParamsFleetSubnetPriorityKSourceVM captures enum value "kSourceVM" - GcpFleetNetworkParamsFleetSubnetPriorityKSourceVM string = "kSourceVM" - - // GcpFleetNetworkParamsFleetSubnetPriorityKCustom captures enum value "kCustom" - GcpFleetNetworkParamsFleetSubnetPriorityKCustom string = "kCustom" -) - -// prop value enum -func (m *GcpFleetNetworkParams) validateFleetSubnetPriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpFleetNetworkParamsTypeFleetSubnetPriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpFleetNetworkParams) validateFleetSubnetPriority(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetPriority) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetPriorityEnum("fleetSubnetPriority", "body", *m.FleetSubnetPriority); err != nil { - return err - } - - return nil -} - -var gcpFleetNetworkParamsTypeFleetSubnetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpFleetNetworkParamsTypeFleetSubnetTypePropEnum = append(gcpFleetNetworkParamsTypeFleetSubnetTypePropEnum, v) - } -} - -const ( - - // GcpFleetNetworkParamsFleetSubnetTypeKCluster captures enum value "kCluster" - GcpFleetNetworkParamsFleetSubnetTypeKCluster string = "kCluster" - - // GcpFleetNetworkParamsFleetSubnetTypeKSourceVM captures enum value "kSourceVM" - GcpFleetNetworkParamsFleetSubnetTypeKSourceVM string = "kSourceVM" - - // GcpFleetNetworkParamsFleetSubnetTypeKCustom captures enum value "kCustom" - GcpFleetNetworkParamsFleetSubnetTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *GcpFleetNetworkParams) validateFleetSubnetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpFleetNetworkParamsTypeFleetSubnetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpFleetNetworkParams) validateFleetSubnetType(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetType) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetTypeEnum("fleetSubnetType", "body", *m.FleetSubnetType); err != nil { - return err - } - - return nil -} - -func (m *GcpFleetNetworkParams) validateNetworkParamsList(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParamsList) { // not required - return nil - } - - for i := 0; i < len(m.NetworkParamsList); i++ { - if swag.IsZero(m.NetworkParamsList[i]) { // not required - continue - } - - if m.NetworkParamsList[i] != nil { - if err := m.NetworkParamsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this gcp fleet network params based on the context it is used -func (m *GcpFleetNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkParamsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpFleetNetworkParams) contextValidateNetworkParamsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkParamsList); i++ { - - if m.NetworkParamsList[i] != nil { - - if swag.IsZero(m.NetworkParamsList[i]) { // not required - return nil - } - - if err := m.NetworkParamsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpFleetNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpFleetNetworkParams) UnmarshalBinary(b []byte) error { - var res GcpFleetNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_fleet_params.go b/v1/models/gcp_fleet_params.go deleted file mode 100644 index 8ad40d97..00000000 --- a/v1/models/gcp_fleet_params.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GcpFleetParams GCP Fleet Parameters. -// -// Specifies various resources when deploying a Fleet instance on GCP. -// -// swagger:model GcpFleetParams -type GcpFleetParams struct { - - // Specifies the network tag information for the fleet. - FleetNetworkTags []string `json:"fleetNetworkTags"` - - // Specifies the priority list of network params for the fleet. - GcpFleetNetworkParamsList []*GcpFleetNetworkParams `json:"gcpFleetNetworkParamsList"` -} - -// Validate validates this gcp fleet params -func (m *GcpFleetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGcpFleetNetworkParamsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpFleetParams) validateGcpFleetNetworkParamsList(formats strfmt.Registry) error { - if swag.IsZero(m.GcpFleetNetworkParamsList) { // not required - return nil - } - - for i := 0; i < len(m.GcpFleetNetworkParamsList); i++ { - if swag.IsZero(m.GcpFleetNetworkParamsList[i]) { // not required - continue - } - - if m.GcpFleetNetworkParamsList[i] != nil { - if err := m.GcpFleetNetworkParamsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetNetworkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetNetworkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this gcp fleet params based on the context it is used -func (m *GcpFleetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGcpFleetNetworkParamsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpFleetParams) contextValidateGcpFleetNetworkParamsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GcpFleetNetworkParamsList); i++ { - - if m.GcpFleetNetworkParamsList[i] != nil { - - if swag.IsZero(m.GcpFleetNetworkParamsList[i]) { // not required - return nil - } - - if err := m.GcpFleetNetworkParamsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetNetworkParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetNetworkParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpFleetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpFleetParams) UnmarshalBinary(b []byte) error { - var res GcpFleetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_params.go b/v1/models/gcp_params.go deleted file mode 100644 index 0aefc338..00000000 --- a/v1/models/gcp_params.go +++ /dev/null @@ -1,61 +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" -) - -// GcpParams GCP Parameters. -// -// Specifies various resources when converting and deploying a VM to GCP. -// -// swagger:model GcpParams -type GcpParams struct { - - // Specifies id of the GCP instance type in which to deploy the VM. - InstanceID *int64 `json:"instanceId,omitempty"` - - // Specifies id of the GCP region in which to deploy the VM. - Region *int64 `json:"region,omitempty"` - - // Specifies id of the subnet within above VPC. - SubnetID *int64 `json:"subnetId,omitempty"` - - // Specifies id of the Virtual Private Cloud to chose for the instance type. - VirtualPrivateCloudID *int64 `json:"virtualPrivateCloudId,omitempty"` -} - -// Validate validates this gcp params -func (m *GcpParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gcp params based on context it is used -func (m *GcpParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpParams) UnmarshalBinary(b []byte) error { - var res GcpParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gcp_protection_source.go b/v1/models/gcp_protection_source.go deleted file mode 100644 index 8640c019..00000000 --- a/v1/models/gcp_protection_source.go +++ /dev/null @@ -1,677 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GcpProtectionSource GCP Protection Source. -// -// Specifies a Protection Source in GCP environment. -// -// swagger:model GcpProtectionSource -type GcpProtectionSource struct { - - // Specifies Client email address associated with the service account. - ClientEmailAddress *string `json:"clientEmailAddress,omitempty"` - - // Specifies Client private associated with the service account. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` - - // Specifies information related to cluster. This is only valid for CE & NGCE - // clusters. This is only populated for kIAMUser entity. - ClusterNetworkInfo *FleetNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Specified list of disks attached to the GCP instances. - GcpDiskInfoList []*GcpDiskInfo `json:"gcpDiskInfoList"` - - // Specifies the GCP Fleet Parameters for entity type kIAMUser in the new - // source registration workflow. - GcpFleetParams *GcpFleetParams `json:"gcpFleetParams,omitempty"` - - // Specifies the entity type such as 'kIAMUser' if the environment is kGCP. - // Specifies the type of a GCP source entity. - // 'kIAMUser' indicates a unique user within a GCP account. - // 'kProject' represents compute resources and storage. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kVirtualMachine' indicates a Virtual Machine running in GCP environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within GCP. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kLabel' represents a label present on the instances. - // 'kMetaData' represents a custom metadata present on instances. - // 'kTag' represents a network tag on instances. - // 'kVPCConnector' represents a VPC connector used for serverless VPC access. - // Enum: ["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"] - GcpType *string `json:"gcpType,omitempty"` - - // Specifies the host project id. - // It is populated in entities of type kSubnet if the subnet is part of a - // shared VPC. This contains the ID of host project the subnet belongs to. - // Populated in entities of type kProject if the project is a service project - // in a Shared VPC setup. This contains the ID of the host project it is - // attached to. - HostProjectID *string `json:"hostProjectId,omitempty"` - - // Specifies the OS type of the Protection Source of type 'kVirtualMachine' - // such as 'kWindows' or 'kLinux'. - // overrideDescription: true - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the IP address of the entity of type 'kVirtualMachine'. - IPAddressesVM *string `json:"ipAddressesVM,omitempty"` - - // Specifies the name of the Object set by the Cloud Provider. - // If the provider did not set a name for the object, this field is not set. - Name *string `json:"name,omitempty"` - - // Specifies the owner id of the resource in GCP environment. With type, - // name and ownerId gives a globally unique identity to the GCP entity. - OwnerID *string `json:"ownerId,omitempty"` - - // Specifies the Protection Source id of the registered Physical Host. - // If the cloud entity is protected using a Physical Agent, it must be - // registered as a physical host. - PhysicalSourceID *int64 `json:"physicalSourceId,omitempty"` - - // Specifies the project Id. - // For the kIAMUser entity this contains the id of the project to be used - // to deploy proxy VMs. For entities of type kVirtualMachine this contains - // the id of the project the virtual machine belongs to. - ProjectID *string `json:"projectId,omitempty"` - - // Specifies the region Id. - // For the kIAMUser entity this contains the region to be used to deploy - // proxy VMs. For entities of type kVirtualMachine this contains the region - // the virtual machine belongs to. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the unique Id of the resource given by the cloud provider. - ResourceID *string `json:"resourceId,omitempty"` - - // Specifies the id of the "convert and deploy" restore task that - // created the entity in the cloud. - // - // It is required to support the DR-to-cloud usecase where we replicate an - // on-prem entity to a cluster running in cloud, bring it up using - // "convert and deploy" mechanism, protect it using a cloud job that uses - // physical adapter, and convert it back to the on-prem format before - // replication. - // - // Before replicating, we need to update the backup task state of the backed - // up entity using the on-prem entity and on-prem entity's parent. - // The id is used to lookup the restore entity that contains details about - // the on-prem entity. - // - // It is set at the time of refreshing the cloud entity hierarchy if all the - // following conditions are met: - // Name of the current entity matches with name of any cloud entity - // deployed using the "convert and deploy" restore task. - // Restore entity associated with the above matched cloud entity has - // 'failed_over' flag set to true in its cloud extension. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Specifies the list of GCP tag attributes. - TagAttributes []*TagAttribute `json:"tagAttributes"` - - // Specifies the type of an GCP Protection Source Object such as - // 'kIAMUser', 'kProject', 'kRegion', etc. - // Specifies the type of a GCP source entity. - // 'kIAMUser' indicates a unique user within a GCP account. - // 'kProject' represents compute resources and storage. - // 'kRegion' indicates a geographical region in the global infrastructure. - // 'kAvailabilityZone' indicates an availability zone within a region. - // 'kVirtualMachine' indicates a Virtual Machine running in GCP environment. - // 'kVPC' indicates a virtual private cloud (VPC) network within GCP. - // 'kSubnet' indicates a subnet inside the VPC. - // 'kNetworkSecurityGroup' represents a network security group. - // 'kInstanceType' represents various machine types. - // 'kLabel' represents a label present on the instances. - // 'kMetaData' represents a custom metadata present on instances. - // 'kTag' represents a network tag on instances. - // 'kVPCConnector' represents a VPC connector used for serverless VPC access. - // Enum: ["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"] - Type *string `json:"type,omitempty"` - - // Specifies the VPC Network to deploy proxy VMs. - VpcNetwork *string `json:"vpcNetwork,omitempty"` - - // Specifies the subnetwork to deploy proxy VMs. - VpcSubnetwork *string `json:"vpcSubnetwork,omitempty"` -} - -// Validate validates this gcp protection source -func (m *GcpProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpDiskInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpProtectionSource) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *GcpProtectionSource) validateGcpDiskInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.GcpDiskInfoList) { // not required - return nil - } - - for i := 0; i < len(m.GcpDiskInfoList); i++ { - if swag.IsZero(m.GcpDiskInfoList[i]) { // not required - continue - } - - if m.GcpDiskInfoList[i] != nil { - if err := m.GcpDiskInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpDiskInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpDiskInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GcpProtectionSource) validateGcpFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if m.GcpFleetParams != nil { - if err := m.GcpFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -var gcpProtectionSourceTypeGcpTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpProtectionSourceTypeGcpTypePropEnum = append(gcpProtectionSourceTypeGcpTypePropEnum, v) - } -} - -const ( - - // GcpProtectionSourceGcpTypeKIAMUser captures enum value "kIAMUser" - GcpProtectionSourceGcpTypeKIAMUser string = "kIAMUser" - - // GcpProtectionSourceGcpTypeKProject captures enum value "kProject" - GcpProtectionSourceGcpTypeKProject string = "kProject" - - // GcpProtectionSourceGcpTypeKRegion captures enum value "kRegion" - GcpProtectionSourceGcpTypeKRegion string = "kRegion" - - // GcpProtectionSourceGcpTypeKAvailabilityZone captures enum value "kAvailabilityZone" - GcpProtectionSourceGcpTypeKAvailabilityZone string = "kAvailabilityZone" - - // GcpProtectionSourceGcpTypeKVirtualMachine captures enum value "kVirtualMachine" - GcpProtectionSourceGcpTypeKVirtualMachine string = "kVirtualMachine" - - // GcpProtectionSourceGcpTypeKVPC captures enum value "kVPC" - GcpProtectionSourceGcpTypeKVPC string = "kVPC" - - // GcpProtectionSourceGcpTypeKSubnet captures enum value "kSubnet" - GcpProtectionSourceGcpTypeKSubnet string = "kSubnet" - - // GcpProtectionSourceGcpTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - GcpProtectionSourceGcpTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // GcpProtectionSourceGcpTypeKInstanceType captures enum value "kInstanceType" - GcpProtectionSourceGcpTypeKInstanceType string = "kInstanceType" - - // GcpProtectionSourceGcpTypeKLabel captures enum value "kLabel" - GcpProtectionSourceGcpTypeKLabel string = "kLabel" - - // GcpProtectionSourceGcpTypeKMetadata captures enum value "kMetadata" - GcpProtectionSourceGcpTypeKMetadata string = "kMetadata" - - // GcpProtectionSourceGcpTypeKTag captures enum value "kTag" - GcpProtectionSourceGcpTypeKTag string = "kTag" - - // GcpProtectionSourceGcpTypeKVPCConnector captures enum value "kVPCConnector" - GcpProtectionSourceGcpTypeKVPCConnector string = "kVPCConnector" -) - -// prop value enum -func (m *GcpProtectionSource) validateGcpTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpProtectionSourceTypeGcpTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpProtectionSource) validateGcpType(formats strfmt.Registry) error { - if swag.IsZero(m.GcpType) { // not required - return nil - } - - // value enum - if err := m.validateGcpTypeEnum("gcpType", "body", *m.GcpType); err != nil { - return err - } - - return nil -} - -var gcpProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpProtectionSourceTypeHostTypePropEnum = append(gcpProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // GcpProtectionSourceHostTypeKLinux captures enum value "kLinux" - GcpProtectionSourceHostTypeKLinux string = "kLinux" - - // GcpProtectionSourceHostTypeKWindows captures enum value "kWindows" - GcpProtectionSourceHostTypeKWindows string = "kWindows" - - // GcpProtectionSourceHostTypeKAix captures enum value "kAix" - GcpProtectionSourceHostTypeKAix string = "kAix" - - // GcpProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - GcpProtectionSourceHostTypeKSolaris string = "kSolaris" - - // GcpProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - GcpProtectionSourceHostTypeKSapHana string = "kSapHana" - - // GcpProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - GcpProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // GcpProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - GcpProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // GcpProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - GcpProtectionSourceHostTypeKMySQL string = "kMySQL" - - // GcpProtectionSourceHostTypeKOther captures enum value "kOther" - GcpProtectionSourceHostTypeKOther string = "kOther" - - // GcpProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - GcpProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // GcpProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - GcpProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // GcpProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - GcpProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // GcpProtectionSourceHostTypeKDB2 captures enum value "kDB2" - GcpProtectionSourceHostTypeKDB2 string = "kDB2" - - // GcpProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - GcpProtectionSourceHostTypeKSapASE string = "kSapASE" - - // GcpProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - GcpProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // GcpProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - GcpProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // GcpProtectionSourceHostTypeKVOS captures enum value "kVOS" - GcpProtectionSourceHostTypeKVOS string = "kVOS" - - // GcpProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - GcpProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *GcpProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *GcpProtectionSource) validateTagAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributes) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributes); i++ { - if swag.IsZero(m.TagAttributes[i]) { // not required - continue - } - - if m.TagAttributes[i] != nil { - if err := m.TagAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var gcpProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIAMUser","kProject","kRegion","kAvailabilityZone","kVirtualMachine","kVPC","kSubnet","kNetworkSecurityGroup","kInstanceType","kLabel","kMetadata","kTag","kVPCConnector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpProtectionSourceTypeTypePropEnum = append(gcpProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // GcpProtectionSourceTypeKIAMUser captures enum value "kIAMUser" - GcpProtectionSourceTypeKIAMUser string = "kIAMUser" - - // GcpProtectionSourceTypeKProject captures enum value "kProject" - GcpProtectionSourceTypeKProject string = "kProject" - - // GcpProtectionSourceTypeKRegion captures enum value "kRegion" - GcpProtectionSourceTypeKRegion string = "kRegion" - - // GcpProtectionSourceTypeKAvailabilityZone captures enum value "kAvailabilityZone" - GcpProtectionSourceTypeKAvailabilityZone string = "kAvailabilityZone" - - // GcpProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - GcpProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // GcpProtectionSourceTypeKVPC captures enum value "kVPC" - GcpProtectionSourceTypeKVPC string = "kVPC" - - // GcpProtectionSourceTypeKSubnet captures enum value "kSubnet" - GcpProtectionSourceTypeKSubnet string = "kSubnet" - - // GcpProtectionSourceTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - GcpProtectionSourceTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // GcpProtectionSourceTypeKInstanceType captures enum value "kInstanceType" - GcpProtectionSourceTypeKInstanceType string = "kInstanceType" - - // GcpProtectionSourceTypeKLabel captures enum value "kLabel" - GcpProtectionSourceTypeKLabel string = "kLabel" - - // GcpProtectionSourceTypeKMetadata captures enum value "kMetadata" - GcpProtectionSourceTypeKMetadata string = "kMetadata" - - // GcpProtectionSourceTypeKTag captures enum value "kTag" - GcpProtectionSourceTypeKTag string = "kTag" - - // GcpProtectionSourceTypeKVPCConnector captures enum value "kVPCConnector" - GcpProtectionSourceTypeKVPCConnector string = "kVPCConnector" -) - -// prop value enum -func (m *GcpProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gcp protection source based on the context it is used -func (m *GcpProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpDiskInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpProtectionSource) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *GcpProtectionSource) contextValidateGcpDiskInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GcpDiskInfoList); i++ { - - if m.GcpDiskInfoList[i] != nil { - - if swag.IsZero(m.GcpDiskInfoList[i]) { // not required - return nil - } - - if err := m.GcpDiskInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpDiskInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpDiskInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GcpProtectionSource) contextValidateGcpFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpFleetParams != nil { - - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if err := m.GcpFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -func (m *GcpProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributes); i++ { - - if m.TagAttributes[i] != nil { - - if swag.IsZero(m.TagAttributes[i]) { // not required - return nil - } - - if err := m.TagAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpProtectionSource) UnmarshalBinary(b []byte) error { - var res GcpProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gdpr_copy_task.go b/v1/models/gdpr_copy_task.go deleted file mode 100644 index 2a19b631..00000000 --- a/v1/models/gdpr_copy_task.go +++ /dev/null @@ -1,74 +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" -) - -// GdprCopyTask GDPR Copy Task. -// -// CopyTask defines the copy tasks of a job. -// -// swagger:model GdprCopyTask -type GdprCopyTask struct { - - // Specifies the job with which this copy task is tied to. - // Note: this is only used for internal aggregation. - JobID *int64 `json:"JobId,omitempty"` - - // Specifies the cloud deploy target type. For example 'kAzure','kAWS', - // 'kGCP' - CloudTargetType *string `json:"cloudTargetType,omitempty"` - - // Specifies the expiry of the copy task. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the id for the target. - TargetID *int64 `json:"targetId,omitempty"` - - // Specifies the target of the replication or archival tasks. - TargetName *string `json:"targetName,omitempty"` - - // Specifies the total number of snapshots. - TotalSnapshots *int64 `json:"totalSnapshots,omitempty"` - - // Specifies details about the Copy Run of a Job Run. - // A Copy task copies snapshots resulted from a backup run to an external - // target which could be 'kLocal', 'kArchival', or 'kRemote'. - Type *string `json:"type,omitempty"` -} - -// Validate validates this gdpr copy task -func (m *GdprCopyTask) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gdpr copy task based on context it is used -func (m *GdprCopyTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GdprCopyTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GdprCopyTask) UnmarshalBinary(b []byte) error { - var res GdprCopyTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_all_job_runs_result.go b/v1/models/get_all_job_runs_result.go deleted file mode 100644 index ed914bf7..00000000 --- a/v1/models/get_all_job_runs_result.go +++ /dev/null @@ -1,314 +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" -) - -// GetAllJobRunsResult Specifies the common result structure of the response of all runs info ( -// protection, replication, archival etc.). -// -// swagger:model GetAllJobRunsResult -type GetAllJobRunsResult struct { - - // Specifies the end time of the run. - EndTimeMsecs *int64 `json:"endTimeMsecs,omitempty"` - - // Specifies the environment type of the job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - EnvType *string `json:"envType,omitempty"` - - // Specifies the job id. - JobID *string `json:"jobId,omitempty"` - - // Specifies the job name. - JobName *string `json:"jobName,omitempty"` - - // Specifies the job run id. - JobRunID *string `json:"jobRunId,omitempty"` - - // Specifies the job type, protection, replication, archival, apollo, - // indexing etc. - JobType *string `json:"jobType,omitempty"` - - // Specifies the start time of the run. - StartTimeMsecs *int64 `json:"startTimeMsecs,omitempty"` - - // Specifies the view box id. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this get all job runs result -func (m *GetAllJobRunsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var getAllJobRunsResultTypeEnvTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - getAllJobRunsResultTypeEnvTypePropEnum = append(getAllJobRunsResultTypeEnvTypePropEnum, v) - } -} - -const ( - - // GetAllJobRunsResultEnvTypeKVMware captures enum value "kVMware" - GetAllJobRunsResultEnvTypeKVMware string = "kVMware" - - // GetAllJobRunsResultEnvTypeKHyperV captures enum value "kHyperV" - GetAllJobRunsResultEnvTypeKHyperV string = "kHyperV" - - // GetAllJobRunsResultEnvTypeKSQL captures enum value "kSQL" - GetAllJobRunsResultEnvTypeKSQL string = "kSQL" - - // GetAllJobRunsResultEnvTypeKView captures enum value "kView" - GetAllJobRunsResultEnvTypeKView string = "kView" - - // GetAllJobRunsResultEnvTypeKPuppeteer captures enum value "kPuppeteer" - GetAllJobRunsResultEnvTypeKPuppeteer string = "kPuppeteer" - - // GetAllJobRunsResultEnvTypeKPhysical captures enum value "kPhysical" - GetAllJobRunsResultEnvTypeKPhysical string = "kPhysical" - - // GetAllJobRunsResultEnvTypeKPure captures enum value "kPure" - GetAllJobRunsResultEnvTypeKPure string = "kPure" - - // GetAllJobRunsResultEnvTypeKNimble captures enum value "kNimble" - GetAllJobRunsResultEnvTypeKNimble string = "kNimble" - - // GetAllJobRunsResultEnvTypeKIbmFlashSystem captures enum value "kIbmFlashSystem" - GetAllJobRunsResultEnvTypeKIbmFlashSystem string = "kIbmFlashSystem" - - // GetAllJobRunsResultEnvTypeKAzure captures enum value "kAzure" - GetAllJobRunsResultEnvTypeKAzure string = "kAzure" - - // GetAllJobRunsResultEnvTypeKNetapp captures enum value "kNetapp" - GetAllJobRunsResultEnvTypeKNetapp string = "kNetapp" - - // GetAllJobRunsResultEnvTypeKAgent captures enum value "kAgent" - GetAllJobRunsResultEnvTypeKAgent string = "kAgent" - - // GetAllJobRunsResultEnvTypeKGenericNas captures enum value "kGenericNas" - GetAllJobRunsResultEnvTypeKGenericNas string = "kGenericNas" - - // GetAllJobRunsResultEnvTypeKAcropolis captures enum value "kAcropolis" - GetAllJobRunsResultEnvTypeKAcropolis string = "kAcropolis" - - // GetAllJobRunsResultEnvTypeKPhysicalFiles captures enum value "kPhysicalFiles" - GetAllJobRunsResultEnvTypeKPhysicalFiles string = "kPhysicalFiles" - - // GetAllJobRunsResultEnvTypeKIsilon captures enum value "kIsilon" - GetAllJobRunsResultEnvTypeKIsilon string = "kIsilon" - - // GetAllJobRunsResultEnvTypeKGPFS captures enum value "kGPFS" - GetAllJobRunsResultEnvTypeKGPFS string = "kGPFS" - - // GetAllJobRunsResultEnvTypeKKVM captures enum value "kKVM" - GetAllJobRunsResultEnvTypeKKVM string = "kKVM" - - // GetAllJobRunsResultEnvTypeKAWS captures enum value "kAWS" - GetAllJobRunsResultEnvTypeKAWS string = "kAWS" - - // GetAllJobRunsResultEnvTypeKExchange captures enum value "kExchange" - GetAllJobRunsResultEnvTypeKExchange string = "kExchange" - - // GetAllJobRunsResultEnvTypeKHyperVVSS captures enum value "kHyperVVSS" - GetAllJobRunsResultEnvTypeKHyperVVSS string = "kHyperVVSS" - - // GetAllJobRunsResultEnvTypeKOracle captures enum value "kOracle" - GetAllJobRunsResultEnvTypeKOracle string = "kOracle" - - // GetAllJobRunsResultEnvTypeKGCP captures enum value "kGCP" - GetAllJobRunsResultEnvTypeKGCP string = "kGCP" - - // GetAllJobRunsResultEnvTypeKFlashBlade captures enum value "kFlashBlade" - GetAllJobRunsResultEnvTypeKFlashBlade string = "kFlashBlade" - - // GetAllJobRunsResultEnvTypeKAWSNative captures enum value "kAWSNative" - GetAllJobRunsResultEnvTypeKAWSNative string = "kAWSNative" - - // GetAllJobRunsResultEnvTypeKO365 captures enum value "kO365" - GetAllJobRunsResultEnvTypeKO365 string = "kO365" - - // GetAllJobRunsResultEnvTypeKO365Outlook captures enum value "kO365Outlook" - GetAllJobRunsResultEnvTypeKO365Outlook string = "kO365Outlook" - - // GetAllJobRunsResultEnvTypeKHyperFlex captures enum value "kHyperFlex" - GetAllJobRunsResultEnvTypeKHyperFlex string = "kHyperFlex" - - // GetAllJobRunsResultEnvTypeKGCPNative captures enum value "kGCPNative" - GetAllJobRunsResultEnvTypeKGCPNative string = "kGCPNative" - - // GetAllJobRunsResultEnvTypeKAzureNative captures enum value "kAzureNative" - GetAllJobRunsResultEnvTypeKAzureNative string = "kAzureNative" - - // GetAllJobRunsResultEnvTypeKKubernetes captures enum value "kKubernetes" - GetAllJobRunsResultEnvTypeKKubernetes string = "kKubernetes" - - // GetAllJobRunsResultEnvTypeKElastifile captures enum value "kElastifile" - GetAllJobRunsResultEnvTypeKElastifile string = "kElastifile" - - // GetAllJobRunsResultEnvTypeKAD captures enum value "kAD" - GetAllJobRunsResultEnvTypeKAD string = "kAD" - - // GetAllJobRunsResultEnvTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - GetAllJobRunsResultEnvTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // GetAllJobRunsResultEnvTypeKCassandra captures enum value "kCassandra" - GetAllJobRunsResultEnvTypeKCassandra string = "kCassandra" - - // GetAllJobRunsResultEnvTypeKMongoDB captures enum value "kMongoDB" - GetAllJobRunsResultEnvTypeKMongoDB string = "kMongoDB" - - // GetAllJobRunsResultEnvTypeKCouchbase captures enum value "kCouchbase" - GetAllJobRunsResultEnvTypeKCouchbase string = "kCouchbase" - - // GetAllJobRunsResultEnvTypeKHdfs captures enum value "kHdfs" - GetAllJobRunsResultEnvTypeKHdfs string = "kHdfs" - - // GetAllJobRunsResultEnvTypeKHive captures enum value "kHive" - GetAllJobRunsResultEnvTypeKHive string = "kHive" - - // GetAllJobRunsResultEnvTypeKHBase captures enum value "kHBase" - GetAllJobRunsResultEnvTypeKHBase string = "kHBase" - - // GetAllJobRunsResultEnvTypeKUDA captures enum value "kUDA" - GetAllJobRunsResultEnvTypeKUDA string = "kUDA" - - // GetAllJobRunsResultEnvTypeKO365Teams captures enum value "kO365Teams" - GetAllJobRunsResultEnvTypeKO365Teams string = "kO365Teams" - - // GetAllJobRunsResultEnvTypeKO365Group captures enum value "kO365Group" - GetAllJobRunsResultEnvTypeKO365Group string = "kO365Group" - - // GetAllJobRunsResultEnvTypeKO365Exchange captures enum value "kO365Exchange" - GetAllJobRunsResultEnvTypeKO365Exchange string = "kO365Exchange" - - // GetAllJobRunsResultEnvTypeKO365OneDrive captures enum value "kO365OneDrive" - GetAllJobRunsResultEnvTypeKO365OneDrive string = "kO365OneDrive" - - // GetAllJobRunsResultEnvTypeKO365Sharepoint captures enum value "kO365Sharepoint" - GetAllJobRunsResultEnvTypeKO365Sharepoint string = "kO365Sharepoint" - - // GetAllJobRunsResultEnvTypeKO365PublicFolders captures enum value "kO365PublicFolders" - GetAllJobRunsResultEnvTypeKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *GetAllJobRunsResult) validateEnvTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, getAllJobRunsResultTypeEnvTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GetAllJobRunsResult) validateEnvType(formats strfmt.Registry) error { - if swag.IsZero(m.EnvType) { // not required - return nil - } - - // value enum - if err := m.validateEnvTypeEnum("envType", "body", *m.EnvType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this get all job runs result based on context it is used -func (m *GetAllJobRunsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetAllJobRunsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetAllJobRunsResult) UnmarshalBinary(b []byte) error { - var res GetAllJobRunsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_backup_job_runs_result_wrapper.go b/v1/models/get_backup_job_runs_result_wrapper.go deleted file mode 100644 index 30ea7c60..00000000 --- a/v1/models/get_backup_job_runs_result_wrapper.go +++ /dev/null @@ -1,175 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetBackupJobRunsResultWrapper get backup job runs result wrapper -// -// swagger:model GetBackupJobRunsResultWrapper -type GetBackupJobRunsResultWrapper struct { - - // BackupJobRuns is the struct for BackupJobRunsProto used by magneto. - BackupJobRuns *BackupJobRunsProto `json:"backupJobRuns,omitempty"` - - // Extension field - Extensions map[string]interface{} `json:"extensions,omitempty"` - - // Tenant information of tenants having access to the backup job. - Tenants []*TenantInfo `json:"tenants"` -} - -// Validate validates this get backup job runs result wrapper -func (m *GetBackupJobRunsResultWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupJobRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetBackupJobRunsResultWrapper) validateBackupJobRuns(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJobRuns) { // not required - return nil - } - - if m.BackupJobRuns != nil { - if err := m.BackupJobRuns.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobRuns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobRuns") - } - return err - } - } - - return nil -} - -func (m *GetBackupJobRunsResultWrapper) validateTenants(formats strfmt.Registry) error { - if swag.IsZero(m.Tenants) { // not required - return nil - } - - for i := 0; i < len(m.Tenants); i++ { - if swag.IsZero(m.Tenants[i]) { // not required - continue - } - - if m.Tenants[i] != nil { - if err := m.Tenants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get backup job runs result wrapper based on the context it is used -func (m *GetBackupJobRunsResultWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupJobRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenants(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetBackupJobRunsResultWrapper) contextValidateBackupJobRuns(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupJobRuns != nil { - - if swag.IsZero(m.BackupJobRuns) { // not required - return nil - } - - if err := m.BackupJobRuns.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobRuns") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobRuns") - } - return err - } - } - - return nil -} - -func (m *GetBackupJobRunsResultWrapper) contextValidateTenants(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tenants); i++ { - - if m.Tenants[i] != nil { - - if swag.IsZero(m.Tenants[i]) { // not required - return nil - } - - if err := m.Tenants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetBackupJobRunsResultWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetBackupJobRunsResultWrapper) UnmarshalBinary(b []byte) error { - var res GetBackupJobRunsResultWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_consumer_stats_result.go b/v1/models/get_consumer_stats_result.go deleted file mode 100644 index 6f76560c..00000000 --- a/v1/models/get_consumer_stats_result.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetConsumerStatsResult GetConsumerStatsResult -// -// GetConsumerStatsResult is the result of get consumerStats api. -// -// swagger:model GetConsumerStatsResult -type GetConsumerStatsResult struct { - - // Specifies an opaque string to pass to get the next set of active opens. - // If null is returned, this response is the last set of active opens. - Cookie *string `json:"cookie,omitempty"` - - // Specifies a list of consumer stats. - StatsList []*ConsumerStats `json:"statsList"` -} - -// Validate validates this get consumer stats result -func (m *GetConsumerStatsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetConsumerStatsResult) validateStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.StatsList) { // not required - return nil - } - - for i := 0; i < len(m.StatsList); i++ { - if swag.IsZero(m.StatsList[i]) { // not required - continue - } - - if m.StatsList[i] != nil { - if err := m.StatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get consumer stats result based on the context it is used -func (m *GetConsumerStatsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetConsumerStatsResult) contextValidateStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsList); i++ { - - if m.StatsList[i] != nil { - - if swag.IsZero(m.StatsList[i]) { // not required - return nil - } - - if err := m.StatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetConsumerStatsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetConsumerStatsResult) UnmarshalBinary(b []byte) error { - var res GetConsumerStatsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_cracked_file_restore_info_result_file_info.go b/v1/models/get_cracked_file_restore_info_result_file_info.go deleted file mode 100644 index dc3714c3..00000000 --- a/v1/models/get_cracked_file_restore_info_result_file_info.go +++ /dev/null @@ -1,169 +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" -) - -// GetCrackedFileRestoreInfoResultFileInfo This message represents all the restore information on one -// file/directory. -// -// swagger:model GetCrackedFileRestoreInfoResult_FileInfo -type GetCrackedFileRestoreInfoResultFileInfo struct { - - // The status code for each file is returned here. If this error is set, - // it means we fail to get information for this file or file is not present - // in this instance id. - FileError *PrivateErrorProto `json:"fileError,omitempty"` - - // The name of the file/directory. - Filename *string `json:"filename,omitempty"` - - // Whether the file path is directory. - IsDirectory *bool `json:"isDirectory,omitempty"` - - // Volume information. - VolumeInfo *PrivateVolumeInfo `json:"volumeInfo,omitempty"` -} - -// Validate validates this get cracked file restore info result file info -func (m *GetCrackedFileRestoreInfoResultFileInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileRestoreInfoResultFileInfo) validateFileError(formats strfmt.Registry) error { - if swag.IsZero(m.FileError) { // not required - return nil - } - - if m.FileError != nil { - if err := m.FileError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileError") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileRestoreInfoResultFileInfo) validateVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if m.VolumeInfo != nil { - if err := m.VolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get cracked file restore info result file info based on the context it is used -func (m *GetCrackedFileRestoreInfoResultFileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileRestoreInfoResultFileInfo) contextValidateFileError(ctx context.Context, formats strfmt.Registry) error { - - if m.FileError != nil { - - if swag.IsZero(m.FileError) { // not required - return nil - } - - if err := m.FileError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileError") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileRestoreInfoResultFileInfo) contextValidateVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeInfo != nil { - - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if err := m.VolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetCrackedFileRestoreInfoResultFileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetCrackedFileRestoreInfoResultFileInfo) UnmarshalBinary(b []byte) error { - var res GetCrackedFileRestoreInfoResultFileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_cracked_file_versions_result.go b/v1/models/get_cracked_file_versions_result.go deleted file mode 100644 index 841f31fb..00000000 --- a/v1/models/get_cracked_file_versions_result.go +++ /dev/null @@ -1,241 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetCrackedFileVersionsResult get cracked file versions result -// -// swagger:model GetCrackedFileVersionsResult -type GetCrackedFileVersionsResult struct { - - // The status code of the http rpc is returned here. - Error *PrivateErrorProto `json:"error,omitempty"` - - // If for some reason, we can't access the exact versions where this file was - // present, Yoda may provide information about object snapshots. Not all of - // them are guaranteed to have the file though and this is a rare fallback. - FromObjectSnapshots *bool `json:"fromObjectSnapshots,omitempty"` - - // The versions that have the requested file. These are returned in - // descending order of timestamp. - // DEPRECATED. Use VersionInfo below. - InstanceIds []*MagnetoInstanceID `json:"instanceIds"` - - // versions - Versions []*GetCrackedFileVersionsResultVersionInfo `json:"versions"` -} - -// Validate validates this get cracked file versions result -func (m *GetCrackedFileVersionsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstanceIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileVersionsResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *GetCrackedFileVersionsResult) validateInstanceIds(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceIds) { // not required - return nil - } - - for i := 0; i < len(m.InstanceIds); i++ { - if swag.IsZero(m.InstanceIds[i]) { // not required - continue - } - - if m.InstanceIds[i] != nil { - if err := m.InstanceIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetCrackedFileVersionsResult) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required - return nil - } - - for i := 0; i < len(m.Versions); i++ { - if swag.IsZero(m.Versions[i]) { // not required - continue - } - - if m.Versions[i] != nil { - if err := m.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get cracked file versions result based on the context it is used -func (m *GetCrackedFileVersionsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstanceIds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileVersionsResult) 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 -} - -func (m *GetCrackedFileVersionsResult) contextValidateInstanceIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InstanceIds); i++ { - - if m.InstanceIds[i] != nil { - - if swag.IsZero(m.InstanceIds[i]) { // not required - return nil - } - - if err := m.InstanceIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetCrackedFileVersionsResult) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Versions); i++ { - - if m.Versions[i] != nil { - - if swag.IsZero(m.Versions[i]) { // not required - return nil - } - - if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetCrackedFileVersionsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetCrackedFileVersionsResult) UnmarshalBinary(b []byte) error { - var res GetCrackedFileVersionsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_cracked_file_versions_result_version_info.go b/v1/models/get_cracked_file_versions_result_version_info.go deleted file mode 100644 index 8c3353fa..00000000 --- a/v1/models/get_cracked_file_versions_result_version_info.go +++ /dev/null @@ -1,238 +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" -) - -// GetCrackedFileVersionsResultVersionInfo The versions that have the requested file. These are returned in -// descending order of timestamp. -// -// swagger:model GetCrackedFileVersionsResult_VersionInfo -type GetCrackedFileVersionsResultVersionInfo struct { - - // Source inode id metadata for certain adapters e.g. Netapp. - BackupSourceInodeID *int64 `json:"backupSourceInodeId,omitempty"` - - // Set to true if version has archival replca. - HasArchivalReplica *bool `json:"hasArchivalReplica,omitempty"` - - // Set to true if version has local replica. - HasLocalReplica *bool `json:"hasLocalReplica,omitempty"` - - // Set to true if version has remote replica. - HasRemoteReplica *bool `json:"hasRemoteReplica,omitempty"` - - // Magneto instance id. - InstanceID *MagnetoInstanceID `json:"instanceId,omitempty"` - - // Mtime of the file. - MtimeUsecs *int64 `json:"mtimeUsecs,omitempty"` - - // Replica and expiry information where this file is present. - ReplicaInfo *SnapshotReplicas `json:"replicaInfo,omitempty"` - - // The type of the backup run that was actually scheduled. - ScheduledBackupType *int32 `json:"scheduledBackupType,omitempty"` - - // File size in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Some metadata can get changed between snapshots. For example, Folder ID - // of sub-folders in a root Public Folder (Office 365) can get changed due - // to folder recreation with same name on the same path. cfile doc will - // keep it as a different file version, but this changed metadata - // (identifier) need to be used by Recovery as it should pick the correct - // identifier based on snapshot selected for the item. - VersionMetadata *GetCrackedFileVersionsResultVersionInfoVersionMetadata `json:"versionMetadata,omitempty"` -} - -// Validate validates this get cracked file versions result version info -func (m *GetCrackedFileVersionsResultVersionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicaInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersionMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) validateInstanceID(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if m.InstanceID != nil { - if err := m.InstanceID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) validateReplicaInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaInfo) { // not required - return nil - } - - if m.ReplicaInfo != nil { - if err := m.ReplicaInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfo") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) validateVersionMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.VersionMetadata) { // not required - return nil - } - - if m.VersionMetadata != nil { - if err := m.VersionMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get cracked file versions result version info based on the context it is used -func (m *GetCrackedFileVersionsResultVersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstanceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicaInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersionMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) contextValidateInstanceID(ctx context.Context, formats strfmt.Registry) error { - - if m.InstanceID != nil { - - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if err := m.InstanceID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) contextValidateReplicaInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicaInfo != nil { - - if swag.IsZero(m.ReplicaInfo) { // not required - return nil - } - - if err := m.ReplicaInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfo") - } - return err - } - } - - return nil -} - -func (m *GetCrackedFileVersionsResultVersionInfo) contextValidateVersionMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.VersionMetadata != nil { - - if swag.IsZero(m.VersionMetadata) { // not required - return nil - } - - if err := m.VersionMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetCrackedFileVersionsResultVersionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetCrackedFileVersionsResultVersionInfo) UnmarshalBinary(b []byte) error { - var res GetCrackedFileVersionsResultVersionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_cracked_file_versions_result_version_info_version_metadata.go b/v1/models/get_cracked_file_versions_result_version_info_version_metadata.go deleted file mode 100644 index 95c02e0b..00000000 --- a/v1/models/get_cracked_file_versions_result_version_info_version_metadata.go +++ /dev/null @@ -1,50 +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" -) - -// GetCrackedFileVersionsResultVersionInfoVersionMetadata get cracked file versions result version info version metadata -// -// swagger:model GetCrackedFileVersionsResult_VersionInfo_VersionMetadata -type GetCrackedFileVersionsResultVersionInfoVersionMetadata struct { - - // unique item identifier - UniqueItemIdentifier *string `json:"uniqueItemIdentifier,omitempty"` -} - -// Validate validates this get cracked file versions result version info version metadata -func (m *GetCrackedFileVersionsResultVersionInfoVersionMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get cracked file versions result version info version metadata based on context it is used -func (m *GetCrackedFileVersionsResultVersionInfoVersionMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetCrackedFileVersionsResultVersionInfoVersionMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetCrackedFileVersionsResultVersionInfoVersionMetadata) UnmarshalBinary(b []byte) error { - var res GetCrackedFileVersionsResultVersionInfoVersionMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_entity_hierarchy_result_object_based_protection_info.go b/v1/models/get_entity_hierarchy_result_object_based_protection_info.go deleted file mode 100644 index 54dacbdb..00000000 --- a/v1/models/get_entity_hierarchy_result_object_based_protection_info.go +++ /dev/null @@ -1,59 +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" -) - -// GetEntityHierarchyResultObjectBasedProtectionInfo get entity hierarchy result object based protection info -// -// swagger:model GetEntityHierarchyResult_ObjectBasedProtectionInfo -type GetEntityHierarchyResultObjectBasedProtectionInfo struct { - - // If the entity is protected via object based due to auto protect of one - // of its parent, this contains the parent entity id. This is populated - // only for leaf entities. - AutoProtectParentID *int64 `json:"autoProtectParentId,omitempty"` - - // The entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // Indicates whether the entity has an active object protection spec - // associated with it. - HasActiveObjectProtectionSpec *bool `json:"hasActiveObjectProtectionSpec,omitempty"` -} - -// Validate validates this get entity hierarchy result object based protection info -func (m *GetEntityHierarchyResultObjectBasedProtectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get entity hierarchy result object based protection info based on context it is used -func (m *GetEntityHierarchyResultObjectBasedProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetEntityHierarchyResultObjectBasedProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetEntityHierarchyResultObjectBasedProtectionInfo) UnmarshalBinary(b []byte) error { - var res GetEntityHierarchyResultObjectBasedProtectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_job_run_info_result.go b/v1/models/get_job_run_info_result.go deleted file mode 100644 index 161a8450..00000000 --- a/v1/models/get_job_run_info_result.go +++ /dev/null @@ -1,81 +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" -) - -// GetJobRunInfoResult Specifies the common result structure of the response of a job run. -// -// swagger:model GetJobRunInfoResult -type GetJobRunInfoResult struct { - - // Specifies bytes transferred in the run. - BytesTransferred *int64 `json:"bytesTransferred,omitempty"` - - // Specifies the end time of the run. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the number of failed objects in the run. - FailureEntities *int64 `json:"failureEntities,omitempty"` - - // Specifies the job id. - JobID *string `json:"jobId,omitempty"` - - // Specifies the job run id. - JobRunID *string `json:"jobRunId,omitempty"` - - // Specifies the job type, protection, replication, archival, apollo, - // indexing etc. - JobType *string `json:"jobType,omitempty"` - - // Specifies if the sla was violated the run. - SLAViolated *bool `json:"slaViolated,omitempty"` - - // Specifies the start time of the run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies status of the run - Status *int64 `json:"status,omitempty"` - - // Specifies the number successful objects in the run. - SuccessEntities *int64 `json:"successEntities,omitempty"` - - // Specifies the number of objects in the run. - TotalEntities *int64 `json:"totalEntities,omitempty"` -} - -// Validate validates this get job run info result -func (m *GetJobRunInfoResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get job run info result based on context it is used -func (m *GetJobRunInfoResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetJobRunInfoResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetJobRunInfoResult) UnmarshalBinary(b []byte) error { - var res GetJobRunInfoResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_m_r_jar_upload_path_result.go b/v1/models/get_m_r_jar_upload_path_result.go deleted file mode 100644 index db450b2e..00000000 --- a/v1/models/get_m_r_jar_upload_path_result.go +++ /dev/null @@ -1,114 +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" -) - -// GetMRJarUploadPathResult User can upload jar files containing mappers and reducers. Iris will upload -// these jar files in Yoda's internal view. Yoda will mount its internal view -// and send Iris the mount point. -// -// swagger:model GetMRJarUploadPathResult -type GetMRJarUploadPathResult struct { - - // Status code for this http rpc. - Error *ErrorProto `json:"error,omitempty"` - - // Path where Jars can be uploaded by Iris. - JarUploadPath *string `json:"jarUploadPath,omitempty"` -} - -// Validate validates this get m r jar upload path result -func (m *GetMRJarUploadPathResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetMRJarUploadPathResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this get m r jar upload path result based on the context it is used -func (m *GetMRJarUploadPathResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetMRJarUploadPathResult) 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 -} - -// MarshalBinary interface implementation -func (m *GetMRJarUploadPathResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetMRJarUploadPathResult) UnmarshalBinary(b []byte) error { - var res GetMRJarUploadPathResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_map_reduce_app_runs_params.go b/v1/models/get_map_reduce_app_runs_params.go deleted file mode 100644 index a0ff3165..00000000 --- a/v1/models/get_map_reduce_app_runs_params.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/strfmt" - "github.com/go-openapi/swag" -) - -// GetMapReduceAppRunsParams Get Map Reduce App Run Parameters. -// -// GetMapReduceAppRunsParams specifies the input params to fetch the map reduce -// application runs. -// -// swagger:model GetMapReduceAppRunsParams -type GetMapReduceAppRunsParams struct { - - // ApplicationId is the Id of the map reduce application. - AppID *int64 `json:"appId,omitempty"` - - // ApplicationInstanceId is the Id of the map reduce application instance. - AppInstanceID *int64 `json:"appInstanceId,omitempty"` - - // If this flag is true, then send details of instance, else send only - // RunInfo. - IncludeDetails *bool `json:"includeDetails,omitempty"` - - // Give last N instance of an app based on end time. - LastNumInstances *int32 `json:"lastNumInstances,omitempty"` - - // MaxRunEndTimestampInSecs specifies the maximum job run end timestamp - // in seconds. App run instances with end time less than equal to - // MaxRunEndTimestampInSecs will be selected. Default is LONG_MAX (inf). - MaxRunEndTimeInSecs *int64 `json:"maxRunEndTimeInSecs,omitempty"` - - // MaxRunStartTimestampInSecs specifies the maximum job run start timestamp - // in seconds. App run instances with start time less than equal to - // MaxRunStartTimestampInSecs will be selected. Default is LONG_MAX (inf). - MaxRunStartTimeInSecs *int64 `json:"maxRunStartTimeInSecs,omitempty"` - - // MinRunEndTimestampInSecs specifies the minimum job run end timestamp - // in seconds. App run instances with end time greater than equal to - // MinRunEndTimestampInSecs will be selected. Default is 0, i.e. beginning - // of time. - MinRunEndTimeInSecs *int64 `json:"minRunEndTimeInSecs,omitempty"` - - // MinRunStartTimestampInSecs specifies the minimum job run start timestamp - // in seconds. App run instances with start time greater than equal to - // MinRunStartTimestampInSecs will be selected. Default is 0, i.e. beginning - // of time. - MinRunStartTimeInSecs *int64 `json:"minRunStartTimeInSecs,omitempty"` - - // Number of results to be displayed on a page. - PageSize *int32 `json:"pageSize,omitempty"` - - // Filter instances based on the map reduce application run status. - RunStatus *string `json:"runStatus,omitempty"` - - // Start offset for pagination from where result needs to be fetched. - StartOffset *int32 `json:"startOffset,omitempty"` -} - -// Validate validates this get map reduce app runs params -func (m *GetMapReduceAppRunsParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get map reduce app runs params based on context it is used -func (m *GetMapReduceAppRunsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetMapReduceAppRunsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetMapReduceAppRunsParams) UnmarshalBinary(b []byte) error { - var res GetMapReduceAppRunsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_objects_details_result.go b/v1/models/get_objects_details_result.go deleted file mode 100644 index 9fce6d89..00000000 --- a/v1/models/get_objects_details_result.go +++ /dev/null @@ -1,75 +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" -) - -// GetObjectsDetailsResult Specifies the common result structure of the objects response of a job run. -// -// swagger:model GetObjectsDetailsResult -type GetObjectsDetailsResult struct { - - // Specifies the end time of the run. - EndTimeMsecs *int64 `json:"endTimeMsecs,omitempty"` - - // Specifies the entity environment of the object. - EntityEnv *int64 `json:"entityEnv,omitempty"` - - // Specifies the entity id of the object. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the name of the entity. - EntityName *string `json:"entityName,omitempty"` - - // Specifies the job id. - JobID *string `json:"jobId,omitempty"` - - // Specifies the job run id. - JobRunID *string `json:"jobRunId,omitempty"` - - // Specifies the job type, protection, replication, archival, apollo, - // indexing etc. - JobType *string `json:"jobType,omitempty"` - - // Specifies the start time of the run. - StartTimeMsecs *int64 `json:"startTimeMsecs,omitempty"` - - // Specifies status of the object run. - Status *int64 `json:"status,omitempty"` -} - -// Validate validates this get objects details result -func (m *GetObjectsDetailsResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get objects details result based on context it is used -func (m *GetObjectsDetailsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetObjectsDetailsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetObjectsDetailsResult) UnmarshalBinary(b []byte) error { - var res GetObjectsDetailsResult - 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 deleted file mode 100644 index 3a87a1ef..00000000 --- a/v1/models/get_registration_info_response.go +++ /dev/null @@ -1,242 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetRegistrationInfoResponse Get Registration Information Response. -// -// Specifies the registration, protection and permission information of all or a -// subset of the registered Protection Source Trees or Views on the Cohesity -// Cluster. -// -// swagger:model GetRegistrationInfoResponse -type GetRegistrationInfoResponse struct { - - // Specifies the registration, protection and permission information of either - // all or a subset of registered Protection Sources matching the filter - // parameters. - // overrideDescription: true - RootNodes []*ProtectionSourceTreeInfo `json:"rootNodes"` - - // stats - Stats *GetRegistrationInfoResponseStats `json:"stats,omitempty"` - - // Specifies the breakdown of the stats by environment - // overrideDescription: true - StatsByEnv []*ProtectionSummaryByEnv `json:"statsByEnv"` -} - -// Validate validates this get registration info response -func (m *GetRegistrationInfoResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRootNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatsByEnv(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRegistrationInfoResponse) validateRootNodes(formats strfmt.Registry) error { - if swag.IsZero(m.RootNodes) { // not required - return nil - } - - for i := 0; i < len(m.RootNodes); i++ { - if swag.IsZero(m.RootNodes[i]) { // not required - continue - } - - if m.RootNodes[i] != nil { - if err := m.RootNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetRegistrationInfoResponse) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *GetRegistrationInfoResponse) validateStatsByEnv(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnv) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnv); i++ { - if swag.IsZero(m.StatsByEnv[i]) { // not required - continue - } - - if m.StatsByEnv[i] != nil { - if err := m.StatsByEnv[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get registration info response based on the context it is used -func (m *GetRegistrationInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRootNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatsByEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRegistrationInfoResponse) contextValidateRootNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RootNodes); i++ { - - if m.RootNodes[i] != nil { - - if swag.IsZero(m.RootNodes[i]) { // not required - return nil - } - - if err := m.RootNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *GetRegistrationInfoResponse) contextValidateStatsByEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnv); i++ { - - if m.StatsByEnv[i] != nil { - - if swag.IsZero(m.StatsByEnv[i]) { // not required - return nil - } - - if err := m.StatsByEnv[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetRegistrationInfoResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetRegistrationInfoResponse) UnmarshalBinary(b []byte) error { - var res GetRegistrationInfoResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/get_restore_app_time_ranges_arg.go b/v1/models/get_restore_app_time_ranges_arg.go deleted file mode 100644 index f63faf73..00000000 --- a/v1/models/get_restore_app_time_ranges_arg.go +++ /dev/null @@ -1,300 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetRestoreAppTimeRangesArg API to get the available restore time ranges for an application restore -// operation. In the example of SQL/Oracle restore, Iris will use this RPC -// to get the time ranges to which point-in-time database restore can be -// performed. -// -// swagger:model GetRestoreAppTimeRangesArg -type GetRestoreAppTimeRangesArg struct { - - // Specifies the request attributes. - APIRequestAttr *APIRequestAttr `json:"apiRequestAttr,omitempty"` - - // Specifies the API version used by this arg. - APIVersion *APIVersion `json:"apiVersion,omitempty"` - - // The set of owner restore objects for which application restore time - // ranges are desired. The owner restore object represents the full snapshot - // of the owner object (such as a VM) from which an application (such as SQL) - // needs to be restored to a point in time. Note that all the owner objects - // should represent the same entity (for example, the same VM). - OwnerObjectVec []*RestoreObject `json:"ownerObjectVec"` - - // The application level objects that needs to be restored. If a single - // object without its 'app_entity' is specified, the restore time ranges will - // apply to all application objects in the owner restore object. Otherwise - // the restore time ranges will only apply to the entities of these objects. - // If multiple objects are specified, the 'app_entity' field must be - // specified for all of them. - RestoreAppObjectVec []*RestoreAppObject `json:"restoreAppObjectVec"` - - // The application environment. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this get restore app time ranges arg -func (m *GetRestoreAppTimeRangesArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAPIRequestAttr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAPIVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerObjectVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppObjectVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRestoreAppTimeRangesArg) validateAPIRequestAttr(formats strfmt.Registry) error { - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if m.APIRequestAttr != nil { - if err := m.APIRequestAttr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) validateAPIVersion(formats strfmt.Registry) error { - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if m.APIVersion != nil { - if err := m.APIVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) validateOwnerObjectVec(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerObjectVec) { // not required - return nil - } - - for i := 0; i < len(m.OwnerObjectVec); i++ { - if swag.IsZero(m.OwnerObjectVec[i]) { // not required - continue - } - - if m.OwnerObjectVec[i] != nil { - if err := m.OwnerObjectVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) validateRestoreAppObjectVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppObjectVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreAppObjectVec); i++ { - if swag.IsZero(m.RestoreAppObjectVec[i]) { // not required - continue - } - - if m.RestoreAppObjectVec[i] != nil { - if err := m.RestoreAppObjectVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get restore app time ranges arg based on the context it is used -func (m *GetRestoreAppTimeRangesArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAPIRequestAttr(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAPIVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerObjectVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppObjectVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRestoreAppTimeRangesArg) contextValidateAPIRequestAttr(ctx context.Context, formats strfmt.Registry) error { - - if m.APIRequestAttr != nil { - - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if err := m.APIRequestAttr.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.APIVersion != nil { - - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if err := m.APIVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) contextValidateOwnerObjectVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OwnerObjectVec); i++ { - - if m.OwnerObjectVec[i] != nil { - - if swag.IsZero(m.OwnerObjectVec[i]) { // not required - return nil - } - - if err := m.OwnerObjectVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetRestoreAppTimeRangesArg) contextValidateRestoreAppObjectVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreAppObjectVec); i++ { - - if m.RestoreAppObjectVec[i] != nil { - - if swag.IsZero(m.RestoreAppObjectVec[i]) { // not required - return nil - } - - if err := m.RestoreAppObjectVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetRestoreAppTimeRangesArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetRestoreAppTimeRangesArg) UnmarshalBinary(b []byte) error { - var res GetRestoreAppTimeRangesArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_restore_app_time_ranges_result.go b/v1/models/get_restore_app_time_ranges_result.go deleted file mode 100644 index 4e59eb6f..00000000 --- a/v1/models/get_restore_app_time_ranges_result.go +++ /dev/null @@ -1,176 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetRestoreAppTimeRangesResult get restore app time ranges result -// -// swagger:model GetRestoreAppTimeRangesResult -type GetRestoreAppTimeRangesResult struct { - - // Error encountered by the RPC. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The time range information, given by the set of time ranges available for - // application restore, associated with each restore object in the - // 'owner_object_vec' of the GetRestoreAppTimeRangesArg request. There is - // a 1-1 correspondence between this vector and - // 'GetRestoreAppTimeRangesArg::owner_object_vec'. - OwnerObjectTimeRangeInfoVec []*TimeRangeInfo `json:"ownerObjectTimeRangeInfoVec"` -} - -// Validate validates this get restore app time ranges result -func (m *GetRestoreAppTimeRangesResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerObjectTimeRangeInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRestoreAppTimeRangesResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *GetRestoreAppTimeRangesResult) validateOwnerObjectTimeRangeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerObjectTimeRangeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.OwnerObjectTimeRangeInfoVec); i++ { - if swag.IsZero(m.OwnerObjectTimeRangeInfoVec[i]) { // not required - continue - } - - if m.OwnerObjectTimeRangeInfoVec[i] != nil { - if err := m.OwnerObjectTimeRangeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObjectTimeRangeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObjectTimeRangeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get restore app time ranges result based on the context it is used -func (m *GetRestoreAppTimeRangesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerObjectTimeRangeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetRestoreAppTimeRangesResult) 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 -} - -func (m *GetRestoreAppTimeRangesResult) contextValidateOwnerObjectTimeRangeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OwnerObjectTimeRangeInfoVec); i++ { - - if m.OwnerObjectTimeRangeInfoVec[i] != nil { - - if swag.IsZero(m.OwnerObjectTimeRangeInfoVec[i]) { // not required - return nil - } - - if err := m.OwnerObjectTimeRangeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerObjectTimeRangeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerObjectTimeRangeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetRestoreAppTimeRangesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetRestoreAppTimeRangesResult) UnmarshalBinary(b []byte) error { - var res GetRestoreAppTimeRangesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_tasks_arg.go b/v1/models/get_tasks_arg.go deleted file mode 100644 index b09ea681..00000000 --- a/v1/models/get_tasks_arg.go +++ /dev/null @@ -1,161 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetTasksArg get tasks arg -// -// swagger:model GetTasksArg -type GetTasksArg struct { - - // If specified, tasks matching the current query are futher filtered by - // these KeyValuePairs. This gives client an ability to search by custom - // attributes that they specified during the task creation. Only the Tasks - // having 'all' of the specified key=value pairs will be returned. - AttributeVec []*KeyValuePair `json:"attributeVec"` - - // Tasks that ended before this time. - EndTimeSecs *int64 `json:"endTimeSecs,omitempty"` - - // Skip information about the sub tasks of the matching root and sub tasks. - // By default, the entire task tree will be returned for matching tasks. - ExcludeSubTasks *bool `json:"excludeSubTasks,omitempty"` - - // Number of levels till which we need to fetch the event logs for a pulse - // tree. Note that it is applicable only when include_event_logs is true. - FetchLogsMaxLevel *int32 `json:"fetchLogsMaxLevel,omitempty"` - - // If set, the event logs will be included in the response message. Otherwise - // they will be cleared out. - IncludeEventLogs *bool `json:"includeEventLogs,omitempty"` - - // Returns finished tasks as well. - // By default, Pulse only returns active tasks. - IncludeFinishedTasks *bool `json:"includeFinishedTasks,omitempty"` - - // Only return at most these many matching tasks. This constraint is applied - // with each query's result group. - MaxTasks *int32 `json:"maxTasks,omitempty"` - - // Tasks that started after this time. - StartTimeSecs *int64 `json:"startTimeSecs,omitempty"` - - // The hierarchical paths to the names of the tasks being queried. - // The task path-name specified here can be a prefix. - // Clients can specify multiple paths/prefixes. Pulse will return one - // ResultGroup for each path query. - // - // Each path is treated separately by Pulse, so if there are duplicate paths, - // Pulse will return duplicate results. - // - // Both root tasks and sub tasks can be specified in @task_path_vec. - TaskPathVec []string `json:"taskPathVec"` -} - -// Validate validates this get tasks arg -func (m *GetTasksArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksArg) validateAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.AttributeVec); i++ { - if swag.IsZero(m.AttributeVec[i]) { // not required - continue - } - - if m.AttributeVec[i] != nil { - if err := m.AttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get tasks arg based on the context it is used -func (m *GetTasksArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksArg) contextValidateAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeVec); i++ { - - if m.AttributeVec[i] != nil { - - if swag.IsZero(m.AttributeVec[i]) { // not required - return nil - } - - if err := m.AttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetTasksArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTasksArg) UnmarshalBinary(b []byte) error { - var res GetTasksArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_tasks_result.go b/v1/models/get_tasks_result.go deleted file mode 100644 index 0e403424..00000000 --- a/v1/models/get_tasks_result.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetTasksResult Result returned by Pulse's GetTasks API. -// -// swagger:model GetTasksResult -type GetTasksResult struct { - - // Proto to describe the error returned by pulse. - Error *PrivateErrorProto `json:"error,omitempty"` - - // result group vec - ResultGroupVec []*GetTasksResultResultGroup `json:"resultGroupVec"` -} - -// Validate validates this get tasks result -func (m *GetTasksResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResultGroupVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *GetTasksResult) validateResultGroupVec(formats strfmt.Registry) error { - if swag.IsZero(m.ResultGroupVec) { // not required - return nil - } - - for i := 0; i < len(m.ResultGroupVec); i++ { - if swag.IsZero(m.ResultGroupVec[i]) { // not required - continue - } - - if m.ResultGroupVec[i] != nil { - if err := m.ResultGroupVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resultGroupVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resultGroupVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get tasks result based on the context it is used -func (m *GetTasksResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResultGroupVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResult) 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 -} - -func (m *GetTasksResult) contextValidateResultGroupVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResultGroupVec); i++ { - - if m.ResultGroupVec[i] != nil { - - if swag.IsZero(m.ResultGroupVec[i]) { // not required - return nil - } - - if err := m.ResultGroupVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resultGroupVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resultGroupVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetTasksResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTasksResult) UnmarshalBinary(b []byte) error { - var res GetTasksResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_tasks_result_result_group.go b/v1/models/get_tasks_result_result_group.go deleted file mode 100644 index cc4cadfd..00000000 --- a/v1/models/get_tasks_result_result_group.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetTasksResultResultGroup All Result groups that match the query. -// -// There is 1-1 correspondence between number of query paths and -// number of ResultGroups returned by Pulse. -// -// swagger:model GetTasksResult_ResultGroup -type GetTasksResultResultGroup struct { - - // All tasks that match the corresponding query. - TaskVec []*GetTasksResultResultGroupTask `json:"taskVec"` -} - -// Validate validates this get tasks result result group -func (m *GetTasksResultResultGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTaskVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResultResultGroup) validateTaskVec(formats strfmt.Registry) error { - if swag.IsZero(m.TaskVec) { // not required - return nil - } - - for i := 0; i < len(m.TaskVec); i++ { - if swag.IsZero(m.TaskVec[i]) { // not required - continue - } - - if m.TaskVec[i] != nil { - if err := m.TaskVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get tasks result result group based on the context it is used -func (m *GetTasksResultResultGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTaskVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResultResultGroup) contextValidateTaskVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskVec); i++ { - - if m.TaskVec[i] != nil { - - if swag.IsZero(m.TaskVec[i]) { // not required - return nil - } - - if err := m.TaskVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetTasksResultResultGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTasksResultResultGroup) UnmarshalBinary(b []byte) error { - var res GetTasksResultResultGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_tasks_result_result_group_task.go b/v1/models/get_tasks_result_result_group_task.go deleted file mode 100644 index 146a688e..00000000 --- a/v1/models/get_tasks_result_result_group_task.go +++ /dev/null @@ -1,115 +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" -) - -// GetTasksResultResultGroupTask Information returned about a Task. -// -// swagger:model GetTasksResult_ResultGroup_Task -type GetTasksResultResultGroupTask struct { - - // The progress on this task. - Progress *TaskProgress `json:"progress,omitempty"` - - // Information about all the sub tasks for this task. - SubTaskVec []interface{} `json:"subTaskVec"` - - // The hierarchical name of the task. - TaskPath *string `json:"taskPath,omitempty"` -} - -// Validate validates this get tasks result result group task -func (m *GetTasksResultResultGroupTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgress(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResultResultGroupTask) validateProgress(formats strfmt.Registry) error { - if swag.IsZero(m.Progress) { // not required - return nil - } - - if m.Progress != nil { - if err := m.Progress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get tasks result result group task based on the context it is used -func (m *GetTasksResultResultGroupTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProgress(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTasksResultResultGroupTask) contextValidateProgress(ctx context.Context, formats strfmt.Registry) error { - - if m.Progress != nil { - - if swag.IsZero(m.Progress) { // not required - return nil - } - - if err := m.Progress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetTasksResultResultGroupTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTasksResultResultGroupTask) UnmarshalBinary(b []byte) error { - var res GetTasksResultResultGroupTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_tenant_stats_result.go b/v1/models/get_tenant_stats_result.go deleted file mode 100644 index e6bccbb7..00000000 --- a/v1/models/get_tenant_stats_result.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetTenantStatsResult GetTenantStatsResult -// -// GetTenantStatsResult is the result of get tenantStats api. -// -// swagger:model GetTenantStatsResult -type GetTenantStatsResult struct { - - // Specifies an opaque string to pass to get the next set of active opens. - // If null is returned, this response is the last set of active opens. - Cookie *string `json:"cookie,omitempty"` - - // Specifies a list of tenant stats. - StatsList []*TenantStats `json:"statsList"` -} - -// Validate validates this get tenant stats result -func (m *GetTenantStatsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTenantStatsResult) validateStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.StatsList) { // not required - return nil - } - - for i := 0; i < len(m.StatsList); i++ { - if swag.IsZero(m.StatsList[i]) { // not required - continue - } - - if m.StatsList[i] != nil { - if err := m.StatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get tenant stats result based on the context it is used -func (m *GetTenantStatsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetTenantStatsResult) contextValidateStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsList); i++ { - - if m.StatsList[i] != nil { - - if swag.IsZero(m.StatsList[i]) { // not required - return nil - } - - if err := m.StatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetTenantStatsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTenantStatsResult) UnmarshalBinary(b []byte) error { - var res GetTenantStatsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_view_box_stats_result.go b/v1/models/get_view_box_stats_result.go deleted file mode 100644 index 60ac4e8e..00000000 --- a/v1/models/get_view_box_stats_result.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewBoxStatsResult GetViewBoxStatsResult -// -// GetViewBoxStatsResult is the result of get viewBoxStats api. -// -// swagger:model GetViewBoxStatsResult -type GetViewBoxStatsResult struct { - - // Specifies a list of view box stats. - StatsList []*StorageDomainStats `json:"statsList"` -} - -// Validate validates this get view box stats result -func (m *GetViewBoxStatsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewBoxStatsResult) validateStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.StatsList) { // not required - return nil - } - - for i := 0; i < len(m.StatsList); i++ { - if swag.IsZero(m.StatsList[i]) { // not required - continue - } - - if m.StatsList[i] != nil { - if err := m.StatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get view box stats result based on the context it is used -func (m *GetViewBoxStatsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewBoxStatsResult) contextValidateStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsList); i++ { - - if m.StatsList[i] != nil { - - if swag.IsZero(m.StatsList[i]) { // not required - return nil - } - - if err := m.StatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewBoxStatsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewBoxStatsResult) UnmarshalBinary(b []byte) error { - var res GetViewBoxStatsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_views_by_share_name_result.go b/v1/models/get_views_by_share_name_result.go deleted file mode 100644 index ec89de34..00000000 --- a/v1/models/get_views_by_share_name_result.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewsByShareNameResult Get (Views and Aliases) By Share Result. -// -// Specifies the list of Views and Aliases by share name that matched the -// specified filter criteria. -// -// swagger:model GetViewsByShareNameResult -type GetViewsByShareNameResult struct { - - // If set, i.e. there are more results to display, use this value to get - // the next set of results, by using this value in paginationCookie param - // for the next request to GetViewsByShare. - PaginationCookie *string `json:"paginationCookie,omitempty"` - - // Array of Views and Aliases by Share name. - // Specifies the list of Views returned in this response. - SharesList []*Share `json:"sharesList"` -} - -// Validate validates this get views by share name result -func (m *GetViewsByShareNameResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharesList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsByShareNameResult) validateSharesList(formats strfmt.Registry) error { - if swag.IsZero(m.SharesList) { // not required - return nil - } - - for i := 0; i < len(m.SharesList); i++ { - if swag.IsZero(m.SharesList[i]) { // not required - continue - } - - if m.SharesList[i] != nil { - if err := m.SharesList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharesList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharesList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get views by share name result based on the context it is used -func (m *GetViewsByShareNameResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharesList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsByShareNameResult) contextValidateSharesList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharesList); i++ { - - if m.SharesList[i] != nil { - - if swag.IsZero(m.SharesList[i]) { // not required - return nil - } - - if err := m.SharesList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharesList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharesList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewsByShareNameResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewsByShareNameResult) UnmarshalBinary(b []byte) error { - var res GetViewsByShareNameResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_views_result.go b/v1/models/get_views_result.go deleted file mode 100644 index 8ca446db..00000000 --- a/v1/models/get_views_result.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewsResult Get Views Result. -// -// Specifies the list of Views returned that matched the specified filter -// criteria. -// -// swagger:model GetViewsResult -type GetViewsResult struct { - - // If false, more Views are available to return. If the number of - // Views to return exceeds the number of Views specified in maxCount - // (default of 1000) of the original GET /public/views request, - // the first set of Views are returned and this field returns false. - // To get the next set of Views, in the next GET /public/views request - // send the last id from the previous viewList. - LastResult *bool `json:"lastResult,omitempty"` - - // Array of Views. - // - // Specifies the list of Views returned in this response. - // The list is sorted by decreasing View ids. - Views []*View `json:"views"` -} - -// Validate validates this get views result -func (m *GetViewsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsResult) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - for i := 0; i < len(m.Views); i++ { - if swag.IsZero(m.Views[i]) { // not required - continue - } - - if m.Views[i] != nil { - if err := m.Views[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get views result based on the context it is used -func (m *GetViewsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsResult) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Views); i++ { - - if m.Views[i] != nil { - - if swag.IsZero(m.Views[i]) { // not required - return nil - } - - if err := m.Views[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewsResult) UnmarshalBinary(b []byte) error { - var res GetViewsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gflag.go b/v1/models/gflag.go deleted file mode 100644 index a0c3232f..00000000 --- a/v1/models/gflag.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" - "github.com/go-openapi/validate" -) - -// Gflag Gflag. -// -// Specifies the attributes of a service gflag. -// -// swagger:model Gflag -type Gflag struct { - - // Specifies name of the gflag. - // Required: true - Name *string `json:"name"` - - // Specifies product model this gflag set on. - ProductModel *string `json:"productModel,omitempty"` - - // Specifies reason for setting the gflag. - Reason *string `json:"reason,omitempty"` - - // Specifies timestamp when gflag was set. - // Read Only: true - Timestamp *int64 `json:"timestamp,omitempty"` - - // Specifies value of the gflag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this gflag -func (m *Gflag) 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 *Gflag) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gflag based on the context it is used -func (m *Gflag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Gflag) contextValidateTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "timestamp", "body", m.Timestamp); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Gflag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Gflag) UnmarshalBinary(b []byte) error { - var res Gflag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/google_account_info.go b/v1/models/google_account_info.go deleted file mode 100644 index 0ebc906c..00000000 --- a/v1/models/google_account_info.go +++ /dev/null @@ -1,55 +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" -) - -// GoogleAccountInfo Google Account Information. -// -// Google Account Information of a Helios BaaS user. -// -// swagger:model GoogleAccountInfo -type GoogleAccountInfo struct { - - // Specifies the Account Id assigned by Google. - AccountID *string `json:"accountId,omitempty"` - - // Specifies the User Id assigned by Google. - UserID *string `json:"userId,omitempty"` -} - -// Validate validates this google account info -func (m *GoogleAccountInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this google account info based on context it is used -func (m *GoogleAccountInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GoogleAccountInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GoogleAccountInfo) UnmarshalBinary(b []byte) error { - var res GoogleAccountInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/google_cloud_credentials.go b/v1/models/google_cloud_credentials.go deleted file mode 100644 index e6ffe2e6..00000000 --- a/v1/models/google_cloud_credentials.go +++ /dev/null @@ -1,141 +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" -) - -// GoogleCloudCredentials Google Cloud Credentials. -// -// Specifies the cloud credentials to connect to a Google service account. -// -// swagger:model GoogleCloudCredentials -type GoogleCloudCredentials struct { - - // Specifies the client email address used to access Google - // Cloud Storage. - ClientEmailAddress *string `json:"clientEmailAddress,omitempty"` - - // Specifies the private key used to access Google Cloud Storage that is - // generated when the service account is created. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` - - // Specifies the project id of an existing Google Cloud project to store - // objects. - ProjectID *string `json:"projectId,omitempty"` - - // Specifies the storage class of GCP. - // GoogleTierType specifies the storage class for Google. - // 'kGoogleStandard' indicates a tier type of Google properties. - // 'kGoogleNearline' indicates a tier type of Google properties that is not - // accessed frequently. - // 'kGoogleColdline' indicates a tier type of Google properties that is rarely - // accessed. - // 'kGoogleRegional' indicates a tier type of Google properties that stores - // frequently accessed data in the same region. - // 'kGoogleMultiRegional' indicates a tier type of Google properties that is - // frequently accessed ("hot" objects) around the world. - // Enum: ["kGoogleStandard","kGoogleNearline","kGoogleColdline","kGoogleRegional","kGoogleMultiRegional"] - TierType *string `json:"tierType,omitempty"` - - // Specifies the list of all tiers for Google account. - Tiers []string `json:"tiers"` -} - -// Validate validates this google cloud credentials -func (m *GoogleCloudCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var googleCloudCredentialsTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGoogleStandard","kGoogleNearline","kGoogleColdline","kGoogleRegional","kGoogleMultiRegional"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - googleCloudCredentialsTypeTierTypePropEnum = append(googleCloudCredentialsTypeTierTypePropEnum, v) - } -} - -const ( - - // GoogleCloudCredentialsTierTypeKGoogleStandard captures enum value "kGoogleStandard" - GoogleCloudCredentialsTierTypeKGoogleStandard string = "kGoogleStandard" - - // GoogleCloudCredentialsTierTypeKGoogleNearline captures enum value "kGoogleNearline" - GoogleCloudCredentialsTierTypeKGoogleNearline string = "kGoogleNearline" - - // GoogleCloudCredentialsTierTypeKGoogleColdline captures enum value "kGoogleColdline" - GoogleCloudCredentialsTierTypeKGoogleColdline string = "kGoogleColdline" - - // GoogleCloudCredentialsTierTypeKGoogleRegional captures enum value "kGoogleRegional" - GoogleCloudCredentialsTierTypeKGoogleRegional string = "kGoogleRegional" - - // GoogleCloudCredentialsTierTypeKGoogleMultiRegional captures enum value "kGoogleMultiRegional" - GoogleCloudCredentialsTierTypeKGoogleMultiRegional string = "kGoogleMultiRegional" -) - -// prop value enum -func (m *GoogleCloudCredentials) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, googleCloudCredentialsTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GoogleCloudCredentials) validateTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TierType) { // not required - return nil - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this google cloud credentials based on context it is used -func (m *GoogleCloudCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GoogleCloudCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GoogleCloudCredentials) UnmarshalBinary(b []byte) error { - var res GoogleCloudCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gpfs_cluster.go b/v1/models/gpfs_cluster.go deleted file mode 100644 index 6125a314..00000000 --- a/v1/models/gpfs_cluster.go +++ /dev/null @@ -1,59 +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" -) - -// GpfsCluster GPFS Cluster. -// -// Specifies information about a GPFS Cluster. -// -// swagger:model GpfsCluster -type GpfsCluster struct { - - // Specifies a list of CES(Cluster Export Services) IP addresses of a GPFS - // Cluster. - CesAddresses []string `json:"cesAddresses"` - - // Specifies a globally unique id of a GPFS Cluster. - ID *uint64 `json:"id,omitempty"` - - // Specifies a primary server of a GPFS Cluster. - PrimaryServer *string `json:"primaryServer,omitempty"` -} - -// Validate validates this gpfs cluster -func (m *GpfsCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gpfs cluster based on context it is used -func (m *GpfsCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsCluster) UnmarshalBinary(b []byte) error { - var res GpfsCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gpfs_fileset.go b/v1/models/gpfs_fileset.go deleted file mode 100644 index 9fcd5e66..00000000 --- a/v1/models/gpfs_fileset.go +++ /dev/null @@ -1,115 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GpfsFileset GPFS File Set. -// -// Specifies information about a fileset in a GPFS file system. -// -// swagger:model GpfsFileset -type GpfsFileset struct { - - // Specifies the id of the fileset. - ID *uint64 `json:"id,omitempty"` - - // If the given fileset is an Independent fileset or not. - IsIndependentFileset *bool `json:"isIndependentFileset,omitempty"` - - // Name of the filesystem associated with the fileset - Name *string `json:"name,omitempty"` - - // Specifies the absolute path of the fileset. - Path *string `json:"path,omitempty"` - - // Specifies GPFS supported Protocol information enabled on GPFS File System - // 'kNfs' indicates NFS exports in a GPFS fileset. - // 'kSmb' indicates CIFS/SMB Shares in a GPFS fileset. - Protocols []string `json:"protocols"` -} - -// Validate validates this gpfs fileset -func (m *GpfsFileset) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gpfsFilesetProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gpfsFilesetProtocolsItemsEnum = append(gpfsFilesetProtocolsItemsEnum, v) - } -} - -func (m *GpfsFileset) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gpfsFilesetProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *GpfsFileset) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this gpfs fileset based on context it is used -func (m *GpfsFileset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsFileset) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsFileset) UnmarshalBinary(b []byte) error { - var res GpfsFileset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gpfs_filesystem.go b/v1/models/gpfs_filesystem.go deleted file mode 100644 index c4d33cb6..00000000 --- a/v1/models/gpfs_filesystem.go +++ /dev/null @@ -1,55 +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" -) - -// GpfsFilesystem GPFS Filesystem. -// -// Specifies information about filesystem in a GPFS Cluster. -// -// swagger:model GpfsFilesystem -type GpfsFilesystem struct { - - // Specifies the id of the file system. - ID *string `json:"id,omitempty"` - - // Specifies the path of the file system. - Path *string `json:"path,omitempty"` -} - -// Validate validates this gpfs filesystem -func (m *GpfsFilesystem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gpfs filesystem based on context it is used -func (m *GpfsFilesystem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsFilesystem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsFilesystem) UnmarshalBinary(b []byte) error { - var res GpfsFilesystem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/gpfs_protection_source.go b/v1/models/gpfs_protection_source.go deleted file mode 100644 index 31b9f97a..00000000 --- a/v1/models/gpfs_protection_source.go +++ /dev/null @@ -1,278 +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" -) - -// GpfsProtectionSource GPFS Protection Source. -// -// Specifies a Protection Source in GPFS environment. -// -// swagger:model GpfsProtectionSource -type GpfsProtectionSource struct { - - // Specifies information of an GPFS Cluster. This is set only - // when the entity type is 'kCluster'. - Cluster *GpfsCluster `json:"cluster,omitempty"` - - // Specifies information about a mount point in an GPFS file system. - // This is set only when the entity type is 'kFileset'. - Fileset *GpfsFileset `json:"fileset,omitempty"` - - // Specifies an access zone in an GPFS file system. This is set only - // when the entity type is 'kFilesystem'. - Filesystem *GpfsFilesystem `json:"filesystem,omitempty"` - - // Specifies a unique name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies the type of the entity in an GPFS file system - // like 'kCluster', 'kFilesystem', or, 'kFileset'. - // 'kCluster' indicates an GPFS Cluster. - // 'kFilesystem' indicates a top level filesystem on GPFS cluster. - // 'kFileset' indicates a fileset within a filesystem. - // Enum: ["kCluster","kFilesystem","kFileset"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this gpfs protection source -func (m *GpfsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileset(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesystem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsProtectionSource) validateCluster(formats strfmt.Registry) error { - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionSource) validateFileset(formats strfmt.Registry) error { - if swag.IsZero(m.Fileset) { // not required - return nil - } - - if m.Fileset != nil { - if err := m.Fileset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileset") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionSource) validateFilesystem(formats strfmt.Registry) error { - if swag.IsZero(m.Filesystem) { // not required - return nil - } - - if m.Filesystem != nil { - if err := m.Filesystem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystem") - } - return err - } - } - - return nil -} - -var gpfsProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kFilesystem","kFileset"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gpfsProtectionSourceTypeTypePropEnum = append(gpfsProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // GpfsProtectionSourceTypeKCluster captures enum value "kCluster" - GpfsProtectionSourceTypeKCluster string = "kCluster" - - // GpfsProtectionSourceTypeKFilesystem captures enum value "kFilesystem" - GpfsProtectionSourceTypeKFilesystem string = "kFilesystem" - - // GpfsProtectionSourceTypeKFileset captures enum value "kFileset" - GpfsProtectionSourceTypeKFileset string = "kFileset" -) - -// prop value enum -func (m *GpfsProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gpfsProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GpfsProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gpfs protection source based on the context it is used -func (m *GpfsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileset(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilesystem(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsProtectionSource) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.Cluster != nil { - - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionSource) contextValidateFileset(ctx context.Context, formats strfmt.Registry) error { - - if m.Fileset != nil { - - if swag.IsZero(m.Fileset) { // not required - return nil - } - - if err := m.Fileset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileset") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionSource) contextValidateFilesystem(ctx context.Context, formats strfmt.Registry) error { - - if m.Filesystem != nil { - - if swag.IsZero(m.Filesystem) { // not required - return nil - } - - if err := m.Filesystem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystem") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsProtectionSource) UnmarshalBinary(b []byte) error { - var res GpfsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/grantee_proto.go b/v1/models/grantee_proto.go deleted file mode 100644 index 12927bbb..00000000 --- a/v1/models/grantee_proto.go +++ /dev/null @@ -1,62 +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" -) - -// GranteeProto Message to define a grantee to which ACL permissions can be granted. -// -// swagger:model GranteeProto -type GranteeProto struct { - - // If grantee is of type 'kEmailUser', this field will contain the email - // address of the user. - EmailAddress *string `json:"emailAddress,omitempty"` - - // If grantee is of type 'kGroup', this field will contain the group to which - // permission is granted. - Group *int32 `json:"group,omitempty"` - - // type - Type *int32 `json:"type,omitempty"` - - // If grantee is of type 'kRegisteredUser', this field will contain the - // canonical id of the user. - UserID *string `json:"userId,omitempty"` -} - -// Validate validates this grantee proto -func (m *GranteeProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this grantee proto based on context it is used -func (m *GranteeProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GranteeProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GranteeProto) UnmarshalBinary(b []byte) error { - var res GranteeProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/granular_restore_info.go b/v1/models/granular_restore_info.go deleted file mode 100644 index 17142e31..00000000 --- a/v1/models/granular_restore_info.go +++ /dev/null @@ -1,116 +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" -) - -// GranularRestoreInfo Proto to hold the information about the granular restores. -// -// Currently used for pdb restore. Extend the structure for table/datafile -// or any other restore. -// -// swagger:model GranularRestoreInfo -type GranularRestoreInfo struct { - - // Type of granular restore. - GranularityType *int32 `json:"granularityType,omitempty"` - - // PDB Restore parameters. - // This includes information about the list of pdbs to be restored. - PdbRestoreParams *PDBRestoreParam `json:"pdbRestoreParams,omitempty"` -} - -// Validate validates this granular restore info -func (m *GranularRestoreInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePdbRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularRestoreInfo) validatePdbRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.PdbRestoreParams) { // not required - return nil - } - - if m.PdbRestoreParams != nil { - if err := m.PdbRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbRestoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this granular restore info based on the context it is used -func (m *GranularRestoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePdbRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularRestoreInfo) contextValidatePdbRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PdbRestoreParams != nil { - - if swag.IsZero(m.PdbRestoreParams) { // not required - return nil - } - - if err := m.PdbRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbRestoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GranularRestoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GranularRestoreInfo) UnmarshalBinary(b []byte) error { - var res GranularRestoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/granularity_bucket.go b/v1/models/granularity_bucket.go deleted file mode 100644 index 7f6222a9..00000000 --- a/v1/models/granularity_bucket.go +++ /dev/null @@ -1,128 +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" -) - -// GranularityBucket Granularity Bucket. -// -// Message that specifies the frequency granularity at which to copy the -// snapshots from a backup job's runs. -// -// swagger:model GranularityBucket -type GranularityBucket struct { - - // Date information for granularity of type kExactDates. - // Sequence of specific dates on which snapshots need to be applied. - ExactDates *GranularityBucketExactDatesInfo `json:"exactDates,omitempty"` - - // The base time period granularity that determines the frequency at which - // backup run snapshots will be copied. - // - // NOTE: The granularity (in combination with the 'multiplier' field below - // but for the case of kExactDates) that is specified should be such that - // the frequency of copying snapshots is lower than the frequency of - // actually creating the snapshots (i.e.,lower than the frequency of the - // backup job runs). - Granularity *int32 `json:"granularity,omitempty"` - - // A factor to multiply the granularity by. - // For example, if this is 2 and the granularity is kHour, then snapshots - // from the first eligible run from every 2 hour period will be copied. - Multiplier *int32 `json:"multiplier,omitempty"` -} - -// Validate validates this granularity bucket -func (m *GranularityBucket) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExactDates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularityBucket) validateExactDates(formats strfmt.Registry) error { - if swag.IsZero(m.ExactDates) { // not required - return nil - } - - if m.ExactDates != nil { - if err := m.ExactDates.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exactDates") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exactDates") - } - return err - } - } - - return nil -} - -// ContextValidate validate this granularity bucket based on the context it is used -func (m *GranularityBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExactDates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularityBucket) contextValidateExactDates(ctx context.Context, formats strfmt.Registry) error { - - if m.ExactDates != nil { - - if swag.IsZero(m.ExactDates) { // not required - return nil - } - - if err := m.ExactDates.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exactDates") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exactDates") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GranularityBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GranularityBucket) UnmarshalBinary(b []byte) error { - var res GranularityBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/granularity_bucket_exact_dates_info.go b/v1/models/granularity_bucket_exact_dates_info.go deleted file mode 100644 index 22dc3895..00000000 --- a/v1/models/granularity_bucket_exact_dates_info.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GranularityBucketExactDatesInfo Specifies a list of dates on which snapshots will be copied. -// -// swagger:model GranularityBucket_ExactDatesInfo -type GranularityBucketExactDatesInfo struct { - - // dates vec - DatesVec []*DateTime `json:"datesVec"` -} - -// Validate validates this granularity bucket exact dates info -func (m *GranularityBucketExactDatesInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatesVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularityBucketExactDatesInfo) validateDatesVec(formats strfmt.Registry) error { - if swag.IsZero(m.DatesVec) { // not required - return nil - } - - for i := 0; i < len(m.DatesVec); i++ { - if swag.IsZero(m.DatesVec[i]) { // not required - continue - } - - if m.DatesVec[i] != nil { - if err := m.DatesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this granularity bucket exact dates info based on the context it is used -func (m *GranularityBucketExactDatesInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GranularityBucketExactDatesInfo) contextValidateDatesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatesVec); i++ { - - if m.DatesVec[i] != nil { - - if swag.IsZero(m.DatesVec[i]) { // not required - return nil - } - - if err := m.DatesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GranularityBucketExactDatesInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GranularityBucketExactDatesInfo) UnmarshalBinary(b []byte) error { - var res GranularityBucketExactDatesInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/graph_keyspace_info.go b/v1/models/graph_keyspace_info.go deleted file mode 100644 index 1f85887a..00000000 --- a/v1/models/graph_keyspace_info.go +++ /dev/null @@ -1,51 +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" -) - -// GraphKeyspaceInfo Proto that contains specific information about a Cassandra graph keyspace -// -// swagger:model GraphKeyspaceInfo -type GraphKeyspaceInfo struct { - - // Each graph keyspace can potentially be associated with - // multiple keyspaces that store additional graph related metadata - AssociatedKeyspaceVec []string `json:"associatedKeyspaceVec"` -} - -// Validate validates this graph keyspace info -func (m *GraphKeyspaceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this graph keyspace info based on context it is used -func (m *GraphKeyspaceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GraphKeyspaceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GraphKeyspaceInfo) UnmarshalBinary(b []byte) error { - var res GraphKeyspaceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/group.go b/v1/models/group.go deleted file mode 100644 index d0073879..00000000 --- a/v1/models/group.go +++ /dev/null @@ -1,166 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Group Group Details. -// -// Specifies details about the group. -// -// swagger:model Group -type Group struct { - - // Specifies the epoch time in milliseconds when the group was created/added. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies a description of the group. - Description *string `json:"description,omitempty"` - - // Specifies the domain of the group. - Domain *string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the group was last modified. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the name of the group. - Name *string `json:"name,omitempty"` - - // Whether the group is a restricted group. Users belonging to a restricted - // group can only view objects they have permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with the group such as - // 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for all the users in this group. - Roles []string `json:"roles"` - - // Specifies the unique Security ID (SID) of the group. - Sid *string `json:"sid,omitempty"` - - // Specifies the SMB principals. Principals will be added to this group only - // if IsSmbPrincipalOnly set to true. - SmbPrincipals []*SmbPrincipal `json:"smbPrincipals"` - - // Specifies the tenants to which the group belongs to. If not specified, - // session user's tenant id is assumed. - TenantIds []string `json:"tenantIds"` - - // Specifies the username of users who are members of the group. - // This field is used only for local groups. - Usernames []string `json:"usernames"` - - // Specifies the SID of users who are members of the group. - // This field is used only for local groups. - Users []string `json:"users"` -} - -// Validate validates this group -func (m *Group) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSmbPrincipals(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Group) validateSmbPrincipals(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SmbPrincipals); i++ { - if swag.IsZero(m.SmbPrincipals[i]) { // not required - continue - } - - if m.SmbPrincipals[i] != nil { - if err := m.SmbPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this group based on the context it is used -func (m *Group) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSmbPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Group) contextValidateSmbPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SmbPrincipals); i++ { - - if m.SmbPrincipals[i] != nil { - - if swag.IsZero(m.SmbPrincipals[i]) { // not required - return nil - } - - if err := m.SmbPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Group) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Group) UnmarshalBinary(b []byte) error { - var res Group - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/group_backup_env_params.go b/v1/models/group_backup_env_params.go deleted file mode 100644 index cb658ff9..00000000 --- a/v1/models/group_backup_env_params.go +++ /dev/null @@ -1,12 +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 - -// GroupBackupEnvParams Message to capture any additional backup params for Group within the -// Office365 environment. -// -// swagger:model GroupBackupEnvParams -type GroupBackupEnvParams interface{} diff --git a/v1/models/group_delete_parameters.go b/v1/models/group_delete_parameters.go deleted file mode 100644 index cb91cc44..00000000 --- a/v1/models/group_delete_parameters.go +++ /dev/null @@ -1,65 +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" -) - -// GroupDeleteParameters Delete Groups Request. -// -// Specifies the groups to delete on the Cohesity Cluster. -// -// swagger:model GroupDeleteParameters -type GroupDeleteParameters struct { - - // Specifies the domain associated with the groups to delete. - // Only groups associated with the same domain can be deleted - // by a single request. - // If no domain is specified, the specified groups are deleted from the - // LOCAL domain on the Cohesity Cluster. - // If a non-LOCAL domain is specified, the specified groups are deleted - // on the Cohesity Cluster. However, the referenced group principals on the - // Active Directory are not deleted. - Domain *string `json:"domain,omitempty"` - - // Array of Groups. - // - // Specifies the list of groups to delete on the Cohesity Cluster. - // Only groups from the same domain can be deleted by a single request. - Names []string `json:"names"` -} - -// Validate validates this group delete parameters -func (m *GroupDeleteParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this group delete parameters based on context it is used -func (m *GroupDeleteParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GroupDeleteParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupDeleteParameters) UnmarshalBinary(b []byte) error { - var res GroupDeleteParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/group_info.go b/v1/models/group_info.go deleted file mode 100644 index 90240020..00000000 --- a/v1/models/group_info.go +++ /dev/null @@ -1,61 +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" -) - -// GroupInfo Group Information. -// -// Specifies struct with basic group details. -// -// swagger:model GroupInfo -type GroupInfo struct { - - // Specifies domain name of the user. - Domain *string `json:"domain,omitempty"` - - // Specifies group name of the group. - GroupName *string `json:"groupName,omitempty"` - - // Specifies unique Security ID (SID) of the user. - Sid *string `json:"sid,omitempty"` - - // Specifies the tenants to which the group belongs to. - TenantIds []string `json:"tenantIds"` -} - -// Validate validates this group info -func (m *GroupInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this group info based on context it is used -func (m *GroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GroupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupInfo) UnmarshalBinary(b []byte) error { - var res GroupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/group_membership_info.go b/v1/models/group_membership_info.go deleted file mode 100644 index 47c1deea..00000000 --- a/v1/models/group_membership_info.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" -) - -// GroupMembershipInfo Specifies information about Group entity which a user entity is member of. -// -// swagger:model GroupMembershipInfo -type GroupMembershipInfo struct { - - // Specifies the entity Id of the Group. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the Graph UUID of the Group. - GraphUUID *string `json:"graphUuid,omitempty"` -} - -// Validate validates this group membership info -func (m *GroupMembershipInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this group membership info based on context it is used -func (m *GroupMembershipInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GroupMembershipInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupMembershipInfo) UnmarshalBinary(b []byte) error { - var res GroupMembershipInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/group_parameters.go b/v1/models/group_parameters.go deleted file mode 100644 index c18d1b79..00000000 --- a/v1/models/group_parameters.go +++ /dev/null @@ -1,154 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GroupParameters Group Request. -// -// Specifies the settings used to add/create a new group or modify an existing -// group. -// -// swagger:model GroupParameters -type GroupParameters struct { - - // Specifies a description of the group. - Description *string `json:"description,omitempty"` - - // Specifies the domain of the group. - Domain *string `json:"domain,omitempty"` - - // Specifies the name of the group. - Name *string `json:"name,omitempty"` - - // Whether the group is a restricted group. Users belonging to a restricted - // group can only view objects they have permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with the group such as - // 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for all the users in this group. - Roles []string `json:"roles"` - - // Specifies the SMB principals. Principals will be added to this group only - // if IsSmbPrincipalOnly set to true. - SmbPrincipals []*SmbPrincipal `json:"smbPrincipals"` - - // Specifies the tenants to which the group belongs to. If not specified, - // session user's tenant id is assumed. - TenantIds []string `json:"tenantIds"` - - // Specifies the SID of users who are members of the group. - // This field is used only for local groups. - Users []string `json:"users"` -} - -// Validate validates this group parameters -func (m *GroupParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSmbPrincipals(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GroupParameters) validateSmbPrincipals(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SmbPrincipals); i++ { - if swag.IsZero(m.SmbPrincipals[i]) { // not required - continue - } - - if m.SmbPrincipals[i] != nil { - if err := m.SmbPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this group parameters based on the context it is used -func (m *GroupParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSmbPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GroupParameters) contextValidateSmbPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SmbPrincipals); i++ { - - if m.SmbPrincipals[i] != nil { - - if swag.IsZero(m.SmbPrincipals[i]) { // not required - return nil - } - - if err := m.SmbPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GroupParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupParameters) UnmarshalBinary(b []byte) error { - var res GroupParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/guid_pair.go b/v1/models/guid_pair.go deleted file mode 100644 index a68a5f35..00000000 --- a/v1/models/guid_pair.go +++ /dev/null @@ -1,55 +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" -) - -// GUIDPair GuidPair -// -// Represents the guid pair of an AD Object. -// -// swagger:model GuidPair -type GUIDPair struct { - - // Specifies the guid of an AD object in the Production AD. - DestGUID *string `json:"destGuid,omitempty"` - - // Specifies the guid of an AD object in the Snapshot AD. - SourceGUID *string `json:"sourceGuid,omitempty"` -} - -// Validate validates this Guid pair -func (m *GUIDPair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Guid pair based on context it is used -func (m *GUIDPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GUIDPair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GUIDPair) UnmarshalBinary(b []byte) error { - var res GUIDPair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_backup_job_params.go b/v1/models/h_base_backup_job_params.go deleted file mode 100644 index 28281aef..00000000 --- a/v1/models/h_base_backup_job_params.go +++ /dev/null @@ -1,110 +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" -) - -// HBaseBackupJobParams Contains any additional hbase environment specific backup params at the -// job level. -// -// swagger:model HBaseBackupJobParams -type HBaseBackupJobParams struct { - - // Additional hdfs connection params required for HBase Backup. - HdfsConnectParams *HdfsConnectParams `json:"hdfsConnectParams,omitempty"` -} - -// Validate validates this h base backup job params -func (m *HBaseBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseBackupJobParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this h base backup job params based on the context it is used -func (m *HBaseBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseBackupJobParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseBackupJobParams) UnmarshalBinary(b []byte) error { - var res HBaseBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_connect_params.go b/v1/models/h_base_connect_params.go deleted file mode 100644 index f67432c0..00000000 --- a/v1/models/h_base_connect_params.go +++ /dev/null @@ -1,124 +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" -) - -// HBaseConnectParams HBase Connect Params. -// -// Specifies an Object containing information about a registered HBase -// source. -// -// swagger:model HBaseConnectParams -type HBaseConnectParams struct { - - // Specifies the HBase discovery params. - HbaseDiscoveryParams *HadoopDiscoveryParams `json:"hbaseDiscoveryParams,omitempty"` - - // The entity id of the HDFS source for this HBase - HdfsEntityID *int64 `json:"hdfsEntityId,omitempty"` - - // Specifies the kerberos principal. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Specifies the HBase data root directory. - RootDataDirectory *string `json:"rootDataDirectory,omitempty"` - - // Specifies the HBase zookeeper quorum. - ZookeeperQuorum []string `json:"zookeeperQuorum"` -} - -// Validate validates this h base connect params -func (m *HBaseConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHbaseDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseConnectParams) validateHbaseDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseDiscoveryParams) { // not required - return nil - } - - if m.HbaseDiscoveryParams != nil { - if err := m.HbaseDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this h base connect params based on the context it is used -func (m *HBaseConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHbaseDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseConnectParams) contextValidateHbaseDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseDiscoveryParams != nil { - - if swag.IsZero(m.HbaseDiscoveryParams) { // not required - return nil - } - - if err := m.HbaseDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseConnectParams) UnmarshalBinary(b []byte) error { - var res HBaseConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_connect_params_configuration_entry.go b/v1/models/h_base_connect_params_configuration_entry.go deleted file mode 100644 index 4fd90df1..00000000 --- a/v1/models/h_base_connect_params_configuration_entry.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" -) - -// HBaseConnectParamsConfigurationEntry h base connect params configuration entry -// -// swagger:model HBaseConnectParams_ConfigurationEntry -type HBaseConnectParamsConfigurationEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this h base connect params configuration entry -func (m *HBaseConnectParamsConfigurationEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this h base connect params configuration entry based on context it is used -func (m *HBaseConnectParamsConfigurationEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseConnectParamsConfigurationEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseConnectParamsConfigurationEntry) UnmarshalBinary(b []byte) error { - var res HBaseConnectParamsConfigurationEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_discovery_params.go b/v1/models/h_base_discovery_params.go deleted file mode 100644 index 9d9a1dcf..00000000 --- a/v1/models/h_base_discovery_params.go +++ /dev/null @@ -1,115 +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" -) - -// HBaseDiscoveryParams // ----------------------------------------------------------------------------- -// -// swagger:model HBaseDiscoveryParams -type HBaseDiscoveryParams struct { - - // Dir containing Config hbase-site.xml for discovery. - HbaseConfigDirectory *string `json:"hbaseConfigDirectory,omitempty"` - - // Any host on the HBase cluster. - Host *string `json:"host,omitempty"` - - // SSH credentials required for reading configuration files. - SSHCredentials *PrivateCredentials `json:"sshCredentials,omitempty"` -} - -// Validate validates this h base discovery params -func (m *HBaseDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseDiscoveryParams) validateSSHCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if m.SSHCredentials != nil { - if err := m.SSHCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this h base discovery params based on the context it is used -func (m *HBaseDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseDiscoveryParams) contextValidateSSHCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHCredentials != nil { - - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if err := m.SSHCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseDiscoveryParams) UnmarshalBinary(b []byte) error { - var res HBaseDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_protection_source.go b/v1/models/h_base_protection_source.go deleted file mode 100644 index bb843f74..00000000 --- a/v1/models/h_base_protection_source.go +++ /dev/null @@ -1,178 +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" -) - -// HBaseProtectionSource HBase Protection Source. -// -// Specifies an Object representing HBase. -// -// swagger:model HBaseProtectionSource -type HBaseProtectionSource struct { - - // Specifies the instance name of the HBase entity. - Name *string `json:"name,omitempty"` - - // Information of a HBase Table, only valid for an entity of type - // kTable. - TableInfo *HBaseTable `json:"tableInfo,omitempty"` - - // Specifies the type of the managed Object in HBase Protection Source. - // Specifies the type of an HBase source entity. - // 'kCluster' indicates a HBase cluster distributed over several physical - // nodes. - // 'kNamespace' indicates a Namespace in the HBase environment. - // 'kTable' indicates a Table in the HBase environment. - // Enum: ["kCluster","kNamespace","kTable"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the HBase entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this h base protection source -func (m *HBaseProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseProtectionSource) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -var hBaseProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kNamespace","kTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hBaseProtectionSourceTypeTypePropEnum = append(hBaseProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // HBaseProtectionSourceTypeKCluster captures enum value "kCluster" - HBaseProtectionSourceTypeKCluster string = "kCluster" - - // HBaseProtectionSourceTypeKNamespace captures enum value "kNamespace" - HBaseProtectionSourceTypeKNamespace string = "kNamespace" - - // HBaseProtectionSourceTypeKTable captures enum value "kTable" - HBaseProtectionSourceTypeKTable string = "kTable" -) - -// prop value enum -func (m *HBaseProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hBaseProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HBaseProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this h base protection source based on the context it is used -func (m *HBaseProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseProtectionSource) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseProtectionSource) UnmarshalBinary(b []byte) error { - var res HBaseProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_recover_job_params.go b/v1/models/h_base_recover_job_params.go deleted file mode 100644 index dc094d00..00000000 --- a/v1/models/h_base_recover_job_params.go +++ /dev/null @@ -1,113 +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" -) - -// HBaseRecoverJobParams Contains any additional hbase environment specific params for the -// recover job. -// -// swagger:model HBaseRecoverJobParams -type HBaseRecoverJobParams struct { - - // Additional hdfs connection params required for HBase Backup. - HdfsConnectParams *HdfsConnectParams `json:"hdfsConnectParams,omitempty"` - - // A suffix that is to be applied to all recovered entities - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this h base recover job params -func (m *HBaseRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseRecoverJobParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this h base recover job params based on the context it is used -func (m *HBaseRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseRecoverJobParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseRecoverJobParams) UnmarshalBinary(b []byte) error { - var res HBaseRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/h_base_table.go b/v1/models/h_base_table.go deleted file mode 100644 index 51da7286..00000000 --- a/v1/models/h_base_table.go +++ /dev/null @@ -1,52 +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" -) - -// HBaseTable HBase Table Info. -// -// Specifies an Object containing information about a HBase table. -// -// swagger:model HBaseTable -type HBaseTable struct { - - // Specifies the approx size of the table in bytes. - ApproxSizeBytes *int64 `json:"approxSizeBytes,omitempty"` -} - -// Validate validates this h base table -func (m *HBaseTable) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this h base table based on context it is used -func (m *HBaseTable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseTable) UnmarshalBinary(b []byte) error { - var res HBaseTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hadoop_discovery_params.go b/v1/models/hadoop_discovery_params.go deleted file mode 100644 index b42a9b3e..00000000 --- a/v1/models/hadoop_discovery_params.go +++ /dev/null @@ -1,56 +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" -) - -// HadoopDiscoveryParams Hadoop Discovery Params. -// -// Specifies an Object containing information about discovering a Hadoop -// source. -// -// swagger:model HadoopDiscoveryParams -type HadoopDiscoveryParams struct { - - // Specifies the configuration directory - ConfigDirectory *string `json:"configDirectory,omitempty"` - - // Specifies the host IP. - Host *string `json:"host,omitempty"` -} - -// Validate validates this hadoop discovery params -func (m *HadoopDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hadoop discovery params based on context it is used -func (m *HadoopDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HadoopDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HadoopDiscoveryParams) UnmarshalBinary(b []byte) error { - var res HadoopDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_backup_job_params.go b/v1/models/hdfs_backup_job_params.go deleted file mode 100644 index bb06d7ce..00000000 --- a/v1/models/hdfs_backup_job_params.go +++ /dev/null @@ -1,54 +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" -) - -// HdfsBackupJobParams Contains any additional hdfs environment specific backup params at the -// job level. -// -// swagger:model HdfsBackupJobParams -type HdfsBackupJobParams struct { - - // Any path/Glob pattern from HDFS that is to excluded. - HdfsExcludePattern []string `json:"hdfsExcludePattern"` - - // Any path/Glob pattern from HDFS that is to protected. - HdfsProtectPattern []string `json:"hdfsProtectPattern"` -} - -// Validate validates this hdfs backup job params -func (m *HdfsBackupJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hdfs backup job params based on context it is used -func (m *HdfsBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsBackupJobParams) UnmarshalBinary(b []byte) error { - var res HdfsBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_connect_params.go b/v1/models/hdfs_connect_params.go deleted file mode 100644 index 05708fb1..00000000 --- a/v1/models/hdfs_connect_params.go +++ /dev/null @@ -1,180 +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" -) - -// HdfsConnectParams Hdfs Connect Params. -// -// Specifies an Object containing information about a registered Hdfs -// source. -// -// swagger:model HdfsConnectParams -type HdfsConnectParams struct { - - // Specifies the Hadoop Distribution. - // Hadoop distribution. - // - // 'CDH' indicates Hadoop distribution type Cloudera. - // 'HDP' indicates Hadoop distribution type Hortonworks. - // Enum: ["CDH","HDP"] - HadoopDistribution *string `json:"hadoopDistribution,omitempty"` - - // Specifies the Hadoop version - HadoopVersion *string `json:"hadoopVersion,omitempty"` - - // Specifies the Hdfs discovery params. - HdfsDiscoveryParams *HadoopDiscoveryParams `json:"hdfsDiscoveryParams,omitempty"` - - // Specifies the kerberos principal. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Specifies the Namenode host or Nameservice. - Namenode *string `json:"namenode,omitempty"` - - // Specifies the Webhdfs Port - Port *int32 `json:"port,omitempty"` -} - -// Validate validates this hdfs connect params -func (m *HdfsConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHadoopDistribution(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hdfsConnectParamsTypeHadoopDistributionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CDH","HDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsConnectParamsTypeHadoopDistributionPropEnum = append(hdfsConnectParamsTypeHadoopDistributionPropEnum, v) - } -} - -const ( - - // HdfsConnectParamsHadoopDistributionCDH captures enum value "CDH" - HdfsConnectParamsHadoopDistributionCDH string = "CDH" - - // HdfsConnectParamsHadoopDistributionHDP captures enum value "HDP" - HdfsConnectParamsHadoopDistributionHDP string = "HDP" -) - -// prop value enum -func (m *HdfsConnectParams) validateHadoopDistributionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsConnectParamsTypeHadoopDistributionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsConnectParams) validateHadoopDistribution(formats strfmt.Registry) error { - if swag.IsZero(m.HadoopDistribution) { // not required - return nil - } - - // value enum - if err := m.validateHadoopDistributionEnum("hadoopDistribution", "body", *m.HadoopDistribution); err != nil { - return err - } - - return nil -} - -func (m *HdfsConnectParams) validateHdfsDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsDiscoveryParams) { // not required - return nil - } - - if m.HdfsDiscoveryParams != nil { - if err := m.HdfsDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs connect params based on the context it is used -func (m *HdfsConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsConnectParams) contextValidateHdfsDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsDiscoveryParams != nil { - - if swag.IsZero(m.HdfsDiscoveryParams) { // not required - return nil - } - - if err := m.HdfsDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsConnectParams) UnmarshalBinary(b []byte) error { - var res HdfsConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_connect_params_configuration_entry.go b/v1/models/hdfs_connect_params_configuration_entry.go deleted file mode 100644 index 51b1a230..00000000 --- a/v1/models/hdfs_connect_params_configuration_entry.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" -) - -// HdfsConnectParamsConfigurationEntry hdfs connect params configuration entry -// -// swagger:model HdfsConnectParams_ConfigurationEntry -type HdfsConnectParamsConfigurationEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this hdfs connect params configuration entry -func (m *HdfsConnectParamsConfigurationEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hdfs connect params configuration entry based on context it is used -func (m *HdfsConnectParamsConfigurationEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsConnectParamsConfigurationEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsConnectParamsConfigurationEntry) UnmarshalBinary(b []byte) error { - var res HdfsConnectParamsConfigurationEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_discovery_params.go b/v1/models/hdfs_discovery_params.go deleted file mode 100644 index 7d2cba43..00000000 --- a/v1/models/hdfs_discovery_params.go +++ /dev/null @@ -1,115 +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" -) - -// HdfsDiscoveryParams // ----------------------------------------------------------------------------- -// -// swagger:model HdfsDiscoveryParams -type HdfsDiscoveryParams struct { - - // Dir containing Config cores-site.xml, hdfs-site.xml for discovery. - HdfsConfigDirectory *string `json:"hdfsConfigDirectory,omitempty"` - - // Any host on the Hdfs cluster. - Host *string `json:"host,omitempty"` - - // SSH credentials required for reading configuration files. - SSHCredentials *PrivateCredentials `json:"sshCredentials,omitempty"` -} - -// Validate validates this hdfs discovery params -func (m *HdfsDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsDiscoveryParams) validateSSHCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if m.SSHCredentials != nil { - if err := m.SSHCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs discovery params based on the context it is used -func (m *HdfsDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsDiscoveryParams) contextValidateSSHCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHCredentials != nil { - - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if err := m.SSHCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsDiscoveryParams) UnmarshalBinary(b []byte) error { - var res HdfsDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_protection_source.go b/v1/models/hdfs_protection_source.go deleted file mode 100644 index c4f299e3..00000000 --- a/v1/models/hdfs_protection_source.go +++ /dev/null @@ -1,113 +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" -) - -// HdfsProtectionSource Hdfs Protection Source. -// -// Specifies an Object representing Hdfs. -// -// swagger:model HdfsProtectionSource -type HdfsProtectionSource struct { - - // Specifies the instance name of the Hdfs entity. - Name *string `json:"name,omitempty"` - - // Specifies the type of the managed Object in Hdfs Protection Source. - // Specifies the type of an Hdfs source entity. - // 'kCluster' indicates a Hdfs cluster distributed over several physical - // nodes. - // Enum: ["kCluster"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Hdfs entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this hdfs protection source -func (m *HdfsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hdfsProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsProtectionSourceTypeTypePropEnum = append(hdfsProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // HdfsProtectionSourceTypeKCluster captures enum value "kCluster" - HdfsProtectionSourceTypeKCluster string = "kCluster" -) - -// prop value enum -func (m *HdfsProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs protection source based on context it is used -func (m *HdfsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsProtectionSource) UnmarshalBinary(b []byte) error { - var res HdfsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hdfs_recover_job_params.go b/v1/models/hdfs_recover_job_params.go deleted file mode 100644 index ed85ab51..00000000 --- a/v1/models/hdfs_recover_job_params.go +++ /dev/null @@ -1,57 +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" -) - -// HdfsRecoverJobParams Contains any additional hdfs environment specific params for the -// recover job. -// -// swagger:model HdfsRecoverJobParams -type HdfsRecoverJobParams struct { - - // Any path/Glob pattern from HDFS that is to excluded. - HdfsExcludePattern []string `json:"hdfsExcludePattern"` - - // Any path/Glob pattern from HDFS that is to recovered. - HdfsRecoverPattern []string `json:"hdfsRecoverPattern"` - - // A target directory where all the recovered entities are created - TargetDirectory *string `json:"targetDirectory,omitempty"` -} - -// Validate validates this hdfs recover job params -func (m *HdfsRecoverJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hdfs recover job params based on context it is used -func (m *HdfsRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsRecoverJobParams) UnmarshalBinary(b []byte) error { - var res HdfsRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/health_tile.go b/v1/models/health_tile.go deleted file mode 100644 index 363d6a8c..00000000 --- a/v1/models/health_tile.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HealthTile Health Tile. -// -// Health for Dashboard. -// -// swagger:model HealthTile -type HealthTile struct { - - // Raw Cluster Capacity in Bytes. This is not usable capacity and does not - // take replication factor into account. - CapacityBytes *int64 `json:"capacityBytes,omitempty"` - - // Usage in Bytes on the cloud. - ClusterCloudUsageBytes *int64 `json:"clusterCloudUsageBytes,omitempty"` - - // Alerts in last 24 hours. - LastDayAlerts []*Alert `json:"lastDayAlerts"` - - // Number of Critical Alerts. - LastDayNumCriticals *int64 `json:"lastDayNumCriticals,omitempty"` - - // Number of Warning Alerts. - LastDayNumWarnings *int64 `json:"lastDayNumWarnings,omitempty"` - - // Number of nodes in the cluster. - NumNodes *int32 `json:"numNodes,omitempty"` - - // Number of nodes in the cluster that are unhealthy. - NumNodesWithIssues *int32 `json:"numNodesWithIssues,omitempty"` - - // Percent the cluster is full. - PercentFull *float32 `json:"percentFull,omitempty"` - - // Raw Bytes used in the cluster. - RawUsedBytes *int64 `json:"rawUsedBytes,omitempty"` -} - -// Validate validates this health tile -func (m *HealthTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastDayAlerts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthTile) validateLastDayAlerts(formats strfmt.Registry) error { - if swag.IsZero(m.LastDayAlerts) { // not required - return nil - } - - for i := 0; i < len(m.LastDayAlerts); i++ { - if swag.IsZero(m.LastDayAlerts[i]) { // not required - continue - } - - if m.LastDayAlerts[i] != nil { - if err := m.LastDayAlerts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayAlerts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayAlerts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this health tile based on the context it is used -func (m *HealthTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastDayAlerts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthTile) contextValidateLastDayAlerts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LastDayAlerts); i++ { - - if m.LastDayAlerts[i] != nil { - - if swag.IsZero(m.LastDayAlerts[i]) { // not required - return nil - } - - if err := m.LastDayAlerts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayAlerts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayAlerts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HealthTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HealthTile) UnmarshalBinary(b []byte) error { - var res HealthTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_backup_job_params.go b/v1/models/hive_backup_job_params.go deleted file mode 100644 index a8a3ea6c..00000000 --- a/v1/models/hive_backup_job_params.go +++ /dev/null @@ -1,110 +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" -) - -// HiveBackupJobParams Contains any additional hive environment specific backup params at the -// job level. -// -// swagger:model HiveBackupJobParams -type HiveBackupJobParams struct { - - // Additional hdfs connection params required for Hive Backup. - HdfsConnectParams *HdfsConnectParams `json:"hdfsConnectParams,omitempty"` -} - -// Validate validates this hive backup job params -func (m *HiveBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveBackupJobParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive backup job params based on the context it is used -func (m *HiveBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveBackupJobParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveBackupJobParams) UnmarshalBinary(b []byte) error { - var res HiveBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_connect_params.go b/v1/models/hive_connect_params.go deleted file mode 100644 index 1789d686..00000000 --- a/v1/models/hive_connect_params.go +++ /dev/null @@ -1,124 +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" -) - -// HiveConnectParams Hive Connect Params. -// -// Specifies an Object containing information about a registered Hive -// source. -// -// swagger:model HiveConnectParams -type HiveConnectParams struct { - - // Specifies the entity id of the HDFS source for this Hive - HdfsEntityID *int64 `json:"hdfsEntityId,omitempty"` - - // Specifies the Hive discovery params. - HiveDiscoveryParams *HadoopDiscoveryParams `json:"hiveDiscoveryParams,omitempty"` - - // Specifies the kerberos principal. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Specifies the Hive metastore host. - Metastore *string `json:"metastore,omitempty"` - - // Specifies the Hive metastore thrift Port - ThriftPort *int32 `json:"thriftPort,omitempty"` -} - -// Validate validates this hive connect params -func (m *HiveConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHiveDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveConnectParams) validateHiveDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveDiscoveryParams) { // not required - return nil - } - - if m.HiveDiscoveryParams != nil { - if err := m.HiveDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive connect params based on the context it is used -func (m *HiveConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHiveDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveConnectParams) contextValidateHiveDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveDiscoveryParams != nil { - - if swag.IsZero(m.HiveDiscoveryParams) { // not required - return nil - } - - if err := m.HiveDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveConnectParams) UnmarshalBinary(b []byte) error { - var res HiveConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_connect_params_configuration_entry.go b/v1/models/hive_connect_params_configuration_entry.go deleted file mode 100644 index bcbe1e3e..00000000 --- a/v1/models/hive_connect_params_configuration_entry.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" -) - -// HiveConnectParamsConfigurationEntry hive connect params configuration entry -// -// swagger:model HiveConnectParams_ConfigurationEntry -type HiveConnectParamsConfigurationEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this hive connect params configuration entry -func (m *HiveConnectParamsConfigurationEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hive connect params configuration entry based on context it is used -func (m *HiveConnectParamsConfigurationEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveConnectParamsConfigurationEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveConnectParamsConfigurationEntry) UnmarshalBinary(b []byte) error { - var res HiveConnectParamsConfigurationEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_discovery_params.go b/v1/models/hive_discovery_params.go deleted file mode 100644 index af15891a..00000000 --- a/v1/models/hive_discovery_params.go +++ /dev/null @@ -1,115 +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" -) - -// HiveDiscoveryParams // ----------------------------------------------------------------------------- -// -// swagger:model HiveDiscoveryParams -type HiveDiscoveryParams struct { - - // Dir containing Config hive-site.xml for discovery. - HiveConfigDirectory *string `json:"hiveConfigDirectory,omitempty"` - - // Any host on the Hive cluster. - Host *string `json:"host,omitempty"` - - // SSH credentials required for reading configuration files. - SSHCredentials *PrivateCredentials `json:"sshCredentials,omitempty"` -} - -// Validate validates this hive discovery params -func (m *HiveDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveDiscoveryParams) validateSSHCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if m.SSHCredentials != nil { - if err := m.SSHCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive discovery params based on the context it is used -func (m *HiveDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveDiscoveryParams) contextValidateSSHCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHCredentials != nil { - - if swag.IsZero(m.SSHCredentials) { // not required - return nil - } - - if err := m.SSHCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveDiscoveryParams) UnmarshalBinary(b []byte) error { - var res HiveDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_protection_source.go b/v1/models/hive_protection_source.go deleted file mode 100644 index 92324c0a..00000000 --- a/v1/models/hive_protection_source.go +++ /dev/null @@ -1,178 +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" -) - -// HiveProtectionSource Hive Protection Source. -// -// Specifies an Object representing Hive. -// -// swagger:model HiveProtectionSource -type HiveProtectionSource struct { - - // Specifies the instance name of the Hive entity. - Name *string `json:"name,omitempty"` - - // Information of a Hive Table, only valid for an entity of type - // kTable. - TableInfo *HiveTable `json:"tableInfo,omitempty"` - - // Specifies the type of the managed Object in Hive Protection Source. - // Specifies the type of an Hive source entity. - // 'kCluster' indicates a Hive cluster distributed over several physical - // nodes. - // 'kDatabase' indicates a Database in the Hive environment. - // 'kTable' indicates a Table in the Hive environment. - // Enum: ["kCluster","kDatabase","kTable"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Hive entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this hive protection source -func (m *HiveProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveProtectionSource) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -var hiveProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kDatabase","kTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveProtectionSourceTypeTypePropEnum = append(hiveProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // HiveProtectionSourceTypeKCluster captures enum value "kCluster" - HiveProtectionSourceTypeKCluster string = "kCluster" - - // HiveProtectionSourceTypeKDatabase captures enum value "kDatabase" - HiveProtectionSourceTypeKDatabase string = "kDatabase" - - // HiveProtectionSourceTypeKTable captures enum value "kTable" - HiveProtectionSourceTypeKTable string = "kTable" -) - -// prop value enum -func (m *HiveProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hive protection source based on the context it is used -func (m *HiveProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveProtectionSource) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveProtectionSource) UnmarshalBinary(b []byte) error { - var res HiveProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_recover_job_params.go b/v1/models/hive_recover_job_params.go deleted file mode 100644 index 87d755ee..00000000 --- a/v1/models/hive_recover_job_params.go +++ /dev/null @@ -1,113 +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" -) - -// HiveRecoverJobParams Contains any additional hive environment specific params for the -// recover job. -// -// swagger:model HiveRecoverJobParams -type HiveRecoverJobParams struct { - - // Additional hdfs connection params required for Hive Backup. - HdfsConnectParams *HdfsConnectParams `json:"hdfsConnectParams,omitempty"` - - // A suffix that is to be applied to all recovered entities - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this hive recover job params -func (m *HiveRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveRecoverJobParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive recover job params based on the context it is used -func (m *HiveRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveRecoverJobParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveRecoverJobParams) UnmarshalBinary(b []byte) error { - var res HiveRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hive_table.go b/v1/models/hive_table.go deleted file mode 100644 index 3a4a11cc..00000000 --- a/v1/models/hive_table.go +++ /dev/null @@ -1,130 +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" -) - -// HiveTable Hive Table Info. -// -// Specifies an Object containing information about a Hive table. -// -// swagger:model HiveTable -type HiveTable struct { - - // Specifies the approx size of the table in bytes. - ApproxSizeBytes *int64 `json:"approxSizeBytes,omitempty"` - - // Specifies the created on, epoch millis. - CreatedOn *int64 `json:"createdOn,omitempty"` - - // Specifies if this is a transactional table. - IsTransactionalTable *bool `json:"isTransactionalTable,omitempty"` - - // Specifies the owner of the table. - Owner *string `json:"owner,omitempty"` - - // Specifies the type of table ex. MANAGED,VIRTUAL etc. - // Specifies the type of an Hive table. - // 'kManaged' indicates a MANAGED Hive table. - // 'kExternal' indicates a EXTERNAL Hive table. - // 'kVirtual' indicates a VIRTUAL Hive tablet. - // 'kIndex' indicates a INDEX Hive table. - // Enum: ["kManaged","kExternal","kVirtual","kIndex"] - TableType *string `json:"tableType,omitempty"` -} - -// Validate validates this hive table -func (m *HiveTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTableType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hiveTableTypeTableTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kManaged","kExternal","kVirtual","kIndex"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveTableTypeTableTypePropEnum = append(hiveTableTypeTableTypePropEnum, v) - } -} - -const ( - - // HiveTableTableTypeKManaged captures enum value "kManaged" - HiveTableTableTypeKManaged string = "kManaged" - - // HiveTableTableTypeKExternal captures enum value "kExternal" - HiveTableTableTypeKExternal string = "kExternal" - - // HiveTableTableTypeKVirtual captures enum value "kVirtual" - HiveTableTableTypeKVirtual string = "kVirtual" - - // HiveTableTableTypeKIndex captures enum value "kIndex" - HiveTableTableTypeKIndex string = "kIndex" -) - -// prop value enum -func (m *HiveTable) validateTableTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveTableTypeTableTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveTable) validateTableType(formats strfmt.Registry) error { - if swag.IsZero(m.TableType) { // not required - return nil - } - - // value enum - if err := m.validateTableTypeEnum("tableType", "body", *m.TableType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hive table based on context it is used -func (m *HiveTable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveTable) UnmarshalBinary(b []byte) error { - var res HiveTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host.go b/v1/models/host.go deleted file mode 100644 index fa79e98a..00000000 --- a/v1/models/host.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Host host -// -// swagger:model Host -type Host struct { - - // IP address of host. - IPAddressVec []string `json:"ipAddressVec"` - - // Number of CPU available on the host. - NumCPU *int32 `json:"numCpu,omitempty"` - - // Port numbers corresponding on this host for Database that includes this - // host. - // Currently we are using just one port number. - PortnumVec []int64 `json:"portnumVec"` - - // Multiple session configurations available for this host. - SessionConfVec []*SessionConfiguration `json:"sessionConfVec"` -} - -// Validate validates this host -func (m *Host) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSessionConfVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Host) validateSessionConfVec(formats strfmt.Registry) error { - if swag.IsZero(m.SessionConfVec) { // not required - return nil - } - - for i := 0; i < len(m.SessionConfVec); i++ { - if swag.IsZero(m.SessionConfVec[i]) { // not required - continue - } - - if m.SessionConfVec[i] != nil { - if err := m.SessionConfVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionConfVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionConfVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this host based on the context it is used -func (m *Host) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSessionConfVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Host) contextValidateSessionConfVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SessionConfVec); i++ { - - if m.SessionConfVec[i] != nil { - - if swag.IsZero(m.SessionConfVec[i]) { // not required - return nil - } - - if err := m.SessionConfVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionConfVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionConfVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Host) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Host) UnmarshalBinary(b []byte) error { - var res Host - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_agent_status.go b/v1/models/host_agent_status.go deleted file mode 100644 index 29580d32..00000000 --- a/v1/models/host_agent_status.go +++ /dev/null @@ -1,232 +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" -) - -// HostAgentStatus Contains information about one Agent that is associated with a Host such -// as a Physical entity or a VM entity. -// -// swagger:model HostAgentStatus -type HostAgentStatus struct { - - // The hostname/ipaddr that comes from the ClusterNetworkingInfo::Endpoint - // object. Note, this is plumbed on the fly and is not persisted. - DisplayName *string `json:"displayName,omitempty"` - - // ID of the respective kAgent object. - ID *int64 `json:"id,omitempty"` - - // Whether Agent supports multi node multi channel feature for Oracle. - OracleMultiNodeMultiChannelSupported *bool `json:"oracleMultiNodeMultiChannelSupported,omitempty"` - - // The common "Agent properties" block. Note, this is plumbed on the fly and - // is not persisted. - Properties *Properties `json:"properties,omitempty"` - - // The Agent's refresh error (if any) from its RegisteredEntityInfo - // block. - RefreshError *PrivateErrorProto `json:"refreshError,omitempty"` - - // The Agent's "source_side_dedup_enabled" (if specified) from its - // RegisteredEntityInfo block. - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // The Agent's verification error (if any) from its RegisteredEntityInfo - // block. - VerificationError *PrivateErrorProto `json:"verificationError,omitempty"` - - // The Agent's verification status from its RegisteredEntityInfo block. - VerificationStatus *int32 `json:"verificationStatus,omitempty"` -} - -// Validate validates this host agent status -func (m *HostAgentStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVerificationError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostAgentStatus) validateProperties(formats strfmt.Registry) error { - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *HostAgentStatus) validateRefreshError(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if m.RefreshError != nil { - if err := m.RefreshError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *HostAgentStatus) validateVerificationError(formats strfmt.Registry) error { - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if m.VerificationError != nil { - if err := m.VerificationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this host agent status based on the context it is used -func (m *HostAgentStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVerificationError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostAgentStatus) contextValidateProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.Properties != nil { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if err := m.Properties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *HostAgentStatus) contextValidateRefreshError(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshError != nil { - - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if err := m.RefreshError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *HostAgentStatus) contextValidateVerificationError(ctx context.Context, formats strfmt.Registry) error { - - if m.VerificationError != nil { - - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if err := m.VerificationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HostAgentStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostAgentStatus) UnmarshalBinary(b []byte) error { - var res HostAgentStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_entry.go b/v1/models/host_entry.go deleted file mode 100644 index 95c6e7c3..00000000 --- a/v1/models/host_entry.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" - "github.com/go-openapi/validate" -) - -// HostEntry Host Entry. -// -// Specifies the parameters of a host entry that can be stored in the -// cluster's /etc/hosts file. -// -// swagger:model HostEntry -type HostEntry struct { - - // Description the host entry. - Description *string `json:"description,omitempty"` - - // Specifies the domain names of the host. - // Required: true - DomainNames []string `json:"domainNames"` - - // Specifies the IP address of the host. - // Required: true - IP *string `json:"ip"` -} - -// Validate validates this host entry -func (m *HostEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainNames(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostEntry) validateDomainNames(formats strfmt.Registry) error { - - if err := validate.Required("domainNames", "body", m.DomainNames); err != nil { - return err - } - - return nil -} - -func (m *HostEntry) validateIP(formats strfmt.Registry) error { - - if err := validate.Required("ip", "body", m.IP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this host entry based on context it is used -func (m *HostEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostEntry) UnmarshalBinary(b []byte) error { - var res HostEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_info.go b/v1/models/host_info.go deleted file mode 100644 index 32981821..00000000 --- a/v1/models/host_info.go +++ /dev/null @@ -1,64 +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" -) - -// HostInfo Hosts Information list. -// -// Specifies the list of all hosts on which the certificate is deployed. -// -// swagger:model HostInfo -type HostInfo struct { - - // Specifies the password of the host to establish SSH connection. - // The certificate is copied to the host after generating the certificate - // on the cluster. - Password *string `json:"password,omitempty"` - - // Specifies the servername of the host where certificate is to be deployed. - ServerName *string `json:"serverName,omitempty"` - - // Specifies the target location on the host where the certificate is - // deployed. - Target *string `json:"target,omitempty"` - - // Specifies the username of the host. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this host info -func (m *HostInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this host info based on context it is used -func (m *HostInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostInfo) UnmarshalBinary(b []byte) error { - var res HostInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_result.go b/v1/models/host_result.go deleted file mode 100644 index 0dbffcc4..00000000 --- a/v1/models/host_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" -) - -// HostResult Host Result. -// -// Specifies the response received after requesting a PUT, POST, or DELETE -// method on the /network/hosts endpoint. -// -// swagger:model HostResult -type HostResult struct { - - // Specifies a message describing the status of the Hosts request. - Message *string `json:"message,omitempty"` -} - -// Validate validates this host result -func (m *HostResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this host result based on context it is used -func (m *HostResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostResult) UnmarshalBinary(b []byte) error { - var res HostResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_settings_check.go b/v1/models/host_settings_check.go deleted file mode 100644 index 7ff1c477..00000000 --- a/v1/models/host_settings_check.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" -) - -// HostSettingsCheck Specifies types of host settings checks that can be performed. -// -// swagger:model HostSettingsCheck -type HostSettingsCheck struct { - - // Indicates the type of the check to perform. - CheckType *int32 `json:"checkType,omitempty"` - - // Contains parameters for specific checks. - Params HostSettingsCheckParams `json:"params,omitempty"` -} - -// Validate validates this host settings check -func (m *HostSettingsCheck) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this host settings check based on context it is used -func (m *HostSettingsCheck) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostSettingsCheck) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostSettingsCheck) UnmarshalBinary(b []byte) error { - var res HostSettingsCheck - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/host_settings_check_params.go b/v1/models/host_settings_check_params.go deleted file mode 100644 index e1be81a3..00000000 --- a/v1/models/host_settings_check_params.go +++ /dev/null @@ -1,11 +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 - -// HostSettingsCheckParams Proto for defining check parameters. -// -// swagger:model HostSettingsCheckParams -type HostSettingsCheckParams interface{} diff --git a/v1/models/host_settings_check_result.go b/v1/models/host_settings_check_result.go deleted file mode 100644 index aac657c3..00000000 --- a/v1/models/host_settings_check_result.go +++ /dev/null @@ -1,198 +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" -) - -// HostSettingsCheckResult Host Setting Check Result. -// -// Specifies the result of various checks performed internally on host. -// -// swagger:model HostSettingsCheckResult -type HostSettingsCheckResult struct { - - // Specifies the type of the check internally performed. - // Specifies the type of the host check performed internally. - // 'kIsAgentPortAccessible' indicates the check for agent port access. - // 'kIsAgentRunning' indicates the status for the Cohesity agent service. - // 'kIsSQLWriterRunning' indicates the status for SQLWriter service. - // 'kAreSQLInstancesRunning' indicates the run status for all the SQL - // instances in the host. - // 'kCheckServiceLoginsConfig' checks the privileges and sysadmin status - // of the logins used by the SQL instance services, Cohesity agent service - // and the SQLWriter service. - // 'kCheckSQLFCIVIP' checks whether the SQL FCI is registered with a valid - // VIP or FQDN. - // 'kCheckSQLDiskSpace' checks whether volumes containing SQL DBs have at - // least 10% free space. - // Enum: ["kIsAgentPortAccessible","kIsAgentRunning","kIsSQLWriterRunning","kAreSQLInstancesRunning","kCheckServiceLoginsConfig","kCheckSQLFCIVIP","kCheckSQLDiskSpace"] - CheckType *string `json:"checkType,omitempty"` - - // Specifies the type of the result returned after performing the internal - // host check. - // Specifies the type of the host check result performed internally. - // 'kPass' indicates that the respective check was successful. - // 'kFail' indicates that the respective check failed as some mandatory - // setting is not met - // 'kWarning' indicates that the respective check has warning as certain - // non-mandatory setting is not met. - // Enum: ["kPass","kFail","kWarning"] - ResultType *string `json:"resultType,omitempty"` - - // Specifies a descriptive message for failed/warning types. - UserMessage *string `json:"userMessage,omitempty"` -} - -// Validate validates this host settings check result -func (m *HostSettingsCheckResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCheckType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResultType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hostSettingsCheckResultTypeCheckTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIsAgentPortAccessible","kIsAgentRunning","kIsSQLWriterRunning","kAreSQLInstancesRunning","kCheckServiceLoginsConfig","kCheckSQLFCIVIP","kCheckSQLDiskSpace"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostSettingsCheckResultTypeCheckTypePropEnum = append(hostSettingsCheckResultTypeCheckTypePropEnum, v) - } -} - -const ( - - // HostSettingsCheckResultCheckTypeKIsAgentPortAccessible captures enum value "kIsAgentPortAccessible" - HostSettingsCheckResultCheckTypeKIsAgentPortAccessible string = "kIsAgentPortAccessible" - - // HostSettingsCheckResultCheckTypeKIsAgentRunning captures enum value "kIsAgentRunning" - HostSettingsCheckResultCheckTypeKIsAgentRunning string = "kIsAgentRunning" - - // HostSettingsCheckResultCheckTypeKIsSQLWriterRunning captures enum value "kIsSQLWriterRunning" - HostSettingsCheckResultCheckTypeKIsSQLWriterRunning string = "kIsSQLWriterRunning" - - // HostSettingsCheckResultCheckTypeKAreSQLInstancesRunning captures enum value "kAreSQLInstancesRunning" - HostSettingsCheckResultCheckTypeKAreSQLInstancesRunning string = "kAreSQLInstancesRunning" - - // HostSettingsCheckResultCheckTypeKCheckServiceLoginsConfig captures enum value "kCheckServiceLoginsConfig" - HostSettingsCheckResultCheckTypeKCheckServiceLoginsConfig string = "kCheckServiceLoginsConfig" - - // HostSettingsCheckResultCheckTypeKCheckSQLFCIVIP captures enum value "kCheckSQLFCIVIP" - HostSettingsCheckResultCheckTypeKCheckSQLFCIVIP string = "kCheckSQLFCIVIP" - - // HostSettingsCheckResultCheckTypeKCheckSQLDiskSpace captures enum value "kCheckSQLDiskSpace" - HostSettingsCheckResultCheckTypeKCheckSQLDiskSpace string = "kCheckSQLDiskSpace" -) - -// prop value enum -func (m *HostSettingsCheckResult) validateCheckTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostSettingsCheckResultTypeCheckTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostSettingsCheckResult) validateCheckType(formats strfmt.Registry) error { - if swag.IsZero(m.CheckType) { // not required - return nil - } - - // value enum - if err := m.validateCheckTypeEnum("checkType", "body", *m.CheckType); err != nil { - return err - } - - return nil -} - -var hostSettingsCheckResultTypeResultTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPass","kFail","kWarning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostSettingsCheckResultTypeResultTypePropEnum = append(hostSettingsCheckResultTypeResultTypePropEnum, v) - } -} - -const ( - - // HostSettingsCheckResultResultTypeKPass captures enum value "kPass" - HostSettingsCheckResultResultTypeKPass string = "kPass" - - // HostSettingsCheckResultResultTypeKFail captures enum value "kFail" - HostSettingsCheckResultResultTypeKFail string = "kFail" - - // HostSettingsCheckResultResultTypeKWarning captures enum value "kWarning" - HostSettingsCheckResultResultTypeKWarning string = "kWarning" -) - -// prop value enum -func (m *HostSettingsCheckResult) validateResultTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostSettingsCheckResultTypeResultTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostSettingsCheckResult) validateResultType(formats strfmt.Registry) error { - if swag.IsZero(m.ResultType) { // not required - return nil - } - - // value enum - if err := m.validateResultTypeEnum("resultType", "body", *m.ResultType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this host settings check result based on context it is used -func (m *HostSettingsCheckResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostSettingsCheckResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostSettingsCheckResult) UnmarshalBinary(b []byte) error { - var res HostSettingsCheckResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyper_flex_protection_source.go b/v1/models/hyper_flex_protection_source.go deleted file mode 100644 index f1ea33c4..00000000 --- a/v1/models/hyper_flex_protection_source.go +++ /dev/null @@ -1,116 +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" -) - -// HyperFlexProtectionSource HyperFlex Storae Snapshot. -// -// Specifies a Storage Snapshot Provider in a HyperFlex environment. -// -// swagger:model HyperFlexProtectionSource -type HyperFlexProtectionSource struct { - - // Specifies a unique name of the Protection Source - Name *string `json:"name,omitempty"` - - // Specifies the product version of the protection source. - ProductVersion *string `json:"productVersion,omitempty"` - - // Specifies the type of managed Object in a HyperFlex protection source - // like kServer. - // Examples of a HyperFlex types include 'kServer'. - // 'kServer' indicates HyperFlex server entity. - // Enum: ["kServer"] - Type *string `json:"type,omitempty"` - - // Specifies the uuid of the protection source. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this hyper flex protection source -func (m *HyperFlexProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hyperFlexProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kServer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hyperFlexProtectionSourceTypeTypePropEnum = append(hyperFlexProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // HyperFlexProtectionSourceTypeKServer captures enum value "kServer" - HyperFlexProtectionSourceTypeKServer string = "kServer" -) - -// prop value enum -func (m *HyperFlexProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hyperFlexProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HyperFlexProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hyper flex protection source based on context it is used -func (m *HyperFlexProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HyperFlexProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperFlexProtectionSource) UnmarshalBinary(b []byte) error { - var res HyperFlexProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyper_v_backup_env_params.go b/v1/models/hyper_v_backup_env_params.go deleted file mode 100644 index e71d766f..00000000 --- a/v1/models/hyper_v_backup_env_params.go +++ /dev/null @@ -1,199 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HyperVBackupEnvParams HyperV Backup Environment Parameters. -// -// Message to capture any additional backup params for a HyperV environment. -// -// swagger:model HyperVBackupEnvParams -type HyperVBackupEnvParams struct { - - // Whether to fallback to take a crash-consistent snapshot incase taking - // an app-consistent snapshot fails. - AllowCrashConsistentSnapshot *bool `json:"allowCrashConsistentSnapshot,omitempty"` - - // The type of backup job to use. Default is to auto-detect the best type to - // use based on the VMs to backup. End user may select RCT or VSS also. - BackupJobType *int32 `json:"backupJobType,omitempty"` - - // List of Virtual Disk(s) to be excluded from the backup job. These disks - // will be excluded for all VMs in this environment unless overriden by the - // disk exclusion list from BackupSourceParams.HyperVBackupSourceParams. - HypervDiskExclusionInfo []*HyperVDiskFilterProto `json:"hypervDiskExclusionInfo"` - - // List of Virtual Disk(s) to be included in the backup job for the source. - // These disks will be included for all VMs in this environment and all other - // disks will be excluded. - // It can be overriden by the disk exclusion/inclusion list from - // BackupSourceParams.HyperVBackupSourceParams. - HypervDiskInclusionInfo []*HyperVDiskFilterProto `json:"hypervDiskInclusionInfo"` -} - -// Validate validates this hyper v backup env params -func (m *HyperVBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHypervDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervDiskInclusionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVBackupEnvParams) validateHypervDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HypervDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.HypervDiskExclusionInfo); i++ { - if swag.IsZero(m.HypervDiskExclusionInfo[i]) { // not required - continue - } - - if m.HypervDiskExclusionInfo[i] != nil { - if err := m.HypervDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupEnvParams) validateHypervDiskInclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HypervDiskInclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.HypervDiskInclusionInfo); i++ { - if swag.IsZero(m.HypervDiskInclusionInfo[i]) { // not required - continue - } - - if m.HypervDiskInclusionInfo[i] != nil { - if err := m.HypervDiskInclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this hyper v backup env params based on the context it is used -func (m *HyperVBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHypervDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervDiskInclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVBackupEnvParams) contextValidateHypervDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HypervDiskExclusionInfo); i++ { - - if m.HypervDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.HypervDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.HypervDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupEnvParams) contextValidateHypervDiskInclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HypervDiskInclusionInfo); i++ { - - if m.HypervDiskInclusionInfo[i] != nil { - - if swag.IsZero(m.HypervDiskInclusionInfo[i]) { // not required - return nil - } - - if err := m.HypervDiskInclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVBackupEnvParams) UnmarshalBinary(b []byte) error { - var res HyperVBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyper_v_backup_source_params.go b/v1/models/hyper_v_backup_source_params.go deleted file mode 100644 index af552c8d..00000000 --- a/v1/models/hyper_v_backup_source_params.go +++ /dev/null @@ -1,242 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HyperVBackupSourceParams Hyper-V Backup Source Parameters. -// -// Message to capture additional backup params for a Hyper-V type source. -// -// swagger:model HyperVBackupSourceParams -type HyperVBackupSourceParams struct { - - // List of Virtual Disk(s) to be excluded from the backup job for the source. - // Overrides the exclusion list requested (if any) through - // EnvBackupParams.HyperVBackupEnvParams. - HypervDiskExclusionInfo []*HyperVDiskFilterProto `json:"hypervDiskExclusionInfo"` - - // List of Virtual Disk(s) to be included in the backup job for the source. - // All other disks except these would be excluded. - // Overrides the inclusion/exclusion list requested (if any) through - // EnvBackupParams.HyperVBackupEnvParams. - HypervDiskInclusionInfo []*HyperVDiskFilterProto `json:"hypervDiskInclusionInfo"` - - // This message will capture params for applications that are running as - // part of the server. - SourceAppParams *SourceAppParams `json:"sourceAppParams,omitempty"` -} - -// Validate validates this hyper v backup source params -func (m *HyperVBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHypervDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervDiskInclusionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVBackupSourceParams) validateHypervDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HypervDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.HypervDiskExclusionInfo); i++ { - if swag.IsZero(m.HypervDiskExclusionInfo[i]) { // not required - continue - } - - if m.HypervDiskExclusionInfo[i] != nil { - if err := m.HypervDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupSourceParams) validateHypervDiskInclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HypervDiskInclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.HypervDiskInclusionInfo); i++ { - if swag.IsZero(m.HypervDiskInclusionInfo[i]) { // not required - continue - } - - if m.HypervDiskInclusionInfo[i] != nil { - if err := m.HypervDiskInclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupSourceParams) validateSourceAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if m.SourceAppParams != nil { - if err := m.SourceAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v backup source params based on the context it is used -func (m *HyperVBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHypervDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervDiskInclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVBackupSourceParams) contextValidateHypervDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HypervDiskExclusionInfo); i++ { - - if m.HypervDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.HypervDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.HypervDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupSourceParams) contextValidateHypervDiskInclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HypervDiskInclusionInfo); i++ { - - if m.HypervDiskInclusionInfo[i] != nil { - - if swag.IsZero(m.HypervDiskInclusionInfo[i]) { // not required - return nil - } - - if err := m.HypervDiskInclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervDiskInclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVBackupSourceParams) contextValidateSourceAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceAppParams != nil { - - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if err := m.SourceAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVBackupSourceParams) UnmarshalBinary(b []byte) error { - var res HyperVBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyper_v_disk_filter_proto.go b/v1/models/hyper_v_disk_filter_proto.go deleted file mode 100644 index bb082c91..00000000 --- a/v1/models/hyper_v_disk_filter_proto.go +++ /dev/null @@ -1,62 +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" -) - -// HyperVDiskFilterProto HyperV Disk Filter Proto. -// -// This message contains basic info of the disk to be excluded/included in -// backup. The info contained here: -// 1. should be enough to identify the disk during the backup job. -// 2. is a subset of the message fetched to be displayed to the end user. -// Example: entities/hyperv.proto. -// -// swagger:model HyperVDiskFilterProto -type HyperVDiskFilterProto struct { - - // Controller's bus-id controlling the virtual disk in question. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller's type (SCSI, IDE etc). - ControllerType *string `json:"controllerType,omitempty"` - - // Disk unit number to identify the virtual disk within a controller. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this hyper v disk filter proto -func (m *HyperVDiskFilterProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hyper v disk filter proto based on context it is used -func (m *HyperVDiskFilterProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVDiskFilterProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVDiskFilterProto) UnmarshalBinary(b []byte) error { - var res HyperVDiskFilterProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_clone_parameters.go b/v1/models/hyperv_clone_parameters.go deleted file mode 100644 index 7b2772b9..00000000 --- a/v1/models/hyperv_clone_parameters.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/strfmt" - "github.com/go-openapi/swag" -) - -// HypervCloneParameters Hyperv Clone Parameters. -// -// Specifies information needed when cloning VMs in HyperV enviroment. -// This field defines the HyperV specific params for restore tasks of type -// kCloneVMs. -// -// swagger:model HypervCloneParameters -type HypervCloneParameters struct { - - // Specifies whether the network should be left in disabled state. - // Attached network is enabled by default. Set this flag to true to - // disable it. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies a network configuration to be attached to the cloned or - // recovered object. - // For kCloneVMs and kRecoverVMs tasks, original network configuration - // is detached if the cloned or recovered object is kept under a different - // parent Protection Source or a different Resource Pool. - // By default, for kRecoverVMs task, original network configuration is - // preserved if the recovered object is kept under the same parent - // Protection Source and the same Resource Pool. - // Specify this field to override the preserved network configuration or - // to attach a new network configuration to the cloned or recovered objects. - // You can get the networkId of the kNetwork object by setting - // includeNetworks to 'true' in the GET /public/protectionSources operation. - // In the response, get the id of the desired kNetwork object, the resource - // pool, and the registered parent Protection Source. - NetworkID *int64 `json:"networkId,omitempty"` - - // Specifies the power state of the cloned or recovered objects. - // By default, the cloned or recovered objects are powered off. - PoweredOn *bool `json:"poweredOn,omitempty"` - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // Specifies whether or not to preserve tags during the operation. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // The resource (HyperV host) to which the restored VM will be attached. - // - // This field is optional for a kRecoverVMs task if the VMs are being - // restored to its original parent source. If not specified, restored VMs - // will be attached to its original host. This field is mandatory if the - // VMs are being restored to a different parent source. - ResourceID *int64 `json:"resourceId,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this hyperv clone parameters -func (m *HypervCloneParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hyperv clone parameters based on context it is used -func (m *HypervCloneParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HypervCloneParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervCloneParameters) UnmarshalBinary(b []byte) error { - var res HypervCloneParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_datastore.go b/v1/models/hyperv_datastore.go deleted file mode 100644 index f729dd98..00000000 --- a/v1/models/hyperv_datastore.go +++ /dev/null @@ -1,120 +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" -) - -// HypervDatastore HyperV Datastore Object. -// -// Specifies information about a Datastore Object in HyperV environment. -// -// swagger:model HypervDatastore -type HypervDatastore struct { - - // Specifies the capacity of the datastore in bytes. - Capacity *uint64 `json:"capacity,omitempty"` - - // Specifies the available space on the datastore in bytes. - FreeSpace *uint64 `json:"freeSpace,omitempty"` - - // Specifies the available mount points on the datastore. - MountPoints []string `json:"mountPoints"` - - // Specifies the type of the datastore object like kFileShare or kVolume. - // overrideDescription: true - // Specifies the type of a HyperV datastore object. - // 'kFileShare' indicates SMB file share datastore. - // 'kVolume' indicates a volume which can a LUN. - // Enum: ["kFileShare","kVolume"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this hyperv datastore -func (m *HypervDatastore) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hypervDatastoreTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFileShare","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervDatastoreTypeTypePropEnum = append(hypervDatastoreTypeTypePropEnum, v) - } -} - -const ( - - // HypervDatastoreTypeKFileShare captures enum value "kFileShare" - HypervDatastoreTypeKFileShare string = "kFileShare" - - // HypervDatastoreTypeKVolume captures enum value "kVolume" - HypervDatastoreTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *HypervDatastore) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervDatastoreTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervDatastore) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hyperv datastore based on context it is used -func (m *HypervDatastore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HypervDatastore) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervDatastore) UnmarshalBinary(b []byte) error { - var res HypervDatastore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_env_job_parameters.go b/v1/models/hyperv_env_job_parameters.go deleted file mode 100644 index c887c3b5..00000000 --- a/v1/models/hyperv_env_job_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// HypervEnvJobParameters Hyperv Environment Job Parameters. -// -// Specifies job parameters applicable for all 'kHyperV' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model HypervEnvJobParameters -type HypervEnvJobParameters struct { - - // If true, takes a crash-consistent snapshot when app-consistent snapshot - // fails. Otherwise, the snapshot attempt is marked failed. - // By default, this field is set to false. - FallbackToCrashConsistent *bool `json:"fallbackToCrashConsistent,omitempty"` -} - -// Validate validates this hyperv env job parameters -func (m *HypervEnvJobParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hyperv env job parameters based on context it is used -func (m *HypervEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HypervEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervEnvJobParameters) UnmarshalBinary(b []byte) error { - var res HypervEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_protection_source.go b/v1/models/hyperv_protection_source.go deleted file mode 100644 index c3a7f866..00000000 --- a/v1/models/hyperv_protection_source.go +++ /dev/null @@ -1,576 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HypervProtectionSource HyperV Protection Source. -// -// Specifies a Protection Source in HyperV environment. -// -// swagger:model HypervProtectionSource -type HypervProtectionSource struct { - - // Array of Agents on the Physical Protection Source. - // - // Specifiles the agents running on the HyperV Protection Source - // and the status information. - Agents []*AgentInformation `json:"agents"` - - // Specifies the type of backup supported by the VM. - // 'kRctBackup', 'kVssBackup' - // Specifies the type of an HyperV datastore object. - // 'kRctBackup' indicates backup is done using RCT/checkpoints. - // 'kVssBackup' indicates backup is done using VSS. - // Enum: ["kRctBackup","kVssBackup"] - BackupType *string `json:"backupType,omitempty"` - - // Specifies the build number for HyperV SCVMM Servers. - BuildNumber *string `json:"buildNumber,omitempty"` - - // Specifies the cluster name for 'kHostCluster' objects. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies additional information for 'kDatastore' objects. - DatastoreInfo *HypervDatastore `json:"datastoreInfo,omitempty"` - - // Specifies a description about the Protection Source. - Description *string `json:"description,omitempty"` - - // Specifies host OS type for 'kVirtualMachine' objects. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the UUID for 'kVirtualMachine' HyperV objects. - HypervUUID *string `json:"hypervUuid,omitempty"` - - // Specifies the name of the HyperV Object. - Name *string `json:"name,omitempty"` - - // Specifies the list of VM Tag attributes associated with this - // Object. - TagAttributes []*TagAttribute `json:"tagAttributes"` - - // Specifies the type of an HyperV Protection Source Object such as - // 'kSCVMMServer', 'kStandaloneHost', 'kNetwork', etc. - // overrideDescription: true - // Specifies the type of an HyperV Protection Source. - // 'kSCVMMServer' indicates a collection of root folders clusters. - // 'kStandaloneHost' indicates a single Nutanix cluster. - // 'kStandaloneCluster' indicates a single Nutanix cluster. - // 'kHostGroup' indicates a Nutanix cluster managed by a Prism Central. - // 'kHypervHost' indicates an HyperV host. - // 'kHostCluster' indicates a Nutanix cluster managed by a Prism Central. - // 'kVirtualMachine' indicates a Virtual Machine. - // 'kNetwork' indicates a Virtual Machine network object. - // 'kDatastore' represents a storage container object. - // 'kTag' indicates a tag type object. - // 'kCustomProperty' indicates a custom property including tag type. - // Enum: ["kSCVMMServer","kStandaloneHost","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kVirtualMachine","kNetwork","kDatastore","kTag","kCustomProperty"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID of the Object. This is unique within the HyperV - // environment. - UUID *string `json:"uuid,omitempty"` - - // Specifies additional information for 'kVirtualMachine' objects. - VMInfo *HypervVirtualMachine `json:"vmInfo,omitempty"` - - // Specifies the windows version for HyperV hosts. - WindowsVersion *string `json:"windowsVersion,omitempty"` -} - -// Validate validates this hyperv protection source -func (m *HypervProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HypervProtectionSource) validateAgents(formats strfmt.Registry) error { - if swag.IsZero(m.Agents) { // not required - return nil - } - - for i := 0; i < len(m.Agents); i++ { - if swag.IsZero(m.Agents[i]) { // not required - continue - } - - if m.Agents[i] != nil { - if err := m.Agents[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var hypervProtectionSourceTypeBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRctBackup","kVssBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervProtectionSourceTypeBackupTypePropEnum = append(hypervProtectionSourceTypeBackupTypePropEnum, v) - } -} - -const ( - - // HypervProtectionSourceBackupTypeKRctBackup captures enum value "kRctBackup" - HypervProtectionSourceBackupTypeKRctBackup string = "kRctBackup" - - // HypervProtectionSourceBackupTypeKVssBackup captures enum value "kVssBackup" - HypervProtectionSourceBackupTypeKVssBackup string = "kVssBackup" -) - -// prop value enum -func (m *HypervProtectionSource) validateBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervProtectionSourceTypeBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervProtectionSource) validateBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupType) { // not required - return nil - } - - // value enum - if err := m.validateBackupTypeEnum("backupType", "body", *m.BackupType); err != nil { - return err - } - - return nil -} - -func (m *HypervProtectionSource) validateDatastoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if m.DatastoreInfo != nil { - if err := m.DatastoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -var hypervProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervProtectionSourceTypeHostTypePropEnum = append(hypervProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // HypervProtectionSourceHostTypeKLinux captures enum value "kLinux" - HypervProtectionSourceHostTypeKLinux string = "kLinux" - - // HypervProtectionSourceHostTypeKWindows captures enum value "kWindows" - HypervProtectionSourceHostTypeKWindows string = "kWindows" - - // HypervProtectionSourceHostTypeKAix captures enum value "kAix" - HypervProtectionSourceHostTypeKAix string = "kAix" - - // HypervProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - HypervProtectionSourceHostTypeKSolaris string = "kSolaris" - - // HypervProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - HypervProtectionSourceHostTypeKSapHana string = "kSapHana" - - // HypervProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - HypervProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // HypervProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - HypervProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // HypervProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - HypervProtectionSourceHostTypeKMySQL string = "kMySQL" - - // HypervProtectionSourceHostTypeKOther captures enum value "kOther" - HypervProtectionSourceHostTypeKOther string = "kOther" - - // HypervProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - HypervProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // HypervProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - HypervProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // HypervProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - HypervProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // HypervProtectionSourceHostTypeKDB2 captures enum value "kDB2" - HypervProtectionSourceHostTypeKDB2 string = "kDB2" - - // HypervProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - HypervProtectionSourceHostTypeKSapASE string = "kSapASE" - - // HypervProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - HypervProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // HypervProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - HypervProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // HypervProtectionSourceHostTypeKVOS captures enum value "kVOS" - HypervProtectionSourceHostTypeKVOS string = "kVOS" - - // HypervProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - HypervProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *HypervProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *HypervProtectionSource) validateTagAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributes) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributes); i++ { - if swag.IsZero(m.TagAttributes[i]) { // not required - continue - } - - if m.TagAttributes[i] != nil { - if err := m.TagAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var hypervProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSCVMMServer","kStandaloneHost","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kVirtualMachine","kNetwork","kDatastore","kTag","kCustomProperty"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervProtectionSourceTypeTypePropEnum = append(hypervProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // HypervProtectionSourceTypeKSCVMMServer captures enum value "kSCVMMServer" - HypervProtectionSourceTypeKSCVMMServer string = "kSCVMMServer" - - // HypervProtectionSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - HypervProtectionSourceTypeKStandaloneHost string = "kStandaloneHost" - - // HypervProtectionSourceTypeKStandaloneCluster captures enum value "kStandaloneCluster" - HypervProtectionSourceTypeKStandaloneCluster string = "kStandaloneCluster" - - // HypervProtectionSourceTypeKHostGroup captures enum value "kHostGroup" - HypervProtectionSourceTypeKHostGroup string = "kHostGroup" - - // HypervProtectionSourceTypeKHypervHost captures enum value "kHypervHost" - HypervProtectionSourceTypeKHypervHost string = "kHypervHost" - - // HypervProtectionSourceTypeKHostCluster captures enum value "kHostCluster" - HypervProtectionSourceTypeKHostCluster string = "kHostCluster" - - // HypervProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - HypervProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // HypervProtectionSourceTypeKNetwork captures enum value "kNetwork" - HypervProtectionSourceTypeKNetwork string = "kNetwork" - - // HypervProtectionSourceTypeKDatastore captures enum value "kDatastore" - HypervProtectionSourceTypeKDatastore string = "kDatastore" - - // HypervProtectionSourceTypeKTag captures enum value "kTag" - HypervProtectionSourceTypeKTag string = "kTag" - - // HypervProtectionSourceTypeKCustomProperty captures enum value "kCustomProperty" - HypervProtectionSourceTypeKCustomProperty string = "kCustomProperty" -) - -// prop value enum -func (m *HypervProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *HypervProtectionSource) validateVMInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VMInfo) { // not required - return nil - } - - if m.VMInfo != nil { - if err := m.VMInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyperv protection source based on the context it is used -func (m *HypervProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HypervProtectionSource) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Agents); i++ { - - if m.Agents[i] != nil { - - if swag.IsZero(m.Agents[i]) { // not required - return nil - } - - if err := m.Agents[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HypervProtectionSource) contextValidateDatastoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreInfo != nil { - - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if err := m.DatastoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *HypervProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributes); i++ { - - if m.TagAttributes[i] != nil { - - if swag.IsZero(m.TagAttributes[i]) { // not required - return nil - } - - if err := m.TagAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HypervProtectionSource) contextValidateVMInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VMInfo != nil { - - if swag.IsZero(m.VMInfo) { // not required - return nil - } - - if err := m.VMInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HypervProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervProtectionSource) UnmarshalBinary(b []byte) error { - var res HypervProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_restore_parameters.go b/v1/models/hyperv_restore_parameters.go deleted file mode 100644 index b35c6cdc..00000000 --- a/v1/models/hyperv_restore_parameters.go +++ /dev/null @@ -1,106 +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" -) - -// HypervRestoreParameters Hyperv Restore Parameters. -// -// Specifies information needed when restoring VMs in HyperV enviroment. -// This field defines the HyperV specific params for restore tasks of type -// kRecoverVMs. -// -// swagger:model HypervRestoreParameters -type HypervRestoreParameters struct { - - // A datastore entity where the object's files should be restored to. This - // field is optional if object is being restored to its original parent - // source. If not specified, the object's files will be restored to their - // original datastore locations. This field is mandatory if object is being - // restored to a different resource entity or to a different parent source. - DatastoreID *int64 `json:"datastoreId,omitempty"` - - // Specifies whether the network should be left in disabled state. - // Attached network is enabled by default. Set this flag to true to - // disable it. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies a network configuration to be attached to the cloned or - // recovered object. - // For kCloneVMs and kRecoverVMs tasks, original network configuration - // is detached if the cloned or recovered object is kept under a different - // parent Protection Source or a different Resource Pool. - // By default, for kRecoverVMs task, original network configuration is - // preserved if the recovered object is kept under the same parent - // Protection Source and the same Resource Pool. - // Specify this field to override the preserved network configuration or - // to attach a new network configuration to the cloned or recovered objects. - // You can get the networkId of the kNetwork object by setting - // includeNetworks to 'true' in the GET /public/protectionSources operation. - // In the response, get the id of the desired kNetwork object, the resource - // pool, and the registered parent Protection Source. - NetworkID *int64 `json:"networkId,omitempty"` - - // Specifies the power state of the cloned or recovered objects. - // By default, the cloned or recovered objects are powered off. - PoweredOn *bool `json:"poweredOn,omitempty"` - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // Specifies whether or not to preserve tags during the operation. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // The resource (HyperV host) to which the restored VM will be attached. - // - // This field is optional for a kRecoverVMs task if the VMs are being - // restored to its original parent source. If not specified, restored VMs - // will be attached to its original host. This field is mandatory if the - // VMs are being restored to a different parent source. - ResourceID *int64 `json:"resourceId,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this hyperv restore parameters -func (m *HypervRestoreParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hyperv restore parameters based on context it is used -func (m *HypervRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HypervRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervRestoreParameters) UnmarshalBinary(b []byte) error { - var res HypervRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/hyperv_virtual_machine.go b/v1/models/hyperv_virtual_machine.go deleted file mode 100644 index 81eefdfe..00000000 --- a/v1/models/hyperv_virtual_machine.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HypervVirtualMachine HyperV VirtualMachine Object. -// -// Specifies information about a VirtualMachine Object in HyperV environment. -// -// swagger:model HypervVirtualMachine -type HypervVirtualMachine struct { - - // Specifies whether the VM is Highly Available or not. - IsHighlyAvailable *bool `json:"isHighlyAvailable,omitempty"` - - // Specifies the version of the VM. For example, 8.0, 5.0 etc. - Version *string `json:"version,omitempty"` - - // Specifies an array of virtual disks that are part of the Virtual Machine. - // This is populated for entities of type 'kVirtualMachine'. - VirtualDisks []*VirtualDiskBasicInfo `json:"virtualDisks"` - - // Specifies the status of the VM for backup purpose. - // overrideDescription: true - // Specifies the backup status of a HyperV Virtual Machine object. - // 'kSupported' indicates the agent on the VM can do backup. - // 'kUnsupportedConfig' indicates the agent on the VM cannot do backup. - // 'kMissing' indicates the VM is not found in SCVMM. - // Enum: ["kSupported","kUnsupportedConfig","kMissing"] - VMBackupStatus *string `json:"vmBackupStatus,omitempty"` - - // Specifies the type of backup supported by the VM. - // overrideDescription: true - // Specifies the type of an HyperV datastore object. - // 'kRctBackup' indicates backup is done using RCT/checkpoints. - // 'kVssBackup' indicates backup is done using VSS. - // Enum: ["kRctBackup","kVssBackup"] - VMBackupType *string `json:"vmBackupType,omitempty"` -} - -// Validate validates this hyperv virtual machine -func (m *HypervVirtualMachine) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVirtualDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMBackupType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HypervVirtualMachine) validateVirtualDisks(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDisks) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDisks); i++ { - if swag.IsZero(m.VirtualDisks[i]) { // not required - continue - } - - if m.VirtualDisks[i] != nil { - if err := m.VirtualDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var hypervVirtualMachineTypeVMBackupStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSupported","kUnsupportedConfig","kMissing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervVirtualMachineTypeVMBackupStatusPropEnum = append(hypervVirtualMachineTypeVMBackupStatusPropEnum, v) - } -} - -const ( - - // HypervVirtualMachineVMBackupStatusKSupported captures enum value "kSupported" - HypervVirtualMachineVMBackupStatusKSupported string = "kSupported" - - // HypervVirtualMachineVMBackupStatusKUnsupportedConfig captures enum value "kUnsupportedConfig" - HypervVirtualMachineVMBackupStatusKUnsupportedConfig string = "kUnsupportedConfig" - - // HypervVirtualMachineVMBackupStatusKMissing captures enum value "kMissing" - HypervVirtualMachineVMBackupStatusKMissing string = "kMissing" -) - -// prop value enum -func (m *HypervVirtualMachine) validateVMBackupStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervVirtualMachineTypeVMBackupStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervVirtualMachine) validateVMBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.VMBackupStatus) { // not required - return nil - } - - // value enum - if err := m.validateVMBackupStatusEnum("vmBackupStatus", "body", *m.VMBackupStatus); err != nil { - return err - } - - return nil -} - -var hypervVirtualMachineTypeVMBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRctBackup","kVssBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervVirtualMachineTypeVMBackupTypePropEnum = append(hypervVirtualMachineTypeVMBackupTypePropEnum, v) - } -} - -const ( - - // HypervVirtualMachineVMBackupTypeKRctBackup captures enum value "kRctBackup" - HypervVirtualMachineVMBackupTypeKRctBackup string = "kRctBackup" - - // HypervVirtualMachineVMBackupTypeKVssBackup captures enum value "kVssBackup" - HypervVirtualMachineVMBackupTypeKVssBackup string = "kVssBackup" -) - -// prop value enum -func (m *HypervVirtualMachine) validateVMBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervVirtualMachineTypeVMBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervVirtualMachine) validateVMBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.VMBackupType) { // not required - return nil - } - - // value enum - if err := m.validateVMBackupTypeEnum("vmBackupType", "body", *m.VMBackupType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hyperv virtual machine based on the context it is used -func (m *HypervVirtualMachine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVirtualDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HypervVirtualMachine) contextValidateVirtualDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDisks); i++ { - - if m.VirtualDisks[i] != nil { - - if swag.IsZero(m.VirtualDisks[i]) { // not required - return nil - } - - if err := m.VirtualDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HypervVirtualMachine) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervVirtualMachine) UnmarshalBinary(b []byte) error { - var res HypervVirtualMachine - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/i_o_filter_state.go b/v1/models/i_o_filter_state.go deleted file mode 100644 index 00463287..00000000 --- a/v1/models/i_o_filter_state.go +++ /dev/null @@ -1,167 +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" -) - -// IOFilterState This represents the IOFilter state on cluster compute resource on VMWare. -// -// swagger:model IOFilterState -type IOFilterState struct { - - // filter status - FilterStatus *IOFilterStateFilterStatus `json:"filterStatus,omitempty"` - - // Properties to be displayed on UI for manually creating storage policy. - IoFilterProperties *IoFilterStoragePolicyProperties `json:"ioFilterProperties,omitempty"` - - // Set to kUpgradable when the IOFilter running on the cluster compute - // resource can be upgraded. - Upgradability *int32 `json:"upgradability,omitempty"` - - // Current filter version installed. - Version *string `json:"version,omitempty"` -} - -// Validate validates this i o filter state -func (m *IOFilterState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIoFilterProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IOFilterState) validateFilterStatus(formats strfmt.Registry) error { - if swag.IsZero(m.FilterStatus) { // not required - return nil - } - - if m.FilterStatus != nil { - if err := m.FilterStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterStatus") - } - return err - } - } - - return nil -} - -func (m *IOFilterState) validateIoFilterProperties(formats strfmt.Registry) error { - if swag.IsZero(m.IoFilterProperties) { // not required - return nil - } - - if m.IoFilterProperties != nil { - if err := m.IoFilterProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ioFilterProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ioFilterProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this i o filter state based on the context it is used -func (m *IOFilterState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIoFilterProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IOFilterState) contextValidateFilterStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterStatus != nil { - - if swag.IsZero(m.FilterStatus) { // not required - return nil - } - - if err := m.FilterStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterStatus") - } - return err - } - } - - return nil -} - -func (m *IOFilterState) contextValidateIoFilterProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.IoFilterProperties != nil { - - if swag.IsZero(m.IoFilterProperties) { // not required - return nil - } - - if err := m.IoFilterProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ioFilterProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ioFilterProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IOFilterState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IOFilterState) UnmarshalBinary(b []byte) error { - var res IOFilterState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/i_o_filter_state_filter_status.go b/v1/models/i_o_filter_state_filter_status.go deleted file mode 100644 index 758915e1..00000000 --- a/v1/models/i_o_filter_state_filter_status.go +++ /dev/null @@ -1,112 +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" -) - -// IOFilterStateFilterStatus Status of IOFilter. -// -// swagger:model IOFilterState_FilterStatus -type IOFilterStateFilterStatus struct { - - // This is populated when upgrade or uninstall finished with error. - Error *PrivateErrorProto `json:"error,omitempty"` - - // state - State *int32 `json:"state,omitempty"` -} - -// Validate validates this i o filter state filter status -func (m *IOFilterStateFilterStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IOFilterStateFilterStatus) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this i o filter state filter status based on the context it is used -func (m *IOFilterStateFilterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IOFilterStateFilterStatus) 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 -} - -// MarshalBinary interface implementation -func (m *IOFilterStateFilterStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IOFilterStateFilterStatus) UnmarshalBinary(b []byte) error { - var res IOFilterStateFilterStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ibm_flash_system_protection_source.go b/v1/models/ibm_flash_system_protection_source.go deleted file mode 100644 index 8077eeb3..00000000 --- a/v1/models/ibm_flash_system_protection_source.go +++ /dev/null @@ -1,224 +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" -) - -// IbmFlashSystemProtectionSource IbmFlashSystem Protection Source. -// -// Specifies a Protection Source in a Ibm Flash System environment. -// -// swagger:model IbmFlashSystemProtectionSource -type IbmFlashSystemProtectionSource struct { - - // Specifies a unique name of the Protection Source - Name *string `json:"name,omitempty"` - - // Specifies a SAN Storage Array information. This is set only when - // the type is kStorageArray. - StorageArray *SanStorageArray `json:"storageArray,omitempty"` - - // Specifies the type of managed Object in a SAN/Ibm Flash System Protection - // Source like a kStorageArray or kVolume. - // Examples of SAN Objects include 'kStorageArray' and 'kVolume'. - // 'kStorageArray' indicates that entire SAN storage array is being - // protected. - // 'kVolume' indicates that volume within the array is being protected. - // Enum: ["kStorageArray","kVolume"] - Type *string `json:"type,omitempty"` - - // Specifies a SAN Volume information within a storage array. - // This is set only when the type is kVolume. - Volume *SanVolume `json:"volume,omitempty"` -} - -// Validate validates this ibm flash system protection source -func (m *IbmFlashSystemProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageArray(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IbmFlashSystemProtectionSource) validateStorageArray(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if m.StorageArray != nil { - if err := m.StorageArray.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -var ibmFlashSystemProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ibmFlashSystemProtectionSourceTypeTypePropEnum = append(ibmFlashSystemProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // IbmFlashSystemProtectionSourceTypeKStorageArray captures enum value "kStorageArray" - IbmFlashSystemProtectionSourceTypeKStorageArray string = "kStorageArray" - - // IbmFlashSystemProtectionSourceTypeKVolume captures enum value "kVolume" - IbmFlashSystemProtectionSourceTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *IbmFlashSystemProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ibmFlashSystemProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IbmFlashSystemProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *IbmFlashSystemProtectionSource) validateVolume(formats strfmt.Registry) error { - if swag.IsZero(m.Volume) { // not required - return nil - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ibm flash system protection source based on the context it is used -func (m *IbmFlashSystemProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageArray(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IbmFlashSystemProtectionSource) contextValidateStorageArray(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArray != nil { - - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if err := m.StorageArray.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -func (m *IbmFlashSystemProtectionSource) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if swag.IsZero(m.Volume) { // not required - return nil - } - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IbmFlashSystemProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IbmFlashSystemProtectionSource) UnmarshalBinary(b []byte) error { - var res IbmFlashSystemProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/icap_connection_status_response.go b/v1/models/icap_connection_status_response.go deleted file mode 100644 index d41d4219..00000000 --- a/v1/models/icap_connection_status_response.go +++ /dev/null @@ -1,55 +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" -) - -// IcapConnectionStatusResponse ICAP Connection Status Response. -// -// Specifies Icap server connection status response. -// -// swagger:model IcapConnectionStatusResponse -type IcapConnectionStatusResponse struct { - - // Specifies the failed connection status of Icap servers. - FailedConnectionStatus []string `json:"failedConnectionStatus"` - - // Specifies the success connection status of Icap servers. - SucceededConnectionStatus []string `json:"succeededConnectionStatus"` -} - -// Validate validates this icap connection status response -func (m *IcapConnectionStatusResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this icap connection status response based on context it is used -func (m *IcapConnectionStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IcapConnectionStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IcapConnectionStatusResponse) UnmarshalBinary(b []byte) error { - var res IcapConnectionStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/id_mapping_info.go b/v1/models/id_mapping_info.go deleted file mode 100644 index ac5bbaf0..00000000 --- a/v1/models/id_mapping_info.go +++ /dev/null @@ -1,170 +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" -) - -// IDMappingInfo Update ID Mapping Information Request. -// -// Specifies the params required to update the user id mapping info of an -// Active Directory. -// -// swagger:model IdMappingInfo -type IDMappingInfo struct { - - // Specifies the fallback id mapping info which is used when an ID mapping - // for a user is not found via the above IdMappingInfo. Only supported for - // two types of fallback mapping types - 'kRid' and 'kFixed'. - FallbackUserIDMappingInfo *UserIDMapping `json:"fallbackUserIdMappingInfo,omitempty"` - - // Specifies the SID of the Active Directory domain user to be mapped to - // Unix root user. - UnixRootSid *string `json:"unixRootSid,omitempty"` - - // Specifies the information about how the Unix and Windows users are mapped - // for this domain. - UserIDMappingInfo *UserIDMapping `json:"userIdMappingInfo,omitempty"` -} - -// Validate validates this Id mapping info -func (m *IDMappingInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserIDMappingInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IDMappingInfo) validateFallbackUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if m.FallbackUserIDMappingInfo != nil { - if err := m.FallbackUserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *IDMappingInfo) validateUserIDMappingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if m.UserIDMappingInfo != nil { - if err := m.UserIDMappingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this Id mapping info based on the context it is used -func (m *IDMappingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserIDMappingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IDMappingInfo) contextValidateFallbackUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackUserIDMappingInfo != nil { - - if swag.IsZero(m.FallbackUserIDMappingInfo) { // not required - return nil - } - - if err := m.FallbackUserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackUserIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackUserIdMappingInfo") - } - return err - } - } - - return nil -} - -func (m *IDMappingInfo) contextValidateUserIDMappingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserIDMappingInfo != nil { - - if swag.IsZero(m.UserIDMappingInfo) { // not required - return nil - } - - if err := m.UserIDMappingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IDMappingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IDMappingInfo) UnmarshalBinary(b []byte) error { - var res IDMappingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/identity.go b/v1/models/identity.go deleted file mode 100644 index 358bc779..00000000 --- a/v1/models/identity.go +++ /dev/null @@ -1,57 +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" -) - -// Identity The Identity resource represents an identity of an actor. For example, an -// actor can be a user, device, or application. -// -// swagger:model Identity -type Identity struct { - - // Unique identifier for the identity. - DisplayName *string `json:"displayName,omitempty"` - - // Unique email for the user. - Email *string `json:"email,omitempty"` - - // The identity's display name. - ID *string `json:"id,omitempty"` -} - -// Validate validates this identity -func (m *Identity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this identity based on context it is used -func (m *Identity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Identity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Identity) UnmarshalBinary(b []byte) error { - var res Identity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/identity_set.go b/v1/models/identity_set.go deleted file mode 100644 index d566c6f8..00000000 --- a/v1/models/identity_set.go +++ /dev/null @@ -1,366 +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" -) - -// IdentitySet Keyed collection of identity resources. It is used to represent a set of -// identities associated with various events for an item, such as created by or -// last modified by. -// -// swagger:model IdentitySet -type IdentitySet struct { - - // The application associated with this action. - Application *Identity `json:"application,omitempty"` - - // The team or channel associated with this action. - Conversation *Identity `json:"conversation,omitempty"` - - // Indicates whether the conversation property identifies a team or channel. - ConversationIdentityType *Identity `json:"conversationIdentityType,omitempty"` - - // The device associated with this action. - Device *Identity `json:"device,omitempty"` - - // The group associated with this drive. - Owner *Identity `json:"owner,omitempty"` - - // The user associated with this action. - User *Identity `json:"user,omitempty"` -} - -// Validate validates this identity set -func (m *IdentitySet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplication(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConversation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConversationIdentityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDevice(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwner(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentitySet) validateApplication(formats strfmt.Registry) error { - if swag.IsZero(m.Application) { // not required - return nil - } - - if m.Application != nil { - if err := m.Application.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("application") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("application") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) validateConversation(formats strfmt.Registry) error { - if swag.IsZero(m.Conversation) { // not required - return nil - } - - if m.Conversation != nil { - if err := m.Conversation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conversation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conversation") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) validateConversationIdentityType(formats strfmt.Registry) error { - if swag.IsZero(m.ConversationIdentityType) { // not required - return nil - } - - if m.ConversationIdentityType != nil { - if err := m.ConversationIdentityType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conversationIdentityType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conversationIdentityType") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) validateDevice(formats strfmt.Registry) error { - if swag.IsZero(m.Device) { // not required - return nil - } - - if m.Device != nil { - if err := m.Device.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("device") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) validateOwner(formats strfmt.Registry) error { - if swag.IsZero(m.Owner) { // not required - return nil - } - - if m.Owner != nil { - if err := m.Owner.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("owner") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("owner") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) validateUser(formats strfmt.Registry) error { - if swag.IsZero(m.User) { // not required - return nil - } - - if m.User != nil { - if err := m.User.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("user") - } - return err - } - } - - return nil -} - -// ContextValidate validate this identity set based on the context it is used -func (m *IdentitySet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplication(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConversation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConversationIdentityType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDevice(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwner(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentitySet) contextValidateApplication(ctx context.Context, formats strfmt.Registry) error { - - if m.Application != nil { - - if swag.IsZero(m.Application) { // not required - return nil - } - - if err := m.Application.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("application") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("application") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) contextValidateConversation(ctx context.Context, formats strfmt.Registry) error { - - if m.Conversation != nil { - - if swag.IsZero(m.Conversation) { // not required - return nil - } - - if err := m.Conversation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conversation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conversation") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) contextValidateConversationIdentityType(ctx context.Context, formats strfmt.Registry) error { - - if m.ConversationIdentityType != nil { - - if swag.IsZero(m.ConversationIdentityType) { // not required - return nil - } - - if err := m.ConversationIdentityType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conversationIdentityType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conversationIdentityType") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { - - if m.Device != nil { - - if swag.IsZero(m.Device) { // not required - return nil - } - - if err := m.Device.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("device") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) contextValidateOwner(ctx context.Context, formats strfmt.Registry) error { - - if m.Owner != nil { - - if swag.IsZero(m.Owner) { // not required - return nil - } - - if err := m.Owner.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("owner") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("owner") - } - return err - } - } - - return nil -} - -func (m *IdentitySet) contextValidateUser(ctx context.Context, formats strfmt.Registry) error { - - if m.User != nil { - - if swag.IsZero(m.User) { // not required - return nil - } - - if err := m.User.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("user") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IdentitySet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentitySet) UnmarshalBinary(b []byte) error { - var res IdentitySet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/idp_principals_add_parameters.go b/v1/models/idp_principals_add_parameters.go deleted file mode 100644 index 9dac34af..00000000 --- a/v1/models/idp_principals_add_parameters.go +++ /dev/null @@ -1,153 +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" -) - -// IdpPrincipalsAddParameters Add Groups or Users Request. -// -// Specifies the settings for adding new users and groups -// for Idp principals. -// These users and groups are added to the Cohesity Cluster. -// You cannot create users and groups in the default Cohesity domain -// called 'LOCAL' using this operation. -// -// swagger:model IdpPrincipalsAddParameters -type IdpPrincipalsAddParameters struct { - - // Specifies the name of the Idp where the - // referenced principal is stored. - Domain *string `json:"domain,omitempty"` - - // Specifies the type of the referenced Idp principal. - // If 'kGroup', the referenced Idp principal is a group. - // If 'kUser', the referenced Idp principal is a user. - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the Idp principal, - // that will be referenced by the group or user. - // The name of the Idp principal is used for naming - // the new group or user on the Cohesity Cluster. - PrincipalName *string `json:"principalName,omitempty"` - - // Whether the principal is a restricted principal. A restricted principal - // can only view the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with this user or group - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this group or user. - // For example if the 'joe' user is added for the Active Directory - // 'joe' user principal and is associated with the Cohesity - // 'View' role, 'joe' can log in to the Cohesity Dashboard - // and has a read-only view of the data on the Cohesity Cluster. - Roles []string `json:"roles"` -} - -// Validate validates this idp principals add parameters -func (m *IdpPrincipalsAddParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var idpPrincipalsAddParametersTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - idpPrincipalsAddParametersTypeObjectClassPropEnum = append(idpPrincipalsAddParametersTypeObjectClassPropEnum, v) - } -} - -const ( - - // IdpPrincipalsAddParametersObjectClassKUser captures enum value "kUser" - IdpPrincipalsAddParametersObjectClassKUser string = "kUser" - - // IdpPrincipalsAddParametersObjectClassKGroup captures enum value "kGroup" - IdpPrincipalsAddParametersObjectClassKGroup string = "kGroup" - - // IdpPrincipalsAddParametersObjectClassKComputer captures enum value "kComputer" - IdpPrincipalsAddParametersObjectClassKComputer string = "kComputer" - - // IdpPrincipalsAddParametersObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - IdpPrincipalsAddParametersObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // IdpPrincipalsAddParametersObjectClassKServiceAccount captures enum value "kServiceAccount" - IdpPrincipalsAddParametersObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *IdpPrincipalsAddParameters) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, idpPrincipalsAddParametersTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IdpPrincipalsAddParameters) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this idp principals add parameters based on context it is used -func (m *IdpPrincipalsAddParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IdpPrincipalsAddParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdpPrincipalsAddParameters) UnmarshalBinary(b []byte) error { - var res IdpPrincipalsAddParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/idp_service_configuration.go b/v1/models/idp_service_configuration.go deleted file mode 100644 index b1d98b10..00000000 --- a/v1/models/idp_service_configuration.go +++ /dev/null @@ -1,111 +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" -) - -// IdpServiceConfiguration IdP Service Configuration. -// -// Specifies the configuration of an IdP service. -// -// swagger:model IdpServiceConfiguration -type IdpServiceConfiguration struct { - - // Specifies whether to allow local authentication. When IdP is configured, - // only IdP users are allowed to login to the Cluster. Local login is - // disabled except for users with admin role. If this flag is set to true, - // local (non-IdP) logins are allowed for all local and AD users. Local or - // AD users with admin role can login always independent of this flag's - // setting. - AllowLocalAuthentication *bool `json:"allowLocalAuthentication,omitempty"` - - // Specifies the certificate generated for the app by the IdP service when - // the Cluster is registered as an app. This is required to verify the - // SAML response. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the filename used to upload the certificate. - CertificateFilename *string `json:"certificateFilename,omitempty"` - - // Specifies a unique name for this IdP configuration. - Domain *string `json:"domain,omitempty"` - - // Specifies a flag to enable or disable this IdP service. When it is set - // to true, IdP service is enabled. When it is set to false, IdP service - // is disabled. When an IdP service is created, it is set to true. - Enable *bool `json:"enable,omitempty"` - - // Specifies the Id assigned by the Cluster for the IdP service. - ID *int64 `json:"id,omitempty"` - - // Specifies the IdP provided Issuer ID for the app. - // For example, exkh1aov1nhHrgFhN0h7. - IssuerID *string `json:"issuerId,omitempty"` - - // Specifies the name of the vendor providing IdP service. - Name *string `json:"name,omitempty"` - - // Specifies a list of roles assigned to an IdP user if samlAttributeName is - // not given. - Roles []string `json:"roles"` - - // Specifies the SAML attribute name that contains a comma separated list - // of Cluster roles. Either this field or roles must be set. This field - // takes higher precedence than the roles field. - SamlAttributeName *string `json:"samlAttributeName,omitempty"` - - // Specifies whether to sign the SAML request or not. When it is set - // to true, SAML request will be signed. When it is set to false, SAML - // request is not signed. Default is false. Set this flag to true if - // the IdP site is configured to expect the SAML request from the Cluster - // signed. If this is set to true, users must get the Cluster's certificate - // and upload it on the IdP site. - SignRequest *bool `json:"signRequest,omitempty"` - - // Specifies the SSO URL of the IdP service for the customer. This is the - // URL given by IdP when the customer created an account. Customers may use - // this for several clusters that are registered with on IdP site. - // For example, dev-332534.oktapreview.com - SsoURL *string `json:"ssoUrl,omitempty"` - - // Specifies the Tenant Id if the IdP is configured for a Tenant. If this is - // not set, this IdP configuration is used for the Cluster level users and - // for all users of Tenants not having an IdP configuration. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this idp service configuration -func (m *IdpServiceConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this idp service configuration based on context it is used -func (m *IdpServiceConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IdpServiceConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdpServiceConfiguration) UnmarshalBinary(b []byte) error { - var res IdpServiceConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/idp_user_info.go b/v1/models/idp_user_info.go deleted file mode 100644 index c6d3a159..00000000 --- a/v1/models/idp_user_info.go +++ /dev/null @@ -1,74 +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" -) - -// IdpUserInfo IdP User Information. -// -// Specifies an IdP User's information logged in using an IdP. -// This information is not stored on the Cluster. -// -// swagger:model IdpUserInfo -type IdpUserInfo struct { - - // Specifies the SIDs of the groups. - GroupSids []string `json:"groupSids"` - - // Specifies the Idp groups that the user is part of. As the user may not be - // registered on the cluster, we may have to capture the idp group - // membership. This way, if a group is created on the cluster later, - // users will instantly have access to tenantIds from that group as well. - Groups []string `json:"groups"` - - // Specifies the unique Id assigned by the Cluster for the IdP. - IdpID *int64 `json:"idpId,omitempty"` - - // Specifies whether or not this is a floating user. - IsFloatingUser *bool `json:"isFloatingUser,omitempty"` - - // Specifies the unique identifier assigned by the vendor for this Cluster. - IssuerID *string `json:"issuerId,omitempty"` - - // Specifies the unique identifier assigned by the vendor for the user. - UserID *string `json:"userId,omitempty"` - - // Specifies the vendor providing the IdP service. - Vendor *string `json:"vendor,omitempty"` -} - -// Validate validates this idp user info -func (m *IdpUserInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this idp user info based on context it is used -func (m *IdpUserInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IdpUserInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdpUserInfo) UnmarshalBinary(b []byte) error { - var res IdpUserInfo - 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 deleted file mode 100644 index db6b6d19..00000000 --- a/v1/models/index_and_snapshots.go +++ /dev/null @@ -1,177 +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" -) - -// IndexAndSnapshots Restore Protection Job Index and Snapshots. -// -// Specifies settings required to restore the index and Snapshots of -// a Protection Job. -// -// swagger:model IndexAndSnapshots -type IndexAndSnapshots struct { - - // archive task Uid - ArchiveTaskUID *IndexAndSnapshotsArchiveTaskUID `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"` - - // Specifies the start time as a Unix epoch Timestamp (in microseconds). - // If set, only the index and Snapshots for Protection Job Runs that - // started after the specified start time are restored. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the id of the local Storage Domain (View Box) where the index - // and the Snapshot will be restored to. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this index and snapshots -func (m *IndexAndSnapshots) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteProtectionJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IndexAndSnapshots) validateArchiveTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUID) { // not required - 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 -} - -func (m *IndexAndSnapshots) validateRemoteProtectionJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteProtectionJobUID) { // not required - 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 -} - -// ContextValidate validate this index and snapshots based on the context it is used -func (m *IndexAndSnapshots) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchiveTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteProtectionJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *IndexAndSnapshots) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexAndSnapshots) UnmarshalBinary(b []byte) error { - var res IndexAndSnapshots - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/indexing_policy.go b/v1/models/indexing_policy.go deleted file mode 100644 index 61cb7020..00000000 --- a/v1/models/indexing_policy.go +++ /dev/null @@ -1,66 +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" -) - -// IndexingPolicy Indexing Policy. -// -// Specifies settings for indexing files found in an Object -// (such as a VM) so these files can be searched and recovered. -// This also specifies inclusion and exclusion rules that determine -// the directories to index. -// -// swagger:model IndexingPolicy -type IndexingPolicy struct { - - // Array of Indexed Directories. - // - // Specifies a list of directories to index. - AllowPrefixes []string `json:"allowPrefixes"` - - // Array of Excluded Directories. - // - // Specifies a list of directories to exclude from indexing. - DenyPrefixes []string `json:"denyPrefixes"` - - // Specifies if the files found in an Object (such as a VM) should be - // indexed. If false (the default), files are indexed. - DisableIndexing *bool `json:"disableIndexing,omitempty"` -} - -// Validate validates this indexing policy -func (m *IndexingPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this indexing policy based on context it is used -func (m *IndexingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexingPolicy) UnmarshalBinary(b []byte) error { - var res IndexingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/indexing_policy_proto.go b/v1/models/indexing_policy_proto.go deleted file mode 100644 index d2a1ebca..00000000 --- a/v1/models/indexing_policy_proto.go +++ /dev/null @@ -1,58 +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" -) - -// IndexingPolicyProto Indexing Policy Proto. -// -// Proto to encapsulate file level indexing policy for VMs in a backup job. -// -// swagger:model IndexingPolicyProto -type IndexingPolicyProto struct { - - // List of directory prefixes to allow for indexing. - AllowPrefixes []string `json:"allowPrefixes"` - - // List of directory prefixes to filter out. - DenyPrefixes []string `json:"denyPrefixes"` - - // If this field is set all the files in the VM will be filtered. - DisableIndexing *bool `json:"disableIndexing,omitempty"` -} - -// Validate validates this indexing policy proto -func (m *IndexingPolicyProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this indexing policy proto based on context it is used -func (m *IndexingPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexingPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexingPolicyProto) UnmarshalBinary(b []byte) error { - var res IndexingPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/infected_file.go b/v1/models/infected_file.go deleted file mode 100644 index aef16307..00000000 --- a/v1/models/infected_file.go +++ /dev/null @@ -1,153 +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" -) - -// InfectedFile Infected file. -// -// Specifies the Result parameters for all infected files. -// -// swagger:model InfectedFile -type InfectedFile struct { - - // Specifies the name of antivirus service provider. - AntivirusProviderName *string `json:"antivirusProviderName,omitempty"` - - // Specifies the entity id of the infected file. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies file path of the infected file. - FilePath *string `json:"filePath,omitempty"` - - // Specifies unix epoch timestamp (in microseconds) at which these threats - // were detected. - InfectionDetectionTimestamp *int64 `json:"infectionDetectionTimestamp,omitempty"` - - // Specifies unix epoch timestamp (in microseconds) at which this file is - // modified. - ModifiedTimestampUsecs *int64 `json:"modifiedTimestampUsecs,omitempty"` - - // Specifies the remediation state of the file. - // Remediation State. - // 'kQuarantine' indicates 'Quarantine' state of the file. This state blocks - // the client access. The administrator will have to manually delete, rescan or - // unquarantine the file. - // 'kUnquarantine' indicates 'Unquarantine' state of the file. - // The administrator has manually moved files from quarantined to the - // unquarantined state to allow client access. Unquarantined files are - // not scanned for virus until manually reset. - // Enum: ["kQuarantine","kUnquarantine"] - RemediationState *string `json:"remediationState,omitempty"` - - // Specifies the root inode id of the file system that infected file belongs - // to. - RootInodeID *int64 `json:"rootInodeId,omitempty"` - - // Specifies unix epoch timestamp (in microseconds) at which inode was - // scanned for viruses. - ScanTimestampUsecs *int64 `json:"scanTimestampUsecs,omitempty"` - - // Specifies the instance of an antivirus ICAP server in the cluster config - // that detected these threats. - ServiceIcapURI *string `json:"serviceIcapUri,omitempty"` - - // Specifies the list of virus threat descriptions found in the file. - ThreatDescriptions []string `json:"threatDescriptions"` - - // Specifies the id of the View the infected file belongs to. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the View name corresponding to above view id. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this infected file -func (m *InfectedFile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemediationState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var infectedFileTypeRemediationStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kQuarantine","kUnquarantine"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - infectedFileTypeRemediationStatePropEnum = append(infectedFileTypeRemediationStatePropEnum, v) - } -} - -const ( - - // InfectedFileRemediationStateKQuarantine captures enum value "kQuarantine" - InfectedFileRemediationStateKQuarantine string = "kQuarantine" - - // InfectedFileRemediationStateKUnquarantine captures enum value "kUnquarantine" - InfectedFileRemediationStateKUnquarantine string = "kUnquarantine" -) - -// prop value enum -func (m *InfectedFile) validateRemediationStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, infectedFileTypeRemediationStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InfectedFile) validateRemediationState(formats strfmt.Registry) error { - if swag.IsZero(m.RemediationState) { // not required - return nil - } - - // value enum - if err := m.validateRemediationStateEnum("remediationState", "body", *m.RemediationState); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this infected file based on context it is used -func (m *InfectedFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFile) UnmarshalBinary(b []byte) error { - var res InfectedFile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/infected_file_id.go b/v1/models/infected_file_id.go deleted file mode 100644 index 3457899a..00000000 --- a/v1/models/infected_file_id.go +++ /dev/null @@ -1,58 +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" -) - -// InfectedFileID Specifies the infected file Identifier. A file is identified with three Ids -// mentioned in the InfectedFileId definition. -// -// swagger:model InfectedFileId -type InfectedFileID struct { - - // Specifies the entity id of the infected file. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the root inode id of the file system that infected file belongs - // to. - RootInodeID *int64 `json:"rootInodeId,omitempty"` - - // Specifies the id of the View the infected file belongs to. - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this infected file Id -func (m *InfectedFileID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this infected file Id based on context it is used -func (m *InfectedFileID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFileID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFileID) UnmarshalBinary(b []byte) error { - var res InfectedFileID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/infected_file_param.go b/v1/models/infected_file_param.go deleted file mode 100644 index 07759f72..00000000 --- a/v1/models/infected_file_param.go +++ /dev/null @@ -1,123 +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" -) - -// InfectedFileParam Specifies the parameters to delete a infected file. -// -// swagger:model InfectedFileParam -type InfectedFileParam struct { - - // Specifies the entity id of the infected file. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the remediation state of the file. - // Remediation State. - // 'kQuarantine' indicates 'Quarantine' state of the file. This state blocks - // the client access. The administrator will have to manually delete, rescan or - // unquarantine the file. - // 'kUnquarantine' indicates 'Unquarantine' state of the file. - // The administrator has manually moved files from quarantined to the - // unquarantined state to allow client access. Unquarantined files are - // not scanned for virus until manually reset. - // Enum: ["kQuarantine","kUnquarantine"] - RemediationState *string `json:"remediationState,omitempty"` - - // Specifies the root inode id of the file system that infected file belongs - // to. - RootInodeID *int64 `json:"rootInodeId,omitempty"` - - // Specifies the id of the View the infected file belongs to. - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this infected file param -func (m *InfectedFileParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemediationState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var infectedFileParamTypeRemediationStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kQuarantine","kUnquarantine"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - infectedFileParamTypeRemediationStatePropEnum = append(infectedFileParamTypeRemediationStatePropEnum, v) - } -} - -const ( - - // InfectedFileParamRemediationStateKQuarantine captures enum value "kQuarantine" - InfectedFileParamRemediationStateKQuarantine string = "kQuarantine" - - // InfectedFileParamRemediationStateKUnquarantine captures enum value "kUnquarantine" - InfectedFileParamRemediationStateKUnquarantine string = "kUnquarantine" -) - -// prop value enum -func (m *InfectedFileParam) validateRemediationStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, infectedFileParamTypeRemediationStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InfectedFileParam) validateRemediationState(formats strfmt.Registry) error { - if swag.IsZero(m.RemediationState) { // not required - return nil - } - - // value enum - if err := m.validateRemediationStateEnum("remediationState", "body", *m.RemediationState); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this infected file param based on context it is used -func (m *InfectedFileParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFileParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFileParam) UnmarshalBinary(b []byte) error { - var res InfectedFileParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/infected_files.go b/v1/models/infected_files.go deleted file mode 100644 index bc520906..00000000 --- a/v1/models/infected_files.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// InfectedFiles Infected files. -// -// Specifies the Result parameters for all infected files. -// -// swagger:model InfectedFiles -type InfectedFiles struct { - - // Specifies the infected files. - InfectedFiles []*InfectedFile `json:"infectedFiles"` - - // This cookie can be used in the succeeding call to list infected files to - // get the next set of infected files. If set to nil, it means that there's - // no more results that the server could provide. - PaginationCookie *string `json:"paginationCookie,omitempty"` -} - -// Validate validates this infected files -func (m *InfectedFiles) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InfectedFiles) validateInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.InfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.InfectedFiles); i++ { - if swag.IsZero(m.InfectedFiles[i]) { // not required - continue - } - - if m.InfectedFiles[i] != nil { - if err := m.InfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this infected files based on the context it is used -func (m *InfectedFiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InfectedFiles) contextValidateInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFiles); i++ { - - if m.InfectedFiles[i] != nil { - - if swag.IsZero(m.InfectedFiles[i]) { // not required - return nil - } - - if err := m.InfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFiles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFiles) UnmarshalBinary(b []byte) error { - var res InfectedFiles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/input_spec.go b/v1/models/input_spec.go deleted file mode 100644 index 24e8dc04..00000000 --- a/v1/models/input_spec.go +++ /dev/null @@ -1,164 +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" -) - -// InputSpec Input selector. Selects the files to map over. -// -// swagger:model InputSpec -type InputSpec struct { - - // files selector - FilesSelector *InputSpecInputFilesSelector `json:"filesSelector,omitempty"` - - // Selects whether input is files inside vmdks or files on NFS. One of - // vm_selector or files_selector will be chosen based on this flag. - OnNfsFiles *bool `json:"onNfsFiles,omitempty"` - - // vm selector - VMSelector *InputSpecInputVMsSelector `json:"vmSelector,omitempty"` -} - -// Validate validates this input spec -func (m *InputSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesSelector(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMSelector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpec) validateFilesSelector(formats strfmt.Registry) error { - if swag.IsZero(m.FilesSelector) { // not required - return nil - } - - if m.FilesSelector != nil { - if err := m.FilesSelector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesSelector") - } - return err - } - } - - return nil -} - -func (m *InputSpec) validateVMSelector(formats strfmt.Registry) error { - if swag.IsZero(m.VMSelector) { // not required - return nil - } - - if m.VMSelector != nil { - if err := m.VMSelector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmSelector") - } - return err - } - } - - return nil -} - -// ContextValidate validate this input spec based on the context it is used -func (m *InputSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpec) contextValidateFilesSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.FilesSelector != nil { - - if swag.IsZero(m.FilesSelector) { // not required - return nil - } - - if err := m.FilesSelector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesSelector") - } - return err - } - } - - return nil -} - -func (m *InputSpec) contextValidateVMSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.VMSelector != nil { - - if swag.IsZero(m.VMSelector) { // not required - return nil - } - - if err := m.VMSelector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmSelector") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InputSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InputSpec) UnmarshalBinary(b []byte) error { - var res InputSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/input_spec_file_time_filter.go b/v1/models/input_spec_file_time_filter.go deleted file mode 100644 index 0cd029e1..00000000 --- a/v1/models/input_spec_file_time_filter.go +++ /dev/null @@ -1,57 +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" -) - -// InputSpecFileTimeFilter File time filter to filter files based on their last change time. All -// files whose change time is in the range [change_time_range_start_secs, -// change_time_range_end_secs) will be processed. Both values are time -// duration in seconds w.r.t. to current time and not absolute points in -// time. -// -// swagger:model InputSpec_FileTimeFilter -type InputSpecFileTimeFilter struct { - - // End of file's change time range. - ChangeTimeRangeEndSecs *int64 `json:"changeTimeRangeEndSecs,omitempty"` - - // Start of file's change time range. - ChangeTimeRangeStartSecs *int64 `json:"changeTimeRangeStartSecs,omitempty"` -} - -// Validate validates this input spec file time filter -func (m *InputSpecFileTimeFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this input spec file time filter based on context it is used -func (m *InputSpecFileTimeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InputSpecFileTimeFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InputSpecFileTimeFilter) UnmarshalBinary(b []byte) error { - var res InputSpecFileTimeFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/input_spec_input_files_selector.go b/v1/models/input_spec_input_files_selector.go deleted file mode 100644 index 5aeaa547..00000000 --- a/v1/models/input_spec_input_files_selector.go +++ /dev/null @@ -1,142 +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" -) - -// InputSpecInputFilesSelector If mapper is going to run over files on SnapFS, this selects the input -// files. -// -// swagger:model InputSpec_InputFilesSelector -type InputSpecInputFilesSelector struct { - - // File time filter for file's last change time. - FileTimeFilter *InputSpecFileTimeFilter `json:"fileTimeFilter,omitempty"` - - // Glob patterns to match on file. e.g. {*.txt, *.cc} - FilenameGlob []string `json:"filenameGlob"` - - // job ids - JobIds []int64 `json:"jobIds"` - - // Exclusive end of snapshot_timestamp range. If missing, inf will be used - // as the timestamp range. - MaxSnapshotTimestamp *int64 `json:"maxSnapshotTimestamp,omitempty"` - - // Inclusive. If missing, 0 will the default lower end of timestamp range - MinSnapshotTimestamp *int64 `json:"minSnapshotTimestamp,omitempty"` - - // partition ids - PartitionIds []int64 `json:"partitionIds"` - - // Boolean flag to indicate if only latest snapshot of each object should - // be processed. - ProcessLatestOnly *bool `json:"processLatestOnly,omitempty"` - - // Within each volume, traversal will be rooted at this directory. A - // typical value here might be /home - RootDir *string `json:"rootDir,omitempty"` - - // view box ids - ViewBoxIds []int64 `json:"viewBoxIds"` - - // This is the view name user enters manually. If this is set we will - // process this view only. partition_id and view_box_id will be populated - // only if view_name is present. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this input spec input files selector -func (m *InputSpecInputFilesSelector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileTimeFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpecInputFilesSelector) validateFileTimeFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileTimeFilter) { // not required - return nil - } - - if m.FileTimeFilter != nil { - if err := m.FileTimeFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTimeFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTimeFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this input spec input files selector based on the context it is used -func (m *InputSpecInputFilesSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileTimeFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpecInputFilesSelector) contextValidateFileTimeFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileTimeFilter != nil { - - if swag.IsZero(m.FileTimeFilter) { // not required - return nil - } - - if err := m.FileTimeFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTimeFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTimeFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InputSpecInputFilesSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InputSpecInputFilesSelector) UnmarshalBinary(b []byte) error { - var res InputSpecInputFilesSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/input_spec_input_v_ms_selector.go b/v1/models/input_spec_input_v_ms_selector.go deleted file mode 100644 index 6eb84888..00000000 --- a/v1/models/input_spec_input_v_ms_selector.go +++ /dev/null @@ -1,143 +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" -) - -// InputSpecInputVMsSelector input spec input v ms selector -// -// swagger:model InputSpec_InputVMsSelector -type InputSpecInputVMsSelector struct { - - // Time filter for file's last change time. - FileTimeFilter *InputSpecFileTimeFilter `json:"fileTimeFilter,omitempty"` - - // After VMDKs are selected as above, the files within them can be selected - // by using these predicates. - FilenameGlob []string `json:"filenameGlob"` - - // job ids - JobIds []int64 `json:"jobIds"` - - // Exclusive end of snapshot_timestamp range. If missing, inf will be used - // as the timestamp range. - MaxSnapshotTimestamp *int64 `json:"maxSnapshotTimestamp,omitempty"` - - // Inclusive. If missing, 0 will the default lower end of timestamp range - MinSnapshotTimestamp *int64 `json:"minSnapshotTimestamp,omitempty"` - - // Filters are AND of ORs. - PartitionIds []int64 `json:"partitionIds"` - - // Boolean flag to indicate if only latest snapshot of each object should - // be processed. - ProcessLatestOnly *bool `json:"processLatestOnly,omitempty"` - - // Within each volume, traversal will be rooted at this directory. A - // typical value here might be /home - RootDir *string `json:"rootDir,omitempty"` - - // source entity ids - SourceEntityIds []int64 `json:"sourceEntityIds"` - - // view box ids - ViewBoxIds []int64 `json:"viewBoxIds"` - - // view names - ViewNames []string `json:"viewNames"` -} - -// Validate validates this input spec input v ms selector -func (m *InputSpecInputVMsSelector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileTimeFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpecInputVMsSelector) validateFileTimeFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileTimeFilter) { // not required - return nil - } - - if m.FileTimeFilter != nil { - if err := m.FileTimeFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTimeFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTimeFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this input spec input v ms selector based on the context it is used -func (m *InputSpecInputVMsSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileTimeFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InputSpecInputVMsSelector) contextValidateFileTimeFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileTimeFilter != nil { - - if swag.IsZero(m.FileTimeFilter) { // not required - return nil - } - - if err := m.FileTimeFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTimeFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTimeFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InputSpecInputVMsSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InputSpecInputVMsSelector) UnmarshalBinary(b []byte) error { - var res InputSpecInputVMsSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/interface.go b/v1/models/interface.go deleted file mode 100644 index e39dd5b4..00000000 --- a/v1/models/interface.go +++ /dev/null @@ -1,115 +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" -) - -// Interface interface -// -// swagger:model Interface -type Interface struct { - - // message - Message *string `json:"message,omitempty"` - - // name - Name *string `json:"name,omitempty"` - - // network params - NetworkParams *NetworkParams `json:"networkParams,omitempty"` -} - -// Validate validates this interface -func (m *Interface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Interface) validateNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if m.NetworkParams != nil { - if err := m.NetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface based on the context it is used -func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Interface) contextValidateNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkParams != nil { - - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if err := m.NetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Interface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Interface) UnmarshalBinary(b []byte) error { - var res Interface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/interface_group.go b/v1/models/interface_group.go deleted file mode 100644 index 816855c9..00000000 --- a/v1/models/interface_group.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// InterfaceGroup InterfaceGroup. -// -// Specifies the settings of an interface group. -// -// swagger:model InterfaceGroup -type InterfaceGroup struct { - - // Specifies node group type. - GroupType *int32 `json:"groupType,omitempty"` - - // Interface group Id. - // - // Specifies the id of the interface group. - ID *int32 `json:"id,omitempty"` - - // Specifies the product model and interface lists. - ModelInterfaceLists []*ProductModelInterfaceTuple `json:"modelInterfaceLists"` - - // Specifies the name of the interface group. - Name *string `json:"name,omitempty"` - - // network params - NetworkParams *NetworkParams `json:"networkParams,omitempty"` - - // Specifies the node IDs and interface lists. - NodeInterfacePairs []*NodeInterfacePair `json:"nodeInterfacePairs"` -} - -// Validate validates this interface group -func (m *InterfaceGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateModelInterfaceLists(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeInterfacePairs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroup) validateModelInterfaceLists(formats strfmt.Registry) error { - if swag.IsZero(m.ModelInterfaceLists) { // not required - return nil - } - - for i := 0; i < len(m.ModelInterfaceLists); i++ { - if swag.IsZero(m.ModelInterfaceLists[i]) { // not required - continue - } - - if m.ModelInterfaceLists[i] != nil { - if err := m.ModelInterfaceLists[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modelInterfaceLists" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modelInterfaceLists" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InterfaceGroup) validateNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if m.NetworkParams != nil { - if err := m.NetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -func (m *InterfaceGroup) validateNodeInterfacePairs(formats strfmt.Registry) error { - if swag.IsZero(m.NodeInterfacePairs) { // not required - return nil - } - - for i := 0; i < len(m.NodeInterfacePairs); i++ { - if swag.IsZero(m.NodeInterfacePairs[i]) { // not required - continue - } - - if m.NodeInterfacePairs[i] != nil { - if err := m.NodeInterfacePairs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeInterfacePairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeInterfacePairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this interface group based on the context it is used -func (m *InterfaceGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateModelInterfaceLists(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeInterfacePairs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroup) contextValidateModelInterfaceLists(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ModelInterfaceLists); i++ { - - if m.ModelInterfaceLists[i] != nil { - - if swag.IsZero(m.ModelInterfaceLists[i]) { // not required - return nil - } - - if err := m.ModelInterfaceLists[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modelInterfaceLists" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modelInterfaceLists" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InterfaceGroup) contextValidateNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkParams != nil { - - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if err := m.NetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -func (m *InterfaceGroup) contextValidateNodeInterfacePairs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeInterfacePairs); i++ { - - if m.NodeInterfacePairs[i] != nil { - - if swag.IsZero(m.NodeInterfacePairs[i]) { // not required - return nil - } - - if err := m.NodeInterfacePairs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeInterfacePairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeInterfacePairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceGroup) UnmarshalBinary(b []byte) error { - var res InterfaceGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/interface_stats.go b/v1/models/interface_stats.go deleted file mode 100644 index 65d07e04..00000000 --- a/v1/models/interface_stats.go +++ /dev/null @@ -1,71 +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" -) - -// InterfaceStats interface stats -// -// swagger:model InterfaceStats -type InterfaceStats struct { - - // rx bytes - RxBytes *int64 `json:"rxBytes,omitempty"` - - // rx dropped - RxDropped *int64 `json:"rxDropped,omitempty"` - - // rx errors - RxErrors *int64 `json:"rxErrors,omitempty"` - - // Receive counters. - RxPkts *int64 `json:"rxPkts,omitempty"` - - // tx bytes - TxBytes *int64 `json:"txBytes,omitempty"` - - // tx dropped - TxDropped *int64 `json:"txDropped,omitempty"` - - // tx errors - TxErrors *int64 `json:"txErrors,omitempty"` - - // Transmit counters. - TxPkts *int64 `json:"txPkts,omitempty"` -} - -// Validate validates this interface stats -func (m *InterfaceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this interface stats based on context it is used -func (m *InterfaceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceStats) UnmarshalBinary(b []byte) error { - var res InterfaceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/io_filter_storage_policy_properties.go b/v1/models/io_filter_storage_policy_properties.go deleted file mode 100644 index 260464ae..00000000 --- a/v1/models/io_filter_storage_policy_properties.go +++ /dev/null @@ -1,62 +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" -) - -// IoFilterStoragePolicyProperties This proto contains properties set while creating storage policy. -// -// swagger:model IoFilterStoragePolicyProperties -type IoFilterStoragePolicyProperties struct { - - // Cohesity cluster endpoint for the IO filter to communicate with Cohesity. - CohesityClusterEndpoint *string `json:"cohesityClusterEndpoint,omitempty"` - - // Cohesity ID necessary for the IO filter on the ESXi host. - CohesityID *string `json:"cohesityId,omitempty"` - - // Heartbeat IO interval for the storage policy. If not set while create or - // update, FLAGS_magneto_vmware_cdp_io_filter_default_heartbeat_interval_secs - // is used. - HeartbeatIntervalSecs *uint32 `json:"heartbeatIntervalSecs,omitempty"` - - // vCenter UUID where where filter is installed and storage policy has to be - // created. - VcenterUUID *string `json:"vcenterUuid,omitempty"` -} - -// Validate validates this io filter storage policy properties -func (m *IoFilterStoragePolicyProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this io filter storage policy properties based on context it is used -func (m *IoFilterStoragePolicyProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IoFilterStoragePolicyProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IoFilterStoragePolicyProperties) UnmarshalBinary(b []byte) error { - var res IoFilterStoragePolicyProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/io_preferential_tier.go b/v1/models/io_preferential_tier.go deleted file mode 100644 index 0962fe2b..00000000 --- a/v1/models/io_preferential_tier.go +++ /dev/null @@ -1,659 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IoPreferentialTier IO Preferential Tier. -// -// Specifies the preferred storage tier for IO operations. -// -// swagger:model IoPreferentialTier -type IoPreferentialTier struct { - - // Specifies the preferred storage tier used by Apollo as its working directory. - ApolloIOPreferentialTier []*string `json:"apolloIOPreferentialTier"` - - // Specifies the preferred storage tier used by Apollo as its actions WAL. - ApolloWalIOPreferentialTier []*string `json:"apolloWalIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Athena. - AthenaIOPreferentialTier []*string `json:"athenaIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Athena for slower storage. - AthenaSlowerIOPreferentialTier []*string `json:"athenaSlowerIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by cloud chunk repository. - CloudChunkRepoIOPreferentialTier []*string `json:"cloudChunkRepoIOPreferentialTier"` - - // Specifies the usage percentage thresholds for the correponding storage tier. - DownTierUsagePercentThresholds []int32 `json:"downTierUsagePercentThresholds"` - - // Specifies the preferred storage tier used by Groot as its working directory. - GrootIOPreferentialTier []*string `json:"grootIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Hydra for offloading. - HydraDowntierIOPreferentialTier []*string `json:"hydraDowntierIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Hydra. - HydraIOPreferentialTier []*string `json:"hydraIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by librarian. - LibrarianIOPreferentialTier []*string `json:"librarianIOPreferentialTier"` - - // Specifies the order of perferred storage tiers for random IO operations. - RandomIOPreferentialTier []*string `json:"randomIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Scribe. - ScribeIOPreferentialTier []*string `json:"scribeIOPreferentialTier"` - - // Specifies the preferred storage tier for sequential IO operations. - SequentialIOPreferentialTier []*string `json:"sequentialIOPreferentialTier"` - - // Specifies the list of perferred storage tiers used by Yoda. - YodaIOPreferentialTier []*string `json:"yodaIOPreferentialTier"` -} - -// Validate validates this io preferential tier -func (m *IoPreferentialTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApolloIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApolloWalIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAthenaIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAthenaSlowerIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudChunkRepoIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGrootIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHydraDowntierIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHydraIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLibrarianIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRandomIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScribeIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSequentialIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYodaIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ioPreferentialTierApolloIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierApolloIOPreferentialTierItemsEnum = append(ioPreferentialTierApolloIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateApolloIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierApolloIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateApolloIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ApolloIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ApolloIOPreferentialTier); i++ { - if swag.IsZero(m.ApolloIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateApolloIOPreferentialTierItemsEnum("apolloIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.ApolloIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierApolloWalIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierApolloWalIOPreferentialTierItemsEnum = append(ioPreferentialTierApolloWalIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateApolloWalIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierApolloWalIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateApolloWalIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ApolloWalIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ApolloWalIOPreferentialTier); i++ { - if swag.IsZero(m.ApolloWalIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateApolloWalIOPreferentialTierItemsEnum("apolloWalIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.ApolloWalIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierAthenaIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierAthenaIOPreferentialTierItemsEnum = append(ioPreferentialTierAthenaIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateAthenaIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierAthenaIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateAthenaIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.AthenaIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.AthenaIOPreferentialTier); i++ { - if swag.IsZero(m.AthenaIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateAthenaIOPreferentialTierItemsEnum("athenaIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.AthenaIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum = append(ioPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateAthenaSlowerIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateAthenaSlowerIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.AthenaSlowerIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.AthenaSlowerIOPreferentialTier); i++ { - if swag.IsZero(m.AthenaSlowerIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateAthenaSlowerIOPreferentialTierItemsEnum("athenaSlowerIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.AthenaSlowerIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum = append(ioPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateCloudChunkRepoIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateCloudChunkRepoIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.CloudChunkRepoIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.CloudChunkRepoIOPreferentialTier); i++ { - if swag.IsZero(m.CloudChunkRepoIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateCloudChunkRepoIOPreferentialTierItemsEnum("cloudChunkRepoIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.CloudChunkRepoIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierGrootIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierGrootIOPreferentialTierItemsEnum = append(ioPreferentialTierGrootIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateGrootIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierGrootIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateGrootIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.GrootIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.GrootIOPreferentialTier); i++ { - if swag.IsZero(m.GrootIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateGrootIOPreferentialTierItemsEnum("grootIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.GrootIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierHydraDowntierIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierHydraDowntierIOPreferentialTierItemsEnum = append(ioPreferentialTierHydraDowntierIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateHydraDowntierIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierHydraDowntierIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateHydraDowntierIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.HydraDowntierIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.HydraDowntierIOPreferentialTier); i++ { - if swag.IsZero(m.HydraDowntierIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateHydraDowntierIOPreferentialTierItemsEnum("hydraDowntierIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.HydraDowntierIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierHydraIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierHydraIOPreferentialTierItemsEnum = append(ioPreferentialTierHydraIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateHydraIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierHydraIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateHydraIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.HydraIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.HydraIOPreferentialTier); i++ { - if swag.IsZero(m.HydraIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateHydraIOPreferentialTierItemsEnum("hydraIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.HydraIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierLibrarianIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierLibrarianIOPreferentialTierItemsEnum = append(ioPreferentialTierLibrarianIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateLibrarianIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierLibrarianIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateLibrarianIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.LibrarianIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.LibrarianIOPreferentialTier); i++ { - if swag.IsZero(m.LibrarianIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateLibrarianIOPreferentialTierItemsEnum("librarianIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.LibrarianIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierRandomIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierRandomIOPreferentialTierItemsEnum = append(ioPreferentialTierRandomIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateRandomIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierRandomIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateRandomIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.RandomIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.RandomIOPreferentialTier); i++ { - if swag.IsZero(m.RandomIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateRandomIOPreferentialTierItemsEnum("randomIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.RandomIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierScribeIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierScribeIOPreferentialTierItemsEnum = append(ioPreferentialTierScribeIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateScribeIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierScribeIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateScribeIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ScribeIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ScribeIOPreferentialTier); i++ { - if swag.IsZero(m.ScribeIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateScribeIOPreferentialTierItemsEnum("scribeIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.ScribeIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierSequentialIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierSequentialIOPreferentialTierItemsEnum = append(ioPreferentialTierSequentialIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateSequentialIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierSequentialIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateSequentialIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.SequentialIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.SequentialIOPreferentialTier); i++ { - if swag.IsZero(m.SequentialIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateSequentialIOPreferentialTierItemsEnum("sequentialIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.SequentialIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var ioPreferentialTierYodaIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPcieSsd","kSataSsd","kSataHdd","kCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ioPreferentialTierYodaIOPreferentialTierItemsEnum = append(ioPreferentialTierYodaIOPreferentialTierItemsEnum, v) - } -} - -func (m *IoPreferentialTier) validateYodaIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ioPreferentialTierYodaIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IoPreferentialTier) validateYodaIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.YodaIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.YodaIOPreferentialTier); i++ { - if swag.IsZero(m.YodaIOPreferentialTier[i]) { // not required - continue - } - - // value enum - if err := m.validateYodaIOPreferentialTierItemsEnum("yodaIOPreferentialTier"+"."+strconv.Itoa(i), "body", *m.YodaIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this io preferential tier based on context it is used -func (m *IoPreferentialTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IoPreferentialTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IoPreferentialTier) UnmarshalBinary(b []byte) error { - var res IoPreferentialTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/iops_tile.go b/v1/models/iops_tile.go deleted file mode 100644 index a2f7ab4b..00000000 --- a/v1/models/iops_tile.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IopsTile IOPS Tile. -// -// IOPs information for dashboard. -// -// swagger:model IopsTile -type IopsTile struct { - - // Maximum Read IOs per second in last 24 hours. - MaxReadIops *int64 `json:"maxReadIops,omitempty"` - - // Maximum number of Write IOs per second in last 24 hours. - MaxWriteIops *int64 `json:"maxWriteIops,omitempty"` - - // Read IOs per second samples taken for the past 24 hours at 10 minutes - // interval given in descending order of time. - ReadIopsSamples []*Sample `json:"readIopsSamples"` - - // Write IOs per second samples taken for the past 24 hours at 10 minutes - // interval given in descending order of time. - WriteIopsSamples []*Sample `json:"writeIopsSamples"` -} - -// Validate validates this iops tile -func (m *IopsTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReadIopsSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWriteIopsSamples(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IopsTile) validateReadIopsSamples(formats strfmt.Registry) error { - if swag.IsZero(m.ReadIopsSamples) { // not required - return nil - } - - for i := 0; i < len(m.ReadIopsSamples); i++ { - if swag.IsZero(m.ReadIopsSamples[i]) { // not required - continue - } - - if m.ReadIopsSamples[i] != nil { - if err := m.ReadIopsSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readIopsSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readIopsSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IopsTile) validateWriteIopsSamples(formats strfmt.Registry) error { - if swag.IsZero(m.WriteIopsSamples) { // not required - return nil - } - - for i := 0; i < len(m.WriteIopsSamples); i++ { - if swag.IsZero(m.WriteIopsSamples[i]) { // not required - continue - } - - if m.WriteIopsSamples[i] != nil { - if err := m.WriteIopsSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeIopsSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeIopsSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this iops tile based on the context it is used -func (m *IopsTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReadIopsSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWriteIopsSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IopsTile) contextValidateReadIopsSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReadIopsSamples); i++ { - - if m.ReadIopsSamples[i] != nil { - - if swag.IsZero(m.ReadIopsSamples[i]) { // not required - return nil - } - - if err := m.ReadIopsSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readIopsSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readIopsSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IopsTile) contextValidateWriteIopsSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WriteIopsSamples); i++ { - - if m.WriteIopsSamples[i] != nil { - - if swag.IsZero(m.WriteIopsSamples[i]) { // not required - return nil - } - - if err := m.WriteIopsSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeIopsSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeIopsSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IopsTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IopsTile) UnmarshalBinary(b []byte) error { - var res IopsTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ip_config.go b/v1/models/ip_config.go deleted file mode 100644 index 5eeb32f4..00000000 --- a/v1/models/ip_config.go +++ /dev/null @@ -1,72 +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" -) - -// IPConfig Config Ip Parameters. -// -// Specifies the configuration of an IP. -// -// swagger:model IpConfig -type IPConfig struct { - - // The interface name. - // - // Specifies which interface to assign IP to. - InterfaceName *string `json:"interfaceName,omitempty"` - - // IpFamily of this config. - IPFamily *int32 `json:"ipFamily,omitempty"` - - // The interface ips. - Ips []string `json:"ips"` - - // Node ids. - NodeIds []int64 `json:"nodeIds"` - - // The interface role. - Role *string `json:"role,omitempty"` - - // The interface gateway. - SubnetGateway *string `json:"subnetGateway,omitempty"` - - // The interface subnet mask bits. - SubnetMaskBits *int32 `json:"subnetMaskBits,omitempty"` -} - -// Validate validates this Ip config -func (m *IPConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Ip config based on context it is used -func (m *IPConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPConfig) UnmarshalBinary(b []byte) error { - var res IPConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ip_details.go b/v1/models/ip_details.go deleted file mode 100644 index 9fdda905..00000000 --- a/v1/models/ip_details.go +++ /dev/null @@ -1,61 +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" -) - -// IPDetails IP address details -// The table below captures the type if information published by an entity -// type using this field. -// -// # Entity Type | IP Address Details | Details field -// -// kHostSystem | VMKernel Adapter IP Addresses | VMKernelAdapter -// -// TODO(Matthew) : Use an enum for the 'Details'. -// -// swagger:model IpDetails -type IPDetails struct { - - // Details of the IP Addresses captured below - Details *string `json:"details,omitempty"` - - // The IP Addresses - IPAddresses []string `json:"ipAddresses"` -} - -// Validate validates this Ip details -func (m *IPDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Ip details based on context it is used -func (m *IPDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPDetails) UnmarshalBinary(b []byte) error { - var res IPDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ip_mode.go b/v1/models/ip_mode.go deleted file mode 100644 index 8f104468..00000000 --- a/v1/models/ip_mode.go +++ /dev/null @@ -1,54 +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" -) - -// IPMode This message encapsulates information about K8s source IP mode. -// -// swagger:model IPMode -type IPMode struct { - - // IP family policy in use. - IPFamilyPolicy *int32 `json:"ipFamilyPolicy,omitempty"` - - // IP family preferred (in case of dual stack) - // or in use (for single stack). - PreferredIPFamily *int32 `json:"preferredIpFamily,omitempty"` -} - -// Validate validates this IP mode -func (m *IPMode) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this IP mode based on context it is used -func (m *IPMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPMode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPMode) UnmarshalBinary(b []byte) error { - var res IPMode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ip_range.go b/v1/models/ip_range.go deleted file mode 100644 index c7bae15a..00000000 --- a/v1/models/ip_range.go +++ /dev/null @@ -1,54 +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" -) - -// IPRange IP Range for range of vip address addition -// -// swagger:model IpRange -type IPRange struct { - - // Optional End IP of the range - // If not specified, EndIp is same as StartIp - EndIP *string `json:"endIp,omitempty"` - - // Start IP of the range - StartIP *string `json:"startIp,omitempty"` -} - -// Validate validates this Ip range -func (m *IPRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Ip range based on context it is used -func (m *IPRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPRange) UnmarshalBinary(b []byte) error { - var res IPRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ip_unconfig.go b/v1/models/ip_unconfig.go deleted file mode 100644 index 15b33f82..00000000 --- a/v1/models/ip_unconfig.go +++ /dev/null @@ -1,58 +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" -) - -// IPUnconfig Unconfig Ip Parameters. -// -// Specifies the unconfiguration of an IP. -// -// swagger:model IpUnconfig -type IPUnconfig struct { - - // The interface name. - InterfaceName *string `json:"interfaceName,omitempty"` - - // IpFamily of this config. - IPFamily *int32 `json:"ipFamily,omitempty"` - - // Node ids. - NodeIds []int64 `json:"nodeIds"` -} - -// Validate validates this Ip unconfig -func (m *IPUnconfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Ip unconfig based on context it is used -func (m *IPUnconfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPUnconfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPUnconfig) UnmarshalBinary(b []byte) error { - var res IPUnconfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ipmi_configuration.go b/v1/models/ipmi_configuration.go deleted file mode 100644 index 5d74045e..00000000 --- a/v1/models/ipmi_configuration.go +++ /dev/null @@ -1,62 +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" -) - -// IpmiConfiguration IPMI Configuration. -// -// Specifies the parameters for configuration of IPMI. This is only needed -// for physical clusters. -// -// swagger:model IpmiConfiguration -type IpmiConfiguration struct { - - // Specifies the default Gateway IP Address for the IPMI network. - IpmiGateway *string `json:"ipmiGateway,omitempty"` - - // Specifies the IPMI Password. - IpmiPassword *string `json:"ipmiPassword,omitempty"` - - // Specifies the subnet mask for the IPMI network. - IpmiSubnetMask *string `json:"ipmiSubnetMask,omitempty"` - - // Specifies the IPMI Username. - IpmiUsername *string `json:"ipmiUsername,omitempty"` -} - -// Validate validates this ipmi configuration -func (m *IpmiConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ipmi configuration based on context it is used -func (m *IpmiConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IpmiConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IpmiConfiguration) UnmarshalBinary(b []byte) error { - var res IpmiConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/iscsi_san_port.go b/v1/models/iscsi_san_port.go deleted file mode 100644 index 5dc7139c..00000000 --- a/v1/models/iscsi_san_port.go +++ /dev/null @@ -1,58 +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" -) - -// IscsiSanPort ISCSI SAN Port. -// -// Specifies an iSCSI SAN Port. -// -// swagger:model IscsiSanPort -type IscsiSanPort struct { - - // Specifies the IP address of the SAN port. - IPAddress *string `json:"ipAddress,omitempty"` - - // Specifies the qualified name of the iSCSI port (IQN). - Iqn *string `json:"iqn,omitempty"` - - // Specifies the listening port(tcp) of the SAN port. - TCPPort *int32 `json:"tcpPort,omitempty"` -} - -// Validate validates this iscsi san port -func (m *IscsiSanPort) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this iscsi san port based on context it is used -func (m *IscsiSanPort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IscsiSanPort) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IscsiSanPort) UnmarshalBinary(b []byte) error { - var res IscsiSanPort - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_access_zone.go b/v1/models/isilon_access_zone.go deleted file mode 100644 index 8ad75e79..00000000 --- a/v1/models/isilon_access_zone.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IsilonAccessZone Isilon Access Zone. -// -// Specifies information about access zone in an Isilon Cluster. -// -// swagger:model IsilonAccessZone -type IsilonAccessZone struct { - - // Specifies the groupnet name of the Isilon Access Zone. - Groupnet *string `json:"groupnet,omitempty"` - - // Specifies the id of the access zone. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the access zone. - Name *string `json:"name,omitempty"` - - // Specifies the network pools associated with the Isilon Access Zone. - NetworkPools []*NetworkPool `json:"networkPools"` - - // Specifies the path of the access zone in ifs. This should include the - // leading "/ifs/". - Path *string `json:"path,omitempty"` -} - -// Validate validates this isilon access zone -func (m *IsilonAccessZone) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkPools(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonAccessZone) validateNetworkPools(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkPools) { // not required - return nil - } - - for i := 0; i < len(m.NetworkPools); i++ { - if swag.IsZero(m.NetworkPools[i]) { // not required - continue - } - - if m.NetworkPools[i] != nil { - if err := m.NetworkPools[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this isilon access zone based on the context it is used -func (m *IsilonAccessZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkPools(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonAccessZone) contextValidateNetworkPools(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkPools); i++ { - - if m.NetworkPools[i] != nil { - - if swag.IsZero(m.NetworkPools[i]) { // not required - return nil - } - - if err := m.NetworkPools[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonAccessZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonAccessZone) UnmarshalBinary(b []byte) error { - var res IsilonAccessZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_cluster.go b/v1/models/isilon_cluster.go deleted file mode 100644 index 491c077e..00000000 --- a/v1/models/isilon_cluster.go +++ /dev/null @@ -1,61 +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" -) - -// IsilonCluster Isilon Cluster. -// -// Specifies information about an Isilon Cluster. -// -// swagger:model IsilonCluster -type IsilonCluster struct { - - // Specifies the API version of an Isilon Cluster as string. - APIVersionStr *string `json:"apiVersionStr,omitempty"` - - // Specifies the description of an Isilon Cluster. - Description *string `json:"description,omitempty"` - - // Specifies a globally unique id of an Isilon Cluster. - GUID *string `json:"guid,omitempty"` - - // Specifies the version of an Isilon Cluster. - Version *string `json:"version,omitempty"` -} - -// Validate validates this isilon cluster -func (m *IsilonCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this isilon cluster based on context it is used -func (m *IsilonCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonCluster) UnmarshalBinary(b []byte) error { - var res IsilonCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_env_params.go b/v1/models/isilon_env_params.go deleted file mode 100644 index 6031c18b..00000000 --- a/v1/models/isilon_env_params.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IsilonEnvParams Isilon Environment Parameters. -// -// Message to capture Ision-spcific environment parameters. -// -// swagger:model IsilonEnvParams -type IsilonEnvParams struct { - - // Mapping from access zone name to configuration. - ZoneConfigMap []*IsilonEnvParamsZoneConfigMapEntry `json:"zoneConfigMap"` -} - -// Validate validates this isilon env params -func (m *IsilonEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateZoneConfigMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonEnvParams) validateZoneConfigMap(formats strfmt.Registry) error { - if swag.IsZero(m.ZoneConfigMap) { // not required - return nil - } - - for i := 0; i < len(m.ZoneConfigMap); i++ { - if swag.IsZero(m.ZoneConfigMap[i]) { // not required - continue - } - - if m.ZoneConfigMap[i] != nil { - if err := m.ZoneConfigMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneConfigMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneConfigMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this isilon env params based on the context it is used -func (m *IsilonEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateZoneConfigMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonEnvParams) contextValidateZoneConfigMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ZoneConfigMap); i++ { - - if m.ZoneConfigMap[i] != nil { - - if swag.IsZero(m.ZoneConfigMap[i]) { // not required - return nil - } - - if err := m.ZoneConfigMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneConfigMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneConfigMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonEnvParams) UnmarshalBinary(b []byte) error { - var res IsilonEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_env_params_zone_config.go b/v1/models/isilon_env_params_zone_config.go deleted file mode 100644 index af1028e5..00000000 --- a/v1/models/isilon_env_params_zone_config.go +++ /dev/null @@ -1,217 +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" -) - -// IsilonEnvParamsZoneConfig Access Zone Configuration. -// -// swagger:model IsilonEnvParams_ZoneConfig -type IsilonEnvParamsZoneConfig struct { - - // Dynamic network pool configuration for the access zone. Dynamic pool is - // used for stateless protocols, e.g. NFSv3. - DynamicNetworkPoolConfig *IsilonEnvParamsZoneConfigNetworkPoolConfig `json:"dynamicNetworkPoolConfig,omitempty"` - - // Name of the zone's groupnet. - Groupnet *string `json:"groupnet,omitempty"` - - // SMB credentials for the access zone. - SmbCredentials *NasMountCredentials `json:"smbCredentials,omitempty"` - - // Static network pool configuration for the access zone. Static pool is - // used for stateful protocols: e.g. SMB, NFSv4, and for stateless - // protocols e.g. NFSv3 if dynamic pool below is not set. - StaticNetworkPoolConfig *IsilonEnvParamsZoneConfigNetworkPoolConfig `json:"staticNetworkPoolConfig,omitempty"` -} - -// Validate validates this isilon env params zone config -func (m *IsilonEnvParamsZoneConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDynamicNetworkPoolConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStaticNetworkPoolConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonEnvParamsZoneConfig) validateDynamicNetworkPoolConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DynamicNetworkPoolConfig) { // not required - return nil - } - - if m.DynamicNetworkPoolConfig != nil { - if err := m.DynamicNetworkPoolConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicNetworkPoolConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonEnvParamsZoneConfig) validateSmbCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if m.SmbCredentials != nil { - if err := m.SmbCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *IsilonEnvParamsZoneConfig) validateStaticNetworkPoolConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StaticNetworkPoolConfig) { // not required - return nil - } - - if m.StaticNetworkPoolConfig != nil { - if err := m.StaticNetworkPoolConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("staticNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("staticNetworkPoolConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this isilon env params zone config based on the context it is used -func (m *IsilonEnvParamsZoneConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDynamicNetworkPoolConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStaticNetworkPoolConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonEnvParamsZoneConfig) contextValidateDynamicNetworkPoolConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DynamicNetworkPoolConfig != nil { - - if swag.IsZero(m.DynamicNetworkPoolConfig) { // not required - return nil - } - - if err := m.DynamicNetworkPoolConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicNetworkPoolConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonEnvParamsZoneConfig) contextValidateSmbCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbCredentials != nil { - - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if err := m.SmbCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *IsilonEnvParamsZoneConfig) contextValidateStaticNetworkPoolConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StaticNetworkPoolConfig != nil { - - if swag.IsZero(m.StaticNetworkPoolConfig) { // not required - return nil - } - - if err := m.StaticNetworkPoolConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("staticNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("staticNetworkPoolConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfig) UnmarshalBinary(b []byte) error { - var res IsilonEnvParamsZoneConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_env_params_zone_config_map_entry.go b/v1/models/isilon_env_params_zone_config_map_entry.go deleted file mode 100644 index a839c1d8..00000000 --- a/v1/models/isilon_env_params_zone_config_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// IsilonEnvParamsZoneConfigMapEntry isilon env params zone config map entry -// -// swagger:model IsilonEnvParams_ZoneConfigMapEntry -type IsilonEnvParamsZoneConfigMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *IsilonEnvParamsZoneConfig `json:"value,omitempty"` -} - -// Validate validates this isilon env params zone config map entry -func (m *IsilonEnvParamsZoneConfigMapEntry) 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 -} - -func (m *IsilonEnvParamsZoneConfigMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this isilon env params zone config map entry based on the context it is used -func (m *IsilonEnvParamsZoneConfigMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonEnvParamsZoneConfigMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfigMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfigMapEntry) UnmarshalBinary(b []byte) error { - var res IsilonEnvParamsZoneConfigMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_env_params_zone_config_network_pool_config.go b/v1/models/isilon_env_params_zone_config_network_pool_config.go deleted file mode 100644 index 91652891..00000000 --- a/v1/models/isilon_env_params_zone_config_network_pool_config.go +++ /dev/null @@ -1,58 +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" -) - -// IsilonEnvParamsZoneConfigNetworkPoolConfig Network Pool Configuration. -// -// swagger:model IsilonEnvParams_ZoneConfig_NetworkPoolConfig -type IsilonEnvParamsZoneConfigNetworkPoolConfig struct { - - // The name of the pool. - PoolName *string `json:"poolName,omitempty"` - - // Name of the subnet the pool belongs to. - Subnet *string `json:"subnet,omitempty"` - - // Whether to use SmartConnect if available. If true, DNS name for the - // SmartConnect zone will be used to balance the IPs. Otherwise, pool IPs - // will be balanced manually. - UseSmartconnect *bool `json:"useSmartconnect,omitempty"` -} - -// Validate validates this isilon env params zone config network pool config -func (m *IsilonEnvParamsZoneConfigNetworkPoolConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this isilon env params zone config network pool config based on context it is used -func (m *IsilonEnvParamsZoneConfigNetworkPoolConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfigNetworkPoolConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonEnvParamsZoneConfigNetworkPoolConfig) UnmarshalBinary(b []byte) error { - var res IsilonEnvParamsZoneConfigNetworkPoolConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_mount_point.go b/v1/models/isilon_mount_point.go deleted file mode 100644 index c6115fbc..00000000 --- a/v1/models/isilon_mount_point.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonMountPoint Isilon Mount Point. -// -// Specifies information about a mount point in an Isilon OneFs Cluster. -// -// swagger:model IsilonMountPoint -type IsilonMountPoint struct { - - // Specifies the name of access zone. - AccessZoneName *string `json:"accessZoneName,omitempty"` - - // Specifies information about an NFS export. This field is set if the file - // system supports protocol type 'kNfs'. - NfsMountPoint *IsilonNfsMountPoint `json:"nfsMountPoint,omitempty"` - - // Specifies the path of the access zone in ifs. This should include the - // leading "/ifs/". - Path *string `json:"path,omitempty"` - - // List of Protocols on Isilon. - // - // Specifies the list of protocols enabled on Isilon OneFs file system. - // 'kNfs' indicates NFS exports in an Isilon Cluster. - // 'kSmb' indicates CIFS/SMB Shares in an Isilon Cluster. - Protocols []string `json:"protocols"` - - // Specifies information about an SMB share. This field is set if the - // file system supports protocol type 'kSmb'. - SmbMountPoints []*IsilonSmbMountPoint `json:"smbMountPoints"` -} - -// Validate validates this isilon mount point -func (m *IsilonMountPoint) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsMountPoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbMountPoints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonMountPoint) validateNfsMountPoint(formats strfmt.Registry) error { - if swag.IsZero(m.NfsMountPoint) { // not required - return nil - } - - if m.NfsMountPoint != nil { - if err := m.NfsMountPoint.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsMountPoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsMountPoint") - } - return err - } - } - - return nil -} - -var isilonMountPointProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonMountPointProtocolsItemsEnum = append(isilonMountPointProtocolsItemsEnum, v) - } -} - -func (m *IsilonMountPoint) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonMountPointProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonMountPoint) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *IsilonMountPoint) validateSmbMountPoints(formats strfmt.Registry) error { - if swag.IsZero(m.SmbMountPoints) { // not required - return nil - } - - for i := 0; i < len(m.SmbMountPoints); i++ { - if swag.IsZero(m.SmbMountPoints[i]) { // not required - continue - } - - if m.SmbMountPoints[i] != nil { - if err := m.SmbMountPoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbMountPoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbMountPoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this isilon mount point based on the context it is used -func (m *IsilonMountPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNfsMountPoint(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbMountPoints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonMountPoint) contextValidateNfsMountPoint(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsMountPoint != nil { - - if swag.IsZero(m.NfsMountPoint) { // not required - return nil - } - - if err := m.NfsMountPoint.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsMountPoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsMountPoint") - } - return err - } - } - - return nil -} - -func (m *IsilonMountPoint) contextValidateSmbMountPoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SmbMountPoints); i++ { - - if m.SmbMountPoints[i] != nil { - - if swag.IsZero(m.SmbMountPoints[i]) { // not required - return nil - } - - if err := m.SmbMountPoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbMountPoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbMountPoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonMountPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonMountPoint) UnmarshalBinary(b []byte) error { - var res IsilonMountPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_nfs_mount_point.go b/v1/models/isilon_nfs_mount_point.go deleted file mode 100644 index ce731260..00000000 --- a/v1/models/isilon_nfs_mount_point.go +++ /dev/null @@ -1,58 +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" -) - -// IsilonNfsMountPoint Isilon NFS Mount Point. -// -// Specifies NFS Mount Point exposed by Isilon Protection Source. -// -// swagger:model IsilonNfsMountPoint -type IsilonNfsMountPoint struct { - - // Specifies the Access Zone name. - AccessZoneName *string `json:"accessZoneName,omitempty"` - - // Specifies the description of the NFS mount point. - Description *string `json:"description,omitempty"` - - // Specifies the Id of the NFS export. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this isilon nfs mount point -func (m *IsilonNfsMountPoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this isilon nfs mount point based on context it is used -func (m *IsilonNfsMountPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonNfsMountPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonNfsMountPoint) UnmarshalBinary(b []byte) error { - var res IsilonNfsMountPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_protection_source.go b/v1/models/isilon_protection_source.go deleted file mode 100644 index ed9a50f3..00000000 --- a/v1/models/isilon_protection_source.go +++ /dev/null @@ -1,278 +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" -) - -// IsilonProtectionSource Isilon Protection Source. -// -// Specifies a Protection Source in Isilon OneFs environment. -// -// swagger:model IsilonProtectionSource -type IsilonProtectionSource struct { - - // Specifies an access zone in an Isilon OneFs file system. This is set only - // when the entity type is 'kZone'. - AccessZone *IsilonAccessZone `json:"accessZone,omitempty"` - - // Specifies information of an Isilon OneFs Cluster. This is set only - // when the entity type is 'kCluster'. - Cluster *IsilonCluster `json:"cluster,omitempty"` - - // Specifies information about a mount point in an Isilon OneFs file system. - // This is set only when the entity type is 'kMountPoint'. - MountPoint *IsilonMountPoint `json:"mountPoint,omitempty"` - - // Specifies a unique name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies the type of the entity in an Isilon OneFs file system - // like 'kCluster', 'kZone', or, 'kMountPoint'. - // 'kCluster' indicates an Isilon OneFs Cluster. - // 'kZone' indicates an access zone in an Isilon OneFs Cluster. - // 'kMountPoint' indicates a mount point exposed by an Isilon OneFs Cluster. - // Enum: ["kCluster","kZone","kMountPoint"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this isilon protection source -func (m *IsilonProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessZone(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountPoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonProtectionSource) validateAccessZone(formats strfmt.Registry) error { - if swag.IsZero(m.AccessZone) { // not required - return nil - } - - if m.AccessZone != nil { - if err := m.AccessZone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessZone") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionSource) validateCluster(formats strfmt.Registry) error { - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionSource) validateMountPoint(formats strfmt.Registry) error { - if swag.IsZero(m.MountPoint) { // not required - return nil - } - - if m.MountPoint != nil { - if err := m.MountPoint.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountPoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountPoint") - } - return err - } - } - - return nil -} - -var isilonProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kZone","kMountPoint"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonProtectionSourceTypeTypePropEnum = append(isilonProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // IsilonProtectionSourceTypeKCluster captures enum value "kCluster" - IsilonProtectionSourceTypeKCluster string = "kCluster" - - // IsilonProtectionSourceTypeKZone captures enum value "kZone" - IsilonProtectionSourceTypeKZone string = "kZone" - - // IsilonProtectionSourceTypeKMountPoint captures enum value "kMountPoint" - IsilonProtectionSourceTypeKMountPoint string = "kMountPoint" -) - -// prop value enum -func (m *IsilonProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this isilon protection source based on the context it is used -func (m *IsilonProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAccessZone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountPoint(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonProtectionSource) contextValidateAccessZone(ctx context.Context, formats strfmt.Registry) error { - - if m.AccessZone != nil { - - if swag.IsZero(m.AccessZone) { // not required - return nil - } - - if err := m.AccessZone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessZone") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionSource) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.Cluster != nil { - - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionSource) contextValidateMountPoint(ctx context.Context, formats strfmt.Registry) error { - - if m.MountPoint != nil { - - if swag.IsZero(m.MountPoint) { // not required - return nil - } - - if err := m.MountPoint.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountPoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountPoint") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonProtectionSource) UnmarshalBinary(b []byte) error { - var res IsilonProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/isilon_smb_mount_point.go b/v1/models/isilon_smb_mount_point.go deleted file mode 100644 index 4795482e..00000000 --- a/v1/models/isilon_smb_mount_point.go +++ /dev/null @@ -1,59 +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" -) - -// IsilonSmbMountPoint Isilon SMB Mount Point. -// -// Specifies information specific to SMB shares exposed by Isilon -// file system. -// -// swagger:model IsilonSmbMountPoint -type IsilonSmbMountPoint struct { - - // Specifies the Access Zone Id. - AccessZoneID *int64 `json:"accessZoneId,omitempty"` - - // Specifies the description of the NFS mount point. - Description *string `json:"description,omitempty"` - - // Specifies the name of the SMB/CIFS share. - ShareName *string `json:"shareName,omitempty"` -} - -// Validate validates this isilon smb mount point -func (m *IsilonSmbMountPoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this isilon smb mount point based on context it is used -func (m *IsilonSmbMountPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonSmbMountPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonSmbMountPoint) UnmarshalBinary(b []byte) error { - var res IsilonSmbMountPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/item_meta_data.go b/v1/models/item_meta_data.go deleted file mode 100644 index f293d8d2..00000000 --- a/v1/models/item_meta_data.go +++ /dev/null @@ -1,731 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ItemMetaData Message encapsulating the metadata for an outlook item. This has data which -// can be indexed by yoda for searching individual items. -// -// swagger:model ItemMetaData -type ItemMetaData struct { - - // List of attachment ids. - AttachmentVec []*Attachment `json:"attachmentVec"` - - // List of BccRecipients. - BccRecipientVec []*PrivateUser `json:"bccRecipientVec"` - - // Birthday of the Contact. - Birthday *int64 `json:"birthday,omitempty"` - - // List of CcRecipients. - CcRecipientVec []*PrivateUser `json:"ccRecipientVec"` - - // Version of the item that changed. - ChangeKey *string `json:"changeKey,omitempty"` - - // Task completion date. - CompletionDate *int64 `json:"completionDate,omitempty"` - - // Additional common fields for all item types. - // Time at which the item is created - DateTimeCreated. - CreationTime *int64 `json:"creationTime,omitempty"` - - // Task due date. - DueDate *int64 `json:"dueDate,omitempty"` - - // Email addresses assigned to the Contact. - EmailAddressesVec []string `json:"emailAddressesVec"` - - // End date/time for the single occurence events. - EndTime *int64 `json:"endTime,omitempty"` - - // Contact items specific fields. - // First name of the Contact. - FirstName *string `json:"firstName,omitempty"` - - // Date/time for the first occurence of the recurring events. - FirstOccurrence *ItemMetaDataOccurrence `json:"firstOccurrence,omitempty"` - - // From whom the mail is received. - From *PrivateUser `json:"from,omitempty"` - - // Does the item have attachments? - HasAttachments *bool `json:"hasAttachments,omitempty"` - - // Id of the item. - ID *string `json:"id,omitempty"` - - // Item importance. - Importance *int32 `json:"importance,omitempty"` - - // Is this recurring calendar event or task. - IsRecurring *bool `json:"isRecurring,omitempty"` - - // Class of the item. - ItemClass *string `json:"itemClass,omitempty"` - - // The item was last modified by. - LastModifiedName *string `json:"lastModifiedName,omitempty"` - - // Last modificiation time of the item. - LastModifiedTime *int64 `json:"lastModifiedTime,omitempty"` - - // Last name of the Contact. - LastName *string `json:"lastName,omitempty"` - - // Date/time for the last occurence of the recurring events. - LastOccurrence *ItemMetaDataOccurrence `json:"lastOccurrence,omitempty"` - - // Parent folder id returned with GetItem API call of the item. - MetadataParentFolderID *string `json:"metadataParentFolderId,omitempty"` - - // Middle name of the Contact. - MiddleName *string `json:"middleName,omitempty"` - - // Optional Attendee list - OptionalAttendees. - OptionalAttendeesVec []*PrivateUser `json:"optionalAttendeesVec"` - - // Calendar item spcific fields. - // Appointment/meeting Organizer. - Organizer *PrivateUser `json:"organizer,omitempty"` - - // Task items specific fields. - // Task owner. - Owner *string `json:"owner,omitempty"` - - // Parent folder id of the item. - ParentFolderID *string `json:"parentFolderId,omitempty"` - - // Time at which the mail is received. - ReceivedTime *int64 `json:"receivedTime,omitempty"` - - // Recurrence pattern information for the recurring calendar events and - // tasks. - RecurrencePattern *int32 `json:"recurrencePattern,omitempty"` - - // Attendee list - RequiredAttendees. - RequiredAttendeesVec []*PrivateUser `json:"requiredAttendeesVec"` - - // Item sensitivity. - Sensitivity *int32 `json:"sensitivity,omitempty"` - - // Time at which the mail is sent. - SentTime *int64 `json:"sentTime,omitempty"` - - // Sha-256 for the data. - Sha256Checksum *string `json:"sha_256Checksum,omitempty"` - - // Size of the item. - Size *int64 `json:"size,omitempty"` - - // Start date/time for the single occurence events. - StartTime *int64 `json:"startTime,omitempty"` - - // Subject of the item. - Subject *string `json:"subject,omitempty"` - - // Status of the task. - TaskStatus *int32 `json:"taskStatus,omitempty"` - - // List of ToRecipients. - ToRecipientVec []*PrivateUser `json:"toRecipientVec"` - - // Type of the item. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this item meta data -func (m *ItemMetaData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttachmentVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBccRecipientVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCcRecipientVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFirstOccurrence(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrom(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastOccurrence(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOptionalAttendeesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrganizer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRequiredAttendeesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateToRecipientVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ItemMetaData) validateAttachmentVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttachmentVec) { // not required - return nil - } - - for i := 0; i < len(m.AttachmentVec); i++ { - if swag.IsZero(m.AttachmentVec[i]) { // not required - continue - } - - if m.AttachmentVec[i] != nil { - if err := m.AttachmentVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attachmentVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attachmentVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) validateBccRecipientVec(formats strfmt.Registry) error { - if swag.IsZero(m.BccRecipientVec) { // not required - return nil - } - - for i := 0; i < len(m.BccRecipientVec); i++ { - if swag.IsZero(m.BccRecipientVec[i]) { // not required - continue - } - - if m.BccRecipientVec[i] != nil { - if err := m.BccRecipientVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bccRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bccRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) validateCcRecipientVec(formats strfmt.Registry) error { - if swag.IsZero(m.CcRecipientVec) { // not required - return nil - } - - for i := 0; i < len(m.CcRecipientVec); i++ { - if swag.IsZero(m.CcRecipientVec[i]) { // not required - continue - } - - if m.CcRecipientVec[i] != nil { - if err := m.CcRecipientVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ccRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ccRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) validateFirstOccurrence(formats strfmt.Registry) error { - if swag.IsZero(m.FirstOccurrence) { // not required - return nil - } - - if m.FirstOccurrence != nil { - if err := m.FirstOccurrence.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstOccurrence") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) validateFrom(formats strfmt.Registry) error { - if swag.IsZero(m.From) { // not required - return nil - } - - if m.From != nil { - if err := m.From.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("from") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("from") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) validateLastOccurrence(formats strfmt.Registry) error { - if swag.IsZero(m.LastOccurrence) { // not required - return nil - } - - if m.LastOccurrence != nil { - if err := m.LastOccurrence.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastOccurrence") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) validateOptionalAttendeesVec(formats strfmt.Registry) error { - if swag.IsZero(m.OptionalAttendeesVec) { // not required - return nil - } - - for i := 0; i < len(m.OptionalAttendeesVec); i++ { - if swag.IsZero(m.OptionalAttendeesVec[i]) { // not required - continue - } - - if m.OptionalAttendeesVec[i] != nil { - if err := m.OptionalAttendeesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("optionalAttendeesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("optionalAttendeesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) validateOrganizer(formats strfmt.Registry) error { - if swag.IsZero(m.Organizer) { // not required - return nil - } - - if m.Organizer != nil { - if err := m.Organizer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("organizer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("organizer") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) validateRequiredAttendeesVec(formats strfmt.Registry) error { - if swag.IsZero(m.RequiredAttendeesVec) { // not required - return nil - } - - for i := 0; i < len(m.RequiredAttendeesVec); i++ { - if swag.IsZero(m.RequiredAttendeesVec[i]) { // not required - continue - } - - if m.RequiredAttendeesVec[i] != nil { - if err := m.RequiredAttendeesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requiredAttendeesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requiredAttendeesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) validateToRecipientVec(formats strfmt.Registry) error { - if swag.IsZero(m.ToRecipientVec) { // not required - return nil - } - - for i := 0; i < len(m.ToRecipientVec); i++ { - if swag.IsZero(m.ToRecipientVec[i]) { // not required - continue - } - - if m.ToRecipientVec[i] != nil { - if err := m.ToRecipientVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("toRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("toRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this item meta data based on the context it is used -func (m *ItemMetaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttachmentVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBccRecipientVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCcRecipientVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFirstOccurrence(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrom(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastOccurrence(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOptionalAttendeesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrganizer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRequiredAttendeesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateToRecipientVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ItemMetaData) contextValidateAttachmentVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttachmentVec); i++ { - - if m.AttachmentVec[i] != nil { - - if swag.IsZero(m.AttachmentVec[i]) { // not required - return nil - } - - if err := m.AttachmentVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attachmentVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attachmentVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) contextValidateBccRecipientVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BccRecipientVec); i++ { - - if m.BccRecipientVec[i] != nil { - - if swag.IsZero(m.BccRecipientVec[i]) { // not required - return nil - } - - if err := m.BccRecipientVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bccRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bccRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) contextValidateCcRecipientVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CcRecipientVec); i++ { - - if m.CcRecipientVec[i] != nil { - - if swag.IsZero(m.CcRecipientVec[i]) { // not required - return nil - } - - if err := m.CcRecipientVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ccRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ccRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) contextValidateFirstOccurrence(ctx context.Context, formats strfmt.Registry) error { - - if m.FirstOccurrence != nil { - - if swag.IsZero(m.FirstOccurrence) { // not required - return nil - } - - if err := m.FirstOccurrence.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstOccurrence") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) contextValidateFrom(ctx context.Context, formats strfmt.Registry) error { - - if m.From != nil { - - if swag.IsZero(m.From) { // not required - return nil - } - - if err := m.From.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("from") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("from") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) contextValidateLastOccurrence(ctx context.Context, formats strfmt.Registry) error { - - if m.LastOccurrence != nil { - - if swag.IsZero(m.LastOccurrence) { // not required - return nil - } - - if err := m.LastOccurrence.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastOccurrence") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastOccurrence") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) contextValidateOptionalAttendeesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OptionalAttendeesVec); i++ { - - if m.OptionalAttendeesVec[i] != nil { - - if swag.IsZero(m.OptionalAttendeesVec[i]) { // not required - return nil - } - - if err := m.OptionalAttendeesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("optionalAttendeesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("optionalAttendeesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) contextValidateOrganizer(ctx context.Context, formats strfmt.Registry) error { - - if m.Organizer != nil { - - if swag.IsZero(m.Organizer) { // not required - return nil - } - - if err := m.Organizer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("organizer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("organizer") - } - return err - } - } - - return nil -} - -func (m *ItemMetaData) contextValidateRequiredAttendeesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RequiredAttendeesVec); i++ { - - if m.RequiredAttendeesVec[i] != nil { - - if swag.IsZero(m.RequiredAttendeesVec[i]) { // not required - return nil - } - - if err := m.RequiredAttendeesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requiredAttendeesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requiredAttendeesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ItemMetaData) contextValidateToRecipientVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ToRecipientVec); i++ { - - if m.ToRecipientVec[i] != nil { - - if swag.IsZero(m.ToRecipientVec[i]) { // not required - return nil - } - - if err := m.ToRecipientVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("toRecipientVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("toRecipientVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ItemMetaData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ItemMetaData) UnmarshalBinary(b []byte) error { - var res ItemMetaData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/item_meta_data_occurrence.go b/v1/models/item_meta_data_occurrence.go deleted file mode 100644 index a8507489..00000000 --- a/v1/models/item_meta_data_occurrence.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" -) - -// ItemMetaDataOccurrence Recurring Calendar item occurence timestamp. -// -// swagger:model ItemMetaData_Occurrence -type ItemMetaDataOccurrence struct { - - // End date-time for the occurrence. - EndTime *int64 `json:"endTime,omitempty"` - - // Start date-time for the occurrence. - StartTime *int64 `json:"startTime,omitempty"` -} - -// Validate validates this item meta data occurrence -func (m *ItemMetaDataOccurrence) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this item meta data occurrence based on context it is used -func (m *ItemMetaDataOccurrence) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ItemMetaDataOccurrence) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ItemMetaDataOccurrence) UnmarshalBinary(b []byte) error { - var res ItemMetaDataOccurrence - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/job_policy_proto.go b/v1/models/job_policy_proto.go deleted file mode 100644 index bc3f0233..00000000 --- a/v1/models/job_policy_proto.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// JobPolicyProto DEPRECATED in 5.0! -// -// A message that specifies the policies to use for a job. -// -// swagger:model JobPolicyProto -type JobPolicyProto struct { - - // Specifies the scheduling and retention policy to use when backing up - // sources. - BackupPolicy *BackupPolicyProto `json:"backupPolicy,omitempty"` - - // Specifies additional policies that can be used to copy snapshots created - // by a backup run to different targets (such as a remote replica, tape etc). - // Each policy also specifies the retention policy that should be applied to - // the copied snapshots at the respective target. - SnapshotTargetPolicyVec []*SnapshotTargetPolicyProto `json:"snapshotTargetPolicyVec"` -} - -// Validate validates this job policy proto -func (m *JobPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTargetPolicyVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *JobPolicyProto) validateBackupPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.BackupPolicy) { // not required - return nil - } - - if m.BackupPolicy != nil { - if err := m.BackupPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *JobPolicyProto) validateSnapshotTargetPolicyVec(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetPolicyVec) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotTargetPolicyVec); i++ { - if swag.IsZero(m.SnapshotTargetPolicyVec[i]) { // not required - continue - } - - if m.SnapshotTargetPolicyVec[i] != nil { - if err := m.SnapshotTargetPolicyVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargetPolicyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargetPolicyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this job policy proto based on the context it is used -func (m *JobPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTargetPolicyVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *JobPolicyProto) contextValidateBackupPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupPolicy != nil { - - if swag.IsZero(m.BackupPolicy) { // not required - return nil - } - - if err := m.BackupPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *JobPolicyProto) contextValidateSnapshotTargetPolicyVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotTargetPolicyVec); i++ { - - if m.SnapshotTargetPolicyVec[i] != nil { - - if swag.IsZero(m.SnapshotTargetPolicyVec[i]) { // not required - return nil - } - - if err := m.SnapshotTargetPolicyVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargetPolicyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargetPolicyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *JobPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *JobPolicyProto) UnmarshalBinary(b []byte) error { - var res JobPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/job_runs_tile.go b/v1/models/job_runs_tile.go deleted file mode 100644 index 28672677..00000000 --- a/v1/models/job_runs_tile.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// JobRunsTile Job Runs Tile. -// -// Jon Runs information. -// -// swagger:model JobRunsTile -type JobRunsTile struct { - - // Number of Error runs in the last 24 hours. - LastDayNumJobErrors *int32 `json:"lastDayNumJobErrors,omitempty"` - - // Number of Job Runs in the last 24 hours. - LastDayNumJobRuns *int32 `json:"lastDayNumJobRuns,omitempty"` - - // Number of SLA Violations in the last 24 hours. - LastDayNumJobSLAViolations *int32 `json:"lastDayNumJobSlaViolations,omitempty"` - - // Number of Jobs currently running. - NumJobRunning *int32 `json:"numJobRunning,omitempty"` - - // Objects Protected By Policy. - ObjectsProtectedByPolicy []*ObjectsProtectedByPolicy `json:"objectsProtectedByPolicy"` -} - -// Validate validates this job runs tile -func (m *JobRunsTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectsProtectedByPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *JobRunsTile) validateObjectsProtectedByPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectsProtectedByPolicy) { // not required - return nil - } - - for i := 0; i < len(m.ObjectsProtectedByPolicy); i++ { - if swag.IsZero(m.ObjectsProtectedByPolicy[i]) { // not required - continue - } - - if m.ObjectsProtectedByPolicy[i] != nil { - if err := m.ObjectsProtectedByPolicy[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtectedByPolicy" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtectedByPolicy" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this job runs tile based on the context it is used -func (m *JobRunsTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectsProtectedByPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *JobRunsTile) contextValidateObjectsProtectedByPolicy(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectsProtectedByPolicy); i++ { - - if m.ObjectsProtectedByPolicy[i] != nil { - - if swag.IsZero(m.ObjectsProtectedByPolicy[i]) { // not required - return nil - } - - if err := m.ObjectsProtectedByPolicy[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtectedByPolicy" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtectedByPolicy" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *JobRunsTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *JobRunsTile) UnmarshalBinary(b []byte) error { - var res JobRunsTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/k8_s_filter_params.go b/v1/models/k8_s_filter_params.go deleted file mode 100644 index dde997ac..00000000 --- a/v1/models/k8_s_filter_params.go +++ /dev/null @@ -1,198 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// K8SFilterParams Message defining the different criteria to filter objects, such as -// persistent volumes from backup for include or exclude. This is used to -// specify both object-level (BackupSourceParams) and job-level -// (EnvBackupParams) in/exclusion criteria. If a criterion is specified at -// both object-level and job-level, then job-level setting will be ignored. -// -// swagger:model K8SFilterParams -type K8SFilterParams struct { - - // List of entities included in filter. This contains the list of entities - // corresponding to entity IDs in 'object_id_vec' and the list of entities - // under the union of intersection of labels specified by 'label_vec_vec'. - // This will be populated during backup run. - EntityVec []*Entity `json:"entityVec"` - - // Array of Arrays of Label Ids that Specify Persistent Volumes (PV) and - // Persistent Volume Claims (PVC) to include in filter. The outer array - // represents a union operation (i.e.: match any label rule), while the inner - // array represents an intersection operation (i.e.: match all label rules). - // See iris/apiSpecs/v2/common/adapters/kubernetes/jobs.yaml:filterLabelIds - // for full description. - LabelVecVec []*K8SFilterParamsLabelVec `json:"labelVecVec"` - - // IDs of objects to be included in filter. - ObjectIDVec []int64 `json:"objectIdVec"` -} - -// Validate validates this k8 s filter params -func (m *K8SFilterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelVecVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *K8SFilterParams) validateEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.EntityVec) { // not required - return nil - } - - for i := 0; i < len(m.EntityVec); i++ { - if swag.IsZero(m.EntityVec[i]) { // not required - continue - } - - if m.EntityVec[i] != nil { - if err := m.EntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *K8SFilterParams) validateLabelVecVec(formats strfmt.Registry) error { - if swag.IsZero(m.LabelVecVec) { // not required - return nil - } - - for i := 0; i < len(m.LabelVecVec); i++ { - if swag.IsZero(m.LabelVecVec[i]) { // not required - continue - } - - if m.LabelVecVec[i] != nil { - if err := m.LabelVecVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVecVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVecVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this k8 s filter params based on the context it is used -func (m *K8SFilterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabelVecVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *K8SFilterParams) contextValidateEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityVec); i++ { - - if m.EntityVec[i] != nil { - - if swag.IsZero(m.EntityVec[i]) { // not required - return nil - } - - if err := m.EntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *K8SFilterParams) contextValidateLabelVecVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelVecVec); i++ { - - if m.LabelVecVec[i] != nil { - - if swag.IsZero(m.LabelVecVec[i]) { // not required - return nil - } - - if err := m.LabelVecVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVecVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVecVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *K8SFilterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *K8SFilterParams) UnmarshalBinary(b []byte) error { - var res K8SFilterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/k8_s_filter_params_label_vec.go b/v1/models/k8_s_filter_params_label_vec.go deleted file mode 100644 index d4aee4d7..00000000 --- a/v1/models/k8_s_filter_params_label_vec.go +++ /dev/null @@ -1,56 +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" -) - -// K8SFilterParamsLabelVec Represents a list of all Label entity IDs that need to be present to -// create a positive match for the candidate volume to include. -// -// swagger:model K8SFilterParams_LabelVec -type K8SFilterParamsLabelVec struct { - - // Represents a list of all Labels (string 'key:value') that need to be - // present to create a positive match for the candidate volume to include. - LabelStrVec []string `json:"labelStrVec"` - - // Represents a list of all Labels that need to be present to - // create a positive match for the candidate volume to include. - LabelVec []int64 `json:"labelVec"` -} - -// Validate validates this k8 s filter params label vec -func (m *K8SFilterParamsLabelVec) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this k8 s filter params label vec based on context it is used -func (m *K8SFilterParamsLabelVec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *K8SFilterParamsLabelVec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *K8SFilterParamsLabelVec) UnmarshalBinary(b []byte) error { - var res K8SFilterParamsLabelVec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/k_m_s_status_response.go b/v1/models/k_m_s_status_response.go deleted file mode 100644 index 6d51f4f7..00000000 --- a/v1/models/k_m_s_status_response.go +++ /dev/null @@ -1,51 +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" -) - -// KMSStatusResponse Specifies the response of the KMS server. -// -// swagger:model KMSStatusResponse -type KMSStatusResponse struct { - - // Specifies the status of the kms server. - // If true, indicates KMS sever is reachable. - Status *bool `json:"status,omitempty"` -} - -// Validate validates this k m s status response -func (m *KMSStatusResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this k m s status response based on context it is used -func (m *KMSStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KMSStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KMSStatusResponse) UnmarshalBinary(b []byte) error { - var res KMSStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/key_value_pair.go b/v1/models/key_value_pair.go deleted file mode 100644 index 45c6ac44..00000000 --- a/v1/models/key_value_pair.go +++ /dev/null @@ -1,114 +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" -) - -// KeyValuePair Key Value Pair. -// -// Specifies a key/value pair. -// -// swagger:model KeyValuePair -type KeyValuePair struct { - - // Specifies the name of the key. - Key *string `json:"key,omitempty"` - - // Specifies a value for the key. - Value *Value `json:"value,omitempty"` -} - -// Validate validates this key value pair -func (m *KeyValuePair) 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 -} - -func (m *KeyValuePair) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this key value pair based on the context it is used -func (m *KeyValuePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyValuePair) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeyValuePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyValuePair) UnmarshalBinary(b []byte) error { - var res KeyValuePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/key_value_str_pair.go b/v1/models/key_value_str_pair.go deleted file mode 100644 index 734a495b..00000000 --- a/v1/models/key_value_str_pair.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" -) - -// KeyValueStrPair Generic structure to hold a string key value pair. -// -// swagger:model KeyValueStrPair -type KeyValueStrPair struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this key value str pair -func (m *KeyValueStrPair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this key value str pair based on context it is used -func (m *KeyValueStrPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KeyValueStrPair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyValueStrPair) UnmarshalBinary(b []byte) error { - var res KeyValueStrPair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/key_vault_params.go b/v1/models/key_vault_params.go deleted file mode 100644 index 239dd685..00000000 --- a/v1/models/key_vault_params.go +++ /dev/null @@ -1,119 +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" -) - -// KeyVaultParams KeyVaultParams required to connect to the azure key vault. -// -// swagger:model KeyVaultParams -type KeyVaultParams struct { - - // Specifies the Azure credentials. - AzureCredentials *AzureKmsCredentials `json:"azureCredentials,omitempty"` - - // Specifies the name of client secret stored in cohesity keyvault. - // This is used only for customer managed keys. - CustomerSecretName *string `json:"customerSecretName,omitempty"` - - // Specifies the Key name used to encrypt and decrypt DEK. - KeyName *string `json:"keyName,omitempty"` - - // Specifies the URL of the Azure key vault. - KeyvaultURL *string `json:"keyvaultUrl,omitempty"` -} - -// Validate validates this key vault params -func (m *KeyVaultParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyVaultParams) validateAzureCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if m.AzureCredentials != nil { - if err := m.AzureCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this key vault params based on the context it is used -func (m *KeyVaultParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAzureCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyVaultParams) contextValidateAzureCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureCredentials != nil { - - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if err := m.AzureCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeyVaultParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyVaultParams) UnmarshalBinary(b []byte) error { - var res KeyVaultParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/keyspace_info.go b/v1/models/keyspace_info.go deleted file mode 100644 index 814831b6..00000000 --- a/v1/models/keyspace_info.go +++ /dev/null @@ -1,126 +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" -) - -// KeyspaceInfo TODO(nirav): Remove this while rebasing. -// -// Proto that contains specific information about a cassandra keyspace. -// -// swagger:model KeyspaceInfo -type KeyspaceInfo struct { - - // Count of tables in this keyspace. - ChildrenCount *uint32 `json:"childrenCount,omitempty"` - - // If the replication strategy is set as kNetwork, then - // dc_list will have a list of data centers to which the - // keyspace is being replicated to. - DcList []string `json:"dcList"` - - // Additional information associated with a graph type keyspace. - // Valid if keyspace type is kGraph - GraphInfo *GraphKeyspaceInfo `json:"graphInfo,omitempty"` - - // Type of the keyspace - KeyspaceType *int32 `json:"keyspaceType,omitempty"` - - // Replication stragegy for the keyspace. - ReplicationStrategy *int32 `json:"replicationStrategy,omitempty"` -} - -// Validate validates this keyspace info -func (m *KeyspaceInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGraphInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyspaceInfo) validateGraphInfo(formats strfmt.Registry) error { - if swag.IsZero(m.GraphInfo) { // not required - return nil - } - - if m.GraphInfo != nil { - if err := m.GraphInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("graphInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("graphInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this keyspace info based on the context it is used -func (m *KeyspaceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGraphInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyspaceInfo) contextValidateGraphInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.GraphInfo != nil { - - if swag.IsZero(m.GraphInfo) { // not required - return nil - } - - if err := m.GraphInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("graphInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("graphInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeyspaceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyspaceInfo) UnmarshalBinary(b []byte) error { - var res KeyspaceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/keystone_acl_proto.go b/v1/models/keystone_acl_proto.go deleted file mode 100644 index 1429a8a5..00000000 --- a/v1/models/keystone_acl_proto.go +++ /dev/null @@ -1,162 +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" -) - -// KeystoneACLProto Protobuf that describes the Keystone access control list (ACL) permissions -// for a swift container. -// Note: Keystone ACL is applicable for only keystone authenticated users. -// -// swagger:model KeystoneACLProto -type KeystoneACLProto struct { - - // Grantees with read permission. - ReadGrantees *KeystoneACLProtoGrantees `json:"readGrantees,omitempty"` - - // Grantees with write permission. - WriteGrantees *KeystoneACLProtoGrantees `json:"writeGrantees,omitempty"` -} - -// Validate validates this keystone ACL proto -func (m *KeystoneACLProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReadGrantees(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWriteGrantees(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneACLProto) validateReadGrantees(formats strfmt.Registry) error { - if swag.IsZero(m.ReadGrantees) { // not required - return nil - } - - if m.ReadGrantees != nil { - if err := m.ReadGrantees.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readGrantees") - } - return err - } - } - - return nil -} - -func (m *KeystoneACLProto) validateWriteGrantees(formats strfmt.Registry) error { - if swag.IsZero(m.WriteGrantees) { // not required - return nil - } - - if m.WriteGrantees != nil { - if err := m.WriteGrantees.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeGrantees") - } - return err - } - } - - return nil -} - -// ContextValidate validate this keystone ACL proto based on the context it is used -func (m *KeystoneACLProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReadGrantees(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWriteGrantees(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneACLProto) contextValidateReadGrantees(ctx context.Context, formats strfmt.Registry) error { - - if m.ReadGrantees != nil { - - if swag.IsZero(m.ReadGrantees) { // not required - return nil - } - - if err := m.ReadGrantees.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readGrantees") - } - return err - } - } - - return nil -} - -func (m *KeystoneACLProto) contextValidateWriteGrantees(ctx context.Context, formats strfmt.Registry) error { - - if m.WriteGrantees != nil { - - if swag.IsZero(m.WriteGrantees) { // not required - return nil - } - - if err := m.WriteGrantees.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeGrantees") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeGrantees") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneACLProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneACLProto) UnmarshalBinary(b []byte) error { - var res KeystoneACLProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/keystone_acl_proto_grantees.go b/v1/models/keystone_acl_proto_grantees.go deleted file mode 100644 index def6889b..00000000 --- a/v1/models/keystone_acl_proto_grantees.go +++ /dev/null @@ -1,137 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// KeystoneACLProtoGrantees keystone ACL proto grantees -// -// swagger:model KeystoneACLProto_Grantees -type KeystoneACLProtoGrantees struct { - - // This field indicates if all users are granted ACL permission. - AllUsers *bool `json:"allUsers,omitempty"` - - // This field holds a list of Keystone project ids whose users are granted - // ACL permission. - ProjectIDVec []string `json:"projectIdVec"` - - // project users map - ProjectUsersMap []*KeystoneACLProtoGranteesProjectUsersMapEntry `json:"projectUsersMap"` - - // This field holds a list of Keystone roles for which any Keystone user - // with one (or more) of the roles on the project containing the swift - // container holding this KeystoneACLProto is granted ACL permission. - RoleNameVec []string `json:"roleNameVec"` - - // This field holds a list of keystone user ids who are granted ACL - // permission. - UserIDVec []string `json:"userIdVec"` -} - -// Validate validates this keystone ACL proto grantees -func (m *KeystoneACLProtoGrantees) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProjectUsersMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneACLProtoGrantees) validateProjectUsersMap(formats strfmt.Registry) error { - if swag.IsZero(m.ProjectUsersMap) { // not required - return nil - } - - for i := 0; i < len(m.ProjectUsersMap); i++ { - if swag.IsZero(m.ProjectUsersMap[i]) { // not required - continue - } - - if m.ProjectUsersMap[i] != nil { - if err := m.ProjectUsersMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectUsersMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectUsersMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this keystone ACL proto grantees based on the context it is used -func (m *KeystoneACLProtoGrantees) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProjectUsersMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneACLProtoGrantees) contextValidateProjectUsersMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProjectUsersMap); i++ { - - if m.ProjectUsersMap[i] != nil { - - if swag.IsZero(m.ProjectUsersMap[i]) { // not required - return nil - } - - if err := m.ProjectUsersMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectUsersMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectUsersMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneACLProtoGrantees) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneACLProtoGrantees) UnmarshalBinary(b []byte) error { - var res KeystoneACLProtoGrantees - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/keystone_acl_proto_grantees_project_users.go b/v1/models/keystone_acl_proto_grantees_project_users.go deleted file mode 100644 index 8f7eed73..00000000 --- a/v1/models/keystone_acl_proto_grantees_project_users.go +++ /dev/null @@ -1,50 +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" -) - -// KeystoneACLProtoGranteesProjectUsers keystone ACL proto grantees project users -// -// swagger:model KeystoneACLProto_Grantees_ProjectUsers -type KeystoneACLProtoGranteesProjectUsers struct { - - // user Id vec - UserIDVec []string `json:"userIdVec"` -} - -// Validate validates this keystone ACL proto grantees project users -func (m *KeystoneACLProtoGranteesProjectUsers) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this keystone ACL proto grantees project users based on context it is used -func (m *KeystoneACLProtoGranteesProjectUsers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneACLProtoGranteesProjectUsers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneACLProtoGranteesProjectUsers) UnmarshalBinary(b []byte) error { - var res KeystoneACLProtoGranteesProjectUsers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/keystone_acl_proto_grantees_project_users_map_entry.go b/v1/models/keystone_acl_proto_grantees_project_users_map_entry.go deleted file mode 100644 index b2801072..00000000 --- a/v1/models/keystone_acl_proto_grantees_project_users_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// KeystoneACLProtoGranteesProjectUsersMapEntry keystone ACL proto grantees project users map entry -// -// swagger:model KeystoneACLProto_Grantees_ProjectUsersMapEntry -type KeystoneACLProtoGranteesProjectUsersMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *KeystoneACLProtoGranteesProjectUsers `json:"value,omitempty"` -} - -// Validate validates this keystone ACL proto grantees project users map entry -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) 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 -} - -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this keystone ACL proto grantees project users map entry based on the context it is used -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneACLProtoGranteesProjectUsersMapEntry) UnmarshalBinary(b []byte) error { - var res KeystoneACLProtoGranteesProjectUsersMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kill_map_reduce_instance_result.go b/v1/models/kill_map_reduce_instance_result.go deleted file mode 100644 index cef5d0d4..00000000 --- a/v1/models/kill_map_reduce_instance_result.go +++ /dev/null @@ -1,109 +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" -) - -// KillMapReduceInstanceResult kill map reduce instance result -// -// swagger:model KillMapReduceInstanceResult -type KillMapReduceInstanceResult struct { - - // Status code of http rpc. - Error *ErrorProto `json:"error,omitempty"` -} - -// Validate validates this kill map reduce instance result -func (m *KillMapReduceInstanceResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KillMapReduceInstanceResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this kill map reduce instance result based on the context it is used -func (m *KillMapReduceInstanceResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KillMapReduceInstanceResult) 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 -} - -// MarshalBinary interface implementation -func (m *KillMapReduceInstanceResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KillMapReduceInstanceResult) UnmarshalBinary(b []byte) error { - var res KillMapReduceInstanceResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kms_configuration_response.go b/v1/models/kms_configuration_response.go deleted file mode 100644 index a9b24ef4..00000000 --- a/v1/models/kms_configuration_response.go +++ /dev/null @@ -1,355 +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" -) - -// KmsConfigurationResponse Get KMS Configuration Response Parameters. -// -// Specifies response parameters to a KMS request. -// -// swagger:model KmsConfigurationResponse -type KmsConfigurationResponse struct { - - // AWS KMS conifg response. - AwsKms *AwsKmsConfiguration `json:"awsKms,omitempty"` - - // Azure KMS conifg response. - AzureKms *AzureKmsConfiguration `json:"azureKms,omitempty"` - - // Specifies if connection to this KMS exists. - ConnectionStatus *bool `json:"connectionStatus,omitempty"` - - // Specifies the config response for cryptsoftKMS. - CryptsoftKms *CryptsoftKmsConfigResponse `json:"cryptsoftKms,omitempty"` - - // The Id of a KMS server. - ID *int64 `json:"id,omitempty"` - - // Specifies name of the key. - KeyName *string `json:"keyName,omitempty"` - - // Specifies the consumption model for the KMS Key. - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies the state of the Kms Server. - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["kDontRemove","kMarkedForRemoval","kOkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // Specifies the name given to the KMS Server. - ServerName *string `json:"serverName,omitempty"` - - // Specifies the type of key mangement system. - // 'kInternalKms' indicates an internal KMS object. - // 'kAwsKms' indicates an Aws KMS object. - // 'kCryptsoftKms' indicates a Cryptsoft KMS object. - // Enum: ["kInternalKms","kAwsKms","kCryptsoftKms"] - ServerType *string `json:"serverType,omitempty"` - - // Specifies the usage type of the kms config. kArchival indicates - // this is used for regular archival. kRpaasArchival indicates this - // is used for RPaaS only. - UsageType *int32 `json:"usageType,omitempty"` - - // Specifies the list of Vault Ids. - VaultIDList []int64 `json:"vaultIdList"` - - // Specifies the list of View Box Ids. - ViewBoxIDList []int64 `json:"viewBoxIdList"` -} - -// Validate validates this kms configuration response -func (m *KmsConfigurationResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCryptsoftKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationResponse) validateAwsKms(formats strfmt.Registry) error { - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if m.AwsKms != nil { - if err := m.AwsKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponse) validateAzureKms(formats strfmt.Registry) error { - if swag.IsZero(m.AzureKms) { // not required - return nil - } - - if m.AzureKms != nil { - if err := m.AzureKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureKms") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponse) validateCryptsoftKms(formats strfmt.Registry) error { - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if m.CryptsoftKms != nil { - if err := m.CryptsoftKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -var kmsConfigurationResponseTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDontRemove","kMarkedForRemoval","kOkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationResponseTypeRemovalStatePropEnum = append(kmsConfigurationResponseTypeRemovalStatePropEnum, v) - } -} - -const ( - - // KmsConfigurationResponseRemovalStateKDontRemove captures enum value "kDontRemove" - KmsConfigurationResponseRemovalStateKDontRemove string = "kDontRemove" - - // KmsConfigurationResponseRemovalStateKMarkedForRemoval captures enum value "kMarkedForRemoval" - KmsConfigurationResponseRemovalStateKMarkedForRemoval string = "kMarkedForRemoval" - - // KmsConfigurationResponseRemovalStateKOkToRemove captures enum value "kOkToRemove" - KmsConfigurationResponseRemovalStateKOkToRemove string = "kOkToRemove" -) - -// prop value enum -func (m *KmsConfigurationResponse) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationResponseTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationResponse) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -var kmsConfigurationResponseTypeServerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInternalKms","kAwsKms","kCryptsoftKms"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationResponseTypeServerTypePropEnum = append(kmsConfigurationResponseTypeServerTypePropEnum, v) - } -} - -const ( - - // KmsConfigurationResponseServerTypeKInternalKms captures enum value "kInternalKms" - KmsConfigurationResponseServerTypeKInternalKms string = "kInternalKms" - - // KmsConfigurationResponseServerTypeKAwsKms captures enum value "kAwsKms" - KmsConfigurationResponseServerTypeKAwsKms string = "kAwsKms" - - // KmsConfigurationResponseServerTypeKCryptsoftKms captures enum value "kCryptsoftKms" - KmsConfigurationResponseServerTypeKCryptsoftKms string = "kCryptsoftKms" -) - -// prop value enum -func (m *KmsConfigurationResponse) validateServerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationResponseTypeServerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationResponse) validateServerType(formats strfmt.Registry) error { - if swag.IsZero(m.ServerType) { // not required - return nil - } - - // value enum - if err := m.validateServerTypeEnum("serverType", "body", *m.ServerType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kms configuration response based on the context it is used -func (m *KmsConfigurationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKms(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureKms(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCryptsoftKms(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationResponse) contextValidateAwsKms(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKms != nil { - - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if err := m.AwsKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponse) contextValidateAzureKms(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureKms != nil { - - if swag.IsZero(m.AzureKms) { // not required - return nil - } - - if err := m.AzureKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureKms") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponse) contextValidateCryptsoftKms(ctx context.Context, formats strfmt.Registry) error { - - if m.CryptsoftKms != nil { - - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if err := m.CryptsoftKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurationResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurationResponse) UnmarshalBinary(b []byte) error { - var res KmsConfigurationResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kms_create_request_parameters.go b/v1/models/kms_create_request_parameters.go deleted file mode 100644 index 82c9e4ba..00000000 --- a/v1/models/kms_create_request_parameters.go +++ /dev/null @@ -1,394 +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" -) - -// KmsCreateRequestParameters Request to create a KMS with specified configuration. -// -// swagger:model KmsCreateRequestParameters -type KmsCreateRequestParameters struct { - - // AWS KMS conifg. - AwsKms *AwsKmsConfiguration `json:"awsKms,omitempty"` - - // Azure KMS config. - AzureKms *AzureKmsConfiguration `json:"azureKms,omitempty"` - - // Cryptsoft KMS config. - CryptsoftKms *CryptsoftKmsConfiguration `json:"cryptsoftKms,omitempty"` - - // The Id of a KMS server. - ID *int64 `json:"id,omitempty"` - - // Specifies name of the key. - KeyName *string `json:"keyName,omitempty"` - - // Specifies the consumption model for the KMS Key. - // 'Local' indicates an internal KMS object. - // 'FortKnox' indicates an FortKnox KMS object. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies the name given to the KMS Server. - ServerName *string `json:"serverName,omitempty"` - - // Specifies the type of key mangement system. - // 'kInternalKMS' indicates an internal KMS object. - // 'kAwsKMS' indicates an Aws KMS object. - // 'kCryptsoftKMS' indicates a Cryptsoft KMS object. - // 'kAzureKMS' indicates a Azure KMS object. - // Enum: ["kInternalKMS","kAwsKMS","kCryptsoftKMS","kAzureKMS"] - ServerType *string `json:"serverType,omitempty"` - - // Specifies the usage type of the kms config. kArchival indicates - // this is used for regular archival. kRpaasArchival indicates this - // is used for RPaaS only. - // 'kArchival' indicates an internal KMS object. - // 'kRpaasArchival' indicates an Aws KMS object. - // Enum: ["kArchival","kRpaasArchival"] - UsageType *string `json:"usageType,omitempty"` - - // Specifies the list of Vault Ids. - VaultIDList []int64 `json:"vaultIdList"` - - // Specifies the list of View Box Ids. - ViewBoxIDList []int64 `json:"viewBoxIdList"` -} - -// Validate validates this kms create request parameters -func (m *KmsCreateRequestParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCryptsoftKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsageType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsCreateRequestParameters) validateAwsKms(formats strfmt.Registry) error { - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if m.AwsKms != nil { - if err := m.AwsKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsCreateRequestParameters) validateAzureKms(formats strfmt.Registry) error { - if swag.IsZero(m.AzureKms) { // not required - return nil - } - - if m.AzureKms != nil { - if err := m.AzureKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureKms") - } - return err - } - } - - return nil -} - -func (m *KmsCreateRequestParameters) validateCryptsoftKms(formats strfmt.Registry) error { - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if m.CryptsoftKms != nil { - if err := m.CryptsoftKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -var kmsCreateRequestParametersTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsCreateRequestParametersTypeOwnershipContextPropEnum = append(kmsCreateRequestParametersTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // KmsCreateRequestParametersOwnershipContextLocal captures enum value "Local" - KmsCreateRequestParametersOwnershipContextLocal string = "Local" - - // KmsCreateRequestParametersOwnershipContextFortKnox captures enum value "FortKnox" - KmsCreateRequestParametersOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *KmsCreateRequestParameters) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsCreateRequestParametersTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsCreateRequestParameters) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -var kmsCreateRequestParametersTypeServerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInternalKMS","kAwsKMS","kCryptsoftKMS","kAzureKMS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsCreateRequestParametersTypeServerTypePropEnum = append(kmsCreateRequestParametersTypeServerTypePropEnum, v) - } -} - -const ( - - // KmsCreateRequestParametersServerTypeKInternalKMS captures enum value "kInternalKMS" - KmsCreateRequestParametersServerTypeKInternalKMS string = "kInternalKMS" - - // KmsCreateRequestParametersServerTypeKAwsKMS captures enum value "kAwsKMS" - KmsCreateRequestParametersServerTypeKAwsKMS string = "kAwsKMS" - - // KmsCreateRequestParametersServerTypeKCryptsoftKMS captures enum value "kCryptsoftKMS" - KmsCreateRequestParametersServerTypeKCryptsoftKMS string = "kCryptsoftKMS" - - // KmsCreateRequestParametersServerTypeKAzureKMS captures enum value "kAzureKMS" - KmsCreateRequestParametersServerTypeKAzureKMS string = "kAzureKMS" -) - -// prop value enum -func (m *KmsCreateRequestParameters) validateServerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsCreateRequestParametersTypeServerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsCreateRequestParameters) validateServerType(formats strfmt.Registry) error { - if swag.IsZero(m.ServerType) { // not required - return nil - } - - // value enum - if err := m.validateServerTypeEnum("serverType", "body", *m.ServerType); err != nil { - return err - } - - return nil -} - -var kmsCreateRequestParametersTypeUsageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kArchival","kRpaasArchival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsCreateRequestParametersTypeUsageTypePropEnum = append(kmsCreateRequestParametersTypeUsageTypePropEnum, v) - } -} - -const ( - - // KmsCreateRequestParametersUsageTypeKArchival captures enum value "kArchival" - KmsCreateRequestParametersUsageTypeKArchival string = "kArchival" - - // KmsCreateRequestParametersUsageTypeKRpaasArchival captures enum value "kRpaasArchival" - KmsCreateRequestParametersUsageTypeKRpaasArchival string = "kRpaasArchival" -) - -// prop value enum -func (m *KmsCreateRequestParameters) validateUsageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsCreateRequestParametersTypeUsageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsCreateRequestParameters) validateUsageType(formats strfmt.Registry) error { - if swag.IsZero(m.UsageType) { // not required - return nil - } - - // value enum - if err := m.validateUsageTypeEnum("usageType", "body", *m.UsageType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kms create request parameters based on the context it is used -func (m *KmsCreateRequestParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKms(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureKms(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCryptsoftKms(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsCreateRequestParameters) contextValidateAwsKms(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKms != nil { - - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if err := m.AwsKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsCreateRequestParameters) contextValidateAzureKms(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureKms != nil { - - if swag.IsZero(m.AzureKms) { // not required - return nil - } - - if err := m.AzureKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureKms") - } - return err - } - } - - return nil -} - -func (m *KmsCreateRequestParameters) contextValidateCryptsoftKms(ctx context.Context, formats strfmt.Registry) error { - - if m.CryptsoftKms != nil { - - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if err := m.CryptsoftKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsCreateRequestParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsCreateRequestParameters) UnmarshalBinary(b []byte) error { - var res KmsCreateRequestParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kms_delete_params.go b/v1/models/kms_delete_params.go deleted file mode 100644 index 3db3dcc4..00000000 --- a/v1/models/kms_delete_params.go +++ /dev/null @@ -1,72 +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" -) - -// KmsDeleteParams Params to delete a KMS with specified server name. -// -// swagger:model KmsDeleteParams -type KmsDeleteParams struct { - - // Specifies a unique id of the KMS config. - // in: path - // Required: true - ID *int64 `json:"id"` -} - -// Validate validates this kms delete params -func (m *KmsDeleteParams) 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 *KmsDeleteParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this kms delete params based on context it is used -func (m *KmsDeleteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KmsDeleteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsDeleteParams) UnmarshalBinary(b []byte) error { - var res KmsDeleteParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kms_key_info.go b/v1/models/kms_key_info.go deleted file mode 100644 index 201cd6d0..00000000 --- a/v1/models/kms_key_info.go +++ /dev/null @@ -1,56 +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" -) - -// KmsKeyInfo Message representing information related to kms key. -// -// swagger:model KmsKeyInfo -type KmsKeyInfo struct { - - // The kms key alias. - Alias *string `json:"alias,omitempty"` - - // The kms key arn. - Arn *string `json:"arn,omitempty"` - - // Whether the kms key is enabled or not. - Enabled *bool `json:"enabled,omitempty"` -} - -// Validate validates this kms key info -func (m *KmsKeyInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this kms key info based on context it is used -func (m *KmsKeyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KmsKeyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsKeyInfo) UnmarshalBinary(b []byte) error { - var res KmsKeyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kms_update_request_parameters.go b/v1/models/kms_update_request_parameters.go deleted file mode 100644 index f00d2810..00000000 --- a/v1/models/kms_update_request_parameters.go +++ /dev/null @@ -1,175 +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" -) - -// KmsUpdateRequestParameters Request to create a KMS with specified configuration. -// -// swagger:model KmsUpdateRequestParameters -type KmsUpdateRequestParameters struct { - - // AWS KMS conifg response. - AwsKms *AwsKmsUpdateParams `json:"awsKms,omitempty"` - - // Specifies the config response for cryptsoftKMS. - CryptsoftKms *CryptsoftKmsUpdateParams `json:"cryptsoftKms,omitempty"` - - // The Id of a KMS server. - ID *int64 `json:"id,omitempty"` - - // Specifies name of the key. - KeyName *string `json:"keyName,omitempty"` - - // Specifies the name given to the KMS Server. - ServerName *string `json:"serverName,omitempty"` - - // Specifies the list of Vault Ids. - VaultIDList []int64 `json:"vaultIdList"` - - // Specifies the list of View Box Ids. - ViewBoxIDList []int64 `json:"viewBoxIdList"` -} - -// Validate validates this kms update request parameters -func (m *KmsUpdateRequestParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsKms(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCryptsoftKms(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsUpdateRequestParameters) validateAwsKms(formats strfmt.Registry) error { - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if m.AwsKms != nil { - if err := m.AwsKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsUpdateRequestParameters) validateCryptsoftKms(formats strfmt.Registry) error { - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if m.CryptsoftKms != nil { - if err := m.CryptsoftKms.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kms update request parameters based on the context it is used -func (m *KmsUpdateRequestParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKms(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCryptsoftKms(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsUpdateRequestParameters) contextValidateAwsKms(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKms != nil { - - if swag.IsZero(m.AwsKms) { // not required - return nil - } - - if err := m.AwsKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKms") - } - return err - } - } - - return nil -} - -func (m *KmsUpdateRequestParameters) contextValidateCryptsoftKms(ctx context.Context, formats strfmt.Registry) error { - - if m.CryptsoftKms != nil { - - if swag.IsZero(m.CryptsoftKms) { // not required - return nil - } - - if err := m.CryptsoftKms.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cryptsoftKms") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cryptsoftKms") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsUpdateRequestParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsUpdateRequestParameters) UnmarshalBinary(b []byte) error { - var res KmsUpdateRequestParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_backup_params.go b/v1/models/kubernetes_backup_params.go deleted file mode 100644 index 12255e61..00000000 --- a/v1/models/kubernetes_backup_params.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// KubernetesBackupParams This message contains additional params for Kubernetes backups. -// -// swagger:model KubernetesBackupParams -type KubernetesBackupParams struct { - - // Cluster software version. - ClusterSoftwareVersion *string `json:"clusterSoftwareVersion,omitempty"` - - // Indicates the kubernetes service type to use. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // Container image used to mounting PVCs in temp pods. - InitContainerImage *string `json:"initContainerImage,omitempty"` - - // This indicates if magneto_kubernetes_enable_protection_using_datamover - // is true and the flag is enabled in the feature enabler. - IsProtectionUsingDatamoverEnabled *bool `json:"isProtectionUsingDatamoverEnabled,omitempty"` - - // Indicates if volume inclusion/exclusion feature is enabled in the feature - // enabler. - IsVolumeExclusionEnabled *bool `json:"isVolumeExclusionEnabled,omitempty"` - - // Managment namespace is used to create all the backup jobs. This namespace - // is the umbrella for all backup operations. We backup applications in their - // respective namespace. - ManagementNamespace *string `json:"managementNamespace,omitempty"` - - // S3 account ID of the user using which backup S3 buckets will be created. - S3AccountID *string `json:"s3AccountId,omitempty"` - - // Indicates whether to use annotated volume snapshot class while taking - // volume snapshot. - UseAnnotatedVsc *bool `json:"useAnnotatedVsc,omitempty"` - - // Indicates the VLAN information to use for backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this kubernetes backup params -func (m *KubernetesBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesBackupParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes backup params based on the context it is used -func (m *KubernetesBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesBackupParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesBackupParams) UnmarshalBinary(b []byte) error { - var res KubernetesBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_backup_source_params.go b/v1/models/kubernetes_backup_source_params.go deleted file mode 100644 index f1447833..00000000 --- a/v1/models/kubernetes_backup_source_params.go +++ /dev/null @@ -1,166 +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" -) - -// KubernetesBackupSourceParams Kubernetes Backup Source Parameters. -// -// Message to capture additional backup params for a Kubernetes type source. -// -// swagger:model KubernetesBackupSourceParams -type KubernetesBackupSourceParams struct { - - // Info about PVC(s) to be excluded from the from the backup job for - // the source. When set, this will override KubernetesEnvParams label based - // PVC filter. - ExcludeParams *K8SFilterParams `json:"excludeParams,omitempty"` - - // Info about PVC(s) to be included from the from the backup job for - // the source. When set, this will override KubernetesEnvParams label based - // PVC filter. - IncludeParams *K8SFilterParams `json:"includeParams,omitempty"` -} - -// Validate validates this kubernetes backup source params -func (m *KubernetesBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesBackupSourceParams) validateExcludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if m.ExcludeParams != nil { - if err := m.ExcludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesBackupSourceParams) validateIncludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if m.IncludeParams != nil { - if err := m.IncludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes backup source params based on the context it is used -func (m *KubernetesBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExcludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesBackupSourceParams) contextValidateExcludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExcludeParams != nil { - - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if err := m.ExcludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesBackupSourceParams) contextValidateIncludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IncludeParams != nil { - - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if err := m.IncludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesBackupSourceParams) UnmarshalBinary(b []byte) error { - var res KubernetesBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_credentials.go b/v1/models/kubernetes_credentials.go deleted file mode 100644 index 04a4c35c..00000000 --- a/v1/models/kubernetes_credentials.go +++ /dev/null @@ -1,52 +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" -) - -// KubernetesCredentials Kubernetes Credentials. -// -// Specifies the credentials to authenticate with a Kubernetes Cluster. -// -// swagger:model KubernetesCredentials -type KubernetesCredentials struct { - - // Specifies Client private associated with the service account. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` -} - -// Validate validates this kubernetes credentials -func (m *KubernetesCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this kubernetes credentials based on context it is used -func (m *KubernetesCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesCredentials) UnmarshalBinary(b []byte) error { - var res KubernetesCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_env_params.go b/v1/models/kubernetes_env_params.go deleted file mode 100644 index faa7ff63..00000000 --- a/v1/models/kubernetes_env_params.go +++ /dev/null @@ -1,219 +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" -) - -// KubernetesEnvParams Message defining the job-level params in Kubernetes backup. -// -// swagger:model KubernetesEnvParams -type KubernetesEnvParams struct { - - // If specified, any objects matching the filter params will be excluded from - // backup, even those that are explicitly specified by include_params. - ExcludeParams *K8SFilterParams `json:"excludeParams,omitempty"` - - // If not specified, all objects, including volumes, will be included by - // default, except those filtered by exclude_params. Otherwise, only the - // below objects (volumes) will be included by default, except those filtered - // by exclude_params. - IncludeParams *K8SFilterParams `json:"includeParams,omitempty"` - - // If specified, the backup job will use CSI snapshot for backups. - LeverageCsiSnapshot *bool `json:"leverageCsiSnapshot,omitempty"` - - // Indicates the vlan preference that is selected by the user for doing - // backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this kubernetes env params -func (m *KubernetesEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesEnvParams) validateExcludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if m.ExcludeParams != nil { - if err := m.ExcludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesEnvParams) validateIncludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if m.IncludeParams != nil { - if err := m.IncludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesEnvParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes env params based on the context it is used -func (m *KubernetesEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExcludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesEnvParams) contextValidateExcludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExcludeParams != nil { - - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if err := m.ExcludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesEnvParams) contextValidateIncludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IncludeParams != nil { - - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if err := m.IncludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesEnvParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesEnvParams) UnmarshalBinary(b []byte) error { - var res KubernetesEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_label_attribute.go b/v1/models/kubernetes_label_attribute.go deleted file mode 100644 index fb89e1be..00000000 --- a/v1/models/kubernetes_label_attribute.go +++ /dev/null @@ -1,59 +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" -) - -// KubernetesLabelAttribute Kubernetes Label Attributes. -// -// Specifies a Kubernetes label. -// -// swagger:model KubernetesLabelAttribute -type KubernetesLabelAttribute struct { - - // Specifies the Cohesity id of the K8s label. - ID *int64 `json:"id,omitempty"` - - // Specifies the appended key and value of the K8s label. - Name *string `json:"name,omitempty"` - - // Specifies Kubernetes Unique Identifier (UUID) of the - // K8s label. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this kubernetes label attribute -func (m *KubernetesLabelAttribute) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this kubernetes label attribute based on context it is used -func (m *KubernetesLabelAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesLabelAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesLabelAttribute) UnmarshalBinary(b []byte) error { - var res KubernetesLabelAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_params.go b/v1/models/kubernetes_params.go deleted file mode 100644 index 252c88df..00000000 --- a/v1/models/kubernetes_params.go +++ /dev/null @@ -1,327 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesParams Register Application Servers Parameters. -// -// Specifies the parameters required to register Application Servers -// running in a Protection Source. -// -// swagger:model KubernetesParams -type KubernetesParams struct { - - // Specifies the location of Datamover image in private registry. - DatamoverImageLocation *string `json:"datamoverImageLocation,omitempty"` - - // Specifies Type of service to be deployed for communication with DataMover - // pods. Currently, LoadBalancer and NodePort are supported. - // [default = kNodePort]. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // Specifies the default VLAN parameters to be used for performing the - // backup/restore of this entity. - DefaultVlanParams *VlanParameters `json:"defaultVlanParams,omitempty"` - - // Specifies the location of the image for init containers. - InitContainerImageLocation *string `json:"initContainerImageLocation,omitempty"` - - // Specifies the distribution if the environment is kKubernetes. - // overrideDescription: true - // Enum: ["kMainline","kOpenshift","kRancher","kEKS","kGKE","kAKS","kVMwareTanzu"] - KubernetesDistribution *string `json:"kubernetesDistribution,omitempty"` - - // Specifies annotations to be put on services for IP allocation. Applicable - // only when service is of type LoadBalancer. - ServiceAnnotations []*VlanInfoServiceAnnotationsEntry `json:"serviceAnnotations"` - - // Specifies the location of Velero AWS plugin image in private registry. - VeleroAwsPluginImageLocation *string `json:"veleroAwsPluginImageLocation,omitempty"` - - // Specifies the location of Velero image in private registry. - VeleroImageLocation *string `json:"veleroImageLocation,omitempty"` - - // Specifies the location of the image for openshift plugin container. - VeleroOpenshiftPluginImageLocation *string `json:"veleroOpenshiftPluginImageLocation,omitempty"` - - // Specifies VLAN information provided during registration. - VlanInfoVec []*KubernetesVlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this kubernetes params -func (m *KubernetesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesDistribution(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesParams) validateDefaultVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if m.DefaultVlanParams != nil { - if err := m.DefaultVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -var kubernetesParamsTypeKubernetesDistributionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMainline","kOpenshift","kRancher","kEKS","kGKE","kAKS","kVMwareTanzu"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kubernetesParamsTypeKubernetesDistributionPropEnum = append(kubernetesParamsTypeKubernetesDistributionPropEnum, v) - } -} - -const ( - - // KubernetesParamsKubernetesDistributionKMainline captures enum value "kMainline" - KubernetesParamsKubernetesDistributionKMainline string = "kMainline" - - // KubernetesParamsKubernetesDistributionKOpenshift captures enum value "kOpenshift" - KubernetesParamsKubernetesDistributionKOpenshift string = "kOpenshift" - - // KubernetesParamsKubernetesDistributionKRancher captures enum value "kRancher" - KubernetesParamsKubernetesDistributionKRancher string = "kRancher" - - // KubernetesParamsKubernetesDistributionKEKS captures enum value "kEKS" - KubernetesParamsKubernetesDistributionKEKS string = "kEKS" - - // KubernetesParamsKubernetesDistributionKGKE captures enum value "kGKE" - KubernetesParamsKubernetesDistributionKGKE string = "kGKE" - - // KubernetesParamsKubernetesDistributionKAKS captures enum value "kAKS" - KubernetesParamsKubernetesDistributionKAKS string = "kAKS" - - // KubernetesParamsKubernetesDistributionKVMwareTanzu captures enum value "kVMwareTanzu" - KubernetesParamsKubernetesDistributionKVMwareTanzu string = "kVMwareTanzu" -) - -// prop value enum -func (m *KubernetesParams) validateKubernetesDistributionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kubernetesParamsTypeKubernetesDistributionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KubernetesParams) validateKubernetesDistribution(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesDistribution) { // not required - return nil - } - - // value enum - if err := m.validateKubernetesDistributionEnum("kubernetesDistribution", "body", *m.KubernetesDistribution); err != nil { - return err - } - - return nil -} - -func (m *KubernetesParams) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesParams) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this kubernetes params based on the context it is used -func (m *KubernetesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesParams) contextValidateDefaultVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultVlanParams != nil { - - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if err := m.DefaultVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesParams) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesParams) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesParams) UnmarshalBinary(b []byte) error { - var res KubernetesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_protection_source.go b/v1/models/kubernetes_protection_source.go deleted file mode 100644 index bb53f5fc..00000000 --- a/v1/models/kubernetes_protection_source.go +++ /dev/null @@ -1,462 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesProtectionSource Kubernetes Protection Source. -// -// Specifies a Protection Source in Kubernetes environment. -// -// swagger:model KubernetesProtectionSource -type KubernetesProtectionSource struct { - - // Specifies the location of Datamover image in private registry. - DatamoverImageLocation *string `json:"datamoverImageLocation,omitempty"` - - // Specifies Type of service to be deployed for communication with DataMover - // pods. Currently, LoadBalancer and NodePort are supported. - // [default = kNodePort]. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // Specifies if the deployed Datamover image needs to be upgraded - // for this kubernetes entity - DatamoverUpgradability *int32 `json:"datamoverUpgradability,omitempty"` - - // Specifies the default VLAN parameters to be used for performing the - // backup/restore of this entity. - DefaultVlanParams *VlanParameters `json:"defaultVlanParams,omitempty"` - - // Specifies an optional description of the object. - Description *string `json:"description,omitempty"` - - // Specifies the type of the entity in a Kubernetes environment. - // Determines the K8s distribution. - // Enum: ["kMainline","kOpenshift","kRancher","kEKS","kGKE","kAKS","kVMwareTanzu"] - Distribution *string `json:"distribution,omitempty"` - - // Specifies the location of the image for init containers. - InitContainerImageLocation *string `json:"initContainerImageLocation,omitempty"` - - // Specifies the list of label attributes of this source. - LabelAttributes []*KubernetesLabelAttribute `json:"labelAttributes"` - - // Specifies a unique name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies annotations to be put on services for IP allocation. Applicable - // only when service is of type LoadBalancer. - ServiceAnnotations []*VlanInfoServiceAnnotationsEntry `json:"serviceAnnotations"` - - // Specifies the type of the entity in a Kubernetes environment. - // Specifies the type of a Kubernetes Protection Source. - // 'kCluster' indicates a Kubernetes Cluster. - // 'kNamespace' indicates a namespace in a Kubernetes Cluster. - // 'kService' indicates a service running on a Kubernetes Cluster. - // Enum: ["kCluster","kNamespace","kService"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID of the object. - UUID *string `json:"uuid,omitempty"` - - // Specifies the location of Velero AWS plugin image in private registry. - VeleroAwsPluginImageLocation *string `json:"veleroAwsPluginImageLocation,omitempty"` - - // Specifies the location of Velero image in private registry. - VeleroImageLocation *string `json:"veleroImageLocation,omitempty"` - - // Specifies the location of the image for openshift plugin container. - VeleroOpenshiftPluginImageLocation *string `json:"veleroOpenshiftPluginImageLocation,omitempty"` - - // Specifies if the deployed Velero image needs to be upgraded - // for this kubernetes entity. - VeleroUpgradability *int32 `json:"veleroUpgradability,omitempty"` - - // Specifies VLAN information provided during registration. - VlanInfoVec []*KubernetesVlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this kubernetes protection source -func (m *KubernetesProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDistribution(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionSource) validateDefaultVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if m.DefaultVlanParams != nil { - if err := m.DefaultVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -var kubernetesProtectionSourceTypeDistributionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMainline","kOpenshift","kRancher","kEKS","kGKE","kAKS","kVMwareTanzu"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kubernetesProtectionSourceTypeDistributionPropEnum = append(kubernetesProtectionSourceTypeDistributionPropEnum, v) - } -} - -const ( - - // KubernetesProtectionSourceDistributionKMainline captures enum value "kMainline" - KubernetesProtectionSourceDistributionKMainline string = "kMainline" - - // KubernetesProtectionSourceDistributionKOpenshift captures enum value "kOpenshift" - KubernetesProtectionSourceDistributionKOpenshift string = "kOpenshift" - - // KubernetesProtectionSourceDistributionKRancher captures enum value "kRancher" - KubernetesProtectionSourceDistributionKRancher string = "kRancher" - - // KubernetesProtectionSourceDistributionKEKS captures enum value "kEKS" - KubernetesProtectionSourceDistributionKEKS string = "kEKS" - - // KubernetesProtectionSourceDistributionKGKE captures enum value "kGKE" - KubernetesProtectionSourceDistributionKGKE string = "kGKE" - - // KubernetesProtectionSourceDistributionKAKS captures enum value "kAKS" - KubernetesProtectionSourceDistributionKAKS string = "kAKS" - - // KubernetesProtectionSourceDistributionKVMwareTanzu captures enum value "kVMwareTanzu" - KubernetesProtectionSourceDistributionKVMwareTanzu string = "kVMwareTanzu" -) - -// prop value enum -func (m *KubernetesProtectionSource) validateDistributionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kubernetesProtectionSourceTypeDistributionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KubernetesProtectionSource) validateDistribution(formats strfmt.Registry) error { - if swag.IsZero(m.Distribution) { // not required - return nil - } - - // value enum - if err := m.validateDistributionEnum("distribution", "body", *m.Distribution); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionSource) validateLabelAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.LabelAttributes) { // not required - return nil - } - - for i := 0; i < len(m.LabelAttributes); i++ { - if swag.IsZero(m.LabelAttributes[i]) { // not required - continue - } - - if m.LabelAttributes[i] != nil { - if err := m.LabelAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionSource) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var kubernetesProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kNamespace","kService"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kubernetesProtectionSourceTypeTypePropEnum = append(kubernetesProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // KubernetesProtectionSourceTypeKCluster captures enum value "kCluster" - KubernetesProtectionSourceTypeKCluster string = "kCluster" - - // KubernetesProtectionSourceTypeKNamespace captures enum value "kNamespace" - KubernetesProtectionSourceTypeKNamespace string = "kNamespace" - - // KubernetesProtectionSourceTypeKService captures enum value "kService" - KubernetesProtectionSourceTypeKService string = "kService" -) - -// prop value enum -func (m *KubernetesProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kubernetesProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KubernetesProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionSource) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this kubernetes protection source based on the context it is used -func (m *KubernetesProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabelAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionSource) contextValidateDefaultVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultVlanParams != nil { - - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if err := m.DefaultVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesProtectionSource) contextValidateLabelAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelAttributes); i++ { - - if m.LabelAttributes[i] != nil { - - if swag.IsZero(m.LabelAttributes[i]) { // not required - return nil - } - - if err := m.LabelAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionSource) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionSource) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesProtectionSource) UnmarshalBinary(b []byte) error { - var res KubernetesProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_restore_parameters.go b/v1/models/kubernetes_restore_parameters.go deleted file mode 100644 index 480fc5c6..00000000 --- a/v1/models/kubernetes_restore_parameters.go +++ /dev/null @@ -1,61 +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" -) - -// KubernetesRestoreParameters Kubernetes Restore Parameters. -// -// Specifies the information required for recovering kubernetes entities. -// -// swagger:model KubernetesRestoreParameters -type KubernetesRestoreParameters struct { - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this kubernetes restore parameters -func (m *KubernetesRestoreParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this kubernetes restore parameters based on context it is used -func (m *KubernetesRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesRestoreParameters) UnmarshalBinary(b []byte) error { - var res KubernetesRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kubernetes_vlan_info.go b/v1/models/kubernetes_vlan_info.go deleted file mode 100644 index ef064d13..00000000 --- a/v1/models/kubernetes_vlan_info.go +++ /dev/null @@ -1,175 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// KubernetesVlanInfo Vlan information for Kubernetes protection source. -// -// Specifies a Protection Source in Kubernetes environment. -// -// swagger:model KubernetesVlanInfo -type KubernetesVlanInfo struct { - - // Specifies annotations to be put on services for IP allocation. Applicable - // only when service is of type LoadBalancer. - ServiceAnnotations []*VlanInfoServiceAnnotationsEntry `json:"serviceAnnotations"` - - // Specifies selected VLAN parameters to be used - VlanParams *VlanParameters `json:"vlanParams,omitempty"` -} - -// Validate validates this kubernetes vlan info -func (m *KubernetesVlanInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesVlanInfo) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesVlanInfo) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes vlan info based on the context it is used -func (m *KubernetesVlanInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesVlanInfo) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesVlanInfo) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesVlanInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesVlanInfo) UnmarshalBinary(b []byte) error { - var res KubernetesVlanInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/kvm_protection_source.go b/v1/models/kvm_protection_source.go deleted file mode 100644 index 6162d84d..00000000 --- a/v1/models/kvm_protection_source.go +++ /dev/null @@ -1,165 +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" -) - -// KvmProtectionSource KVM Protection Source. -// -// Specifies a Protection Source in KVM environment. -// -// swagger:model KvmProtectionSource -type KvmProtectionSource struct { - - // Specifies a message when the agent cannot be reached. - AgentError *string `json:"agentError,omitempty"` - - // Specifies the ID of the Agent with which this KVM entity is associated - // when the entity represents a Delegate host or KVM host. - AgentID *int64 `json:"agentId,omitempty"` - - // Specifies the cluster ID for 'kCluster' objects. - ClusterID *string `json:"clusterId,omitempty"` - - // Specifies the ID of the 'kDatacenter' objects. - DatacenterID *string `json:"datacenterId,omitempty"` - - // Specifies a description about the Protection Source. - Description *string `json:"description,omitempty"` - - // Specifies the name of the KVM entity. - Name *string `json:"name,omitempty"` - - // Specifies the network ID to which Vnic is attached. - NetworkID *string `json:"networkId,omitempty"` - - // Specifies the type of KVM Protection Source entities such as - // 'kDatacenter', 'kCluster', 'kVirtualMachine', etc. - // Specifies the type of an KVM source entity. - // 'kOVirtManager' indicates the root entity registered with Cohesity cluster. - // 'kStandaloneHost' indicates a host registered with Cohesity cluster. - // 'kDatacenter' indicates a KVM datacenter managed by the OVirt manager. - // 'kCluster' indicates a KVM cluster managed by the OVirt manager. - // 'kHost' indicates a host within the KVM environment. - // 'kVirtualMachine' indicates a virtual machine in the KVM enironment. - // 'kNetwork' represents a network used by the virtual machine entity. - // 'kStorageDomain' represents a storage domain in the KVM environment. - // 'kVNicProfile' represents a VNic profile. - // Enum: ["kOVirtManager","kStandaloneHost","kDatacenter","kCluster","kHost","kVirtualMachine","kNetwork","kStorageDomain","kVNicProfile"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID of the Object. This is unique within the KVM - // environment. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this kvm protection source -func (m *KvmProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var kvmProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOVirtManager","kStandaloneHost","kDatacenter","kCluster","kHost","kVirtualMachine","kNetwork","kStorageDomain","kVNicProfile"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kvmProtectionSourceTypeTypePropEnum = append(kvmProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // KvmProtectionSourceTypeKOVirtManager captures enum value "kOVirtManager" - KvmProtectionSourceTypeKOVirtManager string = "kOVirtManager" - - // KvmProtectionSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - KvmProtectionSourceTypeKStandaloneHost string = "kStandaloneHost" - - // KvmProtectionSourceTypeKDatacenter captures enum value "kDatacenter" - KvmProtectionSourceTypeKDatacenter string = "kDatacenter" - - // KvmProtectionSourceTypeKCluster captures enum value "kCluster" - KvmProtectionSourceTypeKCluster string = "kCluster" - - // KvmProtectionSourceTypeKHost captures enum value "kHost" - KvmProtectionSourceTypeKHost string = "kHost" - - // KvmProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - KvmProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // KvmProtectionSourceTypeKNetwork captures enum value "kNetwork" - KvmProtectionSourceTypeKNetwork string = "kNetwork" - - // KvmProtectionSourceTypeKStorageDomain captures enum value "kStorageDomain" - KvmProtectionSourceTypeKStorageDomain string = "kStorageDomain" - - // KvmProtectionSourceTypeKVNicProfile captures enum value "kVNicProfile" - KvmProtectionSourceTypeKVNicProfile string = "kVNicProfile" -) - -// prop value enum -func (m *KvmProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kvmProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KvmProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this kvm protection source based on context it is used -func (m *KvmProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KvmProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KvmProtectionSource) UnmarshalBinary(b []byte) error { - var res KvmProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/label_attributes_info.go b/v1/models/label_attributes_info.go deleted file mode 100644 index abfa283d..00000000 --- a/v1/models/label_attributes_info.go +++ /dev/null @@ -1,56 +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" -) - -// LabelAttributesInfo This message encapsulates information about a label entity. -// -// swagger:model LabelAttributesInfo -type LabelAttributesInfo struct { - - // Entity ID of the label entity in EH. - EntityID *int64 `json:"entityId,omitempty"` - - // Name of the label entity. - Name *string `json:"name,omitempty"` - - // UUID of the label entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this label attributes info -func (m *LabelAttributesInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this label attributes info based on context it is used -func (m *LabelAttributesInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LabelAttributesInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LabelAttributesInfo) UnmarshalBinary(b []byte) error { - var res LabelAttributesInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/label_selector.go b/v1/models/label_selector.go deleted file mode 100644 index bef7a0fe..00000000 --- a/v1/models/label_selector.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LabelSelector label selector -// -// swagger:model LabelSelector -type LabelSelector struct { - - // This field is an object which consists of key-value pairs - // of all labels that must be matched by the selector - MatchLabels []*LabelSelectorMatchLabelsEntry `json:"matchLabels"` - - // Select all objects which have a label with - // key : "name" and value specified by this field. - Name *string `json:"name,omitempty"` - - // Select all objects which have a label with. - // key: "serviceName" and value as specified by this field. - ServiceName *string `json:"serviceName,omitempty"` -} - -// Validate validates this label selector -func (m *LabelSelector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMatchLabels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LabelSelector) validateMatchLabels(formats strfmt.Registry) error { - if swag.IsZero(m.MatchLabels) { // not required - return nil - } - - for i := 0; i < len(m.MatchLabels); i++ { - if swag.IsZero(m.MatchLabels[i]) { // not required - continue - } - - if m.MatchLabels[i] != nil { - if err := m.MatchLabels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchLabels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchLabels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this label selector based on the context it is used -func (m *LabelSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMatchLabels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LabelSelector) contextValidateMatchLabels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MatchLabels); i++ { - - if m.MatchLabels[i] != nil { - - if swag.IsZero(m.MatchLabels[i]) { // not required - return nil - } - - if err := m.MatchLabels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchLabels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchLabels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LabelSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LabelSelector) UnmarshalBinary(b []byte) error { - var res LabelSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/label_selector_match_labels_entry.go b/v1/models/label_selector_match_labels_entry.go deleted file mode 100644 index 54e77baf..00000000 --- a/v1/models/label_selector_match_labels_entry.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" -) - -// LabelSelectorMatchLabelsEntry label selector match labels entry -// -// swagger:model LabelSelector_MatchLabelsEntry -type LabelSelectorMatchLabelsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this label selector match labels entry -func (m *LabelSelectorMatchLabelsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this label selector match labels entry based on context it is used -func (m *LabelSelectorMatchLabelsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LabelSelectorMatchLabelsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LabelSelectorMatchLabelsEntry) UnmarshalBinary(b []byte) error { - var res LabelSelectorMatchLabelsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/last_protection_run_stats.go b/v1/models/last_protection_run_stats.go deleted file mode 100644 index b0e260cc..00000000 --- a/v1/models/last_protection_run_stats.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LastProtectionRunStats Last Protection Run stats. -// -// Specifies the stats of last Protection Run. -// -// swagger:model LastProtectionRunStats -type LastProtectionRunStats struct { - - // Specifies the number of objects that were failed in the last Run across all Protection Jobs. - NumObjectsFailed *int64 `json:"numObjectsFailed,omitempty"` - - // Specifies the number of Protection Jobs for which specified Protection Run failed. - NumRunsFailed *int64 `json:"numRunsFailed,omitempty"` - - // Specifies the number of Protection Jobs for which specified Protection Run failed SLA. - NumRunsFailedSLA *int64 `json:"numRunsFailedSla,omitempty"` - - // Specifies the number of Protection Jobs for which specified Protection Run met SLA. - NumRunsMetSLA *int64 `json:"numRunsMetSla,omitempty"` - - // Specifies the last Protection Run stats by environment. - StatsByEnv []*LastProtectionRunStatsByEnv `json:"statsByEnv"` -} - -// Validate validates this last protection run stats -func (m *LastProtectionRunStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsByEnv(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LastProtectionRunStats) validateStatsByEnv(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnv) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnv); i++ { - if swag.IsZero(m.StatsByEnv[i]) { // not required - continue - } - - if m.StatsByEnv[i] != nil { - if err := m.StatsByEnv[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this last protection run stats based on the context it is used -func (m *LastProtectionRunStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsByEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LastProtectionRunStats) contextValidateStatsByEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnv); i++ { - - if m.StatsByEnv[i] != nil { - - if swag.IsZero(m.StatsByEnv[i]) { // not required - return nil - } - - if err := m.StatsByEnv[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LastProtectionRunStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LastProtectionRunStats) UnmarshalBinary(b []byte) error { - var res LastProtectionRunStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/last_protection_run_stats_by_env.go b/v1/models/last_protection_run_stats_by_env.go deleted file mode 100644 index 72af2b04..00000000 --- a/v1/models/last_protection_run_stats_by_env.go +++ /dev/null @@ -1,206 +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" -) - -// LastProtectionRunStatsByEnv Last Protection Run stats by env. -// -// Specifies the last Protection Run stats by env. -// -// swagger:model LastProtectionRunStatsByEnv -type LastProtectionRunStatsByEnv struct { - - // Specifies the environment. - // Enum: ["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"] - Environment *string `json:"environment,omitempty"` - - // Specifies the count of objects that failed last Protection Run. - NumObjectsFailed *int64 `json:"numObjectsFailed,omitempty"` - - // Specifies the count of objects that failed sla in the last Run. - NumObjectsFailedSLA *int64 `json:"numObjectsFailedSla,omitempty"` - - // Specifies the count of objects that met sla in the last Run. - NumObjectsMetSLA *int64 `json:"numObjectsMetSla,omitempty"` -} - -// Validate validates this last protection run stats by env -func (m *LastProtectionRunStatsByEnv) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var lastProtectionRunStatsByEnvTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - lastProtectionRunStatsByEnvTypeEnvironmentPropEnum = append(lastProtectionRunStatsByEnvTypeEnvironmentPropEnum, v) - } -} - -const ( - - // LastProtectionRunStatsByEnvEnvironmentKVMware captures enum value "kVMware" - LastProtectionRunStatsByEnvEnvironmentKVMware string = "kVMware" - - // LastProtectionRunStatsByEnvEnvironmentKHyperV captures enum value "kHyperV" - LastProtectionRunStatsByEnvEnvironmentKHyperV string = "kHyperV" - - // LastProtectionRunStatsByEnvEnvironmentKSQL captures enum value "kSQL" - LastProtectionRunStatsByEnvEnvironmentKSQL string = "kSQL" - - // LastProtectionRunStatsByEnvEnvironmentKView captures enum value "kView" - LastProtectionRunStatsByEnvEnvironmentKView string = "kView" - - // LastProtectionRunStatsByEnvEnvironmentKPuppeteer captures enum value "kPuppeteer" - LastProtectionRunStatsByEnvEnvironmentKPuppeteer string = "kPuppeteer" - - // LastProtectionRunStatsByEnvEnvironmentKPhysical captures enum value "kPhysical" - LastProtectionRunStatsByEnvEnvironmentKPhysical string = "kPhysical" - - // LastProtectionRunStatsByEnvEnvironmentKPure captures enum value "kPure" - LastProtectionRunStatsByEnvEnvironmentKPure string = "kPure" - - // LastProtectionRunStatsByEnvEnvironmentKNimble captures enum value "kNimble" - LastProtectionRunStatsByEnvEnvironmentKNimble string = "kNimble" - - // LastProtectionRunStatsByEnvEnvironmentKAzure captures enum value "kAzure" - LastProtectionRunStatsByEnvEnvironmentKAzure string = "kAzure" - - // LastProtectionRunStatsByEnvEnvironmentKNetapp captures enum value "kNetapp" - LastProtectionRunStatsByEnvEnvironmentKNetapp string = "kNetapp" - - // LastProtectionRunStatsByEnvEnvironmentKAgent captures enum value "kAgent" - LastProtectionRunStatsByEnvEnvironmentKAgent string = "kAgent" - - // LastProtectionRunStatsByEnvEnvironmentKGenericNas captures enum value "kGenericNas" - LastProtectionRunStatsByEnvEnvironmentKGenericNas string = "kGenericNas" - - // LastProtectionRunStatsByEnvEnvironmentKAcropolis captures enum value "kAcropolis" - LastProtectionRunStatsByEnvEnvironmentKAcropolis string = "kAcropolis" - - // LastProtectionRunStatsByEnvEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - LastProtectionRunStatsByEnvEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // LastProtectionRunStatsByEnvEnvironmentKIsilon captures enum value "kIsilon" - LastProtectionRunStatsByEnvEnvironmentKIsilon string = "kIsilon" - - // LastProtectionRunStatsByEnvEnvironmentKGPFS captures enum value "kGPFS" - LastProtectionRunStatsByEnvEnvironmentKGPFS string = "kGPFS" - - // LastProtectionRunStatsByEnvEnvironmentKKVM captures enum value "kKVM" - LastProtectionRunStatsByEnvEnvironmentKKVM string = "kKVM" - - // LastProtectionRunStatsByEnvEnvironmentKAWS captures enum value "kAWS" - LastProtectionRunStatsByEnvEnvironmentKAWS string = "kAWS" - - // LastProtectionRunStatsByEnvEnvironmentKExchange captures enum value "kExchange" - LastProtectionRunStatsByEnvEnvironmentKExchange string = "kExchange" - - // LastProtectionRunStatsByEnvEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - LastProtectionRunStatsByEnvEnvironmentKHyperVVSS string = "kHyperVVSS" - - // LastProtectionRunStatsByEnvEnvironmentKOracle captures enum value "kOracle" - LastProtectionRunStatsByEnvEnvironmentKOracle string = "kOracle" - - // LastProtectionRunStatsByEnvEnvironmentKGCP captures enum value "kGCP" - LastProtectionRunStatsByEnvEnvironmentKGCP string = "kGCP" - - // LastProtectionRunStatsByEnvEnvironmentKFlashBlade captures enum value "kFlashBlade" - LastProtectionRunStatsByEnvEnvironmentKFlashBlade string = "kFlashBlade" - - // LastProtectionRunStatsByEnvEnvironmentKAWSNative captures enum value "kAWSNative" - LastProtectionRunStatsByEnvEnvironmentKAWSNative string = "kAWSNative" - - // LastProtectionRunStatsByEnvEnvironmentKVCD captures enum value "kVCD" - LastProtectionRunStatsByEnvEnvironmentKVCD string = "kVCD" - - // LastProtectionRunStatsByEnvEnvironmentKO365 captures enum value "kO365" - LastProtectionRunStatsByEnvEnvironmentKO365 string = "kO365" - - // LastProtectionRunStatsByEnvEnvironmentKO365Outlook captures enum value "kO365Outlook" - LastProtectionRunStatsByEnvEnvironmentKO365Outlook string = "kO365Outlook" - - // LastProtectionRunStatsByEnvEnvironmentKHyperFlex captures enum value "kHyperFlex" - LastProtectionRunStatsByEnvEnvironmentKHyperFlex string = "kHyperFlex" - - // LastProtectionRunStatsByEnvEnvironmentKGCPNative captures enum value "kGCPNative" - LastProtectionRunStatsByEnvEnvironmentKGCPNative string = "kGCPNative" - - // LastProtectionRunStatsByEnvEnvironmentKAzureNative captures enum value "kAzureNative" - LastProtectionRunStatsByEnvEnvironmentKAzureNative string = "kAzureNative" - - // LastProtectionRunStatsByEnvEnvironmentKAD captures enum value "kAD" - LastProtectionRunStatsByEnvEnvironmentKAD string = "kAD" - - // LastProtectionRunStatsByEnvEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - LastProtectionRunStatsByEnvEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" -) - -// prop value enum -func (m *LastProtectionRunStatsByEnv) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, lastProtectionRunStatsByEnvTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LastProtectionRunStatsByEnv) 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 validates this last protection run stats by env based on context it is used -func (m *LastProtectionRunStatsByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LastProtectionRunStatsByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LastProtectionRunStatsByEnv) UnmarshalBinary(b []byte) error { - var res LastProtectionRunStatsByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/last_protection_run_summary.go b/v1/models/last_protection_run_summary.go deleted file mode 100644 index 384f7d4c..00000000 --- a/v1/models/last_protection_run_summary.go +++ /dev/null @@ -1,77 +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" -) - -// LastProtectionRunSummary LastProtectionRunsSummary is the summary of the last Protection Run for the -// Protection Jobs using the Specified Protection Policy. -// -// swagger:model LastProtectionRunSummary -type LastProtectionRunSummary struct { - - // Specifies the number of cancelled Protection Runs the given - // Protection Policy has in the Last Run. - NumberOfCancelledProtectionRuns *int64 `json:"numberOfCancelledProtectionRuns,omitempty"` - - // Specifies the number of failed Protection Runs the given - // Protection Policy has in the Last Run. - NumberOfFailedProtectionRuns *int64 `json:"numberOfFailedProtectionRuns,omitempty"` - - // Specifies the number of Protection Sources protected by the given - // Protection Policy. - NumberOfProtectedSources *int64 `json:"numberOfProtectedSources,omitempty"` - - // Specifies the number of running Protection Runs using the current - // Protection Policy. - NumberOfRunningProtectionRuns *int64 `json:"numberOfRunningProtectionRuns,omitempty"` - - // Specifies the number of SLA violations the given - // Protection Policy has in the Last Run.. - NumberOfSLAViolations *int64 `json:"numberOfSlaViolations,omitempty"` - - // Specifies the number of successful Protection Runs the given - // Protection Policy has in the Last Run. - NumberOfSuccessfulProtectionRuns *int64 `json:"numberOfSuccessfulProtectionRuns,omitempty"` - - // Specifies the aggregated total logical backup performed in all the - // Latest Protection Runs made for all the Protection Jobs which have the - // given Protection Policy Specified. - TotalLogicalBackupSizeInBytes *int64 `json:"totalLogicalBackupSizeInBytes,omitempty"` -} - -// Validate validates this last protection run summary -func (m *LastProtectionRunSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this last protection run summary based on context it is used -func (m *LastProtectionRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LastProtectionRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LastProtectionRunSummary) UnmarshalBinary(b []byte) error { - var res LastProtectionRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/latency_thresholds.go b/v1/models/latency_thresholds.go deleted file mode 100644 index 7465dc2a..00000000 --- a/v1/models/latency_thresholds.go +++ /dev/null @@ -1,58 +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" -) - -// LatencyThresholds Latency Thresholds. -// -// Specifies latency thresholds that trigger throttling for all datastores -// found in the registered Protection Source or specific to one datastore. -// -// swagger:model LatencyThresholds -type LatencyThresholds struct { - - // If the latency of a datastore is above this value, existing backup tasks - // using the datastore are throttled. - ActiveTaskMsecs *int64 `json:"activeTaskMsecs,omitempty"` - - // If the latency of a datastore is above this value, then new backup tasks - // using the datastore will not be started. - NewTaskMsecs *int64 `json:"newTaskMsecs,omitempty"` -} - -// Validate validates this latency thresholds -func (m *LatencyThresholds) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this latency thresholds based on context it is used -func (m *LatencyThresholds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LatencyThresholds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LatencyThresholds) UnmarshalBinary(b []byte) error { - var res LatencyThresholds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/latest_protection_job_run_info.go b/v1/models/latest_protection_job_run_info.go deleted file mode 100644 index 3b56f15d..00000000 --- a/v1/models/latest_protection_job_run_info.go +++ /dev/null @@ -1,117 +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" -) - -// LatestProtectionJobRunInfo Latest Protection Job Run Information. -// -// Specifies the information about the Protection Runs per snapshot target. -// -// swagger:model LatestProtectionJobRunInfo -type LatestProtectionJobRunInfo struct { - - // Specifies the information about the latest successful snapshot infomation. - LatestSnapshotInfo *LatestProtectionRun `json:"latestSnapshotInfo,omitempty"` - - // Specifies the name of location that the object is backedup to. - LocationName *string `json:"locationName,omitempty"` - - // Specifies of number of successful snapshots. - NumSnapshots *int64 `json:"numSnapshots,omitempty"` -} - -// Validate validates this latest protection job run info -func (m *LatestProtectionJobRunInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLatestSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LatestProtectionJobRunInfo) validateLatestSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LatestSnapshotInfo) { // not required - return nil - } - - if m.LatestSnapshotInfo != nil { - if err := m.LatestSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestSnapshotInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this latest protection job run info based on the context it is used -func (m *LatestProtectionJobRunInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLatestSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LatestProtectionJobRunInfo) contextValidateLatestSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LatestSnapshotInfo != nil { - - if swag.IsZero(m.LatestSnapshotInfo) { // not required - return nil - } - - if err := m.LatestSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestSnapshotInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LatestProtectionJobRunInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LatestProtectionJobRunInfo) UnmarshalBinary(b []byte) error { - var res LatestProtectionJobRunInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/latest_protection_run.go b/v1/models/latest_protection_run.go deleted file mode 100644 index 77ef3408..00000000 --- a/v1/models/latest_protection_run.go +++ /dev/null @@ -1,235 +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" -) - -// LatestProtectionRun Latest Protection Run. -// -// Specifies the information about the latest Protection Run. -// -// swagger:model LatestProtectionRun -type LatestProtectionRun struct { - - // Specifies information about the latest successful Protection Job Run for - // local and replication snapshots. - BackupRun *SourceBackupStatus `json:"backupRun,omitempty"` - - // Specifies the event id which caused last update on this object. - ChangeEventID *int64 `json:"changeEventId,omitempty"` - - // Specifies information about the latest successful Protection Job Run for - // an archival snapshot. - CopyRun *CopyRun `json:"copyRun,omitempty"` - - // Specifies job run id of the latest successful Protection Job Run. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the universal id of the latest successful Protection Job Run. - ProtectionJobRunUID *RunUID `json:"protectionJobRunUid,omitempty"` - - // Specifies the cluster id in case of local or replication snapshots and - // name of location in case of archival snapshots. - SnapshotTarget *string `json:"snapshotTarget,omitempty"` - - // Specifies the snapshot target type of the latest snapshot. - SnapshotTargetType *int32 `json:"snapshotTargetType,omitempty"` - - // Specifies the task status of the Protection Job Run in the final attempt. - TaskStatus *int32 `json:"taskStatus,omitempty"` - - // Specifies the unique id of the Protection Source for which a snapshot is - // taken. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this latest protection run -func (m *LatestProtectionRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJobRunUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LatestProtectionRun) validateBackupRun(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if m.BackupRun != nil { - if err := m.BackupRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *LatestProtectionRun) validateCopyRun(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRun) { // not required - return nil - } - - if m.CopyRun != nil { - if err := m.CopyRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun") - } - return err - } - } - - return nil -} - -func (m *LatestProtectionRun) validateProtectionJobRunUID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobRunUID) { // not required - return nil - } - - if m.ProtectionJobRunUID != nil { - if err := m.ProtectionJobRunUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobRunUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobRunUid") - } - return err - } - } - - return nil -} - -// ContextValidate validate this latest protection run based on the context it is used -func (m *LatestProtectionRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJobRunUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LatestProtectionRun) contextValidateBackupRun(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupRun != nil { - - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if err := m.BackupRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *LatestProtectionRun) contextValidateCopyRun(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyRun != nil { - - if swag.IsZero(m.CopyRun) { // not required - return nil - } - - if err := m.CopyRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun") - } - return err - } - } - - return nil -} - -func (m *LatestProtectionRun) contextValidateProtectionJobRunUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionJobRunUID != nil { - - if swag.IsZero(m.ProtectionJobRunUID) { // not required - return nil - } - - if err := m.ProtectionJobRunUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobRunUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobRunUid") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LatestProtectionRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LatestProtectionRun) UnmarshalBinary(b []byte) error { - var res LatestProtectionRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/launch_app_instance.go b/v1/models/launch_app_instance.go deleted file mode 100644 index 08b8e490..00000000 --- a/v1/models/launch_app_instance.go +++ /dev/null @@ -1,127 +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" -) - -// LaunchAppInstance Launch App Instance. -// -// Specifies app instance parameters. -// -// swagger:model LaunchAppInstance -type LaunchAppInstance struct { - - // Specifies the app Id. - AppUID *int64 `json:"appUid,omitempty"` - - // Specifies the app version. - AppVersion *int64 `json:"appVersion,omitempty"` - - // Specifies unique identifier generated by the client to let the backend distinguish - // retries of the creation of the app instance. - CreationUID *string `json:"creationUid,omitempty"` - - // Specifies deployment parameters for launch of the application - DeploymentParameters *string `json:"deploymentParameters,omitempty"` - - // Specifies user configured description for the app instance. - Description *string `json:"description,omitempty"` - - // Specifies launch settings. - Settings *AppInstanceSettings `json:"settings,omitempty"` -} - -// Validate validates this launch app instance -func (m *LaunchAppInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LaunchAppInstance) validateSettings(formats strfmt.Registry) error { - if swag.IsZero(m.Settings) { // not required - return nil - } - - if m.Settings != nil { - if err := m.Settings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this launch app instance based on the context it is used -func (m *LaunchAppInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LaunchAppInstance) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.Settings != nil { - - if swag.IsZero(m.Settings) { // not required - return nil - } - - if err := m.Settings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LaunchAppInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LaunchAppInstance) UnmarshalBinary(b []byte) error { - var res LaunchAppInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ldap_provider.go b/v1/models/ldap_provider.go deleted file mode 100644 index bdc88458..00000000 --- a/v1/models/ldap_provider.go +++ /dev/null @@ -1,167 +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" -) - -// LdapProvider LDAP. -// -// Specifies the configuration settings for an LDAP provider. -// -// swagger:model LdapProvider -type LdapProvider struct { - - // Specifies the domain name of an Active Directory which is mapped to this - // LDAP provider - AdDomainName *string `json:"adDomainName,omitempty"` - - // Name of the LDAP attribute used for common name of an object. - AttributeCommonName *string `json:"attributeCommonName,omitempty"` - - // Name of the attribute used to lookup unix GID of an LDAP user. - AttributeGid *string `json:"attributeGid,omitempty"` - - // Name of the LDAP attribute used to lookup members of a group. - AttributeMemberOf *string `json:"attributeMemberOf,omitempty"` - - // Name of the attribute used to lookup unix UID of an LDAP user. - AttributeUID *string `json:"attributeUid,omitempty"` - - // Name of the LDAP attribute used to lookup a user by user ID. - AttributeUserName *string `json:"attributeUserName,omitempty"` - - // Specifies the authentication type used while connecting to LDAP servers. - // Authentication level. - // 'kAnonymous' indicates LDAP authentication type 'Anonymous' - // 'kSimple' indicates LDAP authentication type 'Simple' - // Enum: ["kAnonymous","kSimple"] - AuthType *string `json:"authType,omitempty"` - - // Specifies the base distinguished name used as the base for LDAP - // search requests. - BaseDistinguishedName *string `json:"baseDistinguishedName,omitempty"` - - // Specifies the name of the domain name to be used for querying LDAP servers - // from DNS. If PreferredLdapServerList is set, then DomainName field is - // ignored. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the name of the LDAP provider. - Name *string `json:"name,omitempty"` - - // Name of the LDAP group object class for user accounts. - ObjectClassGroup *string `json:"objectClassGroup,omitempty"` - - // Name of the LDAP user object class for user accounts. - ObjectClassUser *string `json:"objectClassUser,omitempty"` - - // Specifies LDAP server port. - Port *int32 `json:"port,omitempty"` - - // Specifies the preferred LDAP servers. Server names should be either in - // fully qualified domain name (FQDN) format or IP addresses. - PreferredLdapServerList []string `json:"preferredLdapServerList"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether to use SSL for LDAP connections. - UseSsl *bool `json:"useSsl,omitempty"` - - // Specifies the user distinguished name that is used for LDAP authentication. - // It should be provided if the AuthType is set to either kSimple or kSasl. - UserDistinguishedName *string `json:"userDistinguishedName,omitempty"` - - // Specifies the user password that is used for LDAP authentication. - UserPassword *string `json:"userPassword,omitempty"` -} - -// Validate validates this ldap provider -func (m *LdapProvider) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ldapProviderTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAnonymous","kSimple"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ldapProviderTypeAuthTypePropEnum = append(ldapProviderTypeAuthTypePropEnum, v) - } -} - -const ( - - // LdapProviderAuthTypeKAnonymous captures enum value "kAnonymous" - LdapProviderAuthTypeKAnonymous string = "kAnonymous" - - // LdapProviderAuthTypeKSimple captures enum value "kSimple" - LdapProviderAuthTypeKSimple string = "kSimple" -) - -// prop value enum -func (m *LdapProvider) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ldapProviderTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LdapProvider) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ldap provider based on context it is used -func (m *LdapProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LdapProvider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LdapProvider) UnmarshalBinary(b []byte) error { - var res LdapProvider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ldap_provider_response.go b/v1/models/ldap_provider_response.go deleted file mode 100644 index c22138ce..00000000 --- a/v1/models/ldap_provider_response.go +++ /dev/null @@ -1,170 +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" -) - -// LdapProviderResponse LDAP Provider Response. -// -// LDAP provider response struct. -// -// swagger:model LdapProviderResponse -type LdapProviderResponse struct { - - // Specifies the domain name of an Active Directory which is mapped to this - // LDAP provider - AdDomainName *string `json:"adDomainName,omitempty"` - - // Name of the LDAP attribute used for common name of an object. - AttributeCommonName *string `json:"attributeCommonName,omitempty"` - - // Name of the attribute used to lookup unix GID of an LDAP user. - AttributeGid *string `json:"attributeGid,omitempty"` - - // Name of the LDAP attribute used to lookup members of a group. - AttributeMemberOf *string `json:"attributeMemberOf,omitempty"` - - // Name of the attribute used to lookup unix UID of an LDAP user. - AttributeUID *string `json:"attributeUid,omitempty"` - - // Name of the LDAP attribute used to lookup a user by user ID. - AttributeUserName *string `json:"attributeUserName,omitempty"` - - // Specifies the authentication type used while connecting to LDAP servers. - // Authentication level. - // 'kAnonymous' indicates LDAP authentication type 'Anonymous' - // 'kSimple' indicates LDAP authentication type 'Simple' - // Enum: ["kAnonymous","kSimple"] - AuthType *string `json:"authType,omitempty"` - - // Specifies the base distinguished name used as the base for LDAP - // search requests. - BaseDistinguishedName *string `json:"baseDistinguishedName,omitempty"` - - // Specifies the name of the domain name to be used for querying LDAP servers - // from DNS. If PreferredLdapServerList is set, then DomainName field is - // ignored. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the ID of the LDAP provider. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the LDAP provider. - Name *string `json:"name,omitempty"` - - // Name of the LDAP group object class for user accounts. - ObjectClassGroup *string `json:"objectClassGroup,omitempty"` - - // Name of the LDAP user object class for user accounts. - ObjectClassUser *string `json:"objectClassUser,omitempty"` - - // Specifies LDAP server port. - Port *int32 `json:"port,omitempty"` - - // Specifies the preferred LDAP servers. Server names should be either in - // fully qualified domain name (FQDN) format or IP addresses. - PreferredLdapServerList []string `json:"preferredLdapServerList"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether to use SSL for LDAP connections. - UseSsl *bool `json:"useSsl,omitempty"` - - // Specifies the user distinguished name that is used for LDAP authentication. - // It should be provided if the AuthType is set to either kSimple or kSasl. - UserDistinguishedName *string `json:"userDistinguishedName,omitempty"` - - // Specifies the user password that is used for LDAP authentication. - UserPassword *string `json:"userPassword,omitempty"` -} - -// Validate validates this ldap provider response -func (m *LdapProviderResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ldapProviderResponseTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAnonymous","kSimple"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ldapProviderResponseTypeAuthTypePropEnum = append(ldapProviderResponseTypeAuthTypePropEnum, v) - } -} - -const ( - - // LdapProviderResponseAuthTypeKAnonymous captures enum value "kAnonymous" - LdapProviderResponseAuthTypeKAnonymous string = "kAnonymous" - - // LdapProviderResponseAuthTypeKSimple captures enum value "kSimple" - LdapProviderResponseAuthTypeKSimple string = "kSimple" -) - -// prop value enum -func (m *LdapProviderResponse) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ldapProviderResponseTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LdapProviderResponse) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ldap provider response based on context it is used -func (m *LdapProviderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LdapProviderResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LdapProviderResponse) UnmarshalBinary(b []byte) error { - var res LdapProviderResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/legal_holdings.go b/v1/models/legal_holdings.go deleted file mode 100644 index fe280264..00000000 --- a/v1/models/legal_holdings.go +++ /dev/null @@ -1,55 +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" -) - -// LegalHoldings Legal Holdings. -// -// Specifies the legal holding of a Protection Source. -// -// swagger:model LegalHoldings -type LegalHoldings struct { - - // Specifies whether the source is put on legal hold or not. - HoldForLegalPurpose *bool `json:"holdForLegalPurpose,omitempty"` - - // Specifies an Protection Source Id in the snapshot. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` -} - -// Validate validates this legal holdings -func (m *LegalHoldings) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this legal holdings based on context it is used -func (m *LegalHoldings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LegalHoldings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LegalHoldings) UnmarshalBinary(b []byte) error { - var res LegalHoldings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/license_state.go b/v1/models/license_state.go deleted file mode 100644 index fce72676..00000000 --- a/v1/models/license_state.go +++ /dev/null @@ -1,128 +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" -) - -// LicenseState Data definition related to Licensing states. -// Refer: clusterConfigProto.LicenseState -// -// Specifies the state of licensing workflow. -// -// swagger:model LicenseState -type LicenseState struct { - - // Specifies no of failed attempts at claiming the license server - FailedAttempts *int64 `json:"failedAttempts,omitempty"` - - // Specifies the current state of licensing workflow. - // LicenseStateType specifies the licenseState type. - // 'kInProgressNewCluster' indicates licensing server claim is in progress - // for 'New' Cluster. - // 'kInProgressOldCluster' indicates licensing server claim is in progress - // for 'Old' Cluster. - // 'kClaimed' indicates licensing server is claimed. - // 'kSkipped' indicates licensing workflow has been skipped. - // 'kStarted' indicates licensing UI workflow has started. - // Enum: ["kInProgressNewCluster","kInProgressOldCluster","kClaimed","kSkipped","kStarted"] - State *string `json:"state,omitempty"` -} - -// Validate validates this license state -func (m *LicenseState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var licenseStateTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInProgressNewCluster","kInProgressOldCluster","kClaimed","kSkipped","kStarted"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - licenseStateTypeStatePropEnum = append(licenseStateTypeStatePropEnum, v) - } -} - -const ( - - // LicenseStateStateKInProgressNewCluster captures enum value "kInProgressNewCluster" - LicenseStateStateKInProgressNewCluster string = "kInProgressNewCluster" - - // LicenseStateStateKInProgressOldCluster captures enum value "kInProgressOldCluster" - LicenseStateStateKInProgressOldCluster string = "kInProgressOldCluster" - - // LicenseStateStateKClaimed captures enum value "kClaimed" - LicenseStateStateKClaimed string = "kClaimed" - - // LicenseStateStateKSkipped captures enum value "kSkipped" - LicenseStateStateKSkipped string = "kSkipped" - - // LicenseStateStateKStarted captures enum value "kStarted" - LicenseStateStateKStarted string = "kStarted" -) - -// prop value enum -func (m *LicenseState) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, licenseStateTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LicenseState) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this license state based on context it is used -func (m *LicenseState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LicenseState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LicenseState) UnmarshalBinary(b []byte) error { - var res LicenseState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lifecycle_config_proto.go b/v1/models/lifecycle_config_proto.go deleted file mode 100644 index e1711e80..00000000 --- a/v1/models/lifecycle_config_proto.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LifecycleConfigProto Protobuf that describes the lifecycle configuration that is used to manage -// the lifecycle of objects in a bucket. -// -// swagger:model LifecycleConfigProto -type LifecycleConfigProto struct { - - // Specifies lifecycle configuration rules for an Amazon S3 bucket. A maximum - // of 1000 rules can be specified. - Rules []*LifecycleRule `json:"rules"` - - // Specifies the unique monotonically increasing version for lifecycle - // configuration. This field will be set automatically inside bridge. - // Components outside bridge no needs to set this field. It will be ignored - // and overwritten by bridge even if it is set. - VersionID *int64 `json:"versionId,omitempty"` -} - -// Validate validates this lifecycle config proto -func (m *LifecycleConfigProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRules(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleConfigProto) validateRules(formats strfmt.Registry) error { - if swag.IsZero(m.Rules) { // not required - return nil - } - - for i := 0; i < len(m.Rules); i++ { - if swag.IsZero(m.Rules[i]) { // not required - continue - } - - if m.Rules[i] != nil { - if err := m.Rules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this lifecycle config proto based on the context it is used -func (m *LifecycleConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRules(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleConfigProto) contextValidateRules(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Rules); i++ { - - if m.Rules[i] != nil { - - if swag.IsZero(m.Rules[i]) { // not required - return nil - } - - if err := m.Rules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleConfigProto) UnmarshalBinary(b []byte) error { - var res LifecycleConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lifecycle_rule.go b/v1/models/lifecycle_rule.go deleted file mode 100644 index ea258f88..00000000 --- a/v1/models/lifecycle_rule.go +++ /dev/null @@ -1,277 +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" -) - -// LifecycleRule Proto to define Lifecycle configuration Rule. -// -// swagger:model LifecycleRule -type LifecycleRule struct { - - // Specifies the days since the initiation of an incomplete multipart upload - // before permanently removing all parts of the upload. - AbortIncompleteMultipartUpload *AbortIncompleteMultipartUploadAction `json:"abortIncompleteMultipartUpload,omitempty"` - - // Specifies the expiration for the lifecycle of the object in the form of - // date, days and, whether the object has a delete marker. - Expiration *ExpirationAction `json:"expiration,omitempty"` - - // The Filter is used to identify objects that a Lifecycle Rule applies to. - Filter *LifecycleRuleFilter `json:"filter,omitempty"` - - // Unique identifier for the rule. The value cannot be longer than 255 - // characters. - ID *string `json:"id,omitempty"` - - // Specifies when noncurrent object versions expire. Upon expiration, - // noncurrent object versions are permanently deleted. The action can be - // specified only in versioning enabled of suspended buckets. - NoncurrentVersionExpiration *NoncurrentVersionExpirationAction `json:"noncurrentVersionExpiration,omitempty"` - - // The prefix is used to identify objects that a lifecycle rule applies to. - Prefix *string `json:"prefix,omitempty"` - - // If set, the rule is currently being applied. If 'Disabled', the rule is - // not currently being applied. - Status *bool `json:"status,omitempty"` -} - -// Validate validates this lifecycle rule -func (m *LifecycleRule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbortIncompleteMultipartUpload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExpiration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNoncurrentVersionExpiration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRule) validateAbortIncompleteMultipartUpload(formats strfmt.Registry) error { - if swag.IsZero(m.AbortIncompleteMultipartUpload) { // not required - return nil - } - - if m.AbortIncompleteMultipartUpload != nil { - if err := m.AbortIncompleteMultipartUpload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("abortIncompleteMultipartUpload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("abortIncompleteMultipartUpload") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateExpiration(formats strfmt.Registry) error { - if swag.IsZero(m.Expiration) { // not required - return nil - } - - if m.Expiration != nil { - if err := m.Expiration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("expiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("expiration") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateFilter(formats strfmt.Registry) error { - if swag.IsZero(m.Filter) { // not required - return nil - } - - if m.Filter != nil { - if err := m.Filter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filter") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateNoncurrentVersionExpiration(formats strfmt.Registry) error { - if swag.IsZero(m.NoncurrentVersionExpiration) { // not required - return nil - } - - if m.NoncurrentVersionExpiration != nil { - if err := m.NoncurrentVersionExpiration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("noncurrentVersionExpiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("noncurrentVersionExpiration") - } - return err - } - } - - return nil -} - -// ContextValidate validate this lifecycle rule based on the context it is used -func (m *LifecycleRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAbortIncompleteMultipartUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExpiration(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNoncurrentVersionExpiration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRule) contextValidateAbortIncompleteMultipartUpload(ctx context.Context, formats strfmt.Registry) error { - - if m.AbortIncompleteMultipartUpload != nil { - - if swag.IsZero(m.AbortIncompleteMultipartUpload) { // not required - return nil - } - - if err := m.AbortIncompleteMultipartUpload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("abortIncompleteMultipartUpload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("abortIncompleteMultipartUpload") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateExpiration(ctx context.Context, formats strfmt.Registry) error { - - if m.Expiration != nil { - - if swag.IsZero(m.Expiration) { // not required - return nil - } - - if err := m.Expiration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("expiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("expiration") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.Filter != nil { - - if swag.IsZero(m.Filter) { // not required - return nil - } - - if err := m.Filter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filter") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateNoncurrentVersionExpiration(ctx context.Context, formats strfmt.Registry) error { - - if m.NoncurrentVersionExpiration != nil { - - if swag.IsZero(m.NoncurrentVersionExpiration) { // not required - return nil - } - - if err := m.NoncurrentVersionExpiration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("noncurrentVersionExpiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("noncurrentVersionExpiration") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRule) UnmarshalBinary(b []byte) error { - var res LifecycleRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lifecycle_rule_filter.go b/v1/models/lifecycle_rule_filter.go deleted file mode 100644 index d6b0dd5b..00000000 --- a/v1/models/lifecycle_rule_filter.go +++ /dev/null @@ -1,166 +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" -) - -// LifecycleRuleFilter Proto to define Lifecycle configuration Rule Filter. -// -// swagger:model LifecycleRuleFilter -type LifecycleRuleFilter struct { - - // This is used in a Lifecycle Rule Filter to apply a logical AND to two or - // more predicates. The Lifecycle Rule will apply to any object matching all - // of the predicates configured inside the And operator. - And *LifecycleRuleFilterAnd `json:"and,omitempty"` - - // Prefix identifying one or more objects to which the rule applies. - Prefix *string `json:"prefix,omitempty"` - - // This tag must exist in the object's tag set in order for the rule to - // apply. - Tag *LifecycleRuleFilterTag `json:"tag,omitempty"` -} - -// Validate validates this lifecycle rule filter -func (m *LifecycleRuleFilter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAnd(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTag(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilter) validateAnd(formats strfmt.Registry) error { - if swag.IsZero(m.And) { // not required - return nil - } - - if m.And != nil { - if err := m.And.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("and") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("and") - } - return err - } - } - - return nil -} - -func (m *LifecycleRuleFilter) validateTag(formats strfmt.Registry) error { - if swag.IsZero(m.Tag) { // not required - return nil - } - - if m.Tag != nil { - if err := m.Tag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tag") - } - return err - } - } - - return nil -} - -// ContextValidate validate this lifecycle rule filter based on the context it is used -func (m *LifecycleRuleFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAnd(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTag(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilter) contextValidateAnd(ctx context.Context, formats strfmt.Registry) error { - - if m.And != nil { - - if swag.IsZero(m.And) { // not required - return nil - } - - if err := m.And.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("and") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("and") - } - return err - } - } - - return nil -} - -func (m *LifecycleRuleFilter) contextValidateTag(ctx context.Context, formats strfmt.Registry) error { - - if m.Tag != nil { - - if swag.IsZero(m.Tag) { // not required - return nil - } - - if err := m.Tag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tag") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilter) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lifecycle_rule_filter_and.go b/v1/models/lifecycle_rule_filter_and.go deleted file mode 100644 index 4a73b1d8..00000000 --- a/v1/models/lifecycle_rule_filter_and.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LifecycleRuleFilterAnd Proto to define Lifecycle configuration Rule Filter And element. -// -// swagger:model LifecycleRuleFilterAnd -type LifecycleRuleFilterAnd struct { - - // Prefix identifying one or more objects to which the rule applies. - Prefix *string `json:"prefix,omitempty"` - - // All of these tags must exist in the object's tag set in order for the rule - // to apply. - TagVec []*LifecycleRuleFilterTag `json:"tagVec"` -} - -// Validate validates this lifecycle rule filter and -func (m *LifecycleRuleFilterAnd) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilterAnd) validateTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagVec) { // not required - return nil - } - - for i := 0; i < len(m.TagVec); i++ { - if swag.IsZero(m.TagVec[i]) { // not required - continue - } - - if m.TagVec[i] != nil { - if err := m.TagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this lifecycle rule filter and based on the context it is used -func (m *LifecycleRuleFilterAnd) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilterAnd) contextValidateTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagVec); i++ { - - if m.TagVec[i] != nil { - - if swag.IsZero(m.TagVec[i]) { // not required - return nil - } - - if err := m.TagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilterAnd) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilterAnd) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilterAnd - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lifecycle_rule_filter_tag.go b/v1/models/lifecycle_rule_filter_tag.go deleted file mode 100644 index a28ed2fd..00000000 --- a/v1/models/lifecycle_rule_filter_tag.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" -) - -// LifecycleRuleFilterTag Proto to define Lifecycle configuration Rule Filter Tag element. -// -// swagger:model LifecycleRuleFilterTag -type LifecycleRuleFilterTag struct { - - // Name of the object key. - Key *string `json:"key,omitempty"` - - // Value of the tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this lifecycle rule filter tag -func (m *LifecycleRuleFilterTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lifecycle rule filter tag based on context it is used -func (m *LifecycleRuleFilterTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilterTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilterTag) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilterTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_command_execute_node_resp.go b/v1/models/linux_command_execute_node_resp.go deleted file mode 100644 index 44ab5def..00000000 --- a/v1/models/linux_command_execute_node_resp.go +++ /dev/null @@ -1,62 +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" -) - -// LinuxCommandExecuteNodeResp linux command execute node resp -// -// swagger:model LinuxCommandExecuteNodeResp -type LinuxCommandExecuteNodeResp struct { - - // failed reason - FailedReason *string `json:"failedReason,omitempty"` - - // node Id - NodeID *int64 `json:"nodeId,omitempty"` - - // node Ip - NodeIP *string `json:"nodeIp,omitempty"` - - // output - Output *string `json:"output,omitempty"` - - // success - Success *bool `json:"success,omitempty"` -} - -// Validate validates this linux command execute node resp -func (m *LinuxCommandExecuteNodeResp) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux command execute node resp based on context it is used -func (m *LinuxCommandExecuteNodeResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxCommandExecuteNodeResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxCommandExecuteNodeResp) UnmarshalBinary(b []byte) error { - var res LinuxCommandExecuteNodeResp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_command_list_node_resp.go b/v1/models/linux_command_list_node_resp.go deleted file mode 100644 index 4297c28a..00000000 --- a/v1/models/linux_command_list_node_resp.go +++ /dev/null @@ -1,65 +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" -) - -// LinuxCommandListNodeResp linux command list node resp -// -// swagger:model LinuxCommandListNodeResp -type LinuxCommandListNodeResp struct { - - // all users commands - AllUsersCommands *string `json:"allUsersCommands,omitempty"` - - // failed reason - FailedReason *string `json:"failedReason,omitempty"` - - // node Id - NodeID *int64 `json:"nodeId,omitempty"` - - // node Ip - NodeIP *string `json:"nodeIp,omitempty"` - - // privileged users commands - PrivilegedUsersCommands *string `json:"privilegedUsersCommands,omitempty"` - - // success - Success *bool `json:"success,omitempty"` -} - -// Validate validates this linux command list node resp -func (m *LinuxCommandListNodeResp) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux command list node resp based on context it is used -func (m *LinuxCommandListNodeResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxCommandListNodeResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxCommandListNodeResp) UnmarshalBinary(b []byte) error { - var res LinuxCommandListNodeResp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_support_user_bash_shell_access_req_params.go b/v1/models/linux_support_user_bash_shell_access_req_params.go deleted file mode 100644 index 8c97b132..00000000 --- a/v1/models/linux_support_user_bash_shell_access_req_params.go +++ /dev/null @@ -1,52 +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" -) - -// LinuxSupportUserBashShellAccessReqParams Linux Support Bash Shell Access Req Params. -// -// swagger:model LinuxSupportUserBashShellAccessReqParams -type LinuxSupportUserBashShellAccessReqParams struct { - - // If RegenerateToken is set to true, the token would be regenerated - // and the new token will be - // returned. - RegenerateToken *bool `json:"regenerateToken,omitempty"` -} - -// Validate validates this linux support user bash shell access req params -func (m *LinuxSupportUserBashShellAccessReqParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux support user bash shell access req params based on context it is used -func (m *LinuxSupportUserBashShellAccessReqParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxSupportUserBashShellAccessReqParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxSupportUserBashShellAccessReqParams) UnmarshalBinary(b []byte) error { - var res LinuxSupportUserBashShellAccessReqParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_support_user_bash_shell_access_result.go b/v1/models/linux_support_user_bash_shell_access_result.go deleted file mode 100644 index bc5b3d4d..00000000 --- a/v1/models/linux_support_user_bash_shell_access_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" -) - -// LinuxSupportUserBashShellAccessResult Linux Support Bash Shell Access. -// -// Specifies the result returned after a successful request to get -// the linux 'support' user bash shell access token, -// -// swagger:model LinuxSupportUserBashShellAccessResult -type LinuxSupportUserBashShellAccessResult struct { - - // SSH identity key to login as 'support' user. - SupportUserToken *string `json:"supportUserToken,omitempty"` -} - -// Validate validates this linux support user bash shell access result -func (m *LinuxSupportUserBashShellAccessResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux support user bash shell access result based on context it is used -func (m *LinuxSupportUserBashShellAccessResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxSupportUserBashShellAccessResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxSupportUserBashShellAccessResult) UnmarshalBinary(b []byte) error { - var res LinuxSupportUserBashShellAccessResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_support_user_sudo_access_req_params.go b/v1/models/linux_support_user_sudo_access_req_params.go deleted file mode 100644 index 5aeaf9ea..00000000 --- a/v1/models/linux_support_user_sudo_access_req_params.go +++ /dev/null @@ -1,51 +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" -) - -// LinuxSupportUserSudoAccessReqParams Linux Support Sudo Access Req Params. -// -// swagger:model LinuxSupportUserSudoAccessReqParams -type LinuxSupportUserSudoAccessReqParams struct { - - // If the enable flag is set to true, the sudo access will be enabled. - // If the enable flag is set to false, the sudo access will be disabled. - SudoAccessEnable *bool `json:"sudoAccessEnable,omitempty"` -} - -// Validate validates this linux support user sudo access req params -func (m *LinuxSupportUserSudoAccessReqParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux support user sudo access req params based on context it is used -func (m *LinuxSupportUserSudoAccessReqParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxSupportUserSudoAccessReqParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxSupportUserSudoAccessReqParams) UnmarshalBinary(b []byte) error { - var res LinuxSupportUserSudoAccessReqParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/linux_support_user_sudo_access_result.go b/v1/models/linux_support_user_sudo_access_result.go deleted file mode 100644 index 33091825..00000000 --- a/v1/models/linux_support_user_sudo_access_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" -) - -// LinuxSupportUserSudoAccessResult Linux Support Sudo Access. -// -// Specifies the result returned after a successful request to enable/disable -// the linux 'support' user sudo access. -// -// swagger:model LinuxSupportUserSudoAccessResult -type LinuxSupportUserSudoAccessResult struct { - - // Date format is in MM/DD/YYYY HH:MM:SS - Result *string `json:"result,omitempty"` -} - -// Validate validates this linux support user sudo access result -func (m *LinuxSupportUserSudoAccessResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this linux support user sudo access result based on context it is used -func (m *LinuxSupportUserSudoAccessResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxSupportUserSudoAccessResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxSupportUserSudoAccessResult) UnmarshalBinary(b []byte) error { - var res LinuxSupportUserSudoAccessResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_app_entities_result.go b/v1/models/list_app_entities_result.go deleted file mode 100644 index 48a31490..00000000 --- a/v1/models/list_app_entities_result.go +++ /dev/null @@ -1,161 +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" -) - -// ListAppEntitiesResult ListAppEntitiesResult is the struct for listing app VMs along with its -// auxiliary hierarchy e.g. SQL VMs along with instances. -// -// swagger:model ListAppEntitiesResult -type ListAppEntitiesResult struct { - - // AppEntity is the entity hierarchy for the app entity. - AppEntity *EntityHierarchyProto `json:"appEntity,omitempty"` - - // RootEntity is the root entity e.g. VCenter. - RootEntity *PrivateEntityProto `json:"rootEntity,omitempty"` -} - -// Validate validates this list app entities result -func (m *ListAppEntitiesResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListAppEntitiesResult) validateAppEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if m.AppEntity != nil { - if err := m.AppEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *ListAppEntitiesResult) validateRootEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if m.RootEntity != nil { - if err := m.RootEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list app entities result based on the context it is used -func (m *ListAppEntitiesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListAppEntitiesResult) contextValidateAppEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AppEntity != nil { - - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if err := m.AppEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *ListAppEntitiesResult) contextValidateRootEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RootEntity != nil { - - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if err := m.RootEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListAppEntitiesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListAppEntitiesResult) UnmarshalBinary(b []byte) error { - var res ListAppEntitiesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_centrify_zone.go b/v1/models/list_centrify_zone.go deleted file mode 100644 index 83cc546a..00000000 --- a/v1/models/list_centrify_zone.go +++ /dev/null @@ -1,151 +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" -) - -// ListCentrifyZone list centrify zone -// -// swagger:model ListCentrifyZone -type ListCentrifyZone struct { - - // Specifies the schema of this Centrify zone. - // The below list of schemas and their values are taken from the document - // Centrify Server Suite 2016 Windows API Programmer's Guide - // https://docs.centrify.com/en/css/suite2016/centrify-win-progguide.pdf - // 'kCentrifyDynamicSchema_1_0' specifies dynamic schema, version 1.0. - // 'kCentrifyDynamicSchema_2_0' specifies dynamic schema, version 2.0. - // 'kCentrifyDynamicSchema_3_0' specifies dynamic schema, version 3.0. - // 'kCentrifyDynamicSchema_5_0' specifies dynamic schema, version 5.0. - // 'kCentrifySfu_3_0' specifies sfu schema, version 3.0. - // 'kCentrifySfu_3_0_V5' specifies sfu schema, 3.0.5. - // 'kCentrifySfu_4_0' specifies sfu schema, version 4.0. - // 'kCentrifyCdcRfc2307' specifies cdcrfc2307 schema. - // 'kCentrifyCdcRfc2307_2' specifies cdcrfc2307, version 2. - // 'kCentrifyCdcRfc2307_3' specifies cdcrfc2307, version 3. - // Enum: ["kCentrifyDynamicSchema_1_0","kCentrifyDynamicSchema_2_0","kCentrifySfu_3_0","kCentrifySfu_4_0","kCentrifyCdcRfc2307","kCentrifyDynamicSchema_3_0","kCentrifyCdcRfc2307_2","kCentrifyDynamicSchema_5_0","kCentrifyCdcRfc2307_3","kCentrifySfu_3_0_V5"] - CentrifySchema *string `json:"centrifySchema,omitempty"` - - // Specifies a description of the Centrify zone. - Description *string `json:"description,omitempty"` - - // Specifies the distinguished name of the Centrify zone. - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Specifies the zone name. - ZoneName *string `json:"zoneName,omitempty"` -} - -// Validate validates this list centrify zone -func (m *ListCentrifyZone) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCentrifySchema(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listCentrifyZoneTypeCentrifySchemaPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCentrifyDynamicSchema_1_0","kCentrifyDynamicSchema_2_0","kCentrifySfu_3_0","kCentrifySfu_4_0","kCentrifyCdcRfc2307","kCentrifyDynamicSchema_3_0","kCentrifyCdcRfc2307_2","kCentrifyDynamicSchema_5_0","kCentrifyCdcRfc2307_3","kCentrifySfu_3_0_V5"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listCentrifyZoneTypeCentrifySchemaPropEnum = append(listCentrifyZoneTypeCentrifySchemaPropEnum, v) - } -} - -const ( - - // ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema10 captures enum value "kCentrifyDynamicSchema_1_0" - ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema10 string = "kCentrifyDynamicSchema_1_0" - - // ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema20 captures enum value "kCentrifyDynamicSchema_2_0" - ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema20 string = "kCentrifyDynamicSchema_2_0" - - // ListCentrifyZoneCentrifySchemaKCentrifySfu30 captures enum value "kCentrifySfu_3_0" - ListCentrifyZoneCentrifySchemaKCentrifySfu30 string = "kCentrifySfu_3_0" - - // ListCentrifyZoneCentrifySchemaKCentrifySfu40 captures enum value "kCentrifySfu_4_0" - ListCentrifyZoneCentrifySchemaKCentrifySfu40 string = "kCentrifySfu_4_0" - - // ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc2307 captures enum value "kCentrifyCdcRfc2307" - ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc2307 string = "kCentrifyCdcRfc2307" - - // ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema30 captures enum value "kCentrifyDynamicSchema_3_0" - ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema30 string = "kCentrifyDynamicSchema_3_0" - - // ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc23072 captures enum value "kCentrifyCdcRfc2307_2" - ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc23072 string = "kCentrifyCdcRfc2307_2" - - // ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema50 captures enum value "kCentrifyDynamicSchema_5_0" - ListCentrifyZoneCentrifySchemaKCentrifyDynamicSchema50 string = "kCentrifyDynamicSchema_5_0" - - // ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc23073 captures enum value "kCentrifyCdcRfc2307_3" - ListCentrifyZoneCentrifySchemaKCentrifyCdcRfc23073 string = "kCentrifyCdcRfc2307_3" - - // ListCentrifyZoneCentrifySchemaKCentrifySfu30V5 captures enum value "kCentrifySfu_3_0_V5" - ListCentrifyZoneCentrifySchemaKCentrifySfu30V5 string = "kCentrifySfu_3_0_V5" -) - -// prop value enum -func (m *ListCentrifyZone) validateCentrifySchemaEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listCentrifyZoneTypeCentrifySchemaPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ListCentrifyZone) validateCentrifySchema(formats strfmt.Registry) error { - if swag.IsZero(m.CentrifySchema) { // not required - return nil - } - - // value enum - if err := m.validateCentrifySchemaEnum("centrifySchema", "body", *m.CentrifySchema); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list centrify zone based on context it is used -func (m *ListCentrifyZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ListCentrifyZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListCentrifyZone) UnmarshalBinary(b []byte) error { - var res ListCentrifyZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_cert_response.go b/v1/models/list_cert_response.go deleted file mode 100644 index 30921942..00000000 --- a/v1/models/list_cert_response.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListCertResponse List Certificates Response -// -// Specifies list of all certificates deployed from the cluster. -// -// swagger:model ListCertResponse -type ListCertResponse struct { - - // certificate list - CertificateList []*CertificateDetails `json:"certificateList"` -} - -// Validate validates this list cert response -func (m *ListCertResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificateList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListCertResponse) validateCertificateList(formats strfmt.Registry) error { - if swag.IsZero(m.CertificateList) { // not required - return nil - } - - for i := 0; i < len(m.CertificateList); i++ { - if swag.IsZero(m.CertificateList[i]) { // not required - continue - } - - if m.CertificateList[i] != nil { - if err := m.CertificateList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificateList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificateList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list cert response based on the context it is used -func (m *ListCertResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificateList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListCertResponse) contextValidateCertificateList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CertificateList); i++ { - - if m.CertificateList[i] != nil { - - if swag.IsZero(m.CertificateList[i]) { // not required - return nil - } - - if err := m.CertificateList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificateList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificateList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListCertResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListCertResponse) UnmarshalBinary(b []byte) error { - var res ListCertResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_nlm_locks_response.go b/v1/models/list_nlm_locks_response.go deleted file mode 100644 index 905c8712..00000000 --- a/v1/models/list_nlm_locks_response.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListNlmLocksResponse List of NLM locks response. -// -// Query response to list of NLM locks. -// -// swagger:model ListNlmLocksResponse -type ListNlmLocksResponse struct { - - // Specifies an opaque string to pass to get the next set of NLM locks. - // If null is returned, this response is the last set of NLM locks. - Cookie *string `json:"cookie,omitempty"` - - // Specifies the list of NLM locks. - FilesNlmLocks []*FileNlmLocks `json:"filesNlmLocks"` -} - -// Validate validates this list nlm locks response -func (m *ListNlmLocksResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesNlmLocks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListNlmLocksResponse) validateFilesNlmLocks(formats strfmt.Registry) error { - if swag.IsZero(m.FilesNlmLocks) { // not required - return nil - } - - for i := 0; i < len(m.FilesNlmLocks); i++ { - if swag.IsZero(m.FilesNlmLocks[i]) { // not required - continue - } - - if m.FilesNlmLocks[i] != nil { - if err := m.FilesNlmLocks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesNlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesNlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list nlm locks response based on the context it is used -func (m *ListNlmLocksResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesNlmLocks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListNlmLocksResponse) contextValidateFilesNlmLocks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesNlmLocks); i++ { - - if m.FilesNlmLocks[i] != nil { - - if swag.IsZero(m.FilesNlmLocks[i]) { // not required - return nil - } - - if err := m.FilesNlmLocks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesNlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesNlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListNlmLocksResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListNlmLocksResponse) UnmarshalBinary(b []byte) error { - var res ListNlmLocksResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_org_vdc_networks_response.go b/v1/models/list_org_vdc_networks_response.go deleted file mode 100644 index 473b30fd..00000000 --- a/v1/models/list_org_vdc_networks_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListOrgVdcNetworksResponse Specifies the response returned when fetching a list of Org VDC Networks. -// -// swagger:model ListOrgVdcNetworksResponse -type ListOrgVdcNetworksResponse struct { - - // Specifies a list of Org VDC Networks. - OrgVdcNetworks []*OrgVdcNetworkParams `json:"orgVdcNetworks"` -} - -// Validate validates this list org vdc networks response -func (m *ListOrgVdcNetworksResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOrgVdcNetworks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListOrgVdcNetworksResponse) validateOrgVdcNetworks(formats strfmt.Registry) error { - if swag.IsZero(m.OrgVdcNetworks) { // not required - return nil - } - - for i := 0; i < len(m.OrgVdcNetworks); i++ { - if swag.IsZero(m.OrgVdcNetworks[i]) { // not required - continue - } - - if m.OrgVdcNetworks[i] != nil { - if err := m.OrgVdcNetworks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgVdcNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgVdcNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list org vdc networks response based on the context it is used -func (m *ListOrgVdcNetworksResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOrgVdcNetworks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListOrgVdcNetworksResponse) contextValidateOrgVdcNetworks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OrgVdcNetworks); i++ { - - if m.OrgVdcNetworks[i] != nil { - - if swag.IsZero(m.OrgVdcNetworks[i]) { // not required - return nil - } - - if err := m.OrgVdcNetworks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgVdcNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgVdcNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListOrgVdcNetworksResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListOrgVdcNetworksResponse) UnmarshalBinary(b []byte) error { - var res ListOrgVdcNetworksResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/list_storage_profiles_response_body.go b/v1/models/list_storage_profiles_response_body.go deleted file mode 100644 index 3d67e200..00000000 --- a/v1/models/list_storage_profiles_response_body.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListStorageProfilesResponseBody List Storage Profiles Response Body. -// -// Specifies the response to request to list the storage profiles associated -// with a VDC. -// -// swagger:model ListStorageProfilesResponseBody -type ListStorageProfilesResponseBody struct { - - // Specifies a list of storage profiles. - StorageProfiles []*VcdStorageProfile `json:"storageProfiles"` -} - -// Validate validates this list storage profiles response body -func (m *ListStorageProfilesResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageProfiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListStorageProfilesResponseBody) validateStorageProfiles(formats strfmt.Registry) error { - if swag.IsZero(m.StorageProfiles) { // not required - return nil - } - - for i := 0; i < len(m.StorageProfiles); i++ { - if swag.IsZero(m.StorageProfiles[i]) { // not required - continue - } - - if m.StorageProfiles[i] != nil { - if err := m.StorageProfiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list storage profiles response body based on the context it is used -func (m *ListStorageProfilesResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageProfiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListStorageProfilesResponseBody) contextValidateStorageProfiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageProfiles); i++ { - - if m.StorageProfiles[i] != nil { - - if swag.IsZero(m.StorageProfiles[i]) { // not required - return nil - } - - if err := m.StorageProfiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListStorageProfilesResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListStorageProfilesResponseBody) UnmarshalBinary(b []byte) error { - var res ListStorageProfilesResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/local_copy_info_base.go b/v1/models/local_copy_info_base.go deleted file mode 100644 index ce20e39e..00000000 --- a/v1/models/local_copy_info_base.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LocalCopyInfoBase local copy info base -// -// swagger:model LocalCopyInfoBase -type LocalCopyInfoBase struct { - - // If the flag magneto_master_notify_yoda_task_wise is set, magneto starts - // notifying yoda whenever a task completes. This field is used for storing - // task ids where were already yoda notified. - YodaNotifiedTaskIds []*LocalCopyInfoBaseYodaNotifiedTaskIdsEntry `json:"yodaNotifiedTaskIds"` - - // This contains the value of flag magneto_master_notify_yoda_task_wise set - // at the beginning of this run. - YodaObjectLevelNotifyEnabled *bool `json:"yodaObjectLevelNotifyEnabled,omitempty"` -} - -// Validate validates this local copy info base -func (m *LocalCopyInfoBase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateYodaNotifiedTaskIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LocalCopyInfoBase) validateYodaNotifiedTaskIds(formats strfmt.Registry) error { - if swag.IsZero(m.YodaNotifiedTaskIds) { // not required - return nil - } - - for i := 0; i < len(m.YodaNotifiedTaskIds); i++ { - if swag.IsZero(m.YodaNotifiedTaskIds[i]) { // not required - continue - } - - if m.YodaNotifiedTaskIds[i] != nil { - if err := m.YodaNotifiedTaskIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yodaNotifiedTaskIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yodaNotifiedTaskIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this local copy info base based on the context it is used -func (m *LocalCopyInfoBase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateYodaNotifiedTaskIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LocalCopyInfoBase) contextValidateYodaNotifiedTaskIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.YodaNotifiedTaskIds); i++ { - - if m.YodaNotifiedTaskIds[i] != nil { - - if swag.IsZero(m.YodaNotifiedTaskIds[i]) { // not required - return nil - } - - if err := m.YodaNotifiedTaskIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yodaNotifiedTaskIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yodaNotifiedTaskIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LocalCopyInfoBase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalCopyInfoBase) UnmarshalBinary(b []byte) error { - var res LocalCopyInfoBase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/local_copy_info_base_yoda_notified_task_ids_entry.go b/v1/models/local_copy_info_base_yoda_notified_task_ids_entry.go deleted file mode 100644 index 0c28a238..00000000 --- a/v1/models/local_copy_info_base_yoda_notified_task_ids_entry.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" -) - -// LocalCopyInfoBaseYodaNotifiedTaskIdsEntry local copy info base yoda notified task ids entry -// -// swagger:model LocalCopyInfoBase_YodaNotifiedTaskIdsEntry -type LocalCopyInfoBaseYodaNotifiedTaskIdsEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *bool `json:"value,omitempty"` -} - -// Validate validates this local copy info base yoda notified task ids entry -func (m *LocalCopyInfoBaseYodaNotifiedTaskIdsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this local copy info base yoda notified task ids entry based on context it is used -func (m *LocalCopyInfoBaseYodaNotifiedTaskIdsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalCopyInfoBaseYodaNotifiedTaskIdsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalCopyInfoBaseYodaNotifiedTaskIdsEntry) UnmarshalBinary(b []byte) error { - var res LocalCopyInfoBaseYodaNotifiedTaskIdsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/local_time.go b/v1/models/local_time.go deleted file mode 100644 index d9f2cbad..00000000 --- a/v1/models/local_time.go +++ /dev/null @@ -1,54 +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" -) - -// LocalTime Local time represented in milliseconds since epoch with time zone offset -// minutes, for translating from/to Exchange server date string. -// -// swagger:model LocalTime -type LocalTime struct { - - // The time since epoch in milliseconds. - Msecs *int64 `json:"msecs,omitempty"` - - // The time zone offset in minutes adjusted to daylight saving. - OffsetMinutes *int64 `json:"offsetMinutes,omitempty"` -} - -// Validate validates this local time -func (m *LocalTime) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this local time based on context it is used -func (m *LocalTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalTime) UnmarshalBinary(b []byte) error { - var res LocalTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lock_file_params.go b/v1/models/lock_file_params.go deleted file mode 100644 index 4b7d9611..00000000 --- a/v1/models/lock_file_params.go +++ /dev/null @@ -1,56 +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" -) - -// LockFileParams Lock File Parameters. -// -// Specifies the parameters to lock a file in a view. -// -// swagger:model LockFileParams -type LockFileParams struct { - - // Specifies a definite timestamp in milliseconds for retaining the file, or - // to extend it's expiry timestamp. - ExpiryTimestampMsecs *uint64 `json:"expiryTimestampMsecs,omitempty"` - - // Specifies the file path that needs to be locked. - Path *string `json:"path,omitempty"` -} - -// Validate validates this lock file params -func (m *LockFileParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lock file params based on context it is used -func (m *LockFileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LockFileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockFileParams) UnmarshalBinary(b []byte) error { - var res LockFileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lock_holder_info.go b/v1/models/lock_holder_info.go deleted file mode 100644 index 17de9660..00000000 --- a/v1/models/lock_holder_info.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" -) - -// LockHolderInfo LockHolderInfo is the struct to specify Lock holder details. -// -// swagger:model LockHolderInfo -type LockHolderInfo struct { - - // ClientIpAddress is the lock holder ip registered with Gandalf. - ClientIPAddress *string `json:"client_ip_address,omitempty"` - - // ClientName is the name of the lock holder registered with Gandalf. - ClientName *string `json:"client_name,omitempty"` -} - -// Validate validates this lock holder info -func (m *LockHolderInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lock holder info based on context it is used -func (m *LockHolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LockHolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockHolderInfo) UnmarshalBinary(b []byte) error { - var res LockHolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lock_info.go b/v1/models/lock_info.go deleted file mode 100644 index e7cf1da8..00000000 --- a/v1/models/lock_info.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LockInfo LockInfo struct to specify lock details. -// -// swagger:model LockInfo -type LockInfo struct { - - // List of LockHolders for the lock. - LockHolders []*LockHolderInfo `json:"lock_holders"` - - // LockName is the name of the lock. - LockName *string `json:"lock_name,omitempty"` -} - -// Validate validates this lock info -func (m *LockInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockHolders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LockInfo) validateLockHolders(formats strfmt.Registry) error { - if swag.IsZero(m.LockHolders) { // not required - return nil - } - - for i := 0; i < len(m.LockHolders); i++ { - if swag.IsZero(m.LockHolders[i]) { // not required - continue - } - - if m.LockHolders[i] != nil { - if err := m.LockHolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lock_holders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lock_holders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this lock info based on the context it is used -func (m *LockInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLockHolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LockInfo) contextValidateLockHolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LockHolders); i++ { - - if m.LockHolders[i] != nil { - - if swag.IsZero(m.LockHolders[i]) { // not required - return nil - } - - if err := m.LockHolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lock_holders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lock_holders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LockInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockInfo) UnmarshalBinary(b []byte) error { - var res LockInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/lock_range.go b/v1/models/lock_range.go deleted file mode 100644 index 1d7c2a7d..00000000 --- a/v1/models/lock_range.go +++ /dev/null @@ -1,56 +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" -) - -// LockRange Specifies details of an entity lock. -// -// swagger:model LockRange -type LockRange struct { - - // is exclusive - IsExclusive *bool `json:"isExclusive,omitempty"` - - // length - Length *uint64 `json:"length,omitempty"` - - // offset - Offset *uint64 `json:"offset,omitempty"` -} - -// Validate validates this lock range -func (m *LockRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lock range based on context it is used -func (m *LockRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LockRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockRange) UnmarshalBinary(b []byte) error { - var res LockRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/logical_stats.go b/v1/models/logical_stats.go deleted file mode 100644 index 438ae031..00000000 --- a/v1/models/logical_stats.go +++ /dev/null @@ -1,58 +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" -) - -// LogicalStats Logical Statistics -// -// Provides logical statistics for logical entities such as Clusters -// and Domains (View Boxes). -// The logical size is the size of the data when it is fully hydrated or -// expanded. -// The actual physical data stored on the Cohesity Cluster is -// reduced by change-block tracking, compression and deduplication. -// -// swagger:model LogicalStats -type LogicalStats struct { - - // Provides the combined data residing on protected objects. - // The size of data before reduction by deduplication and compression. - TotalLogicalUsageBytes *int64 `json:"totalLogicalUsageBytes,omitempty"` -} - -// Validate validates this logical stats -func (m *LogicalStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this logical stats based on context it is used -func (m *LogicalStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LogicalStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogicalStats) UnmarshalBinary(b []byte) error { - var res LogicalStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/logical_volume.go b/v1/models/logical_volume.go deleted file mode 100644 index 7f346a05..00000000 --- a/v1/models/logical_volume.go +++ /dev/null @@ -1,124 +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" -) - -// LogicalVolume Logical Volume. -// -// Specifies attributes for a kLVM (Linux) or kLDM (Windows) filesystem. -// -// swagger:model LogicalVolume -type LogicalVolume struct { - - // Specifies the device tree defining how to combine partitions to create - // this logical volume. - DeviceRootNode *DeviceTreeDetails `json:"deviceRootNode,omitempty"` - - // Specifies the group name of the logical volume. - GroupName *string `json:"groupName,omitempty"` - - // Specifies the group uuid of the logical volume. - GroupUUID *string `json:"groupUuid,omitempty"` - - // Specifies the name of the logical volume. - Name *string `json:"name,omitempty"` - - // Specifies the uuid of the logical volume. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this logical volume -func (m *LogicalVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeviceRootNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogicalVolume) validateDeviceRootNode(formats strfmt.Registry) error { - if swag.IsZero(m.DeviceRootNode) { // not required - return nil - } - - if m.DeviceRootNode != nil { - if err := m.DeviceRootNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceRootNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceRootNode") - } - return err - } - } - - return nil -} - -// ContextValidate validate this logical volume based on the context it is used -func (m *LogicalVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeviceRootNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogicalVolume) contextValidateDeviceRootNode(ctx context.Context, formats strfmt.Registry) error { - - if m.DeviceRootNode != nil { - - if swag.IsZero(m.DeviceRootNode) { // not required - return nil - } - - if err := m.DeviceRootNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceRootNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceRootNode") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LogicalVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogicalVolume) UnmarshalBinary(b []byte) error { - var res LogicalVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m365_teams_channel_info.go b/v1/models/m365_teams_channel_info.go deleted file mode 100644 index 537bdc9e..00000000 --- a/v1/models/m365_teams_channel_info.go +++ /dev/null @@ -1,55 +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" -) - -// M365TeamsChannelInfo M365 Teams Channels Info. -// -// Specifies information about a M365 Teams Channel. -// -// swagger:model M365TeamsChannelInfo -type M365TeamsChannelInfo struct { - - // Specifies if this is a private channel. - IsPrivate *bool `json:"isPrivate,omitempty"` - - // Specifies the name of a M365 Teams channel. - Name *string `json:"name,omitempty"` -} - -// Validate validates this m365 teams channel info -func (m *M365TeamsChannelInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m365 teams channel info based on context it is used -func (m *M365TeamsChannelInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *M365TeamsChannelInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *M365TeamsChannelInfo) UnmarshalBinary(b []byte) error { - var res M365TeamsChannelInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m_o_ref.go b/v1/models/m_o_ref.go deleted file mode 100644 index 1ef8859c..00000000 --- a/v1/models/m_o_ref.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" -) - -// MORef Type that represents the ManagedObjectReference in VMware. -// -// swagger:model MORef -type MORef struct { - - // item - Item *string `json:"item,omitempty"` - - // type - Type *string `json:"type,omitempty"` -} - -// Validate validates this m o ref -func (m *MORef) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m o ref based on context it is used -func (m *MORef) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MORef) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MORef) UnmarshalBinary(b []byte) error { - var res MORef - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m_s_exchange_params.go b/v1/models/m_s_exchange_params.go deleted file mode 100644 index 50abcd04..00000000 --- a/v1/models/m_s_exchange_params.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" -) - -// MSExchangeParams MS Exchange Parameters. -// -// All the params specific to MS exchange application. -// -// swagger:model MSExchangeParams -type MSExchangeParams struct { - - // If this is set to true, then an attempt will be made to truncate - // exchange logs. - PerformLogTruncation *bool `json:"performLogTruncation,omitempty"` -} - -// Validate validates this m s exchange params -func (m *MSExchangeParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m s exchange params based on context it is used -func (m *MSExchangeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MSExchangeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSExchangeParams) UnmarshalBinary(b []byte) error { - var res MSExchangeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m_s_graph_app_credentials.go b/v1/models/m_s_graph_app_credentials.go deleted file mode 100644 index b91c0b37..00000000 --- a/v1/models/m_s_graph_app_credentials.go +++ /dev/null @@ -1,221 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MSGraphAppCredentials Message that encapsulates the credentials to authenticate with MS Graph API -// endpoint. -// -// swagger:model MSGraphAppCredentials -type MSGraphAppCredentials struct { - - // The application (client) ID that the registration portal - // (apps.dev.microsoft.com) assigned your app. - ClientID *string `json:"clientId,omitempty"` - - // The application secret that you created in the app registration portal for - // your app. - ClientSecret *string `json:"clientSecret,omitempty"` - - // Field to keep track if this app was auto created by Cohesity or not. - CohesityCreated *bool `json:"cohesityCreated,omitempty"` - - // Display name (appname) corresponding to client_id. This is populated by - // looking at JWT token returned after connection to handle cases where - // customer has renamed the application name after creating client_id. - DisplayName *string `json:"displayName,omitempty"` - - // AES256 encrypted application secret. - EncryptedClientSecret []uint8 `json:"encryptedClientSecret"` - - // Must be client_credentials for the client credentials flow. - GrantType *string `json:"grantType,omitempty"` - - // For a task/subtask if this field is set to true, then this client_id and - // client_secret will be used to generate the token. If none of the - // client_ids are selected, then a random one will be chosen to generate the - // token. - IsSelected *bool `json:"isSelected,omitempty"` - - // A space-separated list of scopes/permissions that you want the user to - // consent to. - Scope *string `json:"scope,omitempty"` - - // Mapping from scope to client/application ids. - ScopeClientIDMap []*MSGraphAppCredentialsScopeClientIDMapEntry `json:"scopeClientIdMap"` - - // Mapping from scope to the oauth token for that scope. - ScopeTokenMap []*MSGraphAppCredentialsScopeTokenMapEntry `json:"scopeTokenMap"` - - // Whether OAuth should be used for authentication with EWS API, applicable - // only for Exchange Online. This field is deprecated here and moved to - // message AdditionalConnectorParams in magneto/base/magneto.proto. - UseOutlookEwsOauth *bool `json:"useOutlookEwsOauth,omitempty"` -} - -// Validate validates this m s graph app credentials -func (m *MSGraphAppCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScopeClientIDMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScopeTokenMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSGraphAppCredentials) validateScopeClientIDMap(formats strfmt.Registry) error { - if swag.IsZero(m.ScopeClientIDMap) { // not required - return nil - } - - for i := 0; i < len(m.ScopeClientIDMap); i++ { - if swag.IsZero(m.ScopeClientIDMap[i]) { // not required - continue - } - - if m.ScopeClientIDMap[i] != nil { - if err := m.ScopeClientIDMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scopeClientIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scopeClientIdMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSGraphAppCredentials) validateScopeTokenMap(formats strfmt.Registry) error { - if swag.IsZero(m.ScopeTokenMap) { // not required - return nil - } - - for i := 0; i < len(m.ScopeTokenMap); i++ { - if swag.IsZero(m.ScopeTokenMap[i]) { // not required - continue - } - - if m.ScopeTokenMap[i] != nil { - if err := m.ScopeTokenMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scopeTokenMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scopeTokenMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this m s graph app credentials based on the context it is used -func (m *MSGraphAppCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScopeClientIDMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScopeTokenMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSGraphAppCredentials) contextValidateScopeClientIDMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ScopeClientIDMap); i++ { - - if m.ScopeClientIDMap[i] != nil { - - if swag.IsZero(m.ScopeClientIDMap[i]) { // not required - return nil - } - - if err := m.ScopeClientIDMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scopeClientIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scopeClientIdMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSGraphAppCredentials) contextValidateScopeTokenMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ScopeTokenMap); i++ { - - if m.ScopeTokenMap[i] != nil { - - if swag.IsZero(m.ScopeTokenMap[i]) { // not required - return nil - } - - if err := m.ScopeTokenMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scopeTokenMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scopeTokenMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSGraphAppCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSGraphAppCredentials) UnmarshalBinary(b []byte) error { - var res MSGraphAppCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m_s_graph_app_credentials_scope_client_id_map_entry.go b/v1/models/m_s_graph_app_credentials_scope_client_id_map_entry.go deleted file mode 100644 index 013b2fee..00000000 --- a/v1/models/m_s_graph_app_credentials_scope_client_id_map_entry.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" -) - -// MSGraphAppCredentialsScopeClientIDMapEntry m s graph app credentials scope client Id map entry -// -// swagger:model MSGraphAppCredentials_ScopeClientIdMapEntry -type MSGraphAppCredentialsScopeClientIDMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this m s graph app credentials scope client Id map entry -func (m *MSGraphAppCredentialsScopeClientIDMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m s graph app credentials scope client Id map entry based on context it is used -func (m *MSGraphAppCredentialsScopeClientIDMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MSGraphAppCredentialsScopeClientIDMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSGraphAppCredentialsScopeClientIDMapEntry) UnmarshalBinary(b []byte) error { - var res MSGraphAppCredentialsScopeClientIDMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/m_s_graph_app_credentials_scope_token_map_entry.go b/v1/models/m_s_graph_app_credentials_scope_token_map_entry.go deleted file mode 100644 index 2c018e2e..00000000 --- a/v1/models/m_s_graph_app_credentials_scope_token_map_entry.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" -) - -// MSGraphAppCredentialsScopeTokenMapEntry m s graph app credentials scope token map entry -// -// swagger:model MSGraphAppCredentials_ScopeTokenMapEntry -type MSGraphAppCredentialsScopeTokenMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this m s graph app credentials scope token map entry -func (m *MSGraphAppCredentialsScopeTokenMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m s graph app credentials scope token map entry based on context it is used -func (m *MSGraphAppCredentialsScopeTokenMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MSGraphAppCredentialsScopeTokenMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSGraphAppCredentialsScopeTokenMapEntry) UnmarshalBinary(b []byte) error { - var res MSGraphAppCredentialsScopeTokenMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/magneto_instance_id.go b/v1/models/magneto_instance_id.go deleted file mode 100644 index 174b7a42..00000000 --- a/v1/models/magneto_instance_id.go +++ /dev/null @@ -1,56 +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" -) - -// MagnetoInstanceID magneto instance Id -// -// swagger:model MagnetoInstanceId -type MagnetoInstanceID struct { - - // The attempt of the job instance that took the snapshot. - AttemptNum *int64 `json:"attemptNum,omitempty"` - - // Instance of the job that took the snapshot. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // Start time of the job instance. - JobStartTimeUsecs *int64 `json:"jobStartTimeUsecs,omitempty"` -} - -// Validate validates this magneto instance Id -func (m *MagnetoInstanceID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this magneto instance Id based on context it is used -func (m *MagnetoInstanceID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MagnetoInstanceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MagnetoInstanceID) UnmarshalBinary(b []byte) error { - var res MagnetoInstanceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/magneto_object_id.go b/v1/models/magneto_object_id.go deleted file mode 100644 index d5b5ae95..00000000 --- a/v1/models/magneto_object_id.go +++ /dev/null @@ -1,170 +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" -) - -// MagnetoObjectID Message that represents a Magneto object. Only used by Yoda. -// -// swagger:model MagnetoObjectId -type MagnetoObjectID struct { - - // Entity proto that represents the object being snapshotted. - Entity *EntityProto `json:"entity,omitempty"` - - // The id of the local job that the object belongs to, which may or may not - // match the object_id field in job_uid below depending on whether the object - // originally belonged to this local job or to a different remote job. - JobID *int64 `json:"jobId,omitempty"` - - // The globally unique id of the job that the object originally belonged to. - // If this object originally belonged to a job from a remote cluster, this - // field will contain the uid of the remote job, else it will contain the uid - // of the local job. - // In case of DMaaS object protection, we still use the local cluster's - // job uid instead of the remote job uid. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` -} - -// Validate validates this magneto object Id -func (m *MagnetoObjectID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MagnetoObjectID) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *MagnetoObjectID) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this magneto object Id based on the context it is used -func (m *MagnetoObjectID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MagnetoObjectID) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *MagnetoObjectID) 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 -} - -// MarshalBinary interface implementation -func (m *MagnetoObjectID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MagnetoObjectID) UnmarshalBinary(b []byte) error { - var res MagnetoObjectID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/maintenance_mode_config_proto.go b/v1/models/maintenance_mode_config_proto.go deleted file mode 100644 index 7223754d..00000000 --- a/v1/models/maintenance_mode_config_proto.go +++ /dev/null @@ -1,245 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MaintenanceModeConfigProto maintenance mode config proto -// -// swagger:model MaintenanceModeConfigProto -type MaintenanceModeConfigProto struct { - - // This specifies the absolute intervals where the maintenance schedule is - // valid, i.e. maintenance_shedule is considered only for these time ranges. - // (For example, if there is one time range with [now_usecs, now_usecs + 10 - // days], the action will be done during the maintenance_schedule for the - // next 10 days.) - // The start time must be specified. The end time can be -1 which would - // denote an indefinite maintenance mode. - ActivationTimeIntervals []*TimeRangeUsecs `json:"activationTimeIntervals"` - - // The schedule to be followed in the activation_time_intervals. - MaintenanceSchedule *ScheduleProto `json:"maintenanceSchedule,omitempty"` - - // User provided message associated with this maintenance mode. - UserMessage *string `json:"userMessage,omitempty"` - - // The type of intervention for different workflows when the source goes - // into maintenance mode. By default, the workflows not in this vec have - // kNoIntervention, i.e., the workflow will proceed to completion. - WorkflowInterventionSpecVec []*MaintenanceModeConfigProtoWorkflowInterventionSpec `json:"workflowInterventionSpecVec"` -} - -// Validate validates this maintenance mode config proto -func (m *MaintenanceModeConfigProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActivationTimeIntervals(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWorkflowInterventionSpecVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MaintenanceModeConfigProto) validateActivationTimeIntervals(formats strfmt.Registry) error { - if swag.IsZero(m.ActivationTimeIntervals) { // not required - return nil - } - - for i := 0; i < len(m.ActivationTimeIntervals); i++ { - if swag.IsZero(m.ActivationTimeIntervals[i]) { // not required - continue - } - - if m.ActivationTimeIntervals[i] != nil { - if err := m.ActivationTimeIntervals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfigProto) validateMaintenanceSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceSchedule) { // not required - return nil - } - - if m.MaintenanceSchedule != nil { - if err := m.MaintenanceSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceSchedule") - } - return err - } - } - - return nil -} - -func (m *MaintenanceModeConfigProto) validateWorkflowInterventionSpecVec(formats strfmt.Registry) error { - if swag.IsZero(m.WorkflowInterventionSpecVec) { // not required - return nil - } - - for i := 0; i < len(m.WorkflowInterventionSpecVec); i++ { - if swag.IsZero(m.WorkflowInterventionSpecVec[i]) { // not required - continue - } - - if m.WorkflowInterventionSpecVec[i] != nil { - if err := m.WorkflowInterventionSpecVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workflowInterventionSpecVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workflowInterventionSpecVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this maintenance mode config proto based on the context it is used -func (m *MaintenanceModeConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActivationTimeIntervals(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWorkflowInterventionSpecVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MaintenanceModeConfigProto) contextValidateActivationTimeIntervals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActivationTimeIntervals); i++ { - - if m.ActivationTimeIntervals[i] != nil { - - if swag.IsZero(m.ActivationTimeIntervals[i]) { // not required - return nil - } - - if err := m.ActivationTimeIntervals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfigProto) contextValidateMaintenanceSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceSchedule != nil { - - if swag.IsZero(m.MaintenanceSchedule) { // not required - return nil - } - - if err := m.MaintenanceSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceSchedule") - } - return err - } - } - - return nil -} - -func (m *MaintenanceModeConfigProto) contextValidateWorkflowInterventionSpecVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WorkflowInterventionSpecVec); i++ { - - if m.WorkflowInterventionSpecVec[i] != nil { - - if swag.IsZero(m.WorkflowInterventionSpecVec[i]) { // not required - return nil - } - - if err := m.WorkflowInterventionSpecVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workflowInterventionSpecVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workflowInterventionSpecVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MaintenanceModeConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MaintenanceModeConfigProto) UnmarshalBinary(b []byte) error { - var res MaintenanceModeConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/maintenance_mode_config_proto_workflow_intervention_spec.go b/v1/models/maintenance_mode_config_proto_workflow_intervention_spec.go deleted file mode 100644 index ce7c9b5d..00000000 --- a/v1/models/maintenance_mode_config_proto_workflow_intervention_spec.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" -) - -// MaintenanceModeConfigProtoWorkflowInterventionSpec This represents the intervention for each workflow type. -// -// swagger:model MaintenanceModeConfigProto_WorkflowInterventionSpec -type MaintenanceModeConfigProtoWorkflowInterventionSpec struct { - - // intervention - Intervention *int32 `json:"intervention,omitempty"` - - // workflow type - WorkflowType *int32 `json:"workflowType,omitempty"` -} - -// Validate validates this maintenance mode config proto workflow intervention spec -func (m *MaintenanceModeConfigProtoWorkflowInterventionSpec) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this maintenance mode config proto workflow intervention spec based on context it is used -func (m *MaintenanceModeConfigProtoWorkflowInterventionSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MaintenanceModeConfigProtoWorkflowInterventionSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MaintenanceModeConfigProtoWorkflowInterventionSpec) UnmarshalBinary(b []byte) error { - var res MaintenanceModeConfigProtoWorkflowInterventionSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/management_server.go b/v1/models/management_server.go deleted file mode 100644 index e665d805..00000000 --- a/v1/models/management_server.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" -) - -// ManagementServer This message represents management server registered on the prism endpoint -// -// swagger:model ManagementServer -type ManagementServer struct { - - // IP address of the management server. - IPAddress *string `json:"ipAddress,omitempty"` - - // Management server type. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this management server -func (m *ManagementServer) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this management server based on context it is used -func (m *ManagementServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ManagementServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ManagementServer) UnmarshalBinary(b []byte) error { - var res ManagementServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_aux_data.go b/v1/models/map_reduce_aux_data.go deleted file mode 100644 index 0b871cb1..00000000 --- a/v1/models/map_reduce_aux_data.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MapReduceAuxData This message encapsulates auxillary data for a MapReduce. One example of -// such data is saved patterns for Pattern finder app. -// -// swagger:model MapReduceAuxData -type MapReduceAuxData struct { - - // Pattern auxiliary data for a MapReduce. - PatternVec []*Pattern `json:"patternVec"` -} - -// Validate validates this map reduce aux data -func (m *MapReduceAuxData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatternVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceAuxData) validatePatternVec(formats strfmt.Registry) error { - if swag.IsZero(m.PatternVec) { // not required - return nil - } - - for i := 0; i < len(m.PatternVec); i++ { - if swag.IsZero(m.PatternVec[i]) { // not required - continue - } - - if m.PatternVec[i] != nil { - if err := m.PatternVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("patternVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("patternVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this map reduce aux data based on the context it is used -func (m *MapReduceAuxData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePatternVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceAuxData) contextValidatePatternVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PatternVec); i++ { - - if m.PatternVec[i] != nil { - - if swag.IsZero(m.PatternVec[i]) { // not required - return nil - } - - if err := m.PatternVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("patternVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("patternVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceAuxData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceAuxData) UnmarshalBinary(b []byte) error { - var res MapReduceAuxData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_file_formats.go b/v1/models/map_reduce_file_formats.go deleted file mode 100644 index b905c9f8..00000000 --- a/v1/models/map_reduce_file_formats.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" -) - -// MapReduceFileFormats Map Reduce File Formats. -// -// Specifies information about file formats produced by a mapo reduce instance. -// -// swagger:model MapReduceFileFormats -type MapReduceFileFormats struct { - - // Specifies the list of formats supported with integer enum mapping to file - // format. - SupportedFormats []string `json:"supportedFormats"` -} - -// Validate validates this map reduce file formats -func (m *MapReduceFileFormats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this map reduce file formats based on context it is used -func (m *MapReduceFileFormats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceFileFormats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceFileFormats) UnmarshalBinary(b []byte) error { - var res MapReduceFileFormats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_info.go b/v1/models/map_reduce_info.go deleted file mode 100644 index 8ba5fa1b..00000000 --- a/v1/models/map_reduce_info.go +++ /dev/null @@ -1,248 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MapReduceInfo Map Reduce Information. -// -// This will be used to encapsulate information about mapper and reducer only. -// On UI this will be used to show the list of available apps to the user. -// -// swagger:model MapReduceInfo -type MapReduceInfo struct { - - // app property - AppProperty *MapReduceInfoAppProperty `json:"appProperty,omitempty"` - - // Auxiliary data for map reduce. - AuxData *MapReduceAuxData `json:"auxData,omitempty"` - - // Map reduce job description. - Description *string `json:"description,omitempty"` - - // List of all excluded data sources for this app. - ExcludedDataSourceVec []int32 `json:"excludedDataSourceVec"` - - // ID of map reduce job. - ID *int64 `json:"id,omitempty"` - - // Flag to denote if this is system pre-defined app or user has written this - // app. - IsSystemDefined *bool `json:"isSystemDefined,omitempty"` - - // ID of the mapper to process the input. - MapperID *int64 `json:"mapperId,omitempty"` - - // Map reduce job name. - Name *string `json:"name,omitempty"` - - // ID of the reducer. - ReducerID *int64 `json:"reducerId,omitempty"` - - // required property vec - RequiredPropertyVec []*MapReduceInfoRequiredProperty `json:"requiredPropertyVec"` -} - -// Validate validates this map reduce info -func (m *MapReduceInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppProperty(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuxData(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRequiredPropertyVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInfo) validateAppProperty(formats strfmt.Registry) error { - if swag.IsZero(m.AppProperty) { // not required - return nil - } - - if m.AppProperty != nil { - if err := m.AppProperty.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appProperty") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appProperty") - } - return err - } - } - - return nil -} - -func (m *MapReduceInfo) validateAuxData(formats strfmt.Registry) error { - if swag.IsZero(m.AuxData) { // not required - return nil - } - - if m.AuxData != nil { - if err := m.AuxData.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auxData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auxData") - } - return err - } - } - - return nil -} - -func (m *MapReduceInfo) validateRequiredPropertyVec(formats strfmt.Registry) error { - if swag.IsZero(m.RequiredPropertyVec) { // not required - return nil - } - - for i := 0; i < len(m.RequiredPropertyVec); i++ { - if swag.IsZero(m.RequiredPropertyVec[i]) { // not required - continue - } - - if m.RequiredPropertyVec[i] != nil { - if err := m.RequiredPropertyVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requiredPropertyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requiredPropertyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this map reduce info based on the context it is used -func (m *MapReduceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppProperty(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuxData(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRequiredPropertyVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInfo) contextValidateAppProperty(ctx context.Context, formats strfmt.Registry) error { - - if m.AppProperty != nil { - - if swag.IsZero(m.AppProperty) { // not required - return nil - } - - if err := m.AppProperty.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appProperty") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appProperty") - } - return err - } - } - - return nil -} - -func (m *MapReduceInfo) contextValidateAuxData(ctx context.Context, formats strfmt.Registry) error { - - if m.AuxData != nil { - - if swag.IsZero(m.AuxData) { // not required - return nil - } - - if err := m.AuxData.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auxData") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auxData") - } - return err - } - } - - return nil -} - -func (m *MapReduceInfo) contextValidateRequiredPropertyVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RequiredPropertyVec); i++ { - - if m.RequiredPropertyVec[i] != nil { - - if swag.IsZero(m.RequiredPropertyVec[i]) { // not required - return nil - } - - if err := m.RequiredPropertyVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requiredPropertyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requiredPropertyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInfo) UnmarshalBinary(b []byte) error { - var res MapReduceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_info_app_property.go b/v1/models/map_reduce_info_app_property.go deleted file mode 100644 index c5dcb8cb..00000000 --- a/v1/models/map_reduce_info_app_property.go +++ /dev/null @@ -1,51 +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" -) - -// MapReduceInfoAppProperty AppProperty message encapsulates properties that are same across all run -// instances of an app. -// -// swagger:model MapReduceInfo_AppProperty -type MapReduceInfoAppProperty struct { - - // csv_header should be tab separated column names. - CsvHeader *string `json:"csvHeader,omitempty"` -} - -// Validate validates this map reduce info app property -func (m *MapReduceInfoAppProperty) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this map reduce info app property based on context it is used -func (m *MapReduceInfoAppProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInfoAppProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInfoAppProperty) UnmarshalBinary(b []byte) error { - var res MapReduceInfoAppProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_info_required_property.go b/v1/models/map_reduce_info_required_property.go deleted file mode 100644 index e3da7617..00000000 --- a/v1/models/map_reduce_info_required_property.go +++ /dev/null @@ -1,61 +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" -) - -// MapReduceInfoRequiredProperty A required property represents a property that user must set before -// invoking a mapreduction instance. e.g., SimpleGrepMapper will require a -// property named searchPattern to be set. -// -// swagger:model MapReduceInfo_RequiredProperty -type MapReduceInfoRequiredProperty struct { - - // Default Value of the property. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Description of this property - Description *string `json:"description,omitempty"` - - // Whether the property is required or optional. - IsRequired *bool `json:"isRequired,omitempty"` - - // Name of the property. - Name *string `json:"name,omitempty"` -} - -// Validate validates this map reduce info required property -func (m *MapReduceInfoRequiredProperty) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this map reduce info required property based on context it is used -func (m *MapReduceInfoRequiredProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInfoRequiredProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInfoRequiredProperty) UnmarshalBinary(b []byte) error { - var res MapReduceInfoRequiredProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_instance.go b/v1/models/map_reduce_instance.go deleted file mode 100644 index 80fef430..00000000 --- a/v1/models/map_reduce_instance.go +++ /dev/null @@ -1,283 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MapReduceInstance Map Reduce Instance. -// -// Information about a Map reduce instance. An instance can be run only once. -// -// swagger:model MapReduceInstance -type MapReduceInstance struct { - - // System generated ID of map reduce instance. - ID *int64 `json:"id,omitempty"` - - // input params - InputParams []*MapReduceInstanceInputParam `json:"inputParams"` - - // Input spec for the MR. - InputSpec *InputSpec `json:"inputSpec,omitempty"` - - // ID of Map reduce info. - MapReduceInfoID *int64 `json:"mapReduceInfoId,omitempty"` - - // Output spec for the MR. - OutputSpec *OutputSpec `json:"outputSpec,omitempty"` - - // Information about run of this instance. All fields of RunInfo will be - // populated by yoda/analytics components. - RunInfo *MapReduceInstanceRunInfo `json:"runInfo,omitempty"` -} - -// Validate validates this map reduce instance -func (m *MapReduceInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInputParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInputSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutputSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInstance) validateInputParams(formats strfmt.Registry) error { - if swag.IsZero(m.InputParams) { // not required - return nil - } - - for i := 0; i < len(m.InputParams); i++ { - if swag.IsZero(m.InputParams[i]) { // not required - continue - } - - if m.InputParams[i] != nil { - if err := m.InputParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MapReduceInstance) validateInputSpec(formats strfmt.Registry) error { - if swag.IsZero(m.InputSpec) { // not required - return nil - } - - if m.InputSpec != nil { - if err := m.InputSpec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputSpec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputSpec") - } - return err - } - } - - return nil -} - -func (m *MapReduceInstance) validateOutputSpec(formats strfmt.Registry) error { - if swag.IsZero(m.OutputSpec) { // not required - return nil - } - - if m.OutputSpec != nil { - if err := m.OutputSpec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputSpec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputSpec") - } - return err - } - } - - return nil -} - -func (m *MapReduceInstance) validateRunInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RunInfo) { // not required - return nil - } - - if m.RunInfo != nil { - if err := m.RunInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this map reduce instance based on the context it is used -func (m *MapReduceInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInputParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInputSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutputSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInstance) contextValidateInputParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InputParams); i++ { - - if m.InputParams[i] != nil { - - if swag.IsZero(m.InputParams[i]) { // not required - return nil - } - - if err := m.InputParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MapReduceInstance) contextValidateInputSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.InputSpec != nil { - - if swag.IsZero(m.InputSpec) { // not required - return nil - } - - if err := m.InputSpec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputSpec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputSpec") - } - return err - } - } - - return nil -} - -func (m *MapReduceInstance) contextValidateOutputSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.OutputSpec != nil { - - if swag.IsZero(m.OutputSpec) { // not required - return nil - } - - if err := m.OutputSpec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputSpec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputSpec") - } - return err - } - } - - return nil -} - -func (m *MapReduceInstance) contextValidateRunInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RunInfo != nil { - - if swag.IsZero(m.RunInfo) { // not required - return nil - } - - if err := m.RunInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInstance) UnmarshalBinary(b []byte) error { - var res MapReduceInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_instance_input_param.go b/v1/models/map_reduce_instance_input_param.go deleted file mode 100644 index b470be73..00000000 --- a/v1/models/map_reduce_instance_input_param.go +++ /dev/null @@ -1,54 +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" -) - -// MapReduceInstanceInputParam User can also pass Input params to run a map reduce. E.g. a grep MR -// will need input about what to grep. -// -// swagger:model MapReduceInstance_InputParam -type MapReduceInstanceInputParam struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this map reduce instance input param -func (m *MapReduceInstanceInputParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this map reduce instance input param based on context it is used -func (m *MapReduceInstanceInputParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInstanceInputParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInstanceInputParam) UnmarshalBinary(b []byte) error { - var res MapReduceInstanceInputParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_instance_run_info.go b/v1/models/map_reduce_instance_run_info.go deleted file mode 100644 index 9de94133..00000000 --- a/v1/models/map_reduce_instance_run_info.go +++ /dev/null @@ -1,101 +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" -) - -// MapReduceInstanceRunInfo Stores the progress of run of this instance. -// -// swagger:model MapReduceInstance_RunInfo -type MapReduceInstanceRunInfo struct { - - // Time when map redcue job completed. - EndTime *int64 `json:"endTime,omitempty"` - - // If this run failed, then error message for failure. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Time (in usecs) when job was picked up for execution. - ExecutionStartTimeUsecs *int64 `json:"executionStartTimeUsecs,omitempty"` - - // Number of files processed in this run. - FilesProcessed *int32 `json:"filesProcessed,omitempty"` - - // Time (in usecs) when map tasks were done. - MapDoneTimeUsecs *int64 `json:"mapDoneTimeUsecs,omitempty"` - - // Total size of data processed by this run in bytes. - MapInputBytes *int64 `json:"mapInputBytes,omitempty"` - - // Number of mappers spawned till now. - MappersSpawned *int32 `json:"mappersSpawned,omitempty"` - - // Number of outputs from mappers. - NumMapOutputs *int64 `json:"numMapOutputs,omitempty"` - - // Number of outputs from reducers. - NumReduceOutputs *int64 `json:"numReduceOutputs,omitempty"` - - // Percentage completion of this run so far. - PercentageCompletion *float32 `json:"percentageCompletion,omitempty"` - - // Percentage of mapper phase completed. - PercentageMapperCompletion *float32 `json:"percentageMapperCompletion,omitempty"` - - // Percentage of reducer phase completed. - PercentageReducerCompletion *float32 `json:"percentageReducerCompletion,omitempty"` - - // Number of reducers spawned till now. - ReducersSpawned *int32 `json:"reducersSpawned,omitempty"` - - // Expected remaining time in minutes for completion of this run. - RemainingTimeMins *int32 `json:"remainingTimeMins,omitempty"` - - // Time when map reduce job was started by user. - StartTime *int64 `json:"startTime,omitempty"` - - // Status of this run. - Status *int32 `json:"status,omitempty"` - - // Total number of mappers to be spawned. - TotalNumMappers *int32 `json:"totalNumMappers,omitempty"` - - // Total number of reducers to be spawned. - TotalNumReducers *int32 `json:"totalNumReducers,omitempty"` -} - -// Validate validates this map reduce instance run info -func (m *MapReduceInstanceRunInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this map reduce instance run info based on context it is used -func (m *MapReduceInstanceRunInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInstanceRunInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInstanceRunInfo) UnmarshalBinary(b []byte) error { - var res MapReduceInstanceRunInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/map_reduce_instance_wrapper.go b/v1/models/map_reduce_instance_wrapper.go deleted file mode 100644 index cae2a418..00000000 --- a/v1/models/map_reduce_instance_wrapper.go +++ /dev/null @@ -1,120 +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" -) - -// MapReduceInstanceWrapper Map Reduce Instance Wrapper. -// -// MapReduceInstanceWrapper is the struct containing the map reduce instance -// information along with the output file path information required to download -// the results set. -// -// swagger:model MapReduceInstanceWrapper -type MapReduceInstanceWrapper struct { - - // LogPath is the path of the log files for the MR instance run. - LogPath *string `json:"logPath,omitempty"` - - // InstanceInfo is the information about the map reduce application instance. - MrInstance *MapReduceInstance `json:"mrInstance,omitempty"` - - // OutputFilePathList is the list containing the output files path suffix - // that Yoda uses to build the full path of the MR instance run output files. - OutputFilePathList []string `json:"outputFilePathList"` -} - -// Validate validates this map reduce instance wrapper -func (m *MapReduceInstanceWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMrInstance(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInstanceWrapper) validateMrInstance(formats strfmt.Registry) error { - if swag.IsZero(m.MrInstance) { // not required - return nil - } - - if m.MrInstance != nil { - if err := m.MrInstance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInstance") - } - return err - } - } - - return nil -} - -// ContextValidate validate this map reduce instance wrapper based on the context it is used -func (m *MapReduceInstanceWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMrInstance(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MapReduceInstanceWrapper) contextValidateMrInstance(ctx context.Context, formats strfmt.Registry) error { - - if m.MrInstance != nil { - - if swag.IsZero(m.MrInstance) { // not required - return nil - } - - if err := m.MrInstance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInstance") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MapReduceInstanceWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapReduceInstanceWrapper) UnmarshalBinary(b []byte) error { - var res MapReduceInstanceWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mapper_info.go b/v1/models/mapper_info.go deleted file mode 100644 index ae00b74b..00000000 --- a/v1/models/mapper_info.go +++ /dev/null @@ -1,72 +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" -) - -// MapperInfo Information about a mapper. -// -// swagger:model MapperInfo -type MapperInfo struct { - - // The code of the mapper in the specified language. Should be UTF-8. - Code *string `json:"code,omitempty"` - - // Mapper ID generated by system. Absent when user is creating a new mapper. - // Mandatory in all other use cases. - ID *int64 `json:"id,omitempty"` - - // Whether the mapper is system defined. - IsSystemDefined *bool `json:"isSystemDefined,omitempty"` - - // User can write their own mapper/reducer or upload jar files containing - // mappers and reducers. If this mapper was part of a jar file, then this - // field will have the JAR name. - JarName *string `json:"jarName,omitempty"` - - // path of JAR in which this mapper was found. This is applicable only when - // this mapper was uploaded via JAR. - JarPath *string `json:"jarPath,omitempty"` - - // Language of the mapper. - Language *int32 `json:"language,omitempty"` - - // Name of the mapper. - Name *string `json:"name,omitempty"` -} - -// Validate validates this mapper info -func (m *MapperInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mapper info based on context it is used -func (m *MapperInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MapperInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MapperInfo) UnmarshalBinary(b []byte) error { - var res MapperInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mappers_wrapper.go b/v1/models/mappers_wrapper.go deleted file mode 100644 index 21b3a3f3..00000000 --- a/v1/models/mappers_wrapper.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MappersWrapper Mappers Wrapper. -// -// MappersWrapper is the struct to define the list of mappers. -// -// swagger:model MappersWrapper -type MappersWrapper struct { - - // Mappers specifies the list of available mappers in analytics workbench. - Mappers []*MapperInfo `json:"mappers"` -} - -// Validate validates this mappers wrapper -func (m *MappersWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMappers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MappersWrapper) validateMappers(formats strfmt.Registry) error { - if swag.IsZero(m.Mappers) { // not required - return nil - } - - for i := 0; i < len(m.Mappers); i++ { - if swag.IsZero(m.Mappers[i]) { // not required - continue - } - - if m.Mappers[i] != nil { - if err := m.Mappers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mappers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mappers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mappers wrapper based on the context it is used -func (m *MappersWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMappers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MappersWrapper) contextValidateMappers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Mappers); i++ { - - if m.Mappers[i] != nil { - - if swag.IsZero(m.Mappers[i]) { // not required - return nil - } - - if err := m.Mappers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mappers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mappers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MappersWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MappersWrapper) UnmarshalBinary(b []byte) error { - var res MappersWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mark_node_delete_request.go b/v1/models/mark_node_delete_request.go deleted file mode 100644 index bd308a60..00000000 --- a/v1/models/mark_node_delete_request.go +++ /dev/null @@ -1,55 +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" -) - -// MarkNodeDeleteRequest MarkNodeDeleteRequest specifies request to mark node for deletion. -// -// swagger:model MarkNodeDeleteRequest -type MarkNodeDeleteRequest struct { - - // Id of the node to be marked for deletion. - ID *int64 `json:"id,omitempty"` - - // ValidateOnly param. - // If ValidateOnly is true, API returns only the pre-check validations. - // Default is set to false. - ValidateOnly *bool `json:"validateOnly,omitempty"` -} - -// Validate validates this mark node delete request -func (m *MarkNodeDeleteRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mark node delete request based on context it is used -func (m *MarkNodeDeleteRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MarkNodeDeleteRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MarkNodeDeleteRequest) UnmarshalBinary(b []byte) error { - var res MarkNodeDeleteRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mcm_user_profile.go b/v1/models/mcm_user_profile.go deleted file mode 100644 index ff993d19..00000000 --- a/v1/models/mcm_user_profile.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// McmUserProfile Specfies the User profile for MCM user. -// -// swagger:model McmUserProfile -type McmUserProfile struct { - - // Specifies the list of clusters. This is only valid if tenant type is - // OnPrem. - ClusterIdentifiers []*ClusterIdentifier `json:"clusterIdentifiers"` - - // Specifies whether or not the tenant is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether or not the tenant is deleted. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // Specifies the list of regions. This is only valid if tenant type is - // Dmaas. - RegionIds []string `json:"regionIds"` - - // Specifies the tenant id. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant name. - TenantName *string `json:"tenantName,omitempty"` - - // Specifies the MCM tenant type. - // 'Dmaas' implies tenant type is DMaaS. - // 'Mcm' implies tenant is Mcm Cluster tenant. - // Enum: ["Dmaas","Mcm"] - TenantType *string `json:"tenantType,omitempty"` -} - -// Validate validates this mcm user profile -func (m *McmUserProfile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIdentifiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmUserProfile) validateClusterIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifiers) { // not required - return nil - } - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - continue - } - - if m.ClusterIdentifiers[i] != nil { - if err := m.ClusterIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var mcmUserProfileTypeTenantTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Dmaas","Mcm"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmUserProfileTypeTenantTypePropEnum = append(mcmUserProfileTypeTenantTypePropEnum, v) - } -} - -const ( - - // McmUserProfileTenantTypeDmaas captures enum value "Dmaas" - McmUserProfileTenantTypeDmaas string = "Dmaas" - - // McmUserProfileTenantTypeMcm captures enum value "Mcm" - McmUserProfileTenantTypeMcm string = "Mcm" -) - -// prop value enum -func (m *McmUserProfile) validateTenantTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmUserProfileTypeTenantTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmUserProfile) validateTenantType(formats strfmt.Registry) error { - if swag.IsZero(m.TenantType) { // not required - return nil - } - - // value enum - if err := m.validateTenantTypeEnum("tenantType", "body", *m.TenantType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this mcm user profile based on the context it is used -func (m *McmUserProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmUserProfile) contextValidateClusterIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - - if m.ClusterIdentifiers[i] != nil { - - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - return nil - } - - if err := m.ClusterIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *McmUserProfile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmUserProfile) UnmarshalBinary(b []byte) error { - var res McmUserProfile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/metric_data_block.go b/v1/models/metric_data_block.go deleted file mode 100644 index c7add14c..00000000 --- a/v1/models/metric_data_block.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MetricDataBlock Metric Data Block. -// -// Specifies a series of metric data points for a time series. -// -// swagger:model MetricDataBlock -type MetricDataBlock struct { - - // Array of Data Points. - // - // Specifies a list of metric data points for a time series. - DataPointVec []*MetricDataPoint `json:"dataPointVec"` - - // Specifies the name of a metric such as 'kDiskAwaitTimeMsecs'. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the data type of the data points. - // 0 specifies a data point of type Int64. - // 1 specifies a data point of type Double. - // 2 specifies a data point of type String. - // 3 specifies a data point of type Bytes. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this metric data block -func (m *MetricDataBlock) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataPointVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MetricDataBlock) validateDataPointVec(formats strfmt.Registry) error { - if swag.IsZero(m.DataPointVec) { // not required - return nil - } - - for i := 0; i < len(m.DataPointVec); i++ { - if swag.IsZero(m.DataPointVec[i]) { // not required - continue - } - - if m.DataPointVec[i] != nil { - if err := m.DataPointVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this metric data block based on the context it is used -func (m *MetricDataBlock) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataPointVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MetricDataBlock) contextValidateDataPointVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataPointVec); i++ { - - if m.DataPointVec[i] != nil { - - if swag.IsZero(m.DataPointVec[i]) { // not required - return nil - } - - if err := m.DataPointVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MetricDataBlock) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MetricDataBlock) UnmarshalBinary(b []byte) error { - var res MetricDataBlock - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/metric_data_point.go b/v1/models/metric_data_point.go deleted file mode 100644 index e2d944de..00000000 --- a/v1/models/metric_data_point.go +++ /dev/null @@ -1,121 +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" -) - -// MetricDataPoint Metric Data Point. -// -// Specifies information about a single data point in a time series. -// -// swagger:model MetricDataPoint -type MetricDataPoint struct { - - // Corresponding value of a metric at the given timestamp. When client - // adds or pushes the stats, this field must be specified. When Stats module, - // returns the time series data, this field could be empty if data point is - // not available for the given timestamp. - Data *ValueData `json:"data,omitempty"` - - // If this is a rolled up data point, following enum denotes the rollup - // function used for rolling up. For a raw point this enum is not set. - RollupFunction *int32 `json:"rollupFunction,omitempty"` - - // Specifies a timestamp when the metric data point was captured. - TimestampMsecs *int64 `json:"timestampMsecs,omitempty"` -} - -// Validate validates this metric data point -func (m *MetricDataPoint) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MetricDataPoint) validateData(formats strfmt.Registry) error { - if swag.IsZero(m.Data) { // not required - return nil - } - - if m.Data != nil { - if err := m.Data.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("data") - } - return err - } - } - - return nil -} - -// ContextValidate validate this metric data point based on the context it is used -func (m *MetricDataPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateData(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MetricDataPoint) contextValidateData(ctx context.Context, formats strfmt.Registry) error { - - if m.Data != nil { - - if swag.IsZero(m.Data) { // not required - return nil - } - - if err := m.Data.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("data") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MetricDataPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MetricDataPoint) UnmarshalBinary(b []byte) error { - var res MetricDataPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/metric_value.go b/v1/models/metric_value.go deleted file mode 100644 index 8f1de825..00000000 --- a/v1/models/metric_value.go +++ /dev/null @@ -1,118 +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" -) - -// MetricValue Metric Value. -// -// Specifies one data point of a metric. -// -// swagger:model MetricValue -type MetricValue struct { - - // Specifies the metric name. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the creation time of a data point as a Unix epoch Timestamp - // (in milliseconds). - TimestampMsecs *int64 `json:"timestampMsecs,omitempty"` - - // Specifies the value of the data point. - Value *Value `json:"value,omitempty"` -} - -// Validate validates this metric value -func (m *MetricValue) 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 -} - -func (m *MetricValue) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this metric value based on the context it is used -func (m *MetricValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MetricValue) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MetricValue) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MetricValue) UnmarshalBinary(b []byte) error { - var res MetricValue - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mfa_info.go b/v1/models/mfa_info.go deleted file mode 100644 index 4f6262f6..00000000 --- a/v1/models/mfa_info.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" - "github.com/go-openapi/validate" -) - -// MfaInfo MfaInfo. -// -// Specifies information about MFA. -// -// swagger:model MfaInfo -type MfaInfo struct { - - // Specifies if email OTP setup is done on the user. - // Read Only: true - IsEmailOtpSetupDone *bool `json:"isEmailOtpSetupDone,omitempty"` - - // Specifies if TOTP setup is done on the user. - // Read Only: true - IsTotpSetupDone *bool `json:"isTotpSetupDone,omitempty"` - - // Specifies if MFA is disabled on the user. - IsUserExemptFromMfa *bool `json:"isUserExemptFromMfa,omitempty"` -} - -// Validate validates this mfa info -func (m *MfaInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this mfa info based on the context it is used -func (m *MfaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIsEmailOtpSetupDone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsTotpSetupDone(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MfaInfo) contextValidateIsEmailOtpSetupDone(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isEmailOtpSetupDone", "body", m.IsEmailOtpSetupDone); err != nil { - return err - } - - return nil -} - -func (m *MfaInfo) contextValidateIsTotpSetupDone(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isTotpSetupDone", "body", m.IsTotpSetupDone); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MfaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MfaInfo) UnmarshalBinary(b []byte) error { - var res MfaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/migrate_oracle_clone_params.go b/v1/models/migrate_oracle_clone_params.go deleted file mode 100644 index 656db9a7..00000000 --- a/v1/models/migrate_oracle_clone_params.go +++ /dev/null @@ -1,66 +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" -) - -// MigrateOracleCloneParams Refer MigrateOracleCloneParams message in /magneto/base/magneto.proto -// -// OracleUpdateRestoreTaskOptions encapsulates information needed for executing -// migration of a successful Oracle Clone task. -// -// swagger:model MigrateOracleCloneParams -type MigrateOracleCloneParams struct { - - // The delay in secs, after which the migration of the Clone should be - // triggered. - // "0" - Means the Migration should start as soon as the Clone successfully - // finished. That is the default behaviour. - // - // 0 < - Means the migration will start when user triggers migration from - // UI. - // - // > 0 - Means the delay in seconds after which the migration of the clone - // would be triggered. [ For now this is not supported ] - DelaySecs *int64 `json:"delaySecs,omitempty"` - - // Vector of paths where the contents (i.e. datafile/redo-logs) of the clone - // DB will be migrated. - TargetPathVec []string `json:"targetPathVec"` -} - -// Validate validates this migrate oracle clone params -func (m *MigrateOracleCloneParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this migrate oracle clone params based on context it is used -func (m *MigrateOracleCloneParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MigrateOracleCloneParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MigrateOracleCloneParams) UnmarshalBinary(b []byte) error { - var res MigrateOracleCloneParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mirror_params.go b/v1/models/mirror_params.go deleted file mode 100644 index a149cd62..00000000 --- a/v1/models/mirror_params.go +++ /dev/null @@ -1,56 +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" -) - -// MirrorParams Parameters needed by incremental restore. -// -// swagger:model MirrorParams -type MirrorParams struct { - - // finalized - Finalized *bool `json:"finalized,omitempty"` - - // Is mirroring paused. - Paused *bool `json:"paused,omitempty"` - - // View to be used as previous view. - PreviousViewName *string `json:"previousViewName,omitempty"` -} - -// Validate validates this mirror params -func (m *MirrorParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mirror params based on context it is used -func (m *MirrorParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MirrorParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MirrorParams) UnmarshalBinary(b []byte) error { - var res MirrorParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_additional_params.go b/v1/models/mongo_d_b_additional_params.go deleted file mode 100644 index ffd6d035..00000000 --- a/v1/models/mongo_d_b_additional_params.go +++ /dev/null @@ -1,55 +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" -) - -// MongoDBAdditionalParams Contains additional parameters required for taking backup from -// this Mongo cluster. -// -// swagger:model MongoDBAdditionalParams -type MongoDBAdditionalParams struct { - - // The tag associated with the secondary nodes from which backups - // should be performed. - SecondaryNodeTag []string `json:"secondaryNodeTag"` - - // Set to true if this cluster uses secondary nodes for backup. - UseSecondaryForBackup *bool `json:"useSecondaryForBackup,omitempty"` -} - -// Validate validates this mongo d b additional params -func (m *MongoDBAdditionalParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b additional params based on context it is used -func (m *MongoDBAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBAdditionalParams) UnmarshalBinary(b []byte) error { - var res MongoDBAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_backup_job_params.go b/v1/models/mongo_d_b_backup_job_params.go deleted file mode 100644 index 36244713..00000000 --- a/v1/models/mongo_d_b_backup_job_params.go +++ /dev/null @@ -1,110 +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" -) - -// MongoDBBackupJobParams Contains any additional mongodb environment specific backup params at the -// job level. -// -// swagger:model MongoDBBackupJobParams -type MongoDBBackupJobParams struct { - - // Additional parameters required for Mongo backup - MongodbAdditionalInfo *MongoDBAdditionalParams `json:"mongodbAdditionalInfo,omitempty"` -} - -// Validate validates this mongo d b backup job params -func (m *MongoDBBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMongodbAdditionalInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBBackupJobParams) validateMongodbAdditionalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbAdditionalInfo) { // not required - return nil - } - - if m.MongodbAdditionalInfo != nil { - if err := m.MongodbAdditionalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mongo d b backup job params based on the context it is used -func (m *MongoDBBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMongodbAdditionalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBBackupJobParams) contextValidateMongodbAdditionalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbAdditionalInfo != nil { - - if swag.IsZero(m.MongodbAdditionalInfo) { // not required - return nil - } - - if err := m.MongodbAdditionalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBBackupJobParams) UnmarshalBinary(b []byte) error { - var res MongoDBBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_cluster.go b/v1/models/mongo_d_b_cluster.go deleted file mode 100644 index 4ae96e69..00000000 --- a/v1/models/mongo_d_b_cluster.go +++ /dev/null @@ -1,52 +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" -) - -// MongoDBCluster MongoDB Cluster Info. -// -// Specifies an Object containing information about a mongodb cluster. -// -// swagger:model MongoDBCluster -type MongoDBCluster struct { - - // Seeds of this MongoDB Cluster. - Seeds []string `json:"seeds"` -} - -// Validate validates this mongo d b cluster -func (m *MongoDBCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b cluster based on context it is used -func (m *MongoDBCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBCluster) UnmarshalBinary(b []byte) error { - var res MongoDBCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_collection.go b/v1/models/mongo_d_b_collection.go deleted file mode 100644 index a18e4579..00000000 --- a/v1/models/mongo_d_b_collection.go +++ /dev/null @@ -1,58 +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" -) - -// MongoDBCollection MongoDB Collection Info. -// -// Specifies an Object containing information about a mongodb collection. -// -// swagger:model MongoDBCollection -type MongoDBCollection struct { - - // Set to true if this is a capped Collection. - IsCappedCollection *bool `json:"isCappedCollection,omitempty"` - - // Set to true if this Collection is a view. - IsMongoView *bool `json:"isMongoView,omitempty"` - - // Size of this Collection. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this mongo d b collection -func (m *MongoDBCollection) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b collection based on context it is used -func (m *MongoDBCollection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBCollection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBCollection) UnmarshalBinary(b []byte) error { - var res MongoDBCollection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_connect_params.go b/v1/models/mongo_d_b_connect_params.go deleted file mode 100644 index 1183a4eb..00000000 --- a/v1/models/mongo_d_b_connect_params.go +++ /dev/null @@ -1,135 +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" -) - -// MongoDBConnectParams MongoDB Connect Params. -// -// Specifies an Object containing information about a registered mongodb -// source. -// -// swagger:model MongoDBConnectParams -type MongoDBConnectParams struct { - - // Specifies whether authentication is configured on this MongoDB cluster. - // Specifies the type of an MongoDB source entity. - // 'SCRAM' - // 'LDAP' - // 'NONE' - // 'KERBEROS' - // Enum: ["SCRAM","LDAP","NONE","KERBEROS"] - AuthType *string `json:"authType,omitempty"` - - // Specifies the Authenticating Database for this MongoDB cluster. - AuthenticatingDatabaseName *string `json:"authenticatingDatabaseName,omitempty"` - - // Specifies whether connection is allowed through SSL only in this cluster. - RequiresSsl *bool `json:"requiresSsl,omitempty"` - - // MongoDB Secondary node tag. Required only if 'useSecondaryForBackup' is true. - // The system will use this to identify the secondary nodes for reading backup data. - SecondaryNodeTag *string `json:"secondaryNodeTag,omitempty"` - - // Specifies the seeds of this MongoDB Cluster. - Seeds []string `json:"seeds"` - - // Set this to true if you want the system to peform backups from secondary nodes. - UseSecondaryForBackup *bool `json:"useSecondaryForBackup,omitempty"` -} - -// Validate validates this mongo d b connect params -func (m *MongoDBConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mongoDBConnectParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SCRAM","LDAP","NONE","KERBEROS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongoDBConnectParamsTypeAuthTypePropEnum = append(mongoDBConnectParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // MongoDBConnectParamsAuthTypeSCRAM captures enum value "SCRAM" - MongoDBConnectParamsAuthTypeSCRAM string = "SCRAM" - - // MongoDBConnectParamsAuthTypeLDAP captures enum value "LDAP" - MongoDBConnectParamsAuthTypeLDAP string = "LDAP" - - // MongoDBConnectParamsAuthTypeNONE captures enum value "NONE" - MongoDBConnectParamsAuthTypeNONE string = "NONE" - - // MongoDBConnectParamsAuthTypeKERBEROS captures enum value "KERBEROS" - MongoDBConnectParamsAuthTypeKERBEROS string = "KERBEROS" -) - -// prop value enum -func (m *MongoDBConnectParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongoDBConnectParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongoDBConnectParams) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mongo d b connect params based on context it is used -func (m *MongoDBConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBConnectParams) UnmarshalBinary(b []byte) error { - var res MongoDBConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_database.go b/v1/models/mongo_d_b_database.go deleted file mode 100644 index be1c0208..00000000 --- a/v1/models/mongo_d_b_database.go +++ /dev/null @@ -1,52 +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" -) - -// MongoDBDatabase MongoDB Database Info. -// -// Specifies an Object containing information about a mongodb database. -// -// swagger:model MongoDBDatabase -type MongoDBDatabase struct { - - // Size of this Database. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this mongo d b database -func (m *MongoDBDatabase) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b database based on context it is used -func (m *MongoDBDatabase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBDatabase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBDatabase) UnmarshalBinary(b []byte) error { - var res MongoDBDatabase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_protection_source.go b/v1/models/mongo_d_b_protection_source.go deleted file mode 100644 index 40313e62..00000000 --- a/v1/models/mongo_d_b_protection_source.go +++ /dev/null @@ -1,282 +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" -) - -// MongoDBProtectionSource MongoDB Protection Source. -// -// Specifies an Object representing MongoDB. -// -// swagger:model MongoDBProtectionSource -type MongoDBProtectionSource struct { - - // Information of a mongodb cluster, only valid for an entity of type - // kCluster. - ClusterInfo *MongoDBCluster `json:"clusterInfo,omitempty"` - - // Information about a mongodb collection, only valid for an entity of type - // kCollection. - CollectionInfo *MongoDBCollection `json:"collectionInfo,omitempty"` - - // Information of a mongodb database, only valid for an entity of type - // kDatabase. - DatabaseInfo *MongoDBDatabase `json:"databaseInfo,omitempty"` - - // Specifies the instance name of the MongoDB entity. - Name *string `json:"name,omitempty"` - - // Specifies the type of the managed Object in MongoDB Protection Source. - // Specifies the type of an MongoDB source entity. - // 'kCluster' indicates a mongodb cluster distributed over several physical - // nodes. - // 'kDatabase' indicates a Database within the MongoDB environment. - // 'kCollection' indicates a Collection in the MongoDB enironment. - // Enum: ["kCluster","kDatabase","kCollection"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the MongoDB entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this mongo d b protection source -func (m *MongoDBProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCollectionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBProtectionSource) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *MongoDBProtectionSource) validateCollectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CollectionInfo) { // not required - return nil - } - - if m.CollectionInfo != nil { - if err := m.CollectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("collectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("collectionInfo") - } - return err - } - } - - return nil -} - -func (m *MongoDBProtectionSource) validateDatabaseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseInfo) { // not required - return nil - } - - if m.DatabaseInfo != nil { - if err := m.DatabaseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseInfo") - } - return err - } - } - - return nil -} - -var mongoDBProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kDatabase","kCollection"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongoDBProtectionSourceTypeTypePropEnum = append(mongoDBProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // MongoDBProtectionSourceTypeKCluster captures enum value "kCluster" - MongoDBProtectionSourceTypeKCluster string = "kCluster" - - // MongoDBProtectionSourceTypeKDatabase captures enum value "kDatabase" - MongoDBProtectionSourceTypeKDatabase string = "kDatabase" - - // MongoDBProtectionSourceTypeKCollection captures enum value "kCollection" - MongoDBProtectionSourceTypeKCollection string = "kCollection" -) - -// prop value enum -func (m *MongoDBProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongoDBProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongoDBProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this mongo d b protection source based on the context it is used -func (m *MongoDBProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCollectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabaseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBProtectionSource) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *MongoDBProtectionSource) contextValidateCollectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CollectionInfo != nil { - - if swag.IsZero(m.CollectionInfo) { // not required - return nil - } - - if err := m.CollectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("collectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("collectionInfo") - } - return err - } - } - - return nil -} - -func (m *MongoDBProtectionSource) contextValidateDatabaseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatabaseInfo != nil { - - if swag.IsZero(m.DatabaseInfo) { // not required - return nil - } - - if err := m.DatabaseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBProtectionSource) UnmarshalBinary(b []byte) error { - var res MongoDBProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mongo_d_b_recover_job_params.go b/v1/models/mongo_d_b_recover_job_params.go deleted file mode 100644 index 6f15bbc4..00000000 --- a/v1/models/mongo_d_b_recover_job_params.go +++ /dev/null @@ -1,51 +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" -) - -// MongoDBRecoverJobParams Contains any additional mongodb environment specific params for the -// recover job. -// -// swagger:model MongoDBRecoverJobParams -type MongoDBRecoverJobParams struct { - - // A suffix that is to be applied to all recovered entities - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this mongo d b recover job params -func (m *MongoDBRecoverJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b recover job params based on context it is used -func (m *MongoDBRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBRecoverJobParams) UnmarshalBinary(b []byte) error { - var res MongoDBRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/monthly_schedule.go b/v1/models/monthly_schedule.go deleted file mode 100644 index a26478a7..00000000 --- a/v1/models/monthly_schedule.go +++ /dev/null @@ -1,203 +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" -) - -// MonthlySchedule Monthly Schedule. -// -// Specifies a monthly backup schedule by specifying a day in the week -// and a week in the month. -// For example, if day is set to 'kMonday' and dayCount is set -// to 'kThird', a Job Run is started on the third Monday of every month. -// -// swagger:model MonthlySchedule -type MonthlySchedule struct { - - // Specifies the day of the week (such as 'kMonday') to start the Job Run. - // Used with day count to define the day in the month to start - // the Job Run. - // Specifies a day in a week such as 'kSunday', 'kMonday', etc. - // Enum: ["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"] - Day *string `json:"day,omitempty"` - - // Specifies the day count in the month (such as 'kThird') to start - // the Job Run. - // Used in combination with day to define the day in the month to start - // the Job Run. - // Specifies the day count in the month to start the backup. - // For example if day count is set to 'kThird' and day is set to 'kMonday', - // a backup is performed on the third Monday of every month. - // 'kFirst' indicates that the first week should be chosen for specified - // day of every month. - // 'kSecond' indicates that the second week should be chosen for specified - // day of every month. - // 'kThird' indicates that the third week should be chosen for specified - // day of every month. - // 'kFourth' indicates that the fourth week should be chosen for specified - // day of every month. - // 'kLast' indicates that the last week should be chosen for specified - // day of every month. - // Enum: ["kFirst","kSecond","kThird","kFourth","kLast"] - DayCount *string `json:"dayCount,omitempty"` -} - -// Validate validates this monthly schedule -func (m *MonthlySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDay(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDayCount(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var monthlyScheduleTypeDayPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - monthlyScheduleTypeDayPropEnum = append(monthlyScheduleTypeDayPropEnum, v) - } -} - -const ( - - // MonthlyScheduleDayKSunday captures enum value "kSunday" - MonthlyScheduleDayKSunday string = "kSunday" - - // MonthlyScheduleDayKMonday captures enum value "kMonday" - MonthlyScheduleDayKMonday string = "kMonday" - - // MonthlyScheduleDayKTuesday captures enum value "kTuesday" - MonthlyScheduleDayKTuesday string = "kTuesday" - - // MonthlyScheduleDayKWednesday captures enum value "kWednesday" - MonthlyScheduleDayKWednesday string = "kWednesday" - - // MonthlyScheduleDayKThursday captures enum value "kThursday" - MonthlyScheduleDayKThursday string = "kThursday" - - // MonthlyScheduleDayKFriday captures enum value "kFriday" - MonthlyScheduleDayKFriday string = "kFriday" - - // MonthlyScheduleDayKSaturday captures enum value "kSaturday" - MonthlyScheduleDayKSaturday string = "kSaturday" -) - -// prop value enum -func (m *MonthlySchedule) validateDayEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, monthlyScheduleTypeDayPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MonthlySchedule) validateDay(formats strfmt.Registry) error { - if swag.IsZero(m.Day) { // not required - return nil - } - - // value enum - if err := m.validateDayEnum("day", "body", *m.Day); err != nil { - return err - } - - return nil -} - -var monthlyScheduleTypeDayCountPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFirst","kSecond","kThird","kFourth","kLast"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - monthlyScheduleTypeDayCountPropEnum = append(monthlyScheduleTypeDayCountPropEnum, v) - } -} - -const ( - - // MonthlyScheduleDayCountKFirst captures enum value "kFirst" - MonthlyScheduleDayCountKFirst string = "kFirst" - - // MonthlyScheduleDayCountKSecond captures enum value "kSecond" - MonthlyScheduleDayCountKSecond string = "kSecond" - - // MonthlyScheduleDayCountKThird captures enum value "kThird" - MonthlyScheduleDayCountKThird string = "kThird" - - // MonthlyScheduleDayCountKFourth captures enum value "kFourth" - MonthlyScheduleDayCountKFourth string = "kFourth" - - // MonthlyScheduleDayCountKLast captures enum value "kLast" - MonthlyScheduleDayCountKLast string = "kLast" -) - -// prop value enum -func (m *MonthlySchedule) validateDayCountEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, monthlyScheduleTypeDayCountPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MonthlySchedule) validateDayCount(formats strfmt.Registry) error { - if swag.IsZero(m.DayCount) { // not required - return nil - } - - // value enum - if err := m.validateDayCountEnum("dayCount", "body", *m.DayCount); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this monthly schedule based on context it is used -func (m *MonthlySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MonthlySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MonthlySchedule) UnmarshalBinary(b []byte) error { - var res MonthlySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_point_info.go b/v1/models/mount_point_info.go deleted file mode 100644 index b292367d..00000000 --- a/v1/models/mount_point_info.go +++ /dev/null @@ -1,187 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MountPointInfo Proto that contains information about a mount point. -// -// swagger:model MountPointInfo -type MountPointInfo struct { - - // The groupnet of the zone this mount point belongs to. - Groupnet *string `json:"groupnet,omitempty"` - - // Information about NFS export. Only valid if this mount point is exposed - // through NFS protocol. - NfsInfo *MountPointInfoNfsInfo `json:"nfsInfo,omitempty"` - - // The path of this mount point in ifs. This should include the leading - // "/ifs/". - Path *string `json:"path,omitempty"` - - // Information about SMB shares. Only valid if this mount point is exposed - // through SMB protocol. - SmbInfoVec []*MountPointInfoSmbInfo `json:"smbInfoVec"` - - // List of protocols that expose this mount point. - SupportedProtocolVec []int32 `json:"supportedProtocolVec"` - - // The string zone ID to which this mount point belongs. - ZoneID *string `json:"zoneId,omitempty"` -} - -// Validate validates this mount point info -func (m *MountPointInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountPointInfo) validateNfsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if m.NfsInfo != nil { - if err := m.NfsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -func (m *MountPointInfo) validateSmbInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.SmbInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.SmbInfoVec); i++ { - if swag.IsZero(m.SmbInfoVec[i]) { // not required - continue - } - - if m.SmbInfoVec[i] != nil { - if err := m.SmbInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mount point info based on the context it is used -func (m *MountPointInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNfsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountPointInfo) contextValidateNfsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsInfo != nil { - - if swag.IsZero(m.NfsInfo) { // not required - return nil - } - - if err := m.NfsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsInfo") - } - return err - } - } - - return nil -} - -func (m *MountPointInfo) contextValidateSmbInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SmbInfoVec); i++ { - - if m.SmbInfoVec[i] != nil { - - if swag.IsZero(m.SmbInfoVec[i]) { // not required - return nil - } - - if err := m.SmbInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountPointInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountPointInfo) UnmarshalBinary(b []byte) error { - var res MountPointInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_point_info_nfs_info.go b/v1/models/mount_point_info_nfs_info.go deleted file mode 100644 index af22e547..00000000 --- a/v1/models/mount_point_info_nfs_info.go +++ /dev/null @@ -1,57 +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" -) - -// MountPointInfoNfsInfo Message to encapsulate information related to NFS protocol for this mount -// point. -// -// swagger:model MountPointInfo_NfsInfo -type MountPointInfoNfsInfo struct { - - // Description of this NFS export. - Description *string `json:"description,omitempty"` - - // The integer ID of this NFS export. - ID *int64 `json:"id,omitempty"` - - // The string ID of the access zone this NFS export belongs to. - ZoneID *string `json:"zoneId,omitempty"` -} - -// Validate validates this mount point info nfs info -func (m *MountPointInfoNfsInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mount point info nfs info based on context it is used -func (m *MountPointInfoNfsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MountPointInfoNfsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountPointInfoNfsInfo) UnmarshalBinary(b []byte) error { - var res MountPointInfoNfsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_point_info_smb_info.go b/v1/models/mount_point_info_smb_info.go deleted file mode 100644 index 6151624a..00000000 --- a/v1/models/mount_point_info_smb_info.go +++ /dev/null @@ -1,57 +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" -) - -// MountPointInfoSmbInfo Message to encapsulate information related to SMB protocol for this mount -// point. -// -// swagger:model MountPointInfo_SmbInfo -type MountPointInfoSmbInfo struct { - - // Description of this SMB share. - Description *string `json:"description,omitempty"` - - // The string ID of this SMB share. - ID *string `json:"id,omitempty"` - - // The numeric ID of the access zone this SMB share belongs to. - ZoneID *int64 `json:"zoneId,omitempty"` -} - -// Validate validates this mount point info smb info -func (m *MountPointInfoSmbInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mount point info smb info based on context it is used -func (m *MountPointInfoSmbInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MountPointInfoSmbInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountPointInfoSmbInfo) UnmarshalBinary(b []byte) error { - var res MountPointInfoSmbInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volume_result.go b/v1/models/mount_volume_result.go deleted file mode 100644 index 1762edc5..00000000 --- a/v1/models/mount_volume_result.go +++ /dev/null @@ -1,121 +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" -) - -// MountVolumeResult This message captures result of mount of an individual volume. -// -// swagger:model MountVolumeResult -type MountVolumeResult struct { - - // This is set if there is any error during the mount. - Error *ErrorProto `json:"error,omitempty"` - - // Filesystem on this volume. - FilesystemType *string `json:"filesystemType,omitempty"` - - // This is populated with the mount point where the volume corresponding to - // the newly attached volume is mounted. - // NOTE: This may not be present in the VM environments if onlining of disks - // is not requested or if the there was any issue during onlining. - MountPoint *string `json:"mountPoint,omitempty"` - - // This is the name or mount point of the original volume. - OriginalVolumeName *string `json:"originalVolumeName,omitempty"` -} - -// Validate validates this mount volume result -func (m *MountVolumeResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumeResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this mount volume result based on the context it is used -func (m *MountVolumeResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumeResult) 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 -} - -// MarshalBinary interface implementation -func (m *MountVolumeResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumeResult) UnmarshalBinary(b []byte) error { - var res MountVolumeResult - 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 deleted file mode 100644 index ddc67e0d..00000000 --- a/v1/models/mount_volume_result_details.go +++ /dev/null @@ -1,120 +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" -) - -// MountVolumeResultDetails Mount Volume Result Details. -// -// Specifies the result of mounting an individual mount volume in a -// Restore Task. -// -// swagger:model MountVolumeResultDetails -type MountVolumeResultDetails struct { - - // mount error - MountError *MountVolumeResultDetailsMountError `json:"mountError,omitempty"` - - // Specifies the mount point where the volume is mounted. - // NOTE: This field may not be populated for VM environments if the - // onlining of disks is not requested or there was any issue during onlining. - MountPoint *string `json:"mountPoint,omitempty"` - - // Specifies the name of the original volume. - VolumeName *string `json:"volumeName,omitempty"` -} - -// Validate validates this mount volume result details -func (m *MountVolumeResultDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumeResultDetails) validateMountError(formats strfmt.Registry) error { - if swag.IsZero(m.MountError) { // not required - 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 -} - -// ContextValidate validate this mount volume result details based on the context it is used -func (m *MountVolumeResultDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *MountVolumeResultDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumeResultDetails) UnmarshalBinary(b []byte) error { - var res MountVolumeResultDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_hyper_v_params.go b/v1/models/mount_volumes_hyper_v_params.go deleted file mode 100644 index fcaa9af6..00000000 --- a/v1/models/mount_volumes_hyper_v_params.go +++ /dev/null @@ -1,116 +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" -) - -// MountVolumesHyperVParams HyperV specific additional params. -// -// swagger:model MountVolumesHyperVParams -type MountVolumesHyperVParams struct { - - // Optional setting which will determine if the volumes need to be onlined - // within the target environment after attaching the disks. - // NOTE: If this is set to true, then target_entity_credentials must be - // specified and HyperV Integration Services must be installed on the VM. - BringDisksOnline *bool `json:"bringDisksOnline,omitempty"` - - // Credentials to access the target entity such as a VM. - // This is not required if bring_disks_online is set to false. - TargetEntityCredentials *Credentials `json:"targetEntityCredentials,omitempty"` -} - -// Validate validates this mount volumes hyper v params -func (m *MountVolumesHyperVParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEntityCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesHyperVParams) validateTargetEntityCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if m.TargetEntityCredentials != nil { - if err := m.TargetEntityCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount volumes hyper v params based on the context it is used -func (m *MountVolumesHyperVParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetEntityCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesHyperVParams) contextValidateTargetEntityCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntityCredentials != nil { - - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if err := m.TargetEntityCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesHyperVParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesHyperVParams) UnmarshalBinary(b []byte) error { - var res MountVolumesHyperVParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volumes_info_proto.go b/v1/models/mount_volumes_info_proto.go deleted file mode 100644 index dfa978a8..00000000 --- a/v1/models/mount_volumes_info_proto.go +++ /dev/null @@ -1,352 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MountVolumesInfoProto Message that encapsulates information about mount volumes task for any -// of the environments we support. Environment specific mount volume infos are -// defined as extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// MountVolumesInfoProto extension Location -// ============================================================================= -// vmware::MountVolumesInfoProto::vmware_mount_volumes_info vmware/vmware.proto -// ============================================================================= -// -// swagger:model MountVolumesInfoProto -type MountVolumesInfoProto struct { - - // If an error is encountered while cleaning up state, then it will be - // captured as part of this. - CleanupError *ErrorProto `json:"cleanupError,omitempty"` - - // If the mounting of volumes failed, this field may contain the cause - // of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // This will be set to true if the task is complete on the slave. - Finished *bool `json:"finished,omitempty"` - - // Contains the result information of the mounted volumes. - MountVolumeResultVec []*MountVolumeResult `json:"mountVolumeResultVec"` - - // The state of the task that sets up and tears down the restore disks that - // are needed during the mount/teardown operation - // - // The environment specific extensions of this proto store the detailed - // status information about the task. - RestoreDisksTaskInfoProto *SetupRestoreDiskTaskInfoProto `json:"restoreDisksTaskInfoProto,omitempty"` - - // This is the timestamp at which the slave task started. - SlaveTaskStartTimeUsecs *int64 `json:"slaveTaskStartTimeUsecs,omitempty"` - - // The type of environment this mount volumes info pertains to. - Type *int32 `json:"type,omitempty"` - - // If an error was encountered while onlining the disks within the VM, then - // this will capture that error. This is only applicable to the VMware - // environment. - VMOnlineDisksError *ErrorProto `json:"vmOnlineDisksError,omitempty"` -} - -// Validate validates this mount volumes info proto -func (m *MountVolumesInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCleanupError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumeResultVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreDisksTaskInfoProto(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMOnlineDisksError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesInfoProto) validateCleanupError(formats strfmt.Registry) error { - if swag.IsZero(m.CleanupError) { // not required - return nil - } - - if m.CleanupError != nil { - if err := m.CleanupError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupError") - } - return err - } - } - - return nil -} - -func (m *MountVolumesInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *MountVolumesInfoProto) validateMountVolumeResultVec(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumeResultVec) { // not required - return nil - } - - for i := 0; i < len(m.MountVolumeResultVec); i++ { - if swag.IsZero(m.MountVolumeResultVec[i]) { // not required - continue - } - - if m.MountVolumeResultVec[i] != nil { - if err := m.MountVolumeResultVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MountVolumesInfoProto) validateRestoreDisksTaskInfoProto(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreDisksTaskInfoProto) { // not required - return nil - } - - if m.RestoreDisksTaskInfoProto != nil { - if err := m.RestoreDisksTaskInfoProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreDisksTaskInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreDisksTaskInfoProto") - } - return err - } - } - - return nil -} - -func (m *MountVolumesInfoProto) validateVMOnlineDisksError(formats strfmt.Registry) error { - if swag.IsZero(m.VMOnlineDisksError) { // not required - return nil - } - - if m.VMOnlineDisksError != nil { - if err := m.VMOnlineDisksError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmOnlineDisksError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmOnlineDisksError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount volumes info proto based on the context it is used -func (m *MountVolumesInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCleanupError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumeResultVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreDisksTaskInfoProto(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMOnlineDisksError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesInfoProto) contextValidateCleanupError(ctx context.Context, formats strfmt.Registry) error { - - if m.CleanupError != nil { - - if swag.IsZero(m.CleanupError) { // not required - return nil - } - - if err := m.CleanupError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupError") - } - return err - } - } - - return nil -} - -func (m *MountVolumesInfoProto) 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 -} - -func (m *MountVolumesInfoProto) contextValidateMountVolumeResultVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MountVolumeResultVec); i++ { - - if m.MountVolumeResultVec[i] != nil { - - if swag.IsZero(m.MountVolumeResultVec[i]) { // not required - return nil - } - - if err := m.MountVolumeResultVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MountVolumesInfoProto) contextValidateRestoreDisksTaskInfoProto(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreDisksTaskInfoProto != nil { - - if swag.IsZero(m.RestoreDisksTaskInfoProto) { // not required - return nil - } - - if err := m.RestoreDisksTaskInfoProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreDisksTaskInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreDisksTaskInfoProto") - } - return err - } - } - - return nil -} - -func (m *MountVolumesInfoProto) contextValidateVMOnlineDisksError(ctx context.Context, formats strfmt.Registry) error { - - if m.VMOnlineDisksError != nil { - - if swag.IsZero(m.VMOnlineDisksError) { // not required - return nil - } - - if err := m.VMOnlineDisksError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmOnlineDisksError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmOnlineDisksError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesInfoProto) UnmarshalBinary(b []byte) error { - var res MountVolumesInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volumes_parameters.go b/v1/models/mount_volumes_parameters.go deleted file mode 100644 index b3743ed5..00000000 --- a/v1/models/mount_volumes_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/strfmt" - "github.com/go-openapi/swag" -) - -// MountVolumesParameters Mounting Volumes. -// -// Specifies the information required for mounting volumes. -// Only required for Restore Tasks of type 'kMountVolumes'. -// At a minimum, the targetSourceId must be specified for 'kMountVolumes' -// Restore Tasks. If only targetSourceId is specified, all disks are -// attached but may not be mounted. -// The mount target must be registered on the Cohesity Cluster. -// If the mount target is a VM, VMware Tools must be installed. -// If the mount target is a physical server, a Cohesity Agent must be -// be installed. See the Cohesity Dashboard help documentation for details. -// In the username and password fields, specify the credentials to -// access the mount target. -// -// swagger:model MountVolumesParameters -type MountVolumesParameters struct { - - // Optional setting that determines if the volumes are brought - // online on the mount target after attaching the disks. - // This field is only set for VMs. The Cohesity Cluster always - // attempts to mount Physical servers. - // If true and the mount target is a VM, to mount the volumes - // VMware Tools must be installed on the guest operating system of the VM - // and login credentials to the mount target must be specified. - // NOTE: If automount is configured for a Windows system, the - // volumes may be automatically brought online. - BringDisksOnline *bool `json:"bringDisksOnline,omitempty"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies the target Protection Source id where the volumes will be - // mounted. - // NOTE: The source that was backed up and the mount target must be the - // same type, for example if the source is a VMware VM, then the mount - // target must also be a VMware VM. - // The mount target must be registered on the Cohesity Cluster. - TargetSourceID *int64 `json:"targetSourceId,omitempty"` - - // Optional setting that determines if this will use an existing agent - // on the target vm to bring disks online. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` - - // Array of Volume Names. - // - // Optionally specify the names of volumes to mount. - // If none are specified, all volumes of the Server are mounted on the - // target. To get the names of the volumes, call the - // GET /public/restore/vms/volumesInformation operation. - VolumeNames []string `json:"volumeNames"` -} - -// Validate validates this mount volumes parameters -func (m *MountVolumesParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mount volumes parameters based on context it is used -func (m *MountVolumesParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesParameters) UnmarshalBinary(b []byte) error { - var res MountVolumesParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volumes_params.go b/v1/models/mount_volumes_params.go deleted file mode 100644 index 5630b8d2..00000000 --- a/v1/models/mount_volumes_params.go +++ /dev/null @@ -1,232 +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" -) - -// MountVolumesParams Contains information needed when mounting volumes. -// -// swagger:model MountVolumesParams -type MountVolumesParams struct { - - // Environment specific additional params if any. - // This is populated for HyperV environments. - HypervParams *MountVolumesHyperVParams `json:"hypervParams,omitempty"` - - // Allows the caller to force the Agent to perform a read-only mount. This is - // not usually required and we want to give customers the ability to mutate - // this mount for test/dev purposes. - ReadonlyMount *bool `json:"readonlyMount,omitempty"` - - // Target entity where the volumes are being mounted. - // NOTE: The source entity from which the backup was done and the - // target entity must be of the same type, i.e if the source entity is a - // VMware VM, then the target entity should be a VMware VM as well. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // Whether this will use an existing agent on the target vm to do a restore - // operation. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Environment specific additional params if any. - // This is populated for VMware environments. - VmwareParams *MountVolumesVMwareParams `json:"vmwareParams,omitempty"` - - // Optional names of volumes that need to be mounted. The names here - // correspond to the volume names obtained by Iris from Yoda as part of - // VMVolumeInfo call. - // NOTE: If this is not specified then all volumes that are part of the - // server will be mounted on the target entity. - VolumeNameVec []string `json:"volumeNameVec"` -} - -// Validate validates this mount volumes params -func (m *MountVolumesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesParams) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *MountVolumesParams) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *MountVolumesParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount volumes params based on the context it is used -func (m *MountVolumesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *MountVolumesParams) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *MountVolumesParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesParams) UnmarshalBinary(b []byte) error { - var res MountVolumesParams - 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 deleted file mode 100644 index d129ec64..00000000 --- a/v1/models/mount_volumes_state.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MountVolumesState Mount Volumes States. -// -// Specifies the states of mounting all the volumes onto a mount target -// for a 'kRecoverVMs' Restore Task. -// -// swagger:model MountVolumesState -type MountVolumesState struct { - - // Optional setting that determines if the volumes are brought - // online on the mount target after attaching the disks. - // This option is only significant for VMs. - BringDisksOnline *bool `json:"bringDisksOnline,omitempty"` - - // Array of Mount Volume Results. - // - // Specifies the results of mounting each specified volume. - MountVolumeResults []*MountVolumeResultDetails `json:"mountVolumeResults"` - - // other error - OtherError *MountVolumesStateOtherError `json:"otherError,omitempty"` - - // Specifies the target Protection Source Id where the volumes will be - // mounted. - // NOTE: The source that was backed up and the mount target must be the - // same type, for example if the source is a VMware VM, then the mount - // target must also be a VMware VM. - // The mount target must be registered on the Cohesity Cluster. - TargetSourceID *int64 `json:"targetSourceId,omitempty"` - - // Specifies the username to access the mount target. - Username *string `json:"username,omitempty"` -} - -// Validate validates this mount volumes state -func (m *MountVolumesState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountVolumeResults(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOtherError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesState) validateMountVolumeResults(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumeResults) { // not required - return nil - } - - for i := 0; i < len(m.MountVolumeResults); i++ { - if swag.IsZero(m.MountVolumeResults[i]) { // not required - continue - } - - if m.MountVolumeResults[i] != nil { - if err := m.MountVolumeResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MountVolumesState) validateOtherError(formats strfmt.Registry) error { - if swag.IsZero(m.OtherError) { // not required - 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 -} - -// ContextValidate validate this mount volumes state based on the context it is used -func (m *MountVolumesState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountVolumeResults(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOtherError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesState) contextValidateMountVolumeResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MountVolumeResults); i++ { - - if m.MountVolumeResults[i] != nil { - - if swag.IsZero(m.MountVolumeResults[i]) { // not required - return nil - } - - if err := m.MountVolumeResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *MountVolumesState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesState) UnmarshalBinary(b []byte) error { - var res MountVolumesState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/mount_volumes_task_state_proto.go b/v1/models/mount_volumes_task_state_proto.go deleted file mode 100644 index 197c35d0..00000000 --- a/v1/models/mount_volumes_task_state_proto.go +++ /dev/null @@ -1,218 +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" -) - -// MountVolumesTaskStateProto Persistent state for a "mount volumes" restore task. -// -// swagger:model MountVolumesTaskStateProto -type MountVolumesTaskStateProto struct { - - // Contains the SMB/NFS path of the share we expose to clients. The share - // contains the files pertinent to the original backup run type. - FullNasPath *string `json:"fullNasPath,omitempty"` - - // The host on which the VM where the disks are attached to are running. - // NOTE: This is only used in HyperV environment. - HostEntity *EntityProto `json:"hostEntity,omitempty"` - - // Contains information about the mount virtual disks task that is populated - // by the slave. - MountInfo *MountVolumesInfoProto `json:"mountInfo,omitempty"` - - // This captures all the necessary information required to perform mount - // virtual disks task. - MountParams *MountVolumesParams `json:"mountParams,omitempty"` -} - -// Validate validates this mount volumes task state proto -func (m *MountVolumesTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesTaskStateProto) validateHostEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HostEntity) { // not required - return nil - } - - if m.HostEntity != nil { - if err := m.HostEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostEntity") - } - return err - } - } - - return nil -} - -func (m *MountVolumesTaskStateProto) validateMountInfo(formats strfmt.Registry) error { - if swag.IsZero(m.MountInfo) { // not required - return nil - } - - if m.MountInfo != nil { - if err := m.MountInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountInfo") - } - return err - } - } - - return nil -} - -func (m *MountVolumesTaskStateProto) validateMountParams(formats strfmt.Registry) error { - if swag.IsZero(m.MountParams) { // not required - return nil - } - - if m.MountParams != nil { - if err := m.MountParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount volumes task state proto based on the context it is used -func (m *MountVolumesTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesTaskStateProto) contextValidateHostEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HostEntity != nil { - - if swag.IsZero(m.HostEntity) { // not required - return nil - } - - if err := m.HostEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostEntity") - } - return err - } - } - - return nil -} - -func (m *MountVolumesTaskStateProto) contextValidateMountInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.MountInfo != nil { - - if swag.IsZero(m.MountInfo) { // not required - return nil - } - - if err := m.MountInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountInfo") - } - return err - } - } - - return nil -} - -func (m *MountVolumesTaskStateProto) contextValidateMountParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MountParams != nil { - - if swag.IsZero(m.MountParams) { // not required - return nil - } - - if err := m.MountParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesTaskStateProto) UnmarshalBinary(b []byte) error { - var res MountVolumesTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volumes_v_mware_params.go b/v1/models/mount_volumes_v_mware_params.go deleted file mode 100644 index 46179ecf..00000000 --- a/v1/models/mount_volumes_v_mware_params.go +++ /dev/null @@ -1,116 +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" -) - -// MountVolumesVMwareParams VMware specific additional params. -// -// swagger:model MountVolumesVMwareParams -type MountVolumesVMwareParams struct { - - // Optional setting which will determine if the volumes need to be onlined - // within the target environment after attaching the disks. - // NOTE: If this is set to true, then target_entity_credentials must be - // specified and VMware tools must be installed on the VM. - BringDisksOnline *bool `json:"bringDisksOnline,omitempty"` - - // Credentials to access the target entity such as a VM. - // This is not required if bring_disks_online is set to false. - TargetEntityCredentials *Credentials `json:"targetEntityCredentials,omitempty"` -} - -// Validate validates this mount volumes v mware params -func (m *MountVolumesVMwareParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEntityCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesVMwareParams) validateTargetEntityCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if m.TargetEntityCredentials != nil { - if err := m.TargetEntityCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount volumes v mware params based on the context it is used -func (m *MountVolumesVMwareParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetEntityCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVolumesVMwareParams) contextValidateTargetEntityCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntityCredentials != nil { - - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if err := m.TargetEntityCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesVMwareParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesVMwareParams) UnmarshalBinary(b []byte) error { - var res MountVolumesVMwareParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/multi_stage_restore_finalize_action_params.go b/v1/models/multi_stage_restore_finalize_action_params.go deleted file mode 100644 index ba3db594..00000000 --- a/v1/models/multi_stage_restore_finalize_action_params.go +++ /dev/null @@ -1,55 +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" -) - -// MultiStageRestoreFinalizeActionParams Refer MultiStageRestoreAction::FinalizeParams message in -// magneto/base/magneto.proto -// -// MultiStageRestoreFinalizeActionParams holds the parameters required for -// finalizing a multi-stage restore task. -// -// swagger:model MultiStageRestoreFinalizeActionParams -type MultiStageRestoreFinalizeActionParams struct { - - // Specifies the power state of the recovered object at the end of the - // multi-stage restore. - PowerOnTarget *bool `json:"powerOnTarget,omitempty"` -} - -// Validate validates this multi stage restore finalize action params -func (m *MultiStageRestoreFinalizeActionParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this multi stage restore finalize action params based on context it is used -func (m *MultiStageRestoreFinalizeActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MultiStageRestoreFinalizeActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MultiStageRestoreFinalizeActionParams) UnmarshalBinary(b []byte) error { - var res MultiStageRestoreFinalizeActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/multi_stage_restore_task_state_proto.go b/v1/models/multi_stage_restore_task_state_proto.go deleted file mode 100644 index 1c36d622..00000000 --- a/v1/models/multi_stage_restore_task_state_proto.go +++ /dev/null @@ -1,124 +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" -) - -// MultiStageRestoreTaskStateProto Persistent state for a multi-stage restore task. -// -// swagger:model MultiStageRestoreTaskStateProto -type MultiStageRestoreTaskStateProto struct { - - // Captures the options(parameters) corresponding to the multi-stage restore - // task. - MultiStageRestoreOptions *UpdateRestoreTaskOptions `json:"multiStageRestoreOptions,omitempty"` - - // Captures the size of the data being synced to the target by this restore - // task. - SyncSizeBytes *int64 `json:"syncSizeBytes,omitempty"` - - // Captures the target entity's sync time in microseconds. This field usage - // depends on the type of the multi-stage restore. - // - // For a VMware non-CDP multi-stage restore, this represents the start time - // of the backup run that the target VM is synced with. - // - // For a VMware CDP multi-stage restore(yet to be implemented), this - // represents the time of the last applied IO on the target VM. - SyncTimeUsecs *int64 `json:"syncTimeUsecs,omitempty"` -} - -// Validate validates this multi stage restore task state proto -func (m *MultiStageRestoreTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMultiStageRestoreOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MultiStageRestoreTaskStateProto) validateMultiStageRestoreOptions(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if m.MultiStageRestoreOptions != nil { - if err := m.MultiStageRestoreOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this multi stage restore task state proto based on the context it is used -func (m *MultiStageRestoreTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMultiStageRestoreOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MultiStageRestoreTaskStateProto) contextValidateMultiStageRestoreOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.MultiStageRestoreOptions != nil { - - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if err := m.MultiStageRestoreOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MultiStageRestoreTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MultiStageRestoreTaskStateProto) UnmarshalBinary(b []byte) error { - var res MultiStageRestoreTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/n_f_s_export_paths.go b/v1/models/n_f_s_export_paths.go deleted file mode 100644 index ae069d9f..00000000 --- a/v1/models/n_f_s_export_paths.go +++ /dev/null @@ -1,58 +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" -) - -// NFSExportPaths NFSExportPaths is the struct containing NFS export paths for this cluster. -// -// swagger:model NFSExportPaths -type NFSExportPaths struct { - - // NFSExportPaths is the list of mount paths that bridge should list as - // exported filesystems. Typically bridge returns the view box names in the - // exports list. But some NFS clients (like windows NFS client) require that - // full path of the mount point to be present in the exports list. - // Each path in this list is of the form "/view-box-name/view-name/fs" where - // 'view-box-name' should be a valid external view box name and 'view-name' - // should be a view in 'view-box-name'. When a view box and/or a view is - // deleted, the corresponding mount paths should be automatically removed - // from this list (which will be done by apollo). - NfsExportPaths []string `json:"nfsExportPaths"` -} - -// Validate validates this n f s export paths -func (m *NFSExportPaths) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this n f s export paths based on context it is used -func (m *NFSExportPaths) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NFSExportPaths) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NFSExportPaths) UnmarshalBinary(b []byte) error { - var res NFSExportPaths - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/n_g_t_info.go b/v1/models/n_g_t_info.go deleted file mode 100644 index 16b52701..00000000 --- a/v1/models/n_g_t_info.go +++ /dev/null @@ -1,62 +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" -) - -// NGTInfo Proto for storing information of NGT. -// -// swagger:model NGTInfo -type NGTInfo struct { - - // This field species enable status of NGT. - EnableStatus *int32 `json:"enableStatus,omitempty"` - - // This vec lists enabled capabilities for NGT. - EnabledCapabilityVec []int32 `json:"enabledCapabilityVec"` - - // This field specifies install status of NGT. - InstallStatus *int32 `json:"installStatus,omitempty"` - - // This field species if NGT is reachable from Controller VM. - Reachable *bool `json:"reachable,omitempty"` - - // This field species version of NGT. - Version *string `json:"version,omitempty"` -} - -// Validate validates this n g t info -func (m *NGTInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this n g t info based on context it is used -func (m *NGTInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NGTInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NGTInfo) UnmarshalBinary(b []byte) error { - var res NGTInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/namespace_info.go b/v1/models/namespace_info.go deleted file mode 100644 index 44f67ab0..00000000 --- a/v1/models/namespace_info.go +++ /dev/null @@ -1,11 +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 - -// NamespaceInfo Proto that contains specific information about a hbase namespace. -// -// swagger:model NamespaceInfo -type NamespaceInfo interface{} diff --git a/v1/models/nas_analysis_job_params.go b/v1/models/nas_analysis_job_params.go deleted file mode 100644 index f0d09c83..00000000 --- a/v1/models/nas_analysis_job_params.go +++ /dev/null @@ -1,309 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NasAnalysisJobParams NAS Analysis Job Parameters. -// -// Message to capture additional NAS analysis job params. -// -// swagger:model NasAnalysisJobParams -type NasAnalysisJobParams struct { - - // File access time buckets. - AccessTimeBuckets []*NasAnalysisJobParamsAccessTimeBucket `json:"accessTimeBuckets"` - - // File size buckets. - FileSizeBuckets []*NasAnalysisJobParamsFileSizeBucket `json:"fileSizeBuckets"` - - // File type buckets. - FileTypeBuckets []*NasAnalysisJobParamsFileTypeBucket `json:"fileTypeBuckets"` - - // File modification time buckets. - ModTimeBuckets []*NasAnalysisJobParamsModTimeBucket `json:"modTimeBuckets"` -} - -// Validate validates this nas analysis job params -func (m *NasAnalysisJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessTimeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSizeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileTypeBuckets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateModTimeBuckets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasAnalysisJobParams) validateAccessTimeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.AccessTimeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.AccessTimeBuckets); i++ { - if swag.IsZero(m.AccessTimeBuckets[i]) { // not required - continue - } - - if m.AccessTimeBuckets[i] != nil { - if err := m.AccessTimeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) validateFileSizeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.FileSizeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.FileSizeBuckets); i++ { - if swag.IsZero(m.FileSizeBuckets[i]) { // not required - continue - } - - if m.FileSizeBuckets[i] != nil { - if err := m.FileSizeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) validateFileTypeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.FileTypeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.FileTypeBuckets); i++ { - if swag.IsZero(m.FileTypeBuckets[i]) { // not required - continue - } - - if m.FileTypeBuckets[i] != nil { - if err := m.FileTypeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) validateModTimeBuckets(formats strfmt.Registry) error { - if swag.IsZero(m.ModTimeBuckets) { // not required - return nil - } - - for i := 0; i < len(m.ModTimeBuckets); i++ { - if swag.IsZero(m.ModTimeBuckets[i]) { // not required - continue - } - - if m.ModTimeBuckets[i] != nil { - if err := m.ModTimeBuckets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nas analysis job params based on the context it is used -func (m *NasAnalysisJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAccessTimeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileSizeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileTypeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateModTimeBuckets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasAnalysisJobParams) contextValidateAccessTimeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AccessTimeBuckets); i++ { - - if m.AccessTimeBuckets[i] != nil { - - if swag.IsZero(m.AccessTimeBuckets[i]) { // not required - return nil - } - - if err := m.AccessTimeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) contextValidateFileSizeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileSizeBuckets); i++ { - - if m.FileSizeBuckets[i] != nil { - - if swag.IsZero(m.FileSizeBuckets[i]) { // not required - return nil - } - - if err := m.FileSizeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) contextValidateFileTypeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileTypeBuckets); i++ { - - if m.FileTypeBuckets[i] != nil { - - if swag.IsZero(m.FileTypeBuckets[i]) { // not required - return nil - } - - if err := m.FileTypeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileTypeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NasAnalysisJobParams) contextValidateModTimeBuckets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ModTimeBuckets); i++ { - - if m.ModTimeBuckets[i] != nil { - - if swag.IsZero(m.ModTimeBuckets[i]) { // not required - return nil - } - - if err := m.ModTimeBuckets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modTimeBuckets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NasAnalysisJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasAnalysisJobParams) UnmarshalBinary(b []byte) error { - var res NasAnalysisJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_analysis_job_params_access_time_bucket.go b/v1/models/nas_analysis_job_params_access_time_bucket.go deleted file mode 100644 index 46f81fdd..00000000 --- a/v1/models/nas_analysis_job_params_access_time_bucket.go +++ /dev/null @@ -1,57 +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" -) - -// NasAnalysisJobParamsAccessTimeBucket Access time bucket. -// -// swagger:model NasAnalysisJobParams_AccessTimeBucket -type NasAnalysisJobParamsAccessTimeBucket struct { - - // Tag representing the bucket for access time of file. - // e.g. "1mo-3mo" represents 1 month to 3 month. - AccessTimeBucketName *string `json:"accessTimeBucketName,omitempty"` - - // End time e.g. 1 year. Stored in days precision. - AccessTimeEndDays *int64 `json:"accessTimeEndDays,omitempty"` - - // Start time e.g. 6 months. Stored in days precision. - AccessTimeStartDays *int64 `json:"accessTimeStartDays,omitempty"` -} - -// Validate validates this nas analysis job params access time bucket -func (m *NasAnalysisJobParamsAccessTimeBucket) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas analysis job params access time bucket based on context it is used -func (m *NasAnalysisJobParamsAccessTimeBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasAnalysisJobParamsAccessTimeBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasAnalysisJobParamsAccessTimeBucket) UnmarshalBinary(b []byte) error { - var res NasAnalysisJobParamsAccessTimeBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_analysis_job_params_file_size_bucket.go b/v1/models/nas_analysis_job_params_file_size_bucket.go deleted file mode 100644 index 01f32d8a..00000000 --- a/v1/models/nas_analysis_job_params_file_size_bucket.go +++ /dev/null @@ -1,57 +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" -) - -// NasAnalysisJobParamsFileSizeBucket File size bucket. -// -// swagger:model NasAnalysisJobParams_FileSizeBucket -type NasAnalysisJobParamsFileSizeBucket struct { - - // Tag representing the bucket for size of file. - // e.g. "1M-10M" represents 1 MB to 10 MB. - FileSizeBucketName *string `json:"fileSizeBucketName,omitempty"` - - // End size for the bucket e.g. 500MB. - FileSizeEndBytes *int64 `json:"fileSizeEndBytes,omitempty"` - - // Start size for the bucket e.g. 50MB. - FileSizeStartBytes *int64 `json:"fileSizeStartBytes,omitempty"` -} - -// Validate validates this nas analysis job params file size bucket -func (m *NasAnalysisJobParamsFileSizeBucket) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas analysis job params file size bucket based on context it is used -func (m *NasAnalysisJobParamsFileSizeBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasAnalysisJobParamsFileSizeBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasAnalysisJobParamsFileSizeBucket) UnmarshalBinary(b []byte) error { - var res NasAnalysisJobParamsFileSizeBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_analysis_job_params_file_type_bucket.go b/v1/models/nas_analysis_job_params_file_type_bucket.go deleted file mode 100644 index 33c7ae98..00000000 --- a/v1/models/nas_analysis_job_params_file_type_bucket.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" -) - -// NasAnalysisJobParamsFileTypeBucket File type bucket. -// -// swagger:model NasAnalysisJobParams_FileTypeBucket -type NasAnalysisJobParamsFileTypeBucket struct { - - // File extensions e.g. . - FileTypeBucketExtensions []string `json:"fileTypeBucketExtensions"` - - // File type bucket name, e.g. VMs. - FileTypeBucketName *string `json:"fileTypeBucketName,omitempty"` -} - -// Validate validates this nas analysis job params file type bucket -func (m *NasAnalysisJobParamsFileTypeBucket) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas analysis job params file type bucket based on context it is used -func (m *NasAnalysisJobParamsFileTypeBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasAnalysisJobParamsFileTypeBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasAnalysisJobParamsFileTypeBucket) UnmarshalBinary(b []byte) error { - var res NasAnalysisJobParamsFileTypeBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_analysis_job_params_mod_time_bucket.go b/v1/models/nas_analysis_job_params_mod_time_bucket.go deleted file mode 100644 index 32a0c95f..00000000 --- a/v1/models/nas_analysis_job_params_mod_time_bucket.go +++ /dev/null @@ -1,57 +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" -) - -// NasAnalysisJobParamsModTimeBucket Modification time bucket. -// -// swagger:model NasAnalysisJobParams_ModTimeBucket -type NasAnalysisJobParamsModTimeBucket struct { - - // Tag representing the bucket for modified time of file. - // e.g. "1mo-3mo" represents 1 month to 3 month. - ModTimeBucketName *string `json:"modTimeBucketName,omitempty"` - - // End time e.g. 1 year. Stored in days precision. - ModTimeEndDays *int64 `json:"modTimeEndDays,omitempty"` - - // Start time e.g. 6 months. Stored in days precision. - ModTimeStartDays *int64 `json:"modTimeStartDays,omitempty"` -} - -// Validate validates this nas analysis job params mod time bucket -func (m *NasAnalysisJobParamsModTimeBucket) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas analysis job params mod time bucket based on context it is used -func (m *NasAnalysisJobParamsModTimeBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasAnalysisJobParamsModTimeBucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasAnalysisJobParamsModTimeBucket) UnmarshalBinary(b []byte) error { - var res NasAnalysisJobParamsModTimeBucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_backup_params.go b/v1/models/nas_backup_params.go deleted file mode 100644 index abd644fe..00000000 --- a/v1/models/nas_backup_params.go +++ /dev/null @@ -1,326 +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" -) - -// NasBackupParams NAS Backup Parameters. -// -// Message to capture any additional backup params for a NAS environment. -// -// swagger:model NasBackupParams -type NasBackupParams struct { - - // This bool parameter will be set only for DP volumes when customer doesn't - // select the full_backup_snapshot_label and - // incremental_backup_snapshot_label. When set to true, backend will be - // using existing oldest snapshot for the first backup. Each incremental - // will be selected in ascending of snapshot create time on the source. - BackupAllExistingSnapshot *bool `json:"backupAllExistingSnapshot,omitempty"` - - // Job level list of IP addresses that should not be used. - BlacklistedIPAddrs []string `json:"blacklistedIpAddrs"` - - // Whether the backup job should continue on errors for snapshot based - // backups. For non-snapshot-based generic NAS backup jobs, Magneto always - // continues on errors. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Whether this backup job should use encryption. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // The filtering policy to decide which objects within a source should be - // backed up. If this is not specified, then all of the objects within the - // source will be backed up. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // File level data lock configuration. - // To support File DataLock functionality similar to Netapp SnapLock, - // the following fields will be required from the user. - // This is same as what Cohesity as a filer offers for File DataLock. - FldConfig *ViewIDMappingProtoFileLevelDataLockConfig `json:"fldConfig,omitempty"` - - // Only used when we backup using discovered snapshots. This prefix is to - // figure out which discovered snapshot we need to use for full backup. - FullBackupSnapshotLabel *string `json:"fullBackupSnapshotLabel,omitempty"` - - // Only used when we backup using discovered snapshots. This prefix is to - // figure out which discovered snapshot we need to use for incremental - // backup. - IncrementalBackupSnapshotLabel *string `json:"incrementalBackupSnapshotLabel,omitempty"` - - // Source initiated backup when the source sends pushes the data like for - // example snapmirror based backup for netapp. - IsSourceInitiatedBackup *bool `json:"isSourceInitiatedBackup,omitempty"` - - // If the target entity is a mixed mode volume, which NAS protocol type the - // user prefer to backup. This does not apply to generic NAS and will be - // ignored. - MixedModePreference *int32 `json:"mixedModePreference,omitempty"` - - // Specifies if the source permissions can be modified to allow the backup. - ModifySourcePermissions *bool `json:"modifySourcePermissions,omitempty"` - - // If the target entity supports both NFSv3 and NFSv4.1, which NAS protocol - // type the user prefers to backup. This does not apply to generic NAS and - // will be ignored. - NfsVersionPreference *int32 `json:"nfsVersionPreference,omitempty"` - - // This message captures all the details of S3 view. - S3Viewbackupproperties *S3ViewBackupProperties `json:"s3Viewbackupproperties,omitempty"` - - // Specifies the view name if the view is to be shared across multiple - // backup jobs. Required for backing up multiple directories of the same - // share through different protection jobs(for faster backup). - SharedViewName *string `json:"sharedViewName,omitempty"` - - // Whether this backup job should utilize changelist like API when available - // for faster incremental backups. - SnapshotChangeEnabled *bool `json:"snapshotChangeEnabled,omitempty"` - - // NAS throttling params for full and incremental backups. This overrides - // corresponding source level parameters. - ThrottlingParams *NasThrottlingParams `json:"throttlingParams,omitempty"` - - // Job level list of IP addresses that should be used exclusively. - WhitelistedIPAddrs []string `json:"whitelistedIpAddrs"` -} - -// Validate validates this nas backup params -func (m *NasBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFldConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Viewbackupproperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasBackupParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) validateFldConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FldConfig) { // not required - return nil - } - - if m.FldConfig != nil { - if err := m.FldConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fldConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fldConfig") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) validateS3Viewbackupproperties(formats strfmt.Registry) error { - if swag.IsZero(m.S3Viewbackupproperties) { // not required - return nil - } - - if m.S3Viewbackupproperties != nil { - if err := m.S3Viewbackupproperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Viewbackupproperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Viewbackupproperties") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) validateThrottlingParams(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if m.ThrottlingParams != nil { - if err := m.ThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nas backup params based on the context it is used -func (m *NasBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFldConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3Viewbackupproperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasBackupParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) contextValidateFldConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FldConfig != nil { - - if swag.IsZero(m.FldConfig) { // not required - return nil - } - - if err := m.FldConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fldConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fldConfig") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) contextValidateS3Viewbackupproperties(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Viewbackupproperties != nil { - - if swag.IsZero(m.S3Viewbackupproperties) { // not required - return nil - } - - if err := m.S3Viewbackupproperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Viewbackupproperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Viewbackupproperties") - } - return err - } - } - - return nil -} - -func (m *NasBackupParams) contextValidateThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingParams != nil { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if err := m.ThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NasBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasBackupParams) UnmarshalBinary(b []byte) error { - var res NasBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_credentials.go b/v1/models/nas_credentials.go deleted file mode 100644 index e1d2349a..00000000 --- a/v1/models/nas_credentials.go +++ /dev/null @@ -1,222 +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" -) - -// NasCredentials NAS Server Credentials. -// -// Specifies the server credentials to connect to a NetApp server. -// -// swagger:model NasCredentials -type NasCredentials struct { - - // Specifies the hostname or IP address of the NAS server. - Host *string `json:"host,omitempty"` - - // If applicable and specified, the realm name of the Kerberos provider - // security the NFS share. - KerberosRealmName *string `json:"kerberosRealmName,omitempty"` - - // Specifies the mount path to the NAS server. - MountPath *string `json:"mountPath,omitempty"` - - // If applicable and specified, the NFS security type of the NFS share. - // Enum: ["see proto definition"] - NfsSecurityType *string `json:"nfsSecurityType,omitempty"` - - // If applicable and specified, the NFS version number of the NFS share. - // Enum: ["see protobuf definition"] - NfsVersionNumber *string `json:"nfsVersionNumber,omitempty"` - - // If using the CIFS protocol and a Username was specified, specify - // the password for the username. - Password *string `json:"password,omitempty"` - - // Specifies the sharing protocol type used to mount the file system. - // Currently, only NFS is supported. - // 'kNFS' indicates use the NFS protocol to mount the file system. - // 'kCIFS' indicates use the CIFS protocol to mount the file system. - // Enum: ["kNFS","kCIFS"] - ShareType *string `json:"shareType,omitempty"` - - // If using the CIFS protocol, you can optional specify a username - // to use when mounting. - Username *string `json:"username,omitempty"` -} - -// Validate validates this nas credentials -func (m *NasCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsSecurityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsVersionNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateShareType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nasCredentialsTypeNfsSecurityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["see proto definition"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasCredentialsTypeNfsSecurityTypePropEnum = append(nasCredentialsTypeNfsSecurityTypePropEnum, v) - } -} - -const ( - - // NasCredentialsNfsSecurityTypeSeeProtoDefinition captures enum value "see proto definition" - NasCredentialsNfsSecurityTypeSeeProtoDefinition string = "see proto definition" -) - -// prop value enum -func (m *NasCredentials) validateNfsSecurityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasCredentialsTypeNfsSecurityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasCredentials) validateNfsSecurityType(formats strfmt.Registry) error { - if swag.IsZero(m.NfsSecurityType) { // not required - return nil - } - - // value enum - if err := m.validateNfsSecurityTypeEnum("nfsSecurityType", "body", *m.NfsSecurityType); err != nil { - return err - } - - return nil -} - -var nasCredentialsTypeNfsVersionNumberPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["see protobuf definition"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasCredentialsTypeNfsVersionNumberPropEnum = append(nasCredentialsTypeNfsVersionNumberPropEnum, v) - } -} - -const ( - - // NasCredentialsNfsVersionNumberSeeProtobufDefinition captures enum value "see protobuf definition" - NasCredentialsNfsVersionNumberSeeProtobufDefinition string = "see protobuf definition" -) - -// prop value enum -func (m *NasCredentials) validateNfsVersionNumberEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasCredentialsTypeNfsVersionNumberPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasCredentials) validateNfsVersionNumber(formats strfmt.Registry) error { - if swag.IsZero(m.NfsVersionNumber) { // not required - return nil - } - - // value enum - if err := m.validateNfsVersionNumberEnum("nfsVersionNumber", "body", *m.NfsVersionNumber); err != nil { - return err - } - - return nil -} - -var nasCredentialsTypeShareTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNFS","kCIFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasCredentialsTypeShareTypePropEnum = append(nasCredentialsTypeShareTypePropEnum, v) - } -} - -const ( - - // NasCredentialsShareTypeKNFS captures enum value "kNFS" - NasCredentialsShareTypeKNFS string = "kNFS" - - // NasCredentialsShareTypeKCIFS captures enum value "kCIFS" - NasCredentialsShareTypeKCIFS string = "kCIFS" -) - -// prop value enum -func (m *NasCredentials) validateShareTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasCredentialsTypeShareTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasCredentials) validateShareType(formats strfmt.Registry) error { - if swag.IsZero(m.ShareType) { // not required - return nil - } - - // value enum - if err := m.validateShareTypeEnum("shareType", "body", *m.ShareType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nas credentials based on context it is used -func (m *NasCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasCredentials) UnmarshalBinary(b []byte) error { - var res NasCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_env_job_parameters.go b/v1/models/nas_env_job_parameters.go deleted file mode 100644 index 9a820f6a..00000000 --- a/v1/models/nas_env_job_parameters.go +++ /dev/null @@ -1,592 +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" -) - -// NasEnvJobParameters NAS Environment Job Parameters. -// -// Specifies job parameters applicable for all 'kGenericNas' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model NasEnvJobParameters -type NasEnvJobParameters struct { - - // Specifies if the protection job should use existing snapshot while - // backing up. - BackupExistingSnapshot *bool `json:"backupExistingSnapshot,omitempty"` - - // Specifies if the backup should continue on with other Protection Sources - // even if the backup operation of some Protection Source fails. If true, - // the Cohesity Cluster ignores the errors and continues with remaining - // Protection Sources in the job. If false, the backup operation stops when - // an error occurs. This does not apply to non-snapshot based generic NAS - // backup jobs. If not set, default value is true. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies additional parameters that are applicable only to the data - // migration jobs in NAS environment. - DataMigrationJobParameters *DataMigrationJobParameters `json:"dataMigrationJobParameters,omitempty"` - - // Specifies additional parameters that are applicable only to the data - // uptier jobs in NAS environment. - DataUptierJobParameters *DataUptierJobParameters `json:"dataUptierJobParameters,omitempty"` - - // Specifies whether this job will enable faster incremental backups using - // change list or similar APIs - EnableFasterIncrementalBackups *bool `json:"enableFasterIncrementalBackups,omitempty"` - - // Specifies if the protection job should use encryption while backing up. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this job. It cannot be - // disabled during the edit of a job, if it has been enabled during the - // creation of the job. Also, it cannot be enabled if it was disabled - // during the creation of the job. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies filters on the backup objects like files and directories. - // Specifying filters decide which objects within a source should be backed - // up. If this field is not specified, then all of the objects within the - // source will be backed up. - FilePathFilters *FilePathFilter `json:"filePathFilters,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job - // level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the preferred protocol to use for backup. This does not - // apply to generic NAS and will be ignored. - // Specifies the protocol used by a NAS server. - // 'kNoProtocol' indicates no protocol set. - // 'kNfs3' indicates NFS v3 protocol. - // 'kNfs4_1' indicates NFS v4.1 protocol. - // 'kCifs1' indicates CIFS v1.0 protocol. - // 'kCifs2' indicates CIFS v2.0 protocol. - // 'kCifs3' indicates CIFS v3.0 protocol. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - NasProtocol *string `json:"nasProtocol,omitempty"` - - // Specifies the preferred NFS protocol to use for the backup when multiple - // NFS protocols are present on a single volume. - // Specifies the protocol used by a NAS server. - // 'kNoProtocol' indicates no protocol set. - // 'kNfs3' indicates NFS v3 protocol. - // 'kNfs4_1' indicates NFS v4.1 protocol. - // 'kCifs1' indicates CIFS v1.0 protocol. - // 'kCifs2' indicates CIFS v2.0 protocol. - // 'kCifs3' indicates CIFS v3.0 protocol. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - NfsVersionPreference *string `json:"nfsVersionPreference,omitempty"` - - // Specifies the incremental and full snapshot label for - // Data-Protect Netapp Volumes backup. If field is set , incremental - // and full snapshot label has to be provided. If field is not set, the - // snapshot label will be automatically set using timestamp. - SnapshotLabel *SnapshotLabel `json:"snapshotLabel,omitempty"` - - // Specifies the NAS specific source throttling parameters during full or - // incremental backup of the source. - ThrottlingConfig *NasSourceThrottlingParams `json:"throttlingConfig,omitempty"` -} - -// Validate validates this nas env job parameters -func (m *NasEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataMigrationJobParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataUptierJobParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilePathFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsVersionPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotLabel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasEnvJobParameters) validateDataMigrationJobParameters(formats strfmt.Registry) error { - if swag.IsZero(m.DataMigrationJobParameters) { // not required - return nil - } - - if m.DataMigrationJobParameters != nil { - if err := m.DataMigrationJobParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationJobParameters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) validateDataUptierJobParameters(formats strfmt.Registry) error { - if swag.IsZero(m.DataUptierJobParameters) { // not required - return nil - } - - if m.DataUptierJobParameters != nil { - if err := m.DataUptierJobParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUptierJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUptierJobParameters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) validateFilePathFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FilePathFilters) { // not required - return nil - } - - if m.FilePathFilters != nil { - if err := m.FilePathFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -var nasEnvJobParametersTypeNasProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasEnvJobParametersTypeNasProtocolPropEnum = append(nasEnvJobParametersTypeNasProtocolPropEnum, v) - } -} - -const ( - - // NasEnvJobParametersNasProtocolKNoProtocol captures enum value "kNoProtocol" - NasEnvJobParametersNasProtocolKNoProtocol string = "kNoProtocol" - - // NasEnvJobParametersNasProtocolKNfs3 captures enum value "kNfs3" - NasEnvJobParametersNasProtocolKNfs3 string = "kNfs3" - - // NasEnvJobParametersNasProtocolKNfs41 captures enum value "kNfs4_1" - NasEnvJobParametersNasProtocolKNfs41 string = "kNfs4_1" - - // NasEnvJobParametersNasProtocolKCifs1 captures enum value "kCifs1" - NasEnvJobParametersNasProtocolKCifs1 string = "kCifs1" - - // NasEnvJobParametersNasProtocolKCifs2 captures enum value "kCifs2" - NasEnvJobParametersNasProtocolKCifs2 string = "kCifs2" - - // NasEnvJobParametersNasProtocolKCifs3 captures enum value "kCifs3" - NasEnvJobParametersNasProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NasEnvJobParameters) validateNasProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasEnvJobParametersTypeNasProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasEnvJobParameters) validateNasProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NasProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNasProtocolEnum("nasProtocol", "body", *m.NasProtocol); err != nil { - return err - } - - return nil -} - -var nasEnvJobParametersTypeNfsVersionPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasEnvJobParametersTypeNfsVersionPreferencePropEnum = append(nasEnvJobParametersTypeNfsVersionPreferencePropEnum, v) - } -} - -const ( - - // NasEnvJobParametersNfsVersionPreferenceKNoProtocol captures enum value "kNoProtocol" - NasEnvJobParametersNfsVersionPreferenceKNoProtocol string = "kNoProtocol" - - // NasEnvJobParametersNfsVersionPreferenceKNfs3 captures enum value "kNfs3" - NasEnvJobParametersNfsVersionPreferenceKNfs3 string = "kNfs3" - - // NasEnvJobParametersNfsVersionPreferenceKNfs41 captures enum value "kNfs4_1" - NasEnvJobParametersNfsVersionPreferenceKNfs41 string = "kNfs4_1" - - // NasEnvJobParametersNfsVersionPreferenceKCifs1 captures enum value "kCifs1" - NasEnvJobParametersNfsVersionPreferenceKCifs1 string = "kCifs1" - - // NasEnvJobParametersNfsVersionPreferenceKCifs2 captures enum value "kCifs2" - NasEnvJobParametersNfsVersionPreferenceKCifs2 string = "kCifs2" - - // NasEnvJobParametersNfsVersionPreferenceKCifs3 captures enum value "kCifs3" - NasEnvJobParametersNfsVersionPreferenceKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NasEnvJobParameters) validateNfsVersionPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasEnvJobParametersTypeNfsVersionPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasEnvJobParameters) validateNfsVersionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.NfsVersionPreference) { // not required - return nil - } - - // value enum - if err := m.validateNfsVersionPreferenceEnum("nfsVersionPreference", "body", *m.NfsVersionPreference); err != nil { - return err - } - - return nil -} - -func (m *NasEnvJobParameters) validateSnapshotLabel(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if m.SnapshotLabel != nil { - if err := m.SnapshotLabel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nas env job parameters based on the context it is used -func (m *NasEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataMigrationJobParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataUptierJobParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilePathFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotLabel(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasEnvJobParameters) contextValidateDataMigrationJobParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.DataMigrationJobParameters != nil { - - if swag.IsZero(m.DataMigrationJobParameters) { // not required - return nil - } - - if err := m.DataMigrationJobParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationJobParameters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateDataUptierJobParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.DataUptierJobParameters != nil { - - if swag.IsZero(m.DataUptierJobParameters) { // not required - return nil - } - - if err := m.DataUptierJobParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUptierJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUptierJobParameters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateFilePathFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePathFilters != nil { - - if swag.IsZero(m.FilePathFilters) { // not required - return nil - } - - if err := m.FilePathFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilters") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateSnapshotLabel(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotLabel != nil { - - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if err := m.SnapshotLabel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NasEnvJobParameters) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NasEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasEnvJobParameters) UnmarshalBinary(b []byte) error { - var res NasEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_mount_credential_params.go b/v1/models/nas_mount_credential_params.go deleted file mode 100644 index d73a3d61..00000000 --- a/v1/models/nas_mount_credential_params.go +++ /dev/null @@ -1,192 +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" -) - -// NasMountCredentialParams NAS Mount Credentials. -// -// Specifies the credentials to mount a volume on a NetApp server. -// -// swagger:model NasMountCredentialParams -type NasMountCredentialParams struct { - - // Specifies the domain in which this credential is valid. - Domain *string `json:"domain,omitempty"` - - // Specifies the protocol used by the NAS server. - // Specifies the protocol used by a NAS server. - // 'kNoProtocol' indicates no protocol set. - // 'kNfs3' indicates NFS v3 protocol. - // 'kNfs4_1' indicates NFS v4.1 protocol. - // 'kCifs1' indicates CIFS v1.0 protocol. - // 'kCifs2' indicates CIFS v2.0 protocol. - // 'kCifs3' indicates CIFS v3.0 protocol. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - NasProtocol *string `json:"nasProtocol,omitempty"` - - // Specifies the type of a NAS Object such as 'kGroup', or 'kHost'. - // Specifies the kind of NAS mount. - // 'kGroup' indicates top level node that holds individual NAS hosts. - // 'kHost' indicates a single NAS path that can be mounted. - // Enum: ["kGroup","kHost"] - NasType *string `json:"nasType,omitempty"` - - // Specifies the password for the username to use for mounting the NAS. - Password *string `json:"password,omitempty"` - - // Specifies the flag to disable mount point validation during registration - // process. - SkipValidation *bool `json:"skipValidation,omitempty"` - - // Specifies a username to use for mounting the NAS. - Username *string `json:"username,omitempty"` -} - -// Validate validates this nas mount credential params -func (m *NasMountCredentialParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNasProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nasMountCredentialParamsTypeNasProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasMountCredentialParamsTypeNasProtocolPropEnum = append(nasMountCredentialParamsTypeNasProtocolPropEnum, v) - } -} - -const ( - - // NasMountCredentialParamsNasProtocolKNoProtocol captures enum value "kNoProtocol" - NasMountCredentialParamsNasProtocolKNoProtocol string = "kNoProtocol" - - // NasMountCredentialParamsNasProtocolKNfs3 captures enum value "kNfs3" - NasMountCredentialParamsNasProtocolKNfs3 string = "kNfs3" - - // NasMountCredentialParamsNasProtocolKNfs41 captures enum value "kNfs4_1" - NasMountCredentialParamsNasProtocolKNfs41 string = "kNfs4_1" - - // NasMountCredentialParamsNasProtocolKCifs1 captures enum value "kCifs1" - NasMountCredentialParamsNasProtocolKCifs1 string = "kCifs1" - - // NasMountCredentialParamsNasProtocolKCifs2 captures enum value "kCifs2" - NasMountCredentialParamsNasProtocolKCifs2 string = "kCifs2" - - // NasMountCredentialParamsNasProtocolKCifs3 captures enum value "kCifs3" - NasMountCredentialParamsNasProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NasMountCredentialParams) validateNasProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasMountCredentialParamsTypeNasProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasMountCredentialParams) validateNasProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NasProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNasProtocolEnum("nasProtocol", "body", *m.NasProtocol); err != nil { - return err - } - - return nil -} - -var nasMountCredentialParamsTypeNasTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGroup","kHost"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasMountCredentialParamsTypeNasTypePropEnum = append(nasMountCredentialParamsTypeNasTypePropEnum, v) - } -} - -const ( - - // NasMountCredentialParamsNasTypeKGroup captures enum value "kGroup" - NasMountCredentialParamsNasTypeKGroup string = "kGroup" - - // NasMountCredentialParamsNasTypeKHost captures enum value "kHost" - NasMountCredentialParamsNasTypeKHost string = "kHost" -) - -// prop value enum -func (m *NasMountCredentialParams) validateNasTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasMountCredentialParamsTypeNasTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasMountCredentialParams) validateNasType(formats strfmt.Registry) error { - if swag.IsZero(m.NasType) { // not required - return nil - } - - // value enum - if err := m.validateNasTypeEnum("nasType", "body", *m.NasType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nas mount credential params based on context it is used -func (m *NasMountCredentialParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasMountCredentialParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasMountCredentialParams) UnmarshalBinary(b []byte) error { - var res NasMountCredentialParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_mount_credentials.go b/v1/models/nas_mount_credentials.go deleted file mode 100644 index a7882c46..00000000 --- a/v1/models/nas_mount_credentials.go +++ /dev/null @@ -1,70 +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" -) - -// NasMountCredentials Message that encapsulates the credentials for mounting a specific NAS type. -// -// swagger:model NasMountCredentials -type NasMountCredentials struct { - - // The name of the domain which the NAS mount credentials belong to. - DomainName *string `json:"domainName,omitempty"` - - // AES256 encrypted password. The key for encryption should be obtained from - // KMS. - EncryptedPassword []uint8 `json:"encryptedPassword"` - - // KDC hostname or IP for krb5 authentication. KDC stores secret keys for - // a smb user and provides the krb5 tickets for authentication. - Kdc *string `json:"kdc,omitempty"` - - // The password field is only populated in RPCs. On disk, instances of this - // proto should not have this field set, except for legacy records. - // - // TODO(oleg): Change this field type to bytes.j - Password *string `json:"password,omitempty"` - - // The protocol of the NAS mount. - Protocol *int32 `json:"protocol,omitempty"` - - // The username and password to use for mounting the NAS. - Username *string `json:"username,omitempty"` -} - -// Validate validates this nas mount credentials -func (m *NasMountCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas mount credentials based on context it is used -func (m *NasMountCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasMountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasMountCredentials) UnmarshalBinary(b []byte) error { - var res NasMountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_protection_source.go b/v1/models/nas_protection_source.go deleted file mode 100644 index 6e33328d..00000000 --- a/v1/models/nas_protection_source.go +++ /dev/null @@ -1,193 +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" -) - -// NasProtectionSource Generic NAS Protection Source. -// -// Specifies a Protection Source in a Generic NAS environment. -// -// swagger:model NasProtectionSource -type NasProtectionSource struct { - - // Specifies a description about the Protection Source. - Description *string `json:"description,omitempty"` - - // Specifies the mount path of this NAS. For example, for a NFS mount point, - // this should be in the format of IP or hostname:/foo/bar. - MountPath *string `json:"mountPath,omitempty"` - - // Specifies the name of the NetApp Object. - Name *string `json:"name,omitempty"` - - // Specifies the protocol used by the NAS server. - // Specifies the protocol used by a NAS server. - // 'kNoProtocol' indicates no protocol set. - // 'kNfs3' indicates NFS v3 protocol. - // 'kNfs4_1' indicates NFS v4.1 protocol. - // 'kCifs1' indicates CIFS v1.0 protocol. - // 'kCifs2' indicates CIFS v2.0 protocol. - // 'kCifs3' indicates CIFS v3.0 protocol. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies whether to skip validation of the given mount point. - SkipValidation *bool `json:"skipValidation,omitempty"` - - // Specifies the type of a Protection Source Object in a generic NAS Source - // such as 'kGroup', or 'kHost'. - // Specifies the kind of NAS mount. - // 'kGroup' indicates top level node that holds individual NAS hosts. - // 'kHost' indicates a single NAS path that can be mounted. - // Enum: ["kGroup","kHost"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this nas protection source -func (m *NasProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nasProtectionSourceTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasProtectionSourceTypeProtocolPropEnum = append(nasProtectionSourceTypeProtocolPropEnum, v) - } -} - -const ( - - // NasProtectionSourceProtocolKNoProtocol captures enum value "kNoProtocol" - NasProtectionSourceProtocolKNoProtocol string = "kNoProtocol" - - // NasProtectionSourceProtocolKNfs3 captures enum value "kNfs3" - NasProtectionSourceProtocolKNfs3 string = "kNfs3" - - // NasProtectionSourceProtocolKNfs41 captures enum value "kNfs4_1" - NasProtectionSourceProtocolKNfs41 string = "kNfs4_1" - - // NasProtectionSourceProtocolKCifs1 captures enum value "kCifs1" - NasProtectionSourceProtocolKCifs1 string = "kCifs1" - - // NasProtectionSourceProtocolKCifs2 captures enum value "kCifs2" - NasProtectionSourceProtocolKCifs2 string = "kCifs2" - - // NasProtectionSourceProtocolKCifs3 captures enum value "kCifs3" - NasProtectionSourceProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NasProtectionSource) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasProtectionSourceTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasProtectionSource) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -var nasProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGroup","kHost"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasProtectionSourceTypeTypePropEnum = append(nasProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // NasProtectionSourceTypeKGroup captures enum value "kGroup" - NasProtectionSourceTypeKGroup string = "kGroup" - - // NasProtectionSourceTypeKHost captures enum value "kHost" - NasProtectionSourceTypeKHost string = "kHost" -) - -// prop value enum -func (m *NasProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nas protection source based on context it is used -func (m *NasProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasProtectionSource) UnmarshalBinary(b []byte) error { - var res NasProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_source_throttling_params.go b/v1/models/nas_source_throttling_params.go deleted file mode 100644 index 45732e0e..00000000 --- a/v1/models/nas_source_throttling_params.go +++ /dev/null @@ -1,64 +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" -) - -// NasSourceThrottlingParams Specifies the NAS specific source throttling parameters during source -// registration or during backup of the source. -// -// swagger:model NasSourceThrottlingParams -type NasSourceThrottlingParams struct { - - // Specifies the percentage value of maximum concurrent metadata to be - // fetched during full backup of the source. - MaxParallelMetadataFetchFullPercentage *int32 `json:"maxParallelMetadataFetchFullPercentage,omitempty"` - - // Specifies the percentage value of maximum concurrent metadata to be - // fetched during incremental backup of the source. - MaxParallelMetadataFetchIncrementalPercentage *int32 `json:"maxParallelMetadataFetchIncrementalPercentage,omitempty"` - - // Specifies the percentage value of maximum concurrent IO during full backup - // of the source. - MaxParallelReadWriteFullPercentage *int32 `json:"maxParallelReadWriteFullPercentage,omitempty"` - - // Specifies the percentage value of maximum concurrent IO during incremental - // backup of the source. - MaxParallelReadWriteIncrementalPercentage *int32 `json:"maxParallelReadWriteIncrementalPercentage,omitempty"` -} - -// Validate validates this nas source throttling params -func (m *NasSourceThrottlingParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas source throttling params based on context it is used -func (m *NasSourceThrottlingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasSourceThrottlingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasSourceThrottlingParams) UnmarshalBinary(b []byte) error { - var res NasSourceThrottlingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nas_throttling_params.go b/v1/models/nas_throttling_params.go deleted file mode 100644 index ac03f4ff..00000000 --- a/v1/models/nas_throttling_params.go +++ /dev/null @@ -1,69 +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" -) - -// NasThrottlingParams NAS Throttling Parameters. -// -// Message to capture throttling params for a NAS source. -// -// swagger:model NasThrottlingParams -type NasThrottlingParams struct { - - // This parameter indicates the maximum number of parallel read and write - // operations per volume for full backup as a percentage of gflag - // magneto_slave_nas_max_active_pack_tasks. - MaxParallelIoFullPercentage *int32 `json:"maxParallelIoFullPercentage,omitempty"` - - // This parameter indicates the maximum number of parallel read and write - // operations per volume for incremental backup as a percentage of gflag - // magneto_slave_nas_max_active_pack_tasks. - MaxParallelIoIncrementalPercentage *int32 `json:"maxParallelIoIncrementalPercentage,omitempty"` - - // This parameter indicates the maximum number of concurrent prefetch in diff - // streamer per volume for full backup as a percentage of gflag - // magneto_posix_diff_streamer_max_prefetch. - MaxParallelMetadataFetchFullPercentage *int32 `json:"maxParallelMetadataFetchFullPercentage,omitempty"` - - // This parameter indicates the maximum number of concurrent prefetch in diff - // streamer per volume for incremental backup as a percentage of gflag - // magneto_posix_diff_streamer_max_prefetch. - MaxParallelMetadataFetchIncrementalPercentage *int32 `json:"maxParallelMetadataFetchIncrementalPercentage,omitempty"` -} - -// Validate validates this nas throttling params -func (m *NasThrottlingParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas throttling params based on context it is used -func (m *NasThrottlingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasThrottlingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasThrottlingParams) UnmarshalBinary(b []byte) error { - var res NasThrottlingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/netapp_cluster_info.go b/v1/models/netapp_cluster_info.go deleted file mode 100644 index 24ff9cff..00000000 --- a/v1/models/netapp_cluster_info.go +++ /dev/null @@ -1,64 +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" -) - -// NetappClusterInfo NetApp Cluster Information. -// -// Specifies information about a NetApp Cluster Protection Source. -// -// swagger:model NetappClusterInfo -type NetappClusterInfo struct { - - // Specifies information about the contact for the NetApp cluster - // such as a name, phone number, and email address. - ContactInfo *string `json:"contactInfo,omitempty"` - - // Specifies where this NetApp cluster is located. - // This location identification string is configured by the - // NetApp system administrator. - // This field does not contain the NetApp cluster - // hostname or IP address. - Location *string `json:"location,omitempty"` - - // Specifies the serial number of the NetApp cluster in the - // format: x-xx-xxxxxx. - SerialNumber *string `json:"serialNumber,omitempty"` -} - -// Validate validates this netapp cluster info -func (m *NetappClusterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this netapp cluster info based on context it is used -func (m *NetappClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappClusterInfo) UnmarshalBinary(b []byte) error { - var res NetappClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/netapp_protection_source.go b/v1/models/netapp_protection_source.go deleted file mode 100644 index 2d39c50c..00000000 --- a/v1/models/netapp_protection_source.go +++ /dev/null @@ -1,383 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappProtectionSource NetApp Protection Source. -// -// Specifies a Protection Source in a NetApp environment. -// -// swagger:model NetappProtectionSource -type NetappProtectionSource struct { - - // Specifies information about a NetApp cluster and is only valid for a - // NetApp Object of type kCluster. - ClusterInfo *NetappClusterInfo `json:"clusterInfo,omitempty"` - - // Specifies if this Object is a top level Object. - // Because a top level Object can either be a NetApp cluster or a Vserver, - // this cannot be determined only by type. - IsTopLevel *bool `json:"isTopLevel,omitempty"` - - // Specifies the type of license available on Netapp Cluster - // 'kSnapmirrorCloud' indicates a SnapMirror license on Netapp. - LicenseTypes []string `json:"licenseTypes"` - - // Specifies the name of the NetApp Object. - Name *string `json:"name,omitempty"` - - // Specifies the type of managed NetApp Object in a NetApp Protection Source - // such as 'kCluster', 'kVserver' or 'kVolume'. - // 'kCluster' indicates a Netapp cluster as a protection source. - // 'kVserver' indicates a Netapp vserver in a cluster as a protection source. - // 'kVolume' indicates a volume in Netapp vserver as a protection source. - // Enum: ["kCluster","kVserver","kVolume"] - Type *string `json:"type,omitempty"` - - // Specifies the globally unique ID of this Object assigned by the - // NetApp server. - UUID *string `json:"uuid,omitempty"` - - // Specifies the version of Netapp Cluster. - VersionTuple *NetappVersionTuple `json:"versionTuple,omitempty"` - - // Specifies information about a NetApp volume and is only valid for a - // NetApp Object of type kVolume. - VolumeInfo *NetappVolumeInfo `json:"volumeInfo,omitempty"` - - // Specifies information about a NetApp Vserver and is only valid for a - // NetApp Object of type kVserver. - VserverInfo *NetappVserverInfo `json:"vserverInfo,omitempty"` -} - -// Validate validates this netapp protection source -func (m *NetappProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLicenseTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersionTuple(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVserverInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappProtectionSource) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -var netappProtectionSourceLicenseTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSnapmirrorCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappProtectionSourceLicenseTypesItemsEnum = append(netappProtectionSourceLicenseTypesItemsEnum, v) - } -} - -func (m *NetappProtectionSource) validateLicenseTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappProtectionSourceLicenseTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappProtectionSource) validateLicenseTypes(formats strfmt.Registry) error { - if swag.IsZero(m.LicenseTypes) { // not required - return nil - } - - for i := 0; i < len(m.LicenseTypes); i++ { - - // value enum - if err := m.validateLicenseTypesItemsEnum("licenseTypes"+"."+strconv.Itoa(i), "body", m.LicenseTypes[i]); err != nil { - return err - } - - } - - return nil -} - -var netappProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVserver","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappProtectionSourceTypeTypePropEnum = append(netappProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // NetappProtectionSourceTypeKCluster captures enum value "kCluster" - NetappProtectionSourceTypeKCluster string = "kCluster" - - // NetappProtectionSourceTypeKVserver captures enum value "kVserver" - NetappProtectionSourceTypeKVserver string = "kVserver" - - // NetappProtectionSourceTypeKVolume captures enum value "kVolume" - NetappProtectionSourceTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *NetappProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *NetappProtectionSource) validateVersionTuple(formats strfmt.Registry) error { - if swag.IsZero(m.VersionTuple) { // not required - return nil - } - - if m.VersionTuple != nil { - if err := m.VersionTuple.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionTuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionTuple") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionSource) validateVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if m.VolumeInfo != nil { - if err := m.VolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionSource) validateVserverInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VserverInfo) { // not required - return nil - } - - if m.VserverInfo != nil { - if err := m.VserverInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this netapp protection source based on the context it is used -func (m *NetappProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersionTuple(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVserverInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappProtectionSource) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionSource) contextValidateVersionTuple(ctx context.Context, formats strfmt.Registry) error { - - if m.VersionTuple != nil { - - if swag.IsZero(m.VersionTuple) { // not required - return nil - } - - if err := m.VersionTuple.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionTuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionTuple") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionSource) contextValidateVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeInfo != nil { - - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if err := m.VolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionSource) contextValidateVserverInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VserverInfo != nil { - - if swag.IsZero(m.VserverInfo) { // not required - return nil - } - - if err := m.VserverInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappProtectionSource) UnmarshalBinary(b []byte) error { - var res NetappProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/netapp_version_tuple.go b/v1/models/netapp_version_tuple.go deleted file mode 100644 index 22a3a7d5..00000000 --- a/v1/models/netapp_version_tuple.go +++ /dev/null @@ -1,56 +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" -) - -// NetappVersionTuple Specifies the Netapp version Tuple. -// -// swagger:model NetappVersionTuple -type NetappVersionTuple struct { - - // Netapp generation. - Generation *int32 `json:"generation,omitempty"` - - // Major version number. - MajorVersion *int32 `json:"majorVersion,omitempty"` - - // Minor version number. - MinorVersion *int32 `json:"minorVersion,omitempty"` -} - -// Validate validates this netapp version tuple -func (m *NetappVersionTuple) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this netapp version tuple based on context it is used -func (m *NetappVersionTuple) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappVersionTuple) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappVersionTuple) UnmarshalBinary(b []byte) error { - var res NetappVersionTuple - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/netapp_volume_info.go b/v1/models/netapp_volume_info.go deleted file mode 100644 index b3d13830..00000000 --- a/v1/models/netapp_volume_info.go +++ /dev/null @@ -1,448 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappVolumeInfo NetApp Volume Information. -// -// Specifies information about a volume in a NetApp cluster. -// -// swagger:model NetappVolumeInfo -type NetappVolumeInfo struct { - - // Specifies the containing aggregate name of this volume. - AggregateName *string `json:"aggregateName,omitempty"` - - // Specifies the total capacity in bytes of this volume. - CapacityBytes *int64 `json:"capacityBytes,omitempty"` - - // Array of CIFS Shares. - // - // Specifies the set of CIFS Shares exported for this volume. - CifsShares []*CifsShareInfo `json:"cifsShares"` - - // Specifies the creation time of the volume specified in Unix epoch time - // (in microseconds). - CreationTimeUsecs *int64 `json:"creationTimeUsecs,omitempty"` - - // Array of Data Protocols. - // - // Specifies the set of data protocols supported by this volume. - // 'kNfs' indicates NFS connections. - // 'kCifs' indicates SMB (CIFS) connections. - // 'kIscsi' indicates iSCSI connections. - // 'kFc' indicates Fiber Channel connections. - // 'kFcache' indicates Flex Cache connections. - // 'kHttp' indicates HTTP connections. - // 'kNdmp' indicates NDMP connections. - // 'kManagement' indicates non-data connections used for management purposes. - // 'kNvme' indicates NVMe connections. - DataProtocols []string `json:"dataProtocols"` - - // Specifies the name of the export policy (which defines the access - // permissions for the mount client) that has been assigned to this volume. - ExportPolicyName *string `json:"exportPolicyName,omitempty"` - - // Specifies the Extended style information of a NetApp volume. - // Specifies the extended style info of a NetApp Volume. - // 'kFlexGroup' indicates FlexGroup volume. A FlexGroup volume contains - // several constituents (which themselves are Netapp volumes) that - // automatically and transparently share the traffic. Cohesity does - // not need to deal with the individual consituents, - // just the main FlexGroup volume. - // 'kFlexVol' indicates FlexVol volume. A typical NAS share. - // Enum: ["kFlexVol","kFlexGroup"] - ExtendedStyle *string `json:"extendedStyle,omitempty"` - - // Specifies the junction path of this volume. - // This path can be used to mount this volume via protocols such as NFS. - JunctionPath *string `json:"junctionPath,omitempty"` - - // Specifies the name of the NetApp Vserver that this volume belongs to. - Name *string `json:"name,omitempty"` - - // Specifies the security information of this volume. - SecurityInfo *VolumeSecurityInfo `json:"securityInfo,omitempty"` - - // Specifies the state of this volume. - // Specifies the state of a NetApp Volume. - // 'kOnline' indicates the volume is online. Read and write access to this - // volume is allowed. - // 'kRestricted' indicates the volume is restricted. Some operations, - // such as parity reconstruction, are allowed, but data access is not - // allowed. - // 'kOffline' indicates the volume is offline. No access to the volume is - // allowed. - // 'kMixed' indicates the volume is in mixed state, which means its - // aggregates are not all in the same state. - // Enum: ["kOnline","kRestricted","kOffline","kMixed"] - State *string `json:"state,omitempty"` - - // Specifies the NetApp type of this volume. - // Specifies the type of a NetApp Volume. - // 'kReadWrite' indicates read-write volume. - // 'kLoadSharing' indicates load-sharing volume. - // 'kDataProtection' indicates data-protection volume. - // 'kDataCache' indicates data-cache volume. - // 'kTmp' indicates temporary purpose. - // 'kUnknownType' indicates unknown type. - // Enum: ["kReadWrite","kLoadSharing","kDataProtection","kDataCache","kTmp","kUnknownType"] - Type *string `json:"type,omitempty"` - - // Specifies the total space (in bytes) used in this volume. - UsedBytes *int64 `json:"usedBytes,omitempty"` -} - -// Validate validates this netapp volume info -func (m *NetappVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCifsShares(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataProtocols(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedStyle(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappVolumeInfo) validateCifsShares(formats strfmt.Registry) error { - if swag.IsZero(m.CifsShares) { // not required - return nil - } - - for i := 0; i < len(m.CifsShares); i++ { - if swag.IsZero(m.CifsShares[i]) { // not required - continue - } - - if m.CifsShares[i] != nil { - if err := m.CifsShares[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cifsShares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cifsShares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var netappVolumeInfoDataProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVolumeInfoDataProtocolsItemsEnum = append(netappVolumeInfoDataProtocolsItemsEnum, v) - } -} - -func (m *NetappVolumeInfo) validateDataProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVolumeInfoDataProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVolumeInfo) validateDataProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.DataProtocols) { // not required - return nil - } - - for i := 0; i < len(m.DataProtocols); i++ { - - // value enum - if err := m.validateDataProtocolsItemsEnum("dataProtocols"+"."+strconv.Itoa(i), "body", m.DataProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -var netappVolumeInfoTypeExtendedStylePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFlexVol","kFlexGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVolumeInfoTypeExtendedStylePropEnum = append(netappVolumeInfoTypeExtendedStylePropEnum, v) - } -} - -const ( - - // NetappVolumeInfoExtendedStyleKFlexVol captures enum value "kFlexVol" - NetappVolumeInfoExtendedStyleKFlexVol string = "kFlexVol" - - // NetappVolumeInfoExtendedStyleKFlexGroup captures enum value "kFlexGroup" - NetappVolumeInfoExtendedStyleKFlexGroup string = "kFlexGroup" -) - -// prop value enum -func (m *NetappVolumeInfo) validateExtendedStyleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVolumeInfoTypeExtendedStylePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVolumeInfo) validateExtendedStyle(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedStyle) { // not required - return nil - } - - // value enum - if err := m.validateExtendedStyleEnum("extendedStyle", "body", *m.ExtendedStyle); err != nil { - return err - } - - return nil -} - -func (m *NetappVolumeInfo) validateSecurityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityInfo) { // not required - return nil - } - - if m.SecurityInfo != nil { - if err := m.SecurityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityInfo") - } - return err - } - } - - return nil -} - -var netappVolumeInfoTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOnline","kRestricted","kOffline","kMixed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVolumeInfoTypeStatePropEnum = append(netappVolumeInfoTypeStatePropEnum, v) - } -} - -const ( - - // NetappVolumeInfoStateKOnline captures enum value "kOnline" - NetappVolumeInfoStateKOnline string = "kOnline" - - // NetappVolumeInfoStateKRestricted captures enum value "kRestricted" - NetappVolumeInfoStateKRestricted string = "kRestricted" - - // NetappVolumeInfoStateKOffline captures enum value "kOffline" - NetappVolumeInfoStateKOffline string = "kOffline" - - // NetappVolumeInfoStateKMixed captures enum value "kMixed" - NetappVolumeInfoStateKMixed string = "kMixed" -) - -// prop value enum -func (m *NetappVolumeInfo) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVolumeInfoTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVolumeInfo) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -var netappVolumeInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kReadWrite","kLoadSharing","kDataProtection","kDataCache","kTmp","kUnknownType"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVolumeInfoTypeTypePropEnum = append(netappVolumeInfoTypeTypePropEnum, v) - } -} - -const ( - - // NetappVolumeInfoTypeKReadWrite captures enum value "kReadWrite" - NetappVolumeInfoTypeKReadWrite string = "kReadWrite" - - // NetappVolumeInfoTypeKLoadSharing captures enum value "kLoadSharing" - NetappVolumeInfoTypeKLoadSharing string = "kLoadSharing" - - // NetappVolumeInfoTypeKDataProtection captures enum value "kDataProtection" - NetappVolumeInfoTypeKDataProtection string = "kDataProtection" - - // NetappVolumeInfoTypeKDataCache captures enum value "kDataCache" - NetappVolumeInfoTypeKDataCache string = "kDataCache" - - // NetappVolumeInfoTypeKTmp captures enum value "kTmp" - NetappVolumeInfoTypeKTmp string = "kTmp" - - // NetappVolumeInfoTypeKUnknownType captures enum value "kUnknownType" - NetappVolumeInfoTypeKUnknownType string = "kUnknownType" -) - -// prop value enum -func (m *NetappVolumeInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVolumeInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVolumeInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this netapp volume info based on the context it is used -func (m *NetappVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCifsShares(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecurityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappVolumeInfo) contextValidateCifsShares(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CifsShares); i++ { - - if m.CifsShares[i] != nil { - - if swag.IsZero(m.CifsShares[i]) { // not required - return nil - } - - if err := m.CifsShares[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cifsShares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cifsShares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetappVolumeInfo) contextValidateSecurityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SecurityInfo != nil { - - if swag.IsZero(m.SecurityInfo) { // not required - return nil - } - - if err := m.SecurityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappVolumeInfo) UnmarshalBinary(b []byte) error { - var res NetappVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/netapp_vserver_info.go b/v1/models/netapp_vserver_info.go deleted file mode 100644 index e97ddb38..00000000 --- a/v1/models/netapp_vserver_info.go +++ /dev/null @@ -1,301 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappVserverInfo NetApp Vserver Information. -// -// Specifies information about a NetApp Vserver in a NetApp Protection Source. -// -// swagger:model NetappVserverInfo -type NetappVserverInfo struct { - - // Array of Data Protocols. - // - // Specifies the set of data protocols supported by this Vserver. - // The kManagement protocol is not supported for this case. - // 'kNfs' indicates NFS connections. - // 'kCifs' indicates SMB (CIFS) connections. - // 'kIscsi' indicates iSCSI connections. - // 'kFc' indicates Fiber Channel connections. - // 'kFcache' indicates Flex Cache connections. - // 'kHttp' indicates HTTP connections. - // 'kNdmp' indicates NDMP connections. - // 'kManagement' indicates non-data connections used for management purposes. - // 'kNvme' indicates NVMe connections. - DataProtocols []string `json:"dataProtocols"` - - // Array of Interfaces. - // - // Specifies information about all interfaces on this Vserver. - Interfaces []*VserverNetworkInterface `json:"interfaces"` - - // Specifies the root 'c$' CIFS share of this Vserver. - // If it exists, it can be used to mount all CIFS volumes that are - // junctioned under '/' on this Vserver. - RootCifsShare *CifsShareInfo `json:"rootCifsShare,omitempty"` - - // Specifies the type of this Vserver. - // Specifies the type of the NetApp Vserver. - // 'kData' indicates the Vserver is used for data backup and restore. - // 'kAdmin' indicates the Vserver is used for cluster-wide management. - // 'kSystem' indicates the Vserver is used for cluster-scoped communications - // in an IPspace. - // 'kNode' indicates the Vserver is used as the physical controller. - // 'kUnknown' indicates the Vserver is used for an unknown purpose. - // Enum: ["kData","kAdmin","kSystem","kNode","kUnknown"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this netapp vserver info -func (m *NetappVserverInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataProtocols(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInterfaces(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootCifsShare(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappVserverInfoDataProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVserverInfoDataProtocolsItemsEnum = append(netappVserverInfoDataProtocolsItemsEnum, v) - } -} - -func (m *NetappVserverInfo) validateDataProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVserverInfoDataProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVserverInfo) validateDataProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.DataProtocols) { // not required - return nil - } - - for i := 0; i < len(m.DataProtocols); i++ { - - // value enum - if err := m.validateDataProtocolsItemsEnum("dataProtocols"+"."+strconv.Itoa(i), "body", m.DataProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *NetappVserverInfo) validateInterfaces(formats strfmt.Registry) error { - if swag.IsZero(m.Interfaces) { // not required - return nil - } - - for i := 0; i < len(m.Interfaces); i++ { - if swag.IsZero(m.Interfaces[i]) { // not required - continue - } - - if m.Interfaces[i] != nil { - if err := m.Interfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetappVserverInfo) validateRootCifsShare(formats strfmt.Registry) error { - if swag.IsZero(m.RootCifsShare) { // not required - return nil - } - - if m.RootCifsShare != nil { - if err := m.RootCifsShare.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootCifsShare") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootCifsShare") - } - return err - } - } - - return nil -} - -var netappVserverInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kData","kAdmin","kSystem","kNode","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVserverInfoTypeTypePropEnum = append(netappVserverInfoTypeTypePropEnum, v) - } -} - -const ( - - // NetappVserverInfoTypeKData captures enum value "kData" - NetappVserverInfoTypeKData string = "kData" - - // NetappVserverInfoTypeKAdmin captures enum value "kAdmin" - NetappVserverInfoTypeKAdmin string = "kAdmin" - - // NetappVserverInfoTypeKSystem captures enum value "kSystem" - NetappVserverInfoTypeKSystem string = "kSystem" - - // NetappVserverInfoTypeKNode captures enum value "kNode" - NetappVserverInfoTypeKNode string = "kNode" - - // NetappVserverInfoTypeKUnknown captures enum value "kUnknown" - NetappVserverInfoTypeKUnknown string = "kUnknown" -) - -// prop value enum -func (m *NetappVserverInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVserverInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVserverInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this netapp vserver info based on the context it is used -func (m *NetappVserverInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaces(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootCifsShare(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappVserverInfo) contextValidateInterfaces(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Interfaces); i++ { - - if m.Interfaces[i] != nil { - - if swag.IsZero(m.Interfaces[i]) { // not required - return nil - } - - if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetappVserverInfo) contextValidateRootCifsShare(ctx context.Context, formats strfmt.Registry) error { - - if m.RootCifsShare != nil { - - if swag.IsZero(m.RootCifsShare) { // not required - return nil - } - - if err := m.RootCifsShare.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootCifsShare") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootCifsShare") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappVserverInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappVserverInfo) UnmarshalBinary(b []byte) error { - var res NetappVserverInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_configuration.go b/v1/models/network_configuration.go deleted file mode 100644 index 36cc9435..00000000 --- a/v1/models/network_configuration.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/strfmt" - "github.com/go-openapi/swag" -) - -// NetworkConfiguration Network Configuration. -// -// Specifies all of the parameters needed for network configuration of -// the new Cluster. -// -// swagger:model NetworkConfiguration -type NetworkConfiguration struct { - - // Specifies the default gateway IP address (or addresses) for the Cluster - // network. - ClusterGateway *string `json:"clusterGateway,omitempty"` - - // Specifies the subnet mask (or masks) of the Cluster network. - ClusterSubnetMask *string `json:"clusterSubnetMask,omitempty"` - - // Specifies the list of DNS Servers this cluster should be configured with. - DNSServers []string `json:"dnsServers"` - - // Specifies the list of domain names this cluster should be configured - // with. - DomainNames []string `json:"domainNames"` - - // Specifies the list of NTP Servers this cluster should be configured with. - NtpServers []string `json:"ntpServers"` - - // Specifies the virtual IP hostname. - VipHostname *string `json:"vipHostname,omitempty"` - - // Specifies the list of virtual IPs for the new cluster. - Vips []string `json:"vips"` -} - -// Validate validates this network configuration -func (m *NetworkConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network configuration based on context it is used -func (m *NetworkConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkConfiguration) UnmarshalBinary(b []byte) error { - var res NetworkConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_interface.go b/v1/models/network_interface.go deleted file mode 100644 index 90cb01ab..00000000 --- a/v1/models/network_interface.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NetworkInterface Network Interface. -// -// Specifies the properties of a network interface. -// -// swagger:model NetworkInterface -type NetworkInterface struct { - - // Current active secondary. This is only valid in active-backup mode. - ActiveBondSlave *string `json:"activeBondSlave,omitempty"` - - // Specifies the types of the slots of any secondaries if this interface is a - // bond. - BondSlaveSlotTypes []string `json:"bondSlaveSlotTypes"` - - // Specifies the names of any secondaries if this interface is a bond. - BondSlaves []string `json:"bondSlaves"` - - // Specifies the details of the bond secondaries. - BondSlavesDetails []*BondSlaveInfo `json:"bondSlavesDetails"` - - // Specifies the bonding mode if this interface is a bond. - BondingMode *int32 `json:"bondingMode,omitempty"` - - // Specifies the gateway of the interface. - Gateway *string `json:"gateway,omitempty"` - - // Specifies the gateway6 of the interface. - Gateway6 *string `json:"gateway6,omitempty"` - - // Specifies the group that this interface belongs to. - Group *string `json:"group,omitempty"` - - // Specifies the ID of this network interface. - ID *int64 `json:"id,omitempty"` - - // Specifies whether or not the Interface is connected. - IsConnected *bool `json:"isConnected,omitempty"` - - // Specifies whether or not to use this interface as the default route. - IsDefaultRoute *bool `json:"isDefaultRoute,omitempty"` - - // Specifies whether or not the interface is currently up. - IsUp *bool `json:"isUp,omitempty"` - - // Specifies the Mac address of the Interface. - MacAddress *string `json:"macAddress,omitempty"` - - // Specifies the MTU of the interface. - Mtu *int32 `json:"mtu,omitempty"` - - // Specifies the name of the interface port. - Name *string `json:"name,omitempty"` - - // Specifies the role of this interface. - Role *string `json:"role,omitempty"` - - // Specifies the types of services this interface is used for. - Services []string `json:"services"` - - // Specifies the speed of the Interface. - Speed *string `json:"speed,omitempty"` - - // Specifies the static IP of the interface. - StaticIP *string `json:"staticIp,omitempty"` - - // Specifies the static IPv6 of the interface. - StaticIp6 *string `json:"staticIp6,omitempty"` - - // Interface Stats. - Stats *InterfaceStats `json:"stats,omitempty"` - - // Specifies the subnet mask of the interface. - Subnet *string `json:"subnet,omitempty"` - - // Specifies the subnet6 mask of the interface. - Subnet6 *string `json:"subnet6,omitempty"` - - // Specifies the type of interface. - Type *int32 `json:"type,omitempty"` - - // Specifies the virtual IP of the interface. - VirtualIP *string `json:"virtualIp,omitempty"` -} - -// Validate validates this network interface -func (m *NetworkInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondSlavesDetails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkInterface) validateBondSlavesDetails(formats strfmt.Registry) error { - if swag.IsZero(m.BondSlavesDetails) { // not required - return nil - } - - for i := 0; i < len(m.BondSlavesDetails); i++ { - if swag.IsZero(m.BondSlavesDetails[i]) { // not required - continue - } - - if m.BondSlavesDetails[i] != nil { - if err := m.BondSlavesDetails[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetworkInterface) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this network interface based on the context it is used -func (m *NetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBondSlavesDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkInterface) contextValidateBondSlavesDetails(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BondSlavesDetails); i++ { - - if m.BondSlavesDetails[i] != nil { - - if swag.IsZero(m.BondSlavesDetails[i]) { // not required - return nil - } - - if err := m.BondSlavesDetails[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetworkInterface) 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 -} - -// MarshalBinary interface implementation -func (m *NetworkInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkInterface) UnmarshalBinary(b []byte) error { - var res NetworkInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_mapping.go b/v1/models/network_mapping.go deleted file mode 100644 index 22d10ff9..00000000 --- a/v1/models/network_mapping.go +++ /dev/null @@ -1,66 +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" -) - -// NetworkMapping Network Mapping -// -// Specifies the information needed when mapping the source networks to -// target networks during restore and clone actions. -// -// swagger:model NetworkMapping -type NetworkMapping struct { - - // Specifies if the network should be disabled. On restore or clone - // of the VM, if the network should be kept in disabled state, set this - // flag to true. The mapped network is enabled by default. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies if the source mac address should be preserved after restore - // or clone. In case of collision of mac address on target network the - // job won't fail. Address collision should be resolved manually. - PreserveMacAddress *bool `json:"preserveMacAddress,omitempty"` - - // Specifies the id of the source network. - SourceNetworkID *int64 `json:"sourceNetworkId,omitempty"` - - // Specifies the id of target network. - TargetNetworkID *int64 `json:"targetNetworkId,omitempty"` -} - -// Validate validates this network mapping -func (m *NetworkMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network mapping based on context it is used -func (m *NetworkMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkMapping) UnmarshalBinary(b []byte) error { - var res NetworkMapping - 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 deleted file mode 100644 index aafc84ee..00000000 --- a/v1/models/network_mapping_proto.go +++ /dev/null @@ -1,173 +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" -) - -// NetworkMappingProto network mapping proto -// -// swagger:model NetworkMappingProto -type NetworkMappingProto struct { - - // This can be set to true to indicate that the attached network should be - // left in disabled state. This value takes priority over the value in - // RestoredObjectNetworkConfigProto. - DisableNetwork *bool `json:"disableNetwork,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. - SourceNetworkEntity *EntityProto `json:"sourceNetworkEntity,omitempty"` - - // The network entity (i.e, either a standard switch port group or a - // distributed port group in a VMware env) that will be attached to - // one of the target object. - TargetNetworkEntity *EntityProto `json:"targetNetworkEntity,omitempty"` -} - -// Validate validates this network mapping proto -func (m *NetworkMappingProto) Validate(formats strfmt.Registry) error { - var res []error - - 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 *NetworkMappingProto) 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 *NetworkMappingProto) 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 network mapping proto based on the context it is used -func (m *NetworkMappingProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - 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 *NetworkMappingProto) 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 *NetworkMappingProto) 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 *NetworkMappingProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkMappingProto) UnmarshalBinary(b []byte) error { - var res NetworkMappingProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_params.go b/v1/models/network_params.go deleted file mode 100644 index f6bee933..00000000 --- a/v1/models/network_params.go +++ /dev/null @@ -1,112 +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" -) - -// NetworkParams network params -// -// swagger:model NetworkParams -type NetworkParams struct { - - // bonding opts - BondingOpts *BondingOpts `json:"bondingOpts,omitempty"` - - // mtu - Mtu *int32 `json:"mtu,omitempty"` -} - -// Validate validates this network params -func (m *NetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondingOpts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkParams) validateBondingOpts(formats strfmt.Registry) error { - if swag.IsZero(m.BondingOpts) { // not required - return nil - } - - if m.BondingOpts != nil { - if err := m.BondingOpts.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondingOpts") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondingOpts") - } - return err - } - } - - return nil -} - -// ContextValidate validate this network params based on the context it is used -func (m *NetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBondingOpts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkParams) contextValidateBondingOpts(ctx context.Context, formats strfmt.Registry) error { - - if m.BondingOpts != nil { - - if swag.IsZero(m.BondingOpts) { // not required - return nil - } - - if err := m.BondingOpts.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondingOpts") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondingOpts") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkParams) UnmarshalBinary(b []byte) error { - var res NetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_pool.go b/v1/models/network_pool.go deleted file mode 100644 index fd2114ae..00000000 --- a/v1/models/network_pool.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetworkPool Specifies the network pool config of an Isilon Access Zone. -// -// swagger:model NetworkPool -type NetworkPool struct { - - // Specifies the enum for the IP address families. - // 'kUnknown' indicates IP address families are unknown. - // 'kIPv4' indicates IP addresses used are from IPv4 family. - // 'kIPv6' indicates IP addresses used are from IPv6 family. - // Enum: ["kUnknown","kIPv4","kIPv6"] - AddressFamily *string `json:"addressFamily,omitempty"` - - // Specifies the enum for IP allocation method. - // 'kUnknownAllocMethod' indicates allocation method is unknown. - // 'kStaticAllocMethod' indicates static allocation method for IP addresses. - // 'kDynamicAllocMethod' indicates dynamic allocation method for IP addresses. - // Enum: ["kUnknownAllocMethod","kStaticAllocMethod","kDynamicAllocMethod"] - AllocationMethod *string `json:"allocationMethod,omitempty"` - - // Specifies the groupnet name of the network pool. - Groupnet *string `json:"groupnet,omitempty"` - - // Specifies the unique identifier of the network pool. - ID *string `json:"id,omitempty"` - - // Specifies the name of the network pool. - Name *string `json:"name,omitempty"` - - // Specifies the IP address range. - Ranges []*NetworkPoolRange `json:"ranges"` - - // Specifies the SmartConnect zone name of the network pool. - SmartConnectDNSZone *string `json:"smartConnectDnsZone,omitempty"` - - // Specifies the subnet name of the network pool. - Subnet *string `json:"subnet,omitempty"` -} - -// Validate validates this network pool -func (m *NetworkPool) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAddressFamily(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAllocationMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var networkPoolTypeAddressFamilyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kIPv4","kIPv6"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkPoolTypeAddressFamilyPropEnum = append(networkPoolTypeAddressFamilyPropEnum, v) - } -} - -const ( - - // NetworkPoolAddressFamilyKUnknown captures enum value "kUnknown" - NetworkPoolAddressFamilyKUnknown string = "kUnknown" - - // NetworkPoolAddressFamilyKIPV4 captures enum value "kIPv4" - NetworkPoolAddressFamilyKIPV4 string = "kIPv4" - - // NetworkPoolAddressFamilyKIPV6 captures enum value "kIPv6" - NetworkPoolAddressFamilyKIPV6 string = "kIPv6" -) - -// prop value enum -func (m *NetworkPool) validateAddressFamilyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkPoolTypeAddressFamilyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkPool) validateAddressFamily(formats strfmt.Registry) error { - if swag.IsZero(m.AddressFamily) { // not required - return nil - } - - // value enum - if err := m.validateAddressFamilyEnum("addressFamily", "body", *m.AddressFamily); err != nil { - return err - } - - return nil -} - -var networkPoolTypeAllocationMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknownAllocMethod","kStaticAllocMethod","kDynamicAllocMethod"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkPoolTypeAllocationMethodPropEnum = append(networkPoolTypeAllocationMethodPropEnum, v) - } -} - -const ( - - // NetworkPoolAllocationMethodKUnknownAllocMethod captures enum value "kUnknownAllocMethod" - NetworkPoolAllocationMethodKUnknownAllocMethod string = "kUnknownAllocMethod" - - // NetworkPoolAllocationMethodKStaticAllocMethod captures enum value "kStaticAllocMethod" - NetworkPoolAllocationMethodKStaticAllocMethod string = "kStaticAllocMethod" - - // NetworkPoolAllocationMethodKDynamicAllocMethod captures enum value "kDynamicAllocMethod" - NetworkPoolAllocationMethodKDynamicAllocMethod string = "kDynamicAllocMethod" -) - -// prop value enum -func (m *NetworkPool) validateAllocationMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkPoolTypeAllocationMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkPool) validateAllocationMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AllocationMethod) { // not required - return nil - } - - // value enum - if err := m.validateAllocationMethodEnum("allocationMethod", "body", *m.AllocationMethod); err != nil { - return err - } - - return nil -} - -func (m *NetworkPool) validateRanges(formats strfmt.Registry) error { - if swag.IsZero(m.Ranges) { // not required - return nil - } - - for i := 0; i < len(m.Ranges); i++ { - if swag.IsZero(m.Ranges[i]) { // not required - continue - } - - if m.Ranges[i] != nil { - if err := m.Ranges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ranges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ranges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this network pool based on the context it is used -func (m *NetworkPool) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkPool) contextValidateRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ranges); i++ { - - if m.Ranges[i] != nil { - - if swag.IsZero(m.Ranges[i]) { // not required - return nil - } - - if err := m.Ranges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ranges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ranges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkPool) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkPool) UnmarshalBinary(b []byte) error { - var res NetworkPool - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_pool_config.go b/v1/models/network_pool_config.go deleted file mode 100644 index 9c3edb72..00000000 --- a/v1/models/network_pool_config.go +++ /dev/null @@ -1,61 +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" -) - -// NetworkPoolConfig Specifies the Network pool configuration of the Isilon Access Zone. -// -// While caonfiguring the isilon protection source, this is the selected -// network pool config for the isilon access zone. -// -// swagger:model NetworkPoolConfig -type NetworkPoolConfig struct { - - // Specifies the name of the Network pool. - PoolName *string `json:"poolName,omitempty"` - - // Specifies the name of the subnet the network pool belongs to. - Subnet *string `json:"subnet,omitempty"` - - // Specifies whether to use SmartConnect if available. If true, DNS name for - // the SmartConnect zone will be used to balance the IPs. Otherwise, pool IPs - // will be balanced manually. - UseSmartConnect *bool `json:"useSmartConnect,omitempty"` -} - -// Validate validates this network pool config -func (m *NetworkPoolConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network pool config based on context it is used -func (m *NetworkPoolConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkPoolConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkPoolConfig) UnmarshalBinary(b []byte) error { - var res NetworkPoolConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_pool_range.go b/v1/models/network_pool_range.go deleted file mode 100644 index 378dc3fb..00000000 --- a/v1/models/network_pool_range.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" -) - -// NetworkPoolRange Specifies the IP address range for the network pool. -// -// swagger:model NetworkPoolRange -type NetworkPoolRange struct { - - // Specifies the high range of the IP address. - High *string `json:"high,omitempty"` - - // Specifies the low range of the IP address. - Low *string `json:"low,omitempty"` -} - -// Validate validates this network pool range -func (m *NetworkPoolRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network pool range based on context it is used -func (m *NetworkPoolRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkPoolRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkPoolRange) UnmarshalBinary(b []byte) error { - var res NetworkPoolRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_realm_info.go b/v1/models/network_realm_info.go deleted file mode 100644 index 0c10075b..00000000 --- a/v1/models/network_realm_info.go +++ /dev/null @@ -1,62 +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" -) - -// NetworkRealmInfo Contains mapping of network realms with adapter specific entities. This -// will be populated by IRIS for create/update source requests so that we can -// persist the mapping in the corresponding entity hierarchy. -// -// swagger:model NetworkRealmInfo -type NetworkRealmInfo struct { - - // 'network_realm_id' maintains the collection of connector_group_id. - // Connector group id for the environment. If it is set, Magneto will - // fetch the bifrost server based on . - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Entity id to which the network_realm_id is mapped to. This can be a non - // root entity as well. - EntityID *int64 `json:"entityId,omitempty"` - - // Network Realm id to use for the tenant. This realm could be a collection - // of Rigel/HyX. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` -} - -// Validate validates this network realm info -func (m *NetworkRealmInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network realm info based on context it is used -func (m *NetworkRealmInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkRealmInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkRealmInfo) UnmarshalBinary(b []byte) error { - var res NetworkRealmInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/networking_information.go b/v1/models/networking_information.go deleted file mode 100644 index 8af1b786..00000000 --- a/v1/models/networking_information.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NetworkingInformation Networking Information. -// -// Specifies the struct containing information about network addresses -// configured on the given box. This is needed for dealing with Windows/Oracle -// Cluster resources that we discover and protect automatically. -// -// swagger:model NetworkingInformation -type NetworkingInformation struct { - - // The list of resources on the system that are accessible by an - // IP address. - ResourceVec []*ClusterNetworkingResourceInformation `json:"resourceVec"` -} - -// Validate validates this networking information -func (m *NetworkingInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourceVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkingInformation) validateResourceVec(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceVec) { // not required - return nil - } - - for i := 0; i < len(m.ResourceVec); i++ { - if swag.IsZero(m.ResourceVec[i]) { // not required - continue - } - - if m.ResourceVec[i] != nil { - if err := m.ResourceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this networking information based on the context it is used -func (m *NetworkingInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkingInformation) contextValidateResourceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResourceVec); i++ { - - if m.ResourceVec[i] != nil { - - if swag.IsZero(m.ResourceVec[i]) { // not required - return nil - } - - if err := m.ResourceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkingInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkingInformation) UnmarshalBinary(b []byte) error { - var res NetworkingInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/new_s3_secret_access_key.go b/v1/models/new_s3_secret_access_key.go deleted file mode 100644 index 7d380c8f..00000000 --- a/v1/models/new_s3_secret_access_key.go +++ /dev/null @@ -1,50 +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" -) - -// NewS3SecretAccessKey new s3 secret access key -// -// swagger:model NewS3SecretAccessKey -type NewS3SecretAccessKey struct { - - // Specifies the new S3 Secret Access key. - NewKey *string `json:"newKey,omitempty"` -} - -// Validate validates this new s3 secret access key -func (m *NewS3SecretAccessKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this new s3 secret access key based on context it is used -func (m *NewS3SecretAccessKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NewS3SecretAccessKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NewS3SecretAccessKey) UnmarshalBinary(b []byte) error { - var res NewS3SecretAccessKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nexus_cloud_credentials.go b/v1/models/nexus_cloud_credentials.go deleted file mode 100644 index 832f4bd6..00000000 --- a/v1/models/nexus_cloud_credentials.go +++ /dev/null @@ -1,214 +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" -) - -// NexusCloudCredentials Message to encapsulate credentials while invoking calls into a specific -// cloud vendor. -// -// Credentials needed to authenticate with cloud (Azure or AWS). -// -// swagger:model NexusCloudCredentials -type NexusCloudCredentials struct { - - // Credentials needed to authenticate with AWS. - AwsCredentials *PrivateAwsCredentials `json:"awsCredentials,omitempty"` - - // Credentials needed to authenticate with Azure. - AzureCredentials *PrivateAzureCredentials `json:"azureCredentials,omitempty"` - - // Credentials needed to authenticate with Google Cloud Platform. - GcpCredentials *PrivateGcpCredentials `json:"gcpCredentials,omitempty"` -} - -// Validate validates this nexus cloud credentials -func (m *NexusCloudCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NexusCloudCredentials) validateAwsCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if m.AwsCredentials != nil { - if err := m.AwsCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *NexusCloudCredentials) validateAzureCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if m.AzureCredentials != nil { - if err := m.AzureCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *NexusCloudCredentials) validateGcpCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if m.GcpCredentials != nil { - if err := m.GcpCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nexus cloud credentials based on the context it is used -func (m *NexusCloudCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NexusCloudCredentials) contextValidateAwsCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCredentials != nil { - - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if err := m.AwsCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *NexusCloudCredentials) contextValidateAzureCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureCredentials != nil { - - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if err := m.AzureCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *NexusCloudCredentials) contextValidateGcpCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpCredentials != nil { - - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if err := m.GcpCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NexusCloudCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NexusCloudCredentials) UnmarshalBinary(b []byte) error { - var res NexusCloudCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nfs_connection.go b/v1/models/nfs_connection.go deleted file mode 100644 index 485171f3..00000000 --- a/v1/models/nfs_connection.go +++ /dev/null @@ -1,63 +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" -) - -// NfsConnection nfs connection -// -// swagger:model NfsConnection -type NfsConnection struct { - - // Specifies the Client IP address of the connection. - ClientIP *string `json:"clientIp,omitempty"` - - // Specifies a Node IP address where the connection request is received. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the Server IP address of the connection. - // This could be a VIP, VLAN IP, or node IP on the Cluster. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the id of the view. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this nfs connection -func (m *NfsConnection) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs connection based on context it is used -func (m *NfsConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsConnection) UnmarshalBinary(b []byte) error { - var res NfsConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nfs_info.go b/v1/models/nfs_info.go deleted file mode 100644 index aef62ef4..00000000 --- a/v1/models/nfs_info.go +++ /dev/null @@ -1,65 +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" -) - -// NfsInfo Message to encapsulate information related to NFS protocol exposed by a file -// system. -// -// swagger:model NfsInfo -type NfsInfo struct { - - // NFS protocol export rules. Rules are in the form host(options). - // host represents one of the following categories: - // - // IP address in the form ddd.ddd.ddd.ddd for IPv4, or - // xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx for IPv6. - // - // Netmask in the form ddd.ddd.ddd.ddd/dd for IPv4, or - // xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xxx for IPv6. - // - // Wildcard in the form * to represent all clients - // - // options in parenthesis represents a comma-separated list of NFS export - // options. - // Valid export options are rw, ro, root_squash, no_root_squash, and - // fileid_32bit. - ExportRules *string `json:"exportRules,omitempty"` -} - -// Validate validates this nfs info -func (m *NfsInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs info based on context it is used -func (m *NfsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsInfo) UnmarshalBinary(b []byte) error { - var res NfsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nfs_root_permissions.go b/v1/models/nfs_root_permissions.go deleted file mode 100644 index fe6a9194..00000000 --- a/v1/models/nfs_root_permissions.go +++ /dev/null @@ -1,58 +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" -) - -// NfsRootPermissions NfsRootPermissions -// -// Specifies the config of NFS root permission of a view file system. -// -// swagger:model NfsRootPermissions -type NfsRootPermissions struct { - - // Unix GID for the root of the file system. - Gid *uint32 `json:"gid,omitempty"` - - // Unix mode bits for the root of the file system. - Mode *uint32 `json:"mode,omitempty"` - - // Unix UID for the root of the file system. - UID *uint32 `json:"uid,omitempty"` -} - -// Validate validates this nfs root permissions -func (m *NfsRootPermissions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs root permissions based on context it is used -func (m *NfsRootPermissions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsRootPermissions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsRootPermissions) UnmarshalBinary(b []byte) error { - var res NfsRootPermissions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nfs_squash.go b/v1/models/nfs_squash.go deleted file mode 100644 index 198763fe..00000000 --- a/v1/models/nfs_squash.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" -) - -// NfsSquash NfsSquash specifies the squash config for client subnet allowlist. -// -// swagger:model NfsSquash -type NfsSquash struct { - - // GID mapped for all clients. - Gid *uint32 `json:"gid,omitempty"` - - // UID mapped for all clients. - UID *uint32 `json:"uid,omitempty"` -} - -// Validate validates this nfs squash -func (m *NfsSquash) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs squash based on context it is used -func (m *NfsSquash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsSquash) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsSquash) UnmarshalBinary(b []byte) error { - var res NfsSquash - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nimble_protection_source.go b/v1/models/nimble_protection_source.go deleted file mode 100644 index 9ad5623e..00000000 --- a/v1/models/nimble_protection_source.go +++ /dev/null @@ -1,224 +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" -) - -// NimbleProtectionSource Nimble Protection Source. -// -// Specifies a Protection Source in a Nimble environment. -// -// swagger:model NimbleProtectionSource -type NimbleProtectionSource struct { - - // Specifies a unique name of the Protection Source - Name *string `json:"name,omitempty"` - - // Specifies a SAN Storage Array information. This is set only when - // the type is kStorageArray. - StorageArray *SanStorageArray `json:"storageArray,omitempty"` - - // Specifies the type of managed Object in a SAN/Nimble Protection - // Source like a kStorageArray or kVolume. - // Examples of SAN Objects include 'kStorageArray' and 'kVolume'. - // 'kStorageArray' indicates that entire SAN storage array is being - // protected. - // 'kVolume' indicates that volume within the array is being protected. - // Enum: ["kStorageArray","kVolume"] - Type *string `json:"type,omitempty"` - - // Specifies a SAN Volume information within a storage array. - // This is set only when the type is kVolume. - Volume *SanVolume `json:"volume,omitempty"` -} - -// Validate validates this nimble protection source -func (m *NimbleProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageArray(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NimbleProtectionSource) validateStorageArray(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if m.StorageArray != nil { - if err := m.StorageArray.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -var nimbleProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nimbleProtectionSourceTypeTypePropEnum = append(nimbleProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // NimbleProtectionSourceTypeKStorageArray captures enum value "kStorageArray" - NimbleProtectionSourceTypeKStorageArray string = "kStorageArray" - - // NimbleProtectionSourceTypeKVolume captures enum value "kVolume" - NimbleProtectionSourceTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *NimbleProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nimbleProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NimbleProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *NimbleProtectionSource) validateVolume(formats strfmt.Registry) error { - if swag.IsZero(m.Volume) { // not required - return nil - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nimble protection source based on the context it is used -func (m *NimbleProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageArray(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NimbleProtectionSource) contextValidateStorageArray(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArray != nil { - - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if err := m.StorageArray.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -func (m *NimbleProtectionSource) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if swag.IsZero(m.Volume) { // not required - return nil - } - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NimbleProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NimbleProtectionSource) UnmarshalBinary(b []byte) error { - var res NimbleProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nis_netgroup.go b/v1/models/nis_netgroup.go deleted file mode 100644 index 39d72e35..00000000 --- a/v1/models/nis_netgroup.go +++ /dev/null @@ -1,126 +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" -) - -// NisNetgroup Netgroup -// -// Defines an NIS Netgroup. -// -// swagger:model NisNetgroup -type NisNetgroup struct { - - // Description of the netgroup. - Description *string `json:"description,omitempty"` - - // Specifies the domain of the netgroup. - Domain *string `json:"domain,omitempty"` - - // Specifies the name of the netgroup. - Name *string `json:"name,omitempty"` - - // Specifies whether clients from this netgroup can mount using NFS protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - NfsAccess *string `json:"nfsAccess,omitempty"` - - // Specifies the NFS squash type. - NfsSquash *int32 `json:"nfsSquash,omitempty"` -} - -// Validate validates this nis netgroup -func (m *NisNetgroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsAccess(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nisNetgroupTypeNfsAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nisNetgroupTypeNfsAccessPropEnum = append(nisNetgroupTypeNfsAccessPropEnum, v) - } -} - -const ( - - // NisNetgroupNfsAccessKDisabled captures enum value "kDisabled" - NisNetgroupNfsAccessKDisabled string = "kDisabled" - - // NisNetgroupNfsAccessKReadOnly captures enum value "kReadOnly" - NisNetgroupNfsAccessKReadOnly string = "kReadOnly" - - // NisNetgroupNfsAccessKReadWrite captures enum value "kReadWrite" - NisNetgroupNfsAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *NisNetgroup) validateNfsAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nisNetgroupTypeNfsAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NisNetgroup) validateNfsAccess(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAccess) { // not required - return nil - } - - // value enum - if err := m.validateNfsAccessEnum("nfsAccess", "body", *m.NfsAccess); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nis netgroup based on context it is used -func (m *NisNetgroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NisNetgroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NisNetgroup) UnmarshalBinary(b []byte) error { - var res NisNetgroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/nlm_lock.go b/v1/models/nlm_lock.go deleted file mode 100644 index c556647c..00000000 --- a/v1/models/nlm_lock.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NlmLock Specifies a NLM lock. -// -// Response map as received from view-keeper is converted into -// this structure. These Locks belong to one file-path. -// -// swagger:model NlmLock -type NlmLock struct { - - // Specifies the client ID - ClientID *string `json:"clientId,omitempty"` - - // lock ranges - LockRanges []*LockRange `json:"lockRanges"` -} - -// Validate validates this nlm lock -func (m *NlmLock) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NlmLock) validateLockRanges(formats strfmt.Registry) error { - if swag.IsZero(m.LockRanges) { // not required - return nil - } - - for i := 0; i < len(m.LockRanges); i++ { - if swag.IsZero(m.LockRanges[i]) { // not required - continue - } - - if m.LockRanges[i] != nil { - if err := m.LockRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nlm lock based on the context it is used -func (m *NlmLock) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLockRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NlmLock) contextValidateLockRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LockRanges); i++ { - - if m.LockRanges[i] != nil { - - if swag.IsZero(m.LockRanges[i]) { // not required - return nil - } - - if err := m.LockRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NlmLock) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NlmLock) UnmarshalBinary(b []byte) error { - var res NlmLock - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_backup_job_params.go b/v1/models/no_sql_backup_job_params.go deleted file mode 100644 index 802fec18..00000000 --- a/v1/models/no_sql_backup_job_params.go +++ /dev/null @@ -1,409 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NoSQLBackupJobParams Contains backup params at the job level applicable for nosql environment. -// -// swagger:model NoSqlBackupJobParams -type NoSQLBackupJobParams struct { - - // Net bandwidth bytes per second. - BandwidthBytesPerSecond *int64 `json:"bandwidthBytesPerSecond,omitempty"` - - // Params specific to cassandra backup job. - CassandraBackupJobParams *CassandraBackupJobParams `json:"cassandraBackupJobParams,omitempty"` - - // Frequency at which compaction jobs should run in seconds. - // Will be only applicable for Cassandra, Mongo and Couchbase environment. - CompactionJobIntervalSecs *int64 `json:"compactionJobIntervalSecs,omitempty"` - - // Max number of mappers. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Params specific to couchbase backup job. - CouchbaseBackupJobParams CouchbaseBackupJobParams `json:"couchbaseBackupJobParams,omitempty"` - - // Frequency at which garbage collection jobs should run in seconds. - GcJobIntervalSecs *int64 `json:"gcJobIntervalSecs,omitempty"` - - // Retention period for logs of this job in days. - GcRetentionPeriodDays *int32 `json:"gcRetentionPeriodDays,omitempty"` - - // Params specific to hbase backup job. - HbaseBackupJobParams *HBaseBackupJobParams `json:"hbaseBackupJobParams,omitempty"` - - // Params specific to hdfs backup job. - HdfsBackupJobParams *HdfsBackupJobParams `json:"hdfsBackupJobParams,omitempty"` - - // Params specific to hive backup job. - HiveBackupJobParams *HiveBackupJobParams `json:"hiveBackupJobParams,omitempty"` - - // A mapping to the immediate ancestor for each protected entites. - // This is used in slave to populate immediate_ancestor_entity_id in Imanis - // EntityProto. The immediate_ancestor_entity_id is used by Imanis to - // populate entity id of non-leaf objects in yoda - // (such as databases, keyspaces) - ImmediateAncestorMap []*NoSQLBackupJobParamsImmediateAncestorMapEntry `json:"immediateAncestorMap"` - - // The last time (in usecs) when the compaction ran for this jobs. - LastCompactionRunTimeUsecs *int64 `json:"lastCompactionRunTimeUsecs,omitempty"` - - // The last time (in usecs) when the gc ran for this jobs. - LastGcRunTimeUsecs *int64 `json:"lastGcRunTimeUsecs,omitempty"` - - // Params specific to mongodb backup job. - MongodbBackupJobParams *MongoDBBackupJobParams `json:"mongodbBackupJobParams,omitempty"` - - // List of Magneto entity Ids for the entities that were protected in the - // previous run. - PreviousProtectedEntityIdsVec []int64 `json:"previousProtectedEntityIdsVec"` -} - -// Validate validates this no Sql backup job params -func (m *NoSQLBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateImmediateAncestorMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbBackupJobParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLBackupJobParams) validateCassandraBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraBackupJobParams) { // not required - return nil - } - - if m.CassandraBackupJobParams != nil { - if err := m.CassandraBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) validateHbaseBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseBackupJobParams) { // not required - return nil - } - - if m.HbaseBackupJobParams != nil { - if err := m.HbaseBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) validateHdfsBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsBackupJobParams) { // not required - return nil - } - - if m.HdfsBackupJobParams != nil { - if err := m.HdfsBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) validateHiveBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveBackupJobParams) { // not required - return nil - } - - if m.HiveBackupJobParams != nil { - if err := m.HiveBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) validateImmediateAncestorMap(formats strfmt.Registry) error { - if swag.IsZero(m.ImmediateAncestorMap) { // not required - return nil - } - - for i := 0; i < len(m.ImmediateAncestorMap); i++ { - if swag.IsZero(m.ImmediateAncestorMap[i]) { // not required - continue - } - - if m.ImmediateAncestorMap[i] != nil { - if err := m.ImmediateAncestorMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("immediateAncestorMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("immediateAncestorMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLBackupJobParams) validateMongodbBackupJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbBackupJobParams) { // not required - return nil - } - - if m.MongodbBackupJobParams != nil { - if err := m.MongodbBackupJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbBackupJobParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql backup job params based on the context it is used -func (m *NoSQLBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateImmediateAncestorMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbBackupJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateCassandraBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraBackupJobParams != nil { - - if swag.IsZero(m.CassandraBackupJobParams) { // not required - return nil - } - - if err := m.CassandraBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateHbaseBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseBackupJobParams != nil { - - if swag.IsZero(m.HbaseBackupJobParams) { // not required - return nil - } - - if err := m.HbaseBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateHdfsBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsBackupJobParams != nil { - - if swag.IsZero(m.HdfsBackupJobParams) { // not required - return nil - } - - if err := m.HdfsBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateHiveBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveBackupJobParams != nil { - - if swag.IsZero(m.HiveBackupJobParams) { // not required - return nil - } - - if err := m.HiveBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveBackupJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateImmediateAncestorMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ImmediateAncestorMap); i++ { - - if m.ImmediateAncestorMap[i] != nil { - - if swag.IsZero(m.ImmediateAncestorMap[i]) { // not required - return nil - } - - if err := m.ImmediateAncestorMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("immediateAncestorMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("immediateAncestorMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLBackupJobParams) contextValidateMongodbBackupJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbBackupJobParams != nil { - - if swag.IsZero(m.MongodbBackupJobParams) { // not required - return nil - } - - if err := m.MongodbBackupJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbBackupJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbBackupJobParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLBackupJobParams) UnmarshalBinary(b []byte) error { - var res NoSQLBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_backup_job_params_immediate_ancestor_map_entry.go b/v1/models/no_sql_backup_job_params_immediate_ancestor_map_entry.go deleted file mode 100644 index 6bef384e..00000000 --- a/v1/models/no_sql_backup_job_params_immediate_ancestor_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// NoSQLBackupJobParamsImmediateAncestorMapEntry no Sql backup job params immediate ancestor map entry -// -// swagger:model NoSqlBackupJobParams_ImmediateAncestorMapEntry -type NoSQLBackupJobParamsImmediateAncestorMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *EntityProto `json:"value,omitempty"` -} - -// Validate validates this no Sql backup job params immediate ancestor map entry -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) 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 -} - -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql backup job params immediate ancestor map entry based on the context it is used -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLBackupJobParamsImmediateAncestorMapEntry) UnmarshalBinary(b []byte) error { - var res NoSQLBackupJobParamsImmediateAncestorMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_connect_params.go b/v1/models/no_sql_connect_params.go deleted file mode 100644 index 25fc5546..00000000 --- a/v1/models/no_sql_connect_params.go +++ /dev/null @@ -1,472 +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" -) - -// NoSQLConnectParams no Sql connect params -// -// swagger:model NoSqlConnectParams -type NoSQLConnectParams struct { - - // Additional params required for cassandra backup. - CassandraAdditionalParams *CassandraAdditionalParams `json:"cassandraAdditionalParams,omitempty"` - - // Connect params for connecting to cassandra cluster. Set only if - // env_type is kCassandra. - CassandraConnectParams *CassandraConnectParams `json:"cassandraConnectParams,omitempty"` - - // Additional params for connecting to couchbase cluster. Set only if - // env_type is kCouchbase. - CouchbaseConnectParams *CouchbaseConnectParams `json:"couchbaseConnectParams,omitempty"` - - // Additional params for connecting to hbase cluster. Set only if - // env_type is kHBase. - HbaseConnectParams *HBaseConnectParams `json:"hbaseConnectParams,omitempty"` - - // Additional params for connecting to hdfs cluster. Set only if - // env_type is kHdfs. - HdfsConnectParams *HdfsConnectParams `json:"hdfsConnectParams,omitempty"` - - // Additional params for connecting to hive cluster. Set only if - // env_type is kHive. - HiveConnectParams *HiveConnectParams `json:"hiveConnectParams,omitempty"` - - // Additional params required for mongodb backup. - MongodbAdditionalParams *MongoDBAdditionalParams `json:"mongodbAdditionalParams,omitempty"` - - // Additional params for connecting to mongodb cluster. Set only if - // env_type is kMongoDB. - MongodbConnectParams *MongoDBConnectParams `json:"mongodbConnectParams,omitempty"` -} - -// Validate validates this no Sql connect params -func (m *NoSQLConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLConnectParams) validateCassandraAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAdditionalParams) { // not required - return nil - } - - if m.CassandraAdditionalParams != nil { - if err := m.CassandraAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateCassandraConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraConnectParams) { // not required - return nil - } - - if m.CassandraConnectParams != nil { - if err := m.CassandraConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateCouchbaseConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseConnectParams) { // not required - return nil - } - - if m.CouchbaseConnectParams != nil { - if err := m.CouchbaseConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateHbaseConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseConnectParams) { // not required - return nil - } - - if m.HbaseConnectParams != nil { - if err := m.HbaseConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateHiveConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveConnectParams) { // not required - return nil - } - - if m.HiveConnectParams != nil { - if err := m.HiveConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateMongodbAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbAdditionalParams) { // not required - return nil - } - - if m.MongodbAdditionalParams != nil { - if err := m.MongodbAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) validateMongodbConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbConnectParams) { // not required - return nil - } - - if m.MongodbConnectParams != nil { - if err := m.MongodbConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql connect params based on the context it is used -func (m *NoSQLConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLConnectParams) contextValidateCassandraAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraAdditionalParams != nil { - - if swag.IsZero(m.CassandraAdditionalParams) { // not required - return nil - } - - if err := m.CassandraAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateCassandraConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraConnectParams != nil { - - if swag.IsZero(m.CassandraConnectParams) { // not required - return nil - } - - if err := m.CassandraConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateCouchbaseConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseConnectParams != nil { - - if swag.IsZero(m.CouchbaseConnectParams) { // not required - return nil - } - - if err := m.CouchbaseConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateHbaseConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseConnectParams != nil { - - if swag.IsZero(m.HbaseConnectParams) { // not required - return nil - } - - if err := m.HbaseConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateHiveConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveConnectParams != nil { - - if swag.IsZero(m.HiveConnectParams) { // not required - return nil - } - - if err := m.HiveConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateMongodbAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbAdditionalParams != nil { - - if swag.IsZero(m.MongodbAdditionalParams) { // not required - return nil - } - - if err := m.MongodbAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLConnectParams) contextValidateMongodbConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbConnectParams != nil { - - if swag.IsZero(m.MongodbConnectParams) { // not required - return nil - } - - if err := m.MongodbConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLConnectParams) UnmarshalBinary(b []byte) error { - var res NoSQLConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_log_data.go b/v1/models/no_sql_log_data.go deleted file mode 100644 index 0796c5be..00000000 --- a/v1/models/no_sql_log_data.go +++ /dev/null @@ -1,178 +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" -) - -// NoSQLLogData Proto that contains the information about a log file containing MongoDB -// cdp logs pertaining to an entity. This is populated from the data events -// written to scribe for corresponding entity. The start and end sequence -// numbers correspond to the range of logs inside this file which need to -// be applied for hydration. We also mark if a file has recorded an oplog -// rollover and if it contains at least 1 change event. -// -// swagger:model NoSqlLogData -type NoSQLLogData struct { - - // True if this file contains at least 1 change event. - ContainsChangeEvent *bool `json:"containsChangeEvent,omitempty"` - - // End sequence number in the log file till which the data needs to be - // applied. If this not populated, hydration_time_usecs must be used for - // determining the point till which the log needs to be applied for - // hydration. - EndSeqNumber *Sequencer `json:"endSeqNumber,omitempty"` - - // Name of the log file that needs to be processed. - LogFileName *string `json:"logFileName,omitempty"` - - // True if log rollover has happened. - LogRollover *bool `json:"logRollover,omitempty"` - - // Start sequence number in the log file from which the data needs to be - // applied for hydration. - StartSeqNumber *Sequencer `json:"startSeqNumber,omitempty"` -} - -// Validate validates this no Sql log data -func (m *NoSQLLogData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndSeqNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartSeqNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLLogData) validateEndSeqNumber(formats strfmt.Registry) error { - if swag.IsZero(m.EndSeqNumber) { // not required - return nil - } - - if m.EndSeqNumber != nil { - if err := m.EndSeqNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSeqNumber") - } - return err - } - } - - return nil -} - -func (m *NoSQLLogData) validateStartSeqNumber(formats strfmt.Registry) error { - if swag.IsZero(m.StartSeqNumber) { // not required - return nil - } - - if m.StartSeqNumber != nil { - if err := m.StartSeqNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSeqNumber") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql log data based on the context it is used -func (m *NoSQLLogData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndSeqNumber(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartSeqNumber(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLLogData) contextValidateEndSeqNumber(ctx context.Context, formats strfmt.Registry) error { - - if m.EndSeqNumber != nil { - - if swag.IsZero(m.EndSeqNumber) { // not required - return nil - } - - if err := m.EndSeqNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSeqNumber") - } - return err - } - } - - return nil -} - -func (m *NoSQLLogData) contextValidateStartSeqNumber(ctx context.Context, formats strfmt.Registry) error { - - if m.StartSeqNumber != nil { - - if swag.IsZero(m.StartSeqNumber) { // not required - return nil - } - - if err := m.StartSeqNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSeqNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSeqNumber") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLLogData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLLogData) UnmarshalBinary(b []byte) error { - var res NoSQLLogData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_mirror_recovery_job_params.go b/v1/models/no_sql_mirror_recovery_job_params.go deleted file mode 100644 index 219ed0e2..00000000 --- a/v1/models/no_sql_mirror_recovery_job_params.go +++ /dev/null @@ -1,54 +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" -) - -// NoSQLMirrorRecoveryJobParams no Sql mirror recovery job params -// -// swagger:model NoSqlMirrorRecoveryJobParams -type NoSQLMirrorRecoveryJobParams struct { - - // For mirroring, this id indicates task id of parent restore task in magneto - // This Id can be used by Imanis scheduler to create unique - // drectory on Imanis Scratch Pad view for storing - // adapater specific meta-data files (e.g error list) - // that will be passed to adapters for each incremental recovery runs - MirrorRestoreParentTaskID *int64 `json:"mirrorRestoreParentTaskId,omitempty"` -} - -// Validate validates this no Sql mirror recovery job params -func (m *NoSQLMirrorRecoveryJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this no Sql mirror recovery job params based on context it is used -func (m *NoSQLMirrorRecoveryJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLMirrorRecoveryJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLMirrorRecoveryJobParams) UnmarshalBinary(b []byte) error { - var res NoSQLMirrorRecoveryJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_recover_job_params.go b/v1/models/no_sql_recover_job_params.go deleted file mode 100644 index f3c9b7fa..00000000 --- a/v1/models/no_sql_recover_job_params.go +++ /dev/null @@ -1,429 +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" -) - -// NoSQLRecoverJobParams no Sql recover job params -// -// swagger:model NoSqlRecoverJobParams -type NoSQLRecoverJobParams struct { - - // Net bandwidth bytes per second - BandwidthBytesPerSecond *int64 `json:"bandwidthBytesPerSecond,omitempty"` - - // Params specific to cassandra recover job. - CassandraRecoverJobParams *CassandraRecoverJobParams `json:"cassandraRecoverJobParams,omitempty"` - - // Max number of mappers - Concurrency *int32 `json:"concurrency,omitempty"` - - // ENG-345531 (only for Cassandra currently) - whether to continue - // restore if we encounter error for one of the objects - ContinueRestoreOnError *bool `json:"continueRestoreOnError,omitempty"` - - // Params specific to couchbase recover job. - CouchbaseRecoverJobParams *CouchbaseRecoverJobParams `json:"couchbaseRecoverJobParams,omitempty"` - - // Params specific to hbase recover job. - HbaseRecoverJobParams *HBaseRecoverJobParams `json:"hbaseRecoverJobParams,omitempty"` - - // Params specific to hdfs recover job. - HdfsRecoverJobParams *HdfsRecoverJobParams `json:"hdfsRecoverJobParams,omitempty"` - - // Params specific to hive recover job. - HiveRecoverJobParams *HiveRecoverJobParams `json:"hiveRecoverJobParams,omitempty"` - - // Mirror params - MirrorJobParams *NoSQLMirrorRecoveryJobParams `json:"mirrorJobParams,omitempty"` - - // Params specific to mongodb recover job. - MongodbRecoverJobParams *MongoDBRecoverJobParams `json:"mongodbRecoverJobParams,omitempty"` - - // Whether to overwrite or keep the object if the object being recovered - // already exists in the destination. - Overwrite *bool `json:"overwrite,omitempty"` -} - -// Validate validates this no Sql recover job params -func (m *NoSQLRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMirrorJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverJobParams) validateCassandraRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraRecoverJobParams) { // not required - return nil - } - - if m.CassandraRecoverJobParams != nil { - if err := m.CassandraRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateCouchbaseRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseRecoverJobParams) { // not required - return nil - } - - if m.CouchbaseRecoverJobParams != nil { - if err := m.CouchbaseRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateHbaseRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseRecoverJobParams) { // not required - return nil - } - - if m.HbaseRecoverJobParams != nil { - if err := m.HbaseRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateHdfsRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsRecoverJobParams) { // not required - return nil - } - - if m.HdfsRecoverJobParams != nil { - if err := m.HdfsRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateHiveRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveRecoverJobParams) { // not required - return nil - } - - if m.HiveRecoverJobParams != nil { - if err := m.HiveRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateMirrorJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.MirrorJobParams) { // not required - return nil - } - - if m.MirrorJobParams != nil { - if err := m.MirrorJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mirrorJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mirrorJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) validateMongodbRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbRecoverJobParams) { // not required - return nil - } - - if m.MongodbRecoverJobParams != nil { - if err := m.MongodbRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbRecoverJobParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql recover job params based on the context it is used -func (m *NoSQLRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMirrorJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateCassandraRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraRecoverJobParams != nil { - - if swag.IsZero(m.CassandraRecoverJobParams) { // not required - return nil - } - - if err := m.CassandraRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateCouchbaseRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseRecoverJobParams != nil { - - if swag.IsZero(m.CouchbaseRecoverJobParams) { // not required - return nil - } - - if err := m.CouchbaseRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateHbaseRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseRecoverJobParams != nil { - - if swag.IsZero(m.HbaseRecoverJobParams) { // not required - return nil - } - - if err := m.HbaseRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateHdfsRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsRecoverJobParams != nil { - - if swag.IsZero(m.HdfsRecoverJobParams) { // not required - return nil - } - - if err := m.HdfsRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateHiveRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveRecoverJobParams != nil { - - if swag.IsZero(m.HiveRecoverJobParams) { // not required - return nil - } - - if err := m.HiveRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateMirrorJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MirrorJobParams != nil { - - if swag.IsZero(m.MirrorJobParams) { // not required - return nil - } - - if err := m.MirrorJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mirrorJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mirrorJobParams") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverJobParams) contextValidateMongodbRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbRecoverJobParams != nil { - - if swag.IsZero(m.MongodbRecoverJobParams) { // not required - return nil - } - - if err := m.MongodbRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbRecoverJobParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLRecoverJobParams) UnmarshalBinary(b []byte) error { - var res NoSQLRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_recover_params.go b/v1/models/no_sql_recover_params.go deleted file mode 100644 index 0ad17597..00000000 --- a/v1/models/no_sql_recover_params.go +++ /dev/null @@ -1,289 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NoSQLRecoverParams no Sql recover params -// -// swagger:model NoSqlRecoverParams -type NoSQLRecoverParams struct { - - // end sequencer - EndSequencer *Sequencer `json:"endSequencer,omitempty"` - - // List of leaf level entities with their corrosponding LogData. - EntityLogs []*NoSQLRecoverParamsEntityLog `json:"entityLogs"` - - // The end time for the base snapshot in this recovery. - JobEndTimeUsecs *int64 `json:"jobEndTimeUsecs,omitempty"` - - // restore objects - RestoreObjects []*NoSQLRestoreObject `json:"restoreObjects"` - - // The range of sequencer between which to apply logs present in the atom - // view to achive the point in time recovery. - StartSequencer *Sequencer `json:"startSequencer,omitempty"` -} - -// Validate validates this no Sql recover params -func (m *NoSQLRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndSequencer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityLogs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartSequencer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverParams) validateEndSequencer(formats strfmt.Registry) error { - if swag.IsZero(m.EndSequencer) { // not required - return nil - } - - if m.EndSequencer != nil { - if err := m.EndSequencer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSequencer") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverParams) validateEntityLogs(formats strfmt.Registry) error { - if swag.IsZero(m.EntityLogs) { // not required - return nil - } - - for i := 0; i < len(m.EntityLogs); i++ { - if swag.IsZero(m.EntityLogs[i]) { // not required - continue - } - - if m.EntityLogs[i] != nil { - if err := m.EntityLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLRecoverParams) validateRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.RestoreObjects); i++ { - if swag.IsZero(m.RestoreObjects[i]) { // not required - continue - } - - if m.RestoreObjects[i] != nil { - if err := m.RestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLRecoverParams) validateStartSequencer(formats strfmt.Registry) error { - if swag.IsZero(m.StartSequencer) { // not required - return nil - } - - if m.StartSequencer != nil { - if err := m.StartSequencer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSequencer") - } - return err - } - } - - return nil -} - -// ContextValidate validate this no Sql recover params based on the context it is used -func (m *NoSQLRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndSequencer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartSequencer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverParams) contextValidateEndSequencer(ctx context.Context, formats strfmt.Registry) error { - - if m.EndSequencer != nil { - - if swag.IsZero(m.EndSequencer) { // not required - return nil - } - - if err := m.EndSequencer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endSequencer") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverParams) contextValidateEntityLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityLogs); i++ { - - if m.EntityLogs[i] != nil { - - if swag.IsZero(m.EntityLogs[i]) { // not required - return nil - } - - if err := m.EntityLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLRecoverParams) contextValidateRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreObjects); i++ { - - if m.RestoreObjects[i] != nil { - - if swag.IsZero(m.RestoreObjects[i]) { // not required - return nil - } - - if err := m.RestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLRecoverParams) contextValidateStartSequencer(ctx context.Context, formats strfmt.Registry) error { - - if m.StartSequencer != nil { - - if swag.IsZero(m.StartSequencer) { // not required - return nil - } - - if err := m.StartSequencer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startSequencer") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLRecoverParams) UnmarshalBinary(b []byte) error { - var res NoSQLRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_recover_params_entity_log.go b/v1/models/no_sql_recover_params_entity_log.go deleted file mode 100644 index befd8c03..00000000 --- a/v1/models/no_sql_recover_params_entity_log.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NoSQLRecoverParamsEntityLog no Sql recover params entity log -// -// swagger:model NoSqlRecoverParams_EntityLog -type NoSQLRecoverParamsEntityLog struct { - - // Entity for a leaf level entity. - Entity *EntityProto `json:"entity,omitempty"` - - // List of log file and time range to applied for hydrated - // backup or for recovery. Each data event has a path of log file and the - // valid sequencer range within that log file. - LogDataVec []*NoSQLLogData `json:"logDataVec"` -} - -// Validate validates this no Sql recover params entity log -func (m *NoSQLRecoverParamsEntityLog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogDataVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverParamsEntityLog) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverParamsEntityLog) validateLogDataVec(formats strfmt.Registry) error { - if swag.IsZero(m.LogDataVec) { // not required - return nil - } - - for i := 0; i < len(m.LogDataVec); i++ { - if swag.IsZero(m.LogDataVec[i]) { // not required - continue - } - - if m.LogDataVec[i] != nil { - if err := m.LogDataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this no Sql recover params entity log based on the context it is used -func (m *NoSQLRecoverParamsEntityLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogDataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRecoverParamsEntityLog) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *NoSQLRecoverParamsEntityLog) contextValidateLogDataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LogDataVec); i++ { - - if m.LogDataVec[i] != nil { - - if swag.IsZero(m.LogDataVec[i]) { // not required - return nil - } - - if err := m.LogDataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLRecoverParamsEntityLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLRecoverParamsEntityLog) UnmarshalBinary(b []byte) error { - var res NoSQLRecoverParamsEntityLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_restore_object.go b/v1/models/no_sql_restore_object.go deleted file mode 100644 index 85342391..00000000 --- a/v1/models/no_sql_restore_object.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NoSQLRestoreObject no Sql restore object -// -// swagger:model NoSqlRestoreObject -type NoSQLRestoreObject struct { - - // Key-Value pair for properties to apply on restore object. - // Ex. Compaction for cassandra or ShardKeyJson for Mongo. - ObjectRestorePropertiesMap []*NoSQLRestoreObjectObjectRestorePropertiesMapEntry `json:"objectRestorePropertiesMap"` - - // Uuid of the object to be restored. - ObjectUUID *string `json:"objectUuid,omitempty"` - - // The new name of the object after restore. - Rename *string `json:"rename,omitempty"` -} - -// Validate validates this no Sql restore object -func (m *NoSQLRestoreObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectRestorePropertiesMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRestoreObject) validateObjectRestorePropertiesMap(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectRestorePropertiesMap) { // not required - return nil - } - - for i := 0; i < len(m.ObjectRestorePropertiesMap); i++ { - if swag.IsZero(m.ObjectRestorePropertiesMap[i]) { // not required - continue - } - - if m.ObjectRestorePropertiesMap[i] != nil { - if err := m.ObjectRestorePropertiesMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectRestorePropertiesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectRestorePropertiesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this no Sql restore object based on the context it is used -func (m *NoSQLRestoreObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectRestorePropertiesMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLRestoreObject) contextValidateObjectRestorePropertiesMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectRestorePropertiesMap); i++ { - - if m.ObjectRestorePropertiesMap[i] != nil { - - if swag.IsZero(m.ObjectRestorePropertiesMap[i]) { // not required - return nil - } - - if err := m.ObjectRestorePropertiesMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectRestorePropertiesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectRestorePropertiesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLRestoreObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLRestoreObject) UnmarshalBinary(b []byte) error { - var res NoSQLRestoreObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/no_sql_restore_object_object_restore_properties_map_entry.go b/v1/models/no_sql_restore_object_object_restore_properties_map_entry.go deleted file mode 100644 index 2123bf77..00000000 --- a/v1/models/no_sql_restore_object_object_restore_properties_map_entry.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" -) - -// NoSQLRestoreObjectObjectRestorePropertiesMapEntry no Sql restore object object restore properties map entry -// -// swagger:model NoSqlRestoreObject_ObjectRestorePropertiesMapEntry -type NoSQLRestoreObjectObjectRestorePropertiesMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this no Sql restore object object restore properties map entry -func (m *NoSQLRestoreObjectObjectRestorePropertiesMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this no Sql restore object object restore properties map entry based on context it is used -func (m *NoSQLRestoreObjectObjectRestorePropertiesMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLRestoreObjectObjectRestorePropertiesMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLRestoreObjectObjectRestorePropertiesMapEntry) UnmarshalBinary(b []byte) error { - var res NoSQLRestoreObjectObjectRestorePropertiesMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node.go b/v1/models/node.go deleted file mode 100644 index 3a3e7018..00000000 --- a/v1/models/node.go +++ /dev/null @@ -1,730 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Node Node. -// -// Node is the struct for a Node. -// -// swagger:model Node -type Node struct { - - // CapacityByTier describes the capacity of each storage tier. - CapacityByTier []*CapacityByTier `json:"capacityByTier"` - - // ChassisInfo describes the information for the chassis of the node. - ChassisInfo *ChassisInfo `json:"chassisInfo,omitempty"` - - // ClusterPartitionId is the Id of the cluster partition to which - // the Node belongs. - ClusterPartitionID *int64 `json:"clusterPartitionId,omitempty"` - - // ClusterPartitionName is the name of the cluster to which the Node - // belongs. - ClusterPartitionName *string `json:"clusterPartitionName,omitempty"` - - // Cohesity Node Serial Number of the Node. - CohesityNodeSerial *string `json:"cohesityNodeSerial,omitempty"` - - // DiskCount is the number of disks in a node. - DiskCount *int64 `json:"diskCount,omitempty"` - - // DiskCountByTier describes the disk number of each storage tier. - DiskCountByTier []*CountByTier `json:"diskCountByTier"` - - // Specifies the hardware model of the node. - HardwareModel *string `json:"hardwareModel,omitempty"` - - // Host name of the node. - HostName *string `json:"hostName,omitempty"` - - // Id is the Id of the Node. - ID *int64 `json:"id,omitempty"` - - // InMaintnenanceMode is used to mark a node in maintenance mode. - InMaintenanceMode *bool `json:"inMaintenanceMode,omitempty"` - - // Ip is the IP address of the Node. - IP *string `json:"ip,omitempty"` - - // Whether node is app node. - IsAppNode *bool `json:"isAppNode,omitempty"` - - // IsMarkedForRemoval specifies whether the node has been marked for - // removal. - IsMarkedForRemoval *bool `json:"isMarkedForRemoval,omitempty"` - - // MaxPhysicalCapacityBytes specifies the maximum physical capacity of the - // node in bytes. - MaxPhysicalCapacityBytes *int64 `json:"maxPhysicalCapacityBytes,omitempty"` - - // HardwareInfo describes the hardware of the node. - NodeHardwareInfo *NodeHardwareInfo `json:"nodeHardwareInfo,omitempty"` - - // NodeIncarnationId is the incarnation id of this node. The incarnation - // id is changed every time the data is wiped from the node. Various - // services on a node is only run if incarnation id of the node matches the - // incarnation id of the cluster. Whenever a mismatch is detected, Nexus - // will stop all services and clean the data from the node. After clean - // operation is completed, Nexus will set the node incarnation id to - // cluster incarnation id and start the services. - NodeIncarnationID *int64 `json:"nodeIncarnationId,omitempty"` - - // NodeSoftwareVersion is the current version of Cohesity software installed - // on a node. - NodeSoftwareVersion *string `json:"nodeSoftwareVersion,omitempty"` - - // Node type: StorageNode, AllFlashNode, RoboNode, AppNode, etc. - NodeType *string `json:"nodeType,omitempty"` - - // OfflineDiskCount is the number of offline disks in a node. - OfflineDiskCount *int64 `json:"offlineDiskCount,omitempty"` - - // OfflineMountPathsOfDisks provides the corresponding mount paths for - // direct attached disks that are currently offline - access to these were - // detected to hang sometime in the past. After these disks have been fixed, - // their mount paths needs to be removed from the following list before - // these will be accessed again. - OfflineMountPathsOfDisks []string `json:"offlineMountPathsOfDisks"` - - // PrecheckTimestampSecs specifies the last run time - // of the pre-checks execution in Unix epoch timestamp in seconds - PrecheckTimestampSecs *int64 `json:"precheckTimestampSecs,omitempty"` - - // Specifies the product model of the node. - ProductModel *string `json:"productModel,omitempty"` - - // ProgressPercentage is the overall progress percentage - // in removing the entity. - ProgressPercentage *int64 `json:"progressPercentage,omitempty"` - - // Removal progress for various components which are not acked yet. - RemovalProgressList []*ComponentRemovalProgress `json:"removalProgressList"` - - // RemovalReason specifies the removal reason of the node. - // 'kAutoHealthCheck' means the entity health is bad. - // 'kUserGracefulRemoval' means user initiated a graceful removal. - // 'kUserAvoidAccess' means user initiated a mark offline. - // 'kUserGracefulNodeRemoval' mean users initiated graceful node removal. - // 'kUserRemoveDownNode' mean user initiated graceful removal of down node. - RemovalReason []string `json:"removalReason"` - - // RemovalState specifies the removal state of the node. - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["kDontRemove","kMarkedForRemoval","kOkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // RemovalTimestampSecs specifies the Unix epoch timestamp (in seconds) - // when the entity was marked for removal. - RemovalTimestampSecs *int64 `json:"removalTimestampSecs,omitempty"` - - // Services already acked for removal of this entity. - ServicesAckedList []string `json:"servicesAckedList"` - - // [For CLI displays the string with ServicesNotAcked] - // ServicesNotAcked specifies services that have not ACKed yet in string - // format after the entity is marked for removal. - ServicesNotAcked *string `json:"servicesNotAcked,omitempty"` - - // Services not acked yet for removal of this entity. - ServicesNotAckedList []string `json:"servicesNotAckedList"` - - // Slot number occupied by this node within the chassis. - SlotNumber *uint32 `json:"slotNumber,omitempty"` - - // Stats describes the node stats. - Stats *NodeStats `json:"stats,omitempty"` - - // SystemDisk describes the node system disks. - SystemDisks []*NodeSystemDiskInfo `json:"systemDisks"` - - // TimeRemaining is the overall total duration left to remove the entity. - TimeRemaining *int64 `json:"timeRemaining,omitempty"` - - // ValidationChecks specifies list of pre-check validations - ValidationChecks []*PreCheckValidation `json:"validationChecks"` -} - -// Validate validates this node -func (m *Node) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCapacityByTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChassisInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskCountByTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeHardwareInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalProgressList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Node) validateCapacityByTier(formats strfmt.Registry) error { - if swag.IsZero(m.CapacityByTier) { // not required - return nil - } - - for i := 0; i < len(m.CapacityByTier); i++ { - if swag.IsZero(m.CapacityByTier[i]) { // not required - continue - } - - if m.CapacityByTier[i] != nil { - if err := m.CapacityByTier[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateChassisInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ChassisInfo) { // not required - return nil - } - - if m.ChassisInfo != nil { - if err := m.ChassisInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisInfo") - } - return err - } - } - - return nil -} - -func (m *Node) validateDiskCountByTier(formats strfmt.Registry) error { - if swag.IsZero(m.DiskCountByTier) { // not required - return nil - } - - for i := 0; i < len(m.DiskCountByTier); i++ { - if swag.IsZero(m.DiskCountByTier[i]) { // not required - continue - } - - if m.DiskCountByTier[i] != nil { - if err := m.DiskCountByTier[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateNodeHardwareInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NodeHardwareInfo) { // not required - return nil - } - - if m.NodeHardwareInfo != nil { - if err := m.NodeHardwareInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeHardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeHardwareInfo") - } - return err - } - } - - return nil -} - -func (m *Node) validateRemovalProgressList(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalProgressList) { // not required - return nil - } - - for i := 0; i < len(m.RemovalProgressList); i++ { - if swag.IsZero(m.RemovalProgressList[i]) { // not required - continue - } - - if m.RemovalProgressList[i] != nil { - if err := m.RemovalProgressList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var nodeRemovalReasonItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAutoHealthCheck","kUserGracefulRemoval","kUserAvoidAccess","kUserGracefulNodeRemoval","kUserRemoveDownNode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeRemovalReasonItemsEnum = append(nodeRemovalReasonItemsEnum, v) - } -} - -func (m *Node) validateRemovalReasonItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeRemovalReasonItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *Node) validateRemovalReason(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalReason) { // not required - return nil - } - - for i := 0; i < len(m.RemovalReason); i++ { - - // value enum - if err := m.validateRemovalReasonItemsEnum("removalReason"+"."+strconv.Itoa(i), "body", m.RemovalReason[i]); err != nil { - return err - } - - } - - return nil -} - -var nodeTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDontRemove","kMarkedForRemoval","kOkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeTypeRemovalStatePropEnum = append(nodeTypeRemovalStatePropEnum, v) - } -} - -const ( - - // NodeRemovalStateKDontRemove captures enum value "kDontRemove" - NodeRemovalStateKDontRemove string = "kDontRemove" - - // NodeRemovalStateKMarkedForRemoval captures enum value "kMarkedForRemoval" - NodeRemovalStateKMarkedForRemoval string = "kMarkedForRemoval" - - // NodeRemovalStateKOkToRemove captures enum value "kOkToRemove" - NodeRemovalStateKOkToRemove string = "kOkToRemove" -) - -// prop value enum -func (m *Node) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Node) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -func (m *Node) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *Node) validateSystemDisks(formats strfmt.Registry) error { - if swag.IsZero(m.SystemDisks) { // not required - return nil - } - - for i := 0; i < len(m.SystemDisks); i++ { - if swag.IsZero(m.SystemDisks[i]) { // not required - continue - } - - if m.SystemDisks[i] != nil { - if err := m.SystemDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node based on the context it is used -func (m *Node) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCapacityByTier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChassisInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskCountByTier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeHardwareInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemovalProgressList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Node) contextValidateCapacityByTier(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CapacityByTier); i++ { - - if m.CapacityByTier[i] != nil { - - if swag.IsZero(m.CapacityByTier[i]) { // not required - return nil - } - - if err := m.CapacityByTier[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateChassisInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ChassisInfo != nil { - - if swag.IsZero(m.ChassisInfo) { // not required - return nil - } - - if err := m.ChassisInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisInfo") - } - return err - } - } - - return nil -} - -func (m *Node) contextValidateDiskCountByTier(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskCountByTier); i++ { - - if m.DiskCountByTier[i] != nil { - - if swag.IsZero(m.DiskCountByTier[i]) { // not required - return nil - } - - if err := m.DiskCountByTier[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateNodeHardwareInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NodeHardwareInfo != nil { - - if swag.IsZero(m.NodeHardwareInfo) { // not required - return nil - } - - if err := m.NodeHardwareInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeHardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeHardwareInfo") - } - return err - } - } - - return nil -} - -func (m *Node) contextValidateRemovalProgressList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemovalProgressList); i++ { - - if m.RemovalProgressList[i] != nil { - - if swag.IsZero(m.RemovalProgressList[i]) { // not required - return nil - } - - if err := m.RemovalProgressList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) 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 -} - -func (m *Node) contextValidateSystemDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SystemDisks); i++ { - - if m.SystemDisks[i] != nil { - - if swag.IsZero(m.SystemDisks[i]) { // not required - return nil - } - - if err := m.SystemDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Node) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Node) UnmarshalBinary(b []byte) error { - var res Node - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_delete_result.go b/v1/models/node_delete_result.go deleted file mode 100644 index fb5b6e32..00000000 --- a/v1/models/node_delete_result.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeDeleteResult NodeDeleteResult specifies response for mark node for removal -// -// swagger:model NodeDeleteResult -type NodeDeleteResult struct { - - // Id of the node to be marked for deletion. - ID *int64 `json:"id,omitempty"` - - // MarkNodeForRemoval indicates if the node is marked for removal - MarkNodeForRemoval *bool `json:"markNodeForRemoval,omitempty"` - - // TimestampSecs specifies the last run time - // of the pre-checks execution in Unix epoch timestamp in seconds - TimestampSecs *int64 `json:"timestampSecs,omitempty"` - - // ValidationChecks specifies list of pre-check validations - ValidationChecks []*PreCheckValidation `json:"validationChecks"` -} - -// Validate validates this node delete result -func (m *NodeDeleteResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeDeleteResult) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node delete result based on the context it is used -func (m *NodeDeleteResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeDeleteResult) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeDeleteResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeDeleteResult) UnmarshalBinary(b []byte) error { - var res NodeDeleteResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_hardware_info.go b/v1/models/node_hardware_info.go deleted file mode 100644 index 2ac38860..00000000 --- a/v1/models/node_hardware_info.go +++ /dev/null @@ -1,58 +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" -) - -// NodeHardwareInfo Node Hardware Information. -// -// NodeHardwareInfo provides the information regarding the hardware. -// -// swagger:model NodeHardwareInfo -type NodeHardwareInfo struct { - - // Cpu provides the information regarding the CPU. - CPU *string `json:"cpu,omitempty"` - - // MemorySizeBytes provides the memory size in bytes. - MemorySizeBytes *int64 `json:"memorySizeBytes,omitempty"` - - // Network provides the information regarding the network cards. - Network *string `json:"network,omitempty"` -} - -// Validate validates this node hardware info -func (m *NodeHardwareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node hardware info based on context it is used -func (m *NodeHardwareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeHardwareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeHardwareInfo) UnmarshalBinary(b []byte) error { - var res NodeHardwareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_interface_pair.go b/v1/models/node_interface_pair.go deleted file mode 100644 index ae649ef3..00000000 --- a/v1/models/node_interface_pair.go +++ /dev/null @@ -1,55 +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" -) - -// NodeInterfacePair Node Ids and interface tuple. -// -// Specifies a node ID and interface tuple. -// -// swagger:model NodeInterfacePair -type NodeInterfacePair struct { - - // Specifies the name of the interface. - IfaceName *string `json:"ifaceName,omitempty"` - - // Specifies list of node IDs. - NodeID *int64 `json:"nodeId,omitempty"` -} - -// Validate validates this node interface pair -func (m *NodeInterfacePair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node interface pair based on context it is used -func (m *NodeInterfacePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeInterfacePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeInterfacePair) UnmarshalBinary(b []byte) error { - var res NodeInterfacePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_network_interfaces.go b/v1/models/node_network_interfaces.go deleted file mode 100644 index 197bf481..00000000 --- a/v1/models/node_network_interfaces.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeNetworkInterfaces Node Network Interfaces. -// -// Specifies the network interfaces present on a specific Node in a Cluster. -// -// swagger:model NodeNetworkInterfaces -type NodeNetworkInterfaces struct { - - // Specifies the serial number of Chassis. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Specifies the list of network interfaces present on this Node. - Interfaces []*NetworkInterface `json:"interfaces"` - - // Specifies an optional message describing the result of the request - // pertaining to this Node. - Message *string `json:"message,omitempty"` - - // Specifies the ID of the Node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the IP of the Node. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the slot number the Node is located in. - Slot *int64 `json:"slot,omitempty"` -} - -// Validate validates this node network interfaces -func (m *NodeNetworkInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeNetworkInterfaces) validateInterfaces(formats strfmt.Registry) error { - if swag.IsZero(m.Interfaces) { // not required - return nil - } - - for i := 0; i < len(m.Interfaces); i++ { - if swag.IsZero(m.Interfaces[i]) { // not required - continue - } - - if m.Interfaces[i] != nil { - if err := m.Interfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node network interfaces based on the context it is used -func (m *NodeNetworkInterfaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaces(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeNetworkInterfaces) contextValidateInterfaces(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Interfaces); i++ { - - if m.Interfaces[i] != nil { - - if swag.IsZero(m.Interfaces[i]) { // not required - return nil - } - - if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeNetworkInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeNetworkInterfaces) UnmarshalBinary(b []byte) error { - var res NodeNetworkInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_port.go b/v1/models/node_port.go deleted file mode 100644 index b70e5a8f..00000000 --- a/v1/models/node_port.go +++ /dev/null @@ -1,127 +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" -) - -// NodePort Node port information. -// -// NodePort specifies information of a NodePort per service and port -// combination within an application instance. -// -// swagger:model NodePort -type NodePort struct { - - // is Ui port - IsUIPort *bool `json:"isUiPort,omitempty"` - - // port - Port *int32 `json:"port,omitempty"` - - // service name - ServiceName *string `json:"serviceName,omitempty"` - - // Specifies use of the nodeport - // kDefault - No specific service. - // kHttp - HTTP server. - // kHttps - Secure HTTP server. - // kSsh - Secure shell server. - // Enum: ["kDefault","kHttp","kHttps","kSsh"] - Tag *string `json:"tag,omitempty"` -} - -// Validate validates this node port -func (m *NodePort) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTag(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nodePortTypeTagPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDefault","kHttp","kHttps","kSsh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodePortTypeTagPropEnum = append(nodePortTypeTagPropEnum, v) - } -} - -const ( - - // NodePortTagKDefault captures enum value "kDefault" - NodePortTagKDefault string = "kDefault" - - // NodePortTagKHTTP captures enum value "kHttp" - NodePortTagKHTTP string = "kHttp" - - // NodePortTagKHTTPS captures enum value "kHttps" - NodePortTagKHTTPS string = "kHttps" - - // NodePortTagKSSH captures enum value "kSsh" - NodePortTagKSSH string = "kSsh" -) - -// prop value enum -func (m *NodePort) validateTagEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodePortTypeTagPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NodePort) validateTag(formats strfmt.Registry) error { - if swag.IsZero(m.Tag) { // not required - return nil - } - - // value enum - if err := m.validateTagEnum("tag", "body", *m.Tag); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node port based on context it is used -func (m *NodePort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodePort) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodePort) UnmarshalBinary(b []byte) error { - var res NodePort - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_stats.go b/v1/models/node_stats.go deleted file mode 100644 index 45d2e4ca..00000000 --- a/v1/models/node_stats.go +++ /dev/null @@ -1,114 +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" -) - -// NodeStats Node Statistics. -// -// NodeStats provides various statistics for the node. -// -// swagger:model NodeStats -type NodeStats struct { - - // Id is the Id of the Node. - ID *int64 `json:"id,omitempty"` - - // UsagePerfStats provides the usage and performance stats for the node. - UsagePerfStats *UsageAndPerformanceStats `json:"usagePerfStats,omitempty"` -} - -// Validate validates this node stats -func (m *NodeStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStats) validateUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.UsagePerfStats) { // not required - 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 -} - -// ContextValidate validate this node stats based on the context it is used -func (m *NodeStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStats) 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 -} - -// MarshalBinary interface implementation -func (m *NodeStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeStats) UnmarshalBinary(b []byte) error { - var res NodeStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_status.go b/v1/models/node_status.go deleted file mode 100644 index 5079734c..00000000 --- a/v1/models/node_status.go +++ /dev/null @@ -1,61 +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" -) - -// NodeStatus Node Status. -// -// Specifies the status of each node in the cluster being created. -// -// swagger:model NodeStatus -type NodeStatus struct { - - // Specifies an optional message relating to the node status. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the IPMI IP of the node (if physical cluster). - IpmiIP *string `json:"ipmiIp,omitempty"` - - // Specifies the ID of the node. - NodeID *int64 `json:"nodeId,omitempty"` - - // For physical nodes this will specify the IP address of the node. - NodeIP *string `json:"nodeIp,omitempty"` -} - -// Validate validates this node status -func (m *NodeStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node status based on context it is used -func (m *NodeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeStatus) UnmarshalBinary(b []byte) error { - var res NodeStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_status_result.go b/v1/models/node_status_result.go deleted file mode 100644 index c4dcdea1..00000000 --- a/v1/models/node_status_result.go +++ /dev/null @@ -1,403 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NodeStatusResult Node Status Result. -// -// Specifies the current status of a Node in the cluster. -// -// swagger:model NodeStatusResult -type NodeStatusResult struct { - - // Specifies the active operation on the Node if there is one. - // 'kNone' specifies that there is no active operation on the Node. - // 'kDestroyCluster' specifies that the Cluster which the Node is a part of - // is currently being destroyed. - // 'kUpgradeCluster' specifies that the Cluster which the Node is a part of - // is currently being upgraded to a new software package. - // 'kRestartCluster' specifies that the Cluster which the Node is a part of - // is currently being restarted. - // 'kCreateCluster' specifies that the Node is currently being used to create - // a new Cluster. - // 'kExpandCluster' specifies that the Node is currently being added to a - // Cluster or being used to assist in adding another Node to a Cluster. - // 'kUpgradeNode' specifies that the Node is currently being upgraded to a new - // software package. - // 'kRemoveNode' specifies that the Node is currently being removed from a - // Cluster or that it is assisting in removing another Node from a Cluster. - // 'kAddDisks' specifies that the Node is being used to assist in adding disks - // to the Cluster. - // 'kMarkDiskOffline' specifies that the Node is being use to assist in - // marking a disk in the Cluster as offline. - // Enum: ["kNone","kDestroyCluster","kUpgradeCluster","kRestartCluster","kCreateCluster","kExpandCluster","kUpgradeNode","kRemoveNode","kAddDisks","kMarkDiskOffline"] - ActiveOperation *string `json:"activeOperation,omitempty"` - - // Specifies the Cluster ID if the Node is part of a Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the ID of the Node. - ID *int64 `json:"id,omitempty"` - - // Specifies whether or not the Node is part of a Cluster. - InCluster *bool `json:"inCluster,omitempty"` - - // InMaintnenanceMode is used to mark a node in maintenance mode. - InMaintenanceMode *bool `json:"inMaintenanceMode,omitempty"` - - // Specifies the Incarnation ID if the Node is part of a Cluster. - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // Specifies the IP address of the Node. - IP *string `json:"ip,omitempty"` - - // Whether the node is an app node. - IsAppNode *bool `json:"isAppNode,omitempty"` - - // Specifies the time of the last upgrade in seconds since the epoch. - LastUpgradeTimeSecs *int64 `json:"lastUpgradeTimeSecs,omitempty"` - - // Specifies whether or not this node is marked for removal. - MarkedForRemoval *bool `json:"markedForRemoval,omitempty"` - - // Specifies an optional message describing the current state of the Node. - Message *string `json:"message,omitempty"` - - // Removal progress for various components which are not acked yet. - RemovalProgressList []*ComponentRemovalProgress `json:"removalProgressList"` - - // Specifies the reason for the removal operation if there is a removal - // operation going on. - // 'kUnknown' specifies that the removal reason is not known. - // 'kAutoHealthCheck' specifies that an internal health check found problems - // with the Node. - // 'kUserGracefulRemoval' specifies that the user requested a graceful - // removal. - // 'kUserAvoidAccess' specifies that the user requested to avoid access to - // this Node. - // 'kUserGracefulNodeRemoval' specifies that the user requested a graceful - // removal for all of the disks in this Node. - // 'kUserRemoveDownNode' specifies that the user requested a graceful removal - // of the Node while it is down. - // Enum: ["kUnknown","kAutoHealthCheck","kUserGracefulRemoval","kUserAvoidAccess","kUserGracefulNodeRemoval","kUserRemoveDownNode"] - RemovalReason *string `json:"removalReason,omitempty"` - - // Specifies the list of services running on the cluster and their process - // Ids. - Services []*ServiceProcessEntry `json:"services"` - - // [For UI: Displays list of Acked/NotAcked services separately.] - // Services already acked for removal of this entity. - ServicesAckedList []string `json:"servicesAckedList"` - - // [For CLI displays the string with ServicesNotAcked] - // ServicesNotAcked specifies services that have not ACKed yet in string - // format after node is marked for removal. - ServicesNotAcked *string `json:"servicesNotAcked,omitempty"` - - // Services not acked yet for removal of this entity. - ServicesNotAckedList []string `json:"servicesNotAckedList"` - - // Specifies the version of the software running on the Node. - SoftwareVersion *string `json:"softwareVersion,omitempty"` - - // Uptime of node. - Uptime *string `json:"uptime,omitempty"` -} - -// Validate validates this node status result -func (m *NodeStatusResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveOperation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalProgressList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServices(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nodeStatusResultTypeActiveOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kDestroyCluster","kUpgradeCluster","kRestartCluster","kCreateCluster","kExpandCluster","kUpgradeNode","kRemoveNode","kAddDisks","kMarkDiskOffline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeStatusResultTypeActiveOperationPropEnum = append(nodeStatusResultTypeActiveOperationPropEnum, v) - } -} - -const ( - - // NodeStatusResultActiveOperationKNone captures enum value "kNone" - NodeStatusResultActiveOperationKNone string = "kNone" - - // NodeStatusResultActiveOperationKDestroyCluster captures enum value "kDestroyCluster" - NodeStatusResultActiveOperationKDestroyCluster string = "kDestroyCluster" - - // NodeStatusResultActiveOperationKUpgradeCluster captures enum value "kUpgradeCluster" - NodeStatusResultActiveOperationKUpgradeCluster string = "kUpgradeCluster" - - // NodeStatusResultActiveOperationKRestartCluster captures enum value "kRestartCluster" - NodeStatusResultActiveOperationKRestartCluster string = "kRestartCluster" - - // NodeStatusResultActiveOperationKCreateCluster captures enum value "kCreateCluster" - NodeStatusResultActiveOperationKCreateCluster string = "kCreateCluster" - - // NodeStatusResultActiveOperationKExpandCluster captures enum value "kExpandCluster" - NodeStatusResultActiveOperationKExpandCluster string = "kExpandCluster" - - // NodeStatusResultActiveOperationKUpgradeNode captures enum value "kUpgradeNode" - NodeStatusResultActiveOperationKUpgradeNode string = "kUpgradeNode" - - // NodeStatusResultActiveOperationKRemoveNode captures enum value "kRemoveNode" - NodeStatusResultActiveOperationKRemoveNode string = "kRemoveNode" - - // NodeStatusResultActiveOperationKAddDisks captures enum value "kAddDisks" - NodeStatusResultActiveOperationKAddDisks string = "kAddDisks" - - // NodeStatusResultActiveOperationKMarkDiskOffline captures enum value "kMarkDiskOffline" - NodeStatusResultActiveOperationKMarkDiskOffline string = "kMarkDiskOffline" -) - -// prop value enum -func (m *NodeStatusResult) validateActiveOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeStatusResultTypeActiveOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NodeStatusResult) validateActiveOperation(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveOperation) { // not required - return nil - } - - // value enum - if err := m.validateActiveOperationEnum("activeOperation", "body", *m.ActiveOperation); err != nil { - return err - } - - return nil -} - -func (m *NodeStatusResult) validateRemovalProgressList(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalProgressList) { // not required - return nil - } - - for i := 0; i < len(m.RemovalProgressList); i++ { - if swag.IsZero(m.RemovalProgressList[i]) { // not required - continue - } - - if m.RemovalProgressList[i] != nil { - if err := m.RemovalProgressList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var nodeStatusResultTypeRemovalReasonPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kAutoHealthCheck","kUserGracefulRemoval","kUserAvoidAccess","kUserGracefulNodeRemoval","kUserRemoveDownNode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeStatusResultTypeRemovalReasonPropEnum = append(nodeStatusResultTypeRemovalReasonPropEnum, v) - } -} - -const ( - - // NodeStatusResultRemovalReasonKUnknown captures enum value "kUnknown" - NodeStatusResultRemovalReasonKUnknown string = "kUnknown" - - // NodeStatusResultRemovalReasonKAutoHealthCheck captures enum value "kAutoHealthCheck" - NodeStatusResultRemovalReasonKAutoHealthCheck string = "kAutoHealthCheck" - - // NodeStatusResultRemovalReasonKUserGracefulRemoval captures enum value "kUserGracefulRemoval" - NodeStatusResultRemovalReasonKUserGracefulRemoval string = "kUserGracefulRemoval" - - // NodeStatusResultRemovalReasonKUserAvoidAccess captures enum value "kUserAvoidAccess" - NodeStatusResultRemovalReasonKUserAvoidAccess string = "kUserAvoidAccess" - - // NodeStatusResultRemovalReasonKUserGracefulNodeRemoval captures enum value "kUserGracefulNodeRemoval" - NodeStatusResultRemovalReasonKUserGracefulNodeRemoval string = "kUserGracefulNodeRemoval" - - // NodeStatusResultRemovalReasonKUserRemoveDownNode captures enum value "kUserRemoveDownNode" - NodeStatusResultRemovalReasonKUserRemoveDownNode string = "kUserRemoveDownNode" -) - -// prop value enum -func (m *NodeStatusResult) validateRemovalReasonEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeStatusResultTypeRemovalReasonPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NodeStatusResult) validateRemovalReason(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalReason) { // not required - return nil - } - - // value enum - if err := m.validateRemovalReasonEnum("removalReason", "body", *m.RemovalReason); err != nil { - return err - } - - return nil -} - -func (m *NodeStatusResult) validateServices(formats strfmt.Registry) error { - if swag.IsZero(m.Services) { // not required - return nil - } - - for i := 0; i < len(m.Services); i++ { - if swag.IsZero(m.Services[i]) { // not required - continue - } - - if m.Services[i] != nil { - if err := m.Services[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node status result based on the context it is used -func (m *NodeStatusResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemovalProgressList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStatusResult) contextValidateRemovalProgressList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemovalProgressList); i++ { - - if m.RemovalProgressList[i] != nil { - - if swag.IsZero(m.RemovalProgressList[i]) { // not required - return nil - } - - if err := m.RemovalProgressList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeStatusResult) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Services); i++ { - - if m.Services[i] != nil { - - if swag.IsZero(m.Services[i]) { // not required - return nil - } - - if err := m.Services[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeStatusResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeStatusResult) UnmarshalBinary(b []byte) error { - var res NodeStatusResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_system_disk_info.go b/v1/models/node_system_disk_info.go deleted file mode 100644 index c6ba2791..00000000 --- a/v1/models/node_system_disk_info.go +++ /dev/null @@ -1,56 +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" -) - -// NodeSystemDiskInfo node system disk info -// -// swagger:model NodeSystemDiskInfo -type NodeSystemDiskInfo struct { - - // DevicePath is the device path of the disk. - DevicePath *string `json:"devicePath,omitempty"` - - // Id is the id of the disk. - ID *int64 `json:"id,omitempty"` - - // Offline specifies whether a disk is marked offline. - Offline *bool `json:"offline,omitempty"` -} - -// Validate validates this node system disk info -func (m *NodeSystemDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node system disk info based on context it is used -func (m *NodeSystemDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeSystemDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeSystemDiskInfo) UnmarshalBinary(b []byte) error { - var res NodeSystemDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_to_tiered_storage_directories_map.go b/v1/models/node_to_tiered_storage_directories_map.go deleted file mode 100644 index 94596477..00000000 --- a/v1/models/node_to_tiered_storage_directories_map.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" -) - -// NodeToTieredStorageDirectoriesMap Mapping of each Cassandra node to a list of tiered storage directories. -// -// swagger:model NodeToTieredStorageDirectoriesMap -type NodeToTieredStorageDirectoriesMap struct { - - // Name of the Cassandra node. - CassandraNodeName *string `json:"cassandraNodeName,omitempty"` - - // Array of tiered storage directories. - TieredStorageDirectoriesVec []string `json:"tieredStorageDirectoriesVec"` -} - -// Validate validates this node to tiered storage directories map -func (m *NodeToTieredStorageDirectoriesMap) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node to tiered storage directories map based on context it is used -func (m *NodeToTieredStorageDirectoriesMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeToTieredStorageDirectoriesMap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeToTieredStorageDirectoriesMap) UnmarshalBinary(b []byte) error { - var res NodeToTieredStorageDirectoriesMap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/node_upgrade_status.go b/v1/models/node_upgrade_status.go deleted file mode 100644 index 231f6277..00000000 --- a/v1/models/node_upgrade_status.go +++ /dev/null @@ -1,60 +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" -) - -// NodeUpgradeStatus NodeUpgradeStatus contains the upgrade status of a node. -// -// swagger:model NodeUpgradeStatus -type NodeUpgradeStatus struct { - - // CurrentSwVersion is the current software version of the node. - CurrentSwVersion *string `json:"currentSwVersion,omitempty"` - - // HasUpgraded indicates whether an upgrade operation completed successfully, - // i.e. the node software version is the same as the cluster target version. - HasUpgraded *bool `json:"hasUpgraded,omitempty"` - - // NodeId is the id of the node. - NodeID *int64 `json:"nodeId,omitempty"` - - // NodeIp is the IP address of the node. - NodeIP *string `json:"nodeIp,omitempty"` -} - -// Validate validates this node upgrade status -func (m *NodeUpgradeStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node upgrade status based on context it is used -func (m *NodeUpgradeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeUpgradeStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeUpgradeStatus) UnmarshalBinary(b []byte) error { - var res NodeUpgradeStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/noncurrent_version_expiration_action.go b/v1/models/noncurrent_version_expiration_action.go deleted file mode 100644 index 8e2cfb67..00000000 --- a/v1/models/noncurrent_version_expiration_action.go +++ /dev/null @@ -1,51 +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" -) - -// NoncurrentVersionExpirationAction Proto to define Lifecycle NoncurrentVersionExpirationAction. -// -// swagger:model NoncurrentVersionExpirationAction -type NoncurrentVersionExpirationAction struct { - - // Specifies the number of days an object is noncurrent before performing the - // associated action. - NoncurrentDays *int64 `json:"noncurrentDays,omitempty"` -} - -// Validate validates this noncurrent version expiration action -func (m *NoncurrentVersionExpirationAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this noncurrent version expiration action based on context it is used -func (m *NoncurrentVersionExpirationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NoncurrentVersionExpirationAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoncurrentVersionExpirationAction) UnmarshalBinary(b []byte) error { - var res NoncurrentVersionExpirationAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/notification_rule.go b/v1/models/notification_rule.go deleted file mode 100644 index cbcac3ce..00000000 --- a/v1/models/notification_rule.go +++ /dev/null @@ -1,337 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NotificationRule Notification Rule -// -// Specifies a rule to notify delivery targets such as sending emails, -// invoking an external api etc based on the alert type, category and -// severity of the generated alert. -// -// swagger:model NotificationRule -type NotificationRule struct { - - // Specifies alert types this rule is applicable to. - AlertTypeList []int32 `json:"alertTypeList"` - - // Specifies alert categories this rule is applicable to. - // Specifies the category of an Alert. - // kDisk - Alert associated with the disk. - // kNode - Alert associated with general hardware on a specific node. - // kCluster - Alert associated with general hardware in cluster level. - // kChassis - Alert associated with the Chassis. - // kPowerSupply - Alert associated with the power supply. - // kCPU - Alert associated with the CPU usage. - // kMemory - Alert associated with the RAM/Memory. - // kTemperature - Alert associated with the temperature. - // kFan - Alert associated with the fan. - // kNIC - Alert associated with network chips and interfaces. - // kFirmware - Alert associated with the firmware. - // kNodeHealth - Alert associated with node health status. - // kOperatingSystem - Alert associated with operating systems. - // kDataPath - Alert associated with data management in the cluster. - // kMetadata - Alert associated with metadata management. - // kIndexing - Alert associated with indexing services. - // kHelios - Alert associated with Helios. - // kAppMarketPlace - Alert associated with App MarketPlace. - // kSystemService -Alert associated with System service apps. - // kLicense - Alert associated with licensing. - // kSecurity - Alert associated with security. - // kUpgrade - Alert associated with upgrade activities. - // kClusterManagement - Alert associated with cluster management activities. - // kAuditLog - Alert associated with audit log events. - // kNetworking - Alert associated with networking issue. - // kConfiguration - Alert associated with cluster or system configurations. - // kStorageUsage - Alert associated with the disk/domain/cluster storage usage. - // kFaultTolerance - Alert associated with the fault tolerance in different levels. - // kBackupRestore - Alert associated with Backup-Restore job. - // kArchivalRestore - Alert associated with Archival-Restore job. - // kRemoteReplication - Alert associated with Replication job. - // kQuota - Alert associated with Quotas. - // kCDP - Alert associated with Continuous Data Protection. - // kViewFailover - Alert associated with view Failover. - // kDisasterRecovery - Alert associated with Disaster Recovery. - Categories []string `json:"categories"` - - // Specifies email addresses to be notified when an alert matching this - // rule is generated. - EmailDeliveryTargets []*EmailDeliveryTarget `json:"emailDeliveryTargets"` - - // Specifies id of the alert delivery rule. - RuleID *int64 `json:"ruleId,omitempty"` - - // Specifies name of the alert delivery rule. - RuleName *string `json:"ruleName,omitempty"` - - // Specifies alert severity types this rule is applicable to. - // Specifies the severity level of an Alert. - // kCritical - Alerts whose severity type is Critical. - // kWarning - Alerts whose severity type is Warning. - // kInfo - Alerts whose severity type is Info. - Severities []string `json:"severities"` - - // Specifies whether SNMP notification to be invoked when an alert matching - // this rule is generated. - SnmpEnabled *bool `json:"snmpEnabled,omitempty"` - - // Specifies whether syslog notification to be invoked when an alert matching - // this rule is generated. - SyslogEnabled *bool `json:"syslogEnabled,omitempty"` - - // Specifies tenant id this rule is applicable to. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies external api urls to be invoked when an alert matching this - // rule is generated. - WebHookDeliveryTargets []*WebHookDeliveryTarget `json:"webHookDeliveryTargets"` -} - -// Validate validates this notification rule -func (m *NotificationRule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategories(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmailDeliveryTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSeverities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWebHookDeliveryTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var notificationRuleCategoriesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - notificationRuleCategoriesItemsEnum = append(notificationRuleCategoriesItemsEnum, v) - } -} - -func (m *NotificationRule) validateCategoriesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, notificationRuleCategoriesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NotificationRule) validateCategories(formats strfmt.Registry) error { - if swag.IsZero(m.Categories) { // not required - return nil - } - - for i := 0; i < len(m.Categories); i++ { - - // value enum - if err := m.validateCategoriesItemsEnum("categories"+"."+strconv.Itoa(i), "body", m.Categories[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *NotificationRule) validateEmailDeliveryTargets(formats strfmt.Registry) error { - if swag.IsZero(m.EmailDeliveryTargets) { // not required - return nil - } - - for i := 0; i < len(m.EmailDeliveryTargets); i++ { - if swag.IsZero(m.EmailDeliveryTargets[i]) { // not required - continue - } - - if m.EmailDeliveryTargets[i] != nil { - if err := m.EmailDeliveryTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var notificationRuleSeveritiesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCritical","kWarning","kInfo"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - notificationRuleSeveritiesItemsEnum = append(notificationRuleSeveritiesItemsEnum, v) - } -} - -func (m *NotificationRule) validateSeveritiesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, notificationRuleSeveritiesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NotificationRule) validateSeverities(formats strfmt.Registry) error { - if swag.IsZero(m.Severities) { // not required - return nil - } - - for i := 0; i < len(m.Severities); i++ { - - // value enum - if err := m.validateSeveritiesItemsEnum("severities"+"."+strconv.Itoa(i), "body", m.Severities[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *NotificationRule) validateWebHookDeliveryTargets(formats strfmt.Registry) error { - if swag.IsZero(m.WebHookDeliveryTargets) { // not required - return nil - } - - for i := 0; i < len(m.WebHookDeliveryTargets); i++ { - if swag.IsZero(m.WebHookDeliveryTargets[i]) { // not required - continue - } - - if m.WebHookDeliveryTargets[i] != nil { - if err := m.WebHookDeliveryTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("webHookDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("webHookDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this notification rule based on the context it is used -func (m *NotificationRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEmailDeliveryTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWebHookDeliveryTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationRule) contextValidateEmailDeliveryTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EmailDeliveryTargets); i++ { - - if m.EmailDeliveryTargets[i] != nil { - - if swag.IsZero(m.EmailDeliveryTargets[i]) { // not required - return nil - } - - if err := m.EmailDeliveryTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NotificationRule) contextValidateWebHookDeliveryTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WebHookDeliveryTargets); i++ { - - if m.WebHookDeliveryTargets[i] != nil { - - if swag.IsZero(m.WebHookDeliveryTargets[i]) { // not required - return nil - } - - if err := m.WebHookDeliveryTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("webHookDeliveryTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("webHookDeliveryTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationRule) UnmarshalBinary(b []byte) error { - var res NotificationRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/notifications.go b/v1/models/notifications.go deleted file mode 100644 index c3cf4543..00000000 --- a/v1/models/notifications.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Notifications Notifications. -// -// All the Notification events generated for a given user. This is used for -// for transferring notifications over wire. -// -// swagger:model Notifications -type Notifications struct { - - // Notification Count. - Count *int64 `json:"count,omitempty"` - - // Notification list. - NotificationList []*TaskNotification `json:"notificationList"` - - // Unread Notification Count. - UnreadCount *int64 `json:"unreadCount,omitempty"` -} - -// Validate validates this notifications -func (m *Notifications) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNotificationList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Notifications) validateNotificationList(formats strfmt.Registry) error { - if swag.IsZero(m.NotificationList) { // not required - return nil - } - - for i := 0; i < len(m.NotificationList); i++ { - if swag.IsZero(m.NotificationList[i]) { // not required - continue - } - - if m.NotificationList[i] != nil { - if err := m.NotificationList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("notificationList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("notificationList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this notifications based on the context it is used -func (m *Notifications) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNotificationList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Notifications) contextValidateNotificationList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NotificationList); i++ { - - if m.NotificationList[i] != nil { - - if swag.IsZero(m.NotificationList[i]) { // not required - return nil - } - - if err := m.NotificationList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("notificationList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("notificationList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Notifications) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Notifications) UnmarshalBinary(b []byte) error { - var res Notifications - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ntp_servers.go b/v1/models/ntp_servers.go deleted file mode 100644 index d9b409e3..00000000 --- a/v1/models/ntp_servers.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NtpServers NtpServers is the struct containing ntp servers for this cluster. -// -// swagger:model NtpServers -type NtpServers struct { - - // Enable NTP with authentication. - NtpAuthenticationEnabled *bool `json:"ntpAuthenticationEnabled,omitempty"` - - // NTPServerAuthKeys is the list of ntp servers authentication keys - // corresponding to each NTP server. - NtpServerAuthInfo []*ClusterConfigProtoNTPAuthKeyInfo `json:"ntpServerAuthInfo"` - - // NtpServers is the list of ntp servers. - NtpServers []string `json:"ntpServers"` -} - -// Validate validates this ntp servers -func (m *NtpServers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNtpServerAuthInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NtpServers) validateNtpServerAuthInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NtpServerAuthInfo) { // not required - return nil - } - - for i := 0; i < len(m.NtpServerAuthInfo); i++ { - if swag.IsZero(m.NtpServerAuthInfo[i]) { // not required - continue - } - - if m.NtpServerAuthInfo[i] != nil { - if err := m.NtpServerAuthInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpServerAuthInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpServerAuthInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ntp servers based on the context it is used -func (m *NtpServers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNtpServerAuthInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NtpServers) contextValidateNtpServerAuthInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NtpServerAuthInfo); i++ { - - if m.NtpServerAuthInfo[i] != nil { - - if swag.IsZero(m.NtpServerAuthInfo[i]) { // not required - return nil - } - - if err := m.NtpServerAuthInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpServerAuthInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpServerAuthInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NtpServers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NtpServers) UnmarshalBinary(b []byte) error { - var res NtpServers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ntp_settings_config.go b/v1/models/ntp_settings_config.go deleted file mode 100644 index 1c3f1af8..00000000 --- a/v1/models/ntp_settings_config.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" -) - -// NtpSettingsConfig ntp settings config -// -// swagger:model NtpSettingsConfig -type NtpSettingsConfig struct { - - // Flag to specify if the cluster is using NTP with authentication. - NtpAuthenticationEnabled *bool `json:"ntpAuthenticationEnabled,omitempty"` - - // Flag to specify if the NTP servers are on internal network or not. - NtpServersInternal *bool `json:"ntpServersInternal,omitempty"` -} - -// Validate validates this ntp settings config -func (m *NtpSettingsConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ntp settings config based on context it is used -func (m *NtpSettingsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NtpSettingsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NtpSettingsConfig) UnmarshalBinary(b []byte) error { - var res NtpSettingsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg.go b/v1/models/o365_add_snapshot_arg.go deleted file mode 100644 index 2499eb82..00000000 --- a/v1/models/o365_add_snapshot_arg.go +++ /dev/null @@ -1,290 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// O365AddSnapshotArg o365 add snapshot arg -// -// swagger:model O365AddSnapshotArg -type O365AddSnapshotArg struct { - - // Information regarding o365 group backups. - GroupInfo O365AddSnapshotArgGroupInfo `json:"groupInfo,omitempty"` - - // Information regarding one drive backups. - // - // There can be multiple drives. Currently we expect <= 2 drives, the user - // drive is always present and the phl drive could be present in certain - // cases (when the retention is turned on) - // - // This was initially an optional field and converted to repeated field - // This conversion is safe for non-scalar types, refer: - // https://protobuf.dev/programming-guides/proto3/#updating - // If magneto is on higher version, and yoda slave on lower, it will pick - // the last element in the repeated field. - OneDriveInfoVec []*O365AddSnapshotArgOneDriveInfo `json:"oneDriveInfoVec"` - - // Information regarding outlook backups. - OutlookInfo *O365AddSnapshotArgOutlookInfo `json:"outlookInfo,omitempty"` - - // Information regarding public folders backups. - PublicFolderInfo *O365AddSnapshotArgPublicFolderInfo `json:"publicFolderInfo,omitempty"` - - // Information regarding sharepoint backups. - SharepointInfo *O365AddSnapshotArgSharepointInfo `json:"sharepointInfo,omitempty"` - - // Information regarding o365 teams backups. - TeamsInfo O365AddSnapshotArgTeamsInfo `json:"teamsInfo,omitempty"` -} - -// Validate validates this o365 add snapshot arg -func (m *O365AddSnapshotArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOneDriveInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365AddSnapshotArg) validateOneDriveInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.OneDriveInfoVec); i++ { - if swag.IsZero(m.OneDriveInfoVec[i]) { // not required - continue - } - - if m.OneDriveInfoVec[i] != nil { - if err := m.OneDriveInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *O365AddSnapshotArg) validateOutlookInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookInfo) { // not required - return nil - } - - if m.OutlookInfo != nil { - if err := m.OutlookInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookInfo") - } - return err - } - } - - return nil -} - -func (m *O365AddSnapshotArg) validatePublicFolderInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFolderInfo) { // not required - return nil - } - - if m.PublicFolderInfo != nil { - if err := m.PublicFolderInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderInfo") - } - return err - } - } - - return nil -} - -func (m *O365AddSnapshotArg) validateSharepointInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointInfo) { // not required - return nil - } - - if m.SharepointInfo != nil { - if err := m.SharepointInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this o365 add snapshot arg based on the context it is used -func (m *O365AddSnapshotArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOneDriveInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365AddSnapshotArg) contextValidateOneDriveInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OneDriveInfoVec); i++ { - - if m.OneDriveInfoVec[i] != nil { - - if swag.IsZero(m.OneDriveInfoVec[i]) { // not required - return nil - } - - if err := m.OneDriveInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *O365AddSnapshotArg) contextValidateOutlookInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookInfo != nil { - - if swag.IsZero(m.OutlookInfo) { // not required - return nil - } - - if err := m.OutlookInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookInfo") - } - return err - } - } - - return nil -} - -func (m *O365AddSnapshotArg) contextValidatePublicFolderInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFolderInfo != nil { - - if swag.IsZero(m.PublicFolderInfo) { // not required - return nil - } - - if err := m.PublicFolderInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderInfo") - } - return err - } - } - - return nil -} - -func (m *O365AddSnapshotArg) contextValidateSharepointInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointInfo != nil { - - if swag.IsZero(m.SharepointInfo) { // not required - return nil - } - - if err := m.SharepointInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365AddSnapshotArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365AddSnapshotArg) UnmarshalBinary(b []byte) error { - var res O365AddSnapshotArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg_group_info.go b/v1/models/o365_add_snapshot_arg_group_info.go deleted file mode 100644 index 3ad19ea5..00000000 --- a/v1/models/o365_add_snapshot_arg_group_info.go +++ /dev/null @@ -1,11 +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 - -// O365AddSnapshotArgGroupInfo o365 add snapshot arg group info -// -// swagger:model O365AddSnapshotArg_GroupInfo -type O365AddSnapshotArgGroupInfo interface{} diff --git a/v1/models/o365_add_snapshot_arg_one_drive_info.go b/v1/models/o365_add_snapshot_arg_one_drive_info.go deleted file mode 100644 index 3ecadf9c..00000000 --- a/v1/models/o365_add_snapshot_arg_one_drive_info.go +++ /dev/null @@ -1,70 +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" -) - -// O365AddSnapshotArgOneDriveInfo This captures one drive related info. -// -// swagger:model O365AddSnapshotArg_OneDriveInfo -type O365AddSnapshotArgOneDriveInfo struct { - - // Domain level unique id of the drive. - DriveID *string `json:"driveId,omitempty"` - - // Type of the drive. - DriveType *int32 `json:"driveType,omitempty"` - - // Is incremental indexing enabled or not. - IncrementalIndexingEnabled *bool `json:"incrementalIndexingEnabled,omitempty"` - - // Presence of this signifies whether the underlying file representation is - // done in a flat way. If yes, information about folders are kept in - // rocksDB. Yoda should use that for indexing. - // The path of the rocksDB present. If this field is present, path_to_index - // will be absent. - PathToDb *string `json:"pathToDb,omitempty"` - - // Path to be indexed. This is relative to snapshot_dir present in - // AddSnapshotArg. - PathToIndex *string `json:"pathToIndex,omitempty"` - - // Whether the backup contains a one drive backup which can be indexed. - ShouldIndexOneDrive *bool `json:"shouldIndexOneDrive,omitempty"` -} - -// Validate validates this o365 add snapshot arg one drive info -func (m *O365AddSnapshotArgOneDriveInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 add snapshot arg one drive info based on context it is used -func (m *O365AddSnapshotArgOneDriveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365AddSnapshotArgOneDriveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365AddSnapshotArgOneDriveInfo) UnmarshalBinary(b []byte) error { - var res O365AddSnapshotArgOneDriveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg_outlook_info.go b/v1/models/o365_add_snapshot_arg_outlook_info.go deleted file mode 100644 index 8f35d85d..00000000 --- a/v1/models/o365_add_snapshot_arg_outlook_info.go +++ /dev/null @@ -1,50 +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" -) - -// O365AddSnapshotArgOutlookInfo This captures outlook related info. -// -// swagger:model O365AddSnapshotArg_OutlookInfo -type O365AddSnapshotArgOutlookInfo struct { - - // Whether the backup contains an outlook backup which can be indexed. - ShouldIndexOutlook *bool `json:"shouldIndexOutlook,omitempty"` -} - -// Validate validates this o365 add snapshot arg outlook info -func (m *O365AddSnapshotArgOutlookInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 add snapshot arg outlook info based on context it is used -func (m *O365AddSnapshotArgOutlookInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365AddSnapshotArgOutlookInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365AddSnapshotArgOutlookInfo) UnmarshalBinary(b []byte) error { - var res O365AddSnapshotArgOutlookInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg_public_folder_info.go b/v1/models/o365_add_snapshot_arg_public_folder_info.go deleted file mode 100644 index 9d13e273..00000000 --- a/v1/models/o365_add_snapshot_arg_public_folder_info.go +++ /dev/null @@ -1,50 +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" -) - -// O365AddSnapshotArgPublicFolderInfo o365 add snapshot arg public folder info -// -// swagger:model O365AddSnapshotArg_PublicFolderInfo -type O365AddSnapshotArgPublicFolderInfo struct { - - // The name of the RocksDB folder used to record folder hierarchy. - HierarchyDbFolderName *string `json:"hierarchyDbFolderName,omitempty"` -} - -// Validate validates this o365 add snapshot arg public folder info -func (m *O365AddSnapshotArgPublicFolderInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 add snapshot arg public folder info based on context it is used -func (m *O365AddSnapshotArgPublicFolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365AddSnapshotArgPublicFolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365AddSnapshotArgPublicFolderInfo) UnmarshalBinary(b []byte) error { - var res O365AddSnapshotArgPublicFolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg_sharepoint_info.go b/v1/models/o365_add_snapshot_arg_sharepoint_info.go deleted file mode 100644 index 0dfecf1e..00000000 --- a/v1/models/o365_add_snapshot_arg_sharepoint_info.go +++ /dev/null @@ -1,52 +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" -) - -// O365AddSnapshotArgSharepointInfo o365 add snapshot arg sharepoint info -// -// swagger:model O365AddSnapshotArg_SharepointInfo -type O365AddSnapshotArgSharepointInfo struct { - - // Whether sharepoint lists have to indexed. This is done if the flag - // magneto_o365_sharepoint_index_lists is true, and lists were backed up - // without an error. - ShouldIndexLists *bool `json:"shouldIndexLists,omitempty"` -} - -// Validate validates this o365 add snapshot arg sharepoint info -func (m *O365AddSnapshotArgSharepointInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 add snapshot arg sharepoint info based on context it is used -func (m *O365AddSnapshotArgSharepointInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365AddSnapshotArgSharepointInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365AddSnapshotArgSharepointInfo) UnmarshalBinary(b []byte) error { - var res O365AddSnapshotArgSharepointInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_add_snapshot_arg_teams_info.go b/v1/models/o365_add_snapshot_arg_teams_info.go deleted file mode 100644 index c6ea7343..00000000 --- a/v1/models/o365_add_snapshot_arg_teams_info.go +++ /dev/null @@ -1,11 +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 - -// O365AddSnapshotArgTeamsInfo o365 add snapshot arg teams info -// -// swagger:model O365AddSnapshotArg_TeamsInfo -type O365AddSnapshotArgTeamsInfo interface{} diff --git a/v1/models/o365_backup_env_params.go b/v1/models/o365_backup_env_params.go deleted file mode 100644 index 7cd8f5fd..00000000 --- a/v1/models/o365_backup_env_params.go +++ /dev/null @@ -1,330 +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" -) - -// O365BackupEnvParams Office365 Backup Environment Parameters. -// -// Message to capture any additional backup params for Office365 environment. -// This encapsulates all M365 workload's backup parameters. -// -// swagger:model O365BackupEnvParams -type O365BackupEnvParams struct { - - // This field has been deprecated. Use 'filtering_policy' specified within - // 'outlook_backup_params' for Outlook exclusions filter and - // 'onedrive_backup_params' for OneDrive exclusions filter respectively. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // Group specific backup parameters. - // Refer 'GroupBackupEnvParams' for details. - GroupBackupParams GroupBackupEnvParams `json:"groupBackupParams,omitempty"` - - // OneDrive specific backup parameters. Refer 'OneDriveBackupEnvParams' for - // details. - OnedriveBackupParams *OneDriveBackupEnvParams `json:"onedriveBackupParams,omitempty"` - - // Outlook specific backup parameters. Refer 'OutlookBackupEnvParams' for - // details. - OutlookBackupParams *OutlookBackupEnvParams `json:"outlookBackupParams,omitempty"` - - // PublicFolders specific backup parameters. - // Refer 'PublicFoldersEnvParams' for details. - PublicFoldersBackupParams *PublicFoldersBackupEnvParams `json:"publicFoldersBackupParams,omitempty"` - - // SharePoint specific backup parameters. - // Refer 'SharepPointSiteBackupEnvParams' for details. - SiteBackupParams *SharepPointSiteBackupEnvParams `json:"siteBackupParams,omitempty"` - - // Teams specific backup parameters. - // Refer 'TeamsBackupEnvParams' for details. - TeamsBackupParams TeamsBackupEnvParams `json:"teamsBackupParams,omitempty"` -} - -// Validate validates this o365 backup env params -func (m *O365BackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnedriveBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFoldersBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteBackupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365BackupEnvParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) validateOnedriveBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.OnedriveBackupParams) { // not required - return nil - } - - if m.OnedriveBackupParams != nil { - if err := m.OnedriveBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onedriveBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onedriveBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) validateOutlookBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookBackupParams) { // not required - return nil - } - - if m.OutlookBackupParams != nil { - if err := m.OutlookBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) validatePublicFoldersBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFoldersBackupParams) { // not required - return nil - } - - if m.PublicFoldersBackupParams != nil { - if err := m.PublicFoldersBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) validateSiteBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.SiteBackupParams) { // not required - return nil - } - - if m.SiteBackupParams != nil { - if err := m.SiteBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteBackupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this o365 backup env params based on the context it is used -func (m *O365BackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnedriveBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFoldersBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365BackupEnvParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) contextValidateOnedriveBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OnedriveBackupParams != nil { - - if swag.IsZero(m.OnedriveBackupParams) { // not required - return nil - } - - if err := m.OnedriveBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onedriveBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onedriveBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) contextValidateOutlookBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookBackupParams != nil { - - if swag.IsZero(m.OutlookBackupParams) { // not required - return nil - } - - if err := m.OutlookBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) contextValidatePublicFoldersBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFoldersBackupParams != nil { - - if swag.IsZero(m.PublicFoldersBackupParams) { // not required - return nil - } - - if err := m.PublicFoldersBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersBackupParams") - } - return err - } - } - - return nil -} - -func (m *O365BackupEnvParams) contextValidateSiteBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteBackupParams != nil { - - if swag.IsZero(m.SiteBackupParams) { // not required - return nil - } - - if err := m.SiteBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteBackupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365BackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365BackupEnvParams) UnmarshalBinary(b []byte) error { - var res O365BackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_backup_params.go b/v1/models/o365_backup_params.go deleted file mode 100644 index 2bba064f..00000000 --- a/v1/models/o365_backup_params.go +++ /dev/null @@ -1,231 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// O365BackupParams This message contains additional params for an O365 backup job run. -// -// swagger:model O365BackupParams -type O365BackupParams struct { - - // Indicates whether scaling o365 permits based on number of application ids - // installed is enabled. - ApplicationIdsPermitScalingEnabled *bool `json:"applicationIdsPermitScalingEnabled,omitempty"` - - // This field is only used for site entities. - ChildSiteVec []*O365BackupParamsSiteInfo `json:"childSiteVec"` - - // If true, delete cloned directory. - DeleteClonedDirectory *bool `json:"deleteClonedDirectory,omitempty"` - - // Dir to renamed when cloning. Incase if the prev run failed, we need to - // send this from master to slave. - DirToBeRenamed *string `json:"dirToBeRenamed,omitempty"` - - // This flag indicates whether we are in the view cloning paradigm for the - // first time or not. i.e. the previous run used the default magneto backup - // view. - FirstTimeViewClone *bool `json:"firstTimeViewClone,omitempty"` - - // If true, then automatic full backup was triggered for this attempt. - IsAutomaticFullBackup *bool `json:"isAutomaticFullBackup,omitempty"` - - // Indicates whether sharepoint template backup can be skipped or not. - MaybeSkipSharepointTemplateBackup *bool `json:"maybeSkipSharepointTemplateBackup,omitempty"` - - // parent site - ParentSite *O365BackupParamsSiteInfo `json:"parentSite,omitempty"` - - // For view cloning per run, o365 environment needs the view name used in - // the last run (with at least one finished attempt). - PreviousRunViewName *string `json:"previousRunViewName,omitempty"` - - // If true, check for the lookup error and trigger full backup if required. - ReportLookupError *bool `json:"reportLookupError,omitempty"` - - // Whether to backup onedrive of entity being backed up. This is only used - // for user and group type entities. - ShouldBackupOnedrive *bool `json:"shouldBackupOnedrive,omitempty"` - - // Whether the entity to be backed up is a sharepoint entity or not. - ShouldBackupSharepoint *bool `json:"shouldBackupSharepoint,omitempty"` - - // If slave needs to clone the entity snapshot directory recursively. - ShouldRecursivelyCloneSharepointDir *bool `json:"shouldRecursivelyCloneSharepointDir,omitempty"` - - // Whether the onedrive task should use flat file structure or not. - ShouldUseFlatFileStructure *bool `json:"shouldUseFlatFileStructure,omitempty"` - - // Relative path of sharepoint site in snapfs. If there is a subsite A - // inside a site B, its path will be - // {domain}/site-{site id of A}/site-{site id of B} - // This field will contain path relative to {domain} i.e. - // site-{site id of A}/site-{site id of B} - SiteRelativePath *string `json:"siteRelativePath,omitempty"` - - // Sla deadline from backup job policy. - SLADeadlineTimeUsecs *int64 `json:"slaDeadlineTimeUsecs,omitempty"` - - // The total size of the entity known at the time of registration. - TotalEntityLogicalSize *int64 `json:"totalEntityLogicalSize,omitempty"` - - // This is an explicit flag to intimate slave that master already cloned the - // view. - ViewCloningEnabled *bool `json:"viewCloningEnabled,omitempty"` -} - -// Validate validates this o365 backup params -func (m *O365BackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChildSiteVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSite(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365BackupParams) validateChildSiteVec(formats strfmt.Registry) error { - if swag.IsZero(m.ChildSiteVec) { // not required - return nil - } - - for i := 0; i < len(m.ChildSiteVec); i++ { - if swag.IsZero(m.ChildSiteVec[i]) { // not required - continue - } - - if m.ChildSiteVec[i] != nil { - if err := m.ChildSiteVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childSiteVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childSiteVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *O365BackupParams) validateParentSite(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSite) { // not required - return nil - } - - if m.ParentSite != nil { - if err := m.ParentSite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSite") - } - return err - } - } - - return nil -} - -// ContextValidate validate this o365 backup params based on the context it is used -func (m *O365BackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChildSiteVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSite(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365BackupParams) contextValidateChildSiteVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildSiteVec); i++ { - - if m.ChildSiteVec[i] != nil { - - if swag.IsZero(m.ChildSiteVec[i]) { // not required - return nil - } - - if err := m.ChildSiteVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childSiteVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childSiteVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *O365BackupParams) contextValidateParentSite(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSite != nil { - - if swag.IsZero(m.ParentSite) { // not required - return nil - } - - if err := m.ParentSite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSite") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365BackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365BackupParams) UnmarshalBinary(b []byte) error { - var res O365BackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_backup_params_site_info.go b/v1/models/o365_backup_params_site_info.go deleted file mode 100644 index 103b5817..00000000 --- a/v1/models/o365_backup_params_site_info.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" -) - -// O365BackupParamsSiteInfo o365 backup params site info -// -// swagger:model O365BackupParams_SiteInfo -type O365BackupParamsSiteInfo struct { - - // Id of the site. - ID *string `json:"id,omitempty"` - - // Name of the site. - Name *string `json:"name,omitempty"` -} - -// Validate validates this o365 backup params site info -func (m *O365BackupParamsSiteInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 backup params site info based on context it is used -func (m *O365BackupParamsSiteInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365BackupParamsSiteInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365BackupParamsSiteInfo) UnmarshalBinary(b []byte) error { - var res O365BackupParamsSiteInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_connect_params.go b/v1/models/o365_connect_params.go deleted file mode 100644 index b77a9198..00000000 --- a/v1/models/o365_connect_params.go +++ /dev/null @@ -1,113 +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" -) - -// O365ConnectParams Office 365 Connect Params. -// -// Specifies an Object containing information about a registered Office 365 -// source. -// -// swagger:model O365ConnectParams -type O365ConnectParams struct { - - // Specifies the parameters used for selectively discovering the office 365 - // objects during source registration or refresh. - ObjectsDiscoveryParams *ObjectsDiscoveryParams `json:"ObjectsDiscoveryParams,omitempty"` -} - -// Validate validates this o365 connect params -func (m *O365ConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectsDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365ConnectParams) validateObjectsDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectsDiscoveryParams) { // not required - return nil - } - - if m.ObjectsDiscoveryParams != nil { - if err := m.ObjectsDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ObjectsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ObjectsDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this o365 connect params based on the context it is used -func (m *O365ConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectsDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365ConnectParams) contextValidateObjectsDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectsDiscoveryParams != nil { - - if swag.IsZero(m.ObjectsDiscoveryParams) { // not required - return nil - } - - if err := m.ObjectsDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ObjectsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ObjectsDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365ConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365ConnectParams) UnmarshalBinary(b []byte) error { - var res O365ConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_one_drive_restore_entity_params.go b/v1/models/o365_one_drive_restore_entity_params.go deleted file mode 100644 index 378bae39..00000000 --- a/v1/models/o365_one_drive_restore_entity_params.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// O365OneDriveRestoreEntityParams This message defines the per object restore parameters for restoring a -// SINGLE user's One Drive. -// -// swagger:model O365OneDriveRestoreEntityParams -type O365OneDriveRestoreEntityParams struct { - - // The list of drives that are being restored. - DriveVec []*O365OneDriveRestoreEntityParamsDrive `json:"driveVec"` -} - -// Validate validates this o365 one drive restore entity params -func (m *O365OneDriveRestoreEntityParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365OneDriveRestoreEntityParams) validateDriveVec(formats strfmt.Registry) error { - if swag.IsZero(m.DriveVec) { // not required - return nil - } - - for i := 0; i < len(m.DriveVec); i++ { - if swag.IsZero(m.DriveVec[i]) { // not required - continue - } - - if m.DriveVec[i] != nil { - if err := m.DriveVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this o365 one drive restore entity params based on the context it is used -func (m *O365OneDriveRestoreEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365OneDriveRestoreEntityParams) contextValidateDriveVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveVec); i++ { - - if m.DriveVec[i] != nil { - - if swag.IsZero(m.DriveVec[i]) { // not required - return nil - } - - if err := m.DriveVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParams) UnmarshalBinary(b []byte) error { - var res O365OneDriveRestoreEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_one_drive_restore_entity_params_drive.go b/v1/models/o365_one_drive_restore_entity_params_drive.go deleted file mode 100644 index 688c6747..00000000 --- a/v1/models/o365_one_drive_restore_entity_params_drive.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// O365OneDriveRestoreEntityParamsDrive o365 one drive restore entity params drive -// -// swagger:model O365OneDriveRestoreEntityParams_Drive -type O365OneDriveRestoreEntityParamsDrive struct { - - // Type of OneDrive drive being stored. - DriveType *int32 `json:"driveType,omitempty"` - - // Specify if the entire drive is to be restored. - // This field should be false if restore_item_vec size > 0. - IsEntireDriveRequired *bool `json:"isEntireDriveRequired,omitempty"` - - // Id of the drive whose items are being restored. - RestoreDriveID *string `json:"restoreDriveId,omitempty"` - - // List of drive paths that need to be restored. Used for partial drive - // recovery. - RestoreItemVec []*O365OneDriveRestoreEntityParamsDriveItem `json:"restoreItemVec"` -} - -// Validate validates this o365 one drive restore entity params drive -func (m *O365OneDriveRestoreEntityParamsDrive) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreItemVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365OneDriveRestoreEntityParamsDrive) validateRestoreItemVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreItemVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreItemVec); i++ { - if swag.IsZero(m.RestoreItemVec[i]) { // not required - continue - } - - if m.RestoreItemVec[i] != nil { - if err := m.RestoreItemVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this o365 one drive restore entity params drive based on the context it is used -func (m *O365OneDriveRestoreEntityParamsDrive) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreItemVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *O365OneDriveRestoreEntityParamsDrive) contextValidateRestoreItemVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreItemVec); i++ { - - if m.RestoreItemVec[i] != nil { - - if swag.IsZero(m.RestoreItemVec[i]) { // not required - return nil - } - - if err := m.RestoreItemVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParamsDrive) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParamsDrive) UnmarshalBinary(b []byte) error { - var res O365OneDriveRestoreEntityParamsDrive - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_one_drive_restore_entity_params_drive_item.go b/v1/models/o365_one_drive_restore_entity_params_drive_item.go deleted file mode 100644 index 1379c571..00000000 --- a/v1/models/o365_one_drive_restore_entity_params_drive_item.go +++ /dev/null @@ -1,56 +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" -) - -// O365OneDriveRestoreEntityParamsDriveItem DriveItems are used in the case of partial drive recovery. -// -// swagger:model O365OneDriveRestoreEntityParams_DriveItem -type O365OneDriveRestoreEntityParamsDriveItem struct { - - // The unique identifier of the item within the Drive. - DriveItemID *string `json:"driveItemId,omitempty"` - - // The path of the drive item relative to root. - DriveItemPath *string `json:"driveItemPath,omitempty"` - - // Specify if the item is a file or not. - IsFileItem *bool `json:"isFileItem,omitempty"` -} - -// Validate validates this o365 one drive restore entity params drive item -func (m *O365OneDriveRestoreEntityParamsDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 one drive restore entity params drive item based on context it is used -func (m *O365OneDriveRestoreEntityParamsDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParamsDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365OneDriveRestoreEntityParamsDriveItem) UnmarshalBinary(b []byte) error { - var res O365OneDriveRestoreEntityParamsDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/o365_region_proto.go b/v1/models/o365_region_proto.go deleted file mode 100644 index ee2191c5..00000000 --- a/v1/models/o365_region_proto.go +++ /dev/null @@ -1,51 +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" -) - -// O365RegionProto O365Region proto will store the information about the region from where o365 -// connector apis calls are made. -// -// swagger:model O365RegionProto -type O365RegionProto struct { - - // The country where the o365 connector apis were called from. - Country *int32 `json:"country,omitempty"` -} - -// Validate validates this o365 region proto -func (m *O365RegionProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 region proto based on context it is used -func (m *O365RegionProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365RegionProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365RegionProto) UnmarshalBinary(b []byte) error { - var res O365RegionProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_field_selector.go b/v1/models/object_field_selector.go deleted file mode 100644 index 7b2b5fd3..00000000 --- a/v1/models/object_field_selector.go +++ /dev/null @@ -1,54 +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" -) - -// ObjectFieldSelector object field selector -// -// swagger:model ObjectFieldSelector -type ObjectFieldSelector struct { - - // Version of the schema the FieldPath is written in terms of, defaults to - // "v1". - APIVersion *string `json:"apiVersion,omitempty"` - - // Path of the field to select in the specified API version. - FieldPath *string `json:"fieldPath,omitempty"` -} - -// Validate validates this object field selector -func (m *ObjectFieldSelector) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object field selector based on context it is used -func (m *ObjectFieldSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectFieldSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectFieldSelector) UnmarshalBinary(b []byte) error { - var res ObjectFieldSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_info.go b/v1/models/object_info.go deleted file mode 100644 index 159402c7..00000000 --- a/v1/models/object_info.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectInfo Proto that contains specific information about an Object. -// -// swagger:model ObjectInfo -type ObjectInfo struct { - - // Information about Sfdc fields associated with an object. - FieldInfo []*FieldInfo `json:"fieldInfo"` - - // Key prefix of the id field of the records of the object. - // All the record id's of this object would start with this key prefix and - // hence can be used to identify to which object a record belongs to. - KeyPrefix *string `json:"keyPrefix,omitempty"` - - // Object type ie db, table etc. - ObjectType *int32 `json:"objectType,omitempty"` - - // Number of records in this object. - RecordCount *uint64 `json:"recordCount,omitempty"` -} - -// Validate validates this object info -func (m *ObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFieldInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInfo) validateFieldInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FieldInfo) { // not required - return nil - } - - for i := 0; i < len(m.FieldInfo); i++ { - if swag.IsZero(m.FieldInfo[i]) { // not required - continue - } - - if m.FieldInfo[i] != nil { - if err := m.FieldInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object info based on the context it is used -func (m *ObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFieldInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInfo) contextValidateFieldInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FieldInfo); i++ { - - if m.FieldInfo[i] != nil { - - if swag.IsZero(m.FieldInfo[i]) { // not required - return nil - } - - if err := m.FieldInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectInfo) UnmarshalBinary(b []byte) error { - var res ObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_information.go b/v1/models/object_information.go deleted file mode 100644 index 75218f2d..00000000 --- a/v1/models/object_information.go +++ /dev/null @@ -1,263 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectInformation object information -// -// swagger:model ObjectInformation -type ObjectInformation struct { - - // Species the list of user who have access to this object. - AccessibleUsers []string `json:"accessibleUsers"` - - // Specifies the audit log information. - AuditLogs []*ClusterAuditLog `json:"auditLogs"` - - // Specifies the copy task information. - CopyTaskInfo []*GdprCopyTask `json:"copyTaskInfo"` - - // Specifies the protection status of the object. - IsProtected *bool `json:"isProtected,omitempty"` - - // Specifies the location of the parent source. - Location *string `json:"location,omitempty"` - - // Specifies the data locations for the protected objects. - ProtectionInfo []*ProtectionInfo `json:"protectionInfo"` - - // Specifies the id of the root node. - RootNodeID *int64 `json:"rootNodeId,omitempty"` - - // Specifies the id of the Protection Source. - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the object. - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this object information -func (m *ObjectInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuditLogs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyTaskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInformation) validateAuditLogs(formats strfmt.Registry) error { - if swag.IsZero(m.AuditLogs) { // not required - return nil - } - - for i := 0; i < len(m.AuditLogs); i++ { - if swag.IsZero(m.AuditLogs[i]) { // not required - continue - } - - if m.AuditLogs[i] != nil { - if err := m.AuditLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInformation) validateCopyTaskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CopyTaskInfo) { // not required - return nil - } - - for i := 0; i < len(m.CopyTaskInfo); i++ { - if swag.IsZero(m.CopyTaskInfo[i]) { // not required - continue - } - - if m.CopyTaskInfo[i] != nil { - if err := m.CopyTaskInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInformation) validateProtectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionInfo) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionInfo); i++ { - if swag.IsZero(m.ProtectionInfo[i]) { // not required - continue - } - - if m.ProtectionInfo[i] != nil { - if err := m.ProtectionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object information based on the context it is used -func (m *ObjectInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuditLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyTaskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInformation) contextValidateAuditLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AuditLogs); i++ { - - if m.AuditLogs[i] != nil { - - if swag.IsZero(m.AuditLogs[i]) { // not required - return nil - } - - if err := m.AuditLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInformation) contextValidateCopyTaskInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyTaskInfo); i++ { - - if m.CopyTaskInfo[i] != nil { - - if swag.IsZero(m.CopyTaskInfo[i]) { // not required - return nil - } - - if err := m.CopyTaskInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTaskInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTaskInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInformation) contextValidateProtectionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionInfo); i++ { - - if m.ProtectionInfo[i] != nil { - - if swag.IsZero(m.ProtectionInfo[i]) { // not required - return nil - } - - if err := m.ProtectionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectInformation) UnmarshalBinary(b []byte) error { - var res ObjectInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_level_params.go b/v1/models/object_level_params.go deleted file mode 100644 index fa86f631..00000000 --- a/v1/models/object_level_params.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" -) - -// ObjectLevelParams This message contains the parameters that apply to a given Sfdc object. -// -// swagger:model ObjectLevelParams -type ObjectLevelParams struct { - - // Entity id of the object. - EntityID *int64 `json:"entityId,omitempty"` - - // List of the field names that the user excluded in this object. - ExcludedFieldsVec []string `json:"excludedFieldsVec"` -} - -// Validate validates this object level params -func (m *ObjectLevelParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object level params based on context it is used -func (m *ObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectLevelParams) UnmarshalBinary(b []byte) error { - var res ObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_meta.go b/v1/models/object_meta.go deleted file mode 100644 index 78b2e026..00000000 --- a/v1/models/object_meta.go +++ /dev/null @@ -1,199 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectMeta object meta -// -// swagger:model ObjectMeta -type ObjectMeta struct { - - // Annotations added to the object. - Annotations []*ObjectMetaAnnotationsEntry `json:"annotations"` - - // A set of key-value pairs, capturing the labels of a k8s object. - Labels []*ObjectMetaLabelsEntry `json:"labels"` - - // Name must be unique within a namespace. Is required when creating - // resources, although some resources may allow a client to request the - // generation of an appropriate name automatically. Name is primarily - // intended for creation idempotence and configuration definition. Cannot be - // updated. - Name *string `json:"name,omitempty"` - - // Namespace defines the space within each name must be unique. An empty - // namespace is equivalent to the "default" namespace, but "default" is the - // canonical representation. Not all objects are required to be scoped to a - // namespace - the value of this field for those objects will be empty. - Namespace *string `json:"namespace,omitempty"` - - // UUID of the object queried. - UID *string `json:"uid,omitempty"` -} - -// Validate validates this object meta -func (m *ObjectMeta) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMeta) validateAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.Annotations) { // not required - return nil - } - - for i := 0; i < len(m.Annotations); i++ { - if swag.IsZero(m.Annotations[i]) { // not required - continue - } - - if m.Annotations[i] != nil { - if err := m.Annotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectMeta) validateLabels(formats strfmt.Registry) error { - if swag.IsZero(m.Labels) { // not required - return nil - } - - for i := 0; i < len(m.Labels); i++ { - if swag.IsZero(m.Labels[i]) { // not required - continue - } - - if m.Labels[i] != nil { - if err := m.Labels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object meta based on the context it is used -func (m *ObjectMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMeta) contextValidateAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Annotations); i++ { - - if m.Annotations[i] != nil { - - if swag.IsZero(m.Annotations[i]) { // not required - return nil - } - - if err := m.Annotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectMeta) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Labels); i++ { - - if m.Labels[i] != nil { - - if swag.IsZero(m.Labels[i]) { // not required - return nil - } - - if err := m.Labels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMeta) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMeta) UnmarshalBinary(b []byte) error { - var res ObjectMeta - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_meta_annotations_entry.go b/v1/models/object_meta_annotations_entry.go deleted file mode 100644 index a4e00379..00000000 --- a/v1/models/object_meta_annotations_entry.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" -) - -// ObjectMetaAnnotationsEntry object meta annotations entry -// -// swagger:model ObjectMeta_AnnotationsEntry -type ObjectMetaAnnotationsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this object meta annotations entry -func (m *ObjectMetaAnnotationsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object meta annotations entry based on context it is used -func (m *ObjectMetaAnnotationsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMetaAnnotationsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMetaAnnotationsEntry) UnmarshalBinary(b []byte) error { - var res ObjectMetaAnnotationsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_meta_labels_entry.go b/v1/models/object_meta_labels_entry.go deleted file mode 100644 index f6da059a..00000000 --- a/v1/models/object_meta_labels_entry.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" -) - -// ObjectMetaLabelsEntry object meta labels entry -// -// swagger:model ObjectMeta_LabelsEntry -type ObjectMetaLabelsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this object meta labels entry -func (m *ObjectMetaLabelsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object meta labels entry based on context it is used -func (m *ObjectMetaLabelsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMetaLabelsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMetaLabelsEntry) UnmarshalBinary(b []byte) error { - var res ObjectMetaLabelsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_protection_info.go b/v1/models/object_protection_info.go deleted file mode 100644 index fb62a2a1..00000000 --- a/v1/models/object_protection_info.go +++ /dev/null @@ -1,57 +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" -) - -// ObjectProtectionInfo ObjectProtectionInfo specifies object protection info. -// -// swagger:model ObjectProtectionInfo -type ObjectProtectionInfo struct { - - // Specifies the auto protect parent id if this entity is protected based on - // auto protection. This is only specified for leaf entities. - AutoProtectParentID *int64 `json:"autoProtectParentId,omitempty"` - - // Specifies the entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies if the entity is under object protection - HasActiveObjectProtectionSpec *bool `json:"hasActiveObjectProtectionSpec,omitempty"` -} - -// Validate validates this object protection info -func (m *ObjectProtectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object protection info based on context it is used -func (m *ObjectProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionInfo) UnmarshalBinary(b []byte) error { - var res ObjectProtectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_reference.go b/v1/models/object_reference.go deleted file mode 100644 index 07976cc6..00000000 --- a/v1/models/object_reference.go +++ /dev/null @@ -1,74 +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" -) - -// ObjectReference ObjectReference contains enough information to let you inspect or modify the -// referred object. -// -// swagger:model ObjectReference -type ObjectReference struct { - - // API group make it easier to extend the Kubernetes API. The API group is - // specified in a REST path and in the apiVersion field. - APIGroup *string `json:"apiGroup,omitempty"` - - // APIVersion defines the versioned schema of this representation of an - // object. Servers should convert recognized schemas to the latest internal - // value, and may reject unrecognized values. - APIVersion *string `json:"apiVersion,omitempty"` - - // Kind is a string value representing the REST resource this object - // represents. Servers may infer this from the endpoint the client submits - // requests to. - Kind *string `json:"kind,omitempty"` - - // Name of the referent. - Name *string `json:"name,omitempty"` - - // Namespace of the referent. - Namespace *string `json:"namespace,omitempty"` - - // Specific resourceVersion to which this reference is made, if any. - ResourceVersion *string `json:"resourceVersion,omitempty"` - - // UID of the referent. - UID *string `json:"uid,omitempty"` -} - -// Validate validates this object reference -func (m *ObjectReference) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object reference based on context it is used -func (m *ObjectReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectReference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectReference) UnmarshalBinary(b []byte) error { - var res ObjectReference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_search_results.go b/v1/models/object_search_results.go deleted file mode 100644 index 8a83787c..00000000 --- a/v1/models/object_search_results.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSearchResults Object Search Results. -// -// Specifies an array of backup objects and a count to indicate -// if additional requests must be made to get the full result. -// -// swagger:model ObjectSearchResults -type ObjectSearchResults struct { - - // Array of Snapshot Objects. - // - // Specifies the list of backup objects returned by this request that - // match the specified search and filter criteria. - // The number of objects returned is limited by the pageCount field. - ObjectSnapshotInfo []*ObjectSnapshotInfo `json:"objectSnapshotInfo"` - - // Specifies the total number of backup objects that match the filter and - // search criteria. Use this value - // to determine how many additional requests are required to get the - // full result. - TotalCount *int64 `json:"totalCount,omitempty"` -} - -// Validate validates this object search results -func (m *ObjectSearchResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSearchResults) validateObjectSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectSnapshotInfo) { // not required - return nil - } - - for i := 0; i < len(m.ObjectSnapshotInfo); i++ { - if swag.IsZero(m.ObjectSnapshotInfo[i]) { // not required - continue - } - - if m.ObjectSnapshotInfo[i] != nil { - if err := m.ObjectSnapshotInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectSnapshotInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectSnapshotInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object search results based on the context it is used -func (m *ObjectSearchResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSearchResults) contextValidateObjectSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectSnapshotInfo); i++ { - - if m.ObjectSnapshotInfo[i] != nil { - - if swag.IsZero(m.ObjectSnapshotInfo[i]) { // not required - return nil - } - - if err := m.ObjectSnapshotInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectSnapshotInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectSnapshotInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSearchResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSearchResults) UnmarshalBinary(b []byte) error { - var res ObjectSearchResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document.go b/v1/models/object_snapshot_document.go deleted file mode 100644 index f104161a..00000000 --- a/v1/models/object_snapshot_document.go +++ /dev/null @@ -1,647 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotDocument object snapshot document -// -// swagger:model ObjectSnapshotDocument -type ObjectSnapshotDocument struct { - - // Entity specific attributes. - // Ex: environment type, owner_vm_name for databases. - AttributeMap []*AddSnapshotArgKeyValuePair `json:"attributeMap"` - - // This contains information regarding auto protected entity that the entity - // in the current task is part of. For e.g. if a protection job was created - // specifying vApp as the source object then 'auto_protected_source' will be - // populated with that vApp entity for every VM entity in the task. This is - // so that we can show this info as part of the object search results and - // also filter by the auto protected entity. - AutoProtectedSource *PrivateEntityProto `json:"autoProtectedSource,omitempty"` - - // The type of the backup job that magneto ran. - BackupType *int32 `json:"backupType,omitempty"` - - // Volume info for bootable volume found in latest snapshot. If this is known - // then instead of searching volume mapping file (fstab/hive) in all volumes, - // we first see it it's present here. Only if we fail to find here then we - // search in all volumes. - BootVolumeInfo *PrivateVolumeInfo `json:"bootVolumeInfo,omitempty"` - - // Cluster partition id. - ClusterPartitionID *int64 `json:"clusterPartitionId,omitempty"` - - // Snapshot type of the object. This field is deprecated and is never - // released in production. - // TODO(dinesh): Remove this field in next release. - DEPRECATEDSnapshotType *int32 `json:"dEPRECATEDSnapshotType,omitempty"` - - // Deprecated/ - DeprecatedSnapshotDir *string `json:"deprecatedSnapshotDir,omitempty"` - - // elasticsearch doc type - ElasticsearchDocType *string `json:"elasticsearchDocType,omitempty"` - - // These are never set! They are provided here as a useful configuration - // default. - ElasticsearchIndexName *string `json:"elasticsearchIndexName,omitempty"` - - // If this field is set to true, that will mean, that migration has finished - // for this particular object. - FinishedLibrarianMigrationForCfileindex *bool `json:"finishedLibrarianMigrationForCfileindex,omitempty"` - - // Whether the AddSnapshotArg for which this doc was constructed is a - // reindexing request. - IsReindexingRequest *bool `json:"isReindexingRequest,omitempty"` - - // Name of the job that pulled the backup. - JobName *string `json:"jobName,omitempty"` - - // We verify whether data in ES is in sync with objectDb and levelDb. This - // field specifies the last time this verification was done. - LastVerificationTimeSecs *int64 `json:"lastVerificationTimeSecs,omitempty"` - - // This field is set only if backup_type is kO365. - O365Params *ObjectSnapshotDocumentO365Params `json:"o365Params,omitempty"` - - // Any other search tags that might be associated with the object. - // Good example are IP address, moref id (for vmware), etc. Yoda will try to - // pull some well known aliases from object_id.entity..... - ObjectAliases []string `json:"objectAliases"` - - // Key fields are declared as optional - that's because we clear them before - // serializing the value. Please don't mark any field as required. - ObjectID *MagnetoObjectID `json:"objectId,omitempty"` - - // Primary name of the object. - ObjectName *string `json:"objectName,omitempty"` - - // Inferred OS type. - OsType *string `json:"osType,omitempty"` - - // A hint as to what node should this object be read on. - // This is just a hint where magneto can provide the id of the node that - // pulled the snapshot. Yoda will try to schedule its processing on the same - // node to minimize data movement over network. - PreferredReadNodeID *int64 `json:"preferredReadNodeId,omitempty"` - - // The source that was accessed by the job that took this snapshot. - // e.g., it could be the vCenter in a vmware environment. - RegisteredSource *PrivateEntityProto `json:"registeredSource,omitempty"` - - // A unique 64 bit number for registered_source. This is not available yet, - // so we use Crc32(BinarySerialize(cohesity.magneto.EntityProto))) - RegisteredSourceHash *uint64 `json:"registeredSourceHash,omitempty"` - - // The Tenant ID that owns this document. - TenantID *string `json:"tenantId,omitempty"` - - // All versions of this document we know about. - Versions []*ObjectSnapshotDocumentVersionInfo `json:"versions"` - - // The internal id of the view box (storage container). - // This is used for filtering results from search index. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // These fields are not stored in Elasticsearch. This field should no longer - // be populated, use view_name in VersionInfo instead. It will be populated - // for old vm snapshots (pre 4.2). - ViewName *string `json:"viewName,omitempty"` - - // Last modified time of volume mapping file (fstab/hive) found in latest - // snapshot. If this is known then we compare it with current mtime of - // mapping file to see if we need to read it again. - VolMappingFileMtimeSecs *int64 `json:"volMappingFileMtimeSecs,omitempty"` - - // For each unique volume mount map we insert an entry in this field. - VolumeMountIoInfoVersionVec []*ObjectSnapshotDocumentVolumeMountIOInfoMapVersion `json:"volumeMountIoInfoVersionVec"` - - // For each unique volume map we keep this field. - VolumeVersionVec []*ObjectSnapshotDocumentVolumeMapVersion `json:"volumeVersionVec"` -} - -// Validate validates this object snapshot document -func (m *ObjectSnapshotDocument) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAutoProtectedSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBootVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeMountIoInfoVersionVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeVersionVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocument) validateAttributeMap(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeMap) { // not required - return nil - } - - for i := 0; i < len(m.AttributeMap); i++ { - if swag.IsZero(m.AttributeMap[i]) { // not required - continue - } - - if m.AttributeMap[i] != nil { - if err := m.AttributeMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateAutoProtectedSource(formats strfmt.Registry) error { - if swag.IsZero(m.AutoProtectedSource) { // not required - return nil - } - - if m.AutoProtectedSource != nil { - if err := m.AutoProtectedSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("autoProtectedSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("autoProtectedSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateBootVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.BootVolumeInfo) { // not required - return nil - } - - if m.BootVolumeInfo != nil { - if err := m.BootVolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bootVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bootVolumeInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateObjectID(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if m.ObjectID != nil { - if err := m.ObjectID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateRegisteredSource(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if m.RegisteredSource != nil { - if err := m.RegisteredSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required - return nil - } - - for i := 0; i < len(m.Versions); i++ { - if swag.IsZero(m.Versions[i]) { // not required - continue - } - - if m.Versions[i] != nil { - if err := m.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateVolumeMountIoInfoVersionVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeMountIoInfoVersionVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeMountIoInfoVersionVec); i++ { - if swag.IsZero(m.VolumeMountIoInfoVersionVec[i]) { // not required - continue - } - - if m.VolumeMountIoInfoVersionVec[i] != nil { - if err := m.VolumeMountIoInfoVersionVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountIoInfoVersionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountIoInfoVersionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) validateVolumeVersionVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeVersionVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeVersionVec); i++ { - if swag.IsZero(m.VolumeVersionVec[i]) { // not required - continue - } - - if m.VolumeVersionVec[i] != nil { - if err := m.VolumeVersionVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeVersionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeVersionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object snapshot document based on the context it is used -func (m *ObjectSnapshotDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAutoProtectedSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBootVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeMountIoInfoVersionVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeVersionVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateAttributeMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeMap); i++ { - - if m.AttributeMap[i] != nil { - - if swag.IsZero(m.AttributeMap[i]) { // not required - return nil - } - - if err := m.AttributeMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateAutoProtectedSource(ctx context.Context, formats strfmt.Registry) error { - - if m.AutoProtectedSource != nil { - - if swag.IsZero(m.AutoProtectedSource) { // not required - return nil - } - - if err := m.AutoProtectedSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("autoProtectedSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("autoProtectedSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateBootVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.BootVolumeInfo != nil { - - if swag.IsZero(m.BootVolumeInfo) { // not required - return nil - } - - if err := m.BootVolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bootVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bootVolumeInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateObjectID(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectID != nil { - - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if err := m.ObjectID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateRegisteredSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredSource != nil { - - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if err := m.RegisteredSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Versions); i++ { - - if m.Versions[i] != nil { - - if swag.IsZero(m.Versions[i]) { // not required - return nil - } - - if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateVolumeMountIoInfoVersionVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeMountIoInfoVersionVec); i++ { - - if m.VolumeMountIoInfoVersionVec[i] != nil { - - if swag.IsZero(m.VolumeMountIoInfoVersionVec[i]) { // not required - return nil - } - - if err := m.VolumeMountIoInfoVersionVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountIoInfoVersionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountIoInfoVersionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocument) contextValidateVolumeVersionVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeVersionVec); i++ { - - if m.VolumeVersionVec[i] != nil { - - if swag.IsZero(m.VolumeVersionVec[i]) { // not required - return nil - } - - if err := m.VolumeVersionVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeVersionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeVersionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocument) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocument) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocument - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_o365_params.go b/v1/models/object_snapshot_document_o365_params.go deleted file mode 100644 index 9e3f6db1..00000000 --- a/v1/models/object_snapshot_document_o365_params.go +++ /dev/null @@ -1,55 +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" -) - -// ObjectSnapshotDocumentO365Params Message to represent o365 applications backup information. For example, an -// object in a protection job (in case of O365 backups this is an O365 user) -// may have outlook and onedrive backed up or either one of those. -// -// swagger:model ObjectSnapshotDocument_O365Params -type ObjectSnapshotDocumentO365Params struct { - - // Whether one drive application is backed up. - IsOneDriveBackedUp *bool `json:"isOneDriveBackedUp,omitempty"` - - // Whether outlook application is backed up. - IsOutlookBackedUp *bool `json:"isOutlookBackedUp,omitempty"` -} - -// Validate validates this object snapshot document o365 params -func (m *ObjectSnapshotDocumentO365Params) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object snapshot document o365 params based on context it is used -func (m *ObjectSnapshotDocumentO365Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentO365Params) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentO365Params) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentO365Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_version_info.go b/v1/models/object_snapshot_document_version_info.go deleted file mode 100644 index a79c12f1..00000000 --- a/v1/models/object_snapshot_document_version_info.go +++ /dev/null @@ -1,468 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotDocumentVersionInfo object snapshot document version info -// -// swagger:model ObjectSnapshotDocument_VersionInfo -type ObjectSnapshotDocumentVersionInfo struct { - - // The size of the delta we pulled from source object. For a base - // snapshot, this is equal to logical_size_bytes. For a delta, this is the - // delta size. When a base snapshot is dropped, the next snapshot's delta - // changes to logical_size_bytes. - DeltaSizeBytes *int64 `json:"deltaSizeBytes,omitempty"` - - // Whether System backup was enabled by the user or not. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` - - // Store environment specific extended information (e.g. for recovery). - // This field is not stored in elasticsearch. - ExtendedInfo *AddSnapshotArgExtendedInformation `json:"extendedInfo,omitempty"` - - // Indexing status of this version. - IndexingStatus *int32 `json:"indexingStatus,omitempty"` - - // instance Id - InstanceID *MagnetoInstanceID `json:"instanceId,omitempty"` - - // Whether the snapshot was app consistent (e.g. VM was quiesced). - IsAppConsistent *bool `json:"isAppConsistent,omitempty"` - - // Whether the version is direct archive snapshot. In this case kLocal - // replica should not be searchable. - IsDirectArchiveSnapshot *bool `json:"isDirectArchiveSnapshot,omitempty"` - - // Whether the snapshot is a full backup. - IsFullBackup *bool `json:"isFullBackup,omitempty"` - - // Location of the snapshot dir, relative to the view. This field was not - // present before 2.5 - in that case, the path can be constructed using the - // function: ConstructSnapshotDir. When using in tests, the path will be a - // local path without the viewbox/view mount path. - LocalSnapshotDir *string `json:"localSnapshotDir,omitempty"` - - // logical_size represents the amount of data if snapshot was a base - // snapshot. This is the stat size: ls -l - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // The NAS protocol type(s) if this is a file backup based snapshot. - // Currently we only support a single backup type. In the future we could - // support mixed types of backup, in which case this vector will contain - // all the types that are backed up. - NasBackupTypeVec []int32 `json:"nasBackupTypeVec"` - - // Number of entries indexed in this version. - NumEntriesIndexed *int64 `json:"numEntriesIndexed,omitempty"` - - // Number of partitions not detected/indexed by yoda. - NumUndetectedPartitions *int32 `json:"numUndetectedPartitions,omitempty"` - - // This is the amount of data actually being used on disk that's attributed - // to this snapshot. This is typically not available at the time of - // indexing, but can be updated later. - PhysicalSizeBytes *int64 `json:"physicalSizeBytes,omitempty"` - - // This size if set represents the total amount of space taken up by the - // object on the primary datastore. This is equivalent to the output of du. - // For ex: If a VMDK of size 100GB is created as thin provisioned and the - // actual usage of it is 20GB, then the logical size of this object is - // 100GB and the physical size is 20GB. - PrimaryPhysicalSizeBytes *int64 `json:"primaryPhysicalSizeBytes,omitempty"` - - // record stats - RecordStats *ObjectSnapshotDocumentVersionInfoRecordStats `json:"recordStats,omitempty"` - - // Replica and expiry information for each snapshot. - ReplicaInfo *SnapshotReplicas `json:"replicaInfo,omitempty"` - - // The type of the backup run that was actually scheduled. - ScheduledBackupType *int32 `json:"scheduledBackupType,omitempty"` - - // Whether to skip kLocal replica in search results. - SkipLocalReplicaInSearch *bool `json:"skipLocalReplicaInSearch,omitempty"` - - // Whether indexing is disabled or not in the indexing policy. This will - // cause slave indexing to be disabled. - SlaveIndexingDisabled *bool `json:"slaveIndexingDisabled,omitempty"` - - // Specifies the backup type within the version for the given entity. - // - // This will only be populated for Object based backups where Magneto sends - // jobId as -1. This can be used to differentiate between backup types - // applicable on the same entity for every version. - // - // In OnPrem scenarios, 'backup_type' within each doc should be used - // instead, for differentiation. - SnapshotBackupType *int32 `json:"snapshotBackupType,omitempty"` - - // Micros from epoch when the snapshot was taken. This is expected to be - // the time at which the VM was made quiescent for the purpose of snapshot. - // It need not be the exact time - user identifiable snapshot time. - SnapshotTimestampUsecs *int64 `json:"snapshotTimestampUsecs,omitempty"` - - // Snapshot type of the object. - SnapshotType *int32 `json:"snapshotType,omitempty"` - - // Time taken in indexing this version by slave. This does not include - // time taken in computing volume mapping. - TimeTakenInIndexingUsecs *int64 `json:"timeTakenInIndexingUsecs,omitempty"` - - // uda params - UdaParams *ObjectSnapshotDocumentVersionInfoUdaParams `json:"udaParams,omitempty"` - - // View name where the snapshot is present. - ViewName *string `json:"viewName,omitempty"` - - // Per volume indexing info to be stored. - VolumeInfo []*VolumeIndexingInfo `json:"volumeInfo"` -} - -// Validate validates this object snapshot document version info -func (m *ObjectSnapshotDocumentVersionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExtendedInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecordStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicaInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateExtendedInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedInfo) { // not required - return nil - } - - if m.ExtendedInfo != nil { - if err := m.ExtendedInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateInstanceID(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if m.InstanceID != nil { - if err := m.InstanceID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateRecordStats(formats strfmt.Registry) error { - if swag.IsZero(m.RecordStats) { // not required - return nil - } - - if m.RecordStats != nil { - if err := m.RecordStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recordStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recordStats") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateReplicaInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaInfo) { // not required - return nil - } - - if m.ReplicaInfo != nil { - if err := m.ReplicaInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) validateVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfo); i++ { - if swag.IsZero(m.VolumeInfo[i]) { // not required - continue - } - - if m.VolumeInfo[i] != nil { - if err := m.VolumeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object snapshot document version info based on the context it is used -func (m *ObjectSnapshotDocumentVersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExtendedInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstanceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecordStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicaInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateExtendedInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ExtendedInfo != nil { - - if swag.IsZero(m.ExtendedInfo) { // not required - return nil - } - - if err := m.ExtendedInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateInstanceID(ctx context.Context, formats strfmt.Registry) error { - - if m.InstanceID != nil { - - if swag.IsZero(m.InstanceID) { // not required - return nil - } - - if err := m.InstanceID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceId") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateRecordStats(ctx context.Context, formats strfmt.Registry) error { - - if m.RecordStats != nil { - - if swag.IsZero(m.RecordStats) { // not required - return nil - } - - if err := m.RecordStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recordStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recordStats") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateReplicaInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicaInfo != nil { - - if swag.IsZero(m.ReplicaInfo) { // not required - return nil - } - - if err := m.ReplicaInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotDocumentVersionInfo) contextValidateVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfo); i++ { - - if m.VolumeInfo[i] != nil { - - if swag.IsZero(m.VolumeInfo[i]) { // not required - return nil - } - - if err := m.VolumeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfo) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentVersionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_version_info_record_stats.go b/v1/models/object_snapshot_document_version_info_record_stats.go deleted file mode 100644 index ada8b59d..00000000 --- a/v1/models/object_snapshot_document_version_info_record_stats.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" -) - -// ObjectSnapshotDocumentVersionInfoRecordStats Generic proto to keep a count of mutations of an entities records. -// -// swagger:model ObjectSnapshotDocument_VersionInfo_RecordStats -type ObjectSnapshotDocumentVersionInfoRecordStats struct { - - // deleted - Deleted *int64 `json:"deleted,omitempty"` - - // modified - Modified *int64 `json:"modified,omitempty"` -} - -// Validate validates this object snapshot document version info record stats -func (m *ObjectSnapshotDocumentVersionInfoRecordStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object snapshot document version info record stats based on context it is used -func (m *ObjectSnapshotDocumentVersionInfoRecordStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfoRecordStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfoRecordStats) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentVersionInfoRecordStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_version_info_uda_params.go b/v1/models/object_snapshot_document_version_info_uda_params.go deleted file mode 100644 index 341ddfba..00000000 --- a/v1/models/object_snapshot_document_version_info_uda_params.go +++ /dev/null @@ -1,51 +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" -) - -// ObjectSnapshotDocumentVersionInfoUdaParams Specify UDA specific metadata. -// -// swagger:model ObjectSnapshotDocument_VersionInfo_UdaParams -type ObjectSnapshotDocumentVersionInfoUdaParams struct { - - // Is Entity Support enabled - // If it is enabled for a job dont show job in restore search result. - EntitySupport *bool `json:"entitySupport,omitempty"` -} - -// Validate validates this object snapshot document version info uda params -func (m *ObjectSnapshotDocumentVersionInfoUdaParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object snapshot document version info uda params based on context it is used -func (m *ObjectSnapshotDocumentVersionInfoUdaParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfoUdaParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVersionInfoUdaParams) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentVersionInfoUdaParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_volume_map_version.go b/v1/models/object_snapshot_document_volume_map_version.go deleted file mode 100644 index 5490909f..00000000 --- a/v1/models/object_snapshot_document_volume_map_version.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotDocumentVolumeMapVersion Message to represent vm volume map for each instance id. For optimization -// purpose we keep volume map and repeated magneto instance id if volume map -// is same. -// -// swagger:model ObjectSnapshotDocument_VolumeMapVersion -type ObjectSnapshotDocumentVolumeMapVersion struct { - - // Magneto instance id. - InstanceIDVec []*MagnetoInstanceID `json:"instanceIdVec"` - - // VM volume map information. - VolumeMap *VolumeNameMap `json:"volumeMap,omitempty"` -} - -// Validate validates this object snapshot document volume map version -func (m *ObjectSnapshotDocumentVolumeMapVersion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstanceIDVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMapVersion) validateInstanceIDVec(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceIDVec) { // not required - return nil - } - - for i := 0; i < len(m.InstanceIDVec); i++ { - if swag.IsZero(m.InstanceIDVec[i]) { // not required - continue - } - - if m.InstanceIDVec[i] != nil { - if err := m.InstanceIDVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMapVersion) validateVolumeMap(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeMap) { // not required - return nil - } - - if m.VolumeMap != nil { - if err := m.VolumeMap.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMap") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object snapshot document volume map version based on the context it is used -func (m *ObjectSnapshotDocumentVolumeMapVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstanceIDVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMapVersion) contextValidateInstanceIDVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InstanceIDVec); i++ { - - if m.InstanceIDVec[i] != nil { - - if swag.IsZero(m.InstanceIDVec[i]) { // not required - return nil - } - - if err := m.InstanceIDVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMapVersion) contextValidateVolumeMap(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeMap != nil { - - if swag.IsZero(m.VolumeMap) { // not required - return nil - } - - if err := m.VolumeMap.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMap") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVolumeMapVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVolumeMapVersion) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentVolumeMapVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_document_volume_mount_i_o_info_map_version.go b/v1/models/object_snapshot_document_volume_mount_i_o_info_map_version.go deleted file mode 100644 index 1fc047a2..00000000 --- a/v1/models/object_snapshot_document_volume_mount_i_o_info_map_version.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotDocumentVolumeMountIOInfoMapVersion Message to represent vm volume mount io info map for each instance id. For -// optimization purpose we keep volume mount io info map and repeated magneto -// instance id if volume mount io info map is same. -// -// swagger:model ObjectSnapshotDocument_VolumeMountIOInfoMapVersion -type ObjectSnapshotDocumentVolumeMountIOInfoMapVersion struct { - - // Magneto instance id. - InstanceIDVec []*MagnetoInstanceID `json:"instanceIdVec"` - - // VM volume mount map information. - VolumeMountIoInfoMap *VolumeMappingReportVolumeMountIOInfo `json:"volumeMountIoInfoMap,omitempty"` -} - -// Validate validates this object snapshot document volume mount i o info map version -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstanceIDVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeMountIoInfoMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) validateInstanceIDVec(formats strfmt.Registry) error { - if swag.IsZero(m.InstanceIDVec) { // not required - return nil - } - - for i := 0; i < len(m.InstanceIDVec); i++ { - if swag.IsZero(m.InstanceIDVec[i]) { // not required - continue - } - - if m.InstanceIDVec[i] != nil { - if err := m.InstanceIDVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) validateVolumeMountIoInfoMap(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeMountIoInfoMap) { // not required - return nil - } - - if m.VolumeMountIoInfoMap != nil { - if err := m.VolumeMountIoInfoMap.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountIoInfoMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountIoInfoMap") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object snapshot document volume mount i o info map version based on the context it is used -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstanceIDVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeMountIoInfoMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) contextValidateInstanceIDVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InstanceIDVec); i++ { - - if m.InstanceIDVec[i] != nil { - - if swag.IsZero(m.InstanceIDVec[i]) { // not required - return nil - } - - if err := m.InstanceIDVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instanceIdVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) contextValidateVolumeMountIoInfoMap(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeMountIoInfoMap != nil { - - if swag.IsZero(m.VolumeMountIoInfoMap) { // not required - return nil - } - - if err := m.VolumeMountIoInfoMap.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountIoInfoMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountIoInfoMap") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotDocumentVolumeMountIOInfoMapVersion) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotDocumentVolumeMountIOInfoMapVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_snapshot_info.go b/v1/models/object_snapshot_info.go deleted file mode 100644 index 185f53cf..00000000 --- a/v1/models/object_snapshot_info.go +++ /dev/null @@ -1,315 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotInfo Object Snapshot. -// -// Specifies information about an object that has been backed up. -// -// swagger:model ObjectSnapshotInfo -type ObjectSnapshotInfo struct { - - // Specifies the Cohesity Cluster partition id where this object is stored. - ClusterPartitionID *int64 `json:"clusterPartitionId,omitempty"` - - // Specifies the id for the Protection Job that is currently - // associated with the object. If the object was backed up on - // current Cohesity Cluster, this field contains the id for the Job - // that captured this backup object. - // If the object was backed up on a Primary Cluster and - // replicated to this Cohesity Cluster, a new Inactive Job is created, - // the object is now associated with new Inactive Job, and this field - // contains the id of the new Inactive Job. - JobID *int64 `json:"jobId,omitempty"` - - // 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 primary name of the object. - ObjectName *string `json:"objectName,omitempty"` - - // Specifies the inferred OS type. - OsType *string `json:"osType,omitempty"` - - // Specifies the id of the original root Protection Source tree - // (such as a vCenter Server) that was accessed by the Protection Job - // to capture a backup of this object. - RegisteredSource *ProtectionSource `json:"registeredSource,omitempty"` - - // Specifies the Protection Source that represents the original object being - // backed up. When a root Protection Source is registered, it creates - // a tree of source Protection Source objects. This field defines the - // specific Protection Source leaf object (such as a VM) - // that was backed up. - SnapshottedSource *ProtectionSource `json:"snapshottedSource,omitempty"` - - // Array of Snapshots. - // - // Specifies all snapshot versions of this object. Each time a Job Run - // of a Job executes, it may create a new snapshot version of an object. - // This array stores the different snapshots versions of the object. - Versions []*SnapshotVersion `json:"versions"` - - // Specifies the id of the Domain (View Box) where this - // object is stored. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the View name where this object is stored. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this object snapshot info -func (m *ObjectSnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshottedSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotInfo) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *ObjectSnapshotInfo) validateRegisteredSource(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if m.RegisteredSource != nil { - if err := m.RegisteredSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotInfo) validateSnapshottedSource(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshottedSource) { // not required - return nil - } - - if m.SnapshottedSource != nil { - if err := m.SnapshottedSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshottedSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshottedSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotInfo) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required - return nil - } - - for i := 0; i < len(m.Versions); i++ { - if swag.IsZero(m.Versions[i]) { // not required - continue - } - - if m.Versions[i] != nil { - if err := m.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object snapshot info based on the context it is used -func (m *ObjectSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshottedSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *ObjectSnapshotInfo) contextValidateRegisteredSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredSource != nil { - - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if err := m.RegisteredSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotInfo) contextValidateSnapshottedSource(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshottedSource != nil { - - if swag.IsZero(m.SnapshottedSource) { // not required - return nil - } - - if err := m.SnapshottedSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshottedSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshottedSource") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshotInfo) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Versions); i++ { - - if m.Versions[i] != nil { - - if swag.IsZero(m.Versions[i]) { // not required - return nil - } - - if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotInfo) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_snapshot_type.go b/v1/models/object_snapshot_type.go deleted file mode 100644 index 562ac064..00000000 --- a/v1/models/object_snapshot_type.go +++ /dev/null @@ -1,55 +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" -) - -// ObjectSnapshotType This message captures information about the snapshot type. -// -// swagger:model ObjectSnapshotType -type ObjectSnapshotType struct { - - // This captures any additional message about the snapshot itself, e.g. if - // the app-consistent snapshot had to fallback to crash consistent, this - // will contain that. - Msg *string `json:"msg,omitempty"` - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this object snapshot type -func (m *ObjectSnapshotType) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object snapshot type based on context it is used -func (m *ObjectSnapshotType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotType) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/objects_by_env.go b/v1/models/objects_by_env.go deleted file mode 100644 index e59cfaf3..00000000 --- a/v1/models/objects_by_env.go +++ /dev/null @@ -1,55 +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" -) - -// ObjectsByEnv Objects By Env. -// -// Number of Objects by Type. -// -// swagger:model ObjectsByEnv -type ObjectsByEnv struct { - - // Environment Type. - EnvType *string `json:"envType,omitempty"` - - // Number of Objects. - NumObjects *int32 `json:"numObjects,omitempty"` -} - -// Validate validates this objects by env -func (m *ObjectsByEnv) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this objects by env based on context it is used -func (m *ObjectsByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsByEnv) UnmarshalBinary(b []byte) error { - var res ObjectsByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/objects_discovery_params.go b/v1/models/objects_discovery_params.go deleted file mode 100644 index 3e0cc517..00000000 --- a/v1/models/objects_discovery_params.go +++ /dev/null @@ -1,218 +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" -) - -// ObjectsDiscoveryParams ObjectsDiscoveryParams Office365 Objects Discovery parameters. -// -// Specifies the parameters used for discovering the office 365 objects -// selectively during source registration or refresh. -// -// swagger:model ObjectsDiscoveryParams -type ObjectsDiscoveryParams struct { - - // Specifies the list of object types that will be discovered as part of - // source registration or refresh. - DiscoverableObjectTypeList []string `json:"discoverableObjectTypeList"` - - // Specifies the discovery params for SharePoint site entities. - SitesDiscoveryParams *SitesDiscoveryParams `json:"sitesDiscoveryParams,omitempty"` - - // Specifies the additional params for Team entities. - TeamsAdditionalParams *TeamsAdditionalParams `json:"teamsAdditionalParams,omitempty"` - - // Specifies the discovery params for user(mailbox/onedrive) entities. - UsersDiscoveryParams *UsersDiscoveryParams `json:"usersDiscoveryParams,omitempty"` -} - -// Validate validates this objects discovery params -func (m *ObjectsDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSitesDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsersDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsDiscoveryParams) validateSitesDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.SitesDiscoveryParams) { // not required - return nil - } - - if m.SitesDiscoveryParams != nil { - if err := m.SitesDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitesDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitesDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) validateTeamsAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsAdditionalParams) { // not required - return nil - } - - if m.TeamsAdditionalParams != nil { - if err := m.TeamsAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) validateUsersDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.UsersDiscoveryParams) { // not required - return nil - } - - if m.UsersDiscoveryParams != nil { - if err := m.UsersDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this objects discovery params based on the context it is used -func (m *ObjectsDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSitesDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsersDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateSitesDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SitesDiscoveryParams != nil { - - if swag.IsZero(m.SitesDiscoveryParams) { // not required - return nil - } - - if err := m.SitesDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitesDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitesDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateTeamsAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsAdditionalParams != nil { - - if swag.IsZero(m.TeamsAdditionalParams) { // not required - return nil - } - - if err := m.TeamsAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateUsersDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UsersDiscoveryParams != nil { - - if swag.IsZero(m.UsersDiscoveryParams) { // not required - return nil - } - - if err := m.UsersDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsDiscoveryParams) UnmarshalBinary(b []byte) error { - var res ObjectsDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/objects_protected_by_policy.go b/v1/models/objects_protected_by_policy.go deleted file mode 100644 index 97e0f3e5..00000000 --- a/v1/models/objects_protected_by_policy.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectsProtectedByPolicy Objects Protected By Policy. -// -// Objects (e.g. VMs) protected by Policy. -// -// swagger:model ObjectsProtectedByPolicy -type ObjectsProtectedByPolicy struct { - - // Protected Objects. - ObjectsProtected []*ObjectsByEnv `json:"objectsProtected"` - - // Id of the policy. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy. - PolicyName *string `json:"policyName,omitempty"` -} - -// Validate validates this objects protected by policy -func (m *ObjectsProtectedByPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectsProtected(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsProtectedByPolicy) validateObjectsProtected(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectsProtected) { // not required - return nil - } - - for i := 0; i < len(m.ObjectsProtected); i++ { - if swag.IsZero(m.ObjectsProtected[i]) { // not required - continue - } - - if m.ObjectsProtected[i] != nil { - if err := m.ObjectsProtected[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this objects protected by policy based on the context it is used -func (m *ObjectsProtectedByPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectsProtected(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsProtectedByPolicy) contextValidateObjectsProtected(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectsProtected); i++ { - - if m.ObjectsProtected[i] != nil { - - if swag.IsZero(m.ObjectsProtected[i]) { // not required - return nil - } - - if err := m.ObjectsProtected[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsProtectedByPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsProtectedByPolicy) UnmarshalBinary(b []byte) error { - var res ObjectsProtectedByPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_credentials.go b/v1/models/office365_credentials.go deleted file mode 100644 index 65a8334a..00000000 --- a/v1/models/office365_credentials.go +++ /dev/null @@ -1,72 +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" -) - -// Office365Credentials Office365 Credentials. -// -// Specifies the credentials to authenticate with Office365 account. -// -// swagger:model Office365Credentials -type Office365Credentials struct { - - // Specifies the application ID that the registration portal - // (apps.dev.microsoft.com) assigned. - ClientID *string `json:"clientId,omitempty"` - - // Specifies the application secret that was created in app registration - // portal. - ClientSecret *string `json:"clientSecret,omitempty"` - - // Specifies the application grant type. eg: For client credentials flow, set - // this to "client_credentials"; For refreshing access-token, set this to - // "refresh_token". - GrantType *string `json:"grantType,omitempty"` - - // Specifies a space separated list of scopes/permissions for the user. - // eg: Incase of MS Graph APIs for Office365, scope is set to default: - // https://graph.microsoft.com/.default - Scope *string `json:"scope,omitempty"` - - // This field is deprecated from here and placed in RegisteredSourceInfo - // and ProtectionSourceParameters. - // deprecated: true - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` -} - -// Validate validates this office365 credentials -func (m *Office365Credentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 credentials based on context it is used -func (m *Office365Credentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365Credentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365Credentials) UnmarshalBinary(b []byte) error { - var res Office365Credentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_env_job_parameters.go b/v1/models/office365_env_job_parameters.go deleted file mode 100644 index a91dccd4..00000000 --- a/v1/models/office365_env_job_parameters.go +++ /dev/null @@ -1,164 +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" -) - -// Office365EnvJobParameters Office365 Environment Job Parameters. -// -// Specifies Office365 parameters applicable for all Office365 Environment -// type Protection Sources in a Protection Job. This encapsulates both OneDrive -// & Mailbox parameters. -// -// swagger:model Office365EnvJobParameters -type Office365EnvJobParameters struct { - - // Specifies OneDrive backup parameters. - OnedriveParameters *OneDriveEnvJobParameters `json:"onedriveParameters,omitempty"` - - // Specifies Outlook backup parameters. - OutlookParameters *OutlookEnvJobParameters `json:"outlookParameters,omitempty"` -} - -// Validate validates this office365 env job parameters -func (m *Office365EnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOnedriveParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365EnvJobParameters) validateOnedriveParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OnedriveParameters) { // not required - return nil - } - - if m.OnedriveParameters != nil { - if err := m.OnedriveParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onedriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onedriveParameters") - } - return err - } - } - - return nil -} - -func (m *Office365EnvJobParameters) validateOutlookParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if m.OutlookParameters != nil { - if err := m.OutlookParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 env job parameters based on the context it is used -func (m *Office365EnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOnedriveParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365EnvJobParameters) contextValidateOnedriveParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OnedriveParameters != nil { - - if swag.IsZero(m.OnedriveParameters) { // not required - return nil - } - - if err := m.OnedriveParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onedriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onedriveParameters") - } - return err - } - } - - return nil -} - -func (m *Office365EnvJobParameters) contextValidateOutlookParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookParameters != nil { - - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if err := m.OutlookParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365EnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365EnvJobParameters) UnmarshalBinary(b []byte) error { - var res Office365EnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_group_info.go b/v1/models/office365_group_info.go deleted file mode 100644 index bccafb34..00000000 --- a/v1/models/office365_group_info.go +++ /dev/null @@ -1,64 +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" -) - -// Office365GroupInfo M365 Group Info. -// -// Specifies information about a M365 Group. -// -// swagger:model Office365GroupInfo -type Office365GroupInfo struct { - - // Specifies whether the Group is mail enabled. Mail enabled groups are used - // within Microsoft to distribute messages. - IsMailEnabled *bool `json:"isMailEnabled,omitempty"` - - // Specifies whether the Group is security enabled. Security enabled groups - // are used to grant access permissions to resources in Exchange and Active - // Directory. - IsSecurityEnabled *bool `json:"isSecurityEnabled,omitempty"` - - // Specifies the count of members within the Group. - MemberCount *int64 `json:"memberCount,omitempty"` - - // Specifies the visibility of the Group. - Visibility *string `json:"visibility,omitempty"` -} - -// Validate validates this office365 group info -func (m *Office365GroupInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 group info based on context it is used -func (m *Office365GroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365GroupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365GroupInfo) UnmarshalBinary(b []byte) error { - var res Office365GroupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_protection_source.go b/v1/models/office365_protection_source.go deleted file mode 100644 index 9ed1eac5..00000000 --- a/v1/models/office365_protection_source.go +++ /dev/null @@ -1,385 +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" -) - -// Office365ProtectionSource Office 365 Protection Source. -// -// Specifies a Protection Source in Office 365 environment. -// -// swagger:model Office365ProtectionSource -type Office365ProtectionSource struct { - - // Specifies the map from the Attribute type to its value associated with - // this Office365 entity. - AttributeMap map[string]string `json:"attributeMap,omitempty"` - - // Specifies the description of the Office 365 entity. - Description *string `json:"description,omitempty"` - - // Specifies the information about Office365 group. - GroupInfo *Office365GroupInfo `json:"groupInfo,omitempty"` - - // Specifies the name of the office 365 entity. - Name *string `json:"name,omitempty"` - - // Specifies the SMTP address for the Outlook source. - PrimarySMTPAddress *string `json:"primarySMTPAddress,omitempty"` - - // Specifies the list of the protection source id of the windows physical - // host which will be used during the protection and recovery of the sites - // that belong to an office365 domain. - // This will be used for Exchange Online PST download as well. - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - // Specifies the information about Office365 site. - SiteInfo *Office365SiteInfo `json:"siteInfo,omitempty"` - - // Specifies the information about Office365 team. - TeamInfo *Office365TeamInfo `json:"teamInfo,omitempty"` - - // Specifies the type of the Office 365 entity. - // Enum: ["kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder"] - Type *string `json:"type,omitempty"` - - // Specifies the information about Office365 user regarding its Mailbox & - // OneDrive. This is only present if the entity type is a User. - UserInfo *Office365UserInfo `json:"userInfo,omitempty"` - - // Specifies the UUID of the Office 365 entity. - UUID *string `json:"uuid,omitempty"` - - // URL that displays the site in the browser. This is applicable for - // Sharepoint entity. - WebURL *string `json:"webUrl,omitempty"` -} - -// Validate validates this office365 protection source -func (m *Office365ProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ProtectionSource) validateGroupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.GroupInfo) { // not required - return nil - } - - if m.GroupInfo != nil { - if err := m.GroupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupInfo") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionSource) validateSiteInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SiteInfo) { // not required - return nil - } - - if m.SiteInfo != nil { - if err := m.SiteInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteInfo") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionSource) validateTeamInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TeamInfo) { // not required - return nil - } - - if m.TeamInfo != nil { - if err := m.TeamInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamInfo") - } - return err - } - } - - return nil -} - -var office365ProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365ProtectionSourceTypeTypePropEnum = append(office365ProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // Office365ProtectionSourceTypeKDomain captures enum value "kDomain" - Office365ProtectionSourceTypeKDomain string = "kDomain" - - // Office365ProtectionSourceTypeKOutlook captures enum value "kOutlook" - Office365ProtectionSourceTypeKOutlook string = "kOutlook" - - // Office365ProtectionSourceTypeKMailbox captures enum value "kMailbox" - Office365ProtectionSourceTypeKMailbox string = "kMailbox" - - // Office365ProtectionSourceTypeKUsers captures enum value "kUsers" - Office365ProtectionSourceTypeKUsers string = "kUsers" - - // Office365ProtectionSourceTypeKGroups captures enum value "kGroups" - Office365ProtectionSourceTypeKGroups string = "kGroups" - - // Office365ProtectionSourceTypeKSites captures enum value "kSites" - Office365ProtectionSourceTypeKSites string = "kSites" - - // Office365ProtectionSourceTypeKUser captures enum value "kUser" - Office365ProtectionSourceTypeKUser string = "kUser" - - // Office365ProtectionSourceTypeKGroup captures enum value "kGroup" - Office365ProtectionSourceTypeKGroup string = "kGroup" - - // Office365ProtectionSourceTypeKSite captures enum value "kSite" - Office365ProtectionSourceTypeKSite string = "kSite" - - // Office365ProtectionSourceTypeKApplication captures enum value "kApplication" - Office365ProtectionSourceTypeKApplication string = "kApplication" - - // Office365ProtectionSourceTypeKGraphUser captures enum value "kGraphUser" - Office365ProtectionSourceTypeKGraphUser string = "kGraphUser" - - // Office365ProtectionSourceTypeKPublicFolders captures enum value "kPublicFolders" - Office365ProtectionSourceTypeKPublicFolders string = "kPublicFolders" - - // Office365ProtectionSourceTypeKPublicFolder captures enum value "kPublicFolder" - Office365ProtectionSourceTypeKPublicFolder string = "kPublicFolder" - - // Office365ProtectionSourceTypeKTeams captures enum value "kTeams" - Office365ProtectionSourceTypeKTeams string = "kTeams" - - // Office365ProtectionSourceTypeKTeam captures enum value "kTeam" - Office365ProtectionSourceTypeKTeam string = "kTeam" - - // Office365ProtectionSourceTypeKRootPublicFolder captures enum value "kRootPublicFolder" - Office365ProtectionSourceTypeKRootPublicFolder string = "kRootPublicFolder" -) - -// prop value enum -func (m *Office365ProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365ProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365ProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *Office365ProtectionSource) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 protection source based on the context it is used -func (m *Office365ProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ProtectionSource) contextValidateGroupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupInfo != nil { - - if swag.IsZero(m.GroupInfo) { // not required - return nil - } - - if err := m.GroupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupInfo") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionSource) contextValidateSiteInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteInfo != nil { - - if swag.IsZero(m.SiteInfo) { // not required - return nil - } - - if err := m.SiteInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteInfo") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionSource) contextValidateTeamInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamInfo != nil { - - if swag.IsZero(m.TeamInfo) { // not required - return nil - } - - if err := m.TeamInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamInfo") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionSource) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ProtectionSource) UnmarshalBinary(b []byte) error { - var res Office365ProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_site_info.go b/v1/models/office365_site_info.go deleted file mode 100644 index 761ba3de..00000000 --- a/v1/models/office365_site_info.go +++ /dev/null @@ -1,59 +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" -) - -// Office365SiteInfo Office 365 Site Info. -// -// Specifies information about an Office365 sharepoint Site. -// -// swagger:model Office365SiteInfo -type Office365SiteInfo struct { - - // Specifies if the sharepoint site is associated with a group. - IsGroupSite *bool `json:"isGroupSite,omitempty"` - - // Specifies if the sharepoint site is associated with a private channel - // of some team. - IsPrivateChannelSite *bool `json:"isPrivateChannelSite,omitempty"` - - // Specifies if the sharepoint site is associated with a team. - IsTeamSite *bool `json:"isTeamSite,omitempty"` -} - -// Validate validates this office365 site info -func (m *Office365SiteInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 site info based on context it is used -func (m *Office365SiteInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365SiteInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365SiteInfo) UnmarshalBinary(b []byte) error { - var res Office365SiteInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_team_info.go b/v1/models/office365_team_info.go deleted file mode 100644 index 754e7e63..00000000 --- a/v1/models/office365_team_info.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Office365TeamInfo Office 365 Team Info. -// -// Specifies information about an Office365 Team. -// -// swagger:model Office365TeamInfo -type Office365TeamInfo struct { - - // Specifies the channel count associated with a team. - ChannelCount *int64 `json:"channelCount,omitempty"` - - // Specifies the list of channels associated with a team. - Channels []*M365TeamsChannelInfo `json:"channels"` - - // Specifies the members count associated with a team. - MembersCount *int64 `json:"membersCount,omitempty"` -} - -// Validate validates this office365 team info -func (m *Office365TeamInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChannels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365TeamInfo) validateChannels(formats strfmt.Registry) error { - if swag.IsZero(m.Channels) { // not required - return nil - } - - for i := 0; i < len(m.Channels); i++ { - if swag.IsZero(m.Channels[i]) { // not required - continue - } - - if m.Channels[i] != nil { - if err := m.Channels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this office365 team info based on the context it is used -func (m *Office365TeamInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChannels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365TeamInfo) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Channels); i++ { - - if m.Channels[i] != nil { - - if swag.IsZero(m.Channels[i]) { // not required - return nil - } - - if err := m.Channels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365TeamInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365TeamInfo) UnmarshalBinary(b []byte) error { - var res Office365TeamInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/office365_user_info.go b/v1/models/office365_user_info.go deleted file mode 100644 index 22d49423..00000000 --- a/v1/models/office365_user_info.go +++ /dev/null @@ -1,211 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Office365UserInfo Office 365 User Info. -// -// Specifies information about an Office365 user. -// -// swagger:model Office365UserInfo -type Office365UserInfo struct { - - // Specifies the city in which the Office365 user is located. - City *string `json:"city,omitempty"` - - // Specifies the country/region in which the Office365 user is located. - Country *string `json:"country,omitempty"` - - // Specifies the department within the enterprise of the Office365 user. - Department *string `json:"department,omitempty"` - - // Specifies the designation of the Office365 user. - Designation *string `json:"designation,omitempty"` - - // Specifies the MS Graph UUID for the given user entity. - GraphUUID *string `json:"graphUuid,omitempty"` - - // Specifies the Group entities which hold this user entity as its member. - GroupMembershipInfoList []*GroupMembershipInfo `json:"groupMembershipInfoList"` - - // Specifies whether the Office365 user has a mailbox associated. - IsMailboxEnabled *bool `json:"isMailboxEnabled,omitempty"` - - // Specifies whether the Office365 user has a OneDrive associated. - IsOneDriveEnabled *bool `json:"isOneDriveEnabled,omitempty"` - - // Specifies the size of the Outlook Mailbox associated with this Office365 - // entity. - MailboxSize *int64 `json:"mailboxSize,omitempty"` - - // Specifies the type of mailbox associated - // Specifies the type of user mailbox. - // 'kUserMailbox' indicates that the user has been assigned - // an individual mailbox. - // 'kSharedMailbox' indicates that the user has been assigned a shared mailbox. - // Enum: ["kUserMailbox","kSharedMailbox"] - MailboxType *string `json:"mailboxType,omitempty"` - - // Specifies the Id of the OneDrive associated with the this Office 365 - // entity. - OneDriveID *string `json:"oneDriveId,omitempty"` - - // Specifies the size of the OneDrive associated with this Office365 entity. - OneDriveSize *int64 `json:"oneDriveSize,omitempty"` -} - -// Validate validates this office365 user info -func (m *Office365UserInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupMembershipInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMailboxType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365UserInfo) validateGroupMembershipInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.GroupMembershipInfoList) { // not required - return nil - } - - for i := 0; i < len(m.GroupMembershipInfoList); i++ { - if swag.IsZero(m.GroupMembershipInfoList[i]) { // not required - continue - } - - if m.GroupMembershipInfoList[i] != nil { - if err := m.GroupMembershipInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupMembershipInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupMembershipInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var office365UserInfoTypeMailboxTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUserMailbox","kSharedMailbox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365UserInfoTypeMailboxTypePropEnum = append(office365UserInfoTypeMailboxTypePropEnum, v) - } -} - -const ( - - // Office365UserInfoMailboxTypeKUserMailbox captures enum value "kUserMailbox" - Office365UserInfoMailboxTypeKUserMailbox string = "kUserMailbox" - - // Office365UserInfoMailboxTypeKSharedMailbox captures enum value "kSharedMailbox" - Office365UserInfoMailboxTypeKSharedMailbox string = "kSharedMailbox" -) - -// prop value enum -func (m *Office365UserInfo) validateMailboxTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365UserInfoTypeMailboxTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365UserInfo) validateMailboxType(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxType) { // not required - return nil - } - - // value enum - if err := m.validateMailboxTypeEnum("mailboxType", "body", *m.MailboxType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this office365 user info based on the context it is used -func (m *Office365UserInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupMembershipInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365UserInfo) contextValidateGroupMembershipInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GroupMembershipInfoList); i++ { - - if m.GroupMembershipInfoList[i] != nil { - - if swag.IsZero(m.GroupMembershipInfoList[i]) { // not required - return nil - } - - if err := m.GroupMembershipInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupMembershipInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupMembershipInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365UserInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365UserInfo) UnmarshalBinary(b []byte) error { - var res Office365UserInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/old_syslog_server.go b/v1/models/old_syslog_server.go deleted file mode 100644 index 34eb5f3a..00000000 --- a/v1/models/old_syslog_server.go +++ /dev/null @@ -1,140 +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" -) - -// OldSyslogServer Data definition related to Syslog Server configuration. -// Refer cluster_config.proto: ClusterConfigProto.TopicToRemoteLogServersMap -// Syslog Server Configuration. -// -// Specifies the syslog servers configuration to upload Cluster -// audit logs and filer audit logs. -// -// swagger:model OldSyslogServer -type OldSyslogServer struct { - - // Specifies the IP address or hostname of the syslog server. - // Required: true - Address *string `json:"address"` - - // Specifies if cohesity alert should be sent to syslog server - // If 'true', alert audting message are sent to the server. - // If 'false', alert auditng message are not sent to the server.(default) - IsAlertAuditingEnabled *bool `json:"isAlertAuditingEnabled,omitempty"` - - // Specifies if Cluster audit logs should be sent to this syslog server. - // If 'true', Cluster audit logs are sent to the syslog server. (default) - // If 'false', Cluster audit logs are not sent to the syslog server. - // Either cluster audit logs or filer audit logs should be enabled. - IsClusterAuditingEnabled *bool `json:"isClusterAuditingEnabled,omitempty"` - - // Specifies if dataprotection logs should be sent to syslog server - // If 'true', dataprotection logs are sent to the server. - // If 'false', dataprotection logs are not sent to the server.(default) - IsDataProtectionEnabled *bool `json:"isDataProtectionEnabled,omitempty"` - - // Specifies if filer audit logs should be sent to this syslog server. - // If 'true', filer audit logs are sent to the syslog server. (default) - // If 'false', filer audit logs are not sent to the syslog server. - // Either cluster audit logs or filer audit logs should be enabled. - IsFilerAuditingEnabled *bool `json:"isFilerAuditingEnabled,omitempty"` - - // Specifies if ssh login logs should be sent to syslog server - // If 'true', ssh login logs are sent to the server. - // If 'false', ssh login logs are not sent to the server.(default) - IsSSHLogEnabled *bool `json:"isSshLogEnabled,omitempty"` - - // Specifies a unique name for the syslog server on the Cluster. - Name *string `json:"name,omitempty"` - - // Specifies the port where the syslog server listens. - // Required: true - Port *int32 `json:"port"` - - // Specifies the protocol used to send the logs. - // Required: true - Protocol *int32 `json:"protocol"` -} - -// Validate validates this old syslog server -func (m *OldSyslogServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OldSyslogServer) validateAddress(formats strfmt.Registry) error { - - if err := validate.Required("address", "body", m.Address); err != nil { - return err - } - - return nil -} - -func (m *OldSyslogServer) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", m.Port); err != nil { - return err - } - - return nil -} - -func (m *OldSyslogServer) validateProtocol(formats strfmt.Registry) error { - - if err := validate.Required("protocol", "body", m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this old syslog server based on context it is used -func (m *OldSyslogServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OldSyslogServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OldSyslogServer) UnmarshalBinary(b []byte) error { - var res OldSyslogServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/on_prem_deploy_target.go b/v1/models/on_prem_deploy_target.go deleted file mode 100644 index 5cdc4cba..00000000 --- a/v1/models/on_prem_deploy_target.go +++ /dev/null @@ -1,165 +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" -) - -// OnPremDeployTarget Message that specifies the details about OnPremDeploy target where backup -// snapshots may be converted and deployed. -// -// swagger:model OnPremDeployTarget -type OnPremDeployTarget struct { - - // Contains information needed to identify various resources when deploying - // VMs to OnPrem sources like VMware. - DeployVmsToOnpremParams *DeployVMsToOnPremParams `json:"deployVmsToOnpremParams,omitempty"` - - // Entity corresponding to the onprem deploy target. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // The type of the OnPremDeploy target. Only VMware is supported for now. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this on prem deploy target -func (m *OnPremDeployTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployVmsToOnpremParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTarget) validateDeployVmsToOnpremParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToOnpremParams) { // not required - return nil - } - - if m.DeployVmsToOnpremParams != nil { - if err := m.DeployVmsToOnpremParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToOnpremParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToOnpremParams") - } - return err - } - } - - return nil -} - -func (m *OnPremDeployTarget) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this on prem deploy target based on the context it is used -func (m *OnPremDeployTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployVmsToOnpremParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTarget) contextValidateDeployVmsToOnpremParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToOnpremParams != nil { - - if swag.IsZero(m.DeployVmsToOnpremParams) { // not required - return nil - } - - if err := m.DeployVmsToOnpremParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToOnpremParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToOnpremParams") - } - return err - } - } - - return nil -} - -func (m *OnPremDeployTarget) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremDeployTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremDeployTarget) UnmarshalBinary(b []byte) error { - var res OnPremDeployTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/on_prem_deploy_task_state_proto.go b/v1/models/on_prem_deploy_task_state_proto.go deleted file mode 100644 index 762d97e6..00000000 --- a/v1/models/on_prem_deploy_task_state_proto.go +++ /dev/null @@ -1,118 +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" -) - -// OnPremDeployTaskStateProto Contains state for an onprem deploy task. -// -// swagger:model OnPremDeployTaskStateProto -type OnPremDeployTaskStateProto struct { - - // Contains updates and information about the onprem deploy task. - RestoreInfo *RestoreInfoProto `json:"restoreInfo,omitempty"` - - // The scheduled constituent id of this task. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // The scheduled gandalf session id of this task. - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // A unique id assigned by the master for this task. - TaskID *int64 `json:"taskId,omitempty"` -} - -// Validate validates this on prem deploy task state proto -func (m *OnPremDeployTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTaskStateProto) validateRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if m.RestoreInfo != nil { - if err := m.RestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this on prem deploy task state proto based on the context it is used -func (m *OnPremDeployTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTaskStateProto) contextValidateRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreInfo != nil { - - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if err := m.RestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremDeployTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremDeployTaskStateProto) UnmarshalBinary(b []byte) error { - var res OnPremDeployTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_backup_env_params.go b/v1/models/one_drive_backup_env_params.go deleted file mode 100644 index 150988b0..00000000 --- a/v1/models/one_drive_backup_env_params.go +++ /dev/null @@ -1,222 +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" -) - -// OneDriveBackupEnvParams Onedrive Backup Environment Parameters. -// -// Message to capture any additonal backup params for OneDrive within the -// Office365 environment. -// -// swagger:model OneDriveBackupEnvParams -type OneDriveBackupEnvParams struct { - - // Specifies attribute filter policy to support inclusion/exclusions of - // entities. - AttrFilterPolicy *AttributeFilterPolicy `json:"attrFilterPolicy,omitempty"` - - // The filtering policy describes which objects within a source should be - // excluded within the backup. If this is not specified, then all of the - // objects within the source will be backed up. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // Specifies the parameters for backing up Preservation Hold Library. - // Refer PreservationHoldLibraryProtectionParams for details. - PhlParams *PreservationHoldLibraryProtectionParams `json:"phlParams,omitempty"` - - // Specifies whether the OneDrive(s) for all the Office365 Users present in - // the protection job should be backed up. - ShouldBackupOnedrive *bool `json:"shouldBackupOnedrive,omitempty"` -} - -// Validate validates this one drive backup env params -func (m *OneDriveBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttrFilterPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhlParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveBackupEnvParams) validateAttrFilterPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AttrFilterPolicy) { // not required - return nil - } - - if m.AttrFilterPolicy != nil { - if err := m.AttrFilterPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *OneDriveBackupEnvParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *OneDriveBackupEnvParams) validatePhlParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhlParams) { // not required - return nil - } - - if m.PhlParams != nil { - if err := m.PhlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("phlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("phlParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this one drive backup env params based on the context it is used -func (m *OneDriveBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttrFilterPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveBackupEnvParams) contextValidateAttrFilterPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AttrFilterPolicy != nil { - - if swag.IsZero(m.AttrFilterPolicy) { // not required - return nil - } - - if err := m.AttrFilterPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *OneDriveBackupEnvParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -func (m *OneDriveBackupEnvParams) contextValidatePhlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhlParams != nil { - - if swag.IsZero(m.PhlParams) { // not required - return nil - } - - if err := m.PhlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("phlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("phlParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveBackupEnvParams) UnmarshalBinary(b []byte) error { - var res OneDriveBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_document_metadata.go b/v1/models/one_drive_document_metadata.go deleted file mode 100644 index aa55c23c..00000000 --- a/v1/models/one_drive_document_metadata.go +++ /dev/null @@ -1,111 +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" -) - -// OneDriveDocumentMetadata OneDrive document metadata. -// -// Specifies the metadata for the OneDrive document. -// -// swagger:model OneDriveDocumentMetadata -type OneDriveDocumentMetadata struct { - - // Specifies the type of OneDrive document(file/folder). - // Specifies the OneDrive document type. - // - // 'kFile' specifies a file. - // 'kFolder' specifies a folder. - // Enum: ["kFile","kFolder"] - DocumentType *string `json:"documentType,omitempty"` -} - -// Validate validates this one drive document metadata -func (m *OneDriveDocumentMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oneDriveDocumentMetadataTypeDocumentTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oneDriveDocumentMetadataTypeDocumentTypePropEnum = append(oneDriveDocumentMetadataTypeDocumentTypePropEnum, v) - } -} - -const ( - - // OneDriveDocumentMetadataDocumentTypeKFile captures enum value "kFile" - OneDriveDocumentMetadataDocumentTypeKFile string = "kFile" - - // OneDriveDocumentMetadataDocumentTypeKFolder captures enum value "kFolder" - OneDriveDocumentMetadataDocumentTypeKFolder string = "kFolder" -) - -// prop value enum -func (m *OneDriveDocumentMetadata) validateDocumentTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oneDriveDocumentMetadataTypeDocumentTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OneDriveDocumentMetadata) validateDocumentType(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentType) { // not required - return nil - } - - // value enum - if err := m.validateDocumentTypeEnum("documentType", "body", *m.DocumentType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this one drive document metadata based on context it is used -func (m *OneDriveDocumentMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveDocumentMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveDocumentMetadata) UnmarshalBinary(b []byte) error { - var res OneDriveDocumentMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_env_job_parameters.go b/v1/models/one_drive_env_job_parameters.go deleted file mode 100644 index 5e054cc8..00000000 --- a/v1/models/one_drive_env_job_parameters.go +++ /dev/null @@ -1,118 +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" -) - -// OneDriveEnvJobParameters OneDrive Environment Job Parameters. -// -// Specifies OneDrive job parameters applicable for all Office365 Environment -// type Protection Sources in a Protection Job. -// -// swagger:model OneDriveEnvJobParameters -type OneDriveEnvJobParameters struct { - - // The filtering policy describes which paths within the onedrive should be - // excluded within the backup. If this is not specified, then the entire - // onedrive will be backed up. - FilePathFilter *FilePathFilter `json:"filePathFilter,omitempty"` - - // Specifies whether OneDrive(s) of each Office365 Users/Groups within the - // job, should be backed up or not. - ShouldBackupOnedrive *bool `json:"shouldBackupOnedrive,omitempty"` -} - -// Validate validates this one drive env job parameters -func (m *OneDriveEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePathFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveEnvJobParameters) validateFilePathFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if m.FilePathFilter != nil { - if err := m.FilePathFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this one drive env job parameters based on the context it is used -func (m *OneDriveEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilePathFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveEnvJobParameters) contextValidateFilePathFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePathFilter != nil { - - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if err := m.FilePathFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveEnvJobParameters) UnmarshalBinary(b []byte) error { - var res OneDriveEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_info.go b/v1/models/one_drive_info.go deleted file mode 100644 index a4ea95b7..00000000 --- a/v1/models/one_drive_info.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OneDriveInfo OneDrive Information. -// -// Specifies OneDrive details with the items which need to be restored. -// -// swagger:model OneDriveInfo -type OneDriveInfo struct { - - // Specifies the Id of the Drive. - DriveID *string `json:"driveId,omitempty"` - - // Specifies the Drive items such as files/folders. - DriveItemList []*OneDriveItem `json:"driveItemList"` - - // Specifies whether entire drive is to be restored. This should be set to - // false if specific drive items are to be restored within 'DriveItemList'. - RestoreEntireDrive *bool `json:"restoreEntireDrive,omitempty"` -} - -// Validate validates this one drive info -func (m *OneDriveInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveItemList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveInfo) validateDriveItemList(formats strfmt.Registry) error { - if swag.IsZero(m.DriveItemList) { // not required - return nil - } - - for i := 0; i < len(m.DriveItemList); i++ { - if swag.IsZero(m.DriveItemList[i]) { // not required - continue - } - - if m.DriveItemList[i] != nil { - if err := m.DriveItemList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this one drive info based on the context it is used -func (m *OneDriveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveItemList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveInfo) contextValidateDriveItemList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveItemList); i++ { - - if m.DriveItemList[i] != nil { - - if swag.IsZero(m.DriveItemList[i]) { // not required - return nil - } - - if err := m.DriveItemList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveInfo) UnmarshalBinary(b []byte) error { - var res OneDriveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_item.go b/v1/models/one_drive_item.go deleted file mode 100644 index d7a4e337..00000000 --- a/v1/models/one_drive_item.go +++ /dev/null @@ -1,58 +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" -) - -// OneDriveItem OneDrive Item. -// -// Specifies the details about OneDrive file/folder. -// -// swagger:model OneDriveItem -type OneDriveItem struct { - - // Specifies whether the current item is a file or not. - IsFileItem *bool `json:"isFileItem,omitempty"` - - // Specifies the Id of the Drive item. - ItemID *string `json:"itemId,omitempty"` - - // Specifies the path of the Drive item within the drive. - ItemPath *string `json:"itemPath,omitempty"` -} - -// Validate validates this one drive item -func (m *OneDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this one drive item based on context it is used -func (m *OneDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveItem) UnmarshalBinary(b []byte) error { - var res OneDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_owner.go b/v1/models/one_drive_owner.go deleted file mode 100644 index 53dada7f..00000000 --- a/v1/models/one_drive_owner.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OneDriveOwner OneDrive Owner. -// -// Specifies OneDrive owner details. -// -// swagger:model OneDriveOwner -type OneDriveOwner struct { - - // Specifies the Drives that a user owns which are to be restored. - DriveInfoList []*OneDriveInfo `json:"driveInfoList"` - - // Specifies the details about the Office365 user who owns the drive. - UserDetailObject *RestoreObjectDetails `json:"userDetailObject,omitempty"` -} - -// Validate validates this one drive owner -func (m *OneDriveOwner) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserDetailObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveOwner) validateDriveInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DriveInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DriveInfoList); i++ { - if swag.IsZero(m.DriveInfoList[i]) { // not required - continue - } - - if m.DriveInfoList[i] != nil { - if err := m.DriveInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OneDriveOwner) validateUserDetailObject(formats strfmt.Registry) error { - if swag.IsZero(m.UserDetailObject) { // not required - return nil - } - - if m.UserDetailObject != nil { - if err := m.UserDetailObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userDetailObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userDetailObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this one drive owner based on the context it is used -func (m *OneDriveOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserDetailObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveOwner) contextValidateDriveInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveInfoList); i++ { - - if m.DriveInfoList[i] != nil { - - if swag.IsZero(m.DriveInfoList[i]) { // not required - return nil - } - - if err := m.DriveInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OneDriveOwner) contextValidateUserDetailObject(ctx context.Context, formats strfmt.Registry) error { - - if m.UserDetailObject != nil { - - if swag.IsZero(m.UserDetailObject) { // not required - return nil - } - - if err := m.UserDetailObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userDetailObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userDetailObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveOwner) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveOwner) UnmarshalBinary(b []byte) error { - var res OneDriveOwner - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/one_drive_restore_parameters.go b/v1/models/one_drive_restore_parameters.go deleted file mode 100644 index 3d7898ca..00000000 --- a/v1/models/one_drive_restore_parameters.go +++ /dev/null @@ -1,187 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OneDriveRestoreParameters OneDrive Restore Parameters. -// -// Specifies information needed for recovering Drive(s) & Drive items. -// -// swagger:model OneDriveRestoreParameters -type OneDriveRestoreParameters struct { - - // Specifies the list of Drive owners which are to be restored along with the - // details of their drives. - DriveOwnerList []*OneDriveOwner `json:"driveOwnerList"` - - // Specifies whether the objects are to be restored to the original drive. - RestoreToOriginalDrive *bool `json:"restoreToOriginalDrive,omitempty"` - - // Specifies the Drive Id of the target user where the OneDrive items are to - // be recovered. - TargetDriveID *string `json:"targetDriveId,omitempty"` - - // Specifies the target folder path within the drive where recovery has to be - // done. - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // Specifies the target user where the recovery of the entire OneDrive or the - // OneDrive items is to be done. - TargetUser *ProtectionSource `json:"targetUser,omitempty"` -} - -// Validate validates this one drive restore parameters -func (m *OneDriveRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveOwnerList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveRestoreParameters) validateDriveOwnerList(formats strfmt.Registry) error { - if swag.IsZero(m.DriveOwnerList) { // not required - return nil - } - - for i := 0; i < len(m.DriveOwnerList); i++ { - if swag.IsZero(m.DriveOwnerList[i]) { // not required - continue - } - - if m.DriveOwnerList[i] != nil { - if err := m.DriveOwnerList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveOwnerList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveOwnerList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OneDriveRestoreParameters) validateTargetUser(formats strfmt.Registry) error { - if swag.IsZero(m.TargetUser) { // not required - return nil - } - - if m.TargetUser != nil { - if err := m.TargetUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetUser") - } - return err - } - } - - return nil -} - -// ContextValidate validate this one drive restore parameters based on the context it is used -func (m *OneDriveRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveOwnerList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveRestoreParameters) contextValidateDriveOwnerList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveOwnerList); i++ { - - if m.DriveOwnerList[i] != nil { - - if swag.IsZero(m.DriveOwnerList[i]) { // not required - return nil - } - - if err := m.DriveOwnerList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveOwnerList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveOwnerList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OneDriveRestoreParameters) contextValidateTargetUser(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetUser != nil { - - if swag.IsZero(m.TargetUser) { // not required - return nil - } - - if err := m.TargetUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetUser") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveRestoreParameters) UnmarshalBinary(b []byte) error { - var res OneDriveRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_app_params.go b/v1/models/oracle_app_params.go deleted file mode 100644 index e21e5f50..00000000 --- a/v1/models/oracle_app_params.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleAppParams Oracle App Params. -// -// Specifies special settings applicable for a app entity i.e -// database/dataguard. -// -// swagger:model OracleAppParams -type OracleAppParams struct { - - // Specifies the source entity id of the selected app entity. - DatabaseAppID *int64 `json:"databaseAppId,omitempty"` - - // Array of database node channel info. - // - // Specifies the node channel info for all the databases of app entity. - // Length of this array will be 1 for RAC and Standalone setups. - NodeChannelList []*OracleDatabaseNodeChannel `json:"nodeChannelList"` -} - -// Validate validates this oracle app params -func (m *OracleAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeChannelList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleAppParams) validateNodeChannelList(formats strfmt.Registry) error { - if swag.IsZero(m.NodeChannelList) { // not required - return nil - } - - for i := 0; i < len(m.NodeChannelList); i++ { - if swag.IsZero(m.NodeChannelList[i]) { // not required - continue - } - - if m.NodeChannelList[i] != nil { - if err := m.NodeChannelList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeChannelList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeChannelList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle app params based on the context it is used -func (m *OracleAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeChannelList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleAppParams) contextValidateNodeChannelList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeChannelList); i++ { - - if m.NodeChannelList[i] != nil { - - if swag.IsZero(m.NodeChannelList[i]) { // not required - return nil - } - - if err := m.NodeChannelList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeChannelList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeChannelList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleAppParams) UnmarshalBinary(b []byte) error { - var res OracleAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_archive_log_info.go b/v1/models/oracle_archive_log_info.go deleted file mode 100644 index 6faca9e0..00000000 --- a/v1/models/oracle_archive_log_info.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleArchiveLogInfo Proto to hold archive logs related information. -// -// swagger:model OracleArchiveLogInfo -type OracleArchiveLogInfo struct { - - // Specifies the range in either SCN, sequence number or time for - // which archive logs are to be restored or for which archive logs - // is to be shown on the slider. - // In case of restore we only support 1 range i.e vector size will - // be 1. - OracleArchiveLogRangeVec []*OracleArchiveLogInfoOracleArchiveLogRange `json:"oracleArchiveLogRangeVec"` - - // Destination where we need to restore archive logs. Used only when - // trigerring archive log restore. This field is left empty while - // returning ranges to the sliders. - OracleArchiveLogRestoreDest *string `json:"oracleArchiveLogRestoreDest,omitempty"` -} - -// Validate validates this oracle archive log info -func (m *OracleArchiveLogInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOracleArchiveLogRangeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfo) validateOracleArchiveLogRangeVec(formats strfmt.Registry) error { - if swag.IsZero(m.OracleArchiveLogRangeVec) { // not required - return nil - } - - for i := 0; i < len(m.OracleArchiveLogRangeVec); i++ { - if swag.IsZero(m.OracleArchiveLogRangeVec[i]) { // not required - continue - } - - if m.OracleArchiveLogRangeVec[i] != nil { - if err := m.OracleArchiveLogRangeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle archive log info based on the context it is used -func (m *OracleArchiveLogInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleArchiveLogRangeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfo) contextValidateOracleArchiveLogRangeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OracleArchiveLogRangeVec); i++ { - - if m.OracleArchiveLogRangeVec[i] != nil { - - if swag.IsZero(m.OracleArchiveLogRangeVec[i]) { // not required - return nil - } - - if err := m.OracleArchiveLogRangeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleArchiveLogInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchiveLogInfo) UnmarshalBinary(b []byte) error { - var res OracleArchiveLogInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_archive_log_info_oracle_archive_log_range.go b/v1/models/oracle_archive_log_info_oracle_archive_log_range.go deleted file mode 100644 index e2107334..00000000 --- a/v1/models/oracle_archive_log_info_oracle_archive_log_range.go +++ /dev/null @@ -1,121 +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" -) - -// OracleArchiveLogInfoOracleArchiveLogRange oracle archive log info oracle archive log range -// -// swagger:model OracleArchiveLogInfo_OracleArchiveLogRange -type OracleArchiveLogInfoOracleArchiveLogRange struct { - - // attributes - Attributes *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes `json:"attributes,omitempty"` - - // End value of the range - EndOfRange *int64 `json:"endOfRange,omitempty"` - - // Type of range provided. - RangeType *int32 `json:"rangeType,omitempty"` - - // Start value of the range - // In case of time we store it as unix epoch format which - // can be easily stored in int64. Use www.epochconverter.com - // to convert to human readable date. - StartOfRange *int64 `json:"startOfRange,omitempty"` -} - -// Validate validates this oracle archive log info oracle archive log range -func (m *OracleArchiveLogInfoOracleArchiveLogRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfoOracleArchiveLogRange) validateAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.Attributes) { // not required - return nil - } - - if m.Attributes != nil { - if err := m.Attributes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle archive log info oracle archive log range based on the context it is used -func (m *OracleArchiveLogInfoOracleArchiveLogRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfoOracleArchiveLogRange) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { - - if m.Attributes != nil { - - if swag.IsZero(m.Attributes) { // not required - return nil - } - - if err := m.Attributes.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleArchiveLogInfoOracleArchiveLogRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchiveLogInfoOracleArchiveLogRange) UnmarshalBinary(b []byte) error { - var res OracleArchiveLogInfoOracleArchiveLogRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_archive_log_info_oracle_archive_log_range_range_attributes.go b/v1/models/oracle_archive_log_info_oracle_archive_log_range_range_attributes.go deleted file mode 100644 index 79ad4b82..00000000 --- a/v1/models/oracle_archive_log_info_oracle_archive_log_range_range_attributes.go +++ /dev/null @@ -1,123 +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" -) - -// OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes Attributes related to each range. This is only used when we sending -// valid ranges to iris to fill the slider. While triggering restore -// this field can be skipped. -// -// swagger:model OracleArchiveLogInfo_OracleArchiveLogRange_RangeAttributes -type OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes struct { - - // Incarnation id associated with the range - // Only applicable for SCN and sequence type. - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // jobs ID from which the snapshots were taken. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // Resetlogs identifier associated with the range. - // Only applicable for SCN and sequence type. - ResetLogsID *int64 `json:"resetLogsId,omitempty"` - - // Thread id associated with the range. - // Only applicable for sequence type. - ThreadID *int64 `json:"threadId,omitempty"` -} - -// Validate validates this oracle archive log info oracle archive log range range attributes -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this oracle archive log info oracle archive log range range attributes based on the context it is used -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) 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 -} - -// MarshalBinary interface implementation -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes) UnmarshalBinary(b []byte) error { - var res OracleArchiveLogInfoOracleArchiveLogRangeRangeAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_backup_job_params.go b/v1/models/oracle_backup_job_params.go deleted file mode 100644 index 78fdfb42..00000000 --- a/v1/models/oracle_backup_job_params.go +++ /dev/null @@ -1,135 +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" -) - -// OracleBackupJobParams Oracle Backup Enviroment Parameters. -// -// Message to capture any additional backup params specific to Oracle. -// -// swagger:model OracleBackupJobParams -type OracleBackupJobParams struct { - - // Time in seconds after which the full backup of the database in given - // backup job should be auto-killed. - // If set to -1, then the backup will run until completion. - FullAutoKillTimeoutSecs *int64 `json:"fullAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the incremental backup of the database in - // given backup job should be auto-killed. - // If set to -1, then the backup will run until completion. - IncrAutoKillTimeoutSecs *int64 `json:"incrAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the log backup of the database in given backup - // job should be auto-killed. - // If set to -1, then the backup will run until completion. - LogAutoKillTimeoutSecs *int64 `json:"logAutoKillTimeoutSecs,omitempty"` - - // Indicates whether the mountpoints created while backing up Oracle DBs - // should be persisted. If this is set to 'false' all Oracle views mounted to - // the hosts will be unmounted at the end. - // Note: This parameter is for the entire Job. For overriding persistence of - // mountpoints for a subset of Oracle hosts within the job, - // refer OracleSourceParams. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` - - // Indicates the vlan preference that is selected by the user for doing - // backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this oracle backup job params -func (m *OracleBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleBackupJobParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle backup job params based on the context it is used -func (m *OracleBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleBackupJobParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleBackupJobParams) UnmarshalBinary(b []byte) error { - var res OracleBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_backup_params.go b/v1/models/oracle_backup_params.go deleted file mode 100644 index a371fb13..00000000 --- a/v1/models/oracle_backup_params.go +++ /dev/null @@ -1,54 +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" -) - -// OracleBackupParams This message contains additional params for an Oracle backup job run. -// -// swagger:model OracleBackupParams -type OracleBackupParams struct { - - // If set to true, log backups allowed during Full/Incr backup as per the - // policy. - ParallelLogBackupEnabled *bool `json:"parallelLogBackupEnabled,omitempty"` - - // If set to true, parallel backups/restores/clones are enabled on same host. - ParallelOpEnabled *bool `json:"parallelOpEnabled,omitempty"` -} - -// Validate validates this oracle backup params -func (m *OracleBackupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle backup params based on context it is used -func (m *OracleBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleBackupParams) UnmarshalBinary(b []byte) error { - var res OracleBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_cloud_credentials.go b/v1/models/oracle_cloud_credentials.go deleted file mode 100644 index a9783170..00000000 --- a/v1/models/oracle_cloud_credentials.go +++ /dev/null @@ -1,132 +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" -) - -// OracleCloudCredentials Oracle Cloud Credentials. -// -// Specifies the Oracle Cloud Credentials to connect to an Oracle S3 Compatible -// vault account. -// -// Oracle Cloud Credentials Region, Access-Key-Id and Secret-Access-Key. -// Oracle Cloud properties Tenant and Tier Type. -// -// swagger:model OracleCloudCredentials -type OracleCloudCredentials struct { - - // Specifies access key to connect to Oracle S3 Compatible vault account. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // Specifies the region for Oracle S3 Compatible vault account. - Region *string `json:"region,omitempty"` - - // Specifies the secret access key for Oracle S3 Compatible vault account. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specifies the tenant which is part of the REST endpoints for Oracle S3 - // compatible vaults. - Tenant *string `json:"tenant,omitempty"` - - // Specifies the storage class of Oracle vault. - // OracleTierType specifies the storage class for Oracle. - // 'kOracleTierStandard' indicates a tier type of Oracle properties that - // requires fast, immediate and frequent access. - // 'kOracleTierArchive' indicates a tier type of Oracle properties that is - // rarely accesed and preserved for long times. - // Enum: ["kOracleTierStandard","kOracleTierArchive"] - TierType *string `json:"tierType,omitempty"` - - // Specifies the list of all tiers for Amazon account. - Tiers []string `json:"tiers"` -} - -// Validate validates this oracle cloud credentials -func (m *OracleCloudCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleCloudCredentialsTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleCloudCredentialsTypeTierTypePropEnum = append(oracleCloudCredentialsTypeTierTypePropEnum, v) - } -} - -const ( - - // OracleCloudCredentialsTierTypeKOracleTierStandard captures enum value "kOracleTierStandard" - OracleCloudCredentialsTierTypeKOracleTierStandard string = "kOracleTierStandard" - - // OracleCloudCredentialsTierTypeKOracleTierArchive captures enum value "kOracleTierArchive" - OracleCloudCredentialsTierTypeKOracleTierArchive string = "kOracleTierArchive" -) - -// prop value enum -func (m *OracleCloudCredentials) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleCloudCredentialsTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleCloudCredentials) validateTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TierType) { // not required - return nil - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle cloud credentials based on context it is used -func (m *OracleCloudCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleCloudCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleCloudCredentials) UnmarshalBinary(b []byte) error { - var res OracleCloudCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_container_database_info.go b/v1/models/oracle_container_database_info.go deleted file mode 100644 index a50ab5f5..00000000 --- a/v1/models/oracle_container_database_info.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleContainerDatabaseInfo Specifies the Container Database information along with the Pluggable DBs -// within the container. -// The multitenant architecture enables an Oracle database to function as a -// multitenant container database (CDB). A CDB includes zero, one, or many -// customer-created pluggable databases (PDBs). -// -// swagger:model OracleContainerDatabaseInfo -type OracleContainerDatabaseInfo struct { - - // Specifies the list of Pluggable databases within this Container Database. - PluggableDatabaseInfoList []*OraclePluggableDatabaseInfo `json:"pluggableDatabaseInfoList"` -} - -// Validate validates this oracle container database info -func (m *OracleContainerDatabaseInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePluggableDatabaseInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleContainerDatabaseInfo) validatePluggableDatabaseInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.PluggableDatabaseInfoList) { // not required - return nil - } - - for i := 0; i < len(m.PluggableDatabaseInfoList); i++ { - if swag.IsZero(m.PluggableDatabaseInfoList[i]) { // not required - continue - } - - if m.PluggableDatabaseInfoList[i] != nil { - if err := m.PluggableDatabaseInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluggableDatabaseInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pluggableDatabaseInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle container database info based on the context it is used -func (m *OracleContainerDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePluggableDatabaseInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleContainerDatabaseInfo) contextValidatePluggableDatabaseInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PluggableDatabaseInfoList); i++ { - - if m.PluggableDatabaseInfoList[i] != nil { - - if swag.IsZero(m.PluggableDatabaseInfoList[i]) { // not required - return nil - } - - if err := m.PluggableDatabaseInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluggableDatabaseInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pluggableDatabaseInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleContainerDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleContainerDatabaseInfo) UnmarshalBinary(b []byte) error { - var res OracleContainerDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_d_b_channel_info.go b/v1/models/oracle_d_b_channel_info.go deleted file mode 100644 index 86312d1a..00000000 --- a/v1/models/oracle_d_b_channel_info.go +++ /dev/null @@ -1,224 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleDBChannelInfo Message to contain backup or restore parameters for a unique Oracle -// database. The Oracle database unique name is used to determine uniqueness -// of the database. -// -// Note: The name of this proto message is out-dated. This proto can represent -// more than just the database channel information. It should be renamed -// in the future. -// -// swagger:model OracleDBChannelInfo -type OracleDBChannelInfo struct { - - // Archived log deletion policy for this unique Oracle database. - // 1: keep archived log forever - // 0: delete archived log immediately - // n>0: delete archived log after n days - ArchivelogKeepDays *int32 `json:"archivelogKeepDays,omitempty"` - - // Archived log deletion policy for Oracle database. - // 1: if hours value is not specified - // 0: delete archived log immediately - // k>0: delete archived log after k hours - ArchivelogKeepHours *int32 `json:"archivelogKeepHours,omitempty"` - - // The credentials to be used for this database. - Credentials *Credentials `json:"credentials,omitempty"` - - // The unique name of the database. - DbUniqueName *string `json:"dbUniqueName,omitempty"` - - // Database id, internal field, is filled by magneto master based on - // corresponding app entity id. - DbUUID *string `json:"dbUuid,omitempty"` - - // If set to false, and if the DG database role is primary, we will not allow - // the backup of that database. - EnableDgPrimaryBackup *bool `json:"enableDgPrimaryBackup,omitempty"` - - // Vector of Oracle hosts from which we are allowed to take the - // backup/restore. In case of RAC database it may be more than one. - HostInfoVec []*OracleDBChannelInfoHostInfo `json:"hostInfoVec"` - - // Maximum number of hosts from which we are allowed to take backup/restore - // parallely. This will be less than or equal to host_info_vec_size. If - // this is less than host_info_vec_size we will choose max_num_host from - // host_info_vec and take backup/restore from this number of host. - MaxNumHost *int32 `json:"maxNumHost,omitempty"` - - // The default number of channels to use per host per db. This value is used - // on all hosts unless host_info_vec.num_channels is specified for that host. - // Default value for num_channels will be calculated as minimum number of - // nodes in cohesity cluster, and 2 * number of cpu on Oracle host. - // Preference order for number of channels per host for given db is: - // 1. If user has specified host_info_vec.num_channels for host we will use - // that. - // 2. If user has not specified host_info_vec.num_channels but specified - // num_channels we will use this. - // 3. If user has neither specified host_info_vec.num_channels nor - // num_channels we will calculate default channels with above formula. - NumChannels *int32 `json:"numChannels,omitempty"` - - // Type of Oracle RMAN backup rquested (i.e ImageCopy, BackupSets). - RmanBackupType *int32 `json:"rmanBackupType,omitempty"` -} - -// Validate validates this oracle d b channel info -func (m *OracleDBChannelInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBChannelInfo) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *OracleDBChannelInfo) validateHostInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.HostInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.HostInfoVec); i++ { - if swag.IsZero(m.HostInfoVec[i]) { // not required - continue - } - - if m.HostInfoVec[i] != nil { - if err := m.HostInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle d b channel info based on the context it is used -func (m *OracleDBChannelInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBChannelInfo) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *OracleDBChannelInfo) contextValidateHostInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostInfoVec); i++ { - - if m.HostInfoVec[i] != nil { - - if swag.IsZero(m.HostInfoVec[i]) { // not required - return nil - } - - if err := m.HostInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDBChannelInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDBChannelInfo) UnmarshalBinary(b []byte) error { - var res OracleDBChannelInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_d_b_channel_info_host_info.go b/v1/models/oracle_d_b_channel_info_host_info.go deleted file mode 100644 index c0b544fc..00000000 --- a/v1/models/oracle_d_b_channel_info_host_info.go +++ /dev/null @@ -1,127 +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" -) - -// OracleDBChannelInfoHostInfo The name of this proto message is out-dated. This proto should -// generally be used to represent parameters needed for each Oracle -// 'cluster' node. 'cluster' here is a loose term used to include -// more than Oracle RAC cluster, e.g. 'active-passive' cluster is also -// considered here as 'cluster' and its 'cluster node will also be -// represented by the following proto. -// -// swagger:model OracleDBChannelInfo_HostInfo -type OracleDBChannelInfoHostInfo struct { - - // 'agent_id' of the host from which we are allowed to take the - // backup/restore. - Host *string `json:"host,omitempty"` - - // Number of channels we need to create for this host. Default value for - // num_channels will be calculated as minimum of number of nodes in - // cohesity cluster, 2 * number of cpu on Oracle host. - NumChannels *int32 `json:"numChannels,omitempty"` - - // port number where database is listening. - Portnum *int64 `json:"portnum,omitempty"` - - // The necessury parameters for SBT. This is set only when backup type is - // kSbt. - SbtHostParams *OracleSbtHostParams `json:"sbtHostParams,omitempty"` -} - -// Validate validates this oracle d b channel info host info -func (m *OracleDBChannelInfoHostInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSbtHostParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBChannelInfoHostInfo) validateSbtHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if m.SbtHostParams != nil { - if err := m.SbtHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle d b channel info host info based on the context it is used -func (m *OracleDBChannelInfoHostInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBChannelInfoHostInfo) contextValidateSbtHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtHostParams != nil { - - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if err := m.SbtHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDBChannelInfoHostInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDBChannelInfoHostInfo) UnmarshalBinary(b []byte) error { - var res OracleDBChannelInfoHostInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_d_b_config.go b/v1/models/oracle_d_b_config.go deleted file mode 100644 index 9470a8d6..00000000 --- a/v1/models/oracle_d_b_config.go +++ /dev/null @@ -1,207 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleDBConfig This proto captures the oracle database configuration for alternate DB -// restore. -// -// swagger:model OracleDBConfig -type OracleDBConfig struct { - - // Audit log destination. - AuditLogDest *string `json:"auditLogDest,omitempty"` - - // BCT file path. - BctFilePath *string `json:"bctFilePath,omitempty"` - - // List of paths where the control file needs to be multiplexed. - ControlFilePathVec []string `json:"controlFilePathVec"` - - // Path to the file on oracle host which decides the configuration of - // restored DB. - DbConfigFilePath *string `json:"dbConfigFilePath,omitempty"` - - // Diag destination. - DiagDest *string `json:"diagDest,omitempty"` - - // If set to false, archive log mode is disabled. - EnableArchiveLogMode *bool `json:"enableArchiveLogMode,omitempty"` - - // FRA path. - FraDest *string `json:"fraDest,omitempty"` - - // FRA Size in MBs. - FraSizeMb *int32 `json:"fraSizeMb,omitempty"` - - // How many tempfiles to use for the recovered database. - NumTempfiles *int32 `json:"numTempfiles,omitempty"` - - // Map of pfile parameters to its values. - PfileParameterMap []*OracleDBConfigPfileParameterMapEntry `json:"pfileParameterMap"` - - // List of redo log groups for this DB. - RedoLogConf *OracleDBConfigRedoLogGroupConf `json:"redoLogConf,omitempty"` - - // SGA_TARGET_SIZE size [ Default value same as Source DB ]. - SgaTargetSize *string `json:"sgaTargetSize,omitempty"` - - // Shared pool size [ Default value same as Source DB ]. - SharedPoolSize *string `json:"sharedPoolSize,omitempty"` -} - -// Validate validates this oracle d b config -func (m *OracleDBConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePfileParameterMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRedoLogConf(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBConfig) validatePfileParameterMap(formats strfmt.Registry) error { - if swag.IsZero(m.PfileParameterMap) { // not required - return nil - } - - for i := 0; i < len(m.PfileParameterMap); i++ { - if swag.IsZero(m.PfileParameterMap[i]) { // not required - continue - } - - if m.PfileParameterMap[i] != nil { - if err := m.PfileParameterMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleDBConfig) validateRedoLogConf(formats strfmt.Registry) error { - if swag.IsZero(m.RedoLogConf) { // not required - return nil - } - - if m.RedoLogConf != nil { - if err := m.RedoLogConf.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("redoLogConf") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("redoLogConf") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle d b config based on the context it is used -func (m *OracleDBConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePfileParameterMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRedoLogConf(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDBConfig) contextValidatePfileParameterMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PfileParameterMap); i++ { - - if m.PfileParameterMap[i] != nil { - - if swag.IsZero(m.PfileParameterMap[i]) { // not required - return nil - } - - if err := m.PfileParameterMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleDBConfig) contextValidateRedoLogConf(ctx context.Context, formats strfmt.Registry) error { - - if m.RedoLogConf != nil { - - if swag.IsZero(m.RedoLogConf) { // not required - return nil - } - - if err := m.RedoLogConf.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("redoLogConf") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("redoLogConf") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDBConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDBConfig) UnmarshalBinary(b []byte) error { - var res OracleDBConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_d_b_config_pfile_parameter_map_entry.go b/v1/models/oracle_d_b_config_pfile_parameter_map_entry.go deleted file mode 100644 index 17315744..00000000 --- a/v1/models/oracle_d_b_config_pfile_parameter_map_entry.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" -) - -// OracleDBConfigPfileParameterMapEntry oracle d b config pfile parameter map entry -// -// swagger:model OracleDBConfig_PfileParameterMapEntry -type OracleDBConfigPfileParameterMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this oracle d b config pfile parameter map entry -func (m *OracleDBConfigPfileParameterMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle d b config pfile parameter map entry based on context it is used -func (m *OracleDBConfigPfileParameterMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDBConfigPfileParameterMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDBConfigPfileParameterMapEntry) UnmarshalBinary(b []byte) error { - var res OracleDBConfigPfileParameterMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_d_b_config_redo_log_group_conf.go b/v1/models/oracle_d_b_config_redo_log_group_conf.go deleted file mode 100644 index 9533cefe..00000000 --- a/v1/models/oracle_d_b_config_redo_log_group_conf.go +++ /dev/null @@ -1,63 +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" -) - -// OracleDBConfigRedoLogGroupConf Example redo log config for 3 groups and 2 members with prefix=CH. -// -// GROUP1 : {DST1/CH1.log, DST2/CH1.log} -// GROUP2 : {DST1/CH2.log, DST2/CH2.log} -// GROUP3 : {DST1/CH3.log, DST2/CH3.log} -// -// swagger:model OracleDBConfig_RedoLogGroupConf -type OracleDBConfigRedoLogGroupConf struct { - - // List of members of this redo log group. - GroupMemberVec []string `json:"groupMemberVec"` - - // Log member name prefix. - MemberPrefix *string `json:"memberPrefix,omitempty"` - - // Number of redo log groups. - NumGroups *int32 `json:"numGroups,omitempty"` - - // Size of the member in MB. - SizeMb *int32 `json:"sizeMb,omitempty"` -} - -// Validate validates this oracle d b config redo log group conf -func (m *OracleDBConfigRedoLogGroupConf) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle d b config redo log group conf based on context it is used -func (m *OracleDBConfigRedoLogGroupConf) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDBConfigRedoLogGroupConf) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDBConfigRedoLogGroupConf) UnmarshalBinary(b []byte) error { - var res OracleDBConfigRedoLogGroupConf - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_data_guard_info.go b/v1/models/oracle_data_guard_info.go deleted file mode 100644 index 3032157e..00000000 --- a/v1/models/oracle_data_guard_info.go +++ /dev/null @@ -1,195 +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" -) - -// OracleDataGuardInfo Oracle Data Guard Configuration Info. -// -// Specifies information about the Database in Oracle DataGuard configuration. -// Data GUard provides a comprehensive set of services that create, maintain, -// and monitor one or more standby databases to enable production Oracle -// databases to survive disasters and data corruptions. Data Guard maintains -// these standby databases as transactionally consistent copies of the -// production databases. -// -// swagger:model OracleDataGuardInfo -type OracleDataGuardInfo struct { - - // Specifies the role of the DataGuard database. - // Specifies the role of the DataGuard database. - // - // A Data Guard configuration contains one production database, also referred - // to as the primary database, that functions in the primary role. - // The primary database can be either a single-instance Oracle database or an - // Oracle Real Application Clusters database. - // - // A standby database is a transactionally consistent copy of the primary - // database. Similar to a primary database, a standby database can be either - // a single-instance Oracle database or an Oracle Real Application Clusters - // database. - // 'kPrimary' indicates that the current database is primary database. - // 'kStandby' indicates that the current database is standby database. - // Enum: ["kPrimary","kStandby"] - Role *string `json:"role,omitempty"` - - // Specifies the type of standby database. - // Specifies the type of standby database. - // 'kPhysical' indicates that the current database provides a physically - // identical copy of the primary database, with on disk structures identical - // to the primary database on a block-for-block basis. It is kept - // synchronized with the primary database, though Redo Apply, which recovers - // the redo data received from the primary database and applies the redo to - // the physical standby database. - // 'kLogical' indicates that the current database provides the same logical - // information as the production database, although the physical structure - // can be different. It is kept synchronized with the primary database - // thorugh SQL Apply, which transforms the data in the redo received from the - // primary database into SQL statements and then executing the SQL statements - // on the standby database. - // 'kSnapshot' indicates that the current database is a fully updateable - // standby created by converting a physical standby database into a snasphot - // standby database. It receives and archives but does not apply redo data - // from a primary database. - // Enum: ["kPhysical","kLogical","kSnapshot"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this oracle data guard info -func (m *OracleDataGuardInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleDataGuardInfoTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimary","kStandby"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleDataGuardInfoTypeRolePropEnum = append(oracleDataGuardInfoTypeRolePropEnum, v) - } -} - -const ( - - // OracleDataGuardInfoRoleKPrimary captures enum value "kPrimary" - OracleDataGuardInfoRoleKPrimary string = "kPrimary" - - // OracleDataGuardInfoRoleKStandby captures enum value "kStandby" - OracleDataGuardInfoRoleKStandby string = "kStandby" -) - -// prop value enum -func (m *OracleDataGuardInfo) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleDataGuardInfoTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleDataGuardInfo) 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 -} - -var oracleDataGuardInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical","kLogical","kSnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleDataGuardInfoTypeTypePropEnum = append(oracleDataGuardInfoTypeTypePropEnum, v) - } -} - -const ( - - // OracleDataGuardInfoTypeKPhysical captures enum value "kPhysical" - OracleDataGuardInfoTypeKPhysical string = "kPhysical" - - // OracleDataGuardInfoTypeKLogical captures enum value "kLogical" - OracleDataGuardInfoTypeKLogical string = "kLogical" - - // OracleDataGuardInfoTypeKSnapshot captures enum value "kSnapshot" - OracleDataGuardInfoTypeKSnapshot string = "kSnapshot" -) - -// prop value enum -func (m *OracleDataGuardInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleDataGuardInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleDataGuardInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle data guard info based on context it is used -func (m *OracleDataGuardInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDataGuardInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDataGuardInfo) UnmarshalBinary(b []byte) error { - var res OracleDataGuardInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_database_node.go b/v1/models/oracle_database_node.go deleted file mode 100644 index 5514559a..00000000 --- a/v1/models/oracle_database_node.go +++ /dev/null @@ -1,124 +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" -) - -// OracleDatabaseNode Data related to a 'kOracle' database node. -// Refer: magnetoProto.OracleDBChannelInfo_HostInfo -// -// Oracle Database Node. -// -// Specifies database node required for the backup and restore. -// -// swagger:model OracleDatabaseNode -type OracleDatabaseNode struct { - - // Specifies the number of channels user wants for the backup/recovery - // of this node. - ChannelCount *int32 `json:"channelCount,omitempty"` - - // Specifies the ip of the database node. - Node *string `json:"node,omitempty"` - - // Specifies the port on which user wants to run the backup/recovery. - Port *int64 `json:"port,omitempty"` - - // Specifies the necessary parameters for SBT. - SbtHostParams *OracleSbtHostParams `json:"sbtHostParams,omitempty"` -} - -// Validate validates this oracle database node -func (m *OracleDatabaseNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSbtHostParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseNode) validateSbtHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if m.SbtHostParams != nil { - if err := m.SbtHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle database node based on the context it is used -func (m *OracleDatabaseNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseNode) contextValidateSbtHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtHostParams != nil { - - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if err := m.SbtHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDatabaseNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDatabaseNode) UnmarshalBinary(b []byte) error { - var res OracleDatabaseNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_database_node_channel.go b/v1/models/oracle_database_node_channel.go deleted file mode 100644 index 9120ff46..00000000 --- a/v1/models/oracle_database_node_channel.go +++ /dev/null @@ -1,154 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleDatabaseNodeChannel Oracle Database Node Channel. -// -// Specifies node and channel info required for the backup and restore of -// a database. -// -// swagger:model OracleDatabaseNodeChannel -type OracleDatabaseNodeChannel struct { - - // Specifies the number of days archive log should be stored. - ArchiveLogKeepDays *int32 `json:"archiveLogKeepDays,omitempty"` - - // Array of nodes of a database. - // - // Specifies the Node info from where we are allowed to take the - // backup/restore. - DatabaseNodeList []*OracleDatabaseNode `json:"databaseNodeList"` - - // Specifies the unique Name of the database. - DatabaseUniqueName *string `json:"databaseUniqueName,omitempty"` - - // Specifies the database unique id. This is an internal field and is filled - // by primary magneto based on corresponding app entity id. - DatabaseUUID *string `json:"databaseUuid,omitempty"` - - // Specifies the default number of channels to use per node per database. - // The default number of channels to use per host per db. - // This value is used on all OracleDatabaseNode's unless - // databaseNodeList item's channelCount is specified for the node. - DefaultChannelCount *int32 `json:"defaultChannelCount,omitempty"` - - // Specifies whether the database having the Primary role within Data Guard - // configuration is to be backed up. - EnableDgPrimaryBackup *bool `json:"enableDgPrimaryBackup,omitempty"` - - // Specifies the maximum number of nodes from which we are allowed to take - // backup/restore. - MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` - - // Specifies the type of Oracle RMAN backup. - RmanBackupType *int32 `json:"rmanBackupType,omitempty"` -} - -// Validate validates this oracle database node channel -func (m *OracleDatabaseNodeChannel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseNodeList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseNodeChannel) validateDatabaseNodeList(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseNodeList) { // not required - return nil - } - - for i := 0; i < len(m.DatabaseNodeList); i++ { - if swag.IsZero(m.DatabaseNodeList[i]) { // not required - continue - } - - if m.DatabaseNodeList[i] != nil { - if err := m.DatabaseNodeList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle database node channel based on the context it is used -func (m *OracleDatabaseNodeChannel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseNodeList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseNodeChannel) contextValidateDatabaseNodeList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatabaseNodeList); i++ { - - if m.DatabaseNodeList[i] != nil { - - if swag.IsZero(m.DatabaseNodeList[i]) { // not required - return nil - } - - if err := m.DatabaseNodeList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDatabaseNodeChannel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDatabaseNodeChannel) UnmarshalBinary(b []byte) error { - var res OracleDatabaseNodeChannel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_env_job_parameters.go b/v1/models/oracle_env_job_parameters.go deleted file mode 100644 index 8e3fa877..00000000 --- a/v1/models/oracle_env_job_parameters.go +++ /dev/null @@ -1,120 +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" -) - -// OracleEnvJobParameters Oracle Environment Job Parameters. -// -// Specifies job parameters applicable for all 'kOracle' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model OracleEnvJobParameters -type OracleEnvJobParameters struct { - - // Specifies whether the mountpoints created while backing up Oracle DBs - // should be persisted. - // Note: This parameter is for the entire Job. For overriding persistence of - // mountpoints for a subset of Oracle hosts within the job, - // refer OracleSourceParams. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` - - // Indicates the vlan preference that is selected by the user for doing - // backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this oracle env job parameters -func (m *OracleEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleEnvJobParameters) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle env job parameters based on the context it is used -func (m *OracleEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleEnvJobParameters) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleEnvJobParameters) UnmarshalBinary(b []byte) error { - var res OracleEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_host.go b/v1/models/oracle_host.go deleted file mode 100644 index 65ec1379..00000000 --- a/v1/models/oracle_host.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleHost Oracle Host. -// -// Specifies information about an Oracle Host. -// -// swagger:model OracleHost -type OracleHost struct { - - // Specifies the count of CPU available on the host. - CPUCount *int32 `json:"cpuCount,omitempty"` - - // Specifies the IP address of the host. - IPAddresses []string `json:"ipAddresses"` - - // Specifies ports available for this host. - Ports []int64 `json:"ports"` - - // Specifies multiple session configurations available for this host. - Sessions []*OracleSession `json:"sessions"` -} - -// Validate validates this oracle host -func (m *OracleHost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSessions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleHost) validateSessions(formats strfmt.Registry) error { - if swag.IsZero(m.Sessions) { // not required - return nil - } - - for i := 0; i < len(m.Sessions); i++ { - if swag.IsZero(m.Sessions[i]) { // not required - continue - } - - if m.Sessions[i] != nil { - if err := m.Sessions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle host based on the context it is used -func (m *OracleHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSessions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleHost) contextValidateSessions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sessions); i++ { - - if m.Sessions[i] != nil { - - if swag.IsZero(m.Sessions[i]) { // not required - return nil - } - - if err := m.Sessions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleHost) UnmarshalBinary(b []byte) error { - var res OracleHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_pluggable_database_info.go b/v1/models/oracle_pluggable_database_info.go deleted file mode 100644 index ee58975c..00000000 --- a/v1/models/oracle_pluggable_database_info.go +++ /dev/null @@ -1,127 +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" -) - -// OraclePluggableDatabaseInfo Specifies the informatiomn about the pluggable database. A Pluggabele -// Database(PDB) is a portable collection of schemas, schema objects, and -// nonschema objects that appears to an Oracle Net client as a non-CDB. -// -// swagger:model OraclePluggableDatabaseInfo -type OraclePluggableDatabaseInfo struct { - - // Specifies the ID of the Pluggable Database. - DatabaseID *string `json:"databaseId,omitempty"` - - // Speicifes the name of the Pluggable Database. - Name *string `json:"name,omitempty"` - - // Specifies the OPEN_MODE information. - // Specifies the OPEN_MODE type for the Oracle database. - // 'kMounted' indicates that the database is open in Mounted mode. - // 'kReadWrite' indicates that the database is open in R/W mode. - // 'kReadOnly' indicates that the database is open in ReadOnly mode. - // 'kMigrate' inidcates that the database is open in Migrate mode. - // Enum: ["kMounted","kReadWrite","kReadOnly","kMigrate"] - OpenMode *string `json:"openMode,omitempty"` - - // Specifies the Size in Bytes of the Pluggable Database. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this oracle pluggable database info -func (m *OraclePluggableDatabaseInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oraclePluggableDatabaseInfoTypeOpenModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMounted","kReadWrite","kReadOnly","kMigrate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oraclePluggableDatabaseInfoTypeOpenModePropEnum = append(oraclePluggableDatabaseInfoTypeOpenModePropEnum, v) - } -} - -const ( - - // OraclePluggableDatabaseInfoOpenModeKMounted captures enum value "kMounted" - OraclePluggableDatabaseInfoOpenModeKMounted string = "kMounted" - - // OraclePluggableDatabaseInfoOpenModeKReadWrite captures enum value "kReadWrite" - OraclePluggableDatabaseInfoOpenModeKReadWrite string = "kReadWrite" - - // OraclePluggableDatabaseInfoOpenModeKReadOnly captures enum value "kReadOnly" - OraclePluggableDatabaseInfoOpenModeKReadOnly string = "kReadOnly" - - // OraclePluggableDatabaseInfoOpenModeKMigrate captures enum value "kMigrate" - OraclePluggableDatabaseInfoOpenModeKMigrate string = "kMigrate" -) - -// prop value enum -func (m *OraclePluggableDatabaseInfo) validateOpenModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oraclePluggableDatabaseInfoTypeOpenModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OraclePluggableDatabaseInfo) validateOpenMode(formats strfmt.Registry) error { - if swag.IsZero(m.OpenMode) { // not required - return nil - } - - // value enum - if err := m.validateOpenModeEnum("openMode", "body", *m.OpenMode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle pluggable database info based on context it is used -func (m *OraclePluggableDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OraclePluggableDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OraclePluggableDatabaseInfo) UnmarshalBinary(b []byte) error { - var res OraclePluggableDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_protection_source.go b/v1/models/oracle_protection_source.go deleted file mode 100644 index ed70f55b..00000000 --- a/v1/models/oracle_protection_source.go +++ /dev/null @@ -1,400 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleProtectionSource Oracle Protection Source. -// -// Specifies an Object representing one Oracle database. -// -// swagger:model OracleProtectionSource -type OracleProtectionSource struct { - - // Specifies whether the database is running in ARCHIVELOG mode. It enables - // the redo of log files into archived redo log files. - ArchiveLogEnabled *bool `json:"archiveLogEnabled,omitempty"` - - // Specifies whether the Block Change Tracking is enabled. BCT improves the - // performance of incremental backups by recording changed blocks into the - // block change tracking file. RMAN then uses this file to identify changed - // blocks to be backed up. - BctEnabled *bool `json:"bctEnabled,omitempty"` - - // Specifies the Container Database Information including the Pluggable - // databases within the container. - ContainerDatabaseInfo *OracleContainerDatabaseInfo `json:"containerDatabaseInfo,omitempty"` - - // Specifies the Data Gurad configuration information for the current DB - // entity. - DataGuardInfo *OracleDataGuardInfo `json:"dataGuardInfo,omitempty"` - - // Specifies the unique name of the Oracle entity. - DatabaseUniqueName *string `json:"databaseUniqueName,omitempty"` - - // Specifies the type of the database in Oracle Protection Source. - // 'kRACDatabase' indicates the database is a RAC DB. - // 'kSingleInstance' indicates that the database is single instance. - // Enum: ["kSingleInstance","kRACDatabase"] - DbType *string `json:"dbType,omitempty"` - - // Specifies the Oracle DB Domain. - Domain *string `json:"domain,omitempty"` - - // Specifies Flash/Fast Recovery area size for the current DB entity. - FraSize *int64 `json:"fraSize,omitempty"` - - // Specifies the list of hosts for the current DB entity. - Hosts []*OracleHost `json:"hosts"` - - // Specifies the instance name of the Oracle entity. - Name *string `json:"name,omitempty"` - - // Specifies the entity id of the owner entity (such as a VM). This is only - // set if type is kDatabase. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies System Global Area size for the current DB entity. - // A system global area (SGA) is a group of shared memory structures that - // contain data and control information for one Oracle database. - SgaTargetSize *string `json:"sgaTargetSize,omitempty"` - - // Specifies Shared Pool Size for the current DB entity. - SharedPoolSize *string `json:"sharedPoolSize,omitempty"` - - // Specifies database size. - Size *int64 `json:"size,omitempty"` - - // Specifies the number of TDE encrypted tablespaces found in the database. - TdeEncryptedTsCount *int64 `json:"tdeEncryptedTsCount,omitempty"` - - // Specifies number of temporary files for the current DB entity. - TempFilesCount *int64 `json:"tempFilesCount,omitempty"` - - // Specifies the type of the managed Object in Oracle Protection Source. - // 'kRACRootContainer' indicates the entity is a root container to an Oracle - // Real Application clusters(Oracle RAC). - // 'kRootContainer' indicates the entity is a root container to an Oracle - // standalone server. - // 'kHost' indicates the entity is an Oracle host. - // 'kDatabase' indicates the entity is an Oracle Database. - // 'kTableSpace' indicates the entity is an Oracle table space. - // 'kTable' indicates the entity is an Oracle table. - // Enum: ["kRACRootContainer","kRootContainer","kHost","kDatabase","kTableSpace","kTable"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Oracle entity. - UUID *string `json:"uuid,omitempty"` - - // Specifies the Oracle database instance version. - Version *string `json:"version,omitempty"` -} - -// Validate validates this oracle protection source -func (m *OracleProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContainerDatabaseInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataGuardInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionSource) validateContainerDatabaseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ContainerDatabaseInfo) { // not required - return nil - } - - if m.ContainerDatabaseInfo != nil { - if err := m.ContainerDatabaseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *OracleProtectionSource) validateDataGuardInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataGuardInfo) { // not required - return nil - } - - if m.DataGuardInfo != nil { - if err := m.DataGuardInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataGuardInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataGuardInfo") - } - return err - } - } - - return nil -} - -var oracleProtectionSourceTypeDbTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSingleInstance","kRACDatabase"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleProtectionSourceTypeDbTypePropEnum = append(oracleProtectionSourceTypeDbTypePropEnum, v) - } -} - -const ( - - // OracleProtectionSourceDbTypeKSingleInstance captures enum value "kSingleInstance" - OracleProtectionSourceDbTypeKSingleInstance string = "kSingleInstance" - - // OracleProtectionSourceDbTypeKRACDatabase captures enum value "kRACDatabase" - OracleProtectionSourceDbTypeKRACDatabase string = "kRACDatabase" -) - -// prop value enum -func (m *OracleProtectionSource) validateDbTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleProtectionSourceTypeDbTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleProtectionSource) 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 -} - -func (m *OracleProtectionSource) validateHosts(formats strfmt.Registry) error { - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var oracleProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRACRootContainer","kRootContainer","kHost","kDatabase","kTableSpace","kTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleProtectionSourceTypeTypePropEnum = append(oracleProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // OracleProtectionSourceTypeKRACRootContainer captures enum value "kRACRootContainer" - OracleProtectionSourceTypeKRACRootContainer string = "kRACRootContainer" - - // OracleProtectionSourceTypeKRootContainer captures enum value "kRootContainer" - OracleProtectionSourceTypeKRootContainer string = "kRootContainer" - - // OracleProtectionSourceTypeKHost captures enum value "kHost" - OracleProtectionSourceTypeKHost string = "kHost" - - // OracleProtectionSourceTypeKDatabase captures enum value "kDatabase" - OracleProtectionSourceTypeKDatabase string = "kDatabase" - - // OracleProtectionSourceTypeKTableSpace captures enum value "kTableSpace" - OracleProtectionSourceTypeKTableSpace string = "kTableSpace" - - // OracleProtectionSourceTypeKTable captures enum value "kTable" - OracleProtectionSourceTypeKTable string = "kTable" -) - -// prop value enum -func (m *OracleProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this oracle protection source based on the context it is used -func (m *OracleProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateContainerDatabaseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataGuardInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionSource) contextValidateContainerDatabaseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ContainerDatabaseInfo != nil { - - if swag.IsZero(m.ContainerDatabaseInfo) { // not required - return nil - } - - if err := m.ContainerDatabaseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *OracleProtectionSource) contextValidateDataGuardInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataGuardInfo != nil { - - if swag.IsZero(m.DataGuardInfo) { // not required - return nil - } - - if err := m.DataGuardInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataGuardInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataGuardInfo") - } - return err - } - } - - return nil -} - -func (m *OracleProtectionSource) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleProtectionSource) UnmarshalBinary(b []byte) error { - var res OracleProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_recovery_validation_info.go b/v1/models/oracle_recovery_validation_info.go deleted file mode 100644 index 567e9070..00000000 --- a/v1/models/oracle_recovery_validation_info.go +++ /dev/null @@ -1,55 +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" -) - -// OracleRecoveryValidationInfo Proto to store Oracle Recovery Validation related information. -// -// swagger:model OracleRecoveryValidationInfo -type OracleRecoveryValidationInfo struct { - - // Boolean to tell whether we will be creating a dummy oracle instance - // to run recovery validations. - // Generally if we doing recovery validations on source host, we will do - // validations on the existing DB, else if validations are done on target - // different from source then we will be creating a dummy oracle instance to - // run validations. - CreateDummyInstance *bool `json:"createDummyInstance,omitempty"` -} - -// Validate validates this oracle recovery validation info -func (m *OracleRecoveryValidationInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle recovery validation info based on context it is used -func (m *OracleRecoveryValidationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRecoveryValidationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRecoveryValidationInfo) UnmarshalBinary(b []byte) error { - var res OracleRecoveryValidationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_sbt_host_params.go b/v1/models/oracle_sbt_host_params.go deleted file mode 100644 index 8858af72..00000000 --- a/v1/models/oracle_sbt_host_params.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleSbtHostParams Message to capture Oracle SBT host info. -// -// swagger:model OracleSbtHostParams -type OracleSbtHostParams struct { - - // The path of sbt library, This is set only when backup type is kSbt. - SbtLibraryPath *string `json:"sbtLibraryPath,omitempty"` - - // Cohesity view path. - ViewFsPath *string `json:"viewFsPath,omitempty"` - - // Vector of Cohesity primary VIPs. - VipVec []string `json:"vipVec"` - - // Vlan information for Cohesity cluster. - VlanInfoVec []*OracleVlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this oracle sbt host params -func (m *OracleSbtHostParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSbtHostParams) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle sbt host params based on the context it is used -func (m *OracleSbtHostParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSbtHostParams) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleSbtHostParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleSbtHostParams) UnmarshalBinary(b []byte) error { - var res OracleSbtHostParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_session.go b/v1/models/oracle_session.go deleted file mode 100644 index 06897bac..00000000 --- a/v1/models/oracle_session.go +++ /dev/null @@ -1,56 +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" -) - -// OracleSession Oracle Session. -// -// Specifies information about session configuration for an Oracle host. -// -// swagger:model OracleSession -type OracleSession struct { - - // Location is the path where Oracle is installed. - Location *string `json:"location,omitempty"` - - // SystemIdentifier is the unique Oracle System Identifier for the DB - // instance. - SystemIdentifier *string `json:"systemIdentifier,omitempty"` -} - -// Validate validates this oracle session -func (m *OracleSession) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle session based on context it is used -func (m *OracleSession) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleSession) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleSession) UnmarshalBinary(b []byte) error { - var res OracleSession - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_source_params.go b/v1/models/oracle_source_params.go deleted file mode 100644 index a9cd2020..00000000 --- a/v1/models/oracle_source_params.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleSourceParams Oracle Source Parameters. -// -// Message to capture additional backup/restore params for a Oracle source. -// -// swagger:model OracleSourceParams -type OracleSourceParams struct { - - // A vector of unique Oracle databases. Each vector entry represents the - // backup/restore parameters for one unique Oracle database. Uniqueness is - // determined by the database unique name. - AdditionalOracleDbParamsVec []*AdditionalOracleDBParams `json:"additionalOracleDbParamsVec"` - - // This parameter indicates whether or not to persist mountpoints. - // Default is set to true, which was the behavior before this option. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` -} - -// Validate validates this oracle source params -func (m *OracleSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdditionalOracleDbParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSourceParams) validateAdditionalOracleDbParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalOracleDbParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalOracleDbParamsVec); i++ { - if swag.IsZero(m.AdditionalOracleDbParamsVec[i]) { // not required - continue - } - - if m.AdditionalOracleDbParamsVec[i] != nil { - if err := m.AdditionalOracleDbParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalOracleDbParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalOracleDbParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle source params based on the context it is used -func (m *OracleSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdditionalOracleDbParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSourceParams) contextValidateAdditionalOracleDbParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalOracleDbParamsVec); i++ { - - if m.AdditionalOracleDbParamsVec[i] != nil { - - if swag.IsZero(m.AdditionalOracleDbParamsVec[i]) { // not required - return nil - } - - if err := m.AdditionalOracleDbParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalOracleDbParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalOracleDbParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleSourceParams) UnmarshalBinary(b []byte) error { - var res OracleSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_special_parameters.go b/v1/models/oracle_special_parameters.go deleted file mode 100644 index 1594305c..00000000 --- a/v1/models/oracle_special_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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleSpecialParameters Oracle Special Parameters. -// -// Specifies special settings applicable for 'kOracle' environment. -// -// swagger:model OracleSpecialParameters -type OracleSpecialParameters struct { - - // Array of application parameters i.e. database parameters for - // standalone/RAC and DG parameters for data guard. - // - // Specifies the list of parameters required at app entity level. - AppParamsList []*OracleAppParams `json:"appParamsList"` - - // Array of Ids of Application Entities like Oracle instances, and - // databases that should be protected in a Protection Source. - // - // Specifies the subset of application entities like Oracle instances, and - // databases to protect in a Protection Source of type kOracle'. If - // not specified, all application entities on the Protection Source. - ApplicationEntityIds []int64 `json:"applicationEntityIds"` - - // Specifies if the mountpoints for Oracle view for the current host are to - // be persisted. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` -} - -// Validate validates this oracle special parameters -func (m *OracleSpecialParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppParamsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSpecialParameters) validateAppParamsList(formats strfmt.Registry) error { - if swag.IsZero(m.AppParamsList) { // not required - return nil - } - - for i := 0; i < len(m.AppParamsList); i++ { - if swag.IsZero(m.AppParamsList[i]) { // not required - continue - } - - if m.AppParamsList[i] != nil { - if err := m.AppParamsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle special parameters based on the context it is used -func (m *OracleSpecialParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppParamsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSpecialParameters) contextValidateAppParamsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppParamsList); i++ { - - if m.AppParamsList[i] != nil { - - if swag.IsZero(m.AppParamsList[i]) { // not required - return nil - } - - if err := m.AppParamsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleSpecialParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleSpecialParameters) UnmarshalBinary(b []byte) error { - var res OracleSpecialParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_update_restore_task_options.go b/v1/models/oracle_update_restore_task_options.go deleted file mode 100644 index 79a75312..00000000 --- a/v1/models/oracle_update_restore_task_options.go +++ /dev/null @@ -1,113 +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" -) - -// OracleUpdateRestoreTaskOptions Refer OracleUpdateRestoreTaskOptions message in /magneto/base/magneto.proto -// -// OracleUpdateRestoreTaskOptions holds the information needed for updating an -// Oracle restore task. Currently this contains Oracle clone specific details, -// which would be needed in the migration workflow. -// -// swagger:model OracleUpdateRestoreTaskOptions -type OracleUpdateRestoreTaskOptions struct { - - // Details needed for Oracle Clone migrations. - MigrateCloneParams *MigrateOracleCloneParams `json:"migrateCloneParams,omitempty"` -} - -// Validate validates this oracle update restore task options -func (m *OracleUpdateRestoreTaskOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMigrateCloneParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleUpdateRestoreTaskOptions) validateMigrateCloneParams(formats strfmt.Registry) error { - if swag.IsZero(m.MigrateCloneParams) { // not required - return nil - } - - if m.MigrateCloneParams != nil { - if err := m.MigrateCloneParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("migrateCloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("migrateCloneParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle update restore task options based on the context it is used -func (m *OracleUpdateRestoreTaskOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMigrateCloneParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleUpdateRestoreTaskOptions) contextValidateMigrateCloneParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MigrateCloneParams != nil { - - if swag.IsZero(m.MigrateCloneParams) { // not required - return nil - } - - if err := m.MigrateCloneParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("migrateCloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("migrateCloneParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleUpdateRestoreTaskOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleUpdateRestoreTaskOptions) UnmarshalBinary(b []byte) error { - var res OracleUpdateRestoreTaskOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/oracle_vlan_info.go b/v1/models/oracle_vlan_info.go deleted file mode 100644 index 842af48a..00000000 --- a/v1/models/oracle_vlan_info.go +++ /dev/null @@ -1,59 +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" -) - -// OracleVlanInfo Message to capture Cohesity cluster vlan info for Oracle workflow. -// -// swagger:model OracleVlanInfo -type OracleVlanInfo struct { - - // Gateway for this VLAN. - Gateway *string `json:"gateway,omitempty"` - - // ID of this VLAN. - ID *int32 `json:"id,omitempty"` - - // List of IPs in this VLAN. - IPVec []string `json:"ipVec"` - - // Subnet IP for this VLAN. - SubnetIP *string `json:"subnetIp,omitempty"` -} - -// Validate validates this oracle vlan info -func (m *OracleVlanInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle vlan info based on context it is used -func (m *OracleVlanInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleVlanInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleVlanInfo) UnmarshalBinary(b []byte) error { - var res OracleVlanInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/org_info.go b/v1/models/org_info.go deleted file mode 100644 index 3df1fa34..00000000 --- a/v1/models/org_info.go +++ /dev/null @@ -1,59 +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" -) - -// OrgInfo Proto that contains specific information about a Sfdc cluster. -// -// swagger:model OrgInfo -type OrgInfo struct { - - // The maximum number of concurrent connections permitted for this Org. - Concurrency *int64 `json:"concurrency,omitempty"` - - // String id of the organization to which Sfdc user belongs. - OrgID *string `json:"orgId,omitempty"` - - // Name of the organization - OrgName *string `json:"orgName,omitempty"` - - // Contains the Salesforce organization type. - OrganizationType *string `json:"organizationType,omitempty"` -} - -// Validate validates this org info -func (m *OrgInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this org info based on context it is used -func (m *OrgInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OrgInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OrgInfo) UnmarshalBinary(b []byte) error { - var res OrgInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/org_v_d_c_network.go b/v1/models/org_v_d_c_network.go deleted file mode 100644 index 5c66b7dc..00000000 --- a/v1/models/org_v_d_c_network.go +++ /dev/null @@ -1,59 +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" -) - -// OrgVDCNetwork org v d c network -// -// swagger:model OrgVDCNetwork -type OrgVDCNetwork struct { - - // This is the name of the Org VDC network. - Name *string `json:"name,omitempty"` - - // This is the type of the corresponding network on VCenter. - NetworkType *string `json:"networkType,omitempty"` - - // This is the uuid of Org VDC network as identified by VCD. - VcdUUID *string `json:"vcdUuid,omitempty"` - - // This is the moref of the corresponding network on VCenter. - VcenterMorefUUID *string `json:"vcenterMorefUuid,omitempty"` -} - -// Validate validates this org v d c network -func (m *OrgVDCNetwork) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this org v d c network based on context it is used -func (m *OrgVDCNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OrgVDCNetwork) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OrgVDCNetwork) UnmarshalBinary(b []byte) error { - var res OrgVDCNetwork - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/org_vdc_network_params.go b/v1/models/org_vdc_network_params.go deleted file mode 100644 index b3decb87..00000000 --- a/v1/models/org_vdc_network_params.go +++ /dev/null @@ -1,58 +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" -) - -// OrgVdcNetworkParams Org VDC Network. -// -// Specifies the parameters of an Org VDC network. -// -// swagger:model OrgVdcNetworkParams -type OrgVdcNetworkParams struct { - - // Specifies the name of the Org VDC Network. - Name *string `json:"name,omitempty"` - - // Specifies the UUID as identified by the VCD. - VcdUUID *string `json:"vcdUuid,omitempty"` - - // Specifies the UUID of the corresponding network on the vCenter. - VcenterUUID *string `json:"vcenterUuid,omitempty"` -} - -// Validate validates this org vdc network params -func (m *OrgVdcNetworkParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this org vdc network params based on context it is used -func (m *OrgVdcNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OrgVdcNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OrgVdcNetworkParams) UnmarshalBinary(b []byte) error { - var res OrgVdcNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_backup_env_params.go b/v1/models/outlook_backup_env_params.go deleted file mode 100644 index b8aafb64..00000000 --- a/v1/models/outlook_backup_env_params.go +++ /dev/null @@ -1,170 +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" -) - -// OutlookBackupEnvParams Outlook Backup Environment Parameters. -// -// Message to capture any additional backup params for Outlook within Office365 -// environment. -// -// swagger:model OutlookBackupEnvParams -type OutlookBackupEnvParams struct { - - // Specifies attribute filter policy to support inclusion/exclusions of - // entities. - AttrFilterPolicy *AttributeFilterPolicy `json:"attrFilterPolicy,omitempty"` - - // The filtering policy describes which paths within a mailbox should be - // excluded within the backup. If this is not specified, then the entire - // Outlook mailbox will be backed up. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // Specifies whether the mailbox for all the Office365 Users present in the - // protection job should be backed up. - ShouldBackupMailbox *bool `json:"shouldBackupMailbox,omitempty"` -} - -// Validate validates this outlook backup env params -func (m *OutlookBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttrFilterPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookBackupEnvParams) validateAttrFilterPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AttrFilterPolicy) { // not required - return nil - } - - if m.AttrFilterPolicy != nil { - if err := m.AttrFilterPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *OutlookBackupEnvParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this outlook backup env params based on the context it is used -func (m *OutlookBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttrFilterPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookBackupEnvParams) contextValidateAttrFilterPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AttrFilterPolicy != nil { - - if swag.IsZero(m.AttrFilterPolicy) { // not required - return nil - } - - if err := m.AttrFilterPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attrFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attrFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *OutlookBackupEnvParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookBackupEnvParams) UnmarshalBinary(b []byte) error { - var res OutlookBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_backup_params.go b/v1/models/outlook_backup_params.go deleted file mode 100644 index b844637d..00000000 --- a/v1/models/outlook_backup_params.go +++ /dev/null @@ -1,67 +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" -) - -// OutlookBackupParams This message contains additional params for an outlook backup job run. -// -// swagger:model OutlookBackupParams -type OutlookBackupParams struct { - - // If true, delete cloned directory. Currently we are setting this true if - // last backup failed with invalid sync state error. - DeleteClonedDirectory *bool `json:"deleteClonedDirectory,omitempty"` - - // This flag indicates whether we are in the view cloning paradigm for the - // first time or not. i.e. the previous run used the default magneto backup - // view. - FirstTimeViewClone *bool `json:"firstTimeViewClone,omitempty"` - - // For view cloning per run, outlook environment needs the view name used in - // the last run (with at least one finished attempt). - PreviousRunViewName *string `json:"previousRunViewName,omitempty"` - - // Sla deadline from backup job policy. - SLADeadlineTimeUsecs *int64 `json:"slaDeadlineTimeUsecs,omitempty"` - - // This is an explicit flag to intimate slave that master already cloned the - // view. - ViewCloningEnabled *bool `json:"viewCloningEnabled,omitempty"` -} - -// Validate validates this outlook backup params -func (m *OutlookBackupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this outlook backup params based on context it is used -func (m *OutlookBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookBackupParams) UnmarshalBinary(b []byte) error { - var res OutlookBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_env_job_parameters.go b/v1/models/outlook_env_job_parameters.go deleted file mode 100644 index 88c440a0..00000000 --- a/v1/models/outlook_env_job_parameters.go +++ /dev/null @@ -1,118 +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" -) - -// OutlookEnvJobParameters Outlook Environment Job Parameters. -// -// Specifies Outlook job parameters applicable for all Office365 Environment -// type Protection Sources in a Protection Job. -// -// swagger:model OutlookEnvJobParameters -type OutlookEnvJobParameters struct { - - // The filtering policy describes which paths within the mailbox should be - // excluded within the backup. If this is not specified, then the entire - // mailbox will be backed up. - FilePathFilter *FilePathFilter `json:"filePathFilter,omitempty"` - - // Specifies whether mailbox of each Office365 Users/Groups within the job, - // should be backed up or not. - ShouldBackupMailbox *bool `json:"shouldBackupMailbox,omitempty"` -} - -// Validate validates this outlook env job parameters -func (m *OutlookEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePathFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookEnvJobParameters) validateFilePathFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if m.FilePathFilter != nil { - if err := m.FilePathFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this outlook env job parameters based on the context it is used -func (m *OutlookEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilePathFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookEnvJobParameters) contextValidateFilePathFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePathFilter != nil { - - if swag.IsZero(m.FilePathFilter) { // not required - return nil - } - - if err := m.FilePathFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookEnvJobParameters) UnmarshalBinary(b []byte) error { - var res OutlookEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_folder.go b/v1/models/outlook_folder.go deleted file mode 100644 index b7dd4201..00000000 --- a/v1/models/outlook_folder.go +++ /dev/null @@ -1,62 +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" -) - -// OutlookFolder Outlook Folder. -// -// Specifies the Outlook folder details. -// -// swagger:model OutlookFolder -type OutlookFolder struct { - - // Specifies the unique ID of the folder. - FolderID *string `json:"folderId,omitempty"` - - // Specifies the key unique within the mailbox of the folder. - FolderKey *int64 `json:"folderKey,omitempty"` - - // Specifies the outlook items within the folder to be restored incase the - // user wishes not to restore the entire folder. - OutlookItemIDList []string `json:"outlookItemIdList"` - - // Specifies whether the entire folder is to be restored. - RestoreEntireFolder *bool `json:"restoreEntireFolder,omitempty"` -} - -// Validate validates this outlook folder -func (m *OutlookFolder) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this outlook folder based on context it is used -func (m *OutlookFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookFolder) UnmarshalBinary(b []byte) error { - var res OutlookFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_mailbox.go b/v1/models/outlook_mailbox.go deleted file mode 100644 index 89f533b5..00000000 --- a/v1/models/outlook_mailbox.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OutlookMailbox Outlook Mailbox. -// -// Specifies the Outlook mailbox with restore details to support full or -// partial recovery. -// -// swagger:model OutlookMailbox -type OutlookMailbox struct { - - // Specifies the details of the mailbox object. - MailboxObject *RestoreObjectDetails `json:"mailboxObject,omitempty"` - - // Specifies the list of folders to be restored incase user wishes not to - // restore entire mailbox. - OutlookFolderList []*OutlookFolder `json:"outlookFolderList"` - - // Specifies whether the entire mailbox is to be restored. - RestoreEntireMailbox *bool `json:"restoreEntireMailbox,omitempty"` -} - -// Validate validates this outlook mailbox -func (m *OutlookMailbox) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMailboxObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookFolderList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookMailbox) validateMailboxObject(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxObject) { // not required - return nil - } - - if m.MailboxObject != nil { - if err := m.MailboxObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxObject") - } - return err - } - } - - return nil -} - -func (m *OutlookMailbox) validateOutlookFolderList(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookFolderList) { // not required - return nil - } - - for i := 0; i < len(m.OutlookFolderList); i++ { - if swag.IsZero(m.OutlookFolderList[i]) { // not required - continue - } - - if m.OutlookFolderList[i] != nil { - if err := m.OutlookFolderList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this outlook mailbox based on the context it is used -func (m *OutlookMailbox) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMailboxObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookFolderList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookMailbox) contextValidateMailboxObject(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxObject != nil { - - if swag.IsZero(m.MailboxObject) { // not required - return nil - } - - if err := m.MailboxObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxObject") - } - return err - } - } - - return nil -} - -func (m *OutlookMailbox) contextValidateOutlookFolderList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OutlookFolderList); i++ { - - if m.OutlookFolderList[i] != nil { - - if swag.IsZero(m.OutlookFolderList[i]) { // not required - return nil - } - - if err := m.OutlookFolderList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookMailbox) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookMailbox) UnmarshalBinary(b []byte) error { - var res OutlookMailbox - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/outlook_restore_parameters.go b/v1/models/outlook_restore_parameters.go deleted file mode 100644 index 7360066c..00000000 --- a/v1/models/outlook_restore_parameters.go +++ /dev/null @@ -1,233 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OutlookRestoreParameters Outlook Restore Parameters. -// -// Specifies information needed for recovering Mailboxes in O365Outlook -// environment. -// -// swagger:model OutlookRestoreParameters -type OutlookRestoreParameters struct { - - // Specifies the list of mailboxes to be restored. - OutlookMailboxList []*OutlookMailbox `json:"outlookMailboxList"` - - // Specifies the PST conversion specific parameters. This should always be - // specified when need to convert selected items to PST. - PstParams *PstParameters `json:"pstParams,omitempty"` - - // Specifies the target folder path to restore the mailboxes. This will - // always be specified whether the target mailbox is the original or an - // alternate one. - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // Specifies the destination mailbox where the mailboxes specified within - // OutlookMailboxes will be restored with their appropriate names. - TargetMailbox *ProtectionSource `json:"targetMailbox,omitempty"` -} - -// Validate validates this outlook restore parameters -func (m *OutlookRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOutlookMailboxList(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePstParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMailbox(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookRestoreParameters) validateOutlookMailboxList(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookMailboxList) { // not required - return nil - } - - for i := 0; i < len(m.OutlookMailboxList); i++ { - if swag.IsZero(m.OutlookMailboxList[i]) { // not required - continue - } - - if m.OutlookMailboxList[i] != nil { - if err := m.OutlookMailboxList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookMailboxList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookMailboxList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OutlookRestoreParameters) validatePstParams(formats strfmt.Registry) error { - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if m.PstParams != nil { - if err := m.PstParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *OutlookRestoreParameters) validateTargetMailbox(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if m.TargetMailbox != nil { - if err := m.TargetMailbox.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// ContextValidate validate this outlook restore parameters based on the context it is used -func (m *OutlookRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOutlookMailboxList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePstParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMailbox(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OutlookRestoreParameters) contextValidateOutlookMailboxList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OutlookMailboxList); i++ { - - if m.OutlookMailboxList[i] != nil { - - if swag.IsZero(m.OutlookMailboxList[i]) { // not required - return nil - } - - if err := m.OutlookMailboxList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookMailboxList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookMailboxList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OutlookRestoreParameters) contextValidatePstParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PstParams != nil { - - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if err := m.PstParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *OutlookRestoreParameters) contextValidateTargetMailbox(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMailbox != nil { - - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if err := m.TargetMailbox.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OutlookRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutlookRestoreParameters) UnmarshalBinary(b []byte) error { - var res OutlookRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/output_spec.go b/v1/models/output_spec.go deleted file mode 100644 index a42a3908..00000000 --- a/v1/models/output_spec.go +++ /dev/null @@ -1,68 +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" -) - -// OutputSpec Output specification for the mapreduce. -// -// swagger:model OutputSpec -type OutputSpec struct { - - // Number of reduce shards. - NumReduceShards *int32 `json:"numReduceShards,omitempty"` - - // Name of output directory. - OutputDir *string `json:"outputDir,omitempty"` - - // Partition id where output will go. - PartitionID *int64 `json:"partitionId,omitempty"` - - // Prefix of the reduce output files. File names will be: - // ${reduce_output_prefix}-00000-of-00100 if num_reduce_shards=100 - // This name can contain some path components. e.g. "awb_results/run1" is a - // valid value. output_dir is deprecated. - ReduceOutputPrefix *string `json:"reduceOutputPrefix,omitempty"` - - // Viewbox id where the output will go. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Name of the view where output will go. This will be filled up by yoda. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this output spec -func (m *OutputSpec) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this output spec based on context it is used -func (m *OutputSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OutputSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OutputSpec) UnmarshalBinary(b []byte) error { - var res OutputSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/overwrite_view_param.go b/v1/models/overwrite_view_param.go deleted file mode 100644 index a9c2099a..00000000 --- a/v1/models/overwrite_view_param.go +++ /dev/null @@ -1,90 +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" -) - -// OverwriteViewParam Overwrite View Parameters. -// -// Specifies the overwrite parameters for the view. -// -// swagger:model OverwriteViewParam -type OverwriteViewParam struct { - - // Specifies the source view name. - // Required: true - SourceViewName *string `json:"sourceViewName"` - - // Specifies the target view name. - // Required: true - TargetViewName *string `json:"targetViewName"` -} - -// Validate validates this overwrite view param -func (m *OverwriteViewParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceViewName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetViewName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OverwriteViewParam) validateSourceViewName(formats strfmt.Registry) error { - - if err := validate.Required("sourceViewName", "body", m.SourceViewName); err != nil { - return err - } - - return nil -} - -func (m *OverwriteViewParam) validateTargetViewName(formats strfmt.Registry) error { - - if err := validate.Required("targetViewName", "body", m.TargetViewName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this overwrite view param based on context it is used -func (m *OverwriteViewParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OverwriteViewParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OverwriteViewParam) UnmarshalBinary(b []byte) error { - var res OverwriteViewParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/owner_info.go b/v1/models/owner_info.go deleted file mode 100644 index 0ef00d8b..00000000 --- a/v1/models/owner_info.go +++ /dev/null @@ -1,50 +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" -) - -// OwnerInfo Information about a resource (i.e., bucket or object) owner. -// -// swagger:model OwnerInfo -type OwnerInfo struct { - - // Unique identifier of the owner. - UserID *string `json:"userId,omitempty"` -} - -// Validate validates this owner info -func (m *OwnerInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this owner info based on context it is used -func (m *OwnerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OwnerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OwnerInfo) UnmarshalBinary(b []byte) error { - var res OwnerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ownership_controls_rule.go b/v1/models/ownership_controls_rule.go deleted file mode 100644 index 84b7f562..00000000 --- a/v1/models/ownership_controls_rule.go +++ /dev/null @@ -1,50 +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" -) - -// OwnershipControlsRule Proto to define Bucket Ownership Controls configuration Rule. -// -// swagger:model OwnershipControlsRule -type OwnershipControlsRule struct { - - // Defines type of object ownership control. - ObjectOwnership *int32 `json:"objectOwnership,omitempty"` -} - -// Validate validates this ownership controls rule -func (m *OwnershipControlsRule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ownership controls rule based on context it is used -func (m *OwnershipControlsRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OwnershipControlsRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OwnershipControlsRule) UnmarshalBinary(b []byte) error { - var res OwnershipControlsRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_d_b_entity_info.go b/v1/models/p_d_b_entity_info.go deleted file mode 100644 index 6ee0941f..00000000 --- a/v1/models/p_d_b_entity_info.go +++ /dev/null @@ -1,59 +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" -) - -// PDBEntityInfo Proto to capture the Pluggable database information. -// -// swagger:model PDBEntityInfo -type PDBEntityInfo struct { - - // Pluggable database identifier. - DbID *string `json:"dbId,omitempty"` - - // Name of the DB. - Name *string `json:"name,omitempty"` - - // PDB open mode. - OpenMode *int32 `json:"openMode,omitempty"` - - // Size in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this p d b entity info -func (m *PDBEntityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this p d b entity info based on context it is used -func (m *PDBEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PDBEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PDBEntityInfo) UnmarshalBinary(b []byte) error { - var res PDBEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_d_b_restore_param.go b/v1/models/p_d_b_restore_param.go deleted file mode 100644 index 4e0e41fb..00000000 --- a/v1/models/p_d_b_restore_param.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PDBRestoreParam p d b restore param -// -// swagger:model PDBRestoreParam -type PDBRestoreParam struct { - - // During the restore workflow, drop the pdb if the same name pdb exists. - DropPdbsIfExists *bool `json:"dropPdbsIfExists,omitempty"` - - // Restore given list of pdbs to an existing CDB. - ExistingCdb *bool `json:"existingCdb,omitempty"` - - // Whether or not to restore the PDB when restoring the CDB. - // Before this field was added, agent's behavior was to include the PDBs - // provided, there was no exclusion. By keeping the value as default true - // we will ensure the agent behaves the same way if someone upgrades agent - // service and the magneto service is still old. - IncludeInRestore *bool `json:"includeInRestore,omitempty"` - - // List of PDB's to restore or to skip based on "include_in_restore". - PdbEntityInfoVec *CDBEntityInfo `json:"pdbEntityInfoVec,omitempty"` - - // If rename pdb is provided, list of new names for the pdb. - RenamePdbMap []*PDBRestoreParamRenamePdbMapEntry `json:"renamePdbMap"` -} - -// Validate validates this p d b restore param -func (m *PDBRestoreParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePdbEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenamePdbMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PDBRestoreParam) validatePdbEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.PdbEntityInfoVec) { // not required - return nil - } - - if m.PdbEntityInfoVec != nil { - if err := m.PdbEntityInfoVec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfoVec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfoVec") - } - return err - } - } - - return nil -} - -func (m *PDBRestoreParam) validateRenamePdbMap(formats strfmt.Registry) error { - if swag.IsZero(m.RenamePdbMap) { // not required - return nil - } - - for i := 0; i < len(m.RenamePdbMap); i++ { - if swag.IsZero(m.RenamePdbMap[i]) { // not required - continue - } - - if m.RenamePdbMap[i] != nil { - if err := m.RenamePdbMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this p d b restore param based on the context it is used -func (m *PDBRestoreParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePdbEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenamePdbMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PDBRestoreParam) contextValidatePdbEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - if m.PdbEntityInfoVec != nil { - - if swag.IsZero(m.PdbEntityInfoVec) { // not required - return nil - } - - if err := m.PdbEntityInfoVec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbEntityInfoVec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbEntityInfoVec") - } - return err - } - } - - return nil -} - -func (m *PDBRestoreParam) contextValidateRenamePdbMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RenamePdbMap); i++ { - - if m.RenamePdbMap[i] != nil { - - if swag.IsZero(m.RenamePdbMap[i]) { // not required - return nil - } - - if err := m.RenamePdbMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PDBRestoreParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PDBRestoreParam) UnmarshalBinary(b []byte) error { - var res PDBRestoreParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_d_b_restore_param_rename_pdb_map_entry.go b/v1/models/p_d_b_restore_param_rename_pdb_map_entry.go deleted file mode 100644 index d95fbc6a..00000000 --- a/v1/models/p_d_b_restore_param_rename_pdb_map_entry.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" -) - -// PDBRestoreParamRenamePdbMapEntry p d b restore param rename pdb map entry -// -// swagger:model PDBRestoreParam_RenamePdbMapEntry -type PDBRestoreParamRenamePdbMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this p d b restore param rename pdb map entry -func (m *PDBRestoreParamRenamePdbMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this p d b restore param rename pdb map entry based on context it is used -func (m *PDBRestoreParamRenamePdbMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PDBRestoreParamRenamePdbMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PDBRestoreParamRenamePdbMapEntry) UnmarshalBinary(b []byte) error { - var res PDBRestoreParamRenamePdbMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_v_c_info.go b/v1/models/p_v_c_info.go deleted file mode 100644 index b0e4786e..00000000 --- a/v1/models/p_v_c_info.go +++ /dev/null @@ -1,222 +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" -) - -// PVCInfo Message that encapsulates information about a PVC. We only extract relevant -// information from a larger response sent by Kubernetes. -// -// swagger:model PVCInfo -type PVCInfo struct { - - // APIVersion defines the versioned schema of this representation of an - // object. Servers should convert recognized schemas to the latest internal - // value, and may reject unrecognized values. - APIVersion *string `json:"apiVersion,omitempty"` - - // Kind is a string value representing the REST resource this object - // represents. Servers may infer this from the endpoint the client submits - // requests to. - Kind *string `json:"kind,omitempty"` - - // Metadata if any. - Metadata *ObjectMeta `json:"metadata,omitempty"` - - // spec - Spec *PVCInfoPVCSpec `json:"spec,omitempty"` - - // Status of persistent volume claim. - Status *PeristentVolumeStatus `json:"status,omitempty"` -} - -// Validate validates this p v c info -func (m *PVCInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfo) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *PVCInfo) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *PVCInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this p v c info based on the context it is used -func (m *PVCInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfo) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *PVCInfo) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *PVCInfo) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PVCInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PVCInfo) UnmarshalBinary(b []byte) error { - var res PVCInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_v_c_info_p_v_c_spec.go b/v1/models/p_v_c_info_p_v_c_spec.go deleted file mode 100644 index 71fe684e..00000000 --- a/v1/models/p_v_c_info_p_v_c_spec.go +++ /dev/null @@ -1,228 +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" -) - -// PVCInfoPVCSpec Specifications of the PVC. -// -// swagger:model PVCInfo_PVCSpec -type PVCInfoPVCSpec struct { - - // AccessModes contains the desired access modes the volume should have. - AccessModes []string `json:"accessModes"` - - // This field can be used to specify either: - // An existing VolumeSnapshot object - // An existing PVC (PersistentVolumeClaim) - // An existing custom resource/object that implements - // data population. - DataSource *ObjectReference `json:"dataSource,omitempty"` - - // Resources represents the minimum resources the volume should have. - Resources *PVCInfoPVCSpecResources `json:"resources,omitempty"` - - // A label query over volumes to consider for binding. - Selector *LabelSelector `json:"selector,omitempty"` - - // Name of the StorageClass required by the claim. - StorageClassName *string `json:"storageClassName,omitempty"` - - // volumeMode defines what type of volume is required by the claim. - // Value of Filesystem is implied when not included in claim spec. - VolumeMode *string `json:"volumeMode,omitempty"` - - // Name of the volume that is using this PVC. - VolumeName *string `json:"volumeName,omitempty"` -} - -// Validate validates this p v c info p v c spec -func (m *PVCInfoPVCSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSelector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfoPVCSpec) validateDataSource(formats strfmt.Registry) error { - if swag.IsZero(m.DataSource) { // not required - return nil - } - - if m.DataSource != nil { - if err := m.DataSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataSource") - } - return err - } - } - - return nil -} - -func (m *PVCInfoPVCSpec) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - if m.Resources != nil { - if err := m.Resources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources") - } - return err - } - } - - return nil -} - -func (m *PVCInfoPVCSpec) validateSelector(formats strfmt.Registry) error { - if swag.IsZero(m.Selector) { // not required - return nil - } - - if m.Selector != nil { - if err := m.Selector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// ContextValidate validate this p v c info p v c spec based on the context it is used -func (m *PVCInfoPVCSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfoPVCSpec) contextValidateDataSource(ctx context.Context, formats strfmt.Registry) error { - - if m.DataSource != nil { - - if swag.IsZero(m.DataSource) { // not required - return nil - } - - if err := m.DataSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataSource") - } - return err - } - } - - return nil -} - -func (m *PVCInfoPVCSpec) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - if m.Resources != nil { - - if swag.IsZero(m.Resources) { // not required - return nil - } - - if err := m.Resources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources") - } - return err - } - } - - return nil -} - -func (m *PVCInfoPVCSpec) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.Selector != nil { - - if swag.IsZero(m.Selector) { // not required - return nil - } - - if err := m.Selector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PVCInfoPVCSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PVCInfoPVCSpec) UnmarshalBinary(b []byte) error { - var res PVCInfoPVCSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_v_c_info_p_v_c_spec_resources.go b/v1/models/p_v_c_info_p_v_c_spec_resources.go deleted file mode 100644 index f911a8ad..00000000 --- a/v1/models/p_v_c_info_p_v_c_spec_resources.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PVCInfoPVCSpecResources p v c info p v c spec resources -// -// swagger:model PVCInfo_PVCSpec_Resources -type PVCInfoPVCSpecResources struct { - - // Map of requested resources and their values. - Requests []*PVCInfoPVCSpecResourcesRequestsEntry `json:"requests"` -} - -// Validate validates this p v c info p v c spec resources -func (m *PVCInfoPVCSpecResources) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRequests(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfoPVCSpecResources) validateRequests(formats strfmt.Registry) error { - if swag.IsZero(m.Requests) { // not required - return nil - } - - for i := 0; i < len(m.Requests); i++ { - if swag.IsZero(m.Requests[i]) { // not required - continue - } - - if m.Requests[i] != nil { - if err := m.Requests[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requests" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requests" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this p v c info p v c spec resources based on the context it is used -func (m *PVCInfoPVCSpecResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRequests(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PVCInfoPVCSpecResources) contextValidateRequests(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Requests); i++ { - - if m.Requests[i] != nil { - - if swag.IsZero(m.Requests[i]) { // not required - return nil - } - - if err := m.Requests[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("requests" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("requests" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PVCInfoPVCSpecResources) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PVCInfoPVCSpecResources) UnmarshalBinary(b []byte) error { - var res PVCInfoPVCSpecResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/p_v_c_info_p_v_c_spec_resources_requests_entry.go b/v1/models/p_v_c_info_p_v_c_spec_resources_requests_entry.go deleted file mode 100644 index f88344d7..00000000 --- a/v1/models/p_v_c_info_p_v_c_spec_resources_requests_entry.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" -) - -// PVCInfoPVCSpecResourcesRequestsEntry p v c info p v c spec resources requests entry -// -// swagger:model PVCInfo_PVCSpec_Resources_RequestsEntry -type PVCInfoPVCSpecResourcesRequestsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this p v c info p v c spec resources requests entry -func (m *PVCInfoPVCSpecResourcesRequestsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this p v c info p v c spec resources requests entry based on context it is used -func (m *PVCInfoPVCSpecResourcesRequestsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PVCInfoPVCSpecResourcesRequestsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PVCInfoPVCSpecResourcesRequestsEntry) UnmarshalBinary(b []byte) error { - var res PVCInfoPVCSpecResourcesRequestsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/package_details.go b/v1/models/package_details.go deleted file mode 100644 index cdc532df..00000000 --- a/v1/models/package_details.go +++ /dev/null @@ -1,63 +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" -) - -// PackageDetails Package Details -// -// Specifies all of the details of a package that is currently installed -// on the cluster. -// -// swagger:model PackageDetails -type PackageDetails struct { - - // Specifies whether or not downtime is required to update to this package. - DowntimeRequired *bool `json:"downtimeRequired,omitempty"` - - // Specifies the list of IDs of nodes on the cluster where this package is - // currently installed. - InstalledOnNodes []int64 `json:"installedOnNodes"` - - // Specifies the name of the current package. - PackageName *string `json:"packageName,omitempty"` - - // Specifies the release date of this package. - ReleaseDate *string `json:"releaseDate,omitempty"` -} - -// Validate validates this package details -func (m *PackageDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this package details based on context it is used -func (m *PackageDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PackageDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PackageDetails) UnmarshalBinary(b []byte) error { - var res PackageDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pagination_parameters.go b/v1/models/pagination_parameters.go deleted file mode 100644 index fcbbb817..00000000 --- a/v1/models/pagination_parameters.go +++ /dev/null @@ -1,64 +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" -) - -// PaginationParameters Specifies the cursor based pagination parameters for Protection Source and -// its children. Pagination is supported at a given level within the Protection -// Source Hierarchy with the help of before or after cursors. -// A Cursor will always refer to a specific source within the source dataset -// but will be invalidated if the item is removed. -// -// swagger:model PaginationParameters -type PaginationParameters struct { - - // Specifies the entity id starting from which the items are to be returned. - AfterCursorEntityID *int64 `json:"afterCursorEntityId,omitempty"` - - // Specifies the entity id upto which the items are to be returned. - BeforeCursorEntityID *int64 `json:"beforeCursorEntityId,omitempty"` - - // Specifies the entity id for the Node at any level within the Source entity - // hierarchy whose children are to be paginated. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the maximum number of entities to be returned within the page. - PageSize *int64 `json:"pageSize,omitempty"` -} - -// Validate validates this pagination parameters -func (m *PaginationParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pagination parameters based on context it is used -func (m *PaginationParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PaginationParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PaginationParameters) UnmarshalBinary(b []byte) error { - var res PaginationParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/password_strength.go b/v1/models/password_strength.go deleted file mode 100644 index 3ca8388a..00000000 --- a/v1/models/password_strength.go +++ /dev/null @@ -1,116 +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" -) - -// PasswordStrength Specifies the result of the estimation of the password's strength. -// -// swagger:model PasswordStrength -type PasswordStrength struct { - - // Specifies the strength of the password, in one of four categories: kPoor, - // kWeak, kStrong, kExcellent. - // 'kPoor' specifies a poor choice of password. - // 'kWeak' specifies a better than poor, but still a weak password choice. - // 'kStrong' specifies a better than weak, but a strong password choice. - // 'kExcellent' specifies a password choice impossible to guess. - // Enum: ["kPoor","kWeak","kStrong","kExcellent"] - Strength *string `json:"strength,omitempty"` -} - -// Validate validates this password strength -func (m *PasswordStrength) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStrength(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var passwordStrengthTypeStrengthPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPoor","kWeak","kStrong","kExcellent"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - passwordStrengthTypeStrengthPropEnum = append(passwordStrengthTypeStrengthPropEnum, v) - } -} - -const ( - - // PasswordStrengthStrengthKPoor captures enum value "kPoor" - PasswordStrengthStrengthKPoor string = "kPoor" - - // PasswordStrengthStrengthKWeak captures enum value "kWeak" - PasswordStrengthStrengthKWeak string = "kWeak" - - // PasswordStrengthStrengthKStrong captures enum value "kStrong" - PasswordStrengthStrengthKStrong string = "kStrong" - - // PasswordStrengthStrengthKExcellent captures enum value "kExcellent" - PasswordStrengthStrengthKExcellent string = "kExcellent" -) - -// prop value enum -func (m *PasswordStrength) validateStrengthEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, passwordStrengthTypeStrengthPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PasswordStrength) validateStrength(formats strfmt.Registry) error { - if swag.IsZero(m.Strength) { // not required - return nil - } - - // value enum - if err := m.validateStrengthEnum("strength", "body", *m.Strength); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this password strength based on context it is used -func (m *PasswordStrength) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PasswordStrength) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PasswordStrength) UnmarshalBinary(b []byte) error { - var res PasswordStrength - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/password_strength_params.go b/v1/models/password_strength_params.go deleted file mode 100644 index 65f4d821..00000000 --- a/v1/models/password_strength_params.go +++ /dev/null @@ -1,54 +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" -) - -// PasswordStrengthParams Specifies the params required to estimate the strength of a password. -// -// swagger:model PasswordStrengthParams -type PasswordStrengthParams struct { - - // Specifies the password for which the strength has to be estimated. - Password *string `json:"password,omitempty"` - - // Specifies an optional list of inputs that could help determine the pattern - // chosen by the user, to estimate the strength of the password. - UserRelatedInputs []string `json:"userRelatedInputs"` -} - -// Validate validates this password strength params -func (m *PasswordStrengthParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this password strength params based on context it is used -func (m *PasswordStrengthParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PasswordStrengthParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PasswordStrengthParams) UnmarshalBinary(b []byte) error { - var res PasswordStrengthParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pattern.go b/v1/models/pattern.go deleted file mode 100644 index 0967763d..00000000 --- a/v1/models/pattern.go +++ /dev/null @@ -1,59 +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" -) - -// Pattern Proto to represent pattern auxiliary data type. -// -// swagger:model Pattern -type Pattern struct { - - // Whether this pattern is system defined. - IsSystemDefined *bool `json:"isSystemDefined,omitempty"` - - // Name of the pattern. This is marked optional but is required. - Name *string `json:"name,omitempty"` - - // Pattern type. - Type *int32 `json:"type,omitempty"` - - // Value of the pattern. This is marked optional but is required. - Value *string `json:"value,omitempty"` -} - -// Validate validates this pattern -func (m *Pattern) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pattern based on context it is used -func (m *Pattern) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Pattern) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Pattern) UnmarshalBinary(b []byte) error { - var res Pattern - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pattern_request_body.go b/v1/models/pattern_request_body.go deleted file mode 100644 index 6bf75d74..00000000 --- a/v1/models/pattern_request_body.go +++ /dev/null @@ -1,144 +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" -) - -// PatternRequestBody Pattern Request Body. -// -// Specifies details about the pattern which has to be saved. -// -// swagger:model PatternRequestBody -type PatternRequestBody struct { - - // Specifies the data type for which supported patterns can be fetched. - // Required: true - ApplicationDataType *int32 `json:"applicationDataType"` - - // Specifies AWB Application ID. - // Required: true - ApplicationID *int64 `json:"applicationId"` - - // Specifies the pattern details to be saved. - // Required: true - UserPattern *SupportedPattern `json:"userPattern"` -} - -// Validate validates this pattern request body -func (m *PatternRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationDataType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserPattern(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PatternRequestBody) validateApplicationDataType(formats strfmt.Registry) error { - - if err := validate.Required("applicationDataType", "body", m.ApplicationDataType); err != nil { - return err - } - - return nil -} - -func (m *PatternRequestBody) validateApplicationID(formats strfmt.Registry) error { - - if err := validate.Required("applicationId", "body", m.ApplicationID); err != nil { - return err - } - - return nil -} - -func (m *PatternRequestBody) validateUserPattern(formats strfmt.Registry) error { - - if err := validate.Required("userPattern", "body", m.UserPattern); err != nil { - return err - } - - if m.UserPattern != nil { - if err := m.UserPattern.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userPattern") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userPattern") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pattern request body based on the context it is used -func (m *PatternRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserPattern(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PatternRequestBody) contextValidateUserPattern(ctx context.Context, formats strfmt.Registry) error { - - if m.UserPattern != nil { - - if err := m.UserPattern.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userPattern") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userPattern") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PatternRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PatternRequestBody) UnmarshalBinary(b []byte) error { - var res PatternRequestBody - 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 deleted file mode 100644 index 8e4f015b..00000000 --- a/v1/models/perform_restore_job_state_proto.go +++ /dev/null @@ -1,1861 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PerformRestoreJobStateProto Proto to define the persistent information of a wrapper restore job that -// spawns multiple child restore tasks. -// -// swagger:model PerformRestoreJobStateProto -type PerformRestoreJobStateProto struct { - - // The time at which the restore job was admitted to run on a Magneto master. - // This field will be set only after the status changes to 'kAdmitted'. - // Using this field, amount of time spent in the waiting/queued state and the - // amount of time taken taken to actually run the job can be determined. - // wait time = admitted_time_usecs - start_time_usecs - // run time = end_time_usecs - admitted_time_usecs - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // Whether this restore job has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // Whether to continue with the restore operation if restore of any object - // fails. - ContinueRestoreOnError *bool `json:"continueRestoreOnError,omitempty"` - - // Custom Tags will be attached to each temporary and permanant entity - // that will be created during this restore. Currently only being used - // for AWS and restore task type - kRecoverVMs. - CustomTagVec []*CustomTag `json:"customTagVec"` - - // Will contain the details of network used in transferring the data from - // source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // This contains information regarding deploy vm to cloud task state. This is - // set for restore type kConvertAndDeployVMs and kDeployVms. - DeployVmsToCloudTaskState *DeployVMsToCloudTaskStateProto `json:"deployVmsToCloudTaskState,omitempty"` - - // This field defines the download chat specific params for downloading - // chat/post messages for a user/team/channel. - DownloadChatsParams *DownloadChatsParams `json:"downloadChatsParams,omitempty"` - - // This field defines the encryption params for restore task of type - // kRecoverVMs. For recovery to original location, this will not be set. - EncryptionParams *EncryptionParams `json:"encryptionParams,omitempty"` - - // If the restore job has finished, this field contains the end time for the - // job. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered by job (if any). Only valid if the job has finished. - Error *ErrorProto `json:"error,omitempty"` - - // This is set to true by the user in order to restore the objects via SAN - // transport, as opposed to NBDSSL transport. - // NOTE: Not all adapters support this method. Currently only VMware. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // The name of the restore job. - Name *string `json:"name,omitempty"` - - // Parameters to connect to destination nosql parent entity. - NosqlConnectParams *NoSQLConnectParams `json:"nosqlConnectParams,omitempty"` - - // Additional parameters for the recovery job to send to imanis server. - NosqlRecoverJobParams *NoSQLRecoverJobParams `json:"nosqlRecoverJobParams,omitempty"` - - // Information on the exact set of objects being restored (along with - // snapshots they are being recovered from). Even if the user wanted to - // restore an entire job form the latest snapshot, this will have - // individual objects and the exact snapshot they are bein restored from. - // If specified, this can only have leaf-level entities. - Objects []*RestoreObject `json:"objects"` - - // A way to connect to the parent source. - ParentSourceConnectionParams *ConnectorParams `json:"parentSourceConnectionParams,omitempty"` - - // If enabled, magneto physical file restore will be enabled via job - // framework - PhysicalFlrParallelRestore *bool `json:"physicalFlrParallelRestore,omitempty"` - - // The power state configuration to be applied to the restored object. - // Please refer to comments for the field - // CreateRestoreTaskArg.power_state_config for more details. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // Whether to preserve tags for the clone op. - // This field is currently used by HyperV and VMWare. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // Root path of a Pulse task tracking the progress of the restore job. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // By default, objects are restored with their original name. This field can - // be used to specify the transformation ( i.e prefix/suffix) to be applied - // to the source object name to derive the new name of the restored object. - // - // List of env and action type for which this field is applicable are: - // AWS: kCloneVMs, kRecoverVMs. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // An optional parameter to specify how restored vApps(kVirtualApp) are - // renamed. Please refer to comments for the field - // CreateRestoreTaskArg.rename_restored_vapp_param for more details. - RenameRestoredVappParam *RenameObjectParamProto `json:"renameRestoredVappParam,omitempty"` - - // Sha1 checksum of the restore request. This is used to identify the - // duplicate restore requests. - RequestSha1Checksum []uint8 `json:"requestSha1Checksum"` - - // This field defines the Acropolis specific params for restore task of type - // kRecoverVMs. - RestoreAcropolisVmsParams *RestoreAcropolisVMsParams `json:"restoreAcropolisVmsParams,omitempty"` - - // This field defines o365 groups specific params for restore job of type - // kRecoverO365Groups. - RestoreGroupsParams *RestoreO365GroupsParams `json:"restoreGroupsParams,omitempty"` - - // A unique id for this restore job within the cluster. - RestoreJobID *int64 `json:"restoreJobId,omitempty"` - - // A global unique id for this restore job. Note that currently it is used to - // perform tenant migration. - RestoreJobUID *UniversalIDProto `json:"restoreJobUid,omitempty"` - - // This field defines the kubernetes specific params for restore task of type - // kRecoverNamespaces. - RestoreKubernetesNamespacesParams *RestoreKubernetesNamespacesParams `json:"restoreKubernetesNamespacesParams,omitempty"` - - // This field defines the KVM specific params for restore task of type - // kRecoverVMs. - RestoreKvmVmsParams *RestoreKVMVMsParams `json:"restoreKvmVmsParams,omitempty"` - - // 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. - // If 'restored_to_different_source' is set to true, then this field must be - // specified. - RestoreParentSource *EntityProto `json:"restoreParentSource,omitempty"` - - // This field defines the O365 Public Folders specific params for restore - // task of type kRecoverO365PublicFolders. - RestorePublicFoldersParams *RestoreO365PublicFoldersParams `json:"restorePublicFoldersParams,omitempty"` - - // This field defines the S3 specific params for restore task of type - // kRecoverS3Buckets & kRecoverS3Objects. - RestoreS3Params *RestoreS3Params `json:"restoreS3Params,omitempty"` - - // This field defines o365 site specific params for restore job of type - // kRecoverSites. - RestoreSiteParams *RestoreSiteParams `json:"restoreSiteParams,omitempty"` - - // Entity Id of object inside which restored entities will be created. - RestoreTargetEntityID *int64 `json:"restoreTargetEntityId,omitempty"` - - // This will be optionally populated for certain type of restores (FLR for - // now) and can be used as a template proto while creating the actual restore - // task later. - RestoreTaskStateProtoTmpl *PerformRestoreTaskStateProto `json:"restoreTaskStateProtoTmpl,omitempty"` - - // Even if the user wanted to restore an entire job from the latest snapshot, - // this will have info of all the individual objects. - RestoreTaskVec []*PerformRestoreJobStateProtoRestoreTask `json:"restoreTaskVec"` - - // This field defines the O365 Teams specific params for restore task of type - // kRecoverO365Teams. - RestoreTeamsParams *RestoreO365TeamsParams `json:"restoreTeamsParams,omitempty"` - - // This field defines the VMware specific params for restore task of type - // kCloneVMs and kRecoverVMs. - RestoreVmwareVMParams *RestoreVMwareVMParams `json:"restoreVmwareVmParams,omitempty"` - - // This is populated for VMware environment. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Whether restore is being performed to a different parent source. - RestoredToDifferentSource *bool `json:"restoredToDifferentSource,omitempty"` - - // This flag can be set to true to just create the image and not deploy the - // VM. This flag is set to true during the DR operation that is invoked via - // runbooks, the creation of image(AMI in case of AWS) and snapshots of the - // data disk is achieved by invoking a restore of type kConvertAndDeployVMs - // and orchestration of the VMs is achieved by runbooks. - SkipImageDeploy *bool `json:"skipImageDeploy,omitempty"` - - // Whether to skip Rigel for restore or not. This field is applicable only - // for DMaaS. This field is currently being used in DRaaS workflows only. - SkipRigelForRestore *bool `json:"skipRigelForRestore,omitempty"` - - // The start time for this restore job. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Status of the restore job. - Status *int32 `json:"status,omitempty"` - - // Name of the external view that the user specifies for restore operations. - // This field will be used to populate "full_view_name" field in - // PerformRestoreTaskStateProto so that each restore task uses the same view - // to clone the files into. - // This field currently only used for recovery type of kCloneVMs backed up - // using CDP VMs. - TargetViewName *string `json:"targetViewName,omitempty"` - - // The type of restore being performed. - Type *int32 `json:"type,omitempty"` - - // This field defines the uda specific params for restore task of type - // kRecoverUda. - UdaRecoverJobParams *UdaRecoverJobParams `json:"udaRecoverJobParams,omitempty"` - - // The user who requested this restore job. - User *string `json:"user,omitempty"` - - // Specifies information about the user who made the request. - UserInfo *UserInformation `json:"userInfo,omitempty"` - - // The params to use while recovering a vcd entity. - VcdConfig *RestoredObjectVCDConfigProto `json:"vcdConfig,omitempty"` - - // The view box id to which the restore job belongs to. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // The params to use when cloning the view. This contains information about - // the view that is created when the user requests a clone operation. - // Information such as QoS, whitelisting can be provided. - ViewParams *ViewParams `json:"viewParams,omitempty"` - - // Populate warnings on the job if any. The warning messages are propagated - // from the child restore tasks upon completion of the task. - Warnings []*ErrorProto `json:"warnings"` -} - -// Validate validates this perform restore job state proto -func (m *PerformRestoreJobStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCustomTagVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloudTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadChatsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSourceConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredVappParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAcropolisVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreGroupsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreKubernetesNamespacesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreKvmVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestorePublicFoldersParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreS3Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSiteParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTaskStateProtoTmpl(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTaskVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTeamsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVmwareVMParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreJobStateProto) validateCustomTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTagVec) { // not required - return nil - } - - for i := 0; i < len(m.CustomTagVec); i++ { - if swag.IsZero(m.CustomTagVec[i]) { // not required - continue - } - - if m.CustomTagVec[i] != nil { - if err := m.CustomTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateDeployVmsToCloudTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if m.DeployVmsToCloudTaskState != nil { - if err := m.DeployVmsToCloudTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateDownloadChatsParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if m.DownloadChatsParams != nil { - if err := m.DownloadChatsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateEncryptionParams(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if m.EncryptionParams != nil { - if err := m.EncryptionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *PerformRestoreJobStateProto) validateNosqlConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if m.NosqlConnectParams != nil { - if err := m.NosqlConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateNosqlRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlRecoverJobParams) { // not required - return nil - } - - if m.NosqlRecoverJobParams != nil { - if err := m.NosqlRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateParentSourceConnectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if m.ParentSourceConnectionParams != nil { - if err := m.ParentSourceConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRenameRestoredVappParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredVappParam) { // not required - return nil - } - - if m.RenameRestoredVappParam != nil { - if err := m.RenameRestoredVappParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreAcropolisVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAcropolisVmsParams) { // not required - return nil - } - - if m.RestoreAcropolisVmsParams != nil { - if err := m.RestoreAcropolisVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreGroupsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreGroupsParams) { // not required - return nil - } - - if m.RestoreGroupsParams != nil { - if err := m.RestoreGroupsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreGroupsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreJobUID) { // not required - return nil - } - - if m.RestoreJobUID != nil { - if err := m.RestoreJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreJobUid") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreKubernetesNamespacesParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreKubernetesNamespacesParams) { // not required - return nil - } - - if m.RestoreKubernetesNamespacesParams != nil { - if err := m.RestoreKubernetesNamespacesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKubernetesNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKubernetesNamespacesParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreKvmVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreKvmVmsParams) { // not required - return nil - } - - if m.RestoreKvmVmsParams != nil { - if err := m.RestoreKvmVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKvmVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKvmVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestorePublicFoldersParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestorePublicFoldersParams) { // not required - return nil - } - - if m.RestorePublicFoldersParams != nil { - if err := m.RestorePublicFoldersParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreS3Params(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreS3Params) { // not required - return nil - } - - if m.RestoreS3Params != nil { - if err := m.RestoreS3Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreS3Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreS3Params") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if m.RestoreSiteParams != nil { - if err := m.RestoreSiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreTaskStateProtoTmpl(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTaskStateProtoTmpl) { // not required - return nil - } - - if m.RestoreTaskStateProtoTmpl != nil { - if err := m.RestoreTaskStateProtoTmpl.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTaskStateProtoTmpl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTaskStateProtoTmpl") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreTaskVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTaskVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreTaskVec); i++ { - if swag.IsZero(m.RestoreTaskVec[i]) { // not required - continue - } - - if m.RestoreTaskVec[i] != nil { - if err := m.RestoreTaskVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTaskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTaskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreTeamsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTeamsParams) { // not required - return nil - } - - if m.RestoreTeamsParams != nil { - if err := m.RestoreTeamsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTeamsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoreVmwareVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVmwareVMParams) { // not required - return nil - } - - if m.RestoreVmwareVMParams != nil { - if err := m.RestoreVmwareVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVmwareVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVmwareVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateUdaRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaRecoverJobParams) { // not required - return nil - } - - if m.UdaRecoverJobParams != nil { - if err := m.UdaRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateVcdConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if m.VcdConfig != nil { - if err := m.VcdConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this perform restore job state proto based on the context it is used -func (m *PerformRestoreJobStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloudTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadChatsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEncryptionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredVappParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAcropolisVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreGroupsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreKubernetesNamespacesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreKvmVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestorePublicFoldersParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreS3Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTaskStateProtoTmpl(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTaskVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTeamsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVmwareVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateCustomTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTagVec); i++ { - - if m.CustomTagVec[i] != nil { - - if swag.IsZero(m.CustomTagVec[i]) { // not required - return nil - } - - if err := m.CustomTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateDeployVmsToCloudTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudTaskState != nil { - - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if err := m.DeployVmsToCloudTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateDownloadChatsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadChatsParams != nil { - - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if err := m.DownloadChatsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateEncryptionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionParams != nil { - - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if err := m.EncryptionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) 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 -} - -func (m *PerformRestoreJobStateProto) contextValidateNosqlConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlConnectParams != nil { - - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if err := m.NosqlConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateNosqlRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlRecoverJobParams != nil { - - if swag.IsZero(m.NosqlRecoverJobParams) { // not required - return nil - } - - if err := m.NosqlRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateParentSourceConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSourceConnectionParams != nil { - - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if err := m.ParentSourceConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRenameRestoredVappParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredVappParam != nil { - - if swag.IsZero(m.RenameRestoredVappParam) { // not required - return nil - } - - if err := m.RenameRestoredVappParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreAcropolisVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAcropolisVmsParams != nil { - - if swag.IsZero(m.RestoreAcropolisVmsParams) { // not required - return nil - } - - if err := m.RestoreAcropolisVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreGroupsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreGroupsParams != nil { - - if swag.IsZero(m.RestoreGroupsParams) { // not required - return nil - } - - if err := m.RestoreGroupsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreGroupsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreJobUID(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreJobUID != nil { - - if swag.IsZero(m.RestoreJobUID) { // not required - return nil - } - - if err := m.RestoreJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreJobUid") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreKubernetesNamespacesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreKubernetesNamespacesParams != nil { - - if swag.IsZero(m.RestoreKubernetesNamespacesParams) { // not required - return nil - } - - if err := m.RestoreKubernetesNamespacesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKubernetesNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKubernetesNamespacesParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreKvmVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreKvmVmsParams != nil { - - if swag.IsZero(m.RestoreKvmVmsParams) { // not required - return nil - } - - if err := m.RestoreKvmVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKvmVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKvmVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestorePublicFoldersParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestorePublicFoldersParams != nil { - - if swag.IsZero(m.RestorePublicFoldersParams) { // not required - return nil - } - - if err := m.RestorePublicFoldersParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreS3Params(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreS3Params != nil { - - if swag.IsZero(m.RestoreS3Params) { // not required - return nil - } - - if err := m.RestoreS3Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreS3Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreS3Params") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSiteParams != nil { - - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if err := m.RestoreSiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreTaskStateProtoTmpl(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreTaskStateProtoTmpl != nil { - - if swag.IsZero(m.RestoreTaskStateProtoTmpl) { // not required - return nil - } - - if err := m.RestoreTaskStateProtoTmpl.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTaskStateProtoTmpl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTaskStateProtoTmpl") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreTaskVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreTaskVec); i++ { - - if m.RestoreTaskVec[i] != nil { - - if swag.IsZero(m.RestoreTaskVec[i]) { // not required - return nil - } - - if err := m.RestoreTaskVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTaskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTaskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreTeamsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreTeamsParams != nil { - - if swag.IsZero(m.RestoreTeamsParams) { // not required - return nil - } - - if err := m.RestoreTeamsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTeamsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoreVmwareVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVmwareVMParams != nil { - - if swag.IsZero(m.RestoreVmwareVMParams) { // not required - return nil - } - - if err := m.RestoreVmwareVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVmwareVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVmwareVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateUdaRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaRecoverJobParams != nil { - - if swag.IsZero(m.UdaRecoverJobParams) { // not required - return nil - } - - if err := m.UdaRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateVcdConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfig != nil { - - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if err := m.VcdConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProto) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformRestoreJobStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformRestoreJobStateProto) UnmarshalBinary(b []byte) error { - var res PerformRestoreJobStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/perform_restore_job_state_proto_restore_task.go b/v1/models/perform_restore_job_state_proto_restore_task.go deleted file mode 100644 index 915ee1e5..00000000 --- a/v1/models/perform_restore_job_state_proto_restore_task.go +++ /dev/null @@ -1,174 +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" -) - -// PerformRestoreJobStateProtoRestoreTask Information of the object being restored along with the info of the task -// tracking the restore of that object. -// -// swagger:model PerformRestoreJobStateProto_RestoreTask -type PerformRestoreJobStateProtoRestoreTask struct { - - // Information of the object being restored (along with the snapshot it is - // being restored from). - Object *RestoreObject `json:"object,omitempty"` - - // The relative task path of the progress monitor for the restore of the - // above 'object'. - // Please note that this field will be set only after progress monitor is - // created for this restore job. - ObjectProgressMonitorTaskPath *string `json:"objectProgressMonitorTaskPath,omitempty"` - - // Error encountered for the object in the preprocessing step. - // If set, the task will not be scheduled on the slave for restore. - // Ex: This is set in case of VCD recovery when VM with the same name - // exist in the vapp. - PreprocessingError *ErrorProto `json:"preprocessingError,omitempty"` - - // Id of the task tracking the restore of the above 'object'. - TaskID *int64 `json:"taskId,omitempty"` -} - -// Validate validates this perform restore job state proto restore task -func (m *PerformRestoreJobStateProtoRestoreTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreprocessingError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreJobStateProtoRestoreTask) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProtoRestoreTask) validatePreprocessingError(formats strfmt.Registry) error { - if swag.IsZero(m.PreprocessingError) { // not required - return nil - } - - if m.PreprocessingError != nil { - if err := m.PreprocessingError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preprocessingError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preprocessingError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this perform restore job state proto restore task based on the context it is used -func (m *PerformRestoreJobStateProtoRestoreTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreprocessingError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreJobStateProtoRestoreTask) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreJobStateProtoRestoreTask) contextValidatePreprocessingError(ctx context.Context, formats strfmt.Registry) error { - - if m.PreprocessingError != nil { - - if swag.IsZero(m.PreprocessingError) { // not required - return nil - } - - if err := m.PreprocessingError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preprocessingError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preprocessingError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformRestoreJobStateProtoRestoreTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformRestoreJobStateProtoRestoreTask) UnmarshalBinary(b []byte) error { - var res PerformRestoreJobStateProtoRestoreTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/perform_restore_task_state_proto.go b/v1/models/perform_restore_task_state_proto.go deleted file mode 100644 index 9d1d7ab4..00000000 --- a/v1/models/perform_restore_task_state_proto.go +++ /dev/null @@ -1,3129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PerformRestoreTaskStateProto perform restore task state proto -// -// swagger:model PerformRestoreTaskStateProto -type PerformRestoreTaskStateProto struct { - - // Denotes the target for action executor(Bridge / BridgeProxy) on which task - // on slave should execute actions. - ActionExecutorTargetType *int32 `json:"actionExecutorTargetType,omitempty"` - - // Information about the backup runs to lock during this restore. - BackupRunLockVec []*BackupRunID `json:"backupRunLockVec"` - - // Contains basic information about the restore task. - Base *RestoreTaskStateBaseProto `json:"base,omitempty"` - - // This is set if the clone operation has created any objects on the primary - // environment and teardown operation is possible. UI will disable the - // teardown button only if this is not set or set to false. - // NOTE: This won't be reset if the teardown operation subsequently - // completes as teardown state is managed separately. - CanTeardown *bool `json:"canTeardown,omitempty"` - - // The path of the progress monitor for the task that is responsible for - // creating the CDP hydrated view. - CdpRestoreProgressMonitorTaskPath *string `json:"cdpRestoreProgressMonitorTaskPath,omitempty"` - - // The CDP restore helper task which creates the hydrated views for the - // other restores. - CdpRestoreTask *PerformRestoreTaskStateProto `json:"cdpRestoreTask,omitempty"` - - // The id of the task that will create the CDP hydrated view. - CdpRestoreTaskID *int64 `json:"cdpRestoreTaskId,omitempty"` - - // The temporary view where the hydrated disks of the CDP restores are kept. - CdpRestoreViewName *string `json:"cdpRestoreViewName,omitempty"` - - // The id of the child clone task triggered by refresh op. - ChildCloneTaskID *int64 `json:"childCloneTaskId,omitempty"` - - // The following fields are used by clone refresh op. These will be present - // only in case of refresh task op. - // - // The id of the child destroy clone task triggered by refresh op. - ChildDestroyTaskID *int64 `json:"childDestroyTaskId,omitempty"` - - // The information about cloned backup view of an App [ ex. Oracle,SQL]. - // Currently this only contains the clone view information for Oracle, - // which contains the vector of mount-paths where the cloned view got mounted - // on the Oracle Host. - CloneAppViewInfo *CloneAppViewInfoProto `json:"cloneAppViewInfo,omitempty"` - - // This is set only when the restore task is of type kDeployVMs. It contains - // information about the kDeployVMs restore task that is populated by the - // slave. - CloudDeployInfo *CloudDeployInfoProto `json:"cloudDeployInfo,omitempty"` - - // Whether to continue with the restore operation if restore of any object - // fails. - ContinueRestoreOnError *bool `json:"continueRestoreOnError,omitempty"` - - // True iff the target view needs to be created. - CreateView *bool `json:"createView,omitempty"` - - // Custom Tags will be attached to each temporary and permanant entity - // that will be created during this restore. Currently only being used - // for AWS and restore task type - kRecoverVMs. - CustomTagVec []*CustomTag `json:"customTagVec"` - - // Will contain the details of network used in transferring the data from - // source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // Please refer to comments for the field - // CreateRestoreTaskArg.datastore_entity_vec for more details. - DatastoreEntityVec []*EntityProto `json:"datastoreEntityVec"` - - // This contains information regarding deploy vm to cloud task state. This is - // set for restore type kConvertAndDeployVMs. - DeployVmsToCloudTaskState *DeployVMsToCloudTaskStateProto `json:"deployVmsToCloudTaskState,omitempty"` - - // This field defines the download chat specific params for downloading - // chat/post messages for a user/team/channel. - DownloadChatsParams *DownloadChatsParams `json:"downloadChatsParams,omitempty"` - - // This field defines the encryption params for restore task of type - // kRecoverVMs. For recovery to original location, this will not be set. - EncryptionParams *EncryptionParams `json:"encryptionParams,omitempty"` - - // An optional folder entity where the restored objects are placed. - // - // Semantics for a restore task of type kCloneVMs: For a successful restore - // task, it will be always set. For a failed task, it may or may not be set. - // - // Semantics for a restore task of type kRecoverVMs: Folder entity will be - // set only if objects were restored to a different source. - FolderEntity *EntityProto `json:"folderEntity,omitempty"` - - // The full view name (internal or external). This is composed of an optional - // Cohesity specific prefix and the user provided view name. - FullViewName *string `json:"fullViewName,omitempty"` - - // This is set to true if the vm-config.xml need to be copied in the target - // view/folder. - IncludeVMConfig *bool `json:"includeVmConfig,omitempty"` - - // Whether this task is a multi-stage restore task. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // This is set to true by the user in order to restore the objects via SAN - // transport, as opposed to NBDSSL transport. - // NOTE: Not all adapters support this method. Currently only VMware. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Parameters needed for incremental restore. - MirrorParams *MirrorParams `json:"mirrorParams,omitempty"` - - // This contains information regarding mount volumes task state. This is set - // for restore type kMountVolumes. - MountVolumesTaskState *MountVolumesTaskStateProto `json:"mountVolumesTaskState,omitempty"` - - // The id of the task that is created to restore multiple apps. For e.g., - // user requested to restore multiple databases or multiple AD objects. - // When the user requests to restore 'n' objects, we will create 'n+1' - // restore tasks with 'n' child tasks and one multi restore task. The - // relationship is maintained by stamping the id of the multi restore task - // on all the child tasks using this parameter. - MultiRestoreTaskID *int64 `json:"multiRestoreTaskId,omitempty"` - - // This contains information regarding multi-stage restore task/options. - // - // Note that this information can be used inside a subtask created by a - // multi-stage restore task, where the subtask itself is not a multi-stage - // restore task. - MultiStageRestoreTaskState *MultiStageRestoreTaskStateProto `json:"multiStageRestoreTaskState,omitempty"` - - // Parameters to connect to destination nosql parent entity. - NosqlConnectParams *NoSQLConnectParams `json:"nosqlConnectParams,omitempty"` - - // Additional parameters for the recovery job to send to imanis server. - NosqlRecoverJobParams *NoSQLRecoverJobParams `json:"nosqlRecoverJobParams,omitempty"` - - // An optional name to give to the restored object. - ObjectNameDEPRECATED *string `json:"objectName_DEPRECATED,omitempty"` - - // Information on the exact set of objects being restored (along with - // snapshots they are being recovered from). Even if the user wanted to - // restore an entire job from the latest snapshot, this will have - // individual objects and the exact snapshot they are being restored from. - // If specified, this can only have leaf-level entities. - Objects []*RestoreObject `json:"objects"` - - // Vector containing the relative task path of progress monitors of the - // objects in the above field 'objects' to be restored. There is one to one - // correspondence between elements in 'objects' and - // 'objects_progress_monitor_task_paths'. - // - // Please note that this field will be set only after progress monitor is - // created for this restore task. - ObjectsProgressMonitorTaskPaths []string `json:"objectsProgressMonitorTaskPaths"` - - // If this a child restore task, this field will contain the id of the parent - // restore job that spawned this task. - // - // List of env and action type for which this field is applicable are: - // Acropolis: kRecoverVMs. - ParentRestoreJobID *int64 `json:"parentRestoreJobId,omitempty"` - - // The id of the parent restore task if this is a restore sub-task. - // - // List of environments that use this field: - // kSQL : Used for multi-stage SQL restore that supports a hot-standby. - // kVMware: Used for multi-stage restore that supports a hot-standby. - // kCassandra : Used for incremental restore. - // kMongoDB : Used for incremental restore. - // - // This will also be used by refresh op to mark the new clone as internal - // sub-task. - ParentRestoreTaskID *int64 `json:"parentRestoreTaskId,omitempty"` - - // path prefix d e p r e c a t e d - PathPrefixDEPRECATED *string `json:"pathPrefix_DEPRECATED,omitempty"` - - // If enabled, magneto physical file restore will be enabled via job - // framework - PhysicalFlrParallelRestore *bool `json:"physicalFlrParallelRestore,omitempty"` - - // If enabled, magneto physical file restore will be enabled via job - // framework - PhysicalFlrUseNewLockingMethod *bool `json:"physicalFlrUseNewLockingMethod,omitempty"` - - // The power state configuration to be applied to the restored object. - // Please refer to comments for the field - // CreateRestoreTaskArg.power_state_config for more details. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // This field is currently used by HyperV and VMWare. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // Root path of a Pulse task tracking the progress of the restore task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Contains information pertinent to a virtual disk recovery task. This is - // set for restore type kRecoverDisks. - RecoverDisksTaskState *RecoverDisksTaskStateProto `json:"recoverDisksTaskState,omitempty"` - - // Contains information pertinent to a volume recovery task. This is set - // for restore type kRecoverVolumes. - RecoverVolumesTaskState *RecoverVolumesTaskStateProto `json:"recoverVolumesTaskState,omitempty"` - - // The task id of a related restore task. For example, a SQL restore - // operation may involve restoring a VM first and then restoring SQL - // databases after that. So the corresponding VM restore and SQL database - // restore tasks will be related, and they will each have their - // 'related_restore_task_id' set to the id of the other task. - RelatedRestoreTaskID *int64 `json:"relatedRestoreTaskId,omitempty"` - - // An optional parameter to specify how restored objects are renamed. - // Please refer to comments for the field - // CreateRestoreTaskArg.rename_restored_object_param for more details. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // An optional parameter to specify how restored vApps(kVirtualApp) are - // renamed. Please refer to comments for the field - // CreateRestoreTaskArg.rename_restored_vapp_param for more details. - RenameRestoredVappParam *RenameObjectParamProto `json:"renameRestoredVappParam,omitempty"` - - // Sha1 checksum of the restore request. This is used to identify the - // duplicate restore requests. - RequestSha1Checksum []uint8 `json:"requestSha1Checksum"` - - // The resource pool entity where the restored objects will be attached. - // Please refer to comments for the field - // CreateRestoreTaskArg.resource_pool_entity for more details. - ResourcePoolEntity *EntityProto `json:"resourcePoolEntity,omitempty"` - - // This field defines the Acropolis specific params for restore task of type - // kRecoverVMs. - RestoreAcropolisVmsParams *RestoreAcropolisVMsParams `json:"restoreAcropolisVmsParams,omitempty"` - - // This contains information about application restore task state. This is - // set for restore types kRecoverApp/kCloneApp/kCloneRefreshApp. - RestoreAppTaskState *RestoreAppTaskStateProto `json:"restoreAppTaskState,omitempty"` - - // This contains information regarding restore files task state. This is - // set for restore type kRestoreFiles and kDownloadFiles. - // Restore type kConvertToPst also sets this for download zip file path. - RestoreFilesTaskState *RestoreFilesTaskStateProto `json:"restoreFilesTaskState,omitempty"` - - // This field defines the O365 groups specific params for restore task of - // type kRecoverO365Groups. - RestoreGroupsParams *RestoreO365GroupsParams `json:"restoreGroupsParams,omitempty"` - - // This field defines the HyperV specific params for restore tasks of type - // kCloneVMs and kRecoverVMs. - RestoreHypervVMParams *RestoreHyperVVMParams `json:"restoreHypervVmParams,omitempty"` - - // Contains information about this restore task that is populated by the - // slave. - RestoreInfo *RestoreInfoProto `json:"restoreInfo,omitempty"` - - // This field defines the Kubernetes specific params for restore task of - // type kRecoverNamespaces. - RestoreKubernetesNamespacesParams *RestoreKubernetesNamespacesParams `json:"restoreKubernetesNamespacesParams,omitempty"` - - // This field defines the KVM specific params for restore task of type - // kRecoverVMs. - RestoreKvmVmsParams *RestoreKVMVMsParams `json:"restoreKvmVmsParams,omitempty"` - - // This field defines the one drive specific params for restore task of type - // kRecoverO365Drive. - RestoreOneDriveParams *RestoreOneDriveParams `json:"restoreOneDriveParams,omitempty"` - - // This field defines the O365 specific params for restore task of type - // kRecoverEmails. - RestoreOutlookParams *RestoreOutlookParams `json:"restoreOutlookParams,omitempty"` - - // 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. - // If 'restored_to_different_source' is set to true, then this field must be - // specified. - RestoreParentSource *EntityProto `json:"restoreParentSource,omitempty"` - - // This field defines the O365 Public Folders specific params for restore - // task of type kRecoverO365PublicFolders. - RestorePublicFoldersParams *RestoreO365PublicFoldersParams `json:"restorePublicFoldersParams,omitempty"` - - // This field defines the S3 specific params for restore task of type - // kRecoverS3Buckets & kRecoverS3Objects. - RestoreS3Params *RestoreS3Params `json:"restoreS3Params,omitempty"` - - // This field defines the SAN specific params for restore task. For example - // storage pool for Ibm FlashSystem environment. - RestoreSanParams *RestoreSanParams `json:"restoreSanParams,omitempty"` - - // This field defines the O365 site specific params for restore task of type - // kRecoverSites. - RestoreSiteParams *RestoreSiteParams `json:"restoreSiteParams,omitempty"` - - // This contains information regarding standby restore task state. This is - // currently only set for kRecoverVMs restore type for kVMware environment. - RestoreStandbyTaskState *RestoreStandbyTaskStateProto `json:"restoreStandbyTaskState,omitempty"` - - // Inside Magneto, these are represented as regular restore tasks with their - // own PerformRestoreTaskStateProto. Each restore sub-task will have its - // parent_restore_task_id field set. - // - // List of environments that use this field: - // kSQL : Used for multi-stage SQL restore that supports a hot-standby. - // kVMware : User for standby restore to store CDPLogApplyRestoreOp id. - // kOracle : Used for Instant restore for clone. - // kCassandra : Used for incremental restore. - // kMongoDB : Used for incremental restore. - RestoreSubTaskVec []int64 `json:"restoreSubTaskVec"` - - // Entity Id of object inside which restored entities will be created. - RestoreTargetEntityID *int64 `json:"restoreTargetEntityId,omitempty"` - - // Whether the restore task is purged. During WAL recovery, purged restore - // tasks are ignored. - RestoreTaskPurged *bool `json:"restoreTaskPurged,omitempty"` - - // This field defines team specific params for restore task of type - // kRecoverO365Teams. - RestoreTeamsParams *RestoreO365TeamsParams `json:"restoreTeamsParams,omitempty"` - - // The datastore entity where the object's files are restored to. This entity - // corresponds to the datastore created for the Cohesity view on the primary - // source by the restore task. - // - // Please note that this field will be set only for the restore task of type - // kCloneVMs. - RestoreViewDatastoreEntity *EntityProto `json:"restoreViewDatastoreEntity,omitempty"` - - // This field defines the VMware specific params for restore tasks of type - // kCloneVMs and kRecoverVMs. - RestoreVmwareVMParams *RestoreVMwareVMParams `json:"restoreVmwareVmParams,omitempty"` - - // The storage domain id to which the data is restored. - // - // E.g.: For folder download tasks, this denotes the storage domain (view - // box) id in which the zip file created by yoda is stored - in case of CAD - // jobs this could be the auxiliary view box corresponding to the CAD view - // box, and for regular jobs, this is most likely same as the view box used - // by that job. - RestoredDataStorageDomainID *int64 `json:"restoredDataStorageDomainId,omitempty"` - - // The network configuration to be applied to the restored object. - // Please refer to comments for the field - // CreateRestoreTaskArg.restored_objects_network_config for more details. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Whether restore is being performed to a different parent source. - RestoredToDifferentSource *bool `json:"restoredToDifferentSource,omitempty"` - - // The path of the progress monitor for the task that is responsible for - // retrieving the objects from the archive. - RetrieveArchiveProgressMonitorTaskPath *string `json:"retrieveArchiveProgressMonitorTaskPath,omitempty"` - - // The stub view created by Icebox corresponding to the archive. The stub - // view is used to selectively retrieve files and folders. - RetrieveArchiveStubViewName *string `json:"retrieveArchiveStubViewName,omitempty"` - - // The uid of the tasks that will retrieve the objects from the archive. - // Typically we only retrieve one snapshot for an enity but for point in time - // restores for SQL/Oracle database, we may need to retrieve multiple - // snapshots typically one full, and few logs. Hence we may need multiple - // uids to start retrieval task. - RetrieveArchiveTaskUIDVec []*UniversalIDProto `json:"retrieveArchiveTaskUidVec"` - - // Proto that contains all the information about the retrieve archive task. - // Typically we only retrieve one snapshot for an enity but for point in time - // restores for SQL/Oracle database, we may need to retrieve multiple - // snapshots typically one full, and few logs. As we may start the multiple - // retrieval tasks, we need vector of RetrieveArchiveTaskStateProto for - // storing information of retrieved archive tasks. - RetrieveArchiveTaskVec []*RetrieveArchiveTaskStateProto `json:"retrieveArchiveTaskVec"` - - // The temporary view where the entities that have been retrieved from an - // archive have been placed in by Icebox. - RetrieveArchiveViewName *string `json:"retrieveArchiveViewName,omitempty"` - - // In case of restore job with multi-vm multi-datastore this field denotes - // the specific datastore index in datastore_entity_vec to be selected for - // the task. - // Not going for specific datastore allocation in datastore_entity_vec so - // that we have required information in case of extensibility for task level - // retries with different datastore - SelectedDatastoreIdx *int64 `json:"selectedDatastoreIdx,omitempty"` - - // Parameters to connect to destination sfdc parent entity. - SfdcConnectParams *RegisteredEntitySfdcParams `json:"sfdcConnectParams,omitempty"` - - // This field defines the sfdc specific params for restore task of type - // kRecoverSfdc. - SfdcRecoverJobParams *SfdcRecoverJobParams `json:"sfdcRecoverJobParams,omitempty"` - - // The id of restore task which has to completed prior to this restore - // task. - ShouldFinishFirstTaskID *int64 `json:"shouldFinishFirstTaskId,omitempty"` - - // Whether Magneto should use the 'retrieve_archive_stub_view' above for - // restore without cloning it. We are currently setting it for Direct archive - // restores using stub views. - SkipCloningRetrieveArchiveView *bool `json:"skipCloningRetrieveArchiveView,omitempty"` - - // This flag can be set to true to just create the image and not deploy the - // VM. This flag is set to true during the DR operation that is invoked via - // runbooks, the creation of image(AMI in case of AWS) and snapshots of the - // data disk is achieved by invoking a restore of type kConvertAndDeployVMs - // and orchestration of the VMs is achieved by runbooks. - SkipImageDeploy *bool `json:"skipImageDeploy,omitempty"` - - // Whether to skip Rigel for restore or not. This field is applicable only - // for DMaaS. This field is currently being used in DRaaS workflows only. - SkipRigelForRestore *bool `json:"skipRigelForRestore,omitempty"` - - // Relative directory inside the stub view that corresponds with the archive. - StubViewRelativeDirName *string `json:"stubViewRelativeDirName,omitempty"` - - // This field defines the uda specific params for restore task of type - // kRecoverUda. - UdaRecoverJobParams *UdaRecoverJobParams `json:"udaRecoverJobParams,omitempty"` - - // Params to be passed to Icebox while restoring data from an archive. - VaultRestoreParams *VaultParamsRestoreParams `json:"vaultRestoreParams,omitempty"` - - // VApp config for the restored object. - VcdConfig *RestoredObjectVCDConfigProto `json:"vcdConfig,omitempty"` - - // This field is applicable for VCD type recovery. It defines the compatible - // datastores for recovery to alternate location. - // This field is inferred using the storage profile in - // restore_vmware_vm_params below. - VcdStorageProfileDatastoreMorefVec []string `json:"vcdStorageProfileDatastoreMorefVec"` - - // The view box id to which 'view_name' belongs to. In case the restore task - // corresponds to a backup job, this view box corresponds to the view box of - // the backup job. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // The view name as provided by the user for this restore operation. - ViewNameDEPRECATED *string `json:"viewName_DEPRECATED,omitempty"` - - // The params to use when cloning the view. - ViewParams *ViewParams `json:"viewParams,omitempty"` - - // Whether VM restore should reuse the cdp restore view while VM recovery. - VMRestoreReuseCdpView *bool `json:"vmRestoreReuseCdpView,omitempty"` - - // Information regarding volumes that are required for the restore task. This - // is populated for restore files and mount virtual disk ops. - VolumeInfoVec []*VolumeInfo `json:"volumeInfoVec"` -} - -// Validate validates this perform restore task state proto -func (m *PerformRestoreTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunLockVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpRestoreTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneAppViewInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomTagVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloudTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadChatsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFolderEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMirrorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumesTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMultiStageRestoreTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverDisksTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVolumesTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredVappParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAcropolisVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreFilesTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreGroupsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreHypervVMParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreKubernetesNamespacesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreKvmVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreOneDriveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreOutlookParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestorePublicFoldersParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreS3Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSiteParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreStandbyTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTeamsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreViewDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVmwareVMParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetrieveArchiveTaskUIDVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetrieveArchiveTaskVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaRecoverJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreTaskStateProto) validateBackupRunLockVec(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunLockVec) { // not required - return nil - } - - for i := 0; i < len(m.BackupRunLockVec); i++ { - if swag.IsZero(m.BackupRunLockVec[i]) { // not required - continue - } - - if m.BackupRunLockVec[i] != nil { - if err := m.BackupRunLockVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunLockVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunLockVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateBase(formats strfmt.Registry) error { - if swag.IsZero(m.Base) { // not required - return nil - } - - if m.Base != nil { - if err := m.Base.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateCdpRestoreTask(formats strfmt.Registry) error { - if swag.IsZero(m.CdpRestoreTask) { // not required - return nil - } - - if m.CdpRestoreTask != nil { - if err := m.CdpRestoreTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpRestoreTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpRestoreTask") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateCloneAppViewInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloneAppViewInfo) { // not required - return nil - } - - if m.CloneAppViewInfo != nil { - if err := m.CloneAppViewInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneAppViewInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneAppViewInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateCloudDeployInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployInfo) { // not required - return nil - } - - if m.CloudDeployInfo != nil { - if err := m.CloudDeployInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateCustomTagVec(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTagVec) { // not required - return nil - } - - for i := 0; i < len(m.CustomTagVec); i++ { - if swag.IsZero(m.CustomTagVec[i]) { // not required - continue - } - - if m.CustomTagVec[i] != nil { - if err := m.CustomTagVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateDatastoreEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - continue - } - - if m.DatastoreEntityVec[i] != nil { - if err := m.DatastoreEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateDeployVmsToCloudTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if m.DeployVmsToCloudTaskState != nil { - if err := m.DeployVmsToCloudTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateDownloadChatsParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if m.DownloadChatsParams != nil { - if err := m.DownloadChatsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateEncryptionParams(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if m.EncryptionParams != nil { - if err := m.EncryptionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateFolderEntity(formats strfmt.Registry) error { - if swag.IsZero(m.FolderEntity) { // not required - return nil - } - - if m.FolderEntity != nil { - if err := m.FolderEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateMirrorParams(formats strfmt.Registry) error { - if swag.IsZero(m.MirrorParams) { // not required - return nil - } - - if m.MirrorParams != nil { - if err := m.MirrorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mirrorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mirrorParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateMountVolumesTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumesTaskState) { // not required - return nil - } - - if m.MountVolumesTaskState != nil { - if err := m.MountVolumesTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateMultiStageRestoreTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageRestoreTaskState) { // not required - return nil - } - - if m.MultiStageRestoreTaskState != nil { - if err := m.MultiStageRestoreTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateNosqlConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if m.NosqlConnectParams != nil { - if err := m.NosqlConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateNosqlRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlRecoverJobParams) { // not required - return nil - } - - if m.NosqlRecoverJobParams != nil { - if err := m.NosqlRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRecoverDisksTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverDisksTaskState) { // not required - return nil - } - - if m.RecoverDisksTaskState != nil { - if err := m.RecoverDisksTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverDisksTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverDisksTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRecoverVolumesTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVolumesTaskState) { // not required - return nil - } - - if m.RecoverVolumesTaskState != nil { - if err := m.RecoverVolumesTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRenameRestoredVappParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredVappParam) { // not required - return nil - } - - if m.RenameRestoredVappParam != nil { - if err := m.RenameRestoredVappParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreAcropolisVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAcropolisVmsParams) { // not required - return nil - } - - if m.RestoreAcropolisVmsParams != nil { - if err := m.RestoreAcropolisVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreAppTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppTaskState) { // not required - return nil - } - - if m.RestoreAppTaskState != nil { - if err := m.RestoreAppTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreFilesTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreFilesTaskState) { // not required - return nil - } - - if m.RestoreFilesTaskState != nil { - if err := m.RestoreFilesTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreGroupsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreGroupsParams) { // not required - return nil - } - - if m.RestoreGroupsParams != nil { - if err := m.RestoreGroupsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreGroupsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreHypervVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreHypervVMParams) { // not required - return nil - } - - if m.RestoreHypervVMParams != nil { - if err := m.RestoreHypervVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreHypervVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreHypervVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if m.RestoreInfo != nil { - if err := m.RestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreKubernetesNamespacesParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreKubernetesNamespacesParams) { // not required - return nil - } - - if m.RestoreKubernetesNamespacesParams != nil { - if err := m.RestoreKubernetesNamespacesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKubernetesNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKubernetesNamespacesParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreKvmVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreKvmVmsParams) { // not required - return nil - } - - if m.RestoreKvmVmsParams != nil { - if err := m.RestoreKvmVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKvmVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKvmVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreOneDriveParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreOneDriveParams) { // not required - return nil - } - - if m.RestoreOneDriveParams != nil { - if err := m.RestoreOneDriveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreOneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreOneDriveParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreOutlookParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreOutlookParams) { // not required - return nil - } - - if m.RestoreOutlookParams != nil { - if err := m.RestoreOutlookParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreOutlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreOutlookParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestorePublicFoldersParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestorePublicFoldersParams) { // not required - return nil - } - - if m.RestorePublicFoldersParams != nil { - if err := m.RestorePublicFoldersParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreS3Params(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreS3Params) { // not required - return nil - } - - if m.RestoreS3Params != nil { - if err := m.RestoreS3Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreS3Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreS3Params") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreSanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSanParams) { // not required - return nil - } - - if m.RestoreSanParams != nil { - if err := m.RestoreSanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSanParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if m.RestoreSiteParams != nil { - if err := m.RestoreSiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreStandbyTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreStandbyTaskState) { // not required - return nil - } - - if m.RestoreStandbyTaskState != nil { - if err := m.RestoreStandbyTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreStandbyTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreStandbyTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreTeamsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTeamsParams) { // not required - return nil - } - - if m.RestoreTeamsParams != nil { - if err := m.RestoreTeamsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTeamsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreViewDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreViewDatastoreEntity) { // not required - return nil - } - - if m.RestoreViewDatastoreEntity != nil { - if err := m.RestoreViewDatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreViewDatastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreViewDatastoreEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoreVmwareVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVmwareVMParams) { // not required - return nil - } - - if m.RestoreVmwareVMParams != nil { - if err := m.RestoreVmwareVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVmwareVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVmwareVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRetrieveArchiveTaskUIDVec(formats strfmt.Registry) error { - if swag.IsZero(m.RetrieveArchiveTaskUIDVec) { // not required - return nil - } - - for i := 0; i < len(m.RetrieveArchiveTaskUIDVec); i++ { - if swag.IsZero(m.RetrieveArchiveTaskUIDVec[i]) { // not required - continue - } - - if m.RetrieveArchiveTaskUIDVec[i] != nil { - if err := m.RetrieveArchiveTaskUIDVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTaskUidVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTaskUidVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateRetrieveArchiveTaskVec(formats strfmt.Registry) error { - if swag.IsZero(m.RetrieveArchiveTaskVec) { // not required - return nil - } - - for i := 0; i < len(m.RetrieveArchiveTaskVec); i++ { - if swag.IsZero(m.RetrieveArchiveTaskVec[i]) { // not required - continue - } - - if m.RetrieveArchiveTaskVec[i] != nil { - if err := m.RetrieveArchiveTaskVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTaskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTaskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateSfdcConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcConnectParams) { // not required - return nil - } - - if m.SfdcConnectParams != nil { - if err := m.SfdcConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateSfdcRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcRecoverJobParams) { // not required - return nil - } - - if m.SfdcRecoverJobParams != nil { - if err := m.SfdcRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateUdaRecoverJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaRecoverJobParams) { // not required - return nil - } - - if m.UdaRecoverJobParams != nil { - if err := m.UdaRecoverJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateVaultRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if m.VaultRestoreParams != nil { - if err := m.VaultRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateVcdConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if m.VcdConfig != nil { - if err := m.VcdConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) validateVolumeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfoVec); i++ { - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - continue - } - - if m.VolumeInfoVec[i] != nil { - if err := m.VolumeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this perform restore task state proto based on the context it is used -func (m *PerformRestoreTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRunLockVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBase(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpRestoreTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneAppViewInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomTagVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloudTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadChatsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEncryptionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFolderEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMirrorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumesTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMultiStageRestoreTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverDisksTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVolumesTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredVappParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAcropolisVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreFilesTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreGroupsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreHypervVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreKubernetesNamespacesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreKvmVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreOneDriveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreOutlookParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestorePublicFoldersParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreS3Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreStandbyTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTeamsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreViewDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVmwareVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetrieveArchiveTaskUIDVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetrieveArchiveTaskVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaRecoverJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaultRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateBackupRunLockVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupRunLockVec); i++ { - - if m.BackupRunLockVec[i] != nil { - - if swag.IsZero(m.BackupRunLockVec[i]) { // not required - return nil - } - - if err := m.BackupRunLockVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunLockVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunLockVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateBase(ctx context.Context, formats strfmt.Registry) error { - - if m.Base != nil { - - if swag.IsZero(m.Base) { // not required - return nil - } - - if err := m.Base.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("base") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("base") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateCdpRestoreTask(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpRestoreTask != nil { - - if swag.IsZero(m.CdpRestoreTask) { // not required - return nil - } - - if err := m.CdpRestoreTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpRestoreTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpRestoreTask") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateCloneAppViewInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloneAppViewInfo != nil { - - if swag.IsZero(m.CloneAppViewInfo) { // not required - return nil - } - - if err := m.CloneAppViewInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneAppViewInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneAppViewInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateCloudDeployInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudDeployInfo != nil { - - if swag.IsZero(m.CloudDeployInfo) { // not required - return nil - } - - if err := m.CloudDeployInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateCustomTagVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTagVec); i++ { - - if m.CustomTagVec[i] != nil { - - if swag.IsZero(m.CustomTagVec[i]) { // not required - return nil - } - - if err := m.CustomTagVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateDatastoreEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - - if m.DatastoreEntityVec[i] != nil { - - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - return nil - } - - if err := m.DatastoreEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateDeployVmsToCloudTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudTaskState != nil { - - if swag.IsZero(m.DeployVmsToCloudTaskState) { // not required - return nil - } - - if err := m.DeployVmsToCloudTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateDownloadChatsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadChatsParams != nil { - - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if err := m.DownloadChatsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateEncryptionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionParams != nil { - - if swag.IsZero(m.EncryptionParams) { // not required - return nil - } - - if err := m.EncryptionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateFolderEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.FolderEntity != nil { - - if swag.IsZero(m.FolderEntity) { // not required - return nil - } - - if err := m.FolderEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateMirrorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MirrorParams != nil { - - if swag.IsZero(m.MirrorParams) { // not required - return nil - } - - if err := m.MirrorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mirrorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mirrorParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateMountVolumesTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumesTaskState != nil { - - if swag.IsZero(m.MountVolumesTaskState) { // not required - return nil - } - - if err := m.MountVolumesTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateMultiStageRestoreTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.MultiStageRestoreTaskState != nil { - - if swag.IsZero(m.MultiStageRestoreTaskState) { // not required - return nil - } - - if err := m.MultiStageRestoreTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateNosqlConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlConnectParams != nil { - - if swag.IsZero(m.NosqlConnectParams) { // not required - return nil - } - - if err := m.NosqlConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateNosqlRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlRecoverJobParams != nil { - - if swag.IsZero(m.NosqlRecoverJobParams) { // not required - return nil - } - - if err := m.NosqlRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRecoverDisksTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverDisksTaskState != nil { - - if swag.IsZero(m.RecoverDisksTaskState) { // not required - return nil - } - - if err := m.RecoverDisksTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverDisksTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverDisksTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRecoverVolumesTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVolumesTaskState != nil { - - if swag.IsZero(m.RecoverVolumesTaskState) { // not required - return nil - } - - if err := m.RecoverVolumesTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRenameRestoredVappParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredVappParam != nil { - - if swag.IsZero(m.RenameRestoredVappParam) { // not required - return nil - } - - if err := m.RenameRestoredVappParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParam") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreAcropolisVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAcropolisVmsParams != nil { - - if swag.IsZero(m.RestoreAcropolisVmsParams) { // not required - return nil - } - - if err := m.RestoreAcropolisVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreAppTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAppTaskState != nil { - - if swag.IsZero(m.RestoreAppTaskState) { // not required - return nil - } - - if err := m.RestoreAppTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreFilesTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreFilesTaskState != nil { - - if swag.IsZero(m.RestoreFilesTaskState) { // not required - return nil - } - - if err := m.RestoreFilesTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreGroupsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreGroupsParams != nil { - - if swag.IsZero(m.RestoreGroupsParams) { // not required - return nil - } - - if err := m.RestoreGroupsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreGroupsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreHypervVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreHypervVMParams != nil { - - if swag.IsZero(m.RestoreHypervVMParams) { // not required - return nil - } - - if err := m.RestoreHypervVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreHypervVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreHypervVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreInfo != nil { - - if swag.IsZero(m.RestoreInfo) { // not required - return nil - } - - if err := m.RestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreInfo") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreKubernetesNamespacesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreKubernetesNamespacesParams != nil { - - if swag.IsZero(m.RestoreKubernetesNamespacesParams) { // not required - return nil - } - - if err := m.RestoreKubernetesNamespacesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKubernetesNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKubernetesNamespacesParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreKvmVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreKvmVmsParams != nil { - - if swag.IsZero(m.RestoreKvmVmsParams) { // not required - return nil - } - - if err := m.RestoreKvmVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreKvmVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreKvmVmsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreOneDriveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreOneDriveParams != nil { - - if swag.IsZero(m.RestoreOneDriveParams) { // not required - return nil - } - - if err := m.RestoreOneDriveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreOneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreOneDriveParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreOutlookParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreOutlookParams != nil { - - if swag.IsZero(m.RestoreOutlookParams) { // not required - return nil - } - - if err := m.RestoreOutlookParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreOutlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreOutlookParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestorePublicFoldersParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestorePublicFoldersParams != nil { - - if swag.IsZero(m.RestorePublicFoldersParams) { // not required - return nil - } - - if err := m.RestorePublicFoldersParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreS3Params(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreS3Params != nil { - - if swag.IsZero(m.RestoreS3Params) { // not required - return nil - } - - if err := m.RestoreS3Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreS3Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreS3Params") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreSanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSanParams != nil { - - if swag.IsZero(m.RestoreSanParams) { // not required - return nil - } - - if err := m.RestoreSanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSanParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSiteParams != nil { - - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if err := m.RestoreSiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreStandbyTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreStandbyTaskState != nil { - - if swag.IsZero(m.RestoreStandbyTaskState) { // not required - return nil - } - - if err := m.RestoreStandbyTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreStandbyTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreStandbyTaskState") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreTeamsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreTeamsParams != nil { - - if swag.IsZero(m.RestoreTeamsParams) { // not required - return nil - } - - if err := m.RestoreTeamsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTeamsParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreViewDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreViewDatastoreEntity != nil { - - if swag.IsZero(m.RestoreViewDatastoreEntity) { // not required - return nil - } - - if err := m.RestoreViewDatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreViewDatastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreViewDatastoreEntity") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoreVmwareVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVmwareVMParams != nil { - - if swag.IsZero(m.RestoreVmwareVMParams) { // not required - return nil - } - - if err := m.RestoreVmwareVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVmwareVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVmwareVmParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRetrieveArchiveTaskUIDVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RetrieveArchiveTaskUIDVec); i++ { - - if m.RetrieveArchiveTaskUIDVec[i] != nil { - - if swag.IsZero(m.RetrieveArchiveTaskUIDVec[i]) { // not required - return nil - } - - if err := m.RetrieveArchiveTaskUIDVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTaskUidVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTaskUidVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateRetrieveArchiveTaskVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RetrieveArchiveTaskVec); i++ { - - if m.RetrieveArchiveTaskVec[i] != nil { - - if swag.IsZero(m.RetrieveArchiveTaskVec[i]) { // not required - return nil - } - - if err := m.RetrieveArchiveTaskVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTaskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTaskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateSfdcConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcConnectParams != nil { - - if swag.IsZero(m.SfdcConnectParams) { // not required - return nil - } - - if err := m.SfdcConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcConnectParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateSfdcRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcRecoverJobParams != nil { - - if swag.IsZero(m.SfdcRecoverJobParams) { // not required - return nil - } - - if err := m.SfdcRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateUdaRecoverJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaRecoverJobParams != nil { - - if swag.IsZero(m.UdaRecoverJobParams) { // not required - return nil - } - - if err := m.UdaRecoverJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverJobParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateVaultRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VaultRestoreParams != nil { - - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if err := m.VaultRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateVcdConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfig != nil { - - if swag.IsZero(m.VcdConfig) { // not required - return nil - } - - if err := m.VcdConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfig") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *PerformRestoreTaskStateProto) contextValidateVolumeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfoVec); i++ { - - if m.VolumeInfoVec[i] != nil { - - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - return nil - } - - if err := m.VolumeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformRestoreTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformRestoreTaskStateProto) UnmarshalBinary(b []byte) error { - var res PerformRestoreTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/peristent_volume_status.go b/v1/models/peristent_volume_status.go deleted file mode 100644 index 80a381d0..00000000 --- a/v1/models/peristent_volume_status.go +++ /dev/null @@ -1,50 +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" -) - -// PeristentVolumeStatus Message to encapsulate status of a persistent volume. -// -// swagger:model PeristentVolumeStatus -type PeristentVolumeStatus struct { - - // 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 { - return nil -} - -// ContextValidate validates this peristent volume status based on context it is used -func (m *PeristentVolumeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PeristentVolumeStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PeristentVolumeStatus) UnmarshalBinary(b []byte) error { - var res PeristentVolumeStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/permission.go b/v1/models/permission.go deleted file mode 100644 index 3e35190d..00000000 --- a/v1/models/permission.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Permission Defines the access that a delegate has to a folder. -// -// swagger:model Permission -type Permission struct { - - // Indicates whether a user has permission to create items in a folder. - CanCreateItems *bool `json:"canCreateItems,omitempty"` - - // Indicates whether a user has permission to create sub-folders in a - // folder. - CanCreateSubFolders *bool `json:"canCreateSubFolders,omitempty"` - - // Indicates whether a user has permission to edit items in a folder. - DeleteItems *int32 `json:"deleteItems,omitempty"` - - // Indicates whether a user has permission to delete items in a folder. - EditItems *int32 `json:"editItems,omitempty"` - - // Indicates whether a user is a contact for a folder. - IsFolderContact *bool `json:"isFolderContact,omitempty"` - - // Indicates whether a user is the owner of a folder. - IsFolderOwner *bool `json:"isFolderOwner,omitempty"` - - // Indicates whether a user can view a folder. - IsFolderVisible *bool `json:"isFolderVisible,omitempty"` - - // Represents the combination of permissions that a user has on a folder. - PermissionLevel *int32 `json:"permissionLevel,omitempty"` - - // Indicates whether a user has permission to read items within a folder. - ReadItems *int32 `json:"readItems,omitempty"` - - // Identifies a delegate user or a user who has folder access - // permissions. - UserID *PrivateUserID `json:"userId,omitempty"` -} - -// Validate validates this permission -func (m *Permission) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Permission) validateUserID(formats strfmt.Registry) error { - if swag.IsZero(m.UserID) { // not required - return nil - } - - if m.UserID != nil { - if err := m.UserID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this permission based on the context it is used -func (m *Permission) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Permission) contextValidateUserID(ctx context.Context, formats strfmt.Registry) error { - - if m.UserID != nil { - - if swag.IsZero(m.UserID) { // not required - return nil - } - - if err := m.UserID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Permission) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Permission) UnmarshalBinary(b []byte) error { - var res Permission - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/permission_set.go b/v1/models/permission_set.go deleted file mode 100644 index dbc747ac..00000000 --- a/v1/models/permission_set.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PermissionSet Contains all the configured permissions for a folder. -// -// swagger:model PermissionSet -type PermissionSet struct { - - // Contains the collection of permissions for a folder. - Permissions []*Permission `json:"permissions"` - - // Contains an array of unknown entries that cannot be resolved against - // the Active Directory directory service. - UnknownEntries []string `json:"unknownEntries"` -} - -// Validate validates this permission set -func (m *PermissionSet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PermissionSet) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this permission set based on the context it is used -func (m *PermissionSet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PermissionSet) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PermissionSet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PermissionSet) UnmarshalBinary(b []byte) error { - var res PermissionSet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_backup_env_params.go b/v1/models/physical_backup_env_params.go deleted file mode 100644 index 561a3d81..00000000 --- a/v1/models/physical_backup_env_params.go +++ /dev/null @@ -1,125 +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" -) - -// PhysicalBackupEnvParams Physical Backup Environment Parameters. -// -// Message to capture any additional backup params for a Physical environment. -// -// swagger:model PhysicalBackupEnvParams -type PhysicalBackupEnvParams struct { - - // Whether CoBMR backup is enabled. If true, Cristie executables will be run - // in agent so that bare metal restore can be performed. - CobmrBackup *bool `json:"cobmrBackup,omitempty"` - - // If this is set to true, then incremental backup will be performed - // after the server restarts, otherwise a full-backup will be done. - // NOTE: This is applicable to windows host environments. - EnableIncrementalBackupAfterRestart *bool `json:"enableIncrementalBackupAfterRestart,omitempty"` - - // The filtering policy to decide which objects within a source should be - // backed up. If this is not specified, then all of the objects within the - // source will be backed up. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` - - // List of VSS writers that are excluded. - VssExcludedWriters []string `json:"vssExcludedWriters"` -} - -// Validate validates this physical backup env params -func (m *PhysicalBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupEnvParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical backup env params based on the context it is used -func (m *PhysicalBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupEnvParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalBackupEnvParams) UnmarshalBinary(b []byte) error { - var res PhysicalBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_backup_params.go b/v1/models/physical_backup_params.go deleted file mode 100644 index d3b4a81f..00000000 --- a/v1/models/physical_backup_params.go +++ /dev/null @@ -1,146 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PhysicalBackupParams This message contains additional params for a Physical job run. -// -// swagger:model PhysicalBackupParams -type PhysicalBackupParams struct { - - // This is set to true if alignment of end offset in disk areas is enabled. - // TODO(Chinmaya): This is present for handling upgrades while backup run is - // active. This can be removed in 4.5. - DiskAreaAlignEndOffsetEnabled *bool `json:"diskAreaAlignEndOffsetEnabled,omitempty"` - - // This is set to true if the disk areas have to be aligned on an incremental - // backup. - // TODO(Chinmaya): This is present for handling upgrades while backup run is - // active. This can be removed in 4.5 - DiskAreaAlignmentForIncBackupEnabled *bool `json:"diskAreaAlignmentForIncBackupEnabled,omitempty"` - - // Allows Magneto Slave to drive an additional "system backup" via a - // 3rd-party application. - IncludeSystemBackup *bool `json:"includeSystemBackup,omitempty"` - - // This field can be populated during run-now requests for physical file - // based backups for some specific host entity. If specified, it will - // override any default metadata/directive file path set at the job level - // for the host. Also note that if the job default does not specify a - // metadata/directive file path for the host, then specifying this field - // for that host during run-now request will be rejected. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` - - // This contains the map of volume guid to device key as present in master. - // This will be referred to while generating the device key for newly - // discovered volumes. - VolumeGUIDDeviceKeyMap []*PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry `json:"volumeGuidDeviceKeyMap"` -} - -// Validate validates this physical backup params -func (m *PhysicalBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeGUIDDeviceKeyMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupParams) validateVolumeGUIDDeviceKeyMap(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeGUIDDeviceKeyMap) { // not required - return nil - } - - for i := 0; i < len(m.VolumeGUIDDeviceKeyMap); i++ { - if swag.IsZero(m.VolumeGUIDDeviceKeyMap[i]) { // not required - continue - } - - if m.VolumeGUIDDeviceKeyMap[i] != nil { - if err := m.VolumeGUIDDeviceKeyMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeGuidDeviceKeyMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeGuidDeviceKeyMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this physical backup params based on the context it is used -func (m *PhysicalBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeGUIDDeviceKeyMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupParams) contextValidateVolumeGUIDDeviceKeyMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeGUIDDeviceKeyMap); i++ { - - if m.VolumeGUIDDeviceKeyMap[i] != nil { - - if swag.IsZero(m.VolumeGUIDDeviceKeyMap[i]) { // not required - return nil - } - - if err := m.VolumeGUIDDeviceKeyMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeGuidDeviceKeyMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeGuidDeviceKeyMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalBackupParams) UnmarshalBinary(b []byte) error { - var res PhysicalBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_backup_params_volume_guid_device_key_map_entry.go b/v1/models/physical_backup_params_volume_guid_device_key_map_entry.go deleted file mode 100644 index f7811823..00000000 --- a/v1/models/physical_backup_params_volume_guid_device_key_map_entry.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" -) - -// PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry physical backup params volume Guid device key map entry -// -// swagger:model PhysicalBackupParams_VolumeGuidDeviceKeyMapEntry -type PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this physical backup params volume Guid device key map entry -func (m *PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical backup params volume Guid device key map entry based on context it is used -func (m *PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry) UnmarshalBinary(b []byte) error { - var res PhysicalBackupParamsVolumeGUIDDeviceKeyMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_backup_source_params.go b/v1/models/physical_backup_source_params.go deleted file mode 100644 index cb5dda9d..00000000 --- a/v1/models/physical_backup_source_params.go +++ /dev/null @@ -1,224 +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" -) - -// PhysicalBackupSourceParams Physical Backup Source Parameters. -// -// Message to capture additional backup params for a Physical type source. -// -// swagger:model PhysicalBackupSourceParams -type PhysicalBackupSourceParams struct { - - // Allows Magneto to drive a "system" backup using a 3rd-party tool installed - // on the Agent host. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` - - // If the backup job type is kPhysicalFiles, this field should be set to - // specify the files to be backed up from the volumes on this source. - FileBackupParams *PhysicalFileBackupParams `json:"fileBackupParams,omitempty"` - - // This captures params to use for taking the snapshot. - SnapshotParams *PhysicalSnapshotParams `json:"snapshotParams,omitempty"` - - // This message will capture params for applications that are running as - // part of the server. - SourceAppParams *SourceAppParams `json:"sourceAppParams,omitempty"` - - // If this list is non-empty, then only volumes in this will be - // protected, otherwise all volumes belonging to the host will be - // protected. - VolumeGUIDVec []string `json:"volumeGuidVec"` -} - -// Validate validates this physical backup source params -func (m *PhysicalBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupSourceParams) validateFileBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileBackupParams) { // not required - return nil - } - - if m.FileBackupParams != nil { - if err := m.FileBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileBackupParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalBackupSourceParams) validateSnapshotParams(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if m.SnapshotParams != nil { - if err := m.SnapshotParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalBackupSourceParams) validateSourceAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if m.SourceAppParams != nil { - if err := m.SourceAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical backup source params based on the context it is used -func (m *PhysicalBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalBackupSourceParams) contextValidateFileBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileBackupParams != nil { - - if swag.IsZero(m.FileBackupParams) { // not required - return nil - } - - if err := m.FileBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileBackupParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalBackupSourceParams) contextValidateSnapshotParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotParams != nil { - - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if err := m.SnapshotParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalBackupSourceParams) contextValidateSourceAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceAppParams != nil { - - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if err := m.SourceAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalBackupSourceParams) UnmarshalBinary(b []byte) error { - var res PhysicalBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_env_job_parameters.go b/v1/models/physical_env_job_parameters.go deleted file mode 100644 index ca4f7c11..00000000 --- a/v1/models/physical_env_job_parameters.go +++ /dev/null @@ -1,124 +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" -) - -// PhysicalEnvJobParameters Physical Environment Job Parameters. -// -// Protection Job parameters applicable to 'kPhysical' Environment type. -// Specifies job parameters applicable for all 'kPhysical' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model PhysicalEnvJobParameters -type PhysicalEnvJobParameters struct { - - // Specifies whether to enable CoBMR backup. - CobmrBackup *bool `json:"CobmrBackup,omitempty"` - - // Specifies filters on the backup objects like files and directories. - // Specifying filters decide which objects within a source should be backed - // up. If this field is not specified, then all of the objects within the - // source will be backed up. - FilePathFilters *FilePathFilter `json:"filePathFilters,omitempty"` - - // If true, performs an incremental backup after server restarts. Otherwise - // a full backup is done. NOTE: This is applicable only to Windows servers. - // If not set, default value is false. - IncrementalSnapshotUponRestart *bool `json:"incrementalSnapshotUponRestart,omitempty"` -} - -// Validate validates this physical env job parameters -func (m *PhysicalEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePathFilters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalEnvJobParameters) validateFilePathFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FilePathFilters) { // not required - return nil - } - - if m.FilePathFilters != nil { - if err := m.FilePathFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical env job parameters based on the context it is used -func (m *PhysicalEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilePathFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalEnvJobParameters) contextValidateFilePathFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePathFilters != nil { - - if swag.IsZero(m.FilePathFilters) { // not required - return nil - } - - if err := m.FilePathFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePathFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePathFilters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalEnvJobParameters) UnmarshalBinary(b []byte) error { - var res PhysicalEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_file_backup_params.go b/v1/models/physical_file_backup_params.go deleted file mode 100644 index 3944335b..00000000 --- a/v1/models/physical_file_backup_params.go +++ /dev/null @@ -1,140 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PhysicalFileBackupParams Physical File Backup Parameters. -// -// Message to capture params when backing up files on a Physical source. -// -// swagger:model PhysicalFileBackupParams -type PhysicalFileBackupParams struct { - - // Specifies the paths to backup on the Physical source. - BackupPathInfoVec []*PhysicalFileBackupParamsBackupPathInfo `json:"backupPathInfoVec"` - - // Specifies metadata path on source. This file contains absolute paths of - // files that needs to be backed up on the same source. If this field is - // set, backup_path_info_vec will be ignored. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` - - // Mount types of nested volumes to be skipped. - SkipNestedVolumesVec []string `json:"skipNestedVolumesVec"` - - // Specifies whether to follow nas target pointed by symlink. - // Set to true only for windows physical file based job. - SymlinkFollowNasTarget *bool `json:"symlinkFollowNasTarget,omitempty"` - - // Specifies whether to use skip_nested_volumes_vec to skip nested mounts. - // Before 6.4, BackupPathInfo.skip_nested_volumes boolean was used to skip - // nested volumes. So we use this boolean to support older jobs. - UsesSkipNestedVolumesVec *bool `json:"usesSkipNestedVolumesVec,omitempty"` -} - -// Validate validates this physical file backup params -func (m *PhysicalFileBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupPathInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileBackupParams) validateBackupPathInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.BackupPathInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.BackupPathInfoVec); i++ { - if swag.IsZero(m.BackupPathInfoVec[i]) { // not required - continue - } - - if m.BackupPathInfoVec[i] != nil { - if err := m.BackupPathInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPathInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPathInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this physical file backup params based on the context it is used -func (m *PhysicalFileBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupPathInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileBackupParams) contextValidateBackupPathInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupPathInfoVec); i++ { - - if m.BackupPathInfoVec[i] != nil { - - if swag.IsZero(m.BackupPathInfoVec[i]) { // not required - return nil - } - - if err := m.BackupPathInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPathInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPathInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileBackupParams) UnmarshalBinary(b []byte) error { - var res PhysicalFileBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_file_backup_params_backup_path_info.go b/v1/models/physical_file_backup_params_backup_path_info.go deleted file mode 100644 index 1a0a9b9c..00000000 --- a/v1/models/physical_file_backup_params_backup_path_info.go +++ /dev/null @@ -1,68 +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" -) - -// PhysicalFileBackupParamsBackupPathInfo Backup Path Information. -// -// Describes a set of files rooted under a path that need to be backed up. -// -// swagger:model PhysicalFileBackupParams_BackupPathInfo -type PhysicalFileBackupParamsBackupPathInfo struct { - - // A list of absolute paths on the Physical source that should not be - // backed up. Any path that is a descendant of these paths will also be - // skipped. - ExcludePaths []string `json:"excludePaths"` - - // An absolute path on the Physical source that should be backed up. Any - // path that is a descendant of this path will also be backed up, unless - // (a) it is excluded from backup by exclude_paths below, OR - // (b) it belongs to a volume that is different from the volume - // include_path belongs to and there are no relevant paths in that - // volume being backed up. - IncludePath *string `json:"includePath,omitempty"` - - // Whether to skip any nested volumes (both local and network) that are - // mounted under 'include_path'. Note that if a path to a nested volume - // is specified as an include_path in another BackupPathInfo entry, that - // path will still get backed up. - SkipNestedVolumes *bool `json:"skipNestedVolumes,omitempty"` -} - -// Validate validates this physical file backup params backup path info -func (m *PhysicalFileBackupParamsBackupPathInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical file backup params backup path info based on context it is used -func (m *PhysicalFileBackupParamsBackupPathInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileBackupParamsBackupPathInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileBackupParamsBackupPathInfo) UnmarshalBinary(b []byte) error { - var res PhysicalFileBackupParamsBackupPathInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_file_backup_params_global_include_exclude.go b/v1/models/physical_file_backup_params_global_include_exclude.go deleted file mode 100644 index fc8ebede..00000000 --- a/v1/models/physical_file_backup_params_global_include_exclude.go +++ /dev/null @@ -1,55 +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" -) - -// PhysicalFileBackupParamsGlobalIncludeExclude Descibes job level includes and excludes. Right now, only supports -// excludes but includes will be added in future. -// -// swagger:model PhysicalFileBackupParams_GlobalIncludeExclude -type PhysicalFileBackupParamsGlobalIncludeExclude struct { - - // Describes exclude vec at job level used in combination with - // to exclude_paths to exclude files. - ExcludeVec []string `json:"excludeVec"` - - // Global filesystem exclude vec - FsExclude []string `json:"fsExclude"` -} - -// Validate validates this physical file backup params global include exclude -func (m *PhysicalFileBackupParamsGlobalIncludeExclude) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical file backup params global include exclude based on context it is used -func (m *PhysicalFileBackupParamsGlobalIncludeExclude) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileBackupParamsGlobalIncludeExclude) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileBackupParamsGlobalIncludeExclude) UnmarshalBinary(b []byte) error { - var res PhysicalFileBackupParamsGlobalIncludeExclude - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_node_configuration.go b/v1/models/physical_node_configuration.go deleted file mode 100644 index f530701c..00000000 --- a/v1/models/physical_node_configuration.go +++ /dev/null @@ -1,61 +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" -) - -// PhysicalNodeConfiguration Physical Node Configuration. -// -// Specifies the configuration for a node in the Cluster. -// -// swagger:model PhysicalNodeConfiguration -type PhysicalNodeConfiguration struct { - - // Specifies the Node ID for this node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the Node IP address for this node. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies IPMI IP for this node. - NodeIpmiIP *string `json:"nodeIpmiIp,omitempty"` - - // Specifies whether to use the Node for compute only. - UseAsComputeNode *bool `json:"useAsComputeNode,omitempty"` -} - -// Validate validates this physical node configuration -func (m *PhysicalNodeConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical node configuration based on context it is used -func (m *PhysicalNodeConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalNodeConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalNodeConfiguration) UnmarshalBinary(b []byte) error { - var res PhysicalNodeConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_params.go b/v1/models/physical_params.go deleted file mode 100644 index b8e67244..00000000 --- a/v1/models/physical_params.go +++ /dev/null @@ -1,215 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalParams Specifies the parameters required to register Application Servers -// running in a Protection Source specific to a physical adapter. -// -// swagger:model PhysicalParams -type PhysicalParams struct { - - // Specifies the types of applications such as 'kSQL', 'kExchange', 'kAD' - // running on the Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - Applications []string `json:"applications"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // The configuration for throttling on registered source. - ThrottlingConfig *SourceThrottlingConfiguration `json:"throttlingConfig,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` -} - -// Validate validates this physical params -func (m *PhysicalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var physicalParamsApplicationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalParamsApplicationsItemsEnum = append(physicalParamsApplicationsItemsEnum, v) - } -} - -func (m *PhysicalParams) validateApplicationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalParamsApplicationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalParams) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - - // value enum - if err := m.validateApplicationsItemsEnum("applications"+"."+strconv.Itoa(i), "body", m.Applications[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *PhysicalParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical params based on the context it is used -func (m *PhysicalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalParams) UnmarshalBinary(b []byte) error { - var res PhysicalParams - 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 deleted file mode 100644 index a1d642dd..00000000 --- a/v1/models/physical_protection_source.go +++ /dev/null @@ -1,564 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalProtectionSource Physical Protection Source. -// -// Specifies a Protection Source in a Physical environment. -// -// swagger:model PhysicalProtectionSource -type PhysicalProtectionSource struct { - - // Array of Agents on the Physical Protection Source. - // - // Specifiles the agents running on the Physical Protection Source and the - // status information. - Agents []*AgentInformation `json:"agents"` - - // Specifies the type of cluster resource this source represents. - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - - // Specifies the hostname. - HostName *string `json:"hostName,omitempty"` - - // Specifies the environment type for the host. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // 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 if the physical host is a proxy host. - IsProxyHost *bool `json:"isProxyHost,omitempty"` - - // Specifies the total memory on the host in bytes. - MemorySizeBytes *int64 `json:"memorySizeBytes,omitempty"` - - // Specifies a human readable name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Cached networking info. This establishes physical-->agent linkage for - // the Cluster case. - NetworkingInfo *NetworkingInformation `json:"networkingInfo,omitempty"` - - // Specifies the number of processors on the host. - NumProcessors *int64 `json:"numProcessors,omitempty"` - - // Specifies a human readable name of the OS of the Protection Source. - OsName *string `json:"osName,omitempty"` - - // Specifies the type of managed Object in a Physical Protection Source. - // 'kGroup' indicates the EH container. - // 'kHost' indicates a single physical server. - // 'kWindowsCluster' indicates a Microsoft Windows cluster. - // 'kOracleRACCluster' indicates an Oracle Real Application Cluster(RAC). - // 'kOracleAPCluster' indicates an Oracle Active-Passive Cluster. - // Enum: ["kGroup","kHost","kWindowsCluster","kOracleRACCluster","kOracleAPCluster"] - Type *string `json:"type,omitempty"` - - // Specifies cluster version for VCS host. - VcsVersion *string `json:"vcsVersion,omitempty"` - - // Array of Physical Volumes. - // - // Specifies the volumes available on the physical host. - // These fields are populated only for the kPhysicalHost type. - Volumes []*PhysicalVolume `json:"volumes"` - - // Specifies the list of writers available on the physical - // host. These fields are populated only for the kPhysicalHost - // type, particularly when the host is windows - Vsswriters []*VssWriter `json:"vsswriters"` -} - -// Validate validates this physical protection source -func (m *PhysicalProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVsswriters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalProtectionSource) validateAgents(formats strfmt.Registry) error { - if swag.IsZero(m.Agents) { // not required - return nil - } - - for i := 0; i < len(m.Agents); i++ { - if swag.IsZero(m.Agents[i]) { // not required - continue - } - - if m.Agents[i] != nil { - if err := m.Agents[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var physicalProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalProtectionSourceTypeHostTypePropEnum = append(physicalProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // PhysicalProtectionSourceHostTypeKLinux captures enum value "kLinux" - PhysicalProtectionSourceHostTypeKLinux string = "kLinux" - - // PhysicalProtectionSourceHostTypeKWindows captures enum value "kWindows" - PhysicalProtectionSourceHostTypeKWindows string = "kWindows" - - // PhysicalProtectionSourceHostTypeKAix captures enum value "kAix" - PhysicalProtectionSourceHostTypeKAix string = "kAix" - - // PhysicalProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - PhysicalProtectionSourceHostTypeKSolaris string = "kSolaris" - - // PhysicalProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - PhysicalProtectionSourceHostTypeKSapHana string = "kSapHana" - - // PhysicalProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - PhysicalProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // PhysicalProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - PhysicalProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // PhysicalProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - PhysicalProtectionSourceHostTypeKMySQL string = "kMySQL" - - // PhysicalProtectionSourceHostTypeKOther captures enum value "kOther" - PhysicalProtectionSourceHostTypeKOther string = "kOther" - - // PhysicalProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - PhysicalProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // PhysicalProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - PhysicalProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // PhysicalProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - PhysicalProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // PhysicalProtectionSourceHostTypeKDB2 captures enum value "kDB2" - PhysicalProtectionSourceHostTypeKDB2 string = "kDB2" - - // PhysicalProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - PhysicalProtectionSourceHostTypeKSapASE string = "kSapASE" - - // PhysicalProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - PhysicalProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // PhysicalProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - PhysicalProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // PhysicalProtectionSourceHostTypeKVOS captures enum value "kVOS" - PhysicalProtectionSourceHostTypeKVOS string = "kVOS" - - // PhysicalProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - PhysicalProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *PhysicalProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *PhysicalProtectionSource) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *PhysicalProtectionSource) validateNetworkingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if m.NetworkingInfo != nil { - if err := m.NetworkingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -var physicalProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGroup","kHost","kWindowsCluster","kOracleRACCluster","kOracleAPCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalProtectionSourceTypeTypePropEnum = append(physicalProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // PhysicalProtectionSourceTypeKGroup captures enum value "kGroup" - PhysicalProtectionSourceTypeKGroup string = "kGroup" - - // PhysicalProtectionSourceTypeKHost captures enum value "kHost" - PhysicalProtectionSourceTypeKHost string = "kHost" - - // PhysicalProtectionSourceTypeKWindowsCluster captures enum value "kWindowsCluster" - PhysicalProtectionSourceTypeKWindowsCluster string = "kWindowsCluster" - - // PhysicalProtectionSourceTypeKOracleRACCluster captures enum value "kOracleRACCluster" - PhysicalProtectionSourceTypeKOracleRACCluster string = "kOracleRACCluster" - - // PhysicalProtectionSourceTypeKOracleAPCluster captures enum value "kOracleAPCluster" - PhysicalProtectionSourceTypeKOracleAPCluster string = "kOracleAPCluster" -) - -// prop value enum -func (m *PhysicalProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *PhysicalProtectionSource) validateVolumes(formats strfmt.Registry) error { - if swag.IsZero(m.Volumes) { // not required - return nil - } - - for i := 0; i < len(m.Volumes); i++ { - if swag.IsZero(m.Volumes[i]) { // not required - continue - } - - if m.Volumes[i] != nil { - if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalProtectionSource) validateVsswriters(formats strfmt.Registry) error { - if swag.IsZero(m.Vsswriters) { // not required - return nil - } - - for i := 0; i < len(m.Vsswriters); i++ { - if swag.IsZero(m.Vsswriters[i]) { // not required - continue - } - - if m.Vsswriters[i] != nil { - if err := m.Vsswriters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vsswriters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vsswriters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this physical protection source based on the context it is used -func (m *PhysicalProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVsswriters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalProtectionSource) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Agents); i++ { - - if m.Agents[i] != nil { - - if swag.IsZero(m.Agents[i]) { // not required - return nil - } - - if err := m.Agents[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *PhysicalProtectionSource) contextValidateNetworkingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkingInfo != nil { - - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if err := m.NetworkingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -func (m *PhysicalProtectionSource) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Volumes); i++ { - - if m.Volumes[i] != nil { - - if swag.IsZero(m.Volumes[i]) { // not required - return nil - } - - if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalProtectionSource) contextValidateVsswriters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vsswriters); i++ { - - if m.Vsswriters[i] != nil { - - if swag.IsZero(m.Vsswriters[i]) { // not required - return nil - } - - if err := m.Vsswriters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vsswriters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vsswriters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalProtectionSource) UnmarshalBinary(b []byte) error { - var res PhysicalProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/physical_snapshot_params.go b/v1/models/physical_snapshot_params.go deleted file mode 100644 index 251b982c..00000000 --- a/v1/models/physical_snapshot_params.go +++ /dev/null @@ -1,60 +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" -) - -// PhysicalSnapshotParams This message contains params that controls the snapshot process for a -// physical host. -// -// swagger:model PhysicalSnapshotParams -type PhysicalSnapshotParams struct { - - // Whether fetching and storing of snapshot metadata was disabled. - FetchSnapshotMetadataDisabled *bool `json:"fetchSnapshotMetadataDisabled,omitempty"` - - // Whether notify backup complete step was disabled. - NotifyBackupCompleteDisabled *bool `json:"notifyBackupCompleteDisabled,omitempty"` - - // If copy_only_backup option is requrested at the time of the snapshot. - VssCopyOnlyBackup *bool `json:"vssCopyOnlyBackup,omitempty"` - - // List of VSS writers that were excluded. - VssExcludedWriters []string `json:"vssExcludedWriters"` -} - -// Validate validates this physical snapshot params -func (m *PhysicalSnapshotParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical snapshot params based on context it is used -func (m *PhysicalSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalSnapshotParams) UnmarshalBinary(b []byte) error { - var res PhysicalSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_special_parameters.go b/v1/models/physical_special_parameters.go deleted file mode 100644 index 522a1d65..00000000 --- a/v1/models/physical_special_parameters.go +++ /dev/null @@ -1,252 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PhysicalSpecialParameters Physical Source Special Job Parameters. -// -// Specifies additional special settings applicable for a Protection Source -// of 'kPhysical' type in a Protection Job. -// -// swagger:model PhysicalSpecialParameters -type PhysicalSpecialParameters struct { - - // Specifies parameters that are related to applications running on the - // Protection Source. - ApplicationParameters *ApplicationParameters `json:"applicationParameters,omitempty"` - - // Specifies whether to allow system backup using 3rd party tools installed - // on the Protection Host. System backups are used for doing bare metal - // recovery later. This field is applicable only for System backups. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` - - // Array of File Paths to Back Up. - // - // Specifies a list of directories or files to protect in a - // Physical Server. - FilePaths []*FilePathParameters `json:"filePaths"` - - // Specifies metadata path on source. This file contains absolute paths of - // files that needs to be backed up on the same source. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` - - // Specifies mounttypes of nested volumes to be skipped. - SkipNestedVolumesVec []string `json:"skipNestedVolumesVec"` - - // Specifies whether to use SkipNestedVolumes vec to skip nested mounts. - UsesSkipNestedVolumesVec *bool `json:"usesSkipNestedVolumesVec,omitempty"` - - // Array of Mounted Volumes to Back Up. - // - // Specifies the subset of mounted volumes to protect in - // a Physical Server. If not specified, all mounted volumes on a - // Physical Server are protected. - VolumeGUID []string `json:"volumeGuid"` - - // Specifies parameters applicable only to Windows hosts. - WindowsParameters *WindowsHostSnapshotParameters `json:"windowsParameters,omitempty"` -} - -// Validate validates this physical special parameters -func (m *PhysicalSpecialParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilePaths(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWindowsParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalSpecialParameters) validateApplicationParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if m.ApplicationParameters != nil { - if err := m.ApplicationParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -func (m *PhysicalSpecialParameters) validateFilePaths(formats strfmt.Registry) error { - if swag.IsZero(m.FilePaths) { // not required - return nil - } - - for i := 0; i < len(m.FilePaths); i++ { - if swag.IsZero(m.FilePaths[i]) { // not required - continue - } - - if m.FilePaths[i] != nil { - if err := m.FilePaths[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalSpecialParameters) validateWindowsParameters(formats strfmt.Registry) error { - if swag.IsZero(m.WindowsParameters) { // not required - return nil - } - - if m.WindowsParameters != nil { - if err := m.WindowsParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical special parameters based on the context it is used -func (m *PhysicalSpecialParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilePaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWindowsParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalSpecialParameters) contextValidateApplicationParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ApplicationParameters != nil { - - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if err := m.ApplicationParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -func (m *PhysicalSpecialParameters) contextValidateFilePaths(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilePaths); i++ { - - if m.FilePaths[i] != nil { - - if swag.IsZero(m.FilePaths[i]) { // not required - return nil - } - - if err := m.FilePaths[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalSpecialParameters) contextValidateWindowsParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.WindowsParameters != nil { - - if swag.IsZero(m.WindowsParameters) { // not required - return nil - } - - if err := m.WindowsParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalSpecialParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalSpecialParameters) UnmarshalBinary(b []byte) error { - var res PhysicalSpecialParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_uid.go b/v1/models/physical_uid.go deleted file mode 100644 index f30d1d83..00000000 --- a/v1/models/physical_uid.go +++ /dev/null @@ -1,59 +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" -) - -// PhysicalUID A message that takes over UniversalIdProto for the physical case. It exists -// as we want the WAL content to be compatible yet the new type does not place -// any semantic constraints onto the individual fields. This UID is just a -// tuple of integers. -// -// swagger:model PhysicalUID -type PhysicalUID struct { - - // part1 - Part1 *int64 `json:"part1,omitempty"` - - // part2 - Part2 *int64 `json:"part2,omitempty"` - - // part3 - Part3 *int64 `json:"part3,omitempty"` -} - -// Validate validates this physical UID -func (m *PhysicalUID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical UID based on context it is used -func (m *PhysicalUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalUID) UnmarshalBinary(b []byte) error { - var res PhysicalUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/physical_volume.go b/v1/models/physical_volume.go deleted file mode 100644 index 253d94d6..00000000 --- a/v1/models/physical_volume.go +++ /dev/null @@ -1,92 +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" -) - -// PhysicalVolume Physical Volume. -// -// Specifies volume information about a Physical Protection Source. -// -// swagger:model PhysicalVolume -type PhysicalVolume struct { - - // Specifies the path to the device that hosts the volume locally. - DevicePath *string `json:"devicePath,omitempty"` - - // Specifies an id for the Physical Volume. - GUID *string `json:"guid,omitempty"` - - // Specifies whether the volume is boot volume. - IsBootVolume *bool `json:"isBootVolume,omitempty"` - - // Specifies whether this volume supports extended attributes (like ACLs) - // when performing file backups. - IsExtendedAttributesSupported *bool `json:"isExtendedAttributesSupported,omitempty"` - - // Specifies if a volume is protected by a Job. - IsProtected *bool `json:"isProtected,omitempty"` - - // Specifies whether the volume is shared volume. - IsSharedVolume *bool `json:"isSharedVolume,omitempty"` - - // Specifies a volume label that can be used for displaying additional - // identifying information about a volume. - Label *string `json:"label,omitempty"` - - // Specifies the logical size of the volume in bytes that is - // not reduced by change-block tracking, compression and deduplication. - LogicalSizeBytes *uint64 `json:"logicalSizeBytes,omitempty"` - - // Array of Mount Points. - // - // Specifies the mount points where the volume is mounted, - // for example: 'C:\', '/mnt/foo' etc. - MountPoints []string `json:"mountPoints"` - - // Specifies mount type of volume e.g. nfs, autofs, ext4 etc. - MountType *string `json:"mountType,omitempty"` - - // Specifies the full path to connect to the network attached volume. - // For example, (IP or hostname):/path/to/share for NFS volumes). - NetworkPath *string `json:"networkPath,omitempty"` - - // Specifies the size used by the volume in bytes. - UsedSizeBytes *uint64 `json:"usedSizeBytes,omitempty"` -} - -// Validate validates this physical volume -func (m *PhysicalVolume) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical volume based on context it is used -func (m *PhysicalVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalVolume) UnmarshalBinary(b []byte) error { - var res PhysicalVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/platform_params.go b/v1/models/platform_params.go deleted file mode 100644 index 409451d6..00000000 --- a/v1/models/platform_params.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" -) - -// PlatformParams PlatformParams to specify platform types of all nodes within cluster. -// -// swagger:model PlatformParams -type PlatformParams struct { - - // List of nodes belonging to the product model. - NodeIds []int64 `json:"nodeIds"` - - // Product model type of the node. - ProductModel *string `json:"productModel,omitempty"` -} - -// Validate validates this platform params -func (m *PlatformParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this platform params based on context it is used -func (m *PlatformParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PlatformParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PlatformParams) UnmarshalBinary(b []byte) error { - var res PlatformParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_toleration.go b/v1/models/pod_info_pod_spec_toleration.go deleted file mode 100644 index 0d91a6bd..00000000 --- a/v1/models/pod_info_pod_spec_toleration.go +++ /dev/null @@ -1,75 +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" -) - -// PodInfoPodSpecToleration pod info pod spec toleration -// -// swagger:model PodInfo_PodSpec_Toleration -type PodInfoPodSpecToleration struct { - - // Effect indicates the taint effect to match. Empty means match all - // taint effects. When specified, allowed values are NoSchedule, - // PreferNoSchedule and NoExecute. - Effect *string `json:"effect,omitempty"` - - // Key is the taint key that the toleration applies to. Empty means match - // all taint keys. If the key is empty, operator must be Exists; this - // combination means to match all values and all keys. - Key *string `json:"key,omitempty"` - - // Operator represents a key's relationship to the value. Valid operators - // are Exists and Equal. Defaults to Equal. - // Exists is equivalent to wildcard for value, so that a pod can - // tolerate all taints of a particular category. - Operator *string `json:"operator,omitempty"` - - // TolerationSeconds represents the period of time the toleration (which - // must be of effect NoExecute, otherwise this field is ignored) - // tolerates the taint. By default, it is not set, which means tolerate - // the taint forever (do not evict). Zero and negative values will be - // treated as 0 (evict immediately) by the system. - TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` - - // Value is the taint value the toleration matches to. - // If the operator is Exists, the value should be empty, otherwise just a - // regular string. - Value *string `json:"value,omitempty"` -} - -// Validate validates this pod info pod spec toleration -func (m *PodInfoPodSpecToleration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec toleration based on context it is used -func (m *PodInfoPodSpecToleration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecToleration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecToleration) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecToleration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info.go b/v1/models/pod_info_pod_spec_volume_info.go deleted file mode 100644 index ef2bbf01..00000000 --- a/v1/models/pod_info_pod_spec_volume_info.go +++ /dev/null @@ -1,1546 +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" -) - -// PodInfoPodSpecVolumeInfo Contains information about volumes of different types that can be -// mounted to a pod. Reference: -// https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/ -// -// swagger:model PodInfo_PodSpec_VolumeInfo -type PodInfoPodSpecVolumeInfo struct { - - // Below fields determine type of volume. - AwsElasticBlockStore *PodInfoPodSpecVolumeInfoAWSEBS `json:"awsElasticBlockStore,omitempty"` - - // azure disk - AzureDisk *PodInfoPodSpecVolumeInfoAzureDisk `json:"azureDisk,omitempty"` - - // azure file - AzureFile *PodInfoPodSpecVolumeInfoAzureFile `json:"azureFile,omitempty"` - - // cephfs - Cephfs *PodInfoPodSpecVolumeInfoCephfs `json:"cephfs,omitempty"` - - // cinder - Cinder *PodInfoPodSpecVolumeInfoCinder `json:"cinder,omitempty"` - - // config map - ConfigMap *PodInfoPodSpecVolumeInfoConfigMap `json:"configMap,omitempty"` - - // csi - Csi *PodInfoPodSpecVolumeInfoCSI `json:"csi,omitempty"` - - // downward Api - DownwardAPI *PodInfoPodSpecVolumeInfoDownwardAPI `json:"downwardApi,omitempty"` - - // empty dir - EmptyDir PodInfoPodSpecVolumeInfoEmptyDir `json:"emptyDir,omitempty"` - - // ephemeral - Ephemeral *PodInfoPodSpecVolumeInfoEphemeralVolumeSource `json:"ephemeral,omitempty"` - - // fc - Fc *PodInfoPodSpecVolumeInfoFC `json:"fc,omitempty"` - - // flex volume - FlexVolume *PodInfoPodSpecVolumeInfoFlex `json:"flexVolume,omitempty"` - - // flocker - Flocker *PodInfoPodSpecVolumeInfoFlocker `json:"flocker,omitempty"` - - // gce persistent disk - GcePersistentDisk *PodInfoPodSpecVolumeInfoGcePersistentDisk `json:"gcePersistentDisk,omitempty"` - - // glusterfs - Glusterfs *PodInfoPodSpecVolumeInfoGlusterFs `json:"glusterfs,omitempty"` - - // Mount from host node's file system into pod. - HostPath *PodInfoPodSpecVolumeInfoHostPath `json:"hostPath,omitempty"` - - // iscsi - Iscsi *PodInfoPodSpecVolumeInfoISCSI `json:"iscsi,omitempty"` - - // local - Local *PodInfoPodSpecVolumeInfoLocal `json:"local,omitempty"` - - // Name of the volume. - Name *string `json:"name,omitempty"` - - // nfs - Nfs *PodInfoPodSpecVolumeInfoNFS `json:"nfs,omitempty"` - - // persistent volume claim - PersistentVolumeClaim *PodInfoPodSpecVolumeInfoPVC `json:"persistentVolumeClaim,omitempty"` - - // photon persistent disk - PhotonPersistentDisk *PodInfoPodSpecVolumeInfoPhotonPersistentDisk `json:"photonPersistentDisk,omitempty"` - - // portworx volume - PortworxVolume *PodInfoPodSpecVolumeInfoPortworx `json:"portworxVolume,omitempty"` - - // projected - Projected *PodInfoPodSpecVolumeInfoProjected `json:"projected,omitempty"` - - // quobyte - Quobyte *PodInfoPodSpecVolumeInfoQuobyte `json:"quobyte,omitempty"` - - // rbd - Rbd *PodInfoPodSpecVolumeInfoRBD `json:"rbd,omitempty"` - - // scale io - ScaleIo *PodInfoPodSpecVolumeInfoScaleIO `json:"scaleIo,omitempty"` - - // Changing the json_name of this field so that API responses of secret - // volumes do not get parsed into this message. - Secret *PodInfoPodSpecVolumeInfoConfigMap `json:"secret,omitempty"` - - // secret volume - SecretVolume *PodInfoPodSpecVolumeInfoSecretVolumeSource `json:"secretVolume,omitempty"` - - // storageos - Storageos *PodInfoPodSpecVolumeInfoStorageOS `json:"storageos,omitempty"` - - // vsphere volume - VsphereVolume *PodInfoPodSpecVolumeInfoVsphereVirtualDisk `json:"vsphereVolume,omitempty"` -} - -// Validate validates this pod info pod spec volume info -func (m *PodInfoPodSpecVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsElasticBlockStore(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureDisk(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureFile(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCephfs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCinder(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCsi(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownwardAPI(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEphemeral(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFc(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlexVolume(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlocker(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcePersistentDisk(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlusterfs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIscsi(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocal(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfs(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePersistentVolumeClaim(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhotonPersistentDisk(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePortworxVolume(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProjected(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQuobyte(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRbd(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScaleIo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecret(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecretVolume(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVsphereVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateAwsElasticBlockStore(formats strfmt.Registry) error { - if swag.IsZero(m.AwsElasticBlockStore) { // not required - return nil - } - - if m.AwsElasticBlockStore != nil { - if err := m.AwsElasticBlockStore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsElasticBlockStore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsElasticBlockStore") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateAzureDisk(formats strfmt.Registry) error { - if swag.IsZero(m.AzureDisk) { // not required - return nil - } - - if m.AzureDisk != nil { - if err := m.AzureDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateAzureFile(formats strfmt.Registry) error { - if swag.IsZero(m.AzureFile) { // not required - return nil - } - - if m.AzureFile != nil { - if err := m.AzureFile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureFile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureFile") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateCephfs(formats strfmt.Registry) error { - if swag.IsZero(m.Cephfs) { // not required - return nil - } - - if m.Cephfs != nil { - if err := m.Cephfs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cephfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cephfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateCinder(formats strfmt.Registry) error { - if swag.IsZero(m.Cinder) { // not required - return nil - } - - if m.Cinder != nil { - if err := m.Cinder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cinder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cinder") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateConfigMap(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigMap) { // not required - return nil - } - - if m.ConfigMap != nil { - if err := m.ConfigMap.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMap") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateCsi(formats strfmt.Registry) error { - if swag.IsZero(m.Csi) { // not required - return nil - } - - if m.Csi != nil { - if err := m.Csi.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("csi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("csi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateDownwardAPI(formats strfmt.Registry) error { - if swag.IsZero(m.DownwardAPI) { // not required - return nil - } - - if m.DownwardAPI != nil { - if err := m.DownwardAPI.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downwardApi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downwardApi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateEphemeral(formats strfmt.Registry) error { - if swag.IsZero(m.Ephemeral) { // not required - return nil - } - - if m.Ephemeral != nil { - if err := m.Ephemeral.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ephemeral") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ephemeral") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateFc(formats strfmt.Registry) error { - if swag.IsZero(m.Fc) { // not required - return nil - } - - if m.Fc != nil { - if err := m.Fc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fc") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateFlexVolume(formats strfmt.Registry) error { - if swag.IsZero(m.FlexVolume) { // not required - return nil - } - - if m.FlexVolume != nil { - if err := m.FlexVolume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flexVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flexVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateFlocker(formats strfmt.Registry) error { - if swag.IsZero(m.Flocker) { // not required - return nil - } - - if m.Flocker != nil { - if err := m.Flocker.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flocker") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flocker") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateGcePersistentDisk(formats strfmt.Registry) error { - if swag.IsZero(m.GcePersistentDisk) { // not required - return nil - } - - if m.GcePersistentDisk != nil { - if err := m.GcePersistentDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcePersistentDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcePersistentDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateGlusterfs(formats strfmt.Registry) error { - if swag.IsZero(m.Glusterfs) { // not required - return nil - } - - if m.Glusterfs != nil { - if err := m.Glusterfs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("glusterfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("glusterfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateHostPath(formats strfmt.Registry) error { - if swag.IsZero(m.HostPath) { // not required - return nil - } - - if m.HostPath != nil { - if err := m.HostPath.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostPath") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostPath") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateIscsi(formats strfmt.Registry) error { - if swag.IsZero(m.Iscsi) { // not required - return nil - } - - if m.Iscsi != nil { - if err := m.Iscsi.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iscsi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iscsi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateLocal(formats strfmt.Registry) error { - if swag.IsZero(m.Local) { // not required - return nil - } - - if m.Local != nil { - if err := m.Local.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("local") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("local") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateNfs(formats strfmt.Registry) error { - if swag.IsZero(m.Nfs) { // not required - return nil - } - - if m.Nfs != nil { - if err := m.Nfs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validatePersistentVolumeClaim(formats strfmt.Registry) error { - if swag.IsZero(m.PersistentVolumeClaim) { // not required - return nil - } - - if m.PersistentVolumeClaim != nil { - if err := m.PersistentVolumeClaim.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("persistentVolumeClaim") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("persistentVolumeClaim") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validatePhotonPersistentDisk(formats strfmt.Registry) error { - if swag.IsZero(m.PhotonPersistentDisk) { // not required - return nil - } - - if m.PhotonPersistentDisk != nil { - if err := m.PhotonPersistentDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("photonPersistentDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("photonPersistentDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validatePortworxVolume(formats strfmt.Registry) error { - if swag.IsZero(m.PortworxVolume) { // not required - return nil - } - - if m.PortworxVolume != nil { - if err := m.PortworxVolume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("portworxVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("portworxVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateProjected(formats strfmt.Registry) error { - if swag.IsZero(m.Projected) { // not required - return nil - } - - if m.Projected != nil { - if err := m.Projected.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projected") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateQuobyte(formats strfmt.Registry) error { - if swag.IsZero(m.Quobyte) { // not required - return nil - } - - if m.Quobyte != nil { - if err := m.Quobyte.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quobyte") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quobyte") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateRbd(formats strfmt.Registry) error { - if swag.IsZero(m.Rbd) { // not required - return nil - } - - if m.Rbd != nil { - if err := m.Rbd.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rbd") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rbd") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateScaleIo(formats strfmt.Registry) error { - if swag.IsZero(m.ScaleIo) { // not required - return nil - } - - if m.ScaleIo != nil { - if err := m.ScaleIo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scaleIo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scaleIo") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateSecret(formats strfmt.Registry) error { - if swag.IsZero(m.Secret) { // not required - return nil - } - - if m.Secret != nil { - if err := m.Secret.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secret") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secret") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateSecretVolume(formats strfmt.Registry) error { - if swag.IsZero(m.SecretVolume) { // not required - return nil - } - - if m.SecretVolume != nil { - if err := m.SecretVolume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateStorageos(formats strfmt.Registry) error { - if swag.IsZero(m.Storageos) { // not required - return nil - } - - if m.Storageos != nil { - if err := m.Storageos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageos") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) validateVsphereVolume(formats strfmt.Registry) error { - if swag.IsZero(m.VsphereVolume) { // not required - return nil - } - - if m.VsphereVolume != nil { - if err := m.VsphereVolume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vsphereVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vsphereVolume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info based on the context it is used -func (m *PodInfoPodSpecVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsElasticBlockStore(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureFile(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCephfs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCinder(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfigMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCsi(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownwardAPI(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEphemeral(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFc(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlexVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlocker(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcePersistentDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlusterfs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIscsi(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocal(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePersistentVolumeClaim(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhotonPersistentDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePortworxVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProjected(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQuobyte(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRbd(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScaleIo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecret(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecretVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVsphereVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateAwsElasticBlockStore(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsElasticBlockStore != nil { - - if swag.IsZero(m.AwsElasticBlockStore) { // not required - return nil - } - - if err := m.AwsElasticBlockStore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsElasticBlockStore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsElasticBlockStore") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateAzureDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureDisk != nil { - - if swag.IsZero(m.AzureDisk) { // not required - return nil - } - - if err := m.AzureDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateAzureFile(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureFile != nil { - - if swag.IsZero(m.AzureFile) { // not required - return nil - } - - if err := m.AzureFile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureFile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureFile") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateCephfs(ctx context.Context, formats strfmt.Registry) error { - - if m.Cephfs != nil { - - if swag.IsZero(m.Cephfs) { // not required - return nil - } - - if err := m.Cephfs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cephfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cephfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateCinder(ctx context.Context, formats strfmt.Registry) error { - - if m.Cinder != nil { - - if swag.IsZero(m.Cinder) { // not required - return nil - } - - if err := m.Cinder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cinder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cinder") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateConfigMap(ctx context.Context, formats strfmt.Registry) error { - - if m.ConfigMap != nil { - - if swag.IsZero(m.ConfigMap) { // not required - return nil - } - - if err := m.ConfigMap.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMap") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateCsi(ctx context.Context, formats strfmt.Registry) error { - - if m.Csi != nil { - - if swag.IsZero(m.Csi) { // not required - return nil - } - - if err := m.Csi.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("csi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("csi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateDownwardAPI(ctx context.Context, formats strfmt.Registry) error { - - if m.DownwardAPI != nil { - - if swag.IsZero(m.DownwardAPI) { // not required - return nil - } - - if err := m.DownwardAPI.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downwardApi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downwardApi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateEphemeral(ctx context.Context, formats strfmt.Registry) error { - - if m.Ephemeral != nil { - - if swag.IsZero(m.Ephemeral) { // not required - return nil - } - - if err := m.Ephemeral.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ephemeral") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ephemeral") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateFc(ctx context.Context, formats strfmt.Registry) error { - - if m.Fc != nil { - - if swag.IsZero(m.Fc) { // not required - return nil - } - - if err := m.Fc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fc") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateFlexVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.FlexVolume != nil { - - if swag.IsZero(m.FlexVolume) { // not required - return nil - } - - if err := m.FlexVolume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flexVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flexVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateFlocker(ctx context.Context, formats strfmt.Registry) error { - - if m.Flocker != nil { - - if swag.IsZero(m.Flocker) { // not required - return nil - } - - if err := m.Flocker.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flocker") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flocker") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateGcePersistentDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.GcePersistentDisk != nil { - - if swag.IsZero(m.GcePersistentDisk) { // not required - return nil - } - - if err := m.GcePersistentDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcePersistentDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcePersistentDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateGlusterfs(ctx context.Context, formats strfmt.Registry) error { - - if m.Glusterfs != nil { - - if swag.IsZero(m.Glusterfs) { // not required - return nil - } - - if err := m.Glusterfs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("glusterfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("glusterfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateHostPath(ctx context.Context, formats strfmt.Registry) error { - - if m.HostPath != nil { - - if swag.IsZero(m.HostPath) { // not required - return nil - } - - if err := m.HostPath.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostPath") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostPath") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateIscsi(ctx context.Context, formats strfmt.Registry) error { - - if m.Iscsi != nil { - - if swag.IsZero(m.Iscsi) { // not required - return nil - } - - if err := m.Iscsi.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iscsi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iscsi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateLocal(ctx context.Context, formats strfmt.Registry) error { - - if m.Local != nil { - - if swag.IsZero(m.Local) { // not required - return nil - } - - if err := m.Local.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("local") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("local") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateNfs(ctx context.Context, formats strfmt.Registry) error { - - if m.Nfs != nil { - - if swag.IsZero(m.Nfs) { // not required - return nil - } - - if err := m.Nfs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfs") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidatePersistentVolumeClaim(ctx context.Context, formats strfmt.Registry) error { - - if m.PersistentVolumeClaim != nil { - - if swag.IsZero(m.PersistentVolumeClaim) { // not required - return nil - } - - if err := m.PersistentVolumeClaim.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("persistentVolumeClaim") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("persistentVolumeClaim") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidatePhotonPersistentDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.PhotonPersistentDisk != nil { - - if swag.IsZero(m.PhotonPersistentDisk) { // not required - return nil - } - - if err := m.PhotonPersistentDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("photonPersistentDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("photonPersistentDisk") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidatePortworxVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.PortworxVolume != nil { - - if swag.IsZero(m.PortworxVolume) { // not required - return nil - } - - if err := m.PortworxVolume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("portworxVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("portworxVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateProjected(ctx context.Context, formats strfmt.Registry) error { - - if m.Projected != nil { - - if swag.IsZero(m.Projected) { // not required - return nil - } - - if err := m.Projected.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projected") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateQuobyte(ctx context.Context, formats strfmt.Registry) error { - - if m.Quobyte != nil { - - if swag.IsZero(m.Quobyte) { // not required - return nil - } - - if err := m.Quobyte.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quobyte") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quobyte") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateRbd(ctx context.Context, formats strfmt.Registry) error { - - if m.Rbd != nil { - - if swag.IsZero(m.Rbd) { // not required - return nil - } - - if err := m.Rbd.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rbd") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rbd") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateScaleIo(ctx context.Context, formats strfmt.Registry) error { - - if m.ScaleIo != nil { - - if swag.IsZero(m.ScaleIo) { // not required - return nil - } - - if err := m.ScaleIo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scaleIo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scaleIo") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateSecret(ctx context.Context, formats strfmt.Registry) error { - - if m.Secret != nil { - - if swag.IsZero(m.Secret) { // not required - return nil - } - - if err := m.Secret.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secret") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secret") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateSecretVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.SecretVolume != nil { - - if swag.IsZero(m.SecretVolume) { // not required - return nil - } - - if err := m.SecretVolume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretVolume") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateStorageos(ctx context.Context, formats strfmt.Registry) error { - - if m.Storageos != nil { - - if swag.IsZero(m.Storageos) { // not required - return nil - } - - if err := m.Storageos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageos") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfo) contextValidateVsphereVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.VsphereVolume != nil { - - if swag.IsZero(m.VsphereVolume) { // not required - return nil - } - - if err := m.VsphereVolume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vsphereVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vsphereVolume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfo) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_a_w_s_e_b_s.go b/v1/models/pod_info_pod_spec_volume_info_a_w_s_e_b_s.go deleted file mode 100644 index d8ad287a..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_a_w_s_e_b_s.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" -) - -// PodInfoPodSpecVolumeInfoAWSEBS Describes Amazon elastic block store volume. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_AWS_EBS -type PodInfoPodSpecVolumeInfoAWSEBS struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // volume Id - VolumeID *string `json:"volumeId,omitempty"` -} - -// Validate validates this pod info pod spec volume info a w s e b s -func (m *PodInfoPodSpecVolumeInfoAWSEBS) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info a w s e b s based on context it is used -func (m *PodInfoPodSpecVolumeInfoAWSEBS) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAWSEBS) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAWSEBS) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoAWSEBS - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_azure_disk.go b/v1/models/pod_info_pod_spec_volume_info_azure_disk.go deleted file mode 100644 index 461dff1d..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_azure_disk.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" -) - -// PodInfoPodSpecVolumeInfoAzureDisk Describes Microsoft Azure disk format for volumes. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_AzureDisk -type PodInfoPodSpecVolumeInfoAzureDisk struct { - - // disk name - DiskName *string `json:"diskName,omitempty"` - - // disk Uri - DiskURI *string `json:"diskUri,omitempty"` -} - -// Validate validates this pod info pod spec volume info azure disk -func (m *PodInfoPodSpecVolumeInfoAzureDisk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info azure disk based on context it is used -func (m *PodInfoPodSpecVolumeInfoAzureDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAzureDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAzureDisk) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoAzureDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_azure_file.go b/v1/models/pod_info_pod_spec_volume_info_azure_file.go deleted file mode 100644 index 41fbdcb8..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_azure_file.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoAzureFile Describes Microsoft Azure flat format for volumes. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_AzureFile -type PodInfoPodSpecVolumeInfoAzureFile struct { - - // read only - ReadOnly *string `json:"readOnly,omitempty"` - - // secret name - SecretName *string `json:"secretName,omitempty"` - - // share name - ShareName *string `json:"shareName,omitempty"` -} - -// Validate validates this pod info pod spec volume info azure file -func (m *PodInfoPodSpecVolumeInfoAzureFile) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info azure file based on context it is used -func (m *PodInfoPodSpecVolumeInfoAzureFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAzureFile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoAzureFile) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoAzureFile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_c_s_i.go b/v1/models/pod_info_pod_spec_volume_info_c_s_i.go deleted file mode 100644 index f51b8a89..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_c_s_i.go +++ /dev/null @@ -1,337 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoCSI Represents storage that is managed by an external CSI volume driver. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_CSI -type PodInfoPodSpecVolumeInfoCSI struct { - - // controller expand secret ref - ControllerExpandSecretRef *ObjectReference `json:"controllerExpandSecretRef,omitempty"` - - // controller publish secret ref - ControllerPublishSecretRef *ObjectReference `json:"controllerPublishSecretRef,omitempty"` - - // driver - Driver *string `json:"driver,omitempty"` - - // fs type - FsType *string `json:"fsType,omitempty"` - - // node publish secret ref - NodePublishSecretRef *ObjectReference `json:"nodePublishSecretRef,omitempty"` - - // node stage secret ref - NodeStageSecretRef *ObjectReference `json:"nodeStageSecretRef,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // volume attributes - VolumeAttributes []*PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry `json:"volumeAttributes"` - - // volume handle - VolumeHandle *string `json:"volumeHandle,omitempty"` -} - -// Validate validates this pod info pod spec volume info c s i -func (m *PodInfoPodSpecVolumeInfoCSI) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateControllerExpandSecretRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateControllerPublishSecretRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodePublishSecretRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeStageSecretRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeAttributes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) validateControllerExpandSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.ControllerExpandSecretRef) { // not required - return nil - } - - if m.ControllerExpandSecretRef != nil { - if err := m.ControllerExpandSecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllerExpandSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllerExpandSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) validateControllerPublishSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.ControllerPublishSecretRef) { // not required - return nil - } - - if m.ControllerPublishSecretRef != nil { - if err := m.ControllerPublishSecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllerPublishSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllerPublishSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) validateNodePublishSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.NodePublishSecretRef) { // not required - return nil - } - - if m.NodePublishSecretRef != nil { - if err := m.NodePublishSecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodePublishSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodePublishSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) validateNodeStageSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.NodeStageSecretRef) { // not required - return nil - } - - if m.NodeStageSecretRef != nil { - if err := m.NodeStageSecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeStageSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeStageSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) validateVolumeAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeAttributes) { // not required - return nil - } - - for i := 0; i < len(m.VolumeAttributes); i++ { - if swag.IsZero(m.VolumeAttributes[i]) { // not required - continue - } - - if m.VolumeAttributes[i] != nil { - if err := m.VolumeAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info c s i based on the context it is used -func (m *PodInfoPodSpecVolumeInfoCSI) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateControllerExpandSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateControllerPublishSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodePublishSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeStageSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) contextValidateControllerExpandSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.ControllerExpandSecretRef != nil { - - if swag.IsZero(m.ControllerExpandSecretRef) { // not required - return nil - } - - if err := m.ControllerExpandSecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllerExpandSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllerExpandSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) contextValidateControllerPublishSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.ControllerPublishSecretRef != nil { - - if swag.IsZero(m.ControllerPublishSecretRef) { // not required - return nil - } - - if err := m.ControllerPublishSecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllerPublishSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllerPublishSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) contextValidateNodePublishSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.NodePublishSecretRef != nil { - - if swag.IsZero(m.NodePublishSecretRef) { // not required - return nil - } - - if err := m.NodePublishSecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodePublishSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodePublishSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) contextValidateNodeStageSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.NodeStageSecretRef != nil { - - if swag.IsZero(m.NodeStageSecretRef) { // not required - return nil - } - - if err := m.NodeStageSecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeStageSecretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeStageSecretRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoCSI) contextValidateVolumeAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeAttributes); i++ { - - if m.VolumeAttributes[i] != nil { - - if swag.IsZero(m.VolumeAttributes[i]) { // not required - return nil - } - - if err := m.VolumeAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCSI) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCSI) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoCSI - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_c_s_i_volume_attributes_entry.go b/v1/models/pod_info_pod_spec_volume_info_c_s_i_volume_attributes_entry.go deleted file mode 100644 index fdb72d96..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_c_s_i_volume_attributes_entry.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" -) - -// PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry pod info pod spec volume info c s i volume attributes entry -// -// swagger:model PodInfo_PodSpec_VolumeInfo_CSI_VolumeAttributesEntry -type PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this pod info pod spec volume info c s i volume attributes entry -func (m *PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info c s i volume attributes entry based on context it is used -func (m *PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoCSIVolumeAttributesEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_cephfs.go b/v1/models/pod_info_pod_spec_volume_info_cephfs.go deleted file mode 100644 index 649dd21b..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_cephfs.go +++ /dev/null @@ -1,59 +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" -) - -// PodInfoPodSpecVolumeInfoCephfs Describes Cephfs file system for K8s volumes. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Cephfs -type PodInfoPodSpecVolumeInfoCephfs struct { - - // monitors - Monitors []string `json:"monitors"` - - // read only - ReadOnly *string `json:"readOnly,omitempty"` - - // secret file - SecretFile *string `json:"secretFile,omitempty"` - - // user - User *string `json:"user,omitempty"` -} - -// Validate validates this pod info pod spec volume info cephfs -func (m *PodInfoPodSpecVolumeInfoCephfs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info cephfs based on context it is used -func (m *PodInfoPodSpecVolumeInfoCephfs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCephfs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCephfs) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoCephfs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_cinder.go b/v1/models/pod_info_pod_spec_volume_info_cinder.go deleted file mode 100644 index 6ae7d6d4..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_cinder.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" -) - -// PodInfoPodSpecVolumeInfoCinder Describes Cinder volumes used for K8s volumes. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Cinder -type PodInfoPodSpecVolumeInfoCinder struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // volume Id - VolumeID *string `json:"volumeId,omitempty"` -} - -// Validate validates this pod info pod spec volume info cinder -func (m *PodInfoPodSpecVolumeInfoCinder) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info cinder based on context it is used -func (m *PodInfoPodSpecVolumeInfoCinder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCinder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoCinder) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoCinder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_config_map.go b/v1/models/pod_info_pod_spec_volume_info_config_map.go deleted file mode 100644 index 1d72b5aa..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_config_map.go +++ /dev/null @@ -1,50 +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" -) - -// PodInfoPodSpecVolumeInfoConfigMap Describes config map which can be mounted as a volume in K8s. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_ConfigMap -type PodInfoPodSpecVolumeInfoConfigMap struct { - - // name - Name *string `json:"name,omitempty"` -} - -// Validate validates this pod info pod spec volume info config map -func (m *PodInfoPodSpecVolumeInfoConfigMap) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info config map based on context it is used -func (m *PodInfoPodSpecVolumeInfoConfigMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoConfigMap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoConfigMap) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoConfigMap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_downward_api.go b/v1/models/pod_info_pod_spec_volume_info_downward_api.go deleted file mode 100644 index a7b64d9d..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_downward_api.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoDownwardAPI DownwardAPIVolumeSource represents a volume -// containing downward API info. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_DownwardAPI -type PodInfoPodSpecVolumeInfoDownwardAPI struct { - - // default mode - DefaultMode *int32 `json:"defaultMode,omitempty"` - - // items - Items []*PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile `json:"items"` -} - -// Validate validates this pod info pod spec volume info downward API -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info downward API based on the context it is used -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPI) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoDownwardAPI - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file.go b/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file.go deleted file mode 100644 index 43c68ab1..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file.go +++ /dev/null @@ -1,167 +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" -) - -// PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile DownwardAPIVolumeFile represents information to create -// the file containing the pod field. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_DownwardAPIVolumeFile -type PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile struct { - - // field ref - FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"` - - // mode - Mode *int32 `json:"mode,omitempty"` - - // path - Path *string `json:"path,omitempty"` - - // resource field ref - ResourceFieldRef *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector `json:"resourceFieldRef,omitempty"` -} - -// Validate validates this pod info pod spec volume info downward API volume file -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFieldRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceFieldRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) validateFieldRef(formats strfmt.Registry) error { - if swag.IsZero(m.FieldRef) { // not required - return nil - } - - if m.FieldRef != nil { - if err := m.FieldRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) validateResourceFieldRef(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceFieldRef) { // not required - return nil - } - - if m.ResourceFieldRef != nil { - if err := m.ResourceFieldRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceFieldRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceFieldRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info downward API volume file based on the context it is used -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFieldRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceFieldRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) contextValidateFieldRef(ctx context.Context, formats strfmt.Registry) error { - - if m.FieldRef != nil { - - if swag.IsZero(m.FieldRef) { // not required - return nil - } - - if err := m.FieldRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldRef") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) contextValidateResourceFieldRef(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceFieldRef != nil { - - if swag.IsZero(m.ResourceFieldRef) { // not required - return nil - } - - if err := m.ResourceFieldRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceFieldRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceFieldRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file_resource_field_selector.go b/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file_resource_field_selector.go deleted file mode 100644 index 7cb8d3d9..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_downward_api_volume_file_resource_field_selector.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector pod info pod spec volume info downward API volume file resource field selector -// -// swagger:model PodInfo_PodSpec_VolumeInfo_DownwardAPIVolumeFile_ResourceFieldSelector -type PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector struct { - - // container name - ContainerName *string `json:"containerName,omitempty"` - - // divisor - Divisor *string `json:"divisor,omitempty"` - - // resource - Resource *string `json:"resource,omitempty"` -} - -// Validate validates this pod info pod spec volume info downward API volume file resource field selector -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info downward API volume file resource field selector based on context it is used -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoDownwardAPIVolumeFileResourceFieldSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_empty_dir.go b/v1/models/pod_info_pod_spec_volume_info_empty_dir.go deleted file mode 100644 index b127b003..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_empty_dir.go +++ /dev/null @@ -1,11 +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 - -// PodInfoPodSpecVolumeInfoEmptyDir Encapsulates temporary directory volume in K8s. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_EmptyDir -type PodInfoPodSpecVolumeInfoEmptyDir interface{} diff --git a/v1/models/pod_info_pod_spec_volume_info_ephemeral_volume_source.go b/v1/models/pod_info_pod_spec_volume_info_ephemeral_volume_source.go deleted file mode 100644 index 613655d1..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_ephemeral_volume_source.go +++ /dev/null @@ -1,113 +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" -) - -// PodInfoPodSpecVolumeInfoEphemeralVolumeSource Represents an ephemeral volume that is handled by a normal storage -// driver. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_EphemeralVolumeSource -type PodInfoPodSpecVolumeInfoEphemeralVolumeSource struct { - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // volume claim template - VolumeClaimTemplate *PVCInfo `json:"volumeClaimTemplate,omitempty"` -} - -// Validate validates this pod info pod spec volume info ephemeral volume source -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeClaimTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) validateVolumeClaimTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeClaimTemplate) { // not required - return nil - } - - if m.VolumeClaimTemplate != nil { - if err := m.VolumeClaimTemplate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeClaimTemplate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeClaimTemplate") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info ephemeral volume source based on the context it is used -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeClaimTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) contextValidateVolumeClaimTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeClaimTemplate != nil { - - if swag.IsZero(m.VolumeClaimTemplate) { // not required - return nil - } - - if err := m.VolumeClaimTemplate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeClaimTemplate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeClaimTemplate") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoEphemeralVolumeSource) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoEphemeralVolumeSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_f_c.go b/v1/models/pod_info_pod_spec_volume_info_f_c.go deleted file mode 100644 index b2cee95c..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_f_c.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoFC Fibre channel volumes -// -// swagger:model PodInfo_PodSpec_VolumeInfo_FC -type PodInfoPodSpecVolumeInfoFC struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // lun - Lun *int32 `json:"lun,omitempty"` - - // Array of Fibre Channel target's World Wide Names - TargetWWNs []string `json:"targetWWNs"` -} - -// Validate validates this pod info pod spec volume info f c -func (m *PodInfoPodSpecVolumeInfoFC) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info f c based on context it is used -func (m *PodInfoPodSpecVolumeInfoFC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFC) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFC) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoFC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_flex.go b/v1/models/pod_info_pod_spec_volume_info_flex.go deleted file mode 100644 index ad5f22fd..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_flex.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoFlex Flex represents a generic persistent volume resource -// that is provisioned/attached using an exec based plugin. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Flex -type PodInfoPodSpecVolumeInfoFlex struct { - - // driver - Driver *string `json:"driver,omitempty"` - - // fs type - FsType *string `json:"fsType,omitempty"` - - // options - Options []*PodInfoPodSpecVolumeInfoFlexOptionsEntry `json:"options"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // secret ref - SecretRef *ObjectReference `json:"secretRef,omitempty"` -} - -// Validate validates this pod info pod spec volume info flex -func (m *PodInfoPodSpecVolumeInfoFlex) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecretRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoFlex) validateOptions(formats strfmt.Registry) error { - if swag.IsZero(m.Options) { // not required - return nil - } - - for i := 0; i < len(m.Options); i++ { - if swag.IsZero(m.Options[i]) { // not required - continue - } - - if m.Options[i] != nil { - if err := m.Options[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("options" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("options" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoFlex) validateSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if m.SecretRef != nil { - if err := m.SecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info flex based on the context it is used -func (m *PodInfoPodSpecVolumeInfoFlex) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoFlex) contextValidateOptions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Options); i++ { - - if m.Options[i] != nil { - - if swag.IsZero(m.Options[i]) { // not required - return nil - } - - if err := m.Options[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("options" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("options" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoFlex) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.SecretRef != nil { - - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlex) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlex) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoFlex - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_flex_options_entry.go b/v1/models/pod_info_pod_spec_volume_info_flex_options_entry.go deleted file mode 100644 index ad95fc16..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_flex_options_entry.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" -) - -// PodInfoPodSpecVolumeInfoFlexOptionsEntry pod info pod spec volume info flex options entry -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Flex_OptionsEntry -type PodInfoPodSpecVolumeInfoFlexOptionsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this pod info pod spec volume info flex options entry -func (m *PodInfoPodSpecVolumeInfoFlexOptionsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info flex options entry based on context it is used -func (m *PodInfoPodSpecVolumeInfoFlexOptionsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlexOptionsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlexOptionsEntry) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoFlexOptionsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_flocker.go b/v1/models/pod_info_pod_spec_volume_info_flocker.go deleted file mode 100644 index a12c17ee..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_flocker.go +++ /dev/null @@ -1,50 +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" -) - -// PodInfoPodSpecVolumeInfoFlocker Flocker volumes -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Flocker -type PodInfoPodSpecVolumeInfoFlocker struct { - - // dataset name - DatasetName *string `json:"datasetName,omitempty"` -} - -// Validate validates this pod info pod spec volume info flocker -func (m *PodInfoPodSpecVolumeInfoFlocker) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info flocker based on context it is used -func (m *PodInfoPodSpecVolumeInfoFlocker) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlocker) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoFlocker) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoFlocker - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_gce_persistent_disk.go b/v1/models/pod_info_pod_spec_volume_info_gce_persistent_disk.go deleted file mode 100644 index d7377b99..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_gce_persistent_disk.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" -) - -// PodInfoPodSpecVolumeInfoGcePersistentDisk K8s volume hosted on Google persistent disks. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_GcePersistentDisk -type PodInfoPodSpecVolumeInfoGcePersistentDisk struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // pd name - PdName *string `json:"pdName,omitempty"` -} - -// Validate validates this pod info pod spec volume info gce persistent disk -func (m *PodInfoPodSpecVolumeInfoGcePersistentDisk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info gce persistent disk based on context it is used -func (m *PodInfoPodSpecVolumeInfoGcePersistentDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoGcePersistentDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoGcePersistentDisk) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoGcePersistentDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_gluster_fs.go b/v1/models/pod_info_pod_spec_volume_info_gluster_fs.go deleted file mode 100644 index 38be0991..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_gluster_fs.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" -) - -// PodInfoPodSpecVolumeInfoGlusterFs Volume provided by Gluster file system -// -// swagger:model PodInfo_PodSpec_VolumeInfo_GlusterFs -type PodInfoPodSpecVolumeInfoGlusterFs struct { - - // endpoints - Endpoints *string `json:"endpoints,omitempty"` - - // path - Path *string `json:"path,omitempty"` -} - -// Validate validates this pod info pod spec volume info gluster fs -func (m *PodInfoPodSpecVolumeInfoGlusterFs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info gluster fs based on context it is used -func (m *PodInfoPodSpecVolumeInfoGlusterFs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoGlusterFs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoGlusterFs) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoGlusterFs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_host_path.go b/v1/models/pod_info_pod_spec_volume_info_host_path.go deleted file mode 100644 index cc979641..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_host_path.go +++ /dev/null @@ -1,50 +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" -) - -// PodInfoPodSpecVolumeInfoHostPath pod info pod spec volume info host path -// -// swagger:model PodInfo_PodSpec_VolumeInfo_HostPath -type PodInfoPodSpecVolumeInfoHostPath struct { - - // Path of volume on the node on which pod is running. - Path *string `json:"path,omitempty"` -} - -// Validate validates this pod info pod spec volume info host path -func (m *PodInfoPodSpecVolumeInfoHostPath) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info host path based on context it is used -func (m *PodInfoPodSpecVolumeInfoHostPath) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoHostPath) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoHostPath) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoHostPath - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_i_s_c_s_i.go b/v1/models/pod_info_pod_spec_volume_info_i_s_c_s_i.go deleted file mode 100644 index 8f1dfa74..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_i_s_c_s_i.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoISCSI Volumes using isci targets. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_ISCSI -type PodInfoPodSpecVolumeInfoISCSI struct { - - // iqn - Iqn *string `json:"iqn,omitempty"` - - // lun - Lun *int32 `json:"lun,omitempty"` - - // target portal - TargetPortal *string `json:"targetPortal,omitempty"` -} - -// Validate validates this pod info pod spec volume info i s c s i -func (m *PodInfoPodSpecVolumeInfoISCSI) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info i s c s i based on context it is used -func (m *PodInfoPodSpecVolumeInfoISCSI) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoISCSI) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoISCSI) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoISCSI - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_key_to_path.go b/v1/models/pod_info_pod_spec_volume_info_key_to_path.go deleted file mode 100644 index 49759118..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_key_to_path.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoKeyToPath Maps a string key to a path within a volume. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_KeyToPath -type PodInfoPodSpecVolumeInfoKeyToPath struct { - - // key - Key *string `json:"key,omitempty"` - - // mode - Mode *int32 `json:"mode,omitempty"` - - // path - Path *string `json:"path,omitempty"` -} - -// Validate validates this pod info pod spec volume info key to path -func (m *PodInfoPodSpecVolumeInfoKeyToPath) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info key to path based on context it is used -func (m *PodInfoPodSpecVolumeInfoKeyToPath) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoKeyToPath) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoKeyToPath) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoKeyToPath - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_local.go b/v1/models/pod_info_pod_spec_volume_info_local.go deleted file mode 100644 index cdd1eb5c..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_local.go +++ /dev/null @@ -1,50 +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" -) - -// PodInfoPodSpecVolumeInfoLocal Local volumes provided by host for K8s. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Local -type PodInfoPodSpecVolumeInfoLocal struct { - - // path - Path *string `json:"path,omitempty"` -} - -// Validate validates this pod info pod spec volume info local -func (m *PodInfoPodSpecVolumeInfoLocal) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info local based on context it is used -func (m *PodInfoPodSpecVolumeInfoLocal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoLocal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoLocal) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoLocal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_n_f_s.go b/v1/models/pod_info_pod_spec_volume_info_n_f_s.go deleted file mode 100644 index cb86d671..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_n_f_s.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoNFS Represents an NFS mount. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_NFS -type PodInfoPodSpecVolumeInfoNFS struct { - - // path - Path *string `json:"path,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // server - Server *string `json:"server,omitempty"` -} - -// Validate validates this pod info pod spec volume info n f s -func (m *PodInfoPodSpecVolumeInfoNFS) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info n f s based on context it is used -func (m *PodInfoPodSpecVolumeInfoNFS) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoNFS) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoNFS) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoNFS - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_p_v_c.go b/v1/models/pod_info_pod_spec_volume_info_p_v_c.go deleted file mode 100644 index eff10fcd..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_p_v_c.go +++ /dev/null @@ -1,55 +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" -) - -// PodInfoPodSpecVolumeInfoPVC Persistent volume claims are logical volumes that consume persistent -// volumes as backend. The pod just requests for a volume and can be -// unaware of the backend providing the volume. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_PVC -type PodInfoPodSpecVolumeInfoPVC struct { - - // claim name - ClaimName *string `json:"claimName,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` -} - -// Validate validates this pod info pod spec volume info p v c -func (m *PodInfoPodSpecVolumeInfoPVC) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info p v c based on context it is used -func (m *PodInfoPodSpecVolumeInfoPVC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPVC) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPVC) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoPVC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_photon_persistent_disk.go b/v1/models/pod_info_pod_spec_volume_info_photon_persistent_disk.go deleted file mode 100644 index 85799b47..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_photon_persistent_disk.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" -) - -// PodInfoPodSpecVolumeInfoPhotonPersistentDisk Represents a Photon Controller persistent disk resource. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_PhotonPersistentDisk -type PodInfoPodSpecVolumeInfoPhotonPersistentDisk struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // pd Id - PdID *string `json:"pdId,omitempty"` -} - -// Validate validates this pod info pod spec volume info photon persistent disk -func (m *PodInfoPodSpecVolumeInfoPhotonPersistentDisk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info photon persistent disk based on context it is used -func (m *PodInfoPodSpecVolumeInfoPhotonPersistentDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPhotonPersistentDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPhotonPersistentDisk) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoPhotonPersistentDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_portworx.go b/v1/models/pod_info_pod_spec_volume_info_portworx.go deleted file mode 100644 index 87b2d8ff..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_portworx.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoPortworx Portworx represents a Portworx volume resource. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Portworx -type PodInfoPodSpecVolumeInfoPortworx struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // volume Id - VolumeID *string `json:"volumeId,omitempty"` -} - -// Validate validates this pod info pod spec volume info portworx -func (m *PodInfoPodSpecVolumeInfoPortworx) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info portworx based on context it is used -func (m *PodInfoPodSpecVolumeInfoPortworx) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPortworx) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoPortworx) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoPortworx - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_projected.go b/v1/models/pod_info_pod_spec_volume_info_projected.go deleted file mode 100644 index f9be3b4a..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_projected.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoProjected Represents a projected volume source. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Projected -type PodInfoPodSpecVolumeInfoProjected struct { - - // default mode - DefaultMode *int32 `json:"defaultMode,omitempty"` - - // sources - Sources []*PodInfoPodSpecVolumeInfoProjectedVolumeProjection `json:"sources"` -} - -// Validate validates this pod info pod spec volume info projected -func (m *PodInfoPodSpecVolumeInfoProjected) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjected) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info projected based on the context it is used -func (m *PodInfoPodSpecVolumeInfoProjected) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjected) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjected) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjected) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoProjected - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection.go b/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection.go deleted file mode 100644 index c34d2270..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection.go +++ /dev/null @@ -1,262 +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" -) - -// PodInfoPodSpecVolumeInfoProjectedVolumeProjection pod info pod spec volume info projected volume projection -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Projected_VolumeProjection -type PodInfoPodSpecVolumeInfoProjectedVolumeProjection struct { - - // config map - ConfigMap *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection `json:"configMap,omitempty"` - - // downward Api - DownwardAPI *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection `json:"downwardApi,omitempty"` - - // secret - Secret *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection `json:"secret,omitempty"` - - // service account token - ServiceAccountToken *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection `json:"serviceAccountToken,omitempty"` -} - -// Validate validates this pod info pod spec volume info projected volume projection -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfigMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownwardAPI(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecret(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAccountToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) validateConfigMap(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigMap) { // not required - return nil - } - - if m.ConfigMap != nil { - if err := m.ConfigMap.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMap") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) validateDownwardAPI(formats strfmt.Registry) error { - if swag.IsZero(m.DownwardAPI) { // not required - return nil - } - - if m.DownwardAPI != nil { - if err := m.DownwardAPI.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downwardApi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downwardApi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) validateSecret(formats strfmt.Registry) error { - if swag.IsZero(m.Secret) { // not required - return nil - } - - if m.Secret != nil { - if err := m.Secret.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secret") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secret") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) validateServiceAccountToken(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAccountToken) { // not required - return nil - } - - if m.ServiceAccountToken != nil { - if err := m.ServiceAccountToken.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccountToken") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccountToken") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info projected volume projection based on the context it is used -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfigMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownwardAPI(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecret(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAccountToken(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) contextValidateConfigMap(ctx context.Context, formats strfmt.Registry) error { - - if m.ConfigMap != nil { - - if swag.IsZero(m.ConfigMap) { // not required - return nil - } - - if err := m.ConfigMap.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMap") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMap") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) contextValidateDownwardAPI(ctx context.Context, formats strfmt.Registry) error { - - if m.DownwardAPI != nil { - - if swag.IsZero(m.DownwardAPI) { // not required - return nil - } - - if err := m.DownwardAPI.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downwardApi") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downwardApi") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) contextValidateSecret(ctx context.Context, formats strfmt.Registry) error { - - if m.Secret != nil { - - if swag.IsZero(m.Secret) { // not required - return nil - } - - if err := m.Secret.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secret") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secret") - } - return err - } - } - - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) contextValidateServiceAccountToken(ctx context.Context, formats strfmt.Registry) error { - - if m.ServiceAccountToken != nil { - - if swag.IsZero(m.ServiceAccountToken) { // not required - return nil - } - - if err := m.ServiceAccountToken.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccountToken") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccountToken") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjection) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoProjectedVolumeProjection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_config_map_projection.go b/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_config_map_projection.go deleted file mode 100644 index fe0c01ec..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_config_map_projection.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection pod info pod spec volume info projected volume projection config map projection -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Projected_VolumeProjection_ConfigMapProjection -type PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection struct { - - // items - Items []*PodInfoPodSpecVolumeInfoKeyToPath `json:"items"` - - // name - Name *string `json:"name,omitempty"` - - // optional - Optional *bool `json:"optional,omitempty"` -} - -// Validate validates this pod info pod spec volume info projected volume projection config map projection -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info projected volume projection config map projection based on the context it is used -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoProjectedVolumeProjectionConfigMapProjection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_downward_api_projection.go b/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_downward_api_projection.go deleted file mode 100644 index 04dde09a..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_downward_api_projection.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection pod info pod spec volume info projected volume projection downward API projection -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Projected_VolumeProjection_DownwardAPIProjection -type PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection struct { - - // items - Items []*PodInfoPodSpecVolumeInfoDownwardAPIVolumeFile `json:"items"` -} - -// Validate validates this pod info pod spec volume info projected volume projection downward API projection -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info projected volume projection downward API projection based on the context it is used -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoProjectedVolumeProjectionDownwardAPIProjection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_service_account_token_projection.go b/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_service_account_token_projection.go deleted file mode 100644 index 7deb11dd..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_projected_volume_projection_service_account_token_projection.go +++ /dev/null @@ -1,56 +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" -) - -// PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection pod info pod spec volume info projected volume projection service account token projection -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Projected_VolumeProjection_ServiceAccountTokenProjection -type PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection struct { - - // audience - Audience *string `json:"audience,omitempty"` - - // expiration seconds - ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` - - // path - Path *string `json:"path,omitempty"` -} - -// Validate validates this pod info pod spec volume info projected volume projection service account token projection -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info projected volume projection service account token projection based on context it is used -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoProjectedVolumeProjectionServiceAccountTokenProjection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_quobyte.go b/v1/models/pod_info_pod_spec_volume_info_quobyte.go deleted file mode 100644 index 35798781..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_quobyte.go +++ /dev/null @@ -1,66 +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" -) - -// PodInfoPodSpecVolumeInfoQuobyte Represents a Quobyte mount that lasts the -// lifetime of a pod. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_Quobyte -type PodInfoPodSpecVolumeInfoQuobyte struct { - - // group - Group *string `json:"group,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // registry - Registry *string `json:"registry,omitempty"` - - // tenant - Tenant *string `json:"tenant,omitempty"` - - // user - User *string `json:"user,omitempty"` - - // volume - Volume *string `json:"volume,omitempty"` -} - -// Validate validates this pod info pod spec volume info quobyte -func (m *PodInfoPodSpecVolumeInfoQuobyte) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info quobyte based on context it is used -func (m *PodInfoPodSpecVolumeInfoQuobyte) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoQuobyte) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoQuobyte) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoQuobyte - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_r_b_d.go b/v1/models/pod_info_pod_spec_volume_info_r_b_d.go deleted file mode 100644 index 30a88213..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_r_b_d.go +++ /dev/null @@ -1,131 +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" -) - -// PodInfoPodSpecVolumeInfoRBD Represents a Rados Block Device mount that lasts -// the lifetime of a pod. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_RBD -type PodInfoPodSpecVolumeInfoRBD struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // image - Image *string `json:"image,omitempty"` - - // keyring - Keyring *string `json:"keyring,omitempty"` - - // monitors - Monitors []string `json:"monitors"` - - // pool - Pool *string `json:"pool,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // secret ref - SecretRef *ObjectReference `json:"secretRef,omitempty"` - - // user - User *string `json:"user,omitempty"` -} - -// Validate validates this pod info pod spec volume info r b d -func (m *PodInfoPodSpecVolumeInfoRBD) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecretRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoRBD) validateSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if m.SecretRef != nil { - if err := m.SecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info r b d based on the context it is used -func (m *PodInfoPodSpecVolumeInfoRBD) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoRBD) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.SecretRef != nil { - - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoRBD) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoRBD) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoRBD - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_scale_i_o.go b/v1/models/pod_info_pod_spec_volume_info_scale_i_o.go deleted file mode 100644 index ded44d13..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_scale_i_o.go +++ /dev/null @@ -1,136 +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" -) - -// PodInfoPodSpecVolumeInfoScaleIO ScaleIO represents a persistent ScaleIO volume. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_ScaleIO -type PodInfoPodSpecVolumeInfoScaleIO struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // gateway - Gateway *string `json:"gateway,omitempty"` - - // protection domain - ProtectionDomain *string `json:"protectionDomain,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // secret ref - SecretRef *ObjectReference `json:"secretRef,omitempty"` - - // ssl enabled - SslEnabled *bool `json:"sslEnabled,omitempty"` - - // storage mode - StorageMode *string `json:"storageMode,omitempty"` - - // storage pool - StoragePool *string `json:"storagePool,omitempty"` - - // system - System *string `json:"system,omitempty"` - - // volume name - VolumeName *string `json:"volumeName,omitempty"` -} - -// Validate validates this pod info pod spec volume info scale i o -func (m *PodInfoPodSpecVolumeInfoScaleIO) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecretRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoScaleIO) validateSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if m.SecretRef != nil { - if err := m.SecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info scale i o based on the context it is used -func (m *PodInfoPodSpecVolumeInfoScaleIO) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoScaleIO) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.SecretRef != nil { - - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoScaleIO) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoScaleIO) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoScaleIO - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_secret_volume_source.go b/v1/models/pod_info_pod_spec_volume_info_secret_volume_source.go deleted file mode 100644 index 5c03683e..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_secret_volume_source.go +++ /dev/null @@ -1,50 +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" -) - -// PodInfoPodSpecVolumeInfoSecretVolumeSource pod info pod spec volume info secret volume source -// -// swagger:model PodInfo_PodSpec_VolumeInfo_SecretVolumeSource -type PodInfoPodSpecVolumeInfoSecretVolumeSource struct { - - // secret name - SecretName *string `json:"secretName,omitempty"` -} - -// Validate validates this pod info pod spec volume info secret volume source -func (m *PodInfoPodSpecVolumeInfoSecretVolumeSource) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info secret volume source based on context it is used -func (m *PodInfoPodSpecVolumeInfoSecretVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoSecretVolumeSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoSecretVolumeSource) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoSecretVolumeSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_storage_o_s.go b/v1/models/pod_info_pod_spec_volume_info_storage_o_s.go deleted file mode 100644 index 3a1c4aa2..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_storage_o_s.go +++ /dev/null @@ -1,121 +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" -) - -// PodInfoPodSpecVolumeInfoStorageOS Represents a StorageOS persistent volume resource. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_StorageOS -type PodInfoPodSpecVolumeInfoStorageOS struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // read only - ReadOnly *bool `json:"readOnly,omitempty"` - - // secret ref - SecretRef *ObjectReference `json:"secretRef,omitempty"` - - // volume name - VolumeName *string `json:"volumeName,omitempty"` - - // volume namespace - VolumeNamespace *string `json:"volumeNamespace,omitempty"` -} - -// Validate validates this pod info pod spec volume info storage o s -func (m *PodInfoPodSpecVolumeInfoStorageOS) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecretRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoStorageOS) validateSecretRef(formats strfmt.Registry) error { - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if m.SecretRef != nil { - if err := m.SecretRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod info pod spec volume info storage o s based on the context it is used -func (m *PodInfoPodSpecVolumeInfoStorageOS) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecretRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodInfoPodSpecVolumeInfoStorageOS) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { - - if m.SecretRef != nil { - - if swag.IsZero(m.SecretRef) { // not required - return nil - } - - if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secretRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secretRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoStorageOS) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoStorageOS) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoStorageOS - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_info_pod_spec_volume_info_vsphere_virtual_disk.go b/v1/models/pod_info_pod_spec_volume_info_vsphere_virtual_disk.go deleted file mode 100644 index 329242ba..00000000 --- a/v1/models/pod_info_pod_spec_volume_info_vsphere_virtual_disk.go +++ /dev/null @@ -1,59 +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" -) - -// PodInfoPodSpecVolumeInfoVsphereVirtualDisk Represents a vSphere volume resource. -// -// swagger:model PodInfo_PodSpec_VolumeInfo_VsphereVirtualDisk -type PodInfoPodSpecVolumeInfoVsphereVirtualDisk struct { - - // fs type - FsType *string `json:"fsType,omitempty"` - - // storage policy ID - StoragePolicyID *string `json:"storagePolicyID,omitempty"` - - // storage policy name - StoragePolicyName *string `json:"storagePolicyName,omitempty"` - - // volume path - VolumePath *string `json:"volumePath,omitempty"` -} - -// Validate validates this pod info pod spec volume info vsphere virtual disk -func (m *PodInfoPodSpecVolumeInfoVsphereVirtualDisk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pod info pod spec volume info vsphere virtual disk based on context it is used -func (m *PodInfoPodSpecVolumeInfoVsphereVirtualDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoVsphereVirtualDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodInfoPodSpecVolumeInfoVsphereVirtualDisk) UnmarshalBinary(b []byte) error { - var res PodInfoPodSpecVolumeInfoVsphereVirtualDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_metadata.go b/v1/models/pod_metadata.go deleted file mode 100644 index 0d7019e9..00000000 --- a/v1/models/pod_metadata.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PodMetadata This message defines the pod metadata which will be stored in -// SnapshotInfoProto for Kubernetes backup and restore with Datamover. -// -// swagger:model PodMetadata -type PodMetadata struct { - - // Name of the pod. - Name *string `json:"name,omitempty"` - - // Name of the node where pod is running. - NodeName *string `json:"nodeName,omitempty"` - - // Uid of the pod. - UID *string `json:"uid,omitempty"` - - // Metadata of the volumes that are attached to this pod. - VolumeVec []*PodMetadataVolumeInfo `json:"volumeVec"` -} - -// Validate validates this pod metadata -func (m *PodMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodMetadata) validateVolumeVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeVec); i++ { - if swag.IsZero(m.VolumeVec[i]) { // not required - continue - } - - if m.VolumeVec[i] != nil { - if err := m.VolumeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this pod metadata based on the context it is used -func (m *PodMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodMetadata) contextValidateVolumeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeVec); i++ { - - if m.VolumeVec[i] != nil { - - if swag.IsZero(m.VolumeVec[i]) { // not required - return nil - } - - if err := m.VolumeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodMetadata) UnmarshalBinary(b []byte) error { - var res PodMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pod_metadata_volume_info.go b/v1/models/pod_metadata_volume_info.go deleted file mode 100644 index 0e69f50c..00000000 --- a/v1/models/pod_metadata_volume_info.go +++ /dev/null @@ -1,120 +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" -) - -// PodMetadataVolumeInfo pod metadata volume info -// -// swagger:model PodMetadata_VolumeInfo -type PodMetadataVolumeInfo struct { - - // The underlying PV name if this volume is a PVC. - // This will be used to identify name of the directory containing PVC data - // at the path /var/lib/kubelet/pods. - PvName *string `json:"pvName,omitempty"` - - // Name of the storage class. This is only populated for PVCs. - StorageClass *string `json:"storageClass,omitempty"` - - // Metadata about volume. - Volume *PodInfoPodSpecVolumeInfo `json:"volume,omitempty"` - - // Path in S3 view where the volume data will be stored. - VolumePath *string `json:"volumePath,omitempty"` -} - -// Validate validates this pod metadata volume info -func (m *PodMetadataVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodMetadataVolumeInfo) validateVolume(formats strfmt.Registry) error { - if swag.IsZero(m.Volume) { // not required - return nil - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pod metadata volume info based on the context it is used -func (m *PodMetadataVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PodMetadataVolumeInfo) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if swag.IsZero(m.Volume) { // not required - return nil - } - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PodMetadataVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PodMetadataVolumeInfo) UnmarshalBinary(b []byte) error { - var res PodMetadataVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/postgres_node_info.go b/v1/models/postgres_node_info.go deleted file mode 100644 index b2623753..00000000 --- a/v1/models/postgres_node_info.go +++ /dev/null @@ -1,65 +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" -) - -// PostgresNodeInfo Postgres Node Information. -// -// Specifies the Node Id, IP and port information to access the postgres -// database. -// -// swagger:model PostgresNodeInfo -type PostgresNodeInfo struct { - - // Specifies the default password to access the postgres database. - DefaultPassword *string `json:"defaultPassword,omitempty"` - - // Specifies the default username to access the postgres database. - DefaultUsername *string `json:"defaultUsername,omitempty"` - - // Specifies the id of the node where postgres database is running. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the ip of the node where postgres database is running. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the information where postgres database is running. - Port *int32 `json:"port,omitempty"` -} - -// Validate validates this postgres node info -func (m *PostgresNodeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this postgres node info based on context it is used -func (m *PostgresNodeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PostgresNodeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PostgresNodeInfo) UnmarshalBinary(b []byte) error { - var res PostgresNodeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/power_state_config_proto.go b/v1/models/power_state_config_proto.go deleted file mode 100644 index 985c6e19..00000000 --- a/v1/models/power_state_config_proto.go +++ /dev/null @@ -1,50 +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" -) - -// PowerStateConfigProto Proto to specify the power state (i.e, power on or power off) of an object. -// -// swagger:model PowerStateConfigProto -type PowerStateConfigProto struct { - - // power on - PowerOn *bool `json:"powerOn,omitempty"` -} - -// Validate validates this power state config proto -func (m *PowerStateConfigProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this power state config proto based on context it is used -func (m *PowerStateConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PowerStateConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PowerStateConfigProto) UnmarshalBinary(b []byte) error { - var res PowerStateConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pre_check_validation.go b/v1/models/pre_check_validation.go deleted file mode 100644 index f8c5f061..00000000 --- a/v1/models/pre_check_validation.go +++ /dev/null @@ -1,56 +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" -) - -// PreCheckValidation PreCheckValidation specifies the validations with the pass/fail status -// -// swagger:model PreCheckValidation -type PreCheckValidation struct { - - // IsPassed indicates validation passed or failed - IsPassed *bool `json:"isPassed,omitempty"` - - // Message specifies the validation failure message - Message *string `json:"message,omitempty"` - - // Validation specifies the type of validation - Validation *string `json:"validation,omitempty"` -} - -// Validate validates this pre check validation -func (m *PreCheckValidation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pre check validation based on context it is used -func (m *PreCheckValidation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PreCheckValidation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PreCheckValidation) UnmarshalBinary(b []byte) error { - var res PreCheckValidation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/preferences.go b/v1/models/preferences.go deleted file mode 100644 index 93d1cce7..00000000 --- a/v1/models/preferences.go +++ /dev/null @@ -1,51 +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" -) - -// Preferences User's preferences. -// -// swagger:model Preferences -type Preferences struct { - - // Locale reflects the language settings of the user. Populate using the - // user preferences stored in Scribe for the user wherever needed. - Locale *string `json:"locale,omitempty"` -} - -// Validate validates this preferences -func (m *Preferences) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this preferences based on context it is used -func (m *Preferences) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Preferences) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Preferences) UnmarshalBinary(b []byte) error { - var res Preferences - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/preferred_domain_controller.go b/v1/models/preferred_domain_controller.go deleted file mode 100644 index fdc25651..00000000 --- a/v1/models/preferred_domain_controller.go +++ /dev/null @@ -1,56 +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" -) - -// PreferredDomainController Update Preferred Domain Controller Request. -// -// Specifies Preferred domain controllers (DCs) for an Active Directory domain. -// -// swagger:model PreferredDomainController -type PreferredDomainController struct { - - // List of Domain controllers DCs in FQDN format that are mapped to an Active - // Directory Domain name. - DomainControllers []string `json:"domainControllers"` - - // Specifies the Domain name or the trusted domain of an Active Directory. - DomainName *string `json:"domainName,omitempty"` -} - -// Validate validates this preferred domain controller -func (m *PreferredDomainController) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this preferred domain controller based on context it is used -func (m *PreferredDomainController) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PreferredDomainController) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PreferredDomainController) UnmarshalBinary(b []byte) error { - var res PreferredDomainController - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/preservation_hold_library_protection_params.go b/v1/models/preservation_hold_library_protection_params.go deleted file mode 100644 index cfde24de..00000000 --- a/v1/models/preservation_hold_library_protection_params.go +++ /dev/null @@ -1,59 +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" -) - -// PreservationHoldLibraryProtectionParams The Preservation Hold library is a hidden system location that isn't -// designed to be used interactively but instead, automatically stores files -// when this is needed for compliance reasons. It's not supported to edit, -// delete, or move these automatically retained files yourself. Instead, -// use compliance tools, such as those supported by eDiscovery to access these -// files. -// Refer: https://learn.microsoft.com/en-us/microsoft-365/compliance/ -// + retention-policies-sharepoint?view=o365-worldwide for details. -// -// Specifies params specific to protecting the preservation hold library. -// -// swagger:model PreservationHoldLibraryProtectionParams -type PreservationHoldLibraryProtectionParams struct { - - // Whether or not the preservation hold library should be protected. - ShouldProtectPhl *bool `json:"shouldProtectPhl,omitempty"` -} - -// Validate validates this preservation hold library protection params -func (m *PreservationHoldLibraryProtectionParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this preservation hold library protection params based on context it is used -func (m *PreservationHoldLibraryProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PreservationHoldLibraryProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PreservationHoldLibraryProtectionParams) UnmarshalBinary(b []byte) error { - var res PreservationHoldLibraryProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/primary_backup_run_stats.go b/v1/models/primary_backup_run_stats.go deleted file mode 100644 index d57714a4..00000000 --- a/v1/models/primary_backup_run_stats.go +++ /dev/null @@ -1,83 +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" -) - -// PrimaryBackupRunStats Proto containing stats regarding the primary backup. Currently the primary -// backup target could be local or cloud (in case of CloudArchiveDirect jobs). -// -// swagger:model PrimaryBackupRunStats -type PrimaryBackupRunStats struct { - - // Total number of application objects whose backup was cancelled. - NumCancelledAppObjects *int32 `json:"numCancelledAppObjects,omitempty"` - - // Number of backup tasks that were cancelled in the run so far. - NumCancelledTasks *int32 `json:"numCancelledTasks,omitempty"` - - // Total number of application objects that failed the backup. - NumFailedAppObjects *int32 `json:"numFailedAppObjects,omitempty"` - - // Number of backup tasks that failed in the run so far. - NumFailedTasks *int32 `json:"numFailedTasks,omitempty"` - - // Number of backup tasks that were skipped in the run so far. - NumSkippedTasks *int64 `json:"numSkippedTasks,omitempty"` - - // Total number of application objects successfully backed up by this run. - // In case of CloudArchiveDirect, we won't consider backup task for an app - // object to be successful until archival its has also completed. - NumSuccessfulAppObjects *int32 `json:"numSuccessfulAppObjects,omitempty"` - - // Number of backup tasks that were successful in the run so far. - // In case of CloudArchiveDirect, we won't consider backup task for an - // entity to be successful until its archival has also completed. - NumSuccessfulTasks *int32 `json:"numSuccessfulTasks,omitempty"` - - // Total amount of data read from the source of the backup (so far). - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Logical size of this backup job or task. This is the amount of data we - // would have read from the source(s) had this been a full backup. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Pulse progress monitor path for yoda indexing task. - YodaProgressMonitorRootPath *string `json:"yodaProgressMonitorRootPath,omitempty"` -} - -// Validate validates this primary backup run stats -func (m *PrimaryBackupRunStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this primary backup run stats based on context it is used -func (m *PrimaryBackupRunStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrimaryBackupRunStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrimaryBackupRunStats) UnmarshalBinary(b []byte) error { - var res PrimaryBackupRunStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/principal.go b/v1/models/principal.go deleted file mode 100644 index b30077a4..00000000 --- a/v1/models/principal.go +++ /dev/null @@ -1,134 +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" -) - -// Principal Principal. -// -// Specifies information about a single Principal. -// -// swagger:model Principal -type Principal struct { - - // Specifies the domain name of the where the principal' account is - // maintained. - Domain *string `json:"domain,omitempty"` - - // Specifies the full name (first and last names) of the principal. - FullName *string `json:"fullName,omitempty"` - - // Specifies the object class of the principal (either 'kGroup' or 'kUser'). - // 'kUser' specifies a user object class. - // 'kGroup' specifies a group object class. - // 'kComputer' specifies a computer object class. - // 'kWellKnownPrincipal' specifies a well known principal. - // 'kServiceAccount' specifies a service account object class. - // Enum: ["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the name of the principal. - PrincipalName *string `json:"principalName,omitempty"` - - // Specifies the unique Security id (SID) of the principal. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this principal -func (m *Principal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var principalTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUser","kGroup","kComputer","kWellKnownPrincipal","kServiceAccount"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - principalTypeObjectClassPropEnum = append(principalTypeObjectClassPropEnum, v) - } -} - -const ( - - // PrincipalObjectClassKUser captures enum value "kUser" - PrincipalObjectClassKUser string = "kUser" - - // PrincipalObjectClassKGroup captures enum value "kGroup" - PrincipalObjectClassKGroup string = "kGroup" - - // PrincipalObjectClassKComputer captures enum value "kComputer" - PrincipalObjectClassKComputer string = "kComputer" - - // PrincipalObjectClassKWellKnownPrincipal captures enum value "kWellKnownPrincipal" - PrincipalObjectClassKWellKnownPrincipal string = "kWellKnownPrincipal" - - // PrincipalObjectClassKServiceAccount captures enum value "kServiceAccount" - PrincipalObjectClassKServiceAccount string = "kServiceAccount" -) - -// prop value enum -func (m *Principal) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, principalTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Principal) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this principal based on context it is used -func (m *Principal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Principal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Principal) UnmarshalBinary(b []byte) error { - var res Principal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_a_a_g_info.go b/v1/models/private_a_a_g_info.go deleted file mode 100644 index c2061730..00000000 --- a/v1/models/private_a_a_g_info.go +++ /dev/null @@ -1,256 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAAGInfo Contains information about an Always on Availability Group (aka AAG). -// -// See http://goo.gl/3NvMMW for details. -// -// swagger:model PrivateAAGInfo -type PrivateAAGInfo struct { - - // The backup preference for this AAG that was found on the SQL server. - AutomatedBackupPreference *int32 `json:"automatedBackupPreference,omitempty"` - - // Common information for all the databases that belong to this AAG. - DbInfoVec []*AAGDbInfo `json:"dbInfoVec"` - - // Error if any associated with this AAG. This is typically returned by the - // Agent during AAG population. The AAGs in the entity hierarchy are not - // expected to have this field set. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The unique identifier of the availability group. - GroupID *string `json:"groupId,omitempty"` - - // Host type of the AAG replicas. - HostType *int32 `json:"hostType,omitempty"` - - // The name of this AAG. - Name *string `json:"name,omitempty"` - - // All the known replicas for the AAG. - // - // If returned by the agent, this will only contain all the replicas with - // respect to the local replica that is querying for this information. - // - // In the entity hierarchy view, this should contain the union of the states - // seen at all the replicas. - ReplicaVec []*PrivateAAGReplicaInfo `json:"replicaVec"` -} - -// Validate validates this private a a g info -func (m *PrivateAAGInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicaVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAAGInfo) validateDbInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DbInfoVec); i++ { - if swag.IsZero(m.DbInfoVec[i]) { // not required - continue - } - - if m.DbInfoVec[i] != nil { - if err := m.DbInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAAGInfo) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *PrivateAAGInfo) validateReplicaVec(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaVec) { // not required - return nil - } - - for i := 0; i < len(m.ReplicaVec); i++ { - if swag.IsZero(m.ReplicaVec[i]) { // not required - continue - } - - if m.ReplicaVec[i] != nil { - if err := m.ReplicaVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private a a g info based on the context it is used -func (m *PrivateAAGInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicaVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAAGInfo) contextValidateDbInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbInfoVec); i++ { - - if m.DbInfoVec[i] != nil { - - if swag.IsZero(m.DbInfoVec[i]) { // not required - return nil - } - - if err := m.DbInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAAGInfo) 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 -} - -func (m *PrivateAAGInfo) contextValidateReplicaVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicaVec); i++ { - - if m.ReplicaVec[i] != nil { - - if swag.IsZero(m.ReplicaVec[i]) { // not required - return nil - } - - if err := m.ReplicaVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAAGInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAAGInfo) UnmarshalBinary(b []byte) error { - var res PrivateAAGInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_a_a_g_replica_info.go b/v1/models/private_a_a_g_replica_info.go deleted file mode 100644 index 65514ebb..00000000 --- a/v1/models/private_a_a_g_replica_info.go +++ /dev/null @@ -1,208 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAAGReplicaInfo Represents one replica in an AAG (see http://goo.gl/3NvMMW). -// The design doc for AAG: https://goo.gl/EkJ8p9 -// -// A replica contains the set of databases in the AAG on a given host. -// A given host may have multiple AAG replicas running on it. -// -// When populated as the result from the agent on a local replica, this proto -// may be incomplete, since an agent on a secondary replica may only be able -// to get complete information about its own replica. -// -// See field comments about which fields are avilable when queried from -// a given replica. -// -// NOTE: The replica information in an AAG gets updated differently from local -// and non local replica snapshots. So any changes to this proto also -// need to be reconciled with the corresponding changes in SQL entity -// hierarchy and entity hashing utilities. -// -// swagger:model PrivateAAGReplicaInfo -type PrivateAAGReplicaInfo struct { - - // The mode of this replica. - AvailabilityMode *int32 `json:"availabilityMode,omitempty"` - - // User-specified priority of for performing backups relative to other - // replicas. 1 is the lowest priority and 100 is the highest. A priority of - // 0 means this replica should never be used for backups. - // See "BACKUP_PRIORITY" here: https://goo.gl/h69y1b - BackupPriority *int32 `json:"backupPriority,omitempty"` - - // The local time in msecs of the time the replica was created. The value - // is not set if the replica is not local (it is on a different server than - // the one the agent is on). - // - // When part of an agent response, this field is only available for the - // local replica. - CreateDateMsecs *int64 `json:"createDateMsecs,omitempty"` - - // All the databases hosted on this replica that are part of the same AAG. - // Note that a given host may have multiple replicas assigned to it. - DbInfoVec []*AAGReplicaInfoDbInfo `json:"dbInfoVec"` - - // The unique identifier of the availability group the replica is part of. - GroupID *string `json:"groupId,omitempty"` - - // The entity id of the replica's host. Only set if its host is registered - // with Cohesity. - HostEntityID *int64 `json:"hostEntityId,omitempty"` - - // Whether the replica is local to the agent that is querying for this - // information. - IsLocal *bool `json:"isLocal,omitempty"` - - // The local time in msecs of the time the replica was last modified. The - // value is not set if the replica is not local (it is on a different server - // than the one the agent is on). - // - // When part of an agent response, this field is only available for the - // local replica. - ModifyDateMsecs *int64 `json:"modifyDateMsecs,omitempty"` - - // The current operational state of the availability replica. - // See https://goo.gl/cz2YLI - OperationalState *int32 `json:"operationalState,omitempty"` - - // The types of connections allowed when this replica is a primary. - PrimaryRoleAllowConnections *int32 `json:"primaryRoleAllowConnections,omitempty"` - - // The unique identifier of the replica. - ReplicaID *string `json:"replicaId,omitempty"` - - // The name of the server hosting the replica, and if the SQL instance is not - // default, the instance name. For example, for the default instance, this - // would contain "", and for a named instance "TEST_INSTANCE", this - // would contain "\TEST_INSTANCE". - ReplicaServerName *string `json:"replicaServerName,omitempty"` - - // The role of this replica. - Role *int32 `json:"role,omitempty"` - - // The types of connections allowed when this replica is a secondary. - SecondaryRoleAllowConnections *int32 `json:"secondaryRoleAllowConnections,omitempty"` - - // A rollup of the synchronization state of all joined databases in this AAG. - // This reflects the least healthy database on the replica. - SynchronizationHealth *int32 `json:"synchronizationHealth,omitempty"` - - // The windows name of the replica's windows host. - WindowsHostName *string `json:"windowsHostName,omitempty"` - - // The Windows Cluster node ID of this AAG replica. This field is set by - // joining the replica's windows_hostname on the windows cluster nodes in - // the HKLM > Cluster registry hive. - WsfcNodeID *string `json:"wsfcNodeId,omitempty"` -} - -// Validate validates this private a a g replica info -func (m *PrivateAAGReplicaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAAGReplicaInfo) validateDbInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DbInfoVec); i++ { - if swag.IsZero(m.DbInfoVec[i]) { // not required - continue - } - - if m.DbInfoVec[i] != nil { - if err := m.DbInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private a a g replica info based on the context it is used -func (m *PrivateAAGReplicaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAAGReplicaInfo) contextValidateDbInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbInfoVec); i++ { - - if m.DbInfoVec[i] != nil { - - if swag.IsZero(m.DbInfoVec[i]) { // not required - return nil - } - - if err := m.DbInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAAGReplicaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAAGReplicaInfo) UnmarshalBinary(b []byte) error { - var res PrivateAAGReplicaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_acropolis_entity.go b/v1/models/private_acropolis_entity.go deleted file mode 100644 index 39a444ce..00000000 --- a/v1/models/private_acropolis_entity.go +++ /dev/null @@ -1,270 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAcropolisEntity private acropolis entity -// -// swagger:model PrivateAcropolisEntity -type PrivateAcropolisEntity struct { - - // The UUID of the cluster instance to which this entity belongs to. The - // above field 'uuid' is unique within a cluster. Pair ('uuid' and - // 'cluster_uuid') uniquely identifies an entity globally in an env where - // 'kPrismCentral' is registered as a parent source. - // - // This field is not applicable for an entity of type 'kPrismCentral', - // 'kStandaloneCluster' and 'kCluster'. - ClusterUUID *string `json:"clusterUuid,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // The host environment type. This is set for entities of type - // 'kVirtualMachine'. - HostType *int32 `json:"hostType,omitempty"` - - // Hypervisor specific UUID of the entity. This will be set just for - // entities of type 'kVirtualMachine'. - HypervisorVMUUID *string `json:"hypervisorVmUuid,omitempty"` - - // Whether the entity is an agent VM (Only applicable for an entity of type - // 'kVirtualMachine'). - IsAgentVM *bool `json:"isAgentVm,omitempty"` - - // Acropolis registered management server. This will be set in case a - // management server is registered on the cluster. - ManagementServer *ManagementServer `json:"managementServer,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // This field stores info realted to Nutanix Guest Tools. This is set for - // entities of type 'kVirtualMachine'. - NgtInfo *NGTInfo `json:"ngtInfo,omitempty"` - - // This field contains details if running_on_ndfs is set to false - // This will be set just for entities of type 'kVirtualMachine'. - NonNdfsDetails *string `json:"nonNdfsDetails,omitempty"` - - // This field indicates if the VM is running on Nutanix File System - // This will be set just for entities of type 'kVirtualMachine'. - RunningOnNdfs *bool `json:"runningOnNdfs,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` - - // Acropolis cluster version. This will be set for 'kStandaloneCluster' and - // 'kCluster'. - Version *string `json:"version,omitempty"` - - // The list of disks config attached to this vm. - VirtualDiskConfigVec []*PrivateVirtualDiskConfig `json:"virtualDiskConfigVec"` -} - -// Validate validates this private acropolis entity -func (m *PrivateAcropolisEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateManagementServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNgtInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskConfigVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAcropolisEntity) validateManagementServer(formats strfmt.Registry) error { - if swag.IsZero(m.ManagementServer) { // not required - return nil - } - - if m.ManagementServer != nil { - if err := m.ManagementServer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managementServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managementServer") - } - return err - } - } - - return nil -} - -func (m *PrivateAcropolisEntity) validateNgtInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NgtInfo) { // not required - return nil - } - - if m.NgtInfo != nil { - if err := m.NgtInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ngtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ngtInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAcropolisEntity) validateVirtualDiskConfigVec(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskConfigVec) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskConfigVec); i++ { - if swag.IsZero(m.VirtualDiskConfigVec[i]) { // not required - continue - } - - if m.VirtualDiskConfigVec[i] != nil { - if err := m.VirtualDiskConfigVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskConfigVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskConfigVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private acropolis entity based on the context it is used -func (m *PrivateAcropolisEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateManagementServer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNgtInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskConfigVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAcropolisEntity) contextValidateManagementServer(ctx context.Context, formats strfmt.Registry) error { - - if m.ManagementServer != nil { - - if swag.IsZero(m.ManagementServer) { // not required - return nil - } - - if err := m.ManagementServer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managementServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managementServer") - } - return err - } - } - - return nil -} - -func (m *PrivateAcropolisEntity) contextValidateNgtInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NgtInfo != nil { - - if swag.IsZero(m.NgtInfo) { // not required - return nil - } - - if err := m.NgtInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ngtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ngtInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAcropolisEntity) contextValidateVirtualDiskConfigVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskConfigVec); i++ { - - if m.VirtualDiskConfigVec[i] != nil { - - if swag.IsZero(m.VirtualDiskConfigVec[i]) { // not required - return nil - } - - if err := m.VirtualDiskConfigVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskConfigVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskConfigVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAcropolisEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAcropolisEntity) UnmarshalBinary(b []byte) error { - var res PrivateAcropolisEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_ad_entity.go b/v1/models/private_ad_entity.go deleted file mode 100644 index 761e609b..00000000 --- a/v1/models/private_ad_entity.go +++ /dev/null @@ -1,128 +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" -) - -// PrivateAdEntity private ad entity -// -// swagger:model PrivateAdEntity -type PrivateAdEntity struct { - - // Represents an AD domain controller. - Dc *ADDomainController `json:"dc,omitempty"` - - // Domain associated with this domain controller. This is an echo of - // dc.domain.id.name. Added part of Entity to make logic for calculation of - // full entity name of the domain controller simpler. Full entity name of an - // AD entity is domain_name/name. - // Example of a domain name: tme.local - DomainName *string `json:"domainName,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The entity id of the owner entity. - OwnerID *int64 `json:"ownerId,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private ad entity -func (m *PrivateAdEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAdEntity) validateDc(formats strfmt.Registry) error { - if swag.IsZero(m.Dc) { // not required - return nil - } - - if m.Dc != nil { - if err := m.Dc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private ad entity based on the context it is used -func (m *PrivateAdEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAdEntity) contextValidateDc(ctx context.Context, formats strfmt.Registry) error { - - if m.Dc != nil { - - if swag.IsZero(m.Dc) { // not required - return nil - } - - if err := m.Dc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAdEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAdEntity) UnmarshalBinary(b []byte) error { - var res PrivateAdEntity - 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 deleted file mode 100644 index ec4c374e..00000000 --- a/v1/models/private_agent_entity.go +++ /dev/null @@ -1,309 +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" -) - -// PrivateAgentEntity private agent entity -// -// swagger:model PrivateAgentEntity -type PrivateAgentEntity struct { - - // agent cert info - AgentCertInfo *AgentCertificateInformation `json:"agentCertInfo,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. - AgentUID *UniversalIDProto `json:"agentUid,omitempty"` - - // Arguments for the AIX installer. - AixInstallerArgs *string `json:"aixInstallerArgs,omitempty"` - - // Config file creation timestamp expressed as UTC time. - ConfigFileTimestamp *int64 `json:"configFileTimestamp,omitempty"` - - // Scribe key for the configuration file of this agent. - ConfigScribeKey *string `json:"configScribeKey,omitempty"` - - // Host environment type. - HostType *int32 `json:"hostType,omitempty"` - - // Arguments for HPUX installer. - HpuxInstallerArgs *string `json:"hpuxInstallerArgs,omitempty"` - - // Cached installer URI. This comes from Iris as it composes the URIs on - // the fly using the cluster's hostname. The URI is cached, saved in the WAL - // and used in the recovery path to resume the Upgrade op. - InstallerURI *string `json:"installerUri,omitempty"` - - // Arguments for the Linux installer. - LinuxInstallerArgs *string `json:"linuxInstallerArgs,omitempty"` - - // A human readable name of the object. Typically the hostname of the - // machine where the Agent is installed. - Name *string `json:"name,omitempty"` - - // The list of owning entities' IDs. These act as refs: - // the singular field was introduced in 4.0. - // it became repeated in 4.2 in order to handle Windows Cluster. - OwnerEntityIDVec []int64 `json:"ownerEntityIdVec"` - - // The common properties block. It is exposed to physical::Entity objects. - Properties *Properties `json:"properties,omitempty"` - - // The Agent's refresh error. - RefreshError *PrivateErrorProto `json:"refreshError,omitempty"` - - // Arguments for the Solaris installer. - SolarisInstallerArgs *string `json:"solarisInstallerArgs,omitempty"` - - // This captures a list of features that are supported on this agent, e.g. - // "sql" or "hyperv". - SupportedFeatures []string `json:"supportedFeatures"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Arguments for the Windows installer. - WindowsInstallerArgs *string `json:"windowsInstallerArgs,omitempty"` -} - -// Validate validates this private agent entity -func (m *PrivateAgentEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentCertInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAgentEntity) validateAgentCertInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AgentCertInfo) { // not required - return nil - } - - if m.AgentCertInfo != nil { - if err := m.AgentCertInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentCertInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentCertInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) validateAgentUID(formats strfmt.Registry) error { - if swag.IsZero(m.AgentUID) { // not required - return nil - } - - if m.AgentUID != nil { - if err := m.AgentUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentUid") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) validateProperties(formats strfmt.Registry) error { - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) validateRefreshError(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if m.RefreshError != nil { - if err := m.RefreshError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private agent entity based on the context it is used -func (m *PrivateAgentEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentCertInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgentUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAgentEntity) contextValidateAgentCertInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentCertInfo != nil { - - if swag.IsZero(m.AgentCertInfo) { // not required - return nil - } - - if err := m.AgentCertInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentCertInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentCertInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) contextValidateAgentUID(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentUID != nil { - - if swag.IsZero(m.AgentUID) { // not required - return nil - } - - if err := m.AgentUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentUid") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) contextValidateProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.Properties != nil { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if err := m.Properties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *PrivateAgentEntity) contextValidateRefreshError(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshError != nil { - - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if err := m.RefreshError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAgentEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAgentEntity) UnmarshalBinary(b []byte) error { - var res PrivateAgentEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_aws_credentials.go b/v1/models/private_aws_credentials.go deleted file mode 100644 index e079ea5d..00000000 --- a/v1/models/private_aws_credentials.go +++ /dev/null @@ -1,145 +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" -) - -// PrivateAwsCredentials The credentials associated with an IAM user in the customer's AWS account. -// -// swagger:model PrivateAwsCredentials -type PrivateAwsCredentials struct { - - // Access key id. - AccessKeyID *string `json:"access_key_id,omitempty"` - - // Authentication method to be used for API calls. - AuthMethod *int32 `json:"auth_method,omitempty"` - - // C2S CAP server information. - C2sServerCapInfo *C2SCAPServerInfo `json:"c2s_server_cap_info,omitempty"` - - // This is only applicable in case of DMaaS. Control plane IAM role ARN, - // this is first assumed by the dataplane(cluster). Then we assume the - // iam_role_arn which is tenant's IAM role with all required permissions. - CpIamRoleArn *string `json:"cp_iam_role_arn,omitempty"` - - // Encrypted secret access key. - EncryptedSecretAccessKey []uint8 `json:"encrypted_secret_access_key"` - - // Endpoint to be used while connecting with AWS. Currently this is being - // used to communicate with Cohesity S3. Note: Vault type will be - // S3-Compatible. - Endpoint *string `json:"endpoint,omitempty"` - - // IAM role which will be used to access the security credentials required - // for API calls. This should have all the permissions required for the - // tenant's use case. - // - // In case of DMaaS this will be the Tenant's IAM role ARN. This is assumed - // only after the cp_iam_role_arn(control plane role) is assumed. - IamRoleArn *string `json:"iam_role_arn,omitempty"` - - // Secret access key. - SecretAccessKey *string `json:"secret_access_key,omitempty"` - - // Represents which type of subscription the credentials belong to. Depending - // upon the type of subscription, whether AWS Commercial or AWS Gov cloud we - // will need to use different ClientConfigurations when talking to various - // Azure services. - SubscriptionType *int32 `json:"subscription_type,omitempty"` -} - -// Validate validates this private aws credentials -func (m *PrivateAwsCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateC2sServerCapInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAwsCredentials) validateC2sServerCapInfo(formats strfmt.Registry) error { - if swag.IsZero(m.C2sServerCapInfo) { // not required - return nil - } - - if m.C2sServerCapInfo != nil { - if err := m.C2sServerCapInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2s_server_cap_info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2s_server_cap_info") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private aws credentials based on the context it is used -func (m *PrivateAwsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateC2sServerCapInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAwsCredentials) contextValidateC2sServerCapInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.C2sServerCapInfo != nil { - - if swag.IsZero(m.C2sServerCapInfo) { // not required - return nil - } - - if err := m.C2sServerCapInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("c2s_server_cap_info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("c2s_server_cap_info") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAwsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAwsCredentials) UnmarshalBinary(b []byte) error { - var res PrivateAwsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_aws_entity.go b/v1/models/private_aws_entity.go deleted file mode 100644 index 16de5645..00000000 --- a/v1/models/private_aws_entity.go +++ /dev/null @@ -1,634 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAwsEntity private aws entity -// -// swagger:model PrivateAwsEntity -type PrivateAwsEntity struct { - - // The availability zone of this entity. This is only populated for entities - // of type kSubnet. - AvailabilityZone *string `json:"availabilityZone,omitempty"` - - // Information related to AWS fleets launched for various purposes. This - // will only be set for kIAMUser entity. - AwsFleetParams *AWSFleetParams `json:"awsFleetParams,omitempty"` - - // Information related to cluster. This is only valid for CE clusters. This - // is only populated for kIAMUser entity. - ClusterNetworkInfo *AWSFleetParamsNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Information common to all types of cloud entities. - CommonInfo *EntityCommonInfo `json:"commonInfo,omitempty"` - - // The retention period in days for the automated snapshots of the DB - // instance in RDS. This is only populated for kRDSInstance entities. - DbBackupRetentionPeriodDays *int32 `json:"dbBackupRetentionPeriodDays,omitempty"` - - // DB engine and version info of the entity. This is populated only for - // RDSInstance, kAuroraCluster, RDSOptionGroup and RDSParameterGroup entity - // types. - DbEngineID *string `json:"dbEngineId,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // The host environment type. This is set for entities of type - // kVirtualMachine. - HostType *int32 `json:"hostType,omitempty"` - - // iam info - IamInfo *EntityIAMInfo `json:"iamInfo,omitempty"` - - // KMS key specific info. - KmsKeyInfo *KmsKeyInfo `json:"kmsKeyInfo,omitempty"` - - // This field contains the latest restorable time in milliseconds that an - // RDS database can be restored to. This is only populated for kRDSInstance - // entities. - LatestDbRestorableTimeMsecs *int64 `json:"latestDbRestorableTimeMsecs,omitempty"` - - // The Amazon Resource Name (ARN) of the IAM user. - // type, name, owner_id gives a globally unique identifier for an AWS entity. - OwnerID *string `json:"ownerId,omitempty"` - - // Private ip address. This is set for entities of type kVirtualMachine. - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - - // Connection information related to RDS Instances. This will only be set - // for kRDSInstance and kAuroraCluster entity types. - RdsDbConnectorParams *RDSDbConnectorParams `json:"rdsDbConnectorParams,omitempty"` - - // The following is set if the entity is an EC2 instance. - RegionID *string `json:"regionId,omitempty"` - - // S3 bucket specific info. - S3EntityInfo *PrivateS3ProtoEntity `json:"s3EntityInfo,omitempty"` - - // Optional list of tag attributes associated with this entity. - TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // use case - UseCase []int32 `json:"useCase"` - - // List of volumes attached to an EC2 instance. This is populated only for - // kEC2Instance entity type. - VolumeInfoVec []*EBSVolumeInfo `json:"volumeInfoVec"` -} - -// Validate validates this private aws entity -func (m *PrivateAwsEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIamInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKmsKeyInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsDbConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3EntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAwsEntity) validateAwsFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if m.AwsFleetParams != nil { - if err := m.AwsFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateCommonInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if m.CommonInfo != nil { - if err := m.CommonInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateIamInfo(formats strfmt.Registry) error { - if swag.IsZero(m.IamInfo) { // not required - return nil - } - - if m.IamInfo != nil { - if err := m.IamInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateKmsKeyInfo(formats strfmt.Registry) error { - if swag.IsZero(m.KmsKeyInfo) { // not required - return nil - } - - if m.KmsKeyInfo != nil { - if err := m.KmsKeyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKeyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKeyInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateRdsDbConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.RdsDbConnectorParams) { // not required - return nil - } - - if m.RdsDbConnectorParams != nil { - if err := m.RdsDbConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsDbConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsDbConnectorParams") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateS3EntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.S3EntityInfo) { // not required - return nil - } - - if m.S3EntityInfo != nil { - if err := m.S3EntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3EntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3EntityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAwsEntity) validateVolumeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfoVec); i++ { - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - continue - } - - if m.VolumeInfoVec[i] != nil { - if err := m.VolumeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private aws entity based on the context it is used -func (m *PrivateAwsEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCommonInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIamInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKmsKeyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsDbConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3EntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAwsEntity) contextValidateAwsFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetParams != nil { - - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if err := m.AwsFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateCommonInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonInfo != nil { - - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if err := m.CommonInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateIamInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.IamInfo != nil { - - if swag.IsZero(m.IamInfo) { // not required - return nil - } - - if err := m.IamInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateKmsKeyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.KmsKeyInfo != nil { - - if swag.IsZero(m.KmsKeyInfo) { // not required - return nil - } - - if err := m.KmsKeyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKeyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKeyInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateRdsDbConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsDbConnectorParams != nil { - - if swag.IsZero(m.RdsDbConnectorParams) { // not required - return nil - } - - if err := m.RdsDbConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsDbConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsDbConnectorParams") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateS3EntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.S3EntityInfo != nil { - - if swag.IsZero(m.S3EntityInfo) { // not required - return nil - } - - if err := m.S3EntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3EntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3EntityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAwsEntity) contextValidateVolumeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfoVec); i++ { - - if m.VolumeInfoVec[i] != nil { - - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - return nil - } - - if err := m.VolumeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAwsEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAwsEntity) UnmarshalBinary(b []byte) error { - var res PrivateAwsEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_azure_credentials.go b/v1/models/private_azure_credentials.go deleted file mode 100644 index c300dbc0..00000000 --- a/v1/models/private_azure_credentials.go +++ /dev/null @@ -1,221 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAzureCredentials Message that encapsulates credentials to authenticate while invoking REST -// API calls to Azure. -// -// Reference: https://azure.microsoft.com/en-us/documentation/articles/ -// resource-group-create-service-principal-portal/ -// -// swagger:model PrivateAzureCredentials -type PrivateAzureCredentials struct { - - // Value of the active directory application id generated using the URL - // mentioned above. - ApplicationID *string `json:"application_id,omitempty"` - - // Value of the active directory application key generated using the URL - // mentioned above. - ApplicationKey *string `json:"application_key,omitempty"` - - // Represents the list of applications to be used to fetch a source. - Applications []*AzureApplication `json:"applications"` - - // Azure stack hub domain name for where the given subscription is present. - AzureStackHubDomainName *string `json:"azure_stack_hub_domain_name,omitempty"` - - // Region in which the Azure Stack will be registered. - AzureStackRegion *string `json:"azure_stack_region,omitempty"` - - // Encrypted application key. - EncryptedApplicationKey []uint8 `json:"encrypted_application_key"` - - // Subscription id inside a customer's Azure account. It represents - // sub-section within the Azure account where a customer allows us to - // create VMs, storage account etc. - SubscriptionID *string `json:"subscription_id,omitempty"` - - // Represents which type of subscription the credentials belong to. Depending - // upon the type of subscription, whether Azure Commercial or Azure - // Government we will need to use different endpoints when talking to various - // Azure services. Refer to - - // https://docs.microsoft.com/en-us/azure/azure-government/ - // documentation-government-developer-guide#endpoint-mapping - SubscriptionType *int32 `json:"subscription_type,omitempty"` - - // Represents the list of subscriptions to be fetched for a source. - Subscriptions []*AzureSubscription `json:"subscriptions"` - - // Value of the customer's tenant id in the active directory. Please refer to - // the above URL for details. - TenantID *string `json:"tenant_id,omitempty"` -} - -// Validate validates this private azure credentials -func (m *PrivateAzureCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAzureCredentials) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - if swag.IsZero(m.Applications[i]) { // not required - continue - } - - if m.Applications[i] != nil { - if err := m.Applications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAzureCredentials) validateSubscriptions(formats strfmt.Registry) error { - if swag.IsZero(m.Subscriptions) { // not required - return nil - } - - for i := 0; i < len(m.Subscriptions); i++ { - if swag.IsZero(m.Subscriptions[i]) { // not required - continue - } - - if m.Subscriptions[i] != nil { - if err := m.Subscriptions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private azure credentials based on the context it is used -func (m *PrivateAzureCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplications(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubscriptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAzureCredentials) contextValidateApplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Applications); i++ { - - if m.Applications[i] != nil { - - if swag.IsZero(m.Applications[i]) { // not required - return nil - } - - if err := m.Applications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAzureCredentials) contextValidateSubscriptions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Subscriptions); i++ { - - if m.Subscriptions[i] != nil { - - if swag.IsZero(m.Subscriptions[i]) { // not required - return nil - } - - if err := m.Subscriptions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAzureCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAzureCredentials) UnmarshalBinary(b []byte) error { - var res PrivateAzureCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_azure_entity.go b/v1/models/private_azure_entity.go deleted file mode 100644 index 31e74b90..00000000 --- a/v1/models/private_azure_entity.go +++ /dev/null @@ -1,446 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateAzureEntity private azure entity -// -// swagger:model PrivateAzureEntity -type PrivateAzureEntity struct { - - // Administrator Login of the SQL Server. This is set for entities of type - // kSQLServer and kSQLManagedInstance. - AdministratorLogin *string `json:"administratorLogin,omitempty"` - - // Collation of the SQL Database. This is set for entities of type - // kSQLDatabase. - Collation *string `json:"collation,omitempty"` - - // Information common to all types of cloud entities. - CommonInfo *EntityCommonInfo `json:"commonInfo,omitempty"` - - // Creation date of the SQL Database. This is set for entities of type - // kSQLDatabase. - CreationDate *string `json:"creationDate,omitempty"` - - // Size of the resource, currently set for kSQLDatabase type entity. - CurrentSizeBytes *int64 `json:"currentSizeBytes,omitempty"` - - // FQDN of the SQL Server. This is set for entities of type - // kSQLServer and kSQLManagedInstance. - Fqdn *string `json:"fqdn,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - // The total size of this entity. Currently this is only set for databases - // and has the same value as 'current_size_bytes'. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // The host environment type. This is set for entities of type - // kVirtualMachine. - HostType *int32 `json:"hostType,omitempty"` - - // Use 'id' in 'common_info'. - // - // Azure specific ID for the entity. Depending on the type of the entity - // Azure returns unix path style id. e.g. - // - // Id for a subscription: /subscriptions/3215d0a4-e99d-4b0c-b106-e2a7708e0024 - // Id for a resource group: - // subscriptions/3215d0a4-e99d-4b0c-b106-e2a7708e0024/resourceGroups/tumri - // - // For storage container and storage key we generate the id ourself. - // - // storage container: /c/ - // storage key: /k/ - ID *string `json:"id,omitempty"` - - // Whether this entity is a kSQLDatabase & its parent is a - // kSQLManagedInstance. Useful for UI to display conditional icons. - IsManagedDb *bool `json:"isManagedDb,omitempty"` - - // Whether the VM is managed. This is set for entities of type - // kVirtualMachine. - IsManagedVM *bool `json:"isManagedVm,omitempty"` - - // Whether the subscription is registered as top level entity. This is set - // for entites of type kSubscription. - IsTopLevelEntity *bool `json:"isTopLevelEntity,omitempty"` - - // Applicable to entity of type kResourceGroup, kStorageAccount and - // kVirtualNetwork. - // - // Physical location of the (resource group/storage account/virtual network/ - // virtual machine). - Location *string `json:"location,omitempty"` - - // Applicable to entity of type kComputeOptions. - // - // Number of data disks supported by the vm type. - MaxNoOfDataDisksSupported *int32 `json:"maxNoOfDataDisksSupported,omitempty"` - - // Max size bytes of the SQL Database. This is set for entities of type - // kSQLDatabase. - MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` - - // Applicable to entity of type kComputeOptions. - // - // Amount of memory in MB available in the compute option. - MemoryMb *int64 `json:"memoryMb,omitempty"` - - // Use 'name' in 'common_info'. - // - // Name for the entity. It is used to refer to the entity in the UI by us - // as well as by Azure. - Name *string `json:"name,omitempty"` - - // Applicable to entity of type kComputeOptions. - // - // Number of cores available in the compute option. - NumCores *int32 `json:"numCores,omitempty"` - - // The private endpoint connections configured for this azure resource. We - // will use the subnet azure IDs to select the rigel mapped to the VNET of - // this subnet to enable backup of sql servers only accessible by private - // endpoints. - PrivateEndpointConnectionVec []*EntityPrivateEndpointConnection `json:"privateEndpointConnectionVec"` - - // List of ip addresses. This is set for entities of type kVirtualMachine. - PrivateIPAddressVec []string `json:"privateIpAddressVec"` - - // Whether public network access enabled for the SQL Server. This is set for - // entities of type kSQLServer and kSQLManagedInstance. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - - // SKU of the entity. - Sku *EntitySKU `json:"sku,omitempty"` - - // State of the SQL Server. This is set for entities of type - // kSQLServer and kSQLManagedInstance. - State *string `json:"state,omitempty"` - - // Status of the SQL Database. This is set for entities of type - // kSQLDatabase. - Status *string `json:"status,omitempty"` - - // Optional list of tag attributes associated with this entity. - TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Version of the SQL Server. This is set for entities of type - // kSQLServer and kSQLManagedInstance. - Version *string `json:"version,omitempty"` -} - -// Validate validates this private azure entity -func (m *PrivateAzureEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCommonInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivateEndpointConnectionVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSku(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAzureEntity) validateCommonInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if m.CommonInfo != nil { - if err := m.CommonInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) validatePrivateEndpointConnectionVec(formats strfmt.Registry) error { - if swag.IsZero(m.PrivateEndpointConnectionVec) { // not required - return nil - } - - for i := 0; i < len(m.PrivateEndpointConnectionVec); i++ { - if swag.IsZero(m.PrivateEndpointConnectionVec[i]) { // not required - continue - } - - if m.PrivateEndpointConnectionVec[i] != nil { - if err := m.PrivateEndpointConnectionVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateEndpointConnectionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateEndpointConnectionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAzureEntity) validateSku(formats strfmt.Registry) error { - if swag.IsZero(m.Sku) { // not required - return nil - } - - if m.Sku != nil { - if err := m.Sku.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sku") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private azure entity based on the context it is used -func (m *PrivateAzureEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCommonInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrivateEndpointConnectionVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSku(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateAzureEntity) contextValidateCommonInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonInfo != nil { - - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if err := m.CommonInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) contextValidatePrivateEndpointConnectionVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PrivateEndpointConnectionVec); i++ { - - if m.PrivateEndpointConnectionVec[i] != nil { - - if swag.IsZero(m.PrivateEndpointConnectionVec[i]) { // not required - return nil - } - - if err := m.PrivateEndpointConnectionVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateEndpointConnectionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateEndpointConnectionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateAzureEntity) contextValidateSku(ctx context.Context, formats strfmt.Registry) error { - - if m.Sku != nil { - - if swag.IsZero(m.Sku) { // not required - return nil - } - - if err := m.Sku.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sku") - } - return err - } - } - - return nil -} - -func (m *PrivateAzureEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateAzureEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateAzureEntity) UnmarshalBinary(b []byte) error { - var res PrivateAzureEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_bond_slave_info.go b/v1/models/private_bond_slave_info.go deleted file mode 100644 index 9b8b1d00..00000000 --- a/v1/models/private_bond_slave_info.go +++ /dev/null @@ -1,175 +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" -) - -// PrivateBondSlaveInfo private bond slave info -// -// swagger:model PrivateBondSlaveInfo -type PrivateBondSlaveInfo struct { - - // Bond slave link state. - LinkState *string `json:"linkState,omitempty"` - - // Mac address of the bond slave interface. - MacAddr *string `json:"macAddr,omitempty"` - - // Bond slave name. - Name *string `json:"name,omitempty"` - - // Bond slaves slot info. - Slot *string `json:"slot,omitempty"` - - // Bond slave Speed. - Speed *string `json:"speed,omitempty"` - - // Interface Stats. - Stats *PrivateInterfaceStats `json:"stats,omitempty"` - - // Bond slave uplink switch info. - UplinkInfo *PrivateUplinkSwitchInfo `json:"uplinkInfo,omitempty"` -} - -// Validate validates this private bond slave info -func (m *PrivateBondSlaveInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUplinkInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateBondSlaveInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *PrivateBondSlaveInfo) validateUplinkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UplinkInfo) { // not required - return nil - } - - if m.UplinkInfo != nil { - if err := m.UplinkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private bond slave info based on the context it is used -func (m *PrivateBondSlaveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUplinkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateBondSlaveInfo) 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 -} - -func (m *PrivateBondSlaveInfo) contextValidateUplinkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UplinkInfo != nil { - - if swag.IsZero(m.UplinkInfo) { // not required - return nil - } - - if err := m.UplinkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateBondSlaveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateBondSlaveInfo) UnmarshalBinary(b []byte) error { - var res PrivateBondSlaveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cassandra_connect_params.go b/v1/models/private_cassandra_connect_params.go deleted file mode 100644 index 39476ae3..00000000 --- a/v1/models/private_cassandra_connect_params.go +++ /dev/null @@ -1,326 +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" -) - -// PrivateCassandraConnectParams Contains specific parameters required to connect to a cassandra cluster. -// -// swagger:model PrivateCassandraConnectParams -type PrivateCassandraConnectParams struct { - - // Cassandra credentials. - CassandraCredentials *PrivateCredentials `json:"cassandraCredentials,omitempty"` - - // Basic parameters required to read config from Cassandra primary. - CassandraDiscoveryParams *CassandraDiscoveryParams `json:"cassandraDiscoveryParams,omitempty"` - - // Specific ports info. - CassandraPortsInfo *CassandraPortInfo `json:"cassandraPortsInfo,omitempty"` - - // Security related fields. - CassandraSecurityInfo *PrivateCassandraSecurityInfo `json:"cassandraSecurityInfo,omitempty"` - - // Is JMX Authentication enabled in this cluster. - IsCassandraJmxAuthEnabled *bool `json:"isCassandraJmxAuthEnabled,omitempty"` - - // JMX Credentials. - JmxCredentials *PrivateCredentials `json:"jmxCredentials,omitempty"` - - // Principal for kerberos connection - // Set if authentication type is Kerberos. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Populated if cassandra_auth_type is Kerberos. - KerberosSaslProtocol *string `json:"kerberosSaslProtocol,omitempty"` - - // Cassandra seed nodes. - SeedVec []string `json:"seedVec"` -} - -// Validate validates this private cassandra connect params -func (m *PrivateCassandraConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraPortsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraSecurityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJmxCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCassandraConnectParams) validateCassandraCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if m.CassandraCredentials != nil { - if err := m.CassandraCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) validateCassandraDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraDiscoveryParams) { // not required - return nil - } - - if m.CassandraDiscoveryParams != nil { - if err := m.CassandraDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) validateCassandraPortsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraPortsInfo) { // not required - return nil - } - - if m.CassandraPortsInfo != nil { - if err := m.CassandraPortsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortsInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) validateCassandraSecurityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if m.CassandraSecurityInfo != nil { - if err := m.CassandraSecurityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) validateJmxCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if m.JmxCredentials != nil { - if err := m.JmxCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private cassandra connect params based on the context it is used -func (m *PrivateCassandraConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraPortsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraSecurityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJmxCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCassandraConnectParams) contextValidateCassandraCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraCredentials != nil { - - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if err := m.CassandraCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) contextValidateCassandraDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraDiscoveryParams != nil { - - if swag.IsZero(m.CassandraDiscoveryParams) { // not required - return nil - } - - if err := m.CassandraDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) contextValidateCassandraPortsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraPortsInfo != nil { - - if swag.IsZero(m.CassandraPortsInfo) { // not required - return nil - } - - if err := m.CassandraPortsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortsInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) contextValidateCassandraSecurityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraSecurityInfo != nil { - - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if err := m.CassandraSecurityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraConnectParams) contextValidateJmxCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.JmxCredentials != nil { - - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if err := m.JmxCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCassandraConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCassandraConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateCassandraConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cassandra_entity.go b/v1/models/private_cassandra_entity.go deleted file mode 100644 index 57aaa5f7..00000000 --- a/v1/models/private_cassandra_entity.go +++ /dev/null @@ -1,226 +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" -) - -// PrivateCassandraEntity private cassandra entity -// -// swagger:model PrivateCassandraEntity -type PrivateCassandraEntity struct { - - // Information of a cassandra cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Information of a cassandra keyspapce, only valid for an entity of type - // kKeyspace. - KeyspaceInfo *KeyspaceInfo `json:"keyspaceInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Information about a cassandra table, only valid for an entity of type - // kTable. - TableInfo *TableInfo `json:"tableInfo,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a table can be the string - // . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private cassandra entity -func (m *PrivateCassandraEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyspaceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCassandraEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraEntity) validateKeyspaceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.KeyspaceInfo) { // not required - return nil - } - - if m.KeyspaceInfo != nil { - if err := m.KeyspaceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyspaceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyspaceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraEntity) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private cassandra entity based on the context it is used -func (m *PrivateCassandraEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeyspaceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCassandraEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraEntity) contextValidateKeyspaceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.KeyspaceInfo != nil { - - if swag.IsZero(m.KeyspaceInfo) { // not required - return nil - } - - if err := m.KeyspaceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyspaceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyspaceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCassandraEntity) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCassandraEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCassandraEntity) UnmarshalBinary(b []byte) error { - var res PrivateCassandraEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cassandra_security_info.go b/v1/models/private_cassandra_security_info.go deleted file mode 100644 index 248ea69d..00000000 --- a/v1/models/private_cassandra_security_info.go +++ /dev/null @@ -1,71 +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" -) - -// PrivateCassandraSecurityInfo Groups some of the security related fields. -// -// swagger:model PrivateCassandraSecurityInfo -type PrivateCassandraSecurityInfo struct { - - // cassandra auth required - CassandraAuthRequired *bool `json:"cassandraAuthRequired,omitempty"` - - // cassandra auth type - CassandraAuthType *int32 `json:"cassandraAuthType,omitempty"` - - // cassandra authenticator - CassandraAuthenticator *string `json:"cassandraAuthenticator,omitempty"` - - // cassandra authorizer - CassandraAuthorizer *string `json:"cassandraAuthorizer,omitempty"` - - // cassandra client encryption enabled - CassandraClientEncryptionEnabled *bool `json:"cassandraClientEncryptionEnabled,omitempty"` - - // cassandra server encryption req client auth - CassandraServerEncryptionReqClientAuth *bool `json:"cassandraServerEncryptionReqClientAuth,omitempty"` - - // cassandra server internode encryption type - CassandraServerInternodeEncryptionType *string `json:"cassandraServerInternodeEncryptionType,omitempty"` - - // dse authorization enabled - DseAuthorizationEnabled *bool `json:"dseAuthorizationEnabled,omitempty"` -} - -// Validate validates this private cassandra security info -func (m *PrivateCassandraSecurityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private cassandra security info based on context it is used -func (m *PrivateCassandraSecurityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCassandraSecurityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCassandraSecurityInfo) UnmarshalBinary(b []byte) error { - var res PrivateCassandraSecurityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cbt_info.go b/v1/models/private_cbt_info.go deleted file mode 100644 index acc76469..00000000 --- a/v1/models/private_cbt_info.go +++ /dev/null @@ -1,166 +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" -) - -// PrivateCbtInfo CBT version and service state info -// -// swagger:model PrivateCbtInfo -type PrivateCbtInfo struct { - - // Cbt driver installed version information. - FileVersion *AgentInfoProtoInstalledSubcomponentVersion `json:"fileVersion,omitempty"` - - // Indicates whether the cbt driver is installed. - IsInstalled *bool `json:"isInstalled,omitempty"` - - // Indicates whether host is rebooted post VolCBT installation. - RebootStatus *int32 `json:"rebootStatus,omitempty"` - - // Information regarding the service state of the cbt driver. - ServiceState *ServiceState `json:"serviceState,omitempty"` -} - -// Validate validates this private cbt info -func (m *PrivateCbtInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCbtInfo) validateFileVersion(formats strfmt.Registry) error { - if swag.IsZero(m.FileVersion) { // not required - return nil - } - - if m.FileVersion != nil { - if err := m.FileVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersion") - } - return err - } - } - - return nil -} - -func (m *PrivateCbtInfo) validateServiceState(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceState) { // not required - return nil - } - - if m.ServiceState != nil { - if err := m.ServiceState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private cbt info based on the context it is used -func (m *PrivateCbtInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCbtInfo) contextValidateFileVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.FileVersion != nil { - - if swag.IsZero(m.FileVersion) { // not required - return nil - } - - if err := m.FileVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileVersion") - } - return err - } - } - - return nil -} - -func (m *PrivateCbtInfo) contextValidateServiceState(ctx context.Context, formats strfmt.Registry) error { - - if m.ServiceState != nil { - - if swag.IsZero(m.ServiceState) { // not required - return nil - } - - if err := m.ServiceState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCbtInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCbtInfo) UnmarshalBinary(b []byte) error { - var res PrivateCbtInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cifs_share_info.go b/v1/models/private_cifs_share_info.go deleted file mode 100644 index d1baac68..00000000 --- a/v1/models/private_cifs_share_info.go +++ /dev/null @@ -1,63 +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" -) - -// PrivateCifsShareInfo Proto that contains information about a CIFS share of a Netapp volume. -// -// swagger:model PrivateCifsShareInfo -type PrivateCifsShareInfo struct { - - // The ACL strings for this share. - ACLStringVec []string `json:"aclStringVec"` - - // The CIFS server's name given by the system administrator. It is searchable - // within the active directory domain. For example, "NETAPP-01". - CifsServerName *string `json:"cifsServerName,omitempty"` - - // Name of this share. This could be different from the name of the volume - // that this share belongs to. One volume can export multiple CIFS shares, - // each of which can have different settings like permission and other - // options. For more information, please refer to: https://goo.gl/U7Jn8m. - Name *string `json:"name,omitempty"` - - // Path of this share under the vserver's root. - Path *string `json:"path,omitempty"` -} - -// Validate validates this private cifs share info -func (m *PrivateCifsShareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private cifs share info based on context it is used -func (m *PrivateCifsShareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCifsShareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCifsShareInfo) UnmarshalBinary(b []byte) error { - var res PrivateCifsShareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_cluster_info.go b/v1/models/private_cluster_info.go deleted file mode 100644 index f43675b1..00000000 --- a/v1/models/private_cluster_info.go +++ /dev/null @@ -1,50 +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" -) - -// PrivateClusterInfo Proto that contains specific information about a UDA cluster. -// -// swagger:model PrivateClusterInfo -type PrivateClusterInfo struct { - - // List of hosts from the UDA cluster. - Hosts []string `json:"hosts"` -} - -// Validate validates this private cluster info -func (m *PrivateClusterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private cluster info based on context it is used -func (m *PrivateClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateClusterInfo) UnmarshalBinary(b []byte) error { - var res PrivateClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_couchbase_connect_params.go b/v1/models/private_couchbase_connect_params.go deleted file mode 100644 index 0ed9c9af..00000000 --- a/v1/models/private_couchbase_connect_params.go +++ /dev/null @@ -1,123 +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" -) - -// PrivateCouchbaseConnectParams Contains specific parameters required to connect to a couchbase cluster. -// -// These will be filled by user. -// -// swagger:model PrivateCouchbaseConnectParams -type PrivateCouchbaseConnectParams struct { - - // carrier direct port - CarrierDirectPort *int32 `json:"carrierDirectPort,omitempty"` - - // Specifies the credentials of the Couchbase cluster. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Ports info - HTTPDirectPort *int32 `json:"httpDirectPort,omitempty"` - - // Set to true if this cluster allows connection through SSL only - RequiresSsl *bool `json:"requiresSsl,omitempty"` - - // Seeds of this Couchbase Cluster - Seeds []string `json:"seeds"` -} - -// Validate validates this private couchbase connect params -func (m *PrivateCouchbaseConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCouchbaseConnectParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private couchbase connect params based on the context it is used -func (m *PrivateCouchbaseConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCouchbaseConnectParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCouchbaseConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCouchbaseConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateCouchbaseConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_couchbase_entity.go b/v1/models/private_couchbase_entity.go deleted file mode 100644 index 23690dca..00000000 --- a/v1/models/private_couchbase_entity.go +++ /dev/null @@ -1,174 +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" -) - -// PrivateCouchbaseEntity private couchbase entity -// -// swagger:model PrivateCouchbaseEntity -type PrivateCouchbaseEntity struct { - - // Information about a couchbase bucket, only valid for an entity of type - // kBucket. - BucketInfo *BucketInfo `json:"bucketInfo,omitempty"` - - // Information of a couchbase cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a bucket is same as - // string . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private couchbase entity -func (m *PrivateCouchbaseEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCouchbaseEntity) validateBucketInfo(formats strfmt.Registry) error { - if swag.IsZero(m.BucketInfo) { // not required - return nil - } - - if m.BucketInfo != nil { - if err := m.BucketInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCouchbaseEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private couchbase entity based on the context it is used -func (m *PrivateCouchbaseEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBucketInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCouchbaseEntity) contextValidateBucketInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.BucketInfo != nil { - - if swag.IsZero(m.BucketInfo) { // not required - return nil - } - - if err := m.BucketInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateCouchbaseEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCouchbaseEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCouchbaseEntity) UnmarshalBinary(b []byte) error { - var res PrivateCouchbaseEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_credentials.go b/v1/models/private_credentials.go deleted file mode 100644 index c705c82b..00000000 --- a/v1/models/private_credentials.go +++ /dev/null @@ -1,418 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateCredentials Message that encapsulates credentials to authenticate to an environment. -// -// NOTE:- Please update CredentialsProto in api/magneto_external_base.proto -// whenever there is any change in this message. -// -// swagger:model PrivateCredentials -type PrivateCredentials struct { - - // Credentials for certificate based authentication. - CertCredentials *CertificateBasedAuthenticationCredentials `json:"certCredentials,omitempty"` - - // Credentials needed to authenticate with cloud (Azure or AWS). - CloudCredentials *NexusCloudCredentials `json:"cloudCredentials,omitempty"` - - // AES256 encrypted password. The key for encryption should be obtained from - // KMS. This field stores the encrypted password when the credentials are - // being sent to bifrost. - EncryptedPassword []uint8 `json:"encryptedPassword"` - - // AES256 encrypted token - EncryptedToken []uint8 `json:"encryptedToken"` - - // The credentials to get authorization key/token to use MS Graph API. - MsGraphCredentialsVec []*MSGraphAppCredentials `json:"msGraphCredentialsVec"` - - // The credentials to use to mount a specific type of NAS mount points. - NasMountCredentials *NasMountCredentials `json:"nasMountCredentials,omitempty"` - - // This field is not used in storage, other than historical records. The - // field is only set for inflight rpcs. - // - // TODO(gaurav): Change this field type to bytes. - Password *string `json:"password,omitempty"` - - // The credentials of optional service accounts to be used for mailbox - // backups. - ServiceAccountCredentialsVec []*ServiceAccountCredentials `json:"serviceAccountCredentialsVec"` - - // Optional SSL verification settings. If specified, connections to server - // will be validated appropriately. - SslVerification *SSLVerification `json:"sslVerification,omitempty"` - - // The token to use for authentication. For example, in a SAN environment, - // this can be the API token that is used to create a REST session. - // - // TODO(gaurav): Should this field also be encrypted? - Token *string `json:"token,omitempty"` - - // The username and password to use for authentication. - Username *string `json:"username,omitempty"` - - // Whether the credentials are validated or not. - Validated *bool `json:"validated,omitempty"` -} - -// Validate validates this private credentials -func (m *PrivateCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsGraphCredentialsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasMountCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAccountCredentialsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSslVerification(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCredentials) validateCertCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.CertCredentials) { // not required - return nil - } - - if m.CertCredentials != nil { - if err := m.CertCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCredentials) validateCloudCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.CloudCredentials) { // not required - return nil - } - - if m.CloudCredentials != nil { - if err := m.CloudCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCredentials) validateMsGraphCredentialsVec(formats strfmt.Registry) error { - if swag.IsZero(m.MsGraphCredentialsVec) { // not required - return nil - } - - for i := 0; i < len(m.MsGraphCredentialsVec); i++ { - if swag.IsZero(m.MsGraphCredentialsVec[i]) { // not required - continue - } - - if m.MsGraphCredentialsVec[i] != nil { - if err := m.MsGraphCredentialsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGraphCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGraphCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateCredentials) validateNasMountCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.NasMountCredentials) { // not required - 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 -} - -func (m *PrivateCredentials) validateServiceAccountCredentialsVec(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAccountCredentialsVec) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAccountCredentialsVec); i++ { - if swag.IsZero(m.ServiceAccountCredentialsVec[i]) { // not required - continue - } - - if m.ServiceAccountCredentialsVec[i] != nil { - if err := m.ServiceAccountCredentialsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccountCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccountCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateCredentials) validateSslVerification(formats strfmt.Registry) error { - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if m.SslVerification != nil { - if err := m.SslVerification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private credentials based on the context it is used -func (m *PrivateCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsGraphCredentialsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasMountCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAccountCredentialsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSslVerification(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateCredentials) contextValidateCertCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.CertCredentials != nil { - - if swag.IsZero(m.CertCredentials) { // not required - return nil - } - - if err := m.CertCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCredentials) contextValidateCloudCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudCredentials != nil { - - if swag.IsZero(m.CloudCredentials) { // not required - return nil - } - - if err := m.CloudCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudCredentials") - } - return err - } - } - - return nil -} - -func (m *PrivateCredentials) contextValidateMsGraphCredentialsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MsGraphCredentialsVec); i++ { - - if m.MsGraphCredentialsVec[i] != nil { - - if swag.IsZero(m.MsGraphCredentialsVec[i]) { // not required - return nil - } - - if err := m.MsGraphCredentialsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGraphCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGraphCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateCredentials) 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 -} - -func (m *PrivateCredentials) contextValidateServiceAccountCredentialsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAccountCredentialsVec); i++ { - - if m.ServiceAccountCredentialsVec[i] != nil { - - if swag.IsZero(m.ServiceAccountCredentialsVec[i]) { // not required - return nil - } - - if err := m.ServiceAccountCredentialsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccountCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccountCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateCredentials) contextValidateSslVerification(ctx context.Context, formats strfmt.Registry) error { - - if m.SslVerification != nil { - - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if err := m.SslVerification.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateCredentials) UnmarshalBinary(b []byte) error { - var res PrivateCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_datastore_info.go b/v1/models/private_datastore_info.go deleted file mode 100644 index 1122610f..00000000 --- a/v1/models/private_datastore_info.go +++ /dev/null @@ -1,66 +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" -) - -// PrivateDatastoreInfo This represents a volume or SMB file share that can be used for -// VM placement. -// -// swagger:model PrivateDatastoreInfo -type PrivateDatastoreInfo struct { - - // The capacity of a file share or a volume in bytes. - // This is set for entities of type kDatastore. - Capacity *uint64 `json:"capacity,omitempty"` - - // The datastore type. This is set for entities of type kDatastore. - DatastoreType *int32 `json:"datastoreType,omitempty"` - - // The free space of a file share or a volume in bytes. - // This is set for entities of type kDatastore. - FreeSpace *uint64 `json:"freeSpace,omitempty"` - - // If true, this datastore is highly available and can be used to deploy - // highly available virtual machines. - HighlyAvailable *bool `json:"highlyAvailable,omitempty"` - - // The mount points available for this datastore. - MountPointVec []string `json:"mountPointVec"` -} - -// Validate validates this private datastore info -func (m *PrivateDatastoreInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private datastore info based on context it is used -func (m *PrivateDatastoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateDatastoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateDatastoreInfo) UnmarshalBinary(b []byte) error { - var res PrivateDatastoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_day_time.go b/v1/models/private_day_time.go deleted file mode 100644 index 21bcb1da..00000000 --- a/v1/models/private_day_time.go +++ /dev/null @@ -1,112 +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" -) - -// PrivateDayTime Message encapsulating day and time. -// -// swagger:model PrivateDayTime -type PrivateDayTime struct { - - // Indicates the weekday. 0 indicates Sunday. - Day *int32 `json:"day,omitempty"` - - // Indicates the time in 24 hrs format. - Time *Time `json:"time,omitempty"` -} - -// Validate validates this private day time -func (m *PrivateDayTime) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateDayTime) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if m.Time != nil { - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private day time based on the context it is used -func (m *PrivateDayTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateDayTime) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if m.Time != nil { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateDayTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateDayTime) UnmarshalBinary(b []byte) error { - var res PrivateDayTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_day_time_window.go b/v1/models/private_day_time_window.go deleted file mode 100644 index 50f73a64..00000000 --- a/v1/models/private_day_time_window.go +++ /dev/null @@ -1,160 +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" -) - -// PrivateDayTimeWindow Message encapsulating day time window. -// -// swagger:model PrivateDayTimeWindow -type PrivateDayTimeWindow struct { - - // Indicates the end time of the window. - EndTime *PrivateDayTime `json:"endTime,omitempty"` - - // Indicates the start time of the window. - StartTime *PrivateDayTime `json:"startTime,omitempty"` -} - -// Validate validates this private day time window -func (m *PrivateDayTimeWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateDayTimeWindow) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *PrivateDayTimeWindow) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this private day time window based on the context it is used -func (m *PrivateDayTimeWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateDayTimeWindow) 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 *PrivateDayTimeWindow) 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 -} - -// MarshalBinary interface implementation -func (m *PrivateDayTimeWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateDayTimeWindow) UnmarshalBinary(b []byte) error { - var res PrivateDayTimeWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_elastifile_entity.go b/v1/models/private_elastifile_entity.go deleted file mode 100644 index 2d5c5f0a..00000000 --- a/v1/models/private_elastifile_entity.go +++ /dev/null @@ -1,168 +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" -) - -// PrivateElastifileEntity private elastifile entity -// -// swagger:model PrivateElastifileEntity -type PrivateElastifileEntity struct { - - // Specific information of a cluster, only valid for an entity of type - // 'kCluster'. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Specific information of a container, only valid for an entity of type - // 'kContainer'. - ContainerInfo *ContainerInfo `json:"containerInfo,omitempty"` - - // The name of the entity. - Name *string `json:"name,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this private elastifile entity -func (m *PrivateElastifileEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContainerInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateElastifileEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateElastifileEntity) validateContainerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ContainerInfo) { // not required - return nil - } - - if m.ContainerInfo != nil { - if err := m.ContainerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private elastifile entity based on the context it is used -func (m *PrivateElastifileEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateContainerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateElastifileEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateElastifileEntity) contextValidateContainerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ContainerInfo != nil { - - if swag.IsZero(m.ContainerInfo) { // not required - return nil - } - - if err := m.ContainerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateElastifileEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateElastifileEntity) UnmarshalBinary(b []byte) error { - var res PrivateElastifileEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_entity_proto.go b/v1/models/private_entity_proto.go deleted file mode 100644 index 425ff278..00000000 --- a/v1/models/private_entity_proto.go +++ /dev/null @@ -1,1920 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateEntityProto private entity proto -// -// swagger:model PrivateEntityProto -type PrivateEntityProto struct { - - // The acropolis specific structure. Set when type is kAcropolis. - AcropolisEntity *PrivateAcropolisEntity `json:"acropolisEntity,omitempty"` - - // If this is set, EntityProto refers to an Active Directory entity, - AdEntity *PrivateAdEntity `json:"adEntity,omitempty"` - - // Entity info for the additional environments supported by this object. - AdditionalEntityInfoVec []*AdditionalEntityInfo `json:"additionalEntityInfoVec"` - - // The Agent-specific structure. Set when type is kAgent, or kPhysical. - AgentEntity *PrivateAgentEntity `json:"agentEntity,omitempty"` - - // If this is set, EntityProto refers to an AWS entity. - AwsEntity *PrivateAwsEntity `json:"awsEntity,omitempty"` - - // If this is set, EntityProto refers to an Azure entity. - AzureEntity *PrivateAzureEntity `json:"azureEntity,omitempty"` - - // The cassandra db specific structure. Set when type is kCassandra. - CassandraEntity *PrivateCassandraEntity `json:"cassandraEntity,omitempty"` - - // This is populated with magneto clone task id, if the entity is created by - // clone workflow. - CloneTaskID *int64 `json:"cloneTaskId,omitempty"` - - // Each realm is collection of connector groups. Each connector group is - // collection of Rigel/hyx. - // Each entity will be tagged with connector group id. - // Realm -> connector_group -> {Rigel/hyx ...} - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // The Couchbase specific structure. Set when type is kCouchbase. - CouchbaseEntity *PrivateCouchbaseEntity `json:"couchbaseEntity,omitempty"` - - // Contains a user provided custom name for this entity - CustomName *string `json:"customName,omitempty"` - - // Contains the inner object's name or a human-readable string made off the - // salient attributes. This is only plumbed when Entity objects are exposed - // to Iris BE or to Yoda. - DisplayName *string `json:"displayName,omitempty"` - - // The Elastifile specific structure. Set when type is kElastifile. - ElastifileEntity *PrivateElastifileEntity `json:"elastifileEntity,omitempty"` - - // An ID generated by magneto to uniquely identify an entity. - EntityID *EntityIDProto `json:"entityId,omitempty"` - - // If this is set, EntityProto refers to an Exchange entity. - ExchangeEntity *PrivateExchangeEntity `json:"exchangeEntity,omitempty"` - - // If this is set, EntityProto refers to a FlashBlade entity. - FlashbladeEntity *PrivateFlashbladeEntity `json:"flashbladeEntity,omitempty"` - - // If this is set, EntityProto refers to a GCP entity. - GcpEntity *PrivateGcpEntity `json:"gcpEntity,omitempty"` - - // The generic NAS structure. Set when type is kGenericNas. - GenericNasEntity *PrivateGenericNasEntity `json:"genericNasEntity,omitempty"` - - // The GPFS specific structure. Set when type is kGPFS. - GpfsEntity *PrivateGpfsEntity `json:"gpfsEntity,omitempty"` - - // The HBase specific structure. Set when type is kHBase. - HbaseEntity *PrivateHbaseEntity `json:"hbaseEntity,omitempty"` - - // The Hdfs specific structure. Set when type is kHdfs. - HdfsEntity *PrivateHdfsEntity `json:"hdfsEntity,omitempty"` - - // The Hive specific structure. Set when type is kHive. - HiveEntity *PrivateHiveEntity `json:"hiveEntity,omitempty"` - - // If this is set, EntityProto refers to a HyperFlex entity. - HyperflexEntity *PrivateHyperflexEntity `json:"hyperflexEntity,omitempty"` - - // The Hyperv-specific structure. Set when type is kHyperv. - HypervEntity *PrivateHypervEntity `json:"hypervEntity,omitempty"` - - // A stable ID generated by Magneto that uniquely identifies this entity. - // The ID will only occupy the first 53 bits, which is required since this - // ID may be passed to javascript which only considers the first 53 bits. - // Note: Populate the id value in entity_id field below as well. This field - // will be deprecated in future. - ID *int64 `json:"id,omitempty"` - - // This flag is used to identify if the entity held in this proto is a clone - // entity. This is set to true if the entity is clone and false otherwise. - IsClone *bool `json:"isClone,omitempty"` - - // The Isilon specific structure. Set when type is kIsilon. - IsilonEntity *PrivateIsilonEntity `json:"isilonEntity,omitempty"` - - // The Kubernetes specific structure. Set when type is kKubernetes. - KubernetesEntity *PrivateKubernetesEntity `json:"kubernetesEntity,omitempty"` - - // The KVM specific structure. Set when type is kKvm. - KvmEntity *PrivateKvmEntity `json:"kvmEntity,omitempty"` - - // The MongoDB specific structure. Set when type is kMongoDB. - MongodbEntity *PrivateMongodbEntity `json:"mongodbEntity,omitempty"` - - // If this is set, EntityProto refers to a Netapp entity. - NetappEntity *PrivateNetappEntity `json:"netappEntity,omitempty"` - - // The network-realm id of the tenant through which this entity should be - // accessible from the cluster. This realm could be a collection of - // Rigel/HyX. Non root entities can also have this value set. If it is set - // for non root entities then this realm should be preferred over the root - // entity's realm. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` - - // If this is set, EntityProto refers to an o365 entity. - O365Entity *PrivateO365Entity `json:"o365Entity,omitempty"` - - // The Oracle specific structure. Set when type is kOracle. - OracleEntity *PrivateOracleEntity `json:"oracleEntity,omitempty"` - - // The ID of the top-level parent source that is managing this entity. For - // example, in a VMware environment, this would be the ID of the vCenter or - // the standalone ESXi host managing the entity. - ParentID *int64 `json:"parentId,omitempty"` - - // If this is set, EntityProto refers to a Physical entity. - PhysicalEntity *PrivatePhysicalEntity `json:"physicalEntity,omitempty"` - - // If this is set, EntityProto refers to one of the following - // FlashArrays - - // Pure FlashArray, Numble FlashArray, IBM FlashSystem - PureEntity *PrivatePureEntity `json:"pureEntity,omitempty"` - - // The sfdc specific structure. Set when type is kSfdc. - SfdcEntity *PrivateSfdcEntity `json:"sfdcEntity,omitempty"` - - // Size information for this entity. This is populated for leaf level - // entities only (as information for non-leaf level entities could be - // dynamically computed). Key for this map is the entity id. The common - // case is to have only one entry in this map. - // - // This is a map (as opposed to a singular field) to support the fact that - // O365 adapter has something called satellite entities (See the field - // additional_entity_info_vec above). In that case, the map may contain - // information about satellite entities as well. - SizeInfo []*EntityProtoSizeInfoEntry `json:"sizeInfo"` - - // If this is set, EntityProto refers to a SQL entity. - SQLEntity *PrivateSQLEntity `json:"sqlEntity,omitempty"` - - // The type of environment this entity pertains to. - Type *int32 `json:"type,omitempty"` - - // The UDA specific structure. Set when type is kUDA. - UdaEntity *PrivateUdaEntity `json:"udaEntity,omitempty"` - - // If this is set, EntityProto refers to a View entity. - ViewEntity *PrivateViewEntity `json:"viewEntity,omitempty"` - - // If this is set, EntityProto refers to a VMware entity. - VmwareEntity *PrivateVmwareEntity `json:"vmwareEntity,omitempty"` -} - -// Validate validates this private entity proto -func (m *PrivateEntityProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdditionalEntityInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHyperflexEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Entity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateEntityProto) validateAcropolisEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisEntity) { // not required - return nil - } - - if m.AcropolisEntity != nil { - if err := m.AcropolisEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateAdEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AdEntity) { // not required - return nil - } - - if m.AdEntity != nil { - if err := m.AdEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateAdditionalEntityInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalEntityInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalEntityInfoVec); i++ { - if swag.IsZero(m.AdditionalEntityInfoVec[i]) { // not required - continue - } - - if m.AdditionalEntityInfoVec[i] != nil { - if err := m.AdditionalEntityInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateEntityProto) validateAgentEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AgentEntity) { // not required - return nil - } - - if m.AgentEntity != nil { - if err := m.AgentEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateAwsEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AwsEntity) { // not required - return nil - } - - if m.AwsEntity != nil { - if err := m.AwsEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateAzureEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AzureEntity) { // not required - return nil - } - - if m.AzureEntity != nil { - if err := m.AzureEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateCassandraEntity(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraEntity) { // not required - return nil - } - - if m.CassandraEntity != nil { - if err := m.CassandraEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateCouchbaseEntity(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseEntity) { // not required - return nil - } - - if m.CouchbaseEntity != nil { - if err := m.CouchbaseEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateElastifileEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileEntity) { // not required - return nil - } - - if m.ElastifileEntity != nil { - if err := m.ElastifileEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) 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 -} - -func (m *PrivateEntityProto) validateExchangeEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeEntity) { // not required - return nil - } - - if m.ExchangeEntity != nil { - if err := m.ExchangeEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateFlashbladeEntity(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeEntity) { // not required - return nil - } - - if m.FlashbladeEntity != nil { - if err := m.FlashbladeEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateGcpEntity(formats strfmt.Registry) error { - if swag.IsZero(m.GcpEntity) { // not required - return nil - } - - if m.GcpEntity != nil { - if err := m.GcpEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateGenericNasEntity(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasEntity) { // not required - return nil - } - - if m.GenericNasEntity != nil { - if err := m.GenericNasEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateGpfsEntity(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsEntity) { // not required - return nil - } - - if m.GpfsEntity != nil { - if err := m.GpfsEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateHbaseEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseEntity) { // not required - return nil - } - - if m.HbaseEntity != nil { - if err := m.HbaseEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateHdfsEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsEntity) { // not required - return nil - } - - if m.HdfsEntity != nil { - if err := m.HdfsEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateHiveEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HiveEntity) { // not required - return nil - } - - if m.HiveEntity != nil { - if err := m.HiveEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateHyperflexEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HyperflexEntity) { // not required - return nil - } - - if m.HyperflexEntity != nil { - if err := m.HyperflexEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hyperflexEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hyperflexEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateHypervEntity(formats strfmt.Registry) error { - if swag.IsZero(m.HypervEntity) { // not required - return nil - } - - if m.HypervEntity != nil { - if err := m.HypervEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateIsilonEntity(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonEntity) { // not required - return nil - } - - if m.IsilonEntity != nil { - if err := m.IsilonEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateKubernetesEntity(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesEntity) { // not required - return nil - } - - if m.KubernetesEntity != nil { - if err := m.KubernetesEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateKvmEntity(formats strfmt.Registry) error { - if swag.IsZero(m.KvmEntity) { // not required - return nil - } - - if m.KvmEntity != nil { - if err := m.KvmEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateMongodbEntity(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbEntity) { // not required - return nil - } - - if m.MongodbEntity != nil { - if err := m.MongodbEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateNetappEntity(formats strfmt.Registry) error { - if swag.IsZero(m.NetappEntity) { // not required - return nil - } - - if m.NetappEntity != nil { - if err := m.NetappEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateO365Entity(formats strfmt.Registry) error { - if swag.IsZero(m.O365Entity) { // not required - return nil - } - - if m.O365Entity != nil { - if err := m.O365Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Entity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateOracleEntity(formats strfmt.Registry) error { - if swag.IsZero(m.OracleEntity) { // not required - return nil - } - - if m.OracleEntity != nil { - if err := m.OracleEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validatePhysicalEntity(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalEntity) { // not required - return nil - } - - if m.PhysicalEntity != nil { - if err := m.PhysicalEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validatePureEntity(formats strfmt.Registry) error { - if swag.IsZero(m.PureEntity) { // not required - return nil - } - - if m.PureEntity != nil { - if err := m.PureEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateSfdcEntity(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcEntity) { // not required - return nil - } - - if m.SfdcEntity != nil { - if err := m.SfdcEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SizeInfo) { // not required - return nil - } - - for i := 0; i < len(m.SizeInfo); i++ { - if swag.IsZero(m.SizeInfo[i]) { // not required - continue - } - - if m.SizeInfo[i] != nil { - if err := m.SizeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sizeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sizeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateEntityProto) validateSQLEntity(formats strfmt.Registry) error { - if swag.IsZero(m.SQLEntity) { // not required - return nil - } - - if m.SQLEntity != nil { - if err := m.SQLEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateUdaEntity(formats strfmt.Registry) error { - if swag.IsZero(m.UdaEntity) { // not required - return nil - } - - if m.UdaEntity != nil { - if err := m.UdaEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateViewEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ViewEntity) { // not required - return nil - } - - if m.ViewEntity != nil { - if err := m.ViewEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) validateVmwareEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareEntity) { // not required - return nil - } - - if m.VmwareEntity != nil { - if err := m.VmwareEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private entity proto based on the context it is used -func (m *PrivateEntityProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdditionalEntityInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgentEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHyperflexEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Entity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateEntityProto) contextValidateAcropolisEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisEntity != nil { - - if swag.IsZero(m.AcropolisEntity) { // not required - return nil - } - - if err := m.AcropolisEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateAdEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AdEntity != nil { - - if swag.IsZero(m.AdEntity) { // not required - return nil - } - - if err := m.AdEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateAdditionalEntityInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalEntityInfoVec); i++ { - - if m.AdditionalEntityInfoVec[i] != nil { - - if swag.IsZero(m.AdditionalEntityInfoVec[i]) { // not required - return nil - } - - if err := m.AdditionalEntityInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalEntityInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalEntityInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateAgentEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentEntity != nil { - - if swag.IsZero(m.AgentEntity) { // not required - return nil - } - - if err := m.AgentEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateAwsEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsEntity != nil { - - if swag.IsZero(m.AwsEntity) { // not required - return nil - } - - if err := m.AwsEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateAzureEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureEntity != nil { - - if swag.IsZero(m.AzureEntity) { // not required - return nil - } - - if err := m.AzureEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateCassandraEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraEntity != nil { - - if swag.IsZero(m.CassandraEntity) { // not required - return nil - } - - if err := m.CassandraEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateCouchbaseEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseEntity != nil { - - if swag.IsZero(m.CouchbaseEntity) { // not required - return nil - } - - if err := m.CouchbaseEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateElastifileEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileEntity != nil { - - if swag.IsZero(m.ElastifileEntity) { // not required - return nil - } - - if err := m.ElastifileEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) 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 -} - -func (m *PrivateEntityProto) contextValidateExchangeEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeEntity != nil { - - if swag.IsZero(m.ExchangeEntity) { // not required - return nil - } - - if err := m.ExchangeEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateFlashbladeEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeEntity != nil { - - if swag.IsZero(m.FlashbladeEntity) { // not required - return nil - } - - if err := m.FlashbladeEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateGcpEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpEntity != nil { - - if swag.IsZero(m.GcpEntity) { // not required - return nil - } - - if err := m.GcpEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateGenericNasEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasEntity != nil { - - if swag.IsZero(m.GenericNasEntity) { // not required - return nil - } - - if err := m.GenericNasEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateGpfsEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsEntity != nil { - - if swag.IsZero(m.GpfsEntity) { // not required - return nil - } - - if err := m.GpfsEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateHbaseEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseEntity != nil { - - if swag.IsZero(m.HbaseEntity) { // not required - return nil - } - - if err := m.HbaseEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateHdfsEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsEntity != nil { - - if swag.IsZero(m.HdfsEntity) { // not required - return nil - } - - if err := m.HdfsEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateHiveEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveEntity != nil { - - if swag.IsZero(m.HiveEntity) { // not required - return nil - } - - if err := m.HiveEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateHyperflexEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HyperflexEntity != nil { - - if swag.IsZero(m.HyperflexEntity) { // not required - return nil - } - - if err := m.HyperflexEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hyperflexEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hyperflexEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateHypervEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervEntity != nil { - - if swag.IsZero(m.HypervEntity) { // not required - return nil - } - - if err := m.HypervEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateIsilonEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonEntity != nil { - - if swag.IsZero(m.IsilonEntity) { // not required - return nil - } - - if err := m.IsilonEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateKubernetesEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesEntity != nil { - - if swag.IsZero(m.KubernetesEntity) { // not required - return nil - } - - if err := m.KubernetesEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateKvmEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmEntity != nil { - - if swag.IsZero(m.KvmEntity) { // not required - return nil - } - - if err := m.KvmEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateMongodbEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbEntity != nil { - - if swag.IsZero(m.MongodbEntity) { // not required - return nil - } - - if err := m.MongodbEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateNetappEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappEntity != nil { - - if swag.IsZero(m.NetappEntity) { // not required - return nil - } - - if err := m.NetappEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateO365Entity(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Entity != nil { - - if swag.IsZero(m.O365Entity) { // not required - return nil - } - - if err := m.O365Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Entity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateOracleEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleEntity != nil { - - if swag.IsZero(m.OracleEntity) { // not required - return nil - } - - if err := m.OracleEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidatePhysicalEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalEntity != nil { - - if swag.IsZero(m.PhysicalEntity) { // not required - return nil - } - - if err := m.PhysicalEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidatePureEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.PureEntity != nil { - - if swag.IsZero(m.PureEntity) { // not required - return nil - } - - if err := m.PureEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateSfdcEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcEntity != nil { - - if swag.IsZero(m.SfdcEntity) { // not required - return nil - } - - if err := m.SfdcEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SizeInfo); i++ { - - if m.SizeInfo[i] != nil { - - if swag.IsZero(m.SizeInfo[i]) { // not required - return nil - } - - if err := m.SizeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sizeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sizeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateSQLEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLEntity != nil { - - if swag.IsZero(m.SQLEntity) { // not required - return nil - } - - if err := m.SQLEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateUdaEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaEntity != nil { - - if swag.IsZero(m.UdaEntity) { // not required - return nil - } - - if err := m.UdaEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateViewEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewEntity != nil { - - if swag.IsZero(m.ViewEntity) { // not required - return nil - } - - if err := m.ViewEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewEntity") - } - return err - } - } - - return nil -} - -func (m *PrivateEntityProto) contextValidateVmwareEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareEntity != nil { - - if swag.IsZero(m.VmwareEntity) { // not required - return nil - } - - if err := m.VmwareEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateEntityProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateEntityProto) UnmarshalBinary(b []byte) error { - var res PrivateEntityProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_error.go b/v1/models/private_error.go deleted file mode 100644 index 6a699d9a..00000000 --- a/v1/models/private_error.go +++ /dev/null @@ -1,55 +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" -) - -// PrivateError Error Error -// -// # Format of error returned by APIs -// -// swagger:model PrivateError -type PrivateError struct { - - // error code - ErrorCode *int64 `json:"errorCode,omitempty"` - - // message - Message *string `json:"message,omitempty"` -} - -// Validate validates this private error -func (m *PrivateError) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private error based on context it is used -func (m *PrivateError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateError) UnmarshalBinary(b []byte) error { - var res PrivateError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_error_proto.go b/v1/models/private_error_proto.go deleted file mode 100644 index 5ebb362e..00000000 --- a/v1/models/private_error_proto.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" -) - -// PrivateErrorProto private error proto -// -// swagger:model PrivateErrorProto -type PrivateErrorProto struct { - - // A string describing the errors encountered. - ErrorMsg *string `json:"errorMsg,omitempty"` - - // The type of error encountered. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this private error proto -func (m *PrivateErrorProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private error proto based on context it is used -func (m *PrivateErrorProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateErrorProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateErrorProto) UnmarshalBinary(b []byte) error { - var res PrivateErrorProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_exchange_d_a_g_database.go b/v1/models/private_exchange_d_a_g_database.go deleted file mode 100644 index 35a92425..00000000 --- a/v1/models/private_exchange_d_a_g_database.go +++ /dev/null @@ -1,176 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateExchangeDAGDatabase Message represents one Exchange DAG database. -// -// For more info on Exchange DAG database: https://bit.ly/2Kxk2Pz -// In entity hierarchy Exchange DAG databases will be represented as children -// of Exchange DAG. -// -// swagger:model PrivateExchangeDAGDatabase -type PrivateExchangeDAGDatabase struct { - - // List of DAG database copies. - DbCopyInfoVec []*PrivateExchangeDatabaseCopyInfo `json:"dbCopyInfoVec"` - - // Identity of the database. - ID *ExchangeDatabaseIdentity `json:"id,omitempty"` -} - -// Validate validates this private exchange d a g database -func (m *PrivateExchangeDAGDatabase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbCopyInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeDAGDatabase) validateDbCopyInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbCopyInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DbCopyInfoVec); i++ { - if swag.IsZero(m.DbCopyInfoVec[i]) { // not required - continue - } - - if m.DbCopyInfoVec[i] != nil { - if err := m.DbCopyInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbCopyInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbCopyInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateExchangeDAGDatabase) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -// ContextValidate validate this private exchange d a g database based on the context it is used -func (m *PrivateExchangeDAGDatabase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbCopyInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeDAGDatabase) contextValidateDbCopyInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbCopyInfoVec); i++ { - - if m.DbCopyInfoVec[i] != nil { - - if swag.IsZero(m.DbCopyInfoVec[i]) { // not required - return nil - } - - if err := m.DbCopyInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbCopyInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbCopyInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateExchangeDAGDatabase) 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 -} - -// MarshalBinary interface implementation -func (m *PrivateExchangeDAGDatabase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateExchangeDAGDatabase) UnmarshalBinary(b []byte) error { - var res PrivateExchangeDAGDatabase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_exchange_database_copy_info.go b/v1/models/private_exchange_database_copy_info.go deleted file mode 100644 index 6f98a35c..00000000 --- a/v1/models/private_exchange_database_copy_info.go +++ /dev/null @@ -1,256 +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" -) - -// PrivateExchangeDatabaseCopyInfo Message represents one Exchange database copy. The copy can be of type -// DAG active copy or DAG passive copy or standalone database. -// -// swagger:model PrivateExchangeDatabaseCopyInfo -type PrivateExchangeDatabaseCopyInfo struct { - - // Activation preference number assigned for this database on 'owner_id'. - // This is 1 based number assigned in Exchange Admin Console. - ActivationPreferenceNumber *uint32 `json:"activationPreferenceNumber,omitempty"` - - // Free form text for the reasons why backup is not supported for this DB. - // This is valid only if is_backup_supported = false. - BackupUnsupportedReasonVec []string `json:"backupUnsupportedReasonVec"` - - // When this DB was created in local time. - CreationDate *LocalTime `json:"creationDate,omitempty"` - - // Guid of the db copy. This represents copy database guid for a DAG - // database and for standalone Exchange database this will not be set. - // This database will be hosted on 'owner_id'. - DbGUID *string `json:"dbGuid,omitempty"` - - // Id of the entity corresponding to this database copy. - EntityID *int64 `json:"entityId,omitempty"` - - // The entity id of the Exchange source which hosts this database. - ExchangeID *int64 `json:"exchangeId,omitempty"` - - // Identity of the database. This represents parent database id for - // a DAG database copy and database id of itself for a standalone Exchange - // database. - ID *ExchangeDatabaseIdentity `json:"id,omitempty"` - - // Indicates whether this is the active database copy. - IsActive *bool `json:"isActive,omitempty"` - - // Whether backing up this DB is supported or not due to system or - // implementation limitations. - IsBackupSupported *bool `json:"isBackupSupported,omitempty"` - - // Indicates whether this is copy of a DAG database or standalone database. - IsDagDbCopy *bool `json:"isDagDbCopy,omitempty"` - - // The owner entity id on which this database is hosted. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Replay Lag Time in hours configured in Exchange Admin Console for the - // database. This value is specific to an Exchange server node. - ReplayLagHours *uint32 `json:"replayLagHours,omitempty"` - - // Exchange server identifier on which this database copy is hosted. - ServerID *ExchangeServerIdentity `json:"serverId,omitempty"` - - // Exchange database information. - Status *int32 `json:"status,omitempty"` - - // Total size of the Exchange database copy in bytes. - TotalSizeInBytes *int64 `json:"totalSizeInBytes,omitempty"` -} - -// Validate validates this private exchange database copy info -func (m *PrivateExchangeDatabaseCopyInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreationDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeDatabaseCopyInfo) validateCreationDate(formats strfmt.Registry) error { - if swag.IsZero(m.CreationDate) { // not required - return nil - } - - if m.CreationDate != nil { - if err := m.CreationDate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationDate") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeDatabaseCopyInfo) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *PrivateExchangeDatabaseCopyInfo) validateServerID(formats strfmt.Registry) error { - if swag.IsZero(m.ServerID) { // not required - return nil - } - - if m.ServerID != nil { - if err := m.ServerID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private exchange database copy info based on the context it is used -func (m *PrivateExchangeDatabaseCopyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreationDate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServerID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeDatabaseCopyInfo) contextValidateCreationDate(ctx context.Context, formats strfmt.Registry) error { - - if m.CreationDate != nil { - - if swag.IsZero(m.CreationDate) { // not required - return nil - } - - if err := m.CreationDate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationDate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationDate") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeDatabaseCopyInfo) 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 -} - -func (m *PrivateExchangeDatabaseCopyInfo) contextValidateServerID(ctx context.Context, formats strfmt.Registry) error { - - if m.ServerID != nil { - - if swag.IsZero(m.ServerID) { // not required - return nil - } - - if err := m.ServerID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateExchangeDatabaseCopyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateExchangeDatabaseCopyInfo) UnmarshalBinary(b []byte) error { - var res PrivateExchangeDatabaseCopyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_exchange_entity.go b/v1/models/private_exchange_entity.go deleted file mode 100644 index 5b61cb2d..00000000 --- a/v1/models/private_exchange_entity.go +++ /dev/null @@ -1,326 +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" -) - -// PrivateExchangeEntity private exchange entity -// -// swagger:model PrivateExchangeEntity -type PrivateExchangeEntity struct { - - // This is only set if type is kExchangeDAGDatabase. - DagDatabase *PrivateExchangeDAGDatabase `json:"dagDatabase,omitempty"` - - // This is only set if type is kExchangeDAGDatabaseCopy. - DagDatabaseCopy *ExchangeDAGDatabaseCopy `json:"dagDatabaseCopy,omitempty"` - - // This is only set if type is kExchangeDAG. - DagInfo *ExchangeDAGInfo `json:"dagInfo,omitempty"` - - // Represents topology of an Exchange onprem queried from a source. - // This is only set if type is kExchangeNode. - Exchange *ExchangeTopology `json:"exchange,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The entity id of the owner entity. - OwnerID *int64 `json:"ownerId,omitempty"` - - // This is only set if type is kExchangeStandaloneDatabase. - StandaloneDatabase *ExchangeDatabase `json:"standaloneDatabase,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private exchange entity -func (m *PrivateExchangeEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDagDatabase(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagDatabaseCopy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDagInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchange(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneDatabase(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeEntity) validateDagDatabase(formats strfmt.Registry) error { - if swag.IsZero(m.DagDatabase) { // not required - return nil - } - - if m.DagDatabase != nil { - if err := m.DagDatabase.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabase") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabase") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) validateDagDatabaseCopy(formats strfmt.Registry) error { - if swag.IsZero(m.DagDatabaseCopy) { // not required - return nil - } - - if m.DagDatabaseCopy != nil { - if err := m.DagDatabaseCopy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseCopy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseCopy") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) validateDagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DagInfo) { // not required - return nil - } - - if m.DagInfo != nil { - if err := m.DagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) validateExchange(formats strfmt.Registry) error { - if swag.IsZero(m.Exchange) { // not required - return nil - } - - if m.Exchange != nil { - if err := m.Exchange.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchange") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchange") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) validateStandaloneDatabase(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneDatabase) { // not required - return nil - } - - if m.StandaloneDatabase != nil { - if err := m.StandaloneDatabase.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDatabase") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDatabase") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private exchange entity based on the context it is used -func (m *PrivateExchangeEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDagDatabase(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagDatabaseCopy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchange(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneDatabase(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateExchangeEntity) contextValidateDagDatabase(ctx context.Context, formats strfmt.Registry) error { - - if m.DagDatabase != nil { - - if swag.IsZero(m.DagDatabase) { // not required - return nil - } - - if err := m.DagDatabase.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabase") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabase") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) contextValidateDagDatabaseCopy(ctx context.Context, formats strfmt.Registry) error { - - if m.DagDatabaseCopy != nil { - - if swag.IsZero(m.DagDatabaseCopy) { // not required - return nil - } - - if err := m.DagDatabaseCopy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagDatabaseCopy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagDatabaseCopy") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) contextValidateDagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DagInfo != nil { - - if swag.IsZero(m.DagInfo) { // not required - return nil - } - - if err := m.DagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dagInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) contextValidateExchange(ctx context.Context, formats strfmt.Registry) error { - - if m.Exchange != nil { - - if swag.IsZero(m.Exchange) { // not required - return nil - } - - if err := m.Exchange.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchange") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchange") - } - return err - } - } - - return nil -} - -func (m *PrivateExchangeEntity) contextValidateStandaloneDatabase(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneDatabase != nil { - - if swag.IsZero(m.StandaloneDatabase) { // not required - return nil - } - - if err := m.StandaloneDatabase.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneDatabase") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneDatabase") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateExchangeEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateExchangeEntity) UnmarshalBinary(b []byte) error { - var res PrivateExchangeEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_flashblade_entity.go b/v1/models/private_flashblade_entity.go deleted file mode 100644 index c3d4af08..00000000 --- a/v1/models/private_flashblade_entity.go +++ /dev/null @@ -1,172 +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" -) - -// PrivateFlashbladeEntity private flashblade entity -// -// swagger:model PrivateFlashbladeEntity -type PrivateFlashbladeEntity struct { - - // Specific information of an array, only valid for an entity of type - // kArray'. - ArrayInfo *ArrayInfo `json:"arrayInfo,omitempty"` - - // Specific information of a file system, only valid for an entity of type - // 'kFileSystem'. - FileSystemInfo *FileSystemInfo `json:"fileSystemInfo,omitempty"` - - // The name of the entity. An entity of type 'kFileSystem' is uniquely - // identified by its name. - Name *string `json:"name,omitempty"` - - // The smb host name for kerberos authentication. - SmbKrb5Hostname *string `json:"smbKrb5Hostname,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this private flashblade entity -func (m *PrivateFlashbladeEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArrayInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSystemInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateFlashbladeEntity) validateArrayInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArrayInfo) { // not required - return nil - } - - if m.ArrayInfo != nil { - if err := m.ArrayInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("arrayInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("arrayInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateFlashbladeEntity) validateFileSystemInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FileSystemInfo) { // not required - return nil - } - - if m.FileSystemInfo != nil { - if err := m.FileSystemInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSystemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSystemInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private flashblade entity based on the context it is used -func (m *PrivateFlashbladeEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArrayInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileSystemInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateFlashbladeEntity) contextValidateArrayInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArrayInfo != nil { - - if swag.IsZero(m.ArrayInfo) { // not required - return nil - } - - if err := m.ArrayInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("arrayInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("arrayInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateFlashbladeEntity) contextValidateFileSystemInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FileSystemInfo != nil { - - if swag.IsZero(m.FileSystemInfo) { // not required - return nil - } - - if err := m.FileSystemInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSystemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSystemInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateFlashbladeEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateFlashbladeEntity) UnmarshalBinary(b []byte) error { - var res PrivateFlashbladeEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_fleet_network_params.go b/v1/models/private_fleet_network_params.go deleted file mode 100644 index d5417e03..00000000 --- a/v1/models/private_fleet_network_params.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateFleetNetworkParams Params for Network configuration of GCP fleet deployment. -// -// swagger:model PrivateFleetNetworkParams -type PrivateFleetNetworkParams struct { - - // Fleet Subnet Priority i.e. Primary, Secondary or Tertiary. - FleetSubnetPriority *int32 `json:"fleetSubnetPriority,omitempty"` - - // Fleet's network type. This field should always be set when specifying - // fleet params. It is used by Iris. - FleetSubnetType *int32 `json:"fleetSubnetType,omitempty"` - - // Network information for the fleet. This will be only set when - // fleet_subnet_type is kCustom. - NetworkParamsVec []*FleetNetworkParamsNetworkParams `json:"networkParamsVec"` -} - -// Validate validates this private fleet network params -func (m *PrivateFleetNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateFleetNetworkParams) validateNetworkParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.NetworkParamsVec); i++ { - if swag.IsZero(m.NetworkParamsVec[i]) { // not required - continue - } - - if m.NetworkParamsVec[i] != nil { - if err := m.NetworkParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private fleet network params based on the context it is used -func (m *PrivateFleetNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateFleetNetworkParams) contextValidateNetworkParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkParamsVec); i++ { - - if m.NetworkParamsVec[i] != nil { - - if swag.IsZero(m.NetworkParamsVec[i]) { // not required - return nil - } - - if err := m.NetworkParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateFleetNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateFleetNetworkParams) UnmarshalBinary(b []byte) error { - var res PrivateFleetNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_gcp_credentials.go b/v1/models/private_gcp_credentials.go deleted file mode 100644 index 9d98fd99..00000000 --- a/v1/models/private_gcp_credentials.go +++ /dev/null @@ -1,85 +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" -) - -// PrivateGcpCredentials The service account credentials allow us to access the Google account. -// -// swagger:model PrivateGcpCredentials -type PrivateGcpCredentials struct { - - // The url of the public x509 certificate used to verify JSON web tokens - // signed by the authentication provider. - AuthProviderX509CertURL *string `json:"auth_provider_x509_cert_url,omitempty"` - - // The authorization server endpoint URI. - AuthURI *string `json:"auth_uri,omitempty"` - - // Client email address associated with the service account. - ClientEmailAddress *string `json:"client_email_address,omitempty"` - - // Client Id associated with the Google cloud account. - ClientID *string `json:"client_id,omitempty"` - - // The url of the public x509 certificate used to verify JSON web tokens - // signed by the client. - ClientX509CertURL *string `json:"client_x509_cert_url,omitempty"` - - // Client private key generated at the time of creating the service - // account. This is used for authenticating ourselves with Google cloud. - // This field only stores the private key in bytes and doesn't encrypt it. - EncryptedClientPrivateKey []uint8 `json:"encrypted_client_private_key"` - - // Encrypted client private key. Unencrypted version is - // received in "encrypted_client_private_key" from iris. - EncryptedPrivateKeyID *string `json:"encrypted_private_key_id,omitempty"` - - // Private key Id associated with the Google cloud account. - PrivateKeyID *string `json:"private_key_id,omitempty"` - - // Id of the project associated with Google cloud account. - ProjectID *string `json:"project_id,omitempty"` - - // The token server endpoint URI. - TokenURI *string `json:"token_uri,omitempty"` - - // The type of our application. - Type *string `json:"type,omitempty"` -} - -// Validate validates this private gcp credentials -func (m *PrivateGcpCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private gcp credentials based on context it is used -func (m *PrivateGcpCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateGcpCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateGcpCredentials) UnmarshalBinary(b []byte) error { - var res PrivateGcpCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_gcp_entity.go b/v1/models/private_gcp_entity.go deleted file mode 100644 index a44f76b5..00000000 --- a/v1/models/private_gcp_entity.go +++ /dev/null @@ -1,573 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateGcpEntity private gcp entity -// -// swagger:model PrivateGcpEntity -type PrivateGcpEntity struct { - - // Set only for BaaS. Represents a list of project ids. If set, only these - // projects are added to the entity hierarchy. - AllowedProjectIDVec []string `json:"allowedProjectIdVec"` - - // Set only for BaaS. Represents a list of regions. If set, only these - // regions should be listed in the entity hierarchy on this cluster. - // Typically this is the same region where the cluster is running. - AllowedRegionVec []string `json:"allowedRegionVec"` - - // Information related to cluster. This is only valid for CE and NGCE - // clusters. This is only populated for kIAMUser entity. - ClusterNetworkInfo *FleetNetworkParamsNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Information common to all types of cloud entities. - CommonInfo *EntityCommonInfo `json:"commonInfo,omitempty"` - - // List of disk attached to a GCP instance. This is populated only for - // kInstanceType entity type. - DiskInfoVec []*DiskInfo `json:"diskInfoVec"` - - // Information related to GCP fleets launched for various purposes. This - // will only be set for kIAMUser entity. - GcpFleetParams *GCPFleetParams `json:"gcpFleetParams,omitempty"` - - // Populated in entities of type kSubnet if the subnet is part of a Shared - // VPC. This contains the ID of the host project the subnet belongs to. - // Populated in entities of type kProject if the project is a service project - // in a Shared VPC setup. This contains the ID of the host project it is - // attached to. - HostProjectID *string `json:"hostProjectId,omitempty"` - - // The host environment type. This is set for entities of type - // kVirtualMachine. - HostType *int32 `json:"hostType,omitempty"` - - // iam info - IamInfo *EntityIAMInfo `json:"iamInfo,omitempty"` - - // List of metadata keys and values. This is set for entities of type - // kVirtualMachine. - MetadataVecDEPRECATED []*GCPAttributes `json:"metadataVec_DEPRECATED"` - - // List of network tags. This is set for entities of type kVirtualMachine. - NetworkTagVecDEPRECATED []*GCPAttributes `json:"networkTagVec_DEPRECATED"` - - // The client email of GCP service account is used as owner id. - OwnerID *string `json:"ownerId,omitempty"` - - // Private ip address. This is set for entities of type kVirtualMachine. - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - - // For entities of type kVirtualMachine this contains the id of the project - // the virtual machine belongs to. For entities of type kSubnet, this - // contains the id of project the subnet is available to. For entities of the - // type kVPCConnector this contains the id of the project the VPC connector - // belongs to. - ProjectID *string `json:"projectId,omitempty"` - - // For entities of type kVirtualMachine this contains the region - // the virtual machine belongs to. - // For the kVPCConnectorEntity this contains the region the VPC connector - // belongs to. - Region *string `json:"region,omitempty"` - - // This is set for entities of type kVirtualMachine. Contains a list of all - // metadata present on the instance - network tags, labels, and custom - // metadata. - TagAttributesVec []*GCPAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // In the kSubnet entity this field contains the VPC network the subnet - // belongs to. - // In the kSubnet, kVirtualMachine and kVPCConnector entities this field - // contains the name of VPC network the entity resource belongs to. - VpcNetwork *string `json:"vpcNetwork,omitempty"` - - // Subnetwork to be used for deploying proxy VMs. Set only for the service - // account entity - VpcSubnetwork *string `json:"vpcSubnetwork,omitempty"` - - // For entities of type kVirtualMachine this contains the zone the - // virtual machine belongs to. - Zone *string `json:"zone,omitempty"` -} - -// Validate validates this private gcp entity -func (m *PrivateGcpEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIamInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadataVecDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkTagVecDEPRECATED(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGcpEntity) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) validateCommonInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if m.CommonInfo != nil { - if err := m.CommonInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) validateDiskInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskInfoVec); i++ { - if swag.IsZero(m.DiskInfoVec[i]) { // not required - continue - } - - if m.DiskInfoVec[i] != nil { - if err := m.DiskInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) validateGcpFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if m.GcpFleetParams != nil { - if err := m.GcpFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) validateIamInfo(formats strfmt.Registry) error { - if swag.IsZero(m.IamInfo) { // not required - return nil - } - - if m.IamInfo != nil { - if err := m.IamInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) validateMetadataVecDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.MetadataVecDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.MetadataVecDEPRECATED); i++ { - if swag.IsZero(m.MetadataVecDEPRECATED[i]) { // not required - continue - } - - if m.MetadataVecDEPRECATED[i] != nil { - if err := m.MetadataVecDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataVec_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataVec_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) validateNetworkTagVecDEPRECATED(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkTagVecDEPRECATED) { // not required - return nil - } - - for i := 0; i < len(m.NetworkTagVecDEPRECATED); i++ { - if swag.IsZero(m.NetworkTagVecDEPRECATED[i]) { // not required - continue - } - - if m.NetworkTagVecDEPRECATED[i] != nil { - if err := m.NetworkTagVecDEPRECATED[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkTagVec_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkTagVec_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private gcp entity based on the context it is used -func (m *PrivateGcpEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCommonInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIamInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadataVecDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkTagVecDEPRECATED(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGcpEntity) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateCommonInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonInfo != nil { - - if swag.IsZero(m.CommonInfo) { // not required - return nil - } - - if err := m.CommonInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateDiskInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskInfoVec); i++ { - - if m.DiskInfoVec[i] != nil { - - if swag.IsZero(m.DiskInfoVec[i]) { // not required - return nil - } - - if err := m.DiskInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateGcpFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpFleetParams != nil { - - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if err := m.GcpFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateIamInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.IamInfo != nil { - - if swag.IsZero(m.IamInfo) { // not required - return nil - } - - if err := m.IamInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateMetadataVecDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MetadataVecDEPRECATED); i++ { - - if m.MetadataVecDEPRECATED[i] != nil { - - if swag.IsZero(m.MetadataVecDEPRECATED[i]) { // not required - return nil - } - - if err := m.MetadataVecDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataVec_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataVec_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateNetworkTagVecDEPRECATED(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkTagVecDEPRECATED); i++ { - - if m.NetworkTagVecDEPRECATED[i] != nil { - - if swag.IsZero(m.NetworkTagVecDEPRECATED[i]) { // not required - return nil - } - - if err := m.NetworkTagVecDEPRECATED[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkTagVec_DEPRECATED" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkTagVec_DEPRECATED" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateGcpEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateGcpEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateGcpEntity) UnmarshalBinary(b []byte) error { - var res PrivateGcpEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_generic_nas_entity.go b/v1/models/private_generic_nas_entity.go deleted file mode 100644 index 7352a916..00000000 --- a/v1/models/private_generic_nas_entity.go +++ /dev/null @@ -1,136 +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" -) - -// PrivateGenericNasEntity private generic nas entity -// -// swagger:model PrivateGenericNasEntity -type PrivateGenericNasEntity struct { - - // Use 'description' in 'registered_entity_params' field of - // 'registered_entity_info'. - // - // The description of this NAS. - Description *string `json:"description,omitempty"` - - // Name. This is currently populated for kGroup objects. - Name *string `json:"name,omitempty"` - - // The mount path of this NAS. For example, for a NFS mount point, this - // should be in the format of (IP or hostname):/foo/bar. - Path *string `json:"path,omitempty"` - - // The protocol of this NAS. - Protocol *int32 `json:"protocol,omitempty"` - - // Use 'skip_validation' present in 'generic_nas_params' of - // 'registered_entity_params'. - // - // Whether to skip validation of the given mount point. If this is set to - // true, the mount point will not be validated during registration. - SkipValidation *bool `json:"skipValidation,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The universal identifier of the object, which is a distinct value - // generated by Magneto. - UID *UniversalIDProto `json:"uid,omitempty"` -} - -// Validate validates this private generic nas entity -func (m *PrivateGenericNasEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGenericNasEntity) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -// ContextValidate validate this private generic nas entity based on the context it is used -func (m *PrivateGenericNasEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGenericNasEntity) 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 -} - -// MarshalBinary interface implementation -func (m *PrivateGenericNasEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateGenericNasEntity) UnmarshalBinary(b []byte) error { - var res PrivateGenericNasEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_gpfs_entity.go b/v1/models/private_gpfs_entity.go deleted file mode 100644 index 8dd0c790..00000000 --- a/v1/models/private_gpfs_entity.go +++ /dev/null @@ -1,217 +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" -) - -// PrivateGpfsEntity private gpfs entity -// -// swagger:model PrivateGpfsEntity -type PrivateGpfsEntity struct { - - // Specific information of a cluster (only valid for cluster). - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Specific information of a fileset (only valid for fileset). - FilesetInfo *FilesetInfo `json:"filesetInfo,omitempty"` - - // Specific information of a filesystem (only valid for filesystem). - FilesystemInfo *FilesystemInfo `json:"filesystemInfo,omitempty"` - - // The name of the entity. - Name *string `json:"name,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this private gpfs entity -func (m *PrivateGpfsEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesetInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesystemInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGpfsEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGpfsEntity) validateFilesetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FilesetInfo) { // not required - return nil - } - - if m.FilesetInfo != nil { - if err := m.FilesetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesetInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGpfsEntity) validateFilesystemInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FilesystemInfo) { // not required - return nil - } - - if m.FilesystemInfo != nil { - if err := m.FilesystemInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystemInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private gpfs entity based on the context it is used -func (m *PrivateGpfsEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilesetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilesystemInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateGpfsEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGpfsEntity) contextValidateFilesetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FilesetInfo != nil { - - if swag.IsZero(m.FilesetInfo) { // not required - return nil - } - - if err := m.FilesetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesetInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateGpfsEntity) contextValidateFilesystemInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FilesystemInfo != nil { - - if swag.IsZero(m.FilesystemInfo) { // not required - return nil - } - - if err := m.FilesystemInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystemInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateGpfsEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateGpfsEntity) UnmarshalBinary(b []byte) error { - var res PrivateGpfsEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_h_base_connect_params.go b/v1/models/private_h_base_connect_params.go deleted file mode 100644 index 63fcc3dd..00000000 --- a/v1/models/private_h_base_connect_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateHBaseConnectParams Contains specific parameters required to connect to an hbase cluster. -// -// swagger:model PrivateHBaseConnectParams -type PrivateHBaseConnectParams struct { - - // HBase connection configuration. - Configuration []*HBaseConnectParamsConfigurationEntry `json:"configuration"` - - // Authentication type - HbaseAuthType *int32 `json:"hbaseAuthType,omitempty"` - - // Kerberos principal - HbasePrincipal *string `json:"hbasePrincipal,omitempty"` - - // HBase data root directory. - HbaseRootDataDirectory *string `json:"hbaseRootDataDirectory,omitempty"` - - // HBase zookeeper quorum. - HbaseZookeeperQuorum []string `json:"hbaseZookeeperQuorum"` - - // The entity id of the HDFS source for this HBase - HdfsEntityID *int64 `json:"hdfsEntityId,omitempty"` -} - -// Validate validates this private h base connect params -func (m *PrivateHBaseConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfiguration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHBaseConnectParams) validateConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.Configuration) { // not required - return nil - } - - for i := 0; i < len(m.Configuration); i++ { - if swag.IsZero(m.Configuration[i]) { // not required - continue - } - - if m.Configuration[i] != nil { - if err := m.Configuration[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private h base connect params based on the context it is used -func (m *PrivateHBaseConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHBaseConnectParams) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Configuration); i++ { - - if m.Configuration[i] != nil { - - if swag.IsZero(m.Configuration[i]) { // not required - return nil - } - - if err := m.Configuration[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHBaseConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHBaseConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateHBaseConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hbase_entity.go b/v1/models/private_hbase_entity.go deleted file mode 100644 index d1173c02..00000000 --- a/v1/models/private_hbase_entity.go +++ /dev/null @@ -1,178 +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" -) - -// PrivateHbaseEntity private hbase entity -// -// swagger:model PrivateHbaseEntity -type PrivateHbaseEntity struct { - - // Information of a hbase cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Information of a hbase namespace, only valid for an entity of type - // kNamespace. - NamespaceInfo NamespaceInfo `json:"namespaceInfo,omitempty"` - - // Information about a hbase table, only valid for an entity of type - // kTable. - TableInfo *TableInfo `json:"tableInfo,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a table can be the - // string . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private hbase entity -func (m *PrivateHbaseEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHbaseEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHbaseEntity) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private hbase entity based on the context it is used -func (m *PrivateHbaseEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHbaseEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHbaseEntity) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHbaseEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHbaseEntity) UnmarshalBinary(b []byte) error { - var res PrivateHbaseEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hdfs_connect_params.go b/v1/models/private_hdfs_connect_params.go deleted file mode 100644 index 10299336..00000000 --- a/v1/models/private_hdfs_connect_params.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateHdfsConnectParams Contains specific parameters required to connect to an hdfs cluster. -// -// swagger:model PrivateHdfsConnectParams -type PrivateHdfsConnectParams struct { - - // Hdfs connection configuration. - Configuration []*HdfsConnectParamsConfigurationEntry `json:"configuration"` - - // hadoop distribution - HadoopDistribution *int32 `json:"hadoopDistribution,omitempty"` - - // Hadoop version - HadoopVersion *string `json:"hadoopVersion,omitempty"` - - // Authentication type - HdfsAuthType *int32 `json:"hdfsAuthType,omitempty"` - - // Kerberos principal - HdfsPrincipal *string `json:"hdfsPrincipal,omitempty"` - - // Namenode host or Nameservice. - Namenode *string `json:"namenode,omitempty"` - - // Webhdfs Port - Port *int32 `json:"port,omitempty"` -} - -// Validate validates this private hdfs connect params -func (m *PrivateHdfsConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfiguration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHdfsConnectParams) validateConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.Configuration) { // not required - return nil - } - - for i := 0; i < len(m.Configuration); i++ { - if swag.IsZero(m.Configuration[i]) { // not required - continue - } - - if m.Configuration[i] != nil { - if err := m.Configuration[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private hdfs connect params based on the context it is used -func (m *PrivateHdfsConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHdfsConnectParams) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Configuration); i++ { - - if m.Configuration[i] != nil { - - if swag.IsZero(m.Configuration[i]) { // not required - return nil - } - - if err := m.Configuration[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHdfsConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHdfsConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateHdfsConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hdfs_entity.go b/v1/models/private_hdfs_entity.go deleted file mode 100644 index 54d2b2ba..00000000 --- a/v1/models/private_hdfs_entity.go +++ /dev/null @@ -1,224 +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" -) - -// PrivateHdfsEntity private hdfs entity -// -// swagger:model PrivateHdfsEntity -type PrivateHdfsEntity struct { - - // Information of a hdfs cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Information of hdfs directory, only valid for entity of type kDirectory - DirInfo *FileInfo `json:"dirInfo,omitempty"` - - // Information of hdfs file, only valid for entity of type kFile - FileInfo *FileInfo `json:"fileInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a cluster can be namenode/ - // nameservice. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private hdfs entity -func (m *PrivateHdfsEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDirInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHdfsEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHdfsEntity) validateDirInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DirInfo) { // not required - return nil - } - - if m.DirInfo != nil { - if err := m.DirInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dirInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dirInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHdfsEntity) validateFileInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FileInfo) { // not required - return nil - } - - if m.FileInfo != nil { - if err := m.FileInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private hdfs entity based on the context it is used -func (m *PrivateHdfsEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDirInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHdfsEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHdfsEntity) contextValidateDirInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DirInfo != nil { - - if swag.IsZero(m.DirInfo) { // not required - return nil - } - - if err := m.DirInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dirInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dirInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHdfsEntity) contextValidateFileInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FileInfo != nil { - - if swag.IsZero(m.FileInfo) { // not required - return nil - } - - if err := m.FileInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHdfsEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHdfsEntity) UnmarshalBinary(b []byte) error { - var res PrivateHdfsEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hive_connect_params.go b/v1/models/private_hive_connect_params.go deleted file mode 100644 index 4052c010..00000000 --- a/v1/models/private_hive_connect_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateHiveConnectParams Contains specific parameters required to connect to a hive cluster. -// -// swagger:model PrivateHiveConnectParams -type PrivateHiveConnectParams struct { - - // Hive connection configuration. - Configuration []*HiveConnectParamsConfigurationEntry `json:"configuration"` - - // The entity id of the HDFS source for this Hive - HdfsEntityID *int64 `json:"hdfsEntityId,omitempty"` - - // Authentication type - HiveAuthType *int32 `json:"hiveAuthType,omitempty"` - - // Kerberos principal - HivePrincipal *string `json:"hivePrincipal,omitempty"` - - // Metastore host. - Metastore *string `json:"metastore,omitempty"` - - // Metastore thrift Port - ThriftPort *int32 `json:"thriftPort,omitempty"` -} - -// Validate validates this private hive connect params -func (m *PrivateHiveConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfiguration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHiveConnectParams) validateConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.Configuration) { // not required - return nil - } - - for i := 0; i < len(m.Configuration); i++ { - if swag.IsZero(m.Configuration[i]) { // not required - continue - } - - if m.Configuration[i] != nil { - if err := m.Configuration[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private hive connect params based on the context it is used -func (m *PrivateHiveConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHiveConnectParams) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Configuration); i++ { - - if m.Configuration[i] != nil { - - if swag.IsZero(m.Configuration[i]) { // not required - return nil - } - - if err := m.Configuration[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configuration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configuration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHiveConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHiveConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateHiveConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hive_entity.go b/v1/models/private_hive_entity.go deleted file mode 100644 index de1edbaf..00000000 --- a/v1/models/private_hive_entity.go +++ /dev/null @@ -1,178 +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" -) - -// PrivateHiveEntity private hive entity -// -// swagger:model PrivateHiveEntity -type PrivateHiveEntity struct { - - // Information of a hive cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Information of a hive database, only valid for an entity of type - // kDatabase. - DatabaseInfo DatabaseInfo `json:"databaseInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Information about a hive table, only valid for an entity of type - // kTable. - TableInfo *TableInfo `json:"tableInfo,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a table can be the - // string . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private hive entity -func (m *PrivateHiveEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTableInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHiveEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHiveEntity) validateTableInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if m.TableInfo != nil { - if err := m.TableInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private hive entity based on the context it is used -func (m *PrivateHiveEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTableInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHiveEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHiveEntity) contextValidateTableInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TableInfo != nil { - - if swag.IsZero(m.TableInfo) { // not required - return nil - } - - if err := m.TableInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tableInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tableInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHiveEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHiveEntity) UnmarshalBinary(b []byte) error { - var res PrivateHiveEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_host_settings_check_result.go b/v1/models/private_host_settings_check_result.go deleted file mode 100644 index efa0fcee..00000000 --- a/v1/models/private_host_settings_check_result.go +++ /dev/null @@ -1,122 +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" -) - -// PrivateHostSettingsCheckResult Define the result of performing a single check. -// -// swagger:model PrivateHostSettingsCheckResult -type PrivateHostSettingsCheckResult struct { - - // The type of environment the checks pertains to. - EnvType *int32 `json:"envType,omitempty"` - - // The check type for which this result corresponds. - HostSettingsCheck *HostSettingsCheck `json:"hostSettingsCheck,omitempty"` - - // Detailed information about individual checks - InfoMessagesVec []string `json:"infoMessagesVec"` - - // Indicates whether to indicate failed/passed/warning. - ResultType *int32 `json:"resultType,omitempty"` - - // A descriptive message for failed/warning types. May also include a - // step to take. - UserMessage *string `json:"userMessage,omitempty"` -} - -// Validate validates this private host settings check result -func (m *PrivateHostSettingsCheckResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostSettingsCheck(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHostSettingsCheckResult) validateHostSettingsCheck(formats strfmt.Registry) error { - if swag.IsZero(m.HostSettingsCheck) { // not required - return nil - } - - if m.HostSettingsCheck != nil { - if err := m.HostSettingsCheck.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheck") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheck") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private host settings check result based on the context it is used -func (m *PrivateHostSettingsCheckResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostSettingsCheck(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHostSettingsCheckResult) contextValidateHostSettingsCheck(ctx context.Context, formats strfmt.Registry) error { - - if m.HostSettingsCheck != nil { - - if swag.IsZero(m.HostSettingsCheck) { // not required - return nil - } - - if err := m.HostSettingsCheck.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheck") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheck") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHostSettingsCheckResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHostSettingsCheckResult) UnmarshalBinary(b []byte) error { - var res PrivateHostSettingsCheckResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hyperflex_entity.go b/v1/models/private_hyperflex_entity.go deleted file mode 100644 index df9cbee0..00000000 --- a/v1/models/private_hyperflex_entity.go +++ /dev/null @@ -1,59 +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" -) - -// PrivateHyperflexEntity private hyperflex entity -// -// swagger:model PrivateHyperflexEntity -type PrivateHyperflexEntity struct { - - // The name of the entity. - Name *string `json:"name,omitempty"` - - // Product Version of the kServer type. - ProductVersion *string `json:"productVersion,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` - - // Uuid of the entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private hyperflex entity -func (m *PrivateHyperflexEntity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private hyperflex entity based on context it is used -func (m *PrivateHyperflexEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHyperflexEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHyperflexEntity) UnmarshalBinary(b []byte) error { - var res PrivateHyperflexEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_hyperv_entity.go b/v1/models/private_hyperv_entity.go deleted file mode 100644 index ec85896a..00000000 --- a/v1/models/private_hyperv_entity.go +++ /dev/null @@ -1,370 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateHypervEntity private hyperv entity -// -// swagger:model PrivateHypervEntity -type PrivateHypervEntity struct { - - // This will be set for Hyper-V host entities whose agent cannot be reached, - // either because it is not installed or due some error. - AgentError *PrivateErrorProto `json:"agentError,omitempty"` - - // Information about the Agents (see agent.proto for details). The kHost case - // a single one while the kWindowsCluster has several. - AgentStatusVec []*HostAgentStatus `json:"agentStatusVec"` - - // Supported backup type. - BackupType *int32 `json:"backupType,omitempty"` - - // SCVMM build number. - BuildNumber *string `json:"buildNumber,omitempty"` - - // This is populated for entities of type kHostCluster. - ClusterName *string `json:"clusterName,omitempty"` - - // This is populated for entities of type kDatastore. - DatastoreInfo *PrivateDatastoreInfo `json:"datastoreInfo,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // This is populated for entities of type kHypervHost. - DomainName *string `json:"domainName,omitempty"` - - // For some entities such as a VirtualMachine, a different id will be present - // on the HyperV host. This captures that. - HypervUUID *string `json:"hypervUuid,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Optional list of tag attributes associated with this entity. - TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. This is set for all the objects returned from the - // Hyper-V environment and is unique within a registered source. - UUID *string `json:"uuid,omitempty"` - - // version - Version *int32 `json:"version,omitempty"` - - // This is populated for entities of type kVirtualMachine. - VMInfo *VirtualMachineInfo `json:"vmInfo,omitempty"` -} - -// Validate validates this private hyperv entity -func (m *PrivateHypervEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHypervEntity) validateAgentError(formats strfmt.Registry) error { - if swag.IsZero(m.AgentError) { // not required - return nil - } - - if m.AgentError != nil { - if err := m.AgentError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentError") - } - return err - } - } - - return nil -} - -func (m *PrivateHypervEntity) validateAgentStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AgentStatusVec); i++ { - if swag.IsZero(m.AgentStatusVec[i]) { // not required - continue - } - - if m.AgentStatusVec[i] != nil { - if err := m.AgentStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateHypervEntity) validateDatastoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if m.DatastoreInfo != nil { - if err := m.DatastoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHypervEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateHypervEntity) validateVMInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VMInfo) { // not required - return nil - } - - if m.VMInfo != nil { - if err := m.VMInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private hyperv entity based on the context it is used -func (m *PrivateHypervEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgentStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateHypervEntity) contextValidateAgentError(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentError != nil { - - if swag.IsZero(m.AgentError) { // not required - return nil - } - - if err := m.AgentError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentError") - } - return err - } - } - - return nil -} - -func (m *PrivateHypervEntity) contextValidateAgentStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AgentStatusVec); i++ { - - if m.AgentStatusVec[i] != nil { - - if swag.IsZero(m.AgentStatusVec[i]) { // not required - return nil - } - - if err := m.AgentStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateHypervEntity) contextValidateDatastoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreInfo != nil { - - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if err := m.DatastoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateHypervEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateHypervEntity) contextValidateVMInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VMInfo != nil { - - if swag.IsZero(m.VMInfo) { // not required - return nil - } - - if err := m.VMInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateHypervEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateHypervEntity) UnmarshalBinary(b []byte) error { - var res PrivateHypervEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_interface_stats.go b/v1/models/private_interface_stats.go deleted file mode 100644 index ba765856..00000000 --- a/v1/models/private_interface_stats.go +++ /dev/null @@ -1,71 +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" -) - -// PrivateInterfaceStats private interface stats -// -// swagger:model PrivateInterfaceStats -type PrivateInterfaceStats struct { - - // rx bytes - RxBytes *int64 `json:"rxBytes,omitempty"` - - // rx dropped - RxDropped *int64 `json:"rxDropped,omitempty"` - - // rx errors - RxErrors *int64 `json:"rxErrors,omitempty"` - - // Receive counters. - RxPkts *int64 `json:"rxPkts,omitempty"` - - // tx bytes - TxBytes *int64 `json:"txBytes,omitempty"` - - // tx dropped - TxDropped *int64 `json:"txDropped,omitempty"` - - // tx errors - TxErrors *int64 `json:"txErrors,omitempty"` - - // Transmit counters. - TxPkts *int64 `json:"txPkts,omitempty"` -} - -// Validate validates this private interface stats -func (m *PrivateInterfaceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private interface stats based on context it is used -func (m *PrivateInterfaceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateInterfaceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateInterfaceStats) UnmarshalBinary(b []byte) error { - var res PrivateInterfaceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_io_preferential_tier.go b/v1/models/private_io_preferential_tier.go deleted file mode 100644 index a5ea0adc..00000000 --- a/v1/models/private_io_preferential_tier.go +++ /dev/null @@ -1,716 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PrivateIoPreferentialTier IoPreferentialTier is the struct representing the preferred storage tier -// for IO operations. -// -// swagger:model PrivateIoPreferentialTier -type PrivateIoPreferentialTier struct { - - // ApolloIOPreferentialTier specifies the storage tier for a disk that - // Apollo will use as its working directory. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - ApolloIOPreferentialTier []string `json:"apolloIOPreferentialTier"` - - // ApolloWalActionsIOPreferentialTier specifies the storage tier for a - // disk that Apollo will use for its actions WAL. It is an index into the - // storage_tier_vec. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - ApolloWalIOPreferentialTier []string `json:"apolloWalIOPreferentialTier"` - - // AthenaIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Athena. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - AthenaIOPreferentialTier []string `json:"athenaIOPreferentialTier"` - - // AthenaSlowerIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Athena for slower storage. The values are indices - // into the RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - AthenaSlowerIOPreferentialTier []string `json:"athenaSlowerIOPreferentialTier"` - - // CloudChunkRepoIOPreferentialTier is an array specifying the list of - // preferred storage tiers used by CCR. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - CloudChunkRepoIOPreferentialTier []string `json:"cloudChunkRepoIOPreferentialTier"` - - // DownTierUsagePercentageThresholds is an array to specify the usage - // percentage thresholds for the corresponding storage tier, e.g. first - // element in this array will represent the downtiering disk usage percentage - // for first storage tier in the random io storage tiers list and so on. - // The length of this array will always be in sync with the length of the - // random io storage ties list. Each value in this array indicates how full - // should a disk at least be in this storage tier before we down - // water-fall its data to another tier. If the disk usage is less than this - // amount, we'll not use down water-falling on that disk. - DownTierUsagePercentThresholdList []int32 `json:"downTierUsagePercentThresholdList"` - - // GrootIOPreferentialTier specifies the storage tier for a disk that - // Groot will use as its working directory. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - GrootIOPreferentialTier []string `json:"grootIOPreferentialTier"` - - // HydraDowntierIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Hydra for offloading. The values are indices - // into the RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - HydraDowntierIOPreferentialTier []string `json:"hydraDowntierIOPreferentialTier"` - - // HydraIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Hydra. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - HydraIOPreferentialTier []string `json:"hydraIOPreferentialTier"` - - // LibrarianIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Librarian. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - LibrarianIOPreferentialTier []string `json:"librarianIOPreferentialTier"` - - // RandomIOPreferentialTier is an array specifying the order of preferred - // storage tiers for random IO operations. Other components, e.g., Yoda, - // Apollo, Scribe and Hydra maintain an index into this array to track - // the storage tiers used by them. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - RandomIOPreferentialTier []string `json:"randomIOPreferentialTier"` - - // ScribeIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Scribe. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - ScribeIOPreferentialTier []string `json:"scribeIOPreferentialTier"` - - // SequentialIOPreferentialTier is the preferred storage tier for - // sequential IO operations. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - SequentialIOPreferentialTier []string `json:"sequentialIOPreferentialTier"` - - // YodaIOPreferentialTier is an array specifying the list of preferred - // storage tiers used by Yoda. The values are indices into the - // RandomIOPreferentialTier. - // StorageTierType represents the various values for the Storage Tier. - // 'PCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'SATA-SSD' indicates storage tier type of SATA Solid State Drive. - // 'SATA-HDD' indicates storage tier type of SATA Hard Disk Drive. - // 'CLOUD' indicates storage tier type of Cloud. - YodaIOPreferentialTier []string `json:"yodaIOPreferentialTier"` -} - -// Validate validates this private io preferential tier -func (m *PrivateIoPreferentialTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApolloIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApolloWalIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAthenaIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAthenaSlowerIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudChunkRepoIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGrootIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHydraDowntierIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHydraIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLibrarianIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRandomIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScribeIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSequentialIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYodaIOPreferentialTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var privateIoPreferentialTierApolloIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierApolloIOPreferentialTierItemsEnum = append(privateIoPreferentialTierApolloIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateApolloIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierApolloIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateApolloIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ApolloIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ApolloIOPreferentialTier); i++ { - - // value enum - if err := m.validateApolloIOPreferentialTierItemsEnum("apolloIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.ApolloIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierApolloWalIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierApolloWalIOPreferentialTierItemsEnum = append(privateIoPreferentialTierApolloWalIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateApolloWalIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierApolloWalIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateApolloWalIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ApolloWalIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ApolloWalIOPreferentialTier); i++ { - - // value enum - if err := m.validateApolloWalIOPreferentialTierItemsEnum("apolloWalIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.ApolloWalIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierAthenaIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierAthenaIOPreferentialTierItemsEnum = append(privateIoPreferentialTierAthenaIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateAthenaIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierAthenaIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateAthenaIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.AthenaIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.AthenaIOPreferentialTier); i++ { - - // value enum - if err := m.validateAthenaIOPreferentialTierItemsEnum("athenaIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.AthenaIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum = append(privateIoPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateAthenaSlowerIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierAthenaSlowerIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateAthenaSlowerIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.AthenaSlowerIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.AthenaSlowerIOPreferentialTier); i++ { - - // value enum - if err := m.validateAthenaSlowerIOPreferentialTierItemsEnum("athenaSlowerIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.AthenaSlowerIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum = append(privateIoPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateCloudChunkRepoIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierCloudChunkRepoIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateCloudChunkRepoIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.CloudChunkRepoIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.CloudChunkRepoIOPreferentialTier); i++ { - - // value enum - if err := m.validateCloudChunkRepoIOPreferentialTierItemsEnum("cloudChunkRepoIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.CloudChunkRepoIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierGrootIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierGrootIOPreferentialTierItemsEnum = append(privateIoPreferentialTierGrootIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateGrootIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierGrootIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateGrootIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.GrootIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.GrootIOPreferentialTier); i++ { - - // value enum - if err := m.validateGrootIOPreferentialTierItemsEnum("grootIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.GrootIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierHydraDowntierIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierHydraDowntierIOPreferentialTierItemsEnum = append(privateIoPreferentialTierHydraDowntierIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateHydraDowntierIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierHydraDowntierIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateHydraDowntierIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.HydraDowntierIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.HydraDowntierIOPreferentialTier); i++ { - - // value enum - if err := m.validateHydraDowntierIOPreferentialTierItemsEnum("hydraDowntierIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.HydraDowntierIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierHydraIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierHydraIOPreferentialTierItemsEnum = append(privateIoPreferentialTierHydraIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateHydraIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierHydraIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateHydraIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.HydraIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.HydraIOPreferentialTier); i++ { - - // value enum - if err := m.validateHydraIOPreferentialTierItemsEnum("hydraIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.HydraIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierLibrarianIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierLibrarianIOPreferentialTierItemsEnum = append(privateIoPreferentialTierLibrarianIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateLibrarianIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierLibrarianIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateLibrarianIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.LibrarianIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.LibrarianIOPreferentialTier); i++ { - - // value enum - if err := m.validateLibrarianIOPreferentialTierItemsEnum("librarianIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.LibrarianIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierRandomIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierRandomIOPreferentialTierItemsEnum = append(privateIoPreferentialTierRandomIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateRandomIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierRandomIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateRandomIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.RandomIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.RandomIOPreferentialTier); i++ { - - // value enum - if err := m.validateRandomIOPreferentialTierItemsEnum("randomIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.RandomIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierScribeIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierScribeIOPreferentialTierItemsEnum = append(privateIoPreferentialTierScribeIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateScribeIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierScribeIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateScribeIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.ScribeIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.ScribeIOPreferentialTier); i++ { - - // value enum - if err := m.validateScribeIOPreferentialTierItemsEnum("scribeIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.ScribeIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierSequentialIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierSequentialIOPreferentialTierItemsEnum = append(privateIoPreferentialTierSequentialIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateSequentialIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierSequentialIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateSequentialIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.SequentialIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.SequentialIOPreferentialTier); i++ { - - // value enum - if err := m.validateSequentialIOPreferentialTierItemsEnum("sequentialIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.SequentialIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -var privateIoPreferentialTierYodaIOPreferentialTierItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privateIoPreferentialTierYodaIOPreferentialTierItemsEnum = append(privateIoPreferentialTierYodaIOPreferentialTierItemsEnum, v) - } -} - -func (m *PrivateIoPreferentialTier) validateYodaIOPreferentialTierItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privateIoPreferentialTierYodaIOPreferentialTierItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivateIoPreferentialTier) validateYodaIOPreferentialTier(formats strfmt.Registry) error { - if swag.IsZero(m.YodaIOPreferentialTier) { // not required - return nil - } - - for i := 0; i < len(m.YodaIOPreferentialTier); i++ { - - // value enum - if err := m.validateYodaIOPreferentialTierItemsEnum("yodaIOPreferentialTier"+"."+strconv.Itoa(i), "body", m.YodaIOPreferentialTier[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this private io preferential tier based on context it is used -func (m *PrivateIoPreferentialTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateIoPreferentialTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateIoPreferentialTier) UnmarshalBinary(b []byte) error { - var res PrivateIoPreferentialTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_isilon_entity.go b/v1/models/private_isilon_entity.go deleted file mode 100644 index be237ba0..00000000 --- a/v1/models/private_isilon_entity.go +++ /dev/null @@ -1,217 +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" -) - -// PrivateIsilonEntity private isilon entity -// -// swagger:model PrivateIsilonEntity -type PrivateIsilonEntity struct { - - // Specific information of a cluster (only valid for cluster). - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Specific information of a mount point (only valid for a mount point). - MountPointInfo *MountPointInfo `json:"mountPointInfo,omitempty"` - - // The name of this entity (only valid for a cluster and an access zone). - Name *string `json:"name,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` - - // Specific information of an access zone (only valid for an access zone). - ZoneInfo *ZoneInfo `json:"zoneInfo,omitempty"` -} - -// Validate validates this private isilon entity -func (m *PrivateIsilonEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountPointInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateZoneInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateIsilonEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateIsilonEntity) validateMountPointInfo(formats strfmt.Registry) error { - if swag.IsZero(m.MountPointInfo) { // not required - return nil - } - - if m.MountPointInfo != nil { - if err := m.MountPointInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountPointInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountPointInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateIsilonEntity) validateZoneInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ZoneInfo) { // not required - return nil - } - - if m.ZoneInfo != nil { - if err := m.ZoneInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private isilon entity based on the context it is used -func (m *PrivateIsilonEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountPointInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateZoneInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateIsilonEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateIsilonEntity) contextValidateMountPointInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.MountPointInfo != nil { - - if swag.IsZero(m.MountPointInfo) { // not required - return nil - } - - if err := m.MountPointInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountPointInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountPointInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateIsilonEntity) contextValidateZoneInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ZoneInfo != nil { - - if swag.IsZero(m.ZoneInfo) { // not required - return nil - } - - if err := m.ZoneInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateIsilonEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateIsilonEntity) UnmarshalBinary(b []byte) error { - var res PrivateIsilonEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_kubernetes_entity.go b/v1/models/private_kubernetes_entity.go deleted file mode 100644 index c05e60b7..00000000 --- a/v1/models/private_kubernetes_entity.go +++ /dev/null @@ -1,602 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateKubernetesEntity private kubernetes entity -// -// swagger:model PrivateKubernetesEntity -type PrivateKubernetesEntity struct { - - // Software version of the agent running in the DataMover pod. - DatamoverAgentVersion *string `json:"datamoverAgentVersion,omitempty"` - - // Location of the datamover image specified by the user. - DatamoverImageLocation *string `json:"datamoverImageLocation,omitempty"` - - // Type of service to be deployed for communication with DataMover pods. - // Currently, LoadBalancer and NodePort are supported. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // Indicates if deployed datamover needs to be upgraded - // for this kubernetes entity. - DatamoverUpgradability *int32 `json:"datamoverUpgradability,omitempty"` - - // VLAN information of the default VLAN. - DefaultVlanParams *VlanParams `json:"defaultVlanParams,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // K8s distribution. This will only be applicable to kCluster entities. - Distribution *int32 `json:"distribution,omitempty"` - - // Location of the init container image specified by the user. - InitContainerImageLocation *string `json:"initContainerImageLocation,omitempty"` - - // IP mode of the kubernetes source. - IPMode *IPMode `json:"ipMode,omitempty"` - - // Label attributes vector contains info about the label nodes corresponding - // to the current entity's labels. - // TODO(jhwang): Make it applicable to non-kNamespace type entities also. - LabelAttributesVec []*LabelAttributesInfo `json:"labelAttributesVec"` - - // List of labels associated with this entity in the form "key:value". - // Currently, only populated for PVCs to be used for label based - // include/exclude filters. - LabelVec []string `json:"labelVec"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // Namespace of object, if applicable. - // For a PV, this field stores the namespace of the PVC which is bound to the - // PV. - Namespace *string `json:"namespace,omitempty"` - - // Name of the PVC which is bound to the PV. Applicable only to - // 'kPersistentVolume' type entity. - PvcName *string `json:"pvcName,omitempty"` - - // Contains generic annotations to be put on services. - ServiceAnnotations []*EntityServiceAnnotationsEntry `json:"serviceAnnotations"` - - // A mapping from datamover services to corresponding unique connector_params - // IDs. This will be generated during registration and updated during - // refresh. Applicable only for 'kCluster' type entities. - ServicesToConnectorIdsMap []*EntityServicesToConnectorIdsMapEntry `json:"servicesToConnectorIdsMap"` - - // This is populated for the root entity only (type kCluster). - StorageClassVec []*EntityStorageClassInfo `json:"storageClassVec"` - - // Custom tolerations for Datamover pods. - TolerationsVec []*PodInfoPodSpecToleration `json:"tolerationsVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` - - // Location of the Velero AWS plugin image specified by the user. - VeleroAwsPluginImageLocation *string `json:"veleroAwsPluginImageLocation,omitempty"` - - // Location of the Velero image specified by the user. - VeleroImageLocation *string `json:"veleroImageLocation,omitempty"` - - // Location of the Velero Openshift plugin image specified by the user. - VeleroOpenshiftPluginImageLocation *string `json:"veleroOpenshiftPluginImageLocation,omitempty"` - - // Indicates if deployed Velero image needs to be upgraded - // for this kubernetes entity. - VeleroUpgradability *int32 `json:"veleroUpgradability,omitempty"` - - // Velero version deployed. - VeleroVersion *string `json:"veleroVersion,omitempty"` - - // Kubernetes cluster version. - Version *string `json:"version,omitempty"` - - // VLAN information provided during registration. - VlanInfoVec []*VlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this private kubernetes entity -func (m *PrivateKubernetesEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServicesToConnectorIdsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClassVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTolerationsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateKubernetesEntity) validateDefaultVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if m.DefaultVlanParams != nil { - if err := m.DefaultVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateIPMode(formats strfmt.Registry) error { - if swag.IsZero(m.IPMode) { // not required - return nil - } - - if m.IPMode != nil { - if err := m.IPMode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipMode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipMode") - } - return err - } - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateLabelAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.LabelAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.LabelAttributesVec); i++ { - if swag.IsZero(m.LabelAttributesVec[i]) { // not required - continue - } - - if m.LabelAttributesVec[i] != nil { - if err := m.LabelAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateServicesToConnectorIdsMap(formats strfmt.Registry) error { - if swag.IsZero(m.ServicesToConnectorIdsMap) { // not required - return nil - } - - for i := 0; i < len(m.ServicesToConnectorIdsMap); i++ { - if swag.IsZero(m.ServicesToConnectorIdsMap[i]) { // not required - continue - } - - if m.ServicesToConnectorIdsMap[i] != nil { - if err := m.ServicesToConnectorIdsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateStorageClassVec(formats strfmt.Registry) error { - if swag.IsZero(m.StorageClassVec) { // not required - return nil - } - - for i := 0; i < len(m.StorageClassVec); i++ { - if swag.IsZero(m.StorageClassVec[i]) { // not required - continue - } - - if m.StorageClassVec[i] != nil { - if err := m.StorageClassVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateTolerationsVec(formats strfmt.Registry) error { - if swag.IsZero(m.TolerationsVec) { // not required - return nil - } - - for i := 0; i < len(m.TolerationsVec); i++ { - if swag.IsZero(m.TolerationsVec[i]) { // not required - continue - } - - if m.TolerationsVec[i] != nil { - if err := m.TolerationsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private kubernetes entity based on the context it is used -func (m *PrivateKubernetesEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPMode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabelAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServicesToConnectorIdsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageClassVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTolerationsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateDefaultVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultVlanParams != nil { - - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if err := m.DefaultVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateIPMode(ctx context.Context, formats strfmt.Registry) error { - - if m.IPMode != nil { - - if swag.IsZero(m.IPMode) { // not required - return nil - } - - if err := m.IPMode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipMode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipMode") - } - return err - } - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateLabelAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelAttributesVec); i++ { - - if m.LabelAttributesVec[i] != nil { - - if swag.IsZero(m.LabelAttributesVec[i]) { // not required - return nil - } - - if err := m.LabelAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateServicesToConnectorIdsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServicesToConnectorIdsMap); i++ { - - if m.ServicesToConnectorIdsMap[i] != nil { - - if swag.IsZero(m.ServicesToConnectorIdsMap[i]) { // not required - return nil - } - - if err := m.ServicesToConnectorIdsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesToConnectorIdsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateStorageClassVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageClassVec); i++ { - - if m.StorageClassVec[i] != nil { - - if swag.IsZero(m.StorageClassVec[i]) { // not required - return nil - } - - if err := m.StorageClassVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageClassVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateTolerationsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TolerationsVec); i++ { - - if m.TolerationsVec[i] != nil { - - if swag.IsZero(m.TolerationsVec[i]) { // not required - return nil - } - - if err := m.TolerationsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateKubernetesEntity) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateKubernetesEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateKubernetesEntity) UnmarshalBinary(b []byte) error { - var res PrivateKubernetesEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_kvm_entity.go b/v1/models/private_kvm_entity.go deleted file mode 100644 index e384b7a3..00000000 --- a/v1/models/private_kvm_entity.go +++ /dev/null @@ -1,192 +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" -) - -// PrivateKvmEntity private kvm entity -// -// swagger:model PrivateKvmEntity -type PrivateKvmEntity struct { - - // Identifies the Agent entity with which this KVM entity is associated - // when the Entity object represents a Delegate host or KVM host. The - // field is not populated otherwise. - AgentEntityID *int64 `json:"agentEntityId,omitempty"` - - // This will be set for KVM host entities whose agent cannot be reached, - // either because it is not installed or due some error. - AgentError *PrivateErrorProto `json:"agentError,omitempty"` - - // Information about the Agent (see agent.proto for details). - AgentStatus *HostAgentStatus `json:"agentStatus,omitempty"` - - // The ID of the cluster. - ClusterID *string `json:"clusterId,omitempty"` - - // The ID of the data center. - DcID *string `json:"dcId,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // This field is populated only for the host entities(kHost). This denotes - // the endpoint address to be used to connect to the host. - HostAddress *string `json:"hostAddress,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // This field is populated for kVNicProfiles. This denotes the - // network to which it is attached. - NetworkID *string `json:"networkId,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private kvm entity -func (m *PrivateKvmEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateKvmEntity) validateAgentError(formats strfmt.Registry) error { - if swag.IsZero(m.AgentError) { // not required - return nil - } - - if m.AgentError != nil { - if err := m.AgentError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentError") - } - return err - } - } - - return nil -} - -func (m *PrivateKvmEntity) validateAgentStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatus) { // not required - return nil - } - - if m.AgentStatus != nil { - if err := m.AgentStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatus") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private kvm entity based on the context it is used -func (m *PrivateKvmEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgentStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateKvmEntity) contextValidateAgentError(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentError != nil { - - if swag.IsZero(m.AgentError) { // not required - return nil - } - - if err := m.AgentError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentError") - } - return err - } - } - - return nil -} - -func (m *PrivateKvmEntity) contextValidateAgentStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentStatus != nil { - - if swag.IsZero(m.AgentStatus) { // not required - return nil - } - - if err := m.AgentStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatus") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateKvmEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateKvmEntity) UnmarshalBinary(b []byte) error { - var res PrivateKvmEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_mongo_d_b_connect_params.go b/v1/models/private_mongo_d_b_connect_params.go deleted file mode 100644 index 5b39869b..00000000 --- a/v1/models/private_mongo_d_b_connect_params.go +++ /dev/null @@ -1,123 +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" -) - -// PrivateMongoDBConnectParams Contains specific parameters required to connect to a mongodb cluster. -// -// # These will be filled by user -// -// swagger:model PrivateMongoDBConnectParams -type PrivateMongoDBConnectParams struct { - - // MongoDB Auth type. - AuthType *int32 `json:"authType,omitempty"` - - // Name of the Authenticating Database for this cluster. - AuthenticatingDatabaseName *string `json:"authenticatingDatabaseName,omitempty"` - - // Specifies the credentials of the MongoDB cluster. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Set to true if this cluster allows connection through SSL only. - RequiresSsl *bool `json:"requiresSsl,omitempty"` - - // Seeds of this MongoDB Cluster. - Seeds []string `json:"seeds"` -} - -// Validate validates this private mongo d b connect params -func (m *PrivateMongoDBConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateMongoDBConnectParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private mongo d b connect params based on the context it is used -func (m *PrivateMongoDBConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateMongoDBConnectParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateMongoDBConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateMongoDBConnectParams) UnmarshalBinary(b []byte) error { - var res PrivateMongoDBConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_mongodb_entity.go b/v1/models/private_mongodb_entity.go deleted file mode 100644 index 8becf88f..00000000 --- a/v1/models/private_mongodb_entity.go +++ /dev/null @@ -1,178 +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" -) - -// PrivateMongodbEntity private mongodb entity -// -// swagger:model PrivateMongodbEntity -type PrivateMongodbEntity struct { - - // Information of a mongodb cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Information about a mongodb collection, only valid for an entity of type - // kCollection. - CollectionInfo *CollectionInfo `json:"collectionInfo,omitempty"` - - // Information of a mongodb database, only valid for an entity of type - // kDatabase. - DatabaseInfo DatabaseInfo `json:"databaseInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - // Note : For each entity an ID unique within top level entity should be - // assigned by imanis backend. Example, UUID for a collection can be the - // string . - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private mongodb entity -func (m *PrivateMongodbEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCollectionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateMongodbEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateMongodbEntity) validateCollectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CollectionInfo) { // not required - return nil - } - - if m.CollectionInfo != nil { - if err := m.CollectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("collectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("collectionInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private mongodb entity based on the context it is used -func (m *PrivateMongodbEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCollectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateMongodbEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateMongodbEntity) contextValidateCollectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CollectionInfo != nil { - - if swag.IsZero(m.CollectionInfo) { // not required - return nil - } - - if err := m.CollectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("collectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("collectionInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateMongodbEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateMongodbEntity) UnmarshalBinary(b []byte) error { - var res PrivateMongodbEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_netapp_entity.go b/v1/models/private_netapp_entity.go deleted file mode 100644 index bb859d1b..00000000 --- a/v1/models/private_netapp_entity.go +++ /dev/null @@ -1,352 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateNetappEntity private netapp entity -// -// swagger:model PrivateNetappEntity -type PrivateNetappEntity struct { - - // As an optimization, this flag tells whether we can skip the step of - // updating the UUIDs of volume entities. If the parent Netapp entity is - // registered after 6.1, or there is no more old volume that is still using - // its volume UUID in the EH, then this flag will be set to true. - CanSkipUpdatingUuids *bool `json:"canSkipUpdatingUuids,omitempty"` - - // Specific information of a cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Whether this entity is a top level entity. Because a top level entity can - // either be a cluster or a vserver, thus we cannot tell only based on the - // type. - IsTopLevelEntity *bool `json:"isTopLevelEntity,omitempty"` - - // The license names installed in the cluster. - LicenseVec []int32 `json:"licenseVec"` - - // The name of the entity. - Name *string `json:"name,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` - - // The globally unique ID of this entity assigned by the Netapp server. - UUID *string `json:"uuid,omitempty"` - - // Version number of netapp cluster. - VersionTuple *EntityVersionTuple `json:"versionTuple,omitempty"` - - // Specific information of a volume, only valid for an entity of type - // kVolume. - VolumeInfo *PrivateVolumeInfo `json:"volumeInfo,omitempty"` - - // Specific information of a vserver, only valid for an entity of type - // kVserver. - VserverInfo *VserverInfo `json:"vserverInfo,omitempty"` - - // Vservers within a cluster. Only populated for virtualized storage - // snapshots backup. - VserverInfoVec []*VserverInfo `json:"vserverInfoVec"` -} - -// Validate validates this private netapp entity -func (m *PrivateNetappEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersionTuple(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVserverInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVserverInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetappEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) validateVersionTuple(formats strfmt.Registry) error { - if swag.IsZero(m.VersionTuple) { // not required - return nil - } - - if m.VersionTuple != nil { - if err := m.VersionTuple.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionTuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionTuple") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) validateVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if m.VolumeInfo != nil { - if err := m.VolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) validateVserverInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VserverInfo) { // not required - return nil - } - - if m.VserverInfo != nil { - if err := m.VserverInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) validateVserverInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VserverInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VserverInfoVec); i++ { - if swag.IsZero(m.VserverInfoVec[i]) { // not required - continue - } - - if m.VserverInfoVec[i] != nil { - if err := m.VserverInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private netapp entity based on the context it is used -func (m *PrivateNetappEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersionTuple(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVserverInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVserverInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetappEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) contextValidateVersionTuple(ctx context.Context, formats strfmt.Registry) error { - - if m.VersionTuple != nil { - - if swag.IsZero(m.VersionTuple) { // not required - return nil - } - - if err := m.VersionTuple.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionTuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionTuple") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) contextValidateVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeInfo != nil { - - if swag.IsZero(m.VolumeInfo) { // not required - return nil - } - - if err := m.VolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) contextValidateVserverInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VserverInfo != nil { - - if swag.IsZero(m.VserverInfo) { // not required - return nil - } - - if err := m.VserverInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateNetappEntity) contextValidateVserverInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VserverInfoVec); i++ { - - if m.VserverInfoVec[i] != nil { - - if swag.IsZero(m.VserverInfoVec[i]) { // not required - return nil - } - - if err := m.VserverInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vserverInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vserverInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateNetappEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateNetappEntity) UnmarshalBinary(b []byte) error { - var res PrivateNetappEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_network_interface.go b/v1/models/private_network_interface.go deleted file mode 100644 index 9843bc8d..00000000 --- a/v1/models/private_network_interface.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateNetworkInterface Structure to contain the properties of an network interface. -// -// swagger:model PrivateNetworkInterface -type PrivateNetworkInterface struct { - - // Current active slave. This is only valid in active-backup mode. - ActiveBondSlave *string `json:"activeBondSlave,omitempty"` - - // Params specfic to bond interface. - // Bond slaves name. - BondSlave []string `json:"bondSlave"` - - // Bond slaves slot info. - BondSlaveSlot []string `json:"bondSlaveSlot"` - - // Bond slave detailed info. - BondSlavesDetails []*PrivateBondSlaveInfo `json:"bondSlavesDetails"` - - // Bonding mode of the interface. - BondingMode *int32 `json:"bondingMode,omitempty"` - - // gateway - Gateway *string `json:"gateway,omitempty"` - - // gateway6 - Gateway6 *string `json:"gateway6,omitempty"` - - // TOBE REMOVED(Wenbo): interface id can not differentiate vlan interfaces. - // Will use other key later. - ID *int64 `json:"id,omitempty"` - - // Interface group this interface belonged to. - IfaceGroup *string `json:"ifaceGroup,omitempty"` - - // Name of the interface port. - IfaceName *string `json:"ifaceName,omitempty"` - - // Interface role. It can be primary or secondary. - IfaceRole *string `json:"ifaceRole,omitempty"` - - // iface type - IfaceType *int64 `json:"ifaceType,omitempty"` - - // Whether the link is physically connected or not. - // This field is only accurate when the interface is up. - IsConnected *bool `json:"isConnected,omitempty"` - - // Whether to use this interface as the default route. - IsDefaultRoute *bool `json:"isDefaultRoute,omitempty"` - - // Whether the interface is up or not. - IsUp *bool `json:"isUp,omitempty"` - - // Mac address of the interface. - MacAddr *string `json:"macAddr,omitempty"` - - // mtu - Mtu *int32 `json:"mtu,omitempty"` - - // Services which use this interface. - Services []string `json:"services"` - - // Speed. - Speed *string `json:"speed,omitempty"` - - // static Ip - StaticIP *string `json:"staticIp,omitempty"` - - // Ipv6 - StaticIp6 *string `json:"staticIp6,omitempty"` - - // Interface Stats. - Stats *PrivateInterfaceStats `json:"stats,omitempty"` - - // Subnet info. - Subnet *string `json:"subnet,omitempty"` - - // subnet6 - Subnet6 *string `json:"subnet6,omitempty"` - - // virtual Ip - VirtualIP *string `json:"virtualIp,omitempty"` -} - -// Validate validates this private network interface -func (m *PrivateNetworkInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondSlavesDetails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetworkInterface) validateBondSlavesDetails(formats strfmt.Registry) error { - if swag.IsZero(m.BondSlavesDetails) { // not required - return nil - } - - for i := 0; i < len(m.BondSlavesDetails); i++ { - if swag.IsZero(m.BondSlavesDetails[i]) { // not required - continue - } - - if m.BondSlavesDetails[i] != nil { - if err := m.BondSlavesDetails[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateNetworkInterface) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this private network interface based on the context it is used -func (m *PrivateNetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBondSlavesDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetworkInterface) contextValidateBondSlavesDetails(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BondSlavesDetails); i++ { - - if m.BondSlavesDetails[i] != nil { - - if swag.IsZero(m.BondSlavesDetails[i]) { // not required - return nil - } - - if err := m.BondSlavesDetails[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondSlavesDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateNetworkInterface) 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 -} - -// MarshalBinary interface implementation -func (m *PrivateNetworkInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateNetworkInterface) UnmarshalBinary(b []byte) error { - var res PrivateNetworkInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_o365_entity.go b/v1/models/private_o365_entity.go deleted file mode 100644 index 39035815..00000000 --- a/v1/models/private_o365_entity.go +++ /dev/null @@ -1,513 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateO365Entity private o365 entity -// -// swagger:model PrivateO365Entity -type PrivateO365Entity struct { - - // Specifies the map from the Attribute type to its value for the given - // entity proto. - // Since the map within proto message cannot have an enum as the key, the - // internal implementation will ensure that the keys only belong to the - // Attribute.Type enum. - AttributeMap []*EntityAttributeMapEntry `json:"attributeMap"` - - // The city where this Office365 user entity is located. - // This field is deprecated. Use 'attribute_map' instead. - // TODO(tauseef): Deprecate this once 'attribute_map' usage is implemented. - City *string `json:"city,omitempty"` - - // The country/region in which this Office365 user entity is located. - // This field is deprecated. Use 'attribute_map' instead. - // TODO(tauseef): Deprecate this once 'attribute_map' usage is implemented. - Country *string `json:"country,omitempty"` - - // Department within the Office365 enterprise which the user belongs to. - // This field is deprecated. Use 'attribute_map' instead. - // TODO(tauseef): Deprecate this once 'attribute_map' usage is implemented. - Department *string `json:"department,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // Designation of this Office365 user entity. - // This field is deprecated. Use 'attribute_map' instead. - // TODO(tauseef): Deprecate this once 'attribute_map' usage is implemented. - Designation *string `json:"designation,omitempty"` - - // The unique id of the drive. - DriveID *string `json:"driveId,omitempty"` - - // Is the entity has Archive Mailbox enabled or not. - // Note: Only valid when the entity type is kUser. - EntityArchiveMailboxEnabled *bool `json:"entityArchiveMailboxEnabled,omitempty"` - - // Is the entity has Mailbox enabled or not based on a licensed service plan. - // Note: Only valid when the entity type is kUser. - EntityMailboxEnabled *bool `json:"entityMailboxEnabled,omitempty"` - - // Is the entity has Mailbox enabled atleast once. - EntityMailboxEnabledAtleastOnce *bool `json:"entityMailboxEnabledAtleastOnce,omitempty"` - - // The current size of the mailbox possessed by this entity. This size comes - // from the mailbox usage report published by microsoft. - EntityMailboxSize *int64 `json:"entityMailboxSize,omitempty"` - - // Mail box type. Only valid when the entity type is kUser. - EntityMailboxType *int32 `json:"entityMailboxType,omitempty"` - - // kUser : OneDrive specific fields. - // Is the entity has OneDrive enabled or not based on a licensed service - // plan. - // Note: Only valid when the entity type is kUser. - EntityOneDriveEnabled *bool `json:"entityOneDriveEnabled,omitempty"` - - // Is the entity has OneDrive enabled atleast once. - EntityOneDriveEnabledAtleastOnce *bool `json:"entityOneDriveEnabledAtleastOnce,omitempty"` - - // The current size of the one_drive possessed by this entity. If there are - // multiple, we show/take into account the first one. This comes from a - // generic user_level drive_info related API. - EntityOneDriveSize *int64 `json:"entityOneDriveSize,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // The UUID of the entities from graph api. A separate field is needed for - // this for migration. Depending on the entity type this will be: - // 1. kUser - user_uuid (from graph api). - // 2. kGroup - group_uuid (from graph api). - // 3. kSite - site_uuid (from graph api). - // TODO(suman) : Since uuid field will be same as graph_uuid, deprecate this - // post 6.6. - GraphUUID *string `json:"graphUuid,omitempty"` - - // Group-specific parameters. - GroupParams *EntityGroupParams `json:"groupParams,omitempty"` - - // The unique id of the Mailbox (Mailbox GUID). - MailboxID *string `json:"mailboxId,omitempty"` - - // membership info vec - MembershipInfoVec []*EntityGroupMembershipInfo `json:"membershipInfoVec"` - - // A human readabale name of the entity. - Name *string `json:"name,omitempty"` - - // This field is only set when type is kMailbox/kUser/kGroup. This is primary - // SMTP address. - PrimarySMTPAddress *string `json:"primarySmtpAddress,omitempty"` - - // The list of entity ids of the windows physical host which will be used for - // backup and recovery of templates of the site that belong to a tenant. - // This will be used for Exchange Online PST download as well. - // TODO(sandeep ravi): Add a maximum values validation. - ProxyEntityIDVec []int64 `json:"proxyEntityIdVec"` - - // Expiry time period in seconds for the PST download option. The generated - // PSTs will be expired after this time period and the PST conversion view - // will be garbage collected. - // Default expiry time value is 72 hours. - PstDownloadOptionExpiryTimeSecs *int64 `json:"pstDownloadOptionExpiryTimeSecs,omitempty"` - - // Sharepoint domain name. - SharepointDomainName *string `json:"sharepointDomainName,omitempty"` - - // Site-specific parameters. - SiteParams *EntitySiteParams `json:"siteParams,omitempty"` - - // Site-specific parameters. - TeamParams *EntityTeamParams `json:"teamParams,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Since the kMailbox/KUser entity can have either uuid/mailbox_id as Mailbox - // GUID, this is used as a flag while generating EntityHashString. Note: - // This field is not persisted. Deprecate this once we have all the entities - // migrated to use graph_uuid instead of the Mailbox GUID. - // TODO(suman) : Deprecate this after all customers post 6.6. - UseAlternateUUIDAsHashString *bool `json:"useAlternateUuidAsHashString,omitempty"` - - // This field is only set when the primary SMTP address is different from the - // user's UPN. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` - - // UUID of the entity. Based on the entity type it can be any of the - // following : - // 1. kDomain - domain name - // 2. Psuedo entities (kOutlook, kUsers, kGroups, kSites) - hard coded - // strings (outlook, users, groups, sites). - // 3. kMailbox - mailbox_uuid (from ews api) - // 4. kUser - same as graph_uuid (from graph api). - // 5. kGroup - same as graph_uuid (from graph api). - // 6. kSite - same as graph_uuid (from graph api). - UUID *string `json:"uuid,omitempty"` - - // URL that displays the item in the browser; this is applicable when type is - // 'kSite'. When type is 'kGroup', it contains the underlying group site url. - WebURL *string `json:"webUrl,omitempty"` -} - -// Validate validates this private o365 entity -func (m *PrivateO365Entity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMembershipInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateO365Entity) validateAttributeMap(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeMap) { // not required - return nil - } - - for i := 0; i < len(m.AttributeMap); i++ { - if swag.IsZero(m.AttributeMap[i]) { // not required - continue - } - - if m.AttributeMap[i] != nil { - if err := m.AttributeMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateO365Entity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) validateGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.GroupParams) { // not required - return nil - } - - if m.GroupParams != nil { - if err := m.GroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupParams") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) validateMembershipInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.MembershipInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.MembershipInfoVec); i++ { - if swag.IsZero(m.MembershipInfoVec[i]) { // not required - continue - } - - if m.MembershipInfoVec[i] != nil { - if err := m.MembershipInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("membershipInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("membershipInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateO365Entity) validateSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.SiteParams) { // not required - return nil - } - - if m.SiteParams != nil { - if err := m.SiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteParams") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) validateTeamParams(formats strfmt.Registry) error { - if swag.IsZero(m.TeamParams) { // not required - return nil - } - - if m.TeamParams != nil { - if err := m.TeamParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private o365 entity based on the context it is used -func (m *PrivateO365Entity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMembershipInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateO365Entity) contextValidateAttributeMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeMap); i++ { - - if m.AttributeMap[i] != nil { - - if swag.IsZero(m.AttributeMap[i]) { // not required - return nil - } - - if err := m.AttributeMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateO365Entity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) contextValidateGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupParams != nil { - - if swag.IsZero(m.GroupParams) { // not required - return nil - } - - if err := m.GroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupParams") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) contextValidateMembershipInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MembershipInfoVec); i++ { - - if m.MembershipInfoVec[i] != nil { - - if swag.IsZero(m.MembershipInfoVec[i]) { // not required - return nil - } - - if err := m.MembershipInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("membershipInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("membershipInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateO365Entity) contextValidateSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteParams != nil { - - if swag.IsZero(m.SiteParams) { // not required - return nil - } - - if err := m.SiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteParams") - } - return err - } - } - - return nil -} - -func (m *PrivateO365Entity) contextValidateTeamParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamParams != nil { - - if swag.IsZero(m.TeamParams) { // not required - return nil - } - - if err := m.TeamParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateO365Entity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateO365Entity) UnmarshalBinary(b []byte) error { - var res PrivateO365Entity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_oracle_entity.go b/v1/models/private_oracle_entity.go deleted file mode 100644 index 765e00c9..00000000 --- a/v1/models/private_oracle_entity.go +++ /dev/null @@ -1,179 +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" -) - -// PrivateOracleEntity private oracle entity -// -// swagger:model PrivateOracleEntity -type PrivateOracleEntity struct { - - // Database Entity Information. - DbEntityInfo *DBEntityInfo `json:"dbEntityInfo,omitempty"` - - // This is a general description that could be set for some entities. - Description *string `json:"description,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - // The total size of this entity. Currently this is only set for databases - // and has the same value as 'total_size_bytes'. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // The entity id of the owner entity (such as a VM). This is only set if - // type is kDatabase. - OwnerID *int64 `json:"ownerId,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private oracle entity -func (m *PrivateOracleEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateOracleEntity) validateDbEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DbEntityInfo) { // not required - return nil - } - - if m.DbEntityInfo != nil { - if err := m.DbEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateOracleEntity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private oracle entity based on the context it is used -func (m *PrivateOracleEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateOracleEntity) contextValidateDbEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DbEntityInfo != nil { - - if swag.IsZero(m.DbEntityInfo) { // not required - return nil - } - - if err := m.DbEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbEntityInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateOracleEntity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateOracleEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateOracleEntity) UnmarshalBinary(b []byte) error { - var res PrivateOracleEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_physical_entity.go b/v1/models/private_physical_entity.go deleted file mode 100644 index 680fd69d..00000000 --- a/v1/models/private_physical_entity.go +++ /dev/null @@ -1,512 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivatePhysicalEntity private physical entity -// -// swagger:model PrivatePhysicalEntity -type PrivatePhysicalEntity struct { - - // Deprecated from 4.2 forth. Use 'agent_status_vec' above. This field is - // here to allow replication to/from older releases. - AgentEntityIDDEPRECATED *int64 `json:"agentEntityId_DEPRECATED,omitempty"` - - // Information about the Agents (see agent.proto for details). The kHost case - // a single one while the kWindowsCluster has several. - AgentStatusVec []*HostAgentStatus `json:"agentStatusVec"` - - // Cbmr(if installed) version for linux agent - CbmrVersion *string `json:"cbmrVersion,omitempty"` - - // The type of cluster resource this entity represents. - ClusterSourceType *int32 `json:"clusterSourceType,omitempty"` - - // Host environment type: - // populated for kGroup and kHost entities. - HostType *int32 `json:"hostType,omitempty"` - - // The hostname for physical server. - Hostname *string `json:"hostname,omitempty"` - - // This indicates that the phsyical host is used as proxy machine. - // proxy hosts are usually not protected. They are used by other environment - // for the data protection and recovery corresponding to that environment. - // Ex. Windows proxy host is used by o365 environment. - IsProxyMachine *bool `json:"isProxyMachine,omitempty"` - - // A human-readable name of the object. Contains the hostname/ipaddr of the - // physical host or the Windows Cluster VIP. - Name *string `json:"name,omitempty"` - - // Cached networking info. This establishes physical-->agent linkage for - // the Cluster case. - NetworkingInfo *ClusterNetworkingInfo `json:"networkingInfo,omitempty"` - - // Contains the full descriptive name of the OS on which the Agent runs. - OsName *string `json:"osName,omitempty"` - - // The number of sources that are using this physical host as proxy. - ProxyRefCount *uint64 `json:"proxyRefCount,omitempty"` - - // System resource information about the host. - SystemResourceInfo *SystemResourceInfo `json:"systemResourceInfo,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The universal identifier of the object. The field's semantics vary with - // the object type. - // - // kGroup: - // a hard-coded immutable value from a reserved ID range. - // - // kHost: - // refers to the Agent's UID and the value is shared with - // agent::Entity objects. - // - // kWindowsCluster: - // a distinct value generated by Magneto - // it is not known to the Windows Agent hosts as they are registered as - // kAgent type. - UID *PhysicalUID `json:"uid,omitempty"` - - // All the paths on this entity's file system that we do not support for - // files backup. - UnsupportedPathVec []string `json:"unsupportedPathVec"` - - // Veritas Cluster version for VCS host - VcsVersion *string `json:"vcsVersion,omitempty"` - - // States whether the physical host supports the .vhdx format for recovery. - // This is used to prevent large volume recovery on the old Win2008r2 Server - // as it just does not work. - VhdxRecoverySupported *bool `json:"vhdxRecoverySupported,omitempty"` - - // Contains the VLAN parameters specified by the user during registration. - VlanParams *VlanParams `json:"vlanParams,omitempty"` - - // Volumes that are available on the physical host. - VolumeInfoVec []*EntityVolumeInfo `json:"volumeInfoVec"` - - // Information list for all VSS Writers. Applicable only to Windows source. - VssWriterInfoVec []*EntityVssWriterInfo `json:"vssWriterInfoVec"` -} - -// Validate validates this private physical entity -func (m *PrivatePhysicalEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemResourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVssWriterInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivatePhysicalEntity) validateAgentStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AgentStatusVec); i++ { - if swag.IsZero(m.AgentStatusVec[i]) { // not required - continue - } - - if m.AgentStatusVec[i] != nil { - if err := m.AgentStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivatePhysicalEntity) validateNetworkingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if m.NetworkingInfo != nil { - if err := m.NetworkingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) validateSystemResourceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SystemResourceInfo) { // not required - return nil - } - - if m.SystemResourceInfo != nil { - if err := m.SystemResourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemResourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemResourceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -func (m *PrivatePhysicalEntity) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) validateVolumeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfoVec); i++ { - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - continue - } - - if m.VolumeInfoVec[i] != nil { - if err := m.VolumeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivatePhysicalEntity) validateVssWriterInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VssWriterInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VssWriterInfoVec); i++ { - if swag.IsZero(m.VssWriterInfoVec[i]) { // not required - continue - } - - if m.VssWriterInfoVec[i] != nil { - if err := m.VssWriterInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vssWriterInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vssWriterInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private physical entity based on the context it is used -func (m *PrivatePhysicalEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemResourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVssWriterInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivatePhysicalEntity) contextValidateAgentStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AgentStatusVec); i++ { - - if m.AgentStatusVec[i] != nil { - - if swag.IsZero(m.AgentStatusVec[i]) { // not required - return nil - } - - if err := m.AgentStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivatePhysicalEntity) contextValidateNetworkingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkingInfo != nil { - - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if err := m.NetworkingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) contextValidateSystemResourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemResourceInfo != nil { - - if swag.IsZero(m.SystemResourceInfo) { // not required - return nil - } - - if err := m.SystemResourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemResourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemResourceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) 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 -} - -func (m *PrivatePhysicalEntity) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *PrivatePhysicalEntity) contextValidateVolumeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfoVec); i++ { - - if m.VolumeInfoVec[i] != nil { - - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - return nil - } - - if err := m.VolumeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivatePhysicalEntity) contextValidateVssWriterInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VssWriterInfoVec); i++ { - - if m.VssWriterInfoVec[i] != nil { - - if swag.IsZero(m.VssWriterInfoVec[i]) { // not required - return nil - } - - if err := m.VssWriterInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vssWriterInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vssWriterInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivatePhysicalEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivatePhysicalEntity) UnmarshalBinary(b []byte) error { - var res PrivatePhysicalEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_pure_entity.go b/v1/models/private_pure_entity.go deleted file mode 100644 index a9c5261c..00000000 --- a/v1/models/private_pure_entity.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivatePureEntity private pure entity -// -// swagger:model PrivatePureEntity -type PrivatePureEntity struct { - - // The id of the array. - ArrayID *string `json:"arrayId,omitempty"` - - // The SAN ports on the array. - ArrayPortVec []*SanPort `json:"arrayPortVec"` - - // The revision of the array. - ArrayRevision *string `json:"arrayRevision,omitempty"` - - // The version of the array. - ArrayVersion *string `json:"arrayVersion,omitempty"` - - // The id of the availability group - AvailabilityGroupID *string `json:"availabilityGroupId,omitempty"` - - // The base_volume id to be cloned for nimble adapter. - BaseVolumeID *string `json:"baseVolumeId,omitempty"` - - // A version field representing the current entity property by which this - // entity is tracked in this cluster. - IDVersion *int32 `json:"idVersion,omitempty"` - - // The name of the entity. - Name *string `json:"name,omitempty"` - - // The unique id of the storage pool. - StoragePoolID *string `json:"storagePoolId,omitempty"` - - // Status of the storage pool - StoragePoolStatus *int32 `json:"storagePoolStatus,omitempty"` - - // The type of the entity. - Type *int32 `json:"type,omitempty"` - - // The creation time (e.g., "2015-07-21T17:59:41Z"). - VolumeCreationTime *string `json:"volumeCreationTime,omitempty"` - - // The id of the volume group - VolumeGroupID *string `json:"volumeGroupId,omitempty"` - - // Unique id of the volume group. For IBM FlashSystem id / uid are different - // Values. - VolumeGroupUID *string `json:"volumeGroupUid,omitempty"` - - // The volume level iqn. - VolumeIqn *string `json:"volumeIqn,omitempty"` - - // The serial number of the volume. - VolumeSerial *string `json:"volumeSerial,omitempty"` - - // The provisioned size in bytes of the volume. - VolumeSize *int64 `json:"volumeSize,omitempty"` - - // The name of the source volume (if any) this volume was copied/cloned from. - VolumeSource *string `json:"volumeSource,omitempty"` - - // Total space actually used by the volume. - VolumeTotalSpaceUsed *int64 `json:"volumeTotalSpaceUsed,omitempty"` -} - -// Validate validates this private pure entity -func (m *PrivatePureEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArrayPortVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivatePureEntity) validateArrayPortVec(formats strfmt.Registry) error { - if swag.IsZero(m.ArrayPortVec) { // not required - return nil - } - - for i := 0; i < len(m.ArrayPortVec); i++ { - if swag.IsZero(m.ArrayPortVec[i]) { // not required - continue - } - - if m.ArrayPortVec[i] != nil { - if err := m.ArrayPortVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("arrayPortVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("arrayPortVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private pure entity based on the context it is used -func (m *PrivatePureEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArrayPortVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivatePureEntity) contextValidateArrayPortVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArrayPortVec); i++ { - - if m.ArrayPortVec[i] != nil { - - if swag.IsZero(m.ArrayPortVec[i]) { // not required - return nil - } - - if err := m.ArrayPortVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("arrayPortVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("arrayPortVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivatePureEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivatePureEntity) UnmarshalBinary(b []byte) error { - var res PrivatePureEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_registered_app_info.go b/v1/models/private_registered_app_info.go deleted file mode 100644 index 673ee068..00000000 --- a/v1/models/private_registered_app_info.go +++ /dev/null @@ -1,231 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateRegisteredAppInfo private registered app info -// -// swagger:model PrivateRegisteredAppInfo -type PrivateRegisteredAppInfo struct { - - // Application environment type. - Env *int32 `json:"env,omitempty"` - - // This is result of host settings checks performed during registration. - HostSettingsCheckResultVec []*PrivateHostSettingsCheckResult `json:"hostSettingsCheckResultVec"` - - // Refresh error related to application. - RefreshError *PrivateErrorProto `json:"refreshError,omitempty"` - - // Verification error related to application registration. - VerificationError *PrivateErrorProto `json:"verificationError,omitempty"` - - // Verification status of app, when the credential registration needs to be - // verified. Otherwise if no credential registration or verification is - // required, this field is set to a default value of kFinished. - VerificationStatus *int32 `json:"verificationStatus,omitempty"` -} - -// Validate validates this private registered app info -func (m *PrivateRegisteredAppInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostSettingsCheckResultVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVerificationError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateRegisteredAppInfo) validateHostSettingsCheckResultVec(formats strfmt.Registry) error { - if swag.IsZero(m.HostSettingsCheckResultVec) { // not required - return nil - } - - for i := 0; i < len(m.HostSettingsCheckResultVec); i++ { - if swag.IsZero(m.HostSettingsCheckResultVec[i]) { // not required - continue - } - - if m.HostSettingsCheckResultVec[i] != nil { - if err := m.HostSettingsCheckResultVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheckResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheckResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateRegisteredAppInfo) validateRefreshError(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if m.RefreshError != nil { - if err := m.RefreshError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *PrivateRegisteredAppInfo) validateVerificationError(formats strfmt.Registry) error { - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if m.VerificationError != nil { - if err := m.VerificationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private registered app info based on the context it is used -func (m *PrivateRegisteredAppInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostSettingsCheckResultVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVerificationError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateRegisteredAppInfo) contextValidateHostSettingsCheckResultVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostSettingsCheckResultVec); i++ { - - if m.HostSettingsCheckResultVec[i] != nil { - - if swag.IsZero(m.HostSettingsCheckResultVec[i]) { // not required - return nil - } - - if err := m.HostSettingsCheckResultVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheckResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheckResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateRegisteredAppInfo) contextValidateRefreshError(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshError != nil { - - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if err := m.RefreshError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *PrivateRegisteredAppInfo) contextValidateVerificationError(ctx context.Context, formats strfmt.Registry) error { - - if m.VerificationError != nil { - - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if err := m.VerificationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateRegisteredAppInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateRegisteredAppInfo) UnmarshalBinary(b []byte) error { - var res PrivateRegisteredAppInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_s3_proto_entity.go b/v1/models/private_s3_proto_entity.go deleted file mode 100644 index de2c5367..00000000 --- a/v1/models/private_s3_proto_entity.go +++ /dev/null @@ -1,142 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateS3ProtoEntity private s3 proto entity -// -// swagger:model PrivateS3ProtoEntity -type PrivateS3ProtoEntity struct { - - // The date and time the entity was created. - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - // The id of the S3 entity. - ID *string `json:"id,omitempty"` - - // The name of the S3 entity. - Name *string `json:"name,omitempty"` - - // Object ACLs enabled or not. - ObjectLevelAclsEnabled *bool `json:"objectLevelAclsEnabled,omitempty"` - - // The AWS region id where the S3 bucket is present; - RegionID *string `json:"regionId,omitempty"` - - // Optional list of tag attributes associated with this entity. - TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Versioning state of S3 bucket. - Versioning *int32 `json:"versioning,omitempty"` -} - -// Validate validates this private s3 proto entity -func (m *PrivateS3ProtoEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateS3ProtoEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private s3 proto entity based on the context it is used -func (m *PrivateS3ProtoEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateS3ProtoEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateS3ProtoEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateS3ProtoEntity) UnmarshalBinary(b []byte) error { - var res PrivateS3ProtoEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_sfdc_entity.go b/v1/models/private_sfdc_entity.go deleted file mode 100644 index f9b31bb7..00000000 --- a/v1/models/private_sfdc_entity.go +++ /dev/null @@ -1,273 +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" -) - -// PrivateSfdcEntity private sfdc entity -// -// swagger:model PrivateSfdcEntity -type PrivateSfdcEntity struct { - - // Information about an Sfdc object, only valid for an entity of type kField. - // Remove this. Keeping because 'reserving' this is causing the - // solaris build to break. ****** - FieldInfo *FieldInfo `json:"fieldInfo,omitempty"` - - // This field uniquely identifies the entity. - // It is the 'API name' of the field in Salesforce terminology. - // Note that it is different from the 'field label' that is used only for - // display purpose on Salesforce UI. - Name *string `json:"name,omitempty"` - - // Information about an Sfdc object, only valid for an entity of type kObject - ObjectInfo *ObjectInfo `json:"objectInfo,omitempty"` - - // Information of an Sfdc org, only valid for an entity of type kOrg. - OrgInfo *OrgInfo `json:"orgInfo,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Contains the user licenses information in the salesforce organization. - UserLicenseInfo *UserLicenseInfo `json:"userLicenseInfo,omitempty"` -} - -// Validate validates this private sfdc entity -func (m *PrivateSfdcEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFieldInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserLicenseInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSfdcEntity) validateFieldInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FieldInfo) { // not required - return nil - } - - if m.FieldInfo != nil { - if err := m.FieldInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) validateOrgInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OrgInfo) { // not required - return nil - } - - if m.OrgInfo != nil { - if err := m.OrgInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) validateUserLicenseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserLicenseInfo) { // not required - return nil - } - - if m.UserLicenseInfo != nil { - if err := m.UserLicenseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userLicenseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userLicenseInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private sfdc entity based on the context it is used -func (m *PrivateSfdcEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFieldInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserLicenseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSfdcEntity) contextValidateFieldInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FieldInfo != nil { - - if swag.IsZero(m.FieldInfo) { // not required - return nil - } - - if err := m.FieldInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) contextValidateOrgInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OrgInfo != nil { - - if swag.IsZero(m.OrgInfo) { // not required - return nil - } - - if err := m.OrgInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSfdcEntity) contextValidateUserLicenseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserLicenseInfo != nil { - - if swag.IsZero(m.UserLicenseInfo) { // not required - return nil - } - - if err := m.UserLicenseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userLicenseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userLicenseInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateSfdcEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateSfdcEntity) UnmarshalBinary(b []byte) error { - var res PrivateSfdcEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_source_throttling_configuration.go b/v1/models/private_source_throttling_configuration.go deleted file mode 100644 index 33508d5a..00000000 --- a/v1/models/private_source_throttling_configuration.go +++ /dev/null @@ -1,160 +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" -) - -// PrivateSourceThrottlingConfiguration Message to represent the source side throttling configuration. -// -// swagger:model PrivateSourceThrottlingConfiguration -type PrivateSourceThrottlingConfiguration struct { - - // CPU throttling configuration. - CPUThrottlingConfig *PrivateThrottlingConfiguration `json:"cpuThrottlingConfig,omitempty"` - - // Network throttling configuration. - NetworkThrottlingConfig *PrivateThrottlingConfiguration `json:"networkThrottlingConfig,omitempty"` -} - -// Validate validates this private source throttling configuration -func (m *PrivateSourceThrottlingConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCPUThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSourceThrottlingConfiguration) validateCPUThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CPUThrottlingConfig) { // not required - return nil - } - - if m.CPUThrottlingConfig != nil { - if err := m.CPUThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cpuThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cpuThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *PrivateSourceThrottlingConfiguration) validateNetworkThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkThrottlingConfig) { // not required - return nil - } - - if m.NetworkThrottlingConfig != nil { - if err := m.NetworkThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkThrottlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private source throttling configuration based on the context it is used -func (m *PrivateSourceThrottlingConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCPUThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSourceThrottlingConfiguration) contextValidateCPUThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.CPUThrottlingConfig != nil { - - if swag.IsZero(m.CPUThrottlingConfig) { // not required - return nil - } - - if err := m.CPUThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cpuThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cpuThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *PrivateSourceThrottlingConfiguration) contextValidateNetworkThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkThrottlingConfig != nil { - - if swag.IsZero(m.NetworkThrottlingConfig) { // not required - return nil - } - - if err := m.NetworkThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkThrottlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateSourceThrottlingConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateSourceThrottlingConfiguration) UnmarshalBinary(b []byte) error { - var res PrivateSourceThrottlingConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_sql_entity.go b/v1/models/private_sql_entity.go deleted file mode 100644 index 534bfedf..00000000 --- a/v1/models/private_sql_entity.go +++ /dev/null @@ -1,594 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateSQLEntity private Sql entity -// -// swagger:model PrivateSqlEntity -type PrivateSQLEntity struct { - - // This is only set if the type is kAAGDatabase. It specifies information - // about the all the copies of the AAG database. - AagDbCopyInfoVec []*AAGDatabaseCopyInfo `json:"aagDbCopyInfoVec"` - - // This is only set if type is kAAG. - AagInfo *PrivateAAGInfo `json:"aagInfo,omitempty"` - - // The human readable creation date and time of this database. It is - // displayed in the time zone of the SQL server on which this database is - // running. - CreateDate *string `json:"createDate,omitempty"` - - // The name of the databsae. Only set if the type is kDatabase. The name - // of a database may change over time. - DatabaseName *string `json:"databaseName,omitempty"` - - // This is only set if type is kDatabase. If the database is part of an - // AAG, this points to the corresponding AAG entity. - DbAagEntityID *int64 `json:"dbAagEntityId,omitempty"` - - // This is only set if the type is kDatabase. If the database is part of - // an AAG, this field stores the name of the AAG. This is needed by the UI - // for display purposes. Note that 'aag_info' field is not set for database - // entities. - DbAagName *string `json:"dbAagName,omitempty"` - - // This is only set if the type is kDatabase. The versions of SQL server that - // the database is compatible with. - DbCompatibilityLevel *int64 `json:"dbCompatibilityLevel,omitempty"` - - // This is only set if the type is kDatabase. It has the latest known - // information about the set of file groups for this db on the host. - DbFileGroupInfoVec []*SQLDatabaseFileGroupInfo `json:"dbFileGroupInfoVec"` - - // This is only set if the type is kDatabase. It has the latest known - // information about the set of database files on the host. - DbFileInfoVec []*FileInfo `json:"dbFileInfoVec"` - - // This is only set if the type is kDatabase. It has the name of the user who - // owns the database. - DbOwnerUsername *string `json:"dbOwnerUsername,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - // The total size of this entity. Currently this is only set for databases - // and has the same value as 'total_size_bytes'. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // The friendly instance name of the SQL Server instance. Only set if - // the type is kInstance. - // - // TODO(warren): Support unicode in instance names. - InstanceName *string `json:"instanceName,omitempty"` - - // This is only set if the type is kAAG. If it is set to true, then we - // consider the AAG as first class citizen and it is no longer a leaf entity. - IsAagFirstClassCitizen *bool `json:"isAagFirstClassCitizen,omitempty"` - - // This is only set if type is kDatabase. - // Whether this database is included as one available for backup according - // to the SQL Server VSS writer. This may be false if either the state of - // the databases is not online, or if the VSS writer is not online. - IsAvailableForVssBackup *bool `json:"isAvailableForVssBackup,omitempty"` - - // This is only set if the type is kDatabase. It denotes when this db - // entity is a cloned database. - IsDatabaseCloned *bool `json:"isDatabaseCloned,omitempty"` - - // This specifies if the database has TDE enabled. - IsEncrypted *bool `json:"isEncrypted,omitempty"` - - // This is only set if the type is kInstance or kDatabase. - // Specifies if it is part of an FCI cluster - IsFci *bool `json:"isFci,omitempty"` - - // This is only set if type is kDatabase. - // - // Set to true if this is a system database. - IsSystemDb *bool `json:"isSystemDb,omitempty"` - - // The entity id of the owner entity (such as a VM). This is only set if - // type is kInstance or kDatabase. - OwnerID *int64 `json:"ownerId,omitempty"` - - // This is only set if the type if kDatabase. Specifies if the - // database is read-only. - ReadOnly *bool `json:"readOnly,omitempty"` - - // The recovery model for the database. Only set if the type is kDatabase. - RecoveryModel *int32 `json:"recoveryModel,omitempty"` - - // The identifier for the sql database or instance entity. If type is - // kInstance, then sql_id identifies the instance. If type is kDatabase, - // then sql_id identifies both the instance and database. - // - // This field is only set it type is kInstance or kDatabase. - SQLID *SQLID `json:"sqlId,omitempty"` - - // The SQL instance info will be set for SQL instance entities. - SQLInstanceInfo *SQLInstanceInfo `json:"sqlInstanceInfo,omitempty"` - - // Deprecated. Should use sql_instance_info instead. - // TODO: Leonid - Remove after iris changes are checked in. - // Will be removed after iris code is synced. - // The version of the SQL instance. - // The version will be used in database entities. - SQLInstanceVersion *SQLServerInstanceVersion `json:"sqlInstanceVersion,omitempty"` - - // This is only set if type is kDatabase. - // The state of the database as returned by SQL Server. - SQLServerDbState *int32 `json:"sqlServerDbState,omitempty"` - - // The total size of this entity. Currently this is only set for databases. - TotalSizeBytes *int64 `json:"totalSizeBytes,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this private Sql entity -func (m *PrivateSQLEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagDbCopyInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAagInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbFileGroupInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbFileInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLInstanceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLInstanceVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSQLEntity) validateAagDbCopyInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AagDbCopyInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.AagDbCopyInfoVec); i++ { - if swag.IsZero(m.AagDbCopyInfoVec[i]) { // not required - continue - } - - if m.AagDbCopyInfoVec[i] != nil { - if err := m.AagDbCopyInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagDbCopyInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagDbCopyInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) validateAagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if m.AagInfo != nil { - if err := m.AagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) validateDbFileGroupInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbFileGroupInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DbFileGroupInfoVec); i++ { - if swag.IsZero(m.DbFileGroupInfoVec[i]) { // not required - continue - } - - if m.DbFileGroupInfoVec[i] != nil { - if err := m.DbFileGroupInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFileGroupInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFileGroupInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) validateDbFileInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DbFileInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DbFileInfoVec); i++ { - if swag.IsZero(m.DbFileInfoVec[i]) { // not required - continue - } - - if m.DbFileInfoVec[i] != nil { - if err := m.DbFileInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) validateSQLID(formats strfmt.Registry) error { - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if m.SQLID != nil { - if err := m.SQLID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) validateSQLInstanceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SQLInstanceInfo) { // not required - return nil - } - - if m.SQLInstanceInfo != nil { - if err := m.SQLInstanceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlInstanceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlInstanceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) validateSQLInstanceVersion(formats strfmt.Registry) error { - if swag.IsZero(m.SQLInstanceVersion) { // not required - return nil - } - - if m.SQLInstanceVersion != nil { - if err := m.SQLInstanceVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlInstanceVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlInstanceVersion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private Sql entity based on the context it is used -func (m *PrivateSQLEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAagDbCopyInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbFileGroupInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbFileInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLInstanceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLInstanceVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSQLEntity) contextValidateAagDbCopyInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AagDbCopyInfoVec); i++ { - - if m.AagDbCopyInfoVec[i] != nil { - - if swag.IsZero(m.AagDbCopyInfoVec[i]) { // not required - return nil - } - - if err := m.AagDbCopyInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagDbCopyInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagDbCopyInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateAagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AagInfo != nil { - - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if err := m.AagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateDbFileGroupInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbFileGroupInfoVec); i++ { - - if m.DbFileGroupInfoVec[i] != nil { - - if swag.IsZero(m.DbFileGroupInfoVec[i]) { // not required - return nil - } - - if err := m.DbFileGroupInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFileGroupInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFileGroupInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateDbFileInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbFileInfoVec); i++ { - - if m.DbFileInfoVec[i] != nil { - - if swag.IsZero(m.DbFileInfoVec[i]) { // not required - return nil - } - - if err := m.DbFileInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateSQLID(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLID != nil { - - if swag.IsZero(m.SQLID) { // not required - return nil - } - - if err := m.SQLID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlId") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateSQLInstanceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLInstanceInfo != nil { - - if swag.IsZero(m.SQLInstanceInfo) { // not required - return nil - } - - if err := m.SQLInstanceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlInstanceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlInstanceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateSQLEntity) contextValidateSQLInstanceVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLInstanceVersion != nil { - - if swag.IsZero(m.SQLInstanceVersion) { // not required - return nil - } - - if err := m.SQLInstanceVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlInstanceVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlInstanceVersion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateSQLEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateSQLEntity) UnmarshalBinary(b []byte) error { - var res PrivateSQLEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_subnet.go b/v1/models/private_subnet.go deleted file mode 100644 index 36feab44..00000000 --- a/v1/models/private_subnet.go +++ /dev/null @@ -1,397 +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" -) - -// PrivateSubnet Subnet Subnet -// -// swagger:model PrivateSubnet -type PrivateSubnet struct { - - // Allow All Tenants Flag - AllowAllTenants *bool `json:"allowAllTenants,omitempty"` - - // Service Access Flag - AllowServiceAccess *bool `json:"allowServiceAccess,omitempty"` - - // CIDR - // Required: true - Cidr *string `json:"cidr"` - - // dhcp conf - DhcpConf *DHCPConf `json:"dhcpConf,omitempty"` - - // DHCP enabled - DhcpEnabled *bool `json:"dhcpEnabled,omitempty"` - - // error - // Read Only: true - Error *AxonError `json:"error,omitempty"` - - // Reserved ip list - // Read Only: true - ExcludeIPRanges []string `json:"excludeIpRanges"` - - // Gateway - Gw *string `json:"gw,omitempty"` - - // the id for the subnet - // Format: uuid4 - // Read Only: true - // Format: uuid4 - ID *strfmt.UUID4 `json:"id,omitempty"` - - // ip version - IPVersion *string `json:"ipVersion,omitempty"` - - // id of request that initiated last operation performed on this resource - // Format: uuid4 - // Read Only: true - // Format: uuid4 - LastOperationRequestID *strfmt.UUID4 `json:"lastOperationRequestId,omitempty"` - - // Metadata about this subnet - Metadata map[string]string `json:"metadata,omitempty"` - - // name of the subnet - // Required: true - // Min Length: 1 - Name *string `json:"name"` - - // Network ID - // Required: true - NetworkID *string `json:"networkId"` - - // service access config - ServiceAccessConfig *ServiceAccessConfig `json:"serviceAccessConfig,omitempty"` - - // IP address list which is reserved for static addresses and won't be used by IPAM for dynamic allocations - StaticIPRanges []string `json:"staticIpRanges"` - - // status - Status *string `json:"status,omitempty"` - - // ID of the tenant - // Read Only: true - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this private subnet -func (m *PrivateSubnet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCidr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDhcpConf(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastOperationRequestID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAccessConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSubnet) validateCidr(formats strfmt.Registry) error { - - if err := validate.Required("cidr", "body", m.Cidr); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) validateDhcpConf(formats strfmt.Registry) error { - if swag.IsZero(m.DhcpConf) { // not required - return nil - } - - if m.DhcpConf != nil { - if err := m.DhcpConf.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dhcpConf") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dhcpConf") - } - return err - } - } - - return nil -} - -func (m *PrivateSubnet) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *PrivateSubnet) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := validate.FormatOf("id", "body", "uuid4", m.ID.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) validateLastOperationRequestID(formats strfmt.Registry) error { - if swag.IsZero(m.LastOperationRequestID) { // not required - return nil - } - - if err := validate.FormatOf("lastOperationRequestId", "body", "uuid4", m.LastOperationRequestID.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) validateNetworkID(formats strfmt.Registry) error { - - if err := validate.Required("networkId", "body", m.NetworkID); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) validateServiceAccessConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAccessConfig) { // not required - return nil - } - - if m.ServiceAccessConfig != nil { - if err := m.ServiceAccessConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccessConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccessConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private subnet based on the context it is used -func (m *PrivateSubnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDhcpConf(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeIPRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastOperationRequestID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAccessConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateSubnet) contextValidateDhcpConf(ctx context.Context, formats strfmt.Registry) error { - - if m.DhcpConf != nil { - - if swag.IsZero(m.DhcpConf) { // not required - return nil - } - - if err := m.DhcpConf.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dhcpConf") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dhcpConf") - } - return err - } - } - - return nil -} - -func (m *PrivateSubnet) 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 -} - -func (m *PrivateSubnet) contextValidateExcludeIPRanges(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "excludeIpRanges", "body", []string(m.ExcludeIPRanges)); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) contextValidateLastOperationRequestID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastOperationRequestId", "body", m.LastOperationRequestID); err != nil { - return err - } - - return nil -} - -func (m *PrivateSubnet) contextValidateServiceAccessConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ServiceAccessConfig != nil { - - if swag.IsZero(m.ServiceAccessConfig) { // not required - return nil - } - - if err := m.ServiceAccessConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAccessConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAccessConfig") - } - return err - } - } - - return nil -} - -func (m *PrivateSubnet) contextValidateTenantID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateSubnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateSubnet) UnmarshalBinary(b []byte) error { - var res PrivateSubnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_task_event.go b/v1/models/private_task_event.go deleted file mode 100644 index 58f1c465..00000000 --- a/v1/models/private_task_event.go +++ /dev/null @@ -1,64 +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" -) - -// PrivateTaskEvent Events that clients can attach to a task. -// -// If a task has many small steps (some of them conditional), then a client can -// create a single task and attach each small step as an event. -// The client can collect a few of them, and report progress on a batch. -// The events act like a log for the task, and Pulse does not interpret them. -// -// swagger:model PrivateTaskEvent -type PrivateTaskEvent struct { - - // Message associated with the event. - EventMsg *string `json:"eventMsg,omitempty"` - - // How much the owning task completed when this event occurred. - OwnerPercentFinished *float32 `json:"ownerPercentFinished,omitempty"` - - // How much work was remaining for the owning task when this event occurred. - OwnerRemainingWorkCount *int64 `json:"ownerRemainingWorkCount,omitempty"` - - // The timestamp at which the event occurred. - TimestampSecs *int64 `json:"timestampSecs,omitempty"` -} - -// Validate validates this private task event -func (m *PrivateTaskEvent) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private task event based on context it is used -func (m *PrivateTaskEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateTaskEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateTaskEvent) UnmarshalBinary(b []byte) error { - var res PrivateTaskEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_throttling_configuration.go b/v1/models/private_throttling_configuration.go deleted file mode 100644 index d49271b4..00000000 --- a/v1/models/private_throttling_configuration.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateThrottlingConfiguration Message to represent throttling configuration. -// -// swagger:model PrivateThrottlingConfiguration -type PrivateThrottlingConfiguration struct { - - // Fixed baseline threshold for throttling. This is mandatory for any other - // throttling type than kNoThrottling. - FixedThreshold *int64 `json:"fixedThreshold,omitempty"` - - // Type of the throttling pattern. - PatternType *int32 `json:"patternType,omitempty"` - - // Throttling windows which will be applicable in case of pattern_type = - // kScheduleBased. - ThrottlingWindows []*ThrottlingConfigurationThrottlingWindow `json:"throttlingWindows"` -} - -// Validate validates this private throttling configuration -func (m *PrivateThrottlingConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateThrottlingWindows(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateThrottlingConfiguration) validateThrottlingWindows(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingWindows) { // not required - return nil - } - - for i := 0; i < len(m.ThrottlingWindows); i++ { - if swag.IsZero(m.ThrottlingWindows[i]) { // not required - continue - } - - if m.ThrottlingWindows[i] != nil { - if err := m.ThrottlingWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private throttling configuration based on the context it is used -func (m *PrivateThrottlingConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateThrottlingWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateThrottlingConfiguration) contextValidateThrottlingWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ThrottlingWindows); i++ { - - if m.ThrottlingWindows[i] != nil { - - if swag.IsZero(m.ThrottlingWindows[i]) { // not required - return nil - } - - if err := m.ThrottlingWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateThrottlingConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateThrottlingConfiguration) UnmarshalBinary(b []byte) error { - var res PrivateThrottlingConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_uda_entity.go b/v1/models/private_uda_entity.go deleted file mode 100644 index 936a7045..00000000 --- a/v1/models/private_uda_entity.go +++ /dev/null @@ -1,239 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateUdaEntity private uda entity -// -// swagger:model PrivateUdaEntity -type PrivateUdaEntity struct { - - // Information about the agents linked to this UDA entity. - AgentStatusVec []*HostAgentStatus `json:"agentStatusVec"` - - // Information of a UDA cluster, only valid for an entity of type - // kCluster. - ClusterInfo *PrivateClusterInfo `json:"clusterInfo,omitempty"` - - // Fully qualified name for the object. E.g: For a table this could be - // .. - Name *string `json:"name,omitempty"` - - // Information of a generic UDA entity. only valid for an entity - // of type kObject. - ObjectInfo *ObjectInfo `json:"objectInfo,omitempty"` - - // Universal Data Adapter (UDA) source type. - // Must be same as RegisteredEntityUdaParams::source_type. - SourceType *string `json:"sourceType,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The UUID of the object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private uda entity -func (m *PrivateUdaEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateUdaEntity) validateAgentStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AgentStatusVec); i++ { - if swag.IsZero(m.AgentStatusVec[i]) { // not required - continue - } - - if m.AgentStatusVec[i] != nil { - if err := m.AgentStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateUdaEntity) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateUdaEntity) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private uda entity based on the context it is used -func (m *PrivateUdaEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateUdaEntity) contextValidateAgentStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AgentStatusVec); i++ { - - if m.AgentStatusVec[i] != nil { - - if swag.IsZero(m.AgentStatusVec[i]) { // not required - return nil - } - - if err := m.AgentStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateUdaEntity) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateUdaEntity) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateUdaEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateUdaEntity) UnmarshalBinary(b []byte) error { - var res PrivateUdaEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_uplink_switch_info.go b/v1/models/private_uplink_switch_info.go deleted file mode 100644 index 2a0c8666..00000000 --- a/v1/models/private_uplink_switch_info.go +++ /dev/null @@ -1,56 +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" -) - -// PrivateUplinkSwitchInfo private uplink switch info -// -// swagger:model PrivateUplinkSwitchInfo -type PrivateUplinkSwitchInfo struct { - - // Port ID. - PortID *string `json:"portId,omitempty"` - - // System description. - SysDescr *string `json:"sysDescr,omitempty"` - - // System name. - SysName *string `json:"sysName,omitempty"` -} - -// Validate validates this private uplink switch info -func (m *PrivateUplinkSwitchInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private uplink switch info based on context it is used -func (m *PrivateUplinkSwitchInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateUplinkSwitchInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateUplinkSwitchInfo) UnmarshalBinary(b []byte) error { - var res PrivateUplinkSwitchInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_user.go b/v1/models/private_user.go deleted file mode 100644 index 0677d3ca..00000000 --- a/v1/models/private_user.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" -) - -// PrivateUser Message encapsulating the details of a user. -// -// swagger:model PrivateUser -type PrivateUser struct { - - // Email address of the user. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Name of the user. - Name *string `json:"name,omitempty"` -} - -// Validate validates this private user -func (m *PrivateUser) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private user based on context it is used -func (m *PrivateUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateUser) UnmarshalBinary(b []byte) error { - var res PrivateUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_user_id.go b/v1/models/private_user_id.go deleted file mode 100644 index 4e14b03f..00000000 --- a/v1/models/private_user_id.go +++ /dev/null @@ -1,66 +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" -) - -// PrivateUserID Identifies a delegate user or a user who has folder access permissions. -// -// swagger:model PrivateUserId -type PrivateUserID struct { - - // Defines the display name of a folder, contact, distribution list, - // or delegate user. - DisplayName *string `json:"displayName,omitempty"` - - // Identifies Anonymous and Default user accounts for delegate access. - DistinguishedUser *int32 `json:"distinguishedUser,omitempty"` - - // Identifies an external delegate user or an external user who has - // folder access permissions. - ExternalUserIdentity *string `json:"externalUserIdentity,omitempty"` - - // Represents the primary Simple Mail Transfer Protocol (SMTP) address - // of an account to be used for delegate access. - PrimarySMTPAddress *string `json:"primarySmtpAddress,omitempty"` - - // Represents the security descriptor definition language (SDDL) form - // of the security identifier (SID). - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this private user Id -func (m *PrivateUserID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private user Id based on context it is used -func (m *PrivateUserID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateUserID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateUserID) UnmarshalBinary(b []byte) error { - var res PrivateUserID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_view_entity.go b/v1/models/private_view_entity.go deleted file mode 100644 index 6c638792..00000000 --- a/v1/models/private_view_entity.go +++ /dev/null @@ -1,116 +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" -) - -// PrivateViewEntity private view entity -// -// swagger:model PrivateViewEntity -type PrivateViewEntity struct { - - // A human readable name of the object. - Name *string `json:"name,omitempty"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // The universal identifier of the object. - // NOTE: Universal Id is used here to make the id unique across clusters. - UID *UniversalIDProto `json:"uid,omitempty"` -} - -// Validate validates this private view entity -func (m *PrivateViewEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateViewEntity) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -// ContextValidate validate this private view entity based on the context it is used -func (m *PrivateViewEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateViewEntity) 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 -} - -// MarshalBinary interface implementation -func (m *PrivateViewEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateViewEntity) UnmarshalBinary(b []byte) error { - var res PrivateViewEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_virtual_disk_basic_info.go b/v1/models/private_virtual_disk_basic_info.go deleted file mode 100644 index 1a88235a..00000000 --- a/v1/models/private_virtual_disk_basic_info.go +++ /dev/null @@ -1,65 +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" -) - -// PrivateVirtualDiskBasicInfo The info of the virtual disk. -// -// swagger:model PrivateVirtualDiskBasicInfo -type PrivateVirtualDiskBasicInfo struct { - - // Controller's bus-id controlling the virtual disk in question. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller's type (SCSI, IDE etc). - ControllerType *string `json:"controllerType,omitempty"` - - // The location of the virtual hard disk. - Location *string `json:"location,omitempty"` - - // Disk unit number to identify the virtual disk within a controller. - UnitNumber *int64 `json:"unitNumber,omitempty"` - - // The disk's host volume id. - VolID *string `json:"volId,omitempty"` - - // The disk's host volume's name. - VolName *string `json:"volName,omitempty"` -} - -// Validate validates this private virtual disk basic info -func (m *PrivateVirtualDiskBasicInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private virtual disk basic info based on context it is used -func (m *PrivateVirtualDiskBasicInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateVirtualDiskBasicInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateVirtualDiskBasicInfo) UnmarshalBinary(b []byte) error { - var res PrivateVirtualDiskBasicInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_virtual_disk_config.go b/v1/models/private_virtual_disk_config.go deleted file mode 100644 index 9ae81e22..00000000 --- a/v1/models/private_virtual_disk_config.go +++ /dev/null @@ -1,60 +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" -) - -// PrivateVirtualDiskConfig Message representing a Virtual Disk within a VM, containing -// basic info about it. -// -// swagger:model PrivateVirtualDiskConfig -type PrivateVirtualDiskConfig struct { - - // The device bus for the virtual disk device. - DeviceBus *string `json:"deviceBus,omitempty"` - - // Index of the device on the adapter type. - DeviceIndex *int32 `json:"deviceIndex,omitempty"` - - // Disk size in Bytes. - DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` - - // Virtual disk UUID. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private virtual disk config -func (m *PrivateVirtualDiskConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private virtual disk config based on context it is used -func (m *PrivateVirtualDiskConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateVirtualDiskConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateVirtualDiskConfig) UnmarshalBinary(b []byte) error { - var res PrivateVirtualDiskConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_virtual_disk_info.go b/v1/models/private_virtual_disk_info.go deleted file mode 100644 index 0e559dbc..00000000 --- a/v1/models/private_virtual_disk_info.go +++ /dev/null @@ -1,66 +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" -) - -// PrivateVirtualDiskInfo Message representing a Virtual Disk within a VM, containing -// basic info about it and its corresponding controller. -// -// swagger:model PrivateVirtualDiskInfo -type PrivateVirtualDiskInfo struct { - - // Controller's bus-id controlling the virtual disk in question. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller's type (SCSI, IDE etc). - ControllerType *string `json:"controllerType,omitempty"` - - // Backing file name for the virtual disk. - FileName *string `json:"fileName,omitempty"` - - // Size of the disk. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Disk unit number to identify the virtual disk within a controller. - UnitNumber *int64 `json:"unitNumber,omitempty"` - - // UUID of the disk. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this private virtual disk info -func (m *PrivateVirtualDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this private virtual disk info based on context it is used -func (m *PrivateVirtualDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateVirtualDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateVirtualDiskInfo) UnmarshalBinary(b []byte) error { - var res PrivateVirtualDiskInfo - 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 deleted file mode 100644 index b8482f3a..00000000 --- a/v1/models/private_vmware_entity.go +++ /dev/null @@ -1,1058 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateVmwareEntity private vmware entity -// -// swagger:model PrivateVmwareEntity -type PrivateVmwareEntity struct { - - // This field may only be set if 'uses_persistent_agent' is true. - // It contains the entity id of the registered persistent agent that is - // running on this VM (the entity type must be kVirtualMachine). - // - // If this is not set, and 'uses_persistent_agent' is true, it implies that - // an unregistered agent is running on this VM. - AgentEntityID *int64 `json:"agentEntityId,omitempty"` - - // Information about the Agents associated with this VM (see agent.proto - // for details). This is only set if 'uses_persistent_agent' above is set to - // true. As of now, there is only one agent associated with a VM. However, - // this field has been made repeated for compatibility with physical entity - // and for future support of clustering where we will need to associate - // mutiple agents with a VM. - AgentStatusVec []*HostAgentStatus `json:"agentStatusVec"` - - // Represents aggregate used disk space from all the disks in the VM. - // This information is retrieved only when VMware Tools is running on the VM. - // If VMware Tools is not running then this will not be set. - AggregateGuestDiskSpaceUsed *int64 `json:"aggregateGuestDiskSpaceUsed,omitempty"` - - // The API version of the VMware environment. This is currently populated - // only for entity of type kVCenter. - APIVersion *string `json:"apiVersion,omitempty"` - - // The connection state of the entity (only if it is of type kHostSystem or - // kVirtualMachine). - ConnectionState *int32 `json:"connectionState,omitempty"` - - // Optional list of custom attributes associated with this entity. - CustomAttributesVec []*CustomAttribute `json:"customAttributesVec"` - - // This will be populated for kHostSystem if it's IP address is present in - // the subnet provided by user. - DataTransferIP *string `json:"dataTransferIp,omitempty"` - - // This is populated for entities of type kDatastore. - DatastoreInfo *PrivateDatastoreInfo `json:"datastoreInfo,omitempty"` - - // This will be populated for kVirtualMachine. - EsxiHostName *string `json:"esxiHostName,omitempty"` - - // This represents the state of IOFilter on ESX host and cluster compute - // resource. - FilterState *IOFilterState `json:"filterState,omitempty"` - - // This is set for entity of type kFolder. - FolderType *int32 `json:"folderType,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // VM's guest OS name. e.g., "Microsoft Windows Server 2012 (64-bit)". - // It is the OS name user specified on VMware, not the actual OS name. - GuestFullName *string `json:"guestFullName,omitempty"` - - // The host environment type. This is set for entities of type - // kVirtualMachine. - HostType *int32 `json:"hostType,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. - // - // Entity Type | IP Address Details - // - // kHostSystem | VMKernel Adapter IP Addresses - IPAddrVec []string `json:"ipAddrVec"` - - // This will be set only for entities of type kVirtualMachine. The field - // indicates whether the VM is a Rigel/HyX VM. - IsSaasConnector *bool `json:"isSaasConnector,omitempty"` - - // If VM is a template, this field is set. - IsVMTemplate *bool `json:"isVmTemplate,omitempty"` - - // This is set for the vCenter entity. - IsVmcEnv *bool `json:"isVmcEnv,omitempty"` - - // Time in usecs when the tag hierarchy was last refreshed. - // This is applicable only for parent entity. - LastTagRefreshUsecs *int64 `json:"lastTagRefreshUsecs,omitempty"` - - // The logical size of Virtual Machine in bytes. It is calculated by adding - // logical size of virtual disks attached to the VM. - LogicalSizeInBytes *int64 `json:"logicalSizeInBytes,omitempty"` - - // The managed object reference to the object (w.r.t vCenter). - Moref *MORef `json:"moref,omitempty"` - - // A human readable name for the object. - Name *string `json:"name,omitempty"` - - // This will be populated for kVirtualDatacenter. - OrgVdcNetworkVec []*OrgVDCNetwork `json:"orgVdcNetworkVec"` - - // This is set for virtual machines in environment kVCloudDirector. It - // contains its parent VirtualApp's uuid. - ParentVappUUID *string `json:"parentVappUuid,omitempty"` - - // This is set for vDCs in environment kVCloudDirector. It contains the - // parent vcenter's uuid. - ParentVcenterUUID *string `json:"parentVcenterUuid,omitempty"` - - // This will be populated for kVirtualDatacenter. - StorageProfileVec []*StorageProfile `json:"storageProfileVec"` - - // System resource information about the VM. - SystemResourceInfo *SystemResourceInfo `json:"systemResourceInfo,omitempty"` - - // Optional list of tag attributes associated with this entity. - TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` - - // The type of entity this proto refers to. - Type *int32 `json:"type,omitempty"` - - // Whether to use BIOS UUID for generating VM entity ID. This is only set for - // entities of type kVirtualMachine. - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - // Set to true if a persistent agent is running on this VM (the entity type - // must be kVirtualMachine). - // If this is set, the agent based backup and restore workflows (such as SQL) - // will not install/uninstall the agent dynamically. - UsesPersistentAgent *bool `json:"usesPersistentAgent,omitempty"` - - // The instance UUID of the object. - // TODO(mark): Fill in more details to locate the object, when the moref is - // not enough to locate it (e.g, when it becomes invalidated). - UUID *string `json:"uuid,omitempty"` - - // This is set for certain objects of vCloud director like virtual machines - // to capture additional vcloud director related attributes. - VcdAttributes *VCDAttributes `json:"vcdAttributes,omitempty"` - - // This will be populated for kOrganization. - VcdCatalogVec []*VCDCatalog `json:"vcdCatalogVec"` - - // Static vCenter Id. - // Note: Applicable only to enironment of type kvCloudDirector. It is - // needed to be able to distinguish entities across different vCenters - // registered under the same vCloudDirector. This is because any 2 entities - // across the vCenters can potentially have the same attributes, resulting - // in the EntityHash to the same, as parent for both of them would be the - // vCloudDirector. This field helps distinguish those entities. - VcenterStaticID *int64 `json:"vcenterStaticId,omitempty"` - - // This is set for vCenter, Host and VM. - // - // For vCenter, it shows the software version - // e.g., "VMware vCenter Server 6.5.0 build-5178943" - // - // For Host, it shows the software version - // e.g., "6.0.0" - // - // For VM, it shows the hardware version. - // e.g., "vmx-10" - Version *string `json:"version,omitempty"` - - // List of virtual disk info maintained as part of the Virtual Machine HW - // config. It will be populated only for an entity of type kVirtualMachine. - VirtualDiskInfo []*PrivateVirtualDiskInfo `json:"virtualDiskInfo"` - - // This is set for virtual machines if we are tracking VM's by it's BIOS UUID - // instead of instance UUID. - // NOTE: vCenter doesn't guarantee uniqueness of this Id. It is expected that - // when we query the entity hierarchy all the VMs with conflicting ids are - // filtered out and none of them are surfaced up. - VMBiosUUID *string `json:"vmBiosUuid,omitempty"` - - // This is set for virtual machines even if we are not tracking VM's by its - // BIOS UUID. - // Keeping two separate fields to not complicate the entity hash generation - // code and reduce error scenarios. - // If populated value of this field is same as vm_bios_uuid. - VMBiosUUIDSecondary *string `json:"vmBiosUuidSecondary,omitempty"` - - // This is only set for entities of type kVirtualMachine. - // This stores the source VCenter and VM info, if the VM was migrated from - // another vCenter. - VMLinkingInfo *VMLinkingInfo `json:"vmLinkingInfo,omitempty"` - - // Map storing custom key against its custom attributes information for a - // vCenter. - VmwareCustomAttributesMap []*EntityVmwareCustomAttributesMapEntry `json:"vmwareCustomAttributesMap"` - - // The status of VMware tools on the guest (only if it is of type - // kVirtualMachine). - VmwareToolsStatus *int32 `json:"vmwareToolsStatus,omitempty"` -} - -// Validate validates this private vmware entity -func (m *PrivateVmwareEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMoref(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetworkVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageProfileVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemResourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributesVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdCatalogVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMLinkingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareCustomAttributesMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateVmwareEntity) validateAgentStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AgentStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AgentStatusVec); i++ { - if swag.IsZero(m.AgentStatusVec[i]) { // not required - continue - } - - if m.AgentStatusVec[i] != nil { - if err := m.AgentStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateCustomAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.CustomAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.CustomAttributesVec); i++ { - if swag.IsZero(m.CustomAttributesVec[i]) { // not required - continue - } - - if m.CustomAttributesVec[i] != nil { - if err := m.CustomAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateDatastoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if m.DatastoreInfo != nil { - if err := m.DatastoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateFilterState(formats strfmt.Registry) error { - if swag.IsZero(m.FilterState) { // not required - return nil - } - - if m.FilterState != nil { - if err := m.FilterState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterState") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateMoref(formats strfmt.Registry) error { - if swag.IsZero(m.Moref) { // not required - return nil - } - - if m.Moref != nil { - if err := m.Moref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("moref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("moref") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateOrgVdcNetworkVec(formats strfmt.Registry) error { - if swag.IsZero(m.OrgVdcNetworkVec) { // not required - return nil - } - - for i := 0; i < len(m.OrgVdcNetworkVec); i++ { - if swag.IsZero(m.OrgVdcNetworkVec[i]) { // not required - continue - } - - if m.OrgVdcNetworkVec[i] != nil { - if err := m.OrgVdcNetworkVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgVdcNetworkVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgVdcNetworkVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateStorageProfileVec(formats strfmt.Registry) error { - if swag.IsZero(m.StorageProfileVec) { // not required - return nil - } - - for i := 0; i < len(m.StorageProfileVec); i++ { - if swag.IsZero(m.StorageProfileVec[i]) { // not required - continue - } - - if m.StorageProfileVec[i] != nil { - if err := m.StorageProfileVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfileVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfileVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateSystemResourceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SystemResourceInfo) { // not required - return nil - } - - if m.SystemResourceInfo != nil { - if err := m.SystemResourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemResourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemResourceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateTagAttributesVec(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributesVec) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributesVec); i++ { - if swag.IsZero(m.TagAttributesVec[i]) { // not required - continue - } - - if m.TagAttributesVec[i] != nil { - if err := m.TagAttributesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateVcdAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.VcdAttributes) { // not required - return nil - } - - if m.VcdAttributes != nil { - if err := m.VcdAttributes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdAttributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdAttributes") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateVcdCatalogVec(formats strfmt.Registry) error { - if swag.IsZero(m.VcdCatalogVec) { // not required - return nil - } - - for i := 0; i < len(m.VcdCatalogVec); i++ { - if swag.IsZero(m.VcdCatalogVec[i]) { // not required - continue - } - - if m.VcdCatalogVec[i] != nil { - if err := m.VcdCatalogVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdCatalogVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdCatalogVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateVirtualDiskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskInfo) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskInfo); i++ { - if swag.IsZero(m.VirtualDiskInfo[i]) { // not required - continue - } - - if m.VirtualDiskInfo[i] != nil { - if err := m.VirtualDiskInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) validateVMLinkingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VMLinkingInfo) { // not required - return nil - } - - if m.VMLinkingInfo != nil { - if err := m.VMLinkingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmLinkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmLinkingInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) validateVmwareCustomAttributesMap(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareCustomAttributesMap) { // not required - return nil - } - - for i := 0; i < len(m.VmwareCustomAttributesMap); i++ { - if swag.IsZero(m.VmwareCustomAttributesMap[i]) { // not required - continue - } - - if m.VmwareCustomAttributesMap[i] != nil { - if err := m.VmwareCustomAttributesMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareCustomAttributesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareCustomAttributesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this private vmware entity based on the context it is used -func (m *PrivateVmwareEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMoref(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetworkVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageProfileVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemResourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdCatalogVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMLinkingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareCustomAttributesMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateVmwareEntity) contextValidateAgentStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AgentStatusVec); i++ { - - if m.AgentStatusVec[i] != nil { - - if swag.IsZero(m.AgentStatusVec[i]) { // not required - return nil - } - - if err := m.AgentStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateCustomAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomAttributesVec); i++ { - - if m.CustomAttributesVec[i] != nil { - - if swag.IsZero(m.CustomAttributesVec[i]) { // not required - return nil - } - - if err := m.CustomAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateDatastoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreInfo != nil { - - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if err := m.DatastoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateFilterState(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterState != nil { - - if swag.IsZero(m.FilterState) { // not required - return nil - } - - if err := m.FilterState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterState") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateMoref(ctx context.Context, formats strfmt.Registry) error { - - if m.Moref != nil { - - if swag.IsZero(m.Moref) { // not required - return nil - } - - if err := m.Moref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("moref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("moref") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateOrgVdcNetworkVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OrgVdcNetworkVec); i++ { - - if m.OrgVdcNetworkVec[i] != nil { - - if swag.IsZero(m.OrgVdcNetworkVec[i]) { // not required - return nil - } - - if err := m.OrgVdcNetworkVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgVdcNetworkVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgVdcNetworkVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateStorageProfileVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageProfileVec); i++ { - - if m.StorageProfileVec[i] != nil { - - if swag.IsZero(m.StorageProfileVec[i]) { // not required - return nil - } - - if err := m.StorageProfileVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfileVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfileVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateSystemResourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemResourceInfo != nil { - - if swag.IsZero(m.SystemResourceInfo) { // not required - return nil - } - - if err := m.SystemResourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemResourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemResourceInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributesVec); i++ { - - if m.TagAttributesVec[i] != nil { - - if swag.IsZero(m.TagAttributesVec[i]) { // not required - return nil - } - - if err := m.TagAttributesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateVcdAttributes(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdAttributes != nil { - - if swag.IsZero(m.VcdAttributes) { // not required - return nil - } - - if err := m.VcdAttributes.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdAttributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdAttributes") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateVcdCatalogVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VcdCatalogVec); i++ { - - if m.VcdCatalogVec[i] != nil { - - if swag.IsZero(m.VcdCatalogVec[i]) { // not required - return nil - } - - if err := m.VcdCatalogVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdCatalogVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdCatalogVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateVirtualDiskInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskInfo); i++ { - - if m.VirtualDiskInfo[i] != nil { - - if swag.IsZero(m.VirtualDiskInfo[i]) { // not required - return nil - } - - if err := m.VirtualDiskInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateVMLinkingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VMLinkingInfo != nil { - - if swag.IsZero(m.VMLinkingInfo) { // not required - return nil - } - - if err := m.VMLinkingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmLinkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmLinkingInfo") - } - return err - } - } - - return nil -} - -func (m *PrivateVmwareEntity) contextValidateVmwareCustomAttributesMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VmwareCustomAttributesMap); i++ { - - if m.VmwareCustomAttributesMap[i] != nil { - - if swag.IsZero(m.VmwareCustomAttributesMap[i]) { // not required - return nil - } - - if err := m.VmwareCustomAttributesMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareCustomAttributesMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareCustomAttributesMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateVmwareEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateVmwareEntity) UnmarshalBinary(b []byte) error { - var res PrivateVmwareEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_volume_info.go b/v1/models/private_volume_info.go deleted file mode 100644 index 35059ad3..00000000 --- a/v1/models/private_volume_info.go +++ /dev/null @@ -1,197 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PrivateVolumeInfo VolumeInfo is the information about each logical volume (filesystem) for a -// VM. -// -// swagger:model PrivateVolumeInfo -type PrivateVolumeInfo struct { - - // Information about all the disks in this volume. - DiskVec []*VolumeInfoDiskInfo `json:"diskVec"` - - // DisplayName is the display name of the volume e.g. C: - DisplayName *string `json:"displayName,omitempty"` - - // FilesystemType on this volume. - FilesystemType *string `json:"filesystemType,omitempty"` - - // FilesytemUuid is the Filesystem uuid. - FilesytemUUID *string `json:"filesytemUuid,omitempty"` - - // IsSupported specifies whether this is a supported Volume/File systems. - IsSupported *bool `json:"isSupported,omitempty"` - - // LogicalVolumeInfo is set only for lvm/Logica Volume Manager (Linux) and - // ldm/ Logical Disk Manager (Windows) volume only. - LogicalVolumeInfo *VolumeInfoLogicalVolumeInfo `json:"logicalVolumeInfo,omitempty"` - - // Name is the name of the volume e.g. /C. - Name *string `json:"name,omitempty"` - - // VolumeGuid is the Volume guid. - // This is populated for kPhysical environments. - VolumeGUID *string `json:"volumeGuid,omitempty"` - - // VolumeType is the type of the volume i.e. whether this volume is simple, - // lvm or ldm. - VolumeType *int32 `json:"volumeType,omitempty"` -} - -// Validate validates this private volume info -func (m *PrivateVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateVolumeInfo) validateDiskVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskVec); i++ { - if swag.IsZero(m.DiskVec[i]) { // not required - continue - } - - if m.DiskVec[i] != nil { - if err := m.DiskVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVolumeInfo) validateLogicalVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalVolumeInfo) { // not required - return nil - } - - if m.LogicalVolumeInfo != nil { - if err := m.LogicalVolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolumeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private volume info based on the context it is used -func (m *PrivateVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateVolumeInfo) contextValidateDiskVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskVec); i++ { - - if m.DiskVec[i] != nil { - - if swag.IsZero(m.DiskVec[i]) { // not required - return nil - } - - if err := m.DiskVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PrivateVolumeInfo) contextValidateLogicalVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LogicalVolumeInfo != nil { - - if swag.IsZero(m.LogicalVolumeInfo) { // not required - return nil - } - - if err := m.LogicalVolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolumeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateVolumeInfo) UnmarshalBinary(b []byte) error { - var res PrivateVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/privilege_info.go b/v1/models/privilege_info.go deleted file mode 100644 index e969807d..00000000 --- a/v1/models/privilege_info.go +++ /dev/null @@ -1,319 +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" -) - -// PrivilegeInfo Privilege Information. -// -// Specifies details about a privilege such as the category, -// description, name, etc. -// -// swagger:model PrivilegeInfo -type PrivilegeInfo struct { - - // Specifies unique id for a privilege. This number must be unique when - // creating a new privilege. - // Type for unique privilege Id values. - // All below enum values specify a value for all uniquely defined - // privileges in Cohesity. - // Enum: ["kPrincipalView","kPrincipalModify","kAppLaunch","kAppsManagement","kOrganizationView","kOrganizationModify","kOrganizationImpersonate","kCloneView","kCloneModify","kClusterView","kClusterModify","kClusterCreate","kClusterSupport","kClusterUpgrade","kClusterRemoteView","kClusterRemoteModify","kClusterExternalTargetView","kClusterExternalTargetModify","kClusterAudit","kAlertView","kAlertModify","kVlanView","kVlanModify","kHybridExtenderView","kHybridExtenderDownload","kAdLdapView","kAdLdapModify","kSchedulerView","kSchedulerModify","kProtectionView","kProtectionModify","kProtectionJobOperate","kProtectionSourceModify","kProtectionPolicyView","kProtectionPolicyModify","kRestoreView","kRestoreModify","kRestoreDownload","kRemoteRestore","kStorageView","kStorageModify","kStorageDomainView","kStorageDomainModify","kAnalyticsView","kAnalyticsModify","kReportsView","kMcmModify","kDataSecurity","kSmbBackup","kSmbRestore","kSmbTakeOwnership","kSmbAuditing","kMcmUnregister","kMcmUpgrade","kMcmModifySuperAdmin","kMcmViewSuperAdmin","kMcmModifyCohesityAdmin","kMcmViewCohesityAdmin","kObjectSearch","kFileDatalockExpiryTimeDecrease"] - PrivilegeID *string `json:"PrivilegeId,omitempty"` - - // Specifies a category for the privilege such as 'Access Management'. - Category *string `json:"category,omitempty"` - - // Specifies a description defining what the privilege provides. - Description *string `json:"description,omitempty"` - - // Specifies that this privilege is available for Helios operations. - IsAvailableOnHelios *bool `json:"isAvailableOnHelios,omitempty"` - - // Specifies if this privilege is automatically assigned to custom roles. - IsCustomRoleDefault *bool `json:"isCustomRoleDefault,omitempty"` - - // Specifies that this privilege is available for SaaS operations. - IsSaaSOnly *bool `json:"isSaaSOnly,omitempty"` - - // Specifies if this privilege is automatically assigned to the default - // System Admin user called 'admin'. - // If true, the privilege is NOT assigned to the default System Admin user - // called 'admin'. - // By default, privileges are automatically assigned to the default System - // Admin user called 'admin'. - IsSpecial *bool `json:"isSpecial,omitempty"` - - // Specifies if privilege is view-only privilege that cannot make changes. - IsViewOnly *bool `json:"isViewOnly,omitempty"` - - // Specifies the label for the privilege as displayed on the Cohesity - // Dashboard such as 'Access Management View'. - Label *string `json:"label,omitempty"` - - // Specifies the Cluster name for the privilege such as PRINCIPAL_VIEW. - Name *string `json:"name,omitempty"` -} - -// Validate validates this privilege info -func (m *PrivilegeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivilegeID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var privilegeInfoTypePrivilegeIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrincipalView","kPrincipalModify","kAppLaunch","kAppsManagement","kOrganizationView","kOrganizationModify","kOrganizationImpersonate","kCloneView","kCloneModify","kClusterView","kClusterModify","kClusterCreate","kClusterSupport","kClusterUpgrade","kClusterRemoteView","kClusterRemoteModify","kClusterExternalTargetView","kClusterExternalTargetModify","kClusterAudit","kAlertView","kAlertModify","kVlanView","kVlanModify","kHybridExtenderView","kHybridExtenderDownload","kAdLdapView","kAdLdapModify","kSchedulerView","kSchedulerModify","kProtectionView","kProtectionModify","kProtectionJobOperate","kProtectionSourceModify","kProtectionPolicyView","kProtectionPolicyModify","kRestoreView","kRestoreModify","kRestoreDownload","kRemoteRestore","kStorageView","kStorageModify","kStorageDomainView","kStorageDomainModify","kAnalyticsView","kAnalyticsModify","kReportsView","kMcmModify","kDataSecurity","kSmbBackup","kSmbRestore","kSmbTakeOwnership","kSmbAuditing","kMcmUnregister","kMcmUpgrade","kMcmModifySuperAdmin","kMcmViewSuperAdmin","kMcmModifyCohesityAdmin","kMcmViewCohesityAdmin","kObjectSearch","kFileDatalockExpiryTimeDecrease"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - privilegeInfoTypePrivilegeIDPropEnum = append(privilegeInfoTypePrivilegeIDPropEnum, v) - } -} - -const ( - - // PrivilegeInfoPrivilegeIDKPrincipalView captures enum value "kPrincipalView" - PrivilegeInfoPrivilegeIDKPrincipalView string = "kPrincipalView" - - // PrivilegeInfoPrivilegeIDKPrincipalModify captures enum value "kPrincipalModify" - PrivilegeInfoPrivilegeIDKPrincipalModify string = "kPrincipalModify" - - // PrivilegeInfoPrivilegeIDKAppLaunch captures enum value "kAppLaunch" - PrivilegeInfoPrivilegeIDKAppLaunch string = "kAppLaunch" - - // PrivilegeInfoPrivilegeIDKAppsManagement captures enum value "kAppsManagement" - PrivilegeInfoPrivilegeIDKAppsManagement string = "kAppsManagement" - - // PrivilegeInfoPrivilegeIDKOrganizationView captures enum value "kOrganizationView" - PrivilegeInfoPrivilegeIDKOrganizationView string = "kOrganizationView" - - // PrivilegeInfoPrivilegeIDKOrganizationModify captures enum value "kOrganizationModify" - PrivilegeInfoPrivilegeIDKOrganizationModify string = "kOrganizationModify" - - // PrivilegeInfoPrivilegeIDKOrganizationImpersonate captures enum value "kOrganizationImpersonate" - PrivilegeInfoPrivilegeIDKOrganizationImpersonate string = "kOrganizationImpersonate" - - // PrivilegeInfoPrivilegeIDKCloneView captures enum value "kCloneView" - PrivilegeInfoPrivilegeIDKCloneView string = "kCloneView" - - // PrivilegeInfoPrivilegeIDKCloneModify captures enum value "kCloneModify" - PrivilegeInfoPrivilegeIDKCloneModify string = "kCloneModify" - - // PrivilegeInfoPrivilegeIDKClusterView captures enum value "kClusterView" - PrivilegeInfoPrivilegeIDKClusterView string = "kClusterView" - - // PrivilegeInfoPrivilegeIDKClusterModify captures enum value "kClusterModify" - PrivilegeInfoPrivilegeIDKClusterModify string = "kClusterModify" - - // PrivilegeInfoPrivilegeIDKClusterCreate captures enum value "kClusterCreate" - PrivilegeInfoPrivilegeIDKClusterCreate string = "kClusterCreate" - - // PrivilegeInfoPrivilegeIDKClusterSupport captures enum value "kClusterSupport" - PrivilegeInfoPrivilegeIDKClusterSupport string = "kClusterSupport" - - // PrivilegeInfoPrivilegeIDKClusterUpgrade captures enum value "kClusterUpgrade" - PrivilegeInfoPrivilegeIDKClusterUpgrade string = "kClusterUpgrade" - - // PrivilegeInfoPrivilegeIDKClusterRemoteView captures enum value "kClusterRemoteView" - PrivilegeInfoPrivilegeIDKClusterRemoteView string = "kClusterRemoteView" - - // PrivilegeInfoPrivilegeIDKClusterRemoteModify captures enum value "kClusterRemoteModify" - PrivilegeInfoPrivilegeIDKClusterRemoteModify string = "kClusterRemoteModify" - - // PrivilegeInfoPrivilegeIDKClusterExternalTargetView captures enum value "kClusterExternalTargetView" - PrivilegeInfoPrivilegeIDKClusterExternalTargetView string = "kClusterExternalTargetView" - - // PrivilegeInfoPrivilegeIDKClusterExternalTargetModify captures enum value "kClusterExternalTargetModify" - PrivilegeInfoPrivilegeIDKClusterExternalTargetModify string = "kClusterExternalTargetModify" - - // PrivilegeInfoPrivilegeIDKClusterAudit captures enum value "kClusterAudit" - PrivilegeInfoPrivilegeIDKClusterAudit string = "kClusterAudit" - - // PrivilegeInfoPrivilegeIDKAlertView captures enum value "kAlertView" - PrivilegeInfoPrivilegeIDKAlertView string = "kAlertView" - - // PrivilegeInfoPrivilegeIDKAlertModify captures enum value "kAlertModify" - PrivilegeInfoPrivilegeIDKAlertModify string = "kAlertModify" - - // PrivilegeInfoPrivilegeIDKVlanView captures enum value "kVlanView" - PrivilegeInfoPrivilegeIDKVlanView string = "kVlanView" - - // PrivilegeInfoPrivilegeIDKVlanModify captures enum value "kVlanModify" - PrivilegeInfoPrivilegeIDKVlanModify string = "kVlanModify" - - // PrivilegeInfoPrivilegeIDKHybridExtenderView captures enum value "kHybridExtenderView" - PrivilegeInfoPrivilegeIDKHybridExtenderView string = "kHybridExtenderView" - - // PrivilegeInfoPrivilegeIDKHybridExtenderDownload captures enum value "kHybridExtenderDownload" - PrivilegeInfoPrivilegeIDKHybridExtenderDownload string = "kHybridExtenderDownload" - - // PrivilegeInfoPrivilegeIDKAdLdapView captures enum value "kAdLdapView" - PrivilegeInfoPrivilegeIDKAdLdapView string = "kAdLdapView" - - // PrivilegeInfoPrivilegeIDKAdLdapModify captures enum value "kAdLdapModify" - PrivilegeInfoPrivilegeIDKAdLdapModify string = "kAdLdapModify" - - // PrivilegeInfoPrivilegeIDKSchedulerView captures enum value "kSchedulerView" - PrivilegeInfoPrivilegeIDKSchedulerView string = "kSchedulerView" - - // PrivilegeInfoPrivilegeIDKSchedulerModify captures enum value "kSchedulerModify" - PrivilegeInfoPrivilegeIDKSchedulerModify string = "kSchedulerModify" - - // PrivilegeInfoPrivilegeIDKProtectionView captures enum value "kProtectionView" - PrivilegeInfoPrivilegeIDKProtectionView string = "kProtectionView" - - // PrivilegeInfoPrivilegeIDKProtectionModify captures enum value "kProtectionModify" - PrivilegeInfoPrivilegeIDKProtectionModify string = "kProtectionModify" - - // PrivilegeInfoPrivilegeIDKProtectionJobOperate captures enum value "kProtectionJobOperate" - PrivilegeInfoPrivilegeIDKProtectionJobOperate string = "kProtectionJobOperate" - - // PrivilegeInfoPrivilegeIDKProtectionSourceModify captures enum value "kProtectionSourceModify" - PrivilegeInfoPrivilegeIDKProtectionSourceModify string = "kProtectionSourceModify" - - // PrivilegeInfoPrivilegeIDKProtectionPolicyView captures enum value "kProtectionPolicyView" - PrivilegeInfoPrivilegeIDKProtectionPolicyView string = "kProtectionPolicyView" - - // PrivilegeInfoPrivilegeIDKProtectionPolicyModify captures enum value "kProtectionPolicyModify" - PrivilegeInfoPrivilegeIDKProtectionPolicyModify string = "kProtectionPolicyModify" - - // PrivilegeInfoPrivilegeIDKRestoreView captures enum value "kRestoreView" - PrivilegeInfoPrivilegeIDKRestoreView string = "kRestoreView" - - // PrivilegeInfoPrivilegeIDKRestoreModify captures enum value "kRestoreModify" - PrivilegeInfoPrivilegeIDKRestoreModify string = "kRestoreModify" - - // PrivilegeInfoPrivilegeIDKRestoreDownload captures enum value "kRestoreDownload" - PrivilegeInfoPrivilegeIDKRestoreDownload string = "kRestoreDownload" - - // PrivilegeInfoPrivilegeIDKRemoteRestore captures enum value "kRemoteRestore" - PrivilegeInfoPrivilegeIDKRemoteRestore string = "kRemoteRestore" - - // PrivilegeInfoPrivilegeIDKStorageView captures enum value "kStorageView" - PrivilegeInfoPrivilegeIDKStorageView string = "kStorageView" - - // PrivilegeInfoPrivilegeIDKStorageModify captures enum value "kStorageModify" - PrivilegeInfoPrivilegeIDKStorageModify string = "kStorageModify" - - // PrivilegeInfoPrivilegeIDKStorageDomainView captures enum value "kStorageDomainView" - PrivilegeInfoPrivilegeIDKStorageDomainView string = "kStorageDomainView" - - // PrivilegeInfoPrivilegeIDKStorageDomainModify captures enum value "kStorageDomainModify" - PrivilegeInfoPrivilegeIDKStorageDomainModify string = "kStorageDomainModify" - - // PrivilegeInfoPrivilegeIDKAnalyticsView captures enum value "kAnalyticsView" - PrivilegeInfoPrivilegeIDKAnalyticsView string = "kAnalyticsView" - - // PrivilegeInfoPrivilegeIDKAnalyticsModify captures enum value "kAnalyticsModify" - PrivilegeInfoPrivilegeIDKAnalyticsModify string = "kAnalyticsModify" - - // PrivilegeInfoPrivilegeIDKReportsView captures enum value "kReportsView" - PrivilegeInfoPrivilegeIDKReportsView string = "kReportsView" - - // PrivilegeInfoPrivilegeIDKMcmModify captures enum value "kMcmModify" - PrivilegeInfoPrivilegeIDKMcmModify string = "kMcmModify" - - // PrivilegeInfoPrivilegeIDKDataSecurity captures enum value "kDataSecurity" - PrivilegeInfoPrivilegeIDKDataSecurity string = "kDataSecurity" - - // PrivilegeInfoPrivilegeIDKSmbBackup captures enum value "kSmbBackup" - PrivilegeInfoPrivilegeIDKSmbBackup string = "kSmbBackup" - - // PrivilegeInfoPrivilegeIDKSmbRestore captures enum value "kSmbRestore" - PrivilegeInfoPrivilegeIDKSmbRestore string = "kSmbRestore" - - // PrivilegeInfoPrivilegeIDKSmbTakeOwnership captures enum value "kSmbTakeOwnership" - PrivilegeInfoPrivilegeIDKSmbTakeOwnership string = "kSmbTakeOwnership" - - // PrivilegeInfoPrivilegeIDKSmbAuditing captures enum value "kSmbAuditing" - PrivilegeInfoPrivilegeIDKSmbAuditing string = "kSmbAuditing" - - // PrivilegeInfoPrivilegeIDKMcmUnregister captures enum value "kMcmUnregister" - PrivilegeInfoPrivilegeIDKMcmUnregister string = "kMcmUnregister" - - // PrivilegeInfoPrivilegeIDKMcmUpgrade captures enum value "kMcmUpgrade" - PrivilegeInfoPrivilegeIDKMcmUpgrade string = "kMcmUpgrade" - - // PrivilegeInfoPrivilegeIDKMcmModifySuperAdmin captures enum value "kMcmModifySuperAdmin" - PrivilegeInfoPrivilegeIDKMcmModifySuperAdmin string = "kMcmModifySuperAdmin" - - // PrivilegeInfoPrivilegeIDKMcmViewSuperAdmin captures enum value "kMcmViewSuperAdmin" - PrivilegeInfoPrivilegeIDKMcmViewSuperAdmin string = "kMcmViewSuperAdmin" - - // PrivilegeInfoPrivilegeIDKMcmModifyCohesityAdmin captures enum value "kMcmModifyCohesityAdmin" - PrivilegeInfoPrivilegeIDKMcmModifyCohesityAdmin string = "kMcmModifyCohesityAdmin" - - // PrivilegeInfoPrivilegeIDKMcmViewCohesityAdmin captures enum value "kMcmViewCohesityAdmin" - PrivilegeInfoPrivilegeIDKMcmViewCohesityAdmin string = "kMcmViewCohesityAdmin" - - // PrivilegeInfoPrivilegeIDKObjectSearch captures enum value "kObjectSearch" - PrivilegeInfoPrivilegeIDKObjectSearch string = "kObjectSearch" - - // PrivilegeInfoPrivilegeIDKFileDatalockExpiryTimeDecrease captures enum value "kFileDatalockExpiryTimeDecrease" - PrivilegeInfoPrivilegeIDKFileDatalockExpiryTimeDecrease string = "kFileDatalockExpiryTimeDecrease" -) - -// prop value enum -func (m *PrivilegeInfo) validatePrivilegeIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, privilegeInfoTypePrivilegeIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrivilegeInfo) validatePrivilegeID(formats strfmt.Registry) error { - if swag.IsZero(m.PrivilegeID) { // not required - return nil - } - - // value enum - if err := m.validatePrivilegeIDEnum("PrivilegeId", "body", *m.PrivilegeID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this privilege info based on context it is used -func (m *PrivilegeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivilegeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivilegeInfo) UnmarshalBinary(b []byte) error { - var res PrivilegeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/product_model_interface_tuple.go b/v1/models/product_model_interface_tuple.go deleted file mode 100644 index 6b627159..00000000 --- a/v1/models/product_model_interface_tuple.go +++ /dev/null @@ -1,55 +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" -) - -// ProductModelInterfaceTuple Product model and interface tuple. -// -// Specifies a group of product model and interface set. -// -// swagger:model ProductModelInterfaceTuple -type ProductModelInterfaceTuple struct { - - // Specifies the name of the interface. - IfaceName *string `json:"ifaceName,omitempty"` - - // Specifies the product model name. - ProductModelName *string `json:"productModelName,omitempty"` -} - -// Validate validates this product model interface tuple -func (m *ProductModelInterfaceTuple) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this product model interface tuple based on context it is used -func (m *ProductModelInterfaceTuple) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProductModelInterfaceTuple) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProductModelInterfaceTuple) UnmarshalBinary(b []byte) error { - var res ProductModelInterfaceTuple - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/project.go b/v1/models/project.go deleted file mode 100644 index 540cb907..00000000 --- a/v1/models/project.go +++ /dev/null @@ -1,119 +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" -) - -// Project Keystone project proto. -// -// swagger:model Project -type Project struct { - - // Domain to which the project is scoped. - Domain *Domain `json:"domain,omitempty"` - - // The ID of the domain to which the project is scoped. This field is used in - // the reponse of Keystone API. - DomainID *string `json:"domainId,omitempty"` - - // The ID of the project. - ID *string `json:"id,omitempty"` - - // The name of the project. - Name *string `json:"name,omitempty"` -} - -// Validate validates this project -func (m *Project) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Project) validateDomain(formats strfmt.Registry) error { - if swag.IsZero(m.Domain) { // not required - return nil - } - - if m.Domain != nil { - if err := m.Domain.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -// ContextValidate validate this project based on the context it is used -func (m *Project) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Project) contextValidateDomain(ctx context.Context, formats strfmt.Registry) error { - - if m.Domain != nil { - - if swag.IsZero(m.Domain) { // not required - return nil - } - - if err := m.Domain.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domain") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Project) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Project) UnmarshalBinary(b []byte) error { - var res Project - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/properties.go b/v1/models/properties.go deleted file mode 100644 index 4b41ef7b..00000000 --- a/v1/models/properties.go +++ /dev/null @@ -1,355 +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" -) - -// Properties Defines the common Agent properties. These are shared with physical::Entity -// message as we stitch the data back for Iris. -// -// swagger:model Properties -type Properties struct { - - // Agent software version information. - AgentSwVersionStr *string `json:"agentSwVersionStr,omitempty"` - - // This identifies the type of the agent running on the host. - AgentType *int32 `json:"agentType,omitempty"` - - // Present when the Cristie BMR product is installed on the host. - CbmrInfo *CBMRInfo `json:"cbmrInfo,omitempty"` - - // This contains information about the FsCbt driver. - FileCbtInfo *PrivateCbtInfo `json:"fileCbtInfo,omitempty"` - - // This contains the host type where the agent is running. - // It is set for persistent agent only. - HostType *int32 `json:"hostType,omitempty"` - - // This identifies the Linux agent installer package type that was used - // during installation. This is helpful while agent upgrade operation. - LinuxPkgType *int32 `json:"linuxPkgType,omitempty"` - - // Machine Details - // This is the machine identifier as reported by baremetal BIOS or - // virtualization platform extension data. In case of VMWare guest, this will - // be reported by PowerCLI (Get-VM -Server - // $vcenter).extensiondata.config.uuid). Note that this identifier is not the - // result of 'Get-VM -Server $vcenter | %{(Get-View $_.Id).config.uuid}'. - MachineIdentifier *string `json:"machineIdentifier,omitempty"` - - // This is the UUID of the machine as reported by OS vendor. In Windows, its - // guid format string. If this is 'ffffffff-ffff-ffff-ffff-ffffffffffff', - // then machine vendor has not provided the UUID and it cannot be relied - // upon. Use 'machine_identifier' to identify the machine. - MachineUUID *string `json:"machineUuid,omitempty"` - - // This contains information about the Solaris agent packaging. - SolarisPkgType *int32 `json:"solarisPkgType,omitempty"` - - // Agent status. - Status *PropertiesStatus `json:"status,omitempty"` - - // Set to kUpgradable when the Agent software running on the physical server - // can be upgraded. Note, upgrades only work correctly when both the - // Cluster and the Agent are running production builds with correctly stamped - // version strings. - // E.g.: "3.5.1_release-20161231_14856c07". - Upgradability *int32 `json:"upgradability,omitempty"` - - // Error (if any) from the last upgrade attempt. - UpgradeError *PrivateErrorProto `json:"upgradeError,omitempty"` - - // Upgrade status of our Agent software. - UpgradeStatus *int32 `json:"upgradeStatus,omitempty"` - - // This contains information about the VolCbt driver. - VolCbtInfo *PrivateCbtInfo `json:"volCbtInfo,omitempty"` -} - -// Validate validates this properties -func (m *Properties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCbmrInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileCbtInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpgradeError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolCbtInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Properties) validateCbmrInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CbmrInfo) { // not required - return nil - } - - if m.CbmrInfo != nil { - if err := m.CbmrInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cbmrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cbmrInfo") - } - return err - } - } - - return nil -} - -func (m *Properties) validateFileCbtInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FileCbtInfo) { // not required - return nil - } - - if m.FileCbtInfo != nil { - if err := m.FileCbtInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCbtInfo") - } - return err - } - } - - return nil -} - -func (m *Properties) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *Properties) validateUpgradeError(formats strfmt.Registry) error { - if swag.IsZero(m.UpgradeError) { // not required - return nil - } - - if m.UpgradeError != nil { - if err := m.UpgradeError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upgradeError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upgradeError") - } - return err - } - } - - return nil -} - -func (m *Properties) validateVolCbtInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VolCbtInfo) { // not required - return nil - } - - if m.VolCbtInfo != nil { - if err := m.VolCbtInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volCbtInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this properties based on the context it is used -func (m *Properties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCbmrInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileCbtInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpgradeError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolCbtInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Properties) contextValidateCbmrInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CbmrInfo != nil { - - if swag.IsZero(m.CbmrInfo) { // not required - return nil - } - - if err := m.CbmrInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cbmrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cbmrInfo") - } - return err - } - } - - return nil -} - -func (m *Properties) contextValidateFileCbtInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FileCbtInfo != nil { - - if swag.IsZero(m.FileCbtInfo) { // not required - return nil - } - - if err := m.FileCbtInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCbtInfo") - } - return err - } - } - - return nil -} - -func (m *Properties) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *Properties) contextValidateUpgradeError(ctx context.Context, formats strfmt.Registry) error { - - if m.UpgradeError != nil { - - if swag.IsZero(m.UpgradeError) { // not required - return nil - } - - if err := m.UpgradeError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upgradeError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upgradeError") - } - return err - } - } - - return nil -} - -func (m *Properties) contextValidateVolCbtInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VolCbtInfo != nil { - - if swag.IsZero(m.VolCbtInfo) { // not required - return nil - } - - if err := m.VolCbtInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volCbtInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volCbtInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Properties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Properties) UnmarshalBinary(b []byte) error { - var res Properties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/properties_status.go b/v1/models/properties_status.go deleted file mode 100644 index 05e10f14..00000000 --- a/v1/models/properties_status.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" -) - -// PropertiesStatus properties status -// -// swagger:model Properties_Status -type PropertiesStatus struct { - - // This will contain any additional details regarding the status. - DetailMsg *string `json:"detailMsg,omitempty"` - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this properties status -func (m *PropertiesStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this properties status based on context it is used -func (m *PropertiesStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PropertiesStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PropertiesStatus) UnmarshalBinary(b []byte) error { - var res PropertiesStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protect_object_parameters.go b/v1/models/protect_object_parameters.go deleted file mode 100644 index 7c3d539d..00000000 --- a/v1/models/protect_object_parameters.go +++ /dev/null @@ -1,327 +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" -) - -// ProtectObjectParameters Protect Object Parameters -// -// Specifies the parameters to protect an object. -// -// swagger:model ProtectObjectParameters -type ProtectObjectParameters struct { - - // Specifies the environment type of the Protection Source object. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - ProtectionSourceEnvironment *string `json:"protectionSourceEnvironment,omitempty"` - - // Specifies the ids of the Protection Sources to protect. - // Required: true - ProtectionSourceIds []int64 `json:"protectionSourceIds"` - - // Specifies the Rpo policy id. - // Required: true - RpoPolicyID *string `json:"rpoPolicyId"` -} - -// Validate validates this protect object parameters -func (m *ProtectObjectParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionSourceEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSourceIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoPolicyID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectObjectParametersTypeProtectionSourceEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectObjectParametersTypeProtectionSourceEnvironmentPropEnum = append(protectObjectParametersTypeProtectionSourceEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectObjectParametersProtectionSourceEnvironmentKVMware captures enum value "kVMware" - ProtectObjectParametersProtectionSourceEnvironmentKVMware string = "kVMware" - - // ProtectObjectParametersProtectionSourceEnvironmentKHyperV captures enum value "kHyperV" - ProtectObjectParametersProtectionSourceEnvironmentKHyperV string = "kHyperV" - - // ProtectObjectParametersProtectionSourceEnvironmentKSQL captures enum value "kSQL" - ProtectObjectParametersProtectionSourceEnvironmentKSQL string = "kSQL" - - // ProtectObjectParametersProtectionSourceEnvironmentKView captures enum value "kView" - ProtectObjectParametersProtectionSourceEnvironmentKView string = "kView" - - // ProtectObjectParametersProtectionSourceEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectObjectParametersProtectionSourceEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectObjectParametersProtectionSourceEnvironmentKPhysical captures enum value "kPhysical" - ProtectObjectParametersProtectionSourceEnvironmentKPhysical string = "kPhysical" - - // ProtectObjectParametersProtectionSourceEnvironmentKPure captures enum value "kPure" - ProtectObjectParametersProtectionSourceEnvironmentKPure string = "kPure" - - // ProtectObjectParametersProtectionSourceEnvironmentKNimble captures enum value "kNimble" - ProtectObjectParametersProtectionSourceEnvironmentKNimble string = "kNimble" - - // ProtectObjectParametersProtectionSourceEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectObjectParametersProtectionSourceEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectObjectParametersProtectionSourceEnvironmentKAzure captures enum value "kAzure" - ProtectObjectParametersProtectionSourceEnvironmentKAzure string = "kAzure" - - // ProtectObjectParametersProtectionSourceEnvironmentKNetapp captures enum value "kNetapp" - ProtectObjectParametersProtectionSourceEnvironmentKNetapp string = "kNetapp" - - // ProtectObjectParametersProtectionSourceEnvironmentKAgent captures enum value "kAgent" - ProtectObjectParametersProtectionSourceEnvironmentKAgent string = "kAgent" - - // ProtectObjectParametersProtectionSourceEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectObjectParametersProtectionSourceEnvironmentKGenericNas string = "kGenericNas" - - // ProtectObjectParametersProtectionSourceEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectObjectParametersProtectionSourceEnvironmentKAcropolis string = "kAcropolis" - - // ProtectObjectParametersProtectionSourceEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectObjectParametersProtectionSourceEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectObjectParametersProtectionSourceEnvironmentKIsilon captures enum value "kIsilon" - ProtectObjectParametersProtectionSourceEnvironmentKIsilon string = "kIsilon" - - // ProtectObjectParametersProtectionSourceEnvironmentKGPFS captures enum value "kGPFS" - ProtectObjectParametersProtectionSourceEnvironmentKGPFS string = "kGPFS" - - // ProtectObjectParametersProtectionSourceEnvironmentKKVM captures enum value "kKVM" - ProtectObjectParametersProtectionSourceEnvironmentKKVM string = "kKVM" - - // ProtectObjectParametersProtectionSourceEnvironmentKAWS captures enum value "kAWS" - ProtectObjectParametersProtectionSourceEnvironmentKAWS string = "kAWS" - - // ProtectObjectParametersProtectionSourceEnvironmentKExchange captures enum value "kExchange" - ProtectObjectParametersProtectionSourceEnvironmentKExchange string = "kExchange" - - // ProtectObjectParametersProtectionSourceEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectObjectParametersProtectionSourceEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectObjectParametersProtectionSourceEnvironmentKOracle captures enum value "kOracle" - ProtectObjectParametersProtectionSourceEnvironmentKOracle string = "kOracle" - - // ProtectObjectParametersProtectionSourceEnvironmentKGCP captures enum value "kGCP" - ProtectObjectParametersProtectionSourceEnvironmentKGCP string = "kGCP" - - // ProtectObjectParametersProtectionSourceEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectObjectParametersProtectionSourceEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectObjectParametersProtectionSourceEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectObjectParametersProtectionSourceEnvironmentKAWSNative string = "kAWSNative" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365 captures enum value "kO365" - ProtectObjectParametersProtectionSourceEnvironmentKO365 string = "kO365" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectObjectParametersProtectionSourceEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectObjectParametersProtectionSourceEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectObjectParametersProtectionSourceEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectObjectParametersProtectionSourceEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectObjectParametersProtectionSourceEnvironmentKGCPNative string = "kGCPNative" - - // ProtectObjectParametersProtectionSourceEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectObjectParametersProtectionSourceEnvironmentKAzureNative string = "kAzureNative" - - // ProtectObjectParametersProtectionSourceEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectObjectParametersProtectionSourceEnvironmentKKubernetes string = "kKubernetes" - - // ProtectObjectParametersProtectionSourceEnvironmentKElastifile captures enum value "kElastifile" - ProtectObjectParametersProtectionSourceEnvironmentKElastifile string = "kElastifile" - - // ProtectObjectParametersProtectionSourceEnvironmentKAD captures enum value "kAD" - ProtectObjectParametersProtectionSourceEnvironmentKAD string = "kAD" - - // ProtectObjectParametersProtectionSourceEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectObjectParametersProtectionSourceEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectObjectParametersProtectionSourceEnvironmentKCassandra captures enum value "kCassandra" - ProtectObjectParametersProtectionSourceEnvironmentKCassandra string = "kCassandra" - - // ProtectObjectParametersProtectionSourceEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectObjectParametersProtectionSourceEnvironmentKMongoDB string = "kMongoDB" - - // ProtectObjectParametersProtectionSourceEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectObjectParametersProtectionSourceEnvironmentKCouchbase string = "kCouchbase" - - // ProtectObjectParametersProtectionSourceEnvironmentKHdfs captures enum value "kHdfs" - ProtectObjectParametersProtectionSourceEnvironmentKHdfs string = "kHdfs" - - // ProtectObjectParametersProtectionSourceEnvironmentKHive captures enum value "kHive" - ProtectObjectParametersProtectionSourceEnvironmentKHive string = "kHive" - - // ProtectObjectParametersProtectionSourceEnvironmentKHBase captures enum value "kHBase" - ProtectObjectParametersProtectionSourceEnvironmentKHBase string = "kHBase" - - // ProtectObjectParametersProtectionSourceEnvironmentKUDA captures enum value "kUDA" - ProtectObjectParametersProtectionSourceEnvironmentKUDA string = "kUDA" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectObjectParametersProtectionSourceEnvironmentKO365Teams string = "kO365Teams" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365Group captures enum value "kO365Group" - ProtectObjectParametersProtectionSourceEnvironmentKO365Group string = "kO365Group" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectObjectParametersProtectionSourceEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectObjectParametersProtectionSourceEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectObjectParametersProtectionSourceEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectObjectParametersProtectionSourceEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectObjectParametersProtectionSourceEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectObjectParameters) validateProtectionSourceEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectObjectParametersTypeProtectionSourceEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectObjectParameters) validateProtectionSourceEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSourceEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateProtectionSourceEnvironmentEnum("protectionSourceEnvironment", "body", *m.ProtectionSourceEnvironment); err != nil { - return err - } - - return nil -} - -func (m *ProtectObjectParameters) validateProtectionSourceIds(formats strfmt.Registry) error { - - if err := validate.Required("protectionSourceIds", "body", m.ProtectionSourceIds); err != nil { - return err - } - - return nil -} - -func (m *ProtectObjectParameters) validateRpoPolicyID(formats strfmt.Registry) error { - - if err := validate.Required("rpoPolicyId", "body", m.RpoPolicyID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protect object parameters based on context it is used -func (m *ProtectObjectParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectObjectParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectObjectParameters) UnmarshalBinary(b []byte) error { - var res ProtectObjectParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_object.go b/v1/models/protected_object.go deleted file mode 100644 index 85e4b2a5..00000000 --- a/v1/models/protected_object.go +++ /dev/null @@ -1,118 +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" -) - -// ProtectedObject Protected Object. -// -// Provides details about a Protected Object. -// -// swagger:model ProtectedObject -type ProtectedObject struct { - - // Specifies the id of the jobs protecting this Protection Source. - JobID *UniversalID `json:"jobId,omitempty"` - - // If protection fails then specifies why the protection failed on this - // object. - ProtectionFauilureReason *string `json:"protectionFauilureReason,omitempty"` - - // Specifies the id of the Protection Source. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` -} - -// Validate validates this protected object -func (m *ProtectedObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObject) validateJobID(formats strfmt.Registry) error { - if swag.IsZero(m.JobID) { // not required - return nil - } - - if m.JobID != nil { - if err := m.JobID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protected object based on the context it is used -func (m *ProtectedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObject) contextValidateJobID(ctx context.Context, formats strfmt.Registry) error { - - if m.JobID != nil { - - if swag.IsZero(m.JobID) { // not required - return nil - } - - if err := m.JobID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObject) UnmarshalBinary(b []byte) error { - var res ProtectedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_object_privileges.go b/v1/models/protected_object_privileges.go deleted file mode 100644 index e356aeae..00000000 --- a/v1/models/protected_object_privileges.go +++ /dev/null @@ -1,121 +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" -) - -// ProtectedObjectPrivileges Protected objects privileges. -// -// ProtectedObjectPrivileges specifies which protected objects are allowed to -// be accessed by an app instance. -// -// swagger:model ProtectedObjectPrivileges -type ProtectedObjectPrivileges struct { - - // Specifies if all, none or specific protected objects are allowed to be - // accessed. - // Specifies if all, none or specific protected objects are allowed to be - // accessed. - // kNone - None of the protected objects have access. - // kAll - All the protected objects have access. - // kSpecific - Only specific protected objects have access. - // Enum: ["kNone","kAll","kSpecific"] - ProtectedObjectsprivilegesType *string `json:"protectedObjectsprivilegesType,omitempty"` - - // Specifies the ids of the protection sources which are allowed to be - // accessed in case the privilege type is kSpecific. - ProtectionSourceIds []int64 `json:"protectionSourceIds"` -} - -// Validate validates this protected object privileges -func (m *ProtectedObjectPrivileges) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectedObjectsprivilegesType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectedObjectPrivilegesTypeProtectedObjectsprivilegesTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kAll","kSpecific"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectedObjectPrivilegesTypeProtectedObjectsprivilegesTypePropEnum = append(protectedObjectPrivilegesTypeProtectedObjectsprivilegesTypePropEnum, v) - } -} - -const ( - - // ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKNone captures enum value "kNone" - ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKNone string = "kNone" - - // ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKAll captures enum value "kAll" - ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKAll string = "kAll" - - // ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKSpecific captures enum value "kSpecific" - ProtectedObjectPrivilegesProtectedObjectsprivilegesTypeKSpecific string = "kSpecific" -) - -// prop value enum -func (m *ProtectedObjectPrivileges) validateProtectedObjectsprivilegesTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectedObjectPrivilegesTypeProtectedObjectsprivilegesTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectedObjectPrivileges) validateProtectedObjectsprivilegesType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedObjectsprivilegesType) { // not required - return nil - } - - // value enum - if err := m.validateProtectedObjectsprivilegesTypeEnum("protectedObjectsprivilegesType", "body", *m.ProtectedObjectsprivilegesType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protected object privileges based on context it is used -func (m *ProtectedObjectPrivileges) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectPrivileges) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectPrivileges) UnmarshalBinary(b []byte) error { - var res ProtectedObjectPrivileges - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_objects_by_env.go b/v1/models/protected_objects_by_env.go deleted file mode 100644 index 735e7a9f..00000000 --- a/v1/models/protected_objects_by_env.go +++ /dev/null @@ -1,64 +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" -) - -// ProtectedObjectsByEnv Protected Objects By Enviournment. -// -// Number of Protected Objects by Type. -// -// swagger:model ProtectedObjectsByEnv -type ProtectedObjectsByEnv struct { - - // Environment Type. - EnvType *string `json:"envType,omitempty"` - - // Number of Protected Objects. - ProtectedCount *int32 `json:"protectedCount,omitempty"` - - // Size of Protected Objects. - ProtectedSizeBytes *int64 `json:"protectedSizeBytes,omitempty"` - - // Number of Unprotected Objects. - UnprotectedCount *int32 `json:"unprotectedCount,omitempty"` - - // Size of Unprotected Objects. - UnprotectedSizeBytes *int64 `json:"unprotectedSizeBytes,omitempty"` -} - -// Validate validates this protected objects by env -func (m *ProtectedObjectsByEnv) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protected objects by env based on context it is used -func (m *ProtectedObjectsByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsByEnv) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_objects_summary.go b/v1/models/protected_objects_summary.go deleted file mode 100644 index e6851f54..00000000 --- a/v1/models/protected_objects_summary.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObjectsSummary Protected Objects Summary. -// -// Specifies the statistics of the protected objects on the cluster. -// -// swagger:model ProtectedObjectsSummary -type ProtectedObjectsSummary struct { - - // Specifies the total number of protected objects. - NumObjectsProtected *int64 `json:"numObjectsProtected,omitempty"` - - // Specifies the total number of unprotected objects. - NumObjectsUnprotected *int64 `json:"numObjectsUnprotected,omitempty"` - - // Specifies the total size of protected objects in bytes. - ProtectedSizeBytes *int64 `json:"protectedSizeBytes,omitempty"` - - // Specifies the stats of Protected objects by environment. - StatsByEnv []*ProtectedObjectsSummaryByEnv `json:"statsByEnv"` - - // Specifies the total size of unprotected objects in bytes. - UnprotectedSizeBytes *int64 `json:"unprotectedSizeBytes,omitempty"` -} - -// Validate validates this protected objects summary -func (m *ProtectedObjectsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsByEnv(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSummary) validateStatsByEnv(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnv) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnv); i++ { - if swag.IsZero(m.StatsByEnv[i]) { // not required - continue - } - - if m.StatsByEnv[i] != nil { - if err := m.StatsByEnv[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected objects summary based on the context it is used -func (m *ProtectedObjectsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsByEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSummary) contextValidateStatsByEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnv); i++ { - - if m.StatsByEnv[i] != nil { - - if swag.IsZero(m.StatsByEnv[i]) { // not required - return nil - } - - if err := m.StatsByEnv[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsSummary) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_objects_summary_by_env.go b/v1/models/protected_objects_summary_by_env.go deleted file mode 100644 index 273b3171..00000000 --- a/v1/models/protected_objects_summary_by_env.go +++ /dev/null @@ -1,209 +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" -) - -// ProtectedObjectsSummaryByEnv Protected Object Summary by Environment. -// -// Specifies the protection summary of given environment type. -// -// swagger:model ProtectedObjectsSummaryByEnv -type ProtectedObjectsSummaryByEnv struct { - - // Specifies the environment. - // Enum: ["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"] - Environment *string `json:"environment,omitempty"` - - // Specifies the total number of protected objects. - NumObjectsProtected *int64 `json:"numObjectsProtected,omitempty"` - - // Specifies the total number of unprotected objects. - NumObjectsUnprotected *int64 `json:"numObjectsUnprotected,omitempty"` - - // Specifies the total size of protected objects in bytes. - ProtectedSizeBytes *int64 `json:"protectedSizeBytes,omitempty"` - - // Specifies the total size of unprotected objects in bytes. - UnprotectedSizeBytes *int64 `json:"unprotectedSizeBytes,omitempty"` -} - -// Validate validates this protected objects summary by env -func (m *ProtectedObjectsSummaryByEnv) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectedObjectsSummaryByEnvTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectedObjectsSummaryByEnvTypeEnvironmentPropEnum = append(protectedObjectsSummaryByEnvTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectedObjectsSummaryByEnvEnvironmentKVMware captures enum value "kVMware" - ProtectedObjectsSummaryByEnvEnvironmentKVMware string = "kVMware" - - // ProtectedObjectsSummaryByEnvEnvironmentKHyperV captures enum value "kHyperV" - ProtectedObjectsSummaryByEnvEnvironmentKHyperV string = "kHyperV" - - // ProtectedObjectsSummaryByEnvEnvironmentKSQL captures enum value "kSQL" - ProtectedObjectsSummaryByEnvEnvironmentKSQL string = "kSQL" - - // ProtectedObjectsSummaryByEnvEnvironmentKView captures enum value "kView" - ProtectedObjectsSummaryByEnvEnvironmentKView string = "kView" - - // ProtectedObjectsSummaryByEnvEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectedObjectsSummaryByEnvEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectedObjectsSummaryByEnvEnvironmentKPhysical captures enum value "kPhysical" - ProtectedObjectsSummaryByEnvEnvironmentKPhysical string = "kPhysical" - - // ProtectedObjectsSummaryByEnvEnvironmentKPure captures enum value "kPure" - ProtectedObjectsSummaryByEnvEnvironmentKPure string = "kPure" - - // ProtectedObjectsSummaryByEnvEnvironmentKNimble captures enum value "kNimble" - ProtectedObjectsSummaryByEnvEnvironmentKNimble string = "kNimble" - - // ProtectedObjectsSummaryByEnvEnvironmentKAzure captures enum value "kAzure" - ProtectedObjectsSummaryByEnvEnvironmentKAzure string = "kAzure" - - // ProtectedObjectsSummaryByEnvEnvironmentKNetapp captures enum value "kNetapp" - ProtectedObjectsSummaryByEnvEnvironmentKNetapp string = "kNetapp" - - // ProtectedObjectsSummaryByEnvEnvironmentKAgent captures enum value "kAgent" - ProtectedObjectsSummaryByEnvEnvironmentKAgent string = "kAgent" - - // ProtectedObjectsSummaryByEnvEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectedObjectsSummaryByEnvEnvironmentKGenericNas string = "kGenericNas" - - // ProtectedObjectsSummaryByEnvEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectedObjectsSummaryByEnvEnvironmentKAcropolis string = "kAcropolis" - - // ProtectedObjectsSummaryByEnvEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectedObjectsSummaryByEnvEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectedObjectsSummaryByEnvEnvironmentKIsilon captures enum value "kIsilon" - ProtectedObjectsSummaryByEnvEnvironmentKIsilon string = "kIsilon" - - // ProtectedObjectsSummaryByEnvEnvironmentKGPFS captures enum value "kGPFS" - ProtectedObjectsSummaryByEnvEnvironmentKGPFS string = "kGPFS" - - // ProtectedObjectsSummaryByEnvEnvironmentKKVM captures enum value "kKVM" - ProtectedObjectsSummaryByEnvEnvironmentKKVM string = "kKVM" - - // ProtectedObjectsSummaryByEnvEnvironmentKAWS captures enum value "kAWS" - ProtectedObjectsSummaryByEnvEnvironmentKAWS string = "kAWS" - - // ProtectedObjectsSummaryByEnvEnvironmentKExchange captures enum value "kExchange" - ProtectedObjectsSummaryByEnvEnvironmentKExchange string = "kExchange" - - // ProtectedObjectsSummaryByEnvEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectedObjectsSummaryByEnvEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectedObjectsSummaryByEnvEnvironmentKOracle captures enum value "kOracle" - ProtectedObjectsSummaryByEnvEnvironmentKOracle string = "kOracle" - - // ProtectedObjectsSummaryByEnvEnvironmentKGCP captures enum value "kGCP" - ProtectedObjectsSummaryByEnvEnvironmentKGCP string = "kGCP" - - // ProtectedObjectsSummaryByEnvEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectedObjectsSummaryByEnvEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectedObjectsSummaryByEnvEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectedObjectsSummaryByEnvEnvironmentKAWSNative string = "kAWSNative" - - // ProtectedObjectsSummaryByEnvEnvironmentKVCD captures enum value "kVCD" - ProtectedObjectsSummaryByEnvEnvironmentKVCD string = "kVCD" - - // ProtectedObjectsSummaryByEnvEnvironmentKO365 captures enum value "kO365" - ProtectedObjectsSummaryByEnvEnvironmentKO365 string = "kO365" - - // ProtectedObjectsSummaryByEnvEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectedObjectsSummaryByEnvEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectedObjectsSummaryByEnvEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectedObjectsSummaryByEnvEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectedObjectsSummaryByEnvEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectedObjectsSummaryByEnvEnvironmentKGCPNative string = "kGCPNative" - - // ProtectedObjectsSummaryByEnvEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectedObjectsSummaryByEnvEnvironmentKAzureNative string = "kAzureNative" - - // ProtectedObjectsSummaryByEnvEnvironmentKAD captures enum value "kAD" - ProtectedObjectsSummaryByEnvEnvironmentKAD string = "kAD" - - // ProtectedObjectsSummaryByEnvEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ProtectedObjectsSummaryByEnvEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" -) - -// prop value enum -func (m *ProtectedObjectsSummaryByEnv) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectedObjectsSummaryByEnvTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectedObjectsSummaryByEnv) 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 validates this protected objects summary by env based on context it is used -func (m *ProtectedObjectsSummaryByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsSummaryByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsSummaryByEnv) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsSummaryByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_objects_tile.go b/v1/models/protected_objects_tile.go deleted file mode 100644 index cad1bd12..00000000 --- a/v1/models/protected_objects_tile.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObjectsTile Protected Objects Tile. -// -// Protected Objects information. -// -// swagger:model ProtectedObjectsTile -type ProtectedObjectsTile struct { - - // Protected Objects breakdown by object type. - ObjectsProtected []*ProtectedObjectsByEnv `json:"objectsProtected"` - - // Number of Protected Objects. - ProtectedCount *int32 `json:"protectedCount,omitempty"` - - // Size of Protected Objects. - ProtectedSizeBytes *int64 `json:"protectedSizeBytes,omitempty"` - - // Number of Unprotected Objects. - UnprotectedCount *int32 `json:"unprotectedCount,omitempty"` - - // Size of Unprotected Objects. - UnprotectedSizeBytes *int64 `json:"unprotectedSizeBytes,omitempty"` -} - -// Validate validates this protected objects tile -func (m *ProtectedObjectsTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectsProtected(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsTile) validateObjectsProtected(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectsProtected) { // not required - return nil - } - - for i := 0; i < len(m.ObjectsProtected); i++ { - if swag.IsZero(m.ObjectsProtected[i]) { // not required - continue - } - - if m.ObjectsProtected[i] != nil { - if err := m.ObjectsProtected[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected objects tile based on the context it is used -func (m *ProtectedObjectsTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectsProtected(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsTile) contextValidateObjectsProtected(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectsProtected); i++ { - - if m.ObjectsProtected[i] != nil { - - if swag.IsZero(m.ObjectsProtected[i]) { // not required - return nil - } - - if err := m.ObjectsProtected[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectsProtected" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsTile) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_source_summary.go b/v1/models/protected_source_summary.go deleted file mode 100644 index b0e99d70..00000000 --- a/v1/models/protected_source_summary.go +++ /dev/null @@ -1,348 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedSourceSummary ProtectedSourceSummary is the summary of all the Protection Runs for the -// Protection Jobs using the Specified Protection Policy. This is only -// populated for a policy of type kRPO. -// -// swagger:model ProtectedSourceSummary -type ProtectedSourceSummary struct { - - // Specifies details about the last Backup task. - // A Backup task captures the original backup snapshots. - BackupRun *BackupRun `json:"backupRun,omitempty"` - - // Specifies details about the Copy tasks of the Job Run. - // A Copy task copies the captured snapshots to an external target - // or a Remote Cohesity Cluster. - CopyRuns []*CopyRun `json:"copyRuns"` - - // Specifies the status of the backup job. - IsPaused *bool `json:"isPaused,omitempty"` - - // Specifies the time at which the next Protection Run is scheduled for the - // given Protection Source in Unix epoch Time (microseconds). - NextProtectionRunTimeUsecs *int64 `json:"nextProtectionRunTimeUsecs,omitempty"` - - // Specifies the globally unique id of the Protected Source. - ProtectedSourceUID *UniversalID `json:"protectedSourceUid,omitempty"` - - // Specifies the Protection Source summary information. - ProtectionSource *ProtectionSource `json:"protectionSource,omitempty"` - - // Specifies additional special settings for a single Protected Source. - SourceParameters []*SourceSpecialParameter `json:"sourceParameters"` -} - -// Validate validates this protected source summary -func (m *ProtectedSourceSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedSourceUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedSourceSummary) validateBackupRun(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if m.BackupRun != nil { - if err := m.BackupRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectedSourceSummary) validateCopyRuns(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRuns) { // not required - return nil - } - - for i := 0; i < len(m.CopyRuns); i++ { - if swag.IsZero(m.CopyRuns[i]) { // not required - continue - } - - if m.CopyRuns[i] != nil { - if err := m.CopyRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedSourceSummary) validateProtectedSourceUID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedSourceUID) { // not required - return nil - } - - if m.ProtectedSourceUID != nil { - if err := m.ProtectedSourceUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourceUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourceUid") - } - return err - } - } - - return nil -} - -func (m *ProtectedSourceSummary) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectedSourceSummary) validateSourceParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SourceParameters) { // not required - return nil - } - - for i := 0; i < len(m.SourceParameters); i++ { - if swag.IsZero(m.SourceParameters[i]) { // not required - continue - } - - if m.SourceParameters[i] != nil { - if err := m.SourceParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected source summary based on the context it is used -func (m *ProtectedSourceSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedSourceUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedSourceSummary) contextValidateBackupRun(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupRun != nil { - - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if err := m.BackupRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectedSourceSummary) contextValidateCopyRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyRuns); i++ { - - if m.CopyRuns[i] != nil { - - if swag.IsZero(m.CopyRuns[i]) { // not required - return nil - } - - if err := m.CopyRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedSourceSummary) contextValidateProtectedSourceUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectedSourceUID != nil { - - if swag.IsZero(m.ProtectedSourceUID) { // not required - return nil - } - - if err := m.ProtectedSourceUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourceUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourceUid") - } - return err - } - } - - return nil -} - -func (m *ProtectedSourceSummary) 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 *ProtectedSourceSummary) contextValidateSourceParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceParameters); i++ { - - if m.SourceParameters[i] != nil { - - if swag.IsZero(m.SourceParameters[i]) { // not required - return nil - } - - if err := m.SourceParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedSourceSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedSourceSummary) UnmarshalBinary(b []byte) error { - var res ProtectedSourceSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protected_vm_info.go b/v1/models/protected_vm_info.go deleted file mode 100644 index 09bed3cd..00000000 --- a/v1/models/protected_vm_info.go +++ /dev/null @@ -1,287 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedVMInfo Protected VM Information. -// -// Specifies the Protection Jobs information of a VM. -// -// swagger:model ProtectedVmInfo -type ProtectedVMInfo struct { - - // Specifies the list of Protection Jobs that protect the VM. - ProtectionJobs []*ProtectionJob `json:"protectionJobs"` - - // Specifies the list of Policies that are used by the Protection Jobs. - ProtectionPolicies []*ProtectionPolicy `json:"protectionPolicies"` - - // Specifies a VM that is being protected on the Cohesity Cluster. - ProtectionSource *ProtectionSource `json:"protectionSource,omitempty"` - - // stats - Stats *ProtectedVMInfoStats `json:"stats,omitempty"` -} - -// Validate validates this protected Vm info -func (m *ProtectedVMInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionJobs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedVMInfo) validateProtectionJobs(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobs) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobs); i++ { - if swag.IsZero(m.ProtectionJobs[i]) { // not required - continue - } - - if m.ProtectionJobs[i] != nil { - if err := m.ProtectionJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedVMInfo) validateProtectionPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionPolicies) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionPolicies); i++ { - if swag.IsZero(m.ProtectionPolicies[i]) { // not required - continue - } - - if m.ProtectionPolicies[i] != nil { - if err := m.ProtectionPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedVMInfo) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectedVMInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this protected Vm info based on the context it is used -func (m *ProtectedVMInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedVMInfo) contextValidateProtectionJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobs); i++ { - - if m.ProtectionJobs[i] != nil { - - if swag.IsZero(m.ProtectionJobs[i]) { // not required - return nil - } - - if err := m.ProtectionJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedVMInfo) contextValidateProtectionPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionPolicies); i++ { - - if m.ProtectionPolicies[i] != nil { - - if swag.IsZero(m.ProtectionPolicies[i]) { // not required - return nil - } - - if err := m.ProtectionPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedVMInfo) 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 *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 -} - -// MarshalBinary interface implementation -func (m *ProtectedVMInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedVMInfo) UnmarshalBinary(b []byte) error { - var res ProtectedVMInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_info.go b/v1/models/protection_info.go deleted file mode 100644 index 39219aca..00000000 --- a/v1/models/protection_info.go +++ /dev/null @@ -1,76 +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" -) - -// ProtectionInfo Protection Information. -// -// dataLocation defines data location related information. -// -// swagger:model ProtectionInfo -type ProtectionInfo struct { - - // Specifies the end time for object retention. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the location of the object. - Location *string `json:"location,omitempty"` - - // Specifies the id of the policy. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the id of the protection job. - ProtectionJobID *int64 `json:"protectionJobId,omitempty"` - - // Specifies the protection job name which protects this object. - ProtectionJobName *string `json:"protectionJobName,omitempty"` - - // Specifies the retention period. - RetentionPeriod *int64 `json:"retentionPeriod,omitempty"` - - // Specifies the start time for object retention. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the storage domain name. - StorageDomain *string `json:"storageDomain,omitempty"` - - // Specifies the total number of snapshots. - TotalSnapshots *int64 `json:"totalSnapshots,omitempty"` -} - -// Validate validates this protection info -func (m *ProtectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection info based on context it is used -func (m *ProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionInfo) UnmarshalBinary(b []byte) error { - var res ProtectionInfo - 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 deleted file mode 100644 index 0720b2c1..00000000 --- a/v1/models/protection_job.go +++ /dev/null @@ -1,1841 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionJob Protection Job. -// -// Provides details about a Protection Job. -// -// swagger:model ProtectionJob -type ProtectionJob struct { - - // If true, the Cohesity Cluster aborts any currently executing Job Runs - // of this Protection Job when a QuietTime period specified for this Job - // starts, even if the Job Run started before the QuietTime - // period began. - // If false, a Job Run continues to execute, if the Job Run started before - // the QuietTime period starts. - AbortInBlackoutPeriod *bool `json:"abortInBlackoutPeriod,omitempty"` - - // Alerting configuration can be used to specify optional details for the - // alerts triggered by this job. - AlertingConfig *AlertingConfig `json:"alertingConfig,omitempty"` - - // Array of Job Events. - // - // During Job Runs, the following Job Events are generated: - // 1) Job succeeds 2) Job fails - // 3) Job violates the SLA - // These Job Events can cause Alerts to be generated. - // 'kSuccess' means the Protection Job succeeded. - // 'kFailure' means the Protection Job failed. - // 'kSlaViolation' means the Protection Job took longer than the time period - // specified in the SLA. - AlertingPolicy []string `json:"alertingPolicy"` - - // If this fiels is set to true, then we wil allow parallel runs for the job - // for the adapters which support parallel runs. - AllowParallelRuns *bool `json:"allowParallelRuns,omitempty"` - - // Specifies Cloud specific parameters applicable in various scenarios. - CloudParameters *CloudParameters `json:"cloudParameters,omitempty"` - - // Whether to continue backing up on quiesce failure. - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // Specifies whether to create a remote view name to use for view overwrite. - // This field is deprecated. Remote view names will automatically be used - // for all view jobs with replication policy. Use RemoteViewConfigList to - // setup remote view names. - // deprecated: true - CreateRemoteView *bool `json:"createRemoteView,omitempty"` - - // Specifies the time when the Protection Job was created. - CreationTimeUsecs *int64 `json:"creationTimeUsecs,omitempty"` - - // Specifies policy for a data migration job. It contains inline schedule to - // run the data migration job. In addition to this, it also contains - // retention policy that should be applied to files after they have been - // moved to cohesity cluster. It is present only in case data migration job. - DataMigrationPolicy *DataMigrationPolicy `json:"dataMigrationPolicy,omitempty"` - - // List of source ids for which source side dedup is disabled from the backup - // job. - DedupDisabledSourceIds []int64 `json:"dedupDisabledSourceIds"` - - // Specifies a text description about the Protection Job. - Description *string `json:"description,omitempty"` - - // Specifies the epoch time (in microseconds) after which the Protection Job - // becomes dormant. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the environment type (such as kVMware or kSQL) - // of the Protection Source this Job is protecting. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies additional settings that are applicable to all Sources in - // the Protection Job that are of specified environment type. For example, - // you can specify to exclude a disk from backup for all 'kVMware' - // Protection Sources in the Protection Job. If a setting conflicts with - // sourceSpecialParameters, then sourceSpecialParameters will be used. - EnvironmentParameters *EnvironmentTypeJobParameters `json:"environmentParameters,omitempty"` - - // Array of arrays of label IDs that specify labels to - // exclude. Optionally specify a list of labels to exclude from - // protecting by listing protection source ids of labels in this two - // dimensional array. Using this two dimensional array of label IDs, the - // Cluster generates a list of namespaces to exclude from protecting, - // which are derived from intersections of the inner arrays - // and union of the outer array. - ExcludeLabelIds [][]int64 `json:"excludeLabelIds"` - - // Array of Excluded Source Objects. - // - // List of Object ids from a Protection Source that should not be - // protected and are excluded from being backed up by the Protection Job. - // Leaf and non-leaf Objects may be in this list and an Object in this list - // must have an ancestor in the sourceId list. - ExcludeSourceIds []int64 `json:"excludeSourceIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. - // - // Optionally specify a list of VMs to exclude from protecting by listing - // Protection Source ids of VM Tags in this two dimensional array. - // Using this two dimensional array of Tag ids, the Cluster - // generates a list of VMs to exclude from protecting, - // which are derived from intersections of the inner arrays - // and union of the outer array, as shown by the following example. - // For example a Datacenter is selected to be protected but you want to - // exclude all the 'Former Employees' VMs in the East and West but - // keep all the VMs for 'Former Employees' in the South which are - // also stored in this Datacenter, by specifying the - // following tag id array: - // [ [1000, 2221], [1000, 3031] ], - // where 1000 is the 'Former Employee' VM Tag id, - // 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. - // The first inner array [1000, 2221] produces a list of VMs that are - // both tagged with 'Former Employees' and 'East' (an intersection). - // The second inner array [1000, 3031] produces a list of VMs that are both - // tagged with 'Former Employees' and 'West' (an intersection). - // The outer array combines the list of VMs from the two inner - // arrays. The list of resulting VMs are excluded from being protected - // this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // If specified, this setting is number of minutes that a Job Run - // of a Full (no CBT) backup schedule is expected to complete, which is - // known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - FullProtectionSLATimeMins *int64 `json:"fullProtectionSlaTimeMins,omitempty"` - - // full protection start time - FullProtectionStartTime *ProtectionJobFullProtectionStartTime `json:"fullProtectionStartTime,omitempty"` - - // Specifies an id for the Protection Job. - ID *int64 `json:"id,omitempty"` - - // Specifies the errors which we can ignore from showing to the user. - IgnorableErrorsInErrorDb []int32 `json:"ignorableErrorsInErrorDb"` - - // If specified, this setting is number of minutes that a Job Run - // of a CBT-based backup schedule is expected to complete, which - // is known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - IncrementalProtectionSLATimeMins *int64 `json:"incrementalProtectionSlaTimeMins,omitempty"` - - // incremental protection start time - IncrementalProtectionStartTime *ProtectionJobIncrementalProtectionStartTime `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. - // In addition, it specifies inclusion and exclusion rules that determine - // the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Indicates if the current state of the Protection Job is Active - // or Inactive. - // When you create a Protection Job on a Primary Cluster - // with a replication schedule, the Cohesity Cluster creates an - // Inactive copy of the Job on the Remote Cluster. - // In addition, when an Active and running Job is deactivated, - // the Job becomes Inactive. - IsActive *bool `json:"isActive,omitempty"` - - // Equals 'true' if the Protection Job was deleted but some Snapshots - // are still associated with this Job. If 'true', no new Job Runs are started - // by this Protection Job. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // Specifies if this is a direct archive backup job. - IsDirectArchiveEnabled *bool `json:"isDirectArchiveEnabled,omitempty"` - - // Specifies if native format should be used for archiving, applicable for - // only direct archive jobs. - IsNativeFormat *bool `json:"isNativeFormat,omitempty"` - - // Indicates if the Protection Job is paused, which means that no new - // Job Runs are started but any existing Job Runs continue to - // execute. - IsPaused *bool `json:"isPaused,omitempty"` - - // Array of array of label IDs that specify labels to protect. - // Optionally specify a list of labels to protect by listing - // protection source ids of labels in this two dimensional array. - // Using this two dimensional array of label IDs, the cluster - // generates a list of namespaces to protect, which are derived from - // intersections of the inner arrays and union of the outer array. - LabelIds [][]int64 `json:"labelIds"` - - // Specifies the last run of the Protection Job if any. - // This field is set only if it was requested. - LastRun *ProtectionRunInstance `json:"lastRun,omitempty"` - - // Specifies whether to leverage nutanix API to take snapshots for this - // backup job. To leverage nutanix snapshot a prism endpoint on which the - // vcenter is registered as a management server has to be registered as a - // source. If nutanix snapshot can not be taken, job will fall back to - // default mode. - LeverageNutanixSnapshots *bool `json:"leverageNutanixSnapshots,omitempty"` - - // If this field is set to true, then the backup for the objects will be - // performed using dedicated storage area network (SAN) instead of LAN or - // managment network. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Specifies whether to leverage the storage array based snapshots for this - // backup job. To leverage storage snapshots, the storage array has to be - // registered as a source. If storage based snapshots can not be taken, job - // will fallback to the default backup method. - LeverageStorageSnapshots *bool `json:"leverageStorageSnapshots,omitempty"` - - // Specifies whether to leverage Hyperflex as the storage snapshot array - LeverageStorageSnapshotsForHyperflex *bool `json:"leverageStorageSnapshotsForHyperflex,omitempty"` - - // If specified, this setting is number of minutes that a Job Run - // of a Log backup schedule is expected to complete, which is - // known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - LogProtectionSLATimeMins *int64 `json:"logProtectionSlaTimeMins,omitempty"` - - // Specifies Information about missing entities. - MissingEntities []*ProtectionSource `json:"missingEntities"` - - // Specifies the last time this Job was updated. If this is - // passed into a PUT request, then the backend will validate that the - // timestamp passed in matches the time that the protection group was - // actually last modified. If the two timestamps do not match, then the - // request will be rejected with a stale error. - ModificationTimeUsecs *int64 `json:"modificationTimeUsecs,omitempty"` - - // Specifies the last Cohesity user who updated this Job. - ModifiedByUser *string `json:"modifiedByUser,omitempty"` - - // Specifies the name of the Protection Job. - // Required: true - Name *string `json:"name"` - - // Specifies the id of the registered Protection Source that is the - // parent of the Objects that may be protected by this Job. - // For example when a vCenter Server is registered on a Cohesity Cluster, - // the Cohesity Cluster assigns a unique id to this field that represents - // the vCenter Server. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies whether brick based dedupe should be performed or not. - PerformBrickBasedDedup *bool `json:"performBrickBasedDedup,omitempty"` - - // Specifies whether source side dedupe should be performed or not. - PerformSourceSideDedup *bool `json:"performSourceSideDedup,omitempty"` - - // Specifies the epoch time (in milliseconds) when the - // associated Policy was last applied to this Job. - // This is used to determine if the Policy has changed since it - // was last applied to this Job. - PolicyAppliedTimeMsecs *int64 `json:"policyAppliedTimeMsecs,omitempty"` - - // Specifies the unique id of the Protection Policy associated with - // the Protection Job. The Policy provides retry settings, - // Protection Schedules, Priority, SLA, etc. - // The Job defines the Storage Domain (View Box), the Objects to Protect - // (if applicable), Start Time, Indexing settings, etc. - // Required: true - PolicyID *string `json:"policyId"` - - // post backup script - PostBackupScript *ProtectionJobPostBackupScript `json:"postBackupScript,omitempty"` - - // pre backup script - PreBackupScript *ProtectionJobPreBackupScript `json:"preBackupScript,omitempty"` - - // Specifies the priority of execution for a Protection Job. - // Cohesity supports concurrent backups but if the number of Jobs exceeds - // the ability to process Jobs, the specified priority determines the - // execution Job priority. - // This field also specifies the replication priority. - // 'kLow' indicates lowest execution priority for a Protection job. - // 'kMedium' indicates medium execution priority for a Protection job. - // 'kHigh' indicates highest execution priority for a Protection job. - // Enum: ["kLow","kMedium","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies the QoS policy type to use for this Protection Job. - // 'kBackupHDD' indicates the Cohesity Cluster writes data directly to - // the HDD tier for this Protection Job. This is the recommended setting. - // 'kBackupSSD' indicates the Cohesity Cluster writes data directly to - // the SSD tier for this Protection Job. Only specify this policy if - // you need fast ingest speed for a small number of Protection Jobs. - // 'kTestAndDevHigh' indicated the test and dev workload. - // 'kBackupAll' indicates the Cohesity Cluster writes data directly to - // the HDD tier and the SSD tier for this Protection Job. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosType *string `json:"qosType,omitempty"` - - // Indicates if the App-Consistent option is enabled for this Job. - // If the option is enabled, the Cohesity Cluster quiesces - // the file system and applications before taking - // Application-Consistent Snapshots. VMware Tools must be installed - // on the guest Operating System. - Quiesce *bool `json:"quiesce,omitempty"` - - // remote script - RemoteScript *ProtectionJobRemoteScript `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. - RemoteViewConfigList []*RemoteViewConfig `json:"remoteViewConfigList"` - - // Specifies the remote view name to use for view overwrite. - // This field is deprecated. Remote view names will automatically be used - // for all view jobs with replication policy. Use RemoteViewConfigList to - // setup remote view names. - // deprecated: true - RemoteViewName *string `json:"remoteViewName,omitempty"` - - // Array of Protected Source Objects. - // - // Specifies the list of Object ids from the Protection Source to - // protect (or back up) by the Protection Job. - // An Object in this list may be descendant of another Object in this list. - // For example a Datacenter could be selected but its child Host excluded. - // However, a child VM under the Host could be explicitly - // selected to be protected. Both the Datacenter and the VM are listed. - SourceIds []int64 `json:"sourceIds"` - - // Array of Special Source Parameters. - // - // Specifies additional settings that can apply to a subset of the - // Sources listed in the Protection Job. For example, you can specify a list - // of files and folders to protect instead of protecting the entire Physical - // Server. If this field's setting conflicts with environmentParameters, - // then this setting will be used. Specific volume selections must be passed - // in here to take effect. - // Required: true - SourceSpecialParameters []*SourceSpecialParameter `json:"sourceSpecialParameters"` - - // Array of Protected Source Objects. - // - // Specifies the list of Object ids along with Object names from the - // Protection Source to protect (or back up) by the Protection Job. - // Contains the one-to-one mapping of Source ids defined in "SourceIds" to - // the corresponding Source names. Only one of Sources or SourceIds will be - // returned depending on IncludeSourceNames. Sources will only be returned - // when IncludeSourceNames is set to true and the environment is O365. - Sources []*SourceInfo `json:"sources"` - - // start time - StartTime *ProtectionJobStartTime `json:"startTime,omitempty"` - - // Specifies the summary stats of the Protection Job. - // This field is set only if it was requested. - SummaryStats *ProtectionJobSummaryStats `json:"summaryStats,omitempty"` - - // Specifies task level timeouts for a job. - TaskTimeouts []*CancellationTimeoutParams `json:"taskTimeouts"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the timezone to use when calculating time for this - // Protection Job such as the Job start time. - // Specify the timezone in the following format: "Area/Location", - // for example: "America/New_York". - Timezone *string `json:"timezone,omitempty"` - - // uid - UID *ProtectionJobUID `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 - // create a 'kPuppeteer' job to backup Oracle DB for 'payroll' department. - // User can specify following tags: 'payroll', 'Oracle_DB'. - UserSpecifiedTags []string `json:"userSpecifiedTags"` - - // Specifies the Storage Domain (View Box) id where this Job writes data. - // Required: true - ViewBoxID *int64 `json:"viewBoxId"` - - // For a Remote Adapter 'kPuppeteer' Job or a 'kView' Job, this field - // specifies a View name that should be protected. Specify this field when - // creating a Protection Job for the first time for a View. If this field - // is specified, ParentSourceId, SourceIds, and ExcludeSourceIds should not - // be specified. - // This field is deprecated for view backups. Use sourceIds to specify list - // of view ids instead. - ViewName *string `json:"viewName,omitempty"` - - // Array of Arrays of VMs Tags Ids that Specify VMs to Protect. - // - // Optionally specify a list of VMs to protect by listing - // Protection Source ids of VM Tags in this two dimensional array. - // Using this two dimensional array of Tag ids, the Cluster - // generates a list of VMs to protect which are derived from - // intersections of the inner arrays and union of the outer array, - // as shown by the following example. - // To protect only 'Eng' VMs in the East and all the VMs in the West, - // specify the following tag id array: - // [ [1101, 2221], [3031] ], - // where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and - // 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a - // list of VMs that are both tagged with 'Eng' and 'East' - // (an intersection). The outer array combines the list from the inner - // array with list of VMs tagged with 'West' (a union). The list - // of resulting VMs are protected by this Job. - VMTagIds [][]int64 `json:"vmTagIds"` -} - -// Validate validates this protection job -func (m *ProtectionJob) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataMigrationPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironmentParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullProtectionStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalProtectionStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMissingEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteViewConfigList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSummaryStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewBoxID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJob) validateAlertingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if m.AlertingConfig != nil { - if err := m.AlertingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -var protectionJobAlertingPolicyItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kFailure","kSlaViolation"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobAlertingPolicyItemsEnum = append(protectionJobAlertingPolicyItemsEnum, v) - } -} - -func (m *ProtectionJob) validateAlertingPolicyItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobAlertingPolicyItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJob) validateAlertingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingPolicy) { // not required - return nil - } - - for i := 0; i < len(m.AlertingPolicy); i++ { - - // value enum - if err := m.validateAlertingPolicyItemsEnum("alertingPolicy"+"."+strconv.Itoa(i), "body", m.AlertingPolicy[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ProtectionJob) validateCloudParameters(formats strfmt.Registry) error { - if swag.IsZero(m.CloudParameters) { // not required - return nil - } - - if m.CloudParameters != nil { - if err := m.CloudParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) validateDataMigrationPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DataMigrationPolicy) { // not required - return nil - } - - if m.DataMigrationPolicy != nil { - if err := m.DataMigrationPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationPolicy") - } - return err - } - } - - return nil -} - -var protectionJobTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobTypeEnvironmentPropEnum = append(protectionJobTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionJobEnvironmentKVMware captures enum value "kVMware" - ProtectionJobEnvironmentKVMware string = "kVMware" - - // ProtectionJobEnvironmentKHyperV captures enum value "kHyperV" - ProtectionJobEnvironmentKHyperV string = "kHyperV" - - // ProtectionJobEnvironmentKSQL captures enum value "kSQL" - ProtectionJobEnvironmentKSQL string = "kSQL" - - // ProtectionJobEnvironmentKView captures enum value "kView" - ProtectionJobEnvironmentKView string = "kView" - - // ProtectionJobEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectionJobEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectionJobEnvironmentKPhysical captures enum value "kPhysical" - ProtectionJobEnvironmentKPhysical string = "kPhysical" - - // ProtectionJobEnvironmentKPure captures enum value "kPure" - ProtectionJobEnvironmentKPure string = "kPure" - - // ProtectionJobEnvironmentKNimble captures enum value "kNimble" - ProtectionJobEnvironmentKNimble string = "kNimble" - - // ProtectionJobEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionJobEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionJobEnvironmentKAzure captures enum value "kAzure" - ProtectionJobEnvironmentKAzure string = "kAzure" - - // ProtectionJobEnvironmentKNetapp captures enum value "kNetapp" - ProtectionJobEnvironmentKNetapp string = "kNetapp" - - // ProtectionJobEnvironmentKAgent captures enum value "kAgent" - ProtectionJobEnvironmentKAgent string = "kAgent" - - // ProtectionJobEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionJobEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionJobEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionJobEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionJobEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionJobEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionJobEnvironmentKIsilon captures enum value "kIsilon" - ProtectionJobEnvironmentKIsilon string = "kIsilon" - - // ProtectionJobEnvironmentKGPFS captures enum value "kGPFS" - ProtectionJobEnvironmentKGPFS string = "kGPFS" - - // ProtectionJobEnvironmentKKVM captures enum value "kKVM" - ProtectionJobEnvironmentKKVM string = "kKVM" - - // ProtectionJobEnvironmentKAWS captures enum value "kAWS" - ProtectionJobEnvironmentKAWS string = "kAWS" - - // ProtectionJobEnvironmentKExchange captures enum value "kExchange" - ProtectionJobEnvironmentKExchange string = "kExchange" - - // ProtectionJobEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectionJobEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectionJobEnvironmentKOracle captures enum value "kOracle" - ProtectionJobEnvironmentKOracle string = "kOracle" - - // ProtectionJobEnvironmentKGCP captures enum value "kGCP" - ProtectionJobEnvironmentKGCP string = "kGCP" - - // ProtectionJobEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionJobEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionJobEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionJobEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionJobEnvironmentKO365 captures enum value "kO365" - ProtectionJobEnvironmentKO365 string = "kO365" - - // ProtectionJobEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectionJobEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectionJobEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectionJobEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectionJobEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectionJobEnvironmentKGCPNative string = "kGCPNative" - - // ProtectionJobEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionJobEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionJobEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionJobEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionJobEnvironmentKElastifile captures enum value "kElastifile" - ProtectionJobEnvironmentKElastifile string = "kElastifile" - - // ProtectionJobEnvironmentKAD captures enum value "kAD" - ProtectionJobEnvironmentKAD string = "kAD" - - // ProtectionJobEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionJobEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionJobEnvironmentKCassandra captures enum value "kCassandra" - ProtectionJobEnvironmentKCassandra string = "kCassandra" - - // ProtectionJobEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionJobEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionJobEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionJobEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionJobEnvironmentKHdfs captures enum value "kHdfs" - ProtectionJobEnvironmentKHdfs string = "kHdfs" - - // ProtectionJobEnvironmentKHive captures enum value "kHive" - ProtectionJobEnvironmentKHive string = "kHive" - - // ProtectionJobEnvironmentKHBase captures enum value "kHBase" - ProtectionJobEnvironmentKHBase string = "kHBase" - - // ProtectionJobEnvironmentKUDA captures enum value "kUDA" - ProtectionJobEnvironmentKUDA string = "kUDA" - - // ProtectionJobEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionJobEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionJobEnvironmentKO365Group captures enum value "kO365Group" - ProtectionJobEnvironmentKO365Group string = "kO365Group" - - // ProtectionJobEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionJobEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionJobEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionJobEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionJobEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionJobEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionJobEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionJobEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionJob) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJob) 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 -} - -func (m *ProtectionJob) validateEnvironmentParameters(formats strfmt.Registry) error { - if swag.IsZero(m.EnvironmentParameters) { // not required - return nil - } - - if m.EnvironmentParameters != nil { - if err := m.EnvironmentParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) validateFullProtectionStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.FullProtectionStartTime) { // not required - 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 -} - -func (m *ProtectionJob) validateIncrementalProtectionStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalProtectionStartTime) { // not required - 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 -} - -func (m *ProtectionJob) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) validateLastRun(formats strfmt.Registry) error { - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) validateMissingEntities(formats strfmt.Registry) error { - if swag.IsZero(m.MissingEntities) { // not required - return nil - } - - for i := 0; i < len(m.MissingEntities); i++ { - if swag.IsZero(m.MissingEntities[i]) { // not required - continue - } - - if m.MissingEntities[i] != nil { - if err := m.MissingEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJob) validatePolicyID(formats strfmt.Registry) error { - - if err := validate.Required("policyId", "body", m.PolicyID); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJob) validatePostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScript) { // not required - 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 -} - -func (m *ProtectionJob) validatePreBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreBackupScript) { // not required - 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 -} - -var protectionJobTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobTypePriorityPropEnum = append(protectionJobTypePriorityPropEnum, v) - } -} - -const ( - - // ProtectionJobPriorityKLow captures enum value "kLow" - ProtectionJobPriorityKLow string = "kLow" - - // ProtectionJobPriorityKMedium captures enum value "kMedium" - ProtectionJobPriorityKMedium string = "kMedium" - - // ProtectionJobPriorityKHigh captures enum value "kHigh" - ProtectionJobPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *ProtectionJob) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJob) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -var protectionJobTypeQosTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobTypeQosTypePropEnum = append(protectionJobTypeQosTypePropEnum, v) - } -} - -const ( - - // ProtectionJobQosTypeKBackupHDD captures enum value "kBackupHDD" - ProtectionJobQosTypeKBackupHDD string = "kBackupHDD" - - // ProtectionJobQosTypeKBackupSSD captures enum value "kBackupSSD" - ProtectionJobQosTypeKBackupSSD string = "kBackupSSD" - - // ProtectionJobQosTypeKTestAndDevHigh captures enum value "kTestAndDevHigh" - ProtectionJobQosTypeKTestAndDevHigh string = "kTestAndDevHigh" - - // ProtectionJobQosTypeKBackupAll captures enum value "kBackupAll" - ProtectionJobQosTypeKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *ProtectionJob) validateQosTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobTypeQosTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJob) validateQosType(formats strfmt.Registry) error { - if swag.IsZero(m.QosType) { // not required - return nil - } - - // value enum - if err := m.validateQosTypeEnum("qosType", "body", *m.QosType); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJob) validateRemoteScript(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteScript) { // not required - 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 -} - -func (m *ProtectionJob) validateRemoteViewConfigList(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteViewConfigList) { // not required - return nil - } - - for i := 0; i < len(m.RemoteViewConfigList); i++ { - if swag.IsZero(m.RemoteViewConfigList[i]) { // not required - continue - } - - if m.RemoteViewConfigList[i] != nil { - if err := m.RemoteViewConfigList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) validateSourceSpecialParameters(formats strfmt.Registry) error { - - if err := validate.Required("sourceSpecialParameters", "body", m.SourceSpecialParameters); err != nil { - return err - } - - for i := 0; i < len(m.SourceSpecialParameters); i++ { - if swag.IsZero(m.SourceSpecialParameters[i]) { // not required - continue - } - - if m.SourceSpecialParameters[i] != nil { - if err := m.SourceSpecialParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *ProtectionJob) validateSummaryStats(formats strfmt.Registry) error { - if swag.IsZero(m.SummaryStats) { // not required - return nil - } - - if m.SummaryStats != nil { - if err := m.SummaryStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryStats") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) validateTaskTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.TaskTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.TaskTimeouts); i++ { - if swag.IsZero(m.TaskTimeouts[i]) { // not required - continue - } - - if m.TaskTimeouts[i] != nil { - if err := m.TaskTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -func (m *ProtectionJob) validateViewBoxID(formats strfmt.Registry) error { - - if err := validate.Required("viewBoxId", "body", m.ViewBoxID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection job based on the context it is used -func (m *ProtectionJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataMigrationPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnvironmentParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullProtectionStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalProtectionStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMissingEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteViewConfigList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSummaryStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJob) contextValidateAlertingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertingConfig != nil { - - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if err := m.AlertingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateCloudParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudParameters != nil { - - if swag.IsZero(m.CloudParameters) { // not required - return nil - } - - if err := m.CloudParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateDataMigrationPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DataMigrationPolicy != nil { - - if swag.IsZero(m.DataMigrationPolicy) { // not required - return nil - } - - if err := m.DataMigrationPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateEnvironmentParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.EnvironmentParameters != nil { - - if swag.IsZero(m.EnvironmentParameters) { // not required - return nil - } - - if err := m.EnvironmentParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentParameters") - } - return err - } - } - - return nil -} - -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 -} - -func (m *ProtectionJob) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateMissingEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MissingEntities); i++ { - - if m.MissingEntities[i] != nil { - - if swag.IsZero(m.MissingEntities[i]) { // not required - return nil - } - - if err := m.MissingEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionJob) contextValidateRemoteViewConfigList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteViewConfigList); i++ { - - if m.RemoteViewConfigList[i] != nil { - - if swag.IsZero(m.RemoteViewConfigList[i]) { // not required - return nil - } - - if err := m.RemoteViewConfigList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) contextValidateSourceSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceSpecialParameters); i++ { - - if m.SourceSpecialParameters[i] != nil { - - if swag.IsZero(m.SourceSpecialParameters[i]) { // not required - return nil - } - - if err := m.SourceSpecialParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJob) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionJob) contextValidateSummaryStats(ctx context.Context, formats strfmt.Registry) error { - - if m.SummaryStats != nil { - - if swag.IsZero(m.SummaryStats) { // not required - return nil - } - - if err := m.SummaryStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryStats") - } - return err - } - } - - return nil -} - -func (m *ProtectionJob) contextValidateTaskTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskTimeouts); i++ { - - if m.TaskTimeouts[i] != nil { - - if swag.IsZero(m.TaskTimeouts[i]) { // not required - return nil - } - - if err := m.TaskTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *ProtectionJob) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJob) UnmarshalBinary(b []byte) error { - var res ProtectionJob - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_audit_trail.go b/v1/models/protection_job_audit_trail.go deleted file mode 100644 index bfa364b3..00000000 --- a/v1/models/protection_job_audit_trail.go +++ /dev/null @@ -1,243 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionJobAuditTrail Protection Job Audit Trail. -// -// Specifies the fields for Protection job audit Response. -// -// swagger:model ProtectionJobAuditTrail -type ProtectionJobAuditTrail struct { - - // Specifies the audit logs for Protection Job after change. - After *ProtectionJob `json:"after,omitempty"` - - // Specifies the audit logs for Protection Job before change. - Before *ProtectionJob `json:"before,omitempty"` - - // Specifies the list of changed values in a Protection Job. - // kProtectionJobName implies that protection job has change in the name field - // kProtectionJobDescription implies that protection job has change in the - // description field. - // kProtectionJobSources implies that protection job has change in the - // source field. - // kProtectionJobSchedule implies that protection job has change in the - // schedule field. - // kProtectionJobFullSchedule implies that protection job has change in the - // full schedule field. - // kProtectionJobRetrySettings implies that protection job has change in the - // retry settings. - // kProtectionJobRetentionPolicy implies that protection job has change in the - // retention policy. - // kProtectionJobIndexingPolicy implies that protection job has change in the - // indexing policy. - // kProtectionJobAlertingPolicy implies that protection job has change in the - // alerting policy. - // kProtectionJobPriority implies that protection job has change in the - // alerting policy. - // kProtectionJobQuiesce implies that protection job has change in the - // Quiesce. - // kProtectionJobSla implies that protection job has change in the SLA - // settings. - // kProtectionJobPolicyId implies that protection job has change in the - // poilcy Id settings. - // kProtectionJobTimezone implies that protection job has change in the - // timezone settings. - // kProtectionJobFutureRunsPaused implies that protection job has change in - // the future run settings. - // kProtectionJobFutureRunsResumed implies that protection job has change in - // the future run resume settings. - // kSnapshotTargetPolicy implies that protection job has change in - // the snapshot target policy settings. - // kProtectionJobQOS implies that protection job has change in QOS settings. - // kProtectionJobInvalidField implies that the changed field is invalid. - Changes []string `json:"changes"` -} - -// Validate validates this protection job audit trail -func (m *ProtectionJobAuditTrail) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAfter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBefore(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobAuditTrail) validateAfter(formats strfmt.Registry) error { - if swag.IsZero(m.After) { // not required - return nil - } - - if m.After != nil { - if err := m.After.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("after") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("after") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobAuditTrail) validateBefore(formats strfmt.Registry) error { - if swag.IsZero(m.Before) { // not required - return nil - } - - if m.Before != nil { - if err := m.Before.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("before") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("before") - } - return err - } - } - - return nil -} - -var protectionJobAuditTrailChangesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kProtectionJobName","kProtectionJobDescription","kProtectionJobSources","kProtectionJobSchedule","kProtectionJobFullSchedule","kProtectionJobRetrySettings","kProtectionJobRetentionPolicy","kProtectionJobIndexingPolicy","kProtectionJobAlertingPolicy","kProtectionJobPriority","kProtectionJobQuiesce","kProtectionJobSla","kProtectionJobPolicyId","kProtectionJobTimezone","kProtectionJobFutureRunsPaused","kProtectionJobFutureRunsResumed","kSnapshotTargetPolicy","kProtectionJobBlackoutWindow","kProtectionJobQOS","kProtectionJobInvalidField"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobAuditTrailChangesItemsEnum = append(protectionJobAuditTrailChangesItemsEnum, v) - } -} - -func (m *ProtectionJobAuditTrail) validateChangesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobAuditTrailChangesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobAuditTrail) validateChanges(formats strfmt.Registry) error { - if swag.IsZero(m.Changes) { // not required - return nil - } - - for i := 0; i < len(m.Changes); i++ { - - // value enum - if err := m.validateChangesItemsEnum("changes"+"."+strconv.Itoa(i), "body", m.Changes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this protection job audit trail based on the context it is used -func (m *ProtectionJobAuditTrail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAfter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBefore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobAuditTrail) contextValidateAfter(ctx context.Context, formats strfmt.Registry) error { - - if m.After != nil { - - if swag.IsZero(m.After) { // not required - return nil - } - - if err := m.After.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("after") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("after") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobAuditTrail) contextValidateBefore(ctx context.Context, formats strfmt.Registry) error { - - if m.Before != nil { - - if swag.IsZero(m.Before) { // not required - return nil - } - - if err := m.Before.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("before") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("before") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobAuditTrail) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobAuditTrail) UnmarshalBinary(b []byte) error { - var res ProtectionJobAuditTrail - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_info.go b/v1/models/protection_job_info.go deleted file mode 100644 index d08f3717..00000000 --- a/v1/models/protection_job_info.go +++ /dev/null @@ -1,300 +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" -) - -// ProtectionJobInfo Protection Job Info -// -// Specifies basic information about a Protection Job. -// -// swagger:model ProtectionJobInfo -type ProtectionJobInfo struct { - - // Specifies the id of the Protection Job. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the name of the Protection Job. - JobName *string `json:"jobName,omitempty"` - - // Specifies the type of the Protection Job such as kView or kPuppeteer. - // 'kPuppeteer' refers to a Remote Adapter Job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this protection job info -func (m *ProtectionJobInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionJobInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobInfoTypeTypePropEnum = append(protectionJobInfoTypeTypePropEnum, v) - } -} - -const ( - - // ProtectionJobInfoTypeKVMware captures enum value "kVMware" - ProtectionJobInfoTypeKVMware string = "kVMware" - - // ProtectionJobInfoTypeKHyperV captures enum value "kHyperV" - ProtectionJobInfoTypeKHyperV string = "kHyperV" - - // ProtectionJobInfoTypeKSQL captures enum value "kSQL" - ProtectionJobInfoTypeKSQL string = "kSQL" - - // ProtectionJobInfoTypeKView captures enum value "kView" - ProtectionJobInfoTypeKView string = "kView" - - // ProtectionJobInfoTypeKPuppeteer captures enum value "kPuppeteer" - ProtectionJobInfoTypeKPuppeteer string = "kPuppeteer" - - // ProtectionJobInfoTypeKPhysical captures enum value "kPhysical" - ProtectionJobInfoTypeKPhysical string = "kPhysical" - - // ProtectionJobInfoTypeKPure captures enum value "kPure" - ProtectionJobInfoTypeKPure string = "kPure" - - // ProtectionJobInfoTypeKNimble captures enum value "kNimble" - ProtectionJobInfoTypeKNimble string = "kNimble" - - // ProtectionJobInfoTypeKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionJobInfoTypeKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionJobInfoTypeKAzure captures enum value "kAzure" - ProtectionJobInfoTypeKAzure string = "kAzure" - - // ProtectionJobInfoTypeKNetapp captures enum value "kNetapp" - ProtectionJobInfoTypeKNetapp string = "kNetapp" - - // ProtectionJobInfoTypeKAgent captures enum value "kAgent" - ProtectionJobInfoTypeKAgent string = "kAgent" - - // ProtectionJobInfoTypeKGenericNas captures enum value "kGenericNas" - ProtectionJobInfoTypeKGenericNas string = "kGenericNas" - - // ProtectionJobInfoTypeKAcropolis captures enum value "kAcropolis" - ProtectionJobInfoTypeKAcropolis string = "kAcropolis" - - // ProtectionJobInfoTypeKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionJobInfoTypeKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionJobInfoTypeKIsilon captures enum value "kIsilon" - ProtectionJobInfoTypeKIsilon string = "kIsilon" - - // ProtectionJobInfoTypeKGPFS captures enum value "kGPFS" - ProtectionJobInfoTypeKGPFS string = "kGPFS" - - // ProtectionJobInfoTypeKKVM captures enum value "kKVM" - ProtectionJobInfoTypeKKVM string = "kKVM" - - // ProtectionJobInfoTypeKAWS captures enum value "kAWS" - ProtectionJobInfoTypeKAWS string = "kAWS" - - // ProtectionJobInfoTypeKExchange captures enum value "kExchange" - ProtectionJobInfoTypeKExchange string = "kExchange" - - // ProtectionJobInfoTypeKHyperVVSS captures enum value "kHyperVVSS" - ProtectionJobInfoTypeKHyperVVSS string = "kHyperVVSS" - - // ProtectionJobInfoTypeKOracle captures enum value "kOracle" - ProtectionJobInfoTypeKOracle string = "kOracle" - - // ProtectionJobInfoTypeKGCP captures enum value "kGCP" - ProtectionJobInfoTypeKGCP string = "kGCP" - - // ProtectionJobInfoTypeKFlashBlade captures enum value "kFlashBlade" - ProtectionJobInfoTypeKFlashBlade string = "kFlashBlade" - - // ProtectionJobInfoTypeKAWSNative captures enum value "kAWSNative" - ProtectionJobInfoTypeKAWSNative string = "kAWSNative" - - // ProtectionJobInfoTypeKO365 captures enum value "kO365" - ProtectionJobInfoTypeKO365 string = "kO365" - - // ProtectionJobInfoTypeKO365Outlook captures enum value "kO365Outlook" - ProtectionJobInfoTypeKO365Outlook string = "kO365Outlook" - - // ProtectionJobInfoTypeKHyperFlex captures enum value "kHyperFlex" - ProtectionJobInfoTypeKHyperFlex string = "kHyperFlex" - - // ProtectionJobInfoTypeKGCPNative captures enum value "kGCPNative" - ProtectionJobInfoTypeKGCPNative string = "kGCPNative" - - // ProtectionJobInfoTypeKAzureNative captures enum value "kAzureNative" - ProtectionJobInfoTypeKAzureNative string = "kAzureNative" - - // ProtectionJobInfoTypeKKubernetes captures enum value "kKubernetes" - ProtectionJobInfoTypeKKubernetes string = "kKubernetes" - - // ProtectionJobInfoTypeKElastifile captures enum value "kElastifile" - ProtectionJobInfoTypeKElastifile string = "kElastifile" - - // ProtectionJobInfoTypeKAD captures enum value "kAD" - ProtectionJobInfoTypeKAD string = "kAD" - - // ProtectionJobInfoTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionJobInfoTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionJobInfoTypeKCassandra captures enum value "kCassandra" - ProtectionJobInfoTypeKCassandra string = "kCassandra" - - // ProtectionJobInfoTypeKMongoDB captures enum value "kMongoDB" - ProtectionJobInfoTypeKMongoDB string = "kMongoDB" - - // ProtectionJobInfoTypeKCouchbase captures enum value "kCouchbase" - ProtectionJobInfoTypeKCouchbase string = "kCouchbase" - - // ProtectionJobInfoTypeKHdfs captures enum value "kHdfs" - ProtectionJobInfoTypeKHdfs string = "kHdfs" - - // ProtectionJobInfoTypeKHive captures enum value "kHive" - ProtectionJobInfoTypeKHive string = "kHive" - - // ProtectionJobInfoTypeKHBase captures enum value "kHBase" - ProtectionJobInfoTypeKHBase string = "kHBase" - - // ProtectionJobInfoTypeKUDA captures enum value "kUDA" - ProtectionJobInfoTypeKUDA string = "kUDA" - - // ProtectionJobInfoTypeKO365Teams captures enum value "kO365Teams" - ProtectionJobInfoTypeKO365Teams string = "kO365Teams" - - // ProtectionJobInfoTypeKO365Group captures enum value "kO365Group" - ProtectionJobInfoTypeKO365Group string = "kO365Group" - - // ProtectionJobInfoTypeKO365Exchange captures enum value "kO365Exchange" - ProtectionJobInfoTypeKO365Exchange string = "kO365Exchange" - - // ProtectionJobInfoTypeKO365OneDrive captures enum value "kO365OneDrive" - ProtectionJobInfoTypeKO365OneDrive string = "kO365OneDrive" - - // ProtectionJobInfoTypeKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionJobInfoTypeKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionJobInfoTypeKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionJobInfoTypeKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionJobInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection job info based on context it is used -func (m *ProtectionJobInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobInfo) UnmarshalBinary(b []byte) error { - var res ProtectionJobInfo - 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 deleted file mode 100644 index b58b76da..00000000 --- a/v1/models/protection_job_request_body.go +++ /dev/null @@ -1,1591 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionJobRequestBody Protection Job Request. -// -// Specifies information about a Protection Job. -// -// swagger:model ProtectionJobRequestBody -type ProtectionJobRequestBody struct { - - // If true, the Cohesity Cluster aborts any currently executing Job Runs - // of this Protection Job when a QuietTime period specified for this Job - // starts, even if the Job Run started before the QuietTime - // period began. - // If false, a Job Run continues to execute, if the Job Run started before - // the QuietTime period starts. - AbortInBlackoutPeriod *bool `json:"abortInBlackoutPeriod,omitempty"` - - // Alerting configuration can be used to specify optional details for the - // alerts triggered by this job. - AlertingConfig *AlertingConfig `json:"alertingConfig,omitempty"` - - // Array of Job Events. - // - // During Job Runs, the following Job Events are generated: - // 1) Job succeeds 2) Job fails - // 3) Job violates the SLA - // These Job Events can cause Alerts to be generated. - // 'kSuccess' means the Protection Job succeeded. - // 'kFailure' means the Protection Job failed. - // 'kSlaViolation' means the Protection Job took longer than the time period - // specified in the SLA. - AlertingPolicy []string `json:"alertingPolicy"` - - // If this fiels is set to true, then we wil allow parallel runs for the job - // for the adapters which support parallel runs. - AllowParallelRuns *bool `json:"allowParallelRuns,omitempty"` - - // Specifies Cloud specific parameters applicable in various scenarios. - CloudParameters *CloudParameters `json:"cloudParameters,omitempty"` - - // Whether to continue backing up on quiesce failure. - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // Specifies whether to create a remote view name to use for view overwrite. - // This field is deprecated. Remote view names will automatically be used - // for all view jobs with replication policy. Use RemoteViewConfigList to - // setup remote view names. - // deprecated: true - CreateRemoteView *bool `json:"createRemoteView,omitempty"` - - // Specifies policy for a data migration job. It contains inline schedule to - // run the data migration job. In addition to this, it also contains - // retention policy that should be applied to files after they have been - // moved to cohesity cluster. It is present only in case data migration job. - DataMigrationPolicy *DataMigrationPolicy `json:"dataMigrationPolicy,omitempty"` - - // List of source ids for which source side dedup is disabled from the backup - // job. - DedupDisabledSourceIds []int64 `json:"dedupDisabledSourceIds"` - - // Specifies a text description about the Protection Job. - Description *string `json:"description,omitempty"` - - // Specifies the epoch time (in microseconds) after which the Protection Job - // becomes dormant. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the environment type (such as kVMware or kSQL) - // of the Protection Source this Job is protecting. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies additional settings that are applicable to all Sources in - // the Protection Job that are of specified environment type. For example, - // you can specify to exclude a disk from backup for all 'kVMware' - // Protection Sources in the Protection Job. If a setting conflicts with - // sourceSpecialParameters, then sourceSpecialParameters will be used. - EnvironmentParameters *EnvironmentTypeJobParameters `json:"environmentParameters,omitempty"` - - // Array of arrays of label IDs that specify labels to - // exclude. Optionally specify a list of labels to exclude from - // protecting by listing protection source ids of labels in this two - // dimensional array. Using this two dimensional array of label IDs, the - // Cluster generates a list of namespaces to exclude from protecting, - // which are derived from intersections of the inner arrays - // and union of the outer array. - ExcludeLabelIds [][]int64 `json:"excludeLabelIds"` - - // Array of Excluded Source Objects. - // - // List of Object ids from a Protection Source that should not be - // protected and are excluded from being backed up by the Protection Job. - // Leaf and non-leaf Objects may be in this list and an Object in this list - // must have an ancestor in the sourceId list. - ExcludeSourceIds []int64 `json:"excludeSourceIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. - // - // Optionally specify a list of VMs to exclude from protecting by listing - // Protection Source ids of VM Tags in this two dimensional array. - // Using this two dimensional array of Tag ids, the Cluster - // generates a list of VMs to exclude from protecting, - // which are derived from intersections of the inner arrays - // and union of the outer array, as shown by the following example. - // For example a Datacenter is selected to be protected but you want to - // exclude all the 'Former Employees' VMs in the East and West but - // keep all the VMs for 'Former Employees' in the South which are - // also stored in this Datacenter, by specifying the - // following tag id array: - // [ [1000, 2221], [1000, 3031] ], - // where 1000 is the 'Former Employee' VM Tag id, - // 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. - // The first inner array [1000, 2221] produces a list of VMs that are - // both tagged with 'Former Employees' and 'East' (an intersection). - // The second inner array [1000, 3031] produces a list of VMs that are both - // tagged with 'Former Employees' and 'West' (an intersection). - // The outer array combines the list of VMs from the two inner - // arrays. The list of resulting VMs are excluded from being protected - // this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // If specified, this setting is number of minutes that a Job Run - // of a Full (no CBT) backup schedule is expected to complete, which is - // known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - FullProtectionSLATimeMins *int64 `json:"fullProtectionSlaTimeMins,omitempty"` - - // full protection start time - FullProtectionStartTime *ProtectionJobRequestBodyFullProtectionStartTime `json:"fullProtectionStartTime,omitempty"` - - // Specifies the errors which we can ignore from showing to the user. - IgnorableErrorsInErrorDb []int32 `json:"ignorableErrorsInErrorDb"` - - // If specified, this setting is number of minutes that a Job Run - // of a CBT-based backup schedule is expected to complete, which - // is known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - IncrementalProtectionSLATimeMins *int64 `json:"incrementalProtectionSlaTimeMins,omitempty"` - - // incremental protection start time - IncrementalProtectionStartTime *ProtectionJobRequestBodyIncrementalProtectionStartTime `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. - // In addition, it specifies inclusion and exclusion rules that determine - // the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies if this is a direct archive backup job. - IsDirectArchiveEnabled *bool `json:"isDirectArchiveEnabled,omitempty"` - - // Specifies if native format should be used for archiving, applicable for - // only direct archive jobs. - IsNativeFormat *bool `json:"isNativeFormat,omitempty"` - - // Specifies if the Protection Job is paused, which means that no new - // Job Runs are started but any existing Job Runs continue to execute. - IsPaused *bool `json:"isPaused,omitempty"` - - // Array of array of label IDs that specify labels to protect. - // Optionally specify a list of labels to protect by listing - // protection source ids of labels in this two dimensional array. - // Using this two dimensional array of label IDs, the cluster - // generates a list of namespaces to protect, which are derived from - // intersections of the inner arrays and union of the outer array. - LabelIds [][]int64 `json:"labelIds"` - - // Specifies whether to leverage nutanix API to take snapshots for this - // backup job. To leverage nutanix snapshot a prism endpoint on which the - // vcenter is registered as a management server has to be registered as a - // source. If nutanix snapshot can not be taken, job will fall back to - // default mode. - LeverageNutanixSnapshots *bool `json:"leverageNutanixSnapshots,omitempty"` - - // If this field is set to true, then the backup for the objects will be - // performed using dedicated storage area network (SAN) instead of LAN or - // managment network. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Specifies whether to leverage the storage array based snapshots for this - // backup job. To leverage storage snapshots, the storage array has to be - // registered as a source. If storage based snapshots can not be taken, job - // will fallback to the default backup method. - LeverageStorageSnapshots *bool `json:"leverageStorageSnapshots,omitempty"` - - // Specifies whether to leverage Hyperflex as the storage snapshot array - LeverageStorageSnapshotsForHyperflex *bool `json:"leverageStorageSnapshotsForHyperflex,omitempty"` - - // If specified, this setting is number of minutes that a Job Run - // of a Log backup schedule is expected to complete, which is - // known as a Service-Level Agreement (SLA). - // A SLA violation is reported when the run time of a Job Run exceeds - // the SLA time period specified for this backup schedule. - LogProtectionSLATimeMins *int64 `json:"logProtectionSlaTimeMins,omitempty"` - - // Specifies the last time this Job was updated. If this is - // passed into a PUT request, then the backend will validate that the - // timestamp passed in matches the time that the protection group was - // actually last modified. If the two timestamps do not match, then the - // request will be rejected with a stale error. - ModificationTimeUsecs *int64 `json:"modificationTimeUsecs,omitempty"` - - // Specifies the name of the Protection Job. - // Required: true - Name *string `json:"name"` - - // Specifies the id of the registered Protection Source that is the - // parent of the Objects that may be protected by this Job. - // For example when a vCenter Server is registered on a Cohesity Cluster, - // the Cohesity Cluster assigns a unique id to this field that represents - // the vCenter Server. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies whether brick based dedupe should be performed or not. - PerformBrickBasedDedup *bool `json:"performBrickBasedDedup,omitempty"` - - // Specifies whether source side dedupe should be performed or not. - PerformSourceSideDedup *bool `json:"performSourceSideDedup,omitempty"` - - // Specifies the unique id of the Protection Policy associated with - // the Protection Job. The Policy provides retry settings, - // Protection Schedules, Priority, SLA, etc. - // The Job defines the Storage Domain (View Box), the Objects to Protect - // (if applicable), Start Time, Indexing settings, etc. - // Required: true - PolicyID *string `json:"policyId"` - - // post backup script - PostBackupScript *ProtectionJobRequestBodyPostBackupScript `json:"postBackupScript,omitempty"` - - // pre backup script - PreBackupScript *ProtectionJobRequestBodyPreBackupScript `json:"preBackupScript,omitempty"` - - // Specifies the priority of execution for a Protection Job. - // Cohesity supports concurrent backups but if the number of Jobs exceeds - // the ability to process Jobs, the specified priority determines the - // execution Job priority. - // This field also specifies the replication priority. - // 'kLow' indicates lowest execution priority for a Protection job. - // 'kMedium' indicates medium execution priority for a Protection job. - // 'kHigh' indicates highest execution priority for a Protection job. - // Enum: ["kLow","kMedium","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies the QoS policy type to use for this Protection Job. - // 'kBackupHDD' indicates the Cohesity Cluster writes data directly to - // the HDD tier for this Protection Job. This is the recommended setting. - // 'kBackupSSD' indicates the Cohesity Cluster writes data directly to - // the SSD tier for this Protection Job. Only specify this policy if - // you need fast ingest speed for a small number of Protection Jobs. - // 'kTestAndDevHigh' indicated the test and dev workload. - // 'kBackupAll' indicates the Cohesity Cluster writes data directly to - // the HDD tier and the SSD tier for this Protection Job. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosType *string `json:"qosType,omitempty"` - - // Indicates if the App-Consistent option is enabled for this Job. - // If the option is enabled, the Cohesity Cluster quiesces - // the file system and applications before taking - // Application-Consistent Snapshots. VMware Tools must be installed - // on the guest Operating System. - Quiesce *bool `json:"quiesce,omitempty"` - - // remote script - RemoteScript *ProtectionJobRequestBodyRemoteScript `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. - RemoteViewConfigList []*RemoteViewConfig `json:"remoteViewConfigList"` - - // Specifies the remote view name to use for view overwrite. - // This field is deprecated. Remote view names will automatically be used - // for all view jobs with replication policy. Use RemoteViewConfigList to - // setup remote view names. - // deprecated: true - RemoteViewName *string `json:"remoteViewName,omitempty"` - - // Array of Protected Source Objects. - // - // Specifies the list of Object ids from the Protection Source to - // protect (or back up) by the Protection Job. - // An Object in this list may be descendant of another Object in this list. - // For example a Datacenter could be selected but its child Host excluded. - // However, a child VM under the Host could be explicitly - // selected to be protected. Both the Datacenter and the VM are listed. - SourceIds []int64 `json:"sourceIds"` - - // Array of Special Source Parameters. - // - // Specifies additional settings that can apply to a subset of the - // Sources listed in the Protection Job. For example, you can specify a list - // of files and folders to protect instead of protecting the entire Physical - // Server. If this field's setting conflicts with environmentParameters, - // then this setting will be used. Specific volume selections must be passed - // in here to take effect. - // Required: true - SourceSpecialParameters []*SourceSpecialParameter `json:"sourceSpecialParameters"` - - // Array of Protected Source Objects. - // - // Specifies the list of Object ids along with Object names from the - // Protection Source to protect (or back up) by the Protection Job. - // Contains the one-to-one mapping of Source ids defined in "SourceIds" to - // the corresponding Source names. Only one of Sources or SourceIds will be - // returned depending on IncludeSourceNames. Sources will only be returned - // when IncludeSourceNames is set to true and the environment is O365. - Sources []*SourceInfo `json:"sources"` - - // start time - StartTime *ProtectionJobRequestBodyStartTime `json:"startTime,omitempty"` - - // Specifies task level timeouts for a job. - TaskTimeouts []*CancellationTimeoutParams `json:"taskTimeouts"` - - // Specifies the timezone to use when calculating time for this - // Protection Job such as the Job start time. - // Specify the timezone in the following format: "Area/Location", - // for example: "America/New_York". - Timezone *string `json:"timezone,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 - // create a 'kPuppeteer' job to backup Oracle DB for 'payroll' department. - // User can specify following tags: 'payroll', 'Oracle_DB'. - UserSpecifiedTags []string `json:"userSpecifiedTags"` - - // Specifies the Storage Domain (View Box) id where this Job writes data. - // Required: true - ViewBoxID *int64 `json:"viewBoxId"` - - // For a Remote Adapter 'kPuppeteer' Job or a 'kView' Job, this field - // specifies a View name that should be protected. Specify this field when - // creating a Protection Job for the first time for a View. If this field - // is specified, ParentSourceId, SourceIds, and ExcludeSourceIds should not - // be specified. - // This field is deprecated for view backups. Use sourceIds to specify list - // of view ids instead. - ViewName *string `json:"viewName,omitempty"` - - // Array of Arrays of VMs Tags Ids that Specify VMs to Protect. - // - // Optionally specify a list of VMs to protect by listing - // Protection Source ids of VM Tags in this two dimensional array. - // Using this two dimensional array of Tag ids, the Cluster - // generates a list of VMs to protect which are derived from - // intersections of the inner arrays and union of the outer array, - // as shown by the following example. - // To protect only 'Eng' VMs in the East and all the VMs in the West, - // specify the following tag id array: - // [ [1101, 2221], [3031] ], - // where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and - // 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a - // list of VMs that are both tagged with 'Eng' and 'East' - // (an intersection). The outer array combines the list from the inner - // array with list of VMs tagged with 'West' (a union). The list - // of resulting VMs are protected by this Job. - VMTagIds [][]int64 `json:"vmTagIds"` -} - -// Validate validates this protection job request body -func (m *ProtectionJobRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataMigrationPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironmentParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullProtectionStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalProtectionStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteViewConfigList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewBoxID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobRequestBody) validateAlertingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if m.AlertingConfig != nil { - if err := m.AlertingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -var protectionJobRequestBodyAlertingPolicyItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kFailure","kSlaViolation"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobRequestBodyAlertingPolicyItemsEnum = append(protectionJobRequestBodyAlertingPolicyItemsEnum, v) - } -} - -func (m *ProtectionJobRequestBody) validateAlertingPolicyItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobRequestBodyAlertingPolicyItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobRequestBody) validateAlertingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingPolicy) { // not required - return nil - } - - for i := 0; i < len(m.AlertingPolicy); i++ { - - // value enum - if err := m.validateAlertingPolicyItemsEnum("alertingPolicy"+"."+strconv.Itoa(i), "body", m.AlertingPolicy[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateCloudParameters(formats strfmt.Registry) error { - if swag.IsZero(m.CloudParameters) { // not required - return nil - } - - if m.CloudParameters != nil { - if err := m.CloudParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateDataMigrationPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DataMigrationPolicy) { // not required - return nil - } - - if m.DataMigrationPolicy != nil { - if err := m.DataMigrationPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationPolicy") - } - return err - } - } - - return nil -} - -var protectionJobRequestBodyTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobRequestBodyTypeEnvironmentPropEnum = append(protectionJobRequestBodyTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionJobRequestBodyEnvironmentKVMware captures enum value "kVMware" - ProtectionJobRequestBodyEnvironmentKVMware string = "kVMware" - - // ProtectionJobRequestBodyEnvironmentKHyperV captures enum value "kHyperV" - ProtectionJobRequestBodyEnvironmentKHyperV string = "kHyperV" - - // ProtectionJobRequestBodyEnvironmentKSQL captures enum value "kSQL" - ProtectionJobRequestBodyEnvironmentKSQL string = "kSQL" - - // ProtectionJobRequestBodyEnvironmentKView captures enum value "kView" - ProtectionJobRequestBodyEnvironmentKView string = "kView" - - // ProtectionJobRequestBodyEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectionJobRequestBodyEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectionJobRequestBodyEnvironmentKPhysical captures enum value "kPhysical" - ProtectionJobRequestBodyEnvironmentKPhysical string = "kPhysical" - - // ProtectionJobRequestBodyEnvironmentKPure captures enum value "kPure" - ProtectionJobRequestBodyEnvironmentKPure string = "kPure" - - // ProtectionJobRequestBodyEnvironmentKNimble captures enum value "kNimble" - ProtectionJobRequestBodyEnvironmentKNimble string = "kNimble" - - // ProtectionJobRequestBodyEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionJobRequestBodyEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionJobRequestBodyEnvironmentKAzure captures enum value "kAzure" - ProtectionJobRequestBodyEnvironmentKAzure string = "kAzure" - - // ProtectionJobRequestBodyEnvironmentKNetapp captures enum value "kNetapp" - ProtectionJobRequestBodyEnvironmentKNetapp string = "kNetapp" - - // ProtectionJobRequestBodyEnvironmentKAgent captures enum value "kAgent" - ProtectionJobRequestBodyEnvironmentKAgent string = "kAgent" - - // ProtectionJobRequestBodyEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionJobRequestBodyEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionJobRequestBodyEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionJobRequestBodyEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionJobRequestBodyEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionJobRequestBodyEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionJobRequestBodyEnvironmentKIsilon captures enum value "kIsilon" - ProtectionJobRequestBodyEnvironmentKIsilon string = "kIsilon" - - // ProtectionJobRequestBodyEnvironmentKGPFS captures enum value "kGPFS" - ProtectionJobRequestBodyEnvironmentKGPFS string = "kGPFS" - - // ProtectionJobRequestBodyEnvironmentKKVM captures enum value "kKVM" - ProtectionJobRequestBodyEnvironmentKKVM string = "kKVM" - - // ProtectionJobRequestBodyEnvironmentKAWS captures enum value "kAWS" - ProtectionJobRequestBodyEnvironmentKAWS string = "kAWS" - - // ProtectionJobRequestBodyEnvironmentKExchange captures enum value "kExchange" - ProtectionJobRequestBodyEnvironmentKExchange string = "kExchange" - - // ProtectionJobRequestBodyEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectionJobRequestBodyEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectionJobRequestBodyEnvironmentKOracle captures enum value "kOracle" - ProtectionJobRequestBodyEnvironmentKOracle string = "kOracle" - - // ProtectionJobRequestBodyEnvironmentKGCP captures enum value "kGCP" - ProtectionJobRequestBodyEnvironmentKGCP string = "kGCP" - - // ProtectionJobRequestBodyEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionJobRequestBodyEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionJobRequestBodyEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionJobRequestBodyEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionJobRequestBodyEnvironmentKO365 captures enum value "kO365" - ProtectionJobRequestBodyEnvironmentKO365 string = "kO365" - - // ProtectionJobRequestBodyEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectionJobRequestBodyEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectionJobRequestBodyEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectionJobRequestBodyEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectionJobRequestBodyEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectionJobRequestBodyEnvironmentKGCPNative string = "kGCPNative" - - // ProtectionJobRequestBodyEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionJobRequestBodyEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionJobRequestBodyEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionJobRequestBodyEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionJobRequestBodyEnvironmentKElastifile captures enum value "kElastifile" - ProtectionJobRequestBodyEnvironmentKElastifile string = "kElastifile" - - // ProtectionJobRequestBodyEnvironmentKAD captures enum value "kAD" - ProtectionJobRequestBodyEnvironmentKAD string = "kAD" - - // ProtectionJobRequestBodyEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionJobRequestBodyEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionJobRequestBodyEnvironmentKCassandra captures enum value "kCassandra" - ProtectionJobRequestBodyEnvironmentKCassandra string = "kCassandra" - - // ProtectionJobRequestBodyEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionJobRequestBodyEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionJobRequestBodyEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionJobRequestBodyEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionJobRequestBodyEnvironmentKHdfs captures enum value "kHdfs" - ProtectionJobRequestBodyEnvironmentKHdfs string = "kHdfs" - - // ProtectionJobRequestBodyEnvironmentKHive captures enum value "kHive" - ProtectionJobRequestBodyEnvironmentKHive string = "kHive" - - // ProtectionJobRequestBodyEnvironmentKHBase captures enum value "kHBase" - ProtectionJobRequestBodyEnvironmentKHBase string = "kHBase" - - // ProtectionJobRequestBodyEnvironmentKUDA captures enum value "kUDA" - ProtectionJobRequestBodyEnvironmentKUDA string = "kUDA" - - // ProtectionJobRequestBodyEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionJobRequestBodyEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionJobRequestBodyEnvironmentKO365Group captures enum value "kO365Group" - ProtectionJobRequestBodyEnvironmentKO365Group string = "kO365Group" - - // ProtectionJobRequestBodyEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionJobRequestBodyEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionJobRequestBodyEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionJobRequestBodyEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionJobRequestBodyEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionJobRequestBodyEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionJobRequestBodyEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionJobRequestBodyEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionJobRequestBody) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobRequestBodyTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobRequestBody) 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 -} - -func (m *ProtectionJobRequestBody) validateEnvironmentParameters(formats strfmt.Registry) error { - if swag.IsZero(m.EnvironmentParameters) { // not required - return nil - } - - if m.EnvironmentParameters != nil { - if err := m.EnvironmentParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateFullProtectionStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.FullProtectionStartTime) { // not required - 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 -} - -func (m *ProtectionJobRequestBody) validateIncrementalProtectionStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalProtectionStartTime) { // not required - 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 -} - -func (m *ProtectionJobRequestBody) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJobRequestBody) validatePolicyID(formats strfmt.Registry) error { - - if err := validate.Required("policyId", "body", m.PolicyID); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJobRequestBody) validatePostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScript) { // not required - 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 -} - -func (m *ProtectionJobRequestBody) validatePreBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreBackupScript) { // not required - 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 -} - -var protectionJobRequestBodyTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobRequestBodyTypePriorityPropEnum = append(protectionJobRequestBodyTypePriorityPropEnum, v) - } -} - -const ( - - // ProtectionJobRequestBodyPriorityKLow captures enum value "kLow" - ProtectionJobRequestBodyPriorityKLow string = "kLow" - - // ProtectionJobRequestBodyPriorityKMedium captures enum value "kMedium" - ProtectionJobRequestBodyPriorityKMedium string = "kMedium" - - // ProtectionJobRequestBodyPriorityKHigh captures enum value "kHigh" - ProtectionJobRequestBodyPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *ProtectionJobRequestBody) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobRequestBodyTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobRequestBody) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -var protectionJobRequestBodyTypeQosTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionJobRequestBodyTypeQosTypePropEnum = append(protectionJobRequestBodyTypeQosTypePropEnum, v) - } -} - -const ( - - // ProtectionJobRequestBodyQosTypeKBackupHDD captures enum value "kBackupHDD" - ProtectionJobRequestBodyQosTypeKBackupHDD string = "kBackupHDD" - - // ProtectionJobRequestBodyQosTypeKBackupSSD captures enum value "kBackupSSD" - ProtectionJobRequestBodyQosTypeKBackupSSD string = "kBackupSSD" - - // ProtectionJobRequestBodyQosTypeKTestAndDevHigh captures enum value "kTestAndDevHigh" - ProtectionJobRequestBodyQosTypeKTestAndDevHigh string = "kTestAndDevHigh" - - // ProtectionJobRequestBodyQosTypeKBackupAll captures enum value "kBackupAll" - ProtectionJobRequestBodyQosTypeKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *ProtectionJobRequestBody) validateQosTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionJobRequestBodyTypeQosTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionJobRequestBody) validateQosType(formats strfmt.Registry) error { - if swag.IsZero(m.QosType) { // not required - return nil - } - - // value enum - if err := m.validateQosTypeEnum("qosType", "body", *m.QosType); err != nil { - return err - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateRemoteScript(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteScript) { // not required - 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 -} - -func (m *ProtectionJobRequestBody) validateRemoteViewConfigList(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteViewConfigList) { // not required - return nil - } - - for i := 0; i < len(m.RemoteViewConfigList); i++ { - if swag.IsZero(m.RemoteViewConfigList[i]) { // not required - continue - } - - if m.RemoteViewConfigList[i] != nil { - if err := m.RemoteViewConfigList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateSourceSpecialParameters(formats strfmt.Registry) error { - - if err := validate.Required("sourceSpecialParameters", "body", m.SourceSpecialParameters); err != nil { - return err - } - - for i := 0; i < len(m.SourceSpecialParameters); i++ { - if swag.IsZero(m.SourceSpecialParameters[i]) { // not required - continue - } - - if m.SourceSpecialParameters[i] != nil { - if err := m.SourceSpecialParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *ProtectionJobRequestBody) validateTaskTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.TaskTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.TaskTimeouts); i++ { - if swag.IsZero(m.TaskTimeouts[i]) { // not required - continue - } - - if m.TaskTimeouts[i] != nil { - if err := m.TaskTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) validateViewBoxID(formats strfmt.Registry) error { - - if err := validate.Required("viewBoxId", "body", m.ViewBoxID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection job request body based on the context it is used -func (m *ProtectionJobRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataMigrationPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnvironmentParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullProtectionStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalProtectionStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteViewConfigList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateAlertingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertingConfig != nil { - - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if err := m.AlertingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateCloudParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudParameters != nil { - - if swag.IsZero(m.CloudParameters) { // not required - return nil - } - - if err := m.CloudParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateDataMigrationPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DataMigrationPolicy != nil { - - if swag.IsZero(m.DataMigrationPolicy) { // not required - return nil - } - - if err := m.DataMigrationPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateEnvironmentParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.EnvironmentParameters != nil { - - if swag.IsZero(m.EnvironmentParameters) { // not required - return nil - } - - if err := m.EnvironmentParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentParameters") - } - return err - } - } - - return nil -} - -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 -} - -func (m *ProtectionJobRequestBody) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -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 -} - -func (m *ProtectionJobRequestBody) contextValidateRemoteViewConfigList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteViewConfigList); i++ { - - if m.RemoteViewConfigList[i] != nil { - - if swag.IsZero(m.RemoteViewConfigList[i]) { // not required - return nil - } - - if err := m.RemoteViewConfigList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateSourceSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceSpecialParameters); i++ { - - if m.SourceSpecialParameters[i] != nil { - - if swag.IsZero(m.SourceSpecialParameters[i]) { // not required - return nil - } - - if err := m.SourceSpecialParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceSpecialParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobRequestBody) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionJobRequestBody) contextValidateTaskTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskTimeouts); i++ { - - if m.TaskTimeouts[i] != nil { - - if swag.IsZero(m.TaskTimeouts[i]) { // not required - return nil - } - - if err := m.TaskTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBody) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_run_stats.go b/v1/models/protection_job_run_stats.go deleted file mode 100644 index bc6853e5..00000000 --- a/v1/models/protection_job_run_stats.go +++ /dev/null @@ -1,144 +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" -) - -// ProtectionJobRunStats Protection Job Run Statistics. -// -// Specifies statistics about a Protection Job Run. -// This contains the Job Run level statistics. -// -// swagger:model ProtectionJobRunStats -type ProtectionJobRunStats struct { - - // Specifies the total amount of data successfully tiered from the source. - TotalBytesTiered *int64 `json:"TotalBytesTiered,omitempty"` - - // Specifies the time the task was unqueued from the queue to start running. - // This field can be used to determine the following times: - // initial-wait-time = admittedTimeUsecs - startTimeUsecs - // run-time = endTimeUsecs - admittedTimeUsecs - // If the task ends up waiting in other queues, then actual run-time will - // be smaller than the run-time computed this way. - // This field is only populated for Backup tasks currently. - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // Specifies the end time of the Protection Run. The end time - // is specified as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the number of application instances backed up by this Run. - // For example if the environment type is kSQL, this field contains - // the number of SQL Server instances. - NumAppInstances *int32 `json:"numAppInstances,omitempty"` - - // Specifies the number of backup tasks that were canceled. - NumCanceledTasks *int64 `json:"numCanceledTasks,omitempty"` - - // Specifies the number of application objects that were cancelled in this - // Run. - NumCancelledAppObjects *int32 `json:"numCancelledAppObjects,omitempty"` - - // Specifies the number of application objects that failed in this Run. - NumFailedAppObjects *int32 `json:"numFailedAppObjects,omitempty"` - - // Specifies the number of backup tasks that failed. - NumFailedTasks *int64 `json:"numFailedTasks,omitempty"` - - // Specifies the number of application objects successfully backed up by this - // Run. For example, if the environment type is kSQL, this number is for - // all of the SQL server databases. - NumSuccessfulAppObjects *int32 `json:"numSuccessfulAppObjects,omitempty"` - - // Specifies the number of backup tasks that completed successfully. - NumSuccessfulTasks *int64 `json:"numSuccessfulTasks,omitempty"` - - // Specifies the time when gatekeeper permit is granted to the backup task. - // If the backup task is rescheduled due to errors, the field is updated to - // the time when permit is granted again. - PermitGrantTimeUsecs *int64 `json:"permitGrantTimeUsecs,omitempty"` - - // "Specifies the duration between the startTime and when gatekeeper permit is - // granted to the backup task. If the backup task is rescheduled due to - // errors, the field is updated considering the time when permit is granted - // again. - // Queue duration = PermitGrantTimeUsecs - StartTimeUsecs" - QueueDurationUsecs *int64 `json:"queueDurationUsecs,omitempty"` - - // Specifies the start time of the Protection Run. The start time - // is specified as a Unix epoch Timestamp (in microseconds). - // This time is when the task is queued to an internal queue where tasks - // are waiting to run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the actual execution time for the protection run to complete - // the backup task and the copy tasks. This time will not include the - // time waited in various internal queues. - // This field is only populated for Backup tasks currently. - TimeTakenUsecs *int64 `json:"timeTakenUsecs,omitempty"` - - // Specifies the total amount of data read from the source (so far). - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Specifies the total amount of data expected to be read from the - // source. - TotalBytesToReadFromSource *int64 `json:"totalBytesToReadFromSource,omitempty"` - - // Specifies the size of the source object (such as a VM) protected by - // this task on the primary storage after the snapshot is taken. - // The logical size of the data on the source if the - // data is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Specifies the total amount of physical space used on the Cohesity - // Cluster to store the protected object after being reduced by change-block - // tracking, compression and deduplication. For example, if the logical - // backup size is 1GB, but only 1MB was used on the Cohesity Cluster - // to store it, this field be equal to 1MB. - TotalPhysicalBackupSizeBytes *int64 `json:"totalPhysicalBackupSizeBytes,omitempty"` - - // Specifies the size of the source object (such as a VM) protected by - // this task on the primary storage before the snapshot is taken. - // The logical size of the data on the source if the - // data is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - TotalSourceSizeBytes *int64 `json:"totalSourceSizeBytes,omitempty"` -} - -// Validate validates this protection job run stats -func (m *ProtectionJobRunStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection job run stats based on context it is used -func (m *ProtectionJobRunStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRunStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRunStats) UnmarshalBinary(b []byte) error { - var res ProtectionJobRunStats - 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_summary.go b/v1/models/protection_job_summary.go deleted file mode 100644 index adcdadd6..00000000 --- a/v1/models/protection_job_summary.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/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobSummary Specifies Protection Job summary of an object. -// -// swagger:model ProtectionJobSummary -type ProtectionJobSummary struct { - - // Specifies the id of the cluster on which object is protected. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster on which object is protected. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies if the Protection Job is created by an RPO policy. - IsRpoJob *bool `json:"isRpoJob,omitempty"` - - // Specifies the id of the Protection Job. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the name of the Protection Job. - JobName *string `json:"jobName,omitempty"` - - // Specifies the last job run status. - LastProtectionJobRunStatus *int32 `json:"lastProtectionJobRunStatus,omitempty"` - - // Specifies the id of the policy that is used by a Protection Job. - // Format of policy id will be like following: - // clusterid:clusterincarnationid:policyid. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the name of the policy that is used by a Protection Job. - PolicyName *string `json:"policyName,omitempty"` -} - -// Validate validates this protection job summary -func (m *ProtectionJobSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection job summary based on context it is used -func (m *ProtectionJobSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobSummary) UnmarshalBinary(b []byte) error { - var res ProtectionJobSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_summary_for_policies.go b/v1/models/protection_job_summary_for_policies.go deleted file mode 100644 index df4b255f..00000000 --- a/v1/models/protection_job_summary_for_policies.go +++ /dev/null @@ -1,228 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobSummaryForPolicies ProtectionJobSummaryForPolicies is the summary of a Protection -// Jobs associated with the Specified Protection Policy. This is only -// populated for a policy of type kRegular. -// -// swagger:model ProtectionJobSummaryForPolicies -type ProtectionJobSummaryForPolicies struct { - - // Specifies details about the last Backup task. - // A Backup task captures the original backup snapshots. - BackupRun *BackupRun `json:"backupRun,omitempty"` - - // Specifies details about the Copy tasks of the Job Run. - // A Copy task copies the captured snapshots to an external target - // or a Remote Cohesity Cluster. - CopyRuns []*CopyRun `json:"copyRuns"` - - // Specifies the Protection job information. - ProtectionJob *ProtectionJob `json:"protectionJob,omitempty"` -} - -// Validate validates this protection job summary for policies -func (m *ProtectionJobSummaryForPolicies) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJob(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobSummaryForPolicies) validateBackupRun(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if m.BackupRun != nil { - if err := m.BackupRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobSummaryForPolicies) validateCopyRuns(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRuns) { // not required - return nil - } - - for i := 0; i < len(m.CopyRuns); i++ { - if swag.IsZero(m.CopyRuns[i]) { // not required - continue - } - - if m.CopyRuns[i] != nil { - if err := m.CopyRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobSummaryForPolicies) validateProtectionJob(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJob) { // not required - return nil - } - - if m.ProtectionJob != nil { - if err := m.ProtectionJob.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJob") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection job summary for policies based on the context it is used -func (m *ProtectionJobSummaryForPolicies) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJob(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionJobSummaryForPolicies) contextValidateBackupRun(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupRun != nil { - - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if err := m.BackupRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionJobSummaryForPolicies) contextValidateCopyRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyRuns); i++ { - - if m.CopyRuns[i] != nil { - - if swag.IsZero(m.CopyRuns[i]) { // not required - return nil - } - - if err := m.CopyRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionJobSummaryForPolicies) contextValidateProtectionJob(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionJob != nil { - - if swag.IsZero(m.ProtectionJob) { // not required - return nil - } - - if err := m.ProtectionJob.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJob") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJob") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobSummaryForPolicies) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobSummaryForPolicies) UnmarshalBinary(b []byte) error { - var res ProtectionJobSummaryForPolicies - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_summary_stats.go b/v1/models/protection_job_summary_stats.go deleted file mode 100644 index 738ef76e..00000000 --- a/v1/models/protection_job_summary_stats.go +++ /dev/null @@ -1,90 +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" -) - -// ProtectionJobSummaryStats Protection Job Summary Statistics. -// -// Specifies statistics about a Protection Job. -// -// swagger:model ProtectionJobSummaryStats -type ProtectionJobSummaryStats struct { - - // Specifies the average run time of all successful Protection Runs. - // It is specified as a Unix epoch Timestamp (in microseconds). - AverageRunTimeUsecs *int64 `json:"averageRunTimeUsecs,omitempty"` - - // Specifies the time taken for a fastest successful Protection Run so far. - // It is specified as a Unix epoch Timestamp (in microseconds). - FastestRunTimeUsecs *int64 `json:"fastestRunTimeUsecs,omitempty"` - - // Specifies the number of runs that were cancelled. - NumCanceledRuns *int64 `json:"numCanceledRuns,omitempty"` - - // Specifies the number of runs that failed to finish. - NumFailedRuns *int64 `json:"numFailedRuns,omitempty"` - - // Specifies the number of runs having SLA violations. - NumSLAViolations *int64 `json:"numSlaViolations,omitempty"` - - // Specifies the number of runs that finished successfully. - NumSuccessfulRuns *int64 `json:"numSuccessfulRuns,omitempty"` - - // Specifies the time taken for a slowest successful Protection Run so far. - // It is specified as a Unix epoch Timestamp (in microseconds). - SlowestRunTimeUsecs *int64 `json:"slowestRunTimeUsecs,omitempty"` - - // Specifies the total amount of data read from the source (so far). - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Specifies the size of the source object (such as a VM) protected by - // this task on the primary storage after the snapshot is taken. - // The logical size of the data on the source if the - // data is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Specifies the total amount of physical space used on the Cohesity - // Cluster to store the protected object after being reduced by change-block - // tracking, compression and deduplication. For example, if the logical - // backup size is 1GB, but only 1MB was used on the Cohesity Cluster - // to store it, this field be equal to 1MB. - TotalPhysicalBackupSizeBytes *int64 `json:"totalPhysicalBackupSizeBytes,omitempty"` -} - -// Validate validates this protection job summary stats -func (m *ProtectionJobSummaryStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection job summary stats based on context it is used -func (m *ProtectionJobSummaryStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobSummaryStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobSummaryStats) UnmarshalBinary(b []byte) error { - var res ProtectionJobSummaryStats - 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 deleted file mode 100644 index b913c874..00000000 --- a/v1/models/protection_object_summary.go +++ /dev/null @@ -1,306 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionObjectSummary protection object summary -// -// swagger:model ProtectionObjectSummary -type ProtectionObjectSummary struct { - - // Specifies the Unix epoch Timestamp (in microseconds) of the latest - // Archival Snapshot. - LatestArchivalSnapshotTimeUsecs *int64 `json:"latestArchivalSnapshotTimeUsecs,omitempty"` - - // Specifies the Unix epoch Timestamp (in microseconds) of the latest - // Local Snapshot. - LatestLocalSnapshotTimeUsecs *int64 `json:"latestLocalSnapshotTimeUsecs,omitempty"` - - // Specifies the Unix epoch Timestamp (in microseconds) of the latest - // Replication Snapshot. - LatestReplicationSnapshotTimeUsecs *int64 `json:"latestReplicationSnapshotTimeUsecs,omitempty"` - - // Specifies the parent Protection Source object such as vCenter. - ParentProtectionSource *ProtectionSource `json:"parentProtectionSource,omitempty"` - - // Returns the list of Protection Jobs with summary Information. - ProtectionJobs []*ProtectionRunInstance `json:"protectionJobs"` - - // protection source - ProtectionSource *ProtectionObjectSummaryProtectionSource `json:"protectionSource,omitempty"` - - // Specifies the id of the RPO policy protecting this object. - RpoPolicies []*ProtectionPolicy `json:"rpoPolicies"` - - // Specifies the total number of Archival Snapshots. - TotalArchivalSnapshots *int32 `json:"totalArchivalSnapshots,omitempty"` - - // Specifies the total number of Local Snapshots. - TotalLocalSnapshots *int32 `json:"totalLocalSnapshots,omitempty"` - - // Specifies the total number of Replication Snapshots. - TotalReplicationSnapshots *int32 `json:"totalReplicationSnapshots,omitempty"` -} - -// Validate validates this protection object summary -func (m *ProtectionObjectSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParentProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJobs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionObjectSummary) validateParentProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentProtectionSource) { // not required - return nil - } - - if m.ParentProtectionSource != nil { - if err := m.ParentProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ProtectionObjectSummary) validateProtectionJobs(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobs) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobs); i++ { - if swag.IsZero(m.ProtectionJobs[i]) { // not required - continue - } - - if m.ProtectionJobs[i] != nil { - if err := m.ProtectionJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionObjectSummary) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectionObjectSummary) validateRpoPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.RpoPolicies) { // not required - return nil - } - - for i := 0; i < len(m.RpoPolicies); i++ { - if swag.IsZero(m.RpoPolicies[i]) { // not required - continue - } - - if m.RpoPolicies[i] != nil { - if err := m.RpoPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection object summary based on the context it is used -func (m *ProtectionObjectSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParentProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpoPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionObjectSummary) contextValidateParentProtectionSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentProtectionSource != nil { - - if swag.IsZero(m.ParentProtectionSource) { // not required - return nil - } - - if err := m.ParentProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentProtectionSource") - } - return err - } - } - - return nil -} - -func (m *ProtectionObjectSummary) contextValidateProtectionJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobs); i++ { - - if m.ProtectionJobs[i] != nil { - - if swag.IsZero(m.ProtectionJobs[i]) { // not required - return nil - } - - if err := m.ProtectionJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionObjectSummary) contextValidateRpoPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RpoPolicies); i++ { - - if m.RpoPolicies[i] != nil { - - if swag.IsZero(m.RpoPolicies[i]) { // not required - return nil - } - - if err := m.RpoPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionObjectSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionObjectSummary) UnmarshalBinary(b []byte) error { - var res ProtectionObjectSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index a67a8ad4..00000000 --- a/v1/models/protection_policy.go +++ /dev/null @@ -1,1171 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionPolicy protection policy -// -// swagger:model ProtectionPolicy -type ProtectionPolicy struct { - - // Backup Run timeouts after which a run will get cancelled. - BackupRunTimeouts []*CancellationTimeoutParams `json:"backupRunTimeouts"` - - // Array of QuietTime Periods. - // - // If specified, this field defines black periods when new Job Runs - // are not started. If a Job Run has been scheduled but not yet - // executed and the QuietTime period starts, the behavior depends on - // the policy field AbortInBlackoutPeriod. - BlackoutPeriods []*BlackoutPeriod `json:"blackoutPeriods"` - - // CDP Job Policy. - // - // Specifies the CDP backup schedule of a Protection Job and how long - // log files captured by this schedule are retained on the - // Cohesity Cluster. - CdpSchedulingPolicy *SchedulingPolicy `json:"cdpSchedulingPolicy,omitempty"` - - // Array of Cloud Deploy Policies. - // - // Specifies settings for copying Snapshots to Cloud. - // CloudDeploy target where backup snapshots may be converted and stored. - // It also defines the retention of copied Snapshots on the Cloud. - CloudDeployPolicies []*SnapshotCloudCopyPolicy `json:"cloudDeployPolicies"` - - // Specifies WORM retention type for the incremental/full 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. - DatalockConfig *DataLockConfig `json:"datalockConfig,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 - // the datalock. During that time, the snapshots cannot be deleted. - DatalockConfigLog *DataLockConfig `json:"datalockConfigLog,omitempty"` - - // Specifies WORM retention type for the BMR 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. - DatalockConfigSystem *DataLockConfig `json:"datalockConfigSystem,omitempty"` - - // Specifies how many days to retain Snapshots on the Cohesity Cluster. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies the number of days to retain system backups made for bare metal - // recovery. This field is applicable if systemSchedulingPolicy is specified. - DaysToKeepSystem *int64 `json:"daysToKeepSystem,omitempty"` - - // Description of the Protection Policy. - Description *string `json:"description,omitempty"` - - // Specifies additional retention policies that should be applied to the - // backup snapshots. A backup snapshot will be retained up to a time that is - // the maximum of all retention policies that are applicable to it. - ExtendedRetentionPolicies []*ExtendedRetentionPolicy `json:"extendedRetentionPolicies"` - - // full scheduling policy - FullSchedulingPolicy *ProtectionPolicyFullSchedulingPolicy `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"` - - // Specifies if the policy is associated with cascaded replication. - IsCascadedReplicationPolicy *bool `json:"isCascadedReplicationPolicy,omitempty"` - - // Specifies the policy is replicated policy. - IsReplicated *bool `json:"isReplicated,omitempty"` - - // Specifies if the policy can be used to create a job. - IsUsable *bool `json:"isUsable,omitempty"` - - // Specifies the last time this Policy was updated. If this is - // passed into a PUT request, then the backend will validate that the - // timestamp passed in matches the time that the policy was - // actually last modified. If the two timestamps do not match, then the - // request will be rejected with a stale error. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // Log Job Policy. - // - // Specifies the Log backup schedule of a Protection Job and how long - // log files captured by this schedule are retained on the - // Cohesity Cluster. - LogSchedulingPolicy *SchedulingPolicy `json:"logSchedulingPolicy,omitempty"` - - // Specifies the name of the Protection Policy. - Name *string `json:"name,omitempty"` - - // Species the number of policies linked to a global policy. - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - // Specifies the number of mins/hours/days in seconds to retain - // CDP backups if CDP schedule exists. - NumSecsToKeep *int32 `json:"numSecsToKeep,omitempty"` - - // Specifies the parent global policy Id. This must be specified when - // creating a policy from global policy template. - ParentPolicyID *string `json:"parentPolicyId,omitempty"` - - // Specifies the number of times to retry capturing Snapshots before - // the Job Run fails. - Retries *int32 `json:"retries,omitempty"` - - // Specifies the number of minutes before retrying a failed Protection Job. - RetryIntervalMins *int32 `json:"retryIntervalMins,omitempty"` - - // Specifies the RPO Policy related settings. - RpoPolicySettings *RpoPolicySettings `json:"rpoPolicySettings,omitempty"` - - // Specifies the period of time before skipping the execution of new - // Job Runs if an existing queued Job Run of the same Protection Job - // has not started. For example if this field is set to 30 minutes and - // a Job Run is scheduled to start at 5:00 AM every day but does not start - // due to conflicts (such as too many Jobs are running). If the new Job Run - // does not start by 5:30AM, the Cohesity Cluster will skip the new Job Run. - // If the original Job Run completes before 5:30AM the next day, a new - // Job Run is created and starts executing. - // This field is optional. - SkipIntervalMins *int32 `json:"skipIntervalMins,omitempty"` - - // Array of External Targets. - // - // Specifies settings for copying Snapshots to Archival External Targets - // (such as AWS or Tape). - // It also defines the retention of copied Snapshots on an External Targets - // such as AWS and Tape. - SnapshotArchivalCopyPolicies []*SnapshotArchivalCopyPolicy `json:"snapshotArchivalCopyPolicies"` - - // Array of Remote Clusters. - // - // Specifies settings for copying Snapshots to Remote Clusters. - // It also defines the retention of copied Snapshots on a Remote Cluster. - SnapshotReplicationCopyPolicies []*SnapshotReplicationCopyPolicy `json:"snapshotReplicationCopyPolicies"` - - // Storage Array Snapshot Job Policy. - // - // Specifies the storage array snapshot backup schedule of a Protection - // Job and how long snapshot captured by this schedule are retained on the - // Storage Array. - StorageArraySnapshotSchedulingPolicy *SchedulingPolicy `json:"storageArraySnapshotSchedulingPolicy,omitempty"` - - // Agent driven System Job Policy. - // - // Specifies the system backup schedule for agents running on servers to run - // low frequency backup jobs. Images created as part of the backup can be - // used to perform a "bare metal" recovery. - SystemSchedulingPolicy *SchedulingPolicy `json:"systemSchedulingPolicy,omitempty"` - - // Specifies which organizations have been assigned this policy. - // This value is only populated for the cluster admin for now. - TenantIds []string `json:"tenantIds"` - - // Specifies the type of the protection policy. - // 'kRegular' means a regular Protection Policy. - // 'kRPO' means an RPO Protection Policy. - // Enum: ["kRegular","kRPO"] - Type *string `json:"type,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention - // type is specified, the snapshots of the Protection Jobs using this policy - // will be kept until the maximum of the snapshot retention time. During - // that time, the snapshots cannot be deleted. - // This field is deprecated. Use DataLockConfig for incremental runs, - // DataLockConfigLog for log runs, DataLockConfigSystem for BMR runs, and - // DataLockConfig in extended retention and for copy targets config. - // deprecated: true - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this protection policy -func (m *ProtectionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBlackoutPeriods(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfigLog(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfigSystem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetentionPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoPolicySettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotArchivalCopyPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotReplicationCopyPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicy) validateBackupRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.BackupRunTimeouts); i++ { - if swag.IsZero(m.BackupRunTimeouts[i]) { // not required - continue - } - - if m.BackupRunTimeouts[i] != nil { - if err := m.BackupRunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateBlackoutPeriods(formats strfmt.Registry) error { - if swag.IsZero(m.BlackoutPeriods) { // not required - return nil - } - - for i := 0; i < len(m.BlackoutPeriods); i++ { - if swag.IsZero(m.BlackoutPeriods[i]) { // not required - continue - } - - if m.BlackoutPeriods[i] != nil { - if err := m.BlackoutPeriods[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateCdpSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.CdpSchedulingPolicy) { // not required - return nil - } - - if m.CdpSchedulingPolicy != nil { - if err := m.CdpSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateCloudDeployPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployPolicies) { // not required - return nil - } - - for i := 0; i < len(m.CloudDeployPolicies); i++ { - if swag.IsZero(m.CloudDeployPolicies[i]) { // not required - continue - } - - if m.CloudDeployPolicies[i] != nil { - if err := m.CloudDeployPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateDatalockConfigLog(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfigLog) { // not required - return nil - } - - if m.DatalockConfigLog != nil { - if err := m.DatalockConfigLog.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigLog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigLog") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateDatalockConfigSystem(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfigSystem) { // not required - return nil - } - - if m.DatalockConfigSystem != nil { - if err := m.DatalockConfigSystem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigSystem") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateExtendedRetentionPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedRetentionPolicies) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetentionPolicies); i++ { - if swag.IsZero(m.ExtendedRetentionPolicies[i]) { // not required - continue - } - - if m.ExtendedRetentionPolicies[i] != nil { - if err := m.ExtendedRetentionPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateFullSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FullSchedulingPolicy) { // not required - 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 -} - -func (m *ProtectionPolicy) validateIncrementalSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalSchedulingPolicy) { // not required - 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 -} - -func (m *ProtectionPolicy) validateLogSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.LogSchedulingPolicy) { // not required - return nil - } - - if m.LogSchedulingPolicy != nil { - if err := m.LogSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateRpoPolicySettings(formats strfmt.Registry) error { - if swag.IsZero(m.RpoPolicySettings) { // not required - return nil - } - - if m.RpoPolicySettings != nil { - if err := m.RpoPolicySettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicySettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicySettings") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateSnapshotArchivalCopyPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotArchivalCopyPolicies) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotArchivalCopyPolicies); i++ { - if swag.IsZero(m.SnapshotArchivalCopyPolicies[i]) { // not required - continue - } - - if m.SnapshotArchivalCopyPolicies[i] != nil { - if err := m.SnapshotArchivalCopyPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateSnapshotReplicationCopyPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotReplicationCopyPolicies) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotReplicationCopyPolicies); i++ { - if swag.IsZero(m.SnapshotReplicationCopyPolicies[i]) { // not required - continue - } - - if m.SnapshotReplicationCopyPolicies[i] != nil { - if err := m.SnapshotReplicationCopyPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateStorageArraySnapshotSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotSchedulingPolicy) { // not required - return nil - } - - if m.StorageArraySnapshotSchedulingPolicy != nil { - if err := m.StorageArraySnapshotSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateSystemSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SystemSchedulingPolicy) { // not required - return nil - } - - if m.SystemSchedulingPolicy != nil { - if err := m.SystemSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemSchedulingPolicy") - } - return err - } - } - - return nil -} - -var protectionPolicyTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kRPO"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyTypeTypePropEnum = append(protectionPolicyTypeTypePropEnum, v) - } -} - -const ( - - // ProtectionPolicyTypeKRegular captures enum value "kRegular" - ProtectionPolicyTypeKRegular string = "kRegular" - - // ProtectionPolicyTypeKRPO captures enum value "kRPO" - ProtectionPolicyTypeKRPO string = "kRPO" -) - -// prop value enum -func (m *ProtectionPolicy) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicy) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var protectionPolicyTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyTypeWormRetentionTypePropEnum = append(protectionPolicyTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // ProtectionPolicyWormRetentionTypeKNone captures enum value "kNone" - ProtectionPolicyWormRetentionTypeKNone string = "kNone" - - // ProtectionPolicyWormRetentionTypeKCompliance captures enum value "kCompliance" - ProtectionPolicyWormRetentionTypeKCompliance string = "kCompliance" - - // ProtectionPolicyWormRetentionTypeKAdministrative captures enum value "kAdministrative" - ProtectionPolicyWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *ProtectionPolicy) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicy) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection policy based on the context it is used -func (m *ProtectionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBlackoutPeriods(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfigLog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfigSystem(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetentionPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpoPolicySettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotArchivalCopyPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotReplicationCopyPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicy) contextValidateBackupRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupRunTimeouts); i++ { - - if m.BackupRunTimeouts[i] != nil { - - if swag.IsZero(m.BackupRunTimeouts[i]) { // not required - return nil - } - - if err := m.BackupRunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateBlackoutPeriods(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BlackoutPeriods); i++ { - - if m.BlackoutPeriods[i] != nil { - - if swag.IsZero(m.BlackoutPeriods[i]) { // not required - return nil - } - - if err := m.BlackoutPeriods[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateCdpSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpSchedulingPolicy != nil { - - if swag.IsZero(m.CdpSchedulingPolicy) { // not required - return nil - } - - if err := m.CdpSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateCloudDeployPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudDeployPolicies); i++ { - - if m.CloudDeployPolicies[i] != nil { - - if swag.IsZero(m.CloudDeployPolicies[i]) { // not required - return nil - } - - if err := m.CloudDeployPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateDatalockConfigLog(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfigLog != nil { - - if swag.IsZero(m.DatalockConfigLog) { // not required - return nil - } - - if err := m.DatalockConfigLog.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigLog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigLog") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateDatalockConfigSystem(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfigSystem != nil { - - if swag.IsZero(m.DatalockConfigSystem) { // not required - return nil - } - - if err := m.DatalockConfigSystem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigSystem") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateExtendedRetentionPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetentionPolicies); i++ { - - if m.ExtendedRetentionPolicies[i] != nil { - - if swag.IsZero(m.ExtendedRetentionPolicies[i]) { // not required - return nil - } - - if err := m.ExtendedRetentionPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionPolicy) contextValidateLogSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.LogSchedulingPolicy != nil { - - if swag.IsZero(m.LogSchedulingPolicy) { // not required - return nil - } - - if err := m.LogSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateRpoPolicySettings(ctx context.Context, formats strfmt.Registry) error { - - if m.RpoPolicySettings != nil { - - if swag.IsZero(m.RpoPolicySettings) { // not required - return nil - } - - if err := m.RpoPolicySettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicySettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicySettings") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateSnapshotArchivalCopyPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotArchivalCopyPolicies); i++ { - - if m.SnapshotArchivalCopyPolicies[i] != nil { - - if swag.IsZero(m.SnapshotArchivalCopyPolicies[i]) { // not required - return nil - } - - if err := m.SnapshotArchivalCopyPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateSnapshotReplicationCopyPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotReplicationCopyPolicies); i++ { - - if m.SnapshotReplicationCopyPolicies[i] != nil { - - if swag.IsZero(m.SnapshotReplicationCopyPolicies[i]) { // not required - return nil - } - - if err := m.SnapshotReplicationCopyPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateStorageArraySnapshotSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotSchedulingPolicy != nil { - - if swag.IsZero(m.StorageArraySnapshotSchedulingPolicy) { // not required - return nil - } - - if err := m.StorageArraySnapshotSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateSystemSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemSchedulingPolicy != nil { - - if swag.IsZero(m.SystemSchedulingPolicy) { // not required - return nil - } - - if err := m.SystemSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemSchedulingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index 53a1a214..00000000 --- a/v1/models/protection_policy_request.go +++ /dev/null @@ -1,1150 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionPolicyRequest Protection Policy Request. -// -// Specifies information about a Protection Policy. -// -// swagger:model ProtectionPolicyRequest -type ProtectionPolicyRequest struct { - - // Backup Run timeouts after which a run will get cancelled. - BackupRunTimeouts []*CancellationTimeoutParams `json:"backupRunTimeouts"` - - // Array of QuietTime Periods. - // - // If specified, this field defines black periods when new Job Runs - // are not started. If a Job Run has been scheduled but not yet - // executed and the QuietTime period starts, the behavior depends on - // the policy field AbortInBlackoutPeriod. - BlackoutPeriods []*BlackoutPeriod `json:"blackoutPeriods"` - - // CDP Job Policy. - // - // Specifies the CDP backup schedule of a Protection Job and how long - // log files captured by this schedule are retained on the - // Cohesity Cluster. - CdpSchedulingPolicy *SchedulingPolicy `json:"cdpSchedulingPolicy,omitempty"` - - // Array of Cloud Deploy Policies. - // - // Specifies settings for copying Snapshots to Cloud. - // CloudDeploy target where backup snapshots may be converted and stored. - // It also defines the retention of copied Snapshots on the Cloud. - CloudDeployPolicies []*SnapshotCloudCopyPolicy `json:"cloudDeployPolicies"` - - // Specifies WORM retention type for the incremental/full 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. - DatalockConfig *DataLockConfig `json:"datalockConfig,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 - // the datalock. During that time, the snapshots cannot be deleted. - DatalockConfigLog *DataLockConfig `json:"datalockConfigLog,omitempty"` - - // Specifies WORM retention type for the BMR 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. - DatalockConfigSystem *DataLockConfig `json:"datalockConfigSystem,omitempty"` - - // Specifies how many days to retain Snapshots on the Cohesity Cluster. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies the number of days to retain system backups made for bare metal - // recovery. This field is applicable if systemSchedulingPolicy is specified. - DaysToKeepSystem *int64 `json:"daysToKeepSystem,omitempty"` - - // Description of the Protection Policy. - Description *string `json:"description,omitempty"` - - // Specifies additional retention policies that should be applied to the - // backup snapshots. A backup snapshot will be retained up to a time that is - // the maximum of all retention policies that are applicable to it. - ExtendedRetentionPolicies []*ExtendedRetentionPolicy `json:"extendedRetentionPolicies"` - - // full scheduling policy - FullSchedulingPolicy *ProtectionPolicyRequestFullSchedulingPolicy `json:"fullSchedulingPolicy,omitempty"` - - // incremental scheduling policy - IncrementalSchedulingPolicy *ProtectionPolicyRequestIncrementalSchedulingPolicy `json:"incrementalSchedulingPolicy,omitempty"` - - // Log Job Policy. - // - // Specifies the Log backup schedule of a Protection Job and how long - // log files captured by this schedule are retained on the - // Cohesity Cluster. - LogSchedulingPolicy *SchedulingPolicy `json:"logSchedulingPolicy,omitempty"` - - // Specifies the name of the Protection Policy. - Name *string `json:"name,omitempty"` - - // Species the number of policies linked to a global policy. - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - // Specifies the number of mins/hours/days in seconds to retain - // CDP backups if CDP schedule exists. - NumSecsToKeep *int32 `json:"numSecsToKeep,omitempty"` - - // Specifies the parent global policy Id. This must be specified when - // creating a policy from global policy template. - ParentPolicyID *string `json:"parentPolicyId,omitempty"` - - // Specifies the number of times to retry capturing Snapshots before - // the Job Run fails. - Retries *int32 `json:"retries,omitempty"` - - // Specifies the number of minutes before retrying a failed Protection Job. - RetryIntervalMins *int32 `json:"retryIntervalMins,omitempty"` - - // Specifies the RPO Policy related settings. - RpoPolicySettings *RpoPolicySettings `json:"rpoPolicySettings,omitempty"` - - // Specifies the period of time before skipping the execution of new - // Job Runs if an existing queued Job Run of the same Protection Job - // has not started. For example if this field is set to 30 minutes and - // a Job Run is scheduled to start at 5:00 AM every day but does not start - // due to conflicts (such as too many Jobs are running). If the new Job Run - // does not start by 5:30AM, the Cohesity Cluster will skip the new Job Run. - // If the original Job Run completes before 5:30AM the next day, a new - // Job Run is created and starts executing. - // This field is optional. - SkipIntervalMins *int32 `json:"skipIntervalMins,omitempty"` - - // Array of External Targets. - // - // Specifies settings for copying Snapshots to Archival External Targets - // (such as AWS or Tape). - // It also defines the retention of copied Snapshots on an External Targets - // such as AWS and Tape. - SnapshotArchivalCopyPolicies []*SnapshotArchivalCopyPolicy `json:"snapshotArchivalCopyPolicies"` - - // Array of Remote Clusters. - // - // Specifies settings for copying Snapshots to Remote Clusters. - // It also defines the retention of copied Snapshots on a Remote Cluster. - SnapshotReplicationCopyPolicies []*SnapshotReplicationCopyPolicy `json:"snapshotReplicationCopyPolicies"` - - // Storage Array Snapshot Job Policy. - // - // Specifies the storage array snapshot backup schedule of a Protection - // Job and how long snapshot captured by this schedule are retained on the - // Storage Array. - StorageArraySnapshotSchedulingPolicy *SchedulingPolicy `json:"storageArraySnapshotSchedulingPolicy,omitempty"` - - // Agent driven System Job Policy. - // - // Specifies the system backup schedule for agents running on servers to run - // low frequency backup jobs. Images created as part of the backup can be - // used to perform a "bare metal" recovery. - SystemSchedulingPolicy *SchedulingPolicy `json:"systemSchedulingPolicy,omitempty"` - - // Specifies the type of the protection policy. - // 'kRegular' means a regular Protection Policy. - // 'kRPO' means an RPO Protection Policy. - // Enum: ["kRegular","kRPO"] - Type *string `json:"type,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention - // type is specified, the snapshots of the Protection Jobs using this policy - // will be kept until the maximum of the snapshot retention time. During - // that time, the snapshots cannot be deleted. - // This field is deprecated. Use DataLockConfig for incremental runs, - // DataLockConfigLog for log runs, DataLockConfigSystem for BMR runs, and - // DataLockConfig in extended retention and for copy targets config. - // deprecated: true - // 'kNone' implies there is no WORM retention set. - // 'kCompliance' implies WORM retention is set for compliance reason. - // 'kAdministrative' implies WORM retention is set for administrative purposes. - // Enum: ["kNone","kCompliance","kAdministrative"] - WormRetentionType *string `json:"wormRetentionType,omitempty"` -} - -// Validate validates this protection policy request -func (m *ProtectionPolicyRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBlackoutPeriods(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfigLog(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfigSystem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetentionPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoPolicySettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotArchivalCopyPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotReplicationCopyPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormRetentionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicyRequest) validateBackupRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.BackupRunTimeouts); i++ { - if swag.IsZero(m.BackupRunTimeouts[i]) { // not required - continue - } - - if m.BackupRunTimeouts[i] != nil { - if err := m.BackupRunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateBlackoutPeriods(formats strfmt.Registry) error { - if swag.IsZero(m.BlackoutPeriods) { // not required - return nil - } - - for i := 0; i < len(m.BlackoutPeriods); i++ { - if swag.IsZero(m.BlackoutPeriods[i]) { // not required - continue - } - - if m.BlackoutPeriods[i] != nil { - if err := m.BlackoutPeriods[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateCdpSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.CdpSchedulingPolicy) { // not required - return nil - } - - if m.CdpSchedulingPolicy != nil { - if err := m.CdpSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateCloudDeployPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployPolicies) { // not required - return nil - } - - for i := 0; i < len(m.CloudDeployPolicies); i++ { - if swag.IsZero(m.CloudDeployPolicies[i]) { // not required - continue - } - - if m.CloudDeployPolicies[i] != nil { - if err := m.CloudDeployPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateDatalockConfigLog(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfigLog) { // not required - return nil - } - - if m.DatalockConfigLog != nil { - if err := m.DatalockConfigLog.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigLog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigLog") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateDatalockConfigSystem(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfigSystem) { // not required - return nil - } - - if m.DatalockConfigSystem != nil { - if err := m.DatalockConfigSystem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigSystem") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateExtendedRetentionPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedRetentionPolicies) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetentionPolicies); i++ { - if swag.IsZero(m.ExtendedRetentionPolicies[i]) { // not required - continue - } - - if m.ExtendedRetentionPolicies[i] != nil { - if err := m.ExtendedRetentionPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateFullSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FullSchedulingPolicy) { // not required - 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 -} - -func (m *ProtectionPolicyRequest) validateIncrementalSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalSchedulingPolicy) { // not required - 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 -} - -func (m *ProtectionPolicyRequest) validateLogSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.LogSchedulingPolicy) { // not required - return nil - } - - if m.LogSchedulingPolicy != nil { - if err := m.LogSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateRpoPolicySettings(formats strfmt.Registry) error { - if swag.IsZero(m.RpoPolicySettings) { // not required - return nil - } - - if m.RpoPolicySettings != nil { - if err := m.RpoPolicySettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicySettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicySettings") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateSnapshotArchivalCopyPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotArchivalCopyPolicies) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotArchivalCopyPolicies); i++ { - if swag.IsZero(m.SnapshotArchivalCopyPolicies[i]) { // not required - continue - } - - if m.SnapshotArchivalCopyPolicies[i] != nil { - if err := m.SnapshotArchivalCopyPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateSnapshotReplicationCopyPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotReplicationCopyPolicies) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotReplicationCopyPolicies); i++ { - if swag.IsZero(m.SnapshotReplicationCopyPolicies[i]) { // not required - continue - } - - if m.SnapshotReplicationCopyPolicies[i] != nil { - if err := m.SnapshotReplicationCopyPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateStorageArraySnapshotSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotSchedulingPolicy) { // not required - return nil - } - - if m.StorageArraySnapshotSchedulingPolicy != nil { - if err := m.StorageArraySnapshotSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) validateSystemSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SystemSchedulingPolicy) { // not required - return nil - } - - if m.SystemSchedulingPolicy != nil { - if err := m.SystemSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemSchedulingPolicy") - } - return err - } - } - - return nil -} - -var protectionPolicyRequestTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kRPO"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyRequestTypeTypePropEnum = append(protectionPolicyRequestTypeTypePropEnum, v) - } -} - -const ( - - // ProtectionPolicyRequestTypeKRegular captures enum value "kRegular" - ProtectionPolicyRequestTypeKRegular string = "kRegular" - - // ProtectionPolicyRequestTypeKRPO captures enum value "kRPO" - ProtectionPolicyRequestTypeKRPO string = "kRPO" -) - -// prop value enum -func (m *ProtectionPolicyRequest) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyRequestTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicyRequest) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var protectionPolicyRequestTypeWormRetentionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kCompliance","kAdministrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyRequestTypeWormRetentionTypePropEnum = append(protectionPolicyRequestTypeWormRetentionTypePropEnum, v) - } -} - -const ( - - // ProtectionPolicyRequestWormRetentionTypeKNone captures enum value "kNone" - ProtectionPolicyRequestWormRetentionTypeKNone string = "kNone" - - // ProtectionPolicyRequestWormRetentionTypeKCompliance captures enum value "kCompliance" - ProtectionPolicyRequestWormRetentionTypeKCompliance string = "kCompliance" - - // ProtectionPolicyRequestWormRetentionTypeKAdministrative captures enum value "kAdministrative" - ProtectionPolicyRequestWormRetentionTypeKAdministrative string = "kAdministrative" -) - -// prop value enum -func (m *ProtectionPolicyRequest) validateWormRetentionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyRequestTypeWormRetentionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicyRequest) validateWormRetentionType(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetentionType) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionTypeEnum("wormRetentionType", "body", *m.WormRetentionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection policy request based on the context it is used -func (m *ProtectionPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBlackoutPeriods(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfigLog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfigSystem(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetentionPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpoPolicySettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotArchivalCopyPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotReplicationCopyPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateBackupRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupRunTimeouts); i++ { - - if m.BackupRunTimeouts[i] != nil { - - if swag.IsZero(m.BackupRunTimeouts[i]) { // not required - return nil - } - - if err := m.BackupRunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRunTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateBlackoutPeriods(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BlackoutPeriods); i++ { - - if m.BlackoutPeriods[i] != nil { - - if swag.IsZero(m.BlackoutPeriods[i]) { // not required - return nil - } - - if err := m.BlackoutPeriods[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutPeriods" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateCdpSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpSchedulingPolicy != nil { - - if swag.IsZero(m.CdpSchedulingPolicy) { // not required - return nil - } - - if err := m.CdpSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateCloudDeployPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudDeployPolicies); i++ { - - if m.CloudDeployPolicies[i] != nil { - - if swag.IsZero(m.CloudDeployPolicies[i]) { // not required - return nil - } - - if err := m.CloudDeployPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateDatalockConfigLog(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfigLog != nil { - - if swag.IsZero(m.DatalockConfigLog) { // not required - return nil - } - - if err := m.DatalockConfigLog.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigLog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigLog") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateDatalockConfigSystem(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfigSystem != nil { - - if swag.IsZero(m.DatalockConfigSystem) { // not required - return nil - } - - if err := m.DatalockConfigSystem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfigSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfigSystem") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateExtendedRetentionPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetentionPolicies); i++ { - - if m.ExtendedRetentionPolicies[i] != nil { - - if swag.IsZero(m.ExtendedRetentionPolicies[i]) { // not required - return nil - } - - if err := m.ExtendedRetentionPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionPolicyRequest) contextValidateLogSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.LogSchedulingPolicy != nil { - - if swag.IsZero(m.LogSchedulingPolicy) { // not required - return nil - } - - if err := m.LogSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateRpoPolicySettings(ctx context.Context, formats strfmt.Registry) error { - - if m.RpoPolicySettings != nil { - - if swag.IsZero(m.RpoPolicySettings) { // not required - return nil - } - - if err := m.RpoPolicySettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoPolicySettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoPolicySettings") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateSnapshotArchivalCopyPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotArchivalCopyPolicies); i++ { - - if m.SnapshotArchivalCopyPolicies[i] != nil { - - if swag.IsZero(m.SnapshotArchivalCopyPolicies[i]) { // not required - return nil - } - - if err := m.SnapshotArchivalCopyPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotArchivalCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateSnapshotReplicationCopyPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotReplicationCopyPolicies); i++ { - - if m.SnapshotReplicationCopyPolicies[i] != nil { - - if swag.IsZero(m.SnapshotReplicationCopyPolicies[i]) { // not required - return nil - } - - if err := m.SnapshotReplicationCopyPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotReplicationCopyPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateStorageArraySnapshotSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotSchedulingPolicy != nil { - - if swag.IsZero(m.StorageArraySnapshotSchedulingPolicy) { // not required - return nil - } - - if err := m.StorageArraySnapshotSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotSchedulingPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicyRequest) contextValidateSystemSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemSchedulingPolicy != nil { - - if swag.IsZero(m.SystemSchedulingPolicy) { // not required - return nil - } - - if err := m.SystemSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemSchedulingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyRequest) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_policy_summary.go b/v1/models/protection_policy_summary.go deleted file mode 100644 index 0669f76e..00000000 --- a/v1/models/protection_policy_summary.go +++ /dev/null @@ -1,346 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicySummary ProtectionPolicySummary specifies protection summary of a given -// Protection Policy. -// -// swagger:model ProtectionPolicySummary -type ProtectionPolicySummary struct { - - // Specifies the summary of the last Protection Runs of all the related - // Protection Sources and Protection Jobs. - LastProtectionRunSummary *LastProtectionRunSummary `json:"lastProtectionRunSummary,omitempty"` - - // If there are more results to display, use this value to get - // the next set of results, by using this value in paginationCookie param - // for the next request to GetProtectionPolicySummary. - PaginationCookie *string `json:"paginationCookie,omitempty"` - - // Specifies the list of Protection Sources which are protected under the - // given policy. This is only populated if the policy is of type kRPO. - ProtectedSourcesSummary []*ProtectedSourceSummary `json:"protectedSourcesSummary"` - - // Specifies the list of Protection Jobs associated with the given - // Protection Policy. This is only populated if the type of the - // Protection Policy is kRegular. - ProtectionJobsSummary []*ProtectionJobSummaryForPolicies `json:"protectionJobsSummary"` - - // Specifies the Protection Policy for which the summary is requested. - ProtectionPolicy *ProtectionPolicy `json:"protectionPolicy,omitempty"` - - // Specifies the aggregated summary of the Protection Runs. - ProtectionRunsSummary *ProtectionRunsSummary `json:"protectionRunsSummary,omitempty"` -} - -// Validate validates this protection policy summary -func (m *ProtectionPolicySummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastProtectionRunSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedSourcesSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJobsSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionRunsSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicySummary) validateLastProtectionRunSummary(formats strfmt.Registry) error { - if swag.IsZero(m.LastProtectionRunSummary) { // not required - return nil - } - - if m.LastProtectionRunSummary != nil { - if err := m.LastProtectionRunSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastProtectionRunSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastProtectionRunSummary") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicySummary) validateProtectedSourcesSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedSourcesSummary) { // not required - return nil - } - - for i := 0; i < len(m.ProtectedSourcesSummary); i++ { - if swag.IsZero(m.ProtectedSourcesSummary[i]) { // not required - continue - } - - if m.ProtectedSourcesSummary[i] != nil { - if err := m.ProtectedSourcesSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicySummary) validateProtectionJobsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobsSummary) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobsSummary); i++ { - if swag.IsZero(m.ProtectionJobsSummary[i]) { // not required - continue - } - - if m.ProtectionJobsSummary[i] != nil { - if err := m.ProtectionJobsSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicySummary) validateProtectionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionPolicy) { // not required - return nil - } - - if m.ProtectionPolicy != nil { - if err := m.ProtectionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicySummary) validateProtectionRunsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRunsSummary) { // not required - return nil - } - - if m.ProtectionRunsSummary != nil { - if err := m.ProtectionRunsSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsSummary") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection policy summary based on the context it is used -func (m *ProtectionPolicySummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastProtectionRunSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedSourcesSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJobsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionRunsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicySummary) contextValidateLastProtectionRunSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.LastProtectionRunSummary != nil { - - if swag.IsZero(m.LastProtectionRunSummary) { // not required - return nil - } - - if err := m.LastProtectionRunSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastProtectionRunSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastProtectionRunSummary") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicySummary) contextValidateProtectedSourcesSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectedSourcesSummary); i++ { - - if m.ProtectedSourcesSummary[i] != nil { - - if swag.IsZero(m.ProtectedSourcesSummary[i]) { // not required - return nil - } - - if err := m.ProtectedSourcesSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicySummary) contextValidateProtectionJobsSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobsSummary); i++ { - - if m.ProtectionJobsSummary[i] != nil { - - if swag.IsZero(m.ProtectionJobsSummary[i]) { // not required - return nil - } - - if err := m.ProtectionJobsSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicySummary) contextValidateProtectionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionPolicy != nil { - - if swag.IsZero(m.ProtectionPolicy) { // not required - return nil - } - - if err := m.ProtectionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicySummary) contextValidateProtectionRunsSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionRunsSummary != nil { - - if swag.IsZero(m.ProtectionRunsSummary) { // not required - return nil - } - - if err := m.ProtectionRunsSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsSummary") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicySummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicySummary) UnmarshalBinary(b []byte) error { - var res ProtectionPolicySummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_run_errors.go b/v1/models/protection_run_errors.go deleted file mode 100644 index 6dbe3ee9..00000000 --- a/v1/models/protection_run_errors.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunErrors ProtectionRunErrors defines the struct of errors returned for the task. -// -// swagger:model ProtectionRunErrors -type ProtectionRunErrors struct { - - // Specifies the list of errors encountered by a task during a protection - // run. - Errors []*RequestError `json:"errors"` - - // Specifies the list of filenames with errors encountered by a task during a - // protection run. - FileNames []string `json:"fileNames"` - - // Specifies the cookie for next set of results. - PaginationCookie *string `json:"paginationCookie,omitempty"` -} - -// Validate validates this protection run errors -func (m *ProtectionRunErrors) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateErrors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunErrors) validateErrors(formats strfmt.Registry) error { - if swag.IsZero(m.Errors) { // not required - return nil - } - - for i := 0; i < len(m.Errors); i++ { - if swag.IsZero(m.Errors[i]) { // not required - continue - } - - if m.Errors[i] != nil { - if err := m.Errors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("errors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection run errors based on the context it is used -func (m *ProtectionRunErrors) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateErrors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunErrors) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Errors); i++ { - - if m.Errors[i] != nil { - - if swag.IsZero(m.Errors[i]) { // not required - return nil - } - - if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("errors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunErrors) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunErrors) UnmarshalBinary(b []byte) error { - var res ProtectionRunErrors - 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 deleted file mode 100644 index 9caf17cb..00000000 --- a/v1/models/protection_run_instance.go +++ /dev/null @@ -1,293 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunInstance Protection Job Run Instance. -// -// Specifies the status of one Job Run. -// A Job Run can have one Backup Run and zero or more Copy Runs. -// -// swagger:model ProtectionRunInstance -type ProtectionRunInstance struct { - - // Specifies details about the Backup task. - // A Backup task captures the original backup snapshots. - BackupRun *BackupRun `json:"backupRun,omitempty"` - - // Array of Copy Run Tasks. - // - // Specifies details about the Copy tasks of this Job Run. - // A Copy task copies the captured snapshots to an external target - // or a Remote Cohesity Cluster. - CopyRun []*CopyRun `json:"copyRun"` - - // Specifies the id of the Protection Job that was run. - JobID *int64 `json:"jobId,omitempty"` - - // 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 shell information about the protection run. This - // will only be populated if OnlyReturnShellInfo is sent as true. - ProtectionShellInfo *ProtectionShellInfo `json:"protectionShellInfo,omitempty"` - - // Specifies the Storage Domain (View Box) to store the backed up data. - // Specify the id of the Storage Domain (View Box). - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this protection run instance -func (m *ProtectionRunInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionShellInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunInstance) validateBackupRun(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if m.BackupRun != nil { - if err := m.BackupRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunInstance) validateCopyRun(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRun) { // not required - return nil - } - - for i := 0; i < len(m.CopyRun); i++ { - if swag.IsZero(m.CopyRun[i]) { // not required - continue - } - - if m.CopyRun[i] != nil { - if err := m.CopyRun[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionRunInstance) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *ProtectionRunInstance) validateProtectionShellInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionShellInfo) { // not required - return nil - } - - if m.ProtectionShellInfo != nil { - if err := m.ProtectionShellInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionShellInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionShellInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection run instance based on the context it is used -func (m *ProtectionRunInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionShellInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunInstance) contextValidateBackupRun(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupRun != nil { - - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if err := m.BackupRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunInstance) contextValidateCopyRun(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyRun); i++ { - - if m.CopyRun[i] != nil { - - if swag.IsZero(m.CopyRun[i]) { // not required - return nil - } - - if err := m.CopyRun[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionRunInstance) contextValidateProtectionShellInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionShellInfo != nil { - - if swag.IsZero(m.ProtectionShellInfo) { // not required - return nil - } - - if err := m.ProtectionShellInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionShellInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionShellInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunInstance) UnmarshalBinary(b []byte) error { - var res ProtectionRunInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_run_response.go b/v1/models/protection_run_response.go deleted file mode 100644 index 29e79150..00000000 --- a/v1/models/protection_run_response.go +++ /dev/null @@ -1,246 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunResponse Specifies the information about the Protection Runs across all snapshot -// target locations. -// -// swagger:model ProtectionRunResponse -type ProtectionRunResponse struct { - - // Specifies the list of archival job information. - ArchivalRuns []*LatestProtectionJobRunInfo `json:"archivalRuns"` - - // Specifies the list of local backup job information. - BackupRuns []*LatestProtectionJobRunInfo `json:"backupRuns"` - - // Specifies the list of replication job information. - ReplicationRuns []*LatestProtectionJobRunInfo `json:"replicationRuns"` -} - -// Validate validates this protection run response -func (m *ProtectionRunResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunResponse) validateArchivalRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalRuns) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalRuns); i++ { - if swag.IsZero(m.ArchivalRuns[i]) { // not required - continue - } - - if m.ArchivalRuns[i] != nil { - if err := m.ArchivalRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionRunResponse) validateBackupRuns(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRuns) { // not required - return nil - } - - for i := 0; i < len(m.BackupRuns); i++ { - if swag.IsZero(m.BackupRuns[i]) { // not required - continue - } - - if m.BackupRuns[i] != nil { - if err := m.BackupRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionRunResponse) validateReplicationRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationRuns) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationRuns); i++ { - if swag.IsZero(m.ReplicationRuns[i]) { // not required - continue - } - - if m.ReplicationRuns[i] != nil { - if err := m.ReplicationRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection run response based on the context it is used -func (m *ProtectionRunResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunResponse) contextValidateArchivalRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalRuns); i++ { - - if m.ArchivalRuns[i] != nil { - - if swag.IsZero(m.ArchivalRuns[i]) { // not required - return nil - } - - if err := m.ArchivalRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionRunResponse) contextValidateBackupRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupRuns); i++ { - - if m.BackupRuns[i] != nil { - - if swag.IsZero(m.BackupRuns[i]) { // not required - return nil - } - - if err := m.BackupRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionRunResponse) contextValidateReplicationRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationRuns); i++ { - - if m.ReplicationRuns[i] != nil { - - if swag.IsZero(m.ReplicationRuns[i]) { // not required - return nil - } - - if err := m.ReplicationRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunResponse) UnmarshalBinary(b []byte) error { - var res ProtectionRunResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_run_shell_info_proto.go b/v1/models/protection_run_shell_info_proto.go deleted file mode 100644 index 1ae4193d..00000000 --- a/v1/models/protection_run_shell_info_proto.go +++ /dev/null @@ -1,129 +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" -) - -// ProtectionRunShellInfoProto A message that contains shell information about a backup run. -// -// NOTE: This information is derived from BackupJobRunMetadataProto which is -// kept in memory by Magneto. Magneto does not need to unpack the entire -// run metadata to furnish this information, making the RPC that serves -// this info extremely efficient. -// -// swagger:model ProtectionRunShellInfoProto -type ProtectionRunShellInfoProto struct { - - // The type of the scheduled backup run. - BackupType *int32 `json:"backupType,omitempty"` - - // The end time of this run. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered by this run (if any). - Error *PrivateErrorProto `json:"error,omitempty"` - - // The instance id of this run. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // State of the this run. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // The start time of this run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this protection run shell info proto -func (m *ProtectionRunShellInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunShellInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this protection run shell info proto based on the context it is used -func (m *ProtectionRunShellInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunShellInfoProto) 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 -} - -// MarshalBinary interface implementation -func (m *ProtectionRunShellInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunShellInfoProto) UnmarshalBinary(b []byte) error { - var res ProtectionRunShellInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_run_state_proto.go b/v1/models/protection_run_state_proto.go deleted file mode 100644 index d4ad4af6..00000000 --- a/v1/models/protection_run_state_proto.go +++ /dev/null @@ -1,222 +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" -) - -// ProtectionRunStateProto Contains information about a protection run. This includes information about -// the backup run that took snapshots, and any copy tasks that copied out the -// snapshots to one or more targets. -// -// swagger:model ProtectionRunStateProto -type ProtectionRunStateProto struct { - - // Information about the backup run. - BackupRun *BackupJobRunStateProto `json:"backupRun,omitempty"` - - // If there was copy tasks that copied the snapshots from the backup run, - // this field will contain information about all the copy tasks. - CopyRun *CopyBackupRunStateProto `json:"copyRun,omitempty"` - - // The originator type for this run. This specifies the origin from where - // this run came to this cluster. The possibilities are: - // 1) kLocal: This is a local run. - // 2) kRemote: This is a remote replicated run. - // 3) kArchival: This run was remote restored by Icebox. - OriginatorType *int32 `json:"originatorType,omitempty"` - - // If only shell information is being requested, this contains the minimal - // shell info for the run. - ProtectionRunShell *ProtectionRunShellInfoProto `json:"protectionRunShell,omitempty"` -} - -// Validate validates this protection run state proto -func (m *ProtectionRunStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionRunShell(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunStateProto) validateBackupRun(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if m.BackupRun != nil { - if err := m.BackupRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunStateProto) validateCopyRun(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRun) { // not required - return nil - } - - if m.CopyRun != nil { - if err := m.CopyRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunStateProto) validateProtectionRunShell(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRunShell) { // not required - return nil - } - - if m.ProtectionRunShell != nil { - if err := m.ProtectionRunShell.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunShell") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunShell") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection run state proto based on the context it is used -func (m *ProtectionRunStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionRunShell(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunStateProto) contextValidateBackupRun(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupRun != nil { - - if swag.IsZero(m.BackupRun) { // not required - return nil - } - - if err := m.BackupRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunStateProto) contextValidateCopyRun(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyRun != nil { - - if swag.IsZero(m.CopyRun) { // not required - return nil - } - - if err := m.CopyRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRun") - } - return err - } - } - - return nil -} - -func (m *ProtectionRunStateProto) contextValidateProtectionRunShell(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectionRunShell != nil { - - if swag.IsZero(m.ProtectionRunShell) { // not required - return nil - } - - if err := m.ProtectionRunShell.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunShell") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunShell") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunStateProto) UnmarshalBinary(b []byte) error { - var res ProtectionRunStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_runs_stats.go b/v1/models/protection_runs_stats.go deleted file mode 100644 index 70529fef..00000000 --- a/v1/models/protection_runs_stats.go +++ /dev/null @@ -1,58 +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" -) - -// ProtectionRunsStats Protection Runs Statistics. -// -// Specifies the Protection Runs statistics response. -// -// swagger:model ProtectionRunsStats -type ProtectionRunsStats struct { - - // Specifies the count of archival Runs. - NumArchivalRuns *int64 `json:"numArchivalRuns,omitempty"` - - // Specifies the count of backup Runs. - NumBackupRuns *int64 `json:"numBackupRuns,omitempty"` - - // Specifies the count of replication Runs. - NumReplicationRuns *int64 `json:"numReplicationRuns,omitempty"` -} - -// Validate validates this protection runs stats -func (m *ProtectionRunsStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection runs stats based on context it is used -func (m *ProtectionRunsStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunsStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunsStats) UnmarshalBinary(b []byte) error { - var res ProtectionRunsStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_runs_summary.go b/v1/models/protection_runs_summary.go deleted file mode 100644 index eb74cb03..00000000 --- a/v1/models/protection_runs_summary.go +++ /dev/null @@ -1,72 +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" -) - -// ProtectionRunsSummary ProtectionRunsSummary is the summary of the all the Protection Runs for the -// Protection Jobs using the Specified Protection Policy. -// -// swagger:model ProtectionRunsSummary -type ProtectionRunsSummary struct { - - // Specifies the total number of Archival Runs using the current - // Protection Policy. - NumberOfArchivalRuns *int64 `json:"numberOfArchivalRuns,omitempty"` - - // Specifies the total number of Protection Runs by the given Protection - // Policy. - NumberOfProtectionRuns *int64 `json:"numberOfProtectionRuns,omitempty"` - - // Specifies the total number of Replication Runs using the current - // Protection Policy. - NumberOfReplicationRuns *int64 `json:"numberOfReplicationRuns,omitempty"` - - // Specifies the number of total successful Archival Runs using the - // current Protection Policy. - NumberOfSuccessfulArchivalRuns *int64 `json:"numberOfSuccessfulArchivalRuns,omitempty"` - - // Specifies the number of successful Protection Runs using the current - // Protection Policy. - NumberOfSuccessfulProtectionRuns *int64 `json:"numberOfSuccessfulProtectionRuns,omitempty"` - - // Specifies the number of total successful Replication Runs using the - // current Protection Policy. - NumberOfSuccessfulReplicationRuns *int64 `json:"numberOfSuccessfulReplicationRuns,omitempty"` -} - -// Validate validates this protection runs summary -func (m *ProtectionRunsSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection runs summary based on context it is used -func (m *ProtectionRunsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunsSummary) UnmarshalBinary(b []byte) error { - var res ProtectionRunsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_shell_info.go b/v1/models/protection_shell_info.go deleted file mode 100644 index 31a64b12..00000000 --- a/v1/models/protection_shell_info.go +++ /dev/null @@ -1,226 +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" -) - -// ProtectionShellInfo ProtectionShellInfo specifies the shell information about a protection run. -// -// swagger:model ProtectionShellInfo -type ProtectionShellInfo struct { - - // Specifies the end time of the Protection Run. The end time - // is specified as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies the id of the Job Run that ran the backup task and - // the copy tasks. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the type of backup such as 'kRegular', 'kFull', 'kLog' or - // 'kSystem'. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - RunType *string `json:"runType,omitempty"` - - // Specifies the start time of the Protection Run. The start time - // is specified as a Unix epoch Timestamp (in microseconds). - // This time is when the task is queued to an internal queue where tasks - // are waiting to run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the status of Backup task such as 'kRunning', 'kSuccess', - // 'kFailure' etc. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` -} - -// Validate validates this protection shell info -func (m *ProtectionShellInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionShellInfoTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionShellInfoTypeRunTypePropEnum = append(protectionShellInfoTypeRunTypePropEnum, v) - } -} - -const ( - - // ProtectionShellInfoRunTypeKRegular captures enum value "kRegular" - ProtectionShellInfoRunTypeKRegular string = "kRegular" - - // ProtectionShellInfoRunTypeKFull captures enum value "kFull" - ProtectionShellInfoRunTypeKFull string = "kFull" - - // ProtectionShellInfoRunTypeKLog captures enum value "kLog" - ProtectionShellInfoRunTypeKLog string = "kLog" - - // ProtectionShellInfoRunTypeKSystem captures enum value "kSystem" - ProtectionShellInfoRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *ProtectionShellInfo) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionShellInfoTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionShellInfo) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -var protectionShellInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionShellInfoTypeStatusPropEnum = append(protectionShellInfoTypeStatusPropEnum, v) - } -} - -const ( - - // ProtectionShellInfoStatusKAccepted captures enum value "kAccepted" - ProtectionShellInfoStatusKAccepted string = "kAccepted" - - // ProtectionShellInfoStatusKRunning captures enum value "kRunning" - ProtectionShellInfoStatusKRunning string = "kRunning" - - // ProtectionShellInfoStatusKCanceling captures enum value "kCanceling" - ProtectionShellInfoStatusKCanceling string = "kCanceling" - - // ProtectionShellInfoStatusKCanceled captures enum value "kCanceled" - ProtectionShellInfoStatusKCanceled string = "kCanceled" - - // ProtectionShellInfoStatusKSuccess captures enum value "kSuccess" - ProtectionShellInfoStatusKSuccess string = "kSuccess" - - // ProtectionShellInfoStatusKFailure captures enum value "kFailure" - ProtectionShellInfoStatusKFailure string = "kFailure" - - // ProtectionShellInfoStatusKWarning captures enum value "kWarning" - ProtectionShellInfoStatusKWarning string = "kWarning" - - // ProtectionShellInfoStatusKOnHold captures enum value "kOnHold" - ProtectionShellInfoStatusKOnHold string = "kOnHold" - - // ProtectionShellInfoStatusKMissed captures enum value "kMissed" - ProtectionShellInfoStatusKMissed string = "kMissed" - - // ProtectionShellInfoStatusKFinalizing captures enum value "kFinalizing" - ProtectionShellInfoStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *ProtectionShellInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionShellInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionShellInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection shell info based on context it is used -func (m *ProtectionShellInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionShellInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionShellInfo) UnmarshalBinary(b []byte) error { - var res ProtectionShellInfo - 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 deleted file mode 100644 index 4a5f8062..00000000 --- a/v1/models/protection_source.go +++ /dev/null @@ -1,2005 +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" -) - -// ProtectionSource Protection Source. -// -// Specifies a generic structure that represents a node -// in the Protection Source tree. Node details will depend on the -// environment of the Protection Source. -// -// 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 the connection id of the tenant. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the connector group id of the connector groups. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // couchbase protection source - CouchbaseProtectionSource *ProtectionSourceCouchbaseProtectionSource `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 the environment (such as 'kVMware' or 'kSQL') where the - // Protection Source exists. Depending on the environment, one of the - // following Protection Sources are initialized. - // - // NOTE: kPuppeteer refers to Cohesity's Remote Adapter. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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 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 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 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"` -} - -// Validate validates this protection source -func (m *ProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashBladeProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHyperFlexProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNimbleProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365ProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMWareProtectionSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSource) validateAcropolisProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateAdProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.AdProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateAwsProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.AwsProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateAzureProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.AzureProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateCassandraProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateCouchbaseProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateElastifileProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileProtectionSource) { // not required - return nil - } - - if m.ElastifileProtectionSource != nil { - if err := m.ElastifileProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileProtectionSource") - } - return err - } - } - - return nil -} - -var protectionSourceTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSourceTypeEnvironmentPropEnum = append(protectionSourceTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionSourceEnvironmentKVMware captures enum value "kVMware" - ProtectionSourceEnvironmentKVMware string = "kVMware" - - // ProtectionSourceEnvironmentKHyperV captures enum value "kHyperV" - ProtectionSourceEnvironmentKHyperV string = "kHyperV" - - // ProtectionSourceEnvironmentKSQL captures enum value "kSQL" - ProtectionSourceEnvironmentKSQL string = "kSQL" - - // ProtectionSourceEnvironmentKView captures enum value "kView" - ProtectionSourceEnvironmentKView string = "kView" - - // ProtectionSourceEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectionSourceEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectionSourceEnvironmentKPhysical captures enum value "kPhysical" - ProtectionSourceEnvironmentKPhysical string = "kPhysical" - - // ProtectionSourceEnvironmentKPure captures enum value "kPure" - ProtectionSourceEnvironmentKPure string = "kPure" - - // ProtectionSourceEnvironmentKNimble captures enum value "kNimble" - ProtectionSourceEnvironmentKNimble string = "kNimble" - - // ProtectionSourceEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionSourceEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionSourceEnvironmentKAzure captures enum value "kAzure" - ProtectionSourceEnvironmentKAzure string = "kAzure" - - // ProtectionSourceEnvironmentKNetapp captures enum value "kNetapp" - ProtectionSourceEnvironmentKNetapp string = "kNetapp" - - // ProtectionSourceEnvironmentKAgent captures enum value "kAgent" - ProtectionSourceEnvironmentKAgent string = "kAgent" - - // ProtectionSourceEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionSourceEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionSourceEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionSourceEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionSourceEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionSourceEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionSourceEnvironmentKIsilon captures enum value "kIsilon" - ProtectionSourceEnvironmentKIsilon string = "kIsilon" - - // ProtectionSourceEnvironmentKGPFS captures enum value "kGPFS" - ProtectionSourceEnvironmentKGPFS string = "kGPFS" - - // ProtectionSourceEnvironmentKKVM captures enum value "kKVM" - ProtectionSourceEnvironmentKKVM string = "kKVM" - - // ProtectionSourceEnvironmentKAWS captures enum value "kAWS" - ProtectionSourceEnvironmentKAWS string = "kAWS" - - // ProtectionSourceEnvironmentKExchange captures enum value "kExchange" - ProtectionSourceEnvironmentKExchange string = "kExchange" - - // ProtectionSourceEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectionSourceEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectionSourceEnvironmentKOracle captures enum value "kOracle" - ProtectionSourceEnvironmentKOracle string = "kOracle" - - // ProtectionSourceEnvironmentKGCP captures enum value "kGCP" - ProtectionSourceEnvironmentKGCP string = "kGCP" - - // ProtectionSourceEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionSourceEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionSourceEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionSourceEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionSourceEnvironmentKO365 captures enum value "kO365" - ProtectionSourceEnvironmentKO365 string = "kO365" - - // ProtectionSourceEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectionSourceEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectionSourceEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectionSourceEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectionSourceEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectionSourceEnvironmentKGCPNative string = "kGCPNative" - - // ProtectionSourceEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionSourceEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionSourceEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionSourceEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionSourceEnvironmentKElastifile captures enum value "kElastifile" - ProtectionSourceEnvironmentKElastifile string = "kElastifile" - - // ProtectionSourceEnvironmentKAD captures enum value "kAD" - ProtectionSourceEnvironmentKAD string = "kAD" - - // ProtectionSourceEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionSourceEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionSourceEnvironmentKCassandra captures enum value "kCassandra" - ProtectionSourceEnvironmentKCassandra string = "kCassandra" - - // ProtectionSourceEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionSourceEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionSourceEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionSourceEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionSourceEnvironmentKHdfs captures enum value "kHdfs" - ProtectionSourceEnvironmentKHdfs string = "kHdfs" - - // ProtectionSourceEnvironmentKHive captures enum value "kHive" - ProtectionSourceEnvironmentKHive string = "kHive" - - // ProtectionSourceEnvironmentKHBase captures enum value "kHBase" - ProtectionSourceEnvironmentKHBase string = "kHBase" - - // ProtectionSourceEnvironmentKUDA captures enum value "kUDA" - ProtectionSourceEnvironmentKUDA string = "kUDA" - - // ProtectionSourceEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionSourceEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionSourceEnvironmentKO365Group captures enum value "kO365Group" - ProtectionSourceEnvironmentKO365Group string = "kO365Group" - - // ProtectionSourceEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionSourceEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionSourceEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionSourceEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionSourceEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionSourceEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionSourceEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionSourceEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionSource) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSourceTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSource) 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 -} - -func (m *ProtectionSource) validateExchangeProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateFlashBladeProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.FlashBladeProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateGcpProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.GcpProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateGpfsProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateHbaseProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateHdfsProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateHiveProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HiveProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateHyperFlexProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HyperFlexProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateHypervProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.HypervProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateIbmFlashSystemProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.IbmFlashSystemProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateIsilonProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateKubernetesProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateKvmProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.KvmProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateMongodbProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateNasProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.NasProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateNetappProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.NetappProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateNimbleProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.NimbleProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateOffice365ProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.Office365ProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateOracleProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.OracleProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validatePhysicalProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validatePureProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.PureProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateSfdcProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateSQLProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.SQLProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateUdaProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.UdaProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateViewProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ViewProtectionSource) { // not required - 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 -} - -func (m *ProtectionSource) validateVMWareProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.VMWareProtectionSource) { // not required - 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 -} - -// ContextValidate validate this protection source based on the context it is used -func (m *ProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashBladeProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHyperFlexProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmFlashSystemProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNimbleProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365ProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMWareProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 - } - - 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 - } - } - - return nil -} - -func (m *ProtectionSource) contextValidateElastifileProtectionSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileProtectionSource != nil { - - if swag.IsZero(m.ElastifileProtectionSource) { // not required - return nil - } - - if err := m.ElastifileProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileProtectionSource") - } - return err - } - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *ProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_and_application_restore_objects.go b/v1/models/protection_source_and_application_restore_objects.go deleted file mode 100644 index 97b6b155..00000000 --- a/v1/models/protection_source_and_application_restore_objects.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionSourceAndApplicationRestoreObjects Protection source and Application restore objects. -// -// Specifies the details about the protection source and snapshot from where -// the application objects must be restored. It also provides information about -// the application objects which have to be restored and target host to which -// the application objects must be restored. -// -// swagger:model ProtectionSourceAndApplicationRestoreObjects -type ProtectionSourceAndApplicationRestoreObjects struct { - - // Specifies the Application Server objects whose data should be restored - // and the restore parameters for each of them. - ApplicationRestoreObjects []*ApplicationRestoreObject `json:"applicationRestoreObjects"` - - // Specifies the restore information for the Protection Source object that - // registered and hosts the Application Servers. This provides the - // snapshot details from which the applications should be restored. - // Required: true - HostingProtectionSource *RestoreObjectDetails `json:"hostingProtectionSource"` -} - -// Validate validates this protection source and application restore objects -func (m *ProtectionSourceAndApplicationRestoreObjects) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostingProtectionSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceAndApplicationRestoreObjects) validateApplicationRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationRestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - continue - } - - if m.ApplicationRestoreObjects[i] != nil { - if err := m.ApplicationRestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceAndApplicationRestoreObjects) validateHostingProtectionSource(formats strfmt.Registry) error { - - if err := validate.Required("hostingProtectionSource", "body", m.HostingProtectionSource); err != nil { - return err - } - - if m.HostingProtectionSource != nil { - if err := m.HostingProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection source and application restore objects based on the context it is used -func (m *ProtectionSourceAndApplicationRestoreObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostingProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceAndApplicationRestoreObjects) contextValidateApplicationRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationRestoreObjects); i++ { - - if m.ApplicationRestoreObjects[i] != nil { - - if swag.IsZero(m.ApplicationRestoreObjects[i]) { // not required - return nil - } - - if err := m.ApplicationRestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationRestoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceAndApplicationRestoreObjects) contextValidateHostingProtectionSource(ctx context.Context, formats strfmt.Registry) error { - - if m.HostingProtectionSource != nil { - - if err := m.HostingProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostingProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostingProtectionSource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceAndApplicationRestoreObjects) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceAndApplicationRestoreObjects) UnmarshalBinary(b []byte) error { - var res ProtectionSourceAndApplicationRestoreObjects - 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 deleted file mode 100644 index fa68d062..00000000 --- a/v1/models/protection_source_node.go +++ /dev/null @@ -1,540 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNode Node in a Protection Sources Tree. -// -// Many different node types are supported such as -// 'kComputeResource' and 'kResourcePool'. -// -// swagger:model ProtectionSourceNode -type ProtectionSourceNode struct { - - // Array of Child Subtrees. - // - // 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. - ApplicationNodes []interface{} `json:"applicationNodes"` - - // Specifies the cursor based pagination parameters for Protection Source to - // fetch the next set of sources within a level. This parameter will only be - // present at the parent entity. - EntityPaginationParameters *PaginationParameters `json:"entityPaginationParameters,omitempty"` - - // Specifies permission information for the entities. - EntityPermissionInfo *EntityPermissionInformation `json:"entityPermissionInfo,omitempty"` - - // Specifies the logical size of the data in bytes for the Object - // on this node. - // Presence of this field indicates this node is a leaf node. - LogicalSize *int64 `json:"logicalSize,omitempty"` - - // Specifies the maintenance mode configuration of the protection source for the root - // node (we currently only support setting the maintenance mode of the root node only - // v7.1) - MaintenanceModeConfig *MaintenanceModeConfigProto `json:"maintenanceModeConfig,omitempty"` - - // Array of Child Nodes. - // - // Specifies children of the current node in the Protection Sources hierarchy. - // When representing Objects in memory, the entire Object subtree - // hierarchy is represented. - // You can use this subtree to navigate down the Object hierarchy. - Nodes []interface{} `json:"nodes"` - - // Specifies object protectionInfo information for the entities. - ObjectProtectionInfo *ObjectProtectionInfo `json:"objectProtectionInfo,omitempty"` - - // Array of Protected Objects. - // - // Specifies aggregated information about all the - // child Objects of this node that are currently protected by - // a Protection Job. - // There is one entry for each environment that is being backed up. - // The aggregated information for the Object hierarchy's environment will - // 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 total bytes downtiered from the source so far. - TotalDowntieredSizeInBytes *int64 `json:"totalDowntieredSizeInBytes,omitempty"` - - // Specifies the total bytes uptiered to the source so far. - TotalUptieredSizeInBytes *int64 `json:"totalUptieredSizeInBytes,omitempty"` - - // Array of Unprotected Sources. - // - // Specifies aggregated information about all the - // child Objects of this node that are not protected by any Protection Jobs. - // The aggregated information for the Objects hierarchy's environment - // will be available at the 0th index of the vector. - // NOTE: This list includes Objects that were protected at some point in the - // past but are no longer actively protected. - // Snapshots containing these Objects may even exist on the Cohesity Cluster - // and be available to recover from. - UnprotectedSourcesSummary []*AggregatedSubtreeInfo `json:"unprotectedSourcesSummary"` -} - -// Validate validates this protection source node -func (m *ProtectionSourceNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityPaginationParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityPermissionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceModeConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectProtectionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectedSourcesSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegistrationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnprotectedSourcesSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceNode) validateEntityPaginationParameters(formats strfmt.Registry) error { - if swag.IsZero(m.EntityPaginationParameters) { // not required - return nil - } - - if m.EntityPaginationParameters != nil { - if err := m.EntityPaginationParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPaginationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPaginationParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) validateEntityPermissionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityPermissionInfo) { // not required - return nil - } - - if m.EntityPermissionInfo != nil { - if err := m.EntityPermissionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) validateMaintenanceModeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if m.MaintenanceModeConfig != nil { - if err := m.MaintenanceModeConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) validateObjectProtectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectProtectionInfo) { // not required - return nil - } - - if m.ObjectProtectionInfo != nil { - if err := m.ObjectProtectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) validateProtectedSourcesSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedSourcesSummary) { // not required - return nil - } - - for i := 0; i < len(m.ProtectedSourcesSummary); i++ { - if swag.IsZero(m.ProtectedSourcesSummary[i]) { // not required - continue - } - - if m.ProtectedSourcesSummary[i] != nil { - if err := m.ProtectedSourcesSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceNode) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectionSourceNode) validateRegistrationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegistrationInfo) { // not required - 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 -} - -func (m *ProtectionSourceNode) validateUnprotectedSourcesSummary(formats strfmt.Registry) error { - if swag.IsZero(m.UnprotectedSourcesSummary) { // not required - return nil - } - - for i := 0; i < len(m.UnprotectedSourcesSummary); i++ { - if swag.IsZero(m.UnprotectedSourcesSummary[i]) { // not required - continue - } - - if m.UnprotectedSourcesSummary[i] != nil { - if err := m.UnprotectedSourcesSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unprotectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unprotectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection source node based on the context it is used -func (m *ProtectionSourceNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityPaginationParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityPermissionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceModeConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectProtectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectedSourcesSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistrationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnprotectedSourcesSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceNode) contextValidateEntityPaginationParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityPaginationParameters != nil { - - if swag.IsZero(m.EntityPaginationParameters) { // not required - return nil - } - - if err := m.EntityPaginationParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPaginationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPaginationParameters") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) contextValidateEntityPermissionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityPermissionInfo != nil { - - if swag.IsZero(m.EntityPermissionInfo) { // not required - return nil - } - - if err := m.EntityPermissionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) contextValidateMaintenanceModeConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceModeConfig != nil { - - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if err := m.MaintenanceModeConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) contextValidateObjectProtectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectProtectionInfo != nil { - - if swag.IsZero(m.ObjectProtectionInfo) { // not required - return nil - } - - if err := m.ObjectProtectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceNode) contextValidateProtectedSourcesSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectedSourcesSummary); i++ { - - if m.ProtectedSourcesSummary[i] != nil { - - if swag.IsZero(m.ProtectedSourcesSummary[i]) { // not required - return nil - } - - if err := m.ProtectedSourcesSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *ProtectionSourceNode) contextValidateUnprotectedSourcesSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UnprotectedSourcesSummary); i++ { - - if m.UnprotectedSourcesSummary[i] != nil { - - if swag.IsZero(m.UnprotectedSourcesSummary[i]) { // not required - return nil - } - - if err := m.UnprotectedSourcesSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unprotectedSourcesSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unprotectedSourcesSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNode) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_response.go b/v1/models/protection_source_response.go deleted file mode 100644 index 8a0bab23..00000000 --- a/v1/models/protection_source_response.go +++ /dev/null @@ -1,292 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceResponse Specifies the information about the individual object from search api -// response. -// -// swagger:model ProtectionSourceResponse -type ProtectionSourceResponse struct { - - // Specifies the list of Protection Jobs that protect the object. - Jobs []*ProtectionJobSummary `json:"jobs"` - - // Specifies the logical size of Protection Source in bytes. - LogicalSizeInBytes *int64 `json:"logicalSizeInBytes,omitempty"` - - // Specifies the information about the parent of the source object. - ParentSource *ProtectionSource `json:"parentSource,omitempty"` - - // Specifies the list of universal ids of the Protection Source. - ProtectionSourceUIDList []*ProtectionSourceUID `json:"protectionSourceUidList"` - - // Specifies the information about the Protection Source. - Source *ProtectionSource `json:"source,omitempty"` - - // Specifies the unique id of the Protection Source. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this protection source response -func (m *ProtectionSourceResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSourceUIDList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceResponse) validateJobs(formats strfmt.Registry) error { - if swag.IsZero(m.Jobs) { // not required - return nil - } - - for i := 0; i < len(m.Jobs); i++ { - if swag.IsZero(m.Jobs[i]) { // not required - continue - } - - if m.Jobs[i] != nil { - if err := m.Jobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceResponse) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceResponse) validateProtectionSourceUIDList(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSourceUIDList) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionSourceUIDList); i++ { - if swag.IsZero(m.ProtectionSourceUIDList[i]) { // not required - continue - } - - if m.ProtectionSourceUIDList[i] != nil { - if err := m.ProtectionSourceUIDList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceUidList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceUidList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceResponse) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection source response based on the context it is used -func (m *ProtectionSourceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionSourceUIDList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceResponse) contextValidateJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Jobs); i++ { - - if m.Jobs[i] != nil { - - if swag.IsZero(m.Jobs[i]) { // not required - return nil - } - - if err := m.Jobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceResponse) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceResponse) contextValidateProtectionSourceUIDList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionSourceUIDList); i++ { - - if m.ProtectionSourceUIDList[i] != nil { - - if swag.IsZero(m.ProtectionSourceUIDList[i]) { // not required - return nil - } - - if err := m.ProtectionSourceUIDList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourceUidList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourceUidList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceResponse) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceResponse) UnmarshalBinary(b []byte) error { - var res ProtectionSourceResponse - 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_snapshot_information.go b/v1/models/protection_source_snapshot_information.go deleted file mode 100644 index e81ec9ab..00000000 --- a/v1/models/protection_source_snapshot_information.go +++ /dev/null @@ -1,300 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionSourceSnapshotInformation Protection Source Snapshot. -// -// Specifies details about a Snapshot that backups up a leaf -// Protection Source Object. -// -// swagger:model ProtectionSourceSnapshotInformation -type ProtectionSourceSnapshotInformation struct { - - // Array of Snapshot Copy Tasks. - // - // Specifies a list of copy tasks (such as replication and - // archival tasks). - CopyTasks []*SnapshotCopyTask `json:"copyTasks"` - - // Specifies the id of the Protection Job. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the name of the Protection Job. - JobName *string `json:"jobName,omitempty"` - - // Specifies the id of the Job Run. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the start time of the Job which this object is part of. - // The time is specified in Unix epoch Timestamp (in microseconds). - JobRunStartTimeUsecs *int64 `json:"jobRunStartTimeUsecs,omitempty"` - - // Specifies the end time of the last Run of this object's snapshot. - // The time is specified in Unix epoch Timestamp (in microseconds). - LastRunEndTimeUsecs *int64 `json:"lastRunEndTimeUsecs,omitempty"` - - // Specifies the start time of the last Run of this object's snapshot. - // The time is specified in Unix epoch Timestamp (in microseconds). - LastRunStartTimeUsecs *int64 `json:"lastRunStartTimeUsecs,omitempty"` - - // Specifies warning or error information when the Job Run is not - // successful. - Message *string `json:"message,omitempty"` - - // Specifies the total number of bytes read. - NumBytesRead *int64 `json:"numBytesRead,omitempty"` - - // Specifies the total number of logical bytes that are protected. The - // logical size is when the data is fully hydrated or expanded. - NumLogicalBytesProtected *int64 `json:"numLogicalBytesProtected,omitempty"` - - // Specifies an opaque string to pass into the next request to get - // the next set of Snapshots for pagination purposes. If null, this - // is the last set of Snapshots or the number of Snapshots returned - // is equal to or less than the specified pageCount. - PaginationCookie *uint64 `json:"paginationCookie,omitempty"` - - // Specifies the type of the Job Run. - // 'kSuccess' indicates that the Job Run was successful. - // 'kRunning' indicates that the Job Run is currently running. - // 'kWarning' indicates that the Job Run was successful but warnings were - // issued. - // 'kCancelled' indicates that the Job Run was canceled. - // 'kError' indicates the Job Run encountered an error and did not run to - // completion. - // Enum: ["kSuccess","kRunning","kWarning","kCancelled","kError"] - RunStatus *string `json:"runStatus,omitempty"` - - // Specifies the status of the Job Run. - // 'kRegular' indicates an incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection - // objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates system volume backup. It produces an image - // for bare metal recovery. - // Enum: ["kRegular","kFull","kLog","kSystem"] - RunType *string `json:"runType,omitempty"` -} - -// Validate validates this protection source snapshot information -func (m *ProtectionSourceSnapshotInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceSnapshotInformation) validateCopyTasks(formats strfmt.Registry) error { - if swag.IsZero(m.CopyTasks) { // not required - return nil - } - - for i := 0; i < len(m.CopyTasks); i++ { - if swag.IsZero(m.CopyTasks[i]) { // not required - continue - } - - if m.CopyTasks[i] != nil { - if err := m.CopyTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var protectionSourceSnapshotInformationTypeRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kRunning","kWarning","kCancelled","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSourceSnapshotInformationTypeRunStatusPropEnum = append(protectionSourceSnapshotInformationTypeRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionSourceSnapshotInformationRunStatusKSuccess captures enum value "kSuccess" - ProtectionSourceSnapshotInformationRunStatusKSuccess string = "kSuccess" - - // ProtectionSourceSnapshotInformationRunStatusKRunning captures enum value "kRunning" - ProtectionSourceSnapshotInformationRunStatusKRunning string = "kRunning" - - // ProtectionSourceSnapshotInformationRunStatusKWarning captures enum value "kWarning" - ProtectionSourceSnapshotInformationRunStatusKWarning string = "kWarning" - - // ProtectionSourceSnapshotInformationRunStatusKCancelled captures enum value "kCancelled" - ProtectionSourceSnapshotInformationRunStatusKCancelled string = "kCancelled" - - // ProtectionSourceSnapshotInformationRunStatusKError captures enum value "kError" - ProtectionSourceSnapshotInformationRunStatusKError string = "kError" -) - -// prop value enum -func (m *ProtectionSourceSnapshotInformation) validateRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSourceSnapshotInformationTypeRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSourceSnapshotInformation) validateRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.RunStatus) { // not required - return nil - } - - // value enum - if err := m.validateRunStatusEnum("runStatus", "body", *m.RunStatus); err != nil { - return err - } - - return nil -} - -var protectionSourceSnapshotInformationTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSourceSnapshotInformationTypeRunTypePropEnum = append(protectionSourceSnapshotInformationTypeRunTypePropEnum, v) - } -} - -const ( - - // ProtectionSourceSnapshotInformationRunTypeKRegular captures enum value "kRegular" - ProtectionSourceSnapshotInformationRunTypeKRegular string = "kRegular" - - // ProtectionSourceSnapshotInformationRunTypeKFull captures enum value "kFull" - ProtectionSourceSnapshotInformationRunTypeKFull string = "kFull" - - // ProtectionSourceSnapshotInformationRunTypeKLog captures enum value "kLog" - ProtectionSourceSnapshotInformationRunTypeKLog string = "kLog" - - // ProtectionSourceSnapshotInformationRunTypeKSystem captures enum value "kSystem" - ProtectionSourceSnapshotInformationRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *ProtectionSourceSnapshotInformation) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSourceSnapshotInformationTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSourceSnapshotInformation) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection source snapshot information based on the context it is used -func (m *ProtectionSourceSnapshotInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceSnapshotInformation) contextValidateCopyTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyTasks); i++ { - - if m.CopyTasks[i] != nil { - - if swag.IsZero(m.CopyTasks[i]) { // not required - return nil - } - - if err := m.CopyTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceSnapshotInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceSnapshotInformation) UnmarshalBinary(b []byte) error { - var res ProtectionSourceSnapshotInformation - 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 deleted file mode 100644 index 6fc07206..00000000 --- a/v1/models/protection_source_tree_info.go +++ /dev/null @@ -1,461 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceTreeInfo Registration and Protection Information. -// -// Specifies the registration and protection information of a registered -// Protection Source Tree on the Cohesity Cluster. -// -// Many different Protection Source trees are supported such as -// 'kVMware', 'kAcropolis', 'kPhysical' etc., -// -// swagger:model ProtectionSourceTreeInfo -type ProtectionSourceTreeInfo struct { - - // Array of applications hierarchy registered on this node. - // - // Specifies the application type and the list of instances of the - // application objects. For example for SQL Server, this list provides the - // SQL Server instances running on a VM or a Physical Server. - Applications []*ApplicationInfo `json:"applications"` - - // Specifies permission information for the protection source for the root - // node of protection source tree. - EntityPermissionInfo *EntityPermissionInformation `json:"entityPermissionInfo,omitempty"` - - // Specifies the logical size of the Protection Source in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the maintenance mode configuration of the protection source for the root - // node (we currently only support setting the maintenance mode of the root node only - // 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 the breakdown of the stats of protection by environment. - // overrideDescription: true - StatsByEnv []*ProtectionSummaryByEnv `json:"statsByEnv"` - - // Specifies the total bytes downtiered from the source so far. - TotalDowntieredSizeInBytes *int64 `json:"totalDowntieredSizeInBytes,omitempty"` - - // Specifies the total bytes uptiered to the source so far. - TotalUptieredSizeInBytes *int64 `json:"totalUptieredSizeInBytes,omitempty"` -} - -// Validate validates this protection source tree info -func (m *ProtectionSourceTreeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityPermissionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceModeConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegistrationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootNode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatsByEnv(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceTreeInfo) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - if swag.IsZero(m.Applications[i]) { // not required - continue - } - - if m.Applications[i] != nil { - if err := m.Applications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceTreeInfo) validateEntityPermissionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EntityPermissionInfo) { // not required - return nil - } - - if m.EntityPermissionInfo != nil { - if err := m.EntityPermissionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceTreeInfo) validateMaintenanceModeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if m.MaintenanceModeConfig != nil { - if err := m.MaintenanceModeConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceTreeInfo) validateRegistrationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegistrationInfo) { // not required - 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 -} - -func (m *ProtectionSourceTreeInfo) validateRootNode(formats strfmt.Registry) error { - if swag.IsZero(m.RootNode) { // not required - 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 -} - -func (m *ProtectionSourceTreeInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *ProtectionSourceTreeInfo) validateStatsByEnv(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnv) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnv); i++ { - if swag.IsZero(m.StatsByEnv[i]) { // not required - continue - } - - if m.StatsByEnv[i] != nil { - if err := m.StatsByEnv[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection source tree info based on the context it is used -func (m *ProtectionSourceTreeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplications(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityPermissionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceModeConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistrationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootNode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatsByEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourceTreeInfo) contextValidateApplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Applications); i++ { - - if m.Applications[i] != nil { - - if swag.IsZero(m.Applications[i]) { // not required - return nil - } - - if err := m.Applications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionSourceTreeInfo) contextValidateEntityPermissionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityPermissionInfo != nil { - - if swag.IsZero(m.EntityPermissionInfo) { // not required - return nil - } - - if err := m.EntityPermissionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityPermissionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityPermissionInfo") - } - return err - } - } - - return nil -} - -func (m *ProtectionSourceTreeInfo) contextValidateMaintenanceModeConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceModeConfig != nil { - - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if err := m.MaintenanceModeConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -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 -} - -func (m *ProtectionSourceTreeInfo) contextValidateStatsByEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnv); i++ { - - if m.StatsByEnv[i] != nil { - - if swag.IsZero(m.StatsByEnv[i]) { // not required - return nil - } - - if err := m.StatsByEnv[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceTreeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceTreeInfo) UnmarshalBinary(b []byte) error { - var res ProtectionSourceTreeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_uid.go b/v1/models/protection_source_uid.go deleted file mode 100644 index 59a9c257..00000000 --- a/v1/models/protection_source_uid.go +++ /dev/null @@ -1,61 +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" -) - -// ProtectionSourceUID Preotection Source UID. -// -// Specifies universal id of the Protection source specific to a cluster. -// -// swagger:model ProtectionSourceUid -type ProtectionSourceUID struct { - - // Specifies the id of the cluster on which object is present. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster on which object is present. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies parent source id of an object. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies source id of an object. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this protection source Uid -func (m *ProtectionSourceUID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection source Uid based on context it is used -func (m *ProtectionSourceUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceUID) UnmarshalBinary(b []byte) error { - var res ProtectionSourceUID - 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 deleted file mode 100644 index e25766d7..00000000 --- a/v1/models/protection_sources_job_runs_report_element.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcesJobRunsReportElement Protection Source and Snapshots. -// -// Specifies a Protection Source and the Snapshots that back it up. -// -// swagger:model ProtectionSourcesJobRunsReportElement -type ProtectionSourcesJobRunsReportElement struct { - - // protection source - ProtectionSource *ProtectionSourcesJobRunsReportElementProtectionSource `json:"protectionSource,omitempty"` - - // Array of Snapshots - // - // Specifies the Snapshots that contain backups of the Protection Source - // Object. - SnapshotsInfo []*ProtectionSourceSnapshotInformation `json:"snapshotsInfo"` -} - -// Validate validates this protection sources job runs report element -func (m *ProtectionSourcesJobRunsReportElement) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotsInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourcesJobRunsReportElement) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectionSourcesJobRunsReportElement) validateSnapshotsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotsInfo) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotsInfo); i++ { - if swag.IsZero(m.SnapshotsInfo[i]) { // not required - continue - } - - if m.SnapshotsInfo[i] != nil { - if err := m.SnapshotsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection sources job runs report element based on the context it is used -func (m *ProtectionSourcesJobRunsReportElement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *ProtectionSourcesJobRunsReportElement) contextValidateSnapshotsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotsInfo); i++ { - - if m.SnapshotsInfo[i] != nil { - - if swag.IsZero(m.SnapshotsInfo[i]) { // not required - return nil - } - - if err := m.SnapshotsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcesJobRunsReportElement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcesJobRunsReportElement) UnmarshalBinary(b []byte) error { - var res ProtectionSourcesJobRunsReportElement - 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_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_jobs_summary_report_response_wrapper.go b/v1/models/protection_sources_jobs_summary_report_response_wrapper.go deleted file mode 100644 index 299eb765..00000000 --- a/v1/models/protection_sources_jobs_summary_report_response_wrapper.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcesJobsSummaryReportResponseWrapper Protection Sources Jobs Summary Report Response Wrapper. -// -// swagger:model ProtectionSourcesJobsSummaryReportResponseWrapper -type ProtectionSourcesJobsSummaryReportResponseWrapper struct { - - // Specifies the list of Snapshot summary statistics - // that match the filter criteria. - ProtectionSourcesJobsSummary []*ProtectionSourcesSummaryStats `json:"protectionSourcesJobsSummary"` -} - -// Validate validates this protection sources jobs summary report response wrapper -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionSourcesJobsSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) validateProtectionSourcesJobsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSourcesJobsSummary) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionSourcesJobsSummary); i++ { - if swag.IsZero(m.ProtectionSourcesJobsSummary[i]) { // not required - continue - } - - if m.ProtectionSourcesJobsSummary[i] != nil { - if err := m.ProtectionSourcesJobsSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourcesJobsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourcesJobsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection sources jobs summary report response wrapper based on the context it is used -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionSourcesJobsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) contextValidateProtectionSourcesJobsSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionSourcesJobsSummary); i++ { - - if m.ProtectionSourcesJobsSummary[i] != nil { - - if swag.IsZero(m.ProtectionSourcesJobsSummary[i]) { // not required - return nil - } - - if err := m.ProtectionSourcesJobsSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSourcesJobsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSourcesJobsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcesJobsSummaryReportResponseWrapper) UnmarshalBinary(b []byte) error { - var res ProtectionSourcesJobsSummaryReportResponseWrapper - 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 deleted file mode 100644 index 1a745c34..00000000 --- a/v1/models/protection_sources_summary_stats.go +++ /dev/null @@ -1,376 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionSourcesSummaryStats Protection Sources Summary Statistics. -// -// Specifies Job Run (Snapshot) summary statistics about the specified -// leaf Protection Source Object (such as a VM). -// -// swagger:model ProtectionSourcesSummaryStats -type ProtectionSourcesSummaryStats struct { - - // Specifies the start time of the first failed Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - FirstFailedRunTimeUsecs *int64 `json:"firstFailedRunTimeUsecs,omitempty"` - - // Specifies the start time of the first successful Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - FirstSuccessfulRunTimeUsecs *int64 `json:"firstSuccessfulRunTimeUsecs,omitempty"` - - // Specifies the start time of the last failed Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - LastFailedRunTimeUsecs *int64 `json:"lastFailedRunTimeUsecs,omitempty"` - - // Specifies the end time of the last Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - LastRunEndTimeUsecs *int64 `json:"lastRunEndTimeUsecs,omitempty"` - - // Specifies the error message associated with last run, if the last run - // has failed. - LastRunErrorMsg *string `json:"lastRunErrorMsg,omitempty"` - - // Specifies the start time of the last Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - LastRunStartTimeUsecs *int64 `json:"lastRunStartTimeUsecs,omitempty"` - - // Specifies the Job Run status of the last Job Run protecting - // this Protection Source Object. - // 'kSuccess' indicates that the Job Run was successful. - // 'kRunning' indicates that the Job Run is currently running. - // 'kWarning' indicates that the Job Run was successful but warnings were - // issued. - // 'kCancelled' indicates that the Job Run was canceled. - // 'kError' indicates the Job Run encountered an error and did not run to - // completion. - // Enum: ["kSuccess","kRunning","kWarning","kCancelled","kError"] - LastRunStatus *string `json:"lastRunStatus,omitempty"` - - // Specifies the Job Run type of the last Job Run protecting - // this Protection Source Object. - // 'kRegular' indicates an incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection - // objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates system volume backup. It produces an image - // for bare metal recovery. - // Enum: ["kRegular","kFull","kLog","kSystem"] - LastRunType *string `json:"lastRunType,omitempty"` - - // Specifies the start time of the last successful Job Run protecting this - // Protection Source Object. - // The time is specified as a Unix epoch Timestamp (in microseconds). - LastSuccessfulRunTimeUsecs *int64 `json:"lastSuccessfulRunTimeUsecs,omitempty"` - - // Specifies the total number of bytes read while protecting this - // Protection Source Object. - NumDataReadBytes *int64 `json:"numDataReadBytes,omitempty"` - - // Specifies the total number of errors reported during Job Runs - // of this Protection Source Object. - NumErrors *int32 `json:"numErrors,omitempty"` - - // Specifies the total logical bytes protected for this - // Protection Source Object. - // The logical size is when the data is fully hydrated or expanded. - NumLogicalBytesProtected *int64 `json:"numLogicalBytesProtected,omitempty"` - - // Specifies the total number of Snapshots that are backing up this - // Protection Source Object. - NumSnapshots *int32 `json:"numSnapshots,omitempty"` - - // Specifies the total number of successful Job Runs protecting this - // Protection Source Object. - NumSuccessRuns *int32 `json:"numSuccessRuns,omitempty"` - - // Specifies the total number of warnings reported during Job Runs - // of this Protection Source Object. - NumWarnings *int32 `json:"numWarnings,omitempty"` - - // protection source - ProtectionSource *ProtectionSourcesSummaryStatsProtectionSource `json:"protectionSource,omitempty"` - - // Specifies the name of the Registered Source that is the top level - // parent of the specified Protection Source Object. - RegisteredSource *string `json:"registeredSource,omitempty"` - - // Specifies basic information about tenants having access to the protection - // job. - Tenants []*TenantInfo `json:"tenants"` -} - -// Validate validates this protection sources summary stats -func (m *ProtectionSourcesSummaryStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionSourcesSummaryStatsTypeLastRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kRunning","kWarning","kCancelled","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSourcesSummaryStatsTypeLastRunStatusPropEnum = append(protectionSourcesSummaryStatsTypeLastRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionSourcesSummaryStatsLastRunStatusKSuccess captures enum value "kSuccess" - ProtectionSourcesSummaryStatsLastRunStatusKSuccess string = "kSuccess" - - // ProtectionSourcesSummaryStatsLastRunStatusKRunning captures enum value "kRunning" - ProtectionSourcesSummaryStatsLastRunStatusKRunning string = "kRunning" - - // ProtectionSourcesSummaryStatsLastRunStatusKWarning captures enum value "kWarning" - ProtectionSourcesSummaryStatsLastRunStatusKWarning string = "kWarning" - - // ProtectionSourcesSummaryStatsLastRunStatusKCancelled captures enum value "kCancelled" - ProtectionSourcesSummaryStatsLastRunStatusKCancelled string = "kCancelled" - - // ProtectionSourcesSummaryStatsLastRunStatusKError captures enum value "kError" - ProtectionSourcesSummaryStatsLastRunStatusKError string = "kError" -) - -// prop value enum -func (m *ProtectionSourcesSummaryStats) validateLastRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSourcesSummaryStatsTypeLastRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSourcesSummaryStats) validateLastRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastRunStatusEnum("lastRunStatus", "body", *m.LastRunStatus); err != nil { - return err - } - - return nil -} - -var protectionSourcesSummaryStatsTypeLastRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSourcesSummaryStatsTypeLastRunTypePropEnum = append(protectionSourcesSummaryStatsTypeLastRunTypePropEnum, v) - } -} - -const ( - - // ProtectionSourcesSummaryStatsLastRunTypeKRegular captures enum value "kRegular" - ProtectionSourcesSummaryStatsLastRunTypeKRegular string = "kRegular" - - // ProtectionSourcesSummaryStatsLastRunTypeKFull captures enum value "kFull" - ProtectionSourcesSummaryStatsLastRunTypeKFull string = "kFull" - - // ProtectionSourcesSummaryStatsLastRunTypeKLog captures enum value "kLog" - ProtectionSourcesSummaryStatsLastRunTypeKLog string = "kLog" - - // ProtectionSourcesSummaryStatsLastRunTypeKSystem captures enum value "kSystem" - ProtectionSourcesSummaryStatsLastRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *ProtectionSourcesSummaryStats) validateLastRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSourcesSummaryStatsTypeLastRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSourcesSummaryStats) validateLastRunType(formats strfmt.Registry) error { - if swag.IsZero(m.LastRunType) { // not required - return nil - } - - // value enum - if err := m.validateLastRunTypeEnum("lastRunType", "body", *m.LastRunType); err != nil { - return err - } - - return nil -} - -func (m *ProtectionSourcesSummaryStats) validateProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSource) { // not required - 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 -} - -func (m *ProtectionSourcesSummaryStats) validateTenants(formats strfmt.Registry) error { - if swag.IsZero(m.Tenants) { // not required - return nil - } - - for i := 0; i < len(m.Tenants); i++ { - if swag.IsZero(m.Tenants[i]) { // not required - continue - } - - if m.Tenants[i] != nil { - if err := m.Tenants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection sources summary stats based on the context it is used -func (m *ProtectionSourcesSummaryStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenants(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *ProtectionSourcesSummaryStats) contextValidateTenants(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tenants); i++ { - - if m.Tenants[i] != nil { - - if swag.IsZero(m.Tenants[i]) { // not required - return nil - } - - if err := m.Tenants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcesSummaryStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcesSummaryStats) UnmarshalBinary(b []byte) error { - var res ProtectionSourcesSummaryStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/protection_stats.go b/v1/models/protection_stats.go deleted file mode 100644 index 27f79a71..00000000 --- a/v1/models/protection_stats.go +++ /dev/null @@ -1,58 +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" -) - -// ProtectionStats Protection Statistics. -// -// Protection Statistics. -// -// swagger:model ProtectionStats -type ProtectionStats struct { - - // Number of Failed Objects. - NumFailed *int32 `json:"numFailed,omitempty"` - - // Number of Objects. - NumObjects *int32 `json:"numObjects,omitempty"` - - // Size in Bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this protection stats -func (m *ProtectionStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection stats based on context it is used -func (m *ProtectionStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionStats) UnmarshalBinary(b []byte) error { - var res ProtectionStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_summary.go b/v1/models/protection_summary.go deleted file mode 100644 index bb46775e..00000000 --- a/v1/models/protection_summary.go +++ /dev/null @@ -1,65 +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" -) - -// ProtectionSummary Protection Summary. -// -// Specifies the number of protected and unprotected -// objects, and their sizes information of the given entity. -// -// swagger:model ProtectionSummary -type ProtectionSummary struct { - - // Specifies the number of objects that are protected under the given - // entity. - ProtectedCount *int64 `json:"protectedCount,omitempty"` - - // Specifies the total size of the protected objects under the given entity. - ProtectedSize *int64 `json:"protectedSize,omitempty"` - - // Specifies the number of objects that are not protected under the given - // entity. - UnprotectedCount *int64 `json:"unprotectedCount,omitempty"` - - // Specifies the total size of the unprotected objects under the given - // entity. - UnprotectedSize *int64 `json:"unprotectedSize,omitempty"` -} - -// Validate validates this protection summary -func (m *ProtectionSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection summary based on context it is used -func (m *ProtectionSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSummary) UnmarshalBinary(b []byte) error { - var res ProtectionSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_summary_by_env.go b/v1/models/protection_summary_by_env.go deleted file mode 100644 index c1aaaed1..00000000 --- a/v1/models/protection_summary_by_env.go +++ /dev/null @@ -1,309 +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" -) - -// ProtectionSummaryByEnv Protection Summary By Environment. -// -// ProtectionSummaryByEnv specifies the number of protected and unprotected -// objects that is break down by environment. -// -// swagger:model ProtectionSummaryByEnv -type ProtectionSummaryByEnv struct { - - // Specifies the type of environment of the source object like kSQL etc. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the number of objects that are protected under the given - // entity. - ProtectedCount *int64 `json:"protectedCount,omitempty"` - - // Specifies the total size of the protected objects under the given entity. - ProtectedSize *int64 `json:"protectedSize,omitempty"` - - // Specifies the number of objects that are not protected under the given - // entity. - UnprotectedCount *int64 `json:"unprotectedCount,omitempty"` - - // Specifies the total size of the unprotected objects under the given - // entity. - UnprotectedSize *int64 `json:"unprotectedSize,omitempty"` -} - -// Validate validates this protection summary by env -func (m *ProtectionSummaryByEnv) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionSummaryByEnvTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSummaryByEnvTypeEnvironmentPropEnum = append(protectionSummaryByEnvTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionSummaryByEnvEnvironmentKVMware captures enum value "kVMware" - ProtectionSummaryByEnvEnvironmentKVMware string = "kVMware" - - // ProtectionSummaryByEnvEnvironmentKHyperV captures enum value "kHyperV" - ProtectionSummaryByEnvEnvironmentKHyperV string = "kHyperV" - - // ProtectionSummaryByEnvEnvironmentKSQL captures enum value "kSQL" - ProtectionSummaryByEnvEnvironmentKSQL string = "kSQL" - - // ProtectionSummaryByEnvEnvironmentKView captures enum value "kView" - ProtectionSummaryByEnvEnvironmentKView string = "kView" - - // ProtectionSummaryByEnvEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectionSummaryByEnvEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectionSummaryByEnvEnvironmentKPhysical captures enum value "kPhysical" - ProtectionSummaryByEnvEnvironmentKPhysical string = "kPhysical" - - // ProtectionSummaryByEnvEnvironmentKPure captures enum value "kPure" - ProtectionSummaryByEnvEnvironmentKPure string = "kPure" - - // ProtectionSummaryByEnvEnvironmentKNimble captures enum value "kNimble" - ProtectionSummaryByEnvEnvironmentKNimble string = "kNimble" - - // ProtectionSummaryByEnvEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionSummaryByEnvEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionSummaryByEnvEnvironmentKAzure captures enum value "kAzure" - ProtectionSummaryByEnvEnvironmentKAzure string = "kAzure" - - // ProtectionSummaryByEnvEnvironmentKNetapp captures enum value "kNetapp" - ProtectionSummaryByEnvEnvironmentKNetapp string = "kNetapp" - - // ProtectionSummaryByEnvEnvironmentKAgent captures enum value "kAgent" - ProtectionSummaryByEnvEnvironmentKAgent string = "kAgent" - - // ProtectionSummaryByEnvEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionSummaryByEnvEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionSummaryByEnvEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionSummaryByEnvEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionSummaryByEnvEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionSummaryByEnvEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionSummaryByEnvEnvironmentKIsilon captures enum value "kIsilon" - ProtectionSummaryByEnvEnvironmentKIsilon string = "kIsilon" - - // ProtectionSummaryByEnvEnvironmentKGPFS captures enum value "kGPFS" - ProtectionSummaryByEnvEnvironmentKGPFS string = "kGPFS" - - // ProtectionSummaryByEnvEnvironmentKKVM captures enum value "kKVM" - ProtectionSummaryByEnvEnvironmentKKVM string = "kKVM" - - // ProtectionSummaryByEnvEnvironmentKAWS captures enum value "kAWS" - ProtectionSummaryByEnvEnvironmentKAWS string = "kAWS" - - // ProtectionSummaryByEnvEnvironmentKExchange captures enum value "kExchange" - ProtectionSummaryByEnvEnvironmentKExchange string = "kExchange" - - // ProtectionSummaryByEnvEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectionSummaryByEnvEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectionSummaryByEnvEnvironmentKOracle captures enum value "kOracle" - ProtectionSummaryByEnvEnvironmentKOracle string = "kOracle" - - // ProtectionSummaryByEnvEnvironmentKGCP captures enum value "kGCP" - ProtectionSummaryByEnvEnvironmentKGCP string = "kGCP" - - // ProtectionSummaryByEnvEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionSummaryByEnvEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionSummaryByEnvEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionSummaryByEnvEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionSummaryByEnvEnvironmentKO365 captures enum value "kO365" - ProtectionSummaryByEnvEnvironmentKO365 string = "kO365" - - // ProtectionSummaryByEnvEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectionSummaryByEnvEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectionSummaryByEnvEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectionSummaryByEnvEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectionSummaryByEnvEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectionSummaryByEnvEnvironmentKGCPNative string = "kGCPNative" - - // ProtectionSummaryByEnvEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionSummaryByEnvEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionSummaryByEnvEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionSummaryByEnvEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionSummaryByEnvEnvironmentKElastifile captures enum value "kElastifile" - ProtectionSummaryByEnvEnvironmentKElastifile string = "kElastifile" - - // ProtectionSummaryByEnvEnvironmentKAD captures enum value "kAD" - ProtectionSummaryByEnvEnvironmentKAD string = "kAD" - - // ProtectionSummaryByEnvEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionSummaryByEnvEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionSummaryByEnvEnvironmentKCassandra captures enum value "kCassandra" - ProtectionSummaryByEnvEnvironmentKCassandra string = "kCassandra" - - // ProtectionSummaryByEnvEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionSummaryByEnvEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionSummaryByEnvEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionSummaryByEnvEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionSummaryByEnvEnvironmentKHdfs captures enum value "kHdfs" - ProtectionSummaryByEnvEnvironmentKHdfs string = "kHdfs" - - // ProtectionSummaryByEnvEnvironmentKHive captures enum value "kHive" - ProtectionSummaryByEnvEnvironmentKHive string = "kHive" - - // ProtectionSummaryByEnvEnvironmentKHBase captures enum value "kHBase" - ProtectionSummaryByEnvEnvironmentKHBase string = "kHBase" - - // ProtectionSummaryByEnvEnvironmentKUDA captures enum value "kUDA" - ProtectionSummaryByEnvEnvironmentKUDA string = "kUDA" - - // ProtectionSummaryByEnvEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionSummaryByEnvEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionSummaryByEnvEnvironmentKO365Group captures enum value "kO365Group" - ProtectionSummaryByEnvEnvironmentKO365Group string = "kO365Group" - - // ProtectionSummaryByEnvEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionSummaryByEnvEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionSummaryByEnvEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionSummaryByEnvEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionSummaryByEnvEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionSummaryByEnvEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionSummaryByEnvEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionSummaryByEnvEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionSummaryByEnv) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSummaryByEnvTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSummaryByEnv) 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 validates this protection summary by env based on context it is used -func (m *ProtectionSummaryByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSummaryByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSummaryByEnv) UnmarshalBinary(b []byte) error { - var res ProtectionSummaryByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_tile.go b/v1/models/protection_tile.go deleted file mode 100644 index 34a7e23d..00000000 --- a/v1/models/protection_tile.go +++ /dev/null @@ -1,264 +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" -) - -// ProtectionTile Protection Tile. -// -// Protection information and statistics. -// -// swagger:model ProtectionTile -type ProtectionTile struct { - - // Statistics related to archival for last 24 hours. - LastDayArchival *ProtectionStats `json:"lastDayArchival,omitempty"` - - // Statistics related to Back for last 24 hours. - LastDayBackup *ProtectionStats `json:"lastDayBackup,omitempty"` - - // Statistics related to incoming replication for last 24 hours. - LastDayReplicationIn *ProtectionStats `json:"lastDayReplicationIn,omitempty"` - - // Statistics related to outgoing replication for last 24 hours. - LastDayReplicationOut *ProtectionStats `json:"lastDayReplicationOut,omitempty"` -} - -// Validate validates this protection tile -func (m *ProtectionTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastDayArchival(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastDayBackup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastDayReplicationIn(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastDayReplicationOut(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionTile) validateLastDayArchival(formats strfmt.Registry) error { - if swag.IsZero(m.LastDayArchival) { // not required - return nil - } - - if m.LastDayArchival != nil { - if err := m.LastDayArchival.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayArchival") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayArchival") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) validateLastDayBackup(formats strfmt.Registry) error { - if swag.IsZero(m.LastDayBackup) { // not required - return nil - } - - if m.LastDayBackup != nil { - if err := m.LastDayBackup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayBackup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayBackup") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) validateLastDayReplicationIn(formats strfmt.Registry) error { - if swag.IsZero(m.LastDayReplicationIn) { // not required - return nil - } - - if m.LastDayReplicationIn != nil { - if err := m.LastDayReplicationIn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayReplicationIn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayReplicationIn") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) validateLastDayReplicationOut(formats strfmt.Registry) error { - if swag.IsZero(m.LastDayReplicationOut) { // not required - return nil - } - - if m.LastDayReplicationOut != nil { - if err := m.LastDayReplicationOut.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayReplicationOut") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayReplicationOut") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection tile based on the context it is used -func (m *ProtectionTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastDayArchival(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastDayBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastDayReplicationIn(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastDayReplicationOut(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionTile) contextValidateLastDayArchival(ctx context.Context, formats strfmt.Registry) error { - - if m.LastDayArchival != nil { - - if swag.IsZero(m.LastDayArchival) { // not required - return nil - } - - if err := m.LastDayArchival.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayArchival") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayArchival") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) contextValidateLastDayBackup(ctx context.Context, formats strfmt.Registry) error { - - if m.LastDayBackup != nil { - - if swag.IsZero(m.LastDayBackup) { // not required - return nil - } - - if err := m.LastDayBackup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayBackup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayBackup") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) contextValidateLastDayReplicationIn(ctx context.Context, formats strfmt.Registry) error { - - if m.LastDayReplicationIn != nil { - - if swag.IsZero(m.LastDayReplicationIn) { // not required - return nil - } - - if err := m.LastDayReplicationIn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayReplicationIn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayReplicationIn") - } - return err - } - } - - return nil -} - -func (m *ProtectionTile) contextValidateLastDayReplicationOut(ctx context.Context, formats strfmt.Registry) error { - - if m.LastDayReplicationOut != nil { - - if swag.IsZero(m.LastDayReplicationOut) { // not required - return nil - } - - if err := m.LastDayReplicationOut.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastDayReplicationOut") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastDayReplicationOut") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionTile) UnmarshalBinary(b []byte) error { - var res ProtectionTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_trend.go b/v1/models/protection_trend.go deleted file mode 100644 index f56952f3..00000000 --- a/v1/models/protection_trend.go +++ /dev/null @@ -1,388 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionTrend Protection Trend. -// -// Specifies details of a protected object with it's protection trends. -// -// swagger:model ProtectionTrend -type ProtectionTrend struct { - - // Specifies number of cancelled runs across trends. - Cancelled *int64 `json:"cancelled,omitempty"` - - // Specifies environment. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies number of failed runs across trends. - Failed *int64 `json:"failed,omitempty"` - - // Specifies protected object's Id. - ID *int64 `json:"id,omitempty"` - - // Specifies protected object's name. - Name *string `json:"name,omitempty"` - - // Specifies protected object's parent id. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies protected object's parent name. - ParentSourceName *string `json:"parentSourceName,omitempty"` - - // Specifies number of in-progress runs across trends. - Running *int64 `json:"running,omitempty"` - - // Specifies number of successful runs across trends. - Successful *int64 `json:"successful,omitempty"` - - // Specifies total number of runs across trends. - Total *int64 `json:"total,omitempty"` - - // Aggregated protection runs information by days/weeks. - Trends []*TrendingData `json:"trends"` -} - -// Validate validates this protection trend -func (m *ProtectionTrend) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTrends(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionTrendTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionTrendTypeEnvironmentPropEnum = append(protectionTrendTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionTrendEnvironmentKVMware captures enum value "kVMware" - ProtectionTrendEnvironmentKVMware string = "kVMware" - - // ProtectionTrendEnvironmentKHyperV captures enum value "kHyperV" - ProtectionTrendEnvironmentKHyperV string = "kHyperV" - - // ProtectionTrendEnvironmentKSQL captures enum value "kSQL" - ProtectionTrendEnvironmentKSQL string = "kSQL" - - // ProtectionTrendEnvironmentKView captures enum value "kView" - ProtectionTrendEnvironmentKView string = "kView" - - // ProtectionTrendEnvironmentKPuppeteer captures enum value "kPuppeteer" - ProtectionTrendEnvironmentKPuppeteer string = "kPuppeteer" - - // ProtectionTrendEnvironmentKPhysical captures enum value "kPhysical" - ProtectionTrendEnvironmentKPhysical string = "kPhysical" - - // ProtectionTrendEnvironmentKPure captures enum value "kPure" - ProtectionTrendEnvironmentKPure string = "kPure" - - // ProtectionTrendEnvironmentKNimble captures enum value "kNimble" - ProtectionTrendEnvironmentKNimble string = "kNimble" - - // ProtectionTrendEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionTrendEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionTrendEnvironmentKAzure captures enum value "kAzure" - ProtectionTrendEnvironmentKAzure string = "kAzure" - - // ProtectionTrendEnvironmentKNetapp captures enum value "kNetapp" - ProtectionTrendEnvironmentKNetapp string = "kNetapp" - - // ProtectionTrendEnvironmentKAgent captures enum value "kAgent" - ProtectionTrendEnvironmentKAgent string = "kAgent" - - // ProtectionTrendEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionTrendEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionTrendEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionTrendEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionTrendEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionTrendEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionTrendEnvironmentKIsilon captures enum value "kIsilon" - ProtectionTrendEnvironmentKIsilon string = "kIsilon" - - // ProtectionTrendEnvironmentKGPFS captures enum value "kGPFS" - ProtectionTrendEnvironmentKGPFS string = "kGPFS" - - // ProtectionTrendEnvironmentKKVM captures enum value "kKVM" - ProtectionTrendEnvironmentKKVM string = "kKVM" - - // ProtectionTrendEnvironmentKAWS captures enum value "kAWS" - ProtectionTrendEnvironmentKAWS string = "kAWS" - - // ProtectionTrendEnvironmentKExchange captures enum value "kExchange" - ProtectionTrendEnvironmentKExchange string = "kExchange" - - // ProtectionTrendEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - ProtectionTrendEnvironmentKHyperVVSS string = "kHyperVVSS" - - // ProtectionTrendEnvironmentKOracle captures enum value "kOracle" - ProtectionTrendEnvironmentKOracle string = "kOracle" - - // ProtectionTrendEnvironmentKGCP captures enum value "kGCP" - ProtectionTrendEnvironmentKGCP string = "kGCP" - - // ProtectionTrendEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionTrendEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionTrendEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionTrendEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionTrendEnvironmentKO365 captures enum value "kO365" - ProtectionTrendEnvironmentKO365 string = "kO365" - - // ProtectionTrendEnvironmentKO365Outlook captures enum value "kO365Outlook" - ProtectionTrendEnvironmentKO365Outlook string = "kO365Outlook" - - // ProtectionTrendEnvironmentKHyperFlex captures enum value "kHyperFlex" - ProtectionTrendEnvironmentKHyperFlex string = "kHyperFlex" - - // ProtectionTrendEnvironmentKGCPNative captures enum value "kGCPNative" - ProtectionTrendEnvironmentKGCPNative string = "kGCPNative" - - // ProtectionTrendEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionTrendEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionTrendEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionTrendEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionTrendEnvironmentKElastifile captures enum value "kElastifile" - ProtectionTrendEnvironmentKElastifile string = "kElastifile" - - // ProtectionTrendEnvironmentKAD captures enum value "kAD" - ProtectionTrendEnvironmentKAD string = "kAD" - - // ProtectionTrendEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionTrendEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionTrendEnvironmentKCassandra captures enum value "kCassandra" - ProtectionTrendEnvironmentKCassandra string = "kCassandra" - - // ProtectionTrendEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionTrendEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionTrendEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionTrendEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionTrendEnvironmentKHdfs captures enum value "kHdfs" - ProtectionTrendEnvironmentKHdfs string = "kHdfs" - - // ProtectionTrendEnvironmentKHive captures enum value "kHive" - ProtectionTrendEnvironmentKHive string = "kHive" - - // ProtectionTrendEnvironmentKHBase captures enum value "kHBase" - ProtectionTrendEnvironmentKHBase string = "kHBase" - - // ProtectionTrendEnvironmentKUDA captures enum value "kUDA" - ProtectionTrendEnvironmentKUDA string = "kUDA" - - // ProtectionTrendEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionTrendEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionTrendEnvironmentKO365Group captures enum value "kO365Group" - ProtectionTrendEnvironmentKO365Group string = "kO365Group" - - // ProtectionTrendEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionTrendEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionTrendEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionTrendEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionTrendEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionTrendEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionTrendEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionTrendEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *ProtectionTrend) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionTrendTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionTrend) 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 -} - -func (m *ProtectionTrend) validateTrends(formats strfmt.Registry) error { - if swag.IsZero(m.Trends) { // not required - return nil - } - - for i := 0; i < len(m.Trends); i++ { - if swag.IsZero(m.Trends[i]) { // not required - continue - } - - if m.Trends[i] != nil { - if err := m.Trends[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trends" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trends" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection trend based on the context it is used -func (m *ProtectionTrend) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTrends(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionTrend) contextValidateTrends(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Trends); i++ { - - if m.Trends[i] != nil { - - if swag.IsZero(m.Trends[i]) { // not required - return nil - } - - if err := m.Trends[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trends" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trends" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionTrend) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionTrend) UnmarshalBinary(b []byte) error { - var res ProtectionTrend - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/proxy_server.go b/v1/models/proxy_server.go deleted file mode 100644 index c3f04924..00000000 --- a/v1/models/proxy_server.go +++ /dev/null @@ -1,74 +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" -) - -// ProxyServer ProxyServer is the struct containing the proxy server for this cluster. -// -// swagger:model ProxyServer -type ProxyServer struct { - - // Address of the proxy. This can be hostname or IP address. - Address *string `json:"address,omitempty"` - - // IsDisabled determines if the proxy configuration is disabled. - IsDisabled *bool `json:"isDisabled,omitempty"` - - // Name of the proxy. - Name *string `json:"name,omitempty"` - - // Password of the proxy. This field is used when the password is updated. - Password *string `json:"password,omitempty"` - - // Port of the proxy. - Port *int32 `json:"port,omitempty"` - - // Schemes of the proxy. - Schemes []string `json:"schemes"` - - // Services to use the proxy. - Services []int32 `json:"services"` - - // Type of proxy. - Type *string `json:"type,omitempty"` - - // Username of the proxy. - Username *string `json:"username,omitempty"` -} - -// Validate validates this proxy server -func (m *ProxyServer) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this proxy server based on context it is used -func (m *ProxyServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProxyServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProxyServer) UnmarshalBinary(b []byte) error { - var res ProxyServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pst_parameters.go b/v1/models/pst_parameters.go deleted file mode 100644 index 01e18f58..00000000 --- a/v1/models/pst_parameters.go +++ /dev/null @@ -1,59 +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" -) - -// PstParameters PST parameters. -// -// Specifies PST conversion details. -// -// swagger:model PstParameters -type PstParameters struct { - - // Specifies if create a PST or MSG for input items. - // For 6.6 we always set this to true. - CreatePst *bool `json:"createPst,omitempty"` - - // Specifies Password to be set for generated PSTs. - PstPassword *string `json:"pstPassword,omitempty"` - - // Specifies PST size threshold in bytes. - PstSizeThreshold *int64 `json:"pstSizeThreshold,omitempty"` -} - -// Validate validates this pst parameters -func (m *PstParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pst parameters based on context it is used -func (m *PstParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PstParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PstParameters) UnmarshalBinary(b []byte) error { - var res PstParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/public_folder.go b/v1/models/public_folder.go deleted file mode 100644 index 2a26aa86..00000000 --- a/v1/models/public_folder.go +++ /dev/null @@ -1,59 +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" -) - -// PublicFolder O365 PublicFolder. -// -// Specifies the O365 PublicFolder details. -// -// swagger:model PublicFolder -type PublicFolder struct { - - // Specifies the unique ID of the folder. - FolderID *string `json:"folderId,omitempty"` - - // Specifies the PublicFolder items within the folder to be restored incase - // the user wishes not to restore the entire folder. - PublicFolderItemIDList []string `json:"publicFolderItemIdList"` - - // Specifies whether the entire folder is to be restored. - RestoreEntireFolder *bool `json:"restoreEntireFolder,omitempty"` -} - -// Validate validates this public folder -func (m *PublicFolder) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this public folder based on context it is used -func (m *PublicFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFolder) UnmarshalBinary(b []byte) error { - var res PublicFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/public_folders_backup_env_params.go b/v1/models/public_folders_backup_env_params.go deleted file mode 100644 index c29f8251..00000000 --- a/v1/models/public_folders_backup_env_params.go +++ /dev/null @@ -1,114 +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" -) - -// PublicFoldersBackupEnvParams O365 PublicFolders Backup Environment Parameters. -// -// Message to capture any additional backup params for Public Folders within -// Office365 environment. -// -// swagger:model PublicFoldersBackupEnvParams -type PublicFoldersBackupEnvParams struct { - - // The filtering policy describes which paths within a Public Folder should - // be excluded within the backup. If this is not specified, then the entire - // Public Folders will be backed up. - FilteringPolicy *FilteringPolicyProto `json:"filteringPolicy,omitempty"` -} - -// Validate validates this public folders backup env params -func (m *PublicFoldersBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PublicFoldersBackupEnvParams) validateFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if m.FilteringPolicy != nil { - if err := m.FilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this public folders backup env params based on the context it is used -func (m *PublicFoldersBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PublicFoldersBackupEnvParams) contextValidateFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.FilteringPolicy != nil { - - if swag.IsZero(m.FilteringPolicy) { // not required - return nil - } - - if err := m.FilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFoldersBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFoldersBackupEnvParams) UnmarshalBinary(b []byte) error { - var res PublicFoldersBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/public_folders_restore_parameters.go b/v1/models/public_folders_restore_parameters.go deleted file mode 100644 index 84b9a40b..00000000 --- a/v1/models/public_folders_restore_parameters.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PublicFoldersRestoreParameters O365 Public Folders Restore Parameters. -// -// Specifies information needed for recovering O365 Public Folders in -// O365Publicfolders environment. -// -// swagger:model PublicFoldersRestoreParameters -type PublicFoldersRestoreParameters struct { - - // Specifies the list of Public Folders to be restored. - RootPublicFolderList []*RootPublicFolder `json:"rootPublicFolderList"` - - // Specifies the target folder path to restore the Public Folders. - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // Specifies the destination Public Folder where the Public Folders specified - // within RootPublicFolders will be restored with their appropriate paths. - TargetRootPublicFolder *ProtectionSource `json:"targetRootPublicFolder,omitempty"` -} - -// Validate validates this public folders restore parameters -func (m *PublicFoldersRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRootPublicFolderList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetRootPublicFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PublicFoldersRestoreParameters) validateRootPublicFolderList(formats strfmt.Registry) error { - if swag.IsZero(m.RootPublicFolderList) { // not required - return nil - } - - for i := 0; i < len(m.RootPublicFolderList); i++ { - if swag.IsZero(m.RootPublicFolderList[i]) { // not required - continue - } - - if m.RootPublicFolderList[i] != nil { - if err := m.RootPublicFolderList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PublicFoldersRestoreParameters) validateTargetRootPublicFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if m.TargetRootPublicFolder != nil { - if err := m.TargetRootPublicFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this public folders restore parameters based on the context it is used -func (m *PublicFoldersRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRootPublicFolderList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetRootPublicFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PublicFoldersRestoreParameters) contextValidateRootPublicFolderList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RootPublicFolderList); i++ { - - if m.RootPublicFolderList[i] != nil { - - if swag.IsZero(m.RootPublicFolderList[i]) { // not required - return nil - } - - if err := m.RootPublicFolderList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PublicFoldersRestoreParameters) contextValidateTargetRootPublicFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetRootPublicFolder != nil { - - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if err := m.TargetRootPublicFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFoldersRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFoldersRestoreParameters) UnmarshalBinary(b []byte) error { - var res PublicFoldersRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/pure_protection_source.go b/v1/models/pure_protection_source.go deleted file mode 100644 index 670960b7..00000000 --- a/v1/models/pure_protection_source.go +++ /dev/null @@ -1,224 +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" -) - -// PureProtectionSource Pure Protection Source. -// -// Specifies a Protection Source in a Pure environment. -// -// swagger:model PureProtectionSource -type PureProtectionSource struct { - - // Specifies a unique name of the Protection Source - Name *string `json:"name,omitempty"` - - // Specifies a SAN Storage Array information. This is set only when - // the type is kStorageArray. - StorageArray *SanStorageArray `json:"storageArray,omitempty"` - - // Specifies the type of managed Object in a SAN/Pure Protection - // Source like a kStorageArray or kVolume. - // Examples of SAN Objects include 'kStorageArray' and 'kVolume'. - // 'kStorageArray' indicates that entire SAN storage array is being - // protected. - // 'kVolume' indicates that volume within the array is being protected. - // Enum: ["kStorageArray","kVolume"] - Type *string `json:"type,omitempty"` - - // Specifies a SAN Volume information within a storage array. - // This is set only when the type is kVolume. - Volume *SanVolume `json:"volume,omitempty"` -} - -// Validate validates this pure protection source -func (m *PureProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageArray(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PureProtectionSource) validateStorageArray(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if m.StorageArray != nil { - if err := m.StorageArray.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -var pureProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pureProtectionSourceTypeTypePropEnum = append(pureProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // PureProtectionSourceTypeKStorageArray captures enum value "kStorageArray" - PureProtectionSourceTypeKStorageArray string = "kStorageArray" - - // PureProtectionSourceTypeKVolume captures enum value "kVolume" - PureProtectionSourceTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *PureProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pureProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PureProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *PureProtectionSource) validateVolume(formats strfmt.Registry) error { - if swag.IsZero(m.Volume) { // not required - return nil - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pure protection source based on the context it is used -func (m *PureProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageArray(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PureProtectionSource) contextValidateStorageArray(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArray != nil { - - if swag.IsZero(m.StorageArray) { // not required - return nil - } - - if err := m.StorageArray.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArray") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArray") - } - return err - } - } - - return nil -} - -func (m *PureProtectionSource) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if swag.IsZero(m.Volume) { // not required - return nil - } - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PureProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PureProtectionSource) UnmarshalBinary(b []byte) error { - var res PureProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/q_star_server_credentials.go b/v1/models/q_star_server_credentials.go deleted file mode 100644 index 301c4624..00000000 --- a/v1/models/q_star_server_credentials.go +++ /dev/null @@ -1,79 +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" -) - -// QStarServerCredentials QStar Server Credentials. -// -// Specifies the server credentials to connect to a QStar service -// to manage the media Vault. -// -// swagger:model QStarServerCredentials -type QStarServerCredentials struct { - - // Specifies the IP address or DNS name of the server where QStar - // service is running. - Host *string `json:"host,omitempty"` - - // Array of Integral Volume Names. - // - // Specifies a list of existing Integral Volume names available on the - // QStar server for storing objects. - IntegralVolumeNames []string `json:"integralVolumeNames"` - - // Specifies the password used to access the QStar host. - Password *string `json:"password,omitempty"` - - // Specifies the listening port where QStar WEB API service is running. - Port *int32 `json:"port,omitempty"` - - // Specifies the sharing protocol type used by QStar to mount - // the integral volume. - // See the Cohesity online help for the recommended protocol - // for your environment. - ShareType *string `json:"shareType,omitempty"` - - // Specifies whether to use http or https to connect to the service. - // If true, a secure connection (https) is used. - UseHTTPS *bool `json:"useHttps,omitempty"` - - // Specifies the account name used to access the QStar host. - Username *string `json:"username,omitempty"` -} - -// Validate validates this q star server credentials -func (m *QStarServerCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this q star server credentials based on context it is used -func (m *QStarServerCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QStarServerCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QStarServerCredentials) UnmarshalBinary(b []byte) error { - var res QStarServerCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/qo_s.go b/v1/models/qo_s.go deleted file mode 100644 index e145b05a..00000000 --- a/v1/models/qo_s.go +++ /dev/null @@ -1,59 +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" -) - -// QoS QoS. -// -// Specifies the Quality of Service (QoS) Policy for the View. -// -// swagger:model QoS -type QoS struct { - - // Specifies the name of the QoS Policy used for the View. - PrincipalID *int64 `json:"principalId,omitempty"` - - // Specifies the name of the QoS Policy used for the View such as - // 'TestAndDev High', 'Backup Target SSD', 'Backup Target High' - // 'TestAndDev Low' and 'Backup Target Low'. For a complete list - // and descriptions, see the 'Create or Edit Views' topic in the - // documentation. If not specified, the default is 'Backup Target Low'. - PrincipalName *string `json:"principalName,omitempty"` -} - -// Validate validates this qo s -func (m *QoS) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this qo s based on context it is used -func (m *QoS) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QoS) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QoS) UnmarshalBinary(b []byte) error { - var res QoS - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/qo_s_policy.go b/v1/models/qo_s_policy.go deleted file mode 100644 index b6e89a17..00000000 --- a/v1/models/qo_s_policy.go +++ /dev/null @@ -1,143 +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" -) - -// QoSPolicy QoSPolicy. -// -// Specifies the Quality of Service (QoS) Policy details. -// -// swagger:model QoSPolicy -type QoSPolicy struct { - - // Specifies whether to always write to SSD even if SeqWriteSsdPct is 0. - AlwaysUseSsd *bool `json:"alwaysUseSsd,omitempty"` - - // Specifies Id of the QoS Policy. - ID *int64 `json:"id,omitempty"` - - // Specifies minimum number of requests, corresponding to this Policy, - // executed in the QoS queue. - MinRequests *int32 `json:"minRequests,omitempty"` - - // Specifies Name of the Qos Policy. - Name *string `json:"name,omitempty"` - - // Specifies Priority of the Qos Policy. - // Priority of QoS Policy as defined in cluster config proto. - // Enum: ["kLow","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies percentage of a random write request belonging to this Policy - // that hits hydra. - RandomWriteHydraPct *int32 `json:"randomWriteHydraPct,omitempty"` - - // Specifies percentage of a random write request belonging to this Policy - // that hits SSD. - RandomWriteSsdPct *int32 `json:"randomWriteSsdPct,omitempty"` - - // Specifies percentage of a sequential write request belonging to this - // Policy that hits hydra. - SeqWriteHydraPct *int32 `json:"seqWriteHydraPct,omitempty"` - - // Specifies percentage of a sequential write request belonging to this - // Policy that hits SSD. - SeqWriteSsdPct *int32 `json:"seqWriteSsdPct,omitempty"` - - // Specifies Weight of the QoS Policy used in QoS queue. - Weight *int32 `json:"weight,omitempty"` - - // Specifies Workload type attribute associated with this Policy. - WorkLoadType *string `json:"workLoadType,omitempty"` -} - -// Validate validates this qo s policy -func (m *QoSPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var qoSPolicyTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - qoSPolicyTypePriorityPropEnum = append(qoSPolicyTypePriorityPropEnum, v) - } -} - -const ( - - // QoSPolicyPriorityKLow captures enum value "kLow" - QoSPolicyPriorityKLow string = "kLow" - - // QoSPolicyPriorityKHigh captures enum value "kHigh" - QoSPolicyPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *QoSPolicy) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, qoSPolicyTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QoSPolicy) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this qo s policy based on context it is used -func (m *QoSPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QoSPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QoSPolicy) UnmarshalBinary(b []byte) error { - var res QoSPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/quota_and_usage_in_view.go b/v1/models/quota_and_usage_in_view.go deleted file mode 100644 index 226d91ac..00000000 --- a/v1/models/quota_and_usage_in_view.go +++ /dev/null @@ -1,120 +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" -) - -// QuotaAndUsageInView Quota And Usage In View. -// -// Specifies the usage and quota information for a specific view. -// -// swagger:model QuotaAndUsageInView -type QuotaAndUsageInView struct { - - // User quota policy applied to this user. - Quota *QuotaPolicy `json:"quota,omitempty"` - - // Usage in bytes of this user in this view. - UsageBytes *int64 `json:"usageBytes,omitempty"` - - // The usage and quota policy information of this user for this view. - ViewID *int64 `json:"viewId,omitempty"` - - // View name. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this quota and usage in view -func (m *QuotaAndUsageInView) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQuota(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *QuotaAndUsageInView) validateQuota(formats strfmt.Registry) error { - if swag.IsZero(m.Quota) { // not required - return nil - } - - if m.Quota != nil { - if err := m.Quota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quota") - } - return err - } - } - - return nil -} - -// ContextValidate validate this quota and usage in view based on the context it is used -func (m *QuotaAndUsageInView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *QuotaAndUsageInView) contextValidateQuota(ctx context.Context, formats strfmt.Registry) error { - - if m.Quota != nil { - - if swag.IsZero(m.Quota) { // not required - return nil - } - - if err := m.Quota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quota") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *QuotaAndUsageInView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QuotaAndUsageInView) UnmarshalBinary(b []byte) error { - var res QuotaAndUsageInView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/quota_policy.go b/v1/models/quota_policy.go deleted file mode 100644 index 0963cafa..00000000 --- a/v1/models/quota_policy.go +++ /dev/null @@ -1,83 +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" -) - -// QuotaPolicy Quota Policy -// -// Specifies a quota limit that can be optionally applied to Views and -// View Boxes. -// At the View level, this quota defines a logical limit for usage on the View. -// At the View Box level, this quota defines a physical limit or -// a default logical View limit. -// If a physical quota is specified for View Box, this quota defines a physical -// limit for the usage on the View Box. -// If a default logical View quota is specified for View Box, this limit -// is inherited by all the Views in that View Box. -// However, this inherited quota can be overwritten at the View level. -// A new write is not allowed if the resource 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 resource, as the Cluster calculates the usage -// across Nodes. -// -// swagger:model QuotaPolicy -type QuotaPolicy struct { - - // Specifies if an alert should be triggered when the usage of this - // resource exceeds this quota limit. - // This limit is optional and is specified in bytes. - // If no value is specified, there is no limit. - AlertLimitBytes *int64 `json:"alertLimitBytes,omitempty"` - - // Supported only for user quota policy. Specifies when the usage goes above - // an alert threshold percentage which is: - // HardLimitBytes * AlertThresholdPercentage, eg: 80% of HardLimitBytes - // Can only be set if HardLimitBytes is set. - // Cannot be set if AlertLimitBytes is already set. - AlertThresholdPercentage *int64 `json:"alertThresholdPercentage,omitempty"` - - // Specifies an optional quota limit on the usage allowed for this - // resource. This limit is specified in bytes. If no value is specified, - // there is no limit. - HardLimitBytes *int64 `json:"hardLimitBytes,omitempty"` -} - -// Validate validates this quota policy -func (m *QuotaPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this quota policy based on context it is used -func (m *QuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QuotaPolicy) UnmarshalBinary(b []byte) error { - var res QuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/r_d_s_db_connector_params.go b/v1/models/r_d_s_db_connector_params.go deleted file mode 100644 index 42acf1d9..00000000 --- a/v1/models/r_d_s_db_connector_params.go +++ /dev/null @@ -1,57 +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" -) - -// RDSDbConnectorParams Message representing connection information for RDS Instances or Aurora -// Clusters. -// -// swagger:model RDSDbConnectorParams -type RDSDbConnectorParams struct { - - // Default db that can be used to connect to the server. - DefaultDb *string `json:"defaultDb,omitempty"` - - // Endpoint of the host to connect to. - Endpoint *string `json:"endpoint,omitempty"` - - // Port of the host to connect to. - Port *int32 `json:"port,omitempty"` -} - -// Validate validates this r d s db connector params -func (m *RDSDbConnectorParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this r d s db connector params based on context it is used -func (m *RDSDbConnectorParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RDSDbConnectorParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RDSDbConnectorParams) UnmarshalBinary(b []byte) error { - var res RDSDbConnectorParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ransomware_info.go b/v1/models/ransomware_info.go deleted file mode 100644 index b3d74a8a..00000000 --- a/v1/models/ransomware_info.go +++ /dev/null @@ -1,63 +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" -) - -// RansomwareInfo RansomwareInfo holds information about the FortKnox/FortKnoxFreeTrial -// subscription such as if it is active or not. -// -// swagger:model RansomwareInfo -type RansomwareInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the RPaaS subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the quantity of the subscription. - Quantity *int64 `json:"quantity,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this ransomware info -func (m *RansomwareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ransomware info based on context it is used -func (m *RansomwareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RansomwareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RansomwareInfo) UnmarshalBinary(b []byte) error { - var res RansomwareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/rds_params.go b/v1/models/rds_params.go deleted file mode 100644 index a35f88cb..00000000 --- a/v1/models/rds_params.go +++ /dev/null @@ -1,101 +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" -) - -// RdsParams RDS parameters. -// -// Specifies rds params for the restore operation. -// -// swagger:model RdsParams -type RdsParams struct { - - // Entity representing the availability zone to use while restoring the DB. - AvailabilityZoneID *int64 `json:"availabilityZoneId,omitempty"` - - // The DB instance identifier to use for the restored DB. This field is - // required. - // Required: true - DbInstanceID *string `json:"dbInstanceId"` - - // Entity representing the RDS option group to use while restoring the DB. - DbOptionGroupID *int64 `json:"dbOptionGroupId,omitempty"` - - // Entity representing the RDS parameter group to use while restoring the DB. - DbParameterGroupID *int64 `json:"dbParameterGroupId,omitempty"` - - // Port to use for the DB in the restored RDS instance. - DbPort *int32 `json:"dbPort,omitempty"` - - // Whether to enable auto minor version upgrade in the restored DB. - EnableAutoMinorVersionUpgrade *bool `json:"enableAutoMinorVersionUpgrade,omitempty"` - - // Whether to enable copying of tags to snapshots of the DB. - EnableCopyTagsToSnapshots *bool `json:"enableCopyTagsToSnapshots,omitempty"` - - // Whether to enable IAM authentication for the DB. - EnableDbAuthentication *bool `json:"enableDbAuthentication,omitempty"` - - // Whether this DB will be publicly accessible or not. - EnablePublicAccessibility *bool `json:"enablePublicAccessibility,omitempty"` - - // Whether this is a multi-az deployment or not. - IsMultiAzDeployment *bool `json:"isMultiAzDeployment,omitempty"` -} - -// Validate validates this rds params -func (m *RdsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbInstanceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RdsParams) validateDbInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("dbInstanceId", "body", m.DbInstanceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rds params based on context it is used -func (m *RdsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RdsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RdsParams) UnmarshalBinary(b []byte) error { - var res RdsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/read_dir_result.go b/v1/models/read_dir_result.go deleted file mode 100644 index d07f863c..00000000 --- a/v1/models/read_dir_result.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReadDirResult ReadDirResult is the struct to return the result of read directory. -// -// swagger:model ReadDirResult -type ReadDirResult struct { - - // Cookie is used for paginating results. If ReadVMDirResult is returning - // partial results, this field will be set. Supplying this cookie will - // resume listing from where this result left off. - Cookie *string `json:"cookie,omitempty"` - - // Entries is the array of files and folders that are immediate children - // of the parent directory specified in the request. - Entries []*DirEntry `json:"entries"` -} - -// Validate validates this read dir result -func (m *ReadDirResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntries(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReadDirResult) validateEntries(formats strfmt.Registry) error { - if swag.IsZero(m.Entries) { // not required - return nil - } - - for i := 0; i < len(m.Entries); i++ { - if swag.IsZero(m.Entries[i]) { // not required - continue - } - - if m.Entries[i] != nil { - if err := m.Entries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this read dir result based on the context it is used -func (m *ReadDirResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntries(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReadDirResult) contextValidateEntries(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Entries); i++ { - - if m.Entries[i] != nil { - - if swag.IsZero(m.Entries[i]) { // not required - return nil - } - - if err := m.Entries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReadDirResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReadDirResult) UnmarshalBinary(b []byte) error { - var res ReadDirResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/read_i_o_data_proto.go b/v1/models/read_i_o_data_proto.go deleted file mode 100644 index 84619585..00000000 --- a/v1/models/read_i_o_data_proto.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReadIODataProto A protocol buffer message that identifies a tracking pattern of read IOs on -// an ordered set of entity handles. This ensures that this tracked information -// can be used for predicting the next set of read IOs even when this set is -// cloned and the handles have changed. -// -// swagger:model ReadIODataProto -type ReadIODataProto struct { - - // The sequence of IOs on a set of files. - TrackDataVec []*ReadIODataProtoReadIO `json:"trackDataVec"` -} - -// Validate validates this read i o data proto -func (m *ReadIODataProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTrackDataVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReadIODataProto) validateTrackDataVec(formats strfmt.Registry) error { - if swag.IsZero(m.TrackDataVec) { // not required - return nil - } - - for i := 0; i < len(m.TrackDataVec); i++ { - if swag.IsZero(m.TrackDataVec[i]) { // not required - continue - } - - if m.TrackDataVec[i] != nil { - if err := m.TrackDataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trackDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trackDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this read i o data proto based on the context it is used -func (m *ReadIODataProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTrackDataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReadIODataProto) contextValidateTrackDataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TrackDataVec); i++ { - - if m.TrackDataVec[i] != nil { - - if swag.IsZero(m.TrackDataVec[i]) { // not required - return nil - } - - if err := m.TrackDataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trackDataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trackDataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReadIODataProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReadIODataProto) UnmarshalBinary(b []byte) error { - var res ReadIODataProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/read_i_o_data_proto_read_i_o.go b/v1/models/read_i_o_data_proto_read_i_o.go deleted file mode 100644 index 7e9249cc..00000000 --- a/v1/models/read_i_o_data_proto_read_i_o.go +++ /dev/null @@ -1,56 +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" -) - -// ReadIODataProtoReadIO A data point in the tracking pattern. -// -// swagger:model ReadIODataProto_ReadIO -type ReadIODataProtoReadIO struct { - - // The count in bytes relative to the offset. - CountBytes *int64 `json:"countBytes,omitempty"` - - // The relative index of entity handle. - EntityHandleIndex *int32 `json:"entityHandleIndex,omitempty"` - - // Starting offset of the IO in bytes. - OffsetBytes *int64 `json:"offsetBytes,omitempty"` -} - -// Validate validates this read i o data proto read i o -func (m *ReadIODataProtoReadIO) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this read i o data proto read i o based on context it is used -func (m *ReadIODataProtoReadIO) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReadIODataProtoReadIO) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReadIODataProtoReadIO) UnmarshalBinary(b []byte) error { - var res ReadIODataProtoReadIO - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_arg.go b/v1/models/recover_arg.go deleted file mode 100644 index e32eae21..00000000 --- a/v1/models/recover_arg.go +++ /dev/null @@ -1,1404 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverArg RecoverArg represents the argument for recover VM operations. -// -// swagger:model RecoverArg -type RecoverArg struct { - - // Defines the Acropolis specific params for restore tasks. - AcropolisParams *RestoreAcropolisVMsParams `json:"acropolisParams,omitempty"` - - // Type of restore to perform. If it is not not specified, it will be - // assumed to be kRecoverVMs. - Action *int32 `json:"action,omitempty"` - - // ContinueRestoreOnError specifies whether to continue with the recover - // operation if recover of any object fails. - ContinueRestoreOnError *bool `json:"continueRestoreOnError,omitempty"` - - // DatastoreEntity is the datastore entity where the object's files should be - // recovered to. - // - // This field is optional if object is being recovered to its original parent - // source. If not specified, the object's files will be recovered to their - // original datastore locations. This field is mandatory if object is being - // recovered to a different resource pool or to a different parent source. - DatastoreEntity *PrivateEntityProto `json:"datastoreEntity,omitempty"` - - // Specifies parameters to recover VMs to cloud. Only populate this if - // deploying VMs to cloud. - DeployVmsToCloudParams *DeployVMsToCloudParams `json:"deployVmsToCloudParams,omitempty"` - - // Defines the HyperV specific params for restore tasks. - HypervParams *RestoreHyperVVMParams `json:"hypervParams,omitempty"` - - // Specifies parameters which are specific to Kubernetes namespace recoveries. - KubernetesParams *RestoreKubernetesNamespacesParams `json:"kubernetesParams,omitempty"` - - // Defines the KVM specific params for restore tasks. - KvmParams *RestoreKVMVMsParams `json:"kvmParams,omitempty"` - - // Contains information needed when mounting volumes. If specified, only name - // and RestoreParentSource options apply for mounting volumes. - MountVolumesParams *MountVolumesParams `json:"mountVolumesParams,omitempty"` - - // Name is the name of the restore task. This field is mandatory. - Name *string `json:"name,omitempty"` - - // Objects is the list of objects to restore. - Objects []*RestoreObject `json:"objects"` - - // Specifies the parameters to recover OneDrive items. - OneDriveParams *RestoreOneDriveParams `json:"oneDriveParams,omitempty"` - - // Specifies parameters to recover Outlook Mailboxes, Folders or Items. - OutlookParams *RestoreOutlookParams `json:"outlookParams,omitempty"` - - // PowerStateConfig is an optional power state configuration to be applied to - // the recovered object. - // - // By default, objects are recovered in the powered on state. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // PreserveTags specifies whether or not to preserve tags during the - // operations. This is used for VMware and HyperV. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // Specifies the parameters to recover O365 Public Folders items. - PublicFoldersParams *RestoreO365PublicFoldersParams `json:"publicFoldersParams,omitempty"` - - // Specifies parameters to recover virtual disks. - RecoverVirtualDiskParams *RecoverVirtualDiskParams `json:"recoverVirtualDiskParams,omitempty"` - - // Defines the params for physical server volume restore tasks. - RecoverVolumesParams *RecoverVolumesParams `json:"recoverVolumesParams,omitempty"` - - // RenameRestoredObjectParam field can be used to specify the transformation - // ( i.e. prefix/suffix) to be applied to the source object name to derive the - // new name of the recovered object. By default, objects are recovered with - // their original name. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // Specifies the name transformation to be applied to the vApp during restore. - RenameRestoredVappParams *RenameObjectParamProto `json:"renameRestoredVappParams,omitempty"` - - // ResourcePoolEntity is the resource pool entity where the recovered objects - // will be attached. - // - // This field is optional for a recover task if the objects are being - // recovered to its original parent source. If not specified, recovered - // objects will be attached to its original resource pool. This field is - // mandatory if objects are being restored to a different parent source. - ResourcePoolEntity *PrivateEntityProto `json:"resourcePoolEntity,omitempty"` - - // RestoreParentSource is an optional registered parent source to which - // objects are to be recovered. If not specified, objects are recovered back - // to the original source that was managing the objects. - RestoreParentSource *PrivateEntityProto `json:"restoreParentSource,omitempty"` - - // Vlan Params associated with the restore. - // If this is not specified, then the VLAN settings will be automatically - // selected from one of the following options: - // a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be - // automatically based on the client's (e.g. ESXI host) IP address. - // b. If VLANs are not configured on Cohesity, then the partition hostname or - // VIPs will be used for restores. - RestoreVlanParams *VlanParams `json:"restoreVlanParams,omitempty"` - - // RestoredObjectsNetworkConfig is the network configuration to be applied to - // the recovered object. - // - // By default, if objects are being recovered to their original parent source, - // then either original network configuration can be applied or network can be - // disabled for the recovered object. If objects are being recovered to - // different resource pool or to different parent source, either network - // configuration can be changed or network can be disabled for the recovered - // object. - // - // If user want to keep the original network setting for recover task, then - // this field should not be set. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Specifies the parameters to recover SharePoint Site items. - SharePointParams *RestoreSiteParams `json:"sharePointParams,omitempty"` - - // Specifies the way data needs to be retrieved/restored from the vault. - VaultRestoreParams *VaultParamsRestoreParams `json:"vaultRestoreParams,omitempty"` - - // Specifies the Vcd config info parameter for restore tasks. - VcdConfigParams *RestoredObjectVCDConfigProto `json:"vcdConfigParams,omitempty"` - - // Target view into which the objects are to be cloned when doing recovery - // for NAS. - ViewName *string `json:"viewName,omitempty"` - - // ViewParams are the parameters to set qos on View specified by ViewName - // for NAS recovery. - ViewParams *UpdateViewParam `json:"viewParams,omitempty"` - - // Defines special VMWare specific params that are not provided at top level. - VmwareParams *RestoreVMwareVMParams `json:"vmwareParams,omitempty"` -} - -// Validate validates this recover arg -func (m *RecoverArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloudParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFoldersParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVirtualDiskParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVolumesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredVappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePointParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfigParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverArg) validateAcropolisParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if m.DatastoreEntity != nil { - if err := m.DatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateDeployVmsToCloudParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if m.DeployVmsToCloudParams != nil { - if err := m.DeployVmsToCloudParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateKvmParams(formats strfmt.Registry) error { - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if m.KvmParams != nil { - if err := m.KvmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateMountVolumesParams(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumesParams) { // not required - return nil - } - - if m.MountVolumesParams != nil { - if err := m.MountVolumesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverArg) validateOneDriveParams(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveParams) { // not required - return nil - } - - if m.OneDriveParams != nil { - if err := m.OneDriveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateOutlookParams(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookParams) { // not required - return nil - } - - if m.OutlookParams != nil { - if err := m.OutlookParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validatePublicFoldersParams(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFoldersParams) { // not required - return nil - } - - if m.PublicFoldersParams != nil { - if err := m.PublicFoldersParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRecoverVirtualDiskParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVirtualDiskParams) { // not required - return nil - } - - if m.RecoverVirtualDiskParams != nil { - if err := m.RecoverVirtualDiskParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRecoverVolumesParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVolumesParams) { // not required - return nil - } - - if m.RecoverVolumesParams != nil { - if err := m.RecoverVolumesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRenameRestoredVappParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if m.RenameRestoredVappParams != nil { - if err := m.RenameRestoredVappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRestoreVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if m.RestoreVlanParams != nil { - if err := m.RestoreVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateSharePointParams(formats strfmt.Registry) error { - if swag.IsZero(m.SharePointParams) { // not required - return nil - } - - if m.SharePointParams != nil { - if err := m.SharePointParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateVaultRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if m.VaultRestoreParams != nil { - if err := m.VaultRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateVcdConfigParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if m.VcdConfigParams != nil { - if err := m.VcdConfigParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover arg based on the context it is used -func (m *RecoverArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloudParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFoldersParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVirtualDiskParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVolumesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredVappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePointParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaultRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfigParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverArg) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreEntity != nil { - - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if err := m.DatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateDeployVmsToCloudParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloudParams != nil { - - if swag.IsZero(m.DeployVmsToCloudParams) { // not required - return nil - } - - if err := m.DeployVmsToCloudParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloudParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloudParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateKvmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmParams != nil { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if err := m.KvmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateMountVolumesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumesParams != nil { - - if swag.IsZero(m.MountVolumesParams) { // not required - return nil - } - - if err := m.MountVolumesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverArg) contextValidateOneDriveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveParams != nil { - - if swag.IsZero(m.OneDriveParams) { // not required - return nil - } - - if err := m.OneDriveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateOutlookParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookParams != nil { - - if swag.IsZero(m.OutlookParams) { // not required - return nil - } - - if err := m.OutlookParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidatePublicFoldersParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFoldersParams != nil { - - if swag.IsZero(m.PublicFoldersParams) { // not required - return nil - } - - if err := m.PublicFoldersParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRecoverVirtualDiskParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVirtualDiskParams != nil { - - if swag.IsZero(m.RecoverVirtualDiskParams) { // not required - return nil - } - - if err := m.RecoverVirtualDiskParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRecoverVolumesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVolumesParams != nil { - - if swag.IsZero(m.RecoverVolumesParams) { // not required - return nil - } - - if err := m.RecoverVolumesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumesParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRenameRestoredVappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredVappParams != nil { - - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if err := m.RenameRestoredVappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRestoreVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVlanParams != nil { - - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if err := m.RestoreVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateSharePointParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharePointParams != nil { - - if swag.IsZero(m.SharePointParams) { // not required - return nil - } - - if err := m.SharePointParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateVaultRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VaultRestoreParams != nil { - - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if err := m.VaultRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateVcdConfigParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfigParams != nil { - - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if err := m.VcdConfigParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *RecoverArg) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverArg) UnmarshalBinary(b []byte) error { - var res RecoverArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_disks_task_state_proto.go b/v1/models/recover_disks_task_state_proto.go deleted file mode 100644 index 02f8e6dc..00000000 --- a/v1/models/recover_disks_task_state_proto.go +++ /dev/null @@ -1,160 +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" -) - -// RecoverDisksTaskStateProto Persistent state for a "recover disks" restore task. -// -// swagger:model RecoverDisksTaskStateProto -type RecoverDisksTaskStateProto struct { - - // Captures the details of the recover virtual disk info. - RecoverVirtualDiskInfo *RecoverVirtualDiskInfoProto `json:"recoverVirtualDiskInfo,omitempty"` - - // Captures the original parameters from Iris. - RecoverVirtualDiskParams *RecoverVirtualDiskParams `json:"recoverVirtualDiskParams,omitempty"` -} - -// Validate validates this recover disks task state proto -func (m *RecoverDisksTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverVirtualDiskInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVirtualDiskParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverDisksTaskStateProto) validateRecoverVirtualDiskInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVirtualDiskInfo) { // not required - return nil - } - - if m.RecoverVirtualDiskInfo != nil { - if err := m.RecoverVirtualDiskInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverDisksTaskStateProto) validateRecoverVirtualDiskParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVirtualDiskParams) { // not required - return nil - } - - if m.RecoverVirtualDiskParams != nil { - if err := m.RecoverVirtualDiskParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover disks task state proto based on the context it is used -func (m *RecoverDisksTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverVirtualDiskInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVirtualDiskParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverDisksTaskStateProto) contextValidateRecoverVirtualDiskInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVirtualDiskInfo != nil { - - if swag.IsZero(m.RecoverVirtualDiskInfo) { // not required - return nil - } - - if err := m.RecoverVirtualDiskInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverDisksTaskStateProto) contextValidateRecoverVirtualDiskParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVirtualDiskParams != nil { - - if swag.IsZero(m.RecoverVirtualDiskParams) { // not required - return nil - } - - if err := m.RecoverVirtualDiskParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVirtualDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVirtualDiskParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverDisksTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverDisksTaskStateProto) UnmarshalBinary(b []byte) error { - var res RecoverDisksTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_task_request.go b/v1/models/recover_task_request.go deleted file mode 100644 index 604afb0b..00000000 --- a/v1/models/recover_task_request.go +++ /dev/null @@ -1,961 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverTaskRequest Create Restore Task Request. -// -// Create a Restore Task Request for recovering VMs or mounting volumes to -// mount points. -// -// swagger:model RecoverTaskRequest -type RecoverTaskRequest struct { - - // Specifies additional parameters for 'kRecoverO365PublicFolders' restore - // objects. - PublicFoldersParameters *PublicFoldersRestoreParameters `json:"PublicFoldersParameters,omitempty"` - - // Specifies additional parameters for 'kAcropolis' restore objects. - AcropolisParameters *AcropolisRestoreParameters `json:"acropolisParameters,omitempty"` - - // Specifies if the Restore Task should continue when some operations on some - // objects fail. If true, the Cohesity Cluster ignores intermittent - // errors and restores as many objects as possible. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies parameters to deploy VMs to cloud. - DeployVmsToCloud *DeployVmsToCloud `json:"deployVmsToCloud,omitempty"` - - // Specifies the way data needs to be retrieved from the external target. - // This information will be filled in by Iris and Magneto will pass it along - // to the Icebox as it is to support bulk retrieval from Glacier. - // Specifies the type of Restore Task. - // - // 'kStandard' specifies retrievals that allow to access any of your archives - // within several hours. Standard retrievals typically complete within 3–5 - // hours. This is the default option for retrieval requests that do not specify - // the retrieval option. - // 'kBulk' specifies retrievals that are Glacier’s lowest-cost retrieval - // option, which can be used to retrieve large amounts, even petabytes, of data - // inexpensively in a day. Bulk retrieval typically complete within 5–12 hours. - // 'kExpedited' specifies retrievals that allows to quickly access your data - // when occasional urgent requests for a subset of archives are required. For - // all but the largest archives (250 MB+), data accessed using Expedited - // retrievals are typically made available within 1–5 minutes. - // Enum: ["kStandard","kBulk","kExpedited"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` - - // Specifies additional parameters for 'kHyperV' restore objects. - HypervParameters *HypervRestoreParameters `json:"hypervParameters,omitempty"` - - // Specifies additional parameters for 'kKubernetes' restore objects. - KubernetesParameters *KubernetesRestoreParameters `json:"kubernetesParameters,omitempty"` - - // Specifies parameters required for mounting volumes. - MountParameters *MountVolumesParameters `json:"mountParameters,omitempty"` - - // Specifies the name of the Restore Task. This field must be set and - // must be a unique name. - // Required: true - Name *string `json:"name"` - - // Specify a new registered parent Protection Source. If specified - // the selected objects are cloned or recovered to this new Protection - // Source. If not specified, objects are cloned or recovered - // to the original Protection Source that was managing them. - NewParentID *int64 `json:"newParentId,omitempty"` - - // Array of Objects. - // - // Specifies a list of Protection Source objects or Protection Job objects - // (with specified Protection Source objects). - Objects []*RestoreObjectDetails `json:"objects"` - - // Specifies additional parameters for 'kRecoverO365Drive' restore objects. - OneDriveParameters *OneDriveRestoreParameters `json:"oneDriveParameters,omitempty"` - - // Specifies additional parameters for 'kRecoverEmails' restore objects. - OutlookParameters *OutlookRestoreParameters `json:"outlookParameters,omitempty"` - - // Restore View. - // - // Specifies settings for restoring view. - RestoreViewParameters *UpdateViewParam `json:"restoreViewParameters,omitempty"` - - // Specifies additional parameters for 'kRecoverSites' restore objects. - SharePointParameters *SharePointRestoreParameters `json:"sharePointParameters,omitempty"` - - // Specifies the type of Restore Task such as 'kRecoverVMs' or - // 'kMountVolumes'. - // 'kRecoverVMs' specifies a Restore Task that recovers VMs. - // 'kMountVolumes' specifies a Restore Task that mounts volumes to mount - // points. - // 'kRecoverNamespaces' specifies a Restore Task that recovers Kubernetes - // namespaces. - // 'kMountFileVolume' specifies a Restore Task that mounts a file volume. - // Required: true - // Enum: ["kRecoverVMs","kMountVolumes","kRecoverNamespaces","kMountFileVolume"] - Type *string `json:"type"` - - // Specifie target view into which the objects are to be cloned when doing - // recovery for NAS. - ViewName *string `json:"viewName,omitempty"` - - // Specifies parameters for restoring virtual disks from VM. - VirtualDiskRestoreParameters *VirtualDiskRestoreParameters `json:"virtualDiskRestoreParameters,omitempty"` - - // Specifies VLAN parameters for the restore operation. - VlanParameters *VlanParameters `json:"vlanParameters,omitempty"` - - // Specifies additional parameters for 'kVmware' restore objects. - VmwareParameters *VmwareRestoreParameters `json:"vmwareParameters,omitempty"` -} - -// Validate validates this recover task request -func (m *RecoverTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePublicFoldersParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloud(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreViewParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePointParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskRestoreParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverTaskRequest) validatePublicFoldersParameters(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFoldersParameters) { // not required - return nil - } - - if m.PublicFoldersParameters != nil { - if err := m.PublicFoldersParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("PublicFoldersParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("PublicFoldersParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateAcropolisParameters(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisParameters) { // not required - return nil - } - - if m.AcropolisParameters != nil { - if err := m.AcropolisParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateDeployVmsToCloud(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloud) { // not required - return nil - } - - if m.DeployVmsToCloud != nil { - if err := m.DeployVmsToCloud.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloud") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloud") - } - return err - } - } - - return nil -} - -var recoverTaskRequestTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kBulk","kExpedited"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverTaskRequestTypeGlacierRetrievalTypePropEnum = append(recoverTaskRequestTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // RecoverTaskRequestGlacierRetrievalTypeKStandard captures enum value "kStandard" - RecoverTaskRequestGlacierRetrievalTypeKStandard string = "kStandard" - - // RecoverTaskRequestGlacierRetrievalTypeKBulk captures enum value "kBulk" - RecoverTaskRequestGlacierRetrievalTypeKBulk string = "kBulk" - - // RecoverTaskRequestGlacierRetrievalTypeKExpedited captures enum value "kExpedited" - RecoverTaskRequestGlacierRetrievalTypeKExpedited string = "kExpedited" -) - -// prop value enum -func (m *RecoverTaskRequest) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverTaskRequestTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverTaskRequest) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -func (m *RecoverTaskRequest) validateHypervParameters(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if m.HypervParameters != nil { - if err := m.HypervParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateKubernetesParameters(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParameters) { // not required - return nil - } - - if m.KubernetesParameters != nil { - if err := m.KubernetesParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateMountParameters(formats strfmt.Registry) error { - if swag.IsZero(m.MountParameters) { // not required - return nil - } - - if m.MountParameters != nil { - if err := m.MountParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *RecoverTaskRequest) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverTaskRequest) validateOneDriveParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveParameters) { // not required - return nil - } - - if m.OneDriveParameters != nil { - if err := m.OneDriveParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateOutlookParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if m.OutlookParameters != nil { - if err := m.OutlookParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateRestoreViewParameters(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreViewParameters) { // not required - return nil - } - - if m.RestoreViewParameters != nil { - if err := m.RestoreViewParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreViewParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateSharePointParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SharePointParameters) { // not required - return nil - } - - if m.SharePointParameters != nil { - if err := m.SharePointParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParameters") - } - return err - } - } - - return nil -} - -var recoverTaskRequestTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRecoverVMs","kMountVolumes","kRecoverNamespaces","kMountFileVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverTaskRequestTypeTypePropEnum = append(recoverTaskRequestTypeTypePropEnum, v) - } -} - -const ( - - // RecoverTaskRequestTypeKRecoverVMs captures enum value "kRecoverVMs" - RecoverTaskRequestTypeKRecoverVMs string = "kRecoverVMs" - - // RecoverTaskRequestTypeKMountVolumes captures enum value "kMountVolumes" - RecoverTaskRequestTypeKMountVolumes string = "kMountVolumes" - - // RecoverTaskRequestTypeKRecoverNamespaces captures enum value "kRecoverNamespaces" - RecoverTaskRequestTypeKRecoverNamespaces string = "kRecoverNamespaces" - - // RecoverTaskRequestTypeKMountFileVolume captures enum value "kMountFileVolume" - RecoverTaskRequestTypeKMountFileVolume string = "kMountFileVolume" -) - -// prop value enum -func (m *RecoverTaskRequest) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverTaskRequestTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverTaskRequest) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *RecoverTaskRequest) validateVirtualDiskRestoreParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskRestoreParameters) { // not required - return nil - } - - if m.VirtualDiskRestoreParameters != nil { - if err := m.VirtualDiskRestoreParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateVlanParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if m.VlanParameters != nil { - if err := m.VlanParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) validateVmwareParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if m.VmwareParameters != nil { - if err := m.VmwareParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover task request based on the context it is used -func (m *RecoverTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePublicFoldersParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloud(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreViewParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePointParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskRestoreParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverTaskRequest) contextValidatePublicFoldersParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFoldersParameters != nil { - - if swag.IsZero(m.PublicFoldersParameters) { // not required - return nil - } - - if err := m.PublicFoldersParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("PublicFoldersParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("PublicFoldersParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateAcropolisParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParameters != nil { - - if swag.IsZero(m.AcropolisParameters) { // not required - return nil - } - - if err := m.AcropolisParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateDeployVmsToCloud(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloud != nil { - - if swag.IsZero(m.DeployVmsToCloud) { // not required - return nil - } - - if err := m.DeployVmsToCloud.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloud") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloud") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateHypervParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParameters != nil { - - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if err := m.HypervParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateKubernetesParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParameters != nil { - - if swag.IsZero(m.KubernetesParameters) { // not required - return nil - } - - if err := m.KubernetesParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateMountParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.MountParameters != nil { - - if swag.IsZero(m.MountParameters) { // not required - return nil - } - - if err := m.MountParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateOneDriveParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveParameters != nil { - - if swag.IsZero(m.OneDriveParameters) { // not required - return nil - } - - if err := m.OneDriveParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateOutlookParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookParameters != nil { - - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if err := m.OutlookParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateRestoreViewParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreViewParameters != nil { - - if swag.IsZero(m.RestoreViewParameters) { // not required - return nil - } - - if err := m.RestoreViewParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreViewParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateSharePointParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.SharePointParameters != nil { - - if swag.IsZero(m.SharePointParameters) { // not required - return nil - } - - if err := m.SharePointParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateVirtualDiskRestoreParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualDiskRestoreParameters != nil { - - if swag.IsZero(m.VirtualDiskRestoreParameters) { // not required - return nil - } - - if err := m.VirtualDiskRestoreParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateVlanParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParameters != nil { - - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if err := m.VlanParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *RecoverTaskRequest) contextValidateVmwareParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParameters != nil { - - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if err := m.VmwareParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverTaskRequest) UnmarshalBinary(b []byte) error { - var res RecoverTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_virtual_disk_info_proto.go b/v1/models/recover_virtual_disk_info_proto.go deleted file mode 100644 index bbc56a6f..00000000 --- a/v1/models/recover_virtual_disk_info_proto.go +++ /dev/null @@ -1,345 +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" -) - -// RecoverVirtualDiskInfoProto Message that encapsulates information about recover virtual disks task for -// any of the environments we support. Environment specific virtual disk infos -// are defined as extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// RecoverVirtualDiskInfoProto extension Location -// ============================================================================= -// ============================================================================= -// -// swagger:model RecoverVirtualDiskInfoProto -type RecoverVirtualDiskInfoProto struct { - - // If an error is encountered while cleaning up state, then it will be - // captured as part of this. - CleanupError *ErrorProto `json:"cleanupError,omitempty"` - - // If an error was encountered while migrating the disks it will be captured - // here. - DataMigrationError *ErrorProto `json:"dataMigrationError,omitempty"` - - // If recovering of disks failed, this field may contain the cause - // of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // This will be set to true if the task is complete on the slave. - Finished *bool `json:"finished,omitempty"` - - // This will be set to true once the instant recovery of the virtual disk is - // complete. - InstantRecoveryFinished *bool `json:"instantRecoveryFinished,omitempty"` - - // The task moref of the migrate job. - MigrateTaskMoref *MORef `json:"migrateTaskMoref,omitempty"` - - // The state of the task that sets up and tears down the restore disks that - // are needed during the mount/teardown operation - // - // The environment specific extensions of this proto store the detailed - // status information about the task. - RestoreDisksTaskInfoProto *SetupRestoreDiskTaskInfoProto `json:"restoreDisksTaskInfoProto,omitempty"` - - // This is the timestamp at which the slave task started. - SlaveTaskStartTimeUsecs *int64 `json:"slaveTaskStartTimeUsecs,omitempty"` - - // The state of the task. - TaskState *int32 `json:"taskState,omitempty"` - - // The type of environment this recover virtual disk info pertains to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this recover virtual disk info proto -func (m *RecoverVirtualDiskInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCleanupError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataMigrationError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMigrateTaskMoref(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreDisksTaskInfoProto(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskInfoProto) validateCleanupError(formats strfmt.Registry) error { - if swag.IsZero(m.CleanupError) { // not required - return nil - } - - if m.CleanupError != nil { - if err := m.CleanupError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupError") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) validateDataMigrationError(formats strfmt.Registry) error { - if swag.IsZero(m.DataMigrationError) { // not required - return nil - } - - if m.DataMigrationError != nil { - if err := m.DataMigrationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationError") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RecoverVirtualDiskInfoProto) validateMigrateTaskMoref(formats strfmt.Registry) error { - if swag.IsZero(m.MigrateTaskMoref) { // not required - return nil - } - - if m.MigrateTaskMoref != nil { - if err := m.MigrateTaskMoref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("migrateTaskMoref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("migrateTaskMoref") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) validateRestoreDisksTaskInfoProto(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreDisksTaskInfoProto) { // not required - return nil - } - - if m.RestoreDisksTaskInfoProto != nil { - if err := m.RestoreDisksTaskInfoProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreDisksTaskInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreDisksTaskInfoProto") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover virtual disk info proto based on the context it is used -func (m *RecoverVirtualDiskInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCleanupError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataMigrationError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMigrateTaskMoref(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreDisksTaskInfoProto(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskInfoProto) contextValidateCleanupError(ctx context.Context, formats strfmt.Registry) error { - - if m.CleanupError != nil { - - if swag.IsZero(m.CleanupError) { // not required - return nil - } - - if err := m.CleanupError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupError") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) contextValidateDataMigrationError(ctx context.Context, formats strfmt.Registry) error { - - if m.DataMigrationError != nil { - - if swag.IsZero(m.DataMigrationError) { // not required - return nil - } - - if err := m.DataMigrationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataMigrationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataMigrationError") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) 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 -} - -func (m *RecoverVirtualDiskInfoProto) contextValidateMigrateTaskMoref(ctx context.Context, formats strfmt.Registry) error { - - if m.MigrateTaskMoref != nil { - - if swag.IsZero(m.MigrateTaskMoref) { // not required - return nil - } - - if err := m.MigrateTaskMoref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("migrateTaskMoref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("migrateTaskMoref") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskInfoProto) contextValidateRestoreDisksTaskInfoProto(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreDisksTaskInfoProto != nil { - - if swag.IsZero(m.RestoreDisksTaskInfoProto) { // not required - return nil - } - - if err := m.RestoreDisksTaskInfoProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreDisksTaskInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreDisksTaskInfoProto") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVirtualDiskInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVirtualDiskInfoProto) UnmarshalBinary(b []byte) error { - var res RecoverVirtualDiskInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_virtual_disk_params.go b/v1/models/recover_virtual_disk_params.go deleted file mode 100644 index 57592bad..00000000 --- a/v1/models/recover_virtual_disk_params.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverVirtualDiskParams Contains information needed when recovering virtual disks. -// -// swagger:model RecoverVirtualDiskParams -type RecoverVirtualDiskParams struct { - - // Whether to power-off the VM before recovering virtual disks. - PowerOffVMBeforeRecovery *bool `json:"powerOffVmBeforeRecovery,omitempty"` - - // Whether to power-on the VM after recovering virtual disks. - PowerOnVMAfterRecovery *bool `json:"powerOnVmAfterRecovery,omitempty"` - - // Target entity to which the disks should be attached. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // virtual disk mappings - VirtualDiskMappings []*RecoverVirtualDiskParamsVirtualDiskMapping `json:"virtualDiskMappings"` -} - -// Validate validates this recover virtual disk params -func (m *RecoverVirtualDiskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskMappings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskParams) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParams) validateVirtualDiskMappings(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskMappings) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - continue - } - - if m.VirtualDiskMappings[i] != nil { - if err := m.VirtualDiskMappings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover virtual disk params based on the context it is used -func (m *RecoverVirtualDiskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskMappings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskParams) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParams) contextValidateVirtualDiskMappings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - - if m.VirtualDiskMappings[i] != nil { - - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - return nil - } - - if err := m.VirtualDiskMappings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVirtualDiskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVirtualDiskParams) UnmarshalBinary(b []byte) error { - var res RecoverVirtualDiskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_virtual_disk_params_virtual_disk_mapping.go b/v1/models/recover_virtual_disk_params_virtual_disk_mapping.go deleted file mode 100644 index b53786e9..00000000 --- a/v1/models/recover_virtual_disk_params_virtual_disk_mapping.go +++ /dev/null @@ -1,217 +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" -) - -// RecoverVirtualDiskParamsVirtualDiskMapping Represents a single source/destination pair for the block-based restore. -// -// swagger:model RecoverVirtualDiskParams_VirtualDiskMapping -type RecoverVirtualDiskParamsVirtualDiskMapping struct { - - // If the user is overwriting a destination disk, then this will capture - // the target disk info. - // NOTE: If this is specified, then power_off_vm_before_recovery must be - // true. - DiskToOverwrite *VirtualDiskID `json:"diskToOverwrite,omitempty"` - - // The source disk information. - SrcDisk *VirtualDiskID `json:"srcDisk,omitempty"` - - // This contains the target location information, for e.g. a datastore in - // VMware environment. - // NOTE: If disk_to_overwrite is specified then the target location is - // automatically deduced, if not this must be specified. - TargetLocation *EntityProto `json:"targetLocation,omitempty"` -} - -// Validate validates this recover virtual disk params virtual disk mapping -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskToOverwrite(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSrcDisk(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetLocation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) validateDiskToOverwrite(formats strfmt.Registry) error { - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if m.DiskToOverwrite != nil { - if err := m.DiskToOverwrite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) validateSrcDisk(formats strfmt.Registry) error { - if swag.IsZero(m.SrcDisk) { // not required - return nil - } - - if m.SrcDisk != nil { - if err := m.SrcDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("srcDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("srcDisk") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) validateTargetLocation(formats strfmt.Registry) error { - if swag.IsZero(m.TargetLocation) { // not required - return nil - } - - if m.TargetLocation != nil { - if err := m.TargetLocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetLocation") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover virtual disk params virtual disk mapping based on the context it is used -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskToOverwrite(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSrcDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetLocation(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) contextValidateDiskToOverwrite(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskToOverwrite != nil { - - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if err := m.DiskToOverwrite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) contextValidateSrcDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.SrcDisk != nil { - - if swag.IsZero(m.SrcDisk) { // not required - return nil - } - - if err := m.SrcDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("srcDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("srcDisk") - } - return err - } - } - - return nil -} - -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) contextValidateTargetLocation(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetLocation != nil { - - if swag.IsZero(m.TargetLocation) { // not required - return nil - } - - if err := m.TargetLocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetLocation") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVirtualDiskParamsVirtualDiskMapping) UnmarshalBinary(b []byte) error { - var res RecoverVirtualDiskParamsVirtualDiskMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_volumes_params.go b/v1/models/recover_volumes_params.go deleted file mode 100644 index 7eeb16da..00000000 --- a/v1/models/recover_volumes_params.go +++ /dev/null @@ -1,175 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverVolumesParams Contains information for recovering volumes in the Physical environment. -// -// swagger:model RecoverVolumesParams -type RecoverVolumesParams struct { - - // Whether volume would be dismounted first during LockVolume failure - ForceUnmountVolume *bool `json:"forceUnmountVolume,omitempty"` - - // Contains the volume mapping data that defines the restore task. - MappingVec []*RecoverVolumesParamsMapping `json:"mappingVec"` - - // Target entity where the volumes are being mounted. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` -} - -// Validate validates this recover volumes params -func (m *RecoverVolumesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMappingVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesParams) validateMappingVec(formats strfmt.Registry) error { - if swag.IsZero(m.MappingVec) { // not required - return nil - } - - for i := 0; i < len(m.MappingVec); i++ { - if swag.IsZero(m.MappingVec[i]) { // not required - continue - } - - if m.MappingVec[i] != nil { - if err := m.MappingVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mappingVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mappingVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVolumesParams) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover volumes params based on the context it is used -func (m *RecoverVolumesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMappingVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesParams) contextValidateMappingVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MappingVec); i++ { - - if m.MappingVec[i] != nil { - - if swag.IsZero(m.MappingVec[i]) { // not required - return nil - } - - if err := m.MappingVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mappingVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mappingVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVolumesParams) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVolumesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVolumesParams) UnmarshalBinary(b []byte) error { - var res RecoverVolumesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_volumes_params_mapping.go b/v1/models/recover_volumes_params_mapping.go deleted file mode 100644 index 170b7a80..00000000 --- a/v1/models/recover_volumes_params_mapping.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" -) - -// RecoverVolumesParamsMapping Represents a single source/destination pair for the block-based restore. -// -// swagger:model RecoverVolumesParams_Mapping -type RecoverVolumesParamsMapping struct { - - // The destination, pertains to the newly rebuilt system. - DstGUID *string `json:"dstGuid,omitempty"` - - // The source, pertains to the original backup. - SrcGUID *string `json:"srcGuid,omitempty"` -} - -// Validate validates this recover volumes params mapping -func (m *RecoverVolumesParamsMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover volumes params mapping based on context it is used -func (m *RecoverVolumesParamsMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVolumesParamsMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVolumesParamsMapping) UnmarshalBinary(b []byte) error { - var res RecoverVolumesParamsMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_volumes_task_state_proto.go b/v1/models/recover_volumes_task_state_proto.go deleted file mode 100644 index 6b9cf89f..00000000 --- a/v1/models/recover_volumes_task_state_proto.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverVolumesTaskStateProto Persistent state for a "recover volumes" restore task. -// -// swagger:model RecoverVolumesTaskStateProto -type RecoverVolumesTaskStateProto struct { - - // Captures the original parameters from Iris. - Params *RecoverVolumesParams `json:"params,omitempty"` - - // Contains high-level per-volume information. This data is here because - // Iris cannot see into protobuf extensions yet needs to display per-subtask - // progress. - TaskResultVec []*RecoverVolumesTaskStateProtoTaskResult `json:"taskResultVec"` -} - -// Validate validates this recover volumes task state proto -func (m *RecoverVolumesTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskResultVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesTaskStateProto) validateParams(formats strfmt.Registry) error { - if swag.IsZero(m.Params) { // not required - return nil - } - - if m.Params != nil { - if err := m.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (m *RecoverVolumesTaskStateProto) validateTaskResultVec(formats strfmt.Registry) error { - if swag.IsZero(m.TaskResultVec) { // not required - return nil - } - - for i := 0; i < len(m.TaskResultVec); i++ { - if swag.IsZero(m.TaskResultVec[i]) { // not required - continue - } - - if m.TaskResultVec[i] != nil { - if err := m.TaskResultVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover volumes task state proto based on the context it is used -func (m *RecoverVolumesTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskResultVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesTaskStateProto) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - - if m.Params != nil { - - if swag.IsZero(m.Params) { // not required - return nil - } - - if err := m.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (m *RecoverVolumesTaskStateProto) contextValidateTaskResultVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskResultVec); i++ { - - if m.TaskResultVec[i] != nil { - - if swag.IsZero(m.TaskResultVec[i]) { // not required - return nil - } - - if err := m.TaskResultVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVolumesTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVolumesTaskStateProto) UnmarshalBinary(b []byte) error { - var res RecoverVolumesTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recover_volumes_task_state_proto_task_result.go b/v1/models/recover_volumes_task_state_proto_task_result.go deleted file mode 100644 index 6ef1992b..00000000 --- a/v1/models/recover_volumes_task_state_proto_task_result.go +++ /dev/null @@ -1,115 +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" -) - -// RecoverVolumesTaskStateProtoTaskResult Contains high-level per-volume information. -// -// swagger:model RecoverVolumesTaskStateProto_TaskResult -type RecoverVolumesTaskStateProtoTaskResult struct { - - // Volume GUID for the Target Entity (phy host). - DstGUID *string `json:"dstGuid,omitempty"` - - // Contains details when the associated subtask fails. - Error *ErrorProto `json:"error,omitempty"` - - // The path relative to the root path of the restore task progress monitor. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` -} - -// Validate validates this recover volumes task state proto task result -func (m *RecoverVolumesTaskStateProtoTaskResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesTaskStateProtoTaskResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this recover volumes task state proto task result based on the context it is used -func (m *RecoverVolumesTaskStateProtoTaskResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumesTaskStateProtoTaskResult) 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 -} - -// MarshalBinary interface implementation -func (m *RecoverVolumesTaskStateProtoTaskResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVolumesTaskStateProtoTaskResult) UnmarshalBinary(b []byte) error { - var res RecoverVolumesTaskStateProtoTaskResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recoveries_tile.go b/v1/models/recoveries_tile.go deleted file mode 100644 index 939afc91..00000000 --- a/v1/models/recoveries_tile.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoveriesTile Recoveries Tile. -// -// Recoveries information. -// -// swagger:model RecoveriesTile -type RecoveriesTile struct { - - // Number of Recoveries in the last 30 days. - LastMonthNumRecoveries *int32 `json:"lastMonthNumRecoveries,omitempty"` - - // Recoveries by Type in the last month. - LastMonthRecoveriesByType []*RestoreCountByObjectType `json:"lastMonthRecoveriesByType"` - - // Bytes recovered in the last 30 days. - LastMonthRecoverySizeBytes *int64 `json:"lastMonthRecoverySizeBytes,omitempty"` - - // Number of recoveries that are currently running. - RecoveryNumRunning *int32 `json:"recoveryNumRunning,omitempty"` -} - -// Validate validates this recoveries tile -func (m *RecoveriesTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastMonthRecoveriesByType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveriesTile) validateLastMonthRecoveriesByType(formats strfmt.Registry) error { - if swag.IsZero(m.LastMonthRecoveriesByType) { // not required - return nil - } - - for i := 0; i < len(m.LastMonthRecoveriesByType); i++ { - if swag.IsZero(m.LastMonthRecoveriesByType[i]) { // not required - continue - } - - if m.LastMonthRecoveriesByType[i] != nil { - if err := m.LastMonthRecoveriesByType[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastMonthRecoveriesByType" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastMonthRecoveriesByType" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recoveries tile based on the context it is used -func (m *RecoveriesTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastMonthRecoveriesByType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveriesTile) contextValidateLastMonthRecoveriesByType(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LastMonthRecoveriesByType); i++ { - - if m.LastMonthRecoveriesByType[i] != nil { - - if swag.IsZero(m.LastMonthRecoveriesByType[i]) { // not required - return nil - } - - if err := m.LastMonthRecoveriesByType[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastMonthRecoveriesByType" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastMonthRecoveriesByType" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveriesTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveriesTile) UnmarshalBinary(b []byte) error { - var res RecoveriesTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/recovery_task_info.go b/v1/models/recovery_task_info.go deleted file mode 100644 index 95cb4176..00000000 --- a/v1/models/recovery_task_info.go +++ /dev/null @@ -1,117 +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" -) - -// RecoveryTaskInfo Recovery Task Information. -// -// Parameters for a recovery op. -// -// swagger:model RecoveryTaskInfo -type RecoveryTaskInfo struct { - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` - - // Denotes if the recovery task has an archival target. - // This param is used to reflect if the recovery op has an archival - // target to work with. - // 'local' indicates no archival target. - // 'archive' indicates that objects restored using an archival target. - // Enum: ["local","archive"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this recovery task info -func (m *RecoveryTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoveryTaskInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["local","archive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoveryTaskInfoTypeTypePropEnum = append(recoveryTaskInfoTypeTypePropEnum, v) - } -} - -const ( - - // RecoveryTaskInfoTypeLocal captures enum value "local" - RecoveryTaskInfoTypeLocal string = "local" - - // RecoveryTaskInfoTypeArchive captures enum value "archive" - RecoveryTaskInfoTypeArchive string = "archive" -) - -// prop value enum -func (m *RecoveryTaskInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoveryTaskInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoveryTaskInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recovery task info based on context it is used -func (m *RecoveryTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryTaskInfo) UnmarshalBinary(b []byte) error { - var res RecoveryTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/reducer_info.go b/v1/models/reducer_info.go deleted file mode 100644 index 10128a96..00000000 --- a/v1/models/reducer_info.go +++ /dev/null @@ -1,72 +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" -) - -// ReducerInfo Information about a reducer. -// -// swagger:model ReducerInfo -type ReducerInfo struct { - - // The code of the reducer in the specified language. - Code *string `json:"code,omitempty"` - - // Reduced ID generated by system. Absent when user is creating a new - // reducer. Mandatory for all other use cases. - ID *int64 `json:"id,omitempty"` - - // Whether the mapper is system defined. - IsSystemDefined *bool `json:"isSystemDefined,omitempty"` - - // User can write their own mapper/reducer or upload jar files containing - // mappers and reducers. If this reducer was part of a jar file, then this - // field will have the JAR name. - JarName *string `json:"jarName,omitempty"` - - // path of JAR in which this reducer was found. This is applicable only when - // this reducer was uploaded via JAR. - JarPath *string `json:"jarPath,omitempty"` - - // Programming language used by the reducer. - Language *int32 `json:"language,omitempty"` - - // Name of the reducer. - Name *string `json:"name,omitempty"` -} - -// Validate validates this reducer info -func (m *ReducerInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this reducer info based on context it is used -func (m *ReducerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReducerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReducerInfo) UnmarshalBinary(b []byte) error { - var res ReducerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/reducers_wrapper.go b/v1/models/reducers_wrapper.go deleted file mode 100644 index 8f5f9339..00000000 --- a/v1/models/reducers_wrapper.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReducersWrapper Reducers Wrapper. -// -// ReducersWrapper is the struct to define the list of reducers. -// -// swagger:model ReducersWrapper -type ReducersWrapper struct { - - // Reducers specifies the list of available reducers in analytics workbench. - Reducers []*ReducerInfo `json:"reducers"` -} - -// Validate validates this reducers wrapper -func (m *ReducersWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReducers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReducersWrapper) validateReducers(formats strfmt.Registry) error { - if swag.IsZero(m.Reducers) { // not required - return nil - } - - for i := 0; i < len(m.Reducers); i++ { - if swag.IsZero(m.Reducers[i]) { // not required - continue - } - - if m.Reducers[i] != nil { - if err := m.Reducers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reducers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reducers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this reducers wrapper based on the context it is used -func (m *ReducersWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReducers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReducersWrapper) contextValidateReducers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Reducers); i++ { - - if m.Reducers[i] != nil { - - if swag.IsZero(m.Reducers[i]) { // not required - return nil - } - - if err := m.Reducers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reducers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reducers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReducersWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReducersWrapper) UnmarshalBinary(b []byte) error { - var res ReducersWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/register_application_servers_parameters.go b/v1/models/register_application_servers_parameters.go deleted file mode 100644 index 776cd018..00000000 --- a/v1/models/register_application_servers_parameters.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RegisterApplicationServersParameters Register Application Servers Parameters. -// -// Specifies the parameters required to register Application Servers -// running in a Protection Source. -// -// swagger:model RegisterApplicationServersParameters -type RegisterApplicationServersParameters struct { - - // Specifies the types of applications such as 'kSQL', 'kExchange', 'kAD' - // running on the Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - Applications []string `json:"applications"` - - // If set, user has encrypted the credential with 'user_ecryption_key'. - // It is assumed that credentials are first encrypted using - // internal magento key and then encrypted using user encryption key. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Set this to true if a persistent agent is running on the host. If this is - // specified, then credentials would not be used to log into the host - // environment. This mechanism may be used in environments such as VMware - // to get around UAC permission issues by running the agent as a service - // with the right credentials. If this field is not specified, credentials - // must be specified. - HasPersistentAgent *bool `json:"hasPersistentAgent,omitempty"` - - // Set to true if credentials are encrypted by internal magneto key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies the Id of the Protection Source that contains one or more - // Application Servers running on it. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` -} - -// Validate validates this register application servers parameters -func (m *RegisterApplicationServersParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var registerApplicationServersParametersApplicationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerApplicationServersParametersApplicationsItemsEnum = append(registerApplicationServersParametersApplicationsItemsEnum, v) - } -} - -func (m *RegisterApplicationServersParameters) validateApplicationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerApplicationServersParametersApplicationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterApplicationServersParameters) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - - // value enum - if err := m.validateApplicationsItemsEnum("applications"+"."+strconv.Itoa(i), "body", m.Applications[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this register application servers parameters based on context it is used -func (m *RegisterApplicationServersParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterApplicationServersParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterApplicationServersParameters) UnmarshalBinary(b []byte) error { - var res RegisterApplicationServersParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/register_or_update_app_owner_arg.go b/v1/models/register_or_update_app_owner_arg.go deleted file mode 100644 index 6bea3497..00000000 --- a/v1/models/register_or_update_app_owner_arg.go +++ /dev/null @@ -1,422 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisterOrUpdateAppOwnerArg Message to register or update the owner entity on which applications are -// to be backed up. -// -// swagger:model RegisterOrUpdateAppOwnerArg -type RegisterOrUpdateAppOwnerArg struct { - - // Specifies the request attributes. - APIRequestAttr *APIRequestAttr `json:"apiRequestAttr,omitempty"` - - // Specifies the API version used by this arg. - APIVersion *APIVersion `json:"apiVersion,omitempty"` - - // Application specific credentials vector. This may be needed in cases where - // after authorizing with the environment, separate authorization is needed - // to access an application in the environment (for example, kOracle where - // after authorizing with the database host, to access a database separate - // credentials are required). - AppCredentialsVec []*AppCredentials `json:"appCredentialsVec"` - - // The types of application environments (for example, kSQL, kExchange, - // kOracle). - AppEnvVec []int32 `json:"appEnvVec"` - - // Credentials that will be used to log into the application environment. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // This is populated with last known modification time of the Entity - // (last_modification_time should be updated (to current time) when a public - // API call updates an Entity) to be updated. Magneto updates the Entity iff - // this matches the last_modification_time stored in EntityHierarchyProto, - // to avoid any race conditions. - ExpectedEntityMtimeUsecs *int64 `json:"expectedEntityMtimeUsecs,omitempty"` - - // Set to true if credentials are encrypted by internal magneto key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // This is set to the id of the network-realm from where this source is - // reachable. This should only be set for a source being registered by a - // tenant user. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` - - // The owner entity on which the application environment needs to be - // backed up. For example, this could be a VM on which we want to protect - // all the SQL databases. The environment of the owner_entity could be - // different than the 'type' field specified above. - OwnerEntity *PrivateEntityProto `json:"ownerEntity,omitempty"` - - // If set to true, the owner will be unregistered for all the application - // environments for which it was previously registered. It is caller's - // responsibility to make sure that the 'owner_entity' is already a - // registered source entity. If there are backup jobs that still protect an - // appication environment on this owner, this RPC will return an error. - UnregisterOwner *bool `json:"unregisterOwner,omitempty"` - - // If both 'is_internal_encrypted' and 'user_encryption_key' is set, it is - // assumed that credentials are first encrypted using - // 'internal_encryption_key' and then encrypted using 'user_encryption_key'. - UserEncryptionKey *string `json:"userEncryptionKey,omitempty"` - - // Specifies information about the user who made the request. - UserInfo *UserInformation `json:"userInfo,omitempty"` - - // Set to true if a persistent agent is running on the host. If this is - // specified, then credentials would not be used to log into the host - // environment. This mechanism may be used in environments such as VMware - // to get around UAC permission issues by running the agent as a service - // with the right credentials. - UsesPersistentAgent *bool `json:"usesPersistentAgent,omitempty"` -} - -// Validate validates this register or update app owner arg -func (m *RegisterOrUpdateAppOwnerArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAPIRequestAttr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAPIVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppCredentialsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateAPIRequestAttr(formats strfmt.Registry) error { - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if m.APIRequestAttr != nil { - if err := m.APIRequestAttr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateAPIVersion(formats strfmt.Registry) error { - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if m.APIVersion != nil { - if err := m.APIVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateAppCredentialsVec(formats strfmt.Registry) error { - if swag.IsZero(m.AppCredentialsVec) { // not required - return nil - } - - for i := 0; i < len(m.AppCredentialsVec); i++ { - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - continue - } - - if m.AppCredentialsVec[i] != nil { - if err := m.AppCredentialsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateOwnerEntity(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerEntity) { // not required - return nil - } - - if m.OwnerEntity != nil { - if err := m.OwnerEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerEntity") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this register or update app owner arg based on the context it is used -func (m *RegisterOrUpdateAppOwnerArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAPIRequestAttr(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAPIVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppCredentialsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateAPIRequestAttr(ctx context.Context, formats strfmt.Registry) error { - - if m.APIRequestAttr != nil { - - if swag.IsZero(m.APIRequestAttr) { // not required - return nil - } - - if err := m.APIRequestAttr.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiRequestAttr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiRequestAttr") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.APIVersion != nil { - - if swag.IsZero(m.APIVersion) { // not required - return nil - } - - if err := m.APIVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiVersion") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateAppCredentialsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppCredentialsVec); i++ { - - if m.AppCredentialsVec[i] != nil { - - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - return nil - } - - if err := m.AppCredentialsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateOwnerEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerEntity != nil { - - if swag.IsZero(m.OwnerEntity) { // not required - return nil - } - - if err := m.OwnerEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerEntity") - } - return err - } - } - - return nil -} - -func (m *RegisterOrUpdateAppOwnerArg) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterOrUpdateAppOwnerArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterOrUpdateAppOwnerArg) UnmarshalBinary(b []byte) error { - var res RegisterOrUpdateAppOwnerArg - 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 deleted file mode 100644 index 0f8c415d..00000000 --- a/v1/models/register_protection_source_parameters.go +++ /dev/null @@ -1,2148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RegisterProtectionSourceParameters Register Protection Source Parameters. -// -// Specifies the parameters required to register a Protection Source. -// -// swagger:model RegisterProtectionSourceParameters -type RegisterProtectionSourceParameters struct { - - // Specifies if this source entity has enabled storage array snapshot or not. - IsStorageArraySnapshotEnabled *bool `json:"IsStorageArraySnapshotEnabled,omitempty"` - - // Specifies the entity type if the environment is kAcropolis. - // overrideDescription: true - // Enum: ["kStandaloneCluster"] - AcropolisType *string `json:"acropolisType,omitempty"` - - // Specifies the agent endpoint if it is different from the source endpoint. - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be - // exclusively allowed for doing any type of IO operations. - AllowedIPAddresses []string `json:"allowedIpAddresses"` - - // AWS Source Credentials. - // - // Specifies credentials needed to authenticate with AWS Cloud Platform. - AwsCredentials *AwsCredentials `json:"awsCredentials,omitempty"` - - // Specifies information related to AWS fleets launched for various purposes. - // This will only be set for kIAMUser entity. - AwsFleetParams *AwsFleetPublicParams `json:"awsFleetParams,omitempty"` - - // Azure Source Credentials. - // - // Specifies credentials needed to authenticate with Azure Cloud Platform. - AzureCredentials *AzureCredentials `json:"azureCredentials,omitempty"` - - // This field is deprecated. Use DeniedIpAddresses instead. - // deprecated: true - BlacklistedIPAddresses []string `json:"blacklistedIpAddresses"` - - // Specifies information related to cluster. This is only valid for CE - // clusters. This is only populated for kIAMUser entity. - ClusterNetworkInfo *FleetNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Specifies the Bifrost realm to be associated with the source root. - // Whenever needed, the workflows related to this source would then - // only use Bifrosts from the specified realm. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be denied - // for doing any type of IO operations. - DeniedIPAddresses []string `json:"deniedIpAddresses"` - - // If set, user has encrypted the credential with 'user_ecryption_key'. - // It is assumed that credentials are first encrypted using - // internal magento key and then encrypted using user encryption key. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Specifies the network endpoint of the Protection Source where it is - // reachable. It could be an URL or hostname or an IP address of the - // Protection Source. - Endpoint *string `json:"endpoint,omitempty"` - - // Specifies the environment such as 'kPhysical' or 'kVMware' of the - // Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies information about the preference order while choosing - // between which database copy of the exchange database which is part of - // DAG should be protected. - ExchangeDagProtectionPreference *ExchangeDAGProtectionPreference `json:"exchangeDagProtectionPreference,omitempty"` - - // ForceRegister is applicable to Physical Environment. By default, the agent - // running on a physical host will fail the registration, if it is already - // registered as part of another cluster. By setting this option to true, - // agent can be forced to register with the current cluster. This is a hidden - // parameter and should not be documented externally. - ForceRegister *bool `json:"forceRegister,omitempty"` - - // GCP Source Credentials. - // - // Specifies credentials needed to authenticate with Google Cloud Platform. - GcpCredentials *GcpCredentials `json:"gcpCredentials,omitempty"` - - // Specifies information related to GCP fleets launched for various purposes. - // This will only be set for kIAMUser entity. - GcpFleetParams *GcpFleetParams `json:"gcpFleetParams,omitempty"` - - // Specifies the optional OS type of the Protection Source (such as kWindows - // or kLinux). - // overrideDescription: true - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the entity type if the environment is kHyperV. - // overrideDescription: true - // Enum: ["kSCVMMServer","kStandaloneHost","kStandaloneCluster"] - HyperVType *string `json:"hyperVType,omitempty"` - - // Specifies the entity type such as 'kStorageArray' if the environment is - // kIbmFlashSystem. - // overrideDescription: true - // Enum: ["kStorageArray"] - IbmFlashSystemType *string `json:"ibmFlashSystemType,omitempty"` - - // Set to true if credentials are encrypted by internal magneto key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // Specifies if the physical host has to be registered as a proxy host. - IsProxyHost *bool `json:"isProxyHost,omitempty"` - - // Isilon Source params - // - // Specifies the registered protection source params for Isilon Source - IsilonParams *RegisteredProtectionSourceIsilonParams `json:"isilonParams,omitempty"` - - // Kubernetes Source Credentials. - // - // Specifies the credentials needed to authenticate a Kubernetes cluster. - KubernetesCredentials *KubernetesCredentials `json:"kubernetesCredentials,omitempty"` - - // Extra parameters needed for registering a K8s resource. - KubernetesParams *KubernetesParams `json:"kubernetesParams,omitempty"` - - // Specifies the entity type if the environment is kKubernetes. - // overrideDescription: true - // Enum: ["kCluster"] - KubernetesType *string `json:"kubernetesType,omitempty"` - - // Specifies the entity type if the environment is kKVM. - // overrideDescription: true - // Enum: ["kOVirtManager"] - KvmType *string `json:"kvmType,omitempty"` - - // nas mount credentials - NasMountCredentials *RegisterProtectionSourceParametersNasMountCredentials `json:"nasMountCredentials,omitempty"` - - // Specifies the entity type such as 'kCluster,' if the environment is - // kNetapp. - // Enum: ["kCluster","kVserver"] - NetappType *string `json:"netappType,omitempty"` - - // Specifies the entity type such as 'kStorageArray' if the environment is - // kNimble. - // overrideDescription: true - // Enum: ["kStorageArray"] - NimbleType *string `json:"nimbleType,omitempty"` - - // Office365 Source Credentials. - // - // Specifies credentials needed to authenticate & authorize user for - // Office365 using MS Graph APIs. - Office365CredentialsList []*Office365Credentials `json:"office365CredentialsList"` - - // Specifies the region for Office365. - Office365Region *string `json:"office365Region,omitempty"` - - // Office365 Service Account Credentials. - // - // Specifies credentials for improving mailbox backup performance for O365. - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - // Specifies the entity type such as 'kDomain', 'kOutlook', 'kMailbox', if the - // environment is kO365. - // Enum: ["kDomain"] - Office365Type *string `json:"office365Type,omitempty"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Contains all params specified by the user while registering a physical - // entity. - PhysicalParams *PhysicalParams `json:"physicalParams,omitempty"` - - // Specifies the entity type such as 'kPhysicalHost' if the environment is - // kPhysical. - // overrideDescription: true - // Enum: ["kHost"] - PhysicalType *string `json:"physicalType,omitempty"` - - // Specifies the list of the protection source id of the windows physical - // host which will be used during the protection and recovery of the sites - // that belong to a office365 domain. - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - // Specifies the entity type such as 'kStorageArray' if the environment is - // kPure. - // overrideDescription: true - // Enum: ["kStorageArray"] - PureType *string `json:"pureType,omitempty"` - - // ReRegister is applicable to Physical Environment. By default, the - // agent running on a physical host will fail the registration, if it is - // already registered with the cluster. By setting this option to true, agent - // can be re-registered with the current cluster. - ReRegister *bool `json:"reRegister,omitempty"` - - // RestoreConfig is applicable to Physical Environment. The ReRegister option - // needs to be true if RestoreConfig is true. By setting this option to true, - // the agent configuration can be restored. - RestoreConfig *bool `json:"restoreConfig,omitempty"` - - // This controls whether to use source side dedup on the source or not. - // This is only applicable to sources which support source side dedup - // (e.g., Linux physical servers). - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // SSL verification parameter is applicable to VMware environment. It can be - // populated with the server's CA certificate or certificate chain and - // vCenter's certificate will be validated against this. - SslVerification *SslVerification `json:"sslVerification,omitempty"` - - // Specifies the list of subnet IP addresses and CIDR prefix for enabeling - // network data transfer. Currently, only Subnet IP and NetbaskBits are valid - // input fields. All other fields provided as input will be ignored. - Subnets []*Subnet `json:"subnets"` - - // throttling policy - ThrottlingPolicy *RegisterProtectionSourceParametersThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // Array of Throttling Policy Overrides for Datastores. - // - // Specifies a list of Throttling Policy for datastores that override the - // common throttling policy specified for the registered Protection Source. - // For datastores not in this list, common policy will still apply. - ThrottlingPolicyOverrides []*ThrottlingPolicyOverride `json:"throttlingPolicyOverrides"` - - // Specifies whether to use existing Office365 credentials like password and - // client secret for app id's. - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` - - // Specifies whether OAuth should be used for authentication in case of - // Exchange Online. - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` - - // Specifies the VLAN parameters to be used while taking the backup of this - // entity and is the preferred selection for restoring the same. - // For restores, the VLAN parameters specifed here can be overridden. - // Currently, this is only applicable for Physical hosts running Oracle. - VlanParams *VlanParameters `json:"vlanParams,omitempty"` - - // Contains all params specified by the user while registering a Vmware - // entity. - VmwareParams *VmwareParams `json:"vmwareParams,omitempty"` - - // Specifies the entity type such as 'kVCenter' if the environment is - // kKMware. - // overrideDescription: true - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector"] - VmwareType *string `json:"vmwareType,omitempty"` -} - -// Validate validates this register protection source parameters -func (m *RegisterProtectionSourceParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeDagProtectionPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHyperVType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasMountCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNimbleType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365CredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365ServiceAccountCredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Type(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSslVerification(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicyOverrides(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var registerProtectionSourceParametersTypeAcropolisTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandaloneCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeAcropolisTypePropEnum = append(registerProtectionSourceParametersTypeAcropolisTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersAcropolisTypeKStandaloneCluster captures enum value "kStandaloneCluster" - RegisterProtectionSourceParametersAcropolisTypeKStandaloneCluster string = "kStandaloneCluster" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateAcropolisTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeAcropolisTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateAcropolisType(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisType) { // not required - return nil - } - - // value enum - if err := m.validateAcropolisTypeEnum("acropolisType", "body", *m.AcropolisType); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateAwsCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if m.AwsCredentials != nil { - if err := m.AwsCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateAwsFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if m.AwsFleetParams != nil { - if err := m.AwsFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateAzureCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if m.AzureCredentials != nil { - if err := m.AzureCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -var registerProtectionSourceParametersTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeEnvironmentPropEnum = append(registerProtectionSourceParametersTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersEnvironmentKVMware captures enum value "kVMware" - RegisterProtectionSourceParametersEnvironmentKVMware string = "kVMware" - - // RegisterProtectionSourceParametersEnvironmentKHyperV captures enum value "kHyperV" - RegisterProtectionSourceParametersEnvironmentKHyperV string = "kHyperV" - - // RegisterProtectionSourceParametersEnvironmentKSQL captures enum value "kSQL" - RegisterProtectionSourceParametersEnvironmentKSQL string = "kSQL" - - // RegisterProtectionSourceParametersEnvironmentKView captures enum value "kView" - RegisterProtectionSourceParametersEnvironmentKView string = "kView" - - // RegisterProtectionSourceParametersEnvironmentKPuppeteer captures enum value "kPuppeteer" - RegisterProtectionSourceParametersEnvironmentKPuppeteer string = "kPuppeteer" - - // RegisterProtectionSourceParametersEnvironmentKPhysical captures enum value "kPhysical" - RegisterProtectionSourceParametersEnvironmentKPhysical string = "kPhysical" - - // RegisterProtectionSourceParametersEnvironmentKPure captures enum value "kPure" - RegisterProtectionSourceParametersEnvironmentKPure string = "kPure" - - // RegisterProtectionSourceParametersEnvironmentKNimble captures enum value "kNimble" - RegisterProtectionSourceParametersEnvironmentKNimble string = "kNimble" - - // RegisterProtectionSourceParametersEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RegisterProtectionSourceParametersEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RegisterProtectionSourceParametersEnvironmentKAzure captures enum value "kAzure" - RegisterProtectionSourceParametersEnvironmentKAzure string = "kAzure" - - // RegisterProtectionSourceParametersEnvironmentKNetapp captures enum value "kNetapp" - RegisterProtectionSourceParametersEnvironmentKNetapp string = "kNetapp" - - // RegisterProtectionSourceParametersEnvironmentKAgent captures enum value "kAgent" - RegisterProtectionSourceParametersEnvironmentKAgent string = "kAgent" - - // RegisterProtectionSourceParametersEnvironmentKGenericNas captures enum value "kGenericNas" - RegisterProtectionSourceParametersEnvironmentKGenericNas string = "kGenericNas" - - // RegisterProtectionSourceParametersEnvironmentKAcropolis captures enum value "kAcropolis" - RegisterProtectionSourceParametersEnvironmentKAcropolis string = "kAcropolis" - - // RegisterProtectionSourceParametersEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RegisterProtectionSourceParametersEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RegisterProtectionSourceParametersEnvironmentKIsilon captures enum value "kIsilon" - RegisterProtectionSourceParametersEnvironmentKIsilon string = "kIsilon" - - // RegisterProtectionSourceParametersEnvironmentKGPFS captures enum value "kGPFS" - RegisterProtectionSourceParametersEnvironmentKGPFS string = "kGPFS" - - // RegisterProtectionSourceParametersEnvironmentKKVM captures enum value "kKVM" - RegisterProtectionSourceParametersEnvironmentKKVM string = "kKVM" - - // RegisterProtectionSourceParametersEnvironmentKAWS captures enum value "kAWS" - RegisterProtectionSourceParametersEnvironmentKAWS string = "kAWS" - - // RegisterProtectionSourceParametersEnvironmentKExchange captures enum value "kExchange" - RegisterProtectionSourceParametersEnvironmentKExchange string = "kExchange" - - // RegisterProtectionSourceParametersEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RegisterProtectionSourceParametersEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RegisterProtectionSourceParametersEnvironmentKOracle captures enum value "kOracle" - RegisterProtectionSourceParametersEnvironmentKOracle string = "kOracle" - - // RegisterProtectionSourceParametersEnvironmentKGCP captures enum value "kGCP" - RegisterProtectionSourceParametersEnvironmentKGCP string = "kGCP" - - // RegisterProtectionSourceParametersEnvironmentKFlashBlade captures enum value "kFlashBlade" - RegisterProtectionSourceParametersEnvironmentKFlashBlade string = "kFlashBlade" - - // RegisterProtectionSourceParametersEnvironmentKAWSNative captures enum value "kAWSNative" - RegisterProtectionSourceParametersEnvironmentKAWSNative string = "kAWSNative" - - // RegisterProtectionSourceParametersEnvironmentKO365 captures enum value "kO365" - RegisterProtectionSourceParametersEnvironmentKO365 string = "kO365" - - // RegisterProtectionSourceParametersEnvironmentKO365Outlook captures enum value "kO365Outlook" - RegisterProtectionSourceParametersEnvironmentKO365Outlook string = "kO365Outlook" - - // RegisterProtectionSourceParametersEnvironmentKHyperFlex captures enum value "kHyperFlex" - RegisterProtectionSourceParametersEnvironmentKHyperFlex string = "kHyperFlex" - - // RegisterProtectionSourceParametersEnvironmentKGCPNative captures enum value "kGCPNative" - RegisterProtectionSourceParametersEnvironmentKGCPNative string = "kGCPNative" - - // RegisterProtectionSourceParametersEnvironmentKAzureNative captures enum value "kAzureNative" - RegisterProtectionSourceParametersEnvironmentKAzureNative string = "kAzureNative" - - // RegisterProtectionSourceParametersEnvironmentKKubernetes captures enum value "kKubernetes" - RegisterProtectionSourceParametersEnvironmentKKubernetes string = "kKubernetes" - - // RegisterProtectionSourceParametersEnvironmentKElastifile captures enum value "kElastifile" - RegisterProtectionSourceParametersEnvironmentKElastifile string = "kElastifile" - - // RegisterProtectionSourceParametersEnvironmentKAD captures enum value "kAD" - RegisterProtectionSourceParametersEnvironmentKAD string = "kAD" - - // RegisterProtectionSourceParametersEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RegisterProtectionSourceParametersEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RegisterProtectionSourceParametersEnvironmentKCassandra captures enum value "kCassandra" - RegisterProtectionSourceParametersEnvironmentKCassandra string = "kCassandra" - - // RegisterProtectionSourceParametersEnvironmentKMongoDB captures enum value "kMongoDB" - RegisterProtectionSourceParametersEnvironmentKMongoDB string = "kMongoDB" - - // RegisterProtectionSourceParametersEnvironmentKCouchbase captures enum value "kCouchbase" - RegisterProtectionSourceParametersEnvironmentKCouchbase string = "kCouchbase" - - // RegisterProtectionSourceParametersEnvironmentKHdfs captures enum value "kHdfs" - RegisterProtectionSourceParametersEnvironmentKHdfs string = "kHdfs" - - // RegisterProtectionSourceParametersEnvironmentKHive captures enum value "kHive" - RegisterProtectionSourceParametersEnvironmentKHive string = "kHive" - - // RegisterProtectionSourceParametersEnvironmentKHBase captures enum value "kHBase" - RegisterProtectionSourceParametersEnvironmentKHBase string = "kHBase" - - // RegisterProtectionSourceParametersEnvironmentKUDA captures enum value "kUDA" - RegisterProtectionSourceParametersEnvironmentKUDA string = "kUDA" - - // RegisterProtectionSourceParametersEnvironmentKO365Teams captures enum value "kO365Teams" - RegisterProtectionSourceParametersEnvironmentKO365Teams string = "kO365Teams" - - // RegisterProtectionSourceParametersEnvironmentKO365Group captures enum value "kO365Group" - RegisterProtectionSourceParametersEnvironmentKO365Group string = "kO365Group" - - // RegisterProtectionSourceParametersEnvironmentKO365Exchange captures enum value "kO365Exchange" - RegisterProtectionSourceParametersEnvironmentKO365Exchange string = "kO365Exchange" - - // RegisterProtectionSourceParametersEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RegisterProtectionSourceParametersEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RegisterProtectionSourceParametersEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RegisterProtectionSourceParametersEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RegisterProtectionSourceParametersEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RegisterProtectionSourceParametersEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) 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 -} - -func (m *RegisterProtectionSourceParameters) validateExchangeDagProtectionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if m.ExchangeDagProtectionPreference != nil { - if err := m.ExchangeDagProtectionPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateGcpCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if m.GcpCredentials != nil { - if err := m.GcpCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateGcpFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if m.GcpFleetParams != nil { - if err := m.GcpFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -var registerProtectionSourceParametersTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeHostTypePropEnum = append(registerProtectionSourceParametersTypeHostTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersHostTypeKLinux captures enum value "kLinux" - RegisterProtectionSourceParametersHostTypeKLinux string = "kLinux" - - // RegisterProtectionSourceParametersHostTypeKWindows captures enum value "kWindows" - RegisterProtectionSourceParametersHostTypeKWindows string = "kWindows" - - // RegisterProtectionSourceParametersHostTypeKAix captures enum value "kAix" - RegisterProtectionSourceParametersHostTypeKAix string = "kAix" - - // RegisterProtectionSourceParametersHostTypeKSolaris captures enum value "kSolaris" - RegisterProtectionSourceParametersHostTypeKSolaris string = "kSolaris" - - // RegisterProtectionSourceParametersHostTypeKSapHana captures enum value "kSapHana" - RegisterProtectionSourceParametersHostTypeKSapHana string = "kSapHana" - - // RegisterProtectionSourceParametersHostTypeKSapOracle captures enum value "kSapOracle" - RegisterProtectionSourceParametersHostTypeKSapOracle string = "kSapOracle" - - // RegisterProtectionSourceParametersHostTypeKCockroachDB captures enum value "kCockroachDB" - RegisterProtectionSourceParametersHostTypeKCockroachDB string = "kCockroachDB" - - // RegisterProtectionSourceParametersHostTypeKMySQL captures enum value "kMySQL" - RegisterProtectionSourceParametersHostTypeKMySQL string = "kMySQL" - - // RegisterProtectionSourceParametersHostTypeKOther captures enum value "kOther" - RegisterProtectionSourceParametersHostTypeKOther string = "kOther" - - // RegisterProtectionSourceParametersHostTypeKSapSybase captures enum value "kSapSybase" - RegisterProtectionSourceParametersHostTypeKSapSybase string = "kSapSybase" - - // RegisterProtectionSourceParametersHostTypeKSapMaxDB captures enum value "kSapMaxDB" - RegisterProtectionSourceParametersHostTypeKSapMaxDB string = "kSapMaxDB" - - // RegisterProtectionSourceParametersHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - RegisterProtectionSourceParametersHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // RegisterProtectionSourceParametersHostTypeKDB2 captures enum value "kDB2" - RegisterProtectionSourceParametersHostTypeKDB2 string = "kDB2" - - // RegisterProtectionSourceParametersHostTypeKSapASE captures enum value "kSapASE" - RegisterProtectionSourceParametersHostTypeKSapASE string = "kSapASE" - - // RegisterProtectionSourceParametersHostTypeKMariaDB captures enum value "kMariaDB" - RegisterProtectionSourceParametersHostTypeKMariaDB string = "kMariaDB" - - // RegisterProtectionSourceParametersHostTypeKPostgreSQL captures enum value "kPostgreSQL" - RegisterProtectionSourceParametersHostTypeKPostgreSQL string = "kPostgreSQL" - - // RegisterProtectionSourceParametersHostTypeKVOS captures enum value "kVOS" - RegisterProtectionSourceParametersHostTypeKVOS string = "kVOS" - - // RegisterProtectionSourceParametersHostTypeKHPUX captures enum value "kHPUX" - RegisterProtectionSourceParametersHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -var registerProtectionSourceParametersTypeHyperVTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSCVMMServer","kStandaloneHost","kStandaloneCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeHyperVTypePropEnum = append(registerProtectionSourceParametersTypeHyperVTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersHyperVTypeKSCVMMServer captures enum value "kSCVMMServer" - RegisterProtectionSourceParametersHyperVTypeKSCVMMServer string = "kSCVMMServer" - - // RegisterProtectionSourceParametersHyperVTypeKStandaloneHost captures enum value "kStandaloneHost" - RegisterProtectionSourceParametersHyperVTypeKStandaloneHost string = "kStandaloneHost" - - // RegisterProtectionSourceParametersHyperVTypeKStandaloneCluster captures enum value "kStandaloneCluster" - RegisterProtectionSourceParametersHyperVTypeKStandaloneCluster string = "kStandaloneCluster" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateHyperVTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeHyperVTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateHyperVType(formats strfmt.Registry) error { - if swag.IsZero(m.HyperVType) { // not required - return nil - } - - // value enum - if err := m.validateHyperVTypeEnum("hyperVType", "body", *m.HyperVType); err != nil { - return err - } - - return nil -} - -var registerProtectionSourceParametersTypeIbmFlashSystemTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeIbmFlashSystemTypePropEnum = append(registerProtectionSourceParametersTypeIbmFlashSystemTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersIbmFlashSystemTypeKStorageArray captures enum value "kStorageArray" - RegisterProtectionSourceParametersIbmFlashSystemTypeKStorageArray string = "kStorageArray" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateIbmFlashSystemTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeIbmFlashSystemTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateIbmFlashSystemType(formats strfmt.Registry) error { - if swag.IsZero(m.IbmFlashSystemType) { // not required - return nil - } - - // value enum - if err := m.validateIbmFlashSystemTypeEnum("ibmFlashSystemType", "body", *m.IbmFlashSystemType); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateKubernetesCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesCredentials) { // not required - return nil - } - - if m.KubernetesCredentials != nil { - if err := m.KubernetesCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -var registerProtectionSourceParametersTypeKubernetesTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeKubernetesTypePropEnum = append(registerProtectionSourceParametersTypeKubernetesTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersKubernetesTypeKCluster captures enum value "kCluster" - RegisterProtectionSourceParametersKubernetesTypeKCluster string = "kCluster" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateKubernetesTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeKubernetesTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateKubernetesType(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesType) { // not required - return nil - } - - // value enum - if err := m.validateKubernetesTypeEnum("kubernetesType", "body", *m.KubernetesType); err != nil { - return err - } - - return nil -} - -var registerProtectionSourceParametersTypeKvmTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOVirtManager"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeKvmTypePropEnum = append(registerProtectionSourceParametersTypeKvmTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersKvmTypeKOVirtManager captures enum value "kOVirtManager" - RegisterProtectionSourceParametersKvmTypeKOVirtManager string = "kOVirtManager" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateKvmTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeKvmTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateKvmType(formats strfmt.Registry) error { - if swag.IsZero(m.KvmType) { // not required - return nil - } - - // value enum - if err := m.validateKvmTypeEnum("kvmType", "body", *m.KvmType); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateNasMountCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.NasMountCredentials) { // not required - 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 -} - -var registerProtectionSourceParametersTypeNetappTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVserver"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeNetappTypePropEnum = append(registerProtectionSourceParametersTypeNetappTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersNetappTypeKCluster captures enum value "kCluster" - RegisterProtectionSourceParametersNetappTypeKCluster string = "kCluster" - - // RegisterProtectionSourceParametersNetappTypeKVserver captures enum value "kVserver" - RegisterProtectionSourceParametersNetappTypeKVserver string = "kVserver" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateNetappTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeNetappTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateNetappType(formats strfmt.Registry) error { - if swag.IsZero(m.NetappType) { // not required - return nil - } - - // value enum - if err := m.validateNetappTypeEnum("netappType", "body", *m.NetappType); err != nil { - return err - } - - return nil -} - -var registerProtectionSourceParametersTypeNimbleTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeNimbleTypePropEnum = append(registerProtectionSourceParametersTypeNimbleTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersNimbleTypeKStorageArray captures enum value "kStorageArray" - RegisterProtectionSourceParametersNimbleTypeKStorageArray string = "kStorageArray" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateNimbleTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeNimbleTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateNimbleType(formats strfmt.Registry) error { - if swag.IsZero(m.NimbleType) { // not required - return nil - } - - // value enum - if err := m.validateNimbleTypeEnum("nimbleType", "body", *m.NimbleType); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateOffice365CredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365CredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365CredentialsList); i++ { - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - continue - } - - if m.Office365CredentialsList[i] != nil { - if err := m.Office365CredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateOffice365ServiceAccountCredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365ServiceAccountCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - continue - } - - if m.Office365ServiceAccountCredentialsList[i] != nil { - if err := m.Office365ServiceAccountCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var registerProtectionSourceParametersTypeOffice365TypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDomain"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeOffice365TypePropEnum = append(registerProtectionSourceParametersTypeOffice365TypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersOffice365TypeKDomain captures enum value "kDomain" - RegisterProtectionSourceParametersOffice365TypeKDomain string = "kDomain" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateOffice365TypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeOffice365TypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateOffice365Type(formats strfmt.Registry) error { - if swag.IsZero(m.Office365Type) { // not required - return nil - } - - // value enum - if err := m.validateOffice365TypeEnum("office365Type", "body", *m.Office365Type); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -var registerProtectionSourceParametersTypePhysicalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHost"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypePhysicalTypePropEnum = append(registerProtectionSourceParametersTypePhysicalTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersPhysicalTypeKHost captures enum value "kHost" - RegisterProtectionSourceParametersPhysicalTypeKHost string = "kHost" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validatePhysicalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypePhysicalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validatePhysicalType(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalType) { // not required - return nil - } - - // value enum - if err := m.validatePhysicalTypeEnum("physicalType", "body", *m.PhysicalType); err != nil { - return err - } - - return nil -} - -var registerProtectionSourceParametersTypePureTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStorageArray"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypePureTypePropEnum = append(registerProtectionSourceParametersTypePureTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersPureTypeKStorageArray captures enum value "kStorageArray" - RegisterProtectionSourceParametersPureTypeKStorageArray string = "kStorageArray" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validatePureTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypePureTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validatePureType(formats strfmt.Registry) error { - if swag.IsZero(m.PureType) { // not required - return nil - } - - // value enum - if err := m.validatePureTypeEnum("pureType", "body", *m.PureType); err != nil { - return err - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateSslVerification(formats strfmt.Registry) error { - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if m.SslVerification != nil { - if err := m.SslVerification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateSubnets(formats strfmt.Registry) error { - if swag.IsZero(m.Subnets) { // not required - return nil - } - - for i := 0; i < len(m.Subnets); i++ { - if swag.IsZero(m.Subnets[i]) { // not required - continue - } - - if m.Subnets[i] != nil { - if err := m.Subnets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -func (m *RegisterProtectionSourceParameters) validateThrottlingPolicyOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicyOverrides) { // not required - return nil - } - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - continue - } - - if m.ThrottlingPolicyOverrides[i] != nil { - if err := m.ThrottlingPolicyOverrides[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -var registerProtectionSourceParametersTypeVmwareTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registerProtectionSourceParametersTypeVmwareTypePropEnum = append(registerProtectionSourceParametersTypeVmwareTypePropEnum, v) - } -} - -const ( - - // RegisterProtectionSourceParametersVmwareTypeKVCenter captures enum value "kVCenter" - RegisterProtectionSourceParametersVmwareTypeKVCenter string = "kVCenter" - - // RegisterProtectionSourceParametersVmwareTypeKStandaloneHost captures enum value "kStandaloneHost" - RegisterProtectionSourceParametersVmwareTypeKStandaloneHost string = "kStandaloneHost" - - // RegisterProtectionSourceParametersVmwareTypeKvCloudDirector captures enum value "kvCloudDirector" - RegisterProtectionSourceParametersVmwareTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *RegisterProtectionSourceParameters) validateVmwareTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registerProtectionSourceParametersTypeVmwareTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisterProtectionSourceParameters) validateVmwareType(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareType) { // not required - return nil - } - - // value enum - if err := m.validateVmwareTypeEnum("vmwareType", "body", *m.VmwareType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this register protection source parameters based on the context it is used -func (m *RegisterProtectionSourceParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeDagProtectionPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasMountCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365CredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365ServiceAccountCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSslVerification(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicyOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateAwsCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCredentials != nil { - - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if err := m.AwsCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateAwsFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetParams != nil { - - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if err := m.AwsFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateAzureCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureCredentials != nil { - - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if err := m.AzureCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateExchangeDagProtectionPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeDagProtectionPreference != nil { - - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if err := m.ExchangeDagProtectionPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateGcpCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpCredentials != nil { - - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if err := m.GcpCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateGcpFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpFleetParams != nil { - - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if err := m.GcpFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateKubernetesCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesCredentials != nil { - - if swag.IsZero(m.KubernetesCredentials) { // not required - return nil - } - - if err := m.KubernetesCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -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 -} - -func (m *RegisterProtectionSourceParameters) contextValidateOffice365CredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365CredentialsList); i++ { - - if m.Office365CredentialsList[i] != nil { - - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - return nil - } - - if err := m.Office365CredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateOffice365ServiceAccountCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - - if m.Office365ServiceAccountCredentialsList[i] != nil { - - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - return nil - } - - if err := m.Office365ServiceAccountCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateSslVerification(ctx context.Context, formats strfmt.Registry) error { - - if m.SslVerification != nil { - - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if err := m.SslVerification.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateSubnets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Subnets); i++ { - - if m.Subnets[i] != nil { - - if swag.IsZero(m.Subnets[i]) { // not required - return nil - } - - if err := m.Subnets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *RegisterProtectionSourceParameters) contextValidateThrottlingPolicyOverrides(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - - if m.ThrottlingPolicyOverrides[i] != nil { - - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - return nil - } - - if err := m.ThrottlingPolicyOverrides[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisterProtectionSourceParameters) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterProtectionSourceParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterProtectionSourceParameters) UnmarshalBinary(b []byte) error { - var res RegisterProtectionSourceParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/register_remote_cluster.go b/v1/models/register_remote_cluster.go deleted file mode 100644 index 1ff2e6ce..00000000 --- a/v1/models/register_remote_cluster.go +++ /dev/null @@ -1,319 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisterRemoteCluster Register Remote Cluster. -// -// Specifies the settings required for registering a remote Cluster -// on this local Cluster. -// -// swagger:model RegisterRemoteCluster -type RegisterRemoteCluster struct { - - // Specifies whether any endpoint (such as a Node) on the remote Cluster - // is reachable from this local Cluster. - // If true, a service running on the local Cluster can communicate - // directly with any of its peers running on the remote Cluster, without - // using a proxy. - AllEndpointsReachable *bool `json:"allEndpointsReachable,omitempty"` - - // Specifies whether the remote cluster needs to be kept in sync. - // This will be set to true by default. - AutoRegisterTarget *bool `json:"autoRegisterTarget,omitempty"` - - // Specifies whether the remote registration has happened automatically - // (due to registration on the other site). - // Can't think of other states (other than manually & automatically) so this - // isn't an enum. - // For a manual registration, this field will not be set. - AutoRegistration *bool `json:"autoRegistration,omitempty"` - - // Bandwidth Limit. - // - // Specifies settings for limiting the data transfer rate between - // the local and remote Clusters. - BandwidthLimit *BandwidthLimit `json:"bandwidthLimit,omitempty"` - - // Specifies the unique id of the remote Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the unique incarnation id of the remote Cluster. This - // id is determined dynamically by contacting the remote Cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies whether to compress the outbound data when - // transferring the replication data over the network to the remote Cluster. - CompressionEnabled *bool `json:"compressionEnabled,omitempty"` - - // Specifies any additional information if needed. - Description *string `json:"description,omitempty"` - - // Specifies the encryption key used for encrypting the replication data - // from a local Cluster to a remote Cluster. - // If a key is not specified, replication traffic encryption is disabled. - // When Snapshots are replicated from a local Cluster to a remote Cluster, - // the encryption key specified on the local Cluster must be the same - // as the key specified on the remote Cluster. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Specifies the name of the remote cluster. This field is determined - // dynamically by contacting the remote cluster. - Name *string `json:"name,omitempty"` - - // Specifies the name of the network interfaces to use for communicating with - // the remote Cluster. - NetworkInterface *string `json:"networkInterface,omitempty"` - - // Specifies the password for Cohesity user to use when - // connecting to the remote Cluster. - Password *string `json:"password,omitempty"` - - // Whether the remote cluster will be used for remote access for SPOG. - PurposeRemoteAccess *bool `json:"purposeRemoteAccess,omitempty"` - - // Whether the remote cluster will be used for replication. - PurposeReplication *bool `json:"purposeReplication,omitempty"` - - // Optional field for the user credentials to connect to Iris for remote - // access for SPOG. If this is not specified, then credentials specified - // for replication set up will be used for remote access for SPOG. - // Allowing a different user credentials to be set up for SPOG permits - // having different roles for remote access for SPOG and replication set - // up. - RemoteAccessCredentials *AccessTokenCredential `json:"remoteAccessCredentials,omitempty"` - - // Array of Remote Node IP Addresses. - // - // Specifies the IP addresses of the Nodes on the remote Cluster to - // connect with. These IP addresses can also be VIPS. - // Specifying hostnames is not supported. - RemoteIps []string `json:"remoteIps"` - - // Array of Ports. - // - // Specifies the ports to use when connecting to the Nodes of the - // remote Cluster. - RemoteIrisPorts []int64 `json:"remoteIrisPorts"` - - // Specifies whether the Rx regiseter the Tx. - ReverseRegisted *bool `json:"reverseRegisted,omitempty"` - - // Specifies the Cohesity user name used to connect to the - // remote Cluster. - UserName *string `json:"userName,omitempty"` - - // Whether to only validate the credentials without saving the information. - ValidateOnly *bool `json:"validateOnly,omitempty"` - - // Array of Storage Domain (View Box) Pairs. - // - // Specifies pairings between Storage Domains (View Boxes) on the local Cluster - // with Storage Domains (View Boxes) on a remote Cluster that are used in - // replication. - ViewBoxPairInfo []*ViewBoxPairInfo `json:"viewBoxPairInfo"` -} - -// Validate validates this register remote cluster -func (m *RegisterRemoteCluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBandwidthLimit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteAccessCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewBoxPairInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterRemoteCluster) validateBandwidthLimit(formats strfmt.Registry) error { - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if m.BandwidthLimit != nil { - if err := m.BandwidthLimit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -func (m *RegisterRemoteCluster) validateRemoteAccessCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteAccessCredentials) { // not required - return nil - } - - if m.RemoteAccessCredentials != nil { - if err := m.RemoteAccessCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAccessCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAccessCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterRemoteCluster) validateViewBoxPairInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ViewBoxPairInfo) { // not required - return nil - } - - for i := 0; i < len(m.ViewBoxPairInfo); i++ { - if swag.IsZero(m.ViewBoxPairInfo[i]) { // not required - continue - } - - if m.ViewBoxPairInfo[i] != nil { - if err := m.ViewBoxPairInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this register remote cluster based on the context it is used -func (m *RegisterRemoteCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBandwidthLimit(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteAccessCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewBoxPairInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterRemoteCluster) contextValidateBandwidthLimit(ctx context.Context, formats strfmt.Registry) error { - - if m.BandwidthLimit != nil { - - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if err := m.BandwidthLimit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -func (m *RegisterRemoteCluster) contextValidateRemoteAccessCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteAccessCredentials != nil { - - if swag.IsZero(m.RemoteAccessCredentials) { // not required - return nil - } - - if err := m.RemoteAccessCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAccessCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAccessCredentials") - } - return err - } - } - - return nil -} - -func (m *RegisterRemoteCluster) contextValidateViewBoxPairInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewBoxPairInfo); i++ { - - if m.ViewBoxPairInfo[i] != nil { - - if swag.IsZero(m.ViewBoxPairInfo[i]) { // not required - return nil - } - - if err := m.ViewBoxPairInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterRemoteCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterRemoteCluster) UnmarshalBinary(b []byte) error { - var res RegisterRemoteCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_app_info.go b/v1/models/registered_app_info.go deleted file mode 100644 index ec0fd8d3..00000000 --- a/v1/models/registered_app_info.go +++ /dev/null @@ -1,434 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RegisteredAppInfo registered app info -// -// swagger:model RegisteredAppInfo -type RegisteredAppInfo struct { - - // Specifies an authentication error message. This indicates the given - // credentials are rejected and the registration of the application is not - // successful. - AuthenticationErrorMessage *string `json:"authenticationErrorMessage,omitempty"` - - // Specifies the status of authenticating to the Protection Source - // when registering this application with Cohesity Cluster. If the status is - // 'kFinished' and there is no error, registration is successful. - // Specifies the status of the authentication during the registration of a - // Protection Source. - // 'kPending' indicates the authentication is in progress. - // 'kScheduled' indicates the authentication is scheduled. - // 'kFinished' indicates the authentication is completed. - // 'kRefreshInProgress' indicates the refresh is in progress. - // Enum: ["kPending","kScheduled","kFinished","kRefreshInProgress"] - AuthenticationStatus *string `json:"authenticationStatus,omitempty"` - - // Specifies the application environment. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the list of check results internally performed to verify status of - // various services such as 'AgnetRunning', 'SQLWriterRunning' etc. - HostSettingsCheckResults []*HostSettingsCheckResult `json:"hostSettingsCheckResults"` - - // Specifies a message if there was any error encountered during the last - // rebuild of the application tree. If there was no error during the - // last rebuild, this field is reset. - RefreshErrorMessage *string `json:"refreshErrorMessage,omitempty"` -} - -// Validate validates this registered app info -func (m *RegisteredAppInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostSettingsCheckResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var registeredAppInfoTypeAuthenticationStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPending","kScheduled","kFinished","kRefreshInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registeredAppInfoTypeAuthenticationStatusPropEnum = append(registeredAppInfoTypeAuthenticationStatusPropEnum, v) - } -} - -const ( - - // RegisteredAppInfoAuthenticationStatusKPending captures enum value "kPending" - RegisteredAppInfoAuthenticationStatusKPending string = "kPending" - - // RegisteredAppInfoAuthenticationStatusKScheduled captures enum value "kScheduled" - RegisteredAppInfoAuthenticationStatusKScheduled string = "kScheduled" - - // RegisteredAppInfoAuthenticationStatusKFinished captures enum value "kFinished" - RegisteredAppInfoAuthenticationStatusKFinished string = "kFinished" - - // RegisteredAppInfoAuthenticationStatusKRefreshInProgress captures enum value "kRefreshInProgress" - RegisteredAppInfoAuthenticationStatusKRefreshInProgress string = "kRefreshInProgress" -) - -// prop value enum -func (m *RegisteredAppInfo) validateAuthenticationStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registeredAppInfoTypeAuthenticationStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisteredAppInfo) validateAuthenticationStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationStatus) { // not required - return nil - } - - // value enum - if err := m.validateAuthenticationStatusEnum("authenticationStatus", "body", *m.AuthenticationStatus); err != nil { - return err - } - - return nil -} - -var registeredAppInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registeredAppInfoTypeEnvironmentPropEnum = append(registeredAppInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RegisteredAppInfoEnvironmentKVMware captures enum value "kVMware" - RegisteredAppInfoEnvironmentKVMware string = "kVMware" - - // RegisteredAppInfoEnvironmentKHyperV captures enum value "kHyperV" - RegisteredAppInfoEnvironmentKHyperV string = "kHyperV" - - // RegisteredAppInfoEnvironmentKSQL captures enum value "kSQL" - RegisteredAppInfoEnvironmentKSQL string = "kSQL" - - // RegisteredAppInfoEnvironmentKView captures enum value "kView" - RegisteredAppInfoEnvironmentKView string = "kView" - - // RegisteredAppInfoEnvironmentKPuppeteer captures enum value "kPuppeteer" - RegisteredAppInfoEnvironmentKPuppeteer string = "kPuppeteer" - - // RegisteredAppInfoEnvironmentKPhysical captures enum value "kPhysical" - RegisteredAppInfoEnvironmentKPhysical string = "kPhysical" - - // RegisteredAppInfoEnvironmentKPure captures enum value "kPure" - RegisteredAppInfoEnvironmentKPure string = "kPure" - - // RegisteredAppInfoEnvironmentKNimble captures enum value "kNimble" - RegisteredAppInfoEnvironmentKNimble string = "kNimble" - - // RegisteredAppInfoEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RegisteredAppInfoEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RegisteredAppInfoEnvironmentKAzure captures enum value "kAzure" - RegisteredAppInfoEnvironmentKAzure string = "kAzure" - - // RegisteredAppInfoEnvironmentKNetapp captures enum value "kNetapp" - RegisteredAppInfoEnvironmentKNetapp string = "kNetapp" - - // RegisteredAppInfoEnvironmentKAgent captures enum value "kAgent" - RegisteredAppInfoEnvironmentKAgent string = "kAgent" - - // RegisteredAppInfoEnvironmentKGenericNas captures enum value "kGenericNas" - RegisteredAppInfoEnvironmentKGenericNas string = "kGenericNas" - - // RegisteredAppInfoEnvironmentKAcropolis captures enum value "kAcropolis" - RegisteredAppInfoEnvironmentKAcropolis string = "kAcropolis" - - // RegisteredAppInfoEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RegisteredAppInfoEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RegisteredAppInfoEnvironmentKIsilon captures enum value "kIsilon" - RegisteredAppInfoEnvironmentKIsilon string = "kIsilon" - - // RegisteredAppInfoEnvironmentKGPFS captures enum value "kGPFS" - RegisteredAppInfoEnvironmentKGPFS string = "kGPFS" - - // RegisteredAppInfoEnvironmentKKVM captures enum value "kKVM" - RegisteredAppInfoEnvironmentKKVM string = "kKVM" - - // RegisteredAppInfoEnvironmentKAWS captures enum value "kAWS" - RegisteredAppInfoEnvironmentKAWS string = "kAWS" - - // RegisteredAppInfoEnvironmentKExchange captures enum value "kExchange" - RegisteredAppInfoEnvironmentKExchange string = "kExchange" - - // RegisteredAppInfoEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RegisteredAppInfoEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RegisteredAppInfoEnvironmentKOracle captures enum value "kOracle" - RegisteredAppInfoEnvironmentKOracle string = "kOracle" - - // RegisteredAppInfoEnvironmentKGCP captures enum value "kGCP" - RegisteredAppInfoEnvironmentKGCP string = "kGCP" - - // RegisteredAppInfoEnvironmentKFlashBlade captures enum value "kFlashBlade" - RegisteredAppInfoEnvironmentKFlashBlade string = "kFlashBlade" - - // RegisteredAppInfoEnvironmentKAWSNative captures enum value "kAWSNative" - RegisteredAppInfoEnvironmentKAWSNative string = "kAWSNative" - - // RegisteredAppInfoEnvironmentKO365 captures enum value "kO365" - RegisteredAppInfoEnvironmentKO365 string = "kO365" - - // RegisteredAppInfoEnvironmentKO365Outlook captures enum value "kO365Outlook" - RegisteredAppInfoEnvironmentKO365Outlook string = "kO365Outlook" - - // RegisteredAppInfoEnvironmentKHyperFlex captures enum value "kHyperFlex" - RegisteredAppInfoEnvironmentKHyperFlex string = "kHyperFlex" - - // RegisteredAppInfoEnvironmentKGCPNative captures enum value "kGCPNative" - RegisteredAppInfoEnvironmentKGCPNative string = "kGCPNative" - - // RegisteredAppInfoEnvironmentKAzureNative captures enum value "kAzureNative" - RegisteredAppInfoEnvironmentKAzureNative string = "kAzureNative" - - // RegisteredAppInfoEnvironmentKKubernetes captures enum value "kKubernetes" - RegisteredAppInfoEnvironmentKKubernetes string = "kKubernetes" - - // RegisteredAppInfoEnvironmentKElastifile captures enum value "kElastifile" - RegisteredAppInfoEnvironmentKElastifile string = "kElastifile" - - // RegisteredAppInfoEnvironmentKAD captures enum value "kAD" - RegisteredAppInfoEnvironmentKAD string = "kAD" - - // RegisteredAppInfoEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RegisteredAppInfoEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RegisteredAppInfoEnvironmentKCassandra captures enum value "kCassandra" - RegisteredAppInfoEnvironmentKCassandra string = "kCassandra" - - // RegisteredAppInfoEnvironmentKMongoDB captures enum value "kMongoDB" - RegisteredAppInfoEnvironmentKMongoDB string = "kMongoDB" - - // RegisteredAppInfoEnvironmentKCouchbase captures enum value "kCouchbase" - RegisteredAppInfoEnvironmentKCouchbase string = "kCouchbase" - - // RegisteredAppInfoEnvironmentKHdfs captures enum value "kHdfs" - RegisteredAppInfoEnvironmentKHdfs string = "kHdfs" - - // RegisteredAppInfoEnvironmentKHive captures enum value "kHive" - RegisteredAppInfoEnvironmentKHive string = "kHive" - - // RegisteredAppInfoEnvironmentKHBase captures enum value "kHBase" - RegisteredAppInfoEnvironmentKHBase string = "kHBase" - - // RegisteredAppInfoEnvironmentKUDA captures enum value "kUDA" - RegisteredAppInfoEnvironmentKUDA string = "kUDA" - - // RegisteredAppInfoEnvironmentKO365Teams captures enum value "kO365Teams" - RegisteredAppInfoEnvironmentKO365Teams string = "kO365Teams" - - // RegisteredAppInfoEnvironmentKO365Group captures enum value "kO365Group" - RegisteredAppInfoEnvironmentKO365Group string = "kO365Group" - - // RegisteredAppInfoEnvironmentKO365Exchange captures enum value "kO365Exchange" - RegisteredAppInfoEnvironmentKO365Exchange string = "kO365Exchange" - - // RegisteredAppInfoEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RegisteredAppInfoEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RegisteredAppInfoEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RegisteredAppInfoEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RegisteredAppInfoEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RegisteredAppInfoEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RegisteredAppInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registeredAppInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisteredAppInfo) 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 -} - -func (m *RegisteredAppInfo) validateHostSettingsCheckResults(formats strfmt.Registry) error { - if swag.IsZero(m.HostSettingsCheckResults) { // not required - return nil - } - - for i := 0; i < len(m.HostSettingsCheckResults); i++ { - if swag.IsZero(m.HostSettingsCheckResults[i]) { // not required - continue - } - - if m.HostSettingsCheckResults[i] != nil { - if err := m.HostSettingsCheckResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheckResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheckResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered app info based on the context it is used -func (m *RegisteredAppInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostSettingsCheckResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredAppInfo) contextValidateHostSettingsCheckResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostSettingsCheckResults); i++ { - - if m.HostSettingsCheckResults[i] != nil { - - if swag.IsZero(m.HostSettingsCheckResults[i]) { // not required - return nil - } - - if err := m.HostSettingsCheckResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingsCheckResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingsCheckResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredAppInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredAppInfo) UnmarshalBinary(b []byte) error { - var res RegisteredAppInfo - 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 deleted file mode 100644 index fd67171a..00000000 --- a/v1/models/registered_application_server.go +++ /dev/null @@ -1,163 +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" -) - -// RegisteredApplicationServer Registered Application Server. -// -// Specifies an Application Server and the Protection Source that registered -// the Application Server. -// -// swagger:model RegisteredApplicationServer -type RegisteredApplicationServer struct { - - // application server - ApplicationServer *RegisteredApplicationServerApplicationServer `json:"applicationServer,omitempty"` - - // registered protection source - RegisteredProtectionSource *RegisteredApplicationServerRegisteredProtectionSource `json:"registeredProtectionSource,omitempty"` -} - -// Validate validates this registered application server -func (m *RegisteredApplicationServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredProtectionSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredApplicationServer) validateApplicationServer(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationServer) { // not required - 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 -} - -func (m *RegisteredApplicationServer) validateRegisteredProtectionSource(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredProtectionSource) { // not required - 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 -} - -// ContextValidate validate this registered application server based on the context it is used -func (m *RegisteredApplicationServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationServer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredProtectionSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RegisteredApplicationServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredApplicationServer) UnmarshalBinary(b []byte) error { - var res RegisteredApplicationServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_azure_params.go b/v1/models/registered_entity_azure_params.go deleted file mode 100644 index 0a1fae62..00000000 --- a/v1/models/registered_entity_azure_params.go +++ /dev/null @@ -1,57 +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" -) - -// RegisteredEntityAzureParams Contains additional information specified by the user while registering -// Azure entity. -// -// swagger:model RegisteredEntityAzureParams -type RegisteredEntityAzureParams struct { - - // Represents the level at which source is to be registered. - RegistrationLevel *int32 `json:"registrationLevel,omitempty"` - - // Represents the workflow type of source registration. - RegistrationWorkflow *int32 `json:"registrationWorkflow,omitempty"` - - // Represents the list of use cases for which the source is registered. - UseCases []int32 `json:"useCases"` -} - -// Validate validates this registered entity azure params -func (m *RegisteredEntityAzureParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity azure params based on context it is used -func (m *RegisteredEntityAzureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityAzureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityAzureParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityAzureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_cassandra_params.go b/v1/models/registered_entity_cassandra_params.go deleted file mode 100644 index 461c1da5..00000000 --- a/v1/models/registered_entity_cassandra_params.go +++ /dev/null @@ -1,164 +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" -) - -// RegisteredEntityCassandraParams Contains all params specified by the user while registering a cassandra -// entity. -// -// swagger:model RegisteredEntityCassandraParams -type RegisteredEntityCassandraParams struct { - - // cassandra additional params - CassandraAdditionalParams *CassandraAdditionalParams `json:"cassandraAdditionalParams,omitempty"` - - // cassandra connect params - CassandraConnectParams *PrivateCassandraConnectParams `json:"cassandraConnectParams,omitempty"` - - // Whether the request is discovery request or the final registration. - IsDiscoveryRequest *bool `json:"isDiscoveryRequest,omitempty"` -} - -// Validate validates this registered entity cassandra params -func (m *RegisteredEntityCassandraParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityCassandraParams) validateCassandraAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAdditionalParams) { // not required - return nil - } - - if m.CassandraAdditionalParams != nil { - if err := m.CassandraAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityCassandraParams) validateCassandraConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraConnectParams) { // not required - return nil - } - - if m.CassandraConnectParams != nil { - if err := m.CassandraConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity cassandra params based on the context it is used -func (m *RegisteredEntityCassandraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityCassandraParams) contextValidateCassandraAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraAdditionalParams != nil { - - if swag.IsZero(m.CassandraAdditionalParams) { // not required - return nil - } - - if err := m.CassandraAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityCassandraParams) contextValidateCassandraConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraConnectParams != nil { - - if swag.IsZero(m.CassandraConnectParams) { // not required - return nil - } - - if err := m.CassandraConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityCassandraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityCassandraParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityCassandraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_couchbase_params.go b/v1/models/registered_entity_couchbase_params.go deleted file mode 100644 index c6493035..00000000 --- a/v1/models/registered_entity_couchbase_params.go +++ /dev/null @@ -1,110 +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" -) - -// RegisteredEntityCouchbaseParams Contains all params specified by the user while registering a couchbase -// entity. -// -// swagger:model RegisteredEntityCouchbaseParams -type RegisteredEntityCouchbaseParams struct { - - // couchbase connect params - CouchbaseConnectParams *PrivateCouchbaseConnectParams `json:"couchbaseConnectParams,omitempty"` -} - -// Validate validates this registered entity couchbase params -func (m *RegisteredEntityCouchbaseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCouchbaseConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityCouchbaseParams) validateCouchbaseConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseConnectParams) { // not required - return nil - } - - if m.CouchbaseConnectParams != nil { - if err := m.CouchbaseConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity couchbase params based on the context it is used -func (m *RegisteredEntityCouchbaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCouchbaseConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityCouchbaseParams) contextValidateCouchbaseConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseConnectParams != nil { - - if swag.IsZero(m.CouchbaseConnectParams) { // not required - return nil - } - - if err := m.CouchbaseConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityCouchbaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityCouchbaseParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityCouchbaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_generic_nas_params.go b/v1/models/registered_entity_generic_nas_params.go deleted file mode 100644 index 0b8cea36..00000000 --- a/v1/models/registered_entity_generic_nas_params.go +++ /dev/null @@ -1,52 +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" -) - -// RegisteredEntityGenericNasParams Contains all params specified by the user while registering a generic NAS -// entity. -// -// swagger:model RegisteredEntityGenericNasParams -type RegisteredEntityGenericNasParams struct { - - // Whether to skip validation of the given mount point. If this is set to - // true, the mount point will not be validated during registration. - SkipValidation *bool `json:"skipValidation,omitempty"` -} - -// Validate validates this registered entity generic nas params -func (m *RegisteredEntityGenericNasParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity generic nas params based on context it is used -func (m *RegisteredEntityGenericNasParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityGenericNasParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityGenericNasParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityGenericNasParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_h_base_params.go b/v1/models/registered_entity_h_base_params.go deleted file mode 100644 index c417e2e5..00000000 --- a/v1/models/registered_entity_h_base_params.go +++ /dev/null @@ -1,164 +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" -) - -// RegisteredEntityHBaseParams Contains all params specified by the user while registering a hbase -// entity. -// -// swagger:model RegisteredEntityHBaseParams -type RegisteredEntityHBaseParams struct { - - // hbase connect params - HbaseConnectParams *PrivateHBaseConnectParams `json:"hbaseConnectParams,omitempty"` - - // hbase discovery params - HbaseDiscoveryParams *HBaseDiscoveryParams `json:"hbaseDiscoveryParams,omitempty"` - - // Whether the request is discovery request or the final registration. - IsDiscoveryRequest *bool `json:"isDiscoveryRequest,omitempty"` -} - -// Validate validates this registered entity h base params -func (m *RegisteredEntityHBaseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHbaseConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHBaseParams) validateHbaseConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseConnectParams) { // not required - return nil - } - - if m.HbaseConnectParams != nil { - if err := m.HbaseConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHBaseParams) validateHbaseDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseDiscoveryParams) { // not required - return nil - } - - if m.HbaseDiscoveryParams != nil { - if err := m.HbaseDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity h base params based on the context it is used -func (m *RegisteredEntityHBaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHbaseConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHBaseParams) contextValidateHbaseConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseConnectParams != nil { - - if swag.IsZero(m.HbaseConnectParams) { // not required - return nil - } - - if err := m.HbaseConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHBaseParams) contextValidateHbaseDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseDiscoveryParams != nil { - - if swag.IsZero(m.HbaseDiscoveryParams) { // not required - return nil - } - - if err := m.HbaseDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityHBaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityHBaseParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityHBaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_hdfs_params.go b/v1/models/registered_entity_hdfs_params.go deleted file mode 100644 index b706a2cc..00000000 --- a/v1/models/registered_entity_hdfs_params.go +++ /dev/null @@ -1,164 +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" -) - -// RegisteredEntityHdfsParams Contains all params specified by the user while registering a hdfs -// entity. -// -// swagger:model RegisteredEntityHdfsParams -type RegisteredEntityHdfsParams struct { - - // hdfs connect params - HdfsConnectParams *PrivateHdfsConnectParams `json:"hdfsConnectParams,omitempty"` - - // hdfs discovery params - HdfsDiscoveryParams *HdfsDiscoveryParams `json:"hdfsDiscoveryParams,omitempty"` - - // Whether the request is discovery request or the final registration. - IsDiscoveryRequest *bool `json:"isDiscoveryRequest,omitempty"` -} - -// Validate validates this registered entity hdfs params -func (m *RegisteredEntityHdfsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHdfsConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHdfsParams) validateHdfsConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if m.HdfsConnectParams != nil { - if err := m.HdfsConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHdfsParams) validateHdfsDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsDiscoveryParams) { // not required - return nil - } - - if m.HdfsDiscoveryParams != nil { - if err := m.HdfsDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity hdfs params based on the context it is used -func (m *RegisteredEntityHdfsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHdfsParams) contextValidateHdfsConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectParams != nil { - - if swag.IsZero(m.HdfsConnectParams) { // not required - return nil - } - - if err := m.HdfsConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHdfsParams) contextValidateHdfsDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsDiscoveryParams != nil { - - if swag.IsZero(m.HdfsDiscoveryParams) { // not required - return nil - } - - if err := m.HdfsDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityHdfsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityHdfsParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityHdfsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_hive_params.go b/v1/models/registered_entity_hive_params.go deleted file mode 100644 index df7140eb..00000000 --- a/v1/models/registered_entity_hive_params.go +++ /dev/null @@ -1,164 +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" -) - -// RegisteredEntityHiveParams Contains all params specified by the user while registering a hive -// entity. -// -// swagger:model RegisteredEntityHiveParams -type RegisteredEntityHiveParams struct { - - // hive connect params - HiveConnectParams *PrivateHiveConnectParams `json:"hiveConnectParams,omitempty"` - - // hive discovery params - HiveDiscoveryParams *HiveDiscoveryParams `json:"hiveDiscoveryParams,omitempty"` - - // Whether the request is discovery request or the final registration. - IsDiscoveryRequest *bool `json:"isDiscoveryRequest,omitempty"` -} - -// Validate validates this registered entity hive params -func (m *RegisteredEntityHiveParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHiveConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHiveParams) validateHiveConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveConnectParams) { // not required - return nil - } - - if m.HiveConnectParams != nil { - if err := m.HiveConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHiveParams) validateHiveDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveDiscoveryParams) { // not required - return nil - } - - if m.HiveDiscoveryParams != nil { - if err := m.HiveDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity hive params based on the context it is used -func (m *RegisteredEntityHiveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHiveConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityHiveParams) contextValidateHiveConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveConnectParams != nil { - - if swag.IsZero(m.HiveConnectParams) { // not required - return nil - } - - if err := m.HiveConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityHiveParams) contextValidateHiveDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveDiscoveryParams != nil { - - if swag.IsZero(m.HiveDiscoveryParams) { // not required - return nil - } - - if err := m.HiveDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityHiveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityHiveParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityHiveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_info.go b/v1/models/registered_entity_info.go deleted file mode 100644 index 25b56e74..00000000 --- a/v1/models/registered_entity_info.go +++ /dev/null @@ -1,620 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityInfo registered entity info -// -// swagger:model RegisteredEntityInfo -type RegisteredEntityInfo struct { - - // Application specific credentials vector. This may be needed in cases where - // after authorizing with the environment, separate authorization is needed - // to access an application in the environment (for example, kOracle where - // after authorizing with the database host, to access a database separate - // credentials are required). - // TODO(Vivek) : Move this to RegisteredEntityParams - AppCredentialsVec []*AppCredentials `json:"appCredentialsVec"` - - // The applications environments that have been registered with this entity. - AppEnvVec []int32 `json:"appEnvVec"` - - // The software version of the cluster when the hierarchy was most recently - // fetched and built. The intention of storing this is to support refreshing - // the entity hierarchy as soon as cluster upgrade finishes, by comparing - // with the cluster_target_software_version present in the cluster config - // bulletin. This field must be populated by all adaptors which refresh their - // entity hierarchy (along with the last_refresh_time_usecs field), if they - // wish to auto-refresh their entity hierarchy immediately after cluster - // upgrade finishes. - // - // In case of physical entities, refresh is needed after upgrade in order - // to support the agent upgrade option in the UI appropriately. - ClusterSoftwareVersionDuringLastRefresh *string `json:"clusterSoftwareVersionDuringLastRefresh,omitempty"` - - // Information to access the entity. - ConnectorParams *ConnectorParams `json:"connectorParams,omitempty"` - - // This is set to false only for top level entities which are created - // internally. Currently this is set to false only for Exchange DAG entity. - IsRegisteredByUser *bool `json:"isRegisteredByUser,omitempty"` - - // If this entity is registered as a storage snapshot provider. - IsStorageSnapshotProvider *bool `json:"isStorageSnapshotProvider,omitempty"` - - // Time (in usecs) when the hierarchy was most recently fetched and built. - LastRefreshTimeUsecs *int64 `json:"lastRefreshTimeUsecs,omitempty"` - - // This will be optionally set and captures the current progress and pulse - // details w.r.t to either the registration or refresh. - ProgressMonitorPath *string `json:"progressMonitorPath,omitempty"` - - // Will contain any error encountered during the last refresh of the entity. - RefreshError *PrivateErrorProto `json:"refreshError,omitempty"` - - // registered app info vec - RegisteredAppInfoVec []*PrivateRegisteredAppInfo `json:"registeredAppInfoVec"` - - // Any additional params specified by the user. - RegisteredEntityParams *RegisteredEntityParams `json:"registeredEntityParams,omitempty"` - - // The time when this entity was registered with the Magneto master. - RegistrationTimeUsecs *int64 `json:"registrationTimeUsecs,omitempty"` - - // Map from child entity id to dummy value. If this map is non-empty then - // magneto will work on only the entities specified in this map. - RestrictedObjectIDMap []*RegisteredEntityInfoRestrictedObjectIDMapEntry `json:"restrictedObjectIdMap"` - - // This controls whether to use source side dedup on the source or not. - // NOTE: This is only applicable to sources which support source side dedup - // (e.g., Linux physical servers). - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // TODO(aubin): Append "_DEPRECATED" to this field name once iris has - // stopped referring to it. - ThrottlingPolicy *ThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // This will be populated with messages that should be shown to the user - // associated with the source entity. - UserMessages []string `json:"userMessages"` - - // If not empty, this is the error returned from the verification task, and - // it indicates that this registration is not successful. - VerificationError *PrivateErrorProto `json:"verificationError,omitempty"` - - // Verification status of this registered entity, when the credential - // registration needs to be verified. Otherwise if no credential registration - // or verification is required, this field is set to a default value of - // kFinished. - VerificationStatus *int32 `json:"verificationStatus,omitempty"` - - // The set of warnings returned by the verification task. These warnings - // indicate that although the registration was successful, the host - // environment likely needs some cleanup/fixing. - VerificationWarningVec []*PrivateErrorProto `json:"verificationWarningVec"` -} - -// Validate validates this registered entity info -func (m *RegisteredEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppCredentialsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredAppInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntityParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestrictedObjectIDMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVerificationError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVerificationWarningVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityInfo) validateAppCredentialsVec(formats strfmt.Registry) error { - if swag.IsZero(m.AppCredentialsVec) { // not required - return nil - } - - for i := 0; i < len(m.AppCredentialsVec); i++ { - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - continue - } - - if m.AppCredentialsVec[i] != nil { - if err := m.AppCredentialsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) validateConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorParams) { // not required - return nil - } - - if m.ConnectorParams != nil { - if err := m.ConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) validateRefreshError(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if m.RefreshError != nil { - if err := m.RefreshError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) validateRegisteredAppInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredAppInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.RegisteredAppInfoVec); i++ { - if swag.IsZero(m.RegisteredAppInfoVec[i]) { // not required - continue - } - - if m.RegisteredAppInfoVec[i] != nil { - if err := m.RegisteredAppInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredAppInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredAppInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) validateRegisteredEntityParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntityParams) { // not required - return nil - } - - if m.RegisteredEntityParams != nil { - if err := m.RegisteredEntityParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) validateRestrictedObjectIDMap(formats strfmt.Registry) error { - if swag.IsZero(m.RestrictedObjectIDMap) { // not required - return nil - } - - for i := 0; i < len(m.RestrictedObjectIDMap); i++ { - if swag.IsZero(m.RestrictedObjectIDMap[i]) { // not required - continue - } - - if m.RestrictedObjectIDMap[i] != nil { - if err := m.RestrictedObjectIDMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restrictedObjectIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restrictedObjectIdMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -func (m *RegisteredEntityInfo) validateVerificationError(formats strfmt.Registry) error { - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if m.VerificationError != nil { - if err := m.VerificationError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) validateVerificationWarningVec(formats strfmt.Registry) error { - if swag.IsZero(m.VerificationWarningVec) { // not required - return nil - } - - for i := 0; i < len(m.VerificationWarningVec); i++ { - if swag.IsZero(m.VerificationWarningVec[i]) { // not required - continue - } - - if m.VerificationWarningVec[i] != nil { - if err := m.VerificationWarningVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationWarningVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationWarningVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered entity info based on the context it is used -func (m *RegisteredEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppCredentialsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredAppInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntityParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestrictedObjectIDMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVerificationError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVerificationWarningVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityInfo) contextValidateAppCredentialsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppCredentialsVec); i++ { - - if m.AppCredentialsVec[i] != nil { - - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - return nil - } - - if err := m.AppCredentialsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectorParams != nil { - - if swag.IsZero(m.ConnectorParams) { // not required - return nil - } - - if err := m.ConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateRefreshError(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshError != nil { - - if swag.IsZero(m.RefreshError) { // not required - return nil - } - - if err := m.RefreshError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshError") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateRegisteredAppInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RegisteredAppInfoVec); i++ { - - if m.RegisteredAppInfoVec[i] != nil { - - if swag.IsZero(m.RegisteredAppInfoVec[i]) { // not required - return nil - } - - if err := m.RegisteredAppInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredAppInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredAppInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateRegisteredEntityParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntityParams != nil { - - if swag.IsZero(m.RegisteredEntityParams) { // not required - return nil - } - - if err := m.RegisteredEntityParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateRestrictedObjectIDMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestrictedObjectIDMap); i++ { - - if m.RestrictedObjectIDMap[i] != nil { - - if swag.IsZero(m.RestrictedObjectIDMap[i]) { // not required - return nil - } - - if err := m.RestrictedObjectIDMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restrictedObjectIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restrictedObjectIdMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityInfo) 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 -} - -func (m *RegisteredEntityInfo) contextValidateVerificationError(ctx context.Context, formats strfmt.Registry) error { - - if m.VerificationError != nil { - - if swag.IsZero(m.VerificationError) { // not required - return nil - } - - if err := m.VerificationError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationError") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityInfo) contextValidateVerificationWarningVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VerificationWarningVec); i++ { - - if m.VerificationWarningVec[i] != nil { - - if swag.IsZero(m.VerificationWarningVec[i]) { // not required - return nil - } - - if err := m.VerificationWarningVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verificationWarningVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("verificationWarningVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityInfo) UnmarshalBinary(b []byte) error { - var res RegisteredEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_info_restricted_object_id_map_entry.go b/v1/models/registered_entity_info_restricted_object_id_map_entry.go deleted file mode 100644 index b62f6349..00000000 --- a/v1/models/registered_entity_info_restricted_object_id_map_entry.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" -) - -// RegisteredEntityInfoRestrictedObjectIDMapEntry registered entity info restricted object Id map entry -// -// swagger:model RegisteredEntityInfo_RestrictedObjectIdMapEntry -type RegisteredEntityInfoRestrictedObjectIDMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *bool `json:"value,omitempty"` -} - -// Validate validates this registered entity info restricted object Id map entry -func (m *RegisteredEntityInfoRestrictedObjectIDMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity info restricted object Id map entry based on context it is used -func (m *RegisteredEntityInfoRestrictedObjectIDMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityInfoRestrictedObjectIDMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityInfoRestrictedObjectIDMapEntry) UnmarshalBinary(b []byte) error { - var res RegisteredEntityInfoRestrictedObjectIDMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_isilon_params.go b/v1/models/registered_entity_isilon_params.go deleted file mode 100644 index 530dc58e..00000000 --- a/v1/models/registered_entity_isilon_params.go +++ /dev/null @@ -1,109 +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" -) - -// RegisteredEntityIsilonParams registered entity isilon params -// -// swagger:model RegisteredEntityIsilonParams -type RegisteredEntityIsilonParams struct { - - // Isilon source/target configuration. - IsilonEnvParams *IsilonEnvParams `json:"isilonEnvParams,omitempty"` -} - -// Validate validates this registered entity isilon params -func (m *RegisteredEntityIsilonParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsilonEnvParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityIsilonParams) validateIsilonEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if m.IsilonEnvParams != nil { - if err := m.IsilonEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity isilon params based on the context it is used -func (m *RegisteredEntityIsilonParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIsilonEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityIsilonParams) contextValidateIsilonEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonEnvParams != nil { - - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if err := m.IsilonEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityIsilonParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityIsilonParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityIsilonParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_kubernetes_params.go b/v1/models/registered_entity_kubernetes_params.go deleted file mode 100644 index 1a045ee5..00000000 --- a/v1/models/registered_entity_kubernetes_params.go +++ /dev/null @@ -1,320 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityKubernetesParams Contains extra parameters needed for K8s registration. -// -// swagger:model RegisteredEntityKubernetesParams -type RegisteredEntityKubernetesParams struct { - - // Datamover image location that will be used to pull the image. - DatamoverImageLocation *string `json:"datamoverImageLocation,omitempty"` - - // Service type. This will only be applicable to kCluster entities. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // VLAN information of the default VLAN. - DefaultVlanParams *VlanParams `json:"defaultVlanParams,omitempty"` - - // K8s distribution. This will only be applicable to kCluster entities. - Distribution *int32 `json:"distribution,omitempty"` - - // Init container image used for mounting PVCs - InitContainerImageLocation *string `json:"initContainerImageLocation,omitempty"` - - // S3 account ID that is used to register the source. - S3AccountID *string `json:"s3AccountId,omitempty"` - - // Contains generic annotations to be put on services. - ServiceAnnotations []*RegisteredEntityKubernetesParamsServiceAnnotationsEntry `json:"serviceAnnotations"` - - // Custom tolerations for Datamover pods. - TolerationsVec []*PodInfoPodSpecToleration `json:"tolerationsVec"` - - // Velero AWS plugin location from a private registry. - VeleroAwsPluginImageLocation *string `json:"veleroAwsPluginImageLocation,omitempty"` - - // Velero image location if coming from a private registry. - VeleroImageLocation *string `json:"veleroImageLocation,omitempty"` - - // Velero Openshift plugin location from a private registry. - VeleroOpenshiftPluginImageLocation *string `json:"veleroOpenshiftPluginImageLocation,omitempty"` - - // VLAN information provided during registration. - VlanInfoVec []*VlanInfo `json:"vlanInfoVec"` -} - -// Validate validates this registered entity kubernetes params -func (m *RegisteredEntityKubernetesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTolerationsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityKubernetesParams) validateDefaultVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if m.DefaultVlanParams != nil { - if err := m.DefaultVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) validateTolerationsVec(formats strfmt.Registry) error { - if swag.IsZero(m.TolerationsVec) { // not required - return nil - } - - for i := 0; i < len(m.TolerationsVec); i++ { - if swag.IsZero(m.TolerationsVec[i]) { // not required - continue - } - - if m.TolerationsVec[i] != nil { - if err := m.TolerationsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) validateVlanInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoVec); i++ { - if swag.IsZero(m.VlanInfoVec[i]) { // not required - continue - } - - if m.VlanInfoVec[i] != nil { - if err := m.VlanInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered entity kubernetes params based on the context it is used -func (m *RegisteredEntityKubernetesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTolerationsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityKubernetesParams) contextValidateDefaultVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultVlanParams != nil { - - if swag.IsZero(m.DefaultVlanParams) { // not required - return nil - } - - if err := m.DefaultVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultVlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) contextValidateTolerationsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TolerationsVec); i++ { - - if m.TolerationsVec[i] != nil { - - if swag.IsZero(m.TolerationsVec[i]) { // not required - return nil - } - - if err := m.TolerationsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tolerationsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityKubernetesParams) contextValidateVlanInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoVec); i++ { - - if m.VlanInfoVec[i] != nil { - - if swag.IsZero(m.VlanInfoVec[i]) { // not required - return nil - } - - if err := m.VlanInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityKubernetesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityKubernetesParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityKubernetesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_kubernetes_params_service_annotations_entry.go b/v1/models/registered_entity_kubernetes_params_service_annotations_entry.go deleted file mode 100644 index c265b48d..00000000 --- a/v1/models/registered_entity_kubernetes_params_service_annotations_entry.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" -) - -// RegisteredEntityKubernetesParamsServiceAnnotationsEntry registered entity kubernetes params service annotations entry -// -// swagger:model RegisteredEntityKubernetesParams_ServiceAnnotationsEntry -type RegisteredEntityKubernetesParamsServiceAnnotationsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this registered entity kubernetes params service annotations entry -func (m *RegisteredEntityKubernetesParamsServiceAnnotationsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity kubernetes params service annotations entry based on context it is used -func (m *RegisteredEntityKubernetesParamsServiceAnnotationsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityKubernetesParamsServiceAnnotationsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityKubernetesParamsServiceAnnotationsEntry) UnmarshalBinary(b []byte) error { - var res RegisteredEntityKubernetesParamsServiceAnnotationsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_mongo_d_b_params.go b/v1/models/registered_entity_mongo_d_b_params.go deleted file mode 100644 index da69050d..00000000 --- a/v1/models/registered_entity_mongo_d_b_params.go +++ /dev/null @@ -1,161 +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" -) - -// RegisteredEntityMongoDBParams Contains all params specified by the user while registering a mongodb -// entity. -// -// swagger:model RegisteredEntityMongoDBParams -type RegisteredEntityMongoDBParams struct { - - // mongodb additional params - MongodbAdditionalParams *MongoDBAdditionalParams `json:"mongodbAdditionalParams,omitempty"` - - // mongodb connect params - MongodbConnectParams *PrivateMongoDBConnectParams `json:"mongodbConnectParams,omitempty"` -} - -// Validate validates this registered entity mongo d b params -func (m *RegisteredEntityMongoDBParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMongodbAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbConnectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityMongoDBParams) validateMongodbAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbAdditionalParams) { // not required - return nil - } - - if m.MongodbAdditionalParams != nil { - if err := m.MongodbAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityMongoDBParams) validateMongodbConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbConnectParams) { // not required - return nil - } - - if m.MongodbConnectParams != nil { - if err := m.MongodbConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbConnectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity mongo d b params based on the context it is used -func (m *RegisteredEntityMongoDBParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMongodbAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityMongoDBParams) contextValidateMongodbAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbAdditionalParams != nil { - - if swag.IsZero(m.MongodbAdditionalParams) { // not required - return nil - } - - if err := m.MongodbAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityMongoDBParams) contextValidateMongodbConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbConnectParams != nil { - - if swag.IsZero(m.MongodbConnectParams) { // not required - return nil - } - - if err := m.MongodbConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbConnectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityMongoDBParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityMongoDBParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityMongoDBParams - 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 deleted file mode 100644 index 87c9cd13..00000000 --- a/v1/models/registered_entity_o365_params.go +++ /dev/null @@ -1,182 +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" -) - -// RegisteredEntityO365Params Contains all params specified by the user while registering O365 entity. -// -// swagger:model RegisteredEntityO365Params -type RegisteredEntityO365Params struct { - - // Specifies the array of container entities which are to be discovered - // within the O365 domain. Currently the discovery of Users, Sites, Groups, - // 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 - // set to [kUsers, kSites]. - DiscoverableEntityTypeVec []int32 `json:"discoverableEntityTypeVec"` - - // If set to true, sharepoint sites will be tagged with group site or teams - // channel site. - EnableSiteTagging *bool `json:"enableSiteTagging,omitempty"` - - // Keeps track of background entity fetch on the o365 source. - // Note: Applicable to new source registrations. - PendingBackgroundEntityFetch *bool `json:"pendingBackgroundEntityFetch,omitempty"` - - // team entity additional params - TeamEntityAdditionalParams *RegisteredEntityO365ParamsTeamEntityAdditionalParams `json:"teamEntityAdditionalParams,omitempty"` - - // If some credentials are not updated, we will use the previous existing - // value for them thus avoiding specifying every secret credential in case - // of update. - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` - - // user entity discovery params - UserEntityDiscoveryParams *RegisteredEntityO365ParamsUserEntityDiscoveryParams `json:"userEntityDiscoveryParams,omitempty"` -} - -// Validate validates this registered entity o365 params -func (m *RegisteredEntityO365Params) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTeamEntityAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserEntityDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityO365Params) validateTeamEntityAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.TeamEntityAdditionalParams) { // not required - return nil - } - - if m.TeamEntityAdditionalParams != nil { - if err := m.TeamEntityAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamEntityAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamEntityAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityO365Params) validateUserEntityDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.UserEntityDiscoveryParams) { // not required - return nil - } - - if m.UserEntityDiscoveryParams != nil { - if err := m.UserEntityDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userEntityDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userEntityDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity o365 params based on the context it is used -func (m *RegisteredEntityO365Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTeamEntityAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserEntityDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityO365Params) contextValidateTeamEntityAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamEntityAdditionalParams != nil { - - if swag.IsZero(m.TeamEntityAdditionalParams) { // not required - return nil - } - - if err := m.TeamEntityAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamEntityAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamEntityAdditionalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityO365Params) contextValidateUserEntityDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UserEntityDiscoveryParams != nil { - - if swag.IsZero(m.UserEntityDiscoveryParams) { // not required - return nil - } - - if err := m.UserEntityDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userEntityDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userEntityDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityO365Params) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityO365Params) UnmarshalBinary(b []byte) error { - var res RegisteredEntityO365Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_o365_params_team_entity_additional_params.go b/v1/models/registered_entity_o365_params_team_entity_additional_params.go deleted file mode 100644 index 48884839..00000000 --- a/v1/models/registered_entity_o365_params_team_entity_additional_params.go +++ /dev/null @@ -1,52 +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" -) - -// RegisteredEntityO365ParamsTeamEntityAdditionalParams Encapsulates the additional params for kTeam entities. The caller should -// only populate this incase the 'discoverable_entity_type_vec' includes -// 'kTeams'. -// -// swagger:model RegisteredEntityO365Params_TeamEntityAdditionalParams -type RegisteredEntityO365ParamsTeamEntityAdditionalParams struct { - - // Flag which specifies whether teams's posts should be backed up. - AllowPostsBackup *bool `json:"allowPostsBackup,omitempty"` -} - -// Validate validates this registered entity o365 params team entity additional params -func (m *RegisteredEntityO365ParamsTeamEntityAdditionalParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity o365 params team entity additional params based on context it is used -func (m *RegisteredEntityO365ParamsTeamEntityAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityO365ParamsTeamEntityAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityO365ParamsTeamEntityAdditionalParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityO365ParamsTeamEntityAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_o365_params_user_entity_discovery_params.go b/v1/models/registered_entity_o365_params_user_entity_discovery_params.go deleted file mode 100644 index 9315c8f3..00000000 --- a/v1/models/registered_entity_o365_params_user_entity_discovery_params.go +++ /dev/null @@ -1,76 +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" -) - -// RegisteredEntityO365ParamsUserEntityDiscoveryParams Encapsulates the discovery params for kUser entities. The caller should -// only populate this incase the 'discoverable_entity_type_vec' includes -// 'kUsers'. -// -// swagger:model RegisteredEntityO365Params_UserEntityDiscoveryParams -type RegisteredEntityO365ParamsUserEntityDiscoveryParams struct { - - // Flag which specifies whether user's direct chats should be backed up. - AllowChatsBackup *bool `json:"allowChatsBackup,omitempty"` - - // Whether to discover Users with a valid mailbox. - DiscoverUsersWithMailbox *bool `json:"discoverUsersWithMailbox,omitempty"` - - // Whether to discover Users with a valid onedrive. - DiscoverUsersWithOnedrive *bool `json:"discoverUsersWithOnedrive,omitempty"` - - // If set to true, on source registration and refresh, Users Mailbox - // settings will be fetch and processed. - // Fetching Mailbox settings determines - // 1. Whether a user has a Mailbox provisioned or not. - // 2. If provisioned, will fetch the Mailbox Type (User, Shared etc..) - // 3. If In-Place Archve / Archive Mailbox is enabled or not. - FetchUsersMailboxInfo *bool `json:"fetchUsersMailboxInfo,omitempty"` - - // If set to true, on source registration and refresh, Users OneDrive info - // will be fetch and processed. - // Fetching OneDrive info determines - // 1. Whether a user has a OneDrive provisioned and initialized or not. - // 2. If provisioned, will fetch the Storage Quota (Total/Used). - FetchUsersOnedriveInfo *bool `json:"fetchUsersOnedriveInfo,omitempty"` - - // Skip OneDrive Users without mysite / drive un-initialized. - SkipUsersWithMissingOnedriveMysite *bool `json:"skipUsersWithMissingOnedriveMysite,omitempty"` -} - -// Validate validates this registered entity o365 params user entity discovery params -func (m *RegisteredEntityO365ParamsUserEntityDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this registered entity o365 params user entity discovery params based on context it is used -func (m *RegisteredEntityO365ParamsUserEntityDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityO365ParamsUserEntityDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityO365ParamsUserEntityDiscoveryParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityO365ParamsUserEntityDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_params.go b/v1/models/registered_entity_params.go deleted file mode 100644 index f961ceb5..00000000 --- a/v1/models/registered_entity_params.go +++ /dev/null @@ -1,1142 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityParams Contains all params specified by the user while registering the entity. -// -// swagger:model RegisteredEntityParams -type RegisteredEntityParams struct { - - // These params may be specified for Azure entities. - AzureParams *RegisteredEntityAzureParams `json:"azureParams,omitempty"` - - // Source level list of IP addresses that should not be used. - // - // NOTE: For Isilon and Netapp NAS sources it is passed from UI and used by - // magneto/bridge/proxies to avoid any IO to blacklisted IPs. - // It can be used by other sources as needed. - BlacklistedIPAddrs []string `json:"blacklistedIpAddrs"` - - // These params may be specified for cassandra entities. - CassandraParams *RegisteredEntityCassandraParams `json:"cassandraParams,omitempty"` - - // Source level configuration params. - ConfigVec []*ConfigurationParams `json:"configVec"` - - // 'network_realm_id' maintains the collection of connector_group_id. - // Connector group id for the environment. If it is set, Magneto will - // fetch the bifrost server based on . - // - // This field will be deprecated soon, please use connector_group_id - // instead. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // These params may be specified for couchbase entities. - CouchbaseParams *RegisteredEntityCouchbaseParams `json:"couchbaseParams,omitempty"` - - // An optional description of this entity. - Description *string `json:"description,omitempty"` - - // These params may be specified for generic NAS entities. - GenericNasParams *RegisteredEntityGenericNasParams `json:"genericNasParams,omitempty"` - - // These params may be specified for hbase entities. - HbaseParams *RegisteredEntityHBaseParams `json:"hbaseParams,omitempty"` - - // These params may be specified for hdfs entities. - HdfsParams *RegisteredEntityHdfsParams `json:"hdfsParams,omitempty"` - - // These params may be specified for hive entities. - HiveParams *RegisteredEntityHiveParams `json:"hiveParams,omitempty"` - - // If this entity has storage array snapshot enabled or not. - IsStorageArraySnapshotEnabled *bool `json:"isStorageArraySnapshotEnabled,omitempty"` - - // These params may be specified for Isilon entities. - IsilonParams *RegisteredEntityIsilonParams `json:"isilonParams,omitempty"` - - // Extra parameters needed for K8s registration. - KubernetesParams *RegisteredEntityKubernetesParams `json:"kubernetesParams,omitempty"` - - // These params may be specified for mongodb entities. - MongodbParams *RegisteredEntityMongoDBParams `json:"mongodbParams,omitempty"` - - // This is set to the id of the network-realm from where this source is - // reachable. This should only be set for a source being registered by a - // tenant user. - // - // This field will be deprecated soon, please use network_realm_info_vec - // instead. - NetworkRealmID *int64 `json:"networkRealmId,omitempty"` - - // Details about the network realm from where this source is reachable. This - // should only be set for a source being registered by a tenant user. - // This can also have network realm for non root entities, in these cases we - // should prefer using them instead of root's realm. - NetworkRealmInfoVec []*NetworkRealmInfo `json:"networkRealmInfoVec"` - - // These params may be specified for O365 entities. - O365Params *RegisteredEntityO365Params `json:"o365Params,omitempty"` - - // These params may be specified for physical entities. - PhysicalParams *RegisteredEntityPhysicalParams `json:"physicalParams,omitempty"` - - // These params may be specified for Sfdc entities. - SfdcParams *RegisteredEntitySfdcParams `json:"sfdcParams,omitempty"` - - // An optional space usage policy that can be applied to this entity. - SpaceUsagePolicy *SpaceUsagePolicy `json:"spaceUsagePolicy,omitempty"` - - // An optional throttling policy that should be applied to this entity. - ThrottlingPolicy *ThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // These params may be specified for uda entities. - UdaParams *RegisteredEntityUdaParams `json:"udaParams,omitempty"` - - // Contains the VLAN parameters specified by the user which will be used for - // taking the backup or restore. - // - // NOTE: This is only applicable for Physical hosts/cluster running Oracle - // but can be utilized by other sources too. - // During restore, user can override the same within 'restore_vlan_params' - // in 'CreateRestoreTaskArg'. - VlanParams *VlanParams `json:"vlanParams,omitempty"` - - // These params may be specified for VMware entities. - VmwareParams *RegisteredEntityVMwareParams `json:"vmwareParams,omitempty"` - - // Source level list of IP addresses that should be used exclusively. - WhitelistedIPAddrs []string `json:"whitelistedIpAddrs"` -} - -// Validate validates this registered entity params -func (m *RegisteredEntityParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkRealmInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpaceUsagePolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityParams) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateCassandraParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateConfigVec(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigVec) { // not required - return nil - } - - for i := 0; i < len(m.ConfigVec); i++ { - if swag.IsZero(m.ConfigVec[i]) { // not required - continue - } - - if m.ConfigVec[i] != nil { - if err := m.ConfigVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityParams) validateCouchbaseParams(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateGenericNasParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateHbaseParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateHdfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateHiveParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateMongodbParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateNetworkRealmInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkRealmInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.NetworkRealmInfoVec); i++ { - if swag.IsZero(m.NetworkRealmInfoVec[i]) { // not required - continue - } - - if m.NetworkRealmInfoVec[i] != nil { - if err := m.NetworkRealmInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityParams) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateSpaceUsagePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SpaceUsagePolicy) { // not required - return nil - } - - if m.SpaceUsagePolicy != nil { - if err := m.SpaceUsagePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spaceUsagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spaceUsagePolicy") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -func (m *RegisteredEntityParams) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity params based on the context it is used -func (m *RegisteredEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfigVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkRealmInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpaceUsagePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateConfigVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConfigVec); i++ { - - if m.ConfigVec[i] != nil { - - if swag.IsZero(m.ConfigVec[i]) { // not required - return nil - } - - if err := m.ConfigVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateNetworkRealmInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkRealmInfoVec); i++ { - - if m.NetworkRealmInfoVec[i] != nil { - - if swag.IsZero(m.NetworkRealmInfoVec[i]) { // not required - return nil - } - - if err := m.NetworkRealmInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkRealmInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateSpaceUsagePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SpaceUsagePolicy != nil { - - if swag.IsZero(m.SpaceUsagePolicy) { // not required - return nil - } - - if err := m.SpaceUsagePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spaceUsagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spaceUsagePolicy") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) 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 -} - -func (m *RegisteredEntityParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_physical_params.go b/v1/models/registered_entity_physical_params.go deleted file mode 100644 index b20d8685..00000000 --- a/v1/models/registered_entity_physical_params.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityPhysicalParams Contains all params specified by the user while registering a physical -// entity. -// -// swagger:model RegisteredEntityPhysicalParams -type RegisteredEntityPhysicalParams struct { - - // Application specific credentials vector. This may be needed in cases - // where after authorizing with the environment, separate authorization - // is needed to access an application in the environment (for example, - // kOracle where after authorizing with the database host, to access a - // database separate credentials are required). - AppCredentialsVec []*AppCredentials `json:"appCredentialsVec"` - - // A list of applications to be registered following a successful physical - // entity registration. - AppEnvVec []int32 `json:"appEnvVec"` - - // Credentials that will be used to log into the application environment. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Source side throttling configuration. - SourceThrottlingConfig *PrivateSourceThrottlingConfiguration `json:"sourceThrottlingConfig,omitempty"` -} - -// Validate validates this registered entity physical params -func (m *RegisteredEntityPhysicalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppCredentialsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityPhysicalParams) validateAppCredentialsVec(formats strfmt.Registry) error { - if swag.IsZero(m.AppCredentialsVec) { // not required - return nil - } - - for i := 0; i < len(m.AppCredentialsVec); i++ { - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - continue - } - - if m.AppCredentialsVec[i] != nil { - if err := m.AppCredentialsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityPhysicalParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityPhysicalParams) validateSourceThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SourceThrottlingConfig) { // not required - return nil - } - - if m.SourceThrottlingConfig != nil { - if err := m.SourceThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceThrottlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity physical params based on the context it is used -func (m *RegisteredEntityPhysicalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppCredentialsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityPhysicalParams) contextValidateAppCredentialsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppCredentialsVec); i++ { - - if m.AppCredentialsVec[i] != nil { - - if swag.IsZero(m.AppCredentialsVec[i]) { // not required - return nil - } - - if err := m.AppCredentialsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appCredentialsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityPhysicalParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityPhysicalParams) contextValidateSourceThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceThrottlingConfig != nil { - - if swag.IsZero(m.SourceThrottlingConfig) { // not required - return nil - } - - if err := m.SourceThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceThrottlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityPhysicalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityPhysicalParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityPhysicalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_report.go b/v1/models/registered_entity_report.go deleted file mode 100644 index 7bc369ac..00000000 --- a/v1/models/registered_entity_report.go +++ /dev/null @@ -1,118 +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" -) - -// RegisteredEntityReport RegisteredEntityReport is a struct for providing reports for registered -// entities. -// -// swagger:model RegisteredEntityReport -type RegisteredEntityReport struct { - - // EntityHierarchy is the protobuf for the registered entity. It will only - // contain top level registered entity without any children information. It - // also has other information like registration date and last refresh date. - EntityHierarchy *EntityHierarchyProto `json:"entityHierarchy,omitempty"` - - // JobIds is the list of Job Ids that are backing up the source. - JobIds []int64 `json:"jobIds"` - - // NumJobs is the number of jobs backing up the source. - NumJobs *int64 `json:"numJobs,omitempty"` -} - -// Validate validates this registered entity report -func (m *RegisteredEntityReport) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityHierarchy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityReport) validateEntityHierarchy(formats strfmt.Registry) error { - if swag.IsZero(m.EntityHierarchy) { // not required - return nil - } - - if m.EntityHierarchy != nil { - if err := m.EntityHierarchy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityHierarchy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityHierarchy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity report based on the context it is used -func (m *RegisteredEntityReport) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityHierarchy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityReport) contextValidateEntityHierarchy(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityHierarchy != nil { - - if swag.IsZero(m.EntityHierarchy) { // not required - return nil - } - - if err := m.EntityHierarchy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityHierarchy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityHierarchy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityReport) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityReport) UnmarshalBinary(b []byte) error { - var res RegisteredEntityReport - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_sfdc_params.go b/v1/models/registered_entity_sfdc_params.go deleted file mode 100644 index 6ba5ded1..00000000 --- a/v1/models/registered_entity_sfdc_params.go +++ /dev/null @@ -1,149 +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" -) - -// RegisteredEntitySfdcParams Contains all params specified by the user while registering a Sfdc -// source. -// -// swagger:model RegisteredEntitySfdcParams -type RegisteredEntitySfdcParams struct { - - // Token that will be used in subsequent api requests. - AccessToken *string `json:"accessToken,omitempty"` - - // Maximum daily api limit - APILimit *int64 `json:"apiLimit,omitempty"` - - // Token that will be used for fetching access_token from salesforce. - AuthToken *string `json:"authToken,omitempty"` - - // Callback URL that is required to fetch Access token from salesforce. - CallbackURL *string `json:"callbackUrl,omitempty"` - - // Concurrent API Request Limits. - ConcurrentReqLimit *int64 `json:"concurrentReqLimit,omitempty"` - - // Consumer key from the connected app in Sfdc. - ConsumerKey *string `json:"consumerKey,omitempty"` - - // Consumer secret from the connected app in Sfdc. - ConsumerSecret *string `json:"consumerSecret,omitempty"` - - // Credentials that will be used to log into the application environment. - Credentials *Credentials `json:"credentials,omitempty"` - - // Sfdc instance_url. Rename to instance_url later. - Endpoint *string `json:"endpoint,omitempty"` - - // endpoint type - EndpointType *int32 `json:"endpointType,omitempty"` - - // Metadata endpoint url. All metadata requests must be made to this url. - MetadataEndpointURL *string `json:"metadataEndpointUrl,omitempty"` - - // Token that will be used to refresh the access token. - RefreshToken *string `json:"refreshToken,omitempty"` - - // Soap endpoint url. All soap requests must be made to this url. - SoapEndpointURL *string `json:"soapEndpointUrl,omitempty"` - - // use bulk api if set to true - UseBulkAPI *bool `json:"useBulkApi,omitempty"` -} - -// Validate validates this registered entity sfdc params -func (m *RegisteredEntitySfdcParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntitySfdcParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity sfdc params based on the context it is used -func (m *RegisteredEntitySfdcParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntitySfdcParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntitySfdcParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntitySfdcParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntitySfdcParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_uda_params.go b/v1/models/registered_entity_uda_params.go deleted file mode 100644 index b3163566..00000000 --- a/v1/models/registered_entity_uda_params.go +++ /dev/null @@ -1,294 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityUdaParams Contains all params specified by the user while registering a UDA -// entity. -// -// swagger:model RegisteredEntityUdaParams -type RegisteredEntityUdaParams struct { - - // Types of backups supported. - Capabilities *UdaSourceCapabilities `json:"capabilities,omitempty"` - - // Credentials that will be used to log into the application environment. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // Deployment type for the UDA agent. - DeploymentType *int32 `json:"deploymentType,omitempty"` - - // Specifies whether to enable cohesity policy triggered log backups along - // with externally triggered backups. - // Only applicable if externally_triggered_log_backup is true. - EtEnableLogBackupPolicy *bool `json:"etEnableLogBackupPolicy,omitempty"` - - // Specifies if the user triggered (UI) runs are allowed along with - // externally triggered runs. - // Only applicable if externally_triggered_log_backup is true. - EtEnableRunNow *bool `json:"etEnableRunNow,omitempty"` - - // Indicate if a new view is required for full backups. - FreshFullBackupView *bool `json:"freshFullBackupView,omitempty"` - - // The agent host environment type. - HostType *int32 `json:"hostType,omitempty"` - - // List of hosts forming the UDA cluster. - Hosts []string `json:"hosts"` - - // Should use live view for data backup. - LiveDataView *bool `json:"liveDataView,omitempty"` - - // Should use live view for log backup. - LiveLogView *bool `json:"liveLogView,omitempty"` - - // Mount directory path to be used for writing the backup to. - MountDir *string `json:"mountDir,omitempty"` - - // Whether to mount a view during the source backup. - MountView *bool `json:"mountView,omitempty"` - - // Object levels. - ObjectTypes []string `json:"objectTypes"` - - // Specifies whether the source supports parallel log backups. - // Must be used with a live log view. - ParallelLogBackups *bool `json:"parallelLogBackups,omitempty"` - - // pre backup job script failure tolerance - PreBackupJobScriptFailureTolerance *int32 `json:"preBackupJobScriptFailureTolerance,omitempty"` - - // Control nodes to connect for control path ops. - PreferredControlNodes []string `json:"preferredControlNodes"` - - // Specifies whether the source disallows parallel data & log backups. - RestrictParallelDataLogBackups *bool `json:"restrictParallelDataLogBackups,omitempty"` - - // Path where various source scripts will be located. - ScriptDir *string `json:"scriptDir,omitempty"` - - // Custom arguments which will be provided to the source registration - // scripts. This is deprecated. Use source_args_map instead. - SourceArgs *string `json:"sourceArgs,omitempty"` - - // Map to store custom arguments which will be provided to the source - // registration scripts. - SourceArgumentsMap []*RegisteredEntityUdaParamsSourceArgumentsMapEntry `json:"sourceArgumentsMap"` - - // Universal Data Adapter (UDA) source type. - SourceType *string `json:"sourceType,omitempty"` - - // Should the live log view be created at the time of first full backup ? - // This will be passed to all data backups - // This is not the same as auto_log_backup, - // since this applies to scheduled log backups and has its limitations - StaticLiveLogView *bool `json:"staticLiveLogView,omitempty"` - - // Whether S3 views should be used for backup/retore. - UseS3View *bool `json:"useS3View,omitempty"` -} - -// Validate validates this registered entity uda params -func (m *RegisteredEntityUdaParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCapabilities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceArgumentsMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityUdaParams) validateCapabilities(formats strfmt.Registry) error { - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if m.Capabilities != nil { - if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityUdaParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityUdaParams) validateSourceArgumentsMap(formats strfmt.Registry) error { - if swag.IsZero(m.SourceArgumentsMap) { // not required - return nil - } - - for i := 0; i < len(m.SourceArgumentsMap); i++ { - if swag.IsZero(m.SourceArgumentsMap[i]) { // not required - continue - } - - if m.SourceArgumentsMap[i] != nil { - if err := m.SourceArgumentsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered entity uda params based on the context it is used -func (m *RegisteredEntityUdaParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCapabilities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceArgumentsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityUdaParams) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { - - if m.Capabilities != nil { - - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityUdaParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RegisteredEntityUdaParams) contextValidateSourceArgumentsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceArgumentsMap); i++ { - - if m.SourceArgumentsMap[i] != nil { - - if swag.IsZero(m.SourceArgumentsMap[i]) { // not required - return nil - } - - if err := m.SourceArgumentsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityUdaParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityUdaParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityUdaParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_uda_params_source_arguments_map_entry.go b/v1/models/registered_entity_uda_params_source_arguments_map_entry.go deleted file mode 100644 index a3fd5975..00000000 --- a/v1/models/registered_entity_uda_params_source_arguments_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// RegisteredEntityUdaParamsSourceArgumentsMapEntry registered entity uda params source arguments map entry -// -// swagger:model RegisteredEntityUdaParams_SourceArgumentsMapEntry -type RegisteredEntityUdaParamsSourceArgumentsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *UdaCustomArgument `json:"value,omitempty"` -} - -// Validate validates this registered entity uda params source arguments map entry -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) 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 -} - -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity uda params source arguments map entry based on the context it is used -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityUdaParamsSourceArgumentsMapEntry) UnmarshalBinary(b []byte) error { - var res RegisteredEntityUdaParamsSourceArgumentsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_v_c_d_params.go b/v1/models/registered_entity_v_c_d_params.go deleted file mode 100644 index b14ee31b..00000000 --- a/v1/models/registered_entity_v_c_d_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityVCDParams Contains all params specified by the user while registering a VCD entity. -// -// swagger:model RegisteredEntityVCDParams -type RegisteredEntityVCDParams struct { - - // vcenter info list - VcenterInfoList []*VCDVCenterInfo `json:"vcenterInfoList"` -} - -// Validate validates this registered entity v c d params -func (m *RegisteredEntityVCDParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcenterInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityVCDParams) validateVcenterInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.VcenterInfoList) { // not required - return nil - } - - for i := 0; i < len(m.VcenterInfoList); i++ { - if swag.IsZero(m.VcenterInfoList[i]) { // not required - continue - } - - if m.VcenterInfoList[i] != nil { - if err := m.VcenterInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered entity v c d params based on the context it is used -func (m *RegisteredEntityVCDParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVcenterInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityVCDParams) contextValidateVcenterInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VcenterInfoList); i++ { - - if m.VcenterInfoList[i] != nil { - - if swag.IsZero(m.VcenterInfoList[i]) { // not required - return nil - } - - if err := m.VcenterInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityVCDParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityVCDParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityVCDParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_v_mware_params.go b/v1/models/registered_entity_v_mware_params.go deleted file mode 100644 index fa5e5a04..00000000 --- a/v1/models/registered_entity_v_mware_params.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredEntityVMwareParams Contains all params specified by the user while registering a VMware entity. -// -// swagger:model RegisteredEntityVMwareParams -type RegisteredEntityVMwareParams struct { - - // This is set to true if VM linking feature is enabled for this VCenter. - // This means that VMs present in this VCenter which earlier belonged to some - // other VCenter(also registerd on same cluster) and were migrated, will be - // linked during EH refresh with an edge of type kVMMigrated. This will - // enable us to preserve snapshot chains for migrated VMs. - LinkVmsAcrossVcenter *bool `json:"linkVmsAcrossVcenter,omitempty"` - - // This option is specified for VMware environment where one of the VMKernel - // IP Addresses of the ESXi host that matches one of these subnets will be - // added to /etc/hosts file of the Cohesity cluster (on all nodes). - PreferredSubnetVec []*ClusterConfigProtoSubnet `json:"preferredSubnetVec"` - - // Storage snapshot providers source entities associated with this vCenter. - StorageSnapshotProviders []*PrivateEntityProto `json:"storageSnapshotProviders"` - - // This option is specified for VMware environment where it is instructed to - // use VM BIOS UUID instead of the vCenter UUID to track uniqueness of the - // VMs. - // NOTE: This can only be set at the time of registration and cannot be - // changed later. - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - // This may be specified for vCD entities. - VcdParams *RegisteredEntityVCDParams `json:"vcdParams,omitempty"` -} - -// Validate validates this registered entity v mware params -func (m *RegisteredEntityVMwareParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreferredSubnetVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageSnapshotProviders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityVMwareParams) validatePreferredSubnetVec(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredSubnetVec) { // not required - return nil - } - - for i := 0; i < len(m.PreferredSubnetVec); i++ { - if swag.IsZero(m.PreferredSubnetVec[i]) { // not required - continue - } - - if m.PreferredSubnetVec[i] != nil { - if err := m.PreferredSubnetVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredSubnetVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredSubnetVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityVMwareParams) validateStorageSnapshotProviders(formats strfmt.Registry) error { - if swag.IsZero(m.StorageSnapshotProviders) { // not required - return nil - } - - for i := 0; i < len(m.StorageSnapshotProviders); i++ { - if swag.IsZero(m.StorageSnapshotProviders[i]) { // not required - continue - } - - if m.StorageSnapshotProviders[i] != nil { - if err := m.StorageSnapshotProviders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityVMwareParams) validateVcdParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if m.VcdParams != nil { - if err := m.VcdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered entity v mware params based on the context it is used -func (m *RegisteredEntityVMwareParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreferredSubnetVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageSnapshotProviders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredEntityVMwareParams) contextValidatePreferredSubnetVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PreferredSubnetVec); i++ { - - if m.PreferredSubnetVec[i] != nil { - - if swag.IsZero(m.PreferredSubnetVec[i]) { // not required - return nil - } - - if err := m.PreferredSubnetVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredSubnetVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredSubnetVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityVMwareParams) contextValidateStorageSnapshotProviders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageSnapshotProviders); i++ { - - if m.StorageSnapshotProviders[i] != nil { - - if swag.IsZero(m.StorageSnapshotProviders[i]) { // not required - return nil - } - - if err := m.StorageSnapshotProviders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredEntityVMwareParams) contextValidateVcdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdParams != nil { - - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if err := m.VcdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredEntityVMwareParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredEntityVMwareParams) UnmarshalBinary(b []byte) error { - var res RegisteredEntityVMwareParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_protection_source_isilon_params.go b/v1/models/registered_protection_source_isilon_params.go deleted file mode 100644 index 720386e4..00000000 --- a/v1/models/registered_protection_source_isilon_params.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredProtectionSourceIsilonParams Registered Protection Source Isilon Parameters. -// -// Specifies the Isilon specific Registered Protection Source params. -// This definition is used to send isilion source params in update protection -// source params to magneto. -// -// swagger:model RegisteredProtectionSourceIsilonParams -type RegisteredProtectionSourceIsilonParams struct { - - // List of access zone info in an Isilion Cluster. - ZoneConfigList []*ZoneConfig `json:"zoneConfigList"` -} - -// Validate validates this registered protection source isilon params -func (m *RegisteredProtectionSourceIsilonParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateZoneConfigList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredProtectionSourceIsilonParams) validateZoneConfigList(formats strfmt.Registry) error { - if swag.IsZero(m.ZoneConfigList) { // not required - return nil - } - - for i := 0; i < len(m.ZoneConfigList); i++ { - if swag.IsZero(m.ZoneConfigList[i]) { // not required - continue - } - - if m.ZoneConfigList[i] != nil { - if err := m.ZoneConfigList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered protection source isilon params based on the context it is used -func (m *RegisteredProtectionSourceIsilonParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateZoneConfigList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredProtectionSourceIsilonParams) contextValidateZoneConfigList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ZoneConfigList); i++ { - - if m.ZoneConfigList[i] != nil { - - if swag.IsZero(m.ZoneConfigList[i]) { // not required - return nil - } - - if err := m.ZoneConfigList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("zoneConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("zoneConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredProtectionSourceIsilonParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredProtectionSourceIsilonParams) UnmarshalBinary(b []byte) error { - var res RegisteredProtectionSourceIsilonParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_source_info.go b/v1/models/registered_source_info.go deleted file mode 100644 index f083155b..00000000 --- a/v1/models/registered_source_info.go +++ /dev/null @@ -1,1414 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RegisteredSourceInfo Registered Source Info. -// -// Specifies information about a registered Source. -// -// swagger:model RegisteredSourceInfo -type RegisteredSourceInfo struct { - - // Specifies the parameters required to establish a connection - // with a particular environment. - AccessInfo *ConnectorParameters `json:"accessInfo,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be - // exclusively allowed for doing any type of IO operations. - AllowedIPAddresses []string `json:"allowedIpAddresses"` - - // Specifies an authentication error message. This indicates the given - // credentials are rejected and the registration of the source is not - // successful. - AuthenticationErrorMessage *string `json:"authenticationErrorMessage,omitempty"` - - // Specifies the status of the authenticating to the Protection Source - // when registering it with Cohesity Cluster. If the status is 'kFinished' - // and there is no error, registration is successful. - // Specifies the status of the authentication during the registration of a - // Protection Source. - // 'kPending' indicates the authentication is in progress. - // 'kScheduled' indicates the authentication is scheduled. - // 'kFinished' indicates the authentication is completed. - // 'kRefreshInProgress' indicates the refresh is in progress. - // Enum: ["kPending","kScheduled","kFinished","kRefreshInProgress"] - AuthenticationStatus *string `json:"authenticationStatus,omitempty"` - - // This field is deprecated. Use DeniedIpAddresses instead. - // deprecated: true - BlacklistedIPAddresses []string `json:"blacklistedIpAddresses"` - - // Contains all the additional params specified by the user while registering - // the Cassandra source. - CassandraParams *CassandraConnectParams `json:"cassandraParams,omitempty"` - - // Contains all the additional params specified by the user while registering - // the Couchbase source. - CouchbaseParams *CouchbaseConnectParams `json:"couchbaseParams,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be denied - // for doing any type of IO operations. - DeniedIPAddresses []string `json:"deniedIpAddresses"` - - // Specifies a list of applications environment that are registered - // with this Protection Source such as 'kSQL'. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - Environments []string `json:"environments"` - - // Contains all the additional params specified by the user while registering - // the HBase source. - HbaseParams *HBaseConnectParams `json:"hbaseParams,omitempty"` - - // Contains all the additional params specified by the user while registering - // the Hdfs source. - HdfsParams *HdfsConnectParams `json:"hdfsParams,omitempty"` - - // Contains all the additional params specified by the user while registering - // the Hive source. - HiveParams *HiveConnectParams `json:"hiveParams,omitempty"` - - // Specifies if application entity dbAuthenticated or not. - // ex: oracle database. - IsDbAuthenticated *bool `json:"isDbAuthenticated,omitempty"` - - // Specifies if this source entity has enabled storage array snapshot or not. - IsStorageArraySnapshotEnabled *bool `json:"isStorageArraySnapshotEnabled,omitempty"` - - // Contains all the registered source params specified by the user while - // configuring the Isilon source. - IsilonParams *RegisteredProtectionSourceIsilonParams `json:"isilonParams,omitempty"` - - // Specifies if the VM linking feature is enabled for this VCenter - // This means that VMs present in this VCenter which earlier belonged to some - // other VCenter(also registerd on same cluster) and were migrated, will be - // linked during EH refresh. This will enable preserving snapshot chains - // for migrated VMs. - LinkVmsAcrossVcenter *bool `json:"linkVmsAcrossVcenter,omitempty"` - - // Specifies the minimum free space in GiB of the space expected to be - // available on the datastore where the virtual disks of the VM being backed - // up. If the amount of free space(in GiB) is lower than the value given by - // this field, backup will be aborted. Note that this field is applicable - // only to 'kVMware' type of environments. - MinimumFreeSpaceGB *int64 `json:"minimumFreeSpaceGB,omitempty"` - - // Specifies the minimum free space in percentage of the space expected to be - // available on the datastore where the virtual disks of the VM being backed - // up. If the amount of free space(in percentage) is lower than the value - // given by this field, backup will be aborted. - // Note that this field is applicable only to 'kVMware' type of environments. - MinimumFreeSpacePercent *int64 `json:"minimumFreeSpacePercent,omitempty"` - - // Contains all the additional params specified by the user while registering - // the MongoDB source. - MongodbParams *MongoDBConnectParams `json:"mongodbParams,omitempty"` - - // nas mount credentials - NasMountCredentials *RegisteredSourceInfoNasMountCredentials `json:"nasMountCredentials,omitempty"` - - // Contains all the additional params specified by the user while registering - // the Office 365 source. - O365Params *O365ConnectParams `json:"o365Params,omitempty"` - - // Office365 Source Credentials. - // - // Specifies credentials needed to authenticate & authorize user for - // Office365. - Office365CredentialsList []*Office365Credentials `json:"office365CredentialsList"` - - // Specifies the region for Office365. Inorder to truly categorize M365 - // region, clients should not depend upon the endpoint, instead look at this - // attribute for the same. - Office365Region *string `json:"office365Region,omitempty"` - - // Office365 Service Account Credentials. - // - // Specifies credentials for improving mailbox backup performance for O365. - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Contains all the additional params specified by the user for source - // throttling configuration. - PhysicalParams *PhysicalParams `json:"physicalParams,omitempty"` - - // Captures the current progress and pulse details w.r.t to either the - // registration or refresh. - ProgressMonitorPath *string `json:"progressMonitorPath,omitempty"` - - // Specifies a message if there was any error encountered during the last - // rebuild of the Protection Source tree. If there was no error during the - // last rebuild, this field is reset. - RefreshErrorMessage *string `json:"refreshErrorMessage,omitempty"` - - // Specifies the Unix epoch time (in microseconds) when the Protection - // Source tree was most recently fetched and built. - RefreshTimeUsecs *int64 `json:"refreshTimeUsecs,omitempty"` - - // Specifies information of the applications registered on this protection - // source. - RegisteredAppsInfo []*RegisteredAppInfo `json:"registeredAppsInfo"` - - // Specifies the Unix epoch time (in microseconds) when the Protection - // Source was registered. - RegistrationTimeUsecs *int64 `json:"registrationTimeUsecs,omitempty"` - - // Contains all the additional params specified by the user while registering - // the Salesforce source. - SfdcParams *SfdcParams `json:"sfdcParams,omitempty"` - - // Specifies the list of subnets added during creation or updation of vmare - // source. Currently, this field will only be populated in case of VMware - // registration. - Subnets []*Subnet `json:"subnets"` - - // Specifies the throttling policy that should be applied to all datastores - // under this registered Protection Source. - ThrottlingPolicy *ThrottlingPolicyParameters `json:"throttlingPolicy,omitempty"` - - // Array of Throttling Policy Overrides for Datastores. - // - // Specifies a list of Throttling Policy for datastores that override the - // common throttling policy specified for the registered Protection Source. - // For datastores not in this list, common policy will still apply. - ThrottlingPolicyOverrides []*ThrottlingPolicyOverride `json:"throttlingPolicyOverrides"` - - // Contains all the additional params specified by the user while registering - // the Universal Data Adapter source. - UdaParams *UdaConnectParams `json:"udaParams,omitempty"` - - // Specifies whether OAuth should be used for authentication in case of - // Exchange Online. - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - // Specifies if registered vCenter is using BIOS UUID to track virtual - // machines. - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - // Specifies the additional details encountered during registration. - // Though the registration may succeed, user messages imply the - // host environment requires some cleanup or fixing. - UserMessages []string `json:"userMessages"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` - - // Specifies the VLAN parameters to be used for performing the backup/restore - // of this entity. - VlanParams *VlanParameters `json:"vlanParams,omitempty"` - - // Specifies a list of warnings encountered during registration. - // Though the registration may succeed, warning messages imply the - // host environment requires some cleanup or fixing. - WarningMessages []string `json:"warningMessages"` -} - -// Validate validates this registered source info -func (m *RegisteredSourceInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthenticationStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironments(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasMountCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365CredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365ServiceAccountCredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredAppsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicyOverrides(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredSourceInfo) validateAccessInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AccessInfo) { // not required - return nil - } - - if m.AccessInfo != nil { - if err := m.AccessInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessInfo") - } - return err - } - } - - return nil -} - -var registeredSourceInfoTypeAuthenticationStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPending","kScheduled","kFinished","kRefreshInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registeredSourceInfoTypeAuthenticationStatusPropEnum = append(registeredSourceInfoTypeAuthenticationStatusPropEnum, v) - } -} - -const ( - - // RegisteredSourceInfoAuthenticationStatusKPending captures enum value "kPending" - RegisteredSourceInfoAuthenticationStatusKPending string = "kPending" - - // RegisteredSourceInfoAuthenticationStatusKScheduled captures enum value "kScheduled" - RegisteredSourceInfoAuthenticationStatusKScheduled string = "kScheduled" - - // RegisteredSourceInfoAuthenticationStatusKFinished captures enum value "kFinished" - RegisteredSourceInfoAuthenticationStatusKFinished string = "kFinished" - - // RegisteredSourceInfoAuthenticationStatusKRefreshInProgress captures enum value "kRefreshInProgress" - RegisteredSourceInfoAuthenticationStatusKRefreshInProgress string = "kRefreshInProgress" -) - -// prop value enum -func (m *RegisteredSourceInfo) validateAuthenticationStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registeredSourceInfoTypeAuthenticationStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisteredSourceInfo) validateAuthenticationStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationStatus) { // not required - return nil - } - - // value enum - if err := m.validateAuthenticationStatusEnum("authenticationStatus", "body", *m.AuthenticationStatus); err != nil { - return err - } - - return nil -} - -func (m *RegisteredSourceInfo) validateCassandraParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateCouchbaseParams(formats strfmt.Registry) error { - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -var registeredSourceInfoEnvironmentsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registeredSourceInfoEnvironmentsItemsEnum = append(registeredSourceInfoEnvironmentsItemsEnum, v) - } -} - -func (m *RegisteredSourceInfo) validateEnvironmentsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registeredSourceInfoEnvironmentsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegisteredSourceInfo) validateEnvironments(formats strfmt.Registry) error { - if swag.IsZero(m.Environments) { // not required - return nil - } - - for i := 0; i < len(m.Environments); i++ { - - // value enum - if err := m.validateEnvironmentsItemsEnum("environments"+"."+strconv.Itoa(i), "body", m.Environments[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validateHbaseParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateHdfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateHiveParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateMongodbParams(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateNasMountCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.NasMountCredentials) { // not required - 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 -} - -func (m *RegisteredSourceInfo) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateOffice365CredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365CredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365CredentialsList); i++ { - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - continue - } - - if m.Office365CredentialsList[i] != nil { - if err := m.Office365CredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validateOffice365ServiceAccountCredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365ServiceAccountCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - continue - } - - if m.Office365ServiceAccountCredentialsList[i] != nil { - if err := m.Office365ServiceAccountCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateRegisteredAppsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredAppsInfo) { // not required - return nil - } - - for i := 0; i < len(m.RegisteredAppsInfo); i++ { - if swag.IsZero(m.RegisteredAppsInfo[i]) { // not required - continue - } - - if m.RegisteredAppsInfo[i] != nil { - if err := m.RegisteredAppsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredAppsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredAppsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateSubnets(formats strfmt.Registry) error { - if swag.IsZero(m.Subnets) { // not required - return nil - } - - for i := 0; i < len(m.Subnets); i++ { - if swag.IsZero(m.Subnets[i]) { // not required - continue - } - - if m.Subnets[i] != nil { - if err := m.Subnets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -func (m *RegisteredSourceInfo) validateThrottlingPolicyOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicyOverrides) { // not required - return nil - } - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - continue - } - - if m.ThrottlingPolicyOverrides[i] != nil { - if err := m.ThrottlingPolicyOverrides[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this registered source info based on the context it is used -func (m *RegisteredSourceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAccessInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasMountCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365CredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365ServiceAccountCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredAppsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicyOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredSourceInfo) contextValidateAccessInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AccessInfo != nil { - - if swag.IsZero(m.AccessInfo) { // not required - return nil - } - - if err := m.AccessInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessInfo") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -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 -} - -func (m *RegisteredSourceInfo) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateOffice365CredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365CredentialsList); i++ { - - if m.Office365CredentialsList[i] != nil { - - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - return nil - } - - if err := m.Office365CredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateOffice365ServiceAccountCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - - if m.Office365ServiceAccountCredentialsList[i] != nil { - - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - return nil - } - - if err := m.Office365ServiceAccountCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateRegisteredAppsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RegisteredAppsInfo); i++ { - - if m.RegisteredAppsInfo[i] != nil { - - if swag.IsZero(m.RegisteredAppsInfo[i]) { // not required - return nil - } - - if err := m.RegisteredAppsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredAppsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredAppsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateSubnets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Subnets); i++ { - - if m.Subnets[i] != nil { - - if swag.IsZero(m.Subnets[i]) { // not required - return nil - } - - if err := m.Subnets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) 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 -} - -func (m *RegisteredSourceInfo) contextValidateThrottlingPolicyOverrides(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - - if m.ThrottlingPolicyOverrides[i] != nil { - - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - return nil - } - - if err := m.ThrottlingPolicyOverrides[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *RegisteredSourceInfo) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredSourceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredSourceInfo) UnmarshalBinary(b []byte) error { - var res RegisteredSourceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_cluster.go b/v1/models/remote_cluster.go deleted file mode 100644 index dfc4e81e..00000000 --- a/v1/models/remote_cluster.go +++ /dev/null @@ -1,329 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteCluster Remote Cluster. -// -// Specifies information about a remote Cluster that has been registered -// for replication. -// -// swagger:model RemoteCluster -type RemoteCluster struct { - - // Specifies whether any endpoint (such as a Node) on the remote Cluster - // is reachable from this local Cluster. - // If true, a service running on the local Cluster can communicate - // directly with any of its peers running on the remote Cluster, without - // using a proxy. - AllEndpointsReachable *bool `json:"allEndpointsReachable,omitempty"` - - // Specifies whether the remote cluster needs to be kept in sync. - // This will be set to true by default. - AutoRegisterTarget *bool `json:"autoRegisterTarget,omitempty"` - - // Specifies whether the remote registration has happened automatically - // (due to registration on the other site). - // Can't think of other states (other than manually & automatically) so this - // isn't an enum. - // For a manual registration, this field will not be set. - AutoRegistration *bool `json:"autoRegistration,omitempty"` - - // Bandwidth Limit. - // - // Specifies settings for limiting the data transfer rate between - // the local and remote Clusters. - BandwidthLimit *BandwidthLimit `json:"bandwidthLimit,omitempty"` - - // Specifies the unique id of the remote Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the unique incarnation id of the remote Cluster. This - // id is determined dynamically by contacting the remote Cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies whether to compress the outbound data when - // transferring the replication data over the network to the remote Cluster. - CompressionEnabled *bool `json:"compressionEnabled,omitempty"` - - // Specifies any additional information if needed. - Description *string `json:"description,omitempty"` - - // Specifies the effective AES Encryption mode - // negotiated between local and the remote cluster. - EffectiveAesEncryptionMode *string `json:"effectiveAesEncryptionMode,omitempty"` - - // Specifies the encryption key used for encrypting the replication data - // from a local Cluster to a remote Cluster. - // If a key is not specified, replication traffic encryption is disabled. - // When Snapshots are replicated from a local Cluster to a remote Cluster, - // the encryption key specified on the local Cluster must be the same - // as the key specified on the remote Cluster. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Array of Local IP Addresses. - // - // Specifies the IP addresses of the interfaces in the local Cluster - // which will be used for communicating with the remote Cluster. - LocalIps []string `json:"localIps"` - - // Specifies if Multi-tenancy is enabled on the remote cluster. - MultiTenancyEnabled *bool `json:"multiTenancyEnabled,omitempty"` - - // Specifies the name of the remote cluster. This field is determined - // dynamically by contacting the remote cluster. - Name *string `json:"name,omitempty"` - - // Specifies the name of the network interfaces to use for communicating with - // the remote Cluster. - NetworkInterface *string `json:"networkInterface,omitempty"` - - // Whether the remote cluster will be used for remote access for SPOG. - PurposeRemoteAccess *bool `json:"purposeRemoteAccess,omitempty"` - - // Whether the remote cluster will be used for replication. - PurposeReplication *bool `json:"purposeReplication,omitempty"` - - // Optional field for the user credentials to connect to Iris for remote - // access for SPOG. If this is not specified, then credentials specified - // for replication set up will be used for remote access for SPOG. - // Allowing a different user credentials to be set up for SPOG permits - // having different roles for remote access for SPOG and replication set - // up. - RemoteAccessCredentials *AccessTokenCredential `json:"remoteAccessCredentials,omitempty"` - - // Array of Remote Node IP Addresses. - // - // Specifies the IP addresses of the Nodes on the remote Cluster to - // connect with. These IP addresses can also be VIPS. - // Specifying hostnames is not supported. - RemoteIps []string `json:"remoteIps"` - - // Specifies whether the Rx regiseter the Tx. - ReverseRegisted *bool `json:"reverseRegisted,omitempty"` - - // Specifies the AES Encryption mode of the remote cluster. - SupportedAesEncryptionMode *string `json:"supportedAesEncryptionMode,omitempty"` - - // Specifies the tenant Id of the organization that created this remote - // cluster configuration. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies if tenant ViewBox sharing is enabled on the remote cluster. - TenantViewBoxSharingEnabled *bool `json:"tenantViewBoxSharingEnabled,omitempty"` - - // Specifies the Cohesity user name used to connect to the - // remote Cluster. - UserName *string `json:"userName,omitempty"` - - // Array of Storage Domain (View Box) Pairs. - // - // Specifies pairings between Storage Domains (View Boxes) on the local Cluster - // with Storage Domains (View Boxes) on a remote Cluster that are used in - // replication. - ViewBoxPairInfo []*ViewBoxPairInfo `json:"viewBoxPairInfo"` -} - -// Validate validates this remote cluster -func (m *RemoteCluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBandwidthLimit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteAccessCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewBoxPairInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteCluster) validateBandwidthLimit(formats strfmt.Registry) error { - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if m.BandwidthLimit != nil { - if err := m.BandwidthLimit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -func (m *RemoteCluster) validateRemoteAccessCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteAccessCredentials) { // not required - return nil - } - - if m.RemoteAccessCredentials != nil { - if err := m.RemoteAccessCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAccessCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAccessCredentials") - } - return err - } - } - - return nil -} - -func (m *RemoteCluster) validateViewBoxPairInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ViewBoxPairInfo) { // not required - return nil - } - - for i := 0; i < len(m.ViewBoxPairInfo); i++ { - if swag.IsZero(m.ViewBoxPairInfo[i]) { // not required - continue - } - - if m.ViewBoxPairInfo[i] != nil { - if err := m.ViewBoxPairInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remote cluster based on the context it is used -func (m *RemoteCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBandwidthLimit(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteAccessCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewBoxPairInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteCluster) contextValidateBandwidthLimit(ctx context.Context, formats strfmt.Registry) error { - - if m.BandwidthLimit != nil { - - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if err := m.BandwidthLimit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -func (m *RemoteCluster) contextValidateRemoteAccessCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteAccessCredentials != nil { - - if swag.IsZero(m.RemoteAccessCredentials) { // not required - return nil - } - - if err := m.RemoteAccessCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAccessCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAccessCredentials") - } - return err - } - } - - return nil -} - -func (m *RemoteCluster) contextValidateViewBoxPairInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewBoxPairInfo); i++ { - - if m.ViewBoxPairInfo[i] != nil { - - if swag.IsZero(m.ViewBoxPairInfo[i]) { // not required - return nil - } - - if err := m.ViewBoxPairInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewBoxPairInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteCluster) UnmarshalBinary(b []byte) error { - var res RemoteCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_host.go b/v1/models/remote_host.go deleted file mode 100644 index 0b2dfe08..00000000 --- a/v1/models/remote_host.go +++ /dev/null @@ -1,178 +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" -) - -// RemoteHost Remote Host. -// -// Specifies the settings required to connect to a remote host. -// -// swagger:model RemoteHost -type RemoteHost struct { - - // Specifies the address (IP, hostname or FQDN) of the remote host - // that will run the script. - Address *string `json:"address,omitempty"` - - // Specifies the OS type of the remote host that will run the script. - // Currently only 'kLinux' is supported. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this remote host -func (m *RemoteHost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteHostTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteHostTypeTypePropEnum = append(remoteHostTypeTypePropEnum, v) - } -} - -const ( - - // RemoteHostTypeKLinux captures enum value "kLinux" - RemoteHostTypeKLinux string = "kLinux" - - // RemoteHostTypeKWindows captures enum value "kWindows" - RemoteHostTypeKWindows string = "kWindows" - - // RemoteHostTypeKAix captures enum value "kAix" - RemoteHostTypeKAix string = "kAix" - - // RemoteHostTypeKSolaris captures enum value "kSolaris" - RemoteHostTypeKSolaris string = "kSolaris" - - // RemoteHostTypeKSapHana captures enum value "kSapHana" - RemoteHostTypeKSapHana string = "kSapHana" - - // RemoteHostTypeKSapOracle captures enum value "kSapOracle" - RemoteHostTypeKSapOracle string = "kSapOracle" - - // RemoteHostTypeKCockroachDB captures enum value "kCockroachDB" - RemoteHostTypeKCockroachDB string = "kCockroachDB" - - // RemoteHostTypeKMySQL captures enum value "kMySQL" - RemoteHostTypeKMySQL string = "kMySQL" - - // RemoteHostTypeKOther captures enum value "kOther" - RemoteHostTypeKOther string = "kOther" - - // RemoteHostTypeKSapSybase captures enum value "kSapSybase" - RemoteHostTypeKSapSybase string = "kSapSybase" - - // RemoteHostTypeKSapMaxDB captures enum value "kSapMaxDB" - RemoteHostTypeKSapMaxDB string = "kSapMaxDB" - - // RemoteHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - RemoteHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // RemoteHostTypeKDB2 captures enum value "kDB2" - RemoteHostTypeKDB2 string = "kDB2" - - // RemoteHostTypeKSapASE captures enum value "kSapASE" - RemoteHostTypeKSapASE string = "kSapASE" - - // RemoteHostTypeKMariaDB captures enum value "kMariaDB" - RemoteHostTypeKMariaDB string = "kMariaDB" - - // RemoteHostTypeKPostgreSQL captures enum value "kPostgreSQL" - RemoteHostTypeKPostgreSQL string = "kPostgreSQL" - - // RemoteHostTypeKVOS captures enum value "kVOS" - RemoteHostTypeKVOS string = "kVOS" - - // RemoteHostTypeKHPUX captures enum value "kHPUX" - RemoteHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *RemoteHost) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteHostTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteHost) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this remote host based on context it is used -func (m *RemoteHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteHost) UnmarshalBinary(b []byte) error { - var res RemoteHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_host_connector_params.go b/v1/models/remote_host_connector_params.go deleted file mode 100644 index a6453a8f..00000000 --- a/v1/models/remote_host_connector_params.go +++ /dev/null @@ -1,118 +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" -) - -// RemoteHostConnectorParams Contains parameters to connect to a remote host. -// -// swagger:model RemoteHostConnectorParams -type RemoteHostConnectorParams struct { - - // Credentials that will be used to login to the remote host. For env of - // type kLinux, it is expected that user has setup the password-less access - // to the remote host. So only username field MUST be specified. - Credentials *Credentials `json:"credentials,omitempty"` - - // Address (i.e., IP, hostname or FQDN) of the host to connect to. Magneto - // will connect using ssh or equivalent to the host. - HostAddress *string `json:"hostAddress,omitempty"` - - // Type of host to connect to. - HostType *int32 `json:"hostType,omitempty"` -} - -// Validate validates this remote host connector params -func (m *RemoteHostConnectorParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteHostConnectorParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this remote host connector params based on the context it is used -func (m *RemoteHostConnectorParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteHostConnectorParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteHostConnectorParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteHostConnectorParams) UnmarshalBinary(b []byte) error { - var res RemoteHostConnectorParams - 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 deleted file mode 100644 index 3067d223..00000000 --- a/v1/models/remote_job_script.go +++ /dev/null @@ -1,270 +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" -) - -// RemoteJobScript Remote Adapter. -// -// Provides details about the Remote Adapter associated with a -// 'kPuppeteer' Protection Job. -// -// 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"` - - // 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 - // password-less access. So only username field is required. - Username *string `json:"username,omitempty"` -} - -// Validate validates this remote job script -func (m *RemoteJobScript) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteHost(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteJobScript) validateFullBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupScript) { // not required - 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 -} - -func (m *RemoteJobScript) validateIncrementalBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalBackupScript) { // not required - 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 -} - -func (m *RemoteJobScript) validateLogBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.LogBackupScript) { // not required - 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 -} - -func (m *RemoteJobScript) validateRemoteHost(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteHost) { // not required - 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 -} - -// ContextValidate validate this remote job script based on the context it is used -func (m *RemoteJobScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFullBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteHost(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteJobScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteJobScript) UnmarshalBinary(b []byte) error { - var res RemoteJobScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index aaf89433..00000000 --- a/v1/models/remote_protection_job_information.go +++ /dev/null @@ -1,358 +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" -) - -// RemoteProtectionJobInformation Remote Protection Job Information. -// -// Specifies details about the original Protection Job and its -// Snapshots, that were archived to a remote Vault. -// -// swagger:model RemoteProtectionJobInformation -type RemoteProtectionJobInformation struct { - - // Specifies the name of the original Cluster that archived the data to the - // Vault. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the environment type (such as kVMware or kSQL) - // of the original archived Protection Job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the name of the Protection Job on the original Cluster. - JobName *string `json:"jobName,omitempty"` - - // job Uid - JobUID *RemoteProtectionJobInformationJobUID `json:"jobUid,omitempty"` -} - -// Validate validates this remote protection job information -func (m *RemoteProtectionJobInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteProtectionJobInformationTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteProtectionJobInformationTypeEnvironmentPropEnum = append(remoteProtectionJobInformationTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RemoteProtectionJobInformationEnvironmentKVMware captures enum value "kVMware" - RemoteProtectionJobInformationEnvironmentKVMware string = "kVMware" - - // RemoteProtectionJobInformationEnvironmentKHyperV captures enum value "kHyperV" - RemoteProtectionJobInformationEnvironmentKHyperV string = "kHyperV" - - // RemoteProtectionJobInformationEnvironmentKSQL captures enum value "kSQL" - RemoteProtectionJobInformationEnvironmentKSQL string = "kSQL" - - // RemoteProtectionJobInformationEnvironmentKView captures enum value "kView" - RemoteProtectionJobInformationEnvironmentKView string = "kView" - - // RemoteProtectionJobInformationEnvironmentKPuppeteer captures enum value "kPuppeteer" - RemoteProtectionJobInformationEnvironmentKPuppeteer string = "kPuppeteer" - - // RemoteProtectionJobInformationEnvironmentKPhysical captures enum value "kPhysical" - RemoteProtectionJobInformationEnvironmentKPhysical string = "kPhysical" - - // RemoteProtectionJobInformationEnvironmentKPure captures enum value "kPure" - RemoteProtectionJobInformationEnvironmentKPure string = "kPure" - - // RemoteProtectionJobInformationEnvironmentKNimble captures enum value "kNimble" - RemoteProtectionJobInformationEnvironmentKNimble string = "kNimble" - - // RemoteProtectionJobInformationEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RemoteProtectionJobInformationEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RemoteProtectionJobInformationEnvironmentKAzure captures enum value "kAzure" - RemoteProtectionJobInformationEnvironmentKAzure string = "kAzure" - - // RemoteProtectionJobInformationEnvironmentKNetapp captures enum value "kNetapp" - RemoteProtectionJobInformationEnvironmentKNetapp string = "kNetapp" - - // RemoteProtectionJobInformationEnvironmentKAgent captures enum value "kAgent" - RemoteProtectionJobInformationEnvironmentKAgent string = "kAgent" - - // RemoteProtectionJobInformationEnvironmentKGenericNas captures enum value "kGenericNas" - RemoteProtectionJobInformationEnvironmentKGenericNas string = "kGenericNas" - - // RemoteProtectionJobInformationEnvironmentKAcropolis captures enum value "kAcropolis" - RemoteProtectionJobInformationEnvironmentKAcropolis string = "kAcropolis" - - // RemoteProtectionJobInformationEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RemoteProtectionJobInformationEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RemoteProtectionJobInformationEnvironmentKIsilon captures enum value "kIsilon" - RemoteProtectionJobInformationEnvironmentKIsilon string = "kIsilon" - - // RemoteProtectionJobInformationEnvironmentKGPFS captures enum value "kGPFS" - RemoteProtectionJobInformationEnvironmentKGPFS string = "kGPFS" - - // RemoteProtectionJobInformationEnvironmentKKVM captures enum value "kKVM" - RemoteProtectionJobInformationEnvironmentKKVM string = "kKVM" - - // RemoteProtectionJobInformationEnvironmentKAWS captures enum value "kAWS" - RemoteProtectionJobInformationEnvironmentKAWS string = "kAWS" - - // RemoteProtectionJobInformationEnvironmentKExchange captures enum value "kExchange" - RemoteProtectionJobInformationEnvironmentKExchange string = "kExchange" - - // RemoteProtectionJobInformationEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RemoteProtectionJobInformationEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RemoteProtectionJobInformationEnvironmentKOracle captures enum value "kOracle" - RemoteProtectionJobInformationEnvironmentKOracle string = "kOracle" - - // RemoteProtectionJobInformationEnvironmentKGCP captures enum value "kGCP" - RemoteProtectionJobInformationEnvironmentKGCP string = "kGCP" - - // RemoteProtectionJobInformationEnvironmentKFlashBlade captures enum value "kFlashBlade" - RemoteProtectionJobInformationEnvironmentKFlashBlade string = "kFlashBlade" - - // RemoteProtectionJobInformationEnvironmentKAWSNative captures enum value "kAWSNative" - RemoteProtectionJobInformationEnvironmentKAWSNative string = "kAWSNative" - - // RemoteProtectionJobInformationEnvironmentKO365 captures enum value "kO365" - RemoteProtectionJobInformationEnvironmentKO365 string = "kO365" - - // RemoteProtectionJobInformationEnvironmentKO365Outlook captures enum value "kO365Outlook" - RemoteProtectionJobInformationEnvironmentKO365Outlook string = "kO365Outlook" - - // RemoteProtectionJobInformationEnvironmentKHyperFlex captures enum value "kHyperFlex" - RemoteProtectionJobInformationEnvironmentKHyperFlex string = "kHyperFlex" - - // RemoteProtectionJobInformationEnvironmentKGCPNative captures enum value "kGCPNative" - RemoteProtectionJobInformationEnvironmentKGCPNative string = "kGCPNative" - - // RemoteProtectionJobInformationEnvironmentKAzureNative captures enum value "kAzureNative" - RemoteProtectionJobInformationEnvironmentKAzureNative string = "kAzureNative" - - // RemoteProtectionJobInformationEnvironmentKKubernetes captures enum value "kKubernetes" - RemoteProtectionJobInformationEnvironmentKKubernetes string = "kKubernetes" - - // RemoteProtectionJobInformationEnvironmentKElastifile captures enum value "kElastifile" - RemoteProtectionJobInformationEnvironmentKElastifile string = "kElastifile" - - // RemoteProtectionJobInformationEnvironmentKAD captures enum value "kAD" - RemoteProtectionJobInformationEnvironmentKAD string = "kAD" - - // RemoteProtectionJobInformationEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RemoteProtectionJobInformationEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RemoteProtectionJobInformationEnvironmentKCassandra captures enum value "kCassandra" - RemoteProtectionJobInformationEnvironmentKCassandra string = "kCassandra" - - // RemoteProtectionJobInformationEnvironmentKMongoDB captures enum value "kMongoDB" - RemoteProtectionJobInformationEnvironmentKMongoDB string = "kMongoDB" - - // RemoteProtectionJobInformationEnvironmentKCouchbase captures enum value "kCouchbase" - RemoteProtectionJobInformationEnvironmentKCouchbase string = "kCouchbase" - - // RemoteProtectionJobInformationEnvironmentKHdfs captures enum value "kHdfs" - RemoteProtectionJobInformationEnvironmentKHdfs string = "kHdfs" - - // RemoteProtectionJobInformationEnvironmentKHive captures enum value "kHive" - RemoteProtectionJobInformationEnvironmentKHive string = "kHive" - - // RemoteProtectionJobInformationEnvironmentKHBase captures enum value "kHBase" - RemoteProtectionJobInformationEnvironmentKHBase string = "kHBase" - - // RemoteProtectionJobInformationEnvironmentKUDA captures enum value "kUDA" - RemoteProtectionJobInformationEnvironmentKUDA string = "kUDA" - - // RemoteProtectionJobInformationEnvironmentKO365Teams captures enum value "kO365Teams" - RemoteProtectionJobInformationEnvironmentKO365Teams string = "kO365Teams" - - // RemoteProtectionJobInformationEnvironmentKO365Group captures enum value "kO365Group" - RemoteProtectionJobInformationEnvironmentKO365Group string = "kO365Group" - - // RemoteProtectionJobInformationEnvironmentKO365Exchange captures enum value "kO365Exchange" - RemoteProtectionJobInformationEnvironmentKO365Exchange string = "kO365Exchange" - - // RemoteProtectionJobInformationEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RemoteProtectionJobInformationEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RemoteProtectionJobInformationEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RemoteProtectionJobInformationEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RemoteProtectionJobInformationEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RemoteProtectionJobInformationEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RemoteProtectionJobInformation) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteProtectionJobInformationTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteProtectionJobInformation) 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 -} - -func (m *RemoteProtectionJobInformation) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this remote protection job information based on the context it is used -func (m *RemoteProtectionJobInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobInformation) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index 14fa5c84..00000000 --- a/v1/models/remote_protection_job_run_information.go +++ /dev/null @@ -1,423 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RemoteProtectionJobRunInformation Remote Protection Job Run Information. -// -// Specifies details about a Protection Job Runs (Snapshots). -// -// swagger:model RemoteProtectionJobRunInformation -type RemoteProtectionJobRunInformation struct { - - // Specifies the name of the original Cluster that archived the data to the - // Vault. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the environment type (such as kVMware or kSQL) - // of the original archived Protection Job. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the name of the Protection Job on the original Cluster. - JobName *string `json:"jobName,omitempty"` - - // job Uid - JobUID *RemoteProtectionJobRunInformationJobUID `json:"jobUid,omitempty"` - - // Array of Protection Job Run Details. - // - // Specifies the list of Protection Job Runs (Snapshot) details for - // a Protection Job archived to a Vault. - ProtectionJobRuns []*RemoteProtectionJobRunInstance `json:"protectionJobRuns"` -} - -// Validate validates this remote protection job run information -func (m *RemoteProtectionJobRunInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJobRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteProtectionJobRunInformationTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteProtectionJobRunInformationTypeEnvironmentPropEnum = append(remoteProtectionJobRunInformationTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RemoteProtectionJobRunInformationEnvironmentKVMware captures enum value "kVMware" - RemoteProtectionJobRunInformationEnvironmentKVMware string = "kVMware" - - // RemoteProtectionJobRunInformationEnvironmentKHyperV captures enum value "kHyperV" - RemoteProtectionJobRunInformationEnvironmentKHyperV string = "kHyperV" - - // RemoteProtectionJobRunInformationEnvironmentKSQL captures enum value "kSQL" - RemoteProtectionJobRunInformationEnvironmentKSQL string = "kSQL" - - // RemoteProtectionJobRunInformationEnvironmentKView captures enum value "kView" - RemoteProtectionJobRunInformationEnvironmentKView string = "kView" - - // RemoteProtectionJobRunInformationEnvironmentKPuppeteer captures enum value "kPuppeteer" - RemoteProtectionJobRunInformationEnvironmentKPuppeteer string = "kPuppeteer" - - // RemoteProtectionJobRunInformationEnvironmentKPhysical captures enum value "kPhysical" - RemoteProtectionJobRunInformationEnvironmentKPhysical string = "kPhysical" - - // RemoteProtectionJobRunInformationEnvironmentKPure captures enum value "kPure" - RemoteProtectionJobRunInformationEnvironmentKPure string = "kPure" - - // RemoteProtectionJobRunInformationEnvironmentKNimble captures enum value "kNimble" - RemoteProtectionJobRunInformationEnvironmentKNimble string = "kNimble" - - // RemoteProtectionJobRunInformationEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RemoteProtectionJobRunInformationEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RemoteProtectionJobRunInformationEnvironmentKAzure captures enum value "kAzure" - RemoteProtectionJobRunInformationEnvironmentKAzure string = "kAzure" - - // RemoteProtectionJobRunInformationEnvironmentKNetapp captures enum value "kNetapp" - RemoteProtectionJobRunInformationEnvironmentKNetapp string = "kNetapp" - - // RemoteProtectionJobRunInformationEnvironmentKAgent captures enum value "kAgent" - RemoteProtectionJobRunInformationEnvironmentKAgent string = "kAgent" - - // RemoteProtectionJobRunInformationEnvironmentKGenericNas captures enum value "kGenericNas" - RemoteProtectionJobRunInformationEnvironmentKGenericNas string = "kGenericNas" - - // RemoteProtectionJobRunInformationEnvironmentKAcropolis captures enum value "kAcropolis" - RemoteProtectionJobRunInformationEnvironmentKAcropolis string = "kAcropolis" - - // RemoteProtectionJobRunInformationEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RemoteProtectionJobRunInformationEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RemoteProtectionJobRunInformationEnvironmentKIsilon captures enum value "kIsilon" - RemoteProtectionJobRunInformationEnvironmentKIsilon string = "kIsilon" - - // RemoteProtectionJobRunInformationEnvironmentKGPFS captures enum value "kGPFS" - RemoteProtectionJobRunInformationEnvironmentKGPFS string = "kGPFS" - - // RemoteProtectionJobRunInformationEnvironmentKKVM captures enum value "kKVM" - RemoteProtectionJobRunInformationEnvironmentKKVM string = "kKVM" - - // RemoteProtectionJobRunInformationEnvironmentKAWS captures enum value "kAWS" - RemoteProtectionJobRunInformationEnvironmentKAWS string = "kAWS" - - // RemoteProtectionJobRunInformationEnvironmentKExchange captures enum value "kExchange" - RemoteProtectionJobRunInformationEnvironmentKExchange string = "kExchange" - - // RemoteProtectionJobRunInformationEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RemoteProtectionJobRunInformationEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RemoteProtectionJobRunInformationEnvironmentKOracle captures enum value "kOracle" - RemoteProtectionJobRunInformationEnvironmentKOracle string = "kOracle" - - // RemoteProtectionJobRunInformationEnvironmentKGCP captures enum value "kGCP" - RemoteProtectionJobRunInformationEnvironmentKGCP string = "kGCP" - - // RemoteProtectionJobRunInformationEnvironmentKFlashBlade captures enum value "kFlashBlade" - RemoteProtectionJobRunInformationEnvironmentKFlashBlade string = "kFlashBlade" - - // RemoteProtectionJobRunInformationEnvironmentKAWSNative captures enum value "kAWSNative" - RemoteProtectionJobRunInformationEnvironmentKAWSNative string = "kAWSNative" - - // RemoteProtectionJobRunInformationEnvironmentKO365 captures enum value "kO365" - RemoteProtectionJobRunInformationEnvironmentKO365 string = "kO365" - - // RemoteProtectionJobRunInformationEnvironmentKO365Outlook captures enum value "kO365Outlook" - RemoteProtectionJobRunInformationEnvironmentKO365Outlook string = "kO365Outlook" - - // RemoteProtectionJobRunInformationEnvironmentKHyperFlex captures enum value "kHyperFlex" - RemoteProtectionJobRunInformationEnvironmentKHyperFlex string = "kHyperFlex" - - // RemoteProtectionJobRunInformationEnvironmentKGCPNative captures enum value "kGCPNative" - RemoteProtectionJobRunInformationEnvironmentKGCPNative string = "kGCPNative" - - // RemoteProtectionJobRunInformationEnvironmentKAzureNative captures enum value "kAzureNative" - RemoteProtectionJobRunInformationEnvironmentKAzureNative string = "kAzureNative" - - // RemoteProtectionJobRunInformationEnvironmentKKubernetes captures enum value "kKubernetes" - RemoteProtectionJobRunInformationEnvironmentKKubernetes string = "kKubernetes" - - // RemoteProtectionJobRunInformationEnvironmentKElastifile captures enum value "kElastifile" - RemoteProtectionJobRunInformationEnvironmentKElastifile string = "kElastifile" - - // RemoteProtectionJobRunInformationEnvironmentKAD captures enum value "kAD" - RemoteProtectionJobRunInformationEnvironmentKAD string = "kAD" - - // RemoteProtectionJobRunInformationEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RemoteProtectionJobRunInformationEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RemoteProtectionJobRunInformationEnvironmentKCassandra captures enum value "kCassandra" - RemoteProtectionJobRunInformationEnvironmentKCassandra string = "kCassandra" - - // RemoteProtectionJobRunInformationEnvironmentKMongoDB captures enum value "kMongoDB" - RemoteProtectionJobRunInformationEnvironmentKMongoDB string = "kMongoDB" - - // RemoteProtectionJobRunInformationEnvironmentKCouchbase captures enum value "kCouchbase" - RemoteProtectionJobRunInformationEnvironmentKCouchbase string = "kCouchbase" - - // RemoteProtectionJobRunInformationEnvironmentKHdfs captures enum value "kHdfs" - RemoteProtectionJobRunInformationEnvironmentKHdfs string = "kHdfs" - - // RemoteProtectionJobRunInformationEnvironmentKHive captures enum value "kHive" - RemoteProtectionJobRunInformationEnvironmentKHive string = "kHive" - - // RemoteProtectionJobRunInformationEnvironmentKHBase captures enum value "kHBase" - RemoteProtectionJobRunInformationEnvironmentKHBase string = "kHBase" - - // RemoteProtectionJobRunInformationEnvironmentKUDA captures enum value "kUDA" - RemoteProtectionJobRunInformationEnvironmentKUDA string = "kUDA" - - // RemoteProtectionJobRunInformationEnvironmentKO365Teams captures enum value "kO365Teams" - RemoteProtectionJobRunInformationEnvironmentKO365Teams string = "kO365Teams" - - // RemoteProtectionJobRunInformationEnvironmentKO365Group captures enum value "kO365Group" - RemoteProtectionJobRunInformationEnvironmentKO365Group string = "kO365Group" - - // RemoteProtectionJobRunInformationEnvironmentKO365Exchange captures enum value "kO365Exchange" - RemoteProtectionJobRunInformationEnvironmentKO365Exchange string = "kO365Exchange" - - // RemoteProtectionJobRunInformationEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RemoteProtectionJobRunInformationEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RemoteProtectionJobRunInformationEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RemoteProtectionJobRunInformationEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RemoteProtectionJobRunInformationEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RemoteProtectionJobRunInformationEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RemoteProtectionJobRunInformation) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteProtectionJobRunInformationTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteProtectionJobRunInformation) 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 -} - -func (m *RemoteProtectionJobRunInformation) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *RemoteProtectionJobRunInformation) validateProtectionJobRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobRuns) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobRuns); i++ { - if swag.IsZero(m.ProtectionJobRuns[i]) { // not required - continue - } - - if m.ProtectionJobRuns[i] != nil { - if err := m.ProtectionJobRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remote protection job run information based on the context it is used -func (m *RemoteProtectionJobRunInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJobRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *RemoteProtectionJobRunInformation) contextValidateProtectionJobRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobRuns); i++ { - - if m.ProtectionJobRuns[i] != nil { - - if swag.IsZero(m.ProtectionJobRuns[i]) { // not required - return nil - } - - if err := m.ProtectionJobRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobRunInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobRunInformation) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobRunInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index 3e655bcd..00000000 --- a/v1/models/remote_protection_job_run_instance.go +++ /dev/null @@ -1,200 +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" -) - -// RemoteProtectionJobRunInstance Remote Protection Job Run Instance. -// -// Specifies details about one Job Run (Snapshot) archived to a remote Vault -// that was captured by a Protection Job. -// -// swagger:model RemoteProtectionJobRunInstance -type RemoteProtectionJobRunInstance struct { - - // archive task Uid - ArchiveTaskUID *RemoteProtectionJobRunInstanceArchiveTaskUID `json:"archiveTaskUid,omitempty"` - - // Specifies the version of the archive. - ArchiveVersion *int32 `json:"archiveVersion,omitempty"` - - // Specifies the time when the archive expires. - // This time is recorded as a Unix epoch Timestamp (in microseconds). - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the size of the index for the archive. - IndexSizeBytes *int64 `json:"indexSizeBytes,omitempty"` - - // Specifies the instance id of the Job Run task capturing the Snapshot. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies whether a full set of metadata is available now. - MetadataComplete *bool `json:"metadataComplete,omitempty"` - - // Specifies the run type. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - RunType *string `json:"runType,omitempty"` - - // Specify the time the Snapshot was captured as a Unix epoch Timestamp (in - // microseconds). - SnapshotTimeUsecs *int64 `json:"snapshotTimeUsecs,omitempty"` -} - -// Validate validates this remote protection job run instance -func (m *RemoteProtectionJobRunInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteProtectionJobRunInstance) validateArchiveTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUID) { // not required - 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 -} - -var remoteProtectionJobRunInstanceTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteProtectionJobRunInstanceTypeRunTypePropEnum = append(remoteProtectionJobRunInstanceTypeRunTypePropEnum, v) - } -} - -const ( - - // RemoteProtectionJobRunInstanceRunTypeKRegular captures enum value "kRegular" - RemoteProtectionJobRunInstanceRunTypeKRegular string = "kRegular" - - // RemoteProtectionJobRunInstanceRunTypeKFull captures enum value "kFull" - RemoteProtectionJobRunInstanceRunTypeKFull string = "kFull" - - // RemoteProtectionJobRunInstanceRunTypeKLog captures enum value "kLog" - RemoteProtectionJobRunInstanceRunTypeKLog string = "kLog" - - // RemoteProtectionJobRunInstanceRunTypeKSystem captures enum value "kSystem" - RemoteProtectionJobRunInstanceRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *RemoteProtectionJobRunInstance) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteProtectionJobRunInstanceTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteProtectionJobRunInstance) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this remote protection job run instance based on the context it is used -func (m *RemoteProtectionJobRunInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchiveTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobRunInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobRunInstance) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobRunInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index f28cc398..00000000 --- a/v1/models/remote_restore_indexing_status.go +++ /dev/null @@ -1,209 +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" -) - -// RemoteRestoreIndexingStatus Status of Indexing Task. -// -// Specifies the status of an indexing task. -// -// swagger:model RemoteRestoreIndexingStatus -type RemoteRestoreIndexingStatus struct { - - // Specifies the end time of the time range that is being indexed. - // The indexing task is creating an index of the Job Runs that occurred - // between the startTimeUsecs and this endTimeUsecs. - // This field is recorded as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the error message if the indexing Job/task fails. - Error *string `json:"error,omitempty"` - - // Specifies when the indexing task completed. This time is recorded - // as a Unix epoch Timestamp (in microseconds). - // This field is not set if the indexing task is still in progress. - IndexingTaskEndTimeUsecs *int64 `json:"indexingTaskEndTimeUsecs,omitempty"` - - // Specifies when the indexing task started. This time is recorded - // as a Unix epoch Timestamp (in microseconds). - IndexingTaskStartTimeUsecs *int64 `json:"indexingTaskStartTimeUsecs,omitempty"` - - // Specifies the status of the indexing Job/task. - // 'kJobRunning' indicates that the Job/task is currently running. - // 'kJobFinished' indicates that the Job/task completed and finished. - // 'kJobFailed' indicates that the Job/task failed and did not complete. - // 'kJobCanceled' indicates that the Job/task was canceled. - // 'kJobPaused' indicates the Job/task is paused. - // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] - IndexingTaskStatus *string `json:"indexingTaskStatus,omitempty"` - - // indexing task Uid - IndexingTaskUID *RemoteRestoreIndexingStatusIndexingTaskUID `json:"indexingTaskUid,omitempty"` - - // For all the Snapshots retrieved by this Job, specifies the latest time - // when a Snapshot expires. - LatestExpiryTimeUsecs *int64 `json:"latestExpiryTimeUsecs,omitempty"` - - // Specifies the path to progress monitor task to track the progress - // of building the index. - ProgressMonitorTask *string `json:"progressMonitorTask,omitempty"` - - // Specifies the start time of the time range that is being indexed. - // The indexing task is creating an index of the Job Runs that occurred - // between this startTimeUsecs and the endTimeUsecs. - // This field is recorded as a Unix epoch Timestamp (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this remote restore indexing status -func (m *RemoteRestoreIndexingStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingTaskStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteRestoreIndexingStatusTypeIndexingTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteRestoreIndexingStatusTypeIndexingTaskStatusPropEnum = append(remoteRestoreIndexingStatusTypeIndexingTaskStatusPropEnum, v) - } -} - -const ( - - // RemoteRestoreIndexingStatusIndexingTaskStatusKJobRunning captures enum value "kJobRunning" - RemoteRestoreIndexingStatusIndexingTaskStatusKJobRunning string = "kJobRunning" - - // RemoteRestoreIndexingStatusIndexingTaskStatusKJobFinished captures enum value "kJobFinished" - RemoteRestoreIndexingStatusIndexingTaskStatusKJobFinished string = "kJobFinished" - - // RemoteRestoreIndexingStatusIndexingTaskStatusKJobFailed captures enum value "kJobFailed" - RemoteRestoreIndexingStatusIndexingTaskStatusKJobFailed string = "kJobFailed" - - // RemoteRestoreIndexingStatusIndexingTaskStatusKJobCanceled captures enum value "kJobCanceled" - RemoteRestoreIndexingStatusIndexingTaskStatusKJobCanceled string = "kJobCanceled" - - // RemoteRestoreIndexingStatusIndexingTaskStatusKJobPaused captures enum value "kJobPaused" - RemoteRestoreIndexingStatusIndexingTaskStatusKJobPaused string = "kJobPaused" -) - -// prop value enum -func (m *RemoteRestoreIndexingStatus) validateIndexingTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteRestoreIndexingStatusTypeIndexingTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteRestoreIndexingStatus) validateIndexingTaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingTaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateIndexingTaskStatusEnum("indexingTaskStatus", "body", *m.IndexingTaskStatus); err != nil { - return err - } - - return nil -} - -func (m *RemoteRestoreIndexingStatus) validateIndexingTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingTaskUID) { // not required - 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 -} - -// ContextValidate validate this remote restore indexing status based on the context it is used -func (m *RemoteRestoreIndexingStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteRestoreIndexingStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteRestoreIndexingStatus) UnmarshalBinary(b []byte) error { - var res RemoteRestoreIndexingStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index e8fdcfa8..00000000 --- a/v1/models/remote_restore_snapshot_status.go +++ /dev/null @@ -1,254 +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" -) - -// RemoteRestoreSnapshotStatus Status of Restore Snapshot Task. -// -// Specifies the status of a restore Snapshot task. -// -// swagger:model RemoteRestoreSnapshotStatus -type RemoteRestoreSnapshotStatus struct { - - // Specifies when the snapshot task started. This time is recorded - // as a Unix epoch Timestamp (in microseconds). - SnapshotTaskStartTimeUsecs *int64 `json:"SnapshotTaskStartTimeUsecs,omitempty"` - - // archive task Uid - ArchiveTaskUID *RemoteRestoreSnapshotStatusArchiveTaskUID `json:"archiveTaskUid,omitempty"` - - // Specifies the error message if the indexing task fails. - Error *string `json:"error,omitempty"` - - // Specifies the time when the Snapshot expires on the remote Vault. - // This field is recorded as a Unix epoch Timestamp (in microseconds). - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the id of the Job Run that originally captured the Snapshot. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the path to the progress monitor task that tracks the progress - // of building the index. - ProgressMonitorTask *string `json:"progressMonitorTask,omitempty"` - - // Specifies when the snapshot task completed. This time is recorded - // as a Unix epoch Timestamp (in microseconds). - SnapshotTaskEndTimeUsecs *int64 `json:"snapshotTaskEndTimeUsecs,omitempty"` - - // Specifies the status of the indexing task. - // 'kJobRunning' indicates that the Job/task is currently running. - // 'kJobFinished' indicates that the Job/task completed and finished. - // 'kJobFailed' indicates that the Job/task failed and did not complete. - // 'kJobCanceled' indicates that the Job/task was canceled. - // 'kJobPaused' indicates the Job/task is paused. - // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] - SnapshotTaskStatus *string `json:"snapshotTaskStatus,omitempty"` - - // snapshot task Uid - SnapshotTaskUID *RemoteRestoreSnapshotStatusSnapshotTaskUID `json:"snapshotTaskUid,omitempty"` - - // Specify the time the Snapshot was captured. - // This time is recorded as a Unix epoch Timestamp (in microseconds). - SnapshotTimeUsecs *int64 `json:"snapshotTimeUsecs,omitempty"` -} - -// Validate validates this remote restore snapshot status -func (m *RemoteRestoreSnapshotStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTaskStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteRestoreSnapshotStatus) validateArchiveTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUID) { // not required - 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 -} - -var remoteRestoreSnapshotStatusTypeSnapshotTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteRestoreSnapshotStatusTypeSnapshotTaskStatusPropEnum = append(remoteRestoreSnapshotStatusTypeSnapshotTaskStatusPropEnum, v) - } -} - -const ( - - // RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobRunning captures enum value "kJobRunning" - RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobRunning string = "kJobRunning" - - // RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobFinished captures enum value "kJobFinished" - RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobFinished string = "kJobFinished" - - // RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobFailed captures enum value "kJobFailed" - RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobFailed string = "kJobFailed" - - // RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobCanceled captures enum value "kJobCanceled" - RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobCanceled string = "kJobCanceled" - - // RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobPaused captures enum value "kJobPaused" - RemoteRestoreSnapshotStatusSnapshotTaskStatusKJobPaused string = "kJobPaused" -) - -// prop value enum -func (m *RemoteRestoreSnapshotStatus) validateSnapshotTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteRestoreSnapshotStatusTypeSnapshotTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteRestoreSnapshotStatus) validateSnapshotTaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotTaskStatusEnum("snapshotTaskStatus", "body", *m.SnapshotTaskStatus); err != nil { - return err - } - - return nil -} - -func (m *RemoteRestoreSnapshotStatus) validateSnapshotTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTaskUID) { // not required - 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 -} - -// ContextValidate validate this remote restore snapshot status based on the context it is used -func (m *RemoteRestoreSnapshotStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchiveTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatus) UnmarshalBinary(b []byte) error { - var res RemoteRestoreSnapshotStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_script_path_and_params.go b/v1/models/remote_script_path_and_params.go deleted file mode 100644 index db55ac0b..00000000 --- a/v1/models/remote_script_path_and_params.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/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteScriptPathAndParams Remote Script. -// -// Specifies the path to the remote script and any parameters -// expected by the remote script. -// -// swagger:model RemoteScriptPathAndParams -type RemoteScriptPathAndParams struct { - - // Specifies if the script needs to continue even if there is an occurence of - // an error. If this flag is set to true, then backup job will start even if - // the pre backup script fails. Applicable only for pre backup scripts. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies if the script is active. If set to false, this script will not - // be executed even if it is part of the backup job. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies the parameters and values to pass into the remote script. - // For example if the script expects values for the 'database' and - // 'user' parameters, specify the parameters and values using - // the following string: "database=myDatabase user=me". - ScriptParams *string `json:"scriptParams,omitempty"` - - // Specifies the path to the script on the remote host. - ScriptPath *string `json:"scriptPath,omitempty"` - - // Specifies the timeout of the script in seconds. The script will be killed - // if it exceeds this value. If the value of the field is '-1' then timeout - // is not set for the script. - TimeoutSecs *int32 `json:"timeoutSecs,omitempty"` -} - -// Validate validates this remote script path and params -func (m *RemoteScriptPathAndParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this remote script path and params based on context it is used -func (m *RemoteScriptPathAndParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteScriptPathAndParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteScriptPathAndParams) UnmarshalBinary(b []byte) error { - var res RemoteScriptPathAndParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_script_proto.go b/v1/models/remote_script_proto.go deleted file mode 100644 index ad7fca81..00000000 --- a/v1/models/remote_script_proto.go +++ /dev/null @@ -1,266 +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" -) - -// RemoteScriptProto Message to encapsulate the information of script that can be executed either -// before or after the backup is taken. -// -// swagger:model RemoteScriptProto -type RemoteScriptProto struct { - - // Connector params for the remote host where script is located and is - // executed. - RemoteHostParams *RemoteHostConnectorParams `json:"remoteHostParams,omitempty"` - - // Contains script path and its optional params. For AWS, Azure and GCP this - // will have script details for machines using bash. - Script *ScriptPathAndParams `json:"script,omitempty"` - - // Execution status of the script. - Status *ScriptExecutionStatus `json:"status,omitempty"` - - // Contains script path and its optional params. For AWS, Azure and GCP this - // will have script details for machines using powershell. - WindowsScript *ScriptPathAndParams `json:"windowsScript,omitempty"` -} - -// Validate validates this remote script proto -func (m *RemoteScriptProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteHostParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWindowsScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteScriptProto) validateRemoteHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteHostParams) { // not required - return nil - } - - if m.RemoteHostParams != nil { - if err := m.RemoteHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHostParams") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) validateScript(formats strfmt.Registry) error { - if swag.IsZero(m.Script) { // not required - return nil - } - - if m.Script != nil { - if err := m.Script.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("script") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("script") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) validateWindowsScript(formats strfmt.Registry) error { - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if m.WindowsScript != nil { - if err := m.WindowsScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this remote script proto based on the context it is used -func (m *RemoteScriptProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWindowsScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteScriptProto) contextValidateRemoteHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteHostParams != nil { - - if swag.IsZero(m.RemoteHostParams) { // not required - return nil - } - - if err := m.RemoteHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHostParams") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) contextValidateScript(ctx context.Context, formats strfmt.Registry) error { - - if m.Script != nil { - - if swag.IsZero(m.Script) { // not required - return nil - } - - if err := m.Script.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("script") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("script") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *RemoteScriptProto) contextValidateWindowsScript(ctx context.Context, formats strfmt.Registry) error { - - if m.WindowsScript != nil { - - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if err := m.WindowsScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteScriptProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteScriptProto) UnmarshalBinary(b []byte) error { - var res RemoteScriptProto - 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 deleted file mode 100644 index 7b309a00..00000000 --- a/v1/models/remote_vault_restore_task_status.go +++ /dev/null @@ -1,379 +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" -) - -// RemoteVaultRestoreTaskStatus Remote Vault Restore Task Status. -// -// Specifies the status of a remote Vault restore task. -// -// 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"` - - // Remote Protection Job Information. - // - // Specifies the details about the original Protection Job that archived data - // to the remote Vault (External Target). - RemoteProtectionJobInformation *RemoteProtectionJobInformation `json:"remoteProtectionJobInformation,omitempty"` - - // search job Uid - SearchJobUID *RemoteVaultRestoreTaskStatusSearchJobUID `json:"searchJobUid,omitempty"` - - // Vault Id - // - // Specifies the Id of the vault from which the restore is going on. - VaultID *int64 `json:"vaultId,omitempty"` - - // Vault Name - // - // Specifies the name of the vault from which the restore is going on. - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this remote vault restore task status -func (m *RemoteVaultRestoreTaskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCurrentIndexingStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentSnapshotStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalProtectionJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteProtectionJobInformation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteVaultRestoreTaskStatus) validateCurrentIndexingStatus(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentIndexingStatus) { // not required - 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 -} - -func (m *RemoteVaultRestoreTaskStatus) validateCurrentSnapshotStatus(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentSnapshotStatus) { // not required - 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 -} - -func (m *RemoteVaultRestoreTaskStatus) validateLocalProtectionJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.LocalProtectionJobUID) { // not required - 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 -} - -func (m *RemoteVaultRestoreTaskStatus) validateParentJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentJobUID) { // not required - 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 -} - -func (m *RemoteVaultRestoreTaskStatus) validateRemoteProtectionJobInformation(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteProtectionJobInformation) { // not required - return nil - } - - if m.RemoteProtectionJobInformation != nil { - if err := m.RemoteProtectionJobInformation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteProtectionJobInformation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteProtectionJobInformation") - } - return err - } - } - - return nil -} - -func (m *RemoteVaultRestoreTaskStatus) validateSearchJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobUID) { // not required - 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 -} - -// ContextValidate validate this remote vault restore task status based on the context it is used -func (m *RemoteVaultRestoreTaskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCurrentIndexingStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCurrentSnapshotStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalProtectionJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteProtectionJobInformation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -func (m *RemoteVaultRestoreTaskStatus) contextValidateRemoteProtectionJobInformation(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteProtectionJobInformation != nil { - - if swag.IsZero(m.RemoteProtectionJobInformation) { // not required - return nil - } - - if err := m.RemoteProtectionJobInformation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteProtectionJobInformation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteProtectionJobInformation") - } - return err - } - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatus) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatus - 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_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 deleted file mode 100644 index c5a8958d..00000000 --- a/v1/models/remote_vault_search_job_information.go +++ /dev/null @@ -1,215 +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" -) - -// RemoteVaultSearchJobInformation Remote Vault Search Information. -// -// Specifies information about a search of a remote Vault. -// -// swagger:model RemoteVaultSearchJobInformation -type RemoteVaultSearchJobInformation struct { - - // Specifies number of Clusters that have archived to the remote Vault - // and match the search criteria for this job, up to this point - // in the search. - // If the search is complete, the total number of Clusters that have - // archived to the remote Vault and that match the search criteria - // for this search Job, are reported. - // If the search is not complete, a partial number is reported. - ClusterCount *int32 `json:"clusterCount,omitempty"` - - // Specifies the end time of the search as a Unix epoch - // Timestamp (in microseconds) if the search Job has completed. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the error message reported when a search fails. - Error *string `json:"error,omitempty"` - - // Specifies number of Protection Jobs that have archived to the remote Vault - // and match the search criteria for this search Job, up to this point - // in the search. - // If the search is complete, the total number of Protection Jobs that have - // archived to the remote Vault and that match the search criteria - // for this search Job, are reported. - // If the search is not complete, a partial number is reported. - JobCount *int32 `json:"jobCount,omitempty"` - - // Specifies the name of the search Job. - Name *string `json:"name,omitempty"` - - // Specifies the status of the search. - // 'kJobRunning' indicates that the Job/task is currently running. - // 'kJobFinished' indicates that the Job/task completed and finished. - // 'kJobFailed' indicates that the Job/task failed and did not complete. - // 'kJobCanceled' indicates that the Job/task was canceled. - // 'kJobPaused' indicates the Job/task is paused. - // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] - SearchJobStatus *string `json:"searchJobStatus,omitempty"` - - // search job Uid - SearchJobUID *RemoteVaultSearchJobInformationSearchJobUID `json:"searchJobUid,omitempty"` - - // Specifies the start time of the search as a Unix epoch - // Timestamp (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the id of the remote Vault (External Target) that was searched. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the name of the remote Vault (External Target) that was searched. - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this remote vault search job information -func (m *RemoteVaultSearchJobInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchJobStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteVaultSearchJobInformationTypeSearchJobStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteVaultSearchJobInformationTypeSearchJobStatusPropEnum = append(remoteVaultSearchJobInformationTypeSearchJobStatusPropEnum, v) - } -} - -const ( - - // RemoteVaultSearchJobInformationSearchJobStatusKJobRunning captures enum value "kJobRunning" - RemoteVaultSearchJobInformationSearchJobStatusKJobRunning string = "kJobRunning" - - // RemoteVaultSearchJobInformationSearchJobStatusKJobFinished captures enum value "kJobFinished" - RemoteVaultSearchJobInformationSearchJobStatusKJobFinished string = "kJobFinished" - - // RemoteVaultSearchJobInformationSearchJobStatusKJobFailed captures enum value "kJobFailed" - RemoteVaultSearchJobInformationSearchJobStatusKJobFailed string = "kJobFailed" - - // RemoteVaultSearchJobInformationSearchJobStatusKJobCanceled captures enum value "kJobCanceled" - RemoteVaultSearchJobInformationSearchJobStatusKJobCanceled string = "kJobCanceled" - - // RemoteVaultSearchJobInformationSearchJobStatusKJobPaused captures enum value "kJobPaused" - RemoteVaultSearchJobInformationSearchJobStatusKJobPaused string = "kJobPaused" -) - -// prop value enum -func (m *RemoteVaultSearchJobInformation) validateSearchJobStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteVaultSearchJobInformationTypeSearchJobStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteVaultSearchJobInformation) validateSearchJobStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobStatus) { // not required - return nil - } - - // value enum - if err := m.validateSearchJobStatusEnum("searchJobStatus", "body", *m.SearchJobStatus); err != nil { - return err - } - - return nil -} - -func (m *RemoteVaultSearchJobInformation) validateSearchJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobUID) { // not required - 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 -} - -// ContextValidate validate this remote vault search job information based on the context it is used -func (m *RemoteVaultSearchJobInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteVaultSearchJobInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultSearchJobInformation) UnmarshalBinary(b []byte) error { - var res RemoteVaultSearchJobInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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 deleted file mode 100644 index c19b9bd1..00000000 --- a/v1/models/remote_vault_search_job_results.go +++ /dev/null @@ -1,293 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RemoteVaultSearchJobResults Remote Vault Search Job Result. -// -// Specifies detailed information about Job Runs of Protection Jobs found -// by a search Job when searching a remote Vault for archived data. -// -// swagger:model RemoteVaultSearchJobResults -type RemoteVaultSearchJobResults struct { - - // Specifies number of Clusters that have archived to the remote Vault - // that match the criteria specified in the search Job, - // up to this point in the search. - // If the search is complete, the total number of Clusters that have - // archived to the remote Vault and that match the search criteria - // for the search Job, are reported. - // If the search was not complete, a partial number is reported. - ClusterCount *int32 `json:"clusterCount,omitempty"` - - // Specifies the value of the clusterMatchSting if it was set in the - // original search Job. - ClusterMatchString *string `json:"clusterMatchString,omitempty"` - - // Specifies an opaque string to pass to the next request to get the - // next set of search results. This is provided to support pagination. - // If null, this is the last set of search results. - Cookie *string `json:"cookie,omitempty"` - - // Specifies the value of endTimeUsecs if it was set in the original - // search Job. End time is recorded as a Unix epoch Timestamp - // (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the error message if the search fails. - Error *string `json:"error,omitempty"` - - // Specifies number of Protection Jobs that have archived to the remote Vault - // that match the criteria specified in the search Job. - // If the search is complete, the total number of Protection Jobs that have - // archived to the remote Vault and match the search criteria - // for the search Job, are reported. - // If the search is not complete, a partial number is reported. - JobCount *int32 `json:"jobCount,omitempty"` - - // Specifies the value of the jobMatchSting if it was set in the - // original search Job. - JobMatchString *string `json:"jobMatchString,omitempty"` - - // Array of Protection Jobs. - // - // Specifies a list of Protection Jobs that have archived data to a - // remote Vault and that also match the filter criteria. - ProtectionJobs []*RemoteProtectionJobRunInformation `json:"protectionJobs"` - - // Specifies the status of the search Job. - // 'kJobRunning' indicates that the Job/task is currently running. - // 'kJobFinished' indicates that the Job/task completed and finished. - // 'kJobFailed' indicates that the Job/task failed and did not complete. - // 'kJobCanceled' indicates that the Job/task was canceled. - // 'kJobPaused' indicates the Job/task is paused. - // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] - SearchJobStatus *string `json:"searchJobStatus,omitempty"` - - // search job Uid - SearchJobUID *RemoteVaultSearchJobResultsSearchJobUID `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 - // (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the id of the remote Vault that was searched. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the name of the remote Vault that was searched. - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this remote vault search job results -func (m *RemoteVaultSearchJobResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionJobs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteVaultSearchJobResults) validateProtectionJobs(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobs) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobs); i++ { - if swag.IsZero(m.ProtectionJobs[i]) { // not required - continue - } - - if m.ProtectionJobs[i] != nil { - if err := m.ProtectionJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var remoteVaultSearchJobResultsTypeSearchJobStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteVaultSearchJobResultsTypeSearchJobStatusPropEnum = append(remoteVaultSearchJobResultsTypeSearchJobStatusPropEnum, v) - } -} - -const ( - - // RemoteVaultSearchJobResultsSearchJobStatusKJobRunning captures enum value "kJobRunning" - RemoteVaultSearchJobResultsSearchJobStatusKJobRunning string = "kJobRunning" - - // RemoteVaultSearchJobResultsSearchJobStatusKJobFinished captures enum value "kJobFinished" - RemoteVaultSearchJobResultsSearchJobStatusKJobFinished string = "kJobFinished" - - // RemoteVaultSearchJobResultsSearchJobStatusKJobFailed captures enum value "kJobFailed" - RemoteVaultSearchJobResultsSearchJobStatusKJobFailed string = "kJobFailed" - - // RemoteVaultSearchJobResultsSearchJobStatusKJobCanceled captures enum value "kJobCanceled" - RemoteVaultSearchJobResultsSearchJobStatusKJobCanceled string = "kJobCanceled" - - // RemoteVaultSearchJobResultsSearchJobStatusKJobPaused captures enum value "kJobPaused" - RemoteVaultSearchJobResultsSearchJobStatusKJobPaused string = "kJobPaused" -) - -// prop value enum -func (m *RemoteVaultSearchJobResults) validateSearchJobStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteVaultSearchJobResultsTypeSearchJobStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteVaultSearchJobResults) validateSearchJobStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobStatus) { // not required - return nil - } - - // value enum - if err := m.validateSearchJobStatusEnum("searchJobStatus", "body", *m.SearchJobStatus); err != nil { - return err - } - - return nil -} - -func (m *RemoteVaultSearchJobResults) validateSearchJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobUID) { // not required - 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 -} - -// ContextValidate validate this remote vault search job results based on the context it is used -func (m *RemoteVaultSearchJobResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteVaultSearchJobResults) contextValidateProtectionJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobs); i++ { - - if m.ProtectionJobs[i] != nil { - - if swag.IsZero(m.ProtectionJobs[i]) { // not required - return nil - } - - if err := m.ProtectionJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RemoteVaultSearchJobResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultSearchJobResults) UnmarshalBinary(b []byte) error { - var res RemoteVaultSearchJobResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/remote_view_config.go b/v1/models/remote_view_config.go deleted file mode 100644 index 648361e4..00000000 --- a/v1/models/remote_view_config.go +++ /dev/null @@ -1,61 +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" -) - -// RemoteViewConfig Specifies the remote view config for a view protected in a view job. This -// field is only used when the view job has a replication policy. -// -// swagger:model RemoteViewConfig -type RemoteViewConfig struct { - - // Specifies the view Id of the view protected by the view protection job. - SourceViewID *int64 `json:"sourceViewId,omitempty"` - - // Specifies if the remote view name is same as the source view name. If this - // field is true, viewName is ignored as the remote view name is same as the - // source view name. - UseSameViewName *bool `json:"useSameViewName,omitempty"` - - // Specifies the remote view name of the view protected by a view protection - // job. If UseSameViewName is set to false, this field provides the remote - // view name to be used in the remote cluster. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this remote view config -func (m *RemoteViewConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this remote view config based on context it is used -func (m *RemoteViewConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteViewConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteViewConfig) UnmarshalBinary(b []byte) error { - var res RemoteViewConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/rename_object_param_proto.go b/v1/models/rename_object_param_proto.go deleted file mode 100644 index 0fb6f044..00000000 --- a/v1/models/rename_object_param_proto.go +++ /dev/null @@ -1,55 +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" -) - -// RenameObjectParamProto Message to specify the prefix/suffix added to rename an object. At least one -// of prefix or suffix must be specified. Please note that both prefix and -// suffix can be specified. -// -// swagger:model RenameObjectParamProto -type RenameObjectParamProto struct { - - // Prefix to be added to a name. - Prefix *string `json:"prefix,omitempty"` - - // Suffix to be added to a name. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this rename object param proto -func (m *RenameObjectParamProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this rename object param proto based on context it is used -func (m *RenameObjectParamProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RenameObjectParamProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RenameObjectParamProto) UnmarshalBinary(b []byte) error { - var res RenameObjectParamProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/rename_view_param.go b/v1/models/rename_view_param.go deleted file mode 100644 index d932644e..00000000 --- a/v1/models/rename_view_param.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" -) - -// RenameViewParam Rename View Parameters. -// -// Specifies the rename parameters for the view. -// -// swagger:model RenameViewParam -type RenameViewParam struct { - - // Specifies the new name of the View. - // Required: true - NewViewName *string `json:"newViewName"` -} - -// Validate validates this rename view param -func (m *RenameViewParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewViewName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RenameViewParam) validateNewViewName(formats strfmt.Registry) error { - - if err := validate.Required("newViewName", "body", m.NewViewName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rename view param based on context it is used -func (m *RenameViewParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RenameViewParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RenameViewParam) UnmarshalBinary(b []byte) error { - var res RenameViewParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replica_info.go b/v1/models/replica_info.go deleted file mode 100644 index 4c2cdb26..00000000 --- a/v1/models/replica_info.go +++ /dev/null @@ -1,166 +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" -) - -// ReplicaInfo Replica Info. -// -// Specifies the Replication information about a snapshot. -// -// swagger:model ReplicaInfo -type ReplicaInfo struct { - - // Specifies the expiration time of the snapshot within the target location. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the snapshot target settings for the given snapshot. - SnapshotTargetSettings *SnapshotTargetSettings `json:"snapshotTargetSettings,omitempty"` - - // Specifies a global Protection Job id that is unique across Cohesity - // Clusters. - UID *UniversalID `json:"uid,omitempty"` -} - -// Validate validates this replica info -func (m *ReplicaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTargetSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicaInfo) validateSnapshotTargetSettings(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetSettings) { // not required - return nil - } - - if m.SnapshotTargetSettings != nil { - if err := m.SnapshotTargetSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargetSettings") - } - return err - } - } - - return nil -} - -func (m *ReplicaInfo) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -// ContextValidate validate this replica info based on the context it is used -func (m *ReplicaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotTargetSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicaInfo) contextValidateSnapshotTargetSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTargetSettings != nil { - - if swag.IsZero(m.SnapshotTargetSettings) { // not required - return nil - } - - if err := m.SnapshotTargetSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTargetSettings") - } - return err - } - } - - return nil -} - -func (m *ReplicaInfo) 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 -} - -// MarshalBinary interface implementation -func (m *ReplicaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicaInfo) UnmarshalBinary(b []byte) error { - var res ReplicaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replicate_snapshots_to_a_w_s_params.go b/v1/models/replicate_snapshots_to_a_w_s_params.go deleted file mode 100644 index 18e4b184..00000000 --- a/v1/models/replicate_snapshots_to_a_w_s_params.go +++ /dev/null @@ -1,110 +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" -) - -// ReplicateSnapshotsToAWSParams Params required to replicate snapshots to another AWS source. This is -// populated for AWS snapshot manager replication. -// -// swagger:model ReplicateSnapshotsToAWSParams -type ReplicateSnapshotsToAWSParams struct { - - // Name of the AWS region in which to replicate the snapshots. - Region *EntityProto `json:"region,omitempty"` -} - -// Validate validates this replicate snapshots to a w s params -func (m *ReplicateSnapshotsToAWSParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicateSnapshotsToAWSParams) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replicate snapshots to a w s params based on the context it is used -func (m *ReplicateSnapshotsToAWSParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicateSnapshotsToAWSParams) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicateSnapshotsToAWSParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicateSnapshotsToAWSParams) UnmarshalBinary(b []byte) error { - var res ReplicateSnapshotsToAWSParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replicate_snapshots_to_azure_params.go b/v1/models/replicate_snapshots_to_azure_params.go deleted file mode 100644 index a6a1b371..00000000 --- a/v1/models/replicate_snapshots_to_azure_params.go +++ /dev/null @@ -1,266 +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" -) - -// ReplicateSnapshotsToAzureParams Params required to replicate snapshots to another Azure's storage container. -// -// This is populated for Azure snapshot manager replication. -// -// swagger:model ReplicateSnapshotsToAzureParams -type ReplicateSnapshotsToAzureParams struct { - - // Resource group to filter regions in UX. - ResourceGroup *EntityProto `json:"resourceGroup,omitempty"` - - // Name of the storage account that will contain the storage container within - // which we will create the blob/snapshot. - StorageAccount *EntityProto `json:"storageAccount,omitempty"` - - // Name of the storage container within the above storage account. - StorageContainer *EntityProto `json:"storageContainer,omitempty"` - - // Name of the Azure resource group that has the storage account mentioned - // below. - StorageResourceGroup *EntityProto `json:"storageResourceGroup,omitempty"` -} - -// Validate validates this replicate snapshots to azure params -func (m *ReplicateSnapshotsToAzureParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageResourceGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) validateResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceGroup) { // not required - return nil - } - - if m.ResourceGroup != nil { - if err := m.ResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) validateStorageAccount(formats strfmt.Registry) error { - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if m.StorageAccount != nil { - if err := m.StorageAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) validateStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if m.StorageContainer != nil { - if err := m.StorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) validateStorageResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if m.StorageResourceGroup != nil { - if err := m.StorageResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replicate snapshots to azure params based on the context it is used -func (m *ReplicateSnapshotsToAzureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) contextValidateResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceGroup != nil { - - if swag.IsZero(m.ResourceGroup) { // not required - return nil - } - - if err := m.ResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) contextValidateStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageAccount != nil { - - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if err := m.StorageAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageContainer != nil { - - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if err := m.StorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *ReplicateSnapshotsToAzureParams) contextValidateStorageResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageResourceGroup != nil { - - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if err := m.StorageResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicateSnapshotsToAzureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicateSnapshotsToAzureParams) UnmarshalBinary(b []byte) error { - var res ReplicateSnapshotsToAzureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replication_encryption_key_reponse.go b/v1/models/replication_encryption_key_reponse.go deleted file mode 100644 index a253ab26..00000000 --- a/v1/models/replication_encryption_key_reponse.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" -) - -// ReplicationEncryptionKeyReponse Replication Encryption Key. -// -// Specifies the encryption key that is used for encrypting replication data -// from this Cluster to a remote Cluster. -// -// swagger:model ReplicationEncryptionKeyReponse -type ReplicationEncryptionKeyReponse struct { - - // Specifies a replication encryption key. - EncryptionKey *string `json:"encryptionKey,omitempty"` -} - -// Validate validates this replication encryption key reponse -func (m *ReplicationEncryptionKeyReponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replication encryption key reponse based on context it is used -func (m *ReplicationEncryptionKeyReponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationEncryptionKeyReponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationEncryptionKeyReponse) UnmarshalBinary(b []byte) error { - var res ReplicationEncryptionKeyReponse - 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 deleted file mode 100644 index 8a9e0024..00000000 --- a/v1/models/replication_info_base.go +++ /dev/null @@ -1,340 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationInfoBase replication info base -// -// swagger:model ReplicationInfoBase -type ReplicationInfoBase struct { - - // Indicates the time remaining for the blackout window to end. - BlackoutRemainingTimeUsecs *int64 `json:"blackoutRemainingTimeUsecs,omitempty"` - - // Number of bytes sent over the wire for this replication so far. This value - // could be larger than 'logical_bytes_transferred' due to redundant work - // performed by Madrox across crashes. - BytesTransferred *int64 `json:"bytesTransferred,omitempty"` - - // Indicates if nfs, smb permissions should be enabled while cloning from - // backup view to madrox Tx internal view. - EnableNfsSmbPermissions *bool `json:"enableNfsSmbPermissions,omitempty"` - - // Time when this replication ended. If not set, then the replication has - // not ended yet. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // If the replication has completed, the following indicates whether there - // was an error in its completion. - Error *PrivateErrorProto `json:"error,omitempty"` - - // Sum of logical size of all the files which have changes that need to be - // replicated. - EstimatedLogicalBytesToTransfer *int64 `json:"estimatedLogicalBytesToTransfer,omitempty"` - - // Any existing data lock retention of the local copy of the backup run on - // the Rx cluster if it was replicated there earlier. - ExistingDataLockConstraints *DataLockConstraintsProto `json:"existingDataLockConstraints,omitempty"` - - // Any existing expiry time of the backup run on the Rx cluster if it was - // replicated there earlier. - ExistingExpiryTimeUsecs *int64 `json:"existingExpiryTimeUsecs,omitempty"` - - // Any existing data lock retention of the local copy of the backup run on - // the Rx cluster if it was replicated there earlier. This is to hold - // worm_retention info if Rx is not update with - // 'datalock_retention_per_target'. - ExistingWormRetentionOnRx *WormRetentionProto `json:"existingWormRetentionOnRx,omitempty"` - - // A map that contains all the backup tasks that should not be replicated to - // the Rx cluster (e.g., because they might have been replicated earlier). - // The key of the task is the id of the backup task, and the value is a bool - // that indicates whether that backup task should be filtered or not. - FilteredBackupTaskIDMap []*ReplicationInfoBaseFilteredBackupTaskIDMapEntry `json:"filteredBackupTaskIdMap"` - - // True, if this is a full replication. False, if incremental. - IsFullReplication *bool `json:"isFullReplication,omitempty"` - - // True, if 'datalock_retention_per_target' is supported on Rx cluster. - IsTargetDatalockCapable *bool `json:"isTargetDatalockCapable,omitempty"` - - // Number of logical bytes transferred for this replication so far. This - // value can never exceed the total logical size of the replicated view. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // The total amount of logical data to be transferred for this replication. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Number of metadata actions that have been completed for this replication. - MetadataActionsCompleted *int64 `json:"metadataActionsCompleted,omitempty"` - - // Percentage of replication that has been completed. Note that this may be - // < 100 if error is set to something other than kNoError. It implies we - // saw an error after completing this percentage of replication. - PctCompleted *int32 `json:"pctCompleted,omitempty"` - - // The name of the remote cluster. - RemoteClusterName *string `json:"remoteClusterName,omitempty"` - - // The incarnation id of the Rx cluster. - RxClusterIncarnationID *int64 `json:"rxClusterIncarnationId,omitempty"` - - // Time when this replication was started. If not set, then replication - // has not been started yet. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The name of the view that is being replicated. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this replication info base -func (m *ReplicationInfoBase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExistingDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExistingWormRetentionOnRx(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilteredBackupTaskIDMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationInfoBase) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *ReplicationInfoBase) validateExistingDataLockConstraints(formats strfmt.Registry) error { - if swag.IsZero(m.ExistingDataLockConstraints) { // not required - return nil - } - - if m.ExistingDataLockConstraints != nil { - if err := m.ExistingDataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingDataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingDataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *ReplicationInfoBase) validateExistingWormRetentionOnRx(formats strfmt.Registry) error { - if swag.IsZero(m.ExistingWormRetentionOnRx) { // not required - return nil - } - - if m.ExistingWormRetentionOnRx != nil { - if err := m.ExistingWormRetentionOnRx.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingWormRetentionOnRx") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingWormRetentionOnRx") - } - return err - } - } - - return nil -} - -func (m *ReplicationInfoBase) validateFilteredBackupTaskIDMap(formats strfmt.Registry) error { - if swag.IsZero(m.FilteredBackupTaskIDMap) { // not required - return nil - } - - for i := 0; i < len(m.FilteredBackupTaskIDMap); i++ { - if swag.IsZero(m.FilteredBackupTaskIDMap[i]) { // not required - continue - } - - if m.FilteredBackupTaskIDMap[i] != nil { - if err := m.FilteredBackupTaskIDMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteredBackupTaskIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteredBackupTaskIdMap" + "." + strconv.Itoa(i)) - } - 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 - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExistingDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExistingWormRetentionOnRx(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilteredBackupTaskIDMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationInfoBase) 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 -} - -func (m *ReplicationInfoBase) contextValidateExistingDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.ExistingDataLockConstraints != nil { - - if swag.IsZero(m.ExistingDataLockConstraints) { // not required - return nil - } - - if err := m.ExistingDataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingDataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingDataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *ReplicationInfoBase) contextValidateExistingWormRetentionOnRx(ctx context.Context, formats strfmt.Registry) error { - - if m.ExistingWormRetentionOnRx != nil { - - if swag.IsZero(m.ExistingWormRetentionOnRx) { // not required - return nil - } - - if err := m.ExistingWormRetentionOnRx.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingWormRetentionOnRx") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingWormRetentionOnRx") - } - return err - } - } - - return nil -} - -func (m *ReplicationInfoBase) contextValidateFilteredBackupTaskIDMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilteredBackupTaskIDMap); i++ { - - if m.FilteredBackupTaskIDMap[i] != nil { - - if swag.IsZero(m.FilteredBackupTaskIDMap[i]) { // not required - return nil - } - - if err := m.FilteredBackupTaskIDMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteredBackupTaskIdMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteredBackupTaskIdMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationInfoBase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationInfoBase) UnmarshalBinary(b []byte) error { - var res ReplicationInfoBase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replication_info_base_filtered_backup_task_id_map_entry.go b/v1/models/replication_info_base_filtered_backup_task_id_map_entry.go deleted file mode 100644 index 3ea351c7..00000000 --- a/v1/models/replication_info_base_filtered_backup_task_id_map_entry.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" -) - -// ReplicationInfoBaseFilteredBackupTaskIDMapEntry replication info base filtered backup task Id map entry -// -// swagger:model ReplicationInfoBase_FilteredBackupTaskIdMapEntry -type ReplicationInfoBaseFilteredBackupTaskIDMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *bool `json:"value,omitempty"` -} - -// Validate validates this replication info base filtered backup task Id map entry -func (m *ReplicationInfoBaseFilteredBackupTaskIDMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replication info base filtered backup task Id map entry based on context it is used -func (m *ReplicationInfoBaseFilteredBackupTaskIDMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationInfoBaseFilteredBackupTaskIDMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationInfoBaseFilteredBackupTaskIDMapEntry) UnmarshalBinary(b []byte) error { - var res ReplicationInfoBaseFilteredBackupTaskIDMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replication_target.go b/v1/models/replication_target.go deleted file mode 100644 index e4b6768c..00000000 --- a/v1/models/replication_target.go +++ /dev/null @@ -1,54 +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" -) - -// ReplicationTarget Message that specifies the details about a remote cluster where backup -// snapshots may be replicated to. -// -// swagger:model ReplicationTarget -type ReplicationTarget struct { - - // The id of the remote cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // The name of the remote cluster. - ClusterName *string `json:"clusterName,omitempty"` -} - -// Validate validates this replication target -func (m *ReplicationTarget) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replication target based on context it is used -func (m *ReplicationTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTarget) UnmarshalBinary(b []byte) error { - var res ReplicationTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replication_target_settings.go b/v1/models/replication_target_settings.go deleted file mode 100644 index 93f675ab..00000000 --- a/v1/models/replication_target_settings.go +++ /dev/null @@ -1,56 +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" -) - -// ReplicationTargetSettings Replication Target. -// -// Specifies settings about the Remote Cohesity Cluster where Snapshots -// are copied to. -// -// swagger:model ReplicationTargetSettings -type ReplicationTargetSettings struct { - - // Specifies the id of the Remote Cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the name of the Remote Cluster. - ClusterName *string `json:"clusterName,omitempty"` -} - -// Validate validates this replication target settings -func (m *ReplicationTargetSettings) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replication target settings based on context it is used -func (m *ReplicationTargetSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTargetSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTargetSettings) UnmarshalBinary(b []byte) error { - var res ReplicationTargetSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/request_error.go b/v1/models/request_error.go deleted file mode 100644 index 8134f7d3..00000000 --- a/v1/models/request_error.go +++ /dev/null @@ -1,55 +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" -) - -// RequestError Error -// -// Details about the Error. -// -// swagger:model RequestError -type RequestError struct { - - // Operation response error code. - ErrorCode *int64 `json:"errorCode,omitempty"` - - // Description of the error. - Message *string `json:"message,omitempty"` -} - -// Validate validates this request error -func (m *RequestError) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this request error based on context it is used -func (m *RequestError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RequestError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RequestError) UnmarshalBinary(b []byte) error { - var res RequestError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/reset_s3_secret_key_parameters.go b/v1/models/reset_s3_secret_key_parameters.go deleted file mode 100644 index c723c23e..00000000 --- a/v1/models/reset_s3_secret_key_parameters.go +++ /dev/null @@ -1,61 +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" -) - -// ResetS3SecretKeyParameters Reset S3 Secret Access Key. -// -// Specifies the parameters required to reset the S3 secret access key for -// the specified Cohesity user. -// -// swagger:model ResetS3SecretKeyParameters -type ResetS3SecretKeyParameters struct { - - // Specifies the fully qualified domain name (FQDN) of an Active Directory - // or LOCAL for the default LOCAL domain on the Cohesity Cluster. - // If not specified, it is assumed to be LOCAL. - Domain *string `json:"domain,omitempty"` - - // Specifies the tenant for which the users are to be deleted. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the Cohesity user. - Username *string `json:"username,omitempty"` -} - -// Validate validates this reset s3 secret key parameters -func (m *ResetS3SecretKeyParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this reset s3 secret key parameters based on context it is used -func (m *ResetS3SecretKeyParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResetS3SecretKeyParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResetS3SecretKeyParameters) UnmarshalBinary(b []byte) error { - var res ResetS3SecretKeyParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/resource_pool_result.go b/v1/models/resource_pool_result.go deleted file mode 100644 index 8ce45dd4..00000000 --- a/v1/models/resource_pool_result.go +++ /dev/null @@ -1,212 +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" -) - -// ResourcePoolResult ResourcePoolResult is the struct for listing a resource pool and its -// parent Datacenter. -// -// swagger:model ResourcePoolResult -type ResourcePoolResult struct { - - // Cluster is the parent cluster compute resource for the resource pool. - Cluster *PrivateEntityProto `json:"cluster,omitempty"` - - // Datacenter is the parent datacenter for the resource pool. - DataCenter *PrivateEntityProto `json:"dataCenter,omitempty"` - - // ResourcePool is the entity for the resource pool. - ResourcePool *PrivateEntityProto `json:"resourcePool,omitempty"` -} - -// Validate validates this resource pool result -func (m *ResourcePoolResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataCenter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResourcePoolResult) validateCluster(formats strfmt.Registry) error { - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *ResourcePoolResult) validateDataCenter(formats strfmt.Registry) error { - if swag.IsZero(m.DataCenter) { // not required - return nil - } - - if m.DataCenter != nil { - if err := m.DataCenter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataCenter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataCenter") - } - return err - } - } - - return nil -} - -func (m *ResourcePoolResult) validateResourcePool(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// ContextValidate validate this resource pool result based on the context it is used -func (m *ResourcePoolResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataCenter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResourcePoolResult) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.Cluster != nil { - - if swag.IsZero(m.Cluster) { // not required - return nil - } - - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *ResourcePoolResult) contextValidateDataCenter(ctx context.Context, formats strfmt.Registry) error { - - if m.DataCenter != nil { - - if swag.IsZero(m.DataCenter) { // not required - return nil - } - - if err := m.DataCenter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataCenter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataCenter") - } - return err - } - } - - return nil -} - -func (m *ResourcePoolResult) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ResourcePoolResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResourcePoolResult) UnmarshalBinary(b []byte) error { - var res ResourcePoolResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_a_d_app_object_params.go b/v1/models/restore_a_d_app_object_params.go deleted file mode 100644 index 181452ed..00000000 --- a/v1/models/restore_a_d_app_object_params.go +++ /dev/null @@ -1,246 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreADAppObjectParams The application object restore params for AD objects (AD Domain Controller). -// -// swagger:model RestoreADAppObjectParams -type RestoreADAppObjectParams struct { - - // Status of the AD object/attribute restore operation. - AdRestoreStatusVec []*ADRestoreStatus `json:"adRestoreStatusVec"` - - // This option will only be set for child tasks (Restore AD objects and - // Restore AD object attributes). - AdUpdateOptions *ADUpdateRestoreTaskOptions `json:"adUpdateOptions,omitempty"` - - // Credentials used to execute AD powershell cmdlet for AD search and - // restore. The specified credentials must have required permissions - // to AD objects in specified OU. - Credentials *Credentials `json:"credentials,omitempty"` - - // The ldap port on which the AD domain controller's NTDS database will be - // mounted. - LdapPort *int32 `json:"ldapPort,omitempty"` - - // Number of AD objects whose restore failed. Includes both AD object and - // attribute restored. - NumFailed *int32 `json:"numFailed,omitempty"` - - // Number of AD objects whose restores are currently running. Includes both - // AD object and attribute recoveries. - NumRunning *int32 `json:"numRunning,omitempty"` - - // Number of AD objects restored successfully. Includes both AD object and - // attribute restored. - NumSuccessfull *int32 `json:"numSuccessfull,omitempty"` - - // The following field is set if user wants to mount AD, restore AD objects - // and destory AD mount in single task. - ShouldMountAndRestore *bool `json:"shouldMountAndRestore,omitempty"` -} - -// Validate validates this restore a d app object params -func (m *RestoreADAppObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdRestoreStatusVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdUpdateOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreADAppObjectParams) validateAdRestoreStatusVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdRestoreStatusVec) { // not required - return nil - } - - for i := 0; i < len(m.AdRestoreStatusVec); i++ { - if swag.IsZero(m.AdRestoreStatusVec[i]) { // not required - continue - } - - if m.AdRestoreStatusVec[i] != nil { - if err := m.AdRestoreStatusVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreADAppObjectParams) validateAdUpdateOptions(formats strfmt.Registry) error { - if swag.IsZero(m.AdUpdateOptions) { // not required - return nil - } - - if m.AdUpdateOptions != nil { - if err := m.AdUpdateOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adUpdateOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adUpdateOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreADAppObjectParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore a d app object params based on the context it is used -func (m *RestoreADAppObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdRestoreStatusVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdUpdateOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreADAppObjectParams) contextValidateAdRestoreStatusVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdRestoreStatusVec); i++ { - - if m.AdRestoreStatusVec[i] != nil { - - if swag.IsZero(m.AdRestoreStatusVec[i]) { // not required - return nil - } - - if err := m.AdRestoreStatusVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreStatusVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreStatusVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreADAppObjectParams) contextValidateAdUpdateOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.AdUpdateOptions != nil { - - if swag.IsZero(m.AdUpdateOptions) { // not required - return nil - } - - if err := m.AdUpdateOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adUpdateOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adUpdateOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreADAppObjectParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreADAppObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreADAppObjectParams) UnmarshalBinary(b []byte) error { - var res RestoreADAppObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_acropolis_v_ms_params.go b/v1/models/restore_acropolis_v_ms_params.go deleted file mode 100644 index 6f49fa98..00000000 --- a/v1/models/restore_acropolis_v_ms_params.go +++ /dev/null @@ -1,349 +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" -) - -// RestoreAcropolisVMsParams This message defines the Acropolis specific VMs restore params. -// -// swagger:model RestoreAcropolisVMsParams -type RestoreAcropolisVMsParams struct { - - // Whether to perform copy recovery instead of instant recovery. - CopyRecovery *bool `json:"copyRecovery,omitempty"` - - // The power state configuration to be applied to the restored VM. - // - // Semantics for kRecoverVMs task: By default, VMs are restored in their - // original power state. - // - // This proto can be used to override the default behavior for the restore - // task. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // Whether disks that were excluded during backup should be recovered as - // blank disks. - RecoverExcludedDisksAsBlankDisks *bool `json:"recoverExcludedDisksAsBlankDisks,omitempty"` - - // By default, VMs are restored with their original name. This field can - // be used to specify the transformation ( i.e prefix/suffix) to be applied - // to the source VM name to derive the new name of the restored VM. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // The network configuration to be applied to the restored VMs. - // - // Semantics for kRecoverVMs task: By default, if the VMs are being restored - // to their original location, then original network configuration will be - // preserved. If objects are being restored to different location (i.e., - // different parent source), then network will be detached. - // - // Below field can be used to override the default network configuration of - // the restored VMs. - // - // If user want to keep the original network setting for kRecoverVMs task, - // then this proto should not be set. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // A storage container where the VM's files should be restored to. This - // field is optional if the VM is being restored to its original parent - // source. If not specified, the VM's files will be restored to their - // original storage container(s). This field is mandatory if the VMs are - // being restored to a different parent source. - StorageContainer *EntityProto `json:"storageContainer,omitempty"` - - // UUID config to use for restored VM. - // - // Semantics for kRecoverVMs task: By default, recovered VMs have new UUIDs - // for them. - // - // This proto can be used to override the default behavior for the restore - // task. - UUIDConfig *UUIDConfigProto `json:"uuidConfig,omitempty"` -} - -// Validate validates this restore acropolis v ms params -func (m *RestoreAcropolisVMsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUUIDConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMsParams) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) validateStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if m.StorageContainer != nil { - if err := m.StorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) validateUUIDConfig(formats strfmt.Registry) error { - if swag.IsZero(m.UUIDConfig) { // not required - return nil - } - - if m.UUIDConfig != nil { - if err := m.UUIDConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uuidConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uuidConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore acropolis v ms params based on the context it is used -func (m *RestoreAcropolisVMsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUUIDConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMsParams) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageContainer != nil { - - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if err := m.StorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMsParams) contextValidateUUIDConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.UUIDConfig != nil { - - if swag.IsZero(m.UUIDConfig) { // not required - return nil - } - - if err := m.UUIDConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uuidConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uuidConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAcropolisVMsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAcropolisVMsParams) UnmarshalBinary(b []byte) error { - var res RestoreAcropolisVMsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_acropolis_vm_param.go b/v1/models/restore_acropolis_vm_param.go deleted file mode 100644 index adda58ba..00000000 --- a/v1/models/restore_acropolis_vm_param.go +++ /dev/null @@ -1,166 +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" -) - -// RestoreAcropolisVMParam Message to capture the info of a particular Acropolis VM being restored. -// -// swagger:model RestoreAcropolisVMParam -type RestoreAcropolisVMParam struct { - - // If specified, this field defines the info of the snapshot that is known - // to be present on both Acropolis and Cohesity cluster. We can compute the - // changed blocks between the snapshot to be restored and this reference - // snapshot and thus push only changed blocks to the Acropolis cluster for - // fast/incremental recovery. - // If this field is not specified, Cohesity cluster will push all the VM - // snapshot data back to the Acropolis cluster. - BaseCbtSnapshotInfoProto *SnapshotInfoProto `json:"baseCbtSnapshotInfoProto,omitempty"` - - // network config - NetworkConfig *RestoreAcropolisVMParamNetworkConfigInfo `json:"networkConfig,omitempty"` -} - -// Validate validates this restore acropolis VM param -func (m *RestoreAcropolisVMParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBaseCbtSnapshotInfoProto(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMParam) validateBaseCbtSnapshotInfoProto(formats strfmt.Registry) error { - if swag.IsZero(m.BaseCbtSnapshotInfoProto) { // not required - return nil - } - - if m.BaseCbtSnapshotInfoProto != nil { - if err := m.BaseCbtSnapshotInfoProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseCbtSnapshotInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseCbtSnapshotInfoProto") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMParam) 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 acropolis VM param based on the context it is used -func (m *RestoreAcropolisVMParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBaseCbtSnapshotInfoProto(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMParam) contextValidateBaseCbtSnapshotInfoProto(ctx context.Context, formats strfmt.Registry) error { - - if m.BaseCbtSnapshotInfoProto != nil { - - if swag.IsZero(m.BaseCbtSnapshotInfoProto) { // not required - return nil - } - - if err := m.BaseCbtSnapshotInfoProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseCbtSnapshotInfoProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseCbtSnapshotInfoProto") - } - return err - } - } - - return nil -} - -func (m *RestoreAcropolisVMParam) 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 *RestoreAcropolisVMParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAcropolisVMParam) UnmarshalBinary(b []byte) error { - var res RestoreAcropolisVMParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_acropolis_vm_param_network_config_info.go b/v1/models/restore_acropolis_vm_param_network_config_info.go deleted file mode 100644 index 3cc44d4a..00000000 --- a/v1/models/restore_acropolis_vm_param_network_config_info.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreAcropolisVMParamNetworkConfigInfo Proto to define the network configuration to be applied to the restored -// VM. -// -// swagger:model RestoreAcropolisVMParam_NetworkConfigInfo -type RestoreAcropolisVMParamNetworkConfigInfo struct { - - // Network state to be applied to the restored VM. - NetworkStateChange *int32 `json:"networkStateChange,omitempty"` - - // This field is applicable only if the network_state_change is set to - // 'kAttachNewNetwork'. - NicVec []*RestoreAcropolisVMParamNetworkConfigInfoNICSpec `json:"nicVec"` -} - -// Validate validates this restore acropolis VM param network config info -func (m *RestoreAcropolisVMParamNetworkConfigInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNicVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMParamNetworkConfigInfo) validateNicVec(formats strfmt.Registry) error { - if swag.IsZero(m.NicVec) { // not required - return nil - } - - for i := 0; i < len(m.NicVec); i++ { - if swag.IsZero(m.NicVec[i]) { // not required - continue - } - - if m.NicVec[i] != nil { - if err := m.NicVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nicVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nicVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore acropolis VM param network config info based on the context it is used -func (m *RestoreAcropolisVMParamNetworkConfigInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNicVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAcropolisVMParamNetworkConfigInfo) contextValidateNicVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NicVec); i++ { - - if m.NicVec[i] != nil { - - if swag.IsZero(m.NicVec[i]) { // not required - return nil - } - - if err := m.NicVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nicVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nicVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAcropolisVMParamNetworkConfigInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAcropolisVMParamNetworkConfigInfo) UnmarshalBinary(b []byte) error { - var res RestoreAcropolisVMParamNetworkConfigInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_acropolis_vm_param_network_config_info_n_i_c_spec.go b/v1/models/restore_acropolis_vm_param_network_config_info_n_i_c_spec.go deleted file mode 100644 index 11a01409..00000000 --- a/v1/models/restore_acropolis_vm_param_network_config_info_n_i_c_spec.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" -) - -// RestoreAcropolisVMParamNetworkConfigInfoNICSpec Proto to specify the NIC configuration. -// -// swagger:model RestoreAcropolisVMParam_NetworkConfigInfo_NICSpec -type RestoreAcropolisVMParamNetworkConfigInfoNICSpec struct { - - // IP address to assign to the NIC. - IPAddress *string `json:"ipAddress,omitempty"` - - // The UUID of the network to which the NIC is to be attached. - NetworkUUID *string `json:"networkUuid,omitempty"` -} - -// Validate validates this restore acropolis VM param network config info n i c spec -func (m *RestoreAcropolisVMParamNetworkConfigInfoNICSpec) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore acropolis VM param network config info n i c spec based on context it is used -func (m *RestoreAcropolisVMParamNetworkConfigInfoNICSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAcropolisVMParamNetworkConfigInfoNICSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAcropolisVMParamNetworkConfigInfoNICSpec) UnmarshalBinary(b []byte) error { - var res RestoreAcropolisVMParamNetworkConfigInfoNICSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_ad_guid_pair.go b/v1/models/restore_ad_guid_pair.go deleted file mode 100644 index 9c117cfc..00000000 --- a/v1/models/restore_ad_guid_pair.go +++ /dev/null @@ -1,58 +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" -) - -// RestoreAdGUIDPair Refer: ADGuidPair /magneto/agents/windows/stub/ad_param.proto -// AD GUID Pair -// -// RestoreAdGuidPair is the AD object guid string pair. -// -// swagger:model RestoreAdGuidPair -type RestoreAdGUIDPair struct { - - // Specifies the destination guid in production AD object corresponding to - // source. If empty, it assumed to be 'source' guid. - Destination *string `json:"destination,omitempty"` - - // Specifies the source guid string of an AD object in mounted AD snapshot. - // This cannot be empty. - Source *string `json:"source,omitempty"` -} - -// Validate validates this restore ad Guid pair -func (m *RestoreAdGUIDPair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore ad Guid pair based on context it is used -func (m *RestoreAdGUIDPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAdGUIDPair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAdGUIDPair) UnmarshalBinary(b []byte) error { - var res RestoreAdGUIDPair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_app_arg.go b/v1/models/restore_app_arg.go deleted file mode 100644 index 94ea8f6b..00000000 --- a/v1/models/restore_app_arg.go +++ /dev/null @@ -1,445 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreAppArg RestoreAppArg represents the argument to recover/clone an application. -// -// Example of application includes a SQL DB. -// -// swagger:model RestoreAppArg -type RestoreAppArg struct { - - // Action is the name of the action of task. - Action *int32 `json:"Action,omitempty"` - - // Name is the name of the restore task. This field is mandatory. - Name *string `json:"name,omitempty"` - - // PostScript specifies the details of user script to be run after creating - // the clone. This is only applicable to action == 'kCloneApp'. - PostScript *RemoteScriptPathAndParams `json:"postScript,omitempty"` - - // PreScript specifies the details of user script to be run before creating - // the clone. This is only applicable to action == 'kCloneApp'. - PreScript *RemoteScriptPathAndParams `json:"preScript,omitempty"` - - // Specifies the name transformation to be applied to the vApp during restore. - RenameRestoredVappParams *RenameObjectParamProto `json:"renameRestoredVappParams,omitempty"` - - // RestoreAppParams contains the information about the application restore - // task. - RestoreAppParams *RestoreAppParams `json:"restoreAppParams,omitempty"` - - // RestoreAppParamsList contains a list of RestoreAppParams which captures - // information about multiple application restore tasks. - RestoreAppParamsList []*RestoreAppParams `json:"restoreAppParamsList"` - - // Vlan Params associated with the restore. - // If this is not specified, then the VLAN settings will be automatically - // selected from one of the following options: - // a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be - // automatically based on the client's (e.g. ESXI host) IP address. - // b. If VLANs are not configured on Cohesity, then the partition hostname or - // VIPs will be used for restores. - RestoreVlanParams *VlanParams `json:"restoreVlanParams,omitempty"` - - // Specifies the Vcd config info parameter for restore tasks. - VcdConfigParams *RestoredObjectVCDConfigProto `json:"vcdConfigParams,omitempty"` -} - -// Validate validates this restore app arg -func (m *RestoreAppArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredVappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppParamsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdConfigParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppArg) validatePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if m.PostScript != nil { - if err := m.PostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) validatePreScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if m.PreScript != nil { - if err := m.PreScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) validateRenameRestoredVappParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if m.RenameRestoredVappParams != nil { - if err := m.RenameRestoredVappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) validateRestoreAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if m.RestoreAppParams != nil { - if err := m.RestoreAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) validateRestoreAppParamsList(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppParamsList) { // not required - return nil - } - - for i := 0; i < len(m.RestoreAppParamsList); i++ { - if swag.IsZero(m.RestoreAppParamsList[i]) { // not required - continue - } - - if m.RestoreAppParamsList[i] != nil { - if err := m.RestoreAppParamsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreAppArg) validateRestoreVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if m.RestoreVlanParams != nil { - if err := m.RestoreVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) validateVcdConfigParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if m.VcdConfigParams != nil { - if err := m.VcdConfigParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore app arg based on the context it is used -func (m *RestoreAppArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredVappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppParamsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdConfigParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppArg) contextValidatePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostScript != nil { - - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if err := m.PostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) contextValidatePreScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScript != nil { - - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if err := m.PreScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) contextValidateRenameRestoredVappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredVappParams != nil { - - if swag.IsZero(m.RenameRestoredVappParams) { // not required - return nil - } - - if err := m.RenameRestoredVappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredVappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredVappParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) contextValidateRestoreAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAppParams != nil { - - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if err := m.RestoreAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) contextValidateRestoreAppParamsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreAppParamsList); i++ { - - if m.RestoreAppParamsList[i] != nil { - - if swag.IsZero(m.RestoreAppParamsList[i]) { // not required - return nil - } - - if err := m.RestoreAppParamsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParamsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParamsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreAppArg) contextValidateRestoreVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVlanParams != nil { - - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if err := m.RestoreVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppArg) contextValidateVcdConfigParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdConfigParams != nil { - - if swag.IsZero(m.VcdConfigParams) { // not required - return nil - } - - if err := m.VcdConfigParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdConfigParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdConfigParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAppArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAppArg) UnmarshalBinary(b []byte) error { - var res RestoreAppArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_app_object.go b/v1/models/restore_app_object.go deleted file mode 100644 index 0e433452..00000000 --- a/v1/models/restore_app_object.go +++ /dev/null @@ -1,321 +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" -) - -// RestoreAppObject Message that captures information about an application object being -// restored. -// -// swagger:model RestoreAppObject -type RestoreAppObject struct { - - // Any additional parameters associated with a restore task. - AdditionalParams *RestoreTaskAdditionalParams `json:"additionalParams,omitempty"` - - // The application entity to restore (for example, kSQL, kOracle). If this is - // not set, all the apps in the owning entity will be restored. - AppEntity *EntityProto `json:"appEntity,omitempty"` - - // The proper display name of this object in the UI, if app_entity is not - // empty. For example, for SQL databases the name should also include the - // instance name. - DisplayName *string `json:"displayName,omitempty"` - - // Universal id of entity node created in graphDB to refer the entity created - // by clone task. - EntityNodeUID *UniversalIDProto `json:"entityNodeUid,omitempty"` - - // The restore params for the RestoreAppObject. - RestoreParams *RestoreAppObjectParams `json:"restoreParams,omitempty"` - - // Universal id of task node created in graphDB to refer the clone task. - TaskNodeUID *UniversalIDProto `json:"taskNodeUid,omitempty"` -} - -// Validate validates this restore app object -func (m *RestoreAppObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityNodeUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskNodeUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppObject) validateAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if m.AdditionalParams != nil { - if err := m.AdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) validateAppEntity(formats strfmt.Registry) error { - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if m.AppEntity != nil { - if err := m.AppEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) validateEntityNodeUID(formats strfmt.Registry) error { - if swag.IsZero(m.EntityNodeUID) { // not required - return nil - } - - if m.EntityNodeUID != nil { - if err := m.EntityNodeUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityNodeUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityNodeUid") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) validateRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if m.RestoreParams != nil { - if err := m.RestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) validateTaskNodeUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskNodeUID) { // not required - return nil - } - - if m.TaskNodeUID != nil { - if err := m.TaskNodeUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskNodeUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskNodeUid") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore app object based on the context it is used -func (m *RestoreAppObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityNodeUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskNodeUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppObject) contextValidateAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdditionalParams != nil { - - if swag.IsZero(m.AdditionalParams) { // not required - return nil - } - - if err := m.AdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) contextValidateAppEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.AppEntity != nil { - - if swag.IsZero(m.AppEntity) { // not required - return nil - } - - if err := m.AppEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) contextValidateEntityNodeUID(ctx context.Context, formats strfmt.Registry) error { - - if m.EntityNodeUID != nil { - - if swag.IsZero(m.EntityNodeUID) { // not required - return nil - } - - if err := m.EntityNodeUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityNodeUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityNodeUid") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) contextValidateRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParams != nil { - - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if err := m.RestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObject) contextValidateTaskNodeUID(ctx context.Context, formats strfmt.Registry) error { - - if m.TaskNodeUID != nil { - - if swag.IsZero(m.TaskNodeUID) { // not required - return nil - } - - if err := m.TaskNodeUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskNodeUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskNodeUid") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAppObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAppObject) UnmarshalBinary(b []byte) error { - var res RestoreAppObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_app_object_params.go b/v1/models/restore_app_object_params.go deleted file mode 100644 index 1f7e0611..00000000 --- a/v1/models/restore_app_object_params.go +++ /dev/null @@ -1,376 +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" -) - -// RestoreAppObjectParams Message for application object restore params. -// -// swagger:model RestoreAppObjectParams -type RestoreAppObjectParams struct { - - // The AD specific application object restore params. Only applicable if the - // RestoreAppObject.app_entity is of type kAD. - AdRestoreParams *RestoreADAppObjectParams `json:"adRestoreParams,omitempty"` - - // Id of finished clone task which has to be refreshed with different data. - CloneTaskID *int64 `json:"cloneTaskId,omitempty"` - - // The Exchange specific application object restore params. Only applicable - // if the RestoreAppObject.app_entity is of type kExchange. - ExchangeRestoreParams *RestoreExchangeParams `json:"exchangeRestoreParams,omitempty"` - - // The Oracle specific application object restore params. Only applicable if - // the RestoreAppObject.app_entity is of type kOracle. - // - // Note: Only one of sql_restore_params and oracle_restore_params can be set. - OracleRestoreParams *RestoreOracleAppObjectParams `json:"oracleRestoreParams,omitempty"` - - // The SQL specific application object restore params. Only applicable - // if the RestoreAppObject.app_entity is of type kSQL. - SQLRestoreParams *RestoreSQLAppObjectParams `json:"sqlRestoreParams,omitempty"` - - // The target host if the application is to be restored to a different - // host. If this is empty, then we are restoring to the original host, which - // is the owner entity. - TargetHost *EntityProto `json:"targetHost,omitempty"` - - // The registered source managing the target host. If this is empty, then the - // target host has the same parent source as the owner entity. - TargetHostParentSource *EntityProto `json:"targetHostParentSource,omitempty"` -} - -// Validate validates this restore app object params -func (m *RestoreAppObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetHostParentSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppObjectParams) validateAdRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.AdRestoreParams) { // not required - return nil - } - - if m.AdRestoreParams != nil { - if err := m.AdRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) validateExchangeRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeRestoreParams) { // not required - return nil - } - - if m.ExchangeRestoreParams != nil { - if err := m.ExchangeRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) validateOracleRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleRestoreParams) { // not required - return nil - } - - if m.OracleRestoreParams != nil { - if err := m.OracleRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) validateSQLRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.SQLRestoreParams) { // not required - return nil - } - - if m.SQLRestoreParams != nil { - if err := m.SQLRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) validateTargetHost(formats strfmt.Registry) error { - if swag.IsZero(m.TargetHost) { // not required - return nil - } - - if m.TargetHost != nil { - if err := m.TargetHost.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHost") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) validateTargetHostParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.TargetHostParentSource) { // not required - return nil - } - - if m.TargetHostParentSource != nil { - if err := m.TargetHostParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostParentSource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore app object params based on the context it is used -func (m *RestoreAppObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetHost(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetHostParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppObjectParams) contextValidateAdRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdRestoreParams != nil { - - if swag.IsZero(m.AdRestoreParams) { // not required - return nil - } - - if err := m.AdRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) contextValidateExchangeRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeRestoreParams != nil { - - if swag.IsZero(m.ExchangeRestoreParams) { // not required - return nil - } - - if err := m.ExchangeRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) contextValidateOracleRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleRestoreParams != nil { - - if swag.IsZero(m.OracleRestoreParams) { // not required - return nil - } - - if err := m.OracleRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) contextValidateSQLRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLRestoreParams != nil { - - if swag.IsZero(m.SQLRestoreParams) { // not required - return nil - } - - if err := m.SQLRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlRestoreParams") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) contextValidateTargetHost(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetHost != nil { - - if swag.IsZero(m.TargetHost) { // not required - return nil - } - - if err := m.TargetHost.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHost") - } - return err - } - } - - return nil -} - -func (m *RestoreAppObjectParams) contextValidateTargetHostParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetHostParentSource != nil { - - if swag.IsZero(m.TargetHostParentSource) { // not required - return nil - } - - if err := m.TargetHostParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostParentSource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAppObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAppObjectParams) UnmarshalBinary(b []byte) error { - var res RestoreAppObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_app_params.go b/v1/models/restore_app_params.go deleted file mode 100644 index 3f47c715..00000000 --- a/v1/models/restore_app_params.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreAppParams This message captures all the necessary arguments specified by the user to -// restore an application. -// -// swagger:model RestoreAppParams -type RestoreAppParams struct { - - // Credentials that will be used to log into the application environment. - // - // For a local restore operation, credentials are optional. If not specified, - // the restore operation will use the credentials that were used to register - // the application's owner entity. - // - // For a remote restore operation from a replicated target, credentials - // must be specified. - Credentials *Credentials `json:"credentials,omitempty"` - - // The restore information about the application's owner. - OwnerRestoreInfo *AppOwnerRestoreInfo `json:"ownerRestoreInfo,omitempty"` - - // The application level objects that needs to be restored. If this vector is - // populated with exactly one object without its 'app_entity', all the - // application objects of the owner will be restored. If multiple objects - // are being restored, the 'app_entity' field must be specified for all of - // them. - RestoreAppObjectVec []*RestoreAppObject `json:"restoreAppObjectVec"` - - // The application environment. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this restore app params -func (m *RestoreAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppObjectVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RestoreAppParams) validateOwnerRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerRestoreInfo) { // not required - return nil - } - - if m.OwnerRestoreInfo != nil { - if err := m.OwnerRestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreAppParams) validateRestoreAppObjectVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppObjectVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreAppObjectVec); i++ { - if swag.IsZero(m.RestoreAppObjectVec[i]) { // not required - continue - } - - if m.RestoreAppObjectVec[i] != nil { - if err := m.RestoreAppObjectVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore app params based on the context it is used -func (m *RestoreAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppObjectVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *RestoreAppParams) contextValidateOwnerRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerRestoreInfo != nil { - - if swag.IsZero(m.OwnerRestoreInfo) { // not required - return nil - } - - if err := m.OwnerRestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreAppParams) contextValidateRestoreAppObjectVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreAppObjectVec); i++ { - - if m.RestoreAppObjectVec[i] != nil { - - if swag.IsZero(m.RestoreAppObjectVec[i]) { // not required - return nil - } - - if err := m.RestoreAppObjectVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppObjectVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAppParams) UnmarshalBinary(b []byte) error { - var res RestoreAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_app_task_state_proto.go b/v1/models/restore_app_task_state_proto.go deleted file mode 100644 index 1bb47904..00000000 --- a/v1/models/restore_app_task_state_proto.go +++ /dev/null @@ -1,184 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreAppTaskStateProto restore app task state proto -// -// swagger:model RestoreAppTaskStateProto -type RestoreAppTaskStateProto struct { - - // The Pulse task path to the application restore task sub tree. If the - // application restore has to wait on other tasks (for example, a SQL db - // restore may wait for a tail log backup or a VM restore), then this - // would represent a sub-tree of 'progress_monitor_task_path' in - // PerformRestoreTaskStateProto. - AppRestoreProgressMonitorSubtaskPath *string `json:"appRestoreProgressMonitorSubtaskPath,omitempty"` - - // This has list of the restore app params for all the child restore tasks. - // This is populated iff the 'is_parent_task' is set to true. - ChildRestoreAppParamsVec []*RestoreAppParams `json:"childRestoreAppParamsVec"` - - // The start time of the last finished log backup run. For SQL application, - // this is set iff we need to take a tail log backup. - LastFinishedLogBackupStartTimeUsecs *int64 `json:"lastFinishedLogBackupStartTimeUsecs,omitempty"` - - // Information about the application restore task. - RestoreAppParams *RestoreAppParams `json:"restoreAppParams,omitempty"` -} - -// Validate validates this restore app task state proto -func (m *RestoreAppTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChildRestoreAppParamsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppTaskStateProto) validateChildRestoreAppParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.ChildRestoreAppParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.ChildRestoreAppParamsVec); i++ { - if swag.IsZero(m.ChildRestoreAppParamsVec[i]) { // not required - continue - } - - if m.ChildRestoreAppParamsVec[i] != nil { - if err := m.ChildRestoreAppParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childRestoreAppParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childRestoreAppParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreAppTaskStateProto) validateRestoreAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if m.RestoreAppParams != nil { - if err := m.RestoreAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore app task state proto based on the context it is used -func (m *RestoreAppTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChildRestoreAppParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAppTaskStateProto) contextValidateChildRestoreAppParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildRestoreAppParamsVec); i++ { - - if m.ChildRestoreAppParamsVec[i] != nil { - - if swag.IsZero(m.ChildRestoreAppParamsVec[i]) { // not required - return nil - } - - if err := m.ChildRestoreAppParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childRestoreAppParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childRestoreAppParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreAppTaskStateProto) contextValidateRestoreAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAppParams != nil { - - if swag.IsZero(m.RestoreAppParams) { // not required - return nil - } - - if err := m.RestoreAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAppParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAppTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAppTaskStateProto) UnmarshalBinary(b []byte) error { - var res RestoreAppTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_azure_sql_params.go b/v1/models/restore_azure_sql_params.go deleted file mode 100644 index 15beaabb..00000000 --- a/v1/models/restore_azure_sql_params.go +++ /dev/null @@ -1,174 +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" -) - -// RestoreAzureSQLParams Azure SQL environent specific restore Parameters. -// -// swagger:model RestoreAzureSQLParams -type RestoreAzureSQLParams struct { - - // The type of temporary disk to be provisioned for database restore. - DiskType *int32 `json:"diskType,omitempty"` - - // The new name of the database. - // It is optional, if not specified then backup time database name will be - // used. - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - - // If false, recovery will fail if the database (with same name as this - // request) exists on the target server. - // If true, recovery will delete/overwrite the existing database as part of - // recovery. - OverwriteDatabase *bool `json:"overwriteDatabase,omitempty"` - - // SKU for the restored DB in case we want to override the backup time SKU. - RestoredDbSku *EntitySKU `json:"restoredDbSku,omitempty"` - - // SQL package options to be used by restore. - SQLPackageOptions *SQLPackage `json:"sqlPackageOptions,omitempty"` -} - -// Validate validates this restore azure SQL params -func (m *RestoreAzureSQLParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoredDbSku(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLPackageOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAzureSQLParams) validateRestoredDbSku(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredDbSku) { // not required - return nil - } - - if m.RestoredDbSku != nil { - if err := m.RestoredDbSku.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredDbSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredDbSku") - } - return err - } - } - - return nil -} - -func (m *RestoreAzureSQLParams) validateSQLPackageOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if m.SQLPackageOptions != nil { - if err := m.SQLPackageOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore azure SQL params based on the context it is used -func (m *RestoreAzureSQLParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoredDbSku(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLPackageOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreAzureSQLParams) contextValidateRestoredDbSku(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredDbSku != nil { - - if swag.IsZero(m.RestoredDbSku) { // not required - return nil - } - - if err := m.RestoredDbSku.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredDbSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredDbSku") - } - return err - } - } - - return nil -} - -func (m *RestoreAzureSQLParams) contextValidateSQLPackageOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLPackageOptions != nil { - - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if err := m.SQLPackageOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreAzureSQLParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreAzureSQLParams) UnmarshalBinary(b []byte) error { - var res RestoreAzureSQLParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_count_by_object_type.go b/v1/models/restore_count_by_object_type.go deleted file mode 100644 index b671b7f1..00000000 --- a/v1/models/restore_count_by_object_type.go +++ /dev/null @@ -1,55 +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" -) - -// RestoreCountByObjectType Restore Count by Object Type. -// -// Number of restore operations by object type. -// -// swagger:model RestoreCountByObjectType -type RestoreCountByObjectType struct { - - // Specifies the number of restores of the object type. - ObjectCount *int32 `json:"objectCount,omitempty"` - - // Specifies the type of the restored object. - ObjectType *string `json:"objectType,omitempty"` -} - -// Validate validates this restore count by object type -func (m *RestoreCountByObjectType) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore count by object type based on context it is used -func (m *RestoreCountByObjectType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreCountByObjectType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreCountByObjectType) UnmarshalBinary(b []byte) error { - var res RestoreCountByObjectType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_env_stats.go b/v1/models/restore_env_stats.go deleted file mode 100644 index f32b73c5..00000000 --- a/v1/models/restore_env_stats.go +++ /dev/null @@ -1,201 +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" -) - -// RestoreEnvStats Specifies the aggregated statistics for restores of a specific environment type. -// -// swagger:model RestoreEnvStats -type RestoreEnvStats struct { - - // Specifies the environment. - // Enum: ["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"] - Environment *string `json:"environment,omitempty"` - - // object count - ObjectCount *int64 `json:"objectCount,omitempty"` - - // total bytes - TotalBytes *int64 `json:"totalBytes,omitempty"` -} - -// Validate validates this restore env stats -func (m *RestoreEnvStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var restoreEnvStatsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreEnvStatsTypeEnvironmentPropEnum = append(restoreEnvStatsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RestoreEnvStatsEnvironmentKVMware captures enum value "kVMware" - RestoreEnvStatsEnvironmentKVMware string = "kVMware" - - // RestoreEnvStatsEnvironmentKHyperV captures enum value "kHyperV" - RestoreEnvStatsEnvironmentKHyperV string = "kHyperV" - - // RestoreEnvStatsEnvironmentKSQL captures enum value "kSQL" - RestoreEnvStatsEnvironmentKSQL string = "kSQL" - - // RestoreEnvStatsEnvironmentKView captures enum value "kView" - RestoreEnvStatsEnvironmentKView string = "kView" - - // RestoreEnvStatsEnvironmentKPuppeteer captures enum value "kPuppeteer" - RestoreEnvStatsEnvironmentKPuppeteer string = "kPuppeteer" - - // RestoreEnvStatsEnvironmentKPhysical captures enum value "kPhysical" - RestoreEnvStatsEnvironmentKPhysical string = "kPhysical" - - // RestoreEnvStatsEnvironmentKPure captures enum value "kPure" - RestoreEnvStatsEnvironmentKPure string = "kPure" - - // RestoreEnvStatsEnvironmentKNimble captures enum value "kNimble" - RestoreEnvStatsEnvironmentKNimble string = "kNimble" - - // RestoreEnvStatsEnvironmentKAzure captures enum value "kAzure" - RestoreEnvStatsEnvironmentKAzure string = "kAzure" - - // RestoreEnvStatsEnvironmentKNetapp captures enum value "kNetapp" - RestoreEnvStatsEnvironmentKNetapp string = "kNetapp" - - // RestoreEnvStatsEnvironmentKAgent captures enum value "kAgent" - RestoreEnvStatsEnvironmentKAgent string = "kAgent" - - // RestoreEnvStatsEnvironmentKGenericNas captures enum value "kGenericNas" - RestoreEnvStatsEnvironmentKGenericNas string = "kGenericNas" - - // RestoreEnvStatsEnvironmentKAcropolis captures enum value "kAcropolis" - RestoreEnvStatsEnvironmentKAcropolis string = "kAcropolis" - - // RestoreEnvStatsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RestoreEnvStatsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RestoreEnvStatsEnvironmentKIsilon captures enum value "kIsilon" - RestoreEnvStatsEnvironmentKIsilon string = "kIsilon" - - // RestoreEnvStatsEnvironmentKGPFS captures enum value "kGPFS" - RestoreEnvStatsEnvironmentKGPFS string = "kGPFS" - - // RestoreEnvStatsEnvironmentKKVM captures enum value "kKVM" - RestoreEnvStatsEnvironmentKKVM string = "kKVM" - - // RestoreEnvStatsEnvironmentKAWS captures enum value "kAWS" - RestoreEnvStatsEnvironmentKAWS string = "kAWS" - - // RestoreEnvStatsEnvironmentKExchange captures enum value "kExchange" - RestoreEnvStatsEnvironmentKExchange string = "kExchange" - - // RestoreEnvStatsEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RestoreEnvStatsEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RestoreEnvStatsEnvironmentKOracle captures enum value "kOracle" - RestoreEnvStatsEnvironmentKOracle string = "kOracle" - - // RestoreEnvStatsEnvironmentKGCP captures enum value "kGCP" - RestoreEnvStatsEnvironmentKGCP string = "kGCP" - - // RestoreEnvStatsEnvironmentKFlashBlade captures enum value "kFlashBlade" - RestoreEnvStatsEnvironmentKFlashBlade string = "kFlashBlade" - - // RestoreEnvStatsEnvironmentKAWSNative captures enum value "kAWSNative" - RestoreEnvStatsEnvironmentKAWSNative string = "kAWSNative" - - // RestoreEnvStatsEnvironmentKVCD captures enum value "kVCD" - RestoreEnvStatsEnvironmentKVCD string = "kVCD" - - // RestoreEnvStatsEnvironmentKO365 captures enum value "kO365" - RestoreEnvStatsEnvironmentKO365 string = "kO365" - - // RestoreEnvStatsEnvironmentKO365Outlook captures enum value "kO365Outlook" - RestoreEnvStatsEnvironmentKO365Outlook string = "kO365Outlook" - - // RestoreEnvStatsEnvironmentKHyperFlex captures enum value "kHyperFlex" - RestoreEnvStatsEnvironmentKHyperFlex string = "kHyperFlex" - - // RestoreEnvStatsEnvironmentKGCPNative captures enum value "kGCPNative" - RestoreEnvStatsEnvironmentKGCPNative string = "kGCPNative" - - // RestoreEnvStatsEnvironmentKAzureNative captures enum value "kAzureNative" - RestoreEnvStatsEnvironmentKAzureNative string = "kAzureNative" - - // RestoreEnvStatsEnvironmentKAD captures enum value "kAD" - RestoreEnvStatsEnvironmentKAD string = "kAD" - - // RestoreEnvStatsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - RestoreEnvStatsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" -) - -// prop value enum -func (m *RestoreEnvStats) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreEnvStatsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreEnvStats) 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 validates this restore env stats based on context it is used -func (m *RestoreEnvStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreEnvStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreEnvStats) UnmarshalBinary(b []byte) error { - var res RestoreEnvStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_exchange_params.go b/v1/models/restore_exchange_params.go deleted file mode 100644 index 3c0f2263..00000000 --- a/v1/models/restore_exchange_params.go +++ /dev/null @@ -1,163 +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" -) - -// RestoreExchangeParams Params specific to restoring an Exchange application. -// -// swagger:model RestoreExchangeParams -type RestoreExchangeParams struct { - - // Only applicable when ExchangeRestoreType.Type = kDatabase. - DatabaseOptions *RestoreExchangeParamsDatabaseOptions `json:"databaseOptions,omitempty"` - - // Restore type. - Type *int32 `json:"type,omitempty"` - - // Only applicable when ExchangeRestoreType.Type=kView. - ViewOptions *RestoreExchangeParamsViewOptions `json:"viewOptions,omitempty"` -} - -// Validate validates this restore exchange params -func (m *RestoreExchangeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreExchangeParams) validateDatabaseOptions(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseOptions) { // not required - return nil - } - - if m.DatabaseOptions != nil { - if err := m.DatabaseOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreExchangeParams) validateViewOptions(formats strfmt.Registry) error { - if swag.IsZero(m.ViewOptions) { // not required - return nil - } - - if m.ViewOptions != nil { - if err := m.ViewOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore exchange params based on the context it is used -func (m *RestoreExchangeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreExchangeParams) contextValidateDatabaseOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.DatabaseOptions != nil { - - if swag.IsZero(m.DatabaseOptions) { // not required - return nil - } - - if err := m.DatabaseOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreExchangeParams) contextValidateViewOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewOptions != nil { - - if swag.IsZero(m.ViewOptions) { // not required - return nil - } - - if err := m.ViewOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreExchangeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreExchangeParams) UnmarshalBinary(b []byte) error { - var res RestoreExchangeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_exchange_params_database_options.go b/v1/models/restore_exchange_params_database_options.go deleted file mode 100644 index 65124d92..00000000 --- a/v1/models/restore_exchange_params_database_options.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreExchangeParamsDatabaseOptions restore exchange params database options -// -// swagger:model RestoreExchangeParams_DatabaseOptions -type RestoreExchangeParamsDatabaseOptions struct { - - // Destination Database Name - DestDbName *string `json:"destDbName,omitempty"` - - // Target EDB dir path. Example: e:\myexchange\hrdb\hr_db.edb. - DestEdbFilepath *string `json:"destEdbFilepath,omitempty"` - - // Target LOG dir path. Example: e:\myexchange\hrdb. - DestLogDirpath *string `json:"destLogDirpath,omitempty"` - - // The windows machine to which the database will be restored. - // This field is deprecated. - EntityID *int64 `json:"entityId,omitempty"` - - // Mount the Database after successful recovery. For alternate location - // recovery this will result in Information Store Service restart on the - // target Exchange Node. - MountDb *bool `json:"mountDb,omitempty"` - - // Progress monitor task path for this entity. - ProgressMonitorPath *string `json:"progressMonitorPath,omitempty"` - - // Restore this DB as a Recovery Database on the target Exchange Node. - RestoreAsRecoveryDb *bool `json:"restoreAsRecoveryDb,omitempty"` - - // The entity proto for Exchange host to which the database will be - // restored. - TargetHostEntity *EntityProto `json:"targetHostEntity,omitempty"` - - // When replaying the logs, use the latest logs on Exchange for this DB. - // Applicable for restoring to original location only. - UseLatestLogs *bool `json:"useLatestLogs,omitempty"` -} - -// Validate validates this restore exchange params database options -func (m *RestoreExchangeParamsDatabaseOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetHostEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreExchangeParamsDatabaseOptions) validateTargetHostEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetHostEntity) { // not required - return nil - } - - if m.TargetHostEntity != nil { - if err := m.TargetHostEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore exchange params database options based on the context it is used -func (m *RestoreExchangeParamsDatabaseOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetHostEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreExchangeParamsDatabaseOptions) contextValidateTargetHostEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetHostEntity != nil { - - if swag.IsZero(m.TargetHostEntity) { // not required - return nil - } - - if err := m.TargetHostEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreExchangeParamsDatabaseOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreExchangeParamsDatabaseOptions) UnmarshalBinary(b []byte) error { - var res RestoreExchangeParamsDatabaseOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_exchange_params_view_options.go b/v1/models/restore_exchange_params_view_options.go deleted file mode 100644 index 9e99eee9..00000000 --- a/v1/models/restore_exchange_params_view_options.go +++ /dev/null @@ -1,57 +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" -) - -// RestoreExchangeParamsViewOptions restore exchange params view options -// -// swagger:model RestoreExchangeParams_ViewOptions -type RestoreExchangeParamsViewOptions struct { - - // The path to access the SMB share. - MountPoint *string `json:"mountPoint,omitempty"` - - // View to which the files of an Exchange database have to be cloned. - ViewName *string `json:"viewName,omitempty"` - - // If set to true then when restore view is cloned then white-list all - // IPs not just the agent IP. - WhitelistRestoreViewForAll *bool `json:"whitelistRestoreViewForAll,omitempty"` -} - -// Validate validates this restore exchange params view options -func (m *RestoreExchangeParamsViewOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore exchange params view options based on context it is used -func (m *RestoreExchangeParamsViewOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreExchangeParamsViewOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreExchangeParamsViewOptions) UnmarshalBinary(b []byte) error { - var res RestoreExchangeParamsViewOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_file_copy_stats.go b/v1/models/restore_file_copy_stats.go deleted file mode 100644 index 72aa9946..00000000 --- a/v1/models/restore_file_copy_stats.go +++ /dev/null @@ -1,77 +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" -) - -// RestoreFileCopyStats This message captures the progress information regarding restore of -// file/directory. -// -// swagger:model RestoreFileCopyStats -type RestoreFileCopyStats struct { - - // This will be set to true if the estimation step was skipped. - // NOTE: If estimation is skipped, then progress info will not be available. - EstimationSkipped *bool `json:"estimationSkipped,omitempty"` - - // Number of bytes copied so far. - NumBytesCopied *int64 `json:"numBytesCopied,omitempty"` - - // Number of directories copied so far. - // NOTE: This just means the creation of directory (not the contents of the - // directory). - NumDirectoriesCopied *int32 `json:"numDirectoriesCopied,omitempty"` - - // Number of errors encountered so far. - NumErrors *int64 `json:"numErrors,omitempty"` - - // Number of files copied so far. - NumFilesCopied *int32 `json:"numFilesCopied,omitempty"` - - // Total number of bytes to copy. - TotalBytesToCopy *int64 `json:"totalBytesToCopy,omitempty"` - - // Total number of directories to copy. - // NOTE: This just means the creation of directory (not the contents of the - // directory). - TotalDirectoriesToCopy *int32 `json:"totalDirectoriesToCopy,omitempty"` - - // Total number of files to copy. - TotalFilesToCopy *int32 `json:"totalFilesToCopy,omitempty"` -} - -// Validate validates this restore file copy stats -func (m *RestoreFileCopyStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore file copy stats based on context it is used -func (m *RestoreFileCopyStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFileCopyStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFileCopyStats) UnmarshalBinary(b []byte) error { - var res RestoreFileCopyStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_file_params.go b/v1/models/restore_file_params.go deleted file mode 100644 index 139fd1dc..00000000 --- a/v1/models/restore_file_params.go +++ /dev/null @@ -1,227 +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" -) - -// RestoreFileParams RestoreFileParams represents the argument for restoring files. -// -// swagger:model RestoreFileParams -type RestoreFileParams struct { - - // Params contain the options for restoring files. Please note that - // Params.RestoredFileInfoVec does not need to be populated as it is populated - // internally. - Params *RestoreFilesParams `json:"Params,omitempty"` - - // Filenames are the files/directories within this snapshot for which - // information is requested. - Filenames []string `json:"filenames"` - - // Name is the name of the restore task. This field is mandatory. - Name *string `json:"name,omitempty"` - - // Vlan Params associated with the restore. - // If this is not specified, then the VLAN settings will be automatically - // selected from one of the following options: - // a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be - // automatically based on the client's (e.g. ESXI host) IP address. - // b. If VLANs are not configured on Cohesity, then the partition hostname or - // VIPs will be used for restores. - RestoreVlanParams *VlanParams `json:"restoreVlanParams,omitempty"` - - // SourceObjectInfo is the information regarding the VM and the job details - // from which file/directory is to be restored. - SourceObjectInfo *RestoreObject `json:"sourceObjectInfo,omitempty"` -} - -// Validate validates this restore file params -func (m *RestoreFileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceObjectInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFileParams) validateParams(formats strfmt.Registry) error { - if swag.IsZero(m.Params) { // not required - return nil - } - - if m.Params != nil { - if err := m.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Params") - } - return err - } - } - - return nil -} - -func (m *RestoreFileParams) validateRestoreVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if m.RestoreVlanParams != nil { - if err := m.RestoreVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFileParams) validateSourceObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SourceObjectInfo) { // not required - 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 -} - -// ContextValidate validate this restore file params based on the context it is used -func (m *RestoreFileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFileParams) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - - if m.Params != nil { - - if swag.IsZero(m.Params) { // not required - return nil - } - - if err := m.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Params") - } - return err - } - } - - return nil -} - -func (m *RestoreFileParams) contextValidateRestoreVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVlanParams != nil { - - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if err := m.RestoreVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFileParams) 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 -} - -// MarshalBinary interface implementation -func (m *RestoreFileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFileParams) UnmarshalBinary(b []byte) error { - var res RestoreFileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_file_result_info.go b/v1/models/restore_file_result_info.go deleted file mode 100644 index 2f9fca59..00000000 --- a/v1/models/restore_file_result_info.go +++ /dev/null @@ -1,224 +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" -) - -// RestoreFileResultInfo This message captures result of restore of individual file or directory -// as initiated from magneto. -// Note, it is expected that the agents go through the "estimation" phase -// first for the entire batch of restore requests and then start copying. -// These state transitions are reflected in the "status" field here. -// -// swagger:model RestoreFileResultInfo -type RestoreFileResultInfo struct { - - // This captures the copy stats for this file and is present when the status - // is kInProgress. - CopyStats *RestoreFileCopyStats `json:"copyStats,omitempty"` - - // This is set to the destination directory where the file/directory was - // copied. - DestinationDir *string `json:"destinationDir,omitempty"` - - // This is set if there is any error during the restore. - Error *ErrorProto `json:"error,omitempty"` - - // Information of the file being restored. - // Note, the agent does not need to populate this. - RestoredFileInfo *RestoredFileInfo `json:"restoredFileInfo,omitempty"` - - // Status of the restore. - Status *int32 `json:"status,omitempty"` -} - -// Validate validates this restore file result info -func (m *RestoreFileResultInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredFileInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFileResultInfo) validateCopyStats(formats strfmt.Registry) error { - if swag.IsZero(m.CopyStats) { // not required - return nil - } - - if m.CopyStats != nil { - if err := m.CopyStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyStats") - } - return err - } - } - - return nil -} - -func (m *RestoreFileResultInfo) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RestoreFileResultInfo) validateRestoredFileInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredFileInfo) { // not required - return nil - } - - if m.RestoredFileInfo != nil { - if err := m.RestoredFileInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore file result info based on the context it is used -func (m *RestoreFileResultInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredFileInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFileResultInfo) contextValidateCopyStats(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyStats != nil { - - if swag.IsZero(m.CopyStats) { // not required - return nil - } - - if err := m.CopyStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyStats") - } - return err - } - } - - return nil -} - -func (m *RestoreFileResultInfo) 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 -} - -func (m *RestoreFileResultInfo) contextValidateRestoredFileInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredFileInfo != nil { - - if swag.IsZero(m.RestoredFileInfo) { // not required - return nil - } - - if err := m.RestoredFileInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFileResultInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFileResultInfo) UnmarshalBinary(b []byte) error { - var res RestoreFileResultInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_files_info_proto.go b/v1/models/restore_files_info_proto.go deleted file mode 100644 index d1355f9e..00000000 --- a/v1/models/restore_files_info_proto.go +++ /dev/null @@ -1,314 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreFilesInfoProto Message that encapsulates information about restore file tasks for any of -// the environments we support. Environment specific restore infos are defined -// as extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// RestoreFilesInfoProto extension Location Extn -// ============================================================================= -// vmware::RestoreFilesInfo::vmware_restore_files_info -// vmware/vmware.proto 100 -// AgentRestoreFilesInfo::agent_restore_files_info base/agent.proto 101 -// file::RestoreFilesInfo::restore_files_info -// file/file.proto 102 -// hyperv::RestoreFilesInfo::hyperv_restore_files_info -// hyperv/hyperv.proto 103 -// ============================================================================= -// -// swagger:model RestoreFilesInfoProto -type RestoreFilesInfoProto struct { - - // The path that the user should use to download files through the UI. If - // only a single file needs to be downloaded, this will be the path to that - // file. If a directory or multiple files & directories need to be - // downloaded, this will be the path to the .zip file to download. Only - // applicable to a download files task. - DownloadFilesPath *string `json:"downloadFilesPath,omitempty"` - - // If the restore files failed, this field may contain the cause of the - // failure. - Error *ErrorProto `json:"error,omitempty"` - - // The expiry time of the view. Applicable for download files task (if filled - // by adapter). - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Contains the connector params of the proxy server if one was specified. - ProxyEntityConnectorParams *ConnectorParams `json:"proxyEntityConnectorParams,omitempty"` - - // Contains the result information of the restored files. - RestoreFilesResultVec []*RestoreFileResultInfo `json:"restoreFilesResultVec"` - - // This is the timestamp at which the slave task started. - SlaveTaskStartTimeUsecs *int64 `json:"slaveTaskStartTimeUsecs,omitempty"` - - // Specifies the target type for the task. The field is only valid if the - // task has got a permit. - TargetType *int32 `json:"targetType,omitempty"` - - // If an error was encountered during teardown of the setup (for ex: - // unmounting the datastore from the host), then this field will contain - // the cause of the failure. - TeardownError *ErrorProto `json:"teardownError,omitempty"` - - // The type of environment this restore files info pertains to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this restore files info proto -func (m *RestoreFilesInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyEntityConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreFilesResultVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeardownError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesInfoProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RestoreFilesInfoProto) validateProxyEntityConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyEntityConnectorParams) { // not required - return nil - } - - if m.ProxyEntityConnectorParams != nil { - if err := m.ProxyEntityConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntityConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntityConnectorParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesInfoProto) validateRestoreFilesResultVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreFilesResultVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreFilesResultVec); i++ { - if swag.IsZero(m.RestoreFilesResultVec[i]) { // not required - continue - } - - if m.RestoreFilesResultVec[i] != nil { - if err := m.RestoreFilesResultVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesInfoProto) validateTeardownError(formats strfmt.Registry) error { - if swag.IsZero(m.TeardownError) { // not required - return nil - } - - if m.TeardownError != nil { - if err := m.TeardownError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teardownError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teardownError") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore files info proto based on the context it is used -func (m *RestoreFilesInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyEntityConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreFilesResultVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeardownError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesInfoProto) 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 -} - -func (m *RestoreFilesInfoProto) contextValidateProxyEntityConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyEntityConnectorParams != nil { - - if swag.IsZero(m.ProxyEntityConnectorParams) { // not required - return nil - } - - if err := m.ProxyEntityConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntityConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntityConnectorParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesInfoProto) contextValidateRestoreFilesResultVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreFilesResultVec); i++ { - - if m.RestoreFilesResultVec[i] != nil { - - if swag.IsZero(m.RestoreFilesResultVec[i]) { // not required - return nil - } - - if err := m.RestoreFilesResultVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesResultVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesResultVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesInfoProto) contextValidateTeardownError(ctx context.Context, formats strfmt.Registry) error { - - if m.TeardownError != nil { - - if swag.IsZero(m.TeardownError) { // not required - return nil - } - - if err := m.TeardownError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teardownError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teardownError") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesInfoProto) UnmarshalBinary(b []byte) error { - var res RestoreFilesInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_files_params.go b/v1/models/restore_files_params.go deleted file mode 100644 index 62002efa..00000000 --- a/v1/models/restore_files_params.go +++ /dev/null @@ -1,875 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreFilesParams This message captures all the necessary arguments specified by the user to -// restore files to the source. -// -// swagger:model RestoreFilesParams -type RestoreFilesParams struct { - - // A list of target IP addresses that should not be used. - BlacklistedIPAddrs []string `json:"blacklistedIpAddrs"` - - // Destination endpoint UUID for source s3 objectstore. - DestinationEpUUID *string `json:"destinationEpUuid,omitempty"` - - // Directory name security style map contains mapping of the directory name - // to security style it supports. This is needed to restore the same - // permission for the given directory for Qtrees. - DirectoryNameSecurityStyleMap []*RestoreFilesParamsDirectoryNameSecurityStyleMapEntry `json:"directoryNameSecurityStyleMap"` - - // Glacier restore option chosen by the user. - GlacierFlrRestoreOption *int32 `json:"glacierFlrRestoreOption,omitempty"` - - // Whether this is a file restore operation from an archive. - IsArchiveFlr *bool `json:"isArchiveFlr,omitempty"` - - // Whether this is a file based volume restore. - IsFileVolumeRestore *bool `json:"isFileVolumeRestore,omitempty"` - - // Whether this is a mount based file restore operation - IsMountBasedFlr *bool `json:"isMountBasedFlr,omitempty"` - - // Whether this is a source initiated restore. - IsSourceInitiatedRestore *bool `json:"isSourceInitiatedRestore,omitempty"` - - // This is applicable if target entity is of kIsilon type. - IsilonEnvParams *IsilonEnvParams `json:"isilonEnvParams,omitempty"` - - // Whether this will attach disks or mount disks on the VM side OR use - // Storage Proxy RPCs to stream data. - MountDisksOnVM *bool `json:"mountDisksOnVm,omitempty"` - - // Used to determining filtering_policy for NAS Migration uptier operation. - // Currently this is set only if this is NAS Migration uptier operation. - NasBackupParams *NasBackupParams `json:"nasBackupParams,omitempty"` - - // The NAS protocol type(s) of this restore task. Currently we only support a - // single restore type. This field is only populated for NAS restore tasks. - NasProtocolTypeVec []int32 `json:"nasProtocolTypeVec"` - - // Object store config name for source initiated backup. - ObjectstoreConfigName *string `json:"objectstoreConfigName,omitempty"` - - // If enabled, magneto physical file restore will be enabled via job - // framework - PhysicalFlrParallelRestore *bool `json:"physicalFlrParallelRestore,omitempty"` - - // If the proxy entity is specified, then the virtual disks are attached to - // the proxy server and the file copy will be initiated through this server. - ProxyEntity *EntityProto `json:"proxyEntity,omitempty"` - - // If the proxy entity above is specified, then it's parent entity must be - // specified as well. - ProxyEntityParentSource *EntityProto `json:"proxyEntityParentSource,omitempty"` - - // Preferences for the restore files operation. - RestoreFilesPreferences *RestoreFilesPreferences `json:"restoreFilesPreferences,omitempty"` - - // Determines the type of method to be used to perform FLR. - RestoreMethod *int32 `json:"restoreMethod,omitempty"` - - // Information regarding files and directories. - RestoredFileInfoVec []*RestoredFileInfo `json:"restoredFileInfoVec"` - - // This message captures all the details of S3 view from where the - // data is restored. - S3Viewbackupproperties *S3ViewBackupProperties `json:"s3Viewbackupproperties,omitempty"` - - // Snapshot name need by source to start the restore. - SourceSnapshotName *string `json:"sourceSnapshotName,omitempty"` - - // The following fields only need to be set if restoring to a target location - // (i.e., not downloading the files directly). - // - // Target entity where the files are being restored to. - TargetEntity *EntityProto `json:"targetEntity,omitempty"` - - // Credentials to access the target entity such as a VM. In case of physical - // server, the copy process will be launched as this user. - // NOTE: If proxy entity is specified, then this credentials will be used for - // running operations on proxy server as well. - TargetEntityCredentials *Credentials `json:"targetEntityCredentials,omitempty"` - - // The registered source (i.e vCenter or ESXi host in VMware environment) - // under which the target entity is present. - TargetEntityParentSource *EntityProto `json:"targetEntityParentSource,omitempty"` - - // Host entity where the target entity resides. This is only populated for - // Netapp environments right now if target_entity_parent_source is a - // cluster. For example, the host of a target Netapp volume will be the - // vserver it belongs to. - TargetHostEntity *EntityProto `json:"targetHostEntity,omitempty"` - - // The host environment type. This is set in VMware environment to - // indicate the OS type of the target entity. - // NOTE: This is expected to be set since magneto does not know the host type - // for VMware entities. - TargetHostType *int32 `json:"targetHostType,omitempty"` - - // Set if this is NAS Migration uptier operation. - UptierParams *FileUptieringParams `json:"uptierParams,omitempty"` - - // Whether this will use an existing agent on the target VM to do the - // restore. - // This field is deprecated. restore_method should be used for populating - // use of existing agent. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // View ID - ViewID *int64 `json:"viewId,omitempty"` - - // Name of the S3 view - ViewName *string `json:"viewName,omitempty"` - - // Entity of the VPC connector, required in case of GCP FLR. - VpcConnectorEntity *EntityProto `json:"vpcConnectorEntity,omitempty"` - - // A list of target IP addresses that should be used exclusively. - WhitelistedIPAddrs []string `json:"whitelistedIpAddrs"` -} - -// Validate validates this restore files params -func (m *RestoreFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirectoryNameSecurityStyleMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonEnvParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyEntityParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreFilesPreferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredFileInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Viewbackupproperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntityCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEntityParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetHostEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptierParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpcConnectorEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesParams) validateDirectoryNameSecurityStyleMap(formats strfmt.Registry) error { - if swag.IsZero(m.DirectoryNameSecurityStyleMap) { // not required - return nil - } - - for i := 0; i < len(m.DirectoryNameSecurityStyleMap); i++ { - if swag.IsZero(m.DirectoryNameSecurityStyleMap[i]) { // not required - continue - } - - if m.DirectoryNameSecurityStyleMap[i] != nil { - if err := m.DirectoryNameSecurityStyleMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directoryNameSecurityStyleMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directoryNameSecurityStyleMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesParams) validateIsilonEnvParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if m.IsilonEnvParams != nil { - if err := m.IsilonEnvParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateNasBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.NasBackupParams) { // not required - return nil - } - - if m.NasBackupParams != nil { - if err := m.NasBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasBackupParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateProxyEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyEntity) { // not required - return nil - } - - if m.ProxyEntity != nil { - if err := m.ProxyEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateProxyEntityParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyEntityParentSource) { // not required - return nil - } - - if m.ProxyEntityParentSource != nil { - if err := m.ProxyEntityParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntityParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntityParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateRestoreFilesPreferences(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreFilesPreferences) { // not required - return nil - } - - if m.RestoreFilesPreferences != nil { - if err := m.RestoreFilesPreferences.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesPreferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesPreferences") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateRestoredFileInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredFileInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoredFileInfoVec); i++ { - if swag.IsZero(m.RestoredFileInfoVec[i]) { // not required - continue - } - - if m.RestoredFileInfoVec[i] != nil { - if err := m.RestoredFileInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesParams) validateS3Viewbackupproperties(formats strfmt.Registry) error { - if swag.IsZero(m.S3Viewbackupproperties) { // not required - return nil - } - - if m.S3Viewbackupproperties != nil { - if err := m.S3Viewbackupproperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Viewbackupproperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Viewbackupproperties") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if m.TargetEntity != nil { - if err := m.TargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateTargetEntityCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if m.TargetEntityCredentials != nil { - if err := m.TargetEntityCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateTargetEntityParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.TargetEntityParentSource) { // not required - return nil - } - - if m.TargetEntityParentSource != nil { - if err := m.TargetEntityParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateTargetHostEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetHostEntity) { // not required - return nil - } - - if m.TargetHostEntity != nil { - if err := m.TargetHostEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateUptierParams(formats strfmt.Registry) error { - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if m.UptierParams != nil { - if err := m.UptierParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) validateVpcConnectorEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VpcConnectorEntity) { // not required - return nil - } - - if m.VpcConnectorEntity != nil { - if err := m.VpcConnectorEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpcConnectorEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpcConnectorEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore files params based on the context it is used -func (m *RestoreFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDirectoryNameSecurityStyleMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonEnvParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyEntityParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreFilesPreferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredFileInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3Viewbackupproperties(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntityCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetEntityParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetHostEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUptierParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpcConnectorEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesParams) contextValidateDirectoryNameSecurityStyleMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DirectoryNameSecurityStyleMap); i++ { - - if m.DirectoryNameSecurityStyleMap[i] != nil { - - if swag.IsZero(m.DirectoryNameSecurityStyleMap[i]) { // not required - return nil - } - - if err := m.DirectoryNameSecurityStyleMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directoryNameSecurityStyleMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directoryNameSecurityStyleMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateIsilonEnvParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonEnvParams != nil { - - if swag.IsZero(m.IsilonEnvParams) { // not required - return nil - } - - if err := m.IsilonEnvParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonEnvParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonEnvParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateNasBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasBackupParams != nil { - - if swag.IsZero(m.NasBackupParams) { // not required - return nil - } - - if err := m.NasBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasBackupParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateProxyEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyEntity != nil { - - if swag.IsZero(m.ProxyEntity) { // not required - return nil - } - - if err := m.ProxyEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateProxyEntityParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyEntityParentSource != nil { - - if swag.IsZero(m.ProxyEntityParentSource) { // not required - return nil - } - - if err := m.ProxyEntityParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyEntityParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyEntityParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateRestoreFilesPreferences(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreFilesPreferences != nil { - - if swag.IsZero(m.RestoreFilesPreferences) { // not required - return nil - } - - if err := m.RestoreFilesPreferences.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesPreferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesPreferences") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateRestoredFileInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoredFileInfoVec); i++ { - - if m.RestoredFileInfoVec[i] != nil { - - if swag.IsZero(m.RestoredFileInfoVec[i]) { // not required - return nil - } - - if err := m.RestoredFileInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateS3Viewbackupproperties(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Viewbackupproperties != nil { - - if swag.IsZero(m.S3Viewbackupproperties) { // not required - return nil - } - - if err := m.S3Viewbackupproperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Viewbackupproperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Viewbackupproperties") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntity != nil { - - if swag.IsZero(m.TargetEntity) { // not required - return nil - } - - if err := m.TargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateTargetEntityCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntityCredentials != nil { - - if swag.IsZero(m.TargetEntityCredentials) { // not required - return nil - } - - if err := m.TargetEntityCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityCredentials") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateTargetEntityParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetEntityParentSource != nil { - - if swag.IsZero(m.TargetEntityParentSource) { // not required - return nil - } - - if err := m.TargetEntityParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetEntityParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetEntityParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateTargetHostEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetHostEntity != nil { - - if swag.IsZero(m.TargetHostEntity) { // not required - return nil - } - - if err := m.TargetHostEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetHostEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetHostEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateUptierParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UptierParams != nil { - - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if err := m.UptierParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesParams) contextValidateVpcConnectorEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VpcConnectorEntity != nil { - - if swag.IsZero(m.VpcConnectorEntity) { // not required - return nil - } - - if err := m.VpcConnectorEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpcConnectorEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpcConnectorEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesParams) UnmarshalBinary(b []byte) error { - var res RestoreFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_files_params_directory_name_security_style_map_entry.go b/v1/models/restore_files_params_directory_name_security_style_map_entry.go deleted file mode 100644 index 59f12a46..00000000 --- a/v1/models/restore_files_params_directory_name_security_style_map_entry.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" -) - -// RestoreFilesParamsDirectoryNameSecurityStyleMapEntry restore files params directory name security style map entry -// -// swagger:model RestoreFilesParams_DirectoryNameSecurityStyleMapEntry -type RestoreFilesParamsDirectoryNameSecurityStyleMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this restore files params directory name security style map entry -func (m *RestoreFilesParamsDirectoryNameSecurityStyleMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore files params directory name security style map entry based on context it is used -func (m *RestoreFilesParamsDirectoryNameSecurityStyleMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesParamsDirectoryNameSecurityStyleMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesParamsDirectoryNameSecurityStyleMapEntry) UnmarshalBinary(b []byte) error { - var res RestoreFilesParamsDirectoryNameSecurityStyleMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_files_preferences.go b/v1/models/restore_files_preferences.go deleted file mode 100644 index 4bb0a8b9..00000000 --- a/v1/models/restore_files_preferences.go +++ /dev/null @@ -1,89 +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" -) - -// RestoreFilesPreferences This message captures preferences from the user while restoring the files -// on the target. -// -// swagger:model RestoreFilesPreferences -type RestoreFilesPreferences struct { - - // This must be set to a directory path if restore_to_original_paths is - // false. All the files and directories restored will be restored under this - // location. - AlternateRestoreBaseDirectory *string `json:"alternateRestoreBaseDirectory,omitempty"` - - // Whether to continue with the copy in case of encountering an error. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Whether to enable encryption for NFS and SMB restores. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // In case of GCP Linux restores, whether to generate ssh keys to connect to - // the customer's instance. - GenerateSSHKeys *bool `json:"generateSshKeys,omitempty"` - - // This is relevant only if restore_to_original_paths is true. If this is - // true, then already existing files will be overridden, otherwise new files - // will be skipped. - OverrideOriginals *bool `json:"overrideOriginals,omitempty"` - - // Whether to preserve the ACLs of the original file. - PreserveAcls *bool `json:"preserveAcls,omitempty"` - - // Whether to preserve the original attributes. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Whether to preserve the original time stamps. - PreserveTimestamps *bool `json:"preserveTimestamps,omitempty"` - - // Option to select whether to restore everything or ACLs only. - RestoreEntities *int32 `json:"restoreEntities,omitempty"` - - // If this is true, then files will be restored to original paths. - RestoreToOriginalPaths *bool `json:"restoreToOriginalPaths,omitempty"` - - // Whether to save success files for FLR. - SaveSuccessFiles *bool `json:"saveSuccessFiles,omitempty"` - - // Whether to skip the estimation step. - SkipEstimation *bool `json:"skipEstimation,omitempty"` -} - -// Validate validates this restore files preferences -func (m *RestoreFilesPreferences) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore files preferences based on context it is used -func (m *RestoreFilesPreferences) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesPreferences) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesPreferences) UnmarshalBinary(b []byte) error { - var res RestoreFilesPreferences - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_files_task_request.go b/v1/models/restore_files_task_request.go deleted file mode 100644 index 369898aa..00000000 --- a/v1/models/restore_files_task_request.go +++ /dev/null @@ -1,462 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RestoreFilesTaskRequest Restore Task. -// -// Specifies information about a Restore Task that recovers files and -// folders. -// -// swagger:model RestoreFilesTaskRequest -type RestoreFilesTaskRequest struct { - - // Specifies if the Restore Task should continue even if the copy operation - // of some files and folders fails. If true, the Cohesity Cluster - // ignores intermittent errors and recovers as many files and folders - // as possible. - // If false, the Restore Task stops recovering when a copy operation fails. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the type of method to be used to perform file recovery. - // 'kAutoDeploy' indicates that file restore operation wiil be performed using - // an ephemeral agent. - // 'kUseExistingAgent' indicates that file restore operation wiil be performed - // using an persistent agent. - // 'kUseHypervisorAPIs' indicates that file restore operation wiil be performed - // using an hypervisor API's. - // Enum: ["kAutoDeploy","kUseExistingAgent","kUseHypervisorAPIs"] - FileRecoveryMethod *string `json:"fileRecoveryMethod,omitempty"` - - // Array of Files or Folders. - // - // Specifies the files and folders to recover from the snapshot. - Filenames []string `json:"filenames"` - - // Specifies the list of IP addresses that are allowed or denied during - // restore. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies whether this is a file based volume restore. - IsFileBasedVolumeRestore *bool `json:"isFileBasedVolumeRestore,omitempty"` - - // Sepcifies whether this will attach disks or mount disks on the VM side - // OR use Storage Proxy RPCs to stream data - MountDisksOnVM *bool `json:"mountDisksOnVm,omitempty"` - - // Specifies the name of the Restore Task. This field must be set and - // must be a unique name. - Name *string `json:"name,omitempty"` - - // Specifies an optional root folder where to recover the selected - // files and folders. - // By default, files and folders are restored to their original path. - NewBaseDirectory *string `json:"newBaseDirectory,omitempty"` - - // If true, any existing files and folders on the operating system - // are overwritten by the recovered files or folders. This is the default. - // If false, existing files and folders are not overwritten. - Overwrite *bool `json:"overwrite,omitempty"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // If true, the Restore Tasks preserves the original file and - // folder attributes. This is the default. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies information regarding files and directories. - RestoredFileInfoList []*RestoredFileInfoList `json:"restoredFileInfoList"` - - // source object info - SourceObjectInfo *RestoreFilesTaskRequestSourceObjectInfo `json:"sourceObjectInfo,omitempty"` - - // Specifies the target host types to be restored. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - TargetHostType *string `json:"targetHostType,omitempty"` - - // Specifies the registered source (such as a vCenter Server) - // that contains the target protection source (such as a VM) - // where the files and folders are recovered to. - // This field is not required for a Physical Server. - TargetParentSourceID *int64 `json:"targetParentSourceId,omitempty"` - - // Specifies the id of the target protection source (such as a VM) - // where the files and folders are recovered to. - TargetSourceID *int64 `json:"targetSourceId,omitempty"` - - // Specifies whether this will use an existing agent on the target vm - // to do restore. Following field is deprecated and shall not be used. - // Please refer to the FileRecoveryMethod field for more information. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` -} - -// Validate validates this restore files task request -func (m *RestoreFilesTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileRecoveryMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredFileInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetHostType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var restoreFilesTaskRequestTypeFileRecoveryMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAutoDeploy","kUseExistingAgent","kUseHypervisorAPIs"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreFilesTaskRequestTypeFileRecoveryMethodPropEnum = append(restoreFilesTaskRequestTypeFileRecoveryMethodPropEnum, v) - } -} - -const ( - - // RestoreFilesTaskRequestFileRecoveryMethodKAutoDeploy captures enum value "kAutoDeploy" - RestoreFilesTaskRequestFileRecoveryMethodKAutoDeploy string = "kAutoDeploy" - - // RestoreFilesTaskRequestFileRecoveryMethodKUseExistingAgent captures enum value "kUseExistingAgent" - RestoreFilesTaskRequestFileRecoveryMethodKUseExistingAgent string = "kUseExistingAgent" - - // RestoreFilesTaskRequestFileRecoveryMethodKUseHypervisorAPIs captures enum value "kUseHypervisorAPIs" - RestoreFilesTaskRequestFileRecoveryMethodKUseHypervisorAPIs string = "kUseHypervisorAPIs" -) - -// prop value enum -func (m *RestoreFilesTaskRequest) validateFileRecoveryMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreFilesTaskRequestTypeFileRecoveryMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreFilesTaskRequest) validateFileRecoveryMethod(formats strfmt.Registry) error { - if swag.IsZero(m.FileRecoveryMethod) { // not required - return nil - } - - // value enum - if err := m.validateFileRecoveryMethodEnum("fileRecoveryMethod", "body", *m.FileRecoveryMethod); err != nil { - return err - } - - return nil -} - -func (m *RestoreFilesTaskRequest) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesTaskRequest) validateRestoredFileInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredFileInfoList) { // not required - return nil - } - - for i := 0; i < len(m.RestoredFileInfoList); i++ { - if swag.IsZero(m.RestoredFileInfoList[i]) { // not required - continue - } - - if m.RestoredFileInfoList[i] != nil { - if err := m.RestoredFileInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreFilesTaskRequest) validateSourceObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SourceObjectInfo) { // not required - 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 -} - -var restoreFilesTaskRequestTypeTargetHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreFilesTaskRequestTypeTargetHostTypePropEnum = append(restoreFilesTaskRequestTypeTargetHostTypePropEnum, v) - } -} - -const ( - - // RestoreFilesTaskRequestTargetHostTypeKLinux captures enum value "kLinux" - RestoreFilesTaskRequestTargetHostTypeKLinux string = "kLinux" - - // RestoreFilesTaskRequestTargetHostTypeKWindows captures enum value "kWindows" - RestoreFilesTaskRequestTargetHostTypeKWindows string = "kWindows" - - // RestoreFilesTaskRequestTargetHostTypeKAix captures enum value "kAix" - RestoreFilesTaskRequestTargetHostTypeKAix string = "kAix" - - // RestoreFilesTaskRequestTargetHostTypeKSolaris captures enum value "kSolaris" - RestoreFilesTaskRequestTargetHostTypeKSolaris string = "kSolaris" - - // RestoreFilesTaskRequestTargetHostTypeKSapHana captures enum value "kSapHana" - RestoreFilesTaskRequestTargetHostTypeKSapHana string = "kSapHana" - - // RestoreFilesTaskRequestTargetHostTypeKSapOracle captures enum value "kSapOracle" - RestoreFilesTaskRequestTargetHostTypeKSapOracle string = "kSapOracle" - - // RestoreFilesTaskRequestTargetHostTypeKCockroachDB captures enum value "kCockroachDB" - RestoreFilesTaskRequestTargetHostTypeKCockroachDB string = "kCockroachDB" - - // RestoreFilesTaskRequestTargetHostTypeKMySQL captures enum value "kMySQL" - RestoreFilesTaskRequestTargetHostTypeKMySQL string = "kMySQL" - - // RestoreFilesTaskRequestTargetHostTypeKOther captures enum value "kOther" - RestoreFilesTaskRequestTargetHostTypeKOther string = "kOther" - - // RestoreFilesTaskRequestTargetHostTypeKSapSybase captures enum value "kSapSybase" - RestoreFilesTaskRequestTargetHostTypeKSapSybase string = "kSapSybase" - - // RestoreFilesTaskRequestTargetHostTypeKSapMaxDB captures enum value "kSapMaxDB" - RestoreFilesTaskRequestTargetHostTypeKSapMaxDB string = "kSapMaxDB" - - // RestoreFilesTaskRequestTargetHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - RestoreFilesTaskRequestTargetHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // RestoreFilesTaskRequestTargetHostTypeKDB2 captures enum value "kDB2" - RestoreFilesTaskRequestTargetHostTypeKDB2 string = "kDB2" - - // RestoreFilesTaskRequestTargetHostTypeKSapASE captures enum value "kSapASE" - RestoreFilesTaskRequestTargetHostTypeKSapASE string = "kSapASE" - - // RestoreFilesTaskRequestTargetHostTypeKMariaDB captures enum value "kMariaDB" - RestoreFilesTaskRequestTargetHostTypeKMariaDB string = "kMariaDB" - - // RestoreFilesTaskRequestTargetHostTypeKPostgreSQL captures enum value "kPostgreSQL" - RestoreFilesTaskRequestTargetHostTypeKPostgreSQL string = "kPostgreSQL" - - // RestoreFilesTaskRequestTargetHostTypeKVOS captures enum value "kVOS" - RestoreFilesTaskRequestTargetHostTypeKVOS string = "kVOS" - - // RestoreFilesTaskRequestTargetHostTypeKHPUX captures enum value "kHPUX" - RestoreFilesTaskRequestTargetHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *RestoreFilesTaskRequest) validateTargetHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreFilesTaskRequestTypeTargetHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreFilesTaskRequest) validateTargetHostType(formats strfmt.Registry) error { - if swag.IsZero(m.TargetHostType) { // not required - return nil - } - - // value enum - if err := m.validateTargetHostTypeEnum("targetHostType", "body", *m.TargetHostType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this restore files task request based on the context it is used -func (m *RestoreFilesTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredFileInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesTaskRequest) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesTaskRequest) contextValidateRestoredFileInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoredFileInfoList); i++ { - - if m.RestoredFileInfoList[i] != nil { - - if swag.IsZero(m.RestoredFileInfoList[i]) { // not required - return nil - } - - if err := m.RestoredFileInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredFileInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredFileInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RestoreFilesTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesTaskRequest) UnmarshalBinary(b []byte) error { - var res RestoreFilesTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_files_task_state_proto.go b/v1/models/restore_files_task_state_proto.go deleted file mode 100644 index b9a9f7f9..00000000 --- a/v1/models/restore_files_task_state_proto.go +++ /dev/null @@ -1,162 +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" -) - -// RestoreFilesTaskStateProto Persistent state for a "restore files" task. -// -// swagger:model RestoreFilesTaskStateProto -type RestoreFilesTaskStateProto struct { - - // Contains information about this restore files task that is populated by - // the slave. - RestoreFilesInfo *RestoreFilesInfoProto `json:"restoreFilesInfo,omitempty"` - - // This captures all the necessary information required to perform restore - // to source task. - RestoreParams *RestoreFilesParams `json:"restoreParams,omitempty"` -} - -// Validate validates this restore files task state proto -func (m *RestoreFilesTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreFilesInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesTaskStateProto) validateRestoreFilesInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreFilesInfo) { // not required - return nil - } - - if m.RestoreFilesInfo != nil { - if err := m.RestoreFilesInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesTaskStateProto) validateRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if m.RestoreParams != nil { - if err := m.RestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore files task state proto based on the context it is used -func (m *RestoreFilesTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreFilesInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreFilesTaskStateProto) contextValidateRestoreFilesInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreFilesInfo != nil { - - if swag.IsZero(m.RestoreFilesInfo) { // not required - return nil - } - - if err := m.RestoreFilesInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreFilesTaskStateProto) contextValidateRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParams != nil { - - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if err := m.RestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesTaskStateProto) UnmarshalBinary(b []byte) error { - var res RestoreFilesTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_hyper_v_vm_params.go b/v1/models/restore_hyper_v_vm_params.go deleted file mode 100644 index e7f63995..00000000 --- a/v1/models/restore_hyper_v_vm_params.go +++ /dev/null @@ -1,408 +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" -) - -// RestoreHyperVVMParams This message defines the HyperV specific VMs restore params. -// -// swagger:model RestoreHyperVVMParams -type RestoreHyperVVMParams struct { - - // Whether to perform copy recovery. - CopyRecovery *bool `json:"copyRecovery,omitempty"` - - // A datastore entity where the object's files should be restored to. This - // field is optional if object is being restored to its original parent - // source. If not specified, the object's files will be restored to their - // original datastore locations. This field is mandatory if object is being - // restored to a different resource entity or to a different parent source. - DatastoreEntity *EntityProto `json:"datastoreEntity,omitempty"` - - // The power state configuration to be applied to the restored VM. - // - // Semantics for kRecoverVMs task: By default, VMs are restored in their - // original power state. - // - // This proto can be used to override the default behavior for the restore - // task. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // Whether disks that were excluded during backup should be recovered as - // blank disks. - RecoverExcludedDisksAsBlankDisks *bool `json:"recoverExcludedDisksAsBlankDisks,omitempty"` - - // By default, VMs are restored with their original name. This field can - // be used to specify the transformation ( i.e prefix/suffix) to be applied - // to the source VM name to derive the new name of the restored VM. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // The resource (HyperV host) to which the restored VM will be attached. - // - // This field is optional for a kRecoverVMs task if the VMs are being - // restored to its original parent source. If not specified, restored VMs - // will be attached to its original host. This field is mandatory if the - // VMs are being restored to a different parent source. - ResourceEntity *EntityProto `json:"resourceEntity,omitempty"` - - // The network configuration to be applied to the restored VMs. - // - // Semantics for kRecoverVMs task: By default, if the VMs are being restored - // to their original location, then original network configuration will be - // preserved. If objects are being restored to different location (i.e., - // different parent source), then network will be detached. - // - // Below field can be used to override the default network configuration of - // the restored VMs. - // - // If user want to keep the original network setting for kRecoverVMs task, - // then this proto should not be set. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Whether to recover via Cohesity SMB service. - UseSmbService *bool `json:"useSmbService,omitempty"` - - // UUID config to use for restored VM. - // - // Semantics for kRecoverVMs task: By default, recovered VMs have new UUIDs - // for them. - // - // This proto can be used to override the default behavior for the restore - // task. - UUIDConfig *UUIDConfigProto `json:"uuidConfig,omitempty"` -} - -// Validate validates this restore hyper v VM params -func (m *RestoreHyperVVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUUIDConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreHyperVVMParams) validateDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if m.DatastoreEntity != nil { - if err := m.DatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) validateResourceEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceEntity) { // not required - return nil - } - - if m.ResourceEntity != nil { - if err := m.ResourceEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) validateUUIDConfig(formats strfmt.Registry) error { - if swag.IsZero(m.UUIDConfig) { // not required - return nil - } - - if m.UUIDConfig != nil { - if err := m.UUIDConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uuidConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uuidConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore hyper v VM params based on the context it is used -func (m *RestoreHyperVVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUUIDConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreHyperVVMParams) contextValidateDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreEntity != nil { - - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if err := m.DatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) contextValidateResourceEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceEntity != nil { - - if swag.IsZero(m.ResourceEntity) { // not required - return nil - } - - if err := m.ResourceEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreHyperVVMParams) contextValidateUUIDConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.UUIDConfig != nil { - - if swag.IsZero(m.UUIDConfig) { // not required - return nil - } - - if err := m.UUIDConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uuidConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uuidConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreHyperVVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreHyperVVMParams) UnmarshalBinary(b []byte) error { - var res RestoreHyperVVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_info.go b/v1/models/restore_info.go deleted file mode 100644 index 4c903b40..00000000 --- a/v1/models/restore_info.go +++ /dev/null @@ -1,339 +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" -) - -// RestoreInfo Full Snapshot Information. -// -// Specifies the info regarding a full SQL snapshot. -// -// swagger:model RestoreInfo -type RestoreInfo struct { - - // Specifies the info related to the archival target. - ArchivalTarget *ArchivalExternalTarget `json:"archivalTarget,omitempty"` - - // Specifies the attempt number. - AttemptNumber *int32 `json:"attemptNumber,omitempty"` - - // Specifies the info related to the cloud deploy target. - CloudDeployTarget *CloudDeployTargetDetails `json:"cloudDeployTarget,omitempty"` - - // Specifies the id of the job run. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the universal id for the job. - JobUID *UniversalID `json:"jobUid,omitempty"` - - // Specifies the parent source related information. - ParentSource *ProtectionSource `json:"parentSource,omitempty"` - - // This field specifies the time in to which the object needs to be restored. - // This filed is only applicable when object is being backeup using CDP - // feature. - RestoreTimeUsecs *int64 `json:"restoreTimeUsecs,omitempty"` - - // Specifies the relative path of the snapshot directory. - SnapshotRelativeDirPath *string `json:"snapshotRelativeDirPath,omitempty"` - - // Specifies the info related to the entity. - Source *ProtectionSource `json:"source,omitempty"` - - // Specifies the start time specified as a Unix epoch Timestamp - // (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` - - // Specifies if the VM had independent disks. - VMHadIndependentDisks *bool `json:"vmHadIndependentDisks,omitempty"` -} - -// Validate validates this restore info -func (m *RestoreInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfo) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *RestoreInfo) validateCloudDeployTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployTarget) { // not required - 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 -} - -func (m *RestoreInfo) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *RestoreInfo) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreInfo) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore info based on the context it is used -func (m *RestoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfo) 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 *RestoreInfo) 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 *RestoreInfo) 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 -} - -func (m *RestoreInfo) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreInfo) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreInfo) UnmarshalBinary(b []byte) error { - var res RestoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_info_proto.go b/v1/models/restore_info_proto.go deleted file mode 100644 index ef398d36..00000000 --- a/v1/models/restore_info_proto.go +++ /dev/null @@ -1,316 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreInfoProto Message that encapsulates information about restore tasks for any of the -// environments we support. Environment specific restore infos are defined as -// extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. The -// extension applies to both RestoreInfoProto as well as RestoreEntity. -// -// RestoreInfoProto extension Location Extension -// ============================================================================= -// vmware::RestoreInfo::vmware_restore_info vmware/vmware.proto 100 -// sql::RestoreInfo::sql_restore_info sql/sql.proto 101 -// pure::RestoreInfo::pure_restore_info pure/pure.proto 102 -// azure::RestoreInfo::azure_restore_info azure/azure.proto 103 -// file::RestoreInfo::file_restore_info file/file.proto 104 -// hyperv::RestoreInfo::hyperv_restore_info hyperv/hyperv.proto 105 -// acropolis::RestoreInfo::acropolis_restore_info -// acropolis/acropolis.proto 106 -// kvm::RestoreInfo::kvm_restore_info kvm/kvm.proto 107 -// aws::RestoreInfo::aws_restore_info aws/aws.proto 108 -// physical::RestoreInfo::physical_restore_info physical.proto 109 -// oracle::RestoreInfo::oracle_restore_info oracle/oracle.proto 110 -// outlook::RestoreInfo::outlook_restore_info outlook/outlook.proto 111 -// gcp::RestoreInfo::gcp_restore_info gcp/gcp.proto 112 -// ad::RestoreInfo::ad_restore_info ad/ad.proto 113 -// kubernetes::RestoreInfo::kubernetes_restore_info -// kubernetes/kubernetes.proto -// 114 -// one_drive::RestoreInfo::one_drive_restore_info -// ms_graph/graph.proto 115 -// cdp::RestoreInfo::cdp_restore_info cdp.proto 116 -// exchange::RestoreInfo::exchange_restore_info exchange/exchange.proto 117 -// imanis::RestoreInfo::nosql_recovery_info imanis/nosql.proto 118 -// o365::RestoreInfo::o365_restore_info -// o365/o365.proto 119 -// o365::RestoreInfo::o365_one_drive_restore_info -// o365/o365.proto 120 -// o365::PublicFolderRestoreInfoProto::public_folder_restore_info -// o365/o365.proto 121 -// uda::RestoreInfo::uda_recovery_info uda/uda.proto 122 -// outlook::RestoreInfo::pst_convert_info outlook/outlook.proto 123 -// o365::GroupRestoreInfo::group_restore_info o365/o365.proto 124 -// o365::TeamsRestoreInfoProto::teams_restore_info -// o365/o365.proto 125 -// sfdc::RestoreInfoProto::sfdc_restore_info -// sfdc/sfdc.proto 126 -// object_store::RestoreInfoProto::object_store_restore_info -// object_store/object_store.proto -// 127 -// san::GroupRestoreInfo::group_restore_info san/san.proto 128 -// o365::RestoreInfo::chats_download_info o365/o365.proto 130 -// ============================================================================= -// -// RestoreInfoProto.RestoreEntity extension Location Extension -// ============================================================================= -// vmware::RestoreEntityInfo::vmware_restore_entity_info -// vmware/vmware.proto 100 -// azure::CloudDeployEntityInfo::azure_restore_entity_info -// azure/azure.proto 101 -// hyperv::RestoreEntityInfo::hyperv_restore_entity_info -// hyperv/hyperv.proto 102 -// acropolis::RestoreEntityInfo::acropolis_restore_entity_info -// acropolis/acropolis.proto 103 -// kvm::RestoreEntityInfo::kvm_restore_entity_info -// kvm/kvm.proto 104 -// aws::CloudDeployEntityInfo::aws_restore_entity_info -// aws/aws.proto 105 -// outlook::RestoreEntityInfo::outlook_restore_entity_info -// outlook/outlook.proto 106 -// gcp::CloudDeployEntityInfo::gcp_restore_entity_info -// gcp/gcp.proto 107 -// kubernetes::RestoreEntityInfo::kubernetes_restore_entity_info -// kuebrnetes/kubernetes.proto -// 108 -// one_drive::RestoreEntityInfo::one_drive_restore_entity_info -// ms_graph/graph.proto 109 -// imanis::RestoreEntityInfo::nosql_restore_entity_info -// imanis/nosql.proto 110 -// site::RestoreEntityInfo::site_restore_entity_info -// ms_graph/graph.proto 111 -// uda::RestoreEntityInfo::uda_restore_entity_info -// uda/uda.proto 112 -// sfdc::RestoreEntityInfo::sfdc_restore_entity_info -// sfdc/sfdc.proto 113 -// o365::SharepointListsRestoreInfo::sharepoint_lists_restore_info -// o365/o365.proto 129 -// ============================================================================= -// -// swagger:model RestoreInfoProto -type RestoreInfoProto struct { - - // Captures the execution status of post script. - PostScriptStatus *ScriptExecutionStatus `json:"postScriptStatus,omitempty"` - - // Captures the execution status of pre script. - PreScriptStatus *ScriptExecutionStatus `json:"preScriptStatus,omitempty"` - - // Contains the file paths and the information of the restored entities. - RestoreEntityVec []*RestoreInfoProtoRestoreEntity `json:"restoreEntityVec"` - - // Specifies the target type for the task. The field is only valid if the - // task has got a permit. - TargetType *int32 `json:"targetType,omitempty"` - - // The type of environment this restore info pertains to. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this restore info proto -func (m *RestoreInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePostScriptStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreScriptStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreEntityVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfoProto) validatePostScriptStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PostScriptStatus) { // not required - return nil - } - - if m.PostScriptStatus != nil { - if err := m.PostScriptStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScriptStatus") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProto) validatePreScriptStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PreScriptStatus) { // not required - return nil - } - - if m.PreScriptStatus != nil { - if err := m.PreScriptStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScriptStatus") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProto) validateRestoreEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreEntityVec); i++ { - if swag.IsZero(m.RestoreEntityVec[i]) { // not required - continue - } - - if m.RestoreEntityVec[i] != nil { - if err := m.RestoreEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore info proto based on the context it is used -func (m *RestoreInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePostScriptStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreScriptStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfoProto) contextValidatePostScriptStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PostScriptStatus != nil { - - if swag.IsZero(m.PostScriptStatus) { // not required - return nil - } - - if err := m.PostScriptStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScriptStatus") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProto) contextValidatePreScriptStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScriptStatus != nil { - - if swag.IsZero(m.PreScriptStatus) { // not required - return nil - } - - if err := m.PreScriptStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScriptStatus") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProto) contextValidateRestoreEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreEntityVec); i++ { - - if m.RestoreEntityVec[i] != nil { - - if swag.IsZero(m.RestoreEntityVec[i]) { // not required - return nil - } - - if err := m.RestoreEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreInfoProto) UnmarshalBinary(b []byte) error { - var res RestoreInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_info_proto_restore_entity.go b/v1/models/restore_info_proto_restore_entity.go deleted file mode 100644 index 2bdecf9c..00000000 --- a/v1/models/restore_info_proto_restore_entity.go +++ /dev/null @@ -1,366 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreInfoProtoRestoreEntity restore info proto restore entity -// -// swagger:model RestoreInfoProto_RestoreEntity -type RestoreInfoProtoRestoreEntity struct { - - // The entity that was restored. - Entity *EntityProto `json:"entity,omitempty"` - - // If the restore of the 'entity' failed, this field may contain the cause - // of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // The path relative to the root path of the restore task progress monitor - // of the progress monitor for this entity. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // All the paths that the entity's files were restored to. Each path is - // relative to the destination view. - RelativeRestorePaths []string `json:"relativeRestorePaths"` - - // This represents a cluster or a HyperV host in HyperV environments, and a - // resource pool in VMware environments. - // For a restore task of type kCloneVMs, all entities are attached to the - // same resource entity. So this field seems redundant for kCloneVMs task. - // However, for a restore task of type kRecoverVMs, an entity can be - // restored back to its original resource entity in which case value of - // this field can be different for different entities. - // - // Even though, this field is redundant for kCloneVMs task, we will set - // this field for sake of consistency. - // - // Please note that this field may not be set if the restore of this entity - // fails. - ResourcePoolEntity *EntityProto `json:"resourcePoolEntity,omitempty"` - - // Proto of the entity created by the restore operation. - // - // Note: For a recovery task in the VMware environment, once the VM is - // created, it is storage vMotioned to its primary datastore. If storage - // vMotion fails, Magneto marks the recovery task as failed. However, this - // field will still be set for the recovered VM. It can be used later to - // clean up the VM from primary environment (i.e, vCenter) - RestoredEntity *EntityProto `json:"restoredEntity,omitempty"` - - // Cloned or converted view name which is used to restore the entity. - // In case of on-prem deploy task this view name will be used in next run. - RestoredViewName *string `json:"restoredViewName,omitempty"` - - // The restore status of the entity. - Status *int32 `json:"status,omitempty"` - - // Contains the information regarding total bytes restored for this - // entity. Currently updated only in case of outlook restore. - TotalBytesRestored *int64 `json:"totalBytesRestored,omitempty"` - - // Optional warnings if any. - Warnings []*ErrorProto `json:"warnings"` -} - -// Validate validates this restore info proto restore entity -func (m *RestoreInfoProtoRestoreEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RestoreInfoProtoRestoreEntity) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) validateRestoredEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredEntity) { // not required - return nil - } - - if m.RestoredEntity != nil { - if err := m.RestoredEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore info proto restore entity based on the context it is used -func (m *RestoreInfoProtoRestoreEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) 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 -} - -func (m *RestoreInfoProtoRestoreEntity) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) contextValidateRestoredEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredEntity != nil { - - if swag.IsZero(m.RestoredEntity) { // not required - return nil - } - - if err := m.RestoredEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreInfoProtoRestoreEntity) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreInfoProtoRestoreEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreInfoProtoRestoreEntity) UnmarshalBinary(b []byte) error { - var res RestoreInfoProtoRestoreEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_k_vm_v_ms_params.go b/v1/models/restore_k_vm_v_ms_params.go deleted file mode 100644 index df371cbb..00000000 --- a/v1/models/restore_k_vm_v_ms_params.go +++ /dev/null @@ -1,396 +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" -) - -// RestoreKVMVMsParams This message defines the KVM specific VMs restore params. -// -// swagger:model RestoreKVMVMsParams -type RestoreKVMVMsParams struct { - - // The resource (KVMH host) to which the restored VM will be attached. - // - // This field is optional for a kRecoverVMs task if the VMs are being - // restored to its original parent source. If not specified, restored VMs - // will be attached to its original host. This field is mandatory if the - // VMs are being restored to a different parent source. - ClusterEntity *EntityProto `json:"clusterEntity,omitempty"` - - // A datacenter where the VM's files should be restored to. This - // field is optional if VM is being restored to its original parent - // source. If not specified, the VM's files will be restored to their - // original datacenter locations. This field is mandatory if VM is being - // restored to a different datacenter entity or to a different parent source. - DatacenterEntity *EntityProto `json:"datacenterEntity,omitempty"` - - // The power state configuration to be applied to the restored VM. - // - // Semantics for kRecoverVMs task: By default, VMs are restored in their - // original power state. - // - // This proto can be used to override the default behavior for the restore - // task. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // By default, VMs are restored with their original name. This field can - // be used to specify the transformation ( i.e prefix/suffix) to be applied - // to the source VM name to derive the new name of the restored VM. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // The network configuration to be applied to the restored VMs. - // - // Semantics for kRecoverVMs task: By default, if the VMs are being restored - // to their original location, then original network configuration will be - // preserved. If objects are being restored to different location (i.e., - // different parent source), then network will be detached. - // - // Below field can be used to override the default network configuration of - // the restored VMs. - // - // If user want to keep the original network setting for kRecoverVMs task, - // then this proto should not be set. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // A storagedomain where the VM's disk should be restored to. This - // field is optional if VM is being restored to its original parent - // source. If not specified, the VM's disk will be restored to their - // original storagedomain. This field is mandatory if VM is being - // restored to a different resource entity or to a different parent source. - StoragedomainEntity *EntityProto `json:"storagedomainEntity,omitempty"` -} - -// Validate validates this restore k VM v ms params -func (m *RestoreKVMVMsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatacenterEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragedomainEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreKVMVMsParams) validateClusterEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterEntity) { // not required - return nil - } - - if m.ClusterEntity != nil { - if err := m.ClusterEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) validateDatacenterEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatacenterEntity) { // not required - return nil - } - - if m.DatacenterEntity != nil { - if err := m.DatacenterEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datacenterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datacenterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) validateStoragedomainEntity(formats strfmt.Registry) error { - if swag.IsZero(m.StoragedomainEntity) { // not required - return nil - } - - if m.StoragedomainEntity != nil { - if err := m.StoragedomainEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagedomainEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagedomainEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore k VM v ms params based on the context it is used -func (m *RestoreKVMVMsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatacenterEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragedomainEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreKVMVMsParams) contextValidateClusterEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterEntity != nil { - - if swag.IsZero(m.ClusterEntity) { // not required - return nil - } - - if err := m.ClusterEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) contextValidateDatacenterEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatacenterEntity != nil { - - if swag.IsZero(m.DatacenterEntity) { // not required - return nil - } - - if err := m.DatacenterEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datacenterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datacenterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreKVMVMsParams) contextValidateStoragedomainEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragedomainEntity != nil { - - if swag.IsZero(m.StoragedomainEntity) { // not required - return nil - } - - if err := m.StoragedomainEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagedomainEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagedomainEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreKVMVMsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreKVMVMsParams) UnmarshalBinary(b []byte) error { - var res RestoreKVMVMsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_kubernetes_namespaces_params.go b/v1/models/restore_kubernetes_namespaces_params.go deleted file mode 100644 index 90cf8e09..00000000 --- a/v1/models/restore_kubernetes_namespaces_params.go +++ /dev/null @@ -1,308 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreKubernetesNamespacesParams This message defines the Kubernetes specific namespace restore params. -// -// swagger:model RestoreKubernetesNamespacesParams -type RestoreKubernetesNamespacesParams struct { - - // Cluster id of the cluster which performed the backup. - BackupClusterID *int64 `json:"backupClusterId,omitempty"` - - // Backup job that needs to be used for recovering the namespace. - BackupJobName *string `json:"backupJobName,omitempty"` - - // This field is optional for a kRecoverNamespaces task if the namespace is - // being restored to its original parent source. If not specified, restored - // namespace will be attached to its original cluster. This field is - // mandatory if the namespace is being restored to a different parent source. - ClusterEntity *EntityProto `json:"clusterEntity,omitempty"` - - // Cluster software version. - ClusterSoftwareVersion *string `json:"clusterSoftwareVersion,omitempty"` - - // Indicates the kubernetes service type to use. - DatamoverServiceType *int32 `json:"datamoverServiceType,omitempty"` - - // List of PVCs that user requested to be excluded while doing restore. - ExcludedPvcVec []string `json:"excludedPvcVec"` - - // Container image used to mounting PVCs in temp pods. - InitContainerImage *string `json:"initContainerImage,omitempty"` - - // This indicates if magneto_kubernetes_enable_protection_using_datamover is - // true and the flag is enabled in the feature enabler. - IsProtectionUsingDatamoverEnabled *bool `json:"isProtectionUsingDatamoverEnabled,omitempty"` - - // Namespace in which restore job will be created in K8s cluster. - ManagementNamespace *string `json:"managementNamespace,omitempty"` - - // Information about pods in the namespace which was backed up. - PodMetadataVec []*PodMetadata `json:"podMetadataVec"` - - // By default, namespaces are restored with their original name. This field - // can be used to specify the transformation ( i.e prefix/suffix) to be - // applied to the source namespace to derive the new name of the restored - // namespace. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // S3 account ID that was used to register the source. - S3AccountID *string `json:"s3AccountId,omitempty"` - - // Indicates the VLAN information to use for restore. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this restore kubernetes namespaces params -func (m *RestoreKubernetesNamespacesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePodMetadataVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreKubernetesNamespacesParams) validateClusterEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterEntity) { // not required - return nil - } - - if m.ClusterEntity != nil { - if err := m.ClusterEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) validatePodMetadataVec(formats strfmt.Registry) error { - if swag.IsZero(m.PodMetadataVec) { // not required - return nil - } - - for i := 0; i < len(m.PodMetadataVec); i++ { - if swag.IsZero(m.PodMetadataVec[i]) { // not required - continue - } - - if m.PodMetadataVec[i] != nil { - if err := m.PodMetadataVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("podMetadataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("podMetadataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore kubernetes namespaces params based on the context it is used -func (m *RestoreKubernetesNamespacesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePodMetadataVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreKubernetesNamespacesParams) contextValidateClusterEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterEntity != nil { - - if swag.IsZero(m.ClusterEntity) { // not required - return nil - } - - if err := m.ClusterEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) contextValidatePodMetadataVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PodMetadataVec); i++ { - - if m.PodMetadataVec[i] != nil { - - if swag.IsZero(m.PodMetadataVec[i]) { // not required - return nil - } - - if err := m.PodMetadataVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("podMetadataVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("podMetadataVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreKubernetesNamespacesParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreKubernetesNamespacesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreKubernetesNamespacesParams) UnmarshalBinary(b []byte) error { - var res RestoreKubernetesNamespacesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_groups_params.go b/v1/models/restore_o365_groups_params.go deleted file mode 100644 index 9684792b..00000000 --- a/v1/models/restore_o365_groups_params.go +++ /dev/null @@ -1,142 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365GroupsParams This message defines the O365 Groups specific restore params. -// -// swagger:model RestoreO365GroupsParams -type RestoreO365GroupsParams struct { - - // Bool which specifies, if we have to create a new group if it doesn't - // exist. - CreateNewGroup *bool `json:"createNewGroup,omitempty"` - - // List of groups getting restored. - MsGroupsVec []*RestoreO365GroupsParamsMSGroupInfo `json:"msGroupsVec"` - - // Bool which specifies, if the original members/owners should be part of the - // newly created target group. - RestoreOriginalOwnersMembers *bool `json:"restoreOriginalOwnersMembers,omitempty"` - - // Whether or not all groups are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // Target group in case restore_to_original is false. - TargetGroup *string `json:"targetGroup,omitempty"` - - // Target group name in case restore_to_original is false. This will be - // ignored if restoring to alternate existing group. - TargetGroupName *string `json:"targetGroupName,omitempty"` - - // The string which contains the owner smtp address for the target group. - TargetGroupOwner *string `json:"targetGroupOwner,omitempty"` -} - -// Validate validates this restore o365 groups params -func (m *RestoreO365GroupsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMsGroupsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParams) validateMsGroupsVec(formats strfmt.Registry) error { - if swag.IsZero(m.MsGroupsVec) { // not required - return nil - } - - for i := 0; i < len(m.MsGroupsVec); i++ { - if swag.IsZero(m.MsGroupsVec[i]) { // not required - continue - } - - if m.MsGroupsVec[i] != nil { - if err := m.MsGroupsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore o365 groups params based on the context it is used -func (m *RestoreO365GroupsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMsGroupsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParams) contextValidateMsGroupsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MsGroupsVec); i++ { - - if m.MsGroupsVec[i] != nil { - - if swag.IsZero(m.MsGroupsVec[i]) { // not required - return nil - } - - if err := m.MsGroupsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365GroupsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365GroupsParams) UnmarshalBinary(b []byte) error { - var res RestoreO365GroupsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_groups_params_group_granular_params.go b/v1/models/restore_o365_groups_params_group_granular_params.go deleted file mode 100644 index a2e561c4..00000000 --- a/v1/models/restore_o365_groups_params_group_granular_params.go +++ /dev/null @@ -1,163 +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" -) - -// RestoreO365GroupsParamsGroupGranularParams Proto to capture the restore details of a Group. -// -// swagger:model RestoreO365GroupsParams_GroupGranularParams -type RestoreO365GroupsParamsGroupGranularParams struct { - - // The Unique ID of the group. - GroupID *string `json:"groupId,omitempty"` - - // The restore details of the group mailbox. - GroupMbxParams *RestoreOutlookParams `json:"groupMbxParams,omitempty"` - - // The restore details of the group site. - RestoreSiteParams *RestoreSiteParams `json:"restoreSiteParams,omitempty"` -} - -// Validate validates this restore o365 groups params group granular params -func (m *RestoreO365GroupsParamsGroupGranularParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupMbxParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSiteParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParamsGroupGranularParams) validateGroupMbxParams(formats strfmt.Registry) error { - if swag.IsZero(m.GroupMbxParams) { // not required - return nil - } - - if m.GroupMbxParams != nil { - if err := m.GroupMbxParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupMbxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupMbxParams") - } - return err - } - } - - return nil -} - -func (m *RestoreO365GroupsParamsGroupGranularParams) validateRestoreSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if m.RestoreSiteParams != nil { - if err := m.RestoreSiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore o365 groups params group granular params based on the context it is used -func (m *RestoreO365GroupsParamsGroupGranularParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupMbxParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParamsGroupGranularParams) contextValidateGroupMbxParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupMbxParams != nil { - - if swag.IsZero(m.GroupMbxParams) { // not required - return nil - } - - if err := m.GroupMbxParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupMbxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupMbxParams") - } - return err - } - } - - return nil -} - -func (m *RestoreO365GroupsParamsGroupGranularParams) contextValidateRestoreSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSiteParams != nil { - - if swag.IsZero(m.RestoreSiteParams) { // not required - return nil - } - - if err := m.RestoreSiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSiteParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365GroupsParamsGroupGranularParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365GroupsParamsGroupGranularParams) UnmarshalBinary(b []byte) error { - var res RestoreO365GroupsParamsGroupGranularParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_groups_params_m_s_group_info.go b/v1/models/restore_o365_groups_params_m_s_group_info.go deleted file mode 100644 index a54035e0..00000000 --- a/v1/models/restore_o365_groups_params_m_s_group_info.go +++ /dev/null @@ -1,170 +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" -) - -// RestoreO365GroupsParamsMSGroupInfo restore o365 groups params m s group info -// -// swagger:model RestoreO365GroupsParams_MSGroupInfo -type RestoreO365GroupsParamsMSGroupInfo struct { - - // Details of the mailbox and site contents that need to be restored for - // this group. - GroupGranularParams *RestoreO365GroupsParamsGroupGranularParams `json:"groupGranularParams,omitempty"` - - // Specify if the entire Group (mailbox + site) is to be restored. - IsFullGroupRequired *bool `json:"isFullGroupRequired,omitempty"` - - // Whether mailbox restore is full or granular. - MailboxRestoreType *int32 `json:"mailboxRestoreType,omitempty"` - - // This will store the details of the MS groups to be restored. - Object *RestoreObject `json:"object,omitempty"` - - // Whether site restore is full or granular. - SiteRestoreType *int32 `json:"siteRestoreType,omitempty"` -} - -// Validate validates this restore o365 groups params m s group info -func (m *RestoreO365GroupsParamsMSGroupInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupGranularParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParamsMSGroupInfo) validateGroupGranularParams(formats strfmt.Registry) error { - if swag.IsZero(m.GroupGranularParams) { // not required - return nil - } - - if m.GroupGranularParams != nil { - if err := m.GroupGranularParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupGranularParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupGranularParams") - } - return err - } - } - - return nil -} - -func (m *RestoreO365GroupsParamsMSGroupInfo) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore o365 groups params m s group info based on the context it is used -func (m *RestoreO365GroupsParamsMSGroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupGranularParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365GroupsParamsMSGroupInfo) contextValidateGroupGranularParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupGranularParams != nil { - - if swag.IsZero(m.GroupGranularParams) { // not required - return nil - } - - if err := m.GroupGranularParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupGranularParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupGranularParams") - } - return err - } - } - - return nil -} - -func (m *RestoreO365GroupsParamsMSGroupInfo) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365GroupsParamsMSGroupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365GroupsParamsMSGroupInfo) UnmarshalBinary(b []byte) error { - var res RestoreO365GroupsParamsMSGroupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_public_folders_params.go b/v1/models/restore_o365_public_folders_params.go deleted file mode 100644 index d7f274e7..00000000 --- a/v1/models/restore_o365_public_folders_params.go +++ /dev/null @@ -1,186 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365PublicFoldersParams This message defines the O365 Public Folders specific restore params. -// -// swagger:model RestoreO365PublicFoldersParams -type RestoreO365PublicFoldersParams struct { - - // In a RestoreJob , user will provide the list of Root Public Folders to be - // restored. Provision is there for restoring full and partial Public Folder - // recovery. - RootPublicFolderVec []*RestoreO365PublicFoldersParamsRootPublicFolder `json:"rootPublicFolderVec"` - - // target folder path - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // This is the target Public Folder. - // - // All RootPublicFolders listed in the root_public_folder_vec will be - // restored to this traget RootPublicFolder with appropriate names. - // - // Let's say root_public_folder_vec is A and B; target_root_public_folder is - // C. The final folder-hierarchy after restore job is finished will look - // like this - // C/{target_folder_path}/A/{whatever is there in Public Folder A} - // B/{whatever is inside Public Folder B} - TargetRootPublicFolder *EntityProto `json:"targetRootPublicFolder,omitempty"` -} - -// Validate validates this restore o365 public folders params -func (m *RestoreO365PublicFoldersParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRootPublicFolderVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetRootPublicFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365PublicFoldersParams) validateRootPublicFolderVec(formats strfmt.Registry) error { - if swag.IsZero(m.RootPublicFolderVec) { // not required - return nil - } - - for i := 0; i < len(m.RootPublicFolderVec); i++ { - if swag.IsZero(m.RootPublicFolderVec[i]) { // not required - continue - } - - if m.RootPublicFolderVec[i] != nil { - if err := m.RootPublicFolderVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365PublicFoldersParams) validateTargetRootPublicFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if m.TargetRootPublicFolder != nil { - if err := m.TargetRootPublicFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore o365 public folders params based on the context it is used -func (m *RestoreO365PublicFoldersParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRootPublicFolderVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetRootPublicFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365PublicFoldersParams) contextValidateRootPublicFolderVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RootPublicFolderVec); i++ { - - if m.RootPublicFolderVec[i] != nil { - - if swag.IsZero(m.RootPublicFolderVec[i]) { // not required - return nil - } - - if err := m.RootPublicFolderVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365PublicFoldersParams) contextValidateTargetRootPublicFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetRootPublicFolder != nil { - - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if err := m.TargetRootPublicFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParams) UnmarshalBinary(b []byte) error { - var res RestoreO365PublicFoldersParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_public_folders_params_public_folder.go b/v1/models/restore_o365_public_folders_params_public_folder.go deleted file mode 100644 index ae26dd56..00000000 --- a/v1/models/restore_o365_public_folders_params_public_folder.go +++ /dev/null @@ -1,60 +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" -) - -// RestoreO365PublicFoldersParamsPublicFolder Proto to capture the restore details of a Public Folder -// -// swagger:model RestoreO365PublicFoldersParams_PublicFolder -type RestoreO365PublicFoldersParamsPublicFolder struct { - - // The absolute path of the folder. - AbsoluteFolderPath *string `json:"absoluteFolderPath,omitempty"` - - // The Unique ID of the folder. - FolderID *string `json:"folderId,omitempty"` - - // Specify if the entire Public Folder is to be restored. - IsEntireFolderRequired *bool `json:"isEntireFolderRequired,omitempty"` - - // If is_entire_folder_required is set to false, users will then specify - // which particular items are to be restored. - ItemIDVec []string `json:"itemIdVec"` -} - -// Validate validates this restore o365 public folders params public folder -func (m *RestoreO365PublicFoldersParamsPublicFolder) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore o365 public folders params public folder based on context it is used -func (m *RestoreO365PublicFoldersParamsPublicFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParamsPublicFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParamsPublicFolder) UnmarshalBinary(b []byte) error { - var res RestoreO365PublicFoldersParamsPublicFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_public_folders_params_root_public_folder.go b/v1/models/restore_o365_public_folders_params_root_public_folder.go deleted file mode 100644 index c571c3f6..00000000 --- a/v1/models/restore_o365_public_folders_params_root_public_folder.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365PublicFoldersParamsRootPublicFolder restore o365 public folders params root public folder -// -// swagger:model RestoreO365PublicFoldersParams_RootPublicFolder -type RestoreO365PublicFoldersParamsRootPublicFolder struct { - - // If is_entire_folder_required is set to false, - // user will then specify which particular sub-folders are to be restored. - FolderVec []*RestoreO365PublicFoldersParamsPublicFolder `json:"folderVec"` - - // Specify if the entire Root Public Folder including the sub-folders is to - // be restored. - IsEntireRootFolderRequired *bool `json:"isEntireRootFolderRequired,omitempty"` - - // This will store the details of the Root Public Folder to be restored. - Object *RestoreObject `json:"object,omitempty"` -} - -// Validate validates this restore o365 public folders params root public folder -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFolderVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) validateFolderVec(formats strfmt.Registry) error { - if swag.IsZero(m.FolderVec) { // not required - return nil - } - - for i := 0; i < len(m.FolderVec); i++ { - if swag.IsZero(m.FolderVec[i]) { // not required - continue - } - - if m.FolderVec[i] != nil { - if err := m.FolderVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore o365 public folders params root public folder based on the context it is used -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFolderVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) contextValidateFolderVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FolderVec); i++ { - - if m.FolderVec[i] != nil { - - if swag.IsZero(m.FolderVec[i]) { // not required - return nil - } - - if err := m.FolderVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365PublicFoldersParamsRootPublicFolder) UnmarshalBinary(b []byte) error { - var res RestoreO365PublicFoldersParamsRootPublicFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_teams_params.go b/v1/models/restore_o365_teams_params.go deleted file mode 100644 index c165d946..00000000 --- a/v1/models/restore_o365_teams_params.go +++ /dev/null @@ -1,297 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365TeamsParams restore o365 teams params -// -// swagger:model RestoreO365TeamsParams -type RestoreO365TeamsParams struct { - - // Bool which specifies, if we have to create a new team if it doesn't - // exist. - CreateNewTeam *bool `json:"createNewTeam,omitempty"` - - // List of teams getting restored. - MsTeamsVec []*RestoreO365TeamsParamsMSTeamInfo `json:"msTeamsVec"` - - // Bool which specifies, if the original members/owners should be part of the - // newly created target team. - RestoreOriginalOwnersMembers *bool `json:"restoreOriginalOwnersMembers,omitempty"` - - // Whether or not all teams are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // target channel - TargetChannel *RestoreO365TeamsParamsTargetChannel `json:"targetChannel,omitempty"` - - // Specifies the target ms team entity info and the team listed in the - // ms_teams_vec will be restored to this team if restore_to_original - // is false and create_new_team is false. - TargetMsTeamEntity *EntityProto `json:"targetMsTeamEntity,omitempty"` - - // Target team in case restore_to_original is false. - TargetTeam *string `json:"targetTeam,omitempty"` - - // The display name for the target team. Specified when a new team needs to - // be created. - TargetTeamName *string `json:"targetTeamName,omitempty"` - - // The addtional team owner info for the specified by target team. - TargetTeamOwner *string `json:"targetTeamOwner,omitempty"` - - // The addtional team owner entity info for the specified by target team. - TargetTeamOwnerEntity *EntityProto `json:"targetTeamOwnerEntity,omitempty"` -} - -// Validate validates this restore o365 teams params -func (m *RestoreO365TeamsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMsTeamsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetChannel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMsTeamEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetTeamOwnerEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParams) validateMsTeamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.MsTeamsVec) { // not required - return nil - } - - for i := 0; i < len(m.MsTeamsVec); i++ { - if swag.IsZero(m.MsTeamsVec[i]) { // not required - continue - } - - if m.MsTeamsVec[i] != nil { - if err := m.MsTeamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365TeamsParams) validateTargetChannel(formats strfmt.Registry) error { - if swag.IsZero(m.TargetChannel) { // not required - return nil - } - - if m.TargetChannel != nil { - if err := m.TargetChannel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetChannel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetChannel") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParams) validateTargetMsTeamEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMsTeamEntity) { // not required - return nil - } - - if m.TargetMsTeamEntity != nil { - if err := m.TargetMsTeamEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeamEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeamEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParams) validateTargetTeamOwnerEntity(formats strfmt.Registry) error { - if swag.IsZero(m.TargetTeamOwnerEntity) { // not required - return nil - } - - if m.TargetTeamOwnerEntity != nil { - if err := m.TargetTeamOwnerEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamOwnerEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamOwnerEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore o365 teams params based on the context it is used -func (m *RestoreO365TeamsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMsTeamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetChannel(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMsTeamEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetTeamOwnerEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParams) contextValidateMsTeamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MsTeamsVec); i++ { - - if m.MsTeamsVec[i] != nil { - - if swag.IsZero(m.MsTeamsVec[i]) { // not required - return nil - } - - if err := m.MsTeamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreO365TeamsParams) contextValidateTargetChannel(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetChannel != nil { - - if swag.IsZero(m.TargetChannel) { // not required - return nil - } - - if err := m.TargetChannel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetChannel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetChannel") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParams) contextValidateTargetMsTeamEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMsTeamEntity != nil { - - if swag.IsZero(m.TargetMsTeamEntity) { // not required - return nil - } - - if err := m.TargetMsTeamEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeamEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeamEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParams) contextValidateTargetTeamOwnerEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetTeamOwnerEntity != nil { - - if swag.IsZero(m.TargetTeamOwnerEntity) { // not required - return nil - } - - if err := m.TargetTeamOwnerEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamOwnerEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamOwnerEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365TeamsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365TeamsParams) UnmarshalBinary(b []byte) error { - var res RestoreO365TeamsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_teams_params_m_s_team_info.go b/v1/models/restore_o365_teams_params_m_s_team_info.go deleted file mode 100644 index 278ca0a8..00000000 --- a/v1/models/restore_o365_teams_params_m_s_team_info.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365TeamsParamsMSTeamInfo Info of the team to be restored. -// -// swagger:model RestoreO365TeamsParams_MSTeamInfo -type RestoreO365TeamsParamsMSTeamInfo struct { - - // Specify if the entire Team is to be restored. - IsFullTeamRequired *bool `json:"isFullTeamRequired,omitempty"` - - // Todo(prann) : deprecate this and only keep the necessary info. - // This will store the details of the MS team to be restored. - Object *RestoreObject `json:"object,omitempty"` - - // Channel items that have to be restored. This will be empty iff - // is_full_team_required is false. - SourceChannelVec []*RestoreO365TeamsParamsSourceChannel `json:"sourceChannelVec"` -} - -// Validate validates this restore o365 teams params m s team info -func (m *RestoreO365TeamsParamsMSTeamInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceChannelVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsMSTeamInfo) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParamsMSTeamInfo) validateSourceChannelVec(formats strfmt.Registry) error { - if swag.IsZero(m.SourceChannelVec) { // not required - return nil - } - - for i := 0; i < len(m.SourceChannelVec); i++ { - if swag.IsZero(m.SourceChannelVec[i]) { // not required - continue - } - - if m.SourceChannelVec[i] != nil { - if err := m.SourceChannelVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceChannelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceChannelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore o365 teams params m s team info based on the context it is used -func (m *RestoreO365TeamsParamsMSTeamInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceChannelVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsMSTeamInfo) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *RestoreO365TeamsParamsMSTeamInfo) contextValidateSourceChannelVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceChannelVec); i++ { - - if m.SourceChannelVec[i] != nil { - - if swag.IsZero(m.SourceChannelVec[i]) { // not required - return nil - } - - if err := m.SourceChannelVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceChannelVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceChannelVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365TeamsParamsMSTeamInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365TeamsParamsMSTeamInfo) UnmarshalBinary(b []byte) error { - var res RestoreO365TeamsParamsMSTeamInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_teams_params_source_channel.go b/v1/models/restore_o365_teams_params_source_channel.go deleted file mode 100644 index 5705a719..00000000 --- a/v1/models/restore_o365_teams_params_source_channel.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365TeamsParamsSourceChannel Source Channel to be restored. -// -// swagger:model RestoreO365TeamsParams_SourceChannel -type RestoreO365TeamsParamsSourceChannel struct { - - // Drives of this channel whose items have to be restored. This will be - // empty iff is_full_channel_restore is true. - DriveVec []*RestoreSiteParamsSiteOwnerDrive `json:"driveVec"` - - // Id of the source channel for restore. - ID *string `json:"id,omitempty"` - - // Whether we have to restore the complete channel. - IsFullChannelRestore *bool `json:"isFullChannelRestore,omitempty"` - - // Name of the source channel for restore. - Name *string `json:"name,omitempty"` -} - -// Validate validates this restore o365 teams params source channel -func (m *RestoreO365TeamsParamsSourceChannel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsSourceChannel) validateDriveVec(formats strfmt.Registry) error { - if swag.IsZero(m.DriveVec) { // not required - return nil - } - - for i := 0; i < len(m.DriveVec); i++ { - if swag.IsZero(m.DriveVec[i]) { // not required - continue - } - - if m.DriveVec[i] != nil { - if err := m.DriveVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore o365 teams params source channel based on the context it is used -func (m *RestoreO365TeamsParamsSourceChannel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsSourceChannel) contextValidateDriveVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveVec); i++ { - - if m.DriveVec[i] != nil { - - if swag.IsZero(m.DriveVec[i]) { // not required - return nil - } - - if err := m.DriveVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365TeamsParamsSourceChannel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365TeamsParamsSourceChannel) UnmarshalBinary(b []byte) error { - var res RestoreO365TeamsParamsSourceChannel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_o365_teams_params_target_channel.go b/v1/models/restore_o365_teams_params_target_channel.go deleted file mode 100644 index b6184995..00000000 --- a/v1/models/restore_o365_teams_params_target_channel.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreO365TeamsParamsTargetChannel Target channel for teams granular restore to alternate loc. At least one -// of id or name must be specified. name must be specified if -// create_new_channel is true. -// -// swagger:model RestoreO365TeamsParams_TargetChannel -type RestoreO365TeamsParamsTargetChannel struct { - - // Owners for the private channel. This is needed only if we are creating - // private channel. - ChannelOwnerVec []*EntityProto `json:"channelOwnerVec"` - - // channel type - ChannelType *int32 `json:"channelType,omitempty"` - - // Whether to create a new channel. Name must be provided for this case. - CreateNewChannel *bool `json:"createNewChannel,omitempty"` - - // Id of the target channel. - ID *string `json:"id,omitempty"` - - // Name of the target channel. - Name *string `json:"name,omitempty"` -} - -// Validate validates this restore o365 teams params target channel -func (m *RestoreO365TeamsParamsTargetChannel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChannelOwnerVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsTargetChannel) validateChannelOwnerVec(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelOwnerVec) { // not required - return nil - } - - for i := 0; i < len(m.ChannelOwnerVec); i++ { - if swag.IsZero(m.ChannelOwnerVec[i]) { // not required - continue - } - - if m.ChannelOwnerVec[i] != nil { - if err := m.ChannelOwnerVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore o365 teams params target channel based on the context it is used -func (m *RestoreO365TeamsParamsTargetChannel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChannelOwnerVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreO365TeamsParamsTargetChannel) contextValidateChannelOwnerVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChannelOwnerVec); i++ { - - if m.ChannelOwnerVec[i] != nil { - - if swag.IsZero(m.ChannelOwnerVec[i]) { // not required - return nil - } - - if err := m.ChannelOwnerVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreO365TeamsParamsTargetChannel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreO365TeamsParamsTargetChannel) UnmarshalBinary(b []byte) error { - var res RestoreO365TeamsParamsTargetChannel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_object.go b/v1/models/restore_object.go deleted file mode 100644 index 763f25ab..00000000 --- a/v1/models/restore_object.go +++ /dev/null @@ -1,1053 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreObject Captures information about an object being restored. -// -// swagger:model RestoreObject -type RestoreObject struct { - - // This field must be set if the object is to be restored/retrieved from an - // archive. - ArchivalTarget *ArchivalTarget `json:"archivalTarget,omitempty"` - - // The attempt number of the job run to restore from. - AttemptNum *int32 `json:"attemptNum,omitempty"` - - // Backup type of corresponding backup run. Currently, this is only populated - // for restore tasks. - BackupType *int32 `json:"backupType,omitempty"` - - // 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 *CloudDeployTarget `json:"cloudDeployTarget,omitempty"` - - // This field must be set if the restore type is kReplicateSnapshots and the - // snapshots need to be repliated accross regions in the Cloud. - CloudReplicationTarget *CloudDeployTarget `json:"cloudReplicationTarget,omitempty"` - - // Common Configuration Parameters for recovery - ConfigVec []*ConfigurationParams `json:"configVec"` - - // The entity to restore. If this is not specified, all entities from job id - // will be restored (from the latest snapshot). If specified, this can only - // have leaf-level entities. - // Notes: - // This must be specified for RestoreFiles task. - // Disable object rewriting in the outgoing API path. This is needed to - // preserve the content of objects().entity() as it must reflect the - // Entity object as it was at the point the restore task was submitted. - Entity *EntityProto `json:"entity,omitempty"` - - // The time to which CDP logs hydrated. This field is currently only - // applicable to MongoDb. - // This field is used during restore as the 'start time' for copying the - // remaining cdp logs that are yet to be hydrated by agent. - HydrationTimeUsecs *int64 `json:"hydrationTimeUsecs,omitempty"` - - // The job id from which to restore. This is used while communicating with - // yoda. - JobID *int64 `json:"jobId,omitempty"` - - // Id identifying a specific run to restore from. If this is not specified, - // and we need to restore from a run, the latest run is used. - // NOTE: This must be specified for RestoreFiles, RecoverDisks and - // GetVirtualDisks APIs. - JobInstanceID *int64 `json:"jobInstanceId,omitempty"` - - // The universal id of the job from which to restore. - // Caller can set this as local, remote or primary job_uid. Magneto will will - // look for this UID across all local/remote/primary jobs. See ENG-231303 for - // more context. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // This field contains params specific to the restore of a nosql entity. - NosqlRecoverParams *NoSQLRecoverParams `json:"nosqlRecoverParams,omitempty"` - - // O365 one drive specific parameters needed to restore the One Drive for a - // single user entity. - OneDriveRestoreEntityParams *O365OneDriveRestoreEntityParams `json:"oneDriveRestoreEntityParams,omitempty"` - - // The registered source that was managing the entity being restored. - ParentSource *EntityProto `json:"parentSource,omitempty"` - - // Preferred archival target for the point in time restore. - PitPreferredArchivalTarget *ArchivalTarget `json:"pitPreferredArchivalTarget,omitempty"` - - // The time to which the object needs to be restored. If this is not set, - // then the object will be restored to the full/incremental snapshot. This - // is applicable only if the object is protected using CDP. - PointInTimeRestoreTimeUsecs *int64 `json:"pointInTimeRestoreTimeUsecs,omitempty"` - - // This field indicates if the object should be recovered from standby if it - // is enabled. - RecoverFromStandby *bool `json:"recoverFromStandby,omitempty"` - - // This field contains params specific to the restore of an Acropolis VM. - RestoreAcropolisVMParam *RestoreAcropolisVMParam `json:"restoreAcropolisVmParam,omitempty"` - - // This field defines the Azure SQL specific params for restore task of type - // kRecoverAzureSQL. - RestoreAzureSQLParams *RestoreAzureSQLParams `json:"restoreAzureSqlParams,omitempty"` - - // This field contains params specific to the restore of a Exchange entities. - RestoreExchangeParams *RestoreExchangeParams `json:"restoreExchangeParams,omitempty"` - - // restore rds postgres params - RestoreRdsPostgresParams *RestoreRDSPostgresParams `json:"restoreRdsPostgresParams,omitempty"` - - // This field contains params specific to restore of VCD vApp entity. - RestoreVappInfo *RestoreVappInfo `json:"restoreVappInfo,omitempty"` - - // This field contains params specific to the restore of a SAN entities. - SanRecoverParams *SANRecoverParams `json:"sanRecoverParams,omitempty"` - - // This field contains params specific to the restore of a Sfdc entities. - SfdcRecoverParams *SfdcRecoverParams `json:"sfdcRecoverParams,omitempty"` - - // The relative path to the directory containing the entity's snapshot. - SnapshotRelativeDirPath *string `json:"snapshotRelativeDirPath,omitempty"` - - // The start time of the specific job run. Iff 'job_instance_id' is set, - // this field must be set. In-memory indices on the Magneto master are - // laid-out by the start time of the job, and this is how the master pulls - // up a specific run. - // NOTE: This must be specified for RestoreFiles, RecoverDisks and - // GetVirtualDisks APIs - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // This field contains params specific to the restore of a Uda entities. - UdaRecoverParams *UdaRecoverParams `json:"udaRecoverParams,omitempty"` - - // The name of the view where the object's snapshot is located. - ViewName *string `json:"viewName,omitempty"` - - // This is applicable only to VMs and is set to true when the VM being - // recovered or cloned contained independent disks when it was backed up. - VMHadIndependentDisks *bool `json:"vmHadIndependentDisks,omitempty"` -} - -// Validate validates this restore object -func (m *RestoreObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNosqlRecoverParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveRestoreEntityParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePitPreferredArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAcropolisVMParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreAzureSQLParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreRdsPostgresParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVappInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanRecoverParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcRecoverParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaRecoverParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObject) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *RestoreObject) validateCloudDeployTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployTarget) { // not required - 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 -} - -func (m *RestoreObject) validateCloudReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if m.CloudReplicationTarget != nil { - if err := m.CloudReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateConfigVec(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigVec) { // not required - return nil - } - - for i := 0; i < len(m.ConfigVec); i++ { - if swag.IsZero(m.ConfigVec[i]) { // not required - continue - } - - if m.ConfigVec[i] != nil { - if err := m.ConfigVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreObject) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *RestoreObject) validateNosqlRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.NosqlRecoverParams) { // not required - return nil - } - - if m.NosqlRecoverParams != nil { - if err := m.NosqlRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateOneDriveRestoreEntityParams(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveRestoreEntityParams) { // not required - return nil - } - - if m.OneDriveRestoreEntityParams != nil { - if err := m.OneDriveRestoreEntityParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveRestoreEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveRestoreEntityParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validatePitPreferredArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.PitPreferredArchivalTarget) { // not required - return nil - } - - if m.PitPreferredArchivalTarget != nil { - if err := m.PitPreferredArchivalTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pitPreferredArchivalTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pitPreferredArchivalTarget") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateRestoreAcropolisVMParam(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAcropolisVMParam) { // not required - return nil - } - - if m.RestoreAcropolisVMParam != nil { - if err := m.RestoreAcropolisVMParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmParam") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateRestoreAzureSQLParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreAzureSQLParams) { // not required - return nil - } - - if m.RestoreAzureSQLParams != nil { - if err := m.RestoreAzureSQLParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAzureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAzureSqlParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateRestoreExchangeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreExchangeParams) { // not required - return nil - } - - if m.RestoreExchangeParams != nil { - if err := m.RestoreExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreExchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreExchangeParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateRestoreRdsPostgresParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreRdsPostgresParams) { // not required - return nil - } - - if m.RestoreRdsPostgresParams != nil { - if err := m.RestoreRdsPostgresParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreRdsPostgresParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreRdsPostgresParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateRestoreVappInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVappInfo) { // not required - return nil - } - - if m.RestoreVappInfo != nil { - if err := m.RestoreVappInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVappInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateSanRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.SanRecoverParams) { // not required - return nil - } - - if m.SanRecoverParams != nil { - if err := m.SanRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateSfdcRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcRecoverParams) { // not required - return nil - } - - if m.SfdcRecoverParams != nil { - if err := m.SfdcRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) validateUdaRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaRecoverParams) { // not required - return nil - } - - if m.UdaRecoverParams != nil { - if err := m.UdaRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore object based on the context it is used -func (m *RestoreObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfigVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNosqlRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveRestoreEntityParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePitPreferredArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAcropolisVMParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreAzureSQLParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreRdsPostgresParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVappInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSanRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObject) 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 *RestoreObject) 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 *RestoreObject) contextValidateCloudReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudReplicationTarget != nil { - - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if err := m.CloudReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateConfigVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConfigVec); i++ { - - if m.ConfigVec[i] != nil { - - if swag.IsZero(m.ConfigVec[i]) { // not required - return nil - } - - if err := m.ConfigVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreObject) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) 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 -} - -func (m *RestoreObject) contextValidateNosqlRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NosqlRecoverParams != nil { - - if swag.IsZero(m.NosqlRecoverParams) { // not required - return nil - } - - if err := m.NosqlRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nosqlRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nosqlRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateOneDriveRestoreEntityParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveRestoreEntityParams != nil { - - if swag.IsZero(m.OneDriveRestoreEntityParams) { // not required - return nil - } - - if err := m.OneDriveRestoreEntityParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveRestoreEntityParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveRestoreEntityParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidatePitPreferredArchivalTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.PitPreferredArchivalTarget != nil { - - if swag.IsZero(m.PitPreferredArchivalTarget) { // not required - return nil - } - - if err := m.PitPreferredArchivalTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pitPreferredArchivalTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pitPreferredArchivalTarget") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateRestoreAcropolisVMParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAcropolisVMParam != nil { - - if swag.IsZero(m.RestoreAcropolisVMParam) { // not required - return nil - } - - if err := m.RestoreAcropolisVMParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAcropolisVmParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAcropolisVmParam") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateRestoreAzureSQLParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreAzureSQLParams != nil { - - if swag.IsZero(m.RestoreAzureSQLParams) { // not required - return nil - } - - if err := m.RestoreAzureSQLParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreAzureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreAzureSqlParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateRestoreExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreExchangeParams != nil { - - if swag.IsZero(m.RestoreExchangeParams) { // not required - return nil - } - - if err := m.RestoreExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreExchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreExchangeParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateRestoreRdsPostgresParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreRdsPostgresParams != nil { - - if swag.IsZero(m.RestoreRdsPostgresParams) { // not required - return nil - } - - if err := m.RestoreRdsPostgresParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreRdsPostgresParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreRdsPostgresParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateRestoreVappInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVappInfo != nil { - - if swag.IsZero(m.RestoreVappInfo) { // not required - return nil - } - - if err := m.RestoreVappInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVappInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateSanRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SanRecoverParams != nil { - - if swag.IsZero(m.SanRecoverParams) { // not required - return nil - } - - if err := m.SanRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateSfdcRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcRecoverParams != nil { - - if swag.IsZero(m.SfdcRecoverParams) { // not required - return nil - } - - if err := m.SfdcRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecoverParams") - } - return err - } - } - - return nil -} - -func (m *RestoreObject) contextValidateUdaRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaRecoverParams != nil { - - if swag.IsZero(m.UdaRecoverParams) { // not required - return nil - } - - if err := m.UdaRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaRecoverParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObject) UnmarshalBinary(b []byte) error { - var res RestoreObject - 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 deleted file mode 100644 index 35b21162..00000000 --- a/v1/models/restore_object_details.go +++ /dev/null @@ -1,481 +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" -) - -// RestoreObjectDetails Restore Object. -// -// Specifies an object to recover or clone or an object to restore files -// and folders from. -// A VM object can be recovered or cloned. A View object can be cloned. -// 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 RestoreObjectDetails -type RestoreObjectDetails struct { - - // archival target - ArchivalTarget *RestoreObjectDetailsArchivalTarget `json:"archivalTarget,omitempty"` - - // cloud deploy target - CloudDeployTarget *RestoreObjectDetailsCloudDeployTarget `json:"cloudDeployTarget,omitempty"` - - // Specifies the type of the Protection Source. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Protection Job Id. - // - // Specifies id of the Protection Job that backed up the objects - // to be restored. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the id of the Job Run that captured the snapshot. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // job Uid - JobUID *RestoreObjectDetailsJobUID `json:"jobUid,omitempty"` - - // Specifies the timestamp (in microseconds. from epoch) for recovering - // to a point-in-time in the past. - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - - // Specifies the id of the leaf object to recover, clone or recover - // files/folders from. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies the name of the Protection Source. - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the time when the Job Run starts capturing a snapshot. - // Specified as a Unix epoch Timestamp (in microseconds). - StartedTimeUsecs *int64 `json:"startedTimeUsecs,omitempty"` -} - -// Validate validates this restore object details -func (m *RestoreObjectDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObjectDetails) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *RestoreObjectDetails) validateCloudDeployTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployTarget) { // not required - 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 -} - -var restoreObjectDetailsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreObjectDetailsTypeEnvironmentPropEnum = append(restoreObjectDetailsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RestoreObjectDetailsEnvironmentKVMware captures enum value "kVMware" - RestoreObjectDetailsEnvironmentKVMware string = "kVMware" - - // RestoreObjectDetailsEnvironmentKHyperV captures enum value "kHyperV" - RestoreObjectDetailsEnvironmentKHyperV string = "kHyperV" - - // RestoreObjectDetailsEnvironmentKSQL captures enum value "kSQL" - RestoreObjectDetailsEnvironmentKSQL string = "kSQL" - - // RestoreObjectDetailsEnvironmentKView captures enum value "kView" - RestoreObjectDetailsEnvironmentKView string = "kView" - - // RestoreObjectDetailsEnvironmentKPuppeteer captures enum value "kPuppeteer" - RestoreObjectDetailsEnvironmentKPuppeteer string = "kPuppeteer" - - // RestoreObjectDetailsEnvironmentKPhysical captures enum value "kPhysical" - RestoreObjectDetailsEnvironmentKPhysical string = "kPhysical" - - // RestoreObjectDetailsEnvironmentKPure captures enum value "kPure" - RestoreObjectDetailsEnvironmentKPure string = "kPure" - - // RestoreObjectDetailsEnvironmentKNimble captures enum value "kNimble" - RestoreObjectDetailsEnvironmentKNimble string = "kNimble" - - // RestoreObjectDetailsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RestoreObjectDetailsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RestoreObjectDetailsEnvironmentKAzure captures enum value "kAzure" - RestoreObjectDetailsEnvironmentKAzure string = "kAzure" - - // RestoreObjectDetailsEnvironmentKNetapp captures enum value "kNetapp" - RestoreObjectDetailsEnvironmentKNetapp string = "kNetapp" - - // RestoreObjectDetailsEnvironmentKAgent captures enum value "kAgent" - RestoreObjectDetailsEnvironmentKAgent string = "kAgent" - - // RestoreObjectDetailsEnvironmentKGenericNas captures enum value "kGenericNas" - RestoreObjectDetailsEnvironmentKGenericNas string = "kGenericNas" - - // RestoreObjectDetailsEnvironmentKAcropolis captures enum value "kAcropolis" - RestoreObjectDetailsEnvironmentKAcropolis string = "kAcropolis" - - // RestoreObjectDetailsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RestoreObjectDetailsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RestoreObjectDetailsEnvironmentKIsilon captures enum value "kIsilon" - RestoreObjectDetailsEnvironmentKIsilon string = "kIsilon" - - // RestoreObjectDetailsEnvironmentKGPFS captures enum value "kGPFS" - RestoreObjectDetailsEnvironmentKGPFS string = "kGPFS" - - // RestoreObjectDetailsEnvironmentKKVM captures enum value "kKVM" - RestoreObjectDetailsEnvironmentKKVM string = "kKVM" - - // RestoreObjectDetailsEnvironmentKAWS captures enum value "kAWS" - RestoreObjectDetailsEnvironmentKAWS string = "kAWS" - - // RestoreObjectDetailsEnvironmentKExchange captures enum value "kExchange" - RestoreObjectDetailsEnvironmentKExchange string = "kExchange" - - // RestoreObjectDetailsEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RestoreObjectDetailsEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RestoreObjectDetailsEnvironmentKOracle captures enum value "kOracle" - RestoreObjectDetailsEnvironmentKOracle string = "kOracle" - - // RestoreObjectDetailsEnvironmentKGCP captures enum value "kGCP" - RestoreObjectDetailsEnvironmentKGCP string = "kGCP" - - // RestoreObjectDetailsEnvironmentKFlashBlade captures enum value "kFlashBlade" - RestoreObjectDetailsEnvironmentKFlashBlade string = "kFlashBlade" - - // RestoreObjectDetailsEnvironmentKAWSNative captures enum value "kAWSNative" - RestoreObjectDetailsEnvironmentKAWSNative string = "kAWSNative" - - // RestoreObjectDetailsEnvironmentKO365 captures enum value "kO365" - RestoreObjectDetailsEnvironmentKO365 string = "kO365" - - // RestoreObjectDetailsEnvironmentKO365Outlook captures enum value "kO365Outlook" - RestoreObjectDetailsEnvironmentKO365Outlook string = "kO365Outlook" - - // RestoreObjectDetailsEnvironmentKHyperFlex captures enum value "kHyperFlex" - RestoreObjectDetailsEnvironmentKHyperFlex string = "kHyperFlex" - - // RestoreObjectDetailsEnvironmentKGCPNative captures enum value "kGCPNative" - RestoreObjectDetailsEnvironmentKGCPNative string = "kGCPNative" - - // RestoreObjectDetailsEnvironmentKAzureNative captures enum value "kAzureNative" - RestoreObjectDetailsEnvironmentKAzureNative string = "kAzureNative" - - // RestoreObjectDetailsEnvironmentKKubernetes captures enum value "kKubernetes" - RestoreObjectDetailsEnvironmentKKubernetes string = "kKubernetes" - - // RestoreObjectDetailsEnvironmentKElastifile captures enum value "kElastifile" - RestoreObjectDetailsEnvironmentKElastifile string = "kElastifile" - - // RestoreObjectDetailsEnvironmentKAD captures enum value "kAD" - RestoreObjectDetailsEnvironmentKAD string = "kAD" - - // RestoreObjectDetailsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RestoreObjectDetailsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RestoreObjectDetailsEnvironmentKCassandra captures enum value "kCassandra" - RestoreObjectDetailsEnvironmentKCassandra string = "kCassandra" - - // RestoreObjectDetailsEnvironmentKMongoDB captures enum value "kMongoDB" - RestoreObjectDetailsEnvironmentKMongoDB string = "kMongoDB" - - // RestoreObjectDetailsEnvironmentKCouchbase captures enum value "kCouchbase" - RestoreObjectDetailsEnvironmentKCouchbase string = "kCouchbase" - - // RestoreObjectDetailsEnvironmentKHdfs captures enum value "kHdfs" - RestoreObjectDetailsEnvironmentKHdfs string = "kHdfs" - - // RestoreObjectDetailsEnvironmentKHive captures enum value "kHive" - RestoreObjectDetailsEnvironmentKHive string = "kHive" - - // RestoreObjectDetailsEnvironmentKHBase captures enum value "kHBase" - RestoreObjectDetailsEnvironmentKHBase string = "kHBase" - - // RestoreObjectDetailsEnvironmentKUDA captures enum value "kUDA" - RestoreObjectDetailsEnvironmentKUDA string = "kUDA" - - // RestoreObjectDetailsEnvironmentKO365Teams captures enum value "kO365Teams" - RestoreObjectDetailsEnvironmentKO365Teams string = "kO365Teams" - - // RestoreObjectDetailsEnvironmentKO365Group captures enum value "kO365Group" - RestoreObjectDetailsEnvironmentKO365Group string = "kO365Group" - - // RestoreObjectDetailsEnvironmentKO365Exchange captures enum value "kO365Exchange" - RestoreObjectDetailsEnvironmentKO365Exchange string = "kO365Exchange" - - // RestoreObjectDetailsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RestoreObjectDetailsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RestoreObjectDetailsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RestoreObjectDetailsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RestoreObjectDetailsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RestoreObjectDetailsEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RestoreObjectDetails) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreObjectDetailsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreObjectDetails) 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 -} - -func (m *RestoreObjectDetails) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this restore object details based on the context it is used -func (m *RestoreObjectDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *RestoreObjectDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectDetails) UnmarshalBinary(b []byte) error { - var res RestoreObjectDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_object_params.go b/v1/models/restore_object_params.go deleted file mode 100644 index 8d933d30..00000000 --- a/v1/models/restore_object_params.go +++ /dev/null @@ -1,410 +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" -) - -// RestoreObjectParams The parameters that control the various options to restore a RestoreObject. -// -// swagger:model RestoreObjectParams -type RestoreObjectParams struct { - - // The action to perform. - Action *int32 `json:"action,omitempty"` - - // A datastore entity where the object's files should be restored to. This - // field is optional if object is being restored to its original parent - // source. If not specified, the object's files will be restored to their - // original datastore locations. This field is mandatory if object is being - // restored to a different resource pool or to a different parent source. - DatastoreEntity *EntityProto `json:"datastoreEntity,omitempty"` - - // The power state configuration to be applied to the restored object. - // - // Semantics for kCloneVMs task: By default, objects are restored in the - // powered off state. - // - // Semantics for kRecoverVMs task: By default, objects are restored in the - // powered on state. - // - // This proto can be used to override the default behavior for kCloneVMs or - // kRecoverVMs task. - PowerStateConfig *PowerStateConfigProto `json:"powerStateConfig,omitempty"` - - // By default, objects are restored with their original name. This field can - // be used to specify the transformation ( i.e prefix/suffix) to be applied - // to the source object name to derive the new name of the restored object. - RenameRestoredObjectParam *RenameObjectParamProto `json:"renameRestoredObjectParam,omitempty"` - - // The resource pool entity where the restored objects will be attached. This - // field is mandatory for a kCloneVMs task. - // - // This field is optional for a kRecoverVMs task if the objects are being - // restored to its original parent source. If not specified, restored objects - // will be attached to its original resource entity. This field is mandatory - // if objects are being restored to a different parent source. - ResourcePoolEntity *EntityProto `json:"resourcePoolEntity,omitempty"` - - // 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. - RestoreParentSource *EntityProto `json:"restoreParentSource,omitempty"` - - // The network configuration to be applied to the restored object. - // - // Semantics for kCloneVMs task: By default, if objects are being restored to - // their original location, then network will be disabled. If objects are - // being restored to a different location (i.e., either to different resource - // pool or to different parent source), then network will be detached. - // - // Semantics for kRecoverVMs task: By default, if objects are being restored - // to their original location, then original network configuration will be - // preserved. If objects are being restored to different location, (i.e., - // either to different resource pool or to different parent source), then - // network will be detached. - // - // Below field can be used to override the default network configuration of - // the restored objects. - // - // If user want to keep the original network setting for kRecoverVMs task, - // then this proto should not be set. - RestoredObjectsNetworkConfig *RestoredObjectNetworkConfigProto `json:"restoredObjectsNetworkConfig,omitempty"` - - // Target view into which the objects are to be cloned. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this restore object params -func (m *RestoreObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerStateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredObjectsNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObjectParams) validateDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if m.DatastoreEntity != nil { - if err := m.DatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) validatePowerStateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if m.PowerStateConfig != nil { - if err := m.PowerStateConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) validateRenameRestoredObjectParam(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if m.RenameRestoredObjectParam != nil { - if err := m.RenameRestoredObjectParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) validateRestoreParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if m.RestoreParentSource != nil { - if err := m.RestoreParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) validateRestoredObjectsNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if m.RestoredObjectsNetworkConfig != nil { - if err := m.RestoredObjectsNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore object params based on the context it is used -func (m *RestoreObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePowerStateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredObjectsNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObjectParams) contextValidateDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreEntity != nil { - - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if err := m.DatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) contextValidatePowerStateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerStateConfig != nil { - - if swag.IsZero(m.PowerStateConfig) { // not required - return nil - } - - if err := m.PowerStateConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerStateConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerStateConfig") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) contextValidateRenameRestoredObjectParam(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParam != nil { - - if swag.IsZero(m.RenameRestoredObjectParam) { // not required - return nil - } - - if err := m.RenameRestoredObjectParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParam") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParentSource != nil { - - if swag.IsZero(m.RestoreParentSource) { // not required - return nil - } - - if err := m.RestoreParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParentSource") - } - return err - } - } - - return nil -} - -func (m *RestoreObjectParams) contextValidateRestoredObjectsNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredObjectsNetworkConfig != nil { - - if swag.IsZero(m.RestoredObjectsNetworkConfig) { // not required - return nil - } - - if err := m.RestoredObjectsNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredObjectsNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredObjectsNetworkConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectParams) UnmarshalBinary(b []byte) error { - var res RestoreObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_object_state.go b/v1/models/restore_object_state.go deleted file mode 100644 index d6e6f5de..00000000 --- a/v1/models/restore_object_state.go +++ /dev/null @@ -1,225 +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" -) - -// RestoreObjectState Restore Object State. -// -// Specifies the state of an individual object in a Restore Task. -// -// swagger:model RestoreObjectState -type RestoreObjectState struct { - - // Specifies if an error occurred during the restore operation. - Error *RequestError `json:"error,omitempty"` - - // Specifies the status of an object during a Restore Task. - // 'kFilesCloned' indicates that the cloning has completed. - // 'kFetchedEntityInfo' indicates that information about the object was - // fetched from the primary source. - // 'kVMCreated' indicates that the new VM was created. - // 'kRelocationStarted' indicates that restoring to a different - // resource pool has started. - // 'kFinished' indicates that the Restore Task has finished. - // Whether it was successful or not is indicated by the error code that - // that is stored with the Restore Task. - // 'kAborted' indicates that the Restore Task was aborted before - // trying to restore this object. This can happen if the - // Restore Task encounters a global error. - // For example during a 'kCloneVMs' Restore Task, the datastore - // could not be mounted. The entire Restore Task is aborted - // before trying to create VMs on the primary source. - // 'kDataCopyStarted' indicates that the disk copy is started. - // 'kInProgress' captures a generic in-progress state and can be used by restore - // operations that don't track individual states. - // Enum: ["kFilesCloned","kFetchedEntityInfo","kVMCreated","kRelocationStarted","kFinished","kAborted","kDataCopyStarted","kInProgress"] - ObjectStatus *string `json:"objectStatus,omitempty"` - - // Specifies the id of the Resource Pool that the restored - // object is attached to. - // For a 'kRecoverVMs' Restore Task, an object can be recovered - // back to its original resource pool. This means while recovering a - // set of objects, this field can reference different resource pools. - // For a 'kCloneVMs' Restore Task, all objects are attached to the - // same resource pool. However, this field will still be - // populated. - // NOTE: This field may not be populated if the restore of the object - // fails. - ResourcePoolID *int64 `json:"resourcePoolId,omitempty"` - - // Specifies the Id of the recovered or cloned object. - // NOTE: For a Restore Task that is recovering or cloning an object - // in the VMware environment, after the VM is created it is storage - // vMotioned to its primary datastore. If storage - // vMotion fails, the Cohesity Cluster marks the recovery task as failed. - // However, this field is still populated with the id of the - // recovered VM. This id can be used later to - // clean up the VM from primary environment (i.e, the vCenter Server). - RestoredObjectID *int64 `json:"restoredObjectId,omitempty"` - - // Specifies the Protection Source id of the object to be recovered or - // cloned. - SourceObjectID *int64 `json:"sourceObjectId,omitempty"` -} - -// Validate validates this restore object state -func (m *RestoreObjectState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObjectState) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -var restoreObjectStateTypeObjectStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFilesCloned","kFetchedEntityInfo","kVMCreated","kRelocationStarted","kFinished","kAborted","kDataCopyStarted","kInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreObjectStateTypeObjectStatusPropEnum = append(restoreObjectStateTypeObjectStatusPropEnum, v) - } -} - -const ( - - // RestoreObjectStateObjectStatusKFilesCloned captures enum value "kFilesCloned" - RestoreObjectStateObjectStatusKFilesCloned string = "kFilesCloned" - - // RestoreObjectStateObjectStatusKFetchedEntityInfo captures enum value "kFetchedEntityInfo" - RestoreObjectStateObjectStatusKFetchedEntityInfo string = "kFetchedEntityInfo" - - // RestoreObjectStateObjectStatusKVMCreated captures enum value "kVMCreated" - RestoreObjectStateObjectStatusKVMCreated string = "kVMCreated" - - // RestoreObjectStateObjectStatusKRelocationStarted captures enum value "kRelocationStarted" - RestoreObjectStateObjectStatusKRelocationStarted string = "kRelocationStarted" - - // RestoreObjectStateObjectStatusKFinished captures enum value "kFinished" - RestoreObjectStateObjectStatusKFinished string = "kFinished" - - // RestoreObjectStateObjectStatusKAborted captures enum value "kAborted" - RestoreObjectStateObjectStatusKAborted string = "kAborted" - - // RestoreObjectStateObjectStatusKDataCopyStarted captures enum value "kDataCopyStarted" - RestoreObjectStateObjectStatusKDataCopyStarted string = "kDataCopyStarted" - - // RestoreObjectStateObjectStatusKInProgress captures enum value "kInProgress" - RestoreObjectStateObjectStatusKInProgress string = "kInProgress" -) - -// prop value enum -func (m *RestoreObjectState) validateObjectStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreObjectStateTypeObjectStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreObjectState) validateObjectStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectStatus) { // not required - return nil - } - - // value enum - if err := m.validateObjectStatusEnum("objectStatus", "body", *m.ObjectStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this restore object state based on the context it is used -func (m *RestoreObjectState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreObjectState) 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 -} - -// MarshalBinary interface implementation -func (m *RestoreObjectState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectState) UnmarshalBinary(b []byte) error { - var res RestoreObjectState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_one_drive_params.go b/v1/models/restore_one_drive_params.go deleted file mode 100644 index 6619eafe..00000000 --- a/v1/models/restore_one_drive_params.go +++ /dev/null @@ -1,199 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOneDriveParams NOTE: Per object/entity params should be put into -// O365OneDriveRestoreEntityParams going forward. Eventually -// RestoreOneDriveParams should only contain task/job level params that -// apply to all entities/users/objects in the task/job. -// -// swagger:model RestoreOneDriveParams -type RestoreOneDriveParams struct { - - // The list of users/groups whose drives are being restored. - DriveOwnerVec []*RestoreOneDriveParamsDriveOwner `json:"driveOwnerVec"` - - // When the drive type is kPreservationHoldLibrary, this folder prefix is - // pre-pended to the PHL restore path as either a folder (in the case of - // in place restore) or a folder name prefix (for alternate restore). - // If a drive with type kPreservationHoldLibrary is being restored, this - // prefix must be set as it is required for the restore. - PhlFolderPrefix *string `json:"phlFolderPrefix,omitempty"` - - // Whether or not all drive items are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // The id of the drive in which items will be restored. - TargetDriveID *string `json:"targetDriveId,omitempty"` - - // All drives part of various users listed in drive_owner_vec will be - // restored to the drive belonging to target_user having id target_drive_id. - // Let's say drive_owner_vec is A and B; drive_vec of A and B is 111 and 222 - // respectively; target_user is C; target_drive_id is 333. The final - // folder-hierarchy after restore job is finished will look like this : - // C:333: {target_folder_path}/| - // |A/111/{whatever is there in restore_item_vec - // of 111} |B/222/{whatever is there in - // restore_item_vec of 222} - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // This is the user in whose drive the items will be restored. - TargetUser *EntityProto `json:"targetUser,omitempty"` -} - -// Validate validates this restore one drive params -func (m *RestoreOneDriveParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveOwnerVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParams) validateDriveOwnerVec(formats strfmt.Registry) error { - if swag.IsZero(m.DriveOwnerVec) { // not required - return nil - } - - for i := 0; i < len(m.DriveOwnerVec); i++ { - if swag.IsZero(m.DriveOwnerVec[i]) { // not required - continue - } - - if m.DriveOwnerVec[i] != nil { - if err := m.DriveOwnerVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOneDriveParams) validateTargetUser(formats strfmt.Registry) error { - if swag.IsZero(m.TargetUser) { // not required - return nil - } - - if m.TargetUser != nil { - if err := m.TargetUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetUser") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore one drive params based on the context it is used -func (m *RestoreOneDriveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveOwnerVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParams) contextValidateDriveOwnerVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveOwnerVec); i++ { - - if m.DriveOwnerVec[i] != nil { - - if swag.IsZero(m.DriveOwnerVec[i]) { // not required - return nil - } - - if err := m.DriveOwnerVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOneDriveParams) contextValidateTargetUser(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetUser != nil { - - if swag.IsZero(m.TargetUser) { // not required - return nil - } - - if err := m.TargetUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetUser") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOneDriveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOneDriveParams) UnmarshalBinary(b []byte) error { - var res RestoreOneDriveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_one_drive_params_drive_item.go b/v1/models/restore_one_drive_params_drive_item.go deleted file mode 100644 index e955bc00..00000000 --- a/v1/models/restore_one_drive_params_drive_item.go +++ /dev/null @@ -1,58 +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" -) - -// RestoreOneDriveParamsDriveItem Defining DriveItem proto-message. -// -// This will be set in case of partial drive recovery. -// -// swagger:model RestoreOneDriveParams_DriveItem -type RestoreOneDriveParamsDriveItem struct { - - // The path of the drive item relative to root. - DriveItemPath *string `json:"driveItemPath,omitempty"` - - // The unique identifier of the item within the Drive. - ID *string `json:"id,omitempty"` - - // Specify if the item is a file or not. - IsFileItem *bool `json:"isFileItem,omitempty"` -} - -// Validate validates this restore one drive params drive item -func (m *RestoreOneDriveParamsDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore one drive params drive item based on context it is used -func (m *RestoreOneDriveParamsDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveItem) UnmarshalBinary(b []byte) error { - var res RestoreOneDriveParamsDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_one_drive_params_drive_owner.go b/v1/models/restore_one_drive_params_drive_owner.go deleted file mode 100644 index f9ca79e6..00000000 --- a/v1/models/restore_one_drive_params_drive_owner.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOneDriveParamsDriveOwner restore one drive params drive owner -// -// swagger:model RestoreOneDriveParams_DriveOwner -type RestoreOneDriveParamsDriveOwner struct { - - // The list of drives that are being restored. - DriveVec []*RestoreOneDriveParamsDriveOwnerDrive `json:"driveVec"` - - // This will store the details of the user whose drive is to be restored. - Object *RestoreObject `json:"object,omitempty"` -} - -// Validate validates this restore one drive params drive owner -func (m *RestoreOneDriveParamsDriveOwner) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParamsDriveOwner) validateDriveVec(formats strfmt.Registry) error { - if swag.IsZero(m.DriveVec) { // not required - return nil - } - - for i := 0; i < len(m.DriveVec); i++ { - if swag.IsZero(m.DriveVec[i]) { // not required - continue - } - - if m.DriveVec[i] != nil { - if err := m.DriveVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOneDriveParamsDriveOwner) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore one drive params drive owner based on the context it is used -func (m *RestoreOneDriveParamsDriveOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParamsDriveOwner) contextValidateDriveVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveVec); i++ { - - if m.DriveVec[i] != nil { - - if swag.IsZero(m.DriveVec[i]) { // not required - return nil - } - - if err := m.DriveVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOneDriveParamsDriveOwner) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveOwner) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveOwner) UnmarshalBinary(b []byte) error { - var res RestoreOneDriveParamsDriveOwner - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_one_drive_params_drive_owner_drive.go b/v1/models/restore_one_drive_params_drive_owner_drive.go deleted file mode 100644 index 72449495..00000000 --- a/v1/models/restore_one_drive_params_drive_owner_drive.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOneDriveParamsDriveOwnerDrive restore one drive params drive owner drive -// -// swagger:model RestoreOneDriveParams_DriveOwner_Drive -type RestoreOneDriveParamsDriveOwnerDrive struct { - - // Specify if the entire drive is to be restored. - // This field should be false if restore_item_vec size > 0. - IsEntireDriveRequired *bool `json:"isEntireDriveRequired,omitempty"` - - // Id of the drive whose items are being restored. - RestoreDriveID *string `json:"restoreDriveId,omitempty"` - - // List of drive paths that need to be restored. - RestoreItemVec []*RestoreOneDriveParamsDriveItem `json:"restoreItemVec"` -} - -// Validate validates this restore one drive params drive owner drive -func (m *RestoreOneDriveParamsDriveOwnerDrive) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreItemVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParamsDriveOwnerDrive) validateRestoreItemVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreItemVec) { // not required - return nil - } - - for i := 0; i < len(m.RestoreItemVec); i++ { - if swag.IsZero(m.RestoreItemVec[i]) { // not required - continue - } - - if m.RestoreItemVec[i] != nil { - if err := m.RestoreItemVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore one drive params drive owner drive based on the context it is used -func (m *RestoreOneDriveParamsDriveOwnerDrive) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreItemVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOneDriveParamsDriveOwnerDrive) contextValidateRestoreItemVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreItemVec); i++ { - - if m.RestoreItemVec[i] != nil { - - if swag.IsZero(m.RestoreItemVec[i]) { // not required - return nil - } - - if err := m.RestoreItemVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreItemVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveOwnerDrive) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOneDriveParamsDriveOwnerDrive) UnmarshalBinary(b []byte) error { - var res RestoreOneDriveParamsDriveOwnerDrive - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_oracle_app_object_params.go b/v1/models/restore_oracle_app_object_params.go deleted file mode 100644 index dd6febaa..00000000 --- a/v1/models/restore_oracle_app_object_params.go +++ /dev/null @@ -1,638 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOracleAppObjectParams The application object restore params for Oracle objects (Oracle databases). -// -// swagger:model RestoreOracleAppObjectParams -type RestoreOracleAppObjectParams struct { - - // alternate location params - AlternateLocationParams *RestoreOracleAppObjectParamsAlternateLocationParams `json:"alternateLocationParams,omitempty"` - - // Whether or not this is a complete recovery attempt. - AttemptCompleteRecovery *bool `json:"attemptCompleteRecovery,omitempty"` - - // Contains information about list of objects (PDB/Table/DataFile) - // to restore. - GranularRestoreInfo *GranularRestoreInfo `json:"granularRestoreInfo,omitempty"` - - // Will be set to true if this is a multistage restore. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // If set to true, the recovered database will not be opened. - NoOpenMode *bool `json:"noOpenMode,omitempty"` - - // Contains information related to archive log restore. - OracleArchiveLogRestoreInfo *OracleArchiveLogInfo `json:"oracleArchiveLogRestoreInfo,omitempty"` - - // Following field contains information related to view expose workflow. Ex - // mountpoint identifier specified by User from UI. - OracleCloneAppViewParamsVec []*CloneAppViewParams `json:"oracleCloneAppViewParamsVec"` - - // Contains information related to recovery validations. - OracleRecoveryValidationInfo *OracleRecoveryValidationInfo `json:"oracleRecoveryValidationInfo,omitempty"` - - // Contains information regarding oracle sources, channel information and - // host nomination details. - OracleTargetParams *OracleSourceParams `json:"oracleTargetParams,omitempty"` - - // Contains parameter information about any update task which needed to be - // performed on a sucessful restore/clone task. Ex Instant restore of - // Clone. - OracleUpdateRestoreOptions *OracleUpdateRestoreTaskOptions `json:"oracleUpdateRestoreOptions,omitempty"` - - // If set to true, parallel backups/restores/clones are enabled on same host. - ParallelOpEnabled *bool `json:"parallelOpEnabled,omitempty"` - - // Specifies whether it is restored to a RAC database. - RestoreAsRac *bool `json:"restoreAsRac,omitempty"` - - // Contains information related spfile/pfile restore. - RestoreSpfileOrPfileInfo *RestoreSpfileOrPfileInfo `json:"restoreSpfileOrPfileInfo,omitempty"` - - // The time to which the Oracle database needs to be restored. This allows - // for granular recovery of Oracle databases. If this is not set, the Oracle - // database will be recovered to the full/incremental snapshot (specified in - // the owner's restore object in AppOwnerRestoreInfo). This is only - // applicable if restoring to the original Oracle instance. - RestoreTimeSecs *int64 `json:"restoreTimeSecs,omitempty"` - - // List of archive logs to apply on Database after overwrite restore. - RollForwardLogPathVec []string `json:"rollForwardLogPathVec"` - - // Time till which we have to roll-forward the database. This overrides - // user mentioned point in time(if any). - RollForwardTimeMsecs *int64 `json:"rollForwardTimeMsecs,omitempty"` - - // Information for Oracle Same Config Instant Recovery of a database. - SameConfigIrRecoveryOptions *SameConfigIrRecoveryOptions `json:"sameConfigIrRecoveryOptions,omitempty"` - - // shell environment vec - ShellEnvironmentVec []*RestoreOracleAppObjectParamsKeyValuePair `json:"shellEnvironmentVec"` - - // Whether or not to skip the nid step in Oracle Clone workflow. - // Applicable to both smart and old clone workflow. - SkipCloneNid *bool `json:"skipCloneNid,omitempty"` - - // Specifies whether allowed to automatically stop active passive database. - StopActivePassive *bool `json:"stopActivePassive,omitempty"` - - // Whether database recovery should be performed using the SCN value or time - // value. Currently this is applicable only during overwrite restore and - // clone workflow. In case of alternate restore we cannot use it since we - // cannot set until scn clause if we don't catalog the backup view. - UseScnForRestore *bool `json:"useScnForRestore,omitempty"` -} - -// Validate validates this restore oracle app object params -func (m *RestoreOracleAppObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternateLocationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGranularRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleArchiveLogRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleCloneAppViewParamsVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleRecoveryValidationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleUpdateRestoreOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSpfileOrPfileInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSameConfigIrRecoveryOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateShellEnvironmentVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOracleAppObjectParams) validateAlternateLocationParams(formats strfmt.Registry) error { - if swag.IsZero(m.AlternateLocationParams) { // not required - return nil - } - - if m.AlternateLocationParams != nil { - if err := m.AlternateLocationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alternateLocationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alternateLocationParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateGranularRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.GranularRestoreInfo) { // not required - return nil - } - - if m.GranularRestoreInfo != nil { - if err := m.GranularRestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateOracleArchiveLogRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OracleArchiveLogRestoreInfo) { // not required - return nil - } - - if m.OracleArchiveLogRestoreInfo != nil { - if err := m.OracleArchiveLogRestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateOracleCloneAppViewParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.OracleCloneAppViewParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.OracleCloneAppViewParamsVec); i++ { - if swag.IsZero(m.OracleCloneAppViewParamsVec[i]) { // not required - continue - } - - if m.OracleCloneAppViewParamsVec[i] != nil { - if err := m.OracleCloneAppViewParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleCloneAppViewParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleCloneAppViewParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateOracleRecoveryValidationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OracleRecoveryValidationInfo) { // not required - return nil - } - - if m.OracleRecoveryValidationInfo != nil { - if err := m.OracleRecoveryValidationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRecoveryValidationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRecoveryValidationInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateOracleTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleTargetParams) { // not required - return nil - } - - if m.OracleTargetParams != nil { - if err := m.OracleTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTargetParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateOracleUpdateRestoreOptions(formats strfmt.Registry) error { - if swag.IsZero(m.OracleUpdateRestoreOptions) { // not required - return nil - } - - if m.OracleUpdateRestoreOptions != nil { - if err := m.OracleUpdateRestoreOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleUpdateRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleUpdateRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateRestoreSpfileOrPfileInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSpfileOrPfileInfo) { // not required - return nil - } - - if m.RestoreSpfileOrPfileInfo != nil { - if err := m.RestoreSpfileOrPfileInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSpfileOrPfileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSpfileOrPfileInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateSameConfigIrRecoveryOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SameConfigIrRecoveryOptions) { // not required - return nil - } - - if m.SameConfigIrRecoveryOptions != nil { - if err := m.SameConfigIrRecoveryOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameConfigIrRecoveryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameConfigIrRecoveryOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) validateShellEnvironmentVec(formats strfmt.Registry) error { - if swag.IsZero(m.ShellEnvironmentVec) { // not required - return nil - } - - for i := 0; i < len(m.ShellEnvironmentVec); i++ { - if swag.IsZero(m.ShellEnvironmentVec[i]) { // not required - continue - } - - if m.ShellEnvironmentVec[i] != nil { - if err := m.ShellEnvironmentVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shellEnvironmentVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shellEnvironmentVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore oracle app object params based on the context it is used -func (m *RestoreOracleAppObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlternateLocationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGranularRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleArchiveLogRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleCloneAppViewParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleRecoveryValidationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleUpdateRestoreOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSpfileOrPfileInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSameConfigIrRecoveryOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateShellEnvironmentVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateAlternateLocationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AlternateLocationParams != nil { - - if swag.IsZero(m.AlternateLocationParams) { // not required - return nil - } - - if err := m.AlternateLocationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alternateLocationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alternateLocationParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateGranularRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.GranularRestoreInfo != nil { - - if swag.IsZero(m.GranularRestoreInfo) { // not required - return nil - } - - if err := m.GranularRestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateOracleArchiveLogRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleArchiveLogRestoreInfo != nil { - - if swag.IsZero(m.OracleArchiveLogRestoreInfo) { // not required - return nil - } - - if err := m.OracleArchiveLogRestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateOracleCloneAppViewParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OracleCloneAppViewParamsVec); i++ { - - if m.OracleCloneAppViewParamsVec[i] != nil { - - if swag.IsZero(m.OracleCloneAppViewParamsVec[i]) { // not required - return nil - } - - if err := m.OracleCloneAppViewParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleCloneAppViewParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleCloneAppViewParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateOracleRecoveryValidationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleRecoveryValidationInfo != nil { - - if swag.IsZero(m.OracleRecoveryValidationInfo) { // not required - return nil - } - - if err := m.OracleRecoveryValidationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRecoveryValidationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRecoveryValidationInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateOracleTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleTargetParams != nil { - - if swag.IsZero(m.OracleTargetParams) { // not required - return nil - } - - if err := m.OracleTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTargetParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateOracleUpdateRestoreOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleUpdateRestoreOptions != nil { - - if swag.IsZero(m.OracleUpdateRestoreOptions) { // not required - return nil - } - - if err := m.OracleUpdateRestoreOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleUpdateRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleUpdateRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateRestoreSpfileOrPfileInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSpfileOrPfileInfo != nil { - - if swag.IsZero(m.RestoreSpfileOrPfileInfo) { // not required - return nil - } - - if err := m.RestoreSpfileOrPfileInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSpfileOrPfileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSpfileOrPfileInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateSameConfigIrRecoveryOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SameConfigIrRecoveryOptions != nil { - - if swag.IsZero(m.SameConfigIrRecoveryOptions) { // not required - return nil - } - - if err := m.SameConfigIrRecoveryOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sameConfigIrRecoveryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sameConfigIrRecoveryOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreOracleAppObjectParams) contextValidateShellEnvironmentVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ShellEnvironmentVec); i++ { - - if m.ShellEnvironmentVec[i] != nil { - - if swag.IsZero(m.ShellEnvironmentVec[i]) { // not required - return nil - } - - if err := m.ShellEnvironmentVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shellEnvironmentVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shellEnvironmentVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOracleAppObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOracleAppObjectParams) UnmarshalBinary(b []byte) error { - var res RestoreOracleAppObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_oracle_app_object_params_alternate_location_params.go b/v1/models/restore_oracle_app_object_params_alternate_location_params.go deleted file mode 100644 index 1ae15e6d..00000000 --- a/v1/models/restore_oracle_app_object_params_alternate_location_params.go +++ /dev/null @@ -1,136 +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" -) - -// RestoreOracleAppObjectParamsAlternateLocationParams For restoring to alternate location this message can not be empty and all -// the fields inside the message also can not be empty. -// -// swagger:model RestoreOracleAppObjectParams_AlternateLocationParams -type RestoreOracleAppObjectParamsAlternateLocationParams struct { - - // Base directory of Oracle at destination. - // Example : /u01/app/oracle - BaseDir *string `json:"baseDir,omitempty"` - - // Location to put the database files(datafiles, logfiles etc.). - DatabaseFileDestination *string `json:"databaseFileDestination,omitempty"` - - // Home directory of Oracle at destination. - // Example : /u01/app/oracle/product/11.2.0.3/db_1 - HomeDir *string `json:"homeDir,omitempty"` - - // The name of the Oracle database that we restore to. - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - - // Deprecated field - // SID of new Oracle database. - NewSidDeprecated *string `json:"newSidDeprecated,omitempty"` - - // SET NEWNAME clause user can specified. This allows user to have full - // control on how their database files can be renamed during the alternate - // restore workflow. - NewnameClause *string `json:"newnameClause,omitempty"` - - // NOFILENAMECHECK option for RMAN Duplicate Database command - Nofilenamecheck *bool `json:"nofilenamecheck,omitempty"` - - // Alternate DB config override. - OracleDbConfig *OracleDBConfig `json:"oracleDbConfig,omitempty"` -} - -// Validate validates this restore oracle app object params alternate location params -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOracleDbConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) validateOracleDbConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OracleDbConfig) { // not required - return nil - } - - if m.OracleDbConfig != nil { - if err := m.OracleDbConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleDbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleDbConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore oracle app object params alternate location params based on the context it is used -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleDbConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) contextValidateOracleDbConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleDbConfig != nil { - - if swag.IsZero(m.OracleDbConfig) { // not required - return nil - } - - if err := m.OracleDbConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleDbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleDbConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOracleAppObjectParamsAlternateLocationParams) UnmarshalBinary(b []byte) error { - var res RestoreOracleAppObjectParamsAlternateLocationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_oracle_app_object_params_key_value_pair.go b/v1/models/restore_oracle_app_object_params_key_value_pair.go deleted file mode 100644 index 94117f14..00000000 --- a/v1/models/restore_oracle_app_object_params_key_value_pair.go +++ /dev/null @@ -1,55 +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" -) - -// RestoreOracleAppObjectParamsKeyValuePair A table of key-value pair representing Shell variables and their values. -// -// This defines the restore Shell environment. -// -// swagger:model RestoreOracleAppObjectParams_KeyValuePair -type RestoreOracleAppObjectParamsKeyValuePair struct { - - // Name of the key. - XKey *string `json:"xKey,omitempty"` - - // Value of the key. - XValue *string `json:"xValue,omitempty"` -} - -// Validate validates this restore oracle app object params key value pair -func (m *RestoreOracleAppObjectParamsKeyValuePair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore oracle app object params key value pair based on context it is used -func (m *RestoreOracleAppObjectParamsKeyValuePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOracleAppObjectParamsKeyValuePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOracleAppObjectParamsKeyValuePair) UnmarshalBinary(b []byte) error { - var res RestoreOracleAppObjectParamsKeyValuePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_outlook_params.go b/v1/models/restore_outlook_params.go deleted file mode 100644 index dd87d25a..00000000 --- a/v1/models/restore_outlook_params.go +++ /dev/null @@ -1,261 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOutlookParams This message defines the Outlook specific restore params. -// -// swagger:model RestoreOutlookParams -type RestoreOutlookParams struct { - - // Human readable prefix that is prepended to the archive recoverable items - // folder name. - ArchiveRecoverableItemsPrefix *string `json:"archiveRecoverableItemsPrefix,omitempty"` - - // In a RestoreJob , user will provide the list of mailboxes - // to be restored. Provision is there for restoring full AND - // partial mailbox recovery. - MailboxVec []*RestoreOutlookParamsMailbox `json:"mailboxVec"` - - // These are the parameters that user can provide for converting/recovering - // selected EWS items to PST format. - PstParams *EwsToPstConversionParams `json:"pstParams,omitempty"` - - // Human readable prefix that is prepended to the recoverable items - // folder name. - RecoverableItemsPrefix *string `json:"recoverableItemsPrefix,omitempty"` - - // Indicates whether PST conversion should skip mailbox entity permit. - SkipMbxPermitForPst *bool `json:"skipMbxPermitForPst,omitempty"` - - // Whether to skip recovery of the archive mailbox (or its items). - SkipRecoverArchiveMailbox *bool `json:"skipRecoverArchiveMailbox,omitempty"` - - // Whether to skip recovery of archive recoverable items folders. - SkipRecoverArchiveRecoverableItems *bool `json:"skipRecoverArchiveRecoverableItems,omitempty"` - - // Whether to skip recovery of recoverable items folders. - SkipRecoverRecoverableItems *bool `json:"skipRecoverRecoverableItems,omitempty"` - - // User will type the target folder path. - // This will always be specified (whether target_mailbox is original mailbox - // or alternate). If multiple folders are selected, they will all be - // restored to this folder. The appropriate hierarchy along with the folder - // names will be preserved. - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // This is the destination mailbox. - // All mailboxes listed in the mailbox_vec will be restored to this mailbox - // with appropriate names. - // Let's say mailbox_vec is A and B; target_mailbox is C. - // The final folder-hierarchy after restore job is finished will look like - // this : - // C : {target_folder_path}/| - // |A/{whatever is there in mailbox A} - // |B/{whatever is inside B mailbox B} - TargetMailbox *EntityProto `json:"targetMailbox,omitempty"` -} - -// Validate validates this restore outlook params -func (m *RestoreOutlookParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMailboxVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePstParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMailbox(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOutlookParams) validateMailboxVec(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxVec) { // not required - return nil - } - - for i := 0; i < len(m.MailboxVec); i++ { - if swag.IsZero(m.MailboxVec[i]) { // not required - continue - } - - if m.MailboxVec[i] != nil { - if err := m.MailboxVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOutlookParams) validatePstParams(formats strfmt.Registry) error { - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if m.PstParams != nil { - if err := m.PstParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOutlookParams) validateTargetMailbox(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if m.TargetMailbox != nil { - if err := m.TargetMailbox.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore outlook params based on the context it is used -func (m *RestoreOutlookParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMailboxVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePstParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMailbox(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOutlookParams) contextValidateMailboxVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MailboxVec); i++ { - - if m.MailboxVec[i] != nil { - - if swag.IsZero(m.MailboxVec[i]) { // not required - return nil - } - - if err := m.MailboxVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOutlookParams) contextValidatePstParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PstParams != nil { - - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if err := m.PstParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *RestoreOutlookParams) contextValidateTargetMailbox(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMailbox != nil { - - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if err := m.TargetMailbox.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOutlookParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOutlookParams) UnmarshalBinary(b []byte) error { - var res RestoreOutlookParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_outlook_params_folder.go b/v1/models/restore_outlook_params_folder.go deleted file mode 100644 index 0cb1a41a..00000000 --- a/v1/models/restore_outlook_params_folder.go +++ /dev/null @@ -1,63 +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" -) - -// RestoreOutlookParamsFolder Defining Folder proto-message. -// -// This will be set in case of partial mailbox recovery. -// -// swagger:model RestoreOutlookParams_Folder -type RestoreOutlookParamsFolder struct { - - // The Unique ID of the folder. - FolderID *string `json:"folderId,omitempty"` - - // The Unique key of the folder. - FolderKey *int64 `json:"folderKey,omitempty"` - - // Specify if the entire folder is to be restored. - IsEntireFolderRequired *bool `json:"isEntireFolderRequired,omitempty"` - - // If is_entire_folder_required is set to false, - // user will then specify which particular items - // are to be restored. - ItemIDVec []string `json:"itemIdVec"` -} - -// Validate validates this restore outlook params folder -func (m *RestoreOutlookParamsFolder) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore outlook params folder based on context it is used -func (m *RestoreOutlookParamsFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOutlookParamsFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOutlookParamsFolder) UnmarshalBinary(b []byte) error { - var res RestoreOutlookParamsFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_outlook_params_mailbox.go b/v1/models/restore_outlook_params_mailbox.go deleted file mode 100644 index ac49b665..00000000 --- a/v1/models/restore_outlook_params_mailbox.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreOutlookParamsMailbox restore outlook params mailbox -// -// swagger:model RestoreOutlookParams_Mailbox -type RestoreOutlookParamsMailbox struct { - - // If is_entire_mailbox_required is set to false, - // user will then specify which particular folders are to be restored. - FolderVec []*RestoreOutlookParamsFolder `json:"folderVec"` - - // Specify if the entire mailbox is to be restored. - IsEntireMailboxRequired *bool `json:"isEntireMailboxRequired,omitempty"` - - // This will store the details of the mailbox - // to be restored. - Object *RestoreObject `json:"object,omitempty"` -} - -// Validate validates this restore outlook params mailbox -func (m *RestoreOutlookParamsMailbox) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFolderVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOutlookParamsMailbox) validateFolderVec(formats strfmt.Registry) error { - if swag.IsZero(m.FolderVec) { // not required - return nil - } - - for i := 0; i < len(m.FolderVec); i++ { - if swag.IsZero(m.FolderVec[i]) { // not required - continue - } - - if m.FolderVec[i] != nil { - if err := m.FolderVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOutlookParamsMailbox) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore outlook params mailbox based on the context it is used -func (m *RestoreOutlookParamsMailbox) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFolderVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreOutlookParamsMailbox) contextValidateFolderVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FolderVec); i++ { - - if m.FolderVec[i] != nil { - - if swag.IsZero(m.FolderVec[i]) { // not required - return nil - } - - if err := m.FolderVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("folderVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreOutlookParamsMailbox) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreOutlookParamsMailbox) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreOutlookParamsMailbox) UnmarshalBinary(b []byte) error { - var res RestoreOutlookParamsMailbox - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_points_for_time_range.go b/v1/models/restore_points_for_time_range.go deleted file mode 100644 index 207eccce..00000000 --- a/v1/models/restore_points_for_time_range.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestorePointsForTimeRange Restore Points for Time Range. -// -// Specifies the info returned by Magneto RestorePointsForTimeRange API. -// -// swagger:model RestorePointsForTimeRange -type RestorePointsForTimeRange struct { - - // Specifies the info related to the recovery object. - FullSnapshotInfo []*FullSnapshotInfo `json:"fullSnapshotInfo"` - - // Specifies the time ranges of the restore object between full snapshots. - TimeRanges []*TimeRangeSettings `json:"timeRanges"` -} - -// Validate validates this restore points for time range -func (m *RestorePointsForTimeRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestorePointsForTimeRange) validateFullSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FullSnapshotInfo) { // not required - return nil - } - - for i := 0; i < len(m.FullSnapshotInfo); i++ { - if swag.IsZero(m.FullSnapshotInfo[i]) { // not required - continue - } - - if m.FullSnapshotInfo[i] != nil { - if err := m.FullSnapshotInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSnapshotInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSnapshotInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestorePointsForTimeRange) validateTimeRanges(formats strfmt.Registry) error { - if swag.IsZero(m.TimeRanges) { // not required - return nil - } - - for i := 0; i < len(m.TimeRanges); i++ { - if swag.IsZero(m.TimeRanges[i]) { // not required - continue - } - - if m.TimeRanges[i] != nil { - if err := m.TimeRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore points for time range based on the context it is used -func (m *RestorePointsForTimeRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFullSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestorePointsForTimeRange) contextValidateFullSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FullSnapshotInfo); i++ { - - if m.FullSnapshotInfo[i] != nil { - - if swag.IsZero(m.FullSnapshotInfo[i]) { // not required - return nil - } - - if err := m.FullSnapshotInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSnapshotInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSnapshotInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestorePointsForTimeRange) contextValidateTimeRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeRanges); i++ { - - if m.TimeRanges[i] != nil { - - if swag.IsZero(m.TimeRanges[i]) { // not required - return nil - } - - if err := m.TimeRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestorePointsForTimeRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestorePointsForTimeRange) UnmarshalBinary(b []byte) error { - var res RestorePointsForTimeRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_points_for_time_range_param.go b/v1/models/restore_points_for_time_range_param.go deleted file mode 100644 index d755cb64..00000000 --- a/v1/models/restore_points_for_time_range_param.go +++ /dev/null @@ -1,374 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RestorePointsForTimeRangeParam Restore Points for Time Range Parameters. -// -// Specifies the request parameters to restore points for time range API. -// -// swagger:model RestorePointsForTimeRangeParam -type RestorePointsForTimeRangeParam struct { - - // Specifies the end time specified as a Unix epoch Timestamp - // (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the protection source environment type. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the jobs for which to get the full snapshot information. - // Required: true - JobUids []*UniversalID `json:"jobUids"` - - // Specifies the id of the Protection Source which is to be restored. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies the start time specified as a Unix epoch Timestamp - // (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this restore points for time range param -func (m *RestorePointsForTimeRangeParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUids(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var restorePointsForTimeRangeParamTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restorePointsForTimeRangeParamTypeEnvironmentPropEnum = append(restorePointsForTimeRangeParamTypeEnvironmentPropEnum, v) - } -} - -const ( - - // RestorePointsForTimeRangeParamEnvironmentKVMware captures enum value "kVMware" - RestorePointsForTimeRangeParamEnvironmentKVMware string = "kVMware" - - // RestorePointsForTimeRangeParamEnvironmentKHyperV captures enum value "kHyperV" - RestorePointsForTimeRangeParamEnvironmentKHyperV string = "kHyperV" - - // RestorePointsForTimeRangeParamEnvironmentKSQL captures enum value "kSQL" - RestorePointsForTimeRangeParamEnvironmentKSQL string = "kSQL" - - // RestorePointsForTimeRangeParamEnvironmentKView captures enum value "kView" - RestorePointsForTimeRangeParamEnvironmentKView string = "kView" - - // RestorePointsForTimeRangeParamEnvironmentKPuppeteer captures enum value "kPuppeteer" - RestorePointsForTimeRangeParamEnvironmentKPuppeteer string = "kPuppeteer" - - // RestorePointsForTimeRangeParamEnvironmentKPhysical captures enum value "kPhysical" - RestorePointsForTimeRangeParamEnvironmentKPhysical string = "kPhysical" - - // RestorePointsForTimeRangeParamEnvironmentKPure captures enum value "kPure" - RestorePointsForTimeRangeParamEnvironmentKPure string = "kPure" - - // RestorePointsForTimeRangeParamEnvironmentKNimble captures enum value "kNimble" - RestorePointsForTimeRangeParamEnvironmentKNimble string = "kNimble" - - // RestorePointsForTimeRangeParamEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RestorePointsForTimeRangeParamEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // RestorePointsForTimeRangeParamEnvironmentKAzure captures enum value "kAzure" - RestorePointsForTimeRangeParamEnvironmentKAzure string = "kAzure" - - // RestorePointsForTimeRangeParamEnvironmentKNetapp captures enum value "kNetapp" - RestorePointsForTimeRangeParamEnvironmentKNetapp string = "kNetapp" - - // RestorePointsForTimeRangeParamEnvironmentKAgent captures enum value "kAgent" - RestorePointsForTimeRangeParamEnvironmentKAgent string = "kAgent" - - // RestorePointsForTimeRangeParamEnvironmentKGenericNas captures enum value "kGenericNas" - RestorePointsForTimeRangeParamEnvironmentKGenericNas string = "kGenericNas" - - // RestorePointsForTimeRangeParamEnvironmentKAcropolis captures enum value "kAcropolis" - RestorePointsForTimeRangeParamEnvironmentKAcropolis string = "kAcropolis" - - // RestorePointsForTimeRangeParamEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - RestorePointsForTimeRangeParamEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // RestorePointsForTimeRangeParamEnvironmentKIsilon captures enum value "kIsilon" - RestorePointsForTimeRangeParamEnvironmentKIsilon string = "kIsilon" - - // RestorePointsForTimeRangeParamEnvironmentKGPFS captures enum value "kGPFS" - RestorePointsForTimeRangeParamEnvironmentKGPFS string = "kGPFS" - - // RestorePointsForTimeRangeParamEnvironmentKKVM captures enum value "kKVM" - RestorePointsForTimeRangeParamEnvironmentKKVM string = "kKVM" - - // RestorePointsForTimeRangeParamEnvironmentKAWS captures enum value "kAWS" - RestorePointsForTimeRangeParamEnvironmentKAWS string = "kAWS" - - // RestorePointsForTimeRangeParamEnvironmentKExchange captures enum value "kExchange" - RestorePointsForTimeRangeParamEnvironmentKExchange string = "kExchange" - - // RestorePointsForTimeRangeParamEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - RestorePointsForTimeRangeParamEnvironmentKHyperVVSS string = "kHyperVVSS" - - // RestorePointsForTimeRangeParamEnvironmentKOracle captures enum value "kOracle" - RestorePointsForTimeRangeParamEnvironmentKOracle string = "kOracle" - - // RestorePointsForTimeRangeParamEnvironmentKGCP captures enum value "kGCP" - RestorePointsForTimeRangeParamEnvironmentKGCP string = "kGCP" - - // RestorePointsForTimeRangeParamEnvironmentKFlashBlade captures enum value "kFlashBlade" - RestorePointsForTimeRangeParamEnvironmentKFlashBlade string = "kFlashBlade" - - // RestorePointsForTimeRangeParamEnvironmentKAWSNative captures enum value "kAWSNative" - RestorePointsForTimeRangeParamEnvironmentKAWSNative string = "kAWSNative" - - // RestorePointsForTimeRangeParamEnvironmentKO365 captures enum value "kO365" - RestorePointsForTimeRangeParamEnvironmentKO365 string = "kO365" - - // RestorePointsForTimeRangeParamEnvironmentKO365Outlook captures enum value "kO365Outlook" - RestorePointsForTimeRangeParamEnvironmentKO365Outlook string = "kO365Outlook" - - // RestorePointsForTimeRangeParamEnvironmentKHyperFlex captures enum value "kHyperFlex" - RestorePointsForTimeRangeParamEnvironmentKHyperFlex string = "kHyperFlex" - - // RestorePointsForTimeRangeParamEnvironmentKGCPNative captures enum value "kGCPNative" - RestorePointsForTimeRangeParamEnvironmentKGCPNative string = "kGCPNative" - - // RestorePointsForTimeRangeParamEnvironmentKAzureNative captures enum value "kAzureNative" - RestorePointsForTimeRangeParamEnvironmentKAzureNative string = "kAzureNative" - - // RestorePointsForTimeRangeParamEnvironmentKKubernetes captures enum value "kKubernetes" - RestorePointsForTimeRangeParamEnvironmentKKubernetes string = "kKubernetes" - - // RestorePointsForTimeRangeParamEnvironmentKElastifile captures enum value "kElastifile" - RestorePointsForTimeRangeParamEnvironmentKElastifile string = "kElastifile" - - // RestorePointsForTimeRangeParamEnvironmentKAD captures enum value "kAD" - RestorePointsForTimeRangeParamEnvironmentKAD string = "kAD" - - // RestorePointsForTimeRangeParamEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - RestorePointsForTimeRangeParamEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // RestorePointsForTimeRangeParamEnvironmentKCassandra captures enum value "kCassandra" - RestorePointsForTimeRangeParamEnvironmentKCassandra string = "kCassandra" - - // RestorePointsForTimeRangeParamEnvironmentKMongoDB captures enum value "kMongoDB" - RestorePointsForTimeRangeParamEnvironmentKMongoDB string = "kMongoDB" - - // RestorePointsForTimeRangeParamEnvironmentKCouchbase captures enum value "kCouchbase" - RestorePointsForTimeRangeParamEnvironmentKCouchbase string = "kCouchbase" - - // RestorePointsForTimeRangeParamEnvironmentKHdfs captures enum value "kHdfs" - RestorePointsForTimeRangeParamEnvironmentKHdfs string = "kHdfs" - - // RestorePointsForTimeRangeParamEnvironmentKHive captures enum value "kHive" - RestorePointsForTimeRangeParamEnvironmentKHive string = "kHive" - - // RestorePointsForTimeRangeParamEnvironmentKHBase captures enum value "kHBase" - RestorePointsForTimeRangeParamEnvironmentKHBase string = "kHBase" - - // RestorePointsForTimeRangeParamEnvironmentKUDA captures enum value "kUDA" - RestorePointsForTimeRangeParamEnvironmentKUDA string = "kUDA" - - // RestorePointsForTimeRangeParamEnvironmentKO365Teams captures enum value "kO365Teams" - RestorePointsForTimeRangeParamEnvironmentKO365Teams string = "kO365Teams" - - // RestorePointsForTimeRangeParamEnvironmentKO365Group captures enum value "kO365Group" - RestorePointsForTimeRangeParamEnvironmentKO365Group string = "kO365Group" - - // RestorePointsForTimeRangeParamEnvironmentKO365Exchange captures enum value "kO365Exchange" - RestorePointsForTimeRangeParamEnvironmentKO365Exchange string = "kO365Exchange" - - // RestorePointsForTimeRangeParamEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - RestorePointsForTimeRangeParamEnvironmentKO365OneDrive string = "kO365OneDrive" - - // RestorePointsForTimeRangeParamEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - RestorePointsForTimeRangeParamEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // RestorePointsForTimeRangeParamEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - RestorePointsForTimeRangeParamEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *RestorePointsForTimeRangeParam) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restorePointsForTimeRangeParamTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestorePointsForTimeRangeParam) 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 -} - -func (m *RestorePointsForTimeRangeParam) validateJobUids(formats strfmt.Registry) error { - - if err := validate.Required("jobUids", "body", m.JobUids); err != nil { - return err - } - - for i := 0; i < len(m.JobUids); i++ { - if swag.IsZero(m.JobUids[i]) { // not required - continue - } - - if m.JobUids[i] != nil { - if err := m.JobUids[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore points for time range param based on the context it is used -func (m *RestorePointsForTimeRangeParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUids(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestorePointsForTimeRangeParam) contextValidateJobUids(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.JobUids); i++ { - - if m.JobUids[i] != nil { - - if swag.IsZero(m.JobUids[i]) { // not required - return nil - } - - if err := m.JobUids[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestorePointsForTimeRangeParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestorePointsForTimeRangeParam) UnmarshalBinary(b []byte) error { - var res RestorePointsForTimeRangeParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_r_d_s_postgres_params.go b/v1/models/restore_r_d_s_postgres_params.go deleted file mode 100644 index 79464e0a..00000000 --- a/v1/models/restore_r_d_s_postgres_params.go +++ /dev/null @@ -1,123 +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" -) - -// RestoreRDSPostgresParams Aws RDS environment specific restore Parameters. -// -// swagger:model RestoreRDSPostgresParams -type RestoreRDSPostgresParams struct { - - // Target Parameters to be filled if Restore target is AWS. - AwsTargetParams *AwsTargetParams `json:"awsTargetParams,omitempty"` - - // If false, recovery will fail if the database (with same name as this - // request) exists on the target server. - // If true, recovery will delete/overwrite the existing database as part of - // recovery. - OverwriteDatabase *bool `json:"overwriteDatabase,omitempty"` - - // Specifies the prefix to be prepended to the object name - // after the recovery. - PrefixToDatabaseName *string `json:"prefixToDatabaseName,omitempty"` - - // Specifies the suffix to be appended to the object name - // after the recovery. - SuffixToDatabaseName *string `json:"suffixToDatabaseName,omitempty"` -} - -// Validate validates this restore r d s postgres params -func (m *RestoreRDSPostgresParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreRDSPostgresParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore r d s postgres params based on the context it is used -func (m *RestoreRDSPostgresParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreRDSPostgresParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreRDSPostgresParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreRDSPostgresParams) UnmarshalBinary(b []byte) error { - var res RestoreRDSPostgresParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_s3_params.go b/v1/models/restore_s3_params.go deleted file mode 100644 index 5f2025a9..00000000 --- a/v1/models/restore_s3_params.go +++ /dev/null @@ -1,129 +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" -) - -// RestoreS3Params Message containing params for restoring S3 buckets/objects. -// -// swagger:model RestoreS3Params -type RestoreS3Params struct { - - // Flag specifying if it is an original location recovery or a new location. - IsOriginalLocation *bool `json:"isOriginalLocation,omitempty"` - - // Params specifying new location details. - NewLocationParams *RestoreS3ParamsNewLocationParams `json:"newLocationParams,omitempty"` - - // Object prefix for the recovered objects. E.g. "/", "/a/b". All operations - // at S3 Bucket (lookup, upload, etc.) will prepend this prefix to the Object - // name. - ObjectPrefix *string `json:"objectPrefix,omitempty"` - - // Flag specifying if we should overwrite if files are already present in the - // target location. - OverwriteObjectsInBucket *bool `json:"overwriteObjectsInBucket,omitempty"` - - // Specifies all the prefixes which we have to recover. If it is empty, - // then magneto will recover the whole bucket. - PrefixesToRecover []string `json:"prefixesToRecover"` - - // Flag specifying if we should preserve object attributes at the time of - // restore. - PreserveObjectAttributes *bool `json:"preserveObjectAttributes,omitempty"` -} - -// Validate validates this restore s3 params -func (m *RestoreS3Params) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewLocationParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreS3Params) validateNewLocationParams(formats strfmt.Registry) error { - if swag.IsZero(m.NewLocationParams) { // not required - return nil - } - - if m.NewLocationParams != nil { - if err := m.NewLocationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newLocationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newLocationParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore s3 params based on the context it is used -func (m *RestoreS3Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewLocationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreS3Params) contextValidateNewLocationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NewLocationParams != nil { - - if swag.IsZero(m.NewLocationParams) { // not required - return nil - } - - if err := m.NewLocationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newLocationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newLocationParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreS3Params) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreS3Params) UnmarshalBinary(b []byte) error { - var res RestoreS3Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_s3_params_new_location_params.go b/v1/models/restore_s3_params_new_location_params.go deleted file mode 100644 index ea45b499..00000000 --- a/v1/models/restore_s3_params_new_location_params.go +++ /dev/null @@ -1,161 +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" -) - -// RestoreS3ParamsNewLocationParams Message specifying new location details, should be set only when -// is_original_location is false. -// -// swagger:model RestoreS3Params_NewLocationParams -type RestoreS3ParamsNewLocationParams struct { - - // Target Region in which recovery should happen. - Region *EntityProto `json:"region,omitempty"` - - // Target S3 bucket where recovery should happen. - S3Bucket *EntityProto `json:"s3Bucket,omitempty"` -} - -// Validate validates this restore s3 params new location params -func (m *RestoreS3ParamsNewLocationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Bucket(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreS3ParamsNewLocationParams) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RestoreS3ParamsNewLocationParams) validateS3Bucket(formats strfmt.Registry) error { - if swag.IsZero(m.S3Bucket) { // not required - return nil - } - - if m.S3Bucket != nil { - if err := m.S3Bucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Bucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Bucket") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore s3 params new location params based on the context it is used -func (m *RestoreS3ParamsNewLocationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3Bucket(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreS3ParamsNewLocationParams) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RestoreS3ParamsNewLocationParams) contextValidateS3Bucket(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Bucket != nil { - - if swag.IsZero(m.S3Bucket) { // not required - return nil - } - - if err := m.S3Bucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Bucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Bucket") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreS3ParamsNewLocationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreS3ParamsNewLocationParams) UnmarshalBinary(b []byte) error { - var res RestoreS3ParamsNewLocationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_san_params.go b/v1/models/restore_san_params.go deleted file mode 100644 index 9fcf59d4..00000000 --- a/v1/models/restore_san_params.go +++ /dev/null @@ -1,116 +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" -) - -// RestoreSanParams Message containing params for restoring SAN volumes or groups. -// -// swagger:model RestoreSanParams -type RestoreSanParams struct { - - // Target storage pool to restore a volume or a group. Currently this field - // is used for Ibm FlashSystem SAN environment. - StoragePool *EntityProto `json:"storagePool,omitempty"` - - // transport mode - TransportMode *int32 `json:"transportMode,omitempty"` - - // If true, then use thin clone to restore storage array snapshots. - UseThinClone *bool `json:"useThinClone,omitempty"` -} - -// Validate validates this restore san params -func (m *RestoreSanParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStoragePool(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSanParams) validateStoragePool(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePool) { // not required - return nil - } - - if m.StoragePool != nil { - if err := m.StoragePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePool") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore san params based on the context it is used -func (m *RestoreSanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStoragePool(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSanParams) contextValidateStoragePool(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePool != nil { - - if swag.IsZero(m.StoragePool) { // not required - return nil - } - - if err := m.StoragePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePool") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSanParams) UnmarshalBinary(b []byte) error { - var res RestoreSanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_site_params.go b/v1/models/restore_site_params.go deleted file mode 100644 index 76703f33..00000000 --- a/v1/models/restore_site_params.go +++ /dev/null @@ -1,296 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreSiteParams This message defines the OneDrive specific restore params. -// -// swagger:model RestoreSiteParams -type RestoreSiteParams struct { - - // Entity name of target site in case of sharepoint restore. - DstSiteName *string `json:"dstSiteName,omitempty"` - - // Entity uuid of target site in case of sharepoint restore. - DstSiteUUID *string `json:"dstSiteUuid,omitempty"` - - // Entity web url of target site in case of sharepoint restore. - DstSiteWebURL *string `json:"dstSiteWebUrl,omitempty"` - - // The sharepoint domain name of the registered parent source from which the - // site is backed up. - ParentSourceSharepointDomainName *string `json:"parentSourceSharepointDomainName,omitempty"` - - // This prefix is pre-pended to the doc lib which is created for recovering - // PHL. This must be set if restore_phl_drive is set to true. - PhlRestorePrefix *string `json:"phlRestorePrefix,omitempty"` - - // When set to true, the preservation hold library (PHL) drive for the site - // should be restored. - RestorePhlDrive *bool `json:"restorePhlDrive,omitempty"` - - // Indicates that we have to restore the Sharepoint site template also. - // This includes: - // 1) Create site if it does not exist. - // 2) Provision template. - RestoreTemplate *bool `json:"restoreTemplate,omitempty"` - - // Whether or not all sites are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // Whether lists should be restore for this site restore. - ShouldRestoreLists *bool `json:"shouldRestoreLists,omitempty"` - - // The list of sites whose drives are being restored. - SiteOwnerVec []*RestoreSiteParamsSiteOwner `json:"siteOwnerVec"` - - // Site template backup status returned by the agent on successful site - // backup. - SiteResult *SiteBackupStatus `json:"siteResult,omitempty"` - - // Versions for site restores. There can be incompatible changes across - // process restarts or across restores. To avoid issues, maintain a version - // for restore. - SiteVersion *int32 `json:"siteVersion,omitempty"` - - // SnapFS relative path where the site template backup result proto is - // stored. - SnapFsRelativeSiteBackupResultPath *string `json:"snapFsRelativeSiteBackupResultPath,omitempty"` - - // SnapFS relative path where the template data is stored. - SnapFsRelativeTemplatePath *string `json:"snapFsRelativeTemplatePath,omitempty"` - - // Entity name of source site in case of sharepoint restore. - SourceSiteName *string `json:"sourceSiteName,omitempty"` - - // Entity uuid of source site in case of sharepoint restore. - SourceSiteUUID *string `json:"sourceSiteUuid,omitempty"` - - // Entity web url of source site in case of sharepoint restore. - SourceWebURL *string `json:"sourceWebUrl,omitempty"` - - // Incase of alternate restore of granular items within document - // repositiories of sites to another site, a doc lib name has to be specified - // by the caller. - // NOTE: It can be safely assumed that this field will only be present in - // case of granular items restore only. - TargetDocLibName *string `json:"targetDocLibName,omitempty"` - - // If alternate site is provided, customer may want to provide a custom - // prefix to document libraries that we create. In any case we would also - // have to distinguish the newly created document library as the alternate - // site provided by the customer may as well turn out to be the original - // backup site. - TargetDocLibPrefix *string `json:"targetDocLibPrefix,omitempty"` - - // Target folder path prefix for granular restore. This is set in case of - // teams or groups restore. - TargetFolderPathPrefix *string `json:"targetFolderPathPrefix,omitempty"` - - // This is the site in whose drive the items will be restored. - TargetSite *EntityProto `json:"targetSite,omitempty"` -} - -// Validate validates this restore site params -func (m *RestoreSiteParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSiteOwnerVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteResult(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetSite(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParams) validateSiteOwnerVec(formats strfmt.Registry) error { - if swag.IsZero(m.SiteOwnerVec) { // not required - return nil - } - - for i := 0; i < len(m.SiteOwnerVec); i++ { - if swag.IsZero(m.SiteOwnerVec[i]) { // not required - continue - } - - if m.SiteOwnerVec[i] != nil { - if err := m.SiteOwnerVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreSiteParams) validateSiteResult(formats strfmt.Registry) error { - if swag.IsZero(m.SiteResult) { // not required - return nil - } - - if m.SiteResult != nil { - if err := m.SiteResult.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteResult") - } - return err - } - } - - return nil -} - -func (m *RestoreSiteParams) validateTargetSite(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if m.TargetSite != nil { - if err := m.TargetSite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore site params based on the context it is used -func (m *RestoreSiteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSiteOwnerVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteResult(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetSite(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParams) contextValidateSiteOwnerVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SiteOwnerVec); i++ { - - if m.SiteOwnerVec[i] != nil { - - if swag.IsZero(m.SiteOwnerVec[i]) { // not required - return nil - } - - if err := m.SiteOwnerVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteOwnerVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteOwnerVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreSiteParams) contextValidateSiteResult(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteResult != nil { - - if swag.IsZero(m.SiteResult) { // not required - return nil - } - - if err := m.SiteResult.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteResult") - } - return err - } - } - - return nil -} - -func (m *RestoreSiteParams) contextValidateTargetSite(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetSite != nil { - - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if err := m.TargetSite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSiteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSiteParams) UnmarshalBinary(b []byte) error { - var res RestoreSiteParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_site_params_drive_item.go b/v1/models/restore_site_params_drive_item.go deleted file mode 100644 index f66957ba..00000000 --- a/v1/models/restore_site_params_drive_item.go +++ /dev/null @@ -1,58 +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" -) - -// RestoreSiteParamsDriveItem Defining DriveItem proto-message. -// -// This will be set in case of partial drive recovery. -// -// swagger:model RestoreSiteParams_DriveItem -type RestoreSiteParamsDriveItem struct { - - // The path of the drive item relative to root. - DriveItemPath *string `json:"driveItemPath,omitempty"` - - // The unique identifier of the item within the Drive. - ID *string `json:"id,omitempty"` - - // Specify if the item is a file or not. - IsFileItem *bool `json:"isFileItem,omitempty"` -} - -// Validate validates this restore site params drive item -func (m *RestoreSiteParamsDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore site params drive item based on context it is used -func (m *RestoreSiteParamsDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSiteParamsDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSiteParamsDriveItem) UnmarshalBinary(b []byte) error { - var res RestoreSiteParamsDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_site_params_site_owner.go b/v1/models/restore_site_params_site_owner.go deleted file mode 100644 index ed05e13f..00000000 --- a/v1/models/restore_site_params_site_owner.go +++ /dev/null @@ -1,223 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreSiteParamsSiteOwner restore site params site owner -// -// swagger:model RestoreSiteParams_SiteOwner -type RestoreSiteParamsSiteOwner struct { - - // The list of drives that are being restored. - DriveVec []*RestoreSiteParamsSiteOwnerDrive `json:"driveVec"` - - // This will store the details of the user whose drives is to be restored. - Object *RestoreObject `json:"object,omitempty"` - - // The entity representing the parent site if we are restoring a subsite. - ParentSite *EntityProto `json:"parentSite,omitempty"` -} - -// Validate validates this restore site params site owner -func (m *RestoreSiteParamsSiteOwner) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSite(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParamsSiteOwner) validateDriveVec(formats strfmt.Registry) error { - if swag.IsZero(m.DriveVec) { // not required - return nil - } - - for i := 0; i < len(m.DriveVec); i++ { - if swag.IsZero(m.DriveVec[i]) { // not required - continue - } - - if m.DriveVec[i] != nil { - if err := m.DriveVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreSiteParamsSiteOwner) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *RestoreSiteParamsSiteOwner) validateParentSite(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSite) { // not required - return nil - } - - if m.ParentSite != nil { - if err := m.ParentSite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSite") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore site params site owner based on the context it is used -func (m *RestoreSiteParamsSiteOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSite(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParamsSiteOwner) contextValidateDriveVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveVec); i++ { - - if m.DriveVec[i] != nil { - - if swag.IsZero(m.DriveVec[i]) { // not required - return nil - } - - if err := m.DriveVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreSiteParamsSiteOwner) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *RestoreSiteParamsSiteOwner) contextValidateParentSite(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSite != nil { - - if swag.IsZero(m.ParentSite) { // not required - return nil - } - - if err := m.ParentSite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSite") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSiteParamsSiteOwner) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSiteParamsSiteOwner) UnmarshalBinary(b []byte) error { - var res RestoreSiteParamsSiteOwner - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_site_params_site_owner_drive.go b/v1/models/restore_site_params_site_owner_drive.go deleted file mode 100644 index 614f67ec..00000000 --- a/v1/models/restore_site_params_site_owner_drive.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreSiteParamsSiteOwnerDrive restore site params site owner drive -// -// swagger:model RestoreSiteParams_SiteOwner_Drive -type RestoreSiteParamsSiteOwnerDrive struct { - - // Specify if the entire drive is to be restored. - // This field should be false if restore_item_vec size > 0. - IsEntireDriveRequired *bool `json:"isEntireDriveRequired,omitempty"` - - // Id of the drive whose items are being restored. - RestoreDriveID *string `json:"restoreDriveId,omitempty"` - - // Specifies the name of the drive whos items are being restored. - // NOTE: For restore either the drive Id or the name must be populated. - RestoreDriveName *string `json:"restoreDriveName,omitempty"` - - // List of drive paths that need to be restored. - RestorePathVec []*RestoreSiteParamsDriveItem `json:"restorePathVec"` -} - -// Validate validates this restore site params site owner drive -func (m *RestoreSiteParamsSiteOwnerDrive) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestorePathVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParamsSiteOwnerDrive) validateRestorePathVec(formats strfmt.Registry) error { - if swag.IsZero(m.RestorePathVec) { // not required - return nil - } - - for i := 0; i < len(m.RestorePathVec); i++ { - if swag.IsZero(m.RestorePathVec[i]) { // not required - continue - } - - if m.RestorePathVec[i] != nil { - if err := m.RestorePathVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePathVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePathVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore site params site owner drive based on the context it is used -func (m *RestoreSiteParamsSiteOwnerDrive) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestorePathVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSiteParamsSiteOwnerDrive) contextValidateRestorePathVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestorePathVec); i++ { - - if m.RestorePathVec[i] != nil { - - if swag.IsZero(m.RestorePathVec[i]) { // not required - return nil - } - - if err := m.RestorePathVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restorePathVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restorePathVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSiteParamsSiteOwnerDrive) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSiteParamsSiteOwnerDrive) UnmarshalBinary(b []byte) error { - var res RestoreSiteParamsSiteOwnerDrive - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_spfile_or_pfile_info.go b/v1/models/restore_spfile_or_pfile_info.go deleted file mode 100644 index 91277f13..00000000 --- a/v1/models/restore_spfile_or_pfile_info.go +++ /dev/null @@ -1,60 +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" -) - -// RestoreSpfileOrPfileInfo Proto to hold pfile/spfile restore related information -// -// swagger:model RestoreSpfileOrPfileInfo -type RestoreSpfileOrPfileInfo struct { - - // Location where spfile/pfile will be restored. - // If this is empty and should_restore_spfile_or_pfile is true - // we restore at default location : $ORACLE_HOME/dbs - FileLocation *string `json:"fileLocation,omitempty"` - - // If set to true we first try to restore spfile, if spfile is not available - // then we try to restore pfile. - // If set to false we dont restore spfile or pfile. - // Default value is false, as spfile and pfile contains a lot of system - // parameters also, so user might not wanna replace his spfile/pfile on - // overwrite restore. - ShouldRestoreSpfileOrPfile *bool `json:"shouldRestoreSpfileOrPfile,omitempty"` -} - -// Validate validates this restore spfile or pfile info -func (m *RestoreSpfileOrPfileInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore spfile or pfile info based on context it is used -func (m *RestoreSpfileOrPfileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSpfileOrPfileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSpfileOrPfileInfo) UnmarshalBinary(b []byte) error { - var res RestoreSpfileOrPfileInfo - 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 deleted file mode 100644 index f9fdc2eb..00000000 --- a/v1/models/restore_sql_app_object_params.go +++ /dev/null @@ -1,256 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreSQLAppObjectParams The application object restore params for SQL objects (SQL databases). -// -// swagger:model RestoreSqlAppObjectParams -type RestoreSQLAppObjectParams struct { - - // Set to true if tail logs are to be captured before the restore - // operation. This is only applicable if we are restoring the SQL database - // to its original source, and the database is not being renamed. - CaptureTailLogs *bool `json:"captureTailLogs,omitempty"` - - // Whether restore should continue after encountering a page checksum error. - ContinueAfterError *bool `json:"continueAfterError,omitempty"` - - // Which directory to put the database data files. Missing directory will be - // automatically created. Cannot be empty if not restoring to the original - // SQL instance. - DataFileDestination *string `json:"dataFileDestination,omitempty"` - - // Policy to overwrite an existing DB during a restore operation. - DbRestoreOverwritePolicy *int32 `json:"dbRestoreOverwritePolicy,omitempty"` - - // Whether restore checksums are enabled. - EnableChecksum *bool `json:"enableChecksum,omitempty"` - - // The name of the SQL instance that we restore database to. If target_host - // is not empty, this also cannot be empty. - InstanceName *string `json:"instanceName,omitempty"` - - // The following field is set if auto_sync for multi-stage SQL restore - // task is enabled. This field is valid only if is_multi_state_restore - // is set to true. - IsAutoSyncEnabled *bool `json:"isAutoSyncEnabled,omitempty"` - - // The following field is set if we are creating a multi-stage SQL restore - // task needed for features such as Hot-Standby. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // Set to true to keep cdc on restored database. - KeepCdc *bool `json:"keepCdc,omitempty"` - - // Which directory to put the database log files. Missing directory will be - // automatically created. Cannot be empty if not restoring to the original - // SQL instance. - LogFileDestination *string `json:"logFileDestination,omitempty"` - - // The following field is set if this is a sub task for a multi-stage SQL - // restore task. It captures the options specified for this sub-task. - // - // Note that this field is set internally by Magneto, and should not be set - // by Iris. - MultiStageRestoreOptions *SQLUpdateRestoreTaskOptions `json:"multiStageRestoreOptions,omitempty"` - - // The new name of the database, if it is going to be renamed. app_entity in - // RestoreAppObject has to be non-empty for the renaming, otherwise it does - // not make sense to rename all databases in the owner. - NewDatabaseName *string `json:"newDatabaseName,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 - // owner's restore object in AppOwnerRestoreInfo). - RestoreTimeSecs *int64 `json:"restoreTimeSecs,omitempty"` - - // Resume restore if sql instance/database exist in restore/recovering state. - // The database might be in restore/recovering state if previous restore - // failed or previous restore was attempted with norecovery option. - ResumeRestore *bool `json:"resumeRestore,omitempty"` - - // Which directory to put the secondary data files of the database. Secondary - // data files are optional and are user defined. The recommended file name - // extension for these is ".ndf". - // - // If this option is specified, the directory will be automatically created - // if its missing. - SecondaryDataFileDestination *string `json:"secondaryDataFileDestination,omitempty"` - - // Specify the secondary data files and corresponding direcories of the DB. - // Secondary data files are optional and are user defined. The recommended - // file extension for secondary files is ".ndf". - // - // If this option is specified and the destination folders do not exist they - // will be automatically created. - SecondaryDataFileDestinationVec []*FilesToDirectoryMapping `json:"secondaryDataFileDestinationVec"` - - // 'with_clause' contains 'with clause' to be used in native sql restore - // command. This is only applicable for db restore of native sql backup. Here - // user can specify multiple restore options. Example: "WITH BUFFERCOUNT = - // 575, MAXTRANSFERSIZE = 2097152". If this is not specified, we use the - // value specified in magneto_sql_native_restore_with_clause gflag. - WithClause *string `json:"withClause,omitempty"` - - // Set to true if we want to recover the database in "NO_RECOVERY" mode - // which does not bring it online after restore. - WithNoRecovery *bool `json:"withNoRecovery,omitempty"` -} - -// Validate validates this restore Sql app object params -func (m *RestoreSQLAppObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMultiStageRestoreOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryDataFileDestinationVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSQLAppObjectParams) validateMultiStageRestoreOptions(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if m.MultiStageRestoreOptions != nil { - if err := m.MultiStageRestoreOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreSQLAppObjectParams) validateSecondaryDataFileDestinationVec(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryDataFileDestinationVec) { // not required - return nil - } - - for i := 0; i < len(m.SecondaryDataFileDestinationVec); i++ { - if swag.IsZero(m.SecondaryDataFileDestinationVec[i]) { // not required - continue - } - - if m.SecondaryDataFileDestinationVec[i] != nil { - if err := m.SecondaryDataFileDestinationVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDataFileDestinationVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDataFileDestinationVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore Sql app object params based on the context it is used -func (m *RestoreSQLAppObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMultiStageRestoreOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecondaryDataFileDestinationVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreSQLAppObjectParams) contextValidateMultiStageRestoreOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.MultiStageRestoreOptions != nil { - - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if err := m.MultiStageRestoreOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RestoreSQLAppObjectParams) contextValidateSecondaryDataFileDestinationVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecondaryDataFileDestinationVec); i++ { - - if m.SecondaryDataFileDestinationVec[i] != nil { - - if swag.IsZero(m.SecondaryDataFileDestinationVec[i]) { // not required - return nil - } - - if err := m.SecondaryDataFileDestinationVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDataFileDestinationVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDataFileDestinationVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSQLAppObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSQLAppObjectParams) UnmarshalBinary(b []byte) error { - var res RestoreSQLAppObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_standby_task_state_proto.go b/v1/models/restore_standby_task_state_proto.go deleted file mode 100644 index 86382f65..00000000 --- a/v1/models/restore_standby_task_state_proto.go +++ /dev/null @@ -1,51 +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" -) - -// RestoreStandbyTaskStateProto Persistent state for a standby restore task. -// -// swagger:model RestoreStandbyTaskStateProto -type RestoreStandbyTaskStateProto struct { - - // This indicates if standby restore task to update standby resource state - // is completed or not. - StandbyRestoreComplete *bool `json:"standbyRestoreComplete,omitempty"` -} - -// Validate validates this restore standby task state proto -func (m *RestoreStandbyTaskStateProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore standby task state proto based on context it is used -func (m *RestoreStandbyTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreStandbyTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreStandbyTaskStateProto) UnmarshalBinary(b []byte) error { - var res RestoreStandbyTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_stats.go b/v1/models/restore_stats.go deleted file mode 100644 index bf05de17..00000000 --- a/v1/models/restore_stats.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreStats Restore Statistics. -// -// Specifies the restore statistics details. -// -// swagger:model RestoreStats -type RestoreStats struct { - - // Specifies the count of cloned objects in the given time frame. - NumClonedObjects *int64 `json:"numClonedObjects,omitempty"` - - // Specifies the count of recovered objects in the given time frame. - NumRecoveredObjects *int64 `json:"numRecoveredObjects,omitempty"` - - // Specifies the stats of recovery jobs aggregated by the environment type. - StatsByEnvironment []*RestoreEnvStats `json:"statsByEnvironment"` -} - -// Validate validates this restore stats -func (m *RestoreStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsByEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreStats) validateStatsByEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnvironment) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnvironment); i++ { - if swag.IsZero(m.StatsByEnvironment[i]) { // not required - continue - } - - if m.StatsByEnvironment[i] != nil { - if err := m.StatsByEnvironment[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnvironment" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnvironment" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore stats based on the context it is used -func (m *RestoreStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsByEnvironment(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreStats) contextValidateStatsByEnvironment(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnvironment); i++ { - - if m.StatsByEnvironment[i] != nil { - - if swag.IsZero(m.StatsByEnvironment[i]) { // not required - return nil - } - - if err := m.StatsByEnvironment[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnvironment" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnvironment" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreStats) UnmarshalBinary(b []byte) error { - var res RestoreStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_task.go b/v1/models/restore_task.go deleted file mode 100644 index f33fb297..00000000 --- a/v1/models/restore_task.go +++ /dev/null @@ -1,1364 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RestoreTask Restore Task. -// -// Specifies information about a Restore Task. -// -// swagger:model RestoreTask -type RestoreTask struct { - - // Specifies parameters for 'kAcropolis' restore task. - AcropolisParameters *AcropolisRestoreParameters `json:"acropolisParameters,omitempty"` - - // Specifies parameters for restore task of application server object. - ApplicationParameters *ApplicationRestoreParameters `json:"applicationParameters,omitempty"` - - // archive task Uid - ArchiveTaskUID *RestoreTaskArchiveTaskUID `json:"archiveTaskUid,omitempty"` - - // Specifies the uids 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. - // overrideDescription:true - ArchiveTaskUids []*UniversalID `json:"archiveTaskUids"` - - // Specifies the latest state of the clone. This is only set when this - // task is a clone task. - // Enum: ["kRunning","kTearingDown","kTornDown","kTearDownFailed"] - CloneStatus *string `json:"cloneStatus,omitempty"` - - // clone view parameters - CloneViewParameters *RestoreTaskCloneViewParameters `json:"cloneViewParameters,omitempty"` - - // Specifies if the Restore Task should continue when some operations on some - // objects fail. If true, the Cohesity Cluster ignores intermittent - // errors and restores as many objects as possible. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the datastore where the object's files are recovered to. - // This field is populated when objects are recovered to a different - // resource pool or to a different parent source. - // This field is not populated when objects are recovered to their - // original datastore locations in the original parent source. - DatastoreID *int64 `json:"datastoreId,omitempty"` - - // Specifies parameters to deploy VMs to cloud. - DeployVmsToCloud *DeployVmsToCloud `json:"deployVmsToCloud,omitempty"` - - // Specifies the end time of the Restore Task as a Unix epoch - // Timestamp (in microseconds). This field is only populated if the - // Restore Task completes. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // error - Error *RestoreTaskError `json:"error,omitempty"` - - // Specifies the full name of a View. - FullViewName *string `json:"fullViewName,omitempty"` - - // Specifies additional parameters for 'kHyperV' restore objects. - HypervParameters *HypervRestoreParameters `json:"hypervParameters,omitempty"` - - // Specifies the id of the Restore Task assigned by - // Cohesity Cluster. - ID *int64 `json:"id,omitempty"` - - // Specifies the states of mounting all the volumes onto a mount target - // for a 'kRecoverVMs' Restore Task. - MountVolumesState *MountVolumesState `json:"mountVolumesState,omitempty"` - - // Specifies the name of the Restore Task. This field must be set and - // must be a unique name. - // Required: true - Name *string `json:"name"` - - // Specify a new registered parent Protection Source. If specified - // the selected objects are cloned or recovered to this new Protection - // Source. If not specified, objects are cloned or recovered - // to the original Protection Source that was managing them. - NewParentID *int64 `json:"newParentId,omitempty"` - - // Array of Objects. - // - // Specifies a list of Protection Source objects or Protection Job objects - // (with specified Protection Source objects). - Objects []*RestoreObjectDetails `json:"objects"` - - // Specifies additional parameters for 'kRecoverO365Drive' restore task. - OneDriveParameters *OneDriveRestoreParameters `json:"oneDriveParameters,omitempty"` - - // Specifies parameters for 'kRecoverEmails' restore task. - OutlookParameters *OutlookRestoreParameters `json:"outlookParameters,omitempty"` - - // Specifies additional parameters for 'kRecoverO365PublicFolders' restore - // task. - PublicFoldersParameters *PublicFoldersRestoreParameters `json:"publicFoldersParameters,omitempty"` - - // Array of Object States. - // - // Specifies the states of all the objects for the 'kRecoverVMs' and - // 'kCloneVMs' Restore Tasks. - RestoreObjectState []*RestoreObjectState `json:"restoreObjectState"` - - // Specifies additional parameters for 'kRecoverSites' restore task. - SharePointParameters *SharePointRestoreParameters `json:"sharePointParameters,omitempty"` - - // Specifies the start time for the Restore Task as a Unix epoch - // Timestamp (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the overall status of the Restore Task. - // 'kReadyToSchedule' indicates the Restore Task is waiting to be scheduled. - // 'kProgressMonitorCreated' indicates the progress monitor for the - // Restore Task has been created. - // 'kRetrievedFromArchive' indicates that the objects to restore have been - // retrieved from the specified archive. A Task will only ever transition to - // this state if a retrieval is necessary. - // 'kAdmitted' indicates the task has been admitted. After a task has been - // admitted, its status does not move back to 'kReadyToSchedule' state - // even if it is rescheduled. - // 'kInProgress' indicates that the Restore Task is in progress. - // 'kFinishingProgressMonitor' indicates that the Restore Task is - // finishing its progress monitoring. - // 'kFinished' indicates that the Restore Task has finished. - // The status indicating success or failure is found in the error code that - // is stored with the Restore Task. - // 'kInternalViewCreated' indicates that internal view for the task - // has been created. - // 'kZipFileRequested' indicates that request has been sent to create zip - // files for the files to be downloaded. This state is only going to be - // present for kDownloadFiles Task. - // 'kCancelled' indicates that task or jb has been cancelled. - // Enum: ["kReadyToSchedule","kProgressMonitorCreated","kRetrievedFromArchive","kAdmitted","kInProgress","kFinishingProgressMonitor","kFinished","kInternalViewCreated","kZipFileRequested","kCancelled"] - Status *string `json:"status,omitempty"` - - // Is true if a new View was created by a 'kCloneVMs' Restore Task. - // This field is only set for a 'kCloneVMs' Restore Task. - TargetViewCreated *bool `json:"targetViewCreated,omitempty"` - - // Specifies the type of Restore Task. - // - // 'kRecoverVMs' specifies a Restore Task that recovers VMs. - // 'kCloneVMs' specifies a Restore Task that clones VMs. - // 'kCloneView' specifies a Restore Task that clones a View. - // 'kMountVolumes' specifies a Restore Task that mounts volumes. - // 'kRestoreFiles' specifies a Restore Task that recovers files and folders. - // 'kRecoverApp' specifies a Restore Task that recovers app. - // 'kCloneApp' specifies a Restore Task that clone app. - // 'kRecoverSanVolume' specifies a Restore Task that recovers SAN volumes. - // 'kConvertAndDeployVMs' specifies a Restore Task that converts and deploy VMs to a target environment. - // 'kMountFileVolume' specifies a Restore Task that mounts a file volume. - // 'kSystem' specifies a Restore Task that recovers a system. - // 'kRecoverVolumes' specifies a Restore Task that recovers volumes via the physical agent. - // 'kDeployVolumes' specifies a Restore Task that deploys volumes to a target environment. - // 'kDownloadFiles' specifies a Restore Task that downloads the requested files and folders in zip format. - // 'kRecoverEmails' specifies a Restore Task that recovers the mailbox/email items. - // 'kConvertToPst' specifies a PST conversion task for selected mailbox/email items. - // 'kRecoverDisks' specifies a Restore Task that recovers the virtual disks. - // 'kRecoverNamespaces' specifies a Restore Task that recovers Kubernetes namespaces. - // 'kCloneVMsToView' specifies a Restore Task that clones VMs into a View. - // 'kDownloadChats' specifies a chats/posts download task for selected user/channel(s). - // Enum: ["kRecoverVMs","kCloneVMs","kCloneView","kMountVolumes","kRestoreFiles","kRecoverApp","kCloneApp","kRecoverSanVolume","kConvertAndDeployVMs","kMountFileVolume","kSystem","kRecoverVolumes","kDeployVMs","kDownloadFiles","kRecoverEmails","kConvertToPst","kRecoverDisks","kRecoverNamespaces","kCloneVMsToView","kDownloadChats"] - Type *string `json:"type,omitempty"` - - // Specifies the Cohesity user who requested this Restore Task. - Username *string `json:"username,omitempty"` - - // Specifies the id of the Domain (View Box) where the View is stored. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the state of recovering all the specifies virtual disks of a vm. - VirtualDiskRestoreState *VirtualDiskRecoverTaskState `json:"virtualDiskRestoreState,omitempty"` - - // Specifies VLAN parameters for the restore operation. - VlanParameters *VlanParameters `json:"vlanParameters,omitempty"` - - // Specifies additional parameters for 'kVmware' restore objects. - VmwareParameters *VmwareRestoreParameters `json:"vmwareParameters,omitempty"` -} - -// Validate validates this restore task -func (m *RestoreTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAcropolisParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchiveTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchiveTaskUids(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneViewParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployVmsToCloud(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumesState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFoldersParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreObjectState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePointParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskRestoreState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTask) validateAcropolisParameters(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisParameters) { // not required - return nil - } - - if m.AcropolisParameters != nil { - if err := m.AcropolisParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateApplicationParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if m.ApplicationParameters != nil { - if err := m.ApplicationParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateArchiveTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUID) { // not required - 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 -} - -func (m *RestoreTask) validateArchiveTaskUids(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUids) { // not required - return nil - } - - for i := 0; i < len(m.ArchiveTaskUids); i++ { - if swag.IsZero(m.ArchiveTaskUids[i]) { // not required - continue - } - - if m.ArchiveTaskUids[i] != nil { - if err := m.ArchiveTaskUids[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var restoreTaskTypeCloneStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRunning","kTearingDown","kTornDown","kTearDownFailed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreTaskTypeCloneStatusPropEnum = append(restoreTaskTypeCloneStatusPropEnum, v) - } -} - -const ( - - // RestoreTaskCloneStatusKRunning captures enum value "kRunning" - RestoreTaskCloneStatusKRunning string = "kRunning" - - // RestoreTaskCloneStatusKTearingDown captures enum value "kTearingDown" - RestoreTaskCloneStatusKTearingDown string = "kTearingDown" - - // RestoreTaskCloneStatusKTornDown captures enum value "kTornDown" - RestoreTaskCloneStatusKTornDown string = "kTornDown" - - // RestoreTaskCloneStatusKTearDownFailed captures enum value "kTearDownFailed" - RestoreTaskCloneStatusKTearDownFailed string = "kTearDownFailed" -) - -// prop value enum -func (m *RestoreTask) validateCloneStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreTaskTypeCloneStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreTask) validateCloneStatus(formats strfmt.Registry) error { - if swag.IsZero(m.CloneStatus) { // not required - return nil - } - - // value enum - if err := m.validateCloneStatusEnum("cloneStatus", "body", *m.CloneStatus); err != nil { - return err - } - - return nil -} - -func (m *RestoreTask) validateCloneViewParameters(formats strfmt.Registry) error { - if swag.IsZero(m.CloneViewParameters) { // not required - 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 -} - -func (m *RestoreTask) validateDeployVmsToCloud(formats strfmt.Registry) error { - if swag.IsZero(m.DeployVmsToCloud) { // not required - return nil - } - - if m.DeployVmsToCloud != nil { - if err := m.DeployVmsToCloud.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloud") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloud") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RestoreTask) validateHypervParameters(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if m.HypervParameters != nil { - if err := m.HypervParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateMountVolumesState(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumesState) { // not required - return nil - } - - if m.MountVolumesState != nil { - if err := m.MountVolumesState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesState") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *RestoreTask) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreTask) validateOneDriveParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveParameters) { // not required - return nil - } - - if m.OneDriveParameters != nil { - if err := m.OneDriveParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateOutlookParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if m.OutlookParameters != nil { - if err := m.OutlookParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validatePublicFoldersParameters(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFoldersParameters) { // not required - return nil - } - - if m.PublicFoldersParameters != nil { - if err := m.PublicFoldersParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateRestoreObjectState(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreObjectState) { // not required - return nil - } - - for i := 0; i < len(m.RestoreObjectState); i++ { - if swag.IsZero(m.RestoreObjectState[i]) { // not required - continue - } - - if m.RestoreObjectState[i] != nil { - if err := m.RestoreObjectState[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjectState" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjectState" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreTask) validateSharePointParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SharePointParameters) { // not required - return nil - } - - if m.SharePointParameters != nil { - if err := m.SharePointParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParameters") - } - return err - } - } - - return nil -} - -var restoreTaskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kReadyToSchedule","kProgressMonitorCreated","kRetrievedFromArchive","kAdmitted","kInProgress","kFinishingProgressMonitor","kFinished","kInternalViewCreated","kZipFileRequested","kCancelled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreTaskTypeStatusPropEnum = append(restoreTaskTypeStatusPropEnum, v) - } -} - -const ( - - // RestoreTaskStatusKReadyToSchedule captures enum value "kReadyToSchedule" - RestoreTaskStatusKReadyToSchedule string = "kReadyToSchedule" - - // RestoreTaskStatusKProgressMonitorCreated captures enum value "kProgressMonitorCreated" - RestoreTaskStatusKProgressMonitorCreated string = "kProgressMonitorCreated" - - // RestoreTaskStatusKRetrievedFromArchive captures enum value "kRetrievedFromArchive" - RestoreTaskStatusKRetrievedFromArchive string = "kRetrievedFromArchive" - - // RestoreTaskStatusKAdmitted captures enum value "kAdmitted" - RestoreTaskStatusKAdmitted string = "kAdmitted" - - // RestoreTaskStatusKInProgress captures enum value "kInProgress" - RestoreTaskStatusKInProgress string = "kInProgress" - - // RestoreTaskStatusKFinishingProgressMonitor captures enum value "kFinishingProgressMonitor" - RestoreTaskStatusKFinishingProgressMonitor string = "kFinishingProgressMonitor" - - // RestoreTaskStatusKFinished captures enum value "kFinished" - RestoreTaskStatusKFinished string = "kFinished" - - // RestoreTaskStatusKInternalViewCreated captures enum value "kInternalViewCreated" - RestoreTaskStatusKInternalViewCreated string = "kInternalViewCreated" - - // RestoreTaskStatusKZipFileRequested captures enum value "kZipFileRequested" - RestoreTaskStatusKZipFileRequested string = "kZipFileRequested" - - // RestoreTaskStatusKCancelled captures enum value "kCancelled" - RestoreTaskStatusKCancelled string = "kCancelled" -) - -// prop value enum -func (m *RestoreTask) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreTaskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreTask) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var restoreTaskTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRecoverVMs","kCloneVMs","kCloneView","kMountVolumes","kRestoreFiles","kRecoverApp","kCloneApp","kRecoverSanVolume","kConvertAndDeployVMs","kMountFileVolume","kSystem","kRecoverVolumes","kDeployVMs","kDownloadFiles","kRecoverEmails","kConvertToPst","kRecoverDisks","kRecoverNamespaces","kCloneVMsToView","kDownloadChats"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restoreTaskTypeTypePropEnum = append(restoreTaskTypeTypePropEnum, v) - } -} - -const ( - - // RestoreTaskTypeKRecoverVMs captures enum value "kRecoverVMs" - RestoreTaskTypeKRecoverVMs string = "kRecoverVMs" - - // RestoreTaskTypeKCloneVMs captures enum value "kCloneVMs" - RestoreTaskTypeKCloneVMs string = "kCloneVMs" - - // RestoreTaskTypeKCloneView captures enum value "kCloneView" - RestoreTaskTypeKCloneView string = "kCloneView" - - // RestoreTaskTypeKMountVolumes captures enum value "kMountVolumes" - RestoreTaskTypeKMountVolumes string = "kMountVolumes" - - // RestoreTaskTypeKRestoreFiles captures enum value "kRestoreFiles" - RestoreTaskTypeKRestoreFiles string = "kRestoreFiles" - - // RestoreTaskTypeKRecoverApp captures enum value "kRecoverApp" - RestoreTaskTypeKRecoverApp string = "kRecoverApp" - - // RestoreTaskTypeKCloneApp captures enum value "kCloneApp" - RestoreTaskTypeKCloneApp string = "kCloneApp" - - // RestoreTaskTypeKRecoverSanVolume captures enum value "kRecoverSanVolume" - RestoreTaskTypeKRecoverSanVolume string = "kRecoverSanVolume" - - // RestoreTaskTypeKConvertAndDeployVMs captures enum value "kConvertAndDeployVMs" - RestoreTaskTypeKConvertAndDeployVMs string = "kConvertAndDeployVMs" - - // RestoreTaskTypeKMountFileVolume captures enum value "kMountFileVolume" - RestoreTaskTypeKMountFileVolume string = "kMountFileVolume" - - // RestoreTaskTypeKSystem captures enum value "kSystem" - RestoreTaskTypeKSystem string = "kSystem" - - // RestoreTaskTypeKRecoverVolumes captures enum value "kRecoverVolumes" - RestoreTaskTypeKRecoverVolumes string = "kRecoverVolumes" - - // RestoreTaskTypeKDeployVMs captures enum value "kDeployVMs" - RestoreTaskTypeKDeployVMs string = "kDeployVMs" - - // RestoreTaskTypeKDownloadFiles captures enum value "kDownloadFiles" - RestoreTaskTypeKDownloadFiles string = "kDownloadFiles" - - // RestoreTaskTypeKRecoverEmails captures enum value "kRecoverEmails" - RestoreTaskTypeKRecoverEmails string = "kRecoverEmails" - - // RestoreTaskTypeKConvertToPst captures enum value "kConvertToPst" - RestoreTaskTypeKConvertToPst string = "kConvertToPst" - - // RestoreTaskTypeKRecoverDisks captures enum value "kRecoverDisks" - RestoreTaskTypeKRecoverDisks string = "kRecoverDisks" - - // RestoreTaskTypeKRecoverNamespaces captures enum value "kRecoverNamespaces" - RestoreTaskTypeKRecoverNamespaces string = "kRecoverNamespaces" - - // RestoreTaskTypeKCloneVMsToView captures enum value "kCloneVMsToView" - RestoreTaskTypeKCloneVMsToView string = "kCloneVMsToView" - - // RestoreTaskTypeKDownloadChats captures enum value "kDownloadChats" - RestoreTaskTypeKDownloadChats string = "kDownloadChats" -) - -// prop value enum -func (m *RestoreTask) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restoreTaskTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RestoreTask) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *RestoreTask) validateVirtualDiskRestoreState(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskRestoreState) { // not required - return nil - } - - if m.VirtualDiskRestoreState != nil { - if err := m.VirtualDiskRestoreState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreState") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateVlanParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if m.VlanParameters != nil { - if err := m.VlanParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) validateVmwareParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if m.VmwareParameters != nil { - if err := m.VmwareParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore task based on the context it is used -func (m *RestoreTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAcropolisParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateApplicationParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchiveTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchiveTaskUids(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneViewParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployVmsToCloud(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumesState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFoldersParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreObjectState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePointParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskRestoreState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTask) contextValidateAcropolisParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParameters != nil { - - if swag.IsZero(m.AcropolisParameters) { // not required - return nil - } - - if err := m.AcropolisParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateApplicationParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ApplicationParameters != nil { - - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if err := m.ApplicationParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -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 -} - -func (m *RestoreTask) contextValidateArchiveTaskUids(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchiveTaskUids); i++ { - - if m.ArchiveTaskUids[i] != nil { - - if swag.IsZero(m.ArchiveTaskUids[i]) { // not required - return nil - } - - if err := m.ArchiveTaskUids[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUids" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUids" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *RestoreTask) contextValidateDeployVmsToCloud(ctx context.Context, formats strfmt.Registry) error { - - if m.DeployVmsToCloud != nil { - - if swag.IsZero(m.DeployVmsToCloud) { // not required - return nil - } - - if err := m.DeployVmsToCloud.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployVmsToCloud") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployVmsToCloud") - } - return err - } - } - - return nil -} - -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 -} - -func (m *RestoreTask) contextValidateHypervParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParameters != nil { - - if swag.IsZero(m.HypervParameters) { // not required - return nil - } - - if err := m.HypervParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateMountVolumesState(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumesState != nil { - - if swag.IsZero(m.MountVolumesState) { // not required - return nil - } - - if err := m.MountVolumesState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumesState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumesState") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreTask) contextValidateOneDriveParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveParameters != nil { - - if swag.IsZero(m.OneDriveParameters) { // not required - return nil - } - - if err := m.OneDriveParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateOutlookParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookParameters != nil { - - if swag.IsZero(m.OutlookParameters) { // not required - return nil - } - - if err := m.OutlookParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidatePublicFoldersParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFoldersParameters != nil { - - if swag.IsZero(m.PublicFoldersParameters) { // not required - return nil - } - - if err := m.PublicFoldersParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateRestoreObjectState(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreObjectState); i++ { - - if m.RestoreObjectState[i] != nil { - - if swag.IsZero(m.RestoreObjectState[i]) { // not required - return nil - } - - if err := m.RestoreObjectState[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjectState" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjectState" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreTask) contextValidateSharePointParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.SharePointParameters != nil { - - if swag.IsZero(m.SharePointParameters) { // not required - return nil - } - - if err := m.SharePointParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateVirtualDiskRestoreState(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualDiskRestoreState != nil { - - if swag.IsZero(m.VirtualDiskRestoreState) { // not required - return nil - } - - if err := m.VirtualDiskRestoreState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreState") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateVlanParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParameters != nil { - - if swag.IsZero(m.VlanParameters) { // not required - return nil - } - - if err := m.VlanParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParameters") - } - return err - } - } - - return nil -} - -func (m *RestoreTask) contextValidateVmwareParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParameters != nil { - - if swag.IsZero(m.VmwareParameters) { // not required - return nil - } - - if err := m.VmwareParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTask) UnmarshalBinary(b []byte) error { - var res RestoreTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_task_additional_params.go b/v1/models/restore_task_additional_params.go deleted file mode 100644 index 213bb490..00000000 --- a/v1/models/restore_task_additional_params.go +++ /dev/null @@ -1,212 +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" -) - -// RestoreTaskAdditionalParams Message to encapsulate the additional parameters associated with a restore -// task. -// -// swagger:model RestoreTaskAdditionalParams -type RestoreTaskAdditionalParams struct { - - // Post-script that must be executed after finishing the restore. - PostScript *RemoteScriptProto `json:"postScript,omitempty"` - - // Pre-script that must be executed before starting the restore. - PreScript *RemoteScriptProto `json:"preScript,omitempty"` - - // Uptiering specific runonce params. - UptierParams *UptieringRunOnceParams `json:"uptierParams,omitempty"` -} - -// Validate validates this restore task additional params -func (m *RestoreTaskAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptierParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskAdditionalParams) validatePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if m.PostScript != nil { - if err := m.PostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskAdditionalParams) validatePreScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if m.PreScript != nil { - if err := m.PreScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskAdditionalParams) validateUptierParams(formats strfmt.Registry) error { - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if m.UptierParams != nil { - if err := m.UptierParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore task additional params based on the context it is used -func (m *RestoreTaskAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUptierParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskAdditionalParams) contextValidatePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostScript != nil { - - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if err := m.PostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskAdditionalParams) contextValidatePreScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScript != nil { - - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if err := m.PreScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskAdditionalParams) contextValidateUptierParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UptierParams != nil { - - if swag.IsZero(m.UptierParams) { // not required - return nil - } - - if err := m.UptierParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptierParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskAdditionalParams) UnmarshalBinary(b []byte) error { - var res RestoreTaskAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/restore_task_state_base_proto.go b/v1/models/restore_task_state_base_proto.go deleted file mode 100644 index 28df6301..00000000 --- a/v1/models/restore_task_state_base_proto.go +++ /dev/null @@ -1,487 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreTaskStateBaseProto restore task state base proto -// -// swagger:model RestoreTaskStateBaseProto -type RestoreTaskStateBaseProto struct { - - // Whether this task has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // If the restore task has finished, this field contains the end time for the - // task. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The error encountered by task (if any). Only valid if the task has - // finished. - Error *ErrorProto `json:"error,omitempty"` - - // Whether the restore task is internal. This is currently used by standby - // restore tasks. - IsInternal *bool `json:"isInternal,omitempty"` - - // The name of the restore task. - Name *string `json:"name,omitempty"` - - // A way to connect to the parent source. - ParentSourceConnectionParams *ConnectorParams `json:"parentSourceConnectionParams,omitempty"` - - // If the restore task has encountered an error during the master side - // preprocessing, this field will be set. - PreprocessingError *ErrorProto `json:"preprocessingError,omitempty"` - - // Iris-facing task state. This field is stamped during the export. - PublicStatus *int32 `json:"publicStatus,omitempty"` - - // Status of the refresh task. - RefreshStatus *int32 `json:"refreshStatus,omitempty"` - - // This contains restore vlan params if it was specified as part of the - // restore task. - RestoreVlanParams *VlanParams `json:"restoreVlanParams,omitempty"` - - // Constituent id (and the gandalf session id) where this task has been - // scheduled. If -1, the task is not running at any slave. It's possible - // that the task was previously scheduled, but is now being re-scheduled. - ScheduledConstituentID *int64 `json:"scheduledConstituentId,omitempty"` - - // scheduled gandalf session Id - ScheduledGandalfSessionID *int64 `json:"scheduledGandalfSessionId,omitempty"` - - // The start time for this restore task. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Status of the restore task. - Status *int32 `json:"status,omitempty"` - - // A unique id for this task within the cluster. - TaskID *int64 `json:"taskId,omitempty"` - - // A global unique id for this task. Note that currently it is used to - // perform tenant migration. - TaskUID *UniversalIDProto `json:"taskUid,omitempty"` - - // Logical size of this restore task. This is the amount of data that needs - // to be transferred to restore the entity. - TotalLogicalSizeBytes *int64 `json:"totalLogicalSizeBytes,omitempty"` - - // Physical size of this restore task. This is the amount of data that was - // actually transferred to restore the entity. - TotalPhysicalSizeBytes *int64 `json:"totalPhysicalSizeBytes,omitempty"` - - // The type of restore being performed. - Type *int32 `json:"type,omitempty"` - - // The user who requested this restore task. - User *string `json:"user,omitempty"` - - // Specifies information about the user who made the request. - UserInfo *UserInformation `json:"userInfo,omitempty"` - - // Messages displayed to the user for this task (if any). - // Only valid if the status of the task is kFinished. This is used for - // informing the user with additional details when there is not an error. - UserMessages []string `json:"userMessages"` - - // The warnings encountered by this task (if any) during its execution. - Warnings []*ErrorProto `json:"warnings"` -} - -// Validate validates this restore task state base proto -func (m *RestoreTaskStateBaseProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSourceConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreprocessingError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskStateBaseProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RestoreTaskStateBaseProto) validateParentSourceConnectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if m.ParentSourceConnectionParams != nil { - if err := m.ParentSourceConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) validatePreprocessingError(formats strfmt.Registry) error { - if swag.IsZero(m.PreprocessingError) { // not required - return nil - } - - if m.PreprocessingError != nil { - if err := m.PreprocessingError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preprocessingError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preprocessingError") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) validateRestoreVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if m.RestoreVlanParams != nil { - if err := m.RestoreVlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -func (m *RestoreTaskStateBaseProto) validateUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if m.UserInfo != nil { - if err := m.UserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restore task state base proto based on the context it is used -func (m *RestoreTaskStateBaseProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreprocessingError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskStateBaseProto) 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 -} - -func (m *RestoreTaskStateBaseProto) contextValidateParentSourceConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSourceConnectionParams != nil { - - if swag.IsZero(m.ParentSourceConnectionParams) { // not required - return nil - } - - if err := m.ParentSourceConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSourceConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSourceConnectionParams") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) contextValidatePreprocessingError(ctx context.Context, formats strfmt.Registry) error { - - if m.PreprocessingError != nil { - - if swag.IsZero(m.PreprocessingError) { // not required - return nil - } - - if err := m.PreprocessingError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preprocessingError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preprocessingError") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) contextValidateRestoreVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVlanParams != nil { - - if swag.IsZero(m.RestoreVlanParams) { // not required - return nil - } - - if err := m.RestoreVlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVlanParams") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) 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 -} - -func (m *RestoreTaskStateBaseProto) contextValidateUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserInfo != nil { - - if swag.IsZero(m.UserInfo) { // not required - return nil - } - - if err := m.UserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userInfo") - } - return err - } - } - - return nil -} - -func (m *RestoreTaskStateBaseProto) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskStateBaseProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskStateBaseProto) UnmarshalBinary(b []byte) error { - var res RestoreTaskStateBaseProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_task_wrapper.go b/v1/models/restore_task_wrapper.go deleted file mode 100644 index 9e082b42..00000000 --- a/v1/models/restore_task_wrapper.go +++ /dev/null @@ -1,110 +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" -) - -// RestoreTaskWrapper RestoreTaskWrapper defines the struct for a restore operation. -// -// swagger:model RestoreTaskWrapper -type RestoreTaskWrapper struct { - - // RestoreTask is the struct for RestoreWrapperProto used by magneto. It - // wraps either a Restore/Clone task, or a Destroy clone task. - RestoreTask *RestoreWrapperProto `json:"restoreTask,omitempty"` -} - -// Validate validates this restore task wrapper -func (m *RestoreTaskWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreTask(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskWrapper) validateRestoreTask(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTask) { // not required - return nil - } - - if m.RestoreTask != nil { - if err := m.RestoreTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTask") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore task wrapper based on the context it is used -func (m *RestoreTaskWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreTask(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreTaskWrapper) contextValidateRestoreTask(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreTask != nil { - - if swag.IsZero(m.RestoreTask) { // not required - return nil - } - - if err := m.RestoreTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTask") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskWrapper) UnmarshalBinary(b []byte) error { - var res RestoreTaskWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_v_mware_vm_params.go b/v1/models/restore_v_mware_vm_params.go deleted file mode 100644 index a5bb1420..00000000 --- a/v1/models/restore_v_mware_vm_params.go +++ /dev/null @@ -1,333 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreVMwareVMParams This message defines the VMware specific VMs restore params. -// -// swagger:model RestoreVMwareVMParams -type RestoreVMwareVMParams struct { - - // Whether to fallback to use NBDSSL transport for recovery in case using - // SAN transport recovery fails. - AllowNbdsslTransportFallback *bool `json:"allowNbdsslTransportFallback,omitempty"` - - // This field is only applicable when overwrite_existing_vm is set to true. - // If this field is true, as part of overwrite existing vm, differential - // restore will be attempted. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies the name of the catalog for vapp template recovery. - // This is applicable for recovery to a VCD. - CatalogUUID *string `json:"catalogUuid,omitempty"` - - // Whether to perform copy recovery instead of instant recovery. - CopyRecovery *bool `json:"copyRecovery,omitempty"` - - // Datastore entities if the restore is to alternate location. - DatastoreEntityVec []*EntityProto `json:"datastoreEntityVec"` - - // This specifies vmware virtual disk provisioning policies - DiskProvisionType *int32 `json:"diskProvisionType,omitempty"` - - // This will be true if this is on prem deploy task. - // attempt_differential_restore should also be set to true in case of doing - // on prem deploy. - IsOnPremDeploy *bool `json:"isOnPremDeploy,omitempty"` - - // Specifies the name of the org VDC network to be used for the recovery. - // This is applicable for recovery to a VCD. - OrgVdcNetworkName *string `json:"orgVdcNetworkName,omitempty"` - - // Specifies the VCD UUID of the org VDC network to be used for the recovery. - // This is applicable for recovery to a VCD. - OrgVdcNetworkVcdUUID *string `json:"orgVdcNetworkVcdUuid,omitempty"` - - // This option is only potentially populated in the case that there are no - // rename parameters specified for a recovery. Note that this option is - // mutually exclusive with power_off_and_rename_existing_vm. - OverwriteExistingVM *bool `json:"overwriteExistingVm,omitempty"` - - // This option is only potentially populated in the case that there are no - // rename parameters specified for a recovery. Note that this option is - // mutually exclusive with overwrite_existing_vm. - PowerOffAndRenameExistingVM *bool `json:"powerOffAndRenameExistingVm,omitempty"` - - // Whether to preserve custom attributes for the clone op. - PreserveCustomAttributesDuringClone *bool `json:"preserveCustomAttributesDuringClone,omitempty"` - - // Whether to preserve tags for the clone op. - PreserveTagsDuringClone *bool `json:"preserveTagsDuringClone,omitempty"` - - // Resource pool entity if the restore is to alternate location. - ResourcePoolEntity *EntityProto `json:"resourcePoolEntity,omitempty"` - - // This is only populated for VCD restore to alternate location. It contains - // the name of the destination storage profile. - StorageProfileName *string `json:"storageProfileName,omitempty"` - - // This is only populated for VCD restore to alternate location. It contains - // the vcd uuid of the destination storage profile. - StorageProfileVcdUUID *string `json:"storageProfileVcdUuid,omitempty"` - - // Folder where the restore datastore should be created. This is applicable - // only when the VMs are being cloned. - TargetDatastoreFolder *EntityProto `json:"targetDatastoreFolder,omitempty"` - - // Folder where the VMs should be created. This is applicable only when the - // VMs are being restored to an alternate location or if clone is being - // performed. - TargetVMFolder *EntityProto `json:"targetVmFolder,omitempty"` -} - -// Validate validates this restore v mware VM params -func (m *RestoreVMwareVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetDatastoreFolder(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreVMwareVMParams) validateDatastoreEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - continue - } - - if m.DatastoreEntityVec[i] != nil { - if err := m.DatastoreEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreVMwareVMParams) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreVMwareVMParams) validateTargetDatastoreFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetDatastoreFolder) { // not required - return nil - } - - if m.TargetDatastoreFolder != nil { - if err := m.TargetDatastoreFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDatastoreFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDatastoreFolder") - } - return err - } - } - - return nil -} - -func (m *RestoreVMwareVMParams) validateTargetVMFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMFolder) { // not required - return nil - } - - if m.TargetVMFolder != nil { - if err := m.TargetVMFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore v mware VM params based on the context it is used -func (m *RestoreVMwareVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetDatastoreFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreVMwareVMParams) contextValidateDatastoreEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - - if m.DatastoreEntityVec[i] != nil { - - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - return nil - } - - if err := m.DatastoreEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreVMwareVMParams) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *RestoreVMwareVMParams) contextValidateTargetDatastoreFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetDatastoreFolder != nil { - - if swag.IsZero(m.TargetDatastoreFolder) { // not required - return nil - } - - if err := m.TargetDatastoreFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDatastoreFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDatastoreFolder") - } - return err - } - } - - return nil -} - -func (m *RestoreVMwareVMParams) contextValidateTargetVMFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMFolder != nil { - - if swag.IsZero(m.TargetVMFolder) { // not required - return nil - } - - if err := m.TargetVMFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreVMwareVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreVMwareVMParams) UnmarshalBinary(b []byte) error { - var res RestoreVMwareVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_vapp_info.go b/v1/models/restore_vapp_info.go deleted file mode 100644 index b8ac4c9e..00000000 --- a/v1/models/restore_vapp_info.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" -) - -// RestoreVappInfo Captures information about the Vapp that is being restored. -// -// swagger:model RestoreVappInfo -type RestoreVappInfo struct { - - // Id of the vApp. - VappID *string `json:"vappId,omitempty"` - - // Name of the vApp. - VappName *string `json:"vappName,omitempty"` -} - -// Validate validates this restore vapp info -func (m *RestoreVappInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore vapp info based on context it is used -func (m *RestoreVappInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreVappInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreVappInfo) UnmarshalBinary(b []byte) error { - var res RestoreVappInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_wrapper_proto.go b/v1/models/restore_wrapper_proto.go deleted file mode 100644 index 85871760..00000000 --- a/v1/models/restore_wrapper_proto.go +++ /dev/null @@ -1,365 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreWrapperProto A wrapper proto to put together all the restore-related protos. This will be -// used for WAL-logging, and to send restore-related information back to the -// user. -// -// If this message is a checkpoint record in WAL-logging or if this message is -// used to send restore task info back to the user, it will contain the info of -// the restore job/task and the list of all destroy tasks (only when the record -// is for a restore task of type clone) associated with it. If this message is -// delta record, it will contain the state mutation for one of individual -// restore job, restore task and individual destroy task. -// -// swagger:model RestoreWrapperProto -type RestoreWrapperProto struct { - - // For a restore task of type 'Clone', this field contains the info of the - // destroy task(s). - DestroyClonedTaskStateVec []*DestroyClonedTaskStateProto `json:"destroyClonedTaskStateVec"` - - // For an application restore task, this field contains the info of the - // application owner's restore task if any. For example, a SQL restore - // operation may also restore its owner VM, and this field will contain - // the VM's restore task. - // - // Note that this field is only populated for Iris in response to - // 'GetRestoreTasksArg' RPC. - OwnerRestoreWrapperProto *RestoreWrapperProto `json:"ownerRestoreWrapperProto,omitempty"` - - // Contains information of the refresh tasks for a clone - PerformRefreshTaskStateVec []*PerformRestoreTaskStateProto `json:"performRefreshTaskStateVec"` - - // Contains the information about a restore job. When the info of the - // restore job is send to the Iris, we will transform this proto to the - // above 'perform_restore_task_state' so that Iris has to deal with only one - // kind of restore proto. - PerformRestoreJobState *PerformRestoreJobStateProto `json:"performRestoreJobState,omitempty"` - - // Contains information about a restore task. - PerformRestoreTaskState *PerformRestoreTaskStateProto `json:"performRestoreTaskState,omitempty"` - - // If this restore has sub tasks, the following field will get populated - // with the wrapper proto of all of its sub-tasks. - // - // Note that this field is only populated for Iris in response to - // 'GetRestoreTasksArg' RPC. It is not persisted in Magneto's WAL. - // - // List of environments that use this field: - // kSQL : Used for multi-stage SQL restore that supports a hot-standy. - RestoreSubTaskWrapperProtoVec []interface{} `json:"restoreSubTaskWrapperProtoVec"` -} - -// Validate validates this restore wrapper proto -func (m *RestoreWrapperProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDestroyClonedTaskStateVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerRestoreWrapperProto(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePerformRefreshTaskStateVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePerformRestoreJobState(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePerformRestoreTaskState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreWrapperProto) validateDestroyClonedTaskStateVec(formats strfmt.Registry) error { - if swag.IsZero(m.DestroyClonedTaskStateVec) { // not required - return nil - } - - for i := 0; i < len(m.DestroyClonedTaskStateVec); i++ { - if swag.IsZero(m.DestroyClonedTaskStateVec[i]) { // not required - continue - } - - if m.DestroyClonedTaskStateVec[i] != nil { - if err := m.DestroyClonedTaskStateVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyClonedTaskStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyClonedTaskStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreWrapperProto) validateOwnerRestoreWrapperProto(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerRestoreWrapperProto) { // not required - return nil - } - - if m.OwnerRestoreWrapperProto != nil { - if err := m.OwnerRestoreWrapperProto.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreWrapperProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreWrapperProto") - } - return err - } - } - - return nil -} - -func (m *RestoreWrapperProto) validatePerformRefreshTaskStateVec(formats strfmt.Registry) error { - if swag.IsZero(m.PerformRefreshTaskStateVec) { // not required - return nil - } - - for i := 0; i < len(m.PerformRefreshTaskStateVec); i++ { - if swag.IsZero(m.PerformRefreshTaskStateVec[i]) { // not required - continue - } - - if m.PerformRefreshTaskStateVec[i] != nil { - if err := m.PerformRefreshTaskStateVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRefreshTaskStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRefreshTaskStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreWrapperProto) validatePerformRestoreJobState(formats strfmt.Registry) error { - if swag.IsZero(m.PerformRestoreJobState) { // not required - return nil - } - - if m.PerformRestoreJobState != nil { - if err := m.PerformRestoreJobState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRestoreJobState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRestoreJobState") - } - return err - } - } - - return nil -} - -func (m *RestoreWrapperProto) validatePerformRestoreTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.PerformRestoreTaskState) { // not required - return nil - } - - if m.PerformRestoreTaskState != nil { - if err := m.PerformRestoreTaskState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRestoreTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRestoreTaskState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restore wrapper proto based on the context it is used -func (m *RestoreWrapperProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestroyClonedTaskStateVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerRestoreWrapperProto(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePerformRefreshTaskStateVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePerformRestoreJobState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePerformRestoreTaskState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoreWrapperProto) contextValidateDestroyClonedTaskStateVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DestroyClonedTaskStateVec); i++ { - - if m.DestroyClonedTaskStateVec[i] != nil { - - if swag.IsZero(m.DestroyClonedTaskStateVec[i]) { // not required - return nil - } - - if err := m.DestroyClonedTaskStateVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destroyClonedTaskStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destroyClonedTaskStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreWrapperProto) contextValidateOwnerRestoreWrapperProto(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerRestoreWrapperProto != nil { - - if swag.IsZero(m.OwnerRestoreWrapperProto) { // not required - return nil - } - - if err := m.OwnerRestoreWrapperProto.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerRestoreWrapperProto") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerRestoreWrapperProto") - } - return err - } - } - - return nil -} - -func (m *RestoreWrapperProto) contextValidatePerformRefreshTaskStateVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PerformRefreshTaskStateVec); i++ { - - if m.PerformRefreshTaskStateVec[i] != nil { - - if swag.IsZero(m.PerformRefreshTaskStateVec[i]) { // not required - return nil - } - - if err := m.PerformRefreshTaskStateVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRefreshTaskStateVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRefreshTaskStateVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RestoreWrapperProto) contextValidatePerformRestoreJobState(ctx context.Context, formats strfmt.Registry) error { - - if m.PerformRestoreJobState != nil { - - if swag.IsZero(m.PerformRestoreJobState) { // not required - return nil - } - - if err := m.PerformRestoreJobState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRestoreJobState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRestoreJobState") - } - return err - } - } - - return nil -} - -func (m *RestoreWrapperProto) contextValidatePerformRestoreTaskState(ctx context.Context, formats strfmt.Registry) error { - - if m.PerformRestoreTaskState != nil { - - if swag.IsZero(m.PerformRestoreTaskState) { // not required - return nil - } - - if err := m.PerformRestoreTaskState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("performRestoreTaskState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("performRestoreTaskState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreWrapperProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreWrapperProto) UnmarshalBinary(b []byte) error { - var res RestoreWrapperProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restored_file_info.go b/v1/models/restored_file_info.go deleted file mode 100644 index 3ba55ede..00000000 --- a/v1/models/restored_file_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/strfmt" - "github.com/go-openapi/swag" -) - -// RestoredFileInfo This message has information on file/directory being restored. -// -// swagger:model RestoredFileInfo -type RestoredFileInfo struct { - - // Full path of the file being restored: the actual file path without the - // disk. E.g.: - // \Program Files\App\file.txt - AbsolutePath *string `json:"absolutePath,omitempty"` - - // Disk information of where the source file is currently located. - AttachedDiskID *int32 `json:"attachedDiskId,omitempty"` - - // Disk partition to which the file belongs to. - DiskPartitionID *int32 `json:"diskPartitionId,omitempty"` - - // File system UUID on which file resides. - FsUUID *string `json:"fsUuid,omitempty"` - - // Inode number of the file. - // This is needed for snapmirror restore workflow. - InodeNumber *int64 `json:"inodeNumber,omitempty"` - - // Whether the path points to a directory. - IsDirectory *bool `json:"isDirectory,omitempty"` - - // This will be set to true for recovery workflows for non-simple volumes - // on Windows Dynamic Disks. In that case, we will use VolumeInfo instead of - // some of the details captured here (e.g. virtual_disk_file) for determining - // disk and volume related details. - IsNonSimpleLdmVol *bool `json:"isNonSimpleLdmVol,omitempty"` - - // This must be set to a directory path if restore_to_original_paths is - // false and restore task has multiple files which are not desired to be - // restore to one common location. If this filed is populated, - // 'absolute_path' will be restored under this location. If this field is not - // populated all files in restore task will be restored to location specified - // in RestoreFilesPreferences. - RestoreBaseDirectory *string `json:"restoreBaseDirectory,omitempty"` - - // Mount point of the volume on which the file to be restored is located. - // E.g.: - // c:\temp\vhd_mount_1234 - RestoreMountPoint *string `json:"restoreMountPoint,omitempty"` - - // Size of the file in bytes. Required in FLR in GCP using Cloud Functions. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Virtual disk file to which this file belongs to. - VirtualDiskFile *string `json:"virtualDiskFile,omitempty"` - - // Id of the volume. - VolumeID *string `json:"volumeId,omitempty"` - - // Original volume name (or drive letter). This is used while performing the - // copy to the original paths. - // E.g.: - // c: - VolumePath *string `json:"volumePath,omitempty"` -} - -// Validate validates this restored file info -func (m *RestoredFileInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restored file info based on context it is used -func (m *RestoredFileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoredFileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoredFileInfo) UnmarshalBinary(b []byte) error { - var res RestoredFileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restored_file_info_list.go b/v1/models/restored_file_info_list.go deleted file mode 100644 index 886cff3c..00000000 --- a/v1/models/restored_file_info_list.go +++ /dev/null @@ -1,50 +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" -) - -// RestoredFileInfoList Specifies information on file/directory being restored. -// -// swagger:model RestoredFileInfoList -type RestoredFileInfoList struct { - - // Specifies whether the path points to directory. - IsDirectory *bool `json:"isDirectory,omitempty"` -} - -// Validate validates this restored file info list -func (m *RestoredFileInfoList) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restored file info list based on context it is used -func (m *RestoredFileInfoList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoredFileInfoList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoredFileInfoList) UnmarshalBinary(b []byte) error { - var res RestoredFileInfoList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restored_object_network_config_proto.go b/v1/models/restored_object_network_config_proto.go deleted file mode 100644 index 86ee4b49..00000000 --- a/v1/models/restored_object_network_config_proto.go +++ /dev/null @@ -1,290 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoredObjectNetworkConfigProto restored object network config proto -// -// swagger:model RestoredObjectNetworkConfigProto -type RestoredObjectNetworkConfigProto struct { - - // If this is set to true, then the network will be detached from the - // recovered or cloned VMs. - // NOTE: If this is set to true, then all the following fields will be - // ignored. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // This can be set to true to indicate that the attached network should be - // left in disabled state. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // The network mappings to be applied to the target object. - Mappings []*NetworkMappingProto `json:"mappings"` - - // The network entity (i.e, either a standard switch port group or a - // distributed port group in a VMware env) that will attached to the restored - // object. - NetworkEntity *EntityProto `json:"networkEntity,omitempty"` - - // 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. - PreserveMacAddressOnNewNetwork *bool `json:"preserveMacAddressOnNewNetwork,omitempty"` - - // This will be populated for kVirtualDatacenter. - VcdNetwork *OrgVDCNetwork `json:"vcdNetwork,omitempty"` - - // The VNicProfile that will be attached to the restored object. - VnicEntity *EntityProto `json:"vnicEntity,omitempty"` -} - -// Validate validates this restored object network config proto -func (m *RestoredObjectNetworkConfigProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMappings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVnicEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoredObjectNetworkConfigProto) validateMappings(formats strfmt.Registry) error { - if swag.IsZero(m.Mappings) { // not required - return nil - } - - 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 *RestoredObjectNetworkConfigProto) validateNetworkEntity(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkEntity) { // not required - return nil - } - - if m.NetworkEntity != nil { - if err := m.NetworkEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkEntity") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectNetworkConfigProto) validateVcdNetwork(formats strfmt.Registry) error { - if swag.IsZero(m.VcdNetwork) { // not required - return nil - } - - if m.VcdNetwork != nil { - if err := m.VcdNetwork.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdNetwork") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectNetworkConfigProto) validateVnicEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VnicEntity) { // not required - return nil - } - - if m.VnicEntity != nil { - if err := m.VnicEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vnicEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vnicEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restored object network config proto based on the context it is used -func (m *RestoredObjectNetworkConfigProto) 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.contextValidateNetworkEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVnicEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoredObjectNetworkConfigProto) 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 *RestoredObjectNetworkConfigProto) contextValidateNetworkEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkEntity != nil { - - if swag.IsZero(m.NetworkEntity) { // not required - return nil - } - - if err := m.NetworkEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkEntity") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectNetworkConfigProto) contextValidateVcdNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdNetwork != nil { - - if swag.IsZero(m.VcdNetwork) { // not required - return nil - } - - if err := m.VcdNetwork.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdNetwork") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectNetworkConfigProto) contextValidateVnicEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VnicEntity != nil { - - if swag.IsZero(m.VnicEntity) { // not required - return nil - } - - if err := m.VnicEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vnicEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vnicEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoredObjectNetworkConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoredObjectNetworkConfigProto) UnmarshalBinary(b []byte) error { - var res RestoredObjectNetworkConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restored_object_v_c_d_config_proto.go b/v1/models/restored_object_v_c_d_config_proto.go deleted file mode 100644 index d3ebfac0..00000000 --- a/v1/models/restored_object_v_c_d_config_proto.go +++ /dev/null @@ -1,427 +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" -) - -// RestoredObjectVCDConfigProto restored object v c d config proto -// -// swagger:model RestoredObjectVCDConfigProto -type RestoredObjectVCDConfigProto struct { - - // Whether the restored object is a VApp. - IsVapp *bool `json:"isVapp,omitempty"` - - // Whether the restored object is a VApp template. - IsVappTemplate *bool `json:"isVappTemplate,omitempty"` - - // Entity info enabled only when is_vapp is true. This proto will contain - // the original vApp that is protected (deprecated) - RestoredVappInfo *EntityProto `json:"restoredVappInfo,omitempty"` - - // Enabled only when is_vapp is true. This proto will contain - // the original vApp that is protected. - RestoredVappObject *RestoreObject `json:"restoredVappObject,omitempty"` - - // Entity info enabled only when is_vapp_template is true. This proto will - // contain the original vApp template that is protected (deprecated) - RestoredVappTemplateInfo *EntityProto `json:"restoredVappTemplateInfo,omitempty"` - - // Enabled only when is_vapp_template is true. This proto will - // contain the original vApp template that is protected. - RestoredVappTemplateObject *RestoreObject `json:"restoredVappTemplateObject,omitempty"` - - // Entity info of the vApp to be used to import the VMs into while performing - // recovery of VMs into exisintg vApps. - VappEntity *EntityProto `json:"vappEntity,omitempty"` - - // Connector params associated with the vcenter which will be captured for - // vCD environment. - VcenterConnectorParams *ConnectorParams `json:"vcenterConnectorParams,omitempty"` - - // Entity info of the Virtual Datacenter used while composing a new vApp. - VdcEntity *EntityProto `json:"vdcEntity,omitempty"` -} - -// Validate validates this restored object v c d config proto -func (m *RestoredObjectVCDConfigProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoredVappInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredVappObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredVappTemplateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredVappTemplateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVappEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcenterConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVdcEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateRestoredVappInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredVappInfo) { // not required - return nil - } - - if m.RestoredVappInfo != nil { - if err := m.RestoredVappInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappInfo") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateRestoredVappObject(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredVappObject) { // not required - return nil - } - - if m.RestoredVappObject != nil { - if err := m.RestoredVappObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappObject") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateRestoredVappTemplateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredVappTemplateInfo) { // not required - return nil - } - - if m.RestoredVappTemplateInfo != nil { - if err := m.RestoredVappTemplateInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappTemplateInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappTemplateInfo") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateRestoredVappTemplateObject(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredVappTemplateObject) { // not required - return nil - } - - if m.RestoredVappTemplateObject != nil { - if err := m.RestoredVappTemplateObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappTemplateObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappTemplateObject") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateVappEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VappEntity) { // not required - return nil - } - - if m.VappEntity != nil { - if err := m.VappEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappEntity") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateVcenterConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcenterConnectorParams) { // not required - return nil - } - - if m.VcenterConnectorParams != nil { - if err := m.VcenterConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterConnectorParams") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) validateVdcEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VdcEntity) { // not required - return nil - } - - if m.VdcEntity != nil { - if err := m.VdcEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdcEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdcEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this restored object v c d config proto based on the context it is used -func (m *RestoredObjectVCDConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoredVappInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredVappObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredVappTemplateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredVappTemplateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVappEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcenterConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVdcEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateRestoredVappInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredVappInfo != nil { - - if swag.IsZero(m.RestoredVappInfo) { // not required - return nil - } - - if err := m.RestoredVappInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappInfo") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateRestoredVappObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredVappObject != nil { - - if swag.IsZero(m.RestoredVappObject) { // not required - return nil - } - - if err := m.RestoredVappObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappObject") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateRestoredVappTemplateInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredVappTemplateInfo != nil { - - if swag.IsZero(m.RestoredVappTemplateInfo) { // not required - return nil - } - - if err := m.RestoredVappTemplateInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappTemplateInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappTemplateInfo") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateRestoredVappTemplateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredVappTemplateObject != nil { - - if swag.IsZero(m.RestoredVappTemplateObject) { // not required - return nil - } - - if err := m.RestoredVappTemplateObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredVappTemplateObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredVappTemplateObject") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateVappEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VappEntity != nil { - - if swag.IsZero(m.VappEntity) { // not required - return nil - } - - if err := m.VappEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappEntity") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateVcenterConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcenterConnectorParams != nil { - - if swag.IsZero(m.VcenterConnectorParams) { // not required - return nil - } - - if err := m.VcenterConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterConnectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterConnectorParams") - } - return err - } - } - - return nil -} - -func (m *RestoredObjectVCDConfigProto) contextValidateVdcEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VdcEntity != nil { - - if swag.IsZero(m.VdcEntity) { // not required - return nil - } - - if err := m.VdcEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdcEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdcEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RestoredObjectVCDConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoredObjectVCDConfigProto) UnmarshalBinary(b []byte) error { - var res RestoredObjectVCDConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/retention_policy_proto.go b/v1/models/retention_policy_proto.go deleted file mode 100644 index aa181061..00000000 --- a/v1/models/retention_policy_proto.go +++ /dev/null @@ -1,126 +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" -) - -// RetentionPolicyProto Retention Policy Proto. -// -// Message that specifies the retention policy for backup snapshots. -// -// swagger:model RetentionPolicyProto -type RetentionPolicyProto struct { - - // The number of days to keep the snapshots for a backup run. - NumDaysToKeep *int64 `json:"numDaysToKeep,omitempty"` - - // The number of seconds to keep the snapshots for a backup run. - NumSecsToKeep *int32 `json:"numSecsToKeep,omitempty"` - - // If the WORM lock is enabled on this policy, details of WORM policy. - // Absence of this field indicates WORM is not enabled on this policy. - // Also, presence of this field doesn't necessarily imply WORM protection. - // This is because the field could be present but the retention could - // have expired. - // If the policy has WORM enabled, We do not propagate it to attached - // backup jobs and further down the hierarchy here. Instead, any update on - // the backup run performs WORM checks based on the currently attached - // policy. Backup runs, when finished, inherit the WORM property from the - // corresponding attached policy at the completion time. - WormRetention *WormRetentionProto `json:"wormRetention,omitempty"` -} - -// Validate validates this retention policy proto -func (m *RetentionPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWormRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetentionPolicyProto) validateWormRetention(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetention) { // not required - return nil - } - - if m.WormRetention != nil { - if err := m.WormRetention.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormRetention") - } - return err - } - } - - return nil -} - -// ContextValidate validate this retention policy proto based on the context it is used -func (m *RetentionPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWormRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetentionPolicyProto) contextValidateWormRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.WormRetention != nil { - - if swag.IsZero(m.WormRetention) { // not required - return nil - } - - if err := m.WormRetention.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormRetention") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RetentionPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetentionPolicyProto) UnmarshalBinary(b []byte) error { - var res RetentionPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/retrieve_archive_info.go b/v1/models/retrieve_archive_info.go deleted file mode 100644 index b5adb820..00000000 --- a/v1/models/retrieve_archive_info.go +++ /dev/null @@ -1,219 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RetrieveArchiveInfo Proto to describe information about the retrieval of an archive task as -// provided by Icebox. -// -// swagger:model RetrieveArchiveInfo -type RetrieveArchiveInfo struct { - - // Average logical bytes transfer rate in bytes per second as seen by Icebox. - AvgLogicalTransferRateBps *int64 `json:"avgLogicalTransferRateBps,omitempty"` - - // Number of physical bytes transferred for this retrieval task so far. - BytesTransferred *int64 `json:"bytesTransferred,omitempty"` - - // Time when this retrieval task ended at Icebox side. If not set, then the - // retrieval has not ended yet. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // If the retrieval task has completed, the following indicates whether there - // was an error in its completion. - Error *ErrorProto `json:"error,omitempty"` - - // Number of logical bytes transferred so far. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Total logical size of the retrieval task. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // The root path of the progress monitor for this task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Contains info about all retrieved entities. - RetrievedEntityVec []*RetrieveArchiveInfoRetrievedEntity `json:"retrievedEntityVec"` - - // If true, we will use the view directly without cloning it and delete it - // when the restore is complete. - SkipCloningView *bool `json:"skipCloningView,omitempty"` - - // Time when this retrieval task was started by Icebox. If not set, then - // retrieval has not been started yet. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The stub view that Icebox created. Stub view can be used for selectively - // restoring or accessing files from an archive location. - StubViewName *string `json:"stubViewName,omitempty"` - - // Relative directory inside the stub view that corresponds with the archive. - StubViewRelativeDirName *string `json:"stubViewRelativeDirName,omitempty"` - - // The name of the target view where Icebox has retrieved and staged the - // requested entities. - TargetViewName *string `json:"targetViewName,omitempty"` - - // Message to display in the UI if any manual intervention is needed to make - // forward progress for the retrieve from archive task. This message is - // mainly relevant for tape based retrieve from archive tasks where a backup - // admin might be asked to load new media when the tape library does not have - // the relevant media to retrieve the archive from. - UserActionRequiredMsg *string `json:"userActionRequiredMsg,omitempty"` -} - -// Validate validates this retrieve archive info -func (m *RetrieveArchiveInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetrievedEntityVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveInfo) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RetrieveArchiveInfo) validateRetrievedEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.RetrievedEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.RetrievedEntityVec); i++ { - if swag.IsZero(m.RetrievedEntityVec[i]) { // not required - continue - } - - if m.RetrievedEntityVec[i] != nil { - if err := m.RetrievedEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrievedEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrievedEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this retrieve archive info based on the context it is used -func (m *RetrieveArchiveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetrievedEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveInfo) 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 -} - -func (m *RetrieveArchiveInfo) contextValidateRetrievedEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RetrievedEntityVec); i++ { - - if m.RetrievedEntityVec[i] != nil { - - if swag.IsZero(m.RetrievedEntityVec[i]) { // not required - return nil - } - - if err := m.RetrievedEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrievedEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrievedEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RetrieveArchiveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetrieveArchiveInfo) UnmarshalBinary(b []byte) error { - var res RetrieveArchiveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/retrieve_archive_info_retrieved_entity.go b/v1/models/retrieve_archive_info_retrieved_entity.go deleted file mode 100644 index ffaf9961..00000000 --- a/v1/models/retrieve_archive_info_retrieved_entity.go +++ /dev/null @@ -1,192 +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" -) - -// RetrieveArchiveInfoRetrievedEntity Proto to define the info about the entity that was retrieved from an -// archive. -// -// swagger:model RetrieveArchiveInfo_RetrievedEntity -type RetrieveArchiveInfoRetrievedEntity struct { - - // Number of physical bytes transferred over wire for this entity. - BytesTransferred *int64 `json:"bytesTransferred,omitempty"` - - // Time in microseconds when retrieve of this entity finished or failed. - EndTimestampUsecs *int64 `json:"endTimestampUsecs,omitempty"` - - // The entity that was retrieved. - Entity *EntityProto `json:"entity,omitempty"` - - // If the retrieve of the 'entity' failed, this field may contain the cause - // of the failure. - Error *ErrorProto `json:"error,omitempty"` - - // Number of logical bytes transferred so far. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Total logical size of this entity. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // The path relative to the root path of the retrieval task progress - // monitor of this entity progress monitor. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // The path relative to the root of the file system where the snapshot of - // this entity was retrieved/copied to. - RelativeSnapshotDir *string `json:"relativeSnapshotDir,omitempty"` - - // Time in microseconds when retrieve of this entity started. - StartTimestampUsecs *int64 `json:"startTimestampUsecs,omitempty"` - - // The retrieval status of this entity. - Status *int32 `json:"status,omitempty"` - - // If this is part of an uptier restore task, this will denote how much - // time the retrieved entity is present in the hot-tiers. - UptierExpiryTimestampUsecs *int64 `json:"uptierExpiryTimestampUsecs,omitempty"` -} - -// Validate validates this retrieve archive info retrieved entity -func (m *RetrieveArchiveInfoRetrievedEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveInfoRetrievedEntity) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveInfoRetrievedEntity) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this retrieve archive info retrieved entity based on the context it is used -func (m *RetrieveArchiveInfoRetrievedEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveInfoRetrievedEntity) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveInfoRetrievedEntity) 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 -} - -// MarshalBinary interface implementation -func (m *RetrieveArchiveInfoRetrievedEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetrieveArchiveInfoRetrievedEntity) UnmarshalBinary(b []byte) error { - var res RetrieveArchiveInfoRetrievedEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/retrieve_archive_task_state_proto.go b/v1/models/retrieve_archive_task_state_proto.go deleted file mode 100644 index 02dad603..00000000 --- a/v1/models/retrieve_archive_task_state_proto.go +++ /dev/null @@ -1,638 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RetrieveArchiveTaskStateProto Persistent state of a retrieve of an archive task. Only one of either -// entity_vec or download_files_info needs to be specified in this proto, where -// entity_vec is for retrieving the whole objects from the archive, and -// download_files_info is for only downloading the specified files from the -// archive. -// -// swagger:model RetrieveArchiveTaskStateProto -type RetrieveArchiveTaskStateProto struct { - - // Target from which to retrieve the archive. - ArchivalTarget *ArchivalTarget `json:"archivalTarget,omitempty"` - - // The uid of the archive to be retrieved. - ArchiveTaskUID *UniversalIDProto `json:"archiveTaskUid,omitempty"` - - // The start time of the backup run whose corresponding archive is being - // retrieved. This field is just used for logging purposes. - BackupRunStartTimeUsecs *int64 `json:"backupRunStartTimeUsecs,omitempty"` - - // Whether this retrieval task has a pending cancellation request. - CancellationRequested *bool `json:"cancellationRequested,omitempty"` - - // download files info - DownloadFilesInfo *RetrieveArchiveTaskStateProtoDownloadFilesInfo `json:"downloadFilesInfo,omitempty"` - - // If the retrieval task has finished, this field contains the end time for - // the task. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Information on the exact set of objects to retrieve from archive. Even if - // the user wanted to retrieve all objects from the archive, this field will - // contain all individual leaf-level objects. - EntityVec []*EntityProto `json:"entityVec"` - - // The error encountered by task (if any). Only valid if the task has - // finished. - Error *ErrorProto `json:"error,omitempty"` - - // The full view name (external). This is composed of a Cohesity specific - // prefix and the user provided view name. - FullViewNameDEPRECATED *string `json:"fullViewName_DEPRECATED,omitempty"` - - // Glacier restore option chosen by the user. - GlacierFlrRestoreOption *int32 `json:"glacierFlrRestoreOption,omitempty"` - - // If we also need to uptier the data to hot tiers, set this bool. - IsUptierRestoreJob *bool `json:"isUptierRestoreJob,omitempty"` - - // The uid of the job to which the archive to be retrieved belongs to. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` - - // The name of the retrieval task. - Name *string `json:"name,omitempty"` - - // The path of the progress monitor for this task. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Information of the files to restore from archive to source. - // Only one of download_files_info or restore_archive_files_info has - // to be populated to trigger download files or restore files from archive - // correspondingly. - RestoreArchiveFilesInfo *RetrieveArchiveTaskStateProtoDownloadFilesInfo `json:"restoreArchiveFilesInfo,omitempty"` - - // For retrieve tasks created after the 2.8 release, this will contain the id - // of the restore task that created this retrieve task. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Information about the retrieval task. This proto is created by the master - // and info in the proto is periodically updated by querying Icebox. - RetrievalInfo *RetrieveArchiveInfo `json:"retrievalInfo,omitempty"` - - // The start time for this retrieval task. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // The status of this task. - Status *int32 `json:"status,omitempty"` - - // The globally unique id for this retrieval of an archive task. - TaskUID *UniversalIDProto `json:"taskUid,omitempty"` - - // The user who requested this retrieval task. - User *string `json:"user,omitempty"` - - // Params to be passed to Icebox while restoring data from an archive. - VaultRestoreParams *VaultParamsRestoreParams `json:"vaultRestoreParams,omitempty"` - - // The view box id to which 'view_name' belongs to. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // The view name as provided by the user for this retrieval task. Retrieved - // snapshots of the entities will be placed in this view. - ViewNameDEPRECATED *string `json:"viewName_DEPRECATED,omitempty"` -} - -// Validate validates this retrieve archive task state proto -func (m *RetrieveArchiveTaskStateProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchiveTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFilesInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreArchiveFilesInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetrievalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveTaskStateProto) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *RetrieveArchiveTaskStateProto) validateArchiveTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveTaskUID) { // not required - 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 -} - -func (m *RetrieveArchiveTaskStateProto) validateDownloadFilesInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFilesInfo) { // not required - return nil - } - - if m.DownloadFilesInfo != nil { - if err := m.DownloadFilesInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) validateEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.EntityVec) { // not required - return nil - } - - for i := 0; i < len(m.EntityVec); i++ { - if swag.IsZero(m.EntityVec[i]) { // not required - continue - } - - if m.EntityVec[i] != nil { - if err := m.EntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *RetrieveArchiveTaskStateProto) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -func (m *RetrieveArchiveTaskStateProto) validateRestoreArchiveFilesInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreArchiveFilesInfo) { // not required - return nil - } - - if m.RestoreArchiveFilesInfo != nil { - if err := m.RestoreArchiveFilesInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreArchiveFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreArchiveFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) validateRetrievalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RetrievalInfo) { // not required - return nil - } - - if m.RetrievalInfo != nil { - if err := m.RetrievalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrievalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrievalInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - 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 -} - -func (m *RetrieveArchiveTaskStateProto) validateVaultRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if m.VaultRestoreParams != nil { - if err := m.VaultRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this retrieve archive task state proto based on the context it is used -func (m *RetrieveArchiveTaskStateProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchiveTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFilesInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreArchiveFilesInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetrievalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaultRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveTaskStateProto) 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 *RetrieveArchiveTaskStateProto) 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 *RetrieveArchiveTaskStateProto) contextValidateDownloadFilesInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFilesInfo != nil { - - if swag.IsZero(m.DownloadFilesInfo) { // not required - return nil - } - - if err := m.DownloadFilesInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) contextValidateEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityVec); i++ { - - if m.EntityVec[i] != nil { - - if swag.IsZero(m.EntityVec[i]) { // not required - return nil - } - - if err := m.EntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) 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 -} - -func (m *RetrieveArchiveTaskStateProto) 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 -} - -func (m *RetrieveArchiveTaskStateProto) contextValidateRestoreArchiveFilesInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreArchiveFilesInfo != nil { - - if swag.IsZero(m.RestoreArchiveFilesInfo) { // not required - return nil - } - - if err := m.RestoreArchiveFilesInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreArchiveFilesInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreArchiveFilesInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) contextValidateRetrievalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RetrievalInfo != nil { - - if swag.IsZero(m.RetrievalInfo) { // not required - return nil - } - - if err := m.RetrievalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrievalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrievalInfo") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProto) 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 -} - -func (m *RetrieveArchiveTaskStateProto) contextValidateVaultRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VaultRestoreParams != nil { - - if swag.IsZero(m.VaultRestoreParams) { // not required - return nil - } - - if err := m.VaultRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultRestoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RetrieveArchiveTaskStateProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetrieveArchiveTaskStateProto) UnmarshalBinary(b []byte) error { - var res RetrieveArchiveTaskStateProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/retrieve_archive_task_state_proto_download_files_info.go b/v1/models/retrieve_archive_task_state_proto_download_files_info.go deleted file mode 100644 index 021cbac0..00000000 --- a/v1/models/retrieve_archive_task_state_proto_download_files_info.go +++ /dev/null @@ -1,182 +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" -) - -// RetrieveArchiveTaskStateProtoDownloadFilesInfo Information required for Icebox when downloading files from an archived -// entity. This proto is specifically just for the current temporary solution -// for downloading a single from an archive, where we let icebox download the -// file for us. In the future once the new Yoda APIs for downloading files -// from archive stub views are ready, we will just discard this proto and -// make field 20 reserved. -// -// swagger:model RetrieveArchiveTaskStateProto_DownloadFilesInfo -type RetrieveArchiveTaskStateProtoDownloadFilesInfo struct { - - // The file paths to be retrieved from the archive. - // For example, if the file paths are /foo/bar and /foo2/bar - // and target_dir_path is "downloaded_files". The retrieved files will have - // the full path structure maintained in target_dir_path such as - // downloaded_files/foo/bar and /downloaded_files/foo2/bar. - FilePathVec []string `json:"filePathVec"` - - // Instance from which the requested files will be restored. - MagnetoInstanceID *MagnetoInstanceID `json:"magnetoInstanceId,omitempty"` - - // Object from which the requested files will be restored. - ObjectID *MagnetoObjectID `json:"objectId,omitempty"` - - // Ask Icebox to only create the stub view and skip restoring files in - // the stub view. - SkipRestoreInStubView *bool `json:"skipRestoreInStubView,omitempty"` - - // Path to the directory under which the downloaded files will be placed. - TargetDirPath *string `json:"targetDirPath,omitempty"` - - // Target view name where the downloaded files will be placed. - TargetViewName *string `json:"targetViewName,omitempty"` -} - -// Validate validates this retrieve archive task state proto download files info -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMagnetoInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) validateMagnetoInstanceID(formats strfmt.Registry) error { - if swag.IsZero(m.MagnetoInstanceID) { // not required - return nil - } - - if m.MagnetoInstanceID != nil { - if err := m.MagnetoInstanceID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("magnetoInstanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("magnetoInstanceId") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) validateObjectID(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if m.ObjectID != nil { - if err := m.ObjectID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this retrieve archive task state proto download files info based on the context it is used -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMagnetoInstanceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) contextValidateMagnetoInstanceID(ctx context.Context, formats strfmt.Registry) error { - - if m.MagnetoInstanceID != nil { - - if swag.IsZero(m.MagnetoInstanceID) { // not required - return nil - } - - if err := m.MagnetoInstanceID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("magnetoInstanceId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("magnetoInstanceId") - } - return err - } - } - - return nil -} - -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) contextValidateObjectID(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectID != nil { - - if swag.IsZero(m.ObjectID) { // not required - return nil - } - - if err := m.ObjectID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetrieveArchiveTaskStateProtoDownloadFilesInfo) UnmarshalBinary(b []byte) error { - var res RetrieveArchiveTaskStateProtoDownloadFilesInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/role.go b/v1/models/role.go deleted file mode 100644 index a9f8c00d..00000000 --- a/v1/models/role.go +++ /dev/null @@ -1,92 +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" -) - -// Role Role Information. -// -// Specifies information about role such as the category, privileges, -// description, etc. A role can be a default system role -// or a custom role. Custom roles are user-defined roles that are created -// using the Cohesity Dashboard, the REST API or the CLI. -// System roles are provided by default on the Cohesity Cluster. -// -// swagger:model Role -type Role struct { - - // Specifies the epoch time in milliseconds when the role was created. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies a description about the role. - Description *string `json:"description,omitempty"` - - // Specifies if the role is a user-defined custom role. - // If true, the role is a user-defined custom role that was created using - // the REST API, the Cohesity Dashboard or the CLI. - // If false, the role is a default system role that was created - // during Cluster creation. - IsCustomRole *bool `json:"isCustomRole,omitempty"` - - // Specifies the label for the role as displayed on the Cohesity - // Dashboard such as 'Viewer'. - Label *string `json:"label,omitempty"` - - // Specifies the epoch time in milliseconds when the role was last modified. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the internal Cluster name for the role such as COHESITY_VIEWER. - // For custom roles, the name and the label are the same. - // For default system roles, the name and label are different. - Name *string `json:"name,omitempty"` - - // Array of Privileges. - // - // Specifies the privileges assigned to the role. When a user or - // group is assigned this role, these privileges - // define the operations the user or group can perform on the - // Cohesity Cluster. - Privileges []string `json:"privileges"` - - // Specifies unique id of the tenant owning the role. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies id of tenants using this role. - TenantIds []string `json:"tenantIds"` -} - -// Validate validates this role -func (m *Role) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this role based on context it is used -func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Role) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Role) UnmarshalBinary(b []byte) error { - var res Role - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/role_create_parameters.go b/v1/models/role_create_parameters.go deleted file mode 100644 index 40d1e025..00000000 --- a/v1/models/role_create_parameters.go +++ /dev/null @@ -1,61 +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" -) - -// RoleCreateParameters Role Create. -// -// Specifies the parameters required to create a new custom role such -// as the name, description and the privileges to assign to the role. -// -// swagger:model RoleCreateParameters -type RoleCreateParameters struct { - - // Specifies a description about the role. - Description *string `json:"description,omitempty"` - - // Specifies the name of the custom role. - Name *string `json:"name,omitempty"` - - // Array of Privileges. - // - // Specifies the list of privileges to assign to the role. - Privileges []string `json:"privileges"` -} - -// Validate validates this role create parameters -func (m *RoleCreateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this role create parameters based on context it is used -func (m *RoleCreateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RoleCreateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RoleCreateParameters) UnmarshalBinary(b []byte) error { - var res RoleCreateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/role_delete_parameters.go b/v1/models/role_delete_parameters.go deleted file mode 100644 index 8ab720d5..00000000 --- a/v1/models/role_delete_parameters.go +++ /dev/null @@ -1,75 +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" -) - -// RoleDeleteParameters Delete Role. -// -// Specifies the parameters required for deleting one or more roles. -// -// swagger:model RoleDeleteParameters -type RoleDeleteParameters struct { - - // Array of Role Names. - // - // Specifies the list of roles to delete which are specified by role names. - // Required: true - Names []string `json:"names"` -} - -// Validate validates this role delete parameters -func (m *RoleDeleteParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNames(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RoleDeleteParameters) validateNames(formats strfmt.Registry) error { - - if err := validate.Required("names", "body", m.Names); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this role delete parameters based on context it is used -func (m *RoleDeleteParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RoleDeleteParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RoleDeleteParameters) UnmarshalBinary(b []byte) error { - var res RoleDeleteParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/role_update_parameters.go b/v1/models/role_update_parameters.go deleted file mode 100644 index ea20ca9c..00000000 --- a/v1/models/role_update_parameters.go +++ /dev/null @@ -1,57 +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" -) - -// RoleUpdateParameters Role Update. -// -// Specifies parameters required to update a role. -// -// swagger:model RoleUpdateParameters -type RoleUpdateParameters struct { - - // Specifies a description about the role. - Description *string `json:"description,omitempty"` - - // Array of Privileges. - // - // Specifies the list of privileges to assign to the role. - Privileges []string `json:"privileges"` -} - -// Validate validates this role update parameters -func (m *RoleUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this role update parameters based on context it is used -func (m *RoleUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RoleUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RoleUpdateParameters) UnmarshalBinary(b []byte) error { - var res RoleUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/root_public_folder.go b/v1/models/root_public_folder.go deleted file mode 100644 index 2afc0e87..00000000 --- a/v1/models/root_public_folder.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RootPublicFolder O365 RootPublicFolder. -// -// Specifies the RootPublicFolder with restore details to support full or -// partial recovery. -// -// swagger:model RootPublicFolder -type RootPublicFolder struct { - - // Specifies the list of Public Folders to be restored incase user wishes not - // to restore entire RootPublicFolder. - PublicFolderList []*PublicFolder `json:"publicFolderList"` - - // Specifies whether the entire RootPublicFolder is to be restored. - RestoreEntireRootPublicFolder *bool `json:"restoreEntireRootPublicFolder,omitempty"` - - // Specifies the details of the RootPublicFolder object. - RootPublicFolderObject *RestoreObjectDetails `json:"rootPublicFolderObject,omitempty"` -} - -// Validate validates this root public folder -func (m *RootPublicFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePublicFolderList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootPublicFolderObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RootPublicFolder) validatePublicFolderList(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFolderList) { // not required - return nil - } - - for i := 0; i < len(m.PublicFolderList); i++ { - if swag.IsZero(m.PublicFolderList[i]) { // not required - continue - } - - if m.PublicFolderList[i] != nil { - if err := m.PublicFolderList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RootPublicFolder) validateRootPublicFolderObject(formats strfmt.Registry) error { - if swag.IsZero(m.RootPublicFolderObject) { // not required - return nil - } - - if m.RootPublicFolderObject != nil { - if err := m.RootPublicFolderObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this root public folder based on the context it is used -func (m *RootPublicFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePublicFolderList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootPublicFolderObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RootPublicFolder) contextValidatePublicFolderList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PublicFolderList); i++ { - - if m.PublicFolderList[i] != nil { - - if swag.IsZero(m.PublicFolderList[i]) { // not required - return nil - } - - if err := m.PublicFolderList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RootPublicFolder) contextValidateRootPublicFolderObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RootPublicFolderObject != nil { - - if swag.IsZero(m.RootPublicFolderObject) { // not required - return nil - } - - if err := m.RootPublicFolderObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolderObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolderObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RootPublicFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RootPublicFolder) UnmarshalBinary(b []byte) error { - var res RootPublicFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/route.go b/v1/models/route.go deleted file mode 100644 index 457d7924..00000000 --- a/v1/models/route.go +++ /dev/null @@ -1,78 +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" -) - -// Route Route. -// -// Specifies the settings of a Static Route. -// -// swagger:model Route -type Route struct { - - // Specifies AdvMss setting per route. - Advmss *int32 `json:"advmss,omitempty"` - - // Specifies a description of the Static Route. - Description *string `json:"description,omitempty"` - - // Destination network. - // - // Specifies the destination network of the Static Route. - // overrideDescription: true - DestNetwork *string `json:"destNetwork,omitempty"` - - // Specifies the network interfaces name to use for communicating with the - // destination network. - IfName *string `json:"ifName,omitempty"` - - // Specifies the network interfaces group or interface group with vlan id to - // use for communicating with the destination network. - IfaceGroupName *string `json:"ifaceGroupName,omitempty"` - - // Specifies MTU setting per route. - Mtu *int32 `json:"mtu,omitempty"` - - // Specifies the next hop to the destination network. - NextHop *string `json:"nextHop,omitempty"` - - // Specifies the network node group to represent a group of nodes. - NodeGroupName *string `json:"nodeGroupName,omitempty"` -} - -// Validate validates this route -func (m *Route) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this route based on context it is used -func (m *Route) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Route) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Route) UnmarshalBinary(b []byte) error { - var res Route - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/rpo_policy_settings.go b/v1/models/rpo_policy_settings.go deleted file mode 100644 index fa2c769e..00000000 --- a/v1/models/rpo_policy_settings.go +++ /dev/null @@ -1,340 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RpoPolicySettings RPO Policy. -// -// Specifies all the additional settings that are applicable only -// to an RPO policy. This can include storage domain, settings of different -// environments, etc. -// -// swagger:model RpoPolicySettings -type RpoPolicySettings struct { - - // Alerting configuration can be used to specify optional details for the - // alerts triggered by this policy. - AlertingConfig *AlertingConfig `json:"alertingConfig,omitempty"` - - // Array of Job Events. - // - // During Job Runs, the following Job Events are generated: - // 1) Job succeeds 2) Job fails - // 3) Job violates the SLA - // These Job Events can cause Alerts to be generated. - // 'kSuccess' means the Protection Job succeeded. - // 'kFailure' means the Protection Job failed. - // 'kSlaViolation' means the Protection Job took longer than the time period - // specified in the SLA. - AlertingPolicy []string `json:"alertingPolicy"` - - // Specifies the policy level additional environment specific backup params. - // If this is not specified, default actions will be taken, for example for - // NAS environments, all objects within the source will be backed up. - EnvironmentTypeJobParams *EnvironmentTypeJobParameters `json:"environmentTypeJobParams,omitempty"` - - // Specifies the indexing policy for objects backed up by this policy. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the QoS policy type to use. - // 'kBackupHDD' indicates the Cohesity Cluster writes data directly to - // the HDD tier for this Protection Job. This is the recommended setting. - // 'kBackupSSD' indicates the Cohesity Cluster writes data directly to - // the SSD tier for this Protection Job. Only specify this policy if - // you need fast ingest speed for a small number of Protection Jobs. - // 'kTestAndDevHigh' indicated the test and dev workload. - // 'kBackupAll' indicates the Cohesity Cluster writes data directly to - // the HDD tier and the SSD tier for this Protection Job. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosType *string `json:"qosType,omitempty"` - - // Specifies the Storage Domain to which data will be written. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` -} - -// Validate validates this rpo policy settings -func (m *RpoPolicySettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironmentTypeJobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RpoPolicySettings) validateAlertingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if m.AlertingConfig != nil { - if err := m.AlertingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -var rpoPolicySettingsAlertingPolicyItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kFailure","kSlaViolation"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpoPolicySettingsAlertingPolicyItemsEnum = append(rpoPolicySettingsAlertingPolicyItemsEnum, v) - } -} - -func (m *RpoPolicySettings) validateAlertingPolicyItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpoPolicySettingsAlertingPolicyItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpoPolicySettings) validateAlertingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertingPolicy) { // not required - return nil - } - - for i := 0; i < len(m.AlertingPolicy); i++ { - - // value enum - if err := m.validateAlertingPolicyItemsEnum("alertingPolicy"+"."+strconv.Itoa(i), "body", m.AlertingPolicy[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *RpoPolicySettings) validateEnvironmentTypeJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.EnvironmentTypeJobParams) { // not required - return nil - } - - if m.EnvironmentTypeJobParams != nil { - if err := m.EnvironmentTypeJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentTypeJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentTypeJobParams") - } - return err - } - } - - return nil -} - -func (m *RpoPolicySettings) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var rpoPolicySettingsTypeQosTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpoPolicySettingsTypeQosTypePropEnum = append(rpoPolicySettingsTypeQosTypePropEnum, v) - } -} - -const ( - - // RpoPolicySettingsQosTypeKBackupHDD captures enum value "kBackupHDD" - RpoPolicySettingsQosTypeKBackupHDD string = "kBackupHDD" - - // RpoPolicySettingsQosTypeKBackupSSD captures enum value "kBackupSSD" - RpoPolicySettingsQosTypeKBackupSSD string = "kBackupSSD" - - // RpoPolicySettingsQosTypeKTestAndDevHigh captures enum value "kTestAndDevHigh" - RpoPolicySettingsQosTypeKTestAndDevHigh string = "kTestAndDevHigh" - - // RpoPolicySettingsQosTypeKBackupAll captures enum value "kBackupAll" - RpoPolicySettingsQosTypeKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *RpoPolicySettings) validateQosTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpoPolicySettingsTypeQosTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpoPolicySettings) validateQosType(formats strfmt.Registry) error { - if swag.IsZero(m.QosType) { // not required - return nil - } - - // value enum - if err := m.validateQosTypeEnum("qosType", "body", *m.QosType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this rpo policy settings based on the context it is used -func (m *RpoPolicySettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnvironmentTypeJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RpoPolicySettings) contextValidateAlertingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertingConfig != nil { - - if swag.IsZero(m.AlertingConfig) { // not required - return nil - } - - if err := m.AlertingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertingConfig") - } - return err - } - } - - return nil -} - -func (m *RpoPolicySettings) contextValidateEnvironmentTypeJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EnvironmentTypeJobParams != nil { - - if swag.IsZero(m.EnvironmentTypeJobParams) { // not required - return nil - } - - if err := m.EnvironmentTypeJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("environmentTypeJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("environmentTypeJobParams") - } - return err - } - } - - return nil -} - -func (m *RpoPolicySettings) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RpoPolicySettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RpoPolicySettings) UnmarshalBinary(b []byte) error { - var res RpoPolicySettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/rpo_schedule.go b/v1/models/rpo_schedule.go deleted file mode 100644 index 3fa0b8c4..00000000 --- a/v1/models/rpo_schedule.go +++ /dev/null @@ -1,130 +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" -) - -// RpoSchedule RPO Schedule. -// -// Specifies an RPO Schedule. -// -// swagger:model RpoSchedule -type RpoSchedule struct { - - // Specifies an RPO policy interval unit which will be used along with the - // multiplier to calculate the interval for the RPO policy execution. - // this can be kHours, kDays, KWeeks, kMonths - // RPOIntervalUnit. - // - // Specifies an RPO Schedule interval unit. - // kMinutes specifies that the rpo interval unit is hours. - // kHours specifies that the rpo interval unit is hours. - // kDays specifies that the rpo interval unit is days. - // kWeeks specifies that the rpo interval unit is weeks. - // kMonths specifies that the rpo interval unit is months. - // Enum: ["kMinutes","kHours","kDays","kWeeks","kMonths"] - IntervalUnit *string `json:"intervalUnit,omitempty"` - - // Specifies the multiplier value to be used with the RPO interval unit - // value. - Multiplier *int64 `json:"multiplier,omitempty"` -} - -// Validate validates this rpo schedule -func (m *RpoSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIntervalUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rpoScheduleTypeIntervalUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMinutes","kHours","kDays","kWeeks","kMonths"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpoScheduleTypeIntervalUnitPropEnum = append(rpoScheduleTypeIntervalUnitPropEnum, v) - } -} - -const ( - - // RpoScheduleIntervalUnitKMinutes captures enum value "kMinutes" - RpoScheduleIntervalUnitKMinutes string = "kMinutes" - - // RpoScheduleIntervalUnitKHours captures enum value "kHours" - RpoScheduleIntervalUnitKHours string = "kHours" - - // RpoScheduleIntervalUnitKDays captures enum value "kDays" - RpoScheduleIntervalUnitKDays string = "kDays" - - // RpoScheduleIntervalUnitKWeeks captures enum value "kWeeks" - RpoScheduleIntervalUnitKWeeks string = "kWeeks" - - // RpoScheduleIntervalUnitKMonths captures enum value "kMonths" - RpoScheduleIntervalUnitKMonths string = "kMonths" -) - -// prop value enum -func (m *RpoSchedule) validateIntervalUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpoScheduleTypeIntervalUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpoSchedule) validateIntervalUnit(formats strfmt.Registry) error { - if swag.IsZero(m.IntervalUnit) { // not required - return nil - } - - // value enum - if err := m.validateIntervalUnitEnum("intervalUnit", "body", *m.IntervalUnit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rpo schedule based on context it is used -func (m *RpoSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RpoSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RpoSchedule) UnmarshalBinary(b []byte) error { - var res RpoSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_diagnostics_message.go b/v1/models/run_diagnostics_message.go deleted file mode 100644 index 19715cbd..00000000 --- a/v1/models/run_diagnostics_message.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" -) - -// RunDiagnosticsMessage Status of Run Diagnostics Request. -// -// Specifies the status of an Run Diagnostics request. -// -// swagger:model RunDiagnosticsMessage -type RunDiagnosticsMessage struct { - - // Specifies the status message returned after initiating a run - // diagnostics request. - Message *string `json:"message,omitempty"` -} - -// Validate validates this run diagnostics message -func (m *RunDiagnosticsMessage) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this run diagnostics message based on context it is used -func (m *RunDiagnosticsMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RunDiagnosticsMessage) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunDiagnosticsMessage) UnmarshalBinary(b []byte) error { - var res RunDiagnosticsMessage - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_job_snapshot_target.go b/v1/models/run_job_snapshot_target.go deleted file mode 100644 index 0b8ee6e4..00000000 --- a/v1/models/run_job_snapshot_target.go +++ /dev/null @@ -1,305 +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" -) - -// RunJobSnapshotTarget Copy Task Job Run Parameters. -// -// Specifies settings for a Copy Task when a Protection is run. It -// gives the target location for the Snapshot and its retention. -// -// swagger:model RunJobSnapshotTarget -type RunJobSnapshotTarget struct { - - // Specifies the Archival External Target for storing a copied Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - ArchivalTarget *ArchivalExternalTarget `json:"archivalTarget,omitempty"` - - // Specifies the cloud replication target for storing a copied Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - CloudReplicationTarget *CloudDeployTargetDetails `json:"cloudReplicationTarget,omitempty"` - - // Specifies the number of days to retain copied Snapshots on the target. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists on - // the external target. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies optionally whether to retain the snapshot for legal purpose. - // If set to true, the run cannot be deleted until the retention period. - // Note that using this option may cause the Cluster to run out of space. - // If set to false explicitly, the hold is removed, and the run will expire - // as specified in the policy of the Protection Job. - // If this field is not specified, there is no change to the hold of the run. - // This field can be set only by a User having Data Security Role. - HoldForLegalPurpose *bool `json:"holdForLegalPurpose,omitempty"` - - // Specifies the replication target (Remote Cluster) for storing a copied - // Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - ReplicationTarget *ReplicationTargetSettings `json:"replicationTarget,omitempty"` - - // Specifies the type of a Snapshot target such as 'kLocal', 'kRemote' or - // 'kArchival'. - // 'kLocal' means the Snapshot is stored on a local Cohesity Cluster. - // 'kRemote' means the Snapshot is stored on a Remote Cohesity Cluster. - // (It was copied to the Remote Cohesity Cluster using replication.) - // 'kArchival' means the Snapshot is stored on a Archival External Target - // (such as Tape or AWS). - // 'kCloudDeploy' means the Snapshot is stored on a Cloud platform. - // Enum: ["kLocal","kRemote","kArchival","kCloudDeploy","kCloudReplication"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this run job snapshot target -func (m *RunJobSnapshotTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunJobSnapshotTarget) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *RunJobSnapshotTarget) validateCloudReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if m.CloudReplicationTarget != nil { - if err := m.CloudReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *RunJobSnapshotTarget) validateReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if m.ReplicationTarget != nil { - if err := m.ReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -var runJobSnapshotTargetTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLocal","kRemote","kArchival","kCloudDeploy","kCloudReplication"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runJobSnapshotTargetTypeTypePropEnum = append(runJobSnapshotTargetTypeTypePropEnum, v) - } -} - -const ( - - // RunJobSnapshotTargetTypeKLocal captures enum value "kLocal" - RunJobSnapshotTargetTypeKLocal string = "kLocal" - - // RunJobSnapshotTargetTypeKRemote captures enum value "kRemote" - RunJobSnapshotTargetTypeKRemote string = "kRemote" - - // RunJobSnapshotTargetTypeKArchival captures enum value "kArchival" - RunJobSnapshotTargetTypeKArchival string = "kArchival" - - // RunJobSnapshotTargetTypeKCloudDeploy captures enum value "kCloudDeploy" - RunJobSnapshotTargetTypeKCloudDeploy string = "kCloudDeploy" - - // RunJobSnapshotTargetTypeKCloudReplication captures enum value "kCloudReplication" - RunJobSnapshotTargetTypeKCloudReplication string = "kCloudReplication" -) - -// prop value enum -func (m *RunJobSnapshotTarget) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runJobSnapshotTargetTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunJobSnapshotTarget) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this run job snapshot target based on the context it is used -func (m *RunJobSnapshotTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunJobSnapshotTarget) 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 *RunJobSnapshotTarget) contextValidateCloudReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudReplicationTarget != nil { - - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if err := m.CloudReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *RunJobSnapshotTarget) contextValidateReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationTarget != nil { - - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if err := m.ReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunJobSnapshotTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunJobSnapshotTarget) UnmarshalBinary(b []byte) error { - var res RunJobSnapshotTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_map_reduce_instance_result.go b/v1/models/run_map_reduce_instance_result.go deleted file mode 100644 index a10aaecf..00000000 --- a/v1/models/run_map_reduce_instance_result.go +++ /dev/null @@ -1,112 +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" -) - -// RunMapReduceInstanceResult Result of RunMapReduceInstance call. -// -// swagger:model RunMapReduceInstanceResult -type RunMapReduceInstanceResult struct { - - // Status code of http rpc. - Error *ErrorProto `json:"error,omitempty"` - - // Return the ID of instance. - MapReduceInstanceID *int64 `json:"mapReduceInstanceId,omitempty"` -} - -// Validate validates this run map reduce instance result -func (m *RunMapReduceInstanceResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunMapReduceInstanceResult) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this run map reduce instance result based on the context it is used -func (m *RunMapReduceInstanceResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunMapReduceInstanceResult) 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 -} - -// MarshalBinary interface implementation -func (m *RunMapReduceInstanceResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunMapReduceInstanceResult) UnmarshalBinary(b []byte) error { - var res RunMapReduceInstanceResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_map_reduce_params.go b/v1/models/run_map_reduce_params.go deleted file mode 100644 index 5ec9456c..00000000 --- a/v1/models/run_map_reduce_params.go +++ /dev/null @@ -1,231 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RunMapReduceParams Get Run Map Reduce App Parameters. -// -// RunMapReduceParams specifies the input params to run a map reduce instance. -// -// swagger:model RunMapReduceParams -type RunMapReduceParams struct { - - // ApplicationId is the Id of the map reduce application to run. - AppID *int64 `json:"appId,omitempty"` - - // InputParams specifies optional list of key=value input params specified - // for running the map reduce instance. - InputParams []*MapReduceInstanceInputParam `json:"inputParams"` - - // InputSpecification specifies the input information to run the specific map - // reduce instance. - MrInput *InputSpec `json:"mrInput,omitempty"` - - // OutputSpecification specifies the output information to run the specific - // map reduce instance. - MrOutput *OutputSpec `json:"mrOutput,omitempty"` -} - -// Validate validates this run map reduce params -func (m *RunMapReduceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInputParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMrInput(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMrOutput(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunMapReduceParams) validateInputParams(formats strfmt.Registry) error { - if swag.IsZero(m.InputParams) { // not required - return nil - } - - for i := 0; i < len(m.InputParams); i++ { - if swag.IsZero(m.InputParams[i]) { // not required - continue - } - - if m.InputParams[i] != nil { - if err := m.InputParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunMapReduceParams) validateMrInput(formats strfmt.Registry) error { - if swag.IsZero(m.MrInput) { // not required - return nil - } - - if m.MrInput != nil { - if err := m.MrInput.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInput") - } - return err - } - } - - return nil -} - -func (m *RunMapReduceParams) validateMrOutput(formats strfmt.Registry) error { - if swag.IsZero(m.MrOutput) { // not required - return nil - } - - if m.MrOutput != nil { - if err := m.MrOutput.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrOutput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrOutput") - } - return err - } - } - - return nil -} - -// ContextValidate validate this run map reduce params based on the context it is used -func (m *RunMapReduceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInputParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMrInput(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMrOutput(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunMapReduceParams) contextValidateInputParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InputParams); i++ { - - if m.InputParams[i] != nil { - - if swag.IsZero(m.InputParams[i]) { // not required - return nil - } - - if err := m.InputParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunMapReduceParams) contextValidateMrInput(ctx context.Context, formats strfmt.Registry) error { - - if m.MrInput != nil { - - if swag.IsZero(m.MrInput) { // not required - return nil - } - - if err := m.MrInput.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrInput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrInput") - } - return err - } - } - - return nil -} - -func (m *RunMapReduceParams) contextValidateMrOutput(ctx context.Context, formats strfmt.Registry) error { - - if m.MrOutput != nil { - - if swag.IsZero(m.MrOutput) { // not required - return nil - } - - if err := m.MrOutput.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mrOutput") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mrOutput") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunMapReduceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunMapReduceParams) UnmarshalBinary(b []byte) error { - var res RunMapReduceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_now_parameters.go b/v1/models/run_now_parameters.go deleted file mode 100644 index fef1a400..00000000 --- a/v1/models/run_now_parameters.go +++ /dev/null @@ -1,119 +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" -) - -// RunNowParameters RunNowParameters. -// -// Specifies the parameters of a Run Now operation. A Run Now operation -// will try to backup the a source and/or its databases instantly. -// -// swagger:model RunNowParameters -type RunNowParameters struct { - - // Specifies the ids of the DB's to perform run now on. - DatabaseIds []int64 `json:"databaseIds"` - - // Specifies optional physical parameters for a specific source id. - PhysicalParams *RunNowPhysicalParameters `json:"physicalParams,omitempty"` - - // Specifies the source id of the Databases to perform the Run Now - // operation on. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this run now parameters -func (m *RunNowParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunNowParameters) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this run now parameters based on the context it is used -func (m *RunNowParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunNowParameters) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunNowParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunNowParameters) UnmarshalBinary(b []byte) error { - var res RunNowParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_now_physical_parameters.go b/v1/models/run_now_physical_parameters.go deleted file mode 100644 index 7032b915..00000000 --- a/v1/models/run_now_physical_parameters.go +++ /dev/null @@ -1,57 +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" -) - -// RunNowPhysicalParameters RunNowPhysicalParameters. -// -// Specifies optional physical parameters for a specific source id. -// -// swagger:model RunNowPhysicalParameters -type RunNowPhysicalParameters struct { - - // Specifies metadata file path during run-now requests for physical file - // based backups for some specific host entity. If specified, it will - // override any default metadata/directive file path set at the job level - // for the host. Also note that if the job default does not specify a - // metadata/directive file path for the host, then specifying this field - // for that host during run-now request will be rejected. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` -} - -// Validate validates this run now physical parameters -func (m *RunNowPhysicalParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this run now physical parameters based on context it is used -func (m *RunNowPhysicalParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RunNowPhysicalParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunNowPhysicalParameters) UnmarshalBinary(b []byte) error { - var res RunNowPhysicalParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_protection_job_param.go b/v1/models/run_protection_job_param.go deleted file mode 100644 index af621868..00000000 --- a/v1/models/run_protection_job_param.go +++ /dev/null @@ -1,265 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RunProtectionJobParam Protection Run Parameters. -// -// Specify the parameters to run a protection job. -// -// swagger:model RunProtectionJobParam -type RunProtectionJobParam struct { - - // Optional parameter to be set if you want specific replication or archival - // associated with the policy to run. - CopyRunTargets []*RunJobSnapshotTarget `json:"copyRunTargets"` - - // Optional parameters of a Run Now operation. - RunNowParameters []*RunNowParameters `json:"runNowParameters"` - - // Specifies the type of backup. If not specified, 'kRegular' is assumed. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - RunType *string `json:"runType,omitempty"` - - // Optional parameter if you want to back up only a subset of sources that - // are protected by the job in this run. If a Run Now operation is to be - // performed then the source ids should only be provided in the - // runNowParameters along with the database Ids. - SourceIds []int64 `json:"sourceIds"` - - // Specifies if default policy settings should be used interanally to - // copy snapshots to external targets already configured in policy. This - // field will only apply if "CopyRunTargets" is empty. - UsePolicyDefaults *bool `json:"usePolicyDefaults,omitempty"` -} - -// Validate validates this run protection job param -func (m *RunProtectionJobParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyRunTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunNowParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunProtectionJobParam) validateCopyRunTargets(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRunTargets) { // not required - return nil - } - - for i := 0; i < len(m.CopyRunTargets); i++ { - if swag.IsZero(m.CopyRunTargets[i]) { // not required - continue - } - - if m.CopyRunTargets[i] != nil { - if err := m.CopyRunTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunProtectionJobParam) validateRunNowParameters(formats strfmt.Registry) error { - if swag.IsZero(m.RunNowParameters) { // not required - return nil - } - - for i := 0; i < len(m.RunNowParameters); i++ { - if swag.IsZero(m.RunNowParameters[i]) { // not required - continue - } - - if m.RunNowParameters[i] != nil { - if err := m.RunNowParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var runProtectionJobParamTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runProtectionJobParamTypeRunTypePropEnum = append(runProtectionJobParamTypeRunTypePropEnum, v) - } -} - -const ( - - // RunProtectionJobParamRunTypeKRegular captures enum value "kRegular" - RunProtectionJobParamRunTypeKRegular string = "kRegular" - - // RunProtectionJobParamRunTypeKFull captures enum value "kFull" - RunProtectionJobParamRunTypeKFull string = "kFull" - - // RunProtectionJobParamRunTypeKLog captures enum value "kLog" - RunProtectionJobParamRunTypeKLog string = "kLog" - - // RunProtectionJobParamRunTypeKSystem captures enum value "kSystem" - RunProtectionJobParamRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *RunProtectionJobParam) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runProtectionJobParamTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunProtectionJobParam) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this run protection job param based on the context it is used -func (m *RunProtectionJobParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyRunTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunNowParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunProtectionJobParam) contextValidateCopyRunTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyRunTargets); i++ { - - if m.CopyRunTargets[i] != nil { - - if swag.IsZero(m.CopyRunTargets[i]) { // not required - return nil - } - - if err := m.CopyRunTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunProtectionJobParam) contextValidateRunNowParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunNowParameters); i++ { - - if m.RunNowParameters[i] != nil { - - if swag.IsZero(m.RunNowParameters[i]) { // not required - return nil - } - - if err := m.RunNowParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunProtectionJobParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunProtectionJobParam) UnmarshalBinary(b []byte) error { - var res RunProtectionJobParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/run_uid.go b/v1/models/run_uid.go deleted file mode 100644 index 98ca84b4..00000000 --- a/v1/models/run_uid.go +++ /dev/null @@ -1,114 +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" -) - -// RunUID Run UID. -// -// Specifies the universal id of the latest successful Protection Job Run. -// -// swagger:model RunUid -type RunUID struct { - - // Specifies the universal id of the Protection Job. - JobUID *UniversalID `json:"jobUid,omitempty"` - - // Specifies the start time of the Protection Job Run. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this run Uid -func (m *RunUID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunUID) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this run Uid based on the context it is used -func (m *RunUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunUID) 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 -} - -// MarshalBinary interface implementation -func (m *RunUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunUID) UnmarshalBinary(b []byte) error { - var res RunUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_backup_job_params.go b/v1/models/s3_backup_job_params.go deleted file mode 100644 index ac0c5332..00000000 --- a/v1/models/s3_backup_job_params.go +++ /dev/null @@ -1,58 +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" -) - -// S3BackupJobParams Message that contains S3 Job level params. -// -// swagger:model S3BackupJobParams -type S3BackupJobParams struct { - - // If true, we will also backup object level acls if they are enabled. - BackupObjectAcls *bool `json:"backupObjectAcls,omitempty"` - - // If true then backup job will skip the S3 objects whose backup get failed. - // Basically, won't fail the backup job if some of the objects gets failed. - SkipFilesOnError *bool `json:"skipFilesOnError,omitempty"` - - // Objects whose storage class is not in the selected storage classes will - // be skipped. - StorageClasses []int32 `json:"storageClasses"` -} - -// Validate validates this s3 backup job params -func (m *S3BackupJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 backup job params based on context it is used -func (m *S3BackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3BackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BackupJobParams) UnmarshalBinary(b []byte) error { - var res S3BackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_bucket_config_proto.go b/v1/models/s3_bucket_config_proto.go deleted file mode 100644 index 0c5b8069..00000000 --- a/v1/models/s3_bucket_config_proto.go +++ /dev/null @@ -1,542 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// S3BucketConfigProto Proto to define the config/metadata of a S3 bucket. -// -// swagger:model S3BucketConfigProto -type S3BucketConfigProto struct { - - // bool representing if the view is ABAC enabled or not - AbacEnabled *bool `json:"abacEnabled,omitempty"` - - // ACL of the bucket. - ACL *ACLProto `json:"acl,omitempty"` - - // Policy in effect for the bucket. - BucketPolicy *BucketPolicy `json:"bucketPolicy,omitempty"` - - // bool representing whether MPUs are organized using S3 MPU 2.0 design. - // Should only be set while view creation and immutable there after. - EfficientMpuEnabled *bool `json:"efficientMpuEnabled,omitempty"` - - // If set to false, we disable access to view using S3/Swift protocol. This - // overrides any 'protocol_access_info' set on view for S3/Swift. This flag - // is added as the transition for S3 native to non-S3 native is disabled - // and therefore the access using S3/Swift protocol cannot be disabled by - // madrox. - EnableObjStoreAccess *bool `json:"enableObjStoreAccess,omitempty"` - - // The cluster id for the cluster where the view was initially created - // without replication. For view on Rx, the init_cluster_id will remain same - // as that of the initial cluster. - InitClusterID *int64 `json:"initClusterId,omitempty"` - - // The cluster incarnation id for the cluster where the view was initially - // created without replication. For view on Rx, the - // init_incarnation_cluster_id will remain same as that of the initial - // cluster. - InitClusterIncarnationID *int64 `json:"initClusterIncarnationId,omitempty"` - - // Lifecycle policy of the bucket. If not specified, no lifecycle management - // is performed for objects in this bucket. - LifecycleConfig *LifecycleConfigProto `json:"lifecycleConfig,omitempty"` - - // This tunable field defines the number of maximum subfiles a - // MPU directory can have. - MaxSubfilesPerMpu *int32 `json:"maxSubfilesPerMpu,omitempty"` - - // Whether this view has ever had any object with tags. This should be - // enabled only when first object tag is ever put in this view. - ObjectTagsAdded *bool `json:"objectTagsAdded,omitempty"` - - // Information about the bucket owner. - OwnerInfo *OwnerInfo `json:"ownerInfo,omitempty"` - - // Bucket Ownership Controls for the bucket. - OwnershipControls *BucketOwnershipControls `json:"ownershipControls,omitempty"` - - // Delimiter used in prefix based request routing. An application needs to - // explicitly set the prefix_delimiter during bucket creation. If the - // prefix_delimiter is not explicitly set, '/' will be used as the default - // prefix delimiter for buckets that has prefix-based-routing enabled. - // SnapDiff backups uses '/' in the object names hence it was chosen as the - // default prefix to avoid further UI changes in this project. If there are - // other use cases that require a different prefix_delimiter, it has to be - // set during bucket creation. Once prefix_delimiter is chosen, it cannot be - // changed. - PrefixDelimiter *string `json:"prefixDelimiter,omitempty"` - - // Stores the prefix to child bucket mapping to enable prefix based routing - // of object requests to child buckets. - PrefixToChildBucketMap []*S3BucketConfigProtoPrefixToChildBucketMapEntry `json:"prefixToChildBucketMap"` - - // Protocol type of this bucket. - ProtocolType *int32 `json:"protocolType,omitempty"` - - // Swfit container tagging information. - SwiftContainerTag *SwiftContainerTaggingProto `json:"swiftContainerTag,omitempty"` - - // Tags (or labels) assigned to the bucket. Tags are set of - // pairs. - TagMap []*S3BucketConfigProtoTagMapEntry `json:"tagMap"` - - // versioning state - VersioningState *int32 `json:"versioningState,omitempty"` -} - -// Validate validates this s3 bucket config proto -func (m *S3BucketConfigProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateACL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBucketPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLifecycleConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipControls(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrefixToChildBucketMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSwiftContainerTag(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3BucketConfigProto) validateACL(formats strfmt.Registry) error { - if swag.IsZero(m.ACL) { // not required - return nil - } - - if m.ACL != nil { - if err := m.ACL.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acl") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validateBucketPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.BucketPolicy) { // not required - return nil - } - - if m.BucketPolicy != nil { - if err := m.BucketPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketPolicy") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validateLifecycleConfig(formats strfmt.Registry) error { - if swag.IsZero(m.LifecycleConfig) { // not required - return nil - } - - if m.LifecycleConfig != nil { - if err := m.LifecycleConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lifecycleConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lifecycleConfig") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validateOwnerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if m.OwnerInfo != nil { - if err := m.OwnerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validateOwnershipControls(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipControls) { // not required - return nil - } - - if m.OwnershipControls != nil { - if err := m.OwnershipControls.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownershipControls") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownershipControls") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validatePrefixToChildBucketMap(formats strfmt.Registry) error { - if swag.IsZero(m.PrefixToChildBucketMap) { // not required - return nil - } - - for i := 0; i < len(m.PrefixToChildBucketMap); i++ { - if swag.IsZero(m.PrefixToChildBucketMap[i]) { // not required - continue - } - - if m.PrefixToChildBucketMap[i] != nil { - if err := m.PrefixToChildBucketMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prefixToChildBucketMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prefixToChildBucketMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *S3BucketConfigProto) validateSwiftContainerTag(formats strfmt.Registry) error { - if swag.IsZero(m.SwiftContainerTag) { // not required - return nil - } - - if m.SwiftContainerTag != nil { - if err := m.SwiftContainerTag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("swiftContainerTag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("swiftContainerTag") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) validateTagMap(formats strfmt.Registry) error { - if swag.IsZero(m.TagMap) { // not required - return nil - } - - for i := 0; i < len(m.TagMap); i++ { - if swag.IsZero(m.TagMap[i]) { // not required - continue - } - - if m.TagMap[i] != nil { - if err := m.TagMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this s3 bucket config proto based on the context it is used -func (m *S3BucketConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateACL(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBucketPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLifecycleConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnershipControls(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrefixToChildBucketMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSwiftContainerTag(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3BucketConfigProto) contextValidateACL(ctx context.Context, formats strfmt.Registry) error { - - if m.ACL != nil { - - if swag.IsZero(m.ACL) { // not required - return nil - } - - if err := m.ACL.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acl") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acl") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateBucketPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.BucketPolicy != nil { - - if swag.IsZero(m.BucketPolicy) { // not required - return nil - } - - if err := m.BucketPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketPolicy") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateLifecycleConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.LifecycleConfig != nil { - - if swag.IsZero(m.LifecycleConfig) { // not required - return nil - } - - if err := m.LifecycleConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lifecycleConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lifecycleConfig") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateOwnerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerInfo != nil { - - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if err := m.OwnerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateOwnershipControls(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnershipControls != nil { - - if swag.IsZero(m.OwnershipControls) { // not required - return nil - } - - if err := m.OwnershipControls.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownershipControls") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownershipControls") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidatePrefixToChildBucketMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PrefixToChildBucketMap); i++ { - - if m.PrefixToChildBucketMap[i] != nil { - - if swag.IsZero(m.PrefixToChildBucketMap[i]) { // not required - return nil - } - - if err := m.PrefixToChildBucketMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prefixToChildBucketMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prefixToChildBucketMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateSwiftContainerTag(ctx context.Context, formats strfmt.Registry) error { - - if m.SwiftContainerTag != nil { - - if swag.IsZero(m.SwiftContainerTag) { // not required - return nil - } - - if err := m.SwiftContainerTag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("swiftContainerTag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("swiftContainerTag") - } - return err - } - } - - return nil -} - -func (m *S3BucketConfigProto) contextValidateTagMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagMap); i++ { - - if m.TagMap[i] != nil { - - if swag.IsZero(m.TagMap[i]) { // not required - return nil - } - - if err := m.TagMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3BucketConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BucketConfigProto) UnmarshalBinary(b []byte) error { - var res S3BucketConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_bucket_config_proto_prefix_to_child_bucket_map_entry.go b/v1/models/s3_bucket_config_proto_prefix_to_child_bucket_map_entry.go deleted file mode 100644 index 0a68c12d..00000000 --- a/v1/models/s3_bucket_config_proto_prefix_to_child_bucket_map_entry.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" -) - -// S3BucketConfigProtoPrefixToChildBucketMapEntry s3 bucket config proto prefix to child bucket map entry -// -// swagger:model S3BucketConfigProto_PrefixToChildBucketMapEntry -type S3BucketConfigProtoPrefixToChildBucketMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this s3 bucket config proto prefix to child bucket map entry -func (m *S3BucketConfigProtoPrefixToChildBucketMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 bucket config proto prefix to child bucket map entry based on context it is used -func (m *S3BucketConfigProtoPrefixToChildBucketMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3BucketConfigProtoPrefixToChildBucketMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BucketConfigProtoPrefixToChildBucketMapEntry) UnmarshalBinary(b []byte) error { - var res S3BucketConfigProtoPrefixToChildBucketMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_bucket_config_proto_tag_map_entry.go b/v1/models/s3_bucket_config_proto_tag_map_entry.go deleted file mode 100644 index edd57c67..00000000 --- a/v1/models/s3_bucket_config_proto_tag_map_entry.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" -) - -// S3BucketConfigProtoTagMapEntry s3 bucket config proto tag map entry -// -// swagger:model S3BucketConfigProto_TagMapEntry -type S3BucketConfigProtoTagMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this s3 bucket config proto tag map entry -func (m *S3BucketConfigProtoTagMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 bucket config proto tag map entry based on context it is used -func (m *S3BucketConfigProtoTagMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3BucketConfigProtoTagMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BucketConfigProtoTagMapEntry) UnmarshalBinary(b []byte) error { - var res S3BucketConfigProtoTagMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_bucket_info.go b/v1/models/s3_bucket_info.go deleted file mode 100644 index d8ce86a6..00000000 --- a/v1/models/s3_bucket_info.go +++ /dev/null @@ -1,57 +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" -) - -// S3BucketInfo Message that contains the information of the S3 Bucket. -// -// swagger:model S3BucketInfo -type S3BucketInfo struct { - - // AWS region of the S3 bucket. - AwsRegion *string `json:"awsRegion,omitempty"` - - // Name of the S3 bucket. - BucketName *string `json:"bucketName,omitempty"` - - // Complete path of the sub folder in the s3 bucket. - // This job will create all keys within the given key prefix. - KeyPrefix *string `json:"keyPrefix,omitempty"` -} - -// Validate validates this s3 bucket info -func (m *S3BucketInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 bucket info based on context it is used -func (m *S3BucketInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3BucketInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BucketInfo) UnmarshalBinary(b []byte) error { - var res S3BucketInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_bucket_params_proto.go b/v1/models/s3_bucket_params_proto.go deleted file mode 100644 index a7d5dd94..00000000 --- a/v1/models/s3_bucket_params_proto.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// S3BucketParamsProto Message that contains S3 Object(bucket) level params. -// -// swagger:model S3BucketParamsProto -type S3BucketParamsProto struct { - - // The filtering policy to decide which objects within a source should be - // backed up. If this is not specified, then all of the objects within the - // source will be backed up. - FilteringPolicies []*FilteringPolicyProto `json:"filteringPolicies"` -} - -// Validate validates this s3 bucket params proto -func (m *S3BucketParamsProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteringPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3BucketParamsProto) validateFilteringPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.FilteringPolicies) { // not required - return nil - } - - for i := 0; i < len(m.FilteringPolicies); i++ { - if swag.IsZero(m.FilteringPolicies[i]) { // not required - continue - } - - if m.FilteringPolicies[i] != nil { - if err := m.FilteringPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this s3 bucket params proto based on the context it is used -func (m *S3BucketParamsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteringPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3BucketParamsProto) contextValidateFilteringPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilteringPolicies); i++ { - - if m.FilteringPolicies[i] != nil { - - if swag.IsZero(m.FilteringPolicies[i]) { // not required - return nil - } - - if err := m.FilteringPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteringPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteringPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3BucketParamsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3BucketParamsProto) UnmarshalBinary(b []byte) error { - var res S3BucketParamsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_entity_info.go b/v1/models/s3_entity_info.go deleted file mode 100644 index 67e7fa11..00000000 --- a/v1/models/s3_entity_info.go +++ /dev/null @@ -1,117 +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" -) - -// S3EntityInfo AWS S3 entity Info. -// -// Specifies S3 specific information about an S3 Entity. -// -// swagger:model S3EntityInfo -type S3EntityInfo struct { - - // Specifies the creation time of the entity. - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - // Specifies the Versioning state of S3 bucket. - // Specifies the versioning state of S3 bucket. - // 'kUnversioned' implies versioning is not enabled. - // 'kEnabled' implies versioning is enabled. - // 'kSuspended' versioning is suspended. - // Enum: ["kUnversioned","kEnabled","kSuspended"] - Versioning *string `json:"versioning,omitempty"` -} - -// Validate validates this s3 entity info -func (m *S3EntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVersioning(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var s3EntityInfoTypeVersioningPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnversioned","kEnabled","kSuspended"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - s3EntityInfoTypeVersioningPropEnum = append(s3EntityInfoTypeVersioningPropEnum, v) - } -} - -const ( - - // S3EntityInfoVersioningKUnversioned captures enum value "kUnversioned" - S3EntityInfoVersioningKUnversioned string = "kUnversioned" - - // S3EntityInfoVersioningKEnabled captures enum value "kEnabled" - S3EntityInfoVersioningKEnabled string = "kEnabled" - - // S3EntityInfoVersioningKSuspended captures enum value "kSuspended" - S3EntityInfoVersioningKSuspended string = "kSuspended" -) - -// prop value enum -func (m *S3EntityInfo) validateVersioningEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, s3EntityInfoTypeVersioningPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *S3EntityInfo) validateVersioning(formats strfmt.Registry) error { - if swag.IsZero(m.Versioning) { // not required - return nil - } - - // value enum - if err := m.validateVersioningEnum("versioning", "body", *m.Versioning); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 entity info based on context it is used -func (m *S3EntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3EntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3EntityInfo) UnmarshalBinary(b []byte) error { - var res S3EntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_view_backup_properties.go b/v1/models/s3_view_backup_properties.go deleted file mode 100644 index 25daef1d..00000000 --- a/v1/models/s3_view_backup_properties.go +++ /dev/null @@ -1,127 +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" -) - -// S3ViewBackupProperties s3 view backup properties -// -// swagger:model S3ViewBackupProperties -type S3ViewBackupProperties struct { - - // Access key for the buckets which will be created for the source initiated - // jobs. This needs to be passed to Netapp for it to for doing all s3 - // communications. - AccessKey *string `json:"accessKey,omitempty"` - - // For source initiated backup the target is s3 view. This captures the - // configuration needed to create the s3 view. - S3Config *S3BucketConfigProto `json:"s3Config,omitempty"` - - // Secret key for the buckets will be created for the source initiated jobs. - // This secret key needed to be sent to Netapp for writing data to our S3 - // views. - SecretKey *string `json:"secretKey,omitempty"` - - // The snapshot prefix which is needed at the time of incremental for - // backups. This is only needed for case of DP volume. - SnapshotPrefixName *string `json:"snapshotPrefixName,omitempty"` - - // The id of the S3 view. - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this s3 view backup properties -func (m *S3ViewBackupProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateS3Config(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3ViewBackupProperties) validateS3Config(formats strfmt.Registry) error { - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if m.S3Config != nil { - if err := m.S3Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -// ContextValidate validate this s3 view backup properties based on the context it is used -func (m *S3ViewBackupProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateS3Config(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3ViewBackupProperties) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Config != nil { - - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if err := m.S3Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3ViewBackupProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3ViewBackupProperties) UnmarshalBinary(b []byte) error { - var res S3ViewBackupProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_a_n_backup_params.go b/v1/models/s_a_n_backup_params.go deleted file mode 100644 index 696304cb..00000000 --- a/v1/models/s_a_n_backup_params.go +++ /dev/null @@ -1,132 +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" -) - -// SANBackupParams This message contains additional params for SAN backup job. -// -// swagger:model SANBackupParams -type SANBackupParams struct { - - // This field indicates whether to perform volume diff query for Nimble - // volume backups sequentially across various protected volumes. - NimbleSequentialVolDiffQuery *bool `json:"nimbleSequentialVolDiffQuery,omitempty"` - - // This field stores the intent to persist changed areas info during the - // backup task. - PreserveChangedAreasEnabled *bool `json:"preserveChangedAreasEnabled,omitempty"` - - // This field indicates whether to perform volume diff query for Pure volume - // backups sequentially across various protected volumes. - PureSequentialVolDiffQuery *bool `json:"pureSequentialVolDiffQuery,omitempty"` - - // Other external resources which may be needed for san backup workflow. - SanExternalResource *SanExternalResource `json:"sanExternalResource,omitempty"` - - // Time to retain primary SAN snapshot if needed. Currently IBM Flashsystem - // env is using this field to set safeguarded snapshot retention time. - SnapshotRetentionTimeUsecs *int64 `json:"snapshotRetentionTimeUsecs,omitempty"` - - // This field indicates tranport mode for the backup. - TransportMode *int32 `json:"transportMode,omitempty"` - - // This field indicates whether to create snapshot with some additional array - // sepcific security. Currently this field is used for only IBM FlashSystem. - UseSecuredSnapshot *bool `json:"useSecuredSnapshot,omitempty"` -} - -// Validate validates this s a n backup params -func (m *SANBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSanExternalResource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANBackupParams) validateSanExternalResource(formats strfmt.Registry) error { - if swag.IsZero(m.SanExternalResource) { // not required - return nil - } - - if m.SanExternalResource != nil { - if err := m.SanExternalResource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanExternalResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanExternalResource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this s a n backup params based on the context it is used -func (m *SANBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSanExternalResource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANBackupParams) contextValidateSanExternalResource(ctx context.Context, formats strfmt.Registry) error { - - if m.SanExternalResource != nil { - - if swag.IsZero(m.SanExternalResource) { // not required - return nil - } - - if err := m.SanExternalResource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanExternalResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanExternalResource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SANBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SANBackupParams) UnmarshalBinary(b []byte) error { - var res SANBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_a_n_group_entity_recover_params.go b/v1/models/s_a_n_group_entity_recover_params.go deleted file mode 100644 index 2f276a06..00000000 --- a/v1/models/s_a_n_group_entity_recover_params.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SANGroupEntityRecoverParams This message contains additional params for restoring from a SAN Group -// Backup. -// -// swagger:model SANGroupEntityRecoverParams -type SANGroupEntityRecoverParams struct { - - // Information about all the volumes in a group recover task. - VolumeRecoverParamsVec []*SANGroupEntityRecoverParamsSANVolumeRecoverParams `json:"volumeRecoverParamsVec"` -} - -// Validate validates this s a n group entity recover params -func (m *SANGroupEntityRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeRecoverParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANGroupEntityRecoverParams) validateVolumeRecoverParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeRecoverParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeRecoverParamsVec); i++ { - if swag.IsZero(m.VolumeRecoverParamsVec[i]) { // not required - continue - } - - if m.VolumeRecoverParamsVec[i] != nil { - if err := m.VolumeRecoverParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeRecoverParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeRecoverParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this s a n group entity recover params based on the context it is used -func (m *SANGroupEntityRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeRecoverParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANGroupEntityRecoverParams) contextValidateVolumeRecoverParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeRecoverParamsVec); i++ { - - if m.VolumeRecoverParamsVec[i] != nil { - - if swag.IsZero(m.VolumeRecoverParamsVec[i]) { // not required - return nil - } - - if err := m.VolumeRecoverParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeRecoverParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeRecoverParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SANGroupEntityRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SANGroupEntityRecoverParams) UnmarshalBinary(b []byte) error { - var res SANGroupEntityRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_a_n_group_entity_recover_params_s_a_n_volume_recover_params.go b/v1/models/s_a_n_group_entity_recover_params_s_a_n_volume_recover_params.go deleted file mode 100644 index fed03eef..00000000 --- a/v1/models/s_a_n_group_entity_recover_params_s_a_n_volume_recover_params.go +++ /dev/null @@ -1,109 +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" -) - -// SANGroupEntityRecoverParamsSANVolumeRecoverParams Proto to define related information about a volume inside this group. -// -// swagger:model SANGroupEntityRecoverParams_SANVolumeRecoverParams -type SANGroupEntityRecoverParamsSANVolumeRecoverParams struct { - - // Entity proto of a volume. - VolumeEntity *EntityProto `json:"volumeEntity,omitempty"` -} - -// Validate validates this s a n group entity recover params s a n volume recover params -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) validateVolumeEntity(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeEntity) { // not required - return nil - } - - if m.VolumeEntity != nil { - if err := m.VolumeEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this s a n group entity recover params s a n volume recover params based on the context it is used -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) contextValidateVolumeEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeEntity != nil { - - if swag.IsZero(m.VolumeEntity) { // not required - return nil - } - - if err := m.VolumeEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SANGroupEntityRecoverParamsSANVolumeRecoverParams) UnmarshalBinary(b []byte) error { - var res SANGroupEntityRecoverParamsSANVolumeRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_a_n_recover_params.go b/v1/models/s_a_n_recover_params.go deleted file mode 100644 index 0be7f758..00000000 --- a/v1/models/s_a_n_recover_params.go +++ /dev/null @@ -1,160 +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" -) - -// SANRecoverParams This message contains additional params for SAN recovery task. -// -// swagger:model SANRecoverParams -type SANRecoverParams struct { - - // Field to contain volumes entity information for a SAN protection group. - SanGroupRecoverParams *SANGroupEntityRecoverParams `json:"sanGroupRecoverParams,omitempty"` - - // san storage array snap params - SanStorageArraySnapParams *SANStorageArraySnapshotRecoverParams `json:"sanStorageArraySnapParams,omitempty"` -} - -// Validate validates this s a n recover params -func (m *SANRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSanGroupRecoverParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanStorageArraySnapParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANRecoverParams) validateSanGroupRecoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.SanGroupRecoverParams) { // not required - return nil - } - - if m.SanGroupRecoverParams != nil { - if err := m.SanGroupRecoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanGroupRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanGroupRecoverParams") - } - return err - } - } - - return nil -} - -func (m *SANRecoverParams) validateSanStorageArraySnapParams(formats strfmt.Registry) error { - if swag.IsZero(m.SanStorageArraySnapParams) { // not required - return nil - } - - if m.SanStorageArraySnapParams != nil { - if err := m.SanStorageArraySnapParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanStorageArraySnapParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanStorageArraySnapParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this s a n recover params based on the context it is used -func (m *SANRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSanGroupRecoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSanStorageArraySnapParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SANRecoverParams) contextValidateSanGroupRecoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SanGroupRecoverParams != nil { - - if swag.IsZero(m.SanGroupRecoverParams) { // not required - return nil - } - - if err := m.SanGroupRecoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanGroupRecoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanGroupRecoverParams") - } - return err - } - } - - return nil -} - -func (m *SANRecoverParams) contextValidateSanStorageArraySnapParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SanStorageArraySnapParams != nil { - - if swag.IsZero(m.SanStorageArraySnapParams) { // not required - return nil - } - - if err := m.SanStorageArraySnapParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sanStorageArraySnapParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sanStorageArraySnapParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SANRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SANRecoverParams) UnmarshalBinary(b []byte) error { - var res SANRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_a_n_storage_array_snapshot_recover_params.go b/v1/models/s_a_n_storage_array_snapshot_recover_params.go deleted file mode 100644 index 7032f008..00000000 --- a/v1/models/s_a_n_storage_array_snapshot_recover_params.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" -) - -// SANStorageArraySnapshotRecoverParams This message contains information about SAN storage arrays snapshot recovery -// -// swagger:model SANStorageArraySnapshotRecoverParams -type SANStorageArraySnapshotRecoverParams struct { - - // storage array snapshot Id - StorageArraySnapshotID *string `json:"storageArraySnapshotId,omitempty"` - - // storage array snapshot name - StorageArraySnapshotName *string `json:"storageArraySnapshotName,omitempty"` -} - -// Validate validates this s a n storage array snapshot recover params -func (m *SANStorageArraySnapshotRecoverParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s a n storage array snapshot recover params based on context it is used -func (m *SANStorageArraySnapshotRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SANStorageArraySnapshotRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SANStorageArraySnapshotRecoverParams) UnmarshalBinary(b []byte) error { - var res SANStorageArraySnapshotRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s_s_l_verification.go b/v1/models/s_s_l_verification.go deleted file mode 100644 index 60133464..00000000 --- a/v1/models/s_s_l_verification.go +++ /dev/null @@ -1,56 +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" -) - -// SSLVerification Contains information regarding SSL verification -// -// swagger:model SSLVerification -type SSLVerification struct { - - // Contains the contents of CA cert/cert chain. - CaCertificate *string `json:"caCertificate,omitempty"` - - // Whether SSL verification is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Optionally contains the server sha256 key. - ServerSha256Key []uint8 `json:"serverSha256Key"` -} - -// Validate validates this s s l verification -func (m *SSLVerification) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s s l verification based on context it is used -func (m *SSLVerification) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SSLVerification) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SSLVerification) UnmarshalBinary(b []byte) error { - var res SSLVerification - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/salesforce_account_info.go b/v1/models/salesforce_account_info.go deleted file mode 100644 index 731c2a62..00000000 --- a/v1/models/salesforce_account_info.go +++ /dev/null @@ -1,79 +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" -) - -// SalesforceAccountInfo Salesforce Account Information. -// -// Salesforce Account Information of a Helios user. -// -// swagger:model SalesforceAccountInfo -type SalesforceAccountInfo struct { - - // Specifies the Account Id assigned by Salesforce. - AccountID *string `json:"accountId,omitempty"` - - // Specifies the status of helios access. - HeliosAccessGrantStatus *string `json:"heliosAccessGrantStatus,omitempty"` - - // Specifies whether user is a DGaaS licensed user. - IsDGaaSUser *bool `json:"isDGaaSUser,omitempty"` - - // Specifies whether user is a DMaaS licensed user. - IsDMaaSUser *bool `json:"isDMaaSUser,omitempty"` - - // Specifies whether user is a DRaaS licensed user. - IsDRaaSUser *bool `json:"isDRaaSUser,omitempty"` - - // Specifies whether user is a Data Insights aka gaia licensed user. - IsGaiaUser *bool `json:"isGaiaUser,omitempty"` - - // Specifies whether user is a RPaaS licensed user. - IsRPaaSUser *bool `json:"isRPaaSUser,omitempty"` - - // Specifies whether user is a Sales person from Cohesity. - IsSalesUser *bool `json:"isSalesUser,omitempty"` - - // Specifies whether user is a support person from Cohesity. - IsSupportUser *bool `json:"isSupportUser,omitempty"` - - // Specifies the User Id assigned by Salesforce. - UserID *string `json:"userId,omitempty"` -} - -// Validate validates this salesforce account info -func (m *SalesforceAccountInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this salesforce account info based on context it is used -func (m *SalesforceAccountInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SalesforceAccountInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SalesforceAccountInfo) UnmarshalBinary(b []byte) error { - var res SalesforceAccountInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/same_config_ir_recovery_options.go b/v1/models/same_config_ir_recovery_options.go deleted file mode 100644 index 57a298e2..00000000 --- a/v1/models/same_config_ir_recovery_options.go +++ /dev/null @@ -1,61 +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" -) - -// SameConfigIrRecoveryOptions Information for Oracle Same Config Instant Recovery of a database. -// -// swagger:model SameConfigIrRecoveryOptions -type SameConfigIrRecoveryOptions struct { - - // Whether to cleanup existing database files. - // If false, the adapter will perform prechecks to ensure that the customer - // deleted these files. - CleanupOriginalDbFiles *bool `json:"cleanupOriginalDbFiles,omitempty"` - - // Whether this is a DR recovery to the production configuration. - IsSameConfigIrRecovery *bool `json:"isSameConfigIrRecovery,omitempty"` - - // Whether to rename the database ASM directory. - // If false, the adapter will leave the database files and continue with - // clone and migration of datafiles. This might cause extra files left - // behind on the Oracle host from the existing database instance. - RenameDatabaseAsmDirectory *bool `json:"renameDatabaseAsmDirectory,omitempty"` -} - -// Validate validates this same config ir recovery options -func (m *SameConfigIrRecoveryOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this same config ir recovery options based on context it is used -func (m *SameConfigIrRecoveryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SameConfigIrRecoveryOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SameConfigIrRecoveryOptions) UnmarshalBinary(b []byte) error { - var res SameConfigIrRecoveryOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sample.go b/v1/models/sample.go deleted file mode 100644 index 15977fa1..00000000 --- a/v1/models/sample.go +++ /dev/null @@ -1,60 +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" -) - -// Sample Sample. -// -// Specifies a sample of data collected at a timestamp. -// -// swagger:model Sample -type Sample struct { - - // Specifies the value of the data sample if the type is float64. - // This field is nil if the type of the data is not a float value. - FloatValue *float64 `json:"floatValue,omitempty"` - - // Specifies the timestamp when the data sample occured. - TimestampMsecs *int64 `json:"timestampMsecs,omitempty"` - - // Specifies the value of the data sample if the type is int64. - // This field is nil if the type of the data is not an int value. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this sample -func (m *Sample) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sample based on context it is used -func (m *Sample) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Sample) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Sample) UnmarshalBinary(b []byte) error { - var res Sample - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_backup_job_params.go b/v1/models/san_backup_job_params.go deleted file mode 100644 index 0dafbbbd..00000000 --- a/v1/models/san_backup_job_params.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" -) - -// SanBackupJobParams SAN Backup Job Parameters. -// -// Message to capture any additional backup params for SAN environment. -// -// swagger:model SanBackupJobParams -type SanBackupJobParams struct { - - // Whether backup should continue use secured snapshot. For example IBM - // FlashSystem SAN env uses this param to create safeguarded snapshot. - UseSecuredSnapshot *bool `json:"useSecuredSnapshot,omitempty"` -} - -// Validate validates this san backup job params -func (m *SanBackupJobParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this san backup job params based on context it is used -func (m *SanBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SanBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanBackupJobParams) UnmarshalBinary(b []byte) error { - var res SanBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_env_job_parameters.go b/v1/models/san_env_job_parameters.go deleted file mode 100644 index 3cdb9277..00000000 --- a/v1/models/san_env_job_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// SanEnvJobParameters SAN Environment Job Parameters. -// -// Specifies job parameters applicable for all SAN Environment types -// Protection Sources in a Protection Job. -// -// swagger:model SanEnvJobParameters -type SanEnvJobParameters struct { - - // Specifies how many recent snapshots of each backed up entity to retain on - // the primary environment. If not specified, then snapshots will not be - // be deleted from the primary environment. - MaxSnapshotsOnPrimary *int64 `json:"maxSnapshotsOnPrimary,omitempty"` -} - -// Validate validates this san env job parameters -func (m *SanEnvJobParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this san env job parameters based on context it is used -func (m *SanEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SanEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanEnvJobParameters) UnmarshalBinary(b []byte) error { - var res SanEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_external_resource.go b/v1/models/san_external_resource.go deleted file mode 100644 index d02a0f44..00000000 --- a/v1/models/san_external_resource.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SanExternalResource This message contains external resources which may be needed for SAN backup. -// -// swagger:model SanExternalResource -type SanExternalResource struct { - - // List of availability groups to which volumes belong. - AvailabilityGroupEntityVec []*PrivateEntityProto `json:"availabilityGroupEntityVec"` -} - -// Validate validates this san external resource -func (m *SanExternalResource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAvailabilityGroupEntityVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SanExternalResource) validateAvailabilityGroupEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityGroupEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.AvailabilityGroupEntityVec); i++ { - if swag.IsZero(m.AvailabilityGroupEntityVec[i]) { // not required - continue - } - - if m.AvailabilityGroupEntityVec[i] != nil { - if err := m.AvailabilityGroupEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityGroupEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityGroupEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this san external resource based on the context it is used -func (m *SanExternalResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAvailabilityGroupEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SanExternalResource) contextValidateAvailabilityGroupEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AvailabilityGroupEntityVec); i++ { - - if m.AvailabilityGroupEntityVec[i] != nil { - - if swag.IsZero(m.AvailabilityGroupEntityVec[i]) { // not required - return nil - } - - if err := m.AvailabilityGroupEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityGroupEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityGroupEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SanExternalResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanExternalResource) UnmarshalBinary(b []byte) error { - var res SanExternalResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_port.go b/v1/models/san_port.go deleted file mode 100644 index f2d19f34..00000000 --- a/v1/models/san_port.go +++ /dev/null @@ -1,69 +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" -) - -// SanPort A message to encapsulate a port on a SAN device. -// -// This proto captures both iSCSI and FC ports information. -// -// swagger:model SanPort -type SanPort struct { - - // The flag that determines whether group target name is enabled or not. - GroupTargetEnabled *bool `json:"groupTargetEnabled,omitempty"` - - // The IP address of the SAN port. - IPAddr *string `json:"ipAddr,omitempty"` - - // The IQN of the SAN port (Set). - Iqn *string `json:"iqn,omitempty"` - - // The IP port of the SAN port. - Port *int32 `json:"port,omitempty"` - - // Tag to filter ports. This can be used to include additional information - // about port which is source specific. E.g. In case of IBM FlashSystem - // this is used to include high availability group information. - Tag *string `json:"tag,omitempty"` - - // The world wide number (WWN) for the FC port in hex representation. - Wwn *string `json:"wwn,omitempty"` -} - -// Validate validates this san port -func (m *SanPort) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this san port based on context it is used -func (m *SanPort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SanPort) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanPort) UnmarshalBinary(b []byte) error { - var res SanPort - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_storage_array.go b/v1/models/san_storage_array.go deleted file mode 100644 index 841de21d..00000000 --- a/v1/models/san_storage_array.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SanStorageArray SAN Storage Array. -// -// Specifies a SAN Storage Array. -// -// swagger:model SanStorageArray -type SanStorageArray struct { - - // Specifies a unique id of a SAN Storage Array. - // The id is unique across Cohesity Clusters. - ID *string `json:"id,omitempty"` - - // Specifies the SAN ports of the SAN Storage Array. - Ports []*IscsiSanPort `json:"ports"` - - // Specifies the revision of the SAN Storage Array. - Revision *string `json:"revision,omitempty"` - - // Specifies the version of the SAN Storage Array. - Version *string `json:"version,omitempty"` -} - -// Validate validates this san storage array -func (m *SanStorageArray) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePorts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SanStorageArray) validatePorts(formats strfmt.Registry) error { - if swag.IsZero(m.Ports) { // not required - return nil - } - - for i := 0; i < len(m.Ports); i++ { - if swag.IsZero(m.Ports[i]) { // not required - continue - } - - if m.Ports[i] != nil { - if err := m.Ports[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this san storage array based on the context it is used -func (m *SanStorageArray) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePorts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SanStorageArray) contextValidatePorts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ports); i++ { - - if m.Ports[i] != nil { - - if swag.IsZero(m.Ports[i]) { // not required - return nil - } - - if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SanStorageArray) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanStorageArray) UnmarshalBinary(b []byte) error { - var res SanStorageArray - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/san_volume.go b/v1/models/san_volume.go deleted file mode 100644 index b5f144ba..00000000 --- a/v1/models/san_volume.go +++ /dev/null @@ -1,65 +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" -) - -// SanVolume SAN Volume. -// -// Specifies a SAN Volume in a SAN Storage Array. -// -// swagger:model SanVolume -type SanVolume struct { - - // Specifies the created time (e.g., "2015-07-21T17:59:41Z") of the volume. - CreatedTime *string `json:"createdTime,omitempty"` - - // Specifies the name of the source volume, if this volume was - // copied or cloned from it. - ParentVolume *string `json:"parentVolume,omitempty"` - - // Specifies the serial number of the volume. - SerialNumber *string `json:"serialNumber,omitempty"` - - // Specifies the provisioned size in bytes of the volume. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the total space actually used by the volume. - UsedBytes *int64 `json:"usedBytes,omitempty"` -} - -// Validate validates this san volume -func (m *SanVolume) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this san volume based on context it is used -func (m *SanVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SanVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SanVolume) UnmarshalBinary(b []byte) error { - var res SanVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/schedule_proto.go b/v1/models/schedule_proto.go deleted file mode 100644 index 1c510f2c..00000000 --- a/v1/models/schedule_proto.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ScheduleProto schedule proto -// -// swagger:model ScheduleProto -type ScheduleProto struct { - - // Specifies the time range within the days of the week. This field is - // non-empty iff type == kPeriodicTimeWindows. - PeriodicTimeWindows []*TimeWindow `json:"periodicTimeWindows"` - - // Specifies the time ranges in usecs. This field is non-empty iff - // type == kCustomIntervals. - TimeRanges []*TimeRangeUsecs `json:"timeRanges"` - - // Timezone of the user of this ScheduleProto. The timezones have unique - // names of the form "Area/Location". - Timezone *string `json:"timezone,omitempty"` - - // Specifies the type of schedule for this ScheduleProto. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this schedule proto -func (m *ScheduleProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePeriodicTimeWindows(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScheduleProto) validatePeriodicTimeWindows(formats strfmt.Registry) error { - if swag.IsZero(m.PeriodicTimeWindows) { // not required - return nil - } - - for i := 0; i < len(m.PeriodicTimeWindows); i++ { - if swag.IsZero(m.PeriodicTimeWindows[i]) { // not required - continue - } - - if m.PeriodicTimeWindows[i] != nil { - if err := m.PeriodicTimeWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ScheduleProto) validateTimeRanges(formats strfmt.Registry) error { - if swag.IsZero(m.TimeRanges) { // not required - return nil - } - - for i := 0; i < len(m.TimeRanges); i++ { - if swag.IsZero(m.TimeRanges[i]) { // not required - continue - } - - if m.TimeRanges[i] != nil { - if err := m.TimeRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this schedule proto based on the context it is used -func (m *ScheduleProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePeriodicTimeWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScheduleProto) contextValidatePeriodicTimeWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PeriodicTimeWindows); i++ { - - if m.PeriodicTimeWindows[i] != nil { - - if swag.IsZero(m.PeriodicTimeWindows[i]) { // not required - return nil - } - - if err := m.PeriodicTimeWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ScheduleProto) contextValidateTimeRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeRanges); i++ { - - if m.TimeRanges[i] != nil { - - if swag.IsZero(m.TimeRanges[i]) { // not required - return nil - } - - if err := m.TimeRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ScheduleProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScheduleProto) UnmarshalBinary(b []byte) error { - var res ScheduleProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto.go b/v1/models/scheduler_proto.go deleted file mode 100644 index 55b06945..00000000 --- a/v1/models/scheduler_proto.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulerProto Scheduler Proto. -// -// Specifies the scheduler structure which holds the various schedule jobs. -// -// swagger:model SchedulerProto -type SchedulerProto struct { - - // The array of the various scheduler jobs. - SchedulerJobs []*SchedulerProtoSchedulerJob `json:"schedulerJobs"` -} - -// Validate validates this scheduler proto -func (m *SchedulerProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedulerJobs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProto) validateSchedulerJobs(formats strfmt.Registry) error { - if swag.IsZero(m.SchedulerJobs) { // not required - return nil - } - - for i := 0; i < len(m.SchedulerJobs); i++ { - if swag.IsZero(m.SchedulerJobs[i]) { // not required - continue - } - - if m.SchedulerJobs[i] != nil { - if err := m.SchedulerJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulerJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulerJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this scheduler proto based on the context it is used -func (m *SchedulerProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedulerJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProto) contextValidateSchedulerJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchedulerJobs); i++ { - - if m.SchedulerJobs[i] != nil { - - if swag.IsZero(m.SchedulerJobs[i]) { // not required - return nil - } - - if err := m.SchedulerJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulerJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulerJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProto) UnmarshalBinary(b []byte) error { - var res SchedulerProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job.go b/v1/models/scheduler_proto_scheduler_job.go deleted file mode 100644 index 9edc35eb..00000000 --- a/v1/models/scheduler_proto_scheduler_job.go +++ /dev/null @@ -1,236 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SchedulerProtoSchedulerJob Scheduler Job. -// -// Specifies the structure of the scheduler job along with its attributes. -// -// swagger:model SchedulerProto_SchedulerJob -type SchedulerProtoSchedulerJob struct { - - // The boolean which specifies if this job is to be scheduled or not. - EnableRecurringEmail *bool `json:"enableRecurringEmail,omitempty"` - - // The unique id for the scheduled job assigned by the cluster. - ID *int64 `json:"id,omitempty"` - - // The name of the scheduled job given by the user. - Name *string `json:"name,omitempty"` - - // schedule job parameters - ScheduleJobParameters *SchedulerProtoSchedulerJobScheduleJobParameters `json:"scheduleJobParameters,omitempty"` - - // The frequency of schedule execution. - Schedules []*SchedulerProtoSchedulerJobSchedule `json:"schedules"` - - // Specifies id of tenant who created the scheduler job. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the type of the job. - // The enum which defines the Job type of the job. - // Enum: ["kSchedulerJobReport"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this scheduler proto scheduler job -func (m *SchedulerProtoSchedulerJob) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScheduleJobParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedules(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJob) validateScheduleJobParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduleJobParameters) { // not required - return nil - } - - if m.ScheduleJobParameters != nil { - if err := m.ScheduleJobParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scheduleJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scheduleJobParameters") - } - return err - } - } - - return nil -} - -func (m *SchedulerProtoSchedulerJob) validateSchedules(formats strfmt.Registry) error { - if swag.IsZero(m.Schedules) { // not required - return nil - } - - for i := 0; i < len(m.Schedules); i++ { - if swag.IsZero(m.Schedules[i]) { // not required - continue - } - - if m.Schedules[i] != nil { - if err := m.Schedules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var schedulerProtoSchedulerJobTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSchedulerJobReport"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - schedulerProtoSchedulerJobTypeTypePropEnum = append(schedulerProtoSchedulerJobTypeTypePropEnum, v) - } -} - -const ( - - // SchedulerProtoSchedulerJobTypeKSchedulerJobReport captures enum value "kSchedulerJobReport" - SchedulerProtoSchedulerJobTypeKSchedulerJobReport string = "kSchedulerJobReport" -) - -// prop value enum -func (m *SchedulerProtoSchedulerJob) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, schedulerProtoSchedulerJobTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SchedulerProtoSchedulerJob) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this scheduler proto scheduler job based on the context it is used -func (m *SchedulerProtoSchedulerJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScheduleJobParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchedules(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJob) contextValidateScheduleJobParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ScheduleJobParameters != nil { - - if swag.IsZero(m.ScheduleJobParameters) { // not required - return nil - } - - if err := m.ScheduleJobParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scheduleJobParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scheduleJobParameters") - } - return err - } - } - - return nil -} - -func (m *SchedulerProtoSchedulerJob) contextValidateSchedules(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Schedules); i++ { - - if m.Schedules[i] != nil { - - if swag.IsZero(m.Schedules[i]) { // not required - return nil - } - - if err := m.Schedules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJob) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJob) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJob - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job_schedule.go b/v1/models/scheduler_proto_scheduler_job_schedule.go deleted file mode 100644 index a5fc4056..00000000 --- a/v1/models/scheduler_proto_scheduler_job_schedule.go +++ /dev/null @@ -1,58 +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" -) - -// SchedulerProtoSchedulerJobSchedule Schedule. -// -// A message which specifies the schedule of execution of the job. -// -// swagger:model SchedulerProto_SchedulerJob_Schedule -type SchedulerProtoSchedulerJobSchedule struct { - - // The day of the week when schedule should be executed (0-6). - Day *int32 `json:"day,omitempty"` - - // The hour of the day when schedule should be executed (0-23). - Hour *int32 `json:"hour,omitempty"` - - // The timezone for the execution of the schedule. - Timezone *string `json:"timezone,omitempty"` -} - -// Validate validates this scheduler proto scheduler job schedule -func (m *SchedulerProtoSchedulerJobSchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduler proto scheduler job schedule based on context it is used -func (m *SchedulerProtoSchedulerJobSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobSchedule) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJobSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters.go b/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters.go deleted file mode 100644 index 4bbd1878..00000000 --- a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters.go +++ /dev/null @@ -1,109 +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" -) - -// SchedulerProtoSchedulerJobScheduleJobParameters Specifies the Scheduled Job parameters. -// -// swagger:model SchedulerProto_SchedulerJob_ScheduleJobParameters -type SchedulerProtoSchedulerJobScheduleJobParameters struct { - - // report job parameter - ReportJobParameter *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter `json:"reportJobParameter,omitempty"` -} - -// Validate validates this scheduler proto scheduler job schedule job parameters -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReportJobParameter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) validateReportJobParameter(formats strfmt.Registry) error { - if swag.IsZero(m.ReportJobParameter) { // not required - return nil - } - - if m.ReportJobParameter != nil { - if err := m.ReportJobParameter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reportJobParameter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reportJobParameter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this scheduler proto scheduler job schedule job parameters based on the context it is used -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReportJobParameter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) contextValidateReportJobParameter(ctx context.Context, formats strfmt.Registry) error { - - if m.ReportJobParameter != nil { - - if swag.IsZero(m.ReportJobParameter) { // not required - return nil - } - - if err := m.ReportJobParameter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reportJobParameter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reportJobParameter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParameters) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJobScheduleJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter.go b/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter.go deleted file mode 100644 index 82f9cdba..00000000 --- a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter Specifies the Report Job Parameters structure. -// -// swagger:model SchedulerProto_SchedulerJob_ScheduleJobParameters_ReportJobParameter -type SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter struct { - - // Specifies the list of receiver email addresses. - ReceiverEmails []string `json:"receiverEmails"` - - // The list of reports to be sent in the mail. - Reports []*SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport `json:"reports"` -} - -// Validate validates this scheduler proto scheduler job schedule job parameters report job parameter -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReports(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) validateReports(formats strfmt.Registry) error { - if swag.IsZero(m.Reports) { // not required - return nil - } - - for i := 0; i < len(m.Reports); i++ { - if swag.IsZero(m.Reports[i]) { // not required - continue - } - - if m.Reports[i] != nil { - if err := m.Reports[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this scheduler proto scheduler job schedule job parameters report job parameter based on the context it is used -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReports(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) contextValidateReports(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Reports); i++ { - - if m.Reports[i] != nil { - - if swag.IsZero(m.Reports[i]) { // not required - return nil - } - - if err := m.Reports[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report.go b/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report.go deleted file mode 100644 index 0be2b6d3..00000000 --- a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report.go +++ /dev/null @@ -1,121 +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" -) - -// SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport Specifies the type and parameters of a report. -// -// swagger:model SchedulerProto_SchedulerJob_ScheduleJobParameters_ReportJobParameter_Report -type SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport struct { - - // Specifies the report name. - Name *string `json:"name,omitempty"` - - // Specifies the output format of the report. - OutputFormat *string `json:"outputFormat,omitempty"` - - // parameters - Parameters *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters `json:"parameters,omitempty"` - - // Specifies the subject line for report. - SubjectLine *string `json:"subjectLine,omitempty"` - - // Specifies the report type. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this scheduler proto scheduler job schedule job parameters report job parameter report -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required - return nil - } - - if m.Parameters != nil { - if err := m.Parameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this scheduler proto scheduler job schedule job parameters report job parameter report based on the context it is used -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.Parameters != nil { - - if swag.IsZero(m.Parameters) { // not required - return nil - } - - if err := m.Parameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReport - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report_parameters.go b/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report_parameters.go deleted file mode 100644 index 53dac2fb..00000000 --- a/v1/models/scheduler_proto_scheduler_job_schedule_job_parameters_report_job_parameter_report_parameters.go +++ /dev/null @@ -1,131 +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" -) - -// SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters Specifies the report parameters. -// -// swagger:model SchedulerProto_SchedulerJob_ScheduleJobParameters_ReportJobParameter_Report_Parameters -type SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters struct { - - // Specifies if subtenants of the given tenants should be - // considered for report generation. - AllUnderHierarchy *bool `json:"allUnderHierarchy,omitempty"` - - // Specifies the Cohesity Agent software version. - CompactVersion *string `json:"compactVersion,omitempty"` - - // Specifies the number of consecutive failures. - ConsecutiveFailures *int32 `json:"consecutiveFailures,omitempty"` - - // Specifies the Environment for the entity being protected. - Environment *string `json:"environment,omitempty"` - - // User Quotas: Only the list of users who has - // exceeded the alert threshold will be returned. - ExcludeUsersWithinAlertThreshold *bool `json:"excludeUsersWithinAlertThreshold,omitempty"` - - // Specifies if the report should be grouped by any field. - GroupBy *int32 `json:"groupBy,omitempty"` - - // Specifies the Cohesity Agent health status. - HealthStatus []string `json:"healthStatus"` - - // Specifies the OS type on which Cohesity Agent is installed. - HostOsType []string `json:"hostOsType"` - - // Specifies the id of the job for which to get the report data. - JobID *int64 `json:"jobId,omitempty"` - - // Specifies the name of the job for which to get the report data. - JobName *string `json:"jobName,omitempty"` - - // Specifies the number of days from current date for which the - // report data is to be fetched. - LastNDays *int32 `json:"lastNDays,omitempty"` - - // Specifies the object ids for which to get the report data. - ObjectIds []int64 `json:"objectIds"` - - // Specifies the object type for which to get the report data. - ObjectType *string `json:"objectType,omitempty"` - - // Specifies the registered source for which - // to get the report data. - RegisteredSourceID *int64 `json:"registeredSourceId,omitempty"` - - // Specifies the registered sources for which - // to get the report data. - RegisteredSourceIds []int64 `json:"registeredSourceIds"` - - // Specifies the rollup(day/week/month) for protected object trends - // report. - Rollup *string `json:"rollup,omitempty"` - - // Specifies the run status for which to get the report data. - RunStatus []string `json:"runStatus"` - - // Specifies the sid of the user. - Sid *string `json:"sid,omitempty"` - - // Specifies tenant ids for which report needs to be generated. - TenantIDVec []string `json:"tenantIdVec"` - - // Specifies the timezone. - Timezone *string `json:"timezone,omitempty"` - - // Specifies the unix uid of the user. - UnixUID *uint32 `json:"unixUid,omitempty"` - - // Specifies the vault ids for which to get the report data. - VaultIds []int64 `json:"vaultIds"` - - // Specifies the view box for which to get the report data. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the view name for which the report is required. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the viewbox ids to filter by. - ViewboxIds []int64 `json:"viewboxIds"` - - // Specifies the VM name for which to get the report data. - VMName *string `json:"vmName,omitempty"` -} - -// Validate validates this scheduler proto scheduler job schedule job parameters report job parameter report parameters -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduler proto scheduler job schedule job parameters report job parameter report parameters based on context it is used -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters) UnmarshalBinary(b []byte) error { - var res SchedulerProtoSchedulerJobScheduleJobParametersReportJobParameterReportParameters - 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 deleted file mode 100644 index cadfc982..00000000 --- a/v1/models/scheduling_policy.go +++ /dev/null @@ -1,331 +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" -) - -// SchedulingPolicy Scheduling Policy. -// -// Specifies settings that define a backup schedule for a Protection Job. -// -// 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 how often to start new Job Runs of a Protection Job. - // 'kDaily' means new Job Runs start daily. - // 'kMonthly' means new Job Runs start monthly. - // 'kContinuous' means new Job Runs repetitively start at the - // beginning of the specified time interval (in hours or minutes). - // 'kContinuousRPO' means this is an RPO schedule. - // 'kCDP' means this is a continuous data protection policy. - // Enum: ["kContinuous","kDaily","kMonthly","kContinuousRPO","kCDP"] - Periodicity *string `json:"periodicity,omitempty"` - - // rpo schedule - RpoSchedule *SchedulingPolicyRpoSchedule `json:"rpoSchedule,omitempty"` -} - -// Validate validates this scheduling policy -func (m *SchedulingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContinuousSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDailySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthlySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulingPolicy) validateContinuousSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSchedule) { // not required - 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 -} - -func (m *SchedulingPolicy) validateDailySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DailySchedule) { // not required - 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 -} - -func (m *SchedulingPolicy) validateMonthlySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthlySchedule) { // not required - 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 -} - -var schedulingPolicyTypePeriodicityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kContinuous","kDaily","kMonthly","kContinuousRPO","kCDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - schedulingPolicyTypePeriodicityPropEnum = append(schedulingPolicyTypePeriodicityPropEnum, v) - } -} - -const ( - - // SchedulingPolicyPeriodicityKContinuous captures enum value "kContinuous" - SchedulingPolicyPeriodicityKContinuous string = "kContinuous" - - // SchedulingPolicyPeriodicityKDaily captures enum value "kDaily" - SchedulingPolicyPeriodicityKDaily string = "kDaily" - - // SchedulingPolicyPeriodicityKMonthly captures enum value "kMonthly" - SchedulingPolicyPeriodicityKMonthly string = "kMonthly" - - // SchedulingPolicyPeriodicityKContinuousRPO captures enum value "kContinuousRPO" - SchedulingPolicyPeriodicityKContinuousRPO string = "kContinuousRPO" - - // SchedulingPolicyPeriodicityKCDP captures enum value "kCDP" - SchedulingPolicyPeriodicityKCDP string = "kCDP" -) - -// prop value enum -func (m *SchedulingPolicy) validatePeriodicityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, schedulingPolicyTypePeriodicityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SchedulingPolicy) validatePeriodicity(formats strfmt.Registry) error { - if swag.IsZero(m.Periodicity) { // not required - return nil - } - - // value enum - if err := m.validatePeriodicityEnum("periodicity", "body", *m.Periodicity); err != nil { - return err - } - - return nil -} - -func (m *SchedulingPolicy) validateRpoSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.RpoSchedule) { // not required - 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 -} - -// ContextValidate validate this scheduling policy based on the context it is used -func (m *SchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateContinuousSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDailySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthlySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpoSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicy) UnmarshalBinary(b []byte) error { - var res SchedulingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_proto.go b/v1/models/scheduling_policy_proto.go deleted file mode 100644 index a7cd6c26..00000000 --- a/v1/models/scheduling_policy_proto.go +++ /dev/null @@ -1,367 +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" -) - -// SchedulingPolicyProto Message that specifies the scheduling policy for a backup job. -// -// swagger:model SchedulingPolicyProto -type SchedulingPolicyProto struct { - - // Set if periodicity is kContinuous. - ContinuousSchedule *SchedulingPolicyProtoContinuousSchedule `json:"continuousSchedule,omitempty"` - - // Set if periodicity is kDaily. - DailySchedule *SchedulingPolicyProtoDailySchedule `json:"dailySchedule,omitempty"` - - // Set if periodicity is kDate. - DateSchedule *SchedulingPolicyProtoDateSchedule `json:"dateSchedule,omitempty"` - - // Set if periodicity is kMonthly. - MonthlySchedule *SchedulingPolicyProtoMonthlySchedule `json:"monthlySchedule,omitempty"` - - // Determines how often the job should be run. - Periodicity *int32 `json:"periodicity,omitempty"` - - // Set if periodicity is kContinuousRPO. - RpoSchedule *SchedulingPolicyProtoRPOSchedule `json:"rpoSchedule,omitempty"` - - // Set if periodicity is kYearly. - YearlySchedule *SchedulingPolicyProtoYearlySchedule `json:"yearlySchedule,omitempty"` -} - -// Validate validates this scheduling policy proto -func (m *SchedulingPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContinuousSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDailySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthlySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYearlySchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulingPolicyProto) validateContinuousSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSchedule) { // not required - 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 -} - -func (m *SchedulingPolicyProto) validateDailySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DailySchedule) { // not required - 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 -} - -func (m *SchedulingPolicyProto) validateDateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DateSchedule) { // not required - return nil - } - - if m.DateSchedule != nil { - if err := m.DateSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dateSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dateSchedule") - } - return err - } - } - - return nil -} - -func (m *SchedulingPolicyProto) validateMonthlySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthlySchedule) { // not required - 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 -} - -func (m *SchedulingPolicyProto) validateRpoSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.RpoSchedule) { // not required - 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 -} - -func (m *SchedulingPolicyProto) validateYearlySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.YearlySchedule) { // not required - return nil - } - - if m.YearlySchedule != nil { - if err := m.YearlySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearlySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearlySchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this scheduling policy proto based on the context it is used -func (m *SchedulingPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateContinuousSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDailySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthlySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpoSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateYearlySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulingPolicyProto) 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 *SchedulingPolicyProto) 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 *SchedulingPolicyProto) contextValidateDateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DateSchedule != nil { - - if swag.IsZero(m.DateSchedule) { // not required - return nil - } - - if err := m.DateSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dateSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dateSchedule") - } - return err - } - } - - return nil -} - -func (m *SchedulingPolicyProto) 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 *SchedulingPolicyProto) 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 -} - -func (m *SchedulingPolicyProto) contextValidateYearlySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.YearlySchedule != nil { - - if swag.IsZero(m.YearlySchedule) { // not required - return nil - } - - if err := m.YearlySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearlySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearlySchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProto) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_continuous_schedule.go b/v1/models/scheduling_policy_proto_continuous_schedule.go deleted file mode 100644 index e0551f0f..00000000 --- a/v1/models/scheduling_policy_proto_continuous_schedule.go +++ /dev/null @@ -1,52 +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" -) - -// SchedulingPolicyProtoContinuousSchedule scheduling policy proto continuous schedule -// -// swagger:model SchedulingPolicyProto_ContinuousSchedule -type SchedulingPolicyProtoContinuousSchedule struct { - - // If this field is set, backups will be performed periodically every - // 'interval_mins' number of minutes. NOTE: This is the interval between - // the start time of two successive backups. - BackupIntervalMins *int64 `json:"backupIntervalMins,omitempty"` -} - -// Validate validates this scheduling policy proto continuous schedule -func (m *SchedulingPolicyProtoContinuousSchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduling policy proto continuous schedule based on context it is used -func (m *SchedulingPolicyProtoContinuousSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoContinuousSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoContinuousSchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoContinuousSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_daily_schedule.go b/v1/models/scheduling_policy_proto_daily_schedule.go deleted file mode 100644 index 39621be6..00000000 --- a/v1/models/scheduling_policy_proto_daily_schedule.go +++ /dev/null @@ -1,61 +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" -) - -// SchedulingPolicyProtoDailySchedule The daily schedule encompasses below 2 types of schedules. -// -// Sample protos: -// Every n days (n >= 1) -// Ex: For every 2 days, { frequency : 2 } -// Weekly schedule (Few selected weekdays) -// Ex: For every Monday, Tuesday { days : {kMonday, kTuesday} } -// NOTE: Only one of the 'days' and 'frequency' should be populated. -// -// swagger:model SchedulingPolicyProto_DailySchedule -type SchedulingPolicyProtoDailySchedule struct { - - // The list of weekdays for scheduling a backup. This is populated only for - // selected weekday schedules. - Days []int32 `json:"days"` - - // This is set only for every-n-day schedules. - Frequency *int64 `json:"frequency,omitempty"` -} - -// Validate validates this scheduling policy proto daily schedule -func (m *SchedulingPolicyProtoDailySchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduling policy proto daily schedule based on context it is used -func (m *SchedulingPolicyProtoDailySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoDailySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoDailySchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoDailySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_date_schedule.go b/v1/models/scheduling_policy_proto_date_schedule.go deleted file mode 100644 index 0d0778a4..00000000 --- a/v1/models/scheduling_policy_proto_date_schedule.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulingPolicyProtoDateSchedule scheduling policy proto date schedule -// -// swagger:model SchedulingPolicyProto_DateSchedule -type SchedulingPolicyProtoDateSchedule struct { - - // If this field is set, backups will be performed on specified list of - // dates only. - DatesVec []*DateTime `json:"datesVec"` -} - -// Validate validates this scheduling policy proto date schedule -func (m *SchedulingPolicyProtoDateSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatesVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulingPolicyProtoDateSchedule) validateDatesVec(formats strfmt.Registry) error { - if swag.IsZero(m.DatesVec) { // not required - return nil - } - - for i := 0; i < len(m.DatesVec); i++ { - if swag.IsZero(m.DatesVec[i]) { // not required - continue - } - - if m.DatesVec[i] != nil { - if err := m.DatesVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this scheduling policy proto date schedule based on the context it is used -func (m *SchedulingPolicyProtoDateSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatesVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SchedulingPolicyProtoDateSchedule) contextValidateDatesVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatesVec); i++ { - - if m.DatesVec[i] != nil { - - if swag.IsZero(m.DatesVec[i]) { // not required - return nil - } - - if err := m.DatesVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datesVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoDateSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoDateSchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoDateSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_monthly_schedule.go b/v1/models/scheduling_policy_proto_monthly_schedule.go deleted file mode 100644 index 50d6c0c0..00000000 --- a/v1/models/scheduling_policy_proto_monthly_schedule.go +++ /dev/null @@ -1,57 +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" -) - -// SchedulingPolicyProtoMonthlySchedule scheduling policy proto monthly schedule -// -// swagger:model SchedulingPolicyProto_MonthlySchedule -type SchedulingPolicyProtoMonthlySchedule struct { - - // Count of the day on which to perform the backup (look above for a more - // detailed description). - Count *int32 `json:"count,omitempty"` - - // The day of the month the backup is to be performed. - Day *int32 `json:"day,omitempty"` - - // Specific date of the month on which to perform the backup. - DayOfMonth *int32 `json:"dayOfMonth,omitempty"` -} - -// Validate validates this scheduling policy proto monthly schedule -func (m *SchedulingPolicyProtoMonthlySchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduling policy proto monthly schedule based on context it is used -func (m *SchedulingPolicyProtoMonthlySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoMonthlySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoMonthlySchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoMonthlySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_r_p_o_schedule.go b/v1/models/scheduling_policy_proto_r_p_o_schedule.go deleted file mode 100644 index 64f56296..00000000 --- a/v1/models/scheduling_policy_proto_r_p_o_schedule.go +++ /dev/null @@ -1,51 +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" -) - -// SchedulingPolicyProtoRPOSchedule scheduling policy proto r p o schedule -// -// swagger:model SchedulingPolicyProto_RPOSchedule -type SchedulingPolicyProtoRPOSchedule struct { - - // If this field is set, then at any point, a recovery point should be - // available not older than the given interval mins. - RpoIntervalMins *int64 `json:"rpoIntervalMins,omitempty"` -} - -// Validate validates this scheduling policy proto r p o schedule -func (m *SchedulingPolicyProtoRPOSchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduling policy proto r p o schedule based on context it is used -func (m *SchedulingPolicyProtoRPOSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoRPOSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoRPOSchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoRPOSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_proto_yearly_schedule.go b/v1/models/scheduling_policy_proto_yearly_schedule.go deleted file mode 100644 index 9acb1d83..00000000 --- a/v1/models/scheduling_policy_proto_yearly_schedule.go +++ /dev/null @@ -1,51 +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" -) - -// SchedulingPolicyProtoYearlySchedule scheduling policy proto yearly schedule -// -// swagger:model SchedulingPolicyProto_YearlySchedule -type SchedulingPolicyProtoYearlySchedule struct { - - // Count of the day on which to perform the backup (look above for a more - // detailed description). - DayOfTheYear *int32 `json:"dayOfTheYear,omitempty"` -} - -// Validate validates this scheduling policy proto yearly schedule -func (m *SchedulingPolicyProtoYearlySchedule) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this scheduling policy proto yearly schedule based on context it is used -func (m *SchedulingPolicyProtoYearlySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyProtoYearlySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyProtoYearlySchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyProtoYearlySchedule - 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/schema_info.go b/v1/models/schema_info.go deleted file mode 100644 index 4b675a6c..00000000 --- a/v1/models/schema_info.go +++ /dev/null @@ -1,62 +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" -) - -// SchemaInfo Schema Info. -// -// Specifies the metric data point where public data metric name as key and the -// schema defined metric name as a value. -// -// swagger:model SchemaInfo -type SchemaInfo struct { - - // Specifies the id of the entity represented as a string. - EntityID *string `json:"entityId,omitempty"` - - // Specifies the key which is public facing name for metric name. - Key *string `json:"key,omitempty"` - - // Specifies the Apollo schema metric name. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the name of entity schema such as 'ApolloViewBoxStats'. - SchemaName *string `json:"schemaName,omitempty"` -} - -// Validate validates this schema info -func (m *SchemaInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this schema info based on context it is used -func (m *SchemaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SchemaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchemaInfo) UnmarshalBinary(b []byte) error { - var res SchemaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/script_execution_status.go b/v1/models/script_execution_status.go deleted file mode 100644 index daad773c..00000000 --- a/v1/models/script_execution_status.go +++ /dev/null @@ -1,123 +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" -) - -// ScriptExecutionStatus Message to encapsulate the status of a script. -// -// swagger:model ScriptExecutionStatus -type ScriptExecutionStatus struct { - - // Error that occurred during execution. - Error *ErrorProto `json:"error,omitempty"` - - // Indicates if a script is executing. This is particularly useful when - // there is a cancellation request and Magneto crashes at that point before - // cleaning up the running script. - Executing *bool `json:"executing,omitempty"` - - // Exit code of the script. - ExitCode *int32 `json:"exitCode,omitempty"` - - // Output of the script, if any. - Output *string `json:"output,omitempty"` - - // Execution state of the script. - State *int32 `json:"state,omitempty"` -} - -// Validate validates this script execution status -func (m *ScriptExecutionStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScriptExecutionStatus) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this script execution status based on the context it is used -func (m *ScriptExecutionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScriptExecutionStatus) 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 -} - -// MarshalBinary interface implementation -func (m *ScriptExecutionStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScriptExecutionStatus) UnmarshalBinary(b []byte) error { - var res ScriptExecutionStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/script_path_and_params.go b/v1/models/script_path_and_params.go deleted file mode 100644 index 3a8c862a..00000000 --- a/v1/models/script_path_and_params.go +++ /dev/null @@ -1,75 +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" -) - -// ScriptPathAndParams A message to encapsulate pre or post script associated with a backup job -// policy. -// -// swagger:model ScriptPathAndParams -type ScriptPathAndParams struct { - - // Applicable only for pre backup scripts. If this flag is set to true, then - // backup job will start even if the pre backup script fails. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Indicates if the script is active. If 'is_active' is set to false, this - // script will not be executed even if it is part of the backup job. - IsActive *bool `json:"isActive,omitempty"` - - // Custom parameters that users want to pass to the script. For example, - // if user wants to pass following params: - // 1. foo=bar - // 2. v=10. - // User can construct the param string as "far=bar v=10". - ScriptParams *string `json:"scriptParams,omitempty"` - - // For backup jobs of type 'kPuppeteer', 'script_path' is full path of - // location of the script within the host. - // For Pre/Post scripts of agent-based backup jobs, 'script_path' is just - // name of the script, not full path. - // For backup jobs of cloud adapters (GCP, AWS, Azure) script path will - // capture the full path of the script on the cloud VM instance. - ScriptPath *string `json:"scriptPath,omitempty"` - - // Timeout of the script. The script will be killed if it exceeds this value. - // '-1' indicates that the timeout is not set for the script. - TimeoutSecs *int32 `json:"timeoutSecs,omitempty"` -} - -// Validate validates this script path and params -func (m *ScriptPathAndParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this script path and params based on context it is used -func (m *ScriptPathAndParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScriptPathAndParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScriptPathAndParams) UnmarshalBinary(b []byte) error { - var res ScriptPathAndParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/search_production_ad_objects_request.go b/v1/models/search_production_ad_objects_request.go deleted file mode 100644 index 3c550159..00000000 --- a/v1/models/search_production_ad_objects_request.go +++ /dev/null @@ -1,62 +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" -) - -// SearchProductionAdObjectsRequest Search production AD objects request. -// -// Specifies the request to search AD objects from Production AD. -// -// swagger:model SearchProductionAdObjectsRequest -type SearchProductionAdObjectsRequest struct { - - // Specifies the list of the distinguished names of the AD objects. - DistinguishedNames []string `json:"distinguishedNames"` - - // Specifies the list of the guids of the AD objects. - ObjectGuids []string `json:"objectGuids"` - - // ProtectionSourceId is the Id of the Domain Controller host on which we want - // to search for AD objects. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies the list of the sam account names of the AD objects. - SamAccountNames []string `json:"samAccountNames"` -} - -// Validate validates this search production ad objects request -func (m *SearchProductionAdObjectsRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this search production ad objects request based on context it is used -func (m *SearchProductionAdObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchProductionAdObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchProductionAdObjectsRequest) UnmarshalBinary(b []byte) error { - var res SearchProductionAdObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sequence_number.go b/v1/models/sequence_number.go deleted file mode 100644 index d49f30e2..00000000 --- a/v1/models/sequence_number.go +++ /dev/null @@ -1,57 +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" -) - -// SequenceNumber Sequence Number for each change for MongoDB Entity. -// -// swagger:model SequenceNumber -type SequenceNumber struct { - - // Timestamp field of the change event. - // Mongodb associates each change with a timestamp type which is a 64 bit - // value where: - // The most significant 32 bits are a time_t value (seconds since the Unix - // epoch), the least significant 32 bits are an incrementing ordinal for - // operations within a given second. Note that the timestamps of - // events are not consecutive numbers and also we can have multiple colocated - // changes entries for same timestamp. - Timestamp *int64 `json:"timestamp,omitempty"` -} - -// Validate validates this sequence number -func (m *SequenceNumber) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sequence number based on context it is used -func (m *SequenceNumber) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SequenceNumber) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SequenceNumber) UnmarshalBinary(b []byte) error { - var res SequenceNumber - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sequencer.go b/v1/models/sequencer.go deleted file mode 100644 index bf2d1432..00000000 --- a/v1/models/sequencer.go +++ /dev/null @@ -1,162 +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" -) - -// Sequencer Sequencer used to identify pieces of data sent to Atom. It is expected that -// different enviroment protos will be added to this to define their own -// sequencers like one is added for VMware below. -// -// swagger:model Sequencer -type Sequencer struct { - - // mongodb sequencer - MongodbSequencer *SequenceNumber `json:"mongodbSequencer,omitempty"` - - // vmware sequencer - VmwareSequencer *SequenceNumber `json:"vmwareSequencer,omitempty"` -} - -// Validate validates this sequencer -func (m *Sequencer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMongodbSequencer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareSequencer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Sequencer) validateMongodbSequencer(formats strfmt.Registry) error { - if swag.IsZero(m.MongodbSequencer) { // not required - return nil - } - - if m.MongodbSequencer != nil { - if err := m.MongodbSequencer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbSequencer") - } - return err - } - } - - return nil -} - -func (m *Sequencer) validateVmwareSequencer(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareSequencer) { // not required - return nil - } - - if m.VmwareSequencer != nil { - if err := m.VmwareSequencer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareSequencer") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sequencer based on the context it is used -func (m *Sequencer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMongodbSequencer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareSequencer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Sequencer) contextValidateMongodbSequencer(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbSequencer != nil { - - if swag.IsZero(m.MongodbSequencer) { // not required - return nil - } - - if err := m.MongodbSequencer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbSequencer") - } - return err - } - } - - return nil -} - -func (m *Sequencer) contextValidateVmwareSequencer(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareSequencer != nil { - - if swag.IsZero(m.VmwareSequencer) { // not required - return nil - } - - if err := m.VmwareSequencer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareSequencer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareSequencer") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Sequencer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Sequencer) UnmarshalBinary(b []byte) error { - var res Sequencer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_access_config.go b/v1/models/service_access_config.go deleted file mode 100644 index 6467fa75..00000000 --- a/v1/models/service_access_config.go +++ /dev/null @@ -1,50 +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" -) - -// ServiceAccessConfig ServiceAccessConfig Service Access Configuration -// -// swagger:model ServiceAccessConfig -type ServiceAccessConfig struct { - - // type - Type *string `json:"type,omitempty"` -} - -// Validate validates this service access config -func (m *ServiceAccessConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service access config based on context it is used -func (m *ServiceAccessConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceAccessConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceAccessConfig) UnmarshalBinary(b []byte) error { - var res ServiceAccessConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_account_credentials.go b/v1/models/service_account_credentials.go deleted file mode 100644 index eb242a7f..00000000 --- a/v1/models/service_account_credentials.go +++ /dev/null @@ -1,61 +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" -) - -// ServiceAccountCredentials Message that encapsulates the details of additional service accounts which -// can be used for Mailbox backups. -// -// swagger:model ServiceAccountCredentials -type ServiceAccountCredentials struct { - - // AES256 encrypted password. The key for encryption should be obtained from - // KMS. This field stores the encrypted password when the credentials are - // being sent to bifrost. - EncryptedPassword []uint8 `json:"encryptedPassword"` - - // This field is not used in storage, other than historical records. The - // field is only set for inflight rpcs. - Password *string `json:"password,omitempty"` - - // The username and password to use for authentication. Currently only 'basic - // auth' is supported. - Username *string `json:"username,omitempty"` -} - -// Validate validates this service account credentials -func (m *ServiceAccountCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service account credentials based on context it is used -func (m *ServiceAccountCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceAccountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceAccountCredentials) UnmarshalBinary(b []byte) error { - var res ServiceAccountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_flag_request.go b/v1/models/service_flag_request.go deleted file mode 100644 index d3c7f200..00000000 --- a/v1/models/service_flag_request.go +++ /dev/null @@ -1,67 +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" -) - -// ServiceFlagRequest ServiceFlagRequest is the struct to specify the request to update a flag for -// a service. -// -// swagger:model ServiceFlagRequest -type ServiceFlagRequest struct { - - // If Clear is set to true, the flag is cleared - Clear *bool `json:"clear,omitempty"` - - // FlagName is the name of the flag for the service. - FlagName *string `json:"flagName,omitempty"` - - // FlagValue is the value of the specified flag for the service to update. - FlagValue *string `json:"flagValue,omitempty"` - - // ProductModel is the product model that this flag to set on. - ProductModel *string `json:"productModel,omitempty"` - - // Reason is the reason for updating gflag. - Reason *string `json:"reason,omitempty"` - - // ServiceName is the name of the Service for which the flag needs to be - // updated. - ServiceName *string `json:"serviceName,omitempty"` -} - -// Validate validates this service flag request -func (m *ServiceFlagRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service flag request based on context it is used -func (m *ServiceFlagRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceFlagRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceFlagRequest) UnmarshalBinary(b []byte) error { - var res ServiceFlagRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_gflags.go b/v1/models/service_gflags.go deleted file mode 100644 index 8082ca6b..00000000 --- a/v1/models/service_gflags.go +++ /dev/null @@ -1,245 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ServiceGflags Service Gflags. -// -// Specifies the gflags for a service. -// -// swagger:model ServiceGflags -type ServiceGflags struct { - - // Specifies a list of gflags for this service. - Gflags []*Gflag `json:"gflags"` - - // Specifies the name of the service. - // 'kApollo' is a service for reclaiming freed disk sectors on Nodes in the - // SnapFS distributed file system. - // 'kBridge' is a service for managing the SnapFS distributed file system. - // 'kGenie' is a service that is responsible for monitoring hardware health - // on the Cluster. - // 'kGenieGofer' is a service that links the Genie service to other services - // on the Cluster. - // 'kMagneto' is the data protection service of the Cohesity Data Platform. - // 'kIris' is the service which serves REST API calls to the UI, CLI, and any - // scripts written by customers. - // 'kIrisProxy' is a service that links the Iris service to other services - // on the Cluster. - // 'kScribe' is the service responsible for storing filesystem metadata. - // 'kStats' is the service that is responsible for retrieving and aggregating - // disk metrics across the Cluster. - // 'kYoda' is an elastic search indexing service. - // 'kAlerts' is a publisher and subscribing service for alerts. - // 'kKeychain' is a service for managing disk encryption keys. - // 'kLogWatcher' is a service that scans the log directory and reduces - // the number of logs if required. - // 'kStatsCollector' is a service that periodically logs system stats. - // 'kGandalf' is a distributed lock service and coordination manager. - // 'kNexus' indicates the Nexus service. This is the service that is - // responsible for creation of Clusters and configuration of Nodes and - // networking. - // 'kNexusProxy' is a service that links the Nexus service to other services - // on the Cluster. - // 'kStorageProxy' is a service for accessing data on external entities. - // 'kRtClient' is a reverse tunneling client service. - // 'kVaultProxy' is a service for managing external targets that Clusters - // can be backed up to. - // 'kSmbProxy' is an SMB protocol service. - // 'kBridgeProxy' is the service that links the Bridge service to other - // services on the Cluster. - // 'kLibrarian' is an elastic search indexing service. - // 'kGroot' is a service for managing replication of SQL databases across - // multiple nodes in a Cluster. - // 'kEagleAgent' is a service that is responsible for retrieving information - // on Cluster health. - // 'kAthena' is a service for running distributed containerized applications - // on the Cohesity Data Platform. - // 'kBifrostBroker' is a service for communicating with the Cohesity proxies - // for multitenancy. - // 'kSmb2Proxy' is a new SMB protocol service. - // 'kOs' can be specified in order to do a full reboot. - // 'kAtom' is a service for receiving data for the Continuous Data Protection. - // 'kPatch' is a service for downloading and applying patches. - // 'kCompass' is a service for serving dns request for external and internal - // traffic. - // 'kEtlServer' is a service responsible for ETling data for globalsearch. - // 'kIcebox' is service that links Icebox service to other services on cluster. - // kScribe, kStats, kYoda, kAlerts, kKeychain, kLogWatcher, kStatsCollecter, - // kGandalf, kNexus, kNexusProxy, kStorageProxy, kRtClient, kVaultProxy, - // kSmbProxy, kBridgeProxy, kLibrarian, kGroot, kEagleAgent, kAthena, - // kBifrostBroker, kSmb2Proxy, kOs, kAtom, kIcebox - // Enum: ["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"] - ServiceName *string `json:"serviceName,omitempty"` -} - -// Validate validates this service gflags -func (m *ServiceGflags) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGflags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServiceGflags) validateGflags(formats strfmt.Registry) error { - if swag.IsZero(m.Gflags) { // not required - return nil - } - - for i := 0; i < len(m.Gflags); i++ { - if swag.IsZero(m.Gflags[i]) { // not required - continue - } - - if m.Gflags[i] != nil { - if err := m.Gflags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gflags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gflags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var serviceGflagsTypeServiceNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - serviceGflagsTypeServiceNamePropEnum = append(serviceGflagsTypeServiceNamePropEnum, v) - } -} - -const ( - - // ServiceGflagsServiceNameKApollo captures enum value "kApollo" - ServiceGflagsServiceNameKApollo string = "kApollo" - - // ServiceGflagsServiceNameKBridge captures enum value "kBridge" - ServiceGflagsServiceNameKBridge string = "kBridge" - - // ServiceGflagsServiceNameKGenie captures enum value "kGenie" - ServiceGflagsServiceNameKGenie string = "kGenie" - - // ServiceGflagsServiceNameKGenieGofer captures enum value "kGenieGofer" - ServiceGflagsServiceNameKGenieGofer string = "kGenieGofer" - - // ServiceGflagsServiceNameKMagneto captures enum value "kMagneto" - ServiceGflagsServiceNameKMagneto string = "kMagneto" - - // ServiceGflagsServiceNameKIris captures enum value "kIris" - ServiceGflagsServiceNameKIris string = "kIris" - - // ServiceGflagsServiceNameKIrisProxy captures enum value "kIrisProxy" - ServiceGflagsServiceNameKIrisProxy string = "kIrisProxy" -) - -// prop value enum -func (m *ServiceGflags) validateServiceNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, serviceGflagsTypeServiceNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ServiceGflags) validateServiceName(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceName) { // not required - return nil - } - - // value enum - if err := m.validateServiceNameEnum("serviceName", "body", *m.ServiceName); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this service gflags based on the context it is used -func (m *ServiceGflags) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGflags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServiceGflags) contextValidateGflags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Gflags); i++ { - - if m.Gflags[i] != nil { - - if swag.IsZero(m.Gflags[i]) { // not required - return nil - } - - if err := m.Gflags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gflags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gflags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceGflags) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceGflags) UnmarshalBinary(b []byte) error { - var res ServiceGflags - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_process_entry.go b/v1/models/service_process_entry.go deleted file mode 100644 index 577c073d..00000000 --- a/v1/models/service_process_entry.go +++ /dev/null @@ -1,181 +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" -) - -// ServiceProcessEntry Service Process Entry. -// -// Specifies the name of a Service running on the Cluster as well as a list -// of process IDs associated with that service. -// -// swagger:model ServiceProcessEntry -type ServiceProcessEntry struct { - - // Specifies the list of process IDs associated with the Service. - ProcessIds []int64 `json:"processIds"` - - // Specifies the name of the Service. - // 'kApollo' is a service for reclaiming freed disk sectors on Nodes in the - // SnapFS distributed file system. - // 'kBridge' is a service for managing the SnapFS distributed file system. - // 'kGenie' is a service that is responsible for monitoring hardware health - // on the Cluster. - // 'kGenieGofer' is a service that links the Genie service to other services - // on the Cluster. - // 'kMagneto' is the data protection service of the Cohesity Data Platform. - // 'kIris' is the service which serves REST API calls to the UI, CLI, and any - // scripts written by customers. - // 'kIrisProxy' is a service that links the Iris service to other services - // on the Cluster. - // 'kScribe' is the service responsible for storing filesystem metadata. - // 'kStats' is the service that is responsible for retrieving and aggregating - // disk metrics across the Cluster. - // 'kYoda' is an elastic search indexing service. - // 'kAlerts' is a publisher and subscribing service for alerts. - // 'kKeychain' is a service for managing disk encryption keys. - // 'kLogWatcher' is a service that scans the log directory and reduces - // the number of logs if required. - // 'kStatsCollector' is a service that periodically logs system stats. - // 'kGandalf' is a distributed lock service and coordination manager. - // 'kNexus' indicates the Nexus service. This is the service that is - // responsible for creation of Clusters and configuration of Nodes and - // networking. - // 'kNexusProxy' is a service that links the Nexus service to other services - // on the Cluster. - // 'kStorageProxy' is a service for accessing data on external entities. - // 'kRtClient' is a reverse tunneling client service. - // 'kVaultProxy' is a service for managing external targets that Clusters - // can be backed up to. - // 'kSmbProxy' is an SMB protocol service. - // 'kBridgeProxy' is the service that links the Bridge service to other - // services on the Cluster. - // 'kLibrarian' is an elastic search indexing service. - // 'kGroot' is a service for managing replication of SQL databases across - // multiple nodes in a Cluster. - // 'kEagleAgent' is a service that is responsible for retrieving information - // on Cluster health. - // 'kAthena' is a service for running distributed containerized applications - // on the Cohesity Data Platform. - // 'kBifrostBroker' is a service for communicating with the Cohesity proxies - // for multitenancy. - // 'kSmb2Proxy' is a new SMB protocol service. - // 'kOs' can be specified in order to do a full reboot. - // 'kAtom' is a service for receiving data for the Continuous Data Protection. - // 'kPatch' is a service for downloading and applying patches. - // 'kCompass' is a service for serving dns request for external and internal - // traffic. - // 'kEtlServer' is a service responsible for ETling data for globalsearch. - // 'kIcebox' is service that links Icebox service to other services on cluster. - // kScribe, kStats, kYoda, kAlerts, kKeychain, kLogWatcher, kStatsCollecter, - // kGandalf, kNexus, kNexusProxy, kStorageProxy, kRtClient, kVaultProxy, - // kSmbProxy, kBridgeProxy, kLibrarian, kGroot, kEagleAgent, kAthena, - // kBifrostBroker, kSmb2Proxy, kOs, kAtom, kIcebox - // Enum: ["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"] - ServiceName *string `json:"serviceName,omitempty"` -} - -// Validate validates this service process entry -func (m *ServiceProcessEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServiceName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var serviceProcessEntryTypeServiceNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - serviceProcessEntryTypeServiceNamePropEnum = append(serviceProcessEntryTypeServiceNamePropEnum, v) - } -} - -const ( - - // ServiceProcessEntryServiceNameKApollo captures enum value "kApollo" - ServiceProcessEntryServiceNameKApollo string = "kApollo" - - // ServiceProcessEntryServiceNameKBridge captures enum value "kBridge" - ServiceProcessEntryServiceNameKBridge string = "kBridge" - - // ServiceProcessEntryServiceNameKGenie captures enum value "kGenie" - ServiceProcessEntryServiceNameKGenie string = "kGenie" - - // ServiceProcessEntryServiceNameKGenieGofer captures enum value "kGenieGofer" - ServiceProcessEntryServiceNameKGenieGofer string = "kGenieGofer" - - // ServiceProcessEntryServiceNameKMagneto captures enum value "kMagneto" - ServiceProcessEntryServiceNameKMagneto string = "kMagneto" - - // ServiceProcessEntryServiceNameKIris captures enum value "kIris" - ServiceProcessEntryServiceNameKIris string = "kIris" - - // ServiceProcessEntryServiceNameKIrisProxy captures enum value "kIrisProxy" - ServiceProcessEntryServiceNameKIrisProxy string = "kIrisProxy" -) - -// prop value enum -func (m *ServiceProcessEntry) validateServiceNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, serviceProcessEntryTypeServiceNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ServiceProcessEntry) validateServiceName(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceName) { // not required - return nil - } - - // value enum - if err := m.validateServiceNameEnum("serviceName", "body", *m.ServiceName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this service process entry based on context it is used -func (m *ServiceProcessEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceProcessEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceProcessEntry) UnmarshalBinary(b []byte) error { - var res ServiceProcessEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_state.go b/v1/models/service_state.go deleted file mode 100644 index 7dbac34d..00000000 --- a/v1/models/service_state.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" -) - -// ServiceState Structure to hold service status. -// -// swagger:model ServiceState -type ServiceState struct { - - // Required field. - Name *string `json:"name,omitempty"` - - // Required field. - State *string `json:"state,omitempty"` -} - -// Validate validates this service state -func (m *ServiceState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service state based on context it is used -func (m *ServiceState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceState) UnmarshalBinary(b []byte) error { - var res ServiceState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/service_state_result.go b/v1/models/service_state_result.go deleted file mode 100644 index 9681e389..00000000 --- a/v1/models/service_state_result.go +++ /dev/null @@ -1,235 +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" -) - -// ServiceStateResult Service State Result. -// -// Specifies the result of querying the state of a specific service on -// the Cluster. -// -// swagger:model ServiceStateResult -type ServiceStateResult struct { - - // Specifies the name of the service. - // 'kApollo' is a service for reclaiming freed disk sectors on Nodes in the - // SnapFS distributed file system. - // 'kBridge' is a service for managing the SnapFS distributed file system. - // 'kGenie' is a service that is responsible for monitoring hardware health - // on the Cluster. - // 'kGenieGofer' is a service that links the Genie service to other services - // on the Cluster. - // 'kMagneto' is the data protection service of the Cohesity Data Platform. - // 'kIris' is the service which serves REST API calls to the UI, CLI, and any - // scripts written by customers. - // 'kIrisProxy' is a service that links the Iris service to other services - // on the Cluster. - // 'kScribe' is the service responsible for storing filesystem metadata. - // 'kStats' is the service that is responsible for retrieving and aggregating - // disk metrics across the Cluster. - // 'kYoda' is an elastic search indexing service. - // 'kAlerts' is a publisher and subscribing service for alerts. - // 'kKeychain' is a service for managing disk encryption keys. - // 'kLogWatcher' is a service that scans the log directory and reduces - // the number of logs if required. - // 'kStatsCollector' is a service that periodically logs system stats. - // 'kGandalf' is a distributed lock service and coordination manager. - // 'kNexus' indicates the Nexus service. This is the service that is - // responsible for creation of Clusters and configuration of Nodes and - // networking. - // 'kNexusProxy' is a service that links the Nexus service to other services - // on the Cluster. - // 'kStorageProxy' is a service for accessing data on external entities. - // 'kRtClient' is a reverse tunneling client service. - // 'kVaultProxy' is a service for managing external targets that Clusters - // can be backed up to. - // 'kSmbProxy' is an SMB protocol service. - // 'kBridgeProxy' is the service that links the Bridge service to other - // services on the Cluster. - // 'kLibrarian' is an elastic search indexing service. - // 'kGroot' is a service for managing replication of SQL databases across - // multiple nodes in a Cluster. - // 'kEagleAgent' is a service that is responsible for retrieving information - // on Cluster health. - // 'kAthena' is a service for running distributed containerized applications - // on the Cohesity Data Platform. - // 'kBifrostBroker' is a service for communicating with the Cohesity proxies - // for multitenancy. - // 'kSmb2Proxy' is a new SMB protocol service. - // 'kOs' can be specified in order to do a full reboot. - // 'kAtom' is a service for receiving data for the Continuous Data Protection. - // 'kPatch' is a service for downloading and applying patches. - // 'kCompass' is a service for serving dns request for external and internal - // traffic. - // 'kEtlServer' is a service responsible for ETling data for globalsearch. - // 'kIcebox' is service that links Icebox service to other services on cluster. - // kScribe, kStats, kYoda, kAlerts, kKeychain, kLogWatcher, kStatsCollecter, - // kGandalf, kNexus, kNexusProxy, kStorageProxy, kRtClient, kVaultProxy, - // kSmbProxy, kBridgeProxy, kLibrarian, kGroot, kEagleAgent, kAthena, - // kBifrostBroker, kSmb2Proxy, kOs, kAtom, kIcebox - // Enum: ["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"] - Service *string `json:"service,omitempty"` - - // Specifies the state of the service. - // 'kServiceStopped' indicates that the service has been stopped. - // 'kServiceRunning' indicates that the service is currently running. - // 'kServiceRestarting' indicates that the service is in the queue to be - // restarted. - // Enum: ["kServiceStopped","kServiceRunning","kServiceRestarting"] - State *string `json:"state,omitempty"` -} - -// Validate validates this service state result -func (m *ServiceStateResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateService(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var serviceStateResultTypeServicePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kApollo","kBridge","kGenie","kGenieGofer","kMagneto","kIris","kIrisProxy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - serviceStateResultTypeServicePropEnum = append(serviceStateResultTypeServicePropEnum, v) - } -} - -const ( - - // ServiceStateResultServiceKApollo captures enum value "kApollo" - ServiceStateResultServiceKApollo string = "kApollo" - - // ServiceStateResultServiceKBridge captures enum value "kBridge" - ServiceStateResultServiceKBridge string = "kBridge" - - // ServiceStateResultServiceKGenie captures enum value "kGenie" - ServiceStateResultServiceKGenie string = "kGenie" - - // ServiceStateResultServiceKGenieGofer captures enum value "kGenieGofer" - ServiceStateResultServiceKGenieGofer string = "kGenieGofer" - - // ServiceStateResultServiceKMagneto captures enum value "kMagneto" - ServiceStateResultServiceKMagneto string = "kMagneto" - - // ServiceStateResultServiceKIris captures enum value "kIris" - ServiceStateResultServiceKIris string = "kIris" - - // ServiceStateResultServiceKIrisProxy captures enum value "kIrisProxy" - ServiceStateResultServiceKIrisProxy string = "kIrisProxy" -) - -// prop value enum -func (m *ServiceStateResult) validateServiceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, serviceStateResultTypeServicePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ServiceStateResult) validateService(formats strfmt.Registry) error { - if swag.IsZero(m.Service) { // not required - return nil - } - - // value enum - if err := m.validateServiceEnum("service", "body", *m.Service); err != nil { - return err - } - - return nil -} - -var serviceStateResultTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kServiceStopped","kServiceRunning","kServiceRestarting"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - serviceStateResultTypeStatePropEnum = append(serviceStateResultTypeStatePropEnum, v) - } -} - -const ( - - // ServiceStateResultStateKServiceStopped captures enum value "kServiceStopped" - ServiceStateResultStateKServiceStopped string = "kServiceStopped" - - // ServiceStateResultStateKServiceRunning captures enum value "kServiceRunning" - ServiceStateResultStateKServiceRunning string = "kServiceRunning" - - // ServiceStateResultStateKServiceRestarting captures enum value "kServiceRestarting" - ServiceStateResultStateKServiceRestarting string = "kServiceRestarting" -) - -// prop value enum -func (m *ServiceStateResult) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, serviceStateResultTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ServiceStateResult) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this service state result based on context it is used -func (m *ServiceStateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceStateResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceStateResult) UnmarshalBinary(b []byte) error { - var res ServiceStateResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/services_lock_info.go b/v1/models/services_lock_info.go deleted file mode 100644 index b359f32a..00000000 --- a/v1/models/services_lock_info.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ServicesLockInfo ServicesLockInfo to specify lock details of a service. -// -// swagger:model ServicesLockInfo -type ServicesLockInfo struct { - - // List of lock details under this service. - LockInfoVec []*LockInfo `json:"lock_info_vec"` - - // ServiceName is the name of the service. - ServiceName *int32 `json:"service_name,omitempty"` -} - -// Validate validates this services lock info -func (m *ServicesLockInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServicesLockInfo) validateLockInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.LockInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.LockInfoVec); i++ { - if swag.IsZero(m.LockInfoVec[i]) { // not required - continue - } - - if m.LockInfoVec[i] != nil { - if err := m.LockInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lock_info_vec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lock_info_vec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this services lock info based on the context it is used -func (m *ServicesLockInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLockInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServicesLockInfo) contextValidateLockInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LockInfoVec); i++ { - - if m.LockInfoVec[i] != nil { - - if swag.IsZero(m.LockInfoVec[i]) { // not required - return nil - } - - if err := m.LockInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lock_info_vec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lock_info_vec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ServicesLockInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServicesLockInfo) UnmarshalBinary(b []byte) error { - var res ServicesLockInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/session_configuration.go b/v1/models/session_configuration.go deleted file mode 100644 index 43360b0a..00000000 --- a/v1/models/session_configuration.go +++ /dev/null @@ -1,58 +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" -) - -// SessionConfiguration session configuration -// -// swagger:model SessionConfiguration -type SessionConfiguration struct { - - // Oracle base directory. - OracleBase *string `json:"oracleBase,omitempty"` - - // Oracle home directory. - OracleHome *string `json:"oracleHome,omitempty"` - - // The oracle instances which access the database. Host can have multiple - // oracle instances accessing same database. The unique name for an Oracle - // database instance is represented by SID(session identifier). - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this session configuration -func (m *SessionConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this session configuration based on context it is used -func (m *SessionConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SessionConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SessionConfiguration) UnmarshalBinary(b []byte) error { - var res SessionConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/session_user.go b/v1/models/session_user.go deleted file mode 100644 index d462f180..00000000 --- a/v1/models/session_user.go +++ /dev/null @@ -1,118 +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" -) - -// SessionUser SessionUser is the structure to support JSON for the session user. -// -// swagger:model SessionUser -type SessionUser struct { - - // SIDs of the groups the user is a member of. - GroupSids []string `json:"groupSids"` - - // Whether node is in cluster. - IsNodeInCluster *bool `json:"isNodeInCluster,omitempty"` - - // Privileges is the array of privileges the current user has. - Privileges []string `json:"privileges"` - - // User is the current session user. - User *User `json:"user,omitempty"` -} - -// Validate validates this session user -func (m *SessionUser) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SessionUser) validateUser(formats strfmt.Registry) error { - if swag.IsZero(m.User) { // not required - return nil - } - - if m.User != nil { - if err := m.User.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("user") - } - return err - } - } - - return nil -} - -// ContextValidate validate this session user based on the context it is used -func (m *SessionUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SessionUser) contextValidateUser(ctx context.Context, formats strfmt.Registry) error { - - if m.User != nil { - - if swag.IsZero(m.User) { // not required - return nil - } - - if err := m.User.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("user") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SessionUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SessionUser) UnmarshalBinary(b []byte) error { - var res SessionUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/setup_restore_disk_task_info_proto.go b/v1/models/setup_restore_disk_task_info_proto.go deleted file mode 100644 index 632d2154..00000000 --- a/v1/models/setup_restore_disk_task_info_proto.go +++ /dev/null @@ -1,202 +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" -) - -// SetupRestoreDiskTaskInfoProto Message that encapsulates information about the task that sets up and -// tears down restore disks in environments such as VMware, Physical, and -// HyperV. Environment specific information is defined as extensions to this -// proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// -// SetupRestoreDiskTaskInfoProto -// extension, extension_number -// Location -// ============================================================================= -// vmware::SetupRestoreDiskTaskInfo -// vmware_setup_restore_disk_task_info, 100 -// connectors/vmware/vmware_setup_restore_disks.proto.proto -// -// AgentSetupRestoreDiskTaskInfo -// agent_setup_restore_disk_task_info, 101 -// base/agent.proto -// -// app_file::SetupRestoreTaskInfo -// app_file_setup_restore_task_info, 102 -// connectors/app_file/app_file_setup_restore.proto -// -// hyperv::SetupRestoreDiskTaskInfo -// hyperv_setup_restore_disk_task_info, 103 -// connectors/hyperv/hyperv_setup_restore_disks.proto -// ============================================================================= -// -// swagger:model SetupRestoreDiskTaskInfoProto -type SetupRestoreDiskTaskInfoProto struct { - - // The entity on which disks will be setup. - Entity *EntityProto `json:"entity,omitempty"` - - // The path to the progress monitor root task if any. - ProgressMonitorRootTaskPath *string `json:"progressMonitorRootTaskPath,omitempty"` - - // The root entity that the entity was running under. - RootEntity *EntityProto `json:"rootEntity,omitempty"` - - // The source view which contains the backups for the 'entity'. - SourceViewName *string `json:"sourceViewName,omitempty"` - - // The id of the associated task. - TaskID *int64 `json:"taskId,omitempty"` - - // The view box id containing the backups for the 'entity'. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Destination view into which the files will be cloned. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this setup restore disk task info proto -func (m *SetupRestoreDiskTaskInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SetupRestoreDiskTaskInfoProto) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *SetupRestoreDiskTaskInfoProto) validateRootEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if m.RootEntity != nil { - if err := m.RootEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this setup restore disk task info proto based on the context it is used -func (m *SetupRestoreDiskTaskInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SetupRestoreDiskTaskInfoProto) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *SetupRestoreDiskTaskInfoProto) contextValidateRootEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RootEntity != nil { - - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if err := m.RootEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SetupRestoreDiskTaskInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SetupRestoreDiskTaskInfoProto) UnmarshalBinary(b []byte) error { - var res SetupRestoreDiskTaskInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_backup_job_params.go b/v1/models/sfdc_backup_job_params.go deleted file mode 100644 index 06748fc5..00000000 --- a/v1/models/sfdc_backup_job_params.go +++ /dev/null @@ -1,301 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcBackupJobParams Message to capture any additional backup params for Group within the -// Sfdc environment. -// -// swagger:model SfdcBackupJobParams -type SfdcBackupJobParams struct { - - // Last access token refresh time. - AccessTokenRefreshTimeUsecs *int64 `json:"accessTokenRefreshTimeUsecs,omitempty"` - - // Contains the information of the Aurora database cluster and Iam role info - // needed to access the Aurora cluster. - AuroraClusterInfo *AuroraClusterInfo `json:"auroraClusterInfo,omitempty"` - - // IAM role used to get access to the S3 bucket. - AwsIamRole *string `json:"awsIamRole,omitempty"` - - // Contains the postgres database name where the org's data will be backed - // up. - BackupDatabaseName *string `json:"backupDatabaseName,omitempty"` - - // List of details per Sfdc object. - ObjectInfoVec []*ObjectLevelParams `json:"objectInfoVec"` - - // Sfdc Server Time for the previous run - PreviousRunSfdcServerTimestampUsecs *int64 `json:"previousRunSfdcServerTimestampUsecs,omitempty"` - - // Includes connection parameters and info saved during registration. - // This field is not populated as it is not read from backup job params. - RegisteredEntitySfdcParams *RegisteredEntitySfdcParams `json:"registeredEntitySfdcParams,omitempty"` - - // Contains the information of the S3 bucket used for uploading data. - S3BucketInfo *S3BucketInfo `json:"s3BucketInfo,omitempty"` - - // Path on snapfs where we persist the SfdcObjectMetadata. - SfdcObjectMetadataProtoPath *string `json:"sfdcObjectMetadataProtoPath,omitempty"` - - // Sfdc Server Time - // This time is being used as a snapshot time for fetching - // only incremental records in the next incremental backup. - SfdcServerTimestampUsecs *int64 `json:"sfdcServerTimestampUsecs,omitempty"` - - // Contains the DMaaS tenant id. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this sfdc backup job params -func (m *SfdcBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuroraClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntitySfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BucketInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcBackupJobParams) validateAuroraClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if m.AuroraClusterInfo != nil { - if err := m.AuroraClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupJobParams) validateObjectInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.ObjectInfoVec); i++ { - if swag.IsZero(m.ObjectInfoVec[i]) { // not required - continue - } - - if m.ObjectInfoVec[i] != nil { - if err := m.ObjectInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcBackupJobParams) validateRegisteredEntitySfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntitySfdcParams) { // not required - return nil - } - - if m.RegisteredEntitySfdcParams != nil { - if err := m.RegisteredEntitySfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntitySfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntitySfdcParams") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupJobParams) validateS3BucketInfo(formats strfmt.Registry) error { - if swag.IsZero(m.S3BucketInfo) { // not required - return nil - } - - if m.S3BucketInfo != nil { - if err := m.S3BucketInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sfdc backup job params based on the context it is used -func (m *SfdcBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuroraClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntitySfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3BucketInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcBackupJobParams) contextValidateAuroraClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraClusterInfo != nil { - - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if err := m.AuroraClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupJobParams) contextValidateObjectInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectInfoVec); i++ { - - if m.ObjectInfoVec[i] != nil { - - if swag.IsZero(m.ObjectInfoVec[i]) { // not required - return nil - } - - if err := m.ObjectInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcBackupJobParams) contextValidateRegisteredEntitySfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntitySfdcParams != nil { - - if swag.IsZero(m.RegisteredEntitySfdcParams) { // not required - return nil - } - - if err := m.RegisteredEntitySfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntitySfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntitySfdcParams") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupJobParams) contextValidateS3BucketInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.S3BucketInfo != nil { - - if swag.IsZero(m.S3BucketInfo) { // not required - return nil - } - - if err := m.S3BucketInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcBackupJobParams) UnmarshalBinary(b []byte) error { - var res SfdcBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_backup_source_params_proto.go b/v1/models/sfdc_backup_source_params_proto.go deleted file mode 100644 index cc1669ac..00000000 --- a/v1/models/sfdc_backup_source_params_proto.go +++ /dev/null @@ -1,184 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcBackupSourceParamsProto Sfdc Backup Source Parameters. -// -// Message to capture additional backup params for an Sfdc source. -// -// This proto is used in object based protection of Sfdc source. -// -// swagger:model SfdcBackupSourceParamsProto -type SfdcBackupSourceParamsProto struct { - - // Details about the AuroraCluster to be used for this object protection. - AuroraClusterInfo *AuroraClusterInfo `json:"auroraClusterInfo,omitempty"` - - // IAM role used to get access to the Aurora cluster and S3 bucket. - AwsIamRole *string `json:"awsIamRole,omitempty"` - - // List of entity ids of the Sfdc objects that are excluded by - // the user in object protection. - ExcludedObjectIdsVec []int64 `json:"excludedObjectIdsVec"` - - // This list is a mapping between an Sfdc object's entity Id and the list of - // field names that user has specified to exclude from this object's backup. - ObjectLevelParamsVec []*ObjectLevelParams `json:"objectLevelParamsVec"` -} - -// Validate validates this sfdc backup source params proto -func (m *SfdcBackupSourceParamsProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuroraClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectLevelParamsVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcBackupSourceParamsProto) validateAuroraClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if m.AuroraClusterInfo != nil { - if err := m.AuroraClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupSourceParamsProto) validateObjectLevelParamsVec(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectLevelParamsVec) { // not required - return nil - } - - for i := 0; i < len(m.ObjectLevelParamsVec); i++ { - if swag.IsZero(m.ObjectLevelParamsVec[i]) { // not required - continue - } - - if m.ObjectLevelParamsVec[i] != nil { - if err := m.ObjectLevelParamsVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectLevelParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectLevelParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc backup source params proto based on the context it is used -func (m *SfdcBackupSourceParamsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuroraClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectLevelParamsVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcBackupSourceParamsProto) contextValidateAuroraClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraClusterInfo != nil { - - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if err := m.AuroraClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcBackupSourceParamsProto) contextValidateObjectLevelParamsVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectLevelParamsVec); i++ { - - if m.ObjectLevelParamsVec[i] != nil { - - if swag.IsZero(m.ObjectLevelParamsVec[i]) { // not required - return nil - } - - if err := m.ObjectLevelParamsVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectLevelParamsVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectLevelParamsVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcBackupSourceParamsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcBackupSourceParamsProto) UnmarshalBinary(b []byte) error { - var res SfdcBackupSourceParamsProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_object.go b/v1/models/sfdc_object.go deleted file mode 100644 index 911a21c5..00000000 --- a/v1/models/sfdc_object.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SfdcObject Salesforce Object Info. -// -// Specifies an Object containing information about a Salseforce object. -// -// swagger:model SfdcObject -type SfdcObject struct { - - // Type of this object - Fields []*SfdcObjectFields `json:"fields"` - - // Type of this object - // Specifies the type of an Universal Data Adapter source entity. - // 'kStandard' indicates a Universal Data Adapter source, possibly distributed - // over several physical nodes. - // 'kCustom' indicates a generic object within the UDA environment. - // Enum: ["kStandard","kCustom"] - ObjectType *string `json:"objectType,omitempty"` - - // Number of records in this object. - RecordCount *uint64 `json:"recordCount,omitempty"` -} - -// Validate validates this sfdc object -func (m *SfdcObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFields(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObject) validateFields(formats strfmt.Registry) error { - if swag.IsZero(m.Fields) { // not required - return nil - } - - for i := 0; i < len(m.Fields); i++ { - if swag.IsZero(m.Fields[i]) { // not required - continue - } - - if m.Fields[i] != nil { - if err := m.Fields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var sfdcObjectTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sfdcObjectTypeObjectTypePropEnum = append(sfdcObjectTypeObjectTypePropEnum, v) - } -} - -const ( - - // SfdcObjectObjectTypeKStandard captures enum value "kStandard" - SfdcObjectObjectTypeKStandard string = "kStandard" - - // SfdcObjectObjectTypeKCustom captures enum value "kCustom" - SfdcObjectObjectTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *SfdcObject) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sfdcObjectTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SfdcObject) validateObjectType(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", *m.ObjectType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this sfdc object based on the context it is used -func (m *SfdcObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObject) contextValidateFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Fields); i++ { - - if m.Fields[i] != nil { - - if swag.IsZero(m.Fields[i]) { // not required - return nil - } - - if err := m.Fields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObject) UnmarshalBinary(b []byte) error { - var res SfdcObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_object_fields.go b/v1/models/sfdc_object_fields.go deleted file mode 100644 index 77f6abdd..00000000 --- a/v1/models/sfdc_object_fields.go +++ /dev/null @@ -1,52 +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" -) - -// SfdcObjectFields Sfdc Object Fields Info. -// -// Specifies information about a Sfdc Object Field. -// -// swagger:model SfdcObjectFields -type SfdcObjectFields struct { - - // Specifies the name of a Salesforce Object Field. - Name *string `json:"name,omitempty"` -} - -// Validate validates this sfdc object fields -func (m *SfdcObjectFields) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc object fields based on context it is used -func (m *SfdcObjectFields) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectFields) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectFields) UnmarshalBinary(b []byte) error { - var res SfdcObjectFields - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_org.go b/v1/models/sfdc_org.go deleted file mode 100644 index 921014e7..00000000 --- a/v1/models/sfdc_org.go +++ /dev/null @@ -1,58 +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" -) - -// SfdcOrg Salesforce Org Info. -// -// Specifies an Object containing information about a Salesforce Org. -// -// swagger:model SfdcOrg -type SfdcOrg struct { - - // String id of the organization to which Sfdc user belongs. - OrgID *string `json:"orgId,omitempty"` - - // Contains the total number of salesforce user licenses in the organization. - TotalSfLicenses *uint32 `json:"totalSfLicenses,omitempty"` - - // Contains the number of user salesforce user licenses in the organization. - UsedSfLicenses *uint32 `json:"usedSfLicenses,omitempty"` -} - -// Validate validates this sfdc org -func (m *SfdcOrg) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc org based on context it is used -func (m *SfdcOrg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcOrg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcOrg) UnmarshalBinary(b []byte) error { - var res SfdcOrg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_params.go b/v1/models/sfdc_params.go deleted file mode 100644 index 23251cc8..00000000 --- a/v1/models/sfdc_params.go +++ /dev/null @@ -1,142 +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" -) - -// SfdcParams Specifies an Object containing information about a registered Salesforce -// source. -// -// swagger:model SfdcParams -type SfdcParams struct { - - // Token that will be used in subsequent api requests. - AccessToken *string `json:"accessToken,omitempty"` - - // Specifies the maximum number of concurrent API requests allowed for salesforce. - ConcurrentAPIRequestsLimit *int64 `json:"concurrentApiRequestsLimit,omitempty"` - - // Consumer key from the connected app in Sfdc. - ConsumerKey *string `json:"consumerKey,omitempty"` - - // Consumer secret from the connected app in Sfdc. - ConsumerSecret *string `json:"consumerSecret,omitempty"` - - // Maximum daily api limit - DailyAPILimit *int64 `json:"dailyApiLimit,omitempty"` - - // Sfdc Endpoint URL. - Endpoint *string `json:"endpoint,omitempty"` - - // Specifies the Environment type for salesforce. - // 'PROD' - // 'SANDBOX' - // 'OTHER' - // Enum: ["PROD","SANDBOX","OTHER"] - EndpointType *string `json:"endpointType,omitempty"` - - // Metadata endpoint url. All metadata requests must be made to this url. - MetadataEndpointURL *string `json:"metadataEndpointUrl,omitempty"` - - // Token that will be used to refresh the access token. - RefreshToken *string `json:"refreshToken,omitempty"` - - // Soap endpoint url. All soap requests must be made to this url. - SoapEndpointURL *string `json:"soapEndpointUrl,omitempty"` - - // use bulk api if set to true - UseBulkAPI *bool `json:"useBulkApi,omitempty"` -} - -// Validate validates this sfdc params -func (m *SfdcParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpointType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sfdcParamsTypeEndpointTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PROD","SANDBOX","OTHER"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sfdcParamsTypeEndpointTypePropEnum = append(sfdcParamsTypeEndpointTypePropEnum, v) - } -} - -const ( - - // SfdcParamsEndpointTypePROD captures enum value "PROD" - SfdcParamsEndpointTypePROD string = "PROD" - - // SfdcParamsEndpointTypeSANDBOX captures enum value "SANDBOX" - SfdcParamsEndpointTypeSANDBOX string = "SANDBOX" - - // SfdcParamsEndpointTypeOTHER captures enum value "OTHER" - SfdcParamsEndpointTypeOTHER string = "OTHER" -) - -// prop value enum -func (m *SfdcParams) validateEndpointTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sfdcParamsTypeEndpointTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SfdcParams) validateEndpointType(formats strfmt.Registry) error { - if swag.IsZero(m.EndpointType) { // not required - return nil - } - - // value enum - if err := m.validateEndpointTypeEnum("endpointType", "body", *m.EndpointType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sfdc params based on context it is used -func (m *SfdcParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcParams) UnmarshalBinary(b []byte) error { - var res SfdcParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_protection_source.go b/v1/models/sfdc_protection_source.go deleted file mode 100644 index 395a6530..00000000 --- a/v1/models/sfdc_protection_source.go +++ /dev/null @@ -1,225 +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" -) - -// SfdcProtectionSource Salesforce Protection Source. -// -// Specifies an Object representing Salesforce. -// -// swagger:model SfdcProtectionSource -type SfdcProtectionSource struct { - - // Specifies the instance name of the Salesforce entity. - Name *string `json:"name,omitempty"` - - // Information of a Salesforce object, only valid for an entity of - // type kObject. - ObjectInfo *SfdcObject `json:"objectInfo,omitempty"` - - // Information of a Salesforce org, only valid for an entity - // of type kOrg. - OrgInfo *SfdcOrg `json:"orgInfo,omitempty"` - - // Specifies the type of the managed Object in Salesforce - // Protection Source. - // Sfdc related params. - // - // Specifies the type of an Salesforce source entity. - // 'kOrg' indicates a Salseforce Org. - // 'kObject' indicates a object within the Salesforce Org. - // Enum: ["kOrg","kObject"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this sfdc protection source -func (m *SfdcProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcProtectionSource) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcProtectionSource) validateOrgInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OrgInfo) { // not required - return nil - } - - if m.OrgInfo != nil { - if err := m.OrgInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgInfo") - } - return err - } - } - - return nil -} - -var sfdcProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOrg","kObject"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sfdcProtectionSourceTypeTypePropEnum = append(sfdcProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // SfdcProtectionSourceTypeKOrg captures enum value "kOrg" - SfdcProtectionSourceTypeKOrg string = "kOrg" - - // SfdcProtectionSourceTypeKObject captures enum value "kObject" - SfdcProtectionSourceTypeKObject string = "kObject" -) - -// prop value enum -func (m *SfdcProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sfdcProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SfdcProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this sfdc protection source based on the context it is used -func (m *SfdcProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcProtectionSource) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcProtectionSource) contextValidateOrgInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OrgInfo != nil { - - if swag.IsZero(m.OrgInfo) { // not required - return nil - } - - if err := m.OrgInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcProtectionSource) UnmarshalBinary(b []byte) error { - var res SfdcProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_recover_job_params.go b/v1/models/sfdc_recover_job_params.go deleted file mode 100644 index 49aae0c2..00000000 --- a/v1/models/sfdc_recover_job_params.go +++ /dev/null @@ -1,243 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcRecoverJobParams Contains recovery params at the job level applicable for Sfdc environment. -// -// swagger:model SfdcRecoverJobParams -type SfdcRecoverJobParams struct { - - // Contains the information of the Aurora database cluster. - AuroraClusterInfo *AuroraClusterInfo `json:"auroraClusterInfo,omitempty"` - - // IAM role used to get access to the Aurora cluster and S3 bucket. - AwsIamRole *string `json:"awsIamRole,omitempty"` - - // Flag to specify if this is an alternate source restore. - IsAlternateRestore *bool `json:"isAlternateRestore,omitempty"` - - // Whether to overwrite or keep the object if the object being recovered - // already exists in the destination. - Overwrite *bool `json:"overwrite,omitempty"` - - // A map containing prev_full_sfdc_server_timestamp_usecs for the dependent - // objects. - PrevFullSfdcServerTimestampUsecsMap []*SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry `json:"prevFullSfdcServerTimestampUsecsMap"` - - // restore childs object vec - RestoreChildsObjectVec []string `json:"restoreChildsObjectVec"` - - // List of parent/child objects that need to be restored. - RestoreParentObjectVec []string `json:"restoreParentObjectVec"` - - // The time when the corresponding backup run was started. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Contains the information of the S3 bucket used for uploading data. - S3BucketInfo *S3BucketInfo `json:"s3BucketInfo,omitempty"` -} - -// Validate validates this sfdc recover job params -func (m *SfdcRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuroraClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrevFullSfdcServerTimestampUsecsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BucketInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRecoverJobParams) validateAuroraClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if m.AuroraClusterInfo != nil { - if err := m.AuroraClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcRecoverJobParams) validatePrevFullSfdcServerTimestampUsecsMap(formats strfmt.Registry) error { - if swag.IsZero(m.PrevFullSfdcServerTimestampUsecsMap) { // not required - return nil - } - - for i := 0; i < len(m.PrevFullSfdcServerTimestampUsecsMap); i++ { - if swag.IsZero(m.PrevFullSfdcServerTimestampUsecsMap[i]) { // not required - continue - } - - if m.PrevFullSfdcServerTimestampUsecsMap[i] != nil { - if err := m.PrevFullSfdcServerTimestampUsecsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prevFullSfdcServerTimestampUsecsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prevFullSfdcServerTimestampUsecsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcRecoverJobParams) validateS3BucketInfo(formats strfmt.Registry) error { - if swag.IsZero(m.S3BucketInfo) { // not required - return nil - } - - if m.S3BucketInfo != nil { - if err := m.S3BucketInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sfdc recover job params based on the context it is used -func (m *SfdcRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuroraClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrevFullSfdcServerTimestampUsecsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3BucketInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRecoverJobParams) contextValidateAuroraClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraClusterInfo != nil { - - if swag.IsZero(m.AuroraClusterInfo) { // not required - return nil - } - - if err := m.AuroraClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraClusterInfo") - } - return err - } - } - - return nil -} - -func (m *SfdcRecoverJobParams) contextValidatePrevFullSfdcServerTimestampUsecsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PrevFullSfdcServerTimestampUsecsMap); i++ { - - if m.PrevFullSfdcServerTimestampUsecsMap[i] != nil { - - if swag.IsZero(m.PrevFullSfdcServerTimestampUsecsMap[i]) { // not required - return nil - } - - if err := m.PrevFullSfdcServerTimestampUsecsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prevFullSfdcServerTimestampUsecsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prevFullSfdcServerTimestampUsecsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcRecoverJobParams) contextValidateS3BucketInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.S3BucketInfo != nil { - - if swag.IsZero(m.S3BucketInfo) { // not required - return nil - } - - if err := m.S3BucketInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3BucketInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3BucketInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRecoverJobParams) UnmarshalBinary(b []byte) error { - var res SfdcRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_recover_job_params_prev_full_sfdc_server_timestamp_usecs_map_entry.go b/v1/models/sfdc_recover_job_params_prev_full_sfdc_server_timestamp_usecs_map_entry.go deleted file mode 100644 index c4828550..00000000 --- a/v1/models/sfdc_recover_job_params_prev_full_sfdc_server_timestamp_usecs_map_entry.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" -) - -// SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry sfdc recover job params prev full sfdc server timestamp usecs map entry -// -// swagger:model SfdcRecoverJobParams_PrevFullSfdcServerTimestampUsecsMapEntry -type SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this sfdc recover job params prev full sfdc server timestamp usecs map entry -func (m *SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc recover job params prev full sfdc server timestamp usecs map entry based on context it is used -func (m *SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry) UnmarshalBinary(b []byte) error { - var res SfdcRecoverJobParamsPrevFullSfdcServerTimestampUsecsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_recover_params.go b/v1/models/sfdc_recover_params.go deleted file mode 100644 index 9f3b6d82..00000000 --- a/v1/models/sfdc_recover_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcRecoverParams sfdc recover params -// -// swagger:model SfdcRecoverParams -type SfdcRecoverParams struct { - - // restore objects - RestoreObjects []*SfdcRestoreObject `json:"restoreObjects"` -} - -// Validate validates this sfdc recover params -func (m *SfdcRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRecoverParams) validateRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.RestoreObjects); i++ { - if swag.IsZero(m.RestoreObjects[i]) { // not required - continue - } - - if m.RestoreObjects[i] != nil { - if err := m.RestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc recover params based on the context it is used -func (m *SfdcRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRecoverParams) contextValidateRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreObjects); i++ { - - if m.RestoreObjects[i] != nil { - - if swag.IsZero(m.RestoreObjects[i]) { // not required - return nil - } - - if err := m.RestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRecoverParams) UnmarshalBinary(b []byte) error { - var res SfdcRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_restore_object.go b/v1/models/sfdc_restore_object.go deleted file mode 100644 index 4c11ffd1..00000000 --- a/v1/models/sfdc_restore_object.go +++ /dev/null @@ -1,116 +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" -) - -// SfdcRestoreObject sfdc restore object -// -// swagger:model SfdcRestoreObject -type SfdcRestoreObject struct { - - // Magneto Entity id. - // If this is set, object_name/object_uuid should be empty. - EntityID *int64 `json:"entityId,omitempty"` - - // The original name of the object to be restored. - ObjectName *string `json:"objectName,omitempty"` - - // The specific params related to the object to be restored. - RestoreParams *SfdcRestoreObjectParams `json:"restoreParams,omitempty"` -} - -// Validate validates this sfdc restore object -func (m *SfdcRestoreObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRestoreObject) validateRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if m.RestoreParams != nil { - if err := m.RestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sfdc restore object based on the context it is used -func (m *SfdcRestoreObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcRestoreObject) contextValidateRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParams != nil { - - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if err := m.RestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRestoreObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRestoreObject) UnmarshalBinary(b []byte) error { - var res SfdcRestoreObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sfdc_restore_object_params.go b/v1/models/sfdc_restore_object_params.go deleted file mode 100644 index f0f8dd5a..00000000 --- a/v1/models/sfdc_restore_object_params.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/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcRestoreObjectParams Contains any additional parameters specific to the restore object. -// -// swagger:model SfdcRestoreObjectParams -type SfdcRestoreObjectParams struct { - - // This field contains the user provided query to select only subset of - // records in an object for recovery. This field is set only if restore_type - // is 'kRestoreFilter;. - FilterQuery *string `json:"filterQuery,omitempty"` - - // This field specifies whether to include the records in user selected - // object, that were marked as deleted in the user selected snapshot. - // This is applicable for restore types 'kRestoreObject' and 'kRestoreOrg'. - IncludeDeletedRecords *bool `json:"includeDeletedRecords,omitempty"` - - // The type of records to be returned. This is only applicable for restore - // type 'kRestoreFilter'. - MutationType *int32 `json:"mutationType,omitempty"` - - // The new name of the object, if it is going to be renamed. - NewObjectName *string `json:"newObjectName,omitempty"` - - // Restore selected records from user selected object. - // This field is set only if restore_type is 'kRestoreRecords'. - RecordIDVec []string `json:"recordIdVec"` - - // Please note that this restore_type is applicable only for the restore of - // Sfdc adapter. It is different from the Magneto infra field 'restore_type' - // that is applicable for all the Recovery tasks. - SfdcRestoreType *int32 `json:"sfdcRestoreType,omitempty"` -} - -// Validate validates this sfdc restore object params -func (m *SfdcRestoreObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc restore object params based on context it is used -func (m *SfdcRestoreObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRestoreObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRestoreObjectParams) UnmarshalBinary(b []byte) error { - var res SfdcRestoreObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/share.go b/v1/models/share.go deleted file mode 100644 index 8b3368bc..00000000 --- a/v1/models/share.go +++ /dev/null @@ -1,236 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Share Share. -// -// Specifies the share details when request is made for list of shares -// filtered by ShareName parameter. -// -// swagger:model Share -type Share struct { - - // Array of SMB Paths. - // - // Specifies the possible paths that can be used to mount this Share - // as a SMB share. If Active Directory has multiple account names; - // each machine account has its own path. - AllSmbMountPaths []string `json:"allSmbMountPaths"` - - // Specifies whether to enable filer audit log on this view alias. - EnableFilerAuditLog *bool `json:"enableFilerAuditLog,omitempty"` - - // Specifies the SMB encryption for the View Alias. If set, it enables the - // SMB encryption for the View Alias. Encryption is supported only by SMB 3.x - // dialects. Dialects that do not support would still access data in - // unencrypted format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // If set, it enables discovery of view alias for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View Alias. - // If set, encryption is enforced for all the sessions for the View Alias. - // When enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Specifies the path for mounting this Share as an NFS share. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Specifies the path information for this share. - Path *string `json:"path,omitempty"` - - // Specifies the path to access this View as an S3 share. - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - // The name of the share. - ShareName *string `json:"shareName,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies the main path for mounting this Share as an SMB share. - SmbMountPath *string `json:"smbMountPath,omitempty"` - - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View Alias. (Overrides the Subnets specified at the global - // Cohesity Cluster level and View level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this share. - SuperUserSids []string `json:"superUserSids"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the view name this share belongs to. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this share -func (m *Share) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Share) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Share) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this share based on the context it is used -func (m *Share) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Share) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Share) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Share) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Share) UnmarshalBinary(b []byte) error { - var res Share - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/share_point_restore_parameters.go b/v1/models/share_point_restore_parameters.go deleted file mode 100644 index 25706be1..00000000 --- a/v1/models/share_point_restore_parameters.go +++ /dev/null @@ -1,186 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SharePointRestoreParameters SharePoint Restore Parameters. -// -// Specifies information needed for recovering SharePoint Site and items. -// -// swagger:model SharePointRestoreParameters -type SharePointRestoreParameters struct { - - // Specifies whether the objects are to be restored to the original drive. - RestoreToOriginalSite *bool `json:"restoreToOriginalSite,omitempty"` - - // Specifies the list of SharePoint Sites whose Document Repositories are - // being restored. - SiteOwnerList []*SiteOwner `json:"siteOwnerList"` - - // Specifies the target document library name within the alternate site. - TargetDocumentLibraryName *string `json:"targetDocumentLibraryName,omitempty"` - - // Specifies a custom prefix for the document libraries when being restored - // to the original or an alternate site. - TargetDocumentLibraryPrefix *string `json:"targetDocumentLibraryPrefix,omitempty"` - - // Specifies the target site where the recovery of the entire Site or the - // Site items is to be done. - TargetSite *ProtectionSource `json:"targetSite,omitempty"` -} - -// Validate validates this share point restore parameters -func (m *SharePointRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSiteOwnerList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetSite(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharePointRestoreParameters) validateSiteOwnerList(formats strfmt.Registry) error { - if swag.IsZero(m.SiteOwnerList) { // not required - return nil - } - - for i := 0; i < len(m.SiteOwnerList); i++ { - if swag.IsZero(m.SiteOwnerList[i]) { // not required - continue - } - - if m.SiteOwnerList[i] != nil { - if err := m.SiteOwnerList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteOwnerList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteOwnerList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SharePointRestoreParameters) validateTargetSite(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if m.TargetSite != nil { - if err := m.TargetSite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// ContextValidate validate this share point restore parameters based on the context it is used -func (m *SharePointRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSiteOwnerList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetSite(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharePointRestoreParameters) contextValidateSiteOwnerList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SiteOwnerList); i++ { - - if m.SiteOwnerList[i] != nil { - - if swag.IsZero(m.SiteOwnerList[i]) { // not required - return nil - } - - if err := m.SiteOwnerList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteOwnerList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteOwnerList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SharePointRestoreParameters) contextValidateTargetSite(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetSite != nil { - - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if err := m.TargetSite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SharePointRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharePointRestoreParameters) UnmarshalBinary(b []byte) error { - var res SharePointRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sharep_point_site_backup_env_params.go b/v1/models/sharep_point_site_backup_env_params.go deleted file mode 100644 index e4ff3700..00000000 --- a/v1/models/sharep_point_site_backup_env_params.go +++ /dev/null @@ -1,172 +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" -) - -// SharepPointSiteBackupEnvParams Message to capture any additional backup params for SharePoint within the -// Office365 environment. -// -// swagger:model SharepPointSiteBackupEnvParams -type SharepPointSiteBackupEnvParams struct { - - // supported exclusion: - // doclib exclusion: whole doclib is excluded from backup. - // sample: /Doclib1, /Doclib1/ - // directory exclusion: specified path in doclib will be excluded - // from backup. - // sample: /Doclib1/folderA/forderB - // Doclibs can be specified by either - // a) Doclib name - eg, Documents. - // b) Drive id of doclib - b!ZMSl2JRm0UeXLHfHR1m-iuD10p0CIV9qSa6TtgM - // Regular expressions are not supported. If not specified, all the - // doclibs within sharepoint site will be protected. - DocLibFilteringPolicy *FilteringPolicyProto `json:"docLibFilteringPolicy,omitempty"` - - // Specifies the parameters for backing up Preservation Hold Library. - // Refer PreservationHoldLibraryProtectionParams for details. - PhlParams *PreservationHoldLibraryProtectionParams `json:"phlParams,omitempty"` -} - -// Validate validates this sharep point site backup env params -func (m *SharepPointSiteBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocLibFilteringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhlParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharepPointSiteBackupEnvParams) validateDocLibFilteringPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DocLibFilteringPolicy) { // not required - return nil - } - - if m.DocLibFilteringPolicy != nil { - if err := m.DocLibFilteringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("docLibFilteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("docLibFilteringPolicy") - } - return err - } - } - - return nil -} - -func (m *SharepPointSiteBackupEnvParams) validatePhlParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhlParams) { // not required - return nil - } - - if m.PhlParams != nil { - if err := m.PhlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("phlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("phlParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sharep point site backup env params based on the context it is used -func (m *SharepPointSiteBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDocLibFilteringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharepPointSiteBackupEnvParams) contextValidateDocLibFilteringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DocLibFilteringPolicy != nil { - - if swag.IsZero(m.DocLibFilteringPolicy) { // not required - return nil - } - - if err := m.DocLibFilteringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("docLibFilteringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("docLibFilteringPolicy") - } - return err - } - } - - return nil -} - -func (m *SharepPointSiteBackupEnvParams) contextValidatePhlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhlParams != nil { - - if swag.IsZero(m.PhlParams) { // not required - return nil - } - - if err := m.PhlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("phlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("phlParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SharepPointSiteBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepPointSiteBackupEnvParams) UnmarshalBinary(b []byte) error { - var res SharepPointSiteBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sharepoint_backup_source_params.go b/v1/models/sharepoint_backup_source_params.go deleted file mode 100644 index b108b6cd..00000000 --- a/v1/models/sharepoint_backup_source_params.go +++ /dev/null @@ -1,52 +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" -) - -// SharepointBackupSourceParams Message defining the object-level params for Sharepoint site backup. -// -// swagger:model SharepointBackupSourceParams -type SharepointBackupSourceParams struct { - - // Specifies to whether autoprotect the site entity or not. - // If this is set to true, the site entity and subsites of it are protected. - // If this is set to false, only the site entity is protected. - AutoprotectEntity *bool `json:"autoprotectEntity,omitempty"` -} - -// Validate validates this sharepoint backup source params -func (m *SharepointBackupSourceParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sharepoint backup source params based on context it is used -func (m *SharepointBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointBackupSourceParams) UnmarshalBinary(b []byte) error { - var res SharepointBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sharepoint_document_metadata.go b/v1/models/sharepoint_document_metadata.go deleted file mode 100644 index ae170be6..00000000 --- a/v1/models/sharepoint_document_metadata.go +++ /dev/null @@ -1,111 +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" -) - -// SharepointDocumentMetadata Sharepoint Site document metadata. -// -// Specifies the metadata for the Sharepoint Site document. -// -// swagger:model SharepointDocumentMetadata -type SharepointDocumentMetadata struct { - - // Specifies the type of site document(file/folder). - // Specifies the Sharepoint document type. - // - // 'kFile' specifies a file. - // 'kFolder' specifies a folder. - // Enum: ["kFile","kFolder"] - DocumentType *string `json:"documentType,omitempty"` -} - -// Validate validates this sharepoint document metadata -func (m *SharepointDocumentMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sharepointDocumentMetadataTypeDocumentTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sharepointDocumentMetadataTypeDocumentTypePropEnum = append(sharepointDocumentMetadataTypeDocumentTypePropEnum, v) - } -} - -const ( - - // SharepointDocumentMetadataDocumentTypeKFile captures enum value "kFile" - SharepointDocumentMetadataDocumentTypeKFile string = "kFile" - - // SharepointDocumentMetadataDocumentTypeKFolder captures enum value "kFolder" - SharepointDocumentMetadataDocumentTypeKFolder string = "kFolder" -) - -// prop value enum -func (m *SharepointDocumentMetadata) validateDocumentTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sharepointDocumentMetadataTypeDocumentTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SharepointDocumentMetadata) validateDocumentType(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentType) { // not required - return nil - } - - // value enum - if err := m.validateDocumentTypeEnum("documentType", "body", *m.DocumentType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sharepoint document metadata based on context it is used -func (m *SharepointDocumentMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointDocumentMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointDocumentMetadata) UnmarshalBinary(b []byte) error { - var res SharepointDocumentMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sharepoint_item_metadata.go b/v1/models/sharepoint_item_metadata.go deleted file mode 100644 index 40a0a344..00000000 --- a/v1/models/sharepoint_item_metadata.go +++ /dev/null @@ -1,50 +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" -) - -// SharepointItemMetadata Info about a sharepoint item. -// -// swagger:model SharepointItemMetadata -type SharepointItemMetadata struct { - - // type - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this sharepoint item metadata -func (m *SharepointItemMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sharepoint item metadata based on context it is used -func (m *SharepointItemMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointItemMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointItemMetadata) UnmarshalBinary(b []byte) error { - var res SharepointItemMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_backup_file.go b/v1/models/site_backup_file.go deleted file mode 100644 index 4af595bc..00000000 --- a/v1/models/site_backup_file.go +++ /dev/null @@ -1,58 +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" -) - -// SiteBackupFile Represents one site backup file item information. -// -// swagger:model SiteBackupFile -type SiteBackupFile struct { - - // Output file path on Windows proxy VM or on SMB share. This will be - // autogenerated when 'BackupSiteParam.data_dir_path' is empty. The file - // 'sitetemplate.pnp' in the directory contains the PnP site template. - FilePath *string `json:"filePath,omitempty"` - - // File size in bytes. - FileSize *int64 `json:"fileSize,omitempty"` - - // Type of file. - FileType *int32 `json:"fileType,omitempty"` -} - -// Validate validates this site backup file -func (m *SiteBackupFile) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this site backup file based on context it is used -func (m *SiteBackupFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SiteBackupFile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteBackupFile) UnmarshalBinary(b []byte) error { - var res SiteBackupFile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_backup_status.go b/v1/models/site_backup_status.go deleted file mode 100644 index 15d6168a..00000000 --- a/v1/models/site_backup_status.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SiteBackupStatus One site backup status. -// -// swagger:model SiteBackupStatus -type SiteBackupStatus struct { - - // List of backuped files. Its PnP package and any other files required to - // recover the site. - BackupFileVec []*SiteBackupFile `json:"backupFileVec"` - - // Actual options with which this site was backed up - // (BackupSiteArg.BackupSiteOptionFlags). - OptionFlags *uint32 `json:"optionFlags,omitempty"` - - // This site info is used during recovery to recover a full site. - SiteInfo *SiteInfo `json:"siteInfo,omitempty"` - - // Backup succeeded, but there were some warnings for user. For example we - // could not backup term store due to lack of permissions. - WarningVec []string `json:"warningVec"` -} - -// Validate validates this site backup status -func (m *SiteBackupStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupFileVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteBackupStatus) validateBackupFileVec(formats strfmt.Registry) error { - if swag.IsZero(m.BackupFileVec) { // not required - return nil - } - - for i := 0; i < len(m.BackupFileVec); i++ { - if swag.IsZero(m.BackupFileVec[i]) { // not required - continue - } - - if m.BackupFileVec[i] != nil { - if err := m.BackupFileVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupFileVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupFileVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteBackupStatus) validateSiteInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SiteInfo) { // not required - return nil - } - - if m.SiteInfo != nil { - if err := m.SiteInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this site backup status based on the context it is used -func (m *SiteBackupStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupFileVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteBackupStatus) contextValidateBackupFileVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupFileVec); i++ { - - if m.BackupFileVec[i] != nil { - - if swag.IsZero(m.BackupFileVec[i]) { // not required - return nil - } - - if err := m.BackupFileVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupFileVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupFileVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteBackupStatus) contextValidateSiteInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteInfo != nil { - - if swag.IsZero(m.SiteInfo) { // not required - return nil - } - - if err := m.SiteInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SiteBackupStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteBackupStatus) UnmarshalBinary(b []byte) error { - var res SiteBackupStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_continuity_info.go b/v1/models/site_continuity_info.go deleted file mode 100644 index e15976d2..00000000 --- a/v1/models/site_continuity_info.go +++ /dev/null @@ -1,60 +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" -) - -// SiteContinuityInfo SiteContinuityInfo holds information about the Site Continuity -// subscription such as if it is active or not. -// -// swagger:model SiteContinuityInfo -type SiteContinuityInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the DRaaS subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this site continuity info -func (m *SiteContinuityInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this site continuity info based on context it is used -func (m *SiteContinuityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SiteContinuityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteContinuityInfo) UnmarshalBinary(b []byte) error { - var res SiteContinuityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_drive_info.go b/v1/models/site_drive_info.go deleted file mode 100644 index 92a947b7..00000000 --- a/v1/models/site_drive_info.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SiteDriveInfo Site Drive Info. -// -// Specifies the Site's Document Library drive info. -// -// swagger:model SiteDriveInfo -type SiteDriveInfo struct { - - // Specifies the Id of the Drive. - DriveID *string `json:"driveId,omitempty"` - - // Specifies the Drive items such as files/folders. - DriveItemList []*SiteDriveItem `json:"driveItemList"` - - // Specifies the drive name for the document repsitory. Incase of drive Id - // not present, this field must be populated to trigger restore. - DriveName *string `json:"driveName,omitempty"` - - // Specifies whether entire drive is to be restored. This should be set to - // false if specific drive items are to be restored within 'DriveItemList'. - RestoreEntireDrive *bool `json:"restoreEntireDrive,omitempty"` -} - -// Validate validates this site drive info -func (m *SiteDriveInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveItemList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteDriveInfo) validateDriveItemList(formats strfmt.Registry) error { - if swag.IsZero(m.DriveItemList) { // not required - return nil - } - - for i := 0; i < len(m.DriveItemList); i++ { - if swag.IsZero(m.DriveItemList[i]) { // not required - continue - } - - if m.DriveItemList[i] != nil { - if err := m.DriveItemList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this site drive info based on the context it is used -func (m *SiteDriveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveItemList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteDriveInfo) contextValidateDriveItemList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveItemList); i++ { - - if m.DriveItemList[i] != nil { - - if swag.IsZero(m.DriveItemList[i]) { // not required - return nil - } - - if err := m.DriveItemList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveItemList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SiteDriveInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteDriveInfo) UnmarshalBinary(b []byte) error { - var res SiteDriveInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_drive_item.go b/v1/models/site_drive_item.go deleted file mode 100644 index 54d7dec4..00000000 --- a/v1/models/site_drive_item.go +++ /dev/null @@ -1,58 +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" -) - -// SiteDriveItem Site Drive Item. -// -// Specifies details about a Site's Drive item. -// -// swagger:model SiteDriveItem -type SiteDriveItem struct { - - // Specifies whether the current item is a file or not. - IsFileItem *bool `json:"isFileItem,omitempty"` - - // Specifies the Id of the Drive item. - ItemID *string `json:"itemId,omitempty"` - - // Specifies the path of the Drive item within the drive. - ItemPath *string `json:"itemPath,omitempty"` -} - -// Validate validates this site drive item -func (m *SiteDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this site drive item based on context it is used -func (m *SiteDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SiteDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteDriveItem) UnmarshalBinary(b []byte) error { - var res SiteDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_identity.go b/v1/models/site_identity.go deleted file mode 100644 index 32068277..00000000 --- a/v1/models/site_identity.go +++ /dev/null @@ -1,67 +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" -) - -// SiteIdentity O365 Sharepoint online Site Identity. These may be obtained by Graph/REST or -// PnP cmdlets. All fields are case insensitive. -// -// swagger:model SiteIdentity -type SiteIdentity struct { - - // Unique guid for the site in SPO. This is a unqiue identifier that can be - // used to compare sites. - ID *string `json:"id,omitempty"` - - // Optional ServerRelativeUrl. Not required. - ServerRelativeurl *string `json:"serverRelativeurl,omitempty"` - - // Optional Title of site for display and logging purpose. Not mandatory. - Title *string `json:"title,omitempty"` - - // Full Url of the site. Its of the form - // https://yourtenant.sharepoint.com/sites/yoursite or - // https://yourtenant.sharepoint.com/yoursite - // This parameter is required for all PnP operations. - URL *string `json:"url,omitempty"` - - // Unique guid for the site root web. - Webid *string `json:"webid,omitempty"` -} - -// Validate validates this site identity -func (m *SiteIdentity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this site identity based on context it is used -func (m *SiteIdentity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SiteIdentity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteIdentity) UnmarshalBinary(b []byte) error { - var res SiteIdentity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_info.go b/v1/models/site_info.go deleted file mode 100644 index 379dc674..00000000 --- a/v1/models/site_info.go +++ /dev/null @@ -1,370 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SiteInfo Information about the site backed up that is used to restore. For example -// we need to create the extract site type that was backed up if the site does -// not exist. All fields are case insensitive. This is an aggregation of all -// required and optional parameters in New-PnPSite/New-TenantSite/New-PnPWeb -// cmdlets. -// -// swagger:model SiteInfo -type SiteInfo struct { - - // Site classification assigned by administrator. - Classification *string `json:"classification,omitempty"` - - // Compatibility level . Its the site's compatibility to SPO server version. - CompatibilityLevel *int32 `json:"compatibilityLevel,omitempty"` - - // Admin entered description of this site. - Description *string `json:"description,omitempty"` - - // Needed for site collection create. Maps to CommunicationSiteDesign enum - // (Topic = 0,Showcase = 1,Blank = 2) - Design *string `json:"design,omitempty"` - - // Design template id. - DesignID *string `json:"designId,omitempty"` - - // Geo location of the site. - Geolocation *string `json:"geolocation,omitempty"` - - // Group Id to which this site belongs. - GroupID *string `json:"groupId,omitempty"` - - // If it is a hub member site, the parent hub site id. - HubsiteID *string `json:"hubsiteId,omitempty"` - - // If it is a hub member site, the parent hub site url. This can be used to - // restore a hub site member to same hub site even when the site is deleted - // and recreated or across tenants. - HubsiteURL *string `json:"hubsiteUrl,omitempty"` - - // Is it a Hub? This will be false for a hub member. - IsHubsite *bool `json:"isHubsite,omitempty"` - - // Site is multilingual, needs to get multilingual resource pages. - IsMultilingual *bool `json:"isMultilingual,omitempty"` - - // Is this a personal site with 'https://*-my.sharepoint.com/*' pattern. - IsPersonalsite *bool `json:"isPersonalsite,omitempty"` - - // Is this a public or private site? - IsPublic *bool `json:"isPublic,omitempty"` - - // Is this a subsite or root site? If this is a subsite, it will inherit the - // template of root site. - IsSubsite *bool `json:"isSubsite,omitempty"` - - // Site LcId=1033 etc.. - Lcid *int32 `json:"lcid,omitempty"` - - // Locale id of the site. Normally 1033 for US English locale. - LocaleID *int32 `json:"localeId,omitempty"` - - // Owner. This is an email. Note that across tenants, this email address may - // be invalid. user@tenant.com. At least one owner must be there. - OwnerVec []string `json:"ownerVec"` - - // Site is read-only, locked, and unavailable for write access. - ReadOnly *bool `json:"readOnly,omitempty"` - - // Rootwebid. - RootWebID *string `json:"rootWebId,omitempty"` - - // Site identifier echo. - Site *SiteIdentity `json:"site,omitempty"` - - // Vector of sites collection properties (for classic site collections). Got - // from Get-PnPSite. - SitepropVec []*SiteProperty `json:"sitepropVec"` - - // Site Template such as GROUP#0, POINTPUBLISHINGTOPIC#0,... - Template *string `json:"template,omitempty"` - - // Vector of tenant sites collection properties (for modern site - // collections). Got from Get-PnPTenantSite. - TenantsitepropVec []*SiteProperty `json:"tenantsitepropVec"` - - // Timezone Id. This is needed to create a site collection(tenant site). - TimezoneID *int32 `json:"timezoneId,omitempty"` - - // Vector of sites collection properties (for subsites). Got from Get-PnPWeb. - WebpropVec []*SiteProperty `json:"webpropVec"` -} - -// Validate validates this site info -func (m *SiteInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSite(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSitepropVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantsitepropVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWebpropVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteInfo) validateSite(formats strfmt.Registry) error { - if swag.IsZero(m.Site) { // not required - return nil - } - - if m.Site != nil { - if err := m.Site.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("site") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("site") - } - return err - } - } - - return nil -} - -func (m *SiteInfo) validateSitepropVec(formats strfmt.Registry) error { - if swag.IsZero(m.SitepropVec) { // not required - return nil - } - - for i := 0; i < len(m.SitepropVec); i++ { - if swag.IsZero(m.SitepropVec[i]) { // not required - continue - } - - if m.SitepropVec[i] != nil { - if err := m.SitepropVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitepropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitepropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteInfo) validateTenantsitepropVec(formats strfmt.Registry) error { - if swag.IsZero(m.TenantsitepropVec) { // not required - return nil - } - - for i := 0; i < len(m.TenantsitepropVec); i++ { - if swag.IsZero(m.TenantsitepropVec[i]) { // not required - continue - } - - if m.TenantsitepropVec[i] != nil { - if err := m.TenantsitepropVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantsitepropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantsitepropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteInfo) validateWebpropVec(formats strfmt.Registry) error { - if swag.IsZero(m.WebpropVec) { // not required - return nil - } - - for i := 0; i < len(m.WebpropVec); i++ { - if swag.IsZero(m.WebpropVec[i]) { // not required - continue - } - - if m.WebpropVec[i] != nil { - if err := m.WebpropVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("webpropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("webpropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this site info based on the context it is used -func (m *SiteInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSite(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSitepropVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantsitepropVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWebpropVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteInfo) contextValidateSite(ctx context.Context, formats strfmt.Registry) error { - - if m.Site != nil { - - if swag.IsZero(m.Site) { // not required - return nil - } - - if err := m.Site.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("site") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("site") - } - return err - } - } - - return nil -} - -func (m *SiteInfo) contextValidateSitepropVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SitepropVec); i++ { - - if m.SitepropVec[i] != nil { - - if swag.IsZero(m.SitepropVec[i]) { // not required - return nil - } - - if err := m.SitepropVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitepropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitepropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteInfo) contextValidateTenantsitepropVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TenantsitepropVec); i++ { - - if m.TenantsitepropVec[i] != nil { - - if swag.IsZero(m.TenantsitepropVec[i]) { // not required - return nil - } - - if err := m.TenantsitepropVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantsitepropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantsitepropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteInfo) contextValidateWebpropVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WebpropVec); i++ { - - if m.WebpropVec[i] != nil { - - if swag.IsZero(m.WebpropVec[i]) { // not required - return nil - } - - if err := m.WebpropVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("webpropVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("webpropVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SiteInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteInfo) UnmarshalBinary(b []byte) error { - var res SiteInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_owner.go b/v1/models/site_owner.go deleted file mode 100644 index bcf2667b..00000000 --- a/v1/models/site_owner.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SiteOwner Site Owner. -// -// Specifies the details about a SharePoint Site owner. -// -// swagger:model SiteOwner -type SiteOwner struct { - - // Specifies the Document Libraries within a Site which are to be restored. - DriveInfoList []*SiteDriveInfo `json:"driveInfoList"` - - // Specifies the details about the SharePoint Site to which drives belong. - SiteDetailObject *RestoreObjectDetails `json:"siteDetailObject,omitempty"` -} - -// Validate validates this site owner -func (m *SiteOwner) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDriveInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteDetailObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteOwner) validateDriveInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.DriveInfoList) { // not required - return nil - } - - for i := 0; i < len(m.DriveInfoList); i++ { - if swag.IsZero(m.DriveInfoList[i]) { // not required - continue - } - - if m.DriveInfoList[i] != nil { - if err := m.DriveInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteOwner) validateSiteDetailObject(formats strfmt.Registry) error { - if swag.IsZero(m.SiteDetailObject) { // not required - return nil - } - - if m.SiteDetailObject != nil { - if err := m.SiteDetailObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteDetailObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteDetailObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this site owner based on the context it is used -func (m *SiteOwner) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDriveInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteDetailObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SiteOwner) contextValidateDriveInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DriveInfoList); i++ { - - if m.DriveInfoList[i] != nil { - - if swag.IsZero(m.DriveInfoList[i]) { // not required - return nil - } - - if err := m.DriveInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("driveInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SiteOwner) contextValidateSiteDetailObject(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteDetailObject != nil { - - if swag.IsZero(m.SiteDetailObject) { // not required - return nil - } - - if err := m.SiteDetailObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteDetailObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteDetailObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SiteOwner) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteOwner) UnmarshalBinary(b []byte) error { - var res SiteOwner - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/site_property.go b/v1/models/site_property.go deleted file mode 100644 index edbb3d0d..00000000 --- a/v1/models/site_property.go +++ /dev/null @@ -1,60 +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" -) - -// SiteProperty Generic site Property structure to store site properties. Some of these -// site properties are not captured by Get-PnpProvisioningTemplate cmdlet. So -// they may need to be set outside of Appy-PnPProvisoningTemplate cmdlet. -// -// swagger:model SiteProperty -type SiteProperty struct { - - // PnP data type of the property ('string', 'mvstring', 'bool', - // 'guid','','int', 'int64', etc.) - Datatype *string `json:"datatype,omitempty"` - - // Name of the property returned by Get-PnPSite, - // Get-PnPTenantSite, Get-PnPWeb, or other cmdlets. - Name *string `json:"name,omitempty"` - - // Property value represented as string. - Value *string `json:"value,omitempty"` -} - -// Validate validates this site property -func (m *SiteProperty) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this site property based on context it is used -func (m *SiteProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SiteProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SiteProperty) UnmarshalBinary(b []byte) error { - var res SiteProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sites_discovery_params.go b/v1/models/sites_discovery_params.go deleted file mode 100644 index f7b05102..00000000 --- a/v1/models/sites_discovery_params.go +++ /dev/null @@ -1,54 +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" -) - -// SitesDiscoveryParams Source discovery parameters for kSite entity type. -// -// Specifies discovery params for kSite entities. It should only be populated -// when the 'DiscoveryParams.discoverableObjectTypeList' includes 'kSites'. -// -// swagger:model SitesDiscoveryParams -type SitesDiscoveryParams struct { - - // Specifies whether the SharePoint Sites will be tagged whether they belong - // to a group site or teams site. - EnableSiteTagging *bool `json:"enableSiteTagging,omitempty"` -} - -// Validate validates this sites discovery params -func (m *SitesDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sites discovery params based on context it is used -func (m *SitesDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SitesDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SitesDiscoveryParams) UnmarshalBinary(b []byte) error { - var res SitesDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/size_info.go b/v1/models/size_info.go deleted file mode 100644 index 6244763d..00000000 --- a/v1/models/size_info.go +++ /dev/null @@ -1,56 +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" -) - -// SizeInfo Message to capture the size information of an object or its snapshot. The -// calculation method can vary depending on the adapter and based on the -// evolving needs. E.g. This information can be used for billing calculations -// in DMaaS. -// -// swagger:model SizeInfo -type SizeInfo struct { - - // The computation method used for "size_bytes". - ComputationMethod *int32 `json:"computationMethod,omitempty"` - - // Size in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this size info -func (m *SizeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this size info based on context it is used -func (m *SizeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SizeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SizeInfo) UnmarshalBinary(b []byte) error { - var res SizeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_active_file_opens_response.go b/v1/models/smb_active_file_opens_response.go deleted file mode 100644 index a17c0127..00000000 --- a/v1/models/smb_active_file_opens_response.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbActiveFileOpensResponse SMB Active File Open Response. -// -// Query response to SMB active file opens. -// -// swagger:model SmbActiveFileOpensResponse -type SmbActiveFileOpensResponse struct { - - // Specifies the active opens for an SMB file in a view. - ActiveFilePaths []*SmbActiveFilePath `json:"activeFilePaths"` - - // Specifies an opaque string to pass to get the next set of active opens. - // If null is returned, this response is the last set of active opens. - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this smb active file opens response -func (m *SmbActiveFileOpensResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveFilePaths(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFileOpensResponse) validateActiveFilePaths(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveFilePaths) { // not required - return nil - } - - for i := 0; i < len(m.ActiveFilePaths); i++ { - if swag.IsZero(m.ActiveFilePaths[i]) { // not required - continue - } - - if m.ActiveFilePaths[i] != nil { - if err := m.ActiveFilePaths[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb active file opens response based on the context it is used -func (m *SmbActiveFileOpensResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveFilePaths(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFileOpensResponse) contextValidateActiveFilePaths(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveFilePaths); i++ { - - if m.ActiveFilePaths[i] != nil { - - if swag.IsZero(m.ActiveFilePaths[i]) { // not required - return nil - } - - if err := m.ActiveFilePaths[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveFileOpensResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveFileOpensResponse) UnmarshalBinary(b []byte) error { - var res SmbActiveFileOpensResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_active_file_path.go b/v1/models/smb_active_file_path.go deleted file mode 100644 index d5a61202..00000000 --- a/v1/models/smb_active_file_path.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbActiveFilePath Active SMB file path. -// -// Specifies a file path in an SMB view that has active sessions and opens. -// -// swagger:model SmbActiveFilePath -type SmbActiveFilePath struct { - - // Specifies the sessions where the file is open. - ActiveSessions []*SmbActiveSession `json:"activeSessions"` - - // Specifies the filepath in the view. - FilePath *string `json:"filePath,omitempty"` - - // Specifies the id of the View assigned by the Cohesity Cluster. - // Either viewName or viewId must be specified. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the name of the View. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this smb active file path -func (m *SmbActiveFilePath) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveSessions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFilePath) validateActiveSessions(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveSessions) { // not required - return nil - } - - for i := 0; i < len(m.ActiveSessions); i++ { - if swag.IsZero(m.ActiveSessions[i]) { // not required - continue - } - - if m.ActiveSessions[i] != nil { - if err := m.ActiveSessions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb active file path based on the context it is used -func (m *SmbActiveFilePath) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveSessions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFilePath) contextValidateActiveSessions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveSessions); i++ { - - if m.ActiveSessions[i] != nil { - - if swag.IsZero(m.ActiveSessions[i]) { // not required - return nil - } - - if err := m.ActiveSessions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveFilePath) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveFilePath) UnmarshalBinary(b []byte) error { - var res SmbActiveFilePath - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_active_open.go b/v1/models/smb_active_open.go deleted file mode 100644 index 72d59b9c..00000000 --- a/v1/models/smb_active_open.go +++ /dev/null @@ -1,214 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SmbActiveOpen SMB Active Open File. -// -// Specifies an active open of an SMB file, its access and sharing information. -// -// swagger:model SmbActiveOpen -type SmbActiveOpen struct { - - // Specifies the access information. - // 'kFileReadData' indicates the right to read data from the file or named - // pipe. - // 'kFileWriteData' indicates the right to write data into the file or named - // pipe beyond the end of the file. - // 'kFileAppendData' indicates the right to append data into the file or named - // pipe. - // 'kFileReadEa' indicates the right to read the extended attributes of the - // file or named pipe. - // 'kFileWriteEa' indicates the right to write or change the extended - // attributes to the file or named pipe. - // 'kFileExecute' indicates the right to delete entries within a directory. - // 'kFileDeleteChild' indicates the right to execute the file. - // 'kFileReadAttributes' indicates the right to read the attributes of the - // file. - // 'kFileWriteAttributes' indicates the right to change the attributes of the - // file. - // 'kDelete' indicates the right to delete the file. - // 'kReadControl' indicates the right to read the security descriptor for the - // file or named pipe. - // 'kWriteDac' indicates the right to change the discretionary access control - // list (DACL) in the security descriptor for the file or named pipe. For - // the DACL data structure, see ACL in [MS-DTYP]. - // 'kWriteOwner' indicates the right to change the owner in the security - // descriptor for the file or named pipe. - // 'kSynchronize' is used only by SMB2 clients. - // 'kAccessSystemSecurity' indicates the right to read or change the system - // access control list (SACL) in the security descriptor for the file or - // named pipe. For the SACL data structure, see ACL in [MS-DTYP].<42> - // 'kMaximumAllowed' indicates that the client is requesting an open to the - // file with the highest level of access the client has on this file. - // If no access is granted for the client on this file, the server MUST - // fail the open with STATUS_ACCESS_DENIED. - // 'kGenericAll' indicates a request for all the access flags that are - // previously listed except kMaximumAllowed and kAccessSystemSecurity. - // 'kGenericExecute' indicates a request for the following combination of - // access flags listed above: - // kFileReadAttributes| kFileExecute| kSynchronize| kReadControl. - // 'kGenericWrite' indicates a request for the following combination of - // access flags listed above: - // kFileWriteData| kFileAppendData| kFileWriteAttributes| kFileWriteEa| - // kSynchronize| kReadControl. - // 'kGenericRead' indicates a request for the following combination of - // access flags listed above: - // kFileReadData| kFileReadAttributes| kFileReadEa| kSynchronize| - // kReadControl. - AccessInfoList []string `json:"accessInfoList"` - - // Specifies the SMB lease info of the open item. - LeaseInfo *SmbLeaseInfo `json:"leaseInfo,omitempty"` - - // Specifies the id of the active open. - OpenID *int64 `json:"openId,omitempty"` - - // Specifies whether others are allowed to delete. - OthersCanDelete *bool `json:"othersCanDelete,omitempty"` - - // Specifies whether others are allowed to read. - OthersCanRead *bool `json:"othersCanRead,omitempty"` - - // Specifies whether others are allowed to write. - OthersCanWrite *bool `json:"othersCanWrite,omitempty"` -} - -// Validate validates this smb active open -func (m *SmbActiveOpen) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLeaseInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var smbActiveOpenAccessInfoListItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFileReadData","kFileWriteData","kFileAppendData","kFileReadEa","kFileWriteEa","kFileExecute","kFileDeleteChild","kFileReadAttributes","kFileWriteAttributes","kDelete","kReadControl","kWriteDac","kWriteOwner","kSynchronize","kAccessSystemSecurity","kMaximumAllowed","kGenericAll","kGenericExecute","kGenericWrite","kGenericRead"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbActiveOpenAccessInfoListItemsEnum = append(smbActiveOpenAccessInfoListItemsEnum, v) - } -} - -func (m *SmbActiveOpen) validateAccessInfoListItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbActiveOpenAccessInfoListItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbActiveOpen) validateAccessInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.AccessInfoList) { // not required - return nil - } - - for i := 0; i < len(m.AccessInfoList); i++ { - - // value enum - if err := m.validateAccessInfoListItemsEnum("accessInfoList"+"."+strconv.Itoa(i), "body", m.AccessInfoList[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *SmbActiveOpen) validateLeaseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LeaseInfo) { // not required - return nil - } - - if m.LeaseInfo != nil { - if err := m.LeaseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leaseInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this smb active open based on the context it is used -func (m *SmbActiveOpen) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLeaseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveOpen) contextValidateLeaseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LeaseInfo != nil { - - if swag.IsZero(m.LeaseInfo) { // not required - return nil - } - - if err := m.LeaseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leaseInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveOpen) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveOpen) UnmarshalBinary(b []byte) error { - var res SmbActiveOpen - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_active_session.go b/v1/models/smb_active_session.go deleted file mode 100644 index 0716fe63..00000000 --- a/v1/models/smb_active_session.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbActiveSession SMB Active Session. -// -// Specifies an active session and its opens. -// -// swagger:model SmbActiveSession -type SmbActiveSession struct { - - // Specifies the list of active opens of the file in this session. - ActiveOpens []*SmbActiveOpen `json:"activeOpens"` - - // Specifies the IP address from which the file is still open. - ClientIP *string `json:"clientIp,omitempty"` - - // Specifies the domain of the user. - Domain *string `json:"domain,omitempty"` - - // Specifies the IP address of the server where the file exists. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the id of the session. - SessionID *int64 `json:"sessionId,omitempty"` - - // Specifies the username who keeps the file open. - Username *string `json:"username,omitempty"` -} - -// Validate validates this smb active session -func (m *SmbActiveSession) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveOpens(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveSession) validateActiveOpens(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveOpens) { // not required - return nil - } - - for i := 0; i < len(m.ActiveOpens); i++ { - if swag.IsZero(m.ActiveOpens[i]) { // not required - continue - } - - if m.ActiveOpens[i] != nil { - if err := m.ActiveOpens[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb active session based on the context it is used -func (m *SmbActiveSession) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveOpens(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveSession) contextValidateActiveOpens(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveOpens); i++ { - - if m.ActiveOpens[i] != nil { - - if swag.IsZero(m.ActiveOpens[i]) { // not required - return nil - } - - if err := m.ActiveOpens[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveSession) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveSession) UnmarshalBinary(b []byte) error { - var res SmbActiveSession - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_connection.go b/v1/models/smb_connection.go deleted file mode 100644 index c5dc0126..00000000 --- a/v1/models/smb_connection.go +++ /dev/null @@ -1,78 +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" -) - -// SmbConnection smb connection -// -// swagger:model SmbConnection -type SmbConnection struct { - - // Specifies the Client IP address of the connection. - ClientIP *string `json:"clientIp,omitempty"` - - // Domain name of the corresponding user. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a Node IP address where the connection request is received. - NodeIP *string `json:"nodeIp,omitempty"` - - // Mount path. - Path *string `json:"path,omitempty"` - - // Specifies the Server IP address of the connection. - // This could be a VIP, VLAN IP, or node IP on the Cluster. - ServerIP *string `json:"serverIp,omitempty"` - - // Session id. - SessionID *int64 `json:"sessionId,omitempty"` - - // List of SIDs in the SMB session token. - Sids []string `json:"sids"` - - // User name used to login for this session. - UserName *string `json:"userName,omitempty"` - - // Specifies the id of the view. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this smb connection -func (m *SmbConnection) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this smb connection based on context it is used -func (m *SmbConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbConnection) UnmarshalBinary(b []byte) error { - var res SmbConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_lease_info.go b/v1/models/smb_lease_info.go deleted file mode 100644 index a2b52992..00000000 --- a/v1/models/smb_lease_info.go +++ /dev/null @@ -1,56 +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" -) - -// SmbLeaseInfo SmbLeaseInfo specifies the SMB lease info of the open item. -// -// swagger:model SmbLeaseInfo -type SmbLeaseInfo struct { - - // Whether lease break is in progress - IsBreaking *bool `json:"isBreaking,omitempty"` - - // Lease type that is attempted to being broken. - LeaseBreakType []string `json:"leaseBreakType"` - - // Lease type granted for open. - LeaseTye []string `json:"leaseTye"` -} - -// Validate validates this smb lease info -func (m *SmbLeaseInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this smb lease info based on context it is used -func (m *SmbLeaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbLeaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbLeaseInfo) UnmarshalBinary(b []byte) error { - var res SmbLeaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_permission.go b/v1/models/smb_permission.go deleted file mode 100644 index 0c4c383f..00000000 --- a/v1/models/smb_permission.go +++ /dev/null @@ -1,271 +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" -) - -// SmbPermission SMB Permission. -// -// Specifies information about a single SMB permission. -// -// swagger:model SmbPermission -type SmbPermission struct { - - // Specifies the read/write access to the SMB share. - // 'kReadyOnly' indicates read only access to the SMB share. - // 'kReadWrite' indicates read and write access to the SMB share. - // 'kFullControl' indicates full administrative control of the SMB share. - // 'kSpecialAccess' indicates custom permissions to the SMB share using - // access masks structures. - // Enum: ["kReadOnly","kReadWrite","kModify","kFullControl","kSpecialAccess"] - Access *string `json:"access,omitempty"` - - // Specifies how the permission should be applied to folders and/or files. - // 'kFolderSubFoldersAndFiles' indicates that permissions are applied to a Folder - // and it's sub folders and files. - // 'kFolderAndSubFolders' indicates that permissions are applied to a Folder and it's sub folders. - // 'kFolderAndSubFiles' indicates that permissions are applied to a Folder and it's sub files. - // 'kFolderOnly' indicates that permsission are applied to folder only. - // 'kSubFoldersAndFilesOnly' indicates that permissions are applied to sub folders and files only. - // 'kSubFoldersOnly' indicates that permissiona are applied to sub folders only. - // 'kFilesOnly' indicates that permissions are applied to files only. - // Enum: ["kFolderSubFoldersAndFiles","kFolderAndSubFolders","kFolderAndFiles","kFolderOnly","kSubFoldersAndFilesOnly","kSubFoldersOnly","kFilesOnly"] - Mode *string `json:"mode,omitempty"` - - // Specifies the security identifier (SID) of the principal. - Sid *string `json:"sid,omitempty"` - - // Specifies custom access permissions. - // When the access mask from the Access Control Entry (ACE) cannot be mapped - // to one of the enums in 'access', this field is populated - // with the custom mask derived from the ACE and 'access' is set - // to kSpecialAccess. - // This is a placeholder for storing an unmapped access permission and should - // not be set when creating and editing a View. - SpecialAccessMask *uint32 `json:"specialAccessMask,omitempty"` - - // Specifies a custom type. - // When the type from the Access Control Entry (ACE) cannot be mapped - // to one of the enums in 'type', this field is populated with the custom - // type derived from the ACE and 'type' is set to kSpecialType. - // This is a placeholder for storing an unmapped type and should - // not be set when creating and editing a View. - SpecialType *int32 `json:"specialType,omitempty"` - - // Specifies the type of permission. - // 'kAllow' indicates access is allowed. - // 'kDeny' indicates access is denied. - // 'kSpecialType' indicates a type defined in the Access Control Entry (ACE) - // does not map to 'kAllow' or 'kDeny'. - // Enum: ["kAllow","kDeny","kSpecialType"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this smb permission -func (m *SmbPermission) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var smbPermissionTypeAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kReadOnly","kReadWrite","kModify","kFullControl","kSpecialAccess"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeAccessPropEnum = append(smbPermissionTypeAccessPropEnum, v) - } -} - -const ( - - // SmbPermissionAccessKReadOnly captures enum value "kReadOnly" - SmbPermissionAccessKReadOnly string = "kReadOnly" - - // SmbPermissionAccessKReadWrite captures enum value "kReadWrite" - SmbPermissionAccessKReadWrite string = "kReadWrite" - - // SmbPermissionAccessKModify captures enum value "kModify" - SmbPermissionAccessKModify string = "kModify" - - // SmbPermissionAccessKFullControl captures enum value "kFullControl" - SmbPermissionAccessKFullControl string = "kFullControl" - - // SmbPermissionAccessKSpecialAccess captures enum value "kSpecialAccess" - SmbPermissionAccessKSpecialAccess string = "kSpecialAccess" -) - -// prop value enum -func (m *SmbPermission) validateAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateAccess(formats strfmt.Registry) error { - if swag.IsZero(m.Access) { // not required - return nil - } - - // value enum - if err := m.validateAccessEnum("access", "body", *m.Access); err != nil { - return err - } - - return nil -} - -var smbPermissionTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFolderSubFoldersAndFiles","kFolderAndSubFolders","kFolderAndFiles","kFolderOnly","kSubFoldersAndFilesOnly","kSubFoldersOnly","kFilesOnly"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeModePropEnum = append(smbPermissionTypeModePropEnum, v) - } -} - -const ( - - // SmbPermissionModeKFolderSubFoldersAndFiles captures enum value "kFolderSubFoldersAndFiles" - SmbPermissionModeKFolderSubFoldersAndFiles string = "kFolderSubFoldersAndFiles" - - // SmbPermissionModeKFolderAndSubFolders captures enum value "kFolderAndSubFolders" - SmbPermissionModeKFolderAndSubFolders string = "kFolderAndSubFolders" - - // SmbPermissionModeKFolderAndFiles captures enum value "kFolderAndFiles" - SmbPermissionModeKFolderAndFiles string = "kFolderAndFiles" - - // SmbPermissionModeKFolderOnly captures enum value "kFolderOnly" - SmbPermissionModeKFolderOnly string = "kFolderOnly" - - // SmbPermissionModeKSubFoldersAndFilesOnly captures enum value "kSubFoldersAndFilesOnly" - SmbPermissionModeKSubFoldersAndFilesOnly string = "kSubFoldersAndFilesOnly" - - // SmbPermissionModeKSubFoldersOnly captures enum value "kSubFoldersOnly" - SmbPermissionModeKSubFoldersOnly string = "kSubFoldersOnly" - - // SmbPermissionModeKFilesOnly captures enum value "kFilesOnly" - SmbPermissionModeKFilesOnly string = "kFilesOnly" -) - -// prop value enum -func (m *SmbPermission) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -var smbPermissionTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAllow","kDeny","kSpecialType"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeTypePropEnum = append(smbPermissionTypeTypePropEnum, v) - } -} - -const ( - - // SmbPermissionTypeKAllow captures enum value "kAllow" - SmbPermissionTypeKAllow string = "kAllow" - - // SmbPermissionTypeKDeny captures enum value "kDeny" - SmbPermissionTypeKDeny string = "kDeny" - - // SmbPermissionTypeKSpecialType captures enum value "kSpecialType" - SmbPermissionTypeKSpecialType string = "kSpecialType" -) - -// prop value enum -func (m *SmbPermission) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this smb permission based on context it is used -func (m *SmbPermission) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbPermission) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbPermission) UnmarshalBinary(b []byte) error { - var res SmbPermission - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_permissions_info.go b/v1/models/smb_permissions_info.go deleted file mode 100644 index 2ec40bca..00000000 --- a/v1/models/smb_permissions_info.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbPermissionsInfo SMB Permissions Information. -// -// Specifies information about SMB permissions. -// -// swagger:model SmbPermissionsInfo -type SmbPermissionsInfo struct { - - // Specifies the security identifier (SID) of the owner of the SMB share. - OwnerSid *string `json:"ownerSid,omitempty"` - - // Array of SMB Permissions. - // - // Specifies a list of SMB permissions. - Permissions []*SmbPermission `json:"permissions"` -} - -// Validate validates this smb permissions info -func (m *SmbPermissionsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbPermissionsInfo) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb permissions info based on the context it is used -func (m *SmbPermissionsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbPermissionsInfo) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbPermissionsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbPermissionsInfo) UnmarshalBinary(b []byte) error { - var res SmbPermissionsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/smb_principal.go b/v1/models/smb_principal.go deleted file mode 100644 index 136252e2..00000000 --- a/v1/models/smb_principal.go +++ /dev/null @@ -1,60 +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" -) - -// SmbPrincipal Specifies struct with SMB principal details. -// -// swagger:model SmbPrincipal -type SmbPrincipal struct { - - // Specifies domain name of the principal. - Domain *string `json:"domain,omitempty"` - - // Specifies name of the SMB principal which may be a group or user. - Name *string `json:"name,omitempty"` - - // Specifies unique Security ID (SID) of the principal that look similar to - // windows domain SID. - Sid *string `json:"sid,omitempty"` - - // Specifies the type. This can be a user or a group. - Type *string `json:"type,omitempty"` -} - -// Validate validates this smb principal -func (m *SmbPrincipal) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this smb principal based on context it is used -func (m *SmbPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbPrincipal) UnmarshalBinary(b []byte) error { - var res SmbPrincipal - 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 deleted file mode 100644 index 2dc1d548..00000000 --- a/v1/models/snapshot_archival_copy_policy.go +++ /dev/null @@ -1,409 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SnapshotArchivalCopyPolicy Snapshot Copy Archival Policy. -// -// Specifies settings for copying Snapshots External Targets (such as AWS or -// Tape). This also specifies the retention policy that should be applied to -// Snapshots after they have been copied to the specified target. -// -// swagger:model SnapshotArchivalCopyPolicy -type SnapshotArchivalCopyPolicy struct { - - // Specified the Id for a snapshot copy policy. This is generated when the - // policy is created. - ID *string `json:"Id,omitempty"` - - // The backup run type to which this copy policy applies to. If set, this - // will ensure that the first run in scheduled period of given type will be - // copied. If this isn't set, copy tasks will be generated as per - // other filters in the protection policy. Currently, it can only be set to - // Full. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies if Snapshots are copied from the first completely successful - // Job Run or the first partially successful Job Run occurring at the start - // of the replication schedule. - // If true, Snapshots are copied from the first Job Run occurring at the start - // of the replication schedule, even if first Job Run was not completely - // successful i.e. Snapshots were not captured for all Objects in the Job. - // If false, Snapshots are copied from the first Job Run occurring at the - // start of the replication schedule that was completely successful i.e. - // Snapshots for all the Objects in the Job were successfully captured. - CopyPartial *bool `json:"copyPartial,omitempty"` - - // Specifies WORM retention type for the copy target 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. - DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` - - // Specifies the number of days to retain copied Snapshots on the target. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists on - // the external target. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies a factor to multiply the periodicity by, to determine the copy - // schedule. - // For example if set to 2 and the periodicity is hourly, then Snapshots - // from the first eligible Job Run for every 2 hour period is copied. - Multiplier *int32 `json:"multiplier,omitempty"` - - // Specifies the frequency that Snapshots should be copied to the - // specified target. Used in combination with multiplier. - // 'kEvery' means that the Snapshot copy occurs after the number of - // Job Runs equals the number specified in the multiplier. - // 'kHour' means that the Snapshot copy occurs hourly at the frequency - // set in the multiplier, for example if multiplier is 2, the copy occurs - // every 2 hours. - // 'kDay' means that the Snapshot copy occurs daily at the frequency - // set in the multiplier. - // 'kWeek' means that the Snapshot copy occurs weekly at the frequency - // set in the multiplier. - // 'kMonth' means that the Snapshot copy occurs monthly at the frequency - // set in the multiplier. - // 'kYear' means that the Snapshot copy occurs yearly at the frequency - // set in the multiplier. - // Enum: ["kEvery","kHour","kDay","kWeek","kMonth","kYear"] - Periodicity *string `json:"periodicity,omitempty"` - - // Run timeouts after which a run will get cancelled. - RunTimeouts []*CancellationTimeoutParams `json:"runTimeouts"` - - // Specifies a the source cluster id from which the data must be archived. - SourceClusterID *int64 `json:"sourceClusterId,omitempty"` - - // target - Target *SnapshotArchivalCopyPolicyTarget `json:"target,omitempty"` -} - -// Validate validates this snapshot archival copy policy -func (m *SnapshotArchivalCopyPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotArchivalCopyPolicyTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotArchivalCopyPolicyTypeBackupRunTypePropEnum = append(snapshotArchivalCopyPolicyTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // SnapshotArchivalCopyPolicyBackupRunTypeKRegular captures enum value "kRegular" - SnapshotArchivalCopyPolicyBackupRunTypeKRegular string = "kRegular" - - // SnapshotArchivalCopyPolicyBackupRunTypeKFull captures enum value "kFull" - SnapshotArchivalCopyPolicyBackupRunTypeKFull string = "kFull" - - // SnapshotArchivalCopyPolicyBackupRunTypeKLog captures enum value "kLog" - SnapshotArchivalCopyPolicyBackupRunTypeKLog string = "kLog" - - // SnapshotArchivalCopyPolicyBackupRunTypeKSystem captures enum value "kSystem" - SnapshotArchivalCopyPolicyBackupRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *SnapshotArchivalCopyPolicy) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotArchivalCopyPolicyTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotArchivalCopyPolicy) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *SnapshotArchivalCopyPolicy) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -var snapshotArchivalCopyPolicyTypePeriodicityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEvery","kHour","kDay","kWeek","kMonth","kYear"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotArchivalCopyPolicyTypePeriodicityPropEnum = append(snapshotArchivalCopyPolicyTypePeriodicityPropEnum, v) - } -} - -const ( - - // SnapshotArchivalCopyPolicyPeriodicityKEvery captures enum value "kEvery" - SnapshotArchivalCopyPolicyPeriodicityKEvery string = "kEvery" - - // SnapshotArchivalCopyPolicyPeriodicityKHour captures enum value "kHour" - SnapshotArchivalCopyPolicyPeriodicityKHour string = "kHour" - - // SnapshotArchivalCopyPolicyPeriodicityKDay captures enum value "kDay" - SnapshotArchivalCopyPolicyPeriodicityKDay string = "kDay" - - // SnapshotArchivalCopyPolicyPeriodicityKWeek captures enum value "kWeek" - SnapshotArchivalCopyPolicyPeriodicityKWeek string = "kWeek" - - // SnapshotArchivalCopyPolicyPeriodicityKMonth captures enum value "kMonth" - SnapshotArchivalCopyPolicyPeriodicityKMonth string = "kMonth" - - // SnapshotArchivalCopyPolicyPeriodicityKYear captures enum value "kYear" - SnapshotArchivalCopyPolicyPeriodicityKYear string = "kYear" -) - -// prop value enum -func (m *SnapshotArchivalCopyPolicy) validatePeriodicityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotArchivalCopyPolicyTypePeriodicityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotArchivalCopyPolicy) validatePeriodicity(formats strfmt.Registry) error { - if swag.IsZero(m.Periodicity) { // not required - return nil - } - - // value enum - if err := m.validatePeriodicityEnum("periodicity", "body", *m.Periodicity); err != nil { - return err - } - - return nil -} - -func (m *SnapshotArchivalCopyPolicy) validateRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeouts); i++ { - if swag.IsZero(m.RunTimeouts[i]) { // not required - continue - } - - if m.RunTimeouts[i] != nil { - if err := m.RunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotArchivalCopyPolicy) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this snapshot archival copy policy based on the context it is used -func (m *SnapshotArchivalCopyPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotArchivalCopyPolicy) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *SnapshotArchivalCopyPolicy) contextValidateRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeouts); i++ { - - if m.RunTimeouts[i] != nil { - - if swag.IsZero(m.RunTimeouts[i]) { // not required - return nil - } - - if err := m.RunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *SnapshotArchivalCopyPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotArchivalCopyPolicy) UnmarshalBinary(b []byte) error { - var res SnapshotArchivalCopyPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_attempt.go b/v1/models/snapshot_attempt.go deleted file mode 100644 index e432a456..00000000 --- a/v1/models/snapshot_attempt.go +++ /dev/null @@ -1,61 +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" -) - -// SnapshotAttempt Snapshot Attempt. -// -// Specifies information about a single snapshot. -// -// swagger:model SnapshotAttempt -type SnapshotAttempt struct { - - // Specifies the number of the attempts made by the Job Run - // to capture a snapshot of the object. For example, if an snapshot - // is successfully captured after three attempts, this field equals 3. - AttemptNumber *int64 `json:"attemptNumber,omitempty"` - - // Specifies the id of the Job Run that captured the snapshot. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the time when the Job Run starts capturing a snapshot. - // Specified as a Unix epoch Timestamp (in microseconds). - StartedTimeUsecs *int64 `json:"startedTimeUsecs,omitempty"` -} - -// Validate validates this snapshot attempt -func (m *SnapshotAttempt) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snapshot attempt based on context it is used -func (m *SnapshotAttempt) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotAttempt) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotAttempt) UnmarshalBinary(b []byte) error { - var res SnapshotAttempt - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_cloud_copy_policy.go b/v1/models/snapshot_cloud_copy_policy.go deleted file mode 100644 index 818fc258..00000000 --- a/v1/models/snapshot_cloud_copy_policy.go +++ /dev/null @@ -1,407 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SnapshotCloudCopyPolicy Cloud Deploy Policy. -// -// Specifies settings for copying Snapshots to Cloud. This also specifies -// the retention policy that should be applied to Snapshots after they have -// been copied to Cloud. -// -// swagger:model SnapshotCloudCopyPolicy -type SnapshotCloudCopyPolicy struct { - - // Specified the Id for a snapshot copy policy. This is generated when the - // policy is created. - ID *string `json:"Id,omitempty"` - - // The backup run type to which this copy policy applies to. If set, this - // will ensure that the first run in scheduled period of given type will be - // copied. If this isn't set, copy tasks will be generated as per - // other filters in the protection policy. Currently, it can only be set to - // Full. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies if Snapshots are copied from the first completely successful - // Job Run or the first partially successful Job Run occurring at the start - // of the replication schedule. - // If true, Snapshots are copied from the first Job Run occurring at the start - // of the replication schedule, even if first Job Run was not completely - // successful i.e. Snapshots were not captured for all Objects in the Job. - // If false, Snapshots are copied from the first Job Run occurring at the - // start of the replication schedule that was completely successful i.e. - // Snapshots for all the Objects in the Job were successfully captured. - CopyPartial *bool `json:"copyPartial,omitempty"` - - // Specifies WORM retention type for the copy target 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. - DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` - - // Specifies the number of days to retain copied Snapshots on the target. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists on - // the external target. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies a factor to multiply the periodicity by, to determine the copy - // schedule. - // For example if set to 2 and the periodicity is hourly, then Snapshots - // from the first eligible Job Run for every 2 hour period is copied. - Multiplier *int32 `json:"multiplier,omitempty"` - - // Specifies the frequency that Snapshots should be copied to the - // specified target. Used in combination with multiplier. - // 'kEvery' means that the Snapshot copy occurs after the number of - // Job Runs equals the number specified in the multiplier. - // 'kHour' means that the Snapshot copy occurs hourly at the frequency - // set in the multiplier, for example if multiplier is 2, the copy occurs - // every 2 hours. - // 'kDay' means that the Snapshot copy occurs daily at the frequency - // set in the multiplier. - // 'kWeek' means that the Snapshot copy occurs weekly at the frequency - // set in the multiplier. - // 'kMonth' means that the Snapshot copy occurs monthly at the frequency - // set in the multiplier. - // 'kYear' means that the Snapshot copy occurs yearly at the frequency - // set in the multiplier. - // Enum: ["kEvery","kHour","kDay","kWeek","kMonth","kYear"] - Periodicity *string `json:"periodicity,omitempty"` - - // Run timeouts after which a run will get cancelled. - RunTimeouts []*CancellationTimeoutParams `json:"runTimeouts"` - - // Specifies the details about CloudDeploy target where backup snapshots - // may be converted and stored. - Target *CloudDeployTargetDetails `json:"target,omitempty"` -} - -// Validate validates this snapshot cloud copy policy -func (m *SnapshotCloudCopyPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotCloudCopyPolicyTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotCloudCopyPolicyTypeBackupRunTypePropEnum = append(snapshotCloudCopyPolicyTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // SnapshotCloudCopyPolicyBackupRunTypeKRegular captures enum value "kRegular" - SnapshotCloudCopyPolicyBackupRunTypeKRegular string = "kRegular" - - // SnapshotCloudCopyPolicyBackupRunTypeKFull captures enum value "kFull" - SnapshotCloudCopyPolicyBackupRunTypeKFull string = "kFull" - - // SnapshotCloudCopyPolicyBackupRunTypeKLog captures enum value "kLog" - SnapshotCloudCopyPolicyBackupRunTypeKLog string = "kLog" - - // SnapshotCloudCopyPolicyBackupRunTypeKSystem captures enum value "kSystem" - SnapshotCloudCopyPolicyBackupRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *SnapshotCloudCopyPolicy) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotCloudCopyPolicyTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotCloudCopyPolicy) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *SnapshotCloudCopyPolicy) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -var snapshotCloudCopyPolicyTypePeriodicityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEvery","kHour","kDay","kWeek","kMonth","kYear"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotCloudCopyPolicyTypePeriodicityPropEnum = append(snapshotCloudCopyPolicyTypePeriodicityPropEnum, v) - } -} - -const ( - - // SnapshotCloudCopyPolicyPeriodicityKEvery captures enum value "kEvery" - SnapshotCloudCopyPolicyPeriodicityKEvery string = "kEvery" - - // SnapshotCloudCopyPolicyPeriodicityKHour captures enum value "kHour" - SnapshotCloudCopyPolicyPeriodicityKHour string = "kHour" - - // SnapshotCloudCopyPolicyPeriodicityKDay captures enum value "kDay" - SnapshotCloudCopyPolicyPeriodicityKDay string = "kDay" - - // SnapshotCloudCopyPolicyPeriodicityKWeek captures enum value "kWeek" - SnapshotCloudCopyPolicyPeriodicityKWeek string = "kWeek" - - // SnapshotCloudCopyPolicyPeriodicityKMonth captures enum value "kMonth" - SnapshotCloudCopyPolicyPeriodicityKMonth string = "kMonth" - - // SnapshotCloudCopyPolicyPeriodicityKYear captures enum value "kYear" - SnapshotCloudCopyPolicyPeriodicityKYear string = "kYear" -) - -// prop value enum -func (m *SnapshotCloudCopyPolicy) validatePeriodicityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotCloudCopyPolicyTypePeriodicityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotCloudCopyPolicy) validatePeriodicity(formats strfmt.Registry) error { - if swag.IsZero(m.Periodicity) { // not required - return nil - } - - // value enum - if err := m.validatePeriodicityEnum("periodicity", "body", *m.Periodicity); err != nil { - return err - } - - return nil -} - -func (m *SnapshotCloudCopyPolicy) validateRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeouts); i++ { - if swag.IsZero(m.RunTimeouts[i]) { // not required - continue - } - - if m.RunTimeouts[i] != nil { - if err := m.RunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotCloudCopyPolicy) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this snapshot cloud copy policy based on the context it is used -func (m *SnapshotCloudCopyPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotCloudCopyPolicy) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *SnapshotCloudCopyPolicy) contextValidateRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeouts); i++ { - - if m.RunTimeouts[i] != nil { - - if swag.IsZero(m.RunTimeouts[i]) { // not required - return nil - } - - if err := m.RunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotCloudCopyPolicy) 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 -} - -// MarshalBinary interface implementation -func (m *SnapshotCloudCopyPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotCloudCopyPolicy) UnmarshalBinary(b []byte) error { - var res SnapshotCloudCopyPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_copy_task.go b/v1/models/snapshot_copy_task.go deleted file mode 100644 index 08fd38f1..00000000 --- a/v1/models/snapshot_copy_task.go +++ /dev/null @@ -1,122 +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" -) - -// SnapshotCopyTask Snapshot Copy Task. -// -// Specifies information about copy tasks such as replication and archival -// tasks. -// -// swagger:model SnapshotCopyTask -type SnapshotCopyTask struct { - - // Specifies the status of the copy task. - CopyStatus *string `json:"copyStatus,omitempty"` - - // Specifies when the Snapshot expires on the target. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies warning or error information when the copy task is not - // successful. - Message *string `json:"message,omitempty"` - - // Specifies the target location where the Snapshot was copied to. - SnapshotTarget *SnapshotTargetSettings `json:"snapshotTarget,omitempty"` -} - -// Validate validates this snapshot copy task -func (m *SnapshotCopyTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotCopyTask) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshot copy task based on the context it is used -func (m *SnapshotCopyTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotCopyTask) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotCopyTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotCopyTask) UnmarshalBinary(b []byte) error { - var res SnapshotCopyTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_delta_proto.go b/v1/models/snapshot_delta_proto.go deleted file mode 100644 index c7f4a641..00000000 --- a/v1/models/snapshot_delta_proto.go +++ /dev/null @@ -1,22 +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 - -// SnapshotDeltaProto Message that encapsulates information about delta change to snapshot for -// any of the environments we support. Environment specific snapshot infos are -// defined as extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. -// Each adapter should implement a utility function to merge delta snapshot -// to an existing snapshot. -// SnapshotDeltaProto extension Location No. -// ============================================================================= -// sql::SnapshotDelta -// ::sql_snapshot_delta sql/sql.proto 101 -// -// swagger:model SnapshotDeltaProto -type SnapshotDeltaProto interface{} diff --git a/v1/models/snapshot_info.go b/v1/models/snapshot_info.go deleted file mode 100644 index 5cec2f66..00000000 --- a/v1/models/snapshot_info.go +++ /dev/null @@ -1,315 +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" -) - -// SnapshotInfo Snapshot Information. -// -// Specifies details about the snapshot task created to backup or copy one -// source object like a VM. -// -// swagger:model SnapshotInfo -type SnapshotInfo struct { - - // Specifies the environment type (such as kVMware or kSQL) that - // contains the source to backup. - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - // 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"` - - // Specifies the relative directory path from root path where the snapshot - // is stored. - RelativeSnapshotDirectory *string `json:"relativeSnapshotDirectory,omitempty"` - - // Specifies the root path where the snapshot is stored, using the following - // format: "/ViewBox/ViewName/fs". - RootPath *string `json:"rootPath,omitempty"` - - // Specifies the snapshot create time of the already created snapshot on the - // source - SourceSnapshotCreateTimeUsecs *int64 `json:"sourceSnapshotCreateTimeUsecs,omitempty"` - - // Specifies the name of the snapshot backed up in a Netapp Data-Protect - // Volume where we use already created snapshot on the source - SourceSnapshotName *string `json:"sourceSnapshotName,omitempty"` - - // Specifies the name of the View that is cloned. - // NOTE: This field is only populated for View cloning. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this snapshot info -func (m *SnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotInfoTypeEnvironmentPropEnum = append(snapshotInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // SnapshotInfoEnvironmentKVMware captures enum value "kVMware" - SnapshotInfoEnvironmentKVMware string = "kVMware" - - // SnapshotInfoEnvironmentKHyperV captures enum value "kHyperV" - SnapshotInfoEnvironmentKHyperV string = "kHyperV" - - // SnapshotInfoEnvironmentKSQL captures enum value "kSQL" - SnapshotInfoEnvironmentKSQL string = "kSQL" - - // SnapshotInfoEnvironmentKView captures enum value "kView" - SnapshotInfoEnvironmentKView string = "kView" - - // SnapshotInfoEnvironmentKPuppeteer captures enum value "kPuppeteer" - SnapshotInfoEnvironmentKPuppeteer string = "kPuppeteer" - - // SnapshotInfoEnvironmentKPhysical captures enum value "kPhysical" - SnapshotInfoEnvironmentKPhysical string = "kPhysical" - - // SnapshotInfoEnvironmentKPure captures enum value "kPure" - SnapshotInfoEnvironmentKPure string = "kPure" - - // SnapshotInfoEnvironmentKNimble captures enum value "kNimble" - SnapshotInfoEnvironmentKNimble string = "kNimble" - - // SnapshotInfoEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - SnapshotInfoEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // SnapshotInfoEnvironmentKAzure captures enum value "kAzure" - SnapshotInfoEnvironmentKAzure string = "kAzure" - - // SnapshotInfoEnvironmentKNetapp captures enum value "kNetapp" - SnapshotInfoEnvironmentKNetapp string = "kNetapp" - - // SnapshotInfoEnvironmentKAgent captures enum value "kAgent" - SnapshotInfoEnvironmentKAgent string = "kAgent" - - // SnapshotInfoEnvironmentKGenericNas captures enum value "kGenericNas" - SnapshotInfoEnvironmentKGenericNas string = "kGenericNas" - - // SnapshotInfoEnvironmentKAcropolis captures enum value "kAcropolis" - SnapshotInfoEnvironmentKAcropolis string = "kAcropolis" - - // SnapshotInfoEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - SnapshotInfoEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // SnapshotInfoEnvironmentKIsilon captures enum value "kIsilon" - SnapshotInfoEnvironmentKIsilon string = "kIsilon" - - // SnapshotInfoEnvironmentKGPFS captures enum value "kGPFS" - SnapshotInfoEnvironmentKGPFS string = "kGPFS" - - // SnapshotInfoEnvironmentKKVM captures enum value "kKVM" - SnapshotInfoEnvironmentKKVM string = "kKVM" - - // SnapshotInfoEnvironmentKAWS captures enum value "kAWS" - SnapshotInfoEnvironmentKAWS string = "kAWS" - - // SnapshotInfoEnvironmentKExchange captures enum value "kExchange" - SnapshotInfoEnvironmentKExchange string = "kExchange" - - // SnapshotInfoEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - SnapshotInfoEnvironmentKHyperVVSS string = "kHyperVVSS" - - // SnapshotInfoEnvironmentKOracle captures enum value "kOracle" - SnapshotInfoEnvironmentKOracle string = "kOracle" - - // SnapshotInfoEnvironmentKGCP captures enum value "kGCP" - SnapshotInfoEnvironmentKGCP string = "kGCP" - - // SnapshotInfoEnvironmentKFlashBlade captures enum value "kFlashBlade" - SnapshotInfoEnvironmentKFlashBlade string = "kFlashBlade" - - // SnapshotInfoEnvironmentKAWSNative captures enum value "kAWSNative" - SnapshotInfoEnvironmentKAWSNative string = "kAWSNative" - - // SnapshotInfoEnvironmentKO365 captures enum value "kO365" - SnapshotInfoEnvironmentKO365 string = "kO365" - - // SnapshotInfoEnvironmentKO365Outlook captures enum value "kO365Outlook" - SnapshotInfoEnvironmentKO365Outlook string = "kO365Outlook" - - // SnapshotInfoEnvironmentKHyperFlex captures enum value "kHyperFlex" - SnapshotInfoEnvironmentKHyperFlex string = "kHyperFlex" - - // SnapshotInfoEnvironmentKGCPNative captures enum value "kGCPNative" - SnapshotInfoEnvironmentKGCPNative string = "kGCPNative" - - // SnapshotInfoEnvironmentKAzureNative captures enum value "kAzureNative" - SnapshotInfoEnvironmentKAzureNative string = "kAzureNative" - - // SnapshotInfoEnvironmentKKubernetes captures enum value "kKubernetes" - SnapshotInfoEnvironmentKKubernetes string = "kKubernetes" - - // SnapshotInfoEnvironmentKElastifile captures enum value "kElastifile" - SnapshotInfoEnvironmentKElastifile string = "kElastifile" - - // SnapshotInfoEnvironmentKAD captures enum value "kAD" - SnapshotInfoEnvironmentKAD string = "kAD" - - // SnapshotInfoEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - SnapshotInfoEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // SnapshotInfoEnvironmentKCassandra captures enum value "kCassandra" - SnapshotInfoEnvironmentKCassandra string = "kCassandra" - - // SnapshotInfoEnvironmentKMongoDB captures enum value "kMongoDB" - SnapshotInfoEnvironmentKMongoDB string = "kMongoDB" - - // SnapshotInfoEnvironmentKCouchbase captures enum value "kCouchbase" - SnapshotInfoEnvironmentKCouchbase string = "kCouchbase" - - // SnapshotInfoEnvironmentKHdfs captures enum value "kHdfs" - SnapshotInfoEnvironmentKHdfs string = "kHdfs" - - // SnapshotInfoEnvironmentKHive captures enum value "kHive" - SnapshotInfoEnvironmentKHive string = "kHive" - - // SnapshotInfoEnvironmentKHBase captures enum value "kHBase" - SnapshotInfoEnvironmentKHBase string = "kHBase" - - // SnapshotInfoEnvironmentKUDA captures enum value "kUDA" - SnapshotInfoEnvironmentKUDA string = "kUDA" - - // SnapshotInfoEnvironmentKO365Teams captures enum value "kO365Teams" - SnapshotInfoEnvironmentKO365Teams string = "kO365Teams" - - // SnapshotInfoEnvironmentKO365Group captures enum value "kO365Group" - SnapshotInfoEnvironmentKO365Group string = "kO365Group" - - // SnapshotInfoEnvironmentKO365Exchange captures enum value "kO365Exchange" - SnapshotInfoEnvironmentKO365Exchange string = "kO365Exchange" - - // SnapshotInfoEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - SnapshotInfoEnvironmentKO365OneDrive string = "kO365OneDrive" - - // SnapshotInfoEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - SnapshotInfoEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // SnapshotInfoEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - SnapshotInfoEnvironmentKO365PublicFolders string = "kO365PublicFolders" -) - -// prop value enum -func (m *SnapshotInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotInfo) 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 validates this snapshot info based on context it is used -func (m *SnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotInfo) UnmarshalBinary(b []byte) error { - var res SnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_info_proto.go b/v1/models/snapshot_info_proto.go deleted file mode 100644 index ef285071..00000000 --- a/v1/models/snapshot_info_proto.go +++ /dev/null @@ -1,605 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SnapshotInfoProto Message that encapsulates information about snapshots for any of the -// environments we support. Environment specific snapshot infos are defined as -// extensions to this proto. -// -// Each available extension is listed below along with the location of the -// proto file (relative to magneto/connectors) where it is defined. The only -// exception is view.proto and physical.proto which reside in magneto/base. -// -// SnapshotInfoProto extension Location Extn -// ============================================================================= -// vmware::SnapshotInfo::vmware_snapshot_info vmware/vmware.proto 100 -// sql::SnapshotInfo::sql_snapshot_info sql/sql.proto 101 -// view::SnapshotInfo::view_snapshot_info base/view.proto 102 -// physical::SnapshotInfo::physical_snapshot_info base/physical.proto 103 -// san::SnapshotInfo::san_snapshot_info san/san.proto 104 -// file::SnapshotInfo::file_snapshot_info file/file.proto 105 -// hyperv::SnapshotInfo::hyperv_snapshot_info hyperv/hyperv.proto 106 -// acropolis::SnapshotInfo:: -// acropolis_snapshot_info acropolis/acropolis.proto 107 -// kvm::SnapshotInfo::kvm_snapshot_info kvm/kvm.proto 108 -// app_file::SnapshotInfo::app_file_snapshot_info app_file/app_file.proto 109 -// oracle::SnapshotInfo::oracle_snapshot_info oracle/oracle.proto 110 -// aws::SnapshotInfo::aws_snapshot_info aws/aws.proto 111 -// outlook::SnapshotInfo::outlook_snapshot_info outlook/outlook.proto 112 -// azure::SnapshotInfo::azure_snapshot_info azure/azure.proto 113 -// gcp::SnapshotInfo::gcp_snapshot_info gcp/gcp.proto 114 -// ad::SnapshotInfo::ad_snapshot_info ad/ad.proto 115 -// MSGraph::SnapshotInfo::one_drive_snapshot_info ms_graph/graph.proto 116 -// kubernetes::SnapshotInfo:: kubernetes_snapshot_info -// kubernetes/kubernetes.proto -// 117 -// aws::RDSSnapshotInfo::rds_snapshot_info aws/aws.proto 118 -// o365::SnapshotInfo::o365_snapshot_info o365/o365.proto 119 -// exchange::SnapshotInfo::exchange_snapshot_info exchange/exchange.proto 120 -// o365::SharepointSnapshotInfo::sharepoint_snapshot_info -// o365/o365.proto 121 -// MSGraph::SharepointListSnapshotInfo::sharepoint_list_snapshot_info -// ms_graph/graph.proto 122 -// cdp::SnapshotInfo::cdp_snapshot_info base/cdp.proto 123 -// imanis::SnapshotInfo::nosql_snapshot_info imanis/nosql.proto 124 -// o365::PublicFolderSnapshotInfo::public_folder_snapshot_info -// o365/o365.proto 125 -// SnapshotInfo::uda_snapshot_info uda.proto 126 -// o365::TeamsSnapshotInfo::teams_snapshot_info o365/o365.proto 127 -// o365::O365GroupSnapshotInfo::o365_group_snapshot_info -// o365/o365.proto 128 -// SnapshotInfo::sfdc_snapshot_info sfdc_service.proto 129 -// san::GroupSnapshotInfo::group_snapshot_info san/san.proto 130 -// rds::OracleRmanSnapshotInfo::rds_oracle_rman_snapshot_info -// rds/rds.proto 131 -// o365::ChatsSnapshotInfo::chats_snapshot_info o365/o365.proto 132 -// ============================================================================= -// -// swagger:model SnapshotInfoProto -type SnapshotInfoProto struct { - - // The name of the rocksdb directory for writing high change directories. - // It is stored in 'config' directory of the current view. - ChangeRocksdbName *string `json:"changeRocksdbName,omitempty"` - - // The name of the rocksdb directory for errors seen during this backup, - // stored in 'config' directory of the current view. - ErrorRocksdbName *string `json:"errorRocksdbName,omitempty"` - - // This field is only applicable for NAS and file backup jobs. It indicates - // whether the file walk portion of the backup has completed. - // TODO(amandeep): Rename this as this can be used for multiple workflows. - FileWalkDone *bool `json:"fileWalkDone,omitempty"` - - // Front end size information. An example use case is for billing purposes - // in "[Backup | Data Management] as a Service" offering. - FrontEndSizeInfo *SizeInfo `json:"frontEndSizeInfo,omitempty"` - - // The metadata view name in which the backup metadata was created. - // NOTE: This is populated only for CADv2 NAS backup. - MetadataViewName *string `json:"metadataViewName,omitempty"` - - // Number of application instances backed up by this task. For example, if - // the environment type is kSQL, this number is for the SQL server instances. - NumAppInstances *int32 `json:"numAppInstances,omitempty"` - - // Number of application objects in total backed up by this task. For - // example, if the environment type is kSQL, this number is for all of the - // SQL server databases - NumAppObjects *int32 `json:"numAppObjects,omitempty"` - - // Captures the execution status of post backup script. - PostBackupScriptStatus *ScriptExecutionStatus `json:"postBackupScriptStatus,omitempty"` - - // Captures the execution status of post snapshot script. - PostSnapshotScriptStatus *ScriptExecutionStatus `json:"postSnapshotScriptStatus,omitempty"` - - // Captures the execution status of pre backup script. - PreBackupScriptStatus *ScriptExecutionStatus `json:"preBackupScriptStatus,omitempty"` - - // If the permit of this task is released on pausing backup, this boolean - // informs the task to re-acquire it. - ReacquirePermit *bool `json:"reacquirePermit,omitempty"` - - // This is the path relative to 'root_path' under which the snapshot lives. - // This does not begin with a '/' and is of the form foo/bar/baz. - RelativeSnapshotDir *string `json:"relativeSnapshotDir,omitempty"` - - // The root path under which the snapshot is stored. This is of the form - // "/ViewBox/ViewName/fs". - RootPath *string `json:"rootPath,omitempty"` - - // If this backup task stores any auxiliary state in Scribe table, this field - // will be populated with the column key in that table where such state is - // stored. Data stored in the column is extension of SnapshotScribeInfoProto - // message. - ScribeTableColumn *string `json:"scribeTableColumn,omitempty"` - - // If this backup task stores any auxiliary state in Scribe table, this field - // will be populated with the row key in that table where such state is - // stored. - ScribeTableRow *string `json:"scribeTableRow,omitempty"` - - // This is the timestamp at which the slave task started. - SlaveTaskStartTimeUsecs *int64 `json:"slaveTaskStartTimeUsecs,omitempty"` - - // Snapshot expiry time. - SnapshotExpiryTime *uint64 `json:"snapshotExpiryTime,omitempty"` - - // Captures the snapshot type for some objects such as VM. - SnapshotType *ObjectSnapshotType `json:"snapshotType,omitempty"` - - // The source snapshot create time. - SourceSnapshotCreateTimeUsecs *int64 `json:"sourceSnapshotCreateTimeUsecs,omitempty"` - - // This field is only relevant for NAS backups where we are backing up from a - // ReadOnly or DataProtect volume, or an RW volume with Snapdiff. For RW - // volumes, Cohesity will create the snapshot on NetApp, while for DP - // volumes, Cohesity will use the existing snapshot. - SourceSnapshotName *string `json:"sourceSnapshotName,omitempty"` - - // Indicates the state of the source snapshot if it is being managed by the - // master op. 'source_snapshot_name' will be set to indicate the snapshot - // name. At the moment, this feature is enabled only for Netapp & Isilon - // adapters to support continuous snapshotting feature. - SourceSnapshotStatus *int32 `json:"sourceSnapshotStatus,omitempty"` - - // Specifies the parameters required for Storage Snapshot provider. - StorageSnapshotProvider *StorageSnapshotProviderParams `json:"storageSnapshotProvider,omitempty"` - - // Specifies the target type for the task. The field is only valid if the - // task has got a permit. - TargetType *int32 `json:"targetType,omitempty"` - - // Contains the information regarding number of bytes that are read from the - // source (such as VM) so far. - TotalBytesReadFromSource *int64 `json:"totalBytesReadFromSource,omitempty"` - - // Total amount of data successfully tiered from the NAS source. - TotalBytesTiered *int64 `json:"totalBytesTiered,omitempty"` - - // Contains the total number of bytes that will be read from the source - // (such as VM) for this snapshot. - TotalBytesToReadFromSource *int64 `json:"totalBytesToReadFromSource,omitempty"` - - // The total number of file and directory entities that have changed since - // last backup. Only applicable to file based backups. - TotalChangedEntityCount *int64 `json:"totalChangedEntityCount,omitempty"` - - // The total number of file and directory entities visited in this - // backup. Only applicable to file based backups. - TotalEntityCount *int64 `json:"totalEntityCount,omitempty"` - - // Logical size of the source whose snapshot is being taken. This is the - // amount of data we would have read from the source had this been a full - // backup. - TotalLogicalBackupSizeBytes *int64 `json:"totalLogicalBackupSizeBytes,omitempty"` - - // Contains the information regarding number of bytes that the source (such - // as VM) has taken up on the primary storage. - TotalPrimaryPhysicalSizeBytes *int64 `json:"totalPrimaryPhysicalSizeBytes,omitempty"` - - // Total number of bytes to be zero-filled in Snap FS as part of this backup. - // Currently applicable only for VMware backups. - TotalZeroFillBytes *int64 `json:"totalZeroFillBytes,omitempty"` - - // The type of environment this snapshot info pertains to. - Type *int32 `json:"type,omitempty"` - - // Whether during the backup, the backup view's case insensitivity property - // has been altered. If so, Madrox needs to take corresponding actions during - // replication. - ViewCaseInsensitivityAltered *bool `json:"viewCaseInsensitivityAltered,omitempty"` - - // The data view name under which the snapshot was created. - // NOTE: This is populated only for View, Puppeteer, NAS and Oracle backup. - ViewName *string `json:"viewName,omitempty"` - - // The view name under which the snapshot of the migrated data was created. - // NOTE: This is populated only for data migration tasks. - ViewNameToGc *string `json:"viewNameToGc,omitempty"` - - // Warnings if any. These warnings will be propogated to the UI by master. - Warnings []*ErrorProto `json:"warnings"` - - // Factor by which weight of a zero-fill sub-task should be scaled down. This - // is used while creating sub-task monitors. - ZeroFillTaskWeightScaleDownFactor *int64 `json:"zeroFillTaskWeightScaleDownFactor,omitempty"` -} - -// Validate validates this snapshot info proto -func (m *SnapshotInfoProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFrontEndSizeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScriptStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostSnapshotScriptStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreBackupScriptStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageSnapshotProvider(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWarnings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotInfoProto) validateFrontEndSizeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if m.FrontEndSizeInfo != nil { - if err := m.FrontEndSizeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validatePostBackupScriptStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScriptStatus) { // not required - return nil - } - - if m.PostBackupScriptStatus != nil { - if err := m.PostBackupScriptStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validatePostSnapshotScriptStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PostSnapshotScriptStatus) { // not required - return nil - } - - if m.PostSnapshotScriptStatus != nil { - if err := m.PostSnapshotScriptStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validatePreBackupScriptStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PreBackupScriptStatus) { // not required - return nil - } - - if m.PreBackupScriptStatus != nil { - if err := m.PreBackupScriptStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validateSnapshotType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotType) { // not required - return nil - } - - if m.SnapshotType != nil { - if err := m.SnapshotType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotType") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validateStorageSnapshotProvider(formats strfmt.Registry) error { - if swag.IsZero(m.StorageSnapshotProvider) { // not required - return nil - } - - if m.StorageSnapshotProvider != nil { - if err := m.StorageSnapshotProvider.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProvider") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) validateWarnings(formats strfmt.Registry) error { - if swag.IsZero(m.Warnings) { // not required - return nil - } - - for i := 0; i < len(m.Warnings); i++ { - if swag.IsZero(m.Warnings[i]) { // not required - continue - } - - if m.Warnings[i] != nil { - if err := m.Warnings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this snapshot info proto based on the context it is used -func (m *SnapshotInfoProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFrontEndSizeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScriptStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostSnapshotScriptStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreBackupScriptStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageSnapshotProvider(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotInfoProto) contextValidateFrontEndSizeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FrontEndSizeInfo != nil { - - if swag.IsZero(m.FrontEndSizeInfo) { // not required - return nil - } - - if err := m.FrontEndSizeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("frontEndSizeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("frontEndSizeInfo") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidatePostBackupScriptStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PostBackupScriptStatus != nil { - - if swag.IsZero(m.PostBackupScriptStatus) { // not required - return nil - } - - if err := m.PostBackupScriptStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidatePostSnapshotScriptStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PostSnapshotScriptStatus != nil { - - if swag.IsZero(m.PostSnapshotScriptStatus) { // not required - return nil - } - - if err := m.PostSnapshotScriptStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidatePreBackupScriptStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PreBackupScriptStatus != nil { - - if swag.IsZero(m.PreBackupScriptStatus) { // not required - return nil - } - - if err := m.PreBackupScriptStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScriptStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScriptStatus") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidateSnapshotType(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotType != nil { - - if swag.IsZero(m.SnapshotType) { // not required - return nil - } - - if err := m.SnapshotType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotType") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidateStorageSnapshotProvider(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageSnapshotProvider != nil { - - if swag.IsZero(m.StorageSnapshotProvider) { // not required - return nil - } - - if err := m.StorageSnapshotProvider.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProvider") - } - return err - } - } - - return nil -} - -func (m *SnapshotInfoProto) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Warnings); i++ { - - if m.Warnings[i] != nil { - - if swag.IsZero(m.Warnings[i]) { // not required - return nil - } - - if err := m.Warnings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("warnings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("warnings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotInfoProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotInfoProto) UnmarshalBinary(b []byte) error { - var res SnapshotInfoProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_label.go b/v1/models/snapshot_label.go deleted file mode 100644 index ac00f336..00000000 --- a/v1/models/snapshot_label.go +++ /dev/null @@ -1,54 +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" -) - -// SnapshotLabel Specifies the snapshot label for incremental and full backup -// of Secondary Netapp volumes (Data-Protect Volumes). -// -// swagger:model SnapshotLabel -type SnapshotLabel struct { - - // Specifies the full snapshot label value - FullLabel *string `json:"fullLabel,omitempty"` - - // Specifies the incremental snapshot label value - IncrementalLabel *string `json:"incrementalLabel,omitempty"` -} - -// Validate validates this snapshot label -func (m *SnapshotLabel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snapshot label based on context it is used -func (m *SnapshotLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotLabel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotLabel) UnmarshalBinary(b []byte) error { - var res SnapshotLabel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_manager_params.go b/v1/models/snapshot_manager_params.go deleted file mode 100644 index a6f69957..00000000 --- a/v1/models/snapshot_manager_params.go +++ /dev/null @@ -1,109 +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" -) - -// SnapshotManagerParams Proto to encapsulate additional params for snapshot manager jobs. -// -// swagger:model SnapshotManagerParams -type SnapshotManagerParams struct { - - // aws snapshot manager params - AwsSnapshotManagerParams *AWSSnapshotManagerParams `json:"awsSnapshotManagerParams,omitempty"` -} - -// Validate validates this snapshot manager params -func (m *SnapshotManagerParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsSnapshotManagerParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotManagerParams) validateAwsSnapshotManagerParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsSnapshotManagerParams) { // not required - return nil - } - - if m.AwsSnapshotManagerParams != nil { - if err := m.AwsSnapshotManagerParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotManagerParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshot manager params based on the context it is used -func (m *SnapshotManagerParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsSnapshotManagerParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotManagerParams) contextValidateAwsSnapshotManagerParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsSnapshotManagerParams != nil { - - if swag.IsZero(m.AwsSnapshotManagerParams) { // not required - return nil - } - - if err := m.AwsSnapshotManagerParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsSnapshotManagerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsSnapshotManagerParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotManagerParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotManagerParams) UnmarshalBinary(b []byte) error { - var res SnapshotManagerParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_replicas.go b/v1/models/snapshot_replicas.go deleted file mode 100644 index 6862ddb8..00000000 --- a/v1/models/snapshot_replicas.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SnapshotReplicas Encapsulates information about replicas of a snapshot. -// -// swagger:model SnapshotReplicas -type SnapshotReplicas struct { - - // All known replicas of the snapshot. - ReplicaVec []*SnapshotReplicasReplica `json:"replicaVec"` -} - -// Validate validates this snapshot replicas -func (m *SnapshotReplicas) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicaVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotReplicas) validateReplicaVec(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaVec) { // not required - return nil - } - - for i := 0; i < len(m.ReplicaVec); i++ { - if swag.IsZero(m.ReplicaVec[i]) { // not required - continue - } - - if m.ReplicaVec[i] != nil { - if err := m.ReplicaVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this snapshot replicas based on the context it is used -func (m *SnapshotReplicas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicaVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotReplicas) contextValidateReplicaVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicaVec); i++ { - - if m.ReplicaVec[i] != nil { - - if swag.IsZero(m.ReplicaVec[i]) { // not required - return nil - } - - if err := m.ReplicaVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotReplicas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotReplicas) UnmarshalBinary(b []byte) error { - var res SnapshotReplicas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_replicas_replica.go b/v1/models/snapshot_replicas_replica.go deleted file mode 100644 index a25f2c4a..00000000 --- a/v1/models/snapshot_replicas_replica.go +++ /dev/null @@ -1,167 +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" -) - -// SnapshotReplicasReplica snapshot replicas replica -// -// swagger:model SnapshotReplicas_Replica -type SnapshotReplicasReplica struct { - - // The UID of archive. This field will be populated only when - // SnapshotTarget type is kArchival. - ArchiveUID *UniversalIDProto `json:"archiveUid,omitempty"` - - // The time (in usecs) when the snapshot would expire at this location. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Whether this archive is in the cloud domain archive format. - IsCloudDomainArchive *bool `json:"isCloudDomainArchive,omitempty"` - - // The target. - Target *SnapshotTarget `json:"target,omitempty"` -} - -// Validate validates this snapshot replicas replica -func (m *SnapshotReplicasReplica) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotReplicasReplica) validateArchiveUID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchiveUID) { // not required - return nil - } - - if m.ArchiveUID != nil { - if err := m.ArchiveUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveUid") - } - return err - } - } - - return nil -} - -func (m *SnapshotReplicasReplica) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this snapshot replicas replica based on the context it is used -func (m *SnapshotReplicasReplica) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchiveUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotReplicasReplica) contextValidateArchiveUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchiveUID != nil { - - if swag.IsZero(m.ArchiveUID) { // not required - return nil - } - - if err := m.ArchiveUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveUid") - } - return err - } - } - - return nil -} - -func (m *SnapshotReplicasReplica) 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 -} - -// MarshalBinary interface implementation -func (m *SnapshotReplicasReplica) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotReplicasReplica) UnmarshalBinary(b []byte) error { - var res SnapshotReplicasReplica - 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 deleted file mode 100644 index f66155d4..00000000 --- a/v1/models/snapshot_replication_copy_policy.go +++ /dev/null @@ -1,460 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SnapshotReplicationCopyPolicy Snapshot Copy Replication Policy. -// -// Specifies settings for copying Snapshots to Remote Clusters. This also -// specifies the retention policy that should be applied to Snapshots after -// they have been copied to the specified target. -// -// swagger:model SnapshotReplicationCopyPolicy -type SnapshotReplicationCopyPolicy struct { - - // Specified the Id for a snapshot copy policy. This is generated when the - // policy is created. - ID *string `json:"Id,omitempty"` - - // The backup run type to which this copy policy applies to. If set, this - // will ensure that the first run in scheduled period of given type will be - // copied. If this isn't set, copy tasks will be generated as per - // other filters in the protection policy. Currently, it can only be set to - // Full. - // 'kRegular' indicates a incremental (CBT) backup. Incremental backups - // utilizing CBT (if supported) are captured of the target protection objects. - // The first run of a kRegular schedule captures all the blocks. - // 'kFull' indicates a full (no CBT) backup. A complete backup - // (all blocks) of the target protection objects are always captured and - // Change Block Tracking (CBT) is not utilized. - // 'kLog' indicates a Database Log backup. Capture the database - // transaction logs to allow rolling back to a specific point in time. - // 'kSystem' indicates a system backup. System backups are used to do - // bare metal recovery of the system to a specific point in time. - // Enum: ["kRegular","kFull","kLog","kSystem"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies the cloud replication target to copy the Snapshots to. - CloudTarget *CloudDeployTargetDetails `json:"cloudTarget,omitempty"` - - // Specifies if Snapshots are copied from the first completely successful - // Job Run or the first partially successful Job Run occurring at the start - // of the replication schedule. - // If true, Snapshots are copied from the first Job Run occurring at the start - // of the replication schedule, even if first Job Run was not completely - // successful i.e. Snapshots were not captured for all Objects in the Job. - // If false, Snapshots are copied from the first Job Run occurring at the - // start of the replication schedule that was completely successful i.e. - // Snapshots for all the Objects in the Job were successfully captured. - CopyPartial *bool `json:"copyPartial,omitempty"` - - // Specifies WORM retention type for the copy target 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. - DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` - - // Specifies the number of days to retain copied Snapshots on the target. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` - - // Specifies the number of days to retain log run if Log Schedule exists on - // the external target. - DaysToKeepLog *int64 `json:"daysToKeepLog,omitempty"` - - // Specifies a factor to multiply the periodicity by, to determine the copy - // schedule. - // For example if set to 2 and the periodicity is hourly, then Snapshots - // from the first eligible Job Run for every 2 hour period is copied. - Multiplier *int32 `json:"multiplier,omitempty"` - - // Specifies the frequency that Snapshots should be copied to the - // specified target. Used in combination with multiplier. - // 'kEvery' means that the Snapshot copy occurs after the number of - // Job Runs equals the number specified in the multiplier. - // 'kHour' means that the Snapshot copy occurs hourly at the frequency - // set in the multiplier, for example if multiplier is 2, the copy occurs - // every 2 hours. - // 'kDay' means that the Snapshot copy occurs daily at the frequency - // set in the multiplier. - // 'kWeek' means that the Snapshot copy occurs weekly at the frequency - // set in the multiplier. - // 'kMonth' means that the Snapshot copy occurs monthly at the frequency - // set in the multiplier. - // 'kYear' means that the Snapshot copy occurs yearly at the frequency - // set in the multiplier. - // Enum: ["kEvery","kHour","kDay","kWeek","kMonth","kYear"] - Periodicity *string `json:"periodicity,omitempty"` - - // Run timeouts after which a run will get cancelled. - RunTimeouts []*CancellationTimeoutParams `json:"runTimeouts"` - - // Specifies a the source cluster id from which the data must be replicated. - SourceClusterID *int64 `json:"sourceClusterId,omitempty"` - - // target - Target *SnapshotReplicationCopyPolicyTarget `json:"target,omitempty"` -} - -// Validate validates this snapshot replication copy policy -func (m *SnapshotReplicationCopyPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatalockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotReplicationCopyPolicyTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotReplicationCopyPolicyTypeBackupRunTypePropEnum = append(snapshotReplicationCopyPolicyTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // SnapshotReplicationCopyPolicyBackupRunTypeKRegular captures enum value "kRegular" - SnapshotReplicationCopyPolicyBackupRunTypeKRegular string = "kRegular" - - // SnapshotReplicationCopyPolicyBackupRunTypeKFull captures enum value "kFull" - SnapshotReplicationCopyPolicyBackupRunTypeKFull string = "kFull" - - // SnapshotReplicationCopyPolicyBackupRunTypeKLog captures enum value "kLog" - SnapshotReplicationCopyPolicyBackupRunTypeKLog string = "kLog" - - // SnapshotReplicationCopyPolicyBackupRunTypeKSystem captures enum value "kSystem" - SnapshotReplicationCopyPolicyBackupRunTypeKSystem string = "kSystem" -) - -// prop value enum -func (m *SnapshotReplicationCopyPolicy) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotReplicationCopyPolicyTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validateCloudTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudTarget) { // not required - return nil - } - - if m.CloudTarget != nil { - if err := m.CloudTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validateDatalockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if m.DatalockConfig != nil { - if err := m.DatalockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -var snapshotReplicationCopyPolicyTypePeriodicityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEvery","kHour","kDay","kWeek","kMonth","kYear"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotReplicationCopyPolicyTypePeriodicityPropEnum = append(snapshotReplicationCopyPolicyTypePeriodicityPropEnum, v) - } -} - -const ( - - // SnapshotReplicationCopyPolicyPeriodicityKEvery captures enum value "kEvery" - SnapshotReplicationCopyPolicyPeriodicityKEvery string = "kEvery" - - // SnapshotReplicationCopyPolicyPeriodicityKHour captures enum value "kHour" - SnapshotReplicationCopyPolicyPeriodicityKHour string = "kHour" - - // SnapshotReplicationCopyPolicyPeriodicityKDay captures enum value "kDay" - SnapshotReplicationCopyPolicyPeriodicityKDay string = "kDay" - - // SnapshotReplicationCopyPolicyPeriodicityKWeek captures enum value "kWeek" - SnapshotReplicationCopyPolicyPeriodicityKWeek string = "kWeek" - - // SnapshotReplicationCopyPolicyPeriodicityKMonth captures enum value "kMonth" - SnapshotReplicationCopyPolicyPeriodicityKMonth string = "kMonth" - - // SnapshotReplicationCopyPolicyPeriodicityKYear captures enum value "kYear" - SnapshotReplicationCopyPolicyPeriodicityKYear string = "kYear" -) - -// prop value enum -func (m *SnapshotReplicationCopyPolicy) validatePeriodicityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotReplicationCopyPolicyTypePeriodicityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validatePeriodicity(formats strfmt.Registry) error { - if swag.IsZero(m.Periodicity) { // not required - return nil - } - - // value enum - if err := m.validatePeriodicityEnum("periodicity", "body", *m.Periodicity); err != nil { - return err - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validateRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeouts); i++ { - if swag.IsZero(m.RunTimeouts[i]) { // not required - continue - } - - if m.RunTimeouts[i] != nil { - if err := m.RunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this snapshot replication copy policy based on the context it is used -func (m *SnapshotReplicationCopyPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatalockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotReplicationCopyPolicy) contextValidateCloudTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudTarget != nil { - - if swag.IsZero(m.CloudTarget) { // not required - return nil - } - - if err := m.CloudTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) contextValidateDatalockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatalockConfig != nil { - - if swag.IsZero(m.DatalockConfig) { // not required - return nil - } - - if err := m.DatalockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datalockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datalockConfig") - } - return err - } - } - - return nil -} - -func (m *SnapshotReplicationCopyPolicy) contextValidateRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeouts); i++ { - - if m.RunTimeouts[i] != nil { - - if swag.IsZero(m.RunTimeouts[i]) { // not required - return nil - } - - if err := m.RunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *SnapshotReplicationCopyPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotReplicationCopyPolicy) UnmarshalBinary(b []byte) error { - var res SnapshotReplicationCopyPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/snapshot_target.go b/v1/models/snapshot_target.go deleted file mode 100644 index 3a89ef13..00000000 --- a/v1/models/snapshot_target.go +++ /dev/null @@ -1,268 +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" -) - -// SnapshotTarget Message that specifies details about a target (such as a replication or -// archival target) where a backup snapshot may be copied to. -// -// swagger:model SnapshotTarget -type SnapshotTarget struct { - - // The archival target for the backup snapshot. - ArchivalTarget *ArchivalTarget `json:"archivalTarget,omitempty"` - - // The cloud deploy target for the backup snapshot. This will be populated - // for both kCloudDeploy and kCloudReplication tasks. - CloudDeployTarget *CloudDeployTarget `json:"cloudDeployTarget,omitempty"` - - // The on-prem deploy target for the snapshots. This will be populated for - // kOnPremDeploy. - OnpremDeployTarget *OnPremDeployTarget `json:"onpremDeployTarget,omitempty"` - - // The remote replication target for the backup snapshot. - ReplicationTarget *ReplicationTarget `json:"replicationTarget,omitempty"` - - // The type of snapshot target this proto represents. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this snapshot target -func (m *SnapshotTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDeployTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnpremDeployTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTarget) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *SnapshotTarget) validateCloudDeployTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDeployTarget) { // not required - 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 -} - -func (m *SnapshotTarget) validateOnpremDeployTarget(formats strfmt.Registry) error { - if swag.IsZero(m.OnpremDeployTarget) { // not required - return nil - } - - if m.OnpremDeployTarget != nil { - if err := m.OnpremDeployTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotTarget) validateReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if m.ReplicationTarget != nil { - if err := m.ReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshot target based on the context it is used -func (m *SnapshotTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDeployTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnpremDeployTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTarget) 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 *SnapshotTarget) 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 *SnapshotTarget) contextValidateOnpremDeployTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.OnpremDeployTarget != nil { - - if swag.IsZero(m.OnpremDeployTarget) { // not required - return nil - } - - if err := m.OnpremDeployTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotTarget) contextValidateReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationTarget != nil { - - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if err := m.ReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotTarget) UnmarshalBinary(b []byte) error { - var res SnapshotTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_target_policy_proto.go b/v1/models/snapshot_target_policy_proto.go deleted file mode 100644 index bbd8f47e..00000000 --- a/v1/models/snapshot_target_policy_proto.go +++ /dev/null @@ -1,426 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SnapshotTargetPolicyProto Snapshot Target Policy Proto. -// -// Message that specifies the policy for copying backup snapshots to a target. -// This message also specifies the retention policy that should be applied to -// the snapshots after they have been copied to the specified target. -// -// swagger:model SnapshotTargetPolicyProto -type SnapshotTargetPolicyProto struct { - - // The backup type for which copy will be made to the snapshot target. If - // set, the first run of given type during the scheduled period will get - // copied. - // - // Currently, the only value that can be set here is kFull (Magneto will - // return an error if it is set to anything else). - BackupType *int32 `json:"backupType,omitempty"` - - // This is a vector of timeouts, specified by the user, for different backup - // types(kFull, kRegular). A cancellation will automatically gets triggered - // if the copy task/sub-task has been running for more than this timeout - // duration. - CopyBackupTimeoutVec []*CancellationTimeout `json:"copyBackupTimeoutVec"` - - // If this is false, then only snapshots from the first completely successful - // run in the given time granularity will be considered for being copied. If - // this is true, then snapshots from the first partially successful run will - // also be eligible to be copied. - CopyPartiallySuccessfulRun *bool `json:"copyPartiallySuccessfulRun,omitempty"` - - // Specifies additional retention policies that should be applied to the copy - // snapshot. A copy snapshot will be retained up to a time that is the - // maximum of all retention policies that are applicable to it. - ExtendedRetentionPolicyVec []*ExtendedRetentionPolicyProto `json:"extendedRetentionPolicyVec"` - - // Specifies the frequency at which the backup job's snapshots should be - // copied to the specified target. - GranularityBucket *GranularityBucket `json:"granularityBucket,omitempty"` - - // This id uniquely identifies this entry in the ProtectionPolicyProto. - // - // If this message is from global policy, this id is generated by Helios. - // Otherwise, it is generated by Iris. Magneto uses this for merging linked - // policies with its parent global policy. - ID *string `json:"id,omitempty"` - - // The retention that applies to log backup snapshots on the target after - // they have been copied. - LogRetentionPolicy *RetentionPolicyProto `json:"logRetentionPolicy,omitempty"` - - // Specifies how to determine the expiration time for snapshots copied due to - // this policy. The snapshots will be marked as expiring (i.e., eligible to - // be garbage collected) in 'num_days_to_keep' days from when the snapshots - // were created. - NumDaysToKeep *int64 `json:"numDaysToKeep,omitempty"` - - // The retention that applies to the snapshots on the target (after they have - // been copied there). - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` - - // The target where the backup snapshots should be copied to. - SnapshotTarget *SnapshotTarget `json:"snapshotTarget,omitempty"` -} - -// Validate validates this snapshot target policy proto -func (m *SnapshotTargetPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyBackupTimeoutVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetentionPolicyVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGranularityBucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTargetPolicyProto) validateCopyBackupTimeoutVec(formats strfmt.Registry) error { - if swag.IsZero(m.CopyBackupTimeoutVec) { // not required - return nil - } - - for i := 0; i < len(m.CopyBackupTimeoutVec); i++ { - if swag.IsZero(m.CopyBackupTimeoutVec[i]) { // not required - continue - } - - if m.CopyBackupTimeoutVec[i] != nil { - if err := m.CopyBackupTimeoutVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyBackupTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyBackupTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) validateExtendedRetentionPolicyVec(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedRetentionPolicyVec) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetentionPolicyVec); i++ { - if swag.IsZero(m.ExtendedRetentionPolicyVec[i]) { // not required - continue - } - - if m.ExtendedRetentionPolicyVec[i] != nil { - if err := m.ExtendedRetentionPolicyVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) validateGranularityBucket(formats strfmt.Registry) error { - if swag.IsZero(m.GranularityBucket) { // not required - return nil - } - - if m.GranularityBucket != nil { - if err := m.GranularityBucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucket") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) validateLogRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.LogRetentionPolicy) { // not required - return nil - } - - if m.LogRetentionPolicy != nil { - if err := m.LogRetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRetentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRetentionPolicy") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) validateSnapshotTarget(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if m.SnapshotTarget != nil { - if err := m.SnapshotTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshot target policy proto based on the context it is used -func (m *SnapshotTargetPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyBackupTimeoutVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetentionPolicyVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGranularityBucket(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateCopyBackupTimeoutVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyBackupTimeoutVec); i++ { - - if m.CopyBackupTimeoutVec[i] != nil { - - if swag.IsZero(m.CopyBackupTimeoutVec[i]) { // not required - return nil - } - - if err := m.CopyBackupTimeoutVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyBackupTimeoutVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyBackupTimeoutVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateExtendedRetentionPolicyVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetentionPolicyVec); i++ { - - if m.ExtendedRetentionPolicyVec[i] != nil { - - if swag.IsZero(m.ExtendedRetentionPolicyVec[i]) { // not required - return nil - } - - if err := m.ExtendedRetentionPolicyVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetentionPolicyVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetentionPolicyVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateGranularityBucket(ctx context.Context, formats strfmt.Registry) error { - - if m.GranularityBucket != nil { - - if swag.IsZero(m.GranularityBucket) { // not required - return nil - } - - if err := m.GranularityBucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularityBucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularityBucket") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateLogRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.LogRetentionPolicy != nil { - - if swag.IsZero(m.LogRetentionPolicy) { // not required - return nil - } - - if err := m.LogRetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRetentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRetentionPolicy") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetPolicyProto) contextValidateSnapshotTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotTarget != nil { - - if swag.IsZero(m.SnapshotTarget) { // not required - return nil - } - - if err := m.SnapshotTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotTargetPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotTargetPolicyProto) UnmarshalBinary(b []byte) error { - var res SnapshotTargetPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_target_settings.go b/v1/models/snapshot_target_settings.go deleted file mode 100644 index e3dc4669..00000000 --- a/v1/models/snapshot_target_settings.go +++ /dev/null @@ -1,290 +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" -) - -// SnapshotTargetSettings Snapshot Target. -// -// Specifies settings about a target where a copied Snapshot is stored. -// A target can be a Remote Cluster or an Archival External Target such as -// AWS or Tape. -// -// swagger:model SnapshotTargetSettings -type SnapshotTargetSettings struct { - - // Specifies the Archival External Target for storing a copied Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - ArchivalTarget *ArchivalExternalTarget `json:"archivalTarget,omitempty"` - - // Specifies the cloud replication target for storing a copied Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - CloudReplicationTarget *CloudDeployTargetDetails `json:"cloudReplicationTarget,omitempty"` - - // Specifies the replication target (Remote Cluster) for storing a copied - // Snapshot. - // If the type is not 'kLocal', either a replicationTarget, - // archivalExternalTarget or cloudReplicationTarget must be specified. - ReplicationTarget *ReplicationTargetSettings `json:"replicationTarget,omitempty"` - - // Specifies the type of a Snapshot target such as 'kLocal', 'kRemote' or - // 'kArchival'. - // 'kLocal' means the Snapshot is stored on a local Cohesity Cluster. - // 'kRemote' means the Snapshot is stored on a Remote Cohesity Cluster. - // (It was copied to the Remote Cohesity Cluster using replication.) - // 'kArchival' means the Snapshot is stored on a Archival External Target - // (such as Tape or AWS). - // 'kCloudDeploy' means the Snapshot is stored on a Cloud platform. - // Enum: ["kLocal","kRemote","kArchival","kCloudDeploy","kCloudReplication"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this snapshot target settings -func (m *SnapshotTargetSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTargetSettings) validateArchivalTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTarget) { // not required - 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 -} - -func (m *SnapshotTargetSettings) validateCloudReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if m.CloudReplicationTarget != nil { - if err := m.CloudReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetSettings) validateReplicationTarget(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if m.ReplicationTarget != nil { - if err := m.ReplicationTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -var snapshotTargetSettingsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLocal","kRemote","kArchival","kCloudDeploy","kCloudReplication"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotTargetSettingsTypeTypePropEnum = append(snapshotTargetSettingsTypeTypePropEnum, v) - } -} - -const ( - - // SnapshotTargetSettingsTypeKLocal captures enum value "kLocal" - SnapshotTargetSettingsTypeKLocal string = "kLocal" - - // SnapshotTargetSettingsTypeKRemote captures enum value "kRemote" - SnapshotTargetSettingsTypeKRemote string = "kRemote" - - // SnapshotTargetSettingsTypeKArchival captures enum value "kArchival" - SnapshotTargetSettingsTypeKArchival string = "kArchival" - - // SnapshotTargetSettingsTypeKCloudDeploy captures enum value "kCloudDeploy" - SnapshotTargetSettingsTypeKCloudDeploy string = "kCloudDeploy" - - // SnapshotTargetSettingsTypeKCloudReplication captures enum value "kCloudReplication" - SnapshotTargetSettingsTypeKCloudReplication string = "kCloudReplication" -) - -// prop value enum -func (m *SnapshotTargetSettings) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotTargetSettingsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotTargetSettings) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this snapshot target settings based on the context it is used -func (m *SnapshotTargetSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotTargetSettings) 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 *SnapshotTargetSettings) contextValidateCloudReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudReplicationTarget != nil { - - if swag.IsZero(m.CloudReplicationTarget) { // not required - return nil - } - - if err := m.CloudReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplicationTarget") - } - return err - } - } - - return nil -} - -func (m *SnapshotTargetSettings) contextValidateReplicationTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationTarget != nil { - - if swag.IsZero(m.ReplicationTarget) { // not required - return nil - } - - if err := m.ReplicationTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotTargetSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotTargetSettings) UnmarshalBinary(b []byte) error { - var res SnapshotTargetSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_version.go b/v1/models/snapshot_version.go deleted file mode 100644 index 2cf1fce0..00000000 --- a/v1/models/snapshot_version.go +++ /dev/null @@ -1,248 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SnapshotVersion Snapshot Version. -// -// Specifies information about snapshots of a backup object. -// -// swagger:model SnapshotVersion -type SnapshotVersion struct { - - // Specifies the number of the attempts made by the Job Run - // to capture a snapshot of the object. For example, if an snapshot - // is successfully captured after three attempts, this field equals 3. - AttemptNumber *int64 `json:"attemptNumber,omitempty"` - - // Specifies the size of the data captured from the source object. - // For a full backup (where Change Block Tracking is not utilized) - // this field is equal to logicalSizeBytes. For an incremental backup - // (where Change Block Tracking is utilized), this field specifies - // the size of the data that has changed since the last backup. - DeltaSizeBytes *int64 `json:"deltaSizeBytes,omitempty"` - - // Specifies the indexing status of the snapshot. - // Specifies the indexing status of the snapshot. - // 'kStarted' indicates that indexing has started. - // 'kDone' indicates that indexing has been completed according to the type - // of object. - // 'kNoIndex' indicates that the snapshot cannot be indexed. This is the case - // during archival restore. - // 'kIceboxRestoreStarted' indicates that indexing is started from an - // archive. - // 'kIceboxRestoreError' indicates that an error occurred during restore - // from archiveand there is no index present. - // 'kSkipped' indicates that indexing is skipped due to indexing backlog. - // Enum: ["kStarted","kDone","kNoIndex","kIceboxRestoreStarted","kIceboxRestoreError","kSkipped"] - IndexingStatus *string `json:"indexingStatus,omitempty"` - - // Specifies if an app-consistent snapshot was captured. For example, - // was the VM was quiesced before the snapshot was captured. - IsAppConsistent *bool `json:"isAppConsistent,omitempty"` - - // Specifies if the snapshot is a full backup. For example, all blocks - // of the VM is captured and Change Block Tracking is not utilized. - IsFullBackup *bool `json:"isFullBackup,omitempty"` - - // Specifies the id of the Job Run that captured the snapshot. - JobRunID *int64 `json:"jobRunId,omitempty"` - - // Specifies the local path relative to the View, without the - // ViewBox/View prefix. - LocalMountPath *string `json:"localMountPath,omitempty"` - - // Specifies the size of the snapshot if the data - // is fully hydrated or expanded and not reduced - // by change-block tracking, compression and deduplication. - // For example if a VMDK of size 100GB is created with thin provisioning - // and the disk size to store the VMDK is 20GB. - // The logical size of this object is 100GB and the physical size is 20GB. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the amount of data actually used on the disk to store this - // object after being reduced by change-block tracking, compression and - // deduplication. - PhysicalSizeBytes *int64 `json:"physicalSizeBytes,omitempty"` - - // Specifies the total amount of disk space used to store this - // object on the primary storage. For example the - // total amount of disk space used to store the VM files - // (such as the VMDK files) on the primary datastore. - PrimaryPhysicalSizeBytes *int64 `json:"primaryPhysicalSizeBytes,omitempty"` - - // Specifies the list of replication information about the current snapshot. - ReplicaInfoList []*ReplicaInfo `json:"replicaInfoList"` - - // Specifies the time when the Job Run starts capturing a snapshot. - // Specified as a Unix epoch Timestamp (in microseconds). - StartedTimeUsecs *int64 `json:"startedTimeUsecs,omitempty"` -} - -// Validate validates this snapshot version -func (m *SnapshotVersion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicaInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotVersionTypeIndexingStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStarted","kDone","kNoIndex","kIceboxRestoreStarted","kIceboxRestoreError","kSkipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotVersionTypeIndexingStatusPropEnum = append(snapshotVersionTypeIndexingStatusPropEnum, v) - } -} - -const ( - - // SnapshotVersionIndexingStatusKStarted captures enum value "kStarted" - SnapshotVersionIndexingStatusKStarted string = "kStarted" - - // SnapshotVersionIndexingStatusKDone captures enum value "kDone" - SnapshotVersionIndexingStatusKDone string = "kDone" - - // SnapshotVersionIndexingStatusKNoIndex captures enum value "kNoIndex" - SnapshotVersionIndexingStatusKNoIndex string = "kNoIndex" - - // SnapshotVersionIndexingStatusKIceboxRestoreStarted captures enum value "kIceboxRestoreStarted" - SnapshotVersionIndexingStatusKIceboxRestoreStarted string = "kIceboxRestoreStarted" - - // SnapshotVersionIndexingStatusKIceboxRestoreError captures enum value "kIceboxRestoreError" - SnapshotVersionIndexingStatusKIceboxRestoreError string = "kIceboxRestoreError" - - // SnapshotVersionIndexingStatusKSkipped captures enum value "kSkipped" - SnapshotVersionIndexingStatusKSkipped string = "kSkipped" -) - -// prop value enum -func (m *SnapshotVersion) validateIndexingStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotVersionTypeIndexingStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotVersion) validateIndexingStatus(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingStatus) { // not required - return nil - } - - // value enum - if err := m.validateIndexingStatusEnum("indexingStatus", "body", *m.IndexingStatus); err != nil { - return err - } - - return nil -} - -func (m *SnapshotVersion) validateReplicaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.ReplicaInfoList); i++ { - if swag.IsZero(m.ReplicaInfoList[i]) { // not required - continue - } - - if m.ReplicaInfoList[i] != nil { - if err := m.ReplicaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this snapshot version based on the context it is used -func (m *SnapshotVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotVersion) contextValidateReplicaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicaInfoList); i++ { - - if m.ReplicaInfoList[i] != nil { - - if swag.IsZero(m.ReplicaInfoList[i]) { // not required - return nil - } - - if err := m.ReplicaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotVersion) UnmarshalBinary(b []byte) error { - var res SnapshotVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snmp_config.go b/v1/models/snmp_config.go deleted file mode 100644 index 48d038b0..00000000 --- a/v1/models/snmp_config.go +++ /dev/null @@ -1,296 +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" -) - -// SnmpConfig SnmpConfig is the struct containing SNMP configuration for this cluster. -// -// swagger:model SnmpConfig -type SnmpConfig struct { - - // AgentPort is the TCP port SNMP agent is using. - // Optional, default it is 161. - AgentPort *int32 `json:"agentPort,omitempty"` - - // Operation is the operation of configuring SNMP services. - // Mandatory, ENABLE or DISABLE. - // Operation is the operation of configuring SNMP services. - // Mandatory, ENABLE or DISABLE. - Operation *int32 `json:"operation,omitempty"` - - // ReadUser is SNMP read user for SNMP Agent. - // Only one read user can be specified. - // Atleast one of read or write is mandatory to be specified. - ReadUser *SnmpUser `json:"readUser,omitempty"` - - // Server is the IP address of Network Management System. - // Mandatory for both SNMP Trap and SNMP polling. - Server *string `json:"server,omitempty"` - - // SystemInfo contains the information relating to the SNMP system. - SystemInfo *SnmpSysInfo `json:"systemInfo,omitempty"` - - // TrapPort is the TCP port SNMP agent is using. - // Optional, default it is 162. - TrapPort *int32 `json:"trapPort,omitempty"` - - // TrapUser is SNMP trap user for SNMP trap daemon. - // Mandatory, one trap user should be specified. - TrapUser *SnmpUser `json:"trapUser,omitempty"` - - // SnmpVersion is the SNMP version to talk with SNMP agent. - // It is SNMP V2 or SNMP V3. - // Mandatory, default is SNMP V2. - Version *int32 `json:"version,omitempty"` - - // Vip is the IP address SNMP agent and SNMP Trap Daemon will use. - // It should be one of the VIPs assigned to the cluster. - // Optional for SNMP trap. Mandatory for SNMP polling if we decide - // to implement this in future. - Vip *string `json:"vip,omitempty"` - - // WriteUser is SNMP write user for SNMP Agent. - // Only one write user can be specified. - // Atleast one of read or write is mandatory to be specified. - WriteUser *SnmpUser `json:"writeUser,omitempty"` -} - -// Validate validates this snmp config -func (m *SnmpConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReadUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTrapUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWriteUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnmpConfig) validateReadUser(formats strfmt.Registry) error { - if swag.IsZero(m.ReadUser) { // not required - return nil - } - - if m.ReadUser != nil { - if err := m.ReadUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readUser") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) validateSystemInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SystemInfo) { // not required - return nil - } - - if m.SystemInfo != nil { - if err := m.SystemInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemInfo") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) validateTrapUser(formats strfmt.Registry) error { - if swag.IsZero(m.TrapUser) { // not required - return nil - } - - if m.TrapUser != nil { - if err := m.TrapUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trapUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trapUser") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) validateWriteUser(formats strfmt.Registry) error { - if swag.IsZero(m.WriteUser) { // not required - return nil - } - - if m.WriteUser != nil { - if err := m.WriteUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeUser") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snmp config based on the context it is used -func (m *SnmpConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReadUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTrapUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWriteUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnmpConfig) contextValidateReadUser(ctx context.Context, formats strfmt.Registry) error { - - if m.ReadUser != nil { - - if swag.IsZero(m.ReadUser) { // not required - return nil - } - - if err := m.ReadUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readUser") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) contextValidateSystemInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemInfo != nil { - - if swag.IsZero(m.SystemInfo) { // not required - return nil - } - - if err := m.SystemInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemInfo") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) contextValidateTrapUser(ctx context.Context, formats strfmt.Registry) error { - - if m.TrapUser != nil { - - if swag.IsZero(m.TrapUser) { // not required - return nil - } - - if err := m.TrapUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trapUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trapUser") - } - return err - } - } - - return nil -} - -func (m *SnmpConfig) contextValidateWriteUser(ctx context.Context, formats strfmt.Registry) error { - - if m.WriteUser != nil { - - if swag.IsZero(m.WriteUser) { // not required - return nil - } - - if err := m.WriteUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeUser") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnmpConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnmpConfig) UnmarshalBinary(b []byte) error { - var res SnmpConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snmp_sys_info.go b/v1/models/snmp_sys_info.go deleted file mode 100644 index 44d52fec..00000000 --- a/v1/models/snmp_sys_info.go +++ /dev/null @@ -1,65 +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" -) - -// SnmpSysInfo SnmpSysInfo is the struct containing SNMP system information. -// -// swagger:model SnmpSysInfo -type SnmpSysInfo struct { - - // Contact is the system contact. - Contact *string `json:"contact,omitempty"` - - // Description is the system description. - Description *string `json:"description,omitempty"` - - // EngineIDType is the system engineID type. - EngineIDType *int32 `json:"engineIdType,omitempty"` - - // Location is the system location. - Location *string `json:"location,omitempty"` - - // Name is the system name. - Name *string `json:"name,omitempty"` - - // Object id is the system object id. - ObjectID *string `json:"objectId,omitempty"` -} - -// Validate validates this snmp sys info -func (m *SnmpSysInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snmp sys info based on context it is used -func (m *SnmpSysInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnmpSysInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnmpSysInfo) UnmarshalBinary(b []byte) error { - var res SnmpSysInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snmp_user.go b/v1/models/snmp_user.go deleted file mode 100644 index 6ce398a0..00000000 --- a/v1/models/snmp_user.go +++ /dev/null @@ -1,86 +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" -) - -// SnmpUser Snmp User is the struct containing SNMP user info for this cluster. -// -// swagger:model SnmpUser -type SnmpUser struct { - - // AuthPassword is the authentication password for SNMP V3 users. - // Mandatory for SNMP V3, and no default value. - AuthPassword *string `json:"authPassword,omitempty"` - - // AuthPrototol is the authentication protocol for SNMP V3 users. - // Mandatory for SNMP V3,default is MD5. - AuthProtocol *int32 `json:"authProtocol,omitempty"` - - // ContextName is the context used for SNMP V3. - // Optional, default is " ". - ContextName *string `json:"contextName,omitempty"` - - // EngineID is the SNMP V3 Engine ID used by trap users. - // Optional, default is cluster name. - EngineID *string `json:"engineID,omitempty"` - - // PrivPassword is the privacy password for SNMP V3 users. - // Optional, default is same as AuthPassword. - PrivPassword *string `json:"privPassword,omitempty"` - - // PrivPrototol is the privacy protocol for SNMP V3 users. - // Optional, default is DES. - PrivProtocol *int32 `json:"privProtocol,omitempty"` - - // SecurityLevel is the SNMP V3 security level. - // It can be authNoPriv, noPriv, and authPriv. - // Optional, default is authNoPriv. - SecurityLevel *int32 `json:"securityLevel,omitempty"` - - // UserName is the user name to access SNMP V2 or SNMP V3 agent. - // Mandatory, and default is cohesityV2Public for SNMP V2, - // cohesityV3Public for SNMP V3. - UserName *string `json:"userName,omitempty"` - - // UserType is the SNMP user type, can be read-only user, read/write user, - // or trap users. - // Mandatory, default is is read-only user. - Usertype *int32 `json:"usertype,omitempty"` -} - -// Validate validates this snmp user -func (m *SnmpUser) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snmp user based on context it is used -func (m *SnmpUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnmpUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnmpUser) UnmarshalBinary(b []byte) error { - var res SnmpUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_app_params.go b/v1/models/source_app_params.go deleted file mode 100644 index 3030f362..00000000 --- a/v1/models/source_app_params.go +++ /dev/null @@ -1,113 +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" -) - -// SourceAppParams This message contains params specific to application running on the source -// such as a VM or a physical host. -// -// swagger:model SourceAppParams -type SourceAppParams struct { - - // If the backup is a VSS full backup with the copy-only option specified. - IsVssCopyOnly *bool `json:"isVssCopyOnly,omitempty"` - - // MS Exchange params. - MsExchangeParams *MSExchangeParams `json:"msExchangeParams,omitempty"` -} - -// Validate validates this source app params -func (m *SourceAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMsExchangeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceAppParams) validateMsExchangeParams(formats strfmt.Registry) error { - if swag.IsZero(m.MsExchangeParams) { // not required - return nil - } - - if m.MsExchangeParams != nil { - if err := m.MsExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msExchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msExchangeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source app params based on the context it is used -func (m *SourceAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMsExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceAppParams) contextValidateMsExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MsExchangeParams != nil { - - if swag.IsZero(m.MsExchangeParams) { // not required - return nil - } - - if err := m.MsExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msExchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msExchangeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceAppParams) UnmarshalBinary(b []byte) error { - var res SourceAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_backup_status.go b/v1/models/source_backup_status.go deleted file mode 100644 index 64d6cb44..00000000 --- a/v1/models/source_backup_status.go +++ /dev/null @@ -1,405 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SourceBackupStatus Source Object Backup Status. -// -// Specifies the source object to protect and the current backup status. -// -// swagger:model SourceBackupStatus -type SourceBackupStatus struct { - - // Specifies the backup status at app/DB level. - AppsBackupStatus []*AppEntityBackupStatusInfo `json:"appsBackupStatus"` - - // Specifies the attempt number of the source object run. - AttemptNum *int32 `json:"attemptNum,omitempty"` - - // Specifies details about the snapshot captured to backup the - // source object (such as a VM). - CurrentSnapshotInfo *SnapshotInfo `json:"currentSnapshotInfo,omitempty"` - - // Specifies if an error occurred (if any) while running this task. - // This field is populated when the status is equal to 'kFailure'. - Error *string `json:"error,omitempty"` - - // Specifies whether this is a 'kFull' or 'kRegular' backup of the Run. - // This may be true even if the scheduled backup type is 'kRegular'. - // This will happen when this run corresponds to the first backup run of - // the Job or if no previous snapshot information is found. - IsFullBackup *bool `json:"isFullBackup,omitempty"` - - // Specifies the number of times the task was restarted because of the - // changes on the backup source host. - NumRestarts *int32 `json:"numRestarts,omitempty"` - - // Specifies the id of the registered Protection Source that is the - // parent of the Objects that are protected by this Job Run. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the yoda progress monitor task path which is used to get pulse - // information about the source that is being backed up. - ProgressMonitorTaskPath *string `json:"progressMonitorTaskPath,omitempty"` - - // Specifies if app-consistent snapshot was captured. This field is set to - // true, if an app-consistent snapshot was taken by - // quiescing applications and the file system before taking a backup. - Quiesced *bool `json:"quiesced,omitempty"` - - // Specifies if the SLA was violated for the Job Run. This field is set - // to true, if time to complete the Job Run is longer than the SLA - // specified. This field is populated when the status is - // set to 'kSuccess' or 'kFailure'. - SLAViolated *bool `json:"slaViolated,omitempty"` - - // Specifies the source object to protect. - Source *ProtectionSource `json:"source,omitempty"` - - // Specifies the stats of the Backup Run task for the Protection Source. - Stats *BackupSourceStats `json:"stats,omitempty"` - - // Specifies the status of the source object being protected. - // 'kAccepted' indicates the task is queued to run but not yet running. - // 'kRunning' indicates the task is running. - // 'kCanceling' indicates a request to cancel the task has occurred but - // the task is not yet canceled. - // 'kCanceled' indicates the task has been canceled. - // 'kSuccess' indicates the task was successful. - // 'kFailure' indicates the task failed. - // 'kWarning' indicates the task has finished with warning. - // 'kOnHold' indicates the task is kept onHold. - // 'kMissed' indicates the task is missed. - // 'Finalizing' indicates the task is finalizing. - // Enum: ["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"] - Status *string `json:"status,omitempty"` - - // Array of Warnings. - // - // Specifies the warnings that occurred (if any) while running this task. - Warnings []string `json:"warnings"` -} - -// Validate validates this source backup status -func (m *SourceBackupStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppsBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceBackupStatus) validateAppsBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AppsBackupStatus) { // not required - return nil - } - - for i := 0; i < len(m.AppsBackupStatus); i++ { - if swag.IsZero(m.AppsBackupStatus[i]) { // not required - continue - } - - if m.AppsBackupStatus[i] != nil { - if err := m.AppsBackupStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsBackupStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsBackupStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SourceBackupStatus) validateCurrentSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CurrentSnapshotInfo) { // not required - return nil - } - - if m.CurrentSnapshotInfo != nil { - if err := m.CurrentSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *SourceBackupStatus) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *SourceBackupStatus) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var sourceBackupStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAccepted","kRunning","kCanceling","kCanceled","kSuccess","kFailure","kWarning","kOnHold","kMissed","kFinalizing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sourceBackupStatusTypeStatusPropEnum = append(sourceBackupStatusTypeStatusPropEnum, v) - } -} - -const ( - - // SourceBackupStatusStatusKAccepted captures enum value "kAccepted" - SourceBackupStatusStatusKAccepted string = "kAccepted" - - // SourceBackupStatusStatusKRunning captures enum value "kRunning" - SourceBackupStatusStatusKRunning string = "kRunning" - - // SourceBackupStatusStatusKCanceling captures enum value "kCanceling" - SourceBackupStatusStatusKCanceling string = "kCanceling" - - // SourceBackupStatusStatusKCanceled captures enum value "kCanceled" - SourceBackupStatusStatusKCanceled string = "kCanceled" - - // SourceBackupStatusStatusKSuccess captures enum value "kSuccess" - SourceBackupStatusStatusKSuccess string = "kSuccess" - - // SourceBackupStatusStatusKFailure captures enum value "kFailure" - SourceBackupStatusStatusKFailure string = "kFailure" - - // SourceBackupStatusStatusKWarning captures enum value "kWarning" - SourceBackupStatusStatusKWarning string = "kWarning" - - // SourceBackupStatusStatusKOnHold captures enum value "kOnHold" - SourceBackupStatusStatusKOnHold string = "kOnHold" - - // SourceBackupStatusStatusKMissed captures enum value "kMissed" - SourceBackupStatusStatusKMissed string = "kMissed" - - // SourceBackupStatusStatusKFinalizing captures enum value "kFinalizing" - SourceBackupStatusStatusKFinalizing string = "kFinalizing" -) - -// prop value enum -func (m *SourceBackupStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sourceBackupStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SourceBackupStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this source backup status based on the context it is used -func (m *SourceBackupStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppsBackupStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCurrentSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceBackupStatus) contextValidateAppsBackupStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppsBackupStatus); i++ { - - if m.AppsBackupStatus[i] != nil { - - if swag.IsZero(m.AppsBackupStatus[i]) { // not required - return nil - } - - if err := m.AppsBackupStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsBackupStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsBackupStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SourceBackupStatus) contextValidateCurrentSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CurrentSnapshotInfo != nil { - - if swag.IsZero(m.CurrentSnapshotInfo) { // not required - return nil - } - - if err := m.CurrentSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *SourceBackupStatus) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *SourceBackupStatus) 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 -} - -// MarshalBinary interface implementation -func (m *SourceBackupStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceBackupStatus) UnmarshalBinary(b []byte) error { - var res SourceBackupStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_filters.go b/v1/models/source_filters.go deleted file mode 100644 index c719129a..00000000 --- a/v1/models/source_filters.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourceFilters Message to capture filters to include/exclude entities from the backup. -// -// For SQL, this filters will be applicable only for auto protect sources and -// can be used at the host, instance level. -// -// swagger:model SourceFilters -type SourceFilters struct { - - // This contains the list of exclude filters to be applied on the entities in - // the backup source. - ExcludeSourceFilterVec []*SourceFiltersSourceFilter `json:"excludeSourceFilterVec"` -} - -// Validate validates this source filters -func (m *SourceFilters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeSourceFilterVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceFilters) validateExcludeSourceFilterVec(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeSourceFilterVec) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeSourceFilterVec); i++ { - if swag.IsZero(m.ExcludeSourceFilterVec[i]) { // not required - continue - } - - if m.ExcludeSourceFilterVec[i] != nil { - if err := m.ExcludeSourceFilterVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSourceFilterVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSourceFilterVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this source filters based on the context it is used -func (m *SourceFilters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExcludeSourceFilterVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceFilters) contextValidateExcludeSourceFilterVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeSourceFilterVec); i++ { - - if m.ExcludeSourceFilterVec[i] != nil { - - if swag.IsZero(m.ExcludeSourceFilterVec[i]) { // not required - return nil - } - - if err := m.ExcludeSourceFilterVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeSourceFilterVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeSourceFilterVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceFilters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceFilters) UnmarshalBinary(b []byte) error { - var res SourceFilters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_filters_source_filter.go b/v1/models/source_filters_source_filter.go deleted file mode 100644 index 9045f7d7..00000000 --- a/v1/models/source_filters_source_filter.go +++ /dev/null @@ -1,65 +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" -) - -// SourceFiltersSourceFilter Message to capture a source filter. Listed below the supported filter -// types with examples. -// -// Plain text filter: { source_filter: "TestDatabase", is_regex: false}. -// Wildcard filter: { source_filter: "Test?Database*", is_regex: false}. -// Regex filter: { source_filter: "^Test.*Database$", is_regex: true}. -// -// swagger:model SourceFilters_SourceFilter -type SourceFiltersSourceFilter struct { - - // Determines if the filter is case sensitive or not. For some - // environments (e.g. SQL), there may be a flag controlled default if the - // field is not populated while for some environments (e.g. VMware), the - // default will be based on the default value for this field. - CaseSensitive *bool `json:"caseSensitive,omitempty"` - - // If true, this implies 'source_filter' is a regex filter. If false, it - // will be treated as wildcard/plain text filter. - IsRegex *bool `json:"isRegex,omitempty"` - - // This contains the filter string. - SourceFilter *string `json:"sourceFilter,omitempty"` -} - -// Validate validates this source filters source filter -func (m *SourceFiltersSourceFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source filters source filter based on context it is used -func (m *SourceFiltersSourceFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SourceFiltersSourceFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceFiltersSourceFilter) UnmarshalBinary(b []byte) error { - var res SourceFiltersSourceFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_for_principal_param.go b/v1/models/source_for_principal_param.go deleted file mode 100644 index 57a9bf19..00000000 --- a/v1/models/source_for_principal_param.go +++ /dev/null @@ -1,66 +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" -) - -// SourceForPrincipalParam Source for Principal Parameters. -// -// Set Access Permissions for a Principal. -// For the specified principal, grant access permissions to the -// the specified Protection Sources and View names. -// -// swagger:model SourceForPrincipalParam -type SourceForPrincipalParam struct { - - // Array of Protection Source Ids. - // - // For the specified principal, grant access permissions to the - // Protection Sources listed in this array. - ProtectionSourceIds []int64 `json:"protectionSourceIds"` - - // Specifies the SID of the principal to grant access permissions to. - Sid *string `json:"sid,omitempty"` - - // Array of View names. - // - // For the specified principal, grant access permissions to the - // Views names listed in this array. - ViewNames []string `json:"viewNames"` -} - -// Validate validates this source for principal param -func (m *SourceForPrincipalParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source for principal param based on context it is used -func (m *SourceForPrincipalParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SourceForPrincipalParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceForPrincipalParam) UnmarshalBinary(b []byte) error { - var res SourceForPrincipalParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_info.go b/v1/models/source_info.go deleted file mode 100644 index c8ccc074..00000000 --- a/v1/models/source_info.go +++ /dev/null @@ -1,55 +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" -) - -// SourceInfo Specifies information about a Source. -// -// Contains the id and name of the Source. -// -// swagger:model SourceInfo -type SourceInfo struct { - - // Id of the source. - ID *int64 `json:"id,omitempty"` - - // Display Name of the source. - Name *string `json:"name,omitempty"` -} - -// Validate validates this source info -func (m *SourceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source info based on context it is used -func (m *SourceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SourceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceInfo) UnmarshalBinary(b []byte) error { - var res SourceInfo - 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 deleted file mode 100644 index 81799bec..00000000 --- a/v1/models/source_special_parameter.go +++ /dev/null @@ -1,441 +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" -) - -// SourceSpecialParameter Source Special Parameters. -// -// Specifies additional special settings for a single Source in a Protection -// Job. This Source must be a leaf node in the Source tree. -// -// swagger:model SourceSpecialParameter -type SourceSpecialParameter struct { - - // Specifies additional special parameters that are applicable only to - // Protection Sources of 'kAD' type. - AdSpecialParameters *ApplicationSpecialParameters `json:"adSpecialParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Protection Sources of 'kExchange' type. - ExchangeSpecialParameters *ApplicationSpecialParameters `json:"exchangeSpecialParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Protection Sources of 'kOracle' type. - OracleSpecialParameters *OracleSpecialParameters `json:"oracleSpecialParameters,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Sources of 'kHost' type in a kPhysical environment. - PhysicalSpecialParameters *PhysicalSpecialParameters `json:"physicalSpecialParameters,omitempty"` - - // Specifies not to index the objects in the Protection Source when - // backing up. - SkipIndexing *bool `json:"skipIndexing,omitempty"` - - // Specifies the object id of the Protection Source that these - // special settings apply. This field must refer to a leaf node - // such a VM or a Physical Server. - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Protection Sources of 'kSQL' type. - SQLSpecialParameters *ApplicationSpecialParameters `json:"sqlSpecialParameters,omitempty"` - - // If true, after the Cohesity Cluster successfully captures a Snapshot - // during a Job Run, the Cluster truncates the Exchange transaction logs on - // a Microsoft Exchange Server. The default value is false. - // This field is deprecated. Use the field in ApplicationParameters inside - // source specific parameter. - // deprecated: true - TruncateExchangeLog *bool `json:"truncateExchangeLog,omitempty"` - - // vm credentials - VMCredentials *SourceSpecialParameterVMCredentials `json:"vmCredentials,omitempty"` - - // Specifies additional special parameters that are applicable only to - // Protection Sources of 'kVMware' type. - VmwareSpecialParameters *VmwareSpecialParameters `json:"vmwareSpecialParameters,omitempty"` -} - -// Validate validates this source special parameter -func (m *SourceSpecialParameter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareSpecialParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceSpecialParameter) validateAdSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.AdSpecialParameters) { // not required - return nil - } - - if m.AdSpecialParameters != nil { - if err := m.AdSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) validateExchangeSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeSpecialParameters) { // not required - return nil - } - - if m.ExchangeSpecialParameters != nil { - if err := m.ExchangeSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) validateOracleSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.OracleSpecialParameters) { // not required - return nil - } - - if m.OracleSpecialParameters != nil { - if err := m.OracleSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) validatePhysicalSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalSpecialParameters) { // not required - return nil - } - - if m.PhysicalSpecialParameters != nil { - if err := m.PhysicalSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) validateSQLSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SQLSpecialParameters) { // not required - return nil - } - - if m.SQLSpecialParameters != nil { - if err := m.SQLSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) validateVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.VMCredentials) { // not required - 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 -} - -func (m *SourceSpecialParameter) validateVmwareSpecialParameters(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareSpecialParameters) { // not required - return nil - } - - if m.VmwareSpecialParameters != nil { - if err := m.VmwareSpecialParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareSpecialParameters") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source special parameter based on the context it is used -func (m *SourceSpecialParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareSpecialParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceSpecialParameter) contextValidateAdSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.AdSpecialParameters != nil { - - if swag.IsZero(m.AdSpecialParameters) { // not required - return nil - } - - if err := m.AdSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) contextValidateExchangeSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeSpecialParameters != nil { - - if swag.IsZero(m.ExchangeSpecialParameters) { // not required - return nil - } - - if err := m.ExchangeSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) contextValidateOracleSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleSpecialParameters != nil { - - if swag.IsZero(m.OracleSpecialParameters) { // not required - return nil - } - - if err := m.OracleSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) contextValidatePhysicalSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalSpecialParameters != nil { - - if swag.IsZero(m.PhysicalSpecialParameters) { // not required - return nil - } - - if err := m.PhysicalSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalSpecialParameters") - } - return err - } - } - - return nil -} - -func (m *SourceSpecialParameter) contextValidateSQLSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLSpecialParameters != nil { - - if swag.IsZero(m.SQLSpecialParameters) { // not required - return nil - } - - if err := m.SQLSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlSpecialParameters") - } - return err - } - } - - return nil -} - -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 -} - -func (m *SourceSpecialParameter) contextValidateVmwareSpecialParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareSpecialParameters != nil { - - if swag.IsZero(m.VmwareSpecialParameters) { // not required - return nil - } - - if err := m.VmwareSpecialParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareSpecialParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareSpecialParameters") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceSpecialParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceSpecialParameter) UnmarshalBinary(b []byte) error { - var res SourceSpecialParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/source_throttling_configuration.go b/v1/models/source_throttling_configuration.go deleted file mode 100644 index 4b9fcd31..00000000 --- a/v1/models/source_throttling_configuration.go +++ /dev/null @@ -1,162 +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" -) - -// SourceThrottlingConfiguration Throttling for source side configuartion. -// -// Specifies the source side throttling configuration. -// -// swagger:model SourceThrottlingConfiguration -type SourceThrottlingConfiguration struct { - - // CPU throttling configuration. - CPUThrottlingConfig *ThrottlingConfiguration `json:"cpuThrottlingConfig,omitempty"` - - // Network throttling configuration. - NetworkThrottlingConfig *ThrottlingConfiguration `json:"networkThrottlingConfig,omitempty"` -} - -// Validate validates this source throttling configuration -func (m *SourceThrottlingConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCPUThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceThrottlingConfiguration) validateCPUThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CPUThrottlingConfig) { // not required - return nil - } - - if m.CPUThrottlingConfig != nil { - if err := m.CPUThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cpuThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cpuThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *SourceThrottlingConfiguration) validateNetworkThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkThrottlingConfig) { // not required - return nil - } - - if m.NetworkThrottlingConfig != nil { - if err := m.NetworkThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkThrottlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source throttling configuration based on the context it is used -func (m *SourceThrottlingConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCPUThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceThrottlingConfiguration) contextValidateCPUThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.CPUThrottlingConfig != nil { - - if swag.IsZero(m.CPUThrottlingConfig) { // not required - return nil - } - - if err := m.CPUThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cpuThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cpuThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *SourceThrottlingConfiguration) contextValidateNetworkThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkThrottlingConfig != nil { - - if swag.IsZero(m.NetworkThrottlingConfig) { // not required - return nil - } - - if err := m.NetworkThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkThrottlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceThrottlingConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceThrottlingConfiguration) UnmarshalBinary(b []byte) error { - var res SourceThrottlingConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sources_for_sid.go b/v1/models/sources_for_sid.go deleted file mode 100644 index 41a7ff2f..00000000 --- a/v1/models/sources_for_sid.go +++ /dev/null @@ -1,197 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourcesForSid Sources for Sid. -// -// Protection Sources and Views With Access Permissions. -// Specifies the Protection Sources objects and Views that the specified -// principal has permissions to access. The principal is specified using -// a security identifier (SID). -// -// swagger:model SourcesForSid -type SourcesForSid struct { - - // Array of Protection Sources. - // - // Specifies the Protection Source objects that the specified principal - // has permissions to access. - ProtectionSources []*ProtectionSource `json:"protectionSources"` - - // Specifies the security identifier (SID) of the principal. - Sid *string `json:"sid,omitempty"` - - // Array of View Names. - // - // Specifies the names of the Views that the specified principal has - // permissions to access. - Views []*View `json:"views"` -} - -// Validate validates this sources for sid -func (m *SourcesForSid) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourcesForSid) validateProtectionSources(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionSources) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionSources); i++ { - if swag.IsZero(m.ProtectionSources[i]) { // not required - continue - } - - if m.ProtectionSources[i] != nil { - if err := m.ProtectionSources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SourcesForSid) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - for i := 0; i < len(m.Views); i++ { - if swag.IsZero(m.Views[i]) { // not required - continue - } - - if m.Views[i] != nil { - if err := m.Views[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sources for sid based on the context it is used -func (m *SourcesForSid) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourcesForSid) contextValidateProtectionSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionSources); i++ { - - if m.ProtectionSources[i] != nil { - - if swag.IsZero(m.ProtectionSources[i]) { // not required - return nil - } - - if err := m.ProtectionSources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SourcesForSid) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Views); i++ { - - if m.Views[i] != nil { - - if swag.IsZero(m.Views[i]) { // not required - return nil - } - - if err := m.Views[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourcesForSid) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourcesForSid) UnmarshalBinary(b []byte) error { - var res SourcesForSid - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/space_usage_policy.go b/v1/models/space_usage_policy.go deleted file mode 100644 index 406b5268..00000000 --- a/v1/models/space_usage_policy.go +++ /dev/null @@ -1,67 +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" -) - -// SpaceUsagePolicy Message that specifies the space usage policy for a particular registered -// entity. -// This proto has limitation to extended it for new values in future. -// Adding a Enum and setting the values based on the Enum will give better -// and cleaner proto. Enum not introduced as it has complexity for upgrade -// scenarios. If in future new parameter is needed in this proto add Enum -// and handle the upgrade scenarios. -// -// swagger:model SpaceUsagePolicy -type SpaceUsagePolicy struct { - - // Specifies the min free space (in GB) expected to be available in the - // datastore where the virtual disks of the VM being backed up reside. If the - // space available is lower than the value defined in it, backup will be - // aborted. - // Note: Currently, this is applicable to VMware type of environments only. - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - // Specifies the min free space (percentage) expected to be available in the - // datastore where the virtual disks of the VM being backed up reside. If the - // space available is lower than the value defined in it, backup will be - // aborted. - // Note: Currently, this is applicable to VMware type of environments only. - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` -} - -// Validate validates this space usage policy -func (m *SpaceUsagePolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this space usage policy based on context it is used -func (m *SpaceUsagePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SpaceUsagePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SpaceUsagePolicy) UnmarshalBinary(b []byte) error { - var res SpaceUsagePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/spog_context.go b/v1/models/spog_context.go deleted file mode 100644 index 6ae21922..00000000 --- a/v1/models/spog_context.go +++ /dev/null @@ -1,58 +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" -) - -// SpogContext SpogContext specifies all of the information about the user and cluster -// which is performing action on this cluster. -// -// swagger:model SpogContext -type SpogContext struct { - - // Specifies the ID of the remote cluster which is accessing this cluster - // via SPOG. - PrimaryClusterID *int64 `json:"PrimaryClusterId,omitempty"` - - // Specifies the SID of the user who is accessing this cluster via SPOG. - PrimaryClusterUserSid *string `json:"PrimaryClusterUserSid,omitempty"` - - // Specifies the username of the user who is accessing this cluster via SPOG. - PrimaryClusterUsername *string `json:"PrimaryClusterUsername,omitempty"` -} - -// Validate validates this spog context -func (m *SpogContext) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this spog context based on context it is used -func (m *SpogContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SpogContext) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SpogContext) UnmarshalBinary(b []byte) error { - var res SpogContext - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_aag_host_and_databases.go b/v1/models/sql_aag_host_and_databases.go deleted file mode 100644 index cad52d99..00000000 --- a/v1/models/sql_aag_host_and_databases.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SQLAagHostAndDatabases SQL AAG Host and Databases. -// -// Specifies AAGs and databases information on an SQL server. If AAGs exist -// on the server, specifies information about the AAG and databases in the -// group for each AAG found on the server. -// -// swagger:model SqlAagHostAndDatabases -type SQLAagHostAndDatabases struct { - - // Specifies a list of AAGs and database members in each AAG. - AagDatabases []*AagAndDatabases `json:"aagDatabases"` - - // Specifies the subtree used to store 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 or Physical hosts. - ApplicationNode *ProtectionSourceNode `json:"applicationNode,omitempty"` - - // Specifies all database entities found on the server. Database may or - // may not be in an AAG. - Databases []*ProtectionSource `json:"databases"` - - // Specifies an error message when the host is not registered as an SQL - // host. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the name of the host that is not registered as an SQL server - // on Cohesity Cluser. - UnknownHostName *string `json:"unknownHostName,omitempty"` -} - -// Validate validates this Sql aag host and databases -func (m *SQLAagHostAndDatabases) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagDatabases(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationNode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabases(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLAagHostAndDatabases) validateAagDatabases(formats strfmt.Registry) error { - if swag.IsZero(m.AagDatabases) { // not required - return nil - } - - for i := 0; i < len(m.AagDatabases); i++ { - if swag.IsZero(m.AagDatabases[i]) { // not required - continue - } - - if m.AagDatabases[i] != nil { - if err := m.AagDatabases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagDatabases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagDatabases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLAagHostAndDatabases) validateApplicationNode(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationNode) { // not required - return nil - } - - if m.ApplicationNode != nil { - if err := m.ApplicationNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationNode") - } - return err - } - } - - return nil -} - -func (m *SQLAagHostAndDatabases) validateDatabases(formats strfmt.Registry) error { - if swag.IsZero(m.Databases) { // not required - return nil - } - - for i := 0; i < len(m.Databases); i++ { - if swag.IsZero(m.Databases[i]) { // not required - continue - } - - if m.Databases[i] != nil { - if err := m.Databases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Sql aag host and databases based on the context it is used -func (m *SQLAagHostAndDatabases) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAagDatabases(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateApplicationNode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabases(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLAagHostAndDatabases) contextValidateAagDatabases(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AagDatabases); i++ { - - if m.AagDatabases[i] != nil { - - if swag.IsZero(m.AagDatabases[i]) { // not required - return nil - } - - if err := m.AagDatabases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagDatabases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagDatabases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLAagHostAndDatabases) contextValidateApplicationNode(ctx context.Context, formats strfmt.Registry) error { - - if m.ApplicationNode != nil { - - if swag.IsZero(m.ApplicationNode) { // not required - return nil - } - - if err := m.ApplicationNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationNode") - } - return err - } - } - - return nil -} - -func (m *SQLAagHostAndDatabases) contextValidateDatabases(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Databases); i++ { - - if m.Databases[i] != nil { - - if swag.IsZero(m.Databases[i]) { // not required - return nil - } - - if err := m.Databases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLAagHostAndDatabases) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLAagHostAndDatabases) UnmarshalBinary(b []byte) error { - var res SQLAagHostAndDatabases - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_backup_job_params.go b/v1/models/sql_backup_job_params.go deleted file mode 100644 index 29e28ac7..00000000 --- a/v1/models/sql_backup_job_params.go +++ /dev/null @@ -1,187 +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" -) - -// SQLBackupJobParams SQL Backup Job Parameters. -// -// Message to capture additional backup job params specific to SQL. -// -// swagger:model SqlBackupJobParams -type SQLBackupJobParams struct { - - // Preference type for backing up databases that are part of an AAG. - // Only applicable if 'use_aag_preferences_from_sql_server' is set to false. - AagBackupPreferenceType *int32 `json:"aagBackupPreferenceType,omitempty"` - - // This is used to regulate certain gflag values from the UI. The values - // passed by the user from the UI will be used for the respective gflags. - AdvancedSettings *AdvancedSettings `json:"advancedSettings,omitempty"` - - // If set to true, only the volumes associated with databases should be - // backed up. The user cannot select additional volumes at host level for - // backup. - // - // If set to false, all the volumes on the host machine will be backed up. - // In this case, the user can further select the exact set of volumes - // using host level params. - // - // Note that the volumes associated with selected databases will always be - // included in the backup. - BackupDatabaseVolumesOnly *bool `json:"backupDatabaseVolumesOnly,omitempty"` - - // Set to true if system databases should be backed up. - BackupSystemDbs *bool `json:"backupSystemDbs,omitempty"` - - // Whether backup should continue after encountering a page checksum error. - ContinueAfterError *bool `json:"continueAfterError,omitempty"` - - // Whether backup checksums are enabled. - EnableChecksum *bool `json:"enableChecksum,omitempty"` - - // If this is set to true, then incremental backup will be performed - // after the server restarts, otherwise a full-backup will be done. - EnableIncrementalBackupAfterRestart *bool `json:"enableIncrementalBackupAfterRestart,omitempty"` - - // The type of SQL full backup to be used for this job. - FullBackupType *int32 `json:"fullBackupType,omitempty"` - - // Whether full backups should be copy-only. - IsCopyOnlyFull *bool `json:"isCopyOnlyFull,omitempty"` - - // Whether log backups should be copy-only. - IsCopyOnlyLog *bool `json:"isCopyOnlyLog,omitempty"` - - // The number of streams to be used for log backups in native sql backup - // command. This is only applicable for native sql log backups. If this is - // not specified, we use the value specified in - // magneto_sql_num_streams_for_each_db_backup gflag. - LogBackupNumStreams *int32 `json:"logBackupNumStreams,omitempty"` - - // 'with_clause' contains 'with clause' to be used for log backups in native - // sql backup command. This is only applicable for native sql log backup. - // Here user can specify multiple backup options. Example: "WITH BUFFERCOUNT - // = 575, MAXTRANSFERSIZE = 2097152". If this is not specified, we use - // the value specified in magneto_sql_native_backup_with_clause gflag. - LogBackupWithClause *string `json:"logBackupWithClause,omitempty"` - - // The number of databases to be backed up per batch. This is only applicable - // for file based sql backup. If this is not specified, we use the value - // specified in magneto_vss_sql_app_file_batch_size gflag. - NumDbsPerBatch *int32 `json:"numDbsPerBatch,omitempty"` - - // The number of streams to be used in native sql backup command. This is - // only applicable for native sql backup. If this is not specified, we use - // the value specified in magneto_sql_num_streams_for_each_db_backup gflag. - NumStreams *int32 `json:"numStreams,omitempty"` - - // Set to true if we should use AAG preferences specified at the SQL server - // host. - UseAagPreferencesFromSQLServer *bool `json:"useAagPreferencesFromSqlServer,omitempty"` - - // Preference type for backing up user databases on the host. - UserDbPreferenceType *int32 `json:"userDbPreferenceType,omitempty"` - - // 'with_clause' contains 'with clause' to be used in native sql backup - // command. This is only applicable for native sql backup. Here user can - // specify multiple backup options. Example: "WITH BUFFERCOUNT = 575, - // MAXTRANSFERSIZE = 2097152". If this is not specified, we use the value - // specified in magneto_sql_native_backup_with_clause gflag. - WithClause *string `json:"withClause,omitempty"` -} - -// Validate validates this Sql backup job params -func (m *SQLBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdvancedSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLBackupJobParams) validateAdvancedSettings(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedSettings) { // not required - return nil - } - - if m.AdvancedSettings != nil { - if err := m.AdvancedSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this Sql backup job params based on the context it is used -func (m *SQLBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdvancedSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLBackupJobParams) contextValidateAdvancedSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.AdvancedSettings != nil { - - if swag.IsZero(m.AdvancedSettings) { // not required - return nil - } - - if err := m.AdvancedSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLBackupJobParams) UnmarshalBinary(b []byte) error { - var res SQLBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_backup_params.go b/v1/models/sql_backup_params.go deleted file mode 100644 index 4c30a816..00000000 --- a/v1/models/sql_backup_params.go +++ /dev/null @@ -1,137 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SQLBackupParams This message contains additional params for a SQL job run. -// -// TODO(abhijit): Rename this to SqlBackupTaskParams. -// -// swagger:model SqlBackupParams -type SQLBackupParams struct { - - // The application entities, if any, that are associated with the job run. - // For example, for a tail log backup triggered by a SQL restore operation, - // this will contain the databases being restored. - AppEntityVec []*PrivateEntityProto `json:"appEntityVec"` - - // Set to true if this is a SQL tail log backup run. - IsSQLTailLogBackup *bool `json:"isSqlTailLogBackup,omitempty"` - - // The path to the progress monitor root path prefix. If set, this prefix - // will be used by the backup job runs in their progress monitors. - ProgressMonitorRootPathPrefix *string `json:"progressMonitorRootPathPrefix,omitempty"` - - // The task id of a related restore task if any. For example, if this is - // a tail log backup triggered by a SQL restore operation, this id is - // set to the task id of the restore task. - RelatedRestoreTaskID *int64 `json:"relatedRestoreTaskId,omitempty"` -} - -// Validate validates this Sql backup params -func (m *SQLBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppEntityVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLBackupParams) validateAppEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.AppEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.AppEntityVec); i++ { - if swag.IsZero(m.AppEntityVec[i]) { // not required - continue - } - - if m.AppEntityVec[i] != nil { - if err := m.AppEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Sql backup params based on the context it is used -func (m *SQLBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLBackupParams) contextValidateAppEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppEntityVec); i++ { - - if m.AppEntityVec[i] != nil { - - if swag.IsZero(m.AppEntityVec[i]) { // not required - return nil - } - - if err := m.AppEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLBackupParams) UnmarshalBinary(b []byte) error { - var res SQLBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_database_file_group_info.go b/v1/models/sql_database_file_group_info.go deleted file mode 100644 index 467a9354..00000000 --- a/v1/models/sql_database_file_group_info.go +++ /dev/null @@ -1,51 +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" -) - -// SQLDatabaseFileGroupInfo Information about a SQL file group. The fields come from the sys.filegroups -// table. See https://goo.gl/ayrg9k for details. -// -// swagger:model SQLDatabaseFileGroupInfo -type SQLDatabaseFileGroupInfo struct { - - // File group name. - Name *string `json:"name,omitempty"` -} - -// Validate validates this SQL database file group info -func (m *SQLDatabaseFileGroupInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this SQL database file group info based on context it is used -func (m *SQLDatabaseFileGroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLDatabaseFileGroupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLDatabaseFileGroupInfo) UnmarshalBinary(b []byte) error { - var res SQLDatabaseFileGroupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_env_job_parameters.go b/v1/models/sql_env_job_parameters.go deleted file mode 100644 index 34538a1c..00000000 --- a/v1/models/sql_env_job_parameters.go +++ /dev/null @@ -1,267 +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" -) - -// SQLEnvJobParameters SQL Environment Job Parameters. -// -// Specifies job parameters applicable for all 'kSQL' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model SqlEnvJobParameters -type SQLEnvJobParameters struct { - - // Specifies the preference for backing up databases that are part of an AAG. - // Only applicable if 'aagPreferenceFromSqlServer' is set to false or not - // given. - // kPrimaryReplicaOnly implies backups should always occur on the primary replica. - // kSecondaryReplicaOnly implies backups should always occur on the secondary replica. - // kPreferSecondaryReplica implies secondary replica is preferred for backups. - // kAnyReplica implies no preference of about whether backups are performed on the primary replica or on a secondary replica. If no secondary replica is available, then performing backups on the primary replica is acceptable. - // Enum: ["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"] - AagPreference *string `json:"aagPreference,omitempty"` - - // If true, AAG preferences are taken from the SQL server host. If this is - // set to false or not given, preferences can be overridden by - // aagBackupPreference. - AagPreferenceFromSQLServer *bool `json:"aagPreferenceFromSqlServer,omitempty"` - - // If true, system databases are backed up. If this is set to false, - // system databases are not backed up. If this field is not specified, - // default value is true. - BackupSystemDatabases *bool `json:"backupSystemDatabases,omitempty"` - - // Specifies the type of the 'kFull' backup job. Specifies whether it is - // Volume level backup or individual files level backup. - // kSqlVSSVolume implies volume based VSS full backup. - // kSqlVSSFile implies file based VSS full backup. - // Enum: ["kSqlVSSVolume","kSqlVSSFile","kSqlNative"] - BackupType *string `json:"backupType,omitempty"` - - // If set to true, only the volumes associated with databases should be - // backed up. The user cannot select additional volumes at host level for - // backup. - // - // If set to false, all the volumes on the host machine will be backed up. - // In this case, the user can further select the exact set of volumes - // using host level params. - // - // Note that the volumes associated with selected databases will always be - // included in the backup. - BackupVolumesOnly *bool `json:"backupVolumesOnly,omitempty"` - - // If true, the backup of type kSqlVssVolume will be incremental - // after restart - IncrementalSnapshotUponRestart *bool `json:"incrementalSnapshotUponRestart,omitempty"` - - // If true, the backup is a full backup with the copy-only option specified. - IsCopyOnlyFull *bool `json:"isCopyOnlyFull,omitempty"` - - // Number of streams to be used in native sql backup. - NumStreams *int32 `json:"numStreams,omitempty"` - - // Specifies the preference for backing up user databases on the host. - // kBackupAllDatabases implies to backup all databases. - // kBackupAllExceptAAGDatabases implies not to backup AAG databases. - // kBackupOnlyAAGDatabases implies to backup only AAG databases. - // Enum: ["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"] - UserDatabasePreference *string `json:"userDatabasePreference,omitempty"` - - // With clause is used for setting clauese in native sql backup. - WithClause *string `json:"withClause,omitempty"` -} - -// Validate validates this Sql env job parameters -func (m *SQLEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserDatabasePreference(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sqlEnvJobParametersTypeAagPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlEnvJobParametersTypeAagPreferencePropEnum = append(sqlEnvJobParametersTypeAagPreferencePropEnum, v) - } -} - -const ( - - // SQLEnvJobParametersAagPreferenceKPrimaryReplicaOnly captures enum value "kPrimaryReplicaOnly" - SQLEnvJobParametersAagPreferenceKPrimaryReplicaOnly string = "kPrimaryReplicaOnly" - - // SQLEnvJobParametersAagPreferenceKSecondaryReplicaOnly captures enum value "kSecondaryReplicaOnly" - SQLEnvJobParametersAagPreferenceKSecondaryReplicaOnly string = "kSecondaryReplicaOnly" - - // SQLEnvJobParametersAagPreferenceKPreferSecondaryReplica captures enum value "kPreferSecondaryReplica" - SQLEnvJobParametersAagPreferenceKPreferSecondaryReplica string = "kPreferSecondaryReplica" - - // SQLEnvJobParametersAagPreferenceKAnyReplica captures enum value "kAnyReplica" - SQLEnvJobParametersAagPreferenceKAnyReplica string = "kAnyReplica" -) - -// prop value enum -func (m *SQLEnvJobParameters) validateAagPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlEnvJobParametersTypeAagPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLEnvJobParameters) validateAagPreference(formats strfmt.Registry) error { - if swag.IsZero(m.AagPreference) { // not required - return nil - } - - // value enum - if err := m.validateAagPreferenceEnum("aagPreference", "body", *m.AagPreference); err != nil { - return err - } - - return nil -} - -var sqlEnvJobParametersTypeBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSqlVSSVolume","kSqlVSSFile","kSqlNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlEnvJobParametersTypeBackupTypePropEnum = append(sqlEnvJobParametersTypeBackupTypePropEnum, v) - } -} - -const ( - - // SQLEnvJobParametersBackupTypeKSQLVSSVolume captures enum value "kSqlVSSVolume" - SQLEnvJobParametersBackupTypeKSQLVSSVolume string = "kSqlVSSVolume" - - // SQLEnvJobParametersBackupTypeKSQLVSSFile captures enum value "kSqlVSSFile" - SQLEnvJobParametersBackupTypeKSQLVSSFile string = "kSqlVSSFile" - - // SQLEnvJobParametersBackupTypeKSQLNative captures enum value "kSqlNative" - SQLEnvJobParametersBackupTypeKSQLNative string = "kSqlNative" -) - -// prop value enum -func (m *SQLEnvJobParameters) validateBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlEnvJobParametersTypeBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLEnvJobParameters) validateBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupType) { // not required - return nil - } - - // value enum - if err := m.validateBackupTypeEnum("backupType", "body", *m.BackupType); err != nil { - return err - } - - return nil -} - -var sqlEnvJobParametersTypeUserDatabasePreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlEnvJobParametersTypeUserDatabasePreferencePropEnum = append(sqlEnvJobParametersTypeUserDatabasePreferencePropEnum, v) - } -} - -const ( - - // SQLEnvJobParametersUserDatabasePreferenceKBackupAllDatabases captures enum value "kBackupAllDatabases" - SQLEnvJobParametersUserDatabasePreferenceKBackupAllDatabases string = "kBackupAllDatabases" - - // SQLEnvJobParametersUserDatabasePreferenceKBackupAllExceptAAGDatabases captures enum value "kBackupAllExceptAAGDatabases" - SQLEnvJobParametersUserDatabasePreferenceKBackupAllExceptAAGDatabases string = "kBackupAllExceptAAGDatabases" - - // SQLEnvJobParametersUserDatabasePreferenceKBackupOnlyAAGDatabases captures enum value "kBackupOnlyAAGDatabases" - SQLEnvJobParametersUserDatabasePreferenceKBackupOnlyAAGDatabases string = "kBackupOnlyAAGDatabases" -) - -// prop value enum -func (m *SQLEnvJobParameters) validateUserDatabasePreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlEnvJobParametersTypeUserDatabasePreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLEnvJobParameters) validateUserDatabasePreference(formats strfmt.Registry) error { - if swag.IsZero(m.UserDatabasePreference) { // not required - return nil - } - - // value enum - if err := m.validateUserDatabasePreferenceEnum("userDatabasePreference", "body", *m.UserDatabasePreference); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Sql env job parameters based on context it is used -func (m *SQLEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLEnvJobParameters) UnmarshalBinary(b []byte) error { - var res SQLEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_id.go b/v1/models/sql_id.go deleted file mode 100644 index e008e398..00000000 --- a/v1/models/sql_id.go +++ /dev/null @@ -1,87 +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" -) - -// SQLID Defines the ids of SQL entities. -// -// Though tempting, the internal fields of the SqlId should NOT be used for -// anything other than identifying databases - they should not be displayed -// to the user, nor should they define behavior (e.g., displaying the -// instance_id or parsing the instance_id to find the SQL Server version). -// -// swagger:model SqlId -type SQLID struct { - - // The unique identifier of the availability group. This corresponds to - // AAG id on SQL Server side. - AagID *string `json:"aagId,omitempty"` - - // The creation date in millis since epoch corresponding to the create_date - // field in the sys.databases system table. This records the date at which - // a table is created or renamed (see https://goo.gl/WO9c4P). - // - // The value returned by sql server contains the local time, without time - // zone information. This value is recorded here assuming the SQL Server - // value is already UTC. Thus, under extremely rare circumstances, there - // may be collisions with database ids. - // - // Do NOT use interpret this value, nor display it to the user since there is - // no time zone information. This should only be used to disambiguate - // databases. - CreateDateMsecs *int64 `json:"createDateMsecs,omitempty"` - - // The index of the database. This corresponds to the db_id field in the SQL - // server system table (see https://goo.gl/Lh2xdp) and is unique with - // respect to the instance at any given time. However, the database_id may - // be reused by SQL Server, e.g., if a database 'foo' has id 5, is deleted, - // and the user creates another database 'bar', then 'bar' may have id 5. - DatabaseID *int64 `json:"databaseId,omitempty"` - - // The unique identifier of the database within the availability group. - // This identifer is the same for all replicas on which the - // database has been joined to the AAG. - GroupDatabaseID *string `json:"groupDatabaseId,omitempty"` - - // The instance ID of the SQL Server instance. The instance id will not - // change during the life of the instance. In SQL Server, by default, the - // instance_id is based on the instance_name (but do not assume this). - InstanceID []uint8 `json:"instanceId"` -} - -// Validate validates this Sql Id -func (m *SQLID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Sql Id based on context it is used -func (m *SQLID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLID) UnmarshalBinary(b []byte) error { - var res SQLID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_instance_info.go b/v1/models/sql_instance_info.go deleted file mode 100644 index 43cacb9f..00000000 --- a/v1/models/sql_instance_info.go +++ /dev/null @@ -1,409 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SQLInstanceInfo Information about a SQL Server instance. The fields correspond to the -// server properties as returned by the SERVERPROPERTY built-in function. -// See https://goo.gl/8amCft for details. -// -// swagger:model SQLInstanceInfo -type SQLInstanceInfo struct { - - // The product build type information of the SQL instance. - BuildTypeInfo *SQLInstanceInfoProductBuildTypeInfo `json:"buildTypeInfo,omitempty"` - - // Populated if the instance is part of a Windows failover cluster. This - // contains the virtual endpoints assigned to the instance by the cluster. - ClusterResourceEndpointVec []*ClusterNetworkingInfoEndpoint `json:"clusterResourceEndpointVec"` - - // Default data files location for the SQL instance - DefaultDataLocation *string `json:"defaultDataLocation,omitempty"` - - // Default log files location for the SQL instance - DefaultLogLocation *string `json:"defaultLogLocation,omitempty"` - - // The edition information of the SQL Instance. - EditionInfo *SQLInstanceInfoEditionInfo `json:"editionInfo,omitempty"` - - // Populated if instance is FCI. List of nodes that are Part of the FCI. - FciNodeNameVec []string `json:"fciNodeNameVec"` - - // This field denotes the resource GUID of the SQL Server resource of this - // FCI instance in a windows cluster. - // The GUID is set by the resource data recieved from GetClusteredSQLInfo, - // which reads the resource id of this FCI resource from the 'Cluster' - // registry hive under HKLM. - // eg: "f9332cdf-84c2-4b7c-961c-2fcbaae690f8" - // This is only applicable if is_fci_instance is set to true. - GUIDInWindowsCluster *string `json:"guidInWindowsCluster,omitempty"` - - // The id of the SQL server instance. - InstanceID []uint8 `json:"instanceId"` - - // The name of the SQL server instance. - InstanceName []uint8 `json:"instanceName"` - - // Specifies if the instance is part of a SQL cluster (FCI). - IsFciInstance *bool `json:"isFciInstance,omitempty"` - - // Whether the SQL instance is online. - IsOnline *bool `json:"isOnline,omitempty"` - - // The product level information of the SQL instance. - LevelInfo *SQLInstanceInfoProductLevelInfo `json:"levelInfo,omitempty"` - - // The product update level information of the SQL instance. - UpdateLevelInfo *SQLInstanceInfoProductUpdateLevelInfo `json:"updateLevelInfo,omitempty"` - - // The version of the SQL instance. - Version *SQLServerInstanceVersion `json:"version,omitempty"` -} - -// Validate validates this SQL instance info -func (m *SQLInstanceInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBuildTypeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterResourceEndpointVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEditionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLevelInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdateLevelInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLInstanceInfo) validateBuildTypeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.BuildTypeInfo) { // not required - return nil - } - - if m.BuildTypeInfo != nil { - if err := m.BuildTypeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("buildTypeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("buildTypeInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) validateClusterResourceEndpointVec(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterResourceEndpointVec) { // not required - return nil - } - - for i := 0; i < len(m.ClusterResourceEndpointVec); i++ { - if swag.IsZero(m.ClusterResourceEndpointVec[i]) { // not required - continue - } - - if m.ClusterResourceEndpointVec[i] != nil { - if err := m.ClusterResourceEndpointVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceEndpointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceEndpointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLInstanceInfo) validateEditionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EditionInfo) { // not required - return nil - } - - if m.EditionInfo != nil { - if err := m.EditionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("editionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("editionInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) validateLevelInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LevelInfo) { // not required - return nil - } - - if m.LevelInfo != nil { - if err := m.LevelInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("levelInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("levelInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) validateUpdateLevelInfo(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateLevelInfo) { // not required - return nil - } - - if m.UpdateLevelInfo != nil { - if err := m.UpdateLevelInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateLevelInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateLevelInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) validateVersion(formats strfmt.Registry) error { - if swag.IsZero(m.Version) { // not required - return nil - } - - if m.Version != nil { - if err := m.Version.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("version") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("version") - } - return err - } - } - - return nil -} - -// ContextValidate validate this SQL instance info based on the context it is used -func (m *SQLInstanceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBuildTypeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterResourceEndpointVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEditionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLevelInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdateLevelInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLInstanceInfo) contextValidateBuildTypeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.BuildTypeInfo != nil { - - if swag.IsZero(m.BuildTypeInfo) { // not required - return nil - } - - if err := m.BuildTypeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("buildTypeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("buildTypeInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) contextValidateClusterResourceEndpointVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterResourceEndpointVec); i++ { - - if m.ClusterResourceEndpointVec[i] != nil { - - if swag.IsZero(m.ClusterResourceEndpointVec[i]) { // not required - return nil - } - - if err := m.ClusterResourceEndpointVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceEndpointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceEndpointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLInstanceInfo) contextValidateEditionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EditionInfo != nil { - - if swag.IsZero(m.EditionInfo) { // not required - return nil - } - - if err := m.EditionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("editionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("editionInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) contextValidateLevelInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LevelInfo != nil { - - if swag.IsZero(m.LevelInfo) { // not required - return nil - } - - if err := m.LevelInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("levelInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("levelInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) contextValidateUpdateLevelInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UpdateLevelInfo != nil { - - if swag.IsZero(m.UpdateLevelInfo) { // not required - return nil - } - - if err := m.UpdateLevelInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateLevelInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateLevelInfo") - } - return err - } - } - - return nil -} - -func (m *SQLInstanceInfo) contextValidateVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.Version != nil { - - if swag.IsZero(m.Version) { // not required - return nil - } - - if err := m.Version.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("version") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("version") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLInstanceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLInstanceInfo) UnmarshalBinary(b []byte) error { - var res SQLInstanceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_instance_info_edition_info.go b/v1/models/sql_instance_info_edition_info.go deleted file mode 100644 index 5dbaa705..00000000 --- a/v1/models/sql_instance_info_edition_info.go +++ /dev/null @@ -1,57 +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" -) - -// SQLInstanceInfoEditionInfo Holds information about the SQL Server edition. -// -// swagger:model SQLInstanceInfo_EditionInfo -type SQLInstanceInfoEditionInfo struct { - - // The edition of the SQL instance. - Edition *int32 `json:"edition,omitempty"` - - // This holds the string value returned by SQL Server for the - // SERVERPROPERTY('Edition'). - EditionString *string `json:"editionString,omitempty"` - - // Whether the SQL instance is 64-bit. - Is64Bit *bool `json:"is_64Bit,omitempty"` -} - -// Validate validates this SQL instance info edition info -func (m *SQLInstanceInfoEditionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this SQL instance info edition info based on context it is used -func (m *SQLInstanceInfoEditionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLInstanceInfoEditionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLInstanceInfoEditionInfo) UnmarshalBinary(b []byte) error { - var res SQLInstanceInfoEditionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_instance_info_product_build_type_info.go b/v1/models/sql_instance_info_product_build_type_info.go deleted file mode 100644 index d7e6fc91..00000000 --- a/v1/models/sql_instance_info_product_build_type_info.go +++ /dev/null @@ -1,55 +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" -) - -// SQLInstanceInfoProductBuildTypeInfo Holds information about the SQL Server build type. -// -// swagger:model SQLInstanceInfo_ProductBuildTypeInfo -type SQLInstanceInfoProductBuildTypeInfo struct { - - // The build type of the SQL Instance. If not set, the build type is - // not applicable to the SQL Instance (i.e., it is a nullable field). - BuildType *int32 `json:"buildType,omitempty"` - - // This holds the string value returned by SQL Server for the - // SERVERPROPERTY('ProductBuildType'). - BuildTypeString *string `json:"buildTypeString,omitempty"` -} - -// Validate validates this SQL instance info product build type info -func (m *SQLInstanceInfoProductBuildTypeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this SQL instance info product build type info based on context it is used -func (m *SQLInstanceInfoProductBuildTypeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLInstanceInfoProductBuildTypeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLInstanceInfoProductBuildTypeInfo) UnmarshalBinary(b []byte) error { - var res SQLInstanceInfoProductBuildTypeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_instance_info_product_level_info.go b/v1/models/sql_instance_info_product_level_info.go deleted file mode 100644 index 62a5bc1a..00000000 --- a/v1/models/sql_instance_info_product_level_info.go +++ /dev/null @@ -1,54 +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" -) - -// SQLInstanceInfoProductLevelInfo Holds information about the SQL Server product level. -// -// swagger:model SQLInstanceInfo_ProductLevelInfo -type SQLInstanceInfoProductLevelInfo struct { - - // The product level of the SQL instance. - Level *int32 `json:"level,omitempty"` - - // This holds the string value returned by SQL Server for the - // SERVERPROPERTY('ProductLevel'). - LevelString *string `json:"levelString,omitempty"` -} - -// Validate validates this SQL instance info product level info -func (m *SQLInstanceInfoProductLevelInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this SQL instance info product level info based on context it is used -func (m *SQLInstanceInfoProductLevelInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLInstanceInfoProductLevelInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLInstanceInfoProductLevelInfo) UnmarshalBinary(b []byte) error { - var res SQLInstanceInfoProductLevelInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_instance_info_product_update_level_info.go b/v1/models/sql_instance_info_product_update_level_info.go deleted file mode 100644 index e06cdbae..00000000 --- a/v1/models/sql_instance_info_product_update_level_info.go +++ /dev/null @@ -1,55 +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" -) - -// SQLInstanceInfoProductUpdateLevelInfo Holds information about the SQL Server product update level. -// -// swagger:model SQLInstanceInfo_ProductUpdateLevelInfo -type SQLInstanceInfoProductUpdateLevelInfo struct { - - // The update level of the SQL instance. If not set, the update level is - // not applicable to the SQL Instance (i.e., it is a nullable field). - UpdateLevel *int32 `json:"updateLevel,omitempty"` - - // This holds the string value returned by SQL Server for the - // SERVERPROPERTY('ProductUpdateLevel'). - UpdateLevelString *string `json:"updateLevelString,omitempty"` -} - -// Validate validates this SQL instance info product update level info -func (m *SQLInstanceInfoProductUpdateLevelInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this SQL instance info product update level info based on context it is used -func (m *SQLInstanceInfoProductUpdateLevelInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLInstanceInfoProductUpdateLevelInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLInstanceInfoProductUpdateLevelInfo) UnmarshalBinary(b []byte) error { - var res SQLInstanceInfoProductUpdateLevelInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_package.go b/v1/models/sql_package.go deleted file mode 100644 index a2abb2ab..00000000 --- a/v1/models/sql_package.go +++ /dev/null @@ -1,62 +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" -) - -// SQLPackage Message representing the options for SQL package. -// -// Details can be found here https://tinyurl.com/ysryshrx -// -// swagger:model SqlPackage -type SQLPackage struct { - - // Only applies to backup. - Compression *int32 `json:"compression,omitempty"` - - // Specifies the degree of parallelism for concurrent operations running - // against a database. The default value is 8. - // Applies to backup/restore. - MaxParallelism *int32 `json:"maxParallelism,omitempty"` - - // Specifies whether the extracted schema model should be verified. If set to - // true, schema validation rules are run on the dacpac or bacpac. - // Only applies to backup. - VerifyExtraction *bool `json:"verifyExtraction,omitempty"` -} - -// Validate validates this Sql package -func (m *SQLPackage) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Sql package based on context it is used -func (m *SQLPackage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLPackage) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLPackage) UnmarshalBinary(b []byte) error { - var res SQLPackage - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_protection_source.go b/v1/models/sql_protection_source.go deleted file mode 100644 index c26a7284..00000000 --- a/v1/models/sql_protection_source.go +++ /dev/null @@ -1,537 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SQLProtectionSource SQL Protection Source. -// -// Specifies an Object representing one SQL Server instance or database. -// -// swagger:model SqlProtectionSource -type SQLProtectionSource struct { - - // Specifies whether the database is marked as available for backup according - // to the SQL Server VSS writer. This may be false if either the state of - // the databases is not online, or if the VSS writer is not online. - // This field is set only for type 'kDatabase'. - IsAvailableForVssBackup *bool `json:"IsAvailableForVssBackup,omitempty"` - - // Specifies the information about the AAG source. - AagInfo *AAGInfo `json:"aagInfo,omitempty"` - - // Specifies the time when the database was created. It is displayed in the - // timezone of the SQL server on which this database is running. - CreatedTimestamp *string `json:"createdTimestamp,omitempty"` - - // Specifies the database name of the SQL Protection Source, if the type - // is database. - DatabaseName *string `json:"databaseName,omitempty"` - - // Specifies the AAG entity id if the database is part of an AAG. - // This field is set only for type 'kDatabase'. - DbAagEntityID *int64 `json:"dbAagEntityId,omitempty"` - - // Specifies the name of the AAG if the database is part of an AAG. - // This field is set only for type 'kDatabase'. - DbAagName *string `json:"dbAagName,omitempty"` - - // Specifies the versions of SQL server that the database is compatible - // with. - DbCompatibilityLevel *int64 `json:"dbCompatibilityLevel,omitempty"` - - // Specifies the information about the set of file groups for this db on - // the host. This is only set if the type is kDatabase. - DbFileGroups []string `json:"dbFileGroups"` - - // Specifies the last known information about the set of database files - // on the host. This field is set only for type 'kDatabase'. - DbFiles []*DbFileInfo `json:"dbFiles"` - - // Specifies the name of the database owner. - DbOwnerUsername *string `json:"dbOwnerUsername,omitempty"` - - // Specifies the default path for data files for DBs in an instance - DefaultDatabaseLocation *string `json:"defaultDatabaseLocation,omitempty"` - - // Specifies the default path for log files for DBs in an instance - DefaultLogLocation *string `json:"defaultLogLocation,omitempty"` - - // Specifies an id that identifies an SQL Object. - ID *SQLSourceID `json:"id,omitempty"` - - // Specifies whether the database is TDE enabled. - IsEncrypted *bool `json:"isEncrypted,omitempty"` - - // Specifies the instance name of the SQL Protection Source - Name *string `json:"name,omitempty"` - - // Specifies the id of the container VM for the SQL Protection Source. - OwnerID *int64 `json:"ownerId,omitempty"` - - // Specifies the Recovery Model for the database in SQL environment. - // Only meaningful for the 'kDatabase' SQL Protection Source. - // Specifies the Recovery Model set for the Microsoft SQL Server. - // 'kSimpleRecoveryModel' indicates the Simple SQL Recovery Model which - // does not utilize log backups. - // 'kFullRecoveryModel' indicates the Full SQL Recovery Model which - // requires log backups and allows recovery to a single point in time. - // 'kBulkLoggedRecoveryModel' indicates the Bulk Logged SQL Recovery Model - // which requires log backups and allows high-performance bulk copy operations. - // Enum: ["kSimpleRecoveryModel","kFullRecoveryModel","kBulkLoggedRecoveryModel"] - RecoveryModel *string `json:"recoveryModel,omitempty"` - - // The state of the database as returned by SQL Server. - // Indicates the state of the database. The values correspond to the 'state' - // field in the system table sys.databases. See https://goo.gl/P66XqM. - // 'kOnline' indicates that database is in online state. - // 'kRestoring' indicates that database is in restore state. - // 'kRecovering' indicates that database is in recovery state. - // 'kRecoveryPending' indicates that database recovery is in pending state. - // 'kSuspect' indicates that primary filegroup is suspect and may be damaged. - // 'kEmergency' indicates that manually forced emergency state. - // 'kOffline' indicates that database is in offline state. - // 'kCopying' indicates that database is in copying state. - // 'kOfflineSecondary' indicates that secondary database is in offline state. - // Enum: ["kOnline","kRestoring","kRecovering","kRecoveryPending","kSuspect","kEmergency","kOffline","kCopying","kOfflineSecondary"] - SQLServerDbState *string `json:"sqlServerDbState,omitempty"` - - // The version of the SQL instance. - SQLServerInstanceVersion *SQLServerInstanceVersion `json:"sqlServerInstanceVersion,omitempty"` - - // Specifies the type of the managed Object in a SQL Protection Source. - // Examples of SQL Objects include 'kInstance' and 'kDatabase'. - // 'kInstance' indicates that SQL server instance is being protected. - // 'kDatabase' indicates that SQL server database is being protected. - // 'kAAG' indicates that SQL AAG (AlwaysOn Availability Group) is being - // protected. - // 'kAAGRootContainer' indicates that SQL AAG's root container is being - // protected. - // 'kRootContainer' indicates root container for SQL sources. - // Enum: ["kInstance","kDatabase","kAAG","kAAGRootContainer","kRootContainer"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this Sql protection source -func (m *SQLProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryModel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLServerDbState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLServerInstanceVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLProtectionSource) validateAagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if m.AagInfo != nil { - if err := m.AagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -func (m *SQLProtectionSource) validateDbFiles(formats strfmt.Registry) error { - if swag.IsZero(m.DbFiles) { // not required - return nil - } - - for i := 0; i < len(m.DbFiles); i++ { - if swag.IsZero(m.DbFiles[i]) { // not required - continue - } - - if m.DbFiles[i] != nil { - if err := m.DbFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLProtectionSource) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -var sqlProtectionSourceTypeRecoveryModelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSimpleRecoveryModel","kFullRecoveryModel","kBulkLoggedRecoveryModel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlProtectionSourceTypeRecoveryModelPropEnum = append(sqlProtectionSourceTypeRecoveryModelPropEnum, v) - } -} - -const ( - - // SQLProtectionSourceRecoveryModelKSimpleRecoveryModel captures enum value "kSimpleRecoveryModel" - SQLProtectionSourceRecoveryModelKSimpleRecoveryModel string = "kSimpleRecoveryModel" - - // SQLProtectionSourceRecoveryModelKFullRecoveryModel captures enum value "kFullRecoveryModel" - SQLProtectionSourceRecoveryModelKFullRecoveryModel string = "kFullRecoveryModel" - - // SQLProtectionSourceRecoveryModelKBulkLoggedRecoveryModel captures enum value "kBulkLoggedRecoveryModel" - SQLProtectionSourceRecoveryModelKBulkLoggedRecoveryModel string = "kBulkLoggedRecoveryModel" -) - -// prop value enum -func (m *SQLProtectionSource) validateRecoveryModelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlProtectionSourceTypeRecoveryModelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLProtectionSource) validateRecoveryModel(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryModel) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryModelEnum("recoveryModel", "body", *m.RecoveryModel); err != nil { - return err - } - - return nil -} - -var sqlProtectionSourceTypeSQLServerDbStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOnline","kRestoring","kRecovering","kRecoveryPending","kSuspect","kEmergency","kOffline","kCopying","kOfflineSecondary"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlProtectionSourceTypeSQLServerDbStatePropEnum = append(sqlProtectionSourceTypeSQLServerDbStatePropEnum, v) - } -} - -const ( - - // SQLProtectionSourceSQLServerDbStateKOnline captures enum value "kOnline" - SQLProtectionSourceSQLServerDbStateKOnline string = "kOnline" - - // SQLProtectionSourceSQLServerDbStateKRestoring captures enum value "kRestoring" - SQLProtectionSourceSQLServerDbStateKRestoring string = "kRestoring" - - // SQLProtectionSourceSQLServerDbStateKRecovering captures enum value "kRecovering" - SQLProtectionSourceSQLServerDbStateKRecovering string = "kRecovering" - - // SQLProtectionSourceSQLServerDbStateKRecoveryPending captures enum value "kRecoveryPending" - SQLProtectionSourceSQLServerDbStateKRecoveryPending string = "kRecoveryPending" - - // SQLProtectionSourceSQLServerDbStateKSuspect captures enum value "kSuspect" - SQLProtectionSourceSQLServerDbStateKSuspect string = "kSuspect" - - // SQLProtectionSourceSQLServerDbStateKEmergency captures enum value "kEmergency" - SQLProtectionSourceSQLServerDbStateKEmergency string = "kEmergency" - - // SQLProtectionSourceSQLServerDbStateKOffline captures enum value "kOffline" - SQLProtectionSourceSQLServerDbStateKOffline string = "kOffline" - - // SQLProtectionSourceSQLServerDbStateKCopying captures enum value "kCopying" - SQLProtectionSourceSQLServerDbStateKCopying string = "kCopying" - - // SQLProtectionSourceSQLServerDbStateKOfflineSecondary captures enum value "kOfflineSecondary" - SQLProtectionSourceSQLServerDbStateKOfflineSecondary string = "kOfflineSecondary" -) - -// prop value enum -func (m *SQLProtectionSource) validateSQLServerDbStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlProtectionSourceTypeSQLServerDbStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLProtectionSource) validateSQLServerDbState(formats strfmt.Registry) error { - if swag.IsZero(m.SQLServerDbState) { // not required - return nil - } - - // value enum - if err := m.validateSQLServerDbStateEnum("sqlServerDbState", "body", *m.SQLServerDbState); err != nil { - return err - } - - return nil -} - -func (m *SQLProtectionSource) validateSQLServerInstanceVersion(formats strfmt.Registry) error { - if swag.IsZero(m.SQLServerInstanceVersion) { // not required - return nil - } - - if m.SQLServerInstanceVersion != nil { - if err := m.SQLServerInstanceVersion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlServerInstanceVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlServerInstanceVersion") - } - return err - } - } - - return nil -} - -var sqlProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInstance","kDatabase","kAAG","kAAGRootContainer","kRootContainer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlProtectionSourceTypeTypePropEnum = append(sqlProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // SQLProtectionSourceTypeKInstance captures enum value "kInstance" - SQLProtectionSourceTypeKInstance string = "kInstance" - - // SQLProtectionSourceTypeKDatabase captures enum value "kDatabase" - SQLProtectionSourceTypeKDatabase string = "kDatabase" - - // SQLProtectionSourceTypeKAAG captures enum value "kAAG" - SQLProtectionSourceTypeKAAG string = "kAAG" - - // SQLProtectionSourceTypeKAAGRootContainer captures enum value "kAAGRootContainer" - SQLProtectionSourceTypeKAAGRootContainer string = "kAAGRootContainer" - - // SQLProtectionSourceTypeKRootContainer captures enum value "kRootContainer" - SQLProtectionSourceTypeKRootContainer string = "kRootContainer" -) - -// prop value enum -func (m *SQLProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this Sql protection source based on the context it is used -func (m *SQLProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLServerInstanceVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLProtectionSource) contextValidateAagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AagInfo != nil { - - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if err := m.AagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -func (m *SQLProtectionSource) contextValidateDbFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbFiles); i++ { - - if m.DbFiles[i] != nil { - - if swag.IsZero(m.DbFiles[i]) { // not required - return nil - } - - if err := m.DbFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SQLProtectionSource) 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 -} - -func (m *SQLProtectionSource) contextValidateSQLServerInstanceVersion(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLServerInstanceVersion != nil { - - if swag.IsZero(m.SQLServerInstanceVersion) { // not required - return nil - } - - if err := m.SQLServerInstanceVersion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlServerInstanceVersion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlServerInstanceVersion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLProtectionSource) UnmarshalBinary(b []byte) error { - var res SQLProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_restore_parameters.go b/v1/models/sql_restore_parameters.go deleted file mode 100644 index 188ae66c..00000000 --- a/v1/models/sql_restore_parameters.go +++ /dev/null @@ -1,234 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SQLRestoreParameters SQL Application Server Restore Parameters. -// -// Specifies the parameters specific the Application Server instance. -// -// swagger:model SqlRestoreParameters -type SQLRestoreParameters struct { - - // Set this to true if tail logs are to be captured before the restore - // operation. This is only applicable if we are restoring the SQL database - // to its hosting Protection Source, and the database is not being renamed. - CaptureTailLogs *bool `json:"captureTailLogs,omitempty"` - - // This field determines if Auto Sync enabled/disabled for SQL Multi-stage - // Restore task - IsAutoSyncEnabled *bool `json:"isAutoSyncEnabled,omitempty"` - - // This field prevents "change data capture" settings from being reomved - // when a database or log backup is restored on another server and database - // is recovered. - KeepCdc *bool `json:"keepCdc,omitempty"` - - // Set this to true if we want to restore the database and do not want to - // bring it online after restore. - // - // This is only applicable if we are restoring the database back to - // its original location. - KeepOffline *bool `json:"keepOffline,omitempty"` - - // Specifies optionally a new name for the restored database. - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - - // Specifies an instance name of the SQL Server that should be restored. - // SQL application has many instances. Each instance has a unique name. - // One of the instances that should be restored must be set in this field. - NewInstanceName *string `json:"newInstanceName,omitempty"` - - // Overwrite Policy specifies a policy to be used while recovering - // existing databases. - // Specifies the policy to be used while recovering - // existing databases. - // 'kFailIfExists' refers to a policy to fail if DB exists already. - // 'kOverwrite' refres to the policy to overwrite existing DB. - // Enum: ["kFailIfExists","kOverwrite"] - OverwritePolicy *string `json:"overwritePolicy,omitempty"` - - // Specifies the time in the past 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 restored from the full/incremental - // snapshot. - RestoreTimeSecs *int64 `json:"restoreTimeSecs,omitempty"` - - // Specifies the directory where to put the database data files. - // Missing directory will be automatically created. This field must be - // set if restoring to a different target host. - TargetDataFilesDirectory *string `json:"targetDataFilesDirectory,omitempty"` - - // Specifies the directory where to put the database log files. Missing - // directory will be automatically created. This field must be set if - // restoring to a different target host. - TargetLogFilesDirectory *string `json:"targetLogFilesDirectory,omitempty"` - - // Specifies the secondary data filename pattern and corresponding - // directories of the DB. Secondary data files are optional and are user - // defined. The recommended file extension for secondary files is ".ndf". - // - // If this option is specified and the destination folders do not exist they - // will be automatically created. - TargetSecondaryDataFilesDirectoryList []*FilenamePatternToDirectory `json:"targetSecondaryDataFilesDirectoryList"` - - // WithClause allows you to specify clauses to be used in native sql restore - // task. - WithClause *string `json:"withClause,omitempty"` -} - -// Validate validates this Sql restore parameters -func (m *SQLRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOverwritePolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetSecondaryDataFilesDirectoryList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sqlRestoreParametersTypeOverwritePolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFailIfExists","kOverwrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sqlRestoreParametersTypeOverwritePolicyPropEnum = append(sqlRestoreParametersTypeOverwritePolicyPropEnum, v) - } -} - -const ( - - // SQLRestoreParametersOverwritePolicyKFailIfExists captures enum value "kFailIfExists" - SQLRestoreParametersOverwritePolicyKFailIfExists string = "kFailIfExists" - - // SQLRestoreParametersOverwritePolicyKOverwrite captures enum value "kOverwrite" - SQLRestoreParametersOverwritePolicyKOverwrite string = "kOverwrite" -) - -// prop value enum -func (m *SQLRestoreParameters) validateOverwritePolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sqlRestoreParametersTypeOverwritePolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SQLRestoreParameters) validateOverwritePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.OverwritePolicy) { // not required - return nil - } - - // value enum - if err := m.validateOverwritePolicyEnum("overwritePolicy", "body", *m.OverwritePolicy); err != nil { - return err - } - - return nil -} - -func (m *SQLRestoreParameters) validateTargetSecondaryDataFilesDirectoryList(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSecondaryDataFilesDirectoryList) { // not required - return nil - } - - for i := 0; i < len(m.TargetSecondaryDataFilesDirectoryList); i++ { - if swag.IsZero(m.TargetSecondaryDataFilesDirectoryList[i]) { // not required - continue - } - - if m.TargetSecondaryDataFilesDirectoryList[i] != nil { - if err := m.TargetSecondaryDataFilesDirectoryList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSecondaryDataFilesDirectoryList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSecondaryDataFilesDirectoryList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Sql restore parameters based on the context it is used -func (m *SQLRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetSecondaryDataFilesDirectoryList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLRestoreParameters) contextValidateTargetSecondaryDataFilesDirectoryList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TargetSecondaryDataFilesDirectoryList); i++ { - - if m.TargetSecondaryDataFilesDirectoryList[i] != nil { - - if swag.IsZero(m.TargetSecondaryDataFilesDirectoryList[i]) { // not required - return nil - } - - if err := m.TargetSecondaryDataFilesDirectoryList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSecondaryDataFilesDirectoryList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSecondaryDataFilesDirectoryList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLRestoreParameters) UnmarshalBinary(b []byte) error { - var res SQLRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_server_instance_version.go b/v1/models/sql_server_instance_version.go deleted file mode 100644 index fc41639d..00000000 --- a/v1/models/sql_server_instance_version.go +++ /dev/null @@ -1,62 +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" -) - -// SQLServerInstanceVersion Holds information about the version of the SQL Server instance. -// -// swagger:model SqlServerInstanceVersion -type SQLServerInstanceVersion struct { - - // build - Build *int32 `json:"build,omitempty"` - - // major version - MajorVersion *int32 `json:"majorVersion,omitempty"` - - // minor version - MinorVersion *int32 `json:"minorVersion,omitempty"` - - // revision - Revision *int32 `json:"revision,omitempty"` - - // version string - VersionString *string `json:"versionString,omitempty"` -} - -// Validate validates this Sql server instance version -func (m *SQLServerInstanceVersion) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Sql server instance version based on context it is used -func (m *SQLServerInstanceVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLServerInstanceVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLServerInstanceVersion) UnmarshalBinary(b []byte) error { - var res SQLServerInstanceVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_source_id.go b/v1/models/sql_source_id.go deleted file mode 100644 index b36b3180..00000000 --- a/v1/models/sql_source_id.go +++ /dev/null @@ -1,67 +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" -) - -// SQLSourceID SQL Source Id. -// -// Specifies a unique id for a SQL Protection Source. -// -// swagger:model SqlSourceId -type SQLSourceID struct { - - // Specifies a unique identifier generated from the date the database is - // created or renamed. - // Cohesity uses this identifier in combination with the databaseId - // to uniquely identify a database. - CreatedDateMsecs *int64 `json:"createdDateMsecs,omitempty"` - - // Specifies a unique id of the database but only for the life of the - // database. SQL Server may reuse database ids. Cohesity uses the - // createDateMsecs in combination with this databaseId to - // uniquely identify a database. - DatabaseID *int64 `json:"databaseId,omitempty"` - - // The SQL Server Instance id. - // - // Specifies unique id for the SQL Server instance. - // This id does not change during the life of the instance. - InstanceID *string `json:"instanceId,omitempty"` -} - -// Validate validates this Sql source Id -func (m *SQLSourceID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Sql source Id based on context it is used -func (m *SQLSourceID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLSourceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLSourceID) UnmarshalBinary(b []byte) error { - var res SQLSourceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/sql_update_restore_task_options.go b/v1/models/sql_update_restore_task_options.go deleted file mode 100644 index 1ef83dc4..00000000 --- a/v1/models/sql_update_restore_task_options.go +++ /dev/null @@ -1,54 +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" -) - -// SQLUpdateRestoreTaskOptions SQL specific options to update a SQL restore task. -// -// swagger:model SqlUpdateRestoreTaskOptions -type SQLUpdateRestoreTaskOptions struct { - - // Enable/Disable auto_sync for db migration - EnableAutoSync *bool `json:"enableAutoSync,omitempty"` - - // This field is set if we are performing an action on a multi-stage SQL - // restore. - MultiStageRestoreAction *int32 `json:"multiStageRestoreAction,omitempty"` -} - -// Validate validates this Sql update restore task options -func (m *SQLUpdateRestoreTaskOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Sql update restore task options based on context it is used -func (m *SQLUpdateRestoreTaskOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SQLUpdateRestoreTaskOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLUpdateRestoreTaskOptions) UnmarshalBinary(b []byte) error { - var res SQLUpdateRestoreTaskOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ssl_certificate_config.go b/v1/models/ssl_certificate_config.go deleted file mode 100644 index 888bf22d..00000000 --- a/v1/models/ssl_certificate_config.go +++ /dev/null @@ -1,60 +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" -) - -// SslCertificateConfig SSL Certificate Configuration. -// -// SslCertificateConfig represents the SSL certificate object exposed to the -// user. -// -// swagger:model SslCertificateConfig -type SslCertificateConfig struct { - - // Certificate is a SSL certificate used by Iris HTTPS webserver. - Certificate *string `json:"certificate,omitempty"` - - // LastUpdateTimeMsecs is a time in milliseconds at which certificate was - // last updated. - LastUpdateTimeMsecs *int64 `json:"lastUpdateTimeMsecs,omitempty"` - - // PrivateKey is a matching private key of the above certificate. - PrivateKey *string `json:"privateKey,omitempty"` -} - -// Validate validates this ssl certificate config -func (m *SslCertificateConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ssl certificate config based on context it is used -func (m *SslCertificateConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SslCertificateConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SslCertificateConfig) UnmarshalBinary(b []byte) error { - var res SslCertificateConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/ssl_verification.go b/v1/models/ssl_verification.go deleted file mode 100644 index 5547006b..00000000 --- a/v1/models/ssl_verification.go +++ /dev/null @@ -1,56 +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" -) - -// SslVerification SSL certification verification settings. -// -// Specifies information about SSL verification when registering certain -// sources. -// -// swagger:model SslVerification -type SslVerification struct { - - // Contains the contents of CA cert/cert chain. - CaCertificate *string `json:"caCertificate,omitempty"` - - // Whether SSL verification should be performed. - IsEnabled *bool `json:"isEnabled,omitempty"` -} - -// Validate validates this ssl verification -func (m *SslVerification) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this ssl verification based on context it is used -func (m *SslVerification) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SslVerification) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SslVerification) UnmarshalBinary(b []byte) error { - var res SslVerification - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/standby_resource.go b/v1/models/standby_resource.go deleted file mode 100644 index 92ef2c0f..00000000 --- a/v1/models/standby_resource.go +++ /dev/null @@ -1,115 +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" -) - -// StandbyResource Message to encapsulate resources to be used to create a standby entity on -// the primary environment. Each environment should define the parameters it -// needs to create an entity on the primary environment. -// -// swagger:model StandbyResource -type StandbyResource struct { - - // User defined recovery point objective for the standby VM. Using this RPO, - // Magneto will hydrate the VMs. - RecoveryPointObjectiveSecs *int64 `json:"recoveryPointObjectiveSecs,omitempty"` - - // Standby resources needed in a VMware environment. - VmwareStandbyResource *VMwareStandbyResource `json:"vmwareStandbyResource,omitempty"` -} - -// Validate validates this standby resource -func (m *StandbyResource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVmwareStandbyResource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StandbyResource) validateVmwareStandbyResource(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareStandbyResource) { // not required - return nil - } - - if m.VmwareStandbyResource != nil { - if err := m.VmwareStandbyResource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareStandbyResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareStandbyResource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this standby resource based on the context it is used -func (m *StandbyResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareStandbyResource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StandbyResource) contextValidateVmwareStandbyResource(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareStandbyResource != nil { - - if swag.IsZero(m.VmwareStandbyResource) { // not required - return nil - } - - if err := m.VmwareStandbyResource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareStandbyResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareStandbyResource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StandbyResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StandbyResource) UnmarshalBinary(b []byte) error { - var res StandbyResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/statement.go b/v1/models/statement.go deleted file mode 100644 index aa17a868..00000000 --- a/v1/models/statement.go +++ /dev/null @@ -1,211 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Statement Protobuf that describes the statement for a bucket policy. -// -// swagger:model Statement -type Statement struct { - - // This field includes keyword which map to permission for each S3 - // operation. We support wildcard('*' and '?') for this field. - // Some of the valid formats are : "*", - // "s3:*", - // "s3:*Object" - ActionVec []string `json:"actionVec"` - - // The field specified the conditions for when a policy is in effect. - ConditionVec []*Condition `json:"conditionVec"` - - // This field specifies whether the statement results in an allow or an - // explicit deny. - IsAllow *bool `json:"isAllow,omitempty"` - - // If set, actions except the ones specified in action_vec would be - // considered valid for evaluating the statement. This is set if JSON has - // "NotAction" element. - NegateActionVec *bool `json:"negateActionVec,omitempty"` - - // If set, users except the specified principal would be considered valid for - // evaluating the statement. This is set if JSON has "NotPrincipal" element. - NegatePrincipal *bool `json:"negatePrincipal,omitempty"` - - // If set, resources except the ones specified in resource_vec would be - // considered valid for evaluating the statement. This is set if JSON has - // "NotResource" element. - NegateResourceVec *bool `json:"negateResourceVec,omitempty"` - - // This field indicates the user entities allowed to access the resource(s). - Principal *Principal `json:"principal,omitempty"` - - // This field indicates the resource for which the statement is applied. - // The format we will be using is "urn:csf:s3:::bucket_name/key_name". - // 'csf' stands for Cohesity SmartFiles. We support wildcard('*' and '?') in - // the key name. - // Some of the valid formats are : "urn:csf:s3:::bucket_name", - // "urn:csf:s3:::bucket_name/*", - // "urn:csf:s3:::bucket_name/*/ab?" - // We remove the common prefix 'urn:csf:s3:::bucket_name' from the string - // and then store it in proto. - ResourceVec []string `json:"resourceVec"` - - // Statement identifier. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this statement -func (m *Statement) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConditionVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrincipal(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Statement) validateConditionVec(formats strfmt.Registry) error { - if swag.IsZero(m.ConditionVec) { // not required - return nil - } - - for i := 0; i < len(m.ConditionVec); i++ { - if swag.IsZero(m.ConditionVec[i]) { // not required - continue - } - - if m.ConditionVec[i] != nil { - if err := m.ConditionVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Statement) validatePrincipal(formats strfmt.Registry) error { - if swag.IsZero(m.Principal) { // not required - return nil - } - - if m.Principal != nil { - if err := m.Principal.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("principal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("principal") - } - return err - } - } - - return nil -} - -// ContextValidate validate this statement based on the context it is used -func (m *Statement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConditionVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrincipal(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Statement) contextValidateConditionVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConditionVec); i++ { - - if m.ConditionVec[i] != nil { - - if swag.IsZero(m.ConditionVec[i]) { // not required - return nil - } - - if err := m.ConditionVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Statement) contextValidatePrincipal(ctx context.Context, formats strfmt.Registry) error { - - if m.Principal != nil { - - if swag.IsZero(m.Principal) { // not required - return nil - } - - if err := m.Principal.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("principal") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("principal") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Statement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Statement) UnmarshalBinary(b []byte) error { - var res Statement - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/stats_group.go b/v1/models/stats_group.go deleted file mode 100644 index 681ae191..00000000 --- a/v1/models/stats_group.go +++ /dev/null @@ -1,137 +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" -) - -// StatsGroup StatsGroup. -// -// StatsGroup describes the details of a stats group. A stats group is a basic -// group of usage stats, it is the usage of a tenant within a storage domain -// may also for a specific consumer type. -// -// swagger:model StatsGroup -type StatsGroup struct { - - // Specifies the consumer information of this group. - Consumer *Consumer `json:"consumer,omitempty"` - - // Specifies the entity id of the group. - EntityID *string `json:"entityId,omitempty"` - - // Specifies the id of the group. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the group. - Name *string `json:"name,omitempty"` - - // Specifies the id of the organization (tenant) with respect to this group. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the name of the organization (tenant) with respect to this - // group. - TenantName *string `json:"tenantName,omitempty"` - - // Specifies the id of the view box (storage domain) with respect to this - // group. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the name of the view box (storage domain) with respect to this - // group. - ViewBoxName *string `json:"viewBoxName,omitempty"` -} - -// Validate validates this stats group -func (m *StatsGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConsumer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsGroup) validateConsumer(formats strfmt.Registry) error { - if swag.IsZero(m.Consumer) { // not required - return nil - } - - if m.Consumer != nil { - if err := m.Consumer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("consumer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("consumer") - } - return err - } - } - - return nil -} - -// ContextValidate validate this stats group based on the context it is used -func (m *StatsGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConsumer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsGroup) contextValidateConsumer(ctx context.Context, formats strfmt.Registry) error { - - if m.Consumer != nil { - - if swag.IsZero(m.Consumer) { // not required - return nil - } - - if err := m.Consumer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("consumer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("consumer") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StatsGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StatsGroup) UnmarshalBinary(b []byte) error { - var res StatsGroup - 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 deleted file mode 100644 index 3f144587..00000000 --- a/v1/models/stop_remote_vault_search_job_parameters.go +++ /dev/null @@ -1,111 +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" -) - -// StopRemoteVaultSearchJobParameters Search Job Stop Request. -// -// Request to stop a remote Vault search Job. -// -// swagger:model StopRemoteVaultSearchJobParameters -type StopRemoteVaultSearchJobParameters struct { - - // search job Uid - SearchJobUID *StopRemoteVaultSearchJobParametersSearchJobUID `json:"searchJobUid,omitempty"` -} - -// Validate validates this stop remote vault search job parameters -func (m *StopRemoteVaultSearchJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StopRemoteVaultSearchJobParameters) validateSearchJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.SearchJobUID) { // not required - 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 -} - -// ContextValidate validate this stop remote vault search job parameters based on the context it is used -func (m *StopRemoteVaultSearchJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSearchJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *StopRemoteVaultSearchJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StopRemoteVaultSearchJobParameters) UnmarshalBinary(b []byte) error { - var res StopRemoteVaultSearchJobParameters - 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_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/storage_array_snapshot_config_params.go b/v1/models/storage_array_snapshot_config_params.go deleted file mode 100644 index 2ee3ad53..00000000 --- a/v1/models/storage_array_snapshot_config_params.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StorageArraySnapshotConfigParams Specifies storage array snapshot configuration. -// -// swagger:model StorageArraySnapshotConfigParams -type StorageArraySnapshotConfigParams struct { - - // Specifies if the storage array snapshot max snapshots config is enabled or - // not. - IsMaxSnapshotsConfigEnabled *bool `json:"isMaxSnapshotsConfigEnabled,omitempty"` - - // Specifies if the storage array snapshot max space config is enabled or - // not. - IsMaxSpaceConfigEnabled *bool `json:"isMaxSpaceConfigEnabled,omitempty"` - - // Specifies the storage array snapshot free space config for this - // volume/lun. - StorageArraySnapshotMaxSpaceConfig *StorageArraySnapshotMaxSpaceConfigParams `json:"storageArraySnapshotMaxSpaceConfig,omitempty"` - - // Specifies throttling policies configured for individual volume/lun. - StorageArraySnapshotThrottlingPolicies []*StorageArraySnapshotThrottlingPolicy `json:"storageArraySnapshotThrottlingPolicies"` -} - -// Validate validates this storage array snapshot config params -func (m *StorageArraySnapshotConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageArraySnapshotMaxSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotThrottlingPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotConfigParams) validateStorageArraySnapshotMaxSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotMaxSpaceConfig) { // not required - return nil - } - - if m.StorageArraySnapshotMaxSpaceConfig != nil { - if err := m.StorageArraySnapshotMaxSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfigParams) validateStorageArraySnapshotThrottlingPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies) { // not required - return nil - } - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - continue - } - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - if err := m.StorageArraySnapshotThrottlingPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this storage array snapshot config params based on the context it is used -func (m *StorageArraySnapshotConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageArraySnapshotMaxSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotThrottlingPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotConfigParams) contextValidateStorageArraySnapshotMaxSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotMaxSpaceConfig != nil { - - if swag.IsZero(m.StorageArraySnapshotMaxSpaceConfig) { // not required - return nil - } - - if err := m.StorageArraySnapshotMaxSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfigParams) contextValidateStorageArraySnapshotThrottlingPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - return nil - } - - if err := m.StorageArraySnapshotThrottlingPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotConfigParams) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_array_snapshot_max_snapshot_config_params.go b/v1/models/storage_array_snapshot_max_snapshot_config_params.go deleted file mode 100644 index 72fb7d35..00000000 --- a/v1/models/storage_array_snapshot_max_snapshot_config_params.go +++ /dev/null @@ -1,50 +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" -) - -// StorageArraySnapshotMaxSnapshotConfigParams Specifies storage array snapshot max snapshots config. -// -// swagger:model StorageArraySnapshotMaxSnapshotConfigParams -type StorageArraySnapshotMaxSnapshotConfigParams struct { - - // Max number of storage snapshots allowed per volume/lun. - MaxSnapshots *int32 `json:"maxSnapshots,omitempty"` -} - -// Validate validates this storage array snapshot max snapshot config params -func (m *StorageArraySnapshotMaxSnapshotConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage array snapshot max snapshot config params based on context it is used -func (m *StorageArraySnapshotMaxSnapshotConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSnapshotConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSnapshotConfigParams) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotMaxSnapshotConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_array_snapshot_max_space_config_params.go b/v1/models/storage_array_snapshot_max_space_config_params.go deleted file mode 100644 index 93f82251..00000000 --- a/v1/models/storage_array_snapshot_max_space_config_params.go +++ /dev/null @@ -1,50 +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" -) - -// StorageArraySnapshotMaxSpaceConfigParams Specifies storage array snapshot max space config. -// -// swagger:model StorageArraySnapshotMaxSpaceConfigParams -type StorageArraySnapshotMaxSpaceConfigParams struct { - - // Max number of storage snapshots allowed per volume/lun. - MaxSnapshotSpacePercentage *int32 `json:"maxSnapshotSpacePercentage,omitempty"` -} - -// Validate validates this storage array snapshot max space config params -func (m *StorageArraySnapshotMaxSpaceConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage array snapshot max space config params based on context it is used -func (m *StorageArraySnapshotMaxSpaceConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSpaceConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSpaceConfigParams) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotMaxSpaceConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_array_snapshot_throttling_policy.go b/v1/models/storage_array_snapshot_throttling_policy.go deleted file mode 100644 index 79b42c02..00000000 --- a/v1/models/storage_array_snapshot_throttling_policy.go +++ /dev/null @@ -1,173 +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" -) - -// StorageArraySnapshotThrottlingPolicy Specifies storage array snapshot throttling policy parameters. -// -// swagger:model StorageArraySnapshotThrottlingPolicy -type StorageArraySnapshotThrottlingPolicy struct { - - // Specifies the volume id of the storage array snapshot config. - ID *int64 `json:"id,omitempty"` - - // Specifies if the storage array snapshot max snapshots config is enabled or - // not. - IsMaxSnapshotsConfigEnabled *bool `json:"isMaxSnapshotsConfigEnabled,omitempty"` - - // Specifies if the storage array snapshot max space config is enabled or - // not. - IsMaxSpaceConfigEnabled *bool `json:"isMaxSpaceConfigEnabled,omitempty"` - - // Specifies the storage array snapshot max snapshot config for this - // volume/lun. Valid only when IsMaxSnapshotsConfigEnabled is true. - MaxSnapshotConfig *StorageArraySnapshotMaxSnapshotConfigParams `json:"maxSnapshotConfig,omitempty"` - - // Specifies the storage array snapshot free space config for this - // volume/lun. Valid only when IsMaxSpaceConfigEnabled is true. - MaxSpaceConfig *StorageArraySnapshotMaxSpaceConfigParams `json:"maxSpaceConfig,omitempty"` -} - -// Validate validates this storage array snapshot throttling policy -func (m *StorageArraySnapshotThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) validateMaxSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if m.MaxSnapshotConfig != nil { - if err := m.MaxSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) validateMaxSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if m.MaxSpaceConfig != nil { - if err := m.MaxSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage array snapshot throttling policy based on the context it is used -func (m *StorageArraySnapshotThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMaxSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) contextValidateMaxSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSnapshotConfig != nil { - - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if err := m.MaxSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) contextValidateMaxSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSpaceConfig != nil { - - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if err := m.MaxSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_domain_stats.go b/v1/models/storage_domain_stats.go deleted file mode 100644 index 38daf76c..00000000 --- a/v1/models/storage_domain_stats.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StorageDomainStats StorageDomainStats is the stats of a single view box. -// -// swagger:model StorageDomainStats -type StorageDomainStats struct { - - // Specifies the cloud spill vault id of the view box (storage domain). - CloudSpillVaultID *int64 `json:"cloudSpillVaultId,omitempty"` - - // Specifies a list of groups associated to this view box (storage domain). - GroupList []*StatsGroup `json:"groupList"` - - // Specifies the id of the view box (storage domain). - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the view box (storage domain). - Name *string `json:"name,omitempty"` - - // Specifies the hard limit of physical quota of the view box - // (storage domain). - QuotaHardLimitBytes *int64 `json:"quotaHardLimitBytes,omitempty"` - - // Specifies a list of schemaInfos of the view box (storage domain). - SchemaInfoList []*UsageSchemaInfo `json:"schemaInfoList"` - - // Specifies details of statistics of the view box (storage domain). - Stats *DataUsageStats `json:"stats,omitempty"` -} - -// Validate validates this storage domain stats -func (m *StorageDomainStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomainStats) validateGroupList(formats strfmt.Registry) error { - if swag.IsZero(m.GroupList) { // not required - return nil - } - - for i := 0; i < len(m.GroupList); i++ { - if swag.IsZero(m.GroupList[i]) { // not required - continue - } - - if m.GroupList[i] != nil { - if err := m.GroupList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomainStats) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomainStats) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this storage domain stats based on the context it is used -func (m *StorageDomainStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomainStats) contextValidateGroupList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GroupList); i++ { - - if m.GroupList[i] != nil { - - if swag.IsZero(m.GroupList[i]) { // not required - return nil - } - - if err := m.GroupList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomainStats) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomainStats) 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 -} - -// MarshalBinary interface implementation -func (m *StorageDomainStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageDomainStats) UnmarshalBinary(b []byte) error { - var res StorageDomainStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_efficiency_tile.go b/v1/models/storage_efficiency_tile.go deleted file mode 100644 index e071edb5..00000000 --- a/v1/models/storage_efficiency_tile.go +++ /dev/null @@ -1,470 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StorageEfficiencyTile Storage Efficiency Tile. -// -// StorageEfficiencyTile gives tile information for the storage saved -// because of compression and dedupe done on the cluster. -// -// swagger:model StorageEfficiencyTile -type StorageEfficiencyTile struct { - - // Specifies the size of data brought into the cluster. This is the usage - // before data reduction if we ignore the zeroes and effects of cloning. - DataInBytes *int64 `json:"dataInBytes,omitempty"` - - // Specifies the samples taken for Data brought into the cluster in bytes - // in ascending order of time. - DataInBytesSamples []*Sample `json:"dataInBytesSamples"` - - // Specifies the size of data after compression and or dedupe operations - // just before the data is replicated to other nodes as per RF or - // Erasure Coding policy. - DataInDedupedBytes *int64 `json:"dataInDedupedBytes,omitempty"` - - // Specifies the samples taken for morphed data in bytes in ascending order - // of time. - DataInDedupedBytesSamples []*Sample `json:"dataInDedupedBytesSamples"` - - // Specifies the current dedupe ratio on the cluster. It is the ratio of - // DataInBytes to DataInDedupedBytes. - DedupeRatio *float64 `json:"dedupeRatio,omitempty"` - - // Specifies the samples for data reduction ratio in ascending order of time. - DedupeRatioSamples []*Sample `json:"dedupeRatioSamples"` - - // Specifies the duration in days in which the samples were taken. - // For this tile, it is 7 days. - DurationDays *int32 `json:"durationDays,omitempty"` - - // Specifies the interval between the samples in seconds. - // For this tile, it is 1 day which is 86400 seconds. - IntervalSeconds *int32 `json:"intervalSeconds,omitempty"` - - // Specifies the size of logical data currently represented on the cluster. - LogicalUsedBytes *int64 `json:"logicalUsedBytes,omitempty"` - - // Specifies the samples taken for logical data represented in bytes in - // ascending order of time. - LogicalUsedBytesSamples []*Sample `json:"logicalUsedBytesSamples"` - - // Specifies the size of physical data currently consumed on the cluster. - PhysicalUsedBytes *int64 `json:"physicalUsedBytes,omitempty"` - - // Specifies the samples taken for physical data consumed in bytes in - // ascending order of time. - PhysicalUsedBytesSamples []*Sample `json:"physicalUsedBytesSamples"` - - // Specifies the current storage reduction ratio on the cluster. - // It is the ratio of LogicalUsedBytes to PhysicalUsedBytes. - StorageReductionRatio *float64 `json:"storageReductionRatio,omitempty"` - - // Specifies the samples for storage reduction ratio in ascending order of - // time. - StorageReductionSamples []*Sample `json:"storageReductionSamples"` -} - -// Validate validates this storage efficiency tile -func (m *StorageEfficiencyTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataInBytesSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataInDedupedBytesSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDedupeRatioSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalUsedBytesSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalUsedBytesSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageReductionSamples(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageEfficiencyTile) validateDataInBytesSamples(formats strfmt.Registry) error { - if swag.IsZero(m.DataInBytesSamples) { // not required - return nil - } - - for i := 0; i < len(m.DataInBytesSamples); i++ { - if swag.IsZero(m.DataInBytesSamples[i]) { // not required - continue - } - - if m.DataInBytesSamples[i] != nil { - if err := m.DataInBytesSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) validateDataInDedupedBytesSamples(formats strfmt.Registry) error { - if swag.IsZero(m.DataInDedupedBytesSamples) { // not required - return nil - } - - for i := 0; i < len(m.DataInDedupedBytesSamples); i++ { - if swag.IsZero(m.DataInDedupedBytesSamples[i]) { // not required - continue - } - - if m.DataInDedupedBytesSamples[i] != nil { - if err := m.DataInDedupedBytesSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInDedupedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInDedupedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) validateDedupeRatioSamples(formats strfmt.Registry) error { - if swag.IsZero(m.DedupeRatioSamples) { // not required - return nil - } - - for i := 0; i < len(m.DedupeRatioSamples); i++ { - if swag.IsZero(m.DedupeRatioSamples[i]) { // not required - continue - } - - if m.DedupeRatioSamples[i] != nil { - if err := m.DedupeRatioSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dedupeRatioSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dedupeRatioSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) validateLogicalUsedBytesSamples(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalUsedBytesSamples) { // not required - return nil - } - - for i := 0; i < len(m.LogicalUsedBytesSamples); i++ { - if swag.IsZero(m.LogicalUsedBytesSamples[i]) { // not required - continue - } - - if m.LogicalUsedBytesSamples[i] != nil { - if err := m.LogicalUsedBytesSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) validatePhysicalUsedBytesSamples(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalUsedBytesSamples) { // not required - return nil - } - - for i := 0; i < len(m.PhysicalUsedBytesSamples); i++ { - if swag.IsZero(m.PhysicalUsedBytesSamples[i]) { // not required - continue - } - - if m.PhysicalUsedBytesSamples[i] != nil { - if err := m.PhysicalUsedBytesSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) validateStorageReductionSamples(formats strfmt.Registry) error { - if swag.IsZero(m.StorageReductionSamples) { // not required - return nil - } - - for i := 0; i < len(m.StorageReductionSamples); i++ { - if swag.IsZero(m.StorageReductionSamples[i]) { // not required - continue - } - - if m.StorageReductionSamples[i] != nil { - if err := m.StorageReductionSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageReductionSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageReductionSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this storage efficiency tile based on the context it is used -func (m *StorageEfficiencyTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataInBytesSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataInDedupedBytesSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDedupeRatioSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalUsedBytesSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalUsedBytesSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageReductionSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageEfficiencyTile) contextValidateDataInBytesSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataInBytesSamples); i++ { - - if m.DataInBytesSamples[i] != nil { - - if swag.IsZero(m.DataInBytesSamples[i]) { // not required - return nil - } - - if err := m.DataInBytesSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) contextValidateDataInDedupedBytesSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataInDedupedBytesSamples); i++ { - - if m.DataInDedupedBytesSamples[i] != nil { - - if swag.IsZero(m.DataInDedupedBytesSamples[i]) { // not required - return nil - } - - if err := m.DataInDedupedBytesSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInDedupedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInDedupedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) contextValidateDedupeRatioSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DedupeRatioSamples); i++ { - - if m.DedupeRatioSamples[i] != nil { - - if swag.IsZero(m.DedupeRatioSamples[i]) { // not required - return nil - } - - if err := m.DedupeRatioSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dedupeRatioSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dedupeRatioSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) contextValidateLogicalUsedBytesSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LogicalUsedBytesSamples); i++ { - - if m.LogicalUsedBytesSamples[i] != nil { - - if swag.IsZero(m.LogicalUsedBytesSamples[i]) { // not required - return nil - } - - if err := m.LogicalUsedBytesSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) contextValidatePhysicalUsedBytesSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PhysicalUsedBytesSamples); i++ { - - if m.PhysicalUsedBytesSamples[i] != nil { - - if swag.IsZero(m.PhysicalUsedBytesSamples[i]) { // not required - return nil - } - - if err := m.PhysicalUsedBytesSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalUsedBytesSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageEfficiencyTile) contextValidateStorageReductionSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageReductionSamples); i++ { - - if m.StorageReductionSamples[i] != nil { - - if swag.IsZero(m.StorageReductionSamples[i]) { // not required - return nil - } - - if err := m.StorageReductionSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageReductionSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageReductionSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageEfficiencyTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageEfficiencyTile) UnmarshalBinary(b []byte) error { - var res StorageEfficiencyTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_policy.go b/v1/models/storage_policy.go deleted file mode 100644 index 38dccf0c..00000000 --- a/v1/models/storage_policy.go +++ /dev/null @@ -1,278 +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" -) - -// StoragePolicy Storage Policy. -// -// Specifies the storage options applied to a Storage Domain (View Box). -// -// swagger:model StoragePolicy -type StoragePolicy struct { - - // If EncryptionLevel is 'KEncryptionStrong' EncryptionMode tells whether - // encryption algorithm used is AES_CBC or AES_GCM. - AesEncryptionMode *string `json:"aesEncryptionMode,omitempty"` - - // Specifies Whether to support app marker detection. When this is set to - // true, app markers (like commvault markers) will be removed from data and - // put in separate chunks. This way deduplication is improved as it is done - // on data that has no app markers. - AppMarkerDetection *bool `json:"appMarkerDetection,omitempty"` - - // Specifies the vault id assigned for an external Storage - // Target to facilitate cloud spill. - CloudSpillVaultID *int64 `json:"cloudSpillVaultId,omitempty"` - - // Specifies the compression setting to be applied to a Storage Domain - // (View Box). - // 'kCompressionNone' indicates that data is not compressed. - // 'kCompressionLow' indicates that data is compressed using LZ4 or Snappy. - // 'kCompressionHigh' indicates that data is compressed in Gzip. - // Enum: ["kCompressionNone","kCompressionLow","kCompressionHigh"] - CompressionPolicy *string `json:"compressionPolicy,omitempty"` - - // Specifies the time in seconds when deduplication and compression - // of data on the Storage Domain (View Box) starts. - // If set to 0, deduplication and compression is done inline - // (as the data is being written). - // Otherwise, post-process deduplication and compression is done after the - // specified delay. - DeduplicateCompressDelaySecs *int32 `json:"deduplicateCompressDelaySecs,omitempty"` - - // Specifies if deduplication is enabled for the Storage Domain (View Box). - // If deduplication is enabled, the Cohesity Cluster eliminates - // duplicate blocks of repeating data stored on the Cluster - // thus reducing the amount of storage space needed to store data. - DeduplicationEnabled *bool `json:"deduplicationEnabled,omitempty"` - - // Specifies the encryption setting for the Storage Domain (View Box). - // 'kEncryptionNone' indicates the data is not encrypted. - // 'kEncryptionStrong' indicates the data is encrypted. - // Enum: ["kEncryptionNone","kEncryptionStrong","kEncryptionWeak"] - EncryptionPolicy *string `json:"encryptionPolicy,omitempty"` - - // Specifies information about erasure coding if erasure coding is enabled. - ErasureCodingInfo *ErasureCodingInfo `json:"erasureCodingInfo,omitempty"` - - // Specifies if compression should occur inline (as the data is being - // written). This field is only relevant if compression is enabled. If - // deduplication is set to inline, Cohesity recommends setting compression to - // inline. - InlineCompress *bool `json:"inlineCompress,omitempty"` - - // Specifies if deduplication should occur inline (as the data is being - // written). This field is only relevant if deduplication is enabled. - InlineDeduplicate *bool `json:"inlineDeduplicate,omitempty"` - - // Number of disk failures to tolerate. This is an optional field. Default value - // is 1 for cluster having 3 or more nodes. If erasure coding is not enabled, - // then this specifies the replication factor for the Storage Domain (View Box). - // For RF=2, number of failures to tolerate should be specified as 1. If - // erasure coding is enabled, then this value will be same as number of coded - // stripes. - NumFailuresTolerated *int32 `json:"numFailuresTolerated,omitempty"` - - // Number of node failures to tolerate. If NumNodeFailuresTolerated is set to - // 2, then we would tolerate up to two node failures. If the following is not - // set, then the number of node failures tolerated would be same as - // replication factor - 1 for replicated chunk files or number of coded - // stripes for erasure coding chunk files. - NumNodeFailuresTolerated *int32 `json:"numNodeFailuresTolerated,omitempty"` -} - -// Validate validates this storage policy -func (m *StoragePolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompressionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateErasureCodingInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var storagePolicyTypeCompressionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCompressionNone","kCompressionLow","kCompressionHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - storagePolicyTypeCompressionPolicyPropEnum = append(storagePolicyTypeCompressionPolicyPropEnum, v) - } -} - -const ( - - // StoragePolicyCompressionPolicyKCompressionNone captures enum value "kCompressionNone" - StoragePolicyCompressionPolicyKCompressionNone string = "kCompressionNone" - - // StoragePolicyCompressionPolicyKCompressionLow captures enum value "kCompressionLow" - StoragePolicyCompressionPolicyKCompressionLow string = "kCompressionLow" - - // StoragePolicyCompressionPolicyKCompressionHigh captures enum value "kCompressionHigh" - StoragePolicyCompressionPolicyKCompressionHigh string = "kCompressionHigh" -) - -// prop value enum -func (m *StoragePolicy) validateCompressionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, storagePolicyTypeCompressionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StoragePolicy) validateCompressionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.CompressionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateCompressionPolicyEnum("compressionPolicy", "body", *m.CompressionPolicy); err != nil { - return err - } - - return nil -} - -var storagePolicyTypeEncryptionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEncryptionNone","kEncryptionStrong","kEncryptionWeak"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - storagePolicyTypeEncryptionPolicyPropEnum = append(storagePolicyTypeEncryptionPolicyPropEnum, v) - } -} - -const ( - - // StoragePolicyEncryptionPolicyKEncryptionNone captures enum value "kEncryptionNone" - StoragePolicyEncryptionPolicyKEncryptionNone string = "kEncryptionNone" - - // StoragePolicyEncryptionPolicyKEncryptionStrong captures enum value "kEncryptionStrong" - StoragePolicyEncryptionPolicyKEncryptionStrong string = "kEncryptionStrong" - - // StoragePolicyEncryptionPolicyKEncryptionWeak captures enum value "kEncryptionWeak" - StoragePolicyEncryptionPolicyKEncryptionWeak string = "kEncryptionWeak" -) - -// prop value enum -func (m *StoragePolicy) validateEncryptionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, storagePolicyTypeEncryptionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StoragePolicy) validateEncryptionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateEncryptionPolicyEnum("encryptionPolicy", "body", *m.EncryptionPolicy); err != nil { - return err - } - - return nil -} - -func (m *StoragePolicy) validateErasureCodingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ErasureCodingInfo) { // not required - return nil - } - - if m.ErasureCodingInfo != nil { - if err := m.ErasureCodingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("erasureCodingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("erasureCodingInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage policy based on the context it is used -func (m *StoragePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateErasureCodingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StoragePolicy) contextValidateErasureCodingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ErasureCodingInfo != nil { - - if swag.IsZero(m.ErasureCodingInfo) { // not required - return nil - } - - if err := m.ErasureCodingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("erasureCodingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("erasureCodingInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StoragePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StoragePolicy) UnmarshalBinary(b []byte) error { - var res StoragePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_policy_override.go b/v1/models/storage_policy_override.go deleted file mode 100644 index c5416894..00000000 --- a/v1/models/storage_policy_override.go +++ /dev/null @@ -1,57 +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" -) - -// StoragePolicyOverride Storage Policy Override. -// -// Specifies if inline deduplication and compression settings inherited from -// Storage Domain (View Box) should be disabled for this View. -// -// swagger:model StoragePolicyOverride -type StoragePolicyOverride struct { - - // If false, the inline deduplication and compression settings inherited - // from the Storage Domain (View Box) apply to this View. - // If true, both inline deduplication and compression are disabled for this - // View. This can only be set to true if inline deduplication is set for - // the Storage Domain (View Box). - DisableInlineDedupAndCompression *bool `json:"disableInlineDedupAndCompression,omitempty"` -} - -// Validate validates this storage policy override -func (m *StoragePolicyOverride) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage policy override based on context it is used -func (m *StoragePolicyOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StoragePolicyOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StoragePolicyOverride) UnmarshalBinary(b []byte) error { - var res StoragePolicyOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_profile.go b/v1/models/storage_profile.go deleted file mode 100644 index 89bb59df..00000000 --- a/v1/models/storage_profile.go +++ /dev/null @@ -1,56 +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" -) - -// StorageProfile storage profile -// -// swagger:model StorageProfile -type StorageProfile struct { - - // is default - IsDefault *bool `json:"isDefault,omitempty"` - - // This is the name of the storage profile. - Name *string `json:"name,omitempty"` - - // This is the uuid of Storage Profile as identified by VCD. - VcdUUID *string `json:"vcdUuid,omitempty"` -} - -// Validate validates this storage profile -func (m *StorageProfile) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage profile based on context it is used -func (m *StorageProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageProfile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageProfile) UnmarshalBinary(b []byte) error { - var res StorageProfile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_snapshot_provider_params.go b/v1/models/storage_snapshot_provider_params.go deleted file mode 100644 index 23c253b2..00000000 --- a/v1/models/storage_snapshot_provider_params.go +++ /dev/null @@ -1,211 +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" -) - -// StorageSnapshotProviderParams storage snapshot provider params -// -// swagger:model StorageSnapshotProviderParams -type StorageSnapshotProviderParams struct { - - // Connector params to access the storage snapshot provider. - ConnectorParams *ConnectorParams `json:"connectorParams,omitempty"` - - // The entity representing the storage snapshot provider. - Entity *EntityProto `json:"entity,omitempty"` - - // The root entity that the entity was running under. - RootEntity *EntityProto `json:"rootEntity,omitempty"` -} - -// Validate validates this storage snapshot provider params -func (m *StorageSnapshotProviderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectorParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageSnapshotProviderParams) validateConnectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorParams) { // not required - return nil - } - - if m.ConnectorParams != nil { - if err := m.ConnectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorParams") - } - return err - } - } - - return nil -} - -func (m *StorageSnapshotProviderParams) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *StorageSnapshotProviderParams) validateRootEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if m.RootEntity != nil { - if err := m.RootEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage snapshot provider params based on the context it is used -func (m *StorageSnapshotProviderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageSnapshotProviderParams) contextValidateConnectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectorParams != nil { - - if swag.IsZero(m.ConnectorParams) { // not required - return nil - } - - if err := m.ConnectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorParams") - } - return err - } - } - - return nil -} - -func (m *StorageSnapshotProviderParams) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *StorageSnapshotProviderParams) contextValidateRootEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RootEntity != nil { - - if swag.IsZero(m.RootEntity) { // not required - return nil - } - - if err := m.RootEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageSnapshotProviderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageSnapshotProviderParams) UnmarshalBinary(b []byte) error { - var res StorageSnapshotProviderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/storage_stats.go b/v1/models/storage_stats.go deleted file mode 100644 index 5ee31543..00000000 --- a/v1/models/storage_stats.go +++ /dev/null @@ -1,76 +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" -) - -// StorageStats Storage Statistics -// -// Specifies the storage statistics of the cluster. -// -// swagger:model StorageStats -type StorageStats struct { - - // Specifies the logical size of protected objects in bytes. - DataProtectionLogicalUsageBytes *int64 `json:"dataProtectionLogicalUsageBytes,omitempty"` - - // Specifies the physical size of protected objects in bytes. - DataProtectionPhysicalUsageBytes *int64 `json:"dataProtectionPhysicalUsageBytes,omitempty"` - - // Specifies the logical size consumed by file services in bytes. - FileServicesLogicalUsageBytes *int64 `json:"fileServicesLogicalUsageBytes,omitempty"` - - // Specifies the physical size consumed by file services in bytes. - FileServicesPhysicalUsageBytes *int64 `json:"fileServicesPhysicalUsageBytes,omitempty"` - - // Specifies the local storage currently available on the cluster in bytes. - LocalAvailableBytes *int64 `json:"localAvailableBytes,omitempty"` - - // Specifies the local storage currently in use on the cluster in bytes. - LocalUsageBytes *int64 `json:"localUsageBytes,omitempty"` - - // Specifies the total capacity of the cluster in bytes. - TotalCapacityBytes *int64 `json:"totalCapacityBytes,omitempty"` - - // Specifies the logical size consumed by the external view backups. - ViewBackupLogicalUsageBytes *int64 `json:"viewBackupLogicalUsageBytes,omitempty"` - - // Specifies the physical size consumed by the external view backups. - ViewBackupPhysicalUsageBytes *int64 `json:"viewBackupPhysicalUsageBytes,omitempty"` -} - -// Validate validates this storage stats -func (m *StorageStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage stats based on context it is used -func (m *StorageStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageStats) UnmarshalBinary(b []byte) error { - var res StorageStats - 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 deleted file mode 100644 index 888eeafe..00000000 --- a/v1/models/string_entity_ids_proto.go +++ /dev/null @@ -1,109 +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" -) - -// StringEntityIdsProto string entity ids proto -// -// swagger:model StringEntityIdsProto -type StringEntityIdsProto struct { - - // The latest string id. - LatestID *StringEntityIdsProtoStringID `json:"latestId,omitempty"` -} - -// Validate validates this string entity ids proto -func (m *StringEntityIdsProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLatestID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StringEntityIdsProto) 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 -} - -// 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 - - if err := m.contextValidateLatestID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StringEntityIdsProto) 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 -} - -// MarshalBinary interface implementation -func (m *StringEntityIdsProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StringEntityIdsProto) UnmarshalBinary(b []byte) error { - var res StringEntityIdsProto - 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 deleted file mode 100644 index 106d24e4..00000000 --- a/v1/models/string_entity_ids_proto_string_id.go +++ /dev/null @@ -1,56 +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" -) - -// StringEntityIdsProtoStringID This is enclosed in a message to give the flexibilty to add more fields in -// future. For eg: software version, date of creation. -// -// 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. - ID *string `json:"id,omitempty"` -} - -// Validate validates this string entity ids proto string Id -func (m *StringEntityIdsProtoStringID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this string entity ids proto string Id based on context it is used -func (m *StringEntityIdsProtoStringID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StringEntityIdsProtoStringID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StringEntityIdsProtoStringID) UnmarshalBinary(b []byte) error { - var res StringEntityIdsProtoStringID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/stubbing_policy_proto.go b/v1/models/stubbing_policy_proto.go deleted file mode 100644 index af4c2d83..00000000 --- a/v1/models/stubbing_policy_proto.go +++ /dev/null @@ -1,163 +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" -) - -// StubbingPolicyProto Message to capture scheduling and retention policies for stubbing jobs. -// -// Stubbing jobs do not use protection policies. Instead, schedule and -// retention policy will be embedded in the BackupJobProto. -// -// swagger:model StubbingPolicyProto -type StubbingPolicyProto struct { - - // Retention policy for snapshots taken after each stubbing job run. - RetentionPolicy *RetentionPolicyProto `json:"retentionPolicy,omitempty"` - - // Schedule for running stubbing job. - SchedulingPolicy *SchedulingPolicyProto `json:"schedulingPolicy,omitempty"` -} - -// Validate validates this stubbing policy proto -func (m *StubbingPolicyProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetentionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedulingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StubbingPolicyProto) validateRetentionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if m.RetentionPolicy != nil { - if err := m.RetentionPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *StubbingPolicyProto) validateSchedulingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SchedulingPolicy) { // not required - return nil - } - - if m.SchedulingPolicy != nil { - if err := m.SchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this stubbing policy proto based on the context it is used -func (m *StubbingPolicyProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchedulingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StubbingPolicyProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetentionPolicy != nil { - - if swag.IsZero(m.RetentionPolicy) { // not required - return nil - } - - if err := m.RetentionPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retentionPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retentionPolicy") - } - return err - } - } - - return nil -} - -func (m *StubbingPolicyProto) contextValidateSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SchedulingPolicy != nil { - - if swag.IsZero(m.SchedulingPolicy) { // not required - return nil - } - - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedulingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StubbingPolicyProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StubbingPolicyProto) UnmarshalBinary(b []byte) error { - var res StubbingPolicyProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/subnet.go b/v1/models/subnet.go deleted file mode 100644 index ea35b940..00000000 --- a/v1/models/subnet.go +++ /dev/null @@ -1,261 +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" -) - -// Subnet Subnet -// -// Defines a Subnet (Subnetwork). -// 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 Subnet -type Subnet struct { - - // Component that has reserved the subnet. - Component *string `json:"component,omitempty"` - - // Description of the subnet. - Description *string `json:"description,omitempty"` - - // ID of the subnet. - ID *int32 `json:"id,omitempty"` - - // Specifies either an IPv6 address or an IPv4 address. - IP *string `json:"ip,omitempty"` - - // Specifies the netmask using bits. - NetmaskBits *int32 `json:"netmaskBits,omitempty"` - - // Specifies the netmask using an IP4 address. - // The netmask can only be set using netmaskIp4 if the IP address - // is an IPv4 address. - NetmaskIp4 *string `json:"netmaskIp4,omitempty"` - - // Specifies whether clients from this subnet can mount using NFS protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - NfsAccess *string `json:"nfsAccess,omitempty"` - - // Specifies whether all clients from this subnet can map view with - // view_all_squash_uid/view_all_squash_gid configured in the view. - NfsAllSquash *bool `json:"nfsAllSquash,omitempty"` - - // Specifies whether clients from this subnet can mount as root on NFS. - NfsRootSquash *bool `json:"nfsRootSquash,omitempty"` - - // Specifies whether clients from this subnet can access using S3 protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - S3Access *string `json:"s3Access,omitempty"` - - // Specifies whether clients from this subnet can mount using SMB protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - SmbAccess *string `json:"smbAccess,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this subnet -func (m *Subnet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Access(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbAccess(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var subnetTypeNfsAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeNfsAccessPropEnum = append(subnetTypeNfsAccessPropEnum, v) - } -} - -const ( - - // SubnetNfsAccessKDisabled captures enum value "kDisabled" - SubnetNfsAccessKDisabled string = "kDisabled" - - // SubnetNfsAccessKReadOnly captures enum value "kReadOnly" - SubnetNfsAccessKReadOnly string = "kReadOnly" - - // SubnetNfsAccessKReadWrite captures enum value "kReadWrite" - SubnetNfsAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateNfsAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeNfsAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateNfsAccess(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAccess) { // not required - return nil - } - - // value enum - if err := m.validateNfsAccessEnum("nfsAccess", "body", *m.NfsAccess); err != nil { - return err - } - - return nil -} - -var subnetTypeS3AccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeS3AccessPropEnum = append(subnetTypeS3AccessPropEnum, v) - } -} - -const ( - - // SubnetS3AccessKDisabled captures enum value "kDisabled" - SubnetS3AccessKDisabled string = "kDisabled" - - // SubnetS3AccessKReadOnly captures enum value "kReadOnly" - SubnetS3AccessKReadOnly string = "kReadOnly" - - // SubnetS3AccessKReadWrite captures enum value "kReadWrite" - SubnetS3AccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateS3AccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeS3AccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateS3Access(formats strfmt.Registry) error { - if swag.IsZero(m.S3Access) { // not required - return nil - } - - // value enum - if err := m.validateS3AccessEnum("s3Access", "body", *m.S3Access); err != nil { - return err - } - - return nil -} - -var subnetTypeSmbAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeSmbAccessPropEnum = append(subnetTypeSmbAccessPropEnum, v) - } -} - -const ( - - // SubnetSmbAccessKDisabled captures enum value "kDisabled" - SubnetSmbAccessKDisabled string = "kDisabled" - - // SubnetSmbAccessKReadOnly captures enum value "kReadOnly" - SubnetSmbAccessKReadOnly string = "kReadOnly" - - // SubnetSmbAccessKReadWrite captures enum value "kReadWrite" - SubnetSmbAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateSmbAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeSmbAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateSmbAccess(formats strfmt.Registry) error { - if swag.IsZero(m.SmbAccess) { // not required - return nil - } - - // value enum - if err := m.validateSmbAccessEnum("smbAccess", "body", *m.SmbAccess); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this subnet based on context it is used -func (m *Subnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Subnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Subnet) UnmarshalBinary(b []byte) error { - var res Subnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/subscription_info.go b/v1/models/subscription_info.go deleted file mode 100644 index 42a710f5..00000000 --- a/v1/models/subscription_info.go +++ /dev/null @@ -1,579 +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" -) - -// SubscriptionInfo SubscriptionInfo holds all the subscriptions for the current account. -// -// Extends this to have Helios, DRaaS and DSaaS. -// -// swagger:model SubscriptionInfo -type SubscriptionInfo struct { - - // Specifies whether Datahawk Classification subscription was/is enabled - // for account. - Classification *ClassificationInfo `json:"classification,omitempty"` - - // Specifies whether Data Insights subscription was/is enabled - // for account. - DataInsights *DataInsightsInfo `json:"dataInsights,omitempty"` - - // Specifies whether data protect subscription was subscribed for account. - // This is for AWS data plane. - DataProtect *DataProtectInfo `json:"dataProtect,omitempty"` - - // Specifies whether data protect subscription was subscribed for account. - // This is for Azure data plane. - DataProtectAzure *DataProtectAzureInfo `json:"dataProtectAzure,omitempty"` - - // Specifies whether Fortknox AzureCool or AzureCool FreeTrial subscription - // was/is enabled for account. - FortKnoxAzureCool *FortKnoxAzureInfo `json:"fortKnoxAzureCool,omitempty"` - - // Specifies whether Fortknox AzureHot or AzureHot FreeTrial subscription - // was/is enabled for account. - FortKnoxAzureHot *FortKnoxAzureInfo `json:"fortKnoxAzureHot,omitempty"` - - // Specifies whether Fortknox AwsCold or AwsCold FreeTrial subscription - // was/is enabled for account. - FortKnoxCold *FortKnoxColdInfo `json:"fortKnoxCold,omitempty"` - - // Specifies whether Fortknox AwsWarm or AwsWarm FreeTrial subscription - // was/is enabled for account. - Ransomware *RansomwareInfo `json:"ransomware,omitempty"` - - // Specifies whether site continuity subscription was/is enabled for account. - SiteContinuity *SiteContinuityInfo `json:"siteContinuity,omitempty"` - - // Specifies whether Datahawk ThreatProtection subscription was/is enabled - // for account. - ThreatProtection *ThreatProtectionInfo `json:"threatProtection,omitempty"` -} - -// Validate validates this subscription info -func (m *SubscriptionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClassification(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataInsights(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataProtect(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataProtectAzure(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFortKnoxAzureCool(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFortKnoxAzureHot(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFortKnoxCold(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRansomware(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteContinuity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThreatProtection(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SubscriptionInfo) validateClassification(formats strfmt.Registry) error { - if swag.IsZero(m.Classification) { // not required - return nil - } - - if m.Classification != nil { - if err := m.Classification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("classification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("classification") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateDataInsights(formats strfmt.Registry) error { - if swag.IsZero(m.DataInsights) { // not required - return nil - } - - if m.DataInsights != nil { - if err := m.DataInsights.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInsights") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInsights") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateDataProtect(formats strfmt.Registry) error { - if swag.IsZero(m.DataProtect) { // not required - return nil - } - - if m.DataProtect != nil { - if err := m.DataProtect.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataProtect") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataProtect") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateDataProtectAzure(formats strfmt.Registry) error { - if swag.IsZero(m.DataProtectAzure) { // not required - return nil - } - - if m.DataProtectAzure != nil { - if err := m.DataProtectAzure.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataProtectAzure") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataProtectAzure") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateFortKnoxAzureCool(formats strfmt.Registry) error { - if swag.IsZero(m.FortKnoxAzureCool) { // not required - return nil - } - - if m.FortKnoxAzureCool != nil { - if err := m.FortKnoxAzureCool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxAzureCool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxAzureCool") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateFortKnoxAzureHot(formats strfmt.Registry) error { - if swag.IsZero(m.FortKnoxAzureHot) { // not required - return nil - } - - if m.FortKnoxAzureHot != nil { - if err := m.FortKnoxAzureHot.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxAzureHot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxAzureHot") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateFortKnoxCold(formats strfmt.Registry) error { - if swag.IsZero(m.FortKnoxCold) { // not required - return nil - } - - if m.FortKnoxCold != nil { - if err := m.FortKnoxCold.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxCold") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxCold") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateRansomware(formats strfmt.Registry) error { - if swag.IsZero(m.Ransomware) { // not required - return nil - } - - if m.Ransomware != nil { - if err := m.Ransomware.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ransomware") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ransomware") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateSiteContinuity(formats strfmt.Registry) error { - if swag.IsZero(m.SiteContinuity) { // not required - return nil - } - - if m.SiteContinuity != nil { - if err := m.SiteContinuity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteContinuity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteContinuity") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) validateThreatProtection(formats strfmt.Registry) error { - if swag.IsZero(m.ThreatProtection) { // not required - return nil - } - - if m.ThreatProtection != nil { - if err := m.ThreatProtection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("threatProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("threatProtection") - } - return err - } - } - - return nil -} - -// ContextValidate validate this subscription info based on the context it is used -func (m *SubscriptionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClassification(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataInsights(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataProtect(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataProtectAzure(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFortKnoxAzureCool(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFortKnoxAzureHot(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFortKnoxCold(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRansomware(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteContinuity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThreatProtection(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SubscriptionInfo) contextValidateClassification(ctx context.Context, formats strfmt.Registry) error { - - if m.Classification != nil { - - if swag.IsZero(m.Classification) { // not required - return nil - } - - if err := m.Classification.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("classification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("classification") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateDataInsights(ctx context.Context, formats strfmt.Registry) error { - - if m.DataInsights != nil { - - if swag.IsZero(m.DataInsights) { // not required - return nil - } - - if err := m.DataInsights.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataInsights") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataInsights") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateDataProtect(ctx context.Context, formats strfmt.Registry) error { - - if m.DataProtect != nil { - - if swag.IsZero(m.DataProtect) { // not required - return nil - } - - if err := m.DataProtect.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataProtect") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataProtect") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateDataProtectAzure(ctx context.Context, formats strfmt.Registry) error { - - if m.DataProtectAzure != nil { - - if swag.IsZero(m.DataProtectAzure) { // not required - return nil - } - - if err := m.DataProtectAzure.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataProtectAzure") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataProtectAzure") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateFortKnoxAzureCool(ctx context.Context, formats strfmt.Registry) error { - - if m.FortKnoxAzureCool != nil { - - if swag.IsZero(m.FortKnoxAzureCool) { // not required - return nil - } - - if err := m.FortKnoxAzureCool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxAzureCool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxAzureCool") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateFortKnoxAzureHot(ctx context.Context, formats strfmt.Registry) error { - - if m.FortKnoxAzureHot != nil { - - if swag.IsZero(m.FortKnoxAzureHot) { // not required - return nil - } - - if err := m.FortKnoxAzureHot.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxAzureHot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxAzureHot") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateFortKnoxCold(ctx context.Context, formats strfmt.Registry) error { - - if m.FortKnoxCold != nil { - - if swag.IsZero(m.FortKnoxCold) { // not required - return nil - } - - if err := m.FortKnoxCold.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fortKnoxCold") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fortKnoxCold") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateRansomware(ctx context.Context, formats strfmt.Registry) error { - - if m.Ransomware != nil { - - if swag.IsZero(m.Ransomware) { // not required - return nil - } - - if err := m.Ransomware.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ransomware") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ransomware") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateSiteContinuity(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteContinuity != nil { - - if swag.IsZero(m.SiteContinuity) { // not required - return nil - } - - if err := m.SiteContinuity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteContinuity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteContinuity") - } - return err - } - } - - return nil -} - -func (m *SubscriptionInfo) contextValidateThreatProtection(ctx context.Context, formats strfmt.Registry) error { - - if m.ThreatProtection != nil { - - if swag.IsZero(m.ThreatProtection) { // not required - return nil - } - - if err := m.ThreatProtection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("threatProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("threatProtection") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SubscriptionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SubscriptionInfo) UnmarshalBinary(b []byte) error { - var res SubscriptionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/supported_config.go b/v1/models/supported_config.go deleted file mode 100644 index 12b00c21..00000000 --- a/v1/models/supported_config.go +++ /dev/null @@ -1,67 +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" -) - -// SupportedConfig Supported Erasure Coding and Node Configurations. -// -// Lists the supported Erasure Coding options for the number of -// Nodes in the Cohesity Cluster. In addition, the minimum number -// of Nodes supported for this Cluster type is defined. -// -// swagger:model SupportedConfig -type SupportedConfig struct { - - // Specifies the minimum number of Nodes supported for this Cluster type. - // For example, a Cohesity Cluster hosted directly on hardware must have at - // least 3 Nodes. - MinNodesAllowed *int32 `json:"minNodesAllowed,omitempty"` - - // Array of Supported Erasure Coding Options. - // - // List the supported Erasure Coding options for the current number of - // Nodes (nodeCount) in this Cluster. - // Each string in the array is in the following format: - // "NumDataStripes:NumCodedStripes" - // For example if there are 3 nodes in the Cluster, the following - // Erasure Coding mode is returned: 2:1. - // See the Cohesity Dashboard help documentation for details. - SupportedErasureCoding []string `json:"supportedErasureCoding"` -} - -// Validate validates this supported config -func (m *SupportedConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this supported config based on context it is used -func (m *SupportedConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportedConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportedConfig) UnmarshalBinary(b []byte) error { - var res SupportedConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/supported_pattern.go b/v1/models/supported_pattern.go deleted file mode 100644 index ed64abf2..00000000 --- a/v1/models/supported_pattern.go +++ /dev/null @@ -1,118 +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" -) - -// SupportedPattern Specifies details of the pattern available for search available in an -// application such as Pattern Finder within Analytics Work Bench. -// -// swagger:model SupportedPattern -type SupportedPattern struct { - - // Specifies whether the pattern has been defined by the system or the user. - IsSystemDefined *bool `json:"isSystemDefined,omitempty"` - - // Specifies the name of the Pattern. - Name *string `json:"name,omitempty"` - - // Specifies the value of the pattern(Regex). - Pattern *string `json:"pattern,omitempty"` - - // Specifies the Pattern type. - // 'REGULAR' indicates that the pattern contains a regular expression. - // 'TEMPLATE' indicates that the pattern has a pre defined input pattern such as - // date of the form 'DD-MM-YYYY'. - // Enum: ["REGULAR","TEMPLATE"] - PatternType *string `json:"patternType,omitempty"` -} - -// Validate validates this supported pattern -func (m *SupportedPattern) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatternType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var supportedPatternTypePatternTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["REGULAR","TEMPLATE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - supportedPatternTypePatternTypePropEnum = append(supportedPatternTypePatternTypePropEnum, v) - } -} - -const ( - - // SupportedPatternPatternTypeREGULAR captures enum value "REGULAR" - SupportedPatternPatternTypeREGULAR string = "REGULAR" - - // SupportedPatternPatternTypeTEMPLATE captures enum value "TEMPLATE" - SupportedPatternPatternTypeTEMPLATE string = "TEMPLATE" -) - -// prop value enum -func (m *SupportedPattern) validatePatternTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, supportedPatternTypePatternTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SupportedPattern) validatePatternType(formats strfmt.Registry) error { - if swag.IsZero(m.PatternType) { // not required - return nil - } - - // value enum - if err := m.validatePatternTypeEnum("patternType", "body", *m.PatternType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this supported pattern based on context it is used -func (m *SupportedPattern) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportedPattern) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportedPattern) UnmarshalBinary(b []byte) error { - var res SupportedPattern - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/swift_container_tagging_proto.go b/v1/models/swift_container_tagging_proto.go deleted file mode 100644 index e4f08ed9..00000000 --- a/v1/models/swift_container_tagging_proto.go +++ /dev/null @@ -1,170 +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" -) - -// SwiftContainerTaggingProto Proto to define the tagging info associated with a Swift container. -// -// swagger:model SwiftContainerTaggingProto -type SwiftContainerTaggingProto struct { - - // [optional] The Keystone user who could get grant of access to this - // container after creation by ACL. It is used to let this user get access to - // this container if noboby has any Swift roles from Keystone. If this user - // has a Swift role, other Keystone users could get grant by this 'root' user - // through ACL. - // If 'acl_root_user' is set, below fields are mandatory. - // [mandatory] acl_root_user.name - // [mandatory] acl_root_user.domain.name - ACLRootUser *User `json:"aclRootUser,omitempty"` - - // [mandatory] The Keystone project this Swift container belongs to. - // Below fields are mandatory. - // [mandatory] project_tag.name - // [mandatory] project_tag.domain.name - ProjectTag *Project `json:"projectTag,omitempty"` -} - -// Validate validates this swift container tagging proto -func (m *SwiftContainerTaggingProto) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateACLRootUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProjectTag(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SwiftContainerTaggingProto) validateACLRootUser(formats strfmt.Registry) error { - if swag.IsZero(m.ACLRootUser) { // not required - return nil - } - - if m.ACLRootUser != nil { - if err := m.ACLRootUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aclRootUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aclRootUser") - } - return err - } - } - - return nil -} - -func (m *SwiftContainerTaggingProto) validateProjectTag(formats strfmt.Registry) error { - if swag.IsZero(m.ProjectTag) { // not required - return nil - } - - if m.ProjectTag != nil { - if err := m.ProjectTag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectTag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectTag") - } - return err - } - } - - return nil -} - -// ContextValidate validate this swift container tagging proto based on the context it is used -func (m *SwiftContainerTaggingProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateACLRootUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProjectTag(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SwiftContainerTaggingProto) contextValidateACLRootUser(ctx context.Context, formats strfmt.Registry) error { - - if m.ACLRootUser != nil { - - if swag.IsZero(m.ACLRootUser) { // not required - return nil - } - - if err := m.ACLRootUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aclRootUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aclRootUser") - } - return err - } - } - - return nil -} - -func (m *SwiftContainerTaggingProto) contextValidateProjectTag(ctx context.Context, formats strfmt.Registry) error { - - if m.ProjectTag != nil { - - if swag.IsZero(m.ProjectTag) { // not required - return nil - } - - if err := m.ProjectTag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectTag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectTag") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SwiftContainerTaggingProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SwiftContainerTaggingProto) UnmarshalBinary(b []byte) error { - var res SwiftContainerTaggingProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/swift_params.go b/v1/models/swift_params.go deleted file mode 100644 index 7b9fd109..00000000 --- a/v1/models/swift_params.go +++ /dev/null @@ -1,55 +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" -) - -// SwiftParams Swift Parameters. -// -// Specifies the parameters of Swift configuration. -// -// swagger:model SwiftParams -type SwiftParams struct { - - // Specifies the associated Keystone configuration id. - KeystoneID *int64 `json:"keystoneId,omitempty"` - - // Specifies a list of operator roles. - OperatorRoles []string `json:"operatorRoles"` -} - -// Validate validates this swift params -func (m *SwiftParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this swift params based on context it is used -func (m *SwiftParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SwiftParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SwiftParams) UnmarshalBinary(b []byte) error { - var res SwiftParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/system_app_status_result.go b/v1/models/system_app_status_result.go deleted file mode 100644 index 481bb6bb..00000000 --- a/v1/models/system_app_status_result.go +++ /dev/null @@ -1,64 +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" -) - -// SystemAppStatusResult System App Status Result. -// -// Specifies the result of getting the status of System Apps. -// -// swagger:model SystemAppStatusResult -type SystemAppStatusResult struct { - - // Required field. - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - - // Required field. - ConfiguredReplicas *int32 `json:"configuredReplicas,omitempty"` - - // Required field. - Name *string `json:"name,omitempty"` - - // Required field. - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - - // Required field. - ServiceEndpoint *string `json:"serviceEndpoint,omitempty"` -} - -// Validate validates this system app status result -func (m *SystemAppStatusResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this system app status result based on context it is used -func (m *SystemAppStatusResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SystemAppStatusResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SystemAppStatusResult) UnmarshalBinary(b []byte) error { - var res SystemAppStatusResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/system_resource_info.go b/v1/models/system_resource_info.go deleted file mode 100644 index 19b8b48e..00000000 --- a/v1/models/system_resource_info.go +++ /dev/null @@ -1,54 +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" -) - -// SystemResourceInfo Contains general resource information about the system. UI may show this -// information. -// -// swagger:model SystemResourceInfo -type SystemResourceInfo struct { - - // Number of processors on the host. - NumberOfProcessors *int64 `json:"numberOfProcessors,omitempty"` - - // Total physical memory on the host in bytes. - TotalPhysicalMemoryInBytes *int64 `json:"totalPhysicalMemoryInBytes,omitempty"` -} - -// Validate validates this system resource info -func (m *SystemResourceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this system resource info based on context it is used -func (m *SystemResourceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SystemResourceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SystemResourceInfo) UnmarshalBinary(b []byte) error { - var res SystemResourceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/table_info.go b/v1/models/table_info.go deleted file mode 100644 index f4160572..00000000 --- a/v1/models/table_info.go +++ /dev/null @@ -1,62 +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" -) - -// TableInfo Proto that contains specific information about a hive table. -// -// swagger:model TableInfo -type TableInfo struct { - - // Approx size - ApproxSizeBytes *int64 `json:"approxSizeBytes,omitempty"` - - // Created on, epoch millis - CreatedOn *int64 `json:"createdOn,omitempty"` - - // Is Transactional table - IsTransactionalTable *bool `json:"isTransactionalTable,omitempty"` - - // Table owner - Owner *string `json:"owner,omitempty"` - - // table type - TableType *int32 `json:"tableType,omitempty"` -} - -// Validate validates this table info -func (m *TableInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this table info based on context it is used -func (m *TableInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TableInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TableInfo) UnmarshalBinary(b []byte) error { - var res TableInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tag_attribute.go b/v1/models/tag_attribute.go deleted file mode 100644 index 277dd0e2..00000000 --- a/v1/models/tag_attribute.go +++ /dev/null @@ -1,126 +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" -) - -// TagAttribute VMware Tag Attributes. -// -// Specifies a VMware tag. -// -// swagger:model TagAttribute -type TagAttribute struct { - - // Specifies the tag attribute type of GCP. - // Going forward, there will be an additional TagTypes for AWS as well. - // Specifies the type of the tag GCP entity refers to. - // 'kNetworkTag' indicates a network tag present on instances. - // 'kLabel' indicates a label (key-value pair) present on instances. - // 'kCustomMetadata' indicates custom Metadata (key-value pair) present on - // instances. - // Enum: ["kNetworkTag","kLabel","kCustomMetadata"] - GcpTagType *string `json:"gcpTagType,omitempty"` - - // Specifies the Coheisty id of the VM tag. - ID *int64 `json:"id,omitempty"` - - // Specifies the VMware name of the VM tag. - Name *string `json:"name,omitempty"` - - // Specifies the VMware Universally Unique Identifier (UUID) of the - // VM tag. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this tag attribute -func (m *TagAttribute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGcpTagType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tagAttributeTypeGcpTagTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNetworkTag","kLabel","kCustomMetadata"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tagAttributeTypeGcpTagTypePropEnum = append(tagAttributeTypeGcpTagTypePropEnum, v) - } -} - -const ( - - // TagAttributeGcpTagTypeKNetworkTag captures enum value "kNetworkTag" - TagAttributeGcpTagTypeKNetworkTag string = "kNetworkTag" - - // TagAttributeGcpTagTypeKLabel captures enum value "kLabel" - TagAttributeGcpTagTypeKLabel string = "kLabel" - - // TagAttributeGcpTagTypeKCustomMetadata captures enum value "kCustomMetadata" - TagAttributeGcpTagTypeKCustomMetadata string = "kCustomMetadata" -) - -// prop value enum -func (m *TagAttribute) validateGcpTagTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tagAttributeTypeGcpTagTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TagAttribute) validateGcpTagType(formats strfmt.Registry) error { - if swag.IsZero(m.GcpTagType) { // not required - return nil - } - - // value enum - if err := m.validateGcpTagTypeEnum("gcpTagType", "body", *m.GcpTagType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tag attribute based on context it is used -func (m *TagAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TagAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagAttribute) UnmarshalBinary(b []byte) error { - var res TagAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tag_attributes.go b/v1/models/tag_attributes.go deleted file mode 100644 index 74a16a1a..00000000 --- a/v1/models/tag_attributes.go +++ /dev/null @@ -1,57 +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" -) - -// TagAttributes Message representing a AWS tag so that it can be used as an attribute -// of an AWS entity. -// -// swagger:model TagAttributes -type TagAttributes struct { - - // Entity id corresponding to the tag entity. - EntityID *int64 `json:"entityId,omitempty"` - - // The name of the tag. - Name *string `json:"name,omitempty"` - - // The instance UUID of the tag object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this tag attributes -func (m *TagAttributes) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tag attributes based on context it is used -func (m *TagAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TagAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagAttributes) UnmarshalBinary(b []byte) error { - var res TagAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tagged_snapshots.go b/v1/models/tagged_snapshots.go deleted file mode 100644 index aa0ba42f..00000000 --- a/v1/models/tagged_snapshots.go +++ /dev/null @@ -1,50 +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" -) - -// TaggedSnapshots Message used to store tagged snapshots. -// -// swagger:model TaggedSnapshots -type TaggedSnapshots struct { - - // job instance Id vec - JobInstanceIDVec []int64 `json:"jobInstanceIdVec"` -} - -// Validate validates this tagged snapshots -func (m *TaggedSnapshots) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tagged snapshots based on context it is used -func (m *TaggedSnapshots) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TaggedSnapshots) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaggedSnapshots) UnmarshalBinary(b []byte) error { - var res TaggedSnapshots - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tags_operation_parameters.go b/v1/models/tags_operation_parameters.go deleted file mode 100644 index 1b1306ac..00000000 --- a/v1/models/tags_operation_parameters.go +++ /dev/null @@ -1,75 +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" -) - -// TagsOperationParameters TagsOperationParameters specifies tagging details. -// -// swagger:model TagsOperationParameters -type TagsOperationParameters struct { - - // ClusterId is the Id of the cluster used for constructing JobUid. - ClusterID *int64 `json:"clusterId,omitempty"` - - // ClusterIncarnationId is the incarnation Id of the cluster used for - // constructing JobUid. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // DocumentIds are list of documents to be tagged. - DocumentIds []string `json:"documentIds"` - - // EntityId is the Id of the entity where the file resides. - EntityID *int64 `json:"entityId,omitempty"` - - // JobId is the Id of the job that took the snapshot. - JobID *int64 `json:"jobId,omitempty"` - - // JobInstanceIds to tag corresponding snapshots. - JobInstanceIds []int64 `json:"jobInstanceIds"` - - // Tags are list of tags uuids that will be operated on to corresponding - // objects. - TagIds []string `json:"tagIds"` - - // Tags are list of tags that will be operated on to corresponding objects. - // This is deprecated. Use tagIds instead. - // deprecated: true - Tags []string `json:"tags"` -} - -// Validate validates this tags operation parameters -func (m *TagsOperationParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tags operation parameters based on context it is used -func (m *TagsOperationParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TagsOperationParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagsOperationParameters) UnmarshalBinary(b []byte) error { - var res TagsOperationParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tags_operation_result.go b/v1/models/tags_operation_result.go deleted file mode 100644 index 9714cd5a..00000000 --- a/v1/models/tags_operation_result.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TagsOperationResult TagsOperationResult specifies the result of tagging operation. -// -// swagger:model TagsOperationResult -type TagsOperationResult struct { - - // DocErrors are document errors incurred in yoda service while tagging. - DocErrors []*DocError `json:"docErrors"` -} - -// Validate validates this tags operation result -func (m *TagsOperationResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocErrors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagsOperationResult) validateDocErrors(formats strfmt.Registry) error { - if swag.IsZero(m.DocErrors) { // not required - return nil - } - - for i := 0; i < len(m.DocErrors); i++ { - if swag.IsZero(m.DocErrors[i]) { // not required - continue - } - - if m.DocErrors[i] != nil { - if err := m.DocErrors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("docErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("docErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tags operation result based on the context it is used -func (m *TagsOperationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDocErrors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagsOperationResult) contextValidateDocErrors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DocErrors); i++ { - - if m.DocErrors[i] != nil { - - if swag.IsZero(m.DocErrors[i]) { // not required - return nil - } - - if err := m.DocErrors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("docErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("docErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TagsOperationResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagsOperationResult) UnmarshalBinary(b []byte) error { - var res TagsOperationResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tape_media_information.go b/v1/models/tape_media_information.go deleted file mode 100644 index c18625d8..00000000 --- a/v1/models/tape_media_information.go +++ /dev/null @@ -1,61 +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" -) - -// TapeMediaInformation Tape Media Information. -// -// Provides information about a single tape media in a QStar Archive Vault. -// -// swagger:model TapeMediaInformation -type TapeMediaInformation struct { - - // Specifies a unique identifier for the media. - Barcode *string `json:"barcode,omitempty"` - - // Specifies the location of the offline media as recorded by the - // backup administrator using media management software. - Location *string `json:"location,omitempty"` - - // Specifies a flag that indicates if the media is online or offline. - // Offline media must be manually loaded into the media library - // before a recovery can occur. - Online *bool `json:"online,omitempty"` -} - -// Validate validates this tape media information -func (m *TapeMediaInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tape media information based on context it is used -func (m *TapeMediaInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TapeMediaInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TapeMediaInformation) UnmarshalBinary(b []byte) error { - var res TapeMediaInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task.go b/v1/models/task.go deleted file mode 100644 index cf1afc9e..00000000 --- a/v1/models/task.go +++ /dev/null @@ -1,286 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Task Task. -// -// Specifies one task. -// -// swagger:model Task -type Task struct { - - // The latest attributes reported for this task. - Attributes []*TaskAttribute `json:"attributes"` - - // Specifies the end time of the task. - EndTimeSeconds *int64 `json:"endTimeSeconds,omitempty"` - - // Specifies an optional error message for this task. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the events reported for this task. - Events []*TaskEvent `json:"events"` - - // Specifies the estimated end time of the task. - ExpectedEndTimeSeconds *int64 `json:"expectedEndTimeSeconds,omitempty"` - - // Specifies the expected remaining time for this task in seconds. - ExpectedSecondsRemaining *int64 `json:"expectedSecondsRemaining,omitempty"` - - // The expected raw count of the total work remaining. This is the highest - // work count value reported by the client. This field can be set to let - // pulse compute percentFinished by looking at the currently reported - // remainingWorkCount and the expectedTotalWorkCount. - ExpectedTotalWorkCount *int64 `json:"expectedTotalWorkCount,omitempty"` - - // Specifies the timestamp when the last progress was reported. - LastUpdateTimeSeconds *int64 `json:"lastUpdateTimeSeconds,omitempty"` - - // Specifies the reported progress on the task. - PercentFinished *float32 `json:"percentFinished,omitempty"` - - // Specifies the start time of the task. - StartTimeSeconds *int64 `json:"startTimeSeconds,omitempty"` - - // Specifies the status of the task being queried. - // 'kActive' indicates that the task is still active. - // 'kFinished' indicates that the task has finished without any errors. - // 'kFinishedWithError' indicates that the task has finished, but that there - // was an errror of some kind. - // 'kCancelled' indicates that the task was cancelled. - // 'kFinishedGarbageCollected' indicates that the task was garbage collected - // due to its subtasks not finishing within the allotted time. - // Enum: ["kActive","kFinished","kFinishedWithError","kCancelled","kFinishedGarbageCollected"] - Status *string `json:"status,omitempty"` - - // Specifies a list of subtasks belonging to this task. - SubTasks []interface{} `json:"subTasks"` - - // Specifes the path of this task. - TaskPath *string `json:"taskPath,omitempty"` -} - -// Validate validates this task -func (m *Task) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEvents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Task) validateAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.Attributes) { // not required - return nil - } - - for i := 0; i < len(m.Attributes); i++ { - if swag.IsZero(m.Attributes[i]) { // not required - continue - } - - if m.Attributes[i] != nil { - if err := m.Attributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Task) validateEvents(formats strfmt.Registry) error { - if swag.IsZero(m.Events) { // not required - return nil - } - - for i := 0; i < len(m.Events); i++ { - if swag.IsZero(m.Events[i]) { // not required - continue - } - - if m.Events[i] != nil { - if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var taskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kActive","kFinished","kFinishedWithError","kCancelled","kFinishedGarbageCollected"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - taskTypeStatusPropEnum = append(taskTypeStatusPropEnum, v) - } -} - -const ( - - // TaskStatusKActive captures enum value "kActive" - TaskStatusKActive string = "kActive" - - // TaskStatusKFinished captures enum value "kFinished" - TaskStatusKFinished string = "kFinished" - - // TaskStatusKFinishedWithError captures enum value "kFinishedWithError" - TaskStatusKFinishedWithError string = "kFinishedWithError" - - // TaskStatusKCancelled captures enum value "kCancelled" - TaskStatusKCancelled string = "kCancelled" - - // TaskStatusKFinishedGarbageCollected captures enum value "kFinishedGarbageCollected" - TaskStatusKFinishedGarbageCollected string = "kFinishedGarbageCollected" -) - -// prop value enum -func (m *Task) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, taskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Task) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this task based on the context it is used -func (m *Task) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEvents(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Task) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Attributes); i++ { - - if m.Attributes[i] != nil { - - if swag.IsZero(m.Attributes[i]) { // not required - return nil - } - - if err := m.Attributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Task) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Events); i++ { - - if m.Events[i] != nil { - - if swag.IsZero(m.Events[i]) { // not required - return nil - } - - if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Task) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Task) UnmarshalBinary(b []byte) error { - var res Task - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task_attribute.go b/v1/models/task_attribute.go deleted file mode 100644 index f9472c10..00000000 --- a/v1/models/task_attribute.go +++ /dev/null @@ -1,128 +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" -) - -// TaskAttribute Task Attribute. -// -// This contains a string name, a value, and a type for the value. -// -// swagger:model TaskAttribute -type TaskAttribute struct { - - // Specifies the name of this Task Attribute. - Name *string `json:"name,omitempty"` - - // Specifies the value of this Task Attribute. - Value *string `json:"value,omitempty"` - - // Specifies the type of the value contained here. All values are returned as - // pointers to strings, but they can be casted to the type indicated here. - // 'kInt64' indicates that the value stored in the Task Attribute is - // a 64-bit integer. - // 'kDouble' indicates that the value stored in the Task Attribute is - // a 64 bit floating point number. - // 'kString' indicates that the value stored in the Task Attribute is - // a string. - // 'kBytes' indicates that the value stored in the Task Attribute is - // an array of bytes. - // Enum: ["kInt64","kDouble","kString","kBytes"] - ValueType *string `json:"valueType,omitempty"` -} - -// Validate validates this task attribute -func (m *TaskAttribute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValueType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var taskAttributeTypeValueTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInt64","kDouble","kString","kBytes"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - taskAttributeTypeValueTypePropEnum = append(taskAttributeTypeValueTypePropEnum, v) - } -} - -const ( - - // TaskAttributeValueTypeKInt64 captures enum value "kInt64" - TaskAttributeValueTypeKInt64 string = "kInt64" - - // TaskAttributeValueTypeKDouble captures enum value "kDouble" - TaskAttributeValueTypeKDouble string = "kDouble" - - // TaskAttributeValueTypeKString captures enum value "kString" - TaskAttributeValueTypeKString string = "kString" - - // TaskAttributeValueTypeKBytes captures enum value "kBytes" - TaskAttributeValueTypeKBytes string = "kBytes" -) - -// prop value enum -func (m *TaskAttribute) validateValueTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, taskAttributeTypeValueTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TaskAttribute) validateValueType(formats strfmt.Registry) error { - if swag.IsZero(m.ValueType) { // not required - return nil - } - - // value enum - if err := m.validateValueTypeEnum("valueType", "body", *m.ValueType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this task attribute based on context it is used -func (m *TaskAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TaskAttribute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskAttribute) UnmarshalBinary(b []byte) error { - var res TaskAttribute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task_event.go b/v1/models/task_event.go deleted file mode 100644 index 9034d8f3..00000000 --- a/v1/models/task_event.go +++ /dev/null @@ -1,61 +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" -) - -// TaskEvent Task Event. -// -// Specifies events that clients can attach to a task. -// -// swagger:model TaskEvent -type TaskEvent struct { - - // Specifies the message associated with an event. - EventMessage *string `json:"eventMessage,omitempty"` - - // Specifies the completion percentage of the task attached to this event. - PercentFinished *float32 `json:"percentFinished,omitempty"` - - // Specifies the amount of work remaining for the task attached to this event. - RemainingWorkCount *int64 `json:"remainingWorkCount,omitempty"` - - // Specifies the Unix timestamp that the event occurred. - TimestampSeconds *int64 `json:"timestampSeconds,omitempty"` -} - -// Validate validates this task event -func (m *TaskEvent) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this task event based on context it is used -func (m *TaskEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TaskEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskEvent) UnmarshalBinary(b []byte) error { - var res TaskEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task_notification.go b/v1/models/task_notification.go deleted file mode 100644 index d10c0d92..00000000 --- a/v1/models/task_notification.go +++ /dev/null @@ -1,627 +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" -) - -// TaskNotification Task Notification. -// -// Structure that captures Task Notifications for a user. -// -// swagger:model TaskNotification -type TaskNotification struct { - - // The notification details of Agent upgrade Task. - AgentUpgradeTask *AgentUpgradeTaskInfo `json:"agentUpgradeTask,omitempty"` - - // The notifications details of Analysis Task. - AnalysisTask *AnalysisTaskInfo `json:"analysisTask,omitempty"` - - // The notifications details of Backup Task. - BackupTask *BackupTaskInfo `json:"backupTask,omitempty"` - - // The notifications details of BulkInstall Task. - BulkInstallAppTask *BulkInstallAppTaskInfo `json:"bulkInstallAppTask,omitempty"` - - // The notification details of Clone Task. - CloneTask *CloneTaskInfo `json:"cloneTask,omitempty"` - - // Timestamp at which the notification was created. - CreatedTimeSecs *int64 `json:"createdTimeSecs,omitempty"` - - // Description holds the actual notification text generated for - // the event. - Description *string `json:"description,omitempty"` - - // Dismissed keeps track of whether a notification has been seen - // or not. User may choose to dismiss individual event or all - // notifications at once. Nil or 0 value represents false. - Dismissed *bool `json:"dismissed,omitempty"` - - // Timestamp at which user dismissed this notification event. - DismissedTimeSecs *int64 `json:"dismissedTimeSecs,omitempty"` - - // The notification details of Field Message Task. - FieldMessageTask *BasicTaskInfo `json:"fieldMessageTask,omitempty"` - - // id identifies a user notification event uniquely. - // This can also be used to dismiss individual notifications. - ID *string `json:"id,omitempty"` - - // The notification details of Recovery Task. - RecoveryTask *RecoveryTaskInfo `json:"recoveryTask,omitempty"` - - // Status of the task. - // Status of the task. - // 'kSuccess' indicates that task completed successfully. - // 'kError' indicates that task encountered errors. - // Enum: ["kSuccess","kError"] - Status *string `json:"status,omitempty"` - - // Task type denotes which type of task this notification is for. - // This param is used to reflect the taskType. - // 'Restore' notification type is generated upon completion of Restore tasks. - // 'Clone' notification type is generated upon completion of Clone tasks. - // 'BackupNow' notification type is generated upon completion of Backup tasks. - // 'FieldMessage' notification type is generated when field message from - // Cohesity support is created. - // 'bulkInstallApp' notification type is generated from bulk install app - // 'tiering' notification type is generated upon completion of tiering tasks. - // 'analysis' notification type is generated upon completion of analysis tasks. - // 'agentUpgradeTask' notification type is generated upon completion of upgrade - // task. - // Enum: ["restore","clone","backupNow","fieldMessage","bulkInstallApp","tiering","analysis","agentUpgradeTask"] - TaskType *string `json:"taskType,omitempty"` - - // The notifications details of Tiering Task. - TieringTask *TieringTaskInfo `json:"tieringTask,omitempty"` - - // Visited keeps track of whether a notification has been seen or not. - Visited *bool `json:"visited,omitempty"` - - // Timestamp at which user visited this notification event. - VisitedTimeSecs *int64 `json:"visitedTimeSecs,omitempty"` -} - -// Validate validates this task notification -func (m *TaskNotification) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentUpgradeTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAnalysisTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBulkInstallAppTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFieldMessageTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieringTask(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskNotification) validateAgentUpgradeTask(formats strfmt.Registry) error { - if swag.IsZero(m.AgentUpgradeTask) { // not required - return nil - } - - if m.AgentUpgradeTask != nil { - if err := m.AgentUpgradeTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentUpgradeTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentUpgradeTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateAnalysisTask(formats strfmt.Registry) error { - if swag.IsZero(m.AnalysisTask) { // not required - return nil - } - - if m.AnalysisTask != nil { - if err := m.AnalysisTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateBackupTask(formats strfmt.Registry) error { - if swag.IsZero(m.BackupTask) { // not required - return nil - } - - if m.BackupTask != nil { - if err := m.BackupTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateBulkInstallAppTask(formats strfmt.Registry) error { - if swag.IsZero(m.BulkInstallAppTask) { // not required - return nil - } - - if m.BulkInstallAppTask != nil { - if err := m.BulkInstallAppTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bulkInstallAppTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bulkInstallAppTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateCloneTask(formats strfmt.Registry) error { - if swag.IsZero(m.CloneTask) { // not required - return nil - } - - if m.CloneTask != nil { - if err := m.CloneTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateFieldMessageTask(formats strfmt.Registry) error { - if swag.IsZero(m.FieldMessageTask) { // not required - return nil - } - - if m.FieldMessageTask != nil { - if err := m.FieldMessageTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldMessageTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldMessageTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) validateRecoveryTask(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTask) { // not required - return nil - } - - if m.RecoveryTask != nil { - if err := m.RecoveryTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTask") - } - return err - } - } - - return nil -} - -var taskNotificationTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - taskNotificationTypeStatusPropEnum = append(taskNotificationTypeStatusPropEnum, v) - } -} - -const ( - - // TaskNotificationStatusKSuccess captures enum value "kSuccess" - TaskNotificationStatusKSuccess string = "kSuccess" - - // TaskNotificationStatusKError captures enum value "kError" - TaskNotificationStatusKError string = "kError" -) - -// prop value enum -func (m *TaskNotification) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, taskNotificationTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TaskNotification) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var taskNotificationTypeTaskTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["restore","clone","backupNow","fieldMessage","bulkInstallApp","tiering","analysis","agentUpgradeTask"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - taskNotificationTypeTaskTypePropEnum = append(taskNotificationTypeTaskTypePropEnum, v) - } -} - -const ( - - // TaskNotificationTaskTypeRestore captures enum value "restore" - TaskNotificationTaskTypeRestore string = "restore" - - // TaskNotificationTaskTypeClone captures enum value "clone" - TaskNotificationTaskTypeClone string = "clone" - - // TaskNotificationTaskTypeBackupNow captures enum value "backupNow" - TaskNotificationTaskTypeBackupNow string = "backupNow" - - // TaskNotificationTaskTypeFieldMessage captures enum value "fieldMessage" - TaskNotificationTaskTypeFieldMessage string = "fieldMessage" - - // TaskNotificationTaskTypeBulkInstallApp captures enum value "bulkInstallApp" - TaskNotificationTaskTypeBulkInstallApp string = "bulkInstallApp" - - // TaskNotificationTaskTypeTiering captures enum value "tiering" - TaskNotificationTaskTypeTiering string = "tiering" - - // TaskNotificationTaskTypeAnalysis captures enum value "analysis" - TaskNotificationTaskTypeAnalysis string = "analysis" - - // TaskNotificationTaskTypeAgentUpgradeTask captures enum value "agentUpgradeTask" - TaskNotificationTaskTypeAgentUpgradeTask string = "agentUpgradeTask" -) - -// prop value enum -func (m *TaskNotification) validateTaskTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, taskNotificationTypeTaskTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TaskNotification) validateTaskType(formats strfmt.Registry) error { - if swag.IsZero(m.TaskType) { // not required - return nil - } - - // value enum - if err := m.validateTaskTypeEnum("taskType", "body", *m.TaskType); err != nil { - return err - } - - return nil -} - -func (m *TaskNotification) validateTieringTask(formats strfmt.Registry) error { - if swag.IsZero(m.TieringTask) { // not required - return nil - } - - if m.TieringTask != nil { - if err := m.TieringTask.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringTask") - } - return err - } - } - - return nil -} - -// ContextValidate validate this task notification based on the context it is used -func (m *TaskNotification) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentUpgradeTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAnalysisTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBulkInstallAppTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFieldMessageTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTask(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieringTask(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskNotification) contextValidateAgentUpgradeTask(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentUpgradeTask != nil { - - if swag.IsZero(m.AgentUpgradeTask) { // not required - return nil - } - - if err := m.AgentUpgradeTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentUpgradeTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentUpgradeTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateAnalysisTask(ctx context.Context, formats strfmt.Registry) error { - - if m.AnalysisTask != nil { - - if swag.IsZero(m.AnalysisTask) { // not required - return nil - } - - if err := m.AnalysisTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateBackupTask(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupTask != nil { - - if swag.IsZero(m.BackupTask) { // not required - return nil - } - - if err := m.BackupTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateBulkInstallAppTask(ctx context.Context, formats strfmt.Registry) error { - - if m.BulkInstallAppTask != nil { - - if swag.IsZero(m.BulkInstallAppTask) { // not required - return nil - } - - if err := m.BulkInstallAppTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bulkInstallAppTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bulkInstallAppTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateCloneTask(ctx context.Context, formats strfmt.Registry) error { - - if m.CloneTask != nil { - - if swag.IsZero(m.CloneTask) { // not required - return nil - } - - if err := m.CloneTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateFieldMessageTask(ctx context.Context, formats strfmt.Registry) error { - - if m.FieldMessageTask != nil { - - if swag.IsZero(m.FieldMessageTask) { // not required - return nil - } - - if err := m.FieldMessageTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldMessageTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldMessageTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateRecoveryTask(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTask != nil { - - if swag.IsZero(m.RecoveryTask) { // not required - return nil - } - - if err := m.RecoveryTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTask") - } - return err - } - } - - return nil -} - -func (m *TaskNotification) contextValidateTieringTask(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringTask != nil { - - if swag.IsZero(m.TieringTask) { // not required - return nil - } - - if err := m.TieringTask.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringTask") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringTask") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskNotification) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskNotification) UnmarshalBinary(b []byte) error { - var res TaskNotification - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task_progress.go b/v1/models/task_progress.go deleted file mode 100644 index 3657366b..00000000 --- a/v1/models/task_progress.go +++ /dev/null @@ -1,273 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TaskProgress The progress information about a task. -// -// swagger:model TaskProgress -type TaskProgress struct { - - // If set this indicate the percentage of work which is not know at this - // time. This will be useful if client does not know total amount of work - // that has to done. But client know how much work it has completed and - // approximate how much more work need to be done. - // This is usually reported by the clients for leaf tasks. - // For non-leaf tasks, the progress may be dynamically inferred. - // (see ReportTaskProgressArg) - ApproxPercentUnknownWork *float32 `json:"approxPercentUnknownWork,omitempty"` - - // The latest attributes (if any) reported for this task. - AttributeVec []*KeyValuePair `json:"attributeVec"` - - // The time when the task finished. - EndTimeSecs *int64 `json:"endTimeSecs,omitempty"` - - // The events (if any) reported for this task. - EventVec []*PrivateTaskEvent `json:"eventVec"` - - // The expected end time of this task (if it hasn't ended). - // This is extrapolated using the current progress, and any historic - // data about this task if it occurs periodically. - // TODO(gaurav): Deprecate this field once Iris has stopped using it. - ExpectedEndTimeSecs *int64 `json:"expectedEndTimeSecs,omitempty"` - - // Expected time remaining for this task (if it hasn't ended). - ExpectedTimeRemainingSecs *int64 `json:"expectedTimeRemainingSecs,omitempty"` - - // The expected raw count of the total work remaining. This is the highest - // work count value reported by the client. This field can be set to let - // pulse compute percent_finished by looking at the currently reported - // remaining_work_count and the expected_total_work_count. - ExpectedTotalWorkCount *int64 `json:"expectedTotalWorkCount,omitempty"` - - // The timestamp at which task progress was last reported. - LastUpdateTimeSecs *int64 `json:"lastUpdateTimeSecs,omitempty"` - - // The reported progress on this task. - // This is usually reported by clients for leaf tasks. - // For non-leaf tasks, the progress may be dynamically inferred. - // (see ReportTaskProgressArg) - PercentFinished *float32 `json:"percentFinished,omitempty"` - - // The time when the task was started. - StartTimeSecs *int64 `json:"startTimeSecs,omitempty"` - - // The status of the task. - Status *TaskStatus `json:"status,omitempty"` -} - -// Validate validates this task progress -func (m *TaskProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributeVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEventVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskProgress) validateAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.AttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.AttributeVec); i++ { - if swag.IsZero(m.AttributeVec[i]) { // not required - continue - } - - if m.AttributeVec[i] != nil { - if err := m.AttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TaskProgress) validateEventVec(formats strfmt.Registry) error { - if swag.IsZero(m.EventVec) { // not required - return nil - } - - for i := 0; i < len(m.EventVec); i++ { - if swag.IsZero(m.EventVec[i]) { // not required - continue - } - - if m.EventVec[i] != nil { - if err := m.EventVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eventVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eventVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TaskProgress) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this task progress based on the context it is used -func (m *TaskProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEventVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskProgress) contextValidateAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AttributeVec); i++ { - - if m.AttributeVec[i] != nil { - - if swag.IsZero(m.AttributeVec[i]) { // not required - return nil - } - - if err := m.AttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TaskProgress) contextValidateEventVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EventVec); i++ { - - if m.EventVec[i] != nil { - - if swag.IsZero(m.EventVec[i]) { // not required - return nil - } - - if err := m.EventVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eventVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eventVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TaskProgress) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskProgress) UnmarshalBinary(b []byte) error { - var res TaskProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/task_status.go b/v1/models/task_status.go deleted file mode 100644 index cb02732e..00000000 --- a/v1/models/task_status.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" -) - -// TaskStatus task status -// -// swagger:model TaskStatus -type TaskStatus struct { - - // The error message (if any). - ErrorMsg *string `json:"errorMsg,omitempty"` - - // The return type. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this task status -func (m *TaskStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this task status based on context it is used -func (m *TaskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TaskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskStatus) UnmarshalBinary(b []byte) error { - var res TaskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/teams_additional_params.go b/v1/models/teams_additional_params.go deleted file mode 100644 index 9866b274..00000000 --- a/v1/models/teams_additional_params.go +++ /dev/null @@ -1,55 +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" -) - -// TeamsAdditionalParams Source additional parameters for kTeam entity type. -// -// Specifies additional params for Teams entities. It should only be populated -// if the 'DiscoveryParams.discoverableObjectTypeList' includes 'kTeams' -// otherwise this will be ignored. -// -// swagger:model TeamsAdditionalParams -type TeamsAdditionalParams struct { - - // Specifies whether the Teams posts/conversations will be backed up or not. - // If this is false or not specified teams' posts backup will not be done. - AllowPostsBackup *bool `json:"allowPostsBackup,omitempty"` -} - -// Validate validates this teams additional params -func (m *TeamsAdditionalParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this teams additional params based on context it is used -func (m *TeamsAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TeamsAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TeamsAdditionalParams) UnmarshalBinary(b []byte) error { - var res TeamsAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/teams_backup_env_params.go b/v1/models/teams_backup_env_params.go deleted file mode 100644 index a202b3cb..00000000 --- a/v1/models/teams_backup_env_params.go +++ /dev/null @@ -1,12 +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 - -// TeamsBackupEnvParams Message to capture any additional backup params for Teams within the -// Office365 environment. -// -// swagger:model TeamsBackupEnvParams -type TeamsBackupEnvParams interface{} diff --git a/v1/models/tenant.go b/v1/models/tenant.go deleted file mode 100644 index e05d35c6..00000000 --- a/v1/models/tenant.go +++ /dev/null @@ -1,490 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Tenant Tenant Details. -// -// Specifies details about a tenant. -// -// swagger:model Tenant -type Tenant struct { - - // Specifies the active directories this tenant is associated to. - ActiveDirectories []*ActiveDirectoryEntry `json:"activeDirectories"` - - // Specifies whether bifrost (Ambassador proxy) is enabled for tenant. - BifrostEnabled *bool `json:"bifrostEnabled,omitempty"` - - // The hostname for Cohesity cluster as seen by tenants and as is routable - // from the tenant's network. Tenant's VLAN's hostname, if available can be - // used instead but it is mandatory to provide this value if there's no VLAN - // hostname to use. Also, when set, this field would take precedence over - // VLAN hostname. - ClusterHostname *string `json:"clusterHostname,omitempty"` - - // Set of IPs as seen from the tenant's network for the Cohesity cluster. - // Only one from 'ClusterHostname' and 'ClusterIps' is needed. - ClusterIps []string `json:"clusterIps"` - - // Specifies the epoch time in milliseconds when the tenant account - // was created on the Cohesity Cluster. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies if the Tenant is deleted. - Deleted *bool `json:"deleted,omitempty"` - - // Specifies the timestamp at which the tenant was deleted. - DeletedTimeMsecs *int64 `json:"deletedTimeMsecs,omitempty"` - - // Specifies if the object collection is complete for the tenant. - DeletionFinished *bool `json:"deletionFinished,omitempty"` - - // Specifies the current deletion state of object categories. - DeletionInfoVec []*TenantDeletionInfo `json:"deletionInfoVec"` - - // Specifies the description of this tenant. - Description *string `json:"description,omitempty"` - - // Specifies the EntityIds this tenant is associated to. - EntityIds []int64 `json:"entityIds"` - - // Specifies whether this tenant is manged on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` - - // Specifies the epoch time in milliseconds when the tenant account was last - // modified on the Cohesity Cluster. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the ldap providers this tenant is associated to. - LdapProviders []*LdapProviderResponse `json:"ldapProviders"` - - // Specifies the name of the tenant. - Name *string `json:"name,omitempty"` - - // Specifies the organization suffix needed to construct tenant id. Tenant id - // is not completely auto generated rather chosen by tenant/SP admin as we - // needed same tenant id on multiple clusters to support replication across - // clusters, etc. - OrgSuffix *string `json:"orgSuffix,omitempty"` - - // Specifies the parent tenant of this tenant if available. - ParentTenantID *string `json:"parentTenantId,omitempty"` - - // Specifies the PolicyIds this tenant is associated to. - PolicyIds []string `json:"policyIds"` - - // Specifies the ProtectionJobs this tenant is associated to. - ProtectionJobs []*BackupJobProto `json:"protectionJobs"` - - // Service provider can optionally unsubscribe from the Tenant Alert Emails. - SubscribeToAlertEmails *bool `json:"subscribeToAlertEmails,omitempty"` - - // Specifies the Swift configuration of this tenant. - SwiftConfig *SwiftParams `json:"swiftConfig,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the ViewBoxIds this tenant is associated to. - ViewBoxIds []int64 `json:"viewBoxIds"` - - // Specifies the Views this tenant is associated to. - Views []*View `json:"views"` - - // Specifies the VlanIfaceNames this tenant is associated to, - // in the format of bond1.200. - VlanIfaceNames []string `json:"vlanIfaceNames"` -} - -// Validate validates this tenant -func (m *Tenant) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveDirectories(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeletionInfoVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLdapProviders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionJobs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSwiftConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Tenant) validateActiveDirectories(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveDirectories) { // not required - return nil - } - - for i := 0; i < len(m.ActiveDirectories); i++ { - if swag.IsZero(m.ActiveDirectories[i]) { // not required - continue - } - - if m.ActiveDirectories[i] != nil { - if err := m.ActiveDirectories[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) validateDeletionInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.DeletionInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.DeletionInfoVec); i++ { - if swag.IsZero(m.DeletionInfoVec[i]) { // not required - continue - } - - if m.DeletionInfoVec[i] != nil { - if err := m.DeletionInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deletionInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deletionInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) validateLdapProviders(formats strfmt.Registry) error { - if swag.IsZero(m.LdapProviders) { // not required - return nil - } - - for i := 0; i < len(m.LdapProviders); i++ { - if swag.IsZero(m.LdapProviders[i]) { // not required - continue - } - - if m.LdapProviders[i] != nil { - if err := m.LdapProviders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldapProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldapProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) validateProtectionJobs(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobs) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobs); i++ { - if swag.IsZero(m.ProtectionJobs[i]) { // not required - continue - } - - if m.ProtectionJobs[i] != nil { - if err := m.ProtectionJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) validateSwiftConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SwiftConfig) { // not required - return nil - } - - if m.SwiftConfig != nil { - if err := m.SwiftConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("swiftConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("swiftConfig") - } - return err - } - } - - return nil -} - -func (m *Tenant) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - for i := 0; i < len(m.Views); i++ { - if swag.IsZero(m.Views[i]) { // not required - continue - } - - if m.Views[i] != nil { - if err := m.Views[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tenant based on the context it is used -func (m *Tenant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveDirectories(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeletionInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLdapProviders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSwiftConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Tenant) contextValidateActiveDirectories(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveDirectories); i++ { - - if m.ActiveDirectories[i] != nil { - - if swag.IsZero(m.ActiveDirectories[i]) { // not required - return nil - } - - if err := m.ActiveDirectories[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) contextValidateDeletionInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeletionInfoVec); i++ { - - if m.DeletionInfoVec[i] != nil { - - if swag.IsZero(m.DeletionInfoVec[i]) { // not required - return nil - } - - if err := m.DeletionInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deletionInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deletionInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) contextValidateLdapProviders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LdapProviders); i++ { - - if m.LdapProviders[i] != nil { - - if swag.IsZero(m.LdapProviders[i]) { // not required - return nil - } - - if err := m.LdapProviders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldapProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldapProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) contextValidateProtectionJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobs); i++ { - - if m.ProtectionJobs[i] != nil { - - if swag.IsZero(m.ProtectionJobs[i]) { // not required - return nil - } - - if err := m.ProtectionJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Tenant) contextValidateSwiftConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SwiftConfig != nil { - - if swag.IsZero(m.SwiftConfig) { // not required - return nil - } - - if err := m.SwiftConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("swiftConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("swiftConfig") - } - return err - } - } - - return nil -} - -func (m *Tenant) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Views); i++ { - - if m.Views[i] != nil { - - if swag.IsZero(m.Views[i]) { // not required - return nil - } - - if err := m.Views[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Tenant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Tenant) UnmarshalBinary(b []byte) error { - var res Tenant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_access.go b/v1/models/tenant_access.go deleted file mode 100644 index b9d87eb7..00000000 --- a/v1/models/tenant_access.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TenantAccess Specfies the Tenant Access for MCM user. -// -// swagger:model TenantAccess -type TenantAccess struct { - - // Specifies the list of clusters. - // Min Items: 1 - // Unique: true - ClusterIdentifiers []*ClusterIdentifier `json:"clusterIdentifiers"` - - // Specifies the epoch time in milliseconds when the tenant access was - // created. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the tenant access becomes - // effective. Until that time, the user cannot log in. - EffectiveTimeMsecs *int64 `json:"effectiveTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the tenant access becomes - // expired. After that, the user cannot log in. - ExpiredTimeMsecs *int64 `json:"expiredTimeMsecs,omitempty"` - - // IsAccessActive specifies whether or not a tenant access is active, or - // has been deactivated by the customer. The default behavior is 'true'. - IsAccessActive *bool `json:"isAccessActive,omitempty"` - - // Specifies whether or not the tenant is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether or not the tenant is deleted. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // Specifies the epoch time in milliseconds when the tenant access was last - // modified. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the Cohesity roles to associate with the user such as - // such as 'Admin', 'Ops' or 'View'. - // Min Items: 1 - // Unique: true - Roles []string `json:"roles"` - - // Specifies the tenant id. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant name. - TenantName *string `json:"tenantName,omitempty"` - - // Specifies the MCM tenant type. - // 'Dmaas' implies tenant type is DMaaS. - // 'Mcm' implies tenant is Mcm Cluster tenant. - // Enum: ["Dmaas","Mcm"] - TenantType *string `json:"tenantType,omitempty"` -} - -// Validate validates this tenant access -func (m *TenantAccess) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIdentifiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRoles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAccess) validateClusterIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifiers) { // not required - return nil - } - - iClusterIdentifiersSize := int64(len(m.ClusterIdentifiers)) - - if err := validate.MinItems("clusterIdentifiers", "body", iClusterIdentifiersSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("clusterIdentifiers", "body", m.ClusterIdentifiers); err != nil { - return err - } - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - continue - } - - if m.ClusterIdentifiers[i] != nil { - if err := m.ClusterIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TenantAccess) validateRoles(formats strfmt.Registry) error { - if swag.IsZero(m.Roles) { // not required - return nil - } - - iRolesSize := int64(len(m.Roles)) - - if err := validate.MinItems("roles", "body", iRolesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("roles", "body", m.Roles); err != nil { - return err - } - - return nil -} - -var tenantAccessTypeTenantTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Dmaas","Mcm"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantAccessTypeTenantTypePropEnum = append(tenantAccessTypeTenantTypePropEnum, v) - } -} - -const ( - - // TenantAccessTenantTypeDmaas captures enum value "Dmaas" - TenantAccessTenantTypeDmaas string = "Dmaas" - - // TenantAccessTenantTypeMcm captures enum value "Mcm" - TenantAccessTenantTypeMcm string = "Mcm" -) - -// prop value enum -func (m *TenantAccess) validateTenantTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantAccessTypeTenantTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantAccess) validateTenantType(formats strfmt.Registry) error { - if swag.IsZero(m.TenantType) { // not required - return nil - } - - // value enum - if err := m.validateTenantTypeEnum("tenantType", "body", *m.TenantType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this tenant access based on the context it is used -func (m *TenantAccess) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAccess) contextValidateClusterIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - - if m.ClusterIdentifiers[i] != nil { - - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - return nil - } - - if err := m.ClusterIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantAccess) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantAccess) UnmarshalBinary(b []byte) error { - var res TenantAccess - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_active_directory_update.go b/v1/models/tenant_active_directory_update.go deleted file mode 100644 index f0242ca8..00000000 --- a/v1/models/tenant_active_directory_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantActiveDirectoryUpdate Tenant Active Directory Update. -// -// Specifies Active Directory update details response about a tenant. -// -// swagger:model TenantActiveDirectoryUpdate -type TenantActiveDirectoryUpdate struct { - - // Specifies the ActiveDirectoryDomain vec for respective tenant. - ActiveDirectoryDomains []string `json:"activeDirectoryDomains"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant active directory update -func (m *TenantActiveDirectoryUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant active directory update based on context it is used -func (m *TenantActiveDirectoryUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantActiveDirectoryUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantActiveDirectoryUpdate) UnmarshalBinary(b []byte) error { - var res TenantActiveDirectoryUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_active_directory_update_parameters.go b/v1/models/tenant_active_directory_update_parameters.go deleted file mode 100644 index 0ce1c198..00000000 --- a/v1/models/tenant_active_directory_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantActiveDirectoryUpdateParameters Tenant Active Directory Update Details. -// -// Specifies Active Directory update details about a tenant. -// -// swagger:model TenantActiveDirectoryUpdateParameters -type TenantActiveDirectoryUpdateParameters struct { - - // Specifies the ActiveDirectoryDomain vec for respective tenant. - ActiveDirectoryDomains []string `json:"activeDirectoryDomains"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant active directory update parameters -func (m *TenantActiveDirectoryUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant active directory update parameters based on context it is used -func (m *TenantActiveDirectoryUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantActiveDirectoryUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantActiveDirectoryUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantActiveDirectoryUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_config.go b/v1/models/tenant_config.go deleted file mode 100644 index 25d42537..00000000 --- a/v1/models/tenant_config.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/strfmt" - "github.com/go-openapi/swag" -) - -// TenantConfig Tenant Config. -// -// Specifies struct with basic tenant specific configuration. -// -// swagger:model TenantConfig -type TenantConfig struct { - - // Specifies if this tenant is bifrost enabled or not. - BifrostEnabled *bool `json:"bifrostEnabled,omitempty"` - - // Specifies whether this tenant is manged on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` - - // Specifies name of the tenant. - Name *string `json:"name,omitempty"` - - // Whether the user is a restricted user. A restricted user can only view - // the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with the user such as - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this user. - Roles []string `json:"roles"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant config -func (m *TenantConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant config based on context it is used -func (m *TenantConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantConfig) UnmarshalBinary(b []byte) error { - var res TenantConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_create_parameters.go b/v1/models/tenant_create_parameters.go deleted file mode 100644 index 5b0ff98f..00000000 --- a/v1/models/tenant_create_parameters.go +++ /dev/null @@ -1,84 +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" -) - -// TenantCreateParameters Tenant Create Request. -// -// Specifies the settings used to create/add a new tenant. -// -// swagger:model TenantCreateParameters -type TenantCreateParameters struct { - - // Specifies whether bifrost (Ambassador proxy) is enabled for tenant. - BifrostEnabled *bool `json:"bifrostEnabled,omitempty"` - - // The hostname for Cohesity cluster as seen by tenants and as is routable - // from the tenant's network. Tenant's VLAN's hostname, if available can be - // used instead but it is mandatory to provide this value if there's no VLAN - // hostname to use. Also, when set, this field would take precedence over - // VLAN hostname. - ClusterHostname *string `json:"clusterHostname,omitempty"` - - // Set of IPs as seen from the tenant's network for the Cohesity cluster. - // Only one from 'ClusterHostname' and 'ClusterIps' is needed. - ClusterIps []string `json:"clusterIps"` - - // Specifies the description of this tenant. - Description *string `json:"description,omitempty"` - - // Specifies whether this tenant is manged on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` - - // Specifies the name of the tenant. - Name *string `json:"name,omitempty"` - - // Specifies the organization suffix needed to construct tenant id. Tenant id - // is not completely auto generated rather chosen by tenant/SP admin as we - // needed same tenant id on multiple clusters to support replication across - // clusters, etc. - OrgSuffix *string `json:"orgSuffix,omitempty"` - - // Specifies the parent tenant of this tenant if available. - ParentTenantID *string `json:"parentTenantId,omitempty"` - - // Service provider can optionally unsubscribe from the Tenant Alert Emails. - SubscribeToAlertEmails *bool `json:"subscribeToAlertEmails,omitempty"` -} - -// Validate validates this tenant create parameters -func (m *TenantCreateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant create parameters based on context it is used -func (m *TenantCreateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantCreateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantCreateParameters) UnmarshalBinary(b []byte) error { - var res TenantCreateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_deletion_info.go b/v1/models/tenant_deletion_info.go deleted file mode 100644 index 4a88436d..00000000 --- a/v1/models/tenant_deletion_info.go +++ /dev/null @@ -1,235 +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" -) - -// TenantDeletionInfo TenantDeletionInfo captures the individual deletion state of a category of -// objects marked tagged with a tenant_id (which has been marked for deletion). -// -// swagger:model TenantDeletionInfo -type TenantDeletionInfo struct { - - // Specifies the category of objects whose deletion state is being captured. - // Specifies the Category of objects which are required to be deleted. - // On the first pass (when Tenant is marked 'deleted' and - // 'object_deletion_required' is set to true, for all the objects - // recognized in the enum - default deletion_info_vec is created. - // In order to skip the deletion of a few object categories, this object - // should be created manually during the 'Delete API' and these categories - // should be skipped. - // Enum: ["ProtectionJobs","Views","ProtectionSources","Users","ProtectionPolicies","Groups","ActiveDirectories","Ldap","RecoveryTask","RemoteClusters","StorageDomains","Alerts","ReportingSchedules","Idps","Swift","ExternalTargets","HyxRealms","HyxConnectors"] - Category *string `json:"category,omitempty"` - - // Specifies the time when the process finished. - FinishedAtTimeMsecs *int64 `json:"finishedAtTimeMsecs,omitempty"` - - // Specifies the node ip where the process ran. Typically this would be - // Primary Iris. - ProcessedAtNode *string `json:"processedAtNode,omitempty"` - - // Specifies the number of times this task has been retried. - RetryCount *int64 `json:"retryCount,omitempty"` - - // Specifies the time when the process started. - StartedAtTimeMsecs *int64 `json:"startedAtTimeMsecs,omitempty"` - - // Specifies the deletion completion state of the object category. - // Completion State is captured before any operations are started. Similar to - // WAL (Write Ahead Logging). - // Enum: ["NotStarted","InProgress","Finished","Skipped","Waiting"] - State *string `json:"state,omitempty"` -} - -// Validate validates this tenant deletion info -func (m *TenantDeletionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantDeletionInfoTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ProtectionJobs","Views","ProtectionSources","Users","ProtectionPolicies","Groups","ActiveDirectories","Ldap","RecoveryTask","RemoteClusters","StorageDomains","Alerts","ReportingSchedules","Idps","Swift","ExternalTargets","HyxRealms","HyxConnectors"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantDeletionInfoTypeCategoryPropEnum = append(tenantDeletionInfoTypeCategoryPropEnum, v) - } -} - -const ( - - // TenantDeletionInfoCategoryProtectionJobs captures enum value "ProtectionJobs" - TenantDeletionInfoCategoryProtectionJobs string = "ProtectionJobs" - - // TenantDeletionInfoCategoryViews captures enum value "Views" - TenantDeletionInfoCategoryViews string = "Views" - - // TenantDeletionInfoCategoryProtectionSources captures enum value "ProtectionSources" - TenantDeletionInfoCategoryProtectionSources string = "ProtectionSources" - - // TenantDeletionInfoCategoryUsers captures enum value "Users" - TenantDeletionInfoCategoryUsers string = "Users" - - // TenantDeletionInfoCategoryProtectionPolicies captures enum value "ProtectionPolicies" - TenantDeletionInfoCategoryProtectionPolicies string = "ProtectionPolicies" - - // TenantDeletionInfoCategoryGroups captures enum value "Groups" - TenantDeletionInfoCategoryGroups string = "Groups" - - // TenantDeletionInfoCategoryActiveDirectories captures enum value "ActiveDirectories" - TenantDeletionInfoCategoryActiveDirectories string = "ActiveDirectories" - - // TenantDeletionInfoCategoryLdap captures enum value "Ldap" - TenantDeletionInfoCategoryLdap string = "Ldap" - - // TenantDeletionInfoCategoryRecoveryTask captures enum value "RecoveryTask" - TenantDeletionInfoCategoryRecoveryTask string = "RecoveryTask" - - // TenantDeletionInfoCategoryRemoteClusters captures enum value "RemoteClusters" - TenantDeletionInfoCategoryRemoteClusters string = "RemoteClusters" - - // TenantDeletionInfoCategoryStorageDomains captures enum value "StorageDomains" - TenantDeletionInfoCategoryStorageDomains string = "StorageDomains" - - // TenantDeletionInfoCategoryAlerts captures enum value "Alerts" - TenantDeletionInfoCategoryAlerts string = "Alerts" - - // TenantDeletionInfoCategoryReportingSchedules captures enum value "ReportingSchedules" - TenantDeletionInfoCategoryReportingSchedules string = "ReportingSchedules" - - // TenantDeletionInfoCategoryIdps captures enum value "Idps" - TenantDeletionInfoCategoryIdps string = "Idps" - - // TenantDeletionInfoCategorySwift captures enum value "Swift" - TenantDeletionInfoCategorySwift string = "Swift" - - // TenantDeletionInfoCategoryExternalTargets captures enum value "ExternalTargets" - TenantDeletionInfoCategoryExternalTargets string = "ExternalTargets" - - // TenantDeletionInfoCategoryHyxRealms captures enum value "HyxRealms" - TenantDeletionInfoCategoryHyxRealms string = "HyxRealms" - - // TenantDeletionInfoCategoryHyxConnectors captures enum value "HyxConnectors" - TenantDeletionInfoCategoryHyxConnectors string = "HyxConnectors" -) - -// prop value enum -func (m *TenantDeletionInfo) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantDeletionInfoTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantDeletionInfo) validateCategory(formats strfmt.Registry) error { - if swag.IsZero(m.Category) { // not required - return nil - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -var tenantDeletionInfoTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotStarted","InProgress","Finished","Skipped","Waiting"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantDeletionInfoTypeStatePropEnum = append(tenantDeletionInfoTypeStatePropEnum, v) - } -} - -const ( - - // TenantDeletionInfoStateNotStarted captures enum value "NotStarted" - TenantDeletionInfoStateNotStarted string = "NotStarted" - - // TenantDeletionInfoStateInProgress captures enum value "InProgress" - TenantDeletionInfoStateInProgress string = "InProgress" - - // TenantDeletionInfoStateFinished captures enum value "Finished" - TenantDeletionInfoStateFinished string = "Finished" - - // TenantDeletionInfoStateSkipped captures enum value "Skipped" - TenantDeletionInfoStateSkipped string = "Skipped" - - // TenantDeletionInfoStateWaiting captures enum value "Waiting" - TenantDeletionInfoStateWaiting string = "Waiting" -) - -// prop value enum -func (m *TenantDeletionInfo) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantDeletionInfoTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantDeletionInfo) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant deletion info based on context it is used -func (m *TenantDeletionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantDeletionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantDeletionInfo) UnmarshalBinary(b []byte) error { - var res TenantDeletionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_entity_update.go b/v1/models/tenant_entity_update.go deleted file mode 100644 index aab9ccac..00000000 --- a/v1/models/tenant_entity_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantEntityUpdate Tenant Entity Update. -// -// Specifies entity update details response about a tenant. -// -// swagger:model TenantEntityUpdate -type TenantEntityUpdate struct { - - // Specifies the EntityIds for respective tenant. - EntityIds []int64 `json:"entityIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant entity update -func (m *TenantEntityUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant entity update based on context it is used -func (m *TenantEntityUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantEntityUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantEntityUpdate) UnmarshalBinary(b []byte) error { - var res TenantEntityUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_entity_update_parameters.go b/v1/models/tenant_entity_update_parameters.go deleted file mode 100644 index 56fb3b18..00000000 --- a/v1/models/tenant_entity_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantEntityUpdateParameters Tenant Entity Update Details. -// -// Specifies entity update details about a tenant. -// -// swagger:model TenantEntityUpdateParameters -type TenantEntityUpdateParameters struct { - - // Specifies the EntityIds for respective tenant. - EntityIds []int64 `json:"entityIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant entity update parameters -func (m *TenantEntityUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant entity update parameters based on context it is used -func (m *TenantEntityUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantEntityUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantEntityUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantEntityUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_group_update_parameters.go b/v1/models/tenant_group_update_parameters.go deleted file mode 100644 index 65193241..00000000 --- a/v1/models/tenant_group_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantGroupUpdateParameters Tenant Group Update Details. -// -// Specifies group update details about a tenant. -// -// swagger:model TenantGroupUpdateParameters -type TenantGroupUpdateParameters struct { - - // Specifies the array of Sid of the groups. - Sids []string `json:"sids"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant group update parameters -func (m *TenantGroupUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant group update parameters based on context it is used -func (m *TenantGroupUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantGroupUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantGroupUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantGroupUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_id_data.go b/v1/models/tenant_id_data.go deleted file mode 100644 index a5464b9a..00000000 --- a/v1/models/tenant_id_data.go +++ /dev/null @@ -1,52 +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" -) - -// TenantIDData Tenant Id Details. -// -// Specifies id of a tenant. -// -// swagger:model TenantIdData -type TenantIDData struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant Id data -func (m *TenantIDData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant Id data based on context it is used -func (m *TenantIDData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantIDData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantIDData) UnmarshalBinary(b []byte) error { - var res TenantIDData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_info.go b/v1/models/tenant_info.go deleted file mode 100644 index cb248c93..00000000 --- a/v1/models/tenant_info.go +++ /dev/null @@ -1,61 +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" -) - -// TenantInfo Tenant Information. -// -// Specifies struct with basic tenant details. -// -// swagger:model TenantInfo -type TenantInfo struct { - - // Specifies if this tenant is bifrost enabled or not. - BifrostEnabled *bool `json:"bifrostEnabled,omitempty"` - - // Specifies whether this tenant is manged on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` - - // Specifies name of the tenant. - Name *string `json:"name,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant info -func (m *TenantInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant info based on context it is used -func (m *TenantInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantInfo) UnmarshalBinary(b []byte) error { - var res TenantInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_ldap_provider_update.go b/v1/models/tenant_ldap_provider_update.go deleted file mode 100644 index 2fabb48d..00000000 --- a/v1/models/tenant_ldap_provider_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantLdapProviderUpdate Tenant Ldap Provider Update. -// -// Specifies Ldap Provider update details response about a tenant. -// -// swagger:model TenantLdapProviderUpdate -type TenantLdapProviderUpdate struct { - - // Specifies the ids of ldap providers for respective tenant. - LdapProviderIds []int64 `json:"ldapProviderIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant ldap provider update -func (m *TenantLdapProviderUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant ldap provider update based on context it is used -func (m *TenantLdapProviderUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantLdapProviderUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantLdapProviderUpdate) UnmarshalBinary(b []byte) error { - var res TenantLdapProviderUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_ldap_provider_update_parameters.go b/v1/models/tenant_ldap_provider_update_parameters.go deleted file mode 100644 index 708e26f9..00000000 --- a/v1/models/tenant_ldap_provider_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantLdapProviderUpdateParameters Tenant Ldap Provider Update Details. -// -// Specifies Ldap Provider update details about a tenant. -// -// swagger:model TenantLdapProviderUpdateParameters -type TenantLdapProviderUpdateParameters struct { - - // Specifies the ids of ldap providers for respective tenant. - LdapProviderIds []int64 `json:"ldapProviderIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant ldap provider update parameters -func (m *TenantLdapProviderUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant ldap provider update parameters based on context it is used -func (m *TenantLdapProviderUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantLdapProviderUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantLdapProviderUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantLdapProviderUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_protection_job_update.go b/v1/models/tenant_protection_job_update.go deleted file mode 100644 index 721d42fe..00000000 --- a/v1/models/tenant_protection_job_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantProtectionJobUpdate Tenant Protection Job Update. -// -// Specifies protection Job update details response about a tenant. -// -// swagger:model TenantProtectionJobUpdate -type TenantProtectionJobUpdate struct { - - // Specifies the ProtectionJobIds vec for respective tenant. - ProtectionJobIds []int64 `json:"protectionJobIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant protection job update -func (m *TenantProtectionJobUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant protection job update based on context it is used -func (m *TenantProtectionJobUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantProtectionJobUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantProtectionJobUpdate) UnmarshalBinary(b []byte) error { - var res TenantProtectionJobUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_protection_job_update_parameters.go b/v1/models/tenant_protection_job_update_parameters.go deleted file mode 100644 index 9afcede4..00000000 --- a/v1/models/tenant_protection_job_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantProtectionJobUpdateParameters Tenant Protection Job Update Details. -// -// Specifies protection job update details about a tenant. -// -// swagger:model TenantProtectionJobUpdateParameters -type TenantProtectionJobUpdateParameters struct { - - // Specifies the ProtectionJobIds vec for respective tenant. - ProtectionJobIds []int64 `json:"protectionJobIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant protection job update parameters -func (m *TenantProtectionJobUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant protection job update parameters based on context it is used -func (m *TenantProtectionJobUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantProtectionJobUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantProtectionJobUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantProtectionJobUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_protection_policy_update.go b/v1/models/tenant_protection_policy_update.go deleted file mode 100644 index 17af0fda..00000000 --- a/v1/models/tenant_protection_policy_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantProtectionPolicyUpdate Tenant Protection Policy Update. -// -// Specifies protection policy update details response about a tenant. -// -// swagger:model TenantProtectionPolicyUpdate -type TenantProtectionPolicyUpdate struct { - - // Specifies the PolicyIds for respective tenant. - PolicyIds []string `json:"policyIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant protection policy update -func (m *TenantProtectionPolicyUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant protection policy update based on context it is used -func (m *TenantProtectionPolicyUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantProtectionPolicyUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantProtectionPolicyUpdate) UnmarshalBinary(b []byte) error { - var res TenantProtectionPolicyUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_protection_policy_update_parameters.go b/v1/models/tenant_protection_policy_update_parameters.go deleted file mode 100644 index 30b67c68..00000000 --- a/v1/models/tenant_protection_policy_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantProtectionPolicyUpdateParameters Tenant Protection Policy Update Details. -// -// Specifies protection policy update details about a tenant. -// -// swagger:model TenantProtectionPolicyUpdateParameters -type TenantProtectionPolicyUpdateParameters struct { - - // Specifies the PolicyIds for respective tenant. - PolicyIds []string `json:"policyIds"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant protection policy update parameters -func (m *TenantProtectionPolicyUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant protection policy update parameters based on context it is used -func (m *TenantProtectionPolicyUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantProtectionPolicyUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantProtectionPolicyUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantProtectionPolicyUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_proxy.go b/v1/models/tenant_proxy.go deleted file mode 100644 index 3c9e68fa..00000000 --- a/v1/models/tenant_proxy.go +++ /dev/null @@ -1,62 +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" -) - -// TenantProxy Tenant Proxy. -// -// Specifies the data for tenant proxy which has been deployed in tenant's -// enviroment. -// -// swagger:model TenantProxy -type TenantProxy struct { - - // Specifies the constituent id of the proxy. - ConstituentID *int64 `json:"constituentId,omitempty"` - - // Specifies the ip address of the proxy. - IPAddress *string `json:"ipAddress,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the version of the proxy. - Version *string `json:"version,omitempty"` -} - -// Validate validates this tenant proxy -func (m *TenantProxy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant proxy based on context it is used -func (m *TenantProxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantProxy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantProxy) UnmarshalBinary(b []byte) error { - var res TenantProxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_stats.go b/v1/models/tenant_stats.go deleted file mode 100644 index 6a31973f..00000000 --- a/v1/models/tenant_stats.go +++ /dev/null @@ -1,240 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TenantStats TenantStats is the stats of a single tenant. -// -// swagger:model TenantStats -type TenantStats struct { - - // Specifies a list of groups associated to this tenant (organization). - GroupList []*StatsGroup `json:"groupList"` - - // Specifies the id of the tenant (organization). - ID *string `json:"id,omitempty"` - - // Specifies the name of the tenant (organization). - Name *string `json:"name,omitempty"` - - // Specifies a list of schemaInfos of the tenant (organization). - SchemaInfoList []*UsageSchemaInfo `json:"schemaInfoList"` - - // Specifies details of statistics of the tenant (organization). - Stats *DataUsageStats `json:"stats,omitempty"` -} - -// Validate validates this tenant stats -func (m *TenantStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroupList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantStats) validateGroupList(formats strfmt.Registry) error { - if swag.IsZero(m.GroupList) { // not required - return nil - } - - for i := 0; i < len(m.GroupList); i++ { - if swag.IsZero(m.GroupList[i]) { // not required - continue - } - - if m.GroupList[i] != nil { - if err := m.GroupList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TenantStats) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TenantStats) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this tenant stats based on the context it is used -func (m *TenantStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroupList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantStats) contextValidateGroupList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GroupList); i++ { - - if m.GroupList[i] != nil { - - if swag.IsZero(m.GroupList[i]) { // not required - return nil - } - - if err := m.GroupList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TenantStats) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TenantStats) 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 -} - -// MarshalBinary interface implementation -func (m *TenantStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantStats) UnmarshalBinary(b []byte) error { - var res TenantStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_update.go b/v1/models/tenant_update.go deleted file mode 100644 index d1fbce49..00000000 --- a/v1/models/tenant_update.go +++ /dev/null @@ -1,78 +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" -) - -// TenantUpdate Tenant Update Details. -// -// Specifies update details about a tenant. -// -// swagger:model TenantUpdate -type TenantUpdate struct { - - // Specifies whether bifrost (Ambassador proxy) is enabled for tenant. - BifrostEnabled *bool `json:"bifrostEnabled,omitempty"` - - // The hostname for Cohesity cluster as seen by tenants and as is routable - // from the tenant's network. Tenant's VLAN's hostname, if available can be - // used instead but it is mandatory to provide this value if there's no VLAN - // hostname to use. Also, when set, this field would take precedence over - // VLAN hostname. - ClusterHostname *string `json:"clusterHostname,omitempty"` - - // Set of IPs as seen from the tenant's network for the Cohesity cluster. - // Only one from 'ClusterHostname' and 'ClusterIps' is needed. - ClusterIps []string `json:"clusterIps"` - - // Specifies the description of this tenant. - Description *string `json:"description,omitempty"` - - // Specifies whether this tenant is manged on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` - - // Specifies the name of the tenant. - Name *string `json:"name,omitempty"` - - // Service provider can optionally unsubscribe from the Tenant Alert Emails. - SubscribeToAlertEmails *bool `json:"subscribeToAlertEmails,omitempty"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant update -func (m *TenantUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant update based on context it is used -func (m *TenantUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantUpdate) UnmarshalBinary(b []byte) error { - var res TenantUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_user_update_parameters.go b/v1/models/tenant_user_update_parameters.go deleted file mode 100644 index 022ca872..00000000 --- a/v1/models/tenant_user_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantUserUpdateParameters Tenant User Update Details. -// -// Specifies user update details about a tenant. -// -// swagger:model TenantUserUpdateParameters -type TenantUserUpdateParameters struct { - - // Specifies the array of Sid of the users. - Sids []string `json:"sids"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this tenant user update parameters -func (m *TenantUserUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant user update parameters based on context it is used -func (m *TenantUserUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantUserUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantUserUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantUserUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_view_box_update.go b/v1/models/tenant_view_box_update.go deleted file mode 100644 index 0c605728..00000000 --- a/v1/models/tenant_view_box_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantViewBoxUpdate Tenant View Box Update. -// -// Specifies view box update details response about a tenant. -// -// swagger:model TenantViewBoxUpdate -type TenantViewBoxUpdate struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the ViewBoxIds for respective tenant. - ViewBoxIds []int64 `json:"viewBoxIds"` -} - -// Validate validates this tenant view box update -func (m *TenantViewBoxUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant view box update based on context it is used -func (m *TenantViewBoxUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantViewBoxUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantViewBoxUpdate) UnmarshalBinary(b []byte) error { - var res TenantViewBoxUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_view_box_update_parameters.go b/v1/models/tenant_view_box_update_parameters.go deleted file mode 100644 index 03af7ded..00000000 --- a/v1/models/tenant_view_box_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantViewBoxUpdateParameters Tenant View Box Update Details. -// -// Specifies view box update details about a tenant. -// -// swagger:model TenantViewBoxUpdateParameters -type TenantViewBoxUpdateParameters struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the ViewBoxIds for respective tenant. - ViewBoxIds []int64 `json:"viewBoxIds"` -} - -// Validate validates this tenant view box update parameters -func (m *TenantViewBoxUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant view box update parameters based on context it is used -func (m *TenantViewBoxUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantViewBoxUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantViewBoxUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantViewBoxUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_view_update.go b/v1/models/tenant_view_update.go deleted file mode 100644 index 6457cee8..00000000 --- a/v1/models/tenant_view_update.go +++ /dev/null @@ -1,55 +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" -) - -// TenantViewUpdate Tenant View Update. -// -// Specifies view update details response about a tenant. -// -// swagger:model TenantViewUpdate -type TenantViewUpdate struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the PolicyIds for respective tenant. - ViewNames []string `json:"viewNames"` -} - -// Validate validates this tenant view update -func (m *TenantViewUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant view update based on context it is used -func (m *TenantViewUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantViewUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantViewUpdate) UnmarshalBinary(b []byte) error { - var res TenantViewUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_view_update_parameters.go b/v1/models/tenant_view_update_parameters.go deleted file mode 100644 index 281a15de..00000000 --- a/v1/models/tenant_view_update_parameters.go +++ /dev/null @@ -1,55 +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" -) - -// TenantViewUpdateParameters Tenant View Update Details. -// -// Specifies view update details about a tenant. -// -// swagger:model TenantViewUpdateParameters -type TenantViewUpdateParameters struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the PolicyIds for respective tenant. - ViewNames []string `json:"viewNames"` -} - -// Validate validates this tenant view update parameters -func (m *TenantViewUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant view update parameters based on context it is used -func (m *TenantViewUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantViewUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantViewUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantViewUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_vlan_update.go b/v1/models/tenant_vlan_update.go deleted file mode 100644 index eedaec7f..00000000 --- a/v1/models/tenant_vlan_update.go +++ /dev/null @@ -1,56 +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" -) - -// TenantVlanUpdate Tenant Vlan Update. -// -// Specifies vlan update details response about a tenant. -// -// swagger:model TenantVlanUpdate -type TenantVlanUpdate struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the VlanIfaceNames for respective tenant, - // in the format of bond1.200. - VlanIfaceNames []string `json:"vlanIfaceNames"` -} - -// Validate validates this tenant vlan update -func (m *TenantVlanUpdate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant vlan update based on context it is used -func (m *TenantVlanUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantVlanUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantVlanUpdate) UnmarshalBinary(b []byte) error { - var res TenantVlanUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tenant_vlan_update_parameters.go b/v1/models/tenant_vlan_update_parameters.go deleted file mode 100644 index 805f1d5c..00000000 --- a/v1/models/tenant_vlan_update_parameters.go +++ /dev/null @@ -1,56 +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" -) - -// TenantVlanUpdateParameters Tenant Vlan Update Details. -// -// Specifies vlan update details about a tenant. -// -// swagger:model TenantVlanUpdateParameters -type TenantVlanUpdateParameters struct { - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the VlanIfaceNames for respective tenant, - // in the format of bond1.200. - VlanIfaceNames []string `json:"vlanIfaceNames"` -} - -// Validate validates this tenant vlan update parameters -func (m *TenantVlanUpdateParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant vlan update parameters based on context it is used -func (m *TenantVlanUpdateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantVlanUpdateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantVlanUpdateParameters) UnmarshalBinary(b []byte) error { - var res TenantVlanUpdateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/threat_protection_info.go b/v1/models/threat_protection_info.go deleted file mode 100644 index fba500a5..00000000 --- a/v1/models/threat_protection_info.go +++ /dev/null @@ -1,60 +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" -) - -// ThreatProtectionInfo ThreatProtectionInfo holds information about the Datahawk ThreatProtection -// subscription such as if it is active or not. -// -// swagger:model ThreatProtectionInfo -type ThreatProtectionInfo struct { - - // Specifies the end date of the subscription. - EndDate *string `json:"endDate,omitempty"` - - // Specifies whether the Datahawk ThreatProtection subscription is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies whether the subscription is free trial. - IsFreeTrial *bool `json:"isFreeTrial,omitempty"` - - // Specifies the start date of the subscription. - StartDate *string `json:"startDate,omitempty"` -} - -// Validate validates this threat protection info -func (m *ThreatProtectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this threat protection info based on context it is used -func (m *ThreatProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ThreatProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThreatProtectionInfo) UnmarshalBinary(b []byte) error { - var res ThreatProtectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_configuration.go b/v1/models/throttling_configuration.go deleted file mode 100644 index 44ac056c..00000000 --- a/v1/models/throttling_configuration.go +++ /dev/null @@ -1,184 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ThrottlingConfiguration Specifies the throttling configuration parameters. -// -// swagger:model ThrottlingConfiguration -type ThrottlingConfiguration struct { - - // Fixed baseline threshold for throttling. This is mandatory for any other - // throttling type than kNoThrottling. - FixedThreshold *int64 `json:"fixedThreshold,omitempty"` - - // Type of the throttling pattern. - // 'kNoThrottling' indicates that throttling is not in force. - // 'kBaseThrottling' indicates indicates a constant base level throttling. - // 'kFixed' indicates a constant base level throttling. - // Enum: ["kNoThrottling","kBaseThrottling","kFixed"] - PatternType *string `json:"patternType,omitempty"` - - // Throttling windows which will be applicable in case of pattern_type = - // kScheduleBased. - ThrottlingWindows []*ThrottlingWindow `json:"throttlingWindows"` -} - -// Validate validates this throttling configuration -func (m *ThrottlingConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatternType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingWindows(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var throttlingConfigurationTypePatternTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoThrottling","kBaseThrottling","kFixed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - throttlingConfigurationTypePatternTypePropEnum = append(throttlingConfigurationTypePatternTypePropEnum, v) - } -} - -const ( - - // ThrottlingConfigurationPatternTypeKNoThrottling captures enum value "kNoThrottling" - ThrottlingConfigurationPatternTypeKNoThrottling string = "kNoThrottling" - - // ThrottlingConfigurationPatternTypeKBaseThrottling captures enum value "kBaseThrottling" - ThrottlingConfigurationPatternTypeKBaseThrottling string = "kBaseThrottling" - - // ThrottlingConfigurationPatternTypeKFixed captures enum value "kFixed" - ThrottlingConfigurationPatternTypeKFixed string = "kFixed" -) - -// prop value enum -func (m *ThrottlingConfiguration) validatePatternTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, throttlingConfigurationTypePatternTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ThrottlingConfiguration) validatePatternType(formats strfmt.Registry) error { - if swag.IsZero(m.PatternType) { // not required - return nil - } - - // value enum - if err := m.validatePatternTypeEnum("patternType", "body", *m.PatternType); err != nil { - return err - } - - return nil -} - -func (m *ThrottlingConfiguration) validateThrottlingWindows(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingWindows) { // not required - return nil - } - - for i := 0; i < len(m.ThrottlingWindows); i++ { - if swag.IsZero(m.ThrottlingWindows[i]) { // not required - continue - } - - if m.ThrottlingWindows[i] != nil { - if err := m.ThrottlingWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this throttling configuration based on the context it is used -func (m *ThrottlingConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateThrottlingWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingConfiguration) contextValidateThrottlingWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ThrottlingWindows); i++ { - - if m.ThrottlingWindows[i] != nil { - - if swag.IsZero(m.ThrottlingWindows[i]) { // not required - return nil - } - - if err := m.ThrottlingWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingConfiguration) UnmarshalBinary(b []byte) error { - var res ThrottlingConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_configuration_throttling_window.go b/v1/models/throttling_configuration_throttling_window.go deleted file mode 100644 index f74fd696..00000000 --- a/v1/models/throttling_configuration_throttling_window.go +++ /dev/null @@ -1,113 +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" -) - -// ThrottlingConfigurationThrottlingWindow Message encapsulating a DayTimeWindow and the corresponding threshold -// value applicable in that window. -// -// swagger:model ThrottlingConfiguration_ThrottlingWindow -type ThrottlingConfigurationThrottlingWindow struct { - - // Day time window. This captures day and time window on that day. - DayTimeWindow *PrivateDayTimeWindow `json:"dayTimeWindow,omitempty"` - - // Throttling threshold applicable in the window. - Threshold *int64 `json:"threshold,omitempty"` -} - -// Validate validates this throttling configuration throttling window -func (m *ThrottlingConfigurationThrottlingWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayTimeWindow(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingConfigurationThrottlingWindow) validateDayTimeWindow(formats strfmt.Registry) error { - if swag.IsZero(m.DayTimeWindow) { // not required - return nil - } - - if m.DayTimeWindow != nil { - if err := m.DayTimeWindow.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dayTimeWindow") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dayTimeWindow") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling configuration throttling window based on the context it is used -func (m *ThrottlingConfigurationThrottlingWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDayTimeWindow(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingConfigurationThrottlingWindow) contextValidateDayTimeWindow(ctx context.Context, formats strfmt.Registry) error { - - if m.DayTimeWindow != nil { - - if swag.IsZero(m.DayTimeWindow) { // not required - return nil - } - - if err := m.DayTimeWindow.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dayTimeWindow") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dayTimeWindow") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingConfigurationThrottlingWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingConfigurationThrottlingWindow) UnmarshalBinary(b []byte) error { - var res ThrottlingConfigurationThrottlingWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy.go b/v1/models/throttling_policy.go deleted file mode 100644 index 89acf820..00000000 --- a/v1/models/throttling_policy.go +++ /dev/null @@ -1,526 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ThrottlingPolicy Message that specifies the throttling policy for a particular registered -// entity. -// -// swagger:model ThrottlingPolicy -type ThrottlingPolicy struct { - - // This specifies the datastore streams config applied to all datastores - // that are part of the registered entity. This policy can be overriden per - // datastore by specifying it in DatastoreThrottlingPolicy below. - DatastoreStreamsConfig *ThrottlingPolicyDatastoreStreamsConfig `json:"datastoreStreamsConfig,omitempty"` - - // This field can be used to override the throttling policy for individual - // datastores. - DatastoreThrottlingPolicies []*ThrottlingPolicyDatastoreThrottlingPolicy `json:"datastoreThrottlingPolicies"` - - // The registered entity for which this throttling policy applies. - // NOTE: This field is optional and need not be set by Iris. - Entity *EntityProto `json:"entity,omitempty"` - - // Whether datastore streams can be configured on all datastores that are - // part of the registered entity. If set to true, then the config within - // 'DatastoreStreamsConfig' would be applicable to all those datastores. - IsDatastoreStreamsConfigEnabled *bool `json:"isDatastoreStreamsConfigEnabled,omitempty"` - - // Whether we will use storage snapshot managmement max snap config to all - // volumes/luns that are part of the registered entity. - IsMaxSnapshotsConfigEnabled *bool `json:"isMaxSnapshotsConfigEnabled,omitempty"` - - // Whether we will use storage snapshot managmement max space config to all - // volumes/luns that are part of the registered entity. - IsMaxSpaceConfigEnabled *bool `json:"isMaxSpaceConfigEnabled,omitempty"` - - // Whether no. of backups can be configured on the registered entity. If set - // to true, then the config within 'RegisteredSourceThrottlingConfig' would - // be applicable to the registered entity. - IsRegisteredSourceThrottlingConfigEnabled *bool `json:"isRegisteredSourceThrottlingConfigEnabled,omitempty"` - - // Whether we will adaptively throttle read operations from the datastores - // that are part of the registered entity. - // Note: This is only applicable to latency throttling. - IsThrottlingEnabled *bool `json:"isThrottlingEnabled,omitempty"` - - // This specifies the thresholds that should be applied to all datastores - // that are part of the registered entity. The thresholds for a datastore can - // be overriden by specifying it in datastore_throttling_policy below. - LatencyThresholds *ThrottlingPolicyLatencyThresholds `json:"latencyThresholds,omitempty"` - - // This specifies the registered source throttling config applied to - // registered entity. - RegisteredSourceThrottlingConfig *ThrottlingPolicyRegisteredSourceThrottlingConfig `json:"registeredSourceThrottlingConfig,omitempty"` - - // This specifies the storage snapshot managmement max snap config applied - // to all volumes/lun that are part of the registered entity. This policy - // can be overriden per volume/lun by specifying it in - // StorageArraySnapshotThrottlingPolicy below. - StorageArraySnapshotMaxSnapshotConfig *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig `json:"storageArraySnapshotMaxSnapshotConfig,omitempty"` - - // This specifies the storage snapshot managmement max space config applied - // to all volumes/lun that are part of the registered entity. This policy - // can be overriden per volume/lun by specifying it in - // StorageArraySnapshotThrottlingPolicy below. - StorageArraySnapshotMaxSpaceConfig *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig `json:"storageArraySnapshotMaxSpaceConfig,omitempty"` - - // This field is used for throttling policy for individual volume/lun. - StorageArraySnapshotThrottlingPolicies []*ThrottlingPolicyStorageArraySnapshotThrottlingPolicy `json:"storageArraySnapshotThrottlingPolicies"` -} - -// Validate validates this throttling policy -func (m *ThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreStreamsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreThrottlingPolicies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatencyThresholds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredSourceThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotMaxSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotMaxSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotThrottlingPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicy) validateDatastoreStreamsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreStreamsConfig) { // not required - return nil - } - - if m.DatastoreStreamsConfig != nil { - if err := m.DatastoreStreamsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreStreamsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreStreamsConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateDatastoreThrottlingPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreThrottlingPolicies) { // not required - return nil - } - - for i := 0; i < len(m.DatastoreThrottlingPolicies); i++ { - if swag.IsZero(m.DatastoreThrottlingPolicies[i]) { // not required - continue - } - - if m.DatastoreThrottlingPolicies[i] != nil { - if err := m.DatastoreThrottlingPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ThrottlingPolicy) validateEntity(formats strfmt.Registry) error { - if swag.IsZero(m.Entity) { // not required - return nil - } - - if m.Entity != nil { - if err := m.Entity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateLatencyThresholds(formats strfmt.Registry) error { - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if m.LatencyThresholds != nil { - if err := m.LatencyThresholds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateRegisteredSourceThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredSourceThrottlingConfig) { // not required - return nil - } - - if m.RegisteredSourceThrottlingConfig != nil { - if err := m.RegisteredSourceThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSourceThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSourceThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateStorageArraySnapshotMaxSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotMaxSnapshotConfig) { // not required - return nil - } - - if m.StorageArraySnapshotMaxSnapshotConfig != nil { - if err := m.StorageArraySnapshotMaxSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateStorageArraySnapshotMaxSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotMaxSpaceConfig) { // not required - return nil - } - - if m.StorageArraySnapshotMaxSpaceConfig != nil { - if err := m.StorageArraySnapshotMaxSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) validateStorageArraySnapshotThrottlingPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies) { // not required - return nil - } - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - continue - } - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - if err := m.StorageArraySnapshotThrottlingPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this throttling policy based on the context it is used -func (m *ThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreStreamsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreThrottlingPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLatencyThresholds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredSourceThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotMaxSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotMaxSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotThrottlingPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicy) contextValidateDatastoreStreamsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreStreamsConfig != nil { - - if swag.IsZero(m.DatastoreStreamsConfig) { // not required - return nil - } - - if err := m.DatastoreStreamsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreStreamsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreStreamsConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateDatastoreThrottlingPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatastoreThrottlingPolicies); i++ { - - if m.DatastoreThrottlingPolicies[i] != nil { - - if swag.IsZero(m.DatastoreThrottlingPolicies[i]) { // not required - return nil - } - - if err := m.DatastoreThrottlingPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.Entity != nil { - - if swag.IsZero(m.Entity) { // not required - return nil - } - - if err := m.Entity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entity") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateLatencyThresholds(ctx context.Context, formats strfmt.Registry) error { - - if m.LatencyThresholds != nil { - - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if err := m.LatencyThresholds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateRegisteredSourceThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredSourceThrottlingConfig != nil { - - if swag.IsZero(m.RegisteredSourceThrottlingConfig) { // not required - return nil - } - - if err := m.RegisteredSourceThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSourceThrottlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSourceThrottlingConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateStorageArraySnapshotMaxSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotMaxSnapshotConfig != nil { - - if swag.IsZero(m.StorageArraySnapshotMaxSnapshotConfig) { // not required - return nil - } - - if err := m.StorageArraySnapshotMaxSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateStorageArraySnapshotMaxSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotMaxSpaceConfig != nil { - - if swag.IsZero(m.StorageArraySnapshotMaxSpaceConfig) { // not required - return nil - } - - if err := m.StorageArraySnapshotMaxSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotMaxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotMaxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicy) contextValidateStorageArraySnapshotThrottlingPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - return nil - } - - if err := m.StorageArraySnapshotThrottlingPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_datastore_streams_config.go b/v1/models/throttling_policy_datastore_streams_config.go deleted file mode 100644 index efdbcdf8..00000000 --- a/v1/models/throttling_policy_datastore_streams_config.go +++ /dev/null @@ -1,52 +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" -) - -// ThrottlingPolicyDatastoreStreamsConfig The configs for datastore streams. -// -// swagger:model ThrottlingPolicy_DatastoreStreamsConfig -type ThrottlingPolicyDatastoreStreamsConfig struct { - - // If this value is > 0 and the number of streams concurrently active on a - // datastore is equal to it, then any further requests to access the - // datastore would be denied until the number of active streams reduces. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` -} - -// Validate validates this throttling policy datastore streams config -func (m *ThrottlingPolicyDatastoreStreamsConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this throttling policy datastore streams config based on context it is used -func (m *ThrottlingPolicyDatastoreStreamsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyDatastoreStreamsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyDatastoreStreamsConfig) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyDatastoreStreamsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_datastore_throttling_policy.go b/v1/models/throttling_policy_datastore_throttling_policy.go deleted file mode 100644 index cae4fd8a..00000000 --- a/v1/models/throttling_policy_datastore_throttling_policy.go +++ /dev/null @@ -1,227 +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" -) - -// ThrottlingPolicyDatastoreThrottlingPolicy Message that encapsulates the throttling policy that should be applied to -// a specific datastore. This can be used to override the throttling policy -// specified at the global level. -// -// swagger:model ThrottlingPolicy_DatastoreThrottlingPolicy -type ThrottlingPolicyDatastoreThrottlingPolicy struct { - - // The datastore entity that the latency thresholds apply to. - DatastoreEntity *EntityProto `json:"datastoreEntity,omitempty"` - - // This specifies custom datastore streams config for this datastore that - // override the global datastore streams config. - DatastoreStreamsConfig *ThrottlingPolicyDatastoreStreamsConfig `json:"datastoreStreamsConfig,omitempty"` - - // Whether datastore streams can be configured on this datastore. If set to - // true, then the config within 'DatastoreStreamsConfig' would be - // applicable to this datastore. This can be used to override the - // datastore streams configured at the global level. - IsDatastoreStreamsConfigEnabled *bool `json:"isDatastoreStreamsConfigEnabled,omitempty"` - - // Whether we will adaptively throttle read operations from this datastore. - // This can be used to disable throttling for this particular datastore - // when throttling is enabled at the global level. - // Note: This is only applicable to latency throttling. - IsThrottlingEnabled *bool `json:"isThrottlingEnabled,omitempty"` - - // This specifies custom latency thresholds for this particular datastore - // that override the global latency thresholds. - LatencyThresholds *ThrottlingPolicyLatencyThresholds `json:"latencyThresholds,omitempty"` -} - -// Validate validates this throttling policy datastore throttling policy -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreStreamsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatencyThresholds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) validateDatastoreEntity(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if m.DatastoreEntity != nil { - if err := m.DatastoreEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) validateDatastoreStreamsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreStreamsConfig) { // not required - return nil - } - - if m.DatastoreStreamsConfig != nil { - if err := m.DatastoreStreamsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreStreamsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreStreamsConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) validateLatencyThresholds(formats strfmt.Registry) error { - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if m.LatencyThresholds != nil { - if err := m.LatencyThresholds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling policy datastore throttling policy based on the context it is used -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreStreamsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLatencyThresholds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) contextValidateDatastoreEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreEntity != nil { - - if swag.IsZero(m.DatastoreEntity) { // not required - return nil - } - - if err := m.DatastoreEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntity") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) contextValidateDatastoreStreamsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreStreamsConfig != nil { - - if swag.IsZero(m.DatastoreStreamsConfig) { // not required - return nil - } - - if err := m.DatastoreStreamsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreStreamsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreStreamsConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) contextValidateLatencyThresholds(ctx context.Context, formats strfmt.Registry) error { - - if m.LatencyThresholds != nil { - - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if err := m.LatencyThresholds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyDatastoreThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyDatastoreThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_latency_thresholds.go b/v1/models/throttling_policy_latency_thresholds.go deleted file mode 100644 index 2ebb1f7b..00000000 --- a/v1/models/throttling_policy_latency_thresholds.go +++ /dev/null @@ -1,55 +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" -) - -// ThrottlingPolicyLatencyThresholds Message that encapsulates the latency thresholds that trigger throttling. -// -// swagger:model ThrottlingPolicy_LatencyThresholds -type ThrottlingPolicyLatencyThresholds struct { - - // If the latency of a datastore is above this value, then an existing - // backup task that uses the datastore will start getting throttled. - ActiveTaskLatencyThresholdMsecs *int64 `json:"activeTaskLatencyThresholdMsecs,omitempty"` - - // If the latency of a datastore is above this value, then a new backup - // task that uses the datastore won't be started. - NewTaskLatencyThresholdMsecs *int64 `json:"newTaskLatencyThresholdMsecs,omitempty"` -} - -// Validate validates this throttling policy latency thresholds -func (m *ThrottlingPolicyLatencyThresholds) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this throttling policy latency thresholds based on context it is used -func (m *ThrottlingPolicyLatencyThresholds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyLatencyThresholds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyLatencyThresholds) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyLatencyThresholds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_override.go b/v1/models/throttling_policy_override.go deleted file mode 100644 index 0082f239..00000000 --- a/v1/models/throttling_policy_override.go +++ /dev/null @@ -1,117 +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" -) - -// ThrottlingPolicyOverride Throttling Policy Override. -// -// Specifies throttling policy override for a Datastore in a registered entity. -// -// swagger:model ThrottlingPolicyOverride -type ThrottlingPolicyOverride struct { - - // Specifies the Protection Source id of the Datastore. - DatastoreID *int64 `json:"datastoreId,omitempty"` - - // Specifies the display name of the Datastore. - DatastoreName *string `json:"datastoreName,omitempty"` - - // Specifies the throttling policy that should be applied to this Source. - ThrottlingPolicy *ThrottlingPolicyParameters `json:"throttlingPolicy,omitempty"` -} - -// Validate validates this throttling policy override -func (m *ThrottlingPolicyOverride) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyOverride) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -// ContextValidate validate this throttling policy override based on the context it is used -func (m *ThrottlingPolicyOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyOverride) 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 -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyOverride) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_parameters.go b/v1/models/throttling_policy_parameters.go deleted file mode 100644 index c1367d43..00000000 --- a/v1/models/throttling_policy_parameters.go +++ /dev/null @@ -1,244 +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" -) - -// ThrottlingPolicyParameters Throttling Policy. -// -// Specifies the throttling policy for a registered Protection Source. -// -// swagger:model ThrottlingPolicyParameters -type ThrottlingPolicyParameters struct { - - // Specifies whether datastore streams are configured for all datastores - // that are part of the registered entity. If set to true, number of - // streams from Cohesity cluster to the registered entity will be limited - // to the value set for maxConcurrentStreams. If not set or set to false, - // there is no max limit for the number of concurrent streams. - EnforceMaxStreams *bool `json:"enforceMaxStreams,omitempty"` - - // Specifies whether no. of backups are configured for the registered entity. If - // set to true, number of backups made by Cohesity cluster in the registered - // entity will be limited to the value set for - // RegisteredSourceMaxConcurrentBackups. If not set or set to false, there is no - // max limit for the number of concurrent backups. - EnforceRegisteredSourceMaxBackups *bool `json:"enforceRegisteredSourceMaxBackups,omitempty"` - - // Indicates whether read operations to the datastores, which are - // part of the registered Protection Source, are throttled. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies the thresholds that should be applied to all - // datastores that are part of the registered Object. - LatencyThresholds *LatencyThresholds `json:"latencyThresholds,omitempty"` - - // Specifies the limit on the number of streams Cohesity cluster will make - // concurrently to the datastores of the registered entity. This limit is - // enforced only when the flag enforceMaxStreams is set to true. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - // Specifies the NAS specific source throttling parameters during source - // registration of the source. - NasSourceParams *NasSourceThrottlingParams `json:"nasSourceParams,omitempty"` - - // Specifies the limit on the number of backups Cohesity cluster will make - // concurrently to the registered entity. This limit is - // enforced only when the flag enforceRegisteredSourceMaxBackups is set to true. - RegisteredSourceMaxConcurrentBackups *int32 `json:"registeredSourceMaxConcurrentBackups,omitempty"` - - // Specifies the storage array snapshot configuration parameters. - // Valid only when IsStorageArraySnapshotEnabled is true. - StorageArraySnapshotConfig *StorageArraySnapshotConfigParams `json:"storageArraySnapshotConfig,omitempty"` -} - -// Validate validates this throttling policy parameters -func (m *ThrottlingPolicyParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLatencyThresholds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasSourceParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyParameters) validateLatencyThresholds(formats strfmt.Registry) error { - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if m.LatencyThresholds != nil { - if err := m.LatencyThresholds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyParameters) validateNasSourceParams(formats strfmt.Registry) error { - if swag.IsZero(m.NasSourceParams) { // not required - return nil - } - - if m.NasSourceParams != nil { - if err := m.NasSourceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasSourceParams") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyParameters) validateStorageArraySnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotConfig) { // not required - return nil - } - - if m.StorageArraySnapshotConfig != nil { - if err := m.StorageArraySnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling policy parameters based on the context it is used -func (m *ThrottlingPolicyParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLatencyThresholds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasSourceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyParameters) contextValidateLatencyThresholds(ctx context.Context, formats strfmt.Registry) error { - - if m.LatencyThresholds != nil { - - if swag.IsZero(m.LatencyThresholds) { // not required - return nil - } - - if err := m.LatencyThresholds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latencyThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latencyThresholds") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyParameters) contextValidateNasSourceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasSourceParams != nil { - - if swag.IsZero(m.NasSourceParams) { // not required - return nil - } - - if err := m.NasSourceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasSourceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasSourceParams") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyParameters) contextValidateStorageArraySnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotConfig != nil { - - if swag.IsZero(m.StorageArraySnapshotConfig) { // not required - return nil - } - - if err := m.StorageArraySnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyParameters) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_registered_source_throttling_config.go b/v1/models/throttling_policy_registered_source_throttling_config.go deleted file mode 100644 index a7b90b47..00000000 --- a/v1/models/throttling_policy_registered_source_throttling_config.go +++ /dev/null @@ -1,165 +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" -) - -// ThrottlingPolicyRegisteredSourceThrottlingConfig The configuration for backups on registered source. -// -// swagger:model ThrottlingPolicy_RegisteredSourceThrottlingConfig -type ThrottlingPolicyRegisteredSourceThrottlingConfig struct { - - // max concurrent backups - MaxConcurrentBackups *int32 `json:"maxConcurrentBackups,omitempty"` - - // This is applicable to all NAS sources. The parameters can be overridden - // by job.env_backup_params.nas_backup_params().throttling_params() in job - // settings. - NasThrottlingParams *NasThrottlingParams `json:"nasThrottlingParams,omitempty"` - - // Capture Uda throttling params. - UdaThrottlingParams *UdaThrottlingParams `json:"udaThrottlingParams,omitempty"` -} - -// Validate validates this throttling policy registered source throttling config -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNasThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) validateNasThrottlingParams(formats strfmt.Registry) error { - if swag.IsZero(m.NasThrottlingParams) { // not required - return nil - } - - if m.NasThrottlingParams != nil { - if err := m.NasThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasThrottlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasThrottlingParams") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) validateUdaThrottlingParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaThrottlingParams) { // not required - return nil - } - - if m.UdaThrottlingParams != nil { - if err := m.UdaThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaThrottlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaThrottlingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling policy registered source throttling config based on the context it is used -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNasThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) contextValidateNasThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasThrottlingParams != nil { - - if swag.IsZero(m.NasThrottlingParams) { // not required - return nil - } - - if err := m.NasThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasThrottlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasThrottlingParams") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) contextValidateUdaThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaThrottlingParams != nil { - - if swag.IsZero(m.UdaThrottlingParams) { // not required - return nil - } - - if err := m.UdaThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaThrottlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaThrottlingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyRegisteredSourceThrottlingConfig) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyRegisteredSourceThrottlingConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_storage_array_snapshot_max_snapshot_config.go b/v1/models/throttling_policy_storage_array_snapshot_max_snapshot_config.go deleted file mode 100644 index f0f58cc6..00000000 --- a/v1/models/throttling_policy_storage_array_snapshot_max_snapshot_config.go +++ /dev/null @@ -1,50 +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" -) - -// ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig Configs for storage array snapshot. -// -// swagger:model ThrottlingPolicy_StorageArraySnapshotMaxSnapshotConfig -type ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig struct { - - // Max number of storage snapshots allowed per volume/lun. - MaxSnapshots *int32 `json:"maxSnapshots,omitempty"` -} - -// Validate validates this throttling policy storage array snapshot max snapshot config -func (m *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this throttling policy storage array snapshot max snapshot config based on context it is used -func (m *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_storage_array_snapshot_max_space_config.go b/v1/models/throttling_policy_storage_array_snapshot_max_space_config.go deleted file mode 100644 index f8e4b726..00000000 --- a/v1/models/throttling_policy_storage_array_snapshot_max_space_config.go +++ /dev/null @@ -1,52 +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" -) - -// ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig throttling policy storage array snapshot max space config -// -// swagger:model ThrottlingPolicy_StorageArraySnapshotMaxSpaceConfig -type ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig struct { - - // Max space threshold can used by snapshots in percentage in volume/lun - // to take storage snapshot. If the space used by snapshots in a volume/lun - // exceeds this threshold, snapshots should not be taken - MaxSnapshotSpacePercentage *int32 `json:"maxSnapshotSpacePercentage,omitempty"` -} - -// Validate validates this throttling policy storage array snapshot max space config -func (m *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this throttling policy storage array snapshot max space config based on context it is used -func (m *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_policy_storage_array_snapshot_throttling_policy.go b/v1/models/throttling_policy_storage_array_snapshot_throttling_policy.go deleted file mode 100644 index 082933ba..00000000 --- a/v1/models/throttling_policy_storage_array_snapshot_throttling_policy.go +++ /dev/null @@ -1,225 +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" -) - -// ThrottlingPolicyStorageArraySnapshotThrottlingPolicy throttling policy storage array snapshot throttling policy -// -// swagger:model ThrottlingPolicy_StorageArraySnapshotThrottlingPolicy -type ThrottlingPolicyStorageArraySnapshotThrottlingPolicy struct { - - // If set to true, the max snapshots for this volume will be according to - // max_snapshot_config. - // If set to false, the max snapshots for this volume will be uncapped. - // If not set, there is not max snapshot override for this volume. - IsMaxSnapshotsConfigEnabled *bool `json:"isMaxSnapshotsConfigEnabled,omitempty"` - - // If set to true, the max space for this volume will be according to - // max_space_config. - // If set to false, the max space for this volume will be uncapped. - // If not set, there is not max snapshot override for this volume. - IsMaxSpaceConfigEnabled *bool `json:"isMaxSpaceConfigEnabled,omitempty"` - - // This specifies the storage array snapshot max snaps config for this - // volume/lun. Valid only when is_max_snapshots_config_enabled is true. - MaxSnapshotConfig *ThrottlingPolicyStorageArraySnapshotMaxSnapshotConfig `json:"maxSnapshotConfig,omitempty"` - - // This specifies the storage array snapshot fre space config for this - // volume/lun. Valid only when is_max_space_config_enabled is true. - MaxSpaceConfig *ThrottlingPolicyStorageArraySnapshotMaxSpaceConfig `json:"maxSpaceConfig,omitempty"` - - // Volume/lun entity that the storage array snapshot policy apply to. - StorageEntity *EntityProto `json:"storageEntity,omitempty"` -} - -// Validate validates this throttling policy storage array snapshot throttling policy -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageEntity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) validateMaxSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if m.MaxSnapshotConfig != nil { - if err := m.MaxSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) validateMaxSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if m.MaxSpaceConfig != nil { - if err := m.MaxSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) validateStorageEntity(formats strfmt.Registry) error { - if swag.IsZero(m.StorageEntity) { // not required - return nil - } - - if m.StorageEntity != nil { - if err := m.StorageEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageEntity") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling policy storage array snapshot throttling policy based on the context it is used -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMaxSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) contextValidateMaxSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSnapshotConfig != nil { - - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if err := m.MaxSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) contextValidateMaxSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSpaceConfig != nil { - - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if err := m.MaxSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) contextValidateStorageEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageEntity != nil { - - if swag.IsZero(m.StorageEntity) { // not required - return nil - } - - if err := m.StorageEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageEntity") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingPolicyStorageArraySnapshotThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res ThrottlingPolicyStorageArraySnapshotThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throttling_window.go b/v1/models/throttling_window.go deleted file mode 100644 index d34093db..00000000 --- a/v1/models/throttling_window.go +++ /dev/null @@ -1,112 +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" -) - -// ThrottlingWindow Specifies the throttling window parameters definition. -// -// swagger:model ThrottlingWindow -type ThrottlingWindow struct { - - // Day time window. This captures day and time window on that day. - DayTimeWindow *DayTimeWindow `json:"dayTimeWindow,omitempty"` - - // Throttling threshold applicable in the window. - Threshold *int64 `json:"threshold,omitempty"` -} - -// Validate validates this throttling window -func (m *ThrottlingWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayTimeWindow(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingWindow) validateDayTimeWindow(formats strfmt.Registry) error { - if swag.IsZero(m.DayTimeWindow) { // not required - return nil - } - - if m.DayTimeWindow != nil { - if err := m.DayTimeWindow.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dayTimeWindow") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dayTimeWindow") - } - return err - } - } - - return nil -} - -// ContextValidate validate this throttling window based on the context it is used -func (m *ThrottlingWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDayTimeWindow(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingWindow) contextValidateDayTimeWindow(ctx context.Context, formats strfmt.Registry) error { - - if m.DayTimeWindow != nil { - - if swag.IsZero(m.DayTimeWindow) { // not required - return nil - } - - if err := m.DayTimeWindow.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dayTimeWindow") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dayTimeWindow") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingWindow) UnmarshalBinary(b []byte) error { - var res ThrottlingWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/throughput_tile.go b/v1/models/throughput_tile.go deleted file mode 100644 index 65a62a0f..00000000 --- a/v1/models/throughput_tile.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ThroughputTile Throughput Tile. -// -// Throughput information for dashboard. -// -// swagger:model ThroughputTile -type ThroughputTile struct { - - // Maxium Read throughput in last 24 hours. - MaxReadThroughput *int64 `json:"maxReadThroughput,omitempty"` - - // Maximum Write throughput in last 24 hours. - MaxWriteThroughput *int64 `json:"maxWriteThroughput,omitempty"` - - // Read throughput samples taken for the past 24 hours at 10 minutes - // interval given in descending order of time. - ReadThroughputSamples []*Sample `json:"readThroughputSamples"` - - // Write throughput samples taken for the past 24 hours at 10 minutes - // interval given in descending order of time. - WriteThroughputSamples []*Sample `json:"writeThroughputSamples"` -} - -// Validate validates this throughput tile -func (m *ThroughputTile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReadThroughputSamples(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWriteThroughputSamples(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThroughputTile) validateReadThroughputSamples(formats strfmt.Registry) error { - if swag.IsZero(m.ReadThroughputSamples) { // not required - return nil - } - - for i := 0; i < len(m.ReadThroughputSamples); i++ { - if swag.IsZero(m.ReadThroughputSamples[i]) { // not required - continue - } - - if m.ReadThroughputSamples[i] != nil { - if err := m.ReadThroughputSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readThroughputSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readThroughputSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ThroughputTile) validateWriteThroughputSamples(formats strfmt.Registry) error { - if swag.IsZero(m.WriteThroughputSamples) { // not required - return nil - } - - for i := 0; i < len(m.WriteThroughputSamples); i++ { - if swag.IsZero(m.WriteThroughputSamples[i]) { // not required - continue - } - - if m.WriteThroughputSamples[i] != nil { - if err := m.WriteThroughputSamples[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeThroughputSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeThroughputSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this throughput tile based on the context it is used -func (m *ThroughputTile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReadThroughputSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWriteThroughputSamples(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThroughputTile) contextValidateReadThroughputSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReadThroughputSamples); i++ { - - if m.ReadThroughputSamples[i] != nil { - - if swag.IsZero(m.ReadThroughputSamples[i]) { // not required - return nil - } - - if err := m.ReadThroughputSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("readThroughputSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("readThroughputSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ThroughputTile) contextValidateWriteThroughputSamples(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WriteThroughputSamples); i++ { - - if m.WriteThroughputSamples[i] != nil { - - if swag.IsZero(m.WriteThroughputSamples[i]) { // not required - return nil - } - - if err := m.WriteThroughputSamples[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("writeThroughputSamples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("writeThroughputSamples" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThroughputTile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThroughputTile) UnmarshalBinary(b []byte) error { - var res ThroughputTile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tiering_audit_log_configuration.go b/v1/models/tiering_audit_log_configuration.go deleted file mode 100644 index 9a4ec9bc..00000000 --- a/v1/models/tiering_audit_log_configuration.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" - "github.com/go-openapi/validate" -) - -// TieringAuditLogConfiguration Tiering Audit Log Configuration. -// -// Specifies the settings of the tiering audit log configuration. -// -// swagger:model TieringAuditLogConfiguration -type TieringAuditLogConfiguration struct { - - // Specifies if tiering audit logging is enabled on the Cohesity Cluster. - // If 'true', NAS tiering audit logging is enabled. Otherwise, it is - // disabled. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the number of days to keep (retain) the tiering audit logs. - // Audit logs generated before the period of time specified by - // retentionPeriodDays are removed from the Cohesity Cluster. - // Required: true - RetentionPeriodDays *int32 `json:"retentionPeriodDays"` -} - -// Validate validates this tiering audit log configuration -func (m *TieringAuditLogConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPeriodDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringAuditLogConfiguration) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *TieringAuditLogConfiguration) validateRetentionPeriodDays(formats strfmt.Registry) error { - - if err := validate.Required("retentionPeriodDays", "body", m.RetentionPeriodDays); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tiering audit log configuration based on context it is used -func (m *TieringAuditLogConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringAuditLogConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringAuditLogConfiguration) UnmarshalBinary(b []byte) error { - var res TieringAuditLogConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tiering_info.go b/v1/models/tiering_info.go deleted file mode 100644 index d14680ec..00000000 --- a/v1/models/tiering_info.go +++ /dev/null @@ -1,56 +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" -) - -// TieringInfo tiering info -// -// swagger:model TieringInfo -type TieringInfo struct { - - // Specifies whether back-end tiering is enabled. - BackendTiering *bool `json:"backendTiering,omitempty"` - - // Specifies whether Front End Tiering Enabled - FrontendTiering *bool `json:"frontendTiering,omitempty"` - - // Specified the max retention for backup policy creation. - MaxRetention *int64 `json:"maxRetention,omitempty"` -} - -// Validate validates this tiering info -func (m *TieringInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tiering info based on context it is used -func (m *TieringInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringInfo) UnmarshalBinary(b []byte) error { - var res TieringInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/tiering_task_info.go b/v1/models/tiering_task_info.go deleted file mode 100644 index 91322528..00000000 --- a/v1/models/tiering_task_info.go +++ /dev/null @@ -1,59 +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" -) - -// TieringTaskInfo Parameters for a tiering op. -// -// swagger:model TieringTaskInfo -type TieringTaskInfo struct { - - // Id of that particular instance. - InstanceID *string `json:"instanceId,omitempty"` - - // Name of the recovery task. - Name *string `json:"name,omitempty"` - - // Denotes the start time of the tieringtask, needed for deeplinking. - StartTimeUsecs *string `json:"startTimeUsecs,omitempty"` - - // Id of the recovery task. - TaskID *string `json:"taskId,omitempty"` -} - -// Validate validates this tiering task info -func (m *TieringTaskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tiering task info based on context it is used -func (m *TieringTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringTaskInfo) UnmarshalBinary(b []byte) error { - var res TieringTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time.go b/v1/models/time.go deleted file mode 100644 index ce904c0e..00000000 --- a/v1/models/time.go +++ /dev/null @@ -1,56 +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" -) - -// Time A message to encapusulate time of a day. Users of this proto will have to -// store the timezone information separately. For example, when this proto -// is part of a backup job, timezone of the backup job is applied to get the -// absolute time. -// -// swagger:model Time -type Time struct { - - // The hour when backup should be performed (0 - 23). - Hour *int32 `json:"hour,omitempty"` - - // The minute when backup should be performed (0 - 59). - Minute *int32 `json:"minute,omitempty"` -} - -// Validate validates this time -func (m *Time) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this time based on context it is used -func (m *Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Time) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Time) UnmarshalBinary(b []byte) error { - var res Time - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_of_a_week.go b/v1/models/time_of_a_week.go deleted file mode 100644 index fa0f9286..00000000 --- a/v1/models/time_of_a_week.go +++ /dev/null @@ -1,222 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TimeOfAWeek Time Period. -// -// Specifies a time period by specifying a single daily time period -// and one or more days of the week, for example 9 AM - 5 PM -// on Monday, Wednesday or Friday. If different time periods are required -// on different days, then multiple instances of this Weekly Time Period -// must be specified. -// -// swagger:model TimeOfAWeek -type TimeOfAWeek struct { - - // Array of Week Days. - // - // Specifies a list of days of a week (such as 'kSunday') when the - // time period should be applied. - // If not set, the time range applies to all days of the week. - // Specifies a day in a week such as 'kSunday', 'kMonday', etc. - Days []string `json:"days"` - - // end time - EndTime *TimeOfAWeekEndTime `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"` -} - -// Validate validates this time of a week -func (m *TimeOfAWeek) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDays(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var timeOfAWeekDaysItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - timeOfAWeekDaysItemsEnum = append(timeOfAWeekDaysItemsEnum, v) - } -} - -func (m *TimeOfAWeek) validateDaysItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, timeOfAWeekDaysItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *TimeOfAWeek) validateDays(formats strfmt.Registry) error { - if swag.IsZero(m.Days) { // not required - return nil - } - - for i := 0; i < len(m.Days); i++ { - - // value enum - if err := m.validateDaysItemsEnum("days"+"."+strconv.Itoa(i), "body", m.Days[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *TimeOfAWeek) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *TimeOfAWeek) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this time of a week based on the context it is used -func (m *TimeOfAWeek) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *TimeOfAWeek) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfAWeek) UnmarshalBinary(b []byte) error { - var res TimeOfAWeek - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/time_of_day.go b/v1/models/time_of_day.go deleted file mode 100644 index 22e9b497..00000000 --- a/v1/models/time_of_day.go +++ /dev/null @@ -1,55 +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" -) - -// TimeOfDay Time of Day. -// -// Specifies a time in day with hours and minutes. -// -// swagger:model TimeOfDay -type TimeOfDay struct { - - // Specifies an (0-23) hour in a day. - Hour *int32 `json:"hour,omitempty"` - - // Specifies a (0-59) minute in an hour. - Minute *int32 `json:"minute,omitempty"` -} - -// Validate validates this time of day -func (m *TimeOfDay) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this time of day based on context it is used -func (m *TimeOfDay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TimeOfDay) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfDay) UnmarshalBinary(b []byte) error { - var res TimeOfDay - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_range.go b/v1/models/time_range.go deleted file mode 100644 index 4cee814a..00000000 --- a/v1/models/time_range.go +++ /dev/null @@ -1,118 +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" -) - -// TimeRange The interval used is [start_time_usecs, end_time_usecs]. The time range may -// or may not be annotated with additional data, as its usage in Iris precludes -// defining proto extensions. -// -// swagger:model TimeRange -type TimeRange struct { - - // attributes - Attributes *TimeRangeAttributes `json:"attributes,omitempty"` - - // The end time in usecs. If not set, "now" is treated as the end-time. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The start time in usecs. If not set, historical information all the way - // to the beginning is looked at. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this time range -func (m *TimeRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttributes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRange) validateAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.Attributes) { // not required - return nil - } - - if m.Attributes != nil { - if err := m.Attributes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes") - } - return err - } - } - - return nil -} - -// ContextValidate validate this time range based on the context it is used -func (m *TimeRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRange) contextValidateAttributes(ctx context.Context, formats strfmt.Registry) error { - - if m.Attributes != nil { - - if swag.IsZero(m.Attributes) { // not required - return nil - } - - if err := m.Attributes.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attributes") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attributes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TimeRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRange) UnmarshalBinary(b []byte) error { - var res TimeRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_range_attributes.go b/v1/models/time_range_attributes.go deleted file mode 100644 index a9d7e4e2..00000000 --- a/v1/models/time_range_attributes.go +++ /dev/null @@ -1,111 +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" -) - -// TimeRangeAttributes Any optional attributes with which to tag the time range. -// -// swagger:model TimeRange_Attributes -type TimeRangeAttributes struct { - - // Associates the time range with a job whose finished runs can be used to - // restore to any point within the range. Used in SQL and Oracle DB restore - // when computing the recoverable time ranges for the user. - JobUID *UniversalIDProto `json:"jobUid,omitempty"` -} - -// Validate validates this time range attributes -func (m *TimeRangeAttributes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeAttributes) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this time range attributes based on the context it is used -func (m *TimeRangeAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeAttributes) 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 -} - -// MarshalBinary interface implementation -func (m *TimeRangeAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRangeAttributes) UnmarshalBinary(b []byte) error { - var res TimeRangeAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_range_info.go b/v1/models/time_range_info.go deleted file mode 100644 index d5f72a82..00000000 --- a/v1/models/time_range_info.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TimeRangeInfo Information about a set of disjoint, possibly annotated time ranges. -// -// swagger:model TimeRangeInfo -type TimeRangeInfo struct { - - // Error (if any) associated with the time range. - Error *PrivateErrorProto `json:"error,omitempty"` - - // The set of time ranges, each of which may be tagged with its job. These - // ranges will be non-overlapping and sorted by increasing start time. - // - // An example vector is: ({(1, 20), job1}, {(22, 35)}, {(36, 40), job2}). - // - // For any pair of ranges from differing jobs that would have otherwise - // overlapped, their intersection is removed from the range with the older - // job or with job field empty. While prioritizing newer jobs is not needed - // for correctness it results in a more preferable user experience. - // - // If there are no ranges, this vector is empty. - TimeRangeVec []*TimeRange `json:"timeRangeVec"` - - // User message (if any) associated with the time range. - UserMessage *string `json:"userMessage,omitempty"` -} - -// Validate validates this time range info -func (m *TimeRangeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeRangeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeInfo) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *TimeRangeInfo) validateTimeRangeVec(formats strfmt.Registry) error { - if swag.IsZero(m.TimeRangeVec) { // not required - return nil - } - - for i := 0; i < len(m.TimeRangeVec); i++ { - if swag.IsZero(m.TimeRangeVec[i]) { // not required - continue - } - - if m.TimeRangeVec[i] != nil { - if err := m.TimeRangeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this time range info based on the context it is used -func (m *TimeRangeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeRangeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeInfo) 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 -} - -func (m *TimeRangeInfo) contextValidateTimeRangeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeRangeVec); i++ { - - if m.TimeRangeVec[i] != nil { - - if swag.IsZero(m.TimeRangeVec[i]) { // not required - return nil - } - - if err := m.TimeRangeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TimeRangeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRangeInfo) UnmarshalBinary(b []byte) error { - var res TimeRangeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_range_settings.go b/v1/models/time_range_settings.go deleted file mode 100644 index 396f280f..00000000 --- a/v1/models/time_range_settings.go +++ /dev/null @@ -1,120 +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" -) - -// TimeRangeSettings Time Range. -// -// Specifies the time range struct. -// -// swagger:model TimeRangeSettings -type TimeRangeSettings struct { - - // Specifies the end time specified as a Unix epoch Timestamp - // (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the job whose finished runs can be used to restore any - // point within this time range. - JobUID *UniversalID `json:"jobUid,omitempty"` - - // Specifies the start time specified as a Unix epoch Timestamp - // (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this time range settings -func (m *TimeRangeSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeSettings) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this time range settings based on the context it is used -func (m *TimeRangeSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeSettings) 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 -} - -// MarshalBinary interface implementation -func (m *TimeRangeSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRangeSettings) UnmarshalBinary(b []byte) error { - var res TimeRangeSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_range_usecs.go b/v1/models/time_range_usecs.go deleted file mode 100644 index 27dcaa9d..00000000 --- a/v1/models/time_range_usecs.go +++ /dev/null @@ -1,54 +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" -) - -// TimeRangeUsecs The interval used is [start_time_usecs, end_time_usecs]. -// -// swagger:model TimeRangeUsecs -type TimeRangeUsecs struct { - - // The end time in usecs. A negative value here should be treated as an - // indefinite time range. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // The start time in usecs. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` -} - -// Validate validates this time range usecs -func (m *TimeRangeUsecs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this time range usecs based on context it is used -func (m *TimeRangeUsecs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TimeRangeUsecs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRangeUsecs) UnmarshalBinary(b []byte) error { - var res TimeRangeUsecs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_series_schema_response.go b/v1/models/time_series_schema_response.go deleted file mode 100644 index 61e1d01c..00000000 --- a/v1/models/time_series_schema_response.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TimeSeriesSchemaResponse Time series schema response. -// -// Specifies the Apollo schema to list the data point. -// -// swagger:model TimeSeriesSchemaResponse -type TimeSeriesSchemaResponse struct { - - // Specifies the list of the schema info for an entity. - SchemaInfoList []*SchemaInfo `json:"schemaInfoList"` -} - -// Validate validates this time series schema response -func (m *TimeSeriesSchemaResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeSeriesSchemaResponse) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this time series schema response based on the context it is used -func (m *TimeSeriesSchemaResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeSeriesSchemaResponse) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TimeSeriesSchemaResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeSeriesSchemaResponse) UnmarshalBinary(b []byte) error { - var res TimeSeriesSchemaResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_window.go b/v1/models/time_window.go deleted file mode 100644 index 68b6d8f6..00000000 --- a/v1/models/time_window.go +++ /dev/null @@ -1,163 +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" -) - -// TimeWindow Message that specifies a time range within a day. -// -// swagger:model TimeWindow -type TimeWindow struct { - - // If the day is not set, the time range applies to all days. - Day *int32 `json:"day,omitempty"` - - // End time of the time range. - EndTime *Time `json:"endTime,omitempty"` - - // Start time of the time range. - StartTime *Time `json:"startTime,omitempty"` -} - -// Validate validates this time window -func (m *TimeWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeWindow) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -func (m *TimeWindow) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this time window based on the context it is used -func (m *TimeWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeWindow) 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 *TimeWindow) 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 -} - -// MarshalBinary interface implementation -func (m *TimeWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeWindow) UnmarshalBinary(b []byte) error { - var res TimeWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/trending_data.go b/v1/models/trending_data.go deleted file mode 100644 index c8bd52ed..00000000 --- a/v1/models/trending_data.go +++ /dev/null @@ -1,69 +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" -) - -// TrendingData Specifies protection runs information per object, aggregated over a period -// of time. -// -// swagger:model TrendingData -type TrendingData struct { - - // Specifies number of cancelled runs. - Cancelled *int64 `json:"cancelled,omitempty"` - - // Specifies number of failed runs. - Failed *int64 `json:"failed,omitempty"` - - // Specifies number of in-progress runs. - Running *int64 `json:"running,omitempty"` - - // Specifies number of successful runs. - Successful *int64 `json:"successful,omitempty"` - - // Specifies total number of runs. - Total *int64 `json:"total,omitempty"` - - // Specifies trend name. This is start of the day/week/month. - TrendName *string `json:"trendName,omitempty"` - - // Specifies start of the day/week/month in micro seconds - TrendStartTimeUsecs *int64 `json:"trendStartTimeUsecs,omitempty"` -} - -// Validate validates this trending data -func (m *TrendingData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this trending data based on context it is used -func (m *TrendingData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TrendingData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TrendingData) UnmarshalBinary(b []byte) error { - var res TrendingData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_job_params.go b/v1/models/uda_backup_job_params.go deleted file mode 100644 index 111c4294..00000000 --- a/v1/models/uda_backup_job_params.go +++ /dev/null @@ -1,274 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaBackupJobParams Contains backup params at the job level applicable for -// uda environment. These are sent from iris to magneto. -// -// swagger:model UdaBackupJobParams -type UdaBackupJobParams struct { - - // Map to store custom arguments which will be provided to the backup job - // scripts. - BackupJobArgumentsMap []*UdaBackupJobParamsBackupJobArgumentsMapEntry `json:"backupJobArgumentsMap"` - - // Max concurrency for the backup job. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Indicates if backup job was created after source acquired - // entity support capability. - EntitySupport *bool `json:"entitySupport,omitempty"` - - // Indicates if backup job was created after source acquired - // externally triggered log backup capability. - EtLogBackup *bool `json:"etLogBackup,omitempty"` - - // If using external disks, this parameter will contain the user-requested - // disk size for the slave to consume when requesting a disk from heimdall. - ExternalDiskSizeGb *int32 `json:"externalDiskSizeGb,omitempty"` - - // If using external disks, this parameter will contain the user-requested - // disk SKU for the slave to consume when requesting a disk from heimdall. - ExternalDiskSku *string `json:"externalDiskSku,omitempty"` - - // Custom arguments for full backup scripts. - FullBackupArgs *string `json:"fullBackupArgs,omitempty"` - - // Custom arguments for incremental backup scripts. - IncrementalBackupArgs *string `json:"incrementalBackupArgs,omitempty"` - - // Custom arguments for log backup scripts. - LogBackupArgs *string `json:"logBackupArgs,omitempty"` - - // Max number of view mounts per host. - Mounts *int32 `json:"mounts,omitempty"` - - // Id of the source to which the objects being protected - // belong to. This can be removed once entity hierarchy - // support is added to UDA and protected objects can be - // specified by their Ids instead of their names. - SourceID *int64 `json:"sourceId,omitempty"` - - // List of objects to be backed up. - UdaObjects []*UdaObjects `json:"udaObjects"` - - // This message captures all the details needed by UDA Backup to create S3 - // views and to access the S3 bucket. - UdaS3ViewBackupProperties *UdaS3ViewBackupProperties `json:"udaS3ViewBackupProperties,omitempty"` -} - -// Validate validates this uda backup job params -func (m *UdaBackupJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupJobArgumentsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaS3ViewBackupProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupJobParams) validateBackupJobArgumentsMap(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJobArgumentsMap) { // not required - return nil - } - - for i := 0; i < len(m.BackupJobArgumentsMap); i++ { - if swag.IsZero(m.BackupJobArgumentsMap[i]) { // not required - continue - } - - if m.BackupJobArgumentsMap[i] != nil { - if err := m.BackupJobArgumentsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupJobParams) validateUdaObjects(formats strfmt.Registry) error { - if swag.IsZero(m.UdaObjects) { // not required - return nil - } - - for i := 0; i < len(m.UdaObjects); i++ { - if swag.IsZero(m.UdaObjects[i]) { // not required - continue - } - - if m.UdaObjects[i] != nil { - if err := m.UdaObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupJobParams) validateUdaS3ViewBackupProperties(formats strfmt.Registry) error { - if swag.IsZero(m.UdaS3ViewBackupProperties) { // not required - return nil - } - - if m.UdaS3ViewBackupProperties != nil { - if err := m.UdaS3ViewBackupProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaS3ViewBackupProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaS3ViewBackupProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup job params based on the context it is used -func (m *UdaBackupJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupJobArgumentsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaS3ViewBackupProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupJobParams) contextValidateBackupJobArgumentsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupJobArgumentsMap); i++ { - - if m.BackupJobArgumentsMap[i] != nil { - - if swag.IsZero(m.BackupJobArgumentsMap[i]) { // not required - return nil - } - - if err := m.BackupJobArgumentsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupJobParams) contextValidateUdaObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UdaObjects); i++ { - - if m.UdaObjects[i] != nil { - - if swag.IsZero(m.UdaObjects[i]) { // not required - return nil - } - - if err := m.UdaObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupJobParams) contextValidateUdaS3ViewBackupProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaS3ViewBackupProperties != nil { - - if swag.IsZero(m.UdaS3ViewBackupProperties) { // not required - return nil - } - - if err := m.UdaS3ViewBackupProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaS3ViewBackupProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaS3ViewBackupProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupJobParams) UnmarshalBinary(b []byte) error { - var res UdaBackupJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_job_params_backup_job_arguments_map_entry.go b/v1/models/uda_backup_job_params_backup_job_arguments_map_entry.go deleted file mode 100644 index 4e8d59d7..00000000 --- a/v1/models/uda_backup_job_params_backup_job_arguments_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// UdaBackupJobParamsBackupJobArgumentsMapEntry uda backup job params backup job arguments map entry -// -// swagger:model UdaBackupJobParams_BackupJobArgumentsMapEntry -type UdaBackupJobParamsBackupJobArgumentsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *UdaCustomArgument `json:"value,omitempty"` -} - -// Validate validates this uda backup job params backup job arguments map entry -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) 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 -} - -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup job params backup job arguments map entry based on the context it is used -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupJobParamsBackupJobArgumentsMapEntry) UnmarshalBinary(b []byte) error { - var res UdaBackupJobParamsBackupJobArgumentsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_params.go b/v1/models/uda_backup_params.go deleted file mode 100644 index 9f62ee6f..00000000 --- a/v1/models/uda_backup_params.go +++ /dev/null @@ -1,284 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaBackupParams Message contains connection params and other info generated -// by magneto for UDA backup. -// -// swagger:model UdaBackupParams -type UdaBackupParams struct { - - // Optional param, used to attach a temprory disk for the backup. It will be - // set for Azure SQL backup. - DiskAttachParams *DiskAttachParams `json:"diskAttachParams,omitempty"` - - // This field specifies whether this is a full or regular backup - // of the job/task. - // Set from BackupJobTaskStateBaseProto::is_full_backup field. - IsFullBackup *bool `json:"isFullBackup,omitempty"` - - // Parents of protected entities, needed for indexing. - ParentEntities []*PrivateEntityProto `json:"parentEntities"` - - // Includes connection parameters and info saved during register. - RegisteredEntityUdaParams *RegisteredEntityUdaParams `json:"registeredEntityUdaParams,omitempty"` - - // The retention mins for this protection job. - RetentionMins *int64 `json:"retentionMins,omitempty"` - - // Run parameters, used for the externally triggered runs. - RunParams *UdaBackupRunParams `json:"runParams,omitempty"` -} - -// Validate validates this uda backup params -func (m *UdaBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskAttachParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredEntityUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupParams) validateDiskAttachParams(formats strfmt.Registry) error { - if swag.IsZero(m.DiskAttachParams) { // not required - return nil - } - - if m.DiskAttachParams != nil { - if err := m.DiskAttachParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskAttachParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskAttachParams") - } - return err - } - } - - return nil -} - -func (m *UdaBackupParams) validateParentEntities(formats strfmt.Registry) error { - if swag.IsZero(m.ParentEntities) { // not required - return nil - } - - for i := 0; i < len(m.ParentEntities); i++ { - if swag.IsZero(m.ParentEntities[i]) { // not required - continue - } - - if m.ParentEntities[i] != nil { - if err := m.ParentEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupParams) validateRegisteredEntityUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredEntityUdaParams) { // not required - return nil - } - - if m.RegisteredEntityUdaParams != nil { - if err := m.RegisteredEntityUdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityUdaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityUdaParams") - } - return err - } - } - - return nil -} - -func (m *UdaBackupParams) validateRunParams(formats strfmt.Registry) error { - if swag.IsZero(m.RunParams) { // not required - return nil - } - - if m.RunParams != nil { - if err := m.RunParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup params based on the context it is used -func (m *UdaBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskAttachParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredEntityUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupParams) contextValidateDiskAttachParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskAttachParams != nil { - - if swag.IsZero(m.DiskAttachParams) { // not required - return nil - } - - if err := m.DiskAttachParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskAttachParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskAttachParams") - } - return err - } - } - - return nil -} - -func (m *UdaBackupParams) contextValidateParentEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ParentEntities); i++ { - - if m.ParentEntities[i] != nil { - - if swag.IsZero(m.ParentEntities[i]) { // not required - return nil - } - - if err := m.ParentEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaBackupParams) contextValidateRegisteredEntityUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredEntityUdaParams != nil { - - if swag.IsZero(m.RegisteredEntityUdaParams) { // not required - return nil - } - - if err := m.RegisteredEntityUdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredEntityUdaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredEntityUdaParams") - } - return err - } - } - - return nil -} - -func (m *UdaBackupParams) contextValidateRunParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RunParams != nil { - - if swag.IsZero(m.RunParams) { // not required - return nil - } - - if err := m.RunParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupParams) UnmarshalBinary(b []byte) error { - var res UdaBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_run_params.go b/v1/models/uda_backup_run_params.go deleted file mode 100644 index f3708862..00000000 --- a/v1/models/uda_backup_run_params.go +++ /dev/null @@ -1,109 +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" -) - -// UdaBackupRunParams uda backup run params -// -// swagger:model UdaBackupRunParams -type UdaBackupRunParams struct { - - // et run params - EtRunParams *UdaBackupRunParamsUdaExternallyTriggeredRunParams `json:"etRunParams,omitempty"` -} - -// Validate validates this uda backup run params -func (m *UdaBackupRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEtRunParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupRunParams) validateEtRunParams(formats strfmt.Registry) error { - if swag.IsZero(m.EtRunParams) { // not required - return nil - } - - if m.EtRunParams != nil { - if err := m.EtRunParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("etRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("etRunParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup run params based on the context it is used -func (m *UdaBackupRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEtRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupRunParams) contextValidateEtRunParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EtRunParams != nil { - - if swag.IsZero(m.EtRunParams) { // not required - return nil - } - - if err := m.EtRunParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("etRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("etRunParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupRunParams) UnmarshalBinary(b []byte) error { - var res UdaBackupRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_run_params_uda_externally_triggered_run_params.go b/v1/models/uda_backup_run_params_uda_externally_triggered_run_params.go deleted file mode 100644 index f9bb9975..00000000 --- a/v1/models/uda_backup_run_params_uda_externally_triggered_run_params.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaBackupRunParamsUdaExternallyTriggeredRunParams uda backup run params uda externally triggered run params -// -// swagger:model UdaBackupRunParams_UdaExternallyTriggeredRunParams -type UdaBackupRunParamsUdaExternallyTriggeredRunParams struct { - - // Specifies a map of custom arguments to be supplied to the plugin. - ArgsMap []*UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry `json:"argsMap"` - - // Specifies the IP or FQDN of the source host where this - // backup will run. - ControlNode *string `json:"controlNode,omitempty"` - - // A unique identifier for this externally triggerd run, - // to be sent to the plugin. - EtRunID *string `json:"etRunId,omitempty"` -} - -// Validate validates this uda backup run params uda externally triggered run params -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArgsMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) validateArgsMap(formats strfmt.Registry) error { - if swag.IsZero(m.ArgsMap) { // not required - return nil - } - - for i := 0; i < len(m.ArgsMap); i++ { - if swag.IsZero(m.ArgsMap[i]) { // not required - continue - } - - if m.ArgsMap[i] != nil { - if err := m.ArgsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("argsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("argsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda backup run params uda externally triggered run params based on the context it is used -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArgsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) contextValidateArgsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArgsMap); i++ { - - if m.ArgsMap[i] != nil { - - if swag.IsZero(m.ArgsMap[i]) { // not required - return nil - } - - if err := m.ArgsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("argsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("argsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParams) UnmarshalBinary(b []byte) error { - var res UdaBackupRunParamsUdaExternallyTriggeredRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_run_params_uda_externally_triggered_run_params_args_map_entry.go b/v1/models/uda_backup_run_params_uda_externally_triggered_run_params_args_map_entry.go deleted file mode 100644 index 79b273f9..00000000 --- a/v1/models/uda_backup_run_params_uda_externally_triggered_run_params_args_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry uda backup run params uda externally triggered run params args map entry -// -// swagger:model UdaBackupRunParams_UdaExternallyTriggeredRunParams_ArgsMapEntry -type UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *UdaCustomArgument `json:"value,omitempty"` -} - -// Validate validates this uda backup run params uda externally triggered run params args map entry -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) 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 -} - -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup run params uda externally triggered run params args map entry based on the context it is used -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry) UnmarshalBinary(b []byte) error { - var res UdaBackupRunParamsUdaExternallyTriggeredRunParamsArgsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_backup_source_params.go b/v1/models/uda_backup_source_params.go deleted file mode 100644 index 44fbf5a9..00000000 --- a/v1/models/uda_backup_source_params.go +++ /dev/null @@ -1,109 +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" -) - -// UdaBackupSourceParams Source specific params passed for UDA backup job. -// -// swagger:model UdaBackupSourceParams -type UdaBackupSourceParams struct { - - // throttling params - ThrottlingParams *UdaThrottlingParams `json:"throttlingParams,omitempty"` -} - -// Validate validates this uda backup source params -func (m *UdaBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupSourceParams) validateThrottlingParams(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if m.ThrottlingParams != nil { - if err := m.ThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda backup source params based on the context it is used -func (m *UdaBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaBackupSourceParams) contextValidateThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingParams != nil { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if err := m.ThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaBackupSourceParams) UnmarshalBinary(b []byte) error { - var res UdaBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_cluster.go b/v1/models/uda_cluster.go deleted file mode 100644 index 944b9e36..00000000 --- a/v1/models/uda_cluster.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" -) - -// UdaCluster Universal Data Adapter Cluster Info. -// -// Specifies an Object containing information about a Universal Data Adapter -// cluster. -// -// swagger:model UdaCluster -type UdaCluster struct { - - // Hosts of this Universal Data Adapter Cluster. - Hosts []string `json:"hosts"` -} - -// Validate validates this uda cluster -func (m *UdaCluster) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda cluster based on context it is used -func (m *UdaCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaCluster) UnmarshalBinary(b []byte) error { - var res UdaCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_connect_params.go b/v1/models/uda_connect_params.go deleted file mode 100644 index 5ef74d82..00000000 --- a/v1/models/uda_connect_params.go +++ /dev/null @@ -1,336 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UdaConnectParams Universal Data Adapter Connect Params. -// -// Specifies an Object containing information about a registered Universal Data -// Adapter source. -// -// swagger:model UdaConnectParams -type UdaConnectParams struct { - - // Types of backups supported. - Capabilities *UdaSourceCapabilities `json:"capabilities,omitempty"` - - // Credentials that will be used to log into the application environment. - Credentials *Credentials `json:"credentials,omitempty"` - - // Specifies whether to enable cohesity policy triggered log backups along - // with externally triggered backups. - // Only applicable if etLogBackup capability is true. - EtEnableLogBackupPolicy *bool `json:"etEnableLogBackupPolicy,omitempty"` - - // Specifies if the user triggered runs are allowed along with - // externally triggered backups. - // Only applicable if etLogBackup is true. - EtEnableRunNow *bool `json:"etEnableRunNow,omitempty"` - - // Specifies the environment type for the host. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"] - HostType *string `json:"hostType,omitempty"` - - // List of hosts forming the Universal Data Adapter cluster. - Hosts []string `json:"hosts"` - - // Whether to use a live view for data backups. - LiveDataView *bool `json:"liveDataView,omitempty"` - - // Whether to use a live view for log backups. - LiveLogView *bool `json:"liveLogView,omitempty"` - - // This field is deprecated and its value will be ignored. It was used to - // specify the absolute path on the host where the view would be mounted. - // This is now controlled by the agent configuration and is common for all - // the Universal Data Adapter sources. - // deprecated: true - MountDir *string `json:"mountDir,omitempty"` - - // Whether to mount a view during the source backup. - MountView *bool `json:"mountView,omitempty"` - - // Path where various source scripts will be located. - ScriptDir *string `json:"scriptDir,omitempty"` - - // Custom arguments which will be provided to the source registration - // scripts. This is deprecated. Use 'sourceRegistrationArguments' instead. - SourceArgs *string `json:"sourceArgs,omitempty"` - - // Specifies a map of custom arguments to be supplied to the source - // registration scripts. - SourceRegistrationArguments []*KeyValueStrPair `json:"sourceRegistrationArguments"` - - // Global app source type. - SourceType *string `json:"sourceType,omitempty"` -} - -// Validate validates this uda connect params -func (m *UdaConnectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCapabilities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceRegistrationArguments(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConnectParams) validateCapabilities(formats strfmt.Registry) error { - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if m.Capabilities != nil { - if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *UdaConnectParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -var udaConnectParamsTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - udaConnectParamsTypeHostTypePropEnum = append(udaConnectParamsTypeHostTypePropEnum, v) - } -} - -const ( - - // UdaConnectParamsHostTypeKLinux captures enum value "kLinux" - UdaConnectParamsHostTypeKLinux string = "kLinux" - - // UdaConnectParamsHostTypeKWindows captures enum value "kWindows" - UdaConnectParamsHostTypeKWindows string = "kWindows" - - // UdaConnectParamsHostTypeKAix captures enum value "kAix" - UdaConnectParamsHostTypeKAix string = "kAix" - - // UdaConnectParamsHostTypeKSolaris captures enum value "kSolaris" - UdaConnectParamsHostTypeKSolaris string = "kSolaris" - - // UdaConnectParamsHostTypeKSapHana captures enum value "kSapHana" - UdaConnectParamsHostTypeKSapHana string = "kSapHana" - - // UdaConnectParamsHostTypeKOther captures enum value "kOther" - UdaConnectParamsHostTypeKOther string = "kOther" - - // UdaConnectParamsHostTypeKHPUX captures enum value "kHPUX" - UdaConnectParamsHostTypeKHPUX string = "kHPUX" - - // UdaConnectParamsHostTypeKVOS captures enum value "kVOS" - UdaConnectParamsHostTypeKVOS string = "kVOS" -) - -// prop value enum -func (m *UdaConnectParams) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, udaConnectParamsTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UdaConnectParams) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *UdaConnectParams) validateSourceRegistrationArguments(formats strfmt.Registry) error { - if swag.IsZero(m.SourceRegistrationArguments) { // not required - return nil - } - - for i := 0; i < len(m.SourceRegistrationArguments); i++ { - if swag.IsZero(m.SourceRegistrationArguments[i]) { // not required - continue - } - - if m.SourceRegistrationArguments[i] != nil { - if err := m.SourceRegistrationArguments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda connect params based on the context it is used -func (m *UdaConnectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCapabilities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceRegistrationArguments(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConnectParams) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { - - if m.Capabilities != nil { - - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *UdaConnectParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *UdaConnectParams) contextValidateSourceRegistrationArguments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceRegistrationArguments); i++ { - - if m.SourceRegistrationArguments[i] != nil { - - if swag.IsZero(m.SourceRegistrationArguments[i]) { // not required - return nil - } - - if err := m.SourceRegistrationArguments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaConnectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaConnectParams) UnmarshalBinary(b []byte) error { - var res UdaConnectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_custom_argument.go b/v1/models/uda_custom_argument.go deleted file mode 100644 index 051995bf..00000000 --- a/v1/models/uda_custom_argument.go +++ /dev/null @@ -1,56 +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" -) - -// UdaCustomArgument Wrapper for the custom arguments that are supplied to UDA scripts for the -// various workflows like regidtration, backup & recovery. This contains either -// a value or in case of sensitive data, an encrypted value. -// -// swagger:model UdaCustomArgument -type UdaCustomArgument struct { - - // Encrypted value in case the custom argument contains sensitive data like - // passwords, tokens, etc. - EncryptedValue []uint8 `json:"encryptedValue"` - - // Value for the custom argument. - Value *string `json:"value,omitempty"` -} - -// Validate validates this uda custom argument -func (m *UdaCustomArgument) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda custom argument based on context it is used -func (m *UdaCustomArgument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaCustomArgument) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaCustomArgument) UnmarshalBinary(b []byte) error { - var res UdaCustomArgument - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_object.go b/v1/models/uda_object.go deleted file mode 100644 index 0ee38cfb..00000000 --- a/v1/models/uda_object.go +++ /dev/null @@ -1,56 +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" -) - -// UdaObject Universal Data Adapter Object Info. -// -// Specifies an Object containing information about a Universal Data Adapter -// object. -// -// swagger:model UdaObject -type UdaObject struct { - - // Indicates whether this object is is a leaf object - IsLeaf *bool `json:"isLeaf,omitempty"` - - // Type of this object - ObjectType *string `json:"objectType,omitempty"` -} - -// Validate validates this uda object -func (m *UdaObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda object based on context it is used -func (m *UdaObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObject) UnmarshalBinary(b []byte) error { - var res UdaObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_objects.go b/v1/models/uda_objects.go deleted file mode 100644 index 4dcf94f4..00000000 --- a/v1/models/uda_objects.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" -) - -// UdaObjects Identifier for an individual object to be backed up. E.x. db1. -// -// swagger:model UdaObjects -type UdaObjects struct { - - // Magneto entity id - ID *int64 `json:"id,omitempty"` - - // Name of the object - Name *string `json:"name,omitempty"` -} - -// Validate validates this uda objects -func (m *UdaObjects) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda objects based on context it is used -func (m *UdaObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjects) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjects) UnmarshalBinary(b []byte) error { - var res UdaObjects - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_protection_source.go b/v1/models/uda_protection_source.go deleted file mode 100644 index 21e242d2..00000000 --- a/v1/models/uda_protection_source.go +++ /dev/null @@ -1,227 +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" -) - -// UdaProtectionSource Universal Data Adapter Protection Source. -// -// Specifies an Object representing Universal Data Adapter. -// -// swagger:model UdaProtectionSource -type UdaProtectionSource struct { - - // Information of a Universal Data Adapter cluster, only valid for an entity - // of type kCluster. - ClusterInfo *UdaCluster `json:"clusterInfo,omitempty"` - - // Specifies the instance name of the Universal Data Adapter entity. - Name *string `json:"name,omitempty"` - - // Information of a Universal Data Adapter object, only valid for an entity of - // type kObject. - ObjectInfo *UdaObject `json:"objectInfo,omitempty"` - - // Specifies the type of the managed Object in Universal Data Adapter - // Protection Source. - // Specifies the type of an Universal Data Adapter source entity. - // 'kCluster' indicates a Universal Data Adapter source, possibly distributed - // over several physical nodes. - // 'kObject' indicates a generic object within the UDA environment. - // Enum: ["kCluster","kObject"] - Type *string `json:"type,omitempty"` - - // Specifies the UUID for the Universal Data Adapter entity. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this uda protection source -func (m *UdaProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionSource) validateClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if m.ClusterInfo != nil { - if err := m.ClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionSource) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -var udaProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kObject"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - udaProtectionSourceTypeTypePropEnum = append(udaProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // UdaProtectionSourceTypeKCluster captures enum value "kCluster" - UdaProtectionSourceTypeKCluster string = "kCluster" - - // UdaProtectionSourceTypeKObject captures enum value "kObject" - UdaProtectionSourceTypeKObject string = "kObject" -) - -// prop value enum -func (m *UdaProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, udaProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UdaProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this uda protection source based on the context it is used -func (m *UdaProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionSource) contextValidateClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterInfo != nil { - - if swag.IsZero(m.ClusterInfo) { // not required - return nil - } - - if err := m.ClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterInfo") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionSource) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionSource) UnmarshalBinary(b []byte) error { - var res UdaProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_recover_job_params.go b/v1/models/uda_recover_job_params.go deleted file mode 100644 index 685b37e2..00000000 --- a/v1/models/uda_recover_job_params.go +++ /dev/null @@ -1,451 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaRecoverJobParams Contains recovery params at the job level applicable for uda environment. -// -// swagger:model UdaRecoverJobParams -type UdaRecoverJobParams struct { - - // Types of backups supported. - Capabilities *UdaSourceCapabilities `json:"capabilities,omitempty"` - - // Number of parallel streams to use for the restore. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Deployment type for the UDA agent. - DeploymentType *int32 `json:"deploymentType,omitempty"` - - // If using external disks, this parameter will contain the user-requested - // disk SKU for the slave to consume when requesting a disk from heimdall. - ExternalDiskSku *string `json:"externalDiskSku,omitempty"` - - // The agent host environment type. - HostType *int32 `json:"hostType,omitempty"` - - // List of hosts forming the UDA cluster. - Hosts []string `json:"hosts"` - - // Directory on the host where views will be mounted. - // (This is deprecated now and the value is derived from a gflag in agent.) - LocalMountDir *string `json:"localMountDir,omitempty"` - - // Whether to mount a view during restore. - MountView *bool `json:"mountView,omitempty"` - - // Max number of view mounts to use for the restore. - Mounts *int32 `json:"mounts,omitempty"` - - // Control nodes to connect for control path ops. - PreferredControlNodes []string `json:"preferredControlNodes"` - - // Custom arguments which are applicable to the objects to be restored. - RestoreArgs *string `json:"restoreArgs,omitempty"` - - // Map to store custom arguments which will be provided to the recovery job - // scripts. - RestoreJobArgumentsMap []*UdaRecoverJobParamsRestoreJobArgumentsMapEntry `json:"restoreJobArgumentsMap"` - - // EntityProto for CreateRestoreTaskArg::restore_target_entity_id. - // Set in magneto. - RestoreTargetEntity *EntityProto `json:"restoreTargetEntity,omitempty"` - - // Includes UdaRecoverJobParams::restore_target_entity and its parents. - // Passed so slave can take lock on these. - RestoreTargetEntityParents []*EntityProto `json:"restoreTargetEntityParents"` - - // The time when the corresponding backup run was started. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Path where the source scripts will be located. - ScriptDir *string `json:"scriptDir,omitempty"` - - // Custom arguments which will be provided to the source registration - // scripts. - SourceArgs *string `json:"sourceArgs,omitempty"` - - // Map to store custom arguments which will be provided to the source - // registration scripts. - SourceArgumentsMap []*UdaRecoverJobParamsSourceArgumentsMapEntry `json:"sourceArgumentsMap"` - - // Universal Data Adapter source type for which recovery is being performed. - SourceType *string `json:"sourceType,omitempty"` - - // This message captures all the details needed by UDA Restore to clone S3 - // views and access the S3 bucket. - UdaS3ViewBackupProperties *UdaS3ViewBackupProperties `json:"udaS3ViewBackupProperties,omitempty"` - - // Whether S3 views should be used for restore. - UseS3View *bool `json:"useS3View,omitempty"` -} - -// Validate validates this uda recover job params -func (m *UdaRecoverJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCapabilities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreJobArgumentsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTargetEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreTargetEntityParents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceArgumentsMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaS3ViewBackupProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverJobParams) validateCapabilities(formats strfmt.Registry) error { - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if m.Capabilities != nil { - if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *UdaRecoverJobParams) validateRestoreJobArgumentsMap(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreJobArgumentsMap) { // not required - return nil - } - - for i := 0; i < len(m.RestoreJobArgumentsMap); i++ { - if swag.IsZero(m.RestoreJobArgumentsMap[i]) { // not required - continue - } - - if m.RestoreJobArgumentsMap[i] != nil { - if err := m.RestoreJobArgumentsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreJobArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreJobArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) validateRestoreTargetEntity(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTargetEntity) { // not required - return nil - } - - if m.RestoreTargetEntity != nil { - if err := m.RestoreTargetEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTargetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTargetEntity") - } - return err - } - } - - return nil -} - -func (m *UdaRecoverJobParams) validateRestoreTargetEntityParents(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTargetEntityParents) { // not required - return nil - } - - for i := 0; i < len(m.RestoreTargetEntityParents); i++ { - if swag.IsZero(m.RestoreTargetEntityParents[i]) { // not required - continue - } - - if m.RestoreTargetEntityParents[i] != nil { - if err := m.RestoreTargetEntityParents[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTargetEntityParents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTargetEntityParents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) validateSourceArgumentsMap(formats strfmt.Registry) error { - if swag.IsZero(m.SourceArgumentsMap) { // not required - return nil - } - - for i := 0; i < len(m.SourceArgumentsMap); i++ { - if swag.IsZero(m.SourceArgumentsMap[i]) { // not required - continue - } - - if m.SourceArgumentsMap[i] != nil { - if err := m.SourceArgumentsMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) validateUdaS3ViewBackupProperties(formats strfmt.Registry) error { - if swag.IsZero(m.UdaS3ViewBackupProperties) { // not required - return nil - } - - if m.UdaS3ViewBackupProperties != nil { - if err := m.UdaS3ViewBackupProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaS3ViewBackupProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaS3ViewBackupProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda recover job params based on the context it is used -func (m *UdaRecoverJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCapabilities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreJobArgumentsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTargetEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreTargetEntityParents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceArgumentsMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaS3ViewBackupProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverJobParams) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { - - if m.Capabilities != nil { - - if swag.IsZero(m.Capabilities) { // not required - return nil - } - - if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capabilities") - } - return err - } - } - - return nil -} - -func (m *UdaRecoverJobParams) contextValidateRestoreJobArgumentsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreJobArgumentsMap); i++ { - - if m.RestoreJobArgumentsMap[i] != nil { - - if swag.IsZero(m.RestoreJobArgumentsMap[i]) { // not required - return nil - } - - if err := m.RestoreJobArgumentsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreJobArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreJobArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) contextValidateRestoreTargetEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreTargetEntity != nil { - - if swag.IsZero(m.RestoreTargetEntity) { // not required - return nil - } - - if err := m.RestoreTargetEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTargetEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTargetEntity") - } - return err - } - } - - return nil -} - -func (m *UdaRecoverJobParams) contextValidateRestoreTargetEntityParents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreTargetEntityParents); i++ { - - if m.RestoreTargetEntityParents[i] != nil { - - if swag.IsZero(m.RestoreTargetEntityParents[i]) { // not required - return nil - } - - if err := m.RestoreTargetEntityParents[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTargetEntityParents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTargetEntityParents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) contextValidateSourceArgumentsMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceArgumentsMap); i++ { - - if m.SourceArgumentsMap[i] != nil { - - if swag.IsZero(m.SourceArgumentsMap[i]) { // not required - return nil - } - - if err := m.SourceArgumentsMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceArgumentsMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverJobParams) contextValidateUdaS3ViewBackupProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaS3ViewBackupProperties != nil { - - if swag.IsZero(m.UdaS3ViewBackupProperties) { // not required - return nil - } - - if err := m.UdaS3ViewBackupProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaS3ViewBackupProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaS3ViewBackupProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoverJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoverJobParams) UnmarshalBinary(b []byte) error { - var res UdaRecoverJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_recover_job_params_restore_job_arguments_map_entry.go b/v1/models/uda_recover_job_params_restore_job_arguments_map_entry.go deleted file mode 100644 index c2be7914..00000000 --- a/v1/models/uda_recover_job_params_restore_job_arguments_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// UdaRecoverJobParamsRestoreJobArgumentsMapEntry uda recover job params restore job arguments map entry -// -// swagger:model UdaRecoverJobParams_RestoreJobArgumentsMapEntry -type UdaRecoverJobParamsRestoreJobArgumentsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *UdaCustomArgument `json:"value,omitempty"` -} - -// Validate validates this uda recover job params restore job arguments map entry -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) 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 -} - -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda recover job params restore job arguments map entry based on the context it is used -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoverJobParamsRestoreJobArgumentsMapEntry) UnmarshalBinary(b []byte) error { - var res UdaRecoverJobParamsRestoreJobArgumentsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_recover_job_params_source_arguments_map_entry.go b/v1/models/uda_recover_job_params_source_arguments_map_entry.go deleted file mode 100644 index e38354e3..00000000 --- a/v1/models/uda_recover_job_params_source_arguments_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// UdaRecoverJobParamsSourceArgumentsMapEntry uda recover job params source arguments map entry -// -// swagger:model UdaRecoverJobParams_SourceArgumentsMapEntry -type UdaRecoverJobParamsSourceArgumentsMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *UdaCustomArgument `json:"value,omitempty"` -} - -// Validate validates this uda recover job params source arguments map entry -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) 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 -} - -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda recover job params source arguments map entry based on the context it is used -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoverJobParamsSourceArgumentsMapEntry) UnmarshalBinary(b []byte) error { - var res UdaRecoverJobParamsSourceArgumentsMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_recover_params.go b/v1/models/uda_recover_params.go deleted file mode 100644 index 818108cd..00000000 --- a/v1/models/uda_recover_params.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaRecoverParams uda recover params -// -// swagger:model UdaRecoverParams -type UdaRecoverParams struct { - - // If the restore has logs to be replayed, 'log_view_name' contains the name - // of log backup view to be mounted on the host. - LogViewName *string `json:"logViewName,omitempty"` - - // restore objects - RestoreObjects []*UdaRestoreObject `json:"restoreObjects"` - - // Pass throttling policy being used to throttle restore. - ThrottlingPolicy *ThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // The view box where log backed up data has been saved. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` -} - -// Validate validates this uda recover params -func (m *UdaRecoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverParams) validateRestoreObjects(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreObjects) { // not required - return nil - } - - for i := 0; i < len(m.RestoreObjects); i++ { - if swag.IsZero(m.RestoreObjects[i]) { // not required - continue - } - - if m.RestoreObjects[i] != nil { - if err := m.RestoreObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverParams) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -// ContextValidate validate this uda recover params based on the context it is used -func (m *UdaRecoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoverParams) contextValidateRestoreObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreObjects); i++ { - - if m.RestoreObjects[i] != nil { - - if swag.IsZero(m.RestoreObjects[i]) { // not required - return nil - } - - if err := m.RestoreObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaRecoverParams) 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 -} - -// MarshalBinary interface implementation -func (m *UdaRecoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoverParams) UnmarshalBinary(b []byte) error { - var res UdaRecoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_restore_object.go b/v1/models/uda_restore_object.go deleted file mode 100644 index f05e4013..00000000 --- a/v1/models/uda_restore_object.go +++ /dev/null @@ -1,119 +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" -) - -// UdaRestoreObject uda restore object -// -// swagger:model UdaRestoreObject -type UdaRestoreObject struct { - - // Magneto Entity id. - // If this is set, object_name/object_uuid should be empty. - EntityID *int64 `json:"entityId,omitempty"` - - // The original name of the object to be restored. - ObjectName *string `json:"objectName,omitempty"` - - // The UUID of the object to be restored. - ObjectUUID *string `json:"objectUuid,omitempty"` - - // The specific params related to the object to be restored. - RestoreParams *UdaRestoreObjectParams `json:"restoreParams,omitempty"` -} - -// Validate validates this uda restore object -func (m *UdaRestoreObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRestoreObject) validateRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if m.RestoreParams != nil { - if err := m.RestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda restore object based on the context it is used -func (m *UdaRestoreObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRestoreObject) contextValidateRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreParams != nil { - - if swag.IsZero(m.RestoreParams) { // not required - return nil - } - - if err := m.RestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRestoreObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRestoreObject) UnmarshalBinary(b []byte) error { - var res UdaRestoreObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_restore_object_params.go b/v1/models/uda_restore_object_params.go deleted file mode 100644 index 9f77c9cf..00000000 --- a/v1/models/uda_restore_object_params.go +++ /dev/null @@ -1,59 +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" -) - -// UdaRestoreObjectParams Contains any additional parameters specific to the restore object. -// -// swagger:model UdaRestoreObjectParams -type UdaRestoreObjectParams struct { - - // The new name of the object, if it is going to be renamed. - NewObjectName *string `json:"newObjectName,omitempty"` - - // Whether to overwrite or keep the object if the object being recovered - // already exists in the destination. - Overwrite *bool `json:"overwrite,omitempty"` - - // The point-in-time to which object needs to be restored. This allows for - // the granular recovery of Uda objects. If this is not set, the Uda object - // will be restored to full/incremental snapshot. - RestoreTimeSecs *int64 `json:"restoreTimeSecs,omitempty"` -} - -// Validate validates this uda restore object params -func (m *UdaRestoreObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda restore object params based on context it is used -func (m *UdaRestoreObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRestoreObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRestoreObjectParams) UnmarshalBinary(b []byte) error { - var res UdaRestoreObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_s3_view_backup_properties.go b/v1/models/uda_s3_view_backup_properties.go deleted file mode 100644 index fb41e10d..00000000 --- a/v1/models/uda_s3_view_backup_properties.go +++ /dev/null @@ -1,119 +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" -) - -// UdaS3ViewBackupProperties // ----------------------------------------------------------------------------- -// -// swagger:model UdaS3ViewBackupProperties -type UdaS3ViewBackupProperties struct { - - // Access key for the buckets which will be created for the source initiated - // jobs. This needs to be passed to UDA for doing all s3 communications. - AccessKey *string `json:"accessKey,omitempty"` - - // For source initiated backup the target is s3 view. This captures the - // configuration needed to create the s3 view. - S3Config *S3BucketConfigProto `json:"s3Config,omitempty"` - - // Secret key for the buckets will be created for the source initiated jobs. - // This secret key needed to be sent to UDA for writing data to our S3 - // views. - SecretKey *string `json:"secretKey,omitempty"` -} - -// Validate validates this uda s3 view backup properties -func (m *UdaS3ViewBackupProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateS3Config(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaS3ViewBackupProperties) validateS3Config(formats strfmt.Registry) error { - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if m.S3Config != nil { - if err := m.S3Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda s3 view backup properties based on the context it is used -func (m *UdaS3ViewBackupProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateS3Config(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaS3ViewBackupProperties) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Config != nil { - - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if err := m.S3Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaS3ViewBackupProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaS3ViewBackupProperties) UnmarshalBinary(b []byte) error { - var res UdaS3ViewBackupProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_source_capabilities.go b/v1/models/uda_source_capabilities.go deleted file mode 100644 index 8915bcc3..00000000 --- a/v1/models/uda_source_capabilities.go +++ /dev/null @@ -1,84 +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" -) - -// UdaSourceCapabilities uda source capabilities -// -// swagger:model UdaSourceCapabilities -type UdaSourceCapabilities struct { - - // auto log backup - AutoLogBackup *bool `json:"autoLogBackup,omitempty"` - - // Specifies whether the source supports the 'Dynamic Configuration' - // capability. - DynamicConfig *bool `json:"dynamicConfig,omitempty"` - - // Indicates if source has entity capability. - EntitySupport *bool `json:"entitySupport,omitempty"` - - // Specifies whether the source supports externally triggered log backups. - EtLogBackup *bool `json:"etLogBackup,omitempty"` - - // Only for sources in the cloud. A temporary external disk is provisoned in - // the cloud and mounted on the control node selected during - // backup / recovery for dump-sweep workflows that need a local disk to dump - // data. Prereq - non-mount, AGENT_ON_RIGEL. - ExternalDisks *bool `json:"externalDisks,omitempty"` - - // full backup - FullBackup *bool `json:"fullBackup,omitempty"` - - // incr backup - IncrBackup *bool `json:"incrBackup,omitempty"` - - // log backup - LogBackup *bool `json:"logBackup,omitempty"` - - // Whether the source supports restore of multiple objects. - MultiObjectRestore *bool `json:"multiObjectRestore,omitempty"` - - // Make a source call before actual start backup call. - PreBackupJobScript *bool `json:"preBackupJobScript,omitempty"` - - // resource throttling - ResourceThrottling *bool `json:"resourceThrottling,omitempty"` -} - -// Validate validates this uda source capabilities -func (m *UdaSourceCapabilities) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda source capabilities based on context it is used -func (m *UdaSourceCapabilities) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSourceCapabilities) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSourceCapabilities) UnmarshalBinary(b []byte) error { - var res UdaSourceCapabilities - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uda_throttling_params.go b/v1/models/uda_throttling_params.go deleted file mode 100644 index 293ac3fc..00000000 --- a/v1/models/uda_throttling_params.go +++ /dev/null @@ -1,60 +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" -) - -// UdaThrottlingParams Capture max resource limits to throttle UDA jobs. -// -// swagger:model UdaThrottlingParams -type UdaThrottlingParams struct { - - // Max source specific resource to use for any job on source. - // Total resource usage should not exceed this for all jobs on source. - MaxAnyjobResources *int32 `json:"maxAnyjobResources,omitempty"` - - // Max source specific resource to use for backup on source. - MaxBackupResources *int32 `json:"maxBackupResources,omitempty"` - - // Max source specific resource to use for log backup on source. - MaxLogBackupResources *int32 `json:"maxLogBackupResources,omitempty"` - - // Max source specific resource to use for restore on source. - MaxRestoreResources *int32 `json:"maxRestoreResources,omitempty"` -} - -// Validate validates this uda throttling params -func (m *UdaThrottlingParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda throttling params based on context it is used -func (m *UdaThrottlingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaThrottlingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaThrottlingParams) UnmarshalBinary(b []byte) error { - var res UdaThrottlingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/un_register_application_servers_parameters.go b/v1/models/un_register_application_servers_parameters.go deleted file mode 100644 index 9af0c0f7..00000000 --- a/v1/models/un_register_application_servers_parameters.go +++ /dev/null @@ -1,155 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UnRegisterApplicationServersParameters UnRegister Application Servers Parameters. -// -// Specifies the parameters required to unregister -// Application Servers running in a Protection Source. -// -// swagger:model UnRegisterApplicationServersParameters -type UnRegisterApplicationServersParameters struct { - - // Specifies the types of applications such as 'kSQL', 'kExchange', 'kAD' - // running on the Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - Applications []string `json:"applications"` -} - -// Validate validates this un register application servers parameters -func (m *UnRegisterApplicationServersParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var unRegisterApplicationServersParametersApplicationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - unRegisterApplicationServersParametersApplicationsItemsEnum = append(unRegisterApplicationServersParametersApplicationsItemsEnum, v) - } -} - -func (m *UnRegisterApplicationServersParameters) validateApplicationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, unRegisterApplicationServersParametersApplicationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *UnRegisterApplicationServersParameters) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - - // value enum - if err := m.validateApplicationsItemsEnum("applications"+"."+strconv.Itoa(i), "body", m.Applications[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this un register application servers parameters based on context it is used -func (m *UnRegisterApplicationServersParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UnRegisterApplicationServersParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnRegisterApplicationServersParameters) UnmarshalBinary(b []byte) error { - var res UnRegisterApplicationServersParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/universal_id.go b/v1/models/universal_id.go deleted file mode 100644 index 7d81be9d..00000000 --- a/v1/models/universal_id.go +++ /dev/null @@ -1,61 +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" -) - -// UniversalID Unique Global Id. -// -// Specifies an id for an object that is unique across Cohesity Clusters. -// The id is composite of all the ids listed below. -// -// swagger:model UniversalId -type UniversalID struct { - - // Specifies the Cohesity Cluster id where the object was created. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies an id for the Cohesity Cluster that is generated when - // a Cohesity Cluster is initially created. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies a unique id assigned to an object (such as a Job) - // by the Cohesity Cluster. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this universal Id -func (m *UniversalID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this universal Id based on context it is used -func (m *UniversalID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UniversalID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UniversalID) UnmarshalBinary(b []byte) error { - var res UniversalID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/universal_id_proto.go b/v1/models/universal_id_proto.go deleted file mode 100644 index 11d06088..00000000 --- a/v1/models/universal_id_proto.go +++ /dev/null @@ -1,56 +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" -) - -// UniversalIDProto universal Id proto -// -// swagger:model UniversalIdProto -type UniversalIDProto struct { - - // The id of the cluster at which the object was created. - ClusterID *int64 `json:"clusterId,omitempty"` - - // The incarnation id of the above cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // The object id - this is unique within the above cluster. - ObjectID *int64 `json:"objectId,omitempty"` -} - -// Validate validates this universal Id proto -func (m *UniversalIDProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this universal Id proto based on context it is used -func (m *UniversalIDProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UniversalIDProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UniversalIDProto) UnmarshalBinary(b []byte) error { - var res UniversalIDProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/unprotect_object_params.go b/v1/models/unprotect_object_params.go deleted file mode 100644 index 205fc88a..00000000 --- a/v1/models/unprotect_object_params.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" - "github.com/go-openapi/validate" -) - -// UnprotectObjectParams Unprotect Object Params. -// -// Specifies the parameters to unprotect an object. -// -// swagger:model UnprotectObjectParams -type UnprotectObjectParams struct { - - // Specifies whether to delete the snapshots of the Protection Object. - DeleteSnapshots *bool `json:"deleteSnapshots,omitempty"` - - // Specifies the id of the Protection Source to be unprotected. - // Required: true - ProtectionSourceID *int64 `json:"protectionSourceId"` - - // Specifies the id of the Rpo Policy from which to unprotect the object. - // Required: true - RpoPolicyID *string `json:"rpoPolicyId"` -} - -// Validate validates this unprotect object params -func (m *UnprotectObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpoPolicyID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnprotectObjectParams) validateProtectionSourceID(formats strfmt.Registry) error { - - if err := validate.Required("protectionSourceId", "body", m.ProtectionSourceID); err != nil { - return err - } - - return nil -} - -func (m *UnprotectObjectParams) validateRpoPolicyID(formats strfmt.Registry) error { - - if err := validate.Required("rpoPolicyId", "body", m.RpoPolicyID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this unprotect object params based on context it is used -func (m *UnprotectObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UnprotectObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnprotectObjectParams) UnmarshalBinary(b []byte) error { - var res UnprotectObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_antivirus_service_group_params.go b/v1/models/update_antivirus_service_group_params.go deleted file mode 100644 index 54eb4661..00000000 --- a/v1/models/update_antivirus_service_group_params.go +++ /dev/null @@ -1,162 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateAntivirusServiceGroupParams Specifies the configuration settings for update an Antivirus service group. -// -// swagger:model UpdateAntivirusServiceGroupParams -type UpdateAntivirusServiceGroupParams struct { - - // Specifies the Antivirus services for this provider. - AntivirusServices []*AntivirusServiceConfigParams `json:"antivirusServices"` - - // Specifies the description of the Antivirus service group. - Description *string `json:"description,omitempty"` - - // Specifies the Id of the Antivirus service group. - // Required: true - ID *int64 `json:"id"` - - // Specifies whether the antivirus service group is enabled or not. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies the name of the Antivirus service group. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this update antivirus service group params -func (m *UpdateAntivirusServiceGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateAntivirusServiceGroupParams) validateAntivirusServices(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusServices) { // not required - return nil - } - - for i := 0; i < len(m.AntivirusServices); i++ { - if swag.IsZero(m.AntivirusServices[i]) { // not required - continue - } - - if m.AntivirusServices[i] != nil { - if err := m.AntivirusServices[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateAntivirusServiceGroupParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *UpdateAntivirusServiceGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update antivirus service group params based on the context it is used -func (m *UpdateAntivirusServiceGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAntivirusServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateAntivirusServiceGroupParams) contextValidateAntivirusServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AntivirusServices); i++ { - - if m.AntivirusServices[i] != nil { - - if swag.IsZero(m.AntivirusServices[i]) { // not required - return nil - } - - if err := m.AntivirusServices[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateAntivirusServiceGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateAntivirusServiceGroupParams) UnmarshalBinary(b []byte) error { - var res UpdateAntivirusServiceGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_api_key_params.go b/v1/models/update_api_key_params.go deleted file mode 100644 index 1044b8dd..00000000 --- a/v1/models/update_api_key_params.go +++ /dev/null @@ -1,80 +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" -) - -// UpdateAPIKeyParams Parameters to update an API key. -// -// Specifies the parameters to update an API key. -// -// swagger:model UpdateApiKeyParams -type UpdateAPIKeyParams struct { - - // Specifies a time stamp when the API key will expire in milli seconds. - ExpiringTimeMsecs *int64 `json:"expiringTimeMsecs,omitempty"` - - // Specifies if the API key is active. Only an active and not expired API key - // can be used for authentication. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies the name of API key. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this update Api key params -func (m *UpdateAPIKeyParams) 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 *UpdateAPIKeyParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update Api key params based on context it is used -func (m *UpdateAPIKeyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateAPIKeyParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateAPIKeyParams) UnmarshalBinary(b []byte) error { - var res UpdateAPIKeyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_app_instance_settings_parameters.go b/v1/models/update_app_instance_settings_parameters.go deleted file mode 100644 index a80870e2..00000000 --- a/v1/models/update_app_instance_settings_parameters.go +++ /dev/null @@ -1,114 +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" -) - -// UpdateAppInstanceSettingsParameters Update App Instance Settings Parameters. -// -// Specifies update app instance settings parameters. -// -// swagger:model UpdateAppInstanceSettingsParameters -type UpdateAppInstanceSettingsParameters struct { - - // Description of the app instance. - Description *string `json:"description,omitempty"` - - // Specifies the desired app instance settings. - Settings *AppInstanceSettings `json:"settings,omitempty"` -} - -// Validate validates this update app instance settings parameters -func (m *UpdateAppInstanceSettingsParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateAppInstanceSettingsParameters) validateSettings(formats strfmt.Registry) error { - if swag.IsZero(m.Settings) { // not required - return nil - } - - if m.Settings != nil { - if err := m.Settings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update app instance settings parameters based on the context it is used -func (m *UpdateAppInstanceSettingsParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateAppInstanceSettingsParameters) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.Settings != nil { - - if swag.IsZero(m.Settings) { // not required - return nil - } - - if err := m.Settings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("settings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("settings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateAppInstanceSettingsParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateAppInstanceSettingsParameters) UnmarshalBinary(b []byte) error { - var res UpdateAppInstanceSettingsParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_app_instance_state_parameters.go b/v1/models/update_app_instance_state_parameters.go deleted file mode 100644 index aa8bc6c2..00000000 --- a/v1/models/update_app_instance_state_parameters.go +++ /dev/null @@ -1,130 +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" -) - -// UpdateAppInstanceStateParameters Update App Instance State Parameters. -// -// Specifies update app instance state parameters. -// -// swagger:model UpdateAppInstanceStateParameters -type UpdateAppInstanceStateParameters struct { - - // Specifies the desired app instance state type. - // Specifies operational status of an app instance. - // kInitializing - The app instance has been launched or resumed, but is not fully running yet. - // kRunning - The app instance is running. Check health_status for the actual health. - // kPausing - The app instance is being paused. - // kPaused - The app instance has been paused. - // kTerminating - The app instance is being terminated. - // kTerminated - The app instance has been terminated. - // kFailed - The app instance has failed due to an unrecoverable error. - // Enum: ["kInitializing","kRunning","kPausing","kPaused","kTerminating","kTerminated","kFailed"] - State *string `json:"state,omitempty"` -} - -// Validate validates this update app instance state parameters -func (m *UpdateAppInstanceStateParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateAppInstanceStateParametersTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInitializing","kRunning","kPausing","kPaused","kTerminating","kTerminated","kFailed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateAppInstanceStateParametersTypeStatePropEnum = append(updateAppInstanceStateParametersTypeStatePropEnum, v) - } -} - -const ( - - // UpdateAppInstanceStateParametersStateKInitializing captures enum value "kInitializing" - UpdateAppInstanceStateParametersStateKInitializing string = "kInitializing" - - // UpdateAppInstanceStateParametersStateKRunning captures enum value "kRunning" - UpdateAppInstanceStateParametersStateKRunning string = "kRunning" - - // UpdateAppInstanceStateParametersStateKPausing captures enum value "kPausing" - UpdateAppInstanceStateParametersStateKPausing string = "kPausing" - - // UpdateAppInstanceStateParametersStateKPaused captures enum value "kPaused" - UpdateAppInstanceStateParametersStateKPaused string = "kPaused" - - // UpdateAppInstanceStateParametersStateKTerminating captures enum value "kTerminating" - UpdateAppInstanceStateParametersStateKTerminating string = "kTerminating" - - // UpdateAppInstanceStateParametersStateKTerminated captures enum value "kTerminated" - UpdateAppInstanceStateParametersStateKTerminated string = "kTerminated" - - // UpdateAppInstanceStateParametersStateKFailed captures enum value "kFailed" - UpdateAppInstanceStateParametersStateKFailed string = "kFailed" -) - -// prop value enum -func (m *UpdateAppInstanceStateParameters) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateAppInstanceStateParametersTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateAppInstanceStateParameters) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update app instance state parameters based on context it is used -func (m *UpdateAppInstanceStateParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateAppInstanceStateParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateAppInstanceStateParameters) UnmarshalBinary(b []byte) error { - var res UpdateAppInstanceStateParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_application_server_parameters.go b/v1/models/update_application_server_parameters.go deleted file mode 100644 index 2d7ac84e..00000000 --- a/v1/models/update_application_server_parameters.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateApplicationServerParameters Update Application Server Parameters. -// -// Specifies the parameters required to modify the parameters of previously -// registered Application Servers in a Protection Source. -// -// swagger:model UpdateApplicationServerParameters -type UpdateApplicationServerParameters struct { - - // Specifies the types of applications such as 'kSQL', 'kExchange', 'kAD' - // running on the Protection Source. - // overrideDescription: true - // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. - // NOTE: 'kPuppeteer' refers to Cohesity's Remote Adapter. - // 'kVMware' indicates the VMware Protection Source environment. - // 'kHyperV' indicates the HyperV Protection Source environment. - // 'kSQL' indicates the SQL Protection Source environment. - // 'kView' indicates the View Protection Source environment. - // 'kPuppeteer' indicates the Cohesity's Remote Adapter. - // 'kPhysical' indicates the physical Protection Source environment. - // 'kPure' indicates the Pure Storage Protection Source environment. - // 'kNimble' indicates the Nimble Storage Protection Source environment. - // 'kAzure' indicates the Microsoft's Azure Protection Source environment. - // 'kNetapp' indicates the Netapp Protection Source environment. - // 'kAgent' indicates the Agent Protection Source environment. - // 'kGenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'kAcropolis' indicates the Acropolis Protection Source environment. - // 'kPhysicalFiles' indicates the Physical Files Protection Source environment. - // 'kIbmFlashSystem' indicates the IBM Flash System Protection Source environment. - // 'kIsilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'kGPFS' indicates IBM's GPFS Protection Source environment. - // 'kKVM' indicates the KVM Protection Source environment. - // 'kAWS' indicates the AWS Protection Source environment. - // 'kExchange' indicates the Exchange Protection Source environment. - // 'kHyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'kOracle' indicates the Oracle Protection Source environment. - // 'kGCP' indicates the Google Cloud Platform Protection Source environment. - // 'kFlashBlade' indicates the Flash Blade Protection Source environment. - // 'kAWSNative' indicates the AWS Native Protection Source environment. - // 'kO365' indicates the Office 365 Protection Source environment. - // 'kO365Outlook' indicates Office 365 outlook Protection Source environment. - // 'kHyperFlex' indicates the Hyper Flex Protection Source environment. - // 'kGCPNative' indicates the GCP Native Protection Source environment. - // 'kAzureNative' indicates the Azure Native Protection Source environment. - // 'kKubernetes' indicates a Kubernetes Protection Source environment. - // 'kElastifile' indicates Elastifile Protection Source environment. - // 'kAD' indicates Active Directory Protection Source environment. - // 'kRDSSnapshotManager' indicates AWS RDS Protection Source environment. - // 'kCassandra' indicates Cassandra Protection Source environment. - // 'kMongoDB' indicates MongoDB Protection Source environment. - // 'kCouchbase' indicates Couchbase Protection Source environment. - // 'kHdfs' indicates Hdfs Protection Source environment. - // 'kHive' indicates Hive Protection Source environment. - // 'kHBase' indicates HBase Protection Source environment. - // 'kUDA' indicates Universal Data Adapter Protection Source environment. - // 'kO365Teams' indicates the Office365 Teams Protection Source environment. - // 'kO365Group' indicates the Office365 Groups Protection Source environment. - // 'kO365Exchange' indicates the Office365 Mailbox Protection Source environment. - // 'kO365OneDrive' indicates the Office365 OneDrive Protection Source environment. - // 'kO365Sharepoint' indicates the Office365 SharePoint Protection Source environment. - // 'kO365PublicFolders' indicates the Office365 PublicFolders Protection Source environment. - Applications []string `json:"applications"` - - // If set, user has encrypted the credential with 'user_ecryption_key'. - // It is assumed that credentials are first encrypted using - // internal magento key and then encrypted using user encryption key. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Set this to true if a persistent agent is running on the host. If this is - // specified, then credentials would not be used to log into the host - // environment. This mechanism may be used in environments such as VMware - // to get around UAC permission issues by running the agent as a service - // with the right credentials. If this field is not specified, credentials - // must be specified. - HasPersistentAgent *bool `json:"hasPersistentAgent,omitempty"` - - // Set to true if credentials are encrypted by internal magneto key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // Specifies the last time this Application Servers in a - // Protection Source was updated. If this is passed into a PUT request, - // then the backend will validate that the timestamp passed in matches the - // time that the Protection Source was - // actually last modified. If the two timestamps do not match, then the - // request will be rejected with a stale error. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies the Id of the Protection Source that contains one or more - // Application Servers running on it. - ProtectionSourceID *int64 `json:"protectionSourceId,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` -} - -// Validate validates this update application server parameters -func (m *UpdateApplicationServerParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateApplicationServerParametersApplicationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateApplicationServerParametersApplicationsItemsEnum = append(updateApplicationServerParametersApplicationsItemsEnum, v) - } -} - -func (m *UpdateApplicationServerParameters) validateApplicationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateApplicationServerParametersApplicationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateApplicationServerParameters) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - - // value enum - if err := m.validateApplicationsItemsEnum("applications"+"."+strconv.Itoa(i), "body", m.Applications[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this update application server parameters based on context it is used -func (m *UpdateApplicationServerParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateApplicationServerParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateApplicationServerParameters) UnmarshalBinary(b []byte) error { - var res UpdateApplicationServerParameters - 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 deleted file mode 100644 index 520d644b..00000000 --- a/v1/models/update_cluster_params.go +++ /dev/null @@ -1,625 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateClusterParams Update Cluster. -// -// Specifies the configuration settings that can be updated on the -// Cohesity Cluster. -// -// swagger:model UpdateClusterParams -type UpdateClusterParams struct { - - // Specifies the default AES Encryption mode on the cluster. - AesEncryptionMode *string `json:"aesEncryptionMode,omitempty"` - - // Specifies the AMQP target config. - AmqpTargetConfig *AMQPTargetConfig `json:"amqpTargetConfig,omitempty"` - - // The subnet for Athena apps. - AppsSubnet *Subnet `json:"appsSubnet,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. - BannerEnabled *bool `json:"bannerEnabled,omitempty"` - - // Cluster Audit Log Configuration. - ClusterAuditLogConfig *ClusterAuditLogConfiguration `json:"clusterAuditLogConfig,omitempty"` - - // Array of IP Addresses of DNS Servers. - // - // Specifies the IP addresses of the DNS Servers used by the Cohesity - // Cluster. - DNSServerIps []string `json:"dnsServerIps"` - - // Array of Domain Names. - // - // The first domain name specified in the array is the fully qualified - // domain name assigned to the Cohesity Cluster. Any additional - // domain names specified are used for the domain search list for - // hostname look-up. - DomainNames []string `json:"domainNames"` - - // Specifies if Cohesity can receive monitoring information from the - // Cohesity Cluster. - // If 'true', remote monitoring of the Cohesity Cluster is allowed. - EnableActiveMonitoring *bool `json:"enableActiveMonitoring,omitempty"` - - // Specifies whether to enable downloading patches from Cohesity download - // site. - EnablePatchesDownload *bool `json:"enablePatchesDownload,omitempty"` - - // If 'true', Cohesity's upgrade server is polled for new releases. - EnableUpgradePkgPolling *bool `json:"enableUpgradePkgPolling,omitempty"` - - // Specifies the period of time (in seconds) when encryption keys are rotated. - // By default, the encryption keys are rotated every 77760000 seconds - // (30 days). - EncryptionKeyRotationPeriodSecs *int64 `json:"encryptionKeyRotationPeriodSecs,omitempty"` - - // Specifies the level which 'MetadataFaultToleranceFactor' applies to. - // 'kNode' indicates 'MetadataFaultToleranceFactor' applies to Node level. - // 'kChassis' indicates 'MetadataFaultToleranceFactor' applies to Chassis - // level. - // 'kRack' indicates 'MetadataFaultToleranceFactor' applies to Rack level. - // Enum: ["kNode","kChassis","kRack"] - FaultToleranceLevel *string `json:"faultToleranceLevel,omitempty"` - - // Filer Audit Log Configuration. - FilerAuditLogConfig *FilerAuditLogConfiguration `json:"filerAuditLogConfig,omitempty"` - - // Specifies the gateway IP address. - Gateway *string `json:"gateway,omitempty"` - - // Specifies whether Google Analytics is enabled. - GoogleAnalyticsEnabled *bool `json:"googleAnalyticsEnabled,omitempty"` - - // Specifies what version of the documentation is used. - // If 'true', the version of documentation stored locally on the Cohesity - // Cluster is used. - // If 'false', the documentation stored on a Cohesity Web Server - // is used. The default is 'false'. - // Cohesity recommends accessing the Help from the Cohesity Web site which - // provides the newest and most complete version of Help. - IsDocumentationLocal *bool `json:"isDocumentationLocal,omitempty"` - - // Specifies the KMS Server Id. - // This can only be set when the encryption is enabled on cluster. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Specifies the language and locale for this Cohesity Cluster. - LanguageLocale *string `json:"languageLocale,omitempty"` - - // Domain name for SMB local authentication. - LocalAuthDomainName *string `json:"localAuthDomainName,omitempty"` - - // Specifies whether to enable local groups on cluster. Once it is enabled, - // it cannot be disabled. - LocalGroupsEnabled *bool `json:"localGroupsEnabled,omitempty"` - - // Specifies metadata fault tolerance setting for the cluster. This denotes - // the number of simultaneous failures[node] supported by metadata services - // like gandalf and scribe. - MetadataFaultToleranceFactor *int32 `json:"metadataFaultToleranceFactor,omitempty"` - - // Specifies if multi tenancy is enabled in the cluster. Authentication & - // Authorization will always use tenant_id, however, some UI elements may be - // disabled when multi tenancy is disabled. - MultiTenancyEnabled *bool `json:"multiTenancyEnabled,omitempty"` - - // Specifies the name of the Cohesity Cluster. - Name *string `json:"name,omitempty"` - - // Specifies if the ntp/primary secondary scheme should be disabled for this - // cluster. - NtpSettings *NtpSettingsConfig `json:"ntpSettings,omitempty"` - - // Specifies the rebalance delay in seconds for cluster PcieSSD storage tier. - PcieSsdTierRebalanceDelaySecs *int32 `json:"pcieSsdTierRebalanceDelaySecs,omitempty"` - - // Specifies if protorpc encryption is enabled or not. - ProtoRPCEncryptionEnabled *bool `json:"protoRpcEncryptionEnabled,omitempty"` - - // If 'true', Cohesity's Remote Tunnel is enabled. - // Cohesity can access the Cluster and provide remote assistance - // via a Remote Tunnel. - ReverseTunnelEnabled *bool `json:"reverseTunnelEnabled,omitempty"` - - // ReverseTunnelEndTimeMsecs specifies the end time in milliseconds since - // epoch until when the reverse tunnel will stay enabled. - ReverseTunnelEndTimeMsecs *int64 `json:"reverseTunnelEndTimeMsecs,omitempty"` - - // Specifies the list of domain names for S3 - // Virtual Hosted Style Paths. If set, all the Cohesity S3 Views in the - // cluster can be accessed using any of the specified domain names. - S3VirtualHostedDomainNames []string `json:"s3VirtualHostedDomainNames"` - - // Specifies the admission control for cluster SATAHDD storage tier. - SataHddTierAdmissionControl *int32 `json:"sataHddTierAdmissionControl,omitempty"` - - // Specifies if Security Mode DOD is enabled or not. - SecurityModeDod *bool `json:"securityModeDod,omitempty"` - - // Specifies if Active Directory should be disabled for authentication of SMB - // shares. If 'true', Active Directory is disabled. - SmbAdDisabled *bool `json:"smbAdDisabled,omitempty"` - - // Specifies whether SMB multichannel is enabled on the cluster. When this is - // set to true, then any SMB3 multichannel enabled client can establish - // multiple TCP connection per session to the Server. - SmbMultichannelEnabled *bool `json:"smbMultichannelEnabled,omitempty"` - - // TODO(mitch) StigMode is deprecated. Should it still be in this list?? - StigMode *bool `json:"stigMode,omitempty"` - - // Syslog servers. - SyslogServers []*OldSyslogServer `json:"syslogServers"` - - // In case multi tenancy is enabled, this flag controls whether multiple - // tenants can be placed on the same viewbox. Once set to true, this flag - // should never become false. - TenantViewboxSharingEnabled *bool `json:"tenantViewboxSharingEnabled,omitempty"` - - // Tiering Audit Log Configuration. - TieringAuditLogConfig *TieringAuditLogConfiguration `json:"tieringAuditLogConfig,omitempty"` - - // Specifies the timezone to use for showing time in emails, reports, - // filer audit logs, etc. - Timezone *string `json:"timezone,omitempty"` - - // Specifies if the cluster is in Turbo mode. - TurboMode *bool `json:"turboMode,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"` -} - -// Validate validates this update cluster params -func (m *UpdateClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAmqpTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppsSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFaultToleranceLevel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilerAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNtpSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyslogServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieringAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateClusterParams) validateAmqpTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AmqpTargetConfig) { // not required - return nil - } - - if m.AmqpTargetConfig != nil { - if err := m.AmqpTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amqpTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amqpTargetConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) validateAppsSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if m.AppsSubnet != nil { - if err := m.AppsSubnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) validateClusterAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if m.ClusterAuditLogConfig != nil { - if err := m.ClusterAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -var updateClusterParamsTypeFaultToleranceLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNode","kChassis","kRack"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateClusterParamsTypeFaultToleranceLevelPropEnum = append(updateClusterParamsTypeFaultToleranceLevelPropEnum, v) - } -} - -const ( - - // UpdateClusterParamsFaultToleranceLevelKNode captures enum value "kNode" - UpdateClusterParamsFaultToleranceLevelKNode string = "kNode" - - // UpdateClusterParamsFaultToleranceLevelKChassis captures enum value "kChassis" - UpdateClusterParamsFaultToleranceLevelKChassis string = "kChassis" - - // UpdateClusterParamsFaultToleranceLevelKRack captures enum value "kRack" - UpdateClusterParamsFaultToleranceLevelKRack string = "kRack" -) - -// prop value enum -func (m *UpdateClusterParams) validateFaultToleranceLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateClusterParamsTypeFaultToleranceLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateClusterParams) validateFaultToleranceLevel(formats strfmt.Registry) error { - if swag.IsZero(m.FaultToleranceLevel) { // not required - return nil - } - - // value enum - if err := m.validateFaultToleranceLevelEnum("faultToleranceLevel", "body", *m.FaultToleranceLevel); err != nil { - return err - } - - return nil -} - -func (m *UpdateClusterParams) validateFilerAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilerAuditLogConfig) { // not required - return nil - } - - if m.FilerAuditLogConfig != nil { - if err := m.FilerAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) validateNtpSettings(formats strfmt.Registry) error { - if swag.IsZero(m.NtpSettings) { // not required - return nil - } - - if m.NtpSettings != nil { - if err := m.NtpSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpSettings") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) validateSyslogServers(formats strfmt.Registry) error { - if swag.IsZero(m.SyslogServers) { // not required - return nil - } - - for i := 0; i < len(m.SyslogServers); i++ { - if swag.IsZero(m.SyslogServers[i]) { // not required - continue - } - - if m.SyslogServers[i] != nil { - if err := m.SyslogServers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterParams) validateTieringAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.TieringAuditLogConfig) { // not required - return nil - } - - if m.TieringAuditLogConfig != nil { - if err := m.TieringAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringAuditLogConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update cluster params based on the context it is used -func (m *UpdateClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAmqpTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppsSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilerAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNtpSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyslogServers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieringAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateClusterParams) contextValidateAmqpTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AmqpTargetConfig != nil { - - if swag.IsZero(m.AmqpTargetConfig) { // not required - return nil - } - - if err := m.AmqpTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amqpTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amqpTargetConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateAppsSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.AppsSubnet != nil { - - if swag.IsZero(m.AppsSubnet) { // not required - return nil - } - - if err := m.AppsSubnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appsSubnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appsSubnet") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateClusterAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterAuditLogConfig != nil { - - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if err := m.ClusterAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateFilerAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilerAuditLogConfig != nil { - - if swag.IsZero(m.FilerAuditLogConfig) { // not required - return nil - } - - if err := m.FilerAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateNtpSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.NtpSettings != nil { - - if swag.IsZero(m.NtpSettings) { // not required - return nil - } - - if err := m.NtpSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpSettings") - } - return err - } - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateSyslogServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SyslogServers); i++ { - - if m.SyslogServers[i] != nil { - - if swag.IsZero(m.SyslogServers[i]) { // not required - return nil - } - - if err := m.SyslogServers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterParams) contextValidateTieringAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringAuditLogConfig != nil { - - if swag.IsZero(m.TieringAuditLogConfig) { // not required - return nil - } - - if err := m.TieringAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringAuditLogConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateClusterParams) UnmarshalBinary(b []byte) error { - var res UpdateClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_dir_quota_args.go b/v1/models/update_dir_quota_args.go deleted file mode 100644 index a69e1cd4..00000000 --- a/v1/models/update_dir_quota_args.go +++ /dev/null @@ -1,118 +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" -) - -// UpdateDirQuotaArgs Update Directory Quota Policies Arguments. -// -// Specifies the arguments for updating the directory quota policies. This -// structure can be used for adding, updating and removing the policies. -// -// swagger:model UpdateDirQuotaArgs -type UpdateDirQuotaArgs struct { - - // Specifies directory quota to be disabled on the view. - DisableDirQuota *bool `json:"disableDirQuota,omitempty"` - - // Specifies a directory quota policy to be updated. - Quota *DirQuotaPolicy `json:"quota,omitempty"` - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this update dir quota args -func (m *UpdateDirQuotaArgs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQuota(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateDirQuotaArgs) validateQuota(formats strfmt.Registry) error { - if swag.IsZero(m.Quota) { // not required - return nil - } - - if m.Quota != nil { - if err := m.Quota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quota") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update dir quota args based on the context it is used -func (m *UpdateDirQuotaArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateDirQuotaArgs) contextValidateQuota(ctx context.Context, formats strfmt.Registry) error { - - if m.Quota != nil { - - if swag.IsZero(m.Quota) { // not required - return nil - } - - if err := m.Quota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quota") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateDirQuotaArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateDirQuotaArgs) UnmarshalBinary(b []byte) error { - var res UpdateDirQuotaArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_eula_config.go b/v1/models/update_eula_config.go deleted file mode 100644 index c2d53662..00000000 --- a/v1/models/update_eula_config.go +++ /dev/null @@ -1,52 +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" -) - -// UpdateEulaConfig Update EULA Version. -// -// Specifies the update to the End User License Agreement information. -// -// swagger:model UpdateEulaConfig -type UpdateEulaConfig struct { - - // Specifies the version of the End User License Agreement that was accepted. - SignedVersion *int64 `json:"signedVersion,omitempty"` -} - -// Validate validates this update eula config -func (m *UpdateEulaConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update eula config based on context it is used -func (m *UpdateEulaConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateEulaConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateEulaConfig) UnmarshalBinary(b []byte) error { - var res UpdateEulaConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_hydra_disk_reservation_param.go b/v1/models/update_hydra_disk_reservation_param.go deleted file mode 100644 index 45fb2e9e..00000000 --- a/v1/models/update_hydra_disk_reservation_param.go +++ /dev/null @@ -1,51 +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" -) - -// UpdateHydraDiskReservationParam UpdateHydraDiskReservationParam is the wrapper object to modify the disk -// reservation bytes for Hydra component. -// -// swagger:model UpdateHydraDiskReservationParam -type UpdateHydraDiskReservationParam struct { - - // HydraDiskReservationBytes is the reservation bytes for Hydra component. - HydraDiskReservationBytes *int64 `json:"hydraDiskReservationBytes,omitempty"` -} - -// Validate validates this update hydra disk reservation param -func (m *UpdateHydraDiskReservationParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update hydra disk reservation param based on context it is used -func (m *UpdateHydraDiskReservationParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateHydraDiskReservationParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateHydraDiskReservationParam) UnmarshalBinary(b []byte) error { - var res UpdateHydraDiskReservationParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_idp_configuration_request.go b/v1/models/update_idp_configuration_request.go deleted file mode 100644 index fbb1dc3e..00000000 --- a/v1/models/update_idp_configuration_request.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/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateIdpConfigurationRequest Update IdP Configuration Request. -// -// Specifies the parameters of an IdP configuration to be updated. -// -// swagger:model UpdateIdpConfigurationRequest -type UpdateIdpConfigurationRequest struct { - - // Specifies whether to allow local authentication. When IdP is configured, - // only IdP users are allowed to login to the Cluster. Local login is - // disabled except for users with admin role. If this flag is set to true, - // local (non-IdP) logins are allowed for all local and AD users. Local or - // AD users with admin role can login always independent of this flag's - // setting. - AllowLocalAuthentication *bool `json:"allowLocalAuthentication,omitempty"` - - // Specifies the certificate generated for the app by the IdP service when - // the Cluster is registered as an app. This is required to verify the - // SAML response. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the filename used to upload the certificate. - CertificateFilename *string `json:"certificateFilename,omitempty"` - - // Specifies a flag to enable or disable this IdP service. When it is set - // to true, IdP service is enabled. When it is set to false, IdP service - // is disabled. When an IdP service is created, it is set to true. - Enable *bool `json:"enable,omitempty"` - - // Specifies the IdP provided Issuer ID for the app. - // For example, exkh1aov1nhHrgFhN0h7. - IssuerID *string `json:"issuerId,omitempty"` - - // Specifies a list of roles assigned to an IdP user if samlAttributeName is - // not given. - Roles []string `json:"roles"` - - // Specifies the SAML attribute name that contains a comma separated list - // of Cluster roles. Either this field or roles must be set. This field - // takes higher precedence than the roles field. - SamlAttributeName *string `json:"samlAttributeName,omitempty"` - - // Specifies whether to sign the SAML request or not. When it is set - // to true, SAML request will be signed. When it is set to false, SAML - // request is not signed. Default is false. Set this flag to true if - // the IdP site is configured to expect the SAML request from the Cluster - // signed. If this is set to true, users must get the Cluster's certificate - // and upload it on the IdP site. - SignRequest *bool `json:"signRequest,omitempty"` - - // Specifies the SSO URL of the IdP service for the customer. This is the - // URL given by IdP when the customer created an account. Customers may use - // this for several clusters that are registered with on IdP site. - // For example, dev-332534.oktapreview.com - SsoURL *string `json:"ssoUrl,omitempty"` -} - -// Validate validates this update idp configuration request -func (m *UpdateIdpConfigurationRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update idp configuration request based on context it is used -func (m *UpdateIdpConfigurationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateIdpConfigurationRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateIdpConfigurationRequest) UnmarshalBinary(b []byte) error { - var res UpdateIdpConfigurationRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_ignored_trusted_domains_params.go b/v1/models/update_ignored_trusted_domains_params.go deleted file mode 100644 index 2c3abff7..00000000 --- a/v1/models/update_ignored_trusted_domains_params.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" -) - -// UpdateIgnoredTrustedDomainsParams Update Blacklisted Trusted Domain Request. -// -// Specifies the params to update the list of ignored trusted domains. -// -// swagger:model UpdateIgnoredTrustedDomainsParams -type UpdateIgnoredTrustedDomainsParams struct { - - // Specifies the list of trusted domains that were set by the user to be - // ignored during trusted domain discovery. - IgnoredTrustedDomains []string `json:"ignoredTrustedDomains"` -} - -// Validate validates this update ignored trusted domains params -func (m *UpdateIgnoredTrustedDomainsParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update ignored trusted domains params based on context it is used -func (m *UpdateIgnoredTrustedDomainsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateIgnoredTrustedDomainsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateIgnoredTrustedDomainsParams) UnmarshalBinary(b []byte) error { - var res UpdateIgnoredTrustedDomainsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_infected_file_params.go b/v1/models/update_infected_file_params.go deleted file mode 100644 index 3da80239..00000000 --- a/v1/models/update_infected_file_params.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateInfectedFileParams Specifies the parameters to update the infected files. -// -// swagger:model UpdateInfectedFileParams -type UpdateInfectedFileParams struct { - - // Specifies the list of infected file identifiers. - InfectedFileIds []*InfectedFileParam `json:"infectedFileIds"` - - // Specifies the remediation state of the file. Not setting any value to - // remediation state will reset the infected file. - // Remediation State. - // 'kQuarantine' indicates 'Quarantine' state of the file. This state blocks - // the client access. The administrator will have to manually delete, rescan or - // unquarantine the file. - // 'kUnquarantine' indicates 'Unquarantine' state of the file. - // The administrator has manually moved files from quarantined to the - // unquarantined state to allow client access. Unquarantined files are - // not scanned for virus until manually reset. - // Enum: ["kQuarantine","kUnquarantine"] - RemediationState *string `json:"remediationState,omitempty"` -} - -// Validate validates this update infected file params -func (m *UpdateInfectedFileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFileIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemediationState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFileParams) validateInfectedFileIds(formats strfmt.Registry) error { - if swag.IsZero(m.InfectedFileIds) { // not required - return nil - } - - for i := 0; i < len(m.InfectedFileIds); i++ { - if swag.IsZero(m.InfectedFileIds[i]) { // not required - continue - } - - if m.InfectedFileIds[i] != nil { - if err := m.InfectedFileIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var updateInfectedFileParamsTypeRemediationStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kQuarantine","kUnquarantine"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateInfectedFileParamsTypeRemediationStatePropEnum = append(updateInfectedFileParamsTypeRemediationStatePropEnum, v) - } -} - -const ( - - // UpdateInfectedFileParamsRemediationStateKQuarantine captures enum value "kQuarantine" - UpdateInfectedFileParamsRemediationStateKQuarantine string = "kQuarantine" - - // UpdateInfectedFileParamsRemediationStateKUnquarantine captures enum value "kUnquarantine" - UpdateInfectedFileParamsRemediationStateKUnquarantine string = "kUnquarantine" -) - -// prop value enum -func (m *UpdateInfectedFileParams) validateRemediationStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateInfectedFileParamsTypeRemediationStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateInfectedFileParams) validateRemediationState(formats strfmt.Registry) error { - if swag.IsZero(m.RemediationState) { // not required - return nil - } - - // value enum - if err := m.validateRemediationStateEnum("remediationState", "body", *m.RemediationState); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update infected file params based on the context it is used -func (m *UpdateInfectedFileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFileIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFileParams) contextValidateInfectedFileIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFileIds); i++ { - - if m.InfectedFileIds[i] != nil { - - if swag.IsZero(m.InfectedFileIds[i]) { // not required - return nil - } - - if err := m.InfectedFileIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFileIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateInfectedFileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateInfectedFileParams) UnmarshalBinary(b []byte) error { - var res UpdateInfectedFileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_infected_file_response.go b/v1/models/update_infected_file_response.go deleted file mode 100644 index 4d3ce306..00000000 --- a/v1/models/update_infected_file_response.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateInfectedFileResponse Specifies update infected files response. -// -// swagger:model UpdateInfectedFileResponse -type UpdateInfectedFileResponse struct { - - // Specifies the failed update infected files. - UpdateFailedInfectedFiles []*InfectedFileID `json:"updateFailedInfectedFiles"` - - // Specifies the successfully updated infected files. - UpdateSucceededInfectedFiles []*InfectedFileID `json:"updateSucceededInfectedFiles"` -} - -// Validate validates this update infected file response -func (m *UpdateInfectedFileResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUpdateFailedInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdateSucceededInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFileResponse) validateUpdateFailedInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateFailedInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.UpdateFailedInfectedFiles); i++ { - if swag.IsZero(m.UpdateFailedInfectedFiles[i]) { // not required - continue - } - - if m.UpdateFailedInfectedFiles[i] != nil { - if err := m.UpdateFailedInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateInfectedFileResponse) validateUpdateSucceededInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateSucceededInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.UpdateSucceededInfectedFiles); i++ { - if swag.IsZero(m.UpdateSucceededInfectedFiles[i]) { // not required - continue - } - - if m.UpdateSucceededInfectedFiles[i] != nil { - if err := m.UpdateSucceededInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update infected file response based on the context it is used -func (m *UpdateInfectedFileResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUpdateFailedInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdateSucceededInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFileResponse) contextValidateUpdateFailedInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateFailedInfectedFiles); i++ { - - if m.UpdateFailedInfectedFiles[i] != nil { - - if swag.IsZero(m.UpdateFailedInfectedFiles[i]) { // not required - return nil - } - - if err := m.UpdateFailedInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateInfectedFileResponse) contextValidateUpdateSucceededInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateSucceededInfectedFiles); i++ { - - if m.UpdateSucceededInfectedFiles[i] != nil { - - if swag.IsZero(m.UpdateSucceededInfectedFiles[i]) { // not required - return nil - } - - if err := m.UpdateSucceededInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateInfectedFileResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateInfectedFileResponse) UnmarshalBinary(b []byte) error { - var res UpdateInfectedFileResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_ldap_provider_param.go b/v1/models/update_ldap_provider_param.go deleted file mode 100644 index 2d44fee8..00000000 --- a/v1/models/update_ldap_provider_param.go +++ /dev/null @@ -1,170 +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" -) - -// UpdateLdapProviderParam Update LDAP Provider Parameters. -// -// Specifies the update LDAP provider params. -// -// swagger:model UpdateLdapProviderParam -type UpdateLdapProviderParam struct { - - // Specifies the domain name of an Active Directory which is mapped to this - // LDAP provider - AdDomainName *string `json:"adDomainName,omitempty"` - - // Name of the LDAP attribute used for common name of an object. - AttributeCommonName *string `json:"attributeCommonName,omitempty"` - - // Name of the attribute used to lookup unix GID of an LDAP user. - AttributeGid *string `json:"attributeGid,omitempty"` - - // Name of the LDAP attribute used to lookup members of a group. - AttributeMemberOf *string `json:"attributeMemberOf,omitempty"` - - // Name of the attribute used to lookup unix UID of an LDAP user. - AttributeUID *string `json:"attributeUid,omitempty"` - - // Name of the LDAP attribute used to lookup a user by user ID. - AttributeUserName *string `json:"attributeUserName,omitempty"` - - // Specifies the authentication type used while connecting to LDAP servers. - // Authentication level. - // 'kAnonymous' indicates LDAP authentication type 'Anonymous' - // 'kSimple' indicates LDAP authentication type 'Simple' - // Enum: ["kAnonymous","kSimple"] - AuthType *string `json:"authType,omitempty"` - - // Specifies the base distinguished name used as the base for LDAP - // search requests. - BaseDistinguishedName *string `json:"baseDistinguishedName,omitempty"` - - // Specifies the name of the domain name to be used for querying LDAP servers - // from DNS. If PreferredLdapServerList is set, then DomainName field is - // ignored. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the ID of the LDAP provider. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the LDAP provider. - Name *string `json:"name,omitempty"` - - // Name of the LDAP group object class for user accounts. - ObjectClassGroup *string `json:"objectClassGroup,omitempty"` - - // Name of the LDAP user object class for user accounts. - ObjectClassUser *string `json:"objectClassUser,omitempty"` - - // Specifies LDAP server port. - Port *int32 `json:"port,omitempty"` - - // Specifies the preferred LDAP servers. Server names should be either in - // fully qualified domain name (FQDN) format or IP addresses. - PreferredLdapServerList []string `json:"preferredLdapServerList"` - - // Specifies the unique id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether to use SSL for LDAP connections. - UseSsl *bool `json:"useSsl,omitempty"` - - // Specifies the user distinguished name that is used for LDAP authentication. - // It should be provided if the AuthType is set to either kSimple or kSasl. - UserDistinguishedName *string `json:"userDistinguishedName,omitempty"` - - // Specifies the user password that is used for LDAP authentication. - UserPassword *string `json:"userPassword,omitempty"` -} - -// Validate validates this update ldap provider param -func (m *UpdateLdapProviderParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateLdapProviderParamTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAnonymous","kSimple"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateLdapProviderParamTypeAuthTypePropEnum = append(updateLdapProviderParamTypeAuthTypePropEnum, v) - } -} - -const ( - - // UpdateLdapProviderParamAuthTypeKAnonymous captures enum value "kAnonymous" - UpdateLdapProviderParamAuthTypeKAnonymous string = "kAnonymous" - - // UpdateLdapProviderParamAuthTypeKSimple captures enum value "kSimple" - UpdateLdapProviderParamAuthTypeKSimple string = "kSimple" -) - -// prop value enum -func (m *UpdateLdapProviderParam) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateLdapProviderParamTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateLdapProviderParam) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update ldap provider param based on context it is used -func (m *UpdateLdapProviderParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateLdapProviderParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateLdapProviderParam) UnmarshalBinary(b []byte) error { - var res UpdateLdapProviderParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_ldap_provider_params.go b/v1/models/update_ldap_provider_params.go deleted file mode 100644 index 14eae096..00000000 --- a/v1/models/update_ldap_provider_params.go +++ /dev/null @@ -1,52 +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" -) - -// UpdateLdapProviderParams Update LDAP Provider Request. -// -// Specifies the params to update the LDAP provider info. -// -// swagger:model UpdateLdapProviderParams -type UpdateLdapProviderParams struct { - - // Specifies the LDAP provider id which is mapped to an Active Directory - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` -} - -// Validate validates this update ldap provider params -func (m *UpdateLdapProviderParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update ldap provider params based on context it is used -func (m *UpdateLdapProviderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateLdapProviderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateLdapProviderParams) UnmarshalBinary(b []byte) error { - var res UpdateLdapProviderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_linux_password_req_params.go b/v1/models/update_linux_password_req_params.go deleted file mode 100644 index d914ff4c..00000000 --- a/v1/models/update_linux_password_req_params.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" - "github.com/go-openapi/validate" -) - -// UpdateLinuxPasswordReqParams Update Linux Password Req Params. -// -// Specifies the user input parameters. -// -// swagger:model UpdateLinuxPasswordReqParams -type UpdateLinuxPasswordReqParams struct { - - // Specifies the current password. - LinuxCurrentPassword *string `json:"linuxCurrentPassword,omitempty"` - - // Specifies the new linux password. - // Required: true - LinuxPassword *string `json:"linuxPassword"` - - // Specifies the linux username for which the password will be updated. - // Required: true - LinuxUsername *string `json:"linuxUsername"` - - // True if request is only to verify if current password - // matches with set password. - VerifyPassword *bool `json:"verifyPassword,omitempty"` -} - -// Validate validates this update linux password req params -func (m *UpdateLinuxPasswordReqParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLinuxPassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinuxUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateLinuxPasswordReqParams) validateLinuxPassword(formats strfmt.Registry) error { - - if err := validate.Required("linuxPassword", "body", m.LinuxPassword); err != nil { - return err - } - - return nil -} - -func (m *UpdateLinuxPasswordReqParams) validateLinuxUsername(formats strfmt.Registry) error { - - if err := validate.Required("linuxUsername", "body", m.LinuxUsername); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update linux password req params based on context it is used -func (m *UpdateLinuxPasswordReqParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateLinuxPasswordReqParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateLinuxPasswordReqParams) UnmarshalBinary(b []byte) error { - var res UpdateLinuxPasswordReqParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_linux_password_result.go b/v1/models/update_linux_password_result.go deleted file mode 100644 index d78f6ab5..00000000 --- a/v1/models/update_linux_password_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" -) - -// UpdateLinuxPasswordResult Update Linux Password. -// -// Specifies the result returned after a successful request to update the -// linux password. -// -// swagger:model UpdateLinuxPasswordResult -type UpdateLinuxPasswordResult struct { - - // message - Message *string `json:"message,omitempty"` -} - -// Validate validates this update linux password result -func (m *UpdateLinuxPasswordResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update linux password result based on context it is used -func (m *UpdateLinuxPasswordResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateLinuxPasswordResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateLinuxPasswordResult) UnmarshalBinary(b []byte) error { - var res UpdateLinuxPasswordResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_machine_accounts_params.go b/v1/models/update_machine_accounts_params.go deleted file mode 100644 index 0dee0ec3..00000000 --- a/v1/models/update_machine_accounts_params.go +++ /dev/null @@ -1,66 +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" -) - -// UpdateMachineAccountsParams Update Machine Accounts Request. -// -// Specifies the parameters required to update the machine accounts of an -// active directory. -// -// swagger:model UpdateMachineAccountsParams -type UpdateMachineAccountsParams struct { - - // Array of Machine Accounts. - // - // Specifies an array of computer names used to identify the Cohesity - // Cluster on the domain. - MachineAccounts []string `json:"machineAccounts"` - - // Specifies whether the specified machine accounts should overwrite the - // existing machine accounts in this domain. - OverwriteExistingAccounts *bool `json:"overwriteExistingAccounts,omitempty"` - - // Specifies the password for the specified userName. - Password *string `json:"password,omitempty"` - - // Specifies a userName that has administrative privileges in the domain. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this update machine accounts params -func (m *UpdateMachineAccountsParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update machine accounts params based on context it is used -func (m *UpdateMachineAccountsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateMachineAccountsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateMachineAccountsParams) UnmarshalBinary(b []byte) error { - var res UpdateMachineAccountsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_notifications.go b/v1/models/update_notifications.go deleted file mode 100644 index 1d7b4a7e..00000000 --- a/v1/models/update_notifications.go +++ /dev/null @@ -1,56 +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" -) - -// UpdateNotifications Update Notification attributes. -// -// Specifies the list of notificationIds and the operation to be performed. -// -// swagger:model UpdateNotifications -type UpdateNotifications struct { - - // Specifies the operation to be performed on the resource. - // Eg. "action":"dismiss" - Action *string `json:"action,omitempty"` - - // Specifies the list of NotificationIds to be operated upon. - NotificationIds []string `json:"notificationIds"` -} - -// Validate validates this update notifications -func (m *UpdateNotifications) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update notifications based on context it is used -func (m *UpdateNotifications) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateNotifications) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateNotifications) UnmarshalBinary(b []byte) error { - var res UpdateNotifications - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_job_run.go b/v1/models/update_protection_job_run.go deleted file mode 100644 index ae1f9276..00000000 --- a/v1/models/update_protection_job_run.go +++ /dev/null @@ -1,188 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionJobRun Update Protection Job Run. -// -// Specifies a Job Run and the expiration time to update. The expiration -// time defines the retention period for the Job Run and its snapshots. -// -// swagger:model UpdateProtectionJobRun -type UpdateProtectionJobRun struct { - - // Specifies the retention for archival, replication or extended local - // retention. - CopyRunTargets []*RunJobSnapshotTarget `json:"copyRunTargets"` - - // job Uid - JobUID *UpdateProtectionJobRunJobUID `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). - // This uniquely identifies a snapshot. This parameter is required. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Specifies the run type of the selected job. - RunType *string `json:"runType,omitempty"` - - // Ids of the Protection Sources. If this is specified, retention time will - // only be updated for the sources specified. - SourceIds []int64 `json:"sourceIds"` -} - -// Validate validates this update protection job run -func (m *UpdateProtectionJobRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCopyRunTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionJobRun) validateCopyRunTargets(formats strfmt.Registry) error { - if swag.IsZero(m.CopyRunTargets) { // not required - return nil - } - - for i := 0; i < len(m.CopyRunTargets); i++ { - if swag.IsZero(m.CopyRunTargets[i]) { // not required - continue - } - - if m.CopyRunTargets[i] != nil { - if err := m.CopyRunTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionJobRun) validateJobUID(formats strfmt.Registry) error { - if swag.IsZero(m.JobUID) { // not required - 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 -} - -// ContextValidate validate this update protection job run based on the context it is used -func (m *UpdateProtectionJobRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCopyRunTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionJobRun) contextValidateCopyRunTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CopyRunTargets); i++ { - - if m.CopyRunTargets[i] != nil { - - if swag.IsZero(m.CopyRunTargets[i]) { // not required - return nil - } - - if err := m.CopyRunTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyRunTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionJobRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionJobRun) UnmarshalBinary(b []byte) error { - var res UpdateProtectionJobRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_job_runs_param.go b/v1/models/update_protection_job_runs_param.go deleted file mode 100644 index 54b1cfe7..00000000 --- a/v1/models/update_protection_job_runs_param.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionJobRunsParam Update Protection Job Runs Parameters. -// -// Specifies the Job Runs to update with a new expiration times. -// -// swagger:model UpdateProtectionJobRunsParam -type UpdateProtectionJobRunsParam struct { - - // Array of Job Runs. - // - // Specifies the Job Runs to update with a new expiration times. - JobRuns []*UpdateProtectionJobRun `json:"jobRuns"` -} - -// Validate validates this update protection job runs param -func (m *UpdateProtectionJobRunsParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionJobRunsParam) validateJobRuns(formats strfmt.Registry) error { - if swag.IsZero(m.JobRuns) { // not required - return nil - } - - for i := 0; i < len(m.JobRuns); i++ { - if swag.IsZero(m.JobRuns[i]) { // not required - continue - } - - if m.JobRuns[i] != nil { - if err := m.JobRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update protection job runs param based on the context it is used -func (m *UpdateProtectionJobRunsParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionJobRunsParam) contextValidateJobRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.JobRuns); i++ { - - if m.JobRuns[i] != nil { - - if swag.IsZero(m.JobRuns[i]) { // not required - return nil - } - - if err := m.JobRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionJobRunsParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionJobRunsParam) UnmarshalBinary(b []byte) error { - var res UpdateProtectionJobRunsParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_jobs_state.go b/v1/models/update_protection_jobs_state.go deleted file mode 100644 index e5bfdaae..00000000 --- a/v1/models/update_protection_jobs_state.go +++ /dev/null @@ -1,54 +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" -) - -// UpdateProtectionJobsState Specifies the response of updation of state of multiple Protection Jobs. -// -// swagger:model UpdateProtectionJobsState -type UpdateProtectionJobsState struct { - - // Specifies a list of Protection Job ids for which updation of state failed. - FailedJobIds []int64 `json:"failedJobIds"` - - // Specifies a list of Protection Job ids for which updation of state is - // successful. - SuccessfulJobIds []int64 `json:"successfulJobIds"` -} - -// Validate validates this update protection jobs state -func (m *UpdateProtectionJobsState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update protection jobs state based on context it is used -func (m *UpdateProtectionJobsState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionJobsState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionJobsState) UnmarshalBinary(b []byte) error { - var res UpdateProtectionJobsState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_jobs_state_request_body.go b/v1/models/update_protection_jobs_state_request_body.go deleted file mode 100644 index 436cb058..00000000 --- a/v1/models/update_protection_jobs_state_request_body.go +++ /dev/null @@ -1,121 +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" -) - -// UpdateProtectionJobsStateRequestBody Update state parameters of Protection Jobs. -// -// Specifies the parameters to perform an action of list of Protection Jobs. -// -// swagger:model UpdateProtectionJobsStateRequestBody -type UpdateProtectionJobsStateRequestBody struct { - - // Specifies the action to be performed on all the specified Protection Jobs. - // Specifies the type of action to be performed on Protection Job. - // 'kActivate' specifies that Protection Job should be activated. - // 'kDeactivate' specifies that Protection Job should be deactivated. - // 'kPause' specifies that Protection Job should be paused. - // 'kResume' specifies that Protection Job should be resumed. - // Enum: ["kActivate","kDeactivate","kPause","kResume"] - Action *string `json:"action,omitempty"` - - // Specifies a list of Protection Job ids for which the state should change. - JobIds []int64 `json:"jobIds"` -} - -// Validate validates this update protection jobs state request body -func (m *UpdateProtectionJobsStateRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateProtectionJobsStateRequestBodyTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kActivate","kDeactivate","kPause","kResume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateProtectionJobsStateRequestBodyTypeActionPropEnum = append(updateProtectionJobsStateRequestBodyTypeActionPropEnum, v) - } -} - -const ( - - // UpdateProtectionJobsStateRequestBodyActionKActivate captures enum value "kActivate" - UpdateProtectionJobsStateRequestBodyActionKActivate string = "kActivate" - - // UpdateProtectionJobsStateRequestBodyActionKDeactivate captures enum value "kDeactivate" - UpdateProtectionJobsStateRequestBodyActionKDeactivate string = "kDeactivate" - - // UpdateProtectionJobsStateRequestBodyActionKPause captures enum value "kPause" - UpdateProtectionJobsStateRequestBodyActionKPause string = "kPause" - - // UpdateProtectionJobsStateRequestBodyActionKResume captures enum value "kResume" - UpdateProtectionJobsStateRequestBodyActionKResume string = "kResume" -) - -// prop value enum -func (m *UpdateProtectionJobsStateRequestBody) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateProtectionJobsStateRequestBodyTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateProtectionJobsStateRequestBody) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update protection jobs state request body based on context it is used -func (m *UpdateProtectionJobsStateRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionJobsStateRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionJobsStateRequestBody) UnmarshalBinary(b []byte) error { - var res UpdateProtectionJobsStateRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_object_parameters.go b/v1/models/update_protection_object_parameters.go deleted file mode 100644 index 64e23b5e..00000000 --- a/v1/models/update_protection_object_parameters.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateProtectionObjectParameters Update Protection Object Parameters -// -// Specifies the parameters to update a Protection Object. -// -// swagger:model UpdateProtectionObjectParameters -type UpdateProtectionObjectParameters struct { - - // Specifies if the protection for the Protection Object is to be paused. - PauseBackup *bool `json:"pauseBackup,omitempty"` - - // Specifies the unique id of the Protected Source to be updated. - // Required: true - ProtectedSourceUID *UniversalID `json:"protectedSourceUid"` - - // Specifies the unique id of the new RPO policy to assign to the object. - RpoPolicyID *string `json:"rpoPolicyId,omitempty"` - - // Specifies the additional special settings for a Protected Source. - SourceParameters []*SourceSpecialParameter `json:"sourceParameters"` -} - -// Validate validates this update protection object parameters -func (m *UpdateProtectionObjectParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectedSourceUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionObjectParameters) validateProtectedSourceUID(formats strfmt.Registry) error { - - if err := validate.Required("protectedSourceUid", "body", m.ProtectedSourceUID); err != nil { - return err - } - - if m.ProtectedSourceUID != nil { - if err := m.ProtectedSourceUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourceUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourceUid") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionObjectParameters) validateSourceParameters(formats strfmt.Registry) error { - if swag.IsZero(m.SourceParameters) { // not required - return nil - } - - for i := 0; i < len(m.SourceParameters); i++ { - if swag.IsZero(m.SourceParameters[i]) { // not required - continue - } - - if m.SourceParameters[i] != nil { - if err := m.SourceParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update protection object parameters based on the context it is used -func (m *UpdateProtectionObjectParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectedSourceUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionObjectParameters) contextValidateProtectedSourceUID(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtectedSourceUID != nil { - - if err := m.ProtectedSourceUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedSourceUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedSourceUid") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionObjectParameters) contextValidateSourceParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceParameters); i++ { - - if m.SourceParameters[i] != nil { - - if swag.IsZero(m.SourceParameters[i]) { // not required - return nil - } - - if err := m.SourceParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionObjectParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionObjectParameters) UnmarshalBinary(b []byte) error { - var res UpdateProtectionObjectParameters - 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 deleted file mode 100644 index 4d184723..00000000 --- a/v1/models/update_protection_source_parameters.go +++ /dev/null @@ -1,1255 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateProtectionSourceParameters Update Protection Source Parameters. -// -// UpdateProtectionSourceParameters defines a public data definition -// for updating protection source. -// -// swagger:model UpdateProtectionSourceParameters -type UpdateProtectionSourceParameters struct { - - // Specifies if this source entity has enabled storage array snapshot or not. - IsStorageArraySnapshotEnabled *bool `json:"IsStorageArraySnapshotEnabled,omitempty"` - - // Specifies the agent endpoint if it is different from the source endpoint. - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be - // exclusively allowed for doing any type of IO operations. - AllowedIPAddresses []string `json:"allowedIpAddresses"` - - // AWS Source Credentials. - // - // Specifies credentials needed to authenticate with AWS Cloud Platform. - AwsCredentials *AwsCredentials `json:"awsCredentials,omitempty"` - - // Specifies information related to AWS fleets launched for various purposes. - // This will only be set for kIAMUser entity. - AwsFleetParams *AwsFleetPublicParams `json:"awsFleetParams,omitempty"` - - // Azure Source Credentials. - // - // Specifies credentials needed to authenticate with Azure Cloud Platform. - AzureCredentials *AzureCredentials `json:"azureCredentials,omitempty"` - - // This field is deprecated. Use DeniedIpAddresses instead. - // deprecated: true - BlacklistedIPAddresses []string `json:"blacklistedIpAddresses"` - - // Specifies information related to cluster. This is only valid for CE - // clusters. This is only populated for kIAMUser entity. - ClusterNetworkInfo *FleetNetworkParams `json:"clusterNetworkInfo,omitempty"` - - // Specifies the Bifrost realm to be associated with the source root. - // Whenever needed, the workflows related to this source would then - // only use Bifrosts from the specified realm. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the list of IP Addresses on the registered source to be denied - // for doing any type of IO operations. - DeniedIPAddresses []string `json:"deniedIpAddresses"` - - // Specifies the network endpoint of the Protection Source where it is - // reachable. It could be an URL or hostname or an IP address of the - // Protection Source. - Endpoint *string `json:"endpoint,omitempty"` - - // Specifies information about the preference order while choosing - // between which database copy of the exchange database which is part of - // DAG should be protected. - ExchangeDagProtectionPreference *ExchangeDAGProtectionPreference `json:"exchangeDagProtectionPreference,omitempty"` - - // ForceRegister is applicable to Physical Environment. By default, the agent - // running on a physical host will fail the registration, if it is already - // registered as part of another cluster. By setting this option to true, - // agent can be forced to register with the current cluster. This is a hidden - // parameter and should not be documented externally. - ForceRegister *bool `json:"forceRegister,omitempty"` - - // GCP Source Credentials. - // - // Specifies credentials needed to authenticate with Google Cloud Platform. - GcpCredentials *GcpCredentials `json:"gcpCredentials,omitempty"` - - // Specifies information related to GCP fleets launched for various purposes. - // This will only be set for kIAMUser entity. - GcpFleetParams *GcpFleetParams `json:"gcpFleetParams,omitempty"` - - // Specifies the optional OS type of the Protection Source (such as kWindows - // or kLinux). - // overrideDescription: true - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies if the physical host has to be registered as a proxy host. - IsProxyHost *bool `json:"isProxyHost,omitempty"` - - // Isilon Source params - // - // Specifies the registered protection source params for Isilon Source - IsilonParams *RegisteredProtectionSourceIsilonParams `json:"isilonParams,omitempty"` - - // Kubernetes Source Credentials. - // - // Specifies the credentials needed to authenticate a Kubernetes cluster. - KubernetesCredentials *KubernetesCredentials `json:"kubernetesCredentials,omitempty"` - - // Extra parameters needed for updating a K8s resource. - KubernetesParams *KubernetesParams `json:"kubernetesParams,omitempty"` - - // Specifies the minimum space in GB after which backup jobs will be canceled - // due to low space. - MinimumFreeSpaceGB *int64 `json:"minimumFreeSpaceGB,omitempty"` - - // nas mount credentials - NasMountCredentials *UpdateProtectionSourceParametersNasMountCredentials `json:"nasMountCredentials,omitempty"` - - // Office365 Source Credentials. - // - // Specifies credentials needed to authenticate & authorize user for - // Office365 using MS Graph APIs. - Office365CredentialsList []*Office365Credentials `json:"office365CredentialsList"` - - // Specifies the region for Office365. - Office365Region *string `json:"office365Region,omitempty"` - - // Office365 Service Account Credentials. - // - // Specifies credentials for improving mailbox backup performance for O365. - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - // Specifies password of the username to access the target source. - Password *string `json:"password,omitempty"` - - // Specifies the list of the protection source id of the windows physical - // host which will be used during the protection and recovery of the sites - // that belong to a office365 domain. - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - // ReRegister is applicable to Physical Environment. By default, the - // agent running on a physical host will fail the registration, if it is - // already registered with the cluster. By setting this option to true, agent - // can be re-registered with the current cluster. - ReRegister *bool `json:"reRegister,omitempty"` - - // RestoreConfig is applicable to Physical Environment. The ReRegister option - // needs to be true if RestoreConfig is true. By setting this option to true, - // the agent configuration can be restored. - RestoreConfig *bool `json:"restoreConfig,omitempty"` - - // This controls whether to use source side dedup on the source or not. - // This is only applicable to sources which support source side dedup - // (e.g., Linux physical servers). - SourceSideDedupEnabled *bool `json:"sourceSideDedupEnabled,omitempty"` - - // SSL verification parameter is applicable to VMware environment. It can be - // populated with the server's CA certificate or certificate chain and - // vCenter's certificate will be validated against this. - SslVerification *SslVerification `json:"sslVerification,omitempty"` - - // Specifies the list of subnet IP addresses and CIDR prefix for enabeling - // network data transfer. Currently, only Subnet IP and NetbaskBits are valid - // input fields. All other fields provided as input will be ignored. - Subnets []*Subnet `json:"subnets"` - - // throttling policy - ThrottlingPolicy *UpdateProtectionSourceParametersThrottlingPolicy `json:"throttlingPolicy,omitempty"` - - // Array of Throttling Policy Overrides for Datastores. - // - // Specifies a list of Throttling Policy for datastores that override the - // common throttling policy specified for the registered Protection Source. - // For datastores not in this list, common policy will still apply. - ThrottlingPolicyOverrides []*ThrottlingPolicyOverride `json:"throttlingPolicyOverrides"` - - // Specifies whether to use existing Office365 credentials like password and - // client secret for app id's. - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` - - // Specifies whether OAuth should be used for authentication in case of - // Exchange Online. - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - // Specifies username to access the target source. - Username *string `json:"username,omitempty"` - - // Specifies the VLAN parameters to be used while taking the backup of this - // entity and is the preferred selection for restoring the same. - // For restores, the VLAN parameters specifed here can be overridden. - // Currently, this is only applicable for Physical hosts running Oracle. - VlanParams *VlanParameters `json:"vlanParams,omitempty"` -} - -// Validate validates this update protection source parameters -func (m *UpdateProtectionSourceParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterNetworkInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeDagProtectionPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpFleetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasMountCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365CredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365ServiceAccountCredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSslVerification(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingPolicyOverrides(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionSourceParameters) validateAwsCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if m.AwsCredentials != nil { - if err := m.AwsCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateAwsFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if m.AwsFleetParams != nil { - if err := m.AwsFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateAzureCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if m.AzureCredentials != nil { - if err := m.AzureCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateClusterNetworkInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if m.ClusterNetworkInfo != nil { - if err := m.ClusterNetworkInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateExchangeDagProtectionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if m.ExchangeDagProtectionPreference != nil { - if err := m.ExchangeDagProtectionPreference.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateGcpCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if m.GcpCredentials != nil { - if err := m.GcpCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateGcpFleetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if m.GcpFleetParams != nil { - if err := m.GcpFleetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -var updateProtectionSourceParametersTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateProtectionSourceParametersTypeHostTypePropEnum = append(updateProtectionSourceParametersTypeHostTypePropEnum, v) - } -} - -const ( - - // UpdateProtectionSourceParametersHostTypeKLinux captures enum value "kLinux" - UpdateProtectionSourceParametersHostTypeKLinux string = "kLinux" - - // UpdateProtectionSourceParametersHostTypeKWindows captures enum value "kWindows" - UpdateProtectionSourceParametersHostTypeKWindows string = "kWindows" - - // UpdateProtectionSourceParametersHostTypeKAix captures enum value "kAix" - UpdateProtectionSourceParametersHostTypeKAix string = "kAix" - - // UpdateProtectionSourceParametersHostTypeKSolaris captures enum value "kSolaris" - UpdateProtectionSourceParametersHostTypeKSolaris string = "kSolaris" - - // UpdateProtectionSourceParametersHostTypeKSapHana captures enum value "kSapHana" - UpdateProtectionSourceParametersHostTypeKSapHana string = "kSapHana" - - // UpdateProtectionSourceParametersHostTypeKSapOracle captures enum value "kSapOracle" - UpdateProtectionSourceParametersHostTypeKSapOracle string = "kSapOracle" - - // UpdateProtectionSourceParametersHostTypeKCockroachDB captures enum value "kCockroachDB" - UpdateProtectionSourceParametersHostTypeKCockroachDB string = "kCockroachDB" - - // UpdateProtectionSourceParametersHostTypeKMySQL captures enum value "kMySQL" - UpdateProtectionSourceParametersHostTypeKMySQL string = "kMySQL" - - // UpdateProtectionSourceParametersHostTypeKOther captures enum value "kOther" - UpdateProtectionSourceParametersHostTypeKOther string = "kOther" - - // UpdateProtectionSourceParametersHostTypeKSapSybase captures enum value "kSapSybase" - UpdateProtectionSourceParametersHostTypeKSapSybase string = "kSapSybase" - - // UpdateProtectionSourceParametersHostTypeKSapMaxDB captures enum value "kSapMaxDB" - UpdateProtectionSourceParametersHostTypeKSapMaxDB string = "kSapMaxDB" - - // UpdateProtectionSourceParametersHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - UpdateProtectionSourceParametersHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // UpdateProtectionSourceParametersHostTypeKDB2 captures enum value "kDB2" - UpdateProtectionSourceParametersHostTypeKDB2 string = "kDB2" - - // UpdateProtectionSourceParametersHostTypeKSapASE captures enum value "kSapASE" - UpdateProtectionSourceParametersHostTypeKSapASE string = "kSapASE" - - // UpdateProtectionSourceParametersHostTypeKMariaDB captures enum value "kMariaDB" - UpdateProtectionSourceParametersHostTypeKMariaDB string = "kMariaDB" - - // UpdateProtectionSourceParametersHostTypeKPostgreSQL captures enum value "kPostgreSQL" - UpdateProtectionSourceParametersHostTypeKPostgreSQL string = "kPostgreSQL" - - // UpdateProtectionSourceParametersHostTypeKVOS captures enum value "kVOS" - UpdateProtectionSourceParametersHostTypeKVOS string = "kVOS" - - // UpdateProtectionSourceParametersHostTypeKHPUX captures enum value "kHPUX" - UpdateProtectionSourceParametersHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *UpdateProtectionSourceParameters) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateProtectionSourceParametersTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateProtectionSourceParameters) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateKubernetesCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesCredentials) { // not required - return nil - } - - if m.KubernetesCredentials != nil { - if err := m.KubernetesCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateKubernetesParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateNasMountCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.NasMountCredentials) { // not required - 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 -} - -func (m *UpdateProtectionSourceParameters) validateOffice365CredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365CredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365CredentialsList); i++ { - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - continue - } - - if m.Office365CredentialsList[i] != nil { - if err := m.Office365CredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateOffice365ServiceAccountCredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Office365ServiceAccountCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - continue - } - - if m.Office365ServiceAccountCredentialsList[i] != nil { - if err := m.Office365ServiceAccountCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateSslVerification(formats strfmt.Registry) error { - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if m.SslVerification != nil { - if err := m.SslVerification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateSubnets(formats strfmt.Registry) error { - if swag.IsZero(m.Subnets) { // not required - return nil - } - - for i := 0; i < len(m.Subnets); i++ { - if swag.IsZero(m.Subnets[i]) { // not required - continue - } - - if m.Subnets[i] != nil { - if err := m.Subnets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateThrottlingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicy) { // not required - 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 -} - -func (m *UpdateProtectionSourceParameters) validateThrottlingPolicyOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingPolicyOverrides) { // not required - return nil - } - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - continue - } - - if m.ThrottlingPolicyOverrides[i] != nil { - if err := m.ThrottlingPolicyOverrides[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update protection source parameters based on the context it is used -func (m *UpdateProtectionSourceParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterNetworkInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeDagProtectionPreference(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpFleetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasMountCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365CredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365ServiceAccountCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSslVerification(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingPolicyOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateAwsCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCredentials != nil { - - if swag.IsZero(m.AwsCredentials) { // not required - return nil - } - - if err := m.AwsCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateAwsFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetParams != nil { - - if swag.IsZero(m.AwsFleetParams) { // not required - return nil - } - - if err := m.AwsFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateAzureCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureCredentials != nil { - - if swag.IsZero(m.AzureCredentials) { // not required - return nil - } - - if err := m.AzureCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateClusterNetworkInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterNetworkInfo != nil { - - if swag.IsZero(m.ClusterNetworkInfo) { // not required - return nil - } - - if err := m.ClusterNetworkInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterNetworkInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterNetworkInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateExchangeDagProtectionPreference(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeDagProtectionPreference != nil { - - if swag.IsZero(m.ExchangeDagProtectionPreference) { // not required - return nil - } - - if err := m.ExchangeDagProtectionPreference.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeDagProtectionPreference") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeDagProtectionPreference") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateGcpCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpCredentials != nil { - - if swag.IsZero(m.GcpCredentials) { // not required - return nil - } - - if err := m.GcpCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateGcpFleetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpFleetParams != nil { - - if swag.IsZero(m.GcpFleetParams) { // not required - return nil - } - - if err := m.GcpFleetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpFleetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpFleetParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateKubernetesCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesCredentials != nil { - - if swag.IsZero(m.KubernetesCredentials) { // not required - return nil - } - - if err := m.KubernetesCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesCredentials") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -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 -} - -func (m *UpdateProtectionSourceParameters) contextValidateOffice365CredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365CredentialsList); i++ { - - if m.Office365CredentialsList[i] != nil { - - if swag.IsZero(m.Office365CredentialsList[i]) { // not required - return nil - } - - if err := m.Office365CredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365CredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateOffice365ServiceAccountCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - - if m.Office365ServiceAccountCredentialsList[i] != nil { - - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - return nil - } - - if err := m.Office365ServiceAccountCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateSslVerification(ctx context.Context, formats strfmt.Registry) error { - - if m.SslVerification != nil { - - if swag.IsZero(m.SslVerification) { // not required - return nil - } - - if err := m.SslVerification.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sslVerification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sslVerification") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateSubnets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Subnets); i++ { - - if m.Subnets[i] != nil { - - if swag.IsZero(m.Subnets[i]) { // not required - return nil - } - - if err := m.Subnets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -func (m *UpdateProtectionSourceParameters) contextValidateThrottlingPolicyOverrides(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ThrottlingPolicyOverrides); i++ { - - if m.ThrottlingPolicyOverrides[i] != nil { - - if swag.IsZero(m.ThrottlingPolicyOverrides[i]) { // not required - return nil - } - - if err := m.ThrottlingPolicyOverrides[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicyOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateProtectionSourceParameters) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionSourceParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionSourceParameters) UnmarshalBinary(b []byte) error { - var res UpdateProtectionSourceParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_resolution_params.go b/v1/models/update_resolution_params.go deleted file mode 100644 index b7b5dfac..00000000 --- a/v1/models/update_resolution_params.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" -) - -// UpdateResolutionParams Update Alert Resolution Request. -// -// Apply an existing Resolution to a new list of Alerts, which are specified by -// Alert Ids. -// -// swagger:model UpdateResolutionParams -type UpdateResolutionParams struct { - - // Specifies the Alerts to resolve, which are specified by Alert Ids. - AlertIDList []string `json:"alertIdList"` -} - -// Validate validates this update resolution params -func (m *UpdateResolutionParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update resolution params based on context it is used -func (m *UpdateResolutionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateResolutionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateResolutionParams) UnmarshalBinary(b []byte) error { - var res UpdateResolutionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_restore_task_options.go b/v1/models/update_restore_task_options.go deleted file mode 100644 index 9e34c29d..00000000 --- a/v1/models/update_restore_task_options.go +++ /dev/null @@ -1,172 +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" -) - -// UpdateRestoreTaskOptions Refer UpdateRestoreTaskOptions message in /magneto/base/magneto.proto -// -// UpdateRestoreTaskOptions holds the common information needed for updating -// a restore task. -// -// swagger:model UpdateRestoreTaskOptions -type UpdateRestoreTaskOptions struct { - - // Specifies generic options to update the restore task. - MultiStageFinalizeParams *MultiStageRestoreFinalizeActionParams `json:"multiStageFinalizeParams,omitempty"` - - // Specifies the multi-stage options to update the Restore Task with. - // Specifies the action type of multi stage restore. - // - // 'kCreate' specifies the create action for a restore. - // 'kUpdate' specifies the user action to update an ongoing restore. - // 'kFinalize' specifies the user action to finalize a restore. - // Enum: ["kCreate","kUpdate","kFinalize"] - MultiStageRestoreAction *string `json:"multiStageRestoreAction,omitempty"` -} - -// Validate validates this update restore task options -func (m *UpdateRestoreTaskOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMultiStageFinalizeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMultiStageRestoreAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRestoreTaskOptions) validateMultiStageFinalizeParams(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageFinalizeParams) { // not required - return nil - } - - if m.MultiStageFinalizeParams != nil { - if err := m.MultiStageFinalizeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageFinalizeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageFinalizeParams") - } - return err - } - } - - return nil -} - -var updateRestoreTaskOptionsTypeMultiStageRestoreActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCreate","kUpdate","kFinalize"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateRestoreTaskOptionsTypeMultiStageRestoreActionPropEnum = append(updateRestoreTaskOptionsTypeMultiStageRestoreActionPropEnum, v) - } -} - -const ( - - // UpdateRestoreTaskOptionsMultiStageRestoreActionKCreate captures enum value "kCreate" - UpdateRestoreTaskOptionsMultiStageRestoreActionKCreate string = "kCreate" - - // UpdateRestoreTaskOptionsMultiStageRestoreActionKUpdate captures enum value "kUpdate" - UpdateRestoreTaskOptionsMultiStageRestoreActionKUpdate string = "kUpdate" - - // UpdateRestoreTaskOptionsMultiStageRestoreActionKFinalize captures enum value "kFinalize" - UpdateRestoreTaskOptionsMultiStageRestoreActionKFinalize string = "kFinalize" -) - -// prop value enum -func (m *UpdateRestoreTaskOptions) validateMultiStageRestoreActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateRestoreTaskOptionsTypeMultiStageRestoreActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateRestoreTaskOptions) validateMultiStageRestoreAction(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageRestoreAction) { // not required - return nil - } - - // value enum - if err := m.validateMultiStageRestoreActionEnum("multiStageRestoreAction", "body", *m.MultiStageRestoreAction); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update restore task options based on the context it is used -func (m *UpdateRestoreTaskOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMultiStageFinalizeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRestoreTaskOptions) contextValidateMultiStageFinalizeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MultiStageFinalizeParams != nil { - - if swag.IsZero(m.MultiStageFinalizeParams) { // not required - return nil - } - - if err := m.MultiStageFinalizeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageFinalizeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageFinalizeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRestoreTaskOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRestoreTaskOptions) UnmarshalBinary(b []byte) error { - var res UpdateRestoreTaskOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_restore_task_params.go b/v1/models/update_restore_task_params.go deleted file mode 100644 index 1bf9b138..00000000 --- a/v1/models/update_restore_task_params.go +++ /dev/null @@ -1,282 +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" -) - -// UpdateRestoreTaskParams UpdateRestoreTaskParams holds the information to update a Restore Task in -// Magneto. -// -// swagger:model UpdateRestoreTaskParams -type UpdateRestoreTaskParams struct { - - // Specifies the Active Directory options to update the Restore Task with. - AdOptions *AdRestoreOptions `json:"adOptions,omitempty"` - - // Specifies the ID of the child restore tasks of 'RestoreTaskId' to which - // the update is meant. - ChildRestoreTaskIds []int64 `json:"childRestoreTaskIds"` - - // Enables Auto Sync feature for SQL Multi-stage Restore task. - EnableAutoSync *bool `json:"enableAutoSync,omitempty"` - - // Specifies generic options to update the restore task. - Options *UpdateRestoreTaskOptions `json:"options,omitempty"` - - // Specifies the oracle options to update the Restore Task with. - OracleOptions *OracleUpdateRestoreTaskOptions `json:"oracleOptions,omitempty"` - - // Specifies the ID of the existing Restore Task to update. - RestoreTaskID *int64 `json:"restoreTaskId,omitempty"` - - // Specifies the sql options to update the Restore Task with. - // Specifies the action type of multi stage SQL restore. - // - // 'kCreate' specifies the create action for a restore. - // 'kUpdate' specifies the user action to update an ongoing restore. - // 'kFinalize' specifies the user action to finalize a restore. - // Enum: ["kCreate","kUpdate","kFinalize"] - SQLOptions *string `json:"sqlOptions,omitempty"` -} - -// Validate validates this update restore task params -func (m *UpdateRestoreTaskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRestoreTaskParams) validateAdOptions(formats strfmt.Registry) error { - if swag.IsZero(m.AdOptions) { // not required - return nil - } - - if m.AdOptions != nil { - if err := m.AdOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adOptions") - } - return err - } - } - - return nil -} - -func (m *UpdateRestoreTaskParams) validateOptions(formats strfmt.Registry) error { - if swag.IsZero(m.Options) { // not required - return nil - } - - if m.Options != nil { - if err := m.Options.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("options") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("options") - } - return err - } - } - - return nil -} - -func (m *UpdateRestoreTaskParams) validateOracleOptions(formats strfmt.Registry) error { - if swag.IsZero(m.OracleOptions) { // not required - return nil - } - - if m.OracleOptions != nil { - if err := m.OracleOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleOptions") - } - return err - } - } - - return nil -} - -var updateRestoreTaskParamsTypeSQLOptionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCreate","kUpdate","kFinalize"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateRestoreTaskParamsTypeSQLOptionsPropEnum = append(updateRestoreTaskParamsTypeSQLOptionsPropEnum, v) - } -} - -const ( - - // UpdateRestoreTaskParamsSQLOptionsKCreate captures enum value "kCreate" - UpdateRestoreTaskParamsSQLOptionsKCreate string = "kCreate" - - // UpdateRestoreTaskParamsSQLOptionsKUpdate captures enum value "kUpdate" - UpdateRestoreTaskParamsSQLOptionsKUpdate string = "kUpdate" - - // UpdateRestoreTaskParamsSQLOptionsKFinalize captures enum value "kFinalize" - UpdateRestoreTaskParamsSQLOptionsKFinalize string = "kFinalize" -) - -// prop value enum -func (m *UpdateRestoreTaskParams) validateSQLOptionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateRestoreTaskParamsTypeSQLOptionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateRestoreTaskParams) validateSQLOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SQLOptions) { // not required - return nil - } - - // value enum - if err := m.validateSQLOptionsEnum("sqlOptions", "body", *m.SQLOptions); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update restore task params based on the context it is used -func (m *UpdateRestoreTaskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRestoreTaskParams) contextValidateAdOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.AdOptions != nil { - - if swag.IsZero(m.AdOptions) { // not required - return nil - } - - if err := m.AdOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adOptions") - } - return err - } - } - - return nil -} - -func (m *UpdateRestoreTaskParams) contextValidateOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.Options != nil { - - if swag.IsZero(m.Options) { // not required - return nil - } - - if err := m.Options.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("options") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("options") - } - return err - } - } - - return nil -} - -func (m *UpdateRestoreTaskParams) contextValidateOracleOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleOptions != nil { - - if swag.IsZero(m.OracleOptions) { // not required - return nil - } - - if err := m.OracleOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRestoreTaskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRestoreTaskParams) UnmarshalBinary(b []byte) error { - var res UpdateRestoreTaskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_sources_for_principals_params.go b/v1/models/update_sources_for_principals_params.go deleted file mode 100644 index 05a2af9d..00000000 --- a/v1/models/update_sources_for_principals_params.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateSourcesForPrincipalsParams Update Sources for Principal Parameters. -// -// Set Access Permissions for Principals. -// Specifies a list of principals to set access permissions for. -// For each principal, set the Protection Sources and View names -// that the specified principal has permissions to access. -// -// swagger:model UpdateSourcesForPrincipalsParams -type UpdateSourcesForPrincipalsParams struct { - - // Array of Principals, Sources and Views. - // - // Specifies a list of principals. For each principal, specify - // the Protection Sources and Views that the principal has - // permissions to access. - SourcesForPrincipals []*SourceForPrincipalParam `json:"sourcesForPrincipals"` -} - -// Validate validates this update sources for principals params -func (m *UpdateSourcesForPrincipalsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourcesForPrincipals(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateSourcesForPrincipalsParams) validateSourcesForPrincipals(formats strfmt.Registry) error { - if swag.IsZero(m.SourcesForPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SourcesForPrincipals); i++ { - if swag.IsZero(m.SourcesForPrincipals[i]) { // not required - continue - } - - if m.SourcesForPrincipals[i] != nil { - if err := m.SourcesForPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourcesForPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourcesForPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update sources for principals params based on the context it is used -func (m *UpdateSourcesForPrincipalsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourcesForPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateSourcesForPrincipalsParams) contextValidateSourcesForPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourcesForPrincipals); i++ { - - if m.SourcesForPrincipals[i] != nil { - - if swag.IsZero(m.SourcesForPrincipals[i]) { // not required - return nil - } - - if err := m.SourcesForPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourcesForPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourcesForPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateSourcesForPrincipalsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateSourcesForPrincipalsParams) UnmarshalBinary(b []byte) error { - var res UpdateSourcesForPrincipalsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_trusted_domain_enable_params.go b/v1/models/update_trusted_domain_enable_params.go deleted file mode 100644 index 9d67e4aa..00000000 --- a/v1/models/update_trusted_domain_enable_params.go +++ /dev/null @@ -1,52 +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" -) - -// UpdateTrustedDomainEnableParams Update trusted domain enable flag request. -// -// Specifies the params to update trusted domain enable flag. -// -// swagger:model UpdateTrustedDomainEnableParams -type UpdateTrustedDomainEnableParams struct { - - // Request to update enable trusted domains state of an Active Directory. - TrustedDomainsEnabled *bool `json:"trustedDomainsEnabled,omitempty"` -} - -// Validate validates this update trusted domain enable params -func (m *UpdateTrustedDomainEnableParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update trusted domain enable params based on context it is used -func (m *UpdateTrustedDomainEnableParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateTrustedDomainEnableParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateTrustedDomainEnableParams) UnmarshalBinary(b []byte) error { - var res UpdateTrustedDomainEnableParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_user_quota_settings_for_view.go b/v1/models/update_user_quota_settings_for_view.go deleted file mode 100644 index 7ede22cf..00000000 --- a/v1/models/update_user_quota_settings_for_view.go +++ /dev/null @@ -1,123 +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" -) - -// UpdateUserQuotaSettingsForView Update User Quota Settings For View. -// -// Specifies the parameters to update user quota metadata in a view. -// -// swagger:model UpdateUserQuotaSettingsForView -type UpdateUserQuotaSettingsForView struct { - - // The default user quota policy for this view. - DefaultUserQuotaPolicy *QuotaPolicy `json:"defaultUserQuotaPolicy,omitempty"` - - // If set, it enables/disables the user quota overrides for a view. - // Otherwise, it leaves it at it's previous state. - EnableUserQuota *bool `json:"enableUserQuota,omitempty"` - - // If set to true, the default_policy in view metadata will be cleared and - // the default policy from viewbox will take effect for all users in the - // view. - InheritDefaultPolicyFromViewbox *bool `json:"inheritDefaultPolicyFromViewbox,omitempty"` - - // View name of input view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this update user quota settings for view -func (m *UpdateUserQuotaSettingsForView) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateUserQuotaSettingsForView) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - 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 -} - -// ContextValidate validate this update user quota settings for view based on the context it is used -func (m *UpdateUserQuotaSettingsForView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateUserQuotaSettingsForView) 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 -} - -// MarshalBinary interface implementation -func (m *UpdateUserQuotaSettingsForView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateUserQuotaSettingsForView) UnmarshalBinary(b []byte) error { - var res UpdateUserQuotaSettingsForView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_view_alias_param.go b/v1/models/update_view_alias_param.go deleted file mode 100644 index 3a5c3a84..00000000 --- a/v1/models/update_view_alias_param.go +++ /dev/null @@ -1,210 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateViewAliasParam UpdateViewAliasParam. -// -// Specifies the parameters of updating view alias op. -// -// swagger:model UpdateViewAliasParam -type UpdateViewAliasParam struct { - - // Name of the alias to be updated. - AliasName *string `json:"aliasName,omitempty"` - - // Specifies whether to enable filer audit log on this view alias. - EnableFilerAuditLog *bool `json:"enableFilerAuditLog,omitempty"` - - // Specifies the SMB encryption for the View Alias. If set, it enables the - // SMB encryption for the View Alias. Encryption is supported only by SMB 3.x - // dialects. Dialects that do not support would still access data in - // unencrypted format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // If set, it enables discovery of view alias for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View Alias. - // If set, encryption is enforced for all the sessions for the View Alias. - // When enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View Alias. (Overrides the Subnets specified at the global - // Cohesity Cluster level and View level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this alias. - SuperUserSids []string `json:"superUserSids"` -} - -// Validate validates this update view alias param -func (m *UpdateViewAliasParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateViewAliasParam) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewAliasParam) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update view alias param based on the context it is used -func (m *UpdateViewAliasParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateViewAliasParam) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewAliasParam) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateViewAliasParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateViewAliasParam) UnmarshalBinary(b []byte) error { - var res UpdateViewAliasParam - 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 deleted file mode 100644 index abeafafa..00000000 --- a/v1/models/update_view_param.go +++ /dev/null @@ -1,1036 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateViewParam View. -// -// Specifies the settings that define a View. -// -// swagger:model UpdateViewParam -type UpdateViewParam struct { - - // Array of Security Identifiers (SIDs) - // - // Specifies the list of security identifiers (SIDs) for the restricted - // Principals who have access to this View. - AccessSids []string `json:"accessSids"` - - // Specifies the antivirus scan config settings for this View. - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - // Specifies an optional text description about the View. - Description *string `json:"description,omitempty"` - - // Specifies whether fast durable handle is enabled. If enabled, view open - // handle will be kept in memory, which results in a higher performance. But - // the handles cannot be recovered if node or service crashes. - EnableFastDurableHandle *bool `json:"enableFastDurableHandle,omitempty"` - - // Specifies if Filer Audit Logging is enabled for this view. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Specifies whether to enable live indexing for the view. - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - // Specifies whether view is blur enabled. - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - // If set, mixed mode (NFS and SMB) access is enabled for this view. - // This field is deprecated. Use the field SecurityMode. - // deprecated: true - EnableMixedModePermissions *bool `json:"enableMixedModePermissions,omitempty"` - - // If set, it enables discovery of view for NFS. - EnableNfsViewDiscovery *bool `json:"enableNfsViewDiscovery,omitempty"` - - // Specifies whether to enable offline file caching of the view. - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - // Specifies if access-based enumeration should be enabled. - // If 'true', only files and folders that the user has permissions to - // access are visible on the SMB share for that user. - EnableSmbAccessBasedEnumeration *bool `json:"enableSmbAccessBasedEnumeration,omitempty"` - - // Specifies the SMB encryption for the View. If set, it enables the SMB - // encryption for the View. Encryption is supported only by SMB 3.x dialects. - // Dialects that do not support would still access data in unencrypted - // format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // Specifies whether SMB opportunistic lock is enabled. - EnableSmbOplock *bool `json:"enableSmbOplock,omitempty"` - - // If set, it enables discovery of view for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View. - // If set, encryption is enforced for all the sessions for the View. When - // enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Optional filtering criteria that should be satisfied by all the files - // created in this view. It does not affect existing files. - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - // Optional config that enables file locking for this view. It cannot be - // disabled during the edit of a view, if it has been enabled during the - // creation of the view. Also, it cannot be enabled if it was disabled - // during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies whether view is for externally triggered backup target. - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - // Specifies if the view is a read only view. User will no longer be able to - // write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // logical quota - LogicalQuota *UpdateViewParamLogicalQuota `json:"logicalQuota,omitempty"` - - // Array of Netgroups. - // - // Specifies a list of Netgroups that have permissions to access the - // View. (Overrides the Netgroups specified at the global Cohesity - // Cluster level.) - NetgroupWhitelist []*NisNetgroup `json:"netgroupWhitelist"` - - // Specifies the NFS all squash config. - NfsAllSquash *NfsSquash `json:"nfsAllSquash,omitempty"` - - // Specifies the NFS root permission config of the view file system. - NfsRootPermissions *NfsRootPermissions `json:"nfsRootPermissions,omitempty"` - - // Specifies the NFS root squash config. - NfsRootSquash *NfsSquash `json:"nfsRootSquash,omitempty"` - - // Specifies whether view level client netgroup allowlist overrides cluster - // and global setting. - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - // Specifies whether view level client subnet allowlist overrides cluster and - // global setting. - OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - - // 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. - // 'kS3Only' enables protocol access to S3 only. - // 'kSwiftOnly' enables protocol access to Swift only. - // 'kUnknown' indicates that the protocol access of a view does not match - // any of the above. In this case, the constant is used as 'catch-all'. - // Enum: ["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"] - ProtocolAccess *string `json:"protocolAccess,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies the security mode used for this view. - // Currently we support the following modes: Native, Unified and NTFS style. - // 'kNativeMode' indicates a native security mode. - // 'kUnifiedMode' indicates a unified security mode. - // 'kNtfsMode' indicates a NTFS style security mode. - // Enum: ["kNativeMode","kUnifiedMode","kNtfsMode"] - SecurityMode *string `json:"securityMode,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies the SMB permissions for the View. - SmbPermissionsInfo *SmbPermissionsInfo `json:"smbPermissionsInfo,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from - // the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // Array of Subnets. - // - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View. (Overrides the Subnets specified at the global - // Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this view. - SuperUserSids []string `json:"superUserSids"` - - // Specifies the Keystone project domain. - SwiftProjectDomain *string `json:"swiftProjectDomain,omitempty"` - - // Specifies the Keystone project name. - SwiftProjectName *string `json:"swiftProjectName,omitempty"` - - // Optional tenant id who has access to this View. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether view lock is enabled. If enabled the view cannot be - // modified or deleted until unlock. By default it is disabled. - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - // Specifies the pinning config of this view. - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` -} - -// Validate validates this update view param -func (m *UpdateViewParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusScanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileExtensionFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsAllSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootPermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPermissionsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPinningConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateViewParam) validateAntivirusScanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if m.AntivirusScanConfig != nil { - if err := m.AntivirusScanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateFileExtensionFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if m.FileExtensionFilter != nil { - if err := m.FileExtensionFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateLogicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalQuota) { // not required - 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 -} - -func (m *UpdateViewParam) validateNetgroupWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - continue - } - - if m.NetgroupWhitelist[i] != nil { - if err := m.NetgroupWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) validateNfsAllSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if m.NfsAllSquash != nil { - if err := m.NfsAllSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateNfsRootPermissions(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if m.NfsRootPermissions != nil { - if err := m.NfsRootPermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateNfsRootSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if m.NfsRootSquash != nil { - if err := m.NfsRootSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -var updateViewParamTypeProtocolAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateViewParamTypeProtocolAccessPropEnum = append(updateViewParamTypeProtocolAccessPropEnum, v) - } -} - -const ( - - // UpdateViewParamProtocolAccessKAll captures enum value "kAll" - UpdateViewParamProtocolAccessKAll string = "kAll" - - // UpdateViewParamProtocolAccessKNFSOnly captures enum value "kNFSOnly" - UpdateViewParamProtocolAccessKNFSOnly string = "kNFSOnly" - - // UpdateViewParamProtocolAccessKSMBOnly captures enum value "kSMBOnly" - UpdateViewParamProtocolAccessKSMBOnly string = "kSMBOnly" - - // UpdateViewParamProtocolAccessKS3Only captures enum value "kS3Only" - UpdateViewParamProtocolAccessKS3Only string = "kS3Only" - - // UpdateViewParamProtocolAccessKSwiftOnly captures enum value "kSwiftOnly" - UpdateViewParamProtocolAccessKSwiftOnly string = "kSwiftOnly" - - // UpdateViewParamProtocolAccessKUnknown captures enum value "kUnknown" - UpdateViewParamProtocolAccessKUnknown string = "kUnknown" -) - -// prop value enum -func (m *UpdateViewParam) validateProtocolAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateViewParamTypeProtocolAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateViewParam) validateProtocolAccess(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - // value enum - if err := m.validateProtocolAccessEnum("protocolAccess", "body", *m.ProtocolAccess); err != nil { - return err - } - - return nil -} - -func (m *UpdateViewParam) validateQos(formats strfmt.Registry) error { - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -var updateViewParamTypeSecurityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNativeMode","kUnifiedMode","kNtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateViewParamTypeSecurityModePropEnum = append(updateViewParamTypeSecurityModePropEnum, v) - } -} - -const ( - - // UpdateViewParamSecurityModeKNativeMode captures enum value "kNativeMode" - UpdateViewParamSecurityModeKNativeMode string = "kNativeMode" - - // UpdateViewParamSecurityModeKUnifiedMode captures enum value "kUnifiedMode" - UpdateViewParamSecurityModeKUnifiedMode string = "kUnifiedMode" - - // UpdateViewParamSecurityModeKNtfsMode captures enum value "kNtfsMode" - UpdateViewParamSecurityModeKNtfsMode string = "kNtfsMode" -) - -// prop value enum -func (m *UpdateViewParam) validateSecurityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateViewParamTypeSecurityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateViewParam) validateSecurityMode(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityMode) { // not required - return nil - } - - // value enum - if err := m.validateSecurityModeEnum("securityMode", "body", *m.SecurityMode); err != nil { - return err - } - - return nil -} - -func (m *UpdateViewParam) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) validateSmbPermissionsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if m.SmbPermissionsInfo != nil { - if err := m.SmbPermissionsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) validateViewPinningConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if m.ViewPinningConfig != nil { - if err := m.ViewPinningConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - 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 - - if err := m.contextValidateAntivirusScanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileExtensionFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsAllSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootPermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPermissionsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewPinningConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateViewParam) contextValidateAntivirusScanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AntivirusScanConfig != nil { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if err := m.AntivirusScanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateFileExtensionFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileExtensionFilter != nil { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if err := m.FileExtensionFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -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 -} - -func (m *UpdateViewParam) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - - if m.NetgroupWhitelist[i] != nil { - - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - return nil - } - - if err := m.NetgroupWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) contextValidateNfsAllSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsAllSquash != nil { - - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if err := m.NfsAllSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateNfsRootPermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootPermissions != nil { - - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if err := m.NfsRootPermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateNfsRootSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootSquash != nil { - - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if err := m.NfsRootSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) contextValidateSmbPermissionsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbPermissionsInfo != nil { - - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if err := m.SmbPermissionsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) contextValidateViewPinningConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewPinningConfig != nil { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if err := m.ViewPinningConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateViewParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateViewParam) UnmarshalBinary(b []byte) error { - var res UpdateViewParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return 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/upgrade_cluster_parameters.go b/v1/models/upgrade_cluster_parameters.go deleted file mode 100644 index 1ce96929..00000000 --- a/v1/models/upgrade_cluster_parameters.go +++ /dev/null @@ -1,76 +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" -) - -// UpgradeClusterParameters Upgrade Cluster Parameters. -// -// Specifies the parameters needed for a Cluster Upgrade request. -// -// swagger:model UpgradeClusterParameters -type UpgradeClusterParameters struct { - - // Specifies the target software version. If specified, all Nodes on the - // Cluster will be searched to see if they have had the specified software - // package uploaded to them. If the specified package is found, then it - // will be used for the upgrade. - // Required: true - TargetSwVersion *string `json:"targetSwVersion"` -} - -// Validate validates this upgrade cluster parameters -func (m *UpgradeClusterParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetSwVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpgradeClusterParameters) validateTargetSwVersion(formats strfmt.Registry) error { - - if err := validate.Required("targetSwVersion", "body", m.TargetSwVersion); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this upgrade cluster parameters based on context it is used -func (m *UpgradeClusterParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeClusterParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeClusterParameters) UnmarshalBinary(b []byte) error { - var res UpgradeClusterParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upgrade_cluster_result.go b/v1/models/upgrade_cluster_result.go deleted file mode 100644 index 33ad4289..00000000 --- a/v1/models/upgrade_cluster_result.go +++ /dev/null @@ -1,56 +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" -) - -// UpgradeClusterResult Upgrade Cluster Result. -// -// Specifies the result returned from a request to upgrade a Cluster. -// -// swagger:model UpgradeClusterResult -type UpgradeClusterResult struct { - - // Specifies a message describing the result of the request. - Message *string `json:"message,omitempty"` - - // Specifies the URL that can be queried to get the status of the operation - // once it has begun. - StatusURL *string `json:"statusUrl,omitempty"` -} - -// Validate validates this upgrade cluster result -func (m *UpgradeClusterResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upgrade cluster result based on context it is used -func (m *UpgradeClusterResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeClusterResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeClusterResult) UnmarshalBinary(b []byte) error { - var res UpgradeClusterResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upgrade_node_parameters.go b/v1/models/upgrade_node_parameters.go deleted file mode 100644 index b7c66a2d..00000000 --- a/v1/models/upgrade_node_parameters.go +++ /dev/null @@ -1,71 +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" -) - -// UpgradeNodeParameters Upgrade Node Parameters. -// -// Specifies the parameters needed for a Node upgrade request. -// -// swagger:model UpgradeNodeParameters -type UpgradeNodeParameters struct { - - // Specifies a list of IDs of additional nodes to be upgraded. These must - // be free Nodes present on the same local network as the Node that the - // request was sent to. The ID of the Node the request was sent to should - // not be included in this list. This parameter can only be specified if - // upgradeAllFreeNodes is not. - NodeIds []int64 `json:"nodeIds"` - - // Specifies the target software version. The node that the request is sent - // to will search itself for the specified software package and if that - // package is found, it will be used for the upgrade. - TargetSwVersion *string `json:"targetSwVersion,omitempty"` - - // Specifies whether or not to attempt to upgrade all free nodes which - // are currently connected to the same local network as the node that the - // request was sent to. This parameter can only be specified if nodeIds - // is not. - UpgradeAllFreeNodes *bool `json:"upgradeAllFreeNodes,omitempty"` - - // Specifies that the node that the request is being sent to should be - // upgraded. By default, this is set to true. - UpgradeSelf *bool `json:"upgradeSelf,omitempty"` -} - -// Validate validates this upgrade node parameters -func (m *UpgradeNodeParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upgrade node parameters based on context it is used -func (m *UpgradeNodeParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeNodeParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeNodeParameters) UnmarshalBinary(b []byte) error { - var res UpgradeNodeParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upgrade_node_result.go b/v1/models/upgrade_node_result.go deleted file mode 100644 index 90f1d082..00000000 --- a/v1/models/upgrade_node_result.go +++ /dev/null @@ -1,56 +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" -) - -// UpgradeNodeResult Upgrade Node Result. -// -// Specifies the result returned from a request to upgrade a Node. -// -// swagger:model UpgradeNodeResult -type UpgradeNodeResult struct { - - // Specifies a message describing the result of the request. - Message *string `json:"message,omitempty"` - - // Specifies a URL that can be queried to get the status of the operation - // once it has begun. - StatusURL *string `json:"statusUrl,omitempty"` -} - -// Validate validates this upgrade node result -func (m *UpgradeNodeResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upgrade node result based on context it is used -func (m *UpgradeNodeResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeNodeResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeNodeResult) UnmarshalBinary(b []byte) error { - var res UpgradeNodeResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upgrade_physical_agents_message.go b/v1/models/upgrade_physical_agents_message.go deleted file mode 100644 index 1ee955a7..00000000 --- a/v1/models/upgrade_physical_agents_message.go +++ /dev/null @@ -1,54 +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" -) - -// UpgradePhysicalAgentsMessage Status of Physical Upgrade Request. -// -// Specifies the status of an upgrade request. -// -// swagger:model UpgradePhysicalAgentsMessage -type UpgradePhysicalAgentsMessage struct { - - // Specifies the status message returned after initiating an upgrade request. - // Status of each agent upgrade can be obtained by listing Physical Servers - // using the GET /public/protectionSources operation. - Message *string `json:"message,omitempty"` -} - -// Validate validates this upgrade physical agents message -func (m *UpgradePhysicalAgentsMessage) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upgrade physical agents message based on context it is used -func (m *UpgradePhysicalAgentsMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradePhysicalAgentsMessage) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradePhysicalAgentsMessage) UnmarshalBinary(b []byte) error { - var res UpgradePhysicalAgentsMessage - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upgrade_physical_server_agents.go b/v1/models/upgrade_physical_server_agents.go deleted file mode 100644 index 9635d663..00000000 --- a/v1/models/upgrade_physical_server_agents.go +++ /dev/null @@ -1,78 +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" -) - -// UpgradePhysicalServerAgents Upgrade Physical Server Agents Request. -// -// Specifies a request to upgrade the Cohesity agents on one or more -// Physical Servers registered on the Cohesity Cluster. -// -// swagger:model UpgradePhysicalServerAgents -type UpgradePhysicalServerAgents struct { - - // Array of Agent Ids. - // - // Specifies a list of agentIds associated with the Physical Servers - // to upgrade with the agent release currently available - // from the Cohesity Cluster. - // Required: true - AgentIds []int64 `json:"agentIds"` -} - -// Validate validates this upgrade physical server agents -func (m *UpgradePhysicalServerAgents) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpgradePhysicalServerAgents) validateAgentIds(formats strfmt.Registry) error { - - if err := validate.Required("agentIds", "body", m.AgentIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this upgrade physical server agents based on context it is used -func (m *UpgradePhysicalServerAgents) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradePhysicalServerAgents) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradePhysicalServerAgents) UnmarshalBinary(b []byte) error { - var res UpgradePhysicalServerAgents - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uplink_switch_info.go b/v1/models/uplink_switch_info.go deleted file mode 100644 index 809e7d09..00000000 --- a/v1/models/uplink_switch_info.go +++ /dev/null @@ -1,56 +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" -) - -// UplinkSwitchInfo uplink switch info -// -// swagger:model UplinkSwitchInfo -type UplinkSwitchInfo struct { - - // Port ID. - PortID *string `json:"portId,omitempty"` - - // System description. - SysDescr *string `json:"sysDescr,omitempty"` - - // System name. - SysName *string `json:"sysName,omitempty"` -} - -// Validate validates this uplink switch info -func (m *UplinkSwitchInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uplink switch info based on context it is used -func (m *UplinkSwitchInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UplinkSwitchInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UplinkSwitchInfo) UnmarshalBinary(b []byte) error { - var res UplinkSwitchInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upload_m_r_jar_view_path_wrapper.go b/v1/models/upload_m_r_jar_view_path_wrapper.go deleted file mode 100644 index 6d60dd72..00000000 --- a/v1/models/upload_m_r_jar_view_path_wrapper.go +++ /dev/null @@ -1,56 +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" -) - -// UploadMRJarViewPathWrapper Upload JAR Request. -// -// UploadMRJarViewPathWrapper contains jar name and local mount path where the -// Jars will be uploaded. -// -// swagger:model UploadMRJarViewPathWrapper -type UploadMRJarViewPathWrapper struct { - - // JarName is the name of the uploaded jar. - JarName *string `json:"jarName,omitempty"` - - // JarPath is the path for the directory where uploaded jar is stored. - JarPath *string `json:"jarPath,omitempty"` -} - -// Validate validates this upload m r jar view path wrapper -func (m *UploadMRJarViewPathWrapper) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upload m r jar view path wrapper based on context it is used -func (m *UploadMRJarViewPathWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UploadMRJarViewPathWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UploadMRJarViewPathWrapper) UnmarshalBinary(b []byte) error { - var res UploadMRJarViewPathWrapper - 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/uptiering_run_once_params.go b/v1/models/uptiering_run_once_params.go deleted file mode 100644 index dcf8e967..00000000 --- a/v1/models/uptiering_run_once_params.go +++ /dev/null @@ -1,57 +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" -) - -// UptieringRunOnceParams uptiering run once params -// -// swagger:model UptieringRunOnceParams -type UptieringRunOnceParams struct { - - // Ignore the uptiering policy and uptier the directory pointed by the - // 'uptier_path'. If path is '/', then uptier everything. - UptierPath *string `json:"uptierPath,omitempty"` - - // Flag to determine whether entity id is used for uptier range. This is - // applicable only for uptier jobs. - // TODO: Exists to support upgrade scenario. Can be deprecated once - // all customers have upgraded beyond 7.0.1. - UseEntityIDForUptierRange *bool `json:"useEntityIdForUptierRange,omitempty"` -} - -// Validate validates this uptiering run once params -func (m *UptieringRunOnceParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uptiering run once params based on context it is used -func (m *UptieringRunOnceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UptieringRunOnceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UptieringRunOnceParams) UnmarshalBinary(b []byte) error { - var res UptieringRunOnceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/usage_and_performance_stats.go b/v1/models/usage_and_performance_stats.go deleted file mode 100644 index ef8e89d5..00000000 --- a/v1/models/usage_and_performance_stats.go +++ /dev/null @@ -1,108 +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" -) - -// UsageAndPerformanceStats Usage and Performance Statistics -// -// Provides usage and performance statistics -// for entities such as a disks, Nodes or Clusters. -// -// swagger:model UsageAndPerformanceStats -type UsageAndPerformanceStats struct { - - // Specifies the data read from the protected objects by the Cohesity Cluster - // before any data reduction using deduplication and compression. - DataInBytes *int64 `json:"dataInBytes,omitempty"` - - // Morphed Usage before data is replicated to other nodes as per RF or - // Erasure Coding policy. - DataInBytesAfterReduction *int64 `json:"dataInBytesAfterReduction,omitempty"` - - // Specifies the minimum usable capacity available - // after erasure coding or RF. This will only be populated for cluster. - // If a cluster has multiple Domains (View Boxes) with different RF or - // erasure coding, this metric will be computed using the scheme that will - // provide least saving. - MinUsablePhysicalCapacityBytes *int64 `json:"minUsablePhysicalCapacityBytes,omitempty"` - - // Provides the total number of bytes read in the last 30 seconds. - NumBytesRead *int64 `json:"numBytesRead,omitempty"` - - // Provides the total number of bytes written in the last 30 second. - NumBytesWritten *int64 `json:"numBytesWritten,omitempty"` - - // Provides the total physical capacity in bytes of all the storage devices, - // after subtracting space reserved for cluster services - PhysicalCapacityBytes *int64 `json:"physicalCapacityBytes,omitempty"` - - // Provides the number of Read IOs that occurred in the last 30 seconds. - ReadIos *int64 `json:"readIos,omitempty"` - - // Provides the Read latency in milliseconds for the Read IOs that occurred - // during the last 30 seconds. - ReadLatencyMsecs *float64 `json:"readLatencyMsecs,omitempty"` - - // Provides the total available capacity as computed by - // the Linux 'statfs' command. - SystemCapacityBytes *int64 `json:"systemCapacityBytes,omitempty"` - - // Provides the usage of bytes, as computed by the Linux 'statfs' command, - // after the size of the data is reduced by - // change-block tracking, compression and deduplication. - SystemUsageBytes *int64 `json:"systemUsageBytes,omitempty"` - - // Provides the usage of bytes, as computed by the Cohesity Cluster, - // before the size of the data is reduced by - // change-block tracking, compression and deduplication. - TotalPhysicalRawUsageBytes *int64 `json:"totalPhysicalRawUsageBytes,omitempty"` - - // Provides the data stored locally, after the data has been reduced by - // deduplication and compression, including the space required for honoring - // the resiliency settings (EC/RF). - TotalPhysicalUsageBytes *int64 `json:"totalPhysicalUsageBytes,omitempty"` - - // Provides the number of Write IOs that occurred in the last 30 seconds. - WriteIos *int64 `json:"writeIos,omitempty"` - - // Provides the Write latency in milliseconds for the Write IOs that occurred - // during the last 30 seconds. - WriteLatencyMsecs *float64 `json:"writeLatencyMsecs,omitempty"` -} - -// Validate validates this usage and performance stats -func (m *UsageAndPerformanceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this usage and performance stats based on context it is used -func (m *UsageAndPerformanceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UsageAndPerformanceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsageAndPerformanceStats) UnmarshalBinary(b []byte) error { - var res UsageAndPerformanceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/usage_schema_info.go b/v1/models/usage_schema_info.go deleted file mode 100644 index 8aa5c454..00000000 --- a/v1/models/usage_schema_info.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UsageSchemaInfo UsageSchemaInfo -// -// UsageSchemaInfo describes the schema info of the usage. -// -// swagger:model UsageSchemaInfo -type UsageSchemaInfo struct { - - // Specifies the list of the schema info for an entity. - SchemaInfoList []*SchemaInfo `json:"schemaInfoList"` -} - -// Validate validates this usage schema info -func (m *UsageSchemaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UsageSchemaInfo) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this usage schema info based on the context it is used -func (m *UsageSchemaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UsageSchemaInfo) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UsageSchemaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsageSchemaInfo) UnmarshalBinary(b []byte) error { - var res UsageSchemaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user.go b/v1/models/user.go deleted file mode 100644 index 97ad7b4c..00000000 --- a/v1/models/user.go +++ /dev/null @@ -1,1115 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// User User Details. -// -// Specifies details about a user. -// -// swagger:model User -type User struct { - - // Specifies additional information pertaining to an active directory user. - // This field is set only for AD users who has logged in via active - // directory. - AdUserInfo *ADUserInfo `json:"adUserInfo,omitempty"` - - // Array of Additional Groups. - // - // Specifies the names of additional groups this User may belong to. - AdditionalGroupNames []string `json:"additionalGroupNames"` - - // Specifies if the data security user can be modified by the admin users. - AllowDsoModify *bool `json:"allowDsoModify,omitempty"` - - // Specifies audit settings. - AuditLogSettings *AuditLogSettings `json:"auditLogSettings,omitempty"` - - // Specifies the authentication type of the user. - // 'kAuthLocal' implies authenticated user is a local user. - // 'kAuthAd' implies authenticated user is an Active Directory user. - // 'kAuthSalesforce' implies authenticated user is a Salesforce user. - // 'kAuthGoogle' implies authenticated user is a Google user. - // 'kAuthSso' implies authenticated user is an SSO user. - // Enum: ["kAuthLocal","kAuthAd","kAuthSalesforce","kAuthGoogle","kAuthSso"] - AuthenticationType *string `json:"authenticationType,omitempty"` - - // Specifies the list of clusters this user has access to. If this is not - // specified, access will be granted to all clusters. - ClusterIdentifiers []*ClusterIdentifier `json:"clusterIdentifiers"` - - // Specifies the epoch time in milliseconds when the user account - // was created on the Cohesity Cluster. - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the current password when updating the password. - CurrentPassword *string `json:"currentPassword,omitempty"` - - // Specifies a description about the user. - Description *string `json:"description,omitempty"` - - // Specifies the fully qualified domain name (FQDN) of an Active Directory - // or LOCAL for the default LOCAL domain on the Cohesity Cluster. - // A user is uniquely identified by combination of the username and - // the domain. - Domain *string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the user becomes - // effective. Until that time, the user cannot log in. - EffectiveTimeMsecs *int64 `json:"effectiveTimeMsecs,omitempty"` - - // Specifies the email address of the user. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies the epoch time in milliseconds when the user becomes - // expired. After that, the user cannot log in. - ExpiredTimeMsecs *int64 `json:"expiredTimeMsecs,omitempty"` - - // Specifies whether to force user to change password. - ForcePasswordChange *bool `json:"forcePasswordChange,omitempty"` - - // Specifies additional information pertaining to Google account. - // This field is set only for Helios BaaS users who has account on Google. - GoogleAccount *GoogleAccountInfo `json:"googleAccount,omitempty"` - - // Specifies the Cohesity roles to associate with the user' group. These - // roles can only be edited from group. - // Read Only: true - GroupRoles []string `json:"groupRoles"` - - // Specifies additional information pertaining to an IdP user. - // This field is set only for IdP users who has logged in via IdP. - IdpUserInfo *IdpUserInfo `json:"idpUserInfo,omitempty"` - - // Specifies the messenger token for intercom identity verification. - IntercomMessengerToken *string `json:"intercomMessengerToken,omitempty"` - - // Specifies whether the user account is locked. - IsAccountLocked *bool `json:"isAccountLocked,omitempty"` - - // Specifies if MFA is enabled for the Helios Account. - // Read Only: true - IsAccountMfaEnabled *bool `json:"isAccountMfaEnabled,omitempty"` - - // IsActive specifies whether or not a user is active, or has been - // disactivated by the customer. The default behavior is 'true'. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies if MFA is enabled on cluster. - // Read Only: true - IsClusterMfaEnabled *bool `json:"isClusterMfaEnabled,omitempty"` - - // Specifies the epoch time in milliseconds when the user was last logged in - // successfully. - LastSuccessfulLoginTimeMsecs *int64 `json:"lastSuccessfulLoginTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the user account was last - // modified on the Cohesity Cluster. - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the lockout reason of the user if it is locked. - // 'NotLocked' implies the user is not locked. - // 'FailedLoginAttempts' the account is locked due to - // many failed login attempts. - // 'LockedByAdmin' implies the account is locked by the admin user. - // 'Inactivity' implies the account is locked due to long time of inactivity. - // 'OtherReasons' implied the account is loced for other reasons. - // Enum: ["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"] - LockoutReason *string `json:"lockoutReason,omitempty"` - - // Specifies MFA info if MFA is enabled. - MfaInfo *MfaInfo `json:"mfaInfo,omitempty"` - - // Specifies MFA methods that enabled on the cluster. - MfaMethods []string `json:"mfaMethods"` - - // Specifies object class of user, could be either user or group. - ObjectClass *string `json:"objectClass,omitempty"` - - // OrgMembership contains the list of all available tenantIds for this - // user to switch to. Only when creating the session user, this field is - // populated on the fly. We discover the tenantIds from various groups - // assigned to the users. - OrgMembership []*TenantConfig `json:"orgMembership"` - - // Specifies the password of this user. - Password *string `json:"password,omitempty"` - - // Specifies preferences of the user. - Preferences *Preferences `json:"preferences,omitempty"` - - // Specifies the epoch time in milliseconds of previous user login. - PreviousLoginTimeMsecs *int64 `json:"previousLoginTimeMsecs,omitempty"` - - // Specifies the name of the primary group of this User. - PrimaryGroupName *string `json:"primaryGroupName,omitempty"` - - // Array of Privileges. - // - // Specifies the Cohesity privileges from the roles. This will be populated - // based on the union of all privileges in roles. - // Type for unique privilege Id values. - // All below enum values specify a value for all uniquely defined - // privileges in Cohesity. - PrivilegeIds []string `json:"privilegeIds"` - - // Specifies the user profiles. - // NOTE: Currently used for Helios. - Profiles []*McmUserProfile `json:"profiles"` - - // Whether the user is a restricted user. A restricted user can only view - // the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with the user such as - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this user. - Roles []string `json:"roles"` - - // Specifies the S3 Account Access Key ID. - S3AccessKeyID *string `json:"s3AccessKeyId,omitempty"` - - // Specifies the S3 Account Canonical User ID. - S3AccountID *string `json:"s3AccountId,omitempty"` - - // Specifies the S3 Account Secret Key. - S3SecretKey *string `json:"s3SecretKey,omitempty"` - - // Specifies additional information pertaining to Salesforce account. - // This field is set only for Helios users who has account on Salesforce. - SalesforceAccount *SalesforceAccountInfo `json:"salesforceAccount,omitempty"` - - // Specifies the unique Security ID (SID) of the user. This field is - // mandatory in modifying user. - Sid *string `json:"sid,omitempty"` - - // Specifies the SPOG context. This will be set for sessions where a user - // is accessing a remote cluster. This is needed for audit logging purposes. - SpogContext *SpogContext `json:"spogContext,omitempty"` - - // Specifies the subscription information. If the user has subscribed - // for Helios, DataProtect, DRaaS..... - SubscriptionInfo *SubscriptionInfo `json:"subscriptionInfo,omitempty"` - - // Specifies the tenant access available to current user. - // NOTE: Currently used for Helios. - TenantAccesses []*TenantAccess `json:"tenantAccesses"` - - // Specifies the effective Tenant ID of the user. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the login name of the user. - Username *string `json:"username,omitempty"` -} - -// Validate validates this user -func (m *User) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdUserInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuditLogSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthenticationType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIdentifiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogleAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIdpUserInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLockoutReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMfaInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgMembership(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivilegeIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProfiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSalesforceAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpogContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantAccesses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *User) validateAdUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AdUserInfo) { // not required - return nil - } - - if m.AdUserInfo != nil { - if err := m.AdUserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adUserInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adUserInfo") - } - return err - } - } - - return nil -} - -func (m *User) validateAuditLogSettings(formats strfmt.Registry) error { - if swag.IsZero(m.AuditLogSettings) { // not required - return nil - } - - if m.AuditLogSettings != nil { - if err := m.AuditLogSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogSettings") - } - return err - } - } - - return nil -} - -var userTypeAuthenticationTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAuthLocal","kAuthAd","kAuthSalesforce","kAuthGoogle","kAuthSso"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userTypeAuthenticationTypePropEnum = append(userTypeAuthenticationTypePropEnum, v) - } -} - -const ( - - // UserAuthenticationTypeKAuthLocal captures enum value "kAuthLocal" - UserAuthenticationTypeKAuthLocal string = "kAuthLocal" - - // UserAuthenticationTypeKAuthAd captures enum value "kAuthAd" - UserAuthenticationTypeKAuthAd string = "kAuthAd" - - // UserAuthenticationTypeKAuthSalesforce captures enum value "kAuthSalesforce" - UserAuthenticationTypeKAuthSalesforce string = "kAuthSalesforce" - - // UserAuthenticationTypeKAuthGoogle captures enum value "kAuthGoogle" - UserAuthenticationTypeKAuthGoogle string = "kAuthGoogle" - - // UserAuthenticationTypeKAuthSso captures enum value "kAuthSso" - UserAuthenticationTypeKAuthSso string = "kAuthSso" -) - -// prop value enum -func (m *User) validateAuthenticationTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userTypeAuthenticationTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *User) validateAuthenticationType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationType) { // not required - return nil - } - - // value enum - if err := m.validateAuthenticationTypeEnum("authenticationType", "body", *m.AuthenticationType); err != nil { - return err - } - - return nil -} - -func (m *User) validateClusterIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifiers) { // not required - return nil - } - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - continue - } - - if m.ClusterIdentifiers[i] != nil { - if err := m.ClusterIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) validateGoogleAccount(formats strfmt.Registry) error { - if swag.IsZero(m.GoogleAccount) { // not required - return nil - } - - if m.GoogleAccount != nil { - if err := m.GoogleAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleAccount") - } - return err - } - } - - return nil -} - -func (m *User) validateIdpUserInfo(formats strfmt.Registry) error { - if swag.IsZero(m.IdpUserInfo) { // not required - return nil - } - - if m.IdpUserInfo != nil { - if err := m.IdpUserInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idpUserInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idpUserInfo") - } - return err - } - } - - return nil -} - -var userTypeLockoutReasonPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userTypeLockoutReasonPropEnum = append(userTypeLockoutReasonPropEnum, v) - } -} - -const ( - - // UserLockoutReasonNotLocked captures enum value "NotLocked" - UserLockoutReasonNotLocked string = "NotLocked" - - // UserLockoutReasonFailedLoginAttempts captures enum value "FailedLoginAttempts" - UserLockoutReasonFailedLoginAttempts string = "FailedLoginAttempts" - - // UserLockoutReasonLockedByAdmin captures enum value "LockedByAdmin" - UserLockoutReasonLockedByAdmin string = "LockedByAdmin" - - // UserLockoutReasonInactivity captures enum value "Inactivity" - UserLockoutReasonInactivity string = "Inactivity" - - // UserLockoutReasonOtherReasons captures enum value "OtherReasons" - UserLockoutReasonOtherReasons string = "OtherReasons" -) - -// prop value enum -func (m *User) validateLockoutReasonEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userTypeLockoutReasonPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *User) validateLockoutReason(formats strfmt.Registry) error { - if swag.IsZero(m.LockoutReason) { // not required - return nil - } - - // value enum - if err := m.validateLockoutReasonEnum("lockoutReason", "body", *m.LockoutReason); err != nil { - return err - } - - return nil -} - -func (m *User) validateMfaInfo(formats strfmt.Registry) error { - if swag.IsZero(m.MfaInfo) { // not required - return nil - } - - if m.MfaInfo != nil { - if err := m.MfaInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mfaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mfaInfo") - } - return err - } - } - - return nil -} - -func (m *User) validateOrgMembership(formats strfmt.Registry) error { - if swag.IsZero(m.OrgMembership) { // not required - return nil - } - - for i := 0; i < len(m.OrgMembership); i++ { - if swag.IsZero(m.OrgMembership[i]) { // not required - continue - } - - if m.OrgMembership[i] != nil { - if err := m.OrgMembership[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgMembership" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgMembership" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) validatePreferences(formats strfmt.Registry) error { - if swag.IsZero(m.Preferences) { // not required - return nil - } - - if m.Preferences != nil { - if err := m.Preferences.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferences") - } - return err - } - } - - return nil -} - -var userPrivilegeIdsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrincipalView","kPrincipalModify","kAppLaunch","kAppsManagement","kOrganizationView","kOrganizationModify","kOrganizationImpersonate","kCloneView","kCloneModify","kClusterView","kClusterModify","kClusterCreate","kClusterSupport","kClusterUpgrade","kClusterRemoteView","kClusterRemoteModify","kClusterExternalTargetView","kClusterExternalTargetModify","kClusterAudit","kAlertView","kAlertModify","kVlanView","kVlanModify","kHybridExtenderView","kHybridExtenderDownload","kAdLdapView","kAdLdapModify","kSchedulerView","kSchedulerModify","kProtectionView","kProtectionModify","kProtectionJobOperate","kProtectionSourceModify","kProtectionPolicyView","kProtectionPolicyModify","kRestoreView","kRestoreModify","kRestoreDownload","kRemoteRestore","kStorageView","kStorageModify","kStorageDomainView","kStorageDomainModify","kAnalyticsView","kAnalyticsModify","kReportsView","kMcmModify","kDataSecurity","kSmbBackup","kSmbRestore","kSmbTakeOwnership","kSmbAuditing","kMcmUnregister","kMcmUpgrade","kMcmModifySuperAdmin","kMcmViewSuperAdmin","kMcmModifyCohesityAdmin","kMcmViewCohesityAdmin","kObjectSearch","kFileDatalockExpiryTimeDecrease"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userPrivilegeIdsItemsEnum = append(userPrivilegeIdsItemsEnum, v) - } -} - -func (m *User) validatePrivilegeIdsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userPrivilegeIdsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *User) validatePrivilegeIds(formats strfmt.Registry) error { - if swag.IsZero(m.PrivilegeIds) { // not required - return nil - } - - for i := 0; i < len(m.PrivilegeIds); i++ { - - // value enum - if err := m.validatePrivilegeIdsItemsEnum("privilegeIds"+"."+strconv.Itoa(i), "body", m.PrivilegeIds[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *User) validateProfiles(formats strfmt.Registry) error { - if swag.IsZero(m.Profiles) { // not required - return nil - } - - for i := 0; i < len(m.Profiles); i++ { - if swag.IsZero(m.Profiles[i]) { // not required - continue - } - - if m.Profiles[i] != nil { - if err := m.Profiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) validateSalesforceAccount(formats strfmt.Registry) error { - if swag.IsZero(m.SalesforceAccount) { // not required - return nil - } - - if m.SalesforceAccount != nil { - if err := m.SalesforceAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("salesforceAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("salesforceAccount") - } - return err - } - } - - return nil -} - -func (m *User) validateSpogContext(formats strfmt.Registry) error { - if swag.IsZero(m.SpogContext) { // not required - return nil - } - - if m.SpogContext != nil { - if err := m.SpogContext.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spogContext") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spogContext") - } - return err - } - } - - return nil -} - -func (m *User) validateSubscriptionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionInfo) { // not required - return nil - } - - if m.SubscriptionInfo != nil { - if err := m.SubscriptionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptionInfo") - } - return err - } - } - - return nil -} - -func (m *User) validateTenantAccesses(formats strfmt.Registry) error { - if swag.IsZero(m.TenantAccesses) { // not required - return nil - } - - for i := 0; i < len(m.TenantAccesses); i++ { - if swag.IsZero(m.TenantAccesses[i]) { // not required - continue - } - - if m.TenantAccesses[i] != nil { - if err := m.TenantAccesses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user based on the context it is used -func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuditLogSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogleAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroupRoles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIdpUserInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsAccountMfaEnabled(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsClusterMfaEnabled(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMfaInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgMembership(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProfiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSalesforceAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpogContext(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubscriptionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantAccesses(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *User) contextValidateAdUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AdUserInfo != nil { - - if swag.IsZero(m.AdUserInfo) { // not required - return nil - } - - if err := m.AdUserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adUserInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adUserInfo") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateAuditLogSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.AuditLogSettings != nil { - - if swag.IsZero(m.AuditLogSettings) { // not required - return nil - } - - if err := m.AuditLogSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogSettings") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateClusterIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - - if m.ClusterIdentifiers[i] != nil { - - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - return nil - } - - if err := m.ClusterIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) contextValidateGoogleAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.GoogleAccount != nil { - - if swag.IsZero(m.GoogleAccount) { // not required - return nil - } - - if err := m.GoogleAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleAccount") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateGroupRoles(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "groupRoles", "body", []string(m.GroupRoles)); err != nil { - return err - } - - return nil -} - -func (m *User) contextValidateIdpUserInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.IdpUserInfo != nil { - - if swag.IsZero(m.IdpUserInfo) { // not required - return nil - } - - if err := m.IdpUserInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idpUserInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idpUserInfo") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateIsAccountMfaEnabled(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isAccountMfaEnabled", "body", m.IsAccountMfaEnabled); err != nil { - return err - } - - return nil -} - -func (m *User) contextValidateIsClusterMfaEnabled(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isClusterMfaEnabled", "body", m.IsClusterMfaEnabled); err != nil { - return err - } - - return nil -} - -func (m *User) contextValidateMfaInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.MfaInfo != nil { - - if swag.IsZero(m.MfaInfo) { // not required - return nil - } - - if err := m.MfaInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mfaInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mfaInfo") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateOrgMembership(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OrgMembership); i++ { - - if m.OrgMembership[i] != nil { - - if swag.IsZero(m.OrgMembership[i]) { // not required - return nil - } - - if err := m.OrgMembership[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgMembership" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgMembership" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) contextValidatePreferences(ctx context.Context, formats strfmt.Registry) error { - - if m.Preferences != nil { - - if swag.IsZero(m.Preferences) { // not required - return nil - } - - if err := m.Preferences.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferences") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateProfiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Profiles); i++ { - - if m.Profiles[i] != nil { - - if swag.IsZero(m.Profiles[i]) { // not required - return nil - } - - if err := m.Profiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *User) contextValidateSalesforceAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.SalesforceAccount != nil { - - if swag.IsZero(m.SalesforceAccount) { // not required - return nil - } - - if err := m.SalesforceAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("salesforceAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("salesforceAccount") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateSpogContext(ctx context.Context, formats strfmt.Registry) error { - - if m.SpogContext != nil { - - if swag.IsZero(m.SpogContext) { // not required - return nil - } - - if err := m.SpogContext.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spogContext") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spogContext") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateSubscriptionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SubscriptionInfo != nil { - - if swag.IsZero(m.SubscriptionInfo) { // not required - return nil - } - - if err := m.SubscriptionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptionInfo") - } - return err - } - } - - return nil -} - -func (m *User) contextValidateTenantAccesses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TenantAccesses); i++ { - - if m.TenantAccesses[i] != nil { - - if swag.IsZero(m.TenantAccesses[i]) { // not required - return nil - } - - if err := m.TenantAccesses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *User) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *User) UnmarshalBinary(b []byte) error { - var res User - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_delete_parameters.go b/v1/models/user_delete_parameters.go deleted file mode 100644 index 03be7210..00000000 --- a/v1/models/user_delete_parameters.go +++ /dev/null @@ -1,68 +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" -) - -// UserDeleteParameters Delete Users Request. -// -// Specifies the users to delete on the Cohesity Cluster. -// -// swagger:model UserDeleteParameters -type UserDeleteParameters struct { - - // Specifies the domain associated with the users to delete. - // Only users associated with the same domain can be deleted by a - // single request. - // If no domain is specified, the specified users are deleted from the - // LOCAL domain on the Cohesity Cluster. - // If a non-LOCAL domain is specified, the specified users are deleted - // on the Cohesity Cluster. However, the referenced user principals on the - // Active Directory are not deleted. - Domain *string `json:"domain,omitempty"` - - // Specifies the tenant for which the users are to be deleted. - TenantID *string `json:"tenantId,omitempty"` - - // Array of Users. - // - // Specifies the list of users to delete on Cohesity Cluster. - // Only users from the same domain can be deleted by a single request. - Users []string `json:"users"` -} - -// Validate validates this user delete parameters -func (m *UserDeleteParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user delete parameters based on context it is used -func (m *UserDeleteParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserDeleteParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserDeleteParameters) UnmarshalBinary(b []byte) error { - var res UserDeleteParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_id.go b/v1/models/user_id.go deleted file mode 100644 index f05917ec..00000000 --- a/v1/models/user_id.go +++ /dev/null @@ -1,65 +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" -) - -// UserID User ID. -// -// Specifies the mapping between an Unix and an SMB SID. -// -// swagger:model UserId -type UserID struct { - - // If interested in a user via smb_client, include SID. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - // The string is of following format - - // S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-...-SubAuthorityn. - Sid *string `json:"sid,omitempty"` - - // If interested in a user via unix-identifier, include UnixUid. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - UnixUID *uint32 `json:"unixUid,omitempty"` -} - -// Validate validates this user Id -func (m *UserID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user Id based on context it is used -func (m *UserID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserID) UnmarshalBinary(b []byte) error { - var res UserID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_id_mapping.go b/v1/models/user_id_mapping.go deleted file mode 100644 index e36c34d0..00000000 --- a/v1/models/user_id_mapping.go +++ /dev/null @@ -1,292 +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" -) - -// UserIDMapping User ID Mapping. -// -// Specifies how the Unix and Windows users are mapped in an Active Directory. -// -// swagger:model UserIdMapping -type UserIDMapping struct { - - // Specifies a centrify zone when mapping type is set to 'kCentrify'. It - // defines a centrify zone from which the user id mapping info would be - // derived. - CentrifyZoneMapping *CentrifyZone `json:"centrifyZoneMapping,omitempty"` - - // Specifies the custom attributes when mapping type is set to - // 'kCustomAttributes'. It defines the attribute names to derive the mapping - // for a user of an Active Directory domain. - CustomAttributesMapping *CustomUnixIDAttributes `json:"customAttributesMapping,omitempty"` - - // Specifies the fields when mapping type is set to 'kFixed'. It maps all - // Active Directory users of this domain to a fixed uid, and gid. - FixedMapping *FixedUnixIDMapping `json:"fixedMapping,omitempty"` - - // Specifies the mapping type used. - // 'kRid' indicates the kRid mapping type. - // 'kRfc2307' indicates the kRfc2307 mapping type. - // 'kSfu30' indicates the kSfu30 mapping type. - // 'kCentrify' indicates the mapping type to refer to a centrify zone. - // 'kFixed' indicates the mapping from all Active Directory users to a fixed Unix uid, and gid. - // 'kCustomAttributes' indicates the mapping to derive from custom attributes defined in an AD domain. - // 'kLdapProvider' indicates the Active Directory to LDAP provider mapping. - // Enum: ["kRid","kRfc2307","kSfu30","kCentrify","kFixed","kCustomAttributes","kLdapProvider"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this user Id mapping -func (m *UserIDMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCentrifyZoneMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomAttributesMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFixedMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserIDMapping) validateCentrifyZoneMapping(formats strfmt.Registry) error { - if swag.IsZero(m.CentrifyZoneMapping) { // not required - return nil - } - - if m.CentrifyZoneMapping != nil { - if err := m.CentrifyZoneMapping.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZoneMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZoneMapping") - } - return err - } - } - - return nil -} - -func (m *UserIDMapping) validateCustomAttributesMapping(formats strfmt.Registry) error { - if swag.IsZero(m.CustomAttributesMapping) { // not required - return nil - } - - if m.CustomAttributesMapping != nil { - if err := m.CustomAttributesMapping.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesMapping") - } - return err - } - } - - return nil -} - -func (m *UserIDMapping) validateFixedMapping(formats strfmt.Registry) error { - if swag.IsZero(m.FixedMapping) { // not required - return nil - } - - if m.FixedMapping != nil { - if err := m.FixedMapping.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedMapping") - } - return err - } - } - - return nil -} - -var userIdMappingTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRid","kRfc2307","kSfu30","kCentrify","kFixed","kCustomAttributes","kLdapProvider"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userIdMappingTypeTypePropEnum = append(userIdMappingTypeTypePropEnum, v) - } -} - -const ( - - // UserIDMappingTypeKRid captures enum value "kRid" - UserIDMappingTypeKRid string = "kRid" - - // UserIDMappingTypeKRfc2307 captures enum value "kRfc2307" - UserIDMappingTypeKRfc2307 string = "kRfc2307" - - // UserIDMappingTypeKSfu30 captures enum value "kSfu30" - UserIDMappingTypeKSfu30 string = "kSfu30" - - // UserIDMappingTypeKCentrify captures enum value "kCentrify" - UserIDMappingTypeKCentrify string = "kCentrify" - - // UserIDMappingTypeKFixed captures enum value "kFixed" - UserIDMappingTypeKFixed string = "kFixed" - - // UserIDMappingTypeKCustomAttributes captures enum value "kCustomAttributes" - UserIDMappingTypeKCustomAttributes string = "kCustomAttributes" - - // UserIDMappingTypeKLdapProvider captures enum value "kLdapProvider" - UserIDMappingTypeKLdapProvider string = "kLdapProvider" -) - -// prop value enum -func (m *UserIDMapping) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userIdMappingTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserIDMapping) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this user Id mapping based on the context it is used -func (m *UserIDMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCentrifyZoneMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomAttributesMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFixedMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserIDMapping) contextValidateCentrifyZoneMapping(ctx context.Context, formats strfmt.Registry) error { - - if m.CentrifyZoneMapping != nil { - - if swag.IsZero(m.CentrifyZoneMapping) { // not required - return nil - } - - if err := m.CentrifyZoneMapping.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZoneMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZoneMapping") - } - return err - } - } - - return nil -} - -func (m *UserIDMapping) contextValidateCustomAttributesMapping(ctx context.Context, formats strfmt.Registry) error { - - if m.CustomAttributesMapping != nil { - - if swag.IsZero(m.CustomAttributesMapping) { // not required - return nil - } - - if err := m.CustomAttributesMapping.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesMapping") - } - return err - } - } - - return nil -} - -func (m *UserIDMapping) contextValidateFixedMapping(ctx context.Context, formats strfmt.Registry) error { - - if m.FixedMapping != nil { - - if swag.IsZero(m.FixedMapping) { // not required - return nil - } - - if err := m.FixedMapping.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedMapping") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedMapping") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserIDMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserIDMapping) UnmarshalBinary(b []byte) error { - var res UserIDMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_info.go b/v1/models/user_info.go deleted file mode 100644 index 11f616e0..00000000 --- a/v1/models/user_info.go +++ /dev/null @@ -1,61 +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" -) - -// UserInfo User Information. -// -// Specifies struct with basic user details. -// -// swagger:model UserInfo -type UserInfo struct { - - // Specifies domain name of the user. - Domain *string `json:"domain,omitempty"` - - // Specifies unique Security ID (SID) of the user. - Sid *string `json:"sid,omitempty"` - - // Specifies the tenant to which the user belongs to. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies user name of the user. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this user info -func (m *UserInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user info based on context it is used -func (m *UserInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserInfo) UnmarshalBinary(b []byte) error { - var res UserInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_information.go b/v1/models/user_information.go deleted file mode 100644 index 4d75a0a9..00000000 --- a/v1/models/user_information.go +++ /dev/null @@ -1,208 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UserInformation User Information. -// -// A message to encapsulate information about the user who made the request. -// Request should be filtered by these fields if specified so that only the -// objects that the user is permissioned for are returned. If both sid_vec & -// tenant_id are specified then an intersection of respective results should -// be returned. -// -// swagger:model UserInformation -type UserInformation struct { - - // Whether objects owned by subtenants should be returned. This would - // require a prefix search with the passed tenant_id. - // All tenants are considered sub-tenants of the admin. For GET requests, if - // tenant id is empty(admin user is querying) and if this flag is false, we - // will only return untagged objects. If it is true, we will return - // everything. - IncludeSubtenantObjects *bool `json:"includeSubtenantObjects,omitempty"` - - // Specifies the KeyValuePair that client (eg. Iris) wants to persist along - // with the corresponding (soon-to-be-created) Pulse task for the current - // action. Eg. pulse_attribute_vec can drive user notifications by - // associating a Pulse Task with user SID and later Pulse can be searched by - // client specified Sid to get all finished tasks for the logged in user. - PulseAttributeVec []*KeyValuePair `json:"pulseAttributeVec"` - - // If specified, only the objects associated with these SIDs should be - // returned. - SidVec []*ClusterConfigProtoSID `json:"sidVec"` - - // If specified, only the objects associated with this tenant should be - // returned. A given tenant ID is always a prefix of the ids of its - // subtenants. Eg. if tenant_id of cluster admin is empty string then it will - // be a prefix match for all the tenants on the cluster. - TenantIDVec []string `json:"tenantIdVec"` -} - -// Validate validates this user information -func (m *UserInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePulseAttributeVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSidVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserInformation) validatePulseAttributeVec(formats strfmt.Registry) error { - if swag.IsZero(m.PulseAttributeVec) { // not required - return nil - } - - for i := 0; i < len(m.PulseAttributeVec); i++ { - if swag.IsZero(m.PulseAttributeVec[i]) { // not required - continue - } - - if m.PulseAttributeVec[i] != nil { - if err := m.PulseAttributeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pulseAttributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pulseAttributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UserInformation) validateSidVec(formats strfmt.Registry) error { - if swag.IsZero(m.SidVec) { // not required - return nil - } - - for i := 0; i < len(m.SidVec); i++ { - if swag.IsZero(m.SidVec[i]) { // not required - continue - } - - if m.SidVec[i] != nil { - if err := m.SidVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sidVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sidVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user information based on the context it is used -func (m *UserInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePulseAttributeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSidVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserInformation) contextValidatePulseAttributeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PulseAttributeVec); i++ { - - if m.PulseAttributeVec[i] != nil { - - if swag.IsZero(m.PulseAttributeVec[i]) { // not required - return nil - } - - if err := m.PulseAttributeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pulseAttributeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pulseAttributeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UserInformation) contextValidateSidVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SidVec); i++ { - - if m.SidVec[i] != nil { - - if swag.IsZero(m.SidVec[i]) { // not required - return nil - } - - if err := m.SidVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sidVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sidVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserInformation) UnmarshalBinary(b []byte) error { - var res UserInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_license_info.go b/v1/models/user_license_info.go deleted file mode 100644 index 37488848..00000000 --- a/v1/models/user_license_info.go +++ /dev/null @@ -1,56 +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" -) - -// UserLicenseInfo user license info -// -// swagger:model UserLicenseInfo -type UserLicenseInfo struct { - - // Contains the used licenses last updated time. - LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"` - - // Contains the number of user salesforce user licenses in the organization. - NumUsedSfLicenses *uint32 `json:"numUsedSfLicenses,omitempty"` - - // Contains the total number of salesforce user licenses in the organization. - TotalSfLicenses *uint32 `json:"totalSfLicenses,omitempty"` -} - -// Validate validates this user license info -func (m *UserLicenseInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user license info based on context it is used -func (m *UserLicenseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserLicenseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserLicenseInfo) UnmarshalBinary(b []byte) error { - var res UserLicenseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_parameters.go b/v1/models/user_parameters.go deleted file mode 100644 index 65821ce4..00000000 --- a/v1/models/user_parameters.go +++ /dev/null @@ -1,348 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UserParameters User Request. -// -// Specifies the settings used to create/add a new user or modify an -// existing user. -// -// swagger:model UserParameters -type UserParameters struct { - - // Array of Additional Groups. - // - // Specifies the names of additional groups this User may belong to. - AdditionalGroupNames []string `json:"additionalGroupNames"` - - // Specifies the list of clusters this user has access to. If this is not - // specified, access will be granted to all clusters. - ClusterIdentifiers []*ClusterIdentifier `json:"clusterIdentifiers"` - - // Specifies a description about the user. - Description *string `json:"description,omitempty"` - - // Specifies the fully qualified domain name (FQDN) of an Active Directory - // or LOCAL for the default LOCAL domain on the Cohesity Cluster. - // A user is uniquely identified by combination of the username and - // the domain. - Domain *string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the user becomes - // effective. Until that time, the user cannot log in. - EffectiveTimeMsecs *int64 `json:"effectiveTimeMsecs,omitempty"` - - // Specifies the email address of the user. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies the epoch time in milliseconds when the user becomes - // expired. After that, the user cannot log in. - ExpiredTimeMsecs *int64 `json:"expiredTimeMsecs,omitempty"` - - // Specifies the password of this user. - Password *string `json:"password,omitempty"` - - // Specifies the name of the primary group of this User. - PrimaryGroupName *string `json:"primaryGroupName,omitempty"` - - // Array of Privileges. - // - // Specifies the Cohesity privileges from the roles. This will be populated - // based on the union of all privileges in roles. - // Type for unique privilege Id values. - // All below enum values specify a value for all uniquely defined - // privileges in Cohesity. - PrivilegeIds []string `json:"privilegeIds"` - - // Specifies the user profiles. - // NOTE: Currently used for Helios. - Profiles []*McmUserProfile `json:"profiles"` - - // Whether the user is a restricted user. A restricted user can only view - // the objects he has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Array of Roles. - // - // Specifies the Cohesity roles to associate with the user such as - // such as 'Admin', 'Ops' or 'View'. - // The Cohesity roles determine privileges on the Cohesity Cluster - // for this user. - Roles []string `json:"roles"` - - // Specifies the tenant access available to current user. - // NOTE: Currently used for Helios. - TenantAccesses []*TenantAccess `json:"tenantAccesses"` - - // Specifies the login name of the user. - Username *string `json:"username,omitempty"` -} - -// Validate validates this user parameters -func (m *UserParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIdentifiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivilegeIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProfiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantAccesses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserParameters) validateClusterIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifiers) { // not required - return nil - } - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - continue - } - - if m.ClusterIdentifiers[i] != nil { - if err := m.ClusterIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var userParametersPrivilegeIdsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrincipalView","kPrincipalModify","kAppLaunch","kAppsManagement","kOrganizationView","kOrganizationModify","kOrganizationImpersonate","kCloneView","kCloneModify","kClusterView","kClusterModify","kClusterCreate","kClusterSupport","kClusterUpgrade","kClusterRemoteView","kClusterRemoteModify","kClusterExternalTargetView","kClusterExternalTargetModify","kClusterAudit","kAlertView","kAlertModify","kVlanView","kVlanModify","kHybridExtenderView","kHybridExtenderDownload","kAdLdapView","kAdLdapModify","kSchedulerView","kSchedulerModify","kProtectionView","kProtectionModify","kProtectionJobOperate","kProtectionSourceModify","kProtectionPolicyView","kProtectionPolicyModify","kRestoreView","kRestoreModify","kRestoreDownload","kRemoteRestore","kStorageView","kStorageModify","kStorageDomainView","kStorageDomainModify","kAnalyticsView","kAnalyticsModify","kReportsView","kMcmModify","kDataSecurity","kSmbBackup","kSmbRestore","kSmbTakeOwnership","kSmbAuditing","kMcmUnregister","kMcmUpgrade","kMcmModifySuperAdmin","kMcmViewSuperAdmin","kMcmModifyCohesityAdmin","kMcmViewCohesityAdmin","kObjectSearch","kFileDatalockExpiryTimeDecrease"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userParametersPrivilegeIdsItemsEnum = append(userParametersPrivilegeIdsItemsEnum, v) - } -} - -func (m *UserParameters) validatePrivilegeIdsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userParametersPrivilegeIdsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserParameters) validatePrivilegeIds(formats strfmt.Registry) error { - if swag.IsZero(m.PrivilegeIds) { // not required - return nil - } - - for i := 0; i < len(m.PrivilegeIds); i++ { - - // value enum - if err := m.validatePrivilegeIdsItemsEnum("privilegeIds"+"."+strconv.Itoa(i), "body", m.PrivilegeIds[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *UserParameters) validateProfiles(formats strfmt.Registry) error { - if swag.IsZero(m.Profiles) { // not required - return nil - } - - for i := 0; i < len(m.Profiles); i++ { - if swag.IsZero(m.Profiles[i]) { // not required - continue - } - - if m.Profiles[i] != nil { - if err := m.Profiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UserParameters) validateTenantAccesses(formats strfmt.Registry) error { - if swag.IsZero(m.TenantAccesses) { // not required - return nil - } - - for i := 0; i < len(m.TenantAccesses); i++ { - if swag.IsZero(m.TenantAccesses[i]) { // not required - continue - } - - if m.TenantAccesses[i] != nil { - if err := m.TenantAccesses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user parameters based on the context it is used -func (m *UserParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProfiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantAccesses(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserParameters) contextValidateClusterIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - - if m.ClusterIdentifiers[i] != nil { - - if swag.IsZero(m.ClusterIdentifiers[i]) { // not required - return nil - } - - if err := m.ClusterIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UserParameters) contextValidateProfiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Profiles); i++ { - - if m.Profiles[i] != nil { - - if swag.IsZero(m.Profiles[i]) { // not required - return nil - } - - if err := m.Profiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UserParameters) contextValidateTenantAccesses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TenantAccesses); i++ { - - if m.TenantAccesses[i] != nil { - - if swag.IsZero(m.TenantAccesses[i]) { // not required - return nil - } - - if err := m.TenantAccesses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenantAccesses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserParameters) UnmarshalBinary(b []byte) error { - var res UserParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_preferences_result.go b/v1/models/user_preferences_result.go deleted file mode 100644 index dcf81e03..00000000 --- a/v1/models/user_preferences_result.go +++ /dev/null @@ -1,52 +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" -) - -// UserPreferencesResult User Preferences Result -// -// Specifies the result of user preference. -// -// swagger:model UserPreferencesResult -type UserPreferencesResult struct { - - // Preferences is a key-value map of preferences. - Preferences map[string]string `json:"preferences,omitempty"` -} - -// Validate validates this user preferences result -func (m *UserPreferencesResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user preferences result based on context it is used -func (m *UserPreferencesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserPreferencesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserPreferencesResult) UnmarshalBinary(b []byte) error { - var res UserPreferencesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_quota.go b/v1/models/user_quota.go deleted file mode 100644 index 35c03c2f..00000000 --- a/v1/models/user_quota.go +++ /dev/null @@ -1,127 +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" -) - -// UserQuota User Quota Policy. -// -// Specifies the quota policy applied to a user. -// -// swagger:model UserQuota -type UserQuota struct { - - // User quota policy applied to this user. - QuotaPolicy *QuotaPolicy `json:"quotaPolicy,omitempty"` - - // If interested in a user via smb_client, include SID. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - // The string is of following format - - // S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-...-SubAuthorityn. - Sid *string `json:"sid,omitempty"` - - // If interested in a user via unix-identifier, include UnixUid. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - UnixUID *uint32 `json:"unixUid,omitempty"` -} - -// Validate validates this user quota -func (m *UserQuota) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuota) validateQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if m.QuotaPolicy != nil { - if err := m.QuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this user quota based on the context it is used -func (m *UserQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuota) contextValidateQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.QuotaPolicy != nil { - - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuota) UnmarshalBinary(b []byte) error { - var res UserQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_quota_and_usage.go b/v1/models/user_quota_and_usage.go deleted file mode 100644 index 38cb8728..00000000 --- a/v1/models/user_quota_and_usage.go +++ /dev/null @@ -1,131 +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" -) - -// UserQuotaAndUsage User Quota And Usage. -// -// Specifies the quota override and usage statistics -// for a particular user. -// -// swagger:model UserQuotaAndUsage -type UserQuotaAndUsage struct { - - // User quota policy applied to this user. - QuotaPolicy *QuotaPolicy `json:"quotaPolicy,omitempty"` - - // If interested in a user via smb_client, include SID. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - // The string is of following format - - // S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-...-SubAuthorityn. - Sid *string `json:"sid,omitempty"` - - // If interested in a user via unix-identifier, include UnixUid. - // Otherwise, If a valid unix-id to SID mappings are available (i.e., when - // mixed mode is enabled) the server will perform the necessary id mapping - // and return the correct usage irrespective of whether the unix id / SID is - // provided. - UnixUID *uint32 `json:"unixUid,omitempty"` - - // Current logical usage of user id in the input view. - UsageBytes *int64 `json:"usageBytes,omitempty"` -} - -// Validate validates this user quota and usage -func (m *UserQuotaAndUsage) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaAndUsage) validateQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if m.QuotaPolicy != nil { - if err := m.QuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this user quota and usage based on the context it is used -func (m *UserQuotaAndUsage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaAndUsage) contextValidateQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.QuotaPolicy != nil { - - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuotaAndUsage) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaAndUsage) UnmarshalBinary(b []byte) error { - var res UserQuotaAndUsage - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_quota_settings.go b/v1/models/user_quota_settings.go deleted file mode 100644 index 3228ba5a..00000000 --- a/v1/models/user_quota_settings.go +++ /dev/null @@ -1,115 +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" -) - -// UserQuotaSettings User Quota Settings. -// -// Specifies the quota settings parameters for a particular user. -// -// swagger:model UserQuotaSettings -type UserQuotaSettings struct { - - // The default user quota policy for this view. - DefaultUserQuotaPolicy *QuotaPolicy `json:"defaultUserQuotaPolicy,omitempty"` - - // If set, it enables/disables the user quota overrides for a view. - // Otherwise, it leaves it at it's previous state. - EnableUserQuota *bool `json:"enableUserQuota,omitempty"` -} - -// Validate validates this user quota settings -func (m *UserQuotaSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaSettings) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - 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 -} - -// ContextValidate validate this user quota settings based on the context it is used -func (m *UserQuotaSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaSettings) 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 -} - -// MarshalBinary interface implementation -func (m *UserQuotaSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaSettings) UnmarshalBinary(b []byte) error { - var res UserQuotaSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_quota_summary_for_user.go b/v1/models/user_quota_summary_for_user.go deleted file mode 100644 index cf664e54..00000000 --- a/v1/models/user_quota_summary_for_user.go +++ /dev/null @@ -1,59 +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" -) - -// UserQuotaSummaryForUser User Quota Summary For User. -// -// Speifies the summary of quota information for a particular user. -// -// swagger:model UserQuotaSummaryForUser -type UserQuotaSummaryForUser struct { - - // Number of views in which user has exceeded alert threshold limit. - NumViewsAboveAlertThreshold *uint32 `json:"numViewsAboveAlertThreshold,omitempty"` - - // Number of views in which the user has exceeded hard limit. - NumViewsAboveHardLimit *uint32 `json:"numViewsAboveHardLimit,omitempty"` - - // Total number of views in which the user has a quota policy specified - // or has non-zero usage. - TotalNumViews *uint32 `json:"totalNumViews,omitempty"` -} - -// Validate validates this user quota summary for user -func (m *UserQuotaSummaryForUser) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user quota summary for user based on context it is used -func (m *UserQuotaSummaryForUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuotaSummaryForUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaSummaryForUser) UnmarshalBinary(b []byte) error { - var res UserQuotaSummaryForUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_quota_summary_for_view.go b/v1/models/user_quota_summary_for_view.go deleted file mode 100644 index 7a82f6fa..00000000 --- a/v1/models/user_quota_summary_for_view.go +++ /dev/null @@ -1,122 +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" -) - -// UserQuotaSummaryForView User Quota Summary For View. -// -// Specifies the user quota summary information/result for a view. -// -// swagger:model UserQuotaSummaryForView -type UserQuotaSummaryForView struct { - - // Default quota policy applied to all the users in the view who doesn't - // have a policy override. - DefaultUserQuotaPolicy *QuotaPolicy `json:"defaultUserQuotaPolicy,omitempty"` - - // Number of users who has exceeded their specified alert limit. - NumUsersAboveAlertThreshold *int64 `json:"numUsersAboveAlertThreshold,omitempty"` - - // Number of users who has exceeded their specified quota hard limit. - NumUsersAboveHardLimit *int64 `json:"numUsersAboveHardLimit,omitempty"` - - // Total number of users who has either a user quota policy override - // specified or has non-zero logical usage. - TotalNumUsers *int64 `json:"totalNumUsers,omitempty"` -} - -// Validate validates this user quota summary for view -func (m *UserQuotaSummaryForView) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaSummaryForView) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - 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 -} - -// ContextValidate validate this user quota summary for view based on the context it is used -func (m *UserQuotaSummaryForView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaSummaryForView) 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 -} - -// MarshalBinary interface implementation -func (m *UserQuotaSummaryForView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaSummaryForView) UnmarshalBinary(b []byte) error { - var res UserQuotaSummaryForView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/user_ssh_key.go b/v1/models/user_ssh_key.go deleted file mode 100644 index 507b7deb..00000000 --- a/v1/models/user_ssh_key.go +++ /dev/null @@ -1,55 +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" -) - -// UserSSHKey User ssh key info. -// -// UserSshKey specifies username and ssh key. -// -// swagger:model UserSshKey -type UserSSHKey struct { - - // Specifies SSH key needed to be added to the username passed. - SSHKey *string `json:"sshKey,omitempty"` - - // Specifies name of the user to add. - Username *string `json:"username,omitempty"` -} - -// Validate validates this user Ssh key -func (m *UserSSHKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user Ssh key based on context it is used -func (m *UserSSHKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserSSHKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserSSHKey) UnmarshalBinary(b []byte) error { - var res UserSSHKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/users_discovery_params.go b/v1/models/users_discovery_params.go deleted file mode 100644 index 29635056..00000000 --- a/v1/models/users_discovery_params.go +++ /dev/null @@ -1,74 +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" -) - -// UsersDiscoveryParams Source Discovery parameters for kUser entity type. -// -// Specifies discovery params for kUser entities. It should only be populated -// when the 'DiscoveryParams.discoverableObjectTypeList' includes 'kUsers'. -// -// swagger:model UsersDiscoveryParams -type UsersDiscoveryParams struct { - - // Specifies whether users' chats should be backed up or not. If this is - // false or not specified users' chats backup will not be done. - AllowChatsBackup *bool `json:"allowChatsBackup,omitempty"` - - // Specifies if office 365 users with valid mailboxes should be discovered or - // not. - DiscoverUsersWithMailbox *bool `json:"discoverUsersWithMailbox,omitempty"` - - // Specifies if office 365 users with valid Onedrives should be discovered or - // not. - DiscoverUsersWithOnedrive *bool `json:"discoverUsersWithOnedrive,omitempty"` - - // Specifies whether users' mailbox info including the provisioning status, - // mailbox type & in-place archival support will be fetched and processed. - FetchMailboxInfo *bool `json:"fetchMailboxInfo,omitempty"` - - // Specifies whether users' onedrive info including the provisioning status & - // storage quota will be fetched and processed. - FetchOneDriveInfo *bool `json:"fetchOneDriveInfo,omitempty"` - - // Specifies whether to skip processing user who have uninitialized OneDrive - // or are without MySite. - SkipUsersWithoutMySite *bool `json:"skipUsersWithoutMySite,omitempty"` -} - -// Validate validates this users discovery params -func (m *UsersDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this users discovery params based on context it is used -func (m *UsersDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UsersDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsersDiscoveryParams) UnmarshalBinary(b []byte) error { - var res UsersDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/uuid_config_proto.go b/v1/models/uuid_config_proto.go deleted file mode 100644 index be38faea..00000000 --- a/v1/models/uuid_config_proto.go +++ /dev/null @@ -1,50 +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" -) - -// UUIDConfigProto Proto to specify UUID config of an object. -// -// swagger:model UuidConfigProto -type UUIDConfigProto struct { - - // preserve Uuid - PreserveUUID *bool `json:"preserveUuid,omitempty"` -} - -// Validate validates this Uuid config proto -func (m *UUIDConfigProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Uuid config proto based on context it is used -func (m *UUIDConfigProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UUIDConfigProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UUIDConfigProto) UnmarshalBinary(b []byte) error { - var res UUIDConfigProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_c_d_attributes.go b/v1/models/v_c_d_attributes.go deleted file mode 100644 index f29d4c1c..00000000 --- a/v1/models/v_c_d_attributes.go +++ /dev/null @@ -1,157 +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" -) - -// VCDAttributes Message capturing additional vCD related attributes. -// -// swagger:model VCDAttributes -type VCDAttributes struct { - - // The VCD uuid for catalog. - CatalogID *string `json:"catalogId,omitempty"` - - // The VCD uuid for catalog item. - CatalogItemUUID *string `json:"catalogItemUuid,omitempty"` - - // Is this is a standalone VCD VM. - IsStandaloneVM *bool `json:"isStandaloneVm,omitempty"` - - // If the vCD entity is a kVirtualApp and this vApp is auto-generated (for - // standalone VM), then this will be set to true and false otherwise. - IsVappAutoGenerated *bool `json:"isVappAutoGenerated,omitempty"` - - // If this is a vApp template. Only applicable of kvApp type objects. - IsVappTemplate *bool `json:"isVappTemplate,omitempty"` - - // This contains the entity id of the parent VDC. - ParentVdcUUID *string `json:"parentVdcUuid,omitempty"` - - // This contains the name or the provider VDC. - ProviderVdcName *string `json:"providerVdcName,omitempty"` - - // This contains the uuid or the provider VDC. - ProviderVdcUUID *string `json:"providerVdcUuid,omitempty"` - - // This contains the entity-id of the resource pool, the VM is part of. - ResgrpEntityID *int64 `json:"resgrpEntityId,omitempty"` - - // This contains the MORef of the resource pool, this VM entity is part of. - ResourcePoolMoref *string `json:"resourcePoolMoref,omitempty"` - - // The storage profiles associated with the VM. This is only populated - // for VM type entity. - StorageProfileUUID *string `json:"storageProfileUuid,omitempty"` - - // This contains the MORef of the VCDs resource pool. - VcdResourcePoolMoref *MORef `json:"vcdResourcePoolMoref,omitempty"` - - // This is set for certain objects of vCloud director. - VcdUUID *string `json:"vcdUuid,omitempty"` - - // This contains the vCenter endpoint. - VcenterEndpoint *string `json:"vcenterEndpoint,omitempty"` - - // This contains the vCenter id. - VcenterID *string `json:"vcenterId,omitempty"` - - // This contains the vCenter name. - // TODO(Chinmaya): Replace this with entity id or the UUID of the vCenter. - VcenterName *string `json:"vcenterName,omitempty"` -} - -// Validate validates this v c d attributes -func (m *VCDAttributes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcdResourcePoolMoref(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDAttributes) validateVcdResourcePoolMoref(formats strfmt.Registry) error { - if swag.IsZero(m.VcdResourcePoolMoref) { // not required - return nil - } - - if m.VcdResourcePoolMoref != nil { - if err := m.VcdResourcePoolMoref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdResourcePoolMoref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdResourcePoolMoref") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v c d attributes based on the context it is used -func (m *VCDAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVcdResourcePoolMoref(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDAttributes) contextValidateVcdResourcePoolMoref(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdResourcePoolMoref != nil { - - if swag.IsZero(m.VcdResourcePoolMoref) { // not required - return nil - } - - if err := m.VcdResourcePoolMoref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdResourcePoolMoref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdResourcePoolMoref") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VCDAttributes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCDAttributes) UnmarshalBinary(b []byte) error { - var res VCDAttributes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_c_d_backup_params.go b/v1/models/v_c_d_backup_params.go deleted file mode 100644 index 8e869ff8..00000000 --- a/v1/models/v_c_d_backup_params.go +++ /dev/null @@ -1,122 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VCDBackupParams The message contains any backup related info for the kvCloudDirector -// environment. -// -// swagger:model VCDBackupParams -type VCDBackupParams struct { - - // Map from VM id to VApp it is part of. - VMToVappMap []*VCDBackupParamsVMToVappMapEntry `json:"vmToVappMap"` -} - -// Validate validates this v c d backup params -func (m *VCDBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVMToVappMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDBackupParams) validateVMToVappMap(formats strfmt.Registry) error { - if swag.IsZero(m.VMToVappMap) { // not required - return nil - } - - for i := 0; i < len(m.VMToVappMap); i++ { - if swag.IsZero(m.VMToVappMap[i]) { // not required - continue - } - - if m.VMToVappMap[i] != nil { - if err := m.VMToVappMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmToVappMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmToVappMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v c d backup params based on the context it is used -func (m *VCDBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVMToVappMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDBackupParams) contextValidateVMToVappMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMToVappMap); i++ { - - if m.VMToVappMap[i] != nil { - - if swag.IsZero(m.VMToVappMap[i]) { // not required - return nil - } - - if err := m.VMToVappMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmToVappMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmToVappMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VCDBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCDBackupParams) UnmarshalBinary(b []byte) error { - var res VCDBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_c_d_backup_params_vm_to_vapp_map_entry.go b/v1/models/v_c_d_backup_params_vm_to_vapp_map_entry.go deleted file mode 100644 index 5f8cb9c7..00000000 --- a/v1/models/v_c_d_backup_params_vm_to_vapp_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// VCDBackupParamsVMToVappMapEntry v c d backup params Vm to vapp map entry -// -// swagger:model VCDBackupParams_VmToVappMapEntry -type VCDBackupParamsVMToVappMapEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *BackupTaskStateVappInfoProto `json:"value,omitempty"` -} - -// Validate validates this v c d backup params Vm to vapp map entry -func (m *VCDBackupParamsVMToVappMapEntry) 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 -} - -func (m *VCDBackupParamsVMToVappMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v c d backup params Vm to vapp map entry based on the context it is used -func (m *VCDBackupParamsVMToVappMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDBackupParamsVMToVappMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VCDBackupParamsVMToVappMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCDBackupParamsVMToVappMapEntry) UnmarshalBinary(b []byte) error { - var res VCDBackupParamsVMToVappMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_c_d_catalog.go b/v1/models/v_c_d_catalog.go deleted file mode 100644 index a63c91ba..00000000 --- a/v1/models/v_c_d_catalog.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" -) - -// VCDCatalog v c d catalog -// -// swagger:model VCDCatalog -type VCDCatalog struct { - - // This is the name of the catalog. - Name *string `json:"name,omitempty"` - - // This is the uuid of catalog as identified by VCD. - VcdUUID *string `json:"vcdUuid,omitempty"` -} - -// Validate validates this v c d catalog -func (m *VCDCatalog) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v c d catalog based on context it is used -func (m *VCDCatalog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VCDCatalog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCDCatalog) UnmarshalBinary(b []byte) error { - var res VCDCatalog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_c_d_v_center_info.go b/v1/models/v_c_d_v_center_info.go deleted file mode 100644 index 0e3f5a84..00000000 --- a/v1/models/v_c_d_v_center_info.go +++ /dev/null @@ -1,128 +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" -) - -// VCDVCenterInfo VCD Vcenter information. -// -// swagger:model VCDVCenterInfo -type VCDVCenterInfo struct { - - // vCenter credentials. - Credentials *PrivateCredentials `json:"credentials,omitempty"` - - // vCenter endpoint. - Endpoint *string `json:"endpoint,omitempty"` - - // Unique id associated with this vCenter when it is registered, this is used - // while constructing the connector params. - ID *int64 `json:"id,omitempty"` - - // vCenter name. - Name *string `json:"name,omitempty"` - - // Whether to register the source as stand alone. - // NOTE: This information is not used after first time registration is - // complete. - RegisterAsStandaloneSource *bool `json:"registerAsStandaloneSource,omitempty"` - - // A version that is associated with the params. This is updated anytime - // any of the params change. This is used to discard older connector params. - Version *int64 `json:"version,omitempty"` -} - -// Validate validates this v c d v center info -func (m *VCDVCenterInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDVCenterInfo) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v c d v center info based on the context it is used -func (m *VCDVCenterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VCDVCenterInfo) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VCDVCenterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCDVCenterInfo) UnmarshalBinary(b []byte) error { - var res VCDVCenterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_cloud_director_info.go b/v1/models/v_cloud_director_info.go deleted file mode 100644 index 6ecfb847..00000000 --- a/v1/models/v_cloud_director_info.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" -) - -// VCloudDirectorInfo VCloudDirectorInfo Information. -// -// swagger:model VCloudDirectorInfo -type VCloudDirectorInfo struct { - - // vCenter endpoint. - Endpoint *string `json:"endpoint,omitempty"` - - // vCenter name. - Name *string `json:"name,omitempty"` -} - -// Validate validates this v cloud director info -func (m *VCloudDirectorInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v cloud director info based on context it is used -func (m *VCloudDirectorInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VCloudDirectorInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VCloudDirectorInfo) UnmarshalBinary(b []byte) error { - var res VCloudDirectorInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_add_snapshot_arg.go b/v1/models/v_mware_add_snapshot_arg.go deleted file mode 100644 index 5c6d39eb..00000000 --- a/v1/models/v_mware_add_snapshot_arg.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMwareAddSnapshotArg v mware add snapshot arg -// -// swagger:model VMwareAddSnapshotArg -type VMwareAddSnapshotArg struct { - - // Information regarding any additional files that are backed up (such as VMX - // files). - AdditionalFileInfoVec []*VMwareAddSnapshotArgAdditionalFileInfo `json:"additionalFileInfoVec"` - - // Whether the snapshot is quiesced. - IsQuiesced *bool `json:"isQuiesced,omitempty"` -} - -// Validate validates this v mware add snapshot arg -func (m *VMwareAddSnapshotArg) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdditionalFileInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareAddSnapshotArg) validateAdditionalFileInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.AdditionalFileInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalFileInfoVec); i++ { - if swag.IsZero(m.AdditionalFileInfoVec[i]) { // not required - continue - } - - if m.AdditionalFileInfoVec[i] != nil { - if err := m.AdditionalFileInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v mware add snapshot arg based on the context it is used -func (m *VMwareAddSnapshotArg) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdditionalFileInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareAddSnapshotArg) contextValidateAdditionalFileInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalFileInfoVec); i++ { - - if m.AdditionalFileInfoVec[i] != nil { - - if swag.IsZero(m.AdditionalFileInfoVec[i]) { // not required - return nil - } - - if err := m.AdditionalFileInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalFileInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalFileInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareAddSnapshotArg) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareAddSnapshotArg) UnmarshalBinary(b []byte) error { - var res VMwareAddSnapshotArg - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_add_snapshot_arg_additional_file_info.go b/v1/models/v_mware_add_snapshot_arg_additional_file_info.go deleted file mode 100644 index 30aa411f..00000000 --- a/v1/models/v_mware_add_snapshot_arg_additional_file_info.go +++ /dev/null @@ -1,59 +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" -) - -// VMwareAddSnapshotArgAdditionalFileInfo This captures any additional files that were fetched from the backup -// source and are stored in Bridge and should be made available for restore. -// -// swagger:model VMwareAddSnapshotArg_AdditionalFileInfo -type VMwareAddSnapshotArgAdditionalFileInfo struct { - - // This is set if there were any errors. This can be used to determine if - // the file is available for restore or not. - ErrorMsg *string `json:"errorMsg,omitempty"` - - // Filename of the file available for restore. This is just the basename - // of the file relative to the snapshot_dir. - FileName *string `json:"fileName,omitempty"` - - // Type of the file backed up. - FileType *int32 `json:"fileType,omitempty"` -} - -// Validate validates this v mware add snapshot arg additional file info -func (m *VMwareAddSnapshotArgAdditionalFileInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v mware add snapshot arg additional file info based on context it is used -func (m *VMwareAddSnapshotArgAdditionalFileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareAddSnapshotArgAdditionalFileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareAddSnapshotArgAdditionalFileInfo) UnmarshalBinary(b []byte) error { - var res VMwareAddSnapshotArgAdditionalFileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_backup_env_params.go b/v1/models/v_mware_backup_env_params.go deleted file mode 100644 index 56d97dc0..00000000 --- a/v1/models/v_mware_backup_env_params.go +++ /dev/null @@ -1,208 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMwareBackupEnvParams VMware Backup Environment Parameters. -// -// Message to capture any additional backup params for a VMware environment. -// -// swagger:model VMwareBackupEnvParams -type VMwareBackupEnvParams struct { - - // Whether to fallback to take a crash-consistent snapshot incase taking - // an app-consistent snapshot fails. - AllowCrashConsistentSnapshot *bool `json:"allowCrashConsistentSnapshot,omitempty"` - - // Whether to fallback to use NBDSSL transport for backup in case using - // SAN transport backup fails. - AllowNbdsslTransportFallback *bool `json:"allowNbdsslTransportFallback,omitempty"` - - // Physical RDM disks cannot be backed up using VADP. By default the backups - // of such VMs will fail. If this is set to true, then such VMs in this - // backup job will be backed up by excluding the physical RDM disks. - AllowVmsWithPhysicalRdmDisks *bool `json:"allowVmsWithPhysicalRdmDisks,omitempty"` - - // Whether the backup job should allow enabling CBT for VM when the backup - // runs. Currently, by default, the backup run enables CBT for a VM during - // the backup if it's not already enabled. However, there may be a case, - // where customer doesn't want to enable CBT during the backup. This param - // will be used to determine that. - EnableCbtAllowed *bool `json:"enableCbtAllowed,omitempty"` - - // List of all vApps and their corresponding child VMs being backed up in - // a backup run. This is only populated when vApp is being autoprotected. - VappsToVmsList []*VMwareBackupEnvParamsVAppChildVMsList `json:"vappsToVmsList"` - - // List of Virtual Disk(s) to be excluded from the backup job. These disks - // will be excluded for all VMs in this environment unless overriden by the - // disk exclusion list from BackupSourceParams.VMwareBackupSourceParams. - VmwareDiskExclusionInfo []*VMwareDiskExclusionProto `json:"vmwareDiskExclusionInfo"` -} - -// Validate validates this v mware backup env params -func (m *VMwareBackupEnvParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVappsToVmsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupEnvParams) validateVappsToVmsList(formats strfmt.Registry) error { - if swag.IsZero(m.VappsToVmsList) { // not required - return nil - } - - for i := 0; i < len(m.VappsToVmsList); i++ { - if swag.IsZero(m.VappsToVmsList[i]) { // not required - continue - } - - if m.VappsToVmsList[i] != nil { - if err := m.VappsToVmsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappsToVmsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappsToVmsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareBackupEnvParams) validateVmwareDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.VmwareDiskExclusionInfo); i++ { - if swag.IsZero(m.VmwareDiskExclusionInfo[i]) { // not required - continue - } - - if m.VmwareDiskExclusionInfo[i] != nil { - if err := m.VmwareDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v mware backup env params based on the context it is used -func (m *VMwareBackupEnvParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVappsToVmsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupEnvParams) contextValidateVappsToVmsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VappsToVmsList); i++ { - - if m.VappsToVmsList[i] != nil { - - if swag.IsZero(m.VappsToVmsList[i]) { // not required - return nil - } - - if err := m.VappsToVmsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vappsToVmsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vappsToVmsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareBackupEnvParams) contextValidateVmwareDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VmwareDiskExclusionInfo); i++ { - - if m.VmwareDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.VmwareDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.VmwareDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareBackupEnvParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareBackupEnvParams) UnmarshalBinary(b []byte) error { - var res VMwareBackupEnvParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_backup_env_params_v_app_child_v_ms_list.go b/v1/models/v_mware_backup_env_params_v_app_child_v_ms_list.go deleted file mode 100644 index 880b5299..00000000 --- a/v1/models/v_mware_backup_env_params_v_app_child_v_ms_list.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" -) - -// VMwareBackupEnvParamsVAppChildVMsList Proto to encapsulate list of all child VMs of vApp. -// -// swagger:model VMwareBackupEnvParams_VAppChildVMsList -type VMwareBackupEnvParamsVAppChildVMsList struct { - - // vApp entity id. - VappEntityID *int64 `json:"vappEntityId,omitempty"` - - // List of entity ids of all child VMs under vApp with id 'vapp_entity_id'. - VMEntityIds []int64 `json:"vmEntityIds"` -} - -// Validate validates this v mware backup env params v app child v ms list -func (m *VMwareBackupEnvParamsVAppChildVMsList) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v mware backup env params v app child v ms list based on context it is used -func (m *VMwareBackupEnvParamsVAppChildVMsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareBackupEnvParamsVAppChildVMsList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareBackupEnvParamsVAppChildVMsList) UnmarshalBinary(b []byte) error { - var res VMwareBackupEnvParamsVAppChildVMsList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_backup_params.go b/v1/models/v_mware_backup_params.go deleted file mode 100644 index 9ce0ea8f..00000000 --- a/v1/models/v_mware_backup_params.go +++ /dev/null @@ -1,245 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMwareBackupParams This message contains additional params for a VMware job run. -// -// swagger:model VMwareBackupParams -type VMwareBackupParams struct { - - // This is set to an appropriate size at which disk areas should be aligned. - // NOTE: If the value is -1, disk areas will not be aligned. - DiskAreaAlignmentSizeKb *int32 `json:"diskAreaAlignmentSizeKb,omitempty"` - - // This field stores the intent to persist CBT info in the backup task. - PreserveCbtInfoEnabled *bool `json:"preserveCbtInfoEnabled,omitempty"` - - // Storage snapshot provider params if any. - StorageSnapshotProviderParams []*StorageSnapshotProviderParams `json:"storageSnapshotProviderParams"` - - // Use SAN transport for backup. - UseSanTransport *bool `json:"useSanTransport,omitempty"` - - // VCD backup params (if any). - VcdBackupParams *VCDBackupParams `json:"vcdBackupParams,omitempty"` - - // This field stores a map of the VMware VM entity id to its progress monitor - // path. - VMEntityIDToProgressMonitorPath []*VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry `json:"vmEntityIdToProgressMonitorPath"` -} - -// Validate validates this v mware backup params -func (m *VMwareBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageSnapshotProviderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdBackupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMEntityIDToProgressMonitorPath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupParams) validateStorageSnapshotProviderParams(formats strfmt.Registry) error { - if swag.IsZero(m.StorageSnapshotProviderParams) { // not required - return nil - } - - for i := 0; i < len(m.StorageSnapshotProviderParams); i++ { - if swag.IsZero(m.StorageSnapshotProviderParams[i]) { // not required - continue - } - - if m.StorageSnapshotProviderParams[i] != nil { - if err := m.StorageSnapshotProviderParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProviderParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProviderParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareBackupParams) validateVcdBackupParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdBackupParams) { // not required - return nil - } - - if m.VcdBackupParams != nil { - if err := m.VcdBackupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdBackupParams") - } - return err - } - } - - return nil -} - -func (m *VMwareBackupParams) validateVMEntityIDToProgressMonitorPath(formats strfmt.Registry) error { - if swag.IsZero(m.VMEntityIDToProgressMonitorPath) { // not required - return nil - } - - for i := 0; i < len(m.VMEntityIDToProgressMonitorPath); i++ { - if swag.IsZero(m.VMEntityIDToProgressMonitorPath[i]) { // not required - continue - } - - if m.VMEntityIDToProgressMonitorPath[i] != nil { - if err := m.VMEntityIDToProgressMonitorPath[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmEntityIdToProgressMonitorPath" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmEntityIdToProgressMonitorPath" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v mware backup params based on the context it is used -func (m *VMwareBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageSnapshotProviderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdBackupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMEntityIDToProgressMonitorPath(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupParams) contextValidateStorageSnapshotProviderParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageSnapshotProviderParams); i++ { - - if m.StorageSnapshotProviderParams[i] != nil { - - if swag.IsZero(m.StorageSnapshotProviderParams[i]) { // not required - return nil - } - - if err := m.StorageSnapshotProviderParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageSnapshotProviderParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageSnapshotProviderParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareBackupParams) contextValidateVcdBackupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdBackupParams != nil { - - if swag.IsZero(m.VcdBackupParams) { // not required - return nil - } - - if err := m.VcdBackupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdBackupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdBackupParams") - } - return err - } - } - - return nil -} - -func (m *VMwareBackupParams) contextValidateVMEntityIDToProgressMonitorPath(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMEntityIDToProgressMonitorPath); i++ { - - if m.VMEntityIDToProgressMonitorPath[i] != nil { - - if swag.IsZero(m.VMEntityIDToProgressMonitorPath[i]) { // not required - return nil - } - - if err := m.VMEntityIDToProgressMonitorPath[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmEntityIdToProgressMonitorPath" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmEntityIdToProgressMonitorPath" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareBackupParams) UnmarshalBinary(b []byte) error { - var res VMwareBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_backup_params_vm_entity_id_to_progress_monitor_path_entry.go b/v1/models/v_mware_backup_params_vm_entity_id_to_progress_monitor_path_entry.go deleted file mode 100644 index 565ec1d7..00000000 --- a/v1/models/v_mware_backup_params_vm_entity_id_to_progress_monitor_path_entry.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" -) - -// VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry v mware backup params Vm entity Id to progress monitor path entry -// -// swagger:model VMwareBackupParams_VmEntityIdToProgressMonitorPathEntry -type VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry struct { - - // key - Key *int64 `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this v mware backup params Vm entity Id to progress monitor path entry -func (m *VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v mware backup params Vm entity Id to progress monitor path entry based on context it is used -func (m *VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry) UnmarshalBinary(b []byte) error { - var res VMwareBackupParamsVMEntityIDToProgressMonitorPathEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_backup_source_params.go b/v1/models/v_mware_backup_source_params.go deleted file mode 100644 index d1529879..00000000 --- a/v1/models/v_mware_backup_source_params.go +++ /dev/null @@ -1,230 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMwareBackupSourceParams VMware Backup Source Parameters. -// -// Message to capture additional backup params for a VMware type source. -// -// swagger:model VMwareBackupSourceParams -type VMwareBackupSourceParams struct { - - // This message will capture params for applications that are running as - // part of the server. - SourceAppParams *SourceAppParams `json:"sourceAppParams,omitempty"` - - // Target entity credentials. - // This should usually be set if the source_app_params is set, i.e any - // additional operations that require access within the guest. - VMCredentials *Credentials `json:"vmCredentials,omitempty"` - - // List of Virtual Disk(s) to be excluded from the backup job for the source. - // Overrides the exclusion list requested (if any) through - // EnvBackupParams.VMwareBackupEnvParams. - VmwareDiskExclusionInfo []*VMwareDiskExclusionProto `json:"vmwareDiskExclusionInfo"` -} - -// Validate validates this v mware backup source params -func (m *VMwareBackupSourceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceAppParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareDiskExclusionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupSourceParams) validateSourceAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if m.SourceAppParams != nil { - if err := m.SourceAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -func (m *VMwareBackupSourceParams) validateVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.VMCredentials) { // not required - 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 -} - -func (m *VMwareBackupSourceParams) validateVmwareDiskExclusionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareDiskExclusionInfo) { // not required - return nil - } - - for i := 0; i < len(m.VmwareDiskExclusionInfo); i++ { - if swag.IsZero(m.VmwareDiskExclusionInfo[i]) { // not required - continue - } - - if m.VmwareDiskExclusionInfo[i] != nil { - if err := m.VmwareDiskExclusionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v mware backup source params based on the context it is used -func (m *VMwareBackupSourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareDiskExclusionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareBackupSourceParams) contextValidateSourceAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceAppParams != nil { - - if swag.IsZero(m.SourceAppParams) { // not required - return nil - } - - if err := m.SourceAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAppParams") - } - return err - } - } - - return nil -} - -func (m *VMwareBackupSourceParams) 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 -} - -func (m *VMwareBackupSourceParams) contextValidateVmwareDiskExclusionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VmwareDiskExclusionInfo); i++ { - - if m.VmwareDiskExclusionInfo[i] != nil { - - if swag.IsZero(m.VmwareDiskExclusionInfo[i]) { // not required - return nil - } - - if err := m.VmwareDiskExclusionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareDiskExclusionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareBackupSourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareBackupSourceParams) UnmarshalBinary(b []byte) error { - var res VMwareBackupSourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_cdp_protection_source_info.go b/v1/models/v_mware_cdp_protection_source_info.go deleted file mode 100644 index 9ddf4b10..00000000 --- a/v1/models/v_mware_cdp_protection_source_info.go +++ /dev/null @@ -1,112 +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" -) - -// VMwareCdpProtectionSourceInfo VMware CDP Protection Source Details -// -// Specifies the details about the Continuous Data Protection (CDP) info of a -// VMware Protection Source. -// -// swagger:model VMwareCdpProtectionSourceInfo -type VMwareCdpProtectionSourceInfo struct { - - // Specifies the current state of the CDP IO Filter. - IoFilterState *CdpIoFilterState `json:"ioFilterState,omitempty"` -} - -// Validate validates this v mware cdp protection source info -func (m *VMwareCdpProtectionSourceInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIoFilterState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareCdpProtectionSourceInfo) validateIoFilterState(formats strfmt.Registry) error { - if swag.IsZero(m.IoFilterState) { // not required - return nil - } - - if m.IoFilterState != nil { - if err := m.IoFilterState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ioFilterState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ioFilterState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v mware cdp protection source info based on the context it is used -func (m *VMwareCdpProtectionSourceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIoFilterState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareCdpProtectionSourceInfo) contextValidateIoFilterState(ctx context.Context, formats strfmt.Registry) error { - - if m.IoFilterState != nil { - - if swag.IsZero(m.IoFilterState) { // not required - return nil - } - - if err := m.IoFilterState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ioFilterState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ioFilterState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareCdpProtectionSourceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareCdpProtectionSourceInfo) UnmarshalBinary(b []byte) error { - var res VMwareCdpProtectionSourceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_disk_exclusion_proto.go b/v1/models/v_mware_disk_exclusion_proto.go deleted file mode 100644 index 32e3692a..00000000 --- a/v1/models/v_mware_disk_exclusion_proto.go +++ /dev/null @@ -1,63 +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" -) - -// VMwareDiskExclusionProto VMware Disk Exclusion Proto. -// -// This message contains basic info of the disk to be excluded from backup. -// The info contained here: -// 1. should be enough to identify the disk during the backup job. -// 2. is a subset of the message fetched to be displayed to the end user. -// Example: entities/vmware.proto. -// Note: Currently this is only implemented for VMware type source. -// -// swagger:model VMwareDiskExclusionProto -type VMwareDiskExclusionProto struct { - - // Controller's bus-id controlling the virtual disk in question. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller's type (SCSI, IDE etc). - ControllerType *string `json:"controllerType,omitempty"` - - // Disk unit number to identify the virtual disk within a controller. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this v mware disk exclusion proto -func (m *VMwareDiskExclusionProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v mware disk exclusion proto based on context it is used -func (m *VMwareDiskExclusionProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareDiskExclusionProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareDiskExclusionProto) UnmarshalBinary(b []byte) error { - var res VMwareDiskExclusionProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_object_id.go b/v1/models/v_mware_object_id.go deleted file mode 100644 index 34e0c9eb..00000000 --- a/v1/models/v_mware_object_id.go +++ /dev/null @@ -1,64 +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" -) - -// VMwareObjectID VMware Object Id. -// -// Specifies a unique Protection Source id across Cohesity Clusters. -// It is derived from the id of the VMware Protection Source. -// -// swagger:model VMwareObjectId -type VMwareObjectID struct { - - // Specifies a UUID for the BIOS of a VMware object. This field will be - // populated only for VMware VMs and if the VMware source had been registered - // with the option to track VMs by their BIOS UUID. - BiosUUID *string `json:"biosUuid,omitempty"` - - // Specifies the Managed Object Reference Item. - MorItem *string `json:"morItem,omitempty"` - - // Specifies the Managed Object Reference Type. - MorType *string `json:"morType,omitempty"` - - // Specifies a Universally Unique Identifier (UUID) of a VMware Object. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this v mware object Id -func (m *VMwareObjectID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v mware object Id based on context it is used -func (m *VMwareObjectID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareObjectID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareObjectID) UnmarshalBinary(b []byte) error { - var res VMwareObjectID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_protection_source.go b/v1/models/v_mware_protection_source.go deleted file mode 100644 index 83d32411..00000000 --- a/v1/models/v_mware_protection_source.go +++ /dev/null @@ -1,1058 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VMwareProtectionSource VMware Protection Source. -// -// Specifies a Protection Source in a VMware environment. -// -// swagger:model VMwareProtectionSource -type VMwareProtectionSource struct { - - // Specifies the id of the persistent agent. - AgentID *int64 `json:"agentId,omitempty"` - - // Specifies the list of agent information on the Virtual Machine. - // This is set only if the Virtual Machine has persistent agent. - Agents []*AgentInformation `json:"agents"` - - // This field contains the details about Continuous Data Protection (CDP) of - // the Protection Source. - CdpInfo *VMwareCdpProtectionSourceInfo `json:"cdpInfo,omitempty"` - - // Specifies the connection state of the Object and are only valid for - // ESXi hosts ('kHostSystem') or Virtual Machines ('kVirtualMachine'). - // These enums are equivalent to the connection states documented in - // VMware's reference documentation. - // Examples of Cohesity connection states include 'kConnected', - // 'kDisconnected', 'kInacccessible', etc. - // 'kConnected' indicates that server has access to virtual machine. - // 'kDisconnected' indicates that server is currently disconnected to virtual - // machine. - // 'kInaccessible' indicates that one or more configuration files are - // inacccessible. - // 'kInvalid' indicates that virtual machine configuration is invalid. - // 'kOrphaned' indicates that virtual machine is no longer registered on the - // host it is associated with. - // 'kNotResponding' indicates that virtual machine has failed to respond - // due to external issues such as network connectivity, host not running etc. - // Enum: ["kConnected","kDisconnected","kInaccessible","kInvalid","kOrphaned","kNotResponding"] - ConnectionState *string `json:"connectionState,omitempty"` - - // Specifies additional information of entities of type 'kDatastore'. - DatastoreInfo *DatastoreInfo `json:"datastoreInfo,omitempty"` - - // Specifies the folder type for the 'kFolder' Object. - // 'kVMFolder' indicates folder can hold VMs or vApps. - // 'kHostFolder' indicates folder can hold hosts and compute resources. - // 'kDatastoreFolder' indicates folder can hold datastores and storage pods. - // 'kNetworkFolder' indicates folder can hold networks and switches. - // 'kRootFolder' indicates folder can hold datacenters. - // Enum: ["kVMFolder","kHostFolder","kDatastoreFolder","kNetworkFolder","kRootFolder"] - FolderType *string `json:"folderType,omitempty"` - - // Set to true if a persistent agent is running on the Virtual Machine. - // This is populated for entities of type 'kVirtualMachine'. - HasPersistentAgent *bool `json:"hasPersistentAgent,omitempty"` - - // Specifies the host type for the 'kVirtualMachine' Object. - // 'kLinux' indicates the Linux operating system. - // 'kWindows' indicates the Microsoft Windows operating system. - // 'kAix' indicates the IBM AIX operating system. - // 'kSolaris' indicates the Oracle Solaris operating system. - // 'kSapHana' indicates the Sap Hana database system developed by SAP SE. - // 'kSapOracle' indicates the Sap Oracle database system developed by SAP SE. - // 'kCockroachDB' indicates the CockroachDB database system. - // 'kMySQL' indicates the MySQL database system. - // 'kSapSybase' indicates the SapSybase database system. - // 'kSapMaxDB' indicates the SapMaxDB database system. - // 'kSapSybaseIQ' indicates the SapSybaseIQ database system. - // 'kDB2' indicates the DB2 database system. - // 'kSapASE' indicates the SapASE database system. - // 'kMariaDB' indicates the MariaDB database system. - // 'kPostgreSQL' indicates the PostgreSQL database system. - // 'kHPUX' indicates the HPUX database system. - // 'kVOS' indicates the VOS database system. - // 'kOther' indicates the other types of operating system. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the UUID of the VMware Protection Source. - ID *VMwareObjectID `json:"id,omitempty"` - - // This field can be used to capture IP Addresses for entities that have it. - IPDetails *IPDetails `json:"ipDetails,omitempty"` - - // The field indicates whether the VM is a Rigel/HyX VM. - IsSaasConnector *bool `json:"isSaasConnector,omitempty"` - - // IsTemplate specifies if the VM is a template or not. - IsVMTemplate *bool `json:"isVmTemplate,omitempty"` - - // This field is used for indicating that registered vmware source is a - // VMC (VMware Cloud) environment. - IsVmcEntity *bool `json:"isVmcEntity,omitempty"` - - // Specifies a human readable name of the Protection Source. - Name *string `json:"name,omitempty"` - - // Specifies the optional list of VM Tag attributes associated with this - // Object. - TagAttributes []*TagAttribute `json:"tagAttributes"` - - // Specifies the status of VMware Tools for the guest OS on the VM. - // This is only valid for the 'kVirtualMachine' type. - // 'kGuestToolsRunning' means the VMware tools are running on the guest OS. - // 'kGuestToolsNotRunning' means the VMware tools are not running on the - // guest OS. - // 'kUnknown' means the state of the VMware tools on the guest OS is not - // known. - // 'kGuestToolsExecutingScripts' means the guest OS is currently executing - // scripts using VMware tools. - // Enum: ["kUnknown","kGuestToolsExecutingScripts","kGuestToolsNotRunning","kGuestToolsRunning"] - ToolsRunningStatus *string `json:"toolsRunningStatus,omitempty"` - - // Specifies the type of managed Object in a VMware Protection Source. - // Examples of VMware Objects include 'kVCenter', 'kFolder', 'kDatacenter', - // 'kResourcePool', 'kDatastore', 'kVirtualMachine', etc. - // 'kVCenter' indicates the vCenter entity in a VMware protection source type. - // 'kFolder indicates the folder entity (of any kind) in a VMware protection source type. - // 'kDatacenter' indicates the datacenter entity in a VMware protection source type. - // 'kComputeResource' indicates the physical compute resource entity in a VMware - // protection source type. - // 'kResourcePool' indicates the set of physical resources within a compute resource - // or cloudcompute resource. - // 'kDataStore' indicates the datastore entity in a VMware protection source type. - // 'kHostSystem' indicates the ESXi host entity in a VMware protection source type. - // 'kVirtualMachine' indicates the virtual machine entity in a VMware protection source type. - // 'kVirtualApp' indicates the virtual app entity in a VMware protection source type. - // 'kStandaloneHost' indicates the standalone ESXi host entity (not managed by vCenter) - // in a VMware protection source type. - // 'kStoragePod' indicates the storage pod entity in a VMware protection source type. - // 'kNetwork' indicates the standard vSwitch in a VMware protection source type. - // 'kDistributedVirtualPortgroup' indicates a distributed vSwitch port group in a - // VMware protection source type. - // 'kTagCategory' indicates a tag category entity in a VMware protection source type. - // 'kTag' indicates a tag entity in a VMware protection source type. - // 'kOpaqueNetwork' indicates an opaque network which is created and managed by an - // entity outside of vSphere. - // 'kvCloudDirector' indicates a vCloud director entity in a VMware protection source type. - // 'kOrganization' indicates an Organization under a vCD in a VMware protection source type. - // 'kVirtualDatacenter' indicates a virtual datacenter entity in a VMware protection source type. - // 'kCatalog' indicates a VCD catalog entity in a VMware protection source type. - // 'kOrgMetadata' indicates an VCD organization metadata in a VMware protection source type. - // 'kStoragePolicy' indicates a storage policy associated with the vApp in a VMware protection source type. - // Enum: ["kVCenter","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStandaloneHost","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kvCloudDirector","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy"] - Type *string `json:"type,omitempty"` - - // Specifies an array of vCenters to be registered - VCloudDirectorInfo []*VCloudDirectorInfo `json:"vCloudDirectorInfo"` - - // For vCenter and ESXi, this will show the software version. For VMs, this - // will show the hardware version. - Version *string `json:"version,omitempty"` - - // Specifies an array of virtual disks that are part of the Virtual Machine. - // This is populated for entities of type 'kVirtualMachine'. - VirtualDisks []*VirtualDiskInfo `json:"virtualDisks"` - - // This field contains information about a VM that has been migrated - // from another vCenter. This is only valid for the 'kVirtualMachine' type. - VMLinkingInfo *VMLinkingInfo `json:"vmLinkingInfo,omitempty"` -} - -// Validate validates this v mware protection source -func (m *VMwareProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFolderType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPDetails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagAttributes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateToolsRunningStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCloudDirectorInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMLinkingInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareProtectionSource) validateAgents(formats strfmt.Registry) error { - if swag.IsZero(m.Agents) { // not required - return nil - } - - for i := 0; i < len(m.Agents); i++ { - if swag.IsZero(m.Agents[i]) { // not required - continue - } - - if m.Agents[i] != nil { - if err := m.Agents[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) validateCdpInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -var vMwareProtectionSourceTypeConnectionStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kConnected","kDisconnected","kInaccessible","kInvalid","kOrphaned","kNotResponding"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vMwareProtectionSourceTypeConnectionStatePropEnum = append(vMwareProtectionSourceTypeConnectionStatePropEnum, v) - } -} - -const ( - - // VMwareProtectionSourceConnectionStateKConnected captures enum value "kConnected" - VMwareProtectionSourceConnectionStateKConnected string = "kConnected" - - // VMwareProtectionSourceConnectionStateKDisconnected captures enum value "kDisconnected" - VMwareProtectionSourceConnectionStateKDisconnected string = "kDisconnected" - - // VMwareProtectionSourceConnectionStateKInaccessible captures enum value "kInaccessible" - VMwareProtectionSourceConnectionStateKInaccessible string = "kInaccessible" - - // VMwareProtectionSourceConnectionStateKInvalid captures enum value "kInvalid" - VMwareProtectionSourceConnectionStateKInvalid string = "kInvalid" - - // VMwareProtectionSourceConnectionStateKOrphaned captures enum value "kOrphaned" - VMwareProtectionSourceConnectionStateKOrphaned string = "kOrphaned" - - // VMwareProtectionSourceConnectionStateKNotResponding captures enum value "kNotResponding" - VMwareProtectionSourceConnectionStateKNotResponding string = "kNotResponding" -) - -// prop value enum -func (m *VMwareProtectionSource) validateConnectionStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vMwareProtectionSourceTypeConnectionStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMwareProtectionSource) validateConnectionState(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - // value enum - if err := m.validateConnectionStateEnum("connectionState", "body", *m.ConnectionState); err != nil { - return err - } - - return nil -} - -func (m *VMwareProtectionSource) validateDatastoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if m.DatastoreInfo != nil { - if err := m.DatastoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -var vMwareProtectionSourceTypeFolderTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMFolder","kHostFolder","kDatastoreFolder","kNetworkFolder","kRootFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vMwareProtectionSourceTypeFolderTypePropEnum = append(vMwareProtectionSourceTypeFolderTypePropEnum, v) - } -} - -const ( - - // VMwareProtectionSourceFolderTypeKVMFolder captures enum value "kVMFolder" - VMwareProtectionSourceFolderTypeKVMFolder string = "kVMFolder" - - // VMwareProtectionSourceFolderTypeKHostFolder captures enum value "kHostFolder" - VMwareProtectionSourceFolderTypeKHostFolder string = "kHostFolder" - - // VMwareProtectionSourceFolderTypeKDatastoreFolder captures enum value "kDatastoreFolder" - VMwareProtectionSourceFolderTypeKDatastoreFolder string = "kDatastoreFolder" - - // VMwareProtectionSourceFolderTypeKNetworkFolder captures enum value "kNetworkFolder" - VMwareProtectionSourceFolderTypeKNetworkFolder string = "kNetworkFolder" - - // VMwareProtectionSourceFolderTypeKRootFolder captures enum value "kRootFolder" - VMwareProtectionSourceFolderTypeKRootFolder string = "kRootFolder" -) - -// prop value enum -func (m *VMwareProtectionSource) validateFolderTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vMwareProtectionSourceTypeFolderTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMwareProtectionSource) validateFolderType(formats strfmt.Registry) error { - if swag.IsZero(m.FolderType) { // not required - return nil - } - - // value enum - if err := m.validateFolderTypeEnum("folderType", "body", *m.FolderType); err != nil { - return err - } - - return nil -} - -var vMwareProtectionSourceTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vMwareProtectionSourceTypeHostTypePropEnum = append(vMwareProtectionSourceTypeHostTypePropEnum, v) - } -} - -const ( - - // VMwareProtectionSourceHostTypeKLinux captures enum value "kLinux" - VMwareProtectionSourceHostTypeKLinux string = "kLinux" - - // VMwareProtectionSourceHostTypeKWindows captures enum value "kWindows" - VMwareProtectionSourceHostTypeKWindows string = "kWindows" - - // VMwareProtectionSourceHostTypeKAix captures enum value "kAix" - VMwareProtectionSourceHostTypeKAix string = "kAix" - - // VMwareProtectionSourceHostTypeKSolaris captures enum value "kSolaris" - VMwareProtectionSourceHostTypeKSolaris string = "kSolaris" - - // VMwareProtectionSourceHostTypeKSapHana captures enum value "kSapHana" - VMwareProtectionSourceHostTypeKSapHana string = "kSapHana" - - // VMwareProtectionSourceHostTypeKSapOracle captures enum value "kSapOracle" - VMwareProtectionSourceHostTypeKSapOracle string = "kSapOracle" - - // VMwareProtectionSourceHostTypeKCockroachDB captures enum value "kCockroachDB" - VMwareProtectionSourceHostTypeKCockroachDB string = "kCockroachDB" - - // VMwareProtectionSourceHostTypeKMySQL captures enum value "kMySQL" - VMwareProtectionSourceHostTypeKMySQL string = "kMySQL" - - // VMwareProtectionSourceHostTypeKOther captures enum value "kOther" - VMwareProtectionSourceHostTypeKOther string = "kOther" - - // VMwareProtectionSourceHostTypeKSapSybase captures enum value "kSapSybase" - VMwareProtectionSourceHostTypeKSapSybase string = "kSapSybase" - - // VMwareProtectionSourceHostTypeKSapMaxDB captures enum value "kSapMaxDB" - VMwareProtectionSourceHostTypeKSapMaxDB string = "kSapMaxDB" - - // VMwareProtectionSourceHostTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - VMwareProtectionSourceHostTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // VMwareProtectionSourceHostTypeKDB2 captures enum value "kDB2" - VMwareProtectionSourceHostTypeKDB2 string = "kDB2" - - // VMwareProtectionSourceHostTypeKSapASE captures enum value "kSapASE" - VMwareProtectionSourceHostTypeKSapASE string = "kSapASE" - - // VMwareProtectionSourceHostTypeKMariaDB captures enum value "kMariaDB" - VMwareProtectionSourceHostTypeKMariaDB string = "kMariaDB" - - // VMwareProtectionSourceHostTypeKPostgreSQL captures enum value "kPostgreSQL" - VMwareProtectionSourceHostTypeKPostgreSQL string = "kPostgreSQL" - - // VMwareProtectionSourceHostTypeKVOS captures enum value "kVOS" - VMwareProtectionSourceHostTypeKVOS string = "kVOS" - - // VMwareProtectionSourceHostTypeKHPUX captures enum value "kHPUX" - VMwareProtectionSourceHostTypeKHPUX string = "kHPUX" -) - -// prop value enum -func (m *VMwareProtectionSource) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vMwareProtectionSourceTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMwareProtectionSource) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -func (m *VMwareProtectionSource) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -func (m *VMwareProtectionSource) validateIPDetails(formats strfmt.Registry) error { - if swag.IsZero(m.IPDetails) { // not required - return nil - } - - if m.IPDetails != nil { - if err := m.IPDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipDetails") - } - return err - } - } - - return nil -} - -func (m *VMwareProtectionSource) validateTagAttributes(formats strfmt.Registry) error { - if swag.IsZero(m.TagAttributes) { // not required - return nil - } - - for i := 0; i < len(m.TagAttributes); i++ { - if swag.IsZero(m.TagAttributes[i]) { // not required - continue - } - - if m.TagAttributes[i] != nil { - if err := m.TagAttributes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var vMwareProtectionSourceTypeToolsRunningStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnknown","kGuestToolsExecutingScripts","kGuestToolsNotRunning","kGuestToolsRunning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vMwareProtectionSourceTypeToolsRunningStatusPropEnum = append(vMwareProtectionSourceTypeToolsRunningStatusPropEnum, v) - } -} - -const ( - - // VMwareProtectionSourceToolsRunningStatusKUnknown captures enum value "kUnknown" - VMwareProtectionSourceToolsRunningStatusKUnknown string = "kUnknown" - - // VMwareProtectionSourceToolsRunningStatusKGuestToolsExecutingScripts captures enum value "kGuestToolsExecutingScripts" - VMwareProtectionSourceToolsRunningStatusKGuestToolsExecutingScripts string = "kGuestToolsExecutingScripts" - - // VMwareProtectionSourceToolsRunningStatusKGuestToolsNotRunning captures enum value "kGuestToolsNotRunning" - VMwareProtectionSourceToolsRunningStatusKGuestToolsNotRunning string = "kGuestToolsNotRunning" - - // VMwareProtectionSourceToolsRunningStatusKGuestToolsRunning captures enum value "kGuestToolsRunning" - VMwareProtectionSourceToolsRunningStatusKGuestToolsRunning string = "kGuestToolsRunning" -) - -// prop value enum -func (m *VMwareProtectionSource) validateToolsRunningStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vMwareProtectionSourceTypeToolsRunningStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMwareProtectionSource) validateToolsRunningStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ToolsRunningStatus) { // not required - return nil - } - - // value enum - if err := m.validateToolsRunningStatusEnum("toolsRunningStatus", "body", *m.ToolsRunningStatus); err != nil { - return err - } - - return nil -} - -var vMwareProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStandaloneHost","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kvCloudDirector","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vMwareProtectionSourceTypeTypePropEnum = append(vMwareProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // VMwareProtectionSourceTypeKVCenter captures enum value "kVCenter" - VMwareProtectionSourceTypeKVCenter string = "kVCenter" - - // VMwareProtectionSourceTypeKFolder captures enum value "kFolder" - VMwareProtectionSourceTypeKFolder string = "kFolder" - - // VMwareProtectionSourceTypeKDatacenter captures enum value "kDatacenter" - VMwareProtectionSourceTypeKDatacenter string = "kDatacenter" - - // VMwareProtectionSourceTypeKComputeResource captures enum value "kComputeResource" - VMwareProtectionSourceTypeKComputeResource string = "kComputeResource" - - // VMwareProtectionSourceTypeKClusterComputeResource captures enum value "kClusterComputeResource" - VMwareProtectionSourceTypeKClusterComputeResource string = "kClusterComputeResource" - - // VMwareProtectionSourceTypeKResourcePool captures enum value "kResourcePool" - VMwareProtectionSourceTypeKResourcePool string = "kResourcePool" - - // VMwareProtectionSourceTypeKDatastore captures enum value "kDatastore" - VMwareProtectionSourceTypeKDatastore string = "kDatastore" - - // VMwareProtectionSourceTypeKHostSystem captures enum value "kHostSystem" - VMwareProtectionSourceTypeKHostSystem string = "kHostSystem" - - // VMwareProtectionSourceTypeKVirtualMachine captures enum value "kVirtualMachine" - VMwareProtectionSourceTypeKVirtualMachine string = "kVirtualMachine" - - // VMwareProtectionSourceTypeKVirtualApp captures enum value "kVirtualApp" - VMwareProtectionSourceTypeKVirtualApp string = "kVirtualApp" - - // VMwareProtectionSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - VMwareProtectionSourceTypeKStandaloneHost string = "kStandaloneHost" - - // VMwareProtectionSourceTypeKStoragePod captures enum value "kStoragePod" - VMwareProtectionSourceTypeKStoragePod string = "kStoragePod" - - // VMwareProtectionSourceTypeKNetwork captures enum value "kNetwork" - VMwareProtectionSourceTypeKNetwork string = "kNetwork" - - // VMwareProtectionSourceTypeKDistributedVirtualPortgroup captures enum value "kDistributedVirtualPortgroup" - VMwareProtectionSourceTypeKDistributedVirtualPortgroup string = "kDistributedVirtualPortgroup" - - // VMwareProtectionSourceTypeKTagCategory captures enum value "kTagCategory" - VMwareProtectionSourceTypeKTagCategory string = "kTagCategory" - - // VMwareProtectionSourceTypeKTag captures enum value "kTag" - VMwareProtectionSourceTypeKTag string = "kTag" - - // VMwareProtectionSourceTypeKOpaqueNetwork captures enum value "kOpaqueNetwork" - VMwareProtectionSourceTypeKOpaqueNetwork string = "kOpaqueNetwork" - - // VMwareProtectionSourceTypeKvCloudDirector captures enum value "kvCloudDirector" - VMwareProtectionSourceTypeKvCloudDirector string = "kvCloudDirector" - - // VMwareProtectionSourceTypeKOrganization captures enum value "kOrganization" - VMwareProtectionSourceTypeKOrganization string = "kOrganization" - - // VMwareProtectionSourceTypeKVirtualDatacenter captures enum value "kVirtualDatacenter" - VMwareProtectionSourceTypeKVirtualDatacenter string = "kVirtualDatacenter" - - // VMwareProtectionSourceTypeKCatalog captures enum value "kCatalog" - VMwareProtectionSourceTypeKCatalog string = "kCatalog" - - // VMwareProtectionSourceTypeKOrgMetadata captures enum value "kOrgMetadata" - VMwareProtectionSourceTypeKOrgMetadata string = "kOrgMetadata" - - // VMwareProtectionSourceTypeKStoragePolicy captures enum value "kStoragePolicy" - VMwareProtectionSourceTypeKStoragePolicy string = "kStoragePolicy" -) - -// prop value enum -func (m *VMwareProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vMwareProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMwareProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *VMwareProtectionSource) validateVCloudDirectorInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VCloudDirectorInfo) { // not required - return nil - } - - for i := 0; i < len(m.VCloudDirectorInfo); i++ { - if swag.IsZero(m.VCloudDirectorInfo[i]) { // not required - continue - } - - if m.VCloudDirectorInfo[i] != nil { - if err := m.VCloudDirectorInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) validateVirtualDisks(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDisks) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDisks); i++ { - if swag.IsZero(m.VirtualDisks[i]) { // not required - continue - } - - if m.VirtualDisks[i] != nil { - if err := m.VirtualDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) validateVMLinkingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.VMLinkingInfo) { // not required - return nil - } - - if m.VMLinkingInfo != nil { - if err := m.VMLinkingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmLinkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmLinkingInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v mware protection source based on the context it is used -func (m *VMwareProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagAttributes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVCloudDirectorInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMLinkingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareProtectionSource) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Agents); i++ { - - if m.Agents[i] != nil { - - if swag.IsZero(m.Agents[i]) { // not required - return nil - } - - if err := m.Agents[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateDatastoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreInfo != nil { - - if swag.IsZero(m.DatastoreInfo) { // not required - return nil - } - - if err := m.DatastoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreInfo") - } - return err - } - } - - return nil -} - -func (m *VMwareProtectionSource) 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 -} - -func (m *VMwareProtectionSource) contextValidateIPDetails(ctx context.Context, formats strfmt.Registry) error { - - if m.IPDetails != nil { - - if swag.IsZero(m.IPDetails) { // not required - return nil - } - - if err := m.IPDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipDetails") - } - return err - } - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagAttributes); i++ { - - if m.TagAttributes[i] != nil { - - if swag.IsZero(m.TagAttributes[i]) { // not required - return nil - } - - if err := m.TagAttributes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagAttributes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateVCloudDirectorInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VCloudDirectorInfo); i++ { - - if m.VCloudDirectorInfo[i] != nil { - - if swag.IsZero(m.VCloudDirectorInfo[i]) { // not required - return nil - } - - if err := m.VCloudDirectorInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateVirtualDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDisks); i++ { - - if m.VirtualDisks[i] != nil { - - if swag.IsZero(m.VirtualDisks[i]) { // not required - return nil - } - - if err := m.VirtualDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareProtectionSource) contextValidateVMLinkingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.VMLinkingInfo != nil { - - if swag.IsZero(m.VMLinkingInfo) { // not required - return nil - } - - if err := m.VMLinkingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmLinkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmLinkingInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareProtectionSource) UnmarshalBinary(b []byte) error { - var res VMwareProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_standby_resource.go b/v1/models/v_mware_standby_resource.go deleted file mode 100644 index af215165..00000000 --- a/v1/models/v_mware_standby_resource.go +++ /dev/null @@ -1,427 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMwareStandbyResource VMware specific resources needed to create a VM entity on the vCenter. -// -// swagger:model VMwareStandbyResource -type VMwareStandbyResource struct { - - // Datastore entities where the standby VM should be created. - DatastoreEntityVec []*EntityProto `json:"datastoreEntityVec"` - - // Network configuration for the standby VM. - NetworkConfig *RestoredObjectNetworkConfigProto `json:"networkConfig,omitempty"` - - // The vCenter to which the user wants to create a standby VM. - ParentSource *EntityProto `json:"parentSource,omitempty"` - - // User defined prefix and suffix that need to be added to the standby VM. - RenameObjectParams *RenameObjectParamProto `json:"renameObjectParams,omitempty"` - - // Resource pool entity where the standby VM should be created. - ResourcePoolEntity *EntityProto `json:"resourcePoolEntity,omitempty"` - - // Folder where the VM disks should be placed. - TargetDatastoreFolder *EntityProto `json:"targetDatastoreFolder,omitempty"` - - // Folder where the VMs should be created. - TargetVMFolder *EntityProto `json:"targetVmFolder,omitempty"` -} - -// Validate validates this v mware standby resource -func (m *VMwareStandbyResource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreEntityVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameObjectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePoolEntity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetDatastoreFolder(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareStandbyResource) validateDatastoreEntityVec(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreEntityVec) { // not required - return nil - } - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - continue - } - - if m.DatastoreEntityVec[i] != nil { - if err := m.DatastoreEntityVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareStandbyResource) 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 -} - -func (m *VMwareStandbyResource) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) validateRenameObjectParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameObjectParams) { // not required - return nil - } - - if m.RenameObjectParams != nil { - if err := m.RenameObjectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameObjectParams") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) validateResourcePoolEntity(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if m.ResourcePoolEntity != nil { - if err := m.ResourcePoolEntity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) validateTargetDatastoreFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetDatastoreFolder) { // not required - return nil - } - - if m.TargetDatastoreFolder != nil { - if err := m.TargetDatastoreFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDatastoreFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDatastoreFolder") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) validateTargetVMFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMFolder) { // not required - return nil - } - - if m.TargetVMFolder != nil { - if err := m.TargetVMFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v mware standby resource based on the context it is used -func (m *VMwareStandbyResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreEntityVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameObjectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePoolEntity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetDatastoreFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareStandbyResource) contextValidateDatastoreEntityVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatastoreEntityVec); i++ { - - if m.DatastoreEntityVec[i] != nil { - - if swag.IsZero(m.DatastoreEntityVec[i]) { // not required - return nil - } - - if err := m.DatastoreEntityVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreEntityVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VMwareStandbyResource) 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 -} - -func (m *VMwareStandbyResource) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) contextValidateRenameObjectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameObjectParams != nil { - - if swag.IsZero(m.RenameObjectParams) { // not required - return nil - } - - if err := m.RenameObjectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameObjectParams") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) contextValidateResourcePoolEntity(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePoolEntity != nil { - - if swag.IsZero(m.ResourcePoolEntity) { // not required - return nil - } - - if err := m.ResourcePoolEntity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePoolEntity") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePoolEntity") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) contextValidateTargetDatastoreFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetDatastoreFolder != nil { - - if swag.IsZero(m.TargetDatastoreFolder) { // not required - return nil - } - - if err := m.TargetDatastoreFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDatastoreFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDatastoreFolder") - } - return err - } - } - - return nil -} - -func (m *VMwareStandbyResource) contextValidateTargetVMFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMFolder != nil { - - if swag.IsZero(m.TargetVMFolder) { // not required - return nil - } - - if err := m.TargetVMFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareStandbyResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareStandbyResource) UnmarshalBinary(b []byte) error { - var res VMwareStandbyResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/value.go b/v1/models/value.go deleted file mode 100644 index 487511c5..00000000 --- a/v1/models/value.go +++ /dev/null @@ -1,118 +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" -) - -// Value Value. -// -// Specifies a data type and data field used to store data. -// -// swagger:model Value -type Value struct { - - // data - Data *ValueData `json:"data,omitempty"` - - // Specifies the type of value. - // 0 specifies a data point of type Int64. - // 1 specifies a data point of type Double. - // 2 specifies a data point of type String. - // 3 specifies a data point of type Bytes. - Type *int32 `json:"type,omitempty"` -} - -// Validate validates this value -func (m *Value) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Value) validateData(formats strfmt.Registry) error { - if swag.IsZero(m.Data) { // not required - return nil - } - - if m.Data != nil { - if err := m.Data.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("data") - } - return err - } - } - - return nil -} - -// ContextValidate validate this value based on the context it is used -func (m *Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateData(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Value) contextValidateData(ctx context.Context, formats strfmt.Registry) error { - - if m.Data != nil { - - if swag.IsZero(m.Data) { // not required - return nil - } - - if err := m.Data.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("data") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Value) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Value) UnmarshalBinary(b []byte) error { - var res Value - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/value_data.go b/v1/models/value_data.go deleted file mode 100644 index 00e30c3a..00000000 --- a/v1/models/value_data.go +++ /dev/null @@ -1,67 +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" -) - -// ValueData Data. -// -// Specifies the fields to store data of a given type. -// Specify data in the appropriate field for the current data type. -// -// swagger:model Value_Data -type ValueData struct { - - // Specifies the field to store an array of bytes if the current - // data type is bytes. Specify a value for this field when type - // is equal to 4. - BytesValue []uint8 `json:"bytesValue"` - - // Specifies the field to store data if the current data type is a - // double value. Specify a value for this field when type is equal to 2. - DoubleValue *float64 `json:"doubleValue,omitempty"` - - // Specifies the field to store data if the current data type is a - // int64 value. Specify a value for this field when type is equal to 1. - Int64Value *int64 `json:"int64Value,omitempty"` - - // Specifies the field to store data if the current data type is a - // string value. Specify a value for this field when type is equal to 3. - StringValue *string `json:"stringValue,omitempty"` -} - -// Validate validates this value data -func (m *ValueData) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this value data based on context it is used -func (m *ValueData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ValueData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ValueData) UnmarshalBinary(b []byte) error { - var res ValueData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault.go b/v1/models/vault.go deleted file mode 100644 index d34f9bcb..00000000 --- a/v1/models/vault.go +++ /dev/null @@ -1,975 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Vault Vault. -// -// Specifies an external storage location and is equivalent to -// an External Target in the Cohesity Dashboard. -// A Vault can provide an additional Cloud Tier where cold data of the -// Cohesity Cluster can be stored in the Cloud. -// A Vault can also provide archive storage for backup data. This archive data -// is stored on Tapes and in Cloud Vaults. -// -// swagger:model Vault -type Vault struct { - - // Specifies the CA (certificate authority) trusted certificate. - CaTrustedCertificate *string `json:"caTrustedCertificate,omitempty"` - - // Specifies the client CA certificate. This certificate is in pem format. - ClientCertificate *string `json:"clientCertificate,omitempty"` - - // Specifies the client private key. This certificate is in pem format. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` - - // Specifies the vault config used for Cloud Archival Direct. - CloudArchivalDirectConfig *CloudArchivalDirectConfig `json:"cloudArchivalDirectConfig,omitempty"` - - // Specifies the cloud domain information. - CloudDomainList []*CloudDomainList `json:"cloudDomainList"` - - // Specifies whether to send data to the Vault in a - // compressed format. - // 'kCompressionNone' indicates that data is not compressed. - // 'kCompressionLow' indicates that data is compressed using LZ4 or Snappy. - // 'kCompressionHigh' indicates that data is compressed in Gzip. - // Enum: ["kCompressionNone","kCompressionLow","kCompressionHigh"] - CompressionPolicy *string `json:"compressionPolicy,omitempty"` - - // Specifies the settings required to connect to the Vault (External Target). - Config *VaultConfig `json:"config,omitempty"` - - // Specifies whether to manage the encryption key manually or let the - // Cohesity Cluster manage it. If true, you must get the encryption key - // store it outside the Cluster, before disaster strikes such as the - // source local Cohesity Cluster being down. - // You can get the encryption key by downloading it - // using the Cohesity Dashboard or by calling the - // GET /public/vaults/encryptionKey/{id} operation. - CustomerManagingEncryptionKeys *bool `json:"customerManagingEncryptionKeys,omitempty"` - - // Specifies whether to deduplicate data before sending it to the Vault. - DedupEnabled *bool `json:"dedupEnabled,omitempty"` - - // Specifies whether DEK(Data Encryption Key) rotation is enabled for this - // vault. This is applicable only when the viewbox uses AWS or similar KMS - // in which the KEK (Key Encryption Key) is not created and maintained by - // Cohesity. For Internal KMS and keys stored in Safenet servers, DEK - // rotation will not be performed. - DekRotationEnabled *bool `json:"dekRotationEnabled,omitempty"` - - // Specifies the error message when deleting a vault. - DeleteVaultError *string `json:"deleteVaultError,omitempty"` - - // Specifies a description about the Vault. - Description *string `json:"description,omitempty"` - - // Desired location for write ahead logs(wal). - // 'kHomePartition' indicates desired wal location to be the home partition. - // 'kDisk' indicates desired wal location to be the same disk as chunk repo. - // 'kScribe' indicates desired wal location to be scribe. - // 'kScribeTable' indicates chunk repository state is kept as key-value - // pairs in scribe. - // Enum: ["kHomePartition","kDisk","kScribe","kScribeTable"] - DesiredWalLocation *string `json:"desiredWalLocation,omitempty"` - - // Specifies if the encryption key file has been downloaded using the - // Cohesity Dashboard (Cohesity UI). - // If true, the encryption key has been downloaded using the Cohesity - // Dashboard. An encryption key can only be downloaded once using the - // Cohesity Dashboard. - EncryptionKeyFileDownloaded *bool `json:"encryptionKeyFileDownloaded,omitempty"` - - // Specifies whether to send and store data in an encrypted format. - // 'kEncryptionNone' indicates the data is not encrypted. - // 'kEncryptionStrong' indicates the data is encrypted. - // Enum: ["kEncryptionNone","kEncryptionStrong","kEncryptionWeak"] - EncryptionPolicy *string `json:"encryptionPolicy,omitempty"` - - // Specifies the type of Vault. - // 'kNearline' indicates a Google Nearline Vault. - // 'kGlacier' indicates an AWS Glacier Vault. - // 'kS3' indicates an AWS S3 Vault. - // 'kAzureStandard' indicates a Microsoft Azure Standard Vault. - // 'kS3Compatible' indicates an S3 Compatible Vault. - // (See the online help for supported types.) - // 'kQStarTape' indicates a QStar Tape Vault. - // 'kGoogleStandard' indicates a Google Standard Vault. - // 'kGoogleDRA' indicates a Google DRA Vault. - // 'kAmazonS3StandardIA' indicates an Amazon S3 Standard-IA Vault. - // 'kAWSGovCloud' indicates an AWS Gov Cloud Vault. - // 'kNAS' indicates a NAS Vault. - // 'kColdline' indicates a Google Coldline Vault. - // 'kAzureGovCloud' indicates a Microsoft Azure Gov Cloud Vault. - // 'kAzureArchive' indicates an Azure Archive Vault. - // 'kAzure' indicates an Azure Vault. - // 'kGoogle' indicates a Google Vault. - // 'kAmazon' indicates an Amazon Vault. - // 'kOracle' indicates an Oracle Vault. - // 'kOracleTierStandard' indicates an Oracle Tier Standard Vault. - // 'kOracleTierArchive' indicates an Oracle Tier Archive Vault. - // 'kAmazonC2S' indicates an Amazon Commercial Cloud Services Vault. - // Enum: ["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"] - ExternalTargetType *string `json:"externalTargetType,omitempty"` - - // Specifies the number days between full archives to the Vault. - // The current default is 90 days. - // This is only meaningful when incrementalArchivesEnabled is true and - // the Vault usage type is kArchival. - FullArchiveIntervalDays *int64 `json:"fullArchiveIntervalDays,omitempty"` - - // Specifies the global identifier of the Vault. - GlobalID *string `json:"globalId,omitempty"` - - // Specifies an id that identifies the Vault. - ID *int64 `json:"id,omitempty"` - - // Specifies whether to perform incremental archival when sending data - // to the Vault. - // If false, only full backups are performed. - // If true, incremental backups are performed between the full backups. - IncrementalArchivesEnabled *bool `json:"incrementalArchivesEnabled,omitempty"` - - // Specifies whether the vault is aws snowball or not. - IsAwsSnowball *bool `json:"isAwsSnowball,omitempty"` - - // Specifies whether forever incremental archival is enabled on this vault. - IsForeverIncrementalArchiveEnabled *bool `json:"isForeverIncrementalArchiveEnabled,omitempty"` - - // Specifies if given password is not encrypted or not in the cluster config. - IsPasswordEncrypted *bool `json:"isPasswordEncrypted,omitempty"` - - // Specifies the time (in microseconds) when the encryption key file was - // downloaded from the Cohesity Dashboard (Cohesity UI). - // An encryption key can only be downloaded once - // using the Cohesity Dashboard. - KeyFileDownloadTimeUsecs *int64 `json:"keyFileDownloadTimeUsecs,omitempty"` - - // Specifies the user who downloaded the encryption key from the - // Cohesity Dashboard (Cohesity UI). This field - // is only populated if encryption is enabled for the Vault and - // customerManagingEncryptionKeys is true. - KeyFileDownloadUser *string `json:"keyFileDownloadUser,omitempty"` - - // Specifies the associated KMS Server ID. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Specifies the name of the Vault. - Name *string `json:"name,omitempty"` - - // Specifies the state of the vault to be removed. - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["kDontRemove","kMarkedForRemoval","kOkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // Specifies the list of tenants which will have a access to current vault. - TenantIds []string `json:"tenantIds"` - - // Specifies the type of Vault. - // This field is deprecated. This field is split into ExternalTargetType in - // and TierType in respective credentials. Initialize those - // fields instead. - // deprecated: true - // 'kNearline' indicates a Google Nearline Vault. - // 'kGlacier' indicates an AWS Glacier Vault. - // 'kS3' indicates an AWS S3 Vault. - // 'kAzureStandard' indicates a Microsoft Azure Standard Vault. - // 'kS3Compatible' indicates an S3 Compatible Vault. - // (See the online help for supported types.) - // 'kQStarTape' indicates a QStar Tape Vault. - // 'kGoogleStandard' indicates a Google Standard Vault. - // 'kGoogleDRA' indicates a Google DRA Vault. - // 'kAmazonS3StandardIA' indicates an Amazon S3 Standard-IA Vault. - // 'kAWSGovCloud' indicates an AWS Gov Cloud Vault. - // 'kNAS' indicates a NAS Vault. - // 'kColdline' indicates a Google Coldline Vault. - // 'kAzureGovCloud' indicates a Microsoft Azure Gov Cloud Vault. - // 'kAzureArchive' indicates an Azure Archive Vault. - // 'kAzure' indicates an Azure Vault. - // 'kGoogle' indicates a Google Vault. - // 'kAmazon' indicates an Amazon Vault. - // 'kOracle' indicates an Oracle Vault. - // 'kOracleTierStandard' indicates an Oracle Tier Standard Vault. - // 'kOracleTierArchive' indicates an Oracle Tier Archive Vault. - // 'kAmazonC2S' indicates an Amazon Commercial Cloud Services Vault. - // Enum: ["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"] - Type *string `json:"type,omitempty"` - - // Specifies the usage type of the Vault. - // 'kArchival' indicates the Vault provides archive storage for backup data. - // 'kCloudSpill' indicates the Vault provides additional storage for cold data. - // 'kRpaasArchival' indicates the Vault is for RPaaS. - // Enum: ["kArchival","kCloudSpill"] - UsageType *string `json:"usageType,omitempty"` - - // Specifies bandwidth limit. - VaultBandwidthLimits *VaultBandwidthLimits `json:"vaultBandwidthLimits,omitempty"` - - // Specifies the ownership context for consumption. - // 'kOwnershipContextLocal' indicates the Vault is used for local consumption - // 'kOwnershipContextFortKnox' indicates the Vault is used for Fortknox - // consumption - // Enum: ["kOwnershipContextLocal","kOwnershipContextFortKnox"] - VaultOwnership *string `json:"vaultOwnership,omitempty"` - - // Specifies the name of the associated viewbox that is to be created while - // registering vault in NextGen CE. - ViewBoxName *string `json:"viewBoxName,omitempty"` -} - -// Validate validates this vault -func (m *Vault) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudArchivalDirectConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDomainList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCompressionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDesiredWalLocation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultBandwidthLimits(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultOwnership(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Vault) validateCloudArchivalDirectConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CloudArchivalDirectConfig) { // not required - return nil - } - - if m.CloudArchivalDirectConfig != nil { - if err := m.CloudArchivalDirectConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudArchivalDirectConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudArchivalDirectConfig") - } - return err - } - } - - return nil -} - -func (m *Vault) validateCloudDomainList(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDomainList) { // not required - return nil - } - - for i := 0; i < len(m.CloudDomainList); i++ { - if swag.IsZero(m.CloudDomainList[i]) { // not required - continue - } - - if m.CloudDomainList[i] != nil { - if err := m.CloudDomainList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDomainList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDomainList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var vaultTypeCompressionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCompressionNone","kCompressionLow","kCompressionHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeCompressionPolicyPropEnum = append(vaultTypeCompressionPolicyPropEnum, v) - } -} - -const ( - - // VaultCompressionPolicyKCompressionNone captures enum value "kCompressionNone" - VaultCompressionPolicyKCompressionNone string = "kCompressionNone" - - // VaultCompressionPolicyKCompressionLow captures enum value "kCompressionLow" - VaultCompressionPolicyKCompressionLow string = "kCompressionLow" - - // VaultCompressionPolicyKCompressionHigh captures enum value "kCompressionHigh" - VaultCompressionPolicyKCompressionHigh string = "kCompressionHigh" -) - -// prop value enum -func (m *Vault) validateCompressionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeCompressionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateCompressionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.CompressionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateCompressionPolicyEnum("compressionPolicy", "body", *m.CompressionPolicy); err != nil { - return err - } - - return nil -} - -func (m *Vault) validateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.Config) { // not required - return nil - } - - if m.Config != nil { - if err := m.Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -var vaultTypeDesiredWalLocationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHomePartition","kDisk","kScribe","kScribeTable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeDesiredWalLocationPropEnum = append(vaultTypeDesiredWalLocationPropEnum, v) - } -} - -const ( - - // VaultDesiredWalLocationKHomePartition captures enum value "kHomePartition" - VaultDesiredWalLocationKHomePartition string = "kHomePartition" - - // VaultDesiredWalLocationKDisk captures enum value "kDisk" - VaultDesiredWalLocationKDisk string = "kDisk" - - // VaultDesiredWalLocationKScribe captures enum value "kScribe" - VaultDesiredWalLocationKScribe string = "kScribe" - - // VaultDesiredWalLocationKScribeTable captures enum value "kScribeTable" - VaultDesiredWalLocationKScribeTable string = "kScribeTable" -) - -// prop value enum -func (m *Vault) validateDesiredWalLocationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeDesiredWalLocationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateDesiredWalLocation(formats strfmt.Registry) error { - if swag.IsZero(m.DesiredWalLocation) { // not required - return nil - } - - // value enum - if err := m.validateDesiredWalLocationEnum("desiredWalLocation", "body", *m.DesiredWalLocation); err != nil { - return err - } - - return nil -} - -var vaultTypeEncryptionPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEncryptionNone","kEncryptionStrong","kEncryptionWeak"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeEncryptionPolicyPropEnum = append(vaultTypeEncryptionPolicyPropEnum, v) - } -} - -const ( - - // VaultEncryptionPolicyKEncryptionNone captures enum value "kEncryptionNone" - VaultEncryptionPolicyKEncryptionNone string = "kEncryptionNone" - - // VaultEncryptionPolicyKEncryptionStrong captures enum value "kEncryptionStrong" - VaultEncryptionPolicyKEncryptionStrong string = "kEncryptionStrong" - - // VaultEncryptionPolicyKEncryptionWeak captures enum value "kEncryptionWeak" - VaultEncryptionPolicyKEncryptionWeak string = "kEncryptionWeak" -) - -// prop value enum -func (m *Vault) validateEncryptionPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeEncryptionPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateEncryptionPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionPolicy) { // not required - return nil - } - - // value enum - if err := m.validateEncryptionPolicyEnum("encryptionPolicy", "body", *m.EncryptionPolicy); err != nil { - return err - } - - return nil -} - -var vaultTypeExternalTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeExternalTargetTypePropEnum = append(vaultTypeExternalTargetTypePropEnum, v) - } -} - -const ( - - // VaultExternalTargetTypeKNearline captures enum value "kNearline" - VaultExternalTargetTypeKNearline string = "kNearline" - - // VaultExternalTargetTypeKGlacier captures enum value "kGlacier" - VaultExternalTargetTypeKGlacier string = "kGlacier" - - // VaultExternalTargetTypeKS3 captures enum value "kS3" - VaultExternalTargetTypeKS3 string = "kS3" - - // VaultExternalTargetTypeKAzureStandard captures enum value "kAzureStandard" - VaultExternalTargetTypeKAzureStandard string = "kAzureStandard" - - // VaultExternalTargetTypeKS3Compatible captures enum value "kS3Compatible" - VaultExternalTargetTypeKS3Compatible string = "kS3Compatible" - - // VaultExternalTargetTypeKQStarTape captures enum value "kQStarTape" - VaultExternalTargetTypeKQStarTape string = "kQStarTape" - - // VaultExternalTargetTypeKGoogleStandard captures enum value "kGoogleStandard" - VaultExternalTargetTypeKGoogleStandard string = "kGoogleStandard" - - // VaultExternalTargetTypeKGoogleDRA captures enum value "kGoogleDRA" - VaultExternalTargetTypeKGoogleDRA string = "kGoogleDRA" - - // VaultExternalTargetTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - VaultExternalTargetTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // VaultExternalTargetTypeKAWSGovCloud captures enum value "kAWSGovCloud" - VaultExternalTargetTypeKAWSGovCloud string = "kAWSGovCloud" - - // VaultExternalTargetTypeKNAS captures enum value "kNAS" - VaultExternalTargetTypeKNAS string = "kNAS" - - // VaultExternalTargetTypeKColdline captures enum value "kColdline" - VaultExternalTargetTypeKColdline string = "kColdline" - - // VaultExternalTargetTypeKAzureGovCloud captures enum value "kAzureGovCloud" - VaultExternalTargetTypeKAzureGovCloud string = "kAzureGovCloud" - - // VaultExternalTargetTypeKAzureArchive captures enum value "kAzureArchive" - VaultExternalTargetTypeKAzureArchive string = "kAzureArchive" - - // VaultExternalTargetTypeKAzure captures enum value "kAzure" - VaultExternalTargetTypeKAzure string = "kAzure" - - // VaultExternalTargetTypeKGoogle captures enum value "kGoogle" - VaultExternalTargetTypeKGoogle string = "kGoogle" - - // VaultExternalTargetTypeKAmazon captures enum value "kAmazon" - VaultExternalTargetTypeKAmazon string = "kAmazon" - - // VaultExternalTargetTypeKOracle captures enum value "kOracle" - VaultExternalTargetTypeKOracle string = "kOracle" - - // VaultExternalTargetTypeKOracleTierStandard captures enum value "kOracleTierStandard" - VaultExternalTargetTypeKOracleTierStandard string = "kOracleTierStandard" - - // VaultExternalTargetTypeKOracleTierArchive captures enum value "kOracleTierArchive" - VaultExternalTargetTypeKOracleTierArchive string = "kOracleTierArchive" - - // VaultExternalTargetTypeKAmazonC2S captures enum value "kAmazonC2S" - VaultExternalTargetTypeKAmazonC2S string = "kAmazonC2S" -) - -// prop value enum -func (m *Vault) validateExternalTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeExternalTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateExternalTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalTargetType) { // not required - return nil - } - - // value enum - if err := m.validateExternalTargetTypeEnum("externalTargetType", "body", *m.ExternalTargetType); err != nil { - return err - } - - return nil -} - -var vaultTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDontRemove","kMarkedForRemoval","kOkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeRemovalStatePropEnum = append(vaultTypeRemovalStatePropEnum, v) - } -} - -const ( - - // VaultRemovalStateKDontRemove captures enum value "kDontRemove" - VaultRemovalStateKDontRemove string = "kDontRemove" - - // VaultRemovalStateKMarkedForRemoval captures enum value "kMarkedForRemoval" - VaultRemovalStateKMarkedForRemoval string = "kMarkedForRemoval" - - // VaultRemovalStateKOkToRemove captures enum value "kOkToRemove" - VaultRemovalStateKOkToRemove string = "kOkToRemove" -) - -// prop value enum -func (m *Vault) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -var vaultTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeTypePropEnum = append(vaultTypeTypePropEnum, v) - } -} - -const ( - - // VaultTypeKNearline captures enum value "kNearline" - VaultTypeKNearline string = "kNearline" - - // VaultTypeKGlacier captures enum value "kGlacier" - VaultTypeKGlacier string = "kGlacier" - - // VaultTypeKS3 captures enum value "kS3" - VaultTypeKS3 string = "kS3" - - // VaultTypeKAzureStandard captures enum value "kAzureStandard" - VaultTypeKAzureStandard string = "kAzureStandard" - - // VaultTypeKS3Compatible captures enum value "kS3Compatible" - VaultTypeKS3Compatible string = "kS3Compatible" - - // VaultTypeKQStarTape captures enum value "kQStarTape" - VaultTypeKQStarTape string = "kQStarTape" - - // VaultTypeKGoogleStandard captures enum value "kGoogleStandard" - VaultTypeKGoogleStandard string = "kGoogleStandard" - - // VaultTypeKGoogleDRA captures enum value "kGoogleDRA" - VaultTypeKGoogleDRA string = "kGoogleDRA" - - // VaultTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - VaultTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // VaultTypeKAWSGovCloud captures enum value "kAWSGovCloud" - VaultTypeKAWSGovCloud string = "kAWSGovCloud" - - // VaultTypeKNAS captures enum value "kNAS" - VaultTypeKNAS string = "kNAS" - - // VaultTypeKColdline captures enum value "kColdline" - VaultTypeKColdline string = "kColdline" - - // VaultTypeKAzureGovCloud captures enum value "kAzureGovCloud" - VaultTypeKAzureGovCloud string = "kAzureGovCloud" - - // VaultTypeKAzureArchive captures enum value "kAzureArchive" - VaultTypeKAzureArchive string = "kAzureArchive" - - // VaultTypeKAzure captures enum value "kAzure" - VaultTypeKAzure string = "kAzure" - - // VaultTypeKGoogle captures enum value "kGoogle" - VaultTypeKGoogle string = "kGoogle" - - // VaultTypeKAmazon captures enum value "kAmazon" - VaultTypeKAmazon string = "kAmazon" - - // VaultTypeKOracle captures enum value "kOracle" - VaultTypeKOracle string = "kOracle" - - // VaultTypeKOracleTierStandard captures enum value "kOracleTierStandard" - VaultTypeKOracleTierStandard string = "kOracleTierStandard" - - // VaultTypeKOracleTierArchive captures enum value "kOracleTierArchive" - VaultTypeKOracleTierArchive string = "kOracleTierArchive" - - // VaultTypeKAmazonC2S captures enum value "kAmazonC2S" - VaultTypeKAmazonC2S string = "kAmazonC2S" -) - -// prop value enum -func (m *Vault) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var vaultTypeUsageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kArchival","kCloudSpill"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeUsageTypePropEnum = append(vaultTypeUsageTypePropEnum, v) - } -} - -const ( - - // VaultUsageTypeKArchival captures enum value "kArchival" - VaultUsageTypeKArchival string = "kArchival" - - // VaultUsageTypeKCloudSpill captures enum value "kCloudSpill" - VaultUsageTypeKCloudSpill string = "kCloudSpill" -) - -// prop value enum -func (m *Vault) validateUsageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeUsageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateUsageType(formats strfmt.Registry) error { - if swag.IsZero(m.UsageType) { // not required - return nil - } - - // value enum - if err := m.validateUsageTypeEnum("usageType", "body", *m.UsageType); err != nil { - return err - } - - return nil -} - -func (m *Vault) validateVaultBandwidthLimits(formats strfmt.Registry) error { - if swag.IsZero(m.VaultBandwidthLimits) { // not required - return nil - } - - if m.VaultBandwidthLimits != nil { - if err := m.VaultBandwidthLimits.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultBandwidthLimits") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultBandwidthLimits") - } - return err - } - } - - return nil -} - -var vaultTypeVaultOwnershipPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOwnershipContextLocal","kOwnershipContextFortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultTypeVaultOwnershipPropEnum = append(vaultTypeVaultOwnershipPropEnum, v) - } -} - -const ( - - // VaultVaultOwnershipKOwnershipContextLocal captures enum value "kOwnershipContextLocal" - VaultVaultOwnershipKOwnershipContextLocal string = "kOwnershipContextLocal" - - // VaultVaultOwnershipKOwnershipContextFortKnox captures enum value "kOwnershipContextFortKnox" - VaultVaultOwnershipKOwnershipContextFortKnox string = "kOwnershipContextFortKnox" -) - -// prop value enum -func (m *Vault) validateVaultOwnershipEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultTypeVaultOwnershipPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Vault) validateVaultOwnership(formats strfmt.Registry) error { - if swag.IsZero(m.VaultOwnership) { // not required - return nil - } - - // value enum - if err := m.validateVaultOwnershipEnum("vaultOwnership", "body", *m.VaultOwnership); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vault based on the context it is used -func (m *Vault) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudArchivalDirectConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDomainList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVaultBandwidthLimits(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Vault) contextValidateCloudArchivalDirectConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudArchivalDirectConfig != nil { - - if swag.IsZero(m.CloudArchivalDirectConfig) { // not required - return nil - } - - if err := m.CloudArchivalDirectConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudArchivalDirectConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudArchivalDirectConfig") - } - return err - } - } - - return nil -} - -func (m *Vault) contextValidateCloudDomainList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudDomainList); i++ { - - if m.CloudDomainList[i] != nil { - - if swag.IsZero(m.CloudDomainList[i]) { // not required - return nil - } - - if err := m.CloudDomainList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDomainList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDomainList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Vault) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.Config != nil { - - if swag.IsZero(m.Config) { // not required - return nil - } - - if err := m.Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *Vault) contextValidateVaultBandwidthLimits(ctx context.Context, formats strfmt.Registry) error { - - if m.VaultBandwidthLimits != nil { - - if swag.IsZero(m.VaultBandwidthLimits) { // not required - return nil - } - - if err := m.VaultBandwidthLimits.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultBandwidthLimits") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultBandwidthLimits") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Vault) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Vault) UnmarshalBinary(b []byte) error { - var res Vault - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_bandwidth_limits.go b/v1/models/vault_bandwidth_limits.go deleted file mode 100644 index ce93db37..00000000 --- a/v1/models/vault_bandwidth_limits.go +++ /dev/null @@ -1,267 +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" -) - -// VaultBandwidthLimits Vault Bandwidth Limits. -// -// VaultBandwidthLimits represents the network bandwidth limits -// while uploading/downloading data to/from the external media. -// -// swagger:model VaultBandwidthLimits -type VaultBandwidthLimits struct { - - // Specifies the max rate limit at which we download the data to cloud tier - // vaults. - CloudTierDownload *BandwidthLimit `json:"cloudTierDownload,omitempty"` - - // Specifies the max rate limit at which we upload the data to cloud tier - // vaults. - CloudTierUpload *BandwidthLimit `json:"cloudTierUpload,omitempty"` - - // Specifies the max rate limit at which we download the data. - Download *BandwidthLimit `json:"download,omitempty"` - - // Specifies the max rate limit at which we upload the data. - Upload *BandwidthLimit `json:"upload,omitempty"` -} - -// Validate validates this vault bandwidth limits -func (m *VaultBandwidthLimits) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudTierDownload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudTierUpload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpload(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultBandwidthLimits) validateCloudTierDownload(formats strfmt.Registry) error { - if swag.IsZero(m.CloudTierDownload) { // not required - return nil - } - - if m.CloudTierDownload != nil { - if err := m.CloudTierDownload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierDownload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierDownload") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) validateCloudTierUpload(formats strfmt.Registry) error { - if swag.IsZero(m.CloudTierUpload) { // not required - return nil - } - - if m.CloudTierUpload != nil { - if err := m.CloudTierUpload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierUpload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierUpload") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) validateDownload(formats strfmt.Registry) error { - if swag.IsZero(m.Download) { // not required - return nil - } - - if m.Download != nil { - if err := m.Download.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) validateUpload(formats strfmt.Registry) error { - if swag.IsZero(m.Upload) { // not required - return nil - } - - if m.Upload != nil { - if err := m.Upload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vault bandwidth limits based on the context it is used -func (m *VaultBandwidthLimits) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudTierDownload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudTierUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultBandwidthLimits) contextValidateCloudTierDownload(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudTierDownload != nil { - - if swag.IsZero(m.CloudTierDownload) { // not required - return nil - } - - if err := m.CloudTierDownload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierDownload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierDownload") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) contextValidateCloudTierUpload(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudTierUpload != nil { - - if swag.IsZero(m.CloudTierUpload) { // not required - return nil - } - - if err := m.CloudTierUpload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudTierUpload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudTierUpload") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) contextValidateDownload(ctx context.Context, formats strfmt.Registry) error { - - if m.Download != nil { - - if swag.IsZero(m.Download) { // not required - return nil - } - - if err := m.Download.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *VaultBandwidthLimits) contextValidateUpload(ctx context.Context, formats strfmt.Registry) error { - - if m.Upload != nil { - - if swag.IsZero(m.Upload) { // not required - return nil - } - - if err := m.Upload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultBandwidthLimits) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultBandwidthLimits) UnmarshalBinary(b []byte) error { - var res VaultBandwidthLimits - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_config.go b/v1/models/vault_config.go deleted file mode 100644 index 91dd74dd..00000000 --- a/v1/models/vault_config.go +++ /dev/null @@ -1,392 +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" -) - -// VaultConfig Vault Configuration. -// -// Specifies the settings required to connect to a specific Vault type. -// For some Vaults, you must also specify a storage location (bucketName). -// -// swagger:model VaultConfig -type VaultConfig struct { - - // Amazon Cloud Credentials. - // - // Specifies the cloud credentials to connect to a Amazon - // service account. Glacier, S3, and S3-compatible clouds use this - // credential. - Amazon *AmazonCloudCredentials `json:"amazon,omitempty"` - - // Azure Cloud Credentials. - // - // Specifies the cloud credentials to connect to a Microsoft - // Azure service account. - Azure *AzureCloudCredentials `json:"azure,omitempty"` - - // Specifies the name of a storage location of the Vault, - // where objects are stored. For Google and AMS, this - // storage location is called a bucket. For Microsoft Azure, this - // storage location is called a container. For QStar and NAS, you - // do not specify a storage location. - BucketName *string `json:"bucketName,omitempty"` - - // Google Cloud Credentials. - // - // Specifies the cloud credentials to connect to a Google - // service account. - Google *GoogleCloudCredentials `json:"google,omitempty"` - - // NAS Server Credentials. - // - // Specifies the server credentials to connect to a NetApp server. - Nas *NasCredentials `json:"nas,omitempty"` - - // Oracle Cloud Credentials. - // - // Specifies the Oracle cloud credentials to connect to a Amazon - // service account. - Oracle *OracleCloudCredentials `json:"oracle,omitempty"` - - // QStar Media Credentials. - // - // Specifies the server credentials to connect to a QStar service - // to manage the media Vault. - Qstar *QStarServerCredentials `json:"qstar,omitempty"` -} - -// Validate validates this vault config -func (m *VaultConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAmazon(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzure(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogle(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNas(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracle(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQstar(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultConfig) validateAmazon(formats strfmt.Registry) error { - if swag.IsZero(m.Amazon) { // not required - return nil - } - - if m.Amazon != nil { - if err := m.Amazon.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amazon") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amazon") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) validateAzure(formats strfmt.Registry) error { - if swag.IsZero(m.Azure) { // not required - return nil - } - - if m.Azure != nil { - if err := m.Azure.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azure") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azure") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) validateGoogle(formats strfmt.Registry) error { - if swag.IsZero(m.Google) { // not required - return nil - } - - if m.Google != nil { - if err := m.Google.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("google") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("google") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) validateNas(formats strfmt.Registry) error { - if swag.IsZero(m.Nas) { // not required - return nil - } - - if m.Nas != nil { - if err := m.Nas.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nas") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nas") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) validateOracle(formats strfmt.Registry) error { - if swag.IsZero(m.Oracle) { // not required - return nil - } - - if m.Oracle != nil { - if err := m.Oracle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracle") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) validateQstar(formats strfmt.Registry) error { - if swag.IsZero(m.Qstar) { // not required - return nil - } - - if m.Qstar != nil { - if err := m.Qstar.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qstar") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qstar") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vault config based on the context it is used -func (m *VaultConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAmazon(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzure(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogle(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNas(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracle(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQstar(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultConfig) contextValidateAmazon(ctx context.Context, formats strfmt.Registry) error { - - if m.Amazon != nil { - - if swag.IsZero(m.Amazon) { // not required - return nil - } - - if err := m.Amazon.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amazon") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amazon") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) contextValidateAzure(ctx context.Context, formats strfmt.Registry) error { - - if m.Azure != nil { - - if swag.IsZero(m.Azure) { // not required - return nil - } - - if err := m.Azure.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azure") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azure") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) contextValidateGoogle(ctx context.Context, formats strfmt.Registry) error { - - if m.Google != nil { - - if swag.IsZero(m.Google) { // not required - return nil - } - - if err := m.Google.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("google") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("google") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) contextValidateNas(ctx context.Context, formats strfmt.Registry) error { - - if m.Nas != nil { - - if swag.IsZero(m.Nas) { // not required - return nil - } - - if err := m.Nas.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nas") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nas") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) contextValidateOracle(ctx context.Context, formats strfmt.Registry) error { - - if m.Oracle != nil { - - if swag.IsZero(m.Oracle) { // not required - return nil - } - - if err := m.Oracle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracle") - } - return err - } - } - - return nil -} - -func (m *VaultConfig) contextValidateQstar(ctx context.Context, formats strfmt.Registry) error { - - if m.Qstar != nil { - - if swag.IsZero(m.Qstar) { // not required - return nil - } - - if err := m.Qstar.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qstar") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qstar") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultConfig) UnmarshalBinary(b []byte) error { - var res VaultConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_delete_params.go b/v1/models/vault_delete_params.go deleted file mode 100644 index 2ec2d772..00000000 --- a/v1/models/vault_delete_params.go +++ /dev/null @@ -1,66 +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" -) - -// VaultDeleteParams Vault Delete Params. -// -// VaultDeleteParams represents the parameters needed to delete a specific -// vault. -// -// swagger:model VaultDeleteParams -type VaultDeleteParams struct { - - // Specifies whether to force delete the vault. - // If the flag is set to true, the RemovalState of the vault is changed to - // 'kMarkedForRemoval' and Eventually vault is removed from cluster config - // and archived metadata from scribe is removed without necessarily deleting - // the associated archived data. - ForceDelete *bool `json:"forceDelete,omitempty"` - - // Specifies an id that identifies the Vault. - ID *int64 `json:"id,omitempty"` - - // Specifies if Vaults that are marked for removal should be returned. - IncludeMarkedForRemoval *bool `json:"includeMarkedForRemoval,omitempty"` - - // Specifies whether to retry a request after failure. - Retry *bool `json:"retry,omitempty"` -} - -// Validate validates this vault delete params -func (m *VaultDeleteParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vault delete params based on context it is used -func (m *VaultDeleteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VaultDeleteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultDeleteParams) UnmarshalBinary(b []byte) error { - var res VaultDeleteParams - 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 deleted file mode 100644 index 92a4de29..00000000 --- a/v1/models/vault_encryption_key.go +++ /dev/null @@ -1,127 +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" -) - -// VaultEncryptionKey Vault Encryption Key. -// -// Specifies the encryption information needed to restore data. -// -// swagger:model VaultEncryptionKey -type VaultEncryptionKey struct { - - // Specifies the name of the source Cohesity Cluster - // that archived the data on the Vault. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the encryption key data corresponding to the specified keyUid. - // It contains a Key Encryption Key (KEK) or a - // Encrypted Data Encryption Key (eDEK). - EncryptionKeyData *string `json:"encryptionKeyData,omitempty"` - - // key Uid - KeyUID *VaultEncryptionKeyKeyUID `json:"keyUid,omitempty"` - - // Specifies the id of the Vault whose data is encrypted by - // this key. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the name of the Vault whose data is encrypted by this key. - VaultName *string `json:"vaultName,omitempty"` -} - -// Validate validates this vault encryption key -func (m *VaultEncryptionKey) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKeyUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultEncryptionKey) validateKeyUID(formats strfmt.Registry) error { - if swag.IsZero(m.KeyUID) { // not required - 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 -} - -// ContextValidate validate this vault encryption key based on the context it is used -func (m *VaultEncryptionKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeyUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *VaultEncryptionKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultEncryptionKey) UnmarshalBinary(b []byte) error { - var res VaultEncryptionKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/vault_params_restore_params.go b/v1/models/vault_params_restore_params.go deleted file mode 100644 index 737a1680..00000000 --- a/v1/models/vault_params_restore_params.go +++ /dev/null @@ -1,112 +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" -) - -// VaultParamsRestoreParams Params for initiate restore. -// -// swagger:model VaultParams_RestoreParams -type VaultParamsRestoreParams struct { - - // allow marked for removal - AllowMarkedForRemoval *bool `json:"allowMarkedForRemoval,omitempty"` - - // glacier - Glacier *VaultParamsRestoreParamsGlacier `json:"glacier,omitempty"` -} - -// Validate validates this vault params restore params -func (m *VaultParamsRestoreParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGlacier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultParamsRestoreParams) validateGlacier(formats strfmt.Registry) error { - if swag.IsZero(m.Glacier) { // not required - return nil - } - - if m.Glacier != nil { - if err := m.Glacier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("glacier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("glacier") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vault params restore params based on the context it is used -func (m *VaultParamsRestoreParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGlacier(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultParamsRestoreParams) contextValidateGlacier(ctx context.Context, formats strfmt.Registry) error { - - if m.Glacier != nil { - - if swag.IsZero(m.Glacier) { // not required - return nil - } - - if err := m.Glacier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("glacier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("glacier") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultParamsRestoreParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultParamsRestoreParams) UnmarshalBinary(b []byte) error { - var res VaultParamsRestoreParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_params_restore_params_glacier.go b/v1/models/vault_params_restore_params_glacier.go deleted file mode 100644 index 826e60e0..00000000 --- a/v1/models/vault_params_restore_params_glacier.go +++ /dev/null @@ -1,50 +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" -) - -// VaultParamsRestoreParamsGlacier Params for Glacier. -// -// swagger:model VaultParams_RestoreParams_Glacier -type VaultParamsRestoreParamsGlacier struct { - - // retrieval type - RetrievalType *int32 `json:"retrievalType,omitempty"` -} - -// Validate validates this vault params restore params glacier -func (m *VaultParamsRestoreParamsGlacier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vault params restore params glacier based on context it is used -func (m *VaultParamsRestoreParamsGlacier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VaultParamsRestoreParamsGlacier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultParamsRestoreParamsGlacier) UnmarshalBinary(b []byte) error { - var res VaultParamsRestoreParamsGlacier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_provider_stats_by_env.go b/v1/models/vault_provider_stats_by_env.go deleted file mode 100644 index 3b771a38..00000000 --- a/v1/models/vault_provider_stats_by_env.go +++ /dev/null @@ -1,203 +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" -) - -// VaultProviderStatsByEnv Vault Provider Stats By Env. -// -// Specifies the Vault stats by environments. -// -// swagger:model VaultProviderStatsByEnv -type VaultProviderStatsByEnv struct { - - // Specifies the count of the objects of the specified environment. - Count *int64 `json:"count,omitempty"` - - // Specifies the environment type. - // Enum: ["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"] - Environment *string `json:"environment,omitempty"` - - // Specifies the size of the entities of the specified environment. - Size *int64 `json:"size,omitempty"` -} - -// Validate validates this vault provider stats by env -func (m *VaultProviderStatsByEnv) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vaultProviderStatsByEnvTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kVCD","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kAD","kAWSSnapshotManager"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultProviderStatsByEnvTypeEnvironmentPropEnum = append(vaultProviderStatsByEnvTypeEnvironmentPropEnum, v) - } -} - -const ( - - // VaultProviderStatsByEnvEnvironmentKVMware captures enum value "kVMware" - VaultProviderStatsByEnvEnvironmentKVMware string = "kVMware" - - // VaultProviderStatsByEnvEnvironmentKHyperV captures enum value "kHyperV" - VaultProviderStatsByEnvEnvironmentKHyperV string = "kHyperV" - - // VaultProviderStatsByEnvEnvironmentKSQL captures enum value "kSQL" - VaultProviderStatsByEnvEnvironmentKSQL string = "kSQL" - - // VaultProviderStatsByEnvEnvironmentKView captures enum value "kView" - VaultProviderStatsByEnvEnvironmentKView string = "kView" - - // VaultProviderStatsByEnvEnvironmentKPuppeteer captures enum value "kPuppeteer" - VaultProviderStatsByEnvEnvironmentKPuppeteer string = "kPuppeteer" - - // VaultProviderStatsByEnvEnvironmentKPhysical captures enum value "kPhysical" - VaultProviderStatsByEnvEnvironmentKPhysical string = "kPhysical" - - // VaultProviderStatsByEnvEnvironmentKPure captures enum value "kPure" - VaultProviderStatsByEnvEnvironmentKPure string = "kPure" - - // VaultProviderStatsByEnvEnvironmentKNimble captures enum value "kNimble" - VaultProviderStatsByEnvEnvironmentKNimble string = "kNimble" - - // VaultProviderStatsByEnvEnvironmentKAzure captures enum value "kAzure" - VaultProviderStatsByEnvEnvironmentKAzure string = "kAzure" - - // VaultProviderStatsByEnvEnvironmentKNetapp captures enum value "kNetapp" - VaultProviderStatsByEnvEnvironmentKNetapp string = "kNetapp" - - // VaultProviderStatsByEnvEnvironmentKAgent captures enum value "kAgent" - VaultProviderStatsByEnvEnvironmentKAgent string = "kAgent" - - // VaultProviderStatsByEnvEnvironmentKGenericNas captures enum value "kGenericNas" - VaultProviderStatsByEnvEnvironmentKGenericNas string = "kGenericNas" - - // VaultProviderStatsByEnvEnvironmentKAcropolis captures enum value "kAcropolis" - VaultProviderStatsByEnvEnvironmentKAcropolis string = "kAcropolis" - - // VaultProviderStatsByEnvEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - VaultProviderStatsByEnvEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // VaultProviderStatsByEnvEnvironmentKIsilon captures enum value "kIsilon" - VaultProviderStatsByEnvEnvironmentKIsilon string = "kIsilon" - - // VaultProviderStatsByEnvEnvironmentKGPFS captures enum value "kGPFS" - VaultProviderStatsByEnvEnvironmentKGPFS string = "kGPFS" - - // VaultProviderStatsByEnvEnvironmentKKVM captures enum value "kKVM" - VaultProviderStatsByEnvEnvironmentKKVM string = "kKVM" - - // VaultProviderStatsByEnvEnvironmentKAWS captures enum value "kAWS" - VaultProviderStatsByEnvEnvironmentKAWS string = "kAWS" - - // VaultProviderStatsByEnvEnvironmentKExchange captures enum value "kExchange" - VaultProviderStatsByEnvEnvironmentKExchange string = "kExchange" - - // VaultProviderStatsByEnvEnvironmentKHyperVVSS captures enum value "kHyperVVSS" - VaultProviderStatsByEnvEnvironmentKHyperVVSS string = "kHyperVVSS" - - // VaultProviderStatsByEnvEnvironmentKOracle captures enum value "kOracle" - VaultProviderStatsByEnvEnvironmentKOracle string = "kOracle" - - // VaultProviderStatsByEnvEnvironmentKGCP captures enum value "kGCP" - VaultProviderStatsByEnvEnvironmentKGCP string = "kGCP" - - // VaultProviderStatsByEnvEnvironmentKFlashBlade captures enum value "kFlashBlade" - VaultProviderStatsByEnvEnvironmentKFlashBlade string = "kFlashBlade" - - // VaultProviderStatsByEnvEnvironmentKAWSNative captures enum value "kAWSNative" - VaultProviderStatsByEnvEnvironmentKAWSNative string = "kAWSNative" - - // VaultProviderStatsByEnvEnvironmentKVCD captures enum value "kVCD" - VaultProviderStatsByEnvEnvironmentKVCD string = "kVCD" - - // VaultProviderStatsByEnvEnvironmentKO365 captures enum value "kO365" - VaultProviderStatsByEnvEnvironmentKO365 string = "kO365" - - // VaultProviderStatsByEnvEnvironmentKO365Outlook captures enum value "kO365Outlook" - VaultProviderStatsByEnvEnvironmentKO365Outlook string = "kO365Outlook" - - // VaultProviderStatsByEnvEnvironmentKHyperFlex captures enum value "kHyperFlex" - VaultProviderStatsByEnvEnvironmentKHyperFlex string = "kHyperFlex" - - // VaultProviderStatsByEnvEnvironmentKGCPNative captures enum value "kGCPNative" - VaultProviderStatsByEnvEnvironmentKGCPNative string = "kGCPNative" - - // VaultProviderStatsByEnvEnvironmentKAzureNative captures enum value "kAzureNative" - VaultProviderStatsByEnvEnvironmentKAzureNative string = "kAzureNative" - - // VaultProviderStatsByEnvEnvironmentKAD captures enum value "kAD" - VaultProviderStatsByEnvEnvironmentKAD string = "kAD" - - // VaultProviderStatsByEnvEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - VaultProviderStatsByEnvEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" -) - -// prop value enum -func (m *VaultProviderStatsByEnv) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultProviderStatsByEnvTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VaultProviderStatsByEnv) 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 validates this vault provider stats by env based on context it is used -func (m *VaultProviderStatsByEnv) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VaultProviderStatsByEnv) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultProviderStatsByEnv) UnmarshalBinary(b []byte) error { - var res VaultProviderStatsByEnv - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_provider_stats_info.go b/v1/models/vault_provider_stats_info.go deleted file mode 100644 index b0613a7d..00000000 --- a/v1/models/vault_provider_stats_info.go +++ /dev/null @@ -1,324 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VaultProviderStatsInfo Vault Provider Stats Info. -// -// Specifies the stats for each vault. -// -// swagger:model VaultProviderStatsInfo -type VaultProviderStatsInfo struct { - - // Specifies the relative change of size of entities on the vault. - ChangeRate *int64 `json:"changeRate,omitempty"` - - // Specifies the cluster id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the cluster name. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the average read bandwidth over the last 24 hours. - ReadBandwidth *int64 `json:"readBandwidth,omitempty"` - - // Specifies the stats by environments. - StatsByEnv []*VaultProviderStatsByEnv `json:"statsByEnv"` - - // Specifies the cloud vendor type. - // Enum: ["kAws","kAzure","kGcp","kOracle","kNas","kQStar","kS3C","kOther"] - VaultGroup *string `json:"vaultGroup,omitempty"` - - // Specifies the Vault id. - VaultID *int64 `json:"vaultId,omitempty"` - - // Specifies the External Target type. - // Enum: ["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"] - VaultType *string `json:"vaultType,omitempty"` - - // Specifies the Vault name. - Vaultname *string `json:"vaultname,omitempty"` - - // Specifies the average write bandwidth over the last 24 hours. - WriteBandwidth *int64 `json:"writeBandwidth,omitempty"` -} - -// Validate validates this vault provider stats info -func (m *VaultProviderStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsByEnv(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultProviderStatsInfo) validateStatsByEnv(formats strfmt.Registry) error { - if swag.IsZero(m.StatsByEnv) { // not required - return nil - } - - for i := 0; i < len(m.StatsByEnv); i++ { - if swag.IsZero(m.StatsByEnv[i]) { // not required - continue - } - - if m.StatsByEnv[i] != nil { - if err := m.StatsByEnv[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var vaultProviderStatsInfoTypeVaultGroupPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAws","kAzure","kGcp","kOracle","kNas","kQStar","kS3C","kOther"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultProviderStatsInfoTypeVaultGroupPropEnum = append(vaultProviderStatsInfoTypeVaultGroupPropEnum, v) - } -} - -const ( - - // VaultProviderStatsInfoVaultGroupKAws captures enum value "kAws" - VaultProviderStatsInfoVaultGroupKAws string = "kAws" - - // VaultProviderStatsInfoVaultGroupKAzure captures enum value "kAzure" - VaultProviderStatsInfoVaultGroupKAzure string = "kAzure" - - // VaultProviderStatsInfoVaultGroupKGcp captures enum value "kGcp" - VaultProviderStatsInfoVaultGroupKGcp string = "kGcp" - - // VaultProviderStatsInfoVaultGroupKOracle captures enum value "kOracle" - VaultProviderStatsInfoVaultGroupKOracle string = "kOracle" - - // VaultProviderStatsInfoVaultGroupKNas captures enum value "kNas" - VaultProviderStatsInfoVaultGroupKNas string = "kNas" - - // VaultProviderStatsInfoVaultGroupKQStar captures enum value "kQStar" - VaultProviderStatsInfoVaultGroupKQStar string = "kQStar" - - // VaultProviderStatsInfoVaultGroupKS3C captures enum value "kS3C" - VaultProviderStatsInfoVaultGroupKS3C string = "kS3C" - - // VaultProviderStatsInfoVaultGroupKOther captures enum value "kOther" - VaultProviderStatsInfoVaultGroupKOther string = "kOther" -) - -// prop value enum -func (m *VaultProviderStatsInfo) validateVaultGroupEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultProviderStatsInfoTypeVaultGroupPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VaultProviderStatsInfo) validateVaultGroup(formats strfmt.Registry) error { - if swag.IsZero(m.VaultGroup) { // not required - return nil - } - - // value enum - if err := m.validateVaultGroupEnum("vaultGroup", "body", *m.VaultGroup); err != nil { - return err - } - - return nil -} - -var vaultProviderStatsInfoTypeVaultTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultProviderStatsInfoTypeVaultTypePropEnum = append(vaultProviderStatsInfoTypeVaultTypePropEnum, v) - } -} - -const ( - - // VaultProviderStatsInfoVaultTypeKNearline captures enum value "kNearline" - VaultProviderStatsInfoVaultTypeKNearline string = "kNearline" - - // VaultProviderStatsInfoVaultTypeKGlacier captures enum value "kGlacier" - VaultProviderStatsInfoVaultTypeKGlacier string = "kGlacier" - - // VaultProviderStatsInfoVaultTypeKS3 captures enum value "kS3" - VaultProviderStatsInfoVaultTypeKS3 string = "kS3" - - // VaultProviderStatsInfoVaultTypeKAzureStandard captures enum value "kAzureStandard" - VaultProviderStatsInfoVaultTypeKAzureStandard string = "kAzureStandard" - - // VaultProviderStatsInfoVaultTypeKS3Compatible captures enum value "kS3Compatible" - VaultProviderStatsInfoVaultTypeKS3Compatible string = "kS3Compatible" - - // VaultProviderStatsInfoVaultTypeKQStarTape captures enum value "kQStarTape" - VaultProviderStatsInfoVaultTypeKQStarTape string = "kQStarTape" - - // VaultProviderStatsInfoVaultTypeKGoogleStandard captures enum value "kGoogleStandard" - VaultProviderStatsInfoVaultTypeKGoogleStandard string = "kGoogleStandard" - - // VaultProviderStatsInfoVaultTypeKGoogleDRA captures enum value "kGoogleDRA" - VaultProviderStatsInfoVaultTypeKGoogleDRA string = "kGoogleDRA" - - // VaultProviderStatsInfoVaultTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - VaultProviderStatsInfoVaultTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // VaultProviderStatsInfoVaultTypeKAWSGovCloud captures enum value "kAWSGovCloud" - VaultProviderStatsInfoVaultTypeKAWSGovCloud string = "kAWSGovCloud" - - // VaultProviderStatsInfoVaultTypeKNAS captures enum value "kNAS" - VaultProviderStatsInfoVaultTypeKNAS string = "kNAS" - - // VaultProviderStatsInfoVaultTypeKColdline captures enum value "kColdline" - VaultProviderStatsInfoVaultTypeKColdline string = "kColdline" - - // VaultProviderStatsInfoVaultTypeKAzureGovCloud captures enum value "kAzureGovCloud" - VaultProviderStatsInfoVaultTypeKAzureGovCloud string = "kAzureGovCloud" - - // VaultProviderStatsInfoVaultTypeKAzureArchive captures enum value "kAzureArchive" - VaultProviderStatsInfoVaultTypeKAzureArchive string = "kAzureArchive" - - // VaultProviderStatsInfoVaultTypeKAzure captures enum value "kAzure" - VaultProviderStatsInfoVaultTypeKAzure string = "kAzure" - - // VaultProviderStatsInfoVaultTypeKGoogle captures enum value "kGoogle" - VaultProviderStatsInfoVaultTypeKGoogle string = "kGoogle" - - // VaultProviderStatsInfoVaultTypeKAmazon captures enum value "kAmazon" - VaultProviderStatsInfoVaultTypeKAmazon string = "kAmazon" - - // VaultProviderStatsInfoVaultTypeKOracle captures enum value "kOracle" - VaultProviderStatsInfoVaultTypeKOracle string = "kOracle" - - // VaultProviderStatsInfoVaultTypeKOracleTierStandard captures enum value "kOracleTierStandard" - VaultProviderStatsInfoVaultTypeKOracleTierStandard string = "kOracleTierStandard" - - // VaultProviderStatsInfoVaultTypeKOracleTierArchive captures enum value "kOracleTierArchive" - VaultProviderStatsInfoVaultTypeKOracleTierArchive string = "kOracleTierArchive" - - // VaultProviderStatsInfoVaultTypeKAmazonC2S captures enum value "kAmazonC2S" - VaultProviderStatsInfoVaultTypeKAmazonC2S string = "kAmazonC2S" -) - -// prop value enum -func (m *VaultProviderStatsInfo) validateVaultTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultProviderStatsInfoTypeVaultTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VaultProviderStatsInfo) validateVaultType(formats strfmt.Registry) error { - if swag.IsZero(m.VaultType) { // not required - return nil - } - - // value enum - if err := m.validateVaultTypeEnum("vaultType", "body", *m.VaultType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vault provider stats info based on the context it is used -func (m *VaultProviderStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsByEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultProviderStatsInfo) contextValidateStatsByEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsByEnv); i++ { - - if m.StatsByEnv[i] != nil { - - if swag.IsZero(m.StatsByEnv[i]) { // not required - return nil - } - - if err := m.StatsByEnv[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsByEnv" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultProviderStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultProviderStatsInfo) UnmarshalBinary(b []byte) error { - var res VaultProviderStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_provider_stats_list.go b/v1/models/vault_provider_stats_list.go deleted file mode 100644 index 6e7c8000..00000000 --- a/v1/models/vault_provider_stats_list.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VaultProviderStatsList Vault Provider Stats List. -// -// Specifies the stats by provider for each vault. -// -// swagger:model VaultProviderStatsList -type VaultProviderStatsList []*VaultProviderStatsInfo - -// Validate validates this vault provider stats list -func (m VaultProviderStatsList) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vault provider stats list based on the context it is used -func (m VaultProviderStatsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/models/vault_run_info.go b/v1/models/vault_run_info.go deleted file mode 100644 index 115be2e8..00000000 --- a/v1/models/vault_run_info.go +++ /dev/null @@ -1,55 +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" -) - -// VaultRunInfo VaultRunInfo -// -// Specifies the information about a specific vault run. -// -// swagger:model VaultRunInfo -type VaultRunInfo struct { - - // Specifies the count of runs that ended in the specified state between the start time passed in and the current timestamp. - Count *int64 `json:"count,omitempty"` - - // Specifies the Unix timestamp at which the run entered the specified state. - Timestamp *int64 `json:"timestamp,omitempty"` -} - -// Validate validates this vault run info -func (m *VaultRunInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vault run info based on context it is used -func (m *VaultRunInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VaultRunInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultRunInfo) UnmarshalBinary(b []byte) error { - var res VaultRunInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_run_stats_summary.go b/v1/models/vault_run_stats_summary.go deleted file mode 100644 index ca7536ac..00000000 --- a/v1/models/vault_run_stats_summary.go +++ /dev/null @@ -1,197 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VaultRunStatsSummary Vault Run Stats Summary. -// -// Specifies the stats by run type for each vault run. -// -// swagger:model VaultRunStatsSummary -type VaultRunStatsSummary struct { - - // Specifies the time series for the failed runs that ended in the given time frame. - FailureTimeSeries []*VaultRunInfo `json:"failureTimeSeries"` - - // Specifies the number of runs that ended in failure during the given time frame. - NumFailedRuns *int64 `json:"numFailedRuns,omitempty"` - - // Specifies the number of runs that were currently in progress at the time that the API call was made. - NumInProgressRuns *int64 `json:"numInProgressRuns,omitempty"` - - // Specifies the number of runs that were currently queued at the time that the API call was made. - NumQueuedRuns *int64 `json:"numQueuedRuns,omitempty"` - - // Specifies the number of runs that ended in success during the given time frame. - NumSuccessfulRuns *int64 `json:"numSuccessfulRuns,omitempty"` - - // Specifies the time series for the successful runs that ended in the given time frame. - SuccessTimeSeries []*VaultRunInfo `json:"successTimeSeries"` -} - -// Validate validates this vault run stats summary -func (m *VaultRunStatsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFailureTimeSeries(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSuccessTimeSeries(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultRunStatsSummary) validateFailureTimeSeries(formats strfmt.Registry) error { - if swag.IsZero(m.FailureTimeSeries) { // not required - return nil - } - - for i := 0; i < len(m.FailureTimeSeries); i++ { - if swag.IsZero(m.FailureTimeSeries[i]) { // not required - continue - } - - if m.FailureTimeSeries[i] != nil { - if err := m.FailureTimeSeries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failureTimeSeries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failureTimeSeries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VaultRunStatsSummary) validateSuccessTimeSeries(formats strfmt.Registry) error { - if swag.IsZero(m.SuccessTimeSeries) { // not required - return nil - } - - for i := 0; i < len(m.SuccessTimeSeries); i++ { - if swag.IsZero(m.SuccessTimeSeries[i]) { // not required - continue - } - - if m.SuccessTimeSeries[i] != nil { - if err := m.SuccessTimeSeries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("successTimeSeries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("successTimeSeries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vault run stats summary based on the context it is used -func (m *VaultRunStatsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFailureTimeSeries(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSuccessTimeSeries(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultRunStatsSummary) contextValidateFailureTimeSeries(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailureTimeSeries); i++ { - - if m.FailureTimeSeries[i] != nil { - - if swag.IsZero(m.FailureTimeSeries[i]) { // not required - return nil - } - - if err := m.FailureTimeSeries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failureTimeSeries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failureTimeSeries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VaultRunStatsSummary) contextValidateSuccessTimeSeries(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SuccessTimeSeries); i++ { - - if m.SuccessTimeSeries[i] != nil { - - if swag.IsZero(m.SuccessTimeSeries[i]) { // not required - return nil - } - - if err := m.SuccessTimeSeries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("successTimeSeries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("successTimeSeries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultRunStatsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultRunStatsSummary) UnmarshalBinary(b []byte) error { - var res VaultRunStatsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_stats.go b/v1/models/vault_stats.go deleted file mode 100644 index f882611d..00000000 --- a/v1/models/vault_stats.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VaultStats Vault Stats. -// -// Specifies the storage usage on vaults. -// -// swagger:model VaultStats -type VaultStats struct { - - // Specifies the usage on AWS vaults. - AwsUsageBytes *int64 `json:"awsUsageBytes,omitempty"` - - // Specifies the usage on Azure vaults. - AzureUsageBytes *int64 `json:"azureUsageBytes,omitempty"` - - // Specifies the usage on GCP vaults. - GcpUsageBytes *int64 `json:"gcpUsageBytes,omitempty"` - - // Specifies the usage on NAS vaults. - NasUsageBytes *int64 `json:"nasUsageBytes,omitempty"` - - // Specifies the usage on Oracle vaults. - OracleUsageBytes *int64 `json:"oracleUsageBytes,omitempty"` - - // Specifies the usage on QStar Tape vaults. - QstarUsageBytes *int64 `json:"qstarUsageBytes,omitempty"` - - // Specifies the usage on S3 Compatible vaults. - S3cUsageBytes *int64 `json:"s3cUsageBytes,omitempty"` - - // Specifies the stats of all vaults on the cluster. - VaultStatsList []*VaultStatsInfo `json:"vaultStatsList"` -} - -// Validate validates this vault stats -func (m *VaultStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVaultStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultStats) validateVaultStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.VaultStatsList) { // not required - return nil - } - - for i := 0; i < len(m.VaultStatsList); i++ { - if swag.IsZero(m.VaultStatsList[i]) { // not required - continue - } - - if m.VaultStatsList[i] != nil { - if err := m.VaultStatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vault stats based on the context it is used -func (m *VaultStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVaultStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VaultStats) contextValidateVaultStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VaultStatsList); i++ { - - if m.VaultStatsList[i] != nil { - - if swag.IsZero(m.VaultStatsList[i]) { // not required - return nil - } - - if err := m.VaultStatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vaultStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vaultStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VaultStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultStats) UnmarshalBinary(b []byte) error { - var res VaultStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vault_stats_info.go b/v1/models/vault_stats_info.go deleted file mode 100644 index a59d58bf..00000000 --- a/v1/models/vault_stats_info.go +++ /dev/null @@ -1,173 +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" -) - -// VaultStatsInfo Vault Stats. -// -// Specifies the stats for each vault. -// -// swagger:model VaultStatsInfo -type VaultStatsInfo struct { - - // Specifies the Vault Id. - ID *int64 `json:"id,omitempty"` - - // Specifies the Vault name. - Name *string `json:"name,omitempty"` - - // Specifies the Vault type. - // Enum: ["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"] - Type *string `json:"type,omitempty"` - - // Specifies the bytes used by the Vault. - UsageBytes *int64 `json:"usageBytes,omitempty"` -} - -// Validate validates this vault stats info -func (m *VaultStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vaultStatsInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNearline","kGlacier","kS3","kAzureStandard","kS3Compatible","kQStarTape","kGoogleStandard","kGoogleDRA","kAmazonS3StandardIA","kAWSGovCloud","kNAS","kColdline","kAzureGovCloud","kAzureArchive","kAzure","kGoogle","kAmazon","kOracle","kOracleTierStandard","kOracleTierArchive","kAmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vaultStatsInfoTypeTypePropEnum = append(vaultStatsInfoTypeTypePropEnum, v) - } -} - -const ( - - // VaultStatsInfoTypeKNearline captures enum value "kNearline" - VaultStatsInfoTypeKNearline string = "kNearline" - - // VaultStatsInfoTypeKGlacier captures enum value "kGlacier" - VaultStatsInfoTypeKGlacier string = "kGlacier" - - // VaultStatsInfoTypeKS3 captures enum value "kS3" - VaultStatsInfoTypeKS3 string = "kS3" - - // VaultStatsInfoTypeKAzureStandard captures enum value "kAzureStandard" - VaultStatsInfoTypeKAzureStandard string = "kAzureStandard" - - // VaultStatsInfoTypeKS3Compatible captures enum value "kS3Compatible" - VaultStatsInfoTypeKS3Compatible string = "kS3Compatible" - - // VaultStatsInfoTypeKQStarTape captures enum value "kQStarTape" - VaultStatsInfoTypeKQStarTape string = "kQStarTape" - - // VaultStatsInfoTypeKGoogleStandard captures enum value "kGoogleStandard" - VaultStatsInfoTypeKGoogleStandard string = "kGoogleStandard" - - // VaultStatsInfoTypeKGoogleDRA captures enum value "kGoogleDRA" - VaultStatsInfoTypeKGoogleDRA string = "kGoogleDRA" - - // VaultStatsInfoTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - VaultStatsInfoTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // VaultStatsInfoTypeKAWSGovCloud captures enum value "kAWSGovCloud" - VaultStatsInfoTypeKAWSGovCloud string = "kAWSGovCloud" - - // VaultStatsInfoTypeKNAS captures enum value "kNAS" - VaultStatsInfoTypeKNAS string = "kNAS" - - // VaultStatsInfoTypeKColdline captures enum value "kColdline" - VaultStatsInfoTypeKColdline string = "kColdline" - - // VaultStatsInfoTypeKAzureGovCloud captures enum value "kAzureGovCloud" - VaultStatsInfoTypeKAzureGovCloud string = "kAzureGovCloud" - - // VaultStatsInfoTypeKAzureArchive captures enum value "kAzureArchive" - VaultStatsInfoTypeKAzureArchive string = "kAzureArchive" - - // VaultStatsInfoTypeKAzure captures enum value "kAzure" - VaultStatsInfoTypeKAzure string = "kAzure" - - // VaultStatsInfoTypeKGoogle captures enum value "kGoogle" - VaultStatsInfoTypeKGoogle string = "kGoogle" - - // VaultStatsInfoTypeKAmazon captures enum value "kAmazon" - VaultStatsInfoTypeKAmazon string = "kAmazon" - - // VaultStatsInfoTypeKOracle captures enum value "kOracle" - VaultStatsInfoTypeKOracle string = "kOracle" - - // VaultStatsInfoTypeKOracleTierStandard captures enum value "kOracleTierStandard" - VaultStatsInfoTypeKOracleTierStandard string = "kOracleTierStandard" - - // VaultStatsInfoTypeKOracleTierArchive captures enum value "kOracleTierArchive" - VaultStatsInfoTypeKOracleTierArchive string = "kOracleTierArchive" - - // VaultStatsInfoTypeKAmazonC2S captures enum value "kAmazonC2S" - VaultStatsInfoTypeKAmazonC2S string = "kAmazonC2S" -) - -// prop value enum -func (m *VaultStatsInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vaultStatsInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VaultStatsInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vault stats info based on context it is used -func (m *VaultStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VaultStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultStatsInfo) UnmarshalBinary(b []byte) error { - var res VaultStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vcd_storage_profile.go b/v1/models/vcd_storage_profile.go deleted file mode 100644 index 25ef8e70..00000000 --- a/v1/models/vcd_storage_profile.go +++ /dev/null @@ -1,55 +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" -) - -// VcdStorageProfile Vcd Storage Profile. -// -// Specifies a storage profile for use while recovering to a VMware VCD. -// -// swagger:model VcdStorageProfile -type VcdStorageProfile struct { - - // Specifies the name of the storage profile. - Name *string `json:"name,omitempty"` - - // Specifies the UUID of the storage profile as identified by the VCD. - UUID *string `json:"uuid,omitempty"` -} - -// Validate validates this vcd storage profile -func (m *VcdStorageProfile) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vcd storage profile based on context it is used -func (m *VcdStorageProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VcdStorageProfile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdStorageProfile) UnmarshalBinary(b []byte) error { - var res VcdStorageProfile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/verify_otp_code_params.go b/v1/models/verify_otp_code_params.go deleted file mode 100644 index 332cd9b9..00000000 --- a/v1/models/verify_otp_code_params.go +++ /dev/null @@ -1,126 +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" -) - -// VerifyOtpCodeParams Parameters to verify OTP code. -// -// Specifies the parameters to verify OTP code. -// -// swagger:model VerifyOtpCodeParams -type VerifyOtpCodeParams struct { - - // Specifies the OTP code. - // Required: true - OtpCode *string `json:"otpCode"` - - // Specifies OTP type. - // 'Totp' implies the code is TOTP. - // 'Email' implies the code is email OTP. - // Enum: ["Totp","Email"] - OtpType *string `json:"otpType,omitempty"` -} - -// Validate validates this verify otp code params -func (m *VerifyOtpCodeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOtpCode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOtpType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VerifyOtpCodeParams) validateOtpCode(formats strfmt.Registry) error { - - if err := validate.Required("otpCode", "body", m.OtpCode); err != nil { - return err - } - - return nil -} - -var verifyOtpCodeParamsTypeOtpTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Totp","Email"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - verifyOtpCodeParamsTypeOtpTypePropEnum = append(verifyOtpCodeParamsTypeOtpTypePropEnum, v) - } -} - -const ( - - // VerifyOtpCodeParamsOtpTypeTotp captures enum value "Totp" - VerifyOtpCodeParamsOtpTypeTotp string = "Totp" - - // VerifyOtpCodeParamsOtpTypeEmail captures enum value "Email" - VerifyOtpCodeParamsOtpTypeEmail string = "Email" -) - -// prop value enum -func (m *VerifyOtpCodeParams) validateOtpTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, verifyOtpCodeParamsTypeOtpTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VerifyOtpCodeParams) validateOtpType(formats strfmt.Registry) error { - if swag.IsZero(m.OtpType) { // not required - return nil - } - - // value enum - if err := m.validateOtpTypeEnum("otpType", "body", *m.OtpType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this verify otp code params based on context it is used -func (m *VerifyOtpCodeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VerifyOtpCodeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VerifyOtpCodeParams) UnmarshalBinary(b []byte) error { - var res VerifyOtpCodeParams - 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 deleted file mode 100644 index d035bce4..00000000 --- a/v1/models/view.go +++ /dev/null @@ -1,1385 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// View View. -// -// Specifies settings for defining a storage location (called a View) -// with NFS and SMB mount paths in a Storage Domain (View Box) on the Cohesity -// Cluster. -// -// swagger:model View -type View struct { - - // Array of Security Identifiers (SIDs) - // - // Specifies the list of security identifiers (SIDs) for the restricted - // Principals who have access to this View. - AccessSids []string `json:"accessSids"` - - // Aliases created for the view. A view alias allows a directory path inside - // a view to be mounted using the alias name. - Aliases []*ViewAlias `json:"aliases"` - - // Array of SMB Paths. - // - // Specifies the possible paths that can be used to mount this View - // as a SMB share. If Active Directory has multiple account names; - // each machine account has its own path. - AllSmbMountPaths []string `json:"allSmbMountPaths"` - - // Specifies the antivirus scan config settings for this View. - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - // Specifies the NFS mount path of the View (without the hostname - // information). - // This path is used to support NFS mounting of the paths specified in the - // nfsExportPathList on Windows systems. - BasicMountPath *string `json:"basicMountPath,omitempty"` - - // Specifies whether to support case insensitive file/folder names. This - // parameter can only be set during create and cannot be changed. - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - // Specifies the time that the View was created in milliseconds. - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - // DataLock (Write Once Read Many) lock expiry epoch time in microseconds. If - // a view is marked as a DataLock view, only a Data Security Officer (a user - // having Data Security Privilege) can delete the view until the lock expiry - // time. - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - // Specifies an optional text description about the View. - Description *string `json:"description,omitempty"` - - // Specifies whether fast durable handle is enabled. If enabled, view open - // handle will be kept in memory, which results in a higher performance. But - // the handles cannot be recovered if node or service crashes. - EnableFastDurableHandle *bool `json:"enableFastDurableHandle,omitempty"` - - // Specifies if Filer Audit Logging is enabled for this view. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Specifies whether to enable live indexing for the view. - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - // Specifies whether view is blur enabled. - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - // If set, mixed mode (NFS and SMB) access is enabled for this view. - // This field is deprecated. Use the field SecurityMode. - // deprecated: true - EnableMixedModePermissions *bool `json:"enableMixedModePermissions,omitempty"` - - // If set, it enables discovery of view for NFS. - EnableNfsViewDiscovery *bool `json:"enableNfsViewDiscovery,omitempty"` - - // Specifies whether to enable offline file caching of the view. - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - // Specifies if access-based enumeration should be enabled. - // If 'true', only files and folders that the user has permissions to - // access are visible on the SMB share for that user. - EnableSmbAccessBasedEnumeration *bool `json:"enableSmbAccessBasedEnumeration,omitempty"` - - // Specifies the SMB encryption for the View. If set, it enables the SMB - // encryption for the View. Encryption is supported only by SMB 3.x dialects. - // Dialects that do not support would still access data in unencrypted - // format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // Specifies whether SMB opportunistic lock is enabled. - EnableSmbOplock *bool `json:"enableSmbOplock,omitempty"` - - // If set, it enables discovery of view for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View. - // If set, encryption is enforced for all the sessions for the View. When - // enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Optional filtering criteria that should be satisfied by all the files - // created in this view. It does not affect existing files. - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - // Optional config that enables file locking for this view. It cannot be - // disabled during the edit of a view, if it has been enabled during the - // creation of the view. Also, it cannot be enabled if it was disabled - // during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies the Intent of the View. - // readOnly: true - Intent *ViewIntent `json:"intent,omitempty"` - - // Specifies whether view is for externally triggered backup target. - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - // Specifies if the view is a read only view. User will no longer be able to - // write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // Specifies if a view contains migrated data. - IsTargetForMigratedData *bool `json:"isTargetForMigratedData,omitempty"` - - // logical quota - LogicalQuota *ViewLogicalQuota `json:"logicalQuota,omitempty"` - - // LogicalUsageBytes is the logical usage in bytes for the view. - LogicalUsageBytes *int64 `json:"logicalUsageBytes,omitempty"` - - // Specifies the name of the View. - Name *string `json:"name,omitempty"` - - // Array of Netgroups. - // - // Specifies a list of Netgroups that have permissions to access the - // View. (Overrides the Netgroups specified at the global Cohesity - // Cluster level.) - NetgroupWhitelist []*NisNetgroup `json:"netgroupWhitelist"` - - // Specifies the NFS all squash config. - NfsAllSquash *NfsSquash `json:"nfsAllSquash,omitempty"` - - // Specifies the path for mounting this View as an NFS share. - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Specifies the NFS root permission config of the view file system. - NfsRootPermissions *NfsRootPermissions `json:"nfsRootPermissions,omitempty"` - - // Specifies the NFS root squash config. - NfsRootSquash *NfsSquash `json:"nfsRootSquash,omitempty"` - - // Specifies whether view level client netgroup allowlist overrides cluster - // and global setting. - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - // Specifies whether view level client subnet allowlist overrides cluster and - // global setting. - OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - - // Specifies the Sid of the view owner. - OwnerSid *string `json:"ownerSid,omitempty"` - - // 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. - // 'kS3Only' enables protocol access to S3 only. - // 'kSwiftOnly' enables protocol access to Swift only. - // 'kUnknown' indicates that the protocol access of a view does not match - // any of the above. In this case, the constant is used as 'catch-all'. - // Enum: ["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"] - ProtocolAccess *string `json:"protocolAccess,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies the path to access this View as an S3 share. - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - // Specifies whether to support s3 folder support feature on the view. This - // parameter can only be set during create and cannot be changed. - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - // Specifies the S3 key mapping config of the view. This parameter can only - // be set during create and cannot be changed. - // Configuration of S3 key mapping. - // - // Specifies the type of S3 key mapping config. - // Enum: ["kRandom","kShort","kLong","kHierarchical","kObjectId"] - S3KeyMappingConfig *string `json:"s3KeyMappingConfig,omitempty"` - - // Specifies the security mode used for this view. - // Currently we support the following modes: Native, Unified and NTFS style. - // 'kNativeMode' indicates a native security mode. - // 'kUnifiedMode' indicates a unified security mode. - // 'kNtfsMode' indicates a NTFS style security mode. - // Enum: ["kNativeMode","kUnifiedMode","kNtfsMode"] - SecurityMode *string `json:"securityMode,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies the main path for mounting this View as an SMB share. - SmbMountPath *string `json:"smbMountPath,omitempty"` - - // Specifies the SMB permissions for the View. - SmbPermissionsInfo *SmbPermissionsInfo `json:"smbPermissionsInfo,omitempty"` - - // Specifies statistics about the View. - // readOnly: true - Stats *ViewStats `json:"stats,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from - // the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // Array of Subnets. - // - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View. (Overrides the Subnets specified at the global - // Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this view. - SuperUserSids []string `json:"superUserSids"` - - // Specifies the Keystone project domain. - SwiftProjectDomain *string `json:"swiftProjectDomain,omitempty"` - - // Specifies the Keystone project name. - SwiftProjectName *string `json:"swiftProjectName,omitempty"` - - // Specifies the Keystone user domain. - SwiftUserDomain *string `json:"swiftUserDomain,omitempty"` - - // Specifies the Keystone username. - SwiftUsername *string `json:"swiftUsername,omitempty"` - - // Optional tenant id who has access to this View. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the id of the Storage Domain (View Box) where the View is stored. - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the name of the Storage Domain (View Box) where the View is stored. - ViewBoxName *string `json:"viewBoxName,omitempty"` - - // Specifies an id of the View assigned by the Cohesity Cluster. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies whether view lock is enabled. If enabled the view cannot be - // modified or deleted until unlock. By default it is disabled. - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - // Specifies the pinning config of this view. - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` - - // Specifies information about the Protection Jobs protecting this View. - ViewProtection *ViewProtection `json:"viewProtection,omitempty"` -} - -// Validate validates this view -func (m *View) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAliases(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAntivirusScanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileExtensionFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIntent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsAllSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootPermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3KeyMappingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPermissionsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPinningConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewProtection(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *View) validateAliases(formats strfmt.Registry) error { - if swag.IsZero(m.Aliases) { // not required - return nil - } - - for i := 0; i < len(m.Aliases); i++ { - if swag.IsZero(m.Aliases[i]) { // not required - continue - } - - if m.Aliases[i] != nil { - if err := m.Aliases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateAntivirusScanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if m.AntivirusScanConfig != nil { - if err := m.AntivirusScanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *View) validateFileExtensionFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if m.FileExtensionFilter != nil { - if err := m.FileExtensionFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *View) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *View) validateIntent(formats strfmt.Registry) error { - if swag.IsZero(m.Intent) { // not required - return nil - } - - if m.Intent != nil { - if err := m.Intent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -func (m *View) validateLogicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalQuota) { // not required - 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 -} - -func (m *View) validateNetgroupWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - continue - } - - if m.NetgroupWhitelist[i] != nil { - if err := m.NetgroupWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateNfsAllSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if m.NfsAllSquash != nil { - if err := m.NfsAllSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *View) validateNfsRootPermissions(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if m.NfsRootPermissions != nil { - if err := m.NfsRootPermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *View) validateNfsRootSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if m.NfsRootSquash != nil { - if err := m.NfsRootSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -var viewTypeProtocolAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kNFSOnly","kSMBOnly","kS3Only","kSwiftOnly","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewTypeProtocolAccessPropEnum = append(viewTypeProtocolAccessPropEnum, v) - } -} - -const ( - - // ViewProtocolAccessKAll captures enum value "kAll" - ViewProtocolAccessKAll string = "kAll" - - // ViewProtocolAccessKNFSOnly captures enum value "kNFSOnly" - ViewProtocolAccessKNFSOnly string = "kNFSOnly" - - // ViewProtocolAccessKSMBOnly captures enum value "kSMBOnly" - ViewProtocolAccessKSMBOnly string = "kSMBOnly" - - // ViewProtocolAccessKS3Only captures enum value "kS3Only" - ViewProtocolAccessKS3Only string = "kS3Only" - - // ViewProtocolAccessKSwiftOnly captures enum value "kSwiftOnly" - ViewProtocolAccessKSwiftOnly string = "kSwiftOnly" - - // ViewProtocolAccessKUnknown captures enum value "kUnknown" - ViewProtocolAccessKUnknown string = "kUnknown" -) - -// prop value enum -func (m *View) validateProtocolAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewTypeProtocolAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *View) validateProtocolAccess(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - // value enum - if err := m.validateProtocolAccessEnum("protocolAccess", "body", *m.ProtocolAccess); err != nil { - return err - } - - return nil -} - -func (m *View) validateQos(formats strfmt.Registry) error { - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -var viewTypeS3KeyMappingConfigPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRandom","kShort","kLong","kHierarchical","kObjectId"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewTypeS3KeyMappingConfigPropEnum = append(viewTypeS3KeyMappingConfigPropEnum, v) - } -} - -const ( - - // ViewS3KeyMappingConfigKRandom captures enum value "kRandom" - ViewS3KeyMappingConfigKRandom string = "kRandom" - - // ViewS3KeyMappingConfigKShort captures enum value "kShort" - ViewS3KeyMappingConfigKShort string = "kShort" - - // ViewS3KeyMappingConfigKLong captures enum value "kLong" - ViewS3KeyMappingConfigKLong string = "kLong" - - // ViewS3KeyMappingConfigKHierarchical captures enum value "kHierarchical" - ViewS3KeyMappingConfigKHierarchical string = "kHierarchical" - - // ViewS3KeyMappingConfigKObjectID captures enum value "kObjectId" - ViewS3KeyMappingConfigKObjectID string = "kObjectId" -) - -// prop value enum -func (m *View) validateS3KeyMappingConfigEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewTypeS3KeyMappingConfigPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *View) validateS3KeyMappingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.S3KeyMappingConfig) { // not required - return nil - } - - // value enum - if err := m.validateS3KeyMappingConfigEnum("s3KeyMappingConfig", "body", *m.S3KeyMappingConfig); err != nil { - return err - } - - return nil -} - -var viewTypeSecurityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNativeMode","kUnifiedMode","kNtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewTypeSecurityModePropEnum = append(viewTypeSecurityModePropEnum, v) - } -} - -const ( - - // ViewSecurityModeKNativeMode captures enum value "kNativeMode" - ViewSecurityModeKNativeMode string = "kNativeMode" - - // ViewSecurityModeKUnifiedMode captures enum value "kUnifiedMode" - ViewSecurityModeKUnifiedMode string = "kUnifiedMode" - - // ViewSecurityModeKNtfsMode captures enum value "kNtfsMode" - ViewSecurityModeKNtfsMode string = "kNtfsMode" -) - -// prop value enum -func (m *View) validateSecurityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewTypeSecurityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *View) validateSecurityMode(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityMode) { // not required - return nil - } - - // value enum - if err := m.validateSecurityModeEnum("securityMode", "body", *m.SecurityMode); err != nil { - return err - } - - return nil -} - -func (m *View) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateSmbPermissionsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if m.SmbPermissionsInfo != nil { - if err := m.SmbPermissionsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *View) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *View) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *View) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateViewPinningConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if m.ViewPinningConfig != nil { - if err := m.ViewPinningConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -func (m *View) validateViewProtection(formats strfmt.Registry) error { - if swag.IsZero(m.ViewProtection) { // not required - return nil - } - - if m.ViewProtection != nil { - if err := m.ViewProtection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtection") - } - 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 - - if err := m.contextValidateAliases(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAntivirusScanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileExtensionFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIntent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsAllSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootPermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPermissionsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewPinningConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewProtection(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *View) contextValidateAliases(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Aliases); i++ { - - if m.Aliases[i] != nil { - - if swag.IsZero(m.Aliases[i]) { // not required - return nil - } - - if err := m.Aliases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateAntivirusScanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AntivirusScanConfig != nil { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if err := m.AntivirusScanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateFileExtensionFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileExtensionFilter != nil { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if err := m.FileExtensionFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateIntent(ctx context.Context, formats strfmt.Registry) error { - - if m.Intent != nil { - - if swag.IsZero(m.Intent) { // not required - return nil - } - - if err := m.Intent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -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 -} - -func (m *View) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetgroupWhitelist); i++ { - - if m.NetgroupWhitelist[i] != nil { - - if swag.IsZero(m.NetgroupWhitelist[i]) { // not required - return nil - } - - if err := m.NetgroupWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateNfsAllSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsAllSquash != nil { - - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if err := m.NfsAllSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateNfsRootPermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootPermissions != nil { - - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if err := m.NfsRootPermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateNfsRootSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootSquash != nil { - - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if err := m.NfsRootSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateSmbPermissionsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbPermissionsInfo != nil { - - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if err := m.SmbPermissionsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -func (m *View) 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 -} - -func (m *View) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateViewPinningConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewPinningConfig != nil { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if err := m.ViewPinningConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateViewProtection(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewProtection != nil { - - if swag.IsZero(m.ViewProtection) { // not required - return nil - } - - if err := m.ViewProtection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtection") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *View) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *View) UnmarshalBinary(b []byte) error { - var res View - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_alias.go b/v1/models/view_alias.go deleted file mode 100644 index 2d05e58c..00000000 --- a/v1/models/view_alias.go +++ /dev/null @@ -1,216 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewAlias Alias. -// -// Specifies the parameters of a view alias. -// -// swagger:model ViewAlias -type ViewAlias struct { - - // Alias name. - AliasName *string `json:"aliasName,omitempty"` - - // Specifies whether to enable filer audit log on this view alias. - EnableFilerAuditLog *bool `json:"enableFilerAuditLog,omitempty"` - - // Specifies the SMB encryption for the View Alias. If set, it enables the - // SMB encryption for the View Alias. Encryption is supported only by SMB 3.x - // dialects. Dialects that do not support would still access data in - // unencrypted format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // If set, it enables discovery of view alias for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View Alias. - // If set, encryption is enforced for all the sessions for the View Alias. - // When enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View Alias. (Overrides the Subnets specified at the global - // Cohesity Cluster level and View level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies a list of user sids who have Superuser access to this alias. - SuperUserSids []string `json:"superUserSids"` - - // View name. - ViewName *string `json:"viewName,omitempty"` - - // View path for the alias. - ViewPath *string `json:"viewPath,omitempty"` -} - -// Validate validates this view alias -func (m *ViewAlias) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewAlias) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewAlias) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view alias based on the context it is used -func (m *ViewAlias) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewAlias) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewAlias) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewAlias) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewAlias) UnmarshalBinary(b []byte) error { - var res ViewAlias - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_box.go b/v1/models/view_box.go deleted file mode 100644 index 6b707022..00000000 --- a/v1/models/view_box.go +++ /dev/null @@ -1,653 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewBox Domain (View Box). -// -// Provides details about a Storage Domain (View Box). -// -// swagger:model ViewBox -type ViewBox struct { - - // Specifies an active directory domain that this view box is mapped to. - AdDomainName *string `json:"adDomainName,omitempty"` - - // Specifies the default brick size used by the viewbox. - BrickSize *int32 `json:"brickSize,omitempty"` - - // Array of Subnets. - // - // Specifies the Subnets from which this Storage Domain (View Box) accepts - // requests. - ClientSubnetWhiteList []*Subnet `json:"clientSubnetWhiteList"` - - // Specifies the associated cloud domain Id. - CloudDomainID *int64 `json:"cloudDomainId,omitempty"` - - // Specifies the cloud down water-fall threshold percentage. This indicates - // how full should a viewbox at least be before we down water-fall its data - // to cloud tier. If this field is set, the physical quota limit must be set - // also and will be used as viewbox capacity. - CloudDownWaterfallThresholdPct *int32 `json:"cloudDownWaterfallThresholdPct,omitempty"` - - // Specifies the cloud down water-fall threshold seconds. This indicates - // what's the time threshold on water-falling data to cloud tier. - CloudDownWaterfallThresholdSecs *int32 `json:"cloudDownWaterfallThresholdSecs,omitempty"` - - // Specifies the Cluster Partition id where the Storage Domain (View Box) is - // located. - // Required: true - ClusterPartitionID *int64 `json:"clusterPartitionId"` - - // Specifies the Cohesity Cluster name where the Storage Domain (View Box) is - // located. - // 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 whether DEK(Data Encryption Key) rotation is enabled for this - // viewbox. This is applicable only when the viewbox uses AWS or similar KMS - // in which the KEK (Key Encryption Key) is not created and maintained by - // Cohesity. For Internal KMS and keys stored in Safenet servers, DEK - // rotation will not be performed. - DekRotationEnabled *bool `json:"dekRotationEnabled,omitempty"` - - // Specifies whether this viewbox can be used as a staging area while copying - // a largedataset that can't fit on the cluster to an external target. The - // amount of data that can be stored on the viewbox can be specified using - // 'physical_quota'. - DirectArchiveEnabled *bool `json:"directArchiveEnabled,omitempty"` - - // Specifies the Id of the Storage Domain (View Box). - ID *int64 `json:"id,omitempty"` - - // Recommendation for the view if the template id was passed during query. - // We say the view is to be recommended, if the dedup and inlinecompression - // both are same as the template's property. - IsRecommended *bool `json:"isRecommended,omitempty"` - - // Specifies the Kerberos domain that this view box is mapped to. - KerberosRealmName *string `json:"kerberosRealmName,omitempty"` - - // Specifies the associated KMS Server ID. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Last key rotation timestamp in msecs for viewbox. - LastKeyRotationTimestampMsecs *int64 `json:"lastKeyRotationTimestampMsecs,omitempty"` - - // When set, the following provides the LDAP provider the view box is - // mapped to. For any view from this view box, when accessed via NFS the - // following LDAP provider is looked up for getting Unix IDs of the - // corresponding user. Similarly, when a view is accessed via SMB and if - // the AD user's domain matches with the view box's AD, the following LDAP - // provider will be used to lookup Unix IDs for the corresponding AD user. - // Additionally there is also a mapping between LDAP provider and AD domain - // that is stored in AD provider config. It will be used if AD is not set - // on the view box. - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Specifies the name of the Storage Domain (View Box). - // Required: true - Name *string `json:"name"` - - // Specifies the NIS domain that this view box is mapped to. - NisDomainNameVec []string `json:"nisDomainNameVec"` - - // physical quota - PhysicalQuota *ViewBoxPhysicalQuota `json:"physicalQuota,omitempty"` - - // Specifies the current removal state of the Storage Domain (View Box). - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["kDontRemove","kMarkedForRemoval","kOkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // Specifies whether creation of a S3 bucket is allowed in this - // Storage Domain (View Box). - // When a new S3 bucket creation request arrives, we'll look at all the View - // Boxes and the first Storage Domain (View Box) that allows creating S3 - // buckets in it will be the one where the bucket will be placed. - S3BucketsAllowed *bool `json:"s3BucketsAllowed,omitempty"` - - // Specifies the time series schema info of the view box. - SchemaInfoList []*SchemaInfo `json:"schemaInfoList"` - - // Specifies statistics about the Storage Domain (View Box). - // readOnly: true - Stats *ViewBoxStats `json:"stats,omitempty"` - - // Specifies the storage options applied to the Storage Domain (View Box). - StoragePolicy *StoragePolicy `json:"storagePolicy,omitempty"` - - // Optional ids for the tenants that this view box belongs. This must be - // checked before granting access to users. Unless the cluster enables view - // box sharing between tenants is allowed, there shall be at most one item - // in this list. Note that if all tenant may be deleted - such viewboxes - // must be garbage collected. This is currently done by a background thread - // in iris. - TenantIDVec []string `json:"tenantIdVec"` - - // If 'true', when the Cohesity Cluster is writing to a file, the - // file modification time is not persisted synchronously during the - // file write, so the modification time may not be accurate. - // (Typically the file modification time is off by 30 seconds but - // it can be longer.) - // Only set to 'false' if your environment requires a very accurate - // modification time. - // The default value is 'true' which provides the best Cohesity - // Cluster performance. - TreatFileSyncAsDataSync *bool `json:"treatFileSyncAsDataSync,omitempty"` - - // Specifies the brick size to be used by the viewbox for creating any new - // blobs. - UpdatedBrickSize *int32 `json:"updatedBrickSize,omitempty"` - - // Specifies the associated vault Id. - VaultID *int64 `json:"vaultId,omitempty"` -} - -// Validate validates this view box -func (m *ViewBox) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnetWhiteList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterPartitionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultViewQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemaInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewBox) validateClientSubnetWhiteList(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhiteList) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhiteList); i++ { - if swag.IsZero(m.ClientSubnetWhiteList[i]) { // not required - continue - } - - if m.ClientSubnetWhiteList[i] != nil { - if err := m.ClientSubnetWhiteList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewBox) validateClusterPartitionID(formats strfmt.Registry) error { - - if err := validate.Required("clusterPartitionId", "body", m.ClusterPartitionID); err != nil { - return err - } - - return nil -} - -func (m *ViewBox) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - 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 -} - -func (m *ViewBox) validateDefaultViewQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultViewQuotaPolicy) { // not required - 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 -} - -func (m *ViewBox) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ViewBox) validatePhysicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalQuota) { // not required - 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 -} - -var viewBoxTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDontRemove","kMarkedForRemoval","kOkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewBoxTypeRemovalStatePropEnum = append(viewBoxTypeRemovalStatePropEnum, v) - } -} - -const ( - - // ViewBoxRemovalStateKDontRemove captures enum value "kDontRemove" - ViewBoxRemovalStateKDontRemove string = "kDontRemove" - - // ViewBoxRemovalStateKMarkedForRemoval captures enum value "kMarkedForRemoval" - ViewBoxRemovalStateKMarkedForRemoval string = "kMarkedForRemoval" - - // ViewBoxRemovalStateKOkToRemove captures enum value "kOkToRemove" - ViewBoxRemovalStateKOkToRemove string = "kOkToRemove" -) - -// prop value enum -func (m *ViewBox) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewBoxTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewBox) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -func (m *ViewBox) validateSchemaInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.SchemaInfoList) { // not required - return nil - } - - for i := 0; i < len(m.SchemaInfoList); i++ { - if swag.IsZero(m.SchemaInfoList[i]) { // not required - continue - } - - if m.SchemaInfoList[i] != nil { - if err := m.SchemaInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewBox) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *ViewBox) validateStoragePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if m.StoragePolicy != nil { - if err := m.StoragePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view box based on the context it is used -func (m *ViewBox) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhiteList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterPartitionName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultViewQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemaInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewBox) contextValidateClientSubnetWhiteList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhiteList); i++ { - - if m.ClientSubnetWhiteList[i] != nil { - - if swag.IsZero(m.ClientSubnetWhiteList[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhiteList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhiteList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewBox) contextValidateClusterPartitionName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterPartitionName", "body", m.ClusterPartitionName); err != nil { - return err - } - - return nil -} - -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 -} - -func (m *ViewBox) contextValidateSchemaInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SchemaInfoList); i++ { - - if m.SchemaInfoList[i] != nil { - - if swag.IsZero(m.SchemaInfoList[i]) { // not required - return nil - } - - if err := m.SchemaInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemaInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewBox) 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 -} - -func (m *ViewBox) contextValidateStoragePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicy != nil { - - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if err := m.StoragePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewBox) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBox) UnmarshalBinary(b []byte) error { - var res ViewBox - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_pair_info.go b/v1/models/view_box_pair_info.go deleted file mode 100644 index 21c85344..00000000 --- a/v1/models/view_box_pair_info.go +++ /dev/null @@ -1,67 +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" -) - -// ViewBoxPairInfo Storage Domain (View Box) Pairing. -// -// Specifies a pairing between a Storage Domain (View Box) on local Cluster -// with a Storage Domain (View Box) on a remote Cluster. -// When replication is configured between a local Cluster and a -// remote Cluster, the Snapshots are replicated from the specified -// Storage Domain (View Box) on the local Cluster to the Storage Domain -// (View Box) on the remote Cluster. See the online help for details about the -// supported Storage Domains (View Box) pairings between Clusters. -// -// swagger:model ViewBoxPairInfo -type ViewBoxPairInfo struct { - - // Specifies the id of the Storage Domain (View Box) on the local Cluster. - LocalViewBoxID *int64 `json:"localViewBoxId,omitempty"` - - // Specifies the name of the Storage Domain (View Box) on the local Cluster. - LocalViewBoxName *string `json:"localViewBoxName,omitempty"` - - // Specifies the id of the Storage Domain (View Box) on the remote Cluster. - RemoteViewBoxID *int64 `json:"remoteViewBoxId,omitempty"` - - // Specifies the name of the Storage Domain (View Box) on the remote Cluster. - RemoteViewBoxName *string `json:"remoteViewBoxName,omitempty"` -} - -// Validate validates this view box pair info -func (m *ViewBoxPairInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view box pair info based on context it is used -func (m *ViewBoxPairInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewBoxPairInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBoxPairInfo) UnmarshalBinary(b []byte) error { - var res ViewBoxPairInfo - 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_box_stats.go b/v1/models/view_box_stats.go deleted file mode 100644 index 14d9ec4c..00000000 --- a/v1/models/view_box_stats.go +++ /dev/null @@ -1,326 +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" -) - -// ViewBoxStats Storage Domain (View Box) Stats. -// -// Provides statistics about the Storage Domain (View Box). -// -// swagger:model ViewBoxStats -type ViewBoxStats struct { - - // Provides the usage statistics for the data stored in the - // cloud for the Storage Domain (View Box). Performance statistics are not - // populated. - CloudUsagePerfStats *UsageAndPerformanceStats `json:"cloudUsagePerfStats,omitempty"` - - // Data Usage Statistics. - // - // Specifies the data usage metric of the data stored on the Storage Domain - // (View Box). - DataUsageStats *DataUsageStats `json:"dataUsageStats,omitempty"` - - // Specifies the id of the Storage Domain (View Box). - ID *int64 `json:"id,omitempty"` - - // Provides usage statistics for the locally stored data - // on the Storage Domain (View Box). Performance statistics are not populated. - LocalUsagePerfStats *UsageAndPerformanceStats `json:"localUsagePerfStats,omitempty"` - - // Provides the logical usage statistics for the Storage Domain (View Box). - LogicalStats *LogicalStats `json:"logicalStats,omitempty"` - - // Provides usage and performance statistics for the Storage Domain - // (View Box) - // (includes both local and cloud data). - UsagePerfStats *UsageAndPerformanceStats `json:"usagePerfStats,omitempty"` -} - -// Validate validates this view box stats -func (m *ViewBoxStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataUsageStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewBoxStats) validateCloudUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.CloudUsagePerfStats) { // not required - 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 -} - -func (m *ViewBoxStats) validateDataUsageStats(formats strfmt.Registry) error { - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if m.DataUsageStats != nil { - if err := m.DataUsageStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -func (m *ViewBoxStats) validateLocalUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.LocalUsagePerfStats) { // not required - 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 -} - -func (m *ViewBoxStats) validateLogicalStats(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalStats) { // not required - 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 -} - -func (m *ViewBoxStats) validateUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.UsagePerfStats) { // not required - 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 -} - -// ContextValidate validate this view box stats based on the context it is used -func (m *ViewBoxStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataUsageStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewBoxStats) 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 -} - -func (m *ViewBoxStats) contextValidateDataUsageStats(ctx context.Context, formats strfmt.Registry) error { - - if m.DataUsageStats != nil { - - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if err := m.DataUsageStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -func (m *ViewBoxStats) 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 *ViewBoxStats) 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 *ViewBoxStats) 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 -} - -// MarshalBinary interface implementation -func (m *ViewBoxStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBoxStats) UnmarshalBinary(b []byte) error { - var res ViewBoxStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_id_mapping_proto_file_level_data_lock_config.go b/v1/models/view_id_mapping_proto_file_level_data_lock_config.go deleted file mode 100644 index 03a96099..00000000 --- a/v1/models/view_id_mapping_proto_file_level_data_lock_config.go +++ /dev/null @@ -1,110 +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" -) - -// ViewIDMappingProtoFileLevelDataLockConfig File level data lock configuration. -// -// swagger:model ViewIdMappingProto_FileLevelDataLockConfig -type ViewIDMappingProtoFileLevelDataLockConfig struct { - - // Auto-lock automatically commit files to WORM state in the filesystem if - // they have not been modified for an administrator-specified period of - // time. When the auto-lock is enabled, this field must be set to idle time - // duration after which file would be automatically locked. Auto locking - // will be disabled when configured with default value of -1. - AutoLockDurationUsecs *int64 `json:"autoLockDurationUsecs,omitempty"` - - // If set, inodes in the view can be locked in different modes - // (Compliance/Enterprise) independently. The locking mode is stored - // explicitly on each inode. The mode field on inode - // FileLevelDataLockMetadata identifies the lock mode for the individual - // inode, whereas the mode field in view FileLevelDataLockConfig denotes - // the default lock mode for implicit locking. The field can be set only at - // view fld enable time and is immutable later. - // Also if this is set, the view can be deleted only if it does not - // have any inode. - CoexistingLockMode *bool `json:"coexistingLockMode,omitempty"` - - // Default retention duration is used when an explicit retention timestamp - // is not set by user/application when locking a file. If the administrator - // does not want to enforce this, this field must not be set. If file - // requires being retained forever by default, this must be set to - // INT64_MAX. If minimum and maximum retention are enforced, then this must - // be always between these two durations. - DefaultRetentionDurationUsecs *int64 `json:"defaultRetentionDurationUsecs,omitempty"` - - // Default retention duration in years. Follows the same conditions - // specified for default_retention_duration_usecs. - DefaultRetentionDurationYears *int64 `json:"defaultRetentionDurationYears,omitempty"` - - // Specifies timestamp to protect locked files until a specific date. - // This would override retention periods and deny any mutable or remove - // operations on locked files until a specific date. - HoldTimestampUsecs *int64 `json:"holdTimestampUsecs,omitempty"` - - // If set, implicit locking will be applied only to the newly created or - // updated inodes. - IgnoreExistingFiles *bool `json:"ignoreExistingFiles,omitempty"` - - // Specifies maximum retention duration of worm locked file. If the - // administrator does not want to enforce this, this must not be set. If - // default and max retention duration are enforced, max retention - // duration must be greater than or equal to default retention duration. - // If min and max retention duration are enforced, max retention duration - // must be greater than and equal to min retention duration. - MaxRetentionDurationUsecs *int64 `json:"maxRetentionDurationUsecs,omitempty"` - - // Minimum and maximum retention duration allow the administrator to - // enforce retention duration that falls within a specified range. If - // the administrator does not want to enforce this, this must not be set. - // If the file requires being retained forever, this must be set to - // INT64_MAX. If default retention is enforced, this must be less than or - // equal to default retention. If max retention are enforced, default - // retention duration must be less than and equal to max retention - // duration. - MinRetentionDurationUsecs *int64 `json:"minRetentionDurationUsecs,omitempty"` - - // Explicit locking mode. - Mode *int32 `json:"mode,omitempty"` - - // Explicit locking protocol. - Protocol *int32 `json:"protocol,omitempty"` -} - -// Validate validates this view Id mapping proto file level data lock config -func (m *ViewIDMappingProtoFileLevelDataLockConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view Id mapping proto file level data lock config based on context it is used -func (m *ViewIDMappingProtoFileLevelDataLockConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewIDMappingProtoFileLevelDataLockConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewIDMappingProtoFileLevelDataLockConfig) UnmarshalBinary(b []byte) error { - var res ViewIDMappingProtoFileLevelDataLockConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_id_mapping_proto_protocol_access_info.go b/v1/models/view_id_mapping_proto_protocol_access_info.go deleted file mode 100644 index f5a5355d..00000000 --- a/v1/models/view_id_mapping_proto_protocol_access_info.go +++ /dev/null @@ -1,66 +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" -) - -// ViewIDMappingProtoProtocolAccessInfo view Id mapping proto protocol access info -// -// swagger:model ViewIdMappingProto_ProtocolAccessInfo -type ViewIDMappingProtoProtocolAccessInfo struct { - - // Access control for iSCSI protocol for this view. - IscsiAccess *int32 `json:"iscsiAccess,omitempty"` - - // Access control for NFSv4.1 protocol for this view. NFSv4.1 will be - // disabled by default in all configurations. - Nfs4Access *int32 `json:"nfs4Access,omitempty"` - - // Access control for NFS protocol for this view. - NfsAccess *int32 `json:"nfsAccess,omitempty"` - - // Access control for S3 protocol for this view. - S3Access *int32 `json:"s3Access,omitempty"` - - // Access control for SMB protocol for this view. - SmbAccess *int32 `json:"smbAccess,omitempty"` - - // Access control for Swift protocol for this view. - SwiftAccess *int32 `json:"swiftAccess,omitempty"` -} - -// Validate validates this view Id mapping proto protocol access info -func (m *ViewIDMappingProtoProtocolAccessInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view Id mapping proto protocol access info based on context it is used -func (m *ViewIDMappingProtoProtocolAccessInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewIDMappingProtoProtocolAccessInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewIDMappingProtoProtocolAccessInfo) UnmarshalBinary(b []byte) error { - var res ViewIDMappingProtoProtocolAccessInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_intent.go b/v1/models/view_intent.go deleted file mode 100644 index 8c0928ee..00000000 --- a/v1/models/view_intent.go +++ /dev/null @@ -1,55 +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" -) - -// ViewIntent ViewIntent -// -// Specifies the Intent of the View. -// -// swagger:model ViewIntent -type ViewIntent struct { - - // Specifies the template Id from which the View is created. - TemplateID *int64 `json:"TemplateId,omitempty"` - - // Specifies the template name from which the View is created. - TemplateName *string `json:"TemplateName,omitempty"` -} - -// Validate validates this view intent -func (m *ViewIntent) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view intent based on context it is used -func (m *ViewIntent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewIntent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewIntent) UnmarshalBinary(b []byte) error { - var res ViewIntent - 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_params.go b/v1/models/view_params.go deleted file mode 100644 index aa1107ce..00000000 --- a/v1/models/view_params.go +++ /dev/null @@ -1,298 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewParams Contains information needed when creating or cloning a view. -// -// swagger:model ViewParams -type ViewParams struct { - - // List of external client subnets from where requests will be received for - // the new view. - ClientSubnetWhitelistVec []*ClusterConfigProtoSubnet `json:"clientSubnetWhitelistVec"` - - // Whether to disable NFS access in the new view. - DisableNfsAccess *bool `json:"disableNfsAccess,omitempty"` - - // The protocol access override (if any) of the view. - ProtocolAccessInfo *ViewIDMappingProtoProtocolAccessInfo `json:"protocolAccessInfo,omitempty"` - - // The qos mappings (if any) for the new view. - QosMappingVec []*ClusterConfigProtoQoSMapping `json:"qosMappingVec"` - - // The storage policy override (if any) for the new view. - StoragePolicyOverride *ClusterConfigProtoStoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // The description to be applied to the new view. - ViewDescription *string `json:"viewDescription,omitempty"` - - // This value 'worm_lock_expiry_usecs' if specified will be set on the cloned - // view. This guarantees that the cloned view cannot be removed till the - // specified timestamp has reached. - // NOTE: If this is specified the clone view will be marked as immutable. - WormLockExpiryUsecs *int64 `json:"wormLockExpiryUsecs,omitempty"` -} - -// Validate validates this view params -func (m *ViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnetWhitelistVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccessInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosMappingVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewParams) validateClientSubnetWhitelistVec(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhitelistVec) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhitelistVec); i++ { - if swag.IsZero(m.ClientSubnetWhitelistVec[i]) { // not required - continue - } - - if m.ClientSubnetWhitelistVec[i] != nil { - if err := m.ClientSubnetWhitelistVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelistVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelistVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewParams) validateProtocolAccessInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccessInfo) { // not required - return nil - } - - if m.ProtocolAccessInfo != nil { - if err := m.ProtocolAccessInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccessInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccessInfo") - } - return err - } - } - - return nil -} - -func (m *ViewParams) validateQosMappingVec(formats strfmt.Registry) error { - if swag.IsZero(m.QosMappingVec) { // not required - return nil - } - - for i := 0; i < len(m.QosMappingVec); i++ { - if swag.IsZero(m.QosMappingVec[i]) { // not required - continue - } - - if m.QosMappingVec[i] != nil { - if err := m.QosMappingVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosMappingVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosMappingVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewParams) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view params based on the context it is used -func (m *ViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhitelistVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtocolAccessInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQosMappingVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewParams) contextValidateClientSubnetWhitelistVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhitelistVec); i++ { - - if m.ClientSubnetWhitelistVec[i] != nil { - - if swag.IsZero(m.ClientSubnetWhitelistVec[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhitelistVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelistVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelistVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewParams) contextValidateProtocolAccessInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ProtocolAccessInfo != nil { - - if swag.IsZero(m.ProtocolAccessInfo) { // not required - return nil - } - - if err := m.ProtocolAccessInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccessInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccessInfo") - } - return err - } - } - - return nil -} - -func (m *ViewParams) contextValidateQosMappingVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.QosMappingVec); i++ { - - if m.QosMappingVec[i] != nil { - - if swag.IsZero(m.QosMappingVec[i]) { // not required - return nil - } - - if err := m.QosMappingVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosMappingVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosMappingVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewParams) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewParams) UnmarshalBinary(b []byte) error { - var res ViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_pinning_config.go b/v1/models/view_pinning_config.go deleted file mode 100644 index 2106df26..00000000 --- a/v1/models/view_pinning_config.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" - "github.com/go-openapi/validate" -) - -// ViewPinningConfig ViewPinningConfig Specifies the pinning config of a view. -// -// swagger:model ViewPinningConfig -type ViewPinningConfig struct { - - // Specifies if view pinning is enabled. - // If set to true, view will be pinned to SSD. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the timestamp when view pinning config is last updated. - // Read Only: true - LastUpdatedTimestampSecs *int64 `json:"lastUpdatedTimestampSecs,omitempty"` - - // Specifies the time to pin files after last access. - PinnedTimeSecs *int64 `json:"pinnedTimeSecs,omitempty"` -} - -// Validate validates this view pinning config -func (m *ViewPinningConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewPinningConfig) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this view pinning config based on the context it is used -func (m *ViewPinningConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastUpdatedTimestampSecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewPinningConfig) contextValidateLastUpdatedTimestampSecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedTimestampSecs", "body", m.LastUpdatedTimestampSecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewPinningConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewPinningConfig) UnmarshalBinary(b []byte) error { - var res ViewPinningConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_privileges.go b/v1/models/view_privileges.go deleted file mode 100644 index 6b600cfd..00000000 --- a/v1/models/view_privileges.go +++ /dev/null @@ -1,119 +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" -) - -// ViewPrivileges View privileges. -// -// ViewPrivileges specifies which views are allowed to be accessed by an app -// instance. -// -// swagger:model ViewPrivileges -type ViewPrivileges struct { - - // Specifies if all, none or specific views are allowed to be accessed. - // Specifies if all, none or specific views are allowed to be accessed. - // kNone - None of the views have access. - // kAll - All the views have access. - // kSpecific - Only specific views have access. - // Enum: ["kNone","kAll","kSpecific"] - PrivilegesType *string `json:"privilegesType,omitempty"` - - // Specifies the ids of the views which are allowed to be accessed in case - // the privilege type is kSpecific. - ViewIds []int64 `json:"viewIds"` -} - -// Validate validates this view privileges -func (m *ViewPrivileges) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivilegesType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewPrivilegesTypePrivilegesTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kAll","kSpecific"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewPrivilegesTypePrivilegesTypePropEnum = append(viewPrivilegesTypePrivilegesTypePropEnum, v) - } -} - -const ( - - // ViewPrivilegesPrivilegesTypeKNone captures enum value "kNone" - ViewPrivilegesPrivilegesTypeKNone string = "kNone" - - // ViewPrivilegesPrivilegesTypeKAll captures enum value "kAll" - ViewPrivilegesPrivilegesTypeKAll string = "kAll" - - // ViewPrivilegesPrivilegesTypeKSpecific captures enum value "kSpecific" - ViewPrivilegesPrivilegesTypeKSpecific string = "kSpecific" -) - -// prop value enum -func (m *ViewPrivileges) validatePrivilegesTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewPrivilegesTypePrivilegesTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewPrivileges) validatePrivilegesType(formats strfmt.Registry) error { - if swag.IsZero(m.PrivilegesType) { // not required - return nil - } - - // value enum - if err := m.validatePrivilegesTypeEnum("privilegesType", "body", *m.PrivilegesType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view privileges based on context it is used -func (m *ViewPrivileges) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewPrivileges) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewPrivileges) UnmarshalBinary(b []byte) error { - var res ViewPrivileges - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_protection.go b/v1/models/view_protection.go deleted file mode 100644 index 3ca343aa..00000000 --- a/v1/models/view_protection.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewProtection View Protection. -// -// Specifies information about the Protection Jobs that are protecting the -// View. -// -// swagger:model ViewProtection -type ViewProtection struct { - - // Specifies if this View is an inactive View that was created on this - // Remote Cluster to store the Snapshots created by replication. - // This inactive View cannot be NFS or SMB mounted. - Inactive *bool `json:"inactive,omitempty"` - - // Specifies the id of the Protection Source that is using this View. - MagnetoEntityID *int64 `json:"magnetoEntityId,omitempty"` - - // Array of Protection Jobs. - // - // Specifies the Protection Jobs that are protecting the View. - ProtectionJobs []*ProtectionJobInfo `json:"protectionJobs"` -} - -// Validate validates this view protection -func (m *ViewProtection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionJobs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtection) validateProtectionJobs(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionJobs) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionJobs); i++ { - if swag.IsZero(m.ProtectionJobs[i]) { // not required - continue - } - - if m.ProtectionJobs[i] != nil { - if err := m.ProtectionJobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view protection based on the context it is used -func (m *ViewProtection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionJobs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtection) contextValidateProtectionJobs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionJobs); i++ { - - if m.ProtectionJobs[i] != nil { - - if swag.IsZero(m.ProtectionJobs[i]) { // not required - return nil - } - - if err := m.ProtectionJobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionJobs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtection) UnmarshalBinary(b []byte) error { - var res ViewProtection - 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 deleted file mode 100644 index 375e93c2..00000000 --- a/v1/models/view_protection_source.go +++ /dev/null @@ -1,170 +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" -) - -// ViewProtectionSource View Protection Source. -// -// Specifies a Protection Source in a View environment. -// -// swagger:model ViewProtectionSource -type ViewProtectionSource struct { - - // id - ID *ViewProtectionSourceID `json:"id,omitempty"` - - // Specifies a human readable name of the Protection Source of a View. - Name *string `json:"name,omitempty"` - - // Specifies the type of managed Object in a View Protection Source - // environment. - // Examples of View Objects include 'kViewBox' or 'kView'. - // 'kViewBox' indicates Storage Domain as a Protection Source type. - // 'kView' indicates View as a Protection Source type. - // Enum: ["kViewBox","kView"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this view protection source -func (m *ViewProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionSource) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - 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 -} - -var viewProtectionSourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kViewBox","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtectionSourceTypeTypePropEnum = append(viewProtectionSourceTypeTypePropEnum, v) - } -} - -const ( - - // ViewProtectionSourceTypeKViewBox captures enum value "kViewBox" - ViewProtectionSourceTypeKViewBox string = "kViewBox" - - // ViewProtectionSourceTypeKView captures enum value "kView" - ViewProtectionSourceTypeKView string = "kView" -) - -// prop value enum -func (m *ViewProtectionSource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtectionSourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtectionSource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this view protection source based on the context it is used -func (m *ViewProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *ViewProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionSource) UnmarshalBinary(b []byte) error { - var res ViewProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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_stats.go b/v1/models/view_protocol_stats.go deleted file mode 100644 index 103f288b..00000000 --- a/v1/models/view_protocol_stats.go +++ /dev/null @@ -1,110 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewProtocolStats View Protocol Statistics. -// -// Specifies the View Protocol stats. -// -// swagger:model ViewProtocolStats -type ViewProtocolStats struct { - - // Specifies the protocols supported on these Views. - Protocols []*string `json:"protocols"` - - // Specifies the size of all the Views in bytes which are using the specified protocol. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the number of Views which are using the specified protocol. - ViewCount *int64 `json:"viewCount,omitempty"` -} - -// Validate validates this view protocol stats -func (m *ViewProtocolStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtocolStatsProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb","kS3","kIscsi"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtocolStatsProtocolsItemsEnum = append(viewProtocolStatsProtocolsItemsEnum, v) - } -} - -func (m *ViewProtocolStats) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtocolStatsProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtocolStats) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - if swag.IsZero(m.Protocols[i]) { // not required - continue - } - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", *m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this view protocol stats based on context it is used -func (m *ViewProtocolStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtocolStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtocolStats) UnmarshalBinary(b []byte) error { - var res ViewProtocolStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_protocol_stats_list.go b/v1/models/view_protocol_stats_list.go deleted file mode 100644 index ad5ee202..00000000 --- a/v1/models/view_protocol_stats_list.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewProtocolStatsList View Protocol Statistics List. -// -// Specifies the View Protocol stats List. -// -// swagger:model ViewProtocolStatsList -type ViewProtocolStatsList []*ViewProtocolStats - -// Validate validates this view protocol stats list -func (m ViewProtocolStatsList) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view protocol stats list based on the context it is used -func (m ViewProtocolStatsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/models/view_stat_info.go b/v1/models/view_stat_info.go deleted file mode 100644 index fed4db52..00000000 --- a/v1/models/view_stat_info.go +++ /dev/null @@ -1,204 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewStatInfo View Statistics per View. -// -// Specifies the View stats per view. -// -// swagger:model ViewStatInfo -type ViewStatInfo struct { - - // Specifies the cluster Id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster Incarnation Id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the data read in bytes. - DataReadBytes *int64 `json:"dataReadBytes,omitempty"` - - // Specifies the data written in bytes. - DataWrittenBytes *int64 `json:"dataWrittenBytes,omitempty"` - - // Specifies the logical size used in bytes. - LogicalUsedBytes *int64 `json:"logicalUsedBytes,omitempty"` - - // Specifies the peak data read in bytes per second in the last day. - PeakReadThroughput *int64 `json:"peakReadThroughput,omitempty"` - - // Specifies the peak data written in bytes per second in the last day. - PeakWriteThroughput *int64 `json:"peakWriteThroughput,omitempty"` - - // Specifies the physical size used in bytes. - PhysicalUsedBytes *int64 `json:"physicalUsedBytes,omitempty"` - - // Specifies the protocols of this view. - Protocols []*string `json:"protocols"` - - // Specifies the list of View stats. - Stats []*ViewStatsInfo `json:"stats"` - - // Specifies the storage reduction ratio. - StorageReductionRatio *float32 `json:"storageReductionRatio,omitempty"` - - // Specifies the view Id. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the view name. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this view stat info -func (m *ViewStatInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocols(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewStatInfoProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb","kS3","kIscsi"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewStatInfoProtocolsItemsEnum = append(viewStatInfoProtocolsItemsEnum, v) - } -} - -func (m *ViewStatInfo) validateProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewStatInfoProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewStatInfo) validateProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.Protocols) { // not required - return nil - } - - for i := 0; i < len(m.Protocols); i++ { - if swag.IsZero(m.Protocols[i]) { // not required - continue - } - - // value enum - if err := m.validateProtocolsItemsEnum("protocols"+"."+strconv.Itoa(i), "body", *m.Protocols[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ViewStatInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - return nil - } - - for i := 0; i < len(m.Stats); i++ { - if swag.IsZero(m.Stats[i]) { // not required - continue - } - - if m.Stats[i] != nil { - if err := m.Stats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view stat info based on the context it is used -func (m *ViewStatInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatInfo) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Stats); i++ { - - if m.Stats[i] != nil { - - if swag.IsZero(m.Stats[i]) { // not required - return nil - } - - if err := m.Stats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatInfo) UnmarshalBinary(b []byte) error { - var res ViewStatInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_stats.go b/v1/models/view_stats.go deleted file mode 100644 index f798a067..00000000 --- a/v1/models/view_stats.go +++ /dev/null @@ -1,116 +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" -) - -// ViewStats View Stats. -// -// Provides statistics about the View. -// -// swagger:model ViewStats -type ViewStats struct { - - // Data Usage Statistics. - // - // Specifies the data usage metric of the data stored in this View. - DataUsageStats *DataUsageStats `json:"dataUsageStats,omitempty"` - - // Specifies the id of the View. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this view stats -func (m *ViewStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataUsageStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStats) validateDataUsageStats(formats strfmt.Registry) error { - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if m.DataUsageStats != nil { - if err := m.DataUsageStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view stats based on the context it is used -func (m *ViewStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataUsageStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStats) contextValidateDataUsageStats(ctx context.Context, formats strfmt.Registry) error { - - if m.DataUsageStats != nil { - - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if err := m.DataUsageStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStats) UnmarshalBinary(b []byte) error { - var res ViewStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_stats_in_last_hours.go b/v1/models/view_stats_in_last_hours.go deleted file mode 100644 index 793f2b00..00000000 --- a/v1/models/view_stats_in_last_hours.go +++ /dev/null @@ -1,62 +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" -) - -// ViewStatsInLastHours Specifies the View stats for last hours. -// -// swagger:model ViewStatsInLastHours -type ViewStatsInLastHours struct { - - // Specifies the time range. - LastHours *int64 `json:"lastHours,omitempty"` - - // Specifies the stats value for NFS protocol. - NfsProtocolValue *int64 `json:"nfsProtocolValue,omitempty"` - - // Specifies the stats value for S3 protocol. - S3ProtocolValue *int64 `json:"s3ProtocolValue,omitempty"` - - // Specifies the stats value for SMB protocol. - SmbProtocolValue *int64 `json:"smbProtocolValue,omitempty"` - - // Specifies the stats value for any protocols. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this view stats in last hours -func (m *ViewStatsInLastHours) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view stats in last hours based on context it is used -func (m *ViewStatsInLastHours) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsInLastHours) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsInLastHours) UnmarshalBinary(b []byte) error { - var res ViewStatsInLastHours - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_stats_info.go b/v1/models/view_stats_info.go deleted file mode 100644 index 1ef8d75e..00000000 --- a/v1/models/view_stats_info.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewStatsInfo Specifies the View stats. -// -// swagger:model ViewStatsInfo -type ViewStatsInfo struct { - - // Specifies the stats metric. - Metric *string `json:"metric,omitempty"` - - // Specifies the stats value in last hours. - ValueInLastHours []*ViewStatsInLastHours `json:"valueInLastHours"` -} - -// Validate validates this view stats info -func (m *ViewStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValueInLastHours(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsInfo) validateValueInLastHours(formats strfmt.Registry) error { - if swag.IsZero(m.ValueInLastHours) { // not required - return nil - } - - for i := 0; i < len(m.ValueInLastHours); i++ { - if swag.IsZero(m.ValueInLastHours[i]) { // not required - continue - } - - if m.ValueInLastHours[i] != nil { - if err := m.ValueInLastHours[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view stats info based on the context it is used -func (m *ViewStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValueInLastHours(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsInfo) contextValidateValueInLastHours(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValueInLastHours); i++ { - - if m.ValueInLastHours[i] != nil { - - if swag.IsZero(m.ValueInLastHours[i]) { // not required - return nil - } - - if err := m.ValueInLastHours[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsInfo) UnmarshalBinary(b []byte) error { - var res ViewStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_stats_snapshot.go b/v1/models/view_stats_snapshot.go deleted file mode 100644 index ebdc9900..00000000 --- a/v1/models/view_stats_snapshot.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewStatsSnapshot View Statistics -// -// Specifies the list statistics for each View for a given timestamp. -// -// swagger:model ViewStatsSnapshot -type ViewStatsSnapshot struct { - - // Specifies the unix time in milliseconds when these values were generated - Timestamp *int64 `json:"timestamp,omitempty"` - - // Specifies the list of Views and their statistics at the given timestamp. - ViewStatsList []*ViewStatInfo `json:"viewStatsList"` -} - -// Validate validates this view stats snapshot -func (m *ViewStatsSnapshot) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsSnapshot) validateViewStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.ViewStatsList) { // not required - return nil - } - - for i := 0; i < len(m.ViewStatsList); i++ { - if swag.IsZero(m.ViewStatsList[i]) { // not required - continue - } - - if m.ViewStatsList[i] != nil { - if err := m.ViewStatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view stats snapshot based on the context it is used -func (m *ViewStatsSnapshot) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsSnapshot) contextValidateViewStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewStatsList); i++ { - - if m.ViewStatsList[i] != nil { - - if swag.IsZero(m.ViewStatsList[i]) { // not required - return nil - } - - if err := m.ViewStatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsSnapshot) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsSnapshot) UnmarshalBinary(b []byte) error { - var res ViewStatsSnapshot - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_user_quota_parameters.go b/v1/models/view_user_quota_parameters.go deleted file mode 100644 index 4ce302c6..00000000 --- a/v1/models/view_user_quota_parameters.go +++ /dev/null @@ -1,114 +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" -) - -// ViewUserQuotaParameters View User Quota Parameters. -// -// Specifies the params to create and edit a user quota policy in a view. -// -// swagger:model ViewUserQuotaParameters -type ViewUserQuotaParameters struct { - - // The user quota policies that need to be updated. - UserQuotaPolicy *UserQuota `json:"userQuotaPolicy,omitempty"` - - // View name of input view. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this view user quota parameters -func (m *ViewUserQuotaParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotaParameters) validateUserQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.UserQuotaPolicy) { // not required - return nil - } - - if m.UserQuotaPolicy != nil { - if err := m.UserQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view user quota parameters based on the context it is used -func (m *ViewUserQuotaParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotaParameters) contextValidateUserQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.UserQuotaPolicy != nil { - - if swag.IsZero(m.UserQuotaPolicy) { // not required - return nil - } - - if err := m.UserQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewUserQuotaParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewUserQuotaParameters) UnmarshalBinary(b []byte) error { - var res ViewUserQuotaParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_user_quotas.go b/v1/models/view_user_quotas.go deleted file mode 100644 index a7e02645..00000000 --- a/v1/models/view_user_quotas.go +++ /dev/null @@ -1,345 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewUserQuotas View User Quotas. -// -// Specifies the Result parameters for all user quotas -// of a view. -// -// swagger:model ViewUserQuotas -type ViewUserQuotas struct { - - // This cookie can be used in the succeeding call to list user quotas and - // usages to get the next set of user quota overrides. If set to nil, it - // means that there's no more results that the server could provide. - Cookie *string `json:"cookie,omitempty"` - - // The quota and usage information for a user in all his views. - QuotaAndUsageInAllViews []*QuotaAndUsageInView `json:"quotaAndUsageInAllViews"` - - // UserQuotaSummaryForUser is the summary for user quotas in all views for - // a user. - SummaryForUser *UserQuotaSummaryForUser `json:"summaryForUser,omitempty"` - - // UserQuotaSummaryForView is the summary for user quotas in a view. - SummaryForView *UserQuotaSummaryForView `json:"summaryForView,omitempty"` - - // The default user quota policy for this view. - UserQuotaSettings *UserQuotaSettings `json:"userQuotaSettings,omitempty"` - - // The list of user quota policies/overrides and usages. - UsersQuotaAndUsage []*UserQuotaAndUsage `json:"usersQuotaAndUsage"` -} - -// Validate validates this view user quotas -func (m *ViewUserQuotas) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQuotaAndUsageInAllViews(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSummaryForUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSummaryForView(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserQuotaSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsersQuotaAndUsage(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotas) validateQuotaAndUsageInAllViews(formats strfmt.Registry) error { - if swag.IsZero(m.QuotaAndUsageInAllViews) { // not required - return nil - } - - for i := 0; i < len(m.QuotaAndUsageInAllViews); i++ { - if swag.IsZero(m.QuotaAndUsageInAllViews[i]) { // not required - continue - } - - if m.QuotaAndUsageInAllViews[i] != nil { - if err := m.QuotaAndUsageInAllViews[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaAndUsageInAllViews" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaAndUsageInAllViews" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewUserQuotas) validateSummaryForUser(formats strfmt.Registry) error { - if swag.IsZero(m.SummaryForUser) { // not required - return nil - } - - if m.SummaryForUser != nil { - if err := m.SummaryForUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryForUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryForUser") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) validateSummaryForView(formats strfmt.Registry) error { - if swag.IsZero(m.SummaryForView) { // not required - return nil - } - - if m.SummaryForView != nil { - if err := m.SummaryForView.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryForView") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryForView") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) validateUserQuotaSettings(formats strfmt.Registry) error { - if swag.IsZero(m.UserQuotaSettings) { // not required - return nil - } - - if m.UserQuotaSettings != nil { - if err := m.UserQuotaSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotaSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotaSettings") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) validateUsersQuotaAndUsage(formats strfmt.Registry) error { - if swag.IsZero(m.UsersQuotaAndUsage) { // not required - return nil - } - - for i := 0; i < len(m.UsersQuotaAndUsage); i++ { - if swag.IsZero(m.UsersQuotaAndUsage[i]) { // not required - continue - } - - if m.UsersQuotaAndUsage[i] != nil { - if err := m.UsersQuotaAndUsage[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersQuotaAndUsage" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersQuotaAndUsage" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view user quotas based on the context it is used -func (m *ViewUserQuotas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQuotaAndUsageInAllViews(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSummaryForUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSummaryForView(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserQuotaSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsersQuotaAndUsage(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotas) contextValidateQuotaAndUsageInAllViews(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.QuotaAndUsageInAllViews); i++ { - - if m.QuotaAndUsageInAllViews[i] != nil { - - if swag.IsZero(m.QuotaAndUsageInAllViews[i]) { // not required - return nil - } - - if err := m.QuotaAndUsageInAllViews[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaAndUsageInAllViews" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaAndUsageInAllViews" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewUserQuotas) contextValidateSummaryForUser(ctx context.Context, formats strfmt.Registry) error { - - if m.SummaryForUser != nil { - - if swag.IsZero(m.SummaryForUser) { // not required - return nil - } - - if err := m.SummaryForUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryForUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryForUser") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) contextValidateSummaryForView(ctx context.Context, formats strfmt.Registry) error { - - if m.SummaryForView != nil { - - if swag.IsZero(m.SummaryForView) { // not required - return nil - } - - if err := m.SummaryForView.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summaryForView") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summaryForView") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) contextValidateUserQuotaSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.UserQuotaSettings != nil { - - if swag.IsZero(m.UserQuotaSettings) { // not required - return nil - } - - if err := m.UserQuotaSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotaSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotaSettings") - } - return err - } - } - - return nil -} - -func (m *ViewUserQuotas) contextValidateUsersQuotaAndUsage(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UsersQuotaAndUsage); i++ { - - if m.UsersQuotaAndUsage[i] != nil { - - if swag.IsZero(m.UsersQuotaAndUsage[i]) { // not required - return nil - } - - if err := m.UsersQuotaAndUsage[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersQuotaAndUsage" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersQuotaAndUsage" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewUserQuotas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewUserQuotas) UnmarshalBinary(b []byte) error { - var res ViewUserQuotas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_basic_info.go b/v1/models/virtual_disk_basic_info.go deleted file mode 100644 index a1763e94..00000000 --- a/v1/models/virtual_disk_basic_info.go +++ /dev/null @@ -1,56 +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" -) - -// VirtualDiskBasicInfo Hyperv Virtual Disk -// -// swagger:model VirtualDiskBasicInfo -type VirtualDiskBasicInfo struct { - - // Controller bus number. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller type. - ControllerType *string `json:"controllerType,omitempty"` - - // Disk unit number. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this virtual disk basic info -func (m *VirtualDiskBasicInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual disk basic info based on context it is used -func (m *VirtualDiskBasicInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskBasicInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskBasicInfo) UnmarshalBinary(b []byte) error { - var res VirtualDiskBasicInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_config.go b/v1/models/virtual_disk_config.go deleted file mode 100644 index c122b97f..00000000 --- a/v1/models/virtual_disk_config.go +++ /dev/null @@ -1,56 +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" -) - -// VirtualDiskConfig Acropolis Virtual Disk -// -// swagger:model VirtualDiskConfig -type VirtualDiskConfig struct { - - // The device bus for the virtual disk device. - DeviceBus *string `json:"deviceBus,omitempty"` - - // Index of the device on the adapter type. - DeviceIndex *int32 `json:"deviceIndex,omitempty"` - - // Disk size in Bytes. - DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` -} - -// Validate validates this virtual disk config -func (m *VirtualDiskConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual disk config based on context it is used -func (m *VirtualDiskConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskConfig) UnmarshalBinary(b []byte) error { - var res VirtualDiskConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_id.go b/v1/models/virtual_disk_id.go deleted file mode 100644 index 9892e543..00000000 --- a/v1/models/virtual_disk_id.go +++ /dev/null @@ -1,61 +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" -) - -// VirtualDiskID This message defines the proto that can be used to identify the disks in -// different environments. -// -// swagger:model VirtualDiskId -type VirtualDiskID struct { - - // Controller's bus-id controlling the virtual disk in question. - ControllerBusNumber *int64 `json:"controllerBusNumber,omitempty"` - - // Controller's type (SCSI, IDE etc). - ControllerType *string `json:"controllerType,omitempty"` - - // Original disk id. This is sufficient to identify the disk information, but - // in some scenarios, user's may specify the controller option instead. - DiskID *string `json:"diskId,omitempty"` - - // Disk unit number to identify the virtual disk within a controller. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this virtual disk Id -func (m *VirtualDiskID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual disk Id based on context it is used -func (m *VirtualDiskID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskID) UnmarshalBinary(b []byte) error { - var res VirtualDiskID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_id_information.go b/v1/models/virtual_disk_id_information.go deleted file mode 100644 index 821b5054..00000000 --- a/v1/models/virtual_disk_id_information.go +++ /dev/null @@ -1,63 +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" -) - -// VirtualDiskIDInformation Virtual Disk Id. -// -// Specifies information about virtual disk which includes disk uuid, -// controller type, bus number and unit number. -// -// swagger:model VirtualDiskIdInformation -type VirtualDiskIDInformation struct { - - // Specifies the Id of the controller bus that controls the disk. - BusNumber *int64 `json:"busNumber,omitempty"` - - // Specifies the controller type like SCSI, or IDE etc. - ControllerType *string `json:"controllerType,omitempty"` - - // Specifies the uuid of the virtual disk. - DiskID *string `json:"diskId,omitempty"` - - // Specifies the disk file name. This is the VMDK name and not the - // flat file name. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this virtual disk Id information -func (m *VirtualDiskIDInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual disk Id information based on context it is used -func (m *VirtualDiskIDInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskIDInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskIDInformation) UnmarshalBinary(b []byte) error { - var res VirtualDiskIDInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_info.go b/v1/models/virtual_disk_info.go deleted file mode 100644 index ab5bf237..00000000 --- a/v1/models/virtual_disk_info.go +++ /dev/null @@ -1,63 +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" -) - -// VirtualDiskInfo Virtual Disk Information. -// -// swagger:model VirtualDiskInfo -type VirtualDiskInfo struct { - - // Specifies the Id of the controller bus that controls the disk. - BusNumber *int64 `json:"busNumber,omitempty"` - - // Specifies the controller type like SCSI, or IDE etc. - ControllerType *string `json:"controllerType,omitempty"` - - // Specifies the host file name used as the virtual disk. - Filename *string `json:"filename,omitempty"` - - // Virtual disk size. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the disk file name. This is the VMDK name and not the - // flat file name. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this virtual disk info -func (m *VirtualDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual disk info based on context it is used -func (m *VirtualDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskInfo) UnmarshalBinary(b []byte) error { - var res VirtualDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_information.go b/v1/models/virtual_disk_information.go deleted file mode 100644 index aa2d923d..00000000 --- a/v1/models/virtual_disk_information.go +++ /dev/null @@ -1,134 +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" -) - -// VirtualDiskInformation Specifies information about the virtual disk. -// -// swagger:model VirtualDiskInformation -type VirtualDiskInformation struct { - - // Specifies the Id of the controller bus that controls the disk. - BusNumber *int64 `json:"busNumber,omitempty"` - - // Specifies the controller type like SCSI, or IDE etc. - ControllerType *string `json:"controllerType,omitempty"` - - // Specifies original disk id. This is sufficient to identify the disk - // information, but in some scenarios, users may specify the controller - // option instead. - DiskID *string `json:"diskId,omitempty"` - - // Specifies location of the disk, e.g. this will contain the location of - // datastore in VMware environment. - DiskLocation *ProtectionSource `json:"diskLocation,omitempty"` - - // Specifies size of the virtual disk in bytes. - DiskSizeInBytes *int64 `json:"diskSizeInBytes,omitempty"` - - // Specifies the original file path if applicable. - FilePath *string `json:"filePath,omitempty"` - - // Specifies the list of mount points. - MountPoints []string `json:"mountPoints"` - - // Specifies the disk file name. This is the VMDK name and not the - // flat file name. - UnitNumber *int64 `json:"unitNumber,omitempty"` -} - -// Validate validates this virtual disk information -func (m *VirtualDiskInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskLocation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskInformation) validateDiskLocation(formats strfmt.Registry) error { - if swag.IsZero(m.DiskLocation) { // not required - return nil - } - - if m.DiskLocation != nil { - if err := m.DiskLocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLocation") - } - return err - } - } - - return nil -} - -// ContextValidate validate this virtual disk information based on the context it is used -func (m *VirtualDiskInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskLocation(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskInformation) contextValidateDiskLocation(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskLocation != nil { - - if swag.IsZero(m.DiskLocation) { // not required - return nil - } - - if err := m.DiskLocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskLocation") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskInformation) UnmarshalBinary(b []byte) error { - var res VirtualDiskInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_mapping.go b/v1/models/virtual_disk_mapping.go deleted file mode 100644 index a2a3b8da..00000000 --- a/v1/models/virtual_disk_mapping.go +++ /dev/null @@ -1,169 +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" -) - -// VirtualDiskMapping Virtual Disk Mapping. -// -// Specifies the request data struct for virtual disk mapping with only the -// disk ids. -// -// swagger:model VirtualDiskMapping -type VirtualDiskMapping struct { - - // Specifies information about disk which user wants to overwrite. If - // specified, then powerOffVmBeforeRecovery must be true. - DiskToOverwrite *VirtualDiskIDInformation `json:"diskToOverwrite,omitempty"` - - // Specifies information about the source disk. - SourceDisk *VirtualDiskIDInformation `json:"sourceDisk,omitempty"` - - // Specifies the target location information, for e.g. a datastore in - // VMware environment. If diskToOverwrite is specified, then the target - // location is automatically deduced. - TargetLocationID *int64 `json:"targetLocationId,omitempty"` -} - -// Validate validates this virtual disk mapping -func (m *VirtualDiskMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskToOverwrite(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceDisk(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskMapping) validateDiskToOverwrite(formats strfmt.Registry) error { - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if m.DiskToOverwrite != nil { - if err := m.DiskToOverwrite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMapping) validateSourceDisk(formats strfmt.Registry) error { - if swag.IsZero(m.SourceDisk) { // not required - return nil - } - - if m.SourceDisk != nil { - if err := m.SourceDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceDisk") - } - return err - } - } - - return nil -} - -// ContextValidate validate this virtual disk mapping based on the context it is used -func (m *VirtualDiskMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskToOverwrite(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskMapping) contextValidateDiskToOverwrite(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskToOverwrite != nil { - - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if err := m.DiskToOverwrite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMapping) contextValidateSourceDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceDisk != nil { - - if swag.IsZero(m.SourceDisk) { // not required - return nil - } - - if err := m.SourceDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceDisk") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskMapping) UnmarshalBinary(b []byte) error { - var res VirtualDiskMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_mapping_response.go b/v1/models/virtual_disk_mapping_response.go deleted file mode 100644 index 11338837..00000000 --- a/v1/models/virtual_disk_mapping_response.go +++ /dev/null @@ -1,217 +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" -) - -// VirtualDiskMappingResponse Virtual Disk Mapping Response. -// -// Specifies information about virtual disks where a user can specify mappings -// of source disk and destination disk to overwrite. -// -// swagger:model VirtualDiskMappingResponse -type VirtualDiskMappingResponse struct { - - // Specifies information about disk which user wants to overwrite. If - // specified, then powerOffVmBeforeRecovery must be true. - DiskToOverwrite *VirtualDiskIDInformation `json:"diskToOverwrite,omitempty"` - - // Specifies information about the source disk. - SourceDisk *VirtualDiskIDInformation `json:"sourceDisk,omitempty"` - - // Specifies the target location information, for e.g. a datastore in - // VMware environment. If diskToOverwrite is specified, then the target - // location is automatically deduced. - TargetLocation *ProtectionSource `json:"targetLocation,omitempty"` -} - -// Validate validates this virtual disk mapping response -func (m *VirtualDiskMappingResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskToOverwrite(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceDisk(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetLocation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskMappingResponse) validateDiskToOverwrite(formats strfmt.Registry) error { - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if m.DiskToOverwrite != nil { - if err := m.DiskToOverwrite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMappingResponse) validateSourceDisk(formats strfmt.Registry) error { - if swag.IsZero(m.SourceDisk) { // not required - return nil - } - - if m.SourceDisk != nil { - if err := m.SourceDisk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceDisk") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMappingResponse) validateTargetLocation(formats strfmt.Registry) error { - if swag.IsZero(m.TargetLocation) { // not required - return nil - } - - if m.TargetLocation != nil { - if err := m.TargetLocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetLocation") - } - return err - } - } - - return nil -} - -// ContextValidate validate this virtual disk mapping response based on the context it is used -func (m *VirtualDiskMappingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskToOverwrite(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceDisk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetLocation(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskMappingResponse) contextValidateDiskToOverwrite(ctx context.Context, formats strfmt.Registry) error { - - if m.DiskToOverwrite != nil { - - if swag.IsZero(m.DiskToOverwrite) { // not required - return nil - } - - if err := m.DiskToOverwrite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskToOverwrite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskToOverwrite") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMappingResponse) contextValidateSourceDisk(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceDisk != nil { - - if swag.IsZero(m.SourceDisk) { // not required - return nil - } - - if err := m.SourceDisk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceDisk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceDisk") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskMappingResponse) contextValidateTargetLocation(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetLocation != nil { - - if swag.IsZero(m.TargetLocation) { // not required - return nil - } - - if err := m.TargetLocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetLocation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetLocation") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskMappingResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskMappingResponse) UnmarshalBinary(b []byte) error { - var res VirtualDiskMappingResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_recover_task_state.go b/v1/models/virtual_disk_recover_task_state.go deleted file mode 100644 index 71263b1e..00000000 --- a/v1/models/virtual_disk_recover_task_state.go +++ /dev/null @@ -1,233 +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" -) - -// VirtualDiskRecoverTaskState Virtual Disk Recover State. -// -// Specifies the complete information about a recover virtual disk task state. -// -// swagger:model VirtualDiskRecoverTaskState -type VirtualDiskRecoverTaskState struct { - - // The error encountered by task (if any). Only valid if the task has - // finished. - Error *RequestError `json:"error,omitempty"` - - // Specifies if instant recovery of the virtual disk is complete. - IsInstantRecoveryFinished *bool `json:"isInstantRecoveryFinished,omitempty"` - - // Specifies the current state of the restore virtual disks task. - // Specifies the current state of the restore virtual disks task. - // 'kDetachDisksDone' indicates the detached state of disks. - // 'kSetupDisksDone' indicates that disks setup is completed. - // 'kMigrateDisksStarted' indicates that disks are being migrated. - // 'kMigrateDisksDone' indicates that disk migration is completed. - // 'kUnMountDatastoreDone' indicates that disk has unmounted the datastore. - // Enum: ["kDetachDisksDone","kSetupDisksDone","kMigrateDisksStarted","kMigrateDisksDone","kUnMountDatastoreDone"] - TaskState *string `json:"taskState,omitempty"` - - // Specifies the response for recovery of virtual disks of a vm. - VirtualDiskRestoreResponse *VirtualDiskRestoreResponse `json:"virtualDiskRestoreResponse,omitempty"` -} - -// Validate validates this virtual disk recover task state -func (m *VirtualDiskRecoverTaskState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskRestoreResponse(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRecoverTaskState) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -var virtualDiskRecoverTaskStateTypeTaskStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDetachDisksDone","kSetupDisksDone","kMigrateDisksStarted","kMigrateDisksDone","kUnMountDatastoreDone"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - virtualDiskRecoverTaskStateTypeTaskStatePropEnum = append(virtualDiskRecoverTaskStateTypeTaskStatePropEnum, v) - } -} - -const ( - - // VirtualDiskRecoverTaskStateTaskStateKDetachDisksDone captures enum value "kDetachDisksDone" - VirtualDiskRecoverTaskStateTaskStateKDetachDisksDone string = "kDetachDisksDone" - - // VirtualDiskRecoverTaskStateTaskStateKSetupDisksDone captures enum value "kSetupDisksDone" - VirtualDiskRecoverTaskStateTaskStateKSetupDisksDone string = "kSetupDisksDone" - - // VirtualDiskRecoverTaskStateTaskStateKMigrateDisksStarted captures enum value "kMigrateDisksStarted" - VirtualDiskRecoverTaskStateTaskStateKMigrateDisksStarted string = "kMigrateDisksStarted" - - // VirtualDiskRecoverTaskStateTaskStateKMigrateDisksDone captures enum value "kMigrateDisksDone" - VirtualDiskRecoverTaskStateTaskStateKMigrateDisksDone string = "kMigrateDisksDone" - - // VirtualDiskRecoverTaskStateTaskStateKUnMountDatastoreDone captures enum value "kUnMountDatastoreDone" - VirtualDiskRecoverTaskStateTaskStateKUnMountDatastoreDone string = "kUnMountDatastoreDone" -) - -// prop value enum -func (m *VirtualDiskRecoverTaskState) validateTaskStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, virtualDiskRecoverTaskStateTypeTaskStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VirtualDiskRecoverTaskState) validateTaskState(formats strfmt.Registry) error { - if swag.IsZero(m.TaskState) { // not required - return nil - } - - // value enum - if err := m.validateTaskStateEnum("taskState", "body", *m.TaskState); err != nil { - return err - } - - return nil -} - -func (m *VirtualDiskRecoverTaskState) validateVirtualDiskRestoreResponse(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskRestoreResponse) { // not required - return nil - } - - if m.VirtualDiskRestoreResponse != nil { - if err := m.VirtualDiskRestoreResponse.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreResponse") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreResponse") - } - return err - } - } - - return nil -} - -// ContextValidate validate this virtual disk recover task state based on the context it is used -func (m *VirtualDiskRecoverTaskState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskRestoreResponse(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRecoverTaskState) 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 -} - -func (m *VirtualDiskRecoverTaskState) contextValidateVirtualDiskRestoreResponse(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualDiskRestoreResponse != nil { - - if swag.IsZero(m.VirtualDiskRestoreResponse) { // not required - return nil - } - - if err := m.VirtualDiskRestoreResponse.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskRestoreResponse") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskRestoreResponse") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskRecoverTaskState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskRecoverTaskState) UnmarshalBinary(b []byte) error { - var res VirtualDiskRecoverTaskState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_restore_parameters.go b/v1/models/virtual_disk_restore_parameters.go deleted file mode 100644 index ecb2fe46..00000000 --- a/v1/models/virtual_disk_restore_parameters.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VirtualDiskRestoreParameters Virtual Disk Restore Parameters. -// -// Specifies the parameters to recover virtual disks of a vm. -// -// swagger:model VirtualDiskRestoreParameters -type VirtualDiskRestoreParameters struct { - - // Specifies whether to power off the VM before recovering virtual disks. - PowerOffVMBeforeRecovery *bool `json:"powerOffVmBeforeRecovery,omitempty"` - - // Specifies whether to power on the VM after recovering virtual disks. - PowerOnVMAfterRecovery *bool `json:"powerOnVmAfterRecovery,omitempty"` - - // Specifies the target entity to which the disks should be attached. - TargetSourceID *int64 `json:"targetSourceId,omitempty"` - - // Specifies the list of virtual disks mappings. - VirtualDiskMappings []*VirtualDiskMapping `json:"virtualDiskMappings"` -} - -// Validate validates this virtual disk restore parameters -func (m *VirtualDiskRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVirtualDiskMappings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRestoreParameters) validateVirtualDiskMappings(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskMappings) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - continue - } - - if m.VirtualDiskMappings[i] != nil { - if err := m.VirtualDiskMappings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this virtual disk restore parameters based on the context it is used -func (m *VirtualDiskRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVirtualDiskMappings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRestoreParameters) contextValidateVirtualDiskMappings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - - if m.VirtualDiskMappings[i] != nil { - - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - return nil - } - - if err := m.VirtualDiskMappings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskRestoreParameters) UnmarshalBinary(b []byte) error { - var res VirtualDiskRestoreParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_disk_restore_response.go b/v1/models/virtual_disk_restore_response.go deleted file mode 100644 index aa09e6f7..00000000 --- a/v1/models/virtual_disk_restore_response.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VirtualDiskRestoreResponse Virtual Disk Restore Response. -// -// Specifies the parameters to recover virtual disks of a vm with full -// Protection Source. -// -// swagger:model VirtualDiskRestoreResponse -type VirtualDiskRestoreResponse struct { - - // Specifies whether to power off the VM before recovering virtual disks. - PowerOffVMBeforeRecovery *bool `json:"powerOffVmBeforeRecovery,omitempty"` - - // Specifies whether to power on the VM after recovering virtual disks. - PowerOnVMAfterRecovery *bool `json:"powerOnVmAfterRecovery,omitempty"` - - // Specifies the target entity to which the disks should be attached. - TargetSource *ProtectionSource `json:"targetSource,omitempty"` - - // Specifies the list of virtual disks mappings. - VirtualDiskMappings []*VirtualDiskMappingResponse `json:"virtualDiskMappings"` -} - -// Validate validates this virtual disk restore response -func (m *VirtualDiskRestoreResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualDiskMappings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRestoreResponse) validateTargetSource(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSource) { // not required - return nil - } - - if m.TargetSource != nil { - if err := m.TargetSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSource") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskRestoreResponse) validateVirtualDiskMappings(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskMappings) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - continue - } - - if m.VirtualDiskMappings[i] != nil { - if err := m.VirtualDiskMappings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this virtual disk restore response based on the context it is used -func (m *VirtualDiskRestoreResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualDiskMappings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualDiskRestoreResponse) contextValidateTargetSource(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetSource != nil { - - if swag.IsZero(m.TargetSource) { // not required - return nil - } - - if err := m.TargetSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSource") - } - return err - } - } - - return nil -} - -func (m *VirtualDiskRestoreResponse) contextValidateVirtualDiskMappings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskMappings); i++ { - - if m.VirtualDiskMappings[i] != nil { - - if swag.IsZero(m.VirtualDiskMappings[i]) { // not required - return nil - } - - if err := m.VirtualDiskMappings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualDiskRestoreResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualDiskRestoreResponse) UnmarshalBinary(b []byte) error { - var res VirtualDiskRestoreResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_machine_info.go b/v1/models/virtual_machine_info.go deleted file mode 100644 index b26657da..00000000 --- a/v1/models/virtual_machine_info.go +++ /dev/null @@ -1,158 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VirtualMachineInfo This represents additional VM information. -// -// swagger:model VirtualMachineInfo -type VirtualMachineInfo struct { - - // Returns if we can backup this VM. - BackupStatus *int32 `json:"backupStatus,omitempty"` - - // backup type - BackupType *int32 `json:"backupType,omitempty"` - - // The number of checkpoints on this VM. - Checkpoints *int32 `json:"checkpoints,omitempty"` - - // The FQDN of the VM. - ComputerName *string `json:"computerName,omitempty"` - - // The VM hardware generation number. - Generation *int32 `json:"generation,omitempty"` - - // Is this VM highly available. - HighlyAvailable *bool `json:"highlyAvailable,omitempty"` - - // The operating system type. - HostType *int32 `json:"hostType,omitempty"` - - // The IP Addresses of the VM. - IPAddressVec []string `json:"ipAddressVec"` - - // The operating system name. - OsName *string `json:"osName,omitempty"` - - // The physical size of the VM in bytes. - PhysicalSizeInBytes *int64 `json:"physicalSizeInBytes,omitempty"` - - // The tag of the VM. - Tag *string `json:"tag,omitempty"` - - // The version of the VM. For example, 2016 is 8.0, - // 2012 R2 is 5.0. - Version *string `json:"version,omitempty"` - - // The info of disks which the VM exists on. - VirtualDiskInfoVec []*PrivateVirtualDiskBasicInfo `json:"virtualDiskInfoVec"` -} - -// Validate validates this virtual machine info -func (m *VirtualMachineInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVirtualDiskInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualMachineInfo) validateVirtualDiskInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualDiskInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VirtualDiskInfoVec); i++ { - if swag.IsZero(m.VirtualDiskInfoVec[i]) { // not required - continue - } - - if m.VirtualDiskInfoVec[i] != nil { - if err := m.VirtualDiskInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this virtual machine info based on the context it is used -func (m *VirtualMachineInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVirtualDiskInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VirtualMachineInfo) contextValidateVirtualDiskInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VirtualDiskInfoVec); i++ { - - if m.VirtualDiskInfoVec[i] != nil { - - if swag.IsZero(m.VirtualDiskInfoVec[i]) { // not required - return nil - } - - if err := m.VirtualDiskInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualDiskInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualDiskInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualMachineInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualMachineInfo) UnmarshalBinary(b []byte) error { - var res VirtualMachineInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/virtual_node_configuration.go b/v1/models/virtual_node_configuration.go deleted file mode 100644 index af002131..00000000 --- a/v1/models/virtual_node_configuration.go +++ /dev/null @@ -1,58 +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" -) - -// VirtualNodeConfiguration Virtual Node Configuration. -// -// Specifies the configuration for a node in the Cluster. -// -// swagger:model VirtualNodeConfiguration -type VirtualNodeConfiguration struct { - - // Specifies the Node ID for this node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the Node IP address for this node. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies whether to use the Node for compute only. - UseAsComputeNode *bool `json:"useAsComputeNode,omitempty"` -} - -// Validate validates this virtual node configuration -func (m *VirtualNodeConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this virtual node configuration based on context it is used -func (m *VirtualNodeConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VirtualNodeConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VirtualNodeConfiguration) UnmarshalBinary(b []byte) error { - var res VirtualNodeConfiguration - 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 deleted file mode 100644 index f73ee2a0..00000000 --- a/v1/models/vlan.go +++ /dev/null @@ -1,413 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Vlan VLAN. -// -// Specifies the settings of a VLAN. -// Its used by both Request and Response structures. -// -// swagger:model Vlan -type Vlan struct { - - // Specifies whether to add the VLAN IPs to the cluster partition - // that already has one or more IPs from this VLAN. - AddToClusterPartition *bool `json:"addToClusterPartition,omitempty"` - - // Specifies if this VLAN can be used by all tenants without explicit - // assignment to them. This option can only be set true for VLANs that are - // not assigned to any tenant. - AllTenantAccess *bool `json:"allTenantAccess,omitempty"` - - // Set to true when ips are in use by Athena Apps. - // Note: If it is true then vlan interface can't be deleted. - AppIPVecInUse *bool `json:"appIpVecInUse,omitempty"` - - // Array of Athena Apps IPs. - // - // Specifies a list of Athena IPs in the VLAN. - Appsips []string `json:"appsips"` - - // Specifies a description of the VLAN. - Description *string `json:"description,omitempty"` - - // Specifies list of dns delegation zones. - DNSDelegationZones []*DNSDelegationZone `json:"dnsDelegationZones"` - - // EcmpEnabled. - // Specifies if ECMP is enabled in the VLAN. - EcmpEnabled *bool `json:"ecmpEnabled,omitempty"` - - // Specifies the Gateway of the VLAN. It can carry V4 or V6 in case of - // requests, and carrises V4 in case of response. - Gateway *string `json:"gateway,omitempty"` - - // Specifies the Gateway of the VLAN. - GatewayV6 *string `json:"gatewayV6,omitempty"` - - // Specifies the hostname of the VLAN. - Hostname *string `json:"hostname,omitempty"` - - // Specifies the id of the VLAN. - ID *int32 `json:"id,omitempty"` - - // Specifies the interface group name of the VLAN. It is in the format of - // .. - IfaceGroupName *string `json:"ifaceGroupName,omitempty"` - - // Specifies the id of the Loopback Interface group. Used only in get, - // for display. - InterfaceGroupID *int32 `json:"interfaceGroupId,omitempty"` - - // Specifies the interface name of the VLAN. - InterfaceName *string `json:"interfaceName,omitempty"` - - // Specifies IP family. Based on this, subnet/gateway field contains - // V4 or V6 values. Used in Request. - IPFamily *int32 `json:"ipFamily,omitempty"` - - // IpPoolMap. - // - // Pool IPs to program VIP followers. - IPPoolMap map[string][]string `json:"ipPoolMap,omitempty"` - - // IP Range for vip addition - IPRange *IPRange `json:"ipRange,omitempty"` - - // Array of range of ips. - // If specified in PUT request, Ips field will be ignored. - // Specifies ips in compressed way using list of [start, end] vips. - IPRanges []*IPRange `json:"ipRanges"` - - // Array of IPs. - // - // Specifies a list of IPs in the VLAN. - Ips []string `json:"ips"` - - // mtu - Mtu *int32 `json:"mtu,omitempty"` - - // subnet - Subnet *VlanSubnet `json:"subnet,omitempty"` - - // subnet v6 - SubnetV6 *VlanSubnetV6 `json:"subnetV6,omitempty"` - - // Optional tenant id that this vlan belongs to. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the VLAN name of the vlanId. - VlanName *string `json:"vlanName,omitempty"` -} - -// Validate validates this vlan -func (m *Vlan) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDNSDelegationZones(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPRange(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPRanges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetV6(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Vlan) validateDNSDelegationZones(formats strfmt.Registry) error { - if swag.IsZero(m.DNSDelegationZones) { // not required - return nil - } - - for i := 0; i < len(m.DNSDelegationZones); i++ { - if swag.IsZero(m.DNSDelegationZones[i]) { // not required - continue - } - - if m.DNSDelegationZones[i] != nil { - if err := m.DNSDelegationZones[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Vlan) validateIPRange(formats strfmt.Registry) error { - if swag.IsZero(m.IPRange) { // not required - return nil - } - - if m.IPRange != nil { - if err := m.IPRange.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRange") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRange") - } - return err - } - } - - return nil -} - -func (m *Vlan) validateIPRanges(formats strfmt.Registry) error { - if swag.IsZero(m.IPRanges) { // not required - return nil - } - - for i := 0; i < len(m.IPRanges); i++ { - if swag.IsZero(m.IPRanges[i]) { // not required - continue - } - - if m.IPRanges[i] != nil { - if err := m.IPRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Vlan) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *Vlan) validateSubnetV6(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetV6) { // not required - 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 -} - -// ContextValidate validate this vlan based on the context it is used -func (m *Vlan) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDNSDelegationZones(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPRange(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetV6(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Vlan) contextValidateDNSDelegationZones(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DNSDelegationZones); i++ { - - if m.DNSDelegationZones[i] != nil { - - if swag.IsZero(m.DNSDelegationZones[i]) { // not required - return nil - } - - if err := m.DNSDelegationZones[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Vlan) contextValidateIPRange(ctx context.Context, formats strfmt.Registry) error { - - if m.IPRange != nil { - - if swag.IsZero(m.IPRange) { // not required - return nil - } - - if err := m.IPRange.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRange") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRange") - } - return err - } - } - - return nil -} - -func (m *Vlan) contextValidateIPRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IPRanges); i++ { - - if m.IPRanges[i] != nil { - - if swag.IsZero(m.IPRanges[i]) { // not required - return nil - } - - if err := m.IPRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *Vlan) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Vlan) UnmarshalBinary(b []byte) error { - var res Vlan - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vlan_info.go b/v1/models/vlan_info.go deleted file mode 100644 index 1d1287ca..00000000 --- a/v1/models/vlan_info.go +++ /dev/null @@ -1,173 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VlanInfo vlan info -// -// swagger:model VlanInfo -type VlanInfo struct { - - // Contains annotations to be put on services for IP allocation. Applicable - // only when service is of type LoadBalancer. - ServiceAnnotations []*VlanInfoServiceAnnotationsEntry `json:"serviceAnnotations"` - - // Contains the VLAN parameters. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this vlan info -func (m *VlanInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServiceAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VlanInfo) validateServiceAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceAnnotations) { // not required - return nil - } - - for i := 0; i < len(m.ServiceAnnotations); i++ { - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - continue - } - - if m.ServiceAnnotations[i] != nil { - if err := m.ServiceAnnotations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VlanInfo) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vlan info based on the context it is used -func (m *VlanInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServiceAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VlanInfo) contextValidateServiceAnnotations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServiceAnnotations); i++ { - - if m.ServiceAnnotations[i] != nil { - - if swag.IsZero(m.ServiceAnnotations[i]) { // not required - return nil - } - - if err := m.ServiceAnnotations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serviceAnnotations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VlanInfo) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VlanInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanInfo) UnmarshalBinary(b []byte) error { - var res VlanInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vlan_info_service_annotations_entry.go b/v1/models/vlan_info_service_annotations_entry.go deleted file mode 100644 index f9854f8b..00000000 --- a/v1/models/vlan_info_service_annotations_entry.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" -) - -// VlanInfoServiceAnnotationsEntry vlan info service annotations entry -// -// swagger:model VlanInfo_ServiceAnnotationsEntry -type VlanInfoServiceAnnotationsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *string `json:"value,omitempty"` -} - -// Validate validates this vlan info service annotations entry -func (m *VlanInfoServiceAnnotationsEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vlan info service annotations entry based on context it is used -func (m *VlanInfoServiceAnnotationsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VlanInfoServiceAnnotationsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanInfoServiceAnnotationsEntry) UnmarshalBinary(b []byte) error { - var res VlanInfoServiceAnnotationsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vlan_parameters.go b/v1/models/vlan_parameters.go deleted file mode 100644 index e8b986e3..00000000 --- a/v1/models/vlan_parameters.go +++ /dev/null @@ -1,66 +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" -) - -// VlanParameters VLAN Parameters. -// -// Specifies VLAN parameters for the restore operation. -// -// swagger:model VlanParameters -type VlanParameters struct { - - // Specifies whether to use the VIPs even when VLANs are configured on the - // Cluster. If configured, VLAN IP addresses are used by default. - // If VLANs are not configured, this flag is ignored. - // Set this flag to true to force using the partition VIPs when VLANs are - // configured on the Cluster. - DisableVlan *bool `json:"disableVlan,omitempty"` - - // Specifies the physical interface group name to use for mounting - // Cohesity's view on the remote host. If specified, Cohesity hostname or - // the IP address on this VLAN is used. - InterfaceName *string `json:"interfaceName,omitempty"` - - // Specifies the VLAN to use for mounting Cohesity's view on the remote - // host. If specified, Cohesity hostname or the IP address on this VLAN - // is used. - Vlan *int32 `json:"vlan,omitempty"` -} - -// Validate validates this vlan parameters -func (m *VlanParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vlan parameters based on context it is used -func (m *VlanParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VlanParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanParameters) UnmarshalBinary(b []byte) error { - var res VlanParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vlan_params.go b/v1/models/vlan_params.go deleted file mode 100644 index a6d8f4af..00000000 --- a/v1/models/vlan_params.go +++ /dev/null @@ -1,59 +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" -) - -// VlanParams Contains vlan params associated with the backup/restore operation. -// -// swagger:model VlanParams -type VlanParams struct { - - // If this is set to true, then even if VLANs are configured on the system, - // the partition VIPs will be used for the restore. - DisableVlan *bool `json:"disableVlan,omitempty"` - - // Interface group to use for restore. If this is not specified, primary - // interface group for the cluster will be used. - InterfaceName *string `json:"interfaceName,omitempty"` - - // If this is set, then the Cohesity host name or the IP address associated - // with this vlan is used for mounting Cohesity's view on the remote host. - VlanID *int32 `json:"vlanId,omitempty"` -} - -// Validate validates this vlan params -func (m *VlanParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vlan params based on context it is used -func (m *VlanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VlanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanParams) UnmarshalBinary(b []byte) error { - var res VlanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/vm_browsing_cookie.go b/v1/models/vm_browsing_cookie.go deleted file mode 100644 index af5f3e8d..00000000 --- a/v1/models/vm_browsing_cookie.go +++ /dev/null @@ -1,51 +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" -) - -// VMBrowsingCookie VM browsing cookie message. -// -// swagger:model VMBrowsingCookie -type VMBrowsingCookie struct { - - // Cookie that will be send along with VMVolumeInfoResult. Caller need to - // sent this cookie message in subsequent ReadDir and FileStat call. - UseMapping *uint64 `json:"useMapping,omitempty"` -} - -// Validate validates this VM browsing cookie -func (m *VMBrowsingCookie) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this VM browsing cookie based on context it is used -func (m *VMBrowsingCookie) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMBrowsingCookie) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMBrowsingCookie) UnmarshalBinary(b []byte) error { - var res VMBrowsingCookie - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_dir_entry.go b/v1/models/vm_dir_entry.go deleted file mode 100644 index f34f08a8..00000000 --- a/v1/models/vm_dir_entry.go +++ /dev/null @@ -1,178 +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" -) - -// VMDirEntry VM Directory Entry. -// -// VmDirEntry is the struct to represent a file or a folder on a VM. -// -// swagger:model VmDirEntry -type VMDirEntry struct { - - // FstatInfo is the stat information for the file. - FstatInfo *FileStatInfo `json:"fstatInfo,omitempty"` - - // FullPath is the full path of the file/directory. - FullPath *string `json:"fullPath,omitempty"` - - // Name is the name of the file or folder. For /test/file.txt, name will be - // file.txt. - Name *string `json:"name,omitempty"` - - // DirEntryType is the type of entry i.e. file/folder. - // Specifies the type of directory entry. - // - // 'kFile' indicates that current entry is of file type. - // 'kDirectory' indicates that current entry is of directory type. - // 'kSymlink' indicates that current entry is of symbolic link. - // Enum: ["kFile","kDirectory","kSymlink"] - Type *string `json:"type,omitempty"` -} - -// Validate validates this Vm dir entry -func (m *VMDirEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFstatInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMDirEntry) validateFstatInfo(formats strfmt.Registry) error { - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if m.FstatInfo != nil { - if err := m.FstatInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -var vmDirEntryTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kDirectory","kSymlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmDirEntryTypeTypePropEnum = append(vmDirEntryTypeTypePropEnum, v) - } -} - -const ( - - // VMDirEntryTypeKFile captures enum value "kFile" - VMDirEntryTypeKFile string = "kFile" - - // VMDirEntryTypeKDirectory captures enum value "kDirectory" - VMDirEntryTypeKDirectory string = "kDirectory" - - // VMDirEntryTypeKSymlink captures enum value "kSymlink" - VMDirEntryTypeKSymlink string = "kSymlink" -) - -// prop value enum -func (m *VMDirEntry) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmDirEntryTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VMDirEntry) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this Vm dir entry based on the context it is used -func (m *VMDirEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFstatInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMDirEntry) contextValidateFstatInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.FstatInfo != nil { - - if swag.IsZero(m.FstatInfo) { // not required - return nil - } - - if err := m.FstatInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fstatInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fstatInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMDirEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMDirEntry) UnmarshalBinary(b []byte) error { - var res VMDirEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_directory_list_result.go b/v1/models/vm_directory_list_result.go deleted file mode 100644 index 32645263..00000000 --- a/v1/models/vm_directory_list_result.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMDirectoryListResult VM Directory List Result. -// -// VmDirectoryListResult is a struct containing information about each -// directory entry. -// -// swagger:model VmDirectoryListResult -type VMDirectoryListResult struct { - - // Cookie is used for paginating results. If ReadVMDirResult is returning - // partial results, this field will be set. Supplying this cookie will - // resume listing from where this result left off. - Cookie *string `json:"cookie,omitempty"` - - // Entries is the array of files and folders that are immediate children - // of the parent directory specified in the request. - Entries []*VMDirEntry `json:"entries"` -} - -// Validate validates this Vm directory list result -func (m *VMDirectoryListResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntries(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMDirectoryListResult) validateEntries(formats strfmt.Registry) error { - if swag.IsZero(m.Entries) { // not required - return nil - } - - for i := 0; i < len(m.Entries); i++ { - if swag.IsZero(m.Entries[i]) { // not required - continue - } - - if m.Entries[i] != nil { - if err := m.Entries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Vm directory list result based on the context it is used -func (m *VMDirectoryListResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntries(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMDirectoryListResult) contextValidateEntries(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Entries); i++ { - - if m.Entries[i] != nil { - - if swag.IsZero(m.Entries[i]) { // not required - return nil - } - - if err := m.Entries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMDirectoryListResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMDirectoryListResult) UnmarshalBinary(b []byte) error { - var res VMDirectoryListResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_group.go b/v1/models/vm_group.go deleted file mode 100644 index b7d91917..00000000 --- a/v1/models/vm_group.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMGroup User group info. -// -// VmGroup specifies information of a VM Group. -// -// swagger:model VmGroup -type VMGroup struct { - - // Specifies name of the VM group. - Name *string `json:"name,omitempty"` - - // Specifies VMs in the group. - Vms []*VMInfo `json:"vms"` -} - -// Validate validates this Vm group -func (m *VMGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVms(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMGroup) validateVms(formats strfmt.Registry) error { - if swag.IsZero(m.Vms) { // not required - return nil - } - - for i := 0; i < len(m.Vms); i++ { - if swag.IsZero(m.Vms[i]) { // not required - continue - } - - if m.Vms[i] != nil { - if err := m.Vms[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vms" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vms" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Vm group based on the context it is used -func (m *VMGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVms(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMGroup) contextValidateVms(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vms); i++ { - - if m.Vms[i] != nil { - - if swag.IsZero(m.Vms[i]) { // not required - return nil - } - - if err := m.Vms[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vms" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vms" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMGroup) UnmarshalBinary(b []byte) error { - var res VMGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_info.go b/v1/models/vm_info.go deleted file mode 100644 index b95331d4..00000000 --- a/v1/models/vm_info.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMInfo VM information. -// -// VmInfo specifies information of a VM. -// -// swagger:model VmInfo -type VMInfo struct { - - // Specifies the reason if vm is unhealthy. - HealthDetail *string `json:"healthDetail,omitempty"` - - // Specifies the current health status of the app instance. - HealthStatus *int32 `json:"healthStatus,omitempty"` - - // Specifies name of the VM. - Name *string `json:"name,omitempty"` - - // Specifies nodeports assigned to the vm. - NodePorts []*NodePort `json:"nodePorts"` -} - -// Validate validates this Vm info -func (m *VMInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodePorts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMInfo) validateNodePorts(formats strfmt.Registry) error { - if swag.IsZero(m.NodePorts) { // not required - return nil - } - - for i := 0; i < len(m.NodePorts); i++ { - if swag.IsZero(m.NodePorts[i]) { // not required - continue - } - - if m.NodePorts[i] != nil { - if err := m.NodePorts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodePorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodePorts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Vm info based on the context it is used -func (m *VMInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodePorts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMInfo) contextValidateNodePorts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodePorts); i++ { - - if m.NodePorts[i] != nil { - - if swag.IsZero(m.NodePorts[i]) { // not required - return nil - } - - if err := m.NodePorts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodePorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodePorts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMInfo) UnmarshalBinary(b []byte) error { - var res VMInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_linking_info.go b/v1/models/vm_linking_info.go deleted file mode 100644 index 8ef40041..00000000 --- a/v1/models/vm_linking_info.go +++ /dev/null @@ -1,62 +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" -) - -// VMLinkingInfo VM Linking Info -// -// swagger:model VmLinkingInfo -type VMLinkingInfo struct { - - // This is set to true if a VM is linked in entity provenance by edge type - // kVMMigration. - IsMigrated *bool `json:"isMigrated,omitempty"` - - // This is the time when ther VM was identified to have been migrated by - // Cohesity. Note that this time can differ from the actual migration time in - // vCenter. - MigratedTimeUsecs *int64 `json:"migratedTimeUsecs,omitempty"` - - // This is the id of the VM on the vCenter where it was originally present - PreviousVMEntityID *int64 `json:"previousVmEntityId,omitempty"` - - // This is the id of vCenter where the VM was originally present - PreviousVMParentSourceID *int64 `json:"previousVmParentSourceId,omitempty"` -} - -// Validate validates this Vm linking info -func (m *VMLinkingInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Vm linking info based on context it is used -func (m *VMLinkingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMLinkingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMLinkingInfo) UnmarshalBinary(b []byte) error { - var res VMLinkingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_name_info.go b/v1/models/vm_name_info.go deleted file mode 100644 index 061f632a..00000000 --- a/v1/models/vm_name_info.go +++ /dev/null @@ -1,54 +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" -) - -// VMNameInfo Struct containing vm-name and ui-name (to be displayed on the UI to get -// number of replicas as input) as members. -// -// swagger:model VmNameInfo -type VMNameInfo struct { - - // UI-name. To be displayed on the UI. - UIName *string `json:"uiName,omitempty"` - - // Vm-name. - VMName *string `json:"vmName,omitempty"` -} - -// Validate validates this Vm name info -func (m *VMNameInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Vm name info based on context it is used -func (m *VMNameInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMNameInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMNameInfo) UnmarshalBinary(b []byte) error { - var res VMNameInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_num_replicas.go b/v1/models/vm_num_replicas.go deleted file mode 100644 index 5930e515..00000000 --- a/v1/models/vm_num_replicas.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" -) - -// VMNumReplicas Struct containing vm-name and replica count as members. -// -// swagger:model VmNumReplicas -type VMNumReplicas struct { - - // Replica count. - NumReplicas *int64 `json:"numReplicas,omitempty"` - - // Vm-name. - VMName *string `json:"vmName,omitempty"` -} - -// Validate validates this Vm num replicas -func (m *VMNumReplicas) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Vm num replicas based on context it is used -func (m *VMNumReplicas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMNumReplicas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMNumReplicas) UnmarshalBinary(b []byte) error { - var res VMNumReplicas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_results.go b/v1/models/vm_results.go deleted file mode 100644 index 59782c94..00000000 --- a/v1/models/vm_results.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMResults VmResults is a struct containing the array of Vms as well as a count to -// indicate to the client if further paginated queries are needed to get the -// full result. -// -// swagger:model VmResults -type VMResults struct { - - // Count is the total number of items stored in the ElasticSearch. - Count *int64 `json:"count,omitempty"` - - // Vms lists the individual VMs fetched by this query. - Vms []*VMSearchResult `json:"vms"` -} - -// Validate validates this Vm results -func (m *VMResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVms(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMResults) validateVms(formats strfmt.Registry) error { - if swag.IsZero(m.Vms) { // not required - return nil - } - - for i := 0; i < len(m.Vms); i++ { - if swag.IsZero(m.Vms[i]) { // not required - continue - } - - if m.Vms[i] != nil { - if err := m.Vms[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vms" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vms" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Vm results based on the context it is used -func (m *VMResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVms(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMResults) contextValidateVms(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vms); i++ { - - if m.Vms[i] != nil { - - if swag.IsZero(m.Vms[i]) { // not required - return nil - } - - if err := m.Vms[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vms" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vms" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMResults) UnmarshalBinary(b []byte) error { - var res VMResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_search_result.go b/v1/models/vm_search_result.go deleted file mode 100644 index 7859627c..00000000 --- a/v1/models/vm_search_result.go +++ /dev/null @@ -1,162 +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" -) - -// VMSearchResult VmSearchResult wraps a VM object snapshot from Yoda ElasticSearch and -// processes some fields to be consumed by the UI. -// -// swagger:model VmSearchResult -type VMSearchResult struct { - - // RegisteredSource is the protobuf for the top-level vCenter registered - // source. - RegisteredSource *PrivateEntityProto `json:"registeredSource,omitempty"` - - // VmDocument represents an entry for a job/VM pair. - VMDocument *ObjectSnapshotDocument `json:"vmDocument,omitempty"` -} - -// Validate validates this Vm search result -func (m *VMSearchResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegisteredSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMDocument(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMSearchResult) validateRegisteredSource(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if m.RegisteredSource != nil { - if err := m.RegisteredSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *VMSearchResult) validateVMDocument(formats strfmt.Registry) error { - if swag.IsZero(m.VMDocument) { // not required - return nil - } - - if m.VMDocument != nil { - if err := m.VMDocument.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmDocument") - } - return err - } - } - - return nil -} - -// ContextValidate validate this Vm search result based on the context it is used -func (m *VMSearchResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegisteredSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMDocument(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMSearchResult) contextValidateRegisteredSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredSource != nil { - - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if err := m.RegisteredSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -func (m *VMSearchResult) contextValidateVMDocument(ctx context.Context, formats strfmt.Registry) error { - - if m.VMDocument != nil { - - if swag.IsZero(m.VMDocument) { // not required - return nil - } - - if err := m.VMDocument.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmDocument") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMSearchResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMSearchResult) UnmarshalBinary(b []byte) error { - var res VMSearchResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vm_volumes_information.go b/v1/models/vm_volumes_information.go deleted file mode 100644 index 20583379..00000000 --- a/v1/models/vm_volumes_information.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VMVolumesInformation VM Volume Information. -// -// Specifies information about a logical volume found a VM. -// -// swagger:model VmVolumesInformation -type VMVolumesInformation struct { - - // Array of Filesystem Volumes. - // - // Specifies information about the filesystem volumes found in a - // logical volume. - FilesystemVolumes []*FilesystemVolume `json:"filesystemVolumes"` -} - -// Validate validates this Vm volumes information -func (m *VMVolumesInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesystemVolumes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMVolumesInformation) validateFilesystemVolumes(formats strfmt.Registry) error { - if swag.IsZero(m.FilesystemVolumes) { // not required - return nil - } - - for i := 0; i < len(m.FilesystemVolumes); i++ { - if swag.IsZero(m.FilesystemVolumes[i]) { // not required - continue - } - - if m.FilesystemVolumes[i] != nil { - if err := m.FilesystemVolumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystemVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystemVolumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Vm volumes information based on the context it is used -func (m *VMVolumesInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesystemVolumes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMVolumesInformation) contextValidateFilesystemVolumes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesystemVolumes); i++ { - - if m.FilesystemVolumes[i] != nil { - - if swag.IsZero(m.FilesystemVolumes[i]) { // not required - return nil - } - - if err := m.FilesystemVolumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesystemVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesystemVolumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMVolumesInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMVolumesInformation) UnmarshalBinary(b []byte) error { - var res VMVolumesInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_clone_parameters.go b/v1/models/vmware_clone_parameters.go deleted file mode 100644 index fd45f4f3..00000000 --- a/v1/models/vmware_clone_parameters.go +++ /dev/null @@ -1,328 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareCloneParameters VmWare Clone Parameters. -// -// Specifies the information required for recovering or cloning VmWare VMs. -// -// swagger:model VmwareCloneParameters -type VmwareCloneParameters struct { - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies the folder where the restore datastore should be created. - // This is applicable only when the VMs are being cloned. - DatastoreFolderID *int64 `json:"datastoreFolderId,omitempty"` - - // Specifies whether the network should be detached from the - // recovered or cloned VMs. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies whether the network should be left in disabled state. - // Attached network is enabled by default. Set this flag to true to - // disable it. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies a network configuration to be attached to the cloned or - // recovered object. - // For kCloneVMs and kRecoverVMs tasks, original network configuration - // is detached if the cloned or recovered object is kept under a different - // parent Protection Source or a different Resource Pool. - // By default, for kRecoverVMs task, original network configuration is - // preserved if the recovered object is kept under the same parent - // Protection Source and the same Resource Pool. - // Specify this field to override the preserved network configuration or - // to attach a new network configuration to the cloned or recovered objects. - // You can get the networkId of the kNetwork object by setting - // includeNetworks to 'true' in the GET /public/protectionSources operation. - // In the response, get the id of the desired kNetwork object, the resource - // pool, and the registered parent Protection Source. - NetworkID *int64 `json:"networkId,omitempty"` - - // Specifies the parameters for mapping the source and target - // networks. This field can be used if restoring to a different - // parent source. - // This will replace the NetworkId and DisableNetwork that are - // used to provide configuration for a single network. Unless the - // support for mapping is available for all the entities old keys - // can be used to attach a new network. - // Supports 'kVMware' for now. - NetworkMappings []*NetworkMapping `json:"networkMappings"` - - // Specifies the Org VDC Network to be used for this recovery. - OrgVdcNetwork *OrgVdcNetworkParams `json:"orgVdcNetwork,omitempty"` - - // Specifies whether to overwrite the existing VM for a recovery when - // rename parameters are not given. - OverwriteExistingVM *bool `json:"overwriteExistingVm,omitempty"` - - // Specifies whether to power off and rename the existing VM as deprecated - // for recovery when rename parameters are not given. - PowerOffAndRenameExistingVM *bool `json:"powerOffAndRenameExistingVm,omitempty"` - - // Specifies the power state of the cloned or recovered objects. - // By default, the cloned or recovered objects are powered off. - PoweredOn *bool `json:"poweredOn,omitempty"` - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // Specifies whether or not to preserve the custom attributes during the - // clone operation. The default behavior is 'true'. - PreserveCustomAttributesDuringClone *bool `json:"preserveCustomAttributesDuringClone,omitempty"` - - // Specifies whether or not to preserve tags during the clone operation. The - // default behavior is 'true'. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // Specifies the type of recovery process to be performed. If unspecified, - // then an instant recovery will be performed. - // Specifies the recovery process type to be used.. - // 'kInstantRecovery' indicates that an instant recovery should be performed. - // 'kCopyRecovery' indicates that a copy recovery should be performed. - // Enum: ["kInstantRecovery","kCopyRecovery"] - RecoveryProcessType *string `json:"recoveryProcessType,omitempty"` - - // Specifies the resource pool where the cloned or recovered objects are - // attached. This field is mandatory for kCloneVMs Restore Tasks always. - // For kRecoverVMs Restore Tasks, this field is mandatory only if - // newParentId field is specified. If this field is not specified, - // recovered objects are attached to the original resource pool under the - // original parent. - ResourcePoolID *int64 `json:"resourcePoolId,omitempty"` - - // Specifies the name of the destination storage profile while restoring to - // an alternate VCD location. - StorageProfileName *string `json:"storageProfileName,omitempty"` - - // Specifies the UUID of the storage profile while restoring to an alternate - // VCD location. - StorageProfileVcdUUID *string `json:"storageProfileVcdUuid,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` - - // Specifies the ID of the vApp to which a VM should be restored. - VAppID *int64 `json:"vAppId,omitempty"` - - // Specifies the ID of the VDC to which a VM should be restored. - VdcID *int64 `json:"vdcId,omitempty"` - - // Specifies a folder where the VMs should be restored. This is applicable - // only when the VMs are being restored to an alternate location or if clone - // is being performed. - VMFolderID *int64 `json:"vmFolderId,omitempty"` -} - -// Validate validates this vmware clone parameters -func (m *VmwareCloneParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkMappings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareCloneParameters) validateNetworkMappings(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkMappings) { // not required - return nil - } - - for i := 0; i < len(m.NetworkMappings); i++ { - if swag.IsZero(m.NetworkMappings[i]) { // not required - continue - } - - if m.NetworkMappings[i] != nil { - if err := m.NetworkMappings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareCloneParameters) 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 -} - -var vmwareCloneParametersTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInstantRecovery","kCopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareCloneParametersTypeRecoveryProcessTypePropEnum = append(vmwareCloneParametersTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // VmwareCloneParametersRecoveryProcessTypeKInstantRecovery captures enum value "kInstantRecovery" - VmwareCloneParametersRecoveryProcessTypeKInstantRecovery string = "kInstantRecovery" - - // VmwareCloneParametersRecoveryProcessTypeKCopyRecovery captures enum value "kCopyRecovery" - VmwareCloneParametersRecoveryProcessTypeKCopyRecovery string = "kCopyRecovery" -) - -// prop value enum -func (m *VmwareCloneParameters) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareCloneParametersTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareCloneParameters) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", *m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vmware clone parameters based on the context it is used -func (m *VmwareCloneParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkMappings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareCloneParameters) contextValidateNetworkMappings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkMappings); i++ { - - if m.NetworkMappings[i] != nil { - - if swag.IsZero(m.NetworkMappings[i]) { // not required - return nil - } - - if err := m.NetworkMappings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareCloneParameters) 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 -} - -// MarshalBinary interface implementation -func (m *VmwareCloneParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareCloneParameters) UnmarshalBinary(b []byte) error { - var res VmwareCloneParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_env_job_parameters.go b/v1/models/vmware_env_job_parameters.go deleted file mode 100644 index 80f3bf88..00000000 --- a/v1/models/vmware_env_job_parameters.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VmwareEnvJobParameters Vmware Environment Job Parameters. -// -// Specifies job parameters applicable for all 'kVMware' Environment type -// Protection Sources in a Protection Job. -// -// swagger:model VmwareEnvJobParameters -type VmwareEnvJobParameters struct { - - // Specifies the list of Disks to be excluded from backing up. These disks - // are excluded from all Protection Sources in the Protection Job. - ExcludedDisks []*DiskUnit `json:"excludedDisks"` - - // If true, takes a crash-consistent snapshot when app-consistent snapshot - // fails. Otherwise, the snapshot attempt is marked failed. - FallbackToCrashConsistent *bool `json:"fallbackToCrashConsistent,omitempty"` - - // If true, skip physical RDM disks when backing up VMs. Otherwise, backup - // of VMs having physical RDM will fail. - SkipPhysicalRdmDisks *bool `json:"skipPhysicalRdmDisks,omitempty"` -} - -// Validate validates this vmware env job parameters -func (m *VmwareEnvJobParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludedDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareEnvJobParameters) validateExcludedDisks(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludedDisks) { // not required - return nil - } - - for i := 0; i < len(m.ExcludedDisks); i++ { - if swag.IsZero(m.ExcludedDisks[i]) { // not required - continue - } - - if m.ExcludedDisks[i] != nil { - if err := m.ExcludedDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware env job parameters based on the context it is used -func (m *VmwareEnvJobParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExcludedDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareEnvJobParameters) contextValidateExcludedDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludedDisks); i++ { - - if m.ExcludedDisks[i] != nil { - - if swag.IsZero(m.ExcludedDisks[i]) { // not required - return nil - } - - if err := m.ExcludedDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareEnvJobParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareEnvJobParameters) UnmarshalBinary(b []byte) error { - var res VmwareEnvJobParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_folders_result.go b/v1/models/vmware_folders_result.go deleted file mode 100644 index b6d13c97..00000000 --- a/v1/models/vmware_folders_result.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VmwareFoldersResult Result of VM Folders call. -// -// swagger:model VmwareFoldersResult -type VmwareFoldersResult struct { - - // Datastore Folders. - DatastoreFolders []*FolderResult `json:"datastoreFolders"` - - // VM Folders. - VMFolders []*FolderResult `json:"vmFolders"` -} - -// Validate validates this vmware folders result -func (m *VmwareFoldersResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastoreFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMFolders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareFoldersResult) validateDatastoreFolders(formats strfmt.Registry) error { - if swag.IsZero(m.DatastoreFolders) { // not required - return nil - } - - for i := 0; i < len(m.DatastoreFolders); i++ { - if swag.IsZero(m.DatastoreFolders[i]) { // not required - continue - } - - if m.DatastoreFolders[i] != nil { - if err := m.DatastoreFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareFoldersResult) validateVMFolders(formats strfmt.Registry) error { - if swag.IsZero(m.VMFolders) { // not required - return nil - } - - for i := 0; i < len(m.VMFolders); i++ { - if swag.IsZero(m.VMFolders[i]) { // not required - continue - } - - if m.VMFolders[i] != nil { - if err := m.VMFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware folders result based on the context it is used -func (m *VmwareFoldersResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastoreFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareFoldersResult) contextValidateDatastoreFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatastoreFolders); i++ { - - if m.DatastoreFolders[i] != nil { - - if swag.IsZero(m.DatastoreFolders[i]) { // not required - return nil - } - - if err := m.DatastoreFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareFoldersResult) contextValidateVMFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VMFolders); i++ { - - if m.VMFolders[i] != nil { - - if swag.IsZero(m.VMFolders[i]) { // not required - return nil - } - - if err := m.VMFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareFoldersResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareFoldersResult) UnmarshalBinary(b []byte) error { - var res VmwareFoldersResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_params.go b/v1/models/vmware_params.go deleted file mode 100644 index 2f24e337..00000000 --- a/v1/models/vmware_params.go +++ /dev/null @@ -1,50 +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" -) - -// VmwareParams vmware params -// -// swagger:model VmwareParams -type VmwareParams struct { - - // Specifies to use VM BIOS UUID to track virtual machines in the host. - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` -} - -// Validate validates this vmware params -func (m *VmwareParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vmware params based on context it is used -func (m *VmwareParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareParams) UnmarshalBinary(b []byte) error { - var res VmwareParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_restore_parameters.go b/v1/models/vmware_restore_parameters.go deleted file mode 100644 index f4542d0b..00000000 --- a/v1/models/vmware_restore_parameters.go +++ /dev/null @@ -1,339 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareRestoreParameters VmWare Restore Parameters. -// -// Specifies the information required for recovering or cloning VmWare VMs. -// -// swagger:model VmwareRestoreParameters -type VmwareRestoreParameters struct { - - // Specifies additional datastores where the object should be recovered to. - AdditionalDatastoreIds []int64 `json:"additionalDatastoreIds"` - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies the folder where the restore datastore should be created. - // This is applicable only when the VMs are being cloned. - DatastoreFolderID *int64 `json:"datastoreFolderId,omitempty"` - - // Specifies the datastore where the object's files should be - // recovered to. - // This field is mandatory to recover objects to a different - // resource pool or to a different parent source. - // If not specified, objects are recovered to their - // original datastore locations in the parent source. - DatastoreID *int64 `json:"datastoreId,omitempty"` - - // Specifies whether the network should be detached from the - // recovered or cloned VMs. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies whether the network should be left in disabled state. - // Attached network is enabled by default. Set this flag to true to - // disable it. - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // Specifies a network configuration to be attached to the cloned or - // recovered object. - // For kCloneVMs and kRecoverVMs tasks, original network configuration - // is detached if the cloned or recovered object is kept under a different - // parent Protection Source or a different Resource Pool. - // By default, for kRecoverVMs task, original network configuration is - // preserved if the recovered object is kept under the same parent - // Protection Source and the same Resource Pool. - // Specify this field to override the preserved network configuration or - // to attach a new network configuration to the cloned or recovered objects. - // You can get the networkId of the kNetwork object by setting - // includeNetworks to 'true' in the GET /public/protectionSources operation. - // In the response, get the id of the desired kNetwork object, the resource - // pool, and the registered parent Protection Source. - NetworkID *int64 `json:"networkId,omitempty"` - - // Specifies the parameters for mapping the source and target - // networks. This field can be used if restoring to a different - // parent source. - // This will replace the NetworkId and DisableNetwork that are - // used to provide configuration for a single network. Unless the - // support for mapping is available for all the entities old keys - // can be used to attach a new network. - // Supports 'kVMware' for now. - NetworkMappings []*NetworkMapping `json:"networkMappings"` - - // Specifies the Org VDC Network to be used for this recovery. - OrgVdcNetwork *OrgVdcNetworkParams `json:"orgVdcNetwork,omitempty"` - - // Specifies whether to overwrite the existing VM for a recovery when - // rename parameters are not given. - OverwriteExistingVM *bool `json:"overwriteExistingVm,omitempty"` - - // Specifies whether to power off and rename the existing VM as deprecated - // for recovery when rename parameters are not given. - PowerOffAndRenameExistingVM *bool `json:"powerOffAndRenameExistingVm,omitempty"` - - // Specifies the power state of the cloned or recovered objects. - // By default, the cloned or recovered objects are powered off. - PoweredOn *bool `json:"poweredOn,omitempty"` - - // Specifies a prefix to prepended to the source object name to derive a - // new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Prefix *string `json:"prefix,omitempty"` - - // Specifies whether or not to preserve the custom attributes during the - // clone operation. The default behavior is 'true'. - PreserveCustomAttributesDuringClone *bool `json:"preserveCustomAttributesDuringClone,omitempty"` - - // Specifies whether or not to preserve tags during the clone operation. The - // default behavior is 'true'. - PreserveTags *bool `json:"preserveTags,omitempty"` - - // Specifies the type of recovery process to be performed. If unspecified, - // then an instant recovery will be performed. - // Specifies the recovery process type to be used.. - // 'kInstantRecovery' indicates that an instant recovery should be performed. - // 'kCopyRecovery' indicates that a copy recovery should be performed. - // Enum: ["kInstantRecovery","kCopyRecovery"] - RecoveryProcessType *string `json:"recoveryProcessType,omitempty"` - - // Specifies the resource pool where the cloned or recovered objects are - // attached. This field is mandatory for kCloneVMs Restore Tasks always. - // For kRecoverVMs Restore Tasks, this field is mandatory only if - // newParentId field is specified. If this field is not specified, - // recovered objects are attached to the original resource pool under the - // original parent. - ResourcePoolID *int64 `json:"resourcePoolId,omitempty"` - - // Specifies the name of the destination storage profile while restoring to - // an alternate VCD location. - StorageProfileName *string `json:"storageProfileName,omitempty"` - - // Specifies the UUID of the storage profile while restoring to an alternate - // VCD location. - StorageProfileVcdUUID *string `json:"storageProfileVcdUuid,omitempty"` - - // Specifies a suffix to appended to the original source object name - // to derive a new name for the recovered or cloned object. - // By default, cloned or recovered objects retain their original name. - // Length of this field is limited to 8 characters. - Suffix *string `json:"suffix,omitempty"` - - // Specifies the ID of the vApp to which a VM should be restored. - VAppID *int64 `json:"vAppId,omitempty"` - - // Specifies the ID of the VDC to which a VM should be restored. - VdcID *int64 `json:"vdcId,omitempty"` - - // Specifies a folder where the VMs should be restored. This is applicable - // only when the VMs are being restored to an alternate location or if clone - // is being performed. - VMFolderID *int64 `json:"vmFolderId,omitempty"` -} - -// Validate validates this vmware restore parameters -func (m *VmwareRestoreParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkMappings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRestoreParameters) validateNetworkMappings(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkMappings) { // not required - return nil - } - - for i := 0; i < len(m.NetworkMappings); i++ { - if swag.IsZero(m.NetworkMappings[i]) { // not required - continue - } - - if m.NetworkMappings[i] != nil { - if err := m.NetworkMappings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareRestoreParameters) 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 -} - -var vmwareRestoreParametersTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInstantRecovery","kCopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareRestoreParametersTypeRecoveryProcessTypePropEnum = append(vmwareRestoreParametersTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // VmwareRestoreParametersRecoveryProcessTypeKInstantRecovery captures enum value "kInstantRecovery" - VmwareRestoreParametersRecoveryProcessTypeKInstantRecovery string = "kInstantRecovery" - - // VmwareRestoreParametersRecoveryProcessTypeKCopyRecovery captures enum value "kCopyRecovery" - VmwareRestoreParametersRecoveryProcessTypeKCopyRecovery string = "kCopyRecovery" -) - -// prop value enum -func (m *VmwareRestoreParameters) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareRestoreParametersTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareRestoreParameters) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", *m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vmware restore parameters based on the context it is used -func (m *VmwareRestoreParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkMappings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRestoreParameters) contextValidateNetworkMappings(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkMappings); i++ { - - if m.NetworkMappings[i] != nil { - - if swag.IsZero(m.NetworkMappings[i]) { // not required - return nil - } - - if err := m.NetworkMappings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkMappings" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareRestoreParameters) 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 -} - -// MarshalBinary interface implementation -func (m *VmwareRestoreParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRestoreParameters) UnmarshalBinary(b []byte) error { - var res VmwareRestoreParameters - 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 deleted file mode 100644 index eb4255ec..00000000 --- a/v1/models/vmware_special_parameters.go +++ /dev/null @@ -1,228 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VmwareSpecialParameters Vmware Source Special Job Parameters. -// -// Specifies additional special settings applicable for a Protection Source -// of 'kVMware' type in a Protection Job. -// -// swagger:model VmwareSpecialParameters -type VmwareSpecialParameters struct { - - // Specifies parameters that are related to applications running on the - // Protection Source. - ApplicationParameters *ApplicationParameters `json:"applicationParameters,omitempty"` - - // Specifies the list of Disks to be excluded from backing up. These disks - // are excluded from all Protection Sources in the Protection Job. - ExcludedDisks []*DiskUnit `json:"excludedDisks"` - - // vm credentials - VMCredentials *VmwareSpecialParametersVMCredentials `json:"vmCredentials,omitempty"` -} - -// Validate validates this vmware special parameters -func (m *VmwareSpecialParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludedDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareSpecialParameters) validateApplicationParameters(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if m.ApplicationParameters != nil { - if err := m.ApplicationParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -func (m *VmwareSpecialParameters) validateExcludedDisks(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludedDisks) { // not required - return nil - } - - for i := 0; i < len(m.ExcludedDisks); i++ { - if swag.IsZero(m.ExcludedDisks[i]) { // not required - continue - } - - if m.ExcludedDisks[i] != nil { - if err := m.ExcludedDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareSpecialParameters) validateVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.VMCredentials) { // not required - 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 -} - -// ContextValidate validate this vmware special parameters based on the context it is used -func (m *VmwareSpecialParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludedDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareSpecialParameters) contextValidateApplicationParameters(ctx context.Context, formats strfmt.Registry) error { - - if m.ApplicationParameters != nil { - - if swag.IsZero(m.ApplicationParameters) { // not required - return nil - } - - if err := m.ApplicationParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationParameters") - } - return err - } - } - - return nil -} - -func (m *VmwareSpecialParameters) contextValidateExcludedDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludedDisks); i++ { - - if m.ExcludedDisks[i] != nil { - - if swag.IsZero(m.ExcludedDisks[i]) { // not required - return nil - } - - if err := m.ExcludedDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -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 -} - -// MarshalBinary interface implementation -func (m *VmwareSpecialParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareSpecialParameters) UnmarshalBinary(b []byte) error { - var res VmwareSpecialParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - 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/v1/models/volume_indexing_info.go b/v1/models/volume_indexing_info.go deleted file mode 100644 index a1e64559..00000000 --- a/v1/models/volume_indexing_info.go +++ /dev/null @@ -1,57 +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" -) - -// VolumeIndexingInfo Indexing info per volume of a VM. This will be a part of VMIndexingReport -// and stored in object_db as well. -// -// swagger:model VolumeIndexingInfo -type VolumeIndexingInfo struct { - - // Number of entried indexed in this volume. - NumEntriesIndexed *int64 `json:"numEntriesIndexed,omitempty"` - - // Time taken to index above entries. - TimeTakenInVolIndexingUsecs *int64 `json:"timeTakenInVolIndexingUsecs,omitempty"` - - // Name of the volume whose info is stored. - VolumeName *string `json:"volumeName,omitempty"` -} - -// Validate validates this volume indexing info -func (m *VolumeIndexingInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this volume indexing info based on context it is used -func (m *VolumeIndexingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeIndexingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeIndexingInfo) UnmarshalBinary(b []byte) error { - var res VolumeIndexingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info.go b/v1/models/volume_info.go deleted file mode 100644 index e8f6a229..00000000 --- a/v1/models/volume_info.go +++ /dev/null @@ -1,264 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VolumeInfo Information about each logical volume (filesystem). -// -// swagger:model VolumeInfo -type VolumeInfo struct { - - // Information about all the disks and partitions needed to mount this - // logical volume. - DiskVec []*VolumeInfoDiskInfo `json:"diskVec"` - - // Display name. - DisplayName *string `json:"displayName,omitempty"` - - // Filesystem on this volume. - FilesystemType *string `json:"filesystemType,omitempty"` - - // Filesystem label. - FsLabel *string `json:"fsLabel,omitempty"` - - // Filesystem uuid. - FsUUID *string `json:"fsUuid,omitempty"` - - // Is this volume bootable? - IsBootable *bool `json:"isBootable,omitempty"` - - // Is this a dedup volume? - // Currently, set to true only for ntfs dedup volume. - IsDedup *bool `json:"isDedup,omitempty"` - - // Is this a supported Volume (filesystem)? - IsSupported *bool `json:"isSupported,omitempty"` - - // This field is set only for lvm and ldm volume only. - LvInfo *VolumeInfoLogicalVolumeInfo `json:"lvInfo,omitempty"` - - // This is set to capture info about any active subvolume for this volume. - SubvolInfo *VolumeInfoSubVolumeInfo `json:"subvolInfo,omitempty"` - - // The guid of the volume represented by this virtual disk. - // This information will be originally populated by magneto for physical - // environments. - VolumeGUID *string `json:"volumeGuid,omitempty"` - - // We assign a unique number to every volume within a VM which we see for the - // first time. The identifier will be monotonically increasing number startin - // from 1. - VolumeIdentifier *int32 `json:"volumeIdentifier,omitempty"` - - // The source type of the volume. This field is typically stamped before - // processing volume and used to customize process behavior like rpc timeout, - // max retries, mount options, etc. - VolumeSourceType *int32 `json:"volumeSourceType,omitempty"` - - // Whether this volume is simple, lvm or ldm. - VolumeType *int32 `json:"volumeType,omitempty"` -} - -// Validate validates this volume info -func (m *VolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLvInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubvolInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfo) validateDiskVec(formats strfmt.Registry) error { - if swag.IsZero(m.DiskVec) { // not required - return nil - } - - for i := 0; i < len(m.DiskVec); i++ { - if swag.IsZero(m.DiskVec[i]) { // not required - continue - } - - if m.DiskVec[i] != nil { - if err := m.DiskVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VolumeInfo) validateLvInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LvInfo) { // not required - return nil - } - - if m.LvInfo != nil { - if err := m.LvInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lvInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lvInfo") - } - return err - } - } - - return nil -} - -func (m *VolumeInfo) validateSubvolInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SubvolInfo) { // not required - return nil - } - - if m.SubvolInfo != nil { - if err := m.SubvolInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subvolInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subvolInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this volume info based on the context it is used -func (m *VolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDiskVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLvInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubvolInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfo) contextValidateDiskVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskVec); i++ { - - if m.DiskVec[i] != nil { - - if swag.IsZero(m.DiskVec[i]) { // not required - return nil - } - - if err := m.DiskVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VolumeInfo) contextValidateLvInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LvInfo != nil { - - if swag.IsZero(m.LvInfo) { // not required - return nil - } - - if err := m.LvInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lvInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lvInfo") - } - return err - } - } - - return nil -} - -func (m *VolumeInfo) contextValidateSubvolInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SubvolInfo != nil { - - if swag.IsZero(m.SubvolInfo) { // not required - return nil - } - - if err := m.SubvolInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subvolInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subvolInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_disk_info.go b/v1/models/volume_info_disk_info.go deleted file mode 100644 index eeaa8d41..00000000 --- a/v1/models/volume_info_disk_info.go +++ /dev/null @@ -1,205 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VolumeInfoDiskInfo Information about each disk in volume. -// -// swagger:model VolumeInfo_DiskInfo -type VolumeInfoDiskInfo struct { - - // Disk name. This is the vmdk names, and not the flat file name. - DiskFileName *string `json:"diskFileName,omitempty"` - - // Disk format type of this file. - // See util/disklib/base/enums.proto for available types. - DiskFormat *int32 `json:"diskFormat,omitempty"` - - // Disk uuid. - DiskUUID *string `json:"diskUuid,omitempty"` - - // Disk partition type. - PartitionType *int32 `json:"partitionType,omitempty"` - - // Information about all the partitions in this disk. - PartitionVec []*VolumeInfoDiskInfoPartitionInfo `json:"partitionVec"` - - // This disk is formed by following physical ranges. - // Ranges are arranged sequentially to form a disk. - PhysicalRangeVec []*VolumeInfoDiskInfoPhysicalRange `json:"physicalRangeVec"` - - // Sector size of disk. - // This is sector size of disk which is formed by mapping the physical - // ranges of the disk into a linear device. - SectorSize *int64 `json:"sectorSize,omitempty"` - - // Disk size in bytes. - VmdkSize *int64 `json:"vmdkSize,omitempty"` -} - -// Validate validates this volume info disk info -func (m *VolumeInfoDiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePartitionVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalRangeVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoDiskInfo) validatePartitionVec(formats strfmt.Registry) error { - if swag.IsZero(m.PartitionVec) { // not required - return nil - } - - for i := 0; i < len(m.PartitionVec); i++ { - if swag.IsZero(m.PartitionVec[i]) { // not required - continue - } - - if m.PartitionVec[i] != nil { - if err := m.PartitionVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("partitionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("partitionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VolumeInfoDiskInfo) validatePhysicalRangeVec(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalRangeVec) { // not required - return nil - } - - for i := 0; i < len(m.PhysicalRangeVec); i++ { - if swag.IsZero(m.PhysicalRangeVec[i]) { // not required - continue - } - - if m.PhysicalRangeVec[i] != nil { - if err := m.PhysicalRangeVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this volume info disk info based on the context it is used -func (m *VolumeInfoDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePartitionVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalRangeVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoDiskInfo) contextValidatePartitionVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PartitionVec); i++ { - - if m.PartitionVec[i] != nil { - - if swag.IsZero(m.PartitionVec[i]) { // not required - return nil - } - - if err := m.PartitionVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("partitionVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("partitionVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VolumeInfoDiskInfo) contextValidatePhysicalRangeVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PhysicalRangeVec); i++ { - - if m.PhysicalRangeVec[i] != nil { - - if swag.IsZero(m.PhysicalRangeVec[i]) { // not required - return nil - } - - if err := m.PhysicalRangeVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalRangeVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalRangeVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoDiskInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfoDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_disk_info_partition_info.go b/v1/models/volume_info_disk_info_partition_info.go deleted file mode 100644 index 476bfb25..00000000 --- a/v1/models/volume_info_disk_info_partition_info.go +++ /dev/null @@ -1,77 +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" -) - -// VolumeInfoDiskInfoPartitionInfo Information about each Partition. -// -// Offset/Length here is relative to the logical range starting at 0, -// formed by mapping the physical ranges of the disk into a linear device. -// -// swagger:model VolumeInfo_DiskInfo_PartitionInfo -type VolumeInfoDiskInfoPartitionInfo struct { - - // Length of partition in bytes. - Length *int64 `json:"length,omitempty"` - - // Partition number. - PartitionNumber *int64 `json:"partitionNumber,omitempty"` - - // Partition type uuid. - // If disk is unpartitioned, this field will not be set. - // If disk is MBR partitioned, this field will be set to partition type. - // Example: 83 (from below fdisk output) [This value is in hex] - // bash$ fdisk -l foobar.vmdk - // Device Boot Start End Sectors Size Id Type - // foobar.vmdk1 2048 1050623 1048576 512M 83 Linux - // If disk is GPT partitioned, this field will be set to partition type - // GUID. - // Example: fc63daf-8483-4772-8e793d69d8477de4 (Linux filesystem data) - PartitionTypeUUID *string `json:"partitionTypeUuid,omitempty"` - - // Partition uuid. - // If disk is unpartitioned, this field will not be set. - // If disk is MBR partitioned, this field will not be set. - // If disk is GPT partitioned, this field will be set to partition GUID. - PartitionUUID *string `json:"partitionUuid,omitempty"` - - // Start offset of partition in bytes. - StartOffset *int64 `json:"startOffset,omitempty"` -} - -// Validate validates this volume info disk info partition info -func (m *VolumeInfoDiskInfoPartitionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this volume info disk info partition info based on context it is used -func (m *VolumeInfoDiskInfoPartitionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoDiskInfoPartitionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoDiskInfoPartitionInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfoDiskInfoPartitionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_disk_info_physical_range.go b/v1/models/volume_info_disk_info_physical_range.go deleted file mode 100644 index 79104043..00000000 --- a/v1/models/volume_info_disk_info_physical_range.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" -) - -// VolumeInfoDiskInfoPhysicalRange This message represents a physical contiguous range in disk file. -// -// swagger:model VolumeInfo_DiskInfo_PhysicalRange -type VolumeInfoDiskInfoPhysicalRange struct { - - // Length of this range in bytes. - Length *int64 `json:"length,omitempty"` - - // Offset of this range in disk file from beginning of file. - Offset *int64 `json:"offset,omitempty"` -} - -// Validate validates this volume info disk info physical range -func (m *VolumeInfoDiskInfoPhysicalRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this volume info disk info physical range based on context it is used -func (m *VolumeInfoDiskInfoPhysicalRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoDiskInfoPhysicalRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoDiskInfoPhysicalRange) UnmarshalBinary(b []byte) error { - var res VolumeInfoDiskInfoPhysicalRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_logical_volume_info.go b/v1/models/volume_info_logical_volume_info.go deleted file mode 100644 index 2bc86214..00000000 --- a/v1/models/volume_info_logical_volume_info.go +++ /dev/null @@ -1,125 +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" -) - -// VolumeInfoLogicalVolumeInfo The proto is used only for LVM (Linux) or LDM (Windows). -// -// This is extra attribute which uniquely identifies a logical volume in LVM -// or LDM. -// -// swagger:model VolumeInfo_LogicalVolumeInfo -type VolumeInfoLogicalVolumeInfo struct { - - // The tree defining how to combine partitions to create this logical - // volume. - DeviceTree *DeviceTree `json:"deviceTree,omitempty"` - - // Logical volume name. - LogicalVolumeName *string `json:"logicalVolumeName,omitempty"` - - // Logical volume uuid. - LogicalVolumeUUID *string `json:"logicalVolumeUuid,omitempty"` - - // Volume group name. - VolumeGroupName *string `json:"volumeGroupName,omitempty"` - - // Volume group uuid. - VolumeGroupUUID *string `json:"volumeGroupUuid,omitempty"` -} - -// Validate validates this volume info logical volume info -func (m *VolumeInfoLogicalVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeviceTree(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoLogicalVolumeInfo) validateDeviceTree(formats strfmt.Registry) error { - if swag.IsZero(m.DeviceTree) { // not required - return nil - } - - if m.DeviceTree != nil { - if err := m.DeviceTree.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceTree") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceTree") - } - return err - } - } - - return nil -} - -// ContextValidate validate this volume info logical volume info based on the context it is used -func (m *VolumeInfoLogicalVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeviceTree(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoLogicalVolumeInfo) contextValidateDeviceTree(ctx context.Context, formats strfmt.Registry) error { - - if m.DeviceTree != nil { - - if swag.IsZero(m.DeviceTree) { // not required - return nil - } - - if err := m.DeviceTree.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceTree") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceTree") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoLogicalVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoLogicalVolumeInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfoLogicalVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_result.go b/v1/models/volume_info_result.go deleted file mode 100644 index 39f69a79..00000000 --- a/v1/models/volume_info_result.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VolumeInfoResult VolumeInfoResult is the information about volumes of a VM. -// -// swagger:model VolumeInfoResult -type VolumeInfoResult struct { - - // VolumeInfoCookie is the cookie to be passed in calls to reading a VM dir - // for this volume. - VolumeInfoCookie *uint64 `json:"volumeInfoCookie,omitempty"` - - // VolumeInfos is the information about each logical volume (filesystem) for a - // VM. - VolumeInfos []*PrivateVolumeInfo `json:"volumeInfos"` -} - -// Validate validates this volume info result -func (m *VolumeInfoResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeInfos(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoResult) validateVolumeInfos(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfos) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfos); i++ { - if swag.IsZero(m.VolumeInfos[i]) { // not required - continue - } - - if m.VolumeInfos[i] != nil { - if err := m.VolumeInfos[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this volume info result based on the context it is used -func (m *VolumeInfoResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeInfos(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfoResult) contextValidateVolumeInfos(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfos); i++ { - - if m.VolumeInfos[i] != nil { - - if swag.IsZero(m.VolumeInfos[i]) { // not required - return nil - } - - if err := m.VolumeInfos[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoResult) UnmarshalBinary(b []byte) error { - var res VolumeInfoResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_info_sub_volume_info.go b/v1/models/volume_info_sub_volume_info.go deleted file mode 100644 index 3c9812e7..00000000 --- a/v1/models/volume_info_sub_volume_info.go +++ /dev/null @@ -1,51 +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" -) - -// VolumeInfoSubVolumeInfo The proto is used only for storing BTRFS subvolume fields. This is -// required for handling of mountable subvolume. -// -// swagger:model VolumeInfo_SubVolumeInfo -type VolumeInfoSubVolumeInfo struct { - - // Name of subvolume. Used to provide relevant mount options. - SubvolumeName *string `json:"subvolumeName,omitempty"` -} - -// Validate validates this volume info sub volume info -func (m *VolumeInfoSubVolumeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this volume info sub volume info based on context it is used -func (m *VolumeInfoSubVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfoSubVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfoSubVolumeInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfoSubVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_mapping_report_volume_mount_i_o_info.go b/v1/models/volume_mapping_report_volume_mount_i_o_info.go deleted file mode 100644 index b8d8cfe2..00000000 --- a/v1/models/volume_mapping_report_volume_mount_i_o_info.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VolumeMappingReportVolumeMountIOInfo volume mapping report volume mount i o info -// -// swagger:model VolumeMappingReport_VolumeMountIOInfo -type VolumeMappingReportVolumeMountIOInfo struct { - - // Mapping from volume name to the reads recorded during its mount. - VolumeMountReads []*VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry `json:"volumeMountReads"` -} - -// Validate validates this volume mapping report volume mount i o info -func (m *VolumeMappingReportVolumeMountIOInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeMountReads(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeMappingReportVolumeMountIOInfo) validateVolumeMountReads(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeMountReads) { // not required - return nil - } - - for i := 0; i < len(m.VolumeMountReads); i++ { - if swag.IsZero(m.VolumeMountReads[i]) { // not required - continue - } - - if m.VolumeMountReads[i] != nil { - if err := m.VolumeMountReads[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountReads" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountReads" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this volume mapping report volume mount i o info based on the context it is used -func (m *VolumeMappingReportVolumeMountIOInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeMountReads(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeMappingReportVolumeMountIOInfo) contextValidateVolumeMountReads(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeMountReads); i++ { - - if m.VolumeMountReads[i] != nil { - - if swag.IsZero(m.VolumeMountReads[i]) { // not required - return nil - } - - if err := m.VolumeMountReads[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMountReads" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMountReads" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeMappingReportVolumeMountIOInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeMappingReportVolumeMountIOInfo) UnmarshalBinary(b []byte) error { - var res VolumeMappingReportVolumeMountIOInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_mapping_report_volume_mount_i_o_info_volume_mount_reads_entry.go b/v1/models/volume_mapping_report_volume_mount_i_o_info_volume_mount_reads_entry.go deleted file mode 100644 index 548831eb..00000000 --- a/v1/models/volume_mapping_report_volume_mount_i_o_info_volume_mount_reads_entry.go +++ /dev/null @@ -1,112 +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" -) - -// VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry volume mapping report volume mount i o info volume mount reads entry -// -// swagger:model VolumeMappingReport_VolumeMountIOInfo_VolumeMountReadsEntry -type VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *ReadIODataProto `json:"value,omitempty"` -} - -// Validate validates this volume mapping report volume mount i o info volume mount reads entry -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) 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 -} - -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this volume mapping report volume mount i o info volume mount reads entry based on the context it is used -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry) UnmarshalBinary(b []byte) error { - var res VolumeMappingReportVolumeMountIOInfoVolumeMountReadsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_name_map.go b/v1/models/volume_name_map.go deleted file mode 100644 index 3832dac3..00000000 --- a/v1/models/volume_name_map.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VolumeNameMap This message store the map, which store the information for each logical -// volume name to volume info. -// -// swagger:model VolumeNameMap -type VolumeNameMap struct { - - // Key for the map is volume name (guest mount point) and value is its - // corresponding volume information. - VolumeNameMap []*VolumeNameMapVolumeNameMapEntry `json:"volumeNameMap"` -} - -// Validate validates this volume name map -func (m *VolumeNameMap) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeNameMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeNameMap) validateVolumeNameMap(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeNameMap) { // not required - return nil - } - - for i := 0; i < len(m.VolumeNameMap); i++ { - if swag.IsZero(m.VolumeNameMap[i]) { // not required - continue - } - - if m.VolumeNameMap[i] != nil { - if err := m.VolumeNameMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeNameMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeNameMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this volume name map based on the context it is used -func (m *VolumeNameMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeNameMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeNameMap) contextValidateVolumeNameMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeNameMap); i++ { - - if m.VolumeNameMap[i] != nil { - - if swag.IsZero(m.VolumeNameMap[i]) { // not required - return nil - } - - if err := m.VolumeNameMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeNameMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeNameMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeNameMap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeNameMap) UnmarshalBinary(b []byte) error { - var res VolumeNameMap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_name_map_volume_name_map_entry.go b/v1/models/volume_name_map_volume_name_map_entry.go deleted file mode 100644 index ea779500..00000000 --- a/v1/models/volume_name_map_volume_name_map_entry.go +++ /dev/null @@ -1,112 +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" -) - -// VolumeNameMapVolumeNameMapEntry volume name map volume name map entry -// -// swagger:model VolumeNameMap_VolumeNameMapEntry -type VolumeNameMapVolumeNameMapEntry struct { - - // key - Key *string `json:"key,omitempty"` - - // value - Value *PrivateVolumeInfo `json:"value,omitempty"` -} - -// Validate validates this volume name map volume name map entry -func (m *VolumeNameMapVolumeNameMapEntry) 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 -} - -func (m *VolumeNameMapVolumeNameMapEntry) validateValue(formats strfmt.Registry) error { - if swag.IsZero(m.Value) { // not required - return nil - } - - if m.Value != nil { - if err := m.Value.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// ContextValidate validate this volume name map volume name map entry based on the context it is used -func (m *VolumeNameMapVolumeNameMapEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeNameMapVolumeNameMapEntry) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if m.Value != nil { - - if swag.IsZero(m.Value) { // not required - return nil - } - - if err := m.Value.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("value") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("value") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeNameMapVolumeNameMapEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeNameMapVolumeNameMapEntry) UnmarshalBinary(b []byte) error { - var res VolumeNameMapVolumeNameMapEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/volume_security_info.go b/v1/models/volume_security_info.go deleted file mode 100644 index 5215d7b3..00000000 --- a/v1/models/volume_security_info.go +++ /dev/null @@ -1,131 +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" -) - -// VolumeSecurityInfo Volume Security Information. -// -// Specifies information about NetApp volume security settings. -// -// swagger:model VolumeSecurityInfo -type VolumeSecurityInfo struct { - - // Specifies the Unix group ID for this volume. 0 indicates the root id. - GroupID *int32 `json:"groupId,omitempty"` - - // Specifies the Unix permission bits in octal string format. - Permissions *string `json:"permissions,omitempty"` - - // Specifies the security style associated with this volume. - // Specifies the type of a NetApp Volume. - // 'kUnix' indicates Unix-style security. - // 'kNtfs' indicates Windows NTFS-style security. - // 'kMixed' indicates mixed-style security. - // 'kUnified' indicates Unified-style security. - // 'kUnknown' indicates the security style is unknown. - // Enum: ["kUnix","kNtfs","kMixed","kUnified","kUnknown"] - Style *string `json:"style,omitempty"` - - // Specifies the Unix user id for this volume. 0 indicates the root id. - UserID *int32 `json:"userId,omitempty"` -} - -// Validate validates this volume security info -func (m *VolumeSecurityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStyle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var volumeSecurityInfoTypeStylePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUnix","kNtfs","kMixed","kUnified","kUnknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - volumeSecurityInfoTypeStylePropEnum = append(volumeSecurityInfoTypeStylePropEnum, v) - } -} - -const ( - - // VolumeSecurityInfoStyleKUnix captures enum value "kUnix" - VolumeSecurityInfoStyleKUnix string = "kUnix" - - // VolumeSecurityInfoStyleKNtfs captures enum value "kNtfs" - VolumeSecurityInfoStyleKNtfs string = "kNtfs" - - // VolumeSecurityInfoStyleKMixed captures enum value "kMixed" - VolumeSecurityInfoStyleKMixed string = "kMixed" - - // VolumeSecurityInfoStyleKUnified captures enum value "kUnified" - VolumeSecurityInfoStyleKUnified string = "kUnified" - - // VolumeSecurityInfoStyleKUnknown captures enum value "kUnknown" - VolumeSecurityInfoStyleKUnknown string = "kUnknown" -) - -// prop value enum -func (m *VolumeSecurityInfo) validateStyleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, volumeSecurityInfoTypeStylePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VolumeSecurityInfo) validateStyle(formats strfmt.Registry) error { - if swag.IsZero(m.Style) { // not required - return nil - } - - // value enum - if err := m.validateStyleEnum("style", "body", *m.Style); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this volume security info based on context it is used -func (m *VolumeSecurityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeSecurityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeSecurityInfo) UnmarshalBinary(b []byte) error { - var res VolumeSecurityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vserver_info.go b/v1/models/vserver_info.go deleted file mode 100644 index 9f50806f..00000000 --- a/v1/models/vserver_info.go +++ /dev/null @@ -1,255 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VserverInfo Proto that contains specific information about a vserver in a Netapp -// cluster. -// -// swagger:model VserverInfo -type VserverInfo struct { - - // The data protocols supported by this vserver. kManagement protocol does - // not show in this vector. - DataProtocolVec []int32 `json:"dataProtocolVec"` - - // Information about all interfaces on this vserver. - InterfaceVec []*VserverInfoNetworkInterfaceInfo `json:"interfaceVec"` - - // Whether the vserver has enabled NFSv3 protocol. - // TODO(akarsh) : Remove this after enough soak time for NFSv4.1 workflow. - Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty"` - - // Whether the vserver has enabled NFSv4.1 protocol. - // TODO(akarsh) : Remove this after enough soak time for NFSv4.1 workflow. - Nfsv41Enabled *bool `json:"nfsv41Enabled,omitempty"` - - // The root 'c$' cifs share of this vserver. If exists it can be used to - // mount all CIFS volumes that are junctioned under '/' on this vserver. - RootCifsShare *PrivateCifsShareInfo `json:"rootCifsShare,omitempty"` - - // The smb krb5 hostname. - SmbKrb5Hostname *string `json:"smbKrb5Hostname,omitempty"` - - // The type of this vserver. - Type *int32 `json:"type,omitempty"` - - // Volumes managed by this VServer. Only populated for virtualized storage - // snapshots backup. - VolumeInfoVec []*PrivateNetappEntity `json:"volumeInfoVec"` -} - -// Validate validates this vserver info -func (m *VserverInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaceVec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootCifsShare(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VserverInfo) validateInterfaceVec(formats strfmt.Registry) error { - if swag.IsZero(m.InterfaceVec) { // not required - return nil - } - - for i := 0; i < len(m.InterfaceVec); i++ { - if swag.IsZero(m.InterfaceVec[i]) { // not required - continue - } - - if m.InterfaceVec[i] != nil { - if err := m.InterfaceVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VserverInfo) validateRootCifsShare(formats strfmt.Registry) error { - if swag.IsZero(m.RootCifsShare) { // not required - return nil - } - - if m.RootCifsShare != nil { - if err := m.RootCifsShare.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootCifsShare") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootCifsShare") - } - return err - } - } - - return nil -} - -func (m *VserverInfo) validateVolumeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.VolumeInfoVec); i++ { - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - continue - } - - if m.VolumeInfoVec[i] != nil { - if err := m.VolumeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vserver info based on the context it is used -func (m *VserverInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaceVec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRootCifsShare(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VserverInfo) contextValidateInterfaceVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InterfaceVec); i++ { - - if m.InterfaceVec[i] != nil { - - if swag.IsZero(m.InterfaceVec[i]) { // not required - return nil - } - - if err := m.InterfaceVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VserverInfo) contextValidateRootCifsShare(ctx context.Context, formats strfmt.Registry) error { - - if m.RootCifsShare != nil { - - if swag.IsZero(m.RootCifsShare) { // not required - return nil - } - - if err := m.RootCifsShare.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootCifsShare") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootCifsShare") - } - return err - } - } - - return nil -} - -func (m *VserverInfo) contextValidateVolumeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeInfoVec); i++ { - - if m.VolumeInfoVec[i] != nil { - - if swag.IsZero(m.VolumeInfoVec[i]) { // not required - return nil - } - - if err := m.VolumeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VserverInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VserverInfo) UnmarshalBinary(b []byte) error { - var res VserverInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vserver_info_network_interface_info.go b/v1/models/vserver_info_network_interface_info.go deleted file mode 100644 index c3f9066d..00000000 --- a/v1/models/vserver_info_network_interface_info.go +++ /dev/null @@ -1,68 +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" -) - -// VserverInfoNetworkInterfaceInfo Proto that contains information about a logical network interface on a -// Netapp vserver. The interface's IP address is the mount point for a -// specific data protocol, such as NFS or CIFS. -// -// swagger:model VserverInfo_NetworkInterfaceInfo -type VserverInfoNetworkInterfaceInfo struct { - - // The data protocols supported by this interface. This could be a subset - // of all the data protocols supported by the vserver, plus kManagement. - DataProtocolVec []int32 `json:"dataProtocolVec"` - - // The FQDN of this interface. - Fqdn *string `json:"fqdn,omitempty"` - - // The IP address of this interface. - IPAddress *string `json:"ipAddress,omitempty"` - - // Whether kerberos for nfs protocol is enabled for this interface or not. - KerberosEnabled *bool `json:"kerberosEnabled,omitempty"` - - // The name of this interface. - Name *string `json:"name,omitempty"` - - // The operational status of this interface. - OperationalStatus *int32 `json:"operationalStatus,omitempty"` -} - -// Validate validates this vserver info network interface info -func (m *VserverInfoNetworkInterfaceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vserver info network interface info based on context it is used -func (m *VserverInfoNetworkInterfaceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VserverInfoNetworkInterfaceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VserverInfoNetworkInterfaceInfo) UnmarshalBinary(b []byte) error { - var res VserverInfoNetworkInterfaceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vserver_network_interface.go b/v1/models/vserver_network_interface.go deleted file mode 100644 index af80e944..00000000 --- a/v1/models/vserver_network_interface.go +++ /dev/null @@ -1,120 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VserverNetworkInterface Vserver Network Interface. -// -// Specifies information about a logical network interface on a -// NetApp Vserver. The interface's IP address is the mount point for a -// specific data protocol, such as NFS or CIFS. -// -// swagger:model VserverNetworkInterface -type VserverNetworkInterface struct { - - // Array of Data Protocols. - // - // Specifies the set of data protocols supported by this interface. - // 'kNfs' indicates NFS connections. - // 'kCifs' indicates SMB (CIFS) connections. - // 'kIscsi' indicates iSCSI connections. - // 'kFc' indicates Fiber Channel connections. - // 'kFcache' indicates Flex Cache connections. - // 'kHttp' indicates HTTP connections. - // 'kNdmp' indicates NDMP connections. - // 'kManagement' indicates non-data connections used for management purposes. - // 'kNvme' indicates NVMe connections. - DataProtocols []string `json:"dataProtocols"` - - // Specifies the IP address of this interface. - IPAddress *string `json:"ipAddress,omitempty"` - - // Specifies the name of this interface. - Name *string `json:"name,omitempty"` -} - -// Validate validates this vserver network interface -func (m *VserverNetworkInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vserverNetworkInterfaceDataProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vserverNetworkInterfaceDataProtocolsItemsEnum = append(vserverNetworkInterfaceDataProtocolsItemsEnum, v) - } -} - -func (m *VserverNetworkInterface) validateDataProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vserverNetworkInterfaceDataProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *VserverNetworkInterface) validateDataProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.DataProtocols) { // not required - return nil - } - - for i := 0; i < len(m.DataProtocols); i++ { - - // value enum - if err := m.validateDataProtocolsItemsEnum("dataProtocols"+"."+strconv.Itoa(i), "body", m.DataProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this vserver network interface based on context it is used -func (m *VserverNetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VserverNetworkInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VserverNetworkInterface) UnmarshalBinary(b []byte) error { - var res VserverNetworkInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vss_writer.go b/v1/models/vss_writer.go deleted file mode 100644 index 851cebfb..00000000 --- a/v1/models/vss_writer.go +++ /dev/null @@ -1,55 +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" -) - -// VssWriter Vss Writer. -// -// Specifies vss writer information about a Physical Protection Source. -// -// swagger:model VssWriter -type VssWriter struct { - - // If true, the writer will be excluded by default. - IsWriterExcluded *bool `json:"isWriterExcluded,omitempty"` - - // Specifies the name of the writer. - WriterName *string `json:"writerName,omitempty"` -} - -// Validate validates this vss writer -func (m *VssWriter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vss writer based on context it is used -func (m *VssWriter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VssWriter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VssWriter) UnmarshalBinary(b []byte) error { - var res VssWriter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/web_hook_delivery_target.go b/v1/models/web_hook_delivery_target.go deleted file mode 100644 index 44bc6260..00000000 --- a/v1/models/web_hook_delivery_target.go +++ /dev/null @@ -1,54 +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" -) - -// WebHookDeliveryTarget WebHookDeliveryTarget -// Specifies the external api url to hit along with the related options for it. -// -// swagger:model WebHookDeliveryTarget -type WebHookDeliveryTarget struct { - - // Specifies curl options used to invoke external api url defined above. - CurlOptions *string `json:"curlOptions,omitempty"` - - // external Api Url - ExternalAPIURL *string `json:"externalApiUrl,omitempty"` -} - -// Validate validates this web hook delivery target -func (m *WebHookDeliveryTarget) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this web hook delivery target based on context it is used -func (m *WebHookDeliveryTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WebHookDeliveryTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WebHookDeliveryTarget) UnmarshalBinary(b []byte) error { - var res WebHookDeliveryTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/windows_host_snapshot_parameters.go b/v1/models/windows_host_snapshot_parameters.go deleted file mode 100644 index f60b2f82..00000000 --- a/v1/models/windows_host_snapshot_parameters.go +++ /dev/null @@ -1,68 +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" -) - -// WindowsHostSnapshotParameters Windows Host Snapshot Parameters. -// -// Specifies settings that are meaningful only on Windows hosts. -// -// swagger:model WindowsHostSnapshotParameters -type WindowsHostSnapshotParameters struct { - - // Specifies whether to backup regardless of the state of each file's - // backup history. Backup history will not be updated. Refer Microsoft - // documentation on VSS_BT_COPY. - CopyOnlyBackup *bool `json:"copyOnlyBackup,omitempty"` - - // Specifies whether to disable fetching and storing of some metadata - // on Cohesity Cluster to save storage space. Otherwise, there will be - // some metadata fetched and stored on Cohesity Cluster. - DisableMetadata *bool `json:"disableMetadata,omitempty"` - - // Specifies whether to disable some notification steps when taking - // snapshots. - DisableNotification *bool `json:"disableNotification,omitempty"` - - // Specifies a list of Windows VSS writers that are excluded from backups. - // For example, "ASR Writer", "System Writer". Refer Microsoft documentaion - // for a complete list. - ExcludedVssWriters []string `json:"excludedVssWriters"` -} - -// Validate validates this windows host snapshot parameters -func (m *WindowsHostSnapshotParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this windows host snapshot parameters based on context it is used -func (m *WindowsHostSnapshotParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WindowsHostSnapshotParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WindowsHostSnapshotParameters) UnmarshalBinary(b []byte) error { - var res WindowsHostSnapshotParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/worm_retention_proto.go b/v1/models/worm_retention_proto.go deleted file mode 100644 index 9a2a80d0..00000000 --- a/v1/models/worm_retention_proto.go +++ /dev/null @@ -1,70 +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" -) - -// WormRetentionProto Message that specifies the WORM attributes. WORM attributes can be -// associated with any of the following: -// 1. backup policy: compliance or administrative policy with worm retention. -// 2. backup runs: worm retention inherited from policy at successful backup -// run completion.. -// 3. backup tasks do not inherit WORM retention. Instead they check for WORM -// property on the corresponding backup run. -// There are no WORM attributes associated with the backup job. -// -// swagger:model WormRetentionProto -type WormRetentionProto struct { - - // Whether objects in the external target associated with this policy need to - // be made immutable. - EnableWormOnExternalTarget *bool `json:"enableWormOnExternalTarget,omitempty"` - - // The type of WORM policy set on this run. This field is irrelevant - // while objects are on legal hold. Objects put on legal hold automatically - // raise the WORM level on the object behaviorally to the strictest level - // i.e. kCompliance. - PolicyType *int32 `json:"policyType,omitempty"` - - // Retention time for datalock in seconds. This will be always relative time. - RetentionSecs *int64 `json:"retentionSecs,omitempty"` - - // Version number for this proto. - Version *int32 `json:"version,omitempty"` -} - -// Validate validates this worm retention proto -func (m *WormRetentionProto) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this worm retention proto based on context it is used -func (m *WormRetentionProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WormRetentionProto) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WormRetentionProto) UnmarshalBinary(b []byte) error { - var res WormRetentionProto - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/yoda_file_search_result.go b/v1/models/yoda_file_search_result.go deleted file mode 100644 index d5a1b92b..00000000 --- a/v1/models/yoda_file_search_result.go +++ /dev/null @@ -1,162 +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" -) - -// YodaFileSearchResult FileSearchResult wraps a cracked file object from Yoda/ElasticSearch and -// processes some fields to be consumed by the UI. -// -// swagger:model YodaFileSearchResult -type YodaFileSearchResult struct { - - // FileDocument represents an entry for a job/filename pair. - FileDocument *CrackedFileDocument `json:"fileDocument,omitempty"` - - // RegisteredSource is the protobuf for the top-level vCenter registered - // source. - RegisteredSource *PrivateEntityProto `json:"registeredSource,omitempty"` -} - -// Validate validates this yoda file search result -func (m *YodaFileSearchResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileDocument(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegisteredSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *YodaFileSearchResult) validateFileDocument(formats strfmt.Registry) error { - if swag.IsZero(m.FileDocument) { // not required - return nil - } - - if m.FileDocument != nil { - if err := m.FileDocument.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileDocument") - } - return err - } - } - - return nil -} - -func (m *YodaFileSearchResult) validateRegisteredSource(formats strfmt.Registry) error { - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if m.RegisteredSource != nil { - if err := m.RegisteredSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -// ContextValidate validate this yoda file search result based on the context it is used -func (m *YodaFileSearchResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileDocument(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegisteredSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *YodaFileSearchResult) contextValidateFileDocument(ctx context.Context, formats strfmt.Registry) error { - - if m.FileDocument != nil { - - if swag.IsZero(m.FileDocument) { // not required - return nil - } - - if err := m.FileDocument.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileDocument") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileDocument") - } - return err - } - } - - return nil -} - -func (m *YodaFileSearchResult) contextValidateRegisteredSource(ctx context.Context, formats strfmt.Registry) error { - - if m.RegisteredSource != nil { - - if swag.IsZero(m.RegisteredSource) { // not required - return nil - } - - if err := m.RegisteredSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredSource") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *YodaFileSearchResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *YodaFileSearchResult) UnmarshalBinary(b []byte) error { - var res YodaFileSearchResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/zone_config.go b/v1/models/zone_config.go deleted file mode 100644 index aba839ca..00000000 --- a/v1/models/zone_config.go +++ /dev/null @@ -1,220 +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" -) - -// ZoneConfig Specifies the access zone config of the Isilon Access Zone. -// -// swagger:model ZoneConfig -type ZoneConfig struct { - - // Specifies the Dynamic network pool configuration for the Access Zone. - // Dynamic pool is used for stateless protocols, e.g. NFSv3. - DynamicNetworkPoolConfig *NetworkPoolConfig `json:"dynamicNetworkPoolConfig,omitempty"` - - // Specifies the name of the Access Zone's groupnet. - Groupnet *string `json:"groupnet,omitempty"` - - // Specifies the name of the Access Zone. - Name *string `json:"name,omitempty"` - - // SMB credentials for the Access Zone. - SmbCredentials *NasMountCredentialParams `json:"smbCredentials,omitempty"` - - // Specifies the Static network pool configuration for the Access Zone. Static - // pool is used for stateful protocols: e.g. SMB, NFSv4, and for stateless - // protocols e.g. NFSv3 if dynamic pool below is not set. - StaticNetworkPoolConfig *NetworkPoolConfig `json:"staticNetworkPoolConfig,omitempty"` -} - -// Validate validates this zone config -func (m *ZoneConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDynamicNetworkPoolConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStaticNetworkPoolConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneConfig) validateDynamicNetworkPoolConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DynamicNetworkPoolConfig) { // not required - return nil - } - - if m.DynamicNetworkPoolConfig != nil { - if err := m.DynamicNetworkPoolConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicNetworkPoolConfig") - } - return err - } - } - - return nil -} - -func (m *ZoneConfig) validateSmbCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if m.SmbCredentials != nil { - if err := m.SmbCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *ZoneConfig) validateStaticNetworkPoolConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StaticNetworkPoolConfig) { // not required - return nil - } - - if m.StaticNetworkPoolConfig != nil { - if err := m.StaticNetworkPoolConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("staticNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("staticNetworkPoolConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this zone config based on the context it is used -func (m *ZoneConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDynamicNetworkPoolConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStaticNetworkPoolConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneConfig) contextValidateDynamicNetworkPoolConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DynamicNetworkPoolConfig != nil { - - if swag.IsZero(m.DynamicNetworkPoolConfig) { // not required - return nil - } - - if err := m.DynamicNetworkPoolConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicNetworkPoolConfig") - } - return err - } - } - - return nil -} - -func (m *ZoneConfig) contextValidateSmbCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbCredentials != nil { - - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if err := m.SmbCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *ZoneConfig) contextValidateStaticNetworkPoolConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StaticNetworkPoolConfig != nil { - - if swag.IsZero(m.StaticNetworkPoolConfig) { // not required - return nil - } - - if err := m.StaticNetworkPoolConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("staticNetworkPoolConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("staticNetworkPoolConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ZoneConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ZoneConfig) UnmarshalBinary(b []byte) error { - var res ZoneConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/zone_info.go b/v1/models/zone_info.go deleted file mode 100644 index 19704295..00000000 --- a/v1/models/zone_info.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ZoneInfo Proto that contains information about an access zone. -// -// swagger:model ZoneInfo -type ZoneInfo struct { - - // The groupnet name for this zone. - Groupnet *string `json:"groupnet,omitempty"` - - // The string ID of this zone. - ID *string `json:"id,omitempty"` - - // Network pools associated with this zone. - NetworkPools []*ZoneInfoNetworkPool `json:"networkPools"` - - // The path of this zone in ifs. This should include the leading "/ifs/". - Path *string `json:"path,omitempty"` - - // The numeric ID of this zone. - ZoneID *int64 `json:"zoneId,omitempty"` -} - -// Validate validates this zone info -func (m *ZoneInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkPools(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneInfo) validateNetworkPools(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkPools) { // not required - return nil - } - - for i := 0; i < len(m.NetworkPools); i++ { - if swag.IsZero(m.NetworkPools[i]) { // not required - continue - } - - if m.NetworkPools[i] != nil { - if err := m.NetworkPools[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this zone info based on the context it is used -func (m *ZoneInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkPools(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneInfo) contextValidateNetworkPools(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NetworkPools); i++ { - - if m.NetworkPools[i] != nil { - - if swag.IsZero(m.NetworkPools[i]) { // not required - return nil - } - - if err := m.NetworkPools[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ZoneInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ZoneInfo) UnmarshalBinary(b []byte) error { - var res ZoneInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/zone_info_network_pool.go b/v1/models/zone_info_network_pool.go deleted file mode 100644 index 34a08131..00000000 --- a/v1/models/zone_info_network_pool.go +++ /dev/null @@ -1,145 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ZoneInfoNetworkPool zone info network pool -// -// swagger:model ZoneInfo_NetworkPool -type ZoneInfoNetworkPool struct { - - // Name of a valid access zone to map IP address pool to the zone. - AccessZone *string `json:"accessZone,omitempty"` - - // IP address format. - AddrFamily *int32 `json:"addrFamily,omitempty"` - - // Specifies how IP address allocation is done among pool members. - AllocMethod *int32 `json:"allocMethod,omitempty"` - - // Name of the groupnet this pool belongs to. - Groupnet *string `json:"groupnet,omitempty"` - - // Unique Pool ID. - ID *string `json:"id,omitempty"` - - // The name of the pool. - Name *string `json:"name,omitempty"` - - // List of IP address ranges in this pool. - Ranges []*ZoneInfoNetworkPoolRange `json:"ranges"` - - // SmartConnect zone name for the pool. - ScDNSZone *string `json:"scDnsZone,omitempty"` - - // The name of the subnet. - Subnet *string `json:"subnet,omitempty"` -} - -// Validate validates this zone info network pool -func (m *ZoneInfoNetworkPool) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneInfoNetworkPool) validateRanges(formats strfmt.Registry) error { - if swag.IsZero(m.Ranges) { // not required - return nil - } - - for i := 0; i < len(m.Ranges); i++ { - if swag.IsZero(m.Ranges[i]) { // not required - continue - } - - if m.Ranges[i] != nil { - if err := m.Ranges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ranges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ranges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this zone info network pool based on the context it is used -func (m *ZoneInfoNetworkPool) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ZoneInfoNetworkPool) contextValidateRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ranges); i++ { - - if m.Ranges[i] != nil { - - if swag.IsZero(m.Ranges[i]) { // not required - return nil - } - - if err := m.Ranges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ranges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ranges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ZoneInfoNetworkPool) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ZoneInfoNetworkPool) UnmarshalBinary(b []byte) error { - var res ZoneInfoNetworkPool - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/zone_info_network_pool_range.go b/v1/models/zone_info_network_pool_range.go deleted file mode 100644 index 7db33cc4..00000000 --- a/v1/models/zone_info_network_pool_range.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" -) - -// ZoneInfoNetworkPoolRange IP address range. -// -// swagger:model ZoneInfo_NetworkPool_Range -type ZoneInfoNetworkPoolRange struct { - - // High IP. - High *string `json:"high,omitempty"` - - // Low IP. - Low *string `json:"low,omitempty"` -} - -// Validate validates this zone info network pool range -func (m *ZoneInfoNetworkPoolRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this zone info network pool range based on context it is used -func (m *ZoneInfoNetworkPoolRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ZoneInfoNetworkPoolRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ZoneInfoNetworkPoolRange) UnmarshalBinary(b []byte) error { - var res ZoneInfoNetworkPoolRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/client/access_token/access_token_client.go b/v2/client/access_token/access_token_client.go deleted file mode 100644 index 65a460f0..00000000 --- a/v2/client/access_token/access_token_client.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_token - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new access token API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new access token API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new access token API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for access token API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateAccessToken(params *CreateAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAccessTokenCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CreateAccessToken creates a new API access token - - Before making other REST API requests, your REST client must make a an access token request with a valid Cohesity username and password. This POST request returns an access token and type in the response that is generated by the Cohesity Cluster. Subsequent requests to other Cohesity REST API operations must specify the returned access token and type by setting 'Authorization' in the http header in the following format: - -Authorization: token_type access_token -The generated token is valid for 24 hours. If a request is made with an expired token, the 'Token expired' error message is returned. Add code to your REST client to check for this error and request another access token before reissuing the request. -*/ -func (a *Client) CreateAccessToken(params *CreateAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAccessTokenCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateAccessTokenParams() - } - op := &runtime.ClientOperation{ - ID: "CreateAccessToken", - Method: "POST", - PathPattern: "/access-tokens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateAccessTokenReader{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.(*CreateAccessTokenCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateAccessTokenDefault) - 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/v2/client/access_token/create_access_token_parameters.go b/v2/client/access_token/create_access_token_parameters.go deleted file mode 100644 index 4860e819..00000000 --- a/v2/client/access_token/create_access_token_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_token - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateAccessTokenParams creates a new CreateAccessTokenParams 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 NewCreateAccessTokenParams() *CreateAccessTokenParams { - return &CreateAccessTokenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAccessTokenParamsWithTimeout creates a new CreateAccessTokenParams object -// with the ability to set a timeout on a request. -func NewCreateAccessTokenParamsWithTimeout(timeout time.Duration) *CreateAccessTokenParams { - return &CreateAccessTokenParams{ - timeout: timeout, - } -} - -// NewCreateAccessTokenParamsWithContext creates a new CreateAccessTokenParams object -// with the ability to set a context for a request. -func NewCreateAccessTokenParamsWithContext(ctx context.Context) *CreateAccessTokenParams { - return &CreateAccessTokenParams{ - Context: ctx, - } -} - -// NewCreateAccessTokenParamsWithHTTPClient creates a new CreateAccessTokenParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAccessTokenParamsWithHTTPClient(client *http.Client) *CreateAccessTokenParams { - return &CreateAccessTokenParams{ - HTTPClient: client, - } -} - -/* -CreateAccessTokenParams contains all the parameters to send to the API endpoint - - for the create access token operation. - - Typically these are written to a http.Request. -*/ -type CreateAccessTokenParams struct { - - /* Body. - - Specifies the parameters to generate an access token - */ - Body *models.CreateAccessTokenRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAccessTokenParams) WithDefaults() *CreateAccessTokenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAccessTokenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create access token params -func (o *CreateAccessTokenParams) WithTimeout(timeout time.Duration) *CreateAccessTokenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create access token params -func (o *CreateAccessTokenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create access token params -func (o *CreateAccessTokenParams) WithContext(ctx context.Context) *CreateAccessTokenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create access token params -func (o *CreateAccessTokenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create access token params -func (o *CreateAccessTokenParams) WithHTTPClient(client *http.Client) *CreateAccessTokenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create access token params -func (o *CreateAccessTokenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create access token params -func (o *CreateAccessTokenParams) WithBody(body *models.CreateAccessTokenRequestParams) *CreateAccessTokenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create access token params -func (o *CreateAccessTokenParams) SetBody(body *models.CreateAccessTokenRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAccessTokenParams) 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/access_token/create_access_token_responses.go b/v2/client/access_token/create_access_token_responses.go deleted file mode 100644 index 1eb85645..00000000 --- a/v2/client/access_token/create_access_token_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package access_token - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateAccessTokenReader is a Reader for the CreateAccessToken structure. -type CreateAccessTokenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAccessTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAccessTokenCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateAccessTokenDefault(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 - } -} - -// NewCreateAccessTokenCreated creates a CreateAccessTokenCreated with default headers values -func NewCreateAccessTokenCreated() *CreateAccessTokenCreated { - return &CreateAccessTokenCreated{} -} - -/* -CreateAccessTokenCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateAccessTokenCreated struct { - Payload *models.AccessTokenResponse -} - -// IsSuccess returns true when this create access token created response has a 2xx status code -func (o *CreateAccessTokenCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create access token created response has a 3xx status code -func (o *CreateAccessTokenCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create access token created response has a 4xx status code -func (o *CreateAccessTokenCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create access token created response has a 5xx status code -func (o *CreateAccessTokenCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create access token created response a status code equal to that given -func (o *CreateAccessTokenCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create access token created response -func (o *CreateAccessTokenCreated) Code() int { - return 201 -} - -func (o *CreateAccessTokenCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /access-tokens][%d] createAccessTokenCreated %s", 201, payload) -} - -func (o *CreateAccessTokenCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /access-tokens][%d] createAccessTokenCreated %s", 201, payload) -} - -func (o *CreateAccessTokenCreated) GetPayload() *models.AccessTokenResponse { - return o.Payload -} - -func (o *CreateAccessTokenCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AccessTokenResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAccessTokenDefault creates a CreateAccessTokenDefault with default headers values -func NewCreateAccessTokenDefault(code int) *CreateAccessTokenDefault { - return &CreateAccessTokenDefault{ - _statusCode: code, - } -} - -/* -CreateAccessTokenDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateAccessTokenDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create access token default response has a 2xx status code -func (o *CreateAccessTokenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create access token default response has a 3xx status code -func (o *CreateAccessTokenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create access token default response has a 4xx status code -func (o *CreateAccessTokenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create access token default response has a 5xx status code -func (o *CreateAccessTokenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create access token default response a status code equal to that given -func (o *CreateAccessTokenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create access token default response -func (o *CreateAccessTokenDefault) Code() int { - return o._statusCode -} - -func (o *CreateAccessTokenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /access-tokens][%d] CreateAccessToken default %s", o._statusCode, payload) -} - -func (o *CreateAccessTokenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /access-tokens][%d] CreateAccessToken default %s", o._statusCode, payload) -} - -func (o *CreateAccessTokenDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateAccessTokenDefault) 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/active_directory/active_directory_client.go b/v2/client/active_directory/active_directory_client.go deleted file mode 100644 index bb55bec9..00000000 --- a/v2/client/active_directory/active_directory_client.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new active directory API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new active directory API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new active directory API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for active directory API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateActiveDirectory(params *CreateActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateActiveDirectoryCreated, error) - - DeleteActiveDirectory(params *DeleteActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteActiveDirectoryNoContent, error) - - GetActiveDirectory(params *GetActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryOK, error) - - GetActiveDirectoryByID(params *GetActiveDirectoryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryByIDOK, error) - - GetCentrifyZones(params *GetCentrifyZonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCentrifyZonesOK, error) - - GetDomainControllers(params *GetDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDomainControllersOK, error) - - GetTrustedDomains(params *GetTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTrustedDomainsOK, error) - - TriggerTrustedDomainsDiscovery(params *TriggerTrustedDomainsDiscoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TriggerTrustedDomainsDiscoveryAccepted, error) - - UpdateActiveDirectory(params *UpdateActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryOK, error) - - UpdateTrustedDomains(params *UpdateTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTrustedDomainsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateActiveDirectory creates an active directory - -Create an Active Directory. -*/ -func (a *Client) CreateActiveDirectory(params *CreateActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateActiveDirectoryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateActiveDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "CreateActiveDirectory", - Method: "POST", - PathPattern: "/active-directories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateActiveDirectoryReader{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.(*CreateActiveDirectoryCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateActiveDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteActiveDirectory deletes an active directory - -Delete an Active Directory. -*/ -func (a *Client) DeleteActiveDirectory(params *DeleteActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteActiveDirectoryNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteActiveDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteActiveDirectory", - Method: "DELETE", - PathPattern: "/active-directories/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteActiveDirectoryReader{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.(*DeleteActiveDirectoryNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteActiveDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetActiveDirectory gets the list of active directories - -Get the list of Active Directories. -*/ -func (a *Client) GetActiveDirectory(params *GetActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveDirectory", - Method: "GET", - PathPattern: "/active-directories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveDirectoryReader{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.(*GetActiveDirectoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetActiveDirectoryByID gets an active directory by id - -Get an Active Directory by id. -*/ -func (a *Client) GetActiveDirectoryByID(params *GetActiveDirectoryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveDirectoryByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveDirectoryByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveDirectoryById", - Method: "GET", - PathPattern: "/active-directories/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveDirectoryByIDReader{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.(*GetActiveDirectoryByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveDirectoryByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCentrifyZones gets centrify zones - -Get Centrify zones for a specified domain. -*/ -func (a *Client) GetCentrifyZones(params *GetCentrifyZonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCentrifyZonesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCentrifyZonesParams() - } - op := &runtime.ClientOperation{ - ID: "GetCentrifyZones", - Method: "GET", - PathPattern: "/centrify-zones", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCentrifyZonesReader{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.(*GetCentrifyZonesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCentrifyZonesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDomainControllers gets domain controllers of specified domains - -Get Domain Controllers of specified domains. -*/ -func (a *Client) GetDomainControllers(params *GetDomainControllersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDomainControllersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDomainControllersParams() - } - op := &runtime.ClientOperation{ - ID: "GetDomainControllers", - Method: "GET", - PathPattern: "/domain-controllers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDomainControllersReader{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.(*GetDomainControllersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDomainControllersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTrustedDomains gets trusted domains - -Get Trusted Domains for a specified domain. -*/ -func (a *Client) GetTrustedDomains(params *GetTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTrustedDomainsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTrustedDomainsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTrustedDomains", - Method: "GET", - PathPattern: "/trusted-domains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTrustedDomainsReader{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.(*GetTrustedDomainsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTrustedDomainsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -TriggerTrustedDomainsDiscovery rediscovers trusted domains - -Re-trigger the trusted domains of an Active Directory. -*/ -func (a *Client) TriggerTrustedDomainsDiscovery(params *TriggerTrustedDomainsDiscoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TriggerTrustedDomainsDiscoveryAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewTriggerTrustedDomainsDiscoveryParams() - } - op := &runtime.ClientOperation{ - ID: "TriggerTrustedDomainsDiscovery", - Method: "PUT", - PathPattern: "/trusted-domains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &TriggerTrustedDomainsDiscoveryReader{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.(*TriggerTrustedDomainsDiscoveryAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*TriggerTrustedDomainsDiscoveryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateActiveDirectory updates an active directory - -Update an Active Directory. -*/ -func (a *Client) UpdateActiveDirectory(params *UpdateActiveDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateActiveDirectoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateActiveDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateActiveDirectory", - Method: "PUT", - PathPattern: "/active-directories/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateActiveDirectoryReader{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.(*UpdateActiveDirectoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateActiveDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTrustedDomains updates trusted domains - -To update trusted domains of an Active Directory. -*/ -func (a *Client) UpdateTrustedDomains(params *UpdateTrustedDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTrustedDomainsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTrustedDomainsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTrustedDomains", - Method: "POST", - PathPattern: "/trusted-domains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTrustedDomainsReader{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.(*UpdateTrustedDomainsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTrustedDomainsDefault) - 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/v2/client/active_directory/create_active_directory_parameters.go b/v2/client/active_directory/create_active_directory_parameters.go deleted file mode 100644 index 4f0a8f65..00000000 --- a/v2/client/active_directory/create_active_directory_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateActiveDirectoryParams creates a new CreateActiveDirectoryParams 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 NewCreateActiveDirectoryParams() *CreateActiveDirectoryParams { - return &CreateActiveDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateActiveDirectoryParamsWithTimeout creates a new CreateActiveDirectoryParams object -// with the ability to set a timeout on a request. -func NewCreateActiveDirectoryParamsWithTimeout(timeout time.Duration) *CreateActiveDirectoryParams { - return &CreateActiveDirectoryParams{ - timeout: timeout, - } -} - -// NewCreateActiveDirectoryParamsWithContext creates a new CreateActiveDirectoryParams object -// with the ability to set a context for a request. -func NewCreateActiveDirectoryParamsWithContext(ctx context.Context) *CreateActiveDirectoryParams { - return &CreateActiveDirectoryParams{ - Context: ctx, - } -} - -// NewCreateActiveDirectoryParamsWithHTTPClient creates a new CreateActiveDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateActiveDirectoryParamsWithHTTPClient(client *http.Client) *CreateActiveDirectoryParams { - return &CreateActiveDirectoryParams{ - HTTPClient: client, - } -} - -/* -CreateActiveDirectoryParams contains all the parameters to send to the API endpoint - - for the create active directory operation. - - Typically these are written to a http.Request. -*/ -type CreateActiveDirectoryParams struct { - - /* Body. - - Specifies the parameters to create an Active Directory. - */ - Body *models.CreateActiveDirectoryRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateActiveDirectoryParams) WithDefaults() *CreateActiveDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateActiveDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create active directory params -func (o *CreateActiveDirectoryParams) WithTimeout(timeout time.Duration) *CreateActiveDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create active directory params -func (o *CreateActiveDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create active directory params -func (o *CreateActiveDirectoryParams) WithContext(ctx context.Context) *CreateActiveDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create active directory params -func (o *CreateActiveDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create active directory params -func (o *CreateActiveDirectoryParams) WithHTTPClient(client *http.Client) *CreateActiveDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create active directory params -func (o *CreateActiveDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create active directory params -func (o *CreateActiveDirectoryParams) WithBody(body *models.CreateActiveDirectoryRequest) *CreateActiveDirectoryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create active directory params -func (o *CreateActiveDirectoryParams) SetBody(body *models.CreateActiveDirectoryRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateActiveDirectoryParams) 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/active_directory/create_active_directory_responses.go b/v2/client/active_directory/create_active_directory_responses.go deleted file mode 100644 index b76cce55..00000000 --- a/v2/client/active_directory/create_active_directory_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateActiveDirectoryReader is a Reader for the CreateActiveDirectory structure. -type CreateActiveDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateActiveDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateActiveDirectoryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateActiveDirectoryDefault(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 - } -} - -// NewCreateActiveDirectoryCreated creates a CreateActiveDirectoryCreated with default headers values -func NewCreateActiveDirectoryCreated() *CreateActiveDirectoryCreated { - return &CreateActiveDirectoryCreated{} -} - -/* -CreateActiveDirectoryCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateActiveDirectoryCreated struct { - Payload *models.ActiveDirectory -} - -// IsSuccess returns true when this create active directory created response has a 2xx status code -func (o *CreateActiveDirectoryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create active directory created response has a 3xx status code -func (o *CreateActiveDirectoryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create active directory created response has a 4xx status code -func (o *CreateActiveDirectoryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create active directory created response has a 5xx status code -func (o *CreateActiveDirectoryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create active directory created response a status code equal to that given -func (o *CreateActiveDirectoryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create active directory created response -func (o *CreateActiveDirectoryCreated) Code() int { - return 201 -} - -func (o *CreateActiveDirectoryCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /active-directories][%d] createActiveDirectoryCreated %s", 201, payload) -} - -func (o *CreateActiveDirectoryCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /active-directories][%d] createActiveDirectoryCreated %s", 201, payload) -} - -func (o *CreateActiveDirectoryCreated) GetPayload() *models.ActiveDirectory { - return o.Payload -} - -func (o *CreateActiveDirectoryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectory) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateActiveDirectoryDefault creates a CreateActiveDirectoryDefault with default headers values -func NewCreateActiveDirectoryDefault(code int) *CreateActiveDirectoryDefault { - return &CreateActiveDirectoryDefault{ - _statusCode: code, - } -} - -/* -CreateActiveDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateActiveDirectoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create active directory default response has a 2xx status code -func (o *CreateActiveDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create active directory default response has a 3xx status code -func (o *CreateActiveDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create active directory default response has a 4xx status code -func (o *CreateActiveDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create active directory default response has a 5xx status code -func (o *CreateActiveDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create active directory default response a status code equal to that given -func (o *CreateActiveDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create active directory default response -func (o *CreateActiveDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *CreateActiveDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /active-directories][%d] CreateActiveDirectory default %s", o._statusCode, payload) -} - -func (o *CreateActiveDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /active-directories][%d] CreateActiveDirectory default %s", o._statusCode, payload) -} - -func (o *CreateActiveDirectoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateActiveDirectoryDefault) 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/active_directory/delete_active_directory_parameters.go b/v2/client/active_directory/delete_active_directory_parameters.go deleted file mode 100644 index e818d216..00000000 --- a/v2/client/active_directory/delete_active_directory_parameters.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewDeleteActiveDirectoryParams creates a new DeleteActiveDirectoryParams 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 NewDeleteActiveDirectoryParams() *DeleteActiveDirectoryParams { - return &DeleteActiveDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteActiveDirectoryParamsWithTimeout creates a new DeleteActiveDirectoryParams object -// with the ability to set a timeout on a request. -func NewDeleteActiveDirectoryParamsWithTimeout(timeout time.Duration) *DeleteActiveDirectoryParams { - return &DeleteActiveDirectoryParams{ - timeout: timeout, - } -} - -// NewDeleteActiveDirectoryParamsWithContext creates a new DeleteActiveDirectoryParams object -// with the ability to set a context for a request. -func NewDeleteActiveDirectoryParamsWithContext(ctx context.Context) *DeleteActiveDirectoryParams { - return &DeleteActiveDirectoryParams{ - Context: ctx, - } -} - -// NewDeleteActiveDirectoryParamsWithHTTPClient creates a new DeleteActiveDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteActiveDirectoryParamsWithHTTPClient(client *http.Client) *DeleteActiveDirectoryParams { - return &DeleteActiveDirectoryParams{ - HTTPClient: client, - } -} - -/* -DeleteActiveDirectoryParams contains all the parameters to send to the API endpoint - - for the delete active directory operation. - - Typically these are written to a http.Request. -*/ -type DeleteActiveDirectoryParams struct { - - /* ActiveDirectoryAdminPassword. - - Specifies the password of the Active Directory Admin. - */ - ActiveDirectoryAdminPassword string - - /* ActiveDirectoryAdminUsername. - - Specifies the username of the Active Directory Admin. - */ - ActiveDirectoryAdminUsername string - - /* ForceRemove. - - To force delete the Active directory from cluster. This will skip all the checks that prevents cluster from leaving an AD domain. - */ - ForceRemove *bool - - /* ID. - - Specifies id of an Active Directory. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteActiveDirectoryParams) WithDefaults() *DeleteActiveDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteActiveDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithTimeout(timeout time.Duration) *DeleteActiveDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithContext(ctx context.Context) *DeleteActiveDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithHTTPClient(client *http.Client) *DeleteActiveDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithActiveDirectoryAdminPassword adds the activeDirectoryAdminPassword to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithActiveDirectoryAdminPassword(activeDirectoryAdminPassword string) *DeleteActiveDirectoryParams { - o.SetActiveDirectoryAdminPassword(activeDirectoryAdminPassword) - return o -} - -// SetActiveDirectoryAdminPassword adds the activeDirectoryAdminPassword to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetActiveDirectoryAdminPassword(activeDirectoryAdminPassword string) { - o.ActiveDirectoryAdminPassword = activeDirectoryAdminPassword -} - -// WithActiveDirectoryAdminUsername adds the activeDirectoryAdminUsername to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithActiveDirectoryAdminUsername(activeDirectoryAdminUsername string) *DeleteActiveDirectoryParams { - o.SetActiveDirectoryAdminUsername(activeDirectoryAdminUsername) - return o -} - -// SetActiveDirectoryAdminUsername adds the activeDirectoryAdminUsername to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetActiveDirectoryAdminUsername(activeDirectoryAdminUsername string) { - o.ActiveDirectoryAdminUsername = activeDirectoryAdminUsername -} - -// WithForceRemove adds the forceRemove to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithForceRemove(forceRemove *bool) *DeleteActiveDirectoryParams { - o.SetForceRemove(forceRemove) - return o -} - -// SetForceRemove adds the forceRemove to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetForceRemove(forceRemove *bool) { - o.ForceRemove = forceRemove -} - -// WithID adds the id to the delete active directory params -func (o *DeleteActiveDirectoryParams) WithID(id int64) *DeleteActiveDirectoryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete active directory params -func (o *DeleteActiveDirectoryParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteActiveDirectoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // header param activeDirectoryAdminPassword - if err := r.SetHeaderParam("activeDirectoryAdminPassword", o.ActiveDirectoryAdminPassword); err != nil { - return err - } - - // header param activeDirectoryAdminUsername - if err := r.SetHeaderParam("activeDirectoryAdminUsername", o.ActiveDirectoryAdminUsername); err != nil { - return err - } - - if o.ForceRemove != nil { - - // query param forceRemove - var qrForceRemove bool - - if o.ForceRemove != nil { - qrForceRemove = *o.ForceRemove - } - qForceRemove := swag.FormatBool(qrForceRemove) - if qForceRemove != "" { - - if err := r.SetQueryParam("forceRemove", qForceRemove); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/delete_active_directory_responses.go b/v2/client/active_directory/delete_active_directory_responses.go deleted file mode 100644 index 5b26a8e9..00000000 --- a/v2/client/active_directory/delete_active_directory_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteActiveDirectoryReader is a Reader for the DeleteActiveDirectory structure. -type DeleteActiveDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteActiveDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteActiveDirectoryNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteActiveDirectoryDefault(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 - } -} - -// NewDeleteActiveDirectoryNoContent creates a DeleteActiveDirectoryNoContent with default headers values -func NewDeleteActiveDirectoryNoContent() *DeleteActiveDirectoryNoContent { - return &DeleteActiveDirectoryNoContent{} -} - -/* -DeleteActiveDirectoryNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteActiveDirectoryNoContent struct { -} - -// IsSuccess returns true when this delete active directory no content response has a 2xx status code -func (o *DeleteActiveDirectoryNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete active directory no content response has a 3xx status code -func (o *DeleteActiveDirectoryNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete active directory no content response has a 4xx status code -func (o *DeleteActiveDirectoryNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete active directory no content response has a 5xx status code -func (o *DeleteActiveDirectoryNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete active directory no content response a status code equal to that given -func (o *DeleteActiveDirectoryNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete active directory no content response -func (o *DeleteActiveDirectoryNoContent) Code() int { - return 204 -} - -func (o *DeleteActiveDirectoryNoContent) Error() string { - return fmt.Sprintf("[DELETE /active-directories/{id}][%d] deleteActiveDirectoryNoContent", 204) -} - -func (o *DeleteActiveDirectoryNoContent) String() string { - return fmt.Sprintf("[DELETE /active-directories/{id}][%d] deleteActiveDirectoryNoContent", 204) -} - -func (o *DeleteActiveDirectoryNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteActiveDirectoryDefault creates a DeleteActiveDirectoryDefault with default headers values -func NewDeleteActiveDirectoryDefault(code int) *DeleteActiveDirectoryDefault { - return &DeleteActiveDirectoryDefault{ - _statusCode: code, - } -} - -/* -DeleteActiveDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteActiveDirectoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete active directory default response has a 2xx status code -func (o *DeleteActiveDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete active directory default response has a 3xx status code -func (o *DeleteActiveDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete active directory default response has a 4xx status code -func (o *DeleteActiveDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete active directory default response has a 5xx status code -func (o *DeleteActiveDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete active directory default response a status code equal to that given -func (o *DeleteActiveDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete active directory default response -func (o *DeleteActiveDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *DeleteActiveDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /active-directories/{id}][%d] DeleteActiveDirectory default %s", o._statusCode, payload) -} - -func (o *DeleteActiveDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /active-directories/{id}][%d] DeleteActiveDirectory default %s", o._statusCode, payload) -} - -func (o *DeleteActiveDirectoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteActiveDirectoryDefault) 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/active_directory/get_active_directory_by_id_parameters.go b/v2/client/active_directory/get_active_directory_by_id_parameters.go deleted file mode 100644 index 0e095cb2..00000000 --- a/v2/client/active_directory/get_active_directory_by_id_parameters.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewGetActiveDirectoryByIDParams creates a new GetActiveDirectoryByIDParams 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 NewGetActiveDirectoryByIDParams() *GetActiveDirectoryByIDParams { - return &GetActiveDirectoryByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveDirectoryByIDParamsWithTimeout creates a new GetActiveDirectoryByIDParams object -// with the ability to set a timeout on a request. -func NewGetActiveDirectoryByIDParamsWithTimeout(timeout time.Duration) *GetActiveDirectoryByIDParams { - return &GetActiveDirectoryByIDParams{ - timeout: timeout, - } -} - -// NewGetActiveDirectoryByIDParamsWithContext creates a new GetActiveDirectoryByIDParams object -// with the ability to set a context for a request. -func NewGetActiveDirectoryByIDParamsWithContext(ctx context.Context) *GetActiveDirectoryByIDParams { - return &GetActiveDirectoryByIDParams{ - Context: ctx, - } -} - -// NewGetActiveDirectoryByIDParamsWithHTTPClient creates a new GetActiveDirectoryByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveDirectoryByIDParamsWithHTTPClient(client *http.Client) *GetActiveDirectoryByIDParams { - return &GetActiveDirectoryByIDParams{ - HTTPClient: client, - } -} - -/* -GetActiveDirectoryByIDParams contains all the parameters to send to the API endpoint - - for the get active directory by Id operation. - - Typically these are written to a http.Request. -*/ -type GetActiveDirectoryByIDParams struct { - - /* ID. - - Specifies id of an Active Directory. - - Format: int64 - */ - ID int64 - - /* IncludeCentrifyZones. - - Specifies whether to include Centrify Zones of the Active Directory in response. - */ - IncludeCentrifyZones *bool - - /* IncludeDomainControllers. - - Specifies whether to include Domain Controllers of the Active Directory in response. - */ - IncludeDomainControllers *bool - - /* IncludeSecurityPrincipals. - - Specifies whether to include Security Principals of the Active Directory in response. - */ - IncludeSecurityPrincipals *bool - - /* ObjectClass. - - Specifies a list of object classes, only security principals with object class in this list will be returned. This field is appliciable if 'includeSecurityPrincipals' is set to true. - */ - ObjectClass []string - - /* Prefix. - - Specifies a prefix, only security principals with name or sAMAccountName having this prefix (ignoring cases) will be returned. This field is appliciable and mandatory if 'includeSecurityPrincipals' is set to true. - */ - Prefix *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active directory by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryByIDParams) WithDefaults() *GetActiveDirectoryByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active directory by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithTimeout(timeout time.Duration) *GetActiveDirectoryByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithContext(ctx context.Context) *GetActiveDirectoryByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithHTTPClient(client *http.Client) *GetActiveDirectoryByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithID(id int64) *GetActiveDirectoryByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeCentrifyZones adds the includeCentrifyZones to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithIncludeCentrifyZones(includeCentrifyZones *bool) *GetActiveDirectoryByIDParams { - o.SetIncludeCentrifyZones(includeCentrifyZones) - return o -} - -// SetIncludeCentrifyZones adds the includeCentrifyZones to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetIncludeCentrifyZones(includeCentrifyZones *bool) { - o.IncludeCentrifyZones = includeCentrifyZones -} - -// WithIncludeDomainControllers adds the includeDomainControllers to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithIncludeDomainControllers(includeDomainControllers *bool) *GetActiveDirectoryByIDParams { - o.SetIncludeDomainControllers(includeDomainControllers) - return o -} - -// SetIncludeDomainControllers adds the includeDomainControllers to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetIncludeDomainControllers(includeDomainControllers *bool) { - o.IncludeDomainControllers = includeDomainControllers -} - -// WithIncludeSecurityPrincipals adds the includeSecurityPrincipals to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithIncludeSecurityPrincipals(includeSecurityPrincipals *bool) *GetActiveDirectoryByIDParams { - o.SetIncludeSecurityPrincipals(includeSecurityPrincipals) - return o -} - -// SetIncludeSecurityPrincipals adds the includeSecurityPrincipals to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetIncludeSecurityPrincipals(includeSecurityPrincipals *bool) { - o.IncludeSecurityPrincipals = includeSecurityPrincipals -} - -// WithObjectClass adds the objectClass to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithObjectClass(objectClass []string) *GetActiveDirectoryByIDParams { - o.SetObjectClass(objectClass) - return o -} - -// SetObjectClass adds the objectClass to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetObjectClass(objectClass []string) { - o.ObjectClass = objectClass -} - -// WithPrefix adds the prefix to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) WithPrefix(prefix *string) *GetActiveDirectoryByIDParams { - o.SetPrefix(prefix) - return o -} - -// SetPrefix adds the prefix to the get active directory by Id params -func (o *GetActiveDirectoryByIDParams) SetPrefix(prefix *string) { - o.Prefix = prefix -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveDirectoryByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.IncludeCentrifyZones != nil { - - // query param includeCentrifyZones - var qrIncludeCentrifyZones bool - - if o.IncludeCentrifyZones != nil { - qrIncludeCentrifyZones = *o.IncludeCentrifyZones - } - qIncludeCentrifyZones := swag.FormatBool(qrIncludeCentrifyZones) - if qIncludeCentrifyZones != "" { - - if err := r.SetQueryParam("includeCentrifyZones", qIncludeCentrifyZones); err != nil { - return err - } - } - } - - if o.IncludeDomainControllers != nil { - - // query param includeDomainControllers - var qrIncludeDomainControllers bool - - if o.IncludeDomainControllers != nil { - qrIncludeDomainControllers = *o.IncludeDomainControllers - } - qIncludeDomainControllers := swag.FormatBool(qrIncludeDomainControllers) - if qIncludeDomainControllers != "" { - - if err := r.SetQueryParam("includeDomainControllers", qIncludeDomainControllers); err != nil { - return err - } - } - } - - if o.IncludeSecurityPrincipals != nil { - - // query param includeSecurityPrincipals - var qrIncludeSecurityPrincipals bool - - if o.IncludeSecurityPrincipals != nil { - qrIncludeSecurityPrincipals = *o.IncludeSecurityPrincipals - } - qIncludeSecurityPrincipals := swag.FormatBool(qrIncludeSecurityPrincipals) - if qIncludeSecurityPrincipals != "" { - - if err := r.SetQueryParam("includeSecurityPrincipals", qIncludeSecurityPrincipals); err != nil { - return err - } - } - } - - if o.ObjectClass != nil { - - // binding items for objectClass - joinedObjectClass := o.bindParamObjectClass(reg) - - // query array param objectClass - if err := r.SetQueryParam("objectClass", joinedObjectClass...); err != nil { - return err - } - } - - if o.Prefix != nil { - - // query param prefix - var qrPrefix string - - if o.Prefix != nil { - qrPrefix = *o.Prefix - } - qPrefix := qrPrefix - if qPrefix != "" { - - if err := r.SetQueryParam("prefix", qPrefix); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetActiveDirectoryByID binds the parameter objectClass -func (o *GetActiveDirectoryByIDParams) bindParamObjectClass(formats strfmt.Registry) []string { - objectClassIR := o.ObjectClass - - var objectClassIC []string - for _, objectClassIIR := range objectClassIR { // explode []string - - objectClassIIV := objectClassIIR // string as string - objectClassIC = append(objectClassIC, objectClassIIV) - } - - // items.CollectionFormat: "" - objectClassIS := swag.JoinByFormat(objectClassIC, "") - - return objectClassIS -} diff --git a/v2/client/active_directory/get_active_directory_by_id_responses.go b/v2/client/active_directory/get_active_directory_by_id_responses.go deleted file mode 100644 index 591cc84f..00000000 --- a/v2/client/active_directory/get_active_directory_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetActiveDirectoryByIDReader is a Reader for the GetActiveDirectoryByID structure. -type GetActiveDirectoryByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveDirectoryByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveDirectoryByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveDirectoryByIDDefault(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 - } -} - -// NewGetActiveDirectoryByIDOK creates a GetActiveDirectoryByIDOK with default headers values -func NewGetActiveDirectoryByIDOK() *GetActiveDirectoryByIDOK { - return &GetActiveDirectoryByIDOK{} -} - -/* -GetActiveDirectoryByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveDirectoryByIDOK struct { - Payload *models.ActiveDirectory -} - -// IsSuccess returns true when this get active directory by Id o k response has a 2xx status code -func (o *GetActiveDirectoryByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active directory by Id o k response has a 3xx status code -func (o *GetActiveDirectoryByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active directory by Id o k response has a 4xx status code -func (o *GetActiveDirectoryByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active directory by Id o k response has a 5xx status code -func (o *GetActiveDirectoryByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active directory by Id o k response a status code equal to that given -func (o *GetActiveDirectoryByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active directory by Id o k response -func (o *GetActiveDirectoryByIDOK) Code() int { - return 200 -} - -func (o *GetActiveDirectoryByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories/{id}][%d] getActiveDirectoryByIdOK %s", 200, payload) -} - -func (o *GetActiveDirectoryByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories/{id}][%d] getActiveDirectoryByIdOK %s", 200, payload) -} - -func (o *GetActiveDirectoryByIDOK) GetPayload() *models.ActiveDirectory { - return o.Payload -} - -func (o *GetActiveDirectoryByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectory) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveDirectoryByIDDefault creates a GetActiveDirectoryByIDDefault with default headers values -func NewGetActiveDirectoryByIDDefault(code int) *GetActiveDirectoryByIDDefault { - return &GetActiveDirectoryByIDDefault{ - _statusCode: code, - } -} - -/* -GetActiveDirectoryByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveDirectoryByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get active directory by Id default response has a 2xx status code -func (o *GetActiveDirectoryByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active directory by Id default response has a 3xx status code -func (o *GetActiveDirectoryByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active directory by Id default response has a 4xx status code -func (o *GetActiveDirectoryByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active directory by Id default response has a 5xx status code -func (o *GetActiveDirectoryByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active directory by Id default response a status code equal to that given -func (o *GetActiveDirectoryByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active directory by Id default response -func (o *GetActiveDirectoryByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveDirectoryByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories/{id}][%d] GetActiveDirectoryById default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories/{id}][%d] GetActiveDirectoryById default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetActiveDirectoryByIDDefault) 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/active_directory/get_active_directory_parameters.go b/v2/client/active_directory/get_active_directory_parameters.go deleted file mode 100644 index 2cfd6394..00000000 --- a/v2/client/active_directory/get_active_directory_parameters.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewGetActiveDirectoryParams creates a new GetActiveDirectoryParams 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 NewGetActiveDirectoryParams() *GetActiveDirectoryParams { - return &GetActiveDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveDirectoryParamsWithTimeout creates a new GetActiveDirectoryParams object -// with the ability to set a timeout on a request. -func NewGetActiveDirectoryParamsWithTimeout(timeout time.Duration) *GetActiveDirectoryParams { - return &GetActiveDirectoryParams{ - timeout: timeout, - } -} - -// NewGetActiveDirectoryParamsWithContext creates a new GetActiveDirectoryParams object -// with the ability to set a context for a request. -func NewGetActiveDirectoryParamsWithContext(ctx context.Context) *GetActiveDirectoryParams { - return &GetActiveDirectoryParams{ - Context: ctx, - } -} - -// NewGetActiveDirectoryParamsWithHTTPClient creates a new GetActiveDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveDirectoryParamsWithHTTPClient(client *http.Client) *GetActiveDirectoryParams { - return &GetActiveDirectoryParams{ - HTTPClient: client, - } -} - -/* -GetActiveDirectoryParams contains all the parameters to send to the API endpoint - - for the get active directory operation. - - Typically these are written to a http.Request. -*/ -type GetActiveDirectoryParams struct { - - /* DomainNames. - - Filter by a list of Active Directory domain names. - */ - DomainNames []string - - /* Ids. - - Filter by a list of Active Directory Ids. - */ - Ids []int64 - - /* IncludeTenants. - - If true, the response will include Active Directories which were created by all tenants which the current user has permission to see. If false, then only Active Directories created by the current user will be returned. - */ - IncludeTenants *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which Active Directories are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryParams) WithDefaults() *GetActiveDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active directory params -func (o *GetActiveDirectoryParams) WithTimeout(timeout time.Duration) *GetActiveDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active directory params -func (o *GetActiveDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active directory params -func (o *GetActiveDirectoryParams) WithContext(ctx context.Context) *GetActiveDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active directory params -func (o *GetActiveDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active directory params -func (o *GetActiveDirectoryParams) WithHTTPClient(client *http.Client) *GetActiveDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active directory params -func (o *GetActiveDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainNames adds the domainNames to the get active directory params -func (o *GetActiveDirectoryParams) WithDomainNames(domainNames []string) *GetActiveDirectoryParams { - o.SetDomainNames(domainNames) - return o -} - -// SetDomainNames adds the domainNames to the get active directory params -func (o *GetActiveDirectoryParams) SetDomainNames(domainNames []string) { - o.DomainNames = domainNames -} - -// WithIds adds the ids to the get active directory params -func (o *GetActiveDirectoryParams) WithIds(ids []int64) *GetActiveDirectoryParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get active directory params -func (o *GetActiveDirectoryParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get active directory params -func (o *GetActiveDirectoryParams) WithIncludeTenants(includeTenants *bool) *GetActiveDirectoryParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get active directory params -func (o *GetActiveDirectoryParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithTenantIds adds the tenantIds to the get active directory params -func (o *GetActiveDirectoryParams) WithTenantIds(tenantIds []string) *GetActiveDirectoryParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get active directory params -func (o *GetActiveDirectoryParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveDirectoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DomainNames != nil { - - // binding items for domainNames - joinedDomainNames := o.bindParamDomainNames(reg) - - // query array param domainNames - if err := r.SetQueryParam("domainNames", joinedDomainNames...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetActiveDirectory binds the parameter domainNames -func (o *GetActiveDirectoryParams) bindParamDomainNames(formats strfmt.Registry) []string { - domainNamesIR := o.DomainNames - - var domainNamesIC []string - for _, domainNamesIIR := range domainNamesIR { // explode []string - - domainNamesIIV := domainNamesIIR // string as string - domainNamesIC = append(domainNamesIC, domainNamesIIV) - } - - // items.CollectionFormat: "" - domainNamesIS := swag.JoinByFormat(domainNamesIC, "") - - return domainNamesIS -} - -// bindParamGetActiveDirectory binds the parameter ids -func (o *GetActiveDirectoryParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetActiveDirectory binds the parameter tenantIds -func (o *GetActiveDirectoryParams) 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/client/active_directory/get_active_directory_responses.go b/v2/client/active_directory/get_active_directory_responses.go deleted file mode 100644 index d1cd28ff..00000000 --- a/v2/client/active_directory/get_active_directory_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetActiveDirectoryReader is a Reader for the GetActiveDirectory structure. -type GetActiveDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveDirectoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveDirectoryDefault(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 - } -} - -// NewGetActiveDirectoryOK creates a GetActiveDirectoryOK with default headers values -func NewGetActiveDirectoryOK() *GetActiveDirectoryOK { - return &GetActiveDirectoryOK{} -} - -/* -GetActiveDirectoryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveDirectoryOK struct { - Payload *models.ActiveDirectories -} - -// IsSuccess returns true when this get active directory o k response has a 2xx status code -func (o *GetActiveDirectoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active directory o k response has a 3xx status code -func (o *GetActiveDirectoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active directory o k response has a 4xx status code -func (o *GetActiveDirectoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active directory o k response has a 5xx status code -func (o *GetActiveDirectoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active directory o k response a status code equal to that given -func (o *GetActiveDirectoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active directory o k response -func (o *GetActiveDirectoryOK) Code() int { - return 200 -} - -func (o *GetActiveDirectoryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories][%d] getActiveDirectoryOK %s", 200, payload) -} - -func (o *GetActiveDirectoryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories][%d] getActiveDirectoryOK %s", 200, payload) -} - -func (o *GetActiveDirectoryOK) GetPayload() *models.ActiveDirectories { - return o.Payload -} - -func (o *GetActiveDirectoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectories) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveDirectoryDefault creates a GetActiveDirectoryDefault with default headers values -func NewGetActiveDirectoryDefault(code int) *GetActiveDirectoryDefault { - return &GetActiveDirectoryDefault{ - _statusCode: code, - } -} - -/* -GetActiveDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveDirectoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get active directory default response has a 2xx status code -func (o *GetActiveDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active directory default response has a 3xx status code -func (o *GetActiveDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active directory default response has a 4xx status code -func (o *GetActiveDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active directory default response has a 5xx status code -func (o *GetActiveDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active directory default response a status code equal to that given -func (o *GetActiveDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active directory default response -func (o *GetActiveDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories][%d] GetActiveDirectory default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /active-directories][%d] GetActiveDirectory default %s", o._statusCode, payload) -} - -func (o *GetActiveDirectoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetActiveDirectoryDefault) 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/active_directory/get_centrify_zones_parameters.go b/v2/client/active_directory/get_centrify_zones_parameters.go deleted file mode 100644 index d9565a07..00000000 --- a/v2/client/active_directory/get_centrify_zones_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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" -) - -// NewGetCentrifyZonesParams creates a new GetCentrifyZonesParams 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 NewGetCentrifyZonesParams() *GetCentrifyZonesParams { - return &GetCentrifyZonesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCentrifyZonesParamsWithTimeout creates a new GetCentrifyZonesParams object -// with the ability to set a timeout on a request. -func NewGetCentrifyZonesParamsWithTimeout(timeout time.Duration) *GetCentrifyZonesParams { - return &GetCentrifyZonesParams{ - timeout: timeout, - } -} - -// NewGetCentrifyZonesParamsWithContext creates a new GetCentrifyZonesParams object -// with the ability to set a context for a request. -func NewGetCentrifyZonesParamsWithContext(ctx context.Context) *GetCentrifyZonesParams { - return &GetCentrifyZonesParams{ - Context: ctx, - } -} - -// NewGetCentrifyZonesParamsWithHTTPClient creates a new GetCentrifyZonesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCentrifyZonesParamsWithHTTPClient(client *http.Client) *GetCentrifyZonesParams { - return &GetCentrifyZonesParams{ - HTTPClient: client, - } -} - -/* -GetCentrifyZonesParams contains all the parameters to send to the API endpoint - - for the get centrify zones operation. - - Typically these are written to a http.Request. -*/ -type GetCentrifyZonesParams struct { - - /* DomainName. - - Specifies the FQDN of the domain name. - */ - DomainName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get centrify zones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCentrifyZonesParams) WithDefaults() *GetCentrifyZonesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get centrify zones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCentrifyZonesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get centrify zones params -func (o *GetCentrifyZonesParams) WithTimeout(timeout time.Duration) *GetCentrifyZonesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get centrify zones params -func (o *GetCentrifyZonesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get centrify zones params -func (o *GetCentrifyZonesParams) WithContext(ctx context.Context) *GetCentrifyZonesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get centrify zones params -func (o *GetCentrifyZonesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get centrify zones params -func (o *GetCentrifyZonesParams) WithHTTPClient(client *http.Client) *GetCentrifyZonesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get centrify zones params -func (o *GetCentrifyZonesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainName adds the domainName to the get centrify zones params -func (o *GetCentrifyZonesParams) WithDomainName(domainName string) *GetCentrifyZonesParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the get centrify zones params -func (o *GetCentrifyZonesParams) SetDomainName(domainName string) { - o.DomainName = domainName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCentrifyZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param domainName - qrDomainName := o.DomainName - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/get_centrify_zones_responses.go b/v2/client/active_directory/get_centrify_zones_responses.go deleted file mode 100644 index ae0a7a20..00000000 --- a/v2/client/active_directory/get_centrify_zones_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCentrifyZonesReader is a Reader for the GetCentrifyZones structure. -type GetCentrifyZonesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCentrifyZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCentrifyZonesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCentrifyZonesDefault(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 - } -} - -// NewGetCentrifyZonesOK creates a GetCentrifyZonesOK with default headers values -func NewGetCentrifyZonesOK() *GetCentrifyZonesOK { - return &GetCentrifyZonesOK{} -} - -/* -GetCentrifyZonesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCentrifyZonesOK struct { - Payload *models.CentrifyZones -} - -// IsSuccess returns true when this get centrify zones o k response has a 2xx status code -func (o *GetCentrifyZonesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get centrify zones o k response has a 3xx status code -func (o *GetCentrifyZonesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get centrify zones o k response has a 4xx status code -func (o *GetCentrifyZonesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get centrify zones o k response has a 5xx status code -func (o *GetCentrifyZonesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get centrify zones o k response a status code equal to that given -func (o *GetCentrifyZonesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get centrify zones o k response -func (o *GetCentrifyZonesOK) Code() int { - return 200 -} - -func (o *GetCentrifyZonesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /centrify-zones][%d] getCentrifyZonesOK %s", 200, payload) -} - -func (o *GetCentrifyZonesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /centrify-zones][%d] getCentrifyZonesOK %s", 200, payload) -} - -func (o *GetCentrifyZonesOK) GetPayload() *models.CentrifyZones { - return o.Payload -} - -func (o *GetCentrifyZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CentrifyZones) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCentrifyZonesDefault creates a GetCentrifyZonesDefault with default headers values -func NewGetCentrifyZonesDefault(code int) *GetCentrifyZonesDefault { - return &GetCentrifyZonesDefault{ - _statusCode: code, - } -} - -/* -GetCentrifyZonesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCentrifyZonesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get centrify zones default response has a 2xx status code -func (o *GetCentrifyZonesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get centrify zones default response has a 3xx status code -func (o *GetCentrifyZonesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get centrify zones default response has a 4xx status code -func (o *GetCentrifyZonesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get centrify zones default response has a 5xx status code -func (o *GetCentrifyZonesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get centrify zones default response a status code equal to that given -func (o *GetCentrifyZonesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get centrify zones default response -func (o *GetCentrifyZonesDefault) Code() int { - return o._statusCode -} - -func (o *GetCentrifyZonesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /centrify-zones][%d] GetCentrifyZones default %s", o._statusCode, payload) -} - -func (o *GetCentrifyZonesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /centrify-zones][%d] GetCentrifyZones default %s", o._statusCode, payload) -} - -func (o *GetCentrifyZonesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCentrifyZonesDefault) 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/active_directory/get_domain_controllers_parameters.go b/v2/client/active_directory/get_domain_controllers_parameters.go deleted file mode 100644 index 7c0d67ba..00000000 --- a/v2/client/active_directory/get_domain_controllers_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewGetDomainControllersParams creates a new GetDomainControllersParams 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 NewGetDomainControllersParams() *GetDomainControllersParams { - return &GetDomainControllersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDomainControllersParamsWithTimeout creates a new GetDomainControllersParams object -// with the ability to set a timeout on a request. -func NewGetDomainControllersParamsWithTimeout(timeout time.Duration) *GetDomainControllersParams { - return &GetDomainControllersParams{ - timeout: timeout, - } -} - -// NewGetDomainControllersParamsWithContext creates a new GetDomainControllersParams object -// with the ability to set a context for a request. -func NewGetDomainControllersParamsWithContext(ctx context.Context) *GetDomainControllersParams { - return &GetDomainControllersParams{ - Context: ctx, - } -} - -// NewGetDomainControllersParamsWithHTTPClient creates a new GetDomainControllersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDomainControllersParamsWithHTTPClient(client *http.Client) *GetDomainControllersParams { - return &GetDomainControllersParams{ - HTTPClient: client, - } -} - -/* -GetDomainControllersParams contains all the parameters to send to the API endpoint - - for the get domain controllers operation. - - Typically these are written to a http.Request. -*/ -type GetDomainControllersParams struct { - - /* ConnectionID. - - Specifies the Id of the connection which the connector belongs to. - - Format: int64 - */ - ConnectionID *int64 - - /* DomainNames. - - Specifies a list of domain names. - */ - DomainNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDomainControllersParams) WithDefaults() *GetDomainControllersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get domain controllers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDomainControllersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get domain controllers params -func (o *GetDomainControllersParams) WithTimeout(timeout time.Duration) *GetDomainControllersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get domain controllers params -func (o *GetDomainControllersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get domain controllers params -func (o *GetDomainControllersParams) WithContext(ctx context.Context) *GetDomainControllersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get domain controllers params -func (o *GetDomainControllersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get domain controllers params -func (o *GetDomainControllersParams) WithHTTPClient(client *http.Client) *GetDomainControllersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get domain controllers params -func (o *GetDomainControllersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConnectionID adds the connectionID to the get domain controllers params -func (o *GetDomainControllersParams) WithConnectionID(connectionID *int64) *GetDomainControllersParams { - o.SetConnectionID(connectionID) - return o -} - -// SetConnectionID adds the connectionId to the get domain controllers params -func (o *GetDomainControllersParams) SetConnectionID(connectionID *int64) { - o.ConnectionID = connectionID -} - -// WithDomainNames adds the domainNames to the get domain controllers params -func (o *GetDomainControllersParams) WithDomainNames(domainNames []string) *GetDomainControllersParams { - o.SetDomainNames(domainNames) - return o -} - -// SetDomainNames adds the domainNames to the get domain controllers params -func (o *GetDomainControllersParams) SetDomainNames(domainNames []string) { - o.DomainNames = domainNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDomainControllersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ConnectionID != nil { - - // query param connectionId - var qrConnectionID int64 - - if o.ConnectionID != nil { - qrConnectionID = *o.ConnectionID - } - qConnectionID := swag.FormatInt64(qrConnectionID) - if qConnectionID != "" { - - if err := r.SetQueryParam("connectionId", qConnectionID); err != nil { - return err - } - } - } - - if o.DomainNames != nil { - - // binding items for domainNames - joinedDomainNames := o.bindParamDomainNames(reg) - - // query array param domainNames - if err := r.SetQueryParam("domainNames", joinedDomainNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDomainControllers binds the parameter domainNames -func (o *GetDomainControllersParams) bindParamDomainNames(formats strfmt.Registry) []string { - domainNamesIR := o.DomainNames - - var domainNamesIC []string - for _, domainNamesIIR := range domainNamesIR { // explode []string - - domainNamesIIV := domainNamesIIR // string as string - domainNamesIC = append(domainNamesIC, domainNamesIIV) - } - - // items.CollectionFormat: "" - domainNamesIS := swag.JoinByFormat(domainNamesIC, "") - - return domainNamesIS -} diff --git a/v2/client/active_directory/get_domain_controllers_responses.go b/v2/client/active_directory/get_domain_controllers_responses.go deleted file mode 100644 index da3e008d..00000000 --- a/v2/client/active_directory/get_domain_controllers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDomainControllersReader is a Reader for the GetDomainControllers structure. -type GetDomainControllersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDomainControllersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDomainControllersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDomainControllersDefault(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 - } -} - -// NewGetDomainControllersOK creates a GetDomainControllersOK with default headers values -func NewGetDomainControllersOK() *GetDomainControllersOK { - return &GetDomainControllersOK{} -} - -/* -GetDomainControllersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDomainControllersOK struct { - Payload *models.DomainControllersResponse -} - -// IsSuccess returns true when this get domain controllers o k response has a 2xx status code -func (o *GetDomainControllersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get domain controllers o k response has a 3xx status code -func (o *GetDomainControllersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get domain controllers o k response has a 4xx status code -func (o *GetDomainControllersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get domain controllers o k response has a 5xx status code -func (o *GetDomainControllersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get domain controllers o k response a status code equal to that given -func (o *GetDomainControllersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get domain controllers o k response -func (o *GetDomainControllersOK) Code() int { - return 200 -} - -func (o *GetDomainControllersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /domain-controllers][%d] getDomainControllersOK %s", 200, payload) -} - -func (o *GetDomainControllersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /domain-controllers][%d] getDomainControllersOK %s", 200, payload) -} - -func (o *GetDomainControllersOK) GetPayload() *models.DomainControllersResponse { - return o.Payload -} - -func (o *GetDomainControllersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DomainControllersResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDomainControllersDefault creates a GetDomainControllersDefault with default headers values -func NewGetDomainControllersDefault(code int) *GetDomainControllersDefault { - return &GetDomainControllersDefault{ - _statusCode: code, - } -} - -/* -GetDomainControllersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDomainControllersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get domain controllers default response has a 2xx status code -func (o *GetDomainControllersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get domain controllers default response has a 3xx status code -func (o *GetDomainControllersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get domain controllers default response has a 4xx status code -func (o *GetDomainControllersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get domain controllers default response has a 5xx status code -func (o *GetDomainControllersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get domain controllers default response a status code equal to that given -func (o *GetDomainControllersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get domain controllers default response -func (o *GetDomainControllersDefault) Code() int { - return o._statusCode -} - -func (o *GetDomainControllersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /domain-controllers][%d] GetDomainControllers default %s", o._statusCode, payload) -} - -func (o *GetDomainControllersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /domain-controllers][%d] GetDomainControllers default %s", o._statusCode, payload) -} - -func (o *GetDomainControllersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDomainControllersDefault) 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/active_directory/get_trusted_domains_parameters.go b/v2/client/active_directory/get_trusted_domains_parameters.go deleted file mode 100644 index 2bebf504..00000000 --- a/v2/client/active_directory/get_trusted_domains_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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" -) - -// NewGetTrustedDomainsParams creates a new GetTrustedDomainsParams 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 NewGetTrustedDomainsParams() *GetTrustedDomainsParams { - return &GetTrustedDomainsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTrustedDomainsParamsWithTimeout creates a new GetTrustedDomainsParams object -// with the ability to set a timeout on a request. -func NewGetTrustedDomainsParamsWithTimeout(timeout time.Duration) *GetTrustedDomainsParams { - return &GetTrustedDomainsParams{ - timeout: timeout, - } -} - -// NewGetTrustedDomainsParamsWithContext creates a new GetTrustedDomainsParams object -// with the ability to set a context for a request. -func NewGetTrustedDomainsParamsWithContext(ctx context.Context) *GetTrustedDomainsParams { - return &GetTrustedDomainsParams{ - Context: ctx, - } -} - -// NewGetTrustedDomainsParamsWithHTTPClient creates a new GetTrustedDomainsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTrustedDomainsParamsWithHTTPClient(client *http.Client) *GetTrustedDomainsParams { - return &GetTrustedDomainsParams{ - HTTPClient: client, - } -} - -/* -GetTrustedDomainsParams contains all the parameters to send to the API endpoint - - for the get trusted domains operation. - - Typically these are written to a http.Request. -*/ -type GetTrustedDomainsParams struct { - - /* DomainName. - - Specifies the FQDN of an Active directory domain. - */ - DomainName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTrustedDomainsParams) WithDefaults() *GetTrustedDomainsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTrustedDomainsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get trusted domains params -func (o *GetTrustedDomainsParams) WithTimeout(timeout time.Duration) *GetTrustedDomainsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get trusted domains params -func (o *GetTrustedDomainsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get trusted domains params -func (o *GetTrustedDomainsParams) WithContext(ctx context.Context) *GetTrustedDomainsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get trusted domains params -func (o *GetTrustedDomainsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get trusted domains params -func (o *GetTrustedDomainsParams) WithHTTPClient(client *http.Client) *GetTrustedDomainsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get trusted domains params -func (o *GetTrustedDomainsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainName adds the domainName to the get trusted domains params -func (o *GetTrustedDomainsParams) WithDomainName(domainName string) *GetTrustedDomainsParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the get trusted domains params -func (o *GetTrustedDomainsParams) SetDomainName(domainName string) { - o.DomainName = domainName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTrustedDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param domainName - qrDomainName := o.DomainName - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/get_trusted_domains_responses.go b/v2/client/active_directory/get_trusted_domains_responses.go deleted file mode 100644 index 5795b6fe..00000000 --- a/v2/client/active_directory/get_trusted_domains_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTrustedDomainsReader is a Reader for the GetTrustedDomains structure. -type GetTrustedDomainsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTrustedDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTrustedDomainsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTrustedDomainsDefault(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 - } -} - -// NewGetTrustedDomainsOK creates a GetTrustedDomainsOK with default headers values -func NewGetTrustedDomainsOK() *GetTrustedDomainsOK { - return &GetTrustedDomainsOK{} -} - -/* -GetTrustedDomainsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTrustedDomainsOK struct { - Payload *models.TrustedDomainParams -} - -// IsSuccess returns true when this get trusted domains o k response has a 2xx status code -func (o *GetTrustedDomainsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get trusted domains o k response has a 3xx status code -func (o *GetTrustedDomainsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get trusted domains o k response has a 4xx status code -func (o *GetTrustedDomainsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get trusted domains o k response has a 5xx status code -func (o *GetTrustedDomainsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get trusted domains o k response a status code equal to that given -func (o *GetTrustedDomainsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get trusted domains o k response -func (o *GetTrustedDomainsOK) Code() int { - return 200 -} - -func (o *GetTrustedDomainsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-domains][%d] getTrustedDomainsOK %s", 200, payload) -} - -func (o *GetTrustedDomainsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-domains][%d] getTrustedDomainsOK %s", 200, payload) -} - -func (o *GetTrustedDomainsOK) GetPayload() *models.TrustedDomainParams { - return o.Payload -} - -func (o *GetTrustedDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TrustedDomainParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTrustedDomainsDefault creates a GetTrustedDomainsDefault with default headers values -func NewGetTrustedDomainsDefault(code int) *GetTrustedDomainsDefault { - return &GetTrustedDomainsDefault{ - _statusCode: code, - } -} - -/* -GetTrustedDomainsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTrustedDomainsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get trusted domains default response has a 2xx status code -func (o *GetTrustedDomainsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get trusted domains default response has a 3xx status code -func (o *GetTrustedDomainsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get trusted domains default response has a 4xx status code -func (o *GetTrustedDomainsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get trusted domains default response has a 5xx status code -func (o *GetTrustedDomainsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get trusted domains default response a status code equal to that given -func (o *GetTrustedDomainsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get trusted domains default response -func (o *GetTrustedDomainsDefault) Code() int { - return o._statusCode -} - -func (o *GetTrustedDomainsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-domains][%d] GetTrustedDomains default %s", o._statusCode, payload) -} - -func (o *GetTrustedDomainsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-domains][%d] GetTrustedDomains default %s", o._statusCode, payload) -} - -func (o *GetTrustedDomainsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTrustedDomainsDefault) 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/active_directory/trigger_trusted_domains_discovery_parameters.go b/v2/client/active_directory/trigger_trusted_domains_discovery_parameters.go deleted file mode 100644 index 64bce2e9..00000000 --- a/v2/client/active_directory/trigger_trusted_domains_discovery_parameters.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" -) - -// NewTriggerTrustedDomainsDiscoveryParams creates a new TriggerTrustedDomainsDiscoveryParams 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 NewTriggerTrustedDomainsDiscoveryParams() *TriggerTrustedDomainsDiscoveryParams { - return &TriggerTrustedDomainsDiscoveryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewTriggerTrustedDomainsDiscoveryParamsWithTimeout creates a new TriggerTrustedDomainsDiscoveryParams object -// with the ability to set a timeout on a request. -func NewTriggerTrustedDomainsDiscoveryParamsWithTimeout(timeout time.Duration) *TriggerTrustedDomainsDiscoveryParams { - return &TriggerTrustedDomainsDiscoveryParams{ - timeout: timeout, - } -} - -// NewTriggerTrustedDomainsDiscoveryParamsWithContext creates a new TriggerTrustedDomainsDiscoveryParams object -// with the ability to set a context for a request. -func NewTriggerTrustedDomainsDiscoveryParamsWithContext(ctx context.Context) *TriggerTrustedDomainsDiscoveryParams { - return &TriggerTrustedDomainsDiscoveryParams{ - Context: ctx, - } -} - -// NewTriggerTrustedDomainsDiscoveryParamsWithHTTPClient creates a new TriggerTrustedDomainsDiscoveryParams object -// with the ability to set a custom HTTPClient for a request. -func NewTriggerTrustedDomainsDiscoveryParamsWithHTTPClient(client *http.Client) *TriggerTrustedDomainsDiscoveryParams { - return &TriggerTrustedDomainsDiscoveryParams{ - HTTPClient: client, - } -} - -/* -TriggerTrustedDomainsDiscoveryParams contains all the parameters to send to the API endpoint - - for the trigger trusted domains discovery operation. - - Typically these are written to a http.Request. -*/ -type TriggerTrustedDomainsDiscoveryParams struct { - - /* DomainName. - - Specifies the FQDN of an Active directory domain. - */ - DomainName string - - /* Rediscover. - - Specifies if trusted domains should be rediscovered. - */ - Rediscover bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the trigger trusted domains discovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TriggerTrustedDomainsDiscoveryParams) WithDefaults() *TriggerTrustedDomainsDiscoveryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the trigger trusted domains discovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TriggerTrustedDomainsDiscoveryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) WithTimeout(timeout time.Duration) *TriggerTrustedDomainsDiscoveryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) WithContext(ctx context.Context) *TriggerTrustedDomainsDiscoveryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) WithHTTPClient(client *http.Client) *TriggerTrustedDomainsDiscoveryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomainName adds the domainName to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) WithDomainName(domainName string) *TriggerTrustedDomainsDiscoveryParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) SetDomainName(domainName string) { - o.DomainName = domainName -} - -// WithRediscover adds the rediscover to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) WithRediscover(rediscover bool) *TriggerTrustedDomainsDiscoveryParams { - o.SetRediscover(rediscover) - return o -} - -// SetRediscover adds the rediscover to the trigger trusted domains discovery params -func (o *TriggerTrustedDomainsDiscoveryParams) SetRediscover(rediscover bool) { - o.Rediscover = rediscover -} - -// WriteToRequest writes these params to a swagger request -func (o *TriggerTrustedDomainsDiscoveryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param domainName - qrDomainName := o.DomainName - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - - // query param rediscover - qrRediscover := o.Rediscover - qRediscover := swag.FormatBool(qrRediscover) - if qRediscover != "" { - - if err := r.SetQueryParam("rediscover", qRediscover); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/trigger_trusted_domains_discovery_responses.go b/v2/client/active_directory/trigger_trusted_domains_discovery_responses.go deleted file mode 100644 index 334cbb4c..00000000 --- a/v2/client/active_directory/trigger_trusted_domains_discovery_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// TriggerTrustedDomainsDiscoveryReader is a Reader for the TriggerTrustedDomainsDiscovery structure. -type TriggerTrustedDomainsDiscoveryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TriggerTrustedDomainsDiscoveryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewTriggerTrustedDomainsDiscoveryAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewTriggerTrustedDomainsDiscoveryDefault(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 - } -} - -// NewTriggerTrustedDomainsDiscoveryAccepted creates a TriggerTrustedDomainsDiscoveryAccepted with default headers values -func NewTriggerTrustedDomainsDiscoveryAccepted() *TriggerTrustedDomainsDiscoveryAccepted { - return &TriggerTrustedDomainsDiscoveryAccepted{} -} - -/* -TriggerTrustedDomainsDiscoveryAccepted describes a response with status code 202, with default header values. - -Request Accepted -*/ -type TriggerTrustedDomainsDiscoveryAccepted struct { -} - -// IsSuccess returns true when this trigger trusted domains discovery accepted response has a 2xx status code -func (o *TriggerTrustedDomainsDiscoveryAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this trigger trusted domains discovery accepted response has a 3xx status code -func (o *TriggerTrustedDomainsDiscoveryAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this trigger trusted domains discovery accepted response has a 4xx status code -func (o *TriggerTrustedDomainsDiscoveryAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this trigger trusted domains discovery accepted response has a 5xx status code -func (o *TriggerTrustedDomainsDiscoveryAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this trigger trusted domains discovery accepted response a status code equal to that given -func (o *TriggerTrustedDomainsDiscoveryAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the trigger trusted domains discovery accepted response -func (o *TriggerTrustedDomainsDiscoveryAccepted) Code() int { - return 202 -} - -func (o *TriggerTrustedDomainsDiscoveryAccepted) Error() string { - return fmt.Sprintf("[PUT /trusted-domains][%d] triggerTrustedDomainsDiscoveryAccepted", 202) -} - -func (o *TriggerTrustedDomainsDiscoveryAccepted) String() string { - return fmt.Sprintf("[PUT /trusted-domains][%d] triggerTrustedDomainsDiscoveryAccepted", 202) -} - -func (o *TriggerTrustedDomainsDiscoveryAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewTriggerTrustedDomainsDiscoveryDefault creates a TriggerTrustedDomainsDiscoveryDefault with default headers values -func NewTriggerTrustedDomainsDiscoveryDefault(code int) *TriggerTrustedDomainsDiscoveryDefault { - return &TriggerTrustedDomainsDiscoveryDefault{ - _statusCode: code, - } -} - -/* -TriggerTrustedDomainsDiscoveryDefault describes a response with status code -1, with default header values. - -Error -*/ -type TriggerTrustedDomainsDiscoveryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this trigger trusted domains discovery default response has a 2xx status code -func (o *TriggerTrustedDomainsDiscoveryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this trigger trusted domains discovery default response has a 3xx status code -func (o *TriggerTrustedDomainsDiscoveryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this trigger trusted domains discovery default response has a 4xx status code -func (o *TriggerTrustedDomainsDiscoveryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this trigger trusted domains discovery default response has a 5xx status code -func (o *TriggerTrustedDomainsDiscoveryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this trigger trusted domains discovery default response a status code equal to that given -func (o *TriggerTrustedDomainsDiscoveryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the trigger trusted domains discovery default response -func (o *TriggerTrustedDomainsDiscoveryDefault) Code() int { - return o._statusCode -} - -func (o *TriggerTrustedDomainsDiscoveryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /trusted-domains][%d] TriggerTrustedDomainsDiscovery default %s", o._statusCode, payload) -} - -func (o *TriggerTrustedDomainsDiscoveryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /trusted-domains][%d] TriggerTrustedDomainsDiscovery default %s", o._statusCode, payload) -} - -func (o *TriggerTrustedDomainsDiscoveryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *TriggerTrustedDomainsDiscoveryDefault) 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/active_directory/update_active_directory_parameters.go b/v2/client/active_directory/update_active_directory_parameters.go deleted file mode 100644 index 0b6f6c9b..00000000 --- a/v2/client/active_directory/update_active_directory_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateActiveDirectoryParams creates a new UpdateActiveDirectoryParams 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 NewUpdateActiveDirectoryParams() *UpdateActiveDirectoryParams { - return &UpdateActiveDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateActiveDirectoryParamsWithTimeout creates a new UpdateActiveDirectoryParams object -// with the ability to set a timeout on a request. -func NewUpdateActiveDirectoryParamsWithTimeout(timeout time.Duration) *UpdateActiveDirectoryParams { - return &UpdateActiveDirectoryParams{ - timeout: timeout, - } -} - -// NewUpdateActiveDirectoryParamsWithContext creates a new UpdateActiveDirectoryParams object -// with the ability to set a context for a request. -func NewUpdateActiveDirectoryParamsWithContext(ctx context.Context) *UpdateActiveDirectoryParams { - return &UpdateActiveDirectoryParams{ - Context: ctx, - } -} - -// NewUpdateActiveDirectoryParamsWithHTTPClient creates a new UpdateActiveDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateActiveDirectoryParamsWithHTTPClient(client *http.Client) *UpdateActiveDirectoryParams { - return &UpdateActiveDirectoryParams{ - HTTPClient: client, - } -} - -/* -UpdateActiveDirectoryParams contains all the parameters to send to the API endpoint - - for the update active directory operation. - - Typically these are written to a http.Request. -*/ -type UpdateActiveDirectoryParams struct { - - /* Body. - - Request to update an Active Directory. - */ - Body *models.UpdateActiveDirectoryRequest - - /* ID. - - Specifies id of an Active Directory. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryParams) WithDefaults() *UpdateActiveDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update active directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateActiveDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update active directory params -func (o *UpdateActiveDirectoryParams) WithTimeout(timeout time.Duration) *UpdateActiveDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update active directory params -func (o *UpdateActiveDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update active directory params -func (o *UpdateActiveDirectoryParams) WithContext(ctx context.Context) *UpdateActiveDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update active directory params -func (o *UpdateActiveDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update active directory params -func (o *UpdateActiveDirectoryParams) WithHTTPClient(client *http.Client) *UpdateActiveDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update active directory params -func (o *UpdateActiveDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update active directory params -func (o *UpdateActiveDirectoryParams) WithBody(body *models.UpdateActiveDirectoryRequest) *UpdateActiveDirectoryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update active directory params -func (o *UpdateActiveDirectoryParams) SetBody(body *models.UpdateActiveDirectoryRequest) { - o.Body = body -} - -// WithID adds the id to the update active directory params -func (o *UpdateActiveDirectoryParams) WithID(id int64) *UpdateActiveDirectoryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update active directory params -func (o *UpdateActiveDirectoryParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateActiveDirectoryParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/update_active_directory_responses.go b/v2/client/active_directory/update_active_directory_responses.go deleted file mode 100644 index 039abbae..00000000 --- a/v2/client/active_directory/update_active_directory_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateActiveDirectoryReader is a Reader for the UpdateActiveDirectory structure. -type UpdateActiveDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateActiveDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateActiveDirectoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateActiveDirectoryDefault(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 - } -} - -// NewUpdateActiveDirectoryOK creates a UpdateActiveDirectoryOK with default headers values -func NewUpdateActiveDirectoryOK() *UpdateActiveDirectoryOK { - return &UpdateActiveDirectoryOK{} -} - -/* -UpdateActiveDirectoryOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateActiveDirectoryOK struct { - Payload *models.ActiveDirectory -} - -// IsSuccess returns true when this update active directory o k response has a 2xx status code -func (o *UpdateActiveDirectoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update active directory o k response has a 3xx status code -func (o *UpdateActiveDirectoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update active directory o k response has a 4xx status code -func (o *UpdateActiveDirectoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update active directory o k response has a 5xx status code -func (o *UpdateActiveDirectoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update active directory o k response a status code equal to that given -func (o *UpdateActiveDirectoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update active directory o k response -func (o *UpdateActiveDirectoryOK) Code() int { - return 200 -} - -func (o *UpdateActiveDirectoryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /active-directories/{id}][%d] updateActiveDirectoryOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /active-directories/{id}][%d] updateActiveDirectoryOK %s", 200, payload) -} - -func (o *UpdateActiveDirectoryOK) GetPayload() *models.ActiveDirectory { - return o.Payload -} - -func (o *UpdateActiveDirectoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveDirectory) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateActiveDirectoryDefault creates a UpdateActiveDirectoryDefault with default headers values -func NewUpdateActiveDirectoryDefault(code int) *UpdateActiveDirectoryDefault { - return &UpdateActiveDirectoryDefault{ - _statusCode: code, - } -} - -/* -UpdateActiveDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateActiveDirectoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update active directory default response has a 2xx status code -func (o *UpdateActiveDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update active directory default response has a 3xx status code -func (o *UpdateActiveDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update active directory default response has a 4xx status code -func (o *UpdateActiveDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update active directory default response has a 5xx status code -func (o *UpdateActiveDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update active directory default response a status code equal to that given -func (o *UpdateActiveDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update active directory default response -func (o *UpdateActiveDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *UpdateActiveDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /active-directories/{id}][%d] UpdateActiveDirectory default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /active-directories/{id}][%d] UpdateActiveDirectory default %s", o._statusCode, payload) -} - -func (o *UpdateActiveDirectoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateActiveDirectoryDefault) 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/active_directory/update_trusted_domains_parameters.go b/v2/client/active_directory/update_trusted_domains_parameters.go deleted file mode 100644 index df12edae..00000000 --- a/v2/client/active_directory/update_trusted_domains_parameters.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateTrustedDomainsParams creates a new UpdateTrustedDomainsParams 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 NewUpdateTrustedDomainsParams() *UpdateTrustedDomainsParams { - return &UpdateTrustedDomainsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTrustedDomainsParamsWithTimeout creates a new UpdateTrustedDomainsParams object -// with the ability to set a timeout on a request. -func NewUpdateTrustedDomainsParamsWithTimeout(timeout time.Duration) *UpdateTrustedDomainsParams { - return &UpdateTrustedDomainsParams{ - timeout: timeout, - } -} - -// NewUpdateTrustedDomainsParamsWithContext creates a new UpdateTrustedDomainsParams object -// with the ability to set a context for a request. -func NewUpdateTrustedDomainsParamsWithContext(ctx context.Context) *UpdateTrustedDomainsParams { - return &UpdateTrustedDomainsParams{ - Context: ctx, - } -} - -// NewUpdateTrustedDomainsParamsWithHTTPClient creates a new UpdateTrustedDomainsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTrustedDomainsParamsWithHTTPClient(client *http.Client) *UpdateTrustedDomainsParams { - return &UpdateTrustedDomainsParams{ - HTTPClient: client, - } -} - -/* -UpdateTrustedDomainsParams contains all the parameters to send to the API endpoint - - for the update trusted domains operation. - - Typically these are written to a http.Request. -*/ -type UpdateTrustedDomainsParams struct { - - /* Body. - - Specifies the trusted domains params. - */ - Body *models.TrustedDomainParams - - /* DomainName. - - Specifies the FQDN of an Active directory domain. - */ - DomainName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTrustedDomainsParams) WithDefaults() *UpdateTrustedDomainsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update trusted domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTrustedDomainsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update trusted domains params -func (o *UpdateTrustedDomainsParams) WithTimeout(timeout time.Duration) *UpdateTrustedDomainsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update trusted domains params -func (o *UpdateTrustedDomainsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update trusted domains params -func (o *UpdateTrustedDomainsParams) WithContext(ctx context.Context) *UpdateTrustedDomainsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update trusted domains params -func (o *UpdateTrustedDomainsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update trusted domains params -func (o *UpdateTrustedDomainsParams) WithHTTPClient(client *http.Client) *UpdateTrustedDomainsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update trusted domains params -func (o *UpdateTrustedDomainsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update trusted domains params -func (o *UpdateTrustedDomainsParams) WithBody(body *models.TrustedDomainParams) *UpdateTrustedDomainsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update trusted domains params -func (o *UpdateTrustedDomainsParams) SetBody(body *models.TrustedDomainParams) { - o.Body = body -} - -// WithDomainName adds the domainName to the update trusted domains params -func (o *UpdateTrustedDomainsParams) WithDomainName(domainName string) *UpdateTrustedDomainsParams { - o.SetDomainName(domainName) - return o -} - -// SetDomainName adds the domainName to the update trusted domains params -func (o *UpdateTrustedDomainsParams) SetDomainName(domainName string) { - o.DomainName = domainName -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTrustedDomainsParams) 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 - } - } - - // query param domainName - qrDomainName := o.DomainName - qDomainName := qrDomainName - if qDomainName != "" { - - if err := r.SetQueryParam("domainName", qDomainName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/active_directory/update_trusted_domains_responses.go b/v2/client/active_directory/update_trusted_domains_responses.go deleted file mode 100644 index 5d9dfe99..00000000 --- a/v2/client/active_directory/update_trusted_domains_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package active_directory - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateTrustedDomainsReader is a Reader for the UpdateTrustedDomains structure. -type UpdateTrustedDomainsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTrustedDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTrustedDomainsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTrustedDomainsDefault(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 - } -} - -// NewUpdateTrustedDomainsOK creates a UpdateTrustedDomainsOK with default headers values -func NewUpdateTrustedDomainsOK() *UpdateTrustedDomainsOK { - return &UpdateTrustedDomainsOK{} -} - -/* -UpdateTrustedDomainsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateTrustedDomainsOK struct { - Payload *models.TrustedDomainParams -} - -// IsSuccess returns true when this update trusted domains o k response has a 2xx status code -func (o *UpdateTrustedDomainsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update trusted domains o k response has a 3xx status code -func (o *UpdateTrustedDomainsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update trusted domains o k response has a 4xx status code -func (o *UpdateTrustedDomainsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update trusted domains o k response has a 5xx status code -func (o *UpdateTrustedDomainsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update trusted domains o k response a status code equal to that given -func (o *UpdateTrustedDomainsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update trusted domains o k response -func (o *UpdateTrustedDomainsOK) Code() int { - return 200 -} - -func (o *UpdateTrustedDomainsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-domains][%d] updateTrustedDomainsOK %s", 200, payload) -} - -func (o *UpdateTrustedDomainsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-domains][%d] updateTrustedDomainsOK %s", 200, payload) -} - -func (o *UpdateTrustedDomainsOK) GetPayload() *models.TrustedDomainParams { - return o.Payload -} - -func (o *UpdateTrustedDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TrustedDomainParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTrustedDomainsDefault creates a UpdateTrustedDomainsDefault with default headers values -func NewUpdateTrustedDomainsDefault(code int) *UpdateTrustedDomainsDefault { - return &UpdateTrustedDomainsDefault{ - _statusCode: code, - } -} - -/* -UpdateTrustedDomainsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTrustedDomainsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update trusted domains default response has a 2xx status code -func (o *UpdateTrustedDomainsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update trusted domains default response has a 3xx status code -func (o *UpdateTrustedDomainsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update trusted domains default response has a 4xx status code -func (o *UpdateTrustedDomainsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update trusted domains default response has a 5xx status code -func (o *UpdateTrustedDomainsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update trusted domains default response a status code equal to that given -func (o *UpdateTrustedDomainsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update trusted domains default response -func (o *UpdateTrustedDomainsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTrustedDomainsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-domains][%d] UpdateTrustedDomains default %s", o._statusCode, payload) -} - -func (o *UpdateTrustedDomainsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-domains][%d] UpdateTrustedDomains default %s", o._statusCode, payload) -} - -func (o *UpdateTrustedDomainsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateTrustedDomainsDefault) 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/agent/agent_client.go b/v2/client/agent/agent_client.go deleted file mode 100644 index 9edb2a15..00000000 --- a/v2/client/agent/agent_client.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new agent API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new agent API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new agent API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for agent API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithAccept allows the client to force the Accept header -// to negotiate a specific Producer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithAccept(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{mime} - } -} - -// WithAcceptApplicationJSON sets the Accept header to "application/json". -func WithAcceptApplicationJSON(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/json"} -} - -// WithAcceptApplicationOctetStream sets the Accept header to "application/octet-stream". -func WithAcceptApplicationOctetStream(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/octet-stream"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - CreateUpgradeTask(params *CreateUpgradeTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUpgradeTaskCreated, error) - - DownloadAgent(params *DownloadAgentParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*DownloadAgentOK, error) - - GetUpgradeTasks(params *GetUpgradeTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUpgradeTasksOK, error) - - PerformActionOnAgentUpgradeTask(params *PerformActionOnAgentUpgradeTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnAgentUpgradeTaskCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateUpgradeTask creates an upgrade task - -Create a schedule based agent upgrade task. -*/ -func (a *Client) CreateUpgradeTask(params *CreateUpgradeTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUpgradeTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateUpgradeTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateUpgradeTask", - Method: "POST", - PathPattern: "/data-protect/agents/upgrade-tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateUpgradeTaskReader{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.(*CreateUpgradeTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateUpgradeTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadAgent downloads agent - -Download agent for different hosts. -*/ -func (a *Client) DownloadAgent(params *DownloadAgentParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*DownloadAgentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadAgentParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadAgent", - Method: "POST", - PathPattern: "/data-protect/agents/download", - ProducesMediaTypes: []string{"application/octet-stream"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadAgentReader{formats: a.formats, writer: writer}, - 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.(*DownloadAgentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadAgentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUpgradeTasks gets upgrade tasks - -Get the list of agent upgrade tasks. -*/ -func (a *Client) GetUpgradeTasks(params *GetUpgradeTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUpgradeTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUpgradeTasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetUpgradeTasks", - Method: "GET", - PathPattern: "/data-protect/agents/upgrade-tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUpgradeTasksReader{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.(*GetUpgradeTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUpgradeTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PerformActionOnAgentUpgradeTask performs action on an upgrade task - -Perform actions on an agent upgrade task. -*/ -func (a *Client) PerformActionOnAgentUpgradeTask(params *PerformActionOnAgentUpgradeTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnAgentUpgradeTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformActionOnAgentUpgradeTaskParams() - } - op := &runtime.ClientOperation{ - ID: "PerformActionOnAgentUpgradeTask", - Method: "POST", - PathPattern: "/data-protect/agents/upgrade-tasks/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformActionOnAgentUpgradeTaskReader{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.(*PerformActionOnAgentUpgradeTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformActionOnAgentUpgradeTaskDefault) - 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/v2/client/agent/create_upgrade_task_parameters.go b/v2/client/agent/create_upgrade_task_parameters.go deleted file mode 100644 index a4febca1..00000000 --- a/v2/client/agent/create_upgrade_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateUpgradeTaskParams creates a new CreateUpgradeTaskParams 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 NewCreateUpgradeTaskParams() *CreateUpgradeTaskParams { - return &CreateUpgradeTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateUpgradeTaskParamsWithTimeout creates a new CreateUpgradeTaskParams object -// with the ability to set a timeout on a request. -func NewCreateUpgradeTaskParamsWithTimeout(timeout time.Duration) *CreateUpgradeTaskParams { - return &CreateUpgradeTaskParams{ - timeout: timeout, - } -} - -// NewCreateUpgradeTaskParamsWithContext creates a new CreateUpgradeTaskParams object -// with the ability to set a context for a request. -func NewCreateUpgradeTaskParamsWithContext(ctx context.Context) *CreateUpgradeTaskParams { - return &CreateUpgradeTaskParams{ - Context: ctx, - } -} - -// NewCreateUpgradeTaskParamsWithHTTPClient creates a new CreateUpgradeTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateUpgradeTaskParamsWithHTTPClient(client *http.Client) *CreateUpgradeTaskParams { - return &CreateUpgradeTaskParams{ - HTTPClient: client, - } -} - -/* -CreateUpgradeTaskParams contains all the parameters to send to the API endpoint - - for the create upgrade task operation. - - Typically these are written to a http.Request. -*/ -type CreateUpgradeTaskParams struct { - - /* Body. - - Specifies parameters to create a schedule based agent upgrade task. - */ - Body *models.CreateUpgradeTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create upgrade task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUpgradeTaskParams) WithDefaults() *CreateUpgradeTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create upgrade task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUpgradeTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create upgrade task params -func (o *CreateUpgradeTaskParams) WithTimeout(timeout time.Duration) *CreateUpgradeTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create upgrade task params -func (o *CreateUpgradeTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create upgrade task params -func (o *CreateUpgradeTaskParams) WithContext(ctx context.Context) *CreateUpgradeTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create upgrade task params -func (o *CreateUpgradeTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create upgrade task params -func (o *CreateUpgradeTaskParams) WithHTTPClient(client *http.Client) *CreateUpgradeTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create upgrade task params -func (o *CreateUpgradeTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create upgrade task params -func (o *CreateUpgradeTaskParams) WithBody(body *models.CreateUpgradeTaskRequest) *CreateUpgradeTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create upgrade task params -func (o *CreateUpgradeTaskParams) SetBody(body *models.CreateUpgradeTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateUpgradeTaskParams) 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/agent/create_upgrade_task_responses.go b/v2/client/agent/create_upgrade_task_responses.go deleted file mode 100644 index e90d9abc..00000000 --- a/v2/client/agent/create_upgrade_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateUpgradeTaskReader is a Reader for the CreateUpgradeTask structure. -type CreateUpgradeTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateUpgradeTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateUpgradeTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateUpgradeTaskDefault(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 - } -} - -// NewCreateUpgradeTaskCreated creates a CreateUpgradeTaskCreated with default headers values -func NewCreateUpgradeTaskCreated() *CreateUpgradeTaskCreated { - return &CreateUpgradeTaskCreated{} -} - -/* -CreateUpgradeTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateUpgradeTaskCreated struct { - Payload *models.AgentUpgradeTaskState -} - -// IsSuccess returns true when this create upgrade task created response has a 2xx status code -func (o *CreateUpgradeTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create upgrade task created response has a 3xx status code -func (o *CreateUpgradeTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create upgrade task created response has a 4xx status code -func (o *CreateUpgradeTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create upgrade task created response has a 5xx status code -func (o *CreateUpgradeTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create upgrade task created response a status code equal to that given -func (o *CreateUpgradeTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create upgrade task created response -func (o *CreateUpgradeTaskCreated) Code() int { - return 201 -} - -func (o *CreateUpgradeTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks][%d] createUpgradeTaskCreated %s", 201, payload) -} - -func (o *CreateUpgradeTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks][%d] createUpgradeTaskCreated %s", 201, payload) -} - -func (o *CreateUpgradeTaskCreated) GetPayload() *models.AgentUpgradeTaskState { - return o.Payload -} - -func (o *CreateUpgradeTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AgentUpgradeTaskState) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateUpgradeTaskDefault creates a CreateUpgradeTaskDefault with default headers values -func NewCreateUpgradeTaskDefault(code int) *CreateUpgradeTaskDefault { - return &CreateUpgradeTaskDefault{ - _statusCode: code, - } -} - -/* -CreateUpgradeTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateUpgradeTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create upgrade task default response has a 2xx status code -func (o *CreateUpgradeTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create upgrade task default response has a 3xx status code -func (o *CreateUpgradeTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create upgrade task default response has a 4xx status code -func (o *CreateUpgradeTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create upgrade task default response has a 5xx status code -func (o *CreateUpgradeTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create upgrade task default response a status code equal to that given -func (o *CreateUpgradeTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create upgrade task default response -func (o *CreateUpgradeTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateUpgradeTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks][%d] CreateUpgradeTask default %s", o._statusCode, payload) -} - -func (o *CreateUpgradeTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks][%d] CreateUpgradeTask default %s", o._statusCode, payload) -} - -func (o *CreateUpgradeTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateUpgradeTaskDefault) 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/agent/download_agent_parameters.go b/v2/client/agent/download_agent_parameters.go deleted file mode 100644 index ded92ae5..00000000 --- a/v2/client/agent/download_agent_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDownloadAgentParams creates a new DownloadAgentParams 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 NewDownloadAgentParams() *DownloadAgentParams { - return &DownloadAgentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadAgentParamsWithTimeout creates a new DownloadAgentParams object -// with the ability to set a timeout on a request. -func NewDownloadAgentParamsWithTimeout(timeout time.Duration) *DownloadAgentParams { - return &DownloadAgentParams{ - timeout: timeout, - } -} - -// NewDownloadAgentParamsWithContext creates a new DownloadAgentParams object -// with the ability to set a context for a request. -func NewDownloadAgentParamsWithContext(ctx context.Context) *DownloadAgentParams { - return &DownloadAgentParams{ - Context: ctx, - } -} - -// NewDownloadAgentParamsWithHTTPClient creates a new DownloadAgentParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadAgentParamsWithHTTPClient(client *http.Client) *DownloadAgentParams { - return &DownloadAgentParams{ - HTTPClient: client, - } -} - -/* -DownloadAgentParams contains all the parameters to send to the API endpoint - - for the download agent operation. - - Typically these are written to a http.Request. -*/ -type DownloadAgentParams struct { - - /* Body. - - Specifies agent details. - */ - Body *models.DownloadAgentRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download agent params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadAgentParams) WithDefaults() *DownloadAgentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download agent params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadAgentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download agent params -func (o *DownloadAgentParams) WithTimeout(timeout time.Duration) *DownloadAgentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download agent params -func (o *DownloadAgentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download agent params -func (o *DownloadAgentParams) WithContext(ctx context.Context) *DownloadAgentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download agent params -func (o *DownloadAgentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download agent params -func (o *DownloadAgentParams) WithHTTPClient(client *http.Client) *DownloadAgentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download agent params -func (o *DownloadAgentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the download agent params -func (o *DownloadAgentParams) WithBody(body *models.DownloadAgentRequestParams) *DownloadAgentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the download agent params -func (o *DownloadAgentParams) SetBody(body *models.DownloadAgentRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadAgentParams) 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/agent/download_agent_responses.go b/v2/client/agent/download_agent_responses.go deleted file mode 100644 index 50138230..00000000 --- a/v2/client/agent/download_agent_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DownloadAgentReader is a Reader for the DownloadAgent structure. -type DownloadAgentReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadAgentOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadAgentDefault(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 - } -} - -// NewDownloadAgentOK creates a DownloadAgentOK with default headers values -func NewDownloadAgentOK(writer io.Writer) *DownloadAgentOK { - return &DownloadAgentOK{ - - Payload: writer, - } -} - -/* -DownloadAgentOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadAgentOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this download agent o k response has a 2xx status code -func (o *DownloadAgentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download agent o k response has a 3xx status code -func (o *DownloadAgentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download agent o k response has a 4xx status code -func (o *DownloadAgentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download agent o k response has a 5xx status code -func (o *DownloadAgentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download agent o k response a status code equal to that given -func (o *DownloadAgentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download agent o k response -func (o *DownloadAgentOK) Code() int { - return 200 -} - -func (o *DownloadAgentOK) Error() string { - return fmt.Sprintf("[POST /data-protect/agents/download][%d] downloadAgentOK", 200) -} - -func (o *DownloadAgentOK) String() string { - return fmt.Sprintf("[POST /data-protect/agents/download][%d] downloadAgentOK", 200) -} - -func (o *DownloadAgentOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *DownloadAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadAgentDefault creates a DownloadAgentDefault with default headers values -func NewDownloadAgentDefault(code int) *DownloadAgentDefault { - return &DownloadAgentDefault{ - _statusCode: code, - } -} - -/* -DownloadAgentDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadAgentDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this download agent default response has a 2xx status code -func (o *DownloadAgentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download agent default response has a 3xx status code -func (o *DownloadAgentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download agent default response has a 4xx status code -func (o *DownloadAgentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download agent default response has a 5xx status code -func (o *DownloadAgentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download agent default response a status code equal to that given -func (o *DownloadAgentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download agent default response -func (o *DownloadAgentDefault) Code() int { - return o._statusCode -} - -func (o *DownloadAgentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/download][%d] DownloadAgent default %s", o._statusCode, payload) -} - -func (o *DownloadAgentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/download][%d] DownloadAgent default %s", o._statusCode, payload) -} - -func (o *DownloadAgentDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DownloadAgentDefault) 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/agent/get_upgrade_tasks_parameters.go b/v2/client/agent/get_upgrade_tasks_parameters.go deleted file mode 100644 index a7905377..00000000 --- a/v2/client/agent/get_upgrade_tasks_parameters.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/go-openapi/swag" -) - -// NewGetUpgradeTasksParams creates a new GetUpgradeTasksParams 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 NewGetUpgradeTasksParams() *GetUpgradeTasksParams { - return &GetUpgradeTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUpgradeTasksParamsWithTimeout creates a new GetUpgradeTasksParams object -// with the ability to set a timeout on a request. -func NewGetUpgradeTasksParamsWithTimeout(timeout time.Duration) *GetUpgradeTasksParams { - return &GetUpgradeTasksParams{ - timeout: timeout, - } -} - -// NewGetUpgradeTasksParamsWithContext creates a new GetUpgradeTasksParams object -// with the ability to set a context for a request. -func NewGetUpgradeTasksParamsWithContext(ctx context.Context) *GetUpgradeTasksParams { - return &GetUpgradeTasksParams{ - Context: ctx, - } -} - -// NewGetUpgradeTasksParamsWithHTTPClient creates a new GetUpgradeTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUpgradeTasksParamsWithHTTPClient(client *http.Client) *GetUpgradeTasksParams { - return &GetUpgradeTasksParams{ - HTTPClient: client, - } -} - -/* -GetUpgradeTasksParams contains all the parameters to send to the API endpoint - - for the get upgrade tasks operation. - - Typically these are written to a http.Request. -*/ -type GetUpgradeTasksParams struct { - - /* Ids. - - Specifies IDs of tasks to be fetched. - */ - Ids []int64 - - /* IncludeTenants. - - If true, the response will include upgrade tasks which were created by all tenants which the current user has permission to see. If false, then only upgrade tasks created by the current user will be returned. - */ - IncludeTenants *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get upgrade tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUpgradeTasksParams) WithDefaults() *GetUpgradeTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get upgrade tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUpgradeTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithTimeout(timeout time.Duration) *GetUpgradeTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithContext(ctx context.Context) *GetUpgradeTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithHTTPClient(client *http.Client) *GetUpgradeTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithIds(ids []int64) *GetUpgradeTasksParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithIncludeTenants(includeTenants *bool) *GetUpgradeTasksParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithTenantIds adds the tenantIds to the get upgrade tasks params -func (o *GetUpgradeTasksParams) WithTenantIds(tenantIds []string) *GetUpgradeTasksParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get upgrade tasks params -func (o *GetUpgradeTasksParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUpgradeTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetUpgradeTasks binds the parameter ids -func (o *GetUpgradeTasksParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetUpgradeTasks binds the parameter tenantIds -func (o *GetUpgradeTasksParams) 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/client/agent/get_upgrade_tasks_responses.go b/v2/client/agent/get_upgrade_tasks_responses.go deleted file mode 100644 index 03d88726..00000000 --- a/v2/client/agent/get_upgrade_tasks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetUpgradeTasksReader is a Reader for the GetUpgradeTasks structure. -type GetUpgradeTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUpgradeTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUpgradeTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUpgradeTasksDefault(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 - } -} - -// NewGetUpgradeTasksOK creates a GetUpgradeTasksOK with default headers values -func NewGetUpgradeTasksOK() *GetUpgradeTasksOK { - return &GetUpgradeTasksOK{} -} - -/* -GetUpgradeTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUpgradeTasksOK struct { - Payload *models.AgentUpgradeTaskStates -} - -// IsSuccess returns true when this get upgrade tasks o k response has a 2xx status code -func (o *GetUpgradeTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get upgrade tasks o k response has a 3xx status code -func (o *GetUpgradeTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get upgrade tasks o k response has a 4xx status code -func (o *GetUpgradeTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get upgrade tasks o k response has a 5xx status code -func (o *GetUpgradeTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get upgrade tasks o k response a status code equal to that given -func (o *GetUpgradeTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get upgrade tasks o k response -func (o *GetUpgradeTasksOK) Code() int { - return 200 -} - -func (o *GetUpgradeTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/agents/upgrade-tasks][%d] getUpgradeTasksOK %s", 200, payload) -} - -func (o *GetUpgradeTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/agents/upgrade-tasks][%d] getUpgradeTasksOK %s", 200, payload) -} - -func (o *GetUpgradeTasksOK) GetPayload() *models.AgentUpgradeTaskStates { - return o.Payload -} - -func (o *GetUpgradeTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AgentUpgradeTaskStates) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUpgradeTasksDefault creates a GetUpgradeTasksDefault with default headers values -func NewGetUpgradeTasksDefault(code int) *GetUpgradeTasksDefault { - return &GetUpgradeTasksDefault{ - _statusCode: code, - } -} - -/* -GetUpgradeTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUpgradeTasksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get upgrade tasks default response has a 2xx status code -func (o *GetUpgradeTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get upgrade tasks default response has a 3xx status code -func (o *GetUpgradeTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get upgrade tasks default response has a 4xx status code -func (o *GetUpgradeTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get upgrade tasks default response has a 5xx status code -func (o *GetUpgradeTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get upgrade tasks default response a status code equal to that given -func (o *GetUpgradeTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get upgrade tasks default response -func (o *GetUpgradeTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetUpgradeTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/agents/upgrade-tasks][%d] GetUpgradeTasks default %s", o._statusCode, payload) -} - -func (o *GetUpgradeTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/agents/upgrade-tasks][%d] GetUpgradeTasks default %s", o._statusCode, payload) -} - -func (o *GetUpgradeTasksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetUpgradeTasksDefault) 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/agent/perform_action_on_agent_upgrade_task_parameters.go b/v2/client/agent/perform_action_on_agent_upgrade_task_parameters.go deleted file mode 100644 index a61015a3..00000000 --- a/v2/client/agent/perform_action_on_agent_upgrade_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformActionOnAgentUpgradeTaskParams creates a new PerformActionOnAgentUpgradeTaskParams 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 NewPerformActionOnAgentUpgradeTaskParams() *PerformActionOnAgentUpgradeTaskParams { - return &PerformActionOnAgentUpgradeTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformActionOnAgentUpgradeTaskParamsWithTimeout creates a new PerformActionOnAgentUpgradeTaskParams object -// with the ability to set a timeout on a request. -func NewPerformActionOnAgentUpgradeTaskParamsWithTimeout(timeout time.Duration) *PerformActionOnAgentUpgradeTaskParams { - return &PerformActionOnAgentUpgradeTaskParams{ - timeout: timeout, - } -} - -// NewPerformActionOnAgentUpgradeTaskParamsWithContext creates a new PerformActionOnAgentUpgradeTaskParams object -// with the ability to set a context for a request. -func NewPerformActionOnAgentUpgradeTaskParamsWithContext(ctx context.Context) *PerformActionOnAgentUpgradeTaskParams { - return &PerformActionOnAgentUpgradeTaskParams{ - Context: ctx, - } -} - -// NewPerformActionOnAgentUpgradeTaskParamsWithHTTPClient creates a new PerformActionOnAgentUpgradeTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformActionOnAgentUpgradeTaskParamsWithHTTPClient(client *http.Client) *PerformActionOnAgentUpgradeTaskParams { - return &PerformActionOnAgentUpgradeTaskParams{ - HTTPClient: client, - } -} - -/* -PerformActionOnAgentUpgradeTaskParams contains all the parameters to send to the API endpoint - - for the perform action on agent upgrade task operation. - - Typically these are written to a http.Request. -*/ -type PerformActionOnAgentUpgradeTaskParams struct { - - /* Body. - - Specifies the parameters to perform an action on an agent upgrade task. - */ - Body *models.AgentUpgradeTaskActionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform action on agent upgrade task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnAgentUpgradeTaskParams) WithDefaults() *PerformActionOnAgentUpgradeTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform action on agent upgrade task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnAgentUpgradeTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) WithTimeout(timeout time.Duration) *PerformActionOnAgentUpgradeTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) WithContext(ctx context.Context) *PerformActionOnAgentUpgradeTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) WithHTTPClient(client *http.Client) *PerformActionOnAgentUpgradeTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) WithBody(body *models.AgentUpgradeTaskActionRequest) *PerformActionOnAgentUpgradeTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform action on agent upgrade task params -func (o *PerformActionOnAgentUpgradeTaskParams) SetBody(body *models.AgentUpgradeTaskActionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformActionOnAgentUpgradeTaskParams) 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/agent/perform_action_on_agent_upgrade_task_responses.go b/v2/client/agent/perform_action_on_agent_upgrade_task_responses.go deleted file mode 100644 index 718f69c2..00000000 --- a/v2/client/agent/perform_action_on_agent_upgrade_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package agent - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformActionOnAgentUpgradeTaskReader is a Reader for the PerformActionOnAgentUpgradeTask structure. -type PerformActionOnAgentUpgradeTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformActionOnAgentUpgradeTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPerformActionOnAgentUpgradeTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformActionOnAgentUpgradeTaskDefault(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 - } -} - -// NewPerformActionOnAgentUpgradeTaskCreated creates a PerformActionOnAgentUpgradeTaskCreated with default headers values -func NewPerformActionOnAgentUpgradeTaskCreated() *PerformActionOnAgentUpgradeTaskCreated { - return &PerformActionOnAgentUpgradeTaskCreated{} -} - -/* -PerformActionOnAgentUpgradeTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type PerformActionOnAgentUpgradeTaskCreated struct { - Payload *models.AgentUpgradeTaskActionObject -} - -// IsSuccess returns true when this perform action on agent upgrade task created response has a 2xx status code -func (o *PerformActionOnAgentUpgradeTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform action on agent upgrade task created response has a 3xx status code -func (o *PerformActionOnAgentUpgradeTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform action on agent upgrade task created response has a 4xx status code -func (o *PerformActionOnAgentUpgradeTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform action on agent upgrade task created response has a 5xx status code -func (o *PerformActionOnAgentUpgradeTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this perform action on agent upgrade task created response a status code equal to that given -func (o *PerformActionOnAgentUpgradeTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the perform action on agent upgrade task created response -func (o *PerformActionOnAgentUpgradeTaskCreated) Code() int { - return 201 -} - -func (o *PerformActionOnAgentUpgradeTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks/actions][%d] performActionOnAgentUpgradeTaskCreated %s", 201, payload) -} - -func (o *PerformActionOnAgentUpgradeTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks/actions][%d] performActionOnAgentUpgradeTaskCreated %s", 201, payload) -} - -func (o *PerformActionOnAgentUpgradeTaskCreated) GetPayload() *models.AgentUpgradeTaskActionObject { - return o.Payload -} - -func (o *PerformActionOnAgentUpgradeTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AgentUpgradeTaskActionObject) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPerformActionOnAgentUpgradeTaskDefault creates a PerformActionOnAgentUpgradeTaskDefault with default headers values -func NewPerformActionOnAgentUpgradeTaskDefault(code int) *PerformActionOnAgentUpgradeTaskDefault { - return &PerformActionOnAgentUpgradeTaskDefault{ - _statusCode: code, - } -} - -/* -PerformActionOnAgentUpgradeTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformActionOnAgentUpgradeTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform action on agent upgrade task default response has a 2xx status code -func (o *PerformActionOnAgentUpgradeTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform action on agent upgrade task default response has a 3xx status code -func (o *PerformActionOnAgentUpgradeTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform action on agent upgrade task default response has a 4xx status code -func (o *PerformActionOnAgentUpgradeTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform action on agent upgrade task default response has a 5xx status code -func (o *PerformActionOnAgentUpgradeTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform action on agent upgrade task default response a status code equal to that given -func (o *PerformActionOnAgentUpgradeTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform action on agent upgrade task default response -func (o *PerformActionOnAgentUpgradeTaskDefault) Code() int { - return o._statusCode -} - -func (o *PerformActionOnAgentUpgradeTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks/actions][%d] PerformActionOnAgentUpgradeTask default %s", o._statusCode, payload) -} - -func (o *PerformActionOnAgentUpgradeTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/agents/upgrade-tasks/actions][%d] PerformActionOnAgentUpgradeTask default %s", o._statusCode, payload) -} - -func (o *PerformActionOnAgentUpgradeTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformActionOnAgentUpgradeTaskDefault) 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/alert/alert_client.go b/v2/client/alert/alert_client.go deleted file mode 100644 index 5212bf3f..00000000 --- a/v2/client/alert/alert_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new alert API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new alert API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new alert API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for alert API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAlertSummary(params *GetAlertSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertSummaryOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAlertSummary gets alerts summary - -Get alerts summary grouped by category. -*/ -func (a *Client) GetAlertSummary(params *GetAlertSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAlertSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetAlertSummary", - Method: "GET", - PathPattern: "/alerts-summary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAlertSummaryReader{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.(*GetAlertSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAlertSummaryDefault) - 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/v2/client/alert/get_alert_summary_parameters.go b/v2/client/alert/get_alert_summary_parameters.go deleted file mode 100644 index 82a6b537..00000000 --- a/v2/client/alert/get_alert_summary_parameters.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// 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/go-openapi/swag" -) - -// NewGetAlertSummaryParams creates a new GetAlertSummaryParams 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 NewGetAlertSummaryParams() *GetAlertSummaryParams { - return &GetAlertSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertSummaryParamsWithTimeout creates a new GetAlertSummaryParams object -// with the ability to set a timeout on a request. -func NewGetAlertSummaryParamsWithTimeout(timeout time.Duration) *GetAlertSummaryParams { - return &GetAlertSummaryParams{ - timeout: timeout, - } -} - -// NewGetAlertSummaryParamsWithContext creates a new GetAlertSummaryParams object -// with the ability to set a context for a request. -func NewGetAlertSummaryParamsWithContext(ctx context.Context) *GetAlertSummaryParams { - return &GetAlertSummaryParams{ - Context: ctx, - } -} - -// NewGetAlertSummaryParamsWithHTTPClient creates a new GetAlertSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertSummaryParamsWithHTTPClient(client *http.Client) *GetAlertSummaryParams { - return &GetAlertSummaryParams{ - HTTPClient: client, - } -} - -/* -GetAlertSummaryParams contains all the parameters to send to the API endpoint - - for the get alert summary operation. - - Typically these are written to a http.Request. -*/ -type GetAlertSummaryParams struct { - - /* EndTimeUsecs. - - Filter by end time. Specify the end time as a Unix epoch Timestamp (in microseconds). By default it is current time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* IncludeTenants. - - IncludeTenants specifies if alerts of all the tenants under the - hierarchy of the logged in user's organization should be used to - compute summary. - */ - IncludeTenants *bool - - /* StartTimeUsecs. - - Filter by start time. Specify the start time as a Unix epoch Timestamp (in microseconds). By default it is current time minus a day. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* StatesList. - - Specifies list of alert states to filter alerts by. If not specified, - only open alerts will be used to get summary. - */ - StatesList []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which alerts are to be - used to compute summary. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alert summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertSummaryParams) WithDefaults() *GetAlertSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alert summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get alert summary params -func (o *GetAlertSummaryParams) WithTimeout(timeout time.Duration) *GetAlertSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alert summary params -func (o *GetAlertSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alert summary params -func (o *GetAlertSummaryParams) WithContext(ctx context.Context) *GetAlertSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alert summary params -func (o *GetAlertSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alert summary params -func (o *GetAlertSummaryParams) WithHTTPClient(client *http.Client) *GetAlertSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alert summary params -func (o *GetAlertSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get alert summary params -func (o *GetAlertSummaryParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetAlertSummaryParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get alert summary params -func (o *GetAlertSummaryParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithIncludeTenants adds the includeTenants to the get alert summary params -func (o *GetAlertSummaryParams) WithIncludeTenants(includeTenants *bool) *GetAlertSummaryParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get alert summary params -func (o *GetAlertSummaryParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get alert summary params -func (o *GetAlertSummaryParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetAlertSummaryParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get alert summary params -func (o *GetAlertSummaryParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStatesList adds the statesList to the get alert summary params -func (o *GetAlertSummaryParams) WithStatesList(statesList []string) *GetAlertSummaryParams { - o.SetStatesList(statesList) - return o -} - -// SetStatesList adds the statesList to the get alert summary params -func (o *GetAlertSummaryParams) SetStatesList(statesList []string) { - o.StatesList = statesList -} - -// WithTenantIds adds the tenantIds to the get alert summary params -func (o *GetAlertSummaryParams) WithTenantIds(tenantIds []string) *GetAlertSummaryParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get alert summary params -func (o *GetAlertSummaryParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); 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.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.StatesList != nil { - - // binding items for statesList - joinedStatesList := o.bindParamStatesList(reg) - - // query array param statesList - if err := r.SetQueryParam("statesList", joinedStatesList...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAlertSummary binds the parameter statesList -func (o *GetAlertSummaryParams) bindParamStatesList(formats strfmt.Registry) []string { - statesListIR := o.StatesList - - var statesListIC []string - for _, statesListIIR := range statesListIR { // explode []string - - statesListIIV := statesListIIR // string as string - statesListIC = append(statesListIC, statesListIIV) - } - - // items.CollectionFormat: "" - statesListIS := swag.JoinByFormat(statesListIC, "") - - return statesListIS -} - -// bindParamGetAlertSummary binds the parameter tenantIds -func (o *GetAlertSummaryParams) 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/client/alert/get_alert_summary_responses.go b/v2/client/alert/get_alert_summary_responses.go deleted file mode 100644 index 4e795ce5..00000000 --- a/v2/client/alert/get_alert_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAlertSummaryReader is a Reader for the GetAlertSummary structure. -type GetAlertSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAlertSummaryDefault(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 - } -} - -// NewGetAlertSummaryOK creates a GetAlertSummaryOK with default headers values -func NewGetAlertSummaryOK() *GetAlertSummaryOK { - return &GetAlertSummaryOK{} -} - -/* -GetAlertSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAlertSummaryOK struct { - Payload *models.AlertsSummaryResponse -} - -// IsSuccess returns true when this get alert summary o k response has a 2xx status code -func (o *GetAlertSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get alert summary o k response has a 3xx status code -func (o *GetAlertSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get alert summary o k response has a 4xx status code -func (o *GetAlertSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get alert summary o k response has a 5xx status code -func (o *GetAlertSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get alert summary o k response a status code equal to that given -func (o *GetAlertSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get alert summary o k response -func (o *GetAlertSummaryOK) Code() int { - return 200 -} - -func (o *GetAlertSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /alerts-summary][%d] getAlertSummaryOK %s", 200, payload) -} - -func (o *GetAlertSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /alerts-summary][%d] getAlertSummaryOK %s", 200, payload) -} - -func (o *GetAlertSummaryOK) GetPayload() *models.AlertsSummaryResponse { - return o.Payload -} - -func (o *GetAlertSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AlertsSummaryResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertSummaryDefault creates a GetAlertSummaryDefault with default headers values -func NewGetAlertSummaryDefault(code int) *GetAlertSummaryDefault { - return &GetAlertSummaryDefault{ - _statusCode: code, - } -} - -/* -GetAlertSummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAlertSummaryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get alert summary default response has a 2xx status code -func (o *GetAlertSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get alert summary default response has a 3xx status code -func (o *GetAlertSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get alert summary default response has a 4xx status code -func (o *GetAlertSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get alert summary default response has a 5xx status code -func (o *GetAlertSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get alert summary default response a status code equal to that given -func (o *GetAlertSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get alert summary default response -func (o *GetAlertSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetAlertSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /alerts-summary][%d] GetAlertSummary default %s", o._statusCode, payload) -} - -func (o *GetAlertSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /alerts-summary][%d] GetAlertSummary default %s", o._statusCode, payload) -} - -func (o *GetAlertSummaryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAlertSummaryDefault) 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/antivirus_service/antivirus_service_client.go b/v2/client/antivirus_service/antivirus_service_client.go deleted file mode 100644 index b8dd070f..00000000 --- a/v2/client/antivirus_service/antivirus_service_client.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new antivirus service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new antivirus service API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new antivirus service API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for antivirus service API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateAntivirusGroup(params *CreateAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAntivirusGroupCreated, error) - - DeleteAntivirusGroup(params *DeleteAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAntivirusGroupNoContent, error) - - DeleteInfectedFiles(params *DeleteInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInfectedFilesCreated, error) - - GetAntivirusServiceGroups(params *GetAntivirusServiceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAntivirusServiceGroupsOK, error) - - GetIcapURIConnectionStatus(params *GetIcapURIConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIcapURIConnectionStatusOK, error) - - GetInfectedFiles(params *GetInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInfectedFilesOK, error) - - UpdateAntivirusGroup(params *UpdateAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAntivirusGroupOK, error) - - UpdateInfectedFiles(params *UpdateInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInfectedFilesCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateAntivirusGroup creates an antivirus service group - -Create Antivirus Service group. -*/ -func (a *Client) CreateAntivirusGroup(params *CreateAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAntivirusGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateAntivirusGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateAntivirusGroup", - Method: "POST", - PathPattern: "/antivirus-service/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateAntivirusGroupReader{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.(*CreateAntivirusGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateAntivirusGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteAntivirusGroup deletes an antivirus service group - -Deletes an Antivirus service group based on given id. -*/ -func (a *Client) DeleteAntivirusGroup(params *DeleteAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAntivirusGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteAntivirusGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteAntivirusGroup", - Method: "DELETE", - PathPattern: "/antivirus-service/groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteAntivirusGroupReader{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.(*DeleteAntivirusGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteAntivirusGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteInfectedFiles deletes infected files - -Delete infected files. -*/ -func (a *Client) DeleteInfectedFiles(params *DeleteInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInfectedFilesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteInfectedFiles", - Method: "DELETE", - PathPattern: "/antivirus-service/infected-files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteInfectedFilesReader{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.(*DeleteInfectedFilesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteInfectedFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAntivirusServiceGroups gets antivirus service groups - -Get Antivirus Service groups. -*/ -func (a *Client) GetAntivirusServiceGroups(params *GetAntivirusServiceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAntivirusServiceGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAntivirusServiceGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAntivirusServiceGroups", - Method: "GET", - PathPattern: "/antivirus-service/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAntivirusServiceGroupsReader{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.(*GetAntivirusServiceGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAntivirusServiceGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIcapURIConnectionStatus gets i c a p Uri connection status - -Get ICAP Uri connection status. -*/ -func (a *Client) GetIcapURIConnectionStatus(params *GetIcapURIConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIcapURIConnectionStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIcapURIConnectionStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetIcapUriConnectionStatus", - Method: "GET", - PathPattern: "/antivirus-service/icap-uri-connection-status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIcapURIConnectionStatusReader{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.(*GetIcapURIConnectionStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIcapURIConnectionStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetInfectedFiles gets infected files - -Get infected files. -*/ -func (a *Client) GetInfectedFiles(params *GetInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInfectedFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "GetInfectedFiles", - Method: "GET", - PathPattern: "/antivirus-service/infected-files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetInfectedFilesReader{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.(*GetInfectedFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetInfectedFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAntivirusGroup updates an antivirus service group with given parameters or if state is specified enable or disable given group - -Update an Antivirus Service group. -*/ -func (a *Client) UpdateAntivirusGroup(params *UpdateAntivirusGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAntivirusGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAntivirusGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAntivirusGroup", - Method: "PUT", - PathPattern: "/antivirus-service/groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAntivirusGroupReader{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.(*UpdateAntivirusGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAntivirusGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInfectedFiles updates infected files state - -Update infected files state. -*/ -func (a *Client) UpdateInfectedFiles(params *UpdateInfectedFilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInfectedFilesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInfectedFilesParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInfectedFiles", - Method: "PUT", - PathPattern: "/antivirus-service/infected-files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInfectedFilesReader{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.(*UpdateInfectedFilesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInfectedFilesDefault) - 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/v2/client/antivirus_service/create_antivirus_group_parameters.go b/v2/client/antivirus_service/create_antivirus_group_parameters.go deleted file mode 100644 index 5067d5f1..00000000 --- a/v2/client/antivirus_service/create_antivirus_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateAntivirusGroupParams creates a new CreateAntivirusGroupParams 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 NewCreateAntivirusGroupParams() *CreateAntivirusGroupParams { - return &CreateAntivirusGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAntivirusGroupParamsWithTimeout creates a new CreateAntivirusGroupParams object -// with the ability to set a timeout on a request. -func NewCreateAntivirusGroupParamsWithTimeout(timeout time.Duration) *CreateAntivirusGroupParams { - return &CreateAntivirusGroupParams{ - timeout: timeout, - } -} - -// NewCreateAntivirusGroupParamsWithContext creates a new CreateAntivirusGroupParams object -// with the ability to set a context for a request. -func NewCreateAntivirusGroupParamsWithContext(ctx context.Context) *CreateAntivirusGroupParams { - return &CreateAntivirusGroupParams{ - Context: ctx, - } -} - -// NewCreateAntivirusGroupParamsWithHTTPClient creates a new CreateAntivirusGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAntivirusGroupParamsWithHTTPClient(client *http.Client) *CreateAntivirusGroupParams { - return &CreateAntivirusGroupParams{ - HTTPClient: client, - } -} - -/* -CreateAntivirusGroupParams contains all the parameters to send to the API endpoint - - for the create antivirus group operation. - - Typically these are written to a http.Request. -*/ -type CreateAntivirusGroupParams struct { - - /* Body. - - Specifies the parameters to create antivirus service group. - */ - Body *models.CreateAntivirusServiceGroupParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAntivirusGroupParams) WithDefaults() *CreateAntivirusGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAntivirusGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create antivirus group params -func (o *CreateAntivirusGroupParams) WithTimeout(timeout time.Duration) *CreateAntivirusGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create antivirus group params -func (o *CreateAntivirusGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create antivirus group params -func (o *CreateAntivirusGroupParams) WithContext(ctx context.Context) *CreateAntivirusGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create antivirus group params -func (o *CreateAntivirusGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create antivirus group params -func (o *CreateAntivirusGroupParams) WithHTTPClient(client *http.Client) *CreateAntivirusGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create antivirus group params -func (o *CreateAntivirusGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create antivirus group params -func (o *CreateAntivirusGroupParams) WithBody(body *models.CreateAntivirusServiceGroupParams) *CreateAntivirusGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create antivirus group params -func (o *CreateAntivirusGroupParams) SetBody(body *models.CreateAntivirusServiceGroupParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAntivirusGroupParams) 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/antivirus_service/create_antivirus_group_responses.go b/v2/client/antivirus_service/create_antivirus_group_responses.go deleted file mode 100644 index 2c293f6f..00000000 --- a/v2/client/antivirus_service/create_antivirus_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateAntivirusGroupReader is a Reader for the CreateAntivirusGroup structure. -type CreateAntivirusGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAntivirusGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAntivirusGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateAntivirusGroupDefault(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 - } -} - -// NewCreateAntivirusGroupCreated creates a CreateAntivirusGroupCreated with default headers values -func NewCreateAntivirusGroupCreated() *CreateAntivirusGroupCreated { - return &CreateAntivirusGroupCreated{} -} - -/* -CreateAntivirusGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateAntivirusGroupCreated struct { - Payload *models.AntivirusServiceGroup -} - -// IsSuccess returns true when this create antivirus group created response has a 2xx status code -func (o *CreateAntivirusGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create antivirus group created response has a 3xx status code -func (o *CreateAntivirusGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create antivirus group created response has a 4xx status code -func (o *CreateAntivirusGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create antivirus group created response has a 5xx status code -func (o *CreateAntivirusGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create antivirus group created response a status code equal to that given -func (o *CreateAntivirusGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create antivirus group created response -func (o *CreateAntivirusGroupCreated) Code() int { - return 201 -} - -func (o *CreateAntivirusGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /antivirus-service/groups][%d] createAntivirusGroupCreated %s", 201, payload) -} - -func (o *CreateAntivirusGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /antivirus-service/groups][%d] createAntivirusGroupCreated %s", 201, payload) -} - -func (o *CreateAntivirusGroupCreated) GetPayload() *models.AntivirusServiceGroup { - return o.Payload -} - -func (o *CreateAntivirusGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAntivirusGroupDefault creates a CreateAntivirusGroupDefault with default headers values -func NewCreateAntivirusGroupDefault(code int) *CreateAntivirusGroupDefault { - return &CreateAntivirusGroupDefault{ - _statusCode: code, - } -} - -/* -CreateAntivirusGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateAntivirusGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create antivirus group default response has a 2xx status code -func (o *CreateAntivirusGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create antivirus group default response has a 3xx status code -func (o *CreateAntivirusGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create antivirus group default response has a 4xx status code -func (o *CreateAntivirusGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create antivirus group default response has a 5xx status code -func (o *CreateAntivirusGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create antivirus group default response a status code equal to that given -func (o *CreateAntivirusGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create antivirus group default response -func (o *CreateAntivirusGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateAntivirusGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /antivirus-service/groups][%d] CreateAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *CreateAntivirusGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /antivirus-service/groups][%d] CreateAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *CreateAntivirusGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateAntivirusGroupDefault) 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/antivirus_service/delete_antivirus_group_parameters.go b/v2/client/antivirus_service/delete_antivirus_group_parameters.go deleted file mode 100644 index 3102a925..00000000 --- a/v2/client/antivirus_service/delete_antivirus_group_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/go-openapi/swag" -) - -// NewDeleteAntivirusGroupParams creates a new DeleteAntivirusGroupParams 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 NewDeleteAntivirusGroupParams() *DeleteAntivirusGroupParams { - return &DeleteAntivirusGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAntivirusGroupParamsWithTimeout creates a new DeleteAntivirusGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteAntivirusGroupParamsWithTimeout(timeout time.Duration) *DeleteAntivirusGroupParams { - return &DeleteAntivirusGroupParams{ - timeout: timeout, - } -} - -// NewDeleteAntivirusGroupParamsWithContext creates a new DeleteAntivirusGroupParams object -// with the ability to set a context for a request. -func NewDeleteAntivirusGroupParamsWithContext(ctx context.Context) *DeleteAntivirusGroupParams { - return &DeleteAntivirusGroupParams{ - Context: ctx, - } -} - -// NewDeleteAntivirusGroupParamsWithHTTPClient creates a new DeleteAntivirusGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAntivirusGroupParamsWithHTTPClient(client *http.Client) *DeleteAntivirusGroupParams { - return &DeleteAntivirusGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteAntivirusGroupParams contains all the parameters to send to the API endpoint - - for the delete antivirus group operation. - - Typically these are written to a http.Request. -*/ -type DeleteAntivirusGroupParams struct { - - /* ID. - - Specifies a unique id of the Antivirus Group to delete. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAntivirusGroupParams) WithDefaults() *DeleteAntivirusGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAntivirusGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) WithTimeout(timeout time.Duration) *DeleteAntivirusGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) WithContext(ctx context.Context) *DeleteAntivirusGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) WithHTTPClient(client *http.Client) *DeleteAntivirusGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) WithID(id int64) *DeleteAntivirusGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete antivirus group params -func (o *DeleteAntivirusGroupParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAntivirusGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/antivirus_service/delete_antivirus_group_responses.go b/v2/client/antivirus_service/delete_antivirus_group_responses.go deleted file mode 100644 index 04680083..00000000 --- a/v2/client/antivirus_service/delete_antivirus_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteAntivirusGroupReader is a Reader for the DeleteAntivirusGroup structure. -type DeleteAntivirusGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAntivirusGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteAntivirusGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteAntivirusGroupDefault(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 - } -} - -// NewDeleteAntivirusGroupNoContent creates a DeleteAntivirusGroupNoContent with default headers values -func NewDeleteAntivirusGroupNoContent() *DeleteAntivirusGroupNoContent { - return &DeleteAntivirusGroupNoContent{} -} - -/* -DeleteAntivirusGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteAntivirusGroupNoContent struct { -} - -// IsSuccess returns true when this delete antivirus group no content response has a 2xx status code -func (o *DeleteAntivirusGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete antivirus group no content response has a 3xx status code -func (o *DeleteAntivirusGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete antivirus group no content response has a 4xx status code -func (o *DeleteAntivirusGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete antivirus group no content response has a 5xx status code -func (o *DeleteAntivirusGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete antivirus group no content response a status code equal to that given -func (o *DeleteAntivirusGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete antivirus group no content response -func (o *DeleteAntivirusGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteAntivirusGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /antivirus-service/groups/{id}][%d] deleteAntivirusGroupNoContent", 204) -} - -func (o *DeleteAntivirusGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /antivirus-service/groups/{id}][%d] deleteAntivirusGroupNoContent", 204) -} - -func (o *DeleteAntivirusGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteAntivirusGroupDefault creates a DeleteAntivirusGroupDefault with default headers values -func NewDeleteAntivirusGroupDefault(code int) *DeleteAntivirusGroupDefault { - return &DeleteAntivirusGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteAntivirusGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteAntivirusGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete antivirus group default response has a 2xx status code -func (o *DeleteAntivirusGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete antivirus group default response has a 3xx status code -func (o *DeleteAntivirusGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete antivirus group default response has a 4xx status code -func (o *DeleteAntivirusGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete antivirus group default response has a 5xx status code -func (o *DeleteAntivirusGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete antivirus group default response a status code equal to that given -func (o *DeleteAntivirusGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete antivirus group default response -func (o *DeleteAntivirusGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteAntivirusGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/groups/{id}][%d] DeleteAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *DeleteAntivirusGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/groups/{id}][%d] DeleteAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *DeleteAntivirusGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteAntivirusGroupDefault) 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/antivirus_service/delete_infected_files_parameters.go b/v2/client/antivirus_service/delete_infected_files_parameters.go deleted file mode 100644 index 13fa7866..00000000 --- a/v2/client/antivirus_service/delete_infected_files_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDeleteInfectedFilesParams creates a new DeleteInfectedFilesParams 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 NewDeleteInfectedFilesParams() *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInfectedFilesParamsWithTimeout creates a new DeleteInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewDeleteInfectedFilesParamsWithTimeout(timeout time.Duration) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - timeout: timeout, - } -} - -// NewDeleteInfectedFilesParamsWithContext creates a new DeleteInfectedFilesParams object -// with the ability to set a context for a request. -func NewDeleteInfectedFilesParamsWithContext(ctx context.Context) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - Context: ctx, - } -} - -// NewDeleteInfectedFilesParamsWithHTTPClient creates a new DeleteInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInfectedFilesParamsWithHTTPClient(client *http.Client) *DeleteInfectedFilesParams { - return &DeleteInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -DeleteInfectedFilesParams contains all the parameters to send to the API endpoint - - for the delete infected files operation. - - Typically these are written to a http.Request. -*/ -type DeleteInfectedFilesParams struct { - - /* Body. - - Specifies the parameters of infected files to be deleted. - */ - Body *models.DeleteInfectedFilesParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInfectedFilesParams) WithDefaults() *DeleteInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete infected files params -func (o *DeleteInfectedFilesParams) WithTimeout(timeout time.Duration) *DeleteInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete infected files params -func (o *DeleteInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete infected files params -func (o *DeleteInfectedFilesParams) WithContext(ctx context.Context) *DeleteInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete infected files params -func (o *DeleteInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete infected files params -func (o *DeleteInfectedFilesParams) WithHTTPClient(client *http.Client) *DeleteInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete infected files params -func (o *DeleteInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete infected files params -func (o *DeleteInfectedFilesParams) WithBody(body *models.DeleteInfectedFilesParameters) *DeleteInfectedFilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete infected files params -func (o *DeleteInfectedFilesParams) SetBody(body *models.DeleteInfectedFilesParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInfectedFilesParams) 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/antivirus_service/delete_infected_files_responses.go b/v2/client/antivirus_service/delete_infected_files_responses.go deleted file mode 100644 index d0137d61..00000000 --- a/v2/client/antivirus_service/delete_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteInfectedFilesReader is a Reader for the DeleteInfectedFiles structure. -type DeleteInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewDeleteInfectedFilesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteInfectedFilesDefault(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 - } -} - -// NewDeleteInfectedFilesCreated creates a DeleteInfectedFilesCreated with default headers values -func NewDeleteInfectedFilesCreated() *DeleteInfectedFilesCreated { - return &DeleteInfectedFilesCreated{} -} - -/* -DeleteInfectedFilesCreated describes a response with status code 201, with default header values. - -Success -*/ -type DeleteInfectedFilesCreated struct { - Payload *models.DeleteInfectedFiles -} - -// IsSuccess returns true when this delete infected files created response has a 2xx status code -func (o *DeleteInfectedFilesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete infected files created response has a 3xx status code -func (o *DeleteInfectedFilesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete infected files created response has a 4xx status code -func (o *DeleteInfectedFilesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete infected files created response has a 5xx status code -func (o *DeleteInfectedFilesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this delete infected files created response a status code equal to that given -func (o *DeleteInfectedFilesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the delete infected files created response -func (o *DeleteInfectedFilesCreated) Code() int { - return 201 -} - -func (o *DeleteInfectedFilesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/infected-files][%d] deleteInfectedFilesCreated %s", 201, payload) -} - -func (o *DeleteInfectedFilesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/infected-files][%d] deleteInfectedFilesCreated %s", 201, payload) -} - -func (o *DeleteInfectedFilesCreated) GetPayload() *models.DeleteInfectedFiles { - return o.Payload -} - -func (o *DeleteInfectedFilesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DeleteInfectedFiles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteInfectedFilesDefault creates a DeleteInfectedFilesDefault with default headers values -func NewDeleteInfectedFilesDefault(code int) *DeleteInfectedFilesDefault { - return &DeleteInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -DeleteInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteInfectedFilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete infected files default response has a 2xx status code -func (o *DeleteInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete infected files default response has a 3xx status code -func (o *DeleteInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete infected files default response has a 4xx status code -func (o *DeleteInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete infected files default response has a 5xx status code -func (o *DeleteInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete infected files default response a status code equal to that given -func (o *DeleteInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete infected files default response -func (o *DeleteInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *DeleteInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/infected-files][%d] DeleteInfectedFiles default %s", o._statusCode, payload) -} - -func (o *DeleteInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /antivirus-service/infected-files][%d] DeleteInfectedFiles default %s", o._statusCode, payload) -} - -func (o *DeleteInfectedFilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteInfectedFilesDefault) 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/antivirus_service/get_antivirus_service_groups_parameters.go b/v2/client/antivirus_service/get_antivirus_service_groups_parameters.go deleted file mode 100644 index d7789354..00000000 --- a/v2/client/antivirus_service/get_antivirus_service_groups_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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" -) - -// NewGetAntivirusServiceGroupsParams creates a new GetAntivirusServiceGroupsParams 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 NewGetAntivirusServiceGroupsParams() *GetAntivirusServiceGroupsParams { - return &GetAntivirusServiceGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAntivirusServiceGroupsParamsWithTimeout creates a new GetAntivirusServiceGroupsParams object -// with the ability to set a timeout on a request. -func NewGetAntivirusServiceGroupsParamsWithTimeout(timeout time.Duration) *GetAntivirusServiceGroupsParams { - return &GetAntivirusServiceGroupsParams{ - timeout: timeout, - } -} - -// NewGetAntivirusServiceGroupsParamsWithContext creates a new GetAntivirusServiceGroupsParams object -// with the ability to set a context for a request. -func NewGetAntivirusServiceGroupsParamsWithContext(ctx context.Context) *GetAntivirusServiceGroupsParams { - return &GetAntivirusServiceGroupsParams{ - Context: ctx, - } -} - -// NewGetAntivirusServiceGroupsParamsWithHTTPClient creates a new GetAntivirusServiceGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAntivirusServiceGroupsParamsWithHTTPClient(client *http.Client) *GetAntivirusServiceGroupsParams { - return &GetAntivirusServiceGroupsParams{ - HTTPClient: client, - } -} - -/* -GetAntivirusServiceGroupsParams contains all the parameters to send to the API endpoint - - for the get antivirus service groups operation. - - Typically these are written to a http.Request. -*/ -type GetAntivirusServiceGroupsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get antivirus service groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAntivirusServiceGroupsParams) WithDefaults() *GetAntivirusServiceGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get antivirus service groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAntivirusServiceGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) WithTimeout(timeout time.Duration) *GetAntivirusServiceGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) WithContext(ctx context.Context) *GetAntivirusServiceGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) WithHTTPClient(client *http.Client) *GetAntivirusServiceGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get antivirus service groups params -func (o *GetAntivirusServiceGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAntivirusServiceGroupsParams) 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/antivirus_service/get_antivirus_service_groups_responses.go b/v2/client/antivirus_service/get_antivirus_service_groups_responses.go deleted file mode 100644 index 494b89ff..00000000 --- a/v2/client/antivirus_service/get_antivirus_service_groups_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAntivirusServiceGroupsReader is a Reader for the GetAntivirusServiceGroups structure. -type GetAntivirusServiceGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAntivirusServiceGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAntivirusServiceGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAntivirusServiceGroupsDefault(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 - } -} - -// NewGetAntivirusServiceGroupsOK creates a GetAntivirusServiceGroupsOK with default headers values -func NewGetAntivirusServiceGroupsOK() *GetAntivirusServiceGroupsOK { - return &GetAntivirusServiceGroupsOK{} -} - -/* -GetAntivirusServiceGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAntivirusServiceGroupsOK struct { - Payload *models.AntivirusServiceGroups -} - -// IsSuccess returns true when this get antivirus service groups o k response has a 2xx status code -func (o *GetAntivirusServiceGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get antivirus service groups o k response has a 3xx status code -func (o *GetAntivirusServiceGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get antivirus service groups o k response has a 4xx status code -func (o *GetAntivirusServiceGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get antivirus service groups o k response has a 5xx status code -func (o *GetAntivirusServiceGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get antivirus service groups o k response a status code equal to that given -func (o *GetAntivirusServiceGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get antivirus service groups o k response -func (o *GetAntivirusServiceGroupsOK) Code() int { - return 200 -} - -func (o *GetAntivirusServiceGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/groups][%d] getAntivirusServiceGroupsOK %s", 200, payload) -} - -func (o *GetAntivirusServiceGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/groups][%d] getAntivirusServiceGroupsOK %s", 200, payload) -} - -func (o *GetAntivirusServiceGroupsOK) GetPayload() *models.AntivirusServiceGroups { - return o.Payload -} - -func (o *GetAntivirusServiceGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroups) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAntivirusServiceGroupsDefault creates a GetAntivirusServiceGroupsDefault with default headers values -func NewGetAntivirusServiceGroupsDefault(code int) *GetAntivirusServiceGroupsDefault { - return &GetAntivirusServiceGroupsDefault{ - _statusCode: code, - } -} - -/* -GetAntivirusServiceGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAntivirusServiceGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get antivirus service groups default response has a 2xx status code -func (o *GetAntivirusServiceGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get antivirus service groups default response has a 3xx status code -func (o *GetAntivirusServiceGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get antivirus service groups default response has a 4xx status code -func (o *GetAntivirusServiceGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get antivirus service groups default response has a 5xx status code -func (o *GetAntivirusServiceGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get antivirus service groups default response a status code equal to that given -func (o *GetAntivirusServiceGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get antivirus service groups default response -func (o *GetAntivirusServiceGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetAntivirusServiceGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/groups][%d] GetAntivirusServiceGroups default %s", o._statusCode, payload) -} - -func (o *GetAntivirusServiceGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/groups][%d] GetAntivirusServiceGroups default %s", o._statusCode, payload) -} - -func (o *GetAntivirusServiceGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAntivirusServiceGroupsDefault) 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/antivirus_service/get_icap_uri_connection_status_parameters.go b/v2/client/antivirus_service/get_icap_uri_connection_status_parameters.go deleted file mode 100644 index d171a103..00000000 --- a/v2/client/antivirus_service/get_icap_uri_connection_status_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/go-openapi/swag" -) - -// NewGetIcapURIConnectionStatusParams creates a new GetIcapURIConnectionStatusParams 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 NewGetIcapURIConnectionStatusParams() *GetIcapURIConnectionStatusParams { - return &GetIcapURIConnectionStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIcapURIConnectionStatusParamsWithTimeout creates a new GetIcapURIConnectionStatusParams object -// with the ability to set a timeout on a request. -func NewGetIcapURIConnectionStatusParamsWithTimeout(timeout time.Duration) *GetIcapURIConnectionStatusParams { - return &GetIcapURIConnectionStatusParams{ - timeout: timeout, - } -} - -// NewGetIcapURIConnectionStatusParamsWithContext creates a new GetIcapURIConnectionStatusParams object -// with the ability to set a context for a request. -func NewGetIcapURIConnectionStatusParamsWithContext(ctx context.Context) *GetIcapURIConnectionStatusParams { - return &GetIcapURIConnectionStatusParams{ - Context: ctx, - } -} - -// NewGetIcapURIConnectionStatusParamsWithHTTPClient creates a new GetIcapURIConnectionStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIcapURIConnectionStatusParamsWithHTTPClient(client *http.Client) *GetIcapURIConnectionStatusParams { - return &GetIcapURIConnectionStatusParams{ - HTTPClient: client, - } -} - -/* -GetIcapURIConnectionStatusParams contains all the parameters to send to the API endpoint - - for the get icap Uri connection status operation. - - Typically these are written to a http.Request. -*/ -type GetIcapURIConnectionStatusParams struct { - - /* Uris. - - Specifies a list of URIs to check connection status. - */ - Uris []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get icap Uri connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIcapURIConnectionStatusParams) WithDefaults() *GetIcapURIConnectionStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get icap Uri connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIcapURIConnectionStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) WithTimeout(timeout time.Duration) *GetIcapURIConnectionStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) WithContext(ctx context.Context) *GetIcapURIConnectionStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) WithHTTPClient(client *http.Client) *GetIcapURIConnectionStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithUris adds the uris to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) WithUris(uris []string) *GetIcapURIConnectionStatusParams { - o.SetUris(uris) - return o -} - -// SetUris adds the uris to the get icap Uri connection status params -func (o *GetIcapURIConnectionStatusParams) SetUris(uris []string) { - o.Uris = uris -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIcapURIConnectionStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Uris != nil { - - // binding items for uris - joinedUris := o.bindParamUris(reg) - - // query array param uris - if err := r.SetQueryParam("uris", joinedUris...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIcapURIConnectionStatus binds the parameter uris -func (o *GetIcapURIConnectionStatusParams) bindParamUris(formats strfmt.Registry) []string { - urisIR := o.Uris - - var urisIC []string - for _, urisIIR := range urisIR { // explode []string - - urisIIV := urisIIR // string as string - urisIC = append(urisIC, urisIIV) - } - - // items.CollectionFormat: "" - urisIS := swag.JoinByFormat(urisIC, "") - - return urisIS -} diff --git a/v2/client/antivirus_service/get_icap_uri_connection_status_responses.go b/v2/client/antivirus_service/get_icap_uri_connection_status_responses.go deleted file mode 100644 index 38e21fe3..00000000 --- a/v2/client/antivirus_service/get_icap_uri_connection_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIcapURIConnectionStatusReader is a Reader for the GetIcapURIConnectionStatus structure. -type GetIcapURIConnectionStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIcapURIConnectionStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIcapURIConnectionStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIcapURIConnectionStatusDefault(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 - } -} - -// NewGetIcapURIConnectionStatusOK creates a GetIcapURIConnectionStatusOK with default headers values -func NewGetIcapURIConnectionStatusOK() *GetIcapURIConnectionStatusOK { - return &GetIcapURIConnectionStatusOK{} -} - -/* -GetIcapURIConnectionStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIcapURIConnectionStatusOK struct { - Payload *models.IcapURIConnectionStatusList -} - -// IsSuccess returns true when this get icap Uri connection status o k response has a 2xx status code -func (o *GetIcapURIConnectionStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get icap Uri connection status o k response has a 3xx status code -func (o *GetIcapURIConnectionStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get icap Uri connection status o k response has a 4xx status code -func (o *GetIcapURIConnectionStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get icap Uri connection status o k response has a 5xx status code -func (o *GetIcapURIConnectionStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get icap Uri connection status o k response a status code equal to that given -func (o *GetIcapURIConnectionStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get icap Uri connection status o k response -func (o *GetIcapURIConnectionStatusOK) Code() int { - return 200 -} - -func (o *GetIcapURIConnectionStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/icap-uri-connection-status][%d] getIcapUriConnectionStatusOK %s", 200, payload) -} - -func (o *GetIcapURIConnectionStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/icap-uri-connection-status][%d] getIcapUriConnectionStatusOK %s", 200, payload) -} - -func (o *GetIcapURIConnectionStatusOK) GetPayload() *models.IcapURIConnectionStatusList { - return o.Payload -} - -func (o *GetIcapURIConnectionStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IcapURIConnectionStatusList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIcapURIConnectionStatusDefault creates a GetIcapURIConnectionStatusDefault with default headers values -func NewGetIcapURIConnectionStatusDefault(code int) *GetIcapURIConnectionStatusDefault { - return &GetIcapURIConnectionStatusDefault{ - _statusCode: code, - } -} - -/* -GetIcapURIConnectionStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIcapURIConnectionStatusDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get icap Uri connection status default response has a 2xx status code -func (o *GetIcapURIConnectionStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get icap Uri connection status default response has a 3xx status code -func (o *GetIcapURIConnectionStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get icap Uri connection status default response has a 4xx status code -func (o *GetIcapURIConnectionStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get icap Uri connection status default response has a 5xx status code -func (o *GetIcapURIConnectionStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get icap Uri connection status default response a status code equal to that given -func (o *GetIcapURIConnectionStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get icap Uri connection status default response -func (o *GetIcapURIConnectionStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetIcapURIConnectionStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/icap-uri-connection-status][%d] GetIcapUriConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetIcapURIConnectionStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/icap-uri-connection-status][%d] GetIcapUriConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetIcapURIConnectionStatusDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIcapURIConnectionStatusDefault) 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/antivirus_service/get_infected_files_parameters.go b/v2/client/antivirus_service/get_infected_files_parameters.go deleted file mode 100644 index dad15b56..00000000 --- a/v2/client/antivirus_service/get_infected_files_parameters.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/go-openapi/swag" -) - -// NewGetInfectedFilesParams creates a new GetInfectedFilesParams 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 NewGetInfectedFilesParams() *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInfectedFilesParamsWithTimeout creates a new GetInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewGetInfectedFilesParamsWithTimeout(timeout time.Duration) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - timeout: timeout, - } -} - -// NewGetInfectedFilesParamsWithContext creates a new GetInfectedFilesParams object -// with the ability to set a context for a request. -func NewGetInfectedFilesParamsWithContext(ctx context.Context) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - Context: ctx, - } -} - -// NewGetInfectedFilesParamsWithHTTPClient creates a new GetInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInfectedFilesParamsWithHTTPClient(client *http.Client) *GetInfectedFilesParams { - return &GetInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -GetInfectedFilesParams contains all the parameters to send to the API endpoint - - for the get infected files operation. - - Typically these are written to a http.Request. -*/ -type GetInfectedFilesParams struct { - - /* Cookie. - - Specifies the pagination cookie. - */ - Cookie *string - - /* MaxCount. - - Specifies the max number of files to be returned. - - Format: int64 - */ - MaxCount *int64 - - /* Path. - - Specifies the file path. - */ - Path *string - - /* States. - - Specifies the file states. - */ - States []string - - /* ViewIds. - - Specifies a list of view ids. Only infected files from these views will be returned. - */ - ViewIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInfectedFilesParams) WithDefaults() *GetInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get infected files params -func (o *GetInfectedFilesParams) WithTimeout(timeout time.Duration) *GetInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get infected files params -func (o *GetInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get infected files params -func (o *GetInfectedFilesParams) WithContext(ctx context.Context) *GetInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get infected files params -func (o *GetInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get infected files params -func (o *GetInfectedFilesParams) WithHTTPClient(client *http.Client) *GetInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get infected files params -func (o *GetInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get infected files params -func (o *GetInfectedFilesParams) WithCookie(cookie *string) *GetInfectedFilesParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get infected files params -func (o *GetInfectedFilesParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithMaxCount adds the maxCount to the get infected files params -func (o *GetInfectedFilesParams) WithMaxCount(maxCount *int64) *GetInfectedFilesParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get infected files params -func (o *GetInfectedFilesParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WithPath adds the path to the get infected files params -func (o *GetInfectedFilesParams) WithPath(path *string) *GetInfectedFilesParams { - o.SetPath(path) - return o -} - -// SetPath adds the path to the get infected files params -func (o *GetInfectedFilesParams) SetPath(path *string) { - o.Path = path -} - -// WithStates adds the states to the get infected files params -func (o *GetInfectedFilesParams) WithStates(states []string) *GetInfectedFilesParams { - o.SetStates(states) - return o -} - -// SetStates adds the states to the get infected files params -func (o *GetInfectedFilesParams) SetStates(states []string) { - o.States = states -} - -// WithViewIds adds the viewIds to the get infected files params -func (o *GetInfectedFilesParams) WithViewIds(viewIds []int64) *GetInfectedFilesParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get infected files params -func (o *GetInfectedFilesParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInfectedFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.Path != nil { - - // query param path - var qrPath string - - if o.Path != nil { - qrPath = *o.Path - } - qPath := qrPath - if qPath != "" { - - if err := r.SetQueryParam("path", qPath); err != nil { - return err - } - } - } - - if o.States != nil { - - // binding items for states - joinedStates := o.bindParamStates(reg) - - // query array param states - if err := r.SetQueryParam("states", joinedStates...); err != nil { - return err - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetInfectedFiles binds the parameter states -func (o *GetInfectedFilesParams) bindParamStates(formats strfmt.Registry) []string { - statesIR := o.States - - var statesIC []string - for _, statesIIR := range statesIR { // explode []string - - statesIIV := statesIIR // string as string - statesIC = append(statesIC, statesIIV) - } - - // items.CollectionFormat: "" - statesIS := swag.JoinByFormat(statesIC, "") - - return statesIS -} - -// bindParamGetInfectedFiles binds the parameter viewIds -func (o *GetInfectedFilesParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} diff --git a/v2/client/antivirus_service/get_infected_files_responses.go b/v2/client/antivirus_service/get_infected_files_responses.go deleted file mode 100644 index 08a9c90c..00000000 --- a/v2/client/antivirus_service/get_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetInfectedFilesReader is a Reader for the GetInfectedFiles structure. -type GetInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInfectedFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetInfectedFilesDefault(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 - } -} - -// NewGetInfectedFilesOK creates a GetInfectedFilesOK with default headers values -func NewGetInfectedFilesOK() *GetInfectedFilesOK { - return &GetInfectedFilesOK{} -} - -/* -GetInfectedFilesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetInfectedFilesOK struct { - Payload *models.InfectedFiles -} - -// IsSuccess returns true when this get infected files o k response has a 2xx status code -func (o *GetInfectedFilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get infected files o k response has a 3xx status code -func (o *GetInfectedFilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get infected files o k response has a 4xx status code -func (o *GetInfectedFilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get infected files o k response has a 5xx status code -func (o *GetInfectedFilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get infected files o k response a status code equal to that given -func (o *GetInfectedFilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get infected files o k response -func (o *GetInfectedFilesOK) Code() int { - return 200 -} - -func (o *GetInfectedFilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/infected-files][%d] getInfectedFilesOK %s", 200, payload) -} - -func (o *GetInfectedFilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/infected-files][%d] getInfectedFilesOK %s", 200, payload) -} - -func (o *GetInfectedFilesOK) GetPayload() *models.InfectedFiles { - return o.Payload -} - -func (o *GetInfectedFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InfectedFiles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInfectedFilesDefault creates a GetInfectedFilesDefault with default headers values -func NewGetInfectedFilesDefault(code int) *GetInfectedFilesDefault { - return &GetInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -GetInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetInfectedFilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get infected files default response has a 2xx status code -func (o *GetInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get infected files default response has a 3xx status code -func (o *GetInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get infected files default response has a 4xx status code -func (o *GetInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get infected files default response has a 5xx status code -func (o *GetInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get infected files default response a status code equal to that given -func (o *GetInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get infected files default response -func (o *GetInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *GetInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/infected-files][%d] GetInfectedFiles default %s", o._statusCode, payload) -} - -func (o *GetInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /antivirus-service/infected-files][%d] GetInfectedFiles default %s", o._statusCode, payload) -} - -func (o *GetInfectedFilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetInfectedFilesDefault) 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/antivirus_service/update_antivirus_group_parameters.go b/v2/client/antivirus_service/update_antivirus_group_parameters.go deleted file mode 100644 index 50ba84c8..00000000 --- a/v2/client/antivirus_service/update_antivirus_group_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateAntivirusGroupParams creates a new UpdateAntivirusGroupParams 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 NewUpdateAntivirusGroupParams() *UpdateAntivirusGroupParams { - return &UpdateAntivirusGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAntivirusGroupParamsWithTimeout creates a new UpdateAntivirusGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateAntivirusGroupParamsWithTimeout(timeout time.Duration) *UpdateAntivirusGroupParams { - return &UpdateAntivirusGroupParams{ - timeout: timeout, - } -} - -// NewUpdateAntivirusGroupParamsWithContext creates a new UpdateAntivirusGroupParams object -// with the ability to set a context for a request. -func NewUpdateAntivirusGroupParamsWithContext(ctx context.Context) *UpdateAntivirusGroupParams { - return &UpdateAntivirusGroupParams{ - Context: ctx, - } -} - -// NewUpdateAntivirusGroupParamsWithHTTPClient creates a new UpdateAntivirusGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAntivirusGroupParamsWithHTTPClient(client *http.Client) *UpdateAntivirusGroupParams { - return &UpdateAntivirusGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateAntivirusGroupParams contains all the parameters to send to the API endpoint - - for the update antivirus group operation. - - Typically these are written to a http.Request. -*/ -type UpdateAntivirusGroupParams struct { - - /* Body. - - Specifies the parameters to update antivirus service group. - */ - Body *models.AntivirusServiceGroup - - /* ID. - - Specifies a unique id of the Antivirus Group to update. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAntivirusGroupParams) WithDefaults() *UpdateAntivirusGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update antivirus group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAntivirusGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update antivirus group params -func (o *UpdateAntivirusGroupParams) WithTimeout(timeout time.Duration) *UpdateAntivirusGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update antivirus group params -func (o *UpdateAntivirusGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update antivirus group params -func (o *UpdateAntivirusGroupParams) WithContext(ctx context.Context) *UpdateAntivirusGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update antivirus group params -func (o *UpdateAntivirusGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update antivirus group params -func (o *UpdateAntivirusGroupParams) WithHTTPClient(client *http.Client) *UpdateAntivirusGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update antivirus group params -func (o *UpdateAntivirusGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update antivirus group params -func (o *UpdateAntivirusGroupParams) WithBody(body *models.AntivirusServiceGroup) *UpdateAntivirusGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update antivirus group params -func (o *UpdateAntivirusGroupParams) SetBody(body *models.AntivirusServiceGroup) { - o.Body = body -} - -// WithID adds the id to the update antivirus group params -func (o *UpdateAntivirusGroupParams) WithID(id int64) *UpdateAntivirusGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update antivirus group params -func (o *UpdateAntivirusGroupParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAntivirusGroupParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/antivirus_service/update_antivirus_group_responses.go b/v2/client/antivirus_service/update_antivirus_group_responses.go deleted file mode 100644 index 899b8040..00000000 --- a/v2/client/antivirus_service/update_antivirus_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateAntivirusGroupReader is a Reader for the UpdateAntivirusGroup structure. -type UpdateAntivirusGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAntivirusGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAntivirusGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAntivirusGroupDefault(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 - } -} - -// NewUpdateAntivirusGroupOK creates a UpdateAntivirusGroupOK with default headers values -func NewUpdateAntivirusGroupOK() *UpdateAntivirusGroupOK { - return &UpdateAntivirusGroupOK{} -} - -/* -UpdateAntivirusGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateAntivirusGroupOK struct { - Payload *models.AntivirusServiceGroup -} - -// IsSuccess returns true when this update antivirus group o k response has a 2xx status code -func (o *UpdateAntivirusGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update antivirus group o k response has a 3xx status code -func (o *UpdateAntivirusGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update antivirus group o k response has a 4xx status code -func (o *UpdateAntivirusGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update antivirus group o k response has a 5xx status code -func (o *UpdateAntivirusGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update antivirus group o k response a status code equal to that given -func (o *UpdateAntivirusGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update antivirus group o k response -func (o *UpdateAntivirusGroupOK) Code() int { - return 200 -} - -func (o *UpdateAntivirusGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/groups/{id}][%d] updateAntivirusGroupOK %s", 200, payload) -} - -func (o *UpdateAntivirusGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/groups/{id}][%d] updateAntivirusGroupOK %s", 200, payload) -} - -func (o *UpdateAntivirusGroupOK) GetPayload() *models.AntivirusServiceGroup { - return o.Payload -} - -func (o *UpdateAntivirusGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AntivirusServiceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAntivirusGroupDefault creates a UpdateAntivirusGroupDefault with default headers values -func NewUpdateAntivirusGroupDefault(code int) *UpdateAntivirusGroupDefault { - return &UpdateAntivirusGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateAntivirusGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAntivirusGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update antivirus group default response has a 2xx status code -func (o *UpdateAntivirusGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update antivirus group default response has a 3xx status code -func (o *UpdateAntivirusGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update antivirus group default response has a 4xx status code -func (o *UpdateAntivirusGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update antivirus group default response has a 5xx status code -func (o *UpdateAntivirusGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update antivirus group default response a status code equal to that given -func (o *UpdateAntivirusGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update antivirus group default response -func (o *UpdateAntivirusGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAntivirusGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/groups/{id}][%d] UpdateAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *UpdateAntivirusGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/groups/{id}][%d] UpdateAntivirusGroup default %s", o._statusCode, payload) -} - -func (o *UpdateAntivirusGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateAntivirusGroupDefault) 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/antivirus_service/update_infected_files_parameters.go b/v2/client/antivirus_service/update_infected_files_parameters.go deleted file mode 100644 index 17d9454c..00000000 --- a/v2/client/antivirus_service/update_infected_files_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateInfectedFilesParams creates a new UpdateInfectedFilesParams 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 NewUpdateInfectedFilesParams() *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInfectedFilesParamsWithTimeout creates a new UpdateInfectedFilesParams object -// with the ability to set a timeout on a request. -func NewUpdateInfectedFilesParamsWithTimeout(timeout time.Duration) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - timeout: timeout, - } -} - -// NewUpdateInfectedFilesParamsWithContext creates a new UpdateInfectedFilesParams object -// with the ability to set a context for a request. -func NewUpdateInfectedFilesParamsWithContext(ctx context.Context) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - Context: ctx, - } -} - -// NewUpdateInfectedFilesParamsWithHTTPClient creates a new UpdateInfectedFilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInfectedFilesParamsWithHTTPClient(client *http.Client) *UpdateInfectedFilesParams { - return &UpdateInfectedFilesParams{ - HTTPClient: client, - } -} - -/* -UpdateInfectedFilesParams contains all the parameters to send to the API endpoint - - for the update infected files operation. - - Typically these are written to a http.Request. -*/ -type UpdateInfectedFilesParams struct { - - /* Body. - - Specifies the parameters of infected files to be updated. - */ - Body *models.UpdateInfectedFilesParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInfectedFilesParams) WithDefaults() *UpdateInfectedFilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update infected files params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInfectedFilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update infected files params -func (o *UpdateInfectedFilesParams) WithTimeout(timeout time.Duration) *UpdateInfectedFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update infected files params -func (o *UpdateInfectedFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update infected files params -func (o *UpdateInfectedFilesParams) WithContext(ctx context.Context) *UpdateInfectedFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update infected files params -func (o *UpdateInfectedFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update infected files params -func (o *UpdateInfectedFilesParams) WithHTTPClient(client *http.Client) *UpdateInfectedFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update infected files params -func (o *UpdateInfectedFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update infected files params -func (o *UpdateInfectedFilesParams) WithBody(body *models.UpdateInfectedFilesParameters) *UpdateInfectedFilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update infected files params -func (o *UpdateInfectedFilesParams) SetBody(body *models.UpdateInfectedFilesParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInfectedFilesParams) 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/antivirus_service/update_infected_files_responses.go b/v2/client/antivirus_service/update_infected_files_responses.go deleted file mode 100644 index 87f3cf61..00000000 --- a/v2/client/antivirus_service/update_infected_files_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package antivirus_service - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateInfectedFilesReader is a Reader for the UpdateInfectedFiles structure. -type UpdateInfectedFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInfectedFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewUpdateInfectedFilesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInfectedFilesDefault(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 - } -} - -// NewUpdateInfectedFilesCreated creates a UpdateInfectedFilesCreated with default headers values -func NewUpdateInfectedFilesCreated() *UpdateInfectedFilesCreated { - return &UpdateInfectedFilesCreated{} -} - -/* -UpdateInfectedFilesCreated describes a response with status code 201, with default header values. - -Success -*/ -type UpdateInfectedFilesCreated struct { - Payload *models.UpdateInfectedFilesList -} - -// IsSuccess returns true when this update infected files created response has a 2xx status code -func (o *UpdateInfectedFilesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update infected files created response has a 3xx status code -func (o *UpdateInfectedFilesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update infected files created response has a 4xx status code -func (o *UpdateInfectedFilesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this update infected files created response has a 5xx status code -func (o *UpdateInfectedFilesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this update infected files created response a status code equal to that given -func (o *UpdateInfectedFilesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the update infected files created response -func (o *UpdateInfectedFilesCreated) Code() int { - return 201 -} - -func (o *UpdateInfectedFilesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/infected-files][%d] updateInfectedFilesCreated %s", 201, payload) -} - -func (o *UpdateInfectedFilesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/infected-files][%d] updateInfectedFilesCreated %s", 201, payload) -} - -func (o *UpdateInfectedFilesCreated) GetPayload() *models.UpdateInfectedFilesList { - return o.Payload -} - -func (o *UpdateInfectedFilesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateInfectedFilesList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInfectedFilesDefault creates a UpdateInfectedFilesDefault with default headers values -func NewUpdateInfectedFilesDefault(code int) *UpdateInfectedFilesDefault { - return &UpdateInfectedFilesDefault{ - _statusCode: code, - } -} - -/* -UpdateInfectedFilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInfectedFilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update infected files default response has a 2xx status code -func (o *UpdateInfectedFilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update infected files default response has a 3xx status code -func (o *UpdateInfectedFilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update infected files default response has a 4xx status code -func (o *UpdateInfectedFilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update infected files default response has a 5xx status code -func (o *UpdateInfectedFilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update infected files default response a status code equal to that given -func (o *UpdateInfectedFilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update infected files default response -func (o *UpdateInfectedFilesDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInfectedFilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/infected-files][%d] UpdateInfectedFiles default %s", o._statusCode, payload) -} - -func (o *UpdateInfectedFilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /antivirus-service/infected-files][%d] UpdateInfectedFiles default %s", o._statusCode, payload) -} - -func (o *UpdateInfectedFilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateInfectedFilesDefault) 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/audit_log/audit_log_client.go b/v2/client/audit_log/audit_log_client.go deleted file mode 100644 index 8f817526..00000000 --- a/v2/client/audit_log/audit_log_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new audit log API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new audit log API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new audit log API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for audit log API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAuditLogs(params *GetAuditLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsOK, error) - - GetAuditLogsActions(params *GetAuditLogsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsActionsOK, error) - - GetAuditLogsEntityTypes(params *GetAuditLogsEntityTypesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsEntityTypesOK, error) - - GetFilerAuditLogConfigs(params *GetFilerAuditLogConfigsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFilerAuditLogConfigsOK, error) - - UpdateFilerAuditLogConfigs(params *UpdateFilerAuditLogConfigsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFilerAuditLogConfigsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAuditLogs gets cluster audit logs - -Get a cluster audit logs. -*/ -func (a *Client) GetAuditLogs(params *GetAuditLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAuditLogsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAuditLogs", - Method: "GET", - PathPattern: "/audit-logs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAuditLogsReader{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.(*GetAuditLogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAuditLogsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAuditLogsActions gets cluster audit logs actions - -Get all actions of cluster audit logs. -*/ -func (a *Client) GetAuditLogsActions(params *GetAuditLogsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsActionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAuditLogsActionsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAuditLogsActions", - Method: "GET", - PathPattern: "/audit-logs/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAuditLogsActionsReader{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.(*GetAuditLogsActionsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAuditLogsActionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAuditLogsEntityTypes gets cluster audit logs entity types - -Get all entity types of cluster audit logs. -*/ -func (a *Client) GetAuditLogsEntityTypes(params *GetAuditLogsEntityTypesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAuditLogsEntityTypesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAuditLogsEntityTypesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAuditLogsEntityTypes", - Method: "GET", - PathPattern: "/audit-logs/entity-types", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAuditLogsEntityTypesReader{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.(*GetAuditLogsEntityTypesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAuditLogsEntityTypesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFilerAuditLogConfigs gets filer audit log configs - -Get filer audit log configs. -*/ -func (a *Client) GetFilerAuditLogConfigs(params *GetFilerAuditLogConfigsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFilerAuditLogConfigsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFilerAuditLogConfigsParams() - } - op := &runtime.ClientOperation{ - ID: "GetFilerAuditLogConfigs", - Method: "GET", - PathPattern: "/audit-logs/filer-configs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFilerAuditLogConfigsReader{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.(*GetFilerAuditLogConfigsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFilerAuditLogConfigsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateFilerAuditLogConfigs updates filer audit log configs - -Update filer audit log configs. -*/ -func (a *Client) UpdateFilerAuditLogConfigs(params *UpdateFilerAuditLogConfigsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFilerAuditLogConfigsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateFilerAuditLogConfigsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateFilerAuditLogConfigs", - Method: "PUT", - PathPattern: "/audit-logs/filer-configs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateFilerAuditLogConfigsReader{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.(*UpdateFilerAuditLogConfigsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateFilerAuditLogConfigsDefault) - 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/v2/client/audit_log/get_audit_logs_actions_parameters.go b/v2/client/audit_log/get_audit_logs_actions_parameters.go deleted file mode 100644 index d07cb38a..00000000 --- a/v2/client/audit_log/get_audit_logs_actions_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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" -) - -// NewGetAuditLogsActionsParams creates a new GetAuditLogsActionsParams 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 NewGetAuditLogsActionsParams() *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAuditLogsActionsParamsWithTimeout creates a new GetAuditLogsActionsParams object -// with the ability to set a timeout on a request. -func NewGetAuditLogsActionsParamsWithTimeout(timeout time.Duration) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - timeout: timeout, - } -} - -// NewGetAuditLogsActionsParamsWithContext creates a new GetAuditLogsActionsParams object -// with the ability to set a context for a request. -func NewGetAuditLogsActionsParamsWithContext(ctx context.Context) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - Context: ctx, - } -} - -// NewGetAuditLogsActionsParamsWithHTTPClient creates a new GetAuditLogsActionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAuditLogsActionsParamsWithHTTPClient(client *http.Client) *GetAuditLogsActionsParams { - return &GetAuditLogsActionsParams{ - HTTPClient: client, - } -} - -/* -GetAuditLogsActionsParams contains all the parameters to send to the API endpoint - - for the get audit logs actions operation. - - Typically these are written to a http.Request. -*/ -type GetAuditLogsActionsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get audit logs actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsActionsParams) WithDefaults() *GetAuditLogsActionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get audit logs actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsActionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithTimeout(timeout time.Duration) *GetAuditLogsActionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithContext(ctx context.Context) *GetAuditLogsActionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get audit logs actions params -func (o *GetAuditLogsActionsParams) WithHTTPClient(client *http.Client) *GetAuditLogsActionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get audit logs actions params -func (o *GetAuditLogsActionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAuditLogsActionsParams) 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/audit_log/get_audit_logs_actions_responses.go b/v2/client/audit_log/get_audit_logs_actions_responses.go deleted file mode 100644 index 66483851..00000000 --- a/v2/client/audit_log/get_audit_logs_actions_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAuditLogsActionsReader is a Reader for the GetAuditLogsActions structure. -type GetAuditLogsActionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAuditLogsActionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAuditLogsActionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAuditLogsActionsDefault(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 - } -} - -// NewGetAuditLogsActionsOK creates a GetAuditLogsActionsOK with default headers values -func NewGetAuditLogsActionsOK() *GetAuditLogsActionsOK { - return &GetAuditLogsActionsOK{} -} - -/* -GetAuditLogsActionsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAuditLogsActionsOK struct { - Payload *models.AuditLogsActions -} - -// IsSuccess returns true when this get audit logs actions o k response has a 2xx status code -func (o *GetAuditLogsActionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get audit logs actions o k response has a 3xx status code -func (o *GetAuditLogsActionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get audit logs actions o k response has a 4xx status code -func (o *GetAuditLogsActionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get audit logs actions o k response has a 5xx status code -func (o *GetAuditLogsActionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get audit logs actions o k response a status code equal to that given -func (o *GetAuditLogsActionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get audit logs actions o k response -func (o *GetAuditLogsActionsOK) Code() int { - return 200 -} - -func (o *GetAuditLogsActionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/actions][%d] getAuditLogsActionsOK %s", 200, payload) -} - -func (o *GetAuditLogsActionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/actions][%d] getAuditLogsActionsOK %s", 200, payload) -} - -func (o *GetAuditLogsActionsOK) GetPayload() *models.AuditLogsActions { - return o.Payload -} - -func (o *GetAuditLogsActionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AuditLogsActions) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAuditLogsActionsDefault creates a GetAuditLogsActionsDefault with default headers values -func NewGetAuditLogsActionsDefault(code int) *GetAuditLogsActionsDefault { - return &GetAuditLogsActionsDefault{ - _statusCode: code, - } -} - -/* -GetAuditLogsActionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAuditLogsActionsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get audit logs actions default response has a 2xx status code -func (o *GetAuditLogsActionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get audit logs actions default response has a 3xx status code -func (o *GetAuditLogsActionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get audit logs actions default response has a 4xx status code -func (o *GetAuditLogsActionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get audit logs actions default response has a 5xx status code -func (o *GetAuditLogsActionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get audit logs actions default response a status code equal to that given -func (o *GetAuditLogsActionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get audit logs actions default response -func (o *GetAuditLogsActionsDefault) Code() int { - return o._statusCode -} - -func (o *GetAuditLogsActionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/actions][%d] GetAuditLogsActions default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsActionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/actions][%d] GetAuditLogsActions default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsActionsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAuditLogsActionsDefault) 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/audit_log/get_audit_logs_entity_types_parameters.go b/v2/client/audit_log/get_audit_logs_entity_types_parameters.go deleted file mode 100644 index 98c47ff9..00000000 --- a/v2/client/audit_log/get_audit_logs_entity_types_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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" -) - -// NewGetAuditLogsEntityTypesParams creates a new GetAuditLogsEntityTypesParams 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 NewGetAuditLogsEntityTypesParams() *GetAuditLogsEntityTypesParams { - return &GetAuditLogsEntityTypesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAuditLogsEntityTypesParamsWithTimeout creates a new GetAuditLogsEntityTypesParams object -// with the ability to set a timeout on a request. -func NewGetAuditLogsEntityTypesParamsWithTimeout(timeout time.Duration) *GetAuditLogsEntityTypesParams { - return &GetAuditLogsEntityTypesParams{ - timeout: timeout, - } -} - -// NewGetAuditLogsEntityTypesParamsWithContext creates a new GetAuditLogsEntityTypesParams object -// with the ability to set a context for a request. -func NewGetAuditLogsEntityTypesParamsWithContext(ctx context.Context) *GetAuditLogsEntityTypesParams { - return &GetAuditLogsEntityTypesParams{ - Context: ctx, - } -} - -// NewGetAuditLogsEntityTypesParamsWithHTTPClient creates a new GetAuditLogsEntityTypesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAuditLogsEntityTypesParamsWithHTTPClient(client *http.Client) *GetAuditLogsEntityTypesParams { - return &GetAuditLogsEntityTypesParams{ - HTTPClient: client, - } -} - -/* -GetAuditLogsEntityTypesParams contains all the parameters to send to the API endpoint - - for the get audit logs entity types operation. - - Typically these are written to a http.Request. -*/ -type GetAuditLogsEntityTypesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get audit logs entity types params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsEntityTypesParams) WithDefaults() *GetAuditLogsEntityTypesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get audit logs entity types params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsEntityTypesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) WithTimeout(timeout time.Duration) *GetAuditLogsEntityTypesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) WithContext(ctx context.Context) *GetAuditLogsEntityTypesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) WithHTTPClient(client *http.Client) *GetAuditLogsEntityTypesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get audit logs entity types params -func (o *GetAuditLogsEntityTypesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAuditLogsEntityTypesParams) 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/audit_log/get_audit_logs_entity_types_responses.go b/v2/client/audit_log/get_audit_logs_entity_types_responses.go deleted file mode 100644 index c42f3a17..00000000 --- a/v2/client/audit_log/get_audit_logs_entity_types_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAuditLogsEntityTypesReader is a Reader for the GetAuditLogsEntityTypes structure. -type GetAuditLogsEntityTypesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAuditLogsEntityTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAuditLogsEntityTypesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAuditLogsEntityTypesDefault(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 - } -} - -// NewGetAuditLogsEntityTypesOK creates a GetAuditLogsEntityTypesOK with default headers values -func NewGetAuditLogsEntityTypesOK() *GetAuditLogsEntityTypesOK { - return &GetAuditLogsEntityTypesOK{} -} - -/* -GetAuditLogsEntityTypesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAuditLogsEntityTypesOK struct { - Payload *models.AuditLogsEntityTypes -} - -// IsSuccess returns true when this get audit logs entity types o k response has a 2xx status code -func (o *GetAuditLogsEntityTypesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get audit logs entity types o k response has a 3xx status code -func (o *GetAuditLogsEntityTypesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get audit logs entity types o k response has a 4xx status code -func (o *GetAuditLogsEntityTypesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get audit logs entity types o k response has a 5xx status code -func (o *GetAuditLogsEntityTypesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get audit logs entity types o k response a status code equal to that given -func (o *GetAuditLogsEntityTypesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get audit logs entity types o k response -func (o *GetAuditLogsEntityTypesOK) Code() int { - return 200 -} - -func (o *GetAuditLogsEntityTypesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/entity-types][%d] getAuditLogsEntityTypesOK %s", 200, payload) -} - -func (o *GetAuditLogsEntityTypesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/entity-types][%d] getAuditLogsEntityTypesOK %s", 200, payload) -} - -func (o *GetAuditLogsEntityTypesOK) GetPayload() *models.AuditLogsEntityTypes { - return o.Payload -} - -func (o *GetAuditLogsEntityTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AuditLogsEntityTypes) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAuditLogsEntityTypesDefault creates a GetAuditLogsEntityTypesDefault with default headers values -func NewGetAuditLogsEntityTypesDefault(code int) *GetAuditLogsEntityTypesDefault { - return &GetAuditLogsEntityTypesDefault{ - _statusCode: code, - } -} - -/* -GetAuditLogsEntityTypesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAuditLogsEntityTypesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get audit logs entity types default response has a 2xx status code -func (o *GetAuditLogsEntityTypesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get audit logs entity types default response has a 3xx status code -func (o *GetAuditLogsEntityTypesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get audit logs entity types default response has a 4xx status code -func (o *GetAuditLogsEntityTypesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get audit logs entity types default response has a 5xx status code -func (o *GetAuditLogsEntityTypesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get audit logs entity types default response a status code equal to that given -func (o *GetAuditLogsEntityTypesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get audit logs entity types default response -func (o *GetAuditLogsEntityTypesDefault) Code() int { - return o._statusCode -} - -func (o *GetAuditLogsEntityTypesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/entity-types][%d] GetAuditLogsEntityTypes default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsEntityTypesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/entity-types][%d] GetAuditLogsEntityTypes default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsEntityTypesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAuditLogsEntityTypesDefault) 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/audit_log/get_audit_logs_parameters.go b/v2/client/audit_log/get_audit_logs_parameters.go deleted file mode 100644 index 3eb7daa3..00000000 --- a/v2/client/audit_log/get_audit_logs_parameters.go +++ /dev/null @@ -1,567 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/go-openapi/swag" -) - -// NewGetAuditLogsParams creates a new GetAuditLogsParams 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 NewGetAuditLogsParams() *GetAuditLogsParams { - return &GetAuditLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAuditLogsParamsWithTimeout creates a new GetAuditLogsParams object -// with the ability to set a timeout on a request. -func NewGetAuditLogsParamsWithTimeout(timeout time.Duration) *GetAuditLogsParams { - return &GetAuditLogsParams{ - timeout: timeout, - } -} - -// NewGetAuditLogsParamsWithContext creates a new GetAuditLogsParams object -// with the ability to set a context for a request. -func NewGetAuditLogsParamsWithContext(ctx context.Context) *GetAuditLogsParams { - return &GetAuditLogsParams{ - Context: ctx, - } -} - -// NewGetAuditLogsParamsWithHTTPClient creates a new GetAuditLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAuditLogsParamsWithHTTPClient(client *http.Client) *GetAuditLogsParams { - return &GetAuditLogsParams{ - HTTPClient: client, - } -} - -/* -GetAuditLogsParams contains all the parameters to send to the API endpoint - - for the get audit logs operation. - - Typically these are written to a http.Request. -*/ -type GetAuditLogsParams struct { - - /* Actions. - - Specifies a list of actions, only audit logs containing these actions will be returned. - */ - Actions []string - - /* Count. - - Specifies the number of indexed obejcts to be fetched from the specified start index. - - Format: int64 - */ - Count *int64 - - /* Domains. - - Specifies a list of domains, only audit logs made by user in these domains will be returned. - */ - Domains []string - - /* EndTimeUsecs. - - Specifies a unix timestamp in microseconds, only audit logs made before this time will be returned. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* EntityTypes. - - Specifies a list of entity types, only audit logs containing these entity types will be returned. - */ - EntityTypes []string - - /* IncludeTenants. - - If true, the response will include Protection Groups which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. - */ - IncludeTenants *bool - - /* SearchString. - - Search audit logs by 'entityName' or 'details'. - */ - SearchString *string - - /* StartIndex. - - Specifies a start index. The oldest logs before this index will skipped, only audit logs from this index will be fetched. - - Format: int64 - */ - StartIndex *int64 - - /* StartTimeUsecs. - - Specifies a unix timestamp in microseconds, only audit logs made after this time will be returned. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - Specifies a list of tenant ids, only audit logs made by these tenants will be returned. - */ - TenantIds []string - - /* Usernames. - - Specifies a list of usernames, only audit logs made by these users will be returned. - */ - Usernames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get audit logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsParams) WithDefaults() *GetAuditLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get audit logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAuditLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get audit logs params -func (o *GetAuditLogsParams) WithTimeout(timeout time.Duration) *GetAuditLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get audit logs params -func (o *GetAuditLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get audit logs params -func (o *GetAuditLogsParams) WithContext(ctx context.Context) *GetAuditLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get audit logs params -func (o *GetAuditLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get audit logs params -func (o *GetAuditLogsParams) WithHTTPClient(client *http.Client) *GetAuditLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get audit logs params -func (o *GetAuditLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithActions adds the actions to the get audit logs params -func (o *GetAuditLogsParams) WithActions(actions []string) *GetAuditLogsParams { - o.SetActions(actions) - return o -} - -// SetActions adds the actions to the get audit logs params -func (o *GetAuditLogsParams) SetActions(actions []string) { - o.Actions = actions -} - -// WithCount adds the count to the get audit logs params -func (o *GetAuditLogsParams) WithCount(count *int64) *GetAuditLogsParams { - o.SetCount(count) - return o -} - -// SetCount adds the count to the get audit logs params -func (o *GetAuditLogsParams) SetCount(count *int64) { - o.Count = count -} - -// WithDomains adds the domains to the get audit logs params -func (o *GetAuditLogsParams) WithDomains(domains []string) *GetAuditLogsParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the get audit logs params -func (o *GetAuditLogsParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get audit logs params -func (o *GetAuditLogsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetAuditLogsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get audit logs params -func (o *GetAuditLogsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithEntityTypes adds the entityTypes to the get audit logs params -func (o *GetAuditLogsParams) WithEntityTypes(entityTypes []string) *GetAuditLogsParams { - o.SetEntityTypes(entityTypes) - return o -} - -// SetEntityTypes adds the entityTypes to the get audit logs params -func (o *GetAuditLogsParams) SetEntityTypes(entityTypes []string) { - o.EntityTypes = entityTypes -} - -// WithIncludeTenants adds the includeTenants to the get audit logs params -func (o *GetAuditLogsParams) WithIncludeTenants(includeTenants *bool) *GetAuditLogsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get audit logs params -func (o *GetAuditLogsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithSearchString adds the searchString to the get audit logs params -func (o *GetAuditLogsParams) WithSearchString(searchString *string) *GetAuditLogsParams { - o.SetSearchString(searchString) - return o -} - -// SetSearchString adds the searchString to the get audit logs params -func (o *GetAuditLogsParams) SetSearchString(searchString *string) { - o.SearchString = searchString -} - -// WithStartIndex adds the startIndex to the get audit logs params -func (o *GetAuditLogsParams) WithStartIndex(startIndex *int64) *GetAuditLogsParams { - o.SetStartIndex(startIndex) - return o -} - -// SetStartIndex adds the startIndex to the get audit logs params -func (o *GetAuditLogsParams) SetStartIndex(startIndex *int64) { - o.StartIndex = startIndex -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get audit logs params -func (o *GetAuditLogsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetAuditLogsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get audit logs params -func (o *GetAuditLogsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get audit logs params -func (o *GetAuditLogsParams) WithTenantIds(tenantIds []string) *GetAuditLogsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get audit logs params -func (o *GetAuditLogsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUsernames adds the usernames to the get audit logs params -func (o *GetAuditLogsParams) WithUsernames(usernames []string) *GetAuditLogsParams { - o.SetUsernames(usernames) - return o -} - -// SetUsernames adds the usernames to the get audit logs params -func (o *GetAuditLogsParams) SetUsernames(usernames []string) { - o.Usernames = usernames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAuditLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Actions != nil { - - // binding items for actions - joinedActions := o.bindParamActions(reg) - - // query array param actions - if err := r.SetQueryParam("actions", joinedActions...); err != nil { - return err - } - } - - if o.Count != nil { - - // query param count - var qrCount int64 - - if o.Count != nil { - qrCount = *o.Count - } - qCount := swag.FormatInt64(qrCount) - if qCount != "" { - - if err := r.SetQueryParam("count", qCount); err != nil { - return err - } - } - } - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.EntityTypes != nil { - - // binding items for entityTypes - joinedEntityTypes := o.bindParamEntityTypes(reg) - - // query array param entityTypes - if err := r.SetQueryParam("entityTypes", joinedEntityTypes...); 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.SearchString != nil { - - // query param searchString - var qrSearchString string - - if o.SearchString != nil { - qrSearchString = *o.SearchString - } - qSearchString := qrSearchString - if qSearchString != "" { - - if err := r.SetQueryParam("searchString", qSearchString); err != nil { - return err - } - } - } - - if o.StartIndex != nil { - - // query param startIndex - var qrStartIndex int64 - - if o.StartIndex != nil { - qrStartIndex = *o.StartIndex - } - qStartIndex := swag.FormatInt64(qrStartIndex) - if qStartIndex != "" { - - if err := r.SetQueryParam("startIndex", qStartIndex); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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.Usernames != nil { - - // binding items for usernames - joinedUsernames := o.bindParamUsernames(reg) - - // query array param usernames - if err := r.SetQueryParam("usernames", joinedUsernames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAuditLogs binds the parameter actions -func (o *GetAuditLogsParams) bindParamActions(formats strfmt.Registry) []string { - actionsIR := o.Actions - - var actionsIC []string - for _, actionsIIR := range actionsIR { // explode []string - - actionsIIV := actionsIIR // string as string - actionsIC = append(actionsIC, actionsIIV) - } - - // items.CollectionFormat: "" - actionsIS := swag.JoinByFormat(actionsIC, "") - - return actionsIS -} - -// bindParamGetAuditLogs binds the parameter domains -func (o *GetAuditLogsParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamGetAuditLogs binds the parameter entityTypes -func (o *GetAuditLogsParams) bindParamEntityTypes(formats strfmt.Registry) []string { - entityTypesIR := o.EntityTypes - - var entityTypesIC []string - for _, entityTypesIIR := range entityTypesIR { // explode []string - - entityTypesIIV := entityTypesIIR // string as string - entityTypesIC = append(entityTypesIC, entityTypesIIV) - } - - // items.CollectionFormat: "" - entityTypesIS := swag.JoinByFormat(entityTypesIC, "") - - return entityTypesIS -} - -// bindParamGetAuditLogs binds the parameter tenantIds -func (o *GetAuditLogsParams) 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 -} - -// bindParamGetAuditLogs binds the parameter usernames -func (o *GetAuditLogsParams) bindParamUsernames(formats strfmt.Registry) []string { - usernamesIR := o.Usernames - - var usernamesIC []string - for _, usernamesIIR := range usernamesIR { // explode []string - - usernamesIIV := usernamesIIR // string as string - usernamesIC = append(usernamesIC, usernamesIIV) - } - - // items.CollectionFormat: "" - usernamesIS := swag.JoinByFormat(usernamesIC, "") - - return usernamesIS -} diff --git a/v2/client/audit_log/get_audit_logs_responses.go b/v2/client/audit_log/get_audit_logs_responses.go deleted file mode 100644 index 44302ee2..00000000 --- a/v2/client/audit_log/get_audit_logs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAuditLogsReader is a Reader for the GetAuditLogs structure. -type GetAuditLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAuditLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAuditLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAuditLogsDefault(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 - } -} - -// NewGetAuditLogsOK creates a GetAuditLogsOK with default headers values -func NewGetAuditLogsOK() *GetAuditLogsOK { - return &GetAuditLogsOK{} -} - -/* -GetAuditLogsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAuditLogsOK struct { - Payload *models.AuditLogs -} - -// IsSuccess returns true when this get audit logs o k response has a 2xx status code -func (o *GetAuditLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get audit logs o k response has a 3xx status code -func (o *GetAuditLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get audit logs o k response has a 4xx status code -func (o *GetAuditLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get audit logs o k response has a 5xx status code -func (o *GetAuditLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get audit logs o k response a status code equal to that given -func (o *GetAuditLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get audit logs o k response -func (o *GetAuditLogsOK) Code() int { - return 200 -} - -func (o *GetAuditLogsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs][%d] getAuditLogsOK %s", 200, payload) -} - -func (o *GetAuditLogsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs][%d] getAuditLogsOK %s", 200, payload) -} - -func (o *GetAuditLogsOK) GetPayload() *models.AuditLogs { - return o.Payload -} - -func (o *GetAuditLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AuditLogs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAuditLogsDefault creates a GetAuditLogsDefault with default headers values -func NewGetAuditLogsDefault(code int) *GetAuditLogsDefault { - return &GetAuditLogsDefault{ - _statusCode: code, - } -} - -/* -GetAuditLogsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAuditLogsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get audit logs default response has a 2xx status code -func (o *GetAuditLogsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get audit logs default response has a 3xx status code -func (o *GetAuditLogsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get audit logs default response has a 4xx status code -func (o *GetAuditLogsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get audit logs default response has a 5xx status code -func (o *GetAuditLogsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get audit logs default response a status code equal to that given -func (o *GetAuditLogsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get audit logs default response -func (o *GetAuditLogsDefault) Code() int { - return o._statusCode -} - -func (o *GetAuditLogsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs][%d] GetAuditLogs default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs][%d] GetAuditLogs default %s", o._statusCode, payload) -} - -func (o *GetAuditLogsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAuditLogsDefault) 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/audit_log/get_filer_audit_log_configs_parameters.go b/v2/client/audit_log/get_filer_audit_log_configs_parameters.go deleted file mode 100644 index 20e9723b..00000000 --- a/v2/client/audit_log/get_filer_audit_log_configs_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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" -) - -// NewGetFilerAuditLogConfigsParams creates a new GetFilerAuditLogConfigsParams 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 NewGetFilerAuditLogConfigsParams() *GetFilerAuditLogConfigsParams { - return &GetFilerAuditLogConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFilerAuditLogConfigsParamsWithTimeout creates a new GetFilerAuditLogConfigsParams object -// with the ability to set a timeout on a request. -func NewGetFilerAuditLogConfigsParamsWithTimeout(timeout time.Duration) *GetFilerAuditLogConfigsParams { - return &GetFilerAuditLogConfigsParams{ - timeout: timeout, - } -} - -// NewGetFilerAuditLogConfigsParamsWithContext creates a new GetFilerAuditLogConfigsParams object -// with the ability to set a context for a request. -func NewGetFilerAuditLogConfigsParamsWithContext(ctx context.Context) *GetFilerAuditLogConfigsParams { - return &GetFilerAuditLogConfigsParams{ - Context: ctx, - } -} - -// NewGetFilerAuditLogConfigsParamsWithHTTPClient creates a new GetFilerAuditLogConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFilerAuditLogConfigsParamsWithHTTPClient(client *http.Client) *GetFilerAuditLogConfigsParams { - return &GetFilerAuditLogConfigsParams{ - HTTPClient: client, - } -} - -/* -GetFilerAuditLogConfigsParams contains all the parameters to send to the API endpoint - - for the get filer audit log configs operation. - - Typically these are written to a http.Request. -*/ -type GetFilerAuditLogConfigsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get filer audit log configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFilerAuditLogConfigsParams) WithDefaults() *GetFilerAuditLogConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get filer audit log configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFilerAuditLogConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) WithTimeout(timeout time.Duration) *GetFilerAuditLogConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) WithContext(ctx context.Context) *GetFilerAuditLogConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) WithHTTPClient(client *http.Client) *GetFilerAuditLogConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get filer audit log configs params -func (o *GetFilerAuditLogConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFilerAuditLogConfigsParams) 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/audit_log/get_filer_audit_log_configs_responses.go b/v2/client/audit_log/get_filer_audit_log_configs_responses.go deleted file mode 100644 index 9b43bbda..00000000 --- a/v2/client/audit_log/get_filer_audit_log_configs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetFilerAuditLogConfigsReader is a Reader for the GetFilerAuditLogConfigs structure. -type GetFilerAuditLogConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFilerAuditLogConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFilerAuditLogConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFilerAuditLogConfigsDefault(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 - } -} - -// NewGetFilerAuditLogConfigsOK creates a GetFilerAuditLogConfigsOK with default headers values -func NewGetFilerAuditLogConfigsOK() *GetFilerAuditLogConfigsOK { - return &GetFilerAuditLogConfigsOK{} -} - -/* -GetFilerAuditLogConfigsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFilerAuditLogConfigsOK struct { - Payload *models.FilerAuditLogConfigs -} - -// IsSuccess returns true when this get filer audit log configs o k response has a 2xx status code -func (o *GetFilerAuditLogConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get filer audit log configs o k response has a 3xx status code -func (o *GetFilerAuditLogConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get filer audit log configs o k response has a 4xx status code -func (o *GetFilerAuditLogConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get filer audit log configs o k response has a 5xx status code -func (o *GetFilerAuditLogConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get filer audit log configs o k response a status code equal to that given -func (o *GetFilerAuditLogConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get filer audit log configs o k response -func (o *GetFilerAuditLogConfigsOK) Code() int { - return 200 -} - -func (o *GetFilerAuditLogConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/filer-configs][%d] getFilerAuditLogConfigsOK %s", 200, payload) -} - -func (o *GetFilerAuditLogConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/filer-configs][%d] getFilerAuditLogConfigsOK %s", 200, payload) -} - -func (o *GetFilerAuditLogConfigsOK) GetPayload() *models.FilerAuditLogConfigs { - return o.Payload -} - -func (o *GetFilerAuditLogConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FilerAuditLogConfigs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFilerAuditLogConfigsDefault creates a GetFilerAuditLogConfigsDefault with default headers values -func NewGetFilerAuditLogConfigsDefault(code int) *GetFilerAuditLogConfigsDefault { - return &GetFilerAuditLogConfigsDefault{ - _statusCode: code, - } -} - -/* -GetFilerAuditLogConfigsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFilerAuditLogConfigsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get filer audit log configs default response has a 2xx status code -func (o *GetFilerAuditLogConfigsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get filer audit log configs default response has a 3xx status code -func (o *GetFilerAuditLogConfigsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get filer audit log configs default response has a 4xx status code -func (o *GetFilerAuditLogConfigsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get filer audit log configs default response has a 5xx status code -func (o *GetFilerAuditLogConfigsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get filer audit log configs default response a status code equal to that given -func (o *GetFilerAuditLogConfigsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get filer audit log configs default response -func (o *GetFilerAuditLogConfigsDefault) Code() int { - return o._statusCode -} - -func (o *GetFilerAuditLogConfigsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/filer-configs][%d] GetFilerAuditLogConfigs default %s", o._statusCode, payload) -} - -func (o *GetFilerAuditLogConfigsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /audit-logs/filer-configs][%d] GetFilerAuditLogConfigs default %s", o._statusCode, payload) -} - -func (o *GetFilerAuditLogConfigsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetFilerAuditLogConfigsDefault) 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/audit_log/update_filer_audit_log_configs_parameters.go b/v2/client/audit_log/update_filer_audit_log_configs_parameters.go deleted file mode 100644 index b14dc1c5..00000000 --- a/v2/client/audit_log/update_filer_audit_log_configs_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateFilerAuditLogConfigsParams creates a new UpdateFilerAuditLogConfigsParams 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 NewUpdateFilerAuditLogConfigsParams() *UpdateFilerAuditLogConfigsParams { - return &UpdateFilerAuditLogConfigsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateFilerAuditLogConfigsParamsWithTimeout creates a new UpdateFilerAuditLogConfigsParams object -// with the ability to set a timeout on a request. -func NewUpdateFilerAuditLogConfigsParamsWithTimeout(timeout time.Duration) *UpdateFilerAuditLogConfigsParams { - return &UpdateFilerAuditLogConfigsParams{ - timeout: timeout, - } -} - -// NewUpdateFilerAuditLogConfigsParamsWithContext creates a new UpdateFilerAuditLogConfigsParams object -// with the ability to set a context for a request. -func NewUpdateFilerAuditLogConfigsParamsWithContext(ctx context.Context) *UpdateFilerAuditLogConfigsParams { - return &UpdateFilerAuditLogConfigsParams{ - Context: ctx, - } -} - -// NewUpdateFilerAuditLogConfigsParamsWithHTTPClient creates a new UpdateFilerAuditLogConfigsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateFilerAuditLogConfigsParamsWithHTTPClient(client *http.Client) *UpdateFilerAuditLogConfigsParams { - return &UpdateFilerAuditLogConfigsParams{ - HTTPClient: client, - } -} - -/* -UpdateFilerAuditLogConfigsParams contains all the parameters to send to the API endpoint - - for the update filer audit log configs operation. - - Typically these are written to a http.Request. -*/ -type UpdateFilerAuditLogConfigsParams struct { - - /* Body. - - Specifies the filer audit log config to update. - */ - Body *models.FilerAuditLogConfigs - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update filer audit log configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFilerAuditLogConfigsParams) WithDefaults() *UpdateFilerAuditLogConfigsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update filer audit log configs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFilerAuditLogConfigsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) WithTimeout(timeout time.Duration) *UpdateFilerAuditLogConfigsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) WithContext(ctx context.Context) *UpdateFilerAuditLogConfigsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) WithHTTPClient(client *http.Client) *UpdateFilerAuditLogConfigsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) WithBody(body *models.FilerAuditLogConfigs) *UpdateFilerAuditLogConfigsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update filer audit log configs params -func (o *UpdateFilerAuditLogConfigsParams) SetBody(body *models.FilerAuditLogConfigs) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateFilerAuditLogConfigsParams) 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/audit_log/update_filer_audit_log_configs_responses.go b/v2/client/audit_log/update_filer_audit_log_configs_responses.go deleted file mode 100644 index 2a95f438..00000000 --- a/v2/client/audit_log/update_filer_audit_log_configs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package audit_log - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateFilerAuditLogConfigsReader is a Reader for the UpdateFilerAuditLogConfigs structure. -type UpdateFilerAuditLogConfigsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateFilerAuditLogConfigsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateFilerAuditLogConfigsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateFilerAuditLogConfigsDefault(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 - } -} - -// NewUpdateFilerAuditLogConfigsOK creates a UpdateFilerAuditLogConfigsOK with default headers values -func NewUpdateFilerAuditLogConfigsOK() *UpdateFilerAuditLogConfigsOK { - return &UpdateFilerAuditLogConfigsOK{} -} - -/* -UpdateFilerAuditLogConfigsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateFilerAuditLogConfigsOK struct { - Payload *models.FilerAuditLogConfigs -} - -// IsSuccess returns true when this update filer audit log configs o k response has a 2xx status code -func (o *UpdateFilerAuditLogConfigsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update filer audit log configs o k response has a 3xx status code -func (o *UpdateFilerAuditLogConfigsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update filer audit log configs o k response has a 4xx status code -func (o *UpdateFilerAuditLogConfigsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update filer audit log configs o k response has a 5xx status code -func (o *UpdateFilerAuditLogConfigsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update filer audit log configs o k response a status code equal to that given -func (o *UpdateFilerAuditLogConfigsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update filer audit log configs o k response -func (o *UpdateFilerAuditLogConfigsOK) Code() int { - return 200 -} - -func (o *UpdateFilerAuditLogConfigsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /audit-logs/filer-configs][%d] updateFilerAuditLogConfigsOK %s", 200, payload) -} - -func (o *UpdateFilerAuditLogConfigsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /audit-logs/filer-configs][%d] updateFilerAuditLogConfigsOK %s", 200, payload) -} - -func (o *UpdateFilerAuditLogConfigsOK) GetPayload() *models.FilerAuditLogConfigs { - return o.Payload -} - -func (o *UpdateFilerAuditLogConfigsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FilerAuditLogConfigs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateFilerAuditLogConfigsDefault creates a UpdateFilerAuditLogConfigsDefault with default headers values -func NewUpdateFilerAuditLogConfigsDefault(code int) *UpdateFilerAuditLogConfigsDefault { - return &UpdateFilerAuditLogConfigsDefault{ - _statusCode: code, - } -} - -/* -UpdateFilerAuditLogConfigsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateFilerAuditLogConfigsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update filer audit log configs default response has a 2xx status code -func (o *UpdateFilerAuditLogConfigsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update filer audit log configs default response has a 3xx status code -func (o *UpdateFilerAuditLogConfigsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update filer audit log configs default response has a 4xx status code -func (o *UpdateFilerAuditLogConfigsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update filer audit log configs default response has a 5xx status code -func (o *UpdateFilerAuditLogConfigsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update filer audit log configs default response a status code equal to that given -func (o *UpdateFilerAuditLogConfigsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update filer audit log configs default response -func (o *UpdateFilerAuditLogConfigsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateFilerAuditLogConfigsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /audit-logs/filer-configs][%d] UpdateFilerAuditLogConfigs default %s", o._statusCode, payload) -} - -func (o *UpdateFilerAuditLogConfigsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /audit-logs/filer-configs][%d] UpdateFilerAuditLogConfigs default %s", o._statusCode, payload) -} - -func (o *UpdateFilerAuditLogConfigsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateFilerAuditLogConfigsDefault) 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/baseos_patch_management/apply_baseos_patch_parameters.go b/v2/client/baseos_patch_management/apply_baseos_patch_parameters.go deleted file mode 100644 index 496e3687..00000000 --- a/v2/client/baseos_patch_management/apply_baseos_patch_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewApplyBaseosPatchParams creates a new ApplyBaseosPatchParams 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 NewApplyBaseosPatchParams() *ApplyBaseosPatchParams { - return &ApplyBaseosPatchParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewApplyBaseosPatchParamsWithTimeout creates a new ApplyBaseosPatchParams object -// with the ability to set a timeout on a request. -func NewApplyBaseosPatchParamsWithTimeout(timeout time.Duration) *ApplyBaseosPatchParams { - return &ApplyBaseosPatchParams{ - timeout: timeout, - } -} - -// NewApplyBaseosPatchParamsWithContext creates a new ApplyBaseosPatchParams object -// with the ability to set a context for a request. -func NewApplyBaseosPatchParamsWithContext(ctx context.Context) *ApplyBaseosPatchParams { - return &ApplyBaseosPatchParams{ - Context: ctx, - } -} - -// NewApplyBaseosPatchParamsWithHTTPClient creates a new ApplyBaseosPatchParams object -// with the ability to set a custom HTTPClient for a request. -func NewApplyBaseosPatchParamsWithHTTPClient(client *http.Client) *ApplyBaseosPatchParams { - return &ApplyBaseosPatchParams{ - HTTPClient: client, - } -} - -/* -ApplyBaseosPatchParams contains all the parameters to send to the API endpoint - - for the apply baseos patch operation. - - Typically these are written to a http.Request. -*/ -type ApplyBaseosPatchParams struct { - - /* Body. - - Request to apply a baseos patch. - */ - Body *models.ApplyBaseosPatchRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the apply baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyBaseosPatchParams) WithDefaults() *ApplyBaseosPatchParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the apply baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyBaseosPatchParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the apply baseos patch params -func (o *ApplyBaseosPatchParams) WithTimeout(timeout time.Duration) *ApplyBaseosPatchParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the apply baseos patch params -func (o *ApplyBaseosPatchParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the apply baseos patch params -func (o *ApplyBaseosPatchParams) WithContext(ctx context.Context) *ApplyBaseosPatchParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the apply baseos patch params -func (o *ApplyBaseosPatchParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the apply baseos patch params -func (o *ApplyBaseosPatchParams) WithHTTPClient(client *http.Client) *ApplyBaseosPatchParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the apply baseos patch params -func (o *ApplyBaseosPatchParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the apply baseos patch params -func (o *ApplyBaseosPatchParams) WithBody(body *models.ApplyBaseosPatchRequest) *ApplyBaseosPatchParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the apply baseos patch params -func (o *ApplyBaseosPatchParams) SetBody(body *models.ApplyBaseosPatchRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ApplyBaseosPatchParams) 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/baseos_patch_management/apply_baseos_patch_responses.go b/v2/client/baseos_patch_management/apply_baseos_patch_responses.go deleted file mode 100644 index 1c9a779b..00000000 --- a/v2/client/baseos_patch_management/apply_baseos_patch_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ApplyBaseosPatchReader is a Reader for the ApplyBaseosPatch structure. -type ApplyBaseosPatchReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ApplyBaseosPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewApplyBaseosPatchOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewApplyBaseosPatchDefault(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 - } -} - -// NewApplyBaseosPatchOK creates a ApplyBaseosPatchOK with default headers values -func NewApplyBaseosPatchOK() *ApplyBaseosPatchOK { - return &ApplyBaseosPatchOK{} -} - -/* -ApplyBaseosPatchOK describes a response with status code 200, with default header values. - -No Content -*/ -type ApplyBaseosPatchOK struct { -} - -// IsSuccess returns true when this apply baseos patch o k response has a 2xx status code -func (o *ApplyBaseosPatchOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this apply baseos patch o k response has a 3xx status code -func (o *ApplyBaseosPatchOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this apply baseos patch o k response has a 4xx status code -func (o *ApplyBaseosPatchOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this apply baseos patch o k response has a 5xx status code -func (o *ApplyBaseosPatchOK) IsServerError() bool { - return false -} - -// IsCode returns true when this apply baseos patch o k response a status code equal to that given -func (o *ApplyBaseosPatchOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the apply baseos patch o k response -func (o *ApplyBaseosPatchOK) Code() int { - return 200 -} - -func (o *ApplyBaseosPatchOK) Error() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-apply][%d] applyBaseosPatchOK", 200) -} - -func (o *ApplyBaseosPatchOK) String() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-apply][%d] applyBaseosPatchOK", 200) -} - -func (o *ApplyBaseosPatchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewApplyBaseosPatchDefault creates a ApplyBaseosPatchDefault with default headers values -func NewApplyBaseosPatchDefault(code int) *ApplyBaseosPatchDefault { - return &ApplyBaseosPatchDefault{ - _statusCode: code, - } -} - -/* -ApplyBaseosPatchDefault describes a response with status code -1, with default header values. - -Error -*/ -type ApplyBaseosPatchDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this apply baseos patch default response has a 2xx status code -func (o *ApplyBaseosPatchDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this apply baseos patch default response has a 3xx status code -func (o *ApplyBaseosPatchDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this apply baseos patch default response has a 4xx status code -func (o *ApplyBaseosPatchDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this apply baseos patch default response has a 5xx status code -func (o *ApplyBaseosPatchDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this apply baseos patch default response a status code equal to that given -func (o *ApplyBaseosPatchDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the apply baseos patch default response -func (o *ApplyBaseosPatchDefault) Code() int { - return o._statusCode -} - -func (o *ApplyBaseosPatchDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-apply][%d] ApplyBaseosPatch default %s", o._statusCode, payload) -} - -func (o *ApplyBaseosPatchDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-apply][%d] ApplyBaseosPatch default %s", o._statusCode, payload) -} - -func (o *ApplyBaseosPatchDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ApplyBaseosPatchDefault) 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/baseos_patch_management/baseos_patch_management_client.go b/v2/client/baseos_patch_management/baseos_patch_management_client.go deleted file mode 100644 index 0b2f899e..00000000 --- a/v2/client/baseos_patch_management/baseos_patch_management_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new baseos patch management API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new baseos patch management API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new baseos patch management API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for baseos patch management API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ApplyBaseosPatch(params *ApplyBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyBaseosPatchOK, error) - - DownloadBaseosPatch(params *DownloadBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadBaseosPatchOK, error) - - GetBaseosPatchList(params *GetBaseosPatchListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBaseosPatchListOK, error) - - GetBaseosPatchLog(params *GetBaseosPatchLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBaseosPatchLogOK, error) - - RemoveBaseosPatch(params *RemoveBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveBaseosPatchOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ApplyBaseosPatch applies the given baseos patch - -Applies the given baseos patch. -*/ -func (a *Client) ApplyBaseosPatch(params *ApplyBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyBaseosPatchOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewApplyBaseosPatchParams() - } - op := &runtime.ClientOperation{ - ID: "ApplyBaseosPatch", - Method: "POST", - PathPattern: "/patch-management/baseos-patch-apply", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ApplyBaseosPatchReader{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.(*ApplyBaseosPatchOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ApplyBaseosPatchDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadBaseosPatch downloads the given baseos patch - -Downloads the given baseos patch. -*/ -func (a *Client) DownloadBaseosPatch(params *DownloadBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadBaseosPatchOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadBaseosPatchParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadBaseosPatch", - Method: "POST", - PathPattern: "/patch-management/baseos-patch-download", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadBaseosPatchReader{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.(*DownloadBaseosPatchOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadBaseosPatchDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBaseosPatchList gets available baseos patches - -Returns the available baseos patches -*/ -func (a *Client) GetBaseosPatchList(params *GetBaseosPatchListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBaseosPatchListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBaseosPatchListParams() - } - op := &runtime.ClientOperation{ - ID: "GetBaseosPatchList", - Method: "GET", - PathPattern: "/patch-management/baseos-patch-list", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBaseosPatchListReader{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.(*GetBaseosPatchListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBaseosPatchListDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetBaseosPatchLog gets baseos patch application log - -Returns the log and status of the mentioned patch. -*/ -func (a *Client) GetBaseosPatchLog(params *GetBaseosPatchLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBaseosPatchLogOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBaseosPatchLogParams() - } - op := &runtime.ClientOperation{ - ID: "GetBaseosPatchLog", - Method: "GET", - PathPattern: "/patch-management/baseos-patch-log", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetBaseosPatchLogReader{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.(*GetBaseosPatchLogOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetBaseosPatchLogDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveBaseosPatch cleans up the given baseos patch files - -Cleans up the given baseos patch files. -*/ -func (a *Client) RemoveBaseosPatch(params *RemoveBaseosPatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveBaseosPatchOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveBaseosPatchParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveBaseosPatch", - Method: "POST", - PathPattern: "/patch-management/baseos-patch-remove", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveBaseosPatchReader{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.(*RemoveBaseosPatchOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveBaseosPatchDefault) - 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/v2/client/baseos_patch_management/download_baseos_patch_parameters.go b/v2/client/baseos_patch_management/download_baseos_patch_parameters.go deleted file mode 100644 index a9d7fd5f..00000000 --- a/v2/client/baseos_patch_management/download_baseos_patch_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDownloadBaseosPatchParams creates a new DownloadBaseosPatchParams 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 NewDownloadBaseosPatchParams() *DownloadBaseosPatchParams { - return &DownloadBaseosPatchParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadBaseosPatchParamsWithTimeout creates a new DownloadBaseosPatchParams object -// with the ability to set a timeout on a request. -func NewDownloadBaseosPatchParamsWithTimeout(timeout time.Duration) *DownloadBaseosPatchParams { - return &DownloadBaseosPatchParams{ - timeout: timeout, - } -} - -// NewDownloadBaseosPatchParamsWithContext creates a new DownloadBaseosPatchParams object -// with the ability to set a context for a request. -func NewDownloadBaseosPatchParamsWithContext(ctx context.Context) *DownloadBaseosPatchParams { - return &DownloadBaseosPatchParams{ - Context: ctx, - } -} - -// NewDownloadBaseosPatchParamsWithHTTPClient creates a new DownloadBaseosPatchParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadBaseosPatchParamsWithHTTPClient(client *http.Client) *DownloadBaseosPatchParams { - return &DownloadBaseosPatchParams{ - HTTPClient: client, - } -} - -/* -DownloadBaseosPatchParams contains all the parameters to send to the API endpoint - - for the download baseos patch operation. - - Typically these are written to a http.Request. -*/ -type DownloadBaseosPatchParams struct { - - /* Body. - - Request to download a new baseos patch. - */ - Body *models.DownloadBaseosPatchRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadBaseosPatchParams) WithDefaults() *DownloadBaseosPatchParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadBaseosPatchParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download baseos patch params -func (o *DownloadBaseosPatchParams) WithTimeout(timeout time.Duration) *DownloadBaseosPatchParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download baseos patch params -func (o *DownloadBaseosPatchParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download baseos patch params -func (o *DownloadBaseosPatchParams) WithContext(ctx context.Context) *DownloadBaseosPatchParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download baseos patch params -func (o *DownloadBaseosPatchParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download baseos patch params -func (o *DownloadBaseosPatchParams) WithHTTPClient(client *http.Client) *DownloadBaseosPatchParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download baseos patch params -func (o *DownloadBaseosPatchParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the download baseos patch params -func (o *DownloadBaseosPatchParams) WithBody(body *models.DownloadBaseosPatchRequest) *DownloadBaseosPatchParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the download baseos patch params -func (o *DownloadBaseosPatchParams) SetBody(body *models.DownloadBaseosPatchRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadBaseosPatchParams) 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/baseos_patch_management/download_baseos_patch_responses.go b/v2/client/baseos_patch_management/download_baseos_patch_responses.go deleted file mode 100644 index 13b13b63..00000000 --- a/v2/client/baseos_patch_management/download_baseos_patch_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DownloadBaseosPatchReader is a Reader for the DownloadBaseosPatch structure. -type DownloadBaseosPatchReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadBaseosPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadBaseosPatchOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadBaseosPatchDefault(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 - } -} - -// NewDownloadBaseosPatchOK creates a DownloadBaseosPatchOK with default headers values -func NewDownloadBaseosPatchOK() *DownloadBaseosPatchOK { - return &DownloadBaseosPatchOK{} -} - -/* -DownloadBaseosPatchOK describes a response with status code 200, with default header values. - -No Content -*/ -type DownloadBaseosPatchOK struct { -} - -// IsSuccess returns true when this download baseos patch o k response has a 2xx status code -func (o *DownloadBaseosPatchOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download baseos patch o k response has a 3xx status code -func (o *DownloadBaseosPatchOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download baseos patch o k response has a 4xx status code -func (o *DownloadBaseosPatchOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download baseos patch o k response has a 5xx status code -func (o *DownloadBaseosPatchOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download baseos patch o k response a status code equal to that given -func (o *DownloadBaseosPatchOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download baseos patch o k response -func (o *DownloadBaseosPatchOK) Code() int { - return 200 -} - -func (o *DownloadBaseosPatchOK) Error() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-download][%d] downloadBaseosPatchOK", 200) -} - -func (o *DownloadBaseosPatchOK) String() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-download][%d] downloadBaseosPatchOK", 200) -} - -func (o *DownloadBaseosPatchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDownloadBaseosPatchDefault creates a DownloadBaseosPatchDefault with default headers values -func NewDownloadBaseosPatchDefault(code int) *DownloadBaseosPatchDefault { - return &DownloadBaseosPatchDefault{ - _statusCode: code, - } -} - -/* -DownloadBaseosPatchDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadBaseosPatchDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this download baseos patch default response has a 2xx status code -func (o *DownloadBaseosPatchDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download baseos patch default response has a 3xx status code -func (o *DownloadBaseosPatchDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download baseos patch default response has a 4xx status code -func (o *DownloadBaseosPatchDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download baseos patch default response has a 5xx status code -func (o *DownloadBaseosPatchDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download baseos patch default response a status code equal to that given -func (o *DownloadBaseosPatchDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download baseos patch default response -func (o *DownloadBaseosPatchDefault) Code() int { - return o._statusCode -} - -func (o *DownloadBaseosPatchDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-download][%d] DownloadBaseosPatch default %s", o._statusCode, payload) -} - -func (o *DownloadBaseosPatchDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-download][%d] DownloadBaseosPatch default %s", o._statusCode, payload) -} - -func (o *DownloadBaseosPatchDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DownloadBaseosPatchDefault) 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/baseos_patch_management/get_baseos_patch_list_parameters.go b/v2/client/baseos_patch_management/get_baseos_patch_list_parameters.go deleted file mode 100644 index 44618730..00000000 --- a/v2/client/baseos_patch_management/get_baseos_patch_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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" -) - -// NewGetBaseosPatchListParams creates a new GetBaseosPatchListParams 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 NewGetBaseosPatchListParams() *GetBaseosPatchListParams { - return &GetBaseosPatchListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBaseosPatchListParamsWithTimeout creates a new GetBaseosPatchListParams object -// with the ability to set a timeout on a request. -func NewGetBaseosPatchListParamsWithTimeout(timeout time.Duration) *GetBaseosPatchListParams { - return &GetBaseosPatchListParams{ - timeout: timeout, - } -} - -// NewGetBaseosPatchListParamsWithContext creates a new GetBaseosPatchListParams object -// with the ability to set a context for a request. -func NewGetBaseosPatchListParamsWithContext(ctx context.Context) *GetBaseosPatchListParams { - return &GetBaseosPatchListParams{ - Context: ctx, - } -} - -// NewGetBaseosPatchListParamsWithHTTPClient creates a new GetBaseosPatchListParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBaseosPatchListParamsWithHTTPClient(client *http.Client) *GetBaseosPatchListParams { - return &GetBaseosPatchListParams{ - HTTPClient: client, - } -} - -/* -GetBaseosPatchListParams contains all the parameters to send to the API endpoint - - for the get baseos patch list operation. - - Typically these are written to a http.Request. -*/ -type GetBaseosPatchListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get baseos patch list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBaseosPatchListParams) WithDefaults() *GetBaseosPatchListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get baseos patch list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBaseosPatchListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get baseos patch list params -func (o *GetBaseosPatchListParams) WithTimeout(timeout time.Duration) *GetBaseosPatchListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get baseos patch list params -func (o *GetBaseosPatchListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get baseos patch list params -func (o *GetBaseosPatchListParams) WithContext(ctx context.Context) *GetBaseosPatchListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get baseos patch list params -func (o *GetBaseosPatchListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get baseos patch list params -func (o *GetBaseosPatchListParams) WithHTTPClient(client *http.Client) *GetBaseosPatchListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get baseos patch list params -func (o *GetBaseosPatchListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBaseosPatchListParams) 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/baseos_patch_management/get_baseos_patch_list_responses.go b/v2/client/baseos_patch_management/get_baseos_patch_list_responses.go deleted file mode 100644 index 4ea502c2..00000000 --- a/v2/client/baseos_patch_management/get_baseos_patch_list_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetBaseosPatchListReader is a Reader for the GetBaseosPatchList structure. -type GetBaseosPatchListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBaseosPatchListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBaseosPatchListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBaseosPatchListDefault(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 - } -} - -// NewGetBaseosPatchListOK creates a GetBaseosPatchListOK with default headers values -func NewGetBaseosPatchListOK() *GetBaseosPatchListOK { - return &GetBaseosPatchListOK{} -} - -/* -GetBaseosPatchListOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBaseosPatchListOK struct { - Payload models.BaseosPatchList -} - -// IsSuccess returns true when this get baseos patch list o k response has a 2xx status code -func (o *GetBaseosPatchListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get baseos patch list o k response has a 3xx status code -func (o *GetBaseosPatchListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get baseos patch list o k response has a 4xx status code -func (o *GetBaseosPatchListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get baseos patch list o k response has a 5xx status code -func (o *GetBaseosPatchListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get baseos patch list o k response a status code equal to that given -func (o *GetBaseosPatchListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get baseos patch list o k response -func (o *GetBaseosPatchListOK) Code() int { - return 200 -} - -func (o *GetBaseosPatchListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-list][%d] getBaseosPatchListOK %s", 200, payload) -} - -func (o *GetBaseosPatchListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-list][%d] getBaseosPatchListOK %s", 200, payload) -} - -func (o *GetBaseosPatchListOK) GetPayload() models.BaseosPatchList { - return o.Payload -} - -func (o *GetBaseosPatchListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBaseosPatchListDefault creates a GetBaseosPatchListDefault with default headers values -func NewGetBaseosPatchListDefault(code int) *GetBaseosPatchListDefault { - return &GetBaseosPatchListDefault{ - _statusCode: code, - } -} - -/* -GetBaseosPatchListDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBaseosPatchListDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get baseos patch list default response has a 2xx status code -func (o *GetBaseosPatchListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get baseos patch list default response has a 3xx status code -func (o *GetBaseosPatchListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get baseos patch list default response has a 4xx status code -func (o *GetBaseosPatchListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get baseos patch list default response has a 5xx status code -func (o *GetBaseosPatchListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get baseos patch list default response a status code equal to that given -func (o *GetBaseosPatchListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get baseos patch list default response -func (o *GetBaseosPatchListDefault) Code() int { - return o._statusCode -} - -func (o *GetBaseosPatchListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-list][%d] GetBaseosPatchList default %s", o._statusCode, payload) -} - -func (o *GetBaseosPatchListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-list][%d] GetBaseosPatchList default %s", o._statusCode, payload) -} - -func (o *GetBaseosPatchListDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetBaseosPatchListDefault) 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/baseos_patch_management/get_baseos_patch_log_parameters.go b/v2/client/baseos_patch_management/get_baseos_patch_log_parameters.go deleted file mode 100644 index b342ea75..00000000 --- a/v2/client/baseos_patch_management/get_baseos_patch_log_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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" -) - -// NewGetBaseosPatchLogParams creates a new GetBaseosPatchLogParams 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 NewGetBaseosPatchLogParams() *GetBaseosPatchLogParams { - return &GetBaseosPatchLogParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBaseosPatchLogParamsWithTimeout creates a new GetBaseosPatchLogParams object -// with the ability to set a timeout on a request. -func NewGetBaseosPatchLogParamsWithTimeout(timeout time.Duration) *GetBaseosPatchLogParams { - return &GetBaseosPatchLogParams{ - timeout: timeout, - } -} - -// NewGetBaseosPatchLogParamsWithContext creates a new GetBaseosPatchLogParams object -// with the ability to set a context for a request. -func NewGetBaseosPatchLogParamsWithContext(ctx context.Context) *GetBaseosPatchLogParams { - return &GetBaseosPatchLogParams{ - Context: ctx, - } -} - -// NewGetBaseosPatchLogParamsWithHTTPClient creates a new GetBaseosPatchLogParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBaseosPatchLogParamsWithHTTPClient(client *http.Client) *GetBaseosPatchLogParams { - return &GetBaseosPatchLogParams{ - HTTPClient: client, - } -} - -/* -GetBaseosPatchLogParams contains all the parameters to send to the API endpoint - - for the get baseos patch log operation. - - Typically these are written to a http.Request. -*/ -type GetBaseosPatchLogParams struct { - - /* PatchName. - - Name of the hotfix with security patch - */ - PatchName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get baseos patch log params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBaseosPatchLogParams) WithDefaults() *GetBaseosPatchLogParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get baseos patch log params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBaseosPatchLogParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get baseos patch log params -func (o *GetBaseosPatchLogParams) WithTimeout(timeout time.Duration) *GetBaseosPatchLogParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get baseos patch log params -func (o *GetBaseosPatchLogParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get baseos patch log params -func (o *GetBaseosPatchLogParams) WithContext(ctx context.Context) *GetBaseosPatchLogParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get baseos patch log params -func (o *GetBaseosPatchLogParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get baseos patch log params -func (o *GetBaseosPatchLogParams) WithHTTPClient(client *http.Client) *GetBaseosPatchLogParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get baseos patch log params -func (o *GetBaseosPatchLogParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPatchName adds the patchName to the get baseos patch log params -func (o *GetBaseosPatchLogParams) WithPatchName(patchName string) *GetBaseosPatchLogParams { - o.SetPatchName(patchName) - return o -} - -// SetPatchName adds the patchName to the get baseos patch log params -func (o *GetBaseosPatchLogParams) SetPatchName(patchName string) { - o.PatchName = patchName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBaseosPatchLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param patchName - qrPatchName := o.PatchName - qPatchName := qrPatchName - if qPatchName != "" { - - if err := r.SetQueryParam("patchName", qPatchName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/baseos_patch_management/get_baseos_patch_log_responses.go b/v2/client/baseos_patch_management/get_baseos_patch_log_responses.go deleted file mode 100644 index b1c2597e..00000000 --- a/v2/client/baseos_patch_management/get_baseos_patch_log_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetBaseosPatchLogReader is a Reader for the GetBaseosPatchLog structure. -type GetBaseosPatchLogReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBaseosPatchLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBaseosPatchLogOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetBaseosPatchLogDefault(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 - } -} - -// NewGetBaseosPatchLogOK creates a GetBaseosPatchLogOK with default headers values -func NewGetBaseosPatchLogOK() *GetBaseosPatchLogOK { - return &GetBaseosPatchLogOK{} -} - -/* -GetBaseosPatchLogOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBaseosPatchLogOK struct { - Payload *models.BaseosPatchLog -} - -// IsSuccess returns true when this get baseos patch log o k response has a 2xx status code -func (o *GetBaseosPatchLogOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get baseos patch log o k response has a 3xx status code -func (o *GetBaseosPatchLogOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get baseos patch log o k response has a 4xx status code -func (o *GetBaseosPatchLogOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get baseos patch log o k response has a 5xx status code -func (o *GetBaseosPatchLogOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get baseos patch log o k response a status code equal to that given -func (o *GetBaseosPatchLogOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get baseos patch log o k response -func (o *GetBaseosPatchLogOK) Code() int { - return 200 -} - -func (o *GetBaseosPatchLogOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-log][%d] getBaseosPatchLogOK %s", 200, payload) -} - -func (o *GetBaseosPatchLogOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-log][%d] getBaseosPatchLogOK %s", 200, payload) -} - -func (o *GetBaseosPatchLogOK) GetPayload() *models.BaseosPatchLog { - return o.Payload -} - -func (o *GetBaseosPatchLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BaseosPatchLog) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBaseosPatchLogDefault creates a GetBaseosPatchLogDefault with default headers values -func NewGetBaseosPatchLogDefault(code int) *GetBaseosPatchLogDefault { - return &GetBaseosPatchLogDefault{ - _statusCode: code, - } -} - -/* -GetBaseosPatchLogDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetBaseosPatchLogDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get baseos patch log default response has a 2xx status code -func (o *GetBaseosPatchLogDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get baseos patch log default response has a 3xx status code -func (o *GetBaseosPatchLogDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get baseos patch log default response has a 4xx status code -func (o *GetBaseosPatchLogDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get baseos patch log default response has a 5xx status code -func (o *GetBaseosPatchLogDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get baseos patch log default response a status code equal to that given -func (o *GetBaseosPatchLogDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get baseos patch log default response -func (o *GetBaseosPatchLogDefault) Code() int { - return o._statusCode -} - -func (o *GetBaseosPatchLogDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-log][%d] GetBaseosPatchLog default %s", o._statusCode, payload) -} - -func (o *GetBaseosPatchLogDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/baseos-patch-log][%d] GetBaseosPatchLog default %s", o._statusCode, payload) -} - -func (o *GetBaseosPatchLogDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetBaseosPatchLogDefault) 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/baseos_patch_management/remove_baseos_patch_parameters.go b/v2/client/baseos_patch_management/remove_baseos_patch_parameters.go deleted file mode 100644 index 41bd90dd..00000000 --- a/v2/client/baseos_patch_management/remove_baseos_patch_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRemoveBaseosPatchParams creates a new RemoveBaseosPatchParams 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 NewRemoveBaseosPatchParams() *RemoveBaseosPatchParams { - return &RemoveBaseosPatchParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveBaseosPatchParamsWithTimeout creates a new RemoveBaseosPatchParams object -// with the ability to set a timeout on a request. -func NewRemoveBaseosPatchParamsWithTimeout(timeout time.Duration) *RemoveBaseosPatchParams { - return &RemoveBaseosPatchParams{ - timeout: timeout, - } -} - -// NewRemoveBaseosPatchParamsWithContext creates a new RemoveBaseosPatchParams object -// with the ability to set a context for a request. -func NewRemoveBaseosPatchParamsWithContext(ctx context.Context) *RemoveBaseosPatchParams { - return &RemoveBaseosPatchParams{ - Context: ctx, - } -} - -// NewRemoveBaseosPatchParamsWithHTTPClient creates a new RemoveBaseosPatchParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveBaseosPatchParamsWithHTTPClient(client *http.Client) *RemoveBaseosPatchParams { - return &RemoveBaseosPatchParams{ - HTTPClient: client, - } -} - -/* -RemoveBaseosPatchParams contains all the parameters to send to the API endpoint - - for the remove baseos patch operation. - - Typically these are written to a http.Request. -*/ -type RemoveBaseosPatchParams struct { - - /* Body. - - Request to remove baseos patch files. - */ - Body *models.RemoveBaseosPatchRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveBaseosPatchParams) WithDefaults() *RemoveBaseosPatchParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove baseos patch params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveBaseosPatchParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove baseos patch params -func (o *RemoveBaseosPatchParams) WithTimeout(timeout time.Duration) *RemoveBaseosPatchParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove baseos patch params -func (o *RemoveBaseosPatchParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove baseos patch params -func (o *RemoveBaseosPatchParams) WithContext(ctx context.Context) *RemoveBaseosPatchParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove baseos patch params -func (o *RemoveBaseosPatchParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove baseos patch params -func (o *RemoveBaseosPatchParams) WithHTTPClient(client *http.Client) *RemoveBaseosPatchParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove baseos patch params -func (o *RemoveBaseosPatchParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the remove baseos patch params -func (o *RemoveBaseosPatchParams) WithBody(body *models.RemoveBaseosPatchRequest) *RemoveBaseosPatchParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the remove baseos patch params -func (o *RemoveBaseosPatchParams) SetBody(body *models.RemoveBaseosPatchRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveBaseosPatchParams) 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/baseos_patch_management/remove_baseos_patch_responses.go b/v2/client/baseos_patch_management/remove_baseos_patch_responses.go deleted file mode 100644 index 9a085b7d..00000000 --- a/v2/client/baseos_patch_management/remove_baseos_patch_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package baseos_patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RemoveBaseosPatchReader is a Reader for the RemoveBaseosPatch structure. -type RemoveBaseosPatchReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveBaseosPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRemoveBaseosPatchOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveBaseosPatchDefault(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 - } -} - -// NewRemoveBaseosPatchOK creates a RemoveBaseosPatchOK with default headers values -func NewRemoveBaseosPatchOK() *RemoveBaseosPatchOK { - return &RemoveBaseosPatchOK{} -} - -/* -RemoveBaseosPatchOK describes a response with status code 200, with default header values. - -No Content -*/ -type RemoveBaseosPatchOK struct { -} - -// IsSuccess returns true when this remove baseos patch o k response has a 2xx status code -func (o *RemoveBaseosPatchOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove baseos patch o k response has a 3xx status code -func (o *RemoveBaseosPatchOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove baseos patch o k response has a 4xx status code -func (o *RemoveBaseosPatchOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove baseos patch o k response has a 5xx status code -func (o *RemoveBaseosPatchOK) IsServerError() bool { - return false -} - -// IsCode returns true when this remove baseos patch o k response a status code equal to that given -func (o *RemoveBaseosPatchOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the remove baseos patch o k response -func (o *RemoveBaseosPatchOK) Code() int { - return 200 -} - -func (o *RemoveBaseosPatchOK) Error() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-remove][%d] removeBaseosPatchOK", 200) -} - -func (o *RemoveBaseosPatchOK) String() string { - return fmt.Sprintf("[POST /patch-management/baseos-patch-remove][%d] removeBaseosPatchOK", 200) -} - -func (o *RemoveBaseosPatchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveBaseosPatchDefault creates a RemoveBaseosPatchDefault with default headers values -func NewRemoveBaseosPatchDefault(code int) *RemoveBaseosPatchDefault { - return &RemoveBaseosPatchDefault{ - _statusCode: code, - } -} - -/* -RemoveBaseosPatchDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveBaseosPatchDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this remove baseos patch default response has a 2xx status code -func (o *RemoveBaseosPatchDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove baseos patch default response has a 3xx status code -func (o *RemoveBaseosPatchDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove baseos patch default response has a 4xx status code -func (o *RemoveBaseosPatchDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove baseos patch default response has a 5xx status code -func (o *RemoveBaseosPatchDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove baseos patch default response a status code equal to that given -func (o *RemoveBaseosPatchDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove baseos patch default response -func (o *RemoveBaseosPatchDefault) Code() int { - return o._statusCode -} - -func (o *RemoveBaseosPatchDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-remove][%d] RemoveBaseosPatch default %s", o._statusCode, payload) -} - -func (o *RemoveBaseosPatchDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/baseos-patch-remove][%d] RemoveBaseosPatch default %s", o._statusCode, payload) -} - -func (o *RemoveBaseosPatchDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RemoveBaseosPatchDefault) 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/cloud_retrieve_task/cloud_retrieve_task_client.go b/v2/client/cloud_retrieve_task/cloud_retrieve_task_client.go deleted file mode 100644 index c3a4bc39..00000000 --- a/v2/client/cloud_retrieve_task/cloud_retrieve_task_client.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new cloud retrieve task API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new cloud retrieve task API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new cloud retrieve task API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for cloud retrieve task API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateCloudRetrieveTask(params *CreateCloudRetrieveTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudRetrieveTaskCreated, error) - - GetCloudRetrieveTaskByJobID(params *GetCloudRetrieveTaskByJobIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudRetrieveTaskByJobIDOK, error) - - GetCloudRetrieveTasks(params *GetCloudRetrieveTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudRetrieveTasksOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateCloudRetrieveTask creates a cloud retrieve task - -Create a cloud retrieve task. -*/ -func (a *Client) CreateCloudRetrieveTask(params *CreateCloudRetrieveTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCloudRetrieveTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCloudRetrieveTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCloudRetrieveTask", - Method: "POST", - PathPattern: "/data-protect/retrieve", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCloudRetrieveTaskReader{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.(*CreateCloudRetrieveTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCloudRetrieveTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCloudRetrieveTaskByJobID lists details about the cloud retrieve task with the specific job id - -Returns the cloud retrieve task corresponding to the job id. -*/ -func (a *Client) GetCloudRetrieveTaskByJobID(params *GetCloudRetrieveTaskByJobIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudRetrieveTaskByJobIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCloudRetrieveTaskByJobIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetCloudRetrieveTaskByJobId", - Method: "GET", - PathPattern: "/data-protect/retrieve/{jobId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCloudRetrieveTaskByJobIDReader{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.(*GetCloudRetrieveTaskByJobIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCloudRetrieveTaskByJobIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCloudRetrieveTasks gets the list of cloud retrieve tasks - -Get the list of cloud retrieve tasks. -*/ -func (a *Client) GetCloudRetrieveTasks(params *GetCloudRetrieveTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCloudRetrieveTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCloudRetrieveTasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetCloudRetrieveTasks", - Method: "GET", - PathPattern: "/data-protect/retrieve", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCloudRetrieveTasksReader{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.(*GetCloudRetrieveTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCloudRetrieveTasksDefault) - 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/v2/client/cloud_retrieve_task/create_cloud_retrieve_task_parameters.go b/v2/client/cloud_retrieve_task/create_cloud_retrieve_task_parameters.go deleted file mode 100644 index 8ef157c7..00000000 --- a/v2/client/cloud_retrieve_task/create_cloud_retrieve_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateCloudRetrieveTaskParams creates a new CreateCloudRetrieveTaskParams 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 NewCreateCloudRetrieveTaskParams() *CreateCloudRetrieveTaskParams { - return &CreateCloudRetrieveTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCloudRetrieveTaskParamsWithTimeout creates a new CreateCloudRetrieveTaskParams object -// with the ability to set a timeout on a request. -func NewCreateCloudRetrieveTaskParamsWithTimeout(timeout time.Duration) *CreateCloudRetrieveTaskParams { - return &CreateCloudRetrieveTaskParams{ - timeout: timeout, - } -} - -// NewCreateCloudRetrieveTaskParamsWithContext creates a new CreateCloudRetrieveTaskParams object -// with the ability to set a context for a request. -func NewCreateCloudRetrieveTaskParamsWithContext(ctx context.Context) *CreateCloudRetrieveTaskParams { - return &CreateCloudRetrieveTaskParams{ - Context: ctx, - } -} - -// NewCreateCloudRetrieveTaskParamsWithHTTPClient creates a new CreateCloudRetrieveTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCloudRetrieveTaskParamsWithHTTPClient(client *http.Client) *CreateCloudRetrieveTaskParams { - return &CreateCloudRetrieveTaskParams{ - HTTPClient: client, - } -} - -/* -CreateCloudRetrieveTaskParams contains all the parameters to send to the API endpoint - - for the create cloud retrieve task operation. - - Typically these are written to a http.Request. -*/ -type CreateCloudRetrieveTaskParams struct { - - /* Body. - - Specifies the parameters to create a cloud retrieve. - */ - Body *models.CreateCloudRetrieveTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create cloud retrieve task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudRetrieveTaskParams) WithDefaults() *CreateCloudRetrieveTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create cloud retrieve task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCloudRetrieveTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) WithTimeout(timeout time.Duration) *CreateCloudRetrieveTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) WithContext(ctx context.Context) *CreateCloudRetrieveTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) WithHTTPClient(client *http.Client) *CreateCloudRetrieveTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) WithBody(body *models.CreateCloudRetrieveTaskRequest) *CreateCloudRetrieveTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create cloud retrieve task params -func (o *CreateCloudRetrieveTaskParams) SetBody(body *models.CreateCloudRetrieveTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCloudRetrieveTaskParams) 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/cloud_retrieve_task/create_cloud_retrieve_task_responses.go b/v2/client/cloud_retrieve_task/create_cloud_retrieve_task_responses.go deleted file mode 100644 index e54c6fe8..00000000 --- a/v2/client/cloud_retrieve_task/create_cloud_retrieve_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateCloudRetrieveTaskReader is a Reader for the CreateCloudRetrieveTask structure. -type CreateCloudRetrieveTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCloudRetrieveTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCloudRetrieveTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCloudRetrieveTaskDefault(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 - } -} - -// NewCreateCloudRetrieveTaskCreated creates a CreateCloudRetrieveTaskCreated with default headers values -func NewCreateCloudRetrieveTaskCreated() *CreateCloudRetrieveTaskCreated { - return &CreateCloudRetrieveTaskCreated{} -} - -/* -CreateCloudRetrieveTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateCloudRetrieveTaskCreated struct { - Payload *models.CreateCloudRetrieveTaskRespBody -} - -// IsSuccess returns true when this create cloud retrieve task created response has a 2xx status code -func (o *CreateCloudRetrieveTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create cloud retrieve task created response has a 3xx status code -func (o *CreateCloudRetrieveTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create cloud retrieve task created response has a 4xx status code -func (o *CreateCloudRetrieveTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create cloud retrieve task created response has a 5xx status code -func (o *CreateCloudRetrieveTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create cloud retrieve task created response a status code equal to that given -func (o *CreateCloudRetrieveTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create cloud retrieve task created response -func (o *CreateCloudRetrieveTaskCreated) Code() int { - return 201 -} - -func (o *CreateCloudRetrieveTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/retrieve][%d] createCloudRetrieveTaskCreated %s", 201, payload) -} - -func (o *CreateCloudRetrieveTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/retrieve][%d] createCloudRetrieveTaskCreated %s", 201, payload) -} - -func (o *CreateCloudRetrieveTaskCreated) GetPayload() *models.CreateCloudRetrieveTaskRespBody { - return o.Payload -} - -func (o *CreateCloudRetrieveTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateCloudRetrieveTaskRespBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateCloudRetrieveTaskDefault creates a CreateCloudRetrieveTaskDefault with default headers values -func NewCreateCloudRetrieveTaskDefault(code int) *CreateCloudRetrieveTaskDefault { - return &CreateCloudRetrieveTaskDefault{ - _statusCode: code, - } -} - -/* -CreateCloudRetrieveTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCloudRetrieveTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create cloud retrieve task default response has a 2xx status code -func (o *CreateCloudRetrieveTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create cloud retrieve task default response has a 3xx status code -func (o *CreateCloudRetrieveTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create cloud retrieve task default response has a 4xx status code -func (o *CreateCloudRetrieveTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create cloud retrieve task default response has a 5xx status code -func (o *CreateCloudRetrieveTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create cloud retrieve task default response a status code equal to that given -func (o *CreateCloudRetrieveTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create cloud retrieve task default response -func (o *CreateCloudRetrieveTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateCloudRetrieveTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/retrieve][%d] CreateCloudRetrieveTask default %s", o._statusCode, payload) -} - -func (o *CreateCloudRetrieveTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/retrieve][%d] CreateCloudRetrieveTask default %s", o._statusCode, payload) -} - -func (o *CreateCloudRetrieveTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateCloudRetrieveTaskDefault) 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/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_parameters.go b/v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_parameters.go deleted file mode 100644 index a769f749..00000000 --- a/v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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/go-openapi/swag" -) - -// NewGetCloudRetrieveTaskByJobIDParams creates a new GetCloudRetrieveTaskByJobIDParams 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 NewGetCloudRetrieveTaskByJobIDParams() *GetCloudRetrieveTaskByJobIDParams { - return &GetCloudRetrieveTaskByJobIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCloudRetrieveTaskByJobIDParamsWithTimeout creates a new GetCloudRetrieveTaskByJobIDParams object -// with the ability to set a timeout on a request. -func NewGetCloudRetrieveTaskByJobIDParamsWithTimeout(timeout time.Duration) *GetCloudRetrieveTaskByJobIDParams { - return &GetCloudRetrieveTaskByJobIDParams{ - timeout: timeout, - } -} - -// NewGetCloudRetrieveTaskByJobIDParamsWithContext creates a new GetCloudRetrieveTaskByJobIDParams object -// with the ability to set a context for a request. -func NewGetCloudRetrieveTaskByJobIDParamsWithContext(ctx context.Context) *GetCloudRetrieveTaskByJobIDParams { - return &GetCloudRetrieveTaskByJobIDParams{ - Context: ctx, - } -} - -// NewGetCloudRetrieveTaskByJobIDParamsWithHTTPClient creates a new GetCloudRetrieveTaskByJobIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCloudRetrieveTaskByJobIDParamsWithHTTPClient(client *http.Client) *GetCloudRetrieveTaskByJobIDParams { - return &GetCloudRetrieveTaskByJobIDParams{ - HTTPClient: client, - } -} - -/* -GetCloudRetrieveTaskByJobIDParams contains all the parameters to send to the API endpoint - - for the get cloud retrieve task by job Id operation. - - Typically these are written to a http.Request. -*/ -type GetCloudRetrieveTaskByJobIDParams struct { - - /* JobID. - - Specifies a job id of the cloud retrieve task. - - Format: int64 - */ - JobID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cloud retrieve task by job Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudRetrieveTaskByJobIDParams) WithDefaults() *GetCloudRetrieveTaskByJobIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cloud retrieve task by job Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudRetrieveTaskByJobIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) WithTimeout(timeout time.Duration) *GetCloudRetrieveTaskByJobIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) WithContext(ctx context.Context) *GetCloudRetrieveTaskByJobIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) WithHTTPClient(client *http.Client) *GetCloudRetrieveTaskByJobIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithJobID adds the jobID to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) WithJobID(jobID int64) *GetCloudRetrieveTaskByJobIDParams { - o.SetJobID(jobID) - return o -} - -// SetJobID adds the jobId to the get cloud retrieve task by job Id params -func (o *GetCloudRetrieveTaskByJobIDParams) SetJobID(jobID int64) { - o.JobID = jobID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCloudRetrieveTaskByJobIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param jobId - if err := r.SetPathParam("jobId", swag.FormatInt64(o.JobID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_responses.go b/v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_responses.go deleted file mode 100644 index d3f306f2..00000000 --- a/v2/client/cloud_retrieve_task/get_cloud_retrieve_task_by_job_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCloudRetrieveTaskByJobIDReader is a Reader for the GetCloudRetrieveTaskByJobID structure. -type GetCloudRetrieveTaskByJobIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCloudRetrieveTaskByJobIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCloudRetrieveTaskByJobIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCloudRetrieveTaskByJobIDDefault(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 - } -} - -// NewGetCloudRetrieveTaskByJobIDOK creates a GetCloudRetrieveTaskByJobIDOK with default headers values -func NewGetCloudRetrieveTaskByJobIDOK() *GetCloudRetrieveTaskByJobIDOK { - return &GetCloudRetrieveTaskByJobIDOK{} -} - -/* -GetCloudRetrieveTaskByJobIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCloudRetrieveTaskByJobIDOK struct { - Payload *models.CloudRetrieveTask -} - -// IsSuccess returns true when this get cloud retrieve task by job Id o k response has a 2xx status code -func (o *GetCloudRetrieveTaskByJobIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cloud retrieve task by job Id o k response has a 3xx status code -func (o *GetCloudRetrieveTaskByJobIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud retrieve task by job Id o k response has a 4xx status code -func (o *GetCloudRetrieveTaskByJobIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cloud retrieve task by job Id o k response has a 5xx status code -func (o *GetCloudRetrieveTaskByJobIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud retrieve task by job Id o k response a status code equal to that given -func (o *GetCloudRetrieveTaskByJobIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cloud retrieve task by job Id o k response -func (o *GetCloudRetrieveTaskByJobIDOK) Code() int { - return 200 -} - -func (o *GetCloudRetrieveTaskByJobIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve/{jobId}][%d] getCloudRetrieveTaskByJobIdOK %s", 200, payload) -} - -func (o *GetCloudRetrieveTaskByJobIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve/{jobId}][%d] getCloudRetrieveTaskByJobIdOK %s", 200, payload) -} - -func (o *GetCloudRetrieveTaskByJobIDOK) GetPayload() *models.CloudRetrieveTask { - return o.Payload -} - -func (o *GetCloudRetrieveTaskByJobIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CloudRetrieveTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudRetrieveTaskByJobIDDefault creates a GetCloudRetrieveTaskByJobIDDefault with default headers values -func NewGetCloudRetrieveTaskByJobIDDefault(code int) *GetCloudRetrieveTaskByJobIDDefault { - return &GetCloudRetrieveTaskByJobIDDefault{ - _statusCode: code, - } -} - -/* -GetCloudRetrieveTaskByJobIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCloudRetrieveTaskByJobIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cloud retrieve task by job Id default response has a 2xx status code -func (o *GetCloudRetrieveTaskByJobIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cloud retrieve task by job Id default response has a 3xx status code -func (o *GetCloudRetrieveTaskByJobIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cloud retrieve task by job Id default response has a 4xx status code -func (o *GetCloudRetrieveTaskByJobIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cloud retrieve task by job Id default response has a 5xx status code -func (o *GetCloudRetrieveTaskByJobIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cloud retrieve task by job Id default response a status code equal to that given -func (o *GetCloudRetrieveTaskByJobIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cloud retrieve task by job Id default response -func (o *GetCloudRetrieveTaskByJobIDDefault) Code() int { - return o._statusCode -} - -func (o *GetCloudRetrieveTaskByJobIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve/{jobId}][%d] GetCloudRetrieveTaskByJobId default %s", o._statusCode, payload) -} - -func (o *GetCloudRetrieveTaskByJobIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve/{jobId}][%d] GetCloudRetrieveTaskByJobId default %s", o._statusCode, payload) -} - -func (o *GetCloudRetrieveTaskByJobIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCloudRetrieveTaskByJobIDDefault) 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/cloud_retrieve_task/get_cloud_retrieve_tasks_parameters.go b/v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_parameters.go deleted file mode 100644 index ca5615d7..00000000 --- a/v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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" -) - -// NewGetCloudRetrieveTasksParams creates a new GetCloudRetrieveTasksParams 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 NewGetCloudRetrieveTasksParams() *GetCloudRetrieveTasksParams { - return &GetCloudRetrieveTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCloudRetrieveTasksParamsWithTimeout creates a new GetCloudRetrieveTasksParams object -// with the ability to set a timeout on a request. -func NewGetCloudRetrieveTasksParamsWithTimeout(timeout time.Duration) *GetCloudRetrieveTasksParams { - return &GetCloudRetrieveTasksParams{ - timeout: timeout, - } -} - -// NewGetCloudRetrieveTasksParamsWithContext creates a new GetCloudRetrieveTasksParams object -// with the ability to set a context for a request. -func NewGetCloudRetrieveTasksParamsWithContext(ctx context.Context) *GetCloudRetrieveTasksParams { - return &GetCloudRetrieveTasksParams{ - Context: ctx, - } -} - -// NewGetCloudRetrieveTasksParamsWithHTTPClient creates a new GetCloudRetrieveTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCloudRetrieveTasksParamsWithHTTPClient(client *http.Client) *GetCloudRetrieveTasksParams { - return &GetCloudRetrieveTasksParams{ - HTTPClient: client, - } -} - -/* -GetCloudRetrieveTasksParams contains all the parameters to send to the API endpoint - - for the get cloud retrieve tasks operation. - - Typically these are written to a http.Request. -*/ -type GetCloudRetrieveTasksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cloud retrieve tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudRetrieveTasksParams) WithDefaults() *GetCloudRetrieveTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cloud retrieve tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCloudRetrieveTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) WithTimeout(timeout time.Duration) *GetCloudRetrieveTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) WithContext(ctx context.Context) *GetCloudRetrieveTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) WithHTTPClient(client *http.Client) *GetCloudRetrieveTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cloud retrieve tasks params -func (o *GetCloudRetrieveTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCloudRetrieveTasksParams) 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/cloud_retrieve_task/get_cloud_retrieve_tasks_responses.go b/v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_responses.go deleted file mode 100644 index 023cb030..00000000 --- a/v2/client/cloud_retrieve_task/get_cloud_retrieve_tasks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package cloud_retrieve_task - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCloudRetrieveTasksReader is a Reader for the GetCloudRetrieveTasks structure. -type GetCloudRetrieveTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCloudRetrieveTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCloudRetrieveTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCloudRetrieveTasksDefault(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 - } -} - -// NewGetCloudRetrieveTasksOK creates a GetCloudRetrieveTasksOK with default headers values -func NewGetCloudRetrieveTasksOK() *GetCloudRetrieveTasksOK { - return &GetCloudRetrieveTasksOK{} -} - -/* -GetCloudRetrieveTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCloudRetrieveTasksOK struct { - Payload *models.CloudRetrieveTasks -} - -// IsSuccess returns true when this get cloud retrieve tasks o k response has a 2xx status code -func (o *GetCloudRetrieveTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cloud retrieve tasks o k response has a 3xx status code -func (o *GetCloudRetrieveTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cloud retrieve tasks o k response has a 4xx status code -func (o *GetCloudRetrieveTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cloud retrieve tasks o k response has a 5xx status code -func (o *GetCloudRetrieveTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cloud retrieve tasks o k response a status code equal to that given -func (o *GetCloudRetrieveTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cloud retrieve tasks o k response -func (o *GetCloudRetrieveTasksOK) Code() int { - return 200 -} - -func (o *GetCloudRetrieveTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve][%d] getCloudRetrieveTasksOK %s", 200, payload) -} - -func (o *GetCloudRetrieveTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve][%d] getCloudRetrieveTasksOK %s", 200, payload) -} - -func (o *GetCloudRetrieveTasksOK) GetPayload() *models.CloudRetrieveTasks { - return o.Payload -} - -func (o *GetCloudRetrieveTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CloudRetrieveTasks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCloudRetrieveTasksDefault creates a GetCloudRetrieveTasksDefault with default headers values -func NewGetCloudRetrieveTasksDefault(code int) *GetCloudRetrieveTasksDefault { - return &GetCloudRetrieveTasksDefault{ - _statusCode: code, - } -} - -/* -GetCloudRetrieveTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCloudRetrieveTasksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cloud retrieve tasks default response has a 2xx status code -func (o *GetCloudRetrieveTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cloud retrieve tasks default response has a 3xx status code -func (o *GetCloudRetrieveTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cloud retrieve tasks default response has a 4xx status code -func (o *GetCloudRetrieveTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cloud retrieve tasks default response has a 5xx status code -func (o *GetCloudRetrieveTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cloud retrieve tasks default response a status code equal to that given -func (o *GetCloudRetrieveTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cloud retrieve tasks default response -func (o *GetCloudRetrieveTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetCloudRetrieveTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve][%d] GetCloudRetrieveTasks default %s", o._statusCode, payload) -} - -func (o *GetCloudRetrieveTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/retrieve][%d] GetCloudRetrieveTasks default %s", o._statusCode, payload) -} - -func (o *GetCloudRetrieveTasksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCloudRetrieveTasksDefault) 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/cohesity_r_e_s_t_api_client.go b/v2/client/cohesity_r_e_s_t_api_client.go deleted file mode 100644 index 7261f3a5..00000000 --- a/v2/client/cohesity_r_e_s_t_api_client.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/access_token" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/active_directory" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/agent" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/alert" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/antivirus_service" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/audit_log" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/baseos_patch_management" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/cloud_retrieve_task" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/data_tiering" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/external_target" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/failover" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/firewall" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/helios_on_prem" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/i_ps" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/identity_provider" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/kerberos_provider" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/key_management_system" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/keystone" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/l_d_a_p" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/m_f_a" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/node_group" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/object" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/patch_management" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/platform" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/policy" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/privilege" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/protected_object" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/protection_group" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/recovery" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/registration" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/remote_clusters" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/remote_storage" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/role" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/routes" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/search" - securityops "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/security" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/source" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/stats" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/storage_domain" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/support" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/syslog" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/tag" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/templates" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/tenant" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/user" - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/client/view" -) - -// Default cohesity r e s t API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/v2" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"https"} - -// NewHTTPClient creates a new cohesity r e s t API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *CohesityRESTAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new cohesity r e s t API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *CohesityRESTAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new cohesity r e s t API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *CohesityRESTAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(CohesityRESTAPI) - cli.Transport = transport - cli.AccessToken = access_token.New(transport, formats) - cli.ActiveDirectory = active_directory.New(transport, formats) - cli.Agent = agent.New(transport, formats) - cli.Alert = alert.New(transport, formats) - cli.AntivirusService = antivirus_service.New(transport, formats) - cli.AuditLog = audit_log.New(transport, formats) - cli.BaseosPatchManagement = baseos_patch_management.New(transport, formats) - cli.CloudRetrieveTask = cloud_retrieve_task.New(transport, formats) - cli.DataTiering = data_tiering.New(transport, formats) - cli.ExternalTarget = external_target.New(transport, formats) - cli.Failover = failover.New(transport, formats) - cli.Firewall = firewall.New(transport, formats) - cli.HeliosOnPrem = helios_on_prem.New(transport, formats) - cli.IPs = i_ps.New(transport, formats) - cli.IdentityProvider = identity_provider.New(transport, formats) - cli.KerberosProvider = kerberos_provider.New(transport, formats) - cli.KeyManagementSystem = key_management_system.New(transport, formats) - cli.Keystone = keystone.New(transport, formats) - cli.Ldap = l_d_a_p.New(transport, formats) - cli.Mfa = m_f_a.New(transport, formats) - cli.NodeGroup = node_group.New(transport, formats) - cli.Object = object.New(transport, formats) - cli.PatchManagement = patch_management.New(transport, formats) - cli.Platform = platform.New(transport, formats) - cli.Policy = policy.New(transport, formats) - cli.Privilege = privilege.New(transport, formats) - cli.ProtectedObject = protected_object.New(transport, formats) - cli.ProtectionGroup = protection_group.New(transport, formats) - cli.Recovery = recovery.New(transport, formats) - cli.Registration = registration.New(transport, formats) - cli.RemoteClusters = remote_clusters.New(transport, formats) - cli.RemoteStorage = remote_storage.New(transport, formats) - cli.Role = role.New(transport, formats) - cli.Routes = routes.New(transport, formats) - cli.Search = search.New(transport, formats) - cli.Security = securityops.New(transport, formats) - cli.Source = source.New(transport, formats) - cli.Stats = stats.New(transport, formats) - cli.StorageDomain = storage_domain.New(transport, formats) - cli.Support = support.New(transport, formats) - cli.Syslog = syslog.New(transport, formats) - cli.Tag = tag.New(transport, formats) - cli.Templates = templates.New(transport, formats) - cli.Tenant = tenant.New(transport, formats) - cli.User = user.New(transport, formats) - cli.View = view.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// CohesityRESTAPI is a client for cohesity r e s t API -type CohesityRESTAPI struct { - AccessToken access_token.ClientService - - ActiveDirectory active_directory.ClientService - - Agent agent.ClientService - - Alert alert.ClientService - - AntivirusService antivirus_service.ClientService - - AuditLog audit_log.ClientService - - BaseosPatchManagement baseos_patch_management.ClientService - - CloudRetrieveTask cloud_retrieve_task.ClientService - - DataTiering data_tiering.ClientService - - ExternalTarget external_target.ClientService - - Failover failover.ClientService - - Firewall firewall.ClientService - - HeliosOnPrem helios_on_prem.ClientService - - IPs i_ps.ClientService - - IdentityProvider identity_provider.ClientService - - KerberosProvider kerberos_provider.ClientService - - KeyManagementSystem key_management_system.ClientService - - Keystone keystone.ClientService - - Ldap l_d_a_p.ClientService - - Mfa m_f_a.ClientService - - NodeGroup node_group.ClientService - - Object object.ClientService - - PatchManagement patch_management.ClientService - - Platform platform.ClientService - - Policy policy.ClientService - - Privilege privilege.ClientService - - ProtectedObject protected_object.ClientService - - ProtectionGroup protection_group.ClientService - - Recovery recovery.ClientService - - Registration registration.ClientService - - RemoteClusters remote_clusters.ClientService - - RemoteStorage remote_storage.ClientService - - Role role.ClientService - - Routes routes.ClientService - - Search search.ClientService - - Security securityops.ClientService - - Source source.ClientService - - Stats stats.ClientService - - StorageDomain storage_domain.ClientService - - Support support.ClientService - - Syslog syslog.ClientService - - Tag tag.ClientService - - Templates templates.ClientService - - Tenant tenant.ClientService - - User user.ClientService - - View view.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *CohesityRESTAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.AccessToken.SetTransport(transport) - c.ActiveDirectory.SetTransport(transport) - c.Agent.SetTransport(transport) - c.Alert.SetTransport(transport) - c.AntivirusService.SetTransport(transport) - c.AuditLog.SetTransport(transport) - c.BaseosPatchManagement.SetTransport(transport) - c.CloudRetrieveTask.SetTransport(transport) - c.DataTiering.SetTransport(transport) - c.ExternalTarget.SetTransport(transport) - c.Failover.SetTransport(transport) - c.Firewall.SetTransport(transport) - c.HeliosOnPrem.SetTransport(transport) - c.IPs.SetTransport(transport) - c.IdentityProvider.SetTransport(transport) - c.KerberosProvider.SetTransport(transport) - c.KeyManagementSystem.SetTransport(transport) - c.Keystone.SetTransport(transport) - c.Ldap.SetTransport(transport) - c.Mfa.SetTransport(transport) - c.NodeGroup.SetTransport(transport) - c.Object.SetTransport(transport) - c.PatchManagement.SetTransport(transport) - c.Platform.SetTransport(transport) - c.Policy.SetTransport(transport) - c.Privilege.SetTransport(transport) - c.ProtectedObject.SetTransport(transport) - c.ProtectionGroup.SetTransport(transport) - c.Recovery.SetTransport(transport) - c.Registration.SetTransport(transport) - c.RemoteClusters.SetTransport(transport) - c.RemoteStorage.SetTransport(transport) - c.Role.SetTransport(transport) - c.Routes.SetTransport(transport) - c.Search.SetTransport(transport) - c.Security.SetTransport(transport) - c.Source.SetTransport(transport) - c.Stats.SetTransport(transport) - c.StorageDomain.SetTransport(transport) - c.Support.SetTransport(transport) - c.Syslog.SetTransport(transport) - c.Tag.SetTransport(transport) - c.Templates.SetTransport(transport) - c.Tenant.SetTransport(transport) - c.User.SetTransport(transport) - c.View.SetTransport(transport) -} diff --git a/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_parameters.go b/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_parameters.go deleted file mode 100644 index 98756c08..00000000 --- a/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewCancelDataTieringAnalysisGroupRunParams creates a new CancelDataTieringAnalysisGroupRunParams 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 NewCancelDataTieringAnalysisGroupRunParams() *CancelDataTieringAnalysisGroupRunParams { - return &CancelDataTieringAnalysisGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelDataTieringAnalysisGroupRunParamsWithTimeout creates a new CancelDataTieringAnalysisGroupRunParams object -// with the ability to set a timeout on a request. -func NewCancelDataTieringAnalysisGroupRunParamsWithTimeout(timeout time.Duration) *CancelDataTieringAnalysisGroupRunParams { - return &CancelDataTieringAnalysisGroupRunParams{ - timeout: timeout, - } -} - -// NewCancelDataTieringAnalysisGroupRunParamsWithContext creates a new CancelDataTieringAnalysisGroupRunParams object -// with the ability to set a context for a request. -func NewCancelDataTieringAnalysisGroupRunParamsWithContext(ctx context.Context) *CancelDataTieringAnalysisGroupRunParams { - return &CancelDataTieringAnalysisGroupRunParams{ - Context: ctx, - } -} - -// NewCancelDataTieringAnalysisGroupRunParamsWithHTTPClient creates a new CancelDataTieringAnalysisGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelDataTieringAnalysisGroupRunParamsWithHTTPClient(client *http.Client) *CancelDataTieringAnalysisGroupRunParams { - return &CancelDataTieringAnalysisGroupRunParams{ - HTTPClient: client, - } -} - -/* -CancelDataTieringAnalysisGroupRunParams contains all the parameters to send to the API endpoint - - for the cancel data tiering analysis group run operation. - - Typically these are written to a http.Request. -*/ -type CancelDataTieringAnalysisGroupRunParams struct { - - /* ID. - - Specifies a unique id of data tiering group. - */ - ID string - - /* RunID. - - Specifies a unique run id of data tiering group run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel data tiering analysis group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelDataTieringAnalysisGroupRunParams) WithDefaults() *CancelDataTieringAnalysisGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel data tiering analysis group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelDataTieringAnalysisGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) WithTimeout(timeout time.Duration) *CancelDataTieringAnalysisGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) WithContext(ctx context.Context) *CancelDataTieringAnalysisGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) WithHTTPClient(client *http.Client) *CancelDataTieringAnalysisGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) WithID(id string) *CancelDataTieringAnalysisGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) SetID(id string) { - o.ID = id -} - -// WithRunID adds the runID to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) WithRunID(runID string) *CancelDataTieringAnalysisGroupRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the cancel data tiering analysis group run params -func (o *CancelDataTieringAnalysisGroupRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelDataTieringAnalysisGroupRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_responses.go b/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_responses.go deleted file mode 100644 index 889cec3f..00000000 --- a/v2/client/data_tiering/cancel_data_tiering_analysis_group_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelDataTieringAnalysisGroupRunReader is a Reader for the CancelDataTieringAnalysisGroupRun structure. -type CancelDataTieringAnalysisGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelDataTieringAnalysisGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCancelDataTieringAnalysisGroupRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelDataTieringAnalysisGroupRunDefault(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 - } -} - -// NewCancelDataTieringAnalysisGroupRunAccepted creates a CancelDataTieringAnalysisGroupRunAccepted with default headers values -func NewCancelDataTieringAnalysisGroupRunAccepted() *CancelDataTieringAnalysisGroupRunAccepted { - return &CancelDataTieringAnalysisGroupRunAccepted{} -} - -/* -CancelDataTieringAnalysisGroupRunAccepted describes a response with status code 202, with default header values. - -Request Accepted -*/ -type CancelDataTieringAnalysisGroupRunAccepted struct { -} - -// IsSuccess returns true when this cancel data tiering analysis group run accepted response has a 2xx status code -func (o *CancelDataTieringAnalysisGroupRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel data tiering analysis group run accepted response has a 3xx status code -func (o *CancelDataTieringAnalysisGroupRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel data tiering analysis group run accepted response has a 4xx status code -func (o *CancelDataTieringAnalysisGroupRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel data tiering analysis group run accepted response has a 5xx status code -func (o *CancelDataTieringAnalysisGroupRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel data tiering analysis group run accepted response a status code equal to that given -func (o *CancelDataTieringAnalysisGroupRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the cancel data tiering analysis group run accepted response -func (o *CancelDataTieringAnalysisGroupRunAccepted) Code() int { - return 202 -} - -func (o *CancelDataTieringAnalysisGroupRunAccepted) Error() string { - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs/{runId}/cancel][%d] cancelDataTieringAnalysisGroupRunAccepted", 202) -} - -func (o *CancelDataTieringAnalysisGroupRunAccepted) String() string { - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs/{runId}/cancel][%d] cancelDataTieringAnalysisGroupRunAccepted", 202) -} - -func (o *CancelDataTieringAnalysisGroupRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelDataTieringAnalysisGroupRunDefault creates a CancelDataTieringAnalysisGroupRunDefault with default headers values -func NewCancelDataTieringAnalysisGroupRunDefault(code int) *CancelDataTieringAnalysisGroupRunDefault { - return &CancelDataTieringAnalysisGroupRunDefault{ - _statusCode: code, - } -} - -/* -CancelDataTieringAnalysisGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelDataTieringAnalysisGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel data tiering analysis group run default response has a 2xx status code -func (o *CancelDataTieringAnalysisGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel data tiering analysis group run default response has a 3xx status code -func (o *CancelDataTieringAnalysisGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel data tiering analysis group run default response has a 4xx status code -func (o *CancelDataTieringAnalysisGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel data tiering analysis group run default response has a 5xx status code -func (o *CancelDataTieringAnalysisGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel data tiering analysis group run default response a status code equal to that given -func (o *CancelDataTieringAnalysisGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel data tiering analysis group run default response -func (o *CancelDataTieringAnalysisGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *CancelDataTieringAnalysisGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs/{runId}/cancel][%d] CancelDataTieringAnalysisGroupRun default %s", o._statusCode, payload) -} - -func (o *CancelDataTieringAnalysisGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs/{runId}/cancel][%d] CancelDataTieringAnalysisGroupRun default %s", o._statusCode, payload) -} - -func (o *CancelDataTieringAnalysisGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelDataTieringAnalysisGroupRunDefault) 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/data_tiering/cancel_data_tiering_task_run_parameters.go b/v2/client/data_tiering/cancel_data_tiering_task_run_parameters.go deleted file mode 100644 index 37641b58..00000000 --- a/v2/client/data_tiering/cancel_data_tiering_task_run_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewCancelDataTieringTaskRunParams creates a new CancelDataTieringTaskRunParams 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 NewCancelDataTieringTaskRunParams() *CancelDataTieringTaskRunParams { - return &CancelDataTieringTaskRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelDataTieringTaskRunParamsWithTimeout creates a new CancelDataTieringTaskRunParams object -// with the ability to set a timeout on a request. -func NewCancelDataTieringTaskRunParamsWithTimeout(timeout time.Duration) *CancelDataTieringTaskRunParams { - return &CancelDataTieringTaskRunParams{ - timeout: timeout, - } -} - -// NewCancelDataTieringTaskRunParamsWithContext creates a new CancelDataTieringTaskRunParams object -// with the ability to set a context for a request. -func NewCancelDataTieringTaskRunParamsWithContext(ctx context.Context) *CancelDataTieringTaskRunParams { - return &CancelDataTieringTaskRunParams{ - Context: ctx, - } -} - -// NewCancelDataTieringTaskRunParamsWithHTTPClient creates a new CancelDataTieringTaskRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelDataTieringTaskRunParamsWithHTTPClient(client *http.Client) *CancelDataTieringTaskRunParams { - return &CancelDataTieringTaskRunParams{ - HTTPClient: client, - } -} - -/* -CancelDataTieringTaskRunParams contains all the parameters to send to the API endpoint - - for the cancel data tiering task run operation. - - Typically these are written to a http.Request. -*/ -type CancelDataTieringTaskRunParams struct { - - /* ID. - - Specifies a unique id of data tiering task. - */ - ID string - - /* RunID. - - Specifies a unique run id of data tiering task. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel data tiering task run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelDataTieringTaskRunParams) WithDefaults() *CancelDataTieringTaskRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel data tiering task run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelDataTieringTaskRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) WithTimeout(timeout time.Duration) *CancelDataTieringTaskRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) WithContext(ctx context.Context) *CancelDataTieringTaskRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) WithHTTPClient(client *http.Client) *CancelDataTieringTaskRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) WithID(id string) *CancelDataTieringTaskRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) SetID(id string) { - o.ID = id -} - -// WithRunID adds the runID to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) WithRunID(runID string) *CancelDataTieringTaskRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the cancel data tiering task run params -func (o *CancelDataTieringTaskRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelDataTieringTaskRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/cancel_data_tiering_task_run_responses.go b/v2/client/data_tiering/cancel_data_tiering_task_run_responses.go deleted file mode 100644 index 584f30a5..00000000 --- a/v2/client/data_tiering/cancel_data_tiering_task_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelDataTieringTaskRunReader is a Reader for the CancelDataTieringTaskRun structure. -type CancelDataTieringTaskRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelDataTieringTaskRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCancelDataTieringTaskRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelDataTieringTaskRunDefault(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 - } -} - -// NewCancelDataTieringTaskRunAccepted creates a CancelDataTieringTaskRunAccepted with default headers values -func NewCancelDataTieringTaskRunAccepted() *CancelDataTieringTaskRunAccepted { - return &CancelDataTieringTaskRunAccepted{} -} - -/* -CancelDataTieringTaskRunAccepted describes a response with status code 202, with default header values. - -Request Accepted -*/ -type CancelDataTieringTaskRunAccepted struct { -} - -// IsSuccess returns true when this cancel data tiering task run accepted response has a 2xx status code -func (o *CancelDataTieringTaskRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel data tiering task run accepted response has a 3xx status code -func (o *CancelDataTieringTaskRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel data tiering task run accepted response has a 4xx status code -func (o *CancelDataTieringTaskRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel data tiering task run accepted response has a 5xx status code -func (o *CancelDataTieringTaskRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel data tiering task run accepted response a status code equal to that given -func (o *CancelDataTieringTaskRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the cancel data tiering task run accepted response -func (o *CancelDataTieringTaskRunAccepted) Code() int { - return 202 -} - -func (o *CancelDataTieringTaskRunAccepted) Error() string { - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs/{runId}/cancel][%d] cancelDataTieringTaskRunAccepted", 202) -} - -func (o *CancelDataTieringTaskRunAccepted) String() string { - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs/{runId}/cancel][%d] cancelDataTieringTaskRunAccepted", 202) -} - -func (o *CancelDataTieringTaskRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelDataTieringTaskRunDefault creates a CancelDataTieringTaskRunDefault with default headers values -func NewCancelDataTieringTaskRunDefault(code int) *CancelDataTieringTaskRunDefault { - return &CancelDataTieringTaskRunDefault{ - _statusCode: code, - } -} - -/* -CancelDataTieringTaskRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelDataTieringTaskRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel data tiering task run default response has a 2xx status code -func (o *CancelDataTieringTaskRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel data tiering task run default response has a 3xx status code -func (o *CancelDataTieringTaskRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel data tiering task run default response has a 4xx status code -func (o *CancelDataTieringTaskRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel data tiering task run default response has a 5xx status code -func (o *CancelDataTieringTaskRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel data tiering task run default response a status code equal to that given -func (o *CancelDataTieringTaskRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel data tiering task run default response -func (o *CancelDataTieringTaskRunDefault) Code() int { - return o._statusCode -} - -func (o *CancelDataTieringTaskRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs/{runId}/cancel][%d] CancelDataTieringTaskRun default %s", o._statusCode, payload) -} - -func (o *CancelDataTieringTaskRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs/{runId}/cancel][%d] CancelDataTieringTaskRun default %s", o._statusCode, payload) -} - -func (o *CancelDataTieringTaskRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelDataTieringTaskRunDefault) 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/data_tiering/create_data_tiering_analysis_group_parameters.go b/v2/client/data_tiering/create_data_tiering_analysis_group_parameters.go deleted file mode 100644 index ac3dbbec..00000000 --- a/v2/client/data_tiering/create_data_tiering_analysis_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateDataTieringAnalysisGroupParams creates a new CreateDataTieringAnalysisGroupParams 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 NewCreateDataTieringAnalysisGroupParams() *CreateDataTieringAnalysisGroupParams { - return &CreateDataTieringAnalysisGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDataTieringAnalysisGroupParamsWithTimeout creates a new CreateDataTieringAnalysisGroupParams object -// with the ability to set a timeout on a request. -func NewCreateDataTieringAnalysisGroupParamsWithTimeout(timeout time.Duration) *CreateDataTieringAnalysisGroupParams { - return &CreateDataTieringAnalysisGroupParams{ - timeout: timeout, - } -} - -// NewCreateDataTieringAnalysisGroupParamsWithContext creates a new CreateDataTieringAnalysisGroupParams object -// with the ability to set a context for a request. -func NewCreateDataTieringAnalysisGroupParamsWithContext(ctx context.Context) *CreateDataTieringAnalysisGroupParams { - return &CreateDataTieringAnalysisGroupParams{ - Context: ctx, - } -} - -// NewCreateDataTieringAnalysisGroupParamsWithHTTPClient creates a new CreateDataTieringAnalysisGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDataTieringAnalysisGroupParamsWithHTTPClient(client *http.Client) *CreateDataTieringAnalysisGroupParams { - return &CreateDataTieringAnalysisGroupParams{ - HTTPClient: client, - } -} - -/* -CreateDataTieringAnalysisGroupParams contains all the parameters to send to the API endpoint - - for the create data tiering analysis group operation. - - Typically these are written to a http.Request. -*/ -type CreateDataTieringAnalysisGroupParams struct { - - /* Body. - - Specifies the data tiering analysis group. - */ - Body *models.CommonDataTieringAnalysisGroupParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringAnalysisGroupParams) WithDefaults() *CreateDataTieringAnalysisGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringAnalysisGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) WithTimeout(timeout time.Duration) *CreateDataTieringAnalysisGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) WithContext(ctx context.Context) *CreateDataTieringAnalysisGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) WithHTTPClient(client *http.Client) *CreateDataTieringAnalysisGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) WithBody(body *models.CommonDataTieringAnalysisGroupParams) *CreateDataTieringAnalysisGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create data tiering analysis group params -func (o *CreateDataTieringAnalysisGroupParams) SetBody(body *models.CommonDataTieringAnalysisGroupParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDataTieringAnalysisGroupParams) 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/data_tiering/create_data_tiering_analysis_group_responses.go b/v2/client/data_tiering/create_data_tiering_analysis_group_responses.go deleted file mode 100644 index bd427ace..00000000 --- a/v2/client/data_tiering/create_data_tiering_analysis_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateDataTieringAnalysisGroupReader is a Reader for the CreateDataTieringAnalysisGroup structure. -type CreateDataTieringAnalysisGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDataTieringAnalysisGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDataTieringAnalysisGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDataTieringAnalysisGroupDefault(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 - } -} - -// NewCreateDataTieringAnalysisGroupCreated creates a CreateDataTieringAnalysisGroupCreated with default headers values -func NewCreateDataTieringAnalysisGroupCreated() *CreateDataTieringAnalysisGroupCreated { - return &CreateDataTieringAnalysisGroupCreated{} -} - -/* -CreateDataTieringAnalysisGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateDataTieringAnalysisGroupCreated struct { - Payload *models.DataTieringAnalysisGroup -} - -// IsSuccess returns true when this create data tiering analysis group created response has a 2xx status code -func (o *CreateDataTieringAnalysisGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create data tiering analysis group created response has a 3xx status code -func (o *CreateDataTieringAnalysisGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create data tiering analysis group created response has a 4xx status code -func (o *CreateDataTieringAnalysisGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create data tiering analysis group created response has a 5xx status code -func (o *CreateDataTieringAnalysisGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create data tiering analysis group created response a status code equal to that given -func (o *CreateDataTieringAnalysisGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create data tiering analysis group created response -func (o *CreateDataTieringAnalysisGroupCreated) Code() int { - return 201 -} - -func (o *CreateDataTieringAnalysisGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups][%d] createDataTieringAnalysisGroupCreated %s", 201, payload) -} - -func (o *CreateDataTieringAnalysisGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups][%d] createDataTieringAnalysisGroupCreated %s", 201, payload) -} - -func (o *CreateDataTieringAnalysisGroupCreated) GetPayload() *models.DataTieringAnalysisGroup { - return o.Payload -} - -func (o *CreateDataTieringAnalysisGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringAnalysisGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDataTieringAnalysisGroupDefault creates a CreateDataTieringAnalysisGroupDefault with default headers values -func NewCreateDataTieringAnalysisGroupDefault(code int) *CreateDataTieringAnalysisGroupDefault { - return &CreateDataTieringAnalysisGroupDefault{ - _statusCode: code, - } -} - -/* -CreateDataTieringAnalysisGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDataTieringAnalysisGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create data tiering analysis group default response has a 2xx status code -func (o *CreateDataTieringAnalysisGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create data tiering analysis group default response has a 3xx status code -func (o *CreateDataTieringAnalysisGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create data tiering analysis group default response has a 4xx status code -func (o *CreateDataTieringAnalysisGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create data tiering analysis group default response has a 5xx status code -func (o *CreateDataTieringAnalysisGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create data tiering analysis group default response a status code equal to that given -func (o *CreateDataTieringAnalysisGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create data tiering analysis group default response -func (o *CreateDataTieringAnalysisGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateDataTieringAnalysisGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups][%d] CreateDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringAnalysisGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups][%d] CreateDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringAnalysisGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateDataTieringAnalysisGroupDefault) 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/data_tiering/create_data_tiering_analysis_group_run_parameters.go b/v2/client/data_tiering/create_data_tiering_analysis_group_run_parameters.go deleted file mode 100644 index a6699272..00000000 --- a/v2/client/data_tiering/create_data_tiering_analysis_group_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateDataTieringAnalysisGroupRunParams creates a new CreateDataTieringAnalysisGroupRunParams 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 NewCreateDataTieringAnalysisGroupRunParams() *CreateDataTieringAnalysisGroupRunParams { - return &CreateDataTieringAnalysisGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDataTieringAnalysisGroupRunParamsWithTimeout creates a new CreateDataTieringAnalysisGroupRunParams object -// with the ability to set a timeout on a request. -func NewCreateDataTieringAnalysisGroupRunParamsWithTimeout(timeout time.Duration) *CreateDataTieringAnalysisGroupRunParams { - return &CreateDataTieringAnalysisGroupRunParams{ - timeout: timeout, - } -} - -// NewCreateDataTieringAnalysisGroupRunParamsWithContext creates a new CreateDataTieringAnalysisGroupRunParams object -// with the ability to set a context for a request. -func NewCreateDataTieringAnalysisGroupRunParamsWithContext(ctx context.Context) *CreateDataTieringAnalysisGroupRunParams { - return &CreateDataTieringAnalysisGroupRunParams{ - Context: ctx, - } -} - -// NewCreateDataTieringAnalysisGroupRunParamsWithHTTPClient creates a new CreateDataTieringAnalysisGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDataTieringAnalysisGroupRunParamsWithHTTPClient(client *http.Client) *CreateDataTieringAnalysisGroupRunParams { - return &CreateDataTieringAnalysisGroupRunParams{ - HTTPClient: client, - } -} - -/* -CreateDataTieringAnalysisGroupRunParams contains all the parameters to send to the API endpoint - - for the create data tiering analysis group run operation. - - Typically these are written to a http.Request. -*/ -type CreateDataTieringAnalysisGroupRunParams struct { - - /* Body. - - Specifies the request to run analysis group once. - */ - Body *models.DataTieringAnalysisRunRequest - - /* ID. - - Specifies the id of the data tiering analysis group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create data tiering analysis group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringAnalysisGroupRunParams) WithDefaults() *CreateDataTieringAnalysisGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create data tiering analysis group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringAnalysisGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) WithTimeout(timeout time.Duration) *CreateDataTieringAnalysisGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) WithContext(ctx context.Context) *CreateDataTieringAnalysisGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) WithHTTPClient(client *http.Client) *CreateDataTieringAnalysisGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) WithBody(body *models.DataTieringAnalysisRunRequest) *CreateDataTieringAnalysisGroupRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) SetBody(body *models.DataTieringAnalysisRunRequest) { - o.Body = body -} - -// WithID adds the id to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) WithID(id string) *CreateDataTieringAnalysisGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the create data tiering analysis group run params -func (o *CreateDataTieringAnalysisGroupRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDataTieringAnalysisGroupRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/create_data_tiering_analysis_group_run_responses.go b/v2/client/data_tiering/create_data_tiering_analysis_group_run_responses.go deleted file mode 100644 index ac8f1e2f..00000000 --- a/v2/client/data_tiering/create_data_tiering_analysis_group_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateDataTieringAnalysisGroupRunReader is a Reader for the CreateDataTieringAnalysisGroupRun structure. -type CreateDataTieringAnalysisGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDataTieringAnalysisGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreateDataTieringAnalysisGroupRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDataTieringAnalysisGroupRunDefault(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 - } -} - -// NewCreateDataTieringAnalysisGroupRunAccepted creates a CreateDataTieringAnalysisGroupRunAccepted with default headers values -func NewCreateDataTieringAnalysisGroupRunAccepted() *CreateDataTieringAnalysisGroupRunAccepted { - return &CreateDataTieringAnalysisGroupRunAccepted{} -} - -/* -CreateDataTieringAnalysisGroupRunAccepted describes a response with status code 202, with default header values. - -Request Accepted -*/ -type CreateDataTieringAnalysisGroupRunAccepted struct { -} - -// IsSuccess returns true when this create data tiering analysis group run accepted response has a 2xx status code -func (o *CreateDataTieringAnalysisGroupRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create data tiering analysis group run accepted response has a 3xx status code -func (o *CreateDataTieringAnalysisGroupRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create data tiering analysis group run accepted response has a 4xx status code -func (o *CreateDataTieringAnalysisGroupRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create data tiering analysis group run accepted response has a 5xx status code -func (o *CreateDataTieringAnalysisGroupRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create data tiering analysis group run accepted response a status code equal to that given -func (o *CreateDataTieringAnalysisGroupRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create data tiering analysis group run accepted response -func (o *CreateDataTieringAnalysisGroupRunAccepted) Code() int { - return 202 -} - -func (o *CreateDataTieringAnalysisGroupRunAccepted) Error() string { - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs][%d] createDataTieringAnalysisGroupRunAccepted", 202) -} - -func (o *CreateDataTieringAnalysisGroupRunAccepted) String() string { - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs][%d] createDataTieringAnalysisGroupRunAccepted", 202) -} - -func (o *CreateDataTieringAnalysisGroupRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCreateDataTieringAnalysisGroupRunDefault creates a CreateDataTieringAnalysisGroupRunDefault with default headers values -func NewCreateDataTieringAnalysisGroupRunDefault(code int) *CreateDataTieringAnalysisGroupRunDefault { - return &CreateDataTieringAnalysisGroupRunDefault{ - _statusCode: code, - } -} - -/* -CreateDataTieringAnalysisGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDataTieringAnalysisGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create data tiering analysis group run default response has a 2xx status code -func (o *CreateDataTieringAnalysisGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create data tiering analysis group run default response has a 3xx status code -func (o *CreateDataTieringAnalysisGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create data tiering analysis group run default response has a 4xx status code -func (o *CreateDataTieringAnalysisGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create data tiering analysis group run default response has a 5xx status code -func (o *CreateDataTieringAnalysisGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create data tiering analysis group run default response a status code equal to that given -func (o *CreateDataTieringAnalysisGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create data tiering analysis group run default response -func (o *CreateDataTieringAnalysisGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *CreateDataTieringAnalysisGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs][%d] CreateDataTieringAnalysisGroupRun default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringAnalysisGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/{id}/runs][%d] CreateDataTieringAnalysisGroupRun default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringAnalysisGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateDataTieringAnalysisGroupRunDefault) 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/data_tiering/create_data_tiering_task_parameters.go b/v2/client/data_tiering/create_data_tiering_task_parameters.go deleted file mode 100644 index 6e7984e9..00000000 --- a/v2/client/data_tiering/create_data_tiering_task_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateDataTieringTaskParams creates a new CreateDataTieringTaskParams 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 NewCreateDataTieringTaskParams() *CreateDataTieringTaskParams { - return &CreateDataTieringTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDataTieringTaskParamsWithTimeout creates a new CreateDataTieringTaskParams object -// with the ability to set a timeout on a request. -func NewCreateDataTieringTaskParamsWithTimeout(timeout time.Duration) *CreateDataTieringTaskParams { - return &CreateDataTieringTaskParams{ - timeout: timeout, - } -} - -// NewCreateDataTieringTaskParamsWithContext creates a new CreateDataTieringTaskParams object -// with the ability to set a context for a request. -func NewCreateDataTieringTaskParamsWithContext(ctx context.Context) *CreateDataTieringTaskParams { - return &CreateDataTieringTaskParams{ - Context: ctx, - } -} - -// NewCreateDataTieringTaskParamsWithHTTPClient creates a new CreateDataTieringTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDataTieringTaskParamsWithHTTPClient(client *http.Client) *CreateDataTieringTaskParams { - return &CreateDataTieringTaskParams{ - HTTPClient: client, - } -} - -/* -CreateDataTieringTaskParams contains all the parameters to send to the API endpoint - - for the create data tiering task operation. - - Typically these are written to a http.Request. -*/ -type CreateDataTieringTaskParams struct { - - /* Body. - - Specifies the parameters to create a data tiering task. - */ - Body *models.CreateOrUpdateDataTieringTaskRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringTaskParams) WithDefaults() *CreateDataTieringTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create data tiering task params -func (o *CreateDataTieringTaskParams) WithTimeout(timeout time.Duration) *CreateDataTieringTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create data tiering task params -func (o *CreateDataTieringTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create data tiering task params -func (o *CreateDataTieringTaskParams) WithContext(ctx context.Context) *CreateDataTieringTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create data tiering task params -func (o *CreateDataTieringTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create data tiering task params -func (o *CreateDataTieringTaskParams) WithHTTPClient(client *http.Client) *CreateDataTieringTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create data tiering task params -func (o *CreateDataTieringTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create data tiering task params -func (o *CreateDataTieringTaskParams) WithBody(body *models.CreateOrUpdateDataTieringTaskRequest) *CreateDataTieringTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create data tiering task params -func (o *CreateDataTieringTaskParams) SetBody(body *models.CreateOrUpdateDataTieringTaskRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDataTieringTaskParams) 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/data_tiering/create_data_tiering_task_responses.go b/v2/client/data_tiering/create_data_tiering_task_responses.go deleted file mode 100644 index 3d6c3ffd..00000000 --- a/v2/client/data_tiering/create_data_tiering_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateDataTieringTaskReader is a Reader for the CreateDataTieringTask structure. -type CreateDataTieringTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDataTieringTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDataTieringTaskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDataTieringTaskDefault(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 - } -} - -// NewCreateDataTieringTaskCreated creates a CreateDataTieringTaskCreated with default headers values -func NewCreateDataTieringTaskCreated() *CreateDataTieringTaskCreated { - return &CreateDataTieringTaskCreated{} -} - -/* -CreateDataTieringTaskCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateDataTieringTaskCreated struct { - Payload *models.DataTieringTask -} - -// IsSuccess returns true when this create data tiering task created response has a 2xx status code -func (o *CreateDataTieringTaskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create data tiering task created response has a 3xx status code -func (o *CreateDataTieringTaskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create data tiering task created response has a 4xx status code -func (o *CreateDataTieringTaskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create data tiering task created response has a 5xx status code -func (o *CreateDataTieringTaskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create data tiering task created response a status code equal to that given -func (o *CreateDataTieringTaskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create data tiering task created response -func (o *CreateDataTieringTaskCreated) Code() int { - return 201 -} - -func (o *CreateDataTieringTaskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks][%d] createDataTieringTaskCreated %s", 201, payload) -} - -func (o *CreateDataTieringTaskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks][%d] createDataTieringTaskCreated %s", 201, payload) -} - -func (o *CreateDataTieringTaskCreated) GetPayload() *models.DataTieringTask { - return o.Payload -} - -func (o *CreateDataTieringTaskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDataTieringTaskDefault creates a CreateDataTieringTaskDefault with default headers values -func NewCreateDataTieringTaskDefault(code int) *CreateDataTieringTaskDefault { - return &CreateDataTieringTaskDefault{ - _statusCode: code, - } -} - -/* -CreateDataTieringTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDataTieringTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create data tiering task default response has a 2xx status code -func (o *CreateDataTieringTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create data tiering task default response has a 3xx status code -func (o *CreateDataTieringTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create data tiering task default response has a 4xx status code -func (o *CreateDataTieringTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create data tiering task default response has a 5xx status code -func (o *CreateDataTieringTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create data tiering task default response a status code equal to that given -func (o *CreateDataTieringTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create data tiering task default response -func (o *CreateDataTieringTaskDefault) Code() int { - return o._statusCode -} - -func (o *CreateDataTieringTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks][%d] CreateDataTieringTask default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks][%d] CreateDataTieringTask default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateDataTieringTaskDefault) 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/data_tiering/create_data_tiering_task_run_parameters.go b/v2/client/data_tiering/create_data_tiering_task_run_parameters.go deleted file mode 100644 index 229cf217..00000000 --- a/v2/client/data_tiering/create_data_tiering_task_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateDataTieringTaskRunParams creates a new CreateDataTieringTaskRunParams 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 NewCreateDataTieringTaskRunParams() *CreateDataTieringTaskRunParams { - return &CreateDataTieringTaskRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDataTieringTaskRunParamsWithTimeout creates a new CreateDataTieringTaskRunParams object -// with the ability to set a timeout on a request. -func NewCreateDataTieringTaskRunParamsWithTimeout(timeout time.Duration) *CreateDataTieringTaskRunParams { - return &CreateDataTieringTaskRunParams{ - timeout: timeout, - } -} - -// NewCreateDataTieringTaskRunParamsWithContext creates a new CreateDataTieringTaskRunParams object -// with the ability to set a context for a request. -func NewCreateDataTieringTaskRunParamsWithContext(ctx context.Context) *CreateDataTieringTaskRunParams { - return &CreateDataTieringTaskRunParams{ - Context: ctx, - } -} - -// NewCreateDataTieringTaskRunParamsWithHTTPClient creates a new CreateDataTieringTaskRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDataTieringTaskRunParamsWithHTTPClient(client *http.Client) *CreateDataTieringTaskRunParams { - return &CreateDataTieringTaskRunParams{ - HTTPClient: client, - } -} - -/* -CreateDataTieringTaskRunParams contains all the parameters to send to the API endpoint - - for the create data tiering task run operation. - - Typically these are written to a http.Request. -*/ -type CreateDataTieringTaskRunParams struct { - - /* Body. - - Specifies the request to run tiering task once. - */ - Body *models.DataTieringTaskRunRequest - - /* ID. - - Specifies the id of the data tiering tasks. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create data tiering task run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringTaskRunParams) WithDefaults() *CreateDataTieringTaskRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create data tiering task run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDataTieringTaskRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) WithTimeout(timeout time.Duration) *CreateDataTieringTaskRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) WithContext(ctx context.Context) *CreateDataTieringTaskRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) WithHTTPClient(client *http.Client) *CreateDataTieringTaskRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) WithBody(body *models.DataTieringTaskRunRequest) *CreateDataTieringTaskRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) SetBody(body *models.DataTieringTaskRunRequest) { - o.Body = body -} - -// WithID adds the id to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) WithID(id string) *CreateDataTieringTaskRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the create data tiering task run params -func (o *CreateDataTieringTaskRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDataTieringTaskRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/create_data_tiering_task_run_responses.go b/v2/client/data_tiering/create_data_tiering_task_run_responses.go deleted file mode 100644 index cf59efd6..00000000 --- a/v2/client/data_tiering/create_data_tiering_task_run_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateDataTieringTaskRunReader is a Reader for the CreateDataTieringTaskRun structure. -type CreateDataTieringTaskRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDataTieringTaskRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreateDataTieringTaskRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDataTieringTaskRunDefault(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 - } -} - -// NewCreateDataTieringTaskRunAccepted creates a CreateDataTieringTaskRunAccepted with default headers values -func NewCreateDataTieringTaskRunAccepted() *CreateDataTieringTaskRunAccepted { - return &CreateDataTieringTaskRunAccepted{} -} - -/* -CreateDataTieringTaskRunAccepted describes a response with status code 202, with default header values. - -Request Accepted -*/ -type CreateDataTieringTaskRunAccepted struct { -} - -// IsSuccess returns true when this create data tiering task run accepted response has a 2xx status code -func (o *CreateDataTieringTaskRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create data tiering task run accepted response has a 3xx status code -func (o *CreateDataTieringTaskRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create data tiering task run accepted response has a 4xx status code -func (o *CreateDataTieringTaskRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create data tiering task run accepted response has a 5xx status code -func (o *CreateDataTieringTaskRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create data tiering task run accepted response a status code equal to that given -func (o *CreateDataTieringTaskRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create data tiering task run accepted response -func (o *CreateDataTieringTaskRunAccepted) Code() int { - return 202 -} - -func (o *CreateDataTieringTaskRunAccepted) Error() string { - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs][%d] createDataTieringTaskRunAccepted", 202) -} - -func (o *CreateDataTieringTaskRunAccepted) String() string { - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs][%d] createDataTieringTaskRunAccepted", 202) -} - -func (o *CreateDataTieringTaskRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCreateDataTieringTaskRunDefault creates a CreateDataTieringTaskRunDefault with default headers values -func NewCreateDataTieringTaskRunDefault(code int) *CreateDataTieringTaskRunDefault { - return &CreateDataTieringTaskRunDefault{ - _statusCode: code, - } -} - -/* -CreateDataTieringTaskRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDataTieringTaskRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create data tiering task run default response has a 2xx status code -func (o *CreateDataTieringTaskRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create data tiering task run default response has a 3xx status code -func (o *CreateDataTieringTaskRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create data tiering task run default response has a 4xx status code -func (o *CreateDataTieringTaskRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create data tiering task run default response has a 5xx status code -func (o *CreateDataTieringTaskRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create data tiering task run default response a status code equal to that given -func (o *CreateDataTieringTaskRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create data tiering task run default response -func (o *CreateDataTieringTaskRunDefault) Code() int { - return o._statusCode -} - -func (o *CreateDataTieringTaskRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs][%d] CreateDataTieringTaskRun default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringTaskRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/{id}/runs][%d] CreateDataTieringTaskRun default %s", o._statusCode, payload) -} - -func (o *CreateDataTieringTaskRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateDataTieringTaskRunDefault) 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/data_tiering/data_tiering_client.go b/v2/client/data_tiering/data_tiering_client.go deleted file mode 100644 index ba946139..00000000 --- a/v2/client/data_tiering/data_tiering_client.go +++ /dev/null @@ -1,913 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new data tiering API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new data tiering API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new data tiering API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for data tiering API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CancelDataTieringAnalysisGroupRun(params *CancelDataTieringAnalysisGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelDataTieringAnalysisGroupRunAccepted, error) - - CancelDataTieringTaskRun(params *CancelDataTieringTaskRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelDataTieringTaskRunAccepted, error) - - CreateDataTieringAnalysisGroup(params *CreateDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringAnalysisGroupCreated, error) - - CreateDataTieringAnalysisGroupRun(params *CreateDataTieringAnalysisGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringAnalysisGroupRunAccepted, error) - - CreateDataTieringTask(params *CreateDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringTaskCreated, error) - - CreateDataTieringTaskRun(params *CreateDataTieringTaskRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringTaskRunAccepted, error) - - DeleteDataTieringAnalysisGroup(params *DeleteDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDataTieringAnalysisGroupNoContent, error) - - DeleteDataTieringTask(params *DeleteDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDataTieringTaskNoContent, error) - - GetCapacityTrendAnalysis(params *GetCapacityTrendAnalysisParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCapacityTrendAnalysisOK, error) - - GetDataTieringAnalysisGroupByID(params *GetDataTieringAnalysisGroupByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupByIDOK, error) - - GetDataTieringAnalysisGroupRuns(params *GetDataTieringAnalysisGroupRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupRunsOK, error) - - GetDataTieringAnalysisGroups(params *GetDataTieringAnalysisGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupsOK, error) - - GetDataTieringAnalysisGroupsDefaultConfig(params *GetDataTieringAnalysisGroupsDefaultConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupsDefaultConfigOK, error) - - GetDataTieringTaskByID(params *GetDataTieringTaskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringTaskByIDOK, error) - - GetDataTieringTasks(params *GetDataTieringTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringTasksOK, error) - - UpdateDataTieringAnalysisGroup(params *UpdateDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupOK, error) - - UpdateDataTieringAnalysisGroupTagsConfig(params *UpdateDataTieringAnalysisGroupTagsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupTagsConfigOK, error) - - UpdateDataTieringAnalysisGroupsState(params *UpdateDataTieringAnalysisGroupsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupsStateOK, error) - - UpdateDataTieringTask(params *UpdateDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringTaskOK, error) - - UpdateDataTieringTasksState(params *UpdateDataTieringTasksStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringTasksStateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - CancelDataTieringAnalysisGroupRun cancels data tiering analysis run - - Cancel data tiering analysis run for given analysis group ID - -and run ID -*/ -func (a *Client) CancelDataTieringAnalysisGroupRun(params *CancelDataTieringAnalysisGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelDataTieringAnalysisGroupRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelDataTieringAnalysisGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "CancelDataTieringAnalysisGroupRun", - Method: "POST", - PathPattern: "/data-tiering/analysis-groups/{id}/runs/{runId}/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelDataTieringAnalysisGroupRunReader{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.(*CancelDataTieringAnalysisGroupRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelDataTieringAnalysisGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CancelDataTieringTaskRun cancels data tiering task - -Cancel data tiering task run for given data tiering task id and run id. -*/ -func (a *Client) CancelDataTieringTaskRun(params *CancelDataTieringTaskRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelDataTieringTaskRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelDataTieringTaskRunParams() - } - op := &runtime.ClientOperation{ - ID: "CancelDataTieringTaskRun", - Method: "POST", - PathPattern: "/data-tiering/tasks/{id}/runs/{runId}/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelDataTieringTaskRunReader{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.(*CancelDataTieringTaskRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelDataTieringTaskRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDataTieringAnalysisGroup creates a data tiering analysis group - -Create a data tiering analysis group. -*/ -func (a *Client) CreateDataTieringAnalysisGroup(params *CreateDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringAnalysisGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDataTieringAnalysisGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDataTieringAnalysisGroup", - Method: "POST", - PathPattern: "/data-tiering/analysis-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDataTieringAnalysisGroupReader{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.(*CreateDataTieringAnalysisGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDataTieringAnalysisGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDataTieringAnalysisGroupRun creates a data tiering analysis group run - -Create a data tiering analysis group run. -*/ -func (a *Client) CreateDataTieringAnalysisGroupRun(params *CreateDataTieringAnalysisGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringAnalysisGroupRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDataTieringAnalysisGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDataTieringAnalysisGroupRun", - Method: "POST", - PathPattern: "/data-tiering/analysis-groups/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDataTieringAnalysisGroupRunReader{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.(*CreateDataTieringAnalysisGroupRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDataTieringAnalysisGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDataTieringTask creates a data tiering task - -Create a data tiering task. -*/ -func (a *Client) CreateDataTieringTask(params *CreateDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringTaskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDataTieringTaskParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDataTieringTask", - Method: "POST", - PathPattern: "/data-tiering/tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDataTieringTaskReader{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.(*CreateDataTieringTaskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDataTieringTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDataTieringTaskRun creates a data tiering tasks run - -Create a data tiering tasks run. -*/ -func (a *Client) CreateDataTieringTaskRun(params *CreateDataTieringTaskRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDataTieringTaskRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDataTieringTaskRunParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDataTieringTaskRun", - Method: "POST", - PathPattern: "/data-tiering/tasks/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDataTieringTaskRunReader{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.(*CreateDataTieringTaskRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDataTieringTaskRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - DeleteDataTieringAnalysisGroup deletes data tiering analysis group - - Returns NoContentResponse if the data tiering analysis group is - -deleted. -*/ -func (a *Client) DeleteDataTieringAnalysisGroup(params *DeleteDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDataTieringAnalysisGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteDataTieringAnalysisGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteDataTieringAnalysisGroup", - Method: "DELETE", - PathPattern: "/data-tiering/analysis-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteDataTieringAnalysisGroupReader{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.(*DeleteDataTieringAnalysisGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteDataTieringAnalysisGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteDataTieringTask deletes the data tiering task - -Returns Success if the data tiering task is deleted. -*/ -func (a *Client) DeleteDataTieringTask(params *DeleteDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDataTieringTaskNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteDataTieringTaskParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteDataTieringTask", - Method: "DELETE", - PathPattern: "/data-tiering/tasks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteDataTieringTaskReader{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.(*DeleteDataTieringTaskNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteDataTieringTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetCapacityTrendAnalysis gets capacity trend analysis for all sources or a specific source - - Get capacity trend analysis for the given time range, and for the given - -source or set of sources. -*/ -func (a *Client) GetCapacityTrendAnalysis(params *GetCapacityTrendAnalysisParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCapacityTrendAnalysisOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCapacityTrendAnalysisParams() - } - op := &runtime.ClientOperation{ - ID: "GetCapacityTrendAnalysis", - Method: "GET", - PathPattern: "/data-tiering/capacity-trend", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCapacityTrendAnalysisReader{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.(*GetCapacityTrendAnalysisOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCapacityTrendAnalysisDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDataTieringAnalysisGroupByID gets data tiering analysis group by id - -Get data tiering analysis group by id. -*/ -func (a *Client) GetDataTieringAnalysisGroupByID(params *GetDataTieringAnalysisGroupByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringAnalysisGroupByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringAnalysisGroupById", - Method: "GET", - PathPattern: "/data-tiering/analysis-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringAnalysisGroupByIDReader{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.(*GetDataTieringAnalysisGroupByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringAnalysisGroupByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDataTieringAnalysisGroupRuns gets data tiering analysis group runs - -Get data tiering analysis group runs for an analysis group. -*/ -func (a *Client) GetDataTieringAnalysisGroupRuns(params *GetDataTieringAnalysisGroupRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringAnalysisGroupRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringAnalysisGroupRuns", - Method: "GET", - PathPattern: "/data-tiering/analysis-groups/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringAnalysisGroupRunsReader{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.(*GetDataTieringAnalysisGroupRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringAnalysisGroupRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDataTieringAnalysisGroups gets the list of data tiering analysis groups - -Get list of all data tiering analysis groups. -*/ -func (a *Client) GetDataTieringAnalysisGroups(params *GetDataTieringAnalysisGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringAnalysisGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringAnalysisGroups", - Method: "GET", - PathPattern: "/data-tiering/analysis-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringAnalysisGroupsReader{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.(*GetDataTieringAnalysisGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringAnalysisGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetDataTieringAnalysisGroupsDefaultConfig gets the default config of data tiering analysis groups - - Get default grouping configuration for data tiering - -analysis groups. -*/ -func (a *Client) GetDataTieringAnalysisGroupsDefaultConfig(params *GetDataTieringAnalysisGroupsDefaultConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringAnalysisGroupsDefaultConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringAnalysisGroupsDefaultConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringAnalysisGroupsDefaultConfig", - Method: "GET", - PathPattern: "/data-tiering/analysis-groups/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringAnalysisGroupsDefaultConfigReader{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.(*GetDataTieringAnalysisGroupsDefaultConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringAnalysisGroupsDefaultConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDataTieringTaskByID gets data tiering task by id - -Get data tiering task by id. -*/ -func (a *Client) GetDataTieringTaskByID(params *GetDataTieringTaskByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringTaskByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringTaskByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringTaskById", - Method: "GET", - PathPattern: "/data-tiering/tasks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringTaskByIDReader{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.(*GetDataTieringTaskByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringTaskByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDataTieringTasks gets the list of data tiering tasks - -Get the list of data tiering tasks. -*/ -func (a *Client) GetDataTieringTasks(params *GetDataTieringTasksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDataTieringTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDataTieringTasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetDataTieringTasks", - Method: "GET", - PathPattern: "/data-tiering/tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetDataTieringTasksReader{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.(*GetDataTieringTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDataTieringTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateDataTieringAnalysisGroup updates a data tiering analysis group currently it supports updating sources and schedule only - -Update a data tiering analysis group. -*/ -func (a *Client) UpdateDataTieringAnalysisGroup(params *UpdateDataTieringAnalysisGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDataTieringAnalysisGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDataTieringAnalysisGroup", - Method: "PUT", - PathPattern: "/data-tiering/analysis-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDataTieringAnalysisGroupReader{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.(*UpdateDataTieringAnalysisGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDataTieringAnalysisGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateDataTieringAnalysisGroupTagsConfig updates data tiering analysis group config - -Update data tiering analysis group config. -*/ -func (a *Client) UpdateDataTieringAnalysisGroupTagsConfig(params *UpdateDataTieringAnalysisGroupTagsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupTagsConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDataTieringAnalysisGroupTagsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDataTieringAnalysisGroupTagsConfig", - Method: "PUT", - PathPattern: "/data-tiering/analysis-groups/{id}/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDataTieringAnalysisGroupTagsConfigReader{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.(*UpdateDataTieringAnalysisGroupTagsConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDataTieringAnalysisGroupTagsConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - UpdateDataTieringAnalysisGroupsState updates data tiering analysis groups state - - Perform actions like pause or resume on the data tiering analysis - -groups for the specified sources. -*/ -func (a *Client) UpdateDataTieringAnalysisGroupsState(params *UpdateDataTieringAnalysisGroupsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringAnalysisGroupsStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDataTieringAnalysisGroupsStateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDataTieringAnalysisGroupsState", - Method: "POST", - PathPattern: "/data-tiering/analysis-groups/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDataTieringAnalysisGroupsStateReader{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.(*UpdateDataTieringAnalysisGroupsStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDataTieringAnalysisGroupsStateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateDataTieringTask updates a data tiering task - -Update a data tiering task. -*/ -func (a *Client) UpdateDataTieringTask(params *UpdateDataTieringTaskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringTaskOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDataTieringTaskParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDataTieringTask", - Method: "PUT", - PathPattern: "/data-tiering/tasks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDataTieringTaskReader{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.(*UpdateDataTieringTaskOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDataTieringTaskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateDataTieringTasksState updates data tiering source analysis tasks state - -Perform actions like pause or resume on the data tiering tasks. -*/ -func (a *Client) UpdateDataTieringTasksState(params *UpdateDataTieringTasksStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateDataTieringTasksStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateDataTieringTasksStateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateDataTieringTasksState", - Method: "POST", - PathPattern: "/data-tiering/tasks/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateDataTieringTasksStateReader{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.(*UpdateDataTieringTasksStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateDataTieringTasksStateDefault) - 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/v2/client/data_tiering/delete_data_tiering_analysis_group_parameters.go b/v2/client/data_tiering/delete_data_tiering_analysis_group_parameters.go deleted file mode 100644 index 4dd34e18..00000000 --- a/v2/client/data_tiering/delete_data_tiering_analysis_group_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewDeleteDataTieringAnalysisGroupParams creates a new DeleteDataTieringAnalysisGroupParams 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 NewDeleteDataTieringAnalysisGroupParams() *DeleteDataTieringAnalysisGroupParams { - return &DeleteDataTieringAnalysisGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteDataTieringAnalysisGroupParamsWithTimeout creates a new DeleteDataTieringAnalysisGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteDataTieringAnalysisGroupParamsWithTimeout(timeout time.Duration) *DeleteDataTieringAnalysisGroupParams { - return &DeleteDataTieringAnalysisGroupParams{ - timeout: timeout, - } -} - -// NewDeleteDataTieringAnalysisGroupParamsWithContext creates a new DeleteDataTieringAnalysisGroupParams object -// with the ability to set a context for a request. -func NewDeleteDataTieringAnalysisGroupParamsWithContext(ctx context.Context) *DeleteDataTieringAnalysisGroupParams { - return &DeleteDataTieringAnalysisGroupParams{ - Context: ctx, - } -} - -// NewDeleteDataTieringAnalysisGroupParamsWithHTTPClient creates a new DeleteDataTieringAnalysisGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteDataTieringAnalysisGroupParamsWithHTTPClient(client *http.Client) *DeleteDataTieringAnalysisGroupParams { - return &DeleteDataTieringAnalysisGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteDataTieringAnalysisGroupParams contains all the parameters to send to the API endpoint - - for the delete data tiering analysis group operation. - - Typically these are written to a http.Request. -*/ -type DeleteDataTieringAnalysisGroupParams struct { - - /* ID. - - Specifies a unique id of the data tiering analysis group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDataTieringAnalysisGroupParams) WithDefaults() *DeleteDataTieringAnalysisGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDataTieringAnalysisGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) WithTimeout(timeout time.Duration) *DeleteDataTieringAnalysisGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) WithContext(ctx context.Context) *DeleteDataTieringAnalysisGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) WithHTTPClient(client *http.Client) *DeleteDataTieringAnalysisGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) WithID(id string) *DeleteDataTieringAnalysisGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete data tiering analysis group params -func (o *DeleteDataTieringAnalysisGroupParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteDataTieringAnalysisGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/delete_data_tiering_analysis_group_responses.go b/v2/client/data_tiering/delete_data_tiering_analysis_group_responses.go deleted file mode 100644 index 64f989f9..00000000 --- a/v2/client/data_tiering/delete_data_tiering_analysis_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteDataTieringAnalysisGroupReader is a Reader for the DeleteDataTieringAnalysisGroup structure. -type DeleteDataTieringAnalysisGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteDataTieringAnalysisGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteDataTieringAnalysisGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteDataTieringAnalysisGroupDefault(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 - } -} - -// NewDeleteDataTieringAnalysisGroupNoContent creates a DeleteDataTieringAnalysisGroupNoContent with default headers values -func NewDeleteDataTieringAnalysisGroupNoContent() *DeleteDataTieringAnalysisGroupNoContent { - return &DeleteDataTieringAnalysisGroupNoContent{} -} - -/* -DeleteDataTieringAnalysisGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteDataTieringAnalysisGroupNoContent struct { -} - -// IsSuccess returns true when this delete data tiering analysis group no content response has a 2xx status code -func (o *DeleteDataTieringAnalysisGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete data tiering analysis group no content response has a 3xx status code -func (o *DeleteDataTieringAnalysisGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete data tiering analysis group no content response has a 4xx status code -func (o *DeleteDataTieringAnalysisGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete data tiering analysis group no content response has a 5xx status code -func (o *DeleteDataTieringAnalysisGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete data tiering analysis group no content response a status code equal to that given -func (o *DeleteDataTieringAnalysisGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete data tiering analysis group no content response -func (o *DeleteDataTieringAnalysisGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteDataTieringAnalysisGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-tiering/analysis-groups/{id}][%d] deleteDataTieringAnalysisGroupNoContent", 204) -} - -func (o *DeleteDataTieringAnalysisGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /data-tiering/analysis-groups/{id}][%d] deleteDataTieringAnalysisGroupNoContent", 204) -} - -func (o *DeleteDataTieringAnalysisGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteDataTieringAnalysisGroupDefault creates a DeleteDataTieringAnalysisGroupDefault with default headers values -func NewDeleteDataTieringAnalysisGroupDefault(code int) *DeleteDataTieringAnalysisGroupDefault { - return &DeleteDataTieringAnalysisGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteDataTieringAnalysisGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteDataTieringAnalysisGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete data tiering analysis group default response has a 2xx status code -func (o *DeleteDataTieringAnalysisGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete data tiering analysis group default response has a 3xx status code -func (o *DeleteDataTieringAnalysisGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete data tiering analysis group default response has a 4xx status code -func (o *DeleteDataTieringAnalysisGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete data tiering analysis group default response has a 5xx status code -func (o *DeleteDataTieringAnalysisGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete data tiering analysis group default response a status code equal to that given -func (o *DeleteDataTieringAnalysisGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete data tiering analysis group default response -func (o *DeleteDataTieringAnalysisGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteDataTieringAnalysisGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-tiering/analysis-groups/{id}][%d] DeleteDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *DeleteDataTieringAnalysisGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-tiering/analysis-groups/{id}][%d] DeleteDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *DeleteDataTieringAnalysisGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteDataTieringAnalysisGroupDefault) 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/data_tiering/delete_data_tiering_task_parameters.go b/v2/client/data_tiering/delete_data_tiering_task_parameters.go deleted file mode 100644 index c82fce43..00000000 --- a/v2/client/data_tiering/delete_data_tiering_task_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewDeleteDataTieringTaskParams creates a new DeleteDataTieringTaskParams 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 NewDeleteDataTieringTaskParams() *DeleteDataTieringTaskParams { - return &DeleteDataTieringTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteDataTieringTaskParamsWithTimeout creates a new DeleteDataTieringTaskParams object -// with the ability to set a timeout on a request. -func NewDeleteDataTieringTaskParamsWithTimeout(timeout time.Duration) *DeleteDataTieringTaskParams { - return &DeleteDataTieringTaskParams{ - timeout: timeout, - } -} - -// NewDeleteDataTieringTaskParamsWithContext creates a new DeleteDataTieringTaskParams object -// with the ability to set a context for a request. -func NewDeleteDataTieringTaskParamsWithContext(ctx context.Context) *DeleteDataTieringTaskParams { - return &DeleteDataTieringTaskParams{ - Context: ctx, - } -} - -// NewDeleteDataTieringTaskParamsWithHTTPClient creates a new DeleteDataTieringTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteDataTieringTaskParamsWithHTTPClient(client *http.Client) *DeleteDataTieringTaskParams { - return &DeleteDataTieringTaskParams{ - HTTPClient: client, - } -} - -/* -DeleteDataTieringTaskParams contains all the parameters to send to the API endpoint - - for the delete data tiering task operation. - - Typically these are written to a http.Request. -*/ -type DeleteDataTieringTaskParams struct { - - /* ID. - - Specifies the id of the data tiering task. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDataTieringTaskParams) WithDefaults() *DeleteDataTieringTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDataTieringTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) WithTimeout(timeout time.Duration) *DeleteDataTieringTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) WithContext(ctx context.Context) *DeleteDataTieringTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) WithHTTPClient(client *http.Client) *DeleteDataTieringTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) WithID(id string) *DeleteDataTieringTaskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete data tiering task params -func (o *DeleteDataTieringTaskParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteDataTieringTaskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/delete_data_tiering_task_responses.go b/v2/client/data_tiering/delete_data_tiering_task_responses.go deleted file mode 100644 index c41f17bb..00000000 --- a/v2/client/data_tiering/delete_data_tiering_task_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteDataTieringTaskReader is a Reader for the DeleteDataTieringTask structure. -type DeleteDataTieringTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteDataTieringTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteDataTieringTaskNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteDataTieringTaskDefault(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 - } -} - -// NewDeleteDataTieringTaskNoContent creates a DeleteDataTieringTaskNoContent with default headers values -func NewDeleteDataTieringTaskNoContent() *DeleteDataTieringTaskNoContent { - return &DeleteDataTieringTaskNoContent{} -} - -/* -DeleteDataTieringTaskNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteDataTieringTaskNoContent struct { -} - -// IsSuccess returns true when this delete data tiering task no content response has a 2xx status code -func (o *DeleteDataTieringTaskNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete data tiering task no content response has a 3xx status code -func (o *DeleteDataTieringTaskNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete data tiering task no content response has a 4xx status code -func (o *DeleteDataTieringTaskNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete data tiering task no content response has a 5xx status code -func (o *DeleteDataTieringTaskNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete data tiering task no content response a status code equal to that given -func (o *DeleteDataTieringTaskNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete data tiering task no content response -func (o *DeleteDataTieringTaskNoContent) Code() int { - return 204 -} - -func (o *DeleteDataTieringTaskNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-tiering/tasks/{id}][%d] deleteDataTieringTaskNoContent", 204) -} - -func (o *DeleteDataTieringTaskNoContent) String() string { - return fmt.Sprintf("[DELETE /data-tiering/tasks/{id}][%d] deleteDataTieringTaskNoContent", 204) -} - -func (o *DeleteDataTieringTaskNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteDataTieringTaskDefault creates a DeleteDataTieringTaskDefault with default headers values -func NewDeleteDataTieringTaskDefault(code int) *DeleteDataTieringTaskDefault { - return &DeleteDataTieringTaskDefault{ - _statusCode: code, - } -} - -/* -DeleteDataTieringTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteDataTieringTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete data tiering task default response has a 2xx status code -func (o *DeleteDataTieringTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete data tiering task default response has a 3xx status code -func (o *DeleteDataTieringTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete data tiering task default response has a 4xx status code -func (o *DeleteDataTieringTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete data tiering task default response has a 5xx status code -func (o *DeleteDataTieringTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete data tiering task default response a status code equal to that given -func (o *DeleteDataTieringTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete data tiering task default response -func (o *DeleteDataTieringTaskDefault) Code() int { - return o._statusCode -} - -func (o *DeleteDataTieringTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-tiering/tasks/{id}][%d] DeleteDataTieringTask default %s", o._statusCode, payload) -} - -func (o *DeleteDataTieringTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-tiering/tasks/{id}][%d] DeleteDataTieringTask default %s", o._statusCode, payload) -} - -func (o *DeleteDataTieringTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteDataTieringTaskDefault) 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/data_tiering/get_capacity_trend_analysis_parameters.go b/v2/client/data_tiering/get_capacity_trend_analysis_parameters.go deleted file mode 100644 index 992a325e..00000000 --- a/v2/client/data_tiering/get_capacity_trend_analysis_parameters.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/go-openapi/swag" -) - -// NewGetCapacityTrendAnalysisParams creates a new GetCapacityTrendAnalysisParams 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 NewGetCapacityTrendAnalysisParams() *GetCapacityTrendAnalysisParams { - return &GetCapacityTrendAnalysisParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCapacityTrendAnalysisParamsWithTimeout creates a new GetCapacityTrendAnalysisParams object -// with the ability to set a timeout on a request. -func NewGetCapacityTrendAnalysisParamsWithTimeout(timeout time.Duration) *GetCapacityTrendAnalysisParams { - return &GetCapacityTrendAnalysisParams{ - timeout: timeout, - } -} - -// NewGetCapacityTrendAnalysisParamsWithContext creates a new GetCapacityTrendAnalysisParams object -// with the ability to set a context for a request. -func NewGetCapacityTrendAnalysisParamsWithContext(ctx context.Context) *GetCapacityTrendAnalysisParams { - return &GetCapacityTrendAnalysisParams{ - Context: ctx, - } -} - -// NewGetCapacityTrendAnalysisParamsWithHTTPClient creates a new GetCapacityTrendAnalysisParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCapacityTrendAnalysisParamsWithHTTPClient(client *http.Client) *GetCapacityTrendAnalysisParams { - return &GetCapacityTrendAnalysisParams{ - HTTPClient: client, - } -} - -/* -GetCapacityTrendAnalysisParams contains all the parameters to send to the API endpoint - - for the get capacity trend analysis operation. - - Typically these are written to a http.Request. -*/ -type GetCapacityTrendAnalysisParams struct { - - /* EndTimeUsecs. - - Filter by a end time. Specify the end time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* SourceID. - - Filter by source id. If specified, this will only return the capacity trend analysis of the specific source. - - Format: int64 - */ - SourceID *int64 - - /* StartTimeUsecs. - - Filter by a start time. Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get capacity trend analysis params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCapacityTrendAnalysisParams) WithDefaults() *GetCapacityTrendAnalysisParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get capacity trend analysis params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCapacityTrendAnalysisParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithTimeout(timeout time.Duration) *GetCapacityTrendAnalysisParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithContext(ctx context.Context) *GetCapacityTrendAnalysisParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithHTTPClient(client *http.Client) *GetCapacityTrendAnalysisParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetCapacityTrendAnalysisParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithSourceID adds the sourceID to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithSourceID(sourceID *int64) *GetCapacityTrendAnalysisParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetSourceID(sourceID *int64) { - o.SourceID = sourceID -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetCapacityTrendAnalysisParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get capacity trend analysis params -func (o *GetCapacityTrendAnalysisParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCapacityTrendAnalysisParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.SourceID != nil { - - // query param sourceId - var qrSourceID int64 - - if o.SourceID != nil { - qrSourceID = *o.SourceID - } - qSourceID := swag.FormatInt64(qrSourceID) - if qSourceID != "" { - - if err := r.SetQueryParam("sourceId", qSourceID); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/get_capacity_trend_analysis_responses.go b/v2/client/data_tiering/get_capacity_trend_analysis_responses.go deleted file mode 100644 index 9d874b03..00000000 --- a/v2/client/data_tiering/get_capacity_trend_analysis_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCapacityTrendAnalysisReader is a Reader for the GetCapacityTrendAnalysis structure. -type GetCapacityTrendAnalysisReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCapacityTrendAnalysisReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCapacityTrendAnalysisOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCapacityTrendAnalysisDefault(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 - } -} - -// NewGetCapacityTrendAnalysisOK creates a GetCapacityTrendAnalysisOK with default headers values -func NewGetCapacityTrendAnalysisOK() *GetCapacityTrendAnalysisOK { - return &GetCapacityTrendAnalysisOK{} -} - -/* -GetCapacityTrendAnalysisOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCapacityTrendAnalysisOK struct { - Payload *models.CapacityTrendAnalysis -} - -// IsSuccess returns true when this get capacity trend analysis o k response has a 2xx status code -func (o *GetCapacityTrendAnalysisOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get capacity trend analysis o k response has a 3xx status code -func (o *GetCapacityTrendAnalysisOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get capacity trend analysis o k response has a 4xx status code -func (o *GetCapacityTrendAnalysisOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get capacity trend analysis o k response has a 5xx status code -func (o *GetCapacityTrendAnalysisOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get capacity trend analysis o k response a status code equal to that given -func (o *GetCapacityTrendAnalysisOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get capacity trend analysis o k response -func (o *GetCapacityTrendAnalysisOK) Code() int { - return 200 -} - -func (o *GetCapacityTrendAnalysisOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/capacity-trend][%d] getCapacityTrendAnalysisOK %s", 200, payload) -} - -func (o *GetCapacityTrendAnalysisOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/capacity-trend][%d] getCapacityTrendAnalysisOK %s", 200, payload) -} - -func (o *GetCapacityTrendAnalysisOK) GetPayload() *models.CapacityTrendAnalysis { - return o.Payload -} - -func (o *GetCapacityTrendAnalysisOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CapacityTrendAnalysis) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCapacityTrendAnalysisDefault creates a GetCapacityTrendAnalysisDefault with default headers values -func NewGetCapacityTrendAnalysisDefault(code int) *GetCapacityTrendAnalysisDefault { - return &GetCapacityTrendAnalysisDefault{ - _statusCode: code, - } -} - -/* -GetCapacityTrendAnalysisDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCapacityTrendAnalysisDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get capacity trend analysis default response has a 2xx status code -func (o *GetCapacityTrendAnalysisDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get capacity trend analysis default response has a 3xx status code -func (o *GetCapacityTrendAnalysisDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get capacity trend analysis default response has a 4xx status code -func (o *GetCapacityTrendAnalysisDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get capacity trend analysis default response has a 5xx status code -func (o *GetCapacityTrendAnalysisDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get capacity trend analysis default response a status code equal to that given -func (o *GetCapacityTrendAnalysisDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get capacity trend analysis default response -func (o *GetCapacityTrendAnalysisDefault) Code() int { - return o._statusCode -} - -func (o *GetCapacityTrendAnalysisDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/capacity-trend][%d] GetCapacityTrendAnalysis default %s", o._statusCode, payload) -} - -func (o *GetCapacityTrendAnalysisDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/capacity-trend][%d] GetCapacityTrendAnalysis default %s", o._statusCode, payload) -} - -func (o *GetCapacityTrendAnalysisDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCapacityTrendAnalysisDefault) 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/data_tiering/get_data_tiering_analysis_group_by_id_parameters.go b/v2/client/data_tiering/get_data_tiering_analysis_group_by_id_parameters.go deleted file mode 100644 index dfe5827e..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_group_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewGetDataTieringAnalysisGroupByIDParams creates a new GetDataTieringAnalysisGroupByIDParams 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 NewGetDataTieringAnalysisGroupByIDParams() *GetDataTieringAnalysisGroupByIDParams { - return &GetDataTieringAnalysisGroupByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringAnalysisGroupByIDParamsWithTimeout creates a new GetDataTieringAnalysisGroupByIDParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringAnalysisGroupByIDParamsWithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupByIDParams { - return &GetDataTieringAnalysisGroupByIDParams{ - timeout: timeout, - } -} - -// NewGetDataTieringAnalysisGroupByIDParamsWithContext creates a new GetDataTieringAnalysisGroupByIDParams object -// with the ability to set a context for a request. -func NewGetDataTieringAnalysisGroupByIDParamsWithContext(ctx context.Context) *GetDataTieringAnalysisGroupByIDParams { - return &GetDataTieringAnalysisGroupByIDParams{ - Context: ctx, - } -} - -// NewGetDataTieringAnalysisGroupByIDParamsWithHTTPClient creates a new GetDataTieringAnalysisGroupByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringAnalysisGroupByIDParamsWithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupByIDParams { - return &GetDataTieringAnalysisGroupByIDParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringAnalysisGroupByIDParams contains all the parameters to send to the API endpoint - - for the get data tiering analysis group by Id operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringAnalysisGroupByIDParams struct { - - /* ID. - - Specifies a unique id of the data tiering analysis group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering analysis group by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupByIDParams) WithDefaults() *GetDataTieringAnalysisGroupByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering analysis group by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) WithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) WithContext(ctx context.Context) *GetDataTieringAnalysisGroupByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) WithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) WithID(id string) *GetDataTieringAnalysisGroupByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get data tiering analysis group by Id params -func (o *GetDataTieringAnalysisGroupByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringAnalysisGroupByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/get_data_tiering_analysis_group_by_id_responses.go b/v2/client/data_tiering/get_data_tiering_analysis_group_by_id_responses.go deleted file mode 100644 index e109136a..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_group_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringAnalysisGroupByIDReader is a Reader for the GetDataTieringAnalysisGroupByID structure. -type GetDataTieringAnalysisGroupByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringAnalysisGroupByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringAnalysisGroupByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringAnalysisGroupByIDDefault(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 - } -} - -// NewGetDataTieringAnalysisGroupByIDOK creates a GetDataTieringAnalysisGroupByIDOK with default headers values -func NewGetDataTieringAnalysisGroupByIDOK() *GetDataTieringAnalysisGroupByIDOK { - return &GetDataTieringAnalysisGroupByIDOK{} -} - -/* -GetDataTieringAnalysisGroupByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringAnalysisGroupByIDOK struct { - Payload *models.DataTieringAnalysisGroup -} - -// IsSuccess returns true when this get data tiering analysis group by Id o k response has a 2xx status code -func (o *GetDataTieringAnalysisGroupByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering analysis group by Id o k response has a 3xx status code -func (o *GetDataTieringAnalysisGroupByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering analysis group by Id o k response has a 4xx status code -func (o *GetDataTieringAnalysisGroupByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering analysis group by Id o k response has a 5xx status code -func (o *GetDataTieringAnalysisGroupByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering analysis group by Id o k response a status code equal to that given -func (o *GetDataTieringAnalysisGroupByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering analysis group by Id o k response -func (o *GetDataTieringAnalysisGroupByIDOK) Code() int { - return 200 -} - -func (o *GetDataTieringAnalysisGroupByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}][%d] getDataTieringAnalysisGroupByIdOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}][%d] getDataTieringAnalysisGroupByIdOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupByIDOK) GetPayload() *models.DataTieringAnalysisGroup { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringAnalysisGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringAnalysisGroupByIDDefault creates a GetDataTieringAnalysisGroupByIDDefault with default headers values -func NewGetDataTieringAnalysisGroupByIDDefault(code int) *GetDataTieringAnalysisGroupByIDDefault { - return &GetDataTieringAnalysisGroupByIDDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringAnalysisGroupByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringAnalysisGroupByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering analysis group by Id default response has a 2xx status code -func (o *GetDataTieringAnalysisGroupByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering analysis group by Id default response has a 3xx status code -func (o *GetDataTieringAnalysisGroupByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering analysis group by Id default response has a 4xx status code -func (o *GetDataTieringAnalysisGroupByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering analysis group by Id default response has a 5xx status code -func (o *GetDataTieringAnalysisGroupByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering analysis group by Id default response a status code equal to that given -func (o *GetDataTieringAnalysisGroupByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering analysis group by Id default response -func (o *GetDataTieringAnalysisGroupByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringAnalysisGroupByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}][%d] GetDataTieringAnalysisGroupById default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}][%d] GetDataTieringAnalysisGroupById default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupByIDDefault) 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/data_tiering/get_data_tiering_analysis_group_runs_parameters.go b/v2/client/data_tiering/get_data_tiering_analysis_group_runs_parameters.go deleted file mode 100644 index f94c0ad1..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_group_runs_parameters.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/go-openapi/swag" -) - -// NewGetDataTieringAnalysisGroupRunsParams creates a new GetDataTieringAnalysisGroupRunsParams 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 NewGetDataTieringAnalysisGroupRunsParams() *GetDataTieringAnalysisGroupRunsParams { - return &GetDataTieringAnalysisGroupRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringAnalysisGroupRunsParamsWithTimeout creates a new GetDataTieringAnalysisGroupRunsParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringAnalysisGroupRunsParamsWithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupRunsParams { - return &GetDataTieringAnalysisGroupRunsParams{ - timeout: timeout, - } -} - -// NewGetDataTieringAnalysisGroupRunsParamsWithContext creates a new GetDataTieringAnalysisGroupRunsParams object -// with the ability to set a context for a request. -func NewGetDataTieringAnalysisGroupRunsParamsWithContext(ctx context.Context) *GetDataTieringAnalysisGroupRunsParams { - return &GetDataTieringAnalysisGroupRunsParams{ - Context: ctx, - } -} - -// NewGetDataTieringAnalysisGroupRunsParamsWithHTTPClient creates a new GetDataTieringAnalysisGroupRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringAnalysisGroupRunsParamsWithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupRunsParams { - return &GetDataTieringAnalysisGroupRunsParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringAnalysisGroupRunsParams contains all the parameters to send to the API endpoint - - for the get data tiering analysis group runs operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringAnalysisGroupRunsParams struct { - - /* ID. - - Specifies a unique id of the data tiering analysis group. - */ - ID string - - /* RunIds. - - Filter by a list of analysis group run ids. - */ - RunIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering analysis group runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupRunsParams) WithDefaults() *GetDataTieringAnalysisGroupRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering analysis group runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) WithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) WithContext(ctx context.Context) *GetDataTieringAnalysisGroupRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) WithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) WithID(id string) *GetDataTieringAnalysisGroupRunsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) SetID(id string) { - o.ID = id -} - -// WithRunIds adds the runIds to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) WithRunIds(runIds []string) *GetDataTieringAnalysisGroupRunsParams { - o.SetRunIds(runIds) - return o -} - -// SetRunIds adds the runIds to the get data tiering analysis group runs params -func (o *GetDataTieringAnalysisGroupRunsParams) SetRunIds(runIds []string) { - o.RunIds = runIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringAnalysisGroupRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.RunIds != nil { - - // binding items for runIds - joinedRunIds := o.bindParamRunIds(reg) - - // query array param runIds - if err := r.SetQueryParam("runIds", joinedRunIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDataTieringAnalysisGroupRuns binds the parameter runIds -func (o *GetDataTieringAnalysisGroupRunsParams) bindParamRunIds(formats strfmt.Registry) []string { - runIdsIR := o.RunIds - - var runIdsIC []string - for _, runIdsIIR := range runIdsIR { // explode []string - - runIdsIIV := runIdsIIR // string as string - runIdsIC = append(runIdsIC, runIdsIIV) - } - - // items.CollectionFormat: "" - runIdsIS := swag.JoinByFormat(runIdsIC, "") - - return runIdsIS -} diff --git a/v2/client/data_tiering/get_data_tiering_analysis_group_runs_responses.go b/v2/client/data_tiering/get_data_tiering_analysis_group_runs_responses.go deleted file mode 100644 index 0e726238..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_group_runs_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringAnalysisGroupRunsReader is a Reader for the GetDataTieringAnalysisGroupRuns structure. -type GetDataTieringAnalysisGroupRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringAnalysisGroupRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringAnalysisGroupRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringAnalysisGroupRunsDefault(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 - } -} - -// NewGetDataTieringAnalysisGroupRunsOK creates a GetDataTieringAnalysisGroupRunsOK with default headers values -func NewGetDataTieringAnalysisGroupRunsOK() *GetDataTieringAnalysisGroupRunsOK { - return &GetDataTieringAnalysisGroupRunsOK{} -} - -/* -GetDataTieringAnalysisGroupRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringAnalysisGroupRunsOK struct { - Payload models.DataTieringAnalysisGroupRuns -} - -// IsSuccess returns true when this get data tiering analysis group runs o k response has a 2xx status code -func (o *GetDataTieringAnalysisGroupRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering analysis group runs o k response has a 3xx status code -func (o *GetDataTieringAnalysisGroupRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering analysis group runs o k response has a 4xx status code -func (o *GetDataTieringAnalysisGroupRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering analysis group runs o k response has a 5xx status code -func (o *GetDataTieringAnalysisGroupRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering analysis group runs o k response a status code equal to that given -func (o *GetDataTieringAnalysisGroupRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering analysis group runs o k response -func (o *GetDataTieringAnalysisGroupRunsOK) Code() int { - return 200 -} - -func (o *GetDataTieringAnalysisGroupRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}/runs][%d] getDataTieringAnalysisGroupRunsOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}/runs][%d] getDataTieringAnalysisGroupRunsOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupRunsOK) GetPayload() models.DataTieringAnalysisGroupRuns { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringAnalysisGroupRunsDefault creates a GetDataTieringAnalysisGroupRunsDefault with default headers values -func NewGetDataTieringAnalysisGroupRunsDefault(code int) *GetDataTieringAnalysisGroupRunsDefault { - return &GetDataTieringAnalysisGroupRunsDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringAnalysisGroupRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringAnalysisGroupRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering analysis group runs default response has a 2xx status code -func (o *GetDataTieringAnalysisGroupRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering analysis group runs default response has a 3xx status code -func (o *GetDataTieringAnalysisGroupRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering analysis group runs default response has a 4xx status code -func (o *GetDataTieringAnalysisGroupRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering analysis group runs default response has a 5xx status code -func (o *GetDataTieringAnalysisGroupRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering analysis group runs default response a status code equal to that given -func (o *GetDataTieringAnalysisGroupRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering analysis group runs default response -func (o *GetDataTieringAnalysisGroupRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringAnalysisGroupRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}/runs][%d] GetDataTieringAnalysisGroupRuns default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/{id}/runs][%d] GetDataTieringAnalysisGroupRuns default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupRunsDefault) 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/data_tiering/get_data_tiering_analysis_groups_default_config_parameters.go b/v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_parameters.go deleted file mode 100644 index 75309b40..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewGetDataTieringAnalysisGroupsDefaultConfigParams creates a new GetDataTieringAnalysisGroupsDefaultConfigParams 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 NewGetDataTieringAnalysisGroupsDefaultConfigParams() *GetDataTieringAnalysisGroupsDefaultConfigParams { - return &GetDataTieringAnalysisGroupsDefaultConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithTimeout creates a new GetDataTieringAnalysisGroupsDefaultConfigParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupsDefaultConfigParams { - return &GetDataTieringAnalysisGroupsDefaultConfigParams{ - timeout: timeout, - } -} - -// NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithContext creates a new GetDataTieringAnalysisGroupsDefaultConfigParams object -// with the ability to set a context for a request. -func NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithContext(ctx context.Context) *GetDataTieringAnalysisGroupsDefaultConfigParams { - return &GetDataTieringAnalysisGroupsDefaultConfigParams{ - Context: ctx, - } -} - -// NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithHTTPClient creates a new GetDataTieringAnalysisGroupsDefaultConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringAnalysisGroupsDefaultConfigParamsWithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupsDefaultConfigParams { - return &GetDataTieringAnalysisGroupsDefaultConfigParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringAnalysisGroupsDefaultConfigParams contains all the parameters to send to the API endpoint - - for the get data tiering analysis groups default config operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringAnalysisGroupsDefaultConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering analysis groups default config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) WithDefaults() *GetDataTieringAnalysisGroupsDefaultConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering analysis groups default config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) WithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupsDefaultConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) WithContext(ctx context.Context) *GetDataTieringAnalysisGroupsDefaultConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) WithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupsDefaultConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering analysis groups default config params -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringAnalysisGroupsDefaultConfigParams) 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/data_tiering/get_data_tiering_analysis_groups_default_config_responses.go b/v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_responses.go deleted file mode 100644 index a66c32a0..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_groups_default_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringAnalysisGroupsDefaultConfigReader is a Reader for the GetDataTieringAnalysisGroupsDefaultConfig structure. -type GetDataTieringAnalysisGroupsDefaultConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringAnalysisGroupsDefaultConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringAnalysisGroupsDefaultConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringAnalysisGroupsDefaultConfigDefault(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 - } -} - -// NewGetDataTieringAnalysisGroupsDefaultConfigOK creates a GetDataTieringAnalysisGroupsDefaultConfigOK with default headers values -func NewGetDataTieringAnalysisGroupsDefaultConfigOK() *GetDataTieringAnalysisGroupsDefaultConfigOK { - return &GetDataTieringAnalysisGroupsDefaultConfigOK{} -} - -/* -GetDataTieringAnalysisGroupsDefaultConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringAnalysisGroupsDefaultConfigOK struct { - Payload *models.DataTieringTagConfig -} - -// IsSuccess returns true when this get data tiering analysis groups default config o k response has a 2xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering analysis groups default config o k response has a 3xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering analysis groups default config o k response has a 4xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering analysis groups default config o k response has a 5xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering analysis groups default config o k response a status code equal to that given -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering analysis groups default config o k response -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) Code() int { - return 200 -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/config][%d] getDataTieringAnalysisGroupsDefaultConfigOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/config][%d] getDataTieringAnalysisGroupsDefaultConfigOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) GetPayload() *models.DataTieringTagConfig { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringTagConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringAnalysisGroupsDefaultConfigDefault creates a GetDataTieringAnalysisGroupsDefaultConfigDefault with default headers values -func NewGetDataTieringAnalysisGroupsDefaultConfigDefault(code int) *GetDataTieringAnalysisGroupsDefaultConfigDefault { - return &GetDataTieringAnalysisGroupsDefaultConfigDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringAnalysisGroupsDefaultConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringAnalysisGroupsDefaultConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering analysis groups default config default response has a 2xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering analysis groups default config default response has a 3xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering analysis groups default config default response has a 4xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering analysis groups default config default response has a 5xx status code -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering analysis groups default config default response a status code equal to that given -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering analysis groups default config default response -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/config][%d] GetDataTieringAnalysisGroupsDefaultConfig default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups/config][%d] GetDataTieringAnalysisGroupsDefaultConfig default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupsDefaultConfigDefault) 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/data_tiering/get_data_tiering_analysis_groups_parameters.go b/v2/client/data_tiering/get_data_tiering_analysis_groups_parameters.go deleted file mode 100644 index 6860fc9e..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_groups_parameters.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/go-openapi/swag" -) - -// NewGetDataTieringAnalysisGroupsParams creates a new GetDataTieringAnalysisGroupsParams 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 NewGetDataTieringAnalysisGroupsParams() *GetDataTieringAnalysisGroupsParams { - return &GetDataTieringAnalysisGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringAnalysisGroupsParamsWithTimeout creates a new GetDataTieringAnalysisGroupsParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringAnalysisGroupsParamsWithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupsParams { - return &GetDataTieringAnalysisGroupsParams{ - timeout: timeout, - } -} - -// NewGetDataTieringAnalysisGroupsParamsWithContext creates a new GetDataTieringAnalysisGroupsParams object -// with the ability to set a context for a request. -func NewGetDataTieringAnalysisGroupsParamsWithContext(ctx context.Context) *GetDataTieringAnalysisGroupsParams { - return &GetDataTieringAnalysisGroupsParams{ - Context: ctx, - } -} - -// NewGetDataTieringAnalysisGroupsParamsWithHTTPClient creates a new GetDataTieringAnalysisGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringAnalysisGroupsParamsWithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupsParams { - return &GetDataTieringAnalysisGroupsParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringAnalysisGroupsParams contains all the parameters to send to the API endpoint - - for the get data tiering analysis groups operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringAnalysisGroupsParams struct { - - /* Ids. - - Filter by a list of Analysis Group IDs. - */ - Ids []string - - /* IncludeLastRunStats. - - If true, the response will include last run info. If it is false or not specified, the last run info won't be returned. - */ - IncludeLastRunStats *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering analysis groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupsParams) WithDefaults() *GetDataTieringAnalysisGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering analysis groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringAnalysisGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) WithTimeout(timeout time.Duration) *GetDataTieringAnalysisGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) WithContext(ctx context.Context) *GetDataTieringAnalysisGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) WithHTTPClient(client *http.Client) *GetDataTieringAnalysisGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) WithIds(ids []string) *GetDataTieringAnalysisGroupsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeLastRunStats adds the includeLastRunStats to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) WithIncludeLastRunStats(includeLastRunStats *bool) *GetDataTieringAnalysisGroupsParams { - o.SetIncludeLastRunStats(includeLastRunStats) - return o -} - -// SetIncludeLastRunStats adds the includeLastRunStats to the get data tiering analysis groups params -func (o *GetDataTieringAnalysisGroupsParams) SetIncludeLastRunStats(includeLastRunStats *bool) { - o.IncludeLastRunStats = includeLastRunStats -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringAnalysisGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeLastRunStats != nil { - - // query param includeLastRunStats - var qrIncludeLastRunStats bool - - if o.IncludeLastRunStats != nil { - qrIncludeLastRunStats = *o.IncludeLastRunStats - } - qIncludeLastRunStats := swag.FormatBool(qrIncludeLastRunStats) - if qIncludeLastRunStats != "" { - - if err := r.SetQueryParam("includeLastRunStats", qIncludeLastRunStats); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDataTieringAnalysisGroups binds the parameter ids -func (o *GetDataTieringAnalysisGroupsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/data_tiering/get_data_tiering_analysis_groups_responses.go b/v2/client/data_tiering/get_data_tiering_analysis_groups_responses.go deleted file mode 100644 index 1660ce49..00000000 --- a/v2/client/data_tiering/get_data_tiering_analysis_groups_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringAnalysisGroupsReader is a Reader for the GetDataTieringAnalysisGroups structure. -type GetDataTieringAnalysisGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringAnalysisGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringAnalysisGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringAnalysisGroupsDefault(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 - } -} - -// NewGetDataTieringAnalysisGroupsOK creates a GetDataTieringAnalysisGroupsOK with default headers values -func NewGetDataTieringAnalysisGroupsOK() *GetDataTieringAnalysisGroupsOK { - return &GetDataTieringAnalysisGroupsOK{} -} - -/* -GetDataTieringAnalysisGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringAnalysisGroupsOK struct { - Payload models.DataTieringAnalysisGroups -} - -// IsSuccess returns true when this get data tiering analysis groups o k response has a 2xx status code -func (o *GetDataTieringAnalysisGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering analysis groups o k response has a 3xx status code -func (o *GetDataTieringAnalysisGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering analysis groups o k response has a 4xx status code -func (o *GetDataTieringAnalysisGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering analysis groups o k response has a 5xx status code -func (o *GetDataTieringAnalysisGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering analysis groups o k response a status code equal to that given -func (o *GetDataTieringAnalysisGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering analysis groups o k response -func (o *GetDataTieringAnalysisGroupsOK) Code() int { - return 200 -} - -func (o *GetDataTieringAnalysisGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups][%d] getDataTieringAnalysisGroupsOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups][%d] getDataTieringAnalysisGroupsOK %s", 200, payload) -} - -func (o *GetDataTieringAnalysisGroupsOK) GetPayload() models.DataTieringAnalysisGroups { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringAnalysisGroupsDefault creates a GetDataTieringAnalysisGroupsDefault with default headers values -func NewGetDataTieringAnalysisGroupsDefault(code int) *GetDataTieringAnalysisGroupsDefault { - return &GetDataTieringAnalysisGroupsDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringAnalysisGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringAnalysisGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering analysis groups default response has a 2xx status code -func (o *GetDataTieringAnalysisGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering analysis groups default response has a 3xx status code -func (o *GetDataTieringAnalysisGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering analysis groups default response has a 4xx status code -func (o *GetDataTieringAnalysisGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering analysis groups default response has a 5xx status code -func (o *GetDataTieringAnalysisGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering analysis groups default response a status code equal to that given -func (o *GetDataTieringAnalysisGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering analysis groups default response -func (o *GetDataTieringAnalysisGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringAnalysisGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups][%d] GetDataTieringAnalysisGroups default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/analysis-groups][%d] GetDataTieringAnalysisGroups default %s", o._statusCode, payload) -} - -func (o *GetDataTieringAnalysisGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringAnalysisGroupsDefault) 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/data_tiering/get_data_tiering_task_by_id_parameters.go b/v2/client/data_tiering/get_data_tiering_task_by_id_parameters.go deleted file mode 100644 index ec2bdb52..00000000 --- a/v2/client/data_tiering/get_data_tiering_task_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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" -) - -// NewGetDataTieringTaskByIDParams creates a new GetDataTieringTaskByIDParams 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 NewGetDataTieringTaskByIDParams() *GetDataTieringTaskByIDParams { - return &GetDataTieringTaskByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringTaskByIDParamsWithTimeout creates a new GetDataTieringTaskByIDParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringTaskByIDParamsWithTimeout(timeout time.Duration) *GetDataTieringTaskByIDParams { - return &GetDataTieringTaskByIDParams{ - timeout: timeout, - } -} - -// NewGetDataTieringTaskByIDParamsWithContext creates a new GetDataTieringTaskByIDParams object -// with the ability to set a context for a request. -func NewGetDataTieringTaskByIDParamsWithContext(ctx context.Context) *GetDataTieringTaskByIDParams { - return &GetDataTieringTaskByIDParams{ - Context: ctx, - } -} - -// NewGetDataTieringTaskByIDParamsWithHTTPClient creates a new GetDataTieringTaskByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringTaskByIDParamsWithHTTPClient(client *http.Client) *GetDataTieringTaskByIDParams { - return &GetDataTieringTaskByIDParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringTaskByIDParams contains all the parameters to send to the API endpoint - - for the get data tiering task by Id operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringTaskByIDParams struct { - - /* ID. - - Specifies the id of the data tiering task. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering task by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringTaskByIDParams) WithDefaults() *GetDataTieringTaskByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering task by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringTaskByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) WithTimeout(timeout time.Duration) *GetDataTieringTaskByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) WithContext(ctx context.Context) *GetDataTieringTaskByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) WithHTTPClient(client *http.Client) *GetDataTieringTaskByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) WithID(id string) *GetDataTieringTaskByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get data tiering task by Id params -func (o *GetDataTieringTaskByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringTaskByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/get_data_tiering_task_by_id_responses.go b/v2/client/data_tiering/get_data_tiering_task_by_id_responses.go deleted file mode 100644 index 3db69140..00000000 --- a/v2/client/data_tiering/get_data_tiering_task_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringTaskByIDReader is a Reader for the GetDataTieringTaskByID structure. -type GetDataTieringTaskByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringTaskByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringTaskByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringTaskByIDDefault(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 - } -} - -// NewGetDataTieringTaskByIDOK creates a GetDataTieringTaskByIDOK with default headers values -func NewGetDataTieringTaskByIDOK() *GetDataTieringTaskByIDOK { - return &GetDataTieringTaskByIDOK{} -} - -/* -GetDataTieringTaskByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringTaskByIDOK struct { - Payload *models.DataTieringTask -} - -// IsSuccess returns true when this get data tiering task by Id o k response has a 2xx status code -func (o *GetDataTieringTaskByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering task by Id o k response has a 3xx status code -func (o *GetDataTieringTaskByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering task by Id o k response has a 4xx status code -func (o *GetDataTieringTaskByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering task by Id o k response has a 5xx status code -func (o *GetDataTieringTaskByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering task by Id o k response a status code equal to that given -func (o *GetDataTieringTaskByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering task by Id o k response -func (o *GetDataTieringTaskByIDOK) Code() int { - return 200 -} - -func (o *GetDataTieringTaskByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks/{id}][%d] getDataTieringTaskByIdOK %s", 200, payload) -} - -func (o *GetDataTieringTaskByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks/{id}][%d] getDataTieringTaskByIdOK %s", 200, payload) -} - -func (o *GetDataTieringTaskByIDOK) GetPayload() *models.DataTieringTask { - return o.Payload -} - -func (o *GetDataTieringTaskByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringTaskByIDDefault creates a GetDataTieringTaskByIDDefault with default headers values -func NewGetDataTieringTaskByIDDefault(code int) *GetDataTieringTaskByIDDefault { - return &GetDataTieringTaskByIDDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringTaskByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringTaskByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering task by Id default response has a 2xx status code -func (o *GetDataTieringTaskByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering task by Id default response has a 3xx status code -func (o *GetDataTieringTaskByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering task by Id default response has a 4xx status code -func (o *GetDataTieringTaskByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering task by Id default response has a 5xx status code -func (o *GetDataTieringTaskByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering task by Id default response a status code equal to that given -func (o *GetDataTieringTaskByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering task by Id default response -func (o *GetDataTieringTaskByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringTaskByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks/{id}][%d] GetDataTieringTaskById default %s", o._statusCode, payload) -} - -func (o *GetDataTieringTaskByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks/{id}][%d] GetDataTieringTaskById default %s", o._statusCode, payload) -} - -func (o *GetDataTieringTaskByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringTaskByIDDefault) 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/data_tiering/get_data_tiering_tasks_parameters.go b/v2/client/data_tiering/get_data_tiering_tasks_parameters.go deleted file mode 100644 index 0d4a119c..00000000 --- a/v2/client/data_tiering/get_data_tiering_tasks_parameters.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/go-openapi/swag" -) - -// NewGetDataTieringTasksParams creates a new GetDataTieringTasksParams 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 NewGetDataTieringTasksParams() *GetDataTieringTasksParams { - return &GetDataTieringTasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDataTieringTasksParamsWithTimeout creates a new GetDataTieringTasksParams object -// with the ability to set a timeout on a request. -func NewGetDataTieringTasksParamsWithTimeout(timeout time.Duration) *GetDataTieringTasksParams { - return &GetDataTieringTasksParams{ - timeout: timeout, - } -} - -// NewGetDataTieringTasksParamsWithContext creates a new GetDataTieringTasksParams object -// with the ability to set a context for a request. -func NewGetDataTieringTasksParamsWithContext(ctx context.Context) *GetDataTieringTasksParams { - return &GetDataTieringTasksParams{ - Context: ctx, - } -} - -// NewGetDataTieringTasksParamsWithHTTPClient creates a new GetDataTieringTasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDataTieringTasksParamsWithHTTPClient(client *http.Client) *GetDataTieringTasksParams { - return &GetDataTieringTasksParams{ - HTTPClient: client, - } -} - -/* -GetDataTieringTasksParams contains all the parameters to send to the API endpoint - - for the get data tiering tasks operation. - - Typically these are written to a http.Request. -*/ -type GetDataTieringTasksParams struct { - - /* Ids. - - Filter by a list of data tiering task ids. - */ - Ids []string - - /* IncludeDowntieredDataLocation. - - If true, it will also return a list of downtiered data locations - for downtiered tasks. - */ - IncludeDowntieredDataLocation *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get data tiering tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringTasksParams) WithDefaults() *GetDataTieringTasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get data tiering tasks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDataTieringTasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get data tiering tasks params -func (o *GetDataTieringTasksParams) WithTimeout(timeout time.Duration) *GetDataTieringTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get data tiering tasks params -func (o *GetDataTieringTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get data tiering tasks params -func (o *GetDataTieringTasksParams) WithContext(ctx context.Context) *GetDataTieringTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get data tiering tasks params -func (o *GetDataTieringTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get data tiering tasks params -func (o *GetDataTieringTasksParams) WithHTTPClient(client *http.Client) *GetDataTieringTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get data tiering tasks params -func (o *GetDataTieringTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get data tiering tasks params -func (o *GetDataTieringTasksParams) WithIds(ids []string) *GetDataTieringTasksParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get data tiering tasks params -func (o *GetDataTieringTasksParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeDowntieredDataLocation adds the includeDowntieredDataLocation to the get data tiering tasks params -func (o *GetDataTieringTasksParams) WithIncludeDowntieredDataLocation(includeDowntieredDataLocation *bool) *GetDataTieringTasksParams { - o.SetIncludeDowntieredDataLocation(includeDowntieredDataLocation) - return o -} - -// SetIncludeDowntieredDataLocation adds the includeDowntieredDataLocation to the get data tiering tasks params -func (o *GetDataTieringTasksParams) SetIncludeDowntieredDataLocation(includeDowntieredDataLocation *bool) { - o.IncludeDowntieredDataLocation = includeDowntieredDataLocation -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDataTieringTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeDowntieredDataLocation != nil { - - // query param includeDowntieredDataLocation - var qrIncludeDowntieredDataLocation bool - - if o.IncludeDowntieredDataLocation != nil { - qrIncludeDowntieredDataLocation = *o.IncludeDowntieredDataLocation - } - qIncludeDowntieredDataLocation := swag.FormatBool(qrIncludeDowntieredDataLocation) - if qIncludeDowntieredDataLocation != "" { - - if err := r.SetQueryParam("includeDowntieredDataLocation", qIncludeDowntieredDataLocation); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetDataTieringTasks binds the parameter ids -func (o *GetDataTieringTasksParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/data_tiering/get_data_tiering_tasks_responses.go b/v2/client/data_tiering/get_data_tiering_tasks_responses.go deleted file mode 100644 index 9e23b2dd..00000000 --- a/v2/client/data_tiering/get_data_tiering_tasks_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetDataTieringTasksReader is a Reader for the GetDataTieringTasks structure. -type GetDataTieringTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDataTieringTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDataTieringTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDataTieringTasksDefault(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 - } -} - -// NewGetDataTieringTasksOK creates a GetDataTieringTasksOK with default headers values -func NewGetDataTieringTasksOK() *GetDataTieringTasksOK { - return &GetDataTieringTasksOK{} -} - -/* -GetDataTieringTasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDataTieringTasksOK struct { - Payload models.DataTieringTasks -} - -// IsSuccess returns true when this get data tiering tasks o k response has a 2xx status code -func (o *GetDataTieringTasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get data tiering tasks o k response has a 3xx status code -func (o *GetDataTieringTasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get data tiering tasks o k response has a 4xx status code -func (o *GetDataTieringTasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get data tiering tasks o k response has a 5xx status code -func (o *GetDataTieringTasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get data tiering tasks o k response a status code equal to that given -func (o *GetDataTieringTasksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get data tiering tasks o k response -func (o *GetDataTieringTasksOK) Code() int { - return 200 -} - -func (o *GetDataTieringTasksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks][%d] getDataTieringTasksOK %s", 200, payload) -} - -func (o *GetDataTieringTasksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks][%d] getDataTieringTasksOK %s", 200, payload) -} - -func (o *GetDataTieringTasksOK) GetPayload() models.DataTieringTasks { - return o.Payload -} - -func (o *GetDataTieringTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDataTieringTasksDefault creates a GetDataTieringTasksDefault with default headers values -func NewGetDataTieringTasksDefault(code int) *GetDataTieringTasksDefault { - return &GetDataTieringTasksDefault{ - _statusCode: code, - } -} - -/* -GetDataTieringTasksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetDataTieringTasksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get data tiering tasks default response has a 2xx status code -func (o *GetDataTieringTasksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get data tiering tasks default response has a 3xx status code -func (o *GetDataTieringTasksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get data tiering tasks default response has a 4xx status code -func (o *GetDataTieringTasksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get data tiering tasks default response has a 5xx status code -func (o *GetDataTieringTasksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get data tiering tasks default response a status code equal to that given -func (o *GetDataTieringTasksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get data tiering tasks default response -func (o *GetDataTieringTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetDataTieringTasksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks][%d] GetDataTieringTasks default %s", o._statusCode, payload) -} - -func (o *GetDataTieringTasksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-tiering/tasks][%d] GetDataTieringTasks default %s", o._statusCode, payload) -} - -func (o *GetDataTieringTasksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetDataTieringTasksDefault) 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/data_tiering/update_data_tiering_analysis_group_parameters.go b/v2/client/data_tiering/update_data_tiering_analysis_group_parameters.go deleted file mode 100644 index f32009da..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_group_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateDataTieringAnalysisGroupParams creates a new UpdateDataTieringAnalysisGroupParams 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 NewUpdateDataTieringAnalysisGroupParams() *UpdateDataTieringAnalysisGroupParams { - return &UpdateDataTieringAnalysisGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDataTieringAnalysisGroupParamsWithTimeout creates a new UpdateDataTieringAnalysisGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateDataTieringAnalysisGroupParamsWithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupParams { - return &UpdateDataTieringAnalysisGroupParams{ - timeout: timeout, - } -} - -// NewUpdateDataTieringAnalysisGroupParamsWithContext creates a new UpdateDataTieringAnalysisGroupParams object -// with the ability to set a context for a request. -func NewUpdateDataTieringAnalysisGroupParamsWithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupParams { - return &UpdateDataTieringAnalysisGroupParams{ - Context: ctx, - } -} - -// NewUpdateDataTieringAnalysisGroupParamsWithHTTPClient creates a new UpdateDataTieringAnalysisGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDataTieringAnalysisGroupParamsWithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupParams { - return &UpdateDataTieringAnalysisGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateDataTieringAnalysisGroupParams contains all the parameters to send to the API endpoint - - for the update data tiering analysis group operation. - - Typically these are written to a http.Request. -*/ -type UpdateDataTieringAnalysisGroupParams struct { - - /* Body. - - Specifies the data tiering analysis group. - */ - Body *models.CommonDataTieringAnalysisGroupParams - - /* ID. - - Specifies a unique id of the data tiering analysis group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupParams) WithDefaults() *UpdateDataTieringAnalysisGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update data tiering analysis group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) WithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) WithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) WithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) WithBody(body *models.CommonDataTieringAnalysisGroupParams) *UpdateDataTieringAnalysisGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) SetBody(body *models.CommonDataTieringAnalysisGroupParams) { - o.Body = body -} - -// WithID adds the id to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) WithID(id string) *UpdateDataTieringAnalysisGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update data tiering analysis group params -func (o *UpdateDataTieringAnalysisGroupParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDataTieringAnalysisGroupParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/update_data_tiering_analysis_group_responses.go b/v2/client/data_tiering/update_data_tiering_analysis_group_responses.go deleted file mode 100644 index 06e435a5..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateDataTieringAnalysisGroupReader is a Reader for the UpdateDataTieringAnalysisGroup structure. -type UpdateDataTieringAnalysisGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDataTieringAnalysisGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDataTieringAnalysisGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDataTieringAnalysisGroupDefault(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 - } -} - -// NewUpdateDataTieringAnalysisGroupOK creates a UpdateDataTieringAnalysisGroupOK with default headers values -func NewUpdateDataTieringAnalysisGroupOK() *UpdateDataTieringAnalysisGroupOK { - return &UpdateDataTieringAnalysisGroupOK{} -} - -/* -UpdateDataTieringAnalysisGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDataTieringAnalysisGroupOK struct { - Payload *models.DataTieringAnalysisGroup -} - -// IsSuccess returns true when this update data tiering analysis group o k response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update data tiering analysis group o k response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update data tiering analysis group o k response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update data tiering analysis group o k response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update data tiering analysis group o k response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update data tiering analysis group o k response -func (o *UpdateDataTieringAnalysisGroupOK) Code() int { - return 200 -} - -func (o *UpdateDataTieringAnalysisGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}][%d] updateDataTieringAnalysisGroupOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}][%d] updateDataTieringAnalysisGroupOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupOK) GetPayload() *models.DataTieringAnalysisGroup { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringAnalysisGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDataTieringAnalysisGroupDefault creates a UpdateDataTieringAnalysisGroupDefault with default headers values -func NewUpdateDataTieringAnalysisGroupDefault(code int) *UpdateDataTieringAnalysisGroupDefault { - return &UpdateDataTieringAnalysisGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateDataTieringAnalysisGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateDataTieringAnalysisGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update data tiering analysis group default response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update data tiering analysis group default response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update data tiering analysis group default response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update data tiering analysis group default response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update data tiering analysis group default response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update data tiering analysis group default response -func (o *UpdateDataTieringAnalysisGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDataTieringAnalysisGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}][%d] UpdateDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}][%d] UpdateDataTieringAnalysisGroup default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupDefault) 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/data_tiering/update_data_tiering_analysis_group_tags_config_parameters.go b/v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_parameters.go deleted file mode 100644 index 226c0d08..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateDataTieringAnalysisGroupTagsConfigParams creates a new UpdateDataTieringAnalysisGroupTagsConfigParams 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 NewUpdateDataTieringAnalysisGroupTagsConfigParams() *UpdateDataTieringAnalysisGroupTagsConfigParams { - return &UpdateDataTieringAnalysisGroupTagsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithTimeout creates a new UpdateDataTieringAnalysisGroupTagsConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupTagsConfigParams { - return &UpdateDataTieringAnalysisGroupTagsConfigParams{ - timeout: timeout, - } -} - -// NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithContext creates a new UpdateDataTieringAnalysisGroupTagsConfigParams object -// with the ability to set a context for a request. -func NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupTagsConfigParams { - return &UpdateDataTieringAnalysisGroupTagsConfigParams{ - Context: ctx, - } -} - -// NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithHTTPClient creates a new UpdateDataTieringAnalysisGroupTagsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDataTieringAnalysisGroupTagsConfigParamsWithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupTagsConfigParams { - return &UpdateDataTieringAnalysisGroupTagsConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateDataTieringAnalysisGroupTagsConfigParams contains all the parameters to send to the API endpoint - - for the update data tiering analysis group tags config operation. - - Typically these are written to a http.Request. -*/ -type UpdateDataTieringAnalysisGroupTagsConfigParams struct { - - /* Body. - - Specifies the data tiering analysis Tags Config. - */ - Body *models.DataTieringTagConfig - - /* ID. - - Specifies a unique id of the data tiering analysis group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update data tiering analysis group tags config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithDefaults() *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update data tiering analysis group tags config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithBody(body *models.DataTieringTagConfig) *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetBody(body *models.DataTieringTagConfig) { - o.Body = body -} - -// WithID adds the id to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) WithID(id string) *UpdateDataTieringAnalysisGroupTagsConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update data tiering analysis group tags config params -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDataTieringAnalysisGroupTagsConfigParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_responses.go b/v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_responses.go deleted file mode 100644 index 74ee0814..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_group_tags_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateDataTieringAnalysisGroupTagsConfigReader is a Reader for the UpdateDataTieringAnalysisGroupTagsConfig structure. -type UpdateDataTieringAnalysisGroupTagsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDataTieringAnalysisGroupTagsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDataTieringAnalysisGroupTagsConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDataTieringAnalysisGroupTagsConfigDefault(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 - } -} - -// NewUpdateDataTieringAnalysisGroupTagsConfigOK creates a UpdateDataTieringAnalysisGroupTagsConfigOK with default headers values -func NewUpdateDataTieringAnalysisGroupTagsConfigOK() *UpdateDataTieringAnalysisGroupTagsConfigOK { - return &UpdateDataTieringAnalysisGroupTagsConfigOK{} -} - -/* -UpdateDataTieringAnalysisGroupTagsConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDataTieringAnalysisGroupTagsConfigOK struct { - Payload *models.DataTieringTagConfig -} - -// IsSuccess returns true when this update data tiering analysis group tags config o k response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update data tiering analysis group tags config o k response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update data tiering analysis group tags config o k response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update data tiering analysis group tags config o k response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update data tiering analysis group tags config o k response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update data tiering analysis group tags config o k response -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) Code() int { - return 200 -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}/config][%d] updateDataTieringAnalysisGroupTagsConfigOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}/config][%d] updateDataTieringAnalysisGroupTagsConfigOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) GetPayload() *models.DataTieringTagConfig { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringTagConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDataTieringAnalysisGroupTagsConfigDefault creates a UpdateDataTieringAnalysisGroupTagsConfigDefault with default headers values -func NewUpdateDataTieringAnalysisGroupTagsConfigDefault(code int) *UpdateDataTieringAnalysisGroupTagsConfigDefault { - return &UpdateDataTieringAnalysisGroupTagsConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateDataTieringAnalysisGroupTagsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateDataTieringAnalysisGroupTagsConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update data tiering analysis group tags config default response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update data tiering analysis group tags config default response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update data tiering analysis group tags config default response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update data tiering analysis group tags config default response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update data tiering analysis group tags config default response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update data tiering analysis group tags config default response -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}/config][%d] UpdateDataTieringAnalysisGroupTagsConfig default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/analysis-groups/{id}/config][%d] UpdateDataTieringAnalysisGroupTagsConfig default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupTagsConfigDefault) 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/data_tiering/update_data_tiering_analysis_groups_state_parameters.go b/v2/client/data_tiering/update_data_tiering_analysis_groups_state_parameters.go deleted file mode 100644 index 0b59a341..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_groups_state_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateDataTieringAnalysisGroupsStateParams creates a new UpdateDataTieringAnalysisGroupsStateParams 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 NewUpdateDataTieringAnalysisGroupsStateParams() *UpdateDataTieringAnalysisGroupsStateParams { - return &UpdateDataTieringAnalysisGroupsStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDataTieringAnalysisGroupsStateParamsWithTimeout creates a new UpdateDataTieringAnalysisGroupsStateParams object -// with the ability to set a timeout on a request. -func NewUpdateDataTieringAnalysisGroupsStateParamsWithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupsStateParams { - return &UpdateDataTieringAnalysisGroupsStateParams{ - timeout: timeout, - } -} - -// NewUpdateDataTieringAnalysisGroupsStateParamsWithContext creates a new UpdateDataTieringAnalysisGroupsStateParams object -// with the ability to set a context for a request. -func NewUpdateDataTieringAnalysisGroupsStateParamsWithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupsStateParams { - return &UpdateDataTieringAnalysisGroupsStateParams{ - Context: ctx, - } -} - -// NewUpdateDataTieringAnalysisGroupsStateParamsWithHTTPClient creates a new UpdateDataTieringAnalysisGroupsStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDataTieringAnalysisGroupsStateParamsWithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupsStateParams { - return &UpdateDataTieringAnalysisGroupsStateParams{ - HTTPClient: client, - } -} - -/* -UpdateDataTieringAnalysisGroupsStateParams contains all the parameters to send to the API endpoint - - for the update data tiering analysis groups state operation. - - Typically these are written to a http.Request. -*/ -type UpdateDataTieringAnalysisGroupsStateParams struct { - - /* Body. - - Specifies the parameters to perform an action of list of data tiering - analysis groups. - */ - Body *models.UpdateDataTieringStateRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update data tiering analysis groups state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupsStateParams) WithDefaults() *UpdateDataTieringAnalysisGroupsStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update data tiering analysis groups state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringAnalysisGroupsStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) WithTimeout(timeout time.Duration) *UpdateDataTieringAnalysisGroupsStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) WithContext(ctx context.Context) *UpdateDataTieringAnalysisGroupsStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) WithHTTPClient(client *http.Client) *UpdateDataTieringAnalysisGroupsStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) WithBody(body *models.UpdateDataTieringStateRequest) *UpdateDataTieringAnalysisGroupsStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update data tiering analysis groups state params -func (o *UpdateDataTieringAnalysisGroupsStateParams) SetBody(body *models.UpdateDataTieringStateRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDataTieringAnalysisGroupsStateParams) 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/data_tiering/update_data_tiering_analysis_groups_state_responses.go b/v2/client/data_tiering/update_data_tiering_analysis_groups_state_responses.go deleted file mode 100644 index 4069d738..00000000 --- a/v2/client/data_tiering/update_data_tiering_analysis_groups_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateDataTieringAnalysisGroupsStateReader is a Reader for the UpdateDataTieringAnalysisGroupsState structure. -type UpdateDataTieringAnalysisGroupsStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDataTieringAnalysisGroupsStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDataTieringAnalysisGroupsStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDataTieringAnalysisGroupsStateDefault(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 - } -} - -// NewUpdateDataTieringAnalysisGroupsStateOK creates a UpdateDataTieringAnalysisGroupsStateOK with default headers values -func NewUpdateDataTieringAnalysisGroupsStateOK() *UpdateDataTieringAnalysisGroupsStateOK { - return &UpdateDataTieringAnalysisGroupsStateOK{} -} - -/* -UpdateDataTieringAnalysisGroupsStateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDataTieringAnalysisGroupsStateOK struct { - Payload *models.UpdateDataTieringState -} - -// IsSuccess returns true when this update data tiering analysis groups state o k response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupsStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update data tiering analysis groups state o k response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupsStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update data tiering analysis groups state o k response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupsStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update data tiering analysis groups state o k response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupsStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update data tiering analysis groups state o k response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupsStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update data tiering analysis groups state o k response -func (o *UpdateDataTieringAnalysisGroupsStateOK) Code() int { - return 200 -} - -func (o *UpdateDataTieringAnalysisGroupsStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/states][%d] updateDataTieringAnalysisGroupsStateOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupsStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/states][%d] updateDataTieringAnalysisGroupsStateOK %s", 200, payload) -} - -func (o *UpdateDataTieringAnalysisGroupsStateOK) GetPayload() *models.UpdateDataTieringState { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupsStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateDataTieringState) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDataTieringAnalysisGroupsStateDefault creates a UpdateDataTieringAnalysisGroupsStateDefault with default headers values -func NewUpdateDataTieringAnalysisGroupsStateDefault(code int) *UpdateDataTieringAnalysisGroupsStateDefault { - return &UpdateDataTieringAnalysisGroupsStateDefault{ - _statusCode: code, - } -} - -/* -UpdateDataTieringAnalysisGroupsStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateDataTieringAnalysisGroupsStateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update data tiering analysis groups state default response has a 2xx status code -func (o *UpdateDataTieringAnalysisGroupsStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update data tiering analysis groups state default response has a 3xx status code -func (o *UpdateDataTieringAnalysisGroupsStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update data tiering analysis groups state default response has a 4xx status code -func (o *UpdateDataTieringAnalysisGroupsStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update data tiering analysis groups state default response has a 5xx status code -func (o *UpdateDataTieringAnalysisGroupsStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update data tiering analysis groups state default response a status code equal to that given -func (o *UpdateDataTieringAnalysisGroupsStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update data tiering analysis groups state default response -func (o *UpdateDataTieringAnalysisGroupsStateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDataTieringAnalysisGroupsStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/states][%d] UpdateDataTieringAnalysisGroupsState default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupsStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/analysis-groups/states][%d] UpdateDataTieringAnalysisGroupsState default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringAnalysisGroupsStateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateDataTieringAnalysisGroupsStateDefault) 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/data_tiering/update_data_tiering_task_parameters.go b/v2/client/data_tiering/update_data_tiering_task_parameters.go deleted file mode 100644 index 9d453a64..00000000 --- a/v2/client/data_tiering/update_data_tiering_task_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateDataTieringTaskParams creates a new UpdateDataTieringTaskParams 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 NewUpdateDataTieringTaskParams() *UpdateDataTieringTaskParams { - return &UpdateDataTieringTaskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDataTieringTaskParamsWithTimeout creates a new UpdateDataTieringTaskParams object -// with the ability to set a timeout on a request. -func NewUpdateDataTieringTaskParamsWithTimeout(timeout time.Duration) *UpdateDataTieringTaskParams { - return &UpdateDataTieringTaskParams{ - timeout: timeout, - } -} - -// NewUpdateDataTieringTaskParamsWithContext creates a new UpdateDataTieringTaskParams object -// with the ability to set a context for a request. -func NewUpdateDataTieringTaskParamsWithContext(ctx context.Context) *UpdateDataTieringTaskParams { - return &UpdateDataTieringTaskParams{ - Context: ctx, - } -} - -// NewUpdateDataTieringTaskParamsWithHTTPClient creates a new UpdateDataTieringTaskParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDataTieringTaskParamsWithHTTPClient(client *http.Client) *UpdateDataTieringTaskParams { - return &UpdateDataTieringTaskParams{ - HTTPClient: client, - } -} - -/* -UpdateDataTieringTaskParams contains all the parameters to send to the API endpoint - - for the update data tiering task operation. - - Typically these are written to a http.Request. -*/ -type UpdateDataTieringTaskParams struct { - - /* Body. - - Specifies the parameters to update a data tiering task. - */ - Body *models.CreateOrUpdateDataTieringTaskRequest - - /* ID. - - Specifies the id of the data tiering task. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringTaskParams) WithDefaults() *UpdateDataTieringTaskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update data tiering task params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringTaskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update data tiering task params -func (o *UpdateDataTieringTaskParams) WithTimeout(timeout time.Duration) *UpdateDataTieringTaskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update data tiering task params -func (o *UpdateDataTieringTaskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update data tiering task params -func (o *UpdateDataTieringTaskParams) WithContext(ctx context.Context) *UpdateDataTieringTaskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update data tiering task params -func (o *UpdateDataTieringTaskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update data tiering task params -func (o *UpdateDataTieringTaskParams) WithHTTPClient(client *http.Client) *UpdateDataTieringTaskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update data tiering task params -func (o *UpdateDataTieringTaskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update data tiering task params -func (o *UpdateDataTieringTaskParams) WithBody(body *models.CreateOrUpdateDataTieringTaskRequest) *UpdateDataTieringTaskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update data tiering task params -func (o *UpdateDataTieringTaskParams) SetBody(body *models.CreateOrUpdateDataTieringTaskRequest) { - o.Body = body -} - -// WithID adds the id to the update data tiering task params -func (o *UpdateDataTieringTaskParams) WithID(id string) *UpdateDataTieringTaskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update data tiering task params -func (o *UpdateDataTieringTaskParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDataTieringTaskParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/data_tiering/update_data_tiering_task_responses.go b/v2/client/data_tiering/update_data_tiering_task_responses.go deleted file mode 100644 index 220cf8e3..00000000 --- a/v2/client/data_tiering/update_data_tiering_task_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateDataTieringTaskReader is a Reader for the UpdateDataTieringTask structure. -type UpdateDataTieringTaskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDataTieringTaskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDataTieringTaskOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDataTieringTaskDefault(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 - } -} - -// NewUpdateDataTieringTaskOK creates a UpdateDataTieringTaskOK with default headers values -func NewUpdateDataTieringTaskOK() *UpdateDataTieringTaskOK { - return &UpdateDataTieringTaskOK{} -} - -/* -UpdateDataTieringTaskOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDataTieringTaskOK struct { - Payload *models.DataTieringTask -} - -// IsSuccess returns true when this update data tiering task o k response has a 2xx status code -func (o *UpdateDataTieringTaskOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update data tiering task o k response has a 3xx status code -func (o *UpdateDataTieringTaskOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update data tiering task o k response has a 4xx status code -func (o *UpdateDataTieringTaskOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update data tiering task o k response has a 5xx status code -func (o *UpdateDataTieringTaskOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update data tiering task o k response a status code equal to that given -func (o *UpdateDataTieringTaskOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update data tiering task o k response -func (o *UpdateDataTieringTaskOK) Code() int { - return 200 -} - -func (o *UpdateDataTieringTaskOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/tasks/{id}][%d] updateDataTieringTaskOK %s", 200, payload) -} - -func (o *UpdateDataTieringTaskOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/tasks/{id}][%d] updateDataTieringTaskOK %s", 200, payload) -} - -func (o *UpdateDataTieringTaskOK) GetPayload() *models.DataTieringTask { - return o.Payload -} - -func (o *UpdateDataTieringTaskOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DataTieringTask) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDataTieringTaskDefault creates a UpdateDataTieringTaskDefault with default headers values -func NewUpdateDataTieringTaskDefault(code int) *UpdateDataTieringTaskDefault { - return &UpdateDataTieringTaskDefault{ - _statusCode: code, - } -} - -/* -UpdateDataTieringTaskDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateDataTieringTaskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update data tiering task default response has a 2xx status code -func (o *UpdateDataTieringTaskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update data tiering task default response has a 3xx status code -func (o *UpdateDataTieringTaskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update data tiering task default response has a 4xx status code -func (o *UpdateDataTieringTaskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update data tiering task default response has a 5xx status code -func (o *UpdateDataTieringTaskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update data tiering task default response a status code equal to that given -func (o *UpdateDataTieringTaskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update data tiering task default response -func (o *UpdateDataTieringTaskDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDataTieringTaskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/tasks/{id}][%d] UpdateDataTieringTask default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringTaskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-tiering/tasks/{id}][%d] UpdateDataTieringTask default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringTaskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateDataTieringTaskDefault) 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/data_tiering/update_data_tiering_tasks_state_parameters.go b/v2/client/data_tiering/update_data_tiering_tasks_state_parameters.go deleted file mode 100644 index f83d196a..00000000 --- a/v2/client/data_tiering/update_data_tiering_tasks_state_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateDataTieringTasksStateParams creates a new UpdateDataTieringTasksStateParams 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 NewUpdateDataTieringTasksStateParams() *UpdateDataTieringTasksStateParams { - return &UpdateDataTieringTasksStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateDataTieringTasksStateParamsWithTimeout creates a new UpdateDataTieringTasksStateParams object -// with the ability to set a timeout on a request. -func NewUpdateDataTieringTasksStateParamsWithTimeout(timeout time.Duration) *UpdateDataTieringTasksStateParams { - return &UpdateDataTieringTasksStateParams{ - timeout: timeout, - } -} - -// NewUpdateDataTieringTasksStateParamsWithContext creates a new UpdateDataTieringTasksStateParams object -// with the ability to set a context for a request. -func NewUpdateDataTieringTasksStateParamsWithContext(ctx context.Context) *UpdateDataTieringTasksStateParams { - return &UpdateDataTieringTasksStateParams{ - Context: ctx, - } -} - -// NewUpdateDataTieringTasksStateParamsWithHTTPClient creates a new UpdateDataTieringTasksStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateDataTieringTasksStateParamsWithHTTPClient(client *http.Client) *UpdateDataTieringTasksStateParams { - return &UpdateDataTieringTasksStateParams{ - HTTPClient: client, - } -} - -/* -UpdateDataTieringTasksStateParams contains all the parameters to send to the API endpoint - - for the update data tiering tasks state operation. - - Typically these are written to a http.Request. -*/ -type UpdateDataTieringTasksStateParams struct { - - /* Body. - - Specifies the parameters to perform an action of list of data tiering - tasks. - */ - Body *models.UpdateDataTieringStateRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update data tiering tasks state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringTasksStateParams) WithDefaults() *UpdateDataTieringTasksStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update data tiering tasks state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateDataTieringTasksStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) WithTimeout(timeout time.Duration) *UpdateDataTieringTasksStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) WithContext(ctx context.Context) *UpdateDataTieringTasksStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) WithHTTPClient(client *http.Client) *UpdateDataTieringTasksStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) WithBody(body *models.UpdateDataTieringStateRequest) *UpdateDataTieringTasksStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update data tiering tasks state params -func (o *UpdateDataTieringTasksStateParams) SetBody(body *models.UpdateDataTieringStateRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateDataTieringTasksStateParams) 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/data_tiering/update_data_tiering_tasks_state_responses.go b/v2/client/data_tiering/update_data_tiering_tasks_state_responses.go deleted file mode 100644 index 7f551b29..00000000 --- a/v2/client/data_tiering/update_data_tiering_tasks_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data_tiering - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateDataTieringTasksStateReader is a Reader for the UpdateDataTieringTasksState structure. -type UpdateDataTieringTasksStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateDataTieringTasksStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateDataTieringTasksStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateDataTieringTasksStateDefault(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 - } -} - -// NewUpdateDataTieringTasksStateOK creates a UpdateDataTieringTasksStateOK with default headers values -func NewUpdateDataTieringTasksStateOK() *UpdateDataTieringTasksStateOK { - return &UpdateDataTieringTasksStateOK{} -} - -/* -UpdateDataTieringTasksStateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateDataTieringTasksStateOK struct { - Payload *models.UpdateDataTieringState -} - -// IsSuccess returns true when this update data tiering tasks state o k response has a 2xx status code -func (o *UpdateDataTieringTasksStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update data tiering tasks state o k response has a 3xx status code -func (o *UpdateDataTieringTasksStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update data tiering tasks state o k response has a 4xx status code -func (o *UpdateDataTieringTasksStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update data tiering tasks state o k response has a 5xx status code -func (o *UpdateDataTieringTasksStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update data tiering tasks state o k response a status code equal to that given -func (o *UpdateDataTieringTasksStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update data tiering tasks state o k response -func (o *UpdateDataTieringTasksStateOK) Code() int { - return 200 -} - -func (o *UpdateDataTieringTasksStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/states][%d] updateDataTieringTasksStateOK %s", 200, payload) -} - -func (o *UpdateDataTieringTasksStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/states][%d] updateDataTieringTasksStateOK %s", 200, payload) -} - -func (o *UpdateDataTieringTasksStateOK) GetPayload() *models.UpdateDataTieringState { - return o.Payload -} - -func (o *UpdateDataTieringTasksStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateDataTieringState) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateDataTieringTasksStateDefault creates a UpdateDataTieringTasksStateDefault with default headers values -func NewUpdateDataTieringTasksStateDefault(code int) *UpdateDataTieringTasksStateDefault { - return &UpdateDataTieringTasksStateDefault{ - _statusCode: code, - } -} - -/* -UpdateDataTieringTasksStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateDataTieringTasksStateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update data tiering tasks state default response has a 2xx status code -func (o *UpdateDataTieringTasksStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update data tiering tasks state default response has a 3xx status code -func (o *UpdateDataTieringTasksStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update data tiering tasks state default response has a 4xx status code -func (o *UpdateDataTieringTasksStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update data tiering tasks state default response has a 5xx status code -func (o *UpdateDataTieringTasksStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update data tiering tasks state default response a status code equal to that given -func (o *UpdateDataTieringTasksStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update data tiering tasks state default response -func (o *UpdateDataTieringTasksStateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateDataTieringTasksStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/states][%d] UpdateDataTieringTasksState default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringTasksStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-tiering/tasks/states][%d] UpdateDataTieringTasksState default %s", o._statusCode, payload) -} - -func (o *UpdateDataTieringTasksStateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateDataTieringTasksStateDefault) 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/external_target/create_external_target_parameters.go b/v2/client/external_target/create_external_target_parameters.go deleted file mode 100644 index 28d310c4..00000000 --- a/v2/client/external_target/create_external_target_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateExternalTargetParams creates a new CreateExternalTargetParams 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 NewCreateExternalTargetParams() *CreateExternalTargetParams { - return &CreateExternalTargetParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateExternalTargetParamsWithTimeout creates a new CreateExternalTargetParams object -// with the ability to set a timeout on a request. -func NewCreateExternalTargetParamsWithTimeout(timeout time.Duration) *CreateExternalTargetParams { - return &CreateExternalTargetParams{ - timeout: timeout, - } -} - -// NewCreateExternalTargetParamsWithContext creates a new CreateExternalTargetParams object -// with the ability to set a context for a request. -func NewCreateExternalTargetParamsWithContext(ctx context.Context) *CreateExternalTargetParams { - return &CreateExternalTargetParams{ - Context: ctx, - } -} - -// NewCreateExternalTargetParamsWithHTTPClient creates a new CreateExternalTargetParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateExternalTargetParamsWithHTTPClient(client *http.Client) *CreateExternalTargetParams { - return &CreateExternalTargetParams{ - HTTPClient: client, - } -} - -/* -CreateExternalTargetParams contains all the parameters to send to the API endpoint - - for the create external target operation. - - Typically these are written to a http.Request. -*/ -type CreateExternalTargetParams struct { - - /* Body. - - Specifies the parameters to create a External Target. - */ - Body *models.ExternalTarget - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateExternalTargetParams) WithDefaults() *CreateExternalTargetParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateExternalTargetParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create external target params -func (o *CreateExternalTargetParams) WithTimeout(timeout time.Duration) *CreateExternalTargetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create external target params -func (o *CreateExternalTargetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create external target params -func (o *CreateExternalTargetParams) WithContext(ctx context.Context) *CreateExternalTargetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create external target params -func (o *CreateExternalTargetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create external target params -func (o *CreateExternalTargetParams) WithHTTPClient(client *http.Client) *CreateExternalTargetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create external target params -func (o *CreateExternalTargetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create external target params -func (o *CreateExternalTargetParams) WithBody(body *models.ExternalTarget) *CreateExternalTargetParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create external target params -func (o *CreateExternalTargetParams) SetBody(body *models.ExternalTarget) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateExternalTargetParams) 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/external_target/create_external_target_responses.go b/v2/client/external_target/create_external_target_responses.go deleted file mode 100644 index b3ecd378..00000000 --- a/v2/client/external_target/create_external_target_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateExternalTargetReader is a Reader for the CreateExternalTarget structure. -type CreateExternalTargetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateExternalTargetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateExternalTargetCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateExternalTargetDefault(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 - } -} - -// NewCreateExternalTargetCreated creates a CreateExternalTargetCreated with default headers values -func NewCreateExternalTargetCreated() *CreateExternalTargetCreated { - return &CreateExternalTargetCreated{} -} - -/* -CreateExternalTargetCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateExternalTargetCreated struct { - Payload *models.ExternalTarget -} - -// IsSuccess returns true when this create external target created response has a 2xx status code -func (o *CreateExternalTargetCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create external target created response has a 3xx status code -func (o *CreateExternalTargetCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create external target created response has a 4xx status code -func (o *CreateExternalTargetCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create external target created response has a 5xx status code -func (o *CreateExternalTargetCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create external target created response a status code equal to that given -func (o *CreateExternalTargetCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create external target created response -func (o *CreateExternalTargetCreated) Code() int { - return 201 -} - -func (o *CreateExternalTargetCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/external-targets][%d] createExternalTargetCreated %s", 201, payload) -} - -func (o *CreateExternalTargetCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/external-targets][%d] createExternalTargetCreated %s", 201, payload) -} - -func (o *CreateExternalTargetCreated) GetPayload() *models.ExternalTarget { - return o.Payload -} - -func (o *CreateExternalTargetCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExternalTargetDefault creates a CreateExternalTargetDefault with default headers values -func NewCreateExternalTargetDefault(code int) *CreateExternalTargetDefault { - return &CreateExternalTargetDefault{ - _statusCode: code, - } -} - -/* -CreateExternalTargetDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateExternalTargetDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create external target default response has a 2xx status code -func (o *CreateExternalTargetDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create external target default response has a 3xx status code -func (o *CreateExternalTargetDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create external target default response has a 4xx status code -func (o *CreateExternalTargetDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create external target default response has a 5xx status code -func (o *CreateExternalTargetDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create external target default response a status code equal to that given -func (o *CreateExternalTargetDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create external target default response -func (o *CreateExternalTargetDefault) Code() int { - return o._statusCode -} - -func (o *CreateExternalTargetDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/external-targets][%d] CreateExternalTarget default %s", o._statusCode, payload) -} - -func (o *CreateExternalTargetDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/external-targets][%d] CreateExternalTarget default %s", o._statusCode, payload) -} - -func (o *CreateExternalTargetDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateExternalTargetDefault) 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/external_target/delete_external_target_parameters.go b/v2/client/external_target/delete_external_target_parameters.go deleted file mode 100644 index bf3c8aba..00000000 --- a/v2/client/external_target/delete_external_target_parameters.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" -) - -// NewDeleteExternalTargetParams creates a new DeleteExternalTargetParams 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 NewDeleteExternalTargetParams() *DeleteExternalTargetParams { - return &DeleteExternalTargetParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteExternalTargetParamsWithTimeout creates a new DeleteExternalTargetParams object -// with the ability to set a timeout on a request. -func NewDeleteExternalTargetParamsWithTimeout(timeout time.Duration) *DeleteExternalTargetParams { - return &DeleteExternalTargetParams{ - timeout: timeout, - } -} - -// NewDeleteExternalTargetParamsWithContext creates a new DeleteExternalTargetParams object -// with the ability to set a context for a request. -func NewDeleteExternalTargetParamsWithContext(ctx context.Context) *DeleteExternalTargetParams { - return &DeleteExternalTargetParams{ - Context: ctx, - } -} - -// NewDeleteExternalTargetParamsWithHTTPClient creates a new DeleteExternalTargetParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteExternalTargetParamsWithHTTPClient(client *http.Client) *DeleteExternalTargetParams { - return &DeleteExternalTargetParams{ - HTTPClient: client, - } -} - -/* -DeleteExternalTargetParams contains all the parameters to send to the API endpoint - - for the delete external target operation. - - Typically these are written to a http.Request. -*/ -type DeleteExternalTargetParams struct { - - /* ForceDelete. - - Specifies whether to force delete the External target. - */ - ForceDelete *bool - - /* ID. - - Specifies a unique id of the External Target. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteExternalTargetParams) WithDefaults() *DeleteExternalTargetParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteExternalTargetParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete external target params -func (o *DeleteExternalTargetParams) WithTimeout(timeout time.Duration) *DeleteExternalTargetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete external target params -func (o *DeleteExternalTargetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete external target params -func (o *DeleteExternalTargetParams) WithContext(ctx context.Context) *DeleteExternalTargetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete external target params -func (o *DeleteExternalTargetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete external target params -func (o *DeleteExternalTargetParams) WithHTTPClient(client *http.Client) *DeleteExternalTargetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete external target params -func (o *DeleteExternalTargetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithForceDelete adds the forceDelete to the delete external target params -func (o *DeleteExternalTargetParams) WithForceDelete(forceDelete *bool) *DeleteExternalTargetParams { - o.SetForceDelete(forceDelete) - return o -} - -// SetForceDelete adds the forceDelete to the delete external target params -func (o *DeleteExternalTargetParams) SetForceDelete(forceDelete *bool) { - o.ForceDelete = forceDelete -} - -// WithID adds the id to the delete external target params -func (o *DeleteExternalTargetParams) WithID(id int64) *DeleteExternalTargetParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete external target params -func (o *DeleteExternalTargetParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteExternalTargetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ForceDelete != nil { - - // query param forceDelete - var qrForceDelete bool - - if o.ForceDelete != nil { - qrForceDelete = *o.ForceDelete - } - qForceDelete := swag.FormatBool(qrForceDelete) - if qForceDelete != "" { - - if err := r.SetQueryParam("forceDelete", qForceDelete); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/external_target/delete_external_target_responses.go b/v2/client/external_target/delete_external_target_responses.go deleted file mode 100644 index 2082e984..00000000 --- a/v2/client/external_target/delete_external_target_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteExternalTargetReader is a Reader for the DeleteExternalTarget structure. -type DeleteExternalTargetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteExternalTargetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteExternalTargetNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteExternalTargetDefault(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 - } -} - -// NewDeleteExternalTargetNoContent creates a DeleteExternalTargetNoContent with default headers values -func NewDeleteExternalTargetNoContent() *DeleteExternalTargetNoContent { - return &DeleteExternalTargetNoContent{} -} - -/* -DeleteExternalTargetNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteExternalTargetNoContent struct { -} - -// IsSuccess returns true when this delete external target no content response has a 2xx status code -func (o *DeleteExternalTargetNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete external target no content response has a 3xx status code -func (o *DeleteExternalTargetNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete external target no content response has a 4xx status code -func (o *DeleteExternalTargetNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete external target no content response has a 5xx status code -func (o *DeleteExternalTargetNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete external target no content response a status code equal to that given -func (o *DeleteExternalTargetNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete external target no content response -func (o *DeleteExternalTargetNoContent) Code() int { - return 204 -} - -func (o *DeleteExternalTargetNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-protect/external-targets/{id}][%d] deleteExternalTargetNoContent", 204) -} - -func (o *DeleteExternalTargetNoContent) String() string { - return fmt.Sprintf("[DELETE /data-protect/external-targets/{id}][%d] deleteExternalTargetNoContent", 204) -} - -func (o *DeleteExternalTargetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteExternalTargetDefault creates a DeleteExternalTargetDefault with default headers values -func NewDeleteExternalTargetDefault(code int) *DeleteExternalTargetDefault { - return &DeleteExternalTargetDefault{ - _statusCode: code, - } -} - -/* -DeleteExternalTargetDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteExternalTargetDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete external target default response has a 2xx status code -func (o *DeleteExternalTargetDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete external target default response has a 3xx status code -func (o *DeleteExternalTargetDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete external target default response has a 4xx status code -func (o *DeleteExternalTargetDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete external target default response has a 5xx status code -func (o *DeleteExternalTargetDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete external target default response a status code equal to that given -func (o *DeleteExternalTargetDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete external target default response -func (o *DeleteExternalTargetDefault) Code() int { - return o._statusCode -} - -func (o *DeleteExternalTargetDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/external-targets/{id}][%d] DeleteExternalTarget default %s", o._statusCode, payload) -} - -func (o *DeleteExternalTargetDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/external-targets/{id}][%d] DeleteExternalTarget default %s", o._statusCode, payload) -} - -func (o *DeleteExternalTargetDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteExternalTargetDefault) 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/external_target/external_target_client.go b/v2/client/external_target/external_target_client.go deleted file mode 100644 index 31d0108c..00000000 --- a/v2/client/external_target/external_target_client.go +++ /dev/null @@ -1,467 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new external target API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new external target API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new external target API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for external target API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithAccept allows the client to force the Accept header -// to negotiate a specific Producer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithAccept(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{mime} - } -} - -// WithAcceptApplicationJSON sets the Accept header to "application/json". -func WithAcceptApplicationJSON(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/json"} -} - -// WithAcceptApplicationOctetStream sets the Accept header to "application/octet-stream". -func WithAcceptApplicationOctetStream(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/octet-stream"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - CreateExternalTarget(params *CreateExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateExternalTargetCreated, error) - - DeleteExternalTarget(params *DeleteExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteExternalTargetNoContent, error) - - GetExternalTargetByID(params *GetExternalTargetByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetByIDOK, error) - - GetExternalTargetEncryptionKeyInfo(params *GetExternalTargetEncryptionKeyInfoParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*GetExternalTargetEncryptionKeyInfoOK, error) - - GetExternalTargetMediaInfo(params *GetExternalTargetMediaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetMediaInfoOK, error) - - GetExternalTargetSettings(params *GetExternalTargetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetSettingsOK, error) - - GetExternalTargets(params *GetExternalTargetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetsOK, error) - - UpdateExternalTarget(params *UpdateExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalTargetOK, error) - - UpdateExternalTargetSettings(params *UpdateExternalTargetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalTargetSettingsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateExternalTarget creates a external target - -Create a External Target. -*/ -func (a *Client) CreateExternalTarget(params *CreateExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateExternalTargetCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateExternalTargetParams() - } - op := &runtime.ClientOperation{ - ID: "CreateExternalTarget", - Method: "POST", - PathPattern: "/data-protect/external-targets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateExternalTargetReader{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.(*CreateExternalTargetCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateExternalTargetDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteExternalTarget deletes a external target - -Returns Success if the External Target is deleted. -*/ -func (a *Client) DeleteExternalTarget(params *DeleteExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteExternalTargetNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteExternalTargetParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteExternalTarget", - Method: "DELETE", - PathPattern: "/data-protect/external-targets/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteExternalTargetReader{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.(*DeleteExternalTargetNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteExternalTargetDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalTargetByID lists details about single external target - -Returns the External Target corresponding to the specified Group id. -*/ -func (a *Client) GetExternalTargetByID(params *GetExternalTargetByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalTargetByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalTargetById", - Method: "GET", - PathPattern: "/data-protect/external-targets/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalTargetByIDReader{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.(*GetExternalTargetByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalTargetByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalTargetEncryptionKeyInfo gets the encryption key info for an external target - -Get the encryption key info for an external target -*/ -func (a *Client) GetExternalTargetEncryptionKeyInfo(params *GetExternalTargetEncryptionKeyInfoParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*GetExternalTargetEncryptionKeyInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalTargetEncryptionKeyInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalTargetEncryptionKeyInfo", - Method: "GET", - PathPattern: "/data-protect/external-targets/{id}/encryption-key", - ProducesMediaTypes: []string{"application/octet-stream"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalTargetEncryptionKeyInfoReader{formats: a.formats, writer: writer}, - 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.(*GetExternalTargetEncryptionKeyInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalTargetEncryptionKeyInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalTargetMediaInfo lists archive media information - -Returns the media information about the specified archive service uid (such as a QStar tape archive service). -*/ -func (a *Client) GetExternalTargetMediaInfo(params *GetExternalTargetMediaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetMediaInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalTargetMediaInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalTargetMediaInfo", - Method: "GET", - PathPattern: "/data-protect/external-targets/media-info", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalTargetMediaInfoReader{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.(*GetExternalTargetMediaInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalTargetMediaInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalTargetSettings gets the list of external target settings - -Get the list of External Target Settings -*/ -func (a *Client) GetExternalTargetSettings(params *GetExternalTargetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalTargetSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalTargetSettings", - Method: "GET", - PathPattern: "/data-protect/external-targets/settings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalTargetSettingsReader{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.(*GetExternalTargetSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalTargetSettingsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetExternalTargets gets the list of external targets - -Get the list of External Targets. -*/ -func (a *Client) GetExternalTargets(params *GetExternalTargetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetExternalTargetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetExternalTargetsParams() - } - op := &runtime.ClientOperation{ - ID: "GetExternalTargets", - Method: "GET", - PathPattern: "/data-protect/external-targets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetExternalTargetsReader{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.(*GetExternalTargetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetExternalTargetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateExternalTarget updates a external target - -Update the specified External Target. -*/ -func (a *Client) UpdateExternalTarget(params *UpdateExternalTargetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalTargetOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateExternalTargetParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateExternalTarget", - Method: "PUT", - PathPattern: "/data-protect/external-targets/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateExternalTargetReader{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.(*UpdateExternalTargetOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateExternalTargetDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateExternalTargetSettings updates external target settings - -Update External Target Settings -*/ -func (a *Client) UpdateExternalTargetSettings(params *UpdateExternalTargetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateExternalTargetSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateExternalTargetSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateExternalTargetSettings", - Method: "PUT", - PathPattern: "/data-protect/external-targets/settings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateExternalTargetSettingsReader{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.(*UpdateExternalTargetSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateExternalTargetSettingsDefault) - 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/v2/client/external_target/get_external_target_by_id_parameters.go b/v2/client/external_target/get_external_target_by_id_parameters.go deleted file mode 100644 index 1654452b..00000000 --- a/v2/client/external_target/get_external_target_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" -) - -// NewGetExternalTargetByIDParams creates a new GetExternalTargetByIDParams 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 NewGetExternalTargetByIDParams() *GetExternalTargetByIDParams { - return &GetExternalTargetByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalTargetByIDParamsWithTimeout creates a new GetExternalTargetByIDParams object -// with the ability to set a timeout on a request. -func NewGetExternalTargetByIDParamsWithTimeout(timeout time.Duration) *GetExternalTargetByIDParams { - return &GetExternalTargetByIDParams{ - timeout: timeout, - } -} - -// NewGetExternalTargetByIDParamsWithContext creates a new GetExternalTargetByIDParams object -// with the ability to set a context for a request. -func NewGetExternalTargetByIDParamsWithContext(ctx context.Context) *GetExternalTargetByIDParams { - return &GetExternalTargetByIDParams{ - Context: ctx, - } -} - -// NewGetExternalTargetByIDParamsWithHTTPClient creates a new GetExternalTargetByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalTargetByIDParamsWithHTTPClient(client *http.Client) *GetExternalTargetByIDParams { - return &GetExternalTargetByIDParams{ - HTTPClient: client, - } -} - -/* -GetExternalTargetByIDParams contains all the parameters to send to the API endpoint - - for the get external target by Id operation. - - Typically these are written to a http.Request. -*/ -type GetExternalTargetByIDParams struct { - - /* ID. - - Specifies a unique id of the External Target. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external target by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetByIDParams) WithDefaults() *GetExternalTargetByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external target by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external target by Id params -func (o *GetExternalTargetByIDParams) WithTimeout(timeout time.Duration) *GetExternalTargetByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external target by Id params -func (o *GetExternalTargetByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external target by Id params -func (o *GetExternalTargetByIDParams) WithContext(ctx context.Context) *GetExternalTargetByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external target by Id params -func (o *GetExternalTargetByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external target by Id params -func (o *GetExternalTargetByIDParams) WithHTTPClient(client *http.Client) *GetExternalTargetByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external target by Id params -func (o *GetExternalTargetByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get external target by Id params -func (o *GetExternalTargetByIDParams) WithID(id int64) *GetExternalTargetByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get external target by Id params -func (o *GetExternalTargetByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalTargetByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/external_target/get_external_target_by_id_responses.go b/v2/client/external_target/get_external_target_by_id_responses.go deleted file mode 100644 index 854ea2aa..00000000 --- a/v2/client/external_target/get_external_target_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetExternalTargetByIDReader is a Reader for the GetExternalTargetByID structure. -type GetExternalTargetByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalTargetByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalTargetByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalTargetByIDDefault(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 - } -} - -// NewGetExternalTargetByIDOK creates a GetExternalTargetByIDOK with default headers values -func NewGetExternalTargetByIDOK() *GetExternalTargetByIDOK { - return &GetExternalTargetByIDOK{} -} - -/* -GetExternalTargetByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalTargetByIDOK struct { - Payload *models.ExternalTarget -} - -// IsSuccess returns true when this get external target by Id o k response has a 2xx status code -func (o *GetExternalTargetByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external target by Id o k response has a 3xx status code -func (o *GetExternalTargetByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external target by Id o k response has a 4xx status code -func (o *GetExternalTargetByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external target by Id o k response has a 5xx status code -func (o *GetExternalTargetByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external target by Id o k response a status code equal to that given -func (o *GetExternalTargetByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external target by Id o k response -func (o *GetExternalTargetByIDOK) Code() int { - return 200 -} - -func (o *GetExternalTargetByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}][%d] getExternalTargetByIdOK %s", 200, payload) -} - -func (o *GetExternalTargetByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}][%d] getExternalTargetByIdOK %s", 200, payload) -} - -func (o *GetExternalTargetByIDOK) GetPayload() *models.ExternalTarget { - return o.Payload -} - -func (o *GetExternalTargetByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalTargetByIDDefault creates a GetExternalTargetByIDDefault with default headers values -func NewGetExternalTargetByIDDefault(code int) *GetExternalTargetByIDDefault { - return &GetExternalTargetByIDDefault{ - _statusCode: code, - } -} - -/* -GetExternalTargetByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalTargetByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get external target by Id default response has a 2xx status code -func (o *GetExternalTargetByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external target by Id default response has a 3xx status code -func (o *GetExternalTargetByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external target by Id default response has a 4xx status code -func (o *GetExternalTargetByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external target by Id default response has a 5xx status code -func (o *GetExternalTargetByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external target by Id default response a status code equal to that given -func (o *GetExternalTargetByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external target by Id default response -func (o *GetExternalTargetByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalTargetByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}][%d] GetExternalTargetById default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}][%d] GetExternalTargetById default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetExternalTargetByIDDefault) 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/external_target/get_external_target_encryption_key_info_parameters.go b/v2/client/external_target/get_external_target_encryption_key_info_parameters.go deleted file mode 100644 index f3b9e9d8..00000000 --- a/v2/client/external_target/get_external_target_encryption_key_info_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" -) - -// NewGetExternalTargetEncryptionKeyInfoParams creates a new GetExternalTargetEncryptionKeyInfoParams 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 NewGetExternalTargetEncryptionKeyInfoParams() *GetExternalTargetEncryptionKeyInfoParams { - return &GetExternalTargetEncryptionKeyInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalTargetEncryptionKeyInfoParamsWithTimeout creates a new GetExternalTargetEncryptionKeyInfoParams object -// with the ability to set a timeout on a request. -func NewGetExternalTargetEncryptionKeyInfoParamsWithTimeout(timeout time.Duration) *GetExternalTargetEncryptionKeyInfoParams { - return &GetExternalTargetEncryptionKeyInfoParams{ - timeout: timeout, - } -} - -// NewGetExternalTargetEncryptionKeyInfoParamsWithContext creates a new GetExternalTargetEncryptionKeyInfoParams object -// with the ability to set a context for a request. -func NewGetExternalTargetEncryptionKeyInfoParamsWithContext(ctx context.Context) *GetExternalTargetEncryptionKeyInfoParams { - return &GetExternalTargetEncryptionKeyInfoParams{ - Context: ctx, - } -} - -// NewGetExternalTargetEncryptionKeyInfoParamsWithHTTPClient creates a new GetExternalTargetEncryptionKeyInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalTargetEncryptionKeyInfoParamsWithHTTPClient(client *http.Client) *GetExternalTargetEncryptionKeyInfoParams { - return &GetExternalTargetEncryptionKeyInfoParams{ - HTTPClient: client, - } -} - -/* -GetExternalTargetEncryptionKeyInfoParams contains all the parameters to send to the API endpoint - - for the get external target encryption key info operation. - - Typically these are written to a http.Request. -*/ -type GetExternalTargetEncryptionKeyInfoParams struct { - - /* ID. - - Specifies the id of the External Target. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external target encryption key info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetEncryptionKeyInfoParams) WithDefaults() *GetExternalTargetEncryptionKeyInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external target encryption key info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetEncryptionKeyInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) WithTimeout(timeout time.Duration) *GetExternalTargetEncryptionKeyInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) WithContext(ctx context.Context) *GetExternalTargetEncryptionKeyInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) WithHTTPClient(client *http.Client) *GetExternalTargetEncryptionKeyInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) WithID(id int64) *GetExternalTargetEncryptionKeyInfoParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get external target encryption key info params -func (o *GetExternalTargetEncryptionKeyInfoParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalTargetEncryptionKeyInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/external_target/get_external_target_encryption_key_info_responses.go b/v2/client/external_target/get_external_target_encryption_key_info_responses.go deleted file mode 100644 index 7e8e59a5..00000000 --- a/v2/client/external_target/get_external_target_encryption_key_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetExternalTargetEncryptionKeyInfoReader is a Reader for the GetExternalTargetEncryptionKeyInfo structure. -type GetExternalTargetEncryptionKeyInfoReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalTargetEncryptionKeyInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalTargetEncryptionKeyInfoOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalTargetEncryptionKeyInfoDefault(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 - } -} - -// NewGetExternalTargetEncryptionKeyInfoOK creates a GetExternalTargetEncryptionKeyInfoOK with default headers values -func NewGetExternalTargetEncryptionKeyInfoOK(writer io.Writer) *GetExternalTargetEncryptionKeyInfoOK { - return &GetExternalTargetEncryptionKeyInfoOK{ - - Payload: writer, - } -} - -/* -GetExternalTargetEncryptionKeyInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalTargetEncryptionKeyInfoOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this get external target encryption key info o k response has a 2xx status code -func (o *GetExternalTargetEncryptionKeyInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external target encryption key info o k response has a 3xx status code -func (o *GetExternalTargetEncryptionKeyInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external target encryption key info o k response has a 4xx status code -func (o *GetExternalTargetEncryptionKeyInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external target encryption key info o k response has a 5xx status code -func (o *GetExternalTargetEncryptionKeyInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external target encryption key info o k response a status code equal to that given -func (o *GetExternalTargetEncryptionKeyInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external target encryption key info o k response -func (o *GetExternalTargetEncryptionKeyInfoOK) Code() int { - return 200 -} - -func (o *GetExternalTargetEncryptionKeyInfoOK) Error() string { - return fmt.Sprintf("[GET /data-protect/external-targets/{id}/encryption-key][%d] getExternalTargetEncryptionKeyInfoOK", 200) -} - -func (o *GetExternalTargetEncryptionKeyInfoOK) String() string { - return fmt.Sprintf("[GET /data-protect/external-targets/{id}/encryption-key][%d] getExternalTargetEncryptionKeyInfoOK", 200) -} - -func (o *GetExternalTargetEncryptionKeyInfoOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *GetExternalTargetEncryptionKeyInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalTargetEncryptionKeyInfoDefault creates a GetExternalTargetEncryptionKeyInfoDefault with default headers values -func NewGetExternalTargetEncryptionKeyInfoDefault(code int) *GetExternalTargetEncryptionKeyInfoDefault { - return &GetExternalTargetEncryptionKeyInfoDefault{ - _statusCode: code, - } -} - -/* -GetExternalTargetEncryptionKeyInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalTargetEncryptionKeyInfoDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get external target encryption key info default response has a 2xx status code -func (o *GetExternalTargetEncryptionKeyInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external target encryption key info default response has a 3xx status code -func (o *GetExternalTargetEncryptionKeyInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external target encryption key info default response has a 4xx status code -func (o *GetExternalTargetEncryptionKeyInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external target encryption key info default response has a 5xx status code -func (o *GetExternalTargetEncryptionKeyInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external target encryption key info default response a status code equal to that given -func (o *GetExternalTargetEncryptionKeyInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external target encryption key info default response -func (o *GetExternalTargetEncryptionKeyInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalTargetEncryptionKeyInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}/encryption-key][%d] GetExternalTargetEncryptionKeyInfo default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetEncryptionKeyInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/{id}/encryption-key][%d] GetExternalTargetEncryptionKeyInfo default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetEncryptionKeyInfoDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetExternalTargetEncryptionKeyInfoDefault) 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/external_target/get_external_target_media_info_parameters.go b/v2/client/external_target/get_external_target_media_info_parameters.go deleted file mode 100644 index 18dc630f..00000000 --- a/v2/client/external_target/get_external_target_media_info_parameters.go +++ /dev/null @@ -1,298 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" -) - -// NewGetExternalTargetMediaInfoParams creates a new GetExternalTargetMediaInfoParams 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 NewGetExternalTargetMediaInfoParams() *GetExternalTargetMediaInfoParams { - return &GetExternalTargetMediaInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalTargetMediaInfoParamsWithTimeout creates a new GetExternalTargetMediaInfoParams object -// with the ability to set a timeout on a request. -func NewGetExternalTargetMediaInfoParamsWithTimeout(timeout time.Duration) *GetExternalTargetMediaInfoParams { - return &GetExternalTargetMediaInfoParams{ - timeout: timeout, - } -} - -// NewGetExternalTargetMediaInfoParamsWithContext creates a new GetExternalTargetMediaInfoParams object -// with the ability to set a context for a request. -func NewGetExternalTargetMediaInfoParamsWithContext(ctx context.Context) *GetExternalTargetMediaInfoParams { - return &GetExternalTargetMediaInfoParams{ - Context: ctx, - } -} - -// NewGetExternalTargetMediaInfoParamsWithHTTPClient creates a new GetExternalTargetMediaInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalTargetMediaInfoParamsWithHTTPClient(client *http.Client) *GetExternalTargetMediaInfoParams { - return &GetExternalTargetMediaInfoParams{ - HTTPClient: client, - } -} - -/* -GetExternalTargetMediaInfoParams contains all the parameters to send to the API endpoint - - for the get external target media info operation. - - Typically these are written to a http.Request. -*/ -type GetExternalTargetMediaInfoParams struct { - - /* ArchivalJobID. - - Specifies the id of the Job that archived to a QStar media Vault. - - Format: int64 - */ - ArchivalJobID int64 - - /* ClusterID. - - Specifies the id of the Cohesity cluster which archived to a QStart media target. - - Format: int64 - */ - ClusterID int64 - - /* ClusterIncarnationID. - - Specifies the incarnation Id of the Cohesity cluster which archived to a QStart media target. - - Format: int64 - */ - ClusterIncarnationID int64 - - /* EntityIds. - - Specifies an array of entityIds to optionally filter by. An entityId is a unique id for a VM assigned by the Cohesity Cluster. - */ - EntityIds []int64 - - /* RestoreTaskID. - - Specifies the id of the restore task to optionally filter by. - - Format: int64 - */ - RestoreTaskID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external target media info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetMediaInfoParams) WithDefaults() *GetExternalTargetMediaInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external target media info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetMediaInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithTimeout(timeout time.Duration) *GetExternalTargetMediaInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithContext(ctx context.Context) *GetExternalTargetMediaInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithHTTPClient(client *http.Client) *GetExternalTargetMediaInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArchivalJobID adds the archivalJobID to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithArchivalJobID(archivalJobID int64) *GetExternalTargetMediaInfoParams { - o.SetArchivalJobID(archivalJobID) - return o -} - -// SetArchivalJobID adds the archivalJobId to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetArchivalJobID(archivalJobID int64) { - o.ArchivalJobID = archivalJobID -} - -// WithClusterID adds the clusterID to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithClusterID(clusterID int64) *GetExternalTargetMediaInfoParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WithClusterIncarnationID adds the clusterIncarnationID to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithClusterIncarnationID(clusterIncarnationID int64) *GetExternalTargetMediaInfoParams { - o.SetClusterIncarnationID(clusterIncarnationID) - return o -} - -// SetClusterIncarnationID adds the clusterIncarnationId to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetClusterIncarnationID(clusterIncarnationID int64) { - o.ClusterIncarnationID = clusterIncarnationID -} - -// WithEntityIds adds the entityIds to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithEntityIds(entityIds []int64) *GetExternalTargetMediaInfoParams { - o.SetEntityIds(entityIds) - return o -} - -// SetEntityIds adds the entityIds to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetEntityIds(entityIds []int64) { - o.EntityIds = entityIds -} - -// WithRestoreTaskID adds the restoreTaskID to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) WithRestoreTaskID(restoreTaskID *int64) *GetExternalTargetMediaInfoParams { - o.SetRestoreTaskID(restoreTaskID) - return o -} - -// SetRestoreTaskID adds the restoreTaskId to the get external target media info params -func (o *GetExternalTargetMediaInfoParams) SetRestoreTaskID(restoreTaskID *int64) { - o.RestoreTaskID = restoreTaskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalTargetMediaInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param archivalJobId - qrArchivalJobID := o.ArchivalJobID - qArchivalJobID := swag.FormatInt64(qrArchivalJobID) - if qArchivalJobID != "" { - - if err := r.SetQueryParam("archivalJobId", qArchivalJobID); err != nil { - return err - } - } - - // query param clusterId - qrClusterID := o.ClusterID - qClusterID := swag.FormatInt64(qrClusterID) - if qClusterID != "" { - - if err := r.SetQueryParam("clusterId", qClusterID); err != nil { - return err - } - } - - // query param clusterIncarnationId - qrClusterIncarnationID := o.ClusterIncarnationID - qClusterIncarnationID := swag.FormatInt64(qrClusterIncarnationID) - if qClusterIncarnationID != "" { - - if err := r.SetQueryParam("clusterIncarnationId", qClusterIncarnationID); err != nil { - return err - } - } - - if o.EntityIds != nil { - - // binding items for entityIds - joinedEntityIds := o.bindParamEntityIds(reg) - - // query array param entityIds - if err := r.SetQueryParam("entityIds", joinedEntityIds...); err != nil { - return err - } - } - - if o.RestoreTaskID != nil { - - // query param restoreTaskId - var qrRestoreTaskID int64 - - if o.RestoreTaskID != nil { - qrRestoreTaskID = *o.RestoreTaskID - } - qRestoreTaskID := swag.FormatInt64(qrRestoreTaskID) - if qRestoreTaskID != "" { - - if err := r.SetQueryParam("restoreTaskId", qRestoreTaskID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetExternalTargetMediaInfo binds the parameter entityIds -func (o *GetExternalTargetMediaInfoParams) bindParamEntityIds(formats strfmt.Registry) []string { - entityIdsIR := o.EntityIds - - var entityIdsIC []string - for _, entityIdsIIR := range entityIdsIR { // explode []int64 - - entityIdsIIV := swag.FormatInt64(entityIdsIIR) // int64 as string - entityIdsIC = append(entityIdsIC, entityIdsIIV) - } - - // items.CollectionFormat: "" - entityIdsIS := swag.JoinByFormat(entityIdsIC, "") - - return entityIdsIS -} diff --git a/v2/client/external_target/get_external_target_media_info_responses.go b/v2/client/external_target/get_external_target_media_info_responses.go deleted file mode 100644 index d4671077..00000000 --- a/v2/client/external_target/get_external_target_media_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetExternalTargetMediaInfoReader is a Reader for the GetExternalTargetMediaInfo structure. -type GetExternalTargetMediaInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalTargetMediaInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalTargetMediaInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalTargetMediaInfoDefault(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 - } -} - -// NewGetExternalTargetMediaInfoOK creates a GetExternalTargetMediaInfoOK with default headers values -func NewGetExternalTargetMediaInfoOK() *GetExternalTargetMediaInfoOK { - return &GetExternalTargetMediaInfoOK{} -} - -/* -GetExternalTargetMediaInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalTargetMediaInfoOK struct { - Payload *models.ArchivalMediaInfo -} - -// IsSuccess returns true when this get external target media info o k response has a 2xx status code -func (o *GetExternalTargetMediaInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external target media info o k response has a 3xx status code -func (o *GetExternalTargetMediaInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external target media info o k response has a 4xx status code -func (o *GetExternalTargetMediaInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external target media info o k response has a 5xx status code -func (o *GetExternalTargetMediaInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external target media info o k response a status code equal to that given -func (o *GetExternalTargetMediaInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external target media info o k response -func (o *GetExternalTargetMediaInfoOK) Code() int { - return 200 -} - -func (o *GetExternalTargetMediaInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/media-info][%d] getExternalTargetMediaInfoOK %s", 200, payload) -} - -func (o *GetExternalTargetMediaInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/media-info][%d] getExternalTargetMediaInfoOK %s", 200, payload) -} - -func (o *GetExternalTargetMediaInfoOK) GetPayload() *models.ArchivalMediaInfo { - return o.Payload -} - -func (o *GetExternalTargetMediaInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ArchivalMediaInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalTargetMediaInfoDefault creates a GetExternalTargetMediaInfoDefault with default headers values -func NewGetExternalTargetMediaInfoDefault(code int) *GetExternalTargetMediaInfoDefault { - return &GetExternalTargetMediaInfoDefault{ - _statusCode: code, - } -} - -/* -GetExternalTargetMediaInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalTargetMediaInfoDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get external target media info default response has a 2xx status code -func (o *GetExternalTargetMediaInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external target media info default response has a 3xx status code -func (o *GetExternalTargetMediaInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external target media info default response has a 4xx status code -func (o *GetExternalTargetMediaInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external target media info default response has a 5xx status code -func (o *GetExternalTargetMediaInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external target media info default response a status code equal to that given -func (o *GetExternalTargetMediaInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external target media info default response -func (o *GetExternalTargetMediaInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalTargetMediaInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/media-info][%d] GetExternalTargetMediaInfo default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetMediaInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/media-info][%d] GetExternalTargetMediaInfo default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetMediaInfoDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetExternalTargetMediaInfoDefault) 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/external_target/get_external_target_settings_parameters.go b/v2/client/external_target/get_external_target_settings_parameters.go deleted file mode 100644 index 8fd0b426..00000000 --- a/v2/client/external_target/get_external_target_settings_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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" -) - -// NewGetExternalTargetSettingsParams creates a new GetExternalTargetSettingsParams 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 NewGetExternalTargetSettingsParams() *GetExternalTargetSettingsParams { - return &GetExternalTargetSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalTargetSettingsParamsWithTimeout creates a new GetExternalTargetSettingsParams object -// with the ability to set a timeout on a request. -func NewGetExternalTargetSettingsParamsWithTimeout(timeout time.Duration) *GetExternalTargetSettingsParams { - return &GetExternalTargetSettingsParams{ - timeout: timeout, - } -} - -// NewGetExternalTargetSettingsParamsWithContext creates a new GetExternalTargetSettingsParams object -// with the ability to set a context for a request. -func NewGetExternalTargetSettingsParamsWithContext(ctx context.Context) *GetExternalTargetSettingsParams { - return &GetExternalTargetSettingsParams{ - Context: ctx, - } -} - -// NewGetExternalTargetSettingsParamsWithHTTPClient creates a new GetExternalTargetSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalTargetSettingsParamsWithHTTPClient(client *http.Client) *GetExternalTargetSettingsParams { - return &GetExternalTargetSettingsParams{ - HTTPClient: client, - } -} - -/* -GetExternalTargetSettingsParams contains all the parameters to send to the API endpoint - - for the get external target settings operation. - - Typically these are written to a http.Request. -*/ -type GetExternalTargetSettingsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external target settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetSettingsParams) WithDefaults() *GetExternalTargetSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external target settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external target settings params -func (o *GetExternalTargetSettingsParams) WithTimeout(timeout time.Duration) *GetExternalTargetSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external target settings params -func (o *GetExternalTargetSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external target settings params -func (o *GetExternalTargetSettingsParams) WithContext(ctx context.Context) *GetExternalTargetSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external target settings params -func (o *GetExternalTargetSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external target settings params -func (o *GetExternalTargetSettingsParams) WithHTTPClient(client *http.Client) *GetExternalTargetSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external target settings params -func (o *GetExternalTargetSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalTargetSettingsParams) 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/external_target/get_external_target_settings_responses.go b/v2/client/external_target/get_external_target_settings_responses.go deleted file mode 100644 index a3ae9071..00000000 --- a/v2/client/external_target/get_external_target_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetExternalTargetSettingsReader is a Reader for the GetExternalTargetSettings structure. -type GetExternalTargetSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalTargetSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalTargetSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalTargetSettingsDefault(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 - } -} - -// NewGetExternalTargetSettingsOK creates a GetExternalTargetSettingsOK with default headers values -func NewGetExternalTargetSettingsOK() *GetExternalTargetSettingsOK { - return &GetExternalTargetSettingsOK{} -} - -/* -GetExternalTargetSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalTargetSettingsOK struct { - Payload *models.ExternalTarget -} - -// IsSuccess returns true when this get external target settings o k response has a 2xx status code -func (o *GetExternalTargetSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external target settings o k response has a 3xx status code -func (o *GetExternalTargetSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external target settings o k response has a 4xx status code -func (o *GetExternalTargetSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external target settings o k response has a 5xx status code -func (o *GetExternalTargetSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external target settings o k response a status code equal to that given -func (o *GetExternalTargetSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external target settings o k response -func (o *GetExternalTargetSettingsOK) Code() int { - return 200 -} - -func (o *GetExternalTargetSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/settings][%d] getExternalTargetSettingsOK %s", 200, payload) -} - -func (o *GetExternalTargetSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/settings][%d] getExternalTargetSettingsOK %s", 200, payload) -} - -func (o *GetExternalTargetSettingsOK) GetPayload() *models.ExternalTarget { - return o.Payload -} - -func (o *GetExternalTargetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalTargetSettingsDefault creates a GetExternalTargetSettingsDefault with default headers values -func NewGetExternalTargetSettingsDefault(code int) *GetExternalTargetSettingsDefault { - return &GetExternalTargetSettingsDefault{ - _statusCode: code, - } -} - -/* -GetExternalTargetSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalTargetSettingsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get external target settings default response has a 2xx status code -func (o *GetExternalTargetSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external target settings default response has a 3xx status code -func (o *GetExternalTargetSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external target settings default response has a 4xx status code -func (o *GetExternalTargetSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external target settings default response has a 5xx status code -func (o *GetExternalTargetSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external target settings default response a status code equal to that given -func (o *GetExternalTargetSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external target settings default response -func (o *GetExternalTargetSettingsDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalTargetSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/settings][%d] GetExternalTargetSettings default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets/settings][%d] GetExternalTargetSettings default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetSettingsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetExternalTargetSettingsDefault) 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/external_target/get_external_targets_parameters.go b/v2/client/external_target/get_external_targets_parameters.go deleted file mode 100644 index 7b57b213..00000000 --- a/v2/client/external_target/get_external_targets_parameters.go +++ /dev/null @@ -1,445 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" -) - -// NewGetExternalTargetsParams creates a new GetExternalTargetsParams 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 NewGetExternalTargetsParams() *GetExternalTargetsParams { - return &GetExternalTargetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetExternalTargetsParamsWithTimeout creates a new GetExternalTargetsParams object -// with the ability to set a timeout on a request. -func NewGetExternalTargetsParamsWithTimeout(timeout time.Duration) *GetExternalTargetsParams { - return &GetExternalTargetsParams{ - timeout: timeout, - } -} - -// NewGetExternalTargetsParamsWithContext creates a new GetExternalTargetsParams object -// with the ability to set a context for a request. -func NewGetExternalTargetsParamsWithContext(ctx context.Context) *GetExternalTargetsParams { - return &GetExternalTargetsParams{ - Context: ctx, - } -} - -// NewGetExternalTargetsParamsWithHTTPClient creates a new GetExternalTargetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetExternalTargetsParamsWithHTTPClient(client *http.Client) *GetExternalTargetsParams { - return &GetExternalTargetsParams{ - HTTPClient: client, - } -} - -/* -GetExternalTargetsParams contains all the parameters to send to the API endpoint - - for the get external targets operation. - - Typically these are written to a http.Request. -*/ -type GetExternalTargetsParams struct { - - /* GlobalIds. - - Filter by a list of External Target global ids. - */ - GlobalIds []string - - /* Ids. - - Filter by a list of External Target ids. - */ - Ids []int64 - - /* Names. - - Filter by a list of External Target names. - */ - Names []string - - /* OwnershipContexts. - - Specifies whether how this external target is being consumed either Local or FortKnox. - */ - OwnershipContexts []string - - /* PurposeTypes. - - Filter by a list of External Target purpose types. - */ - PurposeTypes []string - - /* StorageClasses. - - Filter by a list of External Target storage classes. - */ - StorageClasses []string - - /* StorageTypes. - - Filter by a list of External Target storage types. Nas option in archival_target_storage_type will soon be deprecated. Please use NAS instead. - */ - StorageTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get external targets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetsParams) WithDefaults() *GetExternalTargetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get external targets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetExternalTargetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get external targets params -func (o *GetExternalTargetsParams) WithTimeout(timeout time.Duration) *GetExternalTargetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get external targets params -func (o *GetExternalTargetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get external targets params -func (o *GetExternalTargetsParams) WithContext(ctx context.Context) *GetExternalTargetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get external targets params -func (o *GetExternalTargetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get external targets params -func (o *GetExternalTargetsParams) WithHTTPClient(client *http.Client) *GetExternalTargetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get external targets params -func (o *GetExternalTargetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithGlobalIds adds the globalIds to the get external targets params -func (o *GetExternalTargetsParams) WithGlobalIds(globalIds []string) *GetExternalTargetsParams { - o.SetGlobalIds(globalIds) - return o -} - -// SetGlobalIds adds the globalIds to the get external targets params -func (o *GetExternalTargetsParams) SetGlobalIds(globalIds []string) { - o.GlobalIds = globalIds -} - -// WithIds adds the ids to the get external targets params -func (o *GetExternalTargetsParams) WithIds(ids []int64) *GetExternalTargetsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get external targets params -func (o *GetExternalTargetsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithNames adds the names to the get external targets params -func (o *GetExternalTargetsParams) WithNames(names []string) *GetExternalTargetsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get external targets params -func (o *GetExternalTargetsParams) SetNames(names []string) { - o.Names = names -} - -// WithOwnershipContexts adds the ownershipContexts to the get external targets params -func (o *GetExternalTargetsParams) WithOwnershipContexts(ownershipContexts []string) *GetExternalTargetsParams { - o.SetOwnershipContexts(ownershipContexts) - return o -} - -// SetOwnershipContexts adds the ownershipContexts to the get external targets params -func (o *GetExternalTargetsParams) SetOwnershipContexts(ownershipContexts []string) { - o.OwnershipContexts = ownershipContexts -} - -// WithPurposeTypes adds the purposeTypes to the get external targets params -func (o *GetExternalTargetsParams) WithPurposeTypes(purposeTypes []string) *GetExternalTargetsParams { - o.SetPurposeTypes(purposeTypes) - return o -} - -// SetPurposeTypes adds the purposeTypes to the get external targets params -func (o *GetExternalTargetsParams) SetPurposeTypes(purposeTypes []string) { - o.PurposeTypes = purposeTypes -} - -// WithStorageClasses adds the storageClasses to the get external targets params -func (o *GetExternalTargetsParams) WithStorageClasses(storageClasses []string) *GetExternalTargetsParams { - o.SetStorageClasses(storageClasses) - return o -} - -// SetStorageClasses adds the storageClasses to the get external targets params -func (o *GetExternalTargetsParams) SetStorageClasses(storageClasses []string) { - o.StorageClasses = storageClasses -} - -// WithStorageTypes adds the storageTypes to the get external targets params -func (o *GetExternalTargetsParams) WithStorageTypes(storageTypes []string) *GetExternalTargetsParams { - o.SetStorageTypes(storageTypes) - return o -} - -// SetStorageTypes adds the storageTypes to the get external targets params -func (o *GetExternalTargetsParams) SetStorageTypes(storageTypes []string) { - o.StorageTypes = storageTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExternalTargetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.GlobalIds != nil { - - // binding items for globalIds - joinedGlobalIds := o.bindParamGlobalIds(reg) - - // query array param globalIds - if err := r.SetQueryParam("globalIds", joinedGlobalIds...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.OwnershipContexts != nil { - - // binding items for ownershipContexts - joinedOwnershipContexts := o.bindParamOwnershipContexts(reg) - - // query array param ownershipContexts - if err := r.SetQueryParam("ownershipContexts", joinedOwnershipContexts...); err != nil { - return err - } - } - - if o.PurposeTypes != nil { - - // binding items for purposeTypes - joinedPurposeTypes := o.bindParamPurposeTypes(reg) - - // query array param purposeTypes - if err := r.SetQueryParam("purposeTypes", joinedPurposeTypes...); err != nil { - return err - } - } - - if o.StorageClasses != nil { - - // binding items for storageClasses - joinedStorageClasses := o.bindParamStorageClasses(reg) - - // query array param storageClasses - if err := r.SetQueryParam("storageClasses", joinedStorageClasses...); err != nil { - return err - } - } - - if o.StorageTypes != nil { - - // binding items for storageTypes - joinedStorageTypes := o.bindParamStorageTypes(reg) - - // query array param storageTypes - if err := r.SetQueryParam("storageTypes", joinedStorageTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetExternalTargets binds the parameter globalIds -func (o *GetExternalTargetsParams) bindParamGlobalIds(formats strfmt.Registry) []string { - globalIdsIR := o.GlobalIds - - var globalIdsIC []string - for _, globalIdsIIR := range globalIdsIR { // explode []string - - globalIdsIIV := globalIdsIIR // string as string - globalIdsIC = append(globalIdsIC, globalIdsIIV) - } - - // items.CollectionFormat: "" - globalIdsIS := swag.JoinByFormat(globalIdsIC, "") - - return globalIdsIS -} - -// bindParamGetExternalTargets binds the parameter ids -func (o *GetExternalTargetsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetExternalTargets binds the parameter names -func (o *GetExternalTargetsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetExternalTargets binds the parameter ownershipContexts -func (o *GetExternalTargetsParams) bindParamOwnershipContexts(formats strfmt.Registry) []string { - ownershipContextsIR := o.OwnershipContexts - - var ownershipContextsIC []string - for _, ownershipContextsIIR := range ownershipContextsIR { // explode []string - - ownershipContextsIIV := ownershipContextsIIR // string as string - ownershipContextsIC = append(ownershipContextsIC, ownershipContextsIIV) - } - - // items.CollectionFormat: "" - ownershipContextsIS := swag.JoinByFormat(ownershipContextsIC, "") - - return ownershipContextsIS -} - -// bindParamGetExternalTargets binds the parameter purposeTypes -func (o *GetExternalTargetsParams) bindParamPurposeTypes(formats strfmt.Registry) []string { - purposeTypesIR := o.PurposeTypes - - var purposeTypesIC []string - for _, purposeTypesIIR := range purposeTypesIR { // explode []string - - purposeTypesIIV := purposeTypesIIR // string as string - purposeTypesIC = append(purposeTypesIC, purposeTypesIIV) - } - - // items.CollectionFormat: "" - purposeTypesIS := swag.JoinByFormat(purposeTypesIC, "") - - return purposeTypesIS -} - -// bindParamGetExternalTargets binds the parameter storageClasses -func (o *GetExternalTargetsParams) bindParamStorageClasses(formats strfmt.Registry) []string { - storageClassesIR := o.StorageClasses - - var storageClassesIC []string - for _, storageClassesIIR := range storageClassesIR { // explode []string - - storageClassesIIV := storageClassesIIR // string as string - storageClassesIC = append(storageClassesIC, storageClassesIIV) - } - - // items.CollectionFormat: "" - storageClassesIS := swag.JoinByFormat(storageClassesIC, "") - - return storageClassesIS -} - -// bindParamGetExternalTargets binds the parameter storageTypes -func (o *GetExternalTargetsParams) bindParamStorageTypes(formats strfmt.Registry) []string { - storageTypesIR := o.StorageTypes - - var storageTypesIC []string - for _, storageTypesIIR := range storageTypesIR { // explode []string - - storageTypesIIV := storageTypesIIR // string as string - storageTypesIC = append(storageTypesIC, storageTypesIIV) - } - - // items.CollectionFormat: "" - storageTypesIS := swag.JoinByFormat(storageTypesIC, "") - - return storageTypesIS -} diff --git a/v2/client/external_target/get_external_targets_responses.go b/v2/client/external_target/get_external_targets_responses.go deleted file mode 100644 index c520910f..00000000 --- a/v2/client/external_target/get_external_targets_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetExternalTargetsReader is a Reader for the GetExternalTargets structure. -type GetExternalTargetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExternalTargetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetExternalTargetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetExternalTargetsDefault(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 - } -} - -// NewGetExternalTargetsOK creates a GetExternalTargetsOK with default headers values -func NewGetExternalTargetsOK() *GetExternalTargetsOK { - return &GetExternalTargetsOK{} -} - -/* -GetExternalTargetsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetExternalTargetsOK struct { - Payload *models.ExternalTargets -} - -// IsSuccess returns true when this get external targets o k response has a 2xx status code -func (o *GetExternalTargetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get external targets o k response has a 3xx status code -func (o *GetExternalTargetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get external targets o k response has a 4xx status code -func (o *GetExternalTargetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get external targets o k response has a 5xx status code -func (o *GetExternalTargetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get external targets o k response a status code equal to that given -func (o *GetExternalTargetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get external targets o k response -func (o *GetExternalTargetsOK) Code() int { - return 200 -} - -func (o *GetExternalTargetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets][%d] getExternalTargetsOK %s", 200, payload) -} - -func (o *GetExternalTargetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets][%d] getExternalTargetsOK %s", 200, payload) -} - -func (o *GetExternalTargetsOK) GetPayload() *models.ExternalTargets { - return o.Payload -} - -func (o *GetExternalTargetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalTargets) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExternalTargetsDefault creates a GetExternalTargetsDefault with default headers values -func NewGetExternalTargetsDefault(code int) *GetExternalTargetsDefault { - return &GetExternalTargetsDefault{ - _statusCode: code, - } -} - -/* -GetExternalTargetsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetExternalTargetsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get external targets default response has a 2xx status code -func (o *GetExternalTargetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get external targets default response has a 3xx status code -func (o *GetExternalTargetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get external targets default response has a 4xx status code -func (o *GetExternalTargetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get external targets default response has a 5xx status code -func (o *GetExternalTargetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get external targets default response a status code equal to that given -func (o *GetExternalTargetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get external targets default response -func (o *GetExternalTargetsDefault) Code() int { - return o._statusCode -} - -func (o *GetExternalTargetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets][%d] GetExternalTargets default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/external-targets][%d] GetExternalTargets default %s", o._statusCode, payload) -} - -func (o *GetExternalTargetsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetExternalTargetsDefault) 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/external_target/update_external_target_parameters.go b/v2/client/external_target/update_external_target_parameters.go deleted file mode 100644 index 19bb5788..00000000 --- a/v2/client/external_target/update_external_target_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateExternalTargetParams creates a new UpdateExternalTargetParams 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 NewUpdateExternalTargetParams() *UpdateExternalTargetParams { - return &UpdateExternalTargetParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateExternalTargetParamsWithTimeout creates a new UpdateExternalTargetParams object -// with the ability to set a timeout on a request. -func NewUpdateExternalTargetParamsWithTimeout(timeout time.Duration) *UpdateExternalTargetParams { - return &UpdateExternalTargetParams{ - timeout: timeout, - } -} - -// NewUpdateExternalTargetParamsWithContext creates a new UpdateExternalTargetParams object -// with the ability to set a context for a request. -func NewUpdateExternalTargetParamsWithContext(ctx context.Context) *UpdateExternalTargetParams { - return &UpdateExternalTargetParams{ - Context: ctx, - } -} - -// NewUpdateExternalTargetParamsWithHTTPClient creates a new UpdateExternalTargetParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateExternalTargetParamsWithHTTPClient(client *http.Client) *UpdateExternalTargetParams { - return &UpdateExternalTargetParams{ - HTTPClient: client, - } -} - -/* -UpdateExternalTargetParams contains all the parameters to send to the API endpoint - - for the update external target operation. - - Typically these are written to a http.Request. -*/ -type UpdateExternalTargetParams struct { - - /* Body. - - Specifies the parameters to update a External Target. - */ - Body *models.ExternalTarget - - /* ID. - - Specifies the id of the External Target. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalTargetParams) WithDefaults() *UpdateExternalTargetParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update external target params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalTargetParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update external target params -func (o *UpdateExternalTargetParams) WithTimeout(timeout time.Duration) *UpdateExternalTargetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update external target params -func (o *UpdateExternalTargetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update external target params -func (o *UpdateExternalTargetParams) WithContext(ctx context.Context) *UpdateExternalTargetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update external target params -func (o *UpdateExternalTargetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update external target params -func (o *UpdateExternalTargetParams) WithHTTPClient(client *http.Client) *UpdateExternalTargetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update external target params -func (o *UpdateExternalTargetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update external target params -func (o *UpdateExternalTargetParams) WithBody(body *models.ExternalTarget) *UpdateExternalTargetParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update external target params -func (o *UpdateExternalTargetParams) SetBody(body *models.ExternalTarget) { - o.Body = body -} - -// WithID adds the id to the update external target params -func (o *UpdateExternalTargetParams) WithID(id int64) *UpdateExternalTargetParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update external target params -func (o *UpdateExternalTargetParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateExternalTargetParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/external_target/update_external_target_responses.go b/v2/client/external_target/update_external_target_responses.go deleted file mode 100644 index d1888872..00000000 --- a/v2/client/external_target/update_external_target_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateExternalTargetReader is a Reader for the UpdateExternalTarget structure. -type UpdateExternalTargetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateExternalTargetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateExternalTargetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateExternalTargetDefault(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 - } -} - -// NewUpdateExternalTargetOK creates a UpdateExternalTargetOK with default headers values -func NewUpdateExternalTargetOK() *UpdateExternalTargetOK { - return &UpdateExternalTargetOK{} -} - -/* -UpdateExternalTargetOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateExternalTargetOK struct { - Payload *models.ExternalTarget -} - -// IsSuccess returns true when this update external target o k response has a 2xx status code -func (o *UpdateExternalTargetOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update external target o k response has a 3xx status code -func (o *UpdateExternalTargetOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update external target o k response has a 4xx status code -func (o *UpdateExternalTargetOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update external target o k response has a 5xx status code -func (o *UpdateExternalTargetOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update external target o k response a status code equal to that given -func (o *UpdateExternalTargetOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update external target o k response -func (o *UpdateExternalTargetOK) Code() int { - return 200 -} - -func (o *UpdateExternalTargetOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/{id}][%d] updateExternalTargetOK %s", 200, payload) -} - -func (o *UpdateExternalTargetOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/{id}][%d] updateExternalTargetOK %s", 200, payload) -} - -func (o *UpdateExternalTargetOK) GetPayload() *models.ExternalTarget { - return o.Payload -} - -func (o *UpdateExternalTargetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ExternalTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateExternalTargetDefault creates a UpdateExternalTargetDefault with default headers values -func NewUpdateExternalTargetDefault(code int) *UpdateExternalTargetDefault { - return &UpdateExternalTargetDefault{ - _statusCode: code, - } -} - -/* -UpdateExternalTargetDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateExternalTargetDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update external target default response has a 2xx status code -func (o *UpdateExternalTargetDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update external target default response has a 3xx status code -func (o *UpdateExternalTargetDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update external target default response has a 4xx status code -func (o *UpdateExternalTargetDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update external target default response has a 5xx status code -func (o *UpdateExternalTargetDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update external target default response a status code equal to that given -func (o *UpdateExternalTargetDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update external target default response -func (o *UpdateExternalTargetDefault) Code() int { - return o._statusCode -} - -func (o *UpdateExternalTargetDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/{id}][%d] UpdateExternalTarget default %s", o._statusCode, payload) -} - -func (o *UpdateExternalTargetDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/{id}][%d] UpdateExternalTarget default %s", o._statusCode, payload) -} - -func (o *UpdateExternalTargetDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateExternalTargetDefault) 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/external_target/update_external_target_settings_parameters.go b/v2/client/external_target/update_external_target_settings_parameters.go deleted file mode 100644 index fa912833..00000000 --- a/v2/client/external_target/update_external_target_settings_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateExternalTargetSettingsParams creates a new UpdateExternalTargetSettingsParams 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 NewUpdateExternalTargetSettingsParams() *UpdateExternalTargetSettingsParams { - return &UpdateExternalTargetSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateExternalTargetSettingsParamsWithTimeout creates a new UpdateExternalTargetSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateExternalTargetSettingsParamsWithTimeout(timeout time.Duration) *UpdateExternalTargetSettingsParams { - return &UpdateExternalTargetSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateExternalTargetSettingsParamsWithContext creates a new UpdateExternalTargetSettingsParams object -// with the ability to set a context for a request. -func NewUpdateExternalTargetSettingsParamsWithContext(ctx context.Context) *UpdateExternalTargetSettingsParams { - return &UpdateExternalTargetSettingsParams{ - Context: ctx, - } -} - -// NewUpdateExternalTargetSettingsParamsWithHTTPClient creates a new UpdateExternalTargetSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateExternalTargetSettingsParamsWithHTTPClient(client *http.Client) *UpdateExternalTargetSettingsParams { - return &UpdateExternalTargetSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateExternalTargetSettingsParams contains all the parameters to send to the API endpoint - - for the update external target settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateExternalTargetSettingsParams struct { - - /* Body. - - Specifies the parameters to update a External Target Settings. - */ - Body *models.GlobalBandwidthSettings - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update external target settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalTargetSettingsParams) WithDefaults() *UpdateExternalTargetSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update external target settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateExternalTargetSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) WithTimeout(timeout time.Duration) *UpdateExternalTargetSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) WithContext(ctx context.Context) *UpdateExternalTargetSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) WithHTTPClient(client *http.Client) *UpdateExternalTargetSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) WithBody(body *models.GlobalBandwidthSettings) *UpdateExternalTargetSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update external target settings params -func (o *UpdateExternalTargetSettingsParams) SetBody(body *models.GlobalBandwidthSettings) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateExternalTargetSettingsParams) 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/external_target/update_external_target_settings_responses.go b/v2/client/external_target/update_external_target_settings_responses.go deleted file mode 100644 index 7312b0fb..00000000 --- a/v2/client/external_target/update_external_target_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package external_target - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateExternalTargetSettingsReader is a Reader for the UpdateExternalTargetSettings structure. -type UpdateExternalTargetSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateExternalTargetSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateExternalTargetSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateExternalTargetSettingsDefault(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 - } -} - -// NewUpdateExternalTargetSettingsOK creates a UpdateExternalTargetSettingsOK with default headers values -func NewUpdateExternalTargetSettingsOK() *UpdateExternalTargetSettingsOK { - return &UpdateExternalTargetSettingsOK{} -} - -/* -UpdateExternalTargetSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateExternalTargetSettingsOK struct { - Payload *models.GlobalBandwidthSettings -} - -// IsSuccess returns true when this update external target settings o k response has a 2xx status code -func (o *UpdateExternalTargetSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update external target settings o k response has a 3xx status code -func (o *UpdateExternalTargetSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update external target settings o k response has a 4xx status code -func (o *UpdateExternalTargetSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update external target settings o k response has a 5xx status code -func (o *UpdateExternalTargetSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update external target settings o k response a status code equal to that given -func (o *UpdateExternalTargetSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update external target settings o k response -func (o *UpdateExternalTargetSettingsOK) Code() int { - return 200 -} - -func (o *UpdateExternalTargetSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/settings][%d] updateExternalTargetSettingsOK %s", 200, payload) -} - -func (o *UpdateExternalTargetSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/settings][%d] updateExternalTargetSettingsOK %s", 200, payload) -} - -func (o *UpdateExternalTargetSettingsOK) GetPayload() *models.GlobalBandwidthSettings { - return o.Payload -} - -func (o *UpdateExternalTargetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GlobalBandwidthSettings) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateExternalTargetSettingsDefault creates a UpdateExternalTargetSettingsDefault with default headers values -func NewUpdateExternalTargetSettingsDefault(code int) *UpdateExternalTargetSettingsDefault { - return &UpdateExternalTargetSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateExternalTargetSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateExternalTargetSettingsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update external target settings default response has a 2xx status code -func (o *UpdateExternalTargetSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update external target settings default response has a 3xx status code -func (o *UpdateExternalTargetSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update external target settings default response has a 4xx status code -func (o *UpdateExternalTargetSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update external target settings default response has a 5xx status code -func (o *UpdateExternalTargetSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update external target settings default response a status code equal to that given -func (o *UpdateExternalTargetSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update external target settings default response -func (o *UpdateExternalTargetSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateExternalTargetSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/settings][%d] UpdateExternalTargetSettings default %s", o._statusCode, payload) -} - -func (o *UpdateExternalTargetSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/external-targets/settings][%d] UpdateExternalTargetSettings default %s", o._statusCode, payload) -} - -func (o *UpdateExternalTargetSettingsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateExternalTargetSettingsDefault) 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/failover/cancel_failover_parameters.go b/v2/client/failover/cancel_failover_parameters.go deleted file mode 100644 index ee1a83e6..00000000 --- a/v2/client/failover/cancel_failover_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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" -) - -// NewCancelFailoverParams creates a new CancelFailoverParams 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 NewCancelFailoverParams() *CancelFailoverParams { - return &CancelFailoverParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelFailoverParamsWithTimeout creates a new CancelFailoverParams object -// with the ability to set a timeout on a request. -func NewCancelFailoverParamsWithTimeout(timeout time.Duration) *CancelFailoverParams { - return &CancelFailoverParams{ - timeout: timeout, - } -} - -// NewCancelFailoverParamsWithContext creates a new CancelFailoverParams object -// with the ability to set a context for a request. -func NewCancelFailoverParamsWithContext(ctx context.Context) *CancelFailoverParams { - return &CancelFailoverParams{ - Context: ctx, - } -} - -// NewCancelFailoverParamsWithHTTPClient creates a new CancelFailoverParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelFailoverParamsWithHTTPClient(client *http.Client) *CancelFailoverParams { - return &CancelFailoverParams{ - HTTPClient: client, - } -} - -/* -CancelFailoverParams contains all the parameters to send to the API endpoint - - for the cancel failover operation. - - Typically these are written to a http.Request. -*/ -type CancelFailoverParams struct { - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelFailoverParams) WithDefaults() *CancelFailoverParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelFailoverParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel failover params -func (o *CancelFailoverParams) WithTimeout(timeout time.Duration) *CancelFailoverParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel failover params -func (o *CancelFailoverParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel failover params -func (o *CancelFailoverParams) WithContext(ctx context.Context) *CancelFailoverParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel failover params -func (o *CancelFailoverParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel failover params -func (o *CancelFailoverParams) WithHTTPClient(client *http.Client) *CancelFailoverParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel failover params -func (o *CancelFailoverParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel failover params -func (o *CancelFailoverParams) WithID(id string) *CancelFailoverParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel failover params -func (o *CancelFailoverParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelFailoverParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/cancel_failover_responses.go b/v2/client/failover/cancel_failover_responses.go deleted file mode 100644 index 0b5783e5..00000000 --- a/v2/client/failover/cancel_failover_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelFailoverReader is a Reader for the CancelFailover structure. -type CancelFailoverReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelFailoverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCancelFailoverCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelFailoverDefault(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 - } -} - -// NewCancelFailoverCreated creates a CancelFailoverCreated with default headers values -func NewCancelFailoverCreated() *CancelFailoverCreated { - return &CancelFailoverCreated{} -} - -/* -CancelFailoverCreated describes a response with status code 201, with default header values. - -No Content -*/ -type CancelFailoverCreated struct { -} - -// IsSuccess returns true when this cancel failover created response has a 2xx status code -func (o *CancelFailoverCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel failover created response has a 3xx status code -func (o *CancelFailoverCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel failover created response has a 4xx status code -func (o *CancelFailoverCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel failover created response has a 5xx status code -func (o *CancelFailoverCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel failover created response a status code equal to that given -func (o *CancelFailoverCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the cancel failover created response -func (o *CancelFailoverCreated) Code() int { - return 201 -} - -func (o *CancelFailoverCreated) Error() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/cancel][%d] cancelFailoverCreated", 201) -} - -func (o *CancelFailoverCreated) String() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/cancel][%d] cancelFailoverCreated", 201) -} - -func (o *CancelFailoverCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelFailoverDefault creates a CancelFailoverDefault with default headers values -func NewCancelFailoverDefault(code int) *CancelFailoverDefault { - return &CancelFailoverDefault{ - _statusCode: code, - } -} - -/* -CancelFailoverDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelFailoverDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel failover default response has a 2xx status code -func (o *CancelFailoverDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel failover default response has a 3xx status code -func (o *CancelFailoverDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel failover default response has a 4xx status code -func (o *CancelFailoverDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel failover default response has a 5xx status code -func (o *CancelFailoverDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel failover default response a status code equal to that given -func (o *CancelFailoverDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel failover default response -func (o *CancelFailoverDefault) Code() int { - return o._statusCode -} - -func (o *CancelFailoverDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/cancel][%d] CancelFailover default %s", o._statusCode, payload) -} - -func (o *CancelFailoverDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/cancel][%d] CancelFailover default %s", o._statusCode, payload) -} - -func (o *CancelFailoverDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelFailoverDefault) 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/failover/cancel_view_failover_parameters.go b/v2/client/failover/cancel_view_failover_parameters.go deleted file mode 100644 index 14f0c5c5..00000000 --- a/v2/client/failover/cancel_view_failover_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" -) - -// NewCancelViewFailoverParams creates a new CancelViewFailoverParams 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 NewCancelViewFailoverParams() *CancelViewFailoverParams { - return &CancelViewFailoverParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelViewFailoverParamsWithTimeout creates a new CancelViewFailoverParams object -// with the ability to set a timeout on a request. -func NewCancelViewFailoverParamsWithTimeout(timeout time.Duration) *CancelViewFailoverParams { - return &CancelViewFailoverParams{ - timeout: timeout, - } -} - -// NewCancelViewFailoverParamsWithContext creates a new CancelViewFailoverParams object -// with the ability to set a context for a request. -func NewCancelViewFailoverParamsWithContext(ctx context.Context) *CancelViewFailoverParams { - return &CancelViewFailoverParams{ - Context: ctx, - } -} - -// NewCancelViewFailoverParamsWithHTTPClient creates a new CancelViewFailoverParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelViewFailoverParamsWithHTTPClient(client *http.Client) *CancelViewFailoverParams { - return &CancelViewFailoverParams{ - HTTPClient: client, - } -} - -/* -CancelViewFailoverParams contains all the parameters to send to the API endpoint - - for the cancel view failover operation. - - Typically these are written to a http.Request. -*/ -type CancelViewFailoverParams struct { - - /* ID. - - Specifies a view id to cancel it's failover. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelViewFailoverParams) WithDefaults() *CancelViewFailoverParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelViewFailoverParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel view failover params -func (o *CancelViewFailoverParams) WithTimeout(timeout time.Duration) *CancelViewFailoverParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel view failover params -func (o *CancelViewFailoverParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel view failover params -func (o *CancelViewFailoverParams) WithContext(ctx context.Context) *CancelViewFailoverParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel view failover params -func (o *CancelViewFailoverParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel view failover params -func (o *CancelViewFailoverParams) WithHTTPClient(client *http.Client) *CancelViewFailoverParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel view failover params -func (o *CancelViewFailoverParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel view failover params -func (o *CancelViewFailoverParams) WithID(id int64) *CancelViewFailoverParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel view failover params -func (o *CancelViewFailoverParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelViewFailoverParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/cancel_view_failover_responses.go b/v2/client/failover/cancel_view_failover_responses.go deleted file mode 100644 index 393d11db..00000000 --- a/v2/client/failover/cancel_view_failover_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelViewFailoverReader is a Reader for the CancelViewFailover structure. -type CancelViewFailoverReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelViewFailoverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCancelViewFailoverNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelViewFailoverDefault(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 - } -} - -// NewCancelViewFailoverNoContent creates a CancelViewFailoverNoContent with default headers values -func NewCancelViewFailoverNoContent() *CancelViewFailoverNoContent { - return &CancelViewFailoverNoContent{} -} - -/* -CancelViewFailoverNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CancelViewFailoverNoContent struct { -} - -// IsSuccess returns true when this cancel view failover no content response has a 2xx status code -func (o *CancelViewFailoverNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel view failover no content response has a 3xx status code -func (o *CancelViewFailoverNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel view failover no content response has a 4xx status code -func (o *CancelViewFailoverNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel view failover no content response has a 5xx status code -func (o *CancelViewFailoverNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel view failover no content response a status code equal to that given -func (o *CancelViewFailoverNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the cancel view failover no content response -func (o *CancelViewFailoverNoContent) Code() int { - return 204 -} - -func (o *CancelViewFailoverNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/failover/views/{id}/cancel][%d] cancelViewFailoverNoContent", 204) -} - -func (o *CancelViewFailoverNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/failover/views/{id}/cancel][%d] cancelViewFailoverNoContent", 204) -} - -func (o *CancelViewFailoverNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelViewFailoverDefault creates a CancelViewFailoverDefault with default headers values -func NewCancelViewFailoverDefault(code int) *CancelViewFailoverDefault { - return &CancelViewFailoverDefault{ - _statusCode: code, - } -} - -/* -CancelViewFailoverDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelViewFailoverDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel view failover default response has a 2xx status code -func (o *CancelViewFailoverDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel view failover default response has a 3xx status code -func (o *CancelViewFailoverDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel view failover default response has a 4xx status code -func (o *CancelViewFailoverDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel view failover default response has a 5xx status code -func (o *CancelViewFailoverDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel view failover default response a status code equal to that given -func (o *CancelViewFailoverDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel view failover default response -func (o *CancelViewFailoverDefault) Code() int { - return o._statusCode -} - -func (o *CancelViewFailoverDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}/cancel][%d] CancelViewFailover default %s", o._statusCode, payload) -} - -func (o *CancelViewFailoverDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}/cancel][%d] CancelViewFailover default %s", o._statusCode, payload) -} - -func (o *CancelViewFailoverDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelViewFailoverDefault) 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/failover/create_planned_run_parameters.go b/v2/client/failover/create_planned_run_parameters.go deleted file mode 100644 index 47aff764..00000000 --- a/v2/client/failover/create_planned_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreatePlannedRunParams creates a new CreatePlannedRunParams 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 NewCreatePlannedRunParams() *CreatePlannedRunParams { - return &CreatePlannedRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePlannedRunParamsWithTimeout creates a new CreatePlannedRunParams object -// with the ability to set a timeout on a request. -func NewCreatePlannedRunParamsWithTimeout(timeout time.Duration) *CreatePlannedRunParams { - return &CreatePlannedRunParams{ - timeout: timeout, - } -} - -// NewCreatePlannedRunParamsWithContext creates a new CreatePlannedRunParams object -// with the ability to set a context for a request. -func NewCreatePlannedRunParamsWithContext(ctx context.Context) *CreatePlannedRunParams { - return &CreatePlannedRunParams{ - Context: ctx, - } -} - -// NewCreatePlannedRunParamsWithHTTPClient creates a new CreatePlannedRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreatePlannedRunParamsWithHTTPClient(client *http.Client) *CreatePlannedRunParams { - return &CreatePlannedRunParams{ - HTTPClient: client, - } -} - -/* -CreatePlannedRunParams contains all the parameters to send to the API endpoint - - for the create planned run operation. - - Typically these are written to a http.Request. -*/ -type CreatePlannedRunParams struct { - - /* Body. - - Specifies the paramteres to create a planned run while failover workflow. - */ - Body *models.FailoverRunConfiguration - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create planned run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePlannedRunParams) WithDefaults() *CreatePlannedRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create planned run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePlannedRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create planned run params -func (o *CreatePlannedRunParams) WithTimeout(timeout time.Duration) *CreatePlannedRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create planned run params -func (o *CreatePlannedRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create planned run params -func (o *CreatePlannedRunParams) WithContext(ctx context.Context) *CreatePlannedRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create planned run params -func (o *CreatePlannedRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create planned run params -func (o *CreatePlannedRunParams) WithHTTPClient(client *http.Client) *CreatePlannedRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create planned run params -func (o *CreatePlannedRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create planned run params -func (o *CreatePlannedRunParams) WithBody(body *models.FailoverRunConfiguration) *CreatePlannedRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create planned run params -func (o *CreatePlannedRunParams) SetBody(body *models.FailoverRunConfiguration) { - o.Body = body -} - -// WithID adds the id to the create planned run params -func (o *CreatePlannedRunParams) WithID(id string) *CreatePlannedRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the create planned run params -func (o *CreatePlannedRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePlannedRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/create_planned_run_responses.go b/v2/client/failover/create_planned_run_responses.go deleted file mode 100644 index d1420e06..00000000 --- a/v2/client/failover/create_planned_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreatePlannedRunReader is a Reader for the CreatePlannedRun structure. -type CreatePlannedRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePlannedRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreatePlannedRunCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreatePlannedRunDefault(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 - } -} - -// NewCreatePlannedRunCreated creates a CreatePlannedRunCreated with default headers values -func NewCreatePlannedRunCreated() *CreatePlannedRunCreated { - return &CreatePlannedRunCreated{} -} - -/* -CreatePlannedRunCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreatePlannedRunCreated struct { - Payload *models.FailoverCreateRunResponse -} - -// IsSuccess returns true when this create planned run created response has a 2xx status code -func (o *CreatePlannedRunCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create planned run created response has a 3xx status code -func (o *CreatePlannedRunCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create planned run created response has a 4xx status code -func (o *CreatePlannedRunCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create planned run created response has a 5xx status code -func (o *CreatePlannedRunCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create planned run created response a status code equal to that given -func (o *CreatePlannedRunCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create planned run created response -func (o *CreatePlannedRunCreated) Code() int { - return 201 -} - -func (o *CreatePlannedRunCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/planned-run][%d] createPlannedRunCreated %s", 201, payload) -} - -func (o *CreatePlannedRunCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/planned-run][%d] createPlannedRunCreated %s", 201, payload) -} - -func (o *CreatePlannedRunCreated) GetPayload() *models.FailoverCreateRunResponse { - return o.Payload -} - -func (o *CreatePlannedRunCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FailoverCreateRunResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePlannedRunDefault creates a CreatePlannedRunDefault with default headers values -func NewCreatePlannedRunDefault(code int) *CreatePlannedRunDefault { - return &CreatePlannedRunDefault{ - _statusCode: code, - } -} - -/* -CreatePlannedRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreatePlannedRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create planned run default response has a 2xx status code -func (o *CreatePlannedRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create planned run default response has a 3xx status code -func (o *CreatePlannedRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create planned run default response has a 4xx status code -func (o *CreatePlannedRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create planned run default response has a 5xx status code -func (o *CreatePlannedRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create planned run default response a status code equal to that given -func (o *CreatePlannedRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create planned run default response -func (o *CreatePlannedRunDefault) Code() int { - return o._statusCode -} - -func (o *CreatePlannedRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/planned-run][%d] CreatePlannedRun default %s", o._statusCode, payload) -} - -func (o *CreatePlannedRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/planned-run][%d] CreatePlannedRun default %s", o._statusCode, payload) -} - -func (o *CreatePlannedRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreatePlannedRunDefault) 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/failover/create_view_failover_parameters.go b/v2/client/failover/create_view_failover_parameters.go deleted file mode 100644 index 4bae8d53..00000000 --- a/v2/client/failover/create_view_failover_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateViewFailoverParams creates a new CreateViewFailoverParams 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 NewCreateViewFailoverParams() *CreateViewFailoverParams { - return &CreateViewFailoverParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewFailoverParamsWithTimeout creates a new CreateViewFailoverParams object -// with the ability to set a timeout on a request. -func NewCreateViewFailoverParamsWithTimeout(timeout time.Duration) *CreateViewFailoverParams { - return &CreateViewFailoverParams{ - timeout: timeout, - } -} - -// NewCreateViewFailoverParamsWithContext creates a new CreateViewFailoverParams object -// with the ability to set a context for a request. -func NewCreateViewFailoverParamsWithContext(ctx context.Context) *CreateViewFailoverParams { - return &CreateViewFailoverParams{ - Context: ctx, - } -} - -// NewCreateViewFailoverParamsWithHTTPClient creates a new CreateViewFailoverParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewFailoverParamsWithHTTPClient(client *http.Client) *CreateViewFailoverParams { - return &CreateViewFailoverParams{ - HTTPClient: client, - } -} - -/* -CreateViewFailoverParams contains all the parameters to send to the API endpoint - - for the create view failover operation. - - Typically these are written to a http.Request. -*/ -type CreateViewFailoverParams struct { - - /* Body. - - Specifies the request body to create failover task. - */ - Body *models.CreateViewFailoverRequest - - /* ID. - - Specifies a view id to create an failover task. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewFailoverParams) WithDefaults() *CreateViewFailoverParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewFailoverParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view failover params -func (o *CreateViewFailoverParams) WithTimeout(timeout time.Duration) *CreateViewFailoverParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view failover params -func (o *CreateViewFailoverParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view failover params -func (o *CreateViewFailoverParams) WithContext(ctx context.Context) *CreateViewFailoverParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view failover params -func (o *CreateViewFailoverParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view failover params -func (o *CreateViewFailoverParams) WithHTTPClient(client *http.Client) *CreateViewFailoverParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view failover params -func (o *CreateViewFailoverParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view failover params -func (o *CreateViewFailoverParams) WithBody(body *models.CreateViewFailoverRequest) *CreateViewFailoverParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view failover params -func (o *CreateViewFailoverParams) SetBody(body *models.CreateViewFailoverRequest) { - o.Body = body -} - -// WithID adds the id to the create view failover params -func (o *CreateViewFailoverParams) WithID(id int64) *CreateViewFailoverParams { - o.SetID(id) - return o -} - -// SetID adds the id to the create view failover params -func (o *CreateViewFailoverParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewFailoverParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/create_view_failover_responses.go b/v2/client/failover/create_view_failover_responses.go deleted file mode 100644 index 34affee9..00000000 --- a/v2/client/failover/create_view_failover_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateViewFailoverReader is a Reader for the CreateViewFailover structure. -type CreateViewFailoverReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewFailoverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewFailoverCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewFailoverDefault(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 - } -} - -// NewCreateViewFailoverCreated creates a CreateViewFailoverCreated with default headers values -func NewCreateViewFailoverCreated() *CreateViewFailoverCreated { - return &CreateViewFailoverCreated{} -} - -/* -CreateViewFailoverCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewFailoverCreated struct { - Payload *models.Failover -} - -// IsSuccess returns true when this create view failover created response has a 2xx status code -func (o *CreateViewFailoverCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view failover created response has a 3xx status code -func (o *CreateViewFailoverCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view failover created response has a 4xx status code -func (o *CreateViewFailoverCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view failover created response has a 5xx status code -func (o *CreateViewFailoverCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view failover created response a status code equal to that given -func (o *CreateViewFailoverCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view failover created response -func (o *CreateViewFailoverCreated) Code() int { - return 201 -} - -func (o *CreateViewFailoverCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}][%d] createViewFailoverCreated %s", 201, payload) -} - -func (o *CreateViewFailoverCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}][%d] createViewFailoverCreated %s", 201, payload) -} - -func (o *CreateViewFailoverCreated) GetPayload() *models.Failover { - return o.Payload -} - -func (o *CreateViewFailoverCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Failover) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewFailoverDefault creates a CreateViewFailoverDefault with default headers values -func NewCreateViewFailoverDefault(code int) *CreateViewFailoverDefault { - return &CreateViewFailoverDefault{ - _statusCode: code, - } -} - -/* -CreateViewFailoverDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewFailoverDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create view failover default response has a 2xx status code -func (o *CreateViewFailoverDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view failover default response has a 3xx status code -func (o *CreateViewFailoverDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view failover default response has a 4xx status code -func (o *CreateViewFailoverDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view failover default response has a 5xx status code -func (o *CreateViewFailoverDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view failover default response a status code equal to that given -func (o *CreateViewFailoverDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view failover default response -func (o *CreateViewFailoverDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewFailoverDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}][%d] CreateViewFailover default %s", o._statusCode, payload) -} - -func (o *CreateViewFailoverDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/views/{id}][%d] CreateViewFailover default %s", o._statusCode, payload) -} - -func (o *CreateViewFailoverDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateViewFailoverDefault) 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/failover/failover_client.go b/v2/client/failover/failover_client.go deleted file mode 100644 index af39e83b..00000000 --- a/v2/client/failover/failover_client.go +++ /dev/null @@ -1,567 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new failover API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new failover API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new failover API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for failover API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CancelFailover(params *CancelFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelFailoverCreated, error) - - CancelViewFailover(params *CancelViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelViewFailoverNoContent, error) - - CreatePlannedRun(params *CreatePlannedRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePlannedRunCreated, error) - - CreateViewFailover(params *CreateViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewFailoverCreated, error) - - GetFailoverOps(params *GetFailoverOpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFailoverOpsOK, error) - - GetTrackingViewID(params *GetTrackingViewIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTrackingViewIDOK, error) - - GetViewFailover(params *GetViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewFailoverOK, error) - - InitFailover(params *InitFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InitFailoverCreated, error) - - ObjectLinkage(params *ObjectLinkageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ObjectLinkageCreated, error) - - PollPlannedRuns(params *PollPlannedRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollPlannedRunsOK, error) - - ReplicationBackupActivation(params *ReplicationBackupActivationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReplicationBackupActivationCreated, error) - - SourceBackupDeactivation(params *SourceBackupDeactivationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SourceBackupDeactivationCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CancelFailover cancels failover workflow - -Specifies the request to cancel failover workflow. The cancellation request should not be made if '/backupActivation' or '/backupDeactivaetion' are already called on replication or source cluster respectively. -*/ -func (a *Client) CancelFailover(params *CancelFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelFailoverCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelFailoverParams() - } - op := &runtime.ClientOperation{ - ID: "CancelFailover", - Method: "POST", - PathPattern: "/data-protect/failover/{id}/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelFailoverReader{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.(*CancelFailoverCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelFailoverDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CancelViewFailover cancels view failover task - -Cancel an in progress view failover task. -*/ -func (a *Client) CancelViewFailover(params *CancelViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelViewFailoverNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelViewFailoverParams() - } - op := &runtime.ClientOperation{ - ID: "CancelViewFailover", - Method: "POST", - PathPattern: "/data-protect/failover/views/{id}/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelViewFailoverReader{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.(*CancelViewFailoverNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelViewFailoverDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreatePlannedRun creates a planned run for backup and replication - -Specifies the configuration required for executing a special run as a part of failover workflow. This special run is triggered during palnned failover to sync the source cluster to replication cluster with minimum possible delta. -*/ -func (a *Client) CreatePlannedRun(params *CreatePlannedRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePlannedRunCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreatePlannedRunParams() - } - op := &runtime.ClientOperation{ - ID: "CreatePlannedRun", - Method: "POST", - PathPattern: "/data-protect/failover/{id}/planned-run", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreatePlannedRunReader{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.(*CreatePlannedRunCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreatePlannedRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateViewFailover creates view failover task - -Create a view failover task. -*/ -func (a *Client) CreateViewFailover(params *CreateViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewFailoverCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewFailoverParams() - } - op := &runtime.ClientOperation{ - ID: "CreateViewFailover", - Method: "POST", - PathPattern: "/data-protect/failover/views/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewFailoverReader{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.(*CreateViewFailoverCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewFailoverDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFailoverOps gets all the failover operations which can be performed on this view - -Gets all the failover operations which can be performed on this view. -*/ -func (a *Client) GetFailoverOps(params *GetFailoverOpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFailoverOpsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFailoverOpsParams() - } - op := &runtime.ClientOperation{ - ID: "GetFailoverOps", - Method: "GET", - PathPattern: "/data-protect/failover/views/{id}/operations", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFailoverOpsReader{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.(*GetFailoverOpsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFailoverOpsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTrackingViewID gets tracking view Id - -Get tracking View Id -*/ -func (a *Client) GetTrackingViewID(params *GetTrackingViewIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTrackingViewIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTrackingViewIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetTrackingViewId", - Method: "GET", - PathPattern: "/data-protect/failover/views/trackingViewId/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTrackingViewIDReader{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.(*GetTrackingViewIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTrackingViewIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewFailover gets view failover - -Get failover tasks of a View. -*/ -func (a *Client) GetViewFailover(params *GetViewFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewFailoverOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewFailoverParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewFailover", - Method: "GET", - PathPattern: "/data-protect/failover/views/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewFailoverReader{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.(*GetViewFailoverOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewFailoverDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -InitFailover initiates a failover request - -Initiate a failover request. -*/ -func (a *Client) InitFailover(params *InitFailoverParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InitFailoverCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewInitFailoverParams() - } - op := &runtime.ClientOperation{ - ID: "InitFailover", - Method: "POST", - PathPattern: "/data-protect/failover/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &InitFailoverReader{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.(*InitFailoverCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*InitFailoverDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ObjectLinkage linkings between replicated objects and failover objects - -Specifies the request to link failover objects on replication cluster to the replicated entity from source cluster. This linking need to be done after perforing recoveries for failed entities on replication cluster. This linkage will be useful when merging snapshots of object across replications and failovers. -*/ -func (a *Client) ObjectLinkage(params *ObjectLinkageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ObjectLinkageCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewObjectLinkageParams() - } - op := &runtime.ClientOperation{ - ID: "ObjectLinkage", - Method: "POST", - PathPattern: "/data-protect/failover/{id}/object-linkage", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ObjectLinkageReader{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.(*ObjectLinkageCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ObjectLinkageDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PollPlannedRuns gets the list of failover planned runs - -Poll to see whether planned run has been scheduled or not. -*/ -func (a *Client) PollPlannedRuns(params *PollPlannedRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollPlannedRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPollPlannedRunsParams() - } - op := &runtime.ClientOperation{ - ID: "PollPlannedRuns", - Method: "GET", - PathPattern: "/data-protect/failover/planned-runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PollPlannedRunsReader{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.(*PollPlannedRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PollPlannedRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ReplicationBackupActivation activates failover entity backup on replication clsuter - -Specifies the configuration required for activating backup for failover objects on replication cluster. Here orchastrator can call this API multiple times as long as full set of object are non-overlapping. They can also use the existing job if its compatible to backup failover objects. -*/ -func (a *Client) ReplicationBackupActivation(params *ReplicationBackupActivationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReplicationBackupActivationCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewReplicationBackupActivationParams() - } - op := &runtime.ClientOperation{ - ID: "ReplicationBackupActivation", - Method: "POST", - PathPattern: "/data-protect/failover/{id}/backup-activation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ReplicationBackupActivationReader{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.(*ReplicationBackupActivationCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ReplicationBackupActivationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SourceBackupDeactivation deactivates failover entity backup on source clsuter - -Specifies the configuration required for deactivating backup for failover entities on source cluster. -*/ -func (a *Client) SourceBackupDeactivation(params *SourceBackupDeactivationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SourceBackupDeactivationCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSourceBackupDeactivationParams() - } - op := &runtime.ClientOperation{ - ID: "SourceBackupDeactivation", - Method: "POST", - PathPattern: "/data-protect/failover/{id}/backup-deactivation", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SourceBackupDeactivationReader{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.(*SourceBackupDeactivationCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SourceBackupDeactivationDefault) - 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/v2/client/failover/get_failover_ops_parameters.go b/v2/client/failover/get_failover_ops_parameters.go deleted file mode 100644 index 374f622c..00000000 --- a/v2/client/failover/get_failover_ops_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" -) - -// NewGetFailoverOpsParams creates a new GetFailoverOpsParams 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 NewGetFailoverOpsParams() *GetFailoverOpsParams { - return &GetFailoverOpsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFailoverOpsParamsWithTimeout creates a new GetFailoverOpsParams object -// with the ability to set a timeout on a request. -func NewGetFailoverOpsParamsWithTimeout(timeout time.Duration) *GetFailoverOpsParams { - return &GetFailoverOpsParams{ - timeout: timeout, - } -} - -// NewGetFailoverOpsParamsWithContext creates a new GetFailoverOpsParams object -// with the ability to set a context for a request. -func NewGetFailoverOpsParamsWithContext(ctx context.Context) *GetFailoverOpsParams { - return &GetFailoverOpsParams{ - Context: ctx, - } -} - -// NewGetFailoverOpsParamsWithHTTPClient creates a new GetFailoverOpsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFailoverOpsParamsWithHTTPClient(client *http.Client) *GetFailoverOpsParams { - return &GetFailoverOpsParams{ - HTTPClient: client, - } -} - -/* -GetFailoverOpsParams contains all the parameters to send to the API endpoint - - for the get failover ops operation. - - Typically these are written to a http.Request. -*/ -type GetFailoverOpsParams struct { - - /* ID. - - Specifies the view id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get failover ops params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFailoverOpsParams) WithDefaults() *GetFailoverOpsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get failover ops params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFailoverOpsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get failover ops params -func (o *GetFailoverOpsParams) WithTimeout(timeout time.Duration) *GetFailoverOpsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get failover ops params -func (o *GetFailoverOpsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get failover ops params -func (o *GetFailoverOpsParams) WithContext(ctx context.Context) *GetFailoverOpsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get failover ops params -func (o *GetFailoverOpsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get failover ops params -func (o *GetFailoverOpsParams) WithHTTPClient(client *http.Client) *GetFailoverOpsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get failover ops params -func (o *GetFailoverOpsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get failover ops params -func (o *GetFailoverOpsParams) WithID(id int64) *GetFailoverOpsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get failover ops params -func (o *GetFailoverOpsParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFailoverOpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/get_failover_ops_responses.go b/v2/client/failover/get_failover_ops_responses.go deleted file mode 100644 index f261578f..00000000 --- a/v2/client/failover/get_failover_ops_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetFailoverOpsReader is a Reader for the GetFailoverOps structure. -type GetFailoverOpsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFailoverOpsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFailoverOpsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFailoverOpsDefault(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 - } -} - -// NewGetFailoverOpsOK creates a GetFailoverOpsOK with default headers values -func NewGetFailoverOpsOK() *GetFailoverOpsOK { - return &GetFailoverOpsOK{} -} - -/* -GetFailoverOpsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFailoverOpsOK struct { - Payload *models.GetFailoverOpsResponse -} - -// IsSuccess returns true when this get failover ops o k response has a 2xx status code -func (o *GetFailoverOpsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get failover ops o k response has a 3xx status code -func (o *GetFailoverOpsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get failover ops o k response has a 4xx status code -func (o *GetFailoverOpsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get failover ops o k response has a 5xx status code -func (o *GetFailoverOpsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get failover ops o k response a status code equal to that given -func (o *GetFailoverOpsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get failover ops o k response -func (o *GetFailoverOpsOK) Code() int { - return 200 -} - -func (o *GetFailoverOpsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}/operations][%d] getFailoverOpsOK %s", 200, payload) -} - -func (o *GetFailoverOpsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}/operations][%d] getFailoverOpsOK %s", 200, payload) -} - -func (o *GetFailoverOpsOK) GetPayload() *models.GetFailoverOpsResponse { - return o.Payload -} - -func (o *GetFailoverOpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetFailoverOpsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFailoverOpsDefault creates a GetFailoverOpsDefault with default headers values -func NewGetFailoverOpsDefault(code int) *GetFailoverOpsDefault { - return &GetFailoverOpsDefault{ - _statusCode: code, - } -} - -/* -GetFailoverOpsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFailoverOpsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get failover ops default response has a 2xx status code -func (o *GetFailoverOpsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get failover ops default response has a 3xx status code -func (o *GetFailoverOpsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get failover ops default response has a 4xx status code -func (o *GetFailoverOpsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get failover ops default response has a 5xx status code -func (o *GetFailoverOpsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get failover ops default response a status code equal to that given -func (o *GetFailoverOpsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get failover ops default response -func (o *GetFailoverOpsDefault) Code() int { - return o._statusCode -} - -func (o *GetFailoverOpsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}/operations][%d] GetFailoverOps default %s", o._statusCode, payload) -} - -func (o *GetFailoverOpsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}/operations][%d] GetFailoverOps default %s", o._statusCode, payload) -} - -func (o *GetFailoverOpsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetFailoverOpsDefault) 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/failover/get_tracking_view_id_parameters.go b/v2/client/failover/get_tracking_view_id_parameters.go deleted file mode 100644 index 402bce71..00000000 --- a/v2/client/failover/get_tracking_view_id_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" -) - -// NewGetTrackingViewIDParams creates a new GetTrackingViewIDParams 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 NewGetTrackingViewIDParams() *GetTrackingViewIDParams { - return &GetTrackingViewIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTrackingViewIDParamsWithTimeout creates a new GetTrackingViewIDParams object -// with the ability to set a timeout on a request. -func NewGetTrackingViewIDParamsWithTimeout(timeout time.Duration) *GetTrackingViewIDParams { - return &GetTrackingViewIDParams{ - timeout: timeout, - } -} - -// NewGetTrackingViewIDParamsWithContext creates a new GetTrackingViewIDParams object -// with the ability to set a context for a request. -func NewGetTrackingViewIDParamsWithContext(ctx context.Context) *GetTrackingViewIDParams { - return &GetTrackingViewIDParams{ - Context: ctx, - } -} - -// NewGetTrackingViewIDParamsWithHTTPClient creates a new GetTrackingViewIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTrackingViewIDParamsWithHTTPClient(client *http.Client) *GetTrackingViewIDParams { - return &GetTrackingViewIDParams{ - HTTPClient: client, - } -} - -/* -GetTrackingViewIDParams contains all the parameters to send to the API endpoint - - for the get tracking view Id operation. - - Typically these are written to a http.Request. -*/ -type GetTrackingViewIDParams struct { - - /* ID. - - Specifies the view_uid of the source view. - */ - ID string - - /* IsForwarded. - - Indicates whether the request is forwarded - */ - IsForwarded *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tracking view Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTrackingViewIDParams) WithDefaults() *GetTrackingViewIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tracking view Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTrackingViewIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tracking view Id params -func (o *GetTrackingViewIDParams) WithTimeout(timeout time.Duration) *GetTrackingViewIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tracking view Id params -func (o *GetTrackingViewIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tracking view Id params -func (o *GetTrackingViewIDParams) WithContext(ctx context.Context) *GetTrackingViewIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tracking view Id params -func (o *GetTrackingViewIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tracking view Id params -func (o *GetTrackingViewIDParams) WithHTTPClient(client *http.Client) *GetTrackingViewIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tracking view Id params -func (o *GetTrackingViewIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get tracking view Id params -func (o *GetTrackingViewIDParams) WithID(id string) *GetTrackingViewIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get tracking view Id params -func (o *GetTrackingViewIDParams) SetID(id string) { - o.ID = id -} - -// WithIsForwarded adds the isForwarded to the get tracking view Id params -func (o *GetTrackingViewIDParams) WithIsForwarded(isForwarded *bool) *GetTrackingViewIDParams { - o.SetIsForwarded(isForwarded) - return o -} - -// SetIsForwarded adds the isForwarded to the get tracking view Id params -func (o *GetTrackingViewIDParams) SetIsForwarded(isForwarded *bool) { - o.IsForwarded = isForwarded -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTrackingViewIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.IsForwarded != nil { - - // query param isForwarded - var qrIsForwarded bool - - if o.IsForwarded != nil { - qrIsForwarded = *o.IsForwarded - } - qIsForwarded := swag.FormatBool(qrIsForwarded) - if qIsForwarded != "" { - - if err := r.SetQueryParam("isForwarded", qIsForwarded); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/get_tracking_view_id_responses.go b/v2/client/failover/get_tracking_view_id_responses.go deleted file mode 100644 index 808760bd..00000000 --- a/v2/client/failover/get_tracking_view_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTrackingViewIDReader is a Reader for the GetTrackingViewID structure. -type GetTrackingViewIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTrackingViewIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTrackingViewIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTrackingViewIDDefault(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 - } -} - -// NewGetTrackingViewIDOK creates a GetTrackingViewIDOK with default headers values -func NewGetTrackingViewIDOK() *GetTrackingViewIDOK { - return &GetTrackingViewIDOK{} -} - -/* -GetTrackingViewIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTrackingViewIDOK struct { - Payload *models.GetTrackingViewIDResponse -} - -// IsSuccess returns true when this get tracking view Id o k response has a 2xx status code -func (o *GetTrackingViewIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tracking view Id o k response has a 3xx status code -func (o *GetTrackingViewIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tracking view Id o k response has a 4xx status code -func (o *GetTrackingViewIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tracking view Id o k response has a 5xx status code -func (o *GetTrackingViewIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tracking view Id o k response a status code equal to that given -func (o *GetTrackingViewIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tracking view Id o k response -func (o *GetTrackingViewIDOK) Code() int { - return 200 -} - -func (o *GetTrackingViewIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/trackingViewId/{id}][%d] getTrackingViewIdOK %s", 200, payload) -} - -func (o *GetTrackingViewIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/trackingViewId/{id}][%d] getTrackingViewIdOK %s", 200, payload) -} - -func (o *GetTrackingViewIDOK) GetPayload() *models.GetTrackingViewIDResponse { - return o.Payload -} - -func (o *GetTrackingViewIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetTrackingViewIDResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTrackingViewIDDefault creates a GetTrackingViewIDDefault with default headers values -func NewGetTrackingViewIDDefault(code int) *GetTrackingViewIDDefault { - return &GetTrackingViewIDDefault{ - _statusCode: code, - } -} - -/* -GetTrackingViewIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTrackingViewIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get tracking view Id default response has a 2xx status code -func (o *GetTrackingViewIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tracking view Id default response has a 3xx status code -func (o *GetTrackingViewIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tracking view Id default response has a 4xx status code -func (o *GetTrackingViewIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tracking view Id default response has a 5xx status code -func (o *GetTrackingViewIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tracking view Id default response a status code equal to that given -func (o *GetTrackingViewIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tracking view Id default response -func (o *GetTrackingViewIDDefault) Code() int { - return o._statusCode -} - -func (o *GetTrackingViewIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/trackingViewId/{id}][%d] GetTrackingViewId default %s", o._statusCode, payload) -} - -func (o *GetTrackingViewIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/trackingViewId/{id}][%d] GetTrackingViewId default %s", o._statusCode, payload) -} - -func (o *GetTrackingViewIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTrackingViewIDDefault) 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/failover/get_view_failover_parameters.go b/v2/client/failover/get_view_failover_parameters.go deleted file mode 100644 index 0d7786e3..00000000 --- a/v2/client/failover/get_view_failover_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" -) - -// NewGetViewFailoverParams creates a new GetViewFailoverParams 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 NewGetViewFailoverParams() *GetViewFailoverParams { - return &GetViewFailoverParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewFailoverParamsWithTimeout creates a new GetViewFailoverParams object -// with the ability to set a timeout on a request. -func NewGetViewFailoverParamsWithTimeout(timeout time.Duration) *GetViewFailoverParams { - return &GetViewFailoverParams{ - timeout: timeout, - } -} - -// NewGetViewFailoverParamsWithContext creates a new GetViewFailoverParams object -// with the ability to set a context for a request. -func NewGetViewFailoverParamsWithContext(ctx context.Context) *GetViewFailoverParams { - return &GetViewFailoverParams{ - Context: ctx, - } -} - -// NewGetViewFailoverParamsWithHTTPClient creates a new GetViewFailoverParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewFailoverParamsWithHTTPClient(client *http.Client) *GetViewFailoverParams { - return &GetViewFailoverParams{ - HTTPClient: client, - } -} - -/* -GetViewFailoverParams contains all the parameters to send to the API endpoint - - for the get view failover operation. - - Typically these are written to a http.Request. -*/ -type GetViewFailoverParams struct { - - /* ID. - - Specifies a view id to create an failover task. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewFailoverParams) WithDefaults() *GetViewFailoverParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewFailoverParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view failover params -func (o *GetViewFailoverParams) WithTimeout(timeout time.Duration) *GetViewFailoverParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view failover params -func (o *GetViewFailoverParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view failover params -func (o *GetViewFailoverParams) WithContext(ctx context.Context) *GetViewFailoverParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view failover params -func (o *GetViewFailoverParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view failover params -func (o *GetViewFailoverParams) WithHTTPClient(client *http.Client) *GetViewFailoverParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view failover params -func (o *GetViewFailoverParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get view failover params -func (o *GetViewFailoverParams) WithID(id int64) *GetViewFailoverParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get view failover params -func (o *GetViewFailoverParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewFailoverParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/get_view_failover_responses.go b/v2/client/failover/get_view_failover_responses.go deleted file mode 100644 index 12b5c707..00000000 --- a/v2/client/failover/get_view_failover_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewFailoverReader is a Reader for the GetViewFailover structure. -type GetViewFailoverReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewFailoverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewFailoverOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewFailoverDefault(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 - } -} - -// NewGetViewFailoverOK creates a GetViewFailoverOK with default headers values -func NewGetViewFailoverOK() *GetViewFailoverOK { - return &GetViewFailoverOK{} -} - -/* -GetViewFailoverOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewFailoverOK struct { - Payload *models.GetViewFailoverResponseBody -} - -// IsSuccess returns true when this get view failover o k response has a 2xx status code -func (o *GetViewFailoverOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view failover o k response has a 3xx status code -func (o *GetViewFailoverOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view failover o k response has a 4xx status code -func (o *GetViewFailoverOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view failover o k response has a 5xx status code -func (o *GetViewFailoverOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view failover o k response a status code equal to that given -func (o *GetViewFailoverOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view failover o k response -func (o *GetViewFailoverOK) Code() int { - return 200 -} - -func (o *GetViewFailoverOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}][%d] getViewFailoverOK %s", 200, payload) -} - -func (o *GetViewFailoverOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}][%d] getViewFailoverOK %s", 200, payload) -} - -func (o *GetViewFailoverOK) GetPayload() *models.GetViewFailoverResponseBody { - return o.Payload -} - -func (o *GetViewFailoverOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewFailoverResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewFailoverDefault creates a GetViewFailoverDefault with default headers values -func NewGetViewFailoverDefault(code int) *GetViewFailoverDefault { - return &GetViewFailoverDefault{ - _statusCode: code, - } -} - -/* -GetViewFailoverDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewFailoverDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view failover default response has a 2xx status code -func (o *GetViewFailoverDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view failover default response has a 3xx status code -func (o *GetViewFailoverDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view failover default response has a 4xx status code -func (o *GetViewFailoverDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view failover default response has a 5xx status code -func (o *GetViewFailoverDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view failover default response a status code equal to that given -func (o *GetViewFailoverDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view failover default response -func (o *GetViewFailoverDefault) Code() int { - return o._statusCode -} - -func (o *GetViewFailoverDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}][%d] GetViewFailover default %s", o._statusCode, payload) -} - -func (o *GetViewFailoverDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/views/{id}][%d] GetViewFailover default %s", o._statusCode, payload) -} - -func (o *GetViewFailoverDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewFailoverDefault) 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/failover/init_failover_parameters.go b/v2/client/failover/init_failover_parameters.go deleted file mode 100644 index 3c89117d..00000000 --- a/v2/client/failover/init_failover_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewInitFailoverParams creates a new InitFailoverParams 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 NewInitFailoverParams() *InitFailoverParams { - return &InitFailoverParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewInitFailoverParamsWithTimeout creates a new InitFailoverParams object -// with the ability to set a timeout on a request. -func NewInitFailoverParamsWithTimeout(timeout time.Duration) *InitFailoverParams { - return &InitFailoverParams{ - timeout: timeout, - } -} - -// NewInitFailoverParamsWithContext creates a new InitFailoverParams object -// with the ability to set a context for a request. -func NewInitFailoverParamsWithContext(ctx context.Context) *InitFailoverParams { - return &InitFailoverParams{ - Context: ctx, - } -} - -// NewInitFailoverParamsWithHTTPClient creates a new InitFailoverParams object -// with the ability to set a custom HTTPClient for a request. -func NewInitFailoverParamsWithHTTPClient(client *http.Client) *InitFailoverParams { - return &InitFailoverParams{ - HTTPClient: client, - } -} - -/* -InitFailoverParams contains all the parameters to send to the API endpoint - - for the init failover operation. - - Typically these are written to a http.Request. -*/ -type InitFailoverParams struct { - - /* Body. - - Specifies the parameters to initiate a failover. This failover request should be intiaited from replication cluster. - */ - Body *models.InitFailoverRequest - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the init failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InitFailoverParams) WithDefaults() *InitFailoverParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the init failover params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InitFailoverParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the init failover params -func (o *InitFailoverParams) WithTimeout(timeout time.Duration) *InitFailoverParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the init failover params -func (o *InitFailoverParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the init failover params -func (o *InitFailoverParams) WithContext(ctx context.Context) *InitFailoverParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the init failover params -func (o *InitFailoverParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the init failover params -func (o *InitFailoverParams) WithHTTPClient(client *http.Client) *InitFailoverParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the init failover params -func (o *InitFailoverParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the init failover params -func (o *InitFailoverParams) WithBody(body *models.InitFailoverRequest) *InitFailoverParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the init failover params -func (o *InitFailoverParams) SetBody(body *models.InitFailoverRequest) { - o.Body = body -} - -// WithID adds the id to the init failover params -func (o *InitFailoverParams) WithID(id string) *InitFailoverParams { - o.SetID(id) - return o -} - -// SetID adds the id to the init failover params -func (o *InitFailoverParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *InitFailoverParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/init_failover_responses.go b/v2/client/failover/init_failover_responses.go deleted file mode 100644 index b142e393..00000000 --- a/v2/client/failover/init_failover_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// InitFailoverReader is a Reader for the InitFailover structure. -type InitFailoverReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *InitFailoverReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewInitFailoverCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewInitFailoverDefault(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 - } -} - -// NewInitFailoverCreated creates a InitFailoverCreated with default headers values -func NewInitFailoverCreated() *InitFailoverCreated { - return &InitFailoverCreated{} -} - -/* -InitFailoverCreated describes a response with status code 201, with default header values. - -Success -*/ -type InitFailoverCreated struct { - Payload *models.InitFailoverResponse -} - -// IsSuccess returns true when this init failover created response has a 2xx status code -func (o *InitFailoverCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this init failover created response has a 3xx status code -func (o *InitFailoverCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this init failover created response has a 4xx status code -func (o *InitFailoverCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this init failover created response has a 5xx status code -func (o *InitFailoverCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this init failover created response a status code equal to that given -func (o *InitFailoverCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the init failover created response -func (o *InitFailoverCreated) Code() int { - return 201 -} - -func (o *InitFailoverCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}][%d] initFailoverCreated %s", 201, payload) -} - -func (o *InitFailoverCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}][%d] initFailoverCreated %s", 201, payload) -} - -func (o *InitFailoverCreated) GetPayload() *models.InitFailoverResponse { - return o.Payload -} - -func (o *InitFailoverCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InitFailoverResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInitFailoverDefault creates a InitFailoverDefault with default headers values -func NewInitFailoverDefault(code int) *InitFailoverDefault { - return &InitFailoverDefault{ - _statusCode: code, - } -} - -/* -InitFailoverDefault describes a response with status code -1, with default header values. - -Error -*/ -type InitFailoverDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this init failover default response has a 2xx status code -func (o *InitFailoverDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this init failover default response has a 3xx status code -func (o *InitFailoverDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this init failover default response has a 4xx status code -func (o *InitFailoverDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this init failover default response has a 5xx status code -func (o *InitFailoverDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this init failover default response a status code equal to that given -func (o *InitFailoverDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the init failover default response -func (o *InitFailoverDefault) Code() int { - return o._statusCode -} - -func (o *InitFailoverDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}][%d] InitFailover default %s", o._statusCode, payload) -} - -func (o *InitFailoverDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}][%d] InitFailover default %s", o._statusCode, payload) -} - -func (o *InitFailoverDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *InitFailoverDefault) 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/failover/object_linkage_parameters.go b/v2/client/failover/object_linkage_parameters.go deleted file mode 100644 index 4fb7ee78..00000000 --- a/v2/client/failover/object_linkage_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewObjectLinkageParams creates a new ObjectLinkageParams 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 NewObjectLinkageParams() *ObjectLinkageParams { - return &ObjectLinkageParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewObjectLinkageParamsWithTimeout creates a new ObjectLinkageParams object -// with the ability to set a timeout on a request. -func NewObjectLinkageParamsWithTimeout(timeout time.Duration) *ObjectLinkageParams { - return &ObjectLinkageParams{ - timeout: timeout, - } -} - -// NewObjectLinkageParamsWithContext creates a new ObjectLinkageParams object -// with the ability to set a context for a request. -func NewObjectLinkageParamsWithContext(ctx context.Context) *ObjectLinkageParams { - return &ObjectLinkageParams{ - Context: ctx, - } -} - -// NewObjectLinkageParamsWithHTTPClient creates a new ObjectLinkageParams object -// with the ability to set a custom HTTPClient for a request. -func NewObjectLinkageParamsWithHTTPClient(client *http.Client) *ObjectLinkageParams { - return &ObjectLinkageParams{ - HTTPClient: client, - } -} - -/* -ObjectLinkageParams contains all the parameters to send to the API endpoint - - for the object linkage operation. - - Typically these are written to a http.Request. -*/ -type ObjectLinkageParams struct { - - /* Body. - - Specifies the paramteres to create links between replicated objects and failover objects. - */ - Body *models.ObjectLinkingRequest - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the object linkage params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ObjectLinkageParams) WithDefaults() *ObjectLinkageParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the object linkage params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ObjectLinkageParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the object linkage params -func (o *ObjectLinkageParams) WithTimeout(timeout time.Duration) *ObjectLinkageParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the object linkage params -func (o *ObjectLinkageParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the object linkage params -func (o *ObjectLinkageParams) WithContext(ctx context.Context) *ObjectLinkageParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the object linkage params -func (o *ObjectLinkageParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the object linkage params -func (o *ObjectLinkageParams) WithHTTPClient(client *http.Client) *ObjectLinkageParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the object linkage params -func (o *ObjectLinkageParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the object linkage params -func (o *ObjectLinkageParams) WithBody(body *models.ObjectLinkingRequest) *ObjectLinkageParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the object linkage params -func (o *ObjectLinkageParams) SetBody(body *models.ObjectLinkingRequest) { - o.Body = body -} - -// WithID adds the id to the object linkage params -func (o *ObjectLinkageParams) WithID(id string) *ObjectLinkageParams { - o.SetID(id) - return o -} - -// SetID adds the id to the object linkage params -func (o *ObjectLinkageParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ObjectLinkageParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/object_linkage_responses.go b/v2/client/failover/object_linkage_responses.go deleted file mode 100644 index 6875c574..00000000 --- a/v2/client/failover/object_linkage_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ObjectLinkageReader is a Reader for the ObjectLinkage structure. -type ObjectLinkageReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ObjectLinkageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewObjectLinkageCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewObjectLinkageDefault(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 - } -} - -// NewObjectLinkageCreated creates a ObjectLinkageCreated with default headers values -func NewObjectLinkageCreated() *ObjectLinkageCreated { - return &ObjectLinkageCreated{} -} - -/* -ObjectLinkageCreated describes a response with status code 201, with default header values. - -No Content -*/ -type ObjectLinkageCreated struct { -} - -// IsSuccess returns true when this object linkage created response has a 2xx status code -func (o *ObjectLinkageCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this object linkage created response has a 3xx status code -func (o *ObjectLinkageCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this object linkage created response has a 4xx status code -func (o *ObjectLinkageCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this object linkage created response has a 5xx status code -func (o *ObjectLinkageCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this object linkage created response a status code equal to that given -func (o *ObjectLinkageCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the object linkage created response -func (o *ObjectLinkageCreated) Code() int { - return 201 -} - -func (o *ObjectLinkageCreated) Error() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/object-linkage][%d] objectLinkageCreated", 201) -} - -func (o *ObjectLinkageCreated) String() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/object-linkage][%d] objectLinkageCreated", 201) -} - -func (o *ObjectLinkageCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewObjectLinkageDefault creates a ObjectLinkageDefault with default headers values -func NewObjectLinkageDefault(code int) *ObjectLinkageDefault { - return &ObjectLinkageDefault{ - _statusCode: code, - } -} - -/* -ObjectLinkageDefault describes a response with status code -1, with default header values. - -Error -*/ -type ObjectLinkageDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this object linkage default response has a 2xx status code -func (o *ObjectLinkageDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this object linkage default response has a 3xx status code -func (o *ObjectLinkageDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this object linkage default response has a 4xx status code -func (o *ObjectLinkageDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this object linkage default response has a 5xx status code -func (o *ObjectLinkageDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this object linkage default response a status code equal to that given -func (o *ObjectLinkageDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the object linkage default response -func (o *ObjectLinkageDefault) Code() int { - return o._statusCode -} - -func (o *ObjectLinkageDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/object-linkage][%d] ObjectLinkage default %s", o._statusCode, payload) -} - -func (o *ObjectLinkageDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/object-linkage][%d] ObjectLinkage default %s", o._statusCode, payload) -} - -func (o *ObjectLinkageDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ObjectLinkageDefault) 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/failover/poll_planned_runs_parameters.go b/v2/client/failover/poll_planned_runs_parameters.go deleted file mode 100644 index ef731e33..00000000 --- a/v2/client/failover/poll_planned_runs_parameters.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/go-openapi/swag" -) - -// NewPollPlannedRunsParams creates a new PollPlannedRunsParams 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 NewPollPlannedRunsParams() *PollPlannedRunsParams { - return &PollPlannedRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPollPlannedRunsParamsWithTimeout creates a new PollPlannedRunsParams object -// with the ability to set a timeout on a request. -func NewPollPlannedRunsParamsWithTimeout(timeout time.Duration) *PollPlannedRunsParams { - return &PollPlannedRunsParams{ - timeout: timeout, - } -} - -// NewPollPlannedRunsParamsWithContext creates a new PollPlannedRunsParams object -// with the ability to set a context for a request. -func NewPollPlannedRunsParamsWithContext(ctx context.Context) *PollPlannedRunsParams { - return &PollPlannedRunsParams{ - Context: ctx, - } -} - -// NewPollPlannedRunsParamsWithHTTPClient creates a new PollPlannedRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewPollPlannedRunsParamsWithHTTPClient(client *http.Client) *PollPlannedRunsParams { - return &PollPlannedRunsParams{ - HTTPClient: client, - } -} - -/* -PollPlannedRunsParams contains all the parameters to send to the API endpoint - - for the poll planned runs operation. - - Typically these are written to a http.Request. -*/ -type PollPlannedRunsParams struct { - - /* FailoverIds. - - Get runs for specific failover workflows. - */ - FailoverIds []string - - /* IncludeTenants. - - If true, the response will include Protection Groups which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. - */ - IncludeTenants *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the poll planned runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PollPlannedRunsParams) WithDefaults() *PollPlannedRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the poll planned runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PollPlannedRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the poll planned runs params -func (o *PollPlannedRunsParams) WithTimeout(timeout time.Duration) *PollPlannedRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the poll planned runs params -func (o *PollPlannedRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the poll planned runs params -func (o *PollPlannedRunsParams) WithContext(ctx context.Context) *PollPlannedRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the poll planned runs params -func (o *PollPlannedRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the poll planned runs params -func (o *PollPlannedRunsParams) WithHTTPClient(client *http.Client) *PollPlannedRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the poll planned runs params -func (o *PollPlannedRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFailoverIds adds the failoverIds to the poll planned runs params -func (o *PollPlannedRunsParams) WithFailoverIds(failoverIds []string) *PollPlannedRunsParams { - o.SetFailoverIds(failoverIds) - return o -} - -// SetFailoverIds adds the failoverIds to the poll planned runs params -func (o *PollPlannedRunsParams) SetFailoverIds(failoverIds []string) { - o.FailoverIds = failoverIds -} - -// WithIncludeTenants adds the includeTenants to the poll planned runs params -func (o *PollPlannedRunsParams) WithIncludeTenants(includeTenants *bool) *PollPlannedRunsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the poll planned runs params -func (o *PollPlannedRunsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithTenantIds adds the tenantIds to the poll planned runs params -func (o *PollPlannedRunsParams) WithTenantIds(tenantIds []string) *PollPlannedRunsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the poll planned runs params -func (o *PollPlannedRunsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *PollPlannedRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FailoverIds != nil { - - // binding items for failoverIds - joinedFailoverIds := o.bindParamFailoverIds(reg) - - // query array param failoverIds - if err := r.SetQueryParam("failoverIds", joinedFailoverIds...); 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.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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamPollPlannedRuns binds the parameter failoverIds -func (o *PollPlannedRunsParams) bindParamFailoverIds(formats strfmt.Registry) []string { - failoverIdsIR := o.FailoverIds - - var failoverIdsIC []string - for _, failoverIdsIIR := range failoverIdsIR { // explode []string - - failoverIdsIIV := failoverIdsIIR // string as string - failoverIdsIC = append(failoverIdsIC, failoverIdsIIV) - } - - // items.CollectionFormat: "" - failoverIdsIS := swag.JoinByFormat(failoverIdsIC, "") - - return failoverIdsIS -} - -// bindParamPollPlannedRuns binds the parameter tenantIds -func (o *PollPlannedRunsParams) 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/client/failover/poll_planned_runs_responses.go b/v2/client/failover/poll_planned_runs_responses.go deleted file mode 100644 index cc5e2bf7..00000000 --- a/v2/client/failover/poll_planned_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PollPlannedRunsReader is a Reader for the PollPlannedRuns structure. -type PollPlannedRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PollPlannedRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPollPlannedRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPollPlannedRunsDefault(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 - } -} - -// NewPollPlannedRunsOK creates a PollPlannedRunsOK with default headers values -func NewPollPlannedRunsOK() *PollPlannedRunsOK { - return &PollPlannedRunsOK{} -} - -/* -PollPlannedRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type PollPlannedRunsOK struct { - Payload *models.FailoverRunsResponse -} - -// IsSuccess returns true when this poll planned runs o k response has a 2xx status code -func (o *PollPlannedRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this poll planned runs o k response has a 3xx status code -func (o *PollPlannedRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this poll planned runs o k response has a 4xx status code -func (o *PollPlannedRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this poll planned runs o k response has a 5xx status code -func (o *PollPlannedRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this poll planned runs o k response a status code equal to that given -func (o *PollPlannedRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the poll planned runs o k response -func (o *PollPlannedRunsOK) Code() int { - return 200 -} - -func (o *PollPlannedRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/planned-runs][%d] pollPlannedRunsOK %s", 200, payload) -} - -func (o *PollPlannedRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/planned-runs][%d] pollPlannedRunsOK %s", 200, payload) -} - -func (o *PollPlannedRunsOK) GetPayload() *models.FailoverRunsResponse { - return o.Payload -} - -func (o *PollPlannedRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FailoverRunsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPollPlannedRunsDefault creates a PollPlannedRunsDefault with default headers values -func NewPollPlannedRunsDefault(code int) *PollPlannedRunsDefault { - return &PollPlannedRunsDefault{ - _statusCode: code, - } -} - -/* -PollPlannedRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type PollPlannedRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this poll planned runs default response has a 2xx status code -func (o *PollPlannedRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this poll planned runs default response has a 3xx status code -func (o *PollPlannedRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this poll planned runs default response has a 4xx status code -func (o *PollPlannedRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this poll planned runs default response has a 5xx status code -func (o *PollPlannedRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this poll planned runs default response a status code equal to that given -func (o *PollPlannedRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the poll planned runs default response -func (o *PollPlannedRunsDefault) Code() int { - return o._statusCode -} - -func (o *PollPlannedRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/planned-runs][%d] PollPlannedRuns default %s", o._statusCode, payload) -} - -func (o *PollPlannedRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/failover/planned-runs][%d] PollPlannedRuns default %s", o._statusCode, payload) -} - -func (o *PollPlannedRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PollPlannedRunsDefault) 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/failover/replication_backup_activation_parameters.go b/v2/client/failover/replication_backup_activation_parameters.go deleted file mode 100644 index 38c1aaea..00000000 --- a/v2/client/failover/replication_backup_activation_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewReplicationBackupActivationParams creates a new ReplicationBackupActivationParams 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 NewReplicationBackupActivationParams() *ReplicationBackupActivationParams { - return &ReplicationBackupActivationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReplicationBackupActivationParamsWithTimeout creates a new ReplicationBackupActivationParams object -// with the ability to set a timeout on a request. -func NewReplicationBackupActivationParamsWithTimeout(timeout time.Duration) *ReplicationBackupActivationParams { - return &ReplicationBackupActivationParams{ - timeout: timeout, - } -} - -// NewReplicationBackupActivationParamsWithContext creates a new ReplicationBackupActivationParams object -// with the ability to set a context for a request. -func NewReplicationBackupActivationParamsWithContext(ctx context.Context) *ReplicationBackupActivationParams { - return &ReplicationBackupActivationParams{ - Context: ctx, - } -} - -// NewReplicationBackupActivationParamsWithHTTPClient creates a new ReplicationBackupActivationParams object -// with the ability to set a custom HTTPClient for a request. -func NewReplicationBackupActivationParamsWithHTTPClient(client *http.Client) *ReplicationBackupActivationParams { - return &ReplicationBackupActivationParams{ - HTTPClient: client, - } -} - -/* -ReplicationBackupActivationParams contains all the parameters to send to the API endpoint - - for the replication backup activation operation. - - Typically these are written to a http.Request. -*/ -type ReplicationBackupActivationParams struct { - - /* Body. - - Specifies the paramteres to activate the backup of failover entities. - */ - Body *models.ReplicationBackupActivation - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the replication backup activation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReplicationBackupActivationParams) WithDefaults() *ReplicationBackupActivationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the replication backup activation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReplicationBackupActivationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the replication backup activation params -func (o *ReplicationBackupActivationParams) WithTimeout(timeout time.Duration) *ReplicationBackupActivationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the replication backup activation params -func (o *ReplicationBackupActivationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the replication backup activation params -func (o *ReplicationBackupActivationParams) WithContext(ctx context.Context) *ReplicationBackupActivationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the replication backup activation params -func (o *ReplicationBackupActivationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the replication backup activation params -func (o *ReplicationBackupActivationParams) WithHTTPClient(client *http.Client) *ReplicationBackupActivationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the replication backup activation params -func (o *ReplicationBackupActivationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the replication backup activation params -func (o *ReplicationBackupActivationParams) WithBody(body *models.ReplicationBackupActivation) *ReplicationBackupActivationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the replication backup activation params -func (o *ReplicationBackupActivationParams) SetBody(body *models.ReplicationBackupActivation) { - o.Body = body -} - -// WithID adds the id to the replication backup activation params -func (o *ReplicationBackupActivationParams) WithID(id string) *ReplicationBackupActivationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the replication backup activation params -func (o *ReplicationBackupActivationParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ReplicationBackupActivationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/replication_backup_activation_responses.go b/v2/client/failover/replication_backup_activation_responses.go deleted file mode 100644 index 80cf4b76..00000000 --- a/v2/client/failover/replication_backup_activation_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ReplicationBackupActivationReader is a Reader for the ReplicationBackupActivation structure. -type ReplicationBackupActivationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReplicationBackupActivationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewReplicationBackupActivationCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewReplicationBackupActivationDefault(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 - } -} - -// NewReplicationBackupActivationCreated creates a ReplicationBackupActivationCreated with default headers values -func NewReplicationBackupActivationCreated() *ReplicationBackupActivationCreated { - return &ReplicationBackupActivationCreated{} -} - -/* -ReplicationBackupActivationCreated describes a response with status code 201, with default header values. - -Success -*/ -type ReplicationBackupActivationCreated struct { - Payload *models.ReplicationBackupActivationResult -} - -// IsSuccess returns true when this replication backup activation created response has a 2xx status code -func (o *ReplicationBackupActivationCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this replication backup activation created response has a 3xx status code -func (o *ReplicationBackupActivationCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this replication backup activation created response has a 4xx status code -func (o *ReplicationBackupActivationCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this replication backup activation created response has a 5xx status code -func (o *ReplicationBackupActivationCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this replication backup activation created response a status code equal to that given -func (o *ReplicationBackupActivationCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the replication backup activation created response -func (o *ReplicationBackupActivationCreated) Code() int { - return 201 -} - -func (o *ReplicationBackupActivationCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-activation][%d] replicationBackupActivationCreated %s", 201, payload) -} - -func (o *ReplicationBackupActivationCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-activation][%d] replicationBackupActivationCreated %s", 201, payload) -} - -func (o *ReplicationBackupActivationCreated) GetPayload() *models.ReplicationBackupActivationResult { - return o.Payload -} - -func (o *ReplicationBackupActivationCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ReplicationBackupActivationResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReplicationBackupActivationDefault creates a ReplicationBackupActivationDefault with default headers values -func NewReplicationBackupActivationDefault(code int) *ReplicationBackupActivationDefault { - return &ReplicationBackupActivationDefault{ - _statusCode: code, - } -} - -/* -ReplicationBackupActivationDefault describes a response with status code -1, with default header values. - -Error -*/ -type ReplicationBackupActivationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this replication backup activation default response has a 2xx status code -func (o *ReplicationBackupActivationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this replication backup activation default response has a 3xx status code -func (o *ReplicationBackupActivationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this replication backup activation default response has a 4xx status code -func (o *ReplicationBackupActivationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this replication backup activation default response has a 5xx status code -func (o *ReplicationBackupActivationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this replication backup activation default response a status code equal to that given -func (o *ReplicationBackupActivationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the replication backup activation default response -func (o *ReplicationBackupActivationDefault) Code() int { - return o._statusCode -} - -func (o *ReplicationBackupActivationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-activation][%d] ReplicationBackupActivation default %s", o._statusCode, payload) -} - -func (o *ReplicationBackupActivationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-activation][%d] ReplicationBackupActivation default %s", o._statusCode, payload) -} - -func (o *ReplicationBackupActivationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ReplicationBackupActivationDefault) 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/failover/source_backup_deactivation_parameters.go b/v2/client/failover/source_backup_deactivation_parameters.go deleted file mode 100644 index c822f32e..00000000 --- a/v2/client/failover/source_backup_deactivation_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewSourceBackupDeactivationParams creates a new SourceBackupDeactivationParams 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 NewSourceBackupDeactivationParams() *SourceBackupDeactivationParams { - return &SourceBackupDeactivationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSourceBackupDeactivationParamsWithTimeout creates a new SourceBackupDeactivationParams object -// with the ability to set a timeout on a request. -func NewSourceBackupDeactivationParamsWithTimeout(timeout time.Duration) *SourceBackupDeactivationParams { - return &SourceBackupDeactivationParams{ - timeout: timeout, - } -} - -// NewSourceBackupDeactivationParamsWithContext creates a new SourceBackupDeactivationParams object -// with the ability to set a context for a request. -func NewSourceBackupDeactivationParamsWithContext(ctx context.Context) *SourceBackupDeactivationParams { - return &SourceBackupDeactivationParams{ - Context: ctx, - } -} - -// NewSourceBackupDeactivationParamsWithHTTPClient creates a new SourceBackupDeactivationParams object -// with the ability to set a custom HTTPClient for a request. -func NewSourceBackupDeactivationParamsWithHTTPClient(client *http.Client) *SourceBackupDeactivationParams { - return &SourceBackupDeactivationParams{ - HTTPClient: client, - } -} - -/* -SourceBackupDeactivationParams contains all the parameters to send to the API endpoint - - for the source backup deactivation operation. - - Typically these are written to a http.Request. -*/ -type SourceBackupDeactivationParams struct { - - /* Body. - - Specifies the paramteres to deactivate the backup of failover entities. - */ - Body *models.SourceBackupDeactivation - - /* ID. - - Specifies the id of the failover workflow. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the source backup deactivation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SourceBackupDeactivationParams) WithDefaults() *SourceBackupDeactivationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the source backup deactivation params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SourceBackupDeactivationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the source backup deactivation params -func (o *SourceBackupDeactivationParams) WithTimeout(timeout time.Duration) *SourceBackupDeactivationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the source backup deactivation params -func (o *SourceBackupDeactivationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the source backup deactivation params -func (o *SourceBackupDeactivationParams) WithContext(ctx context.Context) *SourceBackupDeactivationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the source backup deactivation params -func (o *SourceBackupDeactivationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the source backup deactivation params -func (o *SourceBackupDeactivationParams) WithHTTPClient(client *http.Client) *SourceBackupDeactivationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the source backup deactivation params -func (o *SourceBackupDeactivationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the source backup deactivation params -func (o *SourceBackupDeactivationParams) WithBody(body *models.SourceBackupDeactivation) *SourceBackupDeactivationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the source backup deactivation params -func (o *SourceBackupDeactivationParams) SetBody(body *models.SourceBackupDeactivation) { - o.Body = body -} - -// WithID adds the id to the source backup deactivation params -func (o *SourceBackupDeactivationParams) WithID(id string) *SourceBackupDeactivationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the source backup deactivation params -func (o *SourceBackupDeactivationParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *SourceBackupDeactivationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/failover/source_backup_deactivation_responses.go b/v2/client/failover/source_backup_deactivation_responses.go deleted file mode 100644 index 64b8aebd..00000000 --- a/v2/client/failover/source_backup_deactivation_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package failover - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SourceBackupDeactivationReader is a Reader for the SourceBackupDeactivation structure. -type SourceBackupDeactivationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SourceBackupDeactivationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewSourceBackupDeactivationCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSourceBackupDeactivationDefault(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 - } -} - -// NewSourceBackupDeactivationCreated creates a SourceBackupDeactivationCreated with default headers values -func NewSourceBackupDeactivationCreated() *SourceBackupDeactivationCreated { - return &SourceBackupDeactivationCreated{} -} - -/* -SourceBackupDeactivationCreated describes a response with status code 201, with default header values. - -No Content -*/ -type SourceBackupDeactivationCreated struct { -} - -// IsSuccess returns true when this source backup deactivation created response has a 2xx status code -func (o *SourceBackupDeactivationCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this source backup deactivation created response has a 3xx status code -func (o *SourceBackupDeactivationCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this source backup deactivation created response has a 4xx status code -func (o *SourceBackupDeactivationCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this source backup deactivation created response has a 5xx status code -func (o *SourceBackupDeactivationCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this source backup deactivation created response a status code equal to that given -func (o *SourceBackupDeactivationCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the source backup deactivation created response -func (o *SourceBackupDeactivationCreated) Code() int { - return 201 -} - -func (o *SourceBackupDeactivationCreated) Error() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-deactivation][%d] sourceBackupDeactivationCreated", 201) -} - -func (o *SourceBackupDeactivationCreated) String() string { - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-deactivation][%d] sourceBackupDeactivationCreated", 201) -} - -func (o *SourceBackupDeactivationCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewSourceBackupDeactivationDefault creates a SourceBackupDeactivationDefault with default headers values -func NewSourceBackupDeactivationDefault(code int) *SourceBackupDeactivationDefault { - return &SourceBackupDeactivationDefault{ - _statusCode: code, - } -} - -/* -SourceBackupDeactivationDefault describes a response with status code -1, with default header values. - -Error -*/ -type SourceBackupDeactivationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this source backup deactivation default response has a 2xx status code -func (o *SourceBackupDeactivationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this source backup deactivation default response has a 3xx status code -func (o *SourceBackupDeactivationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this source backup deactivation default response has a 4xx status code -func (o *SourceBackupDeactivationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this source backup deactivation default response has a 5xx status code -func (o *SourceBackupDeactivationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this source backup deactivation default response a status code equal to that given -func (o *SourceBackupDeactivationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the source backup deactivation default response -func (o *SourceBackupDeactivationDefault) Code() int { - return o._statusCode -} - -func (o *SourceBackupDeactivationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-deactivation][%d] SourceBackupDeactivation default %s", o._statusCode, payload) -} - -func (o *SourceBackupDeactivationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/failover/{id}/backup-deactivation][%d] SourceBackupDeactivation default %s", o._statusCode, payload) -} - -func (o *SourceBackupDeactivationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SourceBackupDeactivationDefault) 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/firewall/firewall_client.go b/v2/client/firewall/firewall_client.go deleted file mode 100644 index 3e5f90c0..00000000 --- a/v2/client/firewall/firewall_client.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new firewall API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new firewall API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new firewall API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for firewall API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ListFirewallIPSets(params *ListFirewallIPSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFirewallIPSetsOK, error) - - ListFirewallProfiles(params *ListFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFirewallProfilesOK, error) - - RemoveFirewallProfiles(params *RemoveFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveFirewallProfilesOK, error) - - ResetFirewallProfile(params *ResetFirewallProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ResetFirewallProfileNoContent, error) - - UpdateFirewallIPSets(params *UpdateFirewallIPSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallIPSetsOK, error) - - UpdateFirewallProfile(params *UpdateFirewallProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallProfileOK, error) - - UpdateFirewallProfiles(params *UpdateFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallProfilesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ListFirewallIPSets lists all firewall IP sets - -List all firewall IP sets. -*/ -func (a *Client) ListFirewallIPSets(params *ListFirewallIPSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFirewallIPSetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListFirewallIPSetsParams() - } - op := &runtime.ClientOperation{ - ID: "ListFirewallIPSets", - Method: "GET", - PathPattern: "/network/firewall/ip-sets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListFirewallIPSetsReader{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.(*ListFirewallIPSetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListFirewallIPSetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListFirewallProfiles lists all firewall profiles - -List the firewall profiles & their attachments. -*/ -func (a *Client) ListFirewallProfiles(params *ListFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFirewallProfilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListFirewallProfilesParams() - } - op := &runtime.ClientOperation{ - ID: "ListFirewallProfiles", - Method: "GET", - PathPattern: "/network/firewall/profiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListFirewallProfilesReader{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.(*ListFirewallProfilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListFirewallProfilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveFirewallProfiles removes firewall profiles - -Remove firewall profiles and their attachments. -*/ -func (a *Client) RemoveFirewallProfiles(params *RemoveFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveFirewallProfilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveFirewallProfilesParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveFirewallProfiles", - Method: "PUT", - PathPattern: "/network/firewall/profile/remove", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveFirewallProfilesReader{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.(*RemoveFirewallProfilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveFirewallProfilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ResetFirewallProfile resets firewall profiles - -Reset firewall profiles, ip-sets & their attachments. -*/ -func (a *Client) ResetFirewallProfile(params *ResetFirewallProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ResetFirewallProfileNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewResetFirewallProfileParams() - } - op := &runtime.ClientOperation{ - ID: "ResetFirewallProfile", - Method: "POST", - PathPattern: "/network/firewall/profiles/reset", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ResetFirewallProfileReader{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.(*ResetFirewallProfileNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ResetFirewallProfileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateFirewallIPSets updates firewall IP sets - -Update firewall IP sets. -*/ -func (a *Client) UpdateFirewallIPSets(params *UpdateFirewallIPSetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallIPSetsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateFirewallIPSetsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateFirewallIPSets", - Method: "PUT", - PathPattern: "/network/firewall/ip-sets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateFirewallIPSetsReader{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.(*UpdateFirewallIPSetsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateFirewallIPSetsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateFirewallProfile updates firewall profiles and their attachments - -Update the firewall profiles and/or their attachments. -*/ -func (a *Client) UpdateFirewallProfile(params *UpdateFirewallProfileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallProfileOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateFirewallProfileParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateFirewallProfile", - Method: "PUT", - PathPattern: "/network/firewall/profile", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateFirewallProfileReader{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.(*UpdateFirewallProfileOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateFirewallProfileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateFirewallProfiles updates firewall profiles and their attachments - -Update the firewall profiles and/or their attachments. -*/ -func (a *Client) UpdateFirewallProfiles(params *UpdateFirewallProfilesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFirewallProfilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateFirewallProfilesParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateFirewallProfiles", - Method: "PUT", - PathPattern: "/network/firewall/profiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateFirewallProfilesReader{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.(*UpdateFirewallProfilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateFirewallProfilesDefault) - 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/v2/client/firewall/list_firewall_ip_sets_parameters.go b/v2/client/firewall/list_firewall_ip_sets_parameters.go deleted file mode 100644 index d787ffc4..00000000 --- a/v2/client/firewall/list_firewall_ip_sets_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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" -) - -// NewListFirewallIPSetsParams creates a new ListFirewallIPSetsParams 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 NewListFirewallIPSetsParams() *ListFirewallIPSetsParams { - return &ListFirewallIPSetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListFirewallIPSetsParamsWithTimeout creates a new ListFirewallIPSetsParams object -// with the ability to set a timeout on a request. -func NewListFirewallIPSetsParamsWithTimeout(timeout time.Duration) *ListFirewallIPSetsParams { - return &ListFirewallIPSetsParams{ - timeout: timeout, - } -} - -// NewListFirewallIPSetsParamsWithContext creates a new ListFirewallIPSetsParams object -// with the ability to set a context for a request. -func NewListFirewallIPSetsParamsWithContext(ctx context.Context) *ListFirewallIPSetsParams { - return &ListFirewallIPSetsParams{ - Context: ctx, - } -} - -// NewListFirewallIPSetsParamsWithHTTPClient creates a new ListFirewallIPSetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListFirewallIPSetsParamsWithHTTPClient(client *http.Client) *ListFirewallIPSetsParams { - return &ListFirewallIPSetsParams{ - HTTPClient: client, - } -} - -/* -ListFirewallIPSetsParams contains all the parameters to send to the API endpoint - - for the list firewall IP sets operation. - - Typically these are written to a http.Request. -*/ -type ListFirewallIPSetsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list firewall IP sets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFirewallIPSetsParams) WithDefaults() *ListFirewallIPSetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list firewall IP sets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFirewallIPSetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) WithTimeout(timeout time.Duration) *ListFirewallIPSetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) WithContext(ctx context.Context) *ListFirewallIPSetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) WithHTTPClient(client *http.Client) *ListFirewallIPSetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list firewall IP sets params -func (o *ListFirewallIPSetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListFirewallIPSetsParams) 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/firewall/list_firewall_ip_sets_responses.go b/v2/client/firewall/list_firewall_ip_sets_responses.go deleted file mode 100644 index 51b9d856..00000000 --- a/v2/client/firewall/list_firewall_ip_sets_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListFirewallIPSetsReader is a Reader for the ListFirewallIPSets structure. -type ListFirewallIPSetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListFirewallIPSetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListFirewallIPSetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListFirewallIPSetsDefault(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 - } -} - -// NewListFirewallIPSetsOK creates a ListFirewallIPSetsOK with default headers values -func NewListFirewallIPSetsOK() *ListFirewallIPSetsOK { - return &ListFirewallIPSetsOK{} -} - -/* -ListFirewallIPSetsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListFirewallIPSetsOK struct { - Payload *models.FirewallIPSets -} - -// IsSuccess returns true when this list firewall Ip sets o k response has a 2xx status code -func (o *ListFirewallIPSetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list firewall Ip sets o k response has a 3xx status code -func (o *ListFirewallIPSetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list firewall Ip sets o k response has a 4xx status code -func (o *ListFirewallIPSetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list firewall Ip sets o k response has a 5xx status code -func (o *ListFirewallIPSetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list firewall Ip sets o k response a status code equal to that given -func (o *ListFirewallIPSetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list firewall Ip sets o k response -func (o *ListFirewallIPSetsOK) Code() int { - return 200 -} - -func (o *ListFirewallIPSetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/ip-sets][%d] listFirewallIpSetsOK %s", 200, payload) -} - -func (o *ListFirewallIPSetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/ip-sets][%d] listFirewallIpSetsOK %s", 200, payload) -} - -func (o *ListFirewallIPSetsOK) GetPayload() *models.FirewallIPSets { - return o.Payload -} - -func (o *ListFirewallIPSetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FirewallIPSets) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListFirewallIPSetsDefault creates a ListFirewallIPSetsDefault with default headers values -func NewListFirewallIPSetsDefault(code int) *ListFirewallIPSetsDefault { - return &ListFirewallIPSetsDefault{ - _statusCode: code, - } -} - -/* -ListFirewallIPSetsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListFirewallIPSetsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list firewall IP sets default response has a 2xx status code -func (o *ListFirewallIPSetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list firewall IP sets default response has a 3xx status code -func (o *ListFirewallIPSetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list firewall IP sets default response has a 4xx status code -func (o *ListFirewallIPSetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list firewall IP sets default response has a 5xx status code -func (o *ListFirewallIPSetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list firewall IP sets default response a status code equal to that given -func (o *ListFirewallIPSetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list firewall IP sets default response -func (o *ListFirewallIPSetsDefault) Code() int { - return o._statusCode -} - -func (o *ListFirewallIPSetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/ip-sets][%d] ListFirewallIPSets default %s", o._statusCode, payload) -} - -func (o *ListFirewallIPSetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/ip-sets][%d] ListFirewallIPSets default %s", o._statusCode, payload) -} - -func (o *ListFirewallIPSetsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListFirewallIPSetsDefault) 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/firewall/list_firewall_profiles_parameters.go b/v2/client/firewall/list_firewall_profiles_parameters.go deleted file mode 100644 index d4865fb6..00000000 --- a/v2/client/firewall/list_firewall_profiles_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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" -) - -// NewListFirewallProfilesParams creates a new ListFirewallProfilesParams 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 NewListFirewallProfilesParams() *ListFirewallProfilesParams { - return &ListFirewallProfilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListFirewallProfilesParamsWithTimeout creates a new ListFirewallProfilesParams object -// with the ability to set a timeout on a request. -func NewListFirewallProfilesParamsWithTimeout(timeout time.Duration) *ListFirewallProfilesParams { - return &ListFirewallProfilesParams{ - timeout: timeout, - } -} - -// NewListFirewallProfilesParamsWithContext creates a new ListFirewallProfilesParams object -// with the ability to set a context for a request. -func NewListFirewallProfilesParamsWithContext(ctx context.Context) *ListFirewallProfilesParams { - return &ListFirewallProfilesParams{ - Context: ctx, - } -} - -// NewListFirewallProfilesParamsWithHTTPClient creates a new ListFirewallProfilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListFirewallProfilesParamsWithHTTPClient(client *http.Client) *ListFirewallProfilesParams { - return &ListFirewallProfilesParams{ - HTTPClient: client, - } -} - -/* -ListFirewallProfilesParams contains all the parameters to send to the API endpoint - - for the list firewall profiles operation. - - Typically these are written to a http.Request. -*/ -type ListFirewallProfilesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFirewallProfilesParams) WithDefaults() *ListFirewallProfilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFirewallProfilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list firewall profiles params -func (o *ListFirewallProfilesParams) WithTimeout(timeout time.Duration) *ListFirewallProfilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list firewall profiles params -func (o *ListFirewallProfilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list firewall profiles params -func (o *ListFirewallProfilesParams) WithContext(ctx context.Context) *ListFirewallProfilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list firewall profiles params -func (o *ListFirewallProfilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list firewall profiles params -func (o *ListFirewallProfilesParams) WithHTTPClient(client *http.Client) *ListFirewallProfilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list firewall profiles params -func (o *ListFirewallProfilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListFirewallProfilesParams) 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/firewall/list_firewall_profiles_responses.go b/v2/client/firewall/list_firewall_profiles_responses.go deleted file mode 100644 index 14a36def..00000000 --- a/v2/client/firewall/list_firewall_profiles_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListFirewallProfilesReader is a Reader for the ListFirewallProfiles structure. -type ListFirewallProfilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListFirewallProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListFirewallProfilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListFirewallProfilesDefault(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 - } -} - -// NewListFirewallProfilesOK creates a ListFirewallProfilesOK with default headers values -func NewListFirewallProfilesOK() *ListFirewallProfilesOK { - return &ListFirewallProfilesOK{} -} - -/* -ListFirewallProfilesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListFirewallProfilesOK struct { - Payload *models.FirewallProfiles -} - -// IsSuccess returns true when this list firewall profiles o k response has a 2xx status code -func (o *ListFirewallProfilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list firewall profiles o k response has a 3xx status code -func (o *ListFirewallProfilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list firewall profiles o k response has a 4xx status code -func (o *ListFirewallProfilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list firewall profiles o k response has a 5xx status code -func (o *ListFirewallProfilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list firewall profiles o k response a status code equal to that given -func (o *ListFirewallProfilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list firewall profiles o k response -func (o *ListFirewallProfilesOK) Code() int { - return 200 -} - -func (o *ListFirewallProfilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/profiles][%d] listFirewallProfilesOK %s", 200, payload) -} - -func (o *ListFirewallProfilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/profiles][%d] listFirewallProfilesOK %s", 200, payload) -} - -func (o *ListFirewallProfilesOK) GetPayload() *models.FirewallProfiles { - return o.Payload -} - -func (o *ListFirewallProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FirewallProfiles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListFirewallProfilesDefault creates a ListFirewallProfilesDefault with default headers values -func NewListFirewallProfilesDefault(code int) *ListFirewallProfilesDefault { - return &ListFirewallProfilesDefault{ - _statusCode: code, - } -} - -/* -ListFirewallProfilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListFirewallProfilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list firewall profiles default response has a 2xx status code -func (o *ListFirewallProfilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list firewall profiles default response has a 3xx status code -func (o *ListFirewallProfilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list firewall profiles default response has a 4xx status code -func (o *ListFirewallProfilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list firewall profiles default response has a 5xx status code -func (o *ListFirewallProfilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list firewall profiles default response a status code equal to that given -func (o *ListFirewallProfilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list firewall profiles default response -func (o *ListFirewallProfilesDefault) Code() int { - return o._statusCode -} - -func (o *ListFirewallProfilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/profiles][%d] ListFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *ListFirewallProfilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/firewall/profiles][%d] ListFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *ListFirewallProfilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListFirewallProfilesDefault) 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/firewall/remove_firewall_profiles_parameters.go b/v2/client/firewall/remove_firewall_profiles_parameters.go deleted file mode 100644 index d786b38c..00000000 --- a/v2/client/firewall/remove_firewall_profiles_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRemoveFirewallProfilesParams creates a new RemoveFirewallProfilesParams 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 NewRemoveFirewallProfilesParams() *RemoveFirewallProfilesParams { - return &RemoveFirewallProfilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveFirewallProfilesParamsWithTimeout creates a new RemoveFirewallProfilesParams object -// with the ability to set a timeout on a request. -func NewRemoveFirewallProfilesParamsWithTimeout(timeout time.Duration) *RemoveFirewallProfilesParams { - return &RemoveFirewallProfilesParams{ - timeout: timeout, - } -} - -// NewRemoveFirewallProfilesParamsWithContext creates a new RemoveFirewallProfilesParams object -// with the ability to set a context for a request. -func NewRemoveFirewallProfilesParamsWithContext(ctx context.Context) *RemoveFirewallProfilesParams { - return &RemoveFirewallProfilesParams{ - Context: ctx, - } -} - -// NewRemoveFirewallProfilesParamsWithHTTPClient creates a new RemoveFirewallProfilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveFirewallProfilesParamsWithHTTPClient(client *http.Client) *RemoveFirewallProfilesParams { - return &RemoveFirewallProfilesParams{ - HTTPClient: client, - } -} - -/* -RemoveFirewallProfilesParams contains all the parameters to send to the API endpoint - - for the remove firewall profiles operation. - - Typically these are written to a http.Request. -*/ -type RemoveFirewallProfilesParams struct { - - /* Body. - - Specifies the parameters to remove firewall profiles and their attachments. - */ - Body *models.FirewallProfileNamesParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveFirewallProfilesParams) WithDefaults() *RemoveFirewallProfilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveFirewallProfilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) WithTimeout(timeout time.Duration) *RemoveFirewallProfilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) WithContext(ctx context.Context) *RemoveFirewallProfilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) WithHTTPClient(client *http.Client) *RemoveFirewallProfilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) WithBody(body *models.FirewallProfileNamesParams) *RemoveFirewallProfilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the remove firewall profiles params -func (o *RemoveFirewallProfilesParams) SetBody(body *models.FirewallProfileNamesParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveFirewallProfilesParams) 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/firewall/remove_firewall_profiles_responses.go b/v2/client/firewall/remove_firewall_profiles_responses.go deleted file mode 100644 index 44586177..00000000 --- a/v2/client/firewall/remove_firewall_profiles_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RemoveFirewallProfilesReader is a Reader for the RemoveFirewallProfiles structure. -type RemoveFirewallProfilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveFirewallProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRemoveFirewallProfilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveFirewallProfilesDefault(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 - } -} - -// NewRemoveFirewallProfilesOK creates a RemoveFirewallProfilesOK with default headers values -func NewRemoveFirewallProfilesOK() *RemoveFirewallProfilesOK { - return &RemoveFirewallProfilesOK{} -} - -/* -RemoveFirewallProfilesOK describes a response with status code 200, with default header values. - -Success -*/ -type RemoveFirewallProfilesOK struct { - Payload *models.SuccessResp -} - -// IsSuccess returns true when this remove firewall profiles o k response has a 2xx status code -func (o *RemoveFirewallProfilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove firewall profiles o k response has a 3xx status code -func (o *RemoveFirewallProfilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove firewall profiles o k response has a 4xx status code -func (o *RemoveFirewallProfilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove firewall profiles o k response has a 5xx status code -func (o *RemoveFirewallProfilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this remove firewall profiles o k response a status code equal to that given -func (o *RemoveFirewallProfilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the remove firewall profiles o k response -func (o *RemoveFirewallProfilesOK) Code() int { - return 200 -} - -func (o *RemoveFirewallProfilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile/remove][%d] removeFirewallProfilesOK %s", 200, payload) -} - -func (o *RemoveFirewallProfilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile/remove][%d] removeFirewallProfilesOK %s", 200, payload) -} - -func (o *RemoveFirewallProfilesOK) GetPayload() *models.SuccessResp { - return o.Payload -} - -func (o *RemoveFirewallProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SuccessResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRemoveFirewallProfilesDefault creates a RemoveFirewallProfilesDefault with default headers values -func NewRemoveFirewallProfilesDefault(code int) *RemoveFirewallProfilesDefault { - return &RemoveFirewallProfilesDefault{ - _statusCode: code, - } -} - -/* -RemoveFirewallProfilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveFirewallProfilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this remove firewall profiles default response has a 2xx status code -func (o *RemoveFirewallProfilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove firewall profiles default response has a 3xx status code -func (o *RemoveFirewallProfilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove firewall profiles default response has a 4xx status code -func (o *RemoveFirewallProfilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove firewall profiles default response has a 5xx status code -func (o *RemoveFirewallProfilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove firewall profiles default response a status code equal to that given -func (o *RemoveFirewallProfilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove firewall profiles default response -func (o *RemoveFirewallProfilesDefault) Code() int { - return o._statusCode -} - -func (o *RemoveFirewallProfilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile/remove][%d] RemoveFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *RemoveFirewallProfilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile/remove][%d] RemoveFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *RemoveFirewallProfilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RemoveFirewallProfilesDefault) 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/firewall/reset_firewall_profile_parameters.go b/v2/client/firewall/reset_firewall_profile_parameters.go deleted file mode 100644 index 013da59c..00000000 --- a/v2/client/firewall/reset_firewall_profile_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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" -) - -// NewResetFirewallProfileParams creates a new ResetFirewallProfileParams 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 NewResetFirewallProfileParams() *ResetFirewallProfileParams { - return &ResetFirewallProfileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewResetFirewallProfileParamsWithTimeout creates a new ResetFirewallProfileParams object -// with the ability to set a timeout on a request. -func NewResetFirewallProfileParamsWithTimeout(timeout time.Duration) *ResetFirewallProfileParams { - return &ResetFirewallProfileParams{ - timeout: timeout, - } -} - -// NewResetFirewallProfileParamsWithContext creates a new ResetFirewallProfileParams object -// with the ability to set a context for a request. -func NewResetFirewallProfileParamsWithContext(ctx context.Context) *ResetFirewallProfileParams { - return &ResetFirewallProfileParams{ - Context: ctx, - } -} - -// NewResetFirewallProfileParamsWithHTTPClient creates a new ResetFirewallProfileParams object -// with the ability to set a custom HTTPClient for a request. -func NewResetFirewallProfileParamsWithHTTPClient(client *http.Client) *ResetFirewallProfileParams { - return &ResetFirewallProfileParams{ - HTTPClient: client, - } -} - -/* -ResetFirewallProfileParams contains all the parameters to send to the API endpoint - - for the reset firewall profile operation. - - Typically these are written to a http.Request. -*/ -type ResetFirewallProfileParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the reset firewall profile params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ResetFirewallProfileParams) WithDefaults() *ResetFirewallProfileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the reset firewall profile params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ResetFirewallProfileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the reset firewall profile params -func (o *ResetFirewallProfileParams) WithTimeout(timeout time.Duration) *ResetFirewallProfileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the reset firewall profile params -func (o *ResetFirewallProfileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the reset firewall profile params -func (o *ResetFirewallProfileParams) WithContext(ctx context.Context) *ResetFirewallProfileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the reset firewall profile params -func (o *ResetFirewallProfileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the reset firewall profile params -func (o *ResetFirewallProfileParams) WithHTTPClient(client *http.Client) *ResetFirewallProfileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the reset firewall profile params -func (o *ResetFirewallProfileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ResetFirewallProfileParams) 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/firewall/reset_firewall_profile_responses.go b/v2/client/firewall/reset_firewall_profile_responses.go deleted file mode 100644 index f97d015e..00000000 --- a/v2/client/firewall/reset_firewall_profile_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ResetFirewallProfileReader is a Reader for the ResetFirewallProfile structure. -type ResetFirewallProfileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ResetFirewallProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewResetFirewallProfileNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewResetFirewallProfileDefault(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 - } -} - -// NewResetFirewallProfileNoContent creates a ResetFirewallProfileNoContent with default headers values -func NewResetFirewallProfileNoContent() *ResetFirewallProfileNoContent { - return &ResetFirewallProfileNoContent{} -} - -/* -ResetFirewallProfileNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ResetFirewallProfileNoContent struct { -} - -// IsSuccess returns true when this reset firewall profile no content response has a 2xx status code -func (o *ResetFirewallProfileNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this reset firewall profile no content response has a 3xx status code -func (o *ResetFirewallProfileNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this reset firewall profile no content response has a 4xx status code -func (o *ResetFirewallProfileNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this reset firewall profile no content response has a 5xx status code -func (o *ResetFirewallProfileNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this reset firewall profile no content response a status code equal to that given -func (o *ResetFirewallProfileNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the reset firewall profile no content response -func (o *ResetFirewallProfileNoContent) Code() int { - return 204 -} - -func (o *ResetFirewallProfileNoContent) Error() string { - return fmt.Sprintf("[POST /network/firewall/profiles/reset][%d] resetFirewallProfileNoContent", 204) -} - -func (o *ResetFirewallProfileNoContent) String() string { - return fmt.Sprintf("[POST /network/firewall/profiles/reset][%d] resetFirewallProfileNoContent", 204) -} - -func (o *ResetFirewallProfileNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewResetFirewallProfileDefault creates a ResetFirewallProfileDefault with default headers values -func NewResetFirewallProfileDefault(code int) *ResetFirewallProfileDefault { - return &ResetFirewallProfileDefault{ - _statusCode: code, - } -} - -/* -ResetFirewallProfileDefault describes a response with status code -1, with default header values. - -Error -*/ -type ResetFirewallProfileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this reset firewall profile default response has a 2xx status code -func (o *ResetFirewallProfileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this reset firewall profile default response has a 3xx status code -func (o *ResetFirewallProfileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this reset firewall profile default response has a 4xx status code -func (o *ResetFirewallProfileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this reset firewall profile default response has a 5xx status code -func (o *ResetFirewallProfileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this reset firewall profile default response a status code equal to that given -func (o *ResetFirewallProfileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the reset firewall profile default response -func (o *ResetFirewallProfileDefault) Code() int { - return o._statusCode -} - -func (o *ResetFirewallProfileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/firewall/profiles/reset][%d] ResetFirewallProfile default %s", o._statusCode, payload) -} - -func (o *ResetFirewallProfileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/firewall/profiles/reset][%d] ResetFirewallProfile default %s", o._statusCode, payload) -} - -func (o *ResetFirewallProfileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ResetFirewallProfileDefault) 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/firewall/update_firewall_ip_sets_parameters.go b/v2/client/firewall/update_firewall_ip_sets_parameters.go deleted file mode 100644 index 8101cd3d..00000000 --- a/v2/client/firewall/update_firewall_ip_sets_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateFirewallIPSetsParams creates a new UpdateFirewallIPSetsParams 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 NewUpdateFirewallIPSetsParams() *UpdateFirewallIPSetsParams { - return &UpdateFirewallIPSetsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateFirewallIPSetsParamsWithTimeout creates a new UpdateFirewallIPSetsParams object -// with the ability to set a timeout on a request. -func NewUpdateFirewallIPSetsParamsWithTimeout(timeout time.Duration) *UpdateFirewallIPSetsParams { - return &UpdateFirewallIPSetsParams{ - timeout: timeout, - } -} - -// NewUpdateFirewallIPSetsParamsWithContext creates a new UpdateFirewallIPSetsParams object -// with the ability to set a context for a request. -func NewUpdateFirewallIPSetsParamsWithContext(ctx context.Context) *UpdateFirewallIPSetsParams { - return &UpdateFirewallIPSetsParams{ - Context: ctx, - } -} - -// NewUpdateFirewallIPSetsParamsWithHTTPClient creates a new UpdateFirewallIPSetsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateFirewallIPSetsParamsWithHTTPClient(client *http.Client) *UpdateFirewallIPSetsParams { - return &UpdateFirewallIPSetsParams{ - HTTPClient: client, - } -} - -/* -UpdateFirewallIPSetsParams contains all the parameters to send to the API endpoint - - for the update firewall IP sets operation. - - Typically these are written to a http.Request. -*/ -type UpdateFirewallIPSetsParams struct { - - /* Body. - - Specifies the update request parameters. - */ - Body *models.FirewallIPSets - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update firewall IP sets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallIPSetsParams) WithDefaults() *UpdateFirewallIPSetsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update firewall IP sets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallIPSetsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) WithTimeout(timeout time.Duration) *UpdateFirewallIPSetsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) WithContext(ctx context.Context) *UpdateFirewallIPSetsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) WithHTTPClient(client *http.Client) *UpdateFirewallIPSetsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) WithBody(body *models.FirewallIPSets) *UpdateFirewallIPSetsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update firewall IP sets params -func (o *UpdateFirewallIPSetsParams) SetBody(body *models.FirewallIPSets) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateFirewallIPSetsParams) 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/firewall/update_firewall_ip_sets_responses.go b/v2/client/firewall/update_firewall_ip_sets_responses.go deleted file mode 100644 index 11df57b7..00000000 --- a/v2/client/firewall/update_firewall_ip_sets_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateFirewallIPSetsReader is a Reader for the UpdateFirewallIPSets structure. -type UpdateFirewallIPSetsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateFirewallIPSetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateFirewallIPSetsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateFirewallIPSetsDefault(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 - } -} - -// NewUpdateFirewallIPSetsOK creates a UpdateFirewallIPSetsOK with default headers values -func NewUpdateFirewallIPSetsOK() *UpdateFirewallIPSetsOK { - return &UpdateFirewallIPSetsOK{} -} - -/* -UpdateFirewallIPSetsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateFirewallIPSetsOK struct { - Payload *models.FirewallIPSets -} - -// IsSuccess returns true when this update firewall Ip sets o k response has a 2xx status code -func (o *UpdateFirewallIPSetsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update firewall Ip sets o k response has a 3xx status code -func (o *UpdateFirewallIPSetsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firewall Ip sets o k response has a 4xx status code -func (o *UpdateFirewallIPSetsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update firewall Ip sets o k response has a 5xx status code -func (o *UpdateFirewallIPSetsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update firewall Ip sets o k response a status code equal to that given -func (o *UpdateFirewallIPSetsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update firewall Ip sets o k response -func (o *UpdateFirewallIPSetsOK) Code() int { - return 200 -} - -func (o *UpdateFirewallIPSetsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/ip-sets][%d] updateFirewallIpSetsOK %s", 200, payload) -} - -func (o *UpdateFirewallIPSetsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/ip-sets][%d] updateFirewallIpSetsOK %s", 200, payload) -} - -func (o *UpdateFirewallIPSetsOK) GetPayload() *models.FirewallIPSets { - return o.Payload -} - -func (o *UpdateFirewallIPSetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FirewallIPSets) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateFirewallIPSetsDefault creates a UpdateFirewallIPSetsDefault with default headers values -func NewUpdateFirewallIPSetsDefault(code int) *UpdateFirewallIPSetsDefault { - return &UpdateFirewallIPSetsDefault{ - _statusCode: code, - } -} - -/* -UpdateFirewallIPSetsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateFirewallIPSetsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update firewall IP sets default response has a 2xx status code -func (o *UpdateFirewallIPSetsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update firewall IP sets default response has a 3xx status code -func (o *UpdateFirewallIPSetsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update firewall IP sets default response has a 4xx status code -func (o *UpdateFirewallIPSetsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update firewall IP sets default response has a 5xx status code -func (o *UpdateFirewallIPSetsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update firewall IP sets default response a status code equal to that given -func (o *UpdateFirewallIPSetsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update firewall IP sets default response -func (o *UpdateFirewallIPSetsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateFirewallIPSetsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/ip-sets][%d] UpdateFirewallIPSets default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallIPSetsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/ip-sets][%d] UpdateFirewallIPSets default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallIPSetsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateFirewallIPSetsDefault) 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/firewall/update_firewall_profile_parameters.go b/v2/client/firewall/update_firewall_profile_parameters.go deleted file mode 100644 index a4e331f0..00000000 --- a/v2/client/firewall/update_firewall_profile_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateFirewallProfileParams creates a new UpdateFirewallProfileParams 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 NewUpdateFirewallProfileParams() *UpdateFirewallProfileParams { - return &UpdateFirewallProfileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateFirewallProfileParamsWithTimeout creates a new UpdateFirewallProfileParams object -// with the ability to set a timeout on a request. -func NewUpdateFirewallProfileParamsWithTimeout(timeout time.Duration) *UpdateFirewallProfileParams { - return &UpdateFirewallProfileParams{ - timeout: timeout, - } -} - -// NewUpdateFirewallProfileParamsWithContext creates a new UpdateFirewallProfileParams object -// with the ability to set a context for a request. -func NewUpdateFirewallProfileParamsWithContext(ctx context.Context) *UpdateFirewallProfileParams { - return &UpdateFirewallProfileParams{ - Context: ctx, - } -} - -// NewUpdateFirewallProfileParamsWithHTTPClient creates a new UpdateFirewallProfileParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateFirewallProfileParamsWithHTTPClient(client *http.Client) *UpdateFirewallProfileParams { - return &UpdateFirewallProfileParams{ - HTTPClient: client, - } -} - -/* -UpdateFirewallProfileParams contains all the parameters to send to the API endpoint - - for the update firewall profile operation. - - Typically these are written to a http.Request. -*/ -type UpdateFirewallProfileParams struct { - - /* Body. - - Specifies the parameters to configure firewall profiles and/or their attachments. - */ - Body *models.FirewallProfileParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update firewall profile params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallProfileParams) WithDefaults() *UpdateFirewallProfileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update firewall profile params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallProfileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update firewall profile params -func (o *UpdateFirewallProfileParams) WithTimeout(timeout time.Duration) *UpdateFirewallProfileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update firewall profile params -func (o *UpdateFirewallProfileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update firewall profile params -func (o *UpdateFirewallProfileParams) WithContext(ctx context.Context) *UpdateFirewallProfileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update firewall profile params -func (o *UpdateFirewallProfileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update firewall profile params -func (o *UpdateFirewallProfileParams) WithHTTPClient(client *http.Client) *UpdateFirewallProfileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update firewall profile params -func (o *UpdateFirewallProfileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update firewall profile params -func (o *UpdateFirewallProfileParams) WithBody(body *models.FirewallProfileParams) *UpdateFirewallProfileParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update firewall profile params -func (o *UpdateFirewallProfileParams) SetBody(body *models.FirewallProfileParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateFirewallProfileParams) 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/firewall/update_firewall_profile_responses.go b/v2/client/firewall/update_firewall_profile_responses.go deleted file mode 100644 index 9bbb410f..00000000 --- a/v2/client/firewall/update_firewall_profile_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateFirewallProfileReader is a Reader for the UpdateFirewallProfile structure. -type UpdateFirewallProfileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateFirewallProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateFirewallProfileOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateFirewallProfileDefault(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 - } -} - -// NewUpdateFirewallProfileOK creates a UpdateFirewallProfileOK with default headers values -func NewUpdateFirewallProfileOK() *UpdateFirewallProfileOK { - return &UpdateFirewallProfileOK{} -} - -/* -UpdateFirewallProfileOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateFirewallProfileOK struct { - Payload *models.FirewallProfileParams -} - -// IsSuccess returns true when this update firewall profile o k response has a 2xx status code -func (o *UpdateFirewallProfileOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update firewall profile o k response has a 3xx status code -func (o *UpdateFirewallProfileOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firewall profile o k response has a 4xx status code -func (o *UpdateFirewallProfileOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update firewall profile o k response has a 5xx status code -func (o *UpdateFirewallProfileOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update firewall profile o k response a status code equal to that given -func (o *UpdateFirewallProfileOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update firewall profile o k response -func (o *UpdateFirewallProfileOK) Code() int { - return 200 -} - -func (o *UpdateFirewallProfileOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile][%d] updateFirewallProfileOK %s", 200, payload) -} - -func (o *UpdateFirewallProfileOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile][%d] updateFirewallProfileOK %s", 200, payload) -} - -func (o *UpdateFirewallProfileOK) GetPayload() *models.FirewallProfileParams { - return o.Payload -} - -func (o *UpdateFirewallProfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FirewallProfileParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateFirewallProfileDefault creates a UpdateFirewallProfileDefault with default headers values -func NewUpdateFirewallProfileDefault(code int) *UpdateFirewallProfileDefault { - return &UpdateFirewallProfileDefault{ - _statusCode: code, - } -} - -/* -UpdateFirewallProfileDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateFirewallProfileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update firewall profile default response has a 2xx status code -func (o *UpdateFirewallProfileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update firewall profile default response has a 3xx status code -func (o *UpdateFirewallProfileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update firewall profile default response has a 4xx status code -func (o *UpdateFirewallProfileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update firewall profile default response has a 5xx status code -func (o *UpdateFirewallProfileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update firewall profile default response a status code equal to that given -func (o *UpdateFirewallProfileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update firewall profile default response -func (o *UpdateFirewallProfileDefault) Code() int { - return o._statusCode -} - -func (o *UpdateFirewallProfileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile][%d] UpdateFirewallProfile default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallProfileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profile][%d] UpdateFirewallProfile default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallProfileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateFirewallProfileDefault) 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/firewall/update_firewall_profiles_parameters.go b/v2/client/firewall/update_firewall_profiles_parameters.go deleted file mode 100644 index 510540e7..00000000 --- a/v2/client/firewall/update_firewall_profiles_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateFirewallProfilesParams creates a new UpdateFirewallProfilesParams 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 NewUpdateFirewallProfilesParams() *UpdateFirewallProfilesParams { - return &UpdateFirewallProfilesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateFirewallProfilesParamsWithTimeout creates a new UpdateFirewallProfilesParams object -// with the ability to set a timeout on a request. -func NewUpdateFirewallProfilesParamsWithTimeout(timeout time.Duration) *UpdateFirewallProfilesParams { - return &UpdateFirewallProfilesParams{ - timeout: timeout, - } -} - -// NewUpdateFirewallProfilesParamsWithContext creates a new UpdateFirewallProfilesParams object -// with the ability to set a context for a request. -func NewUpdateFirewallProfilesParamsWithContext(ctx context.Context) *UpdateFirewallProfilesParams { - return &UpdateFirewallProfilesParams{ - Context: ctx, - } -} - -// NewUpdateFirewallProfilesParamsWithHTTPClient creates a new UpdateFirewallProfilesParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateFirewallProfilesParamsWithHTTPClient(client *http.Client) *UpdateFirewallProfilesParams { - return &UpdateFirewallProfilesParams{ - HTTPClient: client, - } -} - -/* -UpdateFirewallProfilesParams contains all the parameters to send to the API endpoint - - for the update firewall profiles operation. - - Typically these are written to a http.Request. -*/ -type UpdateFirewallProfilesParams struct { - - /* Body. - - Specifies the parameters to configure firewall profiles and/or their attachments. - */ - Body *models.FirewallProfiles - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallProfilesParams) WithDefaults() *UpdateFirewallProfilesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update firewall profiles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFirewallProfilesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) WithTimeout(timeout time.Duration) *UpdateFirewallProfilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) WithContext(ctx context.Context) *UpdateFirewallProfilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) WithHTTPClient(client *http.Client) *UpdateFirewallProfilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) WithBody(body *models.FirewallProfiles) *UpdateFirewallProfilesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update firewall profiles params -func (o *UpdateFirewallProfilesParams) SetBody(body *models.FirewallProfiles) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateFirewallProfilesParams) 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/firewall/update_firewall_profiles_responses.go b/v2/client/firewall/update_firewall_profiles_responses.go deleted file mode 100644 index 3a522472..00000000 --- a/v2/client/firewall/update_firewall_profiles_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package firewall - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateFirewallProfilesReader is a Reader for the UpdateFirewallProfiles structure. -type UpdateFirewallProfilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateFirewallProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateFirewallProfilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateFirewallProfilesDefault(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 - } -} - -// NewUpdateFirewallProfilesOK creates a UpdateFirewallProfilesOK with default headers values -func NewUpdateFirewallProfilesOK() *UpdateFirewallProfilesOK { - return &UpdateFirewallProfilesOK{} -} - -/* -UpdateFirewallProfilesOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateFirewallProfilesOK struct { - Payload *models.FirewallProfiles -} - -// IsSuccess returns true when this update firewall profiles o k response has a 2xx status code -func (o *UpdateFirewallProfilesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update firewall profiles o k response has a 3xx status code -func (o *UpdateFirewallProfilesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update firewall profiles o k response has a 4xx status code -func (o *UpdateFirewallProfilesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update firewall profiles o k response has a 5xx status code -func (o *UpdateFirewallProfilesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update firewall profiles o k response a status code equal to that given -func (o *UpdateFirewallProfilesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update firewall profiles o k response -func (o *UpdateFirewallProfilesOK) Code() int { - return 200 -} - -func (o *UpdateFirewallProfilesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profiles][%d] updateFirewallProfilesOK %s", 200, payload) -} - -func (o *UpdateFirewallProfilesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profiles][%d] updateFirewallProfilesOK %s", 200, payload) -} - -func (o *UpdateFirewallProfilesOK) GetPayload() *models.FirewallProfiles { - return o.Payload -} - -func (o *UpdateFirewallProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FirewallProfiles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateFirewallProfilesDefault creates a UpdateFirewallProfilesDefault with default headers values -func NewUpdateFirewallProfilesDefault(code int) *UpdateFirewallProfilesDefault { - return &UpdateFirewallProfilesDefault{ - _statusCode: code, - } -} - -/* -UpdateFirewallProfilesDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateFirewallProfilesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update firewall profiles default response has a 2xx status code -func (o *UpdateFirewallProfilesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update firewall profiles default response has a 3xx status code -func (o *UpdateFirewallProfilesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update firewall profiles default response has a 4xx status code -func (o *UpdateFirewallProfilesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update firewall profiles default response has a 5xx status code -func (o *UpdateFirewallProfilesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update firewall profiles default response a status code equal to that given -func (o *UpdateFirewallProfilesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update firewall profiles default response -func (o *UpdateFirewallProfilesDefault) Code() int { - return o._statusCode -} - -func (o *UpdateFirewallProfilesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profiles][%d] UpdateFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallProfilesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/firewall/profiles][%d] UpdateFirewallProfiles default %s", o._statusCode, payload) -} - -func (o *UpdateFirewallProfilesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateFirewallProfilesDefault) 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/helios_on_prem/get_helios_on_prem_config_parameters.go b/v2/client/helios_on_prem/get_helios_on_prem_config_parameters.go deleted file mode 100644 index 67464917..00000000 --- a/v2/client/helios_on_prem/get_helios_on_prem_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package helios_on_prem - -// 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" -) - -// NewGetHeliosOnPremConfigParams creates a new GetHeliosOnPremConfigParams 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 NewGetHeliosOnPremConfigParams() *GetHeliosOnPremConfigParams { - return &GetHeliosOnPremConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetHeliosOnPremConfigParamsWithTimeout creates a new GetHeliosOnPremConfigParams object -// with the ability to set a timeout on a request. -func NewGetHeliosOnPremConfigParamsWithTimeout(timeout time.Duration) *GetHeliosOnPremConfigParams { - return &GetHeliosOnPremConfigParams{ - timeout: timeout, - } -} - -// NewGetHeliosOnPremConfigParamsWithContext creates a new GetHeliosOnPremConfigParams object -// with the ability to set a context for a request. -func NewGetHeliosOnPremConfigParamsWithContext(ctx context.Context) *GetHeliosOnPremConfigParams { - return &GetHeliosOnPremConfigParams{ - Context: ctx, - } -} - -// NewGetHeliosOnPremConfigParamsWithHTTPClient creates a new GetHeliosOnPremConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetHeliosOnPremConfigParamsWithHTTPClient(client *http.Client) *GetHeliosOnPremConfigParams { - return &GetHeliosOnPremConfigParams{ - HTTPClient: client, - } -} - -/* -GetHeliosOnPremConfigParams contains all the parameters to send to the API endpoint - - for the get helios on prem config operation. - - Typically these are written to a http.Request. -*/ -type GetHeliosOnPremConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get helios on prem config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHeliosOnPremConfigParams) WithDefaults() *GetHeliosOnPremConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get helios on prem config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHeliosOnPremConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) WithTimeout(timeout time.Duration) *GetHeliosOnPremConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) WithContext(ctx context.Context) *GetHeliosOnPremConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) WithHTTPClient(client *http.Client) *GetHeliosOnPremConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get helios on prem config params -func (o *GetHeliosOnPremConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHeliosOnPremConfigParams) 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/helios_on_prem/get_helios_on_prem_config_responses.go b/v2/client/helios_on_prem/get_helios_on_prem_config_responses.go deleted file mode 100644 index 5e3b5134..00000000 --- a/v2/client/helios_on_prem/get_helios_on_prem_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package helios_on_prem - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetHeliosOnPremConfigReader is a Reader for the GetHeliosOnPremConfig structure. -type GetHeliosOnPremConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHeliosOnPremConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetHeliosOnPremConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetHeliosOnPremConfigDefault(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 - } -} - -// NewGetHeliosOnPremConfigOK creates a GetHeliosOnPremConfigOK with default headers values -func NewGetHeliosOnPremConfigOK() *GetHeliosOnPremConfigOK { - return &GetHeliosOnPremConfigOK{} -} - -/* -GetHeliosOnPremConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetHeliosOnPremConfigOK struct { - Payload *models.HeliosOnPremConfig -} - -// IsSuccess returns true when this get helios on prem config o k response has a 2xx status code -func (o *GetHeliosOnPremConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get helios on prem config o k response has a 3xx status code -func (o *GetHeliosOnPremConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get helios on prem config o k response has a 4xx status code -func (o *GetHeliosOnPremConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get helios on prem config o k response has a 5xx status code -func (o *GetHeliosOnPremConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get helios on prem config o k response a status code equal to that given -func (o *GetHeliosOnPremConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get helios on prem config o k response -func (o *GetHeliosOnPremConfigOK) Code() int { - return 200 -} - -func (o *GetHeliosOnPremConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-onprem/config][%d] getHeliosOnPremConfigOK %s", 200, payload) -} - -func (o *GetHeliosOnPremConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-onprem/config][%d] getHeliosOnPremConfigOK %s", 200, payload) -} - -func (o *GetHeliosOnPremConfigOK) GetPayload() *models.HeliosOnPremConfig { - return o.Payload -} - -func (o *GetHeliosOnPremConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HeliosOnPremConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetHeliosOnPremConfigDefault creates a GetHeliosOnPremConfigDefault with default headers values -func NewGetHeliosOnPremConfigDefault(code int) *GetHeliosOnPremConfigDefault { - return &GetHeliosOnPremConfigDefault{ - _statusCode: code, - } -} - -/* -GetHeliosOnPremConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetHeliosOnPremConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get helios on prem config default response has a 2xx status code -func (o *GetHeliosOnPremConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get helios on prem config default response has a 3xx status code -func (o *GetHeliosOnPremConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get helios on prem config default response has a 4xx status code -func (o *GetHeliosOnPremConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get helios on prem config default response has a 5xx status code -func (o *GetHeliosOnPremConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get helios on prem config default response a status code equal to that given -func (o *GetHeliosOnPremConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get helios on prem config default response -func (o *GetHeliosOnPremConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetHeliosOnPremConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-onprem/config][%d] GetHeliosOnPremConfig default %s", o._statusCode, payload) -} - -func (o *GetHeliosOnPremConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-onprem/config][%d] GetHeliosOnPremConfig default %s", o._statusCode, payload) -} - -func (o *GetHeliosOnPremConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetHeliosOnPremConfigDefault) 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/helios_on_prem/helios_on_prem_client.go b/v2/client/helios_on_prem/helios_on_prem_client.go deleted file mode 100644 index c36826ef..00000000 --- a/v2/client/helios_on_prem/helios_on_prem_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package helios_on_prem - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new helios on prem API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new helios on prem API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new helios on prem API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for helios on prem API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetHeliosOnPremConfig(params *GetHeliosOnPremConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetHeliosOnPremConfigOK, error) - - UpdateHeliosOnPremConfig(params *UpdateHeliosOnPremConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHeliosOnPremConfigOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetHeliosOnPremConfig retreives helios on prem configuration - -View the configuration for Helios OnPrem VM Node. -*/ -func (a *Client) GetHeliosOnPremConfig(params *GetHeliosOnPremConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetHeliosOnPremConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetHeliosOnPremConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetHeliosOnPremConfig", - Method: "GET", - PathPattern: "/helios-onprem/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetHeliosOnPremConfigReader{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.(*GetHeliosOnPremConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetHeliosOnPremConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateHeliosOnPremConfig updates helios on prem configuration - -Update the configuration for Helios OnPrem VM Node. -*/ -func (a *Client) UpdateHeliosOnPremConfig(params *UpdateHeliosOnPremConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHeliosOnPremConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateHeliosOnPremConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateHeliosOnPremConfig", - Method: "PUT", - PathPattern: "/helios-onprem/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateHeliosOnPremConfigReader{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.(*UpdateHeliosOnPremConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateHeliosOnPremConfigDefault) - 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/v2/client/helios_on_prem/update_helios_on_prem_config_parameters.go b/v2/client/helios_on_prem/update_helios_on_prem_config_parameters.go deleted file mode 100644 index 6b140e75..00000000 --- a/v2/client/helios_on_prem/update_helios_on_prem_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package helios_on_prem - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateHeliosOnPremConfigParams creates a new UpdateHeliosOnPremConfigParams 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 NewUpdateHeliosOnPremConfigParams() *UpdateHeliosOnPremConfigParams { - return &UpdateHeliosOnPremConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateHeliosOnPremConfigParamsWithTimeout creates a new UpdateHeliosOnPremConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateHeliosOnPremConfigParamsWithTimeout(timeout time.Duration) *UpdateHeliosOnPremConfigParams { - return &UpdateHeliosOnPremConfigParams{ - timeout: timeout, - } -} - -// NewUpdateHeliosOnPremConfigParamsWithContext creates a new UpdateHeliosOnPremConfigParams object -// with the ability to set a context for a request. -func NewUpdateHeliosOnPremConfigParamsWithContext(ctx context.Context) *UpdateHeliosOnPremConfigParams { - return &UpdateHeliosOnPremConfigParams{ - Context: ctx, - } -} - -// NewUpdateHeliosOnPremConfigParamsWithHTTPClient creates a new UpdateHeliosOnPremConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateHeliosOnPremConfigParamsWithHTTPClient(client *http.Client) *UpdateHeliosOnPremConfigParams { - return &UpdateHeliosOnPremConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateHeliosOnPremConfigParams contains all the parameters to send to the API endpoint - - for the update helios on prem config operation. - - Typically these are written to a http.Request. -*/ -type UpdateHeliosOnPremConfigParams struct { - - /* Body. - - Specifies the parameters for config update. - */ - Body *models.HeliosOnPremConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update helios on prem config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHeliosOnPremConfigParams) WithDefaults() *UpdateHeliosOnPremConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update helios on prem config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHeliosOnPremConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) WithTimeout(timeout time.Duration) *UpdateHeliosOnPremConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) WithContext(ctx context.Context) *UpdateHeliosOnPremConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) WithHTTPClient(client *http.Client) *UpdateHeliosOnPremConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) WithBody(body *models.HeliosOnPremConfig) *UpdateHeliosOnPremConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update helios on prem config params -func (o *UpdateHeliosOnPremConfigParams) SetBody(body *models.HeliosOnPremConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateHeliosOnPremConfigParams) 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/helios_on_prem/update_helios_on_prem_config_responses.go b/v2/client/helios_on_prem/update_helios_on_prem_config_responses.go deleted file mode 100644 index 6edafc05..00000000 --- a/v2/client/helios_on_prem/update_helios_on_prem_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package helios_on_prem - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateHeliosOnPremConfigReader is a Reader for the UpdateHeliosOnPremConfig structure. -type UpdateHeliosOnPremConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateHeliosOnPremConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateHeliosOnPremConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateHeliosOnPremConfigDefault(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 - } -} - -// NewUpdateHeliosOnPremConfigOK creates a UpdateHeliosOnPremConfigOK with default headers values -func NewUpdateHeliosOnPremConfigOK() *UpdateHeliosOnPremConfigOK { - return &UpdateHeliosOnPremConfigOK{} -} - -/* -UpdateHeliosOnPremConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateHeliosOnPremConfigOK struct { - Payload *models.HeliosOnPremConfig -} - -// IsSuccess returns true when this update helios on prem config o k response has a 2xx status code -func (o *UpdateHeliosOnPremConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update helios on prem config o k response has a 3xx status code -func (o *UpdateHeliosOnPremConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update helios on prem config o k response has a 4xx status code -func (o *UpdateHeliosOnPremConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update helios on prem config o k response has a 5xx status code -func (o *UpdateHeliosOnPremConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update helios on prem config o k response a status code equal to that given -func (o *UpdateHeliosOnPremConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update helios on prem config o k response -func (o *UpdateHeliosOnPremConfigOK) Code() int { - return 200 -} - -func (o *UpdateHeliosOnPremConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /helios-onprem/config][%d] updateHeliosOnPremConfigOK %s", 200, payload) -} - -func (o *UpdateHeliosOnPremConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /helios-onprem/config][%d] updateHeliosOnPremConfigOK %s", 200, payload) -} - -func (o *UpdateHeliosOnPremConfigOK) GetPayload() *models.HeliosOnPremConfig { - return o.Payload -} - -func (o *UpdateHeliosOnPremConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HeliosOnPremConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateHeliosOnPremConfigDefault creates a UpdateHeliosOnPremConfigDefault with default headers values -func NewUpdateHeliosOnPremConfigDefault(code int) *UpdateHeliosOnPremConfigDefault { - return &UpdateHeliosOnPremConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateHeliosOnPremConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateHeliosOnPremConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update helios on prem config default response has a 2xx status code -func (o *UpdateHeliosOnPremConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update helios on prem config default response has a 3xx status code -func (o *UpdateHeliosOnPremConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update helios on prem config default response has a 4xx status code -func (o *UpdateHeliosOnPremConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update helios on prem config default response has a 5xx status code -func (o *UpdateHeliosOnPremConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update helios on prem config default response a status code equal to that given -func (o *UpdateHeliosOnPremConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update helios on prem config default response -func (o *UpdateHeliosOnPremConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateHeliosOnPremConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /helios-onprem/config][%d] UpdateHeliosOnPremConfig default %s", o._statusCode, payload) -} - -func (o *UpdateHeliosOnPremConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /helios-onprem/config][%d] UpdateHeliosOnPremConfig default %s", o._statusCode, payload) -} - -func (o *UpdateHeliosOnPremConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateHeliosOnPremConfigDefault) 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/i_ps/configure_ip_settings_parameters.go b/v2/client/i_ps/configure_ip_settings_parameters.go deleted file mode 100644 index 70bb1cbe..00000000 --- a/v2/client/i_ps/configure_ip_settings_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package i_ps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewConfigureIPSettingsParams creates a new ConfigureIPSettingsParams 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 NewConfigureIPSettingsParams() *ConfigureIPSettingsParams { - return &ConfigureIPSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewConfigureIPSettingsParamsWithTimeout creates a new ConfigureIPSettingsParams object -// with the ability to set a timeout on a request. -func NewConfigureIPSettingsParamsWithTimeout(timeout time.Duration) *ConfigureIPSettingsParams { - return &ConfigureIPSettingsParams{ - timeout: timeout, - } -} - -// NewConfigureIPSettingsParamsWithContext creates a new ConfigureIPSettingsParams object -// with the ability to set a context for a request. -func NewConfigureIPSettingsParamsWithContext(ctx context.Context) *ConfigureIPSettingsParams { - return &ConfigureIPSettingsParams{ - Context: ctx, - } -} - -// NewConfigureIPSettingsParamsWithHTTPClient creates a new ConfigureIPSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewConfigureIPSettingsParamsWithHTTPClient(client *http.Client) *ConfigureIPSettingsParams { - return &ConfigureIPSettingsParams{ - HTTPClient: client, - } -} - -/* -ConfigureIPSettingsParams contains all the parameters to send to the API endpoint - - for the configure IP settings operation. - - Typically these are written to a http.Request. -*/ -type ConfigureIPSettingsParams struct { - - /* Body. - - Specifies the parameters to configure a IP settings on a cluster. - */ - Body *models.IPConfigParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the configure IP settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConfigureIPSettingsParams) WithDefaults() *ConfigureIPSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the configure IP settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConfigureIPSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the configure IP settings params -func (o *ConfigureIPSettingsParams) WithTimeout(timeout time.Duration) *ConfigureIPSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the configure IP settings params -func (o *ConfigureIPSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the configure IP settings params -func (o *ConfigureIPSettingsParams) WithContext(ctx context.Context) *ConfigureIPSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the configure IP settings params -func (o *ConfigureIPSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the configure IP settings params -func (o *ConfigureIPSettingsParams) WithHTTPClient(client *http.Client) *ConfigureIPSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the configure IP settings params -func (o *ConfigureIPSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the configure IP settings params -func (o *ConfigureIPSettingsParams) WithBody(body *models.IPConfigParams) *ConfigureIPSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the configure IP settings params -func (o *ConfigureIPSettingsParams) SetBody(body *models.IPConfigParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ConfigureIPSettingsParams) 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/i_ps/configure_ip_settings_responses.go b/v2/client/i_ps/configure_ip_settings_responses.go deleted file mode 100644 index 05abbf33..00000000 --- a/v2/client/i_ps/configure_ip_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package i_ps - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ConfigureIPSettingsReader is a Reader for the ConfigureIPSettings structure. -type ConfigureIPSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ConfigureIPSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewConfigureIPSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewConfigureIPSettingsDefault(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 - } -} - -// NewConfigureIPSettingsOK creates a ConfigureIPSettingsOK with default headers values -func NewConfigureIPSettingsOK() *ConfigureIPSettingsOK { - return &ConfigureIPSettingsOK{} -} - -/* -ConfigureIPSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type ConfigureIPSettingsOK struct { - Payload *models.IPConfigParams -} - -// IsSuccess returns true when this configure Ip settings o k response has a 2xx status code -func (o *ConfigureIPSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this configure Ip settings o k response has a 3xx status code -func (o *ConfigureIPSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this configure Ip settings o k response has a 4xx status code -func (o *ConfigureIPSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this configure Ip settings o k response has a 5xx status code -func (o *ConfigureIPSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this configure Ip settings o k response a status code equal to that given -func (o *ConfigureIPSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the configure Ip settings o k response -func (o *ConfigureIPSettingsOK) Code() int { - return 200 -} - -func (o *ConfigureIPSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/ips][%d] configureIpSettingsOK %s", 200, payload) -} - -func (o *ConfigureIPSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/ips][%d] configureIpSettingsOK %s", 200, payload) -} - -func (o *ConfigureIPSettingsOK) GetPayload() *models.IPConfigParams { - return o.Payload -} - -func (o *ConfigureIPSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IPConfigParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewConfigureIPSettingsDefault creates a ConfigureIPSettingsDefault with default headers values -func NewConfigureIPSettingsDefault(code int) *ConfigureIPSettingsDefault { - return &ConfigureIPSettingsDefault{ - _statusCode: code, - } -} - -/* -ConfigureIPSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ConfigureIPSettingsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this configure IP settings default response has a 2xx status code -func (o *ConfigureIPSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this configure IP settings default response has a 3xx status code -func (o *ConfigureIPSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this configure IP settings default response has a 4xx status code -func (o *ConfigureIPSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this configure IP settings default response has a 5xx status code -func (o *ConfigureIPSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this configure IP settings default response a status code equal to that given -func (o *ConfigureIPSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the configure IP settings default response -func (o *ConfigureIPSettingsDefault) Code() int { - return o._statusCode -} - -func (o *ConfigureIPSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/ips][%d] ConfigureIPSettings default %s", o._statusCode, payload) -} - -func (o *ConfigureIPSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/ips][%d] ConfigureIPSettings default %s", o._statusCode, payload) -} - -func (o *ConfigureIPSettingsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ConfigureIPSettingsDefault) 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/i_ps/i_ps_client.go b/v2/client/i_ps/i_ps_client.go deleted file mode 100644 index a57761d7..00000000 --- a/v2/client/i_ps/i_ps_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package i_ps - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new i ps API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new i ps API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new i ps API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for i ps API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ConfigureIPSettings(params *ConfigureIPSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConfigureIPSettingsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ConfigureIPSettings configures an IP setting - -Configure an IP setting on Cohesity Cluster. -*/ -func (a *Client) ConfigureIPSettings(params *ConfigureIPSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConfigureIPSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewConfigureIPSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "ConfigureIPSettings", - Method: "PUT", - PathPattern: "/network/ips", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ConfigureIPSettingsReader{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.(*ConfigureIPSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ConfigureIPSettingsDefault) - 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/v2/client/identity_provider/create_identity_parameters.go b/v2/client/identity_provider/create_identity_parameters.go deleted file mode 100644 index 0f64dc1c..00000000 --- a/v2/client/identity_provider/create_identity_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateIdentityParams creates a new CreateIdentityParams 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 NewCreateIdentityParams() *CreateIdentityParams { - return &CreateIdentityParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateIdentityParamsWithTimeout creates a new CreateIdentityParams object -// with the ability to set a timeout on a request. -func NewCreateIdentityParamsWithTimeout(timeout time.Duration) *CreateIdentityParams { - return &CreateIdentityParams{ - timeout: timeout, - } -} - -// NewCreateIdentityParamsWithContext creates a new CreateIdentityParams object -// with the ability to set a context for a request. -func NewCreateIdentityParamsWithContext(ctx context.Context) *CreateIdentityParams { - return &CreateIdentityParams{ - Context: ctx, - } -} - -// NewCreateIdentityParamsWithHTTPClient creates a new CreateIdentityParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateIdentityParamsWithHTTPClient(client *http.Client) *CreateIdentityParams { - return &CreateIdentityParams{ - HTTPClient: client, - } -} - -/* -CreateIdentityParams contains all the parameters to send to the API endpoint - - for the create identity operation. - - Typically these are written to a http.Request. -*/ -type CreateIdentityParams struct { - - /* Body. - - Specifies parameters to configure Identity - */ - Body *models.IdentityConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdentityParams) WithDefaults() *CreateIdentityParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdentityParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create identity params -func (o *CreateIdentityParams) WithTimeout(timeout time.Duration) *CreateIdentityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create identity params -func (o *CreateIdentityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create identity params -func (o *CreateIdentityParams) WithContext(ctx context.Context) *CreateIdentityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create identity params -func (o *CreateIdentityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create identity params -func (o *CreateIdentityParams) WithHTTPClient(client *http.Client) *CreateIdentityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create identity params -func (o *CreateIdentityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create identity params -func (o *CreateIdentityParams) WithBody(body *models.IdentityConfig) *CreateIdentityParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create identity params -func (o *CreateIdentityParams) SetBody(body *models.IdentityConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateIdentityParams) 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/identity_provider/create_identity_provider_parameters.go b/v2/client/identity_provider/create_identity_provider_parameters.go deleted file mode 100644 index 3bcf4e7f..00000000 --- a/v2/client/identity_provider/create_identity_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateIdentityProviderParams creates a new CreateIdentityProviderParams 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 NewCreateIdentityProviderParams() *CreateIdentityProviderParams { - return &CreateIdentityProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateIdentityProviderParamsWithTimeout creates a new CreateIdentityProviderParams object -// with the ability to set a timeout on a request. -func NewCreateIdentityProviderParamsWithTimeout(timeout time.Duration) *CreateIdentityProviderParams { - return &CreateIdentityProviderParams{ - timeout: timeout, - } -} - -// NewCreateIdentityProviderParamsWithContext creates a new CreateIdentityProviderParams object -// with the ability to set a context for a request. -func NewCreateIdentityProviderParamsWithContext(ctx context.Context) *CreateIdentityProviderParams { - return &CreateIdentityProviderParams{ - Context: ctx, - } -} - -// NewCreateIdentityProviderParamsWithHTTPClient creates a new CreateIdentityProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateIdentityProviderParamsWithHTTPClient(client *http.Client) *CreateIdentityProviderParams { - return &CreateIdentityProviderParams{ - HTTPClient: client, - } -} - -/* -CreateIdentityProviderParams contains all the parameters to send to the API endpoint - - for the create identity provider operation. - - Typically these are written to a http.Request. -*/ -type CreateIdentityProviderParams struct { - - /* Body. - - Specifies parameters to configure identity provider - */ - Body *models.CreateIdpRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdentityProviderParams) WithDefaults() *CreateIdentityProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIdentityProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create identity provider params -func (o *CreateIdentityProviderParams) WithTimeout(timeout time.Duration) *CreateIdentityProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create identity provider params -func (o *CreateIdentityProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create identity provider params -func (o *CreateIdentityProviderParams) WithContext(ctx context.Context) *CreateIdentityProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create identity provider params -func (o *CreateIdentityProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create identity provider params -func (o *CreateIdentityProviderParams) WithHTTPClient(client *http.Client) *CreateIdentityProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create identity provider params -func (o *CreateIdentityProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create identity provider params -func (o *CreateIdentityProviderParams) WithBody(body *models.CreateIdpRequestParams) *CreateIdentityProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create identity provider params -func (o *CreateIdentityProviderParams) SetBody(body *models.CreateIdpRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateIdentityProviderParams) 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/identity_provider/create_identity_provider_responses.go b/v2/client/identity_provider/create_identity_provider_responses.go deleted file mode 100644 index 3ee672cc..00000000 --- a/v2/client/identity_provider/create_identity_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateIdentityProviderReader is a Reader for the CreateIdentityProvider structure. -type CreateIdentityProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateIdentityProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateIdentityProviderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateIdentityProviderDefault(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 - } -} - -// NewCreateIdentityProviderCreated creates a CreateIdentityProviderCreated with default headers values -func NewCreateIdentityProviderCreated() *CreateIdentityProviderCreated { - return &CreateIdentityProviderCreated{} -} - -/* -CreateIdentityProviderCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateIdentityProviderCreated struct { - Payload *models.IdentityProviderConfiguration -} - -// IsSuccess returns true when this create identity provider created response has a 2xx status code -func (o *CreateIdentityProviderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create identity provider created response has a 3xx status code -func (o *CreateIdentityProviderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create identity provider created response has a 4xx status code -func (o *CreateIdentityProviderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create identity provider created response has a 5xx status code -func (o *CreateIdentityProviderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create identity provider created response a status code equal to that given -func (o *CreateIdentityProviderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create identity provider created response -func (o *CreateIdentityProviderCreated) Code() int { - return 201 -} - -func (o *CreateIdentityProviderCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /idps][%d] createIdentityProviderCreated %s", 201, payload) -} - -func (o *CreateIdentityProviderCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /idps][%d] createIdentityProviderCreated %s", 201, payload) -} - -func (o *CreateIdentityProviderCreated) GetPayload() *models.IdentityProviderConfiguration { - return o.Payload -} - -func (o *CreateIdentityProviderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityProviderConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateIdentityProviderDefault creates a CreateIdentityProviderDefault with default headers values -func NewCreateIdentityProviderDefault(code int) *CreateIdentityProviderDefault { - return &CreateIdentityProviderDefault{ - _statusCode: code, - } -} - -/* -CreateIdentityProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateIdentityProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create identity provider default response has a 2xx status code -func (o *CreateIdentityProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create identity provider default response has a 3xx status code -func (o *CreateIdentityProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create identity provider default response has a 4xx status code -func (o *CreateIdentityProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create identity provider default response has a 5xx status code -func (o *CreateIdentityProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create identity provider default response a status code equal to that given -func (o *CreateIdentityProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create identity provider default response -func (o *CreateIdentityProviderDefault) Code() int { - return o._statusCode -} - -func (o *CreateIdentityProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /idps][%d] CreateIdentityProvider default %s", o._statusCode, payload) -} - -func (o *CreateIdentityProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /idps][%d] CreateIdentityProvider default %s", o._statusCode, payload) -} - -func (o *CreateIdentityProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateIdentityProviderDefault) 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/identity_provider/create_identity_responses.go b/v2/client/identity_provider/create_identity_responses.go deleted file mode 100644 index 5c9735e5..00000000 --- a/v2/client/identity_provider/create_identity_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateIdentityReader is a Reader for the CreateIdentity structure. -type CreateIdentityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateIdentityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateIdentityCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateIdentityDefault(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 - } -} - -// NewCreateIdentityCreated creates a CreateIdentityCreated with default headers values -func NewCreateIdentityCreated() *CreateIdentityCreated { - return &CreateIdentityCreated{} -} - -/* -CreateIdentityCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateIdentityCreated struct { - Payload *models.IdentityConfig -} - -// IsSuccess returns true when this create identity created response has a 2xx status code -func (o *CreateIdentityCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create identity created response has a 3xx status code -func (o *CreateIdentityCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create identity created response has a 4xx status code -func (o *CreateIdentityCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create identity created response has a 5xx status code -func (o *CreateIdentityCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create identity created response a status code equal to that given -func (o *CreateIdentityCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create identity created response -func (o *CreateIdentityCreated) Code() int { - return 201 -} - -func (o *CreateIdentityCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers][%d] createIdentityCreated %s", 201, payload) -} - -func (o *CreateIdentityCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers][%d] createIdentityCreated %s", 201, payload) -} - -func (o *CreateIdentityCreated) GetPayload() *models.IdentityConfig { - return o.Payload -} - -func (o *CreateIdentityCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateIdentityDefault creates a CreateIdentityDefault with default headers values -func NewCreateIdentityDefault(code int) *CreateIdentityDefault { - return &CreateIdentityDefault{ - _statusCode: code, - } -} - -/* -CreateIdentityDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateIdentityDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create identity default response has a 2xx status code -func (o *CreateIdentityDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create identity default response has a 3xx status code -func (o *CreateIdentityDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create identity default response has a 4xx status code -func (o *CreateIdentityDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create identity default response has a 5xx status code -func (o *CreateIdentityDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create identity default response a status code equal to that given -func (o *CreateIdentityDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create identity default response -func (o *CreateIdentityDefault) Code() int { - return o._statusCode -} - -func (o *CreateIdentityDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers][%d] CreateIdentity default %s", o._statusCode, payload) -} - -func (o *CreateIdentityDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers][%d] CreateIdentity default %s", o._statusCode, payload) -} - -func (o *CreateIdentityDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateIdentityDefault) 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/identity_provider/delete_identity_parameters.go b/v2/client/identity_provider/delete_identity_parameters.go deleted file mode 100644 index f1723cf4..00000000 --- a/v2/client/identity_provider/delete_identity_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" -) - -// NewDeleteIdentityParams creates a new DeleteIdentityParams 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 NewDeleteIdentityParams() *DeleteIdentityParams { - return &DeleteIdentityParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteIdentityParamsWithTimeout creates a new DeleteIdentityParams object -// with the ability to set a timeout on a request. -func NewDeleteIdentityParamsWithTimeout(timeout time.Duration) *DeleteIdentityParams { - return &DeleteIdentityParams{ - timeout: timeout, - } -} - -// NewDeleteIdentityParamsWithContext creates a new DeleteIdentityParams object -// with the ability to set a context for a request. -func NewDeleteIdentityParamsWithContext(ctx context.Context) *DeleteIdentityParams { - return &DeleteIdentityParams{ - Context: ctx, - } -} - -// NewDeleteIdentityParamsWithHTTPClient creates a new DeleteIdentityParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteIdentityParamsWithHTTPClient(client *http.Client) *DeleteIdentityParams { - return &DeleteIdentityParams{ - HTTPClient: client, - } -} - -/* -DeleteIdentityParams contains all the parameters to send to the API endpoint - - for the delete identity operation. - - Typically these are written to a http.Request. -*/ -type DeleteIdentityParams struct { - - /* ID. - - Specifies id of identity provider configuration - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdentityParams) WithDefaults() *DeleteIdentityParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdentityParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete identity params -func (o *DeleteIdentityParams) WithTimeout(timeout time.Duration) *DeleteIdentityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete identity params -func (o *DeleteIdentityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete identity params -func (o *DeleteIdentityParams) WithContext(ctx context.Context) *DeleteIdentityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete identity params -func (o *DeleteIdentityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete identity params -func (o *DeleteIdentityParams) WithHTTPClient(client *http.Client) *DeleteIdentityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete identity params -func (o *DeleteIdentityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete identity params -func (o *DeleteIdentityParams) WithID(id int64) *DeleteIdentityParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete identity params -func (o *DeleteIdentityParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteIdentityParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/identity_provider/delete_identity_provider_parameters.go b/v2/client/identity_provider/delete_identity_provider_parameters.go deleted file mode 100644 index 192b59fa..00000000 --- a/v2/client/identity_provider/delete_identity_provider_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" -) - -// NewDeleteIdentityProviderParams creates a new DeleteIdentityProviderParams 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 NewDeleteIdentityProviderParams() *DeleteIdentityProviderParams { - return &DeleteIdentityProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteIdentityProviderParamsWithTimeout creates a new DeleteIdentityProviderParams object -// with the ability to set a timeout on a request. -func NewDeleteIdentityProviderParamsWithTimeout(timeout time.Duration) *DeleteIdentityProviderParams { - return &DeleteIdentityProviderParams{ - timeout: timeout, - } -} - -// NewDeleteIdentityProviderParamsWithContext creates a new DeleteIdentityProviderParams object -// with the ability to set a context for a request. -func NewDeleteIdentityProviderParamsWithContext(ctx context.Context) *DeleteIdentityProviderParams { - return &DeleteIdentityProviderParams{ - Context: ctx, - } -} - -// NewDeleteIdentityProviderParamsWithHTTPClient creates a new DeleteIdentityProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteIdentityProviderParamsWithHTTPClient(client *http.Client) *DeleteIdentityProviderParams { - return &DeleteIdentityProviderParams{ - HTTPClient: client, - } -} - -/* -DeleteIdentityProviderParams contains all the parameters to send to the API endpoint - - for the delete identity provider operation. - - Typically these are written to a http.Request. -*/ -type DeleteIdentityProviderParams struct { - - /* ID. - - Specifies id of idp configuration - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdentityProviderParams) WithDefaults() *DeleteIdentityProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIdentityProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete identity provider params -func (o *DeleteIdentityProviderParams) WithTimeout(timeout time.Duration) *DeleteIdentityProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete identity provider params -func (o *DeleteIdentityProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete identity provider params -func (o *DeleteIdentityProviderParams) WithContext(ctx context.Context) *DeleteIdentityProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete identity provider params -func (o *DeleteIdentityProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete identity provider params -func (o *DeleteIdentityProviderParams) WithHTTPClient(client *http.Client) *DeleteIdentityProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete identity provider params -func (o *DeleteIdentityProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete identity provider params -func (o *DeleteIdentityProviderParams) WithID(id int64) *DeleteIdentityProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete identity provider params -func (o *DeleteIdentityProviderParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteIdentityProviderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/identity_provider/delete_identity_provider_responses.go b/v2/client/identity_provider/delete_identity_provider_responses.go deleted file mode 100644 index c4664654..00000000 --- a/v2/client/identity_provider/delete_identity_provider_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteIdentityProviderReader is a Reader for the DeleteIdentityProvider structure. -type DeleteIdentityProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteIdentityProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteIdentityProviderNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteIdentityProviderDefault(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 - } -} - -// NewDeleteIdentityProviderNoContent creates a DeleteIdentityProviderNoContent with default headers values -func NewDeleteIdentityProviderNoContent() *DeleteIdentityProviderNoContent { - return &DeleteIdentityProviderNoContent{} -} - -/* -DeleteIdentityProviderNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteIdentityProviderNoContent struct { -} - -// IsSuccess returns true when this delete identity provider no content response has a 2xx status code -func (o *DeleteIdentityProviderNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete identity provider no content response has a 3xx status code -func (o *DeleteIdentityProviderNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete identity provider no content response has a 4xx status code -func (o *DeleteIdentityProviderNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete identity provider no content response has a 5xx status code -func (o *DeleteIdentityProviderNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete identity provider no content response a status code equal to that given -func (o *DeleteIdentityProviderNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete identity provider no content response -func (o *DeleteIdentityProviderNoContent) Code() int { - return 204 -} - -func (o *DeleteIdentityProviderNoContent) Error() string { - return fmt.Sprintf("[DELETE /idps/{id}][%d] deleteIdentityProviderNoContent", 204) -} - -func (o *DeleteIdentityProviderNoContent) String() string { - return fmt.Sprintf("[DELETE /idps/{id}][%d] deleteIdentityProviderNoContent", 204) -} - -func (o *DeleteIdentityProviderNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIdentityProviderDefault creates a DeleteIdentityProviderDefault with default headers values -func NewDeleteIdentityProviderDefault(code int) *DeleteIdentityProviderDefault { - return &DeleteIdentityProviderDefault{ - _statusCode: code, - } -} - -/* -DeleteIdentityProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteIdentityProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete identity provider default response has a 2xx status code -func (o *DeleteIdentityProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete identity provider default response has a 3xx status code -func (o *DeleteIdentityProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete identity provider default response has a 4xx status code -func (o *DeleteIdentityProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete identity provider default response has a 5xx status code -func (o *DeleteIdentityProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete identity provider default response a status code equal to that given -func (o *DeleteIdentityProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete identity provider default response -func (o *DeleteIdentityProviderDefault) Code() int { - return o._statusCode -} - -func (o *DeleteIdentityProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /idps/{id}][%d] DeleteIdentityProvider default %s", o._statusCode, payload) -} - -func (o *DeleteIdentityProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /idps/{id}][%d] DeleteIdentityProvider default %s", o._statusCode, payload) -} - -func (o *DeleteIdentityProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteIdentityProviderDefault) 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/identity_provider/delete_identity_responses.go b/v2/client/identity_provider/delete_identity_responses.go deleted file mode 100644 index 0b4382a9..00000000 --- a/v2/client/identity_provider/delete_identity_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteIdentityReader is a Reader for the DeleteIdentity structure. -type DeleteIdentityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteIdentityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteIdentityNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteIdentityDefault(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 - } -} - -// NewDeleteIdentityNoContent creates a DeleteIdentityNoContent with default headers values -func NewDeleteIdentityNoContent() *DeleteIdentityNoContent { - return &DeleteIdentityNoContent{} -} - -/* -DeleteIdentityNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteIdentityNoContent struct { -} - -// IsSuccess returns true when this delete identity no content response has a 2xx status code -func (o *DeleteIdentityNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete identity no content response has a 3xx status code -func (o *DeleteIdentityNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete identity no content response has a 4xx status code -func (o *DeleteIdentityNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete identity no content response has a 5xx status code -func (o *DeleteIdentityNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete identity no content response a status code equal to that given -func (o *DeleteIdentityNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete identity no content response -func (o *DeleteIdentityNoContent) Code() int { - return 204 -} - -func (o *DeleteIdentityNoContent) Error() string { - return fmt.Sprintf("[DELETE /identity-providers/{id}][%d] deleteIdentityNoContent", 204) -} - -func (o *DeleteIdentityNoContent) String() string { - return fmt.Sprintf("[DELETE /identity-providers/{id}][%d] deleteIdentityNoContent", 204) -} - -func (o *DeleteIdentityNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIdentityDefault creates a DeleteIdentityDefault with default headers values -func NewDeleteIdentityDefault(code int) *DeleteIdentityDefault { - return &DeleteIdentityDefault{ - _statusCode: code, - } -} - -/* -DeleteIdentityDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteIdentityDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete identity default response has a 2xx status code -func (o *DeleteIdentityDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete identity default response has a 3xx status code -func (o *DeleteIdentityDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete identity default response has a 4xx status code -func (o *DeleteIdentityDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete identity default response has a 5xx status code -func (o *DeleteIdentityDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete identity default response a status code equal to that given -func (o *DeleteIdentityDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete identity default response -func (o *DeleteIdentityDefault) Code() int { - return o._statusCode -} - -func (o *DeleteIdentityDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /identity-providers/{id}][%d] DeleteIdentity default %s", o._statusCode, payload) -} - -func (o *DeleteIdentityDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /identity-providers/{id}][%d] DeleteIdentity default %s", o._statusCode, payload) -} - -func (o *DeleteIdentityDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteIdentityDefault) 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/identity_provider/get_identities_parameters.go b/v2/client/identity_provider/get_identities_parameters.go deleted file mode 100644 index aac35519..00000000 --- a/v2/client/identity_provider/get_identities_parameters.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" -) - -// NewGetIdentitiesParams creates a new GetIdentitiesParams 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 NewGetIdentitiesParams() *GetIdentitiesParams { - return &GetIdentitiesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdentitiesParamsWithTimeout creates a new GetIdentitiesParams object -// with the ability to set a timeout on a request. -func NewGetIdentitiesParamsWithTimeout(timeout time.Duration) *GetIdentitiesParams { - return &GetIdentitiesParams{ - timeout: timeout, - } -} - -// NewGetIdentitiesParamsWithContext creates a new GetIdentitiesParams object -// with the ability to set a context for a request. -func NewGetIdentitiesParamsWithContext(ctx context.Context) *GetIdentitiesParams { - return &GetIdentitiesParams{ - Context: ctx, - } -} - -// NewGetIdentitiesParamsWithHTTPClient creates a new GetIdentitiesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdentitiesParamsWithHTTPClient(client *http.Client) *GetIdentitiesParams { - return &GetIdentitiesParams{ - HTTPClient: client, - } -} - -/* -GetIdentitiesParams contains all the parameters to send to the API endpoint - - for the get identities operation. - - Typically these are written to a http.Request. -*/ -type GetIdentitiesParams struct { - - /* Domains. - - Specifies domains of the IDP configurations - */ - Domains []string - - /* Ids. - - Specifies IDs of configured identity providers - */ - Ids []int64 - - /* IncludeAllTenants. - - Specifies if IDP configurations on all the tenants under the hierarchy of the logged in user should be returned - */ - IncludeAllTenants *bool - - /* TenantIds. - - Specifies the tenant id's to get IDPs configured on tenants - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get identities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentitiesParams) WithDefaults() *GetIdentitiesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get identities params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentitiesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get identities params -func (o *GetIdentitiesParams) WithTimeout(timeout time.Duration) *GetIdentitiesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get identities params -func (o *GetIdentitiesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get identities params -func (o *GetIdentitiesParams) WithContext(ctx context.Context) *GetIdentitiesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get identities params -func (o *GetIdentitiesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get identities params -func (o *GetIdentitiesParams) WithHTTPClient(client *http.Client) *GetIdentitiesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get identities params -func (o *GetIdentitiesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomains adds the domains to the get identities params -func (o *GetIdentitiesParams) WithDomains(domains []string) *GetIdentitiesParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the get identities params -func (o *GetIdentitiesParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithIds adds the ids to the get identities params -func (o *GetIdentitiesParams) WithIds(ids []int64) *GetIdentitiesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get identities params -func (o *GetIdentitiesParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeAllTenants adds the includeAllTenants to the get identities params -func (o *GetIdentitiesParams) WithIncludeAllTenants(includeAllTenants *bool) *GetIdentitiesParams { - o.SetIncludeAllTenants(includeAllTenants) - return o -} - -// SetIncludeAllTenants adds the includeAllTenants to the get identities params -func (o *GetIdentitiesParams) SetIncludeAllTenants(includeAllTenants *bool) { - o.IncludeAllTenants = includeAllTenants -} - -// WithTenantIds adds the tenantIds to the get identities params -func (o *GetIdentitiesParams) WithTenantIds(tenantIds []string) *GetIdentitiesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get identities params -func (o *GetIdentitiesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdentitiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeAllTenants != nil { - - // query param includeAllTenants - var qrIncludeAllTenants bool - - if o.IncludeAllTenants != nil { - qrIncludeAllTenants = *o.IncludeAllTenants - } - qIncludeAllTenants := swag.FormatBool(qrIncludeAllTenants) - if qIncludeAllTenants != "" { - - if err := r.SetQueryParam("includeAllTenants", qIncludeAllTenants); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIdentities binds the parameter domains -func (o *GetIdentitiesParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamGetIdentities binds the parameter ids -func (o *GetIdentitiesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetIdentities binds the parameter tenantIds -func (o *GetIdentitiesParams) 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/client/identity_provider/get_identities_responses.go b/v2/client/identity_provider/get_identities_responses.go deleted file mode 100644 index 56445cba..00000000 --- a/v2/client/identity_provider/get_identities_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIdentitiesReader is a Reader for the GetIdentities structure. -type GetIdentitiesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdentitiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdentitiesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIdentitiesDefault(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 - } -} - -// NewGetIdentitiesOK creates a GetIdentitiesOK with default headers values -func NewGetIdentitiesOK() *GetIdentitiesOK { - return &GetIdentitiesOK{} -} - -/* -GetIdentitiesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdentitiesOK struct { - Payload *models.IdentityConfigs -} - -// IsSuccess returns true when this get identities o k response has a 2xx status code -func (o *GetIdentitiesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get identities o k response has a 3xx status code -func (o *GetIdentitiesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identities o k response has a 4xx status code -func (o *GetIdentitiesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identities o k response has a 5xx status code -func (o *GetIdentitiesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get identities o k response a status code equal to that given -func (o *GetIdentitiesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get identities o k response -func (o *GetIdentitiesOK) Code() int { - return 200 -} - -func (o *GetIdentitiesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /identity-providers][%d] getIdentitiesOK %s", 200, payload) -} - -func (o *GetIdentitiesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /identity-providers][%d] getIdentitiesOK %s", 200, payload) -} - -func (o *GetIdentitiesOK) GetPayload() *models.IdentityConfigs { - return o.Payload -} - -func (o *GetIdentitiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityConfigs) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentitiesDefault creates a GetIdentitiesDefault with default headers values -func NewGetIdentitiesDefault(code int) *GetIdentitiesDefault { - return &GetIdentitiesDefault{ - _statusCode: code, - } -} - -/* -GetIdentitiesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIdentitiesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get identities default response has a 2xx status code -func (o *GetIdentitiesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get identities default response has a 3xx status code -func (o *GetIdentitiesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get identities default response has a 4xx status code -func (o *GetIdentitiesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get identities default response has a 5xx status code -func (o *GetIdentitiesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get identities default response a status code equal to that given -func (o *GetIdentitiesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get identities default response -func (o *GetIdentitiesDefault) Code() int { - return o._statusCode -} - -func (o *GetIdentitiesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /identity-providers][%d] GetIdentities default %s", o._statusCode, payload) -} - -func (o *GetIdentitiesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /identity-providers][%d] GetIdentities default %s", o._statusCode, payload) -} - -func (o *GetIdentitiesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIdentitiesDefault) 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/identity_provider/get_identity_providers_parameters.go b/v2/client/identity_provider/get_identity_providers_parameters.go deleted file mode 100644 index 412fc1ef..00000000 --- a/v2/client/identity_provider/get_identity_providers_parameters.go +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" -) - -// NewGetIdentityProvidersParams creates a new GetIdentityProvidersParams 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 NewGetIdentityProvidersParams() *GetIdentityProvidersParams { - return &GetIdentityProvidersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdentityProvidersParamsWithTimeout creates a new GetIdentityProvidersParams object -// with the ability to set a timeout on a request. -func NewGetIdentityProvidersParamsWithTimeout(timeout time.Duration) *GetIdentityProvidersParams { - return &GetIdentityProvidersParams{ - timeout: timeout, - } -} - -// NewGetIdentityProvidersParamsWithContext creates a new GetIdentityProvidersParams object -// with the ability to set a context for a request. -func NewGetIdentityProvidersParamsWithContext(ctx context.Context) *GetIdentityProvidersParams { - return &GetIdentityProvidersParams{ - Context: ctx, - } -} - -// NewGetIdentityProvidersParamsWithHTTPClient creates a new GetIdentityProvidersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdentityProvidersParamsWithHTTPClient(client *http.Client) *GetIdentityProvidersParams { - return &GetIdentityProvidersParams{ - HTTPClient: client, - } -} - -/* -GetIdentityProvidersParams contains all the parameters to send to the API endpoint - - for the get identity providers operation. - - Typically these are written to a http.Request. -*/ -type GetIdentityProvidersParams struct { - - /* Domains. - - Specifies domains of the idp configurations - */ - Domains []string - - /* Ids. - - Specifies ids of configured identity providers - */ - Ids []int64 - - /* IncludeAllTenants. - - Specifies if idp configurations on all the tenants under the hierarchy of the logged in user should be returned - */ - IncludeAllTenants *bool - - /* Names. - - Specifies the names of the identity providers - */ - Names []string - - /* TenantIds. - - Specifies the tenant id's to get idps configured on tenants - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get identity providers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityProvidersParams) WithDefaults() *GetIdentityProvidersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get identity providers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityProvidersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get identity providers params -func (o *GetIdentityProvidersParams) WithTimeout(timeout time.Duration) *GetIdentityProvidersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get identity providers params -func (o *GetIdentityProvidersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get identity providers params -func (o *GetIdentityProvidersParams) WithContext(ctx context.Context) *GetIdentityProvidersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get identity providers params -func (o *GetIdentityProvidersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get identity providers params -func (o *GetIdentityProvidersParams) WithHTTPClient(client *http.Client) *GetIdentityProvidersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get identity providers params -func (o *GetIdentityProvidersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomains adds the domains to the get identity providers params -func (o *GetIdentityProvidersParams) WithDomains(domains []string) *GetIdentityProvidersParams { - o.SetDomains(domains) - return o -} - -// SetDomains adds the domains to the get identity providers params -func (o *GetIdentityProvidersParams) SetDomains(domains []string) { - o.Domains = domains -} - -// WithIds adds the ids to the get identity providers params -func (o *GetIdentityProvidersParams) WithIds(ids []int64) *GetIdentityProvidersParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get identity providers params -func (o *GetIdentityProvidersParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeAllTenants adds the includeAllTenants to the get identity providers params -func (o *GetIdentityProvidersParams) WithIncludeAllTenants(includeAllTenants *bool) *GetIdentityProvidersParams { - o.SetIncludeAllTenants(includeAllTenants) - return o -} - -// SetIncludeAllTenants adds the includeAllTenants to the get identity providers params -func (o *GetIdentityProvidersParams) SetIncludeAllTenants(includeAllTenants *bool) { - o.IncludeAllTenants = includeAllTenants -} - -// WithNames adds the names to the get identity providers params -func (o *GetIdentityProvidersParams) WithNames(names []string) *GetIdentityProvidersParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get identity providers params -func (o *GetIdentityProvidersParams) SetNames(names []string) { - o.Names = names -} - -// WithTenantIds adds the tenantIds to the get identity providers params -func (o *GetIdentityProvidersParams) WithTenantIds(tenantIds []string) *GetIdentityProvidersParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get identity providers params -func (o *GetIdentityProvidersParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdentityProvidersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domains != nil { - - // binding items for domains - joinedDomains := o.bindParamDomains(reg) - - // query array param domains - if err := r.SetQueryParam("domains", joinedDomains...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeAllTenants != nil { - - // query param includeAllTenants - var qrIncludeAllTenants bool - - if o.IncludeAllTenants != nil { - qrIncludeAllTenants = *o.IncludeAllTenants - } - qIncludeAllTenants := swag.FormatBool(qrIncludeAllTenants) - if qIncludeAllTenants != "" { - - if err := r.SetQueryParam("includeAllTenants", qIncludeAllTenants); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIdentityProviders binds the parameter domains -func (o *GetIdentityProvidersParams) bindParamDomains(formats strfmt.Registry) []string { - domainsIR := o.Domains - - var domainsIC []string - for _, domainsIIR := range domainsIR { // explode []string - - domainsIIV := domainsIIR // string as string - domainsIC = append(domainsIC, domainsIIV) - } - - // items.CollectionFormat: "" - domainsIS := swag.JoinByFormat(domainsIC, "") - - return domainsIS -} - -// bindParamGetIdentityProviders binds the parameter ids -func (o *GetIdentityProvidersParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetIdentityProviders binds the parameter names -func (o *GetIdentityProvidersParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetIdentityProviders binds the parameter tenantIds -func (o *GetIdentityProvidersParams) 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/client/identity_provider/get_identity_providers_responses.go b/v2/client/identity_provider/get_identity_providers_responses.go deleted file mode 100644 index b57e67fd..00000000 --- a/v2/client/identity_provider/get_identity_providers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIdentityProvidersReader is a Reader for the GetIdentityProviders structure. -type GetIdentityProvidersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdentityProvidersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdentityProvidersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIdentityProvidersDefault(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 - } -} - -// NewGetIdentityProvidersOK creates a GetIdentityProvidersOK with default headers values -func NewGetIdentityProvidersOK() *GetIdentityProvidersOK { - return &GetIdentityProvidersOK{} -} - -/* -GetIdentityProvidersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdentityProvidersOK struct { - Payload *models.IdentityProviderConfigurations -} - -// IsSuccess returns true when this get identity providers o k response has a 2xx status code -func (o *GetIdentityProvidersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get identity providers o k response has a 3xx status code -func (o *GetIdentityProvidersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity providers o k response has a 4xx status code -func (o *GetIdentityProvidersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity providers o k response has a 5xx status code -func (o *GetIdentityProvidersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity providers o k response a status code equal to that given -func (o *GetIdentityProvidersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get identity providers o k response -func (o *GetIdentityProvidersOK) Code() int { - return 200 -} - -func (o *GetIdentityProvidersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps][%d] getIdentityProvidersOK %s", 200, payload) -} - -func (o *GetIdentityProvidersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps][%d] getIdentityProvidersOK %s", 200, payload) -} - -func (o *GetIdentityProvidersOK) GetPayload() *models.IdentityProviderConfigurations { - return o.Payload -} - -func (o *GetIdentityProvidersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityProviderConfigurations) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityProvidersDefault creates a GetIdentityProvidersDefault with default headers values -func NewGetIdentityProvidersDefault(code int) *GetIdentityProvidersDefault { - return &GetIdentityProvidersDefault{ - _statusCode: code, - } -} - -/* -GetIdentityProvidersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIdentityProvidersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get identity providers default response has a 2xx status code -func (o *GetIdentityProvidersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get identity providers default response has a 3xx status code -func (o *GetIdentityProvidersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get identity providers default response has a 4xx status code -func (o *GetIdentityProvidersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get identity providers default response has a 5xx status code -func (o *GetIdentityProvidersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get identity providers default response a status code equal to that given -func (o *GetIdentityProvidersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get identity providers default response -func (o *GetIdentityProvidersDefault) Code() int { - return o._statusCode -} - -func (o *GetIdentityProvidersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps][%d] GetIdentityProviders default %s", o._statusCode, payload) -} - -func (o *GetIdentityProvidersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps][%d] GetIdentityProviders default %s", o._statusCode, payload) -} - -func (o *GetIdentityProvidersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIdentityProvidersDefault) 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/identity_provider/identity_provider_client.go b/v2/client/identity_provider/identity_provider_client.go deleted file mode 100644 index 3007ed69..00000000 --- a/v2/client/identity_provider/identity_provider_client.go +++ /dev/null @@ -1,477 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new identity provider API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new identity provider API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new identity provider API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for identity provider API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateIdentity(params *CreateIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdentityCreated, error) - - CreateIdentityProvider(params *CreateIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdentityProviderCreated, error) - - DeleteIdentity(params *DeleteIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdentityNoContent, error) - - DeleteIdentityProvider(params *DeleteIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdentityProviderNoContent, error) - - GetIdentities(params *GetIdentitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdentitiesOK, error) - - GetIdentityProviders(params *GetIdentityProvidersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdentityProvidersOK, error) - - IdpsLogin(params *IdpsLoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error - - PerformIdentityAction(params *PerformIdentityActionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformIdentityActionCreated, error) - - UpdateIdentity(params *UpdateIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdentityOK, error) - - UpdateIdentityProvider(params *UpdateIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdentityProviderOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateIdentity configures identity provider - -Configure Identity Provider on the cluster. Currently this API is only for Open ID providers, but will be expanded to include SAML providers in the future. -*/ -func (a *Client) CreateIdentity(params *CreateIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdentityCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateIdentityParams() - } - op := &runtime.ClientOperation{ - ID: "CreateIdentity", - Method: "POST", - PathPattern: "/identity-providers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateIdentityReader{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.(*CreateIdentityCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateIdentityDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateIdentityProvider configures identity provider - -Configure SAML based identity provider on the cluster -*/ -func (a *Client) CreateIdentityProvider(params *CreateIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIdentityProviderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateIdentityProviderParams() - } - op := &runtime.ClientOperation{ - ID: "CreateIdentityProvider", - Method: "POST", - PathPattern: "/idps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateIdentityProviderReader{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.(*CreateIdentityProviderCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateIdentityProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteIdentity deletes identity provider - -Delete identity provider configuration on the cluster. Currently this API only supports Open ID based SSO providers, but it will be expanded in the future to support SAML SSO providers. -*/ -func (a *Client) DeleteIdentity(params *DeleteIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdentityNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteIdentityParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteIdentity", - Method: "DELETE", - PathPattern: "/identity-providers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteIdentityReader{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.(*DeleteIdentityNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteIdentityDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteIdentityProvider deletes identity provider - -Delete SAML based identity provider configuration on the cluster -*/ -func (a *Client) DeleteIdentityProvider(params *DeleteIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIdentityProviderNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteIdentityProviderParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteIdentityProvider", - Method: "DELETE", - PathPattern: "/idps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteIdentityProviderReader{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.(*DeleteIdentityProviderNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteIdentityProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIdentities gets identities - -Get Identity Providers configured on the cluster. Currently this API only supports Open ID based SSO providers, but it will be expanded in the future to support SAML SSO providers. -*/ -func (a *Client) GetIdentities(params *GetIdentitiesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdentitiesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdentitiesParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdentities", - Method: "GET", - PathPattern: "/identity-providers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIdentitiesReader{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.(*GetIdentitiesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIdentitiesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIdentityProviders gets identity providers - -Get SAML based identity providers configured on the cluster -*/ -func (a *Client) GetIdentityProviders(params *GetIdentityProvidersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIdentityProvidersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdentityProvidersParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdentityProviders", - Method: "GET", - PathPattern: "/idps", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIdentityProvidersReader{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.(*GetIdentityProvidersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIdentityProvidersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -IdpsLogin logins to cluster using idp - -Redirects the client to the idp site with the URI to login -*/ -func (a *Client) IdpsLogin(params *IdpsLoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) error { - // TODO: Validate the params before sending - if params == nil { - params = NewIdpsLoginParams() - } - op := &runtime.ClientOperation{ - ID: "IdpsLogin", - Method: "GET", - PathPattern: "/idps/login", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &IdpsLoginReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - _, err := a.transport.Submit(op) - if err != nil { - return err - } - return nil -} - -/* -PerformIdentityAction performs identity action - -Perform an action on an Identity Provider. Currently this API only supports Open ID based SSO providers, but it will be expanded in the future to support SAML SSO providers. -*/ -func (a *Client) PerformIdentityAction(params *PerformIdentityActionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformIdentityActionCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformIdentityActionParams() - } - op := &runtime.ClientOperation{ - ID: "PerformIdentityAction", - Method: "POST", - PathPattern: "/identity-providers/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformIdentityActionReader{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.(*PerformIdentityActionCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformIdentityActionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIdentity updates identity provider - -Update Identity Provider on the cluster. Currently this API only supports Open ID based SSO providers, but it will be expanded in the future to support SAML SSO providers. -*/ -func (a *Client) UpdateIdentity(params *UpdateIdentityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdentityOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIdentityParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIdentity", - Method: "PUT", - PathPattern: "/identity-providers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIdentityReader{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.(*UpdateIdentityOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIdentityDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIdentityProvider updates identity provider - -Update SAML based identity provider configurartion on the cluster -*/ -func (a *Client) UpdateIdentityProvider(params *UpdateIdentityProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIdentityProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIdentityProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIdentityProvider", - Method: "PUT", - PathPattern: "/idps/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIdentityProviderReader{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.(*UpdateIdentityProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIdentityProviderDefault) - 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/v2/client/identity_provider/idps_login_parameters.go b/v2/client/identity_provider/idps_login_parameters.go deleted file mode 100644 index 38e9ff99..00000000 --- a/v2/client/identity_provider/idps_login_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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" -) - -// NewIdpsLoginParams creates a new IdpsLoginParams 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 NewIdpsLoginParams() *IdpsLoginParams { - return &IdpsLoginParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewIdpsLoginParamsWithTimeout creates a new IdpsLoginParams object -// with the ability to set a timeout on a request. -func NewIdpsLoginParamsWithTimeout(timeout time.Duration) *IdpsLoginParams { - return &IdpsLoginParams{ - timeout: timeout, - } -} - -// NewIdpsLoginParamsWithContext creates a new IdpsLoginParams object -// with the ability to set a context for a request. -func NewIdpsLoginParamsWithContext(ctx context.Context) *IdpsLoginParams { - return &IdpsLoginParams{ - Context: ctx, - } -} - -// NewIdpsLoginParamsWithHTTPClient creates a new IdpsLoginParams object -// with the ability to set a custom HTTPClient for a request. -func NewIdpsLoginParamsWithHTTPClient(client *http.Client) *IdpsLoginParams { - return &IdpsLoginParams{ - HTTPClient: client, - } -} - -/* -IdpsLoginParams contains all the parameters to send to the API endpoint - - for the idps login operation. - - Typically these are written to a http.Request. -*/ -type IdpsLoginParams struct { - - /* TenantID. - - Specifies an optional tenantId for which the SSO login should be done. If this is not specified, cluster SSO login is done. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the idps login params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdpsLoginParams) WithDefaults() *IdpsLoginParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the idps login params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdpsLoginParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the idps login params -func (o *IdpsLoginParams) WithTimeout(timeout time.Duration) *IdpsLoginParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the idps login params -func (o *IdpsLoginParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the idps login params -func (o *IdpsLoginParams) WithContext(ctx context.Context) *IdpsLoginParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the idps login params -func (o *IdpsLoginParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the idps login params -func (o *IdpsLoginParams) WithHTTPClient(client *http.Client) *IdpsLoginParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the idps login params -func (o *IdpsLoginParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTenantID adds the tenantID to the idps login params -func (o *IdpsLoginParams) WithTenantID(tenantID *string) *IdpsLoginParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the idps login params -func (o *IdpsLoginParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *IdpsLoginParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/identity_provider/idps_login_responses.go b/v2/client/identity_provider/idps_login_responses.go deleted file mode 100644 index dc793fee..00000000 --- a/v2/client/identity_provider/idps_login_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// IdpsLoginReader is a Reader for the IdpsLogin structure. -type IdpsLoginReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *IdpsLoginReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 302: - result := NewIdpsLoginFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewIdpsLoginDefault(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 - } -} - -// NewIdpsLoginFound creates a IdpsLoginFound with default headers values -func NewIdpsLoginFound() *IdpsLoginFound { - return &IdpsLoginFound{} -} - -/* -IdpsLoginFound describes a response with status code 302, with default header values. - -No Content -*/ -type IdpsLoginFound struct { -} - -// IsSuccess returns true when this idps login found response has a 2xx status code -func (o *IdpsLoginFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this idps login found response has a 3xx status code -func (o *IdpsLoginFound) IsRedirect() bool { - return true -} - -// IsClientError returns true when this idps login found response has a 4xx status code -func (o *IdpsLoginFound) IsClientError() bool { - return false -} - -// IsServerError returns true when this idps login found response has a 5xx status code -func (o *IdpsLoginFound) IsServerError() bool { - return false -} - -// IsCode returns true when this idps login found response a status code equal to that given -func (o *IdpsLoginFound) IsCode(code int) bool { - return code == 302 -} - -// Code gets the status code for the idps login found response -func (o *IdpsLoginFound) Code() int { - return 302 -} - -func (o *IdpsLoginFound) Error() string { - return fmt.Sprintf("[GET /idps/login][%d] idpsLoginFound", 302) -} - -func (o *IdpsLoginFound) String() string { - return fmt.Sprintf("[GET /idps/login][%d] idpsLoginFound", 302) -} - -func (o *IdpsLoginFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewIdpsLoginDefault creates a IdpsLoginDefault with default headers values -func NewIdpsLoginDefault(code int) *IdpsLoginDefault { - return &IdpsLoginDefault{ - _statusCode: code, - } -} - -/* -IdpsLoginDefault describes a response with status code -1, with default header values. - -Error -*/ -type IdpsLoginDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this idps login default response has a 2xx status code -func (o *IdpsLoginDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this idps login default response has a 3xx status code -func (o *IdpsLoginDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this idps login default response has a 4xx status code -func (o *IdpsLoginDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this idps login default response has a 5xx status code -func (o *IdpsLoginDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this idps login default response a status code equal to that given -func (o *IdpsLoginDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the idps login default response -func (o *IdpsLoginDefault) Code() int { - return o._statusCode -} - -func (o *IdpsLoginDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps/login][%d] IdpsLogin default %s", o._statusCode, payload) -} - -func (o *IdpsLoginDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /idps/login][%d] IdpsLogin default %s", o._statusCode, payload) -} - -func (o *IdpsLoginDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *IdpsLoginDefault) 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/identity_provider/perform_identity_action_parameters.go b/v2/client/identity_provider/perform_identity_action_parameters.go deleted file mode 100644 index 01de1603..00000000 --- a/v2/client/identity_provider/perform_identity_action_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformIdentityActionParams creates a new PerformIdentityActionParams 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 NewPerformIdentityActionParams() *PerformIdentityActionParams { - return &PerformIdentityActionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformIdentityActionParamsWithTimeout creates a new PerformIdentityActionParams object -// with the ability to set a timeout on a request. -func NewPerformIdentityActionParamsWithTimeout(timeout time.Duration) *PerformIdentityActionParams { - return &PerformIdentityActionParams{ - timeout: timeout, - } -} - -// NewPerformIdentityActionParamsWithContext creates a new PerformIdentityActionParams object -// with the ability to set a context for a request. -func NewPerformIdentityActionParamsWithContext(ctx context.Context) *PerformIdentityActionParams { - return &PerformIdentityActionParams{ - Context: ctx, - } -} - -// NewPerformIdentityActionParamsWithHTTPClient creates a new PerformIdentityActionParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformIdentityActionParamsWithHTTPClient(client *http.Client) *PerformIdentityActionParams { - return &PerformIdentityActionParams{ - HTTPClient: client, - } -} - -/* -PerformIdentityActionParams contains all the parameters to send to the API endpoint - - for the perform identity action operation. - - Typically these are written to a http.Request. -*/ -type PerformIdentityActionParams struct { - - /* Body. - - Specifies parameters perform an identity action. - */ - Body *models.IdentityAction - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform identity action params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformIdentityActionParams) WithDefaults() *PerformIdentityActionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform identity action params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformIdentityActionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform identity action params -func (o *PerformIdentityActionParams) WithTimeout(timeout time.Duration) *PerformIdentityActionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform identity action params -func (o *PerformIdentityActionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform identity action params -func (o *PerformIdentityActionParams) WithContext(ctx context.Context) *PerformIdentityActionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform identity action params -func (o *PerformIdentityActionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform identity action params -func (o *PerformIdentityActionParams) WithHTTPClient(client *http.Client) *PerformIdentityActionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform identity action params -func (o *PerformIdentityActionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform identity action params -func (o *PerformIdentityActionParams) WithBody(body *models.IdentityAction) *PerformIdentityActionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform identity action params -func (o *PerformIdentityActionParams) SetBody(body *models.IdentityAction) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformIdentityActionParams) 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/identity_provider/perform_identity_action_responses.go b/v2/client/identity_provider/perform_identity_action_responses.go deleted file mode 100644 index 4c3d1088..00000000 --- a/v2/client/identity_provider/perform_identity_action_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformIdentityActionReader is a Reader for the PerformIdentityAction structure. -type PerformIdentityActionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformIdentityActionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPerformIdentityActionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformIdentityActionDefault(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 - } -} - -// NewPerformIdentityActionCreated creates a PerformIdentityActionCreated with default headers values -func NewPerformIdentityActionCreated() *PerformIdentityActionCreated { - return &PerformIdentityActionCreated{} -} - -/* -PerformIdentityActionCreated describes a response with status code 201, with default header values. - -Success -*/ -type PerformIdentityActionCreated struct { - Payload *models.IdentityAction -} - -// IsSuccess returns true when this perform identity action created response has a 2xx status code -func (o *PerformIdentityActionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform identity action created response has a 3xx status code -func (o *PerformIdentityActionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform identity action created response has a 4xx status code -func (o *PerformIdentityActionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform identity action created response has a 5xx status code -func (o *PerformIdentityActionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this perform identity action created response a status code equal to that given -func (o *PerformIdentityActionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the perform identity action created response -func (o *PerformIdentityActionCreated) Code() int { - return 201 -} - -func (o *PerformIdentityActionCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers/actions][%d] performIdentityActionCreated %s", 201, payload) -} - -func (o *PerformIdentityActionCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers/actions][%d] performIdentityActionCreated %s", 201, payload) -} - -func (o *PerformIdentityActionCreated) GetPayload() *models.IdentityAction { - return o.Payload -} - -func (o *PerformIdentityActionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityAction) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPerformIdentityActionDefault creates a PerformIdentityActionDefault with default headers values -func NewPerformIdentityActionDefault(code int) *PerformIdentityActionDefault { - return &PerformIdentityActionDefault{ - _statusCode: code, - } -} - -/* -PerformIdentityActionDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformIdentityActionDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform identity action default response has a 2xx status code -func (o *PerformIdentityActionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform identity action default response has a 3xx status code -func (o *PerformIdentityActionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform identity action default response has a 4xx status code -func (o *PerformIdentityActionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform identity action default response has a 5xx status code -func (o *PerformIdentityActionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform identity action default response a status code equal to that given -func (o *PerformIdentityActionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform identity action default response -func (o *PerformIdentityActionDefault) Code() int { - return o._statusCode -} - -func (o *PerformIdentityActionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers/actions][%d] PerformIdentityAction default %s", o._statusCode, payload) -} - -func (o *PerformIdentityActionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /identity-providers/actions][%d] PerformIdentityAction default %s", o._statusCode, payload) -} - -func (o *PerformIdentityActionDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformIdentityActionDefault) 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/identity_provider/update_identity_parameters.go b/v2/client/identity_provider/update_identity_parameters.go deleted file mode 100644 index 97e57eea..00000000 --- a/v2/client/identity_provider/update_identity_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateIdentityParams creates a new UpdateIdentityParams 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 NewUpdateIdentityParams() *UpdateIdentityParams { - return &UpdateIdentityParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIdentityParamsWithTimeout creates a new UpdateIdentityParams object -// with the ability to set a timeout on a request. -func NewUpdateIdentityParamsWithTimeout(timeout time.Duration) *UpdateIdentityParams { - return &UpdateIdentityParams{ - timeout: timeout, - } -} - -// NewUpdateIdentityParamsWithContext creates a new UpdateIdentityParams object -// with the ability to set a context for a request. -func NewUpdateIdentityParamsWithContext(ctx context.Context) *UpdateIdentityParams { - return &UpdateIdentityParams{ - Context: ctx, - } -} - -// NewUpdateIdentityParamsWithHTTPClient creates a new UpdateIdentityParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIdentityParamsWithHTTPClient(client *http.Client) *UpdateIdentityParams { - return &UpdateIdentityParams{ - HTTPClient: client, - } -} - -/* -UpdateIdentityParams contains all the parameters to send to the API endpoint - - for the update identity operation. - - Typically these are written to a http.Request. -*/ -type UpdateIdentityParams struct { - - /* Body. - - Specifies parameters to update identity provider configuration - */ - Body *models.IdentityConfig - - /* ID. - - Specifies id of identity provider configuration - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdentityParams) WithDefaults() *UpdateIdentityParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdentityParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update identity params -func (o *UpdateIdentityParams) WithTimeout(timeout time.Duration) *UpdateIdentityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update identity params -func (o *UpdateIdentityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update identity params -func (o *UpdateIdentityParams) WithContext(ctx context.Context) *UpdateIdentityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update identity params -func (o *UpdateIdentityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update identity params -func (o *UpdateIdentityParams) WithHTTPClient(client *http.Client) *UpdateIdentityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update identity params -func (o *UpdateIdentityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update identity params -func (o *UpdateIdentityParams) WithBody(body *models.IdentityConfig) *UpdateIdentityParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update identity params -func (o *UpdateIdentityParams) SetBody(body *models.IdentityConfig) { - o.Body = body -} - -// WithID adds the id to the update identity params -func (o *UpdateIdentityParams) WithID(id int64) *UpdateIdentityParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update identity params -func (o *UpdateIdentityParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIdentityParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/identity_provider/update_identity_provider_parameters.go b/v2/client/identity_provider/update_identity_provider_parameters.go deleted file mode 100644 index 368840e7..00000000 --- a/v2/client/identity_provider/update_identity_provider_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateIdentityProviderParams creates a new UpdateIdentityProviderParams 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 NewUpdateIdentityProviderParams() *UpdateIdentityProviderParams { - return &UpdateIdentityProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIdentityProviderParamsWithTimeout creates a new UpdateIdentityProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateIdentityProviderParamsWithTimeout(timeout time.Duration) *UpdateIdentityProviderParams { - return &UpdateIdentityProviderParams{ - timeout: timeout, - } -} - -// NewUpdateIdentityProviderParamsWithContext creates a new UpdateIdentityProviderParams object -// with the ability to set a context for a request. -func NewUpdateIdentityProviderParamsWithContext(ctx context.Context) *UpdateIdentityProviderParams { - return &UpdateIdentityProviderParams{ - Context: ctx, - } -} - -// NewUpdateIdentityProviderParamsWithHTTPClient creates a new UpdateIdentityProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIdentityProviderParamsWithHTTPClient(client *http.Client) *UpdateIdentityProviderParams { - return &UpdateIdentityProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateIdentityProviderParams contains all the parameters to send to the API endpoint - - for the update identity provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateIdentityProviderParams struct { - - /* Body. - - Specifies parameters to update identity provider configuration - */ - Body *models.UpdateIdpRequestParams - - /* ID. - - Specifies id of idp configuration - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdentityProviderParams) WithDefaults() *UpdateIdentityProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update identity provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIdentityProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update identity provider params -func (o *UpdateIdentityProviderParams) WithTimeout(timeout time.Duration) *UpdateIdentityProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update identity provider params -func (o *UpdateIdentityProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update identity provider params -func (o *UpdateIdentityProviderParams) WithContext(ctx context.Context) *UpdateIdentityProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update identity provider params -func (o *UpdateIdentityProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update identity provider params -func (o *UpdateIdentityProviderParams) WithHTTPClient(client *http.Client) *UpdateIdentityProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update identity provider params -func (o *UpdateIdentityProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update identity provider params -func (o *UpdateIdentityProviderParams) WithBody(body *models.UpdateIdpRequestParams) *UpdateIdentityProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update identity provider params -func (o *UpdateIdentityProviderParams) SetBody(body *models.UpdateIdpRequestParams) { - o.Body = body -} - -// WithID adds the id to the update identity provider params -func (o *UpdateIdentityProviderParams) WithID(id int64) *UpdateIdentityProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update identity provider params -func (o *UpdateIdentityProviderParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIdentityProviderParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/identity_provider/update_identity_provider_responses.go b/v2/client/identity_provider/update_identity_provider_responses.go deleted file mode 100644 index 8841d9fa..00000000 --- a/v2/client/identity_provider/update_identity_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateIdentityProviderReader is a Reader for the UpdateIdentityProvider structure. -type UpdateIdentityProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIdentityProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIdentityProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIdentityProviderDefault(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 - } -} - -// NewUpdateIdentityProviderOK creates a UpdateIdentityProviderOK with default headers values -func NewUpdateIdentityProviderOK() *UpdateIdentityProviderOK { - return &UpdateIdentityProviderOK{} -} - -/* -UpdateIdentityProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIdentityProviderOK struct { - Payload *models.IdentityProviderConfiguration -} - -// IsSuccess returns true when this update identity provider o k response has a 2xx status code -func (o *UpdateIdentityProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update identity provider o k response has a 3xx status code -func (o *UpdateIdentityProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update identity provider o k response has a 4xx status code -func (o *UpdateIdentityProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update identity provider o k response has a 5xx status code -func (o *UpdateIdentityProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update identity provider o k response a status code equal to that given -func (o *UpdateIdentityProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update identity provider o k response -func (o *UpdateIdentityProviderOK) Code() int { - return 200 -} - -func (o *UpdateIdentityProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /idps/{id}][%d] updateIdentityProviderOK %s", 200, payload) -} - -func (o *UpdateIdentityProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /idps/{id}][%d] updateIdentityProviderOK %s", 200, payload) -} - -func (o *UpdateIdentityProviderOK) GetPayload() *models.IdentityProviderConfiguration { - return o.Payload -} - -func (o *UpdateIdentityProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityProviderConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIdentityProviderDefault creates a UpdateIdentityProviderDefault with default headers values -func NewUpdateIdentityProviderDefault(code int) *UpdateIdentityProviderDefault { - return &UpdateIdentityProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateIdentityProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIdentityProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update identity provider default response has a 2xx status code -func (o *UpdateIdentityProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update identity provider default response has a 3xx status code -func (o *UpdateIdentityProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update identity provider default response has a 4xx status code -func (o *UpdateIdentityProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update identity provider default response has a 5xx status code -func (o *UpdateIdentityProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update identity provider default response a status code equal to that given -func (o *UpdateIdentityProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update identity provider default response -func (o *UpdateIdentityProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIdentityProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /idps/{id}][%d] UpdateIdentityProvider default %s", o._statusCode, payload) -} - -func (o *UpdateIdentityProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /idps/{id}][%d] UpdateIdentityProvider default %s", o._statusCode, payload) -} - -func (o *UpdateIdentityProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateIdentityProviderDefault) 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/identity_provider/update_identity_responses.go b/v2/client/identity_provider/update_identity_responses.go deleted file mode 100644 index 55dab130..00000000 --- a/v2/client/identity_provider/update_identity_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package identity_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateIdentityReader is a Reader for the UpdateIdentity structure. -type UpdateIdentityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIdentityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIdentityOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIdentityDefault(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 - } -} - -// NewUpdateIdentityOK creates a UpdateIdentityOK with default headers values -func NewUpdateIdentityOK() *UpdateIdentityOK { - return &UpdateIdentityOK{} -} - -/* -UpdateIdentityOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIdentityOK struct { - Payload *models.IdentityConfig -} - -// IsSuccess returns true when this update identity o k response has a 2xx status code -func (o *UpdateIdentityOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update identity o k response has a 3xx status code -func (o *UpdateIdentityOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update identity o k response has a 4xx status code -func (o *UpdateIdentityOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update identity o k response has a 5xx status code -func (o *UpdateIdentityOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update identity o k response a status code equal to that given -func (o *UpdateIdentityOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update identity o k response -func (o *UpdateIdentityOK) Code() int { - return 200 -} - -func (o *UpdateIdentityOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /identity-providers/{id}][%d] updateIdentityOK %s", 200, payload) -} - -func (o *UpdateIdentityOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /identity-providers/{id}][%d] updateIdentityOK %s", 200, payload) -} - -func (o *UpdateIdentityOK) GetPayload() *models.IdentityConfig { - return o.Payload -} - -func (o *UpdateIdentityOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IdentityConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIdentityDefault creates a UpdateIdentityDefault with default headers values -func NewUpdateIdentityDefault(code int) *UpdateIdentityDefault { - return &UpdateIdentityDefault{ - _statusCode: code, - } -} - -/* -UpdateIdentityDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIdentityDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update identity default response has a 2xx status code -func (o *UpdateIdentityDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update identity default response has a 3xx status code -func (o *UpdateIdentityDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update identity default response has a 4xx status code -func (o *UpdateIdentityDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update identity default response has a 5xx status code -func (o *UpdateIdentityDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update identity default response a status code equal to that given -func (o *UpdateIdentityDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update identity default response -func (o *UpdateIdentityDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIdentityDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /identity-providers/{id}][%d] UpdateIdentity default %s", o._statusCode, payload) -} - -func (o *UpdateIdentityDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /identity-providers/{id}][%d] UpdateIdentity default %s", o._statusCode, payload) -} - -func (o *UpdateIdentityDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateIdentityDefault) 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/kerberos_provider/get_kerberos_provider_by_id_parameters.go b/v2/client/kerberos_provider/get_kerberos_provider_by_id_parameters.go deleted file mode 100644 index c481fd20..00000000 --- a/v2/client/kerberos_provider/get_kerberos_provider_by_id_parameters.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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" -) - -// NewGetKerberosProviderByIDParams creates a new GetKerberosProviderByIDParams 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 NewGetKerberosProviderByIDParams() *GetKerberosProviderByIDParams { - return &GetKerberosProviderByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKerberosProviderByIDParamsWithTimeout creates a new GetKerberosProviderByIDParams object -// with the ability to set a timeout on a request. -func NewGetKerberosProviderByIDParamsWithTimeout(timeout time.Duration) *GetKerberosProviderByIDParams { - return &GetKerberosProviderByIDParams{ - timeout: timeout, - } -} - -// NewGetKerberosProviderByIDParamsWithContext creates a new GetKerberosProviderByIDParams object -// with the ability to set a context for a request. -func NewGetKerberosProviderByIDParamsWithContext(ctx context.Context) *GetKerberosProviderByIDParams { - return &GetKerberosProviderByIDParams{ - Context: ctx, - } -} - -// NewGetKerberosProviderByIDParamsWithHTTPClient creates a new GetKerberosProviderByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKerberosProviderByIDParamsWithHTTPClient(client *http.Client) *GetKerberosProviderByIDParams { - return &GetKerberosProviderByIDParams{ - HTTPClient: client, - } -} - -/* -GetKerberosProviderByIDParams contains all the parameters to send to the API endpoint - - for the get kerberos provider by Id operation. - - Typically these are written to a http.Request. -*/ -type GetKerberosProviderByIDParams struct { - - /* ID. - - Specifies the id which will be of the pattern - cluster_id:clusterincarnation_id:resource_id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kerberos provider by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKerberosProviderByIDParams) WithDefaults() *GetKerberosProviderByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kerberos provider by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKerberosProviderByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) WithTimeout(timeout time.Duration) *GetKerberosProviderByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) WithContext(ctx context.Context) *GetKerberosProviderByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) WithHTTPClient(client *http.Client) *GetKerberosProviderByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) WithID(id string) *GetKerberosProviderByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get kerberos provider by Id params -func (o *GetKerberosProviderByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKerberosProviderByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/kerberos_provider/get_kerberos_provider_by_id_responses.go b/v2/client/kerberos_provider/get_kerberos_provider_by_id_responses.go deleted file mode 100644 index 6d9f1214..00000000 --- a/v2/client/kerberos_provider/get_kerberos_provider_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetKerberosProviderByIDReader is a Reader for the GetKerberosProviderByID structure. -type GetKerberosProviderByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKerberosProviderByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKerberosProviderByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKerberosProviderByIDDefault(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 - } -} - -// NewGetKerberosProviderByIDOK creates a GetKerberosProviderByIDOK with default headers values -func NewGetKerberosProviderByIDOK() *GetKerberosProviderByIDOK { - return &GetKerberosProviderByIDOK{} -} - -/* -GetKerberosProviderByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKerberosProviderByIDOK struct { - Payload *models.KerberosProvider -} - -// IsSuccess returns true when this get kerberos provider by Id o k response has a 2xx status code -func (o *GetKerberosProviderByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get kerberos provider by Id o k response has a 3xx status code -func (o *GetKerberosProviderByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get kerberos provider by Id o k response has a 4xx status code -func (o *GetKerberosProviderByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get kerberos provider by Id o k response has a 5xx status code -func (o *GetKerberosProviderByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get kerberos provider by Id o k response a status code equal to that given -func (o *GetKerberosProviderByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get kerberos provider by Id o k response -func (o *GetKerberosProviderByIDOK) Code() int { - return 200 -} - -func (o *GetKerberosProviderByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers/{id}][%d] getKerberosProviderByIdOK %s", 200, payload) -} - -func (o *GetKerberosProviderByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers/{id}][%d] getKerberosProviderByIdOK %s", 200, payload) -} - -func (o *GetKerberosProviderByIDOK) GetPayload() *models.KerberosProvider { - return o.Payload -} - -func (o *GetKerberosProviderByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KerberosProvider) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKerberosProviderByIDDefault creates a GetKerberosProviderByIDDefault with default headers values -func NewGetKerberosProviderByIDDefault(code int) *GetKerberosProviderByIDDefault { - return &GetKerberosProviderByIDDefault{ - _statusCode: code, - } -} - -/* -GetKerberosProviderByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKerberosProviderByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get kerberos provider by Id default response has a 2xx status code -func (o *GetKerberosProviderByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get kerberos provider by Id default response has a 3xx status code -func (o *GetKerberosProviderByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get kerberos provider by Id default response has a 4xx status code -func (o *GetKerberosProviderByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get kerberos provider by Id default response has a 5xx status code -func (o *GetKerberosProviderByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get kerberos provider by Id default response a status code equal to that given -func (o *GetKerberosProviderByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get kerberos provider by Id default response -func (o *GetKerberosProviderByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetKerberosProviderByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers/{id}][%d] GetKerberosProviderById default %s", o._statusCode, payload) -} - -func (o *GetKerberosProviderByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers/{id}][%d] GetKerberosProviderById default %s", o._statusCode, payload) -} - -func (o *GetKerberosProviderByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetKerberosProviderByIDDefault) 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/kerberos_provider/get_kerberos_providers_parameters.go b/v2/client/kerberos_provider/get_kerberos_providers_parameters.go deleted file mode 100644 index d0d9fc1d..00000000 --- a/v2/client/kerberos_provider/get_kerberos_providers_parameters.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/go-openapi/swag" -) - -// NewGetKerberosProvidersParams creates a new GetKerberosProvidersParams 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 NewGetKerberosProvidersParams() *GetKerberosProvidersParams { - return &GetKerberosProvidersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKerberosProvidersParamsWithTimeout creates a new GetKerberosProvidersParams object -// with the ability to set a timeout on a request. -func NewGetKerberosProvidersParamsWithTimeout(timeout time.Duration) *GetKerberosProvidersParams { - return &GetKerberosProvidersParams{ - timeout: timeout, - } -} - -// NewGetKerberosProvidersParamsWithContext creates a new GetKerberosProvidersParams object -// with the ability to set a context for a request. -func NewGetKerberosProvidersParamsWithContext(ctx context.Context) *GetKerberosProvidersParams { - return &GetKerberosProvidersParams{ - Context: ctx, - } -} - -// NewGetKerberosProvidersParamsWithHTTPClient creates a new GetKerberosProvidersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKerberosProvidersParamsWithHTTPClient(client *http.Client) *GetKerberosProvidersParams { - return &GetKerberosProvidersParams{ - HTTPClient: client, - } -} - -/* -GetKerberosProvidersParams contains all the parameters to send to the API endpoint - - for the get kerberos providers operation. - - Typically these are written to a http.Request. -*/ -type GetKerberosProvidersParams struct { - - /* HasLDAP. - - Filter by whether LDAP is associated with the provider. - */ - HasLDAP *bool - - /* Ids. - - Filter by a list of Kerberos Provider Ids. - */ - Ids []int64 - - /* KdcServers. - - Filter by a list of KDC servers. - */ - KdcServers []string - - /* RealmNames. - - Filter by a list of realm names. - */ - RealmNames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kerberos providers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKerberosProvidersParams) WithDefaults() *GetKerberosProvidersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kerberos providers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKerberosProvidersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithTimeout(timeout time.Duration) *GetKerberosProvidersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithContext(ctx context.Context) *GetKerberosProvidersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithHTTPClient(client *http.Client) *GetKerberosProvidersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithHasLDAP adds the hasLDAP to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithHasLDAP(hasLDAP *bool) *GetKerberosProvidersParams { - o.SetHasLDAP(hasLDAP) - return o -} - -// SetHasLDAP adds the hasLDAP to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetHasLDAP(hasLDAP *bool) { - o.HasLDAP = hasLDAP -} - -// WithIds adds the ids to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithIds(ids []int64) *GetKerberosProvidersParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithKdcServers adds the kdcServers to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithKdcServers(kdcServers []string) *GetKerberosProvidersParams { - o.SetKdcServers(kdcServers) - return o -} - -// SetKdcServers adds the kdcServers to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetKdcServers(kdcServers []string) { - o.KdcServers = kdcServers -} - -// WithRealmNames adds the realmNames to the get kerberos providers params -func (o *GetKerberosProvidersParams) WithRealmNames(realmNames []string) *GetKerberosProvidersParams { - o.SetRealmNames(realmNames) - return o -} - -// SetRealmNames adds the realmNames to the get kerberos providers params -func (o *GetKerberosProvidersParams) SetRealmNames(realmNames []string) { - o.RealmNames = realmNames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKerberosProvidersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.HasLDAP != nil { - - // query param hasLDAP - var qrHasLDAP bool - - if o.HasLDAP != nil { - qrHasLDAP = *o.HasLDAP - } - qHasLDAP := swag.FormatBool(qrHasLDAP) - if qHasLDAP != "" { - - if err := r.SetQueryParam("hasLDAP", qHasLDAP); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.KdcServers != nil { - - // binding items for kdcServers - joinedKdcServers := o.bindParamKdcServers(reg) - - // query array param kdcServers - if err := r.SetQueryParam("kdcServers", joinedKdcServers...); err != nil { - return err - } - } - - if o.RealmNames != nil { - - // binding items for realmNames - joinedRealmNames := o.bindParamRealmNames(reg) - - // query array param realmNames - if err := r.SetQueryParam("realmNames", joinedRealmNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetKerberosProviders binds the parameter ids -func (o *GetKerberosProvidersParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetKerberosProviders binds the parameter kdcServers -func (o *GetKerberosProvidersParams) bindParamKdcServers(formats strfmt.Registry) []string { - kdcServersIR := o.KdcServers - - var kdcServersIC []string - for _, kdcServersIIR := range kdcServersIR { // explode []string - - kdcServersIIV := kdcServersIIR // string as string - kdcServersIC = append(kdcServersIC, kdcServersIIV) - } - - // items.CollectionFormat: "" - kdcServersIS := swag.JoinByFormat(kdcServersIC, "") - - return kdcServersIS -} - -// bindParamGetKerberosProviders binds the parameter realmNames -func (o *GetKerberosProvidersParams) bindParamRealmNames(formats strfmt.Registry) []string { - realmNamesIR := o.RealmNames - - var realmNamesIC []string - for _, realmNamesIIR := range realmNamesIR { // explode []string - - realmNamesIIV := realmNamesIIR // string as string - realmNamesIC = append(realmNamesIC, realmNamesIIV) - } - - // items.CollectionFormat: "" - realmNamesIS := swag.JoinByFormat(realmNamesIC, "") - - return realmNamesIS -} diff --git a/v2/client/kerberos_provider/get_kerberos_providers_responses.go b/v2/client/kerberos_provider/get_kerberos_providers_responses.go deleted file mode 100644 index 44f258c8..00000000 --- a/v2/client/kerberos_provider/get_kerberos_providers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetKerberosProvidersReader is a Reader for the GetKerberosProviders structure. -type GetKerberosProvidersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKerberosProvidersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKerberosProvidersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKerberosProvidersDefault(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 - } -} - -// NewGetKerberosProvidersOK creates a GetKerberosProvidersOK with default headers values -func NewGetKerberosProvidersOK() *GetKerberosProvidersOK { - return &GetKerberosProvidersOK{} -} - -/* -GetKerberosProvidersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKerberosProvidersOK struct { - Payload *models.KerberosProviders -} - -// IsSuccess returns true when this get kerberos providers o k response has a 2xx status code -func (o *GetKerberosProvidersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get kerberos providers o k response has a 3xx status code -func (o *GetKerberosProvidersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get kerberos providers o k response has a 4xx status code -func (o *GetKerberosProvidersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get kerberos providers o k response has a 5xx status code -func (o *GetKerberosProvidersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get kerberos providers o k response a status code equal to that given -func (o *GetKerberosProvidersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get kerberos providers o k response -func (o *GetKerberosProvidersOK) Code() int { - return 200 -} - -func (o *GetKerberosProvidersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers][%d] getKerberosProvidersOK %s", 200, payload) -} - -func (o *GetKerberosProvidersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers][%d] getKerberosProvidersOK %s", 200, payload) -} - -func (o *GetKerberosProvidersOK) GetPayload() *models.KerberosProviders { - return o.Payload -} - -func (o *GetKerberosProvidersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KerberosProviders) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKerberosProvidersDefault creates a GetKerberosProvidersDefault with default headers values -func NewGetKerberosProvidersDefault(code int) *GetKerberosProvidersDefault { - return &GetKerberosProvidersDefault{ - _statusCode: code, - } -} - -/* -GetKerberosProvidersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKerberosProvidersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get kerberos providers default response has a 2xx status code -func (o *GetKerberosProvidersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get kerberos providers default response has a 3xx status code -func (o *GetKerberosProvidersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get kerberos providers default response has a 4xx status code -func (o *GetKerberosProvidersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get kerberos providers default response has a 5xx status code -func (o *GetKerberosProvidersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get kerberos providers default response a status code equal to that given -func (o *GetKerberosProvidersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get kerberos providers default response -func (o *GetKerberosProvidersDefault) Code() int { - return o._statusCode -} - -func (o *GetKerberosProvidersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers][%d] GetKerberosProviders default %s", o._statusCode, payload) -} - -func (o *GetKerberosProvidersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kerberos-providers][%d] GetKerberosProviders default %s", o._statusCode, payload) -} - -func (o *GetKerberosProvidersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetKerberosProvidersDefault) 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/kerberos_provider/kerberos_provider_client.go b/v2/client/kerberos_provider/kerberos_provider_client.go deleted file mode 100644 index 141a3934..00000000 --- a/v2/client/kerberos_provider/kerberos_provider_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new kerberos provider API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new kerberos provider API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new kerberos provider API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for kerberos provider API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetKerberosProviderByID(params *GetKerberosProviderByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKerberosProviderByIDOK, error) - - GetKerberosProviders(params *GetKerberosProvidersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKerberosProvidersOK, error) - - RegisterKerberosProvider(params *RegisterKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterKerberosProviderCreated, error) - - UnregisterKerberosProvider(params *UnregisterKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterKerberosProviderOK, error) - - UpdateKerberosProvider(params *UpdateKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKerberosProviderOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetKerberosProviderByID gets the registered kerberos provider by id - -Get the Registered Kerberos Provider by id. -*/ -func (a *Client) GetKerberosProviderByID(params *GetKerberosProviderByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKerberosProviderByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKerberosProviderByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetKerberosProviderById", - Method: "GET", - PathPattern: "/kerberos-providers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKerberosProviderByIDReader{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.(*GetKerberosProviderByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKerberosProviderByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetKerberosProviders gets the list of kerberos providers - -Get the list of Kerberos Authentication Providers. -*/ -func (a *Client) GetKerberosProviders(params *GetKerberosProvidersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKerberosProvidersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKerberosProvidersParams() - } - op := &runtime.ClientOperation{ - ID: "GetKerberosProviders", - Method: "GET", - PathPattern: "/kerberos-providers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKerberosProvidersReader{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.(*GetKerberosProvidersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKerberosProvidersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterKerberosProvider registers a kerberos authentication provider - -Register a Kerberos Authentication Provider. -*/ -func (a *Client) RegisterKerberosProvider(params *RegisterKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterKerberosProviderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterKerberosProviderParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterKerberosProvider", - Method: "POST", - PathPattern: "/kerberos-providers/register", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterKerberosProviderReader{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.(*RegisterKerberosProviderCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterKerberosProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnregisterKerberosProvider unregisters a kerberos provider - -Unregister a Kerberos Provider. -*/ -func (a *Client) UnregisterKerberosProvider(params *UnregisterKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterKerberosProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterKerberosProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterKerberosProvider", - Method: "POST", - PathPattern: "/kerberos-providers/{id}/unregister", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnregisterKerberosProviderReader{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.(*UnregisterKerberosProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterKerberosProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateKerberosProvider updates the kerberos provider registration - -Update the Kerberos Provider Registration. -*/ -func (a *Client) UpdateKerberosProvider(params *UpdateKerberosProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKerberosProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateKerberosProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateKerberosProvider", - Method: "PUT", - PathPattern: "/kerberos-providers/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateKerberosProviderReader{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.(*UpdateKerberosProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateKerberosProviderDefault) - 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/v2/client/kerberos_provider/register_kerberos_provider_parameters.go b/v2/client/kerberos_provider/register_kerberos_provider_parameters.go deleted file mode 100644 index b583b8fe..00000000 --- a/v2/client/kerberos_provider/register_kerberos_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterKerberosProviderParams creates a new RegisterKerberosProviderParams 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 NewRegisterKerberosProviderParams() *RegisterKerberosProviderParams { - return &RegisterKerberosProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterKerberosProviderParamsWithTimeout creates a new RegisterKerberosProviderParams object -// with the ability to set a timeout on a request. -func NewRegisterKerberosProviderParamsWithTimeout(timeout time.Duration) *RegisterKerberosProviderParams { - return &RegisterKerberosProviderParams{ - timeout: timeout, - } -} - -// NewRegisterKerberosProviderParamsWithContext creates a new RegisterKerberosProviderParams object -// with the ability to set a context for a request. -func NewRegisterKerberosProviderParamsWithContext(ctx context.Context) *RegisterKerberosProviderParams { - return &RegisterKerberosProviderParams{ - Context: ctx, - } -} - -// NewRegisterKerberosProviderParamsWithHTTPClient creates a new RegisterKerberosProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterKerberosProviderParamsWithHTTPClient(client *http.Client) *RegisterKerberosProviderParams { - return &RegisterKerberosProviderParams{ - HTTPClient: client, - } -} - -/* -RegisterKerberosProviderParams contains all the parameters to send to the API endpoint - - for the register kerberos provider operation. - - Typically these are written to a http.Request. -*/ -type RegisterKerberosProviderParams struct { - - /* Body. - - Specifies the parameters to Register a Kerberos Provider. - */ - Body *models.RegisterOrUpdateKerberosProviderRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterKerberosProviderParams) WithDefaults() *RegisterKerberosProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterKerberosProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register kerberos provider params -func (o *RegisterKerberosProviderParams) WithTimeout(timeout time.Duration) *RegisterKerberosProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register kerberos provider params -func (o *RegisterKerberosProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register kerberos provider params -func (o *RegisterKerberosProviderParams) WithContext(ctx context.Context) *RegisterKerberosProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register kerberos provider params -func (o *RegisterKerberosProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register kerberos provider params -func (o *RegisterKerberosProviderParams) WithHTTPClient(client *http.Client) *RegisterKerberosProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register kerberos provider params -func (o *RegisterKerberosProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register kerberos provider params -func (o *RegisterKerberosProviderParams) WithBody(body *models.RegisterOrUpdateKerberosProviderRequest) *RegisterKerberosProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register kerberos provider params -func (o *RegisterKerberosProviderParams) SetBody(body *models.RegisterOrUpdateKerberosProviderRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterKerberosProviderParams) 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/kerberos_provider/register_kerberos_provider_responses.go b/v2/client/kerberos_provider/register_kerberos_provider_responses.go deleted file mode 100644 index 2706ff6b..00000000 --- a/v2/client/kerberos_provider/register_kerberos_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterKerberosProviderReader is a Reader for the RegisterKerberosProvider structure. -type RegisterKerberosProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterKerberosProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegisterKerberosProviderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterKerberosProviderDefault(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 - } -} - -// NewRegisterKerberosProviderCreated creates a RegisterKerberosProviderCreated with default headers values -func NewRegisterKerberosProviderCreated() *RegisterKerberosProviderCreated { - return &RegisterKerberosProviderCreated{} -} - -/* -RegisterKerberosProviderCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegisterKerberosProviderCreated struct { - Payload *models.KerberosProvider -} - -// IsSuccess returns true when this register kerberos provider created response has a 2xx status code -func (o *RegisterKerberosProviderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register kerberos provider created response has a 3xx status code -func (o *RegisterKerberosProviderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register kerberos provider created response has a 4xx status code -func (o *RegisterKerberosProviderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this register kerberos provider created response has a 5xx status code -func (o *RegisterKerberosProviderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this register kerberos provider created response a status code equal to that given -func (o *RegisterKerberosProviderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the register kerberos provider created response -func (o *RegisterKerberosProviderCreated) Code() int { - return 201 -} - -func (o *RegisterKerberosProviderCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/register][%d] registerKerberosProviderCreated %s", 201, payload) -} - -func (o *RegisterKerberosProviderCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/register][%d] registerKerberosProviderCreated %s", 201, payload) -} - -func (o *RegisterKerberosProviderCreated) GetPayload() *models.KerberosProvider { - return o.Payload -} - -func (o *RegisterKerberosProviderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KerberosProvider) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterKerberosProviderDefault creates a RegisterKerberosProviderDefault with default headers values -func NewRegisterKerberosProviderDefault(code int) *RegisterKerberosProviderDefault { - return &RegisterKerberosProviderDefault{ - _statusCode: code, - } -} - -/* -RegisterKerberosProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterKerberosProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register kerberos provider default response has a 2xx status code -func (o *RegisterKerberosProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register kerberos provider default response has a 3xx status code -func (o *RegisterKerberosProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register kerberos provider default response has a 4xx status code -func (o *RegisterKerberosProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register kerberos provider default response has a 5xx status code -func (o *RegisterKerberosProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register kerberos provider default response a status code equal to that given -func (o *RegisterKerberosProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register kerberos provider default response -func (o *RegisterKerberosProviderDefault) Code() int { - return o._statusCode -} - -func (o *RegisterKerberosProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/register][%d] RegisterKerberosProvider default %s", o._statusCode, payload) -} - -func (o *RegisterKerberosProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/register][%d] RegisterKerberosProvider default %s", o._statusCode, payload) -} - -func (o *RegisterKerberosProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterKerberosProviderDefault) 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/kerberos_provider/unregister_kerberos_provider_parameters.go b/v2/client/kerberos_provider/unregister_kerberos_provider_parameters.go deleted file mode 100644 index b5712e45..00000000 --- a/v2/client/kerberos_provider/unregister_kerberos_provider_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUnregisterKerberosProviderParams creates a new UnregisterKerberosProviderParams 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 NewUnregisterKerberosProviderParams() *UnregisterKerberosProviderParams { - return &UnregisterKerberosProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterKerberosProviderParamsWithTimeout creates a new UnregisterKerberosProviderParams object -// with the ability to set a timeout on a request. -func NewUnregisterKerberosProviderParamsWithTimeout(timeout time.Duration) *UnregisterKerberosProviderParams { - return &UnregisterKerberosProviderParams{ - timeout: timeout, - } -} - -// NewUnregisterKerberosProviderParamsWithContext creates a new UnregisterKerberosProviderParams object -// with the ability to set a context for a request. -func NewUnregisterKerberosProviderParamsWithContext(ctx context.Context) *UnregisterKerberosProviderParams { - return &UnregisterKerberosProviderParams{ - Context: ctx, - } -} - -// NewUnregisterKerberosProviderParamsWithHTTPClient creates a new UnregisterKerberosProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterKerberosProviderParamsWithHTTPClient(client *http.Client) *UnregisterKerberosProviderParams { - return &UnregisterKerberosProviderParams{ - HTTPClient: client, - } -} - -/* -UnregisterKerberosProviderParams contains all the parameters to send to the API endpoint - - for the unregister kerberos provider operation. - - Typically these are written to a http.Request. -*/ -type UnregisterKerberosProviderParams struct { - - /* Body. - - Request to unregister a Kerberos Provider. - */ - Body *models.UnregisterKerberosRequest - - /* ID. - - Specifies the id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterKerberosProviderParams) WithDefaults() *UnregisterKerberosProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterKerberosProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) WithTimeout(timeout time.Duration) *UnregisterKerberosProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) WithContext(ctx context.Context) *UnregisterKerberosProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) WithHTTPClient(client *http.Client) *UnregisterKerberosProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) WithBody(body *models.UnregisterKerberosRequest) *UnregisterKerberosProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) SetBody(body *models.UnregisterKerberosRequest) { - o.Body = body -} - -// WithID adds the id to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) WithID(id string) *UnregisterKerberosProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unregister kerberos provider params -func (o *UnregisterKerberosProviderParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterKerberosProviderParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/kerberos_provider/unregister_kerberos_provider_responses.go b/v2/client/kerberos_provider/unregister_kerberos_provider_responses.go deleted file mode 100644 index 60177bff..00000000 --- a/v2/client/kerberos_provider/unregister_kerberos_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UnregisterKerberosProviderReader is a Reader for the UnregisterKerberosProvider structure. -type UnregisterKerberosProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterKerberosProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUnregisterKerberosProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterKerberosProviderDefault(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 - } -} - -// NewUnregisterKerberosProviderOK creates a UnregisterKerberosProviderOK with default headers values -func NewUnregisterKerberosProviderOK() *UnregisterKerberosProviderOK { - return &UnregisterKerberosProviderOK{} -} - -/* -UnregisterKerberosProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type UnregisterKerberosProviderOK struct { - Payload *models.UnregisterKerberosProvider -} - -// IsSuccess returns true when this unregister kerberos provider o k response has a 2xx status code -func (o *UnregisterKerberosProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unregister kerberos provider o k response has a 3xx status code -func (o *UnregisterKerberosProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unregister kerberos provider o k response has a 4xx status code -func (o *UnregisterKerberosProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this unregister kerberos provider o k response has a 5xx status code -func (o *UnregisterKerberosProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this unregister kerberos provider o k response a status code equal to that given -func (o *UnregisterKerberosProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the unregister kerberos provider o k response -func (o *UnregisterKerberosProviderOK) Code() int { - return 200 -} - -func (o *UnregisterKerberosProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/{id}/unregister][%d] unregisterKerberosProviderOK %s", 200, payload) -} - -func (o *UnregisterKerberosProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/{id}/unregister][%d] unregisterKerberosProviderOK %s", 200, payload) -} - -func (o *UnregisterKerberosProviderOK) GetPayload() *models.UnregisterKerberosProvider { - return o.Payload -} - -func (o *UnregisterKerberosProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UnregisterKerberosProvider) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUnregisterKerberosProviderDefault creates a UnregisterKerberosProviderDefault with default headers values -func NewUnregisterKerberosProviderDefault(code int) *UnregisterKerberosProviderDefault { - return &UnregisterKerberosProviderDefault{ - _statusCode: code, - } -} - -/* -UnregisterKerberosProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnregisterKerberosProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this unregister kerberos provider default response has a 2xx status code -func (o *UnregisterKerberosProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unregister kerberos provider default response has a 3xx status code -func (o *UnregisterKerberosProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unregister kerberos provider default response has a 4xx status code -func (o *UnregisterKerberosProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unregister kerberos provider default response has a 5xx status code -func (o *UnregisterKerberosProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unregister kerberos provider default response a status code equal to that given -func (o *UnregisterKerberosProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unregister kerberos provider default response -func (o *UnregisterKerberosProviderDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterKerberosProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/{id}/unregister][%d] UnregisterKerberosProvider default %s", o._statusCode, payload) -} - -func (o *UnregisterKerberosProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kerberos-providers/{id}/unregister][%d] UnregisterKerberosProvider default %s", o._statusCode, payload) -} - -func (o *UnregisterKerberosProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UnregisterKerberosProviderDefault) 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/kerberos_provider/update_kerberos_provider_parameters.go b/v2/client/kerberos_provider/update_kerberos_provider_parameters.go deleted file mode 100644 index c6ab2a25..00000000 --- a/v2/client/kerberos_provider/update_kerberos_provider_parameters.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateKerberosProviderParams creates a new UpdateKerberosProviderParams 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 NewUpdateKerberosProviderParams() *UpdateKerberosProviderParams { - return &UpdateKerberosProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateKerberosProviderParamsWithTimeout creates a new UpdateKerberosProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateKerberosProviderParamsWithTimeout(timeout time.Duration) *UpdateKerberosProviderParams { - return &UpdateKerberosProviderParams{ - timeout: timeout, - } -} - -// NewUpdateKerberosProviderParamsWithContext creates a new UpdateKerberosProviderParams object -// with the ability to set a context for a request. -func NewUpdateKerberosProviderParamsWithContext(ctx context.Context) *UpdateKerberosProviderParams { - return &UpdateKerberosProviderParams{ - Context: ctx, - } -} - -// NewUpdateKerberosProviderParamsWithHTTPClient creates a new UpdateKerberosProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateKerberosProviderParamsWithHTTPClient(client *http.Client) *UpdateKerberosProviderParams { - return &UpdateKerberosProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateKerberosProviderParams contains all the parameters to send to the API endpoint - - for the update kerberos provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateKerberosProviderParams struct { - - /* Body. - - Request to update a Kerberos Provider. - */ - Body *models.RegisterOrUpdateKerberosProviderRequest - - /* ID. - - Specifies the id which will be of the pattern - cluster_id:clusterincarnation_id:resource_id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKerberosProviderParams) WithDefaults() *UpdateKerberosProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update kerberos provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKerberosProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update kerberos provider params -func (o *UpdateKerberosProviderParams) WithTimeout(timeout time.Duration) *UpdateKerberosProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update kerberos provider params -func (o *UpdateKerberosProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update kerberos provider params -func (o *UpdateKerberosProviderParams) WithContext(ctx context.Context) *UpdateKerberosProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update kerberos provider params -func (o *UpdateKerberosProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update kerberos provider params -func (o *UpdateKerberosProviderParams) WithHTTPClient(client *http.Client) *UpdateKerberosProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update kerberos provider params -func (o *UpdateKerberosProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update kerberos provider params -func (o *UpdateKerberosProviderParams) WithBody(body *models.RegisterOrUpdateKerberosProviderRequest) *UpdateKerberosProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update kerberos provider params -func (o *UpdateKerberosProviderParams) SetBody(body *models.RegisterOrUpdateKerberosProviderRequest) { - o.Body = body -} - -// WithID adds the id to the update kerberos provider params -func (o *UpdateKerberosProviderParams) WithID(id string) *UpdateKerberosProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update kerberos provider params -func (o *UpdateKerberosProviderParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateKerberosProviderParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/kerberos_provider/update_kerberos_provider_responses.go b/v2/client/kerberos_provider/update_kerberos_provider_responses.go deleted file mode 100644 index 3e3b5ee7..00000000 --- a/v2/client/kerberos_provider/update_kerberos_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kerberos_provider - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateKerberosProviderReader is a Reader for the UpdateKerberosProvider structure. -type UpdateKerberosProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateKerberosProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateKerberosProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateKerberosProviderDefault(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 - } -} - -// NewUpdateKerberosProviderOK creates a UpdateKerberosProviderOK with default headers values -func NewUpdateKerberosProviderOK() *UpdateKerberosProviderOK { - return &UpdateKerberosProviderOK{} -} - -/* -UpdateKerberosProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateKerberosProviderOK struct { - Payload *models.KerberosProvider -} - -// IsSuccess returns true when this update kerberos provider o k response has a 2xx status code -func (o *UpdateKerberosProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update kerberos provider o k response has a 3xx status code -func (o *UpdateKerberosProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update kerberos provider o k response has a 4xx status code -func (o *UpdateKerberosProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update kerberos provider o k response has a 5xx status code -func (o *UpdateKerberosProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update kerberos provider o k response a status code equal to that given -func (o *UpdateKerberosProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update kerberos provider o k response -func (o *UpdateKerberosProviderOK) Code() int { - return 200 -} - -func (o *UpdateKerberosProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kerberos-providers/{id}][%d] updateKerberosProviderOK %s", 200, payload) -} - -func (o *UpdateKerberosProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kerberos-providers/{id}][%d] updateKerberosProviderOK %s", 200, payload) -} - -func (o *UpdateKerberosProviderOK) GetPayload() *models.KerberosProvider { - return o.Payload -} - -func (o *UpdateKerberosProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KerberosProvider) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateKerberosProviderDefault creates a UpdateKerberosProviderDefault with default headers values -func NewUpdateKerberosProviderDefault(code int) *UpdateKerberosProviderDefault { - return &UpdateKerberosProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateKerberosProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateKerberosProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update kerberos provider default response has a 2xx status code -func (o *UpdateKerberosProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update kerberos provider default response has a 3xx status code -func (o *UpdateKerberosProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update kerberos provider default response has a 4xx status code -func (o *UpdateKerberosProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update kerberos provider default response has a 5xx status code -func (o *UpdateKerberosProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update kerberos provider default response a status code equal to that given -func (o *UpdateKerberosProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update kerberos provider default response -func (o *UpdateKerberosProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateKerberosProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kerberos-providers/{id}][%d] UpdateKerberosProvider default %s", o._statusCode, payload) -} - -func (o *UpdateKerberosProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kerberos-providers/{id}][%d] UpdateKerberosProvider default %s", o._statusCode, payload) -} - -func (o *UpdateKerberosProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateKerberosProviderDefault) 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/key_management_system/add_kms_configuration_parameters.go b/v2/client/key_management_system/add_kms_configuration_parameters.go deleted file mode 100644 index 609c532c..00000000 --- a/v2/client/key_management_system/add_kms_configuration_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddKmsConfigurationParams creates a new AddKmsConfigurationParams 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 NewAddKmsConfigurationParams() *AddKmsConfigurationParams { - return &AddKmsConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddKmsConfigurationParamsWithTimeout creates a new AddKmsConfigurationParams object -// with the ability to set a timeout on a request. -func NewAddKmsConfigurationParamsWithTimeout(timeout time.Duration) *AddKmsConfigurationParams { - return &AddKmsConfigurationParams{ - timeout: timeout, - } -} - -// NewAddKmsConfigurationParamsWithContext creates a new AddKmsConfigurationParams object -// with the ability to set a context for a request. -func NewAddKmsConfigurationParamsWithContext(ctx context.Context) *AddKmsConfigurationParams { - return &AddKmsConfigurationParams{ - Context: ctx, - } -} - -// NewAddKmsConfigurationParamsWithHTTPClient creates a new AddKmsConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddKmsConfigurationParamsWithHTTPClient(client *http.Client) *AddKmsConfigurationParams { - return &AddKmsConfigurationParams{ - HTTPClient: client, - } -} - -/* -AddKmsConfigurationParams contains all the parameters to send to the API endpoint - - for the add kms configuration operation. - - Typically these are written to a http.Request. -*/ -type AddKmsConfigurationParams struct { - - /* Body. - - Parameters to add KMS on the cluster. - */ - Body *models.KmsConfigurationCreateParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add kms configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddKmsConfigurationParams) WithDefaults() *AddKmsConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add kms configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddKmsConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add kms configuration params -func (o *AddKmsConfigurationParams) WithTimeout(timeout time.Duration) *AddKmsConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add kms configuration params -func (o *AddKmsConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add kms configuration params -func (o *AddKmsConfigurationParams) WithContext(ctx context.Context) *AddKmsConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add kms configuration params -func (o *AddKmsConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add kms configuration params -func (o *AddKmsConfigurationParams) WithHTTPClient(client *http.Client) *AddKmsConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add kms configuration params -func (o *AddKmsConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add kms configuration params -func (o *AddKmsConfigurationParams) WithBody(body *models.KmsConfigurationCreateParams) *AddKmsConfigurationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add kms configuration params -func (o *AddKmsConfigurationParams) SetBody(body *models.KmsConfigurationCreateParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddKmsConfigurationParams) 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/key_management_system/add_kms_configuration_responses.go b/v2/client/key_management_system/add_kms_configuration_responses.go deleted file mode 100644 index 7f46f891..00000000 --- a/v2/client/key_management_system/add_kms_configuration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddKmsConfigurationReader is a Reader for the AddKmsConfiguration structure. -type AddKmsConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddKmsConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddKmsConfigurationCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddKmsConfigurationDefault(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 - } -} - -// NewAddKmsConfigurationCreated creates a AddKmsConfigurationCreated with default headers values -func NewAddKmsConfigurationCreated() *AddKmsConfigurationCreated { - return &AddKmsConfigurationCreated{} -} - -/* -AddKmsConfigurationCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddKmsConfigurationCreated struct { - Payload *models.KmsConfiguration -} - -// IsSuccess returns true when this add kms configuration created response has a 2xx status code -func (o *AddKmsConfigurationCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add kms configuration created response has a 3xx status code -func (o *AddKmsConfigurationCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add kms configuration created response has a 4xx status code -func (o *AddKmsConfigurationCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add kms configuration created response has a 5xx status code -func (o *AddKmsConfigurationCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add kms configuration created response a status code equal to that given -func (o *AddKmsConfigurationCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add kms configuration created response -func (o *AddKmsConfigurationCreated) Code() int { - return 201 -} - -func (o *AddKmsConfigurationCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kms][%d] addKmsConfigurationCreated %s", 201, payload) -} - -func (o *AddKmsConfigurationCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kms][%d] addKmsConfigurationCreated %s", 201, payload) -} - -func (o *AddKmsConfigurationCreated) GetPayload() *models.KmsConfiguration { - return o.Payload -} - -func (o *AddKmsConfigurationCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KmsConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddKmsConfigurationDefault creates a AddKmsConfigurationDefault with default headers values -func NewAddKmsConfigurationDefault(code int) *AddKmsConfigurationDefault { - return &AddKmsConfigurationDefault{ - _statusCode: code, - } -} - -/* -AddKmsConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddKmsConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add kms configuration default response has a 2xx status code -func (o *AddKmsConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add kms configuration default response has a 3xx status code -func (o *AddKmsConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add kms configuration default response has a 4xx status code -func (o *AddKmsConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add kms configuration default response has a 5xx status code -func (o *AddKmsConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add kms configuration default response a status code equal to that given -func (o *AddKmsConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add kms configuration default response -func (o *AddKmsConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *AddKmsConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kms][%d] AddKmsConfiguration default %s", o._statusCode, payload) -} - -func (o *AddKmsConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /kms][%d] AddKmsConfiguration default %s", o._statusCode, payload) -} - -func (o *AddKmsConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddKmsConfigurationDefault) 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/key_management_system/delete_kms_config_parameters.go b/v2/client/key_management_system/delete_kms_config_parameters.go deleted file mode 100644 index 736ba129..00000000 --- a/v2/client/key_management_system/delete_kms_config_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/go-openapi/swag" -) - -// NewDeleteKmsConfigParams creates a new DeleteKmsConfigParams 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 NewDeleteKmsConfigParams() *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteKmsConfigParamsWithTimeout creates a new DeleteKmsConfigParams object -// with the ability to set a timeout on a request. -func NewDeleteKmsConfigParamsWithTimeout(timeout time.Duration) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - timeout: timeout, - } -} - -// NewDeleteKmsConfigParamsWithContext creates a new DeleteKmsConfigParams object -// with the ability to set a context for a request. -func NewDeleteKmsConfigParamsWithContext(ctx context.Context) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - Context: ctx, - } -} - -// NewDeleteKmsConfigParamsWithHTTPClient creates a new DeleteKmsConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteKmsConfigParamsWithHTTPClient(client *http.Client) *DeleteKmsConfigParams { - return &DeleteKmsConfigParams{ - HTTPClient: client, - } -} - -/* -DeleteKmsConfigParams contains all the parameters to send to the API endpoint - - for the delete kms config operation. - - Typically these are written to a http.Request. -*/ -type DeleteKmsConfigParams struct { - - /* ID. - - ID of the KMS configured on the cluster. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKmsConfigParams) WithDefaults() *DeleteKmsConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete kms config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKmsConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete kms config params -func (o *DeleteKmsConfigParams) WithTimeout(timeout time.Duration) *DeleteKmsConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete kms config params -func (o *DeleteKmsConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete kms config params -func (o *DeleteKmsConfigParams) WithContext(ctx context.Context) *DeleteKmsConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete kms config params -func (o *DeleteKmsConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete kms config params -func (o *DeleteKmsConfigParams) WithHTTPClient(client *http.Client) *DeleteKmsConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete kms config params -func (o *DeleteKmsConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete kms config params -func (o *DeleteKmsConfigParams) WithID(id int64) *DeleteKmsConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete kms config params -func (o *DeleteKmsConfigParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteKmsConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/key_management_system/delete_kms_config_responses.go b/v2/client/key_management_system/delete_kms_config_responses.go deleted file mode 100644 index a7edee60..00000000 --- a/v2/client/key_management_system/delete_kms_config_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteKmsConfigReader is a Reader for the DeleteKmsConfig structure. -type DeleteKmsConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteKmsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteKmsConfigNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteKmsConfigDefault(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 - } -} - -// NewDeleteKmsConfigNoContent creates a DeleteKmsConfigNoContent with default headers values -func NewDeleteKmsConfigNoContent() *DeleteKmsConfigNoContent { - return &DeleteKmsConfigNoContent{} -} - -/* -DeleteKmsConfigNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteKmsConfigNoContent struct { -} - -// IsSuccess returns true when this delete kms config no content response has a 2xx status code -func (o *DeleteKmsConfigNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete kms config no content response has a 3xx status code -func (o *DeleteKmsConfigNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete kms config no content response has a 4xx status code -func (o *DeleteKmsConfigNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete kms config no content response has a 5xx status code -func (o *DeleteKmsConfigNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete kms config no content response a status code equal to that given -func (o *DeleteKmsConfigNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete kms config no content response -func (o *DeleteKmsConfigNoContent) Code() int { - return 204 -} - -func (o *DeleteKmsConfigNoContent) Error() string { - return fmt.Sprintf("[DELETE /kms/{id}][%d] deleteKmsConfigNoContent", 204) -} - -func (o *DeleteKmsConfigNoContent) String() string { - return fmt.Sprintf("[DELETE /kms/{id}][%d] deleteKmsConfigNoContent", 204) -} - -func (o *DeleteKmsConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteKmsConfigDefault creates a DeleteKmsConfigDefault with default headers values -func NewDeleteKmsConfigDefault(code int) *DeleteKmsConfigDefault { - return &DeleteKmsConfigDefault{ - _statusCode: code, - } -} - -/* -DeleteKmsConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteKmsConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete kms config default response has a 2xx status code -func (o *DeleteKmsConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete kms config default response has a 3xx status code -func (o *DeleteKmsConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete kms config default response has a 4xx status code -func (o *DeleteKmsConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete kms config default response has a 5xx status code -func (o *DeleteKmsConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete kms config default response a status code equal to that given -func (o *DeleteKmsConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete kms config default response -func (o *DeleteKmsConfigDefault) Code() int { - return o._statusCode -} - -func (o *DeleteKmsConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /kms/{id}][%d] DeleteKmsConfig default %s", o._statusCode, payload) -} - -func (o *DeleteKmsConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /kms/{id}][%d] DeleteKmsConfig default %s", o._statusCode, payload) -} - -func (o *DeleteKmsConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteKmsConfigDefault) 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/key_management_system/get_kms_configurations_parameters.go b/v2/client/key_management_system/get_kms_configurations_parameters.go deleted file mode 100644 index cdbe83df..00000000 --- a/v2/client/key_management_system/get_kms_configurations_parameters.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/go-openapi/swag" -) - -// NewGetKmsConfigurationsParams creates a new GetKmsConfigurationsParams 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 NewGetKmsConfigurationsParams() *GetKmsConfigurationsParams { - return &GetKmsConfigurationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKmsConfigurationsParamsWithTimeout creates a new GetKmsConfigurationsParams object -// with the ability to set a timeout on a request. -func NewGetKmsConfigurationsParamsWithTimeout(timeout time.Duration) *GetKmsConfigurationsParams { - return &GetKmsConfigurationsParams{ - timeout: timeout, - } -} - -// NewGetKmsConfigurationsParamsWithContext creates a new GetKmsConfigurationsParams object -// with the ability to set a context for a request. -func NewGetKmsConfigurationsParamsWithContext(ctx context.Context) *GetKmsConfigurationsParams { - return &GetKmsConfigurationsParams{ - Context: ctx, - } -} - -// NewGetKmsConfigurationsParamsWithHTTPClient creates a new GetKmsConfigurationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKmsConfigurationsParamsWithHTTPClient(client *http.Client) *GetKmsConfigurationsParams { - return &GetKmsConfigurationsParams{ - HTTPClient: client, - } -} - -/* -GetKmsConfigurationsParams contains all the parameters to send to the API endpoint - - for the get kms configurations operation. - - Typically these are written to a http.Request. -*/ -type GetKmsConfigurationsParams struct { - - /* Ids. - - Ids of KMS configured on the cluster. - */ - Ids []int64 - - /* IncludeRpaasKms. - - If true, returns KMS that are configured by FortKnox. - */ - IncludeRpaasKms *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kms configurations params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsConfigurationsParams) WithDefaults() *GetKmsConfigurationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kms configurations params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKmsConfigurationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kms configurations params -func (o *GetKmsConfigurationsParams) WithTimeout(timeout time.Duration) *GetKmsConfigurationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kms configurations params -func (o *GetKmsConfigurationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kms configurations params -func (o *GetKmsConfigurationsParams) WithContext(ctx context.Context) *GetKmsConfigurationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kms configurations params -func (o *GetKmsConfigurationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kms configurations params -func (o *GetKmsConfigurationsParams) WithHTTPClient(client *http.Client) *GetKmsConfigurationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kms configurations params -func (o *GetKmsConfigurationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get kms configurations params -func (o *GetKmsConfigurationsParams) WithIds(ids []int64) *GetKmsConfigurationsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get kms configurations params -func (o *GetKmsConfigurationsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeRpaasKms adds the includeRpaasKms to the get kms configurations params -func (o *GetKmsConfigurationsParams) WithIncludeRpaasKms(includeRpaasKms *bool) *GetKmsConfigurationsParams { - o.SetIncludeRpaasKms(includeRpaasKms) - return o -} - -// SetIncludeRpaasKms adds the includeRpaasKms to the get kms configurations params -func (o *GetKmsConfigurationsParams) SetIncludeRpaasKms(includeRpaasKms *bool) { - o.IncludeRpaasKms = includeRpaasKms -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKmsConfigurationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeRpaasKms != nil { - - // query param includeRpaasKms - var qrIncludeRpaasKms bool - - if o.IncludeRpaasKms != nil { - qrIncludeRpaasKms = *o.IncludeRpaasKms - } - qIncludeRpaasKms := swag.FormatBool(qrIncludeRpaasKms) - if qIncludeRpaasKms != "" { - - if err := r.SetQueryParam("includeRpaasKms", qIncludeRpaasKms); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetKmsConfigurations binds the parameter ids -func (o *GetKmsConfigurationsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/key_management_system/get_kms_configurations_responses.go b/v2/client/key_management_system/get_kms_configurations_responses.go deleted file mode 100644 index 818fb8ec..00000000 --- a/v2/client/key_management_system/get_kms_configurations_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetKmsConfigurationsReader is a Reader for the GetKmsConfigurations structure. -type GetKmsConfigurationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKmsConfigurationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKmsConfigurationsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKmsConfigurationsDefault(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 - } -} - -// NewGetKmsConfigurationsOK creates a GetKmsConfigurationsOK with default headers values -func NewGetKmsConfigurationsOK() *GetKmsConfigurationsOK { - return &GetKmsConfigurationsOK{} -} - -/* -GetKmsConfigurationsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKmsConfigurationsOK struct { - Payload *models.KmsConfigurations -} - -// IsSuccess returns true when this get kms configurations o k response has a 2xx status code -func (o *GetKmsConfigurationsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get kms configurations o k response has a 3xx status code -func (o *GetKmsConfigurationsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get kms configurations o k response has a 4xx status code -func (o *GetKmsConfigurationsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get kms configurations o k response has a 5xx status code -func (o *GetKmsConfigurationsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get kms configurations o k response a status code equal to that given -func (o *GetKmsConfigurationsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get kms configurations o k response -func (o *GetKmsConfigurationsOK) Code() int { - return 200 -} - -func (o *GetKmsConfigurationsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kms][%d] getKmsConfigurationsOK %s", 200, payload) -} - -func (o *GetKmsConfigurationsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kms][%d] getKmsConfigurationsOK %s", 200, payload) -} - -func (o *GetKmsConfigurationsOK) GetPayload() *models.KmsConfigurations { - return o.Payload -} - -func (o *GetKmsConfigurationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KmsConfigurations) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKmsConfigurationsDefault creates a GetKmsConfigurationsDefault with default headers values -func NewGetKmsConfigurationsDefault(code int) *GetKmsConfigurationsDefault { - return &GetKmsConfigurationsDefault{ - _statusCode: code, - } -} - -/* -GetKmsConfigurationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKmsConfigurationsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get kms configurations default response has a 2xx status code -func (o *GetKmsConfigurationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get kms configurations default response has a 3xx status code -func (o *GetKmsConfigurationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get kms configurations default response has a 4xx status code -func (o *GetKmsConfigurationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get kms configurations default response has a 5xx status code -func (o *GetKmsConfigurationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get kms configurations default response a status code equal to that given -func (o *GetKmsConfigurationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get kms configurations default response -func (o *GetKmsConfigurationsDefault) Code() int { - return o._statusCode -} - -func (o *GetKmsConfigurationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kms][%d] GetKmsConfigurations default %s", o._statusCode, payload) -} - -func (o *GetKmsConfigurationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /kms][%d] GetKmsConfigurations default %s", o._statusCode, payload) -} - -func (o *GetKmsConfigurationsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetKmsConfigurationsDefault) 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/key_management_system/key_management_system_client.go b/v2/client/key_management_system/key_management_system_client.go deleted file mode 100644 index 77e36d0e..00000000 --- a/v2/client/key_management_system/key_management_system_client.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new key management system API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new key management system API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new key management system API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for key management system API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddKmsConfiguration(params *AddKmsConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddKmsConfigurationCreated, error) - - DeleteKmsConfig(params *DeleteKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKmsConfigNoContent, error) - - GetKmsConfigurations(params *GetKmsConfigurationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsConfigurationsOK, error) - - UpdateKmsConfiguration(params *UpdateKmsConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKmsConfigurationOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddKmsConfiguration adds k m s - -Add a key management system(KMS) to the cluster. -*/ -func (a *Client) AddKmsConfiguration(params *AddKmsConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddKmsConfigurationCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddKmsConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "AddKmsConfiguration", - Method: "POST", - PathPattern: "/kms", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddKmsConfigurationReader{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.(*AddKmsConfigurationCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddKmsConfigurationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteKmsConfig deletes k m s - -Delete KMS configued on the cluster. -*/ -func (a *Client) DeleteKmsConfig(params *DeleteKmsConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKmsConfigNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteKmsConfigParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteKmsConfig", - Method: "DELETE", - PathPattern: "/kms/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteKmsConfigReader{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.(*DeleteKmsConfigNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteKmsConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetKmsConfigurations gets k m s - -Get key management systems(KMS) configured on the cluster. -*/ -func (a *Client) GetKmsConfigurations(params *GetKmsConfigurationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKmsConfigurationsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKmsConfigurationsParams() - } - op := &runtime.ClientOperation{ - ID: "GetKmsConfigurations", - Method: "GET", - PathPattern: "/kms", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKmsConfigurationsReader{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.(*GetKmsConfigurationsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKmsConfigurationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateKmsConfiguration updates k m s - -Update KMS on the cluster. -*/ -func (a *Client) UpdateKmsConfiguration(params *UpdateKmsConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKmsConfigurationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateKmsConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateKmsConfiguration", - Method: "PUT", - PathPattern: "/kms/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateKmsConfigurationReader{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.(*UpdateKmsConfigurationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateKmsConfigurationDefault) - 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/v2/client/key_management_system/update_kms_configuration_parameters.go b/v2/client/key_management_system/update_kms_configuration_parameters.go deleted file mode 100644 index 81e9d98e..00000000 --- a/v2/client/key_management_system/update_kms_configuration_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateKmsConfigurationParams creates a new UpdateKmsConfigurationParams 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 NewUpdateKmsConfigurationParams() *UpdateKmsConfigurationParams { - return &UpdateKmsConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateKmsConfigurationParamsWithTimeout creates a new UpdateKmsConfigurationParams object -// with the ability to set a timeout on a request. -func NewUpdateKmsConfigurationParamsWithTimeout(timeout time.Duration) *UpdateKmsConfigurationParams { - return &UpdateKmsConfigurationParams{ - timeout: timeout, - } -} - -// NewUpdateKmsConfigurationParamsWithContext creates a new UpdateKmsConfigurationParams object -// with the ability to set a context for a request. -func NewUpdateKmsConfigurationParamsWithContext(ctx context.Context) *UpdateKmsConfigurationParams { - return &UpdateKmsConfigurationParams{ - Context: ctx, - } -} - -// NewUpdateKmsConfigurationParamsWithHTTPClient creates a new UpdateKmsConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateKmsConfigurationParamsWithHTTPClient(client *http.Client) *UpdateKmsConfigurationParams { - return &UpdateKmsConfigurationParams{ - HTTPClient: client, - } -} - -/* -UpdateKmsConfigurationParams contains all the parameters to send to the API endpoint - - for the update kms configuration operation. - - Typically these are written to a http.Request. -*/ -type UpdateKmsConfigurationParams struct { - - /* Body. - - Parameters to update KMS on the cluster. - */ - Body *models.KmsConfigurationUpdateParams - - /* ID. - - ID of the KMS configured on the cluster. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update kms configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKmsConfigurationParams) WithDefaults() *UpdateKmsConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update kms configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKmsConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update kms configuration params -func (o *UpdateKmsConfigurationParams) WithTimeout(timeout time.Duration) *UpdateKmsConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update kms configuration params -func (o *UpdateKmsConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update kms configuration params -func (o *UpdateKmsConfigurationParams) WithContext(ctx context.Context) *UpdateKmsConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update kms configuration params -func (o *UpdateKmsConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update kms configuration params -func (o *UpdateKmsConfigurationParams) WithHTTPClient(client *http.Client) *UpdateKmsConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update kms configuration params -func (o *UpdateKmsConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update kms configuration params -func (o *UpdateKmsConfigurationParams) WithBody(body *models.KmsConfigurationUpdateParams) *UpdateKmsConfigurationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update kms configuration params -func (o *UpdateKmsConfigurationParams) SetBody(body *models.KmsConfigurationUpdateParams) { - o.Body = body -} - -// WithID adds the id to the update kms configuration params -func (o *UpdateKmsConfigurationParams) WithID(id int64) *UpdateKmsConfigurationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update kms configuration params -func (o *UpdateKmsConfigurationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateKmsConfigurationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/key_management_system/update_kms_configuration_responses.go b/v2/client/key_management_system/update_kms_configuration_responses.go deleted file mode 100644 index c78bec3b..00000000 --- a/v2/client/key_management_system/update_kms_configuration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package key_management_system - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateKmsConfigurationReader is a Reader for the UpdateKmsConfiguration structure. -type UpdateKmsConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateKmsConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateKmsConfigurationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateKmsConfigurationDefault(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 - } -} - -// NewUpdateKmsConfigurationOK creates a UpdateKmsConfigurationOK with default headers values -func NewUpdateKmsConfigurationOK() *UpdateKmsConfigurationOK { - return &UpdateKmsConfigurationOK{} -} - -/* -UpdateKmsConfigurationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateKmsConfigurationOK struct { - Payload *models.KmsConfiguration -} - -// IsSuccess returns true when this update kms configuration o k response has a 2xx status code -func (o *UpdateKmsConfigurationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update kms configuration o k response has a 3xx status code -func (o *UpdateKmsConfigurationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update kms configuration o k response has a 4xx status code -func (o *UpdateKmsConfigurationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update kms configuration o k response has a 5xx status code -func (o *UpdateKmsConfigurationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update kms configuration o k response a status code equal to that given -func (o *UpdateKmsConfigurationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update kms configuration o k response -func (o *UpdateKmsConfigurationOK) Code() int { - return 200 -} - -func (o *UpdateKmsConfigurationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kms/{id}][%d] updateKmsConfigurationOK %s", 200, payload) -} - -func (o *UpdateKmsConfigurationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kms/{id}][%d] updateKmsConfigurationOK %s", 200, payload) -} - -func (o *UpdateKmsConfigurationOK) GetPayload() *models.KmsConfiguration { - return o.Payload -} - -func (o *UpdateKmsConfigurationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.KmsConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateKmsConfigurationDefault creates a UpdateKmsConfigurationDefault with default headers values -func NewUpdateKmsConfigurationDefault(code int) *UpdateKmsConfigurationDefault { - return &UpdateKmsConfigurationDefault{ - _statusCode: code, - } -} - -/* -UpdateKmsConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateKmsConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update kms configuration default response has a 2xx status code -func (o *UpdateKmsConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update kms configuration default response has a 3xx status code -func (o *UpdateKmsConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update kms configuration default response has a 4xx status code -func (o *UpdateKmsConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update kms configuration default response has a 5xx status code -func (o *UpdateKmsConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update kms configuration default response a status code equal to that given -func (o *UpdateKmsConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update kms configuration default response -func (o *UpdateKmsConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateKmsConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kms/{id}][%d] UpdateKmsConfiguration default %s", o._statusCode, payload) -} - -func (o *UpdateKmsConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /kms/{id}][%d] UpdateKmsConfiguration default %s", o._statusCode, payload) -} - -func (o *UpdateKmsConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateKmsConfigurationDefault) 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/keystone/create_keystone_parameters.go b/v2/client/keystone/create_keystone_parameters.go deleted file mode 100644 index 153ee8c9..00000000 --- a/v2/client/keystone/create_keystone_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateKeystoneParams creates a new CreateKeystoneParams 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 NewCreateKeystoneParams() *CreateKeystoneParams { - return &CreateKeystoneParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateKeystoneParamsWithTimeout creates a new CreateKeystoneParams object -// with the ability to set a timeout on a request. -func NewCreateKeystoneParamsWithTimeout(timeout time.Duration) *CreateKeystoneParams { - return &CreateKeystoneParams{ - timeout: timeout, - } -} - -// NewCreateKeystoneParamsWithContext creates a new CreateKeystoneParams object -// with the ability to set a context for a request. -func NewCreateKeystoneParamsWithContext(ctx context.Context) *CreateKeystoneParams { - return &CreateKeystoneParams{ - Context: ctx, - } -} - -// NewCreateKeystoneParamsWithHTTPClient creates a new CreateKeystoneParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateKeystoneParamsWithHTTPClient(client *http.Client) *CreateKeystoneParams { - return &CreateKeystoneParams{ - HTTPClient: client, - } -} - -/* -CreateKeystoneParams contains all the parameters to send to the API endpoint - - for the create keystone operation. - - Typically these are written to a http.Request. -*/ -type CreateKeystoneParams struct { - - /* Body. - - Specifies the paremters to create a Keystone configuration. - */ - Body *models.CreateKeystoneRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateKeystoneParams) WithDefaults() *CreateKeystoneParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateKeystoneParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create keystone params -func (o *CreateKeystoneParams) WithTimeout(timeout time.Duration) *CreateKeystoneParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create keystone params -func (o *CreateKeystoneParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create keystone params -func (o *CreateKeystoneParams) WithContext(ctx context.Context) *CreateKeystoneParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create keystone params -func (o *CreateKeystoneParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create keystone params -func (o *CreateKeystoneParams) WithHTTPClient(client *http.Client) *CreateKeystoneParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create keystone params -func (o *CreateKeystoneParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create keystone params -func (o *CreateKeystoneParams) WithBody(body *models.CreateKeystoneRequest) *CreateKeystoneParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create keystone params -func (o *CreateKeystoneParams) SetBody(body *models.CreateKeystoneRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateKeystoneParams) 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/keystone/create_keystone_responses.go b/v2/client/keystone/create_keystone_responses.go deleted file mode 100644 index a823385f..00000000 --- a/v2/client/keystone/create_keystone_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateKeystoneReader is a Reader for the CreateKeystone structure. -type CreateKeystoneReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateKeystoneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateKeystoneCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateKeystoneDefault(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 - } -} - -// NewCreateKeystoneCreated creates a CreateKeystoneCreated with default headers values -func NewCreateKeystoneCreated() *CreateKeystoneCreated { - return &CreateKeystoneCreated{} -} - -/* -CreateKeystoneCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateKeystoneCreated struct { - Payload *models.Keystone -} - -// IsSuccess returns true when this create keystone created response has a 2xx status code -func (o *CreateKeystoneCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create keystone created response has a 3xx status code -func (o *CreateKeystoneCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create keystone created response has a 4xx status code -func (o *CreateKeystoneCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create keystone created response has a 5xx status code -func (o *CreateKeystoneCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create keystone created response a status code equal to that given -func (o *CreateKeystoneCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create keystone created response -func (o *CreateKeystoneCreated) Code() int { - return 201 -} - -func (o *CreateKeystoneCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /keystones][%d] createKeystoneCreated %s", 201, payload) -} - -func (o *CreateKeystoneCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /keystones][%d] createKeystoneCreated %s", 201, payload) -} - -func (o *CreateKeystoneCreated) GetPayload() *models.Keystone { - return o.Payload -} - -func (o *CreateKeystoneCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Keystone) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateKeystoneDefault creates a CreateKeystoneDefault with default headers values -func NewCreateKeystoneDefault(code int) *CreateKeystoneDefault { - return &CreateKeystoneDefault{ - _statusCode: code, - } -} - -/* -CreateKeystoneDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateKeystoneDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create keystone default response has a 2xx status code -func (o *CreateKeystoneDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create keystone default response has a 3xx status code -func (o *CreateKeystoneDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create keystone default response has a 4xx status code -func (o *CreateKeystoneDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create keystone default response has a 5xx status code -func (o *CreateKeystoneDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create keystone default response a status code equal to that given -func (o *CreateKeystoneDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create keystone default response -func (o *CreateKeystoneDefault) Code() int { - return o._statusCode -} - -func (o *CreateKeystoneDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /keystones][%d] CreateKeystone default %s", o._statusCode, payload) -} - -func (o *CreateKeystoneDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /keystones][%d] CreateKeystone default %s", o._statusCode, payload) -} - -func (o *CreateKeystoneDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateKeystoneDefault) 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/keystone/delete_keystone_parameters.go b/v2/client/keystone/delete_keystone_parameters.go deleted file mode 100644 index 4434e3c8..00000000 --- a/v2/client/keystone/delete_keystone_parameters.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/go-openapi/swag" -) - -// NewDeleteKeystoneParams creates a new DeleteKeystoneParams 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 NewDeleteKeystoneParams() *DeleteKeystoneParams { - return &DeleteKeystoneParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteKeystoneParamsWithTimeout creates a new DeleteKeystoneParams object -// with the ability to set a timeout on a request. -func NewDeleteKeystoneParamsWithTimeout(timeout time.Duration) *DeleteKeystoneParams { - return &DeleteKeystoneParams{ - timeout: timeout, - } -} - -// NewDeleteKeystoneParamsWithContext creates a new DeleteKeystoneParams object -// with the ability to set a context for a request. -func NewDeleteKeystoneParamsWithContext(ctx context.Context) *DeleteKeystoneParams { - return &DeleteKeystoneParams{ - Context: ctx, - } -} - -// NewDeleteKeystoneParamsWithHTTPClient creates a new DeleteKeystoneParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteKeystoneParamsWithHTTPClient(client *http.Client) *DeleteKeystoneParams { - return &DeleteKeystoneParams{ - HTTPClient: client, - } -} - -/* -DeleteKeystoneParams contains all the parameters to send to the API endpoint - - for the delete keystone operation. - - Typically these are written to a http.Request. -*/ -type DeleteKeystoneParams struct { - - /* AdminPassword. - - Specifies the password of Keystone administrator. - */ - AdminPassword string - - /* ID. - - Specifies the Keystone id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKeystoneParams) WithDefaults() *DeleteKeystoneParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteKeystoneParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete keystone params -func (o *DeleteKeystoneParams) WithTimeout(timeout time.Duration) *DeleteKeystoneParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete keystone params -func (o *DeleteKeystoneParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete keystone params -func (o *DeleteKeystoneParams) WithContext(ctx context.Context) *DeleteKeystoneParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete keystone params -func (o *DeleteKeystoneParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete keystone params -func (o *DeleteKeystoneParams) WithHTTPClient(client *http.Client) *DeleteKeystoneParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete keystone params -func (o *DeleteKeystoneParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAdminPassword adds the adminPassword to the delete keystone params -func (o *DeleteKeystoneParams) WithAdminPassword(adminPassword string) *DeleteKeystoneParams { - o.SetAdminPassword(adminPassword) - return o -} - -// SetAdminPassword adds the adminPassword to the delete keystone params -func (o *DeleteKeystoneParams) SetAdminPassword(adminPassword string) { - o.AdminPassword = adminPassword -} - -// WithID adds the id to the delete keystone params -func (o *DeleteKeystoneParams) WithID(id int64) *DeleteKeystoneParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete keystone params -func (o *DeleteKeystoneParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteKeystoneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // header param adminPassword - if err := r.SetHeaderParam("adminPassword", o.AdminPassword); err != nil { - return err - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/keystone/delete_keystone_responses.go b/v2/client/keystone/delete_keystone_responses.go deleted file mode 100644 index 34dbd5d5..00000000 --- a/v2/client/keystone/delete_keystone_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteKeystoneReader is a Reader for the DeleteKeystone structure. -type DeleteKeystoneReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteKeystoneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteKeystoneNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteKeystoneDefault(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 - } -} - -// NewDeleteKeystoneNoContent creates a DeleteKeystoneNoContent with default headers values -func NewDeleteKeystoneNoContent() *DeleteKeystoneNoContent { - return &DeleteKeystoneNoContent{} -} - -/* -DeleteKeystoneNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteKeystoneNoContent struct { -} - -// IsSuccess returns true when this delete keystone no content response has a 2xx status code -func (o *DeleteKeystoneNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete keystone no content response has a 3xx status code -func (o *DeleteKeystoneNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete keystone no content response has a 4xx status code -func (o *DeleteKeystoneNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete keystone no content response has a 5xx status code -func (o *DeleteKeystoneNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete keystone no content response a status code equal to that given -func (o *DeleteKeystoneNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete keystone no content response -func (o *DeleteKeystoneNoContent) Code() int { - return 204 -} - -func (o *DeleteKeystoneNoContent) Error() string { - return fmt.Sprintf("[DELETE /keystones/{id}][%d] deleteKeystoneNoContent", 204) -} - -func (o *DeleteKeystoneNoContent) String() string { - return fmt.Sprintf("[DELETE /keystones/{id}][%d] deleteKeystoneNoContent", 204) -} - -func (o *DeleteKeystoneNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteKeystoneDefault creates a DeleteKeystoneDefault with default headers values -func NewDeleteKeystoneDefault(code int) *DeleteKeystoneDefault { - return &DeleteKeystoneDefault{ - _statusCode: code, - } -} - -/* -DeleteKeystoneDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteKeystoneDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete keystone default response has a 2xx status code -func (o *DeleteKeystoneDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete keystone default response has a 3xx status code -func (o *DeleteKeystoneDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete keystone default response has a 4xx status code -func (o *DeleteKeystoneDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete keystone default response has a 5xx status code -func (o *DeleteKeystoneDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete keystone default response a status code equal to that given -func (o *DeleteKeystoneDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete keystone default response -func (o *DeleteKeystoneDefault) Code() int { - return o._statusCode -} - -func (o *DeleteKeystoneDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /keystones/{id}][%d] DeleteKeystone default %s", o._statusCode, payload) -} - -func (o *DeleteKeystoneDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /keystones/{id}][%d] DeleteKeystone default %s", o._statusCode, payload) -} - -func (o *DeleteKeystoneDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteKeystoneDefault) 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/keystone/get_keystones_by_id_parameters.go b/v2/client/keystone/get_keystones_by_id_parameters.go deleted file mode 100644 index 898b7074..00000000 --- a/v2/client/keystone/get_keystones_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/go-openapi/swag" -) - -// NewGetKeystonesByIDParams creates a new GetKeystonesByIDParams 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 NewGetKeystonesByIDParams() *GetKeystonesByIDParams { - return &GetKeystonesByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKeystonesByIDParamsWithTimeout creates a new GetKeystonesByIDParams object -// with the ability to set a timeout on a request. -func NewGetKeystonesByIDParamsWithTimeout(timeout time.Duration) *GetKeystonesByIDParams { - return &GetKeystonesByIDParams{ - timeout: timeout, - } -} - -// NewGetKeystonesByIDParamsWithContext creates a new GetKeystonesByIDParams object -// with the ability to set a context for a request. -func NewGetKeystonesByIDParamsWithContext(ctx context.Context) *GetKeystonesByIDParams { - return &GetKeystonesByIDParams{ - Context: ctx, - } -} - -// NewGetKeystonesByIDParamsWithHTTPClient creates a new GetKeystonesByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKeystonesByIDParamsWithHTTPClient(client *http.Client) *GetKeystonesByIDParams { - return &GetKeystonesByIDParams{ - HTTPClient: client, - } -} - -/* -GetKeystonesByIDParams contains all the parameters to send to the API endpoint - - for the get keystones by Id operation. - - Typically these are written to a http.Request. -*/ -type GetKeystonesByIDParams struct { - - /* ID. - - Specifies the Keystone id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get keystones by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKeystonesByIDParams) WithDefaults() *GetKeystonesByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get keystones by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKeystonesByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get keystones by Id params -func (o *GetKeystonesByIDParams) WithTimeout(timeout time.Duration) *GetKeystonesByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get keystones by Id params -func (o *GetKeystonesByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get keystones by Id params -func (o *GetKeystonesByIDParams) WithContext(ctx context.Context) *GetKeystonesByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get keystones by Id params -func (o *GetKeystonesByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get keystones by Id params -func (o *GetKeystonesByIDParams) WithHTTPClient(client *http.Client) *GetKeystonesByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get keystones by Id params -func (o *GetKeystonesByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get keystones by Id params -func (o *GetKeystonesByIDParams) WithID(id int64) *GetKeystonesByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get keystones by Id params -func (o *GetKeystonesByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKeystonesByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/keystone/get_keystones_by_id_responses.go b/v2/client/keystone/get_keystones_by_id_responses.go deleted file mode 100644 index e0fa1d60..00000000 --- a/v2/client/keystone/get_keystones_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetKeystonesByIDReader is a Reader for the GetKeystonesByID structure. -type GetKeystonesByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKeystonesByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKeystonesByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKeystonesByIDDefault(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 - } -} - -// NewGetKeystonesByIDOK creates a GetKeystonesByIDOK with default headers values -func NewGetKeystonesByIDOK() *GetKeystonesByIDOK { - return &GetKeystonesByIDOK{} -} - -/* -GetKeystonesByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKeystonesByIDOK struct { - Payload *models.Keystone -} - -// IsSuccess returns true when this get keystones by Id o k response has a 2xx status code -func (o *GetKeystonesByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get keystones by Id o k response has a 3xx status code -func (o *GetKeystonesByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get keystones by Id o k response has a 4xx status code -func (o *GetKeystonesByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get keystones by Id o k response has a 5xx status code -func (o *GetKeystonesByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get keystones by Id o k response a status code equal to that given -func (o *GetKeystonesByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get keystones by Id o k response -func (o *GetKeystonesByIDOK) Code() int { - return 200 -} - -func (o *GetKeystonesByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones/{id}][%d] getKeystonesByIdOK %s", 200, payload) -} - -func (o *GetKeystonesByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones/{id}][%d] getKeystonesByIdOK %s", 200, payload) -} - -func (o *GetKeystonesByIDOK) GetPayload() *models.Keystone { - return o.Payload -} - -func (o *GetKeystonesByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Keystone) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKeystonesByIDDefault creates a GetKeystonesByIDDefault with default headers values -func NewGetKeystonesByIDDefault(code int) *GetKeystonesByIDDefault { - return &GetKeystonesByIDDefault{ - _statusCode: code, - } -} - -/* -GetKeystonesByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKeystonesByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get keystones by Id default response has a 2xx status code -func (o *GetKeystonesByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get keystones by Id default response has a 3xx status code -func (o *GetKeystonesByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get keystones by Id default response has a 4xx status code -func (o *GetKeystonesByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get keystones by Id default response has a 5xx status code -func (o *GetKeystonesByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get keystones by Id default response a status code equal to that given -func (o *GetKeystonesByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get keystones by Id default response -func (o *GetKeystonesByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetKeystonesByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones/{id}][%d] GetKeystonesById default %s", o._statusCode, payload) -} - -func (o *GetKeystonesByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones/{id}][%d] GetKeystonesById default %s", o._statusCode, payload) -} - -func (o *GetKeystonesByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetKeystonesByIDDefault) 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/keystone/get_keystones_parameters.go b/v2/client/keystone/get_keystones_parameters.go deleted file mode 100644 index fde3fa9b..00000000 --- a/v2/client/keystone/get_keystones_parameters.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/go-openapi/swag" -) - -// NewGetKeystonesParams creates a new GetKeystonesParams 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 NewGetKeystonesParams() *GetKeystonesParams { - return &GetKeystonesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKeystonesParamsWithTimeout creates a new GetKeystonesParams object -// with the ability to set a timeout on a request. -func NewGetKeystonesParamsWithTimeout(timeout time.Duration) *GetKeystonesParams { - return &GetKeystonesParams{ - timeout: timeout, - } -} - -// NewGetKeystonesParamsWithContext creates a new GetKeystonesParams object -// with the ability to set a context for a request. -func NewGetKeystonesParamsWithContext(ctx context.Context) *GetKeystonesParams { - return &GetKeystonesParams{ - Context: ctx, - } -} - -// NewGetKeystonesParamsWithHTTPClient creates a new GetKeystonesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKeystonesParamsWithHTTPClient(client *http.Client) *GetKeystonesParams { - return &GetKeystonesParams{ - HTTPClient: client, - } -} - -/* -GetKeystonesParams contains all the parameters to send to the API endpoint - - for the get keystones operation. - - Typically these are written to a http.Request. -*/ -type GetKeystonesParams struct { - - /* IncludeTenants. - - If true, the response will include Keystones which were created by all tenants which the current user has permission to see. If false, then only Keystones created by the current user will be returned. - */ - IncludeTenants *bool - - /* Names. - - Specifies a list of Keystone names. - */ - Names []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get keystones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKeystonesParams) WithDefaults() *GetKeystonesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get keystones params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKeystonesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get keystones params -func (o *GetKeystonesParams) WithTimeout(timeout time.Duration) *GetKeystonesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get keystones params -func (o *GetKeystonesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get keystones params -func (o *GetKeystonesParams) WithContext(ctx context.Context) *GetKeystonesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get keystones params -func (o *GetKeystonesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get keystones params -func (o *GetKeystonesParams) WithHTTPClient(client *http.Client) *GetKeystonesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get keystones params -func (o *GetKeystonesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeTenants adds the includeTenants to the get keystones params -func (o *GetKeystonesParams) WithIncludeTenants(includeTenants *bool) *GetKeystonesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get keystones params -func (o *GetKeystonesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithNames adds the names to the get keystones params -func (o *GetKeystonesParams) WithNames(names []string) *GetKeystonesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get keystones params -func (o *GetKeystonesParams) SetNames(names []string) { - o.Names = names -} - -// WithTenantIds adds the tenantIds to the get keystones params -func (o *GetKeystonesParams) WithTenantIds(tenantIds []string) *GetKeystonesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get keystones params -func (o *GetKeystonesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKeystonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - 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.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetKeystones binds the parameter names -func (o *GetKeystonesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetKeystones binds the parameter tenantIds -func (o *GetKeystonesParams) 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/client/keystone/get_keystones_responses.go b/v2/client/keystone/get_keystones_responses.go deleted file mode 100644 index 2e7c3934..00000000 --- a/v2/client/keystone/get_keystones_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetKeystonesReader is a Reader for the GetKeystones structure. -type GetKeystonesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKeystonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKeystonesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKeystonesDefault(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 - } -} - -// NewGetKeystonesOK creates a GetKeystonesOK with default headers values -func NewGetKeystonesOK() *GetKeystonesOK { - return &GetKeystonesOK{} -} - -/* -GetKeystonesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetKeystonesOK struct { - Payload *models.Keystones -} - -// IsSuccess returns true when this get keystones o k response has a 2xx status code -func (o *GetKeystonesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get keystones o k response has a 3xx status code -func (o *GetKeystonesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get keystones o k response has a 4xx status code -func (o *GetKeystonesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get keystones o k response has a 5xx status code -func (o *GetKeystonesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get keystones o k response a status code equal to that given -func (o *GetKeystonesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get keystones o k response -func (o *GetKeystonesOK) Code() int { - return 200 -} - -func (o *GetKeystonesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones][%d] getKeystonesOK %s", 200, payload) -} - -func (o *GetKeystonesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones][%d] getKeystonesOK %s", 200, payload) -} - -func (o *GetKeystonesOK) GetPayload() *models.Keystones { - return o.Payload -} - -func (o *GetKeystonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Keystones) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKeystonesDefault creates a GetKeystonesDefault with default headers values -func NewGetKeystonesDefault(code int) *GetKeystonesDefault { - return &GetKeystonesDefault{ - _statusCode: code, - } -} - -/* -GetKeystonesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetKeystonesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get keystones default response has a 2xx status code -func (o *GetKeystonesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get keystones default response has a 3xx status code -func (o *GetKeystonesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get keystones default response has a 4xx status code -func (o *GetKeystonesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get keystones default response has a 5xx status code -func (o *GetKeystonesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get keystones default response a status code equal to that given -func (o *GetKeystonesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get keystones default response -func (o *GetKeystonesDefault) Code() int { - return o._statusCode -} - -func (o *GetKeystonesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones][%d] GetKeystones default %s", o._statusCode, payload) -} - -func (o *GetKeystonesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /keystones][%d] GetKeystones default %s", o._statusCode, payload) -} - -func (o *GetKeystonesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetKeystonesDefault) 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/keystone/keystone_client.go b/v2/client/keystone/keystone_client.go deleted file mode 100644 index 346ad880..00000000 --- a/v2/client/keystone/keystone_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new keystone API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new keystone API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new keystone API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for keystone API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateKeystone(params *CreateKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateKeystoneCreated, error) - - DeleteKeystone(params *DeleteKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKeystoneNoContent, error) - - GetKeystones(params *GetKeystonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKeystonesOK, error) - - GetKeystonesByID(params *GetKeystonesByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKeystonesByIDOK, error) - - UpdateKeystone(params *UpdateKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKeystoneOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateKeystone creates a keystone configuration - -Create a Keystone configuration. -*/ -func (a *Client) CreateKeystone(params *CreateKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateKeystoneCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateKeystoneParams() - } - op := &runtime.ClientOperation{ - ID: "CreateKeystone", - Method: "POST", - PathPattern: "/keystones", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateKeystoneReader{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.(*CreateKeystoneCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateKeystoneDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteKeystone deletes a keystone configuration - -Delete a Keystone configuration. -*/ -func (a *Client) DeleteKeystone(params *DeleteKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteKeystoneNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteKeystoneParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteKeystone", - Method: "DELETE", - PathPattern: "/keystones/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteKeystoneReader{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.(*DeleteKeystoneNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteKeystoneDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetKeystones gets keystones - -Get Keystones. -*/ -func (a *Client) GetKeystones(params *GetKeystonesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKeystonesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKeystonesParams() - } - op := &runtime.ClientOperation{ - ID: "GetKeystones", - Method: "GET", - PathPattern: "/keystones", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKeystonesReader{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.(*GetKeystonesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKeystonesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetKeystonesByID gets a keystone by its id - -Get a Keystone by its id. -*/ -func (a *Client) GetKeystonesByID(params *GetKeystonesByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetKeystonesByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKeystonesByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetKeystonesById", - Method: "GET", - PathPattern: "/keystones/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetKeystonesByIDReader{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.(*GetKeystonesByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKeystonesByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateKeystone updates a keystone configuration - -Update a Keystone configuration. -*/ -func (a *Client) UpdateKeystone(params *UpdateKeystoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateKeystoneOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateKeystoneParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateKeystone", - Method: "PUT", - PathPattern: "/keystones/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateKeystoneReader{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.(*UpdateKeystoneOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateKeystoneDefault) - 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/v2/client/keystone/update_keystone_parameters.go b/v2/client/keystone/update_keystone_parameters.go deleted file mode 100644 index d45d7120..00000000 --- a/v2/client/keystone/update_keystone_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateKeystoneParams creates a new UpdateKeystoneParams 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 NewUpdateKeystoneParams() *UpdateKeystoneParams { - return &UpdateKeystoneParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateKeystoneParamsWithTimeout creates a new UpdateKeystoneParams object -// with the ability to set a timeout on a request. -func NewUpdateKeystoneParamsWithTimeout(timeout time.Duration) *UpdateKeystoneParams { - return &UpdateKeystoneParams{ - timeout: timeout, - } -} - -// NewUpdateKeystoneParamsWithContext creates a new UpdateKeystoneParams object -// with the ability to set a context for a request. -func NewUpdateKeystoneParamsWithContext(ctx context.Context) *UpdateKeystoneParams { - return &UpdateKeystoneParams{ - Context: ctx, - } -} - -// NewUpdateKeystoneParamsWithHTTPClient creates a new UpdateKeystoneParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateKeystoneParamsWithHTTPClient(client *http.Client) *UpdateKeystoneParams { - return &UpdateKeystoneParams{ - HTTPClient: client, - } -} - -/* -UpdateKeystoneParams contains all the parameters to send to the API endpoint - - for the update keystone operation. - - Typically these are written to a http.Request. -*/ -type UpdateKeystoneParams struct { - - /* Body. - - Specifies the paremters to update a Keystone configuration. - */ - Body *models.UpdateKeystoneRequest - - /* ID. - - Specifies the Keystone id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKeystoneParams) WithDefaults() *UpdateKeystoneParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update keystone params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateKeystoneParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update keystone params -func (o *UpdateKeystoneParams) WithTimeout(timeout time.Duration) *UpdateKeystoneParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update keystone params -func (o *UpdateKeystoneParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update keystone params -func (o *UpdateKeystoneParams) WithContext(ctx context.Context) *UpdateKeystoneParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update keystone params -func (o *UpdateKeystoneParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update keystone params -func (o *UpdateKeystoneParams) WithHTTPClient(client *http.Client) *UpdateKeystoneParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update keystone params -func (o *UpdateKeystoneParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update keystone params -func (o *UpdateKeystoneParams) WithBody(body *models.UpdateKeystoneRequest) *UpdateKeystoneParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update keystone params -func (o *UpdateKeystoneParams) SetBody(body *models.UpdateKeystoneRequest) { - o.Body = body -} - -// WithID adds the id to the update keystone params -func (o *UpdateKeystoneParams) WithID(id int64) *UpdateKeystoneParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update keystone params -func (o *UpdateKeystoneParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateKeystoneParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/keystone/update_keystone_responses.go b/v2/client/keystone/update_keystone_responses.go deleted file mode 100644 index 6765f55e..00000000 --- a/v2/client/keystone/update_keystone_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package keystone - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateKeystoneReader is a Reader for the UpdateKeystone structure. -type UpdateKeystoneReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateKeystoneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateKeystoneOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateKeystoneDefault(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 - } -} - -// NewUpdateKeystoneOK creates a UpdateKeystoneOK with default headers values -func NewUpdateKeystoneOK() *UpdateKeystoneOK { - return &UpdateKeystoneOK{} -} - -/* -UpdateKeystoneOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateKeystoneOK struct { - Payload *models.Keystone -} - -// IsSuccess returns true when this update keystone o k response has a 2xx status code -func (o *UpdateKeystoneOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update keystone o k response has a 3xx status code -func (o *UpdateKeystoneOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update keystone o k response has a 4xx status code -func (o *UpdateKeystoneOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update keystone o k response has a 5xx status code -func (o *UpdateKeystoneOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update keystone o k response a status code equal to that given -func (o *UpdateKeystoneOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update keystone o k response -func (o *UpdateKeystoneOK) Code() int { - return 200 -} - -func (o *UpdateKeystoneOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /keystones/{id}][%d] updateKeystoneOK %s", 200, payload) -} - -func (o *UpdateKeystoneOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /keystones/{id}][%d] updateKeystoneOK %s", 200, payload) -} - -func (o *UpdateKeystoneOK) GetPayload() *models.Keystone { - return o.Payload -} - -func (o *UpdateKeystoneOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Keystone) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateKeystoneDefault creates a UpdateKeystoneDefault with default headers values -func NewUpdateKeystoneDefault(code int) *UpdateKeystoneDefault { - return &UpdateKeystoneDefault{ - _statusCode: code, - } -} - -/* -UpdateKeystoneDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateKeystoneDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update keystone default response has a 2xx status code -func (o *UpdateKeystoneDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update keystone default response has a 3xx status code -func (o *UpdateKeystoneDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update keystone default response has a 4xx status code -func (o *UpdateKeystoneDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update keystone default response has a 5xx status code -func (o *UpdateKeystoneDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update keystone default response a status code equal to that given -func (o *UpdateKeystoneDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update keystone default response -func (o *UpdateKeystoneDefault) Code() int { - return o._statusCode -} - -func (o *UpdateKeystoneDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /keystones/{id}][%d] UpdateKeystone default %s", o._statusCode, payload) -} - -func (o *UpdateKeystoneDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /keystones/{id}][%d] UpdateKeystone default %s", o._statusCode, payload) -} - -func (o *UpdateKeystoneDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateKeystoneDefault) 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/l_d_a_p/create_ldap_provider_parameters.go b/v2/client/l_d_a_p/create_ldap_provider_parameters.go deleted file mode 100644 index f5465d31..00000000 --- a/v2/client/l_d_a_p/create_ldap_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateLdapProviderParams creates a new CreateLdapProviderParams 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 NewCreateLdapProviderParams() *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateLdapProviderParamsWithTimeout creates a new CreateLdapProviderParams object -// with the ability to set a timeout on a request. -func NewCreateLdapProviderParamsWithTimeout(timeout time.Duration) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - timeout: timeout, - } -} - -// NewCreateLdapProviderParamsWithContext creates a new CreateLdapProviderParams object -// with the ability to set a context for a request. -func NewCreateLdapProviderParamsWithContext(ctx context.Context) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - Context: ctx, - } -} - -// NewCreateLdapProviderParamsWithHTTPClient creates a new CreateLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateLdapProviderParamsWithHTTPClient(client *http.Client) *CreateLdapProviderParams { - return &CreateLdapProviderParams{ - HTTPClient: client, - } -} - -/* -CreateLdapProviderParams contains all the parameters to send to the API endpoint - - for the create ldap provider operation. - - Typically these are written to a http.Request. -*/ -type CreateLdapProviderParams struct { - - /* Body. - - Specifies the parameters to create Ldap provider. - */ - Body *models.Ldap - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLdapProviderParams) WithDefaults() *CreateLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create ldap provider params -func (o *CreateLdapProviderParams) WithTimeout(timeout time.Duration) *CreateLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create ldap provider params -func (o *CreateLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create ldap provider params -func (o *CreateLdapProviderParams) WithContext(ctx context.Context) *CreateLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create ldap provider params -func (o *CreateLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create ldap provider params -func (o *CreateLdapProviderParams) WithHTTPClient(client *http.Client) *CreateLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create ldap provider params -func (o *CreateLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create ldap provider params -func (o *CreateLdapProviderParams) WithBody(body *models.Ldap) *CreateLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create ldap provider params -func (o *CreateLdapProviderParams) SetBody(body *models.Ldap) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateLdapProviderParams) 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/l_d_a_p/create_ldap_provider_responses.go b/v2/client/l_d_a_p/create_ldap_provider_responses.go deleted file mode 100644 index 94c5ba1d..00000000 --- a/v2/client/l_d_a_p/create_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateLdapProviderReader is a Reader for the CreateLdapProvider structure. -type CreateLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateLdapProviderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateLdapProviderDefault(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 - } -} - -// NewCreateLdapProviderCreated creates a CreateLdapProviderCreated with default headers values -func NewCreateLdapProviderCreated() *CreateLdapProviderCreated { - return &CreateLdapProviderCreated{} -} - -/* -CreateLdapProviderCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateLdapProviderCreated struct { - Payload *models.Ldap -} - -// IsSuccess returns true when this create ldap provider created response has a 2xx status code -func (o *CreateLdapProviderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create ldap provider created response has a 3xx status code -func (o *CreateLdapProviderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create ldap provider created response has a 4xx status code -func (o *CreateLdapProviderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create ldap provider created response has a 5xx status code -func (o *CreateLdapProviderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create ldap provider created response a status code equal to that given -func (o *CreateLdapProviderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create ldap provider created response -func (o *CreateLdapProviderCreated) Code() int { - return 201 -} - -func (o *CreateLdapProviderCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /ldap][%d] createLdapProviderCreated %s", 201, payload) -} - -func (o *CreateLdapProviderCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /ldap][%d] createLdapProviderCreated %s", 201, payload) -} - -func (o *CreateLdapProviderCreated) GetPayload() *models.Ldap { - return o.Payload -} - -func (o *CreateLdapProviderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Ldap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateLdapProviderDefault creates a CreateLdapProviderDefault with default headers values -func NewCreateLdapProviderDefault(code int) *CreateLdapProviderDefault { - return &CreateLdapProviderDefault{ - _statusCode: code, - } -} - -/* -CreateLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateLdapProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create ldap provider default response has a 2xx status code -func (o *CreateLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create ldap provider default response has a 3xx status code -func (o *CreateLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create ldap provider default response has a 4xx status code -func (o *CreateLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create ldap provider default response has a 5xx status code -func (o *CreateLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create ldap provider default response a status code equal to that given -func (o *CreateLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create ldap provider default response -func (o *CreateLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *CreateLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /ldap][%d] CreateLdapProvider default %s", o._statusCode, payload) -} - -func (o *CreateLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /ldap][%d] CreateLdapProvider default %s", o._statusCode, payload) -} - -func (o *CreateLdapProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateLdapProviderDefault) 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/l_d_a_p/delete_ldap_provider_parameters.go b/v2/client/l_d_a_p/delete_ldap_provider_parameters.go deleted file mode 100644 index 2930f1f0..00000000 --- a/v2/client/l_d_a_p/delete_ldap_provider_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/go-openapi/swag" -) - -// NewDeleteLdapProviderParams creates a new DeleteLdapProviderParams 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 NewDeleteLdapProviderParams() *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteLdapProviderParamsWithTimeout creates a new DeleteLdapProviderParams object -// with the ability to set a timeout on a request. -func NewDeleteLdapProviderParamsWithTimeout(timeout time.Duration) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - timeout: timeout, - } -} - -// NewDeleteLdapProviderParamsWithContext creates a new DeleteLdapProviderParams object -// with the ability to set a context for a request. -func NewDeleteLdapProviderParamsWithContext(ctx context.Context) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - Context: ctx, - } -} - -// NewDeleteLdapProviderParamsWithHTTPClient creates a new DeleteLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteLdapProviderParamsWithHTTPClient(client *http.Client) *DeleteLdapProviderParams { - return &DeleteLdapProviderParams{ - HTTPClient: client, - } -} - -/* -DeleteLdapProviderParams contains all the parameters to send to the API endpoint - - for the delete ldap provider operation. - - Typically these are written to a http.Request. -*/ -type DeleteLdapProviderParams struct { - - /* ID. - - Specifies the LDAP Id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteLdapProviderParams) WithDefaults() *DeleteLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithTimeout(timeout time.Duration) *DeleteLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithContext(ctx context.Context) *DeleteLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithHTTPClient(client *http.Client) *DeleteLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete ldap provider params -func (o *DeleteLdapProviderParams) WithID(id int64) *DeleteLdapProviderParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete ldap provider params -func (o *DeleteLdapProviderParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteLdapProviderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/l_d_a_p/delete_ldap_provider_responses.go b/v2/client/l_d_a_p/delete_ldap_provider_responses.go deleted file mode 100644 index 2282a20d..00000000 --- a/v2/client/l_d_a_p/delete_ldap_provider_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteLdapProviderReader is a Reader for the DeleteLdapProvider structure. -type DeleteLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteLdapProviderNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteLdapProviderDefault(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 - } -} - -// NewDeleteLdapProviderNoContent creates a DeleteLdapProviderNoContent with default headers values -func NewDeleteLdapProviderNoContent() *DeleteLdapProviderNoContent { - return &DeleteLdapProviderNoContent{} -} - -/* -DeleteLdapProviderNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteLdapProviderNoContent struct { -} - -// IsSuccess returns true when this delete ldap provider no content response has a 2xx status code -func (o *DeleteLdapProviderNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete ldap provider no content response has a 3xx status code -func (o *DeleteLdapProviderNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ldap provider no content response has a 4xx status code -func (o *DeleteLdapProviderNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete ldap provider no content response has a 5xx status code -func (o *DeleteLdapProviderNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ldap provider no content response a status code equal to that given -func (o *DeleteLdapProviderNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete ldap provider no content response -func (o *DeleteLdapProviderNoContent) Code() int { - return 204 -} - -func (o *DeleteLdapProviderNoContent) Error() string { - return fmt.Sprintf("[DELETE /ldap/{id}][%d] deleteLdapProviderNoContent", 204) -} - -func (o *DeleteLdapProviderNoContent) String() string { - return fmt.Sprintf("[DELETE /ldap/{id}][%d] deleteLdapProviderNoContent", 204) -} - -func (o *DeleteLdapProviderNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteLdapProviderDefault creates a DeleteLdapProviderDefault with default headers values -func NewDeleteLdapProviderDefault(code int) *DeleteLdapProviderDefault { - return &DeleteLdapProviderDefault{ - _statusCode: code, - } -} - -/* -DeleteLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteLdapProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete ldap provider default response has a 2xx status code -func (o *DeleteLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete ldap provider default response has a 3xx status code -func (o *DeleteLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete ldap provider default response has a 4xx status code -func (o *DeleteLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete ldap provider default response has a 5xx status code -func (o *DeleteLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete ldap provider default response a status code equal to that given -func (o *DeleteLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete ldap provider default response -func (o *DeleteLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *DeleteLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /ldap/{id}][%d] DeleteLdapProvider default %s", o._statusCode, payload) -} - -func (o *DeleteLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /ldap/{id}][%d] DeleteLdapProvider default %s", o._statusCode, payload) -} - -func (o *DeleteLdapProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteLdapProviderDefault) 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/l_d_a_p/get_ldap_connection_status_parameters.go b/v2/client/l_d_a_p/get_ldap_connection_status_parameters.go deleted file mode 100644 index 9aef57df..00000000 --- a/v2/client/l_d_a_p/get_ldap_connection_status_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/go-openapi/swag" -) - -// NewGetLdapConnectionStatusParams creates a new GetLdapConnectionStatusParams 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 NewGetLdapConnectionStatusParams() *GetLdapConnectionStatusParams { - return &GetLdapConnectionStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLdapConnectionStatusParamsWithTimeout creates a new GetLdapConnectionStatusParams object -// with the ability to set a timeout on a request. -func NewGetLdapConnectionStatusParamsWithTimeout(timeout time.Duration) *GetLdapConnectionStatusParams { - return &GetLdapConnectionStatusParams{ - timeout: timeout, - } -} - -// NewGetLdapConnectionStatusParamsWithContext creates a new GetLdapConnectionStatusParams object -// with the ability to set a context for a request. -func NewGetLdapConnectionStatusParamsWithContext(ctx context.Context) *GetLdapConnectionStatusParams { - return &GetLdapConnectionStatusParams{ - Context: ctx, - } -} - -// NewGetLdapConnectionStatusParamsWithHTTPClient creates a new GetLdapConnectionStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLdapConnectionStatusParamsWithHTTPClient(client *http.Client) *GetLdapConnectionStatusParams { - return &GetLdapConnectionStatusParams{ - HTTPClient: client, - } -} - -/* -GetLdapConnectionStatusParams contains all the parameters to send to the API endpoint - - for the get ldap connection status operation. - - Typically these are written to a http.Request. -*/ -type GetLdapConnectionStatusParams struct { - - /* ID. - - Specifies the LDAP id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ldap connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapConnectionStatusParams) WithDefaults() *GetLdapConnectionStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ldap connection status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapConnectionStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) WithTimeout(timeout time.Duration) *GetLdapConnectionStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) WithContext(ctx context.Context) *GetLdapConnectionStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) WithHTTPClient(client *http.Client) *GetLdapConnectionStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) WithID(id int64) *GetLdapConnectionStatusParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get ldap connection status params -func (o *GetLdapConnectionStatusParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLdapConnectionStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/l_d_a_p/get_ldap_connection_status_responses.go b/v2/client/l_d_a_p/get_ldap_connection_status_responses.go deleted file mode 100644 index 0fbf8e44..00000000 --- a/v2/client/l_d_a_p/get_ldap_connection_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetLdapConnectionStatusReader is a Reader for the GetLdapConnectionStatus structure. -type GetLdapConnectionStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLdapConnectionStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLdapConnectionStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLdapConnectionStatusDefault(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 - } -} - -// NewGetLdapConnectionStatusOK creates a GetLdapConnectionStatusOK with default headers values -func NewGetLdapConnectionStatusOK() *GetLdapConnectionStatusOK { - return &GetLdapConnectionStatusOK{} -} - -/* -GetLdapConnectionStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetLdapConnectionStatusOK struct { - Payload *models.LdapStatus -} - -// IsSuccess returns true when this get ldap connection status o k response has a 2xx status code -func (o *GetLdapConnectionStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ldap connection status o k response has a 3xx status code -func (o *GetLdapConnectionStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ldap connection status o k response has a 4xx status code -func (o *GetLdapConnectionStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ldap connection status o k response has a 5xx status code -func (o *GetLdapConnectionStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ldap connection status o k response a status code equal to that given -func (o *GetLdapConnectionStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ldap connection status o k response -func (o *GetLdapConnectionStatusOK) Code() int { - return 200 -} - -func (o *GetLdapConnectionStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap/{id}/connection-status][%d] getLdapConnectionStatusOK %s", 200, payload) -} - -func (o *GetLdapConnectionStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap/{id}/connection-status][%d] getLdapConnectionStatusOK %s", 200, payload) -} - -func (o *GetLdapConnectionStatusOK) GetPayload() *models.LdapStatus { - return o.Payload -} - -func (o *GetLdapConnectionStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LdapStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetLdapConnectionStatusDefault creates a GetLdapConnectionStatusDefault with default headers values -func NewGetLdapConnectionStatusDefault(code int) *GetLdapConnectionStatusDefault { - return &GetLdapConnectionStatusDefault{ - _statusCode: code, - } -} - -/* -GetLdapConnectionStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetLdapConnectionStatusDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get ldap connection status default response has a 2xx status code -func (o *GetLdapConnectionStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ldap connection status default response has a 3xx status code -func (o *GetLdapConnectionStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ldap connection status default response has a 4xx status code -func (o *GetLdapConnectionStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ldap connection status default response has a 5xx status code -func (o *GetLdapConnectionStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ldap connection status default response a status code equal to that given -func (o *GetLdapConnectionStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ldap connection status default response -func (o *GetLdapConnectionStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetLdapConnectionStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap/{id}/connection-status][%d] GetLdapConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetLdapConnectionStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap/{id}/connection-status][%d] GetLdapConnectionStatus default %s", o._statusCode, payload) -} - -func (o *GetLdapConnectionStatusDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetLdapConnectionStatusDefault) 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/l_d_a_p/get_ldaps_parameters.go b/v2/client/l_d_a_p/get_ldaps_parameters.go deleted file mode 100644 index 3fd5e43c..00000000 --- a/v2/client/l_d_a_p/get_ldaps_parameters.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/go-openapi/swag" -) - -// NewGetLdapsParams creates a new GetLdapsParams 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 NewGetLdapsParams() *GetLdapsParams { - return &GetLdapsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLdapsParamsWithTimeout creates a new GetLdapsParams object -// with the ability to set a timeout on a request. -func NewGetLdapsParamsWithTimeout(timeout time.Duration) *GetLdapsParams { - return &GetLdapsParams{ - timeout: timeout, - } -} - -// NewGetLdapsParamsWithContext creates a new GetLdapsParams object -// with the ability to set a context for a request. -func NewGetLdapsParamsWithContext(ctx context.Context) *GetLdapsParams { - return &GetLdapsParams{ - Context: ctx, - } -} - -// NewGetLdapsParamsWithHTTPClient creates a new GetLdapsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLdapsParamsWithHTTPClient(client *http.Client) *GetLdapsParams { - return &GetLdapsParams{ - HTTPClient: client, - } -} - -/* -GetLdapsParams contains all the parameters to send to the API endpoint - - for the get ldaps operation. - - Typically these are written to a http.Request. -*/ -type GetLdapsParams struct { - - /* Ids. - - Specifies a list of ids to filter. - */ - Ids []int64 - - /* IncludeTenants. - - IncludeTenants specifies if LDAPs of all the tenants under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* TenantIds. - - TenantIds contains ids of the tenants for which LDAPs are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ldaps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapsParams) WithDefaults() *GetLdapsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ldaps params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLdapsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ldaps params -func (o *GetLdapsParams) WithTimeout(timeout time.Duration) *GetLdapsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ldaps params -func (o *GetLdapsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ldaps params -func (o *GetLdapsParams) WithContext(ctx context.Context) *GetLdapsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ldaps params -func (o *GetLdapsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ldaps params -func (o *GetLdapsParams) WithHTTPClient(client *http.Client) *GetLdapsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ldaps params -func (o *GetLdapsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get ldaps params -func (o *GetLdapsParams) WithIds(ids []int64) *GetLdapsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get ldaps params -func (o *GetLdapsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get ldaps params -func (o *GetLdapsParams) WithIncludeTenants(includeTenants *bool) *GetLdapsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get ldaps params -func (o *GetLdapsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithTenantIds adds the tenantIds to the get ldaps params -func (o *GetLdapsParams) WithTenantIds(tenantIds []string) *GetLdapsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get ldaps params -func (o *GetLdapsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLdapsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetLdaps binds the parameter ids -func (o *GetLdapsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetLdaps binds the parameter tenantIds -func (o *GetLdapsParams) 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/client/l_d_a_p/get_ldaps_responses.go b/v2/client/l_d_a_p/get_ldaps_responses.go deleted file mode 100644 index 1a98a330..00000000 --- a/v2/client/l_d_a_p/get_ldaps_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetLdapsReader is a Reader for the GetLdaps structure. -type GetLdapsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLdapsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLdapsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLdapsDefault(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 - } -} - -// NewGetLdapsOK creates a GetLdapsOK with default headers values -func NewGetLdapsOK() *GetLdapsOK { - return &GetLdapsOK{} -} - -/* -GetLdapsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetLdapsOK struct { - Payload *models.Ldaps -} - -// IsSuccess returns true when this get ldaps o k response has a 2xx status code -func (o *GetLdapsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ldaps o k response has a 3xx status code -func (o *GetLdapsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ldaps o k response has a 4xx status code -func (o *GetLdapsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ldaps o k response has a 5xx status code -func (o *GetLdapsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ldaps o k response a status code equal to that given -func (o *GetLdapsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ldaps o k response -func (o *GetLdapsOK) Code() int { - return 200 -} - -func (o *GetLdapsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap][%d] getLdapsOK %s", 200, payload) -} - -func (o *GetLdapsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap][%d] getLdapsOK %s", 200, payload) -} - -func (o *GetLdapsOK) GetPayload() *models.Ldaps { - return o.Payload -} - -func (o *GetLdapsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Ldaps) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetLdapsDefault creates a GetLdapsDefault with default headers values -func NewGetLdapsDefault(code int) *GetLdapsDefault { - return &GetLdapsDefault{ - _statusCode: code, - } -} - -/* -GetLdapsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetLdapsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get ldaps default response has a 2xx status code -func (o *GetLdapsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ldaps default response has a 3xx status code -func (o *GetLdapsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ldaps default response has a 4xx status code -func (o *GetLdapsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ldaps default response has a 5xx status code -func (o *GetLdapsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ldaps default response a status code equal to that given -func (o *GetLdapsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ldaps default response -func (o *GetLdapsDefault) Code() int { - return o._statusCode -} - -func (o *GetLdapsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap][%d] GetLdaps default %s", o._statusCode, payload) -} - -func (o *GetLdapsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /ldap][%d] GetLdaps default %s", o._statusCode, payload) -} - -func (o *GetLdapsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetLdapsDefault) 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/l_d_a_p/ldap_client.go b/v2/client/l_d_a_p/ldap_client.go deleted file mode 100644 index 2c521339..00000000 --- a/v2/client/l_d_a_p/ldap_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new l d a p API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new l d a p API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new l d a p API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for l d a p API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateLdapProvider(params *CreateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateLdapProviderCreated, error) - - DeleteLdapProvider(params *DeleteLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLdapProviderNoContent, error) - - GetLdapConnectionStatus(params *GetLdapConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapConnectionStatusOK, error) - - GetLdaps(params *GetLdapsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapsOK, error) - - UpdateLdapProvider(params *UpdateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLdapProviderOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateLdapProvider creates ldap provider - -Create Ldap provider with given parameters. -*/ -func (a *Client) CreateLdapProvider(params *CreateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateLdapProviderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "CreateLdapProvider", - Method: "POST", - PathPattern: "/ldap", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateLdapProviderReader{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.(*CreateLdapProviderCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteLdapProvider deletes l d a p provider - -Delete LDAP provider which will be identified by given Id. -*/ -func (a *Client) DeleteLdapProvider(params *DeleteLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLdapProviderNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteLdapProvider", - Method: "DELETE", - PathPattern: "/ldap/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteLdapProviderReader{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.(*DeleteLdapProviderNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteLdapProviderDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetLdapConnectionStatus gets l d a p connection status - -Get LDAP connection status. -*/ -func (a *Client) GetLdapConnectionStatus(params *GetLdapConnectionStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapConnectionStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLdapConnectionStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetLdapConnectionStatus", - Method: "GET", - PathPattern: "/ldap/{id}/connection-status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetLdapConnectionStatusReader{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.(*GetLdapConnectionStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLdapConnectionStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetLdaps gets groups - -Get LDAPs. -*/ -func (a *Client) GetLdaps(params *GetLdapsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLdapsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLdapsParams() - } - op := &runtime.ClientOperation{ - ID: "GetLdaps", - Method: "GET", - PathPattern: "/ldap", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetLdapsReader{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.(*GetLdapsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLdapsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateLdapProvider updates ldap provider - -Modify Ldap provider with given parameters. -*/ -func (a *Client) UpdateLdapProvider(params *UpdateLdapProviderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLdapProviderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateLdapProviderParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateLdapProvider", - Method: "PUT", - PathPattern: "/ldap", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateLdapProviderReader{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.(*UpdateLdapProviderOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateLdapProviderDefault) - 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/v2/client/l_d_a_p/update_ldap_provider_parameters.go b/v2/client/l_d_a_p/update_ldap_provider_parameters.go deleted file mode 100644 index f276b70a..00000000 --- a/v2/client/l_d_a_p/update_ldap_provider_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateLdapProviderParams creates a new UpdateLdapProviderParams 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 NewUpdateLdapProviderParams() *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateLdapProviderParamsWithTimeout creates a new UpdateLdapProviderParams object -// with the ability to set a timeout on a request. -func NewUpdateLdapProviderParamsWithTimeout(timeout time.Duration) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - timeout: timeout, - } -} - -// NewUpdateLdapProviderParamsWithContext creates a new UpdateLdapProviderParams object -// with the ability to set a context for a request. -func NewUpdateLdapProviderParamsWithContext(ctx context.Context) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - Context: ctx, - } -} - -// NewUpdateLdapProviderParamsWithHTTPClient creates a new UpdateLdapProviderParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateLdapProviderParamsWithHTTPClient(client *http.Client) *UpdateLdapProviderParams { - return &UpdateLdapProviderParams{ - HTTPClient: client, - } -} - -/* -UpdateLdapProviderParams contains all the parameters to send to the API endpoint - - for the update ldap provider operation. - - Typically these are written to a http.Request. -*/ -type UpdateLdapProviderParams struct { - - /* Body. - - Specifies the parameters to update Ldap provider. - */ - Body *models.Ldap - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLdapProviderParams) WithDefaults() *UpdateLdapProviderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update ldap provider params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateLdapProviderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update ldap provider params -func (o *UpdateLdapProviderParams) WithTimeout(timeout time.Duration) *UpdateLdapProviderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update ldap provider params -func (o *UpdateLdapProviderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update ldap provider params -func (o *UpdateLdapProviderParams) WithContext(ctx context.Context) *UpdateLdapProviderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update ldap provider params -func (o *UpdateLdapProviderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update ldap provider params -func (o *UpdateLdapProviderParams) WithHTTPClient(client *http.Client) *UpdateLdapProviderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update ldap provider params -func (o *UpdateLdapProviderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update ldap provider params -func (o *UpdateLdapProviderParams) WithBody(body *models.Ldap) *UpdateLdapProviderParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update ldap provider params -func (o *UpdateLdapProviderParams) SetBody(body *models.Ldap) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateLdapProviderParams) 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/l_d_a_p/update_ldap_provider_responses.go b/v2/client/l_d_a_p/update_ldap_provider_responses.go deleted file mode 100644 index 46063912..00000000 --- a/v2/client/l_d_a_p/update_ldap_provider_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package l_d_a_p - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateLdapProviderReader is a Reader for the UpdateLdapProvider structure. -type UpdateLdapProviderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateLdapProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateLdapProviderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateLdapProviderDefault(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 - } -} - -// NewUpdateLdapProviderOK creates a UpdateLdapProviderOK with default headers values -func NewUpdateLdapProviderOK() *UpdateLdapProviderOK { - return &UpdateLdapProviderOK{} -} - -/* -UpdateLdapProviderOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateLdapProviderOK struct { - Payload *models.Ldap -} - -// IsSuccess returns true when this update ldap provider o k response has a 2xx status code -func (o *UpdateLdapProviderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update ldap provider o k response has a 3xx status code -func (o *UpdateLdapProviderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update ldap provider o k response has a 4xx status code -func (o *UpdateLdapProviderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update ldap provider o k response has a 5xx status code -func (o *UpdateLdapProviderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update ldap provider o k response a status code equal to that given -func (o *UpdateLdapProviderOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update ldap provider o k response -func (o *UpdateLdapProviderOK) Code() int { - return 200 -} - -func (o *UpdateLdapProviderOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ldap][%d] updateLdapProviderOK %s", 200, payload) -} - -func (o *UpdateLdapProviderOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ldap][%d] updateLdapProviderOK %s", 200, payload) -} - -func (o *UpdateLdapProviderOK) GetPayload() *models.Ldap { - return o.Payload -} - -func (o *UpdateLdapProviderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Ldap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateLdapProviderDefault creates a UpdateLdapProviderDefault with default headers values -func NewUpdateLdapProviderDefault(code int) *UpdateLdapProviderDefault { - return &UpdateLdapProviderDefault{ - _statusCode: code, - } -} - -/* -UpdateLdapProviderDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateLdapProviderDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update ldap provider default response has a 2xx status code -func (o *UpdateLdapProviderDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update ldap provider default response has a 3xx status code -func (o *UpdateLdapProviderDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update ldap provider default response has a 4xx status code -func (o *UpdateLdapProviderDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update ldap provider default response has a 5xx status code -func (o *UpdateLdapProviderDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update ldap provider default response a status code equal to that given -func (o *UpdateLdapProviderDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update ldap provider default response -func (o *UpdateLdapProviderDefault) Code() int { - return o._statusCode -} - -func (o *UpdateLdapProviderDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ldap][%d] UpdateLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateLdapProviderDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /ldap][%d] UpdateLdapProvider default %s", o._statusCode, payload) -} - -func (o *UpdateLdapProviderDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateLdapProviderDefault) 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/m_f_a/create_email_otp_parameters.go b/v2/client/m_f_a/create_email_otp_parameters.go deleted file mode 100644 index f6249382..00000000 --- a/v2/client/m_f_a/create_email_otp_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateEmailOtpParams creates a new CreateEmailOtpParams 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 NewCreateEmailOtpParams() *CreateEmailOtpParams { - return &CreateEmailOtpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateEmailOtpParamsWithTimeout creates a new CreateEmailOtpParams object -// with the ability to set a timeout on a request. -func NewCreateEmailOtpParamsWithTimeout(timeout time.Duration) *CreateEmailOtpParams { - return &CreateEmailOtpParams{ - timeout: timeout, - } -} - -// NewCreateEmailOtpParamsWithContext creates a new CreateEmailOtpParams object -// with the ability to set a context for a request. -func NewCreateEmailOtpParamsWithContext(ctx context.Context) *CreateEmailOtpParams { - return &CreateEmailOtpParams{ - Context: ctx, - } -} - -// NewCreateEmailOtpParamsWithHTTPClient creates a new CreateEmailOtpParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateEmailOtpParamsWithHTTPClient(client *http.Client) *CreateEmailOtpParams { - return &CreateEmailOtpParams{ - HTTPClient: client, - } -} - -/* -CreateEmailOtpParams contains all the parameters to send to the API endpoint - - for the create email otp operation. - - Typically these are written to a http.Request. -*/ -type CreateEmailOtpParams struct { - - /* Body. - - Specifies the parameters to send email OTP. - */ - Body *models.CreateEmailOtpRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEmailOtpParams) WithDefaults() *CreateEmailOtpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEmailOtpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create email otp params -func (o *CreateEmailOtpParams) WithTimeout(timeout time.Duration) *CreateEmailOtpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create email otp params -func (o *CreateEmailOtpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create email otp params -func (o *CreateEmailOtpParams) WithContext(ctx context.Context) *CreateEmailOtpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create email otp params -func (o *CreateEmailOtpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create email otp params -func (o *CreateEmailOtpParams) WithHTTPClient(client *http.Client) *CreateEmailOtpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create email otp params -func (o *CreateEmailOtpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create email otp params -func (o *CreateEmailOtpParams) WithBody(body *models.CreateEmailOtpRequestBody) *CreateEmailOtpParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create email otp params -func (o *CreateEmailOtpParams) SetBody(body *models.CreateEmailOtpRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateEmailOtpParams) 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/m_f_a/create_email_otp_responses.go b/v2/client/m_f_a/create_email_otp_responses.go deleted file mode 100644 index 8d0f398c..00000000 --- a/v2/client/m_f_a/create_email_otp_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateEmailOtpReader is a Reader for the CreateEmailOtp structure. -type CreateEmailOtpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateEmailOtpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCreateEmailOtpNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateEmailOtpDefault(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 - } -} - -// NewCreateEmailOtpNoContent creates a CreateEmailOtpNoContent with default headers values -func NewCreateEmailOtpNoContent() *CreateEmailOtpNoContent { - return &CreateEmailOtpNoContent{} -} - -/* -CreateEmailOtpNoContent describes a response with status code 204, with default header values. - -Successfully sent an email to the configured address -*/ -type CreateEmailOtpNoContent struct { -} - -// IsSuccess returns true when this create email otp no content response has a 2xx status code -func (o *CreateEmailOtpNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create email otp no content response has a 3xx status code -func (o *CreateEmailOtpNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create email otp no content response has a 4xx status code -func (o *CreateEmailOtpNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this create email otp no content response has a 5xx status code -func (o *CreateEmailOtpNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this create email otp no content response a status code equal to that given -func (o *CreateEmailOtpNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the create email otp no content response -func (o *CreateEmailOtpNoContent) Code() int { - return 204 -} - -func (o *CreateEmailOtpNoContent) Error() string { - return fmt.Sprintf("[POST /email-otp][%d] createEmailOtpNoContent", 204) -} - -func (o *CreateEmailOtpNoContent) String() string { - return fmt.Sprintf("[POST /email-otp][%d] createEmailOtpNoContent", 204) -} - -func (o *CreateEmailOtpNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCreateEmailOtpDefault creates a CreateEmailOtpDefault with default headers values -func NewCreateEmailOtpDefault(code int) *CreateEmailOtpDefault { - return &CreateEmailOtpDefault{ - _statusCode: code, - } -} - -/* -CreateEmailOtpDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateEmailOtpDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create email otp default response has a 2xx status code -func (o *CreateEmailOtpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create email otp default response has a 3xx status code -func (o *CreateEmailOtpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create email otp default response has a 4xx status code -func (o *CreateEmailOtpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create email otp default response has a 5xx status code -func (o *CreateEmailOtpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create email otp default response a status code equal to that given -func (o *CreateEmailOtpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create email otp default response -func (o *CreateEmailOtpDefault) Code() int { - return o._statusCode -} - -func (o *CreateEmailOtpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /email-otp][%d] CreateEmailOtp default %s", o._statusCode, payload) -} - -func (o *CreateEmailOtpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /email-otp][%d] CreateEmailOtp default %s", o._statusCode, payload) -} - -func (o *CreateEmailOtpDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateEmailOtpDefault) 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/m_f_a/create_totp_key_parameters.go b/v2/client/m_f_a/create_totp_key_parameters.go deleted file mode 100644 index 7aa31183..00000000 --- a/v2/client/m_f_a/create_totp_key_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateTotpKeyParams creates a new CreateTotpKeyParams 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 NewCreateTotpKeyParams() *CreateTotpKeyParams { - return &CreateTotpKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTotpKeyParamsWithTimeout creates a new CreateTotpKeyParams object -// with the ability to set a timeout on a request. -func NewCreateTotpKeyParamsWithTimeout(timeout time.Duration) *CreateTotpKeyParams { - return &CreateTotpKeyParams{ - timeout: timeout, - } -} - -// NewCreateTotpKeyParamsWithContext creates a new CreateTotpKeyParams object -// with the ability to set a context for a request. -func NewCreateTotpKeyParamsWithContext(ctx context.Context) *CreateTotpKeyParams { - return &CreateTotpKeyParams{ - Context: ctx, - } -} - -// NewCreateTotpKeyParamsWithHTTPClient creates a new CreateTotpKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTotpKeyParamsWithHTTPClient(client *http.Client) *CreateTotpKeyParams { - return &CreateTotpKeyParams{ - HTTPClient: client, - } -} - -/* -CreateTotpKeyParams contains all the parameters to send to the API endpoint - - for the create totp key operation. - - Typically these are written to a http.Request. -*/ -type CreateTotpKeyParams struct { - - /* Body. - - Specifies the key id for creating the TOTP key. - */ - Body *models.CreateTotpKeyRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create totp key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTotpKeyParams) WithDefaults() *CreateTotpKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create totp key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTotpKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create totp key params -func (o *CreateTotpKeyParams) WithTimeout(timeout time.Duration) *CreateTotpKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create totp key params -func (o *CreateTotpKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create totp key params -func (o *CreateTotpKeyParams) WithContext(ctx context.Context) *CreateTotpKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create totp key params -func (o *CreateTotpKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create totp key params -func (o *CreateTotpKeyParams) WithHTTPClient(client *http.Client) *CreateTotpKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create totp key params -func (o *CreateTotpKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create totp key params -func (o *CreateTotpKeyParams) WithBody(body *models.CreateTotpKeyRequestBody) *CreateTotpKeyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create totp key params -func (o *CreateTotpKeyParams) SetBody(body *models.CreateTotpKeyRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTotpKeyParams) 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/m_f_a/create_totp_key_responses.go b/v2/client/m_f_a/create_totp_key_responses.go deleted file mode 100644 index 22a9f08d..00000000 --- a/v2/client/m_f_a/create_totp_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateTotpKeyReader is a Reader for the CreateTotpKey structure. -type CreateTotpKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTotpKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTotpKeyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateTotpKeyDefault(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 - } -} - -// NewCreateTotpKeyCreated creates a CreateTotpKeyCreated with default headers values -func NewCreateTotpKeyCreated() *CreateTotpKeyCreated { - return &CreateTotpKeyCreated{} -} - -/* -CreateTotpKeyCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateTotpKeyCreated struct { - Payload *models.TotpKeyInfo -} - -// IsSuccess returns true when this create totp key created response has a 2xx status code -func (o *CreateTotpKeyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create totp key created response has a 3xx status code -func (o *CreateTotpKeyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create totp key created response has a 4xx status code -func (o *CreateTotpKeyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create totp key created response has a 5xx status code -func (o *CreateTotpKeyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create totp key created response a status code equal to that given -func (o *CreateTotpKeyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create totp key created response -func (o *CreateTotpKeyCreated) Code() int { - return 201 -} - -func (o *CreateTotpKeyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /totp-key][%d] createTotpKeyCreated %s", 201, payload) -} - -func (o *CreateTotpKeyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /totp-key][%d] createTotpKeyCreated %s", 201, payload) -} - -func (o *CreateTotpKeyCreated) GetPayload() *models.TotpKeyInfo { - return o.Payload -} - -func (o *CreateTotpKeyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TotpKeyInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTotpKeyDefault creates a CreateTotpKeyDefault with default headers values -func NewCreateTotpKeyDefault(code int) *CreateTotpKeyDefault { - return &CreateTotpKeyDefault{ - _statusCode: code, - } -} - -/* -CreateTotpKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateTotpKeyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create totp key default response has a 2xx status code -func (o *CreateTotpKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create totp key default response has a 3xx status code -func (o *CreateTotpKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create totp key default response has a 4xx status code -func (o *CreateTotpKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create totp key default response has a 5xx status code -func (o *CreateTotpKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create totp key default response a status code equal to that given -func (o *CreateTotpKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create totp key default response -func (o *CreateTotpKeyDefault) Code() int { - return o._statusCode -} - -func (o *CreateTotpKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /totp-key][%d] CreateTotpKey default %s", o._statusCode, payload) -} - -func (o *CreateTotpKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /totp-key][%d] CreateTotpKey default %s", o._statusCode, payload) -} - -func (o *CreateTotpKeyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateTotpKeyDefault) 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/m_f_a/get_m_f_a_config_parameters.go b/v2/client/m_f_a/get_m_f_a_config_parameters.go deleted file mode 100644 index 4aaede2a..00000000 --- a/v2/client/m_f_a/get_m_f_a_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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" -) - -// NewGetMFAConfigParams creates a new GetMFAConfigParams 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 NewGetMFAConfigParams() *GetMFAConfigParams { - return &GetMFAConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMFAConfigParamsWithTimeout creates a new GetMFAConfigParams object -// with the ability to set a timeout on a request. -func NewGetMFAConfigParamsWithTimeout(timeout time.Duration) *GetMFAConfigParams { - return &GetMFAConfigParams{ - timeout: timeout, - } -} - -// NewGetMFAConfigParamsWithContext creates a new GetMFAConfigParams object -// with the ability to set a context for a request. -func NewGetMFAConfigParamsWithContext(ctx context.Context) *GetMFAConfigParams { - return &GetMFAConfigParams{ - Context: ctx, - } -} - -// NewGetMFAConfigParamsWithHTTPClient creates a new GetMFAConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMFAConfigParamsWithHTTPClient(client *http.Client) *GetMFAConfigParams { - return &GetMFAConfigParams{ - HTTPClient: client, - } -} - -/* -GetMFAConfigParams contains all the parameters to send to the API endpoint - - for the get m f a config operation. - - Typically these are written to a http.Request. -*/ -type GetMFAConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMFAConfigParams) WithDefaults() *GetMFAConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMFAConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get m f a config params -func (o *GetMFAConfigParams) WithTimeout(timeout time.Duration) *GetMFAConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get m f a config params -func (o *GetMFAConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get m f a config params -func (o *GetMFAConfigParams) WithContext(ctx context.Context) *GetMFAConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get m f a config params -func (o *GetMFAConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get m f a config params -func (o *GetMFAConfigParams) WithHTTPClient(client *http.Client) *GetMFAConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get m f a config params -func (o *GetMFAConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMFAConfigParams) 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/m_f_a/get_m_f_a_config_responses.go b/v2/client/m_f_a/get_m_f_a_config_responses.go deleted file mode 100644 index cfa757db..00000000 --- a/v2/client/m_f_a/get_m_f_a_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetMFAConfigReader is a Reader for the GetMFAConfig structure. -type GetMFAConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMFAConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMFAConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetMFAConfigDefault(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 - } -} - -// NewGetMFAConfigOK creates a GetMFAConfigOK with default headers values -func NewGetMFAConfigOK() *GetMFAConfigOK { - return &GetMFAConfigOK{} -} - -/* -GetMFAConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMFAConfigOK struct { - Payload *models.MfaConfigInfo -} - -// IsSuccess returns true when this get m f a config o k response has a 2xx status code -func (o *GetMFAConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get m f a config o k response has a 3xx status code -func (o *GetMFAConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get m f a config o k response has a 4xx status code -func (o *GetMFAConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get m f a config o k response has a 5xx status code -func (o *GetMFAConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get m f a config o k response a status code equal to that given -func (o *GetMFAConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get m f a config o k response -func (o *GetMFAConfigOK) Code() int { - return 200 -} - -func (o *GetMFAConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /mfa-config][%d] getMFAConfigOK %s", 200, payload) -} - -func (o *GetMFAConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /mfa-config][%d] getMFAConfigOK %s", 200, payload) -} - -func (o *GetMFAConfigOK) GetPayload() *models.MfaConfigInfo { - return o.Payload -} - -func (o *GetMFAConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MfaConfigInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMFAConfigDefault creates a GetMFAConfigDefault with default headers values -func NewGetMFAConfigDefault(code int) *GetMFAConfigDefault { - return &GetMFAConfigDefault{ - _statusCode: code, - } -} - -/* -GetMFAConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetMFAConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get m f a config default response has a 2xx status code -func (o *GetMFAConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get m f a config default response has a 3xx status code -func (o *GetMFAConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get m f a config default response has a 4xx status code -func (o *GetMFAConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get m f a config default response has a 5xx status code -func (o *GetMFAConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get m f a config default response a status code equal to that given -func (o *GetMFAConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get m f a config default response -func (o *GetMFAConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetMFAConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /mfa-config][%d] GetMFAConfig default %s", o._statusCode, payload) -} - -func (o *GetMFAConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /mfa-config][%d] GetMFAConfig default %s", o._statusCode, payload) -} - -func (o *GetMFAConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetMFAConfigDefault) 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/m_f_a/get_support_m_f_a_config_parameters.go b/v2/client/m_f_a/get_support_m_f_a_config_parameters.go deleted file mode 100644 index 0d0cacee..00000000 --- a/v2/client/m_f_a/get_support_m_f_a_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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" -) - -// NewGetSupportMFAConfigParams creates a new GetSupportMFAConfigParams 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 NewGetSupportMFAConfigParams() *GetSupportMFAConfigParams { - return &GetSupportMFAConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSupportMFAConfigParamsWithTimeout creates a new GetSupportMFAConfigParams object -// with the ability to set a timeout on a request. -func NewGetSupportMFAConfigParamsWithTimeout(timeout time.Duration) *GetSupportMFAConfigParams { - return &GetSupportMFAConfigParams{ - timeout: timeout, - } -} - -// NewGetSupportMFAConfigParamsWithContext creates a new GetSupportMFAConfigParams object -// with the ability to set a context for a request. -func NewGetSupportMFAConfigParamsWithContext(ctx context.Context) *GetSupportMFAConfigParams { - return &GetSupportMFAConfigParams{ - Context: ctx, - } -} - -// NewGetSupportMFAConfigParamsWithHTTPClient creates a new GetSupportMFAConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSupportMFAConfigParamsWithHTTPClient(client *http.Client) *GetSupportMFAConfigParams { - return &GetSupportMFAConfigParams{ - HTTPClient: client, - } -} - -/* -GetSupportMFAConfigParams contains all the parameters to send to the API endpoint - - for the get support m f a config operation. - - Typically these are written to a http.Request. -*/ -type GetSupportMFAConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get support m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportMFAConfigParams) WithDefaults() *GetSupportMFAConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get support m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportMFAConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get support m f a config params -func (o *GetSupportMFAConfigParams) WithTimeout(timeout time.Duration) *GetSupportMFAConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get support m f a config params -func (o *GetSupportMFAConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get support m f a config params -func (o *GetSupportMFAConfigParams) WithContext(ctx context.Context) *GetSupportMFAConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get support m f a config params -func (o *GetSupportMFAConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get support m f a config params -func (o *GetSupportMFAConfigParams) WithHTTPClient(client *http.Client) *GetSupportMFAConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get support m f a config params -func (o *GetSupportMFAConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSupportMFAConfigParams) 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/m_f_a/get_support_m_f_a_config_responses.go b/v2/client/m_f_a/get_support_m_f_a_config_responses.go deleted file mode 100644 index f2e705bc..00000000 --- a/v2/client/m_f_a/get_support_m_f_a_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSupportMFAConfigReader is a Reader for the GetSupportMFAConfig structure. -type GetSupportMFAConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSupportMFAConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSupportMFAConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSupportMFAConfigDefault(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 - } -} - -// NewGetSupportMFAConfigOK creates a GetSupportMFAConfigOK with default headers values -func NewGetSupportMFAConfigOK() *GetSupportMFAConfigOK { - return &GetSupportMFAConfigOK{} -} - -/* -GetSupportMFAConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSupportMFAConfigOK struct { - Payload *models.SupportMfaConfigInfo -} - -// IsSuccess returns true when this get support m f a config o k response has a 2xx status code -func (o *GetSupportMFAConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get support m f a config o k response has a 3xx status code -func (o *GetSupportMFAConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get support m f a config o k response has a 4xx status code -func (o *GetSupportMFAConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get support m f a config o k response has a 5xx status code -func (o *GetSupportMFAConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get support m f a config o k response a status code equal to that given -func (o *GetSupportMFAConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get support m f a config o k response -func (o *GetSupportMFAConfigOK) Code() int { - return 200 -} - -func (o *GetSupportMFAConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/mfa][%d] getSupportMFAConfigOK %s", 200, payload) -} - -func (o *GetSupportMFAConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/mfa][%d] getSupportMFAConfigOK %s", 200, payload) -} - -func (o *GetSupportMFAConfigOK) GetPayload() *models.SupportMfaConfigInfo { - return o.Payload -} - -func (o *GetSupportMFAConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SupportMfaConfigInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSupportMFAConfigDefault creates a GetSupportMFAConfigDefault with default headers values -func NewGetSupportMFAConfigDefault(code int) *GetSupportMFAConfigDefault { - return &GetSupportMFAConfigDefault{ - _statusCode: code, - } -} - -/* -GetSupportMFAConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSupportMFAConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get support m f a config default response has a 2xx status code -func (o *GetSupportMFAConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get support m f a config default response has a 3xx status code -func (o *GetSupportMFAConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get support m f a config default response has a 4xx status code -func (o *GetSupportMFAConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get support m f a config default response has a 5xx status code -func (o *GetSupportMFAConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get support m f a config default response a status code equal to that given -func (o *GetSupportMFAConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get support m f a config default response -func (o *GetSupportMFAConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetSupportMFAConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/mfa][%d] GetSupportMFAConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportMFAConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/mfa][%d] GetSupportMFAConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportMFAConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSupportMFAConfigDefault) 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/m_f_a/mfa_client.go b/v2/client/m_f_a/mfa_client.go deleted file mode 100644 index 5fcc57b5..00000000 --- a/v2/client/m_f_a/mfa_client.go +++ /dev/null @@ -1,441 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new m f a API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new m f a API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new m f a API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for m f a API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateEmailOtp(params *CreateEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateEmailOtpNoContent, error) - - CreateTotpKey(params *CreateTotpKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTotpKeyCreated, error) - - GetMFAConfig(params *GetMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMFAConfigOK, error) - - GetSupportMFAConfig(params *GetSupportMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportMFAConfigOK, error) - - SendEmailOtp(params *SendEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SendEmailOtpNoContent, error) - - SendSupportEmailOtp(params *SendSupportEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SendSupportEmailOtpNoContent, error) - - UpdateMFAConfig(params *UpdateMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateMFAConfigNoContent, error) - - UpdateSupportMFAConfig(params *UpdateSupportMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportMFAConfigOK, error) - - VerifySupportUserTotp(params *VerifySupportUserTotpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VerifySupportUserTotpOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateEmailOtp creates a new o t p to be sent to the user email - -Creates a new One Time Password for the user email. This is used for API login. -*/ -func (a *Client) CreateEmailOtp(params *CreateEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateEmailOtpNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateEmailOtpParams() - } - op := &runtime.ClientOperation{ - ID: "CreateEmailOtp", - Method: "POST", - PathPattern: "/email-otp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateEmailOtpReader{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.(*CreateEmailOtpNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateEmailOtpDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateTotpKey creates a new t o t p secret URI and store the secret key - -Create a TOTP key. -*/ -func (a *Client) CreateTotpKey(params *CreateTotpKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTotpKeyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTotpKeyParams() - } - op := &runtime.ClientOperation{ - ID: "CreateTotpKey", - Method: "POST", - PathPattern: "/totp-key", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateTotpKeyReader{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.(*CreateTotpKeyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateTotpKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetMFAConfig returns the current m f a configuration - -Returns the current MFA configuration for the cluster. -*/ -func (a *Client) GetMFAConfig(params *GetMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMFAConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMFAConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetMFAConfig", - Method: "GET", - PathPattern: "/mfa-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetMFAConfigReader{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.(*GetMFAConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetMFAConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSupportMFAConfig returns the current m f a configuration - -Returns the current MFA configuration for support user. -*/ -func (a *Client) GetSupportMFAConfig(params *GetSupportMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportMFAConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSupportMFAConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetSupportMFAConfig", - Method: "GET", - PathPattern: "/support-user/mfa", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSupportMFAConfigReader{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.(*GetSupportMFAConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSupportMFAConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SendEmailOtp creates a new o t p to be sent to the user email - -Creates a new One Time Password for the user email -*/ -func (a *Client) SendEmailOtp(params *SendEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SendEmailOtpNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSendEmailOtpParams() - } - op := &runtime.ClientOperation{ - ID: "SendEmailOtp", - Method: "POST", - PathPattern: "/send-email-otp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SendEmailOtpReader{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.(*SendEmailOtpNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SendEmailOtpDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SendSupportEmailOtp creates a new o t p to be sent to the linux support user email - -Creates a new one time password for linux support user email -*/ -func (a *Client) SendSupportEmailOtp(params *SendSupportEmailOtpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SendSupportEmailOtpNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSendSupportEmailOtpParams() - } - op := &runtime.ClientOperation{ - ID: "SendSupportEmailOtp", - Method: "POST", - PathPattern: "/support-user/send-email-otp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SendSupportEmailOtpReader{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.(*SendSupportEmailOtpNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SendSupportEmailOtpDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateMFAConfig stores the updated m f a configuration - -Stores the updated MFA configuration for the cluster. -*/ -func (a *Client) UpdateMFAConfig(params *UpdateMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateMFAConfigNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateMFAConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateMFAConfig", - Method: "PUT", - PathPattern: "/mfa-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateMFAConfigReader{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.(*UpdateMFAConfigNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateMFAConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSupportMFAConfig stores the updated m f a configuration - -Update MFA configuration for support user. -*/ -func (a *Client) UpdateSupportMFAConfig(params *UpdateSupportMFAConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportMFAConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSupportMFAConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSupportMFAConfig", - Method: "PATCH", - PathPattern: "/support-user/mfa", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSupportMFAConfigReader{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.(*UpdateSupportMFAConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSupportMFAConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -VerifySupportUserTotp verifies the totp code for support user - -Verify totp code for support user. -*/ -func (a *Client) VerifySupportUserTotp(params *VerifySupportUserTotpParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VerifySupportUserTotpOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewVerifySupportUserTotpParams() - } - op := &runtime.ClientOperation{ - ID: "VerifySupportUserTotp", - Method: "POST", - PathPattern: "/support-user/verify-totp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &VerifySupportUserTotpReader{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.(*VerifySupportUserTotpOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*VerifySupportUserTotpDefault) - 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/v2/client/m_f_a/send_email_otp_parameters.go b/v2/client/m_f_a/send_email_otp_parameters.go deleted file mode 100644 index 7e9865b2..00000000 --- a/v2/client/m_f_a/send_email_otp_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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" -) - -// NewSendEmailOtpParams creates a new SendEmailOtpParams 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 NewSendEmailOtpParams() *SendEmailOtpParams { - return &SendEmailOtpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSendEmailOtpParamsWithTimeout creates a new SendEmailOtpParams object -// with the ability to set a timeout on a request. -func NewSendEmailOtpParamsWithTimeout(timeout time.Duration) *SendEmailOtpParams { - return &SendEmailOtpParams{ - timeout: timeout, - } -} - -// NewSendEmailOtpParamsWithContext creates a new SendEmailOtpParams object -// with the ability to set a context for a request. -func NewSendEmailOtpParamsWithContext(ctx context.Context) *SendEmailOtpParams { - return &SendEmailOtpParams{ - Context: ctx, - } -} - -// NewSendEmailOtpParamsWithHTTPClient creates a new SendEmailOtpParams object -// with the ability to set a custom HTTPClient for a request. -func NewSendEmailOtpParamsWithHTTPClient(client *http.Client) *SendEmailOtpParams { - return &SendEmailOtpParams{ - HTTPClient: client, - } -} - -/* -SendEmailOtpParams contains all the parameters to send to the API endpoint - - for the send email otp operation. - - Typically these are written to a http.Request. -*/ -type SendEmailOtpParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the send email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SendEmailOtpParams) WithDefaults() *SendEmailOtpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the send email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SendEmailOtpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the send email otp params -func (o *SendEmailOtpParams) WithTimeout(timeout time.Duration) *SendEmailOtpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the send email otp params -func (o *SendEmailOtpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the send email otp params -func (o *SendEmailOtpParams) WithContext(ctx context.Context) *SendEmailOtpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the send email otp params -func (o *SendEmailOtpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the send email otp params -func (o *SendEmailOtpParams) WithHTTPClient(client *http.Client) *SendEmailOtpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the send email otp params -func (o *SendEmailOtpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SendEmailOtpParams) 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/m_f_a/send_email_otp_responses.go b/v2/client/m_f_a/send_email_otp_responses.go deleted file mode 100644 index 2be4fd3d..00000000 --- a/v2/client/m_f_a/send_email_otp_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SendEmailOtpReader is a Reader for the SendEmailOtp structure. -type SendEmailOtpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SendEmailOtpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewSendEmailOtpNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSendEmailOtpDefault(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 - } -} - -// NewSendEmailOtpNoContent creates a SendEmailOtpNoContent with default headers values -func NewSendEmailOtpNoContent() *SendEmailOtpNoContent { - return &SendEmailOtpNoContent{} -} - -/* -SendEmailOtpNoContent describes a response with status code 204, with default header values. - -Successfully sent an email to the configured address -*/ -type SendEmailOtpNoContent struct { -} - -// IsSuccess returns true when this send email otp no content response has a 2xx status code -func (o *SendEmailOtpNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this send email otp no content response has a 3xx status code -func (o *SendEmailOtpNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this send email otp no content response has a 4xx status code -func (o *SendEmailOtpNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this send email otp no content response has a 5xx status code -func (o *SendEmailOtpNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this send email otp no content response a status code equal to that given -func (o *SendEmailOtpNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the send email otp no content response -func (o *SendEmailOtpNoContent) Code() int { - return 204 -} - -func (o *SendEmailOtpNoContent) Error() string { - return fmt.Sprintf("[POST /send-email-otp][%d] sendEmailOtpNoContent", 204) -} - -func (o *SendEmailOtpNoContent) String() string { - return fmt.Sprintf("[POST /send-email-otp][%d] sendEmailOtpNoContent", 204) -} - -func (o *SendEmailOtpNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewSendEmailOtpDefault creates a SendEmailOtpDefault with default headers values -func NewSendEmailOtpDefault(code int) *SendEmailOtpDefault { - return &SendEmailOtpDefault{ - _statusCode: code, - } -} - -/* -SendEmailOtpDefault describes a response with status code -1, with default header values. - -Error -*/ -type SendEmailOtpDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this send email otp default response has a 2xx status code -func (o *SendEmailOtpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this send email otp default response has a 3xx status code -func (o *SendEmailOtpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this send email otp default response has a 4xx status code -func (o *SendEmailOtpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this send email otp default response has a 5xx status code -func (o *SendEmailOtpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this send email otp default response a status code equal to that given -func (o *SendEmailOtpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the send email otp default response -func (o *SendEmailOtpDefault) Code() int { - return o._statusCode -} - -func (o *SendEmailOtpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /send-email-otp][%d] SendEmailOtp default %s", o._statusCode, payload) -} - -func (o *SendEmailOtpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /send-email-otp][%d] SendEmailOtp default %s", o._statusCode, payload) -} - -func (o *SendEmailOtpDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SendEmailOtpDefault) 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/m_f_a/send_support_email_otp_parameters.go b/v2/client/m_f_a/send_support_email_otp_parameters.go deleted file mode 100644 index a8523c02..00000000 --- a/v2/client/m_f_a/send_support_email_otp_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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" -) - -// NewSendSupportEmailOtpParams creates a new SendSupportEmailOtpParams 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 NewSendSupportEmailOtpParams() *SendSupportEmailOtpParams { - return &SendSupportEmailOtpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSendSupportEmailOtpParamsWithTimeout creates a new SendSupportEmailOtpParams object -// with the ability to set a timeout on a request. -func NewSendSupportEmailOtpParamsWithTimeout(timeout time.Duration) *SendSupportEmailOtpParams { - return &SendSupportEmailOtpParams{ - timeout: timeout, - } -} - -// NewSendSupportEmailOtpParamsWithContext creates a new SendSupportEmailOtpParams object -// with the ability to set a context for a request. -func NewSendSupportEmailOtpParamsWithContext(ctx context.Context) *SendSupportEmailOtpParams { - return &SendSupportEmailOtpParams{ - Context: ctx, - } -} - -// NewSendSupportEmailOtpParamsWithHTTPClient creates a new SendSupportEmailOtpParams object -// with the ability to set a custom HTTPClient for a request. -func NewSendSupportEmailOtpParamsWithHTTPClient(client *http.Client) *SendSupportEmailOtpParams { - return &SendSupportEmailOtpParams{ - HTTPClient: client, - } -} - -/* -SendSupportEmailOtpParams contains all the parameters to send to the API endpoint - - for the send support email otp operation. - - Typically these are written to a http.Request. -*/ -type SendSupportEmailOtpParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the send support email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SendSupportEmailOtpParams) WithDefaults() *SendSupportEmailOtpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the send support email otp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SendSupportEmailOtpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the send support email otp params -func (o *SendSupportEmailOtpParams) WithTimeout(timeout time.Duration) *SendSupportEmailOtpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the send support email otp params -func (o *SendSupportEmailOtpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the send support email otp params -func (o *SendSupportEmailOtpParams) WithContext(ctx context.Context) *SendSupportEmailOtpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the send support email otp params -func (o *SendSupportEmailOtpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the send support email otp params -func (o *SendSupportEmailOtpParams) WithHTTPClient(client *http.Client) *SendSupportEmailOtpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the send support email otp params -func (o *SendSupportEmailOtpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *SendSupportEmailOtpParams) 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/m_f_a/send_support_email_otp_responses.go b/v2/client/m_f_a/send_support_email_otp_responses.go deleted file mode 100644 index 8313e747..00000000 --- a/v2/client/m_f_a/send_support_email_otp_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SendSupportEmailOtpReader is a Reader for the SendSupportEmailOtp structure. -type SendSupportEmailOtpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SendSupportEmailOtpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewSendSupportEmailOtpNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSendSupportEmailOtpDefault(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 - } -} - -// NewSendSupportEmailOtpNoContent creates a SendSupportEmailOtpNoContent with default headers values -func NewSendSupportEmailOtpNoContent() *SendSupportEmailOtpNoContent { - return &SendSupportEmailOtpNoContent{} -} - -/* -SendSupportEmailOtpNoContent describes a response with status code 204, with default header values. - -Successfully sent an email to the configured address -*/ -type SendSupportEmailOtpNoContent struct { -} - -// IsSuccess returns true when this send support email otp no content response has a 2xx status code -func (o *SendSupportEmailOtpNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this send support email otp no content response has a 3xx status code -func (o *SendSupportEmailOtpNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this send support email otp no content response has a 4xx status code -func (o *SendSupportEmailOtpNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this send support email otp no content response has a 5xx status code -func (o *SendSupportEmailOtpNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this send support email otp no content response a status code equal to that given -func (o *SendSupportEmailOtpNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the send support email otp no content response -func (o *SendSupportEmailOtpNoContent) Code() int { - return 204 -} - -func (o *SendSupportEmailOtpNoContent) Error() string { - return fmt.Sprintf("[POST /support-user/send-email-otp][%d] sendSupportEmailOtpNoContent", 204) -} - -func (o *SendSupportEmailOtpNoContent) String() string { - return fmt.Sprintf("[POST /support-user/send-email-otp][%d] sendSupportEmailOtpNoContent", 204) -} - -func (o *SendSupportEmailOtpNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewSendSupportEmailOtpDefault creates a SendSupportEmailOtpDefault with default headers values -func NewSendSupportEmailOtpDefault(code int) *SendSupportEmailOtpDefault { - return &SendSupportEmailOtpDefault{ - _statusCode: code, - } -} - -/* -SendSupportEmailOtpDefault describes a response with status code -1, with default header values. - -Error -*/ -type SendSupportEmailOtpDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this send support email otp default response has a 2xx status code -func (o *SendSupportEmailOtpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this send support email otp default response has a 3xx status code -func (o *SendSupportEmailOtpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this send support email otp default response has a 4xx status code -func (o *SendSupportEmailOtpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this send support email otp default response has a 5xx status code -func (o *SendSupportEmailOtpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this send support email otp default response a status code equal to that given -func (o *SendSupportEmailOtpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the send support email otp default response -func (o *SendSupportEmailOtpDefault) Code() int { - return o._statusCode -} - -func (o *SendSupportEmailOtpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/send-email-otp][%d] SendSupportEmailOtp default %s", o._statusCode, payload) -} - -func (o *SendSupportEmailOtpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/send-email-otp][%d] SendSupportEmailOtp default %s", o._statusCode, payload) -} - -func (o *SendSupportEmailOtpDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SendSupportEmailOtpDefault) 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/m_f_a/update_m_f_a_config_parameters.go b/v2/client/m_f_a/update_m_f_a_config_parameters.go deleted file mode 100644 index 70d4f478..00000000 --- a/v2/client/m_f_a/update_m_f_a_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateMFAConfigParams creates a new UpdateMFAConfigParams 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 NewUpdateMFAConfigParams() *UpdateMFAConfigParams { - return &UpdateMFAConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateMFAConfigParamsWithTimeout creates a new UpdateMFAConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateMFAConfigParamsWithTimeout(timeout time.Duration) *UpdateMFAConfigParams { - return &UpdateMFAConfigParams{ - timeout: timeout, - } -} - -// NewUpdateMFAConfigParamsWithContext creates a new UpdateMFAConfigParams object -// with the ability to set a context for a request. -func NewUpdateMFAConfigParamsWithContext(ctx context.Context) *UpdateMFAConfigParams { - return &UpdateMFAConfigParams{ - Context: ctx, - } -} - -// NewUpdateMFAConfigParamsWithHTTPClient creates a new UpdateMFAConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateMFAConfigParamsWithHTTPClient(client *http.Client) *UpdateMFAConfigParams { - return &UpdateMFAConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateMFAConfigParams contains all the parameters to send to the API endpoint - - for the update m f a config operation. - - Typically these are written to a http.Request. -*/ -type UpdateMFAConfigParams struct { - - /* Body. - - The update request for the MFA Settings - */ - Body *models.MfaConfigInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateMFAConfigParams) WithDefaults() *UpdateMFAConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateMFAConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update m f a config params -func (o *UpdateMFAConfigParams) WithTimeout(timeout time.Duration) *UpdateMFAConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update m f a config params -func (o *UpdateMFAConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update m f a config params -func (o *UpdateMFAConfigParams) WithContext(ctx context.Context) *UpdateMFAConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update m f a config params -func (o *UpdateMFAConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update m f a config params -func (o *UpdateMFAConfigParams) WithHTTPClient(client *http.Client) *UpdateMFAConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update m f a config params -func (o *UpdateMFAConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update m f a config params -func (o *UpdateMFAConfigParams) WithBody(body *models.MfaConfigInfo) *UpdateMFAConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update m f a config params -func (o *UpdateMFAConfigParams) SetBody(body *models.MfaConfigInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateMFAConfigParams) 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/m_f_a/update_m_f_a_config_responses.go b/v2/client/m_f_a/update_m_f_a_config_responses.go deleted file mode 100644 index 643ea1e6..00000000 --- a/v2/client/m_f_a/update_m_f_a_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateMFAConfigReader is a Reader for the UpdateMFAConfig structure. -type UpdateMFAConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateMFAConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUpdateMFAConfigNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateMFAConfigDefault(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 - } -} - -// NewUpdateMFAConfigNoContent creates a UpdateMFAConfigNoContent with default headers values -func NewUpdateMFAConfigNoContent() *UpdateMFAConfigNoContent { - return &UpdateMFAConfigNoContent{} -} - -/* -UpdateMFAConfigNoContent describes a response with status code 204, with default header values. - -Success -*/ -type UpdateMFAConfigNoContent struct { - Payload *models.MfaConfigInfo -} - -// IsSuccess returns true when this update m f a config no content response has a 2xx status code -func (o *UpdateMFAConfigNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update m f a config no content response has a 3xx status code -func (o *UpdateMFAConfigNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update m f a config no content response has a 4xx status code -func (o *UpdateMFAConfigNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this update m f a config no content response has a 5xx status code -func (o *UpdateMFAConfigNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this update m f a config no content response a status code equal to that given -func (o *UpdateMFAConfigNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the update m f a config no content response -func (o *UpdateMFAConfigNoContent) Code() int { - return 204 -} - -func (o *UpdateMFAConfigNoContent) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /mfa-config][%d] updateMFAConfigNoContent %s", 204, payload) -} - -func (o *UpdateMFAConfigNoContent) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /mfa-config][%d] updateMFAConfigNoContent %s", 204, payload) -} - -func (o *UpdateMFAConfigNoContent) GetPayload() *models.MfaConfigInfo { - return o.Payload -} - -func (o *UpdateMFAConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MfaConfigInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateMFAConfigDefault creates a UpdateMFAConfigDefault with default headers values -func NewUpdateMFAConfigDefault(code int) *UpdateMFAConfigDefault { - return &UpdateMFAConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateMFAConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateMFAConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update m f a config default response has a 2xx status code -func (o *UpdateMFAConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update m f a config default response has a 3xx status code -func (o *UpdateMFAConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update m f a config default response has a 4xx status code -func (o *UpdateMFAConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update m f a config default response has a 5xx status code -func (o *UpdateMFAConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update m f a config default response a status code equal to that given -func (o *UpdateMFAConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update m f a config default response -func (o *UpdateMFAConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateMFAConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /mfa-config][%d] UpdateMFAConfig default %s", o._statusCode, payload) -} - -func (o *UpdateMFAConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /mfa-config][%d] UpdateMFAConfig default %s", o._statusCode, payload) -} - -func (o *UpdateMFAConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateMFAConfigDefault) 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/m_f_a/update_support_m_f_a_config_parameters.go b/v2/client/m_f_a/update_support_m_f_a_config_parameters.go deleted file mode 100644 index c4c39726..00000000 --- a/v2/client/m_f_a/update_support_m_f_a_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSupportMFAConfigParams creates a new UpdateSupportMFAConfigParams 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 NewUpdateSupportMFAConfigParams() *UpdateSupportMFAConfigParams { - return &UpdateSupportMFAConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSupportMFAConfigParamsWithTimeout creates a new UpdateSupportMFAConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateSupportMFAConfigParamsWithTimeout(timeout time.Duration) *UpdateSupportMFAConfigParams { - return &UpdateSupportMFAConfigParams{ - timeout: timeout, - } -} - -// NewUpdateSupportMFAConfigParamsWithContext creates a new UpdateSupportMFAConfigParams object -// with the ability to set a context for a request. -func NewUpdateSupportMFAConfigParamsWithContext(ctx context.Context) *UpdateSupportMFAConfigParams { - return &UpdateSupportMFAConfigParams{ - Context: ctx, - } -} - -// NewUpdateSupportMFAConfigParamsWithHTTPClient creates a new UpdateSupportMFAConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSupportMFAConfigParamsWithHTTPClient(client *http.Client) *UpdateSupportMFAConfigParams { - return &UpdateSupportMFAConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateSupportMFAConfigParams contains all the parameters to send to the API endpoint - - for the update support m f a config operation. - - Typically these are written to a http.Request. -*/ -type UpdateSupportMFAConfigParams struct { - - /* Body. - - The update request for the MFA Settings - */ - Body *models.SupportMfaConfigInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update support m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportMFAConfigParams) WithDefaults() *UpdateSupportMFAConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update support m f a config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportMFAConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) WithTimeout(timeout time.Duration) *UpdateSupportMFAConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) WithContext(ctx context.Context) *UpdateSupportMFAConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) WithHTTPClient(client *http.Client) *UpdateSupportMFAConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) WithBody(body *models.SupportMfaConfigInfo) *UpdateSupportMFAConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update support m f a config params -func (o *UpdateSupportMFAConfigParams) SetBody(body *models.SupportMfaConfigInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSupportMFAConfigParams) 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/m_f_a/update_support_m_f_a_config_responses.go b/v2/client/m_f_a/update_support_m_f_a_config_responses.go deleted file mode 100644 index 035a8fbe..00000000 --- a/v2/client/m_f_a/update_support_m_f_a_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSupportMFAConfigReader is a Reader for the UpdateSupportMFAConfig structure. -type UpdateSupportMFAConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSupportMFAConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSupportMFAConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSupportMFAConfigDefault(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 - } -} - -// NewUpdateSupportMFAConfigOK creates a UpdateSupportMFAConfigOK with default headers values -func NewUpdateSupportMFAConfigOK() *UpdateSupportMFAConfigOK { - return &UpdateSupportMFAConfigOK{} -} - -/* -UpdateSupportMFAConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSupportMFAConfigOK struct { - Payload *models.UpdateMFAResult -} - -// IsSuccess returns true when this update support m f a config o k response has a 2xx status code -func (o *UpdateSupportMFAConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update support m f a config o k response has a 3xx status code -func (o *UpdateSupportMFAConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update support m f a config o k response has a 4xx status code -func (o *UpdateSupportMFAConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update support m f a config o k response has a 5xx status code -func (o *UpdateSupportMFAConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update support m f a config o k response a status code equal to that given -func (o *UpdateSupportMFAConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update support m f a config o k response -func (o *UpdateSupportMFAConfigOK) Code() int { - return 200 -} - -func (o *UpdateSupportMFAConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /support-user/mfa][%d] updateSupportMFAConfigOK %s", 200, payload) -} - -func (o *UpdateSupportMFAConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /support-user/mfa][%d] updateSupportMFAConfigOK %s", 200, payload) -} - -func (o *UpdateSupportMFAConfigOK) GetPayload() *models.UpdateMFAResult { - return o.Payload -} - -func (o *UpdateSupportMFAConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateMFAResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSupportMFAConfigDefault creates a UpdateSupportMFAConfigDefault with default headers values -func NewUpdateSupportMFAConfigDefault(code int) *UpdateSupportMFAConfigDefault { - return &UpdateSupportMFAConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateSupportMFAConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSupportMFAConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update support m f a config default response has a 2xx status code -func (o *UpdateSupportMFAConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update support m f a config default response has a 3xx status code -func (o *UpdateSupportMFAConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update support m f a config default response has a 4xx status code -func (o *UpdateSupportMFAConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update support m f a config default response has a 5xx status code -func (o *UpdateSupportMFAConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update support m f a config default response a status code equal to that given -func (o *UpdateSupportMFAConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update support m f a config default response -func (o *UpdateSupportMFAConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSupportMFAConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /support-user/mfa][%d] UpdateSupportMFAConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportMFAConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /support-user/mfa][%d] UpdateSupportMFAConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportMFAConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSupportMFAConfigDefault) 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/m_f_a/verify_support_user_totp_parameters.go b/v2/client/m_f_a/verify_support_user_totp_parameters.go deleted file mode 100644 index b3603014..00000000 --- a/v2/client/m_f_a/verify_support_user_totp_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewVerifySupportUserTotpParams creates a new VerifySupportUserTotpParams 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 NewVerifySupportUserTotpParams() *VerifySupportUserTotpParams { - return &VerifySupportUserTotpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewVerifySupportUserTotpParamsWithTimeout creates a new VerifySupportUserTotpParams object -// with the ability to set a timeout on a request. -func NewVerifySupportUserTotpParamsWithTimeout(timeout time.Duration) *VerifySupportUserTotpParams { - return &VerifySupportUserTotpParams{ - timeout: timeout, - } -} - -// NewVerifySupportUserTotpParamsWithContext creates a new VerifySupportUserTotpParams object -// with the ability to set a context for a request. -func NewVerifySupportUserTotpParamsWithContext(ctx context.Context) *VerifySupportUserTotpParams { - return &VerifySupportUserTotpParams{ - Context: ctx, - } -} - -// NewVerifySupportUserTotpParamsWithHTTPClient creates a new VerifySupportUserTotpParams object -// with the ability to set a custom HTTPClient for a request. -func NewVerifySupportUserTotpParamsWithHTTPClient(client *http.Client) *VerifySupportUserTotpParams { - return &VerifySupportUserTotpParams{ - HTTPClient: client, - } -} - -/* -VerifySupportUserTotpParams contains all the parameters to send to the API endpoint - - for the verify support user totp operation. - - Typically these are written to a http.Request. -*/ -type VerifySupportUserTotpParams struct { - - /* Body. - - Totp code to be verified. - */ - Body *models.VerifyTotpRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the verify support user totp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *VerifySupportUserTotpParams) WithDefaults() *VerifySupportUserTotpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the verify support user totp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *VerifySupportUserTotpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the verify support user totp params -func (o *VerifySupportUserTotpParams) WithTimeout(timeout time.Duration) *VerifySupportUserTotpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the verify support user totp params -func (o *VerifySupportUserTotpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the verify support user totp params -func (o *VerifySupportUserTotpParams) WithContext(ctx context.Context) *VerifySupportUserTotpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the verify support user totp params -func (o *VerifySupportUserTotpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the verify support user totp params -func (o *VerifySupportUserTotpParams) WithHTTPClient(client *http.Client) *VerifySupportUserTotpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the verify support user totp params -func (o *VerifySupportUserTotpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the verify support user totp params -func (o *VerifySupportUserTotpParams) WithBody(body *models.VerifyTotpRequest) *VerifySupportUserTotpParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the verify support user totp params -func (o *VerifySupportUserTotpParams) SetBody(body *models.VerifyTotpRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *VerifySupportUserTotpParams) 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/m_f_a/verify_support_user_totp_responses.go b/v2/client/m_f_a/verify_support_user_totp_responses.go deleted file mode 100644 index 59bbe9db..00000000 --- a/v2/client/m_f_a/verify_support_user_totp_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package m_f_a - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// VerifySupportUserTotpReader is a Reader for the VerifySupportUserTotp structure. -type VerifySupportUserTotpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *VerifySupportUserTotpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewVerifySupportUserTotpOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewVerifySupportUserTotpDefault(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 - } -} - -// NewVerifySupportUserTotpOK creates a VerifySupportUserTotpOK with default headers values -func NewVerifySupportUserTotpOK() *VerifySupportUserTotpOK { - return &VerifySupportUserTotpOK{} -} - -/* -VerifySupportUserTotpOK describes a response with status code 200, with default header values. - -Success -*/ -type VerifySupportUserTotpOK struct { - Payload *models.VerifyTotpResult -} - -// IsSuccess returns true when this verify support user totp o k response has a 2xx status code -func (o *VerifySupportUserTotpOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this verify support user totp o k response has a 3xx status code -func (o *VerifySupportUserTotpOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this verify support user totp o k response has a 4xx status code -func (o *VerifySupportUserTotpOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this verify support user totp o k response has a 5xx status code -func (o *VerifySupportUserTotpOK) IsServerError() bool { - return false -} - -// IsCode returns true when this verify support user totp o k response a status code equal to that given -func (o *VerifySupportUserTotpOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the verify support user totp o k response -func (o *VerifySupportUserTotpOK) Code() int { - return 200 -} - -func (o *VerifySupportUserTotpOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/verify-totp][%d] verifySupportUserTotpOK %s", 200, payload) -} - -func (o *VerifySupportUserTotpOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/verify-totp][%d] verifySupportUserTotpOK %s", 200, payload) -} - -func (o *VerifySupportUserTotpOK) GetPayload() *models.VerifyTotpResult { - return o.Payload -} - -func (o *VerifySupportUserTotpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VerifyTotpResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewVerifySupportUserTotpDefault creates a VerifySupportUserTotpDefault with default headers values -func NewVerifySupportUserTotpDefault(code int) *VerifySupportUserTotpDefault { - return &VerifySupportUserTotpDefault{ - _statusCode: code, - } -} - -/* -VerifySupportUserTotpDefault describes a response with status code -1, with default header values. - -Error -*/ -type VerifySupportUserTotpDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this verify support user totp default response has a 2xx status code -func (o *VerifySupportUserTotpDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this verify support user totp default response has a 3xx status code -func (o *VerifySupportUserTotpDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this verify support user totp default response has a 4xx status code -func (o *VerifySupportUserTotpDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this verify support user totp default response has a 5xx status code -func (o *VerifySupportUserTotpDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this verify support user totp default response a status code equal to that given -func (o *VerifySupportUserTotpDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the verify support user totp default response -func (o *VerifySupportUserTotpDefault) Code() int { - return o._statusCode -} - -func (o *VerifySupportUserTotpDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/verify-totp][%d] VerifySupportUserTotp default %s", o._statusCode, payload) -} - -func (o *VerifySupportUserTotpDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/verify-totp][%d] VerifySupportUserTotp default %s", o._statusCode, payload) -} - -func (o *VerifySupportUserTotpDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *VerifySupportUserTotpDefault) 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/node_group/create_node_group_parameters.go b/v2/client/node_group/create_node_group_parameters.go deleted file mode 100644 index 07c74d7a..00000000 --- a/v2/client/node_group/create_node_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateNodeGroupParams creates a new CreateNodeGroupParams 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 NewCreateNodeGroupParams() *CreateNodeGroupParams { - return &CreateNodeGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateNodeGroupParamsWithTimeout creates a new CreateNodeGroupParams object -// with the ability to set a timeout on a request. -func NewCreateNodeGroupParamsWithTimeout(timeout time.Duration) *CreateNodeGroupParams { - return &CreateNodeGroupParams{ - timeout: timeout, - } -} - -// NewCreateNodeGroupParamsWithContext creates a new CreateNodeGroupParams object -// with the ability to set a context for a request. -func NewCreateNodeGroupParamsWithContext(ctx context.Context) *CreateNodeGroupParams { - return &CreateNodeGroupParams{ - Context: ctx, - } -} - -// NewCreateNodeGroupParamsWithHTTPClient creates a new CreateNodeGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateNodeGroupParamsWithHTTPClient(client *http.Client) *CreateNodeGroupParams { - return &CreateNodeGroupParams{ - HTTPClient: client, - } -} - -/* -CreateNodeGroupParams contains all the parameters to send to the API endpoint - - for the create node group operation. - - Typically these are written to a http.Request. -*/ -type CreateNodeGroupParams struct { - - /* Body. - - Request to create a Node Group. - */ - Body *models.NodeGroupRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateNodeGroupParams) WithDefaults() *CreateNodeGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateNodeGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create node group params -func (o *CreateNodeGroupParams) WithTimeout(timeout time.Duration) *CreateNodeGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create node group params -func (o *CreateNodeGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create node group params -func (o *CreateNodeGroupParams) WithContext(ctx context.Context) *CreateNodeGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create node group params -func (o *CreateNodeGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create node group params -func (o *CreateNodeGroupParams) WithHTTPClient(client *http.Client) *CreateNodeGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create node group params -func (o *CreateNodeGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create node group params -func (o *CreateNodeGroupParams) WithBody(body *models.NodeGroupRequest) *CreateNodeGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create node group params -func (o *CreateNodeGroupParams) SetBody(body *models.NodeGroupRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateNodeGroupParams) 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/node_group/create_node_group_responses.go b/v2/client/node_group/create_node_group_responses.go deleted file mode 100644 index dbb96f6e..00000000 --- a/v2/client/node_group/create_node_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateNodeGroupReader is a Reader for the CreateNodeGroup structure. -type CreateNodeGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateNodeGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateNodeGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateNodeGroupDefault(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 - } -} - -// NewCreateNodeGroupCreated creates a CreateNodeGroupCreated with default headers values -func NewCreateNodeGroupCreated() *CreateNodeGroupCreated { - return &CreateNodeGroupCreated{} -} - -/* -CreateNodeGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateNodeGroupCreated struct { - Payload *models.NodeGroupResponse -} - -// IsSuccess returns true when this create node group created response has a 2xx status code -func (o *CreateNodeGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create node group created response has a 3xx status code -func (o *CreateNodeGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create node group created response has a 4xx status code -func (o *CreateNodeGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create node group created response has a 5xx status code -func (o *CreateNodeGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create node group created response a status code equal to that given -func (o *CreateNodeGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create node group created response -func (o *CreateNodeGroupCreated) Code() int { - return 201 -} - -func (o *CreateNodeGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-groups][%d] createNodeGroupCreated %s", 201, payload) -} - -func (o *CreateNodeGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-groups][%d] createNodeGroupCreated %s", 201, payload) -} - -func (o *CreateNodeGroupCreated) GetPayload() *models.NodeGroupResponse { - return o.Payload -} - -func (o *CreateNodeGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeGroupResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateNodeGroupDefault creates a CreateNodeGroupDefault with default headers values -func NewCreateNodeGroupDefault(code int) *CreateNodeGroupDefault { - return &CreateNodeGroupDefault{ - _statusCode: code, - } -} - -/* -CreateNodeGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateNodeGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create node group default response has a 2xx status code -func (o *CreateNodeGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create node group default response has a 3xx status code -func (o *CreateNodeGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create node group default response has a 4xx status code -func (o *CreateNodeGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create node group default response has a 5xx status code -func (o *CreateNodeGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create node group default response a status code equal to that given -func (o *CreateNodeGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create node group default response -func (o *CreateNodeGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateNodeGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-groups][%d] CreateNodeGroup default %s", o._statusCode, payload) -} - -func (o *CreateNodeGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-groups][%d] CreateNodeGroup default %s", o._statusCode, payload) -} - -func (o *CreateNodeGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateNodeGroupDefault) 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/node_group/delete_node_group_parameters.go b/v2/client/node_group/delete_node_group_parameters.go deleted file mode 100644 index 886942df..00000000 --- a/v2/client/node_group/delete_node_group_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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" -) - -// NewDeleteNodeGroupParams creates a new DeleteNodeGroupParams 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 NewDeleteNodeGroupParams() *DeleteNodeGroupParams { - return &DeleteNodeGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteNodeGroupParamsWithTimeout creates a new DeleteNodeGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteNodeGroupParamsWithTimeout(timeout time.Duration) *DeleteNodeGroupParams { - return &DeleteNodeGroupParams{ - timeout: timeout, - } -} - -// NewDeleteNodeGroupParamsWithContext creates a new DeleteNodeGroupParams object -// with the ability to set a context for a request. -func NewDeleteNodeGroupParamsWithContext(ctx context.Context) *DeleteNodeGroupParams { - return &DeleteNodeGroupParams{ - Context: ctx, - } -} - -// NewDeleteNodeGroupParamsWithHTTPClient creates a new DeleteNodeGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteNodeGroupParamsWithHTTPClient(client *http.Client) *DeleteNodeGroupParams { - return &DeleteNodeGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteNodeGroupParams contains all the parameters to send to the API endpoint - - for the delete node group operation. - - Typically these are written to a http.Request. -*/ -type DeleteNodeGroupParams struct { - - /* GroupName. - - Specifies a unique name of the Node Group to delete. - */ - GroupName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteNodeGroupParams) WithDefaults() *DeleteNodeGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteNodeGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete node group params -func (o *DeleteNodeGroupParams) WithTimeout(timeout time.Duration) *DeleteNodeGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete node group params -func (o *DeleteNodeGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete node group params -func (o *DeleteNodeGroupParams) WithContext(ctx context.Context) *DeleteNodeGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete node group params -func (o *DeleteNodeGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete node group params -func (o *DeleteNodeGroupParams) WithHTTPClient(client *http.Client) *DeleteNodeGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete node group params -func (o *DeleteNodeGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithGroupName adds the groupName to the delete node group params -func (o *DeleteNodeGroupParams) WithGroupName(groupName string) *DeleteNodeGroupParams { - o.SetGroupName(groupName) - return o -} - -// SetGroupName adds the groupName to the delete node group params -func (o *DeleteNodeGroupParams) SetGroupName(groupName string) { - o.GroupName = groupName -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteNodeGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param groupName - if err := r.SetPathParam("groupName", o.GroupName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/node_group/delete_node_group_responses.go b/v2/client/node_group/delete_node_group_responses.go deleted file mode 100644 index 65cd9040..00000000 --- a/v2/client/node_group/delete_node_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteNodeGroupReader is a Reader for the DeleteNodeGroup structure. -type DeleteNodeGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteNodeGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteNodeGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteNodeGroupDefault(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 - } -} - -// NewDeleteNodeGroupNoContent creates a DeleteNodeGroupNoContent with default headers values -func NewDeleteNodeGroupNoContent() *DeleteNodeGroupNoContent { - return &DeleteNodeGroupNoContent{} -} - -/* -DeleteNodeGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteNodeGroupNoContent struct { -} - -// IsSuccess returns true when this delete node group no content response has a 2xx status code -func (o *DeleteNodeGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete node group no content response has a 3xx status code -func (o *DeleteNodeGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete node group no content response has a 4xx status code -func (o *DeleteNodeGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete node group no content response has a 5xx status code -func (o *DeleteNodeGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete node group no content response a status code equal to that given -func (o *DeleteNodeGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete node group no content response -func (o *DeleteNodeGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteNodeGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /node-groups/{groupName}][%d] deleteNodeGroupNoContent", 204) -} - -func (o *DeleteNodeGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /node-groups/{groupName}][%d] deleteNodeGroupNoContent", 204) -} - -func (o *DeleteNodeGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteNodeGroupDefault creates a DeleteNodeGroupDefault with default headers values -func NewDeleteNodeGroupDefault(code int) *DeleteNodeGroupDefault { - return &DeleteNodeGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteNodeGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteNodeGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete node group default response has a 2xx status code -func (o *DeleteNodeGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete node group default response has a 3xx status code -func (o *DeleteNodeGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete node group default response has a 4xx status code -func (o *DeleteNodeGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete node group default response has a 5xx status code -func (o *DeleteNodeGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete node group default response a status code equal to that given -func (o *DeleteNodeGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete node group default response -func (o *DeleteNodeGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteNodeGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /node-groups/{groupName}][%d] DeleteNodeGroup default %s", o._statusCode, payload) -} - -func (o *DeleteNodeGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /node-groups/{groupName}][%d] DeleteNodeGroup default %s", o._statusCode, payload) -} - -func (o *DeleteNodeGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteNodeGroupDefault) 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/node_group/get_node_group_by_name_parameters.go b/v2/client/node_group/get_node_group_by_name_parameters.go deleted file mode 100644 index 09cd4012..00000000 --- a/v2/client/node_group/get_node_group_by_name_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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" -) - -// NewGetNodeGroupByNameParams creates a new GetNodeGroupByNameParams 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 NewGetNodeGroupByNameParams() *GetNodeGroupByNameParams { - return &GetNodeGroupByNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeGroupByNameParamsWithTimeout creates a new GetNodeGroupByNameParams object -// with the ability to set a timeout on a request. -func NewGetNodeGroupByNameParamsWithTimeout(timeout time.Duration) *GetNodeGroupByNameParams { - return &GetNodeGroupByNameParams{ - timeout: timeout, - } -} - -// NewGetNodeGroupByNameParamsWithContext creates a new GetNodeGroupByNameParams object -// with the ability to set a context for a request. -func NewGetNodeGroupByNameParamsWithContext(ctx context.Context) *GetNodeGroupByNameParams { - return &GetNodeGroupByNameParams{ - Context: ctx, - } -} - -// NewGetNodeGroupByNameParamsWithHTTPClient creates a new GetNodeGroupByNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeGroupByNameParamsWithHTTPClient(client *http.Client) *GetNodeGroupByNameParams { - return &GetNodeGroupByNameParams{ - HTTPClient: client, - } -} - -/* -GetNodeGroupByNameParams contains all the parameters to send to the API endpoint - - for the get node group by name operation. - - Typically these are written to a http.Request. -*/ -type GetNodeGroupByNameParams struct { - - /* GroupName. - - Specifies a unique id of Node Group to return. - */ - GroupName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node group by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeGroupByNameParams) WithDefaults() *GetNodeGroupByNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node group by name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeGroupByNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node group by name params -func (o *GetNodeGroupByNameParams) WithTimeout(timeout time.Duration) *GetNodeGroupByNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node group by name params -func (o *GetNodeGroupByNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node group by name params -func (o *GetNodeGroupByNameParams) WithContext(ctx context.Context) *GetNodeGroupByNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node group by name params -func (o *GetNodeGroupByNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node group by name params -func (o *GetNodeGroupByNameParams) WithHTTPClient(client *http.Client) *GetNodeGroupByNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node group by name params -func (o *GetNodeGroupByNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithGroupName adds the groupName to the get node group by name params -func (o *GetNodeGroupByNameParams) WithGroupName(groupName string) *GetNodeGroupByNameParams { - o.SetGroupName(groupName) - return o -} - -// SetGroupName adds the groupName to the get node group by name params -func (o *GetNodeGroupByNameParams) SetGroupName(groupName string) { - o.GroupName = groupName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeGroupByNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param groupName - if err := r.SetPathParam("groupName", o.GroupName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/node_group/get_node_group_by_name_responses.go b/v2/client/node_group/get_node_group_by_name_responses.go deleted file mode 100644 index fdcf62cb..00000000 --- a/v2/client/node_group/get_node_group_by_name_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetNodeGroupByNameReader is a Reader for the GetNodeGroupByName structure. -type GetNodeGroupByNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeGroupByNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeGroupByNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodeGroupByNameDefault(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 - } -} - -// NewGetNodeGroupByNameOK creates a GetNodeGroupByNameOK with default headers values -func NewGetNodeGroupByNameOK() *GetNodeGroupByNameOK { - return &GetNodeGroupByNameOK{} -} - -/* -GetNodeGroupByNameOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeGroupByNameOK struct { - Payload *models.NodeGroupResponse -} - -// IsSuccess returns true when this get node group by name o k response has a 2xx status code -func (o *GetNodeGroupByNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node group by name o k response has a 3xx status code -func (o *GetNodeGroupByNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node group by name o k response has a 4xx status code -func (o *GetNodeGroupByNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node group by name o k response has a 5xx status code -func (o *GetNodeGroupByNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node group by name o k response a status code equal to that given -func (o *GetNodeGroupByNameOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get node group by name o k response -func (o *GetNodeGroupByNameOK) Code() int { - return 200 -} - -func (o *GetNodeGroupByNameOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups/{groupName}][%d] getNodeGroupByNameOK %s", 200, payload) -} - -func (o *GetNodeGroupByNameOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups/{groupName}][%d] getNodeGroupByNameOK %s", 200, payload) -} - -func (o *GetNodeGroupByNameOK) GetPayload() *models.NodeGroupResponse { - return o.Payload -} - -func (o *GetNodeGroupByNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeGroupResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodeGroupByNameDefault creates a GetNodeGroupByNameDefault with default headers values -func NewGetNodeGroupByNameDefault(code int) *GetNodeGroupByNameDefault { - return &GetNodeGroupByNameDefault{ - _statusCode: code, - } -} - -/* -GetNodeGroupByNameDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodeGroupByNameDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get node group by name default response has a 2xx status code -func (o *GetNodeGroupByNameDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get node group by name default response has a 3xx status code -func (o *GetNodeGroupByNameDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get node group by name default response has a 4xx status code -func (o *GetNodeGroupByNameDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get node group by name default response has a 5xx status code -func (o *GetNodeGroupByNameDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get node group by name default response a status code equal to that given -func (o *GetNodeGroupByNameDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get node group by name default response -func (o *GetNodeGroupByNameDefault) Code() int { - return o._statusCode -} - -func (o *GetNodeGroupByNameDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups/{groupName}][%d] GetNodeGroupByName default %s", o._statusCode, payload) -} - -func (o *GetNodeGroupByNameDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups/{groupName}][%d] GetNodeGroupByName default %s", o._statusCode, payload) -} - -func (o *GetNodeGroupByNameDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetNodeGroupByNameDefault) 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/node_group/get_node_groups_parameters.go b/v2/client/node_group/get_node_groups_parameters.go deleted file mode 100644 index c10a99c8..00000000 --- a/v2/client/node_group/get_node_groups_parameters.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/go-openapi/swag" -) - -// NewGetNodeGroupsParams creates a new GetNodeGroupsParams 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 NewGetNodeGroupsParams() *GetNodeGroupsParams { - return &GetNodeGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeGroupsParamsWithTimeout creates a new GetNodeGroupsParams object -// with the ability to set a timeout on a request. -func NewGetNodeGroupsParamsWithTimeout(timeout time.Duration) *GetNodeGroupsParams { - return &GetNodeGroupsParams{ - timeout: timeout, - } -} - -// NewGetNodeGroupsParamsWithContext creates a new GetNodeGroupsParams object -// with the ability to set a context for a request. -func NewGetNodeGroupsParamsWithContext(ctx context.Context) *GetNodeGroupsParams { - return &GetNodeGroupsParams{ - Context: ctx, - } -} - -// NewGetNodeGroupsParamsWithHTTPClient creates a new GetNodeGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeGroupsParamsWithHTTPClient(client *http.Client) *GetNodeGroupsParams { - return &GetNodeGroupsParams{ - HTTPClient: client, - } -} - -/* -GetNodeGroupsParams contains all the parameters to send to the API endpoint - - for the get node groups operation. - - Typically these are written to a http.Request. -*/ -type GetNodeGroupsParams struct { - - /* GroupNames. - - Filter node groups by a list of node group names. - */ - GroupNames []string - - /* GroupType. - - Filter node groups by a node group type. - - Format: int32 - */ - GroupType *int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeGroupsParams) WithDefaults() *GetNodeGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node groups params -func (o *GetNodeGroupsParams) WithTimeout(timeout time.Duration) *GetNodeGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node groups params -func (o *GetNodeGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node groups params -func (o *GetNodeGroupsParams) WithContext(ctx context.Context) *GetNodeGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node groups params -func (o *GetNodeGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node groups params -func (o *GetNodeGroupsParams) WithHTTPClient(client *http.Client) *GetNodeGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node groups params -func (o *GetNodeGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithGroupNames adds the groupNames to the get node groups params -func (o *GetNodeGroupsParams) WithGroupNames(groupNames []string) *GetNodeGroupsParams { - o.SetGroupNames(groupNames) - return o -} - -// SetGroupNames adds the groupNames to the get node groups params -func (o *GetNodeGroupsParams) SetGroupNames(groupNames []string) { - o.GroupNames = groupNames -} - -// WithGroupType adds the groupType to the get node groups params -func (o *GetNodeGroupsParams) WithGroupType(groupType *int32) *GetNodeGroupsParams { - o.SetGroupType(groupType) - return o -} - -// SetGroupType adds the groupType to the get node groups params -func (o *GetNodeGroupsParams) SetGroupType(groupType *int32) { - o.GroupType = groupType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.GroupNames != nil { - - // binding items for groupNames - joinedGroupNames := o.bindParamGroupNames(reg) - - // query array param groupNames - if err := r.SetQueryParam("groupNames", joinedGroupNames...); err != nil { - return err - } - } - - if o.GroupType != nil { - - // query param groupType - var qrGroupType int32 - - if o.GroupType != nil { - qrGroupType = *o.GroupType - } - qGroupType := swag.FormatInt32(qrGroupType) - if qGroupType != "" { - - if err := r.SetQueryParam("groupType", qGroupType); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetNodeGroups binds the parameter groupNames -func (o *GetNodeGroupsParams) bindParamGroupNames(formats strfmt.Registry) []string { - groupNamesIR := o.GroupNames - - var groupNamesIC []string - for _, groupNamesIIR := range groupNamesIR { // explode []string - - groupNamesIIV := groupNamesIIR // string as string - groupNamesIC = append(groupNamesIC, groupNamesIIV) - } - - // items.CollectionFormat: "" - groupNamesIS := swag.JoinByFormat(groupNamesIC, "") - - return groupNamesIS -} diff --git a/v2/client/node_group/get_node_groups_responses.go b/v2/client/node_group/get_node_groups_responses.go deleted file mode 100644 index 11fd9a14..00000000 --- a/v2/client/node_group/get_node_groups_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetNodeGroupsReader is a Reader for the GetNodeGroups structure. -type GetNodeGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodeGroupsDefault(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 - } -} - -// NewGetNodeGroupsOK creates a GetNodeGroupsOK with default headers values -func NewGetNodeGroupsOK() *GetNodeGroupsOK { - return &GetNodeGroupsOK{} -} - -/* -GetNodeGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeGroupsOK struct { - Payload *models.NodeGroupResponse -} - -// IsSuccess returns true when this get node groups o k response has a 2xx status code -func (o *GetNodeGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node groups o k response has a 3xx status code -func (o *GetNodeGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node groups o k response has a 4xx status code -func (o *GetNodeGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node groups o k response has a 5xx status code -func (o *GetNodeGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node groups o k response a status code equal to that given -func (o *GetNodeGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get node groups o k response -func (o *GetNodeGroupsOK) Code() int { - return 200 -} - -func (o *GetNodeGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups][%d] getNodeGroupsOK %s", 200, payload) -} - -func (o *GetNodeGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups][%d] getNodeGroupsOK %s", 200, payload) -} - -func (o *GetNodeGroupsOK) GetPayload() *models.NodeGroupResponse { - return o.Payload -} - -func (o *GetNodeGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeGroupResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodeGroupsDefault creates a GetNodeGroupsDefault with default headers values -func NewGetNodeGroupsDefault(code int) *GetNodeGroupsDefault { - return &GetNodeGroupsDefault{ - _statusCode: code, - } -} - -/* -GetNodeGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodeGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get node groups default response has a 2xx status code -func (o *GetNodeGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get node groups default response has a 3xx status code -func (o *GetNodeGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get node groups default response has a 4xx status code -func (o *GetNodeGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get node groups default response has a 5xx status code -func (o *GetNodeGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get node groups default response a status code equal to that given -func (o *GetNodeGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get node groups default response -func (o *GetNodeGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetNodeGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups][%d] GetNodeGroups default %s", o._statusCode, payload) -} - -func (o *GetNodeGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /node-groups][%d] GetNodeGroups default %s", o._statusCode, payload) -} - -func (o *GetNodeGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetNodeGroupsDefault) 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/node_group/node_group_client.go b/v2/client/node_group/node_group_client.go deleted file mode 100644 index 407ef75b..00000000 --- a/v2/client/node_group/node_group_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new node group API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new node group API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new node group API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for node group API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateNodeGroup(params *CreateNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateNodeGroupCreated, error) - - DeleteNodeGroup(params *DeleteNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteNodeGroupNoContent, error) - - GetNodeGroupByName(params *GetNodeGroupByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeGroupByNameOK, error) - - GetNodeGroups(params *GetNodeGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeGroupsOK, error) - - UpdateNodeGroup(params *UpdateNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNodeGroupOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateNodeGroup creates a node group - -Create the Node Group and returns the newly created node group object. -*/ -func (a *Client) CreateNodeGroup(params *CreateNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateNodeGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateNodeGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateNodeGroup", - Method: "POST", - PathPattern: "/node-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateNodeGroupReader{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.(*CreateNodeGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateNodeGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteNodeGroup deletes a node group - -Deletes a Node Group based on given node group name. -*/ -func (a *Client) DeleteNodeGroup(params *DeleteNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteNodeGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteNodeGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteNodeGroup", - Method: "DELETE", - PathPattern: "/node-groups/{groupName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteNodeGroupReader{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.(*DeleteNodeGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteNodeGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNodeGroupByName lists node groups for a given group name - -Returns Node Group for given Group Name. -*/ -func (a *Client) GetNodeGroupByName(params *GetNodeGroupByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeGroupByNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeGroupByNameParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeGroupByName", - Method: "GET", - PathPattern: "/node-groups/{groupName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodeGroupByNameReader{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.(*GetNodeGroupByNameOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodeGroupByNameDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNodeGroups lists node groups based on provided filtering parameters - -List node groups. -*/ -func (a *Client) GetNodeGroups(params *GetNodeGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodeGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeGroups", - Method: "GET", - PathPattern: "/node-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodeGroupsReader{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.(*GetNodeGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodeGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateNodeGroup updates a node group - -Specifies the request to update the existing Node Group. On successful update, returns the updated node group object. -*/ -func (a *Client) UpdateNodeGroup(params *UpdateNodeGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateNodeGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateNodeGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateNodeGroup", - Method: "PUT", - PathPattern: "/node-groups/{groupName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateNodeGroupReader{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.(*UpdateNodeGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateNodeGroupDefault) - 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/v2/client/node_group/update_node_group_parameters.go b/v2/client/node_group/update_node_group_parameters.go deleted file mode 100644 index 8e69769b..00000000 --- a/v2/client/node_group/update_node_group_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateNodeGroupParams creates a new UpdateNodeGroupParams 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 NewUpdateNodeGroupParams() *UpdateNodeGroupParams { - return &UpdateNodeGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateNodeGroupParamsWithTimeout creates a new UpdateNodeGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateNodeGroupParamsWithTimeout(timeout time.Duration) *UpdateNodeGroupParams { - return &UpdateNodeGroupParams{ - timeout: timeout, - } -} - -// NewUpdateNodeGroupParamsWithContext creates a new UpdateNodeGroupParams object -// with the ability to set a context for a request. -func NewUpdateNodeGroupParamsWithContext(ctx context.Context) *UpdateNodeGroupParams { - return &UpdateNodeGroupParams{ - Context: ctx, - } -} - -// NewUpdateNodeGroupParamsWithHTTPClient creates a new UpdateNodeGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateNodeGroupParamsWithHTTPClient(client *http.Client) *UpdateNodeGroupParams { - return &UpdateNodeGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateNodeGroupParams contains all the parameters to send to the API endpoint - - for the update node group operation. - - Typically these are written to a http.Request. -*/ -type UpdateNodeGroupParams struct { - - /* Body. - - Request to update a Node Group. - */ - Body *models.NodeGroupRequest - - /* GroupName. - - Specifies a unique name of the Node Group to update. - */ - GroupName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNodeGroupParams) WithDefaults() *UpdateNodeGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update node group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateNodeGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update node group params -func (o *UpdateNodeGroupParams) WithTimeout(timeout time.Duration) *UpdateNodeGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update node group params -func (o *UpdateNodeGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update node group params -func (o *UpdateNodeGroupParams) WithContext(ctx context.Context) *UpdateNodeGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update node group params -func (o *UpdateNodeGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update node group params -func (o *UpdateNodeGroupParams) WithHTTPClient(client *http.Client) *UpdateNodeGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update node group params -func (o *UpdateNodeGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update node group params -func (o *UpdateNodeGroupParams) WithBody(body *models.NodeGroupRequest) *UpdateNodeGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update node group params -func (o *UpdateNodeGroupParams) SetBody(body *models.NodeGroupRequest) { - o.Body = body -} - -// WithGroupName adds the groupName to the update node group params -func (o *UpdateNodeGroupParams) WithGroupName(groupName string) *UpdateNodeGroupParams { - o.SetGroupName(groupName) - return o -} - -// SetGroupName adds the groupName to the update node group params -func (o *UpdateNodeGroupParams) SetGroupName(groupName string) { - o.GroupName = groupName -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateNodeGroupParams) 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 - } - } - - // path param groupName - if err := r.SetPathParam("groupName", o.GroupName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/node_group/update_node_group_responses.go b/v2/client/node_group/update_node_group_responses.go deleted file mode 100644 index 766e2f11..00000000 --- a/v2/client/node_group/update_node_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateNodeGroupReader is a Reader for the UpdateNodeGroup structure. -type UpdateNodeGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateNodeGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateNodeGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateNodeGroupDefault(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 - } -} - -// NewUpdateNodeGroupOK creates a UpdateNodeGroupOK with default headers values -func NewUpdateNodeGroupOK() *UpdateNodeGroupOK { - return &UpdateNodeGroupOK{} -} - -/* -UpdateNodeGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateNodeGroupOK struct { - Payload *models.NodeGroupResponse -} - -// IsSuccess returns true when this update node group o k response has a 2xx status code -func (o *UpdateNodeGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update node group o k response has a 3xx status code -func (o *UpdateNodeGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update node group o k response has a 4xx status code -func (o *UpdateNodeGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update node group o k response has a 5xx status code -func (o *UpdateNodeGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update node group o k response a status code equal to that given -func (o *UpdateNodeGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update node group o k response -func (o *UpdateNodeGroupOK) Code() int { - return 200 -} - -func (o *UpdateNodeGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /node-groups/{groupName}][%d] updateNodeGroupOK %s", 200, payload) -} - -func (o *UpdateNodeGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /node-groups/{groupName}][%d] updateNodeGroupOK %s", 200, payload) -} - -func (o *UpdateNodeGroupOK) GetPayload() *models.NodeGroupResponse { - return o.Payload -} - -func (o *UpdateNodeGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeGroupResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateNodeGroupDefault creates a UpdateNodeGroupDefault with default headers values -func NewUpdateNodeGroupDefault(code int) *UpdateNodeGroupDefault { - return &UpdateNodeGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateNodeGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateNodeGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update node group default response has a 2xx status code -func (o *UpdateNodeGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update node group default response has a 3xx status code -func (o *UpdateNodeGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update node group default response has a 4xx status code -func (o *UpdateNodeGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update node group default response has a 5xx status code -func (o *UpdateNodeGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update node group default response a status code equal to that given -func (o *UpdateNodeGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update node group default response -func (o *UpdateNodeGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateNodeGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /node-groups/{groupName}][%d] UpdateNodeGroup default %s", o._statusCode, payload) -} - -func (o *UpdateNodeGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /node-groups/{groupName}][%d] UpdateNodeGroup default %s", o._statusCode, payload) -} - -func (o *UpdateNodeGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateNodeGroupDefault) 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/object/associate_entity_metadata_parameters.go b/v2/client/object/associate_entity_metadata_parameters.go deleted file mode 100644 index d907bad0..00000000 --- a/v2/client/object/associate_entity_metadata_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAssociateEntityMetadataParams creates a new AssociateEntityMetadataParams 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 NewAssociateEntityMetadataParams() *AssociateEntityMetadataParams { - return &AssociateEntityMetadataParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAssociateEntityMetadataParamsWithTimeout creates a new AssociateEntityMetadataParams object -// with the ability to set a timeout on a request. -func NewAssociateEntityMetadataParamsWithTimeout(timeout time.Duration) *AssociateEntityMetadataParams { - return &AssociateEntityMetadataParams{ - timeout: timeout, - } -} - -// NewAssociateEntityMetadataParamsWithContext creates a new AssociateEntityMetadataParams object -// with the ability to set a context for a request. -func NewAssociateEntityMetadataParamsWithContext(ctx context.Context) *AssociateEntityMetadataParams { - return &AssociateEntityMetadataParams{ - Context: ctx, - } -} - -// NewAssociateEntityMetadataParamsWithHTTPClient creates a new AssociateEntityMetadataParams object -// with the ability to set a custom HTTPClient for a request. -func NewAssociateEntityMetadataParamsWithHTTPClient(client *http.Client) *AssociateEntityMetadataParams { - return &AssociateEntityMetadataParams{ - HTTPClient: client, - } -} - -/* -AssociateEntityMetadataParams contains all the parameters to send to the API endpoint - - for the associate entity metadata operation. - - Typically these are written to a http.Request. -*/ -type AssociateEntityMetadataParams struct { - - /* Body. - - Specifies the parameters to associate metadata with entities in the entity hierarchy. - */ - Body *models.AssociateEntityMetadataRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the associate entity metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AssociateEntityMetadataParams) WithDefaults() *AssociateEntityMetadataParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the associate entity metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AssociateEntityMetadataParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the associate entity metadata params -func (o *AssociateEntityMetadataParams) WithTimeout(timeout time.Duration) *AssociateEntityMetadataParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the associate entity metadata params -func (o *AssociateEntityMetadataParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the associate entity metadata params -func (o *AssociateEntityMetadataParams) WithContext(ctx context.Context) *AssociateEntityMetadataParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the associate entity metadata params -func (o *AssociateEntityMetadataParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the associate entity metadata params -func (o *AssociateEntityMetadataParams) WithHTTPClient(client *http.Client) *AssociateEntityMetadataParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the associate entity metadata params -func (o *AssociateEntityMetadataParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the associate entity metadata params -func (o *AssociateEntityMetadataParams) WithBody(body *models.AssociateEntityMetadataRequest) *AssociateEntityMetadataParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the associate entity metadata params -func (o *AssociateEntityMetadataParams) SetBody(body *models.AssociateEntityMetadataRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AssociateEntityMetadataParams) 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/object/associate_entity_metadata_responses.go b/v2/client/object/associate_entity_metadata_responses.go deleted file mode 100644 index 058e1d27..00000000 --- a/v2/client/object/associate_entity_metadata_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AssociateEntityMetadataReader is a Reader for the AssociateEntityMetadata structure. -type AssociateEntityMetadataReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AssociateEntityMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 207: - result := NewAssociateEntityMetadataMultiStatus() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAssociateEntityMetadataDefault(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 - } -} - -// NewAssociateEntityMetadataMultiStatus creates a AssociateEntityMetadataMultiStatus with default headers values -func NewAssociateEntityMetadataMultiStatus() *AssociateEntityMetadataMultiStatus { - return &AssociateEntityMetadataMultiStatus{} -} - -/* -AssociateEntityMetadataMultiStatus describes a response with status code 207, with default header values. - -Success -*/ -type AssociateEntityMetadataMultiStatus struct { - Payload *models.AssociateEntityMetadataResult -} - -// IsSuccess returns true when this associate entity metadata multi status response has a 2xx status code -func (o *AssociateEntityMetadataMultiStatus) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this associate entity metadata multi status response has a 3xx status code -func (o *AssociateEntityMetadataMultiStatus) IsRedirect() bool { - return false -} - -// IsClientError returns true when this associate entity metadata multi status response has a 4xx status code -func (o *AssociateEntityMetadataMultiStatus) IsClientError() bool { - return false -} - -// IsServerError returns true when this associate entity metadata multi status response has a 5xx status code -func (o *AssociateEntityMetadataMultiStatus) IsServerError() bool { - return false -} - -// IsCode returns true when this associate entity metadata multi status response a status code equal to that given -func (o *AssociateEntityMetadataMultiStatus) IsCode(code int) bool { - return code == 207 -} - -// Code gets the status code for the associate entity metadata multi status response -func (o *AssociateEntityMetadataMultiStatus) Code() int { - return 207 -} - -func (o *AssociateEntityMetadataMultiStatus) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/metadata][%d] associateEntityMetadataMultiStatus %s", 207, payload) -} - -func (o *AssociateEntityMetadataMultiStatus) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/metadata][%d] associateEntityMetadataMultiStatus %s", 207, payload) -} - -func (o *AssociateEntityMetadataMultiStatus) GetPayload() *models.AssociateEntityMetadataResult { - return o.Payload -} - -func (o *AssociateEntityMetadataMultiStatus) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AssociateEntityMetadataResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAssociateEntityMetadataDefault creates a AssociateEntityMetadataDefault with default headers values -func NewAssociateEntityMetadataDefault(code int) *AssociateEntityMetadataDefault { - return &AssociateEntityMetadataDefault{ - _statusCode: code, - } -} - -/* -AssociateEntityMetadataDefault describes a response with status code -1, with default header values. - -Error -*/ -type AssociateEntityMetadataDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this associate entity metadata default response has a 2xx status code -func (o *AssociateEntityMetadataDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this associate entity metadata default response has a 3xx status code -func (o *AssociateEntityMetadataDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this associate entity metadata default response has a 4xx status code -func (o *AssociateEntityMetadataDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this associate entity metadata default response has a 5xx status code -func (o *AssociateEntityMetadataDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this associate entity metadata default response a status code equal to that given -func (o *AssociateEntityMetadataDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the associate entity metadata default response -func (o *AssociateEntityMetadataDefault) Code() int { - return o._statusCode -} - -func (o *AssociateEntityMetadataDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/metadata][%d] AssociateEntityMetadata default %s", o._statusCode, payload) -} - -func (o *AssociateEntityMetadataDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/metadata][%d] AssociateEntityMetadata default %s", o._statusCode, payload) -} - -func (o *AssociateEntityMetadataDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AssociateEntityMetadataDefault) 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/object/browse_object_contents_parameters.go b/v2/client/object/browse_object_contents_parameters.go deleted file mode 100644 index 04733c70..00000000 --- a/v2/client/object/browse_object_contents_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewBrowseObjectContentsParams creates a new BrowseObjectContentsParams 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 NewBrowseObjectContentsParams() *BrowseObjectContentsParams { - return &BrowseObjectContentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewBrowseObjectContentsParamsWithTimeout creates a new BrowseObjectContentsParams object -// with the ability to set a timeout on a request. -func NewBrowseObjectContentsParamsWithTimeout(timeout time.Duration) *BrowseObjectContentsParams { - return &BrowseObjectContentsParams{ - timeout: timeout, - } -} - -// NewBrowseObjectContentsParamsWithContext creates a new BrowseObjectContentsParams object -// with the ability to set a context for a request. -func NewBrowseObjectContentsParamsWithContext(ctx context.Context) *BrowseObjectContentsParams { - return &BrowseObjectContentsParams{ - Context: ctx, - } -} - -// NewBrowseObjectContentsParamsWithHTTPClient creates a new BrowseObjectContentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewBrowseObjectContentsParamsWithHTTPClient(client *http.Client) *BrowseObjectContentsParams { - return &BrowseObjectContentsParams{ - HTTPClient: client, - } -} - -/* -BrowseObjectContentsParams contains all the parameters to send to the API endpoint - - for the browse object contents operation. - - Typically these are written to a http.Request. -*/ -type BrowseObjectContentsParams struct { - - /* Body. - - Specifies the parameters to fetch contents of an object. - */ - Body *models.ObjectBrowseRequest - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the browse object contents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *BrowseObjectContentsParams) WithDefaults() *BrowseObjectContentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the browse object contents params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *BrowseObjectContentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the browse object contents params -func (o *BrowseObjectContentsParams) WithTimeout(timeout time.Duration) *BrowseObjectContentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the browse object contents params -func (o *BrowseObjectContentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the browse object contents params -func (o *BrowseObjectContentsParams) WithContext(ctx context.Context) *BrowseObjectContentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the browse object contents params -func (o *BrowseObjectContentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the browse object contents params -func (o *BrowseObjectContentsParams) WithHTTPClient(client *http.Client) *BrowseObjectContentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the browse object contents params -func (o *BrowseObjectContentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the browse object contents params -func (o *BrowseObjectContentsParams) WithBody(body *models.ObjectBrowseRequest) *BrowseObjectContentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the browse object contents params -func (o *BrowseObjectContentsParams) SetBody(body *models.ObjectBrowseRequest) { - o.Body = body -} - -// WithID adds the id to the browse object contents params -func (o *BrowseObjectContentsParams) WithID(id int64) *BrowseObjectContentsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the browse object contents params -func (o *BrowseObjectContentsParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *BrowseObjectContentsParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/browse_object_contents_responses.go b/v2/client/object/browse_object_contents_responses.go deleted file mode 100644 index 979cee35..00000000 --- a/v2/client/object/browse_object_contents_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// BrowseObjectContentsReader is a Reader for the BrowseObjectContents structure. -type BrowseObjectContentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *BrowseObjectContentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewBrowseObjectContentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewBrowseObjectContentsDefault(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 - } -} - -// NewBrowseObjectContentsOK creates a BrowseObjectContentsOK with default headers values -func NewBrowseObjectContentsOK() *BrowseObjectContentsOK { - return &BrowseObjectContentsOK{} -} - -/* -BrowseObjectContentsOK describes a response with status code 200, with default header values. - -Success -*/ -type BrowseObjectContentsOK struct { - Payload *models.FileFolderInfo -} - -// IsSuccess returns true when this browse object contents o k response has a 2xx status code -func (o *BrowseObjectContentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this browse object contents o k response has a 3xx status code -func (o *BrowseObjectContentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this browse object contents o k response has a 4xx status code -func (o *BrowseObjectContentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this browse object contents o k response has a 5xx status code -func (o *BrowseObjectContentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this browse object contents o k response a status code equal to that given -func (o *BrowseObjectContentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the browse object contents o k response -func (o *BrowseObjectContentsOK) Code() int { - return 200 -} - -func (o *BrowseObjectContentsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/browse][%d] browseObjectContentsOK %s", 200, payload) -} - -func (o *BrowseObjectContentsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/browse][%d] browseObjectContentsOK %s", 200, payload) -} - -func (o *BrowseObjectContentsOK) GetPayload() *models.FileFolderInfo { - return o.Payload -} - -func (o *BrowseObjectContentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileFolderInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewBrowseObjectContentsDefault creates a BrowseObjectContentsDefault with default headers values -func NewBrowseObjectContentsDefault(code int) *BrowseObjectContentsDefault { - return &BrowseObjectContentsDefault{ - _statusCode: code, - } -} - -/* -BrowseObjectContentsDefault describes a response with status code -1, with default header values. - -Error -*/ -type BrowseObjectContentsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this browse object contents default response has a 2xx status code -func (o *BrowseObjectContentsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this browse object contents default response has a 3xx status code -func (o *BrowseObjectContentsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this browse object contents default response has a 4xx status code -func (o *BrowseObjectContentsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this browse object contents default response has a 5xx status code -func (o *BrowseObjectContentsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this browse object contents default response a status code equal to that given -func (o *BrowseObjectContentsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the browse object contents default response -func (o *BrowseObjectContentsDefault) Code() int { - return o._statusCode -} - -func (o *BrowseObjectContentsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/browse][%d] BrowseObjectContents default %s", o._statusCode, payload) -} - -func (o *BrowseObjectContentsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/browse][%d] BrowseObjectContents default %s", o._statusCode, payload) -} - -func (o *BrowseObjectContentsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *BrowseObjectContentsDefault) 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/object/cancel_object_runs_parameters.go b/v2/client/object/cancel_object_runs_parameters.go deleted file mode 100644 index ae360fee..00000000 --- a/v2/client/object/cancel_object_runs_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCancelObjectRunsParams creates a new CancelObjectRunsParams 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 NewCancelObjectRunsParams() *CancelObjectRunsParams { - return &CancelObjectRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelObjectRunsParamsWithTimeout creates a new CancelObjectRunsParams object -// with the ability to set a timeout on a request. -func NewCancelObjectRunsParamsWithTimeout(timeout time.Duration) *CancelObjectRunsParams { - return &CancelObjectRunsParams{ - timeout: timeout, - } -} - -// NewCancelObjectRunsParamsWithContext creates a new CancelObjectRunsParams object -// with the ability to set a context for a request. -func NewCancelObjectRunsParamsWithContext(ctx context.Context) *CancelObjectRunsParams { - return &CancelObjectRunsParams{ - Context: ctx, - } -} - -// NewCancelObjectRunsParamsWithHTTPClient creates a new CancelObjectRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelObjectRunsParamsWithHTTPClient(client *http.Client) *CancelObjectRunsParams { - return &CancelObjectRunsParams{ - HTTPClient: client, - } -} - -/* -CancelObjectRunsParams contains all the parameters to send to the API endpoint - - for the cancel object runs operation. - - Typically these are written to a http.Request. -*/ -type CancelObjectRunsParams struct { - - /* Body. - - Specifies the parameters to cancel object runs. - */ - Body *models.CancelObjectRunsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel object runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelObjectRunsParams) WithDefaults() *CancelObjectRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel object runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelObjectRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel object runs params -func (o *CancelObjectRunsParams) WithTimeout(timeout time.Duration) *CancelObjectRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel object runs params -func (o *CancelObjectRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel object runs params -func (o *CancelObjectRunsParams) WithContext(ctx context.Context) *CancelObjectRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel object runs params -func (o *CancelObjectRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel object runs params -func (o *CancelObjectRunsParams) WithHTTPClient(client *http.Client) *CancelObjectRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel object runs params -func (o *CancelObjectRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the cancel object runs params -func (o *CancelObjectRunsParams) WithBody(body *models.CancelObjectRunsRequest) *CancelObjectRunsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the cancel object runs params -func (o *CancelObjectRunsParams) SetBody(body *models.CancelObjectRunsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelObjectRunsParams) 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/object/cancel_object_runs_responses.go b/v2/client/object/cancel_object_runs_responses.go deleted file mode 100644 index 0c755614..00000000 --- a/v2/client/object/cancel_object_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelObjectRunsReader is a Reader for the CancelObjectRuns structure. -type CancelObjectRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelObjectRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 207: - result := NewCancelObjectRunsMultiStatus() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelObjectRunsDefault(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 - } -} - -// NewCancelObjectRunsMultiStatus creates a CancelObjectRunsMultiStatus with default headers values -func NewCancelObjectRunsMultiStatus() *CancelObjectRunsMultiStatus { - return &CancelObjectRunsMultiStatus{} -} - -/* -CancelObjectRunsMultiStatus describes a response with status code 207, with default header values. - -Success -*/ -type CancelObjectRunsMultiStatus struct { - Payload *models.CancelObjectRunsResults -} - -// IsSuccess returns true when this cancel object runs multi status response has a 2xx status code -func (o *CancelObjectRunsMultiStatus) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel object runs multi status response has a 3xx status code -func (o *CancelObjectRunsMultiStatus) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel object runs multi status response has a 4xx status code -func (o *CancelObjectRunsMultiStatus) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel object runs multi status response has a 5xx status code -func (o *CancelObjectRunsMultiStatus) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel object runs multi status response a status code equal to that given -func (o *CancelObjectRunsMultiStatus) IsCode(code int) bool { - return code == 207 -} - -// Code gets the status code for the cancel object runs multi status response -func (o *CancelObjectRunsMultiStatus) Code() int { - return 207 -} - -func (o *CancelObjectRunsMultiStatus) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/runs/cancel][%d] cancelObjectRunsMultiStatus %s", 207, payload) -} - -func (o *CancelObjectRunsMultiStatus) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/runs/cancel][%d] cancelObjectRunsMultiStatus %s", 207, payload) -} - -func (o *CancelObjectRunsMultiStatus) GetPayload() *models.CancelObjectRunsResults { - return o.Payload -} - -func (o *CancelObjectRunsMultiStatus) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CancelObjectRunsResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCancelObjectRunsDefault creates a CancelObjectRunsDefault with default headers values -func NewCancelObjectRunsDefault(code int) *CancelObjectRunsDefault { - return &CancelObjectRunsDefault{ - _statusCode: code, - } -} - -/* -CancelObjectRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelObjectRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel object runs default response has a 2xx status code -func (o *CancelObjectRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel object runs default response has a 3xx status code -func (o *CancelObjectRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel object runs default response has a 4xx status code -func (o *CancelObjectRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel object runs default response has a 5xx status code -func (o *CancelObjectRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel object runs default response a status code equal to that given -func (o *CancelObjectRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel object runs default response -func (o *CancelObjectRunsDefault) Code() int { - return o._statusCode -} - -func (o *CancelObjectRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/runs/cancel][%d] CancelObjectRuns default %s", o._statusCode, payload) -} - -func (o *CancelObjectRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/runs/cancel][%d] CancelObjectRuns default %s", o._statusCode, payload) -} - -func (o *CancelObjectRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelObjectRunsDefault) 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/object/construct_meta_info_parameters.go b/v2/client/object/construct_meta_info_parameters.go deleted file mode 100644 index 47c7e681..00000000 --- a/v2/client/object/construct_meta_info_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewConstructMetaInfoParams creates a new ConstructMetaInfoParams 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 NewConstructMetaInfoParams() *ConstructMetaInfoParams { - return &ConstructMetaInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewConstructMetaInfoParamsWithTimeout creates a new ConstructMetaInfoParams object -// with the ability to set a timeout on a request. -func NewConstructMetaInfoParamsWithTimeout(timeout time.Duration) *ConstructMetaInfoParams { - return &ConstructMetaInfoParams{ - timeout: timeout, - } -} - -// NewConstructMetaInfoParamsWithContext creates a new ConstructMetaInfoParams object -// with the ability to set a context for a request. -func NewConstructMetaInfoParamsWithContext(ctx context.Context) *ConstructMetaInfoParams { - return &ConstructMetaInfoParams{ - Context: ctx, - } -} - -// NewConstructMetaInfoParamsWithHTTPClient creates a new ConstructMetaInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewConstructMetaInfoParamsWithHTTPClient(client *http.Client) *ConstructMetaInfoParams { - return &ConstructMetaInfoParams{ - HTTPClient: client, - } -} - -/* -ConstructMetaInfoParams contains all the parameters to send to the API endpoint - - for the construct meta info operation. - - Typically these are written to a http.Request. -*/ -type ConstructMetaInfoParams struct { - - /* Body. - - Specifies the parameters to construct meta info for desired workflow. - */ - Body *models.ConstructMetaInfoRequest - - /* SnapshotID. - - Specifies the snapshot id. - */ - SnapshotID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the construct meta info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConstructMetaInfoParams) WithDefaults() *ConstructMetaInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the construct meta info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ConstructMetaInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the construct meta info params -func (o *ConstructMetaInfoParams) WithTimeout(timeout time.Duration) *ConstructMetaInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the construct meta info params -func (o *ConstructMetaInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the construct meta info params -func (o *ConstructMetaInfoParams) WithContext(ctx context.Context) *ConstructMetaInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the construct meta info params -func (o *ConstructMetaInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the construct meta info params -func (o *ConstructMetaInfoParams) WithHTTPClient(client *http.Client) *ConstructMetaInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the construct meta info params -func (o *ConstructMetaInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the construct meta info params -func (o *ConstructMetaInfoParams) WithBody(body *models.ConstructMetaInfoRequest) *ConstructMetaInfoParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the construct meta info params -func (o *ConstructMetaInfoParams) SetBody(body *models.ConstructMetaInfoRequest) { - o.Body = body -} - -// WithSnapshotID adds the snapshotID to the construct meta info params -func (o *ConstructMetaInfoParams) WithSnapshotID(snapshotID string) *ConstructMetaInfoParams { - o.SetSnapshotID(snapshotID) - return o -} - -// SetSnapshotID adds the snapshotId to the construct meta info params -func (o *ConstructMetaInfoParams) SetSnapshotID(snapshotID string) { - o.SnapshotID = snapshotID -} - -// WriteToRequest writes these params to a swagger request -func (o *ConstructMetaInfoParams) 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 - } - } - - // path param snapshotId - if err := r.SetPathParam("snapshotId", o.SnapshotID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/construct_meta_info_responses.go b/v2/client/object/construct_meta_info_responses.go deleted file mode 100644 index 21b64d0d..00000000 --- a/v2/client/object/construct_meta_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ConstructMetaInfoReader is a Reader for the ConstructMetaInfo structure. -type ConstructMetaInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ConstructMetaInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewConstructMetaInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewConstructMetaInfoDefault(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 - } -} - -// NewConstructMetaInfoOK creates a ConstructMetaInfoOK with default headers values -func NewConstructMetaInfoOK() *ConstructMetaInfoOK { - return &ConstructMetaInfoOK{} -} - -/* -ConstructMetaInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type ConstructMetaInfoOK struct { - Payload *models.ConstructMetaInfoResult -} - -// IsSuccess returns true when this construct meta info o k response has a 2xx status code -func (o *ConstructMetaInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this construct meta info o k response has a 3xx status code -func (o *ConstructMetaInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this construct meta info o k response has a 4xx status code -func (o *ConstructMetaInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this construct meta info o k response has a 5xx status code -func (o *ConstructMetaInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this construct meta info o k response a status code equal to that given -func (o *ConstructMetaInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the construct meta info o k response -func (o *ConstructMetaInfoOK) Code() int { - return 200 -} - -func (o *ConstructMetaInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/snapshots/{snapshotId}/meta-info][%d] constructMetaInfoOK %s", 200, payload) -} - -func (o *ConstructMetaInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/snapshots/{snapshotId}/meta-info][%d] constructMetaInfoOK %s", 200, payload) -} - -func (o *ConstructMetaInfoOK) GetPayload() *models.ConstructMetaInfoResult { - return o.Payload -} - -func (o *ConstructMetaInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConstructMetaInfoResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewConstructMetaInfoDefault creates a ConstructMetaInfoDefault with default headers values -func NewConstructMetaInfoDefault(code int) *ConstructMetaInfoDefault { - return &ConstructMetaInfoDefault{ - _statusCode: code, - } -} - -/* -ConstructMetaInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type ConstructMetaInfoDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this construct meta info default response has a 2xx status code -func (o *ConstructMetaInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this construct meta info default response has a 3xx status code -func (o *ConstructMetaInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this construct meta info default response has a 4xx status code -func (o *ConstructMetaInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this construct meta info default response has a 5xx status code -func (o *ConstructMetaInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this construct meta info default response a status code equal to that given -func (o *ConstructMetaInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the construct meta info default response -func (o *ConstructMetaInfoDefault) Code() int { - return o._statusCode -} - -func (o *ConstructMetaInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/snapshots/{snapshotId}/meta-info][%d] ConstructMetaInfo default %s", o._statusCode, payload) -} - -func (o *ConstructMetaInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/snapshots/{snapshotId}/meta-info][%d] ConstructMetaInfo default %s", o._statusCode, payload) -} - -func (o *ConstructMetaInfoDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ConstructMetaInfoDefault) 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/object/filter_objects_parameters.go b/v2/client/object/filter_objects_parameters.go deleted file mode 100644 index f6fdbe36..00000000 --- a/v2/client/object/filter_objects_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewFilterObjectsParams creates a new FilterObjectsParams 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 NewFilterObjectsParams() *FilterObjectsParams { - return &FilterObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewFilterObjectsParamsWithTimeout creates a new FilterObjectsParams object -// with the ability to set a timeout on a request. -func NewFilterObjectsParamsWithTimeout(timeout time.Duration) *FilterObjectsParams { - return &FilterObjectsParams{ - timeout: timeout, - } -} - -// NewFilterObjectsParamsWithContext creates a new FilterObjectsParams object -// with the ability to set a context for a request. -func NewFilterObjectsParamsWithContext(ctx context.Context) *FilterObjectsParams { - return &FilterObjectsParams{ - Context: ctx, - } -} - -// NewFilterObjectsParamsWithHTTPClient creates a new FilterObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewFilterObjectsParamsWithHTTPClient(client *http.Client) *FilterObjectsParams { - return &FilterObjectsParams{ - HTTPClient: client, - } -} - -/* -FilterObjectsParams contains all the parameters to send to the API endpoint - - for the filter objects operation. - - Typically these are written to a http.Request. -*/ -type FilterObjectsParams struct { - - /* Body. - - Specifies the parameters to filter objects. - */ - Body *models.FilterObjectsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the filter objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *FilterObjectsParams) WithDefaults() *FilterObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the filter objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *FilterObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the filter objects params -func (o *FilterObjectsParams) WithTimeout(timeout time.Duration) *FilterObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the filter objects params -func (o *FilterObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the filter objects params -func (o *FilterObjectsParams) WithContext(ctx context.Context) *FilterObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the filter objects params -func (o *FilterObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the filter objects params -func (o *FilterObjectsParams) WithHTTPClient(client *http.Client) *FilterObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the filter objects params -func (o *FilterObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the filter objects params -func (o *FilterObjectsParams) WithBody(body *models.FilterObjectsRequest) *FilterObjectsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the filter objects params -func (o *FilterObjectsParams) SetBody(body *models.FilterObjectsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *FilterObjectsParams) 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/object/filter_objects_responses.go b/v2/client/object/filter_objects_responses.go deleted file mode 100644 index 463c8961..00000000 --- a/v2/client/object/filter_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// FilterObjectsReader is a Reader for the FilterObjects structure. -type FilterObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *FilterObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewFilterObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewFilterObjectsDefault(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 - } -} - -// NewFilterObjectsOK creates a FilterObjectsOK with default headers values -func NewFilterObjectsOK() *FilterObjectsOK { - return &FilterObjectsOK{} -} - -/* -FilterObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type FilterObjectsOK struct { - Payload *models.FilteredObjectsResponseBody -} - -// IsSuccess returns true when this filter objects o k response has a 2xx status code -func (o *FilterObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this filter objects o k response has a 3xx status code -func (o *FilterObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this filter objects o k response has a 4xx status code -func (o *FilterObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this filter objects o k response has a 5xx status code -func (o *FilterObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this filter objects o k response a status code equal to that given -func (o *FilterObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the filter objects o k response -func (o *FilterObjectsOK) Code() int { - return 200 -} - -func (o *FilterObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/filter/objects][%d] filterObjectsOK %s", 200, payload) -} - -func (o *FilterObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/filter/objects][%d] filterObjectsOK %s", 200, payload) -} - -func (o *FilterObjectsOK) GetPayload() *models.FilteredObjectsResponseBody { - return o.Payload -} - -func (o *FilterObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FilteredObjectsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewFilterObjectsDefault creates a FilterObjectsDefault with default headers values -func NewFilterObjectsDefault(code int) *FilterObjectsDefault { - return &FilterObjectsDefault{ - _statusCode: code, - } -} - -/* -FilterObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type FilterObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this filter objects default response has a 2xx status code -func (o *FilterObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this filter objects default response has a 3xx status code -func (o *FilterObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this filter objects default response has a 4xx status code -func (o *FilterObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this filter objects default response has a 5xx status code -func (o *FilterObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this filter objects default response a status code equal to that given -func (o *FilterObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the filter objects default response -func (o *FilterObjectsDefault) Code() int { - return o._statusCode -} - -func (o *FilterObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/filter/objects][%d] FilterObjects default %s", o._statusCode, payload) -} - -func (o *FilterObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/filter/objects][%d] FilterObjects default %s", o._statusCode, payload) -} - -func (o *FilterObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *FilterObjectsDefault) 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/object/get_all_indexed_object_snapshots_parameters.go b/v2/client/object/get_all_indexed_object_snapshots_parameters.go deleted file mode 100644 index 2a0852fe..00000000 --- a/v2/client/object/get_all_indexed_object_snapshots_parameters.go +++ /dev/null @@ -1,445 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetAllIndexedObjectSnapshotsParams creates a new GetAllIndexedObjectSnapshotsParams 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 NewGetAllIndexedObjectSnapshotsParams() *GetAllIndexedObjectSnapshotsParams { - return &GetAllIndexedObjectSnapshotsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAllIndexedObjectSnapshotsParamsWithTimeout creates a new GetAllIndexedObjectSnapshotsParams object -// with the ability to set a timeout on a request. -func NewGetAllIndexedObjectSnapshotsParamsWithTimeout(timeout time.Duration) *GetAllIndexedObjectSnapshotsParams { - return &GetAllIndexedObjectSnapshotsParams{ - timeout: timeout, - } -} - -// NewGetAllIndexedObjectSnapshotsParamsWithContext creates a new GetAllIndexedObjectSnapshotsParams object -// with the ability to set a context for a request. -func NewGetAllIndexedObjectSnapshotsParamsWithContext(ctx context.Context) *GetAllIndexedObjectSnapshotsParams { - return &GetAllIndexedObjectSnapshotsParams{ - Context: ctx, - } -} - -// NewGetAllIndexedObjectSnapshotsParamsWithHTTPClient creates a new GetAllIndexedObjectSnapshotsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAllIndexedObjectSnapshotsParamsWithHTTPClient(client *http.Client) *GetAllIndexedObjectSnapshotsParams { - return &GetAllIndexedObjectSnapshotsParams{ - HTTPClient: client, - } -} - -/* -GetAllIndexedObjectSnapshotsParams contains all the parameters to send to the API endpoint - - for the get all indexed object snapshots operation. - - Typically these are written to a http.Request. -*/ -type GetAllIndexedObjectSnapshotsParams struct { - - /* FromTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter indexed object's snapshots which are taken after this value. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* IncludeIndexedSnapshotsOnly. - - Specifies whether to only return snapshots which are indexed. In an indexed snapshot files are guaranteed to exist, while in a non-indexed snapshot files may not exist. - */ - IncludeIndexedSnapshotsOnly *bool - - /* IndexedObjectName. - - Specifies the indexed object name. - */ - IndexedObjectName string - - /* ObjectActionKey. - - Filter by ObjectActionKey, which uniquely represents backup type for a given version. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey and ObjectId. When specified, only versions of given ObjectActionKey are returned for corresponding object id. - */ - ObjectActionKey *string - - /* ObjectID. - - Specifies the object id. - - Format: int64 - */ - ObjectID int64 - - /* ProtectionGroupID. - - Specifies the protection group id. - */ - ProtectionGroupID *string - - /* RunTypes. - - Filter by run type. Only protection run matching the specified types will be returned. By default, CDP hydration snapshots are not included, unless explicitly queried using this field. - */ - RunTypes []string - - /* ToTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter indexed object's snapshots which are taken before this value. - - Format: int64 - */ - ToTimeUsecs *int64 - - /* 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. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get all indexed object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllIndexedObjectSnapshotsParams) WithDefaults() *GetAllIndexedObjectSnapshotsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get all indexed object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllIndexedObjectSnapshotsParams) SetDefaults() { - var ( - includeIndexedSnapshotsOnlyDefault = bool(false) - ) - - val := GetAllIndexedObjectSnapshotsParams{ - IncludeIndexedSnapshotsOnly: &includeIndexedSnapshotsOnlyDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithTimeout(timeout time.Duration) *GetAllIndexedObjectSnapshotsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithContext(ctx context.Context) *GetAllIndexedObjectSnapshotsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithHTTPClient(client *http.Client) *GetAllIndexedObjectSnapshotsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithFromTimeUsecs(fromTimeUsecs *int64) *GetAllIndexedObjectSnapshotsParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithIncludeIndexedSnapshotsOnly adds the includeIndexedSnapshotsOnly to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly *bool) *GetAllIndexedObjectSnapshotsParams { - o.SetIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly) - return o -} - -// SetIncludeIndexedSnapshotsOnly adds the includeIndexedSnapshotsOnly to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly *bool) { - o.IncludeIndexedSnapshotsOnly = includeIndexedSnapshotsOnly -} - -// WithIndexedObjectName adds the indexedObjectName to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithIndexedObjectName(indexedObjectName string) *GetAllIndexedObjectSnapshotsParams { - o.SetIndexedObjectName(indexedObjectName) - return o -} - -// SetIndexedObjectName adds the indexedObjectName to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetIndexedObjectName(indexedObjectName string) { - o.IndexedObjectName = indexedObjectName -} - -// WithObjectActionKey adds the objectActionKey to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithObjectActionKey(objectActionKey *string) *GetAllIndexedObjectSnapshotsParams { - o.SetObjectActionKey(objectActionKey) - return o -} - -// SetObjectActionKey adds the objectActionKey to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetObjectActionKey(objectActionKey *string) { - o.ObjectActionKey = objectActionKey -} - -// WithObjectID adds the objectID to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithObjectID(objectID int64) *GetAllIndexedObjectSnapshotsParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetObjectID(objectID int64) { - o.ObjectID = objectID -} - -// WithProtectionGroupID adds the protectionGroupID to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithProtectionGroupID(protectionGroupID *string) *GetAllIndexedObjectSnapshotsParams { - o.SetProtectionGroupID(protectionGroupID) - return o -} - -// SetProtectionGroupID adds the protectionGroupId to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetProtectionGroupID(protectionGroupID *string) { - o.ProtectionGroupID = protectionGroupID -} - -// WithRunTypes adds the runTypes to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithRunTypes(runTypes []string) *GetAllIndexedObjectSnapshotsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithToTimeUsecs adds the toTimeUsecs to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithToTimeUsecs(toTimeUsecs *int64) *GetAllIndexedObjectSnapshotsParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WithUseCachedData adds the useCachedData to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) WithUseCachedData(useCachedData *bool) *GetAllIndexedObjectSnapshotsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get all indexed object snapshots params -func (o *GetAllIndexedObjectSnapshotsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAllIndexedObjectSnapshotsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - if o.IncludeIndexedSnapshotsOnly != nil { - - // query param includeIndexedSnapshotsOnly - var qrIncludeIndexedSnapshotsOnly bool - - if o.IncludeIndexedSnapshotsOnly != nil { - qrIncludeIndexedSnapshotsOnly = *o.IncludeIndexedSnapshotsOnly - } - qIncludeIndexedSnapshotsOnly := swag.FormatBool(qrIncludeIndexedSnapshotsOnly) - if qIncludeIndexedSnapshotsOnly != "" { - - if err := r.SetQueryParam("includeIndexedSnapshotsOnly", qIncludeIndexedSnapshotsOnly); err != nil { - return err - } - } - } - - // query param indexedObjectName - qrIndexedObjectName := o.IndexedObjectName - qIndexedObjectName := qrIndexedObjectName - if qIndexedObjectName != "" { - - if err := r.SetQueryParam("indexedObjectName", qIndexedObjectName); err != nil { - return err - } - } - - if o.ObjectActionKey != nil { - - // query param objectActionKey - var qrObjectActionKey string - - if o.ObjectActionKey != nil { - qrObjectActionKey = *o.ObjectActionKey - } - qObjectActionKey := qrObjectActionKey - if qObjectActionKey != "" { - - if err := r.SetQueryParam("objectActionKey", qObjectActionKey); err != nil { - return err - } - } - } - - // path param objectId - if err := r.SetPathParam("objectId", swag.FormatInt64(o.ObjectID)); err != nil { - return err - } - - if o.ProtectionGroupID != nil { - - // query param protectionGroupId - var qrProtectionGroupID string - - if o.ProtectionGroupID != nil { - qrProtectionGroupID = *o.ProtectionGroupID - } - qProtectionGroupID := qrProtectionGroupID - if qProtectionGroupID != "" { - - if err := r.SetQueryParam("protectionGroupId", qProtectionGroupID); err != nil { - return err - } - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if o.UseCachedData != nil { - - // query param useCachedData - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAllIndexedObjectSnapshots binds the parameter runTypes -func (o *GetAllIndexedObjectSnapshotsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} diff --git a/v2/client/object/get_all_indexed_object_snapshots_responses.go b/v2/client/object/get_all_indexed_object_snapshots_responses.go deleted file mode 100644 index 12509d37..00000000 --- a/v2/client/object/get_all_indexed_object_snapshots_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAllIndexedObjectSnapshotsReader is a Reader for the GetAllIndexedObjectSnapshots structure. -type GetAllIndexedObjectSnapshotsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAllIndexedObjectSnapshotsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAllIndexedObjectSnapshotsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAllIndexedObjectSnapshotsDefault(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 - } -} - -// NewGetAllIndexedObjectSnapshotsOK creates a GetAllIndexedObjectSnapshotsOK with default headers values -func NewGetAllIndexedObjectSnapshotsOK() *GetAllIndexedObjectSnapshotsOK { - return &GetAllIndexedObjectSnapshotsOK{} -} - -/* -GetAllIndexedObjectSnapshotsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAllIndexedObjectSnapshotsOK struct { - Payload *models.GetIndexedObjectSnapshotsResponseBody -} - -// IsSuccess returns true when this get all indexed object snapshots o k response has a 2xx status code -func (o *GetAllIndexedObjectSnapshotsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get all indexed object snapshots o k response has a 3xx status code -func (o *GetAllIndexedObjectSnapshotsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all indexed object snapshots o k response has a 4xx status code -func (o *GetAllIndexedObjectSnapshotsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all indexed object snapshots o k response has a 5xx status code -func (o *GetAllIndexedObjectSnapshotsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get all indexed object snapshots o k response a status code equal to that given -func (o *GetAllIndexedObjectSnapshotsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get all indexed object snapshots o k response -func (o *GetAllIndexedObjectSnapshotsOK) Code() int { - return 200 -} - -func (o *GetAllIndexedObjectSnapshotsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/indexed-objects/snapshots][%d] getAllIndexedObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetAllIndexedObjectSnapshotsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/indexed-objects/snapshots][%d] getAllIndexedObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetAllIndexedObjectSnapshotsOK) GetPayload() *models.GetIndexedObjectSnapshotsResponseBody { - return o.Payload -} - -func (o *GetAllIndexedObjectSnapshotsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetIndexedObjectSnapshotsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllIndexedObjectSnapshotsDefault creates a GetAllIndexedObjectSnapshotsDefault with default headers values -func NewGetAllIndexedObjectSnapshotsDefault(code int) *GetAllIndexedObjectSnapshotsDefault { - return &GetAllIndexedObjectSnapshotsDefault{ - _statusCode: code, - } -} - -/* -GetAllIndexedObjectSnapshotsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAllIndexedObjectSnapshotsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get all indexed object snapshots default response has a 2xx status code -func (o *GetAllIndexedObjectSnapshotsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get all indexed object snapshots default response has a 3xx status code -func (o *GetAllIndexedObjectSnapshotsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get all indexed object snapshots default response has a 4xx status code -func (o *GetAllIndexedObjectSnapshotsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get all indexed object snapshots default response has a 5xx status code -func (o *GetAllIndexedObjectSnapshotsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get all indexed object snapshots default response a status code equal to that given -func (o *GetAllIndexedObjectSnapshotsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get all indexed object snapshots default response -func (o *GetAllIndexedObjectSnapshotsDefault) Code() int { - return o._statusCode -} - -func (o *GetAllIndexedObjectSnapshotsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/indexed-objects/snapshots][%d] GetAllIndexedObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetAllIndexedObjectSnapshotsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/indexed-objects/snapshots][%d] GetAllIndexedObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetAllIndexedObjectSnapshotsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAllIndexedObjectSnapshotsDefault) 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/object/get_entity_metadata_parameters.go b/v2/client/object/get_entity_metadata_parameters.go deleted file mode 100644 index e920b3f1..00000000 --- a/v2/client/object/get_entity_metadata_parameters.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetEntityMetadataParams creates a new GetEntityMetadataParams 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 NewGetEntityMetadataParams() *GetEntityMetadataParams { - return &GetEntityMetadataParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEntityMetadataParamsWithTimeout creates a new GetEntityMetadataParams object -// with the ability to set a timeout on a request. -func NewGetEntityMetadataParamsWithTimeout(timeout time.Duration) *GetEntityMetadataParams { - return &GetEntityMetadataParams{ - timeout: timeout, - } -} - -// NewGetEntityMetadataParamsWithContext creates a new GetEntityMetadataParams object -// with the ability to set a context for a request. -func NewGetEntityMetadataParamsWithContext(ctx context.Context) *GetEntityMetadataParams { - return &GetEntityMetadataParams{ - Context: ctx, - } -} - -// NewGetEntityMetadataParamsWithHTTPClient creates a new GetEntityMetadataParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEntityMetadataParamsWithHTTPClient(client *http.Client) *GetEntityMetadataParams { - return &GetEntityMetadataParams{ - HTTPClient: client, - } -} - -/* -GetEntityMetadataParams contains all the parameters to send to the API endpoint - - for the get entity metadata operation. - - Typically these are written to a http.Request. -*/ -type GetEntityMetadataParams struct { - - /* EntityIds. - - EntityIds contains ids of the entities for which objects are to be returned. - */ - EntityIds []int64 - - /* SourceID. - - Specifies the source ID for which objects should be returned. - - Format: int64 - */ - SourceID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get entity metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntityMetadataParams) WithDefaults() *GetEntityMetadataParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get entity metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEntityMetadataParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get entity metadata params -func (o *GetEntityMetadataParams) WithTimeout(timeout time.Duration) *GetEntityMetadataParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get entity metadata params -func (o *GetEntityMetadataParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get entity metadata params -func (o *GetEntityMetadataParams) WithContext(ctx context.Context) *GetEntityMetadataParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get entity metadata params -func (o *GetEntityMetadataParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get entity metadata params -func (o *GetEntityMetadataParams) WithHTTPClient(client *http.Client) *GetEntityMetadataParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get entity metadata params -func (o *GetEntityMetadataParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEntityIds adds the entityIds to the get entity metadata params -func (o *GetEntityMetadataParams) WithEntityIds(entityIds []int64) *GetEntityMetadataParams { - o.SetEntityIds(entityIds) - return o -} - -// SetEntityIds adds the entityIds to the get entity metadata params -func (o *GetEntityMetadataParams) SetEntityIds(entityIds []int64) { - o.EntityIds = entityIds -} - -// WithSourceID adds the sourceID to the get entity metadata params -func (o *GetEntityMetadataParams) WithSourceID(sourceID int64) *GetEntityMetadataParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get entity metadata params -func (o *GetEntityMetadataParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEntityMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EntityIds != nil { - - // binding items for entityIds - joinedEntityIds := o.bindParamEntityIds(reg) - - // query array param entityIds - if err := r.SetQueryParam("entityIds", joinedEntityIds...); err != nil { - return err - } - } - - // path param sourceId - if err := r.SetPathParam("sourceId", swag.FormatInt64(o.SourceID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetEntityMetadata binds the parameter entityIds -func (o *GetEntityMetadataParams) bindParamEntityIds(formats strfmt.Registry) []string { - entityIdsIR := o.EntityIds - - var entityIdsIC []string - for _, entityIdsIIR := range entityIdsIR { // explode []int64 - - entityIdsIIV := swag.FormatInt64(entityIdsIIR) // int64 as string - entityIdsIC = append(entityIdsIC, entityIdsIIV) - } - - // items.CollectionFormat: "" - entityIdsIS := swag.JoinByFormat(entityIdsIC, "") - - return entityIdsIS -} diff --git a/v2/client/object/get_entity_metadata_responses.go b/v2/client/object/get_entity_metadata_responses.go deleted file mode 100644 index c56a8364..00000000 --- a/v2/client/object/get_entity_metadata_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetEntityMetadataReader is a Reader for the GetEntityMetadata structure. -type GetEntityMetadataReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEntityMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEntityMetadataOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetEntityMetadataDefault(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 - } -} - -// NewGetEntityMetadataOK creates a GetEntityMetadataOK with default headers values -func NewGetEntityMetadataOK() *GetEntityMetadataOK { - return &GetEntityMetadataOK{} -} - -/* -GetEntityMetadataOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEntityMetadataOK struct { - Payload *models.GetEntityMetadataResult -} - -// IsSuccess returns true when this get entity metadata o k response has a 2xx status code -func (o *GetEntityMetadataOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get entity metadata o k response has a 3xx status code -func (o *GetEntityMetadataOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get entity metadata o k response has a 4xx status code -func (o *GetEntityMetadataOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get entity metadata o k response has a 5xx status code -func (o *GetEntityMetadataOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get entity metadata o k response a status code equal to that given -func (o *GetEntityMetadataOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get entity metadata o k response -func (o *GetEntityMetadataOK) Code() int { - return 200 -} - -func (o *GetEntityMetadataOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{sourceId}/metadata][%d] getEntityMetadataOK %s", 200, payload) -} - -func (o *GetEntityMetadataOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{sourceId}/metadata][%d] getEntityMetadataOK %s", 200, payload) -} - -func (o *GetEntityMetadataOK) GetPayload() *models.GetEntityMetadataResult { - return o.Payload -} - -func (o *GetEntityMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetEntityMetadataResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEntityMetadataDefault creates a GetEntityMetadataDefault with default headers values -func NewGetEntityMetadataDefault(code int) *GetEntityMetadataDefault { - return &GetEntityMetadataDefault{ - _statusCode: code, - } -} - -/* -GetEntityMetadataDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetEntityMetadataDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get entity metadata default response has a 2xx status code -func (o *GetEntityMetadataDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get entity metadata default response has a 3xx status code -func (o *GetEntityMetadataDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get entity metadata default response has a 4xx status code -func (o *GetEntityMetadataDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get entity metadata default response has a 5xx status code -func (o *GetEntityMetadataDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get entity metadata default response a status code equal to that given -func (o *GetEntityMetadataDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get entity metadata default response -func (o *GetEntityMetadataDefault) Code() int { - return o._statusCode -} - -func (o *GetEntityMetadataDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{sourceId}/metadata][%d] GetEntityMetadata default %s", o._statusCode, payload) -} - -func (o *GetEntityMetadataDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{sourceId}/metadata][%d] GetEntityMetadata default %s", o._statusCode, payload) -} - -func (o *GetEntityMetadataDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetEntityMetadataDefault) 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/object/get_indexed_object_snapshots_parameters.go b/v2/client/object/get_indexed_object_snapshots_parameters.go deleted file mode 100644 index fa766d27..00000000 --- a/v2/client/object/get_indexed_object_snapshots_parameters.go +++ /dev/null @@ -1,433 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetIndexedObjectSnapshotsParams creates a new GetIndexedObjectSnapshotsParams 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 NewGetIndexedObjectSnapshotsParams() *GetIndexedObjectSnapshotsParams { - return &GetIndexedObjectSnapshotsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIndexedObjectSnapshotsParamsWithTimeout creates a new GetIndexedObjectSnapshotsParams object -// with the ability to set a timeout on a request. -func NewGetIndexedObjectSnapshotsParamsWithTimeout(timeout time.Duration) *GetIndexedObjectSnapshotsParams { - return &GetIndexedObjectSnapshotsParams{ - timeout: timeout, - } -} - -// NewGetIndexedObjectSnapshotsParamsWithContext creates a new GetIndexedObjectSnapshotsParams object -// with the ability to set a context for a request. -func NewGetIndexedObjectSnapshotsParamsWithContext(ctx context.Context) *GetIndexedObjectSnapshotsParams { - return &GetIndexedObjectSnapshotsParams{ - Context: ctx, - } -} - -// NewGetIndexedObjectSnapshotsParamsWithHTTPClient creates a new GetIndexedObjectSnapshotsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIndexedObjectSnapshotsParamsWithHTTPClient(client *http.Client) *GetIndexedObjectSnapshotsParams { - return &GetIndexedObjectSnapshotsParams{ - HTTPClient: client, - } -} - -/* -GetIndexedObjectSnapshotsParams contains all the parameters to send to the API endpoint - - for the get indexed object snapshots operation. - - Typically these are written to a http.Request. -*/ -type GetIndexedObjectSnapshotsParams struct { - - /* FromTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter indexed object's snapshots which are taken after this value. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* IncludeIndexedSnapshotsOnly. - - Specifies whether to only return snapshots which are indexed. In an indexed snapshots file are guaranteed to exist, while in a non-indexed snapshots file may not exist. - */ - IncludeIndexedSnapshotsOnly *bool - - /* IndexedObjectName. - - Specifies the indexed object name. - */ - IndexedObjectName string - - /* ObjectActionKey. - - Filter by ObjectActionKey, which uniquely represents backup type for a given version. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey and ObjectId. When specified, only versions of given ObjectActionKey are returned for corresponding object id. - */ - ObjectActionKey *string - - /* ObjectID. - - Specifies the object id. - - Format: int64 - */ - ObjectID int64 - - /* ProtectionGroupID. - - Specifies the protection group id. - */ - ProtectionGroupID string - - /* RunTypes. - - Filter by run type. Only protection run matching the specified types will be returned. By default, CDP hydration snapshots are not included, unless explicitly queried using this field. - */ - RunTypes []string - - /* ToTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter indexed object's snapshots which are taken before this value. - - Format: int64 - */ - ToTimeUsecs *int64 - - /* 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. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get indexed object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIndexedObjectSnapshotsParams) WithDefaults() *GetIndexedObjectSnapshotsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get indexed object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIndexedObjectSnapshotsParams) SetDefaults() { - var ( - includeIndexedSnapshotsOnlyDefault = bool(false) - ) - - val := GetIndexedObjectSnapshotsParams{ - IncludeIndexedSnapshotsOnly: &includeIndexedSnapshotsOnlyDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithTimeout(timeout time.Duration) *GetIndexedObjectSnapshotsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithContext(ctx context.Context) *GetIndexedObjectSnapshotsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithHTTPClient(client *http.Client) *GetIndexedObjectSnapshotsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithFromTimeUsecs(fromTimeUsecs *int64) *GetIndexedObjectSnapshotsParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithIncludeIndexedSnapshotsOnly adds the includeIndexedSnapshotsOnly to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly *bool) *GetIndexedObjectSnapshotsParams { - o.SetIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly) - return o -} - -// SetIncludeIndexedSnapshotsOnly adds the includeIndexedSnapshotsOnly to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetIncludeIndexedSnapshotsOnly(includeIndexedSnapshotsOnly *bool) { - o.IncludeIndexedSnapshotsOnly = includeIndexedSnapshotsOnly -} - -// WithIndexedObjectName adds the indexedObjectName to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithIndexedObjectName(indexedObjectName string) *GetIndexedObjectSnapshotsParams { - o.SetIndexedObjectName(indexedObjectName) - return o -} - -// SetIndexedObjectName adds the indexedObjectName to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetIndexedObjectName(indexedObjectName string) { - o.IndexedObjectName = indexedObjectName -} - -// WithObjectActionKey adds the objectActionKey to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithObjectActionKey(objectActionKey *string) *GetIndexedObjectSnapshotsParams { - o.SetObjectActionKey(objectActionKey) - return o -} - -// SetObjectActionKey adds the objectActionKey to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetObjectActionKey(objectActionKey *string) { - o.ObjectActionKey = objectActionKey -} - -// WithObjectID adds the objectID to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithObjectID(objectID int64) *GetIndexedObjectSnapshotsParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetObjectID(objectID int64) { - o.ObjectID = objectID -} - -// WithProtectionGroupID adds the protectionGroupID to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithProtectionGroupID(protectionGroupID string) *GetIndexedObjectSnapshotsParams { - o.SetProtectionGroupID(protectionGroupID) - return o -} - -// SetProtectionGroupID adds the protectionGroupId to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetProtectionGroupID(protectionGroupID string) { - o.ProtectionGroupID = protectionGroupID -} - -// WithRunTypes adds the runTypes to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithRunTypes(runTypes []string) *GetIndexedObjectSnapshotsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithToTimeUsecs adds the toTimeUsecs to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithToTimeUsecs(toTimeUsecs *int64) *GetIndexedObjectSnapshotsParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WithUseCachedData adds the useCachedData to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) WithUseCachedData(useCachedData *bool) *GetIndexedObjectSnapshotsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get indexed object snapshots params -func (o *GetIndexedObjectSnapshotsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIndexedObjectSnapshotsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - if o.IncludeIndexedSnapshotsOnly != nil { - - // query param includeIndexedSnapshotsOnly - var qrIncludeIndexedSnapshotsOnly bool - - if o.IncludeIndexedSnapshotsOnly != nil { - qrIncludeIndexedSnapshotsOnly = *o.IncludeIndexedSnapshotsOnly - } - qIncludeIndexedSnapshotsOnly := swag.FormatBool(qrIncludeIndexedSnapshotsOnly) - if qIncludeIndexedSnapshotsOnly != "" { - - if err := r.SetQueryParam("includeIndexedSnapshotsOnly", qIncludeIndexedSnapshotsOnly); err != nil { - return err - } - } - } - - // query param indexedObjectName - qrIndexedObjectName := o.IndexedObjectName - qIndexedObjectName := qrIndexedObjectName - if qIndexedObjectName != "" { - - if err := r.SetQueryParam("indexedObjectName", qIndexedObjectName); err != nil { - return err - } - } - - if o.ObjectActionKey != nil { - - // query param objectActionKey - var qrObjectActionKey string - - if o.ObjectActionKey != nil { - qrObjectActionKey = *o.ObjectActionKey - } - qObjectActionKey := qrObjectActionKey - if qObjectActionKey != "" { - - if err := r.SetQueryParam("objectActionKey", qObjectActionKey); err != nil { - return err - } - } - } - - // path param objectId - if err := r.SetPathParam("objectId", swag.FormatInt64(o.ObjectID)); err != nil { - return err - } - - // path param protectionGroupId - if err := r.SetPathParam("protectionGroupId", o.ProtectionGroupID); err != nil { - return err - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if o.UseCachedData != nil { - - // query param useCachedData - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIndexedObjectSnapshots binds the parameter runTypes -func (o *GetIndexedObjectSnapshotsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} diff --git a/v2/client/object/get_indexed_object_snapshots_responses.go b/v2/client/object/get_indexed_object_snapshots_responses.go deleted file mode 100644 index 82050979..00000000 --- a/v2/client/object/get_indexed_object_snapshots_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIndexedObjectSnapshotsReader is a Reader for the GetIndexedObjectSnapshots structure. -type GetIndexedObjectSnapshotsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIndexedObjectSnapshotsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIndexedObjectSnapshotsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIndexedObjectSnapshotsDefault(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 - } -} - -// NewGetIndexedObjectSnapshotsOK creates a GetIndexedObjectSnapshotsOK with default headers values -func NewGetIndexedObjectSnapshotsOK() *GetIndexedObjectSnapshotsOK { - return &GetIndexedObjectSnapshotsOK{} -} - -/* -GetIndexedObjectSnapshotsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIndexedObjectSnapshotsOK struct { - Payload *models.GetIndexedObjectSnapshotsResponseBody -} - -// IsSuccess returns true when this get indexed object snapshots o k response has a 2xx status code -func (o *GetIndexedObjectSnapshotsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get indexed object snapshots o k response has a 3xx status code -func (o *GetIndexedObjectSnapshotsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get indexed object snapshots o k response has a 4xx status code -func (o *GetIndexedObjectSnapshotsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get indexed object snapshots o k response has a 5xx status code -func (o *GetIndexedObjectSnapshotsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get indexed object snapshots o k response a status code equal to that given -func (o *GetIndexedObjectSnapshotsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get indexed object snapshots o k response -func (o *GetIndexedObjectSnapshotsOK) Code() int { - return 200 -} - -func (o *GetIndexedObjectSnapshotsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/protection-groups/{protectionGroupId}/indexed-objects/snapshots][%d] getIndexedObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetIndexedObjectSnapshotsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/protection-groups/{protectionGroupId}/indexed-objects/snapshots][%d] getIndexedObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetIndexedObjectSnapshotsOK) GetPayload() *models.GetIndexedObjectSnapshotsResponseBody { - return o.Payload -} - -func (o *GetIndexedObjectSnapshotsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetIndexedObjectSnapshotsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIndexedObjectSnapshotsDefault creates a GetIndexedObjectSnapshotsDefault with default headers values -func NewGetIndexedObjectSnapshotsDefault(code int) *GetIndexedObjectSnapshotsDefault { - return &GetIndexedObjectSnapshotsDefault{ - _statusCode: code, - } -} - -/* -GetIndexedObjectSnapshotsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIndexedObjectSnapshotsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get indexed object snapshots default response has a 2xx status code -func (o *GetIndexedObjectSnapshotsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get indexed object snapshots default response has a 3xx status code -func (o *GetIndexedObjectSnapshotsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get indexed object snapshots default response has a 4xx status code -func (o *GetIndexedObjectSnapshotsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get indexed object snapshots default response has a 5xx status code -func (o *GetIndexedObjectSnapshotsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get indexed object snapshots default response a status code equal to that given -func (o *GetIndexedObjectSnapshotsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get indexed object snapshots default response -func (o *GetIndexedObjectSnapshotsDefault) Code() int { - return o._statusCode -} - -func (o *GetIndexedObjectSnapshotsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/protection-groups/{protectionGroupId}/indexed-objects/snapshots][%d] GetIndexedObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetIndexedObjectSnapshotsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{objectId}/protection-groups/{protectionGroupId}/indexed-objects/snapshots][%d] GetIndexedObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetIndexedObjectSnapshotsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIndexedObjectSnapshotsDefault) 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/object/get_object_run_by_run_id_parameters.go b/v2/client/object/get_object_run_by_run_id_parameters.go deleted file mode 100644 index 1fee26cd..00000000 --- a/v2/client/object/get_object_run_by_run_id_parameters.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectRunByRunIDParams creates a new GetObjectRunByRunIDParams 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 NewGetObjectRunByRunIDParams() *GetObjectRunByRunIDParams { - return &GetObjectRunByRunIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectRunByRunIDParamsWithTimeout creates a new GetObjectRunByRunIDParams object -// with the ability to set a timeout on a request. -func NewGetObjectRunByRunIDParamsWithTimeout(timeout time.Duration) *GetObjectRunByRunIDParams { - return &GetObjectRunByRunIDParams{ - timeout: timeout, - } -} - -// NewGetObjectRunByRunIDParamsWithContext creates a new GetObjectRunByRunIDParams object -// with the ability to set a context for a request. -func NewGetObjectRunByRunIDParamsWithContext(ctx context.Context) *GetObjectRunByRunIDParams { - return &GetObjectRunByRunIDParams{ - Context: ctx, - } -} - -// NewGetObjectRunByRunIDParamsWithHTTPClient creates a new GetObjectRunByRunIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectRunByRunIDParamsWithHTTPClient(client *http.Client) *GetObjectRunByRunIDParams { - return &GetObjectRunByRunIDParams{ - HTTPClient: client, - } -} - -/* -GetObjectRunByRunIDParams contains all the parameters to send to the API endpoint - - for the get object run by run Id operation. - - Typically these are written to a http.Request. -*/ -type GetObjectRunByRunIDParams struct { - - /* ID. - - Specifies a unique id of the object. - - Format: int64 - */ - ID int64 - - /* RunID. - - Specifies the id of the run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object run by run Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectRunByRunIDParams) WithDefaults() *GetObjectRunByRunIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object run by run Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectRunByRunIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) WithTimeout(timeout time.Duration) *GetObjectRunByRunIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) WithContext(ctx context.Context) *GetObjectRunByRunIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) WithHTTPClient(client *http.Client) *GetObjectRunByRunIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) WithID(id int64) *GetObjectRunByRunIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) SetID(id int64) { - o.ID = id -} - -// WithRunID adds the runID to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) WithRunID(runID string) *GetObjectRunByRunIDParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get object run by run Id params -func (o *GetObjectRunByRunIDParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectRunByRunIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/get_object_run_by_run_id_responses.go b/v2/client/object/get_object_run_by_run_id_responses.go deleted file mode 100644 index c6b94bf7..00000000 --- a/v2/client/object/get_object_run_by_run_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectRunByRunIDReader is a Reader for the GetObjectRunByRunID structure. -type GetObjectRunByRunIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectRunByRunIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectRunByRunIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectRunByRunIDDefault(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 - } -} - -// NewGetObjectRunByRunIDOK creates a GetObjectRunByRunIDOK with default headers values -func NewGetObjectRunByRunIDOK() *GetObjectRunByRunIDOK { - return &GetObjectRunByRunIDOK{} -} - -/* -GetObjectRunByRunIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectRunByRunIDOK struct { - Payload *models.ObjectProtectionRunSummary -} - -// IsSuccess returns true when this get object run by run Id o k response has a 2xx status code -func (o *GetObjectRunByRunIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object run by run Id o k response has a 3xx status code -func (o *GetObjectRunByRunIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object run by run Id o k response has a 4xx status code -func (o *GetObjectRunByRunIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object run by run Id o k response has a 5xx status code -func (o *GetObjectRunByRunIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object run by run Id o k response a status code equal to that given -func (o *GetObjectRunByRunIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object run by run Id o k response -func (o *GetObjectRunByRunIDOK) Code() int { - return 200 -} - -func (o *GetObjectRunByRunIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs/{runId}][%d] getObjectRunByRunIdOK %s", 200, payload) -} - -func (o *GetObjectRunByRunIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs/{runId}][%d] getObjectRunByRunIdOK %s", 200, payload) -} - -func (o *GetObjectRunByRunIDOK) GetPayload() *models.ObjectProtectionRunSummary { - return o.Payload -} - -func (o *GetObjectRunByRunIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectProtectionRunSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectRunByRunIDDefault creates a GetObjectRunByRunIDDefault with default headers values -func NewGetObjectRunByRunIDDefault(code int) *GetObjectRunByRunIDDefault { - return &GetObjectRunByRunIDDefault{ - _statusCode: code, - } -} - -/* -GetObjectRunByRunIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectRunByRunIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object run by run Id default response has a 2xx status code -func (o *GetObjectRunByRunIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object run by run Id default response has a 3xx status code -func (o *GetObjectRunByRunIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object run by run Id default response has a 4xx status code -func (o *GetObjectRunByRunIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object run by run Id default response has a 5xx status code -func (o *GetObjectRunByRunIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object run by run Id default response a status code equal to that given -func (o *GetObjectRunByRunIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object run by run Id default response -func (o *GetObjectRunByRunIDDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectRunByRunIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs/{runId}][%d] GetObjectRunByRunId default %s", o._statusCode, payload) -} - -func (o *GetObjectRunByRunIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs/{runId}][%d] GetObjectRunByRunId default %s", o._statusCode, payload) -} - -func (o *GetObjectRunByRunIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectRunByRunIDDefault) 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/object/get_object_runs_parameters.go b/v2/client/object/get_object_runs_parameters.go deleted file mode 100644 index cf620f5b..00000000 --- a/v2/client/object/get_object_runs_parameters.go +++ /dev/null @@ -1,679 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectRunsParams creates a new GetObjectRunsParams 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 NewGetObjectRunsParams() *GetObjectRunsParams { - return &GetObjectRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectRunsParamsWithTimeout creates a new GetObjectRunsParams object -// with the ability to set a timeout on a request. -func NewGetObjectRunsParamsWithTimeout(timeout time.Duration) *GetObjectRunsParams { - return &GetObjectRunsParams{ - timeout: timeout, - } -} - -// NewGetObjectRunsParamsWithContext creates a new GetObjectRunsParams object -// with the ability to set a context for a request. -func NewGetObjectRunsParamsWithContext(ctx context.Context) *GetObjectRunsParams { - return &GetObjectRunsParams{ - Context: ctx, - } -} - -// NewGetObjectRunsParamsWithHTTPClient creates a new GetObjectRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectRunsParamsWithHTTPClient(client *http.Client) *GetObjectRunsParams { - return &GetObjectRunsParams{ - HTTPClient: client, - } -} - -/* -GetObjectRunsParams contains all the parameters to send to the API endpoint - - for the get object runs operation. - - Typically these are written to a http.Request. -*/ -type GetObjectRunsParams struct { - - /* ArchivalObjectStatus. - - Specifies a list of status for the object in the archival run. - */ - ArchivalObjectStatus []string - - /* CloudSpinRunStatus. - - Specifies a list of status for the object in the cloud spin run. - */ - CloudSpinRunStatus []string - - /* EndTimeUsecs. - - Filter by a end time when the run starts. Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ExcludeNonRestorableRuns. - - Specifies whether to exclude non restorable runs. Run is treated restorable only if there is at least one object snapshot (which may be either a local or an archival snapshot) which is not deleted or expired. Default value is false. - */ - ExcludeNonRestorableRuns *bool - - /* ID. - - Specifies a unique id of the object. - - Format: int64 - */ - ID int64 - - /* IncludeTenants. - - If true, the response will include Protection Group Runs which were created by all tenants which the current user has permission to see. If false, then only Protection Group Runs created by the current user will be returned. - */ - IncludeTenants *bool - - /* LocalBackupObjectStatus. - - Specifies a list of status for the object in the backup run. - */ - LocalBackupObjectStatus []string - - /* NumRuns. - - Specifies the max number of runs. If not specified, at most 100 runs will be returned. - - Format: int64 - */ - NumRuns *int64 - - /* PaginationCookie. - - Specifies the pagination cookie with which subsequent parts of the response can be fetched. Users can use this to get next runs - */ - PaginationCookie *string - - /* ReplicationObjectStatus. - - Specifies a list of status for the object in the replication run. - */ - ReplicationObjectStatus []string - - /* RunID. - - Specifies a unique id of the run. - */ - RunID *string - - /* RunTypes. - - Filter by run type. Only protection run matching the specified types will be returned. - */ - RunTypes []string - - /* StartTimeUsecs. - - Filter by a start time when the run starts. Specify the start time as a Unix epoch Timestamp (in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectRunsParams) WithDefaults() *GetObjectRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectRunsParams) SetDefaults() { - var ( - excludeNonRestorableRunsDefault = bool(false) - ) - - val := GetObjectRunsParams{ - ExcludeNonRestorableRuns: &excludeNonRestorableRunsDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get object runs params -func (o *GetObjectRunsParams) WithTimeout(timeout time.Duration) *GetObjectRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object runs params -func (o *GetObjectRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object runs params -func (o *GetObjectRunsParams) WithContext(ctx context.Context) *GetObjectRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object runs params -func (o *GetObjectRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object runs params -func (o *GetObjectRunsParams) WithHTTPClient(client *http.Client) *GetObjectRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object runs params -func (o *GetObjectRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArchivalObjectStatus adds the archivalObjectStatus to the get object runs params -func (o *GetObjectRunsParams) WithArchivalObjectStatus(archivalObjectStatus []string) *GetObjectRunsParams { - o.SetArchivalObjectStatus(archivalObjectStatus) - return o -} - -// SetArchivalObjectStatus adds the archivalObjectStatus to the get object runs params -func (o *GetObjectRunsParams) SetArchivalObjectStatus(archivalObjectStatus []string) { - o.ArchivalObjectStatus = archivalObjectStatus -} - -// WithCloudSpinRunStatus adds the cloudSpinRunStatus to the get object runs params -func (o *GetObjectRunsParams) WithCloudSpinRunStatus(cloudSpinRunStatus []string) *GetObjectRunsParams { - o.SetCloudSpinRunStatus(cloudSpinRunStatus) - return o -} - -// SetCloudSpinRunStatus adds the cloudSpinRunStatus to the get object runs params -func (o *GetObjectRunsParams) SetCloudSpinRunStatus(cloudSpinRunStatus []string) { - o.CloudSpinRunStatus = cloudSpinRunStatus -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get object runs params -func (o *GetObjectRunsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetObjectRunsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get object runs params -func (o *GetObjectRunsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithExcludeNonRestorableRuns adds the excludeNonRestorableRuns to the get object runs params -func (o *GetObjectRunsParams) WithExcludeNonRestorableRuns(excludeNonRestorableRuns *bool) *GetObjectRunsParams { - o.SetExcludeNonRestorableRuns(excludeNonRestorableRuns) - return o -} - -// SetExcludeNonRestorableRuns adds the excludeNonRestorableRuns to the get object runs params -func (o *GetObjectRunsParams) SetExcludeNonRestorableRuns(excludeNonRestorableRuns *bool) { - o.ExcludeNonRestorableRuns = excludeNonRestorableRuns -} - -// WithID adds the id to the get object runs params -func (o *GetObjectRunsParams) WithID(id int64) *GetObjectRunsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get object runs params -func (o *GetObjectRunsParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeTenants adds the includeTenants to the get object runs params -func (o *GetObjectRunsParams) WithIncludeTenants(includeTenants *bool) *GetObjectRunsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get object runs params -func (o *GetObjectRunsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithLocalBackupObjectStatus adds the localBackupObjectStatus to the get object runs params -func (o *GetObjectRunsParams) WithLocalBackupObjectStatus(localBackupObjectStatus []string) *GetObjectRunsParams { - o.SetLocalBackupObjectStatus(localBackupObjectStatus) - return o -} - -// SetLocalBackupObjectStatus adds the localBackupObjectStatus to the get object runs params -func (o *GetObjectRunsParams) SetLocalBackupObjectStatus(localBackupObjectStatus []string) { - o.LocalBackupObjectStatus = localBackupObjectStatus -} - -// WithNumRuns adds the numRuns to the get object runs params -func (o *GetObjectRunsParams) WithNumRuns(numRuns *int64) *GetObjectRunsParams { - o.SetNumRuns(numRuns) - return o -} - -// SetNumRuns adds the numRuns to the get object runs params -func (o *GetObjectRunsParams) SetNumRuns(numRuns *int64) { - o.NumRuns = numRuns -} - -// WithPaginationCookie adds the paginationCookie to the get object runs params -func (o *GetObjectRunsParams) WithPaginationCookie(paginationCookie *string) *GetObjectRunsParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get object runs params -func (o *GetObjectRunsParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithReplicationObjectStatus adds the replicationObjectStatus to the get object runs params -func (o *GetObjectRunsParams) WithReplicationObjectStatus(replicationObjectStatus []string) *GetObjectRunsParams { - o.SetReplicationObjectStatus(replicationObjectStatus) - return o -} - -// SetReplicationObjectStatus adds the replicationObjectStatus to the get object runs params -func (o *GetObjectRunsParams) SetReplicationObjectStatus(replicationObjectStatus []string) { - o.ReplicationObjectStatus = replicationObjectStatus -} - -// WithRunID adds the runID to the get object runs params -func (o *GetObjectRunsParams) WithRunID(runID *string) *GetObjectRunsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get object runs params -func (o *GetObjectRunsParams) SetRunID(runID *string) { - o.RunID = runID -} - -// WithRunTypes adds the runTypes to the get object runs params -func (o *GetObjectRunsParams) WithRunTypes(runTypes []string) *GetObjectRunsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get object runs params -func (o *GetObjectRunsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get object runs params -func (o *GetObjectRunsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetObjectRunsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get object runs params -func (o *GetObjectRunsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get object runs params -func (o *GetObjectRunsParams) WithTenantIds(tenantIds []string) *GetObjectRunsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get object runs params -func (o *GetObjectRunsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ArchivalObjectStatus != nil { - - // binding items for archivalObjectStatus - joinedArchivalObjectStatus := o.bindParamArchivalObjectStatus(reg) - - // query array param archivalObjectStatus - if err := r.SetQueryParam("archivalObjectStatus", joinedArchivalObjectStatus...); err != nil { - return err - } - } - - if o.CloudSpinRunStatus != nil { - - // binding items for cloudSpinRunStatus - joinedCloudSpinRunStatus := o.bindParamCloudSpinRunStatus(reg) - - // query array param cloudSpinRunStatus - if err := r.SetQueryParam("cloudSpinRunStatus", joinedCloudSpinRunStatus...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeNonRestorableRuns != nil { - - // query param excludeNonRestorableRuns - var qrExcludeNonRestorableRuns bool - - if o.ExcludeNonRestorableRuns != nil { - qrExcludeNonRestorableRuns = *o.ExcludeNonRestorableRuns - } - qExcludeNonRestorableRuns := swag.FormatBool(qrExcludeNonRestorableRuns) - if qExcludeNonRestorableRuns != "" { - - if err := r.SetQueryParam("excludeNonRestorableRuns", qExcludeNonRestorableRuns); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); 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.LocalBackupObjectStatus != nil { - - // binding items for localBackupObjectStatus - joinedLocalBackupObjectStatus := o.bindParamLocalBackupObjectStatus(reg) - - // query array param localBackupObjectStatus - if err := r.SetQueryParam("localBackupObjectStatus", joinedLocalBackupObjectStatus...); err != nil { - return err - } - } - - if o.NumRuns != nil { - - // query param numRuns - var qrNumRuns int64 - - if o.NumRuns != nil { - qrNumRuns = *o.NumRuns - } - qNumRuns := swag.FormatInt64(qrNumRuns) - if qNumRuns != "" { - - if err := r.SetQueryParam("numRuns", qNumRuns); err != nil { - return err - } - } - } - - 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.ReplicationObjectStatus != nil { - - // binding items for replicationObjectStatus - joinedReplicationObjectStatus := o.bindParamReplicationObjectStatus(reg) - - // query array param replicationObjectStatus - if err := r.SetQueryParam("replicationObjectStatus", joinedReplicationObjectStatus...); err != nil { - return err - } - } - - if o.RunID != nil { - - // query param runId - var qrRunID string - - if o.RunID != nil { - qrRunID = *o.RunID - } - qRunID := qrRunID - if qRunID != "" { - - if err := r.SetQueryParam("runId", qRunID); err != nil { - return err - } - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetObjectRuns binds the parameter archivalObjectStatus -func (o *GetObjectRunsParams) bindParamArchivalObjectStatus(formats strfmt.Registry) []string { - archivalObjectStatusIR := o.ArchivalObjectStatus - - var archivalObjectStatusIC []string - for _, archivalObjectStatusIIR := range archivalObjectStatusIR { // explode []string - - archivalObjectStatusIIV := archivalObjectStatusIIR // string as string - archivalObjectStatusIC = append(archivalObjectStatusIC, archivalObjectStatusIIV) - } - - // items.CollectionFormat: "" - archivalObjectStatusIS := swag.JoinByFormat(archivalObjectStatusIC, "") - - return archivalObjectStatusIS -} - -// bindParamGetObjectRuns binds the parameter cloudSpinRunStatus -func (o *GetObjectRunsParams) bindParamCloudSpinRunStatus(formats strfmt.Registry) []string { - cloudSpinRunStatusIR := o.CloudSpinRunStatus - - var cloudSpinRunStatusIC []string - for _, cloudSpinRunStatusIIR := range cloudSpinRunStatusIR { // explode []string - - cloudSpinRunStatusIIV := cloudSpinRunStatusIIR // string as string - cloudSpinRunStatusIC = append(cloudSpinRunStatusIC, cloudSpinRunStatusIIV) - } - - // items.CollectionFormat: "" - cloudSpinRunStatusIS := swag.JoinByFormat(cloudSpinRunStatusIC, "") - - return cloudSpinRunStatusIS -} - -// bindParamGetObjectRuns binds the parameter localBackupObjectStatus -func (o *GetObjectRunsParams) bindParamLocalBackupObjectStatus(formats strfmt.Registry) []string { - localBackupObjectStatusIR := o.LocalBackupObjectStatus - - var localBackupObjectStatusIC []string - for _, localBackupObjectStatusIIR := range localBackupObjectStatusIR { // explode []string - - localBackupObjectStatusIIV := localBackupObjectStatusIIR // string as string - localBackupObjectStatusIC = append(localBackupObjectStatusIC, localBackupObjectStatusIIV) - } - - // items.CollectionFormat: "" - localBackupObjectStatusIS := swag.JoinByFormat(localBackupObjectStatusIC, "") - - return localBackupObjectStatusIS -} - -// bindParamGetObjectRuns binds the parameter replicationObjectStatus -func (o *GetObjectRunsParams) bindParamReplicationObjectStatus(formats strfmt.Registry) []string { - replicationObjectStatusIR := o.ReplicationObjectStatus - - var replicationObjectStatusIC []string - for _, replicationObjectStatusIIR := range replicationObjectStatusIR { // explode []string - - replicationObjectStatusIIV := replicationObjectStatusIIR // string as string - replicationObjectStatusIC = append(replicationObjectStatusIC, replicationObjectStatusIIV) - } - - // items.CollectionFormat: "" - replicationObjectStatusIS := swag.JoinByFormat(replicationObjectStatusIC, "") - - return replicationObjectStatusIS -} - -// bindParamGetObjectRuns binds the parameter runTypes -func (o *GetObjectRunsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} - -// bindParamGetObjectRuns binds the parameter tenantIds -func (o *GetObjectRunsParams) 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/client/object/get_object_runs_responses.go b/v2/client/object/get_object_runs_responses.go deleted file mode 100644 index 9585a90d..00000000 --- a/v2/client/object/get_object_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectRunsReader is a Reader for the GetObjectRuns structure. -type GetObjectRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectRunsDefault(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 - } -} - -// NewGetObjectRunsOK creates a GetObjectRunsOK with default headers values -func NewGetObjectRunsOK() *GetObjectRunsOK { - return &GetObjectRunsOK{} -} - -/* -GetObjectRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectRunsOK struct { - Payload *models.GetObjectRunsResponseBody -} - -// IsSuccess returns true when this get object runs o k response has a 2xx status code -func (o *GetObjectRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object runs o k response has a 3xx status code -func (o *GetObjectRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object runs o k response has a 4xx status code -func (o *GetObjectRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object runs o k response has a 5xx status code -func (o *GetObjectRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object runs o k response a status code equal to that given -func (o *GetObjectRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object runs o k response -func (o *GetObjectRunsOK) Code() int { - return 200 -} - -func (o *GetObjectRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs][%d] getObjectRunsOK %s", 200, payload) -} - -func (o *GetObjectRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs][%d] getObjectRunsOK %s", 200, payload) -} - -func (o *GetObjectRunsOK) GetPayload() *models.GetObjectRunsResponseBody { - return o.Payload -} - -func (o *GetObjectRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetObjectRunsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectRunsDefault creates a GetObjectRunsDefault with default headers values -func NewGetObjectRunsDefault(code int) *GetObjectRunsDefault { - return &GetObjectRunsDefault{ - _statusCode: code, - } -} - -/* -GetObjectRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object runs default response has a 2xx status code -func (o *GetObjectRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object runs default response has a 3xx status code -func (o *GetObjectRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object runs default response has a 4xx status code -func (o *GetObjectRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object runs default response has a 5xx status code -func (o *GetObjectRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object runs default response a status code equal to that given -func (o *GetObjectRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object runs default response -func (o *GetObjectRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs][%d] GetObjectRuns default %s", o._statusCode, payload) -} - -func (o *GetObjectRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/runs][%d] GetObjectRuns default %s", o._statusCode, payload) -} - -func (o *GetObjectRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectRunsDefault) 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/object/get_object_snapshot_info_parameters.go b/v2/client/object/get_object_snapshot_info_parameters.go deleted file mode 100644 index ca60e4e3..00000000 --- a/v2/client/object/get_object_snapshot_info_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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" -) - -// NewGetObjectSnapshotInfoParams creates a new GetObjectSnapshotInfoParams 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 NewGetObjectSnapshotInfoParams() *GetObjectSnapshotInfoParams { - return &GetObjectSnapshotInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectSnapshotInfoParamsWithTimeout creates a new GetObjectSnapshotInfoParams object -// with the ability to set a timeout on a request. -func NewGetObjectSnapshotInfoParamsWithTimeout(timeout time.Duration) *GetObjectSnapshotInfoParams { - return &GetObjectSnapshotInfoParams{ - timeout: timeout, - } -} - -// NewGetObjectSnapshotInfoParamsWithContext creates a new GetObjectSnapshotInfoParams object -// with the ability to set a context for a request. -func NewGetObjectSnapshotInfoParamsWithContext(ctx context.Context) *GetObjectSnapshotInfoParams { - return &GetObjectSnapshotInfoParams{ - Context: ctx, - } -} - -// NewGetObjectSnapshotInfoParamsWithHTTPClient creates a new GetObjectSnapshotInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectSnapshotInfoParamsWithHTTPClient(client *http.Client) *GetObjectSnapshotInfoParams { - return &GetObjectSnapshotInfoParams{ - HTTPClient: client, - } -} - -/* -GetObjectSnapshotInfoParams contains all the parameters to send to the API endpoint - - for the get object snapshot info operation. - - Typically these are written to a http.Request. -*/ -type GetObjectSnapshotInfoParams struct { - - /* SnapshotID. - - Specifies the snapshot id. - */ - SnapshotID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object snapshot info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotInfoParams) WithDefaults() *GetObjectSnapshotInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object snapshot info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) WithTimeout(timeout time.Duration) *GetObjectSnapshotInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) WithContext(ctx context.Context) *GetObjectSnapshotInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) WithHTTPClient(client *http.Client) *GetObjectSnapshotInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSnapshotID adds the snapshotID to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) WithSnapshotID(snapshotID string) *GetObjectSnapshotInfoParams { - o.SetSnapshotID(snapshotID) - return o -} - -// SetSnapshotID adds the snapshotId to the get object snapshot info params -func (o *GetObjectSnapshotInfoParams) SetSnapshotID(snapshotID string) { - o.SnapshotID = snapshotID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectSnapshotInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param snapshotId - if err := r.SetPathParam("snapshotId", o.SnapshotID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/get_object_snapshot_info_responses.go b/v2/client/object/get_object_snapshot_info_responses.go deleted file mode 100644 index feef1573..00000000 --- a/v2/client/object/get_object_snapshot_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectSnapshotInfoReader is a Reader for the GetObjectSnapshotInfo structure. -type GetObjectSnapshotInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectSnapshotInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectSnapshotInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectSnapshotInfoDefault(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 - } -} - -// NewGetObjectSnapshotInfoOK creates a GetObjectSnapshotInfoOK with default headers values -func NewGetObjectSnapshotInfoOK() *GetObjectSnapshotInfoOK { - return &GetObjectSnapshotInfoOK{} -} - -/* -GetObjectSnapshotInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectSnapshotInfoOK struct { - Payload *models.ObjectSnapshot -} - -// IsSuccess returns true when this get object snapshot info o k response has a 2xx status code -func (o *GetObjectSnapshotInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object snapshot info o k response has a 3xx status code -func (o *GetObjectSnapshotInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object snapshot info o k response has a 4xx status code -func (o *GetObjectSnapshotInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object snapshot info o k response has a 5xx status code -func (o *GetObjectSnapshotInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object snapshot info o k response a status code equal to that given -func (o *GetObjectSnapshotInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object snapshot info o k response -func (o *GetObjectSnapshotInfoOK) Code() int { - return 200 -} - -func (o *GetObjectSnapshotInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}][%d] getObjectSnapshotInfoOK %s", 200, payload) -} - -func (o *GetObjectSnapshotInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}][%d] getObjectSnapshotInfoOK %s", 200, payload) -} - -func (o *GetObjectSnapshotInfoOK) GetPayload() *models.ObjectSnapshot { - return o.Payload -} - -func (o *GetObjectSnapshotInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectSnapshot) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectSnapshotInfoDefault creates a GetObjectSnapshotInfoDefault with default headers values -func NewGetObjectSnapshotInfoDefault(code int) *GetObjectSnapshotInfoDefault { - return &GetObjectSnapshotInfoDefault{ - _statusCode: code, - } -} - -/* -GetObjectSnapshotInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectSnapshotInfoDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object snapshot info default response has a 2xx status code -func (o *GetObjectSnapshotInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object snapshot info default response has a 3xx status code -func (o *GetObjectSnapshotInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object snapshot info default response has a 4xx status code -func (o *GetObjectSnapshotInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object snapshot info default response has a 5xx status code -func (o *GetObjectSnapshotInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object snapshot info default response a status code equal to that given -func (o *GetObjectSnapshotInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object snapshot info default response -func (o *GetObjectSnapshotInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectSnapshotInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}][%d] GetObjectSnapshotInfo default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}][%d] GetObjectSnapshotInfo default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotInfoDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectSnapshotInfoDefault) 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/object/get_object_snapshot_volume_info_parameters.go b/v2/client/object/get_object_snapshot_volume_info_parameters.go deleted file mode 100644 index 01769aa7..00000000 --- a/v2/client/object/get_object_snapshot_volume_info_parameters.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectSnapshotVolumeInfoParams creates a new GetObjectSnapshotVolumeInfoParams 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 NewGetObjectSnapshotVolumeInfoParams() *GetObjectSnapshotVolumeInfoParams { - return &GetObjectSnapshotVolumeInfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectSnapshotVolumeInfoParamsWithTimeout creates a new GetObjectSnapshotVolumeInfoParams object -// with the ability to set a timeout on a request. -func NewGetObjectSnapshotVolumeInfoParamsWithTimeout(timeout time.Duration) *GetObjectSnapshotVolumeInfoParams { - return &GetObjectSnapshotVolumeInfoParams{ - timeout: timeout, - } -} - -// NewGetObjectSnapshotVolumeInfoParamsWithContext creates a new GetObjectSnapshotVolumeInfoParams object -// with the ability to set a context for a request. -func NewGetObjectSnapshotVolumeInfoParamsWithContext(ctx context.Context) *GetObjectSnapshotVolumeInfoParams { - return &GetObjectSnapshotVolumeInfoParams{ - Context: ctx, - } -} - -// NewGetObjectSnapshotVolumeInfoParamsWithHTTPClient creates a new GetObjectSnapshotVolumeInfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectSnapshotVolumeInfoParamsWithHTTPClient(client *http.Client) *GetObjectSnapshotVolumeInfoParams { - return &GetObjectSnapshotVolumeInfoParams{ - HTTPClient: client, - } -} - -/* -GetObjectSnapshotVolumeInfoParams contains all the parameters to send to the API endpoint - - for the get object snapshot volume info operation. - - Typically these are written to a http.Request. -*/ -type GetObjectSnapshotVolumeInfoParams struct { - - /* IncludeSupportedOnly. - - Specifies whether to only return supported volumes. - */ - IncludeSupportedOnly *bool - - /* PointInTimeUsecs. - - Specifies the point-in-time timestamp (in usecs from epoch) between snapshots for which the volume info is to be returned. - - Format: int64 - */ - PointInTimeUsecs *int64 - - /* SnapshotID. - - Specifies the snapshot id. - */ - SnapshotID 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. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object snapshot volume info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotVolumeInfoParams) WithDefaults() *GetObjectSnapshotVolumeInfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object snapshot volume info params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotVolumeInfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithTimeout(timeout time.Duration) *GetObjectSnapshotVolumeInfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithContext(ctx context.Context) *GetObjectSnapshotVolumeInfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithHTTPClient(client *http.Client) *GetObjectSnapshotVolumeInfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeSupportedOnly adds the includeSupportedOnly to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithIncludeSupportedOnly(includeSupportedOnly *bool) *GetObjectSnapshotVolumeInfoParams { - o.SetIncludeSupportedOnly(includeSupportedOnly) - return o -} - -// SetIncludeSupportedOnly adds the includeSupportedOnly to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetIncludeSupportedOnly(includeSupportedOnly *bool) { - o.IncludeSupportedOnly = includeSupportedOnly -} - -// WithPointInTimeUsecs adds the pointInTimeUsecs to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithPointInTimeUsecs(pointInTimeUsecs *int64) *GetObjectSnapshotVolumeInfoParams { - o.SetPointInTimeUsecs(pointInTimeUsecs) - return o -} - -// SetPointInTimeUsecs adds the pointInTimeUsecs to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetPointInTimeUsecs(pointInTimeUsecs *int64) { - o.PointInTimeUsecs = pointInTimeUsecs -} - -// WithSnapshotID adds the snapshotID to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithSnapshotID(snapshotID string) *GetObjectSnapshotVolumeInfoParams { - o.SetSnapshotID(snapshotID) - return o -} - -// SetSnapshotID adds the snapshotId to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetSnapshotID(snapshotID string) { - o.SnapshotID = snapshotID -} - -// WithUseCachedData adds the useCachedData to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) WithUseCachedData(useCachedData *bool) *GetObjectSnapshotVolumeInfoParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get object snapshot volume info params -func (o *GetObjectSnapshotVolumeInfoParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectSnapshotVolumeInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IncludeSupportedOnly != nil { - - // query param includeSupportedOnly - var qrIncludeSupportedOnly bool - - if o.IncludeSupportedOnly != nil { - qrIncludeSupportedOnly = *o.IncludeSupportedOnly - } - qIncludeSupportedOnly := swag.FormatBool(qrIncludeSupportedOnly) - if qIncludeSupportedOnly != "" { - - if err := r.SetQueryParam("includeSupportedOnly", qIncludeSupportedOnly); err != nil { - return err - } - } - } - - if o.PointInTimeUsecs != nil { - - // query param pointInTimeUsecs - var qrPointInTimeUsecs int64 - - if o.PointInTimeUsecs != nil { - qrPointInTimeUsecs = *o.PointInTimeUsecs - } - qPointInTimeUsecs := swag.FormatInt64(qrPointInTimeUsecs) - if qPointInTimeUsecs != "" { - - if err := r.SetQueryParam("pointInTimeUsecs", qPointInTimeUsecs); err != nil { - return err - } - } - } - - // path param snapshotId - if err := r.SetPathParam("snapshotId", o.SnapshotID); err != nil { - return err - } - - if o.UseCachedData != nil { - - // query param useCachedData - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/get_object_snapshot_volume_info_responses.go b/v2/client/object/get_object_snapshot_volume_info_responses.go deleted file mode 100644 index f2a3a925..00000000 --- a/v2/client/object/get_object_snapshot_volume_info_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectSnapshotVolumeInfoReader is a Reader for the GetObjectSnapshotVolumeInfo structure. -type GetObjectSnapshotVolumeInfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectSnapshotVolumeInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectSnapshotVolumeInfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectSnapshotVolumeInfoDefault(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 - } -} - -// NewGetObjectSnapshotVolumeInfoOK creates a GetObjectSnapshotVolumeInfoOK with default headers values -func NewGetObjectSnapshotVolumeInfoOK() *GetObjectSnapshotVolumeInfoOK { - return &GetObjectSnapshotVolumeInfoOK{} -} - -/* -GetObjectSnapshotVolumeInfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectSnapshotVolumeInfoOK struct { - Payload *models.ObjectSnapshotVolumeInfo -} - -// IsSuccess returns true when this get object snapshot volume info o k response has a 2xx status code -func (o *GetObjectSnapshotVolumeInfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object snapshot volume info o k response has a 3xx status code -func (o *GetObjectSnapshotVolumeInfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object snapshot volume info o k response has a 4xx status code -func (o *GetObjectSnapshotVolumeInfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object snapshot volume info o k response has a 5xx status code -func (o *GetObjectSnapshotVolumeInfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object snapshot volume info o k response a status code equal to that given -func (o *GetObjectSnapshotVolumeInfoOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object snapshot volume info o k response -func (o *GetObjectSnapshotVolumeInfoOK) Code() int { - return 200 -} - -func (o *GetObjectSnapshotVolumeInfoOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}/volume][%d] getObjectSnapshotVolumeInfoOK %s", 200, payload) -} - -func (o *GetObjectSnapshotVolumeInfoOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}/volume][%d] getObjectSnapshotVolumeInfoOK %s", 200, payload) -} - -func (o *GetObjectSnapshotVolumeInfoOK) GetPayload() *models.ObjectSnapshotVolumeInfo { - return o.Payload -} - -func (o *GetObjectSnapshotVolumeInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectSnapshotVolumeInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectSnapshotVolumeInfoDefault creates a GetObjectSnapshotVolumeInfoDefault with default headers values -func NewGetObjectSnapshotVolumeInfoDefault(code int) *GetObjectSnapshotVolumeInfoDefault { - return &GetObjectSnapshotVolumeInfoDefault{ - _statusCode: code, - } -} - -/* -GetObjectSnapshotVolumeInfoDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectSnapshotVolumeInfoDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object snapshot volume info default response has a 2xx status code -func (o *GetObjectSnapshotVolumeInfoDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object snapshot volume info default response has a 3xx status code -func (o *GetObjectSnapshotVolumeInfoDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object snapshot volume info default response has a 4xx status code -func (o *GetObjectSnapshotVolumeInfoDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object snapshot volume info default response has a 5xx status code -func (o *GetObjectSnapshotVolumeInfoDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object snapshot volume info default response a status code equal to that given -func (o *GetObjectSnapshotVolumeInfoDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object snapshot volume info default response -func (o *GetObjectSnapshotVolumeInfoDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectSnapshotVolumeInfoDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}/volume][%d] GetObjectSnapshotVolumeInfo default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotVolumeInfoDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotId}/volume][%d] GetObjectSnapshotVolumeInfo default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotVolumeInfoDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectSnapshotVolumeInfoDefault) 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/object/get_object_snapshots_parameters.go b/v2/client/object/get_object_snapshots_parameters.go deleted file mode 100644 index 232da30b..00000000 --- a/v2/client/object/get_object_snapshots_parameters.go +++ /dev/null @@ -1,568 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectSnapshotsParams creates a new GetObjectSnapshotsParams 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 NewGetObjectSnapshotsParams() *GetObjectSnapshotsParams { - return &GetObjectSnapshotsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectSnapshotsParamsWithTimeout creates a new GetObjectSnapshotsParams object -// with the ability to set a timeout on a request. -func NewGetObjectSnapshotsParamsWithTimeout(timeout time.Duration) *GetObjectSnapshotsParams { - return &GetObjectSnapshotsParams{ - timeout: timeout, - } -} - -// NewGetObjectSnapshotsParamsWithContext creates a new GetObjectSnapshotsParams object -// with the ability to set a context for a request. -func NewGetObjectSnapshotsParamsWithContext(ctx context.Context) *GetObjectSnapshotsParams { - return &GetObjectSnapshotsParams{ - Context: ctx, - } -} - -// NewGetObjectSnapshotsParamsWithHTTPClient creates a new GetObjectSnapshotsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectSnapshotsParamsWithHTTPClient(client *http.Client) *GetObjectSnapshotsParams { - return &GetObjectSnapshotsParams{ - HTTPClient: client, - } -} - -/* -GetObjectSnapshotsParams contains all the parameters to send to the API endpoint - - for the get object snapshots operation. - - Typically these are written to a http.Request. -*/ -type GetObjectSnapshotsParams struct { - - /* FromTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter Object's snapshots which were taken after this value. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - /* ObjectActionKeys. - - Filter by ObjectActionKey, which uniquely represents protection of an object. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey. When specified, only snapshots matching given action keys are returned for corresponding object. - */ - ObjectActionKeys []string - - /* ProtectionGroupIds. - - If specified, this returns only the snapshots of the specified object ID, which belong to the provided protection group IDs. - */ - ProtectionGroupIds []string - - /* RegionIds. - - Filter by a list of region ids. - */ - RegionIds []string - - /* RunInstanceIds. - - Filter by a list run instance ids. If specified, only snapshots created by these protection runs will be returned. - */ - RunInstanceIds []int64 - - /* RunStartFromTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter Object's snapshots which were run after this value. - - Format: int64 - */ - RunStartFromTimeUsecs *int64 - - /* RunStartToTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter Object's snapshots which were run before this value. - - Format: int64 - */ - RunStartToTimeUsecs *int64 - - /* RunTypes. - - Filter by run type. Only protection run matching the specified types will be returned. By default, CDP hydration snapshots are not included, unless explicitly queried using this field. - */ - RunTypes []string - - /* SnapshotActions. - - Specifies a list of recovery actions. Only snapshots that applies to these actions will be returned. - */ - SnapshotActions []string - - /* ToTimeUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter Object's snapshots which were taken before this value. - - Format: int64 - */ - ToTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotsParams) WithDefaults() *GetObjectSnapshotsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object snapshots params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectSnapshotsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithTimeout(timeout time.Duration) *GetObjectSnapshotsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithContext(ctx context.Context) *GetObjectSnapshotsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithHTTPClient(client *http.Client) *GetObjectSnapshotsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithFromTimeUsecs(fromTimeUsecs *int64) *GetObjectSnapshotsParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithID adds the id to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithID(id int64) *GetObjectSnapshotsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetID(id int64) { - o.ID = id -} - -// WithObjectActionKeys adds the objectActionKeys to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithObjectActionKeys(objectActionKeys []string) *GetObjectSnapshotsParams { - o.SetObjectActionKeys(objectActionKeys) - return o -} - -// SetObjectActionKeys adds the objectActionKeys to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetObjectActionKeys(objectActionKeys []string) { - o.ObjectActionKeys = objectActionKeys -} - -// WithProtectionGroupIds adds the protectionGroupIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithProtectionGroupIds(protectionGroupIds []string) *GetObjectSnapshotsParams { - o.SetProtectionGroupIds(protectionGroupIds) - return o -} - -// SetProtectionGroupIds adds the protectionGroupIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetProtectionGroupIds(protectionGroupIds []string) { - o.ProtectionGroupIds = protectionGroupIds -} - -// WithRegionIds adds the regionIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithRegionIds(regionIds []string) *GetObjectSnapshotsParams { - o.SetRegionIds(regionIds) - return o -} - -// SetRegionIds adds the regionIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetRegionIds(regionIds []string) { - o.RegionIds = regionIds -} - -// WithRunInstanceIds adds the runInstanceIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithRunInstanceIds(runInstanceIds []int64) *GetObjectSnapshotsParams { - o.SetRunInstanceIds(runInstanceIds) - return o -} - -// SetRunInstanceIds adds the runInstanceIds to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetRunInstanceIds(runInstanceIds []int64) { - o.RunInstanceIds = runInstanceIds -} - -// WithRunStartFromTimeUsecs adds the runStartFromTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithRunStartFromTimeUsecs(runStartFromTimeUsecs *int64) *GetObjectSnapshotsParams { - o.SetRunStartFromTimeUsecs(runStartFromTimeUsecs) - return o -} - -// SetRunStartFromTimeUsecs adds the runStartFromTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetRunStartFromTimeUsecs(runStartFromTimeUsecs *int64) { - o.RunStartFromTimeUsecs = runStartFromTimeUsecs -} - -// WithRunStartToTimeUsecs adds the runStartToTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithRunStartToTimeUsecs(runStartToTimeUsecs *int64) *GetObjectSnapshotsParams { - o.SetRunStartToTimeUsecs(runStartToTimeUsecs) - return o -} - -// SetRunStartToTimeUsecs adds the runStartToTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetRunStartToTimeUsecs(runStartToTimeUsecs *int64) { - o.RunStartToTimeUsecs = runStartToTimeUsecs -} - -// WithRunTypes adds the runTypes to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithRunTypes(runTypes []string) *GetObjectSnapshotsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithSnapshotActions adds the snapshotActions to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithSnapshotActions(snapshotActions []string) *GetObjectSnapshotsParams { - o.SetSnapshotActions(snapshotActions) - return o -} - -// SetSnapshotActions adds the snapshotActions to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetSnapshotActions(snapshotActions []string) { - o.SnapshotActions = snapshotActions -} - -// WithToTimeUsecs adds the toTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) WithToTimeUsecs(toTimeUsecs *int64) *GetObjectSnapshotsParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the get object snapshots params -func (o *GetObjectSnapshotsParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectSnapshotsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.ObjectActionKeys != nil { - - // binding items for objectActionKeys - joinedObjectActionKeys := o.bindParamObjectActionKeys(reg) - - // query array param objectActionKeys - if err := r.SetQueryParam("objectActionKeys", joinedObjectActionKeys...); err != nil { - return err - } - } - - if o.ProtectionGroupIds != nil { - - // binding items for protectionGroupIds - joinedProtectionGroupIds := o.bindParamProtectionGroupIds(reg) - - // query array param protectionGroupIds - if err := r.SetQueryParam("protectionGroupIds", joinedProtectionGroupIds...); err != nil { - return err - } - } - - if o.RegionIds != nil { - - // binding items for regionIds - joinedRegionIds := o.bindParamRegionIds(reg) - - // query array param regionIds - if err := r.SetQueryParam("regionIds", joinedRegionIds...); err != nil { - return err - } - } - - if o.RunInstanceIds != nil { - - // binding items for runInstanceIds - joinedRunInstanceIds := o.bindParamRunInstanceIds(reg) - - // query array param runInstanceIds - if err := r.SetQueryParam("runInstanceIds", joinedRunInstanceIds...); err != nil { - return err - } - } - - if o.RunStartFromTimeUsecs != nil { - - // query param runStartFromTimeUsecs - var qrRunStartFromTimeUsecs int64 - - if o.RunStartFromTimeUsecs != nil { - qrRunStartFromTimeUsecs = *o.RunStartFromTimeUsecs - } - qRunStartFromTimeUsecs := swag.FormatInt64(qrRunStartFromTimeUsecs) - if qRunStartFromTimeUsecs != "" { - - if err := r.SetQueryParam("runStartFromTimeUsecs", qRunStartFromTimeUsecs); err != nil { - return err - } - } - } - - if o.RunStartToTimeUsecs != nil { - - // query param runStartToTimeUsecs - var qrRunStartToTimeUsecs int64 - - if o.RunStartToTimeUsecs != nil { - qrRunStartToTimeUsecs = *o.RunStartToTimeUsecs - } - qRunStartToTimeUsecs := swag.FormatInt64(qrRunStartToTimeUsecs) - if qRunStartToTimeUsecs != "" { - - if err := r.SetQueryParam("runStartToTimeUsecs", qRunStartToTimeUsecs); err != nil { - return err - } - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.SnapshotActions != nil { - - // binding items for snapshotActions - joinedSnapshotActions := o.bindParamSnapshotActions(reg) - - // query array param snapshotActions - if err := r.SetQueryParam("snapshotActions", joinedSnapshotActions...); err != nil { - return err - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetObjectSnapshots binds the parameter objectActionKeys -func (o *GetObjectSnapshotsParams) bindParamObjectActionKeys(formats strfmt.Registry) []string { - objectActionKeysIR := o.ObjectActionKeys - - var objectActionKeysIC []string - for _, objectActionKeysIIR := range objectActionKeysIR { // explode []string - - objectActionKeysIIV := objectActionKeysIIR // string as string - objectActionKeysIC = append(objectActionKeysIC, objectActionKeysIIV) - } - - // items.CollectionFormat: "" - objectActionKeysIS := swag.JoinByFormat(objectActionKeysIC, "") - - return objectActionKeysIS -} - -// bindParamGetObjectSnapshots binds the parameter protectionGroupIds -func (o *GetObjectSnapshotsParams) bindParamProtectionGroupIds(formats strfmt.Registry) []string { - protectionGroupIdsIR := o.ProtectionGroupIds - - var protectionGroupIdsIC []string - for _, protectionGroupIdsIIR := range protectionGroupIdsIR { // explode []string - - protectionGroupIdsIIV := protectionGroupIdsIIR // string as string - protectionGroupIdsIC = append(protectionGroupIdsIC, protectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - protectionGroupIdsIS := swag.JoinByFormat(protectionGroupIdsIC, "") - - return protectionGroupIdsIS -} - -// bindParamGetObjectSnapshots binds the parameter regionIds -func (o *GetObjectSnapshotsParams) bindParamRegionIds(formats strfmt.Registry) []string { - regionIdsIR := o.RegionIds - - var regionIdsIC []string - for _, regionIdsIIR := range regionIdsIR { // explode []string - - regionIdsIIV := regionIdsIIR // string as string - regionIdsIC = append(regionIdsIC, regionIdsIIV) - } - - // items.CollectionFormat: "" - regionIdsIS := swag.JoinByFormat(regionIdsIC, "") - - return regionIdsIS -} - -// bindParamGetObjectSnapshots binds the parameter runInstanceIds -func (o *GetObjectSnapshotsParams) bindParamRunInstanceIds(formats strfmt.Registry) []string { - runInstanceIdsIR := o.RunInstanceIds - - var runInstanceIdsIC []string - for _, runInstanceIdsIIR := range runInstanceIdsIR { // explode []int64 - - runInstanceIdsIIV := swag.FormatInt64(runInstanceIdsIIR) // int64 as string - runInstanceIdsIC = append(runInstanceIdsIC, runInstanceIdsIIV) - } - - // items.CollectionFormat: "" - runInstanceIdsIS := swag.JoinByFormat(runInstanceIdsIC, "") - - return runInstanceIdsIS -} - -// bindParamGetObjectSnapshots binds the parameter runTypes -func (o *GetObjectSnapshotsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} - -// bindParamGetObjectSnapshots binds the parameter snapshotActions -func (o *GetObjectSnapshotsParams) bindParamSnapshotActions(formats strfmt.Registry) []string { - snapshotActionsIR := o.SnapshotActions - - var snapshotActionsIC []string - for _, snapshotActionsIIR := range snapshotActionsIR { // explode []string - - snapshotActionsIIV := snapshotActionsIIR // string as string - snapshotActionsIC = append(snapshotActionsIC, snapshotActionsIIV) - } - - // items.CollectionFormat: "" - snapshotActionsIS := swag.JoinByFormat(snapshotActionsIC, "") - - return snapshotActionsIS -} diff --git a/v2/client/object/get_object_snapshots_responses.go b/v2/client/object/get_object_snapshots_responses.go deleted file mode 100644 index 2072a2d3..00000000 --- a/v2/client/object/get_object_snapshots_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectSnapshotsReader is a Reader for the GetObjectSnapshots structure. -type GetObjectSnapshotsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectSnapshotsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectSnapshotsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectSnapshotsDefault(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 - } -} - -// NewGetObjectSnapshotsOK creates a GetObjectSnapshotsOK with default headers values -func NewGetObjectSnapshotsOK() *GetObjectSnapshotsOK { - return &GetObjectSnapshotsOK{} -} - -/* -GetObjectSnapshotsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectSnapshotsOK struct { - Payload *models.GetObjectSnapshotsResponseBody -} - -// IsSuccess returns true when this get object snapshots o k response has a 2xx status code -func (o *GetObjectSnapshotsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object snapshots o k response has a 3xx status code -func (o *GetObjectSnapshotsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object snapshots o k response has a 4xx status code -func (o *GetObjectSnapshotsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object snapshots o k response has a 5xx status code -func (o *GetObjectSnapshotsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object snapshots o k response a status code equal to that given -func (o *GetObjectSnapshotsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object snapshots o k response -func (o *GetObjectSnapshotsOK) Code() int { - return 200 -} - -func (o *GetObjectSnapshotsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/snapshots][%d] getObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetObjectSnapshotsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/snapshots][%d] getObjectSnapshotsOK %s", 200, payload) -} - -func (o *GetObjectSnapshotsOK) GetPayload() *models.GetObjectSnapshotsResponseBody { - return o.Payload -} - -func (o *GetObjectSnapshotsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetObjectSnapshotsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectSnapshotsDefault creates a GetObjectSnapshotsDefault with default headers values -func NewGetObjectSnapshotsDefault(code int) *GetObjectSnapshotsDefault { - return &GetObjectSnapshotsDefault{ - _statusCode: code, - } -} - -/* -GetObjectSnapshotsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectSnapshotsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object snapshots default response has a 2xx status code -func (o *GetObjectSnapshotsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object snapshots default response has a 3xx status code -func (o *GetObjectSnapshotsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object snapshots default response has a 4xx status code -func (o *GetObjectSnapshotsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object snapshots default response has a 5xx status code -func (o *GetObjectSnapshotsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object snapshots default response a status code equal to that given -func (o *GetObjectSnapshotsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object snapshots default response -func (o *GetObjectSnapshotsDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectSnapshotsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/snapshots][%d] GetObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/snapshots][%d] GetObjectSnapshots default %s", o._statusCode, payload) -} - -func (o *GetObjectSnapshotsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectSnapshotsDefault) 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/object/get_object_stats_parameters.go b/v2/client/object/get_object_stats_parameters.go deleted file mode 100644 index debde7e9..00000000 --- a/v2/client/object/get_object_stats_parameters.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectStatsParams creates a new GetObjectStatsParams 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 NewGetObjectStatsParams() *GetObjectStatsParams { - return &GetObjectStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectStatsParamsWithTimeout creates a new GetObjectStatsParams object -// with the ability to set a timeout on a request. -func NewGetObjectStatsParamsWithTimeout(timeout time.Duration) *GetObjectStatsParams { - return &GetObjectStatsParams{ - timeout: timeout, - } -} - -// NewGetObjectStatsParamsWithContext creates a new GetObjectStatsParams object -// with the ability to set a context for a request. -func NewGetObjectStatsParamsWithContext(ctx context.Context) *GetObjectStatsParams { - return &GetObjectStatsParams{ - Context: ctx, - } -} - -// NewGetObjectStatsParamsWithHTTPClient creates a new GetObjectStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectStatsParamsWithHTTPClient(client *http.Client) *GetObjectStatsParams { - return &GetObjectStatsParams{ - HTTPClient: client, - } -} - -/* -GetObjectStatsParams contains all the parameters to send to the API endpoint - - for the get object stats operation. - - Typically these are written to a http.Request. -*/ -type GetObjectStatsParams struct { - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - /* RegionIds. - - Filter by a list of region ids. - */ - RegionIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectStatsParams) WithDefaults() *GetObjectStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object stats params -func (o *GetObjectStatsParams) WithTimeout(timeout time.Duration) *GetObjectStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object stats params -func (o *GetObjectStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object stats params -func (o *GetObjectStatsParams) WithContext(ctx context.Context) *GetObjectStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object stats params -func (o *GetObjectStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object stats params -func (o *GetObjectStatsParams) WithHTTPClient(client *http.Client) *GetObjectStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object stats params -func (o *GetObjectStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get object stats params -func (o *GetObjectStatsParams) WithID(id int64) *GetObjectStatsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get object stats params -func (o *GetObjectStatsParams) SetID(id int64) { - o.ID = id -} - -// WithRegionIds adds the regionIds to the get object stats params -func (o *GetObjectStatsParams) WithRegionIds(regionIds []string) *GetObjectStatsParams { - o.SetRegionIds(regionIds) - return o -} - -// SetRegionIds adds the regionIds to the get object stats params -func (o *GetObjectStatsParams) SetRegionIds(regionIds []string) { - o.RegionIds = regionIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.RegionIds != nil { - - // binding items for regionIds - joinedRegionIds := o.bindParamRegionIds(reg) - - // query array param regionIds - if err := r.SetQueryParam("regionIds", joinedRegionIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetObjectStats binds the parameter regionIds -func (o *GetObjectStatsParams) bindParamRegionIds(formats strfmt.Registry) []string { - regionIdsIR := o.RegionIds - - var regionIdsIC []string - for _, regionIdsIIR := range regionIdsIR { // explode []string - - regionIdsIIV := regionIdsIIR // string as string - regionIdsIC = append(regionIdsIC, regionIdsIIV) - } - - // items.CollectionFormat: "" - regionIdsIS := swag.JoinByFormat(regionIdsIC, "") - - return regionIdsIS -} diff --git a/v2/client/object/get_object_stats_responses.go b/v2/client/object/get_object_stats_responses.go deleted file mode 100644 index 13882dfd..00000000 --- a/v2/client/object/get_object_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectStatsReader is a Reader for the GetObjectStats structure. -type GetObjectStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectStatsDefault(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 - } -} - -// NewGetObjectStatsOK creates a GetObjectStatsOK with default headers values -func NewGetObjectStatsOK() *GetObjectStatsOK { - return &GetObjectStatsOK{} -} - -/* -GetObjectStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectStatsOK struct { - Payload *models.ObjectStats -} - -// IsSuccess returns true when this get object stats o k response has a 2xx status code -func (o *GetObjectStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object stats o k response has a 3xx status code -func (o *GetObjectStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object stats o k response has a 4xx status code -func (o *GetObjectStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object stats o k response has a 5xx status code -func (o *GetObjectStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object stats o k response a status code equal to that given -func (o *GetObjectStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object stats o k response -func (o *GetObjectStatsOK) Code() int { - return 200 -} - -func (o *GetObjectStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/stats][%d] getObjectStatsOK %s", 200, payload) -} - -func (o *GetObjectStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/stats][%d] getObjectStatsOK %s", 200, payload) -} - -func (o *GetObjectStatsOK) GetPayload() *models.ObjectStats { - return o.Payload -} - -func (o *GetObjectStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectStatsDefault creates a GetObjectStatsDefault with default headers values -func NewGetObjectStatsDefault(code int) *GetObjectStatsDefault { - return &GetObjectStatsDefault{ - _statusCode: code, - } -} - -/* -GetObjectStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object stats default response has a 2xx status code -func (o *GetObjectStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object stats default response has a 3xx status code -func (o *GetObjectStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object stats default response has a 4xx status code -func (o *GetObjectStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object stats default response has a 5xx status code -func (o *GetObjectStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object stats default response a status code equal to that given -func (o *GetObjectStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object stats default response -func (o *GetObjectStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/stats][%d] GetObjectStats default %s", o._statusCode, payload) -} - -func (o *GetObjectStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/stats][%d] GetObjectStats default %s", o._statusCode, payload) -} - -func (o *GetObjectStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectStatsDefault) 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/object/get_object_tree_parameters.go b/v2/client/object/get_object_tree_parameters.go deleted file mode 100644 index 9a94e88b..00000000 --- a/v2/client/object/get_object_tree_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectTreeParams creates a new GetObjectTreeParams 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 NewGetObjectTreeParams() *GetObjectTreeParams { - return &GetObjectTreeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectTreeParamsWithTimeout creates a new GetObjectTreeParams object -// with the ability to set a timeout on a request. -func NewGetObjectTreeParamsWithTimeout(timeout time.Duration) *GetObjectTreeParams { - return &GetObjectTreeParams{ - timeout: timeout, - } -} - -// NewGetObjectTreeParamsWithContext creates a new GetObjectTreeParams object -// with the ability to set a context for a request. -func NewGetObjectTreeParamsWithContext(ctx context.Context) *GetObjectTreeParams { - return &GetObjectTreeParams{ - Context: ctx, - } -} - -// NewGetObjectTreeParamsWithHTTPClient creates a new GetObjectTreeParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectTreeParamsWithHTTPClient(client *http.Client) *GetObjectTreeParams { - return &GetObjectTreeParams{ - HTTPClient: client, - } -} - -/* -GetObjectTreeParams contains all the parameters to send to the API endpoint - - for the get object tree operation. - - Typically these are written to a http.Request. -*/ -type GetObjectTreeParams struct { - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object tree params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectTreeParams) WithDefaults() *GetObjectTreeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object tree params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectTreeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object tree params -func (o *GetObjectTreeParams) WithTimeout(timeout time.Duration) *GetObjectTreeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object tree params -func (o *GetObjectTreeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object tree params -func (o *GetObjectTreeParams) WithContext(ctx context.Context) *GetObjectTreeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object tree params -func (o *GetObjectTreeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object tree params -func (o *GetObjectTreeParams) WithHTTPClient(client *http.Client) *GetObjectTreeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object tree params -func (o *GetObjectTreeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get object tree params -func (o *GetObjectTreeParams) WithID(id int64) *GetObjectTreeParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get object tree params -func (o *GetObjectTreeParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectTreeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/get_object_tree_responses.go b/v2/client/object/get_object_tree_responses.go deleted file mode 100644 index 0b3c9403..00000000 --- a/v2/client/object/get_object_tree_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectTreeReader is a Reader for the GetObjectTree structure. -type GetObjectTreeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectTreeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectTreeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectTreeDefault(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 - } -} - -// NewGetObjectTreeOK creates a GetObjectTreeOK with default headers values -func NewGetObjectTreeOK() *GetObjectTreeOK { - return &GetObjectTreeOK{} -} - -/* -GetObjectTreeOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectTreeOK struct { - Payload *models.ObjectWithChildren -} - -// IsSuccess returns true when this get object tree o k response has a 2xx status code -func (o *GetObjectTreeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object tree o k response has a 3xx status code -func (o *GetObjectTreeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object tree o k response has a 4xx status code -func (o *GetObjectTreeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object tree o k response has a 5xx status code -func (o *GetObjectTreeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object tree o k response a status code equal to that given -func (o *GetObjectTreeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object tree o k response -func (o *GetObjectTreeOK) Code() int { - return 200 -} - -func (o *GetObjectTreeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/tree][%d] getObjectTreeOK %s", 200, payload) -} - -func (o *GetObjectTreeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/tree][%d] getObjectTreeOK %s", 200, payload) -} - -func (o *GetObjectTreeOK) GetPayload() *models.ObjectWithChildren { - return o.Payload -} - -func (o *GetObjectTreeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectWithChildren) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectTreeDefault creates a GetObjectTreeDefault with default headers values -func NewGetObjectTreeDefault(code int) *GetObjectTreeDefault { - return &GetObjectTreeDefault{ - _statusCode: code, - } -} - -/* -GetObjectTreeDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectTreeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object tree default response has a 2xx status code -func (o *GetObjectTreeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object tree default response has a 3xx status code -func (o *GetObjectTreeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object tree default response has a 4xx status code -func (o *GetObjectTreeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object tree default response has a 5xx status code -func (o *GetObjectTreeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object tree default response a status code equal to that given -func (o *GetObjectTreeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object tree default response -func (o *GetObjectTreeDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectTreeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/tree][%d] GetObjectTree default %s", o._statusCode, payload) -} - -func (o *GetObjectTreeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/tree][%d] GetObjectTree default %s", o._statusCode, payload) -} - -func (o *GetObjectTreeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectTreeDefault) 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/object/get_objects_last_run_parameters.go b/v2/client/object/get_objects_last_run_parameters.go deleted file mode 100644 index 2077f52a..00000000 --- a/v2/client/object/get_objects_last_run_parameters.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetObjectsLastRunParams creates a new GetObjectsLastRunParams 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 NewGetObjectsLastRunParams() *GetObjectsLastRunParams { - return &GetObjectsLastRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectsLastRunParamsWithTimeout creates a new GetObjectsLastRunParams object -// with the ability to set a timeout on a request. -func NewGetObjectsLastRunParamsWithTimeout(timeout time.Duration) *GetObjectsLastRunParams { - return &GetObjectsLastRunParams{ - timeout: timeout, - } -} - -// NewGetObjectsLastRunParamsWithContext creates a new GetObjectsLastRunParams object -// with the ability to set a context for a request. -func NewGetObjectsLastRunParamsWithContext(ctx context.Context) *GetObjectsLastRunParams { - return &GetObjectsLastRunParams{ - Context: ctx, - } -} - -// NewGetObjectsLastRunParamsWithHTTPClient creates a new GetObjectsLastRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectsLastRunParamsWithHTTPClient(client *http.Client) *GetObjectsLastRunParams { - return &GetObjectsLastRunParams{ - HTTPClient: client, - } -} - -/* -GetObjectsLastRunParams contains all the parameters to send to the API endpoint - - for the get objects last run operation. - - Typically these are written to a http.Request. -*/ -type GetObjectsLastRunParams struct { - - /* Count. - - Specifies the number of objects to be fetched for the specified pagination cookie. - - Format: int32 - */ - Count *int32 - - /* Ids. - - Specifies a list of object ids, only last runs for these objects will be returned. - */ - Ids []int64 - - /* IncludeTenants. - - If true, the response will include Objects which belongs to all tenants which the current user has permission to see. - */ - IncludeTenants *bool - - /* PaginationCookie. - - Specifies the pagination cookie with which subsequent parts of the response can be fetched. - */ - PaginationCookie *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get objects last run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectsLastRunParams) WithDefaults() *GetObjectsLastRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get objects last run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectsLastRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get objects last run params -func (o *GetObjectsLastRunParams) WithTimeout(timeout time.Duration) *GetObjectsLastRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get objects last run params -func (o *GetObjectsLastRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get objects last run params -func (o *GetObjectsLastRunParams) WithContext(ctx context.Context) *GetObjectsLastRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get objects last run params -func (o *GetObjectsLastRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get objects last run params -func (o *GetObjectsLastRunParams) WithHTTPClient(client *http.Client) *GetObjectsLastRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get objects last run params -func (o *GetObjectsLastRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCount adds the count to the get objects last run params -func (o *GetObjectsLastRunParams) WithCount(count *int32) *GetObjectsLastRunParams { - o.SetCount(count) - return o -} - -// SetCount adds the count to the get objects last run params -func (o *GetObjectsLastRunParams) SetCount(count *int32) { - o.Count = count -} - -// WithIds adds the ids to the get objects last run params -func (o *GetObjectsLastRunParams) WithIds(ids []int64) *GetObjectsLastRunParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get objects last run params -func (o *GetObjectsLastRunParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get objects last run params -func (o *GetObjectsLastRunParams) WithIncludeTenants(includeTenants *bool) *GetObjectsLastRunParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get objects last run params -func (o *GetObjectsLastRunParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithPaginationCookie adds the paginationCookie to the get objects last run params -func (o *GetObjectsLastRunParams) WithPaginationCookie(paginationCookie *string) *GetObjectsLastRunParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the get objects last run params -func (o *GetObjectsLastRunParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithTenantIds adds the tenantIds to the get objects last run params -func (o *GetObjectsLastRunParams) WithTenantIds(tenantIds []string) *GetObjectsLastRunParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get objects last run params -func (o *GetObjectsLastRunParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectsLastRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Count != nil { - - // query param count - var qrCount int32 - - if o.Count != nil { - qrCount = *o.Count - } - qCount := swag.FormatInt32(qrCount) - if qCount != "" { - - if err := r.SetQueryParam("count", qCount); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.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.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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetObjectsLastRun binds the parameter ids -func (o *GetObjectsLastRunParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetObjectsLastRun binds the parameter tenantIds -func (o *GetObjectsLastRunParams) 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/client/object/get_objects_last_run_responses.go b/v2/client/object/get_objects_last_run_responses.go deleted file mode 100644 index 0a716b97..00000000 --- a/v2/client/object/get_objects_last_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectsLastRunReader is a Reader for the GetObjectsLastRun structure. -type GetObjectsLastRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectsLastRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectsLastRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectsLastRunDefault(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 - } -} - -// NewGetObjectsLastRunOK creates a GetObjectsLastRunOK with default headers values -func NewGetObjectsLastRunOK() *GetObjectsLastRunOK { - return &GetObjectsLastRunOK{} -} - -/* -GetObjectsLastRunOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectsLastRunOK struct { - Payload *models.ObjectsLastRun -} - -// IsSuccess returns true when this get objects last run o k response has a 2xx status code -func (o *GetObjectsLastRunOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get objects last run o k response has a 3xx status code -func (o *GetObjectsLastRunOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get objects last run o k response has a 4xx status code -func (o *GetObjectsLastRunOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get objects last run o k response has a 5xx status code -func (o *GetObjectsLastRunOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get objects last run o k response a status code equal to that given -func (o *GetObjectsLastRunOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get objects last run o k response -func (o *GetObjectsLastRunOK) Code() int { - return 200 -} - -func (o *GetObjectsLastRunOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/last-run][%d] getObjectsLastRunOK %s", 200, payload) -} - -func (o *GetObjectsLastRunOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/last-run][%d] getObjectsLastRunOK %s", 200, payload) -} - -func (o *GetObjectsLastRunOK) GetPayload() *models.ObjectsLastRun { - return o.Payload -} - -func (o *GetObjectsLastRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectsLastRun) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectsLastRunDefault creates a GetObjectsLastRunDefault with default headers values -func NewGetObjectsLastRunDefault(code int) *GetObjectsLastRunDefault { - return &GetObjectsLastRunDefault{ - _statusCode: code, - } -} - -/* -GetObjectsLastRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectsLastRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get objects last run default response has a 2xx status code -func (o *GetObjectsLastRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get objects last run default response has a 3xx status code -func (o *GetObjectsLastRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get objects last run default response has a 4xx status code -func (o *GetObjectsLastRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get objects last run default response has a 5xx status code -func (o *GetObjectsLastRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get objects last run default response a status code equal to that given -func (o *GetObjectsLastRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get objects last run default response -func (o *GetObjectsLastRunDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectsLastRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/last-run][%d] GetObjectsLastRun default %s", o._statusCode, payload) -} - -func (o *GetObjectsLastRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/last-run][%d] GetObjectsLastRun default %s", o._statusCode, payload) -} - -func (o *GetObjectsLastRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectsLastRunDefault) 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/object/get_p_i_t_ranges_for_protected_object_parameters.go b/v2/client/object/get_p_i_t_ranges_for_protected_object_parameters.go deleted file mode 100644 index 6e7fcb41..00000000 --- a/v2/client/object/get_p_i_t_ranges_for_protected_object_parameters.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetPITRangesForProtectedObjectParams creates a new GetPITRangesForProtectedObjectParams 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 NewGetPITRangesForProtectedObjectParams() *GetPITRangesForProtectedObjectParams { - return &GetPITRangesForProtectedObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPITRangesForProtectedObjectParamsWithTimeout creates a new GetPITRangesForProtectedObjectParams object -// with the ability to set a timeout on a request. -func NewGetPITRangesForProtectedObjectParamsWithTimeout(timeout time.Duration) *GetPITRangesForProtectedObjectParams { - return &GetPITRangesForProtectedObjectParams{ - timeout: timeout, - } -} - -// NewGetPITRangesForProtectedObjectParamsWithContext creates a new GetPITRangesForProtectedObjectParams object -// with the ability to set a context for a request. -func NewGetPITRangesForProtectedObjectParamsWithContext(ctx context.Context) *GetPITRangesForProtectedObjectParams { - return &GetPITRangesForProtectedObjectParams{ - Context: ctx, - } -} - -// NewGetPITRangesForProtectedObjectParamsWithHTTPClient creates a new GetPITRangesForProtectedObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPITRangesForProtectedObjectParamsWithHTTPClient(client *http.Client) *GetPITRangesForProtectedObjectParams { - return &GetPITRangesForProtectedObjectParams{ - HTTPClient: client, - } -} - -/* -GetPITRangesForProtectedObjectParams contains all the parameters to send to the API endpoint - - for the get p i t ranges for protected object operation. - - Typically these are written to a http.Request. -*/ -type GetPITRangesForProtectedObjectParams struct { - - /* FromTimeUsecs. - - If specified, return the restore ranges that lie after this timestamp. This parameter is specified as the timestamp in Unix time epoch in microseconds. - - Format: int64 - */ - FromTimeUsecs *int64 - - /* ID. - - Specifies the ID of the protected object. - - Format: int64 - */ - ID int64 - - /* ProtectionGroupIds. - - If specified, return only the points in time corresponding to these protection group IDs. - */ - ProtectionGroupIds []string - - /* ToTimeUsecs. - - If specified, return the restore ranges that lie before this timestamp. This parameter is specified as the timestamp in Unix time epoch in microseconds. - - Format: int64 - */ - ToTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get p i t ranges for protected object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPITRangesForProtectedObjectParams) WithDefaults() *GetPITRangesForProtectedObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get p i t ranges for protected object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPITRangesForProtectedObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithTimeout(timeout time.Duration) *GetPITRangesForProtectedObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithContext(ctx context.Context) *GetPITRangesForProtectedObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithHTTPClient(client *http.Client) *GetPITRangesForProtectedObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFromTimeUsecs adds the fromTimeUsecs to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithFromTimeUsecs(fromTimeUsecs *int64) *GetPITRangesForProtectedObjectParams { - o.SetFromTimeUsecs(fromTimeUsecs) - return o -} - -// SetFromTimeUsecs adds the fromTimeUsecs to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetFromTimeUsecs(fromTimeUsecs *int64) { - o.FromTimeUsecs = fromTimeUsecs -} - -// WithID adds the id to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithID(id int64) *GetPITRangesForProtectedObjectParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetID(id int64) { - o.ID = id -} - -// WithProtectionGroupIds adds the protectionGroupIds to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithProtectionGroupIds(protectionGroupIds []string) *GetPITRangesForProtectedObjectParams { - o.SetProtectionGroupIds(protectionGroupIds) - return o -} - -// SetProtectionGroupIds adds the protectionGroupIds to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetProtectionGroupIds(protectionGroupIds []string) { - o.ProtectionGroupIds = protectionGroupIds -} - -// WithToTimeUsecs adds the toTimeUsecs to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) WithToTimeUsecs(toTimeUsecs *int64) *GetPITRangesForProtectedObjectParams { - o.SetToTimeUsecs(toTimeUsecs) - return o -} - -// SetToTimeUsecs adds the toTimeUsecs to the get p i t ranges for protected object params -func (o *GetPITRangesForProtectedObjectParams) SetToTimeUsecs(toTimeUsecs *int64) { - o.ToTimeUsecs = toTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPITRangesForProtectedObjectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FromTimeUsecs != nil { - - // query param fromTimeUsecs - var qrFromTimeUsecs int64 - - if o.FromTimeUsecs != nil { - qrFromTimeUsecs = *o.FromTimeUsecs - } - qFromTimeUsecs := swag.FormatInt64(qrFromTimeUsecs) - if qFromTimeUsecs != "" { - - if err := r.SetQueryParam("fromTimeUsecs", qFromTimeUsecs); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.ProtectionGroupIds != nil { - - // binding items for protectionGroupIds - joinedProtectionGroupIds := o.bindParamProtectionGroupIds(reg) - - // query array param protectionGroupIds - if err := r.SetQueryParam("protectionGroupIds", joinedProtectionGroupIds...); err != nil { - return err - } - } - - if o.ToTimeUsecs != nil { - - // query param toTimeUsecs - var qrToTimeUsecs int64 - - if o.ToTimeUsecs != nil { - qrToTimeUsecs = *o.ToTimeUsecs - } - qToTimeUsecs := swag.FormatInt64(qrToTimeUsecs) - if qToTimeUsecs != "" { - - if err := r.SetQueryParam("toTimeUsecs", qToTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetPITRangesForProtectedObject binds the parameter protectionGroupIds -func (o *GetPITRangesForProtectedObjectParams) bindParamProtectionGroupIds(formats strfmt.Registry) []string { - protectionGroupIdsIR := o.ProtectionGroupIds - - var protectionGroupIdsIC []string - for _, protectionGroupIdsIIR := range protectionGroupIdsIR { // explode []string - - protectionGroupIdsIIV := protectionGroupIdsIIR // string as string - protectionGroupIdsIC = append(protectionGroupIdsIC, protectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - protectionGroupIdsIS := swag.JoinByFormat(protectionGroupIdsIC, "") - - return protectionGroupIdsIS -} diff --git a/v2/client/object/get_p_i_t_ranges_for_protected_object_responses.go b/v2/client/object/get_p_i_t_ranges_for_protected_object_responses.go deleted file mode 100644 index 83e98e95..00000000 --- a/v2/client/object/get_p_i_t_ranges_for_protected_object_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPITRangesForProtectedObjectReader is a Reader for the GetPITRangesForProtectedObject structure. -type GetPITRangesForProtectedObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPITRangesForProtectedObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPITRangesForProtectedObjectOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPITRangesForProtectedObjectDefault(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 - } -} - -// NewGetPITRangesForProtectedObjectOK creates a GetPITRangesForProtectedObjectOK with default headers values -func NewGetPITRangesForProtectedObjectOK() *GetPITRangesForProtectedObjectOK { - return &GetPITRangesForProtectedObjectOK{} -} - -/* -GetPITRangesForProtectedObjectOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPITRangesForProtectedObjectOK struct { - Payload *models.GetPITRangesProtectedObjectResponseBody -} - -// IsSuccess returns true when this get p i t ranges for protected object o k response has a 2xx status code -func (o *GetPITRangesForProtectedObjectOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get p i t ranges for protected object o k response has a 3xx status code -func (o *GetPITRangesForProtectedObjectOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get p i t ranges for protected object o k response has a 4xx status code -func (o *GetPITRangesForProtectedObjectOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get p i t ranges for protected object o k response has a 5xx status code -func (o *GetPITRangesForProtectedObjectOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get p i t ranges for protected object o k response a status code equal to that given -func (o *GetPITRangesForProtectedObjectOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get p i t ranges for protected object o k response -func (o *GetPITRangesForProtectedObjectOK) Code() int { - return 200 -} - -func (o *GetPITRangesForProtectedObjectOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/pit-ranges][%d] getPITRangesForProtectedObjectOK %s", 200, payload) -} - -func (o *GetPITRangesForProtectedObjectOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/pit-ranges][%d] getPITRangesForProtectedObjectOK %s", 200, payload) -} - -func (o *GetPITRangesForProtectedObjectOK) GetPayload() *models.GetPITRangesProtectedObjectResponseBody { - return o.Payload -} - -func (o *GetPITRangesForProtectedObjectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetPITRangesProtectedObjectResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPITRangesForProtectedObjectDefault creates a GetPITRangesForProtectedObjectDefault with default headers values -func NewGetPITRangesForProtectedObjectDefault(code int) *GetPITRangesForProtectedObjectDefault { - return &GetPITRangesForProtectedObjectDefault{ - _statusCode: code, - } -} - -/* -GetPITRangesForProtectedObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPITRangesForProtectedObjectDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get p i t ranges for protected object default response has a 2xx status code -func (o *GetPITRangesForProtectedObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get p i t ranges for protected object default response has a 3xx status code -func (o *GetPITRangesForProtectedObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get p i t ranges for protected object default response has a 4xx status code -func (o *GetPITRangesForProtectedObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get p i t ranges for protected object default response has a 5xx status code -func (o *GetPITRangesForProtectedObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get p i t ranges for protected object default response a status code equal to that given -func (o *GetPITRangesForProtectedObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get p i t ranges for protected object default response -func (o *GetPITRangesForProtectedObjectDefault) Code() int { - return o._statusCode -} - -func (o *GetPITRangesForProtectedObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/pit-ranges][%d] GetPITRangesForProtectedObject default %s", o._statusCode, payload) -} - -func (o *GetPITRangesForProtectedObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}/pit-ranges][%d] GetPITRangesForProtectedObject default %s", o._statusCode, payload) -} - -func (o *GetPITRangesForProtectedObjectDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPITRangesForProtectedObjectDefault) 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/object/get_protected_object_of_any_type_by_id_parameters.go b/v2/client/object/get_protected_object_of_any_type_by_id_parameters.go deleted file mode 100644 index 6231d241..00000000 --- a/v2/client/object/get_protected_object_of_any_type_by_id_parameters.go +++ /dev/null @@ -1,520 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetProtectedObjectOfAnyTypeByIDParams creates a new GetProtectedObjectOfAnyTypeByIDParams 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 NewGetProtectedObjectOfAnyTypeByIDParams() *GetProtectedObjectOfAnyTypeByIDParams { - return &GetProtectedObjectOfAnyTypeByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectedObjectOfAnyTypeByIDParamsWithTimeout creates a new GetProtectedObjectOfAnyTypeByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectedObjectOfAnyTypeByIDParamsWithTimeout(timeout time.Duration) *GetProtectedObjectOfAnyTypeByIDParams { - return &GetProtectedObjectOfAnyTypeByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectedObjectOfAnyTypeByIDParamsWithContext creates a new GetProtectedObjectOfAnyTypeByIDParams object -// with the ability to set a context for a request. -func NewGetProtectedObjectOfAnyTypeByIDParamsWithContext(ctx context.Context) *GetProtectedObjectOfAnyTypeByIDParams { - return &GetProtectedObjectOfAnyTypeByIDParams{ - Context: ctx, - } -} - -// NewGetProtectedObjectOfAnyTypeByIDParamsWithHTTPClient creates a new GetProtectedObjectOfAnyTypeByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectedObjectOfAnyTypeByIDParamsWithHTTPClient(client *http.Client) *GetProtectedObjectOfAnyTypeByIDParams { - return &GetProtectedObjectOfAnyTypeByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectedObjectOfAnyTypeByIDParams contains all the parameters to send to the API endpoint - - for the get protected object of any type by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectedObjectOfAnyTypeByIDParams struct { - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. Only Protected objects protecting the specified environment types are returned. - */ - Environments []string - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - /* IncludeLastRunInfo. - - If true, the response will include information about the last protection run on this object. - */ - IncludeLastRunInfo *bool - - /* IncludeTenants. - - If true, the response will include Objects which were protected by all tenants which the current user has permission to see. If false, then only objects protected by the current user will be returned. - */ - IncludeTenants *bool - - /* ObjectActionKey. - - Filter by ObjectActionKey, uniquely represent protection of an object. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey, when specified Only objects of given action_key are returned for corresponding object id and this vec's size needs to be same as 'id'. - */ - ObjectActionKey []string - - /* OnlyAutoProtectedObjects. - - If true, the response will include only the auto protected objects. - */ - OnlyAutoProtectedObjects *bool - - /* OnlyLeafObjects. - - If true, the response will include only the leaf level objects. - */ - OnlyLeafObjects *bool - - /* OnlyProtectedObjects. - - If true, the response will include only objects which have been protected. - */ - OnlyProtectedObjects *bool - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* StorageDomainID. - - Filter by Storage Domain id. Only Objects protected to this Storage Domain will be returned. - - Format: int64 - */ - StorageDomainID *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protected object of any type by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithDefaults() *GetProtectedObjectOfAnyTypeByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protected object of any type by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithTimeout(timeout time.Duration) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithContext(ctx context.Context) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithHTTPClient(client *http.Client) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnvironments adds the environments to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithEnvironments(environments []string) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithID adds the id to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithID(id int64) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeLastRunInfo adds the includeLastRunInfo to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithIncludeLastRunInfo(includeLastRunInfo *bool) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetIncludeLastRunInfo(includeLastRunInfo) - return o -} - -// SetIncludeLastRunInfo adds the includeLastRunInfo to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetIncludeLastRunInfo(includeLastRunInfo *bool) { - o.IncludeLastRunInfo = includeLastRunInfo -} - -// WithIncludeTenants adds the includeTenants to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithIncludeTenants(includeTenants *bool) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithObjectActionKey adds the objectActionKey to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithObjectActionKey(objectActionKey []string) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetObjectActionKey(objectActionKey) - return o -} - -// SetObjectActionKey adds the objectActionKey to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetObjectActionKey(objectActionKey []string) { - o.ObjectActionKey = objectActionKey -} - -// WithOnlyAutoProtectedObjects adds the onlyAutoProtectedObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithOnlyAutoProtectedObjects(onlyAutoProtectedObjects *bool) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetOnlyAutoProtectedObjects(onlyAutoProtectedObjects) - return o -} - -// SetOnlyAutoProtectedObjects adds the onlyAutoProtectedObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetOnlyAutoProtectedObjects(onlyAutoProtectedObjects *bool) { - o.OnlyAutoProtectedObjects = onlyAutoProtectedObjects -} - -// WithOnlyLeafObjects adds the onlyLeafObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithOnlyLeafObjects(onlyLeafObjects *bool) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetOnlyLeafObjects(onlyLeafObjects) - return o -} - -// SetOnlyLeafObjects adds the onlyLeafObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetOnlyLeafObjects(onlyLeafObjects *bool) { - o.OnlyLeafObjects = onlyLeafObjects -} - -// WithOnlyProtectedObjects adds the onlyProtectedObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithOnlyProtectedObjects(onlyProtectedObjects *bool) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetOnlyProtectedObjects(onlyProtectedObjects) - return o -} - -// SetOnlyProtectedObjects adds the onlyProtectedObjects to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetOnlyProtectedObjects(onlyProtectedObjects *bool) { - o.OnlyProtectedObjects = onlyProtectedObjects -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithStorageDomainID adds the storageDomainID to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithStorageDomainID(storageDomainID *int64) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetStorageDomainID(storageDomainID) - return o -} - -// SetStorageDomainID adds the storageDomainId to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetStorageDomainID(storageDomainID *int64) { - o.StorageDomainID = storageDomainID -} - -// WithTenantIds adds the tenantIds to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) WithTenantIds(tenantIds []string) *GetProtectedObjectOfAnyTypeByIDParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protected object of any type by Id params -func (o *GetProtectedObjectOfAnyTypeByIDParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectedObjectOfAnyTypeByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.IncludeLastRunInfo != nil { - - // query param includeLastRunInfo - var qrIncludeLastRunInfo bool - - if o.IncludeLastRunInfo != nil { - qrIncludeLastRunInfo = *o.IncludeLastRunInfo - } - qIncludeLastRunInfo := swag.FormatBool(qrIncludeLastRunInfo) - if qIncludeLastRunInfo != "" { - - if err := r.SetQueryParam("includeLastRunInfo", qIncludeLastRunInfo); 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.ObjectActionKey != nil { - - // binding items for objectActionKey - joinedObjectActionKey := o.bindParamObjectActionKey(reg) - - // query array param objectActionKey - if err := r.SetQueryParam("objectActionKey", joinedObjectActionKey...); err != nil { - return err - } - } - - if o.OnlyAutoProtectedObjects != nil { - - // query param onlyAutoProtectedObjects - var qrOnlyAutoProtectedObjects bool - - if o.OnlyAutoProtectedObjects != nil { - qrOnlyAutoProtectedObjects = *o.OnlyAutoProtectedObjects - } - qOnlyAutoProtectedObjects := swag.FormatBool(qrOnlyAutoProtectedObjects) - if qOnlyAutoProtectedObjects != "" { - - if err := r.SetQueryParam("onlyAutoProtectedObjects", qOnlyAutoProtectedObjects); err != nil { - return err - } - } - } - - if o.OnlyLeafObjects != nil { - - // query param onlyLeafObjects - var qrOnlyLeafObjects bool - - if o.OnlyLeafObjects != nil { - qrOnlyLeafObjects = *o.OnlyLeafObjects - } - qOnlyLeafObjects := swag.FormatBool(qrOnlyLeafObjects) - if qOnlyLeafObjects != "" { - - if err := r.SetQueryParam("onlyLeafObjects", qOnlyLeafObjects); err != nil { - return err - } - } - } - - if o.OnlyProtectedObjects != nil { - - // query param onlyProtectedObjects - var qrOnlyProtectedObjects bool - - if o.OnlyProtectedObjects != nil { - qrOnlyProtectedObjects = *o.OnlyProtectedObjects - } - qOnlyProtectedObjects := swag.FormatBool(qrOnlyProtectedObjects) - if qOnlyProtectedObjects != "" { - - if err := r.SetQueryParam("onlyProtectedObjects", qOnlyProtectedObjects); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.StorageDomainID != nil { - - // query param storageDomainId - var qrStorageDomainID int64 - - if o.StorageDomainID != nil { - qrStorageDomainID = *o.StorageDomainID - } - qStorageDomainID := swag.FormatInt64(qrStorageDomainID) - if qStorageDomainID != "" { - - if err := r.SetQueryParam("storageDomainId", qStorageDomainID); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectedObjectOfAnyTypeByID binds the parameter environments -func (o *GetProtectedObjectOfAnyTypeByIDParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectedObjectOfAnyTypeByID binds the parameter objectActionKey -func (o *GetProtectedObjectOfAnyTypeByIDParams) bindParamObjectActionKey(formats strfmt.Registry) []string { - objectActionKeyIR := o.ObjectActionKey - - var objectActionKeyIC []string - for _, objectActionKeyIIR := range objectActionKeyIR { // explode []string - - objectActionKeyIIV := objectActionKeyIIR // string as string - objectActionKeyIC = append(objectActionKeyIC, objectActionKeyIIV) - } - - // items.CollectionFormat: "" - objectActionKeyIS := swag.JoinByFormat(objectActionKeyIC, "") - - return objectActionKeyIS -} - -// bindParamGetProtectedObjectOfAnyTypeByID binds the parameter tenantIds -func (o *GetProtectedObjectOfAnyTypeByIDParams) 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/client/object/get_protected_object_of_any_type_by_id_responses.go b/v2/client/object/get_protected_object_of_any_type_by_id_responses.go deleted file mode 100644 index e1ae18fb..00000000 --- a/v2/client/object/get_protected_object_of_any_type_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectedObjectOfAnyTypeByIDReader is a Reader for the GetProtectedObjectOfAnyTypeByID structure. -type GetProtectedObjectOfAnyTypeByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectedObjectOfAnyTypeByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectedObjectOfAnyTypeByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectedObjectOfAnyTypeByIDDefault(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 - } -} - -// NewGetProtectedObjectOfAnyTypeByIDOK creates a GetProtectedObjectOfAnyTypeByIDOK with default headers values -func NewGetProtectedObjectOfAnyTypeByIDOK() *GetProtectedObjectOfAnyTypeByIDOK { - return &GetProtectedObjectOfAnyTypeByIDOK{} -} - -/* -GetProtectedObjectOfAnyTypeByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectedObjectOfAnyTypeByIDOK struct { - Payload *models.ProtectedObjectInfo -} - -// IsSuccess returns true when this get protected object of any type by Id o k response has a 2xx status code -func (o *GetProtectedObjectOfAnyTypeByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protected object of any type by Id o k response has a 3xx status code -func (o *GetProtectedObjectOfAnyTypeByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protected object of any type by Id o k response has a 4xx status code -func (o *GetProtectedObjectOfAnyTypeByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protected object of any type by Id o k response has a 5xx status code -func (o *GetProtectedObjectOfAnyTypeByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protected object of any type by Id o k response a status code equal to that given -func (o *GetProtectedObjectOfAnyTypeByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protected object of any type by Id o k response -func (o *GetProtectedObjectOfAnyTypeByIDOK) Code() int { - return 200 -} - -func (o *GetProtectedObjectOfAnyTypeByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}][%d] getProtectedObjectOfAnyTypeByIdOK %s", 200, payload) -} - -func (o *GetProtectedObjectOfAnyTypeByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}][%d] getProtectedObjectOfAnyTypeByIdOK %s", 200, payload) -} - -func (o *GetProtectedObjectOfAnyTypeByIDOK) GetPayload() *models.ProtectedObjectInfo { - return o.Payload -} - -func (o *GetProtectedObjectOfAnyTypeByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectedObjectInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectedObjectOfAnyTypeByIDDefault creates a GetProtectedObjectOfAnyTypeByIDDefault with default headers values -func NewGetProtectedObjectOfAnyTypeByIDDefault(code int) *GetProtectedObjectOfAnyTypeByIDDefault { - return &GetProtectedObjectOfAnyTypeByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectedObjectOfAnyTypeByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectedObjectOfAnyTypeByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protected object of any type by Id default response has a 2xx status code -func (o *GetProtectedObjectOfAnyTypeByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protected object of any type by Id default response has a 3xx status code -func (o *GetProtectedObjectOfAnyTypeByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protected object of any type by Id default response has a 4xx status code -func (o *GetProtectedObjectOfAnyTypeByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protected object of any type by Id default response has a 5xx status code -func (o *GetProtectedObjectOfAnyTypeByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protected object of any type by Id default response a status code equal to that given -func (o *GetProtectedObjectOfAnyTypeByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protected object of any type by Id default response -func (o *GetProtectedObjectOfAnyTypeByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectedObjectOfAnyTypeByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}][%d] GetProtectedObjectOfAnyTypeById default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectOfAnyTypeByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects/{id}][%d] GetProtectedObjectOfAnyTypeById default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectOfAnyTypeByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectedObjectOfAnyTypeByIDDefault) 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/object/get_protected_objects_of_any_type_parameters.go b/v2/client/object/get_protected_objects_of_any_type_parameters.go deleted file mode 100644 index d5e8432e..00000000 --- a/v2/client/object/get_protected_objects_of_any_type_parameters.go +++ /dev/null @@ -1,737 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetProtectedObjectsOfAnyTypeParams creates a new GetProtectedObjectsOfAnyTypeParams 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 NewGetProtectedObjectsOfAnyTypeParams() *GetProtectedObjectsOfAnyTypeParams { - return &GetProtectedObjectsOfAnyTypeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectedObjectsOfAnyTypeParamsWithTimeout creates a new GetProtectedObjectsOfAnyTypeParams object -// with the ability to set a timeout on a request. -func NewGetProtectedObjectsOfAnyTypeParamsWithTimeout(timeout time.Duration) *GetProtectedObjectsOfAnyTypeParams { - return &GetProtectedObjectsOfAnyTypeParams{ - timeout: timeout, - } -} - -// NewGetProtectedObjectsOfAnyTypeParamsWithContext creates a new GetProtectedObjectsOfAnyTypeParams object -// with the ability to set a context for a request. -func NewGetProtectedObjectsOfAnyTypeParamsWithContext(ctx context.Context) *GetProtectedObjectsOfAnyTypeParams { - return &GetProtectedObjectsOfAnyTypeParams{ - Context: ctx, - } -} - -// NewGetProtectedObjectsOfAnyTypeParamsWithHTTPClient creates a new GetProtectedObjectsOfAnyTypeParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectedObjectsOfAnyTypeParamsWithHTTPClient(client *http.Client) *GetProtectedObjectsOfAnyTypeParams { - return &GetProtectedObjectsOfAnyTypeParams{ - HTTPClient: client, - } -} - -/* -GetProtectedObjectsOfAnyTypeParams contains all the parameters to send to the API endpoint - - for the get protected objects of any type operation. - - Typically these are written to a http.Request. -*/ -type GetProtectedObjectsOfAnyTypeParams struct { - - /* Cookie. - - Specifies the pagination cookie. - */ - Cookie *string - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. Only Protected objects protecting the specified environment types are returned. - */ - Environments []string - - /* Ids. - - Filter by a list of Object ids. - */ - Ids []int64 - - /* IncludeLastRunInfo. - - If true, the response will include information about the last protection run on this object. - */ - IncludeLastRunInfo *bool - - /* IncludeTenants. - - If true, the response will include Objects which were protected by all tenants which the current user has permission to see. If false, then only objects protected by the current user will be returned. - */ - IncludeTenants *bool - - /* MaxCount. - - Specifies the max number of objects to return. - - Format: int32 - */ - MaxCount *int32 - - /* ObjectActionKeys. - - Filter by ObjectActionKey, uniquely represent protection of an object. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey, when specified Only objects of given action_key are returned for corresponding object id. The vec's size needs to be of either length one or same as the length of 'ids'. If the length of objectActionKey is one, it will be repeated as many number of times equal to the length of objectIds, as mandated by backend validation. If the length of objectActionKey and object ids are same then it will be passed as it is. - */ - ObjectActionKeys []string - - /* OnlyAutoProtectedObjects. - - If true, the response will include only the auto protected objects. - */ - OnlyAutoProtectedObjects *bool - - /* OnlyLeafObjects. - - If true, the response will include only the leaf level objects. - */ - OnlyLeafObjects *bool - - /* OnlyProtectedObjects. - - If true, the response will include only objects which have been protected. - */ - OnlyProtectedObjects *bool - - /* ParentID. - - Filter by Parent Id. Parent id is a unique object Id which may contain protected objects underneath in the source tree. - - Format: int64 - */ - ParentID *int64 - - /* PolicyIds. - - Filter by Policy ids that are associated with Protected Objects. - */ - PolicyIds []string - - /* RegionIds. - - Filter by a list of region ids. - */ - RegionIds []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* StorageDomainID. - - Filter by Storage Domain id. Only Objects protected to this Storage Domain will be returned. - - Format: int64 - */ - StorageDomainID *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protected objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsOfAnyTypeParams) WithDefaults() *GetProtectedObjectsOfAnyTypeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protected objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectedObjectsOfAnyTypeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithTimeout(timeout time.Duration) *GetProtectedObjectsOfAnyTypeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithContext(ctx context.Context) *GetProtectedObjectsOfAnyTypeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithHTTPClient(client *http.Client) *GetProtectedObjectsOfAnyTypeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithCookie(cookie *string) *GetProtectedObjectsOfAnyTypeParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithEnvironments adds the environments to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithEnvironments(environments []string) *GetProtectedObjectsOfAnyTypeParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIds adds the ids to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithIds(ids []int64) *GetProtectedObjectsOfAnyTypeParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeLastRunInfo adds the includeLastRunInfo to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithIncludeLastRunInfo(includeLastRunInfo *bool) *GetProtectedObjectsOfAnyTypeParams { - o.SetIncludeLastRunInfo(includeLastRunInfo) - return o -} - -// SetIncludeLastRunInfo adds the includeLastRunInfo to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetIncludeLastRunInfo(includeLastRunInfo *bool) { - o.IncludeLastRunInfo = includeLastRunInfo -} - -// WithIncludeTenants adds the includeTenants to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithIncludeTenants(includeTenants *bool) *GetProtectedObjectsOfAnyTypeParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMaxCount adds the maxCount to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithMaxCount(maxCount *int32) *GetProtectedObjectsOfAnyTypeParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithObjectActionKeys adds the objectActionKeys to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithObjectActionKeys(objectActionKeys []string) *GetProtectedObjectsOfAnyTypeParams { - o.SetObjectActionKeys(objectActionKeys) - return o -} - -// SetObjectActionKeys adds the objectActionKeys to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetObjectActionKeys(objectActionKeys []string) { - o.ObjectActionKeys = objectActionKeys -} - -// WithOnlyAutoProtectedObjects adds the onlyAutoProtectedObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithOnlyAutoProtectedObjects(onlyAutoProtectedObjects *bool) *GetProtectedObjectsOfAnyTypeParams { - o.SetOnlyAutoProtectedObjects(onlyAutoProtectedObjects) - return o -} - -// SetOnlyAutoProtectedObjects adds the onlyAutoProtectedObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetOnlyAutoProtectedObjects(onlyAutoProtectedObjects *bool) { - o.OnlyAutoProtectedObjects = onlyAutoProtectedObjects -} - -// WithOnlyLeafObjects adds the onlyLeafObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithOnlyLeafObjects(onlyLeafObjects *bool) *GetProtectedObjectsOfAnyTypeParams { - o.SetOnlyLeafObjects(onlyLeafObjects) - return o -} - -// SetOnlyLeafObjects adds the onlyLeafObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetOnlyLeafObjects(onlyLeafObjects *bool) { - o.OnlyLeafObjects = onlyLeafObjects -} - -// WithOnlyProtectedObjects adds the onlyProtectedObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithOnlyProtectedObjects(onlyProtectedObjects *bool) *GetProtectedObjectsOfAnyTypeParams { - o.SetOnlyProtectedObjects(onlyProtectedObjects) - return o -} - -// SetOnlyProtectedObjects adds the onlyProtectedObjects to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetOnlyProtectedObjects(onlyProtectedObjects *bool) { - o.OnlyProtectedObjects = onlyProtectedObjects -} - -// WithParentID adds the parentID to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithParentID(parentID *int64) *GetProtectedObjectsOfAnyTypeParams { - o.SetParentID(parentID) - return o -} - -// SetParentID adds the parentId to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetParentID(parentID *int64) { - o.ParentID = parentID -} - -// WithPolicyIds adds the policyIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithPolicyIds(policyIds []string) *GetProtectedObjectsOfAnyTypeParams { - o.SetPolicyIds(policyIds) - return o -} - -// SetPolicyIds adds the policyIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetPolicyIds(policyIds []string) { - o.PolicyIds = policyIds -} - -// WithRegionIds adds the regionIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithRegionIds(regionIds []string) *GetProtectedObjectsOfAnyTypeParams { - o.SetRegionIds(regionIds) - return o -} - -// SetRegionIds adds the regionIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetRegionIds(regionIds []string) { - o.RegionIds = regionIds -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectedObjectsOfAnyTypeParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithStorageDomainID adds the storageDomainID to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithStorageDomainID(storageDomainID *int64) *GetProtectedObjectsOfAnyTypeParams { - o.SetStorageDomainID(storageDomainID) - return o -} - -// SetStorageDomainID adds the storageDomainId to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetStorageDomainID(storageDomainID *int64) { - o.StorageDomainID = storageDomainID -} - -// WithTenantIds adds the tenantIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) WithTenantIds(tenantIds []string) *GetProtectedObjectsOfAnyTypeParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protected objects of any type params -func (o *GetProtectedObjectsOfAnyTypeParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectedObjectsOfAnyTypeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeLastRunInfo != nil { - - // query param includeLastRunInfo - var qrIncludeLastRunInfo bool - - if o.IncludeLastRunInfo != nil { - qrIncludeLastRunInfo = *o.IncludeLastRunInfo - } - qIncludeLastRunInfo := swag.FormatBool(qrIncludeLastRunInfo) - if qIncludeLastRunInfo != "" { - - if err := r.SetQueryParam("includeLastRunInfo", qIncludeLastRunInfo); 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.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.ObjectActionKeys != nil { - - // binding items for objectActionKeys - joinedObjectActionKeys := o.bindParamObjectActionKeys(reg) - - // query array param objectActionKeys - if err := r.SetQueryParam("objectActionKeys", joinedObjectActionKeys...); err != nil { - return err - } - } - - if o.OnlyAutoProtectedObjects != nil { - - // query param onlyAutoProtectedObjects - var qrOnlyAutoProtectedObjects bool - - if o.OnlyAutoProtectedObjects != nil { - qrOnlyAutoProtectedObjects = *o.OnlyAutoProtectedObjects - } - qOnlyAutoProtectedObjects := swag.FormatBool(qrOnlyAutoProtectedObjects) - if qOnlyAutoProtectedObjects != "" { - - if err := r.SetQueryParam("onlyAutoProtectedObjects", qOnlyAutoProtectedObjects); err != nil { - return err - } - } - } - - if o.OnlyLeafObjects != nil { - - // query param onlyLeafObjects - var qrOnlyLeafObjects bool - - if o.OnlyLeafObjects != nil { - qrOnlyLeafObjects = *o.OnlyLeafObjects - } - qOnlyLeafObjects := swag.FormatBool(qrOnlyLeafObjects) - if qOnlyLeafObjects != "" { - - if err := r.SetQueryParam("onlyLeafObjects", qOnlyLeafObjects); err != nil { - return err - } - } - } - - if o.OnlyProtectedObjects != nil { - - // query param onlyProtectedObjects - var qrOnlyProtectedObjects bool - - if o.OnlyProtectedObjects != nil { - qrOnlyProtectedObjects = *o.OnlyProtectedObjects - } - qOnlyProtectedObjects := swag.FormatBool(qrOnlyProtectedObjects) - if qOnlyProtectedObjects != "" { - - if err := r.SetQueryParam("onlyProtectedObjects", qOnlyProtectedObjects); err != nil { - return err - } - } - } - - if o.ParentID != nil { - - // query param parentId - var qrParentID int64 - - if o.ParentID != nil { - qrParentID = *o.ParentID - } - qParentID := swag.FormatInt64(qrParentID) - if qParentID != "" { - - if err := r.SetQueryParam("parentId", qParentID); err != nil { - return err - } - } - } - - if o.PolicyIds != nil { - - // binding items for policyIds - joinedPolicyIds := o.bindParamPolicyIds(reg) - - // query array param policyIds - if err := r.SetQueryParam("policyIds", joinedPolicyIds...); err != nil { - return err - } - } - - if o.RegionIds != nil { - - // binding items for regionIds - joinedRegionIds := o.bindParamRegionIds(reg) - - // query array param regionIds - if err := r.SetQueryParam("regionIds", joinedRegionIds...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.StorageDomainID != nil { - - // query param storageDomainId - var qrStorageDomainID int64 - - if o.StorageDomainID != nil { - qrStorageDomainID = *o.StorageDomainID - } - qStorageDomainID := swag.FormatInt64(qrStorageDomainID) - if qStorageDomainID != "" { - - if err := r.SetQueryParam("storageDomainId", qStorageDomainID); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter environments -func (o *GetProtectedObjectsOfAnyTypeParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter ids -func (o *GetProtectedObjectsOfAnyTypeParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter objectActionKeys -func (o *GetProtectedObjectsOfAnyTypeParams) bindParamObjectActionKeys(formats strfmt.Registry) []string { - objectActionKeysIR := o.ObjectActionKeys - - var objectActionKeysIC []string - for _, objectActionKeysIIR := range objectActionKeysIR { // explode []string - - objectActionKeysIIV := objectActionKeysIIR // string as string - objectActionKeysIC = append(objectActionKeysIC, objectActionKeysIIV) - } - - // items.CollectionFormat: "" - objectActionKeysIS := swag.JoinByFormat(objectActionKeysIC, "") - - return objectActionKeysIS -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter policyIds -func (o *GetProtectedObjectsOfAnyTypeParams) bindParamPolicyIds(formats strfmt.Registry) []string { - policyIdsIR := o.PolicyIds - - var policyIdsIC []string - for _, policyIdsIIR := range policyIdsIR { // explode []string - - policyIdsIIV := policyIdsIIR // string as string - policyIdsIC = append(policyIdsIC, policyIdsIIV) - } - - // items.CollectionFormat: "" - policyIdsIS := swag.JoinByFormat(policyIdsIC, "") - - return policyIdsIS -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter regionIds -func (o *GetProtectedObjectsOfAnyTypeParams) bindParamRegionIds(formats strfmt.Registry) []string { - regionIdsIR := o.RegionIds - - var regionIdsIC []string - for _, regionIdsIIR := range regionIdsIR { // explode []string - - regionIdsIIV := regionIdsIIR // string as string - regionIdsIC = append(regionIdsIC, regionIdsIIV) - } - - // items.CollectionFormat: "" - regionIdsIS := swag.JoinByFormat(regionIdsIC, "") - - return regionIdsIS -} - -// bindParamGetProtectedObjectsOfAnyType binds the parameter tenantIds -func (o *GetProtectedObjectsOfAnyTypeParams) 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/client/object/get_protected_objects_of_any_type_responses.go b/v2/client/object/get_protected_objects_of_any_type_responses.go deleted file mode 100644 index 91e0bff0..00000000 --- a/v2/client/object/get_protected_objects_of_any_type_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectedObjectsOfAnyTypeReader is a Reader for the GetProtectedObjectsOfAnyType structure. -type GetProtectedObjectsOfAnyTypeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectedObjectsOfAnyTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectedObjectsOfAnyTypeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectedObjectsOfAnyTypeDefault(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 - } -} - -// NewGetProtectedObjectsOfAnyTypeOK creates a GetProtectedObjectsOfAnyTypeOK with default headers values -func NewGetProtectedObjectsOfAnyTypeOK() *GetProtectedObjectsOfAnyTypeOK { - return &GetProtectedObjectsOfAnyTypeOK{} -} - -/* -GetProtectedObjectsOfAnyTypeOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectedObjectsOfAnyTypeOK struct { - Payload *models.GetProtectedObjectsResponse -} - -// IsSuccess returns true when this get protected objects of any type o k response has a 2xx status code -func (o *GetProtectedObjectsOfAnyTypeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protected objects of any type o k response has a 3xx status code -func (o *GetProtectedObjectsOfAnyTypeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protected objects of any type o k response has a 4xx status code -func (o *GetProtectedObjectsOfAnyTypeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protected objects of any type o k response has a 5xx status code -func (o *GetProtectedObjectsOfAnyTypeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protected objects of any type o k response a status code equal to that given -func (o *GetProtectedObjectsOfAnyTypeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protected objects of any type o k response -func (o *GetProtectedObjectsOfAnyTypeOK) Code() int { - return 200 -} - -func (o *GetProtectedObjectsOfAnyTypeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects][%d] getProtectedObjectsOfAnyTypeOK %s", 200, payload) -} - -func (o *GetProtectedObjectsOfAnyTypeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects][%d] getProtectedObjectsOfAnyTypeOK %s", 200, payload) -} - -func (o *GetProtectedObjectsOfAnyTypeOK) GetPayload() *models.GetProtectedObjectsResponse { - return o.Payload -} - -func (o *GetProtectedObjectsOfAnyTypeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetProtectedObjectsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectedObjectsOfAnyTypeDefault creates a GetProtectedObjectsOfAnyTypeDefault with default headers values -func NewGetProtectedObjectsOfAnyTypeDefault(code int) *GetProtectedObjectsOfAnyTypeDefault { - return &GetProtectedObjectsOfAnyTypeDefault{ - _statusCode: code, - } -} - -/* -GetProtectedObjectsOfAnyTypeDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectedObjectsOfAnyTypeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protected objects of any type default response has a 2xx status code -func (o *GetProtectedObjectsOfAnyTypeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protected objects of any type default response has a 3xx status code -func (o *GetProtectedObjectsOfAnyTypeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protected objects of any type default response has a 4xx status code -func (o *GetProtectedObjectsOfAnyTypeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protected objects of any type default response has a 5xx status code -func (o *GetProtectedObjectsOfAnyTypeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protected objects of any type default response a status code equal to that given -func (o *GetProtectedObjectsOfAnyTypeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protected objects of any type default response -func (o *GetProtectedObjectsOfAnyTypeDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectedObjectsOfAnyTypeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects][%d] GetProtectedObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsOfAnyTypeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/objects][%d] GetProtectedObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *GetProtectedObjectsOfAnyTypeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectedObjectsOfAnyTypeDefault) 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/object/get_snapshot_diff_parameters.go b/v2/client/object/get_snapshot_diff_parameters.go deleted file mode 100644 index 9d989c9c..00000000 --- a/v2/client/object/get_snapshot_diff_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewGetSnapshotDiffParams creates a new GetSnapshotDiffParams 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 NewGetSnapshotDiffParams() *GetSnapshotDiffParams { - return &GetSnapshotDiffParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSnapshotDiffParamsWithTimeout creates a new GetSnapshotDiffParams object -// with the ability to set a timeout on a request. -func NewGetSnapshotDiffParamsWithTimeout(timeout time.Duration) *GetSnapshotDiffParams { - return &GetSnapshotDiffParams{ - timeout: timeout, - } -} - -// NewGetSnapshotDiffParamsWithContext creates a new GetSnapshotDiffParams object -// with the ability to set a context for a request. -func NewGetSnapshotDiffParamsWithContext(ctx context.Context) *GetSnapshotDiffParams { - return &GetSnapshotDiffParams{ - Context: ctx, - } -} - -// NewGetSnapshotDiffParamsWithHTTPClient creates a new GetSnapshotDiffParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSnapshotDiffParamsWithHTTPClient(client *http.Client) *GetSnapshotDiffParams { - return &GetSnapshotDiffParams{ - HTTPClient: client, - } -} - -/* -GetSnapshotDiffParams contains all the parameters to send to the API endpoint - - for the get snapshot diff operation. - - Typically these are written to a http.Request. -*/ -type GetSnapshotDiffParams struct { - - // Body. - Body *models.SnapshotDiffParams - - // ID. - // - // Format: int64 - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get snapshot diff params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSnapshotDiffParams) WithDefaults() *GetSnapshotDiffParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get snapshot diff params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSnapshotDiffParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get snapshot diff params -func (o *GetSnapshotDiffParams) WithTimeout(timeout time.Duration) *GetSnapshotDiffParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get snapshot diff params -func (o *GetSnapshotDiffParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get snapshot diff params -func (o *GetSnapshotDiffParams) WithContext(ctx context.Context) *GetSnapshotDiffParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get snapshot diff params -func (o *GetSnapshotDiffParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get snapshot diff params -func (o *GetSnapshotDiffParams) WithHTTPClient(client *http.Client) *GetSnapshotDiffParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get snapshot diff params -func (o *GetSnapshotDiffParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get snapshot diff params -func (o *GetSnapshotDiffParams) WithBody(body *models.SnapshotDiffParams) *GetSnapshotDiffParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get snapshot diff params -func (o *GetSnapshotDiffParams) SetBody(body *models.SnapshotDiffParams) { - o.Body = body -} - -// WithID adds the id to the get snapshot diff params -func (o *GetSnapshotDiffParams) WithID(id int64) *GetSnapshotDiffParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get snapshot diff params -func (o *GetSnapshotDiffParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSnapshotDiffParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/get_snapshot_diff_responses.go b/v2/client/object/get_snapshot_diff_responses.go deleted file mode 100644 index e46101ca..00000000 --- a/v2/client/object/get_snapshot_diff_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSnapshotDiffReader is a Reader for the GetSnapshotDiff structure. -type GetSnapshotDiffReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSnapshotDiffReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSnapshotDiffOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSnapshotDiffDefault(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 - } -} - -// NewGetSnapshotDiffOK creates a GetSnapshotDiffOK with default headers values -func NewGetSnapshotDiffOK() *GetSnapshotDiffOK { - return &GetSnapshotDiffOK{} -} - -/* -GetSnapshotDiffOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSnapshotDiffOK struct { - Payload *models.SnapshotDiffResult -} - -// IsSuccess returns true when this get snapshot diff o k response has a 2xx status code -func (o *GetSnapshotDiffOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get snapshot diff o k response has a 3xx status code -func (o *GetSnapshotDiffOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get snapshot diff o k response has a 4xx status code -func (o *GetSnapshotDiffOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get snapshot diff o k response has a 5xx status code -func (o *GetSnapshotDiffOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get snapshot diff o k response a status code equal to that given -func (o *GetSnapshotDiffOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get snapshot diff o k response -func (o *GetSnapshotDiffOK) Code() int { - return 200 -} - -func (o *GetSnapshotDiffOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/snapshot-diff][%d] getSnapshotDiffOK %s", 200, payload) -} - -func (o *GetSnapshotDiffOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/snapshot-diff][%d] getSnapshotDiffOK %s", 200, payload) -} - -func (o *GetSnapshotDiffOK) GetPayload() *models.SnapshotDiffResult { - return o.Payload -} - -func (o *GetSnapshotDiffOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SnapshotDiffResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSnapshotDiffDefault creates a GetSnapshotDiffDefault with default headers values -func NewGetSnapshotDiffDefault(code int) *GetSnapshotDiffDefault { - return &GetSnapshotDiffDefault{ - _statusCode: code, - } -} - -/* -GetSnapshotDiffDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSnapshotDiffDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get snapshot diff default response has a 2xx status code -func (o *GetSnapshotDiffDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get snapshot diff default response has a 3xx status code -func (o *GetSnapshotDiffDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get snapshot diff default response has a 4xx status code -func (o *GetSnapshotDiffDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get snapshot diff default response has a 5xx status code -func (o *GetSnapshotDiffDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get snapshot diff default response a status code equal to that given -func (o *GetSnapshotDiffDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get snapshot diff default response -func (o *GetSnapshotDiffDefault) Code() int { - return o._statusCode -} - -func (o *GetSnapshotDiffDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/snapshot-diff][%d] GetSnapshotDiff default %s", o._statusCode, payload) -} - -func (o *GetSnapshotDiffDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/snapshot-diff][%d] GetSnapshotDiff default %s", o._statusCode, payload) -} - -func (o *GetSnapshotDiffDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSnapshotDiffDefault) 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/object/get_source_hierarchy_objects_parameters.go b/v2/client/object/get_source_hierarchy_objects_parameters.go deleted file mode 100644 index f029ede6..00000000 --- a/v2/client/object/get_source_hierarchy_objects_parameters.go +++ /dev/null @@ -1,1563 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" -) - -// NewGetSourceHierarchyObjectsParams creates a new GetSourceHierarchyObjectsParams 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 NewGetSourceHierarchyObjectsParams() *GetSourceHierarchyObjectsParams { - return &GetSourceHierarchyObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSourceHierarchyObjectsParamsWithTimeout creates a new GetSourceHierarchyObjectsParams object -// with the ability to set a timeout on a request. -func NewGetSourceHierarchyObjectsParamsWithTimeout(timeout time.Duration) *GetSourceHierarchyObjectsParams { - return &GetSourceHierarchyObjectsParams{ - timeout: timeout, - } -} - -// NewGetSourceHierarchyObjectsParamsWithContext creates a new GetSourceHierarchyObjectsParams object -// with the ability to set a context for a request. -func NewGetSourceHierarchyObjectsParamsWithContext(ctx context.Context) *GetSourceHierarchyObjectsParams { - return &GetSourceHierarchyObjectsParams{ - Context: ctx, - } -} - -// NewGetSourceHierarchyObjectsParamsWithHTTPClient creates a new GetSourceHierarchyObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSourceHierarchyObjectsParamsWithHTTPClient(client *http.Client) *GetSourceHierarchyObjectsParams { - return &GetSourceHierarchyObjectsParams{ - HTTPClient: client, - } -} - -/* -GetSourceHierarchyObjectsParams contains all the parameters to send to the API endpoint - - for the get source hierarchy objects operation. - - Typically these are written to a http.Request. -*/ -type GetSourceHierarchyObjectsParams struct { - - /* AcropolisObjectTypes. - - Specifies the Acropolis object types to filter objects. - */ - AcropolisObjectTypes []string - - /* AdObjectTypes. - - Specifies the AD object types to filter objects. - */ - AdObjectTypes []string - - /* AwsObjectTypes. - - Specifies the AWS object types to filter objects. - */ - AwsObjectTypes []string - - /* AzureObjectTypes. - - Specifies the Azure object types to filter objects. - */ - AzureObjectTypes []string - - /* CassandraObjectTypes. - - Specifies the Cassandra object types to filter objects. - */ - CassandraObjectTypes []string - - /* CouchbaseObjectTypes. - - Specifies the Couchbase object types to filter objects. - */ - CouchbaseObjectTypes []string - - /* ElastifileObjectTypes. - - Specifies the Elastifile object types to filter objects. - */ - ElastifileObjectTypes []string - - /* ExchangeObjectTypes. - - Specifies the Exchange object types to filter objects. - */ - ExchangeObjectTypes []string - - /* FlashbladeObjectTypes. - - Specifies the Flashblade object types to filter objects. - */ - FlashbladeObjectTypes []string - - /* GcpObjectTypes. - - Specifies the GCP object types to filter objects. - */ - GcpObjectTypes []string - - /* GenericNasObjectTypes. - - Specifies the generic NAS object types to filter objects. - */ - GenericNasObjectTypes []string - - /* GpfsObjectTypes. - - Specifies the GPFS object types to filter objects. - */ - GpfsObjectTypes []string - - /* HbaseObjectTypes. - - Specifies the Hbase object types to filter objects. - */ - HbaseObjectTypes []string - - /* HdfsObjectTypes. - - Specifies the HDFS object types to filter objects. - */ - HdfsObjectTypes []string - - /* HiveObjectTypes. - - Specifies the Hive object types to filter objects. - */ - HiveObjectTypes []string - - /* HypervObjectTypes. - - Specifies the HyperV object types to filter objects. - */ - HypervObjectTypes []string - - /* IncludeTenants. - - If true, the response will include Objects which belongs to all tenants which the current user has permission to see. - */ - IncludeTenants *bool - - /* IsilonObjectTypes. - - Specifies the Isilon object types to filter objects. - */ - IsilonObjectTypes []string - - /* KubernetesObjectTypes. - - Specifies the Kubernetes object types to filter objects. - */ - KubernetesObjectTypes []string - - /* KvmObjectTypes. - - Specifies the KVM object types to filter objects. - */ - KvmObjectTypes []string - - /* MongodbObjectTypes. - - Specifies the Mongo DB object types to filter objects. - */ - MongodbObjectTypes []string - - /* MssqlObjectTypes. - - Specifies the MSSQL object types to filter objects. - */ - MssqlObjectTypes []string - - /* NetappObjectTypes. - - Specifies the Netapp object types to filter objects. - */ - NetappObjectTypes []string - - /* NimbleObjectTypes. - - Specifies the Nimble object types to filter objects. - */ - NimbleObjectTypes []string - - /* O365ObjectTypes. - - Specifies the Office 365 object types to filter objects. - */ - O365ObjectTypes []string - - /* OracleObjectTypes. - - Specifies the Oracle object types to filter objects. - */ - OracleObjectTypes []string - - /* ParentID. - - Specifies the parent ID under which objects should be returned. - - Format: int64 - */ - ParentID *int64 - - /* PhysicalObjectTypes. - - Specifies the Physical object types to filter objects. - */ - PhysicalObjectTypes []string - - /* PureObjectTypes. - - Specifies the Pure object types to filter objects. - */ - PureObjectTypes []string - - /* SourceID. - - Specifies the source ID for which objects should be returned. - - Format: int64 - */ - SourceID 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. - */ - UseCachedData *bool - - /* VmwareObjectTypes. - - Specifies the VMware object types to filter objects. - */ - VmwareObjectTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get source hierarchy objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceHierarchyObjectsParams) WithDefaults() *GetSourceHierarchyObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get source hierarchy objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceHierarchyObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithTimeout(timeout time.Duration) *GetSourceHierarchyObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithContext(ctx context.Context) *GetSourceHierarchyObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithHTTPClient(client *http.Client) *GetSourceHierarchyObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAcropolisObjectTypes adds the acropolisObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithAcropolisObjectTypes(acropolisObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetAcropolisObjectTypes(acropolisObjectTypes) - return o -} - -// SetAcropolisObjectTypes adds the acropolisObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetAcropolisObjectTypes(acropolisObjectTypes []string) { - o.AcropolisObjectTypes = acropolisObjectTypes -} - -// WithAdObjectTypes adds the adObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithAdObjectTypes(adObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetAdObjectTypes(adObjectTypes) - return o -} - -// SetAdObjectTypes adds the adObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetAdObjectTypes(adObjectTypes []string) { - o.AdObjectTypes = adObjectTypes -} - -// WithAwsObjectTypes adds the awsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithAwsObjectTypes(awsObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetAwsObjectTypes(awsObjectTypes) - return o -} - -// SetAwsObjectTypes adds the awsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetAwsObjectTypes(awsObjectTypes []string) { - o.AwsObjectTypes = awsObjectTypes -} - -// WithAzureObjectTypes adds the azureObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithAzureObjectTypes(azureObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetAzureObjectTypes(azureObjectTypes) - return o -} - -// SetAzureObjectTypes adds the azureObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetAzureObjectTypes(azureObjectTypes []string) { - o.AzureObjectTypes = azureObjectTypes -} - -// WithCassandraObjectTypes adds the cassandraObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithCassandraObjectTypes(cassandraObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetCassandraObjectTypes(cassandraObjectTypes) - return o -} - -// SetCassandraObjectTypes adds the cassandraObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetCassandraObjectTypes(cassandraObjectTypes []string) { - o.CassandraObjectTypes = cassandraObjectTypes -} - -// WithCouchbaseObjectTypes adds the couchbaseObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithCouchbaseObjectTypes(couchbaseObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetCouchbaseObjectTypes(couchbaseObjectTypes) - return o -} - -// SetCouchbaseObjectTypes adds the couchbaseObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetCouchbaseObjectTypes(couchbaseObjectTypes []string) { - o.CouchbaseObjectTypes = couchbaseObjectTypes -} - -// WithElastifileObjectTypes adds the elastifileObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithElastifileObjectTypes(elastifileObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetElastifileObjectTypes(elastifileObjectTypes) - return o -} - -// SetElastifileObjectTypes adds the elastifileObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetElastifileObjectTypes(elastifileObjectTypes []string) { - o.ElastifileObjectTypes = elastifileObjectTypes -} - -// WithExchangeObjectTypes adds the exchangeObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithExchangeObjectTypes(exchangeObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetExchangeObjectTypes(exchangeObjectTypes) - return o -} - -// SetExchangeObjectTypes adds the exchangeObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetExchangeObjectTypes(exchangeObjectTypes []string) { - o.ExchangeObjectTypes = exchangeObjectTypes -} - -// WithFlashbladeObjectTypes adds the flashbladeObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithFlashbladeObjectTypes(flashbladeObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetFlashbladeObjectTypes(flashbladeObjectTypes) - return o -} - -// SetFlashbladeObjectTypes adds the flashbladeObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetFlashbladeObjectTypes(flashbladeObjectTypes []string) { - o.FlashbladeObjectTypes = flashbladeObjectTypes -} - -// WithGcpObjectTypes adds the gcpObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithGcpObjectTypes(gcpObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetGcpObjectTypes(gcpObjectTypes) - return o -} - -// SetGcpObjectTypes adds the gcpObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetGcpObjectTypes(gcpObjectTypes []string) { - o.GcpObjectTypes = gcpObjectTypes -} - -// WithGenericNasObjectTypes adds the genericNasObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithGenericNasObjectTypes(genericNasObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetGenericNasObjectTypes(genericNasObjectTypes) - return o -} - -// SetGenericNasObjectTypes adds the genericNasObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetGenericNasObjectTypes(genericNasObjectTypes []string) { - o.GenericNasObjectTypes = genericNasObjectTypes -} - -// WithGpfsObjectTypes adds the gpfsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithGpfsObjectTypes(gpfsObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetGpfsObjectTypes(gpfsObjectTypes) - return o -} - -// SetGpfsObjectTypes adds the gpfsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetGpfsObjectTypes(gpfsObjectTypes []string) { - o.GpfsObjectTypes = gpfsObjectTypes -} - -// WithHbaseObjectTypes adds the hbaseObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithHbaseObjectTypes(hbaseObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetHbaseObjectTypes(hbaseObjectTypes) - return o -} - -// SetHbaseObjectTypes adds the hbaseObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetHbaseObjectTypes(hbaseObjectTypes []string) { - o.HbaseObjectTypes = hbaseObjectTypes -} - -// WithHdfsObjectTypes adds the hdfsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithHdfsObjectTypes(hdfsObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetHdfsObjectTypes(hdfsObjectTypes) - return o -} - -// SetHdfsObjectTypes adds the hdfsObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetHdfsObjectTypes(hdfsObjectTypes []string) { - o.HdfsObjectTypes = hdfsObjectTypes -} - -// WithHiveObjectTypes adds the hiveObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithHiveObjectTypes(hiveObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetHiveObjectTypes(hiveObjectTypes) - return o -} - -// SetHiveObjectTypes adds the hiveObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetHiveObjectTypes(hiveObjectTypes []string) { - o.HiveObjectTypes = hiveObjectTypes -} - -// WithHypervObjectTypes adds the hypervObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithHypervObjectTypes(hypervObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetHypervObjectTypes(hypervObjectTypes) - return o -} - -// SetHypervObjectTypes adds the hypervObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetHypervObjectTypes(hypervObjectTypes []string) { - o.HypervObjectTypes = hypervObjectTypes -} - -// WithIncludeTenants adds the includeTenants to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithIncludeTenants(includeTenants *bool) *GetSourceHierarchyObjectsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIsilonObjectTypes adds the isilonObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithIsilonObjectTypes(isilonObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetIsilonObjectTypes(isilonObjectTypes) - return o -} - -// SetIsilonObjectTypes adds the isilonObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetIsilonObjectTypes(isilonObjectTypes []string) { - o.IsilonObjectTypes = isilonObjectTypes -} - -// WithKubernetesObjectTypes adds the kubernetesObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithKubernetesObjectTypes(kubernetesObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetKubernetesObjectTypes(kubernetesObjectTypes) - return o -} - -// SetKubernetesObjectTypes adds the kubernetesObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetKubernetesObjectTypes(kubernetesObjectTypes []string) { - o.KubernetesObjectTypes = kubernetesObjectTypes -} - -// WithKvmObjectTypes adds the kvmObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithKvmObjectTypes(kvmObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetKvmObjectTypes(kvmObjectTypes) - return o -} - -// SetKvmObjectTypes adds the kvmObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetKvmObjectTypes(kvmObjectTypes []string) { - o.KvmObjectTypes = kvmObjectTypes -} - -// WithMongodbObjectTypes adds the mongodbObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithMongodbObjectTypes(mongodbObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetMongodbObjectTypes(mongodbObjectTypes) - return o -} - -// SetMongodbObjectTypes adds the mongodbObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetMongodbObjectTypes(mongodbObjectTypes []string) { - o.MongodbObjectTypes = mongodbObjectTypes -} - -// WithMssqlObjectTypes adds the mssqlObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithMssqlObjectTypes(mssqlObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetMssqlObjectTypes(mssqlObjectTypes) - return o -} - -// SetMssqlObjectTypes adds the mssqlObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetMssqlObjectTypes(mssqlObjectTypes []string) { - o.MssqlObjectTypes = mssqlObjectTypes -} - -// WithNetappObjectTypes adds the netappObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithNetappObjectTypes(netappObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetNetappObjectTypes(netappObjectTypes) - return o -} - -// SetNetappObjectTypes adds the netappObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetNetappObjectTypes(netappObjectTypes []string) { - o.NetappObjectTypes = netappObjectTypes -} - -// WithNimbleObjectTypes adds the nimbleObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithNimbleObjectTypes(nimbleObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetNimbleObjectTypes(nimbleObjectTypes) - return o -} - -// SetNimbleObjectTypes adds the nimbleObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetNimbleObjectTypes(nimbleObjectTypes []string) { - o.NimbleObjectTypes = nimbleObjectTypes -} - -// WithO365ObjectTypes adds the o365ObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithO365ObjectTypes(o365ObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetO365ObjectTypes(o365ObjectTypes) - return o -} - -// SetO365ObjectTypes adds the o365ObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetO365ObjectTypes(o365ObjectTypes []string) { - o.O365ObjectTypes = o365ObjectTypes -} - -// WithOracleObjectTypes adds the oracleObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithOracleObjectTypes(oracleObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetOracleObjectTypes(oracleObjectTypes) - return o -} - -// SetOracleObjectTypes adds the oracleObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetOracleObjectTypes(oracleObjectTypes []string) { - o.OracleObjectTypes = oracleObjectTypes -} - -// WithParentID adds the parentID to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithParentID(parentID *int64) *GetSourceHierarchyObjectsParams { - o.SetParentID(parentID) - return o -} - -// SetParentID adds the parentId to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetParentID(parentID *int64) { - o.ParentID = parentID -} - -// WithPhysicalObjectTypes adds the physicalObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithPhysicalObjectTypes(physicalObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetPhysicalObjectTypes(physicalObjectTypes) - return o -} - -// SetPhysicalObjectTypes adds the physicalObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetPhysicalObjectTypes(physicalObjectTypes []string) { - o.PhysicalObjectTypes = physicalObjectTypes -} - -// WithPureObjectTypes adds the pureObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithPureObjectTypes(pureObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetPureObjectTypes(pureObjectTypes) - return o -} - -// SetPureObjectTypes adds the pureObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetPureObjectTypes(pureObjectTypes []string) { - o.PureObjectTypes = pureObjectTypes -} - -// WithSourceID adds the sourceID to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithSourceID(sourceID int64) *GetSourceHierarchyObjectsParams { - o.SetSourceID(sourceID) - return o -} - -// SetSourceID adds the sourceId to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetSourceID(sourceID int64) { - o.SourceID = sourceID -} - -// WithTenantIds adds the tenantIds to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithTenantIds(tenantIds []string) *GetSourceHierarchyObjectsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithUseCachedData(useCachedData *bool) *GetSourceHierarchyObjectsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WithVmwareObjectTypes adds the vmwareObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) WithVmwareObjectTypes(vmwareObjectTypes []string) *GetSourceHierarchyObjectsParams { - o.SetVmwareObjectTypes(vmwareObjectTypes) - return o -} - -// SetVmwareObjectTypes adds the vmwareObjectTypes to the get source hierarchy objects params -func (o *GetSourceHierarchyObjectsParams) SetVmwareObjectTypes(vmwareObjectTypes []string) { - o.VmwareObjectTypes = vmwareObjectTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSourceHierarchyObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AcropolisObjectTypes != nil { - - // binding items for acropolisObjectTypes - joinedAcropolisObjectTypes := o.bindParamAcropolisObjectTypes(reg) - - // query array param acropolisObjectTypes - if err := r.SetQueryParam("acropolisObjectTypes", joinedAcropolisObjectTypes...); err != nil { - return err - } - } - - if o.AdObjectTypes != nil { - - // binding items for adObjectTypes - joinedAdObjectTypes := o.bindParamAdObjectTypes(reg) - - // query array param adObjectTypes - if err := r.SetQueryParam("adObjectTypes", joinedAdObjectTypes...); err != nil { - return err - } - } - - if o.AwsObjectTypes != nil { - - // binding items for awsObjectTypes - joinedAwsObjectTypes := o.bindParamAwsObjectTypes(reg) - - // query array param awsObjectTypes - if err := r.SetQueryParam("awsObjectTypes", joinedAwsObjectTypes...); err != nil { - return err - } - } - - if o.AzureObjectTypes != nil { - - // binding items for azureObjectTypes - joinedAzureObjectTypes := o.bindParamAzureObjectTypes(reg) - - // query array param azureObjectTypes - if err := r.SetQueryParam("azureObjectTypes", joinedAzureObjectTypes...); err != nil { - return err - } - } - - if o.CassandraObjectTypes != nil { - - // binding items for cassandraObjectTypes - joinedCassandraObjectTypes := o.bindParamCassandraObjectTypes(reg) - - // query array param cassandraObjectTypes - if err := r.SetQueryParam("cassandraObjectTypes", joinedCassandraObjectTypes...); err != nil { - return err - } - } - - if o.CouchbaseObjectTypes != nil { - - // binding items for couchbaseObjectTypes - joinedCouchbaseObjectTypes := o.bindParamCouchbaseObjectTypes(reg) - - // query array param couchbaseObjectTypes - if err := r.SetQueryParam("couchbaseObjectTypes", joinedCouchbaseObjectTypes...); err != nil { - return err - } - } - - if o.ElastifileObjectTypes != nil { - - // binding items for elastifileObjectTypes - joinedElastifileObjectTypes := o.bindParamElastifileObjectTypes(reg) - - // query array param elastifileObjectTypes - if err := r.SetQueryParam("elastifileObjectTypes", joinedElastifileObjectTypes...); err != nil { - return err - } - } - - if o.ExchangeObjectTypes != nil { - - // binding items for exchangeObjectTypes - joinedExchangeObjectTypes := o.bindParamExchangeObjectTypes(reg) - - // query array param exchangeObjectTypes - if err := r.SetQueryParam("exchangeObjectTypes", joinedExchangeObjectTypes...); err != nil { - return err - } - } - - if o.FlashbladeObjectTypes != nil { - - // binding items for flashbladeObjectTypes - joinedFlashbladeObjectTypes := o.bindParamFlashbladeObjectTypes(reg) - - // query array param flashbladeObjectTypes - if err := r.SetQueryParam("flashbladeObjectTypes", joinedFlashbladeObjectTypes...); err != nil { - return err - } - } - - if o.GcpObjectTypes != nil { - - // binding items for gcpObjectTypes - joinedGcpObjectTypes := o.bindParamGcpObjectTypes(reg) - - // query array param gcpObjectTypes - if err := r.SetQueryParam("gcpObjectTypes", joinedGcpObjectTypes...); err != nil { - return err - } - } - - if o.GenericNasObjectTypes != nil { - - // binding items for genericNasObjectTypes - joinedGenericNasObjectTypes := o.bindParamGenericNasObjectTypes(reg) - - // query array param genericNasObjectTypes - if err := r.SetQueryParam("genericNasObjectTypes", joinedGenericNasObjectTypes...); err != nil { - return err - } - } - - if o.GpfsObjectTypes != nil { - - // binding items for gpfsObjectTypes - joinedGpfsObjectTypes := o.bindParamGpfsObjectTypes(reg) - - // query array param gpfsObjectTypes - if err := r.SetQueryParam("gpfsObjectTypes", joinedGpfsObjectTypes...); err != nil { - return err - } - } - - if o.HbaseObjectTypes != nil { - - // binding items for hbaseObjectTypes - joinedHbaseObjectTypes := o.bindParamHbaseObjectTypes(reg) - - // query array param hbaseObjectTypes - if err := r.SetQueryParam("hbaseObjectTypes", joinedHbaseObjectTypes...); err != nil { - return err - } - } - - if o.HdfsObjectTypes != nil { - - // binding items for hdfsObjectTypes - joinedHdfsObjectTypes := o.bindParamHdfsObjectTypes(reg) - - // query array param hdfsObjectTypes - if err := r.SetQueryParam("hdfsObjectTypes", joinedHdfsObjectTypes...); err != nil { - return err - } - } - - if o.HiveObjectTypes != nil { - - // binding items for hiveObjectTypes - joinedHiveObjectTypes := o.bindParamHiveObjectTypes(reg) - - // query array param hiveObjectTypes - if err := r.SetQueryParam("hiveObjectTypes", joinedHiveObjectTypes...); err != nil { - return err - } - } - - if o.HypervObjectTypes != nil { - - // binding items for hypervObjectTypes - joinedHypervObjectTypes := o.bindParamHypervObjectTypes(reg) - - // query array param hypervObjectTypes - if err := r.SetQueryParam("hypervObjectTypes", joinedHypervObjectTypes...); 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.IsilonObjectTypes != nil { - - // binding items for isilonObjectTypes - joinedIsilonObjectTypes := o.bindParamIsilonObjectTypes(reg) - - // query array param isilonObjectTypes - if err := r.SetQueryParam("isilonObjectTypes", joinedIsilonObjectTypes...); err != nil { - return err - } - } - - if o.KubernetesObjectTypes != nil { - - // binding items for kubernetesObjectTypes - joinedKubernetesObjectTypes := o.bindParamKubernetesObjectTypes(reg) - - // query array param kubernetesObjectTypes - if err := r.SetQueryParam("kubernetesObjectTypes", joinedKubernetesObjectTypes...); err != nil { - return err - } - } - - if o.KvmObjectTypes != nil { - - // binding items for kvmObjectTypes - joinedKvmObjectTypes := o.bindParamKvmObjectTypes(reg) - - // query array param kvmObjectTypes - if err := r.SetQueryParam("kvmObjectTypes", joinedKvmObjectTypes...); err != nil { - return err - } - } - - if o.MongodbObjectTypes != nil { - - // binding items for mongodbObjectTypes - joinedMongodbObjectTypes := o.bindParamMongodbObjectTypes(reg) - - // query array param mongodbObjectTypes - if err := r.SetQueryParam("mongodbObjectTypes", joinedMongodbObjectTypes...); err != nil { - return err - } - } - - if o.MssqlObjectTypes != nil { - - // binding items for mssqlObjectTypes - joinedMssqlObjectTypes := o.bindParamMssqlObjectTypes(reg) - - // query array param mssqlObjectTypes - if err := r.SetQueryParam("mssqlObjectTypes", joinedMssqlObjectTypes...); err != nil { - return err - } - } - - if o.NetappObjectTypes != nil { - - // binding items for netappObjectTypes - joinedNetappObjectTypes := o.bindParamNetappObjectTypes(reg) - - // query array param netappObjectTypes - if err := r.SetQueryParam("netappObjectTypes", joinedNetappObjectTypes...); err != nil { - return err - } - } - - if o.NimbleObjectTypes != nil { - - // binding items for nimbleObjectTypes - joinedNimbleObjectTypes := o.bindParamNimbleObjectTypes(reg) - - // query array param nimbleObjectTypes - if err := r.SetQueryParam("nimbleObjectTypes", joinedNimbleObjectTypes...); err != nil { - return err - } - } - - if o.O365ObjectTypes != nil { - - // binding items for o365ObjectTypes - joinedO365ObjectTypes := o.bindParamO365ObjectTypes(reg) - - // query array param o365ObjectTypes - if err := r.SetQueryParam("o365ObjectTypes", joinedO365ObjectTypes...); err != nil { - return err - } - } - - if o.OracleObjectTypes != nil { - - // binding items for oracleObjectTypes - joinedOracleObjectTypes := o.bindParamOracleObjectTypes(reg) - - // query array param oracleObjectTypes - if err := r.SetQueryParam("oracleObjectTypes", joinedOracleObjectTypes...); err != nil { - return err - } - } - - if o.ParentID != nil { - - // query param parentId - var qrParentID int64 - - if o.ParentID != nil { - qrParentID = *o.ParentID - } - qParentID := swag.FormatInt64(qrParentID) - if qParentID != "" { - - if err := r.SetQueryParam("parentId", qParentID); err != nil { - return err - } - } - } - - if o.PhysicalObjectTypes != nil { - - // binding items for physicalObjectTypes - joinedPhysicalObjectTypes := o.bindParamPhysicalObjectTypes(reg) - - // query array param physicalObjectTypes - if err := r.SetQueryParam("physicalObjectTypes", joinedPhysicalObjectTypes...); err != nil { - return err - } - } - - if o.PureObjectTypes != nil { - - // binding items for pureObjectTypes - joinedPureObjectTypes := o.bindParamPureObjectTypes(reg) - - // query array param pureObjectTypes - if err := r.SetQueryParam("pureObjectTypes", joinedPureObjectTypes...); err != nil { - return err - } - } - - // path param sourceId - if err := r.SetPathParam("sourceId", swag.FormatInt64(o.SourceID)); err != nil { - return err - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if o.VmwareObjectTypes != nil { - - // binding items for vmwareObjectTypes - joinedVmwareObjectTypes := o.bindParamVmwareObjectTypes(reg) - - // query array param vmwareObjectTypes - if err := r.SetQueryParam("vmwareObjectTypes", joinedVmwareObjectTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSourceHierarchyObjects binds the parameter acropolisObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamAcropolisObjectTypes(formats strfmt.Registry) []string { - acropolisObjectTypesIR := o.AcropolisObjectTypes - - var acropolisObjectTypesIC []string - for _, acropolisObjectTypesIIR := range acropolisObjectTypesIR { // explode []string - - acropolisObjectTypesIIV := acropolisObjectTypesIIR // string as string - acropolisObjectTypesIC = append(acropolisObjectTypesIC, acropolisObjectTypesIIV) - } - - // items.CollectionFormat: "" - acropolisObjectTypesIS := swag.JoinByFormat(acropolisObjectTypesIC, "") - - return acropolisObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter adObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamAdObjectTypes(formats strfmt.Registry) []string { - adObjectTypesIR := o.AdObjectTypes - - var adObjectTypesIC []string - for _, adObjectTypesIIR := range adObjectTypesIR { // explode []string - - adObjectTypesIIV := adObjectTypesIIR // string as string - adObjectTypesIC = append(adObjectTypesIC, adObjectTypesIIV) - } - - // items.CollectionFormat: "" - adObjectTypesIS := swag.JoinByFormat(adObjectTypesIC, "") - - return adObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter awsObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamAwsObjectTypes(formats strfmt.Registry) []string { - awsObjectTypesIR := o.AwsObjectTypes - - var awsObjectTypesIC []string - for _, awsObjectTypesIIR := range awsObjectTypesIR { // explode []string - - awsObjectTypesIIV := awsObjectTypesIIR // string as string - awsObjectTypesIC = append(awsObjectTypesIC, awsObjectTypesIIV) - } - - // items.CollectionFormat: "" - awsObjectTypesIS := swag.JoinByFormat(awsObjectTypesIC, "") - - return awsObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter azureObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamAzureObjectTypes(formats strfmt.Registry) []string { - azureObjectTypesIR := o.AzureObjectTypes - - var azureObjectTypesIC []string - for _, azureObjectTypesIIR := range azureObjectTypesIR { // explode []string - - azureObjectTypesIIV := azureObjectTypesIIR // string as string - azureObjectTypesIC = append(azureObjectTypesIC, azureObjectTypesIIV) - } - - // items.CollectionFormat: "" - azureObjectTypesIS := swag.JoinByFormat(azureObjectTypesIC, "") - - return azureObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter cassandraObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamCassandraObjectTypes(formats strfmt.Registry) []string { - cassandraObjectTypesIR := o.CassandraObjectTypes - - var cassandraObjectTypesIC []string - for _, cassandraObjectTypesIIR := range cassandraObjectTypesIR { // explode []string - - cassandraObjectTypesIIV := cassandraObjectTypesIIR // string as string - cassandraObjectTypesIC = append(cassandraObjectTypesIC, cassandraObjectTypesIIV) - } - - // items.CollectionFormat: "" - cassandraObjectTypesIS := swag.JoinByFormat(cassandraObjectTypesIC, "") - - return cassandraObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter couchbaseObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamCouchbaseObjectTypes(formats strfmt.Registry) []string { - couchbaseObjectTypesIR := o.CouchbaseObjectTypes - - var couchbaseObjectTypesIC []string - for _, couchbaseObjectTypesIIR := range couchbaseObjectTypesIR { // explode []string - - couchbaseObjectTypesIIV := couchbaseObjectTypesIIR // string as string - couchbaseObjectTypesIC = append(couchbaseObjectTypesIC, couchbaseObjectTypesIIV) - } - - // items.CollectionFormat: "" - couchbaseObjectTypesIS := swag.JoinByFormat(couchbaseObjectTypesIC, "") - - return couchbaseObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter elastifileObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamElastifileObjectTypes(formats strfmt.Registry) []string { - elastifileObjectTypesIR := o.ElastifileObjectTypes - - var elastifileObjectTypesIC []string - for _, elastifileObjectTypesIIR := range elastifileObjectTypesIR { // explode []string - - elastifileObjectTypesIIV := elastifileObjectTypesIIR // string as string - elastifileObjectTypesIC = append(elastifileObjectTypesIC, elastifileObjectTypesIIV) - } - - // items.CollectionFormat: "" - elastifileObjectTypesIS := swag.JoinByFormat(elastifileObjectTypesIC, "") - - return elastifileObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter exchangeObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamExchangeObjectTypes(formats strfmt.Registry) []string { - exchangeObjectTypesIR := o.ExchangeObjectTypes - - var exchangeObjectTypesIC []string - for _, exchangeObjectTypesIIR := range exchangeObjectTypesIR { // explode []string - - exchangeObjectTypesIIV := exchangeObjectTypesIIR // string as string - exchangeObjectTypesIC = append(exchangeObjectTypesIC, exchangeObjectTypesIIV) - } - - // items.CollectionFormat: "" - exchangeObjectTypesIS := swag.JoinByFormat(exchangeObjectTypesIC, "") - - return exchangeObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter flashbladeObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamFlashbladeObjectTypes(formats strfmt.Registry) []string { - flashbladeObjectTypesIR := o.FlashbladeObjectTypes - - var flashbladeObjectTypesIC []string - for _, flashbladeObjectTypesIIR := range flashbladeObjectTypesIR { // explode []string - - flashbladeObjectTypesIIV := flashbladeObjectTypesIIR // string as string - flashbladeObjectTypesIC = append(flashbladeObjectTypesIC, flashbladeObjectTypesIIV) - } - - // items.CollectionFormat: "" - flashbladeObjectTypesIS := swag.JoinByFormat(flashbladeObjectTypesIC, "") - - return flashbladeObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter gcpObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamGcpObjectTypes(formats strfmt.Registry) []string { - gcpObjectTypesIR := o.GcpObjectTypes - - var gcpObjectTypesIC []string - for _, gcpObjectTypesIIR := range gcpObjectTypesIR { // explode []string - - gcpObjectTypesIIV := gcpObjectTypesIIR // string as string - gcpObjectTypesIC = append(gcpObjectTypesIC, gcpObjectTypesIIV) - } - - // items.CollectionFormat: "" - gcpObjectTypesIS := swag.JoinByFormat(gcpObjectTypesIC, "") - - return gcpObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter genericNasObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamGenericNasObjectTypes(formats strfmt.Registry) []string { - genericNasObjectTypesIR := o.GenericNasObjectTypes - - var genericNasObjectTypesIC []string - for _, genericNasObjectTypesIIR := range genericNasObjectTypesIR { // explode []string - - genericNasObjectTypesIIV := genericNasObjectTypesIIR // string as string - genericNasObjectTypesIC = append(genericNasObjectTypesIC, genericNasObjectTypesIIV) - } - - // items.CollectionFormat: "" - genericNasObjectTypesIS := swag.JoinByFormat(genericNasObjectTypesIC, "") - - return genericNasObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter gpfsObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamGpfsObjectTypes(formats strfmt.Registry) []string { - gpfsObjectTypesIR := o.GpfsObjectTypes - - var gpfsObjectTypesIC []string - for _, gpfsObjectTypesIIR := range gpfsObjectTypesIR { // explode []string - - gpfsObjectTypesIIV := gpfsObjectTypesIIR // string as string - gpfsObjectTypesIC = append(gpfsObjectTypesIC, gpfsObjectTypesIIV) - } - - // items.CollectionFormat: "" - gpfsObjectTypesIS := swag.JoinByFormat(gpfsObjectTypesIC, "") - - return gpfsObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter hbaseObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamHbaseObjectTypes(formats strfmt.Registry) []string { - hbaseObjectTypesIR := o.HbaseObjectTypes - - var hbaseObjectTypesIC []string - for _, hbaseObjectTypesIIR := range hbaseObjectTypesIR { // explode []string - - hbaseObjectTypesIIV := hbaseObjectTypesIIR // string as string - hbaseObjectTypesIC = append(hbaseObjectTypesIC, hbaseObjectTypesIIV) - } - - // items.CollectionFormat: "" - hbaseObjectTypesIS := swag.JoinByFormat(hbaseObjectTypesIC, "") - - return hbaseObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter hdfsObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamHdfsObjectTypes(formats strfmt.Registry) []string { - hdfsObjectTypesIR := o.HdfsObjectTypes - - var hdfsObjectTypesIC []string - for _, hdfsObjectTypesIIR := range hdfsObjectTypesIR { // explode []string - - hdfsObjectTypesIIV := hdfsObjectTypesIIR // string as string - hdfsObjectTypesIC = append(hdfsObjectTypesIC, hdfsObjectTypesIIV) - } - - // items.CollectionFormat: "" - hdfsObjectTypesIS := swag.JoinByFormat(hdfsObjectTypesIC, "") - - return hdfsObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter hiveObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamHiveObjectTypes(formats strfmt.Registry) []string { - hiveObjectTypesIR := o.HiveObjectTypes - - var hiveObjectTypesIC []string - for _, hiveObjectTypesIIR := range hiveObjectTypesIR { // explode []string - - hiveObjectTypesIIV := hiveObjectTypesIIR // string as string - hiveObjectTypesIC = append(hiveObjectTypesIC, hiveObjectTypesIIV) - } - - // items.CollectionFormat: "" - hiveObjectTypesIS := swag.JoinByFormat(hiveObjectTypesIC, "") - - return hiveObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter hypervObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamHypervObjectTypes(formats strfmt.Registry) []string { - hypervObjectTypesIR := o.HypervObjectTypes - - var hypervObjectTypesIC []string - for _, hypervObjectTypesIIR := range hypervObjectTypesIR { // explode []string - - hypervObjectTypesIIV := hypervObjectTypesIIR // string as string - hypervObjectTypesIC = append(hypervObjectTypesIC, hypervObjectTypesIIV) - } - - // items.CollectionFormat: "" - hypervObjectTypesIS := swag.JoinByFormat(hypervObjectTypesIC, "") - - return hypervObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter isilonObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamIsilonObjectTypes(formats strfmt.Registry) []string { - isilonObjectTypesIR := o.IsilonObjectTypes - - var isilonObjectTypesIC []string - for _, isilonObjectTypesIIR := range isilonObjectTypesIR { // explode []string - - isilonObjectTypesIIV := isilonObjectTypesIIR // string as string - isilonObjectTypesIC = append(isilonObjectTypesIC, isilonObjectTypesIIV) - } - - // items.CollectionFormat: "" - isilonObjectTypesIS := swag.JoinByFormat(isilonObjectTypesIC, "") - - return isilonObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter kubernetesObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamKubernetesObjectTypes(formats strfmt.Registry) []string { - kubernetesObjectTypesIR := o.KubernetesObjectTypes - - var kubernetesObjectTypesIC []string - for _, kubernetesObjectTypesIIR := range kubernetesObjectTypesIR { // explode []string - - kubernetesObjectTypesIIV := kubernetesObjectTypesIIR // string as string - kubernetesObjectTypesIC = append(kubernetesObjectTypesIC, kubernetesObjectTypesIIV) - } - - // items.CollectionFormat: "" - kubernetesObjectTypesIS := swag.JoinByFormat(kubernetesObjectTypesIC, "") - - return kubernetesObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter kvmObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamKvmObjectTypes(formats strfmt.Registry) []string { - kvmObjectTypesIR := o.KvmObjectTypes - - var kvmObjectTypesIC []string - for _, kvmObjectTypesIIR := range kvmObjectTypesIR { // explode []string - - kvmObjectTypesIIV := kvmObjectTypesIIR // string as string - kvmObjectTypesIC = append(kvmObjectTypesIC, kvmObjectTypesIIV) - } - - // items.CollectionFormat: "" - kvmObjectTypesIS := swag.JoinByFormat(kvmObjectTypesIC, "") - - return kvmObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter mongodbObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamMongodbObjectTypes(formats strfmt.Registry) []string { - mongodbObjectTypesIR := o.MongodbObjectTypes - - var mongodbObjectTypesIC []string - for _, mongodbObjectTypesIIR := range mongodbObjectTypesIR { // explode []string - - mongodbObjectTypesIIV := mongodbObjectTypesIIR // string as string - mongodbObjectTypesIC = append(mongodbObjectTypesIC, mongodbObjectTypesIIV) - } - - // items.CollectionFormat: "" - mongodbObjectTypesIS := swag.JoinByFormat(mongodbObjectTypesIC, "") - - return mongodbObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter mssqlObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamMssqlObjectTypes(formats strfmt.Registry) []string { - mssqlObjectTypesIR := o.MssqlObjectTypes - - var mssqlObjectTypesIC []string - for _, mssqlObjectTypesIIR := range mssqlObjectTypesIR { // explode []string - - mssqlObjectTypesIIV := mssqlObjectTypesIIR // string as string - mssqlObjectTypesIC = append(mssqlObjectTypesIC, mssqlObjectTypesIIV) - } - - // items.CollectionFormat: "" - mssqlObjectTypesIS := swag.JoinByFormat(mssqlObjectTypesIC, "") - - return mssqlObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter netappObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamNetappObjectTypes(formats strfmt.Registry) []string { - netappObjectTypesIR := o.NetappObjectTypes - - var netappObjectTypesIC []string - for _, netappObjectTypesIIR := range netappObjectTypesIR { // explode []string - - netappObjectTypesIIV := netappObjectTypesIIR // string as string - netappObjectTypesIC = append(netappObjectTypesIC, netappObjectTypesIIV) - } - - // items.CollectionFormat: "" - netappObjectTypesIS := swag.JoinByFormat(netappObjectTypesIC, "") - - return netappObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter nimbleObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamNimbleObjectTypes(formats strfmt.Registry) []string { - nimbleObjectTypesIR := o.NimbleObjectTypes - - var nimbleObjectTypesIC []string - for _, nimbleObjectTypesIIR := range nimbleObjectTypesIR { // explode []string - - nimbleObjectTypesIIV := nimbleObjectTypesIIR // string as string - nimbleObjectTypesIC = append(nimbleObjectTypesIC, nimbleObjectTypesIIV) - } - - // items.CollectionFormat: "" - nimbleObjectTypesIS := swag.JoinByFormat(nimbleObjectTypesIC, "") - - return nimbleObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter o365ObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamO365ObjectTypes(formats strfmt.Registry) []string { - o365ObjectTypesIR := o.O365ObjectTypes - - var o365ObjectTypesIC []string - for _, o365ObjectTypesIIR := range o365ObjectTypesIR { // explode []string - - o365ObjectTypesIIV := o365ObjectTypesIIR // string as string - o365ObjectTypesIC = append(o365ObjectTypesIC, o365ObjectTypesIIV) - } - - // items.CollectionFormat: "" - o365ObjectTypesIS := swag.JoinByFormat(o365ObjectTypesIC, "") - - return o365ObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter oracleObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamOracleObjectTypes(formats strfmt.Registry) []string { - oracleObjectTypesIR := o.OracleObjectTypes - - var oracleObjectTypesIC []string - for _, oracleObjectTypesIIR := range oracleObjectTypesIR { // explode []string - - oracleObjectTypesIIV := oracleObjectTypesIIR // string as string - oracleObjectTypesIC = append(oracleObjectTypesIC, oracleObjectTypesIIV) - } - - // items.CollectionFormat: "" - oracleObjectTypesIS := swag.JoinByFormat(oracleObjectTypesIC, "") - - return oracleObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter physicalObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamPhysicalObjectTypes(formats strfmt.Registry) []string { - physicalObjectTypesIR := o.PhysicalObjectTypes - - var physicalObjectTypesIC []string - for _, physicalObjectTypesIIR := range physicalObjectTypesIR { // explode []string - - physicalObjectTypesIIV := physicalObjectTypesIIR // string as string - physicalObjectTypesIC = append(physicalObjectTypesIC, physicalObjectTypesIIV) - } - - // items.CollectionFormat: "" - physicalObjectTypesIS := swag.JoinByFormat(physicalObjectTypesIC, "") - - return physicalObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter pureObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamPureObjectTypes(formats strfmt.Registry) []string { - pureObjectTypesIR := o.PureObjectTypes - - var pureObjectTypesIC []string - for _, pureObjectTypesIIR := range pureObjectTypesIR { // explode []string - - pureObjectTypesIIV := pureObjectTypesIIR // string as string - pureObjectTypesIC = append(pureObjectTypesIC, pureObjectTypesIIV) - } - - // items.CollectionFormat: "" - pureObjectTypesIS := swag.JoinByFormat(pureObjectTypesIC, "") - - return pureObjectTypesIS -} - -// bindParamGetSourceHierarchyObjects binds the parameter tenantIds -func (o *GetSourceHierarchyObjectsParams) 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 -} - -// bindParamGetSourceHierarchyObjects binds the parameter vmwareObjectTypes -func (o *GetSourceHierarchyObjectsParams) bindParamVmwareObjectTypes(formats strfmt.Registry) []string { - vmwareObjectTypesIR := o.VmwareObjectTypes - - var vmwareObjectTypesIC []string - for _, vmwareObjectTypesIIR := range vmwareObjectTypesIR { // explode []string - - vmwareObjectTypesIIV := vmwareObjectTypesIIR // string as string - vmwareObjectTypesIC = append(vmwareObjectTypesIC, vmwareObjectTypesIIV) - } - - // items.CollectionFormat: "" - vmwareObjectTypesIS := swag.JoinByFormat(vmwareObjectTypesIC, "") - - return vmwareObjectTypesIS -} diff --git a/v2/client/object/get_source_hierarchy_objects_responses.go b/v2/client/object/get_source_hierarchy_objects_responses.go deleted file mode 100644 index 612849b0..00000000 --- a/v2/client/object/get_source_hierarchy_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSourceHierarchyObjectsReader is a Reader for the GetSourceHierarchyObjects structure. -type GetSourceHierarchyObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSourceHierarchyObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSourceHierarchyObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSourceHierarchyObjectsDefault(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 - } -} - -// NewGetSourceHierarchyObjectsOK creates a GetSourceHierarchyObjectsOK with default headers values -func NewGetSourceHierarchyObjectsOK() *GetSourceHierarchyObjectsOK { - return &GetSourceHierarchyObjectsOK{} -} - -/* -GetSourceHierarchyObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSourceHierarchyObjectsOK struct { - Payload *models.SourceHierarchyObjectSummaries -} - -// IsSuccess returns true when this get source hierarchy objects o k response has a 2xx status code -func (o *GetSourceHierarchyObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get source hierarchy objects o k response has a 3xx status code -func (o *GetSourceHierarchyObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get source hierarchy objects o k response has a 4xx status code -func (o *GetSourceHierarchyObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get source hierarchy objects o k response has a 5xx status code -func (o *GetSourceHierarchyObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get source hierarchy objects o k response a status code equal to that given -func (o *GetSourceHierarchyObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get source hierarchy objects o k response -func (o *GetSourceHierarchyObjectsOK) Code() int { - return 200 -} - -func (o *GetSourceHierarchyObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{sourceId}/objects][%d] getSourceHierarchyObjectsOK %s", 200, payload) -} - -func (o *GetSourceHierarchyObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{sourceId}/objects][%d] getSourceHierarchyObjectsOK %s", 200, payload) -} - -func (o *GetSourceHierarchyObjectsOK) GetPayload() *models.SourceHierarchyObjectSummaries { - return o.Payload -} - -func (o *GetSourceHierarchyObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceHierarchyObjectSummaries) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSourceHierarchyObjectsDefault creates a GetSourceHierarchyObjectsDefault with default headers values -func NewGetSourceHierarchyObjectsDefault(code int) *GetSourceHierarchyObjectsDefault { - return &GetSourceHierarchyObjectsDefault{ - _statusCode: code, - } -} - -/* -GetSourceHierarchyObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSourceHierarchyObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get source hierarchy objects default response has a 2xx status code -func (o *GetSourceHierarchyObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get source hierarchy objects default response has a 3xx status code -func (o *GetSourceHierarchyObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get source hierarchy objects default response has a 4xx status code -func (o *GetSourceHierarchyObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get source hierarchy objects default response has a 5xx status code -func (o *GetSourceHierarchyObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get source hierarchy objects default response a status code equal to that given -func (o *GetSourceHierarchyObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get source hierarchy objects default response -func (o *GetSourceHierarchyObjectsDefault) Code() int { - return o._statusCode -} - -func (o *GetSourceHierarchyObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{sourceId}/objects][%d] GetSourceHierarchyObjects default %s", o._statusCode, payload) -} - -func (o *GetSourceHierarchyObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{sourceId}/objects][%d] GetSourceHierarchyObjects default %s", o._statusCode, payload) -} - -func (o *GetSourceHierarchyObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSourceHierarchyObjectsDefault) 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/object/object_client.go b/v2/client/object/object_client.go deleted file mode 100644 index 8563ef84..00000000 --- a/v2/client/object/object_client.go +++ /dev/null @@ -1,1071 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new object API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new object API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new object API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for object API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AssociateEntityMetadata(params *AssociateEntityMetadataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AssociateEntityMetadataMultiStatus, error) - - BrowseObjectContents(params *BrowseObjectContentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BrowseObjectContentsOK, error) - - CancelObjectRuns(params *CancelObjectRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelObjectRunsMultiStatus, error) - - ConstructMetaInfo(params *ConstructMetaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConstructMetaInfoOK, error) - - FilterObjects(params *FilterObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FilterObjectsOK, error) - - GetAllIndexedObjectSnapshots(params *GetAllIndexedObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllIndexedObjectSnapshotsOK, error) - - GetEntityMetadata(params *GetEntityMetadataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntityMetadataOK, error) - - GetIndexedObjectSnapshots(params *GetIndexedObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndexedObjectSnapshotsOK, error) - - GetObjectRunByRunID(params *GetObjectRunByRunIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectRunByRunIDOK, error) - - GetObjectRuns(params *GetObjectRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectRunsOK, error) - - GetObjectSnapshotInfo(params *GetObjectSnapshotInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotInfoOK, error) - - GetObjectSnapshotVolumeInfo(params *GetObjectSnapshotVolumeInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotVolumeInfoOK, error) - - GetObjectSnapshots(params *GetObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotsOK, error) - - GetObjectStats(params *GetObjectStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectStatsOK, error) - - GetObjectTree(params *GetObjectTreeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectTreeOK, error) - - GetObjectsLastRun(params *GetObjectsLastRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectsLastRunOK, error) - - GetPITRangesForProtectedObject(params *GetPITRangesForProtectedObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPITRangesForProtectedObjectOK, error) - - GetProtectedObjectOfAnyTypeByID(params *GetProtectedObjectOfAnyTypeByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectOfAnyTypeByIDOK, error) - - GetProtectedObjectsOfAnyType(params *GetProtectedObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsOfAnyTypeOK, error) - - GetSnapshotDiff(params *GetSnapshotDiffParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSnapshotDiffOK, error) - - GetSourceHierarchyObjects(params *GetSourceHierarchyObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceHierarchyObjectsOK, error) - - ObjectsActions(params *ObjectsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ObjectsActionsNoContent, error) - - PerformActionOnObject(params *PerformActionOnObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnObjectNoContent, error) - - UpdateObjectSnapshot(params *UpdateObjectSnapshotParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateObjectSnapshotOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AssociateEntityMetadata associates metadata with entity - -Associates metadata with entities in the entity hierarchy. This metadata can be of various types (eg. Credentials). Returns a list of entity id and corresponding errors encountered (if any) while associating metadata with that entity. Note that a partial success response is possible where we succeed in associating metadata with some of the entities but fail for others. The API also expects the entities being updated belong to same source. -*/ -func (a *Client) AssociateEntityMetadata(params *AssociateEntityMetadataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AssociateEntityMetadataMultiStatus, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAssociateEntityMetadataParams() - } - op := &runtime.ClientOperation{ - ID: "AssociateEntityMetadata", - Method: "PUT", - PathPattern: "/data-protect/objects/metadata", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AssociateEntityMetadataReader{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.(*AssociateEntityMetadataMultiStatus) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AssociateEntityMetadataDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -BrowseObjectContents fetches the contents files and folders for the specified object - -Fetch the contents (files & folders) of the specified path inside the specified object. -*/ -func (a *Client) BrowseObjectContents(params *BrowseObjectContentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BrowseObjectContentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewBrowseObjectContentsParams() - } - op := &runtime.ClientOperation{ - ID: "BrowseObjectContents", - Method: "POST", - PathPattern: "/data-protect/objects/{id}/browse", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &BrowseObjectContentsReader{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.(*BrowseObjectContentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*BrowseObjectContentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CancelObjectRuns cancels object runs - -Cancel object runs for object based protection. This does not apply to Group based protection. -*/ -func (a *Client) CancelObjectRuns(params *CancelObjectRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelObjectRunsMultiStatus, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelObjectRunsParams() - } - op := &runtime.ClientOperation{ - ID: "CancelObjectRuns", - Method: "POST", - PathPattern: "/data-protect/objects/runs/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelObjectRunsReader{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.(*CancelObjectRunsMultiStatus) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelObjectRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ConstructMetaInfo constructs meta info for any workflow from object snapshot and some other information - -Construct meta info from object snapshot and some additional params. -*/ -func (a *Client) ConstructMetaInfo(params *ConstructMetaInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ConstructMetaInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewConstructMetaInfoParams() - } - op := &runtime.ClientOperation{ - ID: "ConstructMetaInfo", - Method: "POST", - PathPattern: "/data-protect/snapshots/{snapshotId}/meta-info", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ConstructMetaInfoReader{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.(*ConstructMetaInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ConstructMetaInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -FilterObjects lists all the filtered objects - -List all the filtered objects using given regular expressions and wildcard supported search strings. We are currenly supporting this for only SQL adapter. -*/ -func (a *Client) FilterObjects(params *FilterObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FilterObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewFilterObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "FilterObjects", - Method: "POST", - PathPattern: "/data-protect/filter/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &FilterObjectsReader{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.(*FilterObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*FilterObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAllIndexedObjectSnapshots gets snapshots of indexed object - -Get snapshots of indexed object. -*/ -func (a *Client) GetAllIndexedObjectSnapshots(params *GetAllIndexedObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllIndexedObjectSnapshotsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAllIndexedObjectSnapshotsParams() - } - op := &runtime.ClientOperation{ - ID: "GetAllIndexedObjectSnapshots", - Method: "GET", - PathPattern: "/data-protect/objects/{objectId}/indexed-objects/snapshots", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAllIndexedObjectSnapshotsReader{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.(*GetAllIndexedObjectSnapshotsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAllIndexedObjectSnapshotsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetEntityMetadata gets metadata of entities - -Gets entity metadata for entities. This can be used as a input for the PUT API. -*/ -func (a *Client) GetEntityMetadata(params *GetEntityMetadataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEntityMetadataOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEntityMetadataParams() - } - op := &runtime.ClientOperation{ - ID: "GetEntityMetadata", - Method: "GET", - PathPattern: "/data-protect/objects/{sourceId}/metadata", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetEntityMetadataReader{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.(*GetEntityMetadataOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetEntityMetadataDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIndexedObjectSnapshots gets snapshots of indexed object - -Get snapshots of indexed object. -*/ -func (a *Client) GetIndexedObjectSnapshots(params *GetIndexedObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndexedObjectSnapshotsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIndexedObjectSnapshotsParams() - } - op := &runtime.ClientOperation{ - ID: "GetIndexedObjectSnapshots", - Method: "GET", - PathPattern: "/data-protect/objects/{objectId}/protection-groups/{protectionGroupId}/indexed-objects/snapshots", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIndexedObjectSnapshotsReader{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.(*GetIndexedObjectSnapshotsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIndexedObjectSnapshotsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectRunByRunID gets a run for an object - -Get a run for an object. -*/ -func (a *Client) GetObjectRunByRunID(params *GetObjectRunByRunIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectRunByRunIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectRunByRunIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectRunByRunId", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/runs/{runId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectRunByRunIDReader{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.(*GetObjectRunByRunIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectRunByRunIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectRuns gets the list of runs for an object - -Get the runs for a particular object. -*/ -func (a *Client) GetObjectRuns(params *GetObjectRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectRuns", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectRunsReader{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.(*GetObjectRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectSnapshotInfo gets details of object snapshot - -Get details of object snapshot. -*/ -func (a *Client) GetObjectSnapshotInfo(params *GetObjectSnapshotInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectSnapshotInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectSnapshotInfo", - Method: "GET", - PathPattern: "/data-protect/snapshots/{snapshotId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectSnapshotInfoReader{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.(*GetObjectSnapshotInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectSnapshotInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectSnapshotVolumeInfo gets volume info of object snapshot - -Get volume info of object snapshot. -*/ -func (a *Client) GetObjectSnapshotVolumeInfo(params *GetObjectSnapshotVolumeInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotVolumeInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectSnapshotVolumeInfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectSnapshotVolumeInfo", - Method: "GET", - PathPattern: "/data-protect/snapshots/{snapshotId}/volume", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectSnapshotVolumeInfoReader{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.(*GetObjectSnapshotVolumeInfoOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectSnapshotVolumeInfoDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectSnapshots lists the snapshots for a given object - -List the snapshots for a given object. -*/ -func (a *Client) GetObjectSnapshots(params *GetObjectSnapshotsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectSnapshotsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectSnapshotsParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectSnapshots", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/snapshots", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectSnapshotsReader{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.(*GetObjectSnapshotsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectSnapshotsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectStats gets stats for a given object - -Get stats for a given object. -*/ -func (a *Client) GetObjectStats(params *GetObjectStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectStats", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/stats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectStatsReader{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.(*GetObjectStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectTree gets the objects tree hierarchy for for an object - -Get the objects tree hierarchy for for an Object. If the object does not have a hierarchy then a single object will be returned. -*/ -func (a *Client) GetObjectTree(params *GetObjectTreeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectTreeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectTreeParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectTree", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/tree", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectTreeReader{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.(*GetObjectTreeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectTreeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectsLastRun gets last protection run of objects - -Get last protection run of objects. -*/ -func (a *Client) GetObjectsLastRun(params *GetObjectsLastRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectsLastRunOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectsLastRunParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectsLastRun", - Method: "GET", - PathPattern: "/data-protect/objects/last-run", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectsLastRunReader{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.(*GetObjectsLastRunOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectsLastRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPITRangesForProtectedObject gets p i t ranges for an object - -Returns the ranges in various types like time, SCN etc. within which the specified protected object can be restored to any Point in time. -*/ -func (a *Client) GetPITRangesForProtectedObject(params *GetPITRangesForProtectedObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPITRangesForProtectedObjectOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPITRangesForProtectedObjectParams() - } - op := &runtime.ClientOperation{ - ID: "GetPITRangesForProtectedObject", - Method: "GET", - PathPattern: "/data-protect/objects/{id}/pit-ranges", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPITRangesForProtectedObjectReader{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.(*GetPITRangesForProtectedObjectOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPITRangesForProtectedObjectDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectedObjectOfAnyTypeByID gets an object - -Get Object configurations for given object id. -*/ -func (a *Client) GetProtectedObjectOfAnyTypeByID(params *GetProtectedObjectOfAnyTypeByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectOfAnyTypeByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectedObjectOfAnyTypeByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectedObjectOfAnyTypeById", - Method: "GET", - PathPattern: "/data-protect/objects/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectedObjectOfAnyTypeByIDReader{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.(*GetProtectedObjectOfAnyTypeByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectedObjectOfAnyTypeByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectedObjectsOfAnyType gets objects - -Get Objects Configurations. -*/ -func (a *Client) GetProtectedObjectsOfAnyType(params *GetProtectedObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectedObjectsOfAnyTypeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectedObjectsOfAnyTypeParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectedObjectsOfAnyType", - Method: "GET", - PathPattern: "/data-protect/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectedObjectsOfAnyTypeReader{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.(*GetProtectedObjectsOfAnyTypeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectedObjectsOfAnyTypeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSnapshotDiff gets diff between two snapshots of a given object - -Get diff (files added/deleted) between two snapshots of a given object. -*/ -func (a *Client) GetSnapshotDiff(params *GetSnapshotDiffParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSnapshotDiffOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSnapshotDiffParams() - } - op := &runtime.ClientOperation{ - ID: "GetSnapshotDiff", - Method: "POST", - PathPattern: "/data-protect/objects/{id}/snapshot-diff", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSnapshotDiffReader{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.(*GetSnapshotDiffOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSnapshotDiffDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSourceHierarchyObjects lists objects on a source which can be used for data protection - -List objects which can be used for data protection. -*/ -func (a *Client) GetSourceHierarchyObjects(params *GetSourceHierarchyObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceHierarchyObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSourceHierarchyObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSourceHierarchyObjects", - Method: "GET", - PathPattern: "/data-protect/sources/{sourceId}/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSourceHierarchyObjectsReader{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.(*GetSourceHierarchyObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSourceHierarchyObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ObjectsActions actions on objects - -Specifies the request to perform various actions on multiple objects. -*/ -func (a *Client) ObjectsActions(params *ObjectsActionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ObjectsActionsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewObjectsActionsParams() - } - op := &runtime.ClientOperation{ - ID: "ObjectsActions", - Method: "POST", - PathPattern: "/data-protect/objects/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ObjectsActionsReader{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.(*ObjectsActionsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ObjectsActionsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PerformActionOnObject performs an action on an object - -Perform an action on an object. Depending on the object environment type, different actions are available. -*/ -func (a *Client) PerformActionOnObject(params *PerformActionOnObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnObjectNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformActionOnObjectParams() - } - op := &runtime.ClientOperation{ - ID: "PerformActionOnObject", - Method: "POST", - PathPattern: "/data-protect/objects/{id}/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformActionOnObjectReader{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.(*PerformActionOnObjectNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformActionOnObjectDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateObjectSnapshot updates an object snapshot - -Update an object snapshot. -*/ -func (a *Client) UpdateObjectSnapshot(params *UpdateObjectSnapshotParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateObjectSnapshotOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateObjectSnapshotParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateObjectSnapshot", - Method: "PUT", - PathPattern: "/data-protect/objects/{id}/snapshots/{snapshotId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateObjectSnapshotReader{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.(*UpdateObjectSnapshotOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateObjectSnapshotDefault) - 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/v2/client/object/objects_actions_parameters.go b/v2/client/object/objects_actions_parameters.go deleted file mode 100644 index b0d5d8f7..00000000 --- a/v2/client/object/objects_actions_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewObjectsActionsParams creates a new ObjectsActionsParams 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 NewObjectsActionsParams() *ObjectsActionsParams { - return &ObjectsActionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewObjectsActionsParamsWithTimeout creates a new ObjectsActionsParams object -// with the ability to set a timeout on a request. -func NewObjectsActionsParamsWithTimeout(timeout time.Duration) *ObjectsActionsParams { - return &ObjectsActionsParams{ - timeout: timeout, - } -} - -// NewObjectsActionsParamsWithContext creates a new ObjectsActionsParams object -// with the ability to set a context for a request. -func NewObjectsActionsParamsWithContext(ctx context.Context) *ObjectsActionsParams { - return &ObjectsActionsParams{ - Context: ctx, - } -} - -// NewObjectsActionsParamsWithHTTPClient creates a new ObjectsActionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewObjectsActionsParamsWithHTTPClient(client *http.Client) *ObjectsActionsParams { - return &ObjectsActionsParams{ - HTTPClient: client, - } -} - -/* -ObjectsActionsParams contains all the parameters to send to the API endpoint - - for the objects actions operation. - - Typically these are written to a http.Request. -*/ -type ObjectsActionsParams struct { - - /* Body. - - Specifies the parameters to execute actions on given list of objects. - */ - Body *models.ObjectsActionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the objects actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ObjectsActionsParams) WithDefaults() *ObjectsActionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the objects actions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ObjectsActionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the objects actions params -func (o *ObjectsActionsParams) WithTimeout(timeout time.Duration) *ObjectsActionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the objects actions params -func (o *ObjectsActionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the objects actions params -func (o *ObjectsActionsParams) WithContext(ctx context.Context) *ObjectsActionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the objects actions params -func (o *ObjectsActionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the objects actions params -func (o *ObjectsActionsParams) WithHTTPClient(client *http.Client) *ObjectsActionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the objects actions params -func (o *ObjectsActionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the objects actions params -func (o *ObjectsActionsParams) WithBody(body *models.ObjectsActionRequest) *ObjectsActionsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the objects actions params -func (o *ObjectsActionsParams) SetBody(body *models.ObjectsActionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ObjectsActionsParams) 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/object/objects_actions_responses.go b/v2/client/object/objects_actions_responses.go deleted file mode 100644 index 62673635..00000000 --- a/v2/client/object/objects_actions_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ObjectsActionsReader is a Reader for the ObjectsActions structure. -type ObjectsActionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ObjectsActionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewObjectsActionsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewObjectsActionsDefault(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 - } -} - -// NewObjectsActionsNoContent creates a ObjectsActionsNoContent with default headers values -func NewObjectsActionsNoContent() *ObjectsActionsNoContent { - return &ObjectsActionsNoContent{} -} - -/* -ObjectsActionsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ObjectsActionsNoContent struct { -} - -// IsSuccess returns true when this objects actions no content response has a 2xx status code -func (o *ObjectsActionsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this objects actions no content response has a 3xx status code -func (o *ObjectsActionsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this objects actions no content response has a 4xx status code -func (o *ObjectsActionsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this objects actions no content response has a 5xx status code -func (o *ObjectsActionsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this objects actions no content response a status code equal to that given -func (o *ObjectsActionsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the objects actions no content response -func (o *ObjectsActionsNoContent) Code() int { - return 204 -} - -func (o *ObjectsActionsNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/objects/actions][%d] objectsActionsNoContent", 204) -} - -func (o *ObjectsActionsNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/objects/actions][%d] objectsActionsNoContent", 204) -} - -func (o *ObjectsActionsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewObjectsActionsDefault creates a ObjectsActionsDefault with default headers values -func NewObjectsActionsDefault(code int) *ObjectsActionsDefault { - return &ObjectsActionsDefault{ - _statusCode: code, - } -} - -/* -ObjectsActionsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ObjectsActionsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this objects actions default response has a 2xx status code -func (o *ObjectsActionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this objects actions default response has a 3xx status code -func (o *ObjectsActionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this objects actions default response has a 4xx status code -func (o *ObjectsActionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this objects actions default response has a 5xx status code -func (o *ObjectsActionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this objects actions default response a status code equal to that given -func (o *ObjectsActionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the objects actions default response -func (o *ObjectsActionsDefault) Code() int { - return o._statusCode -} - -func (o *ObjectsActionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/actions][%d] ObjectsActions default %s", o._statusCode, payload) -} - -func (o *ObjectsActionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/actions][%d] ObjectsActions default %s", o._statusCode, payload) -} - -func (o *ObjectsActionsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ObjectsActionsDefault) 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/object/perform_action_on_object_parameters.go b/v2/client/object/perform_action_on_object_parameters.go deleted file mode 100644 index ac923d60..00000000 --- a/v2/client/object/perform_action_on_object_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformActionOnObjectParams creates a new PerformActionOnObjectParams 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 NewPerformActionOnObjectParams() *PerformActionOnObjectParams { - return &PerformActionOnObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformActionOnObjectParamsWithTimeout creates a new PerformActionOnObjectParams object -// with the ability to set a timeout on a request. -func NewPerformActionOnObjectParamsWithTimeout(timeout time.Duration) *PerformActionOnObjectParams { - return &PerformActionOnObjectParams{ - timeout: timeout, - } -} - -// NewPerformActionOnObjectParamsWithContext creates a new PerformActionOnObjectParams object -// with the ability to set a context for a request. -func NewPerformActionOnObjectParamsWithContext(ctx context.Context) *PerformActionOnObjectParams { - return &PerformActionOnObjectParams{ - Context: ctx, - } -} - -// NewPerformActionOnObjectParamsWithHTTPClient creates a new PerformActionOnObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformActionOnObjectParamsWithHTTPClient(client *http.Client) *PerformActionOnObjectParams { - return &PerformActionOnObjectParams{ - HTTPClient: client, - } -} - -/* -PerformActionOnObjectParams contains all the parameters to send to the API endpoint - - for the perform action on object operation. - - Typically these are written to a http.Request. -*/ -type PerformActionOnObjectParams struct { - - /* Body. - - Specifies the parameters to perform an action on an object. - */ - Body *models.ObjectActionRequest - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform action on object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnObjectParams) WithDefaults() *PerformActionOnObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform action on object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform action on object params -func (o *PerformActionOnObjectParams) WithTimeout(timeout time.Duration) *PerformActionOnObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform action on object params -func (o *PerformActionOnObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform action on object params -func (o *PerformActionOnObjectParams) WithContext(ctx context.Context) *PerformActionOnObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform action on object params -func (o *PerformActionOnObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform action on object params -func (o *PerformActionOnObjectParams) WithHTTPClient(client *http.Client) *PerformActionOnObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform action on object params -func (o *PerformActionOnObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform action on object params -func (o *PerformActionOnObjectParams) WithBody(body *models.ObjectActionRequest) *PerformActionOnObjectParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform action on object params -func (o *PerformActionOnObjectParams) SetBody(body *models.ObjectActionRequest) { - o.Body = body -} - -// WithID adds the id to the perform action on object params -func (o *PerformActionOnObjectParams) WithID(id int64) *PerformActionOnObjectParams { - o.SetID(id) - return o -} - -// SetID adds the id to the perform action on object params -func (o *PerformActionOnObjectParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformActionOnObjectParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/perform_action_on_object_responses.go b/v2/client/object/perform_action_on_object_responses.go deleted file mode 100644 index a292203f..00000000 --- a/v2/client/object/perform_action_on_object_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformActionOnObjectReader is a Reader for the PerformActionOnObject structure. -type PerformActionOnObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformActionOnObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewPerformActionOnObjectNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformActionOnObjectDefault(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 - } -} - -// NewPerformActionOnObjectNoContent creates a PerformActionOnObjectNoContent with default headers values -func NewPerformActionOnObjectNoContent() *PerformActionOnObjectNoContent { - return &PerformActionOnObjectNoContent{} -} - -/* -PerformActionOnObjectNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type PerformActionOnObjectNoContent struct { -} - -// IsSuccess returns true when this perform action on object no content response has a 2xx status code -func (o *PerformActionOnObjectNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform action on object no content response has a 3xx status code -func (o *PerformActionOnObjectNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform action on object no content response has a 4xx status code -func (o *PerformActionOnObjectNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform action on object no content response has a 5xx status code -func (o *PerformActionOnObjectNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this perform action on object no content response a status code equal to that given -func (o *PerformActionOnObjectNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the perform action on object no content response -func (o *PerformActionOnObjectNoContent) Code() int { - return 204 -} - -func (o *PerformActionOnObjectNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/objects/{id}/actions][%d] performActionOnObjectNoContent", 204) -} - -func (o *PerformActionOnObjectNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/objects/{id}/actions][%d] performActionOnObjectNoContent", 204) -} - -func (o *PerformActionOnObjectNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPerformActionOnObjectDefault creates a PerformActionOnObjectDefault with default headers values -func NewPerformActionOnObjectDefault(code int) *PerformActionOnObjectDefault { - return &PerformActionOnObjectDefault{ - _statusCode: code, - } -} - -/* -PerformActionOnObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformActionOnObjectDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform action on object default response has a 2xx status code -func (o *PerformActionOnObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform action on object default response has a 3xx status code -func (o *PerformActionOnObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform action on object default response has a 4xx status code -func (o *PerformActionOnObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform action on object default response has a 5xx status code -func (o *PerformActionOnObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform action on object default response a status code equal to that given -func (o *PerformActionOnObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform action on object default response -func (o *PerformActionOnObjectDefault) Code() int { - return o._statusCode -} - -func (o *PerformActionOnObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/actions][%d] PerformActionOnObject default %s", o._statusCode, payload) -} - -func (o *PerformActionOnObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/objects/{id}/actions][%d] PerformActionOnObject default %s", o._statusCode, payload) -} - -func (o *PerformActionOnObjectDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformActionOnObjectDefault) 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/object/update_object_snapshot_parameters.go b/v2/client/object/update_object_snapshot_parameters.go deleted file mode 100644 index 66665713..00000000 --- a/v2/client/object/update_object_snapshot_parameters.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateObjectSnapshotParams creates a new UpdateObjectSnapshotParams 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 NewUpdateObjectSnapshotParams() *UpdateObjectSnapshotParams { - return &UpdateObjectSnapshotParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateObjectSnapshotParamsWithTimeout creates a new UpdateObjectSnapshotParams object -// with the ability to set a timeout on a request. -func NewUpdateObjectSnapshotParamsWithTimeout(timeout time.Duration) *UpdateObjectSnapshotParams { - return &UpdateObjectSnapshotParams{ - timeout: timeout, - } -} - -// NewUpdateObjectSnapshotParamsWithContext creates a new UpdateObjectSnapshotParams object -// with the ability to set a context for a request. -func NewUpdateObjectSnapshotParamsWithContext(ctx context.Context) *UpdateObjectSnapshotParams { - return &UpdateObjectSnapshotParams{ - Context: ctx, - } -} - -// NewUpdateObjectSnapshotParamsWithHTTPClient creates a new UpdateObjectSnapshotParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateObjectSnapshotParamsWithHTTPClient(client *http.Client) *UpdateObjectSnapshotParams { - return &UpdateObjectSnapshotParams{ - HTTPClient: client, - } -} - -/* -UpdateObjectSnapshotParams contains all the parameters to send to the API endpoint - - for the update object snapshot operation. - - Typically these are written to a http.Request. -*/ -type UpdateObjectSnapshotParams struct { - - /* Body. - - Specifies the parameters update an object snapshot. - */ - Body *models.UpdateObjectSnapshotRequest - - /* ID. - - Specifies the id of the Object. - - Format: int64 - */ - ID int64 - - /* SnapshotID. - - Specifies the id of the snapshot.
Note: 1. If the snapshotid of one of the apps is specified, it applies for all the databases in the Protection Run.
2. In case of volume based jobs, please specify the snapshotid of the source not the database. if source snapshot is specified, applied to source snapshot. if database snapshotid is specified in case of volume based jobs, then it is applicable for host's snapshot. - */ - SnapshotID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update object snapshot params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateObjectSnapshotParams) WithDefaults() *UpdateObjectSnapshotParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update object snapshot params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateObjectSnapshotParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithTimeout(timeout time.Duration) *UpdateObjectSnapshotParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithContext(ctx context.Context) *UpdateObjectSnapshotParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithHTTPClient(client *http.Client) *UpdateObjectSnapshotParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithBody(body *models.UpdateObjectSnapshotRequest) *UpdateObjectSnapshotParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetBody(body *models.UpdateObjectSnapshotRequest) { - o.Body = body -} - -// WithID adds the id to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithID(id int64) *UpdateObjectSnapshotParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetID(id int64) { - o.ID = id -} - -// WithSnapshotID adds the snapshotID to the update object snapshot params -func (o *UpdateObjectSnapshotParams) WithSnapshotID(snapshotID string) *UpdateObjectSnapshotParams { - o.SetSnapshotID(snapshotID) - return o -} - -// SetSnapshotID adds the snapshotId to the update object snapshot params -func (o *UpdateObjectSnapshotParams) SetSnapshotID(snapshotID string) { - o.SnapshotID = snapshotID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateObjectSnapshotParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - // path param snapshotId - if err := r.SetPathParam("snapshotId", o.SnapshotID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/object/update_object_snapshot_responses.go b/v2/client/object/update_object_snapshot_responses.go deleted file mode 100644 index af730ea3..00000000 --- a/v2/client/object/update_object_snapshot_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateObjectSnapshotReader is a Reader for the UpdateObjectSnapshot structure. -type UpdateObjectSnapshotReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateObjectSnapshotReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateObjectSnapshotOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateObjectSnapshotDefault(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 - } -} - -// NewUpdateObjectSnapshotOK creates a UpdateObjectSnapshotOK with default headers values -func NewUpdateObjectSnapshotOK() *UpdateObjectSnapshotOK { - return &UpdateObjectSnapshotOK{} -} - -/* -UpdateObjectSnapshotOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateObjectSnapshotOK struct { - Payload *models.ObjectSnapshot -} - -// IsSuccess returns true when this update object snapshot o k response has a 2xx status code -func (o *UpdateObjectSnapshotOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update object snapshot o k response has a 3xx status code -func (o *UpdateObjectSnapshotOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update object snapshot o k response has a 4xx status code -func (o *UpdateObjectSnapshotOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update object snapshot o k response has a 5xx status code -func (o *UpdateObjectSnapshotOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update object snapshot o k response a status code equal to that given -func (o *UpdateObjectSnapshotOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update object snapshot o k response -func (o *UpdateObjectSnapshotOK) Code() int { - return 200 -} - -func (o *UpdateObjectSnapshotOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/{id}/snapshots/{snapshotId}][%d] updateObjectSnapshotOK %s", 200, payload) -} - -func (o *UpdateObjectSnapshotOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/{id}/snapshots/{snapshotId}][%d] updateObjectSnapshotOK %s", 200, payload) -} - -func (o *UpdateObjectSnapshotOK) GetPayload() *models.ObjectSnapshot { - return o.Payload -} - -func (o *UpdateObjectSnapshotOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectSnapshot) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateObjectSnapshotDefault creates a UpdateObjectSnapshotDefault with default headers values -func NewUpdateObjectSnapshotDefault(code int) *UpdateObjectSnapshotDefault { - return &UpdateObjectSnapshotDefault{ - _statusCode: code, - } -} - -/* -UpdateObjectSnapshotDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateObjectSnapshotDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update object snapshot default response has a 2xx status code -func (o *UpdateObjectSnapshotDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update object snapshot default response has a 3xx status code -func (o *UpdateObjectSnapshotDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update object snapshot default response has a 4xx status code -func (o *UpdateObjectSnapshotDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update object snapshot default response has a 5xx status code -func (o *UpdateObjectSnapshotDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update object snapshot default response a status code equal to that given -func (o *UpdateObjectSnapshotDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update object snapshot default response -func (o *UpdateObjectSnapshotDefault) Code() int { - return o._statusCode -} - -func (o *UpdateObjectSnapshotDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/{id}/snapshots/{snapshotId}][%d] UpdateObjectSnapshot default %s", o._statusCode, payload) -} - -func (o *UpdateObjectSnapshotDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/objects/{id}/snapshots/{snapshotId}][%d] UpdateObjectSnapshot default %s", o._statusCode, payload) -} - -func (o *UpdateObjectSnapshotDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateObjectSnapshotDefault) 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/patch_management/apply_patches_parameters.go b/v2/client/patch_management/apply_patches_parameters.go deleted file mode 100644 index 2a21a0b5..00000000 --- a/v2/client/patch_management/apply_patches_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewApplyPatchesParams creates a new ApplyPatchesParams 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 NewApplyPatchesParams() *ApplyPatchesParams { - return &ApplyPatchesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewApplyPatchesParamsWithTimeout creates a new ApplyPatchesParams object -// with the ability to set a timeout on a request. -func NewApplyPatchesParamsWithTimeout(timeout time.Duration) *ApplyPatchesParams { - return &ApplyPatchesParams{ - timeout: timeout, - } -} - -// NewApplyPatchesParamsWithContext creates a new ApplyPatchesParams object -// with the ability to set a context for a request. -func NewApplyPatchesParamsWithContext(ctx context.Context) *ApplyPatchesParams { - return &ApplyPatchesParams{ - Context: ctx, - } -} - -// NewApplyPatchesParamsWithHTTPClient creates a new ApplyPatchesParams object -// with the ability to set a custom HTTPClient for a request. -func NewApplyPatchesParamsWithHTTPClient(client *http.Client) *ApplyPatchesParams { - return &ApplyPatchesParams{ - HTTPClient: client, - } -} - -/* -ApplyPatchesParams contains all the parameters to send to the API endpoint - - for the apply patches operation. - - Typically these are written to a http.Request. -*/ -type ApplyPatchesParams struct { - - /* Body. - - Request to apply patches. - */ - Body *models.ApplyPatchesRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the apply patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyPatchesParams) WithDefaults() *ApplyPatchesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the apply patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ApplyPatchesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the apply patches params -func (o *ApplyPatchesParams) WithTimeout(timeout time.Duration) *ApplyPatchesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the apply patches params -func (o *ApplyPatchesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the apply patches params -func (o *ApplyPatchesParams) WithContext(ctx context.Context) *ApplyPatchesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the apply patches params -func (o *ApplyPatchesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the apply patches params -func (o *ApplyPatchesParams) WithHTTPClient(client *http.Client) *ApplyPatchesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the apply patches params -func (o *ApplyPatchesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the apply patches params -func (o *ApplyPatchesParams) WithBody(body *models.ApplyPatchesRequest) *ApplyPatchesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the apply patches params -func (o *ApplyPatchesParams) SetBody(body *models.ApplyPatchesRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ApplyPatchesParams) 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/patch_management/apply_patches_responses.go b/v2/client/patch_management/apply_patches_responses.go deleted file mode 100644 index 180f86e8..00000000 --- a/v2/client/patch_management/apply_patches_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ApplyPatchesReader is a Reader for the ApplyPatches structure. -type ApplyPatchesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ApplyPatchesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewApplyPatchesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewApplyPatchesDefault(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 - } -} - -// NewApplyPatchesCreated creates a ApplyPatchesCreated with default headers values -func NewApplyPatchesCreated() *ApplyPatchesCreated { - return &ApplyPatchesCreated{} -} - -/* -ApplyPatchesCreated describes a response with status code 201, with default header values. - -Success -*/ -type ApplyPatchesCreated struct { - Payload models.ServicePatchLevels -} - -// IsSuccess returns true when this apply patches created response has a 2xx status code -func (o *ApplyPatchesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this apply patches created response has a 3xx status code -func (o *ApplyPatchesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this apply patches created response has a 4xx status code -func (o *ApplyPatchesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this apply patches created response has a 5xx status code -func (o *ApplyPatchesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this apply patches created response a status code equal to that given -func (o *ApplyPatchesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the apply patches created response -func (o *ApplyPatchesCreated) Code() int { - return 201 -} - -func (o *ApplyPatchesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/available-patches][%d] applyPatchesCreated %s", 201, payload) -} - -func (o *ApplyPatchesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/available-patches][%d] applyPatchesCreated %s", 201, payload) -} - -func (o *ApplyPatchesCreated) GetPayload() models.ServicePatchLevels { - return o.Payload -} - -func (o *ApplyPatchesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewApplyPatchesDefault creates a ApplyPatchesDefault with default headers values -func NewApplyPatchesDefault(code int) *ApplyPatchesDefault { - return &ApplyPatchesDefault{ - _statusCode: code, - } -} - -/* -ApplyPatchesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ApplyPatchesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this apply patches default response has a 2xx status code -func (o *ApplyPatchesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this apply patches default response has a 3xx status code -func (o *ApplyPatchesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this apply patches default response has a 4xx status code -func (o *ApplyPatchesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this apply patches default response has a 5xx status code -func (o *ApplyPatchesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this apply patches default response a status code equal to that given -func (o *ApplyPatchesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the apply patches default response -func (o *ApplyPatchesDefault) Code() int { - return o._statusCode -} - -func (o *ApplyPatchesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/available-patches][%d] ApplyPatches default %s", o._statusCode, payload) -} - -func (o *ApplyPatchesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/available-patches][%d] ApplyPatches default %s", o._statusCode, payload) -} - -func (o *ApplyPatchesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ApplyPatchesDefault) 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/patch_management/get_applied_patches_parameters.go b/v2/client/patch_management/get_applied_patches_parameters.go deleted file mode 100644 index 7cc30ec8..00000000 --- a/v2/client/patch_management/get_applied_patches_parameters.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/go-openapi/swag" -) - -// NewGetAppliedPatchesParams creates a new GetAppliedPatchesParams 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 NewGetAppliedPatchesParams() *GetAppliedPatchesParams { - return &GetAppliedPatchesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAppliedPatchesParamsWithTimeout creates a new GetAppliedPatchesParams object -// with the ability to set a timeout on a request. -func NewGetAppliedPatchesParamsWithTimeout(timeout time.Duration) *GetAppliedPatchesParams { - return &GetAppliedPatchesParams{ - timeout: timeout, - } -} - -// NewGetAppliedPatchesParamsWithContext creates a new GetAppliedPatchesParams object -// with the ability to set a context for a request. -func NewGetAppliedPatchesParamsWithContext(ctx context.Context) *GetAppliedPatchesParams { - return &GetAppliedPatchesParams{ - Context: ctx, - } -} - -// NewGetAppliedPatchesParamsWithHTTPClient creates a new GetAppliedPatchesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAppliedPatchesParamsWithHTTPClient(client *http.Client) *GetAppliedPatchesParams { - return &GetAppliedPatchesParams{ - HTTPClient: client, - } -} - -/* -GetAppliedPatchesParams contains all the parameters to send to the API endpoint - - for the get applied patches operation. - - Typically these are written to a http.Request. -*/ -type GetAppliedPatchesParams struct { - - /* IncludeDetails. - - Specifies whether to return the details of all the fixes in the patch. By default, returns only the most recent fix made for the service in the patch. - */ - IncludeDetails *bool - - /* Service. - - Specifies optional service name whose current patch is returned. If it is not specified, all the applied patches are returned. - */ - Service *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get applied patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppliedPatchesParams) WithDefaults() *GetAppliedPatchesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get applied patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAppliedPatchesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get applied patches params -func (o *GetAppliedPatchesParams) WithTimeout(timeout time.Duration) *GetAppliedPatchesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get applied patches params -func (o *GetAppliedPatchesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get applied patches params -func (o *GetAppliedPatchesParams) WithContext(ctx context.Context) *GetAppliedPatchesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get applied patches params -func (o *GetAppliedPatchesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get applied patches params -func (o *GetAppliedPatchesParams) WithHTTPClient(client *http.Client) *GetAppliedPatchesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get applied patches params -func (o *GetAppliedPatchesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeDetails adds the includeDetails to the get applied patches params -func (o *GetAppliedPatchesParams) WithIncludeDetails(includeDetails *bool) *GetAppliedPatchesParams { - o.SetIncludeDetails(includeDetails) - return o -} - -// SetIncludeDetails adds the includeDetails to the get applied patches params -func (o *GetAppliedPatchesParams) SetIncludeDetails(includeDetails *bool) { - o.IncludeDetails = includeDetails -} - -// WithService adds the service to the get applied patches params -func (o *GetAppliedPatchesParams) WithService(service *string) *GetAppliedPatchesParams { - o.SetService(service) - return o -} - -// SetService adds the service to the get applied patches params -func (o *GetAppliedPatchesParams) SetService(service *string) { - o.Service = service -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAppliedPatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IncludeDetails != nil { - - // query param includeDetails - var qrIncludeDetails bool - - if o.IncludeDetails != nil { - qrIncludeDetails = *o.IncludeDetails - } - qIncludeDetails := swag.FormatBool(qrIncludeDetails) - if qIncludeDetails != "" { - - if err := r.SetQueryParam("includeDetails", qIncludeDetails); err != nil { - return err - } - } - } - - if o.Service != nil { - - // query param service - var qrService string - - if o.Service != nil { - qrService = *o.Service - } - qService := qrService - if qService != "" { - - if err := r.SetQueryParam("service", qService); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/patch_management/get_applied_patches_responses.go b/v2/client/patch_management/get_applied_patches_responses.go deleted file mode 100644 index bb1c12e9..00000000 --- a/v2/client/patch_management/get_applied_patches_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAppliedPatchesReader is a Reader for the GetAppliedPatches structure. -type GetAppliedPatchesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAppliedPatchesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAppliedPatchesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAppliedPatchesDefault(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 - } -} - -// NewGetAppliedPatchesOK creates a GetAppliedPatchesOK with default headers values -func NewGetAppliedPatchesOK() *GetAppliedPatchesOK { - return &GetAppliedPatchesOK{} -} - -/* -GetAppliedPatchesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAppliedPatchesOK struct { - Payload models.AppliedPatches -} - -// IsSuccess returns true when this get applied patches o k response has a 2xx status code -func (o *GetAppliedPatchesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get applied patches o k response has a 3xx status code -func (o *GetAppliedPatchesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get applied patches o k response has a 4xx status code -func (o *GetAppliedPatchesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get applied patches o k response has a 5xx status code -func (o *GetAppliedPatchesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get applied patches o k response a status code equal to that given -func (o *GetAppliedPatchesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get applied patches o k response -func (o *GetAppliedPatchesOK) Code() int { - return 200 -} - -func (o *GetAppliedPatchesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/applied-patches][%d] getAppliedPatchesOK %s", 200, payload) -} - -func (o *GetAppliedPatchesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/applied-patches][%d] getAppliedPatchesOK %s", 200, payload) -} - -func (o *GetAppliedPatchesOK) GetPayload() models.AppliedPatches { - return o.Payload -} - -func (o *GetAppliedPatchesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAppliedPatchesDefault creates a GetAppliedPatchesDefault with default headers values -func NewGetAppliedPatchesDefault(code int) *GetAppliedPatchesDefault { - return &GetAppliedPatchesDefault{ - _statusCode: code, - } -} - -/* -GetAppliedPatchesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAppliedPatchesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get applied patches default response has a 2xx status code -func (o *GetAppliedPatchesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get applied patches default response has a 3xx status code -func (o *GetAppliedPatchesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get applied patches default response has a 4xx status code -func (o *GetAppliedPatchesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get applied patches default response has a 5xx status code -func (o *GetAppliedPatchesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get applied patches default response a status code equal to that given -func (o *GetAppliedPatchesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get applied patches default response -func (o *GetAppliedPatchesDefault) Code() int { - return o._statusCode -} - -func (o *GetAppliedPatchesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/applied-patches][%d] GetAppliedPatches default %s", o._statusCode, payload) -} - -func (o *GetAppliedPatchesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/applied-patches][%d] GetAppliedPatches default %s", o._statusCode, payload) -} - -func (o *GetAppliedPatchesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAppliedPatchesDefault) 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/patch_management/get_available_patches_parameters.go b/v2/client/patch_management/get_available_patches_parameters.go deleted file mode 100644 index 6cd6db41..00000000 --- a/v2/client/patch_management/get_available_patches_parameters.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/go-openapi/swag" -) - -// NewGetAvailablePatchesParams creates a new GetAvailablePatchesParams 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 NewGetAvailablePatchesParams() *GetAvailablePatchesParams { - return &GetAvailablePatchesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAvailablePatchesParamsWithTimeout creates a new GetAvailablePatchesParams object -// with the ability to set a timeout on a request. -func NewGetAvailablePatchesParamsWithTimeout(timeout time.Duration) *GetAvailablePatchesParams { - return &GetAvailablePatchesParams{ - timeout: timeout, - } -} - -// NewGetAvailablePatchesParamsWithContext creates a new GetAvailablePatchesParams object -// with the ability to set a context for a request. -func NewGetAvailablePatchesParamsWithContext(ctx context.Context) *GetAvailablePatchesParams { - return &GetAvailablePatchesParams{ - Context: ctx, - } -} - -// NewGetAvailablePatchesParamsWithHTTPClient creates a new GetAvailablePatchesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAvailablePatchesParamsWithHTTPClient(client *http.Client) *GetAvailablePatchesParams { - return &GetAvailablePatchesParams{ - HTTPClient: client, - } -} - -/* -GetAvailablePatchesParams contains all the parameters to send to the API endpoint - - for the get available patches operation. - - Typically these are written to a http.Request. -*/ -type GetAvailablePatchesParams struct { - - /* IncludeDetails. - - Specifies whether to return the description of all the fixes in the patch. By default, returns only the most recent fix made for the service in the patch. - */ - IncludeDetails *bool - - /* Service. - - Specifies optional service name whose available patch is returned. If it is not specified, available patches for all the serivces are returned. - */ - Service *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get available patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAvailablePatchesParams) WithDefaults() *GetAvailablePatchesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get available patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAvailablePatchesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get available patches params -func (o *GetAvailablePatchesParams) WithTimeout(timeout time.Duration) *GetAvailablePatchesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get available patches params -func (o *GetAvailablePatchesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get available patches params -func (o *GetAvailablePatchesParams) WithContext(ctx context.Context) *GetAvailablePatchesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get available patches params -func (o *GetAvailablePatchesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get available patches params -func (o *GetAvailablePatchesParams) WithHTTPClient(client *http.Client) *GetAvailablePatchesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get available patches params -func (o *GetAvailablePatchesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeDetails adds the includeDetails to the get available patches params -func (o *GetAvailablePatchesParams) WithIncludeDetails(includeDetails *bool) *GetAvailablePatchesParams { - o.SetIncludeDetails(includeDetails) - return o -} - -// SetIncludeDetails adds the includeDetails to the get available patches params -func (o *GetAvailablePatchesParams) SetIncludeDetails(includeDetails *bool) { - o.IncludeDetails = includeDetails -} - -// WithService adds the service to the get available patches params -func (o *GetAvailablePatchesParams) WithService(service *string) *GetAvailablePatchesParams { - o.SetService(service) - return o -} - -// SetService adds the service to the get available patches params -func (o *GetAvailablePatchesParams) SetService(service *string) { - o.Service = service -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAvailablePatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IncludeDetails != nil { - - // query param includeDetails - var qrIncludeDetails bool - - if o.IncludeDetails != nil { - qrIncludeDetails = *o.IncludeDetails - } - qIncludeDetails := swag.FormatBool(qrIncludeDetails) - if qIncludeDetails != "" { - - if err := r.SetQueryParam("includeDetails", qIncludeDetails); err != nil { - return err - } - } - } - - if o.Service != nil { - - // query param service - var qrService string - - if o.Service != nil { - qrService = *o.Service - } - qService := qrService - if qService != "" { - - if err := r.SetQueryParam("service", qService); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/patch_management/get_available_patches_responses.go b/v2/client/patch_management/get_available_patches_responses.go deleted file mode 100644 index da0a7f75..00000000 --- a/v2/client/patch_management/get_available_patches_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAvailablePatchesReader is a Reader for the GetAvailablePatches structure. -type GetAvailablePatchesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAvailablePatchesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAvailablePatchesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAvailablePatchesDefault(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 - } -} - -// NewGetAvailablePatchesOK creates a GetAvailablePatchesOK with default headers values -func NewGetAvailablePatchesOK() *GetAvailablePatchesOK { - return &GetAvailablePatchesOK{} -} - -/* -GetAvailablePatchesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAvailablePatchesOK struct { - Payload models.AvailablePatches -} - -// IsSuccess returns true when this get available patches o k response has a 2xx status code -func (o *GetAvailablePatchesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get available patches o k response has a 3xx status code -func (o *GetAvailablePatchesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get available patches o k response has a 4xx status code -func (o *GetAvailablePatchesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get available patches o k response has a 5xx status code -func (o *GetAvailablePatchesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get available patches o k response a status code equal to that given -func (o *GetAvailablePatchesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get available patches o k response -func (o *GetAvailablePatchesOK) Code() int { - return 200 -} - -func (o *GetAvailablePatchesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/available-patches][%d] getAvailablePatchesOK %s", 200, payload) -} - -func (o *GetAvailablePatchesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/available-patches][%d] getAvailablePatchesOK %s", 200, payload) -} - -func (o *GetAvailablePatchesOK) GetPayload() models.AvailablePatches { - return o.Payload -} - -func (o *GetAvailablePatchesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAvailablePatchesDefault creates a GetAvailablePatchesDefault with default headers values -func NewGetAvailablePatchesDefault(code int) *GetAvailablePatchesDefault { - return &GetAvailablePatchesDefault{ - _statusCode: code, - } -} - -/* -GetAvailablePatchesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAvailablePatchesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get available patches default response has a 2xx status code -func (o *GetAvailablePatchesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get available patches default response has a 3xx status code -func (o *GetAvailablePatchesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get available patches default response has a 4xx status code -func (o *GetAvailablePatchesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get available patches default response has a 5xx status code -func (o *GetAvailablePatchesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get available patches default response a status code equal to that given -func (o *GetAvailablePatchesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get available patches default response -func (o *GetAvailablePatchesDefault) Code() int { - return o._statusCode -} - -func (o *GetAvailablePatchesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/available-patches][%d] GetAvailablePatches default %s", o._statusCode, payload) -} - -func (o *GetAvailablePatchesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/available-patches][%d] GetAvailablePatches default %s", o._statusCode, payload) -} - -func (o *GetAvailablePatchesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAvailablePatchesDefault) 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/patch_management/get_patch_operation_status_parameters.go b/v2/client/patch_management/get_patch_operation_status_parameters.go deleted file mode 100644 index 40acd0ca..00000000 --- a/v2/client/patch_management/get_patch_operation_status_parameters.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/go-openapi/swag" -) - -// NewGetPatchOperationStatusParams creates a new GetPatchOperationStatusParams 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 NewGetPatchOperationStatusParams() *GetPatchOperationStatusParams { - return &GetPatchOperationStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPatchOperationStatusParamsWithTimeout creates a new GetPatchOperationStatusParams object -// with the ability to set a timeout on a request. -func NewGetPatchOperationStatusParamsWithTimeout(timeout time.Duration) *GetPatchOperationStatusParams { - return &GetPatchOperationStatusParams{ - timeout: timeout, - } -} - -// NewGetPatchOperationStatusParamsWithContext creates a new GetPatchOperationStatusParams object -// with the ability to set a context for a request. -func NewGetPatchOperationStatusParamsWithContext(ctx context.Context) *GetPatchOperationStatusParams { - return &GetPatchOperationStatusParams{ - Context: ctx, - } -} - -// NewGetPatchOperationStatusParamsWithHTTPClient creates a new GetPatchOperationStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPatchOperationStatusParamsWithHTTPClient(client *http.Client) *GetPatchOperationStatusParams { - return &GetPatchOperationStatusParams{ - HTTPClient: client, - } -} - -/* -GetPatchOperationStatusParams contains all the parameters to send to the API endpoint - - for the get patch operation status operation. - - Typically these are written to a http.Request. -*/ -type GetPatchOperationStatusParams struct { - - /* IncludeDetails. - - Specifies whether to return details of all service patch opertions on all nodes. By default, returns whether there is a patch operation in progress or not. - */ - IncludeDetails *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get patch operation status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPatchOperationStatusParams) WithDefaults() *GetPatchOperationStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get patch operation status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPatchOperationStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get patch operation status params -func (o *GetPatchOperationStatusParams) WithTimeout(timeout time.Duration) *GetPatchOperationStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get patch operation status params -func (o *GetPatchOperationStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get patch operation status params -func (o *GetPatchOperationStatusParams) WithContext(ctx context.Context) *GetPatchOperationStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get patch operation status params -func (o *GetPatchOperationStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get patch operation status params -func (o *GetPatchOperationStatusParams) WithHTTPClient(client *http.Client) *GetPatchOperationStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get patch operation status params -func (o *GetPatchOperationStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeDetails adds the includeDetails to the get patch operation status params -func (o *GetPatchOperationStatusParams) WithIncludeDetails(includeDetails *bool) *GetPatchOperationStatusParams { - o.SetIncludeDetails(includeDetails) - return o -} - -// SetIncludeDetails adds the includeDetails to the get patch operation status params -func (o *GetPatchOperationStatusParams) SetIncludeDetails(includeDetails *bool) { - o.IncludeDetails = includeDetails -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPatchOperationStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.IncludeDetails != nil { - - // query param includeDetails - var qrIncludeDetails bool - - if o.IncludeDetails != nil { - qrIncludeDetails = *o.IncludeDetails - } - qIncludeDetails := swag.FormatBool(qrIncludeDetails) - if qIncludeDetails != "" { - - if err := r.SetQueryParam("includeDetails", qIncludeDetails); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/patch_management/get_patch_operation_status_responses.go b/v2/client/patch_management/get_patch_operation_status_responses.go deleted file mode 100644 index 50d05e42..00000000 --- a/v2/client/patch_management/get_patch_operation_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPatchOperationStatusReader is a Reader for the GetPatchOperationStatus structure. -type GetPatchOperationStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPatchOperationStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPatchOperationStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPatchOperationStatusDefault(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 - } -} - -// NewGetPatchOperationStatusOK creates a GetPatchOperationStatusOK with default headers values -func NewGetPatchOperationStatusOK() *GetPatchOperationStatusOK { - return &GetPatchOperationStatusOK{} -} - -/* -GetPatchOperationStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPatchOperationStatusOK struct { - Payload *models.PatchOperationStatus -} - -// IsSuccess returns true when this get patch operation status o k response has a 2xx status code -func (o *GetPatchOperationStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get patch operation status o k response has a 3xx status code -func (o *GetPatchOperationStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get patch operation status o k response has a 4xx status code -func (o *GetPatchOperationStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get patch operation status o k response has a 5xx status code -func (o *GetPatchOperationStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get patch operation status o k response a status code equal to that given -func (o *GetPatchOperationStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get patch operation status o k response -func (o *GetPatchOperationStatusOK) Code() int { - return 200 -} - -func (o *GetPatchOperationStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/operation-status][%d] getPatchOperationStatusOK %s", 200, payload) -} - -func (o *GetPatchOperationStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/operation-status][%d] getPatchOperationStatusOK %s", 200, payload) -} - -func (o *GetPatchOperationStatusOK) GetPayload() *models.PatchOperationStatus { - return o.Payload -} - -func (o *GetPatchOperationStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PatchOperationStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPatchOperationStatusDefault creates a GetPatchOperationStatusDefault with default headers values -func NewGetPatchOperationStatusDefault(code int) *GetPatchOperationStatusDefault { - return &GetPatchOperationStatusDefault{ - _statusCode: code, - } -} - -/* -GetPatchOperationStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPatchOperationStatusDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get patch operation status default response has a 2xx status code -func (o *GetPatchOperationStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get patch operation status default response has a 3xx status code -func (o *GetPatchOperationStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get patch operation status default response has a 4xx status code -func (o *GetPatchOperationStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get patch operation status default response has a 5xx status code -func (o *GetPatchOperationStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get patch operation status default response a status code equal to that given -func (o *GetPatchOperationStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get patch operation status default response -func (o *GetPatchOperationStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetPatchOperationStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/operation-status][%d] GetPatchOperationStatus default %s", o._statusCode, payload) -} - -func (o *GetPatchOperationStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/operation-status][%d] GetPatchOperationStatus default %s", o._statusCode, payload) -} - -func (o *GetPatchOperationStatusDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPatchOperationStatusDefault) 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/patch_management/get_patches_history_parameters.go b/v2/client/patch_management/get_patches_history_parameters.go deleted file mode 100644 index 7f65f5c7..00000000 --- a/v2/client/patch_management/get_patches_history_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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" -) - -// NewGetPatchesHistoryParams creates a new GetPatchesHistoryParams 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 NewGetPatchesHistoryParams() *GetPatchesHistoryParams { - return &GetPatchesHistoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPatchesHistoryParamsWithTimeout creates a new GetPatchesHistoryParams object -// with the ability to set a timeout on a request. -func NewGetPatchesHistoryParamsWithTimeout(timeout time.Duration) *GetPatchesHistoryParams { - return &GetPatchesHistoryParams{ - timeout: timeout, - } -} - -// NewGetPatchesHistoryParamsWithContext creates a new GetPatchesHistoryParams object -// with the ability to set a context for a request. -func NewGetPatchesHistoryParamsWithContext(ctx context.Context) *GetPatchesHistoryParams { - return &GetPatchesHistoryParams{ - Context: ctx, - } -} - -// NewGetPatchesHistoryParamsWithHTTPClient creates a new GetPatchesHistoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPatchesHistoryParamsWithHTTPClient(client *http.Client) *GetPatchesHistoryParams { - return &GetPatchesHistoryParams{ - HTTPClient: client, - } -} - -/* -GetPatchesHistoryParams contains all the parameters to send to the API endpoint - - for the get patches history operation. - - Typically these are written to a http.Request. -*/ -type GetPatchesHistoryParams struct { - - /* Service. - - Specifies optional service name whose patch operation history is returned. If it is not specified, patch operations of all the serivces are returned. - */ - Service *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get patches history params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPatchesHistoryParams) WithDefaults() *GetPatchesHistoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get patches history params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPatchesHistoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get patches history params -func (o *GetPatchesHistoryParams) WithTimeout(timeout time.Duration) *GetPatchesHistoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get patches history params -func (o *GetPatchesHistoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get patches history params -func (o *GetPatchesHistoryParams) WithContext(ctx context.Context) *GetPatchesHistoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get patches history params -func (o *GetPatchesHistoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get patches history params -func (o *GetPatchesHistoryParams) WithHTTPClient(client *http.Client) *GetPatchesHistoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get patches history params -func (o *GetPatchesHistoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithService adds the service to the get patches history params -func (o *GetPatchesHistoryParams) WithService(service *string) *GetPatchesHistoryParams { - o.SetService(service) - return o -} - -// SetService adds the service to the get patches history params -func (o *GetPatchesHistoryParams) SetService(service *string) { - o.Service = service -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPatchesHistoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Service != nil { - - // query param service - var qrService string - - if o.Service != nil { - qrService = *o.Service - } - qService := qrService - if qService != "" { - - if err := r.SetQueryParam("service", qService); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/patch_management/get_patches_history_responses.go b/v2/client/patch_management/get_patches_history_responses.go deleted file mode 100644 index 600b4928..00000000 --- a/v2/client/patch_management/get_patches_history_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPatchesHistoryReader is a Reader for the GetPatchesHistory structure. -type GetPatchesHistoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPatchesHistoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPatchesHistoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPatchesHistoryDefault(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 - } -} - -// NewGetPatchesHistoryOK creates a GetPatchesHistoryOK with default headers values -func NewGetPatchesHistoryOK() *GetPatchesHistoryOK { - return &GetPatchesHistoryOK{} -} - -/* -GetPatchesHistoryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPatchesHistoryOK struct { - Payload models.PatchesHistory -} - -// IsSuccess returns true when this get patches history o k response has a 2xx status code -func (o *GetPatchesHistoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get patches history o k response has a 3xx status code -func (o *GetPatchesHistoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get patches history o k response has a 4xx status code -func (o *GetPatchesHistoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get patches history o k response has a 5xx status code -func (o *GetPatchesHistoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get patches history o k response a status code equal to that given -func (o *GetPatchesHistoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get patches history o k response -func (o *GetPatchesHistoryOK) Code() int { - return 200 -} - -func (o *GetPatchesHistoryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/patches-history][%d] getPatchesHistoryOK %s", 200, payload) -} - -func (o *GetPatchesHistoryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/patches-history][%d] getPatchesHistoryOK %s", 200, payload) -} - -func (o *GetPatchesHistoryOK) GetPayload() models.PatchesHistory { - return o.Payload -} - -func (o *GetPatchesHistoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPatchesHistoryDefault creates a GetPatchesHistoryDefault with default headers values -func NewGetPatchesHistoryDefault(code int) *GetPatchesHistoryDefault { - return &GetPatchesHistoryDefault{ - _statusCode: code, - } -} - -/* -GetPatchesHistoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPatchesHistoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get patches history default response has a 2xx status code -func (o *GetPatchesHistoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get patches history default response has a 3xx status code -func (o *GetPatchesHistoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get patches history default response has a 4xx status code -func (o *GetPatchesHistoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get patches history default response has a 5xx status code -func (o *GetPatchesHistoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get patches history default response a status code equal to that given -func (o *GetPatchesHistoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get patches history default response -func (o *GetPatchesHistoryDefault) Code() int { - return o._statusCode -} - -func (o *GetPatchesHistoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/patches-history][%d] GetPatchesHistory default %s", o._statusCode, payload) -} - -func (o *GetPatchesHistoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /patch-management/patches-history][%d] GetPatchesHistory default %s", o._statusCode, payload) -} - -func (o *GetPatchesHistoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPatchesHistoryDefault) 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/patch_management/import_patches_parameters.go b/v2/client/patch_management/import_patches_parameters.go deleted file mode 100644 index 058f9da7..00000000 --- a/v2/client/patch_management/import_patches_parameters.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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" -) - -// NewImportPatchesParams creates a new ImportPatchesParams 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 NewImportPatchesParams() *ImportPatchesParams { - return &ImportPatchesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewImportPatchesParamsWithTimeout creates a new ImportPatchesParams object -// with the ability to set a timeout on a request. -func NewImportPatchesParamsWithTimeout(timeout time.Duration) *ImportPatchesParams { - return &ImportPatchesParams{ - timeout: timeout, - } -} - -// NewImportPatchesParamsWithContext creates a new ImportPatchesParams object -// with the ability to set a context for a request. -func NewImportPatchesParamsWithContext(ctx context.Context) *ImportPatchesParams { - return &ImportPatchesParams{ - Context: ctx, - } -} - -// NewImportPatchesParamsWithHTTPClient creates a new ImportPatchesParams object -// with the ability to set a custom HTTPClient for a request. -func NewImportPatchesParamsWithHTTPClient(client *http.Client) *ImportPatchesParams { - return &ImportPatchesParams{ - HTTPClient: client, - } -} - -/* -ImportPatchesParams contains all the parameters to send to the API endpoint - - for the import patches operation. - - Typically these are written to a http.Request. -*/ -type ImportPatchesParams struct { - - // Checksum. - Checksum string - - // FileName. - FileName string - - // Patch. - Patch runtime.NamedReadCloser - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the import patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportPatchesParams) WithDefaults() *ImportPatchesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the import patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportPatchesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the import patches params -func (o *ImportPatchesParams) WithTimeout(timeout time.Duration) *ImportPatchesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the import patches params -func (o *ImportPatchesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the import patches params -func (o *ImportPatchesParams) WithContext(ctx context.Context) *ImportPatchesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the import patches params -func (o *ImportPatchesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the import patches params -func (o *ImportPatchesParams) WithHTTPClient(client *http.Client) *ImportPatchesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the import patches params -func (o *ImportPatchesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithChecksum adds the checksum to the import patches params -func (o *ImportPatchesParams) WithChecksum(checksum string) *ImportPatchesParams { - o.SetChecksum(checksum) - return o -} - -// SetChecksum adds the checksum to the import patches params -func (o *ImportPatchesParams) SetChecksum(checksum string) { - o.Checksum = checksum -} - -// WithFileName adds the fileName to the import patches params -func (o *ImportPatchesParams) WithFileName(fileName string) *ImportPatchesParams { - o.SetFileName(fileName) - return o -} - -// SetFileName adds the fileName to the import patches params -func (o *ImportPatchesParams) SetFileName(fileName string) { - o.FileName = fileName -} - -// WithPatch adds the patch to the import patches params -func (o *ImportPatchesParams) WithPatch(patch runtime.NamedReadCloser) *ImportPatchesParams { - o.SetPatch(patch) - return o -} - -// SetPatch adds the patch to the import patches params -func (o *ImportPatchesParams) SetPatch(patch runtime.NamedReadCloser) { - o.Patch = patch -} - -// WriteToRequest writes these params to a swagger request -func (o *ImportPatchesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // form param checksum - frChecksum := o.Checksum - fChecksum := frChecksum - if fChecksum != "" { - if err := r.SetFormParam("checksum", fChecksum); err != nil { - return err - } - } - - // form param fileName - frFileName := o.FileName - fFileName := frFileName - if fFileName != "" { - if err := r.SetFormParam("fileName", fFileName); err != nil { - return err - } - } - // form file param patch - if err := r.SetFileParam("patch", o.Patch); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/patch_management/import_patches_responses.go b/v2/client/patch_management/import_patches_responses.go deleted file mode 100644 index df8f1c47..00000000 --- a/v2/client/patch_management/import_patches_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ImportPatchesReader is a Reader for the ImportPatches structure. -type ImportPatchesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ImportPatchesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewImportPatchesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewImportPatchesDefault(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 - } -} - -// NewImportPatchesCreated creates a ImportPatchesCreated with default headers values -func NewImportPatchesCreated() *ImportPatchesCreated { - return &ImportPatchesCreated{} -} - -/* -ImportPatchesCreated describes a response with status code 201, with default header values. - -Success -*/ -type ImportPatchesCreated struct { - Payload models.PatchesDetails -} - -// IsSuccess returns true when this import patches created response has a 2xx status code -func (o *ImportPatchesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this import patches created response has a 3xx status code -func (o *ImportPatchesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this import patches created response has a 4xx status code -func (o *ImportPatchesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this import patches created response has a 5xx status code -func (o *ImportPatchesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this import patches created response a status code equal to that given -func (o *ImportPatchesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the import patches created response -func (o *ImportPatchesCreated) Code() int { - return 201 -} - -func (o *ImportPatchesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /patch-management/available-patches][%d] importPatchesCreated %s", 201, payload) -} - -func (o *ImportPatchesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /patch-management/available-patches][%d] importPatchesCreated %s", 201, payload) -} - -func (o *ImportPatchesCreated) GetPayload() models.PatchesDetails { - return o.Payload -} - -func (o *ImportPatchesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewImportPatchesDefault creates a ImportPatchesDefault with default headers values -func NewImportPatchesDefault(code int) *ImportPatchesDefault { - return &ImportPatchesDefault{ - _statusCode: code, - } -} - -/* -ImportPatchesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ImportPatchesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this import patches default response has a 2xx status code -func (o *ImportPatchesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this import patches default response has a 3xx status code -func (o *ImportPatchesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this import patches default response has a 4xx status code -func (o *ImportPatchesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this import patches default response has a 5xx status code -func (o *ImportPatchesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this import patches default response a status code equal to that given -func (o *ImportPatchesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the import patches default response -func (o *ImportPatchesDefault) Code() int { - return o._statusCode -} - -func (o *ImportPatchesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /patch-management/available-patches][%d] ImportPatches default %s", o._statusCode, payload) -} - -func (o *ImportPatchesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /patch-management/available-patches][%d] ImportPatches default %s", o._statusCode, payload) -} - -func (o *ImportPatchesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ImportPatchesDefault) 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/patch_management/patch_management_client.go b/v2/client/patch_management/patch_management_client.go deleted file mode 100644 index bd2ea6eb..00000000 --- a/v2/client/patch_management/patch_management_client.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new patch management API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new patch management API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new patch management API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for patch management API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithContentType allows the client to force the Content-Type header -// to negotiate a specific Consumer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithContentType(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{mime} - } -} - -// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". -func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"application/json"} -} - -// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data". -func WithContentTypeMultipartFormData(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"multipart/form-data"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - ApplyPatches(params *ApplyPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyPatchesCreated, error) - - GetAppliedPatches(params *GetAppliedPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppliedPatchesOK, error) - - GetAvailablePatches(params *GetAvailablePatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAvailablePatchesOK, error) - - GetPatchOperationStatus(params *GetPatchOperationStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPatchOperationStatusOK, error) - - GetPatchesHistory(params *GetPatchesHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPatchesHistoryOK, error) - - ImportPatches(params *ImportPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportPatchesCreated, error) - - RevertPatches(params *RevertPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RevertPatchesCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ApplyPatches applies patches - -Apply a service patch and its dependencies. -*/ -func (a *Client) ApplyPatches(params *ApplyPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApplyPatchesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewApplyPatchesParams() - } - op := &runtime.ClientOperation{ - ID: "ApplyPatches", - Method: "POST", - PathPattern: "/patch-management/available-patches", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ApplyPatchesReader{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.(*ApplyPatchesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ApplyPatchesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAppliedPatches gets applied patches - -Returns a list of currently applied patches that are running on the cluster. -*/ -func (a *Client) GetAppliedPatches(params *GetAppliedPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAppliedPatchesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAppliedPatchesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAppliedPatches", - Method: "GET", - PathPattern: "/patch-management/applied-patches", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAppliedPatchesReader{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.(*GetAppliedPatchesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAppliedPatchesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAvailablePatches gets available patches - -Returns a list of patches that are available and ready to apply on the cluster. -*/ -func (a *Client) GetAvailablePatches(params *GetAvailablePatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAvailablePatchesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAvailablePatchesParams() - } - op := &runtime.ClientOperation{ - ID: "GetAvailablePatches", - Method: "GET", - PathPattern: "/patch-management/available-patches", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAvailablePatchesReader{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.(*GetAvailablePatchesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAvailablePatchesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPatchOperationStatus gets patch operation status - -Returns the status of the current or the last patch operation. There can be only one active patch operation at any given time. -*/ -func (a *Client) GetPatchOperationStatus(params *GetPatchOperationStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPatchOperationStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPatchOperationStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetPatchOperationStatus", - Method: "GET", - PathPattern: "/patch-management/operation-status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPatchOperationStatusReader{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.(*GetPatchOperationStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPatchOperationStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPatchesHistory gets patches history - -Get the history of all the patch management operations. -*/ -func (a *Client) GetPatchesHistory(params *GetPatchesHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPatchesHistoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPatchesHistoryParams() - } - op := &runtime.ClientOperation{ - ID: "GetPatchesHistory", - Method: "GET", - PathPattern: "/patch-management/patches-history", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPatchesHistoryReader{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.(*GetPatchesHistoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPatchesHistoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ImportPatches imports patches - -Import a patch or a hotfix to the cluster. -*/ -func (a *Client) ImportPatches(params *ImportPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportPatchesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewImportPatchesParams() - } - op := &runtime.ClientOperation{ - ID: "ImportPatches", - Method: "PUT", - PathPattern: "/patch-management/available-patches", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"multipart/form-data"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ImportPatchesReader{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.(*ImportPatchesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ImportPatchesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RevertPatches reverts patches - -Revert an applied service patch and its dependencies. -*/ -func (a *Client) RevertPatches(params *RevertPatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RevertPatchesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRevertPatchesParams() - } - op := &runtime.ClientOperation{ - ID: "RevertPatches", - Method: "POST", - PathPattern: "/patch-management/applied-patches", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RevertPatchesReader{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.(*RevertPatchesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RevertPatchesDefault) - 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/v2/client/patch_management/revert_patches_parameters.go b/v2/client/patch_management/revert_patches_parameters.go deleted file mode 100644 index 417525ad..00000000 --- a/v2/client/patch_management/revert_patches_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRevertPatchesParams creates a new RevertPatchesParams 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 NewRevertPatchesParams() *RevertPatchesParams { - return &RevertPatchesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRevertPatchesParamsWithTimeout creates a new RevertPatchesParams object -// with the ability to set a timeout on a request. -func NewRevertPatchesParamsWithTimeout(timeout time.Duration) *RevertPatchesParams { - return &RevertPatchesParams{ - timeout: timeout, - } -} - -// NewRevertPatchesParamsWithContext creates a new RevertPatchesParams object -// with the ability to set a context for a request. -func NewRevertPatchesParamsWithContext(ctx context.Context) *RevertPatchesParams { - return &RevertPatchesParams{ - Context: ctx, - } -} - -// NewRevertPatchesParamsWithHTTPClient creates a new RevertPatchesParams object -// with the ability to set a custom HTTPClient for a request. -func NewRevertPatchesParamsWithHTTPClient(client *http.Client) *RevertPatchesParams { - return &RevertPatchesParams{ - HTTPClient: client, - } -} - -/* -RevertPatchesParams contains all the parameters to send to the API endpoint - - for the revert patches operation. - - Typically these are written to a http.Request. -*/ -type RevertPatchesParams struct { - - /* Body. - - Request to revert patches. - */ - Body *models.RevertPatchesRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the revert patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RevertPatchesParams) WithDefaults() *RevertPatchesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the revert patches params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RevertPatchesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the revert patches params -func (o *RevertPatchesParams) WithTimeout(timeout time.Duration) *RevertPatchesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the revert patches params -func (o *RevertPatchesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the revert patches params -func (o *RevertPatchesParams) WithContext(ctx context.Context) *RevertPatchesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the revert patches params -func (o *RevertPatchesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the revert patches params -func (o *RevertPatchesParams) WithHTTPClient(client *http.Client) *RevertPatchesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the revert patches params -func (o *RevertPatchesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the revert patches params -func (o *RevertPatchesParams) WithBody(body *models.RevertPatchesRequest) *RevertPatchesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the revert patches params -func (o *RevertPatchesParams) SetBody(body *models.RevertPatchesRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RevertPatchesParams) 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/patch_management/revert_patches_responses.go b/v2/client/patch_management/revert_patches_responses.go deleted file mode 100644 index 809a9131..00000000 --- a/v2/client/patch_management/revert_patches_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package patch_management - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RevertPatchesReader is a Reader for the RevertPatches structure. -type RevertPatchesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RevertPatchesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRevertPatchesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRevertPatchesDefault(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 - } -} - -// NewRevertPatchesCreated creates a RevertPatchesCreated with default headers values -func NewRevertPatchesCreated() *RevertPatchesCreated { - return &RevertPatchesCreated{} -} - -/* -RevertPatchesCreated describes a response with status code 201, with default header values. - -Success -*/ -type RevertPatchesCreated struct { - Payload models.ServicePatchLevels -} - -// IsSuccess returns true when this revert patches created response has a 2xx status code -func (o *RevertPatchesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this revert patches created response has a 3xx status code -func (o *RevertPatchesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this revert patches created response has a 4xx status code -func (o *RevertPatchesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this revert patches created response has a 5xx status code -func (o *RevertPatchesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this revert patches created response a status code equal to that given -func (o *RevertPatchesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the revert patches created response -func (o *RevertPatchesCreated) Code() int { - return 201 -} - -func (o *RevertPatchesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/applied-patches][%d] revertPatchesCreated %s", 201, payload) -} - -func (o *RevertPatchesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/applied-patches][%d] revertPatchesCreated %s", 201, payload) -} - -func (o *RevertPatchesCreated) GetPayload() models.ServicePatchLevels { - return o.Payload -} - -func (o *RevertPatchesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRevertPatchesDefault creates a RevertPatchesDefault with default headers values -func NewRevertPatchesDefault(code int) *RevertPatchesDefault { - return &RevertPatchesDefault{ - _statusCode: code, - } -} - -/* -RevertPatchesDefault describes a response with status code -1, with default header values. - -Error -*/ -type RevertPatchesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this revert patches default response has a 2xx status code -func (o *RevertPatchesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this revert patches default response has a 3xx status code -func (o *RevertPatchesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this revert patches default response has a 4xx status code -func (o *RevertPatchesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this revert patches default response has a 5xx status code -func (o *RevertPatchesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this revert patches default response a status code equal to that given -func (o *RevertPatchesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the revert patches default response -func (o *RevertPatchesDefault) Code() int { - return o._statusCode -} - -func (o *RevertPatchesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/applied-patches][%d] RevertPatches default %s", o._statusCode, payload) -} - -func (o *RevertPatchesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /patch-management/applied-patches][%d] RevertPatches default %s", o._statusCode, payload) -} - -func (o *RevertPatchesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RevertPatchesDefault) 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/add_hosts_parameters.go b/v2/client/platform/add_hosts_parameters.go deleted file mode 100644 index b20cb2d7..00000000 --- a/v2/client/platform/add_hosts_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddHostsParams creates a new AddHostsParams 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 NewAddHostsParams() *AddHostsParams { - return &AddHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddHostsParamsWithTimeout creates a new AddHostsParams object -// with the ability to set a timeout on a request. -func NewAddHostsParamsWithTimeout(timeout time.Duration) *AddHostsParams { - return &AddHostsParams{ - timeout: timeout, - } -} - -// NewAddHostsParamsWithContext creates a new AddHostsParams object -// with the ability to set a context for a request. -func NewAddHostsParamsWithContext(ctx context.Context) *AddHostsParams { - return &AddHostsParams{ - Context: ctx, - } -} - -// NewAddHostsParamsWithHTTPClient creates a new AddHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddHostsParamsWithHTTPClient(client *http.Client) *AddHostsParams { - return &AddHostsParams{ - HTTPClient: client, - } -} - -/* -AddHostsParams contains all the parameters to send to the API endpoint - - for the add hosts operation. - - Typically these are written to a http.Request. -*/ -type AddHostsParams struct { - - /* Body. - - Specifies the request to add entries to /etc/hosts - */ - Body models.HostMappingsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddHostsParams) WithDefaults() *AddHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add hosts params -func (o *AddHostsParams) WithTimeout(timeout time.Duration) *AddHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add hosts params -func (o *AddHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add hosts params -func (o *AddHostsParams) WithContext(ctx context.Context) *AddHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add hosts params -func (o *AddHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add hosts params -func (o *AddHostsParams) WithHTTPClient(client *http.Client) *AddHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add hosts params -func (o *AddHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add hosts params -func (o *AddHostsParams) WithBody(body models.HostMappingsParameters) *AddHostsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add hosts params -func (o *AddHostsParams) SetBody(body models.HostMappingsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddHostsParams) 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/add_hosts_responses.go b/v2/client/platform/add_hosts_responses.go deleted file mode 100644 index 8fc4269d..00000000 --- a/v2/client/platform/add_hosts_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddHostsReader is a Reader for the AddHosts structure. -type AddHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddHostsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddHostsDefault(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 - } -} - -// NewAddHostsCreated creates a AddHostsCreated with default headers values -func NewAddHostsCreated() *AddHostsCreated { - return &AddHostsCreated{} -} - -/* -AddHostsCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddHostsCreated struct { - Payload *models.HostMappings -} - -// IsSuccess returns true when this add hosts created response has a 2xx status code -func (o *AddHostsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add hosts created response has a 3xx status code -func (o *AddHostsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add hosts created response has a 4xx status code -func (o *AddHostsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add hosts created response has a 5xx status code -func (o *AddHostsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add hosts created response a status code equal to that given -func (o *AddHostsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add hosts created response -func (o *AddHostsCreated) Code() int { - return 201 -} - -func (o *AddHostsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings][%d] addHostsCreated %s", 201, payload) -} - -func (o *AddHostsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings][%d] addHostsCreated %s", 201, payload) -} - -func (o *AddHostsCreated) GetPayload() *models.HostMappings { - return o.Payload -} - -func (o *AddHostsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostMappings) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddHostsDefault creates a AddHostsDefault with default headers values -func NewAddHostsDefault(code int) *AddHostsDefault { - return &AddHostsDefault{ - _statusCode: code, - } -} - -/* -AddHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddHostsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add hosts default response has a 2xx status code -func (o *AddHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add hosts default response has a 3xx status code -func (o *AddHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add hosts default response has a 4xx status code -func (o *AddHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add hosts default response has a 5xx status code -func (o *AddHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add hosts default response a status code equal to that given -func (o *AddHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add hosts default response -func (o *AddHostsDefault) Code() int { - return o._statusCode -} - -func (o *AddHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings][%d] AddHosts default %s", o._statusCode, payload) -} - -func (o *AddHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings][%d] AddHosts default %s", o._statusCode, payload) -} - -func (o *AddHostsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddHostsDefault) 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/add_remote_disk_parameters.go b/v2/client/platform/add_remote_disk_parameters.go deleted file mode 100644 index 637ea4ea..00000000 --- a/v2/client/platform/add_remote_disk_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddRemoteDiskParams creates a new AddRemoteDiskParams 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 NewAddRemoteDiskParams() *AddRemoteDiskParams { - return &AddRemoteDiskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddRemoteDiskParamsWithTimeout creates a new AddRemoteDiskParams object -// with the ability to set a timeout on a request. -func NewAddRemoteDiskParamsWithTimeout(timeout time.Duration) *AddRemoteDiskParams { - return &AddRemoteDiskParams{ - timeout: timeout, - } -} - -// NewAddRemoteDiskParamsWithContext creates a new AddRemoteDiskParams object -// with the ability to set a context for a request. -func NewAddRemoteDiskParamsWithContext(ctx context.Context) *AddRemoteDiskParams { - return &AddRemoteDiskParams{ - Context: ctx, - } -} - -// NewAddRemoteDiskParamsWithHTTPClient creates a new AddRemoteDiskParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddRemoteDiskParamsWithHTTPClient(client *http.Client) *AddRemoteDiskParams { - return &AddRemoteDiskParams{ - HTTPClient: client, - } -} - -/* -AddRemoteDiskParams contains all the parameters to send to the API endpoint - - for the add remote disk operation. - - Typically these are written to a http.Request. -*/ -type AddRemoteDiskParams struct { - - /* Body. - - Specifies the remote disk configuration. - */ - Body *models.RemoteDisks - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add remote disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddRemoteDiskParams) WithDefaults() *AddRemoteDiskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add remote disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddRemoteDiskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add remote disk params -func (o *AddRemoteDiskParams) WithTimeout(timeout time.Duration) *AddRemoteDiskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add remote disk params -func (o *AddRemoteDiskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add remote disk params -func (o *AddRemoteDiskParams) WithContext(ctx context.Context) *AddRemoteDiskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add remote disk params -func (o *AddRemoteDiskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add remote disk params -func (o *AddRemoteDiskParams) WithHTTPClient(client *http.Client) *AddRemoteDiskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add remote disk params -func (o *AddRemoteDiskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add remote disk params -func (o *AddRemoteDiskParams) WithBody(body *models.RemoteDisks) *AddRemoteDiskParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add remote disk params -func (o *AddRemoteDiskParams) SetBody(body *models.RemoteDisks) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddRemoteDiskParams) 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/add_remote_disk_responses.go b/v2/client/platform/add_remote_disk_responses.go deleted file mode 100644 index 936ec64f..00000000 --- a/v2/client/platform/add_remote_disk_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddRemoteDiskReader is a Reader for the AddRemoteDisk structure. -type AddRemoteDiskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddRemoteDiskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddRemoteDiskCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddRemoteDiskDefault(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 - } -} - -// NewAddRemoteDiskCreated creates a AddRemoteDiskCreated with default headers values -func NewAddRemoteDiskCreated() *AddRemoteDiskCreated { - return &AddRemoteDiskCreated{} -} - -/* -AddRemoteDiskCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddRemoteDiskCreated struct { - Payload *models.AddRemoteDiskResponseBody -} - -// IsSuccess returns true when this add remote disk created response has a 2xx status code -func (o *AddRemoteDiskCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add remote disk created response has a 3xx status code -func (o *AddRemoteDiskCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add remote disk created response has a 4xx status code -func (o *AddRemoteDiskCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add remote disk created response has a 5xx status code -func (o *AddRemoteDiskCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add remote disk created response a status code equal to that given -func (o *AddRemoteDiskCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add remote disk created response -func (o *AddRemoteDiskCreated) Code() int { - return 201 -} - -func (o *AddRemoteDiskCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/remote][%d] addRemoteDiskCreated %s", 201, payload) -} - -func (o *AddRemoteDiskCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/remote][%d] addRemoteDiskCreated %s", 201, payload) -} - -func (o *AddRemoteDiskCreated) GetPayload() *models.AddRemoteDiskResponseBody { - return o.Payload -} - -func (o *AddRemoteDiskCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AddRemoteDiskResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddRemoteDiskDefault creates a AddRemoteDiskDefault with default headers values -func NewAddRemoteDiskDefault(code int) *AddRemoteDiskDefault { - return &AddRemoteDiskDefault{ - _statusCode: code, - } -} - -/* -AddRemoteDiskDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddRemoteDiskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add remote disk default response has a 2xx status code -func (o *AddRemoteDiskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add remote disk default response has a 3xx status code -func (o *AddRemoteDiskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add remote disk default response has a 4xx status code -func (o *AddRemoteDiskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add remote disk default response has a 5xx status code -func (o *AddRemoteDiskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add remote disk default response a status code equal to that given -func (o *AddRemoteDiskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add remote disk default response -func (o *AddRemoteDiskDefault) Code() int { - return o._statusCode -} - -func (o *AddRemoteDiskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/remote][%d] AddRemoteDisk default %s", o._statusCode, payload) -} - -func (o *AddRemoteDiskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/remote][%d] AddRemoteDisk default %s", o._statusCode, payload) -} - -func (o *AddRemoteDiskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddRemoteDiskDefault) 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/clear_smtp_configuration_parameters.go b/v2/client/platform/clear_smtp_configuration_parameters.go deleted file mode 100644 index 0a1563d2..00000000 --- a/v2/client/platform/clear_smtp_configuration_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewClearSMTPConfigurationParams creates a new ClearSMTPConfigurationParams 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 NewClearSMTPConfigurationParams() *ClearSMTPConfigurationParams { - return &ClearSMTPConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewClearSMTPConfigurationParamsWithTimeout creates a new ClearSMTPConfigurationParams object -// with the ability to set a timeout on a request. -func NewClearSMTPConfigurationParamsWithTimeout(timeout time.Duration) *ClearSMTPConfigurationParams { - return &ClearSMTPConfigurationParams{ - timeout: timeout, - } -} - -// NewClearSMTPConfigurationParamsWithContext creates a new ClearSMTPConfigurationParams object -// with the ability to set a context for a request. -func NewClearSMTPConfigurationParamsWithContext(ctx context.Context) *ClearSMTPConfigurationParams { - return &ClearSMTPConfigurationParams{ - Context: ctx, - } -} - -// NewClearSMTPConfigurationParamsWithHTTPClient creates a new ClearSMTPConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewClearSMTPConfigurationParamsWithHTTPClient(client *http.Client) *ClearSMTPConfigurationParams { - return &ClearSMTPConfigurationParams{ - HTTPClient: client, - } -} - -/* -ClearSMTPConfigurationParams contains all the parameters to send to the API endpoint - - for the clear SMTP configuration operation. - - Typically these are written to a http.Request. -*/ -type ClearSMTPConfigurationParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clear SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearSMTPConfigurationParams) WithDefaults() *ClearSMTPConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clear SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearSMTPConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) WithTimeout(timeout time.Duration) *ClearSMTPConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) WithContext(ctx context.Context) *ClearSMTPConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) WithHTTPClient(client *http.Client) *ClearSMTPConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clear SMTP configuration params -func (o *ClearSMTPConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ClearSMTPConfigurationParams) 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/clear_smtp_configuration_responses.go b/v2/client/platform/clear_smtp_configuration_responses.go deleted file mode 100644 index 67ef25bb..00000000 --- a/v2/client/platform/clear_smtp_configuration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ClearSMTPConfigurationReader is a Reader for the ClearSMTPConfiguration structure. -type ClearSMTPConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ClearSMTPConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewClearSMTPConfigurationNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewClearSMTPConfigurationDefault(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 - } -} - -// NewClearSMTPConfigurationNoContent creates a ClearSMTPConfigurationNoContent with default headers values -func NewClearSMTPConfigurationNoContent() *ClearSMTPConfigurationNoContent { - return &ClearSMTPConfigurationNoContent{} -} - -/* -ClearSMTPConfigurationNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ClearSMTPConfigurationNoContent struct { -} - -// IsSuccess returns true when this clear Smtp configuration no content response has a 2xx status code -func (o *ClearSMTPConfigurationNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clear Smtp configuration no content response has a 3xx status code -func (o *ClearSMTPConfigurationNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clear Smtp configuration no content response has a 4xx status code -func (o *ClearSMTPConfigurationNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this clear Smtp configuration no content response has a 5xx status code -func (o *ClearSMTPConfigurationNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this clear Smtp configuration no content response a status code equal to that given -func (o *ClearSMTPConfigurationNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the clear Smtp configuration no content response -func (o *ClearSMTPConfigurationNoContent) Code() int { - return 204 -} - -func (o *ClearSMTPConfigurationNoContent) Error() string { - return fmt.Sprintf("[DELETE /clusters/smtp][%d] clearSmtpConfigurationNoContent", 204) -} - -func (o *ClearSMTPConfigurationNoContent) String() string { - return fmt.Sprintf("[DELETE /clusters/smtp][%d] clearSmtpConfigurationNoContent", 204) -} - -func (o *ClearSMTPConfigurationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewClearSMTPConfigurationDefault creates a ClearSMTPConfigurationDefault with default headers values -func NewClearSMTPConfigurationDefault(code int) *ClearSMTPConfigurationDefault { - return &ClearSMTPConfigurationDefault{ - _statusCode: code, - } -} - -/* -ClearSMTPConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type ClearSMTPConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this clear SMTP configuration default response has a 2xx status code -func (o *ClearSMTPConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clear SMTP configuration default response has a 3xx status code -func (o *ClearSMTPConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clear SMTP configuration default response has a 4xx status code -func (o *ClearSMTPConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clear SMTP configuration default response has a 5xx status code -func (o *ClearSMTPConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clear SMTP configuration default response a status code equal to that given -func (o *ClearSMTPConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clear SMTP configuration default response -func (o *ClearSMTPConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *ClearSMTPConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/smtp][%d] ClearSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *ClearSMTPConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/smtp][%d] ClearSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *ClearSMTPConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ClearSMTPConfigurationDefault) 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/create_cluster_parameters.go b/v2/client/platform/create_cluster_parameters.go deleted file mode 100644 index ee6f449a..00000000 --- a/v2/client/platform/create_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateClusterParams creates a new CreateClusterParams 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 NewCreateClusterParams() *CreateClusterParams { - return &CreateClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateClusterParamsWithTimeout creates a new CreateClusterParams object -// with the ability to set a timeout on a request. -func NewCreateClusterParamsWithTimeout(timeout time.Duration) *CreateClusterParams { - return &CreateClusterParams{ - timeout: timeout, - } -} - -// NewCreateClusterParamsWithContext creates a new CreateClusterParams object -// with the ability to set a context for a request. -func NewCreateClusterParamsWithContext(ctx context.Context) *CreateClusterParams { - return &CreateClusterParams{ - Context: ctx, - } -} - -// NewCreateClusterParamsWithHTTPClient creates a new CreateClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateClusterParamsWithHTTPClient(client *http.Client) *CreateClusterParams { - return &CreateClusterParams{ - HTTPClient: client, - } -} - -/* -CreateClusterParams contains all the parameters to send to the API endpoint - - for the create cluster operation. - - Typically these are written to a http.Request. -*/ -type CreateClusterParams struct { - - /* Body. - - Specifies the parameters to create cluster. - */ - Body *models.CreateClusterParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClusterParams) WithDefaults() *CreateClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create cluster params -func (o *CreateClusterParams) WithTimeout(timeout time.Duration) *CreateClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create cluster params -func (o *CreateClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create cluster params -func (o *CreateClusterParams) WithContext(ctx context.Context) *CreateClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create cluster params -func (o *CreateClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create cluster params -func (o *CreateClusterParams) WithHTTPClient(client *http.Client) *CreateClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create cluster params -func (o *CreateClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create cluster params -func (o *CreateClusterParams) WithBody(body *models.CreateClusterParams) *CreateClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create cluster params -func (o *CreateClusterParams) SetBody(body *models.CreateClusterParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateClusterParams) 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/create_cluster_responses.go b/v2/client/platform/create_cluster_responses.go deleted file mode 100644 index 6be3d5a5..00000000 --- a/v2/client/platform/create_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateClusterReader is a Reader for the CreateCluster structure. -type CreateClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateClusterCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateClusterDefault(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 - } -} - -// NewCreateClusterCreated creates a CreateClusterCreated with default headers values -func NewCreateClusterCreated() *CreateClusterCreated { - return &CreateClusterCreated{} -} - -/* -CreateClusterCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateClusterCreated struct { - Payload *models.Cluster -} - -// IsSuccess returns true when this create cluster created response has a 2xx status code -func (o *CreateClusterCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create cluster created response has a 3xx status code -func (o *CreateClusterCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create cluster created response has a 4xx status code -func (o *CreateClusterCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create cluster created response has a 5xx status code -func (o *CreateClusterCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create cluster created response a status code equal to that given -func (o *CreateClusterCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create cluster created response -func (o *CreateClusterCreated) Code() int { - return 201 -} - -func (o *CreateClusterCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters][%d] createClusterCreated %s", 201, payload) -} - -func (o *CreateClusterCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters][%d] createClusterCreated %s", 201, payload) -} - -func (o *CreateClusterCreated) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *CreateClusterCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateClusterDefault creates a CreateClusterDefault with default headers values -func NewCreateClusterDefault(code int) *CreateClusterDefault { - return &CreateClusterDefault{ - _statusCode: code, - } -} - -/* -CreateClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create cluster default response has a 2xx status code -func (o *CreateClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create cluster default response has a 3xx status code -func (o *CreateClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create cluster default response has a 4xx status code -func (o *CreateClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create cluster default response has a 5xx status code -func (o *CreateClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create cluster default response a status code equal to that given -func (o *CreateClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create cluster default response -func (o *CreateClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreateClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters][%d] CreateCluster default %s", o._statusCode, payload) -} - -func (o *CreateClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters][%d] CreateCluster default %s", o._statusCode, payload) -} - -func (o *CreateClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateClusterDefault) 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/create_cluster_vlan_parameters.go b/v2/client/platform/create_cluster_vlan_parameters.go deleted file mode 100644 index 25d2a2f0..00000000 --- a/v2/client/platform/create_cluster_vlan_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateClusterVlanParams creates a new CreateClusterVlanParams 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 NewCreateClusterVlanParams() *CreateClusterVlanParams { - return &CreateClusterVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateClusterVlanParamsWithTimeout creates a new CreateClusterVlanParams object -// with the ability to set a timeout on a request. -func NewCreateClusterVlanParamsWithTimeout(timeout time.Duration) *CreateClusterVlanParams { - return &CreateClusterVlanParams{ - timeout: timeout, - } -} - -// NewCreateClusterVlanParamsWithContext creates a new CreateClusterVlanParams object -// with the ability to set a context for a request. -func NewCreateClusterVlanParamsWithContext(ctx context.Context) *CreateClusterVlanParams { - return &CreateClusterVlanParams{ - Context: ctx, - } -} - -// NewCreateClusterVlanParamsWithHTTPClient creates a new CreateClusterVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateClusterVlanParamsWithHTTPClient(client *http.Client) *CreateClusterVlanParams { - return &CreateClusterVlanParams{ - HTTPClient: client, - } -} - -/* -CreateClusterVlanParams contains all the parameters to send to the API endpoint - - for the create cluster vlan operation. - - Typically these are written to a http.Request. -*/ -type CreateClusterVlanParams struct { - - /* Body. - - Parameters to create a vlan. - */ - Body *models.CreateClusterVlanParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClusterVlanParams) WithDefaults() *CreateClusterVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClusterVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create cluster vlan params -func (o *CreateClusterVlanParams) WithTimeout(timeout time.Duration) *CreateClusterVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create cluster vlan params -func (o *CreateClusterVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create cluster vlan params -func (o *CreateClusterVlanParams) WithContext(ctx context.Context) *CreateClusterVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create cluster vlan params -func (o *CreateClusterVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create cluster vlan params -func (o *CreateClusterVlanParams) WithHTTPClient(client *http.Client) *CreateClusterVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create cluster vlan params -func (o *CreateClusterVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create cluster vlan params -func (o *CreateClusterVlanParams) WithBody(body *models.CreateClusterVlanParams) *CreateClusterVlanParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create cluster vlan params -func (o *CreateClusterVlanParams) SetBody(body *models.CreateClusterVlanParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateClusterVlanParams) 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/create_cluster_vlan_responses.go b/v2/client/platform/create_cluster_vlan_responses.go deleted file mode 100644 index 6723b6de..00000000 --- a/v2/client/platform/create_cluster_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateClusterVlanReader is a Reader for the CreateClusterVlan structure. -type CreateClusterVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateClusterVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateClusterVlanCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateClusterVlanDefault(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 - } -} - -// NewCreateClusterVlanCreated creates a CreateClusterVlanCreated with default headers values -func NewCreateClusterVlanCreated() *CreateClusterVlanCreated { - return &CreateClusterVlanCreated{} -} - -/* -CreateClusterVlanCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateClusterVlanCreated struct { - Payload *models.ClusterVlanParams -} - -// IsSuccess returns true when this create cluster vlan created response has a 2xx status code -func (o *CreateClusterVlanCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create cluster vlan created response has a 3xx status code -func (o *CreateClusterVlanCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create cluster vlan created response has a 4xx status code -func (o *CreateClusterVlanCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create cluster vlan created response has a 5xx status code -func (o *CreateClusterVlanCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create cluster vlan created response a status code equal to that given -func (o *CreateClusterVlanCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create cluster vlan created response -func (o *CreateClusterVlanCreated) Code() int { - return 201 -} - -func (o *CreateClusterVlanCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/vlans][%d] createClusterVlanCreated %s", 201, payload) -} - -func (o *CreateClusterVlanCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/vlans][%d] createClusterVlanCreated %s", 201, payload) -} - -func (o *CreateClusterVlanCreated) GetPayload() *models.ClusterVlanParams { - return o.Payload -} - -func (o *CreateClusterVlanCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterVlanParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateClusterVlanDefault creates a CreateClusterVlanDefault with default headers values -func NewCreateClusterVlanDefault(code int) *CreateClusterVlanDefault { - return &CreateClusterVlanDefault{ - _statusCode: code, - } -} - -/* -CreateClusterVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateClusterVlanDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create cluster vlan default response has a 2xx status code -func (o *CreateClusterVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create cluster vlan default response has a 3xx status code -func (o *CreateClusterVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create cluster vlan default response has a 4xx status code -func (o *CreateClusterVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create cluster vlan default response has a 5xx status code -func (o *CreateClusterVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create cluster vlan default response a status code equal to that given -func (o *CreateClusterVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create cluster vlan default response -func (o *CreateClusterVlanDefault) Code() int { - return o._statusCode -} - -func (o *CreateClusterVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/vlans][%d] CreateClusterVlan default %s", o._statusCode, payload) -} - -func (o *CreateClusterVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/vlans][%d] CreateClusterVlan default %s", o._statusCode, payload) -} - -func (o *CreateClusterVlanDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateClusterVlanDefault) 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/create_interface_group_parameters.go b/v2/client/platform/create_interface_group_parameters.go deleted file mode 100644 index edbc1834..00000000 --- a/v2/client/platform/create_interface_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateInterfaceGroupParams creates a new CreateInterfaceGroupParams 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 NewCreateInterfaceGroupParams() *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInterfaceGroupParamsWithTimeout creates a new CreateInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewCreateInterfaceGroupParamsWithTimeout(timeout time.Duration) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewCreateInterfaceGroupParamsWithContext creates a new CreateInterfaceGroupParams object -// with the ability to set a context for a request. -func NewCreateInterfaceGroupParamsWithContext(ctx context.Context) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - Context: ctx, - } -} - -// NewCreateInterfaceGroupParamsWithHTTPClient creates a new CreateInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInterfaceGroupParamsWithHTTPClient(client *http.Client) *CreateInterfaceGroupParams { - return &CreateInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -CreateInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the create interface group operation. - - Typically these are written to a http.Request. -*/ -type CreateInterfaceGroupParams struct { - - /* Body. - - Parameters to create an interface group. - */ - Body *models.InterfaceGroupParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInterfaceGroupParams) WithDefaults() *CreateInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create interface group params -func (o *CreateInterfaceGroupParams) WithTimeout(timeout time.Duration) *CreateInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create interface group params -func (o *CreateInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create interface group params -func (o *CreateInterfaceGroupParams) WithContext(ctx context.Context) *CreateInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create interface group params -func (o *CreateInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create interface group params -func (o *CreateInterfaceGroupParams) WithHTTPClient(client *http.Client) *CreateInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create interface group params -func (o *CreateInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create interface group params -func (o *CreateInterfaceGroupParams) WithBody(body *models.InterfaceGroupParams) *CreateInterfaceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create interface group params -func (o *CreateInterfaceGroupParams) SetBody(body *models.InterfaceGroupParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInterfaceGroupParams) 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/create_interface_group_responses.go b/v2/client/platform/create_interface_group_responses.go deleted file mode 100644 index fed479cd..00000000 --- a/v2/client/platform/create_interface_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateInterfaceGroupReader is a Reader for the CreateInterfaceGroup structure. -type CreateInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInterfaceGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateInterfaceGroupDefault(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 - } -} - -// NewCreateInterfaceGroupCreated creates a CreateInterfaceGroupCreated with default headers values -func NewCreateInterfaceGroupCreated() *CreateInterfaceGroupCreated { - return &CreateInterfaceGroupCreated{} -} - -/* -CreateInterfaceGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateInterfaceGroupCreated struct { - Payload *models.InterfaceGroup -} - -// IsSuccess returns true when this create interface group created response has a 2xx status code -func (o *CreateInterfaceGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create interface group created response has a 3xx status code -func (o *CreateInterfaceGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create interface group created response has a 4xx status code -func (o *CreateInterfaceGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create interface group created response has a 5xx status code -func (o *CreateInterfaceGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create interface group created response a status code equal to that given -func (o *CreateInterfaceGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create interface group created response -func (o *CreateInterfaceGroupCreated) Code() int { - return 201 -} - -func (o *CreateInterfaceGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/interface-groups][%d] createInterfaceGroupCreated %s", 201, payload) -} - -func (o *CreateInterfaceGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/interface-groups][%d] createInterfaceGroupCreated %s", 201, payload) -} - -func (o *CreateInterfaceGroupCreated) GetPayload() *models.InterfaceGroup { - return o.Payload -} - -func (o *CreateInterfaceGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateInterfaceGroupDefault creates a CreateInterfaceGroupDefault with default headers values -func NewCreateInterfaceGroupDefault(code int) *CreateInterfaceGroupDefault { - return &CreateInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -CreateInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateInterfaceGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create interface group default response has a 2xx status code -func (o *CreateInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create interface group default response has a 3xx status code -func (o *CreateInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create interface group default response has a 4xx status code -func (o *CreateInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create interface group default response has a 5xx status code -func (o *CreateInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create interface group default response a status code equal to that given -func (o *CreateInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create interface group default response -func (o *CreateInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/interface-groups][%d] CreateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *CreateInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/interface-groups][%d] CreateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *CreateInterfaceGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateInterfaceGroupDefault) 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/create_racks_parameters.go b/v2/client/platform/create_racks_parameters.go deleted file mode 100644 index 0ea271a1..00000000 --- a/v2/client/platform/create_racks_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateRacksParams creates a new CreateRacksParams 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 NewCreateRacksParams() *CreateRacksParams { - return &CreateRacksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRacksParamsWithTimeout creates a new CreateRacksParams object -// with the ability to set a timeout on a request. -func NewCreateRacksParamsWithTimeout(timeout time.Duration) *CreateRacksParams { - return &CreateRacksParams{ - timeout: timeout, - } -} - -// NewCreateRacksParamsWithContext creates a new CreateRacksParams object -// with the ability to set a context for a request. -func NewCreateRacksParamsWithContext(ctx context.Context) *CreateRacksParams { - return &CreateRacksParams{ - Context: ctx, - } -} - -// NewCreateRacksParamsWithHTTPClient creates a new CreateRacksParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRacksParamsWithHTTPClient(client *http.Client) *CreateRacksParams { - return &CreateRacksParams{ - HTTPClient: client, - } -} - -/* -CreateRacksParams contains all the parameters to send to the API endpoint - - for the create racks operation. - - Typically these are written to a http.Request. -*/ -type CreateRacksParams struct { - - /* Body. - - Specifies the parameters to create racks. - */ - Body *models.Racks - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRacksParams) WithDefaults() *CreateRacksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRacksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create racks params -func (o *CreateRacksParams) WithTimeout(timeout time.Duration) *CreateRacksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create racks params -func (o *CreateRacksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create racks params -func (o *CreateRacksParams) WithContext(ctx context.Context) *CreateRacksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create racks params -func (o *CreateRacksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create racks params -func (o *CreateRacksParams) WithHTTPClient(client *http.Client) *CreateRacksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create racks params -func (o *CreateRacksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create racks params -func (o *CreateRacksParams) WithBody(body *models.Racks) *CreateRacksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create racks params -func (o *CreateRacksParams) SetBody(body *models.Racks) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRacksParams) 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/create_racks_responses.go b/v2/client/platform/create_racks_responses.go deleted file mode 100644 index e6c2b96c..00000000 --- a/v2/client/platform/create_racks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateRacksReader is a Reader for the CreateRacks structure. -type CreateRacksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRacksCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRacksDefault(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 - } -} - -// NewCreateRacksCreated creates a CreateRacksCreated with default headers values -func NewCreateRacksCreated() *CreateRacksCreated { - return &CreateRacksCreated{} -} - -/* -CreateRacksCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRacksCreated struct { - Payload *models.Racks -} - -// IsSuccess returns true when this create racks created response has a 2xx status code -func (o *CreateRacksCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create racks created response has a 3xx status code -func (o *CreateRacksCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create racks created response has a 4xx status code -func (o *CreateRacksCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create racks created response has a 5xx status code -func (o *CreateRacksCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create racks created response a status code equal to that given -func (o *CreateRacksCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create racks created response -func (o *CreateRacksCreated) Code() int { - return 201 -} - -func (o *CreateRacksCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /racks][%d] createRacksCreated %s", 201, payload) -} - -func (o *CreateRacksCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /racks][%d] createRacksCreated %s", 201, payload) -} - -func (o *CreateRacksCreated) GetPayload() *models.Racks { - return o.Payload -} - -func (o *CreateRacksCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Racks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRacksDefault creates a CreateRacksDefault with default headers values -func NewCreateRacksDefault(code int) *CreateRacksDefault { - return &CreateRacksDefault{ - _statusCode: code, - } -} - -/* -CreateRacksDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRacksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create racks default response has a 2xx status code -func (o *CreateRacksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create racks default response has a 3xx status code -func (o *CreateRacksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create racks default response has a 4xx status code -func (o *CreateRacksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create racks default response has a 5xx status code -func (o *CreateRacksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create racks default response a status code equal to that given -func (o *CreateRacksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create racks default response -func (o *CreateRacksDefault) Code() int { - return o._statusCode -} - -func (o *CreateRacksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /racks][%d] CreateRacks default %s", o._statusCode, payload) -} - -func (o *CreateRacksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /racks][%d] CreateRacks default %s", o._statusCode, payload) -} - -func (o *CreateRacksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateRacksDefault) 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/delete_a_m_q_p_target_config_parameters.go b/v2/client/platform/delete_a_m_q_p_target_config_parameters.go deleted file mode 100644 index 941862de..00000000 --- a/v2/client/platform/delete_a_m_q_p_target_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewDeleteAMQPTargetConfigParams creates a new DeleteAMQPTargetConfigParams 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 NewDeleteAMQPTargetConfigParams() *DeleteAMQPTargetConfigParams { - return &DeleteAMQPTargetConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteAMQPTargetConfigParamsWithTimeout creates a new DeleteAMQPTargetConfigParams object -// with the ability to set a timeout on a request. -func NewDeleteAMQPTargetConfigParamsWithTimeout(timeout time.Duration) *DeleteAMQPTargetConfigParams { - return &DeleteAMQPTargetConfigParams{ - timeout: timeout, - } -} - -// NewDeleteAMQPTargetConfigParamsWithContext creates a new DeleteAMQPTargetConfigParams object -// with the ability to set a context for a request. -func NewDeleteAMQPTargetConfigParamsWithContext(ctx context.Context) *DeleteAMQPTargetConfigParams { - return &DeleteAMQPTargetConfigParams{ - Context: ctx, - } -} - -// NewDeleteAMQPTargetConfigParamsWithHTTPClient creates a new DeleteAMQPTargetConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteAMQPTargetConfigParamsWithHTTPClient(client *http.Client) *DeleteAMQPTargetConfigParams { - return &DeleteAMQPTargetConfigParams{ - HTTPClient: client, - } -} - -/* -DeleteAMQPTargetConfigParams contains all the parameters to send to the API endpoint - - for the delete a m q p target config operation. - - Typically these are written to a http.Request. -*/ -type DeleteAMQPTargetConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAMQPTargetConfigParams) WithDefaults() *DeleteAMQPTargetConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteAMQPTargetConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) WithTimeout(timeout time.Duration) *DeleteAMQPTargetConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) WithContext(ctx context.Context) *DeleteAMQPTargetConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) WithHTTPClient(client *http.Client) *DeleteAMQPTargetConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete a m q p target config params -func (o *DeleteAMQPTargetConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteAMQPTargetConfigParams) 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_a_m_q_p_target_config_responses.go b/v2/client/platform/delete_a_m_q_p_target_config_responses.go deleted file mode 100644 index c5c3925f..00000000 --- a/v2/client/platform/delete_a_m_q_p_target_config_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteAMQPTargetConfigReader is a Reader for the DeleteAMQPTargetConfig structure. -type DeleteAMQPTargetConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteAMQPTargetConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteAMQPTargetConfigNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteAMQPTargetConfigDefault(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 - } -} - -// NewDeleteAMQPTargetConfigNoContent creates a DeleteAMQPTargetConfigNoContent with default headers values -func NewDeleteAMQPTargetConfigNoContent() *DeleteAMQPTargetConfigNoContent { - return &DeleteAMQPTargetConfigNoContent{} -} - -/* -DeleteAMQPTargetConfigNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteAMQPTargetConfigNoContent struct { -} - -// IsSuccess returns true when this delete a m q p target config no content response has a 2xx status code -func (o *DeleteAMQPTargetConfigNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete a m q p target config no content response has a 3xx status code -func (o *DeleteAMQPTargetConfigNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete a m q p target config no content response has a 4xx status code -func (o *DeleteAMQPTargetConfigNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete a m q p target config no content response has a 5xx status code -func (o *DeleteAMQPTargetConfigNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete a m q p target config no content response a status code equal to that given -func (o *DeleteAMQPTargetConfigNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete a m q p target config no content response -func (o *DeleteAMQPTargetConfigNoContent) Code() int { - return 204 -} - -func (o *DeleteAMQPTargetConfigNoContent) Error() string { - return fmt.Sprintf("[DELETE /clusters/amqp-target-config][%d] deleteAMQPTargetConfigNoContent", 204) -} - -func (o *DeleteAMQPTargetConfigNoContent) String() string { - return fmt.Sprintf("[DELETE /clusters/amqp-target-config][%d] deleteAMQPTargetConfigNoContent", 204) -} - -func (o *DeleteAMQPTargetConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteAMQPTargetConfigDefault creates a DeleteAMQPTargetConfigDefault with default headers values -func NewDeleteAMQPTargetConfigDefault(code int) *DeleteAMQPTargetConfigDefault { - return &DeleteAMQPTargetConfigDefault{ - _statusCode: code, - } -} - -/* -DeleteAMQPTargetConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteAMQPTargetConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete a m q p target config default response has a 2xx status code -func (o *DeleteAMQPTargetConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete a m q p target config default response has a 3xx status code -func (o *DeleteAMQPTargetConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete a m q p target config default response has a 4xx status code -func (o *DeleteAMQPTargetConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete a m q p target config default response has a 5xx status code -func (o *DeleteAMQPTargetConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete a m q p target config default response a status code equal to that given -func (o *DeleteAMQPTargetConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete a m q p target config default response -func (o *DeleteAMQPTargetConfigDefault) Code() int { - return o._statusCode -} - -func (o *DeleteAMQPTargetConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/amqp-target-config][%d] DeleteAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *DeleteAMQPTargetConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/amqp-target-config][%d] DeleteAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *DeleteAMQPTargetConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteAMQPTargetConfigDefault) 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/delete_cluster_package_parameters.go b/v2/client/platform/delete_cluster_package_parameters.go deleted file mode 100644 index 1a7dde03..00000000 --- a/v2/client/platform/delete_cluster_package_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// 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" -) - -// NewDeleteClusterPackageParams creates a new DeleteClusterPackageParams 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 NewDeleteClusterPackageParams() *DeleteClusterPackageParams { - return &DeleteClusterPackageParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteClusterPackageParamsWithTimeout creates a new DeleteClusterPackageParams object -// with the ability to set a timeout on a request. -func NewDeleteClusterPackageParamsWithTimeout(timeout time.Duration) *DeleteClusterPackageParams { - return &DeleteClusterPackageParams{ - timeout: timeout, - } -} - -// NewDeleteClusterPackageParamsWithContext creates a new DeleteClusterPackageParams object -// with the ability to set a context for a request. -func NewDeleteClusterPackageParamsWithContext(ctx context.Context) *DeleteClusterPackageParams { - return &DeleteClusterPackageParams{ - Context: ctx, - } -} - -// NewDeleteClusterPackageParamsWithHTTPClient creates a new DeleteClusterPackageParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteClusterPackageParamsWithHTTPClient(client *http.Client) *DeleteClusterPackageParams { - return &DeleteClusterPackageParams{ - HTTPClient: client, - } -} - -/* -DeleteClusterPackageParams contains all the parameters to send to the API endpoint - - for the delete cluster package operation. - - Typically these are written to a http.Request. -*/ -type DeleteClusterPackageParams struct { - - /* VersionName. - - Version name of the package. Example: 6.3.1h_release-20210714_0fad884e - */ - VersionName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete cluster package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteClusterPackageParams) WithDefaults() *DeleteClusterPackageParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete cluster package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteClusterPackageParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete cluster package params -func (o *DeleteClusterPackageParams) WithTimeout(timeout time.Duration) *DeleteClusterPackageParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete cluster package params -func (o *DeleteClusterPackageParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete cluster package params -func (o *DeleteClusterPackageParams) WithContext(ctx context.Context) *DeleteClusterPackageParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete cluster package params -func (o *DeleteClusterPackageParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete cluster package params -func (o *DeleteClusterPackageParams) WithHTTPClient(client *http.Client) *DeleteClusterPackageParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete cluster package params -func (o *DeleteClusterPackageParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithVersionName adds the versionName to the delete cluster package params -func (o *DeleteClusterPackageParams) WithVersionName(versionName string) *DeleteClusterPackageParams { - o.SetVersionName(versionName) - return o -} - -// SetVersionName adds the versionName to the delete cluster package params -func (o *DeleteClusterPackageParams) SetVersionName(versionName string) { - o.VersionName = versionName -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteClusterPackageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param versionName - if err := r.SetPathParam("versionName", o.VersionName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/delete_cluster_package_responses.go b/v2/client/platform/delete_cluster_package_responses.go deleted file mode 100644 index 0f443b6c..00000000 --- a/v2/client/platform/delete_cluster_package_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteClusterPackageReader is a Reader for the DeleteClusterPackage structure. -type DeleteClusterPackageReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteClusterPackageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewDeleteClusterPackageAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteClusterPackageDefault(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 - } -} - -// NewDeleteClusterPackageAccepted creates a DeleteClusterPackageAccepted with default headers values -func NewDeleteClusterPackageAccepted() *DeleteClusterPackageAccepted { - return &DeleteClusterPackageAccepted{} -} - -/* -DeleteClusterPackageAccepted describes a response with status code 202, with default header values. - -Success -*/ -type DeleteClusterPackageAccepted struct { - Payload *models.ClusterOperationResponseParams -} - -// IsSuccess returns true when this delete cluster package accepted response has a 2xx status code -func (o *DeleteClusterPackageAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete cluster package accepted response has a 3xx status code -func (o *DeleteClusterPackageAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete cluster package accepted response has a 4xx status code -func (o *DeleteClusterPackageAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete cluster package accepted response has a 5xx status code -func (o *DeleteClusterPackageAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this delete cluster package accepted response a status code equal to that given -func (o *DeleteClusterPackageAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the delete cluster package accepted response -func (o *DeleteClusterPackageAccepted) Code() int { - return 202 -} - -func (o *DeleteClusterPackageAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/packages/{versionName}][%d] deleteClusterPackageAccepted %s", 202, payload) -} - -func (o *DeleteClusterPackageAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/packages/{versionName}][%d] deleteClusterPackageAccepted %s", 202, payload) -} - -func (o *DeleteClusterPackageAccepted) GetPayload() *models.ClusterOperationResponseParams { - return o.Payload -} - -func (o *DeleteClusterPackageAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterOperationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteClusterPackageDefault creates a DeleteClusterPackageDefault with default headers values -func NewDeleteClusterPackageDefault(code int) *DeleteClusterPackageDefault { - return &DeleteClusterPackageDefault{ - _statusCode: code, - } -} - -/* -DeleteClusterPackageDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteClusterPackageDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete cluster package default response has a 2xx status code -func (o *DeleteClusterPackageDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete cluster package default response has a 3xx status code -func (o *DeleteClusterPackageDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete cluster package default response has a 4xx status code -func (o *DeleteClusterPackageDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete cluster package default response has a 5xx status code -func (o *DeleteClusterPackageDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete cluster package default response a status code equal to that given -func (o *DeleteClusterPackageDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete cluster package default response -func (o *DeleteClusterPackageDefault) Code() int { - return o._statusCode -} - -func (o *DeleteClusterPackageDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/packages/{versionName}][%d] DeleteClusterPackage default %s", o._statusCode, payload) -} - -func (o *DeleteClusterPackageDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /clusters/packages/{versionName}][%d] DeleteClusterPackage default %s", o._statusCode, payload) -} - -func (o *DeleteClusterPackageDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteClusterPackageDefault) 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/delete_cluster_vlan_parameters.go b/v2/client/platform/delete_cluster_vlan_parameters.go deleted file mode 100644 index d41e58bb..00000000 --- a/v2/client/platform/delete_cluster_vlan_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// 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" -) - -// NewDeleteClusterVlanParams creates a new DeleteClusterVlanParams 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 NewDeleteClusterVlanParams() *DeleteClusterVlanParams { - return &DeleteClusterVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteClusterVlanParamsWithTimeout creates a new DeleteClusterVlanParams object -// with the ability to set a timeout on a request. -func NewDeleteClusterVlanParamsWithTimeout(timeout time.Duration) *DeleteClusterVlanParams { - return &DeleteClusterVlanParams{ - timeout: timeout, - } -} - -// NewDeleteClusterVlanParamsWithContext creates a new DeleteClusterVlanParams object -// with the ability to set a context for a request. -func NewDeleteClusterVlanParamsWithContext(ctx context.Context) *DeleteClusterVlanParams { - return &DeleteClusterVlanParams{ - Context: ctx, - } -} - -// NewDeleteClusterVlanParamsWithHTTPClient creates a new DeleteClusterVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteClusterVlanParamsWithHTTPClient(client *http.Client) *DeleteClusterVlanParams { - return &DeleteClusterVlanParams{ - HTTPClient: client, - } -} - -/* -DeleteClusterVlanParams contains all the parameters to send to the API endpoint - - for the delete cluster vlan operation. - - Typically these are written to a http.Request. -*/ -type DeleteClusterVlanParams struct { - - /* InterfaceName. - - Vlan interface name, it should be in interface_group_name.vlan_id format. - */ - InterfaceName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteClusterVlanParams) WithDefaults() *DeleteClusterVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteClusterVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete cluster vlan params -func (o *DeleteClusterVlanParams) WithTimeout(timeout time.Duration) *DeleteClusterVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete cluster vlan params -func (o *DeleteClusterVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete cluster vlan params -func (o *DeleteClusterVlanParams) WithContext(ctx context.Context) *DeleteClusterVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete cluster vlan params -func (o *DeleteClusterVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete cluster vlan params -func (o *DeleteClusterVlanParams) WithHTTPClient(client *http.Client) *DeleteClusterVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete cluster vlan params -func (o *DeleteClusterVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInterfaceName adds the interfaceName to the delete cluster vlan params -func (o *DeleteClusterVlanParams) WithInterfaceName(interfaceName string) *DeleteClusterVlanParams { - o.SetInterfaceName(interfaceName) - return o -} - -// SetInterfaceName adds the interfaceName to the delete cluster vlan params -func (o *DeleteClusterVlanParams) SetInterfaceName(interfaceName string) { - o.InterfaceName = interfaceName -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteClusterVlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param interfaceName - if err := r.SetPathParam("interfaceName", o.InterfaceName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/delete_cluster_vlan_responses.go b/v2/client/platform/delete_cluster_vlan_responses.go deleted file mode 100644 index 715068ad..00000000 --- a/v2/client/platform/delete_cluster_vlan_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteClusterVlanReader is a Reader for the DeleteClusterVlan structure. -type DeleteClusterVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteClusterVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteClusterVlanNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteClusterVlanDefault(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 - } -} - -// NewDeleteClusterVlanNoContent creates a DeleteClusterVlanNoContent with default headers values -func NewDeleteClusterVlanNoContent() *DeleteClusterVlanNoContent { - return &DeleteClusterVlanNoContent{} -} - -/* -DeleteClusterVlanNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteClusterVlanNoContent struct { -} - -// IsSuccess returns true when this delete cluster vlan no content response has a 2xx status code -func (o *DeleteClusterVlanNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete cluster vlan no content response has a 3xx status code -func (o *DeleteClusterVlanNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete cluster vlan no content response has a 4xx status code -func (o *DeleteClusterVlanNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete cluster vlan no content response has a 5xx status code -func (o *DeleteClusterVlanNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete cluster vlan no content response a status code equal to that given -func (o *DeleteClusterVlanNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete cluster vlan no content response -func (o *DeleteClusterVlanNoContent) Code() int { - return 204 -} - -func (o *DeleteClusterVlanNoContent) Error() string { - return fmt.Sprintf("[DELETE /network/vlans/{interfaceName}][%d] deleteClusterVlanNoContent", 204) -} - -func (o *DeleteClusterVlanNoContent) String() string { - return fmt.Sprintf("[DELETE /network/vlans/{interfaceName}][%d] deleteClusterVlanNoContent", 204) -} - -func (o *DeleteClusterVlanNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteClusterVlanDefault creates a DeleteClusterVlanDefault with default headers values -func NewDeleteClusterVlanDefault(code int) *DeleteClusterVlanDefault { - return &DeleteClusterVlanDefault{ - _statusCode: code, - } -} - -/* -DeleteClusterVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteClusterVlanDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete cluster vlan default response has a 2xx status code -func (o *DeleteClusterVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete cluster vlan default response has a 3xx status code -func (o *DeleteClusterVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete cluster vlan default response has a 4xx status code -func (o *DeleteClusterVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete cluster vlan default response has a 5xx status code -func (o *DeleteClusterVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete cluster vlan default response a status code equal to that given -func (o *DeleteClusterVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete cluster vlan default response -func (o *DeleteClusterVlanDefault) Code() int { - return o._statusCode -} - -func (o *DeleteClusterVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/vlans/{interfaceName}][%d] DeleteClusterVlan default %s", o._statusCode, payload) -} - -func (o *DeleteClusterVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/vlans/{interfaceName}][%d] DeleteClusterVlan default %s", o._statusCode, payload) -} - -func (o *DeleteClusterVlanDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteClusterVlanDefault) 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/delete_hosts_parameters.go b/v2/client/platform/delete_hosts_parameters.go deleted file mode 100644 index bff882cd..00000000 --- a/v2/client/platform/delete_hosts_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDeleteHostsParams creates a new DeleteHostsParams 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 NewDeleteHostsParams() *DeleteHostsParams { - return &DeleteHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteHostsParamsWithTimeout creates a new DeleteHostsParams object -// with the ability to set a timeout on a request. -func NewDeleteHostsParamsWithTimeout(timeout time.Duration) *DeleteHostsParams { - return &DeleteHostsParams{ - timeout: timeout, - } -} - -// NewDeleteHostsParamsWithContext creates a new DeleteHostsParams object -// with the ability to set a context for a request. -func NewDeleteHostsParamsWithContext(ctx context.Context) *DeleteHostsParams { - return &DeleteHostsParams{ - Context: ctx, - } -} - -// NewDeleteHostsParamsWithHTTPClient creates a new DeleteHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteHostsParamsWithHTTPClient(client *http.Client) *DeleteHostsParams { - return &DeleteHostsParams{ - HTTPClient: client, - } -} - -/* -DeleteHostsParams contains all the parameters to send to the API endpoint - - for the delete hosts operation. - - Typically these are written to a http.Request. -*/ -type DeleteHostsParams struct { - - /* Body. - - Specifies the params to delete host mappings - */ - Body *models.DeleteHostsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteHostsParams) WithDefaults() *DeleteHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete hosts params -func (o *DeleteHostsParams) WithTimeout(timeout time.Duration) *DeleteHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete hosts params -func (o *DeleteHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete hosts params -func (o *DeleteHostsParams) WithContext(ctx context.Context) *DeleteHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete hosts params -func (o *DeleteHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete hosts params -func (o *DeleteHostsParams) WithHTTPClient(client *http.Client) *DeleteHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete hosts params -func (o *DeleteHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete hosts params -func (o *DeleteHostsParams) WithBody(body *models.DeleteHostsParameters) *DeleteHostsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete hosts params -func (o *DeleteHostsParams) SetBody(body *models.DeleteHostsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteHostsParams) 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/delete_hosts_responses.go b/v2/client/platform/delete_hosts_responses.go deleted file mode 100644 index adcf2c5e..00000000 --- a/v2/client/platform/delete_hosts_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteHostsReader is a Reader for the DeleteHosts structure. -type DeleteHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteHostsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteHostsDefault(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 - } -} - -// NewDeleteHostsNoContent creates a DeleteHostsNoContent with default headers values -func NewDeleteHostsNoContent() *DeleteHostsNoContent { - return &DeleteHostsNoContent{} -} - -/* -DeleteHostsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteHostsNoContent struct { -} - -// IsSuccess returns true when this delete hosts no content response has a 2xx status code -func (o *DeleteHostsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete hosts no content response has a 3xx status code -func (o *DeleteHostsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete hosts no content response has a 4xx status code -func (o *DeleteHostsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete hosts no content response has a 5xx status code -func (o *DeleteHostsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete hosts no content response a status code equal to that given -func (o *DeleteHostsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete hosts no content response -func (o *DeleteHostsNoContent) Code() int { - return 204 -} - -func (o *DeleteHostsNoContent) Error() string { - return fmt.Sprintf("[POST /clusters/host-mappings/delete][%d] deleteHostsNoContent", 204) -} - -func (o *DeleteHostsNoContent) String() string { - return fmt.Sprintf("[POST /clusters/host-mappings/delete][%d] deleteHostsNoContent", 204) -} - -func (o *DeleteHostsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteHostsDefault creates a DeleteHostsDefault with default headers values -func NewDeleteHostsDefault(code int) *DeleteHostsDefault { - return &DeleteHostsDefault{ - _statusCode: code, - } -} - -/* -DeleteHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteHostsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete hosts default response has a 2xx status code -func (o *DeleteHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete hosts default response has a 3xx status code -func (o *DeleteHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete hosts default response has a 4xx status code -func (o *DeleteHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete hosts default response has a 5xx status code -func (o *DeleteHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete hosts default response a status code equal to that given -func (o *DeleteHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete hosts default response -func (o *DeleteHostsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings/delete][%d] DeleteHosts default %s", o._statusCode, payload) -} - -func (o *DeleteHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/host-mappings/delete][%d] DeleteHosts default %s", o._statusCode, payload) -} - -func (o *DeleteHostsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteHostsDefault) 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/delete_interface_group_parameters.go b/v2/client/platform/delete_interface_group_parameters.go deleted file mode 100644 index 48bf29ef..00000000 --- a/v2/client/platform/delete_interface_group_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewDeleteInterfaceGroupParams creates a new DeleteInterfaceGroupParams 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 NewDeleteInterfaceGroupParams() *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteInterfaceGroupParamsWithTimeout creates a new DeleteInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteInterfaceGroupParamsWithTimeout(timeout time.Duration) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewDeleteInterfaceGroupParamsWithContext creates a new DeleteInterfaceGroupParams object -// with the ability to set a context for a request. -func NewDeleteInterfaceGroupParamsWithContext(ctx context.Context) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - Context: ctx, - } -} - -// NewDeleteInterfaceGroupParamsWithHTTPClient creates a new DeleteInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteInterfaceGroupParamsWithHTTPClient(client *http.Client) *DeleteInterfaceGroupParams { - return &DeleteInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the delete interface group operation. - - Typically these are written to a http.Request. -*/ -type DeleteInterfaceGroupParams struct { - - /* ID. - - Id of the interface group. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInterfaceGroupParams) WithDefaults() *DeleteInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithTimeout(timeout time.Duration) *DeleteInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithContext(ctx context.Context) *DeleteInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithHTTPClient(client *http.Client) *DeleteInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete interface group params -func (o *DeleteInterfaceGroupParams) WithID(id int32) *DeleteInterfaceGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete interface group params -func (o *DeleteInterfaceGroupParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteInterfaceGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/delete_interface_group_responses.go b/v2/client/platform/delete_interface_group_responses.go deleted file mode 100644 index 38e69fb2..00000000 --- a/v2/client/platform/delete_interface_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteInterfaceGroupReader is a Reader for the DeleteInterfaceGroup structure. -type DeleteInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteInterfaceGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteInterfaceGroupDefault(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 - } -} - -// NewDeleteInterfaceGroupNoContent creates a DeleteInterfaceGroupNoContent with default headers values -func NewDeleteInterfaceGroupNoContent() *DeleteInterfaceGroupNoContent { - return &DeleteInterfaceGroupNoContent{} -} - -/* -DeleteInterfaceGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteInterfaceGroupNoContent struct { -} - -// IsSuccess returns true when this delete interface group no content response has a 2xx status code -func (o *DeleteInterfaceGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete interface group no content response has a 3xx status code -func (o *DeleteInterfaceGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete interface group no content response has a 4xx status code -func (o *DeleteInterfaceGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete interface group no content response has a 5xx status code -func (o *DeleteInterfaceGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete interface group no content response a status code equal to that given -func (o *DeleteInterfaceGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete interface group no content response -func (o *DeleteInterfaceGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteInterfaceGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /network/interface-groups/{id}][%d] deleteInterfaceGroupNoContent", 204) -} - -func (o *DeleteInterfaceGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /network/interface-groups/{id}][%d] deleteInterfaceGroupNoContent", 204) -} - -func (o *DeleteInterfaceGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteInterfaceGroupDefault creates a DeleteInterfaceGroupDefault with default headers values -func NewDeleteInterfaceGroupDefault(code int) *DeleteInterfaceGroupDefault { - return &DeleteInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteInterfaceGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete interface group default response has a 2xx status code -func (o *DeleteInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete interface group default response has a 3xx status code -func (o *DeleteInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete interface group default response has a 4xx status code -func (o *DeleteInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete interface group default response has a 5xx status code -func (o *DeleteInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete interface group default response a status code equal to that given -func (o *DeleteInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete interface group default response -func (o *DeleteInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/interface-groups/{id}][%d] DeleteInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/interface-groups/{id}][%d] DeleteInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *DeleteInterfaceGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteInterfaceGroupDefault) 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/delete_rack_by_id_parameters.go b/v2/client/platform/delete_rack_by_id_parameters.go deleted file mode 100644 index 40d61b79..00000000 --- a/v2/client/platform/delete_rack_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// 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" -) - -// NewDeleteRackByIDParams creates a new DeleteRackByIDParams 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 NewDeleteRackByIDParams() *DeleteRackByIDParams { - return &DeleteRackByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRackByIDParamsWithTimeout creates a new DeleteRackByIDParams object -// with the ability to set a timeout on a request. -func NewDeleteRackByIDParamsWithTimeout(timeout time.Duration) *DeleteRackByIDParams { - return &DeleteRackByIDParams{ - timeout: timeout, - } -} - -// NewDeleteRackByIDParamsWithContext creates a new DeleteRackByIDParams object -// with the ability to set a context for a request. -func NewDeleteRackByIDParamsWithContext(ctx context.Context) *DeleteRackByIDParams { - return &DeleteRackByIDParams{ - Context: ctx, - } -} - -// NewDeleteRackByIDParamsWithHTTPClient creates a new DeleteRackByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRackByIDParamsWithHTTPClient(client *http.Client) *DeleteRackByIDParams { - return &DeleteRackByIDParams{ - HTTPClient: client, - } -} - -/* -DeleteRackByIDParams contains all the parameters to send to the API endpoint - - for the delete rack by Id operation. - - Typically these are written to a http.Request. -*/ -type DeleteRackByIDParams struct { - - /* ID. - - Specifies a unique id of the rack. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRackByIDParams) WithDefaults() *DeleteRackByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRackByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete rack by Id params -func (o *DeleteRackByIDParams) WithTimeout(timeout time.Duration) *DeleteRackByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete rack by Id params -func (o *DeleteRackByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete rack by Id params -func (o *DeleteRackByIDParams) WithContext(ctx context.Context) *DeleteRackByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete rack by Id params -func (o *DeleteRackByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete rack by Id params -func (o *DeleteRackByIDParams) WithHTTPClient(client *http.Client) *DeleteRackByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete rack by Id params -func (o *DeleteRackByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete rack by Id params -func (o *DeleteRackByIDParams) WithID(id string) *DeleteRackByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete rack by Id params -func (o *DeleteRackByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRackByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/delete_rack_by_id_responses.go b/v2/client/platform/delete_rack_by_id_responses.go deleted file mode 100644 index f332a7b5..00000000 --- a/v2/client/platform/delete_rack_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteRackByIDReader is a Reader for the DeleteRackByID structure. -type DeleteRackByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRackByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRackByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRackByIDDefault(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 - } -} - -// NewDeleteRackByIDNoContent creates a DeleteRackByIDNoContent with default headers values -func NewDeleteRackByIDNoContent() *DeleteRackByIDNoContent { - return &DeleteRackByIDNoContent{} -} - -/* -DeleteRackByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRackByIDNoContent struct { -} - -// IsSuccess returns true when this delete rack by Id no content response has a 2xx status code -func (o *DeleteRackByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete rack by Id no content response has a 3xx status code -func (o *DeleteRackByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete rack by Id no content response has a 4xx status code -func (o *DeleteRackByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete rack by Id no content response has a 5xx status code -func (o *DeleteRackByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete rack by Id no content response a status code equal to that given -func (o *DeleteRackByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete rack by Id no content response -func (o *DeleteRackByIDNoContent) Code() int { - return 204 -} - -func (o *DeleteRackByIDNoContent) Error() string { - return fmt.Sprintf("[DELETE /racks/{id}][%d] deleteRackByIdNoContent", 204) -} - -func (o *DeleteRackByIDNoContent) String() string { - return fmt.Sprintf("[DELETE /racks/{id}][%d] deleteRackByIdNoContent", 204) -} - -func (o *DeleteRackByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRackByIDDefault creates a DeleteRackByIDDefault with default headers values -func NewDeleteRackByIDDefault(code int) *DeleteRackByIDDefault { - return &DeleteRackByIDDefault{ - _statusCode: code, - } -} - -/* -DeleteRackByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRackByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete rack by Id default response has a 2xx status code -func (o *DeleteRackByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete rack by Id default response has a 3xx status code -func (o *DeleteRackByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete rack by Id default response has a 4xx status code -func (o *DeleteRackByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete rack by Id default response has a 5xx status code -func (o *DeleteRackByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete rack by Id default response a status code equal to that given -func (o *DeleteRackByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete rack by Id default response -func (o *DeleteRackByIDDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRackByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /racks/{id}][%d] DeleteRackById default %s", o._statusCode, payload) -} - -func (o *DeleteRackByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /racks/{id}][%d] DeleteRackById default %s", o._statusCode, payload) -} - -func (o *DeleteRackByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteRackByIDDefault) 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/delete_racks_parameters.go b/v2/client/platform/delete_racks_parameters.go deleted file mode 100644 index 8a60d426..00000000 --- a/v2/client/platform/delete_racks_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewDeleteRacksParams creates a new DeleteRacksParams 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 NewDeleteRacksParams() *DeleteRacksParams { - return &DeleteRacksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRacksParamsWithTimeout creates a new DeleteRacksParams object -// with the ability to set a timeout on a request. -func NewDeleteRacksParamsWithTimeout(timeout time.Duration) *DeleteRacksParams { - return &DeleteRacksParams{ - timeout: timeout, - } -} - -// NewDeleteRacksParamsWithContext creates a new DeleteRacksParams object -// with the ability to set a context for a request. -func NewDeleteRacksParamsWithContext(ctx context.Context) *DeleteRacksParams { - return &DeleteRacksParams{ - Context: ctx, - } -} - -// NewDeleteRacksParamsWithHTTPClient creates a new DeleteRacksParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRacksParamsWithHTTPClient(client *http.Client) *DeleteRacksParams { - return &DeleteRacksParams{ - HTTPClient: client, - } -} - -/* -DeleteRacksParams contains all the parameters to send to the API endpoint - - for the delete racks operation. - - Typically these are written to a http.Request. -*/ -type DeleteRacksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRacksParams) WithDefaults() *DeleteRacksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRacksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete racks params -func (o *DeleteRacksParams) WithTimeout(timeout time.Duration) *DeleteRacksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete racks params -func (o *DeleteRacksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete racks params -func (o *DeleteRacksParams) WithContext(ctx context.Context) *DeleteRacksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete racks params -func (o *DeleteRacksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete racks params -func (o *DeleteRacksParams) WithHTTPClient(client *http.Client) *DeleteRacksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete racks params -func (o *DeleteRacksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRacksParams) 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_racks_responses.go b/v2/client/platform/delete_racks_responses.go deleted file mode 100644 index 2dc292a4..00000000 --- a/v2/client/platform/delete_racks_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteRacksReader is a Reader for the DeleteRacks structure. -type DeleteRacksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRacksNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRacksDefault(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 - } -} - -// NewDeleteRacksNoContent creates a DeleteRacksNoContent with default headers values -func NewDeleteRacksNoContent() *DeleteRacksNoContent { - return &DeleteRacksNoContent{} -} - -/* -DeleteRacksNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRacksNoContent struct { -} - -// IsSuccess returns true when this delete racks no content response has a 2xx status code -func (o *DeleteRacksNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete racks no content response has a 3xx status code -func (o *DeleteRacksNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete racks no content response has a 4xx status code -func (o *DeleteRacksNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete racks no content response has a 5xx status code -func (o *DeleteRacksNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete racks no content response a status code equal to that given -func (o *DeleteRacksNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete racks no content response -func (o *DeleteRacksNoContent) Code() int { - return 204 -} - -func (o *DeleteRacksNoContent) Error() string { - return fmt.Sprintf("[DELETE /racks][%d] deleteRacksNoContent", 204) -} - -func (o *DeleteRacksNoContent) String() string { - return fmt.Sprintf("[DELETE /racks][%d] deleteRacksNoContent", 204) -} - -func (o *DeleteRacksNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRacksDefault creates a DeleteRacksDefault with default headers values -func NewDeleteRacksDefault(code int) *DeleteRacksDefault { - return &DeleteRacksDefault{ - _statusCode: code, - } -} - -/* -DeleteRacksDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRacksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete racks default response has a 2xx status code -func (o *DeleteRacksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete racks default response has a 3xx status code -func (o *DeleteRacksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete racks default response has a 4xx status code -func (o *DeleteRacksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete racks default response has a 5xx status code -func (o *DeleteRacksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete racks default response a status code equal to that given -func (o *DeleteRacksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete racks default response -func (o *DeleteRacksDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRacksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /racks][%d] DeleteRacks default %s", o._statusCode, payload) -} - -func (o *DeleteRacksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /racks][%d] DeleteRacks default %s", o._statusCode, payload) -} - -func (o *DeleteRacksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteRacksDefault) 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/discover_disks_parameters.go b/v2/client/platform/discover_disks_parameters.go deleted file mode 100644 index 9438a209..00000000 --- a/v2/client/platform/discover_disks_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewDiscoverDisksParams creates a new DiscoverDisksParams 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 NewDiscoverDisksParams() *DiscoverDisksParams { - return &DiscoverDisksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDiscoverDisksParamsWithTimeout creates a new DiscoverDisksParams object -// with the ability to set a timeout on a request. -func NewDiscoverDisksParamsWithTimeout(timeout time.Duration) *DiscoverDisksParams { - return &DiscoverDisksParams{ - timeout: timeout, - } -} - -// NewDiscoverDisksParamsWithContext creates a new DiscoverDisksParams object -// with the ability to set a context for a request. -func NewDiscoverDisksParamsWithContext(ctx context.Context) *DiscoverDisksParams { - return &DiscoverDisksParams{ - Context: ctx, - } -} - -// NewDiscoverDisksParamsWithHTTPClient creates a new DiscoverDisksParams object -// with the ability to set a custom HTTPClient for a request. -func NewDiscoverDisksParamsWithHTTPClient(client *http.Client) *DiscoverDisksParams { - return &DiscoverDisksParams{ - HTTPClient: client, - } -} - -/* -DiscoverDisksParams contains all the parameters to send to the API endpoint - - for the discover disks operation. - - Typically these are written to a http.Request. -*/ -type DiscoverDisksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the discover disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DiscoverDisksParams) WithDefaults() *DiscoverDisksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the discover disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DiscoverDisksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the discover disks params -func (o *DiscoverDisksParams) WithTimeout(timeout time.Duration) *DiscoverDisksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the discover disks params -func (o *DiscoverDisksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the discover disks params -func (o *DiscoverDisksParams) WithContext(ctx context.Context) *DiscoverDisksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the discover disks params -func (o *DiscoverDisksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the discover disks params -func (o *DiscoverDisksParams) WithHTTPClient(client *http.Client) *DiscoverDisksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the discover disks params -func (o *DiscoverDisksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DiscoverDisksParams) 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/discover_disks_responses.go b/v2/client/platform/discover_disks_responses.go deleted file mode 100644 index cfb3d832..00000000 --- a/v2/client/platform/discover_disks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DiscoverDisksReader is a Reader for the DiscoverDisks structure. -type DiscoverDisksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DiscoverDisksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDiscoverDisksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDiscoverDisksDefault(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 - } -} - -// NewDiscoverDisksOK creates a DiscoverDisksOK with default headers values -func NewDiscoverDisksOK() *DiscoverDisksOK { - return &DiscoverDisksOK{} -} - -/* -DiscoverDisksOK describes a response with status code 200, with default header values. - -Success -*/ -type DiscoverDisksOK struct { - Payload *models.ClusterFreeDisks -} - -// IsSuccess returns true when this discover disks o k response has a 2xx status code -func (o *DiscoverDisksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this discover disks o k response has a 3xx status code -func (o *DiscoverDisksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this discover disks o k response has a 4xx status code -func (o *DiscoverDisksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this discover disks o k response has a 5xx status code -func (o *DiscoverDisksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this discover disks o k response a status code equal to that given -func (o *DiscoverDisksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the discover disks o k response -func (o *DiscoverDisksOK) Code() int { - return 200 -} - -func (o *DiscoverDisksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/discover][%d] discoverDisksOK %s", 200, payload) -} - -func (o *DiscoverDisksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/discover][%d] discoverDisksOK %s", 200, payload) -} - -func (o *DiscoverDisksOK) GetPayload() *models.ClusterFreeDisks { - return o.Payload -} - -func (o *DiscoverDisksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterFreeDisks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDiscoverDisksDefault creates a DiscoverDisksDefault with default headers values -func NewDiscoverDisksDefault(code int) *DiscoverDisksDefault { - return &DiscoverDisksDefault{ - _statusCode: code, - } -} - -/* -DiscoverDisksDefault describes a response with status code -1, with default header values. - -Error -*/ -type DiscoverDisksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this discover disks default response has a 2xx status code -func (o *DiscoverDisksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this discover disks default response has a 3xx status code -func (o *DiscoverDisksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this discover disks default response has a 4xx status code -func (o *DiscoverDisksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this discover disks default response has a 5xx status code -func (o *DiscoverDisksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this discover disks default response a status code equal to that given -func (o *DiscoverDisksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the discover disks default response -func (o *DiscoverDisksDefault) Code() int { - return o._statusCode -} - -func (o *DiscoverDisksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/discover][%d] DiscoverDisks default %s", o._statusCode, payload) -} - -func (o *DiscoverDisksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/discover][%d] DiscoverDisks default %s", o._statusCode, payload) -} - -func (o *DiscoverDisksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DiscoverDisksDefault) 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/disk_identify_parameters.go b/v2/client/platform/disk_identify_parameters.go deleted file mode 100644 index 926a81f2..00000000 --- a/v2/client/platform/disk_identify_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDiskIdentifyParams creates a new DiskIdentifyParams 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 NewDiskIdentifyParams() *DiskIdentifyParams { - return &DiskIdentifyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDiskIdentifyParamsWithTimeout creates a new DiskIdentifyParams object -// with the ability to set a timeout on a request. -func NewDiskIdentifyParamsWithTimeout(timeout time.Duration) *DiskIdentifyParams { - return &DiskIdentifyParams{ - timeout: timeout, - } -} - -// NewDiskIdentifyParamsWithContext creates a new DiskIdentifyParams object -// with the ability to set a context for a request. -func NewDiskIdentifyParamsWithContext(ctx context.Context) *DiskIdentifyParams { - return &DiskIdentifyParams{ - Context: ctx, - } -} - -// NewDiskIdentifyParamsWithHTTPClient creates a new DiskIdentifyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDiskIdentifyParamsWithHTTPClient(client *http.Client) *DiskIdentifyParams { - return &DiskIdentifyParams{ - HTTPClient: client, - } -} - -/* -DiskIdentifyParams contains all the parameters to send to the API endpoint - - for the disk identify operation. - - Typically these are written to a http.Request. -*/ -type DiskIdentifyParams struct { - - /* Body. - - Specifies the parameter to identify disk. - */ - Body *models.DiskIdentify - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the disk identify params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DiskIdentifyParams) WithDefaults() *DiskIdentifyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the disk identify params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DiskIdentifyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the disk identify params -func (o *DiskIdentifyParams) WithTimeout(timeout time.Duration) *DiskIdentifyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the disk identify params -func (o *DiskIdentifyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the disk identify params -func (o *DiskIdentifyParams) WithContext(ctx context.Context) *DiskIdentifyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the disk identify params -func (o *DiskIdentifyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the disk identify params -func (o *DiskIdentifyParams) WithHTTPClient(client *http.Client) *DiskIdentifyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the disk identify params -func (o *DiskIdentifyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the disk identify params -func (o *DiskIdentifyParams) WithBody(body *models.DiskIdentify) *DiskIdentifyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the disk identify params -func (o *DiskIdentifyParams) SetBody(body *models.DiskIdentify) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DiskIdentifyParams) 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/disk_identify_responses.go b/v2/client/platform/disk_identify_responses.go deleted file mode 100644 index d26ec28b..00000000 --- a/v2/client/platform/disk_identify_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DiskIdentifyReader is a Reader for the DiskIdentify structure. -type DiskIdentifyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DiskIdentifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDiskIdentifyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDiskIdentifyDefault(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 - } -} - -// NewDiskIdentifyOK creates a DiskIdentifyOK with default headers values -func NewDiskIdentifyOK() *DiskIdentifyOK { - return &DiskIdentifyOK{} -} - -/* -DiskIdentifyOK describes a response with status code 200, with default header values. - -Success -*/ -type DiskIdentifyOK struct { - Payload *models.DiskIdentify -} - -// IsSuccess returns true when this disk identify o k response has a 2xx status code -func (o *DiskIdentifyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this disk identify o k response has a 3xx status code -func (o *DiskIdentifyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this disk identify o k response has a 4xx status code -func (o *DiskIdentifyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this disk identify o k response has a 5xx status code -func (o *DiskIdentifyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this disk identify o k response a status code equal to that given -func (o *DiskIdentifyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the disk identify o k response -func (o *DiskIdentifyOK) Code() int { - return 200 -} - -func (o *DiskIdentifyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/identify][%d] diskIdentifyOK %s", 200, payload) -} - -func (o *DiskIdentifyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/identify][%d] diskIdentifyOK %s", 200, payload) -} - -func (o *DiskIdentifyOK) GetPayload() *models.DiskIdentify { - return o.Payload -} - -func (o *DiskIdentifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DiskIdentify) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDiskIdentifyDefault creates a DiskIdentifyDefault with default headers values -func NewDiskIdentifyDefault(code int) *DiskIdentifyDefault { - return &DiskIdentifyDefault{ - _statusCode: code, - } -} - -/* -DiskIdentifyDefault describes a response with status code -1, with default header values. - -Error -*/ -type DiskIdentifyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this disk identify default response has a 2xx status code -func (o *DiskIdentifyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this disk identify default response has a 3xx status code -func (o *DiskIdentifyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this disk identify default response has a 4xx status code -func (o *DiskIdentifyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this disk identify default response has a 5xx status code -func (o *DiskIdentifyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this disk identify default response a status code equal to that given -func (o *DiskIdentifyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the disk identify default response -func (o *DiskIdentifyDefault) Code() int { - return o._statusCode -} - -func (o *DiskIdentifyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/identify][%d] DiskIdentify default %s", o._statusCode, payload) -} - -func (o *DiskIdentifyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/identify][%d] DiskIdentify default %s", o._statusCode, payload) -} - -func (o *DiskIdentifyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DiskIdentifyDefault) 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/disks_assimilate_parameters.go b/v2/client/platform/disks_assimilate_parameters.go deleted file mode 100644 index e113f49a..00000000 --- a/v2/client/platform/disks_assimilate_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDisksAssimilateParams creates a new DisksAssimilateParams 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 NewDisksAssimilateParams() *DisksAssimilateParams { - return &DisksAssimilateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDisksAssimilateParamsWithTimeout creates a new DisksAssimilateParams object -// with the ability to set a timeout on a request. -func NewDisksAssimilateParamsWithTimeout(timeout time.Duration) *DisksAssimilateParams { - return &DisksAssimilateParams{ - timeout: timeout, - } -} - -// NewDisksAssimilateParamsWithContext creates a new DisksAssimilateParams object -// with the ability to set a context for a request. -func NewDisksAssimilateParamsWithContext(ctx context.Context) *DisksAssimilateParams { - return &DisksAssimilateParams{ - Context: ctx, - } -} - -// NewDisksAssimilateParamsWithHTTPClient creates a new DisksAssimilateParams object -// with the ability to set a custom HTTPClient for a request. -func NewDisksAssimilateParamsWithHTTPClient(client *http.Client) *DisksAssimilateParams { - return &DisksAssimilateParams{ - HTTPClient: client, - } -} - -/* -DisksAssimilateParams contains all the parameters to send to the API endpoint - - for the disks assimilate operation. - - Typically these are written to a http.Request. -*/ -type DisksAssimilateParams struct { - - /* Body. - - Specifies the parameter to assimilate disks. - */ - Body *models.ClusterFreeDisks - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the disks assimilate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DisksAssimilateParams) WithDefaults() *DisksAssimilateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the disks assimilate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DisksAssimilateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the disks assimilate params -func (o *DisksAssimilateParams) WithTimeout(timeout time.Duration) *DisksAssimilateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the disks assimilate params -func (o *DisksAssimilateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the disks assimilate params -func (o *DisksAssimilateParams) WithContext(ctx context.Context) *DisksAssimilateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the disks assimilate params -func (o *DisksAssimilateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the disks assimilate params -func (o *DisksAssimilateParams) WithHTTPClient(client *http.Client) *DisksAssimilateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the disks assimilate params -func (o *DisksAssimilateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the disks assimilate params -func (o *DisksAssimilateParams) WithBody(body *models.ClusterFreeDisks) *DisksAssimilateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the disks assimilate params -func (o *DisksAssimilateParams) SetBody(body *models.ClusterFreeDisks) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DisksAssimilateParams) 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/disks_assimilate_responses.go b/v2/client/platform/disks_assimilate_responses.go deleted file mode 100644 index 9be8f14d..00000000 --- a/v2/client/platform/disks_assimilate_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DisksAssimilateReader is a Reader for the DisksAssimilate structure. -type DisksAssimilateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DisksAssimilateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDisksAssimilateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDisksAssimilateDefault(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 - } -} - -// NewDisksAssimilateOK creates a DisksAssimilateOK with default headers values -func NewDisksAssimilateOK() *DisksAssimilateOK { - return &DisksAssimilateOK{} -} - -/* -DisksAssimilateOK describes a response with status code 200, with default header values. - -Success -*/ -type DisksAssimilateOK struct { - Payload *models.ClusterFreeDisks -} - -// IsSuccess returns true when this disks assimilate o k response has a 2xx status code -func (o *DisksAssimilateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this disks assimilate o k response has a 3xx status code -func (o *DisksAssimilateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this disks assimilate o k response has a 4xx status code -func (o *DisksAssimilateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this disks assimilate o k response has a 5xx status code -func (o *DisksAssimilateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this disks assimilate o k response a status code equal to that given -func (o *DisksAssimilateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the disks assimilate o k response -func (o *DisksAssimilateOK) Code() int { - return 200 -} - -func (o *DisksAssimilateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/assimilate][%d] disksAssimilateOK %s", 200, payload) -} - -func (o *DisksAssimilateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/assimilate][%d] disksAssimilateOK %s", 200, payload) -} - -func (o *DisksAssimilateOK) GetPayload() *models.ClusterFreeDisks { - return o.Payload -} - -func (o *DisksAssimilateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterFreeDisks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDisksAssimilateDefault creates a DisksAssimilateDefault with default headers values -func NewDisksAssimilateDefault(code int) *DisksAssimilateDefault { - return &DisksAssimilateDefault{ - _statusCode: code, - } -} - -/* -DisksAssimilateDefault describes a response with status code -1, with default header values. - -Error -*/ -type DisksAssimilateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this disks assimilate default response has a 2xx status code -func (o *DisksAssimilateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this disks assimilate default response has a 3xx status code -func (o *DisksAssimilateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this disks assimilate default response has a 4xx status code -func (o *DisksAssimilateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this disks assimilate default response has a 5xx status code -func (o *DisksAssimilateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this disks assimilate default response a status code equal to that given -func (o *DisksAssimilateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the disks assimilate default response -func (o *DisksAssimilateDefault) Code() int { - return o._statusCode -} - -func (o *DisksAssimilateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/assimilate][%d] DisksAssimilate default %s", o._statusCode, payload) -} - -func (o *DisksAssimilateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/assimilate][%d] DisksAssimilate default %s", o._statusCode, payload) -} - -func (o *DisksAssimilateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DisksAssimilateDefault) 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/expand_cluster_nodes_parameters.go b/v2/client/platform/expand_cluster_nodes_parameters.go deleted file mode 100644 index 1534a8c5..00000000 --- a/v2/client/platform/expand_cluster_nodes_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewExpandClusterNodesParams creates a new ExpandClusterNodesParams 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 NewExpandClusterNodesParams() *ExpandClusterNodesParams { - return &ExpandClusterNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewExpandClusterNodesParamsWithTimeout creates a new ExpandClusterNodesParams object -// with the ability to set a timeout on a request. -func NewExpandClusterNodesParamsWithTimeout(timeout time.Duration) *ExpandClusterNodesParams { - return &ExpandClusterNodesParams{ - timeout: timeout, - } -} - -// NewExpandClusterNodesParamsWithContext creates a new ExpandClusterNodesParams object -// with the ability to set a context for a request. -func NewExpandClusterNodesParamsWithContext(ctx context.Context) *ExpandClusterNodesParams { - return &ExpandClusterNodesParams{ - Context: ctx, - } -} - -// NewExpandClusterNodesParamsWithHTTPClient creates a new ExpandClusterNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewExpandClusterNodesParamsWithHTTPClient(client *http.Client) *ExpandClusterNodesParams { - return &ExpandClusterNodesParams{ - HTTPClient: client, - } -} - -/* -ExpandClusterNodesParams contains all the parameters to send to the API endpoint - - for the expand cluster nodes operation. - - Typically these are written to a http.Request. -*/ -type ExpandClusterNodesParams struct { - - /* Body. - - Specifies the parameters to expand the cluster. - */ - Body *models.ClusterExpandParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the expand cluster nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandClusterNodesParams) WithDefaults() *ExpandClusterNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the expand cluster nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ExpandClusterNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the expand cluster nodes params -func (o *ExpandClusterNodesParams) WithTimeout(timeout time.Duration) *ExpandClusterNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the expand cluster nodes params -func (o *ExpandClusterNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the expand cluster nodes params -func (o *ExpandClusterNodesParams) WithContext(ctx context.Context) *ExpandClusterNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the expand cluster nodes params -func (o *ExpandClusterNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the expand cluster nodes params -func (o *ExpandClusterNodesParams) WithHTTPClient(client *http.Client) *ExpandClusterNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the expand cluster nodes params -func (o *ExpandClusterNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the expand cluster nodes params -func (o *ExpandClusterNodesParams) WithBody(body *models.ClusterExpandParams) *ExpandClusterNodesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the expand cluster nodes params -func (o *ExpandClusterNodesParams) SetBody(body *models.ClusterExpandParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ExpandClusterNodesParams) 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/expand_cluster_nodes_responses.go b/v2/client/platform/expand_cluster_nodes_responses.go deleted file mode 100644 index dc2fb5bd..00000000 --- a/v2/client/platform/expand_cluster_nodes_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ExpandClusterNodesReader is a Reader for the ExpandClusterNodes structure. -type ExpandClusterNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExpandClusterNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewExpandClusterNodesAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewExpandClusterNodesDefault(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 - } -} - -// NewExpandClusterNodesAccepted creates a ExpandClusterNodesAccepted with default headers values -func NewExpandClusterNodesAccepted() *ExpandClusterNodesAccepted { - return &ExpandClusterNodesAccepted{} -} - -/* -ExpandClusterNodesAccepted describes a response with status code 202, with default header values. - -Success -*/ -type ExpandClusterNodesAccepted struct { - Payload *models.ClusterOperationResponseParams -} - -// IsSuccess returns true when this expand cluster nodes accepted response has a 2xx status code -func (o *ExpandClusterNodesAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this expand cluster nodes accepted response has a 3xx status code -func (o *ExpandClusterNodesAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this expand cluster nodes accepted response has a 4xx status code -func (o *ExpandClusterNodesAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this expand cluster nodes accepted response has a 5xx status code -func (o *ExpandClusterNodesAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this expand cluster nodes accepted response a status code equal to that given -func (o *ExpandClusterNodesAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the expand cluster nodes accepted response -func (o *ExpandClusterNodesAccepted) Code() int { - return 202 -} - -func (o *ExpandClusterNodesAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/nodes][%d] expandClusterNodesAccepted %s", 202, payload) -} - -func (o *ExpandClusterNodesAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/nodes][%d] expandClusterNodesAccepted %s", 202, payload) -} - -func (o *ExpandClusterNodesAccepted) GetPayload() *models.ClusterOperationResponseParams { - return o.Payload -} - -func (o *ExpandClusterNodesAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterOperationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewExpandClusterNodesDefault creates a ExpandClusterNodesDefault with default headers values -func NewExpandClusterNodesDefault(code int) *ExpandClusterNodesDefault { - return &ExpandClusterNodesDefault{ - _statusCode: code, - } -} - -/* -ExpandClusterNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ExpandClusterNodesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this expand cluster nodes default response has a 2xx status code -func (o *ExpandClusterNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this expand cluster nodes default response has a 3xx status code -func (o *ExpandClusterNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this expand cluster nodes default response has a 4xx status code -func (o *ExpandClusterNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this expand cluster nodes default response has a 5xx status code -func (o *ExpandClusterNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this expand cluster nodes default response a status code equal to that given -func (o *ExpandClusterNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the expand cluster nodes default response -func (o *ExpandClusterNodesDefault) Code() int { - return o._statusCode -} - -func (o *ExpandClusterNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/nodes][%d] ExpandClusterNodes default %s", o._statusCode, payload) -} - -func (o *ExpandClusterNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/nodes][%d] ExpandClusterNodes default %s", o._statusCode, payload) -} - -func (o *ExpandClusterNodesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ExpandClusterNodesDefault) 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_a_m_q_p_target_config_parameters.go b/v2/client/platform/get_a_m_q_p_target_config_parameters.go deleted file mode 100644 index 8798d8cd..00000000 --- a/v2/client/platform/get_a_m_q_p_target_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetAMQPTargetConfigParams creates a new GetAMQPTargetConfigParams 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 NewGetAMQPTargetConfigParams() *GetAMQPTargetConfigParams { - return &GetAMQPTargetConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAMQPTargetConfigParamsWithTimeout creates a new GetAMQPTargetConfigParams object -// with the ability to set a timeout on a request. -func NewGetAMQPTargetConfigParamsWithTimeout(timeout time.Duration) *GetAMQPTargetConfigParams { - return &GetAMQPTargetConfigParams{ - timeout: timeout, - } -} - -// NewGetAMQPTargetConfigParamsWithContext creates a new GetAMQPTargetConfigParams object -// with the ability to set a context for a request. -func NewGetAMQPTargetConfigParamsWithContext(ctx context.Context) *GetAMQPTargetConfigParams { - return &GetAMQPTargetConfigParams{ - Context: ctx, - } -} - -// NewGetAMQPTargetConfigParamsWithHTTPClient creates a new GetAMQPTargetConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAMQPTargetConfigParamsWithHTTPClient(client *http.Client) *GetAMQPTargetConfigParams { - return &GetAMQPTargetConfigParams{ - HTTPClient: client, - } -} - -/* -GetAMQPTargetConfigParams contains all the parameters to send to the API endpoint - - for the get a m q p target config operation. - - Typically these are written to a http.Request. -*/ -type GetAMQPTargetConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAMQPTargetConfigParams) WithDefaults() *GetAMQPTargetConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAMQPTargetConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) WithTimeout(timeout time.Duration) *GetAMQPTargetConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) WithContext(ctx context.Context) *GetAMQPTargetConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) WithHTTPClient(client *http.Client) *GetAMQPTargetConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get a m q p target config params -func (o *GetAMQPTargetConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAMQPTargetConfigParams) 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_a_m_q_p_target_config_responses.go b/v2/client/platform/get_a_m_q_p_target_config_responses.go deleted file mode 100644 index 8986e9a1..00000000 --- a/v2/client/platform/get_a_m_q_p_target_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAMQPTargetConfigReader is a Reader for the GetAMQPTargetConfig structure. -type GetAMQPTargetConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAMQPTargetConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAMQPTargetConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAMQPTargetConfigDefault(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 - } -} - -// NewGetAMQPTargetConfigOK creates a GetAMQPTargetConfigOK with default headers values -func NewGetAMQPTargetConfigOK() *GetAMQPTargetConfigOK { - return &GetAMQPTargetConfigOK{} -} - -/* -GetAMQPTargetConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAMQPTargetConfigOK struct { - Payload *models.ClusterAMQPTargetConfig -} - -// IsSuccess returns true when this get a m q p target config o k response has a 2xx status code -func (o *GetAMQPTargetConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get a m q p target config o k response has a 3xx status code -func (o *GetAMQPTargetConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get a m q p target config o k response has a 4xx status code -func (o *GetAMQPTargetConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get a m q p target config o k response has a 5xx status code -func (o *GetAMQPTargetConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get a m q p target config o k response a status code equal to that given -func (o *GetAMQPTargetConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get a m q p target config o k response -func (o *GetAMQPTargetConfigOK) Code() int { - return 200 -} - -func (o *GetAMQPTargetConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/amqp-target-config][%d] getAMQPTargetConfigOK %s", 200, payload) -} - -func (o *GetAMQPTargetConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/amqp-target-config][%d] getAMQPTargetConfigOK %s", 200, payload) -} - -func (o *GetAMQPTargetConfigOK) GetPayload() *models.ClusterAMQPTargetConfig { - return o.Payload -} - -func (o *GetAMQPTargetConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterAMQPTargetConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAMQPTargetConfigDefault creates a GetAMQPTargetConfigDefault with default headers values -func NewGetAMQPTargetConfigDefault(code int) *GetAMQPTargetConfigDefault { - return &GetAMQPTargetConfigDefault{ - _statusCode: code, - } -} - -/* -GetAMQPTargetConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAMQPTargetConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get a m q p target config default response has a 2xx status code -func (o *GetAMQPTargetConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get a m q p target config default response has a 3xx status code -func (o *GetAMQPTargetConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get a m q p target config default response has a 4xx status code -func (o *GetAMQPTargetConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get a m q p target config default response has a 5xx status code -func (o *GetAMQPTargetConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get a m q p target config default response a status code equal to that given -func (o *GetAMQPTargetConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get a m q p target config default response -func (o *GetAMQPTargetConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetAMQPTargetConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/amqp-target-config][%d] GetAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *GetAMQPTargetConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/amqp-target-config][%d] GetAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *GetAMQPTargetConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAMQPTargetConfigDefault) 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_chassis_by_id_parameters.go b/v2/client/platform/get_chassis_by_id_parameters.go deleted file mode 100644 index 3b77e126..00000000 --- a/v2/client/platform/get_chassis_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetChassisByIDParams creates a new GetChassisByIDParams 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 NewGetChassisByIDParams() *GetChassisByIDParams { - return &GetChassisByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetChassisByIDParamsWithTimeout creates a new GetChassisByIDParams object -// with the ability to set a timeout on a request. -func NewGetChassisByIDParamsWithTimeout(timeout time.Duration) *GetChassisByIDParams { - return &GetChassisByIDParams{ - timeout: timeout, - } -} - -// NewGetChassisByIDParamsWithContext creates a new GetChassisByIDParams object -// with the ability to set a context for a request. -func NewGetChassisByIDParamsWithContext(ctx context.Context) *GetChassisByIDParams { - return &GetChassisByIDParams{ - Context: ctx, - } -} - -// NewGetChassisByIDParamsWithHTTPClient creates a new GetChassisByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetChassisByIDParamsWithHTTPClient(client *http.Client) *GetChassisByIDParams { - return &GetChassisByIDParams{ - HTTPClient: client, - } -} - -/* -GetChassisByIDParams contains all the parameters to send to the API endpoint - - for the get chassis by Id operation. - - Typically these are written to a http.Request. -*/ -type GetChassisByIDParams struct { - - /* ID. - - Specifies the id of chassis. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get chassis by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetChassisByIDParams) WithDefaults() *GetChassisByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get chassis by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetChassisByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get chassis by Id params -func (o *GetChassisByIDParams) WithTimeout(timeout time.Duration) *GetChassisByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get chassis by Id params -func (o *GetChassisByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get chassis by Id params -func (o *GetChassisByIDParams) WithContext(ctx context.Context) *GetChassisByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get chassis by Id params -func (o *GetChassisByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get chassis by Id params -func (o *GetChassisByIDParams) WithHTTPClient(client *http.Client) *GetChassisByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get chassis by Id params -func (o *GetChassisByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get chassis by Id params -func (o *GetChassisByIDParams) WithID(id int64) *GetChassisByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get chassis by Id params -func (o *GetChassisByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetChassisByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/get_chassis_by_id_responses.go b/v2/client/platform/get_chassis_by_id_responses.go deleted file mode 100644 index 11c16a4b..00000000 --- a/v2/client/platform/get_chassis_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetChassisByIDReader is a Reader for the GetChassisByID structure. -type GetChassisByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetChassisByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetChassisByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetChassisByIDDefault(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 - } -} - -// NewGetChassisByIDOK creates a GetChassisByIDOK with default headers values -func NewGetChassisByIDOK() *GetChassisByIDOK { - return &GetChassisByIDOK{} -} - -/* -GetChassisByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetChassisByIDOK struct { - Payload *models.Chassis -} - -// IsSuccess returns true when this get chassis by Id o k response has a 2xx status code -func (o *GetChassisByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get chassis by Id o k response has a 3xx status code -func (o *GetChassisByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get chassis by Id o k response has a 4xx status code -func (o *GetChassisByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get chassis by Id o k response has a 5xx status code -func (o *GetChassisByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get chassis by Id o k response a status code equal to that given -func (o *GetChassisByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get chassis by Id o k response -func (o *GetChassisByIDOK) Code() int { - return 200 -} - -func (o *GetChassisByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis/{id}][%d] getChassisByIdOK %s", 200, payload) -} - -func (o *GetChassisByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis/{id}][%d] getChassisByIdOK %s", 200, payload) -} - -func (o *GetChassisByIDOK) GetPayload() *models.Chassis { - return o.Payload -} - -func (o *GetChassisByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Chassis) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetChassisByIDDefault creates a GetChassisByIDDefault with default headers values -func NewGetChassisByIDDefault(code int) *GetChassisByIDDefault { - return &GetChassisByIDDefault{ - _statusCode: code, - } -} - -/* -GetChassisByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetChassisByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get chassis by Id default response has a 2xx status code -func (o *GetChassisByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get chassis by Id default response has a 3xx status code -func (o *GetChassisByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get chassis by Id default response has a 4xx status code -func (o *GetChassisByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get chassis by Id default response has a 5xx status code -func (o *GetChassisByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get chassis by Id default response a status code equal to that given -func (o *GetChassisByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get chassis by Id default response -func (o *GetChassisByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetChassisByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis/{id}][%d] GetChassisById default %s", o._statusCode, payload) -} - -func (o *GetChassisByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis/{id}][%d] GetChassisById default %s", o._statusCode, payload) -} - -func (o *GetChassisByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetChassisByIDDefault) 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_chassis_parameters.go b/v2/client/platform/get_chassis_parameters.go deleted file mode 100644 index 11ef4e48..00000000 --- a/v2/client/platform/get_chassis_parameters.go +++ /dev/null @@ -1,164 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetChassisParams creates a new GetChassisParams 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 NewGetChassisParams() *GetChassisParams { - return &GetChassisParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetChassisParamsWithTimeout creates a new GetChassisParams object -// with the ability to set a timeout on a request. -func NewGetChassisParamsWithTimeout(timeout time.Duration) *GetChassisParams { - return &GetChassisParams{ - timeout: timeout, - } -} - -// NewGetChassisParamsWithContext creates a new GetChassisParams object -// with the ability to set a context for a request. -func NewGetChassisParamsWithContext(ctx context.Context) *GetChassisParams { - return &GetChassisParams{ - Context: ctx, - } -} - -// NewGetChassisParamsWithHTTPClient creates a new GetChassisParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetChassisParamsWithHTTPClient(client *http.Client) *GetChassisParams { - return &GetChassisParams{ - HTTPClient: client, - } -} - -/* -GetChassisParams contains all the parameters to send to the API endpoint - - for the get chassis operation. - - Typically these are written to a http.Request. -*/ -type GetChassisParams struct { - - /* NoRackAssigned. - - Filters chassis that have no rack assigned. - */ - NoRackAssigned *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get chassis params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetChassisParams) WithDefaults() *GetChassisParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get chassis params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetChassisParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get chassis params -func (o *GetChassisParams) WithTimeout(timeout time.Duration) *GetChassisParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get chassis params -func (o *GetChassisParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get chassis params -func (o *GetChassisParams) WithContext(ctx context.Context) *GetChassisParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get chassis params -func (o *GetChassisParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get chassis params -func (o *GetChassisParams) WithHTTPClient(client *http.Client) *GetChassisParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get chassis params -func (o *GetChassisParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithNoRackAssigned adds the noRackAssigned to the get chassis params -func (o *GetChassisParams) WithNoRackAssigned(noRackAssigned *bool) *GetChassisParams { - o.SetNoRackAssigned(noRackAssigned) - return o -} - -// SetNoRackAssigned adds the noRackAssigned to the get chassis params -func (o *GetChassisParams) SetNoRackAssigned(noRackAssigned *bool) { - o.NoRackAssigned = noRackAssigned -} - -// WriteToRequest writes these params to a swagger request -func (o *GetChassisParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.NoRackAssigned != nil { - - // query param noRackAssigned - var qrNoRackAssigned bool - - if o.NoRackAssigned != nil { - qrNoRackAssigned = *o.NoRackAssigned - } - qNoRackAssigned := swag.FormatBool(qrNoRackAssigned) - if qNoRackAssigned != "" { - - if err := r.SetQueryParam("noRackAssigned", qNoRackAssigned); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/get_chassis_responses.go b/v2/client/platform/get_chassis_responses.go deleted file mode 100644 index 6b5f397e..00000000 --- a/v2/client/platform/get_chassis_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetChassisReader is a Reader for the GetChassis structure. -type GetChassisReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetChassisReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetChassisOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetChassisDefault(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 - } -} - -// NewGetChassisOK creates a GetChassisOK with default headers values -func NewGetChassisOK() *GetChassisOK { - return &GetChassisOK{} -} - -/* -GetChassisOK describes a response with status code 200, with default header values. - -Success -*/ -type GetChassisOK struct { - Payload *models.ChassisList -} - -// IsSuccess returns true when this get chassis o k response has a 2xx status code -func (o *GetChassisOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get chassis o k response has a 3xx status code -func (o *GetChassisOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get chassis o k response has a 4xx status code -func (o *GetChassisOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get chassis o k response has a 5xx status code -func (o *GetChassisOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get chassis o k response a status code equal to that given -func (o *GetChassisOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get chassis o k response -func (o *GetChassisOK) Code() int { - return 200 -} - -func (o *GetChassisOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis][%d] getChassisOK %s", 200, payload) -} - -func (o *GetChassisOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis][%d] getChassisOK %s", 200, payload) -} - -func (o *GetChassisOK) GetPayload() *models.ChassisList { - return o.Payload -} - -func (o *GetChassisOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ChassisList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetChassisDefault creates a GetChassisDefault with default headers values -func NewGetChassisDefault(code int) *GetChassisDefault { - return &GetChassisDefault{ - _statusCode: code, - } -} - -/* -GetChassisDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetChassisDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get chassis default response has a 2xx status code -func (o *GetChassisDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get chassis default response has a 3xx status code -func (o *GetChassisDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get chassis default response has a 4xx status code -func (o *GetChassisDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get chassis default response has a 5xx status code -func (o *GetChassisDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get chassis default response a status code equal to that given -func (o *GetChassisDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get chassis default response -func (o *GetChassisDefault) Code() int { - return o._statusCode -} - -func (o *GetChassisDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis][%d] GetChassis default %s", o._statusCode, payload) -} - -func (o *GetChassisDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /chassis][%d] GetChassis default %s", o._statusCode, payload) -} - -func (o *GetChassisDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetChassisDefault) 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_local_domain_s_id_parameters.go b/v2/client/platform/get_cluster_local_domain_s_id_parameters.go deleted file mode 100644 index 4157c83f..00000000 --- a/v2/client/platform/get_cluster_local_domain_s_id_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetClusterLocalDomainSIDParams creates a new GetClusterLocalDomainSIDParams 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 NewGetClusterLocalDomainSIDParams() *GetClusterLocalDomainSIDParams { - return &GetClusterLocalDomainSIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterLocalDomainSIDParamsWithTimeout creates a new GetClusterLocalDomainSIDParams object -// with the ability to set a timeout on a request. -func NewGetClusterLocalDomainSIDParamsWithTimeout(timeout time.Duration) *GetClusterLocalDomainSIDParams { - return &GetClusterLocalDomainSIDParams{ - timeout: timeout, - } -} - -// NewGetClusterLocalDomainSIDParamsWithContext creates a new GetClusterLocalDomainSIDParams object -// with the ability to set a context for a request. -func NewGetClusterLocalDomainSIDParamsWithContext(ctx context.Context) *GetClusterLocalDomainSIDParams { - return &GetClusterLocalDomainSIDParams{ - Context: ctx, - } -} - -// NewGetClusterLocalDomainSIDParamsWithHTTPClient creates a new GetClusterLocalDomainSIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterLocalDomainSIDParamsWithHTTPClient(client *http.Client) *GetClusterLocalDomainSIDParams { - return &GetClusterLocalDomainSIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterLocalDomainSIDParams contains all the parameters to send to the API endpoint - - for the get cluster local domain s ID operation. - - Typically these are written to a http.Request. -*/ -type GetClusterLocalDomainSIDParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster local domain s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterLocalDomainSIDParams) WithDefaults() *GetClusterLocalDomainSIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster local domain s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterLocalDomainSIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) WithTimeout(timeout time.Duration) *GetClusterLocalDomainSIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) WithContext(ctx context.Context) *GetClusterLocalDomainSIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) WithHTTPClient(client *http.Client) *GetClusterLocalDomainSIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster local domain s ID params -func (o *GetClusterLocalDomainSIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterLocalDomainSIDParams) 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_local_domain_s_id_responses.go b/v2/client/platform/get_cluster_local_domain_s_id_responses.go deleted file mode 100644 index b97fec8f..00000000 --- a/v2/client/platform/get_cluster_local_domain_s_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterLocalDomainSIDReader is a Reader for the GetClusterLocalDomainSID structure. -type GetClusterLocalDomainSIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterLocalDomainSIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterLocalDomainSIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterLocalDomainSIDDefault(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 - } -} - -// NewGetClusterLocalDomainSIDOK creates a GetClusterLocalDomainSIDOK with default headers values -func NewGetClusterLocalDomainSIDOK() *GetClusterLocalDomainSIDOK { - return &GetClusterLocalDomainSIDOK{} -} - -/* -GetClusterLocalDomainSIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterLocalDomainSIDOK struct { - Payload *models.ClusterLocalDomainSID -} - -// IsSuccess returns true when this get cluster local domain s Id o k response has a 2xx status code -func (o *GetClusterLocalDomainSIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster local domain s Id o k response has a 3xx status code -func (o *GetClusterLocalDomainSIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster local domain s Id o k response has a 4xx status code -func (o *GetClusterLocalDomainSIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster local domain s Id o k response has a 5xx status code -func (o *GetClusterLocalDomainSIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster local domain s Id o k response a status code equal to that given -func (o *GetClusterLocalDomainSIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster local domain s Id o k response -func (o *GetClusterLocalDomainSIDOK) Code() int { - return 200 -} - -func (o *GetClusterLocalDomainSIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/local-domain-sid][%d] getClusterLocalDomainSIdOK %s", 200, payload) -} - -func (o *GetClusterLocalDomainSIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/local-domain-sid][%d] getClusterLocalDomainSIdOK %s", 200, payload) -} - -func (o *GetClusterLocalDomainSIDOK) GetPayload() *models.ClusterLocalDomainSID { - return o.Payload -} - -func (o *GetClusterLocalDomainSIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterLocalDomainSID) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterLocalDomainSIDDefault creates a GetClusterLocalDomainSIDDefault with default headers values -func NewGetClusterLocalDomainSIDDefault(code int) *GetClusterLocalDomainSIDDefault { - return &GetClusterLocalDomainSIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterLocalDomainSIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterLocalDomainSIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster local domain s ID default response has a 2xx status code -func (o *GetClusterLocalDomainSIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster local domain s ID default response has a 3xx status code -func (o *GetClusterLocalDomainSIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster local domain s ID default response has a 4xx status code -func (o *GetClusterLocalDomainSIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster local domain s ID default response has a 5xx status code -func (o *GetClusterLocalDomainSIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster local domain s ID default response a status code equal to that given -func (o *GetClusterLocalDomainSIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster local domain s ID default response -func (o *GetClusterLocalDomainSIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterLocalDomainSIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/local-domain-sid][%d] GetClusterLocalDomainSID default %s", o._statusCode, payload) -} - -func (o *GetClusterLocalDomainSIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/local-domain-sid][%d] GetClusterLocalDomainSID default %s", o._statusCode, payload) -} - -func (o *GetClusterLocalDomainSIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterLocalDomainSIDDefault) 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_packages_parameters.go b/v2/client/platform/get_cluster_packages_parameters.go deleted file mode 100644 index 92a4da71..00000000 --- a/v2/client/platform/get_cluster_packages_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetClusterPackagesParams creates a new GetClusterPackagesParams 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 NewGetClusterPackagesParams() *GetClusterPackagesParams { - return &GetClusterPackagesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterPackagesParamsWithTimeout creates a new GetClusterPackagesParams object -// with the ability to set a timeout on a request. -func NewGetClusterPackagesParamsWithTimeout(timeout time.Duration) *GetClusterPackagesParams { - return &GetClusterPackagesParams{ - timeout: timeout, - } -} - -// NewGetClusterPackagesParamsWithContext creates a new GetClusterPackagesParams object -// with the ability to set a context for a request. -func NewGetClusterPackagesParamsWithContext(ctx context.Context) *GetClusterPackagesParams { - return &GetClusterPackagesParams{ - Context: ctx, - } -} - -// NewGetClusterPackagesParamsWithHTTPClient creates a new GetClusterPackagesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterPackagesParamsWithHTTPClient(client *http.Client) *GetClusterPackagesParams { - return &GetClusterPackagesParams{ - HTTPClient: client, - } -} - -/* -GetClusterPackagesParams contains all the parameters to send to the API endpoint - - for the get cluster packages operation. - - Typically these are written to a http.Request. -*/ -type GetClusterPackagesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster packages params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPackagesParams) WithDefaults() *GetClusterPackagesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster packages params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterPackagesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster packages params -func (o *GetClusterPackagesParams) WithTimeout(timeout time.Duration) *GetClusterPackagesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster packages params -func (o *GetClusterPackagesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster packages params -func (o *GetClusterPackagesParams) WithContext(ctx context.Context) *GetClusterPackagesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster packages params -func (o *GetClusterPackagesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster packages params -func (o *GetClusterPackagesParams) WithHTTPClient(client *http.Client) *GetClusterPackagesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster packages params -func (o *GetClusterPackagesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterPackagesParams) 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_packages_responses.go b/v2/client/platform/get_cluster_packages_responses.go deleted file mode 100644 index 72a21d3a..00000000 --- a/v2/client/platform/get_cluster_packages_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterPackagesReader is a Reader for the GetClusterPackages structure. -type GetClusterPackagesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterPackagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterPackagesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterPackagesDefault(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 - } -} - -// NewGetClusterPackagesOK creates a GetClusterPackagesOK with default headers values -func NewGetClusterPackagesOK() *GetClusterPackagesOK { - return &GetClusterPackagesOK{} -} - -/* -GetClusterPackagesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterPackagesOK struct { - Payload *models.ClusterPackages -} - -// IsSuccess returns true when this get cluster packages o k response has a 2xx status code -func (o *GetClusterPackagesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster packages o k response has a 3xx status code -func (o *GetClusterPackagesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster packages o k response has a 4xx status code -func (o *GetClusterPackagesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster packages o k response has a 5xx status code -func (o *GetClusterPackagesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster packages o k response a status code equal to that given -func (o *GetClusterPackagesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster packages o k response -func (o *GetClusterPackagesOK) Code() int { - return 200 -} - -func (o *GetClusterPackagesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/packages][%d] getClusterPackagesOK %s", 200, payload) -} - -func (o *GetClusterPackagesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/packages][%d] getClusterPackagesOK %s", 200, payload) -} - -func (o *GetClusterPackagesOK) GetPayload() *models.ClusterPackages { - return o.Payload -} - -func (o *GetClusterPackagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterPackages) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterPackagesDefault creates a GetClusterPackagesDefault with default headers values -func NewGetClusterPackagesDefault(code int) *GetClusterPackagesDefault { - return &GetClusterPackagesDefault{ - _statusCode: code, - } -} - -/* -GetClusterPackagesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterPackagesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster packages default response has a 2xx status code -func (o *GetClusterPackagesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster packages default response has a 3xx status code -func (o *GetClusterPackagesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster packages default response has a 4xx status code -func (o *GetClusterPackagesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster packages default response has a 5xx status code -func (o *GetClusterPackagesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster packages default response a status code equal to that given -func (o *GetClusterPackagesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster packages default response -func (o *GetClusterPackagesDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterPackagesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/packages][%d] GetClusterPackages default %s", o._statusCode, payload) -} - -func (o *GetClusterPackagesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/packages][%d] GetClusterPackages default %s", o._statusCode, payload) -} - -func (o *GetClusterPackagesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterPackagesDefault) 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_parameters.go b/v2/client/platform/get_cluster_parameters.go deleted file mode 100644 index a7fe1729..00000000 --- a/v2/client/platform/get_cluster_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetClusterParams creates a new GetClusterParams 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 NewGetClusterParams() *GetClusterParams { - return &GetClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterParamsWithTimeout creates a new GetClusterParams object -// with the ability to set a timeout on a request. -func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams { - return &GetClusterParams{ - timeout: timeout, - } -} - -// NewGetClusterParamsWithContext creates a new GetClusterParams object -// with the ability to set a context for a request. -func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams { - return &GetClusterParams{ - Context: ctx, - } -} - -// NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams { - return &GetClusterParams{ - HTTPClient: client, - } -} - -/* -GetClusterParams contains all the parameters to send to the API endpoint - - for the get cluster operation. - - Typically these are written to a http.Request. -*/ -type GetClusterParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterParams) WithDefaults() *GetClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster params -func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster params -func (o *GetClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster params -func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster params -func (o *GetClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster params -func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster params -func (o *GetClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterParams) 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_responses.go b/v2/client/platform/get_cluster_responses.go deleted file mode 100644 index b8afac99..00000000 --- a/v2/client/platform/get_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterReader is a Reader for the GetCluster structure. -type GetClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterDefault(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 - } -} - -// NewGetClusterOK creates a GetClusterOK with default headers values -func NewGetClusterOK() *GetClusterOK { - return &GetClusterOK{} -} - -/* -GetClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterOK struct { - Payload *models.Cluster -} - -// IsSuccess returns true when this get cluster o k response has a 2xx status code -func (o *GetClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster o k response has a 3xx status code -func (o *GetClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster o k response has a 4xx status code -func (o *GetClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster o k response has a 5xx status code -func (o *GetClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster o k response a status code equal to that given -func (o *GetClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster o k response -func (o *GetClusterOK) Code() int { - return 200 -} - -func (o *GetClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters][%d] getClusterOK %s", 200, payload) -} - -func (o *GetClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters][%d] getClusterOK %s", 200, payload) -} - -func (o *GetClusterOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *GetClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterDefault creates a GetClusterDefault with default headers values -func NewGetClusterDefault(code int) *GetClusterDefault { - return &GetClusterDefault{ - _statusCode: code, - } -} - -/* -GetClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster default response has a 2xx status code -func (o *GetClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster default response has a 3xx status code -func (o *GetClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster default response has a 4xx status code -func (o *GetClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster default response has a 5xx status code -func (o *GetClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster default response a status code equal to that given -func (o *GetClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster default response -func (o *GetClusterDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters][%d] GetCluster default %s", o._statusCode, payload) -} - -func (o *GetClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters][%d] GetCluster default %s", o._statusCode, payload) -} - -func (o *GetClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterDefault) 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_state_parameters.go b/v2/client/platform/get_cluster_state_parameters.go deleted file mode 100644 index 2ce09cba..00000000 --- a/v2/client/platform/get_cluster_state_parameters.go +++ /dev/null @@ -1,164 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetClusterStateParams creates a new GetClusterStateParams 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 NewGetClusterStateParams() *GetClusterStateParams { - return &GetClusterStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterStateParamsWithTimeout creates a new GetClusterStateParams object -// with the ability to set a timeout on a request. -func NewGetClusterStateParamsWithTimeout(timeout time.Duration) *GetClusterStateParams { - return &GetClusterStateParams{ - timeout: timeout, - } -} - -// NewGetClusterStateParamsWithContext creates a new GetClusterStateParams object -// with the ability to set a context for a request. -func NewGetClusterStateParamsWithContext(ctx context.Context) *GetClusterStateParams { - return &GetClusterStateParams{ - Context: ctx, - } -} - -// NewGetClusterStateParamsWithHTTPClient creates a new GetClusterStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterStateParamsWithHTTPClient(client *http.Client) *GetClusterStateParams { - return &GetClusterStateParams{ - HTTPClient: client, - } -} - -/* -GetClusterStateParams contains all the parameters to send to the API endpoint - - for the get cluster state operation. - - Typically these are written to a http.Request. -*/ -type GetClusterStateParams struct { - - /* SystemApps. - - The filter whether or not to get the system apps state details. - */ - SystemApps *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStateParams) WithDefaults() *GetClusterStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster state params -func (o *GetClusterStateParams) WithTimeout(timeout time.Duration) *GetClusterStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster state params -func (o *GetClusterStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster state params -func (o *GetClusterStateParams) WithContext(ctx context.Context) *GetClusterStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster state params -func (o *GetClusterStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster state params -func (o *GetClusterStateParams) WithHTTPClient(client *http.Client) *GetClusterStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster state params -func (o *GetClusterStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSystemApps adds the systemApps to the get cluster state params -func (o *GetClusterStateParams) WithSystemApps(systemApps *bool) *GetClusterStateParams { - o.SetSystemApps(systemApps) - return o -} - -// SetSystemApps adds the systemApps to the get cluster state params -func (o *GetClusterStateParams) SetSystemApps(systemApps *bool) { - o.SystemApps = systemApps -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.SystemApps != nil { - - // query param systemApps - var qrSystemApps bool - - if o.SystemApps != nil { - qrSystemApps = *o.SystemApps - } - qSystemApps := swag.FormatBool(qrSystemApps) - if qSystemApps != "" { - - if err := r.SetQueryParam("systemApps", qSystemApps); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/get_cluster_state_responses.go b/v2/client/platform/get_cluster_state_responses.go deleted file mode 100644 index 29f4d0b0..00000000 --- a/v2/client/platform/get_cluster_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterStateReader is a Reader for the GetClusterState structure. -type GetClusterStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterStateDefault(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 - } -} - -// NewGetClusterStateOK creates a GetClusterStateOK with default headers values -func NewGetClusterStateOK() *GetClusterStateOK { - return &GetClusterStateOK{} -} - -/* -GetClusterStateOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterStateOK struct { - Payload *models.ClusterStateParams -} - -// IsSuccess returns true when this get cluster state o k response has a 2xx status code -func (o *GetClusterStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster state o k response has a 3xx status code -func (o *GetClusterStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster state o k response has a 4xx status code -func (o *GetClusterStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster state o k response has a 5xx status code -func (o *GetClusterStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster state o k response a status code equal to that given -func (o *GetClusterStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster state o k response -func (o *GetClusterStateOK) Code() int { - return 200 -} - -func (o *GetClusterStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/state][%d] getClusterStateOK %s", 200, payload) -} - -func (o *GetClusterStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/state][%d] getClusterStateOK %s", 200, payload) -} - -func (o *GetClusterStateOK) GetPayload() *models.ClusterStateParams { - return o.Payload -} - -func (o *GetClusterStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterStateParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterStateDefault creates a GetClusterStateDefault with default headers values -func NewGetClusterStateDefault(code int) *GetClusterStateDefault { - return &GetClusterStateDefault{ - _statusCode: code, - } -} - -/* -GetClusterStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterStateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster state default response has a 2xx status code -func (o *GetClusterStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster state default response has a 3xx status code -func (o *GetClusterStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster state default response has a 4xx status code -func (o *GetClusterStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster state default response has a 5xx status code -func (o *GetClusterStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster state default response a status code equal to that given -func (o *GetClusterStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster state default response -func (o *GetClusterStateDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/state][%d] GetClusterState default %s", o._statusCode, payload) -} - -func (o *GetClusterStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/state][%d] GetClusterState default %s", o._statusCode, payload) -} - -func (o *GetClusterStateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterStateDefault) 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_vlans_parameters.go b/v2/client/platform/get_cluster_vlans_parameters.go deleted file mode 100644 index 5c135dc7..00000000 --- a/v2/client/platform/get_cluster_vlans_parameters.go +++ /dev/null @@ -1,341 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetClusterVlansParams creates a new GetClusterVlansParams 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 NewGetClusterVlansParams() *GetClusterVlansParams { - return &GetClusterVlansParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterVlansParamsWithTimeout creates a new GetClusterVlansParams object -// with the ability to set a timeout on a request. -func NewGetClusterVlansParamsWithTimeout(timeout time.Duration) *GetClusterVlansParams { - return &GetClusterVlansParams{ - timeout: timeout, - } -} - -// NewGetClusterVlansParamsWithContext creates a new GetClusterVlansParams object -// with the ability to set a context for a request. -func NewGetClusterVlansParamsWithContext(ctx context.Context) *GetClusterVlansParams { - return &GetClusterVlansParams{ - Context: ctx, - } -} - -// NewGetClusterVlansParamsWithHTTPClient creates a new GetClusterVlansParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterVlansParamsWithHTTPClient(client *http.Client) *GetClusterVlansParams { - return &GetClusterVlansParams{ - HTTPClient: client, - } -} - -/* -GetClusterVlansParams contains all the parameters to send to the API endpoint - - for the get cluster vlans operation. - - Typically these are written to a http.Request. -*/ -type GetClusterVlansParams struct { - - /* CompressIpsToRanges. - - Compress vlan IPs to list of contigous IP ranges with startIp and endIp. - */ - CompressIpsToRanges *bool - - /* IncludeTenants. - - If true, the response includes vlans which belongs to all the tenants the current user has permissions to see. - - Default: true - */ - IncludeTenants *bool - - /* InterfaceNames. - - Vlan interface names, it should be in interface_group_name.vlan_id format. - */ - InterfaceNames []string - - /* SkipPrimaryAndBondIface. - - If true, vlan primary and bond interfaces are not returned in the response. - */ - SkipPrimaryAndBondIface *bool - - /* TenantIds. - - Ids of the tenants, used to get vlans assigned to tenants. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterVlansParams) WithDefaults() *GetClusterVlansParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster vlans params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterVlansParams) SetDefaults() { - var ( - compressIpsToRangesDefault = bool(false) - - includeTenantsDefault = bool(true) - - skipPrimaryAndBondIfaceDefault = bool(false) - ) - - val := GetClusterVlansParams{ - CompressIpsToRanges: &compressIpsToRangesDefault, - IncludeTenants: &includeTenantsDefault, - SkipPrimaryAndBondIface: &skipPrimaryAndBondIfaceDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get cluster vlans params -func (o *GetClusterVlansParams) WithTimeout(timeout time.Duration) *GetClusterVlansParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster vlans params -func (o *GetClusterVlansParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster vlans params -func (o *GetClusterVlansParams) WithContext(ctx context.Context) *GetClusterVlansParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster vlans params -func (o *GetClusterVlansParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster vlans params -func (o *GetClusterVlansParams) WithHTTPClient(client *http.Client) *GetClusterVlansParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster vlans params -func (o *GetClusterVlansParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCompressIpsToRanges adds the compressIpsToRanges to the get cluster vlans params -func (o *GetClusterVlansParams) WithCompressIpsToRanges(compressIpsToRanges *bool) *GetClusterVlansParams { - o.SetCompressIpsToRanges(compressIpsToRanges) - return o -} - -// SetCompressIpsToRanges adds the compressIpsToRanges to the get cluster vlans params -func (o *GetClusterVlansParams) SetCompressIpsToRanges(compressIpsToRanges *bool) { - o.CompressIpsToRanges = compressIpsToRanges -} - -// WithIncludeTenants adds the includeTenants to the get cluster vlans params -func (o *GetClusterVlansParams) WithIncludeTenants(includeTenants *bool) *GetClusterVlansParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get cluster vlans params -func (o *GetClusterVlansParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithInterfaceNames adds the interfaceNames to the get cluster vlans params -func (o *GetClusterVlansParams) WithInterfaceNames(interfaceNames []string) *GetClusterVlansParams { - o.SetInterfaceNames(interfaceNames) - return o -} - -// SetInterfaceNames adds the interfaceNames to the get cluster vlans params -func (o *GetClusterVlansParams) SetInterfaceNames(interfaceNames []string) { - o.InterfaceNames = interfaceNames -} - -// WithSkipPrimaryAndBondIface adds the skipPrimaryAndBondIface to the get cluster vlans params -func (o *GetClusterVlansParams) WithSkipPrimaryAndBondIface(skipPrimaryAndBondIface *bool) *GetClusterVlansParams { - o.SetSkipPrimaryAndBondIface(skipPrimaryAndBondIface) - return o -} - -// SetSkipPrimaryAndBondIface adds the skipPrimaryAndBondIface to the get cluster vlans params -func (o *GetClusterVlansParams) SetSkipPrimaryAndBondIface(skipPrimaryAndBondIface *bool) { - o.SkipPrimaryAndBondIface = skipPrimaryAndBondIface -} - -// WithTenantIds adds the tenantIds to the get cluster vlans params -func (o *GetClusterVlansParams) WithTenantIds(tenantIds []string) *GetClusterVlansParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get cluster vlans params -func (o *GetClusterVlansParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterVlansParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CompressIpsToRanges != nil { - - // query param compressIpsToRanges - var qrCompressIpsToRanges bool - - if o.CompressIpsToRanges != nil { - qrCompressIpsToRanges = *o.CompressIpsToRanges - } - qCompressIpsToRanges := swag.FormatBool(qrCompressIpsToRanges) - if qCompressIpsToRanges != "" { - - if err := r.SetQueryParam("compressIpsToRanges", qCompressIpsToRanges); 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.InterfaceNames != nil { - - // binding items for interfaceNames - joinedInterfaceNames := o.bindParamInterfaceNames(reg) - - // query array param interfaceNames - if err := r.SetQueryParam("interfaceNames", joinedInterfaceNames...); err != nil { - return err - } - } - - if o.SkipPrimaryAndBondIface != nil { - - // query param skipPrimaryAndBondIface - var qrSkipPrimaryAndBondIface bool - - if o.SkipPrimaryAndBondIface != nil { - qrSkipPrimaryAndBondIface = *o.SkipPrimaryAndBondIface - } - qSkipPrimaryAndBondIface := swag.FormatBool(qrSkipPrimaryAndBondIface) - if qSkipPrimaryAndBondIface != "" { - - if err := r.SetQueryParam("skipPrimaryAndBondIface", qSkipPrimaryAndBondIface); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetClusterVlans binds the parameter interfaceNames -func (o *GetClusterVlansParams) bindParamInterfaceNames(formats strfmt.Registry) []string { - interfaceNamesIR := o.InterfaceNames - - var interfaceNamesIC []string - for _, interfaceNamesIIR := range interfaceNamesIR { // explode []string - - interfaceNamesIIV := interfaceNamesIIR // string as string - interfaceNamesIC = append(interfaceNamesIC, interfaceNamesIIV) - } - - // items.CollectionFormat: "" - interfaceNamesIS := swag.JoinByFormat(interfaceNamesIC, "") - - return interfaceNamesIS -} - -// bindParamGetClusterVlans binds the parameter tenantIds -func (o *GetClusterVlansParams) 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/client/platform/get_cluster_vlans_responses.go b/v2/client/platform/get_cluster_vlans_responses.go deleted file mode 100644 index 750b5860..00000000 --- a/v2/client/platform/get_cluster_vlans_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterVlansReader is a Reader for the GetClusterVlans structure. -type GetClusterVlansReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterVlansReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterVlansOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterVlansDefault(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 - } -} - -// NewGetClusterVlansOK creates a GetClusterVlansOK with default headers values -func NewGetClusterVlansOK() *GetClusterVlansOK { - return &GetClusterVlansOK{} -} - -/* -GetClusterVlansOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterVlansOK struct { - Payload *models.ClusterVlans -} - -// IsSuccess returns true when this get cluster vlans o k response has a 2xx status code -func (o *GetClusterVlansOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster vlans o k response has a 3xx status code -func (o *GetClusterVlansOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster vlans o k response has a 4xx status code -func (o *GetClusterVlansOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster vlans o k response has a 5xx status code -func (o *GetClusterVlansOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster vlans o k response a status code equal to that given -func (o *GetClusterVlansOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster vlans o k response -func (o *GetClusterVlansOK) Code() int { - return 200 -} - -func (o *GetClusterVlansOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/vlans][%d] getClusterVlansOK %s", 200, payload) -} - -func (o *GetClusterVlansOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/vlans][%d] getClusterVlansOK %s", 200, payload) -} - -func (o *GetClusterVlansOK) GetPayload() *models.ClusterVlans { - return o.Payload -} - -func (o *GetClusterVlansOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterVlans) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterVlansDefault creates a GetClusterVlansDefault with default headers values -func NewGetClusterVlansDefault(code int) *GetClusterVlansDefault { - return &GetClusterVlansDefault{ - _statusCode: code, - } -} - -/* -GetClusterVlansDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterVlansDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster vlans default response has a 2xx status code -func (o *GetClusterVlansDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster vlans default response has a 3xx status code -func (o *GetClusterVlansDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster vlans default response has a 4xx status code -func (o *GetClusterVlansDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster vlans default response has a 5xx status code -func (o *GetClusterVlansDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster vlans default response a status code equal to that given -func (o *GetClusterVlansDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster vlans default response -func (o *GetClusterVlansDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterVlansDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/vlans][%d] GetClusterVlans default %s", o._statusCode, payload) -} - -func (o *GetClusterVlansDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/vlans][%d] GetClusterVlans default %s", o._statusCode, payload) -} - -func (o *GetClusterVlansDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterVlansDefault) 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_interface_groups_parameters.go b/v2/client/platform/get_interface_groups_parameters.go deleted file mode 100644 index 40761fa8..00000000 --- a/v2/client/platform/get_interface_groups_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetInterfaceGroupsParams creates a new GetInterfaceGroupsParams 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 NewGetInterfaceGroupsParams() *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInterfaceGroupsParamsWithTimeout creates a new GetInterfaceGroupsParams object -// with the ability to set a timeout on a request. -func NewGetInterfaceGroupsParamsWithTimeout(timeout time.Duration) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - timeout: timeout, - } -} - -// NewGetInterfaceGroupsParamsWithContext creates a new GetInterfaceGroupsParams object -// with the ability to set a context for a request. -func NewGetInterfaceGroupsParamsWithContext(ctx context.Context) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - Context: ctx, - } -} - -// NewGetInterfaceGroupsParamsWithHTTPClient creates a new GetInterfaceGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInterfaceGroupsParamsWithHTTPClient(client *http.Client) *GetInterfaceGroupsParams { - return &GetInterfaceGroupsParams{ - HTTPClient: client, - } -} - -/* -GetInterfaceGroupsParams contains all the parameters to send to the API endpoint - - for the get interface groups operation. - - Typically these are written to a http.Request. -*/ -type GetInterfaceGroupsParams struct { - - /* Ids. - - Ids of the interface groups. - */ - Ids []int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get interface groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfaceGroupsParams) WithDefaults() *GetInterfaceGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get interface groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfaceGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get interface groups params -func (o *GetInterfaceGroupsParams) WithTimeout(timeout time.Duration) *GetInterfaceGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get interface groups params -func (o *GetInterfaceGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get interface groups params -func (o *GetInterfaceGroupsParams) WithContext(ctx context.Context) *GetInterfaceGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get interface groups params -func (o *GetInterfaceGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get interface groups params -func (o *GetInterfaceGroupsParams) WithHTTPClient(client *http.Client) *GetInterfaceGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get interface groups params -func (o *GetInterfaceGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get interface groups params -func (o *GetInterfaceGroupsParams) WithIds(ids []int32) *GetInterfaceGroupsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get interface groups params -func (o *GetInterfaceGroupsParams) SetIds(ids []int32) { - o.Ids = ids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInterfaceGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetInterfaceGroups binds the parameter ids -func (o *GetInterfaceGroupsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int32 - - idsIIV := swag.FormatInt32(idsIIR) // int32 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/platform/get_interface_groups_responses.go b/v2/client/platform/get_interface_groups_responses.go deleted file mode 100644 index 90214a1a..00000000 --- a/v2/client/platform/get_interface_groups_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetInterfaceGroupsReader is a Reader for the GetInterfaceGroups structure. -type GetInterfaceGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInterfaceGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInterfaceGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetInterfaceGroupsDefault(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 - } -} - -// NewGetInterfaceGroupsOK creates a GetInterfaceGroupsOK with default headers values -func NewGetInterfaceGroupsOK() *GetInterfaceGroupsOK { - return &GetInterfaceGroupsOK{} -} - -/* -GetInterfaceGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetInterfaceGroupsOK struct { - Payload *models.InterfaceGroups -} - -// IsSuccess returns true when this get interface groups o k response has a 2xx status code -func (o *GetInterfaceGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get interface groups o k response has a 3xx status code -func (o *GetInterfaceGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get interface groups o k response has a 4xx status code -func (o *GetInterfaceGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get interface groups o k response has a 5xx status code -func (o *GetInterfaceGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get interface groups o k response a status code equal to that given -func (o *GetInterfaceGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get interface groups o k response -func (o *GetInterfaceGroupsOK) Code() int { - return 200 -} - -func (o *GetInterfaceGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interface-groups][%d] getInterfaceGroupsOK %s", 200, payload) -} - -func (o *GetInterfaceGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interface-groups][%d] getInterfaceGroupsOK %s", 200, payload) -} - -func (o *GetInterfaceGroupsOK) GetPayload() *models.InterfaceGroups { - return o.Payload -} - -func (o *GetInterfaceGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceGroups) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInterfaceGroupsDefault creates a GetInterfaceGroupsDefault with default headers values -func NewGetInterfaceGroupsDefault(code int) *GetInterfaceGroupsDefault { - return &GetInterfaceGroupsDefault{ - _statusCode: code, - } -} - -/* -GetInterfaceGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetInterfaceGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get interface groups default response has a 2xx status code -func (o *GetInterfaceGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get interface groups default response has a 3xx status code -func (o *GetInterfaceGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get interface groups default response has a 4xx status code -func (o *GetInterfaceGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get interface groups default response has a 5xx status code -func (o *GetInterfaceGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get interface groups default response a status code equal to that given -func (o *GetInterfaceGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get interface groups default response -func (o *GetInterfaceGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetInterfaceGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interface-groups][%d] GetInterfaceGroups default %s", o._statusCode, payload) -} - -func (o *GetInterfaceGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interface-groups][%d] GetInterfaceGroups default %s", o._statusCode, payload) -} - -func (o *GetInterfaceGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetInterfaceGroupsDefault) 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_interfaces_parameters.go b/v2/client/platform/get_interfaces_parameters.go deleted file mode 100644 index da636c9d..00000000 --- a/v2/client/platform/get_interfaces_parameters.go +++ /dev/null @@ -1,474 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetInterfacesParams creates a new GetInterfacesParams 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 NewGetInterfacesParams() *GetInterfacesParams { - return &GetInterfacesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetInterfacesParamsWithTimeout creates a new GetInterfacesParams object -// with the ability to set a timeout on a request. -func NewGetInterfacesParamsWithTimeout(timeout time.Duration) *GetInterfacesParams { - return &GetInterfacesParams{ - timeout: timeout, - } -} - -// NewGetInterfacesParamsWithContext creates a new GetInterfacesParams object -// with the ability to set a context for a request. -func NewGetInterfacesParamsWithContext(ctx context.Context) *GetInterfacesParams { - return &GetInterfacesParams{ - Context: ctx, - } -} - -// NewGetInterfacesParamsWithHTTPClient creates a new GetInterfacesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetInterfacesParamsWithHTTPClient(client *http.Client) *GetInterfacesParams { - return &GetInterfacesParams{ - HTTPClient: client, - } -} - -/* -GetInterfacesParams contains all the parameters to send to the API endpoint - - for the get interfaces operation. - - Typically these are written to a http.Request. -*/ -type GetInterfacesParams struct { - - /* BondInterfaces. - - Get bond interfaces only. - */ - BondInterfaces *bool - - /* BondMember. - - Include bond member information for bond interfaces. - - Default: true - */ - BondMember *bool - - /* Cache. - - Get interfaces information from cache. - - Default: true - */ - Cache *bool - - /* ChassisSerial. - - Chassis serial number, used to get interfaces on a chassis. - */ - ChassisSerial *string - - /* InterfaceGroup. - - Get interfaces assigned to a interface group only. - */ - InterfaceGroup *bool - - /* NodeID. - - Node id, used to get interfaces on a particular node. - - Format: int64 - */ - NodeID *int64 - - /* Slot. - - Slot number, used to get interfaces on a slot. - - Format: int64 - */ - Slot *int64 - - /* Stats. - - Include interface stats. - - Default: true - */ - Stats *bool - - /* UplinkSwitch. - - Include uplink switch information. - - Default: true - */ - UplinkSwitch *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get interfaces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfacesParams) WithDefaults() *GetInterfacesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get interfaces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetInterfacesParams) SetDefaults() { - var ( - bondInterfacesDefault = bool(false) - - bondMemberDefault = bool(true) - - cacheDefault = bool(true) - - interfaceGroupDefault = bool(false) - - statsDefault = bool(true) - - uplinkSwitchDefault = bool(true) - ) - - val := GetInterfacesParams{ - BondInterfaces: &bondInterfacesDefault, - BondMember: &bondMemberDefault, - Cache: &cacheDefault, - InterfaceGroup: &interfaceGroupDefault, - Stats: &statsDefault, - UplinkSwitch: &uplinkSwitchDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get interfaces params -func (o *GetInterfacesParams) WithTimeout(timeout time.Duration) *GetInterfacesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get interfaces params -func (o *GetInterfacesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get interfaces params -func (o *GetInterfacesParams) WithContext(ctx context.Context) *GetInterfacesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get interfaces params -func (o *GetInterfacesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get interfaces params -func (o *GetInterfacesParams) WithHTTPClient(client *http.Client) *GetInterfacesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get interfaces params -func (o *GetInterfacesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBondInterfaces adds the bondInterfaces to the get interfaces params -func (o *GetInterfacesParams) WithBondInterfaces(bondInterfaces *bool) *GetInterfacesParams { - o.SetBondInterfaces(bondInterfaces) - return o -} - -// SetBondInterfaces adds the bondInterfaces to the get interfaces params -func (o *GetInterfacesParams) SetBondInterfaces(bondInterfaces *bool) { - o.BondInterfaces = bondInterfaces -} - -// WithBondMember adds the bondMember to the get interfaces params -func (o *GetInterfacesParams) WithBondMember(bondMember *bool) *GetInterfacesParams { - o.SetBondMember(bondMember) - return o -} - -// SetBondMember adds the bondMember to the get interfaces params -func (o *GetInterfacesParams) SetBondMember(bondMember *bool) { - o.BondMember = bondMember -} - -// WithCache adds the cache to the get interfaces params -func (o *GetInterfacesParams) WithCache(cache *bool) *GetInterfacesParams { - o.SetCache(cache) - return o -} - -// SetCache adds the cache to the get interfaces params -func (o *GetInterfacesParams) SetCache(cache *bool) { - o.Cache = cache -} - -// WithChassisSerial adds the chassisSerial to the get interfaces params -func (o *GetInterfacesParams) WithChassisSerial(chassisSerial *string) *GetInterfacesParams { - o.SetChassisSerial(chassisSerial) - return o -} - -// SetChassisSerial adds the chassisSerial to the get interfaces params -func (o *GetInterfacesParams) SetChassisSerial(chassisSerial *string) { - o.ChassisSerial = chassisSerial -} - -// WithInterfaceGroup adds the interfaceGroup to the get interfaces params -func (o *GetInterfacesParams) WithInterfaceGroup(interfaceGroup *bool) *GetInterfacesParams { - o.SetInterfaceGroup(interfaceGroup) - return o -} - -// SetInterfaceGroup adds the interfaceGroup to the get interfaces params -func (o *GetInterfacesParams) SetInterfaceGroup(interfaceGroup *bool) { - o.InterfaceGroup = interfaceGroup -} - -// WithNodeID adds the nodeID to the get interfaces params -func (o *GetInterfacesParams) WithNodeID(nodeID *int64) *GetInterfacesParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the get interfaces params -func (o *GetInterfacesParams) SetNodeID(nodeID *int64) { - o.NodeID = nodeID -} - -// WithSlot adds the slot to the get interfaces params -func (o *GetInterfacesParams) WithSlot(slot *int64) *GetInterfacesParams { - o.SetSlot(slot) - return o -} - -// SetSlot adds the slot to the get interfaces params -func (o *GetInterfacesParams) SetSlot(slot *int64) { - o.Slot = slot -} - -// WithStats adds the stats to the get interfaces params -func (o *GetInterfacesParams) WithStats(stats *bool) *GetInterfacesParams { - o.SetStats(stats) - return o -} - -// SetStats adds the stats to the get interfaces params -func (o *GetInterfacesParams) SetStats(stats *bool) { - o.Stats = stats -} - -// WithUplinkSwitch adds the uplinkSwitch to the get interfaces params -func (o *GetInterfacesParams) WithUplinkSwitch(uplinkSwitch *bool) *GetInterfacesParams { - o.SetUplinkSwitch(uplinkSwitch) - return o -} - -// SetUplinkSwitch adds the uplinkSwitch to the get interfaces params -func (o *GetInterfacesParams) SetUplinkSwitch(uplinkSwitch *bool) { - o.UplinkSwitch = uplinkSwitch -} - -// WriteToRequest writes these params to a swagger request -func (o *GetInterfacesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.BondInterfaces != nil { - - // query param bondInterfaces - var qrBondInterfaces bool - - if o.BondInterfaces != nil { - qrBondInterfaces = *o.BondInterfaces - } - qBondInterfaces := swag.FormatBool(qrBondInterfaces) - if qBondInterfaces != "" { - - if err := r.SetQueryParam("bondInterfaces", qBondInterfaces); err != nil { - return err - } - } - } - - if o.BondMember != nil { - - // query param bondMember - var qrBondMember bool - - if o.BondMember != nil { - qrBondMember = *o.BondMember - } - qBondMember := swag.FormatBool(qrBondMember) - if qBondMember != "" { - - if err := r.SetQueryParam("bondMember", qBondMember); err != nil { - return err - } - } - } - - if o.Cache != nil { - - // query param cache - var qrCache bool - - if o.Cache != nil { - qrCache = *o.Cache - } - qCache := swag.FormatBool(qrCache) - if qCache != "" { - - if err := r.SetQueryParam("cache", qCache); err != nil { - return err - } - } - } - - if o.ChassisSerial != nil { - - // query param chassisSerial - var qrChassisSerial string - - if o.ChassisSerial != nil { - qrChassisSerial = *o.ChassisSerial - } - qChassisSerial := qrChassisSerial - if qChassisSerial != "" { - - if err := r.SetQueryParam("chassisSerial", qChassisSerial); err != nil { - return err - } - } - } - - if o.InterfaceGroup != nil { - - // query param interfaceGroup - var qrInterfaceGroup bool - - if o.InterfaceGroup != nil { - qrInterfaceGroup = *o.InterfaceGroup - } - qInterfaceGroup := swag.FormatBool(qrInterfaceGroup) - if qInterfaceGroup != "" { - - if err := r.SetQueryParam("interfaceGroup", qInterfaceGroup); err != nil { - return err - } - } - } - - if o.NodeID != nil { - - // query param nodeId - var qrNodeID int64 - - if o.NodeID != nil { - qrNodeID = *o.NodeID - } - qNodeID := swag.FormatInt64(qrNodeID) - if qNodeID != "" { - - if err := r.SetQueryParam("nodeId", qNodeID); err != nil { - return err - } - } - } - - if o.Slot != nil { - - // query param slot - var qrSlot int64 - - if o.Slot != nil { - qrSlot = *o.Slot - } - qSlot := swag.FormatInt64(qrSlot) - if qSlot != "" { - - if err := r.SetQueryParam("slot", qSlot); err != nil { - return err - } - } - } - - if o.Stats != nil { - - // query param stats - var qrStats bool - - if o.Stats != nil { - qrStats = *o.Stats - } - qStats := swag.FormatBool(qrStats) - if qStats != "" { - - if err := r.SetQueryParam("stats", qStats); err != nil { - return err - } - } - } - - if o.UplinkSwitch != nil { - - // query param uplinkSwitch - var qrUplinkSwitch bool - - if o.UplinkSwitch != nil { - qrUplinkSwitch = *o.UplinkSwitch - } - qUplinkSwitch := swag.FormatBool(qrUplinkSwitch) - if qUplinkSwitch != "" { - - if err := r.SetQueryParam("uplinkSwitch", qUplinkSwitch); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/get_interfaces_responses.go b/v2/client/platform/get_interfaces_responses.go deleted file mode 100644 index 5ed15922..00000000 --- a/v2/client/platform/get_interfaces_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetInterfacesReader is a Reader for the GetInterfaces structure. -type GetInterfacesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetInterfacesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetInterfacesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetInterfacesDefault(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 - } -} - -// NewGetInterfacesOK creates a GetInterfacesOK with default headers values -func NewGetInterfacesOK() *GetInterfacesOK { - return &GetInterfacesOK{} -} - -/* -GetInterfacesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetInterfacesOK struct { - Payload *models.NetworkInterfaceParams -} - -// IsSuccess returns true when this get interfaces o k response has a 2xx status code -func (o *GetInterfacesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get interfaces o k response has a 3xx status code -func (o *GetInterfacesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get interfaces o k response has a 4xx status code -func (o *GetInterfacesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get interfaces o k response has a 5xx status code -func (o *GetInterfacesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get interfaces o k response a status code equal to that given -func (o *GetInterfacesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get interfaces o k response -func (o *GetInterfacesOK) Code() int { - return 200 -} - -func (o *GetInterfacesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interfaces][%d] getInterfacesOK %s", 200, payload) -} - -func (o *GetInterfacesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interfaces][%d] getInterfacesOK %s", 200, payload) -} - -func (o *GetInterfacesOK) GetPayload() *models.NetworkInterfaceParams { - return o.Payload -} - -func (o *GetInterfacesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NetworkInterfaceParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetInterfacesDefault creates a GetInterfacesDefault with default headers values -func NewGetInterfacesDefault(code int) *GetInterfacesDefault { - return &GetInterfacesDefault{ - _statusCode: code, - } -} - -/* -GetInterfacesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetInterfacesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get interfaces default response has a 2xx status code -func (o *GetInterfacesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get interfaces default response has a 3xx status code -func (o *GetInterfacesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get interfaces default response has a 4xx status code -func (o *GetInterfacesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get interfaces default response has a 5xx status code -func (o *GetInterfacesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get interfaces default response a status code equal to that given -func (o *GetInterfacesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get interfaces default response -func (o *GetInterfacesDefault) Code() int { - return o._statusCode -} - -func (o *GetInterfacesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interfaces][%d] GetInterfaces default %s", o._statusCode, payload) -} - -func (o *GetInterfacesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/interfaces][%d] GetInterfaces default %s", o._statusCode, payload) -} - -func (o *GetInterfacesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetInterfacesDefault) 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_ipmi_lan_config_parameters.go b/v2/client/platform/get_ipmi_lan_config_parameters.go deleted file mode 100644 index 57c600d6..00000000 --- a/v2/client/platform/get_ipmi_lan_config_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetIpmiLanConfigParams creates a new GetIpmiLanConfigParams 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 NewGetIpmiLanConfigParams() *GetIpmiLanConfigParams { - return &GetIpmiLanConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIpmiLanConfigParamsWithTimeout creates a new GetIpmiLanConfigParams object -// with the ability to set a timeout on a request. -func NewGetIpmiLanConfigParamsWithTimeout(timeout time.Duration) *GetIpmiLanConfigParams { - return &GetIpmiLanConfigParams{ - timeout: timeout, - } -} - -// NewGetIpmiLanConfigParamsWithContext creates a new GetIpmiLanConfigParams object -// with the ability to set a context for a request. -func NewGetIpmiLanConfigParamsWithContext(ctx context.Context) *GetIpmiLanConfigParams { - return &GetIpmiLanConfigParams{ - Context: ctx, - } -} - -// NewGetIpmiLanConfigParamsWithHTTPClient creates a new GetIpmiLanConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIpmiLanConfigParamsWithHTTPClient(client *http.Client) *GetIpmiLanConfigParams { - return &GetIpmiLanConfigParams{ - HTTPClient: client, - } -} - -/* -GetIpmiLanConfigParams contains all the parameters to send to the API endpoint - - for the get ipmi lan config operation. - - Typically these are written to a http.Request. -*/ -type GetIpmiLanConfigParams struct { - - /* Ids. - - Node ids to filter node IPMI LAN configuration. - */ - Ids []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ipmi lan config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIpmiLanConfigParams) WithDefaults() *GetIpmiLanConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ipmi lan config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIpmiLanConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) WithTimeout(timeout time.Duration) *GetIpmiLanConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) WithContext(ctx context.Context) *GetIpmiLanConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) WithHTTPClient(client *http.Client) *GetIpmiLanConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) WithIds(ids []int64) *GetIpmiLanConfigParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get ipmi lan config params -func (o *GetIpmiLanConfigParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIpmiLanConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIpmiLanConfig binds the parameter ids -func (o *GetIpmiLanConfigParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/platform/get_ipmi_lan_config_responses.go b/v2/client/platform/get_ipmi_lan_config_responses.go deleted file mode 100644 index 70e2b156..00000000 --- a/v2/client/platform/get_ipmi_lan_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIpmiLanConfigReader is a Reader for the GetIpmiLanConfig structure. -type GetIpmiLanConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIpmiLanConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIpmiLanConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIpmiLanConfigDefault(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 - } -} - -// NewGetIpmiLanConfigOK creates a GetIpmiLanConfigOK with default headers values -func NewGetIpmiLanConfigOK() *GetIpmiLanConfigOK { - return &GetIpmiLanConfigOK{} -} - -/* -GetIpmiLanConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIpmiLanConfigOK struct { - Payload *models.IpmiLanParams -} - -// IsSuccess returns true when this get ipmi lan config o k response has a 2xx status code -func (o *GetIpmiLanConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ipmi lan config o k response has a 3xx status code -func (o *GetIpmiLanConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ipmi lan config o k response has a 4xx status code -func (o *GetIpmiLanConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ipmi lan config o k response has a 5xx status code -func (o *GetIpmiLanConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ipmi lan config o k response a status code equal to that given -func (o *GetIpmiLanConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ipmi lan config o k response -func (o *GetIpmiLanConfigOK) Code() int { - return 200 -} - -func (o *GetIpmiLanConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/lan][%d] getIpmiLanConfigOK %s", 200, payload) -} - -func (o *GetIpmiLanConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/lan][%d] getIpmiLanConfigOK %s", 200, payload) -} - -func (o *GetIpmiLanConfigOK) GetPayload() *models.IpmiLanParams { - return o.Payload -} - -func (o *GetIpmiLanConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IpmiLanParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIpmiLanConfigDefault creates a GetIpmiLanConfigDefault with default headers values -func NewGetIpmiLanConfigDefault(code int) *GetIpmiLanConfigDefault { - return &GetIpmiLanConfigDefault{ - _statusCode: code, - } -} - -/* -GetIpmiLanConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIpmiLanConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get ipmi lan config default response has a 2xx status code -func (o *GetIpmiLanConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ipmi lan config default response has a 3xx status code -func (o *GetIpmiLanConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ipmi lan config default response has a 4xx status code -func (o *GetIpmiLanConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ipmi lan config default response has a 5xx status code -func (o *GetIpmiLanConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ipmi lan config default response a status code equal to that given -func (o *GetIpmiLanConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ipmi lan config default response -func (o *GetIpmiLanConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetIpmiLanConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/lan][%d] GetIpmiLanConfig default %s", o._statusCode, payload) -} - -func (o *GetIpmiLanConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/lan][%d] GetIpmiLanConfig default %s", o._statusCode, payload) -} - -func (o *GetIpmiLanConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIpmiLanConfigDefault) 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_ipmi_users_parameters.go b/v2/client/platform/get_ipmi_users_parameters.go deleted file mode 100644 index 3eb3e1de..00000000 --- a/v2/client/platform/get_ipmi_users_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetIpmiUsersParams creates a new GetIpmiUsersParams 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 NewGetIpmiUsersParams() *GetIpmiUsersParams { - return &GetIpmiUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIpmiUsersParamsWithTimeout creates a new GetIpmiUsersParams object -// with the ability to set a timeout on a request. -func NewGetIpmiUsersParamsWithTimeout(timeout time.Duration) *GetIpmiUsersParams { - return &GetIpmiUsersParams{ - timeout: timeout, - } -} - -// NewGetIpmiUsersParamsWithContext creates a new GetIpmiUsersParams object -// with the ability to set a context for a request. -func NewGetIpmiUsersParamsWithContext(ctx context.Context) *GetIpmiUsersParams { - return &GetIpmiUsersParams{ - Context: ctx, - } -} - -// NewGetIpmiUsersParamsWithHTTPClient creates a new GetIpmiUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIpmiUsersParamsWithHTTPClient(client *http.Client) *GetIpmiUsersParams { - return &GetIpmiUsersParams{ - HTTPClient: client, - } -} - -/* -GetIpmiUsersParams contains all the parameters to send to the API endpoint - - for the get ipmi users operation. - - Typically these are written to a http.Request. -*/ -type GetIpmiUsersParams struct { - - /* Ids. - - Node ids to filter node IPMI users. - */ - Ids []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ipmi users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIpmiUsersParams) WithDefaults() *GetIpmiUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ipmi users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIpmiUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ipmi users params -func (o *GetIpmiUsersParams) WithTimeout(timeout time.Duration) *GetIpmiUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ipmi users params -func (o *GetIpmiUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ipmi users params -func (o *GetIpmiUsersParams) WithContext(ctx context.Context) *GetIpmiUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ipmi users params -func (o *GetIpmiUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ipmi users params -func (o *GetIpmiUsersParams) WithHTTPClient(client *http.Client) *GetIpmiUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ipmi users params -func (o *GetIpmiUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get ipmi users params -func (o *GetIpmiUsersParams) WithIds(ids []int64) *GetIpmiUsersParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get ipmi users params -func (o *GetIpmiUsersParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIpmiUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetIpmiUsers binds the parameter ids -func (o *GetIpmiUsersParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/platform/get_ipmi_users_responses.go b/v2/client/platform/get_ipmi_users_responses.go deleted file mode 100644 index 3f62e84c..00000000 --- a/v2/client/platform/get_ipmi_users_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIpmiUsersReader is a Reader for the GetIpmiUsers structure. -type GetIpmiUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIpmiUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIpmiUsersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIpmiUsersDefault(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 - } -} - -// NewGetIpmiUsersOK creates a GetIpmiUsersOK with default headers values -func NewGetIpmiUsersOK() *GetIpmiUsersOK { - return &GetIpmiUsersOK{} -} - -/* -GetIpmiUsersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIpmiUsersOK struct { - Payload *models.IpmiUsers -} - -// IsSuccess returns true when this get ipmi users o k response has a 2xx status code -func (o *GetIpmiUsersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ipmi users o k response has a 3xx status code -func (o *GetIpmiUsersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ipmi users o k response has a 4xx status code -func (o *GetIpmiUsersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ipmi users o k response has a 5xx status code -func (o *GetIpmiUsersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ipmi users o k response a status code equal to that given -func (o *GetIpmiUsersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ipmi users o k response -func (o *GetIpmiUsersOK) Code() int { - return 200 -} - -func (o *GetIpmiUsersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/users][%d] getIpmiUsersOK %s", 200, payload) -} - -func (o *GetIpmiUsersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/users][%d] getIpmiUsersOK %s", 200, payload) -} - -func (o *GetIpmiUsersOK) GetPayload() *models.IpmiUsers { - return o.Payload -} - -func (o *GetIpmiUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IpmiUsers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIpmiUsersDefault creates a GetIpmiUsersDefault with default headers values -func NewGetIpmiUsersDefault(code int) *GetIpmiUsersDefault { - return &GetIpmiUsersDefault{ - _statusCode: code, - } -} - -/* -GetIpmiUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIpmiUsersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get ipmi users default response has a 2xx status code -func (o *GetIpmiUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ipmi users default response has a 3xx status code -func (o *GetIpmiUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ipmi users default response has a 4xx status code -func (o *GetIpmiUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ipmi users default response has a 5xx status code -func (o *GetIpmiUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ipmi users default response a status code equal to that given -func (o *GetIpmiUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ipmi users default response -func (o *GetIpmiUsersDefault) Code() int { - return o._statusCode -} - -func (o *GetIpmiUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/users][%d] GetIpmiUsers default %s", o._statusCode, payload) -} - -func (o *GetIpmiUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/ipmi/users][%d] GetIpmiUsers default %s", o._statusCode, payload) -} - -func (o *GetIpmiUsersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIpmiUsersDefault) 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_is_d_maa_s_cluster_parameters.go b/v2/client/platform/get_is_d_maa_s_cluster_parameters.go deleted file mode 100644 index a355a199..00000000 --- a/v2/client/platform/get_is_d_maa_s_cluster_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetIsDMaaSClusterParams creates a new GetIsDMaaSClusterParams 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 NewGetIsDMaaSClusterParams() *GetIsDMaaSClusterParams { - return &GetIsDMaaSClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIsDMaaSClusterParamsWithTimeout creates a new GetIsDMaaSClusterParams object -// with the ability to set a timeout on a request. -func NewGetIsDMaaSClusterParamsWithTimeout(timeout time.Duration) *GetIsDMaaSClusterParams { - return &GetIsDMaaSClusterParams{ - timeout: timeout, - } -} - -// NewGetIsDMaaSClusterParamsWithContext creates a new GetIsDMaaSClusterParams object -// with the ability to set a context for a request. -func NewGetIsDMaaSClusterParamsWithContext(ctx context.Context) *GetIsDMaaSClusterParams { - return &GetIsDMaaSClusterParams{ - Context: ctx, - } -} - -// NewGetIsDMaaSClusterParamsWithHTTPClient creates a new GetIsDMaaSClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIsDMaaSClusterParamsWithHTTPClient(client *http.Client) *GetIsDMaaSClusterParams { - return &GetIsDMaaSClusterParams{ - HTTPClient: client, - } -} - -/* -GetIsDMaaSClusterParams contains all the parameters to send to the API endpoint - - for the get is d maa s cluster operation. - - Typically these are written to a http.Request. -*/ -type GetIsDMaaSClusterParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get is d maa s cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIsDMaaSClusterParams) WithDefaults() *GetIsDMaaSClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get is d maa s cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIsDMaaSClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) WithTimeout(timeout time.Duration) *GetIsDMaaSClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) WithContext(ctx context.Context) *GetIsDMaaSClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) WithHTTPClient(client *http.Client) *GetIsDMaaSClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get is d maa s cluster params -func (o *GetIsDMaaSClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIsDMaaSClusterParams) 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_is_d_maa_s_cluster_responses.go b/v2/client/platform/get_is_d_maa_s_cluster_responses.go deleted file mode 100644 index 78462e0c..00000000 --- a/v2/client/platform/get_is_d_maa_s_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetIsDMaaSClusterReader is a Reader for the GetIsDMaaSCluster structure. -type GetIsDMaaSClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIsDMaaSClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIsDMaaSClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetIsDMaaSClusterDefault(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 - } -} - -// NewGetIsDMaaSClusterOK creates a GetIsDMaaSClusterOK with default headers values -func NewGetIsDMaaSClusterOK() *GetIsDMaaSClusterOK { - return &GetIsDMaaSClusterOK{} -} - -/* -GetIsDMaaSClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIsDMaaSClusterOK struct { - Payload *models.DMaaSInfo -} - -// IsSuccess returns true when this get is d maa s cluster o k response has a 2xx status code -func (o *GetIsDMaaSClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get is d maa s cluster o k response has a 3xx status code -func (o *GetIsDMaaSClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get is d maa s cluster o k response has a 4xx status code -func (o *GetIsDMaaSClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get is d maa s cluster o k response has a 5xx status code -func (o *GetIsDMaaSClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get is d maa s cluster o k response a status code equal to that given -func (o *GetIsDMaaSClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get is d maa s cluster o k response -func (o *GetIsDMaaSClusterOK) Code() int { - return 200 -} - -func (o *GetIsDMaaSClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/is-dmaas][%d] getIsDMaaSClusterOK %s", 200, payload) -} - -func (o *GetIsDMaaSClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/is-dmaas][%d] getIsDMaaSClusterOK %s", 200, payload) -} - -func (o *GetIsDMaaSClusterOK) GetPayload() *models.DMaaSInfo { - return o.Payload -} - -func (o *GetIsDMaaSClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DMaaSInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIsDMaaSClusterDefault creates a GetIsDMaaSClusterDefault with default headers values -func NewGetIsDMaaSClusterDefault(code int) *GetIsDMaaSClusterDefault { - return &GetIsDMaaSClusterDefault{ - _statusCode: code, - } -} - -/* -GetIsDMaaSClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetIsDMaaSClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get is d maa s cluster default response has a 2xx status code -func (o *GetIsDMaaSClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get is d maa s cluster default response has a 3xx status code -func (o *GetIsDMaaSClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get is d maa s cluster default response has a 4xx status code -func (o *GetIsDMaaSClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get is d maa s cluster default response has a 5xx status code -func (o *GetIsDMaaSClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get is d maa s cluster default response a status code equal to that given -func (o *GetIsDMaaSClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get is d maa s cluster default response -func (o *GetIsDMaaSClusterDefault) Code() int { - return o._statusCode -} - -func (o *GetIsDMaaSClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/is-dmaas][%d] GetIsDMaaSCluster default %s", o._statusCode, payload) -} - -func (o *GetIsDMaaSClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/is-dmaas][%d] GetIsDMaaSCluster default %s", o._statusCode, payload) -} - -func (o *GetIsDMaaSClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetIsDMaaSClusterDefault) 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_network_interfaces_parameters.go b/v2/client/platform/get_network_interfaces_parameters.go deleted file mode 100644 index b49534d5..00000000 --- a/v2/client/platform/get_network_interfaces_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetNetworkInterfacesParams creates a new GetNetworkInterfacesParams 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 NewGetNetworkInterfacesParams() *GetNetworkInterfacesParams { - return &GetNetworkInterfacesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNetworkInterfacesParamsWithTimeout creates a new GetNetworkInterfacesParams object -// with the ability to set a timeout on a request. -func NewGetNetworkInterfacesParamsWithTimeout(timeout time.Duration) *GetNetworkInterfacesParams { - return &GetNetworkInterfacesParams{ - timeout: timeout, - } -} - -// NewGetNetworkInterfacesParamsWithContext creates a new GetNetworkInterfacesParams object -// with the ability to set a context for a request. -func NewGetNetworkInterfacesParamsWithContext(ctx context.Context) *GetNetworkInterfacesParams { - return &GetNetworkInterfacesParams{ - Context: ctx, - } -} - -// NewGetNetworkInterfacesParamsWithHTTPClient creates a new GetNetworkInterfacesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNetworkInterfacesParamsWithHTTPClient(client *http.Client) *GetNetworkInterfacesParams { - return &GetNetworkInterfacesParams{ - HTTPClient: client, - } -} - -/* -GetNetworkInterfacesParams contains all the parameters to send to the API endpoint - - for the get network interfaces operation. - - Typically these are written to a http.Request. -*/ -type GetNetworkInterfacesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get network interfaces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNetworkInterfacesParams) WithDefaults() *GetNetworkInterfacesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get network interfaces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNetworkInterfacesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get network interfaces params -func (o *GetNetworkInterfacesParams) WithTimeout(timeout time.Duration) *GetNetworkInterfacesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get network interfaces params -func (o *GetNetworkInterfacesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get network interfaces params -func (o *GetNetworkInterfacesParams) WithContext(ctx context.Context) *GetNetworkInterfacesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get network interfaces params -func (o *GetNetworkInterfacesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get network interfaces params -func (o *GetNetworkInterfacesParams) WithHTTPClient(client *http.Client) *GetNetworkInterfacesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get network interfaces params -func (o *GetNetworkInterfacesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNetworkInterfacesParams) 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_network_interfaces_responses.go b/v2/client/platform/get_network_interfaces_responses.go deleted file mode 100644 index d8b992db..00000000 --- a/v2/client/platform/get_network_interfaces_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetNetworkInterfacesReader is a Reader for the GetNetworkInterfaces structure. -type GetNetworkInterfacesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNetworkInterfacesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNetworkInterfacesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNetworkInterfacesDefault(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 - } -} - -// NewGetNetworkInterfacesOK creates a GetNetworkInterfacesOK with default headers values -func NewGetNetworkInterfacesOK() *GetNetworkInterfacesOK { - return &GetNetworkInterfacesOK{} -} - -/* -GetNetworkInterfacesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNetworkInterfacesOK struct { - Payload *models.ClusterInterfaces -} - -// IsSuccess returns true when this get network interfaces o k response has a 2xx status code -func (o *GetNetworkInterfacesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get network interfaces o k response has a 3xx status code -func (o *GetNetworkInterfacesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get network interfaces o k response has a 4xx status code -func (o *GetNetworkInterfacesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get network interfaces o k response has a 5xx status code -func (o *GetNetworkInterfacesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get network interfaces o k response a status code equal to that given -func (o *GetNetworkInterfacesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get network interfaces o k response -func (o *GetNetworkInterfacesOK) Code() int { - return 200 -} - -func (o *GetNetworkInterfacesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network-interfaces][%d] getNetworkInterfacesOK %s", 200, payload) -} - -func (o *GetNetworkInterfacesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network-interfaces][%d] getNetworkInterfacesOK %s", 200, payload) -} - -func (o *GetNetworkInterfacesOK) GetPayload() *models.ClusterInterfaces { - return o.Payload -} - -func (o *GetNetworkInterfacesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterInterfaces) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNetworkInterfacesDefault creates a GetNetworkInterfacesDefault with default headers values -func NewGetNetworkInterfacesDefault(code int) *GetNetworkInterfacesDefault { - return &GetNetworkInterfacesDefault{ - _statusCode: code, - } -} - -/* -GetNetworkInterfacesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNetworkInterfacesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get network interfaces default response has a 2xx status code -func (o *GetNetworkInterfacesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get network interfaces default response has a 3xx status code -func (o *GetNetworkInterfacesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get network interfaces default response has a 4xx status code -func (o *GetNetworkInterfacesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get network interfaces default response has a 5xx status code -func (o *GetNetworkInterfacesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get network interfaces default response a status code equal to that given -func (o *GetNetworkInterfacesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get network interfaces default response -func (o *GetNetworkInterfacesDefault) Code() int { - return o._statusCode -} - -func (o *GetNetworkInterfacesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network-interfaces][%d] GetNetworkInterfaces default %s", o._statusCode, payload) -} - -func (o *GetNetworkInterfacesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network-interfaces][%d] GetNetworkInterfaces default %s", o._statusCode, payload) -} - -func (o *GetNetworkInterfacesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetNetworkInterfacesDefault) 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_nodes_parameters.go b/v2/client/platform/get_nodes_parameters.go deleted file mode 100644 index cf132074..00000000 --- a/v2/client/platform/get_nodes_parameters.go +++ /dev/null @@ -1,361 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetNodesParams creates a new GetNodesParams 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 NewGetNodesParams() *GetNodesParams { - return &GetNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodesParamsWithTimeout creates a new GetNodesParams object -// with the ability to set a timeout on a request. -func NewGetNodesParamsWithTimeout(timeout time.Duration) *GetNodesParams { - return &GetNodesParams{ - timeout: timeout, - } -} - -// NewGetNodesParamsWithContext creates a new GetNodesParams object -// with the ability to set a context for a request. -func NewGetNodesParamsWithContext(ctx context.Context) *GetNodesParams { - return &GetNodesParams{ - Context: ctx, - } -} - -// NewGetNodesParamsWithHTTPClient creates a new GetNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodesParamsWithHTTPClient(client *http.Client) *GetNodesParams { - return &GetNodesParams{ - HTTPClient: client, - } -} - -/* -GetNodesParams contains all the parameters to send to the API endpoint - - for the get nodes operation. - - Typically these are written to a http.Request. -*/ -type GetNodesParams struct { - - /* ClusterPartitionIds. - - ClusterPartitionIdList specifies the list of Ids used to filter the - nodes by specified cluster partition. - */ - ClusterPartitionIds []int64 - - /* FetchStats. - - FetchStats is used to specify whether to call Stats service to fetch the - stats for the nodes. Stats not displayed by default - */ - FetchStats *bool - - /* Ids. - - "List of IDs to be returned. If empty, all nodes are returned." - */ - Ids []int64 - - /* IncludeMarkedForRemoval. - - IncludeMarkedForRemoval is used to specify whether to include nodes - marked for removal. - */ - IncludeMarkedForRemoval *bool - - /* IncludeOnlyUnassignedNodes. - - IncludeOnlyUnassignedNodes will return nodes that are not yet assigned to - any cluster partition. If this parameter is specified as true and - ClusterPartitionIdList is also non-empty, then no nodes will be returned. - */ - IncludeOnlyUnassignedNodes *bool - - /* ShowSystemDisks. - - ShowSystemdisks is used to specify whether to display system disks for the nodes. Not populated by default. - */ - ShowSystemDisks *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodesParams) WithDefaults() *GetNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get nodes params -func (o *GetNodesParams) WithTimeout(timeout time.Duration) *GetNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get nodes params -func (o *GetNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get nodes params -func (o *GetNodesParams) WithContext(ctx context.Context) *GetNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get nodes params -func (o *GetNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get nodes params -func (o *GetNodesParams) WithHTTPClient(client *http.Client) *GetNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get nodes params -func (o *GetNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterPartitionIds adds the clusterPartitionIds to the get nodes params -func (o *GetNodesParams) WithClusterPartitionIds(clusterPartitionIds []int64) *GetNodesParams { - o.SetClusterPartitionIds(clusterPartitionIds) - return o -} - -// SetClusterPartitionIds adds the clusterPartitionIds to the get nodes params -func (o *GetNodesParams) SetClusterPartitionIds(clusterPartitionIds []int64) { - o.ClusterPartitionIds = clusterPartitionIds -} - -// WithFetchStats adds the fetchStats to the get nodes params -func (o *GetNodesParams) WithFetchStats(fetchStats *bool) *GetNodesParams { - o.SetFetchStats(fetchStats) - return o -} - -// SetFetchStats adds the fetchStats to the get nodes params -func (o *GetNodesParams) SetFetchStats(fetchStats *bool) { - o.FetchStats = fetchStats -} - -// WithIds adds the ids to the get nodes params -func (o *GetNodesParams) WithIds(ids []int64) *GetNodesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get nodes params -func (o *GetNodesParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get nodes params -func (o *GetNodesParams) WithIncludeMarkedForRemoval(includeMarkedForRemoval *bool) *GetNodesParams { - o.SetIncludeMarkedForRemoval(includeMarkedForRemoval) - return o -} - -// SetIncludeMarkedForRemoval adds the includeMarkedForRemoval to the get nodes params -func (o *GetNodesParams) SetIncludeMarkedForRemoval(includeMarkedForRemoval *bool) { - o.IncludeMarkedForRemoval = includeMarkedForRemoval -} - -// WithIncludeOnlyUnassignedNodes adds the includeOnlyUnassignedNodes to the get nodes params -func (o *GetNodesParams) WithIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes *bool) *GetNodesParams { - o.SetIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes) - return o -} - -// SetIncludeOnlyUnassignedNodes adds the includeOnlyUnassignedNodes to the get nodes params -func (o *GetNodesParams) SetIncludeOnlyUnassignedNodes(includeOnlyUnassignedNodes *bool) { - o.IncludeOnlyUnassignedNodes = includeOnlyUnassignedNodes -} - -// WithShowSystemDisks adds the showSystemDisks to the get nodes params -func (o *GetNodesParams) WithShowSystemDisks(showSystemDisks *bool) *GetNodesParams { - o.SetShowSystemDisks(showSystemDisks) - return o -} - -// SetShowSystemDisks adds the showSystemDisks to the get nodes params -func (o *GetNodesParams) SetShowSystemDisks(showSystemDisks *bool) { - o.ShowSystemDisks = showSystemDisks -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterPartitionIds != nil { - - // binding items for clusterPartitionIds - joinedClusterPartitionIds := o.bindParamClusterPartitionIds(reg) - - // query array param clusterPartitionIds - if err := r.SetQueryParam("clusterPartitionIds", joinedClusterPartitionIds...); err != nil { - return err - } - } - - if o.FetchStats != nil { - - // query param fetchStats - var qrFetchStats bool - - if o.FetchStats != nil { - qrFetchStats = *o.FetchStats - } - qFetchStats := swag.FormatBool(qrFetchStats) - if qFetchStats != "" { - - if err := r.SetQueryParam("fetchStats", qFetchStats); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeMarkedForRemoval != nil { - - // query param includeMarkedForRemoval - var qrIncludeMarkedForRemoval bool - - if o.IncludeMarkedForRemoval != nil { - qrIncludeMarkedForRemoval = *o.IncludeMarkedForRemoval - } - qIncludeMarkedForRemoval := swag.FormatBool(qrIncludeMarkedForRemoval) - if qIncludeMarkedForRemoval != "" { - - if err := r.SetQueryParam("includeMarkedForRemoval", qIncludeMarkedForRemoval); err != nil { - return err - } - } - } - - if o.IncludeOnlyUnassignedNodes != nil { - - // query param includeOnlyUnassignedNodes - var qrIncludeOnlyUnassignedNodes bool - - if o.IncludeOnlyUnassignedNodes != nil { - qrIncludeOnlyUnassignedNodes = *o.IncludeOnlyUnassignedNodes - } - qIncludeOnlyUnassignedNodes := swag.FormatBool(qrIncludeOnlyUnassignedNodes) - if qIncludeOnlyUnassignedNodes != "" { - - if err := r.SetQueryParam("includeOnlyUnassignedNodes", qIncludeOnlyUnassignedNodes); err != nil { - return err - } - } - } - - if o.ShowSystemDisks != nil { - - // query param showSystemDisks - var qrShowSystemDisks bool - - if o.ShowSystemDisks != nil { - qrShowSystemDisks = *o.ShowSystemDisks - } - qShowSystemDisks := swag.FormatBool(qrShowSystemDisks) - if qShowSystemDisks != "" { - - if err := r.SetQueryParam("showSystemDisks", qShowSystemDisks); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetNodes binds the parameter clusterPartitionIds -func (o *GetNodesParams) bindParamClusterPartitionIds(formats strfmt.Registry) []string { - clusterPartitionIdsIR := o.ClusterPartitionIds - - var clusterPartitionIdsIC []string - for _, clusterPartitionIdsIIR := range clusterPartitionIdsIR { // explode []int64 - - clusterPartitionIdsIIV := swag.FormatInt64(clusterPartitionIdsIIR) // int64 as string - clusterPartitionIdsIC = append(clusterPartitionIdsIC, clusterPartitionIdsIIV) - } - - // items.CollectionFormat: "" - clusterPartitionIdsIS := swag.JoinByFormat(clusterPartitionIdsIC, "") - - return clusterPartitionIdsIS -} - -// bindParamGetNodes binds the parameter ids -func (o *GetNodesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/platform/get_nodes_responses.go b/v2/client/platform/get_nodes_responses.go deleted file mode 100644 index b2c27b05..00000000 --- a/v2/client/platform/get_nodes_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetNodesReader is a Reader for the GetNodes structure. -type GetNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNodesDefault(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 - } -} - -// NewGetNodesOK creates a GetNodesOK with default headers values -func NewGetNodesOK() *GetNodesOK { - return &GetNodesOK{} -} - -/* -GetNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodesOK struct { - Payload []*models.Node -} - -// IsSuccess returns true when this get nodes o k response has a 2xx status code -func (o *GetNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get nodes o k response has a 3xx status code -func (o *GetNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get nodes o k response has a 4xx status code -func (o *GetNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get nodes o k response has a 5xx status code -func (o *GetNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get nodes o k response a status code equal to that given -func (o *GetNodesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get nodes o k response -func (o *GetNodesOK) Code() int { - return 200 -} - -func (o *GetNodesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes][%d] getNodesOK %s", 200, payload) -} - -func (o *GetNodesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes][%d] getNodesOK %s", 200, payload) -} - -func (o *GetNodesOK) GetPayload() []*models.Node { - return o.Payload -} - -func (o *GetNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNodesDefault creates a GetNodesDefault with default headers values -func NewGetNodesDefault(code int) *GetNodesDefault { - return &GetNodesDefault{ - _statusCode: code, - } -} - -/* -GetNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNodesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get nodes default response has a 2xx status code -func (o *GetNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get nodes default response has a 3xx status code -func (o *GetNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get nodes default response has a 4xx status code -func (o *GetNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get nodes default response has a 5xx status code -func (o *GetNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get nodes default response a status code equal to that given -func (o *GetNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get nodes default response -func (o *GetNodesDefault) Code() int { - return o._statusCode -} - -func (o *GetNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes][%d] GetNodes default %s", o._statusCode, payload) -} - -func (o *GetNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes][%d] GetNodes default %s", o._statusCode, payload) -} - -func (o *GetNodesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetNodesDefault) 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_rack_by_id_parameters.go b/v2/client/platform/get_rack_by_id_parameters.go deleted file mode 100644 index 8a808166..00000000 --- a/v2/client/platform/get_rack_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetRackByIDParams creates a new GetRackByIDParams 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 NewGetRackByIDParams() *GetRackByIDParams { - return &GetRackByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRackByIDParamsWithTimeout creates a new GetRackByIDParams object -// with the ability to set a timeout on a request. -func NewGetRackByIDParamsWithTimeout(timeout time.Duration) *GetRackByIDParams { - return &GetRackByIDParams{ - timeout: timeout, - } -} - -// NewGetRackByIDParamsWithContext creates a new GetRackByIDParams object -// with the ability to set a context for a request. -func NewGetRackByIDParamsWithContext(ctx context.Context) *GetRackByIDParams { - return &GetRackByIDParams{ - Context: ctx, - } -} - -// NewGetRackByIDParamsWithHTTPClient creates a new GetRackByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRackByIDParamsWithHTTPClient(client *http.Client) *GetRackByIDParams { - return &GetRackByIDParams{ - HTTPClient: client, - } -} - -/* -GetRackByIDParams contains all the parameters to send to the API endpoint - - for the get rack by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRackByIDParams struct { - - /* ID. - - Specifies the id of rack. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRackByIDParams) WithDefaults() *GetRackByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRackByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get rack by Id params -func (o *GetRackByIDParams) WithTimeout(timeout time.Duration) *GetRackByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get rack by Id params -func (o *GetRackByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get rack by Id params -func (o *GetRackByIDParams) WithContext(ctx context.Context) *GetRackByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get rack by Id params -func (o *GetRackByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get rack by Id params -func (o *GetRackByIDParams) WithHTTPClient(client *http.Client) *GetRackByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get rack by Id params -func (o *GetRackByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get rack by Id params -func (o *GetRackByIDParams) WithID(id int64) *GetRackByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get rack by Id params -func (o *GetRackByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRackByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/get_rack_by_id_responses.go b/v2/client/platform/get_rack_by_id_responses.go deleted file mode 100644 index 13f55d09..00000000 --- a/v2/client/platform/get_rack_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRackByIDReader is a Reader for the GetRackByID structure. -type GetRackByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRackByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRackByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRackByIDDefault(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 - } -} - -// NewGetRackByIDOK creates a GetRackByIDOK with default headers values -func NewGetRackByIDOK() *GetRackByIDOK { - return &GetRackByIDOK{} -} - -/* -GetRackByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRackByIDOK struct { - Payload *models.Rack -} - -// IsSuccess returns true when this get rack by Id o k response has a 2xx status code -func (o *GetRackByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get rack by Id o k response has a 3xx status code -func (o *GetRackByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get rack by Id o k response has a 4xx status code -func (o *GetRackByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get rack by Id o k response has a 5xx status code -func (o *GetRackByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get rack by Id o k response a status code equal to that given -func (o *GetRackByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get rack by Id o k response -func (o *GetRackByIDOK) Code() int { - return 200 -} - -func (o *GetRackByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks/{id}][%d] getRackByIdOK %s", 200, payload) -} - -func (o *GetRackByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks/{id}][%d] getRackByIdOK %s", 200, payload) -} - -func (o *GetRackByIDOK) GetPayload() *models.Rack { - return o.Payload -} - -func (o *GetRackByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Rack) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRackByIDDefault creates a GetRackByIDDefault with default headers values -func NewGetRackByIDDefault(code int) *GetRackByIDDefault { - return &GetRackByIDDefault{ - _statusCode: code, - } -} - -/* -GetRackByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRackByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get rack by Id default response has a 2xx status code -func (o *GetRackByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get rack by Id default response has a 3xx status code -func (o *GetRackByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get rack by Id default response has a 4xx status code -func (o *GetRackByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get rack by Id default response has a 5xx status code -func (o *GetRackByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get rack by Id default response a status code equal to that given -func (o *GetRackByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get rack by Id default response -func (o *GetRackByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRackByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks/{id}][%d] GetRackById default %s", o._statusCode, payload) -} - -func (o *GetRackByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks/{id}][%d] GetRackById default %s", o._statusCode, payload) -} - -func (o *GetRackByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRackByIDDefault) 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_racks_parameters.go b/v2/client/platform/get_racks_parameters.go deleted file mode 100644 index 1e26a1b5..00000000 --- a/v2/client/platform/get_racks_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetRacksParams creates a new GetRacksParams 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 NewGetRacksParams() *GetRacksParams { - return &GetRacksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRacksParamsWithTimeout creates a new GetRacksParams object -// with the ability to set a timeout on a request. -func NewGetRacksParamsWithTimeout(timeout time.Duration) *GetRacksParams { - return &GetRacksParams{ - timeout: timeout, - } -} - -// NewGetRacksParamsWithContext creates a new GetRacksParams object -// with the ability to set a context for a request. -func NewGetRacksParamsWithContext(ctx context.Context) *GetRacksParams { - return &GetRacksParams{ - Context: ctx, - } -} - -// NewGetRacksParamsWithHTTPClient creates a new GetRacksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRacksParamsWithHTTPClient(client *http.Client) *GetRacksParams { - return &GetRacksParams{ - HTTPClient: client, - } -} - -/* -GetRacksParams contains all the parameters to send to the API endpoint - - for the get racks operation. - - Typically these are written to a http.Request. -*/ -type GetRacksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRacksParams) WithDefaults() *GetRacksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRacksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get racks params -func (o *GetRacksParams) WithTimeout(timeout time.Duration) *GetRacksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get racks params -func (o *GetRacksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get racks params -func (o *GetRacksParams) WithContext(ctx context.Context) *GetRacksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get racks params -func (o *GetRacksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get racks params -func (o *GetRacksParams) WithHTTPClient(client *http.Client) *GetRacksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get racks params -func (o *GetRacksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRacksParams) 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_racks_responses.go b/v2/client/platform/get_racks_responses.go deleted file mode 100644 index c9840fec..00000000 --- a/v2/client/platform/get_racks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRacksReader is a Reader for the GetRacks structure. -type GetRacksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRacksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRacksDefault(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 - } -} - -// NewGetRacksOK creates a GetRacksOK with default headers values -func NewGetRacksOK() *GetRacksOK { - return &GetRacksOK{} -} - -/* -GetRacksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRacksOK struct { - Payload *models.Racks -} - -// IsSuccess returns true when this get racks o k response has a 2xx status code -func (o *GetRacksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get racks o k response has a 3xx status code -func (o *GetRacksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get racks o k response has a 4xx status code -func (o *GetRacksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get racks o k response has a 5xx status code -func (o *GetRacksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get racks o k response a status code equal to that given -func (o *GetRacksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get racks o k response -func (o *GetRacksOK) Code() int { - return 200 -} - -func (o *GetRacksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks][%d] getRacksOK %s", 200, payload) -} - -func (o *GetRacksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks][%d] getRacksOK %s", 200, payload) -} - -func (o *GetRacksOK) GetPayload() *models.Racks { - return o.Payload -} - -func (o *GetRacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Racks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRacksDefault creates a GetRacksDefault with default headers values -func NewGetRacksDefault(code int) *GetRacksDefault { - return &GetRacksDefault{ - _statusCode: code, - } -} - -/* -GetRacksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRacksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get racks default response has a 2xx status code -func (o *GetRacksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get racks default response has a 3xx status code -func (o *GetRacksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get racks default response has a 4xx status code -func (o *GetRacksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get racks default response has a 5xx status code -func (o *GetRacksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get racks default response a status code equal to that given -func (o *GetRacksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get racks default response -func (o *GetRacksDefault) Code() int { - return o._statusCode -} - -func (o *GetRacksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks][%d] GetRacks default %s", o._statusCode, payload) -} - -func (o *GetRacksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /racks][%d] GetRacks default %s", o._statusCode, payload) -} - -func (o *GetRacksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRacksDefault) 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_remote_disks_parameters.go b/v2/client/platform/get_remote_disks_parameters.go deleted file mode 100644 index 05e88f59..00000000 --- a/v2/client/platform/get_remote_disks_parameters.go +++ /dev/null @@ -1,333 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewGetRemoteDisksParams creates a new GetRemoteDisksParams 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 NewGetRemoteDisksParams() *GetRemoteDisksParams { - return &GetRemoteDisksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteDisksParamsWithTimeout creates a new GetRemoteDisksParams object -// with the ability to set a timeout on a request. -func NewGetRemoteDisksParamsWithTimeout(timeout time.Duration) *GetRemoteDisksParams { - return &GetRemoteDisksParams{ - timeout: timeout, - } -} - -// NewGetRemoteDisksParamsWithContext creates a new GetRemoteDisksParams object -// with the ability to set a context for a request. -func NewGetRemoteDisksParamsWithContext(ctx context.Context) *GetRemoteDisksParams { - return &GetRemoteDisksParams{ - Context: ctx, - } -} - -// NewGetRemoteDisksParamsWithHTTPClient creates a new GetRemoteDisksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteDisksParamsWithHTTPClient(client *http.Client) *GetRemoteDisksParams { - return &GetRemoteDisksParams{ - HTTPClient: client, - } -} - -/* -GetRemoteDisksParams contains all the parameters to send to the API endpoint - - for the get remote disks operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteDisksParams struct { - - /* DiskIds. - - Specifies a list of disk ids, only disks having these ids will be returned. - */ - DiskIds []int64 - - /* FileSystem. - - Specified file system name to search. only disks with file system name that partially matches the specified name will be returned. - */ - FileSystem *string - - /* MountPath. - - This field is deprecated. Providing this queryparam will not have any impact. Please use fileSystem query param to filter instead. - */ - MountPath *string - - /* NodeIds. - - Specifies a list of node ids, only disks in these nodes will be returned. - */ - NodeIds []int64 - - /* Tiers. - - Specifies a list of disk tiers, only disks with given tiers will be returned. - */ - Tiers []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteDisksParams) WithDefaults() *GetRemoteDisksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteDisksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote disks params -func (o *GetRemoteDisksParams) WithTimeout(timeout time.Duration) *GetRemoteDisksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote disks params -func (o *GetRemoteDisksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote disks params -func (o *GetRemoteDisksParams) WithContext(ctx context.Context) *GetRemoteDisksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote disks params -func (o *GetRemoteDisksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote disks params -func (o *GetRemoteDisksParams) WithHTTPClient(client *http.Client) *GetRemoteDisksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote disks params -func (o *GetRemoteDisksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDiskIds adds the diskIds to the get remote disks params -func (o *GetRemoteDisksParams) WithDiskIds(diskIds []int64) *GetRemoteDisksParams { - o.SetDiskIds(diskIds) - return o -} - -// SetDiskIds adds the diskIds to the get remote disks params -func (o *GetRemoteDisksParams) SetDiskIds(diskIds []int64) { - o.DiskIds = diskIds -} - -// WithFileSystem adds the fileSystem to the get remote disks params -func (o *GetRemoteDisksParams) WithFileSystem(fileSystem *string) *GetRemoteDisksParams { - o.SetFileSystem(fileSystem) - return o -} - -// SetFileSystem adds the fileSystem to the get remote disks params -func (o *GetRemoteDisksParams) SetFileSystem(fileSystem *string) { - o.FileSystem = fileSystem -} - -// WithMountPath adds the mountPath to the get remote disks params -func (o *GetRemoteDisksParams) WithMountPath(mountPath *string) *GetRemoteDisksParams { - o.SetMountPath(mountPath) - return o -} - -// SetMountPath adds the mountPath to the get remote disks params -func (o *GetRemoteDisksParams) SetMountPath(mountPath *string) { - o.MountPath = mountPath -} - -// WithNodeIds adds the nodeIds to the get remote disks params -func (o *GetRemoteDisksParams) WithNodeIds(nodeIds []int64) *GetRemoteDisksParams { - o.SetNodeIds(nodeIds) - return o -} - -// SetNodeIds adds the nodeIds to the get remote disks params -func (o *GetRemoteDisksParams) SetNodeIds(nodeIds []int64) { - o.NodeIds = nodeIds -} - -// WithTiers adds the tiers to the get remote disks params -func (o *GetRemoteDisksParams) WithTiers(tiers []string) *GetRemoteDisksParams { - o.SetTiers(tiers) - return o -} - -// SetTiers adds the tiers to the get remote disks params -func (o *GetRemoteDisksParams) SetTiers(tiers []string) { - o.Tiers = tiers -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteDisksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DiskIds != nil { - - // binding items for diskIds - joinedDiskIds := o.bindParamDiskIds(reg) - - // query array param diskIds - if err := r.SetQueryParam("diskIds", joinedDiskIds...); err != nil { - return err - } - } - - if o.FileSystem != nil { - - // query param fileSystem - var qrFileSystem string - - if o.FileSystem != nil { - qrFileSystem = *o.FileSystem - } - qFileSystem := qrFileSystem - if qFileSystem != "" { - - if err := r.SetQueryParam("fileSystem", qFileSystem); err != nil { - return err - } - } - } - - if o.MountPath != nil { - - // query param mountPath - var qrMountPath string - - if o.MountPath != nil { - qrMountPath = *o.MountPath - } - qMountPath := qrMountPath - if qMountPath != "" { - - if err := r.SetQueryParam("mountPath", qMountPath); err != nil { - return err - } - } - } - - if o.NodeIds != nil { - - // binding items for nodeIds - joinedNodeIds := o.bindParamNodeIds(reg) - - // query array param nodeIds - if err := r.SetQueryParam("nodeIds", joinedNodeIds...); err != nil { - return err - } - } - - if o.Tiers != nil { - - // binding items for tiers - joinedTiers := o.bindParamTiers(reg) - - // query array param tiers - if err := r.SetQueryParam("tiers", joinedTiers...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRemoteDisks binds the parameter diskIds -func (o *GetRemoteDisksParams) bindParamDiskIds(formats strfmt.Registry) []string { - diskIdsIR := o.DiskIds - - var diskIdsIC []string - for _, diskIdsIIR := range diskIdsIR { // explode []int64 - - diskIdsIIV := swag.FormatInt64(diskIdsIIR) // int64 as string - diskIdsIC = append(diskIdsIC, diskIdsIIV) - } - - // items.CollectionFormat: "" - diskIdsIS := swag.JoinByFormat(diskIdsIC, "") - - return diskIdsIS -} - -// bindParamGetRemoteDisks binds the parameter nodeIds -func (o *GetRemoteDisksParams) bindParamNodeIds(formats strfmt.Registry) []string { - nodeIdsIR := o.NodeIds - - var nodeIdsIC []string - for _, nodeIdsIIR := range nodeIdsIR { // explode []int64 - - nodeIdsIIV := swag.FormatInt64(nodeIdsIIR) // int64 as string - nodeIdsIC = append(nodeIdsIC, nodeIdsIIV) - } - - // items.CollectionFormat: "" - nodeIdsIS := swag.JoinByFormat(nodeIdsIC, "") - - return nodeIdsIS -} - -// bindParamGetRemoteDisks binds the parameter tiers -func (o *GetRemoteDisksParams) bindParamTiers(formats strfmt.Registry) []string { - tiersIR := o.Tiers - - var tiersIC []string - for _, tiersIIR := range tiersIR { // explode []string - - tiersIIV := tiersIIR // string as string - tiersIC = append(tiersIC, tiersIIV) - } - - // items.CollectionFormat: "" - tiersIS := swag.JoinByFormat(tiersIC, "") - - return tiersIS -} diff --git a/v2/client/platform/get_remote_disks_responses.go b/v2/client/platform/get_remote_disks_responses.go deleted file mode 100644 index ba8b032d..00000000 --- a/v2/client/platform/get_remote_disks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRemoteDisksReader is a Reader for the GetRemoteDisks structure. -type GetRemoteDisksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteDisksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteDisksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteDisksDefault(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 - } -} - -// NewGetRemoteDisksOK creates a GetRemoteDisksOK with default headers values -func NewGetRemoteDisksOK() *GetRemoteDisksOK { - return &GetRemoteDisksOK{} -} - -/* -GetRemoteDisksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteDisksOK struct { - Payload *models.RemoteDisks -} - -// IsSuccess returns true when this get remote disks o k response has a 2xx status code -func (o *GetRemoteDisksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote disks o k response has a 3xx status code -func (o *GetRemoteDisksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote disks o k response has a 4xx status code -func (o *GetRemoteDisksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote disks o k response has a 5xx status code -func (o *GetRemoteDisksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote disks o k response a status code equal to that given -func (o *GetRemoteDisksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote disks o k response -func (o *GetRemoteDisksOK) Code() int { - return 200 -} - -func (o *GetRemoteDisksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/remote][%d] getRemoteDisksOK %s", 200, payload) -} - -func (o *GetRemoteDisksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/remote][%d] getRemoteDisksOK %s", 200, payload) -} - -func (o *GetRemoteDisksOK) GetPayload() *models.RemoteDisks { - return o.Payload -} - -func (o *GetRemoteDisksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteDisks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteDisksDefault creates a GetRemoteDisksDefault with default headers values -func NewGetRemoteDisksDefault(code int) *GetRemoteDisksDefault { - return &GetRemoteDisksDefault{ - _statusCode: code, - } -} - -/* -GetRemoteDisksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteDisksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get remote disks default response has a 2xx status code -func (o *GetRemoteDisksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote disks default response has a 3xx status code -func (o *GetRemoteDisksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote disks default response has a 4xx status code -func (o *GetRemoteDisksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote disks default response has a 5xx status code -func (o *GetRemoteDisksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote disks default response a status code equal to that given -func (o *GetRemoteDisksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote disks default response -func (o *GetRemoteDisksDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteDisksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/remote][%d] GetRemoteDisks default %s", o._statusCode, payload) -} - -func (o *GetRemoteDisksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/remote][%d] GetRemoteDisks default %s", o._statusCode, payload) -} - -func (o *GetRemoteDisksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRemoteDisksDefault) 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_smtp_configuration_parameters.go b/v2/client/platform/get_smtp_configuration_parameters.go deleted file mode 100644 index 88453cf6..00000000 --- a/v2/client/platform/get_smtp_configuration_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetSMTPConfigurationParams creates a new GetSMTPConfigurationParams 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 NewGetSMTPConfigurationParams() *GetSMTPConfigurationParams { - return &GetSMTPConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSMTPConfigurationParamsWithTimeout creates a new GetSMTPConfigurationParams object -// with the ability to set a timeout on a request. -func NewGetSMTPConfigurationParamsWithTimeout(timeout time.Duration) *GetSMTPConfigurationParams { - return &GetSMTPConfigurationParams{ - timeout: timeout, - } -} - -// NewGetSMTPConfigurationParamsWithContext creates a new GetSMTPConfigurationParams object -// with the ability to set a context for a request. -func NewGetSMTPConfigurationParamsWithContext(ctx context.Context) *GetSMTPConfigurationParams { - return &GetSMTPConfigurationParams{ - Context: ctx, - } -} - -// NewGetSMTPConfigurationParamsWithHTTPClient creates a new GetSMTPConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSMTPConfigurationParamsWithHTTPClient(client *http.Client) *GetSMTPConfigurationParams { - return &GetSMTPConfigurationParams{ - HTTPClient: client, - } -} - -/* -GetSMTPConfigurationParams contains all the parameters to send to the API endpoint - - for the get SMTP configuration operation. - - Typically these are written to a http.Request. -*/ -type GetSMTPConfigurationParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSMTPConfigurationParams) WithDefaults() *GetSMTPConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSMTPConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) WithTimeout(timeout time.Duration) *GetSMTPConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) WithContext(ctx context.Context) *GetSMTPConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) WithHTTPClient(client *http.Client) *GetSMTPConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get SMTP configuration params -func (o *GetSMTPConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSMTPConfigurationParams) 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_smtp_configuration_responses.go b/v2/client/platform/get_smtp_configuration_responses.go deleted file mode 100644 index d520afff..00000000 --- a/v2/client/platform/get_smtp_configuration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSMTPConfigurationReader is a Reader for the GetSMTPConfiguration structure. -type GetSMTPConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSMTPConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSMTPConfigurationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSMTPConfigurationDefault(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 - } -} - -// NewGetSMTPConfigurationOK creates a GetSMTPConfigurationOK with default headers values -func NewGetSMTPConfigurationOK() *GetSMTPConfigurationOK { - return &GetSMTPConfigurationOK{} -} - -/* -GetSMTPConfigurationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSMTPConfigurationOK struct { - Payload *models.SMTPConfiguration -} - -// IsSuccess returns true when this get Smtp configuration o k response has a 2xx status code -func (o *GetSMTPConfigurationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get Smtp configuration o k response has a 3xx status code -func (o *GetSMTPConfigurationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Smtp configuration o k response has a 4xx status code -func (o *GetSMTPConfigurationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get Smtp configuration o k response has a 5xx status code -func (o *GetSMTPConfigurationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get Smtp configuration o k response a status code equal to that given -func (o *GetSMTPConfigurationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get Smtp configuration o k response -func (o *GetSMTPConfigurationOK) Code() int { - return 200 -} - -func (o *GetSMTPConfigurationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/smtp][%d] getSmtpConfigurationOK %s", 200, payload) -} - -func (o *GetSMTPConfigurationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/smtp][%d] getSmtpConfigurationOK %s", 200, payload) -} - -func (o *GetSMTPConfigurationOK) GetPayload() *models.SMTPConfiguration { - return o.Payload -} - -func (o *GetSMTPConfigurationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SMTPConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSMTPConfigurationDefault creates a GetSMTPConfigurationDefault with default headers values -func NewGetSMTPConfigurationDefault(code int) *GetSMTPConfigurationDefault { - return &GetSMTPConfigurationDefault{ - _statusCode: code, - } -} - -/* -GetSMTPConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSMTPConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get SMTP configuration default response has a 2xx status code -func (o *GetSMTPConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get SMTP configuration default response has a 3xx status code -func (o *GetSMTPConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get SMTP configuration default response has a 4xx status code -func (o *GetSMTPConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get SMTP configuration default response has a 5xx status code -func (o *GetSMTPConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get SMTP configuration default response a status code equal to that given -func (o *GetSMTPConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get SMTP configuration default response -func (o *GetSMTPConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *GetSMTPConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/smtp][%d] GetSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *GetSMTPConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/smtp][%d] GetSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *GetSMTPConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSMTPConfigurationDefault) 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_support_channel_config_parameters.go b/v2/client/platform/get_support_channel_config_parameters.go deleted file mode 100644 index 0ca32be9..00000000 --- a/v2/client/platform/get_support_channel_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewGetSupportChannelConfigParams creates a new GetSupportChannelConfigParams 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 NewGetSupportChannelConfigParams() *GetSupportChannelConfigParams { - return &GetSupportChannelConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSupportChannelConfigParamsWithTimeout creates a new GetSupportChannelConfigParams object -// with the ability to set a timeout on a request. -func NewGetSupportChannelConfigParamsWithTimeout(timeout time.Duration) *GetSupportChannelConfigParams { - return &GetSupportChannelConfigParams{ - timeout: timeout, - } -} - -// NewGetSupportChannelConfigParamsWithContext creates a new GetSupportChannelConfigParams object -// with the ability to set a context for a request. -func NewGetSupportChannelConfigParamsWithContext(ctx context.Context) *GetSupportChannelConfigParams { - return &GetSupportChannelConfigParams{ - Context: ctx, - } -} - -// NewGetSupportChannelConfigParamsWithHTTPClient creates a new GetSupportChannelConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSupportChannelConfigParamsWithHTTPClient(client *http.Client) *GetSupportChannelConfigParams { - return &GetSupportChannelConfigParams{ - HTTPClient: client, - } -} - -/* -GetSupportChannelConfigParams contains all the parameters to send to the API endpoint - - for the get support channel config operation. - - Typically these are written to a http.Request. -*/ -type GetSupportChannelConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get support channel config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportChannelConfigParams) WithDefaults() *GetSupportChannelConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get support channel config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportChannelConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get support channel config params -func (o *GetSupportChannelConfigParams) WithTimeout(timeout time.Duration) *GetSupportChannelConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get support channel config params -func (o *GetSupportChannelConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get support channel config params -func (o *GetSupportChannelConfigParams) WithContext(ctx context.Context) *GetSupportChannelConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get support channel config params -func (o *GetSupportChannelConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get support channel config params -func (o *GetSupportChannelConfigParams) WithHTTPClient(client *http.Client) *GetSupportChannelConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get support channel config params -func (o *GetSupportChannelConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSupportChannelConfigParams) 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_support_channel_config_responses.go b/v2/client/platform/get_support_channel_config_responses.go deleted file mode 100644 index f99a896e..00000000 --- a/v2/client/platform/get_support_channel_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSupportChannelConfigReader is a Reader for the GetSupportChannelConfig structure. -type GetSupportChannelConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSupportChannelConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSupportChannelConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSupportChannelConfigDefault(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 - } -} - -// NewGetSupportChannelConfigOK creates a GetSupportChannelConfigOK with default headers values -func NewGetSupportChannelConfigOK() *GetSupportChannelConfigOK { - return &GetSupportChannelConfigOK{} -} - -/* -GetSupportChannelConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSupportChannelConfigOK struct { - Payload *models.SupportChannelConfig -} - -// IsSuccess returns true when this get support channel config o k response has a 2xx status code -func (o *GetSupportChannelConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get support channel config o k response has a 3xx status code -func (o *GetSupportChannelConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get support channel config o k response has a 4xx status code -func (o *GetSupportChannelConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get support channel config o k response has a 5xx status code -func (o *GetSupportChannelConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get support channel config o k response a status code equal to that given -func (o *GetSupportChannelConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get support channel config o k response -func (o *GetSupportChannelConfigOK) Code() int { - return 200 -} - -func (o *GetSupportChannelConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-channel-config][%d] getSupportChannelConfigOK %s", 200, payload) -} - -func (o *GetSupportChannelConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-channel-config][%d] getSupportChannelConfigOK %s", 200, payload) -} - -func (o *GetSupportChannelConfigOK) GetPayload() *models.SupportChannelConfig { - return o.Payload -} - -func (o *GetSupportChannelConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SupportChannelConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSupportChannelConfigDefault creates a GetSupportChannelConfigDefault with default headers values -func NewGetSupportChannelConfigDefault(code int) *GetSupportChannelConfigDefault { - return &GetSupportChannelConfigDefault{ - _statusCode: code, - } -} - -/* -GetSupportChannelConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSupportChannelConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get support channel config default response has a 2xx status code -func (o *GetSupportChannelConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get support channel config default response has a 3xx status code -func (o *GetSupportChannelConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get support channel config default response has a 4xx status code -func (o *GetSupportChannelConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get support channel config default response has a 5xx status code -func (o *GetSupportChannelConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get support channel config default response a status code equal to that given -func (o *GetSupportChannelConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get support channel config default response -func (o *GetSupportChannelConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetSupportChannelConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-channel-config][%d] GetSupportChannelConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportChannelConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-channel-config][%d] GetSupportChannelConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportChannelConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSupportChannelConfigDefault) 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/identify_node_parameters.go b/v2/client/platform/identify_node_parameters.go deleted file mode 100644 index 010d5f2a..00000000 --- a/v2/client/platform/identify_node_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewIdentifyNodeParams creates a new IdentifyNodeParams 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 NewIdentifyNodeParams() *IdentifyNodeParams { - return &IdentifyNodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewIdentifyNodeParamsWithTimeout creates a new IdentifyNodeParams object -// with the ability to set a timeout on a request. -func NewIdentifyNodeParamsWithTimeout(timeout time.Duration) *IdentifyNodeParams { - return &IdentifyNodeParams{ - timeout: timeout, - } -} - -// NewIdentifyNodeParamsWithContext creates a new IdentifyNodeParams object -// with the ability to set a context for a request. -func NewIdentifyNodeParamsWithContext(ctx context.Context) *IdentifyNodeParams { - return &IdentifyNodeParams{ - Context: ctx, - } -} - -// NewIdentifyNodeParamsWithHTTPClient creates a new IdentifyNodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewIdentifyNodeParamsWithHTTPClient(client *http.Client) *IdentifyNodeParams { - return &IdentifyNodeParams{ - HTTPClient: client, - } -} - -/* -IdentifyNodeParams contains all the parameters to send to the API endpoint - - for the identify node operation. - - Typically these are written to a http.Request. -*/ -type IdentifyNodeParams struct { - - /* Body. - - Specifies the parameter to identify node. - */ - Body *models.NodeIdentifyParams - - /* ID. - - Specifies id of node to identify. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the identify node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdentifyNodeParams) WithDefaults() *IdentifyNodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the identify node params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *IdentifyNodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the identify node params -func (o *IdentifyNodeParams) WithTimeout(timeout time.Duration) *IdentifyNodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the identify node params -func (o *IdentifyNodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the identify node params -func (o *IdentifyNodeParams) WithContext(ctx context.Context) *IdentifyNodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the identify node params -func (o *IdentifyNodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the identify node params -func (o *IdentifyNodeParams) WithHTTPClient(client *http.Client) *IdentifyNodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the identify node params -func (o *IdentifyNodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the identify node params -func (o *IdentifyNodeParams) WithBody(body *models.NodeIdentifyParams) *IdentifyNodeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the identify node params -func (o *IdentifyNodeParams) SetBody(body *models.NodeIdentifyParams) { - o.Body = body -} - -// WithID adds the id to the identify node params -func (o *IdentifyNodeParams) WithID(id int64) *IdentifyNodeParams { - o.SetID(id) - return o -} - -// SetID adds the id to the identify node params -func (o *IdentifyNodeParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *IdentifyNodeParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/identify_node_responses.go b/v2/client/platform/identify_node_responses.go deleted file mode 100644 index 409c5a2b..00000000 --- a/v2/client/platform/identify_node_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// IdentifyNodeReader is a Reader for the IdentifyNode structure. -type IdentifyNodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *IdentifyNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewIdentifyNodeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewIdentifyNodeDefault(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 - } -} - -// NewIdentifyNodeOK creates a IdentifyNodeOK with default headers values -func NewIdentifyNodeOK() *IdentifyNodeOK { - return &IdentifyNodeOK{} -} - -/* -IdentifyNodeOK describes a response with status code 200, with default header values. - -Success -*/ -type IdentifyNodeOK struct { - Payload *models.NodeIdentifyParams -} - -// IsSuccess returns true when this identify node o k response has a 2xx status code -func (o *IdentifyNodeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this identify node o k response has a 3xx status code -func (o *IdentifyNodeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this identify node o k response has a 4xx status code -func (o *IdentifyNodeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this identify node o k response has a 5xx status code -func (o *IdentifyNodeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this identify node o k response a status code equal to that given -func (o *IdentifyNodeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the identify node o k response -func (o *IdentifyNodeOK) Code() int { - return 200 -} - -func (o *IdentifyNodeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/identify][%d] identifyNodeOK %s", 200, payload) -} - -func (o *IdentifyNodeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/identify][%d] identifyNodeOK %s", 200, payload) -} - -func (o *IdentifyNodeOK) GetPayload() *models.NodeIdentifyParams { - return o.Payload -} - -func (o *IdentifyNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeIdentifyParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewIdentifyNodeDefault creates a IdentifyNodeDefault with default headers values -func NewIdentifyNodeDefault(code int) *IdentifyNodeDefault { - return &IdentifyNodeDefault{ - _statusCode: code, - } -} - -/* -IdentifyNodeDefault describes a response with status code -1, with default header values. - -Error -*/ -type IdentifyNodeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this identify node default response has a 2xx status code -func (o *IdentifyNodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this identify node default response has a 3xx status code -func (o *IdentifyNodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this identify node default response has a 4xx status code -func (o *IdentifyNodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this identify node default response has a 5xx status code -func (o *IdentifyNodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this identify node default response a status code equal to that given -func (o *IdentifyNodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the identify node default response -func (o *IdentifyNodeDefault) Code() int { - return o._statusCode -} - -func (o *IdentifyNodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/identify][%d] Identify node default %s", o._statusCode, payload) -} - -func (o *IdentifyNodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/identify][%d] Identify node default %s", o._statusCode, payload) -} - -func (o *IdentifyNodeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *IdentifyNodeDefault) 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/import_crl_file_parameters.go b/v2/client/platform/import_crl_file_parameters.go deleted file mode 100644 index f8663766..00000000 --- a/v2/client/platform/import_crl_file_parameters.go +++ /dev/null @@ -1,170 +0,0 @@ -// 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" -) - -// NewImportCrlFileParams creates a new ImportCrlFileParams 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 NewImportCrlFileParams() *ImportCrlFileParams { - return &ImportCrlFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewImportCrlFileParamsWithTimeout creates a new ImportCrlFileParams object -// with the ability to set a timeout on a request. -func NewImportCrlFileParamsWithTimeout(timeout time.Duration) *ImportCrlFileParams { - return &ImportCrlFileParams{ - timeout: timeout, - } -} - -// NewImportCrlFileParamsWithContext creates a new ImportCrlFileParams object -// with the ability to set a context for a request. -func NewImportCrlFileParamsWithContext(ctx context.Context) *ImportCrlFileParams { - return &ImportCrlFileParams{ - Context: ctx, - } -} - -// NewImportCrlFileParamsWithHTTPClient creates a new ImportCrlFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewImportCrlFileParamsWithHTTPClient(client *http.Client) *ImportCrlFileParams { - return &ImportCrlFileParams{ - HTTPClient: client, - } -} - -/* -ImportCrlFileParams contains all the parameters to send to the API endpoint - - for the import crl file operation. - - Typically these are written to a http.Request. -*/ -type ImportCrlFileParams struct { - - // Crlfile. - Crlfile runtime.NamedReadCloser - - // FileName. - FileName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the import crl file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportCrlFileParams) WithDefaults() *ImportCrlFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the import crl file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportCrlFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the import crl file params -func (o *ImportCrlFileParams) WithTimeout(timeout time.Duration) *ImportCrlFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the import crl file params -func (o *ImportCrlFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the import crl file params -func (o *ImportCrlFileParams) WithContext(ctx context.Context) *ImportCrlFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the import crl file params -func (o *ImportCrlFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the import crl file params -func (o *ImportCrlFileParams) WithHTTPClient(client *http.Client) *ImportCrlFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the import crl file params -func (o *ImportCrlFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCrlfile adds the crlfile to the import crl file params -func (o *ImportCrlFileParams) WithCrlfile(crlfile runtime.NamedReadCloser) *ImportCrlFileParams { - o.SetCrlfile(crlfile) - return o -} - -// SetCrlfile adds the crlfile to the import crl file params -func (o *ImportCrlFileParams) SetCrlfile(crlfile runtime.NamedReadCloser) { - o.Crlfile = crlfile -} - -// WithFileName adds the fileName to the import crl file params -func (o *ImportCrlFileParams) WithFileName(fileName string) *ImportCrlFileParams { - o.SetFileName(fileName) - return o -} - -// SetFileName adds the fileName to the import crl file params -func (o *ImportCrlFileParams) SetFileName(fileName string) { - o.FileName = fileName -} - -// WriteToRequest writes these params to a swagger request -func (o *ImportCrlFileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - // form file param crlfile - if err := r.SetFileParam("crlfile", o.Crlfile); err != nil { - return err - } - - // form param fileName - frFileName := o.FileName - fFileName := frFileName - if fFileName != "" { - if err := r.SetFormParam("fileName", fFileName); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/import_crl_file_responses.go b/v2/client/platform/import_crl_file_responses.go deleted file mode 100644 index af1604e7..00000000 --- a/v2/client/platform/import_crl_file_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ImportCrlFileReader is a Reader for the ImportCrlFile structure. -type ImportCrlFileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ImportCrlFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewImportCrlFileNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewImportCrlFileDefault(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 - } -} - -// NewImportCrlFileNoContent creates a ImportCrlFileNoContent with default headers values -func NewImportCrlFileNoContent() *ImportCrlFileNoContent { - return &ImportCrlFileNoContent{} -} - -/* -ImportCrlFileNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ImportCrlFileNoContent struct { -} - -// IsSuccess returns true when this import crl file no content response has a 2xx status code -func (o *ImportCrlFileNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this import crl file no content response has a 3xx status code -func (o *ImportCrlFileNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this import crl file no content response has a 4xx status code -func (o *ImportCrlFileNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this import crl file no content response has a 5xx status code -func (o *ImportCrlFileNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this import crl file no content response a status code equal to that given -func (o *ImportCrlFileNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the import crl file no content response -func (o *ImportCrlFileNoContent) Code() int { - return 204 -} - -func (o *ImportCrlFileNoContent) Error() string { - return fmt.Sprintf("[PUT /clusters/import-crl-file][%d] importCrlFileNoContent", 204) -} - -func (o *ImportCrlFileNoContent) String() string { - return fmt.Sprintf("[PUT /clusters/import-crl-file][%d] importCrlFileNoContent", 204) -} - -func (o *ImportCrlFileNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewImportCrlFileDefault creates a ImportCrlFileDefault with default headers values -func NewImportCrlFileDefault(code int) *ImportCrlFileDefault { - return &ImportCrlFileDefault{ - _statusCode: code, - } -} - -/* -ImportCrlFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type ImportCrlFileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this import crl file default response has a 2xx status code -func (o *ImportCrlFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this import crl file default response has a 3xx status code -func (o *ImportCrlFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this import crl file default response has a 4xx status code -func (o *ImportCrlFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this import crl file default response has a 5xx status code -func (o *ImportCrlFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this import crl file default response a status code equal to that given -func (o *ImportCrlFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the import crl file default response -func (o *ImportCrlFileDefault) Code() int { - return o._statusCode -} - -func (o *ImportCrlFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/import-crl-file][%d] ImportCrlFile default %s", o._statusCode, payload) -} - -func (o *ImportCrlFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/import-crl-file][%d] ImportCrlFile default %s", o._statusCode, payload) -} - -func (o *ImportCrlFileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ImportCrlFileDefault) 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/list_disks_parameters.go b/v2/client/platform/list_disks_parameters.go deleted file mode 100644 index c4c2ff5f..00000000 --- a/v2/client/platform/list_disks_parameters.go +++ /dev/null @@ -1,166 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewListDisksParams creates a new ListDisksParams 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 NewListDisksParams() *ListDisksParams { - return &ListDisksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListDisksParamsWithTimeout creates a new ListDisksParams object -// with the ability to set a timeout on a request. -func NewListDisksParamsWithTimeout(timeout time.Duration) *ListDisksParams { - return &ListDisksParams{ - timeout: timeout, - } -} - -// NewListDisksParamsWithContext creates a new ListDisksParams object -// with the ability to set a context for a request. -func NewListDisksParamsWithContext(ctx context.Context) *ListDisksParams { - return &ListDisksParams{ - Context: ctx, - } -} - -// NewListDisksParamsWithHTTPClient creates a new ListDisksParams object -// with the ability to set a custom HTTPClient for a request. -func NewListDisksParamsWithHTTPClient(client *http.Client) *ListDisksParams { - return &ListDisksParams{ - HTTPClient: client, - } -} - -/* -ListDisksParams contains all the parameters to send to the API endpoint - - for the list disks operation. - - Typically these are written to a http.Request. -*/ -type ListDisksParams struct { - - /* NodeID. - - Specifies node id of the node to get list of disks - - Format: int64 - */ - NodeID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDisksParams) WithDefaults() *ListDisksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list disks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDisksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list disks params -func (o *ListDisksParams) WithTimeout(timeout time.Duration) *ListDisksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list disks params -func (o *ListDisksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list disks params -func (o *ListDisksParams) WithContext(ctx context.Context) *ListDisksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list disks params -func (o *ListDisksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list disks params -func (o *ListDisksParams) WithHTTPClient(client *http.Client) *ListDisksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list disks params -func (o *ListDisksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithNodeID adds the nodeID to the list disks params -func (o *ListDisksParams) WithNodeID(nodeID *int64) *ListDisksParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the list disks params -func (o *ListDisksParams) SetNodeID(nodeID *int64) { - o.NodeID = nodeID -} - -// WriteToRequest writes these params to a swagger request -func (o *ListDisksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.NodeID != nil { - - // query param nodeId - var qrNodeID int64 - - if o.NodeID != nil { - qrNodeID = *o.NodeID - } - qNodeID := swag.FormatInt64(qrNodeID) - if qNodeID != "" { - - if err := r.SetQueryParam("nodeId", qNodeID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/list_disks_responses.go b/v2/client/platform/list_disks_responses.go deleted file mode 100644 index 05c11d93..00000000 --- a/v2/client/platform/list_disks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListDisksReader is a Reader for the ListDisks structure. -type ListDisksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListDisksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListDisksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListDisksDefault(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 - } -} - -// NewListDisksOK creates a ListDisksOK with default headers values -func NewListDisksOK() *ListDisksOK { - return &ListDisksOK{} -} - -/* -ListDisksOK describes a response with status code 200, with default header values. - -Success -*/ -type ListDisksOK struct { - Payload *models.DisksList -} - -// IsSuccess returns true when this list disks o k response has a 2xx status code -func (o *ListDisksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list disks o k response has a 3xx status code -func (o *ListDisksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list disks o k response has a 4xx status code -func (o *ListDisksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list disks o k response has a 5xx status code -func (o *ListDisksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list disks o k response a status code equal to that given -func (o *ListDisksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list disks o k response -func (o *ListDisksOK) Code() int { - return 200 -} - -func (o *ListDisksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/local][%d] listDisksOK %s", 200, payload) -} - -func (o *ListDisksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/local][%d] listDisksOK %s", 200, payload) -} - -func (o *ListDisksOK) GetPayload() *models.DisksList { - return o.Payload -} - -func (o *ListDisksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DisksList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListDisksDefault creates a ListDisksDefault with default headers values -func NewListDisksDefault(code int) *ListDisksDefault { - return &ListDisksDefault{ - _statusCode: code, - } -} - -/* -ListDisksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListDisksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list disks default response has a 2xx status code -func (o *ListDisksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list disks default response has a 3xx status code -func (o *ListDisksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list disks default response has a 4xx status code -func (o *ListDisksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list disks default response has a 5xx status code -func (o *ListDisksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list disks default response a status code equal to that given -func (o *ListDisksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list disks default response -func (o *ListDisksDefault) Code() int { - return o._statusCode -} - -func (o *ListDisksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/local][%d] ListDisks default %s", o._statusCode, payload) -} - -func (o *ListDisksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /disks/local][%d] ListDisks default %s", o._statusCode, payload) -} - -func (o *ListDisksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListDisksDefault) 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/list_feature_flag_parameters.go b/v2/client/platform/list_feature_flag_parameters.go deleted file mode 100644 index 330a91e3..00000000 --- a/v2/client/platform/list_feature_flag_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewListFeatureFlagParams creates a new ListFeatureFlagParams 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 NewListFeatureFlagParams() *ListFeatureFlagParams { - return &ListFeatureFlagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListFeatureFlagParamsWithTimeout creates a new ListFeatureFlagParams object -// with the ability to set a timeout on a request. -func NewListFeatureFlagParamsWithTimeout(timeout time.Duration) *ListFeatureFlagParams { - return &ListFeatureFlagParams{ - timeout: timeout, - } -} - -// NewListFeatureFlagParamsWithContext creates a new ListFeatureFlagParams object -// with the ability to set a context for a request. -func NewListFeatureFlagParamsWithContext(ctx context.Context) *ListFeatureFlagParams { - return &ListFeatureFlagParams{ - Context: ctx, - } -} - -// NewListFeatureFlagParamsWithHTTPClient creates a new ListFeatureFlagParams object -// with the ability to set a custom HTTPClient for a request. -func NewListFeatureFlagParamsWithHTTPClient(client *http.Client) *ListFeatureFlagParams { - return &ListFeatureFlagParams{ - HTTPClient: client, - } -} - -/* -ListFeatureFlagParams contains all the parameters to send to the API endpoint - - for the list feature flag operation. - - Typically these are written to a http.Request. -*/ -type ListFeatureFlagParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list feature flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFeatureFlagParams) WithDefaults() *ListFeatureFlagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list feature flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFeatureFlagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list feature flag params -func (o *ListFeatureFlagParams) WithTimeout(timeout time.Duration) *ListFeatureFlagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list feature flag params -func (o *ListFeatureFlagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list feature flag params -func (o *ListFeatureFlagParams) WithContext(ctx context.Context) *ListFeatureFlagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list feature flag params -func (o *ListFeatureFlagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list feature flag params -func (o *ListFeatureFlagParams) WithHTTPClient(client *http.Client) *ListFeatureFlagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list feature flag params -func (o *ListFeatureFlagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListFeatureFlagParams) 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/list_feature_flag_responses.go b/v2/client/platform/list_feature_flag_responses.go deleted file mode 100644 index b3de390d..00000000 --- a/v2/client/platform/list_feature_flag_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListFeatureFlagReader is a Reader for the ListFeatureFlag structure. -type ListFeatureFlagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListFeatureFlagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListFeatureFlagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListFeatureFlagDefault(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 - } -} - -// NewListFeatureFlagOK creates a ListFeatureFlagOK with default headers values -func NewListFeatureFlagOK() *ListFeatureFlagOK { - return &ListFeatureFlagOK{} -} - -/* -ListFeatureFlagOK describes a response with status code 200, with default header values. - -Success -*/ -type ListFeatureFlagOK struct { - Payload models.FeatureFlagList -} - -// IsSuccess returns true when this list feature flag o k response has a 2xx status code -func (o *ListFeatureFlagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list feature flag o k response has a 3xx status code -func (o *ListFeatureFlagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list feature flag o k response has a 4xx status code -func (o *ListFeatureFlagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list feature flag o k response has a 5xx status code -func (o *ListFeatureFlagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list feature flag o k response a status code equal to that given -func (o *ListFeatureFlagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list feature flag o k response -func (o *ListFeatureFlagOK) Code() int { - return 200 -} - -func (o *ListFeatureFlagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/feature-flag][%d] listFeatureFlagOK %s", 200, payload) -} - -func (o *ListFeatureFlagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/feature-flag][%d] listFeatureFlagOK %s", 200, payload) -} - -func (o *ListFeatureFlagOK) GetPayload() models.FeatureFlagList { - return o.Payload -} - -func (o *ListFeatureFlagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListFeatureFlagDefault creates a ListFeatureFlagDefault with default headers values -func NewListFeatureFlagDefault(code int) *ListFeatureFlagDefault { - return &ListFeatureFlagDefault{ - _statusCode: code, - } -} - -/* -ListFeatureFlagDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListFeatureFlagDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list feature flag default response has a 2xx status code -func (o *ListFeatureFlagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list feature flag default response has a 3xx status code -func (o *ListFeatureFlagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list feature flag default response has a 4xx status code -func (o *ListFeatureFlagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list feature flag default response has a 5xx status code -func (o *ListFeatureFlagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list feature flag default response a status code equal to that given -func (o *ListFeatureFlagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list feature flag default response -func (o *ListFeatureFlagDefault) Code() int { - return o._statusCode -} - -func (o *ListFeatureFlagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/feature-flag][%d] ListFeatureFlag default %s", o._statusCode, payload) -} - -func (o *ListFeatureFlagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/feature-flag][%d] ListFeatureFlag default %s", o._statusCode, payload) -} - -func (o *ListFeatureFlagDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListFeatureFlagDefault) 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/list_free_nodes_parameters.go b/v2/client/platform/list_free_nodes_parameters.go deleted file mode 100644 index 6fb6fa97..00000000 --- a/v2/client/platform/list_free_nodes_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewListFreeNodesParams creates a new ListFreeNodesParams 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 NewListFreeNodesParams() *ListFreeNodesParams { - return &ListFreeNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListFreeNodesParamsWithTimeout creates a new ListFreeNodesParams object -// with the ability to set a timeout on a request. -func NewListFreeNodesParamsWithTimeout(timeout time.Duration) *ListFreeNodesParams { - return &ListFreeNodesParams{ - timeout: timeout, - } -} - -// NewListFreeNodesParamsWithContext creates a new ListFreeNodesParams object -// with the ability to set a context for a request. -func NewListFreeNodesParamsWithContext(ctx context.Context) *ListFreeNodesParams { - return &ListFreeNodesParams{ - Context: ctx, - } -} - -// NewListFreeNodesParamsWithHTTPClient creates a new ListFreeNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListFreeNodesParamsWithHTTPClient(client *http.Client) *ListFreeNodesParams { - return &ListFreeNodesParams{ - HTTPClient: client, - } -} - -/* -ListFreeNodesParams contains all the parameters to send to the API endpoint - - for the list free nodes operation. - - Typically these are written to a http.Request. -*/ -type ListFreeNodesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list free nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFreeNodesParams) WithDefaults() *ListFreeNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list free nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListFreeNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list free nodes params -func (o *ListFreeNodesParams) WithTimeout(timeout time.Duration) *ListFreeNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list free nodes params -func (o *ListFreeNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list free nodes params -func (o *ListFreeNodesParams) WithContext(ctx context.Context) *ListFreeNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list free nodes params -func (o *ListFreeNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list free nodes params -func (o *ListFreeNodesParams) WithHTTPClient(client *http.Client) *ListFreeNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list free nodes params -func (o *ListFreeNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListFreeNodesParams) 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/list_free_nodes_responses.go b/v2/client/platform/list_free_nodes_responses.go deleted file mode 100644 index 721720c8..00000000 --- a/v2/client/platform/list_free_nodes_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListFreeNodesReader is a Reader for the ListFreeNodes structure. -type ListFreeNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListFreeNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListFreeNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListFreeNodesDefault(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 - } -} - -// NewListFreeNodesOK creates a ListFreeNodesOK with default headers values -func NewListFreeNodesOK() *ListFreeNodesOK { - return &ListFreeNodesOK{} -} - -/* -ListFreeNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListFreeNodesOK struct { - Payload *models.FreeNodes -} - -// IsSuccess returns true when this list free nodes o k response has a 2xx status code -func (o *ListFreeNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list free nodes o k response has a 3xx status code -func (o *ListFreeNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list free nodes o k response has a 4xx status code -func (o *ListFreeNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list free nodes o k response has a 5xx status code -func (o *ListFreeNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list free nodes o k response a status code equal to that given -func (o *ListFreeNodesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list free nodes o k response -func (o *ListFreeNodesOK) Code() int { - return 200 -} - -func (o *ListFreeNodesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes/free][%d] listFreeNodesOK %s", 200, payload) -} - -func (o *ListFreeNodesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes/free][%d] listFreeNodesOK %s", 200, payload) -} - -func (o *ListFreeNodesOK) GetPayload() *models.FreeNodes { - return o.Payload -} - -func (o *ListFreeNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FreeNodes) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListFreeNodesDefault creates a ListFreeNodesDefault with default headers values -func NewListFreeNodesDefault(code int) *ListFreeNodesDefault { - return &ListFreeNodesDefault{ - _statusCode: code, - } -} - -/* -ListFreeNodesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListFreeNodesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list free nodes default response has a 2xx status code -func (o *ListFreeNodesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list free nodes default response has a 3xx status code -func (o *ListFreeNodesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list free nodes default response has a 4xx status code -func (o *ListFreeNodesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list free nodes default response has a 5xx status code -func (o *ListFreeNodesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list free nodes default response a status code equal to that given -func (o *ListFreeNodesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list free nodes default response -func (o *ListFreeNodesDefault) Code() int { - return o._statusCode -} - -func (o *ListFreeNodesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes/free][%d] ListFreeNodes default %s", o._statusCode, payload) -} - -func (o *ListFreeNodesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/nodes/free][%d] ListFreeNodes default %s", o._statusCode, payload) -} - -func (o *ListFreeNodesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListFreeNodesDefault) 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/list_hosts_parameters.go b/v2/client/platform/list_hosts_parameters.go deleted file mode 100644 index 9f837b49..00000000 --- a/v2/client/platform/list_hosts_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// 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" -) - -// NewListHostsParams creates a new ListHostsParams 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 NewListHostsParams() *ListHostsParams { - return &ListHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListHostsParamsWithTimeout creates a new ListHostsParams object -// with the ability to set a timeout on a request. -func NewListHostsParamsWithTimeout(timeout time.Duration) *ListHostsParams { - return &ListHostsParams{ - timeout: timeout, - } -} - -// NewListHostsParamsWithContext creates a new ListHostsParams object -// with the ability to set a context for a request. -func NewListHostsParamsWithContext(ctx context.Context) *ListHostsParams { - return &ListHostsParams{ - Context: ctx, - } -} - -// NewListHostsParamsWithHTTPClient creates a new ListHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListHostsParamsWithHTTPClient(client *http.Client) *ListHostsParams { - return &ListHostsParams{ - HTTPClient: client, - } -} - -/* -ListHostsParams contains all the parameters to send to the API endpoint - - for the list hosts operation. - - Typically these are written to a http.Request. -*/ -type ListHostsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListHostsParams) WithDefaults() *ListHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list hosts params -func (o *ListHostsParams) WithTimeout(timeout time.Duration) *ListHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list hosts params -func (o *ListHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list hosts params -func (o *ListHostsParams) WithContext(ctx context.Context) *ListHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list hosts params -func (o *ListHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list hosts params -func (o *ListHostsParams) WithHTTPClient(client *http.Client) *ListHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list hosts params -func (o *ListHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ListHostsParams) 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/list_hosts_responses.go b/v2/client/platform/list_hosts_responses.go deleted file mode 100644 index 75c9627b..00000000 --- a/v2/client/platform/list_hosts_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListHostsReader is a Reader for the ListHosts structure. -type ListHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListHostsDefault(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 - } -} - -// NewListHostsOK creates a ListHostsOK with default headers values -func NewListHostsOK() *ListHostsOK { - return &ListHostsOK{} -} - -/* -ListHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListHostsOK struct { - Payload *models.HostMappings -} - -// IsSuccess returns true when this list hosts o k response has a 2xx status code -func (o *ListHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list hosts o k response has a 3xx status code -func (o *ListHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list hosts o k response has a 4xx status code -func (o *ListHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list hosts o k response has a 5xx status code -func (o *ListHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list hosts o k response a status code equal to that given -func (o *ListHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list hosts o k response -func (o *ListHostsOK) Code() int { - return 200 -} - -func (o *ListHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/host-mappings][%d] listHostsOK %s", 200, payload) -} - -func (o *ListHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/host-mappings][%d] listHostsOK %s", 200, payload) -} - -func (o *ListHostsOK) GetPayload() *models.HostMappings { - return o.Payload -} - -func (o *ListHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostMappings) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListHostsDefault creates a ListHostsDefault with default headers values -func NewListHostsDefault(code int) *ListHostsDefault { - return &ListHostsDefault{ - _statusCode: code, - } -} - -/* -ListHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListHostsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list hosts default response has a 2xx status code -func (o *ListHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list hosts default response has a 3xx status code -func (o *ListHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list hosts default response has a 4xx status code -func (o *ListHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list hosts default response has a 5xx status code -func (o *ListHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list hosts default response a status code equal to that given -func (o *ListHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list hosts default response -func (o *ListHostsDefault) Code() int { - return o._statusCode -} - -func (o *ListHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/host-mappings][%d] ListHosts default %s", o._statusCode, payload) -} - -func (o *ListHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/host-mappings][%d] ListHosts default %s", o._statusCode, payload) -} - -func (o *ListHostsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListHostsDefault) 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/mark_baseos_upgrade_parameters.go b/v2/client/platform/mark_baseos_upgrade_parameters.go deleted file mode 100644 index b9b71660..00000000 --- a/v2/client/platform/mark_baseos_upgrade_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewMarkBaseosUpgradeParams creates a new MarkBaseosUpgradeParams 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 NewMarkBaseosUpgradeParams() *MarkBaseosUpgradeParams { - return &MarkBaseosUpgradeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewMarkBaseosUpgradeParamsWithTimeout creates a new MarkBaseosUpgradeParams object -// with the ability to set a timeout on a request. -func NewMarkBaseosUpgradeParamsWithTimeout(timeout time.Duration) *MarkBaseosUpgradeParams { - return &MarkBaseosUpgradeParams{ - timeout: timeout, - } -} - -// NewMarkBaseosUpgradeParamsWithContext creates a new MarkBaseosUpgradeParams object -// with the ability to set a context for a request. -func NewMarkBaseosUpgradeParamsWithContext(ctx context.Context) *MarkBaseosUpgradeParams { - return &MarkBaseosUpgradeParams{ - Context: ctx, - } -} - -// NewMarkBaseosUpgradeParamsWithHTTPClient creates a new MarkBaseosUpgradeParams object -// with the ability to set a custom HTTPClient for a request. -func NewMarkBaseosUpgradeParamsWithHTTPClient(client *http.Client) *MarkBaseosUpgradeParams { - return &MarkBaseosUpgradeParams{ - HTTPClient: client, - } -} - -/* -MarkBaseosUpgradeParams contains all the parameters to send to the API endpoint - - for the mark baseos upgrade operation. - - Typically these are written to a http.Request. -*/ -type MarkBaseosUpgradeParams struct { - - /* Body. - - Param to whether set/clear BaseOS uprgade operation. - */ - Body *models.MarkBaseosUpgradeInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the mark baseos upgrade params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkBaseosUpgradeParams) WithDefaults() *MarkBaseosUpgradeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the mark baseos upgrade params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkBaseosUpgradeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) WithTimeout(timeout time.Duration) *MarkBaseosUpgradeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) WithContext(ctx context.Context) *MarkBaseosUpgradeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) WithHTTPClient(client *http.Client) *MarkBaseosUpgradeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) WithBody(body *models.MarkBaseosUpgradeInfo) *MarkBaseosUpgradeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the mark baseos upgrade params -func (o *MarkBaseosUpgradeParams) SetBody(body *models.MarkBaseosUpgradeInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *MarkBaseosUpgradeParams) 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/mark_baseos_upgrade_responses.go b/v2/client/platform/mark_baseos_upgrade_responses.go deleted file mode 100644 index eaf97ae4..00000000 --- a/v2/client/platform/mark_baseos_upgrade_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// MarkBaseosUpgradeReader is a Reader for the MarkBaseosUpgrade structure. -type MarkBaseosUpgradeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *MarkBaseosUpgradeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewMarkBaseosUpgradeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewMarkBaseosUpgradeDefault(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 - } -} - -// NewMarkBaseosUpgradeOK creates a MarkBaseosUpgradeOK with default headers values -func NewMarkBaseosUpgradeOK() *MarkBaseosUpgradeOK { - return &MarkBaseosUpgradeOK{} -} - -/* -MarkBaseosUpgradeOK describes a response with status code 200, with default header values. - -Success -*/ -type MarkBaseosUpgradeOK struct { - Payload *models.MarkBaseosUpgradeInfo -} - -// IsSuccess returns true when this mark baseos upgrade o k response has a 2xx status code -func (o *MarkBaseosUpgradeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this mark baseos upgrade o k response has a 3xx status code -func (o *MarkBaseosUpgradeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this mark baseos upgrade o k response has a 4xx status code -func (o *MarkBaseosUpgradeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this mark baseos upgrade o k response has a 5xx status code -func (o *MarkBaseosUpgradeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this mark baseos upgrade o k response a status code equal to that given -func (o *MarkBaseosUpgradeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the mark baseos upgrade o k response -func (o *MarkBaseosUpgradeOK) Code() int { - return 200 -} - -func (o *MarkBaseosUpgradeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/baseos-upgrade][%d] markBaseosUpgradeOK %s", 200, payload) -} - -func (o *MarkBaseosUpgradeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/baseos-upgrade][%d] markBaseosUpgradeOK %s", 200, payload) -} - -func (o *MarkBaseosUpgradeOK) GetPayload() *models.MarkBaseosUpgradeInfo { - return o.Payload -} - -func (o *MarkBaseosUpgradeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MarkBaseosUpgradeInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewMarkBaseosUpgradeDefault creates a MarkBaseosUpgradeDefault with default headers values -func NewMarkBaseosUpgradeDefault(code int) *MarkBaseosUpgradeDefault { - return &MarkBaseosUpgradeDefault{ - _statusCode: code, - } -} - -/* -MarkBaseosUpgradeDefault describes a response with status code -1, with default header values. - -Error -*/ -type MarkBaseosUpgradeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this mark baseos upgrade default response has a 2xx status code -func (o *MarkBaseosUpgradeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this mark baseos upgrade default response has a 3xx status code -func (o *MarkBaseosUpgradeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this mark baseos upgrade default response has a 4xx status code -func (o *MarkBaseosUpgradeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this mark baseos upgrade default response has a 5xx status code -func (o *MarkBaseosUpgradeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this mark baseos upgrade default response a status code equal to that given -func (o *MarkBaseosUpgradeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the mark baseos upgrade default response -func (o *MarkBaseosUpgradeDefault) Code() int { - return o._statusCode -} - -func (o *MarkBaseosUpgradeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/baseos-upgrade][%d] MarkBaseosUpgrade default %s", o._statusCode, payload) -} - -func (o *MarkBaseosUpgradeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/baseos-upgrade][%d] MarkBaseosUpgrade default %s", o._statusCode, payload) -} - -func (o *MarkBaseosUpgradeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *MarkBaseosUpgradeDefault) 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/mark_disk_removal_parameters.go b/v2/client/platform/mark_disk_removal_parameters.go deleted file mode 100644 index 40136cf5..00000000 --- a/v2/client/platform/mark_disk_removal_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewMarkDiskRemovalParams creates a new MarkDiskRemovalParams 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 NewMarkDiskRemovalParams() *MarkDiskRemovalParams { - return &MarkDiskRemovalParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewMarkDiskRemovalParamsWithTimeout creates a new MarkDiskRemovalParams object -// with the ability to set a timeout on a request. -func NewMarkDiskRemovalParamsWithTimeout(timeout time.Duration) *MarkDiskRemovalParams { - return &MarkDiskRemovalParams{ - timeout: timeout, - } -} - -// NewMarkDiskRemovalParamsWithContext creates a new MarkDiskRemovalParams object -// with the ability to set a context for a request. -func NewMarkDiskRemovalParamsWithContext(ctx context.Context) *MarkDiskRemovalParams { - return &MarkDiskRemovalParams{ - Context: ctx, - } -} - -// NewMarkDiskRemovalParamsWithHTTPClient creates a new MarkDiskRemovalParams object -// with the ability to set a custom HTTPClient for a request. -func NewMarkDiskRemovalParamsWithHTTPClient(client *http.Client) *MarkDiskRemovalParams { - return &MarkDiskRemovalParams{ - HTTPClient: client, - } -} - -/* -MarkDiskRemovalParams contains all the parameters to send to the API endpoint - - for the mark disk removal operation. - - Typically these are written to a http.Request. -*/ -type MarkDiskRemovalParams struct { - - /* Body. - - Specifies parameters to mark/cancel disk removal. - */ - Body *models.DiskRemovalParams - - /* ID. - - Specifies unique id of the disk to mark for removal. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the mark disk removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkDiskRemovalParams) WithDefaults() *MarkDiskRemovalParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the mark disk removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkDiskRemovalParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the mark disk removal params -func (o *MarkDiskRemovalParams) WithTimeout(timeout time.Duration) *MarkDiskRemovalParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the mark disk removal params -func (o *MarkDiskRemovalParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the mark disk removal params -func (o *MarkDiskRemovalParams) WithContext(ctx context.Context) *MarkDiskRemovalParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the mark disk removal params -func (o *MarkDiskRemovalParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the mark disk removal params -func (o *MarkDiskRemovalParams) WithHTTPClient(client *http.Client) *MarkDiskRemovalParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the mark disk removal params -func (o *MarkDiskRemovalParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the mark disk removal params -func (o *MarkDiskRemovalParams) WithBody(body *models.DiskRemovalParams) *MarkDiskRemovalParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the mark disk removal params -func (o *MarkDiskRemovalParams) SetBody(body *models.DiskRemovalParams) { - o.Body = body -} - -// WithID adds the id to the mark disk removal params -func (o *MarkDiskRemovalParams) WithID(id int64) *MarkDiskRemovalParams { - o.SetID(id) - return o -} - -// SetID adds the id to the mark disk removal params -func (o *MarkDiskRemovalParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *MarkDiskRemovalParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/mark_disk_removal_responses.go b/v2/client/platform/mark_disk_removal_responses.go deleted file mode 100644 index 2454d721..00000000 --- a/v2/client/platform/mark_disk_removal_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// MarkDiskRemovalReader is a Reader for the MarkDiskRemoval structure. -type MarkDiskRemovalReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *MarkDiskRemovalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewMarkDiskRemovalOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewMarkDiskRemovalDefault(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 - } -} - -// NewMarkDiskRemovalOK creates a MarkDiskRemovalOK with default headers values -func NewMarkDiskRemovalOK() *MarkDiskRemovalOK { - return &MarkDiskRemovalOK{} -} - -/* -MarkDiskRemovalOK describes a response with status code 200, with default header values. - -Success -*/ -type MarkDiskRemovalOK struct { - Payload *models.RemoveDisk -} - -// IsSuccess returns true when this mark disk removal o k response has a 2xx status code -func (o *MarkDiskRemovalOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this mark disk removal o k response has a 3xx status code -func (o *MarkDiskRemovalOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this mark disk removal o k response has a 4xx status code -func (o *MarkDiskRemovalOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this mark disk removal o k response has a 5xx status code -func (o *MarkDiskRemovalOK) IsServerError() bool { - return false -} - -// IsCode returns true when this mark disk removal o k response a status code equal to that given -func (o *MarkDiskRemovalOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the mark disk removal o k response -func (o *MarkDiskRemovalOK) Code() int { - return 200 -} - -func (o *MarkDiskRemovalOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/{id}/remove][%d] markDiskRemovalOK %s", 200, payload) -} - -func (o *MarkDiskRemovalOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/{id}/remove][%d] markDiskRemovalOK %s", 200, payload) -} - -func (o *MarkDiskRemovalOK) GetPayload() *models.RemoveDisk { - return o.Payload -} - -func (o *MarkDiskRemovalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoveDisk) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewMarkDiskRemovalDefault creates a MarkDiskRemovalDefault with default headers values -func NewMarkDiskRemovalDefault(code int) *MarkDiskRemovalDefault { - return &MarkDiskRemovalDefault{ - _statusCode: code, - } -} - -/* -MarkDiskRemovalDefault describes a response with status code -1, with default header values. - -Error -*/ -type MarkDiskRemovalDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this mark disk removal default response has a 2xx status code -func (o *MarkDiskRemovalDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this mark disk removal default response has a 3xx status code -func (o *MarkDiskRemovalDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this mark disk removal default response has a 4xx status code -func (o *MarkDiskRemovalDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this mark disk removal default response has a 5xx status code -func (o *MarkDiskRemovalDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this mark disk removal default response a status code equal to that given -func (o *MarkDiskRemovalDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the mark disk removal default response -func (o *MarkDiskRemovalDefault) Code() int { - return o._statusCode -} - -func (o *MarkDiskRemovalDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/{id}/remove][%d] MarkDiskRemoval default %s", o._statusCode, payload) -} - -func (o *MarkDiskRemovalDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /disks/{id}/remove][%d] MarkDiskRemoval default %s", o._statusCode, payload) -} - -func (o *MarkDiskRemovalDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *MarkDiskRemovalDefault) 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/mark_node_removal_parameters.go b/v2/client/platform/mark_node_removal_parameters.go deleted file mode 100644 index e581bd17..00000000 --- a/v2/client/platform/mark_node_removal_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewMarkNodeRemovalParams creates a new MarkNodeRemovalParams 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 NewMarkNodeRemovalParams() *MarkNodeRemovalParams { - return &MarkNodeRemovalParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewMarkNodeRemovalParamsWithTimeout creates a new MarkNodeRemovalParams object -// with the ability to set a timeout on a request. -func NewMarkNodeRemovalParamsWithTimeout(timeout time.Duration) *MarkNodeRemovalParams { - return &MarkNodeRemovalParams{ - timeout: timeout, - } -} - -// NewMarkNodeRemovalParamsWithContext creates a new MarkNodeRemovalParams object -// with the ability to set a context for a request. -func NewMarkNodeRemovalParamsWithContext(ctx context.Context) *MarkNodeRemovalParams { - return &MarkNodeRemovalParams{ - Context: ctx, - } -} - -// NewMarkNodeRemovalParamsWithHTTPClient creates a new MarkNodeRemovalParams object -// with the ability to set a custom HTTPClient for a request. -func NewMarkNodeRemovalParamsWithHTTPClient(client *http.Client) *MarkNodeRemovalParams { - return &MarkNodeRemovalParams{ - HTTPClient: client, - } -} - -/* -MarkNodeRemovalParams contains all the parameters to send to the API endpoint - - for the mark node removal operation. - - Typically these are written to a http.Request. -*/ -type MarkNodeRemovalParams struct { - - /* Body. - - Specifies parameters to initiate/cancel node removal . - */ - Body *models.NodeRemovalParams - - /* ID. - - Specifies id of node to cancel removal. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the mark node removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkNodeRemovalParams) WithDefaults() *MarkNodeRemovalParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the mark node removal params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *MarkNodeRemovalParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the mark node removal params -func (o *MarkNodeRemovalParams) WithTimeout(timeout time.Duration) *MarkNodeRemovalParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the mark node removal params -func (o *MarkNodeRemovalParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the mark node removal params -func (o *MarkNodeRemovalParams) WithContext(ctx context.Context) *MarkNodeRemovalParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the mark node removal params -func (o *MarkNodeRemovalParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the mark node removal params -func (o *MarkNodeRemovalParams) WithHTTPClient(client *http.Client) *MarkNodeRemovalParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the mark node removal params -func (o *MarkNodeRemovalParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the mark node removal params -func (o *MarkNodeRemovalParams) WithBody(body *models.NodeRemovalParams) *MarkNodeRemovalParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the mark node removal params -func (o *MarkNodeRemovalParams) SetBody(body *models.NodeRemovalParams) { - o.Body = body -} - -// WithID adds the id to the mark node removal params -func (o *MarkNodeRemovalParams) WithID(id int64) *MarkNodeRemovalParams { - o.SetID(id) - return o -} - -// SetID adds the id to the mark node removal params -func (o *MarkNodeRemovalParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *MarkNodeRemovalParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/mark_node_removal_responses.go b/v2/client/platform/mark_node_removal_responses.go deleted file mode 100644 index d9d44214..00000000 --- a/v2/client/platform/mark_node_removal_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// MarkNodeRemovalReader is a Reader for the MarkNodeRemoval structure. -type MarkNodeRemovalReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *MarkNodeRemovalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewMarkNodeRemovalOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewMarkNodeRemovalDefault(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 - } -} - -// NewMarkNodeRemovalOK creates a MarkNodeRemovalOK with default headers values -func NewMarkNodeRemovalOK() *MarkNodeRemovalOK { - return &MarkNodeRemovalOK{} -} - -/* -MarkNodeRemovalOK describes a response with status code 200, with default header values. - -Success -*/ -type MarkNodeRemovalOK struct { - Payload *models.RemoveNode -} - -// IsSuccess returns true when this mark node removal o k response has a 2xx status code -func (o *MarkNodeRemovalOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this mark node removal o k response has a 3xx status code -func (o *MarkNodeRemovalOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this mark node removal o k response has a 4xx status code -func (o *MarkNodeRemovalOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this mark node removal o k response has a 5xx status code -func (o *MarkNodeRemovalOK) IsServerError() bool { - return false -} - -// IsCode returns true when this mark node removal o k response a status code equal to that given -func (o *MarkNodeRemovalOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the mark node removal o k response -func (o *MarkNodeRemovalOK) Code() int { - return 200 -} - -func (o *MarkNodeRemovalOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/remove][%d] markNodeRemovalOK %s", 200, payload) -} - -func (o *MarkNodeRemovalOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/remove][%d] markNodeRemovalOK %s", 200, payload) -} - -func (o *MarkNodeRemovalOK) GetPayload() *models.RemoveNode { - return o.Payload -} - -func (o *MarkNodeRemovalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoveNode) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewMarkNodeRemovalDefault creates a MarkNodeRemovalDefault with default headers values -func NewMarkNodeRemovalDefault(code int) *MarkNodeRemovalDefault { - return &MarkNodeRemovalDefault{ - _statusCode: code, - } -} - -/* -MarkNodeRemovalDefault describes a response with status code -1, with default header values. - -Error -*/ -type MarkNodeRemovalDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this mark node removal default response has a 2xx status code -func (o *MarkNodeRemovalDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this mark node removal default response has a 3xx status code -func (o *MarkNodeRemovalDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this mark node removal default response has a 4xx status code -func (o *MarkNodeRemovalDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this mark node removal default response has a 5xx status code -func (o *MarkNodeRemovalDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this mark node removal default response a status code equal to that given -func (o *MarkNodeRemovalDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the mark node removal default response -func (o *MarkNodeRemovalDefault) Code() int { - return o._statusCode -} - -func (o *MarkNodeRemovalDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/remove][%d] MarkNodeRemoval default %s", o._statusCode, payload) -} - -func (o *MarkNodeRemovalDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /nodes/{id}/remove][%d] MarkNodeRemoval default %s", o._statusCode, payload) -} - -func (o *MarkNodeRemovalDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *MarkNodeRemovalDefault) 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/node_information_parameters.go b/v2/client/platform/node_information_parameters.go deleted file mode 100644 index 3194116d..00000000 --- a/v2/client/platform/node_information_parameters.go +++ /dev/null @@ -1,164 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewNodeInformationParams creates a new NodeInformationParams 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 NewNodeInformationParams() *NodeInformationParams { - return &NodeInformationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewNodeInformationParamsWithTimeout creates a new NodeInformationParams object -// with the ability to set a timeout on a request. -func NewNodeInformationParamsWithTimeout(timeout time.Duration) *NodeInformationParams { - return &NodeInformationParams{ - timeout: timeout, - } -} - -// NewNodeInformationParamsWithContext creates a new NodeInformationParams object -// with the ability to set a context for a request. -func NewNodeInformationParamsWithContext(ctx context.Context) *NodeInformationParams { - return &NodeInformationParams{ - Context: ctx, - } -} - -// NewNodeInformationParamsWithHTTPClient creates a new NodeInformationParams object -// with the ability to set a custom HTTPClient for a request. -func NewNodeInformationParamsWithHTTPClient(client *http.Client) *NodeInformationParams { - return &NodeInformationParams{ - HTTPClient: client, - } -} - -/* -NodeInformationParams contains all the parameters to send to the API endpoint - - for the node information operation. - - Typically these are written to a http.Request. -*/ -type NodeInformationParams struct { - - /* ShowServicesVersionInfo. - - Specifies whether to show version info of the services running on the node. - */ - ShowServicesVersionInfo *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the node information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *NodeInformationParams) WithDefaults() *NodeInformationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the node information params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *NodeInformationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the node information params -func (o *NodeInformationParams) WithTimeout(timeout time.Duration) *NodeInformationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the node information params -func (o *NodeInformationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the node information params -func (o *NodeInformationParams) WithContext(ctx context.Context) *NodeInformationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the node information params -func (o *NodeInformationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the node information params -func (o *NodeInformationParams) WithHTTPClient(client *http.Client) *NodeInformationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the node information params -func (o *NodeInformationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithShowServicesVersionInfo adds the showServicesVersionInfo to the node information params -func (o *NodeInformationParams) WithShowServicesVersionInfo(showServicesVersionInfo *bool) *NodeInformationParams { - o.SetShowServicesVersionInfo(showServicesVersionInfo) - return o -} - -// SetShowServicesVersionInfo adds the showServicesVersionInfo to the node information params -func (o *NodeInformationParams) SetShowServicesVersionInfo(showServicesVersionInfo *bool) { - o.ShowServicesVersionInfo = showServicesVersionInfo -} - -// WriteToRequest writes these params to a swagger request -func (o *NodeInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ShowServicesVersionInfo != nil { - - // query param showServicesVersionInfo - var qrShowServicesVersionInfo bool - - if o.ShowServicesVersionInfo != nil { - qrShowServicesVersionInfo = *o.ShowServicesVersionInfo - } - qShowServicesVersionInfo := swag.FormatBool(qrShowServicesVersionInfo) - if qShowServicesVersionInfo != "" { - - if err := r.SetQueryParam("showServicesVersionInfo", qShowServicesVersionInfo); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/node_information_responses.go b/v2/client/platform/node_information_responses.go deleted file mode 100644 index 8e279ef1..00000000 --- a/v2/client/platform/node_information_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NodeInformationReader is a Reader for the NodeInformation structure. -type NodeInformationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *NodeInformationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewNodeInformationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewNodeInformationDefault(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 - } -} - -// NewNodeInformationOK creates a NodeInformationOK with default headers values -func NewNodeInformationOK() *NodeInformationOK { - return &NodeInformationOK{} -} - -/* -NodeInformationOK describes a response with status code 200, with default header values. - -Success -*/ -type NodeInformationOK struct { - Payload *models.NodeInfo -} - -// IsSuccess returns true when this node information o k response has a 2xx status code -func (o *NodeInformationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this node information o k response has a 3xx status code -func (o *NodeInformationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this node information o k response has a 4xx status code -func (o *NodeInformationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this node information o k response has a 5xx status code -func (o *NodeInformationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this node information o k response a status code equal to that given -func (o *NodeInformationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the node information o k response -func (o *NodeInformationOK) Code() int { - return 200 -} - -func (o *NodeInformationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodes][%d] nodeInformationOK %s", 200, payload) -} - -func (o *NodeInformationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodes][%d] nodeInformationOK %s", 200, payload) -} - -func (o *NodeInformationOK) GetPayload() *models.NodeInfo { - return o.Payload -} - -func (o *NodeInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NodeInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewNodeInformationDefault creates a NodeInformationDefault with default headers values -func NewNodeInformationDefault(code int) *NodeInformationDefault { - return &NodeInformationDefault{ - _statusCode: code, - } -} - -/* -NodeInformationDefault describes a response with status code -1, with default header values. - -Error -*/ -type NodeInformationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this node information default response has a 2xx status code -func (o *NodeInformationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this node information default response has a 3xx status code -func (o *NodeInformationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this node information default response has a 4xx status code -func (o *NodeInformationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this node information default response has a 5xx status code -func (o *NodeInformationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this node information default response a status code equal to that given -func (o *NodeInformationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the node information default response -func (o *NodeInformationDefault) Code() int { - return o._statusCode -} - -func (o *NodeInformationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodes][%d] Node Information default %s", o._statusCode, payload) -} - -func (o *NodeInformationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /nodes][%d] Node Information default %s", o._statusCode, payload) -} - -func (o *NodeInformationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *NodeInformationDefault) 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 deleted file mode 100644 index efb3c15c..00000000 --- a/v2/client/platform/platform_client.go +++ /dev/null @@ -1,3109 +0,0 @@ -// 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 ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new platform API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new platform API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new platform API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for platform API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithContentType allows the client to force the Content-Type header -// to negotiate a specific Consumer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithContentType(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{mime} - } -} - -// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". -func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"application/json"} -} - -// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data". -func WithContentTypeMultipartFormData(r *runtime.ClientOperation) { - r.ConsumesMediaTypes = []string{"multipart/form-data"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - AddHosts(params *AddHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddHostsCreated, error) - - AddRemoteDisk(params *AddRemoteDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddRemoteDiskCreated, error) - - ClearSMTPConfiguration(params *ClearSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearSMTPConfigurationNoContent, error) - - CreateCluster(params *CreateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClusterCreated, error) - - CreateClusterVlan(params *CreateClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClusterVlanCreated, error) - - CreateInterfaceGroup(params *CreateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInterfaceGroupCreated, error) - - CreateRacks(params *CreateRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRacksCreated, error) - - DeleteAMQPTargetConfig(params *DeleteAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAMQPTargetConfigNoContent, error) - - DeleteClusterPackage(params *DeleteClusterPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterPackageAccepted, error) - - DeleteClusterVlan(params *DeleteClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterVlanNoContent, error) - - DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteHostsNoContent, error) - - DeleteInterfaceGroup(params *DeleteInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInterfaceGroupNoContent, error) - - DeleteRackByID(params *DeleteRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRackByIDNoContent, error) - - DeleteRacks(params *DeleteRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRacksNoContent, error) - - DiscoverDisks(params *DiscoverDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DiscoverDisksOK, error) - - DiskIdentify(params *DiskIdentifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DiskIdentifyOK, error) - - DisksAssimilate(params *DisksAssimilateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DisksAssimilateOK, error) - - ExpandClusterNodes(params *ExpandClusterNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandClusterNodesAccepted, error) - - GetAMQPTargetConfig(params *GetAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAMQPTargetConfigOK, error) - - GetChassis(params *GetChassisParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetChassisOK, error) - - GetChassisByID(params *GetChassisByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetChassisByIDOK, error) - - GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error) - - GetClusterLocalDomainSID(params *GetClusterLocalDomainSIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterLocalDomainSIDOK, error) - - GetClusterPackages(params *GetClusterPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPackagesOK, error) - - GetClusterState(params *GetClusterStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStateOK, error) - - GetClusterVlans(params *GetClusterVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterVlansOK, error) - - GetInterfaceGroups(params *GetInterfaceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfaceGroupsOK, error) - - GetInterfaces(params *GetInterfacesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfacesOK, error) - - GetIpmiLanConfig(params *GetIpmiLanConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIpmiLanConfigOK, error) - - GetIpmiUsers(params *GetIpmiUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIpmiUsersOK, error) - - GetIsDMaaSCluster(params *GetIsDMaaSClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIsDMaaSClusterOK, error) - - GetNetworkInterfaces(params *GetNetworkInterfacesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNetworkInterfacesOK, error) - - GetNodes(params *GetNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodesOK, error) - - GetRackByID(params *GetRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRackByIDOK, error) - - GetRacks(params *GetRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRacksOK, error) - - GetRemoteDisks(params *GetRemoteDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteDisksOK, error) - - GetSMTPConfiguration(params *GetSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSMTPConfigurationOK, error) - - GetSupportChannelConfig(params *GetSupportChannelConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportChannelConfigOK, error) - - IdentifyNode(params *IdentifyNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IdentifyNodeOK, error) - - ImportCrlFile(params *ImportCrlFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportCrlFileNoContent, error) - - ListDisks(params *ListDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDisksOK, error) - - ListFeatureFlag(params *ListFeatureFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFeatureFlagOK, error) - - ListFreeNodes(params *ListFreeNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFreeNodesOK, error) - - ListHosts(params *ListHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListHostsOK, error) - - MarkBaseosUpgrade(params *MarkBaseosUpgradeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkBaseosUpgradeOK, error) - - MarkDiskRemoval(params *MarkDiskRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkDiskRemovalOK, error) - - MarkNodeRemoval(params *MarkNodeRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkNodeRemovalOK, error) - - NodeInformation(params *NodeInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*NodeInformationOK, error) - - PublicKeyRequest(params *PublicKeyRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublicKeyRequestOK, error) - - RemoveRemoteDisk(params *RemoveRemoteDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveRemoteDiskNoContent, error) - - SetNodePower(params *SetNodePowerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SetNodePowerNoContent, error) - - UpdateAMQPTargetConfig(params *UpdateAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAMQPTargetConfigOK, error) - - UpdateAirgapConfig(params *UpdateAirgapConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAirgapConfigAccepted, error) - - UpdateChassisByID(params *UpdateChassisByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateChassisByIDOK, error) - - UpdateCluster(params *UpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterOK, error) - - UpdateClusterVlan(params *UpdateClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterVlanOK, error) - - UpdateFeatureFlag(params *UpdateFeatureFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFeatureFlagOK, error) - - UpdateHosts(params *UpdateHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHostsOK, error) - - UpdateInterface(params *UpdateInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceOK, error) - - UpdateInterfaceGroup(params *UpdateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceGroupOK, error) - - UpdateIpmiLanConfig(params *UpdateIpmiLanConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIpmiLanConfigOK, error) - - UpdateIpmiUsers(params *UpdateIpmiUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIpmiUsersOK, error) - - UpdateIsDMaaSCluster(params *UpdateIsDMaaSClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIsDMaaSClusterOK, error) - - UpdateRackByID(params *UpdateRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRackByIDOK, error) - - UpdateRacks(params *UpdateRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRacksOK, error) - - UpdateSMTPConfiguration(params *UpdateSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSMTPConfigurationOK, error) - - UpdateSupportChannelConfig(params *UpdateSupportChannelConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportChannelConfigOK, error) - - UpgradeCheckGetResults(params *UpgradeCheckGetResultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeCheckGetResultsOK, error) - - UpgradeCheckRunTests(params *UpgradeCheckRunTestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeCheckRunTestsOK, error) - - UpgradeClusterSoftware(params *UpgradeClusterSoftwareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeClusterSoftwareAccepted, error) - - UploadPackageByURL(params *UploadPackageByURLParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPackageByURLAccepted, error) - - ValidateSMTPConfiguration(params *ValidateSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateSMTPConfigurationNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddHosts creates cluster host mappings - -Sends a request to add one or more new entries to the Cluster's /etc/hosts -*/ -func (a *Client) AddHosts(params *AddHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddHostsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddHostsParams() - } - op := &runtime.ClientOperation{ - ID: "AddHosts", - Method: "POST", - PathPattern: "/clusters/host-mappings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddHostsReader{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.(*AddHostsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -AddRemoteDisk adds remote disk - -Add a remote disk. -*/ -func (a *Client) AddRemoteDisk(params *AddRemoteDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddRemoteDiskCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddRemoteDiskParams() - } - op := &runtime.ClientOperation{ - ID: "AddRemoteDisk", - Method: "POST", - PathPattern: "/disks/remote", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddRemoteDiskReader{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.(*AddRemoteDiskCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddRemoteDiskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ClearSMTPConfiguration clears SMTP configuration - -Clear cluster SMTP configuration. -*/ -func (a *Client) ClearSMTPConfiguration(params *ClearSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearSMTPConfigurationNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewClearSMTPConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "ClearSMTPConfiguration", - Method: "DELETE", - PathPattern: "/clusters/smtp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ClearSMTPConfigurationReader{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.(*ClearSMTPConfigurationNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ClearSMTPConfigurationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateCluster creates a cluster - -Create a cluster with given network and cluster configuration. -*/ -func (a *Client) CreateCluster(params *CreateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClusterCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCluster", - Method: "POST", - PathPattern: "/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateClusterReader{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.(*CreateClusterCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateClusterVlan creates vlan - -Create a vlan on the cluster. -*/ -func (a *Client) CreateClusterVlan(params *CreateClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClusterVlanCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateClusterVlanParams() - } - op := &runtime.ClientOperation{ - ID: "CreateClusterVlan", - Method: "POST", - PathPattern: "/network/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateClusterVlanReader{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.(*CreateClusterVlanCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateClusterVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateInterfaceGroup creates interface group - -Create an interface group on the cluster. -*/ -func (a *Client) CreateInterfaceGroup(params *CreateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInterfaceGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateInterfaceGroup", - Method: "POST", - PathPattern: "/network/interface-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateInterfaceGroupReader{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.(*CreateInterfaceGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateInterfaceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateRacks creates racks - -Create list of racks and optionally also assign list of chassis to each rack -*/ -func (a *Client) CreateRacks(params *CreateRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRacksCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRacksParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRacks", - Method: "POST", - PathPattern: "/racks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRacksReader{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.(*CreateRacksCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRacksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteAMQPTargetConfig deletes a m q p target config - -Delete AMQP target config on the cluster. -*/ -func (a *Client) DeleteAMQPTargetConfig(params *DeleteAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAMQPTargetConfigNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteAMQPTargetConfigParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteAMQPTargetConfig", - Method: "DELETE", - PathPattern: "/clusters/amqp-target-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteAMQPTargetConfigReader{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.(*DeleteAMQPTargetConfigNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteAMQPTargetConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteClusterPackage deletes package - -Delete a software package on the cluster. -*/ -func (a *Client) DeleteClusterPackage(params *DeleteClusterPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterPackageAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteClusterPackageParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteClusterPackage", - Method: "DELETE", - PathPattern: "/clusters/packages/{versionName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteClusterPackageReader{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.(*DeleteClusterPackageAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteClusterPackageDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteClusterVlan deletes vlan - -Delete a vlan on the cluster. -*/ -func (a *Client) DeleteClusterVlan(params *DeleteClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterVlanNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteClusterVlanParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteClusterVlan", - Method: "DELETE", - PathPattern: "/network/vlans/{interfaceName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteClusterVlanReader{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.(*DeleteClusterVlanNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteClusterVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteHosts deletes multiple host mappings within the cluster - -Delete one or more Host Mappings within the cluster. -*/ -func (a *Client) DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteHostsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteHostsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteHosts", - Method: "POST", - PathPattern: "/clusters/host-mappings/delete", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteHostsReader{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.(*DeleteHostsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteInterfaceGroup deletes interface group - -Delete an interface group on the cluster. -*/ -func (a *Client) DeleteInterfaceGroup(params *DeleteInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInterfaceGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteInterfaceGroup", - Method: "DELETE", - PathPattern: "/network/interface-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteInterfaceGroupReader{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.(*DeleteInterfaceGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteInterfaceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteRackByID deletes a rack by id - -Delete a given rack by id. -*/ -func (a *Client) DeleteRackByID(params *DeleteRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRackByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRackByIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRackById", - Method: "DELETE", - PathPattern: "/racks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRackByIDReader{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.(*DeleteRackByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRackByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteRacks deletes all the racks - -Delete all the racks. -*/ -func (a *Client) DeleteRacks(params *DeleteRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRacksNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRacksParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRacks", - Method: "DELETE", - PathPattern: "/racks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRacksReader{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.(*DeleteRacksNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRacksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DiscoverDisks discovers new disks - -Discover disks that are ready for activation -*/ -func (a *Client) DiscoverDisks(params *DiscoverDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DiscoverDisksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDiscoverDisksParams() - } - op := &runtime.ClientOperation{ - ID: "DiscoverDisks", - Method: "GET", - PathPattern: "/disks/discover", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DiscoverDisksReader{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.(*DiscoverDisksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DiscoverDisksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DiskIdentify identifies a disk - -Turn on/off led light of a disk. -*/ -func (a *Client) DiskIdentify(params *DiskIdentifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DiskIdentifyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDiskIdentifyParams() - } - op := &runtime.ClientOperation{ - ID: "DiskIdentify", - Method: "POST", - PathPattern: "/disks/identify", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DiskIdentifyReader{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.(*DiskIdentifyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DiskIdentifyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DisksAssimilate assimilates disks - -Assimilate list of disks from one or more nodes of cluster. -*/ -func (a *Client) DisksAssimilate(params *DisksAssimilateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DisksAssimilateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDisksAssimilateParams() - } - op := &runtime.ClientOperation{ - ID: "DisksAssimilate", - Method: "POST", - PathPattern: "/disks/assimilate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DisksAssimilateReader{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.(*DisksAssimilateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DisksAssimilateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ExpandClusterNodes expands the cluster - -Expand the cluster by adding new nodes. -*/ -func (a *Client) ExpandClusterNodes(params *ExpandClusterNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExpandClusterNodesAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewExpandClusterNodesParams() - } - op := &runtime.ClientOperation{ - ID: "ExpandClusterNodes", - Method: "POST", - PathPattern: "/clusters/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ExpandClusterNodesReader{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.(*ExpandClusterNodesAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ExpandClusterNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAMQPTargetConfig gets a m q p target config - -Fetch AMQP target config on the cluster. -*/ -func (a *Client) GetAMQPTargetConfig(params *GetAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAMQPTargetConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAMQPTargetConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetAMQPTargetConfig", - Method: "GET", - PathPattern: "/clusters/amqp-target-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAMQPTargetConfigReader{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.(*GetAMQPTargetConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAMQPTargetConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetChassis gets list of chassis - -Get list of all chassis info that are part of cluster. -*/ -func (a *Client) GetChassis(params *GetChassisParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetChassisOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetChassisParams() - } - op := &runtime.ClientOperation{ - ID: "GetChassis", - Method: "GET", - PathPattern: "/chassis", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetChassisReader{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.(*GetChassisOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetChassisDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetChassisByID gets a chassis by chassis id - -Get a chassis info by id. -*/ -func (a *Client) GetChassisByID(params *GetChassisByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetChassisByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetChassisByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetChassisById", - Method: "GET", - PathPattern: "/chassis/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetChassisByIDReader{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.(*GetChassisByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetChassisByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCluster retrieves cluster configuration - -Retrieve some summary information about the Cluster Configuration. -*/ -func (a *Client) GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterParams() - } - op := &runtime.ClientOperation{ - ID: "GetCluster", - Method: "GET", - PathPattern: "/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterReader{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.(*GetClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterLocalDomainSID gets cluster local domain s ID - -Fetch SID of cluster local domain. -*/ -func (a *Client) GetClusterLocalDomainSID(params *GetClusterLocalDomainSIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterLocalDomainSIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterLocalDomainSIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterLocalDomainSID", - Method: "GET", - PathPattern: "/clusters/local-domain-sid", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterLocalDomainSIDReader{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.(*GetClusterLocalDomainSIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterLocalDomainSIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterPackages gets packages - -Get software packages on the cluster. -*/ -func (a *Client) GetClusterPackages(params *GetClusterPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPackagesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterPackagesParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterPackages", - Method: "GET", - PathPattern: "/clusters/packages", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterPackagesReader{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.(*GetClusterPackagesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterPackagesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterState gets cluster state - -Get the current state of the cluster. -*/ -func (a *Client) GetClusterState(params *GetClusterStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterStateParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterState", - Method: "GET", - PathPattern: "/clusters/state", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterStateReader{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.(*GetClusterStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterStateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterVlans gets vlans - -Get vlans on the cluster. -*/ -func (a *Client) GetClusterVlans(params *GetClusterVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterVlansOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterVlansParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterVlans", - Method: "GET", - PathPattern: "/network/vlans", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterVlansReader{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.(*GetClusterVlansOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterVlansDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetInterfaceGroups gets interface groups - -Get a list of interface groups configured on the cluster. -*/ -func (a *Client) GetInterfaceGroups(params *GetInterfaceGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfaceGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetInterfaceGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetInterfaceGroups", - Method: "GET", - PathPattern: "/network/interface-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetInterfaceGroupsReader{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.(*GetInterfaceGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetInterfaceGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetInterfaces gets interfaces - -Get interfaces on a cluster or free node. -*/ -func (a *Client) GetInterfaces(params *GetInterfacesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInterfacesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetInterfacesParams() - } - op := &runtime.ClientOperation{ - ID: "GetInterfaces", - Method: "GET", - PathPattern: "/network/interfaces", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetInterfacesReader{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.(*GetInterfacesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetInterfacesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIpmiLanConfig gets IP m i l a n configuration - -Get cluster and node level IPMI LAN configuration. -*/ -func (a *Client) GetIpmiLanConfig(params *GetIpmiLanConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIpmiLanConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIpmiLanConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetIpmiLanConfig", - Method: "GET", - PathPattern: "/network/ipmi/lan", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIpmiLanConfigReader{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.(*GetIpmiLanConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIpmiLanConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIpmiUsers gets IP m i users - -Get cluster and node level IPMI users. -*/ -func (a *Client) GetIpmiUsers(params *GetIpmiUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIpmiUsersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIpmiUsersParams() - } - op := &runtime.ClientOperation{ - ID: "GetIpmiUsers", - Method: "GET", - PathPattern: "/network/ipmi/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIpmiUsersReader{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.(*GetIpmiUsersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIpmiUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetIsDMaaSCluster gets whether the cluster is a d maa s cluster - -Get whether the cluster is a DMaaS cluster. -*/ -func (a *Client) GetIsDMaaSCluster(params *GetIsDMaaSClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIsDMaaSClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIsDMaaSClusterParams() - } - op := &runtime.ClientOperation{ - ID: "GetIsDMaaSCluster", - Method: "GET", - PathPattern: "/clusters/is-dmaas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetIsDMaaSClusterReader{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.(*GetIsDMaaSClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetIsDMaaSClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNetworkInterfaces gets list of interfaces - -Get a list of interfaces present on the node or cluster. -*/ -func (a *Client) GetNetworkInterfaces(params *GetNetworkInterfacesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNetworkInterfacesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNetworkInterfacesParams() - } - op := &runtime.ClientOperation{ - ID: "GetNetworkInterfaces", - Method: "GET", - PathPattern: "/network-interfaces", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNetworkInterfacesReader{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.(*GetNetworkInterfacesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNetworkInterfacesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNodes lists nodes of the cluster - -Gets the list of Nodes in a cluster. -*/ -func (a *Client) GetNodes(params *GetNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodesParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodes", - Method: "GET", - PathPattern: "/clusters/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNodesReader{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.(*GetNodesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRackByID gets a rack by rack id - -Get a rack info by id. -*/ -func (a *Client) GetRackByID(params *GetRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRackByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRackByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRackById", - Method: "GET", - PathPattern: "/racks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRackByIDReader{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.(*GetRackByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRackByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRacks gets list of racks - -Get list of all racks that are part of cluster. -*/ -func (a *Client) GetRacks(params *GetRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRacksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRacksParams() - } - op := &runtime.ClientOperation{ - ID: "GetRacks", - Method: "GET", - PathPattern: "/racks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRacksReader{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.(*GetRacksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRacksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRemoteDisks gets remote disks - -Get remote disks. -*/ -func (a *Client) GetRemoteDisks(params *GetRemoteDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteDisksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteDisksParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteDisks", - Method: "GET", - PathPattern: "/disks/remote", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteDisksReader{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.(*GetRemoteDisksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteDisksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSMTPConfiguration gets SMTP configuration - -Get the SMTP cluster configuration. -*/ -func (a *Client) GetSMTPConfiguration(params *GetSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSMTPConfigurationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSMTPConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "GetSMTPConfiguration", - Method: "GET", - PathPattern: "/clusters/smtp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSMTPConfigurationReader{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.(*GetSMTPConfigurationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSMTPConfigurationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSupportChannelConfig gets support channel configuration - -Get support channel configuration. -*/ -func (a *Client) GetSupportChannelConfig(params *GetSupportChannelConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportChannelConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSupportChannelConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetSupportChannelConfig", - Method: "GET", - PathPattern: "/support-channel-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSupportChannelConfigReader{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.(*GetSupportChannelConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSupportChannelConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -IdentifyNode identifies node - -Turn on/off LED light of a node to identify. -*/ -func (a *Client) IdentifyNode(params *IdentifyNodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IdentifyNodeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewIdentifyNodeParams() - } - op := &runtime.ClientOperation{ - ID: "Identify node", - Method: "POST", - PathPattern: "/nodes/{id}/identify", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &IdentifyNodeReader{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.(*IdentifyNodeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*IdentifyNodeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ImportCrlFile imports crl file - -Import a Crl file into the cluster. -*/ -func (a *Client) ImportCrlFile(params *ImportCrlFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportCrlFileNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewImportCrlFileParams() - } - op := &runtime.ClientOperation{ - ID: "ImportCrlFile", - Method: "PUT", - PathPattern: "/clusters/import-crl-file", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"multipart/form-data"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ImportCrlFileReader{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.(*ImportCrlFileNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ImportCrlFileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListDisks gets list of disks - -Get list of local disks. -*/ -func (a *Client) ListDisks(params *ListDisksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDisksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListDisksParams() - } - op := &runtime.ClientOperation{ - ID: "ListDisks", - Method: "GET", - PathPattern: "/disks/local", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListDisksReader{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.(*ListDisksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListDisksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListFeatureFlag gets feature flag overrides list - -Get the list of feature flag overrides defined on cluster. -*/ -func (a *Client) ListFeatureFlag(params *ListFeatureFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFeatureFlagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListFeatureFlagParams() - } - op := &runtime.ClientOperation{ - ID: "ListFeatureFlag", - Method: "GET", - PathPattern: "/clusters/feature-flag", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListFeatureFlagReader{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.(*ListFeatureFlagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListFeatureFlagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListFreeNodes lists the free cohesity nodes present on a network - -Sends a request to any Node to list all of the free Nodes that are present on the network. -*/ -func (a *Client) ListFreeNodes(params *ListFreeNodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListFreeNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListFreeNodesParams() - } - op := &runtime.ClientOperation{ - ID: "ListFreeNodes", - Method: "GET", - PathPattern: "/clusters/nodes/free", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListFreeNodesReader{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.(*ListFreeNodesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListFreeNodesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListHosts lists host mappings - -Lists the host mappings in /etc/hosts of the nodes in a cluster. -*/ -func (a *Client) ListHosts(params *ListHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListHostsParams() - } - op := &runtime.ClientOperation{ - ID: "ListHosts", - Method: "GET", - PathPattern: "/clusters/host-mappings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListHostsReader{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.(*ListHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -MarkBaseosUpgrade sets clears the base o s upgrade cluster operation - -Sets/clears the BaseOS upgrade cluster operation. -*/ -func (a *Client) MarkBaseosUpgrade(params *MarkBaseosUpgradeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkBaseosUpgradeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewMarkBaseosUpgradeParams() - } - op := &runtime.ClientOperation{ - ID: "MarkBaseosUpgrade", - Method: "PUT", - PathPattern: "/clusters/baseos-upgrade", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &MarkBaseosUpgradeReader{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.(*MarkBaseosUpgradeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*MarkBaseosUpgradeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -MarkDiskRemoval marks disk for removal - -Mark disk for removal or cancel removal if a disk is already marked for removal. -*/ -func (a *Client) MarkDiskRemoval(params *MarkDiskRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkDiskRemovalOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewMarkDiskRemovalParams() - } - op := &runtime.ClientOperation{ - ID: "MarkDiskRemoval", - Method: "POST", - PathPattern: "/disks/{id}/remove", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &MarkDiskRemovalReader{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.(*MarkDiskRemovalOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*MarkDiskRemovalDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -MarkNodeRemoval marks node for removal - -Mark node for removal or Cancel if a node is already marked for removal. -*/ -func (a *Client) MarkNodeRemoval(params *MarkNodeRemovalParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MarkNodeRemovalOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewMarkNodeRemovalParams() - } - op := &runtime.ClientOperation{ - ID: "MarkNodeRemoval", - Method: "POST", - PathPattern: "/nodes/{id}/remove", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &MarkNodeRemovalReader{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.(*MarkNodeRemovalOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*MarkNodeRemovalDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -NodeInformation fetches node general information - -Fetch general information about the node to which the request is sent to. -*/ -func (a *Client) NodeInformation(params *NodeInformationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*NodeInformationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewNodeInformationParams() - } - op := &runtime.ClientOperation{ - ID: "Node Information", - Method: "GET", - PathPattern: "/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &NodeInformationReader{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.(*NodeInformationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*NodeInformationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PublicKeyRequest gets the SSH public key - -Get the SSH public key corresponding to the private key used by workloads. For example, users may specify multiple scripts which are supposed to be executed on a remote machine at different progress states of a protection group run (for instance - running a script before the run starts and another after the run completes). The public key returned as part of this response should be added on the remote server where the script is to be executed as there is a specific private key used by the workload for remote login. -*/ -func (a *Client) PublicKeyRequest(params *PublicKeyRequestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublicKeyRequestOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPublicKeyRequestParams() - } - op := &runtime.ClientOperation{ - ID: "PublicKeyRequest", - Method: "POST", - PathPattern: "/clusters/ssh-public-key", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PublicKeyRequestReader{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.(*PublicKeyRequestOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PublicKeyRequestDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveRemoteDisk removes remote disk - -Remove a remote disk. -*/ -func (a *Client) RemoveRemoteDisk(params *RemoveRemoteDiskParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveRemoteDiskNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveRemoteDiskParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveRemoteDisk", - Method: "DELETE", - PathPattern: "/disks/remote/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveRemoteDiskReader{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.(*RemoveRemoteDiskNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveRemoteDiskDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SetNodePower reboots or shutdown nodes in cluster - -Reboot or shutdown nodes in cluster. -*/ -func (a *Client) SetNodePower(params *SetNodePowerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SetNodePowerNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSetNodePowerParams() - } - op := &runtime.ClientOperation{ - ID: "SetNodePower", - Method: "POST", - PathPattern: "/node-power", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SetNodePowerReader{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.(*SetNodePowerNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SetNodePowerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAMQPTargetConfig updates a m q p target config - -Updates AMQP target config on the cluster. -*/ -func (a *Client) UpdateAMQPTargetConfig(params *UpdateAMQPTargetConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAMQPTargetConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAMQPTargetConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAMQPTargetConfig", - Method: "PUT", - PathPattern: "/clusters/amqp-target-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAMQPTargetConfigReader{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.(*UpdateAMQPTargetConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAMQPTargetConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateAirgapConfig updates airgap config - -Enable or Disable Airgap on the cluster. -*/ -func (a *Client) UpdateAirgapConfig(params *UpdateAirgapConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAirgapConfigAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateAirgapConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateAirgapConfig", - Method: "PUT", - PathPattern: "/clusters/airgap", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateAirgapConfigReader{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.(*UpdateAirgapConfigAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateAirgapConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateChassisByID updates a chassis by chassis id - -Update selected properties of chassis info by id. -*/ -func (a *Client) UpdateChassisByID(params *UpdateChassisByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateChassisByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateChassisByIDParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateChassisById", - Method: "PATCH", - PathPattern: "/chassis/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateChassisByIDReader{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.(*UpdateChassisByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateChassisByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateCluster updates a cluster - -Update the Cluster with the given configuration. -*/ -func (a *Client) UpdateCluster(params *UpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateCluster", - Method: "PUT", - PathPattern: "/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateClusterReader{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.(*UpdateClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateClusterVlan updates vlan - -Update a vlan on the cluster. -*/ -func (a *Client) UpdateClusterVlan(params *UpdateClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterVlanOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateClusterVlanParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateClusterVlan", - Method: "PUT", - PathPattern: "/network/vlans/{interfaceName}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateClusterVlanReader{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.(*UpdateClusterVlanOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateClusterVlanDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateFeatureFlag updates feature flag override status - -Update a feature flag override status to cluster. -*/ -func (a *Client) UpdateFeatureFlag(params *UpdateFeatureFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFeatureFlagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateFeatureFlagParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateFeatureFlag", - Method: "PUT", - PathPattern: "/clusters/feature-flag", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateFeatureFlagReader{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.(*UpdateFeatureFlagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateFeatureFlagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateHosts updates host mappings - -Updates Host Mapping on the Cluster. -*/ -func (a *Client) UpdateHosts(params *UpdateHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateHostsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateHostsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateHosts", - Method: "PUT", - PathPattern: "/clusters/host-mappings", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateHostsReader{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.(*UpdateHostsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateHostsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInterface updates interface - -Update network interface on a free node. -*/ -func (a *Client) UpdateInterface(params *UpdateInterfaceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInterfaceParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInterface", - Method: "PUT", - PathPattern: "/network/interfaces/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInterfaceReader{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.(*UpdateInterfaceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInterfaceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateInterfaceGroup updates interface group - -Update an interface group on the cluster. -*/ -func (a *Client) UpdateInterfaceGroup(params *UpdateInterfaceGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInterfaceGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateInterfaceGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateInterfaceGroup", - Method: "PUT", - PathPattern: "/network/interface-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateInterfaceGroupReader{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.(*UpdateInterfaceGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateInterfaceGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIpmiLanConfig updates IP m i l a n configuration - -Update cluster and node level IPMI LAN configuration. -*/ -func (a *Client) UpdateIpmiLanConfig(params *UpdateIpmiLanConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIpmiLanConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIpmiLanConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIpmiLanConfig", - Method: "PATCH", - PathPattern: "/network/ipmi/lan", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIpmiLanConfigReader{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.(*UpdateIpmiLanConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIpmiLanConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIpmiUsers updates IP m i users - -Update cluster and node level IPMI users. -*/ -func (a *Client) UpdateIpmiUsers(params *UpdateIpmiUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIpmiUsersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIpmiUsersParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIpmiUsers", - Method: "PATCH", - PathPattern: "/network/ipmi/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIpmiUsersReader{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.(*UpdateIpmiUsersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIpmiUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateIsDMaaSCluster updates whether the cluster is a d maa s cluster - -Update whether the cluster is a DMaaS cluster. -*/ -func (a *Client) UpdateIsDMaaSCluster(params *UpdateIsDMaaSClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIsDMaaSClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateIsDMaaSClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateIsDMaaSCluster", - Method: "PUT", - PathPattern: "/clusters/is-dmaas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateIsDMaaSClusterReader{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.(*UpdateIsDMaaSClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateIsDMaaSClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateRackByID Update selected properties of a rack given by id. -*/ -func (a *Client) UpdateRackByID(params *UpdateRackByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRackByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRackByIDParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRackById", - Method: "PATCH", - PathPattern: "/racks/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRackByIDReader{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.(*UpdateRackByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRackByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateRacks updates racks - -Updates list of racks with name, chassis list or/and location -*/ -func (a *Client) UpdateRacks(params *UpdateRacksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRacksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRacksParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRacks", - Method: "PATCH", - PathPattern: "/racks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRacksReader{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.(*UpdateRacksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRacksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSMTPConfiguration updates SMTP configuration - -Update SMTP configuration. -*/ -func (a *Client) UpdateSMTPConfiguration(params *UpdateSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSMTPConfigurationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSMTPConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSMTPConfiguration", - Method: "PUT", - PathPattern: "/clusters/smtp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSMTPConfigurationReader{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.(*UpdateSMTPConfigurationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSMTPConfigurationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSupportChannelConfig updates support channel configuration - -Update support channel configuration. -*/ -func (a *Client) UpdateSupportChannelConfig(params *UpdateSupportChannelConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportChannelConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSupportChannelConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSupportChannelConfig", - Method: "PUT", - PathPattern: "/support-channel-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSupportChannelConfigReader{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.(*UpdateSupportChannelConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSupportChannelConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpgradeCheckGetResults gets upgrade checks results - -Get upgrade checks results. -*/ -func (a *Client) UpgradeCheckGetResults(params *UpgradeCheckGetResultsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeCheckGetResultsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradeCheckGetResultsParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradeCheckGetResults", - Method: "GET", - PathPattern: "/cluster/upgrade-checks/{testRunInstanceId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradeCheckGetResultsReader{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.(*UpgradeCheckGetResultsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradeCheckGetResultsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpgradeCheckRunTests runs upgrade checks on cluster - -Run upgrade checks on cluster. -*/ -func (a *Client) UpgradeCheckRunTests(params *UpgradeCheckRunTestsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeCheckRunTestsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradeCheckRunTestsParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradeCheckRunTests", - Method: "PUT", - PathPattern: "/cluster/upgrade-checks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradeCheckRunTestsReader{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.(*UpgradeCheckRunTestsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradeCheckRunTestsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpgradeClusterSoftware upgrades cluster - -Upgrade the software on the cluster. -*/ -func (a *Client) UpgradeClusterSoftware(params *UpgradeClusterSoftwareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpgradeClusterSoftwareAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpgradeClusterSoftwareParams() - } - op := &runtime.ClientOperation{ - ID: "UpgradeClusterSoftware", - Method: "PUT", - PathPattern: "/clusters/upgrade", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpgradeClusterSoftwareReader{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.(*UpgradeClusterSoftwareAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpgradeClusterSoftwareDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UploadPackageByURL uploads package by URL - -Upload a package to the cluster by providing the URL where the package is hosted. -*/ -func (a *Client) UploadPackageByURL(params *UploadPackageByURLParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPackageByURLAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUploadPackageByURLParams() - } - op := &runtime.ClientOperation{ - ID: "UploadPackageByUrl", - Method: "POST", - PathPattern: "/clusters/packages/url", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UploadPackageByURLReader{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.(*UploadPackageByURLAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UploadPackageByURLDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ValidateSMTPConfiguration validates SMTP configuration - -Validate SMTP configuration by sending a test email. -*/ -func (a *Client) ValidateSMTPConfiguration(params *ValidateSMTPConfigurationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateSMTPConfigurationNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewValidateSMTPConfigurationParams() - } - op := &runtime.ClientOperation{ - ID: "ValidateSMTPConfiguration", - Method: "POST", - PathPattern: "/clusters/smtp/validate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ValidateSMTPConfigurationReader{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.(*ValidateSMTPConfigurationNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ValidateSMTPConfigurationDefault) - 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/v2/client/platform/public_key_request_parameters.go b/v2/client/platform/public_key_request_parameters.go deleted file mode 100644 index 7b68364c..00000000 --- a/v2/client/platform/public_key_request_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPublicKeyRequestParams creates a new PublicKeyRequestParams 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 NewPublicKeyRequestParams() *PublicKeyRequestParams { - return &PublicKeyRequestParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPublicKeyRequestParamsWithTimeout creates a new PublicKeyRequestParams object -// with the ability to set a timeout on a request. -func NewPublicKeyRequestParamsWithTimeout(timeout time.Duration) *PublicKeyRequestParams { - return &PublicKeyRequestParams{ - timeout: timeout, - } -} - -// NewPublicKeyRequestParamsWithContext creates a new PublicKeyRequestParams object -// with the ability to set a context for a request. -func NewPublicKeyRequestParamsWithContext(ctx context.Context) *PublicKeyRequestParams { - return &PublicKeyRequestParams{ - Context: ctx, - } -} - -// NewPublicKeyRequestParamsWithHTTPClient creates a new PublicKeyRequestParams object -// with the ability to set a custom HTTPClient for a request. -func NewPublicKeyRequestParamsWithHTTPClient(client *http.Client) *PublicKeyRequestParams { - return &PublicKeyRequestParams{ - HTTPClient: client, - } -} - -/* -PublicKeyRequestParams contains all the parameters to send to the API endpoint - - for the public key request operation. - - Typically these are written to a http.Request. -*/ -type PublicKeyRequestParams struct { - - /* Body. - - Specifies the parameters required to retrieve SSH public key - */ - Body *models.PublicKeyRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the public key request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublicKeyRequestParams) WithDefaults() *PublicKeyRequestParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the public key request params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PublicKeyRequestParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the public key request params -func (o *PublicKeyRequestParams) WithTimeout(timeout time.Duration) *PublicKeyRequestParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the public key request params -func (o *PublicKeyRequestParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the public key request params -func (o *PublicKeyRequestParams) WithContext(ctx context.Context) *PublicKeyRequestParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the public key request params -func (o *PublicKeyRequestParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the public key request params -func (o *PublicKeyRequestParams) WithHTTPClient(client *http.Client) *PublicKeyRequestParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the public key request params -func (o *PublicKeyRequestParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the public key request params -func (o *PublicKeyRequestParams) WithBody(body *models.PublicKeyRequest) *PublicKeyRequestParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the public key request params -func (o *PublicKeyRequestParams) SetBody(body *models.PublicKeyRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PublicKeyRequestParams) 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/public_key_request_responses.go b/v2/client/platform/public_key_request_responses.go deleted file mode 100644 index 40d3f5c9..00000000 --- a/v2/client/platform/public_key_request_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PublicKeyRequestReader is a Reader for the PublicKeyRequest structure. -type PublicKeyRequestReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PublicKeyRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPublicKeyRequestOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPublicKeyRequestDefault(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 - } -} - -// NewPublicKeyRequestOK creates a PublicKeyRequestOK with default headers values -func NewPublicKeyRequestOK() *PublicKeyRequestOK { - return &PublicKeyRequestOK{} -} - -/* -PublicKeyRequestOK describes a response with status code 200, with default header values. - -Describes the structure of SSH public key. -*/ -type PublicKeyRequestOK struct { - Payload *models.PublicKeyResponse -} - -// IsSuccess returns true when this public key request o k response has a 2xx status code -func (o *PublicKeyRequestOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this public key request o k response has a 3xx status code -func (o *PublicKeyRequestOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this public key request o k response has a 4xx status code -func (o *PublicKeyRequestOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this public key request o k response has a 5xx status code -func (o *PublicKeyRequestOK) IsServerError() bool { - return false -} - -// IsCode returns true when this public key request o k response a status code equal to that given -func (o *PublicKeyRequestOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the public key request o k response -func (o *PublicKeyRequestOK) Code() int { - return 200 -} - -func (o *PublicKeyRequestOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/ssh-public-key][%d] publicKeyRequestOK %s", 200, payload) -} - -func (o *PublicKeyRequestOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/ssh-public-key][%d] publicKeyRequestOK %s", 200, payload) -} - -func (o *PublicKeyRequestOK) GetPayload() *models.PublicKeyResponse { - return o.Payload -} - -func (o *PublicKeyRequestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PublicKeyResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPublicKeyRequestDefault creates a PublicKeyRequestDefault with default headers values -func NewPublicKeyRequestDefault(code int) *PublicKeyRequestDefault { - return &PublicKeyRequestDefault{ - _statusCode: code, - } -} - -/* -PublicKeyRequestDefault describes a response with status code -1, with default header values. - -Error -*/ -type PublicKeyRequestDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this public key request default response has a 2xx status code -func (o *PublicKeyRequestDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this public key request default response has a 3xx status code -func (o *PublicKeyRequestDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this public key request default response has a 4xx status code -func (o *PublicKeyRequestDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this public key request default response has a 5xx status code -func (o *PublicKeyRequestDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this public key request default response a status code equal to that given -func (o *PublicKeyRequestDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the public key request default response -func (o *PublicKeyRequestDefault) Code() int { - return o._statusCode -} - -func (o *PublicKeyRequestDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/ssh-public-key][%d] PublicKeyRequest default %s", o._statusCode, payload) -} - -func (o *PublicKeyRequestDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/ssh-public-key][%d] PublicKeyRequest default %s", o._statusCode, payload) -} - -func (o *PublicKeyRequestDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PublicKeyRequestDefault) 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/remove_remote_disk_parameters.go b/v2/client/platform/remove_remote_disk_parameters.go deleted file mode 100644 index 91b04ab4..00000000 --- a/v2/client/platform/remove_remote_disk_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewRemoveRemoteDiskParams creates a new RemoveRemoteDiskParams 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 NewRemoveRemoteDiskParams() *RemoveRemoteDiskParams { - return &RemoveRemoteDiskParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveRemoteDiskParamsWithTimeout creates a new RemoveRemoteDiskParams object -// with the ability to set a timeout on a request. -func NewRemoveRemoteDiskParamsWithTimeout(timeout time.Duration) *RemoveRemoteDiskParams { - return &RemoveRemoteDiskParams{ - timeout: timeout, - } -} - -// NewRemoveRemoteDiskParamsWithContext creates a new RemoveRemoteDiskParams object -// with the ability to set a context for a request. -func NewRemoveRemoteDiskParamsWithContext(ctx context.Context) *RemoveRemoteDiskParams { - return &RemoveRemoteDiskParams{ - Context: ctx, - } -} - -// NewRemoveRemoteDiskParamsWithHTTPClient creates a new RemoveRemoteDiskParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveRemoteDiskParamsWithHTTPClient(client *http.Client) *RemoveRemoteDiskParams { - return &RemoveRemoteDiskParams{ - HTTPClient: client, - } -} - -/* -RemoveRemoteDiskParams contains all the parameters to send to the API endpoint - - for the remove remote disk operation. - - Typically these are written to a http.Request. -*/ -type RemoveRemoteDiskParams struct { - - /* ID. - - Specifies the id of the remote disk to remove. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove remote disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveRemoteDiskParams) WithDefaults() *RemoveRemoteDiskParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove remote disk params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveRemoteDiskParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove remote disk params -func (o *RemoveRemoteDiskParams) WithTimeout(timeout time.Duration) *RemoveRemoteDiskParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove remote disk params -func (o *RemoveRemoteDiskParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove remote disk params -func (o *RemoveRemoteDiskParams) WithContext(ctx context.Context) *RemoveRemoteDiskParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove remote disk params -func (o *RemoveRemoteDiskParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove remote disk params -func (o *RemoveRemoteDiskParams) WithHTTPClient(client *http.Client) *RemoveRemoteDiskParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove remote disk params -func (o *RemoveRemoteDiskParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the remove remote disk params -func (o *RemoveRemoteDiskParams) WithID(id int64) *RemoveRemoteDiskParams { - o.SetID(id) - return o -} - -// SetID adds the id to the remove remote disk params -func (o *RemoveRemoteDiskParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveRemoteDiskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/remove_remote_disk_responses.go b/v2/client/platform/remove_remote_disk_responses.go deleted file mode 100644 index 83037829..00000000 --- a/v2/client/platform/remove_remote_disk_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RemoveRemoteDiskReader is a Reader for the RemoveRemoteDisk structure. -type RemoveRemoteDiskReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveRemoteDiskReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveRemoteDiskNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveRemoteDiskDefault(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 - } -} - -// NewRemoveRemoteDiskNoContent creates a RemoveRemoteDiskNoContent with default headers values -func NewRemoveRemoteDiskNoContent() *RemoveRemoteDiskNoContent { - return &RemoveRemoteDiskNoContent{} -} - -/* -RemoveRemoteDiskNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveRemoteDiskNoContent struct { -} - -// IsSuccess returns true when this remove remote disk no content response has a 2xx status code -func (o *RemoveRemoteDiskNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove remote disk no content response has a 3xx status code -func (o *RemoveRemoteDiskNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove remote disk no content response has a 4xx status code -func (o *RemoveRemoteDiskNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove remote disk no content response has a 5xx status code -func (o *RemoveRemoteDiskNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove remote disk no content response a status code equal to that given -func (o *RemoveRemoteDiskNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove remote disk no content response -func (o *RemoveRemoteDiskNoContent) Code() int { - return 204 -} - -func (o *RemoveRemoteDiskNoContent) Error() string { - return fmt.Sprintf("[DELETE /disks/remote/{id}][%d] removeRemoteDiskNoContent", 204) -} - -func (o *RemoveRemoteDiskNoContent) String() string { - return fmt.Sprintf("[DELETE /disks/remote/{id}][%d] removeRemoteDiskNoContent", 204) -} - -func (o *RemoveRemoteDiskNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveRemoteDiskDefault creates a RemoveRemoteDiskDefault with default headers values -func NewRemoveRemoteDiskDefault(code int) *RemoveRemoteDiskDefault { - return &RemoveRemoteDiskDefault{ - _statusCode: code, - } -} - -/* -RemoveRemoteDiskDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveRemoteDiskDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this remove remote disk default response has a 2xx status code -func (o *RemoveRemoteDiskDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove remote disk default response has a 3xx status code -func (o *RemoveRemoteDiskDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove remote disk default response has a 4xx status code -func (o *RemoveRemoteDiskDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove remote disk default response has a 5xx status code -func (o *RemoveRemoteDiskDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove remote disk default response a status code equal to that given -func (o *RemoveRemoteDiskDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove remote disk default response -func (o *RemoveRemoteDiskDefault) Code() int { - return o._statusCode -} - -func (o *RemoveRemoteDiskDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/remote/{id}][%d] RemoveRemoteDisk default %s", o._statusCode, payload) -} - -func (o *RemoveRemoteDiskDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /disks/remote/{id}][%d] RemoveRemoteDisk default %s", o._statusCode, payload) -} - -func (o *RemoveRemoteDiskDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RemoveRemoteDiskDefault) 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/set_node_power_parameters.go b/v2/client/platform/set_node_power_parameters.go deleted file mode 100644 index 0b3f24ee..00000000 --- a/v2/client/platform/set_node_power_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewSetNodePowerParams creates a new SetNodePowerParams 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 NewSetNodePowerParams() *SetNodePowerParams { - return &SetNodePowerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSetNodePowerParamsWithTimeout creates a new SetNodePowerParams object -// with the ability to set a timeout on a request. -func NewSetNodePowerParamsWithTimeout(timeout time.Duration) *SetNodePowerParams { - return &SetNodePowerParams{ - timeout: timeout, - } -} - -// NewSetNodePowerParamsWithContext creates a new SetNodePowerParams object -// with the ability to set a context for a request. -func NewSetNodePowerParamsWithContext(ctx context.Context) *SetNodePowerParams { - return &SetNodePowerParams{ - Context: ctx, - } -} - -// NewSetNodePowerParamsWithHTTPClient creates a new SetNodePowerParams object -// with the ability to set a custom HTTPClient for a request. -func NewSetNodePowerParamsWithHTTPClient(client *http.Client) *SetNodePowerParams { - return &SetNodePowerParams{ - HTTPClient: client, - } -} - -/* -SetNodePowerParams contains all the parameters to send to the API endpoint - - for the set node power operation. - - Typically these are written to a http.Request. -*/ -type SetNodePowerParams struct { - - /* Body. - - Specifies the reboot or shutdown operation. - */ - Body *models.NodePowerOperation - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the set node power params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SetNodePowerParams) WithDefaults() *SetNodePowerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the set node power params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SetNodePowerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the set node power params -func (o *SetNodePowerParams) WithTimeout(timeout time.Duration) *SetNodePowerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the set node power params -func (o *SetNodePowerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the set node power params -func (o *SetNodePowerParams) WithContext(ctx context.Context) *SetNodePowerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the set node power params -func (o *SetNodePowerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the set node power params -func (o *SetNodePowerParams) WithHTTPClient(client *http.Client) *SetNodePowerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the set node power params -func (o *SetNodePowerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the set node power params -func (o *SetNodePowerParams) WithBody(body *models.NodePowerOperation) *SetNodePowerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the set node power params -func (o *SetNodePowerParams) SetBody(body *models.NodePowerOperation) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *SetNodePowerParams) 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/set_node_power_responses.go b/v2/client/platform/set_node_power_responses.go deleted file mode 100644 index f7c52f1a..00000000 --- a/v2/client/platform/set_node_power_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SetNodePowerReader is a Reader for the SetNodePower structure. -type SetNodePowerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SetNodePowerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewSetNodePowerNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSetNodePowerDefault(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 - } -} - -// NewSetNodePowerNoContent creates a SetNodePowerNoContent with default headers values -func NewSetNodePowerNoContent() *SetNodePowerNoContent { - return &SetNodePowerNoContent{} -} - -/* -SetNodePowerNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type SetNodePowerNoContent struct { -} - -// IsSuccess returns true when this set node power no content response has a 2xx status code -func (o *SetNodePowerNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this set node power no content response has a 3xx status code -func (o *SetNodePowerNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this set node power no content response has a 4xx status code -func (o *SetNodePowerNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this set node power no content response has a 5xx status code -func (o *SetNodePowerNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this set node power no content response a status code equal to that given -func (o *SetNodePowerNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the set node power no content response -func (o *SetNodePowerNoContent) Code() int { - return 204 -} - -func (o *SetNodePowerNoContent) Error() string { - return fmt.Sprintf("[POST /node-power][%d] setNodePowerNoContent", 204) -} - -func (o *SetNodePowerNoContent) String() string { - return fmt.Sprintf("[POST /node-power][%d] setNodePowerNoContent", 204) -} - -func (o *SetNodePowerNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewSetNodePowerDefault creates a SetNodePowerDefault with default headers values -func NewSetNodePowerDefault(code int) *SetNodePowerDefault { - return &SetNodePowerDefault{ - _statusCode: code, - } -} - -/* -SetNodePowerDefault describes a response with status code -1, with default header values. - -Error -*/ -type SetNodePowerDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this set node power default response has a 2xx status code -func (o *SetNodePowerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this set node power default response has a 3xx status code -func (o *SetNodePowerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this set node power default response has a 4xx status code -func (o *SetNodePowerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this set node power default response has a 5xx status code -func (o *SetNodePowerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this set node power default response a status code equal to that given -func (o *SetNodePowerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the set node power default response -func (o *SetNodePowerDefault) Code() int { - return o._statusCode -} - -func (o *SetNodePowerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-power][%d] SetNodePower default %s", o._statusCode, payload) -} - -func (o *SetNodePowerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /node-power][%d] SetNodePower default %s", o._statusCode, payload) -} - -func (o *SetNodePowerDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SetNodePowerDefault) 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/update_a_m_q_p_target_config_parameters.go b/v2/client/platform/update_a_m_q_p_target_config_parameters.go deleted file mode 100644 index ce6eee61..00000000 --- a/v2/client/platform/update_a_m_q_p_target_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateAMQPTargetConfigParams creates a new UpdateAMQPTargetConfigParams 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 NewUpdateAMQPTargetConfigParams() *UpdateAMQPTargetConfigParams { - return &UpdateAMQPTargetConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAMQPTargetConfigParamsWithTimeout creates a new UpdateAMQPTargetConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateAMQPTargetConfigParamsWithTimeout(timeout time.Duration) *UpdateAMQPTargetConfigParams { - return &UpdateAMQPTargetConfigParams{ - timeout: timeout, - } -} - -// NewUpdateAMQPTargetConfigParamsWithContext creates a new UpdateAMQPTargetConfigParams object -// with the ability to set a context for a request. -func NewUpdateAMQPTargetConfigParamsWithContext(ctx context.Context) *UpdateAMQPTargetConfigParams { - return &UpdateAMQPTargetConfigParams{ - Context: ctx, - } -} - -// NewUpdateAMQPTargetConfigParamsWithHTTPClient creates a new UpdateAMQPTargetConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAMQPTargetConfigParamsWithHTTPClient(client *http.Client) *UpdateAMQPTargetConfigParams { - return &UpdateAMQPTargetConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateAMQPTargetConfigParams contains all the parameters to send to the API endpoint - - for the update a m q p target config operation. - - Typically these are written to a http.Request. -*/ -type UpdateAMQPTargetConfigParams struct { - - /* Body. - - Specifies the parameters to update cluster AMQP target config. - */ - Body *models.ClusterAMQPTargetConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAMQPTargetConfigParams) WithDefaults() *UpdateAMQPTargetConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update a m q p target config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAMQPTargetConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) WithTimeout(timeout time.Duration) *UpdateAMQPTargetConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) WithContext(ctx context.Context) *UpdateAMQPTargetConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) WithHTTPClient(client *http.Client) *UpdateAMQPTargetConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) WithBody(body *models.ClusterAMQPTargetConfig) *UpdateAMQPTargetConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update a m q p target config params -func (o *UpdateAMQPTargetConfigParams) SetBody(body *models.ClusterAMQPTargetConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAMQPTargetConfigParams) 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_a_m_q_p_target_config_responses.go b/v2/client/platform/update_a_m_q_p_target_config_responses.go deleted file mode 100644 index b0c6dfd4..00000000 --- a/v2/client/platform/update_a_m_q_p_target_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateAMQPTargetConfigReader is a Reader for the UpdateAMQPTargetConfig structure. -type UpdateAMQPTargetConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAMQPTargetConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateAMQPTargetConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAMQPTargetConfigDefault(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 - } -} - -// NewUpdateAMQPTargetConfigOK creates a UpdateAMQPTargetConfigOK with default headers values -func NewUpdateAMQPTargetConfigOK() *UpdateAMQPTargetConfigOK { - return &UpdateAMQPTargetConfigOK{} -} - -/* -UpdateAMQPTargetConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateAMQPTargetConfigOK struct { - Payload *models.ClusterAMQPTargetConfig -} - -// IsSuccess returns true when this update a m q p target config o k response has a 2xx status code -func (o *UpdateAMQPTargetConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update a m q p target config o k response has a 3xx status code -func (o *UpdateAMQPTargetConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update a m q p target config o k response has a 4xx status code -func (o *UpdateAMQPTargetConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update a m q p target config o k response has a 5xx status code -func (o *UpdateAMQPTargetConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update a m q p target config o k response a status code equal to that given -func (o *UpdateAMQPTargetConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update a m q p target config o k response -func (o *UpdateAMQPTargetConfigOK) Code() int { - return 200 -} - -func (o *UpdateAMQPTargetConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/amqp-target-config][%d] updateAMQPTargetConfigOK %s", 200, payload) -} - -func (o *UpdateAMQPTargetConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/amqp-target-config][%d] updateAMQPTargetConfigOK %s", 200, payload) -} - -func (o *UpdateAMQPTargetConfigOK) GetPayload() *models.ClusterAMQPTargetConfig { - return o.Payload -} - -func (o *UpdateAMQPTargetConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterAMQPTargetConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAMQPTargetConfigDefault creates a UpdateAMQPTargetConfigDefault with default headers values -func NewUpdateAMQPTargetConfigDefault(code int) *UpdateAMQPTargetConfigDefault { - return &UpdateAMQPTargetConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateAMQPTargetConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAMQPTargetConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update a m q p target config default response has a 2xx status code -func (o *UpdateAMQPTargetConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update a m q p target config default response has a 3xx status code -func (o *UpdateAMQPTargetConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update a m q p target config default response has a 4xx status code -func (o *UpdateAMQPTargetConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update a m q p target config default response has a 5xx status code -func (o *UpdateAMQPTargetConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update a m q p target config default response a status code equal to that given -func (o *UpdateAMQPTargetConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update a m q p target config default response -func (o *UpdateAMQPTargetConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAMQPTargetConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/amqp-target-config][%d] UpdateAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *UpdateAMQPTargetConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/amqp-target-config][%d] UpdateAMQPTargetConfig default %s", o._statusCode, payload) -} - -func (o *UpdateAMQPTargetConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateAMQPTargetConfigDefault) 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/update_airgap_config_parameters.go b/v2/client/platform/update_airgap_config_parameters.go deleted file mode 100644 index 2175d3f0..00000000 --- a/v2/client/platform/update_airgap_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateAirgapConfigParams creates a new UpdateAirgapConfigParams 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 NewUpdateAirgapConfigParams() *UpdateAirgapConfigParams { - return &UpdateAirgapConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateAirgapConfigParamsWithTimeout creates a new UpdateAirgapConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateAirgapConfigParamsWithTimeout(timeout time.Duration) *UpdateAirgapConfigParams { - return &UpdateAirgapConfigParams{ - timeout: timeout, - } -} - -// NewUpdateAirgapConfigParamsWithContext creates a new UpdateAirgapConfigParams object -// with the ability to set a context for a request. -func NewUpdateAirgapConfigParamsWithContext(ctx context.Context) *UpdateAirgapConfigParams { - return &UpdateAirgapConfigParams{ - Context: ctx, - } -} - -// NewUpdateAirgapConfigParamsWithHTTPClient creates a new UpdateAirgapConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateAirgapConfigParamsWithHTTPClient(client *http.Client) *UpdateAirgapConfigParams { - return &UpdateAirgapConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateAirgapConfigParams contains all the parameters to send to the API endpoint - - for the update airgap config operation. - - Typically these are written to a http.Request. -*/ -type UpdateAirgapConfigParams struct { - - /* Body. - - Specifies the parameters to update airgap config. - */ - Body *models.AirgapConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update airgap config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAirgapConfigParams) WithDefaults() *UpdateAirgapConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update airgap config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateAirgapConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update airgap config params -func (o *UpdateAirgapConfigParams) WithTimeout(timeout time.Duration) *UpdateAirgapConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update airgap config params -func (o *UpdateAirgapConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update airgap config params -func (o *UpdateAirgapConfigParams) WithContext(ctx context.Context) *UpdateAirgapConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update airgap config params -func (o *UpdateAirgapConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update airgap config params -func (o *UpdateAirgapConfigParams) WithHTTPClient(client *http.Client) *UpdateAirgapConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update airgap config params -func (o *UpdateAirgapConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update airgap config params -func (o *UpdateAirgapConfigParams) WithBody(body *models.AirgapConfig) *UpdateAirgapConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update airgap config params -func (o *UpdateAirgapConfigParams) SetBody(body *models.AirgapConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateAirgapConfigParams) 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_airgap_config_responses.go b/v2/client/platform/update_airgap_config_responses.go deleted file mode 100644 index dec64ae1..00000000 --- a/v2/client/platform/update_airgap_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateAirgapConfigReader is a Reader for the UpdateAirgapConfig structure. -type UpdateAirgapConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateAirgapConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpdateAirgapConfigAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateAirgapConfigDefault(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 - } -} - -// NewUpdateAirgapConfigAccepted creates a UpdateAirgapConfigAccepted with default headers values -func NewUpdateAirgapConfigAccepted() *UpdateAirgapConfigAccepted { - return &UpdateAirgapConfigAccepted{} -} - -/* -UpdateAirgapConfigAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UpdateAirgapConfigAccepted struct { - Payload *models.AirgapConfig -} - -// IsSuccess returns true when this update airgap config accepted response has a 2xx status code -func (o *UpdateAirgapConfigAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update airgap config accepted response has a 3xx status code -func (o *UpdateAirgapConfigAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update airgap config accepted response has a 4xx status code -func (o *UpdateAirgapConfigAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this update airgap config accepted response has a 5xx status code -func (o *UpdateAirgapConfigAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this update airgap config accepted response a status code equal to that given -func (o *UpdateAirgapConfigAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the update airgap config accepted response -func (o *UpdateAirgapConfigAccepted) Code() int { - return 202 -} - -func (o *UpdateAirgapConfigAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/airgap][%d] updateAirgapConfigAccepted %s", 202, payload) -} - -func (o *UpdateAirgapConfigAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/airgap][%d] updateAirgapConfigAccepted %s", 202, payload) -} - -func (o *UpdateAirgapConfigAccepted) GetPayload() *models.AirgapConfig { - return o.Payload -} - -func (o *UpdateAirgapConfigAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AirgapConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateAirgapConfigDefault creates a UpdateAirgapConfigDefault with default headers values -func NewUpdateAirgapConfigDefault(code int) *UpdateAirgapConfigDefault { - return &UpdateAirgapConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateAirgapConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateAirgapConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update airgap config default response has a 2xx status code -func (o *UpdateAirgapConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update airgap config default response has a 3xx status code -func (o *UpdateAirgapConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update airgap config default response has a 4xx status code -func (o *UpdateAirgapConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update airgap config default response has a 5xx status code -func (o *UpdateAirgapConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update airgap config default response a status code equal to that given -func (o *UpdateAirgapConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update airgap config default response -func (o *UpdateAirgapConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateAirgapConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/airgap][%d] UpdateAirgapConfig default %s", o._statusCode, payload) -} - -func (o *UpdateAirgapConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/airgap][%d] UpdateAirgapConfig default %s", o._statusCode, payload) -} - -func (o *UpdateAirgapConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateAirgapConfigDefault) 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/update_chassis_by_id_parameters.go b/v2/client/platform/update_chassis_by_id_parameters.go deleted file mode 100644 index e1d91453..00000000 --- a/v2/client/platform/update_chassis_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateChassisByIDParams creates a new UpdateChassisByIDParams 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 NewUpdateChassisByIDParams() *UpdateChassisByIDParams { - return &UpdateChassisByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateChassisByIDParamsWithTimeout creates a new UpdateChassisByIDParams object -// with the ability to set a timeout on a request. -func NewUpdateChassisByIDParamsWithTimeout(timeout time.Duration) *UpdateChassisByIDParams { - return &UpdateChassisByIDParams{ - timeout: timeout, - } -} - -// NewUpdateChassisByIDParamsWithContext creates a new UpdateChassisByIDParams object -// with the ability to set a context for a request. -func NewUpdateChassisByIDParamsWithContext(ctx context.Context) *UpdateChassisByIDParams { - return &UpdateChassisByIDParams{ - Context: ctx, - } -} - -// NewUpdateChassisByIDParamsWithHTTPClient creates a new UpdateChassisByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateChassisByIDParamsWithHTTPClient(client *http.Client) *UpdateChassisByIDParams { - return &UpdateChassisByIDParams{ - HTTPClient: client, - } -} - -/* -UpdateChassisByIDParams contains all the parameters to send to the API endpoint - - for the update chassis by Id operation. - - Typically these are written to a http.Request. -*/ -type UpdateChassisByIDParams struct { - - /* Body. - - Specifies the parameters to update chassis. - */ - Body *models.Chassis - - /* ID. - - Specifies the id of chassis. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update chassis by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateChassisByIDParams) WithDefaults() *UpdateChassisByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update chassis by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateChassisByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update chassis by Id params -func (o *UpdateChassisByIDParams) WithTimeout(timeout time.Duration) *UpdateChassisByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update chassis by Id params -func (o *UpdateChassisByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update chassis by Id params -func (o *UpdateChassisByIDParams) WithContext(ctx context.Context) *UpdateChassisByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update chassis by Id params -func (o *UpdateChassisByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update chassis by Id params -func (o *UpdateChassisByIDParams) WithHTTPClient(client *http.Client) *UpdateChassisByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update chassis by Id params -func (o *UpdateChassisByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update chassis by Id params -func (o *UpdateChassisByIDParams) WithBody(body *models.Chassis) *UpdateChassisByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update chassis by Id params -func (o *UpdateChassisByIDParams) SetBody(body *models.Chassis) { - o.Body = body -} - -// WithID adds the id to the update chassis by Id params -func (o *UpdateChassisByIDParams) WithID(id int64) *UpdateChassisByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update chassis by Id params -func (o *UpdateChassisByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateChassisByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/update_chassis_by_id_responses.go b/v2/client/platform/update_chassis_by_id_responses.go deleted file mode 100644 index a6a7b26e..00000000 --- a/v2/client/platform/update_chassis_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateChassisByIDReader is a Reader for the UpdateChassisByID structure. -type UpdateChassisByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateChassisByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateChassisByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateChassisByIDDefault(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 - } -} - -// NewUpdateChassisByIDOK creates a UpdateChassisByIDOK with default headers values -func NewUpdateChassisByIDOK() *UpdateChassisByIDOK { - return &UpdateChassisByIDOK{} -} - -/* -UpdateChassisByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateChassisByIDOK struct { - Payload *models.Chassis -} - -// IsSuccess returns true when this update chassis by Id o k response has a 2xx status code -func (o *UpdateChassisByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update chassis by Id o k response has a 3xx status code -func (o *UpdateChassisByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update chassis by Id o k response has a 4xx status code -func (o *UpdateChassisByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update chassis by Id o k response has a 5xx status code -func (o *UpdateChassisByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update chassis by Id o k response a status code equal to that given -func (o *UpdateChassisByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update chassis by Id o k response -func (o *UpdateChassisByIDOK) Code() int { - return 200 -} - -func (o *UpdateChassisByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /chassis/{id}][%d] updateChassisByIdOK %s", 200, payload) -} - -func (o *UpdateChassisByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /chassis/{id}][%d] updateChassisByIdOK %s", 200, payload) -} - -func (o *UpdateChassisByIDOK) GetPayload() *models.Chassis { - return o.Payload -} - -func (o *UpdateChassisByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Chassis) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateChassisByIDDefault creates a UpdateChassisByIDDefault with default headers values -func NewUpdateChassisByIDDefault(code int) *UpdateChassisByIDDefault { - return &UpdateChassisByIDDefault{ - _statusCode: code, - } -} - -/* -UpdateChassisByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateChassisByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update chassis by Id default response has a 2xx status code -func (o *UpdateChassisByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update chassis by Id default response has a 3xx status code -func (o *UpdateChassisByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update chassis by Id default response has a 4xx status code -func (o *UpdateChassisByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update chassis by Id default response has a 5xx status code -func (o *UpdateChassisByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update chassis by Id default response a status code equal to that given -func (o *UpdateChassisByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update chassis by Id default response -func (o *UpdateChassisByIDDefault) Code() int { - return o._statusCode -} - -func (o *UpdateChassisByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /chassis/{id}][%d] UpdateChassisById default %s", o._statusCode, payload) -} - -func (o *UpdateChassisByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /chassis/{id}][%d] UpdateChassisById default %s", o._statusCode, payload) -} - -func (o *UpdateChassisByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateChassisByIDDefault) 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/update_cluster_parameters.go b/v2/client/platform/update_cluster_parameters.go deleted file mode 100644 index f2cbaff0..00000000 --- a/v2/client/platform/update_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateClusterParams creates a new UpdateClusterParams 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 NewUpdateClusterParams() *UpdateClusterParams { - return &UpdateClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateClusterParamsWithTimeout creates a new UpdateClusterParams object -// with the ability to set a timeout on a request. -func NewUpdateClusterParamsWithTimeout(timeout time.Duration) *UpdateClusterParams { - return &UpdateClusterParams{ - timeout: timeout, - } -} - -// NewUpdateClusterParamsWithContext creates a new UpdateClusterParams object -// with the ability to set a context for a request. -func NewUpdateClusterParamsWithContext(ctx context.Context) *UpdateClusterParams { - return &UpdateClusterParams{ - Context: ctx, - } -} - -// NewUpdateClusterParamsWithHTTPClient creates a new UpdateClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateClusterParamsWithHTTPClient(client *http.Client) *UpdateClusterParams { - return &UpdateClusterParams{ - HTTPClient: client, - } -} - -/* -UpdateClusterParams contains all the parameters to send to the API endpoint - - for the update cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdateClusterParams struct { - - /* Body. - - Specifies the parameters to update cluster. - */ - Body *models.Cluster - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterParams) WithDefaults() *UpdateClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update cluster params -func (o *UpdateClusterParams) WithTimeout(timeout time.Duration) *UpdateClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update cluster params -func (o *UpdateClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update cluster params -func (o *UpdateClusterParams) WithContext(ctx context.Context) *UpdateClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update cluster params -func (o *UpdateClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update cluster params -func (o *UpdateClusterParams) WithHTTPClient(client *http.Client) *UpdateClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update cluster params -func (o *UpdateClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update cluster params -func (o *UpdateClusterParams) WithBody(body *models.Cluster) *UpdateClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update cluster params -func (o *UpdateClusterParams) SetBody(body *models.Cluster) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateClusterParams) 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_responses.go b/v2/client/platform/update_cluster_responses.go deleted file mode 100644 index cbc2c2d8..00000000 --- a/v2/client/platform/update_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateClusterReader is a Reader for the UpdateCluster structure. -type UpdateClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateClusterDefault(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 - } -} - -// NewUpdateClusterOK creates a UpdateClusterOK with default headers values -func NewUpdateClusterOK() *UpdateClusterOK { - return &UpdateClusterOK{} -} - -/* -UpdateClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateClusterOK struct { - Payload *models.Cluster -} - -// IsSuccess returns true when this update cluster o k response has a 2xx status code -func (o *UpdateClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update cluster o k response has a 3xx status code -func (o *UpdateClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update cluster o k response has a 4xx status code -func (o *UpdateClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update cluster o k response has a 5xx status code -func (o *UpdateClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update cluster o k response a status code equal to that given -func (o *UpdateClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update cluster o k response -func (o *UpdateClusterOK) Code() int { - return 200 -} - -func (o *UpdateClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters][%d] updateClusterOK %s", 200, payload) -} - -func (o *UpdateClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters][%d] updateClusterOK %s", 200, payload) -} - -func (o *UpdateClusterOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *UpdateClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateClusterDefault creates a UpdateClusterDefault with default headers values -func NewUpdateClusterDefault(code int) *UpdateClusterDefault { - return &UpdateClusterDefault{ - _statusCode: code, - } -} - -/* -UpdateClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update cluster default response has a 2xx status code -func (o *UpdateClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update cluster default response has a 3xx status code -func (o *UpdateClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update cluster default response has a 4xx status code -func (o *UpdateClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update cluster default response has a 5xx status code -func (o *UpdateClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update cluster default response a status code equal to that given -func (o *UpdateClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update cluster default response -func (o *UpdateClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdateClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters][%d] UpdateCluster default %s", o._statusCode, payload) -} - -func (o *UpdateClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters][%d] UpdateCluster default %s", o._statusCode, payload) -} - -func (o *UpdateClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateClusterDefault) 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/update_cluster_vlan_parameters.go b/v2/client/platform/update_cluster_vlan_parameters.go deleted file mode 100644 index b876a659..00000000 --- a/v2/client/platform/update_cluster_vlan_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateClusterVlanParams creates a new UpdateClusterVlanParams 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 NewUpdateClusterVlanParams() *UpdateClusterVlanParams { - return &UpdateClusterVlanParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateClusterVlanParamsWithTimeout creates a new UpdateClusterVlanParams object -// with the ability to set a timeout on a request. -func NewUpdateClusterVlanParamsWithTimeout(timeout time.Duration) *UpdateClusterVlanParams { - return &UpdateClusterVlanParams{ - timeout: timeout, - } -} - -// NewUpdateClusterVlanParamsWithContext creates a new UpdateClusterVlanParams object -// with the ability to set a context for a request. -func NewUpdateClusterVlanParamsWithContext(ctx context.Context) *UpdateClusterVlanParams { - return &UpdateClusterVlanParams{ - Context: ctx, - } -} - -// NewUpdateClusterVlanParamsWithHTTPClient creates a new UpdateClusterVlanParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateClusterVlanParamsWithHTTPClient(client *http.Client) *UpdateClusterVlanParams { - return &UpdateClusterVlanParams{ - HTTPClient: client, - } -} - -/* -UpdateClusterVlanParams contains all the parameters to send to the API endpoint - - for the update cluster vlan operation. - - Typically these are written to a http.Request. -*/ -type UpdateClusterVlanParams struct { - - /* Body. - - Parameters to update vlan on the cluster. - */ - Body *models.UpdateClusterVlanParams - - /* InterfaceName. - - Vlan interface name, it should be in interface_group_name.vlan_id format. - */ - InterfaceName string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterVlanParams) WithDefaults() *UpdateClusterVlanParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update cluster vlan params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateClusterVlanParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update cluster vlan params -func (o *UpdateClusterVlanParams) WithTimeout(timeout time.Duration) *UpdateClusterVlanParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update cluster vlan params -func (o *UpdateClusterVlanParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update cluster vlan params -func (o *UpdateClusterVlanParams) WithContext(ctx context.Context) *UpdateClusterVlanParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update cluster vlan params -func (o *UpdateClusterVlanParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update cluster vlan params -func (o *UpdateClusterVlanParams) WithHTTPClient(client *http.Client) *UpdateClusterVlanParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update cluster vlan params -func (o *UpdateClusterVlanParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update cluster vlan params -func (o *UpdateClusterVlanParams) WithBody(body *models.UpdateClusterVlanParams) *UpdateClusterVlanParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update cluster vlan params -func (o *UpdateClusterVlanParams) SetBody(body *models.UpdateClusterVlanParams) { - o.Body = body -} - -// WithInterfaceName adds the interfaceName to the update cluster vlan params -func (o *UpdateClusterVlanParams) WithInterfaceName(interfaceName string) *UpdateClusterVlanParams { - o.SetInterfaceName(interfaceName) - return o -} - -// SetInterfaceName adds the interfaceName to the update cluster vlan params -func (o *UpdateClusterVlanParams) SetInterfaceName(interfaceName string) { - o.InterfaceName = interfaceName -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateClusterVlanParams) 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 - } - } - - // path param interfaceName - if err := r.SetPathParam("interfaceName", o.InterfaceName); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/update_cluster_vlan_responses.go b/v2/client/platform/update_cluster_vlan_responses.go deleted file mode 100644 index 1b6e921a..00000000 --- a/v2/client/platform/update_cluster_vlan_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateClusterVlanReader is a Reader for the UpdateClusterVlan structure. -type UpdateClusterVlanReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateClusterVlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateClusterVlanOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateClusterVlanDefault(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 - } -} - -// NewUpdateClusterVlanOK creates a UpdateClusterVlanOK with default headers values -func NewUpdateClusterVlanOK() *UpdateClusterVlanOK { - return &UpdateClusterVlanOK{} -} - -/* -UpdateClusterVlanOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateClusterVlanOK struct { - Payload *models.ClusterVlanParams -} - -// IsSuccess returns true when this update cluster vlan o k response has a 2xx status code -func (o *UpdateClusterVlanOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update cluster vlan o k response has a 3xx status code -func (o *UpdateClusterVlanOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update cluster vlan o k response has a 4xx status code -func (o *UpdateClusterVlanOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update cluster vlan o k response has a 5xx status code -func (o *UpdateClusterVlanOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update cluster vlan o k response a status code equal to that given -func (o *UpdateClusterVlanOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update cluster vlan o k response -func (o *UpdateClusterVlanOK) Code() int { - return 200 -} - -func (o *UpdateClusterVlanOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/vlans/{interfaceName}][%d] updateClusterVlanOK %s", 200, payload) -} - -func (o *UpdateClusterVlanOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/vlans/{interfaceName}][%d] updateClusterVlanOK %s", 200, payload) -} - -func (o *UpdateClusterVlanOK) GetPayload() *models.ClusterVlanParams { - return o.Payload -} - -func (o *UpdateClusterVlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterVlanParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateClusterVlanDefault creates a UpdateClusterVlanDefault with default headers values -func NewUpdateClusterVlanDefault(code int) *UpdateClusterVlanDefault { - return &UpdateClusterVlanDefault{ - _statusCode: code, - } -} - -/* -UpdateClusterVlanDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateClusterVlanDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update cluster vlan default response has a 2xx status code -func (o *UpdateClusterVlanDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update cluster vlan default response has a 3xx status code -func (o *UpdateClusterVlanDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update cluster vlan default response has a 4xx status code -func (o *UpdateClusterVlanDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update cluster vlan default response has a 5xx status code -func (o *UpdateClusterVlanDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update cluster vlan default response a status code equal to that given -func (o *UpdateClusterVlanDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update cluster vlan default response -func (o *UpdateClusterVlanDefault) Code() int { - return o._statusCode -} - -func (o *UpdateClusterVlanDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/vlans/{interfaceName}][%d] UpdateClusterVlan default %s", o._statusCode, payload) -} - -func (o *UpdateClusterVlanDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/vlans/{interfaceName}][%d] UpdateClusterVlan default %s", o._statusCode, payload) -} - -func (o *UpdateClusterVlanDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateClusterVlanDefault) 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/update_feature_flag_parameters.go b/v2/client/platform/update_feature_flag_parameters.go deleted file mode 100644 index 8a4c2645..00000000 --- a/v2/client/platform/update_feature_flag_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateFeatureFlagParams creates a new UpdateFeatureFlagParams 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 NewUpdateFeatureFlagParams() *UpdateFeatureFlagParams { - return &UpdateFeatureFlagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateFeatureFlagParamsWithTimeout creates a new UpdateFeatureFlagParams object -// with the ability to set a timeout on a request. -func NewUpdateFeatureFlagParamsWithTimeout(timeout time.Duration) *UpdateFeatureFlagParams { - return &UpdateFeatureFlagParams{ - timeout: timeout, - } -} - -// NewUpdateFeatureFlagParamsWithContext creates a new UpdateFeatureFlagParams object -// with the ability to set a context for a request. -func NewUpdateFeatureFlagParamsWithContext(ctx context.Context) *UpdateFeatureFlagParams { - return &UpdateFeatureFlagParams{ - Context: ctx, - } -} - -// NewUpdateFeatureFlagParamsWithHTTPClient creates a new UpdateFeatureFlagParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateFeatureFlagParamsWithHTTPClient(client *http.Client) *UpdateFeatureFlagParams { - return &UpdateFeatureFlagParams{ - HTTPClient: client, - } -} - -/* -UpdateFeatureFlagParams contains all the parameters to send to the API endpoint - - for the update feature flag operation. - - Typically these are written to a http.Request. -*/ -type UpdateFeatureFlagParams struct { - - /* Body. - - Param for feature flag override request. - */ - Body *models.UpdateFeatureFlagParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update feature flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFeatureFlagParams) WithDefaults() *UpdateFeatureFlagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update feature flag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateFeatureFlagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update feature flag params -func (o *UpdateFeatureFlagParams) WithTimeout(timeout time.Duration) *UpdateFeatureFlagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update feature flag params -func (o *UpdateFeatureFlagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update feature flag params -func (o *UpdateFeatureFlagParams) WithContext(ctx context.Context) *UpdateFeatureFlagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update feature flag params -func (o *UpdateFeatureFlagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update feature flag params -func (o *UpdateFeatureFlagParams) WithHTTPClient(client *http.Client) *UpdateFeatureFlagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update feature flag params -func (o *UpdateFeatureFlagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update feature flag params -func (o *UpdateFeatureFlagParams) WithBody(body *models.UpdateFeatureFlagParams) *UpdateFeatureFlagParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update feature flag params -func (o *UpdateFeatureFlagParams) SetBody(body *models.UpdateFeatureFlagParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateFeatureFlagParams) 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_feature_flag_responses.go b/v2/client/platform/update_feature_flag_responses.go deleted file mode 100644 index 92245a36..00000000 --- a/v2/client/platform/update_feature_flag_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateFeatureFlagReader is a Reader for the UpdateFeatureFlag structure. -type UpdateFeatureFlagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateFeatureFlagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateFeatureFlagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateFeatureFlagDefault(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 - } -} - -// NewUpdateFeatureFlagOK creates a UpdateFeatureFlagOK with default headers values -func NewUpdateFeatureFlagOK() *UpdateFeatureFlagOK { - return &UpdateFeatureFlagOK{} -} - -/* -UpdateFeatureFlagOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateFeatureFlagOK struct { - Payload models.FeatureFlagList -} - -// IsSuccess returns true when this update feature flag o k response has a 2xx status code -func (o *UpdateFeatureFlagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update feature flag o k response has a 3xx status code -func (o *UpdateFeatureFlagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update feature flag o k response has a 4xx status code -func (o *UpdateFeatureFlagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update feature flag o k response has a 5xx status code -func (o *UpdateFeatureFlagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update feature flag o k response a status code equal to that given -func (o *UpdateFeatureFlagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update feature flag o k response -func (o *UpdateFeatureFlagOK) Code() int { - return 200 -} - -func (o *UpdateFeatureFlagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/feature-flag][%d] updateFeatureFlagOK %s", 200, payload) -} - -func (o *UpdateFeatureFlagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/feature-flag][%d] updateFeatureFlagOK %s", 200, payload) -} - -func (o *UpdateFeatureFlagOK) GetPayload() models.FeatureFlagList { - return o.Payload -} - -func (o *UpdateFeatureFlagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateFeatureFlagDefault creates a UpdateFeatureFlagDefault with default headers values -func NewUpdateFeatureFlagDefault(code int) *UpdateFeatureFlagDefault { - return &UpdateFeatureFlagDefault{ - _statusCode: code, - } -} - -/* -UpdateFeatureFlagDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateFeatureFlagDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update feature flag default response has a 2xx status code -func (o *UpdateFeatureFlagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update feature flag default response has a 3xx status code -func (o *UpdateFeatureFlagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update feature flag default response has a 4xx status code -func (o *UpdateFeatureFlagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update feature flag default response has a 5xx status code -func (o *UpdateFeatureFlagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update feature flag default response a status code equal to that given -func (o *UpdateFeatureFlagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update feature flag default response -func (o *UpdateFeatureFlagDefault) Code() int { - return o._statusCode -} - -func (o *UpdateFeatureFlagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/feature-flag][%d] UpdateFeatureFlag default %s", o._statusCode, payload) -} - -func (o *UpdateFeatureFlagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/feature-flag][%d] UpdateFeatureFlag default %s", o._statusCode, payload) -} - -func (o *UpdateFeatureFlagDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateFeatureFlagDefault) 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/update_hosts_parameters.go b/v2/client/platform/update_hosts_parameters.go deleted file mode 100644 index 5774da2f..00000000 --- a/v2/client/platform/update_hosts_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateHostsParams creates a new UpdateHostsParams 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 NewUpdateHostsParams() *UpdateHostsParams { - return &UpdateHostsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateHostsParamsWithTimeout creates a new UpdateHostsParams object -// with the ability to set a timeout on a request. -func NewUpdateHostsParamsWithTimeout(timeout time.Duration) *UpdateHostsParams { - return &UpdateHostsParams{ - timeout: timeout, - } -} - -// NewUpdateHostsParamsWithContext creates a new UpdateHostsParams object -// with the ability to set a context for a request. -func NewUpdateHostsParamsWithContext(ctx context.Context) *UpdateHostsParams { - return &UpdateHostsParams{ - Context: ctx, - } -} - -// NewUpdateHostsParamsWithHTTPClient creates a new UpdateHostsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateHostsParamsWithHTTPClient(client *http.Client) *UpdateHostsParams { - return &UpdateHostsParams{ - HTTPClient: client, - } -} - -/* -UpdateHostsParams contains all the parameters to send to the API endpoint - - for the update hosts operation. - - Typically these are written to a http.Request. -*/ -type UpdateHostsParams struct { - - // Body. - Body models.HostMappingsParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHostsParams) WithDefaults() *UpdateHostsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update hosts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateHostsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update hosts params -func (o *UpdateHostsParams) WithTimeout(timeout time.Duration) *UpdateHostsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update hosts params -func (o *UpdateHostsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update hosts params -func (o *UpdateHostsParams) WithContext(ctx context.Context) *UpdateHostsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update hosts params -func (o *UpdateHostsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update hosts params -func (o *UpdateHostsParams) WithHTTPClient(client *http.Client) *UpdateHostsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update hosts params -func (o *UpdateHostsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update hosts params -func (o *UpdateHostsParams) WithBody(body models.HostMappingsParameters) *UpdateHostsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update hosts params -func (o *UpdateHostsParams) SetBody(body models.HostMappingsParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateHostsParams) 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_hosts_responses.go b/v2/client/platform/update_hosts_responses.go deleted file mode 100644 index 86206fdb..00000000 --- a/v2/client/platform/update_hosts_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateHostsReader is a Reader for the UpdateHosts structure. -type UpdateHostsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateHostsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateHostsDefault(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 - } -} - -// NewUpdateHostsOK creates a UpdateHostsOK with default headers values -func NewUpdateHostsOK() *UpdateHostsOK { - return &UpdateHostsOK{} -} - -/* -UpdateHostsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateHostsOK struct { - Payload *models.HostMappings -} - -// IsSuccess returns true when this update hosts o k response has a 2xx status code -func (o *UpdateHostsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update hosts o k response has a 3xx status code -func (o *UpdateHostsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update hosts o k response has a 4xx status code -func (o *UpdateHostsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update hosts o k response has a 5xx status code -func (o *UpdateHostsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update hosts o k response a status code equal to that given -func (o *UpdateHostsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update hosts o k response -func (o *UpdateHostsOK) Code() int { - return 200 -} - -func (o *UpdateHostsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/host-mappings][%d] updateHostsOK %s", 200, payload) -} - -func (o *UpdateHostsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/host-mappings][%d] updateHostsOK %s", 200, payload) -} - -func (o *UpdateHostsOK) GetPayload() *models.HostMappings { - return o.Payload -} - -func (o *UpdateHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HostMappings) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateHostsDefault creates a UpdateHostsDefault with default headers values -func NewUpdateHostsDefault(code int) *UpdateHostsDefault { - return &UpdateHostsDefault{ - _statusCode: code, - } -} - -/* -UpdateHostsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateHostsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update hosts default response has a 2xx status code -func (o *UpdateHostsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update hosts default response has a 3xx status code -func (o *UpdateHostsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update hosts default response has a 4xx status code -func (o *UpdateHostsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update hosts default response has a 5xx status code -func (o *UpdateHostsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update hosts default response a status code equal to that given -func (o *UpdateHostsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update hosts default response -func (o *UpdateHostsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateHostsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/host-mappings][%d] UpdateHosts default %s", o._statusCode, payload) -} - -func (o *UpdateHostsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/host-mappings][%d] UpdateHosts default %s", o._statusCode, payload) -} - -func (o *UpdateHostsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateHostsDefault) 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/update_interface_group_parameters.go b/v2/client/platform/update_interface_group_parameters.go deleted file mode 100644 index a9cad4a0..00000000 --- a/v2/client/platform/update_interface_group_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateInterfaceGroupParams creates a new UpdateInterfaceGroupParams 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 NewUpdateInterfaceGroupParams() *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInterfaceGroupParamsWithTimeout creates a new UpdateInterfaceGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateInterfaceGroupParamsWithTimeout(timeout time.Duration) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - timeout: timeout, - } -} - -// NewUpdateInterfaceGroupParamsWithContext creates a new UpdateInterfaceGroupParams object -// with the ability to set a context for a request. -func NewUpdateInterfaceGroupParamsWithContext(ctx context.Context) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - Context: ctx, - } -} - -// NewUpdateInterfaceGroupParamsWithHTTPClient creates a new UpdateInterfaceGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInterfaceGroupParamsWithHTTPClient(client *http.Client) *UpdateInterfaceGroupParams { - return &UpdateInterfaceGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateInterfaceGroupParams contains all the parameters to send to the API endpoint - - for the update interface group operation. - - Typically these are written to a http.Request. -*/ -type UpdateInterfaceGroupParams struct { - - /* Body. - - Parameters to update an interface group on the cluster. - */ - Body *models.InterfaceGroupParams - - /* ID. - - Id of the interface group. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceGroupParams) WithDefaults() *UpdateInterfaceGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update interface group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update interface group params -func (o *UpdateInterfaceGroupParams) WithTimeout(timeout time.Duration) *UpdateInterfaceGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update interface group params -func (o *UpdateInterfaceGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update interface group params -func (o *UpdateInterfaceGroupParams) WithContext(ctx context.Context) *UpdateInterfaceGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update interface group params -func (o *UpdateInterfaceGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update interface group params -func (o *UpdateInterfaceGroupParams) WithHTTPClient(client *http.Client) *UpdateInterfaceGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update interface group params -func (o *UpdateInterfaceGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update interface group params -func (o *UpdateInterfaceGroupParams) WithBody(body *models.InterfaceGroupParams) *UpdateInterfaceGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update interface group params -func (o *UpdateInterfaceGroupParams) SetBody(body *models.InterfaceGroupParams) { - o.Body = body -} - -// WithID adds the id to the update interface group params -func (o *UpdateInterfaceGroupParams) WithID(id int32) *UpdateInterfaceGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update interface group params -func (o *UpdateInterfaceGroupParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInterfaceGroupParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/update_interface_group_responses.go b/v2/client/platform/update_interface_group_responses.go deleted file mode 100644 index 430f6b0b..00000000 --- a/v2/client/platform/update_interface_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateInterfaceGroupReader is a Reader for the UpdateInterfaceGroup structure. -type UpdateInterfaceGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInterfaceGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInterfaceGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInterfaceGroupDefault(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 - } -} - -// NewUpdateInterfaceGroupOK creates a UpdateInterfaceGroupOK with default headers values -func NewUpdateInterfaceGroupOK() *UpdateInterfaceGroupOK { - return &UpdateInterfaceGroupOK{} -} - -/* -UpdateInterfaceGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateInterfaceGroupOK struct { - Payload *models.InterfaceGroup -} - -// IsSuccess returns true when this update interface group o k response has a 2xx status code -func (o *UpdateInterfaceGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update interface group o k response has a 3xx status code -func (o *UpdateInterfaceGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update interface group o k response has a 4xx status code -func (o *UpdateInterfaceGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update interface group o k response has a 5xx status code -func (o *UpdateInterfaceGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update interface group o k response a status code equal to that given -func (o *UpdateInterfaceGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update interface group o k response -func (o *UpdateInterfaceGroupOK) Code() int { - return 200 -} - -func (o *UpdateInterfaceGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interface-groups/{id}][%d] updateInterfaceGroupOK %s", 200, payload) -} - -func (o *UpdateInterfaceGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interface-groups/{id}][%d] updateInterfaceGroupOK %s", 200, payload) -} - -func (o *UpdateInterfaceGroupOK) GetPayload() *models.InterfaceGroup { - return o.Payload -} - -func (o *UpdateInterfaceGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInterfaceGroupDefault creates a UpdateInterfaceGroupDefault with default headers values -func NewUpdateInterfaceGroupDefault(code int) *UpdateInterfaceGroupDefault { - return &UpdateInterfaceGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateInterfaceGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInterfaceGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update interface group default response has a 2xx status code -func (o *UpdateInterfaceGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update interface group default response has a 3xx status code -func (o *UpdateInterfaceGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update interface group default response has a 4xx status code -func (o *UpdateInterfaceGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update interface group default response has a 5xx status code -func (o *UpdateInterfaceGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update interface group default response a status code equal to that given -func (o *UpdateInterfaceGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update interface group default response -func (o *UpdateInterfaceGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInterfaceGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interface-groups/{id}][%d] UpdateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interface-groups/{id}][%d] UpdateInterfaceGroup default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateInterfaceGroupDefault) 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/update_interface_parameters.go b/v2/client/platform/update_interface_parameters.go deleted file mode 100644 index 0a5f6236..00000000 --- a/v2/client/platform/update_interface_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateInterfaceParams creates a new UpdateInterfaceParams 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 NewUpdateInterfaceParams() *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateInterfaceParamsWithTimeout creates a new UpdateInterfaceParams object -// with the ability to set a timeout on a request. -func NewUpdateInterfaceParamsWithTimeout(timeout time.Duration) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - timeout: timeout, - } -} - -// NewUpdateInterfaceParamsWithContext creates a new UpdateInterfaceParams object -// with the ability to set a context for a request. -func NewUpdateInterfaceParamsWithContext(ctx context.Context) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - Context: ctx, - } -} - -// NewUpdateInterfaceParamsWithHTTPClient creates a new UpdateInterfaceParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateInterfaceParamsWithHTTPClient(client *http.Client) *UpdateInterfaceParams { - return &UpdateInterfaceParams{ - HTTPClient: client, - } -} - -/* -UpdateInterfaceParams contains all the parameters to send to the API endpoint - - for the update interface operation. - - Typically these are written to a http.Request. -*/ -type UpdateInterfaceParams struct { - - /* Body. - - Parameters to update an interface on a node or cluster. - */ - Body *models.InterfaceParams - - /* ID. - - Id of the interface. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceParams) WithDefaults() *UpdateInterfaceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update interface params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateInterfaceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update interface params -func (o *UpdateInterfaceParams) WithTimeout(timeout time.Duration) *UpdateInterfaceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update interface params -func (o *UpdateInterfaceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update interface params -func (o *UpdateInterfaceParams) WithContext(ctx context.Context) *UpdateInterfaceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update interface params -func (o *UpdateInterfaceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update interface params -func (o *UpdateInterfaceParams) WithHTTPClient(client *http.Client) *UpdateInterfaceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update interface params -func (o *UpdateInterfaceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update interface params -func (o *UpdateInterfaceParams) WithBody(body *models.InterfaceParams) *UpdateInterfaceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update interface params -func (o *UpdateInterfaceParams) SetBody(body *models.InterfaceParams) { - o.Body = body -} - -// WithID adds the id to the update interface params -func (o *UpdateInterfaceParams) WithID(id int64) *UpdateInterfaceParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update interface params -func (o *UpdateInterfaceParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateInterfaceParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/update_interface_responses.go b/v2/client/platform/update_interface_responses.go deleted file mode 100644 index 6c0b7433..00000000 --- a/v2/client/platform/update_interface_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateInterfaceReader is a Reader for the UpdateInterface structure. -type UpdateInterfaceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateInterfaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateInterfaceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateInterfaceDefault(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 - } -} - -// NewUpdateInterfaceOK creates a UpdateInterfaceOK with default headers values -func NewUpdateInterfaceOK() *UpdateInterfaceOK { - return &UpdateInterfaceOK{} -} - -/* -UpdateInterfaceOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateInterfaceOK struct { - Payload *models.InterfaceParams -} - -// IsSuccess returns true when this update interface o k response has a 2xx status code -func (o *UpdateInterfaceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update interface o k response has a 3xx status code -func (o *UpdateInterfaceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update interface o k response has a 4xx status code -func (o *UpdateInterfaceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update interface o k response has a 5xx status code -func (o *UpdateInterfaceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update interface o k response a status code equal to that given -func (o *UpdateInterfaceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update interface o k response -func (o *UpdateInterfaceOK) Code() int { - return 200 -} - -func (o *UpdateInterfaceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interfaces/{id}][%d] updateInterfaceOK %s", 200, payload) -} - -func (o *UpdateInterfaceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interfaces/{id}][%d] updateInterfaceOK %s", 200, payload) -} - -func (o *UpdateInterfaceOK) GetPayload() *models.InterfaceParams { - return o.Payload -} - -func (o *UpdateInterfaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.InterfaceParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateInterfaceDefault creates a UpdateInterfaceDefault with default headers values -func NewUpdateInterfaceDefault(code int) *UpdateInterfaceDefault { - return &UpdateInterfaceDefault{ - _statusCode: code, - } -} - -/* -UpdateInterfaceDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateInterfaceDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update interface default response has a 2xx status code -func (o *UpdateInterfaceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update interface default response has a 3xx status code -func (o *UpdateInterfaceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update interface default response has a 4xx status code -func (o *UpdateInterfaceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update interface default response has a 5xx status code -func (o *UpdateInterfaceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update interface default response a status code equal to that given -func (o *UpdateInterfaceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update interface default response -func (o *UpdateInterfaceDefault) Code() int { - return o._statusCode -} - -func (o *UpdateInterfaceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interfaces/{id}][%d] UpdateInterface default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/interfaces/{id}][%d] UpdateInterface default %s", o._statusCode, payload) -} - -func (o *UpdateInterfaceDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateInterfaceDefault) 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/update_ipmi_lan_config_parameters.go b/v2/client/platform/update_ipmi_lan_config_parameters.go deleted file mode 100644 index 39e68457..00000000 --- a/v2/client/platform/update_ipmi_lan_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateIpmiLanConfigParams creates a new UpdateIpmiLanConfigParams 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 NewUpdateIpmiLanConfigParams() *UpdateIpmiLanConfigParams { - return &UpdateIpmiLanConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIpmiLanConfigParamsWithTimeout creates a new UpdateIpmiLanConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateIpmiLanConfigParamsWithTimeout(timeout time.Duration) *UpdateIpmiLanConfigParams { - return &UpdateIpmiLanConfigParams{ - timeout: timeout, - } -} - -// NewUpdateIpmiLanConfigParamsWithContext creates a new UpdateIpmiLanConfigParams object -// with the ability to set a context for a request. -func NewUpdateIpmiLanConfigParamsWithContext(ctx context.Context) *UpdateIpmiLanConfigParams { - return &UpdateIpmiLanConfigParams{ - Context: ctx, - } -} - -// NewUpdateIpmiLanConfigParamsWithHTTPClient creates a new UpdateIpmiLanConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIpmiLanConfigParamsWithHTTPClient(client *http.Client) *UpdateIpmiLanConfigParams { - return &UpdateIpmiLanConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateIpmiLanConfigParams contains all the parameters to send to the API endpoint - - for the update ipmi lan config operation. - - Typically these are written to a http.Request. -*/ -type UpdateIpmiLanConfigParams struct { - - /* Body. - - Parameters to update cluster and node level IPMI LAN configuration. - */ - Body *models.IpmiLanParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update ipmi lan config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIpmiLanConfigParams) WithDefaults() *UpdateIpmiLanConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update ipmi lan config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIpmiLanConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) WithTimeout(timeout time.Duration) *UpdateIpmiLanConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) WithContext(ctx context.Context) *UpdateIpmiLanConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) WithHTTPClient(client *http.Client) *UpdateIpmiLanConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) WithBody(body *models.IpmiLanParams) *UpdateIpmiLanConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update ipmi lan config params -func (o *UpdateIpmiLanConfigParams) SetBody(body *models.IpmiLanParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIpmiLanConfigParams) 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_ipmi_lan_config_responses.go b/v2/client/platform/update_ipmi_lan_config_responses.go deleted file mode 100644 index 68fe06d9..00000000 --- a/v2/client/platform/update_ipmi_lan_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateIpmiLanConfigReader is a Reader for the UpdateIpmiLanConfig structure. -type UpdateIpmiLanConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIpmiLanConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIpmiLanConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIpmiLanConfigDefault(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 - } -} - -// NewUpdateIpmiLanConfigOK creates a UpdateIpmiLanConfigOK with default headers values -func NewUpdateIpmiLanConfigOK() *UpdateIpmiLanConfigOK { - return &UpdateIpmiLanConfigOK{} -} - -/* -UpdateIpmiLanConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIpmiLanConfigOK struct { - Payload *models.IpmiLanParams -} - -// IsSuccess returns true when this update ipmi lan config o k response has a 2xx status code -func (o *UpdateIpmiLanConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update ipmi lan config o k response has a 3xx status code -func (o *UpdateIpmiLanConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update ipmi lan config o k response has a 4xx status code -func (o *UpdateIpmiLanConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update ipmi lan config o k response has a 5xx status code -func (o *UpdateIpmiLanConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update ipmi lan config o k response a status code equal to that given -func (o *UpdateIpmiLanConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update ipmi lan config o k response -func (o *UpdateIpmiLanConfigOK) Code() int { - return 200 -} - -func (o *UpdateIpmiLanConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/lan][%d] updateIpmiLanConfigOK %s", 200, payload) -} - -func (o *UpdateIpmiLanConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/lan][%d] updateIpmiLanConfigOK %s", 200, payload) -} - -func (o *UpdateIpmiLanConfigOK) GetPayload() *models.IpmiLanParams { - return o.Payload -} - -func (o *UpdateIpmiLanConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IpmiLanParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIpmiLanConfigDefault creates a UpdateIpmiLanConfigDefault with default headers values -func NewUpdateIpmiLanConfigDefault(code int) *UpdateIpmiLanConfigDefault { - return &UpdateIpmiLanConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateIpmiLanConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIpmiLanConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update ipmi lan config default response has a 2xx status code -func (o *UpdateIpmiLanConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update ipmi lan config default response has a 3xx status code -func (o *UpdateIpmiLanConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update ipmi lan config default response has a 4xx status code -func (o *UpdateIpmiLanConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update ipmi lan config default response has a 5xx status code -func (o *UpdateIpmiLanConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update ipmi lan config default response a status code equal to that given -func (o *UpdateIpmiLanConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update ipmi lan config default response -func (o *UpdateIpmiLanConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIpmiLanConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/lan][%d] UpdateIpmiLanConfig default %s", o._statusCode, payload) -} - -func (o *UpdateIpmiLanConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/lan][%d] UpdateIpmiLanConfig default %s", o._statusCode, payload) -} - -func (o *UpdateIpmiLanConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateIpmiLanConfigDefault) 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/update_ipmi_users_parameters.go b/v2/client/platform/update_ipmi_users_parameters.go deleted file mode 100644 index bad6b33f..00000000 --- a/v2/client/platform/update_ipmi_users_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateIpmiUsersParams creates a new UpdateIpmiUsersParams 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 NewUpdateIpmiUsersParams() *UpdateIpmiUsersParams { - return &UpdateIpmiUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIpmiUsersParamsWithTimeout creates a new UpdateIpmiUsersParams object -// with the ability to set a timeout on a request. -func NewUpdateIpmiUsersParamsWithTimeout(timeout time.Duration) *UpdateIpmiUsersParams { - return &UpdateIpmiUsersParams{ - timeout: timeout, - } -} - -// NewUpdateIpmiUsersParamsWithContext creates a new UpdateIpmiUsersParams object -// with the ability to set a context for a request. -func NewUpdateIpmiUsersParamsWithContext(ctx context.Context) *UpdateIpmiUsersParams { - return &UpdateIpmiUsersParams{ - Context: ctx, - } -} - -// NewUpdateIpmiUsersParamsWithHTTPClient creates a new UpdateIpmiUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIpmiUsersParamsWithHTTPClient(client *http.Client) *UpdateIpmiUsersParams { - return &UpdateIpmiUsersParams{ - HTTPClient: client, - } -} - -/* -UpdateIpmiUsersParams contains all the parameters to send to the API endpoint - - for the update ipmi users operation. - - Typically these are written to a http.Request. -*/ -type UpdateIpmiUsersParams struct { - - /* Body. - - Parameters to update cluster and node level IPMI users. - */ - Body *models.UpdateIpmiUsers - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update ipmi users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIpmiUsersParams) WithDefaults() *UpdateIpmiUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update ipmi users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIpmiUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update ipmi users params -func (o *UpdateIpmiUsersParams) WithTimeout(timeout time.Duration) *UpdateIpmiUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update ipmi users params -func (o *UpdateIpmiUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update ipmi users params -func (o *UpdateIpmiUsersParams) WithContext(ctx context.Context) *UpdateIpmiUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update ipmi users params -func (o *UpdateIpmiUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update ipmi users params -func (o *UpdateIpmiUsersParams) WithHTTPClient(client *http.Client) *UpdateIpmiUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update ipmi users params -func (o *UpdateIpmiUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update ipmi users params -func (o *UpdateIpmiUsersParams) WithBody(body *models.UpdateIpmiUsers) *UpdateIpmiUsersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update ipmi users params -func (o *UpdateIpmiUsersParams) SetBody(body *models.UpdateIpmiUsers) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIpmiUsersParams) 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_ipmi_users_responses.go b/v2/client/platform/update_ipmi_users_responses.go deleted file mode 100644 index 277bc776..00000000 --- a/v2/client/platform/update_ipmi_users_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateIpmiUsersReader is a Reader for the UpdateIpmiUsers structure. -type UpdateIpmiUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIpmiUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIpmiUsersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIpmiUsersDefault(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 - } -} - -// NewUpdateIpmiUsersOK creates a UpdateIpmiUsersOK with default headers values -func NewUpdateIpmiUsersOK() *UpdateIpmiUsersOK { - return &UpdateIpmiUsersOK{} -} - -/* -UpdateIpmiUsersOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIpmiUsersOK struct { - Payload *models.IpmiUsers -} - -// IsSuccess returns true when this update ipmi users o k response has a 2xx status code -func (o *UpdateIpmiUsersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update ipmi users o k response has a 3xx status code -func (o *UpdateIpmiUsersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update ipmi users o k response has a 4xx status code -func (o *UpdateIpmiUsersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update ipmi users o k response has a 5xx status code -func (o *UpdateIpmiUsersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update ipmi users o k response a status code equal to that given -func (o *UpdateIpmiUsersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update ipmi users o k response -func (o *UpdateIpmiUsersOK) Code() int { - return 200 -} - -func (o *UpdateIpmiUsersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/users][%d] updateIpmiUsersOK %s", 200, payload) -} - -func (o *UpdateIpmiUsersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/users][%d] updateIpmiUsersOK %s", 200, payload) -} - -func (o *UpdateIpmiUsersOK) GetPayload() *models.IpmiUsers { - return o.Payload -} - -func (o *UpdateIpmiUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IpmiUsers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIpmiUsersDefault creates a UpdateIpmiUsersDefault with default headers values -func NewUpdateIpmiUsersDefault(code int) *UpdateIpmiUsersDefault { - return &UpdateIpmiUsersDefault{ - _statusCode: code, - } -} - -/* -UpdateIpmiUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIpmiUsersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update ipmi users default response has a 2xx status code -func (o *UpdateIpmiUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update ipmi users default response has a 3xx status code -func (o *UpdateIpmiUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update ipmi users default response has a 4xx status code -func (o *UpdateIpmiUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update ipmi users default response has a 5xx status code -func (o *UpdateIpmiUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update ipmi users default response a status code equal to that given -func (o *UpdateIpmiUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update ipmi users default response -func (o *UpdateIpmiUsersDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIpmiUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/users][%d] UpdateIpmiUsers default %s", o._statusCode, payload) -} - -func (o *UpdateIpmiUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /network/ipmi/users][%d] UpdateIpmiUsers default %s", o._statusCode, payload) -} - -func (o *UpdateIpmiUsersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateIpmiUsersDefault) 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/update_is_d_maa_s_cluster_parameters.go b/v2/client/platform/update_is_d_maa_s_cluster_parameters.go deleted file mode 100644 index cde93e62..00000000 --- a/v2/client/platform/update_is_d_maa_s_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateIsDMaaSClusterParams creates a new UpdateIsDMaaSClusterParams 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 NewUpdateIsDMaaSClusterParams() *UpdateIsDMaaSClusterParams { - return &UpdateIsDMaaSClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateIsDMaaSClusterParamsWithTimeout creates a new UpdateIsDMaaSClusterParams object -// with the ability to set a timeout on a request. -func NewUpdateIsDMaaSClusterParamsWithTimeout(timeout time.Duration) *UpdateIsDMaaSClusterParams { - return &UpdateIsDMaaSClusterParams{ - timeout: timeout, - } -} - -// NewUpdateIsDMaaSClusterParamsWithContext creates a new UpdateIsDMaaSClusterParams object -// with the ability to set a context for a request. -func NewUpdateIsDMaaSClusterParamsWithContext(ctx context.Context) *UpdateIsDMaaSClusterParams { - return &UpdateIsDMaaSClusterParams{ - Context: ctx, - } -} - -// NewUpdateIsDMaaSClusterParamsWithHTTPClient creates a new UpdateIsDMaaSClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateIsDMaaSClusterParamsWithHTTPClient(client *http.Client) *UpdateIsDMaaSClusterParams { - return &UpdateIsDMaaSClusterParams{ - HTTPClient: client, - } -} - -/* -UpdateIsDMaaSClusterParams contains all the parameters to send to the API endpoint - - for the update is d maa s cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdateIsDMaaSClusterParams struct { - - /* Body. - - Param to update whether the cluster is a DMaaS cluster. - */ - Body *models.DMaaSInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update is d maa s cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIsDMaaSClusterParams) WithDefaults() *UpdateIsDMaaSClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update is d maa s cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateIsDMaaSClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) WithTimeout(timeout time.Duration) *UpdateIsDMaaSClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) WithContext(ctx context.Context) *UpdateIsDMaaSClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) WithHTTPClient(client *http.Client) *UpdateIsDMaaSClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) WithBody(body *models.DMaaSInfo) *UpdateIsDMaaSClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update is d maa s cluster params -func (o *UpdateIsDMaaSClusterParams) SetBody(body *models.DMaaSInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateIsDMaaSClusterParams) 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_is_d_maa_s_cluster_responses.go b/v2/client/platform/update_is_d_maa_s_cluster_responses.go deleted file mode 100644 index 7f293ecb..00000000 --- a/v2/client/platform/update_is_d_maa_s_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateIsDMaaSClusterReader is a Reader for the UpdateIsDMaaSCluster structure. -type UpdateIsDMaaSClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateIsDMaaSClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateIsDMaaSClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateIsDMaaSClusterDefault(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 - } -} - -// NewUpdateIsDMaaSClusterOK creates a UpdateIsDMaaSClusterOK with default headers values -func NewUpdateIsDMaaSClusterOK() *UpdateIsDMaaSClusterOK { - return &UpdateIsDMaaSClusterOK{} -} - -/* -UpdateIsDMaaSClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateIsDMaaSClusterOK struct { - Payload *models.DMaaSInfo -} - -// IsSuccess returns true when this update is d maa s cluster o k response has a 2xx status code -func (o *UpdateIsDMaaSClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update is d maa s cluster o k response has a 3xx status code -func (o *UpdateIsDMaaSClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update is d maa s cluster o k response has a 4xx status code -func (o *UpdateIsDMaaSClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update is d maa s cluster o k response has a 5xx status code -func (o *UpdateIsDMaaSClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update is d maa s cluster o k response a status code equal to that given -func (o *UpdateIsDMaaSClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update is d maa s cluster o k response -func (o *UpdateIsDMaaSClusterOK) Code() int { - return 200 -} - -func (o *UpdateIsDMaaSClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/is-dmaas][%d] updateIsDMaaSClusterOK %s", 200, payload) -} - -func (o *UpdateIsDMaaSClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/is-dmaas][%d] updateIsDMaaSClusterOK %s", 200, payload) -} - -func (o *UpdateIsDMaaSClusterOK) GetPayload() *models.DMaaSInfo { - return o.Payload -} - -func (o *UpdateIsDMaaSClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DMaaSInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateIsDMaaSClusterDefault creates a UpdateIsDMaaSClusterDefault with default headers values -func NewUpdateIsDMaaSClusterDefault(code int) *UpdateIsDMaaSClusterDefault { - return &UpdateIsDMaaSClusterDefault{ - _statusCode: code, - } -} - -/* -UpdateIsDMaaSClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateIsDMaaSClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update is d maa s cluster default response has a 2xx status code -func (o *UpdateIsDMaaSClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update is d maa s cluster default response has a 3xx status code -func (o *UpdateIsDMaaSClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update is d maa s cluster default response has a 4xx status code -func (o *UpdateIsDMaaSClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update is d maa s cluster default response has a 5xx status code -func (o *UpdateIsDMaaSClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update is d maa s cluster default response a status code equal to that given -func (o *UpdateIsDMaaSClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update is d maa s cluster default response -func (o *UpdateIsDMaaSClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdateIsDMaaSClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/is-dmaas][%d] UpdateIsDMaaSCluster default %s", o._statusCode, payload) -} - -func (o *UpdateIsDMaaSClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/is-dmaas][%d] UpdateIsDMaaSCluster default %s", o._statusCode, payload) -} - -func (o *UpdateIsDMaaSClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateIsDMaaSClusterDefault) 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/update_rack_by_id_parameters.go b/v2/client/platform/update_rack_by_id_parameters.go deleted file mode 100644 index 83d0876f..00000000 --- a/v2/client/platform/update_rack_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateRackByIDParams creates a new UpdateRackByIDParams 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 NewUpdateRackByIDParams() *UpdateRackByIDParams { - return &UpdateRackByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRackByIDParamsWithTimeout creates a new UpdateRackByIDParams object -// with the ability to set a timeout on a request. -func NewUpdateRackByIDParamsWithTimeout(timeout time.Duration) *UpdateRackByIDParams { - return &UpdateRackByIDParams{ - timeout: timeout, - } -} - -// NewUpdateRackByIDParamsWithContext creates a new UpdateRackByIDParams object -// with the ability to set a context for a request. -func NewUpdateRackByIDParamsWithContext(ctx context.Context) *UpdateRackByIDParams { - return &UpdateRackByIDParams{ - Context: ctx, - } -} - -// NewUpdateRackByIDParamsWithHTTPClient creates a new UpdateRackByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRackByIDParamsWithHTTPClient(client *http.Client) *UpdateRackByIDParams { - return &UpdateRackByIDParams{ - HTTPClient: client, - } -} - -/* -UpdateRackByIDParams contains all the parameters to send to the API endpoint - - for the update rack by Id operation. - - Typically these are written to a http.Request. -*/ -type UpdateRackByIDParams struct { - - /* Body. - - Specifies the parameters to update rack. - */ - Body *models.Rack - - /* ID. - - Specifies the id of rack. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRackByIDParams) WithDefaults() *UpdateRackByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update rack by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRackByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update rack by Id params -func (o *UpdateRackByIDParams) WithTimeout(timeout time.Duration) *UpdateRackByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update rack by Id params -func (o *UpdateRackByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update rack by Id params -func (o *UpdateRackByIDParams) WithContext(ctx context.Context) *UpdateRackByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update rack by Id params -func (o *UpdateRackByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update rack by Id params -func (o *UpdateRackByIDParams) WithHTTPClient(client *http.Client) *UpdateRackByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update rack by Id params -func (o *UpdateRackByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update rack by Id params -func (o *UpdateRackByIDParams) WithBody(body *models.Rack) *UpdateRackByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update rack by Id params -func (o *UpdateRackByIDParams) SetBody(body *models.Rack) { - o.Body = body -} - -// WithID adds the id to the update rack by Id params -func (o *UpdateRackByIDParams) WithID(id int64) *UpdateRackByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update rack by Id params -func (o *UpdateRackByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRackByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/update_rack_by_id_responses.go b/v2/client/platform/update_rack_by_id_responses.go deleted file mode 100644 index 2cf2a68f..00000000 --- a/v2/client/platform/update_rack_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateRackByIDReader is a Reader for the UpdateRackByID structure. -type UpdateRackByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRackByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRackByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRackByIDDefault(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 - } -} - -// NewUpdateRackByIDOK creates a UpdateRackByIDOK with default headers values -func NewUpdateRackByIDOK() *UpdateRackByIDOK { - return &UpdateRackByIDOK{} -} - -/* -UpdateRackByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRackByIDOK struct { - Payload *models.Rack -} - -// IsSuccess returns true when this update rack by Id o k response has a 2xx status code -func (o *UpdateRackByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update rack by Id o k response has a 3xx status code -func (o *UpdateRackByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update rack by Id o k response has a 4xx status code -func (o *UpdateRackByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update rack by Id o k response has a 5xx status code -func (o *UpdateRackByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update rack by Id o k response a status code equal to that given -func (o *UpdateRackByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update rack by Id o k response -func (o *UpdateRackByIDOK) Code() int { - return 200 -} - -func (o *UpdateRackByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks/{id}][%d] updateRackByIdOK %s", 200, payload) -} - -func (o *UpdateRackByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks/{id}][%d] updateRackByIdOK %s", 200, payload) -} - -func (o *UpdateRackByIDOK) GetPayload() *models.Rack { - return o.Payload -} - -func (o *UpdateRackByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Rack) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRackByIDDefault creates a UpdateRackByIDDefault with default headers values -func NewUpdateRackByIDDefault(code int) *UpdateRackByIDDefault { - return &UpdateRackByIDDefault{ - _statusCode: code, - } -} - -/* -UpdateRackByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRackByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update rack by Id default response has a 2xx status code -func (o *UpdateRackByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update rack by Id default response has a 3xx status code -func (o *UpdateRackByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update rack by Id default response has a 4xx status code -func (o *UpdateRackByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update rack by Id default response has a 5xx status code -func (o *UpdateRackByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update rack by Id default response a status code equal to that given -func (o *UpdateRackByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update rack by Id default response -func (o *UpdateRackByIDDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRackByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks/{id}][%d] UpdateRackById default %s", o._statusCode, payload) -} - -func (o *UpdateRackByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks/{id}][%d] UpdateRackById default %s", o._statusCode, payload) -} - -func (o *UpdateRackByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateRackByIDDefault) 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/update_racks_parameters.go b/v2/client/platform/update_racks_parameters.go deleted file mode 100644 index 5f39ac10..00000000 --- a/v2/client/platform/update_racks_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateRacksParams creates a new UpdateRacksParams 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 NewUpdateRacksParams() *UpdateRacksParams { - return &UpdateRacksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRacksParamsWithTimeout creates a new UpdateRacksParams object -// with the ability to set a timeout on a request. -func NewUpdateRacksParamsWithTimeout(timeout time.Duration) *UpdateRacksParams { - return &UpdateRacksParams{ - timeout: timeout, - } -} - -// NewUpdateRacksParamsWithContext creates a new UpdateRacksParams object -// with the ability to set a context for a request. -func NewUpdateRacksParamsWithContext(ctx context.Context) *UpdateRacksParams { - return &UpdateRacksParams{ - Context: ctx, - } -} - -// NewUpdateRacksParamsWithHTTPClient creates a new UpdateRacksParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRacksParamsWithHTTPClient(client *http.Client) *UpdateRacksParams { - return &UpdateRacksParams{ - HTTPClient: client, - } -} - -/* -UpdateRacksParams contains all the parameters to send to the API endpoint - - for the update racks operation. - - Typically these are written to a http.Request. -*/ -type UpdateRacksParams struct { - - /* Body. - - Specifies the parameters to update racks. - */ - Body *models.Racks - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRacksParams) WithDefaults() *UpdateRacksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update racks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRacksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update racks params -func (o *UpdateRacksParams) WithTimeout(timeout time.Duration) *UpdateRacksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update racks params -func (o *UpdateRacksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update racks params -func (o *UpdateRacksParams) WithContext(ctx context.Context) *UpdateRacksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update racks params -func (o *UpdateRacksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update racks params -func (o *UpdateRacksParams) WithHTTPClient(client *http.Client) *UpdateRacksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update racks params -func (o *UpdateRacksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update racks params -func (o *UpdateRacksParams) WithBody(body *models.Racks) *UpdateRacksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update racks params -func (o *UpdateRacksParams) SetBody(body *models.Racks) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRacksParams) 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_racks_responses.go b/v2/client/platform/update_racks_responses.go deleted file mode 100644 index c505b869..00000000 --- a/v2/client/platform/update_racks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateRacksReader is a Reader for the UpdateRacks structure. -type UpdateRacksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRacksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRacksDefault(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 - } -} - -// NewUpdateRacksOK creates a UpdateRacksOK with default headers values -func NewUpdateRacksOK() *UpdateRacksOK { - return &UpdateRacksOK{} -} - -/* -UpdateRacksOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRacksOK struct { - Payload *models.Racks -} - -// IsSuccess returns true when this update racks o k response has a 2xx status code -func (o *UpdateRacksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update racks o k response has a 3xx status code -func (o *UpdateRacksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update racks o k response has a 4xx status code -func (o *UpdateRacksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update racks o k response has a 5xx status code -func (o *UpdateRacksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update racks o k response a status code equal to that given -func (o *UpdateRacksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update racks o k response -func (o *UpdateRacksOK) Code() int { - return 200 -} - -func (o *UpdateRacksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks][%d] updateRacksOK %s", 200, payload) -} - -func (o *UpdateRacksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks][%d] updateRacksOK %s", 200, payload) -} - -func (o *UpdateRacksOK) GetPayload() *models.Racks { - return o.Payload -} - -func (o *UpdateRacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Racks) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRacksDefault creates a UpdateRacksDefault with default headers values -func NewUpdateRacksDefault(code int) *UpdateRacksDefault { - return &UpdateRacksDefault{ - _statusCode: code, - } -} - -/* -UpdateRacksDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRacksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update racks default response has a 2xx status code -func (o *UpdateRacksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update racks default response has a 3xx status code -func (o *UpdateRacksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update racks default response has a 4xx status code -func (o *UpdateRacksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update racks default response has a 5xx status code -func (o *UpdateRacksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update racks default response a status code equal to that given -func (o *UpdateRacksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update racks default response -func (o *UpdateRacksDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRacksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks][%d] UpdateRacks default %s", o._statusCode, payload) -} - -func (o *UpdateRacksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /racks][%d] UpdateRacks default %s", o._statusCode, payload) -} - -func (o *UpdateRacksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateRacksDefault) 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/update_smtp_configuration_parameters.go b/v2/client/platform/update_smtp_configuration_parameters.go deleted file mode 100644 index 634b9b87..00000000 --- a/v2/client/platform/update_smtp_configuration_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSMTPConfigurationParams creates a new UpdateSMTPConfigurationParams 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 NewUpdateSMTPConfigurationParams() *UpdateSMTPConfigurationParams { - return &UpdateSMTPConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSMTPConfigurationParamsWithTimeout creates a new UpdateSMTPConfigurationParams object -// with the ability to set a timeout on a request. -func NewUpdateSMTPConfigurationParamsWithTimeout(timeout time.Duration) *UpdateSMTPConfigurationParams { - return &UpdateSMTPConfigurationParams{ - timeout: timeout, - } -} - -// NewUpdateSMTPConfigurationParamsWithContext creates a new UpdateSMTPConfigurationParams object -// with the ability to set a context for a request. -func NewUpdateSMTPConfigurationParamsWithContext(ctx context.Context) *UpdateSMTPConfigurationParams { - return &UpdateSMTPConfigurationParams{ - Context: ctx, - } -} - -// NewUpdateSMTPConfigurationParamsWithHTTPClient creates a new UpdateSMTPConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSMTPConfigurationParamsWithHTTPClient(client *http.Client) *UpdateSMTPConfigurationParams { - return &UpdateSMTPConfigurationParams{ - HTTPClient: client, - } -} - -/* -UpdateSMTPConfigurationParams contains all the parameters to send to the API endpoint - - for the update SMTP configuration operation. - - Typically these are written to a http.Request. -*/ -type UpdateSMTPConfigurationParams struct { - - /* Body. - - Specifies the parameters to update cluster SMTP configuration. - */ - Body *models.UpdateSMTPParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSMTPConfigurationParams) WithDefaults() *UpdateSMTPConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSMTPConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) WithTimeout(timeout time.Duration) *UpdateSMTPConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) WithContext(ctx context.Context) *UpdateSMTPConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) WithHTTPClient(client *http.Client) *UpdateSMTPConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) WithBody(body *models.UpdateSMTPParams) *UpdateSMTPConfigurationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update SMTP configuration params -func (o *UpdateSMTPConfigurationParams) SetBody(body *models.UpdateSMTPParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSMTPConfigurationParams) 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_smtp_configuration_responses.go b/v2/client/platform/update_smtp_configuration_responses.go deleted file mode 100644 index 760661e4..00000000 --- a/v2/client/platform/update_smtp_configuration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSMTPConfigurationReader is a Reader for the UpdateSMTPConfiguration structure. -type UpdateSMTPConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSMTPConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSMTPConfigurationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSMTPConfigurationDefault(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 - } -} - -// NewUpdateSMTPConfigurationOK creates a UpdateSMTPConfigurationOK with default headers values -func NewUpdateSMTPConfigurationOK() *UpdateSMTPConfigurationOK { - return &UpdateSMTPConfigurationOK{} -} - -/* -UpdateSMTPConfigurationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSMTPConfigurationOK struct { - Payload *models.SMTPConfiguration -} - -// IsSuccess returns true when this update Smtp configuration o k response has a 2xx status code -func (o *UpdateSMTPConfigurationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update Smtp configuration o k response has a 3xx status code -func (o *UpdateSMTPConfigurationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update Smtp configuration o k response has a 4xx status code -func (o *UpdateSMTPConfigurationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update Smtp configuration o k response has a 5xx status code -func (o *UpdateSMTPConfigurationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update Smtp configuration o k response a status code equal to that given -func (o *UpdateSMTPConfigurationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update Smtp configuration o k response -func (o *UpdateSMTPConfigurationOK) Code() int { - return 200 -} - -func (o *UpdateSMTPConfigurationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/smtp][%d] updateSmtpConfigurationOK %s", 200, payload) -} - -func (o *UpdateSMTPConfigurationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/smtp][%d] updateSmtpConfigurationOK %s", 200, payload) -} - -func (o *UpdateSMTPConfigurationOK) GetPayload() *models.SMTPConfiguration { - return o.Payload -} - -func (o *UpdateSMTPConfigurationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SMTPConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSMTPConfigurationDefault creates a UpdateSMTPConfigurationDefault with default headers values -func NewUpdateSMTPConfigurationDefault(code int) *UpdateSMTPConfigurationDefault { - return &UpdateSMTPConfigurationDefault{ - _statusCode: code, - } -} - -/* -UpdateSMTPConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSMTPConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update SMTP configuration default response has a 2xx status code -func (o *UpdateSMTPConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update SMTP configuration default response has a 3xx status code -func (o *UpdateSMTPConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update SMTP configuration default response has a 4xx status code -func (o *UpdateSMTPConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update SMTP configuration default response has a 5xx status code -func (o *UpdateSMTPConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update SMTP configuration default response a status code equal to that given -func (o *UpdateSMTPConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update SMTP configuration default response -func (o *UpdateSMTPConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSMTPConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/smtp][%d] UpdateSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *UpdateSMTPConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/smtp][%d] UpdateSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *UpdateSMTPConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSMTPConfigurationDefault) 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/update_support_channel_config_parameters.go b/v2/client/platform/update_support_channel_config_parameters.go deleted file mode 100644 index eb0e4b19..00000000 --- a/v2/client/platform/update_support_channel_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSupportChannelConfigParams creates a new UpdateSupportChannelConfigParams 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 NewUpdateSupportChannelConfigParams() *UpdateSupportChannelConfigParams { - return &UpdateSupportChannelConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSupportChannelConfigParamsWithTimeout creates a new UpdateSupportChannelConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateSupportChannelConfigParamsWithTimeout(timeout time.Duration) *UpdateSupportChannelConfigParams { - return &UpdateSupportChannelConfigParams{ - timeout: timeout, - } -} - -// NewUpdateSupportChannelConfigParamsWithContext creates a new UpdateSupportChannelConfigParams object -// with the ability to set a context for a request. -func NewUpdateSupportChannelConfigParamsWithContext(ctx context.Context) *UpdateSupportChannelConfigParams { - return &UpdateSupportChannelConfigParams{ - Context: ctx, - } -} - -// NewUpdateSupportChannelConfigParamsWithHTTPClient creates a new UpdateSupportChannelConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSupportChannelConfigParamsWithHTTPClient(client *http.Client) *UpdateSupportChannelConfigParams { - return &UpdateSupportChannelConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateSupportChannelConfigParams contains all the parameters to send to the API endpoint - - for the update support channel config operation. - - Typically these are written to a http.Request. -*/ -type UpdateSupportChannelConfigParams struct { - - /* Body. - - Specifies the support channel configuration. - */ - Body *models.SupportChannelConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update support channel config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportChannelConfigParams) WithDefaults() *UpdateSupportChannelConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update support channel config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportChannelConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update support channel config params -func (o *UpdateSupportChannelConfigParams) WithTimeout(timeout time.Duration) *UpdateSupportChannelConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update support channel config params -func (o *UpdateSupportChannelConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update support channel config params -func (o *UpdateSupportChannelConfigParams) WithContext(ctx context.Context) *UpdateSupportChannelConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update support channel config params -func (o *UpdateSupportChannelConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update support channel config params -func (o *UpdateSupportChannelConfigParams) WithHTTPClient(client *http.Client) *UpdateSupportChannelConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update support channel config params -func (o *UpdateSupportChannelConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update support channel config params -func (o *UpdateSupportChannelConfigParams) WithBody(body *models.SupportChannelConfig) *UpdateSupportChannelConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update support channel config params -func (o *UpdateSupportChannelConfigParams) SetBody(body *models.SupportChannelConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSupportChannelConfigParams) 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_support_channel_config_responses.go b/v2/client/platform/update_support_channel_config_responses.go deleted file mode 100644 index d92bd873..00000000 --- a/v2/client/platform/update_support_channel_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSupportChannelConfigReader is a Reader for the UpdateSupportChannelConfig structure. -type UpdateSupportChannelConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSupportChannelConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSupportChannelConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSupportChannelConfigDefault(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 - } -} - -// NewUpdateSupportChannelConfigOK creates a UpdateSupportChannelConfigOK with default headers values -func NewUpdateSupportChannelConfigOK() *UpdateSupportChannelConfigOK { - return &UpdateSupportChannelConfigOK{} -} - -/* -UpdateSupportChannelConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSupportChannelConfigOK struct { - Payload *models.SupportChannelConfig -} - -// IsSuccess returns true when this update support channel config o k response has a 2xx status code -func (o *UpdateSupportChannelConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update support channel config o k response has a 3xx status code -func (o *UpdateSupportChannelConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update support channel config o k response has a 4xx status code -func (o *UpdateSupportChannelConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update support channel config o k response has a 5xx status code -func (o *UpdateSupportChannelConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update support channel config o k response a status code equal to that given -func (o *UpdateSupportChannelConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update support channel config o k response -func (o *UpdateSupportChannelConfigOK) Code() int { - return 200 -} - -func (o *UpdateSupportChannelConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-channel-config][%d] updateSupportChannelConfigOK %s", 200, payload) -} - -func (o *UpdateSupportChannelConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-channel-config][%d] updateSupportChannelConfigOK %s", 200, payload) -} - -func (o *UpdateSupportChannelConfigOK) GetPayload() *models.SupportChannelConfig { - return o.Payload -} - -func (o *UpdateSupportChannelConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SupportChannelConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSupportChannelConfigDefault creates a UpdateSupportChannelConfigDefault with default headers values -func NewUpdateSupportChannelConfigDefault(code int) *UpdateSupportChannelConfigDefault { - return &UpdateSupportChannelConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateSupportChannelConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSupportChannelConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update support channel config default response has a 2xx status code -func (o *UpdateSupportChannelConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update support channel config default response has a 3xx status code -func (o *UpdateSupportChannelConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update support channel config default response has a 4xx status code -func (o *UpdateSupportChannelConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update support channel config default response has a 5xx status code -func (o *UpdateSupportChannelConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update support channel config default response a status code equal to that given -func (o *UpdateSupportChannelConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update support channel config default response -func (o *UpdateSupportChannelConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSupportChannelConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-channel-config][%d] UpdateSupportChannelConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportChannelConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-channel-config][%d] UpdateSupportChannelConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportChannelConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSupportChannelConfigDefault) 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/upgrade_check_get_results_parameters.go b/v2/client/platform/upgrade_check_get_results_parameters.go deleted file mode 100644 index c36e294e..00000000 --- a/v2/client/platform/upgrade_check_get_results_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// 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/go-openapi/swag" -) - -// NewUpgradeCheckGetResultsParams creates a new UpgradeCheckGetResultsParams 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 NewUpgradeCheckGetResultsParams() *UpgradeCheckGetResultsParams { - return &UpgradeCheckGetResultsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradeCheckGetResultsParamsWithTimeout creates a new UpgradeCheckGetResultsParams object -// with the ability to set a timeout on a request. -func NewUpgradeCheckGetResultsParamsWithTimeout(timeout time.Duration) *UpgradeCheckGetResultsParams { - return &UpgradeCheckGetResultsParams{ - timeout: timeout, - } -} - -// NewUpgradeCheckGetResultsParamsWithContext creates a new UpgradeCheckGetResultsParams object -// with the ability to set a context for a request. -func NewUpgradeCheckGetResultsParamsWithContext(ctx context.Context) *UpgradeCheckGetResultsParams { - return &UpgradeCheckGetResultsParams{ - Context: ctx, - } -} - -// NewUpgradeCheckGetResultsParamsWithHTTPClient creates a new UpgradeCheckGetResultsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradeCheckGetResultsParamsWithHTTPClient(client *http.Client) *UpgradeCheckGetResultsParams { - return &UpgradeCheckGetResultsParams{ - HTTPClient: client, - } -} - -/* -UpgradeCheckGetResultsParams contains all the parameters to send to the API endpoint - - for the upgrade check get results operation. - - Typically these are written to a http.Request. -*/ -type UpgradeCheckGetResultsParams struct { - - /* TestRunInstanceID. - - Specifies test run instance for which to fetch results - - Format: int64 - */ - TestRunInstanceID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade check get results params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeCheckGetResultsParams) WithDefaults() *UpgradeCheckGetResultsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade check get results params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeCheckGetResultsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) WithTimeout(timeout time.Duration) *UpgradeCheckGetResultsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) WithContext(ctx context.Context) *UpgradeCheckGetResultsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) WithHTTPClient(client *http.Client) *UpgradeCheckGetResultsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTestRunInstanceID adds the testRunInstanceID to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) WithTestRunInstanceID(testRunInstanceID int64) *UpgradeCheckGetResultsParams { - o.SetTestRunInstanceID(testRunInstanceID) - return o -} - -// SetTestRunInstanceID adds the testRunInstanceId to the upgrade check get results params -func (o *UpgradeCheckGetResultsParams) SetTestRunInstanceID(testRunInstanceID int64) { - o.TestRunInstanceID = testRunInstanceID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradeCheckGetResultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param testRunInstanceId - if err := r.SetPathParam("testRunInstanceId", swag.FormatInt64(o.TestRunInstanceID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/platform/upgrade_check_get_results_responses.go b/v2/client/platform/upgrade_check_get_results_responses.go deleted file mode 100644 index 4c701e7e..00000000 --- a/v2/client/platform/upgrade_check_get_results_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpgradeCheckGetResultsReader is a Reader for the UpgradeCheckGetResults structure. -type UpgradeCheckGetResultsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradeCheckGetResultsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpgradeCheckGetResultsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradeCheckGetResultsDefault(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 - } -} - -// NewUpgradeCheckGetResultsOK creates a UpgradeCheckGetResultsOK with default headers values -func NewUpgradeCheckGetResultsOK() *UpgradeCheckGetResultsOK { - return &UpgradeCheckGetResultsOK{} -} - -/* -UpgradeCheckGetResultsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpgradeCheckGetResultsOK struct { - Payload *models.UpgradeChecksResults -} - -// IsSuccess returns true when this upgrade check get results o k response has a 2xx status code -func (o *UpgradeCheckGetResultsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade check get results o k response has a 3xx status code -func (o *UpgradeCheckGetResultsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade check get results o k response has a 4xx status code -func (o *UpgradeCheckGetResultsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade check get results o k response has a 5xx status code -func (o *UpgradeCheckGetResultsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade check get results o k response a status code equal to that given -func (o *UpgradeCheckGetResultsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upgrade check get results o k response -func (o *UpgradeCheckGetResultsOK) Code() int { - return 200 -} - -func (o *UpgradeCheckGetResultsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /cluster/upgrade-checks/{testRunInstanceId}][%d] upgradeCheckGetResultsOK %s", 200, payload) -} - -func (o *UpgradeCheckGetResultsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /cluster/upgrade-checks/{testRunInstanceId}][%d] upgradeCheckGetResultsOK %s", 200, payload) -} - -func (o *UpgradeCheckGetResultsOK) GetPayload() *models.UpgradeChecksResults { - return o.Payload -} - -func (o *UpgradeCheckGetResultsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpgradeChecksResults) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradeCheckGetResultsDefault creates a UpgradeCheckGetResultsDefault with default headers values -func NewUpgradeCheckGetResultsDefault(code int) *UpgradeCheckGetResultsDefault { - return &UpgradeCheckGetResultsDefault{ - _statusCode: code, - } -} - -/* -UpgradeCheckGetResultsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradeCheckGetResultsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this upgrade check get results default response has a 2xx status code -func (o *UpgradeCheckGetResultsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade check get results default response has a 3xx status code -func (o *UpgradeCheckGetResultsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade check get results default response has a 4xx status code -func (o *UpgradeCheckGetResultsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade check get results default response has a 5xx status code -func (o *UpgradeCheckGetResultsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade check get results default response a status code equal to that given -func (o *UpgradeCheckGetResultsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade check get results default response -func (o *UpgradeCheckGetResultsDefault) Code() int { - return o._statusCode -} - -func (o *UpgradeCheckGetResultsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /cluster/upgrade-checks/{testRunInstanceId}][%d] UpgradeCheckGetResults default %s", o._statusCode, payload) -} - -func (o *UpgradeCheckGetResultsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /cluster/upgrade-checks/{testRunInstanceId}][%d] UpgradeCheckGetResults default %s", o._statusCode, payload) -} - -func (o *UpgradeCheckGetResultsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpgradeCheckGetResultsDefault) 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/upgrade_check_run_tests_parameters.go b/v2/client/platform/upgrade_check_run_tests_parameters.go deleted file mode 100644 index f9d7b086..00000000 --- a/v2/client/platform/upgrade_check_run_tests_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpgradeCheckRunTestsParams creates a new UpgradeCheckRunTestsParams 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 NewUpgradeCheckRunTestsParams() *UpgradeCheckRunTestsParams { - return &UpgradeCheckRunTestsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradeCheckRunTestsParamsWithTimeout creates a new UpgradeCheckRunTestsParams object -// with the ability to set a timeout on a request. -func NewUpgradeCheckRunTestsParamsWithTimeout(timeout time.Duration) *UpgradeCheckRunTestsParams { - return &UpgradeCheckRunTestsParams{ - timeout: timeout, - } -} - -// NewUpgradeCheckRunTestsParamsWithContext creates a new UpgradeCheckRunTestsParams object -// with the ability to set a context for a request. -func NewUpgradeCheckRunTestsParamsWithContext(ctx context.Context) *UpgradeCheckRunTestsParams { - return &UpgradeCheckRunTestsParams{ - Context: ctx, - } -} - -// NewUpgradeCheckRunTestsParamsWithHTTPClient creates a new UpgradeCheckRunTestsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradeCheckRunTestsParamsWithHTTPClient(client *http.Client) *UpgradeCheckRunTestsParams { - return &UpgradeCheckRunTestsParams{ - HTTPClient: client, - } -} - -/* -UpgradeCheckRunTestsParams contains all the parameters to send to the API endpoint - - for the upgrade check run tests operation. - - Typically these are written to a http.Request. -*/ -type UpgradeCheckRunTestsParams struct { - - /* Body. - - Run upgrade checks on cluster. - */ - Body *models.UpgradeCheckRunTestsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade check run tests params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeCheckRunTestsParams) WithDefaults() *UpgradeCheckRunTestsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade check run tests params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeCheckRunTestsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) WithTimeout(timeout time.Duration) *UpgradeCheckRunTestsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) WithContext(ctx context.Context) *UpgradeCheckRunTestsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) WithHTTPClient(client *http.Client) *UpgradeCheckRunTestsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) WithBody(body *models.UpgradeCheckRunTestsRequest) *UpgradeCheckRunTestsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upgrade check run tests params -func (o *UpgradeCheckRunTestsParams) SetBody(body *models.UpgradeCheckRunTestsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradeCheckRunTestsParams) 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/upgrade_check_run_tests_responses.go b/v2/client/platform/upgrade_check_run_tests_responses.go deleted file mode 100644 index cd7471f6..00000000 --- a/v2/client/platform/upgrade_check_run_tests_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpgradeCheckRunTestsReader is a Reader for the UpgradeCheckRunTests structure. -type UpgradeCheckRunTestsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradeCheckRunTestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpgradeCheckRunTestsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradeCheckRunTestsDefault(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 - } -} - -// NewUpgradeCheckRunTestsOK creates a UpgradeCheckRunTestsOK with default headers values -func NewUpgradeCheckRunTestsOK() *UpgradeCheckRunTestsOK { - return &UpgradeCheckRunTestsOK{} -} - -/* -UpgradeCheckRunTestsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpgradeCheckRunTestsOK struct { - Payload *models.UpgradeCheckRunTestsResult -} - -// IsSuccess returns true when this upgrade check run tests o k response has a 2xx status code -func (o *UpgradeCheckRunTestsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade check run tests o k response has a 3xx status code -func (o *UpgradeCheckRunTestsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade check run tests o k response has a 4xx status code -func (o *UpgradeCheckRunTestsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade check run tests o k response has a 5xx status code -func (o *UpgradeCheckRunTestsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade check run tests o k response a status code equal to that given -func (o *UpgradeCheckRunTestsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upgrade check run tests o k response -func (o *UpgradeCheckRunTestsOK) Code() int { - return 200 -} - -func (o *UpgradeCheckRunTestsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /cluster/upgrade-checks][%d] upgradeCheckRunTestsOK %s", 200, payload) -} - -func (o *UpgradeCheckRunTestsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /cluster/upgrade-checks][%d] upgradeCheckRunTestsOK %s", 200, payload) -} - -func (o *UpgradeCheckRunTestsOK) GetPayload() *models.UpgradeCheckRunTestsResult { - return o.Payload -} - -func (o *UpgradeCheckRunTestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpgradeCheckRunTestsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradeCheckRunTestsDefault creates a UpgradeCheckRunTestsDefault with default headers values -func NewUpgradeCheckRunTestsDefault(code int) *UpgradeCheckRunTestsDefault { - return &UpgradeCheckRunTestsDefault{ - _statusCode: code, - } -} - -/* -UpgradeCheckRunTestsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradeCheckRunTestsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this upgrade check run tests default response has a 2xx status code -func (o *UpgradeCheckRunTestsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade check run tests default response has a 3xx status code -func (o *UpgradeCheckRunTestsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade check run tests default response has a 4xx status code -func (o *UpgradeCheckRunTestsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade check run tests default response has a 5xx status code -func (o *UpgradeCheckRunTestsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade check run tests default response a status code equal to that given -func (o *UpgradeCheckRunTestsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade check run tests default response -func (o *UpgradeCheckRunTestsDefault) Code() int { - return o._statusCode -} - -func (o *UpgradeCheckRunTestsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /cluster/upgrade-checks][%d] UpgradeCheckRunTests default %s", o._statusCode, payload) -} - -func (o *UpgradeCheckRunTestsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /cluster/upgrade-checks][%d] UpgradeCheckRunTests default %s", o._statusCode, payload) -} - -func (o *UpgradeCheckRunTestsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpgradeCheckRunTestsDefault) 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/upgrade_cluster_software_parameters.go b/v2/client/platform/upgrade_cluster_software_parameters.go deleted file mode 100644 index 0f44106d..00000000 --- a/v2/client/platform/upgrade_cluster_software_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpgradeClusterSoftwareParams creates a new UpgradeClusterSoftwareParams 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 NewUpgradeClusterSoftwareParams() *UpgradeClusterSoftwareParams { - return &UpgradeClusterSoftwareParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpgradeClusterSoftwareParamsWithTimeout creates a new UpgradeClusterSoftwareParams object -// with the ability to set a timeout on a request. -func NewUpgradeClusterSoftwareParamsWithTimeout(timeout time.Duration) *UpgradeClusterSoftwareParams { - return &UpgradeClusterSoftwareParams{ - timeout: timeout, - } -} - -// NewUpgradeClusterSoftwareParamsWithContext creates a new UpgradeClusterSoftwareParams object -// with the ability to set a context for a request. -func NewUpgradeClusterSoftwareParamsWithContext(ctx context.Context) *UpgradeClusterSoftwareParams { - return &UpgradeClusterSoftwareParams{ - Context: ctx, - } -} - -// NewUpgradeClusterSoftwareParamsWithHTTPClient creates a new UpgradeClusterSoftwareParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpgradeClusterSoftwareParamsWithHTTPClient(client *http.Client) *UpgradeClusterSoftwareParams { - return &UpgradeClusterSoftwareParams{ - HTTPClient: client, - } -} - -/* -UpgradeClusterSoftwareParams contains all the parameters to send to the API endpoint - - for the upgrade cluster software operation. - - Typically these are written to a http.Request. -*/ -type UpgradeClusterSoftwareParams struct { - - /* Body. - - The parameters to upgrade the software on the cluster. - */ - Body *models.ClusterUpradeParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upgrade cluster software params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeClusterSoftwareParams) WithDefaults() *UpgradeClusterSoftwareParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upgrade cluster software params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpgradeClusterSoftwareParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) WithTimeout(timeout time.Duration) *UpgradeClusterSoftwareParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) WithContext(ctx context.Context) *UpgradeClusterSoftwareParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) WithHTTPClient(client *http.Client) *UpgradeClusterSoftwareParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) WithBody(body *models.ClusterUpradeParams) *UpgradeClusterSoftwareParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upgrade cluster software params -func (o *UpgradeClusterSoftwareParams) SetBody(body *models.ClusterUpradeParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpgradeClusterSoftwareParams) 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/upgrade_cluster_software_responses.go b/v2/client/platform/upgrade_cluster_software_responses.go deleted file mode 100644 index b25ed771..00000000 --- a/v2/client/platform/upgrade_cluster_software_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpgradeClusterSoftwareReader is a Reader for the UpgradeClusterSoftware structure. -type UpgradeClusterSoftwareReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpgradeClusterSoftwareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUpgradeClusterSoftwareAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpgradeClusterSoftwareDefault(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 - } -} - -// NewUpgradeClusterSoftwareAccepted creates a UpgradeClusterSoftwareAccepted with default headers values -func NewUpgradeClusterSoftwareAccepted() *UpgradeClusterSoftwareAccepted { - return &UpgradeClusterSoftwareAccepted{} -} - -/* -UpgradeClusterSoftwareAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UpgradeClusterSoftwareAccepted struct { - Payload *models.ClusterOperationResponseParams -} - -// IsSuccess returns true when this upgrade cluster software accepted response has a 2xx status code -func (o *UpgradeClusterSoftwareAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upgrade cluster software accepted response has a 3xx status code -func (o *UpgradeClusterSoftwareAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upgrade cluster software accepted response has a 4xx status code -func (o *UpgradeClusterSoftwareAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this upgrade cluster software accepted response has a 5xx status code -func (o *UpgradeClusterSoftwareAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this upgrade cluster software accepted response a status code equal to that given -func (o *UpgradeClusterSoftwareAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the upgrade cluster software accepted response -func (o *UpgradeClusterSoftwareAccepted) Code() int { - return 202 -} - -func (o *UpgradeClusterSoftwareAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/upgrade][%d] upgradeClusterSoftwareAccepted %s", 202, payload) -} - -func (o *UpgradeClusterSoftwareAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/upgrade][%d] upgradeClusterSoftwareAccepted %s", 202, payload) -} - -func (o *UpgradeClusterSoftwareAccepted) GetPayload() *models.ClusterOperationResponseParams { - return o.Payload -} - -func (o *UpgradeClusterSoftwareAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterOperationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpgradeClusterSoftwareDefault creates a UpgradeClusterSoftwareDefault with default headers values -func NewUpgradeClusterSoftwareDefault(code int) *UpgradeClusterSoftwareDefault { - return &UpgradeClusterSoftwareDefault{ - _statusCode: code, - } -} - -/* -UpgradeClusterSoftwareDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpgradeClusterSoftwareDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this upgrade cluster software default response has a 2xx status code -func (o *UpgradeClusterSoftwareDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upgrade cluster software default response has a 3xx status code -func (o *UpgradeClusterSoftwareDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upgrade cluster software default response has a 4xx status code -func (o *UpgradeClusterSoftwareDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upgrade cluster software default response has a 5xx status code -func (o *UpgradeClusterSoftwareDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upgrade cluster software default response a status code equal to that given -func (o *UpgradeClusterSoftwareDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upgrade cluster software default response -func (o *UpgradeClusterSoftwareDefault) Code() int { - return o._statusCode -} - -func (o *UpgradeClusterSoftwareDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/upgrade][%d] UpgradeClusterSoftware default %s", o._statusCode, payload) -} - -func (o *UpgradeClusterSoftwareDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /clusters/upgrade][%d] UpgradeClusterSoftware default %s", o._statusCode, payload) -} - -func (o *UpgradeClusterSoftwareDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpgradeClusterSoftwareDefault) 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/upload_package_by_url_parameters.go b/v2/client/platform/upload_package_by_url_parameters.go deleted file mode 100644 index 0b530b48..00000000 --- a/v2/client/platform/upload_package_by_url_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUploadPackageByURLParams creates a new UploadPackageByURLParams 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 NewUploadPackageByURLParams() *UploadPackageByURLParams { - return &UploadPackageByURLParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUploadPackageByURLParamsWithTimeout creates a new UploadPackageByURLParams object -// with the ability to set a timeout on a request. -func NewUploadPackageByURLParamsWithTimeout(timeout time.Duration) *UploadPackageByURLParams { - return &UploadPackageByURLParams{ - timeout: timeout, - } -} - -// NewUploadPackageByURLParamsWithContext creates a new UploadPackageByURLParams object -// with the ability to set a context for a request. -func NewUploadPackageByURLParamsWithContext(ctx context.Context) *UploadPackageByURLParams { - return &UploadPackageByURLParams{ - Context: ctx, - } -} - -// NewUploadPackageByURLParamsWithHTTPClient creates a new UploadPackageByURLParams object -// with the ability to set a custom HTTPClient for a request. -func NewUploadPackageByURLParamsWithHTTPClient(client *http.Client) *UploadPackageByURLParams { - return &UploadPackageByURLParams{ - HTTPClient: client, - } -} - -/* -UploadPackageByURLParams contains all the parameters to send to the API endpoint - - for the upload package by Url operation. - - Typically these are written to a http.Request. -*/ -type UploadPackageByURLParams struct { - - /* Body. - - Parameters to upload a package by URL. - */ - Body *models.UploadPackageURLParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upload package by Url params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadPackageByURLParams) WithDefaults() *UploadPackageByURLParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upload package by Url params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadPackageByURLParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upload package by Url params -func (o *UploadPackageByURLParams) WithTimeout(timeout time.Duration) *UploadPackageByURLParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload package by Url params -func (o *UploadPackageByURLParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload package by Url params -func (o *UploadPackageByURLParams) WithContext(ctx context.Context) *UploadPackageByURLParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload package by Url params -func (o *UploadPackageByURLParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload package by Url params -func (o *UploadPackageByURLParams) WithHTTPClient(client *http.Client) *UploadPackageByURLParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload package by Url params -func (o *UploadPackageByURLParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the upload package by Url params -func (o *UploadPackageByURLParams) WithBody(body *models.UploadPackageURLParams) *UploadPackageByURLParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the upload package by Url params -func (o *UploadPackageByURLParams) SetBody(body *models.UploadPackageURLParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadPackageByURLParams) 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/upload_package_by_url_responses.go b/v2/client/platform/upload_package_by_url_responses.go deleted file mode 100644 index d21a12e1..00000000 --- a/v2/client/platform/upload_package_by_url_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UploadPackageByURLReader is a Reader for the UploadPackageByURL structure. -type UploadPackageByURLReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadPackageByURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewUploadPackageByURLAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUploadPackageByURLDefault(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 - } -} - -// NewUploadPackageByURLAccepted creates a UploadPackageByURLAccepted with default headers values -func NewUploadPackageByURLAccepted() *UploadPackageByURLAccepted { - return &UploadPackageByURLAccepted{} -} - -/* -UploadPackageByURLAccepted describes a response with status code 202, with default header values. - -Success -*/ -type UploadPackageByURLAccepted struct { - Payload *models.ClusterOperationResponseParams -} - -// IsSuccess returns true when this upload package by Url accepted response has a 2xx status code -func (o *UploadPackageByURLAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upload package by Url accepted response has a 3xx status code -func (o *UploadPackageByURLAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upload package by Url accepted response has a 4xx status code -func (o *UploadPackageByURLAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this upload package by Url accepted response has a 5xx status code -func (o *UploadPackageByURLAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this upload package by Url accepted response a status code equal to that given -func (o *UploadPackageByURLAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the upload package by Url accepted response -func (o *UploadPackageByURLAccepted) Code() int { - return 202 -} - -func (o *UploadPackageByURLAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/packages/url][%d] uploadPackageByUrlAccepted %s", 202, payload) -} - -func (o *UploadPackageByURLAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/packages/url][%d] uploadPackageByUrlAccepted %s", 202, payload) -} - -func (o *UploadPackageByURLAccepted) GetPayload() *models.ClusterOperationResponseParams { - return o.Payload -} - -func (o *UploadPackageByURLAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterOperationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadPackageByURLDefault creates a UploadPackageByURLDefault with default headers values -func NewUploadPackageByURLDefault(code int) *UploadPackageByURLDefault { - return &UploadPackageByURLDefault{ - _statusCode: code, - } -} - -/* -UploadPackageByURLDefault describes a response with status code -1, with default header values. - -Error -*/ -type UploadPackageByURLDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this upload package by Url default response has a 2xx status code -func (o *UploadPackageByURLDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upload package by Url default response has a 3xx status code -func (o *UploadPackageByURLDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upload package by Url default response has a 4xx status code -func (o *UploadPackageByURLDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upload package by Url default response has a 5xx status code -func (o *UploadPackageByURLDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upload package by Url default response a status code equal to that given -func (o *UploadPackageByURLDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upload package by Url default response -func (o *UploadPackageByURLDefault) Code() int { - return o._statusCode -} - -func (o *UploadPackageByURLDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/packages/url][%d] UploadPackageByUrl default %s", o._statusCode, payload) -} - -func (o *UploadPackageByURLDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/packages/url][%d] UploadPackageByUrl default %s", o._statusCode, payload) -} - -func (o *UploadPackageByURLDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UploadPackageByURLDefault) 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/validate_smtp_configuration_parameters.go b/v2/client/platform/validate_smtp_configuration_parameters.go deleted file mode 100644 index 644b7b95..00000000 --- a/v2/client/platform/validate_smtp_configuration_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewValidateSMTPConfigurationParams creates a new ValidateSMTPConfigurationParams 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 NewValidateSMTPConfigurationParams() *ValidateSMTPConfigurationParams { - return &ValidateSMTPConfigurationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewValidateSMTPConfigurationParamsWithTimeout creates a new ValidateSMTPConfigurationParams object -// with the ability to set a timeout on a request. -func NewValidateSMTPConfigurationParamsWithTimeout(timeout time.Duration) *ValidateSMTPConfigurationParams { - return &ValidateSMTPConfigurationParams{ - timeout: timeout, - } -} - -// NewValidateSMTPConfigurationParamsWithContext creates a new ValidateSMTPConfigurationParams object -// with the ability to set a context for a request. -func NewValidateSMTPConfigurationParamsWithContext(ctx context.Context) *ValidateSMTPConfigurationParams { - return &ValidateSMTPConfigurationParams{ - Context: ctx, - } -} - -// NewValidateSMTPConfigurationParamsWithHTTPClient creates a new ValidateSMTPConfigurationParams object -// with the ability to set a custom HTTPClient for a request. -func NewValidateSMTPConfigurationParamsWithHTTPClient(client *http.Client) *ValidateSMTPConfigurationParams { - return &ValidateSMTPConfigurationParams{ - HTTPClient: client, - } -} - -/* -ValidateSMTPConfigurationParams contains all the parameters to send to the API endpoint - - for the validate SMTP configuration operation. - - Typically these are written to a http.Request. -*/ -type ValidateSMTPConfigurationParams struct { - - /* Body. - - Specifies the request parameters to validate SMTP configuration. - */ - Body *models.TestSMTPConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the validate SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateSMTPConfigurationParams) WithDefaults() *ValidateSMTPConfigurationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the validate SMTP configuration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateSMTPConfigurationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) WithTimeout(timeout time.Duration) *ValidateSMTPConfigurationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) WithContext(ctx context.Context) *ValidateSMTPConfigurationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) WithHTTPClient(client *http.Client) *ValidateSMTPConfigurationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) WithBody(body *models.TestSMTPConfig) *ValidateSMTPConfigurationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the validate SMTP configuration params -func (o *ValidateSMTPConfigurationParams) SetBody(body *models.TestSMTPConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ValidateSMTPConfigurationParams) 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/validate_smtp_configuration_responses.go b/v2/client/platform/validate_smtp_configuration_responses.go deleted file mode 100644 index 3b8f8aa7..00000000 --- a/v2/client/platform/validate_smtp_configuration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ValidateSMTPConfigurationReader is a Reader for the ValidateSMTPConfiguration structure. -type ValidateSMTPConfigurationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ValidateSMTPConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewValidateSMTPConfigurationNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewValidateSMTPConfigurationDefault(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 - } -} - -// NewValidateSMTPConfigurationNoContent creates a ValidateSMTPConfigurationNoContent with default headers values -func NewValidateSMTPConfigurationNoContent() *ValidateSMTPConfigurationNoContent { - return &ValidateSMTPConfigurationNoContent{} -} - -/* -ValidateSMTPConfigurationNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ValidateSMTPConfigurationNoContent struct { -} - -// IsSuccess returns true when this validate Smtp configuration no content response has a 2xx status code -func (o *ValidateSMTPConfigurationNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this validate Smtp configuration no content response has a 3xx status code -func (o *ValidateSMTPConfigurationNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this validate Smtp configuration no content response has a 4xx status code -func (o *ValidateSMTPConfigurationNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this validate Smtp configuration no content response has a 5xx status code -func (o *ValidateSMTPConfigurationNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this validate Smtp configuration no content response a status code equal to that given -func (o *ValidateSMTPConfigurationNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the validate Smtp configuration no content response -func (o *ValidateSMTPConfigurationNoContent) Code() int { - return 204 -} - -func (o *ValidateSMTPConfigurationNoContent) Error() string { - return fmt.Sprintf("[POST /clusters/smtp/validate][%d] validateSmtpConfigurationNoContent", 204) -} - -func (o *ValidateSMTPConfigurationNoContent) String() string { - return fmt.Sprintf("[POST /clusters/smtp/validate][%d] validateSmtpConfigurationNoContent", 204) -} - -func (o *ValidateSMTPConfigurationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewValidateSMTPConfigurationDefault creates a ValidateSMTPConfigurationDefault with default headers values -func NewValidateSMTPConfigurationDefault(code int) *ValidateSMTPConfigurationDefault { - return &ValidateSMTPConfigurationDefault{ - _statusCode: code, - } -} - -/* -ValidateSMTPConfigurationDefault describes a response with status code -1, with default header values. - -Error -*/ -type ValidateSMTPConfigurationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this validate SMTP configuration default response has a 2xx status code -func (o *ValidateSMTPConfigurationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this validate SMTP configuration default response has a 3xx status code -func (o *ValidateSMTPConfigurationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this validate SMTP configuration default response has a 4xx status code -func (o *ValidateSMTPConfigurationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this validate SMTP configuration default response has a 5xx status code -func (o *ValidateSMTPConfigurationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this validate SMTP configuration default response a status code equal to that given -func (o *ValidateSMTPConfigurationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the validate SMTP configuration default response -func (o *ValidateSMTPConfigurationDefault) Code() int { - return o._statusCode -} - -func (o *ValidateSMTPConfigurationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/smtp/validate][%d] ValidateSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *ValidateSMTPConfigurationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/smtp/validate][%d] ValidateSMTPConfiguration default %s", o._statusCode, payload) -} - -func (o *ValidateSMTPConfigurationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ValidateSMTPConfigurationDefault) 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/policy/create_protection_policy_parameters.go b/v2/client/policy/create_protection_policy_parameters.go deleted file mode 100644 index 204f188d..00000000 --- a/v2/client/policy/create_protection_policy_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateProtectionPolicyParams creates a new CreateProtectionPolicyParams 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 NewCreateProtectionPolicyParams() *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateProtectionPolicyParamsWithTimeout creates a new CreateProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewCreateProtectionPolicyParamsWithTimeout(timeout time.Duration) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewCreateProtectionPolicyParamsWithContext creates a new CreateProtectionPolicyParams object -// with the ability to set a context for a request. -func NewCreateProtectionPolicyParamsWithContext(ctx context.Context) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - Context: ctx, - } -} - -// NewCreateProtectionPolicyParamsWithHTTPClient creates a new CreateProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateProtectionPolicyParamsWithHTTPClient(client *http.Client) *CreateProtectionPolicyParams { - return &CreateProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -CreateProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the create protection policy operation. - - Typically these are written to a http.Request. -*/ -type CreateProtectionPolicyParams struct { - - /* Body. - - Request to create a Protection Policy. - */ - Body *models.ProtectionPolicyRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionPolicyParams) WithDefaults() *CreateProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create protection policy params -func (o *CreateProtectionPolicyParams) WithTimeout(timeout time.Duration) *CreateProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create protection policy params -func (o *CreateProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create protection policy params -func (o *CreateProtectionPolicyParams) WithContext(ctx context.Context) *CreateProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create protection policy params -func (o *CreateProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create protection policy params -func (o *CreateProtectionPolicyParams) WithHTTPClient(client *http.Client) *CreateProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create protection policy params -func (o *CreateProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create protection policy params -func (o *CreateProtectionPolicyParams) WithBody(body *models.ProtectionPolicyRequest) *CreateProtectionPolicyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create protection policy params -func (o *CreateProtectionPolicyParams) SetBody(body *models.ProtectionPolicyRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateProtectionPolicyParams) 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/policy/create_protection_policy_responses.go b/v2/client/policy/create_protection_policy_responses.go deleted file mode 100644 index 38ae2e4a..00000000 --- a/v2/client/policy/create_protection_policy_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateProtectionPolicyReader is a Reader for the CreateProtectionPolicy structure. -type CreateProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateProtectionPolicyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateProtectionPolicyDefault(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 - } -} - -// NewCreateProtectionPolicyCreated creates a CreateProtectionPolicyCreated with default headers values -func NewCreateProtectionPolicyCreated() *CreateProtectionPolicyCreated { - return &CreateProtectionPolicyCreated{} -} - -/* -CreateProtectionPolicyCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateProtectionPolicyCreated struct { - Payload *models.ProtectionPolicyResponse -} - -// IsSuccess returns true when this create protection policy created response has a 2xx status code -func (o *CreateProtectionPolicyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create protection policy created response has a 3xx status code -func (o *CreateProtectionPolicyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create protection policy created response has a 4xx status code -func (o *CreateProtectionPolicyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create protection policy created response has a 5xx status code -func (o *CreateProtectionPolicyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create protection policy created response a status code equal to that given -func (o *CreateProtectionPolicyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create protection policy created response -func (o *CreateProtectionPolicyCreated) Code() int { - return 201 -} - -func (o *CreateProtectionPolicyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/policies][%d] createProtectionPolicyCreated %s", 201, payload) -} - -func (o *CreateProtectionPolicyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/policies][%d] createProtectionPolicyCreated %s", 201, payload) -} - -func (o *CreateProtectionPolicyCreated) GetPayload() *models.ProtectionPolicyResponse { - return o.Payload -} - -func (o *CreateProtectionPolicyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicyResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateProtectionPolicyDefault creates a CreateProtectionPolicyDefault with default headers values -func NewCreateProtectionPolicyDefault(code int) *CreateProtectionPolicyDefault { - return &CreateProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -CreateProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateProtectionPolicyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create protection policy default response has a 2xx status code -func (o *CreateProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create protection policy default response has a 3xx status code -func (o *CreateProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create protection policy default response has a 4xx status code -func (o *CreateProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create protection policy default response has a 5xx status code -func (o *CreateProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create protection policy default response a status code equal to that given -func (o *CreateProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create protection policy default response -func (o *CreateProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *CreateProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/policies][%d] CreateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *CreateProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/policies][%d] CreateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *CreateProtectionPolicyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateProtectionPolicyDefault) 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/policy/delete_protection_policy_parameters.go b/v2/client/policy/delete_protection_policy_parameters.go deleted file mode 100644 index d8af2e31..00000000 --- a/v2/client/policy/delete_protection_policy_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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" -) - -// NewDeleteProtectionPolicyParams creates a new DeleteProtectionPolicyParams 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 NewDeleteProtectionPolicyParams() *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteProtectionPolicyParamsWithTimeout creates a new DeleteProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewDeleteProtectionPolicyParamsWithTimeout(timeout time.Duration) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewDeleteProtectionPolicyParamsWithContext creates a new DeleteProtectionPolicyParams object -// with the ability to set a context for a request. -func NewDeleteProtectionPolicyParamsWithContext(ctx context.Context) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - Context: ctx, - } -} - -// NewDeleteProtectionPolicyParamsWithHTTPClient creates a new DeleteProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteProtectionPolicyParamsWithHTTPClient(client *http.Client) *DeleteProtectionPolicyParams { - return &DeleteProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -DeleteProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the delete protection policy operation. - - Typically these are written to a http.Request. -*/ -type DeleteProtectionPolicyParams struct { - - /* ID. - - Specifies a unique id of the Protection Policy to delete. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionPolicyParams) WithDefaults() *DeleteProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithTimeout(timeout time.Duration) *DeleteProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithContext(ctx context.Context) *DeleteProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithHTTPClient(client *http.Client) *DeleteProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete protection policy params -func (o *DeleteProtectionPolicyParams) WithID(id string) *DeleteProtectionPolicyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete protection policy params -func (o *DeleteProtectionPolicyParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteProtectionPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/policy/delete_protection_policy_responses.go b/v2/client/policy/delete_protection_policy_responses.go deleted file mode 100644 index ff50ed06..00000000 --- a/v2/client/policy/delete_protection_policy_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteProtectionPolicyReader is a Reader for the DeleteProtectionPolicy structure. -type DeleteProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteProtectionPolicyNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteProtectionPolicyDefault(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 - } -} - -// NewDeleteProtectionPolicyNoContent creates a DeleteProtectionPolicyNoContent with default headers values -func NewDeleteProtectionPolicyNoContent() *DeleteProtectionPolicyNoContent { - return &DeleteProtectionPolicyNoContent{} -} - -/* -DeleteProtectionPolicyNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteProtectionPolicyNoContent struct { -} - -// IsSuccess returns true when this delete protection policy no content response has a 2xx status code -func (o *DeleteProtectionPolicyNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete protection policy no content response has a 3xx status code -func (o *DeleteProtectionPolicyNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete protection policy no content response has a 4xx status code -func (o *DeleteProtectionPolicyNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete protection policy no content response has a 5xx status code -func (o *DeleteProtectionPolicyNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete protection policy no content response a status code equal to that given -func (o *DeleteProtectionPolicyNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete protection policy no content response -func (o *DeleteProtectionPolicyNoContent) Code() int { - return 204 -} - -func (o *DeleteProtectionPolicyNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-protect/policies/{id}][%d] deleteProtectionPolicyNoContent", 204) -} - -func (o *DeleteProtectionPolicyNoContent) String() string { - return fmt.Sprintf("[DELETE /data-protect/policies/{id}][%d] deleteProtectionPolicyNoContent", 204) -} - -func (o *DeleteProtectionPolicyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteProtectionPolicyDefault creates a DeleteProtectionPolicyDefault with default headers values -func NewDeleteProtectionPolicyDefault(code int) *DeleteProtectionPolicyDefault { - return &DeleteProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -DeleteProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteProtectionPolicyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete protection policy default response has a 2xx status code -func (o *DeleteProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete protection policy default response has a 3xx status code -func (o *DeleteProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete protection policy default response has a 4xx status code -func (o *DeleteProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete protection policy default response has a 5xx status code -func (o *DeleteProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete protection policy default response a status code equal to that given -func (o *DeleteProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete protection policy default response -func (o *DeleteProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *DeleteProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/policies/{id}][%d] DeleteProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/policies/{id}][%d] DeleteProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionPolicyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteProtectionPolicyDefault) 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/policy/get_policy_template_by_id_parameters.go b/v2/client/policy/get_policy_template_by_id_parameters.go deleted file mode 100644 index f548d5a3..00000000 --- a/v2/client/policy/get_policy_template_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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" -) - -// NewGetPolicyTemplateByIDParams creates a new GetPolicyTemplateByIDParams 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 NewGetPolicyTemplateByIDParams() *GetPolicyTemplateByIDParams { - return &GetPolicyTemplateByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPolicyTemplateByIDParamsWithTimeout creates a new GetPolicyTemplateByIDParams object -// with the ability to set a timeout on a request. -func NewGetPolicyTemplateByIDParamsWithTimeout(timeout time.Duration) *GetPolicyTemplateByIDParams { - return &GetPolicyTemplateByIDParams{ - timeout: timeout, - } -} - -// NewGetPolicyTemplateByIDParamsWithContext creates a new GetPolicyTemplateByIDParams object -// with the ability to set a context for a request. -func NewGetPolicyTemplateByIDParamsWithContext(ctx context.Context) *GetPolicyTemplateByIDParams { - return &GetPolicyTemplateByIDParams{ - Context: ctx, - } -} - -// NewGetPolicyTemplateByIDParamsWithHTTPClient creates a new GetPolicyTemplateByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPolicyTemplateByIDParamsWithHTTPClient(client *http.Client) *GetPolicyTemplateByIDParams { - return &GetPolicyTemplateByIDParams{ - HTTPClient: client, - } -} - -/* -GetPolicyTemplateByIDParams contains all the parameters to send to the API endpoint - - for the get policy template by Id operation. - - Typically these are written to a http.Request. -*/ -type GetPolicyTemplateByIDParams struct { - - /* ID. - - Specifies a unique id of the Policy Template to return. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get policy template by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyTemplateByIDParams) WithDefaults() *GetPolicyTemplateByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get policy template by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyTemplateByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) WithTimeout(timeout time.Duration) *GetPolicyTemplateByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) WithContext(ctx context.Context) *GetPolicyTemplateByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) WithHTTPClient(client *http.Client) *GetPolicyTemplateByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) WithID(id string) *GetPolicyTemplateByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get policy template by Id params -func (o *GetPolicyTemplateByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPolicyTemplateByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/policy/get_policy_template_by_id_responses.go b/v2/client/policy/get_policy_template_by_id_responses.go deleted file mode 100644 index d4063717..00000000 --- a/v2/client/policy/get_policy_template_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPolicyTemplateByIDReader is a Reader for the GetPolicyTemplateByID structure. -type GetPolicyTemplateByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPolicyTemplateByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPolicyTemplateByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPolicyTemplateByIDDefault(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 - } -} - -// NewGetPolicyTemplateByIDOK creates a GetPolicyTemplateByIDOK with default headers values -func NewGetPolicyTemplateByIDOK() *GetPolicyTemplateByIDOK { - return &GetPolicyTemplateByIDOK{} -} - -/* -GetPolicyTemplateByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPolicyTemplateByIDOK struct { - Payload *models.PolicyTemplateResponse -} - -// IsSuccess returns true when this get policy template by Id o k response has a 2xx status code -func (o *GetPolicyTemplateByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get policy template by Id o k response has a 3xx status code -func (o *GetPolicyTemplateByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get policy template by Id o k response has a 4xx status code -func (o *GetPolicyTemplateByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get policy template by Id o k response has a 5xx status code -func (o *GetPolicyTemplateByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get policy template by Id o k response a status code equal to that given -func (o *GetPolicyTemplateByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get policy template by Id o k response -func (o *GetPolicyTemplateByIDOK) Code() int { - return 200 -} - -func (o *GetPolicyTemplateByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates/{id}][%d] getPolicyTemplateByIdOK %s", 200, payload) -} - -func (o *GetPolicyTemplateByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates/{id}][%d] getPolicyTemplateByIdOK %s", 200, payload) -} - -func (o *GetPolicyTemplateByIDOK) GetPayload() *models.PolicyTemplateResponse { - return o.Payload -} - -func (o *GetPolicyTemplateByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PolicyTemplateResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPolicyTemplateByIDDefault creates a GetPolicyTemplateByIDDefault with default headers values -func NewGetPolicyTemplateByIDDefault(code int) *GetPolicyTemplateByIDDefault { - return &GetPolicyTemplateByIDDefault{ - _statusCode: code, - } -} - -/* -GetPolicyTemplateByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPolicyTemplateByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get policy template by Id default response has a 2xx status code -func (o *GetPolicyTemplateByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get policy template by Id default response has a 3xx status code -func (o *GetPolicyTemplateByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get policy template by Id default response has a 4xx status code -func (o *GetPolicyTemplateByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get policy template by Id default response has a 5xx status code -func (o *GetPolicyTemplateByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get policy template by Id default response a status code equal to that given -func (o *GetPolicyTemplateByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get policy template by Id default response -func (o *GetPolicyTemplateByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetPolicyTemplateByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates/{id}][%d] GetPolicyTemplateById default %s", o._statusCode, payload) -} - -func (o *GetPolicyTemplateByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates/{id}][%d] GetPolicyTemplateById default %s", o._statusCode, payload) -} - -func (o *GetPolicyTemplateByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPolicyTemplateByIDDefault) 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/policy/get_policy_templates_parameters.go b/v2/client/policy/get_policy_templates_parameters.go deleted file mode 100644 index b2526b62..00000000 --- a/v2/client/policy/get_policy_templates_parameters.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/go-openapi/swag" -) - -// NewGetPolicyTemplatesParams creates a new GetPolicyTemplatesParams 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 NewGetPolicyTemplatesParams() *GetPolicyTemplatesParams { - return &GetPolicyTemplatesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPolicyTemplatesParamsWithTimeout creates a new GetPolicyTemplatesParams object -// with the ability to set a timeout on a request. -func NewGetPolicyTemplatesParamsWithTimeout(timeout time.Duration) *GetPolicyTemplatesParams { - return &GetPolicyTemplatesParams{ - timeout: timeout, - } -} - -// NewGetPolicyTemplatesParamsWithContext creates a new GetPolicyTemplatesParams object -// with the ability to set a context for a request. -func NewGetPolicyTemplatesParamsWithContext(ctx context.Context) *GetPolicyTemplatesParams { - return &GetPolicyTemplatesParams{ - Context: ctx, - } -} - -// NewGetPolicyTemplatesParamsWithHTTPClient creates a new GetPolicyTemplatesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPolicyTemplatesParamsWithHTTPClient(client *http.Client) *GetPolicyTemplatesParams { - return &GetPolicyTemplatesParams{ - HTTPClient: client, - } -} - -/* -GetPolicyTemplatesParams contains all the parameters to send to the API endpoint - - for the get policy templates operation. - - Typically these are written to a http.Request. -*/ -type GetPolicyTemplatesParams struct { - - /* Ids. - - Filter policies by a list of policy template ids. - */ - Ids []string - - /* IncludeTenants. - - IncludeTenantPolicies specifies if objects of all the organizations under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* PolicyNames. - - Filter policies by a list of policy names. - */ - PolicyNames []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* TenantIds. - - TenantIds contains ids of the organizations for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get policy templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyTemplatesParams) WithDefaults() *GetPolicyTemplatesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get policy templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyTemplatesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get policy templates params -func (o *GetPolicyTemplatesParams) WithTimeout(timeout time.Duration) *GetPolicyTemplatesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get policy templates params -func (o *GetPolicyTemplatesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get policy templates params -func (o *GetPolicyTemplatesParams) WithContext(ctx context.Context) *GetPolicyTemplatesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get policy templates params -func (o *GetPolicyTemplatesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get policy templates params -func (o *GetPolicyTemplatesParams) WithHTTPClient(client *http.Client) *GetPolicyTemplatesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get policy templates params -func (o *GetPolicyTemplatesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get policy templates params -func (o *GetPolicyTemplatesParams) WithIds(ids []string) *GetPolicyTemplatesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get policy templates params -func (o *GetPolicyTemplatesParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get policy templates params -func (o *GetPolicyTemplatesParams) WithIncludeTenants(includeTenants *bool) *GetPolicyTemplatesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get policy templates params -func (o *GetPolicyTemplatesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithPolicyNames adds the policyNames to the get policy templates params -func (o *GetPolicyTemplatesParams) WithPolicyNames(policyNames []string) *GetPolicyTemplatesParams { - o.SetPolicyNames(policyNames) - return o -} - -// SetPolicyNames adds the policyNames to the get policy templates params -func (o *GetPolicyTemplatesParams) SetPolicyNames(policyNames []string) { - o.PolicyNames = policyNames -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get policy templates params -func (o *GetPolicyTemplatesParams) WithRequestInitiatorType(requestInitiatorType *string) *GetPolicyTemplatesParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get policy templates params -func (o *GetPolicyTemplatesParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithTenantIds adds the tenantIds to the get policy templates params -func (o *GetPolicyTemplatesParams) WithTenantIds(tenantIds []string) *GetPolicyTemplatesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get policy templates params -func (o *GetPolicyTemplatesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPolicyTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.PolicyNames != nil { - - // binding items for policyNames - joinedPolicyNames := o.bindParamPolicyNames(reg) - - // query array param policyNames - if err := r.SetQueryParam("policyNames", joinedPolicyNames...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetPolicyTemplates binds the parameter ids -func (o *GetPolicyTemplatesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetPolicyTemplates binds the parameter policyNames -func (o *GetPolicyTemplatesParams) bindParamPolicyNames(formats strfmt.Registry) []string { - policyNamesIR := o.PolicyNames - - var policyNamesIC []string - for _, policyNamesIIR := range policyNamesIR { // explode []string - - policyNamesIIV := policyNamesIIR // string as string - policyNamesIC = append(policyNamesIC, policyNamesIIV) - } - - // items.CollectionFormat: "" - policyNamesIS := swag.JoinByFormat(policyNamesIC, "") - - return policyNamesIS -} - -// bindParamGetPolicyTemplates binds the parameter tenantIds -func (o *GetPolicyTemplatesParams) 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/client/policy/get_policy_templates_responses.go b/v2/client/policy/get_policy_templates_responses.go deleted file mode 100644 index 095c2edc..00000000 --- a/v2/client/policy/get_policy_templates_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPolicyTemplatesReader is a Reader for the GetPolicyTemplates structure. -type GetPolicyTemplatesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPolicyTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPolicyTemplatesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPolicyTemplatesDefault(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 - } -} - -// NewGetPolicyTemplatesOK creates a GetPolicyTemplatesOK with default headers values -func NewGetPolicyTemplatesOK() *GetPolicyTemplatesOK { - return &GetPolicyTemplatesOK{} -} - -/* -GetPolicyTemplatesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPolicyTemplatesOK struct { - Payload *models.PolicyTemplatesResponseWithPagination -} - -// IsSuccess returns true when this get policy templates o k response has a 2xx status code -func (o *GetPolicyTemplatesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get policy templates o k response has a 3xx status code -func (o *GetPolicyTemplatesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get policy templates o k response has a 4xx status code -func (o *GetPolicyTemplatesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get policy templates o k response has a 5xx status code -func (o *GetPolicyTemplatesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get policy templates o k response a status code equal to that given -func (o *GetPolicyTemplatesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get policy templates o k response -func (o *GetPolicyTemplatesOK) Code() int { - return 200 -} - -func (o *GetPolicyTemplatesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates][%d] getPolicyTemplatesOK %s", 200, payload) -} - -func (o *GetPolicyTemplatesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates][%d] getPolicyTemplatesOK %s", 200, payload) -} - -func (o *GetPolicyTemplatesOK) GetPayload() *models.PolicyTemplatesResponseWithPagination { - return o.Payload -} - -func (o *GetPolicyTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PolicyTemplatesResponseWithPagination) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPolicyTemplatesDefault creates a GetPolicyTemplatesDefault with default headers values -func NewGetPolicyTemplatesDefault(code int) *GetPolicyTemplatesDefault { - return &GetPolicyTemplatesDefault{ - _statusCode: code, - } -} - -/* -GetPolicyTemplatesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPolicyTemplatesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get policy templates default response has a 2xx status code -func (o *GetPolicyTemplatesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get policy templates default response has a 3xx status code -func (o *GetPolicyTemplatesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get policy templates default response has a 4xx status code -func (o *GetPolicyTemplatesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get policy templates default response has a 5xx status code -func (o *GetPolicyTemplatesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get policy templates default response a status code equal to that given -func (o *GetPolicyTemplatesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get policy templates default response -func (o *GetPolicyTemplatesDefault) Code() int { - return o._statusCode -} - -func (o *GetPolicyTemplatesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates][%d] GetPolicyTemplates default %s", o._statusCode, payload) -} - -func (o *GetPolicyTemplatesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policy-templates][%d] GetPolicyTemplates default %s", o._statusCode, payload) -} - -func (o *GetPolicyTemplatesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPolicyTemplatesDefault) 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/policy/get_protection_policies_parameters.go b/v2/client/policy/get_protection_policies_parameters.go deleted file mode 100644 index 198e2dca..00000000 --- a/v2/client/policy/get_protection_policies_parameters.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/go-openapi/swag" -) - -// NewGetProtectionPoliciesParams creates a new GetProtectionPoliciesParams 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 NewGetProtectionPoliciesParams() *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionPoliciesParamsWithTimeout creates a new GetProtectionPoliciesParams object -// with the ability to set a timeout on a request. -func NewGetProtectionPoliciesParamsWithTimeout(timeout time.Duration) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - timeout: timeout, - } -} - -// NewGetProtectionPoliciesParamsWithContext creates a new GetProtectionPoliciesParams object -// with the ability to set a context for a request. -func NewGetProtectionPoliciesParamsWithContext(ctx context.Context) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - Context: ctx, - } -} - -// NewGetProtectionPoliciesParamsWithHTTPClient creates a new GetProtectionPoliciesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionPoliciesParamsWithHTTPClient(client *http.Client) *GetProtectionPoliciesParams { - return &GetProtectionPoliciesParams{ - HTTPClient: client, - } -} - -/* -GetProtectionPoliciesParams contains all the parameters to send to the API endpoint - - for the get protection policies operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionPoliciesParams struct { - - /* ExcludeLinkedPolicies. - - If excludeLinkedPolicies is set to true then only local policies created on cluster will be returned. The result will exclude all linked policies created from policy templates. - */ - ExcludeLinkedPolicies *bool - - /* Ids. - - Filter policies by a list of policy ids. - */ - Ids []string - - /* IncludeReplicatedPolicies. - - If includeReplicatedPolicies is set to true, then response will also contain replicated policies. By default, replication policies are not included in the response. - */ - IncludeReplicatedPolicies *bool - - /* IncludeStats. - - If includeStats is set to true, then response will return number of protection groups and objects. By default, the protection stats are not included in the response. - */ - IncludeStats *bool - - /* IncludeTenants. - - IncludeTenantPolicies specifies if objects of all the organizations under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* PolicyNames. - - Filter policies by a list of policy names. - */ - PolicyNames []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* TenantIds. - - TenantIds contains ids of the organizations for which objects are to be returned. - */ - TenantIds []string - - /* Types. - - Types specifies the policy type of policies to be returned - - Default: ["Regular"] - */ - Types []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPoliciesParams) WithDefaults() *GetProtectionPoliciesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPoliciesParams) SetDefaults() { - var ( - typesDefault = []string{"Regular"} - ) - - val := GetProtectionPoliciesParams{ - Types: typesDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTimeout(timeout time.Duration) *GetProtectionPoliciesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection policies params -func (o *GetProtectionPoliciesParams) WithContext(ctx context.Context) *GetProtectionPoliciesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection policies params -func (o *GetProtectionPoliciesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection policies params -func (o *GetProtectionPoliciesParams) WithHTTPClient(client *http.Client) *GetProtectionPoliciesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection policies params -func (o *GetProtectionPoliciesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithExcludeLinkedPolicies adds the excludeLinkedPolicies to the get protection policies params -func (o *GetProtectionPoliciesParams) WithExcludeLinkedPolicies(excludeLinkedPolicies *bool) *GetProtectionPoliciesParams { - o.SetExcludeLinkedPolicies(excludeLinkedPolicies) - return o -} - -// SetExcludeLinkedPolicies adds the excludeLinkedPolicies to the get protection policies params -func (o *GetProtectionPoliciesParams) SetExcludeLinkedPolicies(excludeLinkedPolicies *bool) { - o.ExcludeLinkedPolicies = excludeLinkedPolicies -} - -// WithIds adds the ids to the get protection policies params -func (o *GetProtectionPoliciesParams) WithIds(ids []string) *GetProtectionPoliciesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get protection policies params -func (o *GetProtectionPoliciesParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeReplicatedPolicies adds the includeReplicatedPolicies to the get protection policies params -func (o *GetProtectionPoliciesParams) WithIncludeReplicatedPolicies(includeReplicatedPolicies *bool) *GetProtectionPoliciesParams { - o.SetIncludeReplicatedPolicies(includeReplicatedPolicies) - return o -} - -// SetIncludeReplicatedPolicies adds the includeReplicatedPolicies to the get protection policies params -func (o *GetProtectionPoliciesParams) SetIncludeReplicatedPolicies(includeReplicatedPolicies *bool) { - o.IncludeReplicatedPolicies = includeReplicatedPolicies -} - -// WithIncludeStats adds the includeStats to the get protection policies params -func (o *GetProtectionPoliciesParams) WithIncludeStats(includeStats *bool) *GetProtectionPoliciesParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the get protection policies params -func (o *GetProtectionPoliciesParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeTenants adds the includeTenants to the get protection policies params -func (o *GetProtectionPoliciesParams) WithIncludeTenants(includeTenants *bool) *GetProtectionPoliciesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection policies params -func (o *GetProtectionPoliciesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithPolicyNames adds the policyNames to the get protection policies params -func (o *GetProtectionPoliciesParams) WithPolicyNames(policyNames []string) *GetProtectionPoliciesParams { - o.SetPolicyNames(policyNames) - return o -} - -// SetPolicyNames adds the policyNames to the get protection policies params -func (o *GetProtectionPoliciesParams) SetPolicyNames(policyNames []string) { - o.PolicyNames = policyNames -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection policies params -func (o *GetProtectionPoliciesParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionPoliciesParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection policies params -func (o *GetProtectionPoliciesParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithTenantIds adds the tenantIds to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTenantIds(tenantIds []string) *GetProtectionPoliciesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithTypes adds the types to the get protection policies params -func (o *GetProtectionPoliciesParams) WithTypes(types []string) *GetProtectionPoliciesParams { - o.SetTypes(types) - return o -} - -// SetTypes adds the types to the get protection policies params -func (o *GetProtectionPoliciesParams) SetTypes(types []string) { - o.Types = types -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ExcludeLinkedPolicies != nil { - - // query param excludeLinkedPolicies - var qrExcludeLinkedPolicies bool - - if o.ExcludeLinkedPolicies != nil { - qrExcludeLinkedPolicies = *o.ExcludeLinkedPolicies - } - qExcludeLinkedPolicies := swag.FormatBool(qrExcludeLinkedPolicies) - if qExcludeLinkedPolicies != "" { - - if err := r.SetQueryParam("excludeLinkedPolicies", qExcludeLinkedPolicies); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeReplicatedPolicies != nil { - - // query param includeReplicatedPolicies - var qrIncludeReplicatedPolicies bool - - if o.IncludeReplicatedPolicies != nil { - qrIncludeReplicatedPolicies = *o.IncludeReplicatedPolicies - } - qIncludeReplicatedPolicies := swag.FormatBool(qrIncludeReplicatedPolicies) - if qIncludeReplicatedPolicies != "" { - - if err := r.SetQueryParam("includeReplicatedPolicies", qIncludeReplicatedPolicies); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); 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.PolicyNames != nil { - - // binding items for policyNames - joinedPolicyNames := o.bindParamPolicyNames(reg) - - // query array param policyNames - if err := r.SetQueryParam("policyNames", joinedPolicyNames...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - 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.Types != nil { - - // binding items for types - joinedTypes := o.bindParamTypes(reg) - - // query array param types - if err := r.SetQueryParam("types", joinedTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionPolicies binds the parameter ids -func (o *GetProtectionPoliciesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetProtectionPolicies binds the parameter policyNames -func (o *GetProtectionPoliciesParams) bindParamPolicyNames(formats strfmt.Registry) []string { - policyNamesIR := o.PolicyNames - - var policyNamesIC []string - for _, policyNamesIIR := range policyNamesIR { // explode []string - - policyNamesIIV := policyNamesIIR // string as string - policyNamesIC = append(policyNamesIC, policyNamesIIV) - } - - // items.CollectionFormat: "" - policyNamesIS := swag.JoinByFormat(policyNamesIC, "") - - return policyNamesIS -} - -// bindParamGetProtectionPolicies binds the parameter tenantIds -func (o *GetProtectionPoliciesParams) 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 -} - -// bindParamGetProtectionPolicies binds the parameter types -func (o *GetProtectionPoliciesParams) bindParamTypes(formats strfmt.Registry) []string { - typesIR := o.Types - - var typesIC []string - for _, typesIIR := range typesIR { // explode []string - - typesIIV := typesIIR // string as string - typesIC = append(typesIC, typesIIV) - } - - // items.CollectionFormat: "" - typesIS := swag.JoinByFormat(typesIC, "") - - return typesIS -} diff --git a/v2/client/policy/get_protection_policies_responses.go b/v2/client/policy/get_protection_policies_responses.go deleted file mode 100644 index e263a3fc..00000000 --- a/v2/client/policy/get_protection_policies_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionPoliciesReader is a Reader for the GetProtectionPolicies structure. -type GetProtectionPoliciesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionPoliciesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionPoliciesDefault(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 - } -} - -// NewGetProtectionPoliciesOK creates a GetProtectionPoliciesOK with default headers values -func NewGetProtectionPoliciesOK() *GetProtectionPoliciesOK { - return &GetProtectionPoliciesOK{} -} - -/* -GetProtectionPoliciesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionPoliciesOK struct { - Payload *models.ProtectionPolicyResponseWithPagination -} - -// IsSuccess returns true when this get protection policies o k response has a 2xx status code -func (o *GetProtectionPoliciesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection policies o k response has a 3xx status code -func (o *GetProtectionPoliciesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection policies o k response has a 4xx status code -func (o *GetProtectionPoliciesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection policies o k response has a 5xx status code -func (o *GetProtectionPoliciesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection policies o k response a status code equal to that given -func (o *GetProtectionPoliciesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection policies o k response -func (o *GetProtectionPoliciesOK) Code() int { - return 200 -} - -func (o *GetProtectionPoliciesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies][%d] getProtectionPoliciesOK %s", 200, payload) -} - -func (o *GetProtectionPoliciesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies][%d] getProtectionPoliciesOK %s", 200, payload) -} - -func (o *GetProtectionPoliciesOK) GetPayload() *models.ProtectionPolicyResponseWithPagination { - return o.Payload -} - -func (o *GetProtectionPoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicyResponseWithPagination) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionPoliciesDefault creates a GetProtectionPoliciesDefault with default headers values -func NewGetProtectionPoliciesDefault(code int) *GetProtectionPoliciesDefault { - return &GetProtectionPoliciesDefault{ - _statusCode: code, - } -} - -/* -GetProtectionPoliciesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionPoliciesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection policies default response has a 2xx status code -func (o *GetProtectionPoliciesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection policies default response has a 3xx status code -func (o *GetProtectionPoliciesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection policies default response has a 4xx status code -func (o *GetProtectionPoliciesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection policies default response has a 5xx status code -func (o *GetProtectionPoliciesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection policies default response a status code equal to that given -func (o *GetProtectionPoliciesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection policies default response -func (o *GetProtectionPoliciesDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionPoliciesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies][%d] GetProtectionPolicies default %s", o._statusCode, payload) -} - -func (o *GetProtectionPoliciesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies][%d] GetProtectionPolicies default %s", o._statusCode, payload) -} - -func (o *GetProtectionPoliciesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionPoliciesDefault) 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/policy/get_protection_policy_by_id_parameters.go b/v2/client/policy/get_protection_policy_by_id_parameters.go deleted file mode 100644 index 7f16f430..00000000 --- a/v2/client/policy/get_protection_policy_by_id_parameters.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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" -) - -// NewGetProtectionPolicyByIDParams creates a new GetProtectionPolicyByIDParams 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 NewGetProtectionPolicyByIDParams() *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionPolicyByIDParamsWithTimeout creates a new GetProtectionPolicyByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectionPolicyByIDParamsWithTimeout(timeout time.Duration) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectionPolicyByIDParamsWithContext creates a new GetProtectionPolicyByIDParams object -// with the ability to set a context for a request. -func NewGetProtectionPolicyByIDParamsWithContext(ctx context.Context) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - Context: ctx, - } -} - -// NewGetProtectionPolicyByIDParamsWithHTTPClient creates a new GetProtectionPolicyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionPolicyByIDParamsWithHTTPClient(client *http.Client) *GetProtectionPolicyByIDParams { - return &GetProtectionPolicyByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectionPolicyByIDParams contains all the parameters to send to the API endpoint - - for the get protection policy by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionPolicyByIDParams struct { - - /* ID. - - Specifies a unique id of the Protection Policy to return. - */ - ID string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection policy by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicyByIDParams) WithDefaults() *GetProtectionPolicyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection policy by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionPolicyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithTimeout(timeout time.Duration) *GetProtectionPolicyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithContext(ctx context.Context) *GetProtectionPolicyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithHTTPClient(client *http.Client) *GetProtectionPolicyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithID(id string) *GetProtectionPolicyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetID(id string) { - o.ID = id -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionPolicyByIDParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection policy by Id params -func (o *GetProtectionPolicyByIDParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionPolicyByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/policy/get_protection_policy_by_id_responses.go b/v2/client/policy/get_protection_policy_by_id_responses.go deleted file mode 100644 index 5b591e85..00000000 --- a/v2/client/policy/get_protection_policy_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionPolicyByIDReader is a Reader for the GetProtectionPolicyByID structure. -type GetProtectionPolicyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionPolicyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionPolicyByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionPolicyByIDDefault(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 - } -} - -// NewGetProtectionPolicyByIDOK creates a GetProtectionPolicyByIDOK with default headers values -func NewGetProtectionPolicyByIDOK() *GetProtectionPolicyByIDOK { - return &GetProtectionPolicyByIDOK{} -} - -/* -GetProtectionPolicyByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionPolicyByIDOK struct { - Payload *models.ProtectionPolicyResponse -} - -// IsSuccess returns true when this get protection policy by Id o k response has a 2xx status code -func (o *GetProtectionPolicyByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection policy by Id o k response has a 3xx status code -func (o *GetProtectionPolicyByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection policy by Id o k response has a 4xx status code -func (o *GetProtectionPolicyByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection policy by Id o k response has a 5xx status code -func (o *GetProtectionPolicyByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection policy by Id o k response a status code equal to that given -func (o *GetProtectionPolicyByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection policy by Id o k response -func (o *GetProtectionPolicyByIDOK) Code() int { - return 200 -} - -func (o *GetProtectionPolicyByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies/{id}][%d] getProtectionPolicyByIdOK %s", 200, payload) -} - -func (o *GetProtectionPolicyByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies/{id}][%d] getProtectionPolicyByIdOK %s", 200, payload) -} - -func (o *GetProtectionPolicyByIDOK) GetPayload() *models.ProtectionPolicyResponse { - return o.Payload -} - -func (o *GetProtectionPolicyByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicyResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionPolicyByIDDefault creates a GetProtectionPolicyByIDDefault with default headers values -func NewGetProtectionPolicyByIDDefault(code int) *GetProtectionPolicyByIDDefault { - return &GetProtectionPolicyByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectionPolicyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionPolicyByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection policy by Id default response has a 2xx status code -func (o *GetProtectionPolicyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection policy by Id default response has a 3xx status code -func (o *GetProtectionPolicyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection policy by Id default response has a 4xx status code -func (o *GetProtectionPolicyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection policy by Id default response has a 5xx status code -func (o *GetProtectionPolicyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection policy by Id default response a status code equal to that given -func (o *GetProtectionPolicyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection policy by Id default response -func (o *GetProtectionPolicyByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionPolicyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies/{id}][%d] GetProtectionPolicyById default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/policies/{id}][%d] GetProtectionPolicyById default %s", o._statusCode, payload) -} - -func (o *GetProtectionPolicyByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionPolicyByIDDefault) 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/policy/policy_client.go b/v2/client/policy/policy_client.go deleted file mode 100644 index 20a3f859..00000000 --- a/v2/client/policy/policy_client.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new policy API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new policy API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new policy API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for policy API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateProtectionPolicy(params *CreateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionPolicyCreated, error) - - DeleteProtectionPolicy(params *DeleteProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionPolicyNoContent, error) - - GetPolicyTemplateByID(params *GetPolicyTemplateByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPolicyTemplateByIDOK, error) - - GetPolicyTemplates(params *GetPolicyTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPolicyTemplatesOK, error) - - GetProtectionPolicies(params *GetProtectionPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPoliciesOK, error) - - GetProtectionPolicyByID(params *GetProtectionPolicyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicyByIDOK, error) - - UpdateProtectionPolicy(params *UpdateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionPolicyOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateProtectionPolicy creates a protection policy - -Create the Protection Policy and returns the newly created policy object. -*/ -func (a *Client) CreateProtectionPolicy(params *CreateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionPolicyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "CreateProtectionPolicy", - Method: "POST", - PathPattern: "/data-protect/policies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateProtectionPolicyReader{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.(*CreateProtectionPolicyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateProtectionPolicyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteProtectionPolicy deletes a protection policy - -Deletes a Protection Policy based on given policy id. -*/ -func (a *Client) DeleteProtectionPolicy(params *DeleteProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionPolicyNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteProtectionPolicy", - Method: "DELETE", - PathPattern: "/data-protect/policies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteProtectionPolicyReader{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.(*DeleteProtectionPolicyNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteProtectionPolicyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPolicyTemplateByID lists details about a single policy template - -Returns the Policy Template corresponding to the specified Policy Id. -*/ -func (a *Client) GetPolicyTemplateByID(params *GetPolicyTemplateByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPolicyTemplateByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPolicyTemplateByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetPolicyTemplateById", - Method: "GET", - PathPattern: "/data-protect/policy-templates/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPolicyTemplateByIDReader{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.(*GetPolicyTemplateByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPolicyTemplateByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPolicyTemplates lists policy templates filtered by query parameters - -Returns the policy templates based on the filtering parameters. If no parameters are specified, then all the policy templates are returned. -*/ -func (a *Client) GetPolicyTemplates(params *GetPolicyTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPolicyTemplatesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPolicyTemplatesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPolicyTemplates", - Method: "GET", - PathPattern: "/data-protect/policy-templates", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPolicyTemplatesReader{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.(*GetPolicyTemplatesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPolicyTemplatesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionPolicies lists protection policies based on provided filtering parameters - -Lists protection policies based on filtering query parameters. -*/ -func (a *Client) GetProtectionPolicies(params *GetProtectionPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPoliciesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionPoliciesParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionPolicies", - Method: "GET", - PathPattern: "/data-protect/policies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionPoliciesReader{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.(*GetProtectionPoliciesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionPoliciesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionPolicyByID lists details about a single protection policy - -Returns the Protection Policy details based on provided Policy Id. -*/ -func (a *Client) GetProtectionPolicyByID(params *GetProtectionPolicyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionPolicyByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionPolicyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionPolicyById", - Method: "GET", - PathPattern: "/data-protect/policies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionPolicyByIDReader{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.(*GetProtectionPolicyByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionPolicyByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionPolicy updates a protection policy - -Specifies the request to update the existing Protection Policy. On successful update, returns the updated policy object. -*/ -func (a *Client) UpdateProtectionPolicy(params *UpdateProtectionPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionPolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionPolicy", - Method: "PUT", - PathPattern: "/data-protect/policies/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionPolicyReader{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.(*UpdateProtectionPolicyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionPolicyDefault) - 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/v2/client/policy/update_protection_policy_parameters.go b/v2/client/policy/update_protection_policy_parameters.go deleted file mode 100644 index c8928096..00000000 --- a/v2/client/policy/update_protection_policy_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectionPolicyParams creates a new UpdateProtectionPolicyParams 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 NewUpdateProtectionPolicyParams() *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionPolicyParamsWithTimeout creates a new UpdateProtectionPolicyParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionPolicyParamsWithTimeout(timeout time.Duration) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionPolicyParamsWithContext creates a new UpdateProtectionPolicyParams object -// with the ability to set a context for a request. -func NewUpdateProtectionPolicyParamsWithContext(ctx context.Context) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - Context: ctx, - } -} - -// NewUpdateProtectionPolicyParamsWithHTTPClient creates a new UpdateProtectionPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionPolicyParamsWithHTTPClient(client *http.Client) *UpdateProtectionPolicyParams { - return &UpdateProtectionPolicyParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionPolicyParams contains all the parameters to send to the API endpoint - - for the update protection policy operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionPolicyParams struct { - - /* Body. - - Request to update a Protection Policy. - */ - Body *models.ProtectionPolicyRequest - - /* ID. - - Specifies a unique id of the Protection Policy to update. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionPolicyParams) WithDefaults() *UpdateProtectionPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithTimeout(timeout time.Duration) *UpdateProtectionPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithContext(ctx context.Context) *UpdateProtectionPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithHTTPClient(client *http.Client) *UpdateProtectionPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithBody(body *models.ProtectionPolicyRequest) *UpdateProtectionPolicyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetBody(body *models.ProtectionPolicyRequest) { - o.Body = body -} - -// WithID adds the id to the update protection policy params -func (o *UpdateProtectionPolicyParams) WithID(id string) *UpdateProtectionPolicyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection policy params -func (o *UpdateProtectionPolicyParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionPolicyParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/policy/update_protection_policy_responses.go b/v2/client/policy/update_protection_policy_responses.go deleted file mode 100644 index a7318669..00000000 --- a/v2/client/policy/update_protection_policy_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package policy - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectionPolicyReader is a Reader for the UpdateProtectionPolicy structure. -type UpdateProtectionPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionPolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionPolicyDefault(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 - } -} - -// NewUpdateProtectionPolicyOK creates a UpdateProtectionPolicyOK with default headers values -func NewUpdateProtectionPolicyOK() *UpdateProtectionPolicyOK { - return &UpdateProtectionPolicyOK{} -} - -/* -UpdateProtectionPolicyOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionPolicyOK struct { - Payload *models.ProtectionPolicyResponse -} - -// IsSuccess returns true when this update protection policy o k response has a 2xx status code -func (o *UpdateProtectionPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection policy o k response has a 3xx status code -func (o *UpdateProtectionPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection policy o k response has a 4xx status code -func (o *UpdateProtectionPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection policy o k response has a 5xx status code -func (o *UpdateProtectionPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection policy o k response a status code equal to that given -func (o *UpdateProtectionPolicyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection policy o k response -func (o *UpdateProtectionPolicyOK) Code() int { - return 200 -} - -func (o *UpdateProtectionPolicyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/policies/{id}][%d] updateProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateProtectionPolicyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/policies/{id}][%d] updateProtectionPolicyOK %s", 200, payload) -} - -func (o *UpdateProtectionPolicyOK) GetPayload() *models.ProtectionPolicyResponse { - return o.Payload -} - -func (o *UpdateProtectionPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionPolicyResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionPolicyDefault creates a UpdateProtectionPolicyDefault with default headers values -func NewUpdateProtectionPolicyDefault(code int) *UpdateProtectionPolicyDefault { - return &UpdateProtectionPolicyDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionPolicyDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionPolicyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protection policy default response has a 2xx status code -func (o *UpdateProtectionPolicyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection policy default response has a 3xx status code -func (o *UpdateProtectionPolicyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection policy default response has a 4xx status code -func (o *UpdateProtectionPolicyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection policy default response has a 5xx status code -func (o *UpdateProtectionPolicyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection policy default response a status code equal to that given -func (o *UpdateProtectionPolicyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection policy default response -func (o *UpdateProtectionPolicyDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionPolicyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/policies/{id}][%d] UpdateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionPolicyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/policies/{id}][%d] UpdateProtectionPolicy default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionPolicyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectionPolicyDefault) 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/privilege/get_privileges_parameters.go b/v2/client/privilege/get_privileges_parameters.go deleted file mode 100644 index 0bd0c032..00000000 --- a/v2/client/privilege/get_privileges_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privilege - -// 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/go-openapi/swag" -) - -// NewGetPrivilegesParams creates a new GetPrivilegesParams 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 NewGetPrivilegesParams() *GetPrivilegesParams { - return &GetPrivilegesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPrivilegesParamsWithTimeout creates a new GetPrivilegesParams object -// with the ability to set a timeout on a request. -func NewGetPrivilegesParamsWithTimeout(timeout time.Duration) *GetPrivilegesParams { - return &GetPrivilegesParams{ - timeout: timeout, - } -} - -// NewGetPrivilegesParamsWithContext creates a new GetPrivilegesParams object -// with the ability to set a context for a request. -func NewGetPrivilegesParamsWithContext(ctx context.Context) *GetPrivilegesParams { - return &GetPrivilegesParams{ - Context: ctx, - } -} - -// NewGetPrivilegesParamsWithHTTPClient creates a new GetPrivilegesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPrivilegesParamsWithHTTPClient(client *http.Client) *GetPrivilegesParams { - return &GetPrivilegesParams{ - HTTPClient: client, - } -} - -/* -GetPrivilegesParams contains all the parameters to send to the API endpoint - - for the get privileges operation. - - Typically these are written to a http.Request. -*/ -type GetPrivilegesParams struct { - - /* Names. - - Filter by a list of Privilege names. - */ - Names []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrivilegesParams) WithDefaults() *GetPrivilegesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get privileges params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrivilegesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get privileges params -func (o *GetPrivilegesParams) WithTimeout(timeout time.Duration) *GetPrivilegesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get privileges params -func (o *GetPrivilegesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get privileges params -func (o *GetPrivilegesParams) WithContext(ctx context.Context) *GetPrivilegesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get privileges params -func (o *GetPrivilegesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get privileges params -func (o *GetPrivilegesParams) WithHTTPClient(client *http.Client) *GetPrivilegesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get privileges params -func (o *GetPrivilegesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithNames adds the names to the get privileges params -func (o *GetPrivilegesParams) WithNames(names []string) *GetPrivilegesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get privileges params -func (o *GetPrivilegesParams) SetNames(names []string) { - o.Names = names -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPrivilegesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetPrivileges binds the parameter names -func (o *GetPrivilegesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} diff --git a/v2/client/privilege/get_privileges_responses.go b/v2/client/privilege/get_privileges_responses.go deleted file mode 100644 index d2527c00..00000000 --- a/v2/client/privilege/get_privileges_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privilege - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPrivilegesReader is a Reader for the GetPrivileges structure. -type GetPrivilegesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPrivilegesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPrivilegesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPrivilegesDefault(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 - } -} - -// NewGetPrivilegesOK creates a GetPrivilegesOK with default headers values -func NewGetPrivilegesOK() *GetPrivilegesOK { - return &GetPrivilegesOK{} -} - -/* -GetPrivilegesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPrivilegesOK struct { - Payload *models.Privileges -} - -// IsSuccess returns true when this get privileges o k response has a 2xx status code -func (o *GetPrivilegesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get privileges o k response has a 3xx status code -func (o *GetPrivilegesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get privileges o k response has a 4xx status code -func (o *GetPrivilegesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get privileges o k response has a 5xx status code -func (o *GetPrivilegesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get privileges o k response a status code equal to that given -func (o *GetPrivilegesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get privileges o k response -func (o *GetPrivilegesOK) Code() int { - return 200 -} - -func (o *GetPrivilegesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /privileges][%d] getPrivilegesOK %s", 200, payload) -} - -func (o *GetPrivilegesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /privileges][%d] getPrivilegesOK %s", 200, payload) -} - -func (o *GetPrivilegesOK) GetPayload() *models.Privileges { - return o.Payload -} - -func (o *GetPrivilegesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Privileges) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPrivilegesDefault creates a GetPrivilegesDefault with default headers values -func NewGetPrivilegesDefault(code int) *GetPrivilegesDefault { - return &GetPrivilegesDefault{ - _statusCode: code, - } -} - -/* -GetPrivilegesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPrivilegesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get privileges default response has a 2xx status code -func (o *GetPrivilegesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get privileges default response has a 3xx status code -func (o *GetPrivilegesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get privileges default response has a 4xx status code -func (o *GetPrivilegesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get privileges default response has a 5xx status code -func (o *GetPrivilegesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get privileges default response a status code equal to that given -func (o *GetPrivilegesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get privileges default response -func (o *GetPrivilegesDefault) Code() int { - return o._statusCode -} - -func (o *GetPrivilegesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /privileges][%d] GetPrivileges default %s", o._statusCode, payload) -} - -func (o *GetPrivilegesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /privileges][%d] GetPrivileges default %s", o._statusCode, payload) -} - -func (o *GetPrivilegesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPrivilegesDefault) 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/privilege/privilege_client.go b/v2/client/privilege/privilege_client.go deleted file mode 100644 index 312f03e4..00000000 --- a/v2/client/privilege/privilege_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package privilege - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new privilege API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new privilege API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new privilege API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for privilege API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetPrivileges(params *GetPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrivilegesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetPrivileges gets privileges - -Get Privileges. -*/ -func (a *Client) GetPrivileges(params *GetPrivilegesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrivilegesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPrivilegesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPrivileges", - Method: "GET", - PathPattern: "/privileges", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPrivilegesReader{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.(*GetPrivilegesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPrivilegesDefault) - 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/v2/client/protected_object/perform_action_on_protect_objects_parameters.go b/v2/client/protected_object/perform_action_on_protect_objects_parameters.go deleted file mode 100644 index 4f35c0e5..00000000 --- a/v2/client/protected_object/perform_action_on_protect_objects_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformActionOnProtectObjectsParams creates a new PerformActionOnProtectObjectsParams 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 NewPerformActionOnProtectObjectsParams() *PerformActionOnProtectObjectsParams { - return &PerformActionOnProtectObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformActionOnProtectObjectsParamsWithTimeout creates a new PerformActionOnProtectObjectsParams object -// with the ability to set a timeout on a request. -func NewPerformActionOnProtectObjectsParamsWithTimeout(timeout time.Duration) *PerformActionOnProtectObjectsParams { - return &PerformActionOnProtectObjectsParams{ - timeout: timeout, - } -} - -// NewPerformActionOnProtectObjectsParamsWithContext creates a new PerformActionOnProtectObjectsParams object -// with the ability to set a context for a request. -func NewPerformActionOnProtectObjectsParamsWithContext(ctx context.Context) *PerformActionOnProtectObjectsParams { - return &PerformActionOnProtectObjectsParams{ - Context: ctx, - } -} - -// NewPerformActionOnProtectObjectsParamsWithHTTPClient creates a new PerformActionOnProtectObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformActionOnProtectObjectsParamsWithHTTPClient(client *http.Client) *PerformActionOnProtectObjectsParams { - return &PerformActionOnProtectObjectsParams{ - HTTPClient: client, - } -} - -/* -PerformActionOnProtectObjectsParams contains all the parameters to send to the API endpoint - - for the perform action on protect objects operation. - - Typically these are written to a http.Request. -*/ -type PerformActionOnProtectObjectsParams struct { - - /* Body. - - Specifies the parameters to perform an action on an already protected object. - */ - Body *models.ProtectdObjectsActionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform action on protect objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnProtectObjectsParams) WithDefaults() *PerformActionOnProtectObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform action on protect objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnProtectObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) WithTimeout(timeout time.Duration) *PerformActionOnProtectObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) WithContext(ctx context.Context) *PerformActionOnProtectObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) WithHTTPClient(client *http.Client) *PerformActionOnProtectObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) WithBody(body *models.ProtectdObjectsActionRequest) *PerformActionOnProtectObjectsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform action on protect objects params -func (o *PerformActionOnProtectObjectsParams) SetBody(body *models.ProtectdObjectsActionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformActionOnProtectObjectsParams) 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/protected_object/perform_action_on_protect_objects_responses.go b/v2/client/protected_object/perform_action_on_protect_objects_responses.go deleted file mode 100644 index 8ffa6e7c..00000000 --- a/v2/client/protected_object/perform_action_on_protect_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformActionOnProtectObjectsReader is a Reader for the PerformActionOnProtectObjects structure. -type PerformActionOnProtectObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformActionOnProtectObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 207: - result := NewPerformActionOnProtectObjectsMultiStatus() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformActionOnProtectObjectsDefault(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 - } -} - -// NewPerformActionOnProtectObjectsMultiStatus creates a PerformActionOnProtectObjectsMultiStatus with default headers values -func NewPerformActionOnProtectObjectsMultiStatus() *PerformActionOnProtectObjectsMultiStatus { - return &PerformActionOnProtectObjectsMultiStatus{} -} - -/* -PerformActionOnProtectObjectsMultiStatus describes a response with status code 207, with default header values. - -Success -*/ -type PerformActionOnProtectObjectsMultiStatus struct { - Payload *models.ProtectedObjectActionResponse -} - -// IsSuccess returns true when this perform action on protect objects multi status response has a 2xx status code -func (o *PerformActionOnProtectObjectsMultiStatus) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform action on protect objects multi status response has a 3xx status code -func (o *PerformActionOnProtectObjectsMultiStatus) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform action on protect objects multi status response has a 4xx status code -func (o *PerformActionOnProtectObjectsMultiStatus) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform action on protect objects multi status response has a 5xx status code -func (o *PerformActionOnProtectObjectsMultiStatus) IsServerError() bool { - return false -} - -// IsCode returns true when this perform action on protect objects multi status response a status code equal to that given -func (o *PerformActionOnProtectObjectsMultiStatus) IsCode(code int) bool { - return code == 207 -} - -// Code gets the status code for the perform action on protect objects multi status response -func (o *PerformActionOnProtectObjectsMultiStatus) Code() int { - return 207 -} - -func (o *PerformActionOnProtectObjectsMultiStatus) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects/actions][%d] performActionOnProtectObjectsMultiStatus %s", 207, payload) -} - -func (o *PerformActionOnProtectObjectsMultiStatus) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects/actions][%d] performActionOnProtectObjectsMultiStatus %s", 207, payload) -} - -func (o *PerformActionOnProtectObjectsMultiStatus) GetPayload() *models.ProtectedObjectActionResponse { - return o.Payload -} - -func (o *PerformActionOnProtectObjectsMultiStatus) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectedObjectActionResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPerformActionOnProtectObjectsDefault creates a PerformActionOnProtectObjectsDefault with default headers values -func NewPerformActionOnProtectObjectsDefault(code int) *PerformActionOnProtectObjectsDefault { - return &PerformActionOnProtectObjectsDefault{ - _statusCode: code, - } -} - -/* -PerformActionOnProtectObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformActionOnProtectObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform action on protect objects default response has a 2xx status code -func (o *PerformActionOnProtectObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform action on protect objects default response has a 3xx status code -func (o *PerformActionOnProtectObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform action on protect objects default response has a 4xx status code -func (o *PerformActionOnProtectObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform action on protect objects default response has a 5xx status code -func (o *PerformActionOnProtectObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform action on protect objects default response a status code equal to that given -func (o *PerformActionOnProtectObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform action on protect objects default response -func (o *PerformActionOnProtectObjectsDefault) Code() int { - return o._statusCode -} - -func (o *PerformActionOnProtectObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects/actions][%d] PerformActionOnProtectObjects default %s", o._statusCode, payload) -} - -func (o *PerformActionOnProtectObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects/actions][%d] PerformActionOnProtectObjects default %s", o._statusCode, payload) -} - -func (o *PerformActionOnProtectObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformActionOnProtectObjectsDefault) 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/protected_object/protect_objects_of_any_type_parameters.go b/v2/client/protected_object/protect_objects_of_any_type_parameters.go deleted file mode 100644 index 6ffe650b..00000000 --- a/v2/client/protected_object/protect_objects_of_any_type_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewProtectObjectsOfAnyTypeParams creates a new ProtectObjectsOfAnyTypeParams 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 NewProtectObjectsOfAnyTypeParams() *ProtectObjectsOfAnyTypeParams { - return &ProtectObjectsOfAnyTypeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewProtectObjectsOfAnyTypeParamsWithTimeout creates a new ProtectObjectsOfAnyTypeParams object -// with the ability to set a timeout on a request. -func NewProtectObjectsOfAnyTypeParamsWithTimeout(timeout time.Duration) *ProtectObjectsOfAnyTypeParams { - return &ProtectObjectsOfAnyTypeParams{ - timeout: timeout, - } -} - -// NewProtectObjectsOfAnyTypeParamsWithContext creates a new ProtectObjectsOfAnyTypeParams object -// with the ability to set a context for a request. -func NewProtectObjectsOfAnyTypeParamsWithContext(ctx context.Context) *ProtectObjectsOfAnyTypeParams { - return &ProtectObjectsOfAnyTypeParams{ - Context: ctx, - } -} - -// NewProtectObjectsOfAnyTypeParamsWithHTTPClient creates a new ProtectObjectsOfAnyTypeParams object -// with the ability to set a custom HTTPClient for a request. -func NewProtectObjectsOfAnyTypeParamsWithHTTPClient(client *http.Client) *ProtectObjectsOfAnyTypeParams { - return &ProtectObjectsOfAnyTypeParams{ - HTTPClient: client, - } -} - -/* -ProtectObjectsOfAnyTypeParams contains all the parameters to send to the API endpoint - - for the protect objects of any type operation. - - Typically these are written to a http.Request. -*/ -type ProtectObjectsOfAnyTypeParams struct { - - /* Body. - - Specifies the parameters to protect objects. - */ - Body *models.CreateProtectedObjectsRequest - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the protect objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectObjectsOfAnyTypeParams) WithDefaults() *ProtectObjectsOfAnyTypeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the protect objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectObjectsOfAnyTypeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) WithTimeout(timeout time.Duration) *ProtectObjectsOfAnyTypeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) WithContext(ctx context.Context) *ProtectObjectsOfAnyTypeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) WithHTTPClient(client *http.Client) *ProtectObjectsOfAnyTypeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) WithBody(body *models.CreateProtectedObjectsRequest) *ProtectObjectsOfAnyTypeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) SetBody(body *models.CreateProtectedObjectsRequest) { - o.Body = body -} - -// WithRequestInitiatorType adds the requestInitiatorType to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) WithRequestInitiatorType(requestInitiatorType *string) *ProtectObjectsOfAnyTypeParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the protect objects of any type params -func (o *ProtectObjectsOfAnyTypeParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *ProtectObjectsOfAnyTypeParams) 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 o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protected_object/protect_objects_of_any_type_responses.go b/v2/client/protected_object/protect_objects_of_any_type_responses.go deleted file mode 100644 index 18279503..00000000 --- a/v2/client/protected_object/protect_objects_of_any_type_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ProtectObjectsOfAnyTypeReader is a Reader for the ProtectObjectsOfAnyType structure. -type ProtectObjectsOfAnyTypeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ProtectObjectsOfAnyTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 207: - result := NewProtectObjectsOfAnyTypeMultiStatus() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewProtectObjectsOfAnyTypeDefault(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 - } -} - -// NewProtectObjectsOfAnyTypeMultiStatus creates a ProtectObjectsOfAnyTypeMultiStatus with default headers values -func NewProtectObjectsOfAnyTypeMultiStatus() *ProtectObjectsOfAnyTypeMultiStatus { - return &ProtectObjectsOfAnyTypeMultiStatus{} -} - -/* -ProtectObjectsOfAnyTypeMultiStatus describes a response with status code 207, with default header values. - -Success -*/ -type ProtectObjectsOfAnyTypeMultiStatus struct { - Payload *models.CreateProtectedObjectsResponse -} - -// IsSuccess returns true when this protect objects of any type multi status response has a 2xx status code -func (o *ProtectObjectsOfAnyTypeMultiStatus) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this protect objects of any type multi status response has a 3xx status code -func (o *ProtectObjectsOfAnyTypeMultiStatus) IsRedirect() bool { - return false -} - -// IsClientError returns true when this protect objects of any type multi status response has a 4xx status code -func (o *ProtectObjectsOfAnyTypeMultiStatus) IsClientError() bool { - return false -} - -// IsServerError returns true when this protect objects of any type multi status response has a 5xx status code -func (o *ProtectObjectsOfAnyTypeMultiStatus) IsServerError() bool { - return false -} - -// IsCode returns true when this protect objects of any type multi status response a status code equal to that given -func (o *ProtectObjectsOfAnyTypeMultiStatus) IsCode(code int) bool { - return code == 207 -} - -// Code gets the status code for the protect objects of any type multi status response -func (o *ProtectObjectsOfAnyTypeMultiStatus) Code() int { - return 207 -} - -func (o *ProtectObjectsOfAnyTypeMultiStatus) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects][%d] protectObjectsOfAnyTypeMultiStatus %s", 207, payload) -} - -func (o *ProtectObjectsOfAnyTypeMultiStatus) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects][%d] protectObjectsOfAnyTypeMultiStatus %s", 207, payload) -} - -func (o *ProtectObjectsOfAnyTypeMultiStatus) GetPayload() *models.CreateProtectedObjectsResponse { - return o.Payload -} - -func (o *ProtectObjectsOfAnyTypeMultiStatus) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateProtectedObjectsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewProtectObjectsOfAnyTypeDefault creates a ProtectObjectsOfAnyTypeDefault with default headers values -func NewProtectObjectsOfAnyTypeDefault(code int) *ProtectObjectsOfAnyTypeDefault { - return &ProtectObjectsOfAnyTypeDefault{ - _statusCode: code, - } -} - -/* -ProtectObjectsOfAnyTypeDefault describes a response with status code -1, with default header values. - -Error -*/ -type ProtectObjectsOfAnyTypeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this protect objects of any type default response has a 2xx status code -func (o *ProtectObjectsOfAnyTypeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this protect objects of any type default response has a 3xx status code -func (o *ProtectObjectsOfAnyTypeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this protect objects of any type default response has a 4xx status code -func (o *ProtectObjectsOfAnyTypeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this protect objects of any type default response has a 5xx status code -func (o *ProtectObjectsOfAnyTypeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this protect objects of any type default response a status code equal to that given -func (o *ProtectObjectsOfAnyTypeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the protect objects of any type default response -func (o *ProtectObjectsOfAnyTypeDefault) Code() int { - return o._statusCode -} - -func (o *ProtectObjectsOfAnyTypeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects][%d] ProtectObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *ProtectObjectsOfAnyTypeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protected-objects][%d] ProtectObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *ProtectObjectsOfAnyTypeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ProtectObjectsOfAnyTypeDefault) 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/protected_object/protected_object_client.go b/v2/client/protected_object/protected_object_client.go deleted file mode 100644 index c9ec981f..00000000 --- a/v2/client/protected_object/protected_object_client.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protected object API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protected object API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protected object API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protected object API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - PerformActionOnProtectObjects(params *PerformActionOnProtectObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnProtectObjectsMultiStatus, error) - - ProtectObjectsOfAnyType(params *ProtectObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectObjectsOfAnyTypeMultiStatus, error) - - UpdateProtectedObjectsOfAnyType(params *UpdateProtectedObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectedObjectsOfAnyTypeOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -PerformActionOnProtectObjects performs actions on protect objects - -Perform actions on Protected Objects. -*/ -func (a *Client) PerformActionOnProtectObjects(params *PerformActionOnProtectObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnProtectObjectsMultiStatus, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformActionOnProtectObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "PerformActionOnProtectObjects", - Method: "POST", - PathPattern: "/data-protect/protected-objects/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformActionOnProtectObjectsReader{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.(*PerformActionOnProtectObjectsMultiStatus) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformActionOnProtectObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ProtectObjectsOfAnyType creates object backup - -Create Protect Objects Backup. -*/ -func (a *Client) ProtectObjectsOfAnyType(params *ProtectObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectObjectsOfAnyTypeMultiStatus, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewProtectObjectsOfAnyTypeParams() - } - op := &runtime.ClientOperation{ - ID: "ProtectObjectsOfAnyType", - Method: "POST", - PathPattern: "/data-protect/protected-objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ProtectObjectsOfAnyTypeReader{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.(*ProtectObjectsOfAnyTypeMultiStatus) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ProtectObjectsOfAnyTypeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectedObjectsOfAnyType updates object backup - -Update Protected object backup configuration given a object id. -*/ -func (a *Client) UpdateProtectedObjectsOfAnyType(params *UpdateProtectedObjectsOfAnyTypeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectedObjectsOfAnyTypeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectedObjectsOfAnyTypeParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectedObjectsOfAnyType", - Method: "PUT", - PathPattern: "/data-protect/protected-objects/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectedObjectsOfAnyTypeReader{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.(*UpdateProtectedObjectsOfAnyTypeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectedObjectsOfAnyTypeDefault) - 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/v2/client/protected_object/update_protected_objects_of_any_type_parameters.go b/v2/client/protected_object/update_protected_objects_of_any_type_parameters.go deleted file mode 100644 index ac5a567a..00000000 --- a/v2/client/protected_object/update_protected_objects_of_any_type_parameters.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectedObjectsOfAnyTypeParams creates a new UpdateProtectedObjectsOfAnyTypeParams 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 NewUpdateProtectedObjectsOfAnyTypeParams() *UpdateProtectedObjectsOfAnyTypeParams { - return &UpdateProtectedObjectsOfAnyTypeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectedObjectsOfAnyTypeParamsWithTimeout creates a new UpdateProtectedObjectsOfAnyTypeParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectedObjectsOfAnyTypeParamsWithTimeout(timeout time.Duration) *UpdateProtectedObjectsOfAnyTypeParams { - return &UpdateProtectedObjectsOfAnyTypeParams{ - timeout: timeout, - } -} - -// NewUpdateProtectedObjectsOfAnyTypeParamsWithContext creates a new UpdateProtectedObjectsOfAnyTypeParams object -// with the ability to set a context for a request. -func NewUpdateProtectedObjectsOfAnyTypeParamsWithContext(ctx context.Context) *UpdateProtectedObjectsOfAnyTypeParams { - return &UpdateProtectedObjectsOfAnyTypeParams{ - Context: ctx, - } -} - -// NewUpdateProtectedObjectsOfAnyTypeParamsWithHTTPClient creates a new UpdateProtectedObjectsOfAnyTypeParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectedObjectsOfAnyTypeParamsWithHTTPClient(client *http.Client) *UpdateProtectedObjectsOfAnyTypeParams { - return &UpdateProtectedObjectsOfAnyTypeParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectedObjectsOfAnyTypeParams contains all the parameters to send to the API endpoint - - for the update protected objects of any type operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectedObjectsOfAnyTypeParams struct { - - /* Body. - - Specifies the parameters to perform an update on protected objects. - */ - Body *models.UpdateProtectedObjectsRequest - - /* ID. - - Specifies the id of the Protected Object. - - Format: int64 - */ - ID int64 - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protected objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithDefaults() *UpdateProtectedObjectsOfAnyTypeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protected objects of any type params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithTimeout(timeout time.Duration) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithContext(ctx context.Context) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithHTTPClient(client *http.Client) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithBody(body *models.UpdateProtectedObjectsRequest) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetBody(body *models.UpdateProtectedObjectsRequest) { - o.Body = body -} - -// WithID adds the id to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithID(id int64) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetID(id int64) { - o.ID = id -} - -// WithRequestInitiatorType adds the requestInitiatorType to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) WithRequestInitiatorType(requestInitiatorType *string) *UpdateProtectedObjectsOfAnyTypeParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the update protected objects of any type params -func (o *UpdateProtectedObjectsOfAnyTypeParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectedObjectsOfAnyTypeParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protected_object/update_protected_objects_of_any_type_responses.go b/v2/client/protected_object/update_protected_objects_of_any_type_responses.go deleted file mode 100644 index 19cfb261..00000000 --- a/v2/client/protected_object/update_protected_objects_of_any_type_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protected_object - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectedObjectsOfAnyTypeReader is a Reader for the UpdateProtectedObjectsOfAnyType structure. -type UpdateProtectedObjectsOfAnyTypeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectedObjectsOfAnyTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectedObjectsOfAnyTypeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectedObjectsOfAnyTypeDefault(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 - } -} - -// NewUpdateProtectedObjectsOfAnyTypeOK creates a UpdateProtectedObjectsOfAnyTypeOK with default headers values -func NewUpdateProtectedObjectsOfAnyTypeOK() *UpdateProtectedObjectsOfAnyTypeOK { - return &UpdateProtectedObjectsOfAnyTypeOK{} -} - -/* -UpdateProtectedObjectsOfAnyTypeOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectedObjectsOfAnyTypeOK struct { - Payload *models.GetProtectedObjectResponse -} - -// IsSuccess returns true when this update protected objects of any type o k response has a 2xx status code -func (o *UpdateProtectedObjectsOfAnyTypeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protected objects of any type o k response has a 3xx status code -func (o *UpdateProtectedObjectsOfAnyTypeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protected objects of any type o k response has a 4xx status code -func (o *UpdateProtectedObjectsOfAnyTypeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protected objects of any type o k response has a 5xx status code -func (o *UpdateProtectedObjectsOfAnyTypeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protected objects of any type o k response a status code equal to that given -func (o *UpdateProtectedObjectsOfAnyTypeOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protected objects of any type o k response -func (o *UpdateProtectedObjectsOfAnyTypeOK) Code() int { - return 200 -} - -func (o *UpdateProtectedObjectsOfAnyTypeOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protected-objects/{id}][%d] updateProtectedObjectsOfAnyTypeOK %s", 200, payload) -} - -func (o *UpdateProtectedObjectsOfAnyTypeOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protected-objects/{id}][%d] updateProtectedObjectsOfAnyTypeOK %s", 200, payload) -} - -func (o *UpdateProtectedObjectsOfAnyTypeOK) GetPayload() *models.GetProtectedObjectResponse { - return o.Payload -} - -func (o *UpdateProtectedObjectsOfAnyTypeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetProtectedObjectResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectedObjectsOfAnyTypeDefault creates a UpdateProtectedObjectsOfAnyTypeDefault with default headers values -func NewUpdateProtectedObjectsOfAnyTypeDefault(code int) *UpdateProtectedObjectsOfAnyTypeDefault { - return &UpdateProtectedObjectsOfAnyTypeDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectedObjectsOfAnyTypeDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectedObjectsOfAnyTypeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protected objects of any type default response has a 2xx status code -func (o *UpdateProtectedObjectsOfAnyTypeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protected objects of any type default response has a 3xx status code -func (o *UpdateProtectedObjectsOfAnyTypeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protected objects of any type default response has a 4xx status code -func (o *UpdateProtectedObjectsOfAnyTypeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protected objects of any type default response has a 5xx status code -func (o *UpdateProtectedObjectsOfAnyTypeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protected objects of any type default response a status code equal to that given -func (o *UpdateProtectedObjectsOfAnyTypeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protected objects of any type default response -func (o *UpdateProtectedObjectsOfAnyTypeDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectedObjectsOfAnyTypeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protected-objects/{id}][%d] UpdateProtectedObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *UpdateProtectedObjectsOfAnyTypeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protected-objects/{id}][%d] UpdateProtectedObjectsOfAnyType default %s", o._statusCode, payload) -} - -func (o *UpdateProtectedObjectsOfAnyTypeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectedObjectsOfAnyTypeDefault) 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/create_protection_group_parameters.go b/v2/client/protection_group/create_protection_group_parameters.go deleted file mode 100644 index b497091b..00000000 --- a/v2/client/protection_group/create_protection_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateProtectionGroupParams creates a new CreateProtectionGroupParams 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 NewCreateProtectionGroupParams() *CreateProtectionGroupParams { - return &CreateProtectionGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateProtectionGroupParamsWithTimeout creates a new CreateProtectionGroupParams object -// with the ability to set a timeout on a request. -func NewCreateProtectionGroupParamsWithTimeout(timeout time.Duration) *CreateProtectionGroupParams { - return &CreateProtectionGroupParams{ - timeout: timeout, - } -} - -// NewCreateProtectionGroupParamsWithContext creates a new CreateProtectionGroupParams object -// with the ability to set a context for a request. -func NewCreateProtectionGroupParamsWithContext(ctx context.Context) *CreateProtectionGroupParams { - return &CreateProtectionGroupParams{ - Context: ctx, - } -} - -// NewCreateProtectionGroupParamsWithHTTPClient creates a new CreateProtectionGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateProtectionGroupParamsWithHTTPClient(client *http.Client) *CreateProtectionGroupParams { - return &CreateProtectionGroupParams{ - HTTPClient: client, - } -} - -/* -CreateProtectionGroupParams contains all the parameters to send to the API endpoint - - for the create protection group operation. - - Typically these are written to a http.Request. -*/ -type CreateProtectionGroupParams struct { - - /* Body. - - Specifies the parameters to create a Protection Group. - */ - Body *models.CreateOrUpdateProtectionGroupRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionGroupParams) WithDefaults() *CreateProtectionGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create protection group params -func (o *CreateProtectionGroupParams) WithTimeout(timeout time.Duration) *CreateProtectionGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create protection group params -func (o *CreateProtectionGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create protection group params -func (o *CreateProtectionGroupParams) WithContext(ctx context.Context) *CreateProtectionGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create protection group params -func (o *CreateProtectionGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create protection group params -func (o *CreateProtectionGroupParams) WithHTTPClient(client *http.Client) *CreateProtectionGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create protection group params -func (o *CreateProtectionGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create protection group params -func (o *CreateProtectionGroupParams) WithBody(body *models.CreateOrUpdateProtectionGroupRequest) *CreateProtectionGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create protection group params -func (o *CreateProtectionGroupParams) SetBody(body *models.CreateOrUpdateProtectionGroupRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateProtectionGroupParams) 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/protection_group/create_protection_group_responses.go b/v2/client/protection_group/create_protection_group_responses.go deleted file mode 100644 index 90257f84..00000000 --- a/v2/client/protection_group/create_protection_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateProtectionGroupReader is a Reader for the CreateProtectionGroup structure. -type CreateProtectionGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateProtectionGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateProtectionGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateProtectionGroupDefault(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 - } -} - -// NewCreateProtectionGroupCreated creates a CreateProtectionGroupCreated with default headers values -func NewCreateProtectionGroupCreated() *CreateProtectionGroupCreated { - return &CreateProtectionGroupCreated{} -} - -/* -CreateProtectionGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateProtectionGroupCreated struct { - Payload *models.ProtectionGroup -} - -// IsSuccess returns true when this create protection group created response has a 2xx status code -func (o *CreateProtectionGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create protection group created response has a 3xx status code -func (o *CreateProtectionGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create protection group created response has a 4xx status code -func (o *CreateProtectionGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create protection group created response has a 5xx status code -func (o *CreateProtectionGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create protection group created response a status code equal to that given -func (o *CreateProtectionGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create protection group created response -func (o *CreateProtectionGroupCreated) Code() int { - return 201 -} - -func (o *CreateProtectionGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups][%d] createProtectionGroupCreated %s", 201, payload) -} - -func (o *CreateProtectionGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups][%d] createProtectionGroupCreated %s", 201, payload) -} - -func (o *CreateProtectionGroupCreated) GetPayload() *models.ProtectionGroup { - return o.Payload -} - -func (o *CreateProtectionGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateProtectionGroupDefault creates a CreateProtectionGroupDefault with default headers values -func NewCreateProtectionGroupDefault(code int) *CreateProtectionGroupDefault { - return &CreateProtectionGroupDefault{ - _statusCode: code, - } -} - -/* -CreateProtectionGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateProtectionGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create protection group default response has a 2xx status code -func (o *CreateProtectionGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create protection group default response has a 3xx status code -func (o *CreateProtectionGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create protection group default response has a 4xx status code -func (o *CreateProtectionGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create protection group default response has a 5xx status code -func (o *CreateProtectionGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create protection group default response a status code equal to that given -func (o *CreateProtectionGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create protection group default response -func (o *CreateProtectionGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateProtectionGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups][%d] CreateProtectionGroup default %s", o._statusCode, payload) -} - -func (o *CreateProtectionGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups][%d] CreateProtectionGroup default %s", o._statusCode, payload) -} - -func (o *CreateProtectionGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateProtectionGroupDefault) 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/create_protection_group_run_parameters.go b/v2/client/protection_group/create_protection_group_run_parameters.go deleted file mode 100644 index fc83efa8..00000000 --- a/v2/client/protection_group/create_protection_group_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateProtectionGroupRunParams creates a new CreateProtectionGroupRunParams 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 NewCreateProtectionGroupRunParams() *CreateProtectionGroupRunParams { - return &CreateProtectionGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateProtectionGroupRunParamsWithTimeout creates a new CreateProtectionGroupRunParams object -// with the ability to set a timeout on a request. -func NewCreateProtectionGroupRunParamsWithTimeout(timeout time.Duration) *CreateProtectionGroupRunParams { - return &CreateProtectionGroupRunParams{ - timeout: timeout, - } -} - -// NewCreateProtectionGroupRunParamsWithContext creates a new CreateProtectionGroupRunParams object -// with the ability to set a context for a request. -func NewCreateProtectionGroupRunParamsWithContext(ctx context.Context) *CreateProtectionGroupRunParams { - return &CreateProtectionGroupRunParams{ - Context: ctx, - } -} - -// NewCreateProtectionGroupRunParamsWithHTTPClient creates a new CreateProtectionGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateProtectionGroupRunParamsWithHTTPClient(client *http.Client) *CreateProtectionGroupRunParams { - return &CreateProtectionGroupRunParams{ - HTTPClient: client, - } -} - -/* -CreateProtectionGroupRunParams contains all the parameters to send to the API endpoint - - for the create protection group run operation. - - Typically these are written to a http.Request. -*/ -type CreateProtectionGroupRunParams struct { - - /* Body. - - Specifies the parameters to start a protection run. - */ - Body *models.CreateProtectionGroupRunRequest - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionGroupRunParams) WithDefaults() *CreateProtectionGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateProtectionGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create protection group run params -func (o *CreateProtectionGroupRunParams) WithTimeout(timeout time.Duration) *CreateProtectionGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create protection group run params -func (o *CreateProtectionGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create protection group run params -func (o *CreateProtectionGroupRunParams) WithContext(ctx context.Context) *CreateProtectionGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create protection group run params -func (o *CreateProtectionGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create protection group run params -func (o *CreateProtectionGroupRunParams) WithHTTPClient(client *http.Client) *CreateProtectionGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create protection group run params -func (o *CreateProtectionGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create protection group run params -func (o *CreateProtectionGroupRunParams) WithBody(body *models.CreateProtectionGroupRunRequest) *CreateProtectionGroupRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create protection group run params -func (o *CreateProtectionGroupRunParams) SetBody(body *models.CreateProtectionGroupRunRequest) { - o.Body = body -} - -// WithID adds the id to the create protection group run params -func (o *CreateProtectionGroupRunParams) WithID(id string) *CreateProtectionGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the create protection group run params -func (o *CreateProtectionGroupRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateProtectionGroupRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/create_protection_group_run_responses.go b/v2/client/protection_group/create_protection_group_run_responses.go deleted file mode 100644 index 20298e36..00000000 --- a/v2/client/protection_group/create_protection_group_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateProtectionGroupRunReader is a Reader for the CreateProtectionGroupRun structure. -type CreateProtectionGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateProtectionGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewCreateProtectionGroupRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateProtectionGroupRunDefault(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 - } -} - -// NewCreateProtectionGroupRunAccepted creates a CreateProtectionGroupRunAccepted with default headers values -func NewCreateProtectionGroupRunAccepted() *CreateProtectionGroupRunAccepted { - return &CreateProtectionGroupRunAccepted{} -} - -/* -CreateProtectionGroupRunAccepted describes a response with status code 202, with default header values. - -Accepted -*/ -type CreateProtectionGroupRunAccepted struct { - Payload *models.CreateProtectionGroupRunResponseBody -} - -// IsSuccess returns true when this create protection group run accepted response has a 2xx status code -func (o *CreateProtectionGroupRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create protection group run accepted response has a 3xx status code -func (o *CreateProtectionGroupRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create protection group run accepted response has a 4xx status code -func (o *CreateProtectionGroupRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this create protection group run accepted response has a 5xx status code -func (o *CreateProtectionGroupRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this create protection group run accepted response a status code equal to that given -func (o *CreateProtectionGroupRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the create protection group run accepted response -func (o *CreateProtectionGroupRunAccepted) Code() int { - return 202 -} - -func (o *CreateProtectionGroupRunAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs][%d] createProtectionGroupRunAccepted %s", 202, payload) -} - -func (o *CreateProtectionGroupRunAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs][%d] createProtectionGroupRunAccepted %s", 202, payload) -} - -func (o *CreateProtectionGroupRunAccepted) GetPayload() *models.CreateProtectionGroupRunResponseBody { - return o.Payload -} - -func (o *CreateProtectionGroupRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateProtectionGroupRunResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateProtectionGroupRunDefault creates a CreateProtectionGroupRunDefault with default headers values -func NewCreateProtectionGroupRunDefault(code int) *CreateProtectionGroupRunDefault { - return &CreateProtectionGroupRunDefault{ - _statusCode: code, - } -} - -/* -CreateProtectionGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateProtectionGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create protection group run default response has a 2xx status code -func (o *CreateProtectionGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create protection group run default response has a 3xx status code -func (o *CreateProtectionGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create protection group run default response has a 4xx status code -func (o *CreateProtectionGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create protection group run default response has a 5xx status code -func (o *CreateProtectionGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create protection group run default response a status code equal to that given -func (o *CreateProtectionGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create protection group run default response -func (o *CreateProtectionGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *CreateProtectionGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs][%d] CreateProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *CreateProtectionGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs][%d] CreateProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *CreateProtectionGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateProtectionGroupRunDefault) 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/delete_protection_group_parameters.go b/v2/client/protection_group/delete_protection_group_parameters.go deleted file mode 100644 index 0aadf734..00000000 --- a/v2/client/protection_group/delete_protection_group_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewDeleteProtectionGroupParams creates a new DeleteProtectionGroupParams 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 NewDeleteProtectionGroupParams() *DeleteProtectionGroupParams { - return &DeleteProtectionGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteProtectionGroupParamsWithTimeout creates a new DeleteProtectionGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteProtectionGroupParamsWithTimeout(timeout time.Duration) *DeleteProtectionGroupParams { - return &DeleteProtectionGroupParams{ - timeout: timeout, - } -} - -// NewDeleteProtectionGroupParamsWithContext creates a new DeleteProtectionGroupParams object -// with the ability to set a context for a request. -func NewDeleteProtectionGroupParamsWithContext(ctx context.Context) *DeleteProtectionGroupParams { - return &DeleteProtectionGroupParams{ - Context: ctx, - } -} - -// NewDeleteProtectionGroupParamsWithHTTPClient creates a new DeleteProtectionGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteProtectionGroupParamsWithHTTPClient(client *http.Client) *DeleteProtectionGroupParams { - return &DeleteProtectionGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteProtectionGroupParams contains all the parameters to send to the API endpoint - - for the delete protection group operation. - - Typically these are written to a http.Request. -*/ -type DeleteProtectionGroupParams struct { - - /* DeleteSnapshots. - - Specifies if Snapshots generated by the Protection Group should also be deleted when the Protection Group is deleted. - */ - DeleteSnapshots *bool - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionGroupParams) WithDefaults() *DeleteProtectionGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete protection group params -func (o *DeleteProtectionGroupParams) WithTimeout(timeout time.Duration) *DeleteProtectionGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete protection group params -func (o *DeleteProtectionGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete protection group params -func (o *DeleteProtectionGroupParams) WithContext(ctx context.Context) *DeleteProtectionGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete protection group params -func (o *DeleteProtectionGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete protection group params -func (o *DeleteProtectionGroupParams) WithHTTPClient(client *http.Client) *DeleteProtectionGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete protection group params -func (o *DeleteProtectionGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeleteSnapshots adds the deleteSnapshots to the delete protection group params -func (o *DeleteProtectionGroupParams) WithDeleteSnapshots(deleteSnapshots *bool) *DeleteProtectionGroupParams { - o.SetDeleteSnapshots(deleteSnapshots) - return o -} - -// SetDeleteSnapshots adds the deleteSnapshots to the delete protection group params -func (o *DeleteProtectionGroupParams) SetDeleteSnapshots(deleteSnapshots *bool) { - o.DeleteSnapshots = deleteSnapshots -} - -// WithID adds the id to the delete protection group params -func (o *DeleteProtectionGroupParams) WithID(id string) *DeleteProtectionGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete protection group params -func (o *DeleteProtectionGroupParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteProtectionGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DeleteSnapshots != nil { - - // query param deleteSnapshots - var qrDeleteSnapshots bool - - if o.DeleteSnapshots != nil { - qrDeleteSnapshots = *o.DeleteSnapshots - } - qDeleteSnapshots := swag.FormatBool(qrDeleteSnapshots) - if qDeleteSnapshots != "" { - - if err := r.SetQueryParam("deleteSnapshots", qDeleteSnapshots); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/delete_protection_group_responses.go b/v2/client/protection_group/delete_protection_group_responses.go deleted file mode 100644 index 7b2492fd..00000000 --- a/v2/client/protection_group/delete_protection_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteProtectionGroupReader is a Reader for the DeleteProtectionGroup structure. -type DeleteProtectionGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteProtectionGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteProtectionGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteProtectionGroupDefault(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 - } -} - -// NewDeleteProtectionGroupNoContent creates a DeleteProtectionGroupNoContent with default headers values -func NewDeleteProtectionGroupNoContent() *DeleteProtectionGroupNoContent { - return &DeleteProtectionGroupNoContent{} -} - -/* -DeleteProtectionGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteProtectionGroupNoContent struct { -} - -// IsSuccess returns true when this delete protection group no content response has a 2xx status code -func (o *DeleteProtectionGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete protection group no content response has a 3xx status code -func (o *DeleteProtectionGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete protection group no content response has a 4xx status code -func (o *DeleteProtectionGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete protection group no content response has a 5xx status code -func (o *DeleteProtectionGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete protection group no content response a status code equal to that given -func (o *DeleteProtectionGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete protection group no content response -func (o *DeleteProtectionGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteProtectionGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-protect/protection-groups/{id}][%d] deleteProtectionGroupNoContent", 204) -} - -func (o *DeleteProtectionGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /data-protect/protection-groups/{id}][%d] deleteProtectionGroupNoContent", 204) -} - -func (o *DeleteProtectionGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteProtectionGroupDefault creates a DeleteProtectionGroupDefault with default headers values -func NewDeleteProtectionGroupDefault(code int) *DeleteProtectionGroupDefault { - return &DeleteProtectionGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteProtectionGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteProtectionGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete protection group default response has a 2xx status code -func (o *DeleteProtectionGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete protection group default response has a 3xx status code -func (o *DeleteProtectionGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete protection group default response has a 4xx status code -func (o *DeleteProtectionGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete protection group default response has a 5xx status code -func (o *DeleteProtectionGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete protection group default response a status code equal to that given -func (o *DeleteProtectionGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete protection group default response -func (o *DeleteProtectionGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteProtectionGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/protection-groups/{id}][%d] DeleteProtectionGroup default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/protection-groups/{id}][%d] DeleteProtectionGroup default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteProtectionGroupDefault) 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_by_id_parameters.go b/v2/client/protection_group/get_protection_group_by_id_parameters.go deleted file mode 100644 index fed8df44..00000000 --- a/v2/client/protection_group/get_protection_group_by_id_parameters.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionGroupByIDParams creates a new GetProtectionGroupByIDParams 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 NewGetProtectionGroupByIDParams() *GetProtectionGroupByIDParams { - return &GetProtectionGroupByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionGroupByIDParamsWithTimeout creates a new GetProtectionGroupByIDParams object -// with the ability to set a timeout on a request. -func NewGetProtectionGroupByIDParamsWithTimeout(timeout time.Duration) *GetProtectionGroupByIDParams { - return &GetProtectionGroupByIDParams{ - timeout: timeout, - } -} - -// NewGetProtectionGroupByIDParamsWithContext creates a new GetProtectionGroupByIDParams object -// with the ability to set a context for a request. -func NewGetProtectionGroupByIDParamsWithContext(ctx context.Context) *GetProtectionGroupByIDParams { - return &GetProtectionGroupByIDParams{ - Context: ctx, - } -} - -// NewGetProtectionGroupByIDParamsWithHTTPClient creates a new GetProtectionGroupByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionGroupByIDParamsWithHTTPClient(client *http.Client) *GetProtectionGroupByIDParams { - return &GetProtectionGroupByIDParams{ - HTTPClient: client, - } -} - -/* -GetProtectionGroupByIDParams contains all the parameters to send to the API endpoint - - for the get protection group by Id operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionGroupByIDParams struct { - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* IncludeLastRunInfo. - - If true, the response will include last run info. If it is false or not specified, the last run info won't be returned. - */ - IncludeLastRunInfo *bool - - /* PruneExcludedSourceIds. - - If true, the response will not include the list of excluded source IDs in groups that contain this field. This can be set to true in order to improve performance if excluded source IDs are not needed by the user. - */ - PruneExcludedSourceIds *bool - - /* PruneSourceIds. - - If true, the response will exclude the list of source IDs within the group specified. - */ - PruneSourceIds *bool - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection group by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupByIDParams) WithDefaults() *GetProtectionGroupByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection group by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithTimeout(timeout time.Duration) *GetProtectionGroupByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithContext(ctx context.Context) *GetProtectionGroupByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithHTTPClient(client *http.Client) *GetProtectionGroupByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithID(id string) *GetProtectionGroupByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetID(id string) { - o.ID = id -} - -// WithIncludeLastRunInfo adds the includeLastRunInfo to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithIncludeLastRunInfo(includeLastRunInfo *bool) *GetProtectionGroupByIDParams { - o.SetIncludeLastRunInfo(includeLastRunInfo) - return o -} - -// SetIncludeLastRunInfo adds the includeLastRunInfo to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetIncludeLastRunInfo(includeLastRunInfo *bool) { - o.IncludeLastRunInfo = includeLastRunInfo -} - -// WithPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithPruneExcludedSourceIds(pruneExcludedSourceIds *bool) *GetProtectionGroupByIDParams { - o.SetPruneExcludedSourceIds(pruneExcludedSourceIds) - return o -} - -// SetPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetPruneExcludedSourceIds(pruneExcludedSourceIds *bool) { - o.PruneExcludedSourceIds = pruneExcludedSourceIds -} - -// WithPruneSourceIds adds the pruneSourceIds to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithPruneSourceIds(pruneSourceIds *bool) *GetProtectionGroupByIDParams { - o.SetPruneSourceIds(pruneSourceIds) - return o -} - -// SetPruneSourceIds adds the pruneSourceIds to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetPruneSourceIds(pruneSourceIds *bool) { - o.PruneSourceIds = pruneSourceIds -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionGroupByIDParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection group by Id params -func (o *GetProtectionGroupByIDParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionGroupByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.IncludeLastRunInfo != nil { - - // query param includeLastRunInfo - var qrIncludeLastRunInfo bool - - if o.IncludeLastRunInfo != nil { - qrIncludeLastRunInfo = *o.IncludeLastRunInfo - } - qIncludeLastRunInfo := swag.FormatBool(qrIncludeLastRunInfo) - if qIncludeLastRunInfo != "" { - - if err := r.SetQueryParam("includeLastRunInfo", qIncludeLastRunInfo); err != nil { - return err - } - } - } - - if o.PruneExcludedSourceIds != nil { - - // query param pruneExcludedSourceIds - var qrPruneExcludedSourceIds bool - - if o.PruneExcludedSourceIds != nil { - qrPruneExcludedSourceIds = *o.PruneExcludedSourceIds - } - qPruneExcludedSourceIds := swag.FormatBool(qrPruneExcludedSourceIds) - if qPruneExcludedSourceIds != "" { - - if err := r.SetQueryParam("pruneExcludedSourceIds", qPruneExcludedSourceIds); err != nil { - return err - } - } - } - - if o.PruneSourceIds != nil { - - // query param pruneSourceIds - var qrPruneSourceIds bool - - if o.PruneSourceIds != nil { - qrPruneSourceIds = *o.PruneSourceIds - } - qPruneSourceIds := swag.FormatBool(qrPruneSourceIds) - if qPruneSourceIds != "" { - - if err := r.SetQueryParam("pruneSourceIds", qPruneSourceIds); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/get_protection_group_by_id_responses.go b/v2/client/protection_group/get_protection_group_by_id_responses.go deleted file mode 100644 index 71b24533..00000000 --- a/v2/client/protection_group/get_protection_group_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionGroupByIDReader is a Reader for the GetProtectionGroupByID structure. -type GetProtectionGroupByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionGroupByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionGroupByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionGroupByIDDefault(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 - } -} - -// NewGetProtectionGroupByIDOK creates a GetProtectionGroupByIDOK with default headers values -func NewGetProtectionGroupByIDOK() *GetProtectionGroupByIDOK { - return &GetProtectionGroupByIDOK{} -} - -/* -GetProtectionGroupByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionGroupByIDOK struct { - Payload *models.ProtectionGroup -} - -// IsSuccess returns true when this get protection group by Id o k response has a 2xx status code -func (o *GetProtectionGroupByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection group by Id o k response has a 3xx status code -func (o *GetProtectionGroupByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection group by Id o k response has a 4xx status code -func (o *GetProtectionGroupByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection group by Id o k response has a 5xx status code -func (o *GetProtectionGroupByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection group by Id o k response a status code equal to that given -func (o *GetProtectionGroupByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection group by Id o k response -func (o *GetProtectionGroupByIDOK) Code() int { - return 200 -} - -func (o *GetProtectionGroupByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}][%d] getProtectionGroupByIdOK %s", 200, payload) -} - -func (o *GetProtectionGroupByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}][%d] getProtectionGroupByIdOK %s", 200, payload) -} - -func (o *GetProtectionGroupByIDOK) GetPayload() *models.ProtectionGroup { - return o.Payload -} - -func (o *GetProtectionGroupByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionGroupByIDDefault creates a GetProtectionGroupByIDDefault with default headers values -func NewGetProtectionGroupByIDDefault(code int) *GetProtectionGroupByIDDefault { - return &GetProtectionGroupByIDDefault{ - _statusCode: code, - } -} - -/* -GetProtectionGroupByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionGroupByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection group by Id default response has a 2xx status code -func (o *GetProtectionGroupByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection group by Id default response has a 3xx status code -func (o *GetProtectionGroupByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection group by Id default response has a 4xx status code -func (o *GetProtectionGroupByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection group by Id default response has a 5xx status code -func (o *GetProtectionGroupByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection group by Id default response a status code equal to that given -func (o *GetProtectionGroupByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection group by Id default response -func (o *GetProtectionGroupByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionGroupByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}][%d] GetProtectionGroupById default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}][%d] GetProtectionGroupById default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionGroupByIDDefault) 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_run_parameters.go b/v2/client/protection_group/get_protection_group_run_parameters.go deleted file mode 100644 index 96623ecf..00000000 --- a/v2/client/protection_group/get_protection_group_run_parameters.go +++ /dev/null @@ -1,346 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionGroupRunParams creates a new GetProtectionGroupRunParams 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 NewGetProtectionGroupRunParams() *GetProtectionGroupRunParams { - return &GetProtectionGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionGroupRunParamsWithTimeout creates a new GetProtectionGroupRunParams object -// with the ability to set a timeout on a request. -func NewGetProtectionGroupRunParamsWithTimeout(timeout time.Duration) *GetProtectionGroupRunParams { - return &GetProtectionGroupRunParams{ - timeout: timeout, - } -} - -// NewGetProtectionGroupRunParamsWithContext creates a new GetProtectionGroupRunParams object -// with the ability to set a context for a request. -func NewGetProtectionGroupRunParamsWithContext(ctx context.Context) *GetProtectionGroupRunParams { - return &GetProtectionGroupRunParams{ - Context: ctx, - } -} - -// NewGetProtectionGroupRunParamsWithHTTPClient creates a new GetProtectionGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionGroupRunParamsWithHTTPClient(client *http.Client) *GetProtectionGroupRunParams { - return &GetProtectionGroupRunParams{ - HTTPClient: client, - } -} - -/* -GetProtectionGroupRunParams contains all the parameters to send to the API endpoint - - for the get protection group run operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionGroupRunParams struct { - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* IncludeObjectDetails. - - Specifies if the result includes the object details for a protection run. If set to true, details of the protected object will be returned. If set to false or not specified, details will not be returned. - */ - IncludeObjectDetails *bool - - /* IncludeTenants. - - If true, the response will include Protection Group Runs which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. If it's not specified, it is true by default. - */ - IncludeTenants *bool - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* RunID. - - Specifies a unique run id of the Protection Group run. - */ - RunID string - - /* TenantIds. - - TenantIds contains ids of the tenants for which the run is to be returned. - */ - TenantIds []string - - /* UseCachedData. - - Specifies whether we can serve the GET request from the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupRunParams) WithDefaults() *GetProtectionGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection group run params -func (o *GetProtectionGroupRunParams) WithTimeout(timeout time.Duration) *GetProtectionGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection group run params -func (o *GetProtectionGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection group run params -func (o *GetProtectionGroupRunParams) WithContext(ctx context.Context) *GetProtectionGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection group run params -func (o *GetProtectionGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection group run params -func (o *GetProtectionGroupRunParams) WithHTTPClient(client *http.Client) *GetProtectionGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection group run params -func (o *GetProtectionGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection group run params -func (o *GetProtectionGroupRunParams) WithID(id string) *GetProtectionGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection group run params -func (o *GetProtectionGroupRunParams) SetID(id string) { - o.ID = id -} - -// WithIncludeObjectDetails adds the includeObjectDetails to the get protection group run params -func (o *GetProtectionGroupRunParams) WithIncludeObjectDetails(includeObjectDetails *bool) *GetProtectionGroupRunParams { - o.SetIncludeObjectDetails(includeObjectDetails) - return o -} - -// SetIncludeObjectDetails adds the includeObjectDetails to the get protection group run params -func (o *GetProtectionGroupRunParams) SetIncludeObjectDetails(includeObjectDetails *bool) { - o.IncludeObjectDetails = includeObjectDetails -} - -// WithIncludeTenants adds the includeTenants to the get protection group run params -func (o *GetProtectionGroupRunParams) WithIncludeTenants(includeTenants *bool) *GetProtectionGroupRunParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection group run params -func (o *GetProtectionGroupRunParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection group run params -func (o *GetProtectionGroupRunParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionGroupRunParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection group run params -func (o *GetProtectionGroupRunParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithRunID adds the runID to the get protection group run params -func (o *GetProtectionGroupRunParams) WithRunID(runID string) *GetProtectionGroupRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get protection group run params -func (o *GetProtectionGroupRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WithTenantIds adds the tenantIds to the get protection group run params -func (o *GetProtectionGroupRunParams) WithTenantIds(tenantIds []string) *GetProtectionGroupRunParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection group run params -func (o *GetProtectionGroupRunParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get protection group run params -func (o *GetProtectionGroupRunParams) WithUseCachedData(useCachedData *bool) *GetProtectionGroupRunParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get protection group run params -func (o *GetProtectionGroupRunParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionGroupRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.IncludeObjectDetails != nil { - - // query param includeObjectDetails - var qrIncludeObjectDetails bool - - if o.IncludeObjectDetails != nil { - qrIncludeObjectDetails = *o.IncludeObjectDetails - } - qIncludeObjectDetails := swag.FormatBool(qrIncludeObjectDetails) - if qIncludeObjectDetails != "" { - - if err := r.SetQueryParam("includeObjectDetails", qIncludeObjectDetails); 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.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionGroupRun binds the parameter tenantIds -func (o *GetProtectionGroupRunParams) 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/client/protection_group/get_protection_group_run_responses.go b/v2/client/protection_group/get_protection_group_run_responses.go deleted file mode 100644 index 62909b16..00000000 --- a/v2/client/protection_group/get_protection_group_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionGroupRunReader is a Reader for the GetProtectionGroupRun structure. -type GetProtectionGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionGroupRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionGroupRunDefault(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 - } -} - -// NewGetProtectionGroupRunOK creates a GetProtectionGroupRunOK with default headers values -func NewGetProtectionGroupRunOK() *GetProtectionGroupRunOK { - return &GetProtectionGroupRunOK{} -} - -/* -GetProtectionGroupRunOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionGroupRunOK struct { - Payload *models.ProtectionGroupRun -} - -// IsSuccess returns true when this get protection group run o k response has a 2xx status code -func (o *GetProtectionGroupRunOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection group run o k response has a 3xx status code -func (o *GetProtectionGroupRunOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection group run o k response has a 4xx status code -func (o *GetProtectionGroupRunOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection group run o k response has a 5xx status code -func (o *GetProtectionGroupRunOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection group run o k response a status code equal to that given -func (o *GetProtectionGroupRunOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection group run o k response -func (o *GetProtectionGroupRunOK) Code() int { - return 200 -} - -func (o *GetProtectionGroupRunOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}][%d] getProtectionGroupRunOK %s", 200, payload) -} - -func (o *GetProtectionGroupRunOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}][%d] getProtectionGroupRunOK %s", 200, payload) -} - -func (o *GetProtectionGroupRunOK) GetPayload() *models.ProtectionGroupRun { - return o.Payload -} - -func (o *GetProtectionGroupRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroupRun) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionGroupRunDefault creates a GetProtectionGroupRunDefault with default headers values -func NewGetProtectionGroupRunDefault(code int) *GetProtectionGroupRunDefault { - return &GetProtectionGroupRunDefault{ - _statusCode: code, - } -} - -/* -GetProtectionGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection group run default response has a 2xx status code -func (o *GetProtectionGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection group run default response has a 3xx status code -func (o *GetProtectionGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection group run default response has a 4xx status code -func (o *GetProtectionGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection group run default response has a 5xx status code -func (o *GetProtectionGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection group run default response a status code equal to that given -func (o *GetProtectionGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection group run default response -func (o *GetProtectionGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}][%d] GetProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}][%d] GetProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionGroupRunDefault) 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 deleted file mode 100644 index bf3d6127..00000000 --- a/v2/client/protection_group/get_protection_group_runs_parameters.go +++ /dev/null @@ -1,928 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionGroupRunsParams creates a new GetProtectionGroupRunsParams 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 NewGetProtectionGroupRunsParams() *GetProtectionGroupRunsParams { - return &GetProtectionGroupRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionGroupRunsParamsWithTimeout creates a new GetProtectionGroupRunsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionGroupRunsParamsWithTimeout(timeout time.Duration) *GetProtectionGroupRunsParams { - return &GetProtectionGroupRunsParams{ - timeout: timeout, - } -} - -// NewGetProtectionGroupRunsParamsWithContext creates a new GetProtectionGroupRunsParams object -// with the ability to set a context for a request. -func NewGetProtectionGroupRunsParamsWithContext(ctx context.Context) *GetProtectionGroupRunsParams { - return &GetProtectionGroupRunsParams{ - Context: ctx, - } -} - -// NewGetProtectionGroupRunsParamsWithHTTPClient creates a new GetProtectionGroupRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionGroupRunsParamsWithHTTPClient(client *http.Client) *GetProtectionGroupRunsParams { - return &GetProtectionGroupRunsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionGroupRunsParams contains all the parameters to send to the API endpoint - - for the get protection group runs operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionGroupRunsParams struct { - - /* ArchivalRunStatus. - - Specifies a list of archival 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. - */ - ArchivalRunStatus []string - - /* CloudSpinRunStatus. - - Specifies a list of cloud spin 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. - */ - CloudSpinRunStatus []string - - /* EndTimeUsecs. - - End time for time range filter. Specify the end time as a Unix epoch Timestamp (in microseconds), only runs executing before this time will be returned. By default it is current time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ExcludeNonRestorableRuns. - - Specifies whether to exclude non restorable runs. Run is treated restorable only if there is atleast one object snapshot (which may be either a local or an archival snapshot) which is not deleted or expired. Default value is false. - */ - ExcludeNonRestorableRuns *bool - - /* FilterByCopyTaskEndTime. - - If true, then the details of the runs for which any copyTask completed in the given timerange will be returned. Only one of filterByEndTime and filterByCopyTaskEndTime can be set. - */ - FilterByCopyTaskEndTime *bool - - /* FilterByEndTime. - - If true, the runs with backup end time within the specified time range will be returned. Otherwise, the runs with start time in the time range are returned. - */ - FilterByEndTime *bool - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* IncludeObjectDetails. - - Specifies if the result includes the object details for each protection run. If set to true, details of the protected object will be returned. If set to false or not specified, details will not be returned. - */ - IncludeObjectDetails *bool - - /* IncludeTenants. - - If true, the response will include Protection Group Runs which were created by all tenants which the current user has permission to see. If false, then only Protection Group Runs created by the current user will be returned. - */ - IncludeTenants *bool - - /* LocalBackupRunStatus. - - Specifies a list of local backup 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. - */ - LocalBackupRunStatus []string - - /* NumRuns. - - Specifies the max number of runs. If not specified, at most 100 runs will be returned. - - Format: int64 - */ - NumRuns *int64 - - /* OnlyReturnSuccessfulCopyRun. - - If set to false, all copy_tasks in any given valid state will be considered. If left empty or set to true, only successful copy_tasks would be considered. Note: this field is only considered when, filterByCopyTaskEndTime is set to true, or else it is ignored. - */ - OnlyReturnSuccessfulCopyRun *bool - - /* 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. - */ - ReplicationRunStatus []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* RunID. - - Specifies the protection run id. - */ - RunID *string - - /* RunTags. - - Specifies a list of tags for protection runs. If this is specified, only the runs which match these tags will be returned. - */ - RunTags []string - - /* RunTypes. - - Filter by run type. Only protection run matching the specified types will be returned. - */ - RunTypes []string - - /* SnapshotTargetTypes. - - Specifies the snapshot's target type which should be filtered. Note: this field is only considered when, filterByCopyTaskEndTime is set to true, or else it is ignored. - */ - SnapshotTargetTypes []string - - /* StartTimeUsecs. - - Start time for time range filter. Specify the start time as a Unix epoch Timestamp (in microseconds), only runs executing after this time will be returned. By default it is endTimeUsecs minus an hour. - - Format: int64 - */ - StartTimeUsecs *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 from the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection group runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupRunsParams) WithDefaults() *GetProtectionGroupRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection group runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupRunsParams) SetDefaults() { - var ( - excludeNonRestorableRunsDefault = bool(false) - ) - - val := GetProtectionGroupRunsParams{ - ExcludeNonRestorableRuns: &excludeNonRestorableRunsDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithTimeout(timeout time.Duration) *GetProtectionGroupRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithContext(ctx context.Context) *GetProtectionGroupRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithHTTPClient(client *http.Client) *GetProtectionGroupRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArchivalRunStatus adds the archivalRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithArchivalRunStatus(archivalRunStatus []string) *GetProtectionGroupRunsParams { - o.SetArchivalRunStatus(archivalRunStatus) - return o -} - -// SetArchivalRunStatus adds the archivalRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetArchivalRunStatus(archivalRunStatus []string) { - o.ArchivalRunStatus = archivalRunStatus -} - -// WithCloudSpinRunStatus adds the cloudSpinRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithCloudSpinRunStatus(cloudSpinRunStatus []string) *GetProtectionGroupRunsParams { - o.SetCloudSpinRunStatus(cloudSpinRunStatus) - return o -} - -// SetCloudSpinRunStatus adds the cloudSpinRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetCloudSpinRunStatus(cloudSpinRunStatus []string) { - o.CloudSpinRunStatus = cloudSpinRunStatus -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionGroupRunsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithExcludeNonRestorableRuns adds the excludeNonRestorableRuns to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithExcludeNonRestorableRuns(excludeNonRestorableRuns *bool) *GetProtectionGroupRunsParams { - o.SetExcludeNonRestorableRuns(excludeNonRestorableRuns) - return o -} - -// SetExcludeNonRestorableRuns adds the excludeNonRestorableRuns to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetExcludeNonRestorableRuns(excludeNonRestorableRuns *bool) { - o.ExcludeNonRestorableRuns = excludeNonRestorableRuns -} - -// WithFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) *GetProtectionGroupRunsParams { - o.SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime) - return o -} - -// SetFilterByCopyTaskEndTime adds the filterByCopyTaskEndTime to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetFilterByCopyTaskEndTime(filterByCopyTaskEndTime *bool) { - o.FilterByCopyTaskEndTime = filterByCopyTaskEndTime -} - -// WithFilterByEndTime adds the filterByEndTime to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithFilterByEndTime(filterByEndTime *bool) *GetProtectionGroupRunsParams { - o.SetFilterByEndTime(filterByEndTime) - return o -} - -// SetFilterByEndTime adds the filterByEndTime to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetFilterByEndTime(filterByEndTime *bool) { - o.FilterByEndTime = filterByEndTime -} - -// WithID adds the id to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithID(id string) *GetProtectionGroupRunsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetID(id string) { - o.ID = id -} - -// WithIncludeObjectDetails adds the includeObjectDetails to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithIncludeObjectDetails(includeObjectDetails *bool) *GetProtectionGroupRunsParams { - o.SetIncludeObjectDetails(includeObjectDetails) - return o -} - -// SetIncludeObjectDetails adds the includeObjectDetails to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetIncludeObjectDetails(includeObjectDetails *bool) { - o.IncludeObjectDetails = includeObjectDetails -} - -// WithIncludeTenants adds the includeTenants to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithIncludeTenants(includeTenants *bool) *GetProtectionGroupRunsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithLocalBackupRunStatus adds the localBackupRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithLocalBackupRunStatus(localBackupRunStatus []string) *GetProtectionGroupRunsParams { - o.SetLocalBackupRunStatus(localBackupRunStatus) - return o -} - -// SetLocalBackupRunStatus adds the localBackupRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetLocalBackupRunStatus(localBackupRunStatus []string) { - o.LocalBackupRunStatus = localBackupRunStatus -} - -// WithNumRuns adds the numRuns to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithNumRuns(numRuns *int64) *GetProtectionGroupRunsParams { - o.SetNumRuns(numRuns) - return o -} - -// SetNumRuns adds the numRuns to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetNumRuns(numRuns *int64) { - o.NumRuns = numRuns -} - -// WithOnlyReturnSuccessfulCopyRun adds the onlyReturnSuccessfulCopyRun to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithOnlyReturnSuccessfulCopyRun(onlyReturnSuccessfulCopyRun *bool) *GetProtectionGroupRunsParams { - o.SetOnlyReturnSuccessfulCopyRun(onlyReturnSuccessfulCopyRun) - return o -} - -// SetOnlyReturnSuccessfulCopyRun adds the onlyReturnSuccessfulCopyRun to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetOnlyReturnSuccessfulCopyRun(onlyReturnSuccessfulCopyRun *bool) { - o.OnlyReturnSuccessfulCopyRun = onlyReturnSuccessfulCopyRun -} - -// WithReplicationRunStatus adds the replicationRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithReplicationRunStatus(replicationRunStatus []string) *GetProtectionGroupRunsParams { - o.SetReplicationRunStatus(replicationRunStatus) - return o -} - -// SetReplicationRunStatus adds the replicationRunStatus to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetReplicationRunStatus(replicationRunStatus []string) { - o.ReplicationRunStatus = replicationRunStatus -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionGroupRunsParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithRunID adds the runID to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithRunID(runID *string) *GetProtectionGroupRunsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetRunID(runID *string) { - o.RunID = runID -} - -// WithRunTags adds the runTags to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithRunTags(runTags []string) *GetProtectionGroupRunsParams { - o.SetRunTags(runTags) - return o -} - -// SetRunTags adds the runTags to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetRunTags(runTags []string) { - o.RunTags = runTags -} - -// WithRunTypes adds the runTypes to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithRunTypes(runTypes []string) *GetProtectionGroupRunsParams { - o.SetRunTypes(runTypes) - return o -} - -// SetRunTypes adds the runTypes to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetRunTypes(runTypes []string) { - o.RunTypes = runTypes -} - -// WithSnapshotTargetTypes adds the snapshotTargetTypes to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithSnapshotTargetTypes(snapshotTargetTypes []string) *GetProtectionGroupRunsParams { - o.SetSnapshotTargetTypes(snapshotTargetTypes) - return o -} - -// SetSnapshotTargetTypes adds the snapshotTargetTypes to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetSnapshotTargetTypes(snapshotTargetTypes []string) { - o.SnapshotTargetTypes = snapshotTargetTypes -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionGroupRunsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithTenantIds(tenantIds []string) *GetProtectionGroupRunsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get protection group runs params -func (o *GetProtectionGroupRunsParams) WithUseCachedData(useCachedData *bool) *GetProtectionGroupRunsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get protection group runs params -func (o *GetProtectionGroupRunsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionGroupRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ArchivalRunStatus != nil { - - // binding items for archivalRunStatus - joinedArchivalRunStatus := o.bindParamArchivalRunStatus(reg) - - // query array param archivalRunStatus - if err := r.SetQueryParam("archivalRunStatus", joinedArchivalRunStatus...); err != nil { - return err - } - } - - if o.CloudSpinRunStatus != nil { - - // binding items for cloudSpinRunStatus - joinedCloudSpinRunStatus := o.bindParamCloudSpinRunStatus(reg) - - // query array param cloudSpinRunStatus - if err := r.SetQueryParam("cloudSpinRunStatus", joinedCloudSpinRunStatus...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeNonRestorableRuns != nil { - - // query param excludeNonRestorableRuns - var qrExcludeNonRestorableRuns bool - - if o.ExcludeNonRestorableRuns != nil { - qrExcludeNonRestorableRuns = *o.ExcludeNonRestorableRuns - } - qExcludeNonRestorableRuns := swag.FormatBool(qrExcludeNonRestorableRuns) - if qExcludeNonRestorableRuns != "" { - - if err := r.SetQueryParam("excludeNonRestorableRuns", qExcludeNonRestorableRuns); err != nil { - return err - } - } - } - - if o.FilterByCopyTaskEndTime != nil { - - // query param filterByCopyTaskEndTime - var qrFilterByCopyTaskEndTime bool - - if o.FilterByCopyTaskEndTime != nil { - qrFilterByCopyTaskEndTime = *o.FilterByCopyTaskEndTime - } - qFilterByCopyTaskEndTime := swag.FormatBool(qrFilterByCopyTaskEndTime) - if qFilterByCopyTaskEndTime != "" { - - if err := r.SetQueryParam("filterByCopyTaskEndTime", qFilterByCopyTaskEndTime); err != nil { - return err - } - } - } - - if o.FilterByEndTime != nil { - - // query param filterByEndTime - var qrFilterByEndTime bool - - if o.FilterByEndTime != nil { - qrFilterByEndTime = *o.FilterByEndTime - } - qFilterByEndTime := swag.FormatBool(qrFilterByEndTime) - if qFilterByEndTime != "" { - - if err := r.SetQueryParam("filterByEndTime", qFilterByEndTime); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.IncludeObjectDetails != nil { - - // query param includeObjectDetails - var qrIncludeObjectDetails bool - - if o.IncludeObjectDetails != nil { - qrIncludeObjectDetails = *o.IncludeObjectDetails - } - qIncludeObjectDetails := swag.FormatBool(qrIncludeObjectDetails) - if qIncludeObjectDetails != "" { - - if err := r.SetQueryParam("includeObjectDetails", qIncludeObjectDetails); 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.LocalBackupRunStatus != nil { - - // binding items for localBackupRunStatus - joinedLocalBackupRunStatus := o.bindParamLocalBackupRunStatus(reg) - - // query array param localBackupRunStatus - if err := r.SetQueryParam("localBackupRunStatus", joinedLocalBackupRunStatus...); err != nil { - return err - } - } - - if o.NumRuns != nil { - - // query param numRuns - var qrNumRuns int64 - - if o.NumRuns != nil { - qrNumRuns = *o.NumRuns - } - qNumRuns := swag.FormatInt64(qrNumRuns) - if qNumRuns != "" { - - if err := r.SetQueryParam("numRuns", qNumRuns); err != nil { - return err - } - } - } - - if o.OnlyReturnSuccessfulCopyRun != nil { - - // query param onlyReturnSuccessfulCopyRun - var qrOnlyReturnSuccessfulCopyRun bool - - if o.OnlyReturnSuccessfulCopyRun != nil { - qrOnlyReturnSuccessfulCopyRun = *o.OnlyReturnSuccessfulCopyRun - } - qOnlyReturnSuccessfulCopyRun := swag.FormatBool(qrOnlyReturnSuccessfulCopyRun) - if qOnlyReturnSuccessfulCopyRun != "" { - - if err := r.SetQueryParam("onlyReturnSuccessfulCopyRun", qOnlyReturnSuccessfulCopyRun); err != nil { - return err - } - } - } - - if o.ReplicationRunStatus != nil { - - // binding items for replicationRunStatus - joinedReplicationRunStatus := o.bindParamReplicationRunStatus(reg) - - // query array param replicationRunStatus - if err := r.SetQueryParam("replicationRunStatus", joinedReplicationRunStatus...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.RunID != nil { - - // query param runId - var qrRunID string - - if o.RunID != nil { - qrRunID = *o.RunID - } - qRunID := qrRunID - if qRunID != "" { - - if err := r.SetQueryParam("runId", qRunID); err != nil { - return err - } - } - } - - if o.RunTags != nil { - - // binding items for runTags - joinedRunTags := o.bindParamRunTags(reg) - - // query array param runTags - if err := r.SetQueryParam("runTags", joinedRunTags...); err != nil { - return err - } - } - - if o.RunTypes != nil { - - // binding items for runTypes - joinedRunTypes := o.bindParamRunTypes(reg) - - // query array param runTypes - if err := r.SetQueryParam("runTypes", joinedRunTypes...); err != nil { - return err - } - } - - if o.SnapshotTargetTypes != nil { - - // binding items for snapshotTargetTypes - joinedSnapshotTargetTypes := o.bindParamSnapshotTargetTypes(reg) - - // query array param snapshotTargetTypes - if err := r.SetQueryParam("snapshotTargetTypes", joinedSnapshotTargetTypes...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionGroupRuns binds the parameter archivalRunStatus -func (o *GetProtectionGroupRunsParams) bindParamArchivalRunStatus(formats strfmt.Registry) []string { - archivalRunStatusIR := o.ArchivalRunStatus - - var archivalRunStatusIC []string - for _, archivalRunStatusIIR := range archivalRunStatusIR { // explode []string - - archivalRunStatusIIV := archivalRunStatusIIR // string as string - archivalRunStatusIC = append(archivalRunStatusIC, archivalRunStatusIIV) - } - - // items.CollectionFormat: "" - archivalRunStatusIS := swag.JoinByFormat(archivalRunStatusIC, "") - - return archivalRunStatusIS -} - -// bindParamGetProtectionGroupRuns binds the parameter cloudSpinRunStatus -func (o *GetProtectionGroupRunsParams) bindParamCloudSpinRunStatus(formats strfmt.Registry) []string { - cloudSpinRunStatusIR := o.CloudSpinRunStatus - - var cloudSpinRunStatusIC []string - for _, cloudSpinRunStatusIIR := range cloudSpinRunStatusIR { // explode []string - - cloudSpinRunStatusIIV := cloudSpinRunStatusIIR // string as string - cloudSpinRunStatusIC = append(cloudSpinRunStatusIC, cloudSpinRunStatusIIV) - } - - // items.CollectionFormat: "" - cloudSpinRunStatusIS := swag.JoinByFormat(cloudSpinRunStatusIC, "") - - return cloudSpinRunStatusIS -} - -// bindParamGetProtectionGroupRuns binds the parameter localBackupRunStatus -func (o *GetProtectionGroupRunsParams) bindParamLocalBackupRunStatus(formats strfmt.Registry) []string { - localBackupRunStatusIR := o.LocalBackupRunStatus - - var localBackupRunStatusIC []string - for _, localBackupRunStatusIIR := range localBackupRunStatusIR { // explode []string - - localBackupRunStatusIIV := localBackupRunStatusIIR // string as string - localBackupRunStatusIC = append(localBackupRunStatusIC, localBackupRunStatusIIV) - } - - // items.CollectionFormat: "" - localBackupRunStatusIS := swag.JoinByFormat(localBackupRunStatusIC, "") - - return localBackupRunStatusIS -} - -// bindParamGetProtectionGroupRuns binds the parameter replicationRunStatus -func (o *GetProtectionGroupRunsParams) bindParamReplicationRunStatus(formats strfmt.Registry) []string { - replicationRunStatusIR := o.ReplicationRunStatus - - var replicationRunStatusIC []string - for _, replicationRunStatusIIR := range replicationRunStatusIR { // explode []string - - replicationRunStatusIIV := replicationRunStatusIIR // string as string - replicationRunStatusIC = append(replicationRunStatusIC, replicationRunStatusIIV) - } - - // items.CollectionFormat: "" - replicationRunStatusIS := swag.JoinByFormat(replicationRunStatusIC, "") - - return replicationRunStatusIS -} - -// bindParamGetProtectionGroupRuns binds the parameter runTags -func (o *GetProtectionGroupRunsParams) bindParamRunTags(formats strfmt.Registry) []string { - runTagsIR := o.RunTags - - var runTagsIC []string - for _, runTagsIIR := range runTagsIR { // explode []string - - runTagsIIV := runTagsIIR // string as string - runTagsIC = append(runTagsIC, runTagsIIV) - } - - // items.CollectionFormat: "" - runTagsIS := swag.JoinByFormat(runTagsIC, "") - - return runTagsIS -} - -// bindParamGetProtectionGroupRuns binds the parameter runTypes -func (o *GetProtectionGroupRunsParams) bindParamRunTypes(formats strfmt.Registry) []string { - runTypesIR := o.RunTypes - - var runTypesIC []string - for _, runTypesIIR := range runTypesIR { // explode []string - - runTypesIIV := runTypesIIR // string as string - runTypesIC = append(runTypesIC, runTypesIIV) - } - - // items.CollectionFormat: "" - runTypesIS := swag.JoinByFormat(runTypesIC, "") - - return runTypesIS -} - -// bindParamGetProtectionGroupRuns binds the parameter snapshotTargetTypes -func (o *GetProtectionGroupRunsParams) bindParamSnapshotTargetTypes(formats strfmt.Registry) []string { - snapshotTargetTypesIR := o.SnapshotTargetTypes - - var snapshotTargetTypesIC []string - for _, snapshotTargetTypesIIR := range snapshotTargetTypesIR { // explode []string - - snapshotTargetTypesIIV := snapshotTargetTypesIIR // string as string - snapshotTargetTypesIC = append(snapshotTargetTypesIC, snapshotTargetTypesIIV) - } - - // items.CollectionFormat: "" - snapshotTargetTypesIS := swag.JoinByFormat(snapshotTargetTypesIC, "") - - return snapshotTargetTypesIS -} - -// bindParamGetProtectionGroupRuns binds the parameter tenantIds -func (o *GetProtectionGroupRunsParams) 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/client/protection_group/get_protection_group_runs_responses.go b/v2/client/protection_group/get_protection_group_runs_responses.go deleted file mode 100644 index f8046228..00000000 --- a/v2/client/protection_group/get_protection_group_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionGroupRunsReader is a Reader for the GetProtectionGroupRuns structure. -type GetProtectionGroupRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionGroupRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionGroupRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionGroupRunsDefault(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 - } -} - -// NewGetProtectionGroupRunsOK creates a GetProtectionGroupRunsOK with default headers values -func NewGetProtectionGroupRunsOK() *GetProtectionGroupRunsOK { - return &GetProtectionGroupRunsOK{} -} - -/* -GetProtectionGroupRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionGroupRunsOK struct { - Payload *models.ProtectionGroupRuns -} - -// IsSuccess returns true when this get protection group runs o k response has a 2xx status code -func (o *GetProtectionGroupRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection group runs o k response has a 3xx status code -func (o *GetProtectionGroupRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection group runs o k response has a 4xx status code -func (o *GetProtectionGroupRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection group runs o k response has a 5xx status code -func (o *GetProtectionGroupRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection group runs o k response a status code equal to that given -func (o *GetProtectionGroupRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection group runs o k response -func (o *GetProtectionGroupRunsOK) Code() int { - return 200 -} - -func (o *GetProtectionGroupRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs][%d] getProtectionGroupRunsOK %s", 200, payload) -} - -func (o *GetProtectionGroupRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs][%d] getProtectionGroupRunsOK %s", 200, payload) -} - -func (o *GetProtectionGroupRunsOK) GetPayload() *models.ProtectionGroupRuns { - return o.Payload -} - -func (o *GetProtectionGroupRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroupRuns) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionGroupRunsDefault creates a GetProtectionGroupRunsDefault with default headers values -func NewGetProtectionGroupRunsDefault(code int) *GetProtectionGroupRunsDefault { - return &GetProtectionGroupRunsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionGroupRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionGroupRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection group runs default response has a 2xx status code -func (o *GetProtectionGroupRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection group runs default response has a 3xx status code -func (o *GetProtectionGroupRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection group runs default response has a 4xx status code -func (o *GetProtectionGroupRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection group runs default response has a 5xx status code -func (o *GetProtectionGroupRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection group runs default response a status code equal to that given -func (o *GetProtectionGroupRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection group runs default response -func (o *GetProtectionGroupRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionGroupRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs][%d] GetProtectionGroupRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs][%d] GetProtectionGroupRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionGroupRunsDefault) 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_groups_parameters.go b/v2/client/protection_group/get_protection_groups_parameters.go deleted file mode 100644 index 1b0e4509..00000000 --- a/v2/client/protection_group/get_protection_groups_parameters.go +++ /dev/null @@ -1,1068 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionGroupsParams creates a new GetProtectionGroupsParams 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 NewGetProtectionGroupsParams() *GetProtectionGroupsParams { - return &GetProtectionGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionGroupsParamsWithTimeout creates a new GetProtectionGroupsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionGroupsParamsWithTimeout(timeout time.Duration) *GetProtectionGroupsParams { - return &GetProtectionGroupsParams{ - timeout: timeout, - } -} - -// NewGetProtectionGroupsParamsWithContext creates a new GetProtectionGroupsParams object -// with the ability to set a context for a request. -func NewGetProtectionGroupsParamsWithContext(ctx context.Context) *GetProtectionGroupsParams { - return &GetProtectionGroupsParams{ - Context: ctx, - } -} - -// NewGetProtectionGroupsParamsWithHTTPClient creates a new GetProtectionGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionGroupsParamsWithHTTPClient(client *http.Client) *GetProtectionGroupsParams { - return &GetProtectionGroupsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionGroupsParams contains all the parameters to send to the API endpoint - - for the get protection groups operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionGroupsParams struct { - - /* Environments. - - Filter by environment types such as 'kVMware', 'kView', etc. Only Protection Groups protecting the specified environment types are returned. - */ - Environments []string - - /* Ids. - - Filter by a list of Protection Group ids. - */ - Ids []string - - /* IncludeGroupsWithDatalockOnly. - - Whether to only return Protection Groups with a datalock. - */ - IncludeGroupsWithDatalockOnly *bool - - /* IncludeLastRunInfo. - - If true, the response will include last run info. If it is false or not specified, the last run info won't be returned. - */ - IncludeLastRunInfo *bool - - /* IncludeTenants. - - If true, the response will include Protection Groups which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. - */ - IncludeTenants *bool - - /* IsActive. - - Filter by Inactive or Active Protection Groups. If not set, all Inactive and Active Protection Groups are returned. If true, only Active Protection Groups are returned. If false, only Inactive Protection Groups are returned. When you create a Protection Group on a Primary Cluster with a replication schedule, the Cluster creates an Inactive copy of the Protection Group on the Remote Cluster. In addition, when an Active and running Protection Group is deactivated, the Protection Group becomes Inactive. - */ - IsActive *bool - - /* IsDeleted. - - If true, return only Protection Groups that have been deleted but still have Snapshots associated with them. If false, return all Protection Groups except those Protection Groups that have been deleted and still have Snapshots associated with them. A Protection Group that is deleted with all its Snapshots is not returned for either of these cases. - */ - IsDeleted *bool - - /* IsLastRunSLAViolated. - - If true, return Protection Groups for which last run SLA was violated. - */ - IsLastRunSLAViolated *bool - - /* IsPaused. - - Filter by paused or non paused Protection Groups, If not set, all paused and non paused Protection Groups are returned. If true, only paused Protection Groups are returned. If false, only non paused Protection Groups are returned. - */ - IsPaused *bool - - /* LastRunAnyStatus. - - Filter by last any run status.
'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. - */ - LastRunAnyStatus []string - - /* LastRunArchivalStatus. - - Filter by last cloud archival run status.
'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. - */ - LastRunArchivalStatus []string - - /* LastRunCloudSpinStatus. - - Filter by last cloud spin run status.
'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. - */ - LastRunCloudSpinStatus []string - - /* LastRunLocalBackupStatus. - - Filter by last local backup run status.
'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. - */ - LastRunLocalBackupStatus []string - - /* LastRunReplicationStatus. - - Filter by last remote replication run status.
'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. - */ - LastRunReplicationStatus []string - - /* Names. - - Filter by a list of Protection Group names. - */ - Names []string - - // Office365Workloads. - Office365Workloads []string - - /* PolicyIds. - - Filter by Policy ids that are associated with Protection Groups. Only Protection Groups associated with the specified Policy ids, are returned. - */ - PolicyIds []string - - /* PruneExcludedSourceIds. - - If true, the response will not include the list of excluded source IDs in groups that contain this field. This can be set to true in order to improve performance if excluded source IDs are not needed by the user. - */ - PruneExcludedSourceIds *bool - - /* PruneSourceIds. - - If true, the response will exclude the list of source IDs within the group specified. - */ - PruneSourceIds *bool - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* SourceIds. - - Filter by Source ids that are associated with Protection Groups. Only Protection Groups associated with the specified Source ids, are returned. - */ - SourceIds []int64 - - /* StorageDomainID. - - Filter by Storage Domain id. Only Protection Groups writing data to this Storage Domain will be returned. - - Format: int64 - */ - StorageDomainID *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 from the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupsParams) WithDefaults() *GetProtectionGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection groups params -func (o *GetProtectionGroupsParams) WithTimeout(timeout time.Duration) *GetProtectionGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection groups params -func (o *GetProtectionGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection groups params -func (o *GetProtectionGroupsParams) WithContext(ctx context.Context) *GetProtectionGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection groups params -func (o *GetProtectionGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection groups params -func (o *GetProtectionGroupsParams) WithHTTPClient(client *http.Client) *GetProtectionGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection groups params -func (o *GetProtectionGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnvironments adds the environments to the get protection groups params -func (o *GetProtectionGroupsParams) WithEnvironments(environments []string) *GetProtectionGroupsParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the get protection groups params -func (o *GetProtectionGroupsParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIds adds the ids to the get protection groups params -func (o *GetProtectionGroupsParams) WithIds(ids []string) *GetProtectionGroupsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get protection groups params -func (o *GetProtectionGroupsParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeGroupsWithDatalockOnly adds the includeGroupsWithDatalockOnly to the get protection groups params -func (o *GetProtectionGroupsParams) WithIncludeGroupsWithDatalockOnly(includeGroupsWithDatalockOnly *bool) *GetProtectionGroupsParams { - o.SetIncludeGroupsWithDatalockOnly(includeGroupsWithDatalockOnly) - return o -} - -// SetIncludeGroupsWithDatalockOnly adds the includeGroupsWithDatalockOnly to the get protection groups params -func (o *GetProtectionGroupsParams) SetIncludeGroupsWithDatalockOnly(includeGroupsWithDatalockOnly *bool) { - o.IncludeGroupsWithDatalockOnly = includeGroupsWithDatalockOnly -} - -// WithIncludeLastRunInfo adds the includeLastRunInfo to the get protection groups params -func (o *GetProtectionGroupsParams) WithIncludeLastRunInfo(includeLastRunInfo *bool) *GetProtectionGroupsParams { - o.SetIncludeLastRunInfo(includeLastRunInfo) - return o -} - -// SetIncludeLastRunInfo adds the includeLastRunInfo to the get protection groups params -func (o *GetProtectionGroupsParams) SetIncludeLastRunInfo(includeLastRunInfo *bool) { - o.IncludeLastRunInfo = includeLastRunInfo -} - -// WithIncludeTenants adds the includeTenants to the get protection groups params -func (o *GetProtectionGroupsParams) WithIncludeTenants(includeTenants *bool) *GetProtectionGroupsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection groups params -func (o *GetProtectionGroupsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIsActive adds the isActive to the get protection groups params -func (o *GetProtectionGroupsParams) WithIsActive(isActive *bool) *GetProtectionGroupsParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get protection groups params -func (o *GetProtectionGroupsParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsDeleted adds the isDeleted to the get protection groups params -func (o *GetProtectionGroupsParams) WithIsDeleted(isDeleted *bool) *GetProtectionGroupsParams { - o.SetIsDeleted(isDeleted) - return o -} - -// SetIsDeleted adds the isDeleted to the get protection groups params -func (o *GetProtectionGroupsParams) SetIsDeleted(isDeleted *bool) { - o.IsDeleted = isDeleted -} - -// WithIsLastRunSLAViolated adds the isLastRunSLAViolated to the get protection groups params -func (o *GetProtectionGroupsParams) WithIsLastRunSLAViolated(isLastRunSLAViolated *bool) *GetProtectionGroupsParams { - o.SetIsLastRunSLAViolated(isLastRunSLAViolated) - return o -} - -// SetIsLastRunSLAViolated adds the isLastRunSlaViolated to the get protection groups params -func (o *GetProtectionGroupsParams) SetIsLastRunSLAViolated(isLastRunSLAViolated *bool) { - o.IsLastRunSLAViolated = isLastRunSLAViolated -} - -// WithIsPaused adds the isPaused to the get protection groups params -func (o *GetProtectionGroupsParams) WithIsPaused(isPaused *bool) *GetProtectionGroupsParams { - o.SetIsPaused(isPaused) - return o -} - -// SetIsPaused adds the isPaused to the get protection groups params -func (o *GetProtectionGroupsParams) SetIsPaused(isPaused *bool) { - o.IsPaused = isPaused -} - -// WithLastRunAnyStatus adds the lastRunAnyStatus to the get protection groups params -func (o *GetProtectionGroupsParams) WithLastRunAnyStatus(lastRunAnyStatus []string) *GetProtectionGroupsParams { - o.SetLastRunAnyStatus(lastRunAnyStatus) - return o -} - -// SetLastRunAnyStatus adds the lastRunAnyStatus to the get protection groups params -func (o *GetProtectionGroupsParams) SetLastRunAnyStatus(lastRunAnyStatus []string) { - o.LastRunAnyStatus = lastRunAnyStatus -} - -// WithLastRunArchivalStatus adds the lastRunArchivalStatus to the get protection groups params -func (o *GetProtectionGroupsParams) WithLastRunArchivalStatus(lastRunArchivalStatus []string) *GetProtectionGroupsParams { - o.SetLastRunArchivalStatus(lastRunArchivalStatus) - return o -} - -// SetLastRunArchivalStatus adds the lastRunArchivalStatus to the get protection groups params -func (o *GetProtectionGroupsParams) SetLastRunArchivalStatus(lastRunArchivalStatus []string) { - o.LastRunArchivalStatus = lastRunArchivalStatus -} - -// WithLastRunCloudSpinStatus adds the lastRunCloudSpinStatus to the get protection groups params -func (o *GetProtectionGroupsParams) WithLastRunCloudSpinStatus(lastRunCloudSpinStatus []string) *GetProtectionGroupsParams { - o.SetLastRunCloudSpinStatus(lastRunCloudSpinStatus) - return o -} - -// SetLastRunCloudSpinStatus adds the lastRunCloudSpinStatus to the get protection groups params -func (o *GetProtectionGroupsParams) SetLastRunCloudSpinStatus(lastRunCloudSpinStatus []string) { - o.LastRunCloudSpinStatus = lastRunCloudSpinStatus -} - -// WithLastRunLocalBackupStatus adds the lastRunLocalBackupStatus to the get protection groups params -func (o *GetProtectionGroupsParams) WithLastRunLocalBackupStatus(lastRunLocalBackupStatus []string) *GetProtectionGroupsParams { - o.SetLastRunLocalBackupStatus(lastRunLocalBackupStatus) - return o -} - -// SetLastRunLocalBackupStatus adds the lastRunLocalBackupStatus to the get protection groups params -func (o *GetProtectionGroupsParams) SetLastRunLocalBackupStatus(lastRunLocalBackupStatus []string) { - o.LastRunLocalBackupStatus = lastRunLocalBackupStatus -} - -// WithLastRunReplicationStatus adds the lastRunReplicationStatus to the get protection groups params -func (o *GetProtectionGroupsParams) WithLastRunReplicationStatus(lastRunReplicationStatus []string) *GetProtectionGroupsParams { - o.SetLastRunReplicationStatus(lastRunReplicationStatus) - return o -} - -// SetLastRunReplicationStatus adds the lastRunReplicationStatus to the get protection groups params -func (o *GetProtectionGroupsParams) SetLastRunReplicationStatus(lastRunReplicationStatus []string) { - o.LastRunReplicationStatus = lastRunReplicationStatus -} - -// WithNames adds the names to the get protection groups params -func (o *GetProtectionGroupsParams) WithNames(names []string) *GetProtectionGroupsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get protection groups params -func (o *GetProtectionGroupsParams) SetNames(names []string) { - o.Names = names -} - -// WithOffice365Workloads adds the office365Workloads to the get protection groups params -func (o *GetProtectionGroupsParams) WithOffice365Workloads(office365Workloads []string) *GetProtectionGroupsParams { - o.SetOffice365Workloads(office365Workloads) - return o -} - -// SetOffice365Workloads adds the office365Workloads to the get protection groups params -func (o *GetProtectionGroupsParams) SetOffice365Workloads(office365Workloads []string) { - o.Office365Workloads = office365Workloads -} - -// WithPolicyIds adds the policyIds to the get protection groups params -func (o *GetProtectionGroupsParams) WithPolicyIds(policyIds []string) *GetProtectionGroupsParams { - o.SetPolicyIds(policyIds) - return o -} - -// SetPolicyIds adds the policyIds to the get protection groups params -func (o *GetProtectionGroupsParams) SetPolicyIds(policyIds []string) { - o.PolicyIds = policyIds -} - -// WithPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) WithPruneExcludedSourceIds(pruneExcludedSourceIds *bool) *GetProtectionGroupsParams { - o.SetPruneExcludedSourceIds(pruneExcludedSourceIds) - return o -} - -// SetPruneExcludedSourceIds adds the pruneExcludedSourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) SetPruneExcludedSourceIds(pruneExcludedSourceIds *bool) { - o.PruneExcludedSourceIds = pruneExcludedSourceIds -} - -// WithPruneSourceIds adds the pruneSourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) WithPruneSourceIds(pruneSourceIds *bool) *GetProtectionGroupsParams { - o.SetPruneSourceIds(pruneSourceIds) - return o -} - -// SetPruneSourceIds adds the pruneSourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) SetPruneSourceIds(pruneSourceIds *bool) { - o.PruneSourceIds = pruneSourceIds -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection groups params -func (o *GetProtectionGroupsParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionGroupsParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection groups params -func (o *GetProtectionGroupsParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithSourceIds adds the sourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) WithSourceIds(sourceIds []int64) *GetProtectionGroupsParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the get protection groups params -func (o *GetProtectionGroupsParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WithStorageDomainID adds the storageDomainID to the get protection groups params -func (o *GetProtectionGroupsParams) WithStorageDomainID(storageDomainID *int64) *GetProtectionGroupsParams { - o.SetStorageDomainID(storageDomainID) - return o -} - -// SetStorageDomainID adds the storageDomainId to the get protection groups params -func (o *GetProtectionGroupsParams) SetStorageDomainID(storageDomainID *int64) { - o.StorageDomainID = storageDomainID -} - -// WithTenantIds adds the tenantIds to the get protection groups params -func (o *GetProtectionGroupsParams) WithTenantIds(tenantIds []string) *GetProtectionGroupsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection groups params -func (o *GetProtectionGroupsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get protection groups params -func (o *GetProtectionGroupsParams) WithUseCachedData(useCachedData *bool) *GetProtectionGroupsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get protection groups params -func (o *GetProtectionGroupsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeGroupsWithDatalockOnly != nil { - - // query param includeGroupsWithDatalockOnly - var qrIncludeGroupsWithDatalockOnly bool - - if o.IncludeGroupsWithDatalockOnly != nil { - qrIncludeGroupsWithDatalockOnly = *o.IncludeGroupsWithDatalockOnly - } - qIncludeGroupsWithDatalockOnly := swag.FormatBool(qrIncludeGroupsWithDatalockOnly) - if qIncludeGroupsWithDatalockOnly != "" { - - if err := r.SetQueryParam("includeGroupsWithDatalockOnly", qIncludeGroupsWithDatalockOnly); err != nil { - return err - } - } - } - - if o.IncludeLastRunInfo != nil { - - // query param includeLastRunInfo - var qrIncludeLastRunInfo bool - - if o.IncludeLastRunInfo != nil { - qrIncludeLastRunInfo = *o.IncludeLastRunInfo - } - qIncludeLastRunInfo := swag.FormatBool(qrIncludeLastRunInfo) - if qIncludeLastRunInfo != "" { - - if err := r.SetQueryParam("includeLastRunInfo", qIncludeLastRunInfo); 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.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsDeleted != nil { - - // query param isDeleted - var qrIsDeleted bool - - if o.IsDeleted != nil { - qrIsDeleted = *o.IsDeleted - } - qIsDeleted := swag.FormatBool(qrIsDeleted) - if qIsDeleted != "" { - - if err := r.SetQueryParam("isDeleted", qIsDeleted); err != nil { - return err - } - } - } - - if o.IsLastRunSLAViolated != nil { - - // query param isLastRunSlaViolated - var qrIsLastRunSLAViolated bool - - if o.IsLastRunSLAViolated != nil { - qrIsLastRunSLAViolated = *o.IsLastRunSLAViolated - } - qIsLastRunSLAViolated := swag.FormatBool(qrIsLastRunSLAViolated) - if qIsLastRunSLAViolated != "" { - - if err := r.SetQueryParam("isLastRunSlaViolated", qIsLastRunSLAViolated); err != nil { - return err - } - } - } - - if o.IsPaused != nil { - - // query param isPaused - var qrIsPaused bool - - if o.IsPaused != nil { - qrIsPaused = *o.IsPaused - } - qIsPaused := swag.FormatBool(qrIsPaused) - if qIsPaused != "" { - - if err := r.SetQueryParam("isPaused", qIsPaused); err != nil { - return err - } - } - } - - if o.LastRunAnyStatus != nil { - - // binding items for lastRunAnyStatus - joinedLastRunAnyStatus := o.bindParamLastRunAnyStatus(reg) - - // query array param lastRunAnyStatus - if err := r.SetQueryParam("lastRunAnyStatus", joinedLastRunAnyStatus...); err != nil { - return err - } - } - - if o.LastRunArchivalStatus != nil { - - // binding items for lastRunArchivalStatus - joinedLastRunArchivalStatus := o.bindParamLastRunArchivalStatus(reg) - - // query array param lastRunArchivalStatus - if err := r.SetQueryParam("lastRunArchivalStatus", joinedLastRunArchivalStatus...); err != nil { - return err - } - } - - if o.LastRunCloudSpinStatus != nil { - - // binding items for lastRunCloudSpinStatus - joinedLastRunCloudSpinStatus := o.bindParamLastRunCloudSpinStatus(reg) - - // query array param lastRunCloudSpinStatus - if err := r.SetQueryParam("lastRunCloudSpinStatus", joinedLastRunCloudSpinStatus...); err != nil { - return err - } - } - - if o.LastRunLocalBackupStatus != nil { - - // binding items for lastRunLocalBackupStatus - joinedLastRunLocalBackupStatus := o.bindParamLastRunLocalBackupStatus(reg) - - // query array param lastRunLocalBackupStatus - if err := r.SetQueryParam("lastRunLocalBackupStatus", joinedLastRunLocalBackupStatus...); err != nil { - return err - } - } - - if o.LastRunReplicationStatus != nil { - - // binding items for lastRunReplicationStatus - joinedLastRunReplicationStatus := o.bindParamLastRunReplicationStatus(reg) - - // query array param lastRunReplicationStatus - if err := r.SetQueryParam("lastRunReplicationStatus", joinedLastRunReplicationStatus...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.Office365Workloads != nil { - - // binding items for office365Workloads - joinedOffice365Workloads := o.bindParamOffice365Workloads(reg) - - // query array param office365Workloads - if err := r.SetQueryParam("office365Workloads", joinedOffice365Workloads...); err != nil { - return err - } - } - - if o.PolicyIds != nil { - - // binding items for policyIds - joinedPolicyIds := o.bindParamPolicyIds(reg) - - // query array param policyIds - if err := r.SetQueryParam("policyIds", joinedPolicyIds...); err != nil { - return err - } - } - - if o.PruneExcludedSourceIds != nil { - - // query param pruneExcludedSourceIds - var qrPruneExcludedSourceIds bool - - if o.PruneExcludedSourceIds != nil { - qrPruneExcludedSourceIds = *o.PruneExcludedSourceIds - } - qPruneExcludedSourceIds := swag.FormatBool(qrPruneExcludedSourceIds) - if qPruneExcludedSourceIds != "" { - - if err := r.SetQueryParam("pruneExcludedSourceIds", qPruneExcludedSourceIds); err != nil { - return err - } - } - } - - if o.PruneSourceIds != nil { - - // query param pruneSourceIds - var qrPruneSourceIds bool - - if o.PruneSourceIds != nil { - qrPruneSourceIds = *o.PruneSourceIds - } - qPruneSourceIds := swag.FormatBool(qrPruneSourceIds) - if qPruneSourceIds != "" { - - if err := r.SetQueryParam("pruneSourceIds", qPruneSourceIds); err != nil { - return err - } - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if o.StorageDomainID != nil { - - // query param storageDomainId - var qrStorageDomainID int64 - - if o.StorageDomainID != nil { - qrStorageDomainID = *o.StorageDomainID - } - qStorageDomainID := swag.FormatInt64(qrStorageDomainID) - if qStorageDomainID != "" { - - if err := r.SetQueryParam("storageDomainId", qStorageDomainID); err != nil { - return err - } - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionGroups binds the parameter environments -func (o *GetProtectionGroupsParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamGetProtectionGroups binds the parameter ids -func (o *GetProtectionGroupsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetProtectionGroups binds the parameter lastRunAnyStatus -func (o *GetProtectionGroupsParams) bindParamLastRunAnyStatus(formats strfmt.Registry) []string { - lastRunAnyStatusIR := o.LastRunAnyStatus - - var lastRunAnyStatusIC []string - for _, lastRunAnyStatusIIR := range lastRunAnyStatusIR { // explode []string - - lastRunAnyStatusIIV := lastRunAnyStatusIIR // string as string - lastRunAnyStatusIC = append(lastRunAnyStatusIC, lastRunAnyStatusIIV) - } - - // items.CollectionFormat: "" - lastRunAnyStatusIS := swag.JoinByFormat(lastRunAnyStatusIC, "") - - return lastRunAnyStatusIS -} - -// bindParamGetProtectionGroups binds the parameter lastRunArchivalStatus -func (o *GetProtectionGroupsParams) bindParamLastRunArchivalStatus(formats strfmt.Registry) []string { - lastRunArchivalStatusIR := o.LastRunArchivalStatus - - var lastRunArchivalStatusIC []string - for _, lastRunArchivalStatusIIR := range lastRunArchivalStatusIR { // explode []string - - lastRunArchivalStatusIIV := lastRunArchivalStatusIIR // string as string - lastRunArchivalStatusIC = append(lastRunArchivalStatusIC, lastRunArchivalStatusIIV) - } - - // items.CollectionFormat: "" - lastRunArchivalStatusIS := swag.JoinByFormat(lastRunArchivalStatusIC, "") - - return lastRunArchivalStatusIS -} - -// bindParamGetProtectionGroups binds the parameter lastRunCloudSpinStatus -func (o *GetProtectionGroupsParams) bindParamLastRunCloudSpinStatus(formats strfmt.Registry) []string { - lastRunCloudSpinStatusIR := o.LastRunCloudSpinStatus - - var lastRunCloudSpinStatusIC []string - for _, lastRunCloudSpinStatusIIR := range lastRunCloudSpinStatusIR { // explode []string - - lastRunCloudSpinStatusIIV := lastRunCloudSpinStatusIIR // string as string - lastRunCloudSpinStatusIC = append(lastRunCloudSpinStatusIC, lastRunCloudSpinStatusIIV) - } - - // items.CollectionFormat: "" - lastRunCloudSpinStatusIS := swag.JoinByFormat(lastRunCloudSpinStatusIC, "") - - return lastRunCloudSpinStatusIS -} - -// bindParamGetProtectionGroups binds the parameter lastRunLocalBackupStatus -func (o *GetProtectionGroupsParams) bindParamLastRunLocalBackupStatus(formats strfmt.Registry) []string { - lastRunLocalBackupStatusIR := o.LastRunLocalBackupStatus - - var lastRunLocalBackupStatusIC []string - for _, lastRunLocalBackupStatusIIR := range lastRunLocalBackupStatusIR { // explode []string - - lastRunLocalBackupStatusIIV := lastRunLocalBackupStatusIIR // string as string - lastRunLocalBackupStatusIC = append(lastRunLocalBackupStatusIC, lastRunLocalBackupStatusIIV) - } - - // items.CollectionFormat: "" - lastRunLocalBackupStatusIS := swag.JoinByFormat(lastRunLocalBackupStatusIC, "") - - return lastRunLocalBackupStatusIS -} - -// bindParamGetProtectionGroups binds the parameter lastRunReplicationStatus -func (o *GetProtectionGroupsParams) bindParamLastRunReplicationStatus(formats strfmt.Registry) []string { - lastRunReplicationStatusIR := o.LastRunReplicationStatus - - var lastRunReplicationStatusIC []string - for _, lastRunReplicationStatusIIR := range lastRunReplicationStatusIR { // explode []string - - lastRunReplicationStatusIIV := lastRunReplicationStatusIIR // string as string - lastRunReplicationStatusIC = append(lastRunReplicationStatusIC, lastRunReplicationStatusIIV) - } - - // items.CollectionFormat: "" - lastRunReplicationStatusIS := swag.JoinByFormat(lastRunReplicationStatusIC, "") - - return lastRunReplicationStatusIS -} - -// bindParamGetProtectionGroups binds the parameter names -func (o *GetProtectionGroupsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetProtectionGroups binds the parameter office365Workloads -func (o *GetProtectionGroupsParams) bindParamOffice365Workloads(formats strfmt.Registry) []string { - office365WorkloadsIR := o.Office365Workloads - - var office365WorkloadsIC []string - for _, office365WorkloadsIIR := range office365WorkloadsIR { // explode []string - - office365WorkloadsIIV := office365WorkloadsIIR // string as string - office365WorkloadsIC = append(office365WorkloadsIC, office365WorkloadsIIV) - } - - // items.CollectionFormat: "" - office365WorkloadsIS := swag.JoinByFormat(office365WorkloadsIC, "") - - return office365WorkloadsIS -} - -// bindParamGetProtectionGroups binds the parameter policyIds -func (o *GetProtectionGroupsParams) bindParamPolicyIds(formats strfmt.Registry) []string { - policyIdsIR := o.PolicyIds - - var policyIdsIC []string - for _, policyIdsIIR := range policyIdsIR { // explode []string - - policyIdsIIV := policyIdsIIR // string as string - policyIdsIC = append(policyIdsIC, policyIdsIIV) - } - - // items.CollectionFormat: "" - policyIdsIS := swag.JoinByFormat(policyIdsIC, "") - - return policyIdsIS -} - -// bindParamGetProtectionGroups binds the parameter sourceIds -func (o *GetProtectionGroupsParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} - -// bindParamGetProtectionGroups binds the parameter tenantIds -func (o *GetProtectionGroupsParams) 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/client/protection_group/get_protection_groups_responses.go b/v2/client/protection_group/get_protection_groups_responses.go deleted file mode 100644 index d74ac884..00000000 --- a/v2/client/protection_group/get_protection_groups_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionGroupsReader is a Reader for the GetProtectionGroups structure. -type GetProtectionGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionGroupsDefault(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 - } -} - -// NewGetProtectionGroupsOK creates a GetProtectionGroupsOK with default headers values -func NewGetProtectionGroupsOK() *GetProtectionGroupsOK { - return &GetProtectionGroupsOK{} -} - -/* -GetProtectionGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionGroupsOK struct { - Payload *models.ProtectionGroups -} - -// IsSuccess returns true when this get protection groups o k response has a 2xx status code -func (o *GetProtectionGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection groups o k response has a 3xx status code -func (o *GetProtectionGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection groups o k response has a 4xx status code -func (o *GetProtectionGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection groups o k response has a 5xx status code -func (o *GetProtectionGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection groups o k response a status code equal to that given -func (o *GetProtectionGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection groups o k response -func (o *GetProtectionGroupsOK) Code() int { - return 200 -} - -func (o *GetProtectionGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups][%d] getProtectionGroupsOK %s", 200, payload) -} - -func (o *GetProtectionGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups][%d] getProtectionGroupsOK %s", 200, payload) -} - -func (o *GetProtectionGroupsOK) GetPayload() *models.ProtectionGroups { - return o.Payload -} - -func (o *GetProtectionGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroups) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionGroupsDefault creates a GetProtectionGroupsDefault with default headers values -func NewGetProtectionGroupsDefault(code int) *GetProtectionGroupsDefault { - return &GetProtectionGroupsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection groups default response has a 2xx status code -func (o *GetProtectionGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection groups default response has a 3xx status code -func (o *GetProtectionGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection groups default response has a 4xx status code -func (o *GetProtectionGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection groups default response has a 5xx status code -func (o *GetProtectionGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection groups default response a status code equal to that given -func (o *GetProtectionGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection groups default response -func (o *GetProtectionGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups][%d] GetProtectionGroups default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups][%d] GetProtectionGroups default %s", o._statusCode, payload) -} - -func (o *GetProtectionGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionGroupsDefault) 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_run_progress_parameters.go b/v2/client/protection_group/get_protection_run_progress_parameters.go deleted file mode 100644 index 7ca17f3b..00000000 --- a/v2/client/protection_group/get_protection_run_progress_parameters.go +++ /dev/null @@ -1,601 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunProgressParams creates a new GetProtectionRunProgressParams 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 NewGetProtectionRunProgressParams() *GetProtectionRunProgressParams { - return &GetProtectionRunProgressParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunProgressParamsWithTimeout creates a new GetProtectionRunProgressParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunProgressParamsWithTimeout(timeout time.Duration) *GetProtectionRunProgressParams { - return &GetProtectionRunProgressParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunProgressParamsWithContext creates a new GetProtectionRunProgressParams object -// with the ability to set a context for a request. -func NewGetProtectionRunProgressParamsWithContext(ctx context.Context) *GetProtectionRunProgressParams { - return &GetProtectionRunProgressParams{ - Context: ctx, - } -} - -// NewGetProtectionRunProgressParamsWithHTTPClient creates a new GetProtectionRunProgressParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunProgressParamsWithHTTPClient(client *http.Client) *GetProtectionRunProgressParams { - return &GetProtectionRunProgressParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunProgressParams contains all the parameters to send to the API endpoint - - for the get protection run progress operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunProgressParams struct { - - /* EndTimeUsecs. - - Specifies the time before which the progress task ends in Unix epoch Timestamp(in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ExcludeObjectDetails. - - Specifies whether to return objects. By default all the task tree are returned. - */ - ExcludeObjectDetails *bool - - /* IncludeEventLogs. - - Specifies whether to include event logs - */ - IncludeEventLogs *bool - - /* IncludeFinishedTasks. - - Specifies whether to return finished tasks. By default only active tasks are returned. - */ - IncludeFinishedTasks *bool - - /* IncludeTenants. - - If true, the response will include Protection Group Runs which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. If it's not specified, it is true by default. - */ - IncludeTenants *bool - - /* MaxLogLevel. - - Specifies the number of levels till which to fetch the event logs. This is applicable only when includeEventLogs is true. - - Format: int32 - */ - MaxLogLevel *int32 - - /* MaxTasksNum. - - Specifies the maximum number of tasks to return. - - Format: int32 - */ - MaxTasksNum *int32 - - /* ObjectTaskPaths. - - Specifies the object level task path. This relates to the objectID. If provided this will take precedence over the objects, and will be used to fetch progress details directly without looking actuall task path of the object. - */ - ObjectTaskPaths []string - - /* Objects. - - Specifies the objects whose progress will be returned. This only applies to protection group runs and will be ignored for object runs. If the objects are specified, the run progress will not be returned and only the progress of the specified objects will be returned. - */ - Objects []int64 - - /* RunID. - - Specifies a unique run id of the Protection Run. - */ - RunID string - - /* RunTaskPath. - - Specifies the task path of the run or object run. This is applicable only if progress of a protection group with one or more object is required.If provided this will be used to fetch progress details directly without looking actual task path of the object. Objects field is stil expected else it changes the response format. - */ - RunTaskPath *string - - /* StartTimeUsecs. - - Specifies the time after which the progress task starts in Unix epoch Timestamp(in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which the run is to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection run progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunProgressParams) WithDefaults() *GetProtectionRunProgressParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection run progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunProgressParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithTimeout(timeout time.Duration) *GetProtectionRunProgressParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithContext(ctx context.Context) *GetProtectionRunProgressParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithHTTPClient(client *http.Client) *GetProtectionRunProgressParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionRunProgressParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithExcludeObjectDetails adds the excludeObjectDetails to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithExcludeObjectDetails(excludeObjectDetails *bool) *GetProtectionRunProgressParams { - o.SetExcludeObjectDetails(excludeObjectDetails) - return o -} - -// SetExcludeObjectDetails adds the excludeObjectDetails to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetExcludeObjectDetails(excludeObjectDetails *bool) { - o.ExcludeObjectDetails = excludeObjectDetails -} - -// WithIncludeEventLogs adds the includeEventLogs to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithIncludeEventLogs(includeEventLogs *bool) *GetProtectionRunProgressParams { - o.SetIncludeEventLogs(includeEventLogs) - return o -} - -// SetIncludeEventLogs adds the includeEventLogs to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetIncludeEventLogs(includeEventLogs *bool) { - o.IncludeEventLogs = includeEventLogs -} - -// WithIncludeFinishedTasks adds the includeFinishedTasks to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithIncludeFinishedTasks(includeFinishedTasks *bool) *GetProtectionRunProgressParams { - o.SetIncludeFinishedTasks(includeFinishedTasks) - return o -} - -// SetIncludeFinishedTasks adds the includeFinishedTasks to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetIncludeFinishedTasks(includeFinishedTasks *bool) { - o.IncludeFinishedTasks = includeFinishedTasks -} - -// WithIncludeTenants adds the includeTenants to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithIncludeTenants(includeTenants *bool) *GetProtectionRunProgressParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMaxLogLevel adds the maxLogLevel to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithMaxLogLevel(maxLogLevel *int32) *GetProtectionRunProgressParams { - o.SetMaxLogLevel(maxLogLevel) - return o -} - -// SetMaxLogLevel adds the maxLogLevel to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetMaxLogLevel(maxLogLevel *int32) { - o.MaxLogLevel = maxLogLevel -} - -// WithMaxTasksNum adds the maxTasksNum to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithMaxTasksNum(maxTasksNum *int32) *GetProtectionRunProgressParams { - o.SetMaxTasksNum(maxTasksNum) - return o -} - -// SetMaxTasksNum adds the maxTasksNum to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetMaxTasksNum(maxTasksNum *int32) { - o.MaxTasksNum = maxTasksNum -} - -// WithObjectTaskPaths adds the objectTaskPaths to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithObjectTaskPaths(objectTaskPaths []string) *GetProtectionRunProgressParams { - o.SetObjectTaskPaths(objectTaskPaths) - return o -} - -// SetObjectTaskPaths adds the objectTaskPaths to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetObjectTaskPaths(objectTaskPaths []string) { - o.ObjectTaskPaths = objectTaskPaths -} - -// WithObjects adds the objects to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithObjects(objects []int64) *GetProtectionRunProgressParams { - o.SetObjects(objects) - return o -} - -// SetObjects adds the objects to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetObjects(objects []int64) { - o.Objects = objects -} - -// WithRunID adds the runID to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithRunID(runID string) *GetProtectionRunProgressParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetRunID(runID string) { - o.RunID = runID -} - -// WithRunTaskPath adds the runTaskPath to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithRunTaskPath(runTaskPath *string) *GetProtectionRunProgressParams { - o.SetRunTaskPath(runTaskPath) - return o -} - -// SetRunTaskPath adds the runTaskPath to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetRunTaskPath(runTaskPath *string) { - o.RunTaskPath = runTaskPath -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionRunProgressParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get protection run progress params -func (o *GetProtectionRunProgressParams) WithTenantIds(tenantIds []string) *GetProtectionRunProgressParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection run progress params -func (o *GetProtectionRunProgressParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunProgressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeObjectDetails != nil { - - // query param excludeObjectDetails - var qrExcludeObjectDetails bool - - if o.ExcludeObjectDetails != nil { - qrExcludeObjectDetails = *o.ExcludeObjectDetails - } - qExcludeObjectDetails := swag.FormatBool(qrExcludeObjectDetails) - if qExcludeObjectDetails != "" { - - if err := r.SetQueryParam("excludeObjectDetails", qExcludeObjectDetails); err != nil { - return err - } - } - } - - if o.IncludeEventLogs != nil { - - // query param includeEventLogs - var qrIncludeEventLogs bool - - if o.IncludeEventLogs != nil { - qrIncludeEventLogs = *o.IncludeEventLogs - } - qIncludeEventLogs := swag.FormatBool(qrIncludeEventLogs) - if qIncludeEventLogs != "" { - - if err := r.SetQueryParam("includeEventLogs", qIncludeEventLogs); err != nil { - return err - } - } - } - - if o.IncludeFinishedTasks != nil { - - // query param includeFinishedTasks - var qrIncludeFinishedTasks bool - - if o.IncludeFinishedTasks != nil { - qrIncludeFinishedTasks = *o.IncludeFinishedTasks - } - qIncludeFinishedTasks := swag.FormatBool(qrIncludeFinishedTasks) - if qIncludeFinishedTasks != "" { - - if err := r.SetQueryParam("includeFinishedTasks", qIncludeFinishedTasks); 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.MaxLogLevel != nil { - - // query param maxLogLevel - var qrMaxLogLevel int32 - - if o.MaxLogLevel != nil { - qrMaxLogLevel = *o.MaxLogLevel - } - qMaxLogLevel := swag.FormatInt32(qrMaxLogLevel) - if qMaxLogLevel != "" { - - if err := r.SetQueryParam("maxLogLevel", qMaxLogLevel); err != nil { - return err - } - } - } - - if o.MaxTasksNum != nil { - - // query param maxTasksNum - var qrMaxTasksNum int32 - - if o.MaxTasksNum != nil { - qrMaxTasksNum = *o.MaxTasksNum - } - qMaxTasksNum := swag.FormatInt32(qrMaxTasksNum) - if qMaxTasksNum != "" { - - if err := r.SetQueryParam("maxTasksNum", qMaxTasksNum); err != nil { - return err - } - } - } - - if o.ObjectTaskPaths != nil { - - // binding items for objectTaskPaths - joinedObjectTaskPaths := o.bindParamObjectTaskPaths(reg) - - // query array param objectTaskPaths - if err := r.SetQueryParam("objectTaskPaths", joinedObjectTaskPaths...); err != nil { - return err - } - } - - if o.Objects != nil { - - // binding items for objects - joinedObjects := o.bindParamObjects(reg) - - // query array param objects - if err := r.SetQueryParam("objects", joinedObjects...); err != nil { - return err - } - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if o.RunTaskPath != nil { - - // query param runTaskPath - var qrRunTaskPath string - - if o.RunTaskPath != nil { - qrRunTaskPath = *o.RunTaskPath - } - qRunTaskPath := qrRunTaskPath - if qRunTaskPath != "" { - - if err := r.SetQueryParam("runTaskPath", qRunTaskPath); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionRunProgress binds the parameter objectTaskPaths -func (o *GetProtectionRunProgressParams) bindParamObjectTaskPaths(formats strfmt.Registry) []string { - objectTaskPathsIR := o.ObjectTaskPaths - - var objectTaskPathsIC []string - for _, objectTaskPathsIIR := range objectTaskPathsIR { // explode []string - - objectTaskPathsIIV := objectTaskPathsIIR // string as string - objectTaskPathsIC = append(objectTaskPathsIC, objectTaskPathsIIV) - } - - // items.CollectionFormat: "" - objectTaskPathsIS := swag.JoinByFormat(objectTaskPathsIC, "") - - return objectTaskPathsIS -} - -// bindParamGetProtectionRunProgress binds the parameter objects -func (o *GetProtectionRunProgressParams) bindParamObjects(formats strfmt.Registry) []string { - objectsIR := o.Objects - - var objectsIC []string - for _, objectsIIR := range objectsIR { // explode []int64 - - objectsIIV := swag.FormatInt64(objectsIIR) // int64 as string - objectsIC = append(objectsIC, objectsIIV) - } - - // items.CollectionFormat: "" - objectsIS := swag.JoinByFormat(objectsIC, "") - - return objectsIS -} - -// bindParamGetProtectionRunProgress binds the parameter tenantIds -func (o *GetProtectionRunProgressParams) 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/client/protection_group/get_protection_run_progress_responses.go b/v2/client/protection_group/get_protection_run_progress_responses.go deleted file mode 100644 index a58be38a..00000000 --- a/v2/client/protection_group/get_protection_run_progress_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionRunProgressReader is a Reader for the GetProtectionRunProgress structure. -type GetProtectionRunProgressReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunProgressOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunProgressDefault(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 - } -} - -// NewGetProtectionRunProgressOK creates a GetProtectionRunProgressOK with default headers values -func NewGetProtectionRunProgressOK() *GetProtectionRunProgressOK { - return &GetProtectionRunProgressOK{} -} - -/* -GetProtectionRunProgressOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunProgressOK struct { - Payload *models.GetProtectionRunProgressBody -} - -// IsSuccess returns true when this get protection run progress o k response has a 2xx status code -func (o *GetProtectionRunProgressOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection run progress o k response has a 3xx status code -func (o *GetProtectionRunProgressOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection run progress o k response has a 4xx status code -func (o *GetProtectionRunProgressOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection run progress o k response has a 5xx status code -func (o *GetProtectionRunProgressOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection run progress o k response a status code equal to that given -func (o *GetProtectionRunProgressOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection run progress o k response -func (o *GetProtectionRunProgressOK) Code() int { - return 200 -} - -func (o *GetProtectionRunProgressOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/progress][%d] getProtectionRunProgressOK %s", 200, payload) -} - -func (o *GetProtectionRunProgressOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/progress][%d] getProtectionRunProgressOK %s", 200, payload) -} - -func (o *GetProtectionRunProgressOK) GetPayload() *models.GetProtectionRunProgressBody { - return o.Payload -} - -func (o *GetProtectionRunProgressOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetProtectionRunProgressBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunProgressDefault creates a GetProtectionRunProgressDefault with default headers values -func NewGetProtectionRunProgressDefault(code int) *GetProtectionRunProgressDefault { - return &GetProtectionRunProgressDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunProgressDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunProgressDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection run progress default response has a 2xx status code -func (o *GetProtectionRunProgressDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection run progress default response has a 3xx status code -func (o *GetProtectionRunProgressDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection run progress default response has a 4xx status code -func (o *GetProtectionRunProgressDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection run progress default response has a 5xx status code -func (o *GetProtectionRunProgressDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection run progress default response a status code equal to that given -func (o *GetProtectionRunProgressDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection run progress default response -func (o *GetProtectionRunProgressDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunProgressDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/progress][%d] GetProtectionRunProgress default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunProgressDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/progress][%d] GetProtectionRunProgress default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunProgressDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionRunProgressDefault) 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_run_stats_parameters.go b/v2/client/protection_group/get_protection_run_stats_parameters.go deleted file mode 100644 index 5decfaad..00000000 --- a/v2/client/protection_group/get_protection_run_stats_parameters.go +++ /dev/null @@ -1,531 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunStatsParams creates a new GetProtectionRunStatsParams 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 NewGetProtectionRunStatsParams() *GetProtectionRunStatsParams { - return &GetProtectionRunStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunStatsParamsWithTimeout creates a new GetProtectionRunStatsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunStatsParamsWithTimeout(timeout time.Duration) *GetProtectionRunStatsParams { - return &GetProtectionRunStatsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunStatsParamsWithContext creates a new GetProtectionRunStatsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunStatsParamsWithContext(ctx context.Context) *GetProtectionRunStatsParams { - return &GetProtectionRunStatsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunStatsParamsWithHTTPClient creates a new GetProtectionRunStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunStatsParamsWithHTTPClient(client *http.Client) *GetProtectionRunStatsParams { - return &GetProtectionRunStatsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunStatsParams contains all the parameters to send to the API endpoint - - for the get protection run stats operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunStatsParams struct { - - /* EndTimeUsecs. - - Specifies the time before which the stats task ends in Unix epoch Timestamp(in microseconds). - - Format: int64 - */ - EndTimeUsecs *int64 - - /* ExcludeObjectDetails. - - Specifies whether to return objects. By default all the task tree are returned. - */ - ExcludeObjectDetails *bool - - /* IncludeFinishedTasks. - - Specifies whether to return finished tasks. By default only active tasks are returned. - */ - IncludeFinishedTasks *bool - - /* IncludeTenants. - - If true, the response will include Protection Group Runs which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned. If it's not specified, it is true by default. - */ - IncludeTenants *bool - - /* MaxTasksNum. - - Specifies the maximum number of tasks to return. - - Format: int32 - */ - MaxTasksNum *int32 - - /* ObjectTaskPaths. - - Specifies the object level task path. This relates to the objectID. If provided this will take precedence over the objects, and will be used to fetch stats details directly without looking actuall task path of the object. - */ - ObjectTaskPaths []string - - /* Objects. - - Specifies the objects whose stats will be returned. This only applies to protection group runs and will be ignored for object runs. If the objects are specified, the run stats will not be returned and only the stats of the specified objects will be returned. - */ - Objects []int64 - - /* RunID. - - Specifies a unique run id of the Protection Run. - */ - RunID string - - /* RunTaskPath. - - Specifies the task path of the run or object run. This is applicable only if stats of a protection group with one or more object is required. If provided this will be used to fetch stats details directly without looking actual task path of the object. Objects field is stil expected else it changes the response format. - */ - RunTaskPath *string - - /* StartTimeUsecs. - - Specifies the time after which the stats task starts in Unix epoch Timestamp(in microseconds). - - Format: int64 - */ - StartTimeUsecs *int64 - - /* TenantIds. - - TenantIds contains ids of the tenants for which the run is to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunStatsParams) WithDefaults() *GetProtectionRunStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection run stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithTimeout(timeout time.Duration) *GetProtectionRunStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithContext(ctx context.Context) *GetProtectionRunStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithHTTPClient(client *http.Client) *GetProtectionRunStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionRunStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithExcludeObjectDetails adds the excludeObjectDetails to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithExcludeObjectDetails(excludeObjectDetails *bool) *GetProtectionRunStatsParams { - o.SetExcludeObjectDetails(excludeObjectDetails) - return o -} - -// SetExcludeObjectDetails adds the excludeObjectDetails to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetExcludeObjectDetails(excludeObjectDetails *bool) { - o.ExcludeObjectDetails = excludeObjectDetails -} - -// WithIncludeFinishedTasks adds the includeFinishedTasks to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithIncludeFinishedTasks(includeFinishedTasks *bool) *GetProtectionRunStatsParams { - o.SetIncludeFinishedTasks(includeFinishedTasks) - return o -} - -// SetIncludeFinishedTasks adds the includeFinishedTasks to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetIncludeFinishedTasks(includeFinishedTasks *bool) { - o.IncludeFinishedTasks = includeFinishedTasks -} - -// WithIncludeTenants adds the includeTenants to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithIncludeTenants(includeTenants *bool) *GetProtectionRunStatsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMaxTasksNum adds the maxTasksNum to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithMaxTasksNum(maxTasksNum *int32) *GetProtectionRunStatsParams { - o.SetMaxTasksNum(maxTasksNum) - return o -} - -// SetMaxTasksNum adds the maxTasksNum to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetMaxTasksNum(maxTasksNum *int32) { - o.MaxTasksNum = maxTasksNum -} - -// WithObjectTaskPaths adds the objectTaskPaths to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithObjectTaskPaths(objectTaskPaths []string) *GetProtectionRunStatsParams { - o.SetObjectTaskPaths(objectTaskPaths) - return o -} - -// SetObjectTaskPaths adds the objectTaskPaths to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetObjectTaskPaths(objectTaskPaths []string) { - o.ObjectTaskPaths = objectTaskPaths -} - -// WithObjects adds the objects to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithObjects(objects []int64) *GetProtectionRunStatsParams { - o.SetObjects(objects) - return o -} - -// SetObjects adds the objects to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetObjects(objects []int64) { - o.Objects = objects -} - -// WithRunID adds the runID to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithRunID(runID string) *GetProtectionRunStatsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetRunID(runID string) { - o.RunID = runID -} - -// WithRunTaskPath adds the runTaskPath to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithRunTaskPath(runTaskPath *string) *GetProtectionRunStatsParams { - o.SetRunTaskPath(runTaskPath) - return o -} - -// SetRunTaskPath adds the runTaskPath to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetRunTaskPath(runTaskPath *string) { - o.RunTaskPath = runTaskPath -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionRunStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithTenantIds adds the tenantIds to the get protection run stats params -func (o *GetProtectionRunStatsParams) WithTenantIds(tenantIds []string) *GetProtectionRunStatsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection run stats params -func (o *GetProtectionRunStatsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.ExcludeObjectDetails != nil { - - // query param excludeObjectDetails - var qrExcludeObjectDetails bool - - if o.ExcludeObjectDetails != nil { - qrExcludeObjectDetails = *o.ExcludeObjectDetails - } - qExcludeObjectDetails := swag.FormatBool(qrExcludeObjectDetails) - if qExcludeObjectDetails != "" { - - if err := r.SetQueryParam("excludeObjectDetails", qExcludeObjectDetails); err != nil { - return err - } - } - } - - if o.IncludeFinishedTasks != nil { - - // query param includeFinishedTasks - var qrIncludeFinishedTasks bool - - if o.IncludeFinishedTasks != nil { - qrIncludeFinishedTasks = *o.IncludeFinishedTasks - } - qIncludeFinishedTasks := swag.FormatBool(qrIncludeFinishedTasks) - if qIncludeFinishedTasks != "" { - - if err := r.SetQueryParam("includeFinishedTasks", qIncludeFinishedTasks); 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.MaxTasksNum != nil { - - // query param maxTasksNum - var qrMaxTasksNum int32 - - if o.MaxTasksNum != nil { - qrMaxTasksNum = *o.MaxTasksNum - } - qMaxTasksNum := swag.FormatInt32(qrMaxTasksNum) - if qMaxTasksNum != "" { - - if err := r.SetQueryParam("maxTasksNum", qMaxTasksNum); err != nil { - return err - } - } - } - - if o.ObjectTaskPaths != nil { - - // binding items for objectTaskPaths - joinedObjectTaskPaths := o.bindParamObjectTaskPaths(reg) - - // query array param objectTaskPaths - if err := r.SetQueryParam("objectTaskPaths", joinedObjectTaskPaths...); err != nil { - return err - } - } - - if o.Objects != nil { - - // binding items for objects - joinedObjects := o.bindParamObjects(reg) - - // query array param objects - if err := r.SetQueryParam("objects", joinedObjects...); err != nil { - return err - } - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if o.RunTaskPath != nil { - - // query param runTaskPath - var qrRunTaskPath string - - if o.RunTaskPath != nil { - qrRunTaskPath = *o.RunTaskPath - } - qRunTaskPath := qrRunTaskPath - if qRunTaskPath != "" { - - if err := r.SetQueryParam("runTaskPath", qRunTaskPath); err != nil { - return err - } - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionRunStats binds the parameter objectTaskPaths -func (o *GetProtectionRunStatsParams) bindParamObjectTaskPaths(formats strfmt.Registry) []string { - objectTaskPathsIR := o.ObjectTaskPaths - - var objectTaskPathsIC []string - for _, objectTaskPathsIIR := range objectTaskPathsIR { // explode []string - - objectTaskPathsIIV := objectTaskPathsIIR // string as string - objectTaskPathsIC = append(objectTaskPathsIC, objectTaskPathsIIV) - } - - // items.CollectionFormat: "" - objectTaskPathsIS := swag.JoinByFormat(objectTaskPathsIC, "") - - return objectTaskPathsIS -} - -// bindParamGetProtectionRunStats binds the parameter objects -func (o *GetProtectionRunStatsParams) bindParamObjects(formats strfmt.Registry) []string { - objectsIR := o.Objects - - var objectsIC []string - for _, objectsIIR := range objectsIR { // explode []int64 - - objectsIIV := swag.FormatInt64(objectsIIR) // int64 as string - objectsIC = append(objectsIC, objectsIIV) - } - - // items.CollectionFormat: "" - objectsIS := swag.JoinByFormat(objectsIC, "") - - return objectsIS -} - -// bindParamGetProtectionRunStats binds the parameter tenantIds -func (o *GetProtectionRunStatsParams) 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/client/protection_group/get_protection_run_stats_responses.go b/v2/client/protection_group/get_protection_run_stats_responses.go deleted file mode 100644 index 430d9127..00000000 --- a/v2/client/protection_group/get_protection_run_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionRunStatsReader is a Reader for the GetProtectionRunStats structure. -type GetProtectionRunStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunStatsDefault(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 - } -} - -// NewGetProtectionRunStatsOK creates a GetProtectionRunStatsOK with default headers values -func NewGetProtectionRunStatsOK() *GetProtectionRunStatsOK { - return &GetProtectionRunStatsOK{} -} - -/* -GetProtectionRunStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunStatsOK struct { - Payload *models.GetProtectionRunStatsBody -} - -// IsSuccess returns true when this get protection run stats o k response has a 2xx status code -func (o *GetProtectionRunStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection run stats o k response has a 3xx status code -func (o *GetProtectionRunStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection run stats o k response has a 4xx status code -func (o *GetProtectionRunStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection run stats o k response has a 5xx status code -func (o *GetProtectionRunStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection run stats o k response a status code equal to that given -func (o *GetProtectionRunStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection run stats o k response -func (o *GetProtectionRunStatsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/stats][%d] getProtectionRunStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/stats][%d] getProtectionRunStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunStatsOK) GetPayload() *models.GetProtectionRunStatsBody { - return o.Payload -} - -func (o *GetProtectionRunStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetProtectionRunStatsBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunStatsDefault creates a GetProtectionRunStatsDefault with default headers values -func NewGetProtectionRunStatsDefault(code int) *GetProtectionRunStatsDefault { - return &GetProtectionRunStatsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection run stats default response has a 2xx status code -func (o *GetProtectionRunStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection run stats default response has a 3xx status code -func (o *GetProtectionRunStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection run stats default response has a 4xx status code -func (o *GetProtectionRunStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection run stats default response has a 5xx status code -func (o *GetProtectionRunStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection run stats default response a status code equal to that given -func (o *GetProtectionRunStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection run stats default response -func (o *GetProtectionRunStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/stats][%d] GetProtectionRunStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/{runId}/stats][%d] GetProtectionRunStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionRunStatsDefault) 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_runs_parameters.go b/v2/client/protection_group/get_protection_runs_parameters.go deleted file mode 100644 index 05caf6ab..00000000 --- a/v2/client/protection_group/get_protection_runs_parameters.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunsParams creates a new GetProtectionRunsParams 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 NewGetProtectionRunsParams() *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunsParamsWithTimeout creates a new GetProtectionRunsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunsParamsWithTimeout(timeout time.Duration) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunsParamsWithContext creates a new GetProtectionRunsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunsParamsWithContext(ctx context.Context) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunsParamsWithHTTPClient creates a new GetProtectionRunsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunsParamsWithHTTPClient(client *http.Client) *GetProtectionRunsParams { - return &GetProtectionRunsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunsParams contains all the parameters to send to the API endpoint - - for the get protection runs operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunsParams struct { - - /* EndTimeUsecs. - - End time for time range filter. Specify the end time as a Unix epoch Timestamp (in microseconds), only runs executing before this time will be returned. By default it is current time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* RunStatus. - - Specifies a list of 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.
'Skipped' indicates that the run was skipped. - */ - RunStatus []string - - /* StartTimeUsecs. - - Start time for time range filter. Specify the start time as a Unix epoch Timestamp (in microseconds), only runs executing after this time will be returned. By default it is endTimeUsecs minus an hour. - - Format: int64 - */ - StartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsParams) WithDefaults() *GetProtectionRunsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection runs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection runs params -func (o *GetProtectionRunsParams) WithTimeout(timeout time.Duration) *GetProtectionRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection runs params -func (o *GetProtectionRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection runs params -func (o *GetProtectionRunsParams) WithContext(ctx context.Context) *GetProtectionRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection runs params -func (o *GetProtectionRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection runs params -func (o *GetProtectionRunsParams) WithHTTPClient(client *http.Client) *GetProtectionRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection runs params -func (o *GetProtectionRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionRunsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithRunStatus adds the runStatus to the get protection runs params -func (o *GetProtectionRunsParams) WithRunStatus(runStatus []string) *GetProtectionRunsParams { - o.SetRunStatus(runStatus) - return o -} - -// SetRunStatus adds the runStatus to the get protection runs params -func (o *GetProtectionRunsParams) SetRunStatus(runStatus []string) { - o.RunStatus = runStatus -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionRunsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection runs params -func (o *GetProtectionRunsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.RunStatus != nil { - - // binding items for runStatus - joinedRunStatus := o.bindParamRunStatus(reg) - - // query array param runStatus - if err := r.SetQueryParam("runStatus", joinedRunStatus...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionRuns binds the parameter runStatus -func (o *GetProtectionRunsParams) bindParamRunStatus(formats strfmt.Registry) []string { - runStatusIR := o.RunStatus - - var runStatusIC []string - for _, runStatusIIR := range runStatusIR { // explode []string - - runStatusIIV := runStatusIIR // string as string - runStatusIC = append(runStatusIC, runStatusIIV) - } - - // items.CollectionFormat: "" - runStatusIS := swag.JoinByFormat(runStatusIC, "") - - return runStatusIS -} diff --git a/v2/client/protection_group/get_protection_runs_responses.go b/v2/client/protection_group/get_protection_runs_responses.go deleted file mode 100644 index 0214bb38..00000000 --- a/v2/client/protection_group/get_protection_runs_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionRunsReader is a Reader for the GetProtectionRuns structure. -type GetProtectionRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunsDefault(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 - } -} - -// NewGetProtectionRunsOK creates a GetProtectionRunsOK with default headers values -func NewGetProtectionRunsOK() *GetProtectionRunsOK { - return &GetProtectionRunsOK{} -} - -/* -GetProtectionRunsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunsOK struct { - Payload *models.ProtectionRunsSummary -} - -// IsSuccess returns true when this get protection runs o k response has a 2xx status code -func (o *GetProtectionRunsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection runs o k response has a 3xx status code -func (o *GetProtectionRunsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection runs o k response has a 4xx status code -func (o *GetProtectionRunsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection runs o k response has a 5xx status code -func (o *GetProtectionRunsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection runs o k response a status code equal to that given -func (o *GetProtectionRunsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection runs o k response -func (o *GetProtectionRunsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/summary][%d] getProtectionRunsOK %s", 200, payload) -} - -func (o *GetProtectionRunsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/summary][%d] getProtectionRunsOK %s", 200, payload) -} - -func (o *GetProtectionRunsOK) GetPayload() *models.ProtectionRunsSummary { - return o.Payload -} - -func (o *GetProtectionRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionRunsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunsDefault creates a GetProtectionRunsDefault with default headers values -func NewGetProtectionRunsDefault(code int) *GetProtectionRunsDefault { - return &GetProtectionRunsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection runs default response has a 2xx status code -func (o *GetProtectionRunsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection runs default response has a 3xx status code -func (o *GetProtectionRunsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection runs default response has a 4xx status code -func (o *GetProtectionRunsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection runs default response has a 5xx status code -func (o *GetProtectionRunsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection runs default response a status code equal to that given -func (o *GetProtectionRunsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection runs default response -func (o *GetProtectionRunsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/summary][%d] GetProtectionRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/runs/summary][%d] GetProtectionRuns default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionRunsDefault) 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_run_debug_logs_for_object_parameters.go b/v2/client/protection_group/get_run_debug_logs_for_object_parameters.go deleted file mode 100644 index 4298a851..00000000 --- a/v2/client/protection_group/get_run_debug_logs_for_object_parameters.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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" -) - -// NewGetRunDebugLogsForObjectParams creates a new GetRunDebugLogsForObjectParams 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 NewGetRunDebugLogsForObjectParams() *GetRunDebugLogsForObjectParams { - return &GetRunDebugLogsForObjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunDebugLogsForObjectParamsWithTimeout creates a new GetRunDebugLogsForObjectParams object -// with the ability to set a timeout on a request. -func NewGetRunDebugLogsForObjectParamsWithTimeout(timeout time.Duration) *GetRunDebugLogsForObjectParams { - return &GetRunDebugLogsForObjectParams{ - timeout: timeout, - } -} - -// NewGetRunDebugLogsForObjectParamsWithContext creates a new GetRunDebugLogsForObjectParams object -// with the ability to set a context for a request. -func NewGetRunDebugLogsForObjectParamsWithContext(ctx context.Context) *GetRunDebugLogsForObjectParams { - return &GetRunDebugLogsForObjectParams{ - Context: ctx, - } -} - -// NewGetRunDebugLogsForObjectParamsWithHTTPClient creates a new GetRunDebugLogsForObjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRunDebugLogsForObjectParamsWithHTTPClient(client *http.Client) *GetRunDebugLogsForObjectParams { - return &GetRunDebugLogsForObjectParams{ - HTTPClient: client, - } -} - -/* -GetRunDebugLogsForObjectParams contains all the parameters to send to the API endpoint - - for the get run debug logs for object operation. - - Typically these are written to a http.Request. -*/ -type GetRunDebugLogsForObjectParams struct { - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* ObjectID. - - Specifies the id of the object for which debug logs are to be returned. - */ - ObjectID string - - /* RunID. - - Specifies a unique run id of the Protection Group run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get run debug logs for object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunDebugLogsForObjectParams) WithDefaults() *GetRunDebugLogsForObjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get run debug logs for object params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunDebugLogsForObjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithTimeout(timeout time.Duration) *GetRunDebugLogsForObjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithContext(ctx context.Context) *GetRunDebugLogsForObjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithHTTPClient(client *http.Client) *GetRunDebugLogsForObjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithID(id string) *GetRunDebugLogsForObjectParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetID(id string) { - o.ID = id -} - -// WithObjectID adds the objectID to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithObjectID(objectID string) *GetRunDebugLogsForObjectParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetObjectID(objectID string) { - o.ObjectID = objectID -} - -// WithRunID adds the runID to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) WithRunID(runID string) *GetRunDebugLogsForObjectParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get run debug logs for object params -func (o *GetRunDebugLogsForObjectParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunDebugLogsForObjectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param objectId - if err := r.SetPathParam("objectId", o.ObjectID); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/get_run_debug_logs_for_object_responses.go b/v2/client/protection_group/get_run_debug_logs_for_object_responses.go deleted file mode 100644 index 9d76cc4a..00000000 --- a/v2/client/protection_group/get_run_debug_logs_for_object_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRunDebugLogsForObjectReader is a Reader for the GetRunDebugLogsForObject structure. -type GetRunDebugLogsForObjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunDebugLogsForObjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRunDebugLogsForObjectOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRunDebugLogsForObjectDefault(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 - } -} - -// NewGetRunDebugLogsForObjectOK creates a GetRunDebugLogsForObjectOK with default headers values -func NewGetRunDebugLogsForObjectOK() *GetRunDebugLogsForObjectOK { - return &GetRunDebugLogsForObjectOK{} -} - -/* -GetRunDebugLogsForObjectOK describes a response with status code 200, with default header values. - -No Content -*/ -type GetRunDebugLogsForObjectOK struct { -} - -// IsSuccess returns true when this get run debug logs for object o k response has a 2xx status code -func (o *GetRunDebugLogsForObjectOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get run debug logs for object o k response has a 3xx status code -func (o *GetRunDebugLogsForObjectOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get run debug logs for object o k response has a 4xx status code -func (o *GetRunDebugLogsForObjectOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get run debug logs for object o k response has a 5xx status code -func (o *GetRunDebugLogsForObjectOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get run debug logs for object o k response a status code equal to that given -func (o *GetRunDebugLogsForObjectOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get run debug logs for object o k response -func (o *GetRunDebugLogsForObjectOK) Code() int { - return 200 -} - -func (o *GetRunDebugLogsForObjectOK) Error() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/debug-logs][%d] getRunDebugLogsForObjectOK", 200) -} - -func (o *GetRunDebugLogsForObjectOK) String() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/debug-logs][%d] getRunDebugLogsForObjectOK", 200) -} - -func (o *GetRunDebugLogsForObjectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRunDebugLogsForObjectDefault creates a GetRunDebugLogsForObjectDefault with default headers values -func NewGetRunDebugLogsForObjectDefault(code int) *GetRunDebugLogsForObjectDefault { - return &GetRunDebugLogsForObjectDefault{ - _statusCode: code, - } -} - -/* -GetRunDebugLogsForObjectDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRunDebugLogsForObjectDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get run debug logs for object default response has a 2xx status code -func (o *GetRunDebugLogsForObjectDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get run debug logs for object default response has a 3xx status code -func (o *GetRunDebugLogsForObjectDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get run debug logs for object default response has a 4xx status code -func (o *GetRunDebugLogsForObjectDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get run debug logs for object default response has a 5xx status code -func (o *GetRunDebugLogsForObjectDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get run debug logs for object default response a status code equal to that given -func (o *GetRunDebugLogsForObjectDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get run debug logs for object default response -func (o *GetRunDebugLogsForObjectDefault) Code() int { - return o._statusCode -} - -func (o *GetRunDebugLogsForObjectDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/debug-logs][%d] GetRunDebugLogsForObject default %s", o._statusCode, payload) -} - -func (o *GetRunDebugLogsForObjectDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/debug-logs][%d] GetRunDebugLogsForObject default %s", o._statusCode, payload) -} - -func (o *GetRunDebugLogsForObjectDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRunDebugLogsForObjectDefault) 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_run_debug_logs_parameters.go b/v2/client/protection_group/get_run_debug_logs_parameters.go deleted file mode 100644 index b7d26d0b..00000000 --- a/v2/client/protection_group/get_run_debug_logs_parameters.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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" -) - -// NewGetRunDebugLogsParams creates a new GetRunDebugLogsParams 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 NewGetRunDebugLogsParams() *GetRunDebugLogsParams { - return &GetRunDebugLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunDebugLogsParamsWithTimeout creates a new GetRunDebugLogsParams object -// with the ability to set a timeout on a request. -func NewGetRunDebugLogsParamsWithTimeout(timeout time.Duration) *GetRunDebugLogsParams { - return &GetRunDebugLogsParams{ - timeout: timeout, - } -} - -// NewGetRunDebugLogsParamsWithContext creates a new GetRunDebugLogsParams object -// with the ability to set a context for a request. -func NewGetRunDebugLogsParamsWithContext(ctx context.Context) *GetRunDebugLogsParams { - return &GetRunDebugLogsParams{ - Context: ctx, - } -} - -// NewGetRunDebugLogsParamsWithHTTPClient creates a new GetRunDebugLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRunDebugLogsParamsWithHTTPClient(client *http.Client) *GetRunDebugLogsParams { - return &GetRunDebugLogsParams{ - HTTPClient: client, - } -} - -/* -GetRunDebugLogsParams contains all the parameters to send to the API endpoint - - for the get run debug logs operation. - - Typically these are written to a http.Request. -*/ -type GetRunDebugLogsParams struct { - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* ObjectID. - - Specifies the id of the object for which debug logs are to be returned. - */ - ObjectID *string - - /* RunID. - - Specifies a unique run id of the Protection Group run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get run debug logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunDebugLogsParams) WithDefaults() *GetRunDebugLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get run debug logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunDebugLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get run debug logs params -func (o *GetRunDebugLogsParams) WithTimeout(timeout time.Duration) *GetRunDebugLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get run debug logs params -func (o *GetRunDebugLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get run debug logs params -func (o *GetRunDebugLogsParams) WithContext(ctx context.Context) *GetRunDebugLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get run debug logs params -func (o *GetRunDebugLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get run debug logs params -func (o *GetRunDebugLogsParams) WithHTTPClient(client *http.Client) *GetRunDebugLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get run debug logs params -func (o *GetRunDebugLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get run debug logs params -func (o *GetRunDebugLogsParams) WithID(id string) *GetRunDebugLogsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get run debug logs params -func (o *GetRunDebugLogsParams) SetID(id string) { - o.ID = id -} - -// WithObjectID adds the objectID to the get run debug logs params -func (o *GetRunDebugLogsParams) WithObjectID(objectID *string) *GetRunDebugLogsParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get run debug logs params -func (o *GetRunDebugLogsParams) SetObjectID(objectID *string) { - o.ObjectID = objectID -} - -// WithRunID adds the runID to the get run debug logs params -func (o *GetRunDebugLogsParams) WithRunID(runID string) *GetRunDebugLogsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get run debug logs params -func (o *GetRunDebugLogsParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunDebugLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.ObjectID != nil { - - // query param objectId - var qrObjectID string - - if o.ObjectID != nil { - qrObjectID = *o.ObjectID - } - qObjectID := qrObjectID - if qObjectID != "" { - - if err := r.SetQueryParam("objectId", qObjectID); err != nil { - return err - } - } - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/get_run_debug_logs_responses.go b/v2/client/protection_group/get_run_debug_logs_responses.go deleted file mode 100644 index 96061791..00000000 --- a/v2/client/protection_group/get_run_debug_logs_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRunDebugLogsReader is a Reader for the GetRunDebugLogs structure. -type GetRunDebugLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunDebugLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRunDebugLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRunDebugLogsDefault(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 - } -} - -// NewGetRunDebugLogsOK creates a GetRunDebugLogsOK with default headers values -func NewGetRunDebugLogsOK() *GetRunDebugLogsOK { - return &GetRunDebugLogsOK{} -} - -/* -GetRunDebugLogsOK describes a response with status code 200, with default header values. - -No Content -*/ -type GetRunDebugLogsOK struct { -} - -// IsSuccess returns true when this get run debug logs o k response has a 2xx status code -func (o *GetRunDebugLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get run debug logs o k response has a 3xx status code -func (o *GetRunDebugLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get run debug logs o k response has a 4xx status code -func (o *GetRunDebugLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get run debug logs o k response has a 5xx status code -func (o *GetRunDebugLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get run debug logs o k response a status code equal to that given -func (o *GetRunDebugLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get run debug logs o k response -func (o *GetRunDebugLogsOK) Code() int { - return 200 -} - -func (o *GetRunDebugLogsOK) Error() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/debug-logs][%d] getRunDebugLogsOK", 200) -} - -func (o *GetRunDebugLogsOK) String() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/debug-logs][%d] getRunDebugLogsOK", 200) -} - -func (o *GetRunDebugLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRunDebugLogsDefault creates a GetRunDebugLogsDefault with default headers values -func NewGetRunDebugLogsDefault(code int) *GetRunDebugLogsDefault { - return &GetRunDebugLogsDefault{ - _statusCode: code, - } -} - -/* -GetRunDebugLogsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRunDebugLogsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get run debug logs default response has a 2xx status code -func (o *GetRunDebugLogsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get run debug logs default response has a 3xx status code -func (o *GetRunDebugLogsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get run debug logs default response has a 4xx status code -func (o *GetRunDebugLogsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get run debug logs default response has a 5xx status code -func (o *GetRunDebugLogsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get run debug logs default response a status code equal to that given -func (o *GetRunDebugLogsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get run debug logs default response -func (o *GetRunDebugLogsDefault) Code() int { - return o._statusCode -} - -func (o *GetRunDebugLogsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/debug-logs][%d] GetRunDebugLogs default %s", o._statusCode, payload) -} - -func (o *GetRunDebugLogsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/debug-logs][%d] GetRunDebugLogs default %s", o._statusCode, payload) -} - -func (o *GetRunDebugLogsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRunDebugLogsDefault) 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_run_errors_report_parameters.go b/v2/client/protection_group/get_run_errors_report_parameters.go deleted file mode 100644 index 4932a8a1..00000000 --- a/v2/client/protection_group/get_run_errors_report_parameters.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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" -) - -// NewGetRunErrorsReportParams creates a new GetRunErrorsReportParams 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 NewGetRunErrorsReportParams() *GetRunErrorsReportParams { - return &GetRunErrorsReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunErrorsReportParamsWithTimeout creates a new GetRunErrorsReportParams object -// with the ability to set a timeout on a request. -func NewGetRunErrorsReportParamsWithTimeout(timeout time.Duration) *GetRunErrorsReportParams { - return &GetRunErrorsReportParams{ - timeout: timeout, - } -} - -// NewGetRunErrorsReportParamsWithContext creates a new GetRunErrorsReportParams object -// with the ability to set a context for a request. -func NewGetRunErrorsReportParamsWithContext(ctx context.Context) *GetRunErrorsReportParams { - return &GetRunErrorsReportParams{ - Context: ctx, - } -} - -// NewGetRunErrorsReportParamsWithHTTPClient creates a new GetRunErrorsReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRunErrorsReportParamsWithHTTPClient(client *http.Client) *GetRunErrorsReportParams { - return &GetRunErrorsReportParams{ - HTTPClient: client, - } -} - -/* -GetRunErrorsReportParams contains all the parameters to send to the API endpoint - - for the get run errors report operation. - - Typically these are written to a http.Request. -*/ -type GetRunErrorsReportParams struct { - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* ObjectID. - - Specifies the id of the object for which errors/warnings are to be returned. - */ - ObjectID string - - /* RunID. - - Specifies a unique run id of the Protection Group run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get run errors report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunErrorsReportParams) WithDefaults() *GetRunErrorsReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get run errors report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunErrorsReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get run errors report params -func (o *GetRunErrorsReportParams) WithTimeout(timeout time.Duration) *GetRunErrorsReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get run errors report params -func (o *GetRunErrorsReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get run errors report params -func (o *GetRunErrorsReportParams) WithContext(ctx context.Context) *GetRunErrorsReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get run errors report params -func (o *GetRunErrorsReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get run errors report params -func (o *GetRunErrorsReportParams) WithHTTPClient(client *http.Client) *GetRunErrorsReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get run errors report params -func (o *GetRunErrorsReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get run errors report params -func (o *GetRunErrorsReportParams) WithID(id string) *GetRunErrorsReportParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get run errors report params -func (o *GetRunErrorsReportParams) SetID(id string) { - o.ID = id -} - -// WithObjectID adds the objectID to the get run errors report params -func (o *GetRunErrorsReportParams) WithObjectID(objectID string) *GetRunErrorsReportParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get run errors report params -func (o *GetRunErrorsReportParams) SetObjectID(objectID string) { - o.ObjectID = objectID -} - -// WithRunID adds the runID to the get run errors report params -func (o *GetRunErrorsReportParams) WithRunID(runID string) *GetRunErrorsReportParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get run errors report params -func (o *GetRunErrorsReportParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunErrorsReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param objectId - if err := r.SetPathParam("objectId", o.ObjectID); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/get_run_errors_report_responses.go b/v2/client/protection_group/get_run_errors_report_responses.go deleted file mode 100644 index 88b245da..00000000 --- a/v2/client/protection_group/get_run_errors_report_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRunErrorsReportReader is a Reader for the GetRunErrorsReport structure. -type GetRunErrorsReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunErrorsReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRunErrorsReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRunErrorsReportDefault(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 - } -} - -// NewGetRunErrorsReportOK creates a GetRunErrorsReportOK with default headers values -func NewGetRunErrorsReportOK() *GetRunErrorsReportOK { - return &GetRunErrorsReportOK{} -} - -/* -GetRunErrorsReportOK describes a response with status code 200, with default header values. - -OK -*/ -type GetRunErrorsReportOK struct { -} - -// IsSuccess returns true when this get run errors report o k response has a 2xx status code -func (o *GetRunErrorsReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get run errors report o k response has a 3xx status code -func (o *GetRunErrorsReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get run errors report o k response has a 4xx status code -func (o *GetRunErrorsReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get run errors report o k response has a 5xx status code -func (o *GetRunErrorsReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get run errors report o k response a status code equal to that given -func (o *GetRunErrorsReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get run errors report o k response -func (o *GetRunErrorsReportOK) Code() int { - return 200 -} - -func (o *GetRunErrorsReportOK) Error() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/download-messages][%d] getRunErrorsReportOK", 200) -} - -func (o *GetRunErrorsReportOK) String() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/download-messages][%d] getRunErrorsReportOK", 200) -} - -func (o *GetRunErrorsReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRunErrorsReportDefault creates a GetRunErrorsReportDefault with default headers values -func NewGetRunErrorsReportDefault(code int) *GetRunErrorsReportDefault { - return &GetRunErrorsReportDefault{ - _statusCode: code, - } -} - -/* -GetRunErrorsReportDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRunErrorsReportDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get run errors report default response has a 2xx status code -func (o *GetRunErrorsReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get run errors report default response has a 3xx status code -func (o *GetRunErrorsReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get run errors report default response has a 4xx status code -func (o *GetRunErrorsReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get run errors report default response has a 5xx status code -func (o *GetRunErrorsReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get run errors report default response a status code equal to that given -func (o *GetRunErrorsReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get run errors report default response -func (o *GetRunErrorsReportDefault) Code() int { - return o._statusCode -} - -func (o *GetRunErrorsReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/download-messages][%d] GetRunErrorsReport default %s", o._statusCode, payload) -} - -func (o *GetRunErrorsReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/download-messages][%d] GetRunErrorsReport default %s", o._statusCode, payload) -} - -func (o *GetRunErrorsReportDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRunErrorsReportDefault) 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_runs_report_parameters.go b/v2/client/protection_group/get_runs_report_parameters.go deleted file mode 100644 index 115af4e6..00000000 --- a/v2/client/protection_group/get_runs_report_parameters.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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" -) - -// NewGetRunsReportParams creates a new GetRunsReportParams 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 NewGetRunsReportParams() *GetRunsReportParams { - return &GetRunsReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunsReportParamsWithTimeout creates a new GetRunsReportParams object -// with the ability to set a timeout on a request. -func NewGetRunsReportParamsWithTimeout(timeout time.Duration) *GetRunsReportParams { - return &GetRunsReportParams{ - timeout: timeout, - } -} - -// NewGetRunsReportParamsWithContext creates a new GetRunsReportParams object -// with the ability to set a context for a request. -func NewGetRunsReportParamsWithContext(ctx context.Context) *GetRunsReportParams { - return &GetRunsReportParams{ - Context: ctx, - } -} - -// NewGetRunsReportParamsWithHTTPClient creates a new GetRunsReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRunsReportParamsWithHTTPClient(client *http.Client) *GetRunsReportParams { - return &GetRunsReportParams{ - HTTPClient: client, - } -} - -/* -GetRunsReportParams contains all the parameters to send to the API endpoint - - for the get runs report operation. - - Typically these are written to a http.Request. -*/ -type GetRunsReportParams struct { - - /* FileType. - - Specifies the downloaded type, i.e: success_files_list, default: success_files_list - */ - FileType *string - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - /* Name. - - Specifies the name of the source being backed up - */ - Name *string - - /* ObjectID. - - Specifies the id of the object for which errors/warnings are to be returned. - */ - ObjectID string - - /* RunID. - - Specifies a unique run id of the Protection Group run. - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get runs report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunsReportParams) WithDefaults() *GetRunsReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get runs report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRunsReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get runs report params -func (o *GetRunsReportParams) WithTimeout(timeout time.Duration) *GetRunsReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get runs report params -func (o *GetRunsReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get runs report params -func (o *GetRunsReportParams) WithContext(ctx context.Context) *GetRunsReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get runs report params -func (o *GetRunsReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get runs report params -func (o *GetRunsReportParams) WithHTTPClient(client *http.Client) *GetRunsReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get runs report params -func (o *GetRunsReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFileType adds the fileType to the get runs report params -func (o *GetRunsReportParams) WithFileType(fileType *string) *GetRunsReportParams { - o.SetFileType(fileType) - return o -} - -// SetFileType adds the fileType to the get runs report params -func (o *GetRunsReportParams) SetFileType(fileType *string) { - o.FileType = fileType -} - -// WithID adds the id to the get runs report params -func (o *GetRunsReportParams) WithID(id string) *GetRunsReportParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get runs report params -func (o *GetRunsReportParams) SetID(id string) { - o.ID = id -} - -// WithName adds the name to the get runs report params -func (o *GetRunsReportParams) WithName(name *string) *GetRunsReportParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get runs report params -func (o *GetRunsReportParams) SetName(name *string) { - o.Name = name -} - -// WithObjectID adds the objectID to the get runs report params -func (o *GetRunsReportParams) WithObjectID(objectID string) *GetRunsReportParams { - o.SetObjectID(objectID) - return o -} - -// SetObjectID adds the objectId to the get runs report params -func (o *GetRunsReportParams) SetObjectID(objectID string) { - o.ObjectID = objectID -} - -// WithRunID adds the runID to the get runs report params -func (o *GetRunsReportParams) WithRunID(runID string) *GetRunsReportParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get runs report params -func (o *GetRunsReportParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunsReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FileType != nil { - - // query param fileType - var qrFileType string - - if o.FileType != nil { - qrFileType = *o.FileType - } - qFileType := qrFileType - if qFileType != "" { - - if err := r.SetQueryParam("fileType", qFileType); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - // path param objectId - if err := r.SetPathParam("objectId", o.ObjectID); err != nil { - return err - } - - // path param runId - if err := r.SetPathParam("runId", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/get_runs_report_responses.go b/v2/client/protection_group/get_runs_report_responses.go deleted file mode 100644 index 25c6ab85..00000000 --- a/v2/client/protection_group/get_runs_report_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRunsReportReader is a Reader for the GetRunsReport structure. -type GetRunsReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunsReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRunsReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRunsReportDefault(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 - } -} - -// NewGetRunsReportOK creates a GetRunsReportOK with default headers values -func NewGetRunsReportOK() *GetRunsReportOK { - return &GetRunsReportOK{} -} - -/* -GetRunsReportOK describes a response with status code 200, with default header values. - -OK -*/ -type GetRunsReportOK struct { -} - -// IsSuccess returns true when this get runs report o k response has a 2xx status code -func (o *GetRunsReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get runs report o k response has a 3xx status code -func (o *GetRunsReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get runs report o k response has a 4xx status code -func (o *GetRunsReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get runs report o k response has a 5xx status code -func (o *GetRunsReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get runs report o k response a status code equal to that given -func (o *GetRunsReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get runs report o k response -func (o *GetRunsReportOK) Code() int { - return 200 -} - -func (o *GetRunsReportOK) Error() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/downloadFiles][%d] getRunsReportOK", 200) -} - -func (o *GetRunsReportOK) String() string { - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/downloadFiles][%d] getRunsReportOK", 200) -} - -func (o *GetRunsReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRunsReportDefault creates a GetRunsReportDefault with default headers values -func NewGetRunsReportDefault(code int) *GetRunsReportDefault { - return &GetRunsReportDefault{ - _statusCode: code, - } -} - -/* -GetRunsReportDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRunsReportDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get runs report default response has a 2xx status code -func (o *GetRunsReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get runs report default response has a 3xx status code -func (o *GetRunsReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get runs report default response has a 4xx status code -func (o *GetRunsReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get runs report default response has a 5xx status code -func (o *GetRunsReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get runs report default response a status code equal to that given -func (o *GetRunsReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get runs report default response -func (o *GetRunsReportDefault) Code() int { - return o._statusCode -} - -func (o *GetRunsReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/downloadFiles][%d] GetRunsReport default %s", o._statusCode, payload) -} - -func (o *GetRunsReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/downloadFiles][%d] GetRunsReport default %s", o._statusCode, payload) -} - -func (o *GetRunsReportDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRunsReportDefault) 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/perform_action_on_protection_group_run_parameters.go b/v2/client/protection_group/perform_action_on_protection_group_run_parameters.go deleted file mode 100644 index 19a74aeb..00000000 --- a/v2/client/protection_group/perform_action_on_protection_group_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformActionOnProtectionGroupRunParams creates a new PerformActionOnProtectionGroupRunParams 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 NewPerformActionOnProtectionGroupRunParams() *PerformActionOnProtectionGroupRunParams { - return &PerformActionOnProtectionGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformActionOnProtectionGroupRunParamsWithTimeout creates a new PerformActionOnProtectionGroupRunParams object -// with the ability to set a timeout on a request. -func NewPerformActionOnProtectionGroupRunParamsWithTimeout(timeout time.Duration) *PerformActionOnProtectionGroupRunParams { - return &PerformActionOnProtectionGroupRunParams{ - timeout: timeout, - } -} - -// NewPerformActionOnProtectionGroupRunParamsWithContext creates a new PerformActionOnProtectionGroupRunParams object -// with the ability to set a context for a request. -func NewPerformActionOnProtectionGroupRunParamsWithContext(ctx context.Context) *PerformActionOnProtectionGroupRunParams { - return &PerformActionOnProtectionGroupRunParams{ - Context: ctx, - } -} - -// NewPerformActionOnProtectionGroupRunParamsWithHTTPClient creates a new PerformActionOnProtectionGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformActionOnProtectionGroupRunParamsWithHTTPClient(client *http.Client) *PerformActionOnProtectionGroupRunParams { - return &PerformActionOnProtectionGroupRunParams{ - HTTPClient: client, - } -} - -/* -PerformActionOnProtectionGroupRunParams contains all the parameters to send to the API endpoint - - for the perform action on protection group run operation. - - Typically these are written to a http.Request. -*/ -type PerformActionOnProtectionGroupRunParams struct { - - /* Body. - - Specifies the parameters to perform an action on a protection run. - */ - Body *models.PerformActionOnProtectionGroupRunRequest - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform action on protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnProtectionGroupRunParams) WithDefaults() *PerformActionOnProtectionGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform action on protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformActionOnProtectionGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) WithTimeout(timeout time.Duration) *PerformActionOnProtectionGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) WithContext(ctx context.Context) *PerformActionOnProtectionGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) WithHTTPClient(client *http.Client) *PerformActionOnProtectionGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) WithBody(body *models.PerformActionOnProtectionGroupRunRequest) *PerformActionOnProtectionGroupRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) SetBody(body *models.PerformActionOnProtectionGroupRunRequest) { - o.Body = body -} - -// WithID adds the id to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) WithID(id string) *PerformActionOnProtectionGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the perform action on protection group run params -func (o *PerformActionOnProtectionGroupRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformActionOnProtectionGroupRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/perform_action_on_protection_group_run_responses.go b/v2/client/protection_group/perform_action_on_protection_group_run_responses.go deleted file mode 100644 index ee18743b..00000000 --- a/v2/client/protection_group/perform_action_on_protection_group_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformActionOnProtectionGroupRunReader is a Reader for the PerformActionOnProtectionGroupRun structure. -type PerformActionOnProtectionGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformActionOnProtectionGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 202: - result := NewPerformActionOnProtectionGroupRunAccepted() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformActionOnProtectionGroupRunDefault(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 - } -} - -// NewPerformActionOnProtectionGroupRunAccepted creates a PerformActionOnProtectionGroupRunAccepted with default headers values -func NewPerformActionOnProtectionGroupRunAccepted() *PerformActionOnProtectionGroupRunAccepted { - return &PerformActionOnProtectionGroupRunAccepted{} -} - -/* -PerformActionOnProtectionGroupRunAccepted describes a response with status code 202, with default header values. - -Accepted -*/ -type PerformActionOnProtectionGroupRunAccepted struct { - Payload *models.PerformRunActionResponse -} - -// IsSuccess returns true when this perform action on protection group run accepted response has a 2xx status code -func (o *PerformActionOnProtectionGroupRunAccepted) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform action on protection group run accepted response has a 3xx status code -func (o *PerformActionOnProtectionGroupRunAccepted) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform action on protection group run accepted response has a 4xx status code -func (o *PerformActionOnProtectionGroupRunAccepted) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform action on protection group run accepted response has a 5xx status code -func (o *PerformActionOnProtectionGroupRunAccepted) IsServerError() bool { - return false -} - -// IsCode returns true when this perform action on protection group run accepted response a status code equal to that given -func (o *PerformActionOnProtectionGroupRunAccepted) IsCode(code int) bool { - return code == 202 -} - -// Code gets the status code for the perform action on protection group run accepted response -func (o *PerformActionOnProtectionGroupRunAccepted) Code() int { - return 202 -} - -func (o *PerformActionOnProtectionGroupRunAccepted) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs/actions][%d] performActionOnProtectionGroupRunAccepted %s", 202, payload) -} - -func (o *PerformActionOnProtectionGroupRunAccepted) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs/actions][%d] performActionOnProtectionGroupRunAccepted %s", 202, payload) -} - -func (o *PerformActionOnProtectionGroupRunAccepted) GetPayload() *models.PerformRunActionResponse { - return o.Payload -} - -func (o *PerformActionOnProtectionGroupRunAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.PerformRunActionResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPerformActionOnProtectionGroupRunDefault creates a PerformActionOnProtectionGroupRunDefault with default headers values -func NewPerformActionOnProtectionGroupRunDefault(code int) *PerformActionOnProtectionGroupRunDefault { - return &PerformActionOnProtectionGroupRunDefault{ - _statusCode: code, - } -} - -/* -PerformActionOnProtectionGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformActionOnProtectionGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform action on protection group run default response has a 2xx status code -func (o *PerformActionOnProtectionGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform action on protection group run default response has a 3xx status code -func (o *PerformActionOnProtectionGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform action on protection group run default response has a 4xx status code -func (o *PerformActionOnProtectionGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform action on protection group run default response has a 5xx status code -func (o *PerformActionOnProtectionGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform action on protection group run default response a status code equal to that given -func (o *PerformActionOnProtectionGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform action on protection group run default response -func (o *PerformActionOnProtectionGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *PerformActionOnProtectionGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs/actions][%d] PerformActionOnProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *PerformActionOnProtectionGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/{id}/runs/actions][%d] PerformActionOnProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *PerformActionOnProtectionGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformActionOnProtectionGroupRunDefault) 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/protection_group_client.go b/v2/client/protection_group/protection_group_client.go deleted file mode 100644 index 93dc428a..00000000 --- a/v2/client/protection_group/protection_group_client.go +++ /dev/null @@ -1,819 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new protection group API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new protection group API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new protection group API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for protection group API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateProtectionGroup(params *CreateProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionGroupCreated, error) - - CreateProtectionGroupRun(params *CreateProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionGroupRunAccepted, error) - - DeleteProtectionGroup(params *DeleteProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionGroupNoContent, error) - - GetProtectionGroupByID(params *GetProtectionGroupByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupByIDOK, error) - - GetProtectionGroupRun(params *GetProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupRunOK, error) - - GetProtectionGroupRuns(params *GetProtectionGroupRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupRunsOK, error) - - GetProtectionGroups(params *GetProtectionGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupsOK, error) - - GetProtectionRunProgress(params *GetProtectionRunProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunProgressOK, error) - - GetProtectionRunStats(params *GetProtectionRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunStatsOK, error) - - GetProtectionRuns(params *GetProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsOK, error) - - GetRunDebugLogs(params *GetRunDebugLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunDebugLogsOK, error) - - GetRunDebugLogsForObject(params *GetRunDebugLogsForObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunDebugLogsForObjectOK, error) - - GetRunErrorsReport(params *GetRunErrorsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunErrorsReportOK, error) - - GetRunsReport(params *GetRunsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunsReportOK, error) - - PerformActionOnProtectionGroupRun(params *PerformActionOnProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnProtectionGroupRunAccepted, error) - - UpdateProtectionGroup(params *UpdateProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupOK, error) - - UpdateProtectionGroupRun(params *UpdateProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupRunMultiStatus, error) - - UpdateProtectionGroupsState(params *UpdateProtectionGroupsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupsStateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateProtectionGroup creates a protection group - -Create a Protection Group. -*/ -func (a *Client) CreateProtectionGroup(params *CreateProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateProtectionGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateProtectionGroup", - Method: "POST", - PathPattern: "/data-protect/protection-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateProtectionGroupReader{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.(*CreateProtectionGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateProtectionGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateProtectionGroupRun creates a new protection run - -Create a new protection run. This can be used to start a run for a Protection Group on demand, ignoring the schedule and retention specified in the protection policy. -*/ -func (a *Client) CreateProtectionGroupRun(params *CreateProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProtectionGroupRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateProtectionGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "CreateProtectionGroupRun", - Method: "POST", - PathPattern: "/data-protect/protection-groups/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateProtectionGroupRunReader{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.(*CreateProtectionGroupRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateProtectionGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteProtectionGroup deletes a protection group - -Returns Success if the Protection Group is deleted. -*/ -func (a *Client) DeleteProtectionGroup(params *DeleteProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteProtectionGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteProtectionGroup", - Method: "DELETE", - PathPattern: "/data-protect/protection-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteProtectionGroupReader{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.(*DeleteProtectionGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteProtectionGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionGroupByID lists details about single protection group - -Returns the Protection Group corresponding to the specified Group id. -*/ -func (a *Client) GetProtectionGroupByID(params *GetProtectionGroupByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionGroupByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionGroupById", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionGroupByIDReader{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.(*GetProtectionGroupByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionGroupByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionGroupRun gets a run for a protection group - -Get a run for a particular Protection Group. -*/ -func (a *Client) GetProtectionGroupRun(params *GetProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupRunOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionGroupRun", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs/{runId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionGroupRunReader{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.(*GetProtectionGroupRunOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionGroupRuns gets the list of runs for a protection group - -Get the runs for a particular Protection Group. -*/ -func (a *Client) GetProtectionGroupRuns(params *GetProtectionGroupRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionGroupRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionGroupRuns", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionGroupRunsReader{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.(*GetProtectionGroupRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionGroupRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionGroups gets the list of protection groups - -Get the list of Protection Groups. -*/ -func (a *Client) GetProtectionGroups(params *GetProtectionGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionGroups", - Method: "GET", - PathPattern: "/data-protect/protection-groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionGroupsReader{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.(*GetProtectionGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionRunProgress gets the progress of a run - -Get the progress of a run. -*/ -func (a *Client) GetProtectionRunProgress(params *GetProtectionRunProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunProgressOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunProgressParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRunProgress", - Method: "GET", - PathPattern: "/data-protect/runs/{runId}/progress", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunProgressReader{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.(*GetProtectionRunProgressOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunProgressDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionRunStats gets the stats for a run - -Get the stats for a run. -*/ -func (a *Client) GetProtectionRunStats(params *GetProtectionRunStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRunStats", - Method: "GET", - PathPattern: "/data-protect/runs/{runId}/stats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunStatsReader{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.(*GetProtectionRunStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionRuns gets the list of runs - -Get a list of protection runs. -*/ -func (a *Client) GetProtectionRuns(params *GetProtectionRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRuns", - Method: "GET", - PathPattern: "/data-protect/runs/summary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunsReader{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.(*GetProtectionRunsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRunDebugLogs gets the debug logs for a run from a protection group - -Get the debug logs for all objects of a run for a particular Protection Group. -*/ -func (a *Client) GetRunDebugLogs(params *GetRunDebugLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunDebugLogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRunDebugLogsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRunDebugLogs", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs/{runId}/debug-logs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRunDebugLogsReader{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.(*GetRunDebugLogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRunDebugLogsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRunDebugLogsForObject gets the debug logs for a particular object in a run from a protection group - -Get the debug logs for a particular object of a run for a particular Protection Group. -*/ -func (a *Client) GetRunDebugLogsForObject(params *GetRunDebugLogsForObjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunDebugLogsForObjectOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRunDebugLogsForObjectParams() - } - op := &runtime.ClientOperation{ - ID: "GetRunDebugLogsForObject", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/debug-logs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRunDebugLogsForObjectReader{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.(*GetRunDebugLogsForObjectOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRunDebugLogsForObjectDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRunErrorsReport gets the c s v of errors warnings for a given run and an object - -Get an CSV error report for given objectId and run id. Each row in CSV report contains the File Path, error/warning code and error/warning message. -*/ -func (a *Client) GetRunErrorsReport(params *GetRunErrorsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunErrorsReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRunErrorsReportParams() - } - op := &runtime.ClientOperation{ - ID: "GetRunErrorsReport", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/download-messages", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRunErrorsReportReader{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.(*GetRunErrorsReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRunErrorsReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRunsReport gets the c s v of errors warnings for a given run and an object - -Get an CSV report for given objectId and run id. Report will depend on the query parameter fileType, default will be: success_files_list where each row contains the name of file backedup successfully. -*/ -func (a *Client) GetRunsReport(params *GetRunsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRunsReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRunsReportParams() - } - op := &runtime.ClientOperation{ - ID: "GetRunsReport", - Method: "GET", - PathPattern: "/data-protect/protection-groups/{id}/runs/{runId}/objects/{objectId}/downloadFiles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRunsReportReader{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.(*GetRunsReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRunsReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PerformActionOnProtectionGroupRun actions on protection group run - -Perform various actions on a Protection Group run. -*/ -func (a *Client) PerformActionOnProtectionGroupRun(params *PerformActionOnProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformActionOnProtectionGroupRunAccepted, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformActionOnProtectionGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "PerformActionOnProtectionGroupRun", - Method: "POST", - PathPattern: "/data-protect/protection-groups/{id}/runs/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformActionOnProtectionGroupRunReader{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.(*PerformActionOnProtectionGroupRunAccepted) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformActionOnProtectionGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionGroup updates a protection group - -Update the specified Protection Group. -*/ -func (a *Client) UpdateProtectionGroup(params *UpdateProtectionGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionGroup", - Method: "PUT", - PathPattern: "/data-protect/protection-groups/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionGroupReader{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.(*UpdateProtectionGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionGroupRun updates runs for a particular protection group - -Update runs for a particular Protection Group. A user can perform the following actions: 1. Extend or reduce retention of a local, replication and archival snapshots. 2. Can perform resync operation on failed copy snapshots attempts in this Run. 3. Add new replication and archival snapshot targets to the Run. 4. Add or remove legal hold on the snapshots. Only a user with DSO role can perform this operation. 5. Delete the snapshots that were created as a part of this Run. 6. Apply datalock on existing snapshots where a user cannot manually delete snapshots before the expiry time. -*/ -func (a *Client) UpdateProtectionGroupRun(params *UpdateProtectionGroupRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupRunMultiStatus, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionGroupRunParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionGroupRun", - Method: "PUT", - PathPattern: "/data-protect/protection-groups/{id}/runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionGroupRunReader{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.(*UpdateProtectionGroupRunMultiStatus) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionGroupRunDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionGroupsState performs an action like pause resume active deactivate on all specified protection groups - -Perform an action like pause, resume, active, deactivate on all specified Protection Groups. Note that the pause or resume actions will take effect from next Protection Run. Also, user can specify only one type of action on all the Protection Groups. Deactivate and activate actions are independent of pause and resume state. Deactivate and activate actions are useful in case of failover situations. Returns success if the state of all the Protection Groups state is changed successfully. -*/ -func (a *Client) UpdateProtectionGroupsState(params *UpdateProtectionGroupsStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionGroupsStateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionGroupsStateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionGroupsState", - Method: "POST", - PathPattern: "/data-protect/protection-groups/states", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionGroupsStateReader{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.(*UpdateProtectionGroupsStateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionGroupsStateDefault) - 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/v2/client/protection_group/update_protection_group_parameters.go b/v2/client/protection_group/update_protection_group_parameters.go deleted file mode 100644 index 08ee81ca..00000000 --- a/v2/client/protection_group/update_protection_group_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectionGroupParams creates a new UpdateProtectionGroupParams 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 NewUpdateProtectionGroupParams() *UpdateProtectionGroupParams { - return &UpdateProtectionGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionGroupParamsWithTimeout creates a new UpdateProtectionGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionGroupParamsWithTimeout(timeout time.Duration) *UpdateProtectionGroupParams { - return &UpdateProtectionGroupParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionGroupParamsWithContext creates a new UpdateProtectionGroupParams object -// with the ability to set a context for a request. -func NewUpdateProtectionGroupParamsWithContext(ctx context.Context) *UpdateProtectionGroupParams { - return &UpdateProtectionGroupParams{ - Context: ctx, - } -} - -// NewUpdateProtectionGroupParamsWithHTTPClient creates a new UpdateProtectionGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionGroupParamsWithHTTPClient(client *http.Client) *UpdateProtectionGroupParams { - return &UpdateProtectionGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionGroupParams contains all the parameters to send to the API endpoint - - for the update protection group operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionGroupParams struct { - - /* Body. - - Specifies the parameters to update a Protection Group. - */ - Body *models.CreateOrUpdateProtectionGroupRequest - - /* ID. - - Specifies the id of the Protection Group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupParams) WithDefaults() *UpdateProtectionGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection group params -func (o *UpdateProtectionGroupParams) WithTimeout(timeout time.Duration) *UpdateProtectionGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection group params -func (o *UpdateProtectionGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection group params -func (o *UpdateProtectionGroupParams) WithContext(ctx context.Context) *UpdateProtectionGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection group params -func (o *UpdateProtectionGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection group params -func (o *UpdateProtectionGroupParams) WithHTTPClient(client *http.Client) *UpdateProtectionGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection group params -func (o *UpdateProtectionGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection group params -func (o *UpdateProtectionGroupParams) WithBody(body *models.CreateOrUpdateProtectionGroupRequest) *UpdateProtectionGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection group params -func (o *UpdateProtectionGroupParams) SetBody(body *models.CreateOrUpdateProtectionGroupRequest) { - o.Body = body -} - -// WithID adds the id to the update protection group params -func (o *UpdateProtectionGroupParams) WithID(id string) *UpdateProtectionGroupParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection group params -func (o *UpdateProtectionGroupParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionGroupParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/update_protection_group_responses.go b/v2/client/protection_group/update_protection_group_responses.go deleted file mode 100644 index 8c5c7eb5..00000000 --- a/v2/client/protection_group/update_protection_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectionGroupReader is a Reader for the UpdateProtectionGroup structure. -type UpdateProtectionGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionGroupDefault(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 - } -} - -// NewUpdateProtectionGroupOK creates a UpdateProtectionGroupOK with default headers values -func NewUpdateProtectionGroupOK() *UpdateProtectionGroupOK { - return &UpdateProtectionGroupOK{} -} - -/* -UpdateProtectionGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionGroupOK struct { - Payload *models.ProtectionGroup -} - -// IsSuccess returns true when this update protection group o k response has a 2xx status code -func (o *UpdateProtectionGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection group o k response has a 3xx status code -func (o *UpdateProtectionGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection group o k response has a 4xx status code -func (o *UpdateProtectionGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection group o k response has a 5xx status code -func (o *UpdateProtectionGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection group o k response a status code equal to that given -func (o *UpdateProtectionGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection group o k response -func (o *UpdateProtectionGroupOK) Code() int { - return 200 -} - -func (o *UpdateProtectionGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}][%d] updateProtectionGroupOK %s", 200, payload) -} - -func (o *UpdateProtectionGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}][%d] updateProtectionGroupOK %s", 200, payload) -} - -func (o *UpdateProtectionGroupOK) GetPayload() *models.ProtectionGroup { - return o.Payload -} - -func (o *UpdateProtectionGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectionGroup) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionGroupDefault creates a UpdateProtectionGroupDefault with default headers values -func NewUpdateProtectionGroupDefault(code int) *UpdateProtectionGroupDefault { - return &UpdateProtectionGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protection group default response has a 2xx status code -func (o *UpdateProtectionGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection group default response has a 3xx status code -func (o *UpdateProtectionGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection group default response has a 4xx status code -func (o *UpdateProtectionGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection group default response has a 5xx status code -func (o *UpdateProtectionGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection group default response a status code equal to that given -func (o *UpdateProtectionGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection group default response -func (o *UpdateProtectionGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}][%d] UpdateProtectionGroup default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}][%d] UpdateProtectionGroup default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectionGroupDefault) 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/update_protection_group_run_parameters.go b/v2/client/protection_group/update_protection_group_run_parameters.go deleted file mode 100644 index 030c7375..00000000 --- a/v2/client/protection_group/update_protection_group_run_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectionGroupRunParams creates a new UpdateProtectionGroupRunParams 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 NewUpdateProtectionGroupRunParams() *UpdateProtectionGroupRunParams { - return &UpdateProtectionGroupRunParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionGroupRunParamsWithTimeout creates a new UpdateProtectionGroupRunParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionGroupRunParamsWithTimeout(timeout time.Duration) *UpdateProtectionGroupRunParams { - return &UpdateProtectionGroupRunParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionGroupRunParamsWithContext creates a new UpdateProtectionGroupRunParams object -// with the ability to set a context for a request. -func NewUpdateProtectionGroupRunParamsWithContext(ctx context.Context) *UpdateProtectionGroupRunParams { - return &UpdateProtectionGroupRunParams{ - Context: ctx, - } -} - -// NewUpdateProtectionGroupRunParamsWithHTTPClient creates a new UpdateProtectionGroupRunParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionGroupRunParamsWithHTTPClient(client *http.Client) *UpdateProtectionGroupRunParams { - return &UpdateProtectionGroupRunParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionGroupRunParams contains all the parameters to send to the API endpoint - - for the update protection group run operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionGroupRunParams struct { - - /* Body. - - Specifies the parameters to update a Protection Group Run. - */ - Body *models.UpdateProtectionGroupRunRequestBody - - /* ID. - - Specifies a unique id of the Protection Group. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupRunParams) WithDefaults() *UpdateProtectionGroupRunParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection group run params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupRunParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection group run params -func (o *UpdateProtectionGroupRunParams) WithTimeout(timeout time.Duration) *UpdateProtectionGroupRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection group run params -func (o *UpdateProtectionGroupRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection group run params -func (o *UpdateProtectionGroupRunParams) WithContext(ctx context.Context) *UpdateProtectionGroupRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection group run params -func (o *UpdateProtectionGroupRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection group run params -func (o *UpdateProtectionGroupRunParams) WithHTTPClient(client *http.Client) *UpdateProtectionGroupRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection group run params -func (o *UpdateProtectionGroupRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection group run params -func (o *UpdateProtectionGroupRunParams) WithBody(body *models.UpdateProtectionGroupRunRequestBody) *UpdateProtectionGroupRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection group run params -func (o *UpdateProtectionGroupRunParams) SetBody(body *models.UpdateProtectionGroupRunRequestBody) { - o.Body = body -} - -// WithID adds the id to the update protection group run params -func (o *UpdateProtectionGroupRunParams) WithID(id string) *UpdateProtectionGroupRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection group run params -func (o *UpdateProtectionGroupRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionGroupRunParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/protection_group/update_protection_group_run_responses.go b/v2/client/protection_group/update_protection_group_run_responses.go deleted file mode 100644 index 3a68bdd7..00000000 --- a/v2/client/protection_group/update_protection_group_run_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectionGroupRunReader is a Reader for the UpdateProtectionGroupRun structure. -type UpdateProtectionGroupRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionGroupRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 207: - result := NewUpdateProtectionGroupRunMultiStatus() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionGroupRunDefault(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 - } -} - -// NewUpdateProtectionGroupRunMultiStatus creates a UpdateProtectionGroupRunMultiStatus with default headers values -func NewUpdateProtectionGroupRunMultiStatus() *UpdateProtectionGroupRunMultiStatus { - return &UpdateProtectionGroupRunMultiStatus{} -} - -/* -UpdateProtectionGroupRunMultiStatus describes a response with status code 207, with default header values. - -Success -*/ -type UpdateProtectionGroupRunMultiStatus struct { - Payload *models.UpdateProtectionGroupRunResponseBody -} - -// IsSuccess returns true when this update protection group run multi status response has a 2xx status code -func (o *UpdateProtectionGroupRunMultiStatus) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection group run multi status response has a 3xx status code -func (o *UpdateProtectionGroupRunMultiStatus) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection group run multi status response has a 4xx status code -func (o *UpdateProtectionGroupRunMultiStatus) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection group run multi status response has a 5xx status code -func (o *UpdateProtectionGroupRunMultiStatus) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection group run multi status response a status code equal to that given -func (o *UpdateProtectionGroupRunMultiStatus) IsCode(code int) bool { - return code == 207 -} - -// Code gets the status code for the update protection group run multi status response -func (o *UpdateProtectionGroupRunMultiStatus) Code() int { - return 207 -} - -func (o *UpdateProtectionGroupRunMultiStatus) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}/runs][%d] updateProtectionGroupRunMultiStatus %s", 207, payload) -} - -func (o *UpdateProtectionGroupRunMultiStatus) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}/runs][%d] updateProtectionGroupRunMultiStatus %s", 207, payload) -} - -func (o *UpdateProtectionGroupRunMultiStatus) GetPayload() *models.UpdateProtectionGroupRunResponseBody { - return o.Payload -} - -func (o *UpdateProtectionGroupRunMultiStatus) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateProtectionGroupRunResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionGroupRunDefault creates a UpdateProtectionGroupRunDefault with default headers values -func NewUpdateProtectionGroupRunDefault(code int) *UpdateProtectionGroupRunDefault { - return &UpdateProtectionGroupRunDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionGroupRunDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionGroupRunDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protection group run default response has a 2xx status code -func (o *UpdateProtectionGroupRunDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection group run default response has a 3xx status code -func (o *UpdateProtectionGroupRunDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection group run default response has a 4xx status code -func (o *UpdateProtectionGroupRunDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection group run default response has a 5xx status code -func (o *UpdateProtectionGroupRunDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection group run default response a status code equal to that given -func (o *UpdateProtectionGroupRunDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection group run default response -func (o *UpdateProtectionGroupRunDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionGroupRunDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}/runs][%d] UpdateProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupRunDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/protection-groups/{id}/runs][%d] UpdateProtectionGroupRun default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupRunDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectionGroupRunDefault) 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/update_protection_groups_state_parameters.go b/v2/client/protection_group/update_protection_groups_state_parameters.go deleted file mode 100644 index 76fca071..00000000 --- a/v2/client/protection_group/update_protection_groups_state_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectionGroupsStateParams creates a new UpdateProtectionGroupsStateParams 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 NewUpdateProtectionGroupsStateParams() *UpdateProtectionGroupsStateParams { - return &UpdateProtectionGroupsStateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionGroupsStateParamsWithTimeout creates a new UpdateProtectionGroupsStateParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionGroupsStateParamsWithTimeout(timeout time.Duration) *UpdateProtectionGroupsStateParams { - return &UpdateProtectionGroupsStateParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionGroupsStateParamsWithContext creates a new UpdateProtectionGroupsStateParams object -// with the ability to set a context for a request. -func NewUpdateProtectionGroupsStateParamsWithContext(ctx context.Context) *UpdateProtectionGroupsStateParams { - return &UpdateProtectionGroupsStateParams{ - Context: ctx, - } -} - -// NewUpdateProtectionGroupsStateParamsWithHTTPClient creates a new UpdateProtectionGroupsStateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionGroupsStateParamsWithHTTPClient(client *http.Client) *UpdateProtectionGroupsStateParams { - return &UpdateProtectionGroupsStateParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionGroupsStateParams contains all the parameters to send to the API endpoint - - for the update protection groups state operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionGroupsStateParams struct { - - /* Body. - - Specifies the parameters to perform an action of list of Protection Groups. - */ - Body *models.UpdateProtectionGroupsStateRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection groups state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupsStateParams) WithDefaults() *UpdateProtectionGroupsStateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection groups state params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionGroupsStateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) WithTimeout(timeout time.Duration) *UpdateProtectionGroupsStateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) WithContext(ctx context.Context) *UpdateProtectionGroupsStateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) WithHTTPClient(client *http.Client) *UpdateProtectionGroupsStateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) WithBody(body *models.UpdateProtectionGroupsStateRequest) *UpdateProtectionGroupsStateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection groups state params -func (o *UpdateProtectionGroupsStateParams) SetBody(body *models.UpdateProtectionGroupsStateRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionGroupsStateParams) 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/protection_group/update_protection_groups_state_responses.go b/v2/client/protection_group/update_protection_groups_state_responses.go deleted file mode 100644 index 15433fda..00000000 --- a/v2/client/protection_group/update_protection_groups_state_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package protection_group - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectionGroupsStateReader is a Reader for the UpdateProtectionGroupsState structure. -type UpdateProtectionGroupsStateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionGroupsStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionGroupsStateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionGroupsStateDefault(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 - } -} - -// NewUpdateProtectionGroupsStateOK creates a UpdateProtectionGroupsStateOK with default headers values -func NewUpdateProtectionGroupsStateOK() *UpdateProtectionGroupsStateOK { - return &UpdateProtectionGroupsStateOK{} -} - -/* -UpdateProtectionGroupsStateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionGroupsStateOK struct { - Payload *models.UpdateProtectionGroupsState -} - -// IsSuccess returns true when this update protection groups state o k response has a 2xx status code -func (o *UpdateProtectionGroupsStateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection groups state o k response has a 3xx status code -func (o *UpdateProtectionGroupsStateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection groups state o k response has a 4xx status code -func (o *UpdateProtectionGroupsStateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection groups state o k response has a 5xx status code -func (o *UpdateProtectionGroupsStateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection groups state o k response a status code equal to that given -func (o *UpdateProtectionGroupsStateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection groups state o k response -func (o *UpdateProtectionGroupsStateOK) Code() int { - return 200 -} - -func (o *UpdateProtectionGroupsStateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/states][%d] updateProtectionGroupsStateOK %s", 200, payload) -} - -func (o *UpdateProtectionGroupsStateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/states][%d] updateProtectionGroupsStateOK %s", 200, payload) -} - -func (o *UpdateProtectionGroupsStateOK) GetPayload() *models.UpdateProtectionGroupsState { - return o.Payload -} - -func (o *UpdateProtectionGroupsStateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateProtectionGroupsState) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionGroupsStateDefault creates a UpdateProtectionGroupsStateDefault with default headers values -func NewUpdateProtectionGroupsStateDefault(code int) *UpdateProtectionGroupsStateDefault { - return &UpdateProtectionGroupsStateDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionGroupsStateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionGroupsStateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protection groups state default response has a 2xx status code -func (o *UpdateProtectionGroupsStateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection groups state default response has a 3xx status code -func (o *UpdateProtectionGroupsStateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection groups state default response has a 4xx status code -func (o *UpdateProtectionGroupsStateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection groups state default response has a 5xx status code -func (o *UpdateProtectionGroupsStateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection groups state default response a status code equal to that given -func (o *UpdateProtectionGroupsStateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection groups state default response -func (o *UpdateProtectionGroupsStateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionGroupsStateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/states][%d] UpdateProtectionGroupsState default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupsStateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/protection-groups/states][%d] UpdateProtectionGroupsState default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionGroupsStateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectionGroupsStateDefault) 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/recovery/cancel_recovery_by_id_parameters.go b/v2/client/recovery/cancel_recovery_by_id_parameters.go deleted file mode 100644 index 1543f923..00000000 --- a/v2/client/recovery/cancel_recovery_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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" -) - -// NewCancelRecoveryByIDParams creates a new CancelRecoveryByIDParams 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 NewCancelRecoveryByIDParams() *CancelRecoveryByIDParams { - return &CancelRecoveryByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCancelRecoveryByIDParamsWithTimeout creates a new CancelRecoveryByIDParams object -// with the ability to set a timeout on a request. -func NewCancelRecoveryByIDParamsWithTimeout(timeout time.Duration) *CancelRecoveryByIDParams { - return &CancelRecoveryByIDParams{ - timeout: timeout, - } -} - -// NewCancelRecoveryByIDParamsWithContext creates a new CancelRecoveryByIDParams object -// with the ability to set a context for a request. -func NewCancelRecoveryByIDParamsWithContext(ctx context.Context) *CancelRecoveryByIDParams { - return &CancelRecoveryByIDParams{ - Context: ctx, - } -} - -// NewCancelRecoveryByIDParamsWithHTTPClient creates a new CancelRecoveryByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewCancelRecoveryByIDParamsWithHTTPClient(client *http.Client) *CancelRecoveryByIDParams { - return &CancelRecoveryByIDParams{ - HTTPClient: client, - } -} - -/* -CancelRecoveryByIDParams contains all the parameters to send to the API endpoint - - for the cancel recovery by Id operation. - - Typically these are written to a http.Request. -*/ -type CancelRecoveryByIDParams struct { - - /* ID. - - Specifies the id of a Recovery. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the cancel recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelRecoveryByIDParams) WithDefaults() *CancelRecoveryByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the cancel recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CancelRecoveryByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) WithTimeout(timeout time.Duration) *CancelRecoveryByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) WithContext(ctx context.Context) *CancelRecoveryByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) WithHTTPClient(client *http.Client) *CancelRecoveryByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) WithID(id string) *CancelRecoveryByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the cancel recovery by Id params -func (o *CancelRecoveryByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CancelRecoveryByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/cancel_recovery_by_id_responses.go b/v2/client/recovery/cancel_recovery_by_id_responses.go deleted file mode 100644 index d94a50bd..00000000 --- a/v2/client/recovery/cancel_recovery_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CancelRecoveryByIDReader is a Reader for the CancelRecoveryByID structure. -type CancelRecoveryByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CancelRecoveryByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCancelRecoveryByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCancelRecoveryByIDDefault(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 - } -} - -// NewCancelRecoveryByIDNoContent creates a CancelRecoveryByIDNoContent with default headers values -func NewCancelRecoveryByIDNoContent() *CancelRecoveryByIDNoContent { - return &CancelRecoveryByIDNoContent{} -} - -/* -CancelRecoveryByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CancelRecoveryByIDNoContent struct { -} - -// IsSuccess returns true when this cancel recovery by Id no content response has a 2xx status code -func (o *CancelRecoveryByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this cancel recovery by Id no content response has a 3xx status code -func (o *CancelRecoveryByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this cancel recovery by Id no content response has a 4xx status code -func (o *CancelRecoveryByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this cancel recovery by Id no content response has a 5xx status code -func (o *CancelRecoveryByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this cancel recovery by Id no content response a status code equal to that given -func (o *CancelRecoveryByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the cancel recovery by Id no content response -func (o *CancelRecoveryByIDNoContent) Code() int { - return 204 -} - -func (o *CancelRecoveryByIDNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/cancel][%d] cancelRecoveryByIdNoContent", 204) -} - -func (o *CancelRecoveryByIDNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/cancel][%d] cancelRecoveryByIdNoContent", 204) -} - -func (o *CancelRecoveryByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCancelRecoveryByIDDefault creates a CancelRecoveryByIDDefault with default headers values -func NewCancelRecoveryByIDDefault(code int) *CancelRecoveryByIDDefault { - return &CancelRecoveryByIDDefault{ - _statusCode: code, - } -} - -/* -CancelRecoveryByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type CancelRecoveryByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this cancel recovery by Id default response has a 2xx status code -func (o *CancelRecoveryByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this cancel recovery by Id default response has a 3xx status code -func (o *CancelRecoveryByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this cancel recovery by Id default response has a 4xx status code -func (o *CancelRecoveryByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this cancel recovery by Id default response has a 5xx status code -func (o *CancelRecoveryByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this cancel recovery by Id default response a status code equal to that given -func (o *CancelRecoveryByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the cancel recovery by Id default response -func (o *CancelRecoveryByIDDefault) Code() int { - return o._statusCode -} - -func (o *CancelRecoveryByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/cancel][%d] CancelRecoveryById default %s", o._statusCode, payload) -} - -func (o *CancelRecoveryByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/cancel][%d] CancelRecoveryById default %s", o._statusCode, payload) -} - -func (o *CancelRecoveryByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CancelRecoveryByIDDefault) 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/recovery/create_download_files_and_folders_recovery_parameters.go b/v2/client/recovery/create_download_files_and_folders_recovery_parameters.go deleted file mode 100644 index c23f8327..00000000 --- a/v2/client/recovery/create_download_files_and_folders_recovery_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateDownloadFilesAndFoldersRecoveryParams creates a new CreateDownloadFilesAndFoldersRecoveryParams 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 NewCreateDownloadFilesAndFoldersRecoveryParams() *CreateDownloadFilesAndFoldersRecoveryParams { - return &CreateDownloadFilesAndFoldersRecoveryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateDownloadFilesAndFoldersRecoveryParamsWithTimeout creates a new CreateDownloadFilesAndFoldersRecoveryParams object -// with the ability to set a timeout on a request. -func NewCreateDownloadFilesAndFoldersRecoveryParamsWithTimeout(timeout time.Duration) *CreateDownloadFilesAndFoldersRecoveryParams { - return &CreateDownloadFilesAndFoldersRecoveryParams{ - timeout: timeout, - } -} - -// NewCreateDownloadFilesAndFoldersRecoveryParamsWithContext creates a new CreateDownloadFilesAndFoldersRecoveryParams object -// with the ability to set a context for a request. -func NewCreateDownloadFilesAndFoldersRecoveryParamsWithContext(ctx context.Context) *CreateDownloadFilesAndFoldersRecoveryParams { - return &CreateDownloadFilesAndFoldersRecoveryParams{ - Context: ctx, - } -} - -// NewCreateDownloadFilesAndFoldersRecoveryParamsWithHTTPClient creates a new CreateDownloadFilesAndFoldersRecoveryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateDownloadFilesAndFoldersRecoveryParamsWithHTTPClient(client *http.Client) *CreateDownloadFilesAndFoldersRecoveryParams { - return &CreateDownloadFilesAndFoldersRecoveryParams{ - HTTPClient: client, - } -} - -/* -CreateDownloadFilesAndFoldersRecoveryParams contains all the parameters to send to the API endpoint - - for the create download files and folders recovery operation. - - Typically these are written to a http.Request. -*/ -type CreateDownloadFilesAndFoldersRecoveryParams struct { - - /* Body. - - Specifies the parameters to create a download files and folder recovery. - */ - Body *models.DownloadFilesAndFoldersRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create download files and folders recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDownloadFilesAndFoldersRecoveryParams) WithDefaults() *CreateDownloadFilesAndFoldersRecoveryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create download files and folders recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateDownloadFilesAndFoldersRecoveryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) WithTimeout(timeout time.Duration) *CreateDownloadFilesAndFoldersRecoveryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) WithContext(ctx context.Context) *CreateDownloadFilesAndFoldersRecoveryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) WithHTTPClient(client *http.Client) *CreateDownloadFilesAndFoldersRecoveryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) WithBody(body *models.DownloadFilesAndFoldersRequestParams) *CreateDownloadFilesAndFoldersRecoveryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create download files and folders recovery params -func (o *CreateDownloadFilesAndFoldersRecoveryParams) SetBody(body *models.DownloadFilesAndFoldersRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateDownloadFilesAndFoldersRecoveryParams) 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/recovery/create_download_files_and_folders_recovery_responses.go b/v2/client/recovery/create_download_files_and_folders_recovery_responses.go deleted file mode 100644 index c6c3287c..00000000 --- a/v2/client/recovery/create_download_files_and_folders_recovery_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateDownloadFilesAndFoldersRecoveryReader is a Reader for the CreateDownloadFilesAndFoldersRecovery structure. -type CreateDownloadFilesAndFoldersRecoveryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateDownloadFilesAndFoldersRecoveryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateDownloadFilesAndFoldersRecoveryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateDownloadFilesAndFoldersRecoveryDefault(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 - } -} - -// NewCreateDownloadFilesAndFoldersRecoveryCreated creates a CreateDownloadFilesAndFoldersRecoveryCreated with default headers values -func NewCreateDownloadFilesAndFoldersRecoveryCreated() *CreateDownloadFilesAndFoldersRecoveryCreated { - return &CreateDownloadFilesAndFoldersRecoveryCreated{} -} - -/* -CreateDownloadFilesAndFoldersRecoveryCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateDownloadFilesAndFoldersRecoveryCreated struct { - Payload *models.Recovery -} - -// IsSuccess returns true when this create download files and folders recovery created response has a 2xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create download files and folders recovery created response has a 3xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create download files and folders recovery created response has a 4xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create download files and folders recovery created response has a 5xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create download files and folders recovery created response a status code equal to that given -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create download files and folders recovery created response -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) Code() int { - return 201 -} - -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/download-files-folders][%d] createDownloadFilesAndFoldersRecoveryCreated %s", 201, payload) -} - -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/download-files-folders][%d] createDownloadFilesAndFoldersRecoveryCreated %s", 201, payload) -} - -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) GetPayload() *models.Recovery { - return o.Payload -} - -func (o *CreateDownloadFilesAndFoldersRecoveryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Recovery) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateDownloadFilesAndFoldersRecoveryDefault creates a CreateDownloadFilesAndFoldersRecoveryDefault with default headers values -func NewCreateDownloadFilesAndFoldersRecoveryDefault(code int) *CreateDownloadFilesAndFoldersRecoveryDefault { - return &CreateDownloadFilesAndFoldersRecoveryDefault{ - _statusCode: code, - } -} - -/* -CreateDownloadFilesAndFoldersRecoveryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateDownloadFilesAndFoldersRecoveryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create download files and folders recovery default response has a 2xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create download files and folders recovery default response has a 3xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create download files and folders recovery default response has a 4xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create download files and folders recovery default response has a 5xx status code -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create download files and folders recovery default response a status code equal to that given -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create download files and folders recovery default response -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) Code() int { - return o._statusCode -} - -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/download-files-folders][%d] CreateDownloadFilesAndFoldersRecovery default %s", o._statusCode, payload) -} - -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/download-files-folders][%d] CreateDownloadFilesAndFoldersRecovery default %s", o._statusCode, payload) -} - -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateDownloadFilesAndFoldersRecoveryDefault) 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/recovery/create_recovery_parameters.go b/v2/client/recovery/create_recovery_parameters.go deleted file mode 100644 index d139d20b..00000000 --- a/v2/client/recovery/create_recovery_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateRecoveryParams creates a new CreateRecoveryParams 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 NewCreateRecoveryParams() *CreateRecoveryParams { - return &CreateRecoveryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRecoveryParamsWithTimeout creates a new CreateRecoveryParams object -// with the ability to set a timeout on a request. -func NewCreateRecoveryParamsWithTimeout(timeout time.Duration) *CreateRecoveryParams { - return &CreateRecoveryParams{ - timeout: timeout, - } -} - -// NewCreateRecoveryParamsWithContext creates a new CreateRecoveryParams object -// with the ability to set a context for a request. -func NewCreateRecoveryParamsWithContext(ctx context.Context) *CreateRecoveryParams { - return &CreateRecoveryParams{ - Context: ctx, - } -} - -// NewCreateRecoveryParamsWithHTTPClient creates a new CreateRecoveryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRecoveryParamsWithHTTPClient(client *http.Client) *CreateRecoveryParams { - return &CreateRecoveryParams{ - HTTPClient: client, - } -} - -/* -CreateRecoveryParams contains all the parameters to send to the API endpoint - - for the create recovery operation. - - Typically these are written to a http.Request. -*/ -type CreateRecoveryParams struct { - - /* Body. - - Specifies the parameters to create a Recovery. - */ - Body *models.CreateRecoveryRequest - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRecoveryParams) WithDefaults() *CreateRecoveryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRecoveryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create recovery params -func (o *CreateRecoveryParams) WithTimeout(timeout time.Duration) *CreateRecoveryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create recovery params -func (o *CreateRecoveryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create recovery params -func (o *CreateRecoveryParams) WithContext(ctx context.Context) *CreateRecoveryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create recovery params -func (o *CreateRecoveryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create recovery params -func (o *CreateRecoveryParams) WithHTTPClient(client *http.Client) *CreateRecoveryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create recovery params -func (o *CreateRecoveryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create recovery params -func (o *CreateRecoveryParams) WithBody(body *models.CreateRecoveryRequest) *CreateRecoveryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create recovery params -func (o *CreateRecoveryParams) SetBody(body *models.CreateRecoveryRequest) { - o.Body = body -} - -// WithRequestInitiatorType adds the requestInitiatorType to the create recovery params -func (o *CreateRecoveryParams) WithRequestInitiatorType(requestInitiatorType *string) *CreateRecoveryParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the create recovery params -func (o *CreateRecoveryParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRecoveryParams) 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 o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/create_recovery_responses.go b/v2/client/recovery/create_recovery_responses.go deleted file mode 100644 index d4f1a7c3..00000000 --- a/v2/client/recovery/create_recovery_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateRecoveryReader is a Reader for the CreateRecovery structure. -type CreateRecoveryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRecoveryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRecoveryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRecoveryDefault(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 - } -} - -// NewCreateRecoveryCreated creates a CreateRecoveryCreated with default headers values -func NewCreateRecoveryCreated() *CreateRecoveryCreated { - return &CreateRecoveryCreated{} -} - -/* -CreateRecoveryCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRecoveryCreated struct { - Payload *models.Recovery -} - -// IsSuccess returns true when this create recovery created response has a 2xx status code -func (o *CreateRecoveryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create recovery created response has a 3xx status code -func (o *CreateRecoveryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create recovery created response has a 4xx status code -func (o *CreateRecoveryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create recovery created response has a 5xx status code -func (o *CreateRecoveryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create recovery created response a status code equal to that given -func (o *CreateRecoveryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create recovery created response -func (o *CreateRecoveryCreated) Code() int { - return 201 -} - -func (o *CreateRecoveryCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries][%d] createRecoveryCreated %s", 201, payload) -} - -func (o *CreateRecoveryCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries][%d] createRecoveryCreated %s", 201, payload) -} - -func (o *CreateRecoveryCreated) GetPayload() *models.Recovery { - return o.Payload -} - -func (o *CreateRecoveryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Recovery) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRecoveryDefault creates a CreateRecoveryDefault with default headers values -func NewCreateRecoveryDefault(code int) *CreateRecoveryDefault { - return &CreateRecoveryDefault{ - _statusCode: code, - } -} - -/* -CreateRecoveryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRecoveryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create recovery default response has a 2xx status code -func (o *CreateRecoveryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create recovery default response has a 3xx status code -func (o *CreateRecoveryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create recovery default response has a 4xx status code -func (o *CreateRecoveryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create recovery default response has a 5xx status code -func (o *CreateRecoveryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create recovery default response a status code equal to that given -func (o *CreateRecoveryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create recovery default response -func (o *CreateRecoveryDefault) Code() int { - return o._statusCode -} - -func (o *CreateRecoveryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries][%d] CreateRecovery default %s", o._statusCode, payload) -} - -func (o *CreateRecoveryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries][%d] CreateRecovery default %s", o._statusCode, payload) -} - -func (o *CreateRecoveryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateRecoveryDefault) 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/recovery/download_files_from_recovery_parameters.go b/v2/client/recovery/download_files_from_recovery_parameters.go deleted file mode 100644 index 5dbc6560..00000000 --- a/v2/client/recovery/download_files_from_recovery_parameters.go +++ /dev/null @@ -1,360 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/go-openapi/swag" -) - -// NewDownloadFilesFromRecoveryParams creates a new DownloadFilesFromRecoveryParams 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 NewDownloadFilesFromRecoveryParams() *DownloadFilesFromRecoveryParams { - return &DownloadFilesFromRecoveryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadFilesFromRecoveryParamsWithTimeout creates a new DownloadFilesFromRecoveryParams object -// with the ability to set a timeout on a request. -func NewDownloadFilesFromRecoveryParamsWithTimeout(timeout time.Duration) *DownloadFilesFromRecoveryParams { - return &DownloadFilesFromRecoveryParams{ - timeout: timeout, - } -} - -// NewDownloadFilesFromRecoveryParamsWithContext creates a new DownloadFilesFromRecoveryParams object -// with the ability to set a context for a request. -func NewDownloadFilesFromRecoveryParamsWithContext(ctx context.Context) *DownloadFilesFromRecoveryParams { - return &DownloadFilesFromRecoveryParams{ - Context: ctx, - } -} - -// NewDownloadFilesFromRecoveryParamsWithHTTPClient creates a new DownloadFilesFromRecoveryParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadFilesFromRecoveryParamsWithHTTPClient(client *http.Client) *DownloadFilesFromRecoveryParams { - return &DownloadFilesFromRecoveryParams{ - HTTPClient: client, - } -} - -/* -DownloadFilesFromRecoveryParams contains all the parameters to send to the API endpoint - - for the download files from recovery operation. - - Typically these are written to a http.Request. -*/ -type DownloadFilesFromRecoveryParams struct { - - /* FileType. - - Specifies the downloaded type, i.e: error, success_files_list - */ - FileType *string - - /* ID. - - Specifies the id of a Recovery. - */ - ID string - - /* IncludeTenants. - - Specifies if objects of all the organizations under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* Length. - - Specifies the length of bytes to download. This can not be greater than 8MB (8388608 byets) - - Format: int64 - */ - Length *int64 - - /* SourceName. - - Specifies the name of the source on which restore is done - */ - SourceName *string - - /* StartOffset. - - Specifies the start offset of file chunk to be downloaded. - - Format: int64 - */ - StartOffset *int64 - - /* StartTime. - - Specifies the start time of restore task - */ - StartTime *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download files from recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadFilesFromRecoveryParams) WithDefaults() *DownloadFilesFromRecoveryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download files from recovery params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadFilesFromRecoveryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithTimeout(timeout time.Duration) *DownloadFilesFromRecoveryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithContext(ctx context.Context) *DownloadFilesFromRecoveryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithHTTPClient(client *http.Client) *DownloadFilesFromRecoveryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFileType adds the fileType to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithFileType(fileType *string) *DownloadFilesFromRecoveryParams { - o.SetFileType(fileType) - return o -} - -// SetFileType adds the fileType to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetFileType(fileType *string) { - o.FileType = fileType -} - -// WithID adds the id to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithID(id string) *DownloadFilesFromRecoveryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetID(id string) { - o.ID = id -} - -// WithIncludeTenants adds the includeTenants to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithIncludeTenants(includeTenants *bool) *DownloadFilesFromRecoveryParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithLength adds the length to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithLength(length *int64) *DownloadFilesFromRecoveryParams { - o.SetLength(length) - return o -} - -// SetLength adds the length to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetLength(length *int64) { - o.Length = length -} - -// WithSourceName adds the sourceName to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithSourceName(sourceName *string) *DownloadFilesFromRecoveryParams { - o.SetSourceName(sourceName) - return o -} - -// SetSourceName adds the sourceName to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetSourceName(sourceName *string) { - o.SourceName = sourceName -} - -// WithStartOffset adds the startOffset to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithStartOffset(startOffset *int64) *DownloadFilesFromRecoveryParams { - o.SetStartOffset(startOffset) - return o -} - -// SetStartOffset adds the startOffset to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetStartOffset(startOffset *int64) { - o.StartOffset = startOffset -} - -// WithStartTime adds the startTime to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) WithStartTime(startTime *string) *DownloadFilesFromRecoveryParams { - o.SetStartTime(startTime) - return o -} - -// SetStartTime adds the startTime to the download files from recovery params -func (o *DownloadFilesFromRecoveryParams) SetStartTime(startTime *string) { - o.StartTime = startTime -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadFilesFromRecoveryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FileType != nil { - - // query param fileType - var qrFileType string - - if o.FileType != nil { - qrFileType = *o.FileType - } - qFileType := qrFileType - if qFileType != "" { - - if err := r.SetQueryParam("fileType", qFileType); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); 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.Length != nil { - - // query param length - var qrLength int64 - - if o.Length != nil { - qrLength = *o.Length - } - qLength := swag.FormatInt64(qrLength) - if qLength != "" { - - if err := r.SetQueryParam("length", qLength); err != nil { - return err - } - } - } - - if o.SourceName != nil { - - // query param sourceName - var qrSourceName string - - if o.SourceName != nil { - qrSourceName = *o.SourceName - } - qSourceName := qrSourceName - if qSourceName != "" { - - if err := r.SetQueryParam("sourceName", qSourceName); err != nil { - return err - } - } - } - - if o.StartOffset != nil { - - // query param startOffset - var qrStartOffset int64 - - if o.StartOffset != nil { - qrStartOffset = *o.StartOffset - } - qStartOffset := swag.FormatInt64(qrStartOffset) - if qStartOffset != "" { - - if err := r.SetQueryParam("startOffset", qStartOffset); err != nil { - return err - } - } - } - - if o.StartTime != nil { - - // query param startTime - var qrStartTime string - - if o.StartTime != nil { - qrStartTime = *o.StartTime - } - qStartTime := qrStartTime - if qStartTime != "" { - - if err := r.SetQueryParam("startTime", qStartTime); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/download_files_from_recovery_responses.go b/v2/client/recovery/download_files_from_recovery_responses.go deleted file mode 100644 index f1989e42..00000000 --- a/v2/client/recovery/download_files_from_recovery_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DownloadFilesFromRecoveryReader is a Reader for the DownloadFilesFromRecovery structure. -type DownloadFilesFromRecoveryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadFilesFromRecoveryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadFilesFromRecoveryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadFilesFromRecoveryDefault(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 - } -} - -// NewDownloadFilesFromRecoveryOK creates a DownloadFilesFromRecoveryOK with default headers values -func NewDownloadFilesFromRecoveryOK() *DownloadFilesFromRecoveryOK { - return &DownloadFilesFromRecoveryOK{} -} - -/* -DownloadFilesFromRecoveryOK describes a response with status code 200, with default header values. - -No Content -*/ -type DownloadFilesFromRecoveryOK struct { -} - -// IsSuccess returns true when this download files from recovery o k response has a 2xx status code -func (o *DownloadFilesFromRecoveryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download files from recovery o k response has a 3xx status code -func (o *DownloadFilesFromRecoveryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download files from recovery o k response has a 4xx status code -func (o *DownloadFilesFromRecoveryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download files from recovery o k response has a 5xx status code -func (o *DownloadFilesFromRecoveryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download files from recovery o k response a status code equal to that given -func (o *DownloadFilesFromRecoveryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download files from recovery o k response -func (o *DownloadFilesFromRecoveryOK) Code() int { - return 200 -} - -func (o *DownloadFilesFromRecoveryOK) Error() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-files][%d] downloadFilesFromRecoveryOK", 200) -} - -func (o *DownloadFilesFromRecoveryOK) String() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-files][%d] downloadFilesFromRecoveryOK", 200) -} - -func (o *DownloadFilesFromRecoveryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDownloadFilesFromRecoveryDefault creates a DownloadFilesFromRecoveryDefault with default headers values -func NewDownloadFilesFromRecoveryDefault(code int) *DownloadFilesFromRecoveryDefault { - return &DownloadFilesFromRecoveryDefault{ - _statusCode: code, - } -} - -/* -DownloadFilesFromRecoveryDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadFilesFromRecoveryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this download files from recovery default response has a 2xx status code -func (o *DownloadFilesFromRecoveryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download files from recovery default response has a 3xx status code -func (o *DownloadFilesFromRecoveryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download files from recovery default response has a 4xx status code -func (o *DownloadFilesFromRecoveryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download files from recovery default response has a 5xx status code -func (o *DownloadFilesFromRecoveryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download files from recovery default response a status code equal to that given -func (o *DownloadFilesFromRecoveryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download files from recovery default response -func (o *DownloadFilesFromRecoveryDefault) Code() int { - return o._statusCode -} - -func (o *DownloadFilesFromRecoveryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-files][%d] DownloadFilesFromRecovery default %s", o._statusCode, payload) -} - -func (o *DownloadFilesFromRecoveryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-files][%d] DownloadFilesFromRecovery default %s", o._statusCode, payload) -} - -func (o *DownloadFilesFromRecoveryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DownloadFilesFromRecoveryDefault) 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/recovery/download_indexed_file_parameters.go b/v2/client/recovery/download_indexed_file_parameters.go deleted file mode 100644 index 79c734f2..00000000 --- a/v2/client/recovery/download_indexed_file_parameters.go +++ /dev/null @@ -1,328 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/go-openapi/swag" -) - -// NewDownloadIndexedFileParams creates a new DownloadIndexedFileParams 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 NewDownloadIndexedFileParams() *DownloadIndexedFileParams { - return &DownloadIndexedFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadIndexedFileParamsWithTimeout creates a new DownloadIndexedFileParams object -// with the ability to set a timeout on a request. -func NewDownloadIndexedFileParamsWithTimeout(timeout time.Duration) *DownloadIndexedFileParams { - return &DownloadIndexedFileParams{ - timeout: timeout, - } -} - -// NewDownloadIndexedFileParamsWithContext creates a new DownloadIndexedFileParams object -// with the ability to set a context for a request. -func NewDownloadIndexedFileParamsWithContext(ctx context.Context) *DownloadIndexedFileParams { - return &DownloadIndexedFileParams{ - Context: ctx, - } -} - -// NewDownloadIndexedFileParamsWithHTTPClient creates a new DownloadIndexedFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadIndexedFileParamsWithHTTPClient(client *http.Client) *DownloadIndexedFileParams { - return &DownloadIndexedFileParams{ - HTTPClient: client, - } -} - -/* -DownloadIndexedFileParams contains all the parameters to send to the API endpoint - - for the download indexed file operation. - - Typically these are written to a http.Request. -*/ -type DownloadIndexedFileParams struct { - - /* FilePath. - - Specifies the path to the file to download. If no path is specified and snapshot environment is kVMWare, VMX file for VMware will be downloaded. For other snapshot environments, this field must be specified. - */ - FilePath *string - - /* Length. - - Specifies the length of bytes to download. This can not be greater than 8MB (8388608 byets) - - Format: int64 - */ - Length *int64 - - /* NvramFile. - - Specifies if NVRAM file for VMware should be downloaded. - */ - NvramFile *bool - - /* RetryAttempt. - - Specifies the number of attempts the protection run took to create this file. - - Format: int64 - */ - RetryAttempt *int64 - - /* SnapshotsID. - - Specifies the snapshot id to download from. - */ - SnapshotsID string - - /* StartOffset. - - Specifies the start offset of file chunk to be downloaded. - - Format: int64 - */ - StartOffset *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download indexed file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadIndexedFileParams) WithDefaults() *DownloadIndexedFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download indexed file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadIndexedFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download indexed file params -func (o *DownloadIndexedFileParams) WithTimeout(timeout time.Duration) *DownloadIndexedFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download indexed file params -func (o *DownloadIndexedFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download indexed file params -func (o *DownloadIndexedFileParams) WithContext(ctx context.Context) *DownloadIndexedFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download indexed file params -func (o *DownloadIndexedFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download indexed file params -func (o *DownloadIndexedFileParams) WithHTTPClient(client *http.Client) *DownloadIndexedFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download indexed file params -func (o *DownloadIndexedFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilePath adds the filePath to the download indexed file params -func (o *DownloadIndexedFileParams) WithFilePath(filePath *string) *DownloadIndexedFileParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the download indexed file params -func (o *DownloadIndexedFileParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithLength adds the length to the download indexed file params -func (o *DownloadIndexedFileParams) WithLength(length *int64) *DownloadIndexedFileParams { - o.SetLength(length) - return o -} - -// SetLength adds the length to the download indexed file params -func (o *DownloadIndexedFileParams) SetLength(length *int64) { - o.Length = length -} - -// WithNvramFile adds the nvramFile to the download indexed file params -func (o *DownloadIndexedFileParams) WithNvramFile(nvramFile *bool) *DownloadIndexedFileParams { - o.SetNvramFile(nvramFile) - return o -} - -// SetNvramFile adds the nvramFile to the download indexed file params -func (o *DownloadIndexedFileParams) SetNvramFile(nvramFile *bool) { - o.NvramFile = nvramFile -} - -// WithRetryAttempt adds the retryAttempt to the download indexed file params -func (o *DownloadIndexedFileParams) WithRetryAttempt(retryAttempt *int64) *DownloadIndexedFileParams { - o.SetRetryAttempt(retryAttempt) - return o -} - -// SetRetryAttempt adds the retryAttempt to the download indexed file params -func (o *DownloadIndexedFileParams) SetRetryAttempt(retryAttempt *int64) { - o.RetryAttempt = retryAttempt -} - -// WithSnapshotsID adds the snapshotsID to the download indexed file params -func (o *DownloadIndexedFileParams) WithSnapshotsID(snapshotsID string) *DownloadIndexedFileParams { - o.SetSnapshotsID(snapshotsID) - return o -} - -// SetSnapshotsID adds the snapshotsId to the download indexed file params -func (o *DownloadIndexedFileParams) SetSnapshotsID(snapshotsID string) { - o.SnapshotsID = snapshotsID -} - -// WithStartOffset adds the startOffset to the download indexed file params -func (o *DownloadIndexedFileParams) WithStartOffset(startOffset *int64) *DownloadIndexedFileParams { - o.SetStartOffset(startOffset) - return o -} - -// SetStartOffset adds the startOffset to the download indexed file params -func (o *DownloadIndexedFileParams) SetStartOffset(startOffset *int64) { - o.StartOffset = startOffset -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadIndexedFileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.Length != nil { - - // query param length - var qrLength int64 - - if o.Length != nil { - qrLength = *o.Length - } - qLength := swag.FormatInt64(qrLength) - if qLength != "" { - - if err := r.SetQueryParam("length", qLength); err != nil { - return err - } - } - } - - if o.NvramFile != nil { - - // query param nvramFile - var qrNvramFile bool - - if o.NvramFile != nil { - qrNvramFile = *o.NvramFile - } - qNvramFile := swag.FormatBool(qrNvramFile) - if qNvramFile != "" { - - if err := r.SetQueryParam("nvramFile", qNvramFile); err != nil { - return err - } - } - } - - if o.RetryAttempt != nil { - - // query param retryAttempt - var qrRetryAttempt int64 - - if o.RetryAttempt != nil { - qrRetryAttempt = *o.RetryAttempt - } - qRetryAttempt := swag.FormatInt64(qrRetryAttempt) - if qRetryAttempt != "" { - - if err := r.SetQueryParam("retryAttempt", qRetryAttempt); err != nil { - return err - } - } - } - - // path param snapshotsId - if err := r.SetPathParam("snapshotsId", o.SnapshotsID); err != nil { - return err - } - - if o.StartOffset != nil { - - // query param startOffset - var qrStartOffset int64 - - if o.StartOffset != nil { - qrStartOffset = *o.StartOffset - } - qStartOffset := swag.FormatInt64(qrStartOffset) - if qStartOffset != "" { - - if err := r.SetQueryParam("startOffset", qStartOffset); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/download_indexed_file_responses.go b/v2/client/recovery/download_indexed_file_responses.go deleted file mode 100644 index ecf0e6d8..00000000 --- a/v2/client/recovery/download_indexed_file_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DownloadIndexedFileReader is a Reader for the DownloadIndexedFile structure. -type DownloadIndexedFileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadIndexedFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadIndexedFileOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadIndexedFileDefault(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 - } -} - -// NewDownloadIndexedFileOK creates a DownloadIndexedFileOK with default headers values -func NewDownloadIndexedFileOK() *DownloadIndexedFileOK { - return &DownloadIndexedFileOK{} -} - -/* -DownloadIndexedFileOK describes a response with status code 200, with default header values. - -No Content -*/ -type DownloadIndexedFileOK struct { -} - -// IsSuccess returns true when this download indexed file o k response has a 2xx status code -func (o *DownloadIndexedFileOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download indexed file o k response has a 3xx status code -func (o *DownloadIndexedFileOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download indexed file o k response has a 4xx status code -func (o *DownloadIndexedFileOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download indexed file o k response has a 5xx status code -func (o *DownloadIndexedFileOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download indexed file o k response a status code equal to that given -func (o *DownloadIndexedFileOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download indexed file o k response -func (o *DownloadIndexedFileOK) Code() int { - return 200 -} - -func (o *DownloadIndexedFileOK) Error() string { - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotsId}/download-file][%d] downloadIndexedFileOK", 200) -} - -func (o *DownloadIndexedFileOK) String() string { - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotsId}/download-file][%d] downloadIndexedFileOK", 200) -} - -func (o *DownloadIndexedFileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDownloadIndexedFileDefault creates a DownloadIndexedFileDefault with default headers values -func NewDownloadIndexedFileDefault(code int) *DownloadIndexedFileDefault { - return &DownloadIndexedFileDefault{ - _statusCode: code, - } -} - -/* -DownloadIndexedFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadIndexedFileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this download indexed file default response has a 2xx status code -func (o *DownloadIndexedFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download indexed file default response has a 3xx status code -func (o *DownloadIndexedFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download indexed file default response has a 4xx status code -func (o *DownloadIndexedFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download indexed file default response has a 5xx status code -func (o *DownloadIndexedFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download indexed file default response a status code equal to that given -func (o *DownloadIndexedFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download indexed file default response -func (o *DownloadIndexedFileDefault) Code() int { - return o._statusCode -} - -func (o *DownloadIndexedFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotsId}/download-file][%d] DownloadIndexedFile default %s", o._statusCode, payload) -} - -func (o *DownloadIndexedFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/snapshots/{snapshotsId}/download-file][%d] DownloadIndexedFile default %s", o._statusCode, payload) -} - -func (o *DownloadIndexedFileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DownloadIndexedFileDefault) 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/recovery/fetch_uptier_data_parameters.go b/v2/client/recovery/fetch_uptier_data_parameters.go deleted file mode 100644 index 5c0f303a..00000000 --- a/v2/client/recovery/fetch_uptier_data_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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" -) - -// NewFetchUptierDataParams creates a new FetchUptierDataParams 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 NewFetchUptierDataParams() *FetchUptierDataParams { - return &FetchUptierDataParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewFetchUptierDataParamsWithTimeout creates a new FetchUptierDataParams object -// with the ability to set a timeout on a request. -func NewFetchUptierDataParamsWithTimeout(timeout time.Duration) *FetchUptierDataParams { - return &FetchUptierDataParams{ - timeout: timeout, - } -} - -// NewFetchUptierDataParamsWithContext creates a new FetchUptierDataParams object -// with the ability to set a context for a request. -func NewFetchUptierDataParamsWithContext(ctx context.Context) *FetchUptierDataParams { - return &FetchUptierDataParams{ - Context: ctx, - } -} - -// NewFetchUptierDataParamsWithHTTPClient creates a new FetchUptierDataParams object -// with the ability to set a custom HTTPClient for a request. -func NewFetchUptierDataParamsWithHTTPClient(client *http.Client) *FetchUptierDataParams { - return &FetchUptierDataParams{ - HTTPClient: client, - } -} - -/* -FetchUptierDataParams contains all the parameters to send to the API endpoint - - for the fetch uptier data operation. - - Typically these are written to a http.Request. -*/ -type FetchUptierDataParams struct { - - /* ArchiveUID. - - Archive UID of the current restore. - */ - ArchiveUID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the fetch uptier data params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *FetchUptierDataParams) WithDefaults() *FetchUptierDataParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the fetch uptier data params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *FetchUptierDataParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the fetch uptier data params -func (o *FetchUptierDataParams) WithTimeout(timeout time.Duration) *FetchUptierDataParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the fetch uptier data params -func (o *FetchUptierDataParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the fetch uptier data params -func (o *FetchUptierDataParams) WithContext(ctx context.Context) *FetchUptierDataParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the fetch uptier data params -func (o *FetchUptierDataParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the fetch uptier data params -func (o *FetchUptierDataParams) WithHTTPClient(client *http.Client) *FetchUptierDataParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the fetch uptier data params -func (o *FetchUptierDataParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArchiveUID adds the archiveUID to the fetch uptier data params -func (o *FetchUptierDataParams) WithArchiveUID(archiveUID string) *FetchUptierDataParams { - o.SetArchiveUID(archiveUID) - return o -} - -// SetArchiveUID adds the archiveUId to the fetch uptier data params -func (o *FetchUptierDataParams) SetArchiveUID(archiveUID string) { - o.ArchiveUID = archiveUID -} - -// WriteToRequest writes these params to a swagger request -func (o *FetchUptierDataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param archiveUId - qrArchiveUID := o.ArchiveUID - qArchiveUID := qrArchiveUID - if qArchiveUID != "" { - - if err := r.SetQueryParam("archiveUId", qArchiveUID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/fetch_uptier_data_responses.go b/v2/client/recovery/fetch_uptier_data_responses.go deleted file mode 100644 index f8b4b5f7..00000000 --- a/v2/client/recovery/fetch_uptier_data_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// FetchUptierDataReader is a Reader for the FetchUptierData structure. -type FetchUptierDataReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *FetchUptierDataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewFetchUptierDataOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewFetchUptierDataDefault(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 - } -} - -// NewFetchUptierDataOK creates a FetchUptierDataOK with default headers values -func NewFetchUptierDataOK() *FetchUptierDataOK { - return &FetchUptierDataOK{} -} - -/* -FetchUptierDataOK describes a response with status code 200, with default header values. - -Success -*/ -type FetchUptierDataOK struct { - Payload *models.FetchUptierDataResponse -} - -// IsSuccess returns true when this fetch uptier data o k response has a 2xx status code -func (o *FetchUptierDataOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this fetch uptier data o k response has a 3xx status code -func (o *FetchUptierDataOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this fetch uptier data o k response has a 4xx status code -func (o *FetchUptierDataOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this fetch uptier data o k response has a 5xx status code -func (o *FetchUptierDataOK) IsServerError() bool { - return false -} - -// IsCode returns true when this fetch uptier data o k response a status code equal to that given -func (o *FetchUptierDataOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the fetch uptier data o k response -func (o *FetchUptierDataOK) Code() int { - return 200 -} - -func (o *FetchUptierDataOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/fetch-uptier-data][%d] fetchUptierDataOK %s", 200, payload) -} - -func (o *FetchUptierDataOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/fetch-uptier-data][%d] fetchUptierDataOK %s", 200, payload) -} - -func (o *FetchUptierDataOK) GetPayload() *models.FetchUptierDataResponse { - return o.Payload -} - -func (o *FetchUptierDataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FetchUptierDataResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewFetchUptierDataDefault creates a FetchUptierDataDefault with default headers values -func NewFetchUptierDataDefault(code int) *FetchUptierDataDefault { - return &FetchUptierDataDefault{ - _statusCode: code, - } -} - -/* -FetchUptierDataDefault describes a response with status code -1, with default header values. - -Error -*/ -type FetchUptierDataDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this fetch uptier data default response has a 2xx status code -func (o *FetchUptierDataDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this fetch uptier data default response has a 3xx status code -func (o *FetchUptierDataDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this fetch uptier data default response has a 4xx status code -func (o *FetchUptierDataDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this fetch uptier data default response has a 5xx status code -func (o *FetchUptierDataDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this fetch uptier data default response a status code equal to that given -func (o *FetchUptierDataDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the fetch uptier data default response -func (o *FetchUptierDataDefault) Code() int { - return o._statusCode -} - -func (o *FetchUptierDataDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/fetch-uptier-data][%d] FetchUptierData default %s", o._statusCode, payload) -} - -func (o *FetchUptierDataDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/fetch-uptier-data][%d] FetchUptierData default %s", o._statusCode, payload) -} - -func (o *FetchUptierDataDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *FetchUptierDataDefault) 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/recovery/get_recoveries_parameters.go b/v2/client/recovery/get_recoveries_parameters.go deleted file mode 100644 index 70aa9745..00000000 --- a/v2/client/recovery/get_recoveries_parameters.go +++ /dev/null @@ -1,621 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/go-openapi/swag" -) - -// NewGetRecoveriesParams creates a new GetRecoveriesParams 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 NewGetRecoveriesParams() *GetRecoveriesParams { - return &GetRecoveriesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecoveriesParamsWithTimeout creates a new GetRecoveriesParams object -// with the ability to set a timeout on a request. -func NewGetRecoveriesParamsWithTimeout(timeout time.Duration) *GetRecoveriesParams { - return &GetRecoveriesParams{ - timeout: timeout, - } -} - -// NewGetRecoveriesParamsWithContext creates a new GetRecoveriesParams object -// with the ability to set a context for a request. -func NewGetRecoveriesParamsWithContext(ctx context.Context) *GetRecoveriesParams { - return &GetRecoveriesParams{ - Context: ctx, - } -} - -// NewGetRecoveriesParamsWithHTTPClient creates a new GetRecoveriesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecoveriesParamsWithHTTPClient(client *http.Client) *GetRecoveriesParams { - return &GetRecoveriesParams{ - HTTPClient: client, - } -} - -/* -GetRecoveriesParams contains all the parameters to send to the API endpoint - - for the get recoveries operation. - - Typically these are written to a http.Request. -*/ -type GetRecoveriesParams struct { - - /* ArchivalTargetType. - - Specifies the snapshot's archival target type from which recovery has been performed. This parameter applies only if 'snapshotTargetType' is 'Archival'. - */ - ArchivalTargetType []string - - /* EndTimeUsecs. - - Returns the recoveries which are started before the specific time. This value should be in Unix timestamp epoch in microseconds. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* Ids. - - Filter Recoveries for given ids. - */ - Ids []string - - /* IncludeTenants. - - Specifies if objects of all the organizations under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* RecoveryActions. - - Specifies the list of recovery actions to filter Recoveries. If empty, Recoveries related to all actions will be returned. - */ - RecoveryActions []string - - /* ReturnOnlyChildRecoveries. - - Returns only child recoveries if passed as true. This filter should always be used along with 'ids' filter. - */ - ReturnOnlyChildRecoveries *bool - - /* SnapshotEnvironments. - - Specifies the list of snapshot environment types to filter Recoveries. If empty, Recoveries related to all environments will be returned. - */ - SnapshotEnvironments []string - - /* SnapshotTargetType. - - Specifies the snapshot's target type from which recovery has been performed. - */ - SnapshotTargetType []string - - /* StartTimeUsecs. - - Returns the recoveries which are started after the specific time. This value should be in Unix timestamp epoch in microseconds. - - Format: int64 - */ - StartTimeUsecs *int64 - - /* Status. - - Specifies the list of run status to filter Recoveries. If empty, Recoveries with all run status will be returned. - */ - Status []string - - /* StorageDomainID. - - Filter by Storage Domain id. Only recoveries writing data to this Storage Domain will be returned. - - Format: int64 - */ - StorageDomainID *int64 - - /* TenantIds. - - TenantIds contains ids of the organizations for which recoveries are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recoveries params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveriesParams) WithDefaults() *GetRecoveriesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recoveries params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveriesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recoveries params -func (o *GetRecoveriesParams) WithTimeout(timeout time.Duration) *GetRecoveriesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recoveries params -func (o *GetRecoveriesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recoveries params -func (o *GetRecoveriesParams) WithContext(ctx context.Context) *GetRecoveriesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recoveries params -func (o *GetRecoveriesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recoveries params -func (o *GetRecoveriesParams) WithHTTPClient(client *http.Client) *GetRecoveriesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recoveries params -func (o *GetRecoveriesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArchivalTargetType adds the archivalTargetType to the get recoveries params -func (o *GetRecoveriesParams) WithArchivalTargetType(archivalTargetType []string) *GetRecoveriesParams { - o.SetArchivalTargetType(archivalTargetType) - return o -} - -// SetArchivalTargetType adds the archivalTargetType to the get recoveries params -func (o *GetRecoveriesParams) SetArchivalTargetType(archivalTargetType []string) { - o.ArchivalTargetType = archivalTargetType -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get recoveries params -func (o *GetRecoveriesParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetRecoveriesParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get recoveries params -func (o *GetRecoveriesParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithIds adds the ids to the get recoveries params -func (o *GetRecoveriesParams) WithIds(ids []string) *GetRecoveriesParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get recoveries params -func (o *GetRecoveriesParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeTenants adds the includeTenants to the get recoveries params -func (o *GetRecoveriesParams) WithIncludeTenants(includeTenants *bool) *GetRecoveriesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get recoveries params -func (o *GetRecoveriesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithRecoveryActions adds the recoveryActions to the get recoveries params -func (o *GetRecoveriesParams) WithRecoveryActions(recoveryActions []string) *GetRecoveriesParams { - o.SetRecoveryActions(recoveryActions) - return o -} - -// SetRecoveryActions adds the recoveryActions to the get recoveries params -func (o *GetRecoveriesParams) SetRecoveryActions(recoveryActions []string) { - o.RecoveryActions = recoveryActions -} - -// WithReturnOnlyChildRecoveries adds the returnOnlyChildRecoveries to the get recoveries params -func (o *GetRecoveriesParams) WithReturnOnlyChildRecoveries(returnOnlyChildRecoveries *bool) *GetRecoveriesParams { - o.SetReturnOnlyChildRecoveries(returnOnlyChildRecoveries) - return o -} - -// SetReturnOnlyChildRecoveries adds the returnOnlyChildRecoveries to the get recoveries params -func (o *GetRecoveriesParams) SetReturnOnlyChildRecoveries(returnOnlyChildRecoveries *bool) { - o.ReturnOnlyChildRecoveries = returnOnlyChildRecoveries -} - -// WithSnapshotEnvironments adds the snapshotEnvironments to the get recoveries params -func (o *GetRecoveriesParams) WithSnapshotEnvironments(snapshotEnvironments []string) *GetRecoveriesParams { - o.SetSnapshotEnvironments(snapshotEnvironments) - return o -} - -// SetSnapshotEnvironments adds the snapshotEnvironments to the get recoveries params -func (o *GetRecoveriesParams) SetSnapshotEnvironments(snapshotEnvironments []string) { - o.SnapshotEnvironments = snapshotEnvironments -} - -// WithSnapshotTargetType adds the snapshotTargetType to the get recoveries params -func (o *GetRecoveriesParams) WithSnapshotTargetType(snapshotTargetType []string) *GetRecoveriesParams { - o.SetSnapshotTargetType(snapshotTargetType) - return o -} - -// SetSnapshotTargetType adds the snapshotTargetType to the get recoveries params -func (o *GetRecoveriesParams) SetSnapshotTargetType(snapshotTargetType []string) { - o.SnapshotTargetType = snapshotTargetType -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get recoveries params -func (o *GetRecoveriesParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetRecoveriesParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get recoveries params -func (o *GetRecoveriesParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WithStatus adds the status to the get recoveries params -func (o *GetRecoveriesParams) WithStatus(status []string) *GetRecoveriesParams { - o.SetStatus(status) - return o -} - -// SetStatus adds the status to the get recoveries params -func (o *GetRecoveriesParams) SetStatus(status []string) { - o.Status = status -} - -// WithStorageDomainID adds the storageDomainID to the get recoveries params -func (o *GetRecoveriesParams) WithStorageDomainID(storageDomainID *int64) *GetRecoveriesParams { - o.SetStorageDomainID(storageDomainID) - return o -} - -// SetStorageDomainID adds the storageDomainId to the get recoveries params -func (o *GetRecoveriesParams) SetStorageDomainID(storageDomainID *int64) { - o.StorageDomainID = storageDomainID -} - -// WithTenantIds adds the tenantIds to the get recoveries params -func (o *GetRecoveriesParams) WithTenantIds(tenantIds []string) *GetRecoveriesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get recoveries params -func (o *GetRecoveriesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecoveriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ArchivalTargetType != nil { - - // binding items for archivalTargetType - joinedArchivalTargetType := o.bindParamArchivalTargetType(reg) - - // query array param archivalTargetType - if err := r.SetQueryParam("archivalTargetType", joinedArchivalTargetType...); err != nil { - return err - } - } - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); 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.RecoveryActions != nil { - - // binding items for recoveryActions - joinedRecoveryActions := o.bindParamRecoveryActions(reg) - - // query array param recoveryActions - if err := r.SetQueryParam("recoveryActions", joinedRecoveryActions...); err != nil { - return err - } - } - - if o.ReturnOnlyChildRecoveries != nil { - - // query param returnOnlyChildRecoveries - var qrReturnOnlyChildRecoveries bool - - if o.ReturnOnlyChildRecoveries != nil { - qrReturnOnlyChildRecoveries = *o.ReturnOnlyChildRecoveries - } - qReturnOnlyChildRecoveries := swag.FormatBool(qrReturnOnlyChildRecoveries) - if qReturnOnlyChildRecoveries != "" { - - if err := r.SetQueryParam("returnOnlyChildRecoveries", qReturnOnlyChildRecoveries); err != nil { - return err - } - } - } - - if o.SnapshotEnvironments != nil { - - // binding items for snapshotEnvironments - joinedSnapshotEnvironments := o.bindParamSnapshotEnvironments(reg) - - // query array param snapshotEnvironments - if err := r.SetQueryParam("snapshotEnvironments", joinedSnapshotEnvironments...); err != nil { - return err - } - } - - if o.SnapshotTargetType != nil { - - // binding items for snapshotTargetType - joinedSnapshotTargetType := o.bindParamSnapshotTargetType(reg) - - // query array param snapshotTargetType - if err := r.SetQueryParam("snapshotTargetType", joinedSnapshotTargetType...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if o.Status != nil { - - // binding items for status - joinedStatus := o.bindParamStatus(reg) - - // query array param status - if err := r.SetQueryParam("status", joinedStatus...); err != nil { - return err - } - } - - if o.StorageDomainID != nil { - - // query param storageDomainId - var qrStorageDomainID int64 - - if o.StorageDomainID != nil { - qrStorageDomainID = *o.StorageDomainID - } - qStorageDomainID := swag.FormatInt64(qrStorageDomainID) - if qStorageDomainID != "" { - - if err := r.SetQueryParam("storageDomainId", qStorageDomainID); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRecoveries binds the parameter archivalTargetType -func (o *GetRecoveriesParams) bindParamArchivalTargetType(formats strfmt.Registry) []string { - archivalTargetTypeIR := o.ArchivalTargetType - - var archivalTargetTypeIC []string - for _, archivalTargetTypeIIR := range archivalTargetTypeIR { // explode []string - - archivalTargetTypeIIV := archivalTargetTypeIIR // string as string - archivalTargetTypeIC = append(archivalTargetTypeIC, archivalTargetTypeIIV) - } - - // items.CollectionFormat: "" - archivalTargetTypeIS := swag.JoinByFormat(archivalTargetTypeIC, "") - - return archivalTargetTypeIS -} - -// bindParamGetRecoveries binds the parameter ids -func (o *GetRecoveriesParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetRecoveries binds the parameter recoveryActions -func (o *GetRecoveriesParams) bindParamRecoveryActions(formats strfmt.Registry) []string { - recoveryActionsIR := o.RecoveryActions - - var recoveryActionsIC []string - for _, recoveryActionsIIR := range recoveryActionsIR { // explode []string - - recoveryActionsIIV := recoveryActionsIIR // string as string - recoveryActionsIC = append(recoveryActionsIC, recoveryActionsIIV) - } - - // items.CollectionFormat: "" - recoveryActionsIS := swag.JoinByFormat(recoveryActionsIC, "") - - return recoveryActionsIS -} - -// bindParamGetRecoveries binds the parameter snapshotEnvironments -func (o *GetRecoveriesParams) bindParamSnapshotEnvironments(formats strfmt.Registry) []string { - snapshotEnvironmentsIR := o.SnapshotEnvironments - - var snapshotEnvironmentsIC []string - for _, snapshotEnvironmentsIIR := range snapshotEnvironmentsIR { // explode []string - - snapshotEnvironmentsIIV := snapshotEnvironmentsIIR // string as string - snapshotEnvironmentsIC = append(snapshotEnvironmentsIC, snapshotEnvironmentsIIV) - } - - // items.CollectionFormat: "" - snapshotEnvironmentsIS := swag.JoinByFormat(snapshotEnvironmentsIC, "") - - return snapshotEnvironmentsIS -} - -// bindParamGetRecoveries binds the parameter snapshotTargetType -func (o *GetRecoveriesParams) bindParamSnapshotTargetType(formats strfmt.Registry) []string { - snapshotTargetTypeIR := o.SnapshotTargetType - - var snapshotTargetTypeIC []string - for _, snapshotTargetTypeIIR := range snapshotTargetTypeIR { // explode []string - - snapshotTargetTypeIIV := snapshotTargetTypeIIR // string as string - snapshotTargetTypeIC = append(snapshotTargetTypeIC, snapshotTargetTypeIIV) - } - - // items.CollectionFormat: "" - snapshotTargetTypeIS := swag.JoinByFormat(snapshotTargetTypeIC, "") - - return snapshotTargetTypeIS -} - -// bindParamGetRecoveries binds the parameter status -func (o *GetRecoveriesParams) bindParamStatus(formats strfmt.Registry) []string { - statusIR := o.Status - - var statusIC []string - for _, statusIIR := range statusIR { // explode []string - - statusIIV := statusIIR // string as string - statusIC = append(statusIC, statusIIV) - } - - // items.CollectionFormat: "" - statusIS := swag.JoinByFormat(statusIC, "") - - return statusIS -} - -// bindParamGetRecoveries binds the parameter tenantIds -func (o *GetRecoveriesParams) 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/client/recovery/get_recoveries_responses.go b/v2/client/recovery/get_recoveries_responses.go deleted file mode 100644 index 4c4a3e7d..00000000 --- a/v2/client/recovery/get_recoveries_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRecoveriesReader is a Reader for the GetRecoveries structure. -type GetRecoveriesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecoveriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecoveriesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRecoveriesDefault(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 - } -} - -// NewGetRecoveriesOK creates a GetRecoveriesOK with default headers values -func NewGetRecoveriesOK() *GetRecoveriesOK { - return &GetRecoveriesOK{} -} - -/* -GetRecoveriesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRecoveriesOK struct { - Payload *models.Recoveries -} - -// IsSuccess returns true when this get recoveries o k response has a 2xx status code -func (o *GetRecoveriesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recoveries o k response has a 3xx status code -func (o *GetRecoveriesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recoveries o k response has a 4xx status code -func (o *GetRecoveriesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recoveries o k response has a 5xx status code -func (o *GetRecoveriesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recoveries o k response a status code equal to that given -func (o *GetRecoveriesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get recoveries o k response -func (o *GetRecoveriesOK) Code() int { - return 200 -} - -func (o *GetRecoveriesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries][%d] getRecoveriesOK %s", 200, payload) -} - -func (o *GetRecoveriesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries][%d] getRecoveriesOK %s", 200, payload) -} - -func (o *GetRecoveriesOK) GetPayload() *models.Recoveries { - return o.Payload -} - -func (o *GetRecoveriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Recoveries) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRecoveriesDefault creates a GetRecoveriesDefault with default headers values -func NewGetRecoveriesDefault(code int) *GetRecoveriesDefault { - return &GetRecoveriesDefault{ - _statusCode: code, - } -} - -/* -GetRecoveriesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRecoveriesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get recoveries default response has a 2xx status code -func (o *GetRecoveriesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get recoveries default response has a 3xx status code -func (o *GetRecoveriesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get recoveries default response has a 4xx status code -func (o *GetRecoveriesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get recoveries default response has a 5xx status code -func (o *GetRecoveriesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get recoveries default response a status code equal to that given -func (o *GetRecoveriesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get recoveries default response -func (o *GetRecoveriesDefault) Code() int { - return o._statusCode -} - -func (o *GetRecoveriesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries][%d] GetRecoveries default %s", o._statusCode, payload) -} - -func (o *GetRecoveriesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries][%d] GetRecoveries default %s", o._statusCode, payload) -} - -func (o *GetRecoveriesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRecoveriesDefault) 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/recovery/get_recovery_by_id_parameters.go b/v2/client/recovery/get_recovery_by_id_parameters.go deleted file mode 100644 index 31fbf4af..00000000 --- a/v2/client/recovery/get_recovery_by_id_parameters.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/go-openapi/swag" -) - -// NewGetRecoveryByIDParams creates a new GetRecoveryByIDParams 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 NewGetRecoveryByIDParams() *GetRecoveryByIDParams { - return &GetRecoveryByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecoveryByIDParamsWithTimeout creates a new GetRecoveryByIDParams object -// with the ability to set a timeout on a request. -func NewGetRecoveryByIDParamsWithTimeout(timeout time.Duration) *GetRecoveryByIDParams { - return &GetRecoveryByIDParams{ - timeout: timeout, - } -} - -// NewGetRecoveryByIDParamsWithContext creates a new GetRecoveryByIDParams object -// with the ability to set a context for a request. -func NewGetRecoveryByIDParamsWithContext(ctx context.Context) *GetRecoveryByIDParams { - return &GetRecoveryByIDParams{ - Context: ctx, - } -} - -// NewGetRecoveryByIDParamsWithHTTPClient creates a new GetRecoveryByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecoveryByIDParamsWithHTTPClient(client *http.Client) *GetRecoveryByIDParams { - return &GetRecoveryByIDParams{ - HTTPClient: client, - } -} - -/* -GetRecoveryByIDParams contains all the parameters to send to the API endpoint - - for the get recovery by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRecoveryByIDParams struct { - - /* ID. - - Specifies the id of a Recovery. - */ - ID string - - /* IncludeTenants. - - Specifies if objects of all the organizations under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryByIDParams) WithDefaults() *GetRecoveryByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recovery by Id params -func (o *GetRecoveryByIDParams) WithTimeout(timeout time.Duration) *GetRecoveryByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recovery by Id params -func (o *GetRecoveryByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recovery by Id params -func (o *GetRecoveryByIDParams) WithContext(ctx context.Context) *GetRecoveryByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recovery by Id params -func (o *GetRecoveryByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recovery by Id params -func (o *GetRecoveryByIDParams) WithHTTPClient(client *http.Client) *GetRecoveryByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recovery by Id params -func (o *GetRecoveryByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get recovery by Id params -func (o *GetRecoveryByIDParams) WithID(id string) *GetRecoveryByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get recovery by Id params -func (o *GetRecoveryByIDParams) SetID(id string) { - o.ID = id -} - -// WithIncludeTenants adds the includeTenants to the get recovery by Id params -func (o *GetRecoveryByIDParams) WithIncludeTenants(includeTenants *bool) *GetRecoveryByIDParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get recovery by Id params -func (o *GetRecoveryByIDParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecoveryByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/get_recovery_by_id_responses.go b/v2/client/recovery/get_recovery_by_id_responses.go deleted file mode 100644 index 70827be0..00000000 --- a/v2/client/recovery/get_recovery_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRecoveryByIDReader is a Reader for the GetRecoveryByID structure. -type GetRecoveryByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecoveryByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecoveryByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRecoveryByIDDefault(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 - } -} - -// NewGetRecoveryByIDOK creates a GetRecoveryByIDOK with default headers values -func NewGetRecoveryByIDOK() *GetRecoveryByIDOK { - return &GetRecoveryByIDOK{} -} - -/* -GetRecoveryByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRecoveryByIDOK struct { - Payload *models.Recovery -} - -// IsSuccess returns true when this get recovery by Id o k response has a 2xx status code -func (o *GetRecoveryByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recovery by Id o k response has a 3xx status code -func (o *GetRecoveryByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recovery by Id o k response has a 4xx status code -func (o *GetRecoveryByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recovery by Id o k response has a 5xx status code -func (o *GetRecoveryByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recovery by Id o k response a status code equal to that given -func (o *GetRecoveryByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get recovery by Id o k response -func (o *GetRecoveryByIDOK) Code() int { - return 200 -} - -func (o *GetRecoveryByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}][%d] getRecoveryByIdOK %s", 200, payload) -} - -func (o *GetRecoveryByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}][%d] getRecoveryByIdOK %s", 200, payload) -} - -func (o *GetRecoveryByIDOK) GetPayload() *models.Recovery { - return o.Payload -} - -func (o *GetRecoveryByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Recovery) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRecoveryByIDDefault creates a GetRecoveryByIDDefault with default headers values -func NewGetRecoveryByIDDefault(code int) *GetRecoveryByIDDefault { - return &GetRecoveryByIDDefault{ - _statusCode: code, - } -} - -/* -GetRecoveryByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRecoveryByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get recovery by Id default response has a 2xx status code -func (o *GetRecoveryByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get recovery by Id default response has a 3xx status code -func (o *GetRecoveryByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get recovery by Id default response has a 4xx status code -func (o *GetRecoveryByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get recovery by Id default response has a 5xx status code -func (o *GetRecoveryByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get recovery by Id default response a status code equal to that given -func (o *GetRecoveryByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get recovery by Id default response -func (o *GetRecoveryByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRecoveryByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}][%d] GetRecoveryById default %s", o._statusCode, payload) -} - -func (o *GetRecoveryByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}][%d] GetRecoveryById default %s", o._statusCode, payload) -} - -func (o *GetRecoveryByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRecoveryByIDDefault) 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/recovery/get_recovery_debug_logs_parameters.go b/v2/client/recovery/get_recovery_debug_logs_parameters.go deleted file mode 100644 index 96a7cf31..00000000 --- a/v2/client/recovery/get_recovery_debug_logs_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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" -) - -// NewGetRecoveryDebugLogsParams creates a new GetRecoveryDebugLogsParams 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 NewGetRecoveryDebugLogsParams() *GetRecoveryDebugLogsParams { - return &GetRecoveryDebugLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecoveryDebugLogsParamsWithTimeout creates a new GetRecoveryDebugLogsParams object -// with the ability to set a timeout on a request. -func NewGetRecoveryDebugLogsParamsWithTimeout(timeout time.Duration) *GetRecoveryDebugLogsParams { - return &GetRecoveryDebugLogsParams{ - timeout: timeout, - } -} - -// NewGetRecoveryDebugLogsParamsWithContext creates a new GetRecoveryDebugLogsParams object -// with the ability to set a context for a request. -func NewGetRecoveryDebugLogsParamsWithContext(ctx context.Context) *GetRecoveryDebugLogsParams { - return &GetRecoveryDebugLogsParams{ - Context: ctx, - } -} - -// NewGetRecoveryDebugLogsParamsWithHTTPClient creates a new GetRecoveryDebugLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecoveryDebugLogsParamsWithHTTPClient(client *http.Client) *GetRecoveryDebugLogsParams { - return &GetRecoveryDebugLogsParams{ - HTTPClient: client, - } -} - -/* -GetRecoveryDebugLogsParams contains all the parameters to send to the API endpoint - - for the get recovery debug logs operation. - - Typically these are written to a http.Request. -*/ -type GetRecoveryDebugLogsParams struct { - - /* ID. - - Specifies the id of a Recovery job. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recovery debug logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryDebugLogsParams) WithDefaults() *GetRecoveryDebugLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recovery debug logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryDebugLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) WithTimeout(timeout time.Duration) *GetRecoveryDebugLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) WithContext(ctx context.Context) *GetRecoveryDebugLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) WithHTTPClient(client *http.Client) *GetRecoveryDebugLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) WithID(id string) *GetRecoveryDebugLogsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get recovery debug logs params -func (o *GetRecoveryDebugLogsParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecoveryDebugLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/get_recovery_debug_logs_responses.go b/v2/client/recovery/get_recovery_debug_logs_responses.go deleted file mode 100644 index 2151b8bc..00000000 --- a/v2/client/recovery/get_recovery_debug_logs_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRecoveryDebugLogsReader is a Reader for the GetRecoveryDebugLogs structure. -type GetRecoveryDebugLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecoveryDebugLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecoveryDebugLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRecoveryDebugLogsDefault(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 - } -} - -// NewGetRecoveryDebugLogsOK creates a GetRecoveryDebugLogsOK with default headers values -func NewGetRecoveryDebugLogsOK() *GetRecoveryDebugLogsOK { - return &GetRecoveryDebugLogsOK{} -} - -/* -GetRecoveryDebugLogsOK describes a response with status code 200, with default header values. - -No Content -*/ -type GetRecoveryDebugLogsOK struct { -} - -// IsSuccess returns true when this get recovery debug logs o k response has a 2xx status code -func (o *GetRecoveryDebugLogsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recovery debug logs o k response has a 3xx status code -func (o *GetRecoveryDebugLogsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recovery debug logs o k response has a 4xx status code -func (o *GetRecoveryDebugLogsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recovery debug logs o k response has a 5xx status code -func (o *GetRecoveryDebugLogsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recovery debug logs o k response a status code equal to that given -func (o *GetRecoveryDebugLogsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get recovery debug logs o k response -func (o *GetRecoveryDebugLogsOK) Code() int { - return 200 -} - -func (o *GetRecoveryDebugLogsOK) Error() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/debug-logs][%d] getRecoveryDebugLogsOK", 200) -} - -func (o *GetRecoveryDebugLogsOK) String() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/debug-logs][%d] getRecoveryDebugLogsOK", 200) -} - -func (o *GetRecoveryDebugLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRecoveryDebugLogsDefault creates a GetRecoveryDebugLogsDefault with default headers values -func NewGetRecoveryDebugLogsDefault(code int) *GetRecoveryDebugLogsDefault { - return &GetRecoveryDebugLogsDefault{ - _statusCode: code, - } -} - -/* -GetRecoveryDebugLogsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRecoveryDebugLogsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get recovery debug logs default response has a 2xx status code -func (o *GetRecoveryDebugLogsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get recovery debug logs default response has a 3xx status code -func (o *GetRecoveryDebugLogsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get recovery debug logs default response has a 4xx status code -func (o *GetRecoveryDebugLogsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get recovery debug logs default response has a 5xx status code -func (o *GetRecoveryDebugLogsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get recovery debug logs default response a status code equal to that given -func (o *GetRecoveryDebugLogsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get recovery debug logs default response -func (o *GetRecoveryDebugLogsDefault) Code() int { - return o._statusCode -} - -func (o *GetRecoveryDebugLogsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/debug-logs][%d] GetRecoveryDebugLogs default %s", o._statusCode, payload) -} - -func (o *GetRecoveryDebugLogsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/debug-logs][%d] GetRecoveryDebugLogs default %s", o._statusCode, payload) -} - -func (o *GetRecoveryDebugLogsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRecoveryDebugLogsDefault) 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/recovery/get_recovery_errors_report_parameters.go b/v2/client/recovery/get_recovery_errors_report_parameters.go deleted file mode 100644 index 6e4418fd..00000000 --- a/v2/client/recovery/get_recovery_errors_report_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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" -) - -// NewGetRecoveryErrorsReportParams creates a new GetRecoveryErrorsReportParams 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 NewGetRecoveryErrorsReportParams() *GetRecoveryErrorsReportParams { - return &GetRecoveryErrorsReportParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecoveryErrorsReportParamsWithTimeout creates a new GetRecoveryErrorsReportParams object -// with the ability to set a timeout on a request. -func NewGetRecoveryErrorsReportParamsWithTimeout(timeout time.Duration) *GetRecoveryErrorsReportParams { - return &GetRecoveryErrorsReportParams{ - timeout: timeout, - } -} - -// NewGetRecoveryErrorsReportParamsWithContext creates a new GetRecoveryErrorsReportParams object -// with the ability to set a context for a request. -func NewGetRecoveryErrorsReportParamsWithContext(ctx context.Context) *GetRecoveryErrorsReportParams { - return &GetRecoveryErrorsReportParams{ - Context: ctx, - } -} - -// NewGetRecoveryErrorsReportParamsWithHTTPClient creates a new GetRecoveryErrorsReportParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecoveryErrorsReportParamsWithHTTPClient(client *http.Client) *GetRecoveryErrorsReportParams { - return &GetRecoveryErrorsReportParams{ - HTTPClient: client, - } -} - -/* -GetRecoveryErrorsReportParams contains all the parameters to send to the API endpoint - - for the get recovery errors report operation. - - Typically these are written to a http.Request. -*/ -type GetRecoveryErrorsReportParams struct { - - /* ID. - - Specifies a unique ID of a Recovery. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recovery errors report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryErrorsReportParams) WithDefaults() *GetRecoveryErrorsReportParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recovery errors report params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecoveryErrorsReportParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) WithTimeout(timeout time.Duration) *GetRecoveryErrorsReportParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) WithContext(ctx context.Context) *GetRecoveryErrorsReportParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) WithHTTPClient(client *http.Client) *GetRecoveryErrorsReportParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) WithID(id string) *GetRecoveryErrorsReportParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get recovery errors report params -func (o *GetRecoveryErrorsReportParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecoveryErrorsReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/get_recovery_errors_report_responses.go b/v2/client/recovery/get_recovery_errors_report_responses.go deleted file mode 100644 index f650d13a..00000000 --- a/v2/client/recovery/get_recovery_errors_report_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRecoveryErrorsReportReader is a Reader for the GetRecoveryErrorsReport structure. -type GetRecoveryErrorsReportReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecoveryErrorsReportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecoveryErrorsReportOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRecoveryErrorsReportDefault(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 - } -} - -// NewGetRecoveryErrorsReportOK creates a GetRecoveryErrorsReportOK with default headers values -func NewGetRecoveryErrorsReportOK() *GetRecoveryErrorsReportOK { - return &GetRecoveryErrorsReportOK{} -} - -/* -GetRecoveryErrorsReportOK describes a response with status code 200, with default header values. - -No Content -*/ -type GetRecoveryErrorsReportOK struct { -} - -// IsSuccess returns true when this get recovery errors report o k response has a 2xx status code -func (o *GetRecoveryErrorsReportOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recovery errors report o k response has a 3xx status code -func (o *GetRecoveryErrorsReportOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recovery errors report o k response has a 4xx status code -func (o *GetRecoveryErrorsReportOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recovery errors report o k response has a 5xx status code -func (o *GetRecoveryErrorsReportOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recovery errors report o k response a status code equal to that given -func (o *GetRecoveryErrorsReportOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get recovery errors report o k response -func (o *GetRecoveryErrorsReportOK) Code() int { - return 200 -} - -func (o *GetRecoveryErrorsReportOK) Error() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-messages][%d] getRecoveryErrorsReportOK", 200) -} - -func (o *GetRecoveryErrorsReportOK) String() string { - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-messages][%d] getRecoveryErrorsReportOK", 200) -} - -func (o *GetRecoveryErrorsReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetRecoveryErrorsReportDefault creates a GetRecoveryErrorsReportDefault with default headers values -func NewGetRecoveryErrorsReportDefault(code int) *GetRecoveryErrorsReportDefault { - return &GetRecoveryErrorsReportDefault{ - _statusCode: code, - } -} - -/* -GetRecoveryErrorsReportDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRecoveryErrorsReportDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get recovery errors report default response has a 2xx status code -func (o *GetRecoveryErrorsReportDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get recovery errors report default response has a 3xx status code -func (o *GetRecoveryErrorsReportDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get recovery errors report default response has a 4xx status code -func (o *GetRecoveryErrorsReportDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get recovery errors report default response has a 5xx status code -func (o *GetRecoveryErrorsReportDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get recovery errors report default response a status code equal to that given -func (o *GetRecoveryErrorsReportDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get recovery errors report default response -func (o *GetRecoveryErrorsReportDefault) Code() int { - return o._statusCode -} - -func (o *GetRecoveryErrorsReportDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-messages][%d] GetRecoveryErrorsReport default %s", o._statusCode, payload) -} - -func (o *GetRecoveryErrorsReportDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/recoveries/{id}/download-messages][%d] GetRecoveryErrorsReport default %s", o._statusCode, payload) -} - -func (o *GetRecoveryErrorsReportDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRecoveryErrorsReportDefault) 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/recovery/recovery_client.go b/v2/client/recovery/recovery_client.go deleted file mode 100644 index 1bb3a0c4..00000000 --- a/v2/client/recovery/recovery_client.go +++ /dev/null @@ -1,525 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new recovery API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new recovery API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new recovery API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for recovery API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CancelRecoveryByID(params *CancelRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelRecoveryByIDNoContent, error) - - CreateDownloadFilesAndFoldersRecovery(params *CreateDownloadFilesAndFoldersRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDownloadFilesAndFoldersRecoveryCreated, error) - - CreateRecovery(params *CreateRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRecoveryCreated, error) - - DownloadFilesFromRecovery(params *DownloadFilesFromRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadFilesFromRecoveryOK, error) - - DownloadIndexedFile(params *DownloadIndexedFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadIndexedFileOK, error) - - FetchUptierData(params *FetchUptierDataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FetchUptierDataOK, error) - - GetRecoveries(params *GetRecoveriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveriesOK, error) - - GetRecoveryByID(params *GetRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryByIDOK, error) - - GetRecoveryDebugLogs(params *GetRecoveryDebugLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryDebugLogsOK, error) - - GetRecoveryErrorsReport(params *GetRecoveryErrorsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryErrorsReportOK, error) - - TearDownRecoveryByID(params *TearDownRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TearDownRecoveryByIDNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CancelRecoveryByID cancels recovery for a given id - -Cancel Recovery for a given id. -*/ -func (a *Client) CancelRecoveryByID(params *CancelRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelRecoveryByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCancelRecoveryByIDParams() - } - op := &runtime.ClientOperation{ - ID: "CancelRecoveryById", - Method: "POST", - PathPattern: "/data-protect/recoveries/{id}/cancel", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CancelRecoveryByIDReader{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.(*CancelRecoveryByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CancelRecoveryByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateDownloadFilesAndFoldersRecovery creates a download files and folders recovery - -Creates a download files and folders recovery. -*/ -func (a *Client) CreateDownloadFilesAndFoldersRecovery(params *CreateDownloadFilesAndFoldersRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDownloadFilesAndFoldersRecoveryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateDownloadFilesAndFoldersRecoveryParams() - } - op := &runtime.ClientOperation{ - ID: "CreateDownloadFilesAndFoldersRecovery", - Method: "POST", - PathPattern: "/data-protect/recoveries/download-files-folders", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateDownloadFilesAndFoldersRecoveryReader{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.(*CreateDownloadFilesAndFoldersRecoveryCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateDownloadFilesAndFoldersRecoveryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateRecovery performs a recovery - -Performs a Recovery. -*/ -func (a *Client) CreateRecovery(params *CreateRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRecoveryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRecoveryParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRecovery", - Method: "POST", - PathPattern: "/data-protect/recoveries", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRecoveryReader{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.(*CreateRecoveryCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRecoveryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadFilesFromRecovery downloads files from the given download file recovery - -Download files from the given download file recovery. -*/ -func (a *Client) DownloadFilesFromRecovery(params *DownloadFilesFromRecoveryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadFilesFromRecoveryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadFilesFromRecoveryParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadFilesFromRecovery", - Method: "GET", - PathPattern: "/data-protect/recoveries/{id}/download-files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadFilesFromRecoveryReader{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.(*DownloadFilesFromRecoveryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadFilesFromRecoveryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DownloadIndexedFile downloads an indexed file - -Download an indexed file from a snapshot. -*/ -func (a *Client) DownloadIndexedFile(params *DownloadIndexedFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DownloadIndexedFileOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadIndexedFileParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadIndexedFile", - Method: "GET", - PathPattern: "/data-protect/snapshots/{snapshotsId}/download-file", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadIndexedFileReader{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.(*DownloadIndexedFileOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadIndexedFileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -FetchUptierData fetches the uptier data - -Fetches the uptier data for a restore job. -*/ -func (a *Client) FetchUptierData(params *FetchUptierDataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FetchUptierDataOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewFetchUptierDataParams() - } - op := &runtime.ClientOperation{ - ID: "FetchUptierData", - Method: "GET", - PathPattern: "/data-protect/recoveries/fetch-uptier-data", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &FetchUptierDataReader{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.(*FetchUptierDataOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*FetchUptierDataDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRecoveries lists the recoveries - -Lists the Recoveries. -*/ -func (a *Client) GetRecoveries(params *GetRecoveriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveriesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecoveriesParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecoveries", - Method: "GET", - PathPattern: "/data-protect/recoveries", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRecoveriesReader{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.(*GetRecoveriesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRecoveriesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRecoveryByID gets recovery for a given id - -Get Recovery for a given id. -*/ -func (a *Client) GetRecoveryByID(params *GetRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecoveryByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecoveryById", - Method: "GET", - PathPattern: "/data-protect/recoveries/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRecoveryByIDReader{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.(*GetRecoveryByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRecoveryByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRecoveryDebugLogs gets the debug logs for a particular recovery operation - -Get the debug logs for a particular recovery operation. -*/ -func (a *Client) GetRecoveryDebugLogs(params *GetRecoveryDebugLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryDebugLogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecoveryDebugLogsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecoveryDebugLogs", - Method: "GET", - PathPattern: "/data-protect/recoveries/{id}/debug-logs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRecoveryDebugLogsReader{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.(*GetRecoveryDebugLogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRecoveryDebugLogsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRecoveryErrorsReport gets the c s v of errors warnings for a given recovery operation - -Get a CSV error report for given recovery operation. Each row in CSV report contains the File Path, error/warning code and error/warning message. -*/ -func (a *Client) GetRecoveryErrorsReport(params *GetRecoveryErrorsReportParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRecoveryErrorsReportOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecoveryErrorsReportParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecoveryErrorsReport", - Method: "GET", - PathPattern: "/data-protect/recoveries/{id}/download-messages", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRecoveryErrorsReportReader{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.(*GetRecoveryErrorsReportOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRecoveryErrorsReportDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -TearDownRecoveryByID tears down recovery for a given id - -Tear down Recovery for a given id. -*/ -func (a *Client) TearDownRecoveryByID(params *TearDownRecoveryByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TearDownRecoveryByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewTearDownRecoveryByIDParams() - } - op := &runtime.ClientOperation{ - ID: "TearDownRecoveryById", - Method: "POST", - PathPattern: "/data-protect/recoveries/{id}/tear-down", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &TearDownRecoveryByIDReader{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.(*TearDownRecoveryByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*TearDownRecoveryByIDDefault) - 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/v2/client/recovery/tear_down_recovery_by_id_parameters.go b/v2/client/recovery/tear_down_recovery_by_id_parameters.go deleted file mode 100644 index 69c60a4e..00000000 --- a/v2/client/recovery/tear_down_recovery_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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" -) - -// NewTearDownRecoveryByIDParams creates a new TearDownRecoveryByIDParams 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 NewTearDownRecoveryByIDParams() *TearDownRecoveryByIDParams { - return &TearDownRecoveryByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewTearDownRecoveryByIDParamsWithTimeout creates a new TearDownRecoveryByIDParams object -// with the ability to set a timeout on a request. -func NewTearDownRecoveryByIDParamsWithTimeout(timeout time.Duration) *TearDownRecoveryByIDParams { - return &TearDownRecoveryByIDParams{ - timeout: timeout, - } -} - -// NewTearDownRecoveryByIDParamsWithContext creates a new TearDownRecoveryByIDParams object -// with the ability to set a context for a request. -func NewTearDownRecoveryByIDParamsWithContext(ctx context.Context) *TearDownRecoveryByIDParams { - return &TearDownRecoveryByIDParams{ - Context: ctx, - } -} - -// NewTearDownRecoveryByIDParamsWithHTTPClient creates a new TearDownRecoveryByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewTearDownRecoveryByIDParamsWithHTTPClient(client *http.Client) *TearDownRecoveryByIDParams { - return &TearDownRecoveryByIDParams{ - HTTPClient: client, - } -} - -/* -TearDownRecoveryByIDParams contains all the parameters to send to the API endpoint - - for the tear down recovery by Id operation. - - Typically these are written to a http.Request. -*/ -type TearDownRecoveryByIDParams struct { - - /* ID. - - Specifies the id of a Recovery. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the tear down recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TearDownRecoveryByIDParams) WithDefaults() *TearDownRecoveryByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the tear down recovery by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TearDownRecoveryByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) WithTimeout(timeout time.Duration) *TearDownRecoveryByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) WithContext(ctx context.Context) *TearDownRecoveryByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) WithHTTPClient(client *http.Client) *TearDownRecoveryByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) WithID(id string) *TearDownRecoveryByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the tear down recovery by Id params -func (o *TearDownRecoveryByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *TearDownRecoveryByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/recovery/tear_down_recovery_by_id_responses.go b/v2/client/recovery/tear_down_recovery_by_id_responses.go deleted file mode 100644 index 229f5897..00000000 --- a/v2/client/recovery/tear_down_recovery_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recovery - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// TearDownRecoveryByIDReader is a Reader for the TearDownRecoveryByID structure. -type TearDownRecoveryByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TearDownRecoveryByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewTearDownRecoveryByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewTearDownRecoveryByIDDefault(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 - } -} - -// NewTearDownRecoveryByIDNoContent creates a TearDownRecoveryByIDNoContent with default headers values -func NewTearDownRecoveryByIDNoContent() *TearDownRecoveryByIDNoContent { - return &TearDownRecoveryByIDNoContent{} -} - -/* -TearDownRecoveryByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type TearDownRecoveryByIDNoContent struct { -} - -// IsSuccess returns true when this tear down recovery by Id no content response has a 2xx status code -func (o *TearDownRecoveryByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this tear down recovery by Id no content response has a 3xx status code -func (o *TearDownRecoveryByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this tear down recovery by Id no content response has a 4xx status code -func (o *TearDownRecoveryByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this tear down recovery by Id no content response has a 5xx status code -func (o *TearDownRecoveryByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this tear down recovery by Id no content response a status code equal to that given -func (o *TearDownRecoveryByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the tear down recovery by Id no content response -func (o *TearDownRecoveryByIDNoContent) Code() int { - return 204 -} - -func (o *TearDownRecoveryByIDNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/tear-down][%d] tearDownRecoveryByIdNoContent", 204) -} - -func (o *TearDownRecoveryByIDNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/tear-down][%d] tearDownRecoveryByIdNoContent", 204) -} - -func (o *TearDownRecoveryByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewTearDownRecoveryByIDDefault creates a TearDownRecoveryByIDDefault with default headers values -func NewTearDownRecoveryByIDDefault(code int) *TearDownRecoveryByIDDefault { - return &TearDownRecoveryByIDDefault{ - _statusCode: code, - } -} - -/* -TearDownRecoveryByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type TearDownRecoveryByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this tear down recovery by Id default response has a 2xx status code -func (o *TearDownRecoveryByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this tear down recovery by Id default response has a 3xx status code -func (o *TearDownRecoveryByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this tear down recovery by Id default response has a 4xx status code -func (o *TearDownRecoveryByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this tear down recovery by Id default response has a 5xx status code -func (o *TearDownRecoveryByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this tear down recovery by Id default response a status code equal to that given -func (o *TearDownRecoveryByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the tear down recovery by Id default response -func (o *TearDownRecoveryByIDDefault) Code() int { - return o._statusCode -} - -func (o *TearDownRecoveryByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/tear-down][%d] TearDownRecoveryById default %s", o._statusCode, payload) -} - -func (o *TearDownRecoveryByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/recoveries/{id}/tear-down][%d] TearDownRecoveryById default %s", o._statusCode, payload) -} - -func (o *TearDownRecoveryByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *TearDownRecoveryByIDDefault) 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/registration/get_helios_reg_config_parameters.go b/v2/client/registration/get_helios_reg_config_parameters.go deleted file mode 100644 index 2786f0f0..00000000 --- a/v2/client/registration/get_helios_reg_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package registration - -// 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" -) - -// NewGetHeliosRegConfigParams creates a new GetHeliosRegConfigParams 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 NewGetHeliosRegConfigParams() *GetHeliosRegConfigParams { - return &GetHeliosRegConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetHeliosRegConfigParamsWithTimeout creates a new GetHeliosRegConfigParams object -// with the ability to set a timeout on a request. -func NewGetHeliosRegConfigParamsWithTimeout(timeout time.Duration) *GetHeliosRegConfigParams { - return &GetHeliosRegConfigParams{ - timeout: timeout, - } -} - -// NewGetHeliosRegConfigParamsWithContext creates a new GetHeliosRegConfigParams object -// with the ability to set a context for a request. -func NewGetHeliosRegConfigParamsWithContext(ctx context.Context) *GetHeliosRegConfigParams { - return &GetHeliosRegConfigParams{ - Context: ctx, - } -} - -// NewGetHeliosRegConfigParamsWithHTTPClient creates a new GetHeliosRegConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetHeliosRegConfigParamsWithHTTPClient(client *http.Client) *GetHeliosRegConfigParams { - return &GetHeliosRegConfigParams{ - HTTPClient: client, - } -} - -/* -GetHeliosRegConfigParams contains all the parameters to send to the API endpoint - - for the get helios reg config operation. - - Typically these are written to a http.Request. -*/ -type GetHeliosRegConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get helios reg config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHeliosRegConfigParams) WithDefaults() *GetHeliosRegConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get helios reg config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHeliosRegConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get helios reg config params -func (o *GetHeliosRegConfigParams) WithTimeout(timeout time.Duration) *GetHeliosRegConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get helios reg config params -func (o *GetHeliosRegConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get helios reg config params -func (o *GetHeliosRegConfigParams) WithContext(ctx context.Context) *GetHeliosRegConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get helios reg config params -func (o *GetHeliosRegConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get helios reg config params -func (o *GetHeliosRegConfigParams) WithHTTPClient(client *http.Client) *GetHeliosRegConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get helios reg config params -func (o *GetHeliosRegConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHeliosRegConfigParams) 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/registration/get_helios_reg_config_responses.go b/v2/client/registration/get_helios_reg_config_responses.go deleted file mode 100644 index 48bf7e65..00000000 --- a/v2/client/registration/get_helios_reg_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package registration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetHeliosRegConfigReader is a Reader for the GetHeliosRegConfig structure. -type GetHeliosRegConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHeliosRegConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetHeliosRegConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetHeliosRegConfigDefault(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 - } -} - -// NewGetHeliosRegConfigOK creates a GetHeliosRegConfigOK with default headers values -func NewGetHeliosRegConfigOK() *GetHeliosRegConfigOK { - return &GetHeliosRegConfigOK{} -} - -/* -GetHeliosRegConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetHeliosRegConfigOK struct { - Payload *models.HeliosRegConfig -} - -// IsSuccess returns true when this get helios reg config o k response has a 2xx status code -func (o *GetHeliosRegConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get helios reg config o k response has a 3xx status code -func (o *GetHeliosRegConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get helios reg config o k response has a 4xx status code -func (o *GetHeliosRegConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get helios reg config o k response has a 5xx status code -func (o *GetHeliosRegConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get helios reg config o k response a status code equal to that given -func (o *GetHeliosRegConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get helios reg config o k response -func (o *GetHeliosRegConfigOK) Code() int { - return 200 -} - -func (o *GetHeliosRegConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-registration-config][%d] getHeliosRegConfigOK %s", 200, payload) -} - -func (o *GetHeliosRegConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-registration-config][%d] getHeliosRegConfigOK %s", 200, payload) -} - -func (o *GetHeliosRegConfigOK) GetPayload() *models.HeliosRegConfig { - return o.Payload -} - -func (o *GetHeliosRegConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HeliosRegConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetHeliosRegConfigDefault creates a GetHeliosRegConfigDefault with default headers values -func NewGetHeliosRegConfigDefault(code int) *GetHeliosRegConfigDefault { - return &GetHeliosRegConfigDefault{ - _statusCode: code, - } -} - -/* -GetHeliosRegConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetHeliosRegConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get helios reg config default response has a 2xx status code -func (o *GetHeliosRegConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get helios reg config default response has a 3xx status code -func (o *GetHeliosRegConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get helios reg config default response has a 4xx status code -func (o *GetHeliosRegConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get helios reg config default response has a 5xx status code -func (o *GetHeliosRegConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get helios reg config default response a status code equal to that given -func (o *GetHeliosRegConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get helios reg config default response -func (o *GetHeliosRegConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetHeliosRegConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-registration-config][%d] GetHeliosRegConfig default %s", o._statusCode, payload) -} - -func (o *GetHeliosRegConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /helios-registration-config][%d] GetHeliosRegConfig default %s", o._statusCode, payload) -} - -func (o *GetHeliosRegConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetHeliosRegConfigDefault) 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/registration/helios_claim_parameters.go b/v2/client/registration/helios_claim_parameters.go deleted file mode 100644 index abc2a9bf..00000000 --- a/v2/client/registration/helios_claim_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package registration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewHeliosClaimParams creates a new HeliosClaimParams 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 NewHeliosClaimParams() *HeliosClaimParams { - return &HeliosClaimParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewHeliosClaimParamsWithTimeout creates a new HeliosClaimParams object -// with the ability to set a timeout on a request. -func NewHeliosClaimParamsWithTimeout(timeout time.Duration) *HeliosClaimParams { - return &HeliosClaimParams{ - timeout: timeout, - } -} - -// NewHeliosClaimParamsWithContext creates a new HeliosClaimParams object -// with the ability to set a context for a request. -func NewHeliosClaimParamsWithContext(ctx context.Context) *HeliosClaimParams { - return &HeliosClaimParams{ - Context: ctx, - } -} - -// NewHeliosClaimParamsWithHTTPClient creates a new HeliosClaimParams object -// with the ability to set a custom HTTPClient for a request. -func NewHeliosClaimParamsWithHTTPClient(client *http.Client) *HeliosClaimParams { - return &HeliosClaimParams{ - HTTPClient: client, - } -} - -/* -HeliosClaimParams contains all the parameters to send to the API endpoint - - for the helios claim operation. - - Typically these are written to a http.Request. -*/ -type HeliosClaimParams struct { - - /* Body. - - Specifies the parameters to claim to Helios. - */ - Body *models.HeliosClaimRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the helios claim params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *HeliosClaimParams) WithDefaults() *HeliosClaimParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the helios claim params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *HeliosClaimParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the helios claim params -func (o *HeliosClaimParams) WithTimeout(timeout time.Duration) *HeliosClaimParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the helios claim params -func (o *HeliosClaimParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the helios claim params -func (o *HeliosClaimParams) WithContext(ctx context.Context) *HeliosClaimParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the helios claim params -func (o *HeliosClaimParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the helios claim params -func (o *HeliosClaimParams) WithHTTPClient(client *http.Client) *HeliosClaimParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the helios claim params -func (o *HeliosClaimParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the helios claim params -func (o *HeliosClaimParams) WithBody(body *models.HeliosClaimRequest) *HeliosClaimParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the helios claim params -func (o *HeliosClaimParams) SetBody(body *models.HeliosClaimRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *HeliosClaimParams) 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/registration/helios_claim_responses.go b/v2/client/registration/helios_claim_responses.go deleted file mode 100644 index ae95f31d..00000000 --- a/v2/client/registration/helios_claim_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package registration - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// HeliosClaimReader is a Reader for the HeliosClaim structure. -type HeliosClaimReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *HeliosClaimReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewHeliosClaimNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewHeliosClaimDefault(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 - } -} - -// NewHeliosClaimNoContent creates a HeliosClaimNoContent with default headers values -func NewHeliosClaimNoContent() *HeliosClaimNoContent { - return &HeliosClaimNoContent{} -} - -/* -HeliosClaimNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type HeliosClaimNoContent struct { -} - -// IsSuccess returns true when this helios claim no content response has a 2xx status code -func (o *HeliosClaimNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this helios claim no content response has a 3xx status code -func (o *HeliosClaimNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this helios claim no content response has a 4xx status code -func (o *HeliosClaimNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this helios claim no content response has a 5xx status code -func (o *HeliosClaimNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this helios claim no content response a status code equal to that given -func (o *HeliosClaimNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the helios claim no content response -func (o *HeliosClaimNoContent) Code() int { - return 204 -} - -func (o *HeliosClaimNoContent) Error() string { - return fmt.Sprintf("[POST /helios-registration][%d] heliosClaimNoContent", 204) -} - -func (o *HeliosClaimNoContent) String() string { - return fmt.Sprintf("[POST /helios-registration][%d] heliosClaimNoContent", 204) -} - -func (o *HeliosClaimNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewHeliosClaimDefault creates a HeliosClaimDefault with default headers values -func NewHeliosClaimDefault(code int) *HeliosClaimDefault { - return &HeliosClaimDefault{ - _statusCode: code, - } -} - -/* -HeliosClaimDefault describes a response with status code -1, with default header values. - -Error -*/ -type HeliosClaimDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this helios claim default response has a 2xx status code -func (o *HeliosClaimDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this helios claim default response has a 3xx status code -func (o *HeliosClaimDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this helios claim default response has a 4xx status code -func (o *HeliosClaimDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this helios claim default response has a 5xx status code -func (o *HeliosClaimDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this helios claim default response a status code equal to that given -func (o *HeliosClaimDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the helios claim default response -func (o *HeliosClaimDefault) Code() int { - return o._statusCode -} - -func (o *HeliosClaimDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /helios-registration][%d] HeliosClaim default %s", o._statusCode, payload) -} - -func (o *HeliosClaimDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /helios-registration][%d] HeliosClaim default %s", o._statusCode, payload) -} - -func (o *HeliosClaimDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *HeliosClaimDefault) 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/registration/registration_client.go b/v2/client/registration/registration_client.go deleted file mode 100644 index ba4957e7..00000000 --- a/v2/client/registration/registration_client.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package registration - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new registration API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new registration API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new registration API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for registration API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetHeliosRegConfig(params *GetHeliosRegConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetHeliosRegConfigOK, error) - - HeliosClaim(params *HeliosClaimParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HeliosClaimNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetHeliosRegConfig lists the helios registration config - -Lists the Helios Registration Config. -*/ -func (a *Client) GetHeliosRegConfig(params *GetHeliosRegConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetHeliosRegConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetHeliosRegConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetHeliosRegConfig", - Method: "GET", - PathPattern: "/helios-registration-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetHeliosRegConfigReader{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.(*GetHeliosRegConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetHeliosRegConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -HeliosClaim registers to helios - -Claim to Helios. -*/ -func (a *Client) HeliosClaim(params *HeliosClaimParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HeliosClaimNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewHeliosClaimParams() - } - op := &runtime.ClientOperation{ - ID: "HeliosClaim", - Method: "POST", - PathPattern: "/helios-registration", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &HeliosClaimReader{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.(*HeliosClaimNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*HeliosClaimDefault) - 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/v2/client/remote_clusters/delete_remote_cluster_parameters.go b/v2/client/remote_clusters/delete_remote_cluster_parameters.go deleted file mode 100644 index 5b42b5c9..00000000 --- a/v2/client/remote_clusters/delete_remote_cluster_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/go-openapi/swag" -) - -// NewDeleteRemoteClusterParams creates a new DeleteRemoteClusterParams 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 NewDeleteRemoteClusterParams() *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRemoteClusterParamsWithTimeout creates a new DeleteRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewDeleteRemoteClusterParamsWithTimeout(timeout time.Duration) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - timeout: timeout, - } -} - -// NewDeleteRemoteClusterParamsWithContext creates a new DeleteRemoteClusterParams object -// with the ability to set a context for a request. -func NewDeleteRemoteClusterParamsWithContext(ctx context.Context) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - Context: ctx, - } -} - -// NewDeleteRemoteClusterParamsWithHTTPClient creates a new DeleteRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRemoteClusterParamsWithHTTPClient(client *http.Client) *DeleteRemoteClusterParams { - return &DeleteRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -DeleteRemoteClusterParams contains all the parameters to send to the API endpoint - - for the delete remote cluster operation. - - Typically these are written to a http.Request. -*/ -type DeleteRemoteClusterParams struct { - - /* ClusterID. - - Specifies the cluster id of the Remote Cluster to unregister. - - Format: int64 - */ - ClusterID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteClusterParams) WithDefaults() *DeleteRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithTimeout(timeout time.Duration) *DeleteRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithContext(ctx context.Context) *DeleteRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithHTTPClient(client *http.Client) *DeleteRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the delete remote cluster params -func (o *DeleteRemoteClusterParams) WithClusterID(clusterID int64) *DeleteRemoteClusterParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the delete remote cluster params -func (o *DeleteRemoteClusterParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRemoteClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param clusterId - if err := r.SetPathParam("clusterId", swag.FormatInt64(o.ClusterID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_clusters/delete_remote_cluster_responses.go b/v2/client/remote_clusters/delete_remote_cluster_responses.go deleted file mode 100644 index 7f95959c..00000000 --- a/v2/client/remote_clusters/delete_remote_cluster_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteRemoteClusterReader is a Reader for the DeleteRemoteCluster structure. -type DeleteRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRemoteClusterNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRemoteClusterDefault(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 - } -} - -// NewDeleteRemoteClusterNoContent creates a DeleteRemoteClusterNoContent with default headers values -func NewDeleteRemoteClusterNoContent() *DeleteRemoteClusterNoContent { - return &DeleteRemoteClusterNoContent{} -} - -/* -DeleteRemoteClusterNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRemoteClusterNoContent struct { -} - -// IsSuccess returns true when this delete remote cluster no content response has a 2xx status code -func (o *DeleteRemoteClusterNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete remote cluster no content response has a 3xx status code -func (o *DeleteRemoteClusterNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete remote cluster no content response has a 4xx status code -func (o *DeleteRemoteClusterNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete remote cluster no content response has a 5xx status code -func (o *DeleteRemoteClusterNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete remote cluster no content response a status code equal to that given -func (o *DeleteRemoteClusterNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete remote cluster no content response -func (o *DeleteRemoteClusterNoContent) Code() int { - return 204 -} - -func (o *DeleteRemoteClusterNoContent) Error() string { - return fmt.Sprintf("[DELETE /remote-clusters/{clusterId}][%d] deleteRemoteClusterNoContent", 204) -} - -func (o *DeleteRemoteClusterNoContent) String() string { - return fmt.Sprintf("[DELETE /remote-clusters/{clusterId}][%d] deleteRemoteClusterNoContent", 204) -} - -func (o *DeleteRemoteClusterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRemoteClusterDefault creates a DeleteRemoteClusterDefault with default headers values -func NewDeleteRemoteClusterDefault(code int) *DeleteRemoteClusterDefault { - return &DeleteRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -DeleteRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRemoteClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete remote cluster default response has a 2xx status code -func (o *DeleteRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete remote cluster default response has a 3xx status code -func (o *DeleteRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete remote cluster default response has a 4xx status code -func (o *DeleteRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete remote cluster default response has a 5xx status code -func (o *DeleteRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete remote cluster default response a status code equal to that given -func (o *DeleteRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete remote cluster default response -func (o *DeleteRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /remote-clusters/{clusterId}][%d] DeleteRemoteCluster default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /remote-clusters/{clusterId}][%d] DeleteRemoteCluster default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteRemoteClusterDefault) 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/remote_clusters/get_remote_cluster_by_id_parameters.go b/v2/client/remote_clusters/get_remote_cluster_by_id_parameters.go deleted file mode 100644 index 8e073f3f..00000000 --- a/v2/client/remote_clusters/get_remote_cluster_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/go-openapi/swag" -) - -// NewGetRemoteClusterByIDParams creates a new GetRemoteClusterByIDParams 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 NewGetRemoteClusterByIDParams() *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteClusterByIDParamsWithTimeout creates a new GetRemoteClusterByIDParams object -// with the ability to set a timeout on a request. -func NewGetRemoteClusterByIDParamsWithTimeout(timeout time.Duration) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - timeout: timeout, - } -} - -// NewGetRemoteClusterByIDParamsWithContext creates a new GetRemoteClusterByIDParams object -// with the ability to set a context for a request. -func NewGetRemoteClusterByIDParamsWithContext(ctx context.Context) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - Context: ctx, - } -} - -// NewGetRemoteClusterByIDParamsWithHTTPClient creates a new GetRemoteClusterByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteClusterByIDParamsWithHTTPClient(client *http.Client) *GetRemoteClusterByIDParams { - return &GetRemoteClusterByIDParams{ - HTTPClient: client, - } -} - -/* -GetRemoteClusterByIDParams contains all the parameters to send to the API endpoint - - for the get remote cluster by Id operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteClusterByIDParams struct { - - /* ClusterID. - - Specifies the cluster id of Remote Cluster to fetch. - - Format: int64 - */ - ClusterID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote cluster by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClusterByIDParams) WithDefaults() *GetRemoteClusterByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote cluster by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClusterByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithTimeout(timeout time.Duration) *GetRemoteClusterByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithContext(ctx context.Context) *GetRemoteClusterByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithHTTPClient(client *http.Client) *GetRemoteClusterByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) WithClusterID(clusterID int64) *GetRemoteClusterByIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get remote cluster by Id params -func (o *GetRemoteClusterByIDParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteClusterByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param clusterId - if err := r.SetPathParam("clusterId", swag.FormatInt64(o.ClusterID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_clusters/get_remote_cluster_by_id_responses.go b/v2/client/remote_clusters/get_remote_cluster_by_id_responses.go deleted file mode 100644 index f1bc5783..00000000 --- a/v2/client/remote_clusters/get_remote_cluster_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRemoteClusterByIDReader is a Reader for the GetRemoteClusterByID structure. -type GetRemoteClusterByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteClusterByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteClusterByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteClusterByIDDefault(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 - } -} - -// NewGetRemoteClusterByIDOK creates a GetRemoteClusterByIDOK with default headers values -func NewGetRemoteClusterByIDOK() *GetRemoteClusterByIDOK { - return &GetRemoteClusterByIDOK{} -} - -/* -GetRemoteClusterByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteClusterByIDOK struct { - Payload *models.RemoteCluster -} - -// IsSuccess returns true when this get remote cluster by Id o k response has a 2xx status code -func (o *GetRemoteClusterByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote cluster by Id o k response has a 3xx status code -func (o *GetRemoteClusterByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote cluster by Id o k response has a 4xx status code -func (o *GetRemoteClusterByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote cluster by Id o k response has a 5xx status code -func (o *GetRemoteClusterByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote cluster by Id o k response a status code equal to that given -func (o *GetRemoteClusterByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote cluster by Id o k response -func (o *GetRemoteClusterByIDOK) Code() int { - return 200 -} - -func (o *GetRemoteClusterByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters/{clusterId}][%d] getRemoteClusterByIdOK %s", 200, payload) -} - -func (o *GetRemoteClusterByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters/{clusterId}][%d] getRemoteClusterByIdOK %s", 200, payload) -} - -func (o *GetRemoteClusterByIDOK) GetPayload() *models.RemoteCluster { - return o.Payload -} - -func (o *GetRemoteClusterByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteCluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteClusterByIDDefault creates a GetRemoteClusterByIDDefault with default headers values -func NewGetRemoteClusterByIDDefault(code int) *GetRemoteClusterByIDDefault { - return &GetRemoteClusterByIDDefault{ - _statusCode: code, - } -} - -/* -GetRemoteClusterByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteClusterByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get remote cluster by Id default response has a 2xx status code -func (o *GetRemoteClusterByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote cluster by Id default response has a 3xx status code -func (o *GetRemoteClusterByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote cluster by Id default response has a 4xx status code -func (o *GetRemoteClusterByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote cluster by Id default response has a 5xx status code -func (o *GetRemoteClusterByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote cluster by Id default response a status code equal to that given -func (o *GetRemoteClusterByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote cluster by Id default response -func (o *GetRemoteClusterByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteClusterByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters/{clusterId}][%d] GetRemoteClusterById default %s", o._statusCode, payload) -} - -func (o *GetRemoteClusterByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters/{clusterId}][%d] GetRemoteClusterById default %s", o._statusCode, payload) -} - -func (o *GetRemoteClusterByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRemoteClusterByIDDefault) 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/remote_clusters/get_remote_clusters_parameters.go b/v2/client/remote_clusters/get_remote_clusters_parameters.go deleted file mode 100644 index f6b6d1df..00000000 --- a/v2/client/remote_clusters/get_remote_clusters_parameters.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/go-openapi/swag" -) - -// NewGetRemoteClustersParams creates a new GetRemoteClustersParams 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 NewGetRemoteClustersParams() *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteClustersParamsWithTimeout creates a new GetRemoteClustersParams object -// with the ability to set a timeout on a request. -func NewGetRemoteClustersParamsWithTimeout(timeout time.Duration) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - timeout: timeout, - } -} - -// NewGetRemoteClustersParamsWithContext creates a new GetRemoteClustersParams object -// with the ability to set a context for a request. -func NewGetRemoteClustersParamsWithContext(ctx context.Context) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - Context: ctx, - } -} - -// NewGetRemoteClustersParamsWithHTTPClient creates a new GetRemoteClustersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteClustersParamsWithHTTPClient(client *http.Client) *GetRemoteClustersParams { - return &GetRemoteClustersParams{ - HTTPClient: client, - } -} - -/* -GetRemoteClustersParams contains all the parameters to send to the API endpoint - - for the get remote clusters operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteClustersParams struct { - - /* ClusterIds. - - Specifies a list of Remote Cluster ids to filter. - */ - ClusterIds []int64 - - /* ClusterNames. - - Specifies a list of Remote Cluster names to filter. - */ - ClusterNames []string - - /* NodeAddresses. - - Specifies a list of Remote Cluster IPs to filter. - */ - NodeAddresses []string - - /* Purpose. - - Specifies the purpose for which the remote cluster is being registered. - */ - Purpose []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClustersParams) WithDefaults() *GetRemoteClustersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteClustersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get remote clusters params -func (o *GetRemoteClustersParams) WithTimeout(timeout time.Duration) *GetRemoteClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote clusters params -func (o *GetRemoteClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote clusters params -func (o *GetRemoteClustersParams) WithContext(ctx context.Context) *GetRemoteClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote clusters params -func (o *GetRemoteClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote clusters params -func (o *GetRemoteClustersParams) WithHTTPClient(client *http.Client) *GetRemoteClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote clusters params -func (o *GetRemoteClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterIds adds the clusterIds to the get remote clusters params -func (o *GetRemoteClustersParams) WithClusterIds(clusterIds []int64) *GetRemoteClustersParams { - o.SetClusterIds(clusterIds) - return o -} - -// SetClusterIds adds the clusterIds to the get remote clusters params -func (o *GetRemoteClustersParams) SetClusterIds(clusterIds []int64) { - o.ClusterIds = clusterIds -} - -// WithClusterNames adds the clusterNames to the get remote clusters params -func (o *GetRemoteClustersParams) WithClusterNames(clusterNames []string) *GetRemoteClustersParams { - o.SetClusterNames(clusterNames) - return o -} - -// SetClusterNames adds the clusterNames to the get remote clusters params -func (o *GetRemoteClustersParams) SetClusterNames(clusterNames []string) { - o.ClusterNames = clusterNames -} - -// WithNodeAddresses adds the nodeAddresses to the get remote clusters params -func (o *GetRemoteClustersParams) WithNodeAddresses(nodeAddresses []string) *GetRemoteClustersParams { - o.SetNodeAddresses(nodeAddresses) - return o -} - -// SetNodeAddresses adds the nodeAddresses to the get remote clusters params -func (o *GetRemoteClustersParams) SetNodeAddresses(nodeAddresses []string) { - o.NodeAddresses = nodeAddresses -} - -// WithPurpose adds the purpose to the get remote clusters params -func (o *GetRemoteClustersParams) WithPurpose(purpose []string) *GetRemoteClustersParams { - o.SetPurpose(purpose) - return o -} - -// SetPurpose adds the purpose to the get remote clusters params -func (o *GetRemoteClustersParams) SetPurpose(purpose []string) { - o.Purpose = purpose -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterIds != nil { - - // binding items for clusterIds - joinedClusterIds := o.bindParamClusterIds(reg) - - // query array param clusterIds - if err := r.SetQueryParam("clusterIds", joinedClusterIds...); err != nil { - return err - } - } - - if o.ClusterNames != nil { - - // binding items for clusterNames - joinedClusterNames := o.bindParamClusterNames(reg) - - // query array param clusterNames - if err := r.SetQueryParam("clusterNames", joinedClusterNames...); err != nil { - return err - } - } - - if o.NodeAddresses != nil { - - // binding items for nodeAddresses - joinedNodeAddresses := o.bindParamNodeAddresses(reg) - - // query array param nodeAddresses - if err := r.SetQueryParam("nodeAddresses", joinedNodeAddresses...); err != nil { - return err - } - } - - if o.Purpose != nil { - - // binding items for purpose - joinedPurpose := o.bindParamPurpose(reg) - - // query array param purpose - if err := r.SetQueryParam("purpose", joinedPurpose...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRemoteClusters binds the parameter clusterIds -func (o *GetRemoteClustersParams) bindParamClusterIds(formats strfmt.Registry) []string { - clusterIdsIR := o.ClusterIds - - var clusterIdsIC []string - for _, clusterIdsIIR := range clusterIdsIR { // explode []int64 - - clusterIdsIIV := swag.FormatInt64(clusterIdsIIR) // int64 as string - clusterIdsIC = append(clusterIdsIC, clusterIdsIIV) - } - - // items.CollectionFormat: "" - clusterIdsIS := swag.JoinByFormat(clusterIdsIC, "") - - return clusterIdsIS -} - -// bindParamGetRemoteClusters binds the parameter clusterNames -func (o *GetRemoteClustersParams) bindParamClusterNames(formats strfmt.Registry) []string { - clusterNamesIR := o.ClusterNames - - var clusterNamesIC []string - for _, clusterNamesIIR := range clusterNamesIR { // explode []string - - clusterNamesIIV := clusterNamesIIR // string as string - clusterNamesIC = append(clusterNamesIC, clusterNamesIIV) - } - - // items.CollectionFormat: "" - clusterNamesIS := swag.JoinByFormat(clusterNamesIC, "") - - return clusterNamesIS -} - -// bindParamGetRemoteClusters binds the parameter nodeAddresses -func (o *GetRemoteClustersParams) bindParamNodeAddresses(formats strfmt.Registry) []string { - nodeAddressesIR := o.NodeAddresses - - var nodeAddressesIC []string - for _, nodeAddressesIIR := range nodeAddressesIR { // explode []string - - nodeAddressesIIV := nodeAddressesIIR // string as string - nodeAddressesIC = append(nodeAddressesIC, nodeAddressesIIV) - } - - // items.CollectionFormat: "" - nodeAddressesIS := swag.JoinByFormat(nodeAddressesIC, "") - - return nodeAddressesIS -} - -// bindParamGetRemoteClusters binds the parameter purpose -func (o *GetRemoteClustersParams) bindParamPurpose(formats strfmt.Registry) []string { - purposeIR := o.Purpose - - var purposeIC []string - for _, purposeIIR := range purposeIR { // explode []string - - purposeIIV := purposeIIR // string as string - purposeIC = append(purposeIC, purposeIIV) - } - - // items.CollectionFormat: "" - purposeIS := swag.JoinByFormat(purposeIC, "") - - return purposeIS -} diff --git a/v2/client/remote_clusters/get_remote_clusters_responses.go b/v2/client/remote_clusters/get_remote_clusters_responses.go deleted file mode 100644 index 1bd62415..00000000 --- a/v2/client/remote_clusters/get_remote_clusters_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRemoteClustersReader is a Reader for the GetRemoteClusters structure. -type GetRemoteClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteClustersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteClustersDefault(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 - } -} - -// NewGetRemoteClustersOK creates a GetRemoteClustersOK with default headers values -func NewGetRemoteClustersOK() *GetRemoteClustersOK { - return &GetRemoteClustersOK{} -} - -/* -GetRemoteClustersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteClustersOK struct { - Payload *models.RemoteClusters -} - -// IsSuccess returns true when this get remote clusters o k response has a 2xx status code -func (o *GetRemoteClustersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote clusters o k response has a 3xx status code -func (o *GetRemoteClustersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote clusters o k response has a 4xx status code -func (o *GetRemoteClustersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote clusters o k response has a 5xx status code -func (o *GetRemoteClustersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote clusters o k response a status code equal to that given -func (o *GetRemoteClustersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote clusters o k response -func (o *GetRemoteClustersOK) Code() int { - return 200 -} - -func (o *GetRemoteClustersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters][%d] getRemoteClustersOK %s", 200, payload) -} - -func (o *GetRemoteClustersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters][%d] getRemoteClustersOK %s", 200, payload) -} - -func (o *GetRemoteClustersOK) GetPayload() *models.RemoteClusters { - return o.Payload -} - -func (o *GetRemoteClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteClusters) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteClustersDefault creates a GetRemoteClustersDefault with default headers values -func NewGetRemoteClustersDefault(code int) *GetRemoteClustersDefault { - return &GetRemoteClustersDefault{ - _statusCode: code, - } -} - -/* -GetRemoteClustersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteClustersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get remote clusters default response has a 2xx status code -func (o *GetRemoteClustersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote clusters default response has a 3xx status code -func (o *GetRemoteClustersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote clusters default response has a 4xx status code -func (o *GetRemoteClustersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote clusters default response has a 5xx status code -func (o *GetRemoteClustersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote clusters default response a status code equal to that given -func (o *GetRemoteClustersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote clusters default response -func (o *GetRemoteClustersDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteClustersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters][%d] GetRemoteClusters default %s", o._statusCode, payload) -} - -func (o *GetRemoteClustersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-clusters][%d] GetRemoteClusters default %s", o._statusCode, payload) -} - -func (o *GetRemoteClustersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRemoteClustersDefault) 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/remote_clusters/register_remote_cluster_parameters.go b/v2/client/remote_clusters/register_remote_cluster_parameters.go deleted file mode 100644 index 3de5936d..00000000 --- a/v2/client/remote_clusters/register_remote_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterRemoteClusterParams creates a new RegisterRemoteClusterParams 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 NewRegisterRemoteClusterParams() *RegisterRemoteClusterParams { - return &RegisterRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterRemoteClusterParamsWithTimeout creates a new RegisterRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewRegisterRemoteClusterParamsWithTimeout(timeout time.Duration) *RegisterRemoteClusterParams { - return &RegisterRemoteClusterParams{ - timeout: timeout, - } -} - -// NewRegisterRemoteClusterParamsWithContext creates a new RegisterRemoteClusterParams object -// with the ability to set a context for a request. -func NewRegisterRemoteClusterParamsWithContext(ctx context.Context) *RegisterRemoteClusterParams { - return &RegisterRemoteClusterParams{ - Context: ctx, - } -} - -// NewRegisterRemoteClusterParamsWithHTTPClient creates a new RegisterRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterRemoteClusterParamsWithHTTPClient(client *http.Client) *RegisterRemoteClusterParams { - return &RegisterRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -RegisterRemoteClusterParams contains all the parameters to send to the API endpoint - - for the register remote cluster operation. - - Typically these are written to a http.Request. -*/ -type RegisterRemoteClusterParams struct { - - /* Body. - - Specifies the request to register Remote Cluster. - */ - Body *models.RegisterRemoteClusterParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterRemoteClusterParams) WithDefaults() *RegisterRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register remote cluster params -func (o *RegisterRemoteClusterParams) WithTimeout(timeout time.Duration) *RegisterRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register remote cluster params -func (o *RegisterRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register remote cluster params -func (o *RegisterRemoteClusterParams) WithContext(ctx context.Context) *RegisterRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register remote cluster params -func (o *RegisterRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register remote cluster params -func (o *RegisterRemoteClusterParams) WithHTTPClient(client *http.Client) *RegisterRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register remote cluster params -func (o *RegisterRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register remote cluster params -func (o *RegisterRemoteClusterParams) WithBody(body *models.RegisterRemoteClusterParams) *RegisterRemoteClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register remote cluster params -func (o *RegisterRemoteClusterParams) SetBody(body *models.RegisterRemoteClusterParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterRemoteClusterParams) 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/remote_clusters/register_remote_cluster_responses.go b/v2/client/remote_clusters/register_remote_cluster_responses.go deleted file mode 100644 index 4117744c..00000000 --- a/v2/client/remote_clusters/register_remote_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterRemoteClusterReader is a Reader for the RegisterRemoteCluster structure. -type RegisterRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegisterRemoteClusterCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterRemoteClusterDefault(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 - } -} - -// NewRegisterRemoteClusterCreated creates a RegisterRemoteClusterCreated with default headers values -func NewRegisterRemoteClusterCreated() *RegisterRemoteClusterCreated { - return &RegisterRemoteClusterCreated{} -} - -/* -RegisterRemoteClusterCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegisterRemoteClusterCreated struct { - Payload *models.RemoteCluster -} - -// IsSuccess returns true when this register remote cluster created response has a 2xx status code -func (o *RegisterRemoteClusterCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register remote cluster created response has a 3xx status code -func (o *RegisterRemoteClusterCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register remote cluster created response has a 4xx status code -func (o *RegisterRemoteClusterCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this register remote cluster created response has a 5xx status code -func (o *RegisterRemoteClusterCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this register remote cluster created response a status code equal to that given -func (o *RegisterRemoteClusterCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the register remote cluster created response -func (o *RegisterRemoteClusterCreated) Code() int { - return 201 -} - -func (o *RegisterRemoteClusterCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters][%d] registerRemoteClusterCreated %s", 201, payload) -} - -func (o *RegisterRemoteClusterCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters][%d] registerRemoteClusterCreated %s", 201, payload) -} - -func (o *RegisterRemoteClusterCreated) GetPayload() *models.RemoteCluster { - return o.Payload -} - -func (o *RegisterRemoteClusterCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteCluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterRemoteClusterDefault creates a RegisterRemoteClusterDefault with default headers values -func NewRegisterRemoteClusterDefault(code int) *RegisterRemoteClusterDefault { - return &RegisterRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -RegisterRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterRemoteClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register remote cluster default response has a 2xx status code -func (o *RegisterRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register remote cluster default response has a 3xx status code -func (o *RegisterRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register remote cluster default response has a 4xx status code -func (o *RegisterRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register remote cluster default response has a 5xx status code -func (o *RegisterRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register remote cluster default response a status code equal to that given -func (o *RegisterRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register remote cluster default response -func (o *RegisterRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *RegisterRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters][%d] RegisterRemoteCluster default %s", o._statusCode, payload) -} - -func (o *RegisterRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters][%d] RegisterRemoteCluster default %s", o._statusCode, payload) -} - -func (o *RegisterRemoteClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterRemoteClusterDefault) 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/remote_clusters/remote_clusters_client.go b/v2/client/remote_clusters/remote_clusters_client.go deleted file mode 100644 index c89a3fd8..00000000 --- a/v2/client/remote_clusters/remote_clusters_client.go +++ /dev/null @@ -1,315 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new remote clusters API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new remote clusters API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new remote clusters API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for remote clusters API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteRemoteCluster(params *DeleteRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteClusterNoContent, error) - - GetRemoteClusterByID(params *GetRemoteClusterByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClusterByIDOK, error) - - GetRemoteClusters(params *GetRemoteClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClustersOK, error) - - RegisterRemoteCluster(params *RegisterRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterRemoteClusterCreated, error) - - UpdateRemoteCluster(params *UpdateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteClusterOK, error) - - ValidateRemoteCluster(params *ValidateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateRemoteClusterNoContent, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteRemoteCluster unregisters a remote cluster - -Unregister an external Remote Cluster. -*/ -func (a *Client) DeleteRemoteCluster(params *DeleteRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteClusterNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRemoteCluster", - Method: "DELETE", - PathPattern: "/remote-clusters/{clusterId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRemoteClusterReader{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.(*DeleteRemoteClusterNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRemoteClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRemoteClusterByID gets remote cluster config by id - -Get Remote Cluster config by cluster id. -*/ -func (a *Client) GetRemoteClusterByID(params *GetRemoteClusterByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClusterByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteClusterByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteClusterById", - Method: "GET", - PathPattern: "/remote-clusters/{clusterId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteClusterByIDReader{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.(*GetRemoteClusterByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteClusterByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRemoteClusters gets all registered remote clusters - -List the Remote Clusters that are registered on this local Cluster and that matches the filter criteria specified using parameters. -*/ -func (a *Client) GetRemoteClusters(params *GetRemoteClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteClustersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteClustersParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteClusters", - Method: "GET", - PathPattern: "/remote-clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteClustersReader{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.(*GetRemoteClustersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterRemoteCluster registers a remote cluster - -Register a Remote Cluster on this local cluster for remote access and/or replication. -*/ -func (a *Client) RegisterRemoteCluster(params *RegisterRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterRemoteClusterCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterRemoteCluster", - Method: "POST", - PathPattern: "/remote-clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterRemoteClusterReader{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.(*RegisterRemoteClusterCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterRemoteClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateRemoteCluster updates a remote cluster config - -Update the connection settings of the specified Remote Cluster that is registered on this Cluster. -*/ -func (a *Client) UpdateRemoteCluster(params *UpdateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRemoteCluster", - Method: "PUT", - PathPattern: "/remote-clusters/{clusterId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRemoteClusterReader{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.(*UpdateRemoteClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRemoteClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ValidateRemoteCluster validates remote cluster config - -Validate a Remote Cluster credentials. -*/ -func (a *Client) ValidateRemoteCluster(params *ValidateRemoteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateRemoteClusterNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewValidateRemoteClusterParams() - } - op := &runtime.ClientOperation{ - ID: "ValidateRemoteCluster", - Method: "POST", - PathPattern: "/remote-clusters/validate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ValidateRemoteClusterReader{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.(*ValidateRemoteClusterNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ValidateRemoteClusterDefault) - 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/v2/client/remote_clusters/update_remote_cluster_parameters.go b/v2/client/remote_clusters/update_remote_cluster_parameters.go deleted file mode 100644 index 40e685e4..00000000 --- a/v2/client/remote_clusters/update_remote_cluster_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateRemoteClusterParams creates a new UpdateRemoteClusterParams 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 NewUpdateRemoteClusterParams() *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRemoteClusterParamsWithTimeout creates a new UpdateRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewUpdateRemoteClusterParamsWithTimeout(timeout time.Duration) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - timeout: timeout, - } -} - -// NewUpdateRemoteClusterParamsWithContext creates a new UpdateRemoteClusterParams object -// with the ability to set a context for a request. -func NewUpdateRemoteClusterParamsWithContext(ctx context.Context) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - Context: ctx, - } -} - -// NewUpdateRemoteClusterParamsWithHTTPClient creates a new UpdateRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRemoteClusterParamsWithHTTPClient(client *http.Client) *UpdateRemoteClusterParams { - return &UpdateRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -UpdateRemoteClusterParams contains all the parameters to send to the API endpoint - - for the update remote cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdateRemoteClusterParams struct { - - /* Body. - - Specifies the request to update Remote Cluster config. - */ - Body *models.UpdateRemoteClusterParams - - /* ClusterID. - - Specifies the cluster id of the Remote Cluster to update. - - Format: int64 - */ - ClusterID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteClusterParams) WithDefaults() *UpdateRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithTimeout(timeout time.Duration) *UpdateRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithContext(ctx context.Context) *UpdateRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithHTTPClient(client *http.Client) *UpdateRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithBody(body *models.UpdateRemoteClusterParams) *UpdateRemoteClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetBody(body *models.UpdateRemoteClusterParams) { - o.Body = body -} - -// WithClusterID adds the clusterID to the update remote cluster params -func (o *UpdateRemoteClusterParams) WithClusterID(clusterID int64) *UpdateRemoteClusterParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the update remote cluster params -func (o *UpdateRemoteClusterParams) SetClusterID(clusterID int64) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRemoteClusterParams) 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 - } - } - - // path param clusterId - if err := r.SetPathParam("clusterId", swag.FormatInt64(o.ClusterID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_clusters/update_remote_cluster_responses.go b/v2/client/remote_clusters/update_remote_cluster_responses.go deleted file mode 100644 index 1eeb34e4..00000000 --- a/v2/client/remote_clusters/update_remote_cluster_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateRemoteClusterReader is a Reader for the UpdateRemoteCluster structure. -type UpdateRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRemoteClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRemoteClusterDefault(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 - } -} - -// NewUpdateRemoteClusterOK creates a UpdateRemoteClusterOK with default headers values -func NewUpdateRemoteClusterOK() *UpdateRemoteClusterOK { - return &UpdateRemoteClusterOK{} -} - -/* -UpdateRemoteClusterOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRemoteClusterOK struct { - Payload *models.RemoteCluster -} - -// IsSuccess returns true when this update remote cluster o k response has a 2xx status code -func (o *UpdateRemoteClusterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update remote cluster o k response has a 3xx status code -func (o *UpdateRemoteClusterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update remote cluster o k response has a 4xx status code -func (o *UpdateRemoteClusterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update remote cluster o k response has a 5xx status code -func (o *UpdateRemoteClusterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update remote cluster o k response a status code equal to that given -func (o *UpdateRemoteClusterOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update remote cluster o k response -func (o *UpdateRemoteClusterOK) Code() int { - return 200 -} - -func (o *UpdateRemoteClusterOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /remote-clusters/{clusterId}][%d] updateRemoteClusterOK %s", 200, payload) -} - -func (o *UpdateRemoteClusterOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /remote-clusters/{clusterId}][%d] updateRemoteClusterOK %s", 200, payload) -} - -func (o *UpdateRemoteClusterOK) GetPayload() *models.RemoteCluster { - return o.Payload -} - -func (o *UpdateRemoteClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteCluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRemoteClusterDefault creates a UpdateRemoteClusterDefault with default headers values -func NewUpdateRemoteClusterDefault(code int) *UpdateRemoteClusterDefault { - return &UpdateRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -UpdateRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRemoteClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update remote cluster default response has a 2xx status code -func (o *UpdateRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update remote cluster default response has a 3xx status code -func (o *UpdateRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update remote cluster default response has a 4xx status code -func (o *UpdateRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update remote cluster default response has a 5xx status code -func (o *UpdateRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update remote cluster default response a status code equal to that given -func (o *UpdateRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update remote cluster default response -func (o *UpdateRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /remote-clusters/{clusterId}][%d] UpdateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /remote-clusters/{clusterId}][%d] UpdateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateRemoteClusterDefault) 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/remote_clusters/validate_remote_cluster_parameters.go b/v2/client/remote_clusters/validate_remote_cluster_parameters.go deleted file mode 100644 index 04312fba..00000000 --- a/v2/client/remote_clusters/validate_remote_cluster_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewValidateRemoteClusterParams creates a new ValidateRemoteClusterParams 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 NewValidateRemoteClusterParams() *ValidateRemoteClusterParams { - return &ValidateRemoteClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewValidateRemoteClusterParamsWithTimeout creates a new ValidateRemoteClusterParams object -// with the ability to set a timeout on a request. -func NewValidateRemoteClusterParamsWithTimeout(timeout time.Duration) *ValidateRemoteClusterParams { - return &ValidateRemoteClusterParams{ - timeout: timeout, - } -} - -// NewValidateRemoteClusterParamsWithContext creates a new ValidateRemoteClusterParams object -// with the ability to set a context for a request. -func NewValidateRemoteClusterParamsWithContext(ctx context.Context) *ValidateRemoteClusterParams { - return &ValidateRemoteClusterParams{ - Context: ctx, - } -} - -// NewValidateRemoteClusterParamsWithHTTPClient creates a new ValidateRemoteClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewValidateRemoteClusterParamsWithHTTPClient(client *http.Client) *ValidateRemoteClusterParams { - return &ValidateRemoteClusterParams{ - HTTPClient: client, - } -} - -/* -ValidateRemoteClusterParams contains all the parameters to send to the API endpoint - - for the validate remote cluster operation. - - Typically these are written to a http.Request. -*/ -type ValidateRemoteClusterParams struct { - - /* Body. - - Specifies the request to validate Remote Cluster. - */ - Body *models.ValidateRemoteClusterConnectionParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the validate remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateRemoteClusterParams) WithDefaults() *ValidateRemoteClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the validate remote cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateRemoteClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the validate remote cluster params -func (o *ValidateRemoteClusterParams) WithTimeout(timeout time.Duration) *ValidateRemoteClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the validate remote cluster params -func (o *ValidateRemoteClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the validate remote cluster params -func (o *ValidateRemoteClusterParams) WithContext(ctx context.Context) *ValidateRemoteClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the validate remote cluster params -func (o *ValidateRemoteClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the validate remote cluster params -func (o *ValidateRemoteClusterParams) WithHTTPClient(client *http.Client) *ValidateRemoteClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the validate remote cluster params -func (o *ValidateRemoteClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the validate remote cluster params -func (o *ValidateRemoteClusterParams) WithBody(body *models.ValidateRemoteClusterConnectionParam) *ValidateRemoteClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the validate remote cluster params -func (o *ValidateRemoteClusterParams) SetBody(body *models.ValidateRemoteClusterConnectionParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ValidateRemoteClusterParams) 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/remote_clusters/validate_remote_cluster_responses.go b/v2/client/remote_clusters/validate_remote_cluster_responses.go deleted file mode 100644 index 0b12f4d0..00000000 --- a/v2/client/remote_clusters/validate_remote_cluster_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_clusters - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ValidateRemoteClusterReader is a Reader for the ValidateRemoteCluster structure. -type ValidateRemoteClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ValidateRemoteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewValidateRemoteClusterNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewValidateRemoteClusterDefault(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 - } -} - -// NewValidateRemoteClusterNoContent creates a ValidateRemoteClusterNoContent with default headers values -func NewValidateRemoteClusterNoContent() *ValidateRemoteClusterNoContent { - return &ValidateRemoteClusterNoContent{} -} - -/* -ValidateRemoteClusterNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ValidateRemoteClusterNoContent struct { -} - -// IsSuccess returns true when this validate remote cluster no content response has a 2xx status code -func (o *ValidateRemoteClusterNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this validate remote cluster no content response has a 3xx status code -func (o *ValidateRemoteClusterNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this validate remote cluster no content response has a 4xx status code -func (o *ValidateRemoteClusterNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this validate remote cluster no content response has a 5xx status code -func (o *ValidateRemoteClusterNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this validate remote cluster no content response a status code equal to that given -func (o *ValidateRemoteClusterNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the validate remote cluster no content response -func (o *ValidateRemoteClusterNoContent) Code() int { - return 204 -} - -func (o *ValidateRemoteClusterNoContent) Error() string { - return fmt.Sprintf("[POST /remote-clusters/validate][%d] validateRemoteClusterNoContent", 204) -} - -func (o *ValidateRemoteClusterNoContent) String() string { - return fmt.Sprintf("[POST /remote-clusters/validate][%d] validateRemoteClusterNoContent", 204) -} - -func (o *ValidateRemoteClusterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewValidateRemoteClusterDefault creates a ValidateRemoteClusterDefault with default headers values -func NewValidateRemoteClusterDefault(code int) *ValidateRemoteClusterDefault { - return &ValidateRemoteClusterDefault{ - _statusCode: code, - } -} - -/* -ValidateRemoteClusterDefault describes a response with status code -1, with default header values. - -Error -*/ -type ValidateRemoteClusterDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this validate remote cluster default response has a 2xx status code -func (o *ValidateRemoteClusterDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this validate remote cluster default response has a 3xx status code -func (o *ValidateRemoteClusterDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this validate remote cluster default response has a 4xx status code -func (o *ValidateRemoteClusterDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this validate remote cluster default response has a 5xx status code -func (o *ValidateRemoteClusterDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this validate remote cluster default response a status code equal to that given -func (o *ValidateRemoteClusterDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the validate remote cluster default response -func (o *ValidateRemoteClusterDefault) Code() int { - return o._statusCode -} - -func (o *ValidateRemoteClusterDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters/validate][%d] ValidateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *ValidateRemoteClusterDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-clusters/validate][%d] ValidateRemoteCluster default %s", o._statusCode, payload) -} - -func (o *ValidateRemoteClusterDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ValidateRemoteClusterDefault) 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/remote_storage/delete_remote_storage_registration_parameters.go b/v2/client/remote_storage/delete_remote_storage_registration_parameters.go deleted file mode 100644 index cef5b78d..00000000 --- a/v2/client/remote_storage/delete_remote_storage_registration_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/go-openapi/swag" -) - -// NewDeleteRemoteStorageRegistrationParams creates a new DeleteRemoteStorageRegistrationParams 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 NewDeleteRemoteStorageRegistrationParams() *DeleteRemoteStorageRegistrationParams { - return &DeleteRemoteStorageRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRemoteStorageRegistrationParamsWithTimeout creates a new DeleteRemoteStorageRegistrationParams object -// with the ability to set a timeout on a request. -func NewDeleteRemoteStorageRegistrationParamsWithTimeout(timeout time.Duration) *DeleteRemoteStorageRegistrationParams { - return &DeleteRemoteStorageRegistrationParams{ - timeout: timeout, - } -} - -// NewDeleteRemoteStorageRegistrationParamsWithContext creates a new DeleteRemoteStorageRegistrationParams object -// with the ability to set a context for a request. -func NewDeleteRemoteStorageRegistrationParamsWithContext(ctx context.Context) *DeleteRemoteStorageRegistrationParams { - return &DeleteRemoteStorageRegistrationParams{ - Context: ctx, - } -} - -// NewDeleteRemoteStorageRegistrationParamsWithHTTPClient creates a new DeleteRemoteStorageRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRemoteStorageRegistrationParamsWithHTTPClient(client *http.Client) *DeleteRemoteStorageRegistrationParams { - return &DeleteRemoteStorageRegistrationParams{ - HTTPClient: client, - } -} - -/* -DeleteRemoteStorageRegistrationParams contains all the parameters to send to the API endpoint - - for the delete remote storage registration operation. - - Typically these are written to a http.Request. -*/ -type DeleteRemoteStorageRegistrationParams struct { - - /* ID. - - Specifies the registration id of the registered remote storage. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete remote storage registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteStorageRegistrationParams) WithDefaults() *DeleteRemoteStorageRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete remote storage registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRemoteStorageRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) WithTimeout(timeout time.Duration) *DeleteRemoteStorageRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) WithContext(ctx context.Context) *DeleteRemoteStorageRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) WithHTTPClient(client *http.Client) *DeleteRemoteStorageRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) WithID(id int64) *DeleteRemoteStorageRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete remote storage registration params -func (o *DeleteRemoteStorageRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRemoteStorageRegistrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_storage/delete_remote_storage_registration_responses.go b/v2/client/remote_storage/delete_remote_storage_registration_responses.go deleted file mode 100644 index e065a3ac..00000000 --- a/v2/client/remote_storage/delete_remote_storage_registration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteRemoteStorageRegistrationReader is a Reader for the DeleteRemoteStorageRegistration structure. -type DeleteRemoteStorageRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRemoteStorageRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRemoteStorageRegistrationNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRemoteStorageRegistrationDefault(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 - } -} - -// NewDeleteRemoteStorageRegistrationNoContent creates a DeleteRemoteStorageRegistrationNoContent with default headers values -func NewDeleteRemoteStorageRegistrationNoContent() *DeleteRemoteStorageRegistrationNoContent { - return &DeleteRemoteStorageRegistrationNoContent{} -} - -/* -DeleteRemoteStorageRegistrationNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRemoteStorageRegistrationNoContent struct { -} - -// IsSuccess returns true when this delete remote storage registration no content response has a 2xx status code -func (o *DeleteRemoteStorageRegistrationNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete remote storage registration no content response has a 3xx status code -func (o *DeleteRemoteStorageRegistrationNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete remote storage registration no content response has a 4xx status code -func (o *DeleteRemoteStorageRegistrationNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete remote storage registration no content response has a 5xx status code -func (o *DeleteRemoteStorageRegistrationNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete remote storage registration no content response a status code equal to that given -func (o *DeleteRemoteStorageRegistrationNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete remote storage registration no content response -func (o *DeleteRemoteStorageRegistrationNoContent) Code() int { - return 204 -} - -func (o *DeleteRemoteStorageRegistrationNoContent) Error() string { - return fmt.Sprintf("[DELETE /remote-storage/{id}][%d] deleteRemoteStorageRegistrationNoContent", 204) -} - -func (o *DeleteRemoteStorageRegistrationNoContent) String() string { - return fmt.Sprintf("[DELETE /remote-storage/{id}][%d] deleteRemoteStorageRegistrationNoContent", 204) -} - -func (o *DeleteRemoteStorageRegistrationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRemoteStorageRegistrationDefault creates a DeleteRemoteStorageRegistrationDefault with default headers values -func NewDeleteRemoteStorageRegistrationDefault(code int) *DeleteRemoteStorageRegistrationDefault { - return &DeleteRemoteStorageRegistrationDefault{ - _statusCode: code, - } -} - -/* -DeleteRemoteStorageRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRemoteStorageRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete remote storage registration default response has a 2xx status code -func (o *DeleteRemoteStorageRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete remote storage registration default response has a 3xx status code -func (o *DeleteRemoteStorageRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete remote storage registration default response has a 4xx status code -func (o *DeleteRemoteStorageRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete remote storage registration default response has a 5xx status code -func (o *DeleteRemoteStorageRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete remote storage registration default response a status code equal to that given -func (o *DeleteRemoteStorageRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete remote storage registration default response -func (o *DeleteRemoteStorageRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRemoteStorageRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /remote-storage/{id}][%d] DeleteRemoteStorageRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteStorageRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /remote-storage/{id}][%d] DeleteRemoteStorageRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteRemoteStorageRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteRemoteStorageRegistrationDefault) 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/remote_storage/get_registered_remote_storage_list_parameters.go b/v2/client/remote_storage/get_registered_remote_storage_list_parameters.go deleted file mode 100644 index 39e79647..00000000 --- a/v2/client/remote_storage/get_registered_remote_storage_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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" -) - -// NewGetRegisteredRemoteStorageListParams creates a new GetRegisteredRemoteStorageListParams 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 NewGetRegisteredRemoteStorageListParams() *GetRegisteredRemoteStorageListParams { - return &GetRegisteredRemoteStorageListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRegisteredRemoteStorageListParamsWithTimeout creates a new GetRegisteredRemoteStorageListParams object -// with the ability to set a timeout on a request. -func NewGetRegisteredRemoteStorageListParamsWithTimeout(timeout time.Duration) *GetRegisteredRemoteStorageListParams { - return &GetRegisteredRemoteStorageListParams{ - timeout: timeout, - } -} - -// NewGetRegisteredRemoteStorageListParamsWithContext creates a new GetRegisteredRemoteStorageListParams object -// with the ability to set a context for a request. -func NewGetRegisteredRemoteStorageListParamsWithContext(ctx context.Context) *GetRegisteredRemoteStorageListParams { - return &GetRegisteredRemoteStorageListParams{ - Context: ctx, - } -} - -// NewGetRegisteredRemoteStorageListParamsWithHTTPClient creates a new GetRegisteredRemoteStorageListParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRegisteredRemoteStorageListParamsWithHTTPClient(client *http.Client) *GetRegisteredRemoteStorageListParams { - return &GetRegisteredRemoteStorageListParams{ - HTTPClient: client, - } -} - -/* -GetRegisteredRemoteStorageListParams contains all the parameters to send to the API endpoint - - for the get registered remote storage list operation. - - Typically these are written to a http.Request. -*/ -type GetRegisteredRemoteStorageListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get registered remote storage list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRegisteredRemoteStorageListParams) WithDefaults() *GetRegisteredRemoteStorageListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get registered remote storage list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRegisteredRemoteStorageListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) WithTimeout(timeout time.Duration) *GetRegisteredRemoteStorageListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) WithContext(ctx context.Context) *GetRegisteredRemoteStorageListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) WithHTTPClient(client *http.Client) *GetRegisteredRemoteStorageListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get registered remote storage list params -func (o *GetRegisteredRemoteStorageListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRegisteredRemoteStorageListParams) 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/remote_storage/get_registered_remote_storage_list_responses.go b/v2/client/remote_storage/get_registered_remote_storage_list_responses.go deleted file mode 100644 index 3d8663e3..00000000 --- a/v2/client/remote_storage/get_registered_remote_storage_list_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRegisteredRemoteStorageListReader is a Reader for the GetRegisteredRemoteStorageList structure. -type GetRegisteredRemoteStorageListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRegisteredRemoteStorageListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRegisteredRemoteStorageListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRegisteredRemoteStorageListDefault(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 - } -} - -// NewGetRegisteredRemoteStorageListOK creates a GetRegisteredRemoteStorageListOK with default headers values -func NewGetRegisteredRemoteStorageListOK() *GetRegisteredRemoteStorageListOK { - return &GetRegisteredRemoteStorageListOK{} -} - -/* -GetRegisteredRemoteStorageListOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRegisteredRemoteStorageListOK struct { - Payload *models.RegisteredRemoteStorageList -} - -// IsSuccess returns true when this get registered remote storage list o k response has a 2xx status code -func (o *GetRegisteredRemoteStorageListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get registered remote storage list o k response has a 3xx status code -func (o *GetRegisteredRemoteStorageListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get registered remote storage list o k response has a 4xx status code -func (o *GetRegisteredRemoteStorageListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get registered remote storage list o k response has a 5xx status code -func (o *GetRegisteredRemoteStorageListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get registered remote storage list o k response a status code equal to that given -func (o *GetRegisteredRemoteStorageListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get registered remote storage list o k response -func (o *GetRegisteredRemoteStorageListOK) Code() int { - return 200 -} - -func (o *GetRegisteredRemoteStorageListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage][%d] getRegisteredRemoteStorageListOK %s", 200, payload) -} - -func (o *GetRegisteredRemoteStorageListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage][%d] getRegisteredRemoteStorageListOK %s", 200, payload) -} - -func (o *GetRegisteredRemoteStorageListOK) GetPayload() *models.RegisteredRemoteStorageList { - return o.Payload -} - -func (o *GetRegisteredRemoteStorageListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RegisteredRemoteStorageList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRegisteredRemoteStorageListDefault creates a GetRegisteredRemoteStorageListDefault with default headers values -func NewGetRegisteredRemoteStorageListDefault(code int) *GetRegisteredRemoteStorageListDefault { - return &GetRegisteredRemoteStorageListDefault{ - _statusCode: code, - } -} - -/* -GetRegisteredRemoteStorageListDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRegisteredRemoteStorageListDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get registered remote storage list default response has a 2xx status code -func (o *GetRegisteredRemoteStorageListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get registered remote storage list default response has a 3xx status code -func (o *GetRegisteredRemoteStorageListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get registered remote storage list default response has a 4xx status code -func (o *GetRegisteredRemoteStorageListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get registered remote storage list default response has a 5xx status code -func (o *GetRegisteredRemoteStorageListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get registered remote storage list default response a status code equal to that given -func (o *GetRegisteredRemoteStorageListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get registered remote storage list default response -func (o *GetRegisteredRemoteStorageListDefault) Code() int { - return o._statusCode -} - -func (o *GetRegisteredRemoteStorageListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage][%d] GetRegisteredRemoteStorageList default %s", o._statusCode, payload) -} - -func (o *GetRegisteredRemoteStorageListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage][%d] GetRegisteredRemoteStorageList default %s", o._statusCode, payload) -} - -func (o *GetRegisteredRemoteStorageListDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRegisteredRemoteStorageListDefault) 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/remote_storage/get_remote_storage_details_parameters.go b/v2/client/remote_storage/get_remote_storage_details_parameters.go deleted file mode 100644 index d14b1578..00000000 --- a/v2/client/remote_storage/get_remote_storage_details_parameters.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/go-openapi/swag" -) - -// NewGetRemoteStorageDetailsParams creates a new GetRemoteStorageDetailsParams 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 NewGetRemoteStorageDetailsParams() *GetRemoteStorageDetailsParams { - return &GetRemoteStorageDetailsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRemoteStorageDetailsParamsWithTimeout creates a new GetRemoteStorageDetailsParams object -// with the ability to set a timeout on a request. -func NewGetRemoteStorageDetailsParamsWithTimeout(timeout time.Duration) *GetRemoteStorageDetailsParams { - return &GetRemoteStorageDetailsParams{ - timeout: timeout, - } -} - -// NewGetRemoteStorageDetailsParamsWithContext creates a new GetRemoteStorageDetailsParams object -// with the ability to set a context for a request. -func NewGetRemoteStorageDetailsParamsWithContext(ctx context.Context) *GetRemoteStorageDetailsParams { - return &GetRemoteStorageDetailsParams{ - Context: ctx, - } -} - -// NewGetRemoteStorageDetailsParamsWithHTTPClient creates a new GetRemoteStorageDetailsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRemoteStorageDetailsParamsWithHTTPClient(client *http.Client) *GetRemoteStorageDetailsParams { - return &GetRemoteStorageDetailsParams{ - HTTPClient: client, - } -} - -/* -GetRemoteStorageDetailsParams contains all the parameters to send to the API endpoint - - for the get remote storage details operation. - - Typically these are written to a http.Request. -*/ -type GetRemoteStorageDetailsParams struct { - - /* ID. - - Specifies the id of the registered remote storage. - - Format: int64 - */ - ID int64 - - /* IncludeArrayInfo. - - Includes flashblade specific info like name, software os and version of pure flashblade. - */ - IncludeArrayInfo *bool - - /* IncludeAvailableDataVips. - - Specifies whether to include available data vips on remote storage. - */ - IncludeAvailableDataVips *bool - - /* IncludeAvailableSpace. - - Specifies whether to include available capacity on remote storage. - */ - IncludeAvailableSpace *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get remote storage details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteStorageDetailsParams) WithDefaults() *GetRemoteStorageDetailsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get remote storage details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRemoteStorageDetailsParams) SetDefaults() { - var ( - includeArrayInfoDefault = bool(false) - - includeAvailableDataVipsDefault = bool(false) - - includeAvailableSpaceDefault = bool(false) - ) - - val := GetRemoteStorageDetailsParams{ - IncludeArrayInfo: &includeArrayInfoDefault, - IncludeAvailableDataVips: &includeAvailableDataVipsDefault, - IncludeAvailableSpace: &includeAvailableSpaceDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithTimeout(timeout time.Duration) *GetRemoteStorageDetailsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithContext(ctx context.Context) *GetRemoteStorageDetailsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithHTTPClient(client *http.Client) *GetRemoteStorageDetailsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithID(id int64) *GetRemoteStorageDetailsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeArrayInfo adds the includeArrayInfo to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithIncludeArrayInfo(includeArrayInfo *bool) *GetRemoteStorageDetailsParams { - o.SetIncludeArrayInfo(includeArrayInfo) - return o -} - -// SetIncludeArrayInfo adds the includeArrayInfo to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetIncludeArrayInfo(includeArrayInfo *bool) { - o.IncludeArrayInfo = includeArrayInfo -} - -// WithIncludeAvailableDataVips adds the includeAvailableDataVips to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithIncludeAvailableDataVips(includeAvailableDataVips *bool) *GetRemoteStorageDetailsParams { - o.SetIncludeAvailableDataVips(includeAvailableDataVips) - return o -} - -// SetIncludeAvailableDataVips adds the includeAvailableDataVips to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetIncludeAvailableDataVips(includeAvailableDataVips *bool) { - o.IncludeAvailableDataVips = includeAvailableDataVips -} - -// WithIncludeAvailableSpace adds the includeAvailableSpace to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) WithIncludeAvailableSpace(includeAvailableSpace *bool) *GetRemoteStorageDetailsParams { - o.SetIncludeAvailableSpace(includeAvailableSpace) - return o -} - -// SetIncludeAvailableSpace adds the includeAvailableSpace to the get remote storage details params -func (o *GetRemoteStorageDetailsParams) SetIncludeAvailableSpace(includeAvailableSpace *bool) { - o.IncludeAvailableSpace = includeAvailableSpace -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRemoteStorageDetailsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.IncludeArrayInfo != nil { - - // query param includeArrayInfo - var qrIncludeArrayInfo bool - - if o.IncludeArrayInfo != nil { - qrIncludeArrayInfo = *o.IncludeArrayInfo - } - qIncludeArrayInfo := swag.FormatBool(qrIncludeArrayInfo) - if qIncludeArrayInfo != "" { - - if err := r.SetQueryParam("includeArrayInfo", qIncludeArrayInfo); err != nil { - return err - } - } - } - - if o.IncludeAvailableDataVips != nil { - - // query param includeAvailableDataVips - var qrIncludeAvailableDataVips bool - - if o.IncludeAvailableDataVips != nil { - qrIncludeAvailableDataVips = *o.IncludeAvailableDataVips - } - qIncludeAvailableDataVips := swag.FormatBool(qrIncludeAvailableDataVips) - if qIncludeAvailableDataVips != "" { - - if err := r.SetQueryParam("includeAvailableDataVips", qIncludeAvailableDataVips); err != nil { - return err - } - } - } - - if o.IncludeAvailableSpace != nil { - - // query param includeAvailableSpace - var qrIncludeAvailableSpace bool - - if o.IncludeAvailableSpace != nil { - qrIncludeAvailableSpace = *o.IncludeAvailableSpace - } - qIncludeAvailableSpace := swag.FormatBool(qrIncludeAvailableSpace) - if qIncludeAvailableSpace != "" { - - if err := r.SetQueryParam("includeAvailableSpace", qIncludeAvailableSpace); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_storage/get_remote_storage_details_responses.go b/v2/client/remote_storage/get_remote_storage_details_responses.go deleted file mode 100644 index 0d30603d..00000000 --- a/v2/client/remote_storage/get_remote_storage_details_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRemoteStorageDetailsReader is a Reader for the GetRemoteStorageDetails structure. -type GetRemoteStorageDetailsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRemoteStorageDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRemoteStorageDetailsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRemoteStorageDetailsDefault(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 - } -} - -// NewGetRemoteStorageDetailsOK creates a GetRemoteStorageDetailsOK with default headers values -func NewGetRemoteStorageDetailsOK() *GetRemoteStorageDetailsOK { - return &GetRemoteStorageDetailsOK{} -} - -/* -GetRemoteStorageDetailsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRemoteStorageDetailsOK struct { - Payload *models.RemoteStorageInfo -} - -// IsSuccess returns true when this get remote storage details o k response has a 2xx status code -func (o *GetRemoteStorageDetailsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get remote storage details o k response has a 3xx status code -func (o *GetRemoteStorageDetailsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get remote storage details o k response has a 4xx status code -func (o *GetRemoteStorageDetailsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get remote storage details o k response has a 5xx status code -func (o *GetRemoteStorageDetailsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get remote storage details o k response a status code equal to that given -func (o *GetRemoteStorageDetailsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get remote storage details o k response -func (o *GetRemoteStorageDetailsOK) Code() int { - return 200 -} - -func (o *GetRemoteStorageDetailsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage/{id}][%d] getRemoteStorageDetailsOK %s", 200, payload) -} - -func (o *GetRemoteStorageDetailsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage/{id}][%d] getRemoteStorageDetailsOK %s", 200, payload) -} - -func (o *GetRemoteStorageDetailsOK) GetPayload() *models.RemoteStorageInfo { - return o.Payload -} - -func (o *GetRemoteStorageDetailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteStorageInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRemoteStorageDetailsDefault creates a GetRemoteStorageDetailsDefault with default headers values -func NewGetRemoteStorageDetailsDefault(code int) *GetRemoteStorageDetailsDefault { - return &GetRemoteStorageDetailsDefault{ - _statusCode: code, - } -} - -/* -GetRemoteStorageDetailsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRemoteStorageDetailsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get remote storage details default response has a 2xx status code -func (o *GetRemoteStorageDetailsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get remote storage details default response has a 3xx status code -func (o *GetRemoteStorageDetailsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get remote storage details default response has a 4xx status code -func (o *GetRemoteStorageDetailsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get remote storage details default response has a 5xx status code -func (o *GetRemoteStorageDetailsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get remote storage details default response a status code equal to that given -func (o *GetRemoteStorageDetailsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get remote storage details default response -func (o *GetRemoteStorageDetailsDefault) Code() int { - return o._statusCode -} - -func (o *GetRemoteStorageDetailsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage/{id}][%d] GetRemoteStorageDetails default %s", o._statusCode, payload) -} - -func (o *GetRemoteStorageDetailsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /remote-storage/{id}][%d] GetRemoteStorageDetails default %s", o._statusCode, payload) -} - -func (o *GetRemoteStorageDetailsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRemoteStorageDetailsDefault) 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/remote_storage/register_new_remote_storage_parameters.go b/v2/client/remote_storage/register_new_remote_storage_parameters.go deleted file mode 100644 index b96e4910..00000000 --- a/v2/client/remote_storage/register_new_remote_storage_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterNewRemoteStorageParams creates a new RegisterNewRemoteStorageParams 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 NewRegisterNewRemoteStorageParams() *RegisterNewRemoteStorageParams { - return &RegisterNewRemoteStorageParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterNewRemoteStorageParamsWithTimeout creates a new RegisterNewRemoteStorageParams object -// with the ability to set a timeout on a request. -func NewRegisterNewRemoteStorageParamsWithTimeout(timeout time.Duration) *RegisterNewRemoteStorageParams { - return &RegisterNewRemoteStorageParams{ - timeout: timeout, - } -} - -// NewRegisterNewRemoteStorageParamsWithContext creates a new RegisterNewRemoteStorageParams object -// with the ability to set a context for a request. -func NewRegisterNewRemoteStorageParamsWithContext(ctx context.Context) *RegisterNewRemoteStorageParams { - return &RegisterNewRemoteStorageParams{ - Context: ctx, - } -} - -// NewRegisterNewRemoteStorageParamsWithHTTPClient creates a new RegisterNewRemoteStorageParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterNewRemoteStorageParamsWithHTTPClient(client *http.Client) *RegisterNewRemoteStorageParams { - return &RegisterNewRemoteStorageParams{ - HTTPClient: client, - } -} - -/* -RegisterNewRemoteStorageParams contains all the parameters to send to the API endpoint - - for the register new remote storage operation. - - Typically these are written to a http.Request. -*/ -type RegisterNewRemoteStorageParams struct { - - /* Body. - - Specifies the parameters to register a remote storage management server. - */ - Body *models.RemoteStorageInfo - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register new remote storage params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterNewRemoteStorageParams) WithDefaults() *RegisterNewRemoteStorageParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register new remote storage params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterNewRemoteStorageParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) WithTimeout(timeout time.Duration) *RegisterNewRemoteStorageParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) WithContext(ctx context.Context) *RegisterNewRemoteStorageParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) WithHTTPClient(client *http.Client) *RegisterNewRemoteStorageParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) WithBody(body *models.RemoteStorageInfo) *RegisterNewRemoteStorageParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register new remote storage params -func (o *RegisterNewRemoteStorageParams) SetBody(body *models.RemoteStorageInfo) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterNewRemoteStorageParams) 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/remote_storage/register_new_remote_storage_responses.go b/v2/client/remote_storage/register_new_remote_storage_responses.go deleted file mode 100644 index e2ec753f..00000000 --- a/v2/client/remote_storage/register_new_remote_storage_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterNewRemoteStorageReader is a Reader for the RegisterNewRemoteStorage structure. -type RegisterNewRemoteStorageReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterNewRemoteStorageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegisterNewRemoteStorageCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterNewRemoteStorageDefault(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 - } -} - -// NewRegisterNewRemoteStorageCreated creates a RegisterNewRemoteStorageCreated with default headers values -func NewRegisterNewRemoteStorageCreated() *RegisterNewRemoteStorageCreated { - return &RegisterNewRemoteStorageCreated{} -} - -/* -RegisterNewRemoteStorageCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegisterNewRemoteStorageCreated struct { - Payload *models.RemoteStorageInfo -} - -// IsSuccess returns true when this register new remote storage created response has a 2xx status code -func (o *RegisterNewRemoteStorageCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register new remote storage created response has a 3xx status code -func (o *RegisterNewRemoteStorageCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register new remote storage created response has a 4xx status code -func (o *RegisterNewRemoteStorageCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this register new remote storage created response has a 5xx status code -func (o *RegisterNewRemoteStorageCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this register new remote storage created response a status code equal to that given -func (o *RegisterNewRemoteStorageCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the register new remote storage created response -func (o *RegisterNewRemoteStorageCreated) Code() int { - return 201 -} - -func (o *RegisterNewRemoteStorageCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-storage][%d] registerNewRemoteStorageCreated %s", 201, payload) -} - -func (o *RegisterNewRemoteStorageCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-storage][%d] registerNewRemoteStorageCreated %s", 201, payload) -} - -func (o *RegisterNewRemoteStorageCreated) GetPayload() *models.RemoteStorageInfo { - return o.Payload -} - -func (o *RegisterNewRemoteStorageCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteStorageInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterNewRemoteStorageDefault creates a RegisterNewRemoteStorageDefault with default headers values -func NewRegisterNewRemoteStorageDefault(code int) *RegisterNewRemoteStorageDefault { - return &RegisterNewRemoteStorageDefault{ - _statusCode: code, - } -} - -/* -RegisterNewRemoteStorageDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterNewRemoteStorageDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register new remote storage default response has a 2xx status code -func (o *RegisterNewRemoteStorageDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register new remote storage default response has a 3xx status code -func (o *RegisterNewRemoteStorageDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register new remote storage default response has a 4xx status code -func (o *RegisterNewRemoteStorageDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register new remote storage default response has a 5xx status code -func (o *RegisterNewRemoteStorageDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register new remote storage default response a status code equal to that given -func (o *RegisterNewRemoteStorageDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register new remote storage default response -func (o *RegisterNewRemoteStorageDefault) Code() int { - return o._statusCode -} - -func (o *RegisterNewRemoteStorageDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-storage][%d] RegisterNewRemoteStorage default %s", o._statusCode, payload) -} - -func (o *RegisterNewRemoteStorageDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /remote-storage][%d] RegisterNewRemoteStorage default %s", o._statusCode, payload) -} - -func (o *RegisterNewRemoteStorageDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterNewRemoteStorageDefault) 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/remote_storage/remote_storage_client.go b/v2/client/remote_storage/remote_storage_client.go deleted file mode 100644 index 3eea59a9..00000000 --- a/v2/client/remote_storage/remote_storage_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new remote storage API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new remote storage API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new remote storage API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for remote storage API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteRemoteStorageRegistration(params *DeleteRemoteStorageRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteStorageRegistrationNoContent, error) - - GetRegisteredRemoteStorageList(params *GetRegisteredRemoteStorageListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRegisteredRemoteStorageListOK, error) - - GetRemoteStorageDetails(params *GetRemoteStorageDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteStorageDetailsOK, error) - - RegisterNewRemoteStorage(params *RegisterNewRemoteStorageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterNewRemoteStorageCreated, error) - - UpdateRemoteStorageRegistration(params *UpdateRemoteStorageRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteStorageRegistrationOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteRemoteStorageRegistration deletes remote storage registration - -Delete remote storage registration. -*/ -func (a *Client) DeleteRemoteStorageRegistration(params *DeleteRemoteStorageRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRemoteStorageRegistrationNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRemoteStorageRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRemoteStorageRegistration", - Method: "DELETE", - PathPattern: "/remote-storage/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRemoteStorageRegistrationReader{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.(*DeleteRemoteStorageRegistrationNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRemoteStorageRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRegisteredRemoteStorageList gets registered remote storage servers list - -Get summary about list of registered remote storage servers. -*/ -func (a *Client) GetRegisteredRemoteStorageList(params *GetRegisteredRemoteStorageListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRegisteredRemoteStorageListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRegisteredRemoteStorageListParams() - } - op := &runtime.ClientOperation{ - ID: "GetRegisteredRemoteStorageList", - Method: "GET", - PathPattern: "/remote-storage", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRegisteredRemoteStorageListReader{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.(*GetRegisteredRemoteStorageListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRegisteredRemoteStorageListDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRemoteStorageDetails gets remote storage details - -Get details of remote storage given by id. -*/ -func (a *Client) GetRemoteStorageDetails(params *GetRemoteStorageDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRemoteStorageDetailsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRemoteStorageDetailsParams() - } - op := &runtime.ClientOperation{ - ID: "GetRemoteStorageDetails", - Method: "GET", - PathPattern: "/remote-storage/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRemoteStorageDetailsReader{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.(*GetRemoteStorageDetailsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRemoteStorageDetailsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterNewRemoteStorage registers remote storage - -Register a remote storage to be used for disaggregated storage. -*/ -func (a *Client) RegisterNewRemoteStorage(params *RegisterNewRemoteStorageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterNewRemoteStorageCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterNewRemoteStorageParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterNewRemoteStorage", - Method: "POST", - PathPattern: "/remote-storage", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterNewRemoteStorageReader{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.(*RegisterNewRemoteStorageCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterNewRemoteStorageDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateRemoteStorageRegistration updates remote storage config - -Update Registered Remote Storage Config. -*/ -func (a *Client) UpdateRemoteStorageRegistration(params *UpdateRemoteStorageRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRemoteStorageRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRemoteStorageRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRemoteStorageRegistration", - Method: "PATCH", - PathPattern: "/remote-storage/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRemoteStorageRegistrationReader{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.(*UpdateRemoteStorageRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRemoteStorageRegistrationDefault) - 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/v2/client/remote_storage/update_remote_storage_registration_parameters.go b/v2/client/remote_storage/update_remote_storage_registration_parameters.go deleted file mode 100644 index 749e3d79..00000000 --- a/v2/client/remote_storage/update_remote_storage_registration_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateRemoteStorageRegistrationParams creates a new UpdateRemoteStorageRegistrationParams 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 NewUpdateRemoteStorageRegistrationParams() *UpdateRemoteStorageRegistrationParams { - return &UpdateRemoteStorageRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRemoteStorageRegistrationParamsWithTimeout creates a new UpdateRemoteStorageRegistrationParams object -// with the ability to set a timeout on a request. -func NewUpdateRemoteStorageRegistrationParamsWithTimeout(timeout time.Duration) *UpdateRemoteStorageRegistrationParams { - return &UpdateRemoteStorageRegistrationParams{ - timeout: timeout, - } -} - -// NewUpdateRemoteStorageRegistrationParamsWithContext creates a new UpdateRemoteStorageRegistrationParams object -// with the ability to set a context for a request. -func NewUpdateRemoteStorageRegistrationParamsWithContext(ctx context.Context) *UpdateRemoteStorageRegistrationParams { - return &UpdateRemoteStorageRegistrationParams{ - Context: ctx, - } -} - -// NewUpdateRemoteStorageRegistrationParamsWithHTTPClient creates a new UpdateRemoteStorageRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRemoteStorageRegistrationParamsWithHTTPClient(client *http.Client) *UpdateRemoteStorageRegistrationParams { - return &UpdateRemoteStorageRegistrationParams{ - HTTPClient: client, - } -} - -/* -UpdateRemoteStorageRegistrationParams contains all the parameters to send to the API endpoint - - for the update remote storage registration operation. - - Typically these are written to a http.Request. -*/ -type UpdateRemoteStorageRegistrationParams struct { - - /* Body. - - Specifies the parameters to update the registration. - */ - Body *models.RemoteStorageInfo - - /* ID. - - Specifies the registration id of the registered remote storage. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update remote storage registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteStorageRegistrationParams) WithDefaults() *UpdateRemoteStorageRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update remote storage registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRemoteStorageRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) WithTimeout(timeout time.Duration) *UpdateRemoteStorageRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) WithContext(ctx context.Context) *UpdateRemoteStorageRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) WithHTTPClient(client *http.Client) *UpdateRemoteStorageRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) WithBody(body *models.RemoteStorageInfo) *UpdateRemoteStorageRegistrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) SetBody(body *models.RemoteStorageInfo) { - o.Body = body -} - -// WithID adds the id to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) WithID(id int64) *UpdateRemoteStorageRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update remote storage registration params -func (o *UpdateRemoteStorageRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRemoteStorageRegistrationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/remote_storage/update_remote_storage_registration_responses.go b/v2/client/remote_storage/update_remote_storage_registration_responses.go deleted file mode 100644 index d1991eb2..00000000 --- a/v2/client/remote_storage/update_remote_storage_registration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package remote_storage - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateRemoteStorageRegistrationReader is a Reader for the UpdateRemoteStorageRegistration structure. -type UpdateRemoteStorageRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRemoteStorageRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRemoteStorageRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRemoteStorageRegistrationDefault(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 - } -} - -// NewUpdateRemoteStorageRegistrationOK creates a UpdateRemoteStorageRegistrationOK with default headers values -func NewUpdateRemoteStorageRegistrationOK() *UpdateRemoteStorageRegistrationOK { - return &UpdateRemoteStorageRegistrationOK{} -} - -/* -UpdateRemoteStorageRegistrationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRemoteStorageRegistrationOK struct { - Payload *models.RemoteStorageInfo -} - -// IsSuccess returns true when this update remote storage registration o k response has a 2xx status code -func (o *UpdateRemoteStorageRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update remote storage registration o k response has a 3xx status code -func (o *UpdateRemoteStorageRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update remote storage registration o k response has a 4xx status code -func (o *UpdateRemoteStorageRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update remote storage registration o k response has a 5xx status code -func (o *UpdateRemoteStorageRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update remote storage registration o k response a status code equal to that given -func (o *UpdateRemoteStorageRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update remote storage registration o k response -func (o *UpdateRemoteStorageRegistrationOK) Code() int { - return 200 -} - -func (o *UpdateRemoteStorageRegistrationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /remote-storage/{id}][%d] updateRemoteStorageRegistrationOK %s", 200, payload) -} - -func (o *UpdateRemoteStorageRegistrationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /remote-storage/{id}][%d] updateRemoteStorageRegistrationOK %s", 200, payload) -} - -func (o *UpdateRemoteStorageRegistrationOK) GetPayload() *models.RemoteStorageInfo { - return o.Payload -} - -func (o *UpdateRemoteStorageRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RemoteStorageInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRemoteStorageRegistrationDefault creates a UpdateRemoteStorageRegistrationDefault with default headers values -func NewUpdateRemoteStorageRegistrationDefault(code int) *UpdateRemoteStorageRegistrationDefault { - return &UpdateRemoteStorageRegistrationDefault{ - _statusCode: code, - } -} - -/* -UpdateRemoteStorageRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRemoteStorageRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update remote storage registration default response has a 2xx status code -func (o *UpdateRemoteStorageRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update remote storage registration default response has a 3xx status code -func (o *UpdateRemoteStorageRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update remote storage registration default response has a 4xx status code -func (o *UpdateRemoteStorageRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update remote storage registration default response has a 5xx status code -func (o *UpdateRemoteStorageRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update remote storage registration default response a status code equal to that given -func (o *UpdateRemoteStorageRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update remote storage registration default response -func (o *UpdateRemoteStorageRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRemoteStorageRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /remote-storage/{id}][%d] UpdateRemoteStorageRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteStorageRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /remote-storage/{id}][%d] UpdateRemoteStorageRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateRemoteStorageRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateRemoteStorageRegistrationDefault) 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/role/create_role_parameters.go b/v2/client/role/create_role_parameters.go deleted file mode 100644 index b825a354..00000000 --- a/v2/client/role/create_role_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateRoleParams creates a new CreateRoleParams 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 NewCreateRoleParams() *CreateRoleParams { - return &CreateRoleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRoleParamsWithTimeout creates a new CreateRoleParams object -// with the ability to set a timeout on a request. -func NewCreateRoleParamsWithTimeout(timeout time.Duration) *CreateRoleParams { - return &CreateRoleParams{ - timeout: timeout, - } -} - -// NewCreateRoleParamsWithContext creates a new CreateRoleParams object -// with the ability to set a context for a request. -func NewCreateRoleParamsWithContext(ctx context.Context) *CreateRoleParams { - return &CreateRoleParams{ - Context: ctx, - } -} - -// NewCreateRoleParamsWithHTTPClient creates a new CreateRoleParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateRoleParamsWithHTTPClient(client *http.Client) *CreateRoleParams { - return &CreateRoleParams{ - HTTPClient: client, - } -} - -/* -CreateRoleParams contains all the parameters to send to the API endpoint - - for the create role operation. - - Typically these are written to a http.Request. -*/ -type CreateRoleParams struct { - - /* Body. - - Specifies the request body to create a Role. - */ - Body *models.CreateRoleParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRoleParams) WithDefaults() *CreateRoleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateRoleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create role params -func (o *CreateRoleParams) WithTimeout(timeout time.Duration) *CreateRoleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create role params -func (o *CreateRoleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create role params -func (o *CreateRoleParams) WithContext(ctx context.Context) *CreateRoleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create role params -func (o *CreateRoleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create role params -func (o *CreateRoleParams) WithHTTPClient(client *http.Client) *CreateRoleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create role params -func (o *CreateRoleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create role params -func (o *CreateRoleParams) WithBody(body *models.CreateRoleParameters) *CreateRoleParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create role params -func (o *CreateRoleParams) SetBody(body *models.CreateRoleParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRoleParams) 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/role/create_role_responses.go b/v2/client/role/create_role_responses.go deleted file mode 100644 index 7b8de9c8..00000000 --- a/v2/client/role/create_role_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateRoleReader is a Reader for the CreateRole structure. -type CreateRoleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRoleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateRoleCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateRoleDefault(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 - } -} - -// NewCreateRoleCreated creates a CreateRoleCreated with default headers values -func NewCreateRoleCreated() *CreateRoleCreated { - return &CreateRoleCreated{} -} - -/* -CreateRoleCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateRoleCreated struct { - Payload *models.Role -} - -// IsSuccess returns true when this create role created response has a 2xx status code -func (o *CreateRoleCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create role created response has a 3xx status code -func (o *CreateRoleCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create role created response has a 4xx status code -func (o *CreateRoleCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create role created response has a 5xx status code -func (o *CreateRoleCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create role created response a status code equal to that given -func (o *CreateRoleCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create role created response -func (o *CreateRoleCreated) Code() int { - return 201 -} - -func (o *CreateRoleCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /roles][%d] createRoleCreated %s", 201, payload) -} - -func (o *CreateRoleCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /roles][%d] createRoleCreated %s", 201, payload) -} - -func (o *CreateRoleCreated) GetPayload() *models.Role { - return o.Payload -} - -func (o *CreateRoleCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Role) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRoleDefault creates a CreateRoleDefault with default headers values -func NewCreateRoleDefault(code int) *CreateRoleDefault { - return &CreateRoleDefault{ - _statusCode: code, - } -} - -/* -CreateRoleDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateRoleDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create role default response has a 2xx status code -func (o *CreateRoleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create role default response has a 3xx status code -func (o *CreateRoleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create role default response has a 4xx status code -func (o *CreateRoleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create role default response has a 5xx status code -func (o *CreateRoleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create role default response a status code equal to that given -func (o *CreateRoleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create role default response -func (o *CreateRoleDefault) Code() int { - return o._statusCode -} - -func (o *CreateRoleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /roles][%d] CreateRole default %s", o._statusCode, payload) -} - -func (o *CreateRoleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /roles][%d] CreateRole default %s", o._statusCode, payload) -} - -func (o *CreateRoleDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateRoleDefault) 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/role/delete_role_parameters.go b/v2/client/role/delete_role_parameters.go deleted file mode 100644 index bdb1291e..00000000 --- a/v2/client/role/delete_role_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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" -) - -// NewDeleteRoleParams creates a new DeleteRoleParams 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 NewDeleteRoleParams() *DeleteRoleParams { - return &DeleteRoleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRoleParamsWithTimeout creates a new DeleteRoleParams object -// with the ability to set a timeout on a request. -func NewDeleteRoleParamsWithTimeout(timeout time.Duration) *DeleteRoleParams { - return &DeleteRoleParams{ - timeout: timeout, - } -} - -// NewDeleteRoleParamsWithContext creates a new DeleteRoleParams object -// with the ability to set a context for a request. -func NewDeleteRoleParamsWithContext(ctx context.Context) *DeleteRoleParams { - return &DeleteRoleParams{ - Context: ctx, - } -} - -// NewDeleteRoleParamsWithHTTPClient creates a new DeleteRoleParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRoleParamsWithHTTPClient(client *http.Client) *DeleteRoleParams { - return &DeleteRoleParams{ - HTTPClient: client, - } -} - -/* -DeleteRoleParams contains all the parameters to send to the API endpoint - - for the delete role operation. - - Typically these are written to a http.Request. -*/ -type DeleteRoleParams struct { - - /* Name. - - Specifies the name of Role to delete. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRoleParams) WithDefaults() *DeleteRoleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRoleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete role params -func (o *DeleteRoleParams) WithTimeout(timeout time.Duration) *DeleteRoleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete role params -func (o *DeleteRoleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete role params -func (o *DeleteRoleParams) WithContext(ctx context.Context) *DeleteRoleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete role params -func (o *DeleteRoleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete role params -func (o *DeleteRoleParams) WithHTTPClient(client *http.Client) *DeleteRoleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete role params -func (o *DeleteRoleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete role params -func (o *DeleteRoleParams) WithName(name string) *DeleteRoleParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete role params -func (o *DeleteRoleParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/role/delete_role_responses.go b/v2/client/role/delete_role_responses.go deleted file mode 100644 index fd2fa674..00000000 --- a/v2/client/role/delete_role_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteRoleReader is a Reader for the DeleteRole structure. -type DeleteRoleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRoleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteRoleNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteRoleDefault(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 - } -} - -// NewDeleteRoleNoContent creates a DeleteRoleNoContent with default headers values -func NewDeleteRoleNoContent() *DeleteRoleNoContent { - return &DeleteRoleNoContent{} -} - -/* -DeleteRoleNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteRoleNoContent struct { -} - -// IsSuccess returns true when this delete role no content response has a 2xx status code -func (o *DeleteRoleNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete role no content response has a 3xx status code -func (o *DeleteRoleNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete role no content response has a 4xx status code -func (o *DeleteRoleNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete role no content response has a 5xx status code -func (o *DeleteRoleNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete role no content response a status code equal to that given -func (o *DeleteRoleNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete role no content response -func (o *DeleteRoleNoContent) Code() int { - return 204 -} - -func (o *DeleteRoleNoContent) Error() string { - return fmt.Sprintf("[DELETE /roles/{name}][%d] deleteRoleNoContent", 204) -} - -func (o *DeleteRoleNoContent) String() string { - return fmt.Sprintf("[DELETE /roles/{name}][%d] deleteRoleNoContent", 204) -} - -func (o *DeleteRoleNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRoleDefault creates a DeleteRoleDefault with default headers values -func NewDeleteRoleDefault(code int) *DeleteRoleDefault { - return &DeleteRoleDefault{ - _statusCode: code, - } -} - -/* -DeleteRoleDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteRoleDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete role default response has a 2xx status code -func (o *DeleteRoleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete role default response has a 3xx status code -func (o *DeleteRoleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete role default response has a 4xx status code -func (o *DeleteRoleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete role default response has a 5xx status code -func (o *DeleteRoleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete role default response a status code equal to that given -func (o *DeleteRoleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete role default response -func (o *DeleteRoleDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRoleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /roles/{name}][%d] DeleteRole default %s", o._statusCode, payload) -} - -func (o *DeleteRoleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /roles/{name}][%d] DeleteRole default %s", o._statusCode, payload) -} - -func (o *DeleteRoleDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteRoleDefault) 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/role/get_roles_parameters.go b/v2/client/role/get_roles_parameters.go deleted file mode 100644 index d7581b9e..00000000 --- a/v2/client/role/get_roles_parameters.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/go-openapi/swag" -) - -// NewGetRolesParams creates a new GetRolesParams 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 NewGetRolesParams() *GetRolesParams { - return &GetRolesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRolesParamsWithTimeout creates a new GetRolesParams object -// with the ability to set a timeout on a request. -func NewGetRolesParamsWithTimeout(timeout time.Duration) *GetRolesParams { - return &GetRolesParams{ - timeout: timeout, - } -} - -// NewGetRolesParamsWithContext creates a new GetRolesParams object -// with the ability to set a context for a request. -func NewGetRolesParamsWithContext(ctx context.Context) *GetRolesParams { - return &GetRolesParams{ - Context: ctx, - } -} - -// NewGetRolesParamsWithHTTPClient creates a new GetRolesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRolesParamsWithHTTPClient(client *http.Client) *GetRolesParams { - return &GetRolesParams{ - HTTPClient: client, - } -} - -/* -GetRolesParams contains all the parameters to send to the API endpoint - - for the get roles operation. - - Typically these are written to a http.Request. -*/ -type GetRolesParams struct { - - /* IncludeTenants. - - If true, the response will include Roles which were created by all tenants which the current user has permission to see. If false, then only Roles created by the current user will be returned. - */ - IncludeTenants *bool - - /* Names. - - Specifies a list of Role names. - */ - Names []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which Roles are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRolesParams) WithDefaults() *GetRolesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get roles params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRolesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get roles params -func (o *GetRolesParams) WithTimeout(timeout time.Duration) *GetRolesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get roles params -func (o *GetRolesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get roles params -func (o *GetRolesParams) WithContext(ctx context.Context) *GetRolesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get roles params -func (o *GetRolesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get roles params -func (o *GetRolesParams) WithHTTPClient(client *http.Client) *GetRolesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get roles params -func (o *GetRolesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIncludeTenants adds the includeTenants to the get roles params -func (o *GetRolesParams) WithIncludeTenants(includeTenants *bool) *GetRolesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get roles params -func (o *GetRolesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithNames adds the names to the get roles params -func (o *GetRolesParams) WithNames(names []string) *GetRolesParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get roles params -func (o *GetRolesParams) SetNames(names []string) { - o.Names = names -} - -// WithTenantIds adds the tenantIds to the get roles params -func (o *GetRolesParams) WithTenantIds(tenantIds []string) *GetRolesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get roles params -func (o *GetRolesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - 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.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetRoles binds the parameter names -func (o *GetRolesParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetRoles binds the parameter tenantIds -func (o *GetRolesParams) 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/client/role/get_roles_responses.go b/v2/client/role/get_roles_responses.go deleted file mode 100644 index 80c34e6d..00000000 --- a/v2/client/role/get_roles_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetRolesReader is a Reader for the GetRoles structure. -type GetRolesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRolesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetRolesDefault(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 - } -} - -// NewGetRolesOK creates a GetRolesOK with default headers values -func NewGetRolesOK() *GetRolesOK { - return &GetRolesOK{} -} - -/* -GetRolesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRolesOK struct { - Payload *models.Roles -} - -// IsSuccess returns true when this get roles o k response has a 2xx status code -func (o *GetRolesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get roles o k response has a 3xx status code -func (o *GetRolesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get roles o k response has a 4xx status code -func (o *GetRolesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get roles o k response has a 5xx status code -func (o *GetRolesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get roles o k response a status code equal to that given -func (o *GetRolesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get roles o k response -func (o *GetRolesOK) Code() int { - return 200 -} - -func (o *GetRolesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /roles][%d] getRolesOK %s", 200, payload) -} - -func (o *GetRolesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /roles][%d] getRolesOK %s", 200, payload) -} - -func (o *GetRolesOK) GetPayload() *models.Roles { - return o.Payload -} - -func (o *GetRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Roles) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRolesDefault creates a GetRolesDefault with default headers values -func NewGetRolesDefault(code int) *GetRolesDefault { - return &GetRolesDefault{ - _statusCode: code, - } -} - -/* -GetRolesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetRolesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get roles default response has a 2xx status code -func (o *GetRolesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get roles default response has a 3xx status code -func (o *GetRolesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get roles default response has a 4xx status code -func (o *GetRolesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get roles default response has a 5xx status code -func (o *GetRolesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get roles default response a status code equal to that given -func (o *GetRolesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get roles default response -func (o *GetRolesDefault) Code() int { - return o._statusCode -} - -func (o *GetRolesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /roles][%d] GetRoles default %s", o._statusCode, payload) -} - -func (o *GetRolesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /roles][%d] GetRoles default %s", o._statusCode, payload) -} - -func (o *GetRolesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetRolesDefault) 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/role/role_client.go b/v2/client/role/role_client.go deleted file mode 100644 index 486e4f3d..00000000 --- a/v2/client/role/role_client.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new role API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new role API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new role API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for role API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error) - - DeleteRole(params *DeleteRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRoleNoContent, error) - - GetRoles(params *GetRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRolesOK, error) - - UpdateRole(params *UpdateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRoleOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateRole creates a role - -Create a Role. -*/ -func (a *Client) CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateRoleParams() - } - op := &runtime.ClientOperation{ - ID: "CreateRole", - Method: "POST", - PathPattern: "/roles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateRoleReader{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.(*CreateRoleCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateRoleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteRole deletes a role - -Delete a Role. -*/ -func (a *Client) DeleteRole(params *DeleteRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteRoleNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRoleParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRole", - Method: "DELETE", - PathPattern: "/roles/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteRoleReader{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.(*DeleteRoleNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteRoleDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetRoles gets roles - -Get Roles. -*/ -func (a *Client) GetRoles(params *GetRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRolesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRolesParams() - } - op := &runtime.ClientOperation{ - ID: "GetRoles", - Method: "GET", - PathPattern: "/roles", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetRolesReader{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.(*GetRolesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetRolesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateRole updates a role - -Update a Role. -*/ -func (a *Client) UpdateRole(params *UpdateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateRoleOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateRoleParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateRole", - Method: "PUT", - PathPattern: "/roles/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateRoleReader{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.(*UpdateRoleOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateRoleDefault) - 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/v2/client/role/update_role_parameters.go b/v2/client/role/update_role_parameters.go deleted file mode 100644 index d38fa934..00000000 --- a/v2/client/role/update_role_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateRoleParams creates a new UpdateRoleParams 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 NewUpdateRoleParams() *UpdateRoleParams { - return &UpdateRoleParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateRoleParamsWithTimeout creates a new UpdateRoleParams object -// with the ability to set a timeout on a request. -func NewUpdateRoleParamsWithTimeout(timeout time.Duration) *UpdateRoleParams { - return &UpdateRoleParams{ - timeout: timeout, - } -} - -// NewUpdateRoleParamsWithContext creates a new UpdateRoleParams object -// with the ability to set a context for a request. -func NewUpdateRoleParamsWithContext(ctx context.Context) *UpdateRoleParams { - return &UpdateRoleParams{ - Context: ctx, - } -} - -// NewUpdateRoleParamsWithHTTPClient creates a new UpdateRoleParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateRoleParamsWithHTTPClient(client *http.Client) *UpdateRoleParams { - return &UpdateRoleParams{ - HTTPClient: client, - } -} - -/* -UpdateRoleParams contains all the parameters to send to the API endpoint - - for the update role operation. - - Typically these are written to a http.Request. -*/ -type UpdateRoleParams struct { - - /* Body. - - Specifies the request body to update a Role. - */ - Body *models.UpdateRoleParameters - - /* Name. - - Specifies the name of Role to update. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRoleParams) WithDefaults() *UpdateRoleParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update role params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateRoleParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update role params -func (o *UpdateRoleParams) WithTimeout(timeout time.Duration) *UpdateRoleParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update role params -func (o *UpdateRoleParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update role params -func (o *UpdateRoleParams) WithContext(ctx context.Context) *UpdateRoleParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update role params -func (o *UpdateRoleParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update role params -func (o *UpdateRoleParams) WithHTTPClient(client *http.Client) *UpdateRoleParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update role params -func (o *UpdateRoleParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update role params -func (o *UpdateRoleParams) WithBody(body *models.UpdateRoleParameters) *UpdateRoleParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update role params -func (o *UpdateRoleParams) SetBody(body *models.UpdateRoleParameters) { - o.Body = body -} - -// WithName adds the name to the update role params -func (o *UpdateRoleParams) WithName(name string) *UpdateRoleParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update role params -func (o *UpdateRoleParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateRoleParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/role/update_role_responses.go b/v2/client/role/update_role_responses.go deleted file mode 100644 index 0ffd21ab..00000000 --- a/v2/client/role/update_role_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package role - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateRoleReader is a Reader for the UpdateRole structure. -type UpdateRoleReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateRoleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateRoleOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateRoleDefault(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 - } -} - -// NewUpdateRoleOK creates a UpdateRoleOK with default headers values -func NewUpdateRoleOK() *UpdateRoleOK { - return &UpdateRoleOK{} -} - -/* -UpdateRoleOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateRoleOK struct { - Payload *models.Role -} - -// IsSuccess returns true when this update role o k response has a 2xx status code -func (o *UpdateRoleOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update role o k response has a 3xx status code -func (o *UpdateRoleOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update role o k response has a 4xx status code -func (o *UpdateRoleOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update role o k response has a 5xx status code -func (o *UpdateRoleOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update role o k response a status code equal to that given -func (o *UpdateRoleOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update role o k response -func (o *UpdateRoleOK) Code() int { - return 200 -} - -func (o *UpdateRoleOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /roles/{name}][%d] updateRoleOK %s", 200, payload) -} - -func (o *UpdateRoleOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /roles/{name}][%d] updateRoleOK %s", 200, payload) -} - -func (o *UpdateRoleOK) GetPayload() *models.Role { - return o.Payload -} - -func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Role) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateRoleDefault creates a UpdateRoleDefault with default headers values -func NewUpdateRoleDefault(code int) *UpdateRoleDefault { - return &UpdateRoleDefault{ - _statusCode: code, - } -} - -/* -UpdateRoleDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateRoleDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update role default response has a 2xx status code -func (o *UpdateRoleDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update role default response has a 3xx status code -func (o *UpdateRoleDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update role default response has a 4xx status code -func (o *UpdateRoleDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update role default response has a 5xx status code -func (o *UpdateRoleDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update role default response a status code equal to that given -func (o *UpdateRoleDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update role default response -func (o *UpdateRoleDefault) Code() int { - return o._statusCode -} - -func (o *UpdateRoleDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /roles/{name}][%d] UpdateRole default %s", o._statusCode, payload) -} - -func (o *UpdateRoleDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /roles/{name}][%d] UpdateRole default %s", o._statusCode, payload) -} - -func (o *UpdateRoleDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateRoleDefault) 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/routes/add_static_route_parameters.go b/v2/client/routes/add_static_route_parameters.go deleted file mode 100644 index 4ecfdafe..00000000 --- a/v2/client/routes/add_static_route_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddStaticRouteParams creates a new AddStaticRouteParams 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 NewAddStaticRouteParams() *AddStaticRouteParams { - return &AddStaticRouteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddStaticRouteParamsWithTimeout creates a new AddStaticRouteParams object -// with the ability to set a timeout on a request. -func NewAddStaticRouteParamsWithTimeout(timeout time.Duration) *AddStaticRouteParams { - return &AddStaticRouteParams{ - timeout: timeout, - } -} - -// NewAddStaticRouteParamsWithContext creates a new AddStaticRouteParams object -// with the ability to set a context for a request. -func NewAddStaticRouteParamsWithContext(ctx context.Context) *AddStaticRouteParams { - return &AddStaticRouteParams{ - Context: ctx, - } -} - -// NewAddStaticRouteParamsWithHTTPClient creates a new AddStaticRouteParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddStaticRouteParamsWithHTTPClient(client *http.Client) *AddStaticRouteParams { - return &AddStaticRouteParams{ - HTTPClient: client, - } -} - -/* -AddStaticRouteParams contains all the parameters to send to the API endpoint - - for the add static route operation. - - Typically these are written to a http.Request. -*/ -type AddStaticRouteParams struct { - - /* Body. - - Specifies the parameters to configure a static route on an interface. - */ - Body *models.StaticRouteParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddStaticRouteParams) WithDefaults() *AddStaticRouteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddStaticRouteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add static route params -func (o *AddStaticRouteParams) WithTimeout(timeout time.Duration) *AddStaticRouteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add static route params -func (o *AddStaticRouteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add static route params -func (o *AddStaticRouteParams) WithContext(ctx context.Context) *AddStaticRouteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add static route params -func (o *AddStaticRouteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add static route params -func (o *AddStaticRouteParams) WithHTTPClient(client *http.Client) *AddStaticRouteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add static route params -func (o *AddStaticRouteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add static route params -func (o *AddStaticRouteParams) WithBody(body *models.StaticRouteParams) *AddStaticRouteParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add static route params -func (o *AddStaticRouteParams) SetBody(body *models.StaticRouteParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddStaticRouteParams) 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/routes/add_static_route_responses.go b/v2/client/routes/add_static_route_responses.go deleted file mode 100644 index a7fd48d3..00000000 --- a/v2/client/routes/add_static_route_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddStaticRouteReader is a Reader for the AddStaticRoute structure. -type AddStaticRouteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddStaticRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddStaticRouteCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddStaticRouteDefault(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 - } -} - -// NewAddStaticRouteCreated creates a AddStaticRouteCreated with default headers values -func NewAddStaticRouteCreated() *AddStaticRouteCreated { - return &AddStaticRouteCreated{} -} - -/* -AddStaticRouteCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddStaticRouteCreated struct { - Payload *models.StaticRouteParams -} - -// IsSuccess returns true when this add static route created response has a 2xx status code -func (o *AddStaticRouteCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add static route created response has a 3xx status code -func (o *AddStaticRouteCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add static route created response has a 4xx status code -func (o *AddStaticRouteCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add static route created response has a 5xx status code -func (o *AddStaticRouteCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add static route created response a status code equal to that given -func (o *AddStaticRouteCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add static route created response -func (o *AddStaticRouteCreated) Code() int { - return 201 -} - -func (o *AddStaticRouteCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/routes][%d] addStaticRouteCreated %s", 201, payload) -} - -func (o *AddStaticRouteCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/routes][%d] addStaticRouteCreated %s", 201, payload) -} - -func (o *AddStaticRouteCreated) GetPayload() *models.StaticRouteParams { - return o.Payload -} - -func (o *AddStaticRouteCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StaticRouteParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddStaticRouteDefault creates a AddStaticRouteDefault with default headers values -func NewAddStaticRouteDefault(code int) *AddStaticRouteDefault { - return &AddStaticRouteDefault{ - _statusCode: code, - } -} - -/* -AddStaticRouteDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddStaticRouteDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add static route default response has a 2xx status code -func (o *AddStaticRouteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add static route default response has a 3xx status code -func (o *AddStaticRouteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add static route default response has a 4xx status code -func (o *AddStaticRouteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add static route default response has a 5xx status code -func (o *AddStaticRouteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add static route default response a status code equal to that given -func (o *AddStaticRouteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add static route default response -func (o *AddStaticRouteDefault) Code() int { - return o._statusCode -} - -func (o *AddStaticRouteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/routes][%d] AddStaticRoute default %s", o._statusCode, payload) -} - -func (o *AddStaticRouteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /network/routes][%d] AddStaticRoute default %s", o._statusCode, payload) -} - -func (o *AddStaticRouteDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddStaticRouteDefault) 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/routes/delete_static_route_parameters.go b/v2/client/routes/delete_static_route_parameters.go deleted file mode 100644 index dc787ad4..00000000 --- a/v2/client/routes/delete_static_route_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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" -) - -// NewDeleteStaticRouteParams creates a new DeleteStaticRouteParams 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 NewDeleteStaticRouteParams() *DeleteStaticRouteParams { - return &DeleteStaticRouteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteStaticRouteParamsWithTimeout creates a new DeleteStaticRouteParams object -// with the ability to set a timeout on a request. -func NewDeleteStaticRouteParamsWithTimeout(timeout time.Duration) *DeleteStaticRouteParams { - return &DeleteStaticRouteParams{ - timeout: timeout, - } -} - -// NewDeleteStaticRouteParamsWithContext creates a new DeleteStaticRouteParams object -// with the ability to set a context for a request. -func NewDeleteStaticRouteParamsWithContext(ctx context.Context) *DeleteStaticRouteParams { - return &DeleteStaticRouteParams{ - Context: ctx, - } -} - -// NewDeleteStaticRouteParamsWithHTTPClient creates a new DeleteStaticRouteParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteStaticRouteParamsWithHTTPClient(client *http.Client) *DeleteStaticRouteParams { - return &DeleteStaticRouteParams{ - HTTPClient: client, - } -} - -/* -DeleteStaticRouteParams contains all the parameters to send to the API endpoint - - for the delete static route operation. - - Typically these are written to a http.Request. -*/ -type DeleteStaticRouteParams struct { - - /* RouteID. - - Specify the unique identifier for the route. - */ - RouteID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteStaticRouteParams) WithDefaults() *DeleteStaticRouteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteStaticRouteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete static route params -func (o *DeleteStaticRouteParams) WithTimeout(timeout time.Duration) *DeleteStaticRouteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete static route params -func (o *DeleteStaticRouteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete static route params -func (o *DeleteStaticRouteParams) WithContext(ctx context.Context) *DeleteStaticRouteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete static route params -func (o *DeleteStaticRouteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete static route params -func (o *DeleteStaticRouteParams) WithHTTPClient(client *http.Client) *DeleteStaticRouteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete static route params -func (o *DeleteStaticRouteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRouteID adds the routeID to the delete static route params -func (o *DeleteStaticRouteParams) WithRouteID(routeID string) *DeleteStaticRouteParams { - o.SetRouteID(routeID) - return o -} - -// SetRouteID adds the routeId to the delete static route params -func (o *DeleteStaticRouteParams) SetRouteID(routeID string) { - o.RouteID = routeID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteStaticRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param routeId - if err := r.SetPathParam("routeId", o.RouteID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/routes/delete_static_route_responses.go b/v2/client/routes/delete_static_route_responses.go deleted file mode 100644 index 69a26809..00000000 --- a/v2/client/routes/delete_static_route_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteStaticRouteReader is a Reader for the DeleteStaticRoute structure. -type DeleteStaticRouteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteStaticRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteStaticRouteNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteStaticRouteDefault(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 - } -} - -// NewDeleteStaticRouteNoContent creates a DeleteStaticRouteNoContent with default headers values -func NewDeleteStaticRouteNoContent() *DeleteStaticRouteNoContent { - return &DeleteStaticRouteNoContent{} -} - -/* -DeleteStaticRouteNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteStaticRouteNoContent struct { -} - -// IsSuccess returns true when this delete static route no content response has a 2xx status code -func (o *DeleteStaticRouteNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete static route no content response has a 3xx status code -func (o *DeleteStaticRouteNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete static route no content response has a 4xx status code -func (o *DeleteStaticRouteNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete static route no content response has a 5xx status code -func (o *DeleteStaticRouteNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete static route no content response a status code equal to that given -func (o *DeleteStaticRouteNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete static route no content response -func (o *DeleteStaticRouteNoContent) Code() int { - return 204 -} - -func (o *DeleteStaticRouteNoContent) Error() string { - return fmt.Sprintf("[DELETE /network/routes/{routeId}][%d] deleteStaticRouteNoContent", 204) -} - -func (o *DeleteStaticRouteNoContent) String() string { - return fmt.Sprintf("[DELETE /network/routes/{routeId}][%d] deleteStaticRouteNoContent", 204) -} - -func (o *DeleteStaticRouteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteStaticRouteDefault creates a DeleteStaticRouteDefault with default headers values -func NewDeleteStaticRouteDefault(code int) *DeleteStaticRouteDefault { - return &DeleteStaticRouteDefault{ - _statusCode: code, - } -} - -/* -DeleteStaticRouteDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteStaticRouteDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete static route default response has a 2xx status code -func (o *DeleteStaticRouteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete static route default response has a 3xx status code -func (o *DeleteStaticRouteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete static route default response has a 4xx status code -func (o *DeleteStaticRouteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete static route default response has a 5xx status code -func (o *DeleteStaticRouteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete static route default response a status code equal to that given -func (o *DeleteStaticRouteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete static route default response -func (o *DeleteStaticRouteDefault) Code() int { - return o._statusCode -} - -func (o *DeleteStaticRouteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/routes/{routeId}][%d] DeleteStaticRoute default %s", o._statusCode, payload) -} - -func (o *DeleteStaticRouteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /network/routes/{routeId}][%d] DeleteStaticRoute default %s", o._statusCode, payload) -} - -func (o *DeleteStaticRouteDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteStaticRouteDefault) 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/routes/list_static_routes_parameters.go b/v2/client/routes/list_static_routes_parameters.go deleted file mode 100644 index 126f4aca..00000000 --- a/v2/client/routes/list_static_routes_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/go-openapi/swag" -) - -// NewListStaticRoutesParams creates a new ListStaticRoutesParams 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 NewListStaticRoutesParams() *ListStaticRoutesParams { - return &ListStaticRoutesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListStaticRoutesParamsWithTimeout creates a new ListStaticRoutesParams object -// with the ability to set a timeout on a request. -func NewListStaticRoutesParamsWithTimeout(timeout time.Duration) *ListStaticRoutesParams { - return &ListStaticRoutesParams{ - timeout: timeout, - } -} - -// NewListStaticRoutesParamsWithContext creates a new ListStaticRoutesParams object -// with the ability to set a context for a request. -func NewListStaticRoutesParamsWithContext(ctx context.Context) *ListStaticRoutesParams { - return &ListStaticRoutesParams{ - Context: ctx, - } -} - -// NewListStaticRoutesParamsWithHTTPClient creates a new ListStaticRoutesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListStaticRoutesParamsWithHTTPClient(client *http.Client) *ListStaticRoutesParams { - return &ListStaticRoutesParams{ - HTTPClient: client, - } -} - -/* -ListStaticRoutesParams contains all the parameters to send to the API endpoint - - for the list static routes operation. - - Typically these are written to a http.Request. -*/ -type ListStaticRoutesParams struct { - - /* InterfaceGroups. - - Specifies the network interfaces name to filter. - */ - InterfaceGroups []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list static routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStaticRoutesParams) WithDefaults() *ListStaticRoutesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list static routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStaticRoutesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list static routes params -func (o *ListStaticRoutesParams) WithTimeout(timeout time.Duration) *ListStaticRoutesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list static routes params -func (o *ListStaticRoutesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list static routes params -func (o *ListStaticRoutesParams) WithContext(ctx context.Context) *ListStaticRoutesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list static routes params -func (o *ListStaticRoutesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list static routes params -func (o *ListStaticRoutesParams) WithHTTPClient(client *http.Client) *ListStaticRoutesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list static routes params -func (o *ListStaticRoutesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInterfaceGroups adds the interfaceGroups to the list static routes params -func (o *ListStaticRoutesParams) WithInterfaceGroups(interfaceGroups []string) *ListStaticRoutesParams { - o.SetInterfaceGroups(interfaceGroups) - return o -} - -// SetInterfaceGroups adds the interfaceGroups to the list static routes params -func (o *ListStaticRoutesParams) SetInterfaceGroups(interfaceGroups []string) { - o.InterfaceGroups = interfaceGroups -} - -// WriteToRequest writes these params to a swagger request -func (o *ListStaticRoutesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.InterfaceGroups != nil { - - // binding items for interfaceGroups - joinedInterfaceGroups := o.bindParamInterfaceGroups(reg) - - // query array param interfaceGroups - if err := r.SetQueryParam("interfaceGroups", joinedInterfaceGroups...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListStaticRoutes binds the parameter interfaceGroups -func (o *ListStaticRoutesParams) bindParamInterfaceGroups(formats strfmt.Registry) []string { - interfaceGroupsIR := o.InterfaceGroups - - var interfaceGroupsIC []string - for _, interfaceGroupsIIR := range interfaceGroupsIR { // explode []string - - interfaceGroupsIIV := interfaceGroupsIIR // string as string - interfaceGroupsIC = append(interfaceGroupsIC, interfaceGroupsIIV) - } - - // items.CollectionFormat: "" - interfaceGroupsIS := swag.JoinByFormat(interfaceGroupsIC, "") - - return interfaceGroupsIS -} diff --git a/v2/client/routes/list_static_routes_responses.go b/v2/client/routes/list_static_routes_responses.go deleted file mode 100644 index 7751b014..00000000 --- a/v2/client/routes/list_static_routes_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListStaticRoutesReader is a Reader for the ListStaticRoutes structure. -type ListStaticRoutesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListStaticRoutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListStaticRoutesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListStaticRoutesDefault(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 - } -} - -// NewListStaticRoutesOK creates a ListStaticRoutesOK with default headers values -func NewListStaticRoutesOK() *ListStaticRoutesOK { - return &ListStaticRoutesOK{} -} - -/* -ListStaticRoutesOK describes a response with status code 200, with default header values. - -Success -*/ -type ListStaticRoutesOK struct { - Payload *models.StaticRoutes -} - -// IsSuccess returns true when this list static routes o k response has a 2xx status code -func (o *ListStaticRoutesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list static routes o k response has a 3xx status code -func (o *ListStaticRoutesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list static routes o k response has a 4xx status code -func (o *ListStaticRoutesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list static routes o k response has a 5xx status code -func (o *ListStaticRoutesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list static routes o k response a status code equal to that given -func (o *ListStaticRoutesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list static routes o k response -func (o *ListStaticRoutesOK) Code() int { - return 200 -} - -func (o *ListStaticRoutesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/routes][%d] listStaticRoutesOK %s", 200, payload) -} - -func (o *ListStaticRoutesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/routes][%d] listStaticRoutesOK %s", 200, payload) -} - -func (o *ListStaticRoutesOK) GetPayload() *models.StaticRoutes { - return o.Payload -} - -func (o *ListStaticRoutesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StaticRoutes) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListStaticRoutesDefault creates a ListStaticRoutesDefault with default headers values -func NewListStaticRoutesDefault(code int) *ListStaticRoutesDefault { - return &ListStaticRoutesDefault{ - _statusCode: code, - } -} - -/* -ListStaticRoutesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListStaticRoutesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list static routes default response has a 2xx status code -func (o *ListStaticRoutesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list static routes default response has a 3xx status code -func (o *ListStaticRoutesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list static routes default response has a 4xx status code -func (o *ListStaticRoutesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list static routes default response has a 5xx status code -func (o *ListStaticRoutesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list static routes default response a status code equal to that given -func (o *ListStaticRoutesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list static routes default response -func (o *ListStaticRoutesDefault) Code() int { - return o._statusCode -} - -func (o *ListStaticRoutesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/routes][%d] ListStaticRoutes default %s", o._statusCode, payload) -} - -func (o *ListStaticRoutesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /network/routes][%d] ListStaticRoutes default %s", o._statusCode, payload) -} - -func (o *ListStaticRoutesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListStaticRoutesDefault) 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/routes/routes_client.go b/v2/client/routes/routes_client.go deleted file mode 100644 index dab17577..00000000 --- a/v2/client/routes/routes_client.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new routes API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new routes API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new routes API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for routes API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddStaticRoute(params *AddStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddStaticRouteCreated, error) - - DeleteStaticRoute(params *DeleteStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteStaticRouteNoContent, error) - - ListStaticRoutes(params *ListStaticRoutesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListStaticRoutesOK, error) - - UpdateStaticRoute(params *UpdateStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateStaticRouteOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddStaticRoute configures a static route - -Configure a static route on an interface. -*/ -func (a *Client) AddStaticRoute(params *AddStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddStaticRouteCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddStaticRouteParams() - } - op := &runtime.ClientOperation{ - ID: "AddStaticRoute", - Method: "POST", - PathPattern: "/network/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddStaticRouteReader{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.(*AddStaticRouteCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddStaticRouteDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteStaticRoute deletes a static route - -Delete a static route on a network interface. -*/ -func (a *Client) DeleteStaticRoute(params *DeleteStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteStaticRouteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteStaticRouteParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteStaticRoute", - Method: "DELETE", - PathPattern: "/network/routes/{routeId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteStaticRouteReader{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.(*DeleteStaticRouteNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteStaticRouteDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListStaticRoutes lists all static routes - -List the static routes for the Cohesity Cluster. -*/ -func (a *Client) ListStaticRoutes(params *ListStaticRoutesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListStaticRoutesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListStaticRoutesParams() - } - op := &runtime.ClientOperation{ - ID: "ListStaticRoutes", - Method: "GET", - PathPattern: "/network/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListStaticRoutesReader{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.(*ListStaticRoutesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListStaticRoutesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateStaticRoute updates a static route - -Update static route details. -*/ -func (a *Client) UpdateStaticRoute(params *UpdateStaticRouteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateStaticRouteOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateStaticRouteParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateStaticRoute", - Method: "PUT", - PathPattern: "/network/routes/{routeId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateStaticRouteReader{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.(*UpdateStaticRouteOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateStaticRouteDefault) - 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/v2/client/routes/update_static_route_parameters.go b/v2/client/routes/update_static_route_parameters.go deleted file mode 100644 index bfc9e17f..00000000 --- a/v2/client/routes/update_static_route_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateStaticRouteParams creates a new UpdateStaticRouteParams 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 NewUpdateStaticRouteParams() *UpdateStaticRouteParams { - return &UpdateStaticRouteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateStaticRouteParamsWithTimeout creates a new UpdateStaticRouteParams object -// with the ability to set a timeout on a request. -func NewUpdateStaticRouteParamsWithTimeout(timeout time.Duration) *UpdateStaticRouteParams { - return &UpdateStaticRouteParams{ - timeout: timeout, - } -} - -// NewUpdateStaticRouteParamsWithContext creates a new UpdateStaticRouteParams object -// with the ability to set a context for a request. -func NewUpdateStaticRouteParamsWithContext(ctx context.Context) *UpdateStaticRouteParams { - return &UpdateStaticRouteParams{ - Context: ctx, - } -} - -// NewUpdateStaticRouteParamsWithHTTPClient creates a new UpdateStaticRouteParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateStaticRouteParamsWithHTTPClient(client *http.Client) *UpdateStaticRouteParams { - return &UpdateStaticRouteParams{ - HTTPClient: client, - } -} - -/* -UpdateStaticRouteParams contains all the parameters to send to the API endpoint - - for the update static route operation. - - Typically these are written to a http.Request. -*/ -type UpdateStaticRouteParams struct { - - /* Body. - - Specifies the update request parameters. - */ - Body *models.StaticRouteParams - - /* RouteID. - - Specify the unique identifier for the route. - */ - RouteID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateStaticRouteParams) WithDefaults() *UpdateStaticRouteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update static route params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateStaticRouteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update static route params -func (o *UpdateStaticRouteParams) WithTimeout(timeout time.Duration) *UpdateStaticRouteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update static route params -func (o *UpdateStaticRouteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update static route params -func (o *UpdateStaticRouteParams) WithContext(ctx context.Context) *UpdateStaticRouteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update static route params -func (o *UpdateStaticRouteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update static route params -func (o *UpdateStaticRouteParams) WithHTTPClient(client *http.Client) *UpdateStaticRouteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update static route params -func (o *UpdateStaticRouteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update static route params -func (o *UpdateStaticRouteParams) WithBody(body *models.StaticRouteParams) *UpdateStaticRouteParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update static route params -func (o *UpdateStaticRouteParams) SetBody(body *models.StaticRouteParams) { - o.Body = body -} - -// WithRouteID adds the routeID to the update static route params -func (o *UpdateStaticRouteParams) WithRouteID(routeID string) *UpdateStaticRouteParams { - o.SetRouteID(routeID) - return o -} - -// SetRouteID adds the routeId to the update static route params -func (o *UpdateStaticRouteParams) SetRouteID(routeID string) { - o.RouteID = routeID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateStaticRouteParams) 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 - } - } - - // path param routeId - if err := r.SetPathParam("routeId", o.RouteID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/routes/update_static_route_responses.go b/v2/client/routes/update_static_route_responses.go deleted file mode 100644 index bab7f6d4..00000000 --- a/v2/client/routes/update_static_route_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package routes - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateStaticRouteReader is a Reader for the UpdateStaticRoute structure. -type UpdateStaticRouteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateStaticRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateStaticRouteOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateStaticRouteDefault(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 - } -} - -// NewUpdateStaticRouteOK creates a UpdateStaticRouteOK with default headers values -func NewUpdateStaticRouteOK() *UpdateStaticRouteOK { - return &UpdateStaticRouteOK{} -} - -/* -UpdateStaticRouteOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateStaticRouteOK struct { - Payload *models.StaticRouteParams -} - -// IsSuccess returns true when this update static route o k response has a 2xx status code -func (o *UpdateStaticRouteOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update static route o k response has a 3xx status code -func (o *UpdateStaticRouteOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update static route o k response has a 4xx status code -func (o *UpdateStaticRouteOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update static route o k response has a 5xx status code -func (o *UpdateStaticRouteOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update static route o k response a status code equal to that given -func (o *UpdateStaticRouteOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update static route o k response -func (o *UpdateStaticRouteOK) Code() int { - return 200 -} - -func (o *UpdateStaticRouteOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/routes/{routeId}][%d] updateStaticRouteOK %s", 200, payload) -} - -func (o *UpdateStaticRouteOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/routes/{routeId}][%d] updateStaticRouteOK %s", 200, payload) -} - -func (o *UpdateStaticRouteOK) GetPayload() *models.StaticRouteParams { - return o.Payload -} - -func (o *UpdateStaticRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StaticRouteParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateStaticRouteDefault creates a UpdateStaticRouteDefault with default headers values -func NewUpdateStaticRouteDefault(code int) *UpdateStaticRouteDefault { - return &UpdateStaticRouteDefault{ - _statusCode: code, - } -} - -/* -UpdateStaticRouteDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateStaticRouteDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update static route default response has a 2xx status code -func (o *UpdateStaticRouteDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update static route default response has a 3xx status code -func (o *UpdateStaticRouteDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update static route default response has a 4xx status code -func (o *UpdateStaticRouteDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update static route default response has a 5xx status code -func (o *UpdateStaticRouteDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update static route default response a status code equal to that given -func (o *UpdateStaticRouteDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update static route default response -func (o *UpdateStaticRouteDefault) Code() int { - return o._statusCode -} - -func (o *UpdateStaticRouteDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/routes/{routeId}][%d] UpdateStaticRoute default %s", o._statusCode, payload) -} - -func (o *UpdateStaticRouteDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /network/routes/{routeId}][%d] UpdateStaticRoute default %s", o._statusCode, payload) -} - -func (o *UpdateStaticRouteDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateStaticRouteDefault) 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/search/search_client.go b/v2/client/search/search_client.go deleted file mode 100644 index f9c39690..00000000 --- a/v2/client/search/search_client.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new search API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new search API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new search API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for search API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - SearchIndexedObjects(params *SearchIndexedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchIndexedObjectsOK, error) - - SearchObjects(params *SearchObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchObjectsOK, error) - - SearchProtectedObjects(params *SearchProtectedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectedObjectsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -SearchIndexedObjects lists indexed objects - -List all the indexed objects like files and folders, emails, mailboxes etc., that match the specified search and filter criteria from protected objects. -*/ -func (a *Client) SearchIndexedObjects(params *SearchIndexedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchIndexedObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchIndexedObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchIndexedObjects", - Method: "POST", - PathPattern: "/data-protect/search/indexed-objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchIndexedObjectsReader{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.(*SearchIndexedObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchIndexedObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SearchObjects lists objects - -List objects. -*/ -func (a *Client) SearchObjects(params *SearchObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchObjects", - Method: "GET", - PathPattern: "/data-protect/search/objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchObjectsReader{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.(*SearchObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchObjectsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -SearchProtectedObjects lists protected objects - -List protected objects and corresponding detail information from registered sources filtered by specified query parameters. If no search pattern or filter parameters are specified, all protected objects currently found are returned. -*/ -func (a *Client) SearchProtectedObjects(params *SearchProtectedObjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchProtectedObjectsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchProtectedObjectsParams() - } - op := &runtime.ClientOperation{ - ID: "SearchProtectedObjects", - Method: "GET", - PathPattern: "/data-protect/search/protected-objects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &SearchProtectedObjectsReader{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.(*SearchProtectedObjectsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*SearchProtectedObjectsDefault) - 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/v2/client/search/search_indexed_objects_parameters.go b/v2/client/search/search_indexed_objects_parameters.go deleted file mode 100644 index 812be1bb..00000000 --- a/v2/client/search/search_indexed_objects_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewSearchIndexedObjectsParams creates a new SearchIndexedObjectsParams 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 NewSearchIndexedObjectsParams() *SearchIndexedObjectsParams { - return &SearchIndexedObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchIndexedObjectsParamsWithTimeout creates a new SearchIndexedObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchIndexedObjectsParamsWithTimeout(timeout time.Duration) *SearchIndexedObjectsParams { - return &SearchIndexedObjectsParams{ - timeout: timeout, - } -} - -// NewSearchIndexedObjectsParamsWithContext creates a new SearchIndexedObjectsParams object -// with the ability to set a context for a request. -func NewSearchIndexedObjectsParamsWithContext(ctx context.Context) *SearchIndexedObjectsParams { - return &SearchIndexedObjectsParams{ - Context: ctx, - } -} - -// NewSearchIndexedObjectsParamsWithHTTPClient creates a new SearchIndexedObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchIndexedObjectsParamsWithHTTPClient(client *http.Client) *SearchIndexedObjectsParams { - return &SearchIndexedObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchIndexedObjectsParams contains all the parameters to send to the API endpoint - - for the search indexed objects operation. - - Typically these are written to a http.Request. -*/ -type SearchIndexedObjectsParams struct { - - /* Body. - - Specifies the parameters to search for indexed objects. - */ - Body *models.SearchIndexedObjectsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search indexed objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchIndexedObjectsParams) WithDefaults() *SearchIndexedObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search indexed objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchIndexedObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search indexed objects params -func (o *SearchIndexedObjectsParams) WithTimeout(timeout time.Duration) *SearchIndexedObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search indexed objects params -func (o *SearchIndexedObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search indexed objects params -func (o *SearchIndexedObjectsParams) WithContext(ctx context.Context) *SearchIndexedObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search indexed objects params -func (o *SearchIndexedObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search indexed objects params -func (o *SearchIndexedObjectsParams) WithHTTPClient(client *http.Client) *SearchIndexedObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search indexed objects params -func (o *SearchIndexedObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the search indexed objects params -func (o *SearchIndexedObjectsParams) WithBody(body *models.SearchIndexedObjectsRequest) *SearchIndexedObjectsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the search indexed objects params -func (o *SearchIndexedObjectsParams) SetBody(body *models.SearchIndexedObjectsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchIndexedObjectsParams) 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/search/search_indexed_objects_responses.go b/v2/client/search/search_indexed_objects_responses.go deleted file mode 100644 index a70a7d28..00000000 --- a/v2/client/search/search_indexed_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SearchIndexedObjectsReader is a Reader for the SearchIndexedObjects structure. -type SearchIndexedObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchIndexedObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchIndexedObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchIndexedObjectsDefault(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 - } -} - -// NewSearchIndexedObjectsOK creates a SearchIndexedObjectsOK with default headers values -func NewSearchIndexedObjectsOK() *SearchIndexedObjectsOK { - return &SearchIndexedObjectsOK{} -} - -/* -SearchIndexedObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchIndexedObjectsOK struct { - Payload *models.SearchIndexedObjectsResponseBody -} - -// IsSuccess returns true when this search indexed objects o k response has a 2xx status code -func (o *SearchIndexedObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search indexed objects o k response has a 3xx status code -func (o *SearchIndexedObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search indexed objects o k response has a 4xx status code -func (o *SearchIndexedObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search indexed objects o k response has a 5xx status code -func (o *SearchIndexedObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search indexed objects o k response a status code equal to that given -func (o *SearchIndexedObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search indexed objects o k response -func (o *SearchIndexedObjectsOK) Code() int { - return 200 -} - -func (o *SearchIndexedObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/search/indexed-objects][%d] searchIndexedObjectsOK %s", 200, payload) -} - -func (o *SearchIndexedObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/search/indexed-objects][%d] searchIndexedObjectsOK %s", 200, payload) -} - -func (o *SearchIndexedObjectsOK) GetPayload() *models.SearchIndexedObjectsResponseBody { - return o.Payload -} - -func (o *SearchIndexedObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SearchIndexedObjectsResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchIndexedObjectsDefault creates a SearchIndexedObjectsDefault with default headers values -func NewSearchIndexedObjectsDefault(code int) *SearchIndexedObjectsDefault { - return &SearchIndexedObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchIndexedObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchIndexedObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this search indexed objects default response has a 2xx status code -func (o *SearchIndexedObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search indexed objects default response has a 3xx status code -func (o *SearchIndexedObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search indexed objects default response has a 4xx status code -func (o *SearchIndexedObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search indexed objects default response has a 5xx status code -func (o *SearchIndexedObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search indexed objects default response a status code equal to that given -func (o *SearchIndexedObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search indexed objects default response -func (o *SearchIndexedObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchIndexedObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/search/indexed-objects][%d] SearchIndexedObjects default %s", o._statusCode, payload) -} - -func (o *SearchIndexedObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/search/indexed-objects][%d] SearchIndexedObjects default %s", o._statusCode, payload) -} - -func (o *SearchIndexedObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SearchIndexedObjectsDefault) 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/search/search_objects_parameters.go b/v2/client/search/search_objects_parameters.go deleted file mode 100644 index 5ffdd070..00000000 --- a/v2/client/search/search_objects_parameters.go +++ /dev/null @@ -1,1209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/go-openapi/swag" -) - -// NewSearchObjectsParams creates a new SearchObjectsParams 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 NewSearchObjectsParams() *SearchObjectsParams { - return &SearchObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchObjectsParamsWithTimeout creates a new SearchObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchObjectsParamsWithTimeout(timeout time.Duration) *SearchObjectsParams { - return &SearchObjectsParams{ - timeout: timeout, - } -} - -// NewSearchObjectsParamsWithContext creates a new SearchObjectsParams object -// with the ability to set a context for a request. -func NewSearchObjectsParamsWithContext(ctx context.Context) *SearchObjectsParams { - return &SearchObjectsParams{ - Context: ctx, - } -} - -// NewSearchObjectsParamsWithHTTPClient creates a new SearchObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchObjectsParamsWithHTTPClient(client *http.Client) *SearchObjectsParams { - return &SearchObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchObjectsParams contains all the parameters to send to the API endpoint - - for the search objects operation. - - Typically these are written to a http.Request. -*/ -type SearchObjectsParams struct { - - /* AzureObjectTypes. - - Specifies the object types to filter objects on. Only applicable if the environment is Azure. - */ - AzureObjectTypes []string - - /* ClusterIdentifiers. - - Specifies the list of cluster identifiers. Format is clusterId:clusterIncarnationId. Only records from clusters having these identifiers will be returned. - */ - ClusterIdentifiers []string - - /* Count. - - Specifies the number of objects to be fetched for the specified pagination cookie. - - Format: int32 - */ - Count *int32 - - /* Environments. - - Specifies the environment type to filter objects. - */ - Environments []string - - /* IncludeDeletedObjects. - - Specifies whether to include deleted objects in response. These objects can't be protected but can be recovered. This field is deprecated. - */ - IncludeDeletedObjects *bool - - /* IncludeTenants. - - If true, the response will include Objects which belongs to all tenants which the current user has permission to see. - */ - IncludeTenants *bool - - /* IsDeleted. - - If set to true, then objects which are deleted on atleast one cluster will be returned. If not set or set to false then objects which are registered on atleast one cluster are returned. - */ - IsDeleted *bool - - /* IsProtected. - - Specifies the protection status of objects. If set to true, only protected objects will be returned. If set to false, only unprotected objects will be returned. If not specified, all objects will be returned. - */ - IsProtected *bool - - /* LastRunStatusList. - - Specifies a list of status of the object's last protection run. Only objects with last run status of these will be returned. - */ - LastRunStatusList []string - - /* MightHaveSnapshotTagIds. - - Specifies list of snapshot tags, one or more of which might be - present in the document. These are OR'ed together and the resulting - criteria AND'ed with the rest of the query. - */ - MightHaveSnapshotTagIds []string - - /* MightHaveTagIds. - - Specifies list of tags, one or more of which might be present in - the document. These are OR'ed together and the resulting criteria - AND'ed with the rest of the query. - */ - MightHaveTagIds []string - - /* MustHaveSnapshotTagIds. - - Specifies snapshot tags which must be all present in the document. - */ - MustHaveSnapshotTagIds []string - - /* MustHaveTagIds. - - Specifies tags which must be all present in the document. - */ - MustHaveTagIds []string - - /* O365ObjectTypes. - - Specifies the object types to filter objects on. Only applicable if the environment is o365. - */ - O365ObjectTypes []string - - /* ObjectIds. - - Specifies a list of Object ids to filter. - */ - ObjectIds []int64 - - /* OsTypes. - - Specifies the operating system types to filter objects on. - */ - OsTypes []string - - /* PaginationCookie. - - Specifies the pagination cookie with which subsequent parts of the response can be fetched. - */ - PaginationCookie *string - - /* ProtectionGroupIds. - - Specifies a list of Protection Group ids to filter the objects. If specified, the objects protected by specified Protection Group ids will be returned. - */ - ProtectionGroupIds []string - - /* ProtectionTypes. - - Specifies the protection type to filter objects. - */ - ProtectionTypes []string - - /* RegionIds. - - Specifies a list of region ids. Only records from clusters having these region ids will be returned. - */ - RegionIds []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* SearchString. - - Specifies the search string to filter the objects. This search string will be applicable for objectnames. User can specify a wildcard character '*' as a suffix to a string where all object names are matched with the prefix string. For example, if vm1 and vm2 are the names of objects, user can specify vm* to list the objects. If not specified, then all the objects will be returned which will match other filtering criteria. - */ - SearchString *string - - /* SourceIds. - - Specifies a list of Protection Source object ids to filter the objects. If specified, the object which are present in those Sources will be returned. - */ - SourceIds []int64 - - /* SourceUuids. - - Specifies a list of Protection Source object uuids to filter the objects. If specified, the object which are present in those Sources will be returned. - */ - SourceUuids []string - - /* StorageDomainIds. - - Specifies the list of storage domain ids. Format is clusterId:clusterIncarnationId:storageDomainId. Only objects having protection in these storage domains will be returned. - */ - StorageDomainIds []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchObjectsParams) WithDefaults() *SearchObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search objects params -func (o *SearchObjectsParams) WithTimeout(timeout time.Duration) *SearchObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search objects params -func (o *SearchObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search objects params -func (o *SearchObjectsParams) WithContext(ctx context.Context) *SearchObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search objects params -func (o *SearchObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search objects params -func (o *SearchObjectsParams) WithHTTPClient(client *http.Client) *SearchObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search objects params -func (o *SearchObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAzureObjectTypes adds the azureObjectTypes to the search objects params -func (o *SearchObjectsParams) WithAzureObjectTypes(azureObjectTypes []string) *SearchObjectsParams { - o.SetAzureObjectTypes(azureObjectTypes) - return o -} - -// SetAzureObjectTypes adds the azureObjectTypes to the search objects params -func (o *SearchObjectsParams) SetAzureObjectTypes(azureObjectTypes []string) { - o.AzureObjectTypes = azureObjectTypes -} - -// WithClusterIdentifiers adds the clusterIdentifiers to the search objects params -func (o *SearchObjectsParams) WithClusterIdentifiers(clusterIdentifiers []string) *SearchObjectsParams { - o.SetClusterIdentifiers(clusterIdentifiers) - return o -} - -// SetClusterIdentifiers adds the clusterIdentifiers to the search objects params -func (o *SearchObjectsParams) SetClusterIdentifiers(clusterIdentifiers []string) { - o.ClusterIdentifiers = clusterIdentifiers -} - -// WithCount adds the count to the search objects params -func (o *SearchObjectsParams) WithCount(count *int32) *SearchObjectsParams { - o.SetCount(count) - return o -} - -// SetCount adds the count to the search objects params -func (o *SearchObjectsParams) SetCount(count *int32) { - o.Count = count -} - -// WithEnvironments adds the environments to the search objects params -func (o *SearchObjectsParams) WithEnvironments(environments []string) *SearchObjectsParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the search objects params -func (o *SearchObjectsParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithIncludeDeletedObjects adds the includeDeletedObjects to the search objects params -func (o *SearchObjectsParams) WithIncludeDeletedObjects(includeDeletedObjects *bool) *SearchObjectsParams { - o.SetIncludeDeletedObjects(includeDeletedObjects) - return o -} - -// SetIncludeDeletedObjects adds the includeDeletedObjects to the search objects params -func (o *SearchObjectsParams) SetIncludeDeletedObjects(includeDeletedObjects *bool) { - o.IncludeDeletedObjects = includeDeletedObjects -} - -// WithIncludeTenants adds the includeTenants to the search objects params -func (o *SearchObjectsParams) WithIncludeTenants(includeTenants *bool) *SearchObjectsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the search objects params -func (o *SearchObjectsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIsDeleted adds the isDeleted to the search objects params -func (o *SearchObjectsParams) WithIsDeleted(isDeleted *bool) *SearchObjectsParams { - o.SetIsDeleted(isDeleted) - return o -} - -// SetIsDeleted adds the isDeleted to the search objects params -func (o *SearchObjectsParams) SetIsDeleted(isDeleted *bool) { - o.IsDeleted = isDeleted -} - -// WithIsProtected adds the isProtected to the search objects params -func (o *SearchObjectsParams) WithIsProtected(isProtected *bool) *SearchObjectsParams { - o.SetIsProtected(isProtected) - return o -} - -// SetIsProtected adds the isProtected to the search objects params -func (o *SearchObjectsParams) SetIsProtected(isProtected *bool) { - o.IsProtected = isProtected -} - -// WithLastRunStatusList adds the lastRunStatusList to the search objects params -func (o *SearchObjectsParams) WithLastRunStatusList(lastRunStatusList []string) *SearchObjectsParams { - o.SetLastRunStatusList(lastRunStatusList) - return o -} - -// SetLastRunStatusList adds the lastRunStatusList to the search objects params -func (o *SearchObjectsParams) SetLastRunStatusList(lastRunStatusList []string) { - o.LastRunStatusList = lastRunStatusList -} - -// WithMightHaveSnapshotTagIds adds the mightHaveSnapshotTagIds to the search objects params -func (o *SearchObjectsParams) WithMightHaveSnapshotTagIds(mightHaveSnapshotTagIds []string) *SearchObjectsParams { - o.SetMightHaveSnapshotTagIds(mightHaveSnapshotTagIds) - return o -} - -// SetMightHaveSnapshotTagIds adds the mightHaveSnapshotTagIds to the search objects params -func (o *SearchObjectsParams) SetMightHaveSnapshotTagIds(mightHaveSnapshotTagIds []string) { - o.MightHaveSnapshotTagIds = mightHaveSnapshotTagIds -} - -// WithMightHaveTagIds adds the mightHaveTagIds to the search objects params -func (o *SearchObjectsParams) WithMightHaveTagIds(mightHaveTagIds []string) *SearchObjectsParams { - o.SetMightHaveTagIds(mightHaveTagIds) - return o -} - -// SetMightHaveTagIds adds the mightHaveTagIds to the search objects params -func (o *SearchObjectsParams) SetMightHaveTagIds(mightHaveTagIds []string) { - o.MightHaveTagIds = mightHaveTagIds -} - -// WithMustHaveSnapshotTagIds adds the mustHaveSnapshotTagIds to the search objects params -func (o *SearchObjectsParams) WithMustHaveSnapshotTagIds(mustHaveSnapshotTagIds []string) *SearchObjectsParams { - o.SetMustHaveSnapshotTagIds(mustHaveSnapshotTagIds) - return o -} - -// SetMustHaveSnapshotTagIds adds the mustHaveSnapshotTagIds to the search objects params -func (o *SearchObjectsParams) SetMustHaveSnapshotTagIds(mustHaveSnapshotTagIds []string) { - o.MustHaveSnapshotTagIds = mustHaveSnapshotTagIds -} - -// WithMustHaveTagIds adds the mustHaveTagIds to the search objects params -func (o *SearchObjectsParams) WithMustHaveTagIds(mustHaveTagIds []string) *SearchObjectsParams { - o.SetMustHaveTagIds(mustHaveTagIds) - return o -} - -// SetMustHaveTagIds adds the mustHaveTagIds to the search objects params -func (o *SearchObjectsParams) SetMustHaveTagIds(mustHaveTagIds []string) { - o.MustHaveTagIds = mustHaveTagIds -} - -// WithO365ObjectTypes adds the o365ObjectTypes to the search objects params -func (o *SearchObjectsParams) WithO365ObjectTypes(o365ObjectTypes []string) *SearchObjectsParams { - o.SetO365ObjectTypes(o365ObjectTypes) - return o -} - -// SetO365ObjectTypes adds the o365ObjectTypes to the search objects params -func (o *SearchObjectsParams) SetO365ObjectTypes(o365ObjectTypes []string) { - o.O365ObjectTypes = o365ObjectTypes -} - -// WithObjectIds adds the objectIds to the search objects params -func (o *SearchObjectsParams) WithObjectIds(objectIds []int64) *SearchObjectsParams { - o.SetObjectIds(objectIds) - return o -} - -// SetObjectIds adds the objectIds to the search objects params -func (o *SearchObjectsParams) SetObjectIds(objectIds []int64) { - o.ObjectIds = objectIds -} - -// WithOsTypes adds the osTypes to the search objects params -func (o *SearchObjectsParams) WithOsTypes(osTypes []string) *SearchObjectsParams { - o.SetOsTypes(osTypes) - return o -} - -// SetOsTypes adds the osTypes to the search objects params -func (o *SearchObjectsParams) SetOsTypes(osTypes []string) { - o.OsTypes = osTypes -} - -// WithPaginationCookie adds the paginationCookie to the search objects params -func (o *SearchObjectsParams) WithPaginationCookie(paginationCookie *string) *SearchObjectsParams { - o.SetPaginationCookie(paginationCookie) - return o -} - -// SetPaginationCookie adds the paginationCookie to the search objects params -func (o *SearchObjectsParams) SetPaginationCookie(paginationCookie *string) { - o.PaginationCookie = paginationCookie -} - -// WithProtectionGroupIds adds the protectionGroupIds to the search objects params -func (o *SearchObjectsParams) WithProtectionGroupIds(protectionGroupIds []string) *SearchObjectsParams { - o.SetProtectionGroupIds(protectionGroupIds) - return o -} - -// SetProtectionGroupIds adds the protectionGroupIds to the search objects params -func (o *SearchObjectsParams) SetProtectionGroupIds(protectionGroupIds []string) { - o.ProtectionGroupIds = protectionGroupIds -} - -// WithProtectionTypes adds the protectionTypes to the search objects params -func (o *SearchObjectsParams) WithProtectionTypes(protectionTypes []string) *SearchObjectsParams { - o.SetProtectionTypes(protectionTypes) - return o -} - -// SetProtectionTypes adds the protectionTypes to the search objects params -func (o *SearchObjectsParams) SetProtectionTypes(protectionTypes []string) { - o.ProtectionTypes = protectionTypes -} - -// WithRegionIds adds the regionIds to the search objects params -func (o *SearchObjectsParams) WithRegionIds(regionIds []string) *SearchObjectsParams { - o.SetRegionIds(regionIds) - return o -} - -// SetRegionIds adds the regionIds to the search objects params -func (o *SearchObjectsParams) SetRegionIds(regionIds []string) { - o.RegionIds = regionIds -} - -// WithRequestInitiatorType adds the requestInitiatorType to the search objects params -func (o *SearchObjectsParams) WithRequestInitiatorType(requestInitiatorType *string) *SearchObjectsParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the search objects params -func (o *SearchObjectsParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithSearchString adds the searchString to the search objects params -func (o *SearchObjectsParams) WithSearchString(searchString *string) *SearchObjectsParams { - o.SetSearchString(searchString) - return o -} - -// SetSearchString adds the searchString to the search objects params -func (o *SearchObjectsParams) SetSearchString(searchString *string) { - o.SearchString = searchString -} - -// WithSourceIds adds the sourceIds to the search objects params -func (o *SearchObjectsParams) WithSourceIds(sourceIds []int64) *SearchObjectsParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the search objects params -func (o *SearchObjectsParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WithSourceUuids adds the sourceUuids to the search objects params -func (o *SearchObjectsParams) WithSourceUuids(sourceUuids []string) *SearchObjectsParams { - o.SetSourceUuids(sourceUuids) - return o -} - -// SetSourceUuids adds the sourceUuids to the search objects params -func (o *SearchObjectsParams) SetSourceUuids(sourceUuids []string) { - o.SourceUuids = sourceUuids -} - -// WithStorageDomainIds adds the storageDomainIds to the search objects params -func (o *SearchObjectsParams) WithStorageDomainIds(storageDomainIds []string) *SearchObjectsParams { - o.SetStorageDomainIds(storageDomainIds) - return o -} - -// SetStorageDomainIds adds the storageDomainIds to the search objects params -func (o *SearchObjectsParams) SetStorageDomainIds(storageDomainIds []string) { - o.StorageDomainIds = storageDomainIds -} - -// WithTenantIds adds the tenantIds to the search objects params -func (o *SearchObjectsParams) WithTenantIds(tenantIds []string) *SearchObjectsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the search objects params -func (o *SearchObjectsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.AzureObjectTypes != nil { - - // binding items for azureObjectTypes - joinedAzureObjectTypes := o.bindParamAzureObjectTypes(reg) - - // query array param azureObjectTypes - if err := r.SetQueryParam("azureObjectTypes", joinedAzureObjectTypes...); err != nil { - return err - } - } - - if o.ClusterIdentifiers != nil { - - // binding items for clusterIdentifiers - joinedClusterIdentifiers := o.bindParamClusterIdentifiers(reg) - - // query array param clusterIdentifiers - if err := r.SetQueryParam("clusterIdentifiers", joinedClusterIdentifiers...); err != nil { - return err - } - } - - if o.Count != nil { - - // query param count - var qrCount int32 - - if o.Count != nil { - qrCount = *o.Count - } - qCount := swag.FormatInt32(qrCount) - if qCount != "" { - - if err := r.SetQueryParam("count", qCount); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.IncludeDeletedObjects != nil { - - // query param includeDeletedObjects - var qrIncludeDeletedObjects bool - - if o.IncludeDeletedObjects != nil { - qrIncludeDeletedObjects = *o.IncludeDeletedObjects - } - qIncludeDeletedObjects := swag.FormatBool(qrIncludeDeletedObjects) - if qIncludeDeletedObjects != "" { - - if err := r.SetQueryParam("includeDeletedObjects", qIncludeDeletedObjects); 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.IsDeleted != nil { - - // query param isDeleted - var qrIsDeleted bool - - if o.IsDeleted != nil { - qrIsDeleted = *o.IsDeleted - } - qIsDeleted := swag.FormatBool(qrIsDeleted) - if qIsDeleted != "" { - - if err := r.SetQueryParam("isDeleted", qIsDeleted); err != nil { - return err - } - } - } - - if o.IsProtected != nil { - - // query param isProtected - var qrIsProtected bool - - if o.IsProtected != nil { - qrIsProtected = *o.IsProtected - } - qIsProtected := swag.FormatBool(qrIsProtected) - if qIsProtected != "" { - - if err := r.SetQueryParam("isProtected", qIsProtected); err != nil { - return err - } - } - } - - if o.LastRunStatusList != nil { - - // binding items for lastRunStatusList - joinedLastRunStatusList := o.bindParamLastRunStatusList(reg) - - // query array param lastRunStatusList - if err := r.SetQueryParam("lastRunStatusList", joinedLastRunStatusList...); err != nil { - return err - } - } - - if o.MightHaveSnapshotTagIds != nil { - - // binding items for mightHaveSnapshotTagIds - joinedMightHaveSnapshotTagIds := o.bindParamMightHaveSnapshotTagIds(reg) - - // query array param mightHaveSnapshotTagIds - if err := r.SetQueryParam("mightHaveSnapshotTagIds", joinedMightHaveSnapshotTagIds...); err != nil { - return err - } - } - - if o.MightHaveTagIds != nil { - - // binding items for mightHaveTagIds - joinedMightHaveTagIds := o.bindParamMightHaveTagIds(reg) - - // query array param mightHaveTagIds - if err := r.SetQueryParam("mightHaveTagIds", joinedMightHaveTagIds...); err != nil { - return err - } - } - - if o.MustHaveSnapshotTagIds != nil { - - // binding items for mustHaveSnapshotTagIds - joinedMustHaveSnapshotTagIds := o.bindParamMustHaveSnapshotTagIds(reg) - - // query array param mustHaveSnapshotTagIds - if err := r.SetQueryParam("mustHaveSnapshotTagIds", joinedMustHaveSnapshotTagIds...); err != nil { - return err - } - } - - if o.MustHaveTagIds != nil { - - // binding items for mustHaveTagIds - joinedMustHaveTagIds := o.bindParamMustHaveTagIds(reg) - - // query array param mustHaveTagIds - if err := r.SetQueryParam("mustHaveTagIds", joinedMustHaveTagIds...); err != nil { - return err - } - } - - if o.O365ObjectTypes != nil { - - // binding items for o365ObjectTypes - joinedO365ObjectTypes := o.bindParamO365ObjectTypes(reg) - - // query array param o365ObjectTypes - if err := r.SetQueryParam("o365ObjectTypes", joinedO365ObjectTypes...); err != nil { - return err - } - } - - if o.ObjectIds != nil { - - // binding items for objectIds - joinedObjectIds := o.bindParamObjectIds(reg) - - // query array param objectIds - if err := r.SetQueryParam("objectIds", joinedObjectIds...); err != nil { - return err - } - } - - if o.OsTypes != nil { - - // binding items for osTypes - joinedOsTypes := o.bindParamOsTypes(reg) - - // query array param osTypes - if err := r.SetQueryParam("osTypes", joinedOsTypes...); err != nil { - return err - } - } - - 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.ProtectionGroupIds != nil { - - // binding items for protectionGroupIds - joinedProtectionGroupIds := o.bindParamProtectionGroupIds(reg) - - // query array param protectionGroupIds - if err := r.SetQueryParam("protectionGroupIds", joinedProtectionGroupIds...); err != nil { - return err - } - } - - if o.ProtectionTypes != nil { - - // binding items for protectionTypes - joinedProtectionTypes := o.bindParamProtectionTypes(reg) - - // query array param protectionTypes - if err := r.SetQueryParam("protectionTypes", joinedProtectionTypes...); err != nil { - return err - } - } - - if o.RegionIds != nil { - - // binding items for regionIds - joinedRegionIds := o.bindParamRegionIds(reg) - - // query array param regionIds - if err := r.SetQueryParam("regionIds", joinedRegionIds...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.SearchString != nil { - - // query param searchString - var qrSearchString string - - if o.SearchString != nil { - qrSearchString = *o.SearchString - } - qSearchString := qrSearchString - if qSearchString != "" { - - if err := r.SetQueryParam("searchString", qSearchString); err != nil { - return err - } - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if o.SourceUuids != nil { - - // binding items for sourceUuids - joinedSourceUuids := o.bindParamSourceUuids(reg) - - // query array param sourceUuids - if err := r.SetQueryParam("sourceUuids", joinedSourceUuids...); err != nil { - return err - } - } - - if o.StorageDomainIds != nil { - - // binding items for storageDomainIds - joinedStorageDomainIds := o.bindParamStorageDomainIds(reg) - - // query array param storageDomainIds - if err := r.SetQueryParam("storageDomainIds", joinedStorageDomainIds...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchObjects binds the parameter azureObjectTypes -func (o *SearchObjectsParams) bindParamAzureObjectTypes(formats strfmt.Registry) []string { - azureObjectTypesIR := o.AzureObjectTypes - - var azureObjectTypesIC []string - for _, azureObjectTypesIIR := range azureObjectTypesIR { // explode []string - - azureObjectTypesIIV := azureObjectTypesIIR // string as string - azureObjectTypesIC = append(azureObjectTypesIC, azureObjectTypesIIV) - } - - // items.CollectionFormat: "" - azureObjectTypesIS := swag.JoinByFormat(azureObjectTypesIC, "") - - return azureObjectTypesIS -} - -// bindParamSearchObjects binds the parameter clusterIdentifiers -func (o *SearchObjectsParams) bindParamClusterIdentifiers(formats strfmt.Registry) []string { - clusterIdentifiersIR := o.ClusterIdentifiers - - var clusterIdentifiersIC []string - for _, clusterIdentifiersIIR := range clusterIdentifiersIR { // explode []string - - clusterIdentifiersIIV := clusterIdentifiersIIR // string as string - clusterIdentifiersIC = append(clusterIdentifiersIC, clusterIdentifiersIIV) - } - - // items.CollectionFormat: "" - clusterIdentifiersIS := swag.JoinByFormat(clusterIdentifiersIC, "") - - return clusterIdentifiersIS -} - -// bindParamSearchObjects binds the parameter environments -func (o *SearchObjectsParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamSearchObjects binds the parameter lastRunStatusList -func (o *SearchObjectsParams) bindParamLastRunStatusList(formats strfmt.Registry) []string { - lastRunStatusListIR := o.LastRunStatusList - - var lastRunStatusListIC []string - for _, lastRunStatusListIIR := range lastRunStatusListIR { // explode []string - - lastRunStatusListIIV := lastRunStatusListIIR // string as string - lastRunStatusListIC = append(lastRunStatusListIC, lastRunStatusListIIV) - } - - // items.CollectionFormat: "" - lastRunStatusListIS := swag.JoinByFormat(lastRunStatusListIC, "") - - return lastRunStatusListIS -} - -// bindParamSearchObjects binds the parameter mightHaveSnapshotTagIds -func (o *SearchObjectsParams) bindParamMightHaveSnapshotTagIds(formats strfmt.Registry) []string { - mightHaveSnapshotTagIdsIR := o.MightHaveSnapshotTagIds - - var mightHaveSnapshotTagIdsIC []string - for _, mightHaveSnapshotTagIdsIIR := range mightHaveSnapshotTagIdsIR { // explode []string - - mightHaveSnapshotTagIdsIIV := mightHaveSnapshotTagIdsIIR // string as string - mightHaveSnapshotTagIdsIC = append(mightHaveSnapshotTagIdsIC, mightHaveSnapshotTagIdsIIV) - } - - // items.CollectionFormat: "" - mightHaveSnapshotTagIdsIS := swag.JoinByFormat(mightHaveSnapshotTagIdsIC, "") - - return mightHaveSnapshotTagIdsIS -} - -// bindParamSearchObjects binds the parameter mightHaveTagIds -func (o *SearchObjectsParams) bindParamMightHaveTagIds(formats strfmt.Registry) []string { - mightHaveTagIdsIR := o.MightHaveTagIds - - var mightHaveTagIdsIC []string - for _, mightHaveTagIdsIIR := range mightHaveTagIdsIR { // explode []string - - mightHaveTagIdsIIV := mightHaveTagIdsIIR // string as string - mightHaveTagIdsIC = append(mightHaveTagIdsIC, mightHaveTagIdsIIV) - } - - // items.CollectionFormat: "" - mightHaveTagIdsIS := swag.JoinByFormat(mightHaveTagIdsIC, "") - - return mightHaveTagIdsIS -} - -// bindParamSearchObjects binds the parameter mustHaveSnapshotTagIds -func (o *SearchObjectsParams) bindParamMustHaveSnapshotTagIds(formats strfmt.Registry) []string { - mustHaveSnapshotTagIdsIR := o.MustHaveSnapshotTagIds - - var mustHaveSnapshotTagIdsIC []string - for _, mustHaveSnapshotTagIdsIIR := range mustHaveSnapshotTagIdsIR { // explode []string - - mustHaveSnapshotTagIdsIIV := mustHaveSnapshotTagIdsIIR // string as string - mustHaveSnapshotTagIdsIC = append(mustHaveSnapshotTagIdsIC, mustHaveSnapshotTagIdsIIV) - } - - // items.CollectionFormat: "" - mustHaveSnapshotTagIdsIS := swag.JoinByFormat(mustHaveSnapshotTagIdsIC, "") - - return mustHaveSnapshotTagIdsIS -} - -// bindParamSearchObjects binds the parameter mustHaveTagIds -func (o *SearchObjectsParams) bindParamMustHaveTagIds(formats strfmt.Registry) []string { - mustHaveTagIdsIR := o.MustHaveTagIds - - var mustHaveTagIdsIC []string - for _, mustHaveTagIdsIIR := range mustHaveTagIdsIR { // explode []string - - mustHaveTagIdsIIV := mustHaveTagIdsIIR // string as string - mustHaveTagIdsIC = append(mustHaveTagIdsIC, mustHaveTagIdsIIV) - } - - // items.CollectionFormat: "" - mustHaveTagIdsIS := swag.JoinByFormat(mustHaveTagIdsIC, "") - - return mustHaveTagIdsIS -} - -// bindParamSearchObjects binds the parameter o365ObjectTypes -func (o *SearchObjectsParams) bindParamO365ObjectTypes(formats strfmt.Registry) []string { - o365ObjectTypesIR := o.O365ObjectTypes - - var o365ObjectTypesIC []string - for _, o365ObjectTypesIIR := range o365ObjectTypesIR { // explode []string - - o365ObjectTypesIIV := o365ObjectTypesIIR // string as string - o365ObjectTypesIC = append(o365ObjectTypesIC, o365ObjectTypesIIV) - } - - // items.CollectionFormat: "" - o365ObjectTypesIS := swag.JoinByFormat(o365ObjectTypesIC, "") - - return o365ObjectTypesIS -} - -// bindParamSearchObjects binds the parameter objectIds -func (o *SearchObjectsParams) bindParamObjectIds(formats strfmt.Registry) []string { - objectIdsIR := o.ObjectIds - - var objectIdsIC []string - for _, objectIdsIIR := range objectIdsIR { // explode []int64 - - objectIdsIIV := swag.FormatInt64(objectIdsIIR) // int64 as string - objectIdsIC = append(objectIdsIC, objectIdsIIV) - } - - // items.CollectionFormat: "" - objectIdsIS := swag.JoinByFormat(objectIdsIC, "") - - return objectIdsIS -} - -// bindParamSearchObjects binds the parameter osTypes -func (o *SearchObjectsParams) bindParamOsTypes(formats strfmt.Registry) []string { - osTypesIR := o.OsTypes - - var osTypesIC []string - for _, osTypesIIR := range osTypesIR { // explode []string - - osTypesIIV := osTypesIIR // string as string - osTypesIC = append(osTypesIC, osTypesIIV) - } - - // items.CollectionFormat: "" - osTypesIS := swag.JoinByFormat(osTypesIC, "") - - return osTypesIS -} - -// bindParamSearchObjects binds the parameter protectionGroupIds -func (o *SearchObjectsParams) bindParamProtectionGroupIds(formats strfmt.Registry) []string { - protectionGroupIdsIR := o.ProtectionGroupIds - - var protectionGroupIdsIC []string - for _, protectionGroupIdsIIR := range protectionGroupIdsIR { // explode []string - - protectionGroupIdsIIV := protectionGroupIdsIIR // string as string - protectionGroupIdsIC = append(protectionGroupIdsIC, protectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - protectionGroupIdsIS := swag.JoinByFormat(protectionGroupIdsIC, "") - - return protectionGroupIdsIS -} - -// bindParamSearchObjects binds the parameter protectionTypes -func (o *SearchObjectsParams) bindParamProtectionTypes(formats strfmt.Registry) []string { - protectionTypesIR := o.ProtectionTypes - - var protectionTypesIC []string - for _, protectionTypesIIR := range protectionTypesIR { // explode []string - - protectionTypesIIV := protectionTypesIIR // string as string - protectionTypesIC = append(protectionTypesIC, protectionTypesIIV) - } - - // items.CollectionFormat: "" - protectionTypesIS := swag.JoinByFormat(protectionTypesIC, "") - - return protectionTypesIS -} - -// bindParamSearchObjects binds the parameter regionIds -func (o *SearchObjectsParams) bindParamRegionIds(formats strfmt.Registry) []string { - regionIdsIR := o.RegionIds - - var regionIdsIC []string - for _, regionIdsIIR := range regionIdsIR { // explode []string - - regionIdsIIV := regionIdsIIR // string as string - regionIdsIC = append(regionIdsIC, regionIdsIIV) - } - - // items.CollectionFormat: "" - regionIdsIS := swag.JoinByFormat(regionIdsIC, "") - - return regionIdsIS -} - -// bindParamSearchObjects binds the parameter sourceIds -func (o *SearchObjectsParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} - -// bindParamSearchObjects binds the parameter sourceUuids -func (o *SearchObjectsParams) bindParamSourceUuids(formats strfmt.Registry) []string { - sourceUuidsIR := o.SourceUuids - - var sourceUuidsIC []string - for _, sourceUuidsIIR := range sourceUuidsIR { // explode []string - - sourceUuidsIIV := sourceUuidsIIR // string as string - sourceUuidsIC = append(sourceUuidsIC, sourceUuidsIIV) - } - - // items.CollectionFormat: "" - sourceUuidsIS := swag.JoinByFormat(sourceUuidsIC, "") - - return sourceUuidsIS -} - -// bindParamSearchObjects binds the parameter storageDomainIds -func (o *SearchObjectsParams) bindParamStorageDomainIds(formats strfmt.Registry) []string { - storageDomainIdsIR := o.StorageDomainIds - - var storageDomainIdsIC []string - for _, storageDomainIdsIIR := range storageDomainIdsIR { // explode []string - - storageDomainIdsIIV := storageDomainIdsIIR // string as string - storageDomainIdsIC = append(storageDomainIdsIC, storageDomainIdsIIV) - } - - // items.CollectionFormat: "" - storageDomainIdsIS := swag.JoinByFormat(storageDomainIdsIC, "") - - return storageDomainIdsIS -} - -// bindParamSearchObjects binds the parameter tenantIds -func (o *SearchObjectsParams) 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/client/search/search_objects_responses.go b/v2/client/search/search_objects_responses.go deleted file mode 100644 index c156ab1a..00000000 --- a/v2/client/search/search_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SearchObjectsReader is a Reader for the SearchObjects structure. -type SearchObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchObjectsDefault(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 - } -} - -// NewSearchObjectsOK creates a SearchObjectsOK with default headers values -func NewSearchObjectsOK() *SearchObjectsOK { - return &SearchObjectsOK{} -} - -/* -SearchObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchObjectsOK struct { - Payload *models.ObjectsSearchResponseBody -} - -// IsSuccess returns true when this search objects o k response has a 2xx status code -func (o *SearchObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search objects o k response has a 3xx status code -func (o *SearchObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search objects o k response has a 4xx status code -func (o *SearchObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search objects o k response has a 5xx status code -func (o *SearchObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search objects o k response a status code equal to that given -func (o *SearchObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search objects o k response -func (o *SearchObjectsOK) Code() int { - return 200 -} - -func (o *SearchObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/objects][%d] searchObjectsOK %s", 200, payload) -} - -func (o *SearchObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/objects][%d] searchObjectsOK %s", 200, payload) -} - -func (o *SearchObjectsOK) GetPayload() *models.ObjectsSearchResponseBody { - return o.Payload -} - -func (o *SearchObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectsSearchResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchObjectsDefault creates a SearchObjectsDefault with default headers values -func NewSearchObjectsDefault(code int) *SearchObjectsDefault { - return &SearchObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this search objects default response has a 2xx status code -func (o *SearchObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search objects default response has a 3xx status code -func (o *SearchObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search objects default response has a 4xx status code -func (o *SearchObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search objects default response has a 5xx status code -func (o *SearchObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search objects default response a status code equal to that given -func (o *SearchObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search objects default response -func (o *SearchObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/objects][%d] SearchObjects default %s", o._statusCode, payload) -} - -func (o *SearchObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/objects][%d] SearchObjects default %s", o._statusCode, payload) -} - -func (o *SearchObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SearchObjectsDefault) 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/search/search_protected_objects_parameters.go b/v2/client/search/search_protected_objects_parameters.go deleted file mode 100644 index ae26cdca..00000000 --- a/v2/client/search/search_protected_objects_parameters.go +++ /dev/null @@ -1,883 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/go-openapi/swag" -) - -// NewSearchProtectedObjectsParams creates a new SearchProtectedObjectsParams 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 NewSearchProtectedObjectsParams() *SearchProtectedObjectsParams { - return &SearchProtectedObjectsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewSearchProtectedObjectsParamsWithTimeout creates a new SearchProtectedObjectsParams object -// with the ability to set a timeout on a request. -func NewSearchProtectedObjectsParamsWithTimeout(timeout time.Duration) *SearchProtectedObjectsParams { - return &SearchProtectedObjectsParams{ - timeout: timeout, - } -} - -// NewSearchProtectedObjectsParamsWithContext creates a new SearchProtectedObjectsParams object -// with the ability to set a context for a request. -func NewSearchProtectedObjectsParamsWithContext(ctx context.Context) *SearchProtectedObjectsParams { - return &SearchProtectedObjectsParams{ - Context: ctx, - } -} - -// NewSearchProtectedObjectsParamsWithHTTPClient creates a new SearchProtectedObjectsParams object -// with the ability to set a custom HTTPClient for a request. -func NewSearchProtectedObjectsParamsWithHTTPClient(client *http.Client) *SearchProtectedObjectsParams { - return &SearchProtectedObjectsParams{ - HTTPClient: client, - } -} - -/* -SearchProtectedObjectsParams contains all the parameters to send to the API endpoint - - for the search protected objects operation. - - Typically these are written to a http.Request. -*/ -type SearchProtectedObjectsParams struct { - - /* CdpProtectedOnly. - - Specifies whether to only return the CDP protected objects. - */ - CdpProtectedOnly *bool - - /* Environments. - - Specifies the environment type to filter objects. - */ - Environments []string - - /* FilterSnapshotFromUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter the objects if the Object has a successful snapshot after this value. - - Format: int64 - */ - FilterSnapshotFromUsecs *int64 - - /* FilterSnapshotToUsecs. - - Specifies the timestamp in Unix time epoch in microseconds to filter the objects if the Object has a successful snapshot before this value. - - Format: int64 - */ - FilterSnapshotToUsecs *int64 - - /* IncludeTenants. - - If true, the response will include Objects which belongs to all tenants which the current user has permission to see. - */ - IncludeTenants *bool - - /* ObjectActionKey. - - Filter by ObjectActionKey, which uniquely represents protection of an object. An object can be protected in multiple ways but atmost once for a given combination of ObjectActionKey. When specified, latest snapshot info matching the objectActionKey is for corresponding object. - */ - ObjectActionKey *string - - /* ObjectIds. - - Specifies a list of Object ids to filter. - */ - ObjectIds []int64 - - /* OsTypes. - - Specifies the operating system types to filter objects on. - */ - OsTypes []string - - /* ProtectionGroupIds. - - Specifies a list of Protection Group ids to filter the objects. If specified, the objects protected by specified Protection Group ids will be returned. - */ - ProtectionGroupIds []string - - /* RegionIds. - - Specifies a list of region ids. Only records from clusters having these region ids will be returned. - */ - RegionIds []string - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* RunInstanceIds. - - Specifies a list of run instance ids. If specified only objects belonging to the provided run id will be retunrned. - */ - RunInstanceIds []int64 - - /* SearchString. - - Specifies the search string to filter the objects. This search string will be applicable for objectnames and Protection Group names. User can specify a wildcard character '*' as a suffix to a string where all object and their Protection Group names are matched with the prefix string. For example, if vm1 and vm2 are the names of objects, user can specify vm* to list the objects. If not specified, then all the objects with Protection Groups will be returned which will match other filtering criteria. - */ - SearchString *string - - /* SnapshotActions. - - Specifies a list of recovery actions. Only snapshots that applies to these actions will be returned. - */ - SnapshotActions []string - - /* SourceIds. - - Specifies a list of Protection Source object ids to filter the objects. If specified, the object which are present in those Sources will be returned. - */ - SourceIds []int64 - - /* StorageDomainIds. - - Specifies the Storage Domain ids to filter objects for which Protection Groups are writing data to Cohesity Views on the specified Storage Domains. - */ - StorageDomainIds []int64 - - /* SubResultSize. - - Specifies the size of objects to be fetched for a single subresult. - - Format: int32 - */ - SubResultSize *int32 - - /* 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 cache. There is a lag of 15 seconds between the read replica and primary data source. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the search protected objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectedObjectsParams) WithDefaults() *SearchProtectedObjectsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the search protected objects params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *SearchProtectedObjectsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the search protected objects params -func (o *SearchProtectedObjectsParams) WithTimeout(timeout time.Duration) *SearchProtectedObjectsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the search protected objects params -func (o *SearchProtectedObjectsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the search protected objects params -func (o *SearchProtectedObjectsParams) WithContext(ctx context.Context) *SearchProtectedObjectsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the search protected objects params -func (o *SearchProtectedObjectsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the search protected objects params -func (o *SearchProtectedObjectsParams) WithHTTPClient(client *http.Client) *SearchProtectedObjectsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the search protected objects params -func (o *SearchProtectedObjectsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCdpProtectedOnly adds the cdpProtectedOnly to the search protected objects params -func (o *SearchProtectedObjectsParams) WithCdpProtectedOnly(cdpProtectedOnly *bool) *SearchProtectedObjectsParams { - o.SetCdpProtectedOnly(cdpProtectedOnly) - return o -} - -// SetCdpProtectedOnly adds the cdpProtectedOnly to the search protected objects params -func (o *SearchProtectedObjectsParams) SetCdpProtectedOnly(cdpProtectedOnly *bool) { - o.CdpProtectedOnly = cdpProtectedOnly -} - -// WithEnvironments adds the environments to the search protected objects params -func (o *SearchProtectedObjectsParams) WithEnvironments(environments []string) *SearchProtectedObjectsParams { - o.SetEnvironments(environments) - return o -} - -// SetEnvironments adds the environments to the search protected objects params -func (o *SearchProtectedObjectsParams) SetEnvironments(environments []string) { - o.Environments = environments -} - -// WithFilterSnapshotFromUsecs adds the filterSnapshotFromUsecs to the search protected objects params -func (o *SearchProtectedObjectsParams) WithFilterSnapshotFromUsecs(filterSnapshotFromUsecs *int64) *SearchProtectedObjectsParams { - o.SetFilterSnapshotFromUsecs(filterSnapshotFromUsecs) - return o -} - -// SetFilterSnapshotFromUsecs adds the filterSnapshotFromUsecs to the search protected objects params -func (o *SearchProtectedObjectsParams) SetFilterSnapshotFromUsecs(filterSnapshotFromUsecs *int64) { - o.FilterSnapshotFromUsecs = filterSnapshotFromUsecs -} - -// WithFilterSnapshotToUsecs adds the filterSnapshotToUsecs to the search protected objects params -func (o *SearchProtectedObjectsParams) WithFilterSnapshotToUsecs(filterSnapshotToUsecs *int64) *SearchProtectedObjectsParams { - o.SetFilterSnapshotToUsecs(filterSnapshotToUsecs) - return o -} - -// SetFilterSnapshotToUsecs adds the filterSnapshotToUsecs to the search protected objects params -func (o *SearchProtectedObjectsParams) SetFilterSnapshotToUsecs(filterSnapshotToUsecs *int64) { - o.FilterSnapshotToUsecs = filterSnapshotToUsecs -} - -// WithIncludeTenants adds the includeTenants to the search protected objects params -func (o *SearchProtectedObjectsParams) WithIncludeTenants(includeTenants *bool) *SearchProtectedObjectsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the search protected objects params -func (o *SearchProtectedObjectsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithObjectActionKey adds the objectActionKey to the search protected objects params -func (o *SearchProtectedObjectsParams) WithObjectActionKey(objectActionKey *string) *SearchProtectedObjectsParams { - o.SetObjectActionKey(objectActionKey) - return o -} - -// SetObjectActionKey adds the objectActionKey to the search protected objects params -func (o *SearchProtectedObjectsParams) SetObjectActionKey(objectActionKey *string) { - o.ObjectActionKey = objectActionKey -} - -// WithObjectIds adds the objectIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithObjectIds(objectIds []int64) *SearchProtectedObjectsParams { - o.SetObjectIds(objectIds) - return o -} - -// SetObjectIds adds the objectIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetObjectIds(objectIds []int64) { - o.ObjectIds = objectIds -} - -// WithOsTypes adds the osTypes to the search protected objects params -func (o *SearchProtectedObjectsParams) WithOsTypes(osTypes []string) *SearchProtectedObjectsParams { - o.SetOsTypes(osTypes) - return o -} - -// SetOsTypes adds the osTypes to the search protected objects params -func (o *SearchProtectedObjectsParams) SetOsTypes(osTypes []string) { - o.OsTypes = osTypes -} - -// WithProtectionGroupIds adds the protectionGroupIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithProtectionGroupIds(protectionGroupIds []string) *SearchProtectedObjectsParams { - o.SetProtectionGroupIds(protectionGroupIds) - return o -} - -// SetProtectionGroupIds adds the protectionGroupIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetProtectionGroupIds(protectionGroupIds []string) { - o.ProtectionGroupIds = protectionGroupIds -} - -// WithRegionIds adds the regionIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithRegionIds(regionIds []string) *SearchProtectedObjectsParams { - o.SetRegionIds(regionIds) - return o -} - -// SetRegionIds adds the regionIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetRegionIds(regionIds []string) { - o.RegionIds = regionIds -} - -// WithRequestInitiatorType adds the requestInitiatorType to the search protected objects params -func (o *SearchProtectedObjectsParams) WithRequestInitiatorType(requestInitiatorType *string) *SearchProtectedObjectsParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the search protected objects params -func (o *SearchProtectedObjectsParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithRunInstanceIds adds the runInstanceIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithRunInstanceIds(runInstanceIds []int64) *SearchProtectedObjectsParams { - o.SetRunInstanceIds(runInstanceIds) - return o -} - -// SetRunInstanceIds adds the runInstanceIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetRunInstanceIds(runInstanceIds []int64) { - o.RunInstanceIds = runInstanceIds -} - -// WithSearchString adds the searchString to the search protected objects params -func (o *SearchProtectedObjectsParams) WithSearchString(searchString *string) *SearchProtectedObjectsParams { - o.SetSearchString(searchString) - return o -} - -// SetSearchString adds the searchString to the search protected objects params -func (o *SearchProtectedObjectsParams) SetSearchString(searchString *string) { - o.SearchString = searchString -} - -// WithSnapshotActions adds the snapshotActions to the search protected objects params -func (o *SearchProtectedObjectsParams) WithSnapshotActions(snapshotActions []string) *SearchProtectedObjectsParams { - o.SetSnapshotActions(snapshotActions) - return o -} - -// SetSnapshotActions adds the snapshotActions to the search protected objects params -func (o *SearchProtectedObjectsParams) SetSnapshotActions(snapshotActions []string) { - o.SnapshotActions = snapshotActions -} - -// WithSourceIds adds the sourceIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithSourceIds(sourceIds []int64) *SearchProtectedObjectsParams { - o.SetSourceIds(sourceIds) - return o -} - -// SetSourceIds adds the sourceIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetSourceIds(sourceIds []int64) { - o.SourceIds = sourceIds -} - -// WithStorageDomainIds adds the storageDomainIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithStorageDomainIds(storageDomainIds []int64) *SearchProtectedObjectsParams { - o.SetStorageDomainIds(storageDomainIds) - return o -} - -// SetStorageDomainIds adds the storageDomainIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetStorageDomainIds(storageDomainIds []int64) { - o.StorageDomainIds = storageDomainIds -} - -// WithSubResultSize adds the subResultSize to the search protected objects params -func (o *SearchProtectedObjectsParams) WithSubResultSize(subResultSize *int32) *SearchProtectedObjectsParams { - o.SetSubResultSize(subResultSize) - return o -} - -// SetSubResultSize adds the subResultSize to the search protected objects params -func (o *SearchProtectedObjectsParams) SetSubResultSize(subResultSize *int32) { - o.SubResultSize = subResultSize -} - -// WithTenantIds adds the tenantIds to the search protected objects params -func (o *SearchProtectedObjectsParams) WithTenantIds(tenantIds []string) *SearchProtectedObjectsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the search protected objects params -func (o *SearchProtectedObjectsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the search protected objects params -func (o *SearchProtectedObjectsParams) WithUseCachedData(useCachedData *bool) *SearchProtectedObjectsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the search protected objects params -func (o *SearchProtectedObjectsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *SearchProtectedObjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.CdpProtectedOnly != nil { - - // query param cdpProtectedOnly - var qrCdpProtectedOnly bool - - if o.CdpProtectedOnly != nil { - qrCdpProtectedOnly = *o.CdpProtectedOnly - } - qCdpProtectedOnly := swag.FormatBool(qrCdpProtectedOnly) - if qCdpProtectedOnly != "" { - - if err := r.SetQueryParam("cdpProtectedOnly", qCdpProtectedOnly); err != nil { - return err - } - } - } - - if o.Environments != nil { - - // binding items for environments - joinedEnvironments := o.bindParamEnvironments(reg) - - // query array param environments - if err := r.SetQueryParam("environments", joinedEnvironments...); err != nil { - return err - } - } - - if o.FilterSnapshotFromUsecs != nil { - - // query param filterSnapshotFromUsecs - var qrFilterSnapshotFromUsecs int64 - - if o.FilterSnapshotFromUsecs != nil { - qrFilterSnapshotFromUsecs = *o.FilterSnapshotFromUsecs - } - qFilterSnapshotFromUsecs := swag.FormatInt64(qrFilterSnapshotFromUsecs) - if qFilterSnapshotFromUsecs != "" { - - if err := r.SetQueryParam("filterSnapshotFromUsecs", qFilterSnapshotFromUsecs); err != nil { - return err - } - } - } - - if o.FilterSnapshotToUsecs != nil { - - // query param filterSnapshotToUsecs - var qrFilterSnapshotToUsecs int64 - - if o.FilterSnapshotToUsecs != nil { - qrFilterSnapshotToUsecs = *o.FilterSnapshotToUsecs - } - qFilterSnapshotToUsecs := swag.FormatInt64(qrFilterSnapshotToUsecs) - if qFilterSnapshotToUsecs != "" { - - if err := r.SetQueryParam("filterSnapshotToUsecs", qFilterSnapshotToUsecs); 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.ObjectActionKey != nil { - - // query param objectActionKey - var qrObjectActionKey string - - if o.ObjectActionKey != nil { - qrObjectActionKey = *o.ObjectActionKey - } - qObjectActionKey := qrObjectActionKey - if qObjectActionKey != "" { - - if err := r.SetQueryParam("objectActionKey", qObjectActionKey); err != nil { - return err - } - } - } - - if o.ObjectIds != nil { - - // binding items for objectIds - joinedObjectIds := o.bindParamObjectIds(reg) - - // query array param objectIds - if err := r.SetQueryParam("objectIds", joinedObjectIds...); err != nil { - return err - } - } - - if o.OsTypes != nil { - - // binding items for osTypes - joinedOsTypes := o.bindParamOsTypes(reg) - - // query array param osTypes - if err := r.SetQueryParam("osTypes", joinedOsTypes...); err != nil { - return err - } - } - - if o.ProtectionGroupIds != nil { - - // binding items for protectionGroupIds - joinedProtectionGroupIds := o.bindParamProtectionGroupIds(reg) - - // query array param protectionGroupIds - if err := r.SetQueryParam("protectionGroupIds", joinedProtectionGroupIds...); err != nil { - return err - } - } - - if o.RegionIds != nil { - - // binding items for regionIds - joinedRegionIds := o.bindParamRegionIds(reg) - - // query array param regionIds - if err := r.SetQueryParam("regionIds", joinedRegionIds...); err != nil { - return err - } - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if o.RunInstanceIds != nil { - - // binding items for runInstanceIds - joinedRunInstanceIds := o.bindParamRunInstanceIds(reg) - - // query array param runInstanceIds - if err := r.SetQueryParam("runInstanceIds", joinedRunInstanceIds...); err != nil { - return err - } - } - - if o.SearchString != nil { - - // query param searchString - var qrSearchString string - - if o.SearchString != nil { - qrSearchString = *o.SearchString - } - qSearchString := qrSearchString - if qSearchString != "" { - - if err := r.SetQueryParam("searchString", qSearchString); err != nil { - return err - } - } - } - - if o.SnapshotActions != nil { - - // binding items for snapshotActions - joinedSnapshotActions := o.bindParamSnapshotActions(reg) - - // query array param snapshotActions - if err := r.SetQueryParam("snapshotActions", joinedSnapshotActions...); err != nil { - return err - } - } - - if o.SourceIds != nil { - - // binding items for sourceIds - joinedSourceIds := o.bindParamSourceIds(reg) - - // query array param sourceIds - if err := r.SetQueryParam("sourceIds", joinedSourceIds...); err != nil { - return err - } - } - - if o.StorageDomainIds != nil { - - // binding items for storageDomainIds - joinedStorageDomainIds := o.bindParamStorageDomainIds(reg) - - // query array param storageDomainIds - if err := r.SetQueryParam("storageDomainIds", joinedStorageDomainIds...); err != nil { - return err - } - } - - if o.SubResultSize != nil { - - // query param subResultSize - var qrSubResultSize int32 - - if o.SubResultSize != nil { - qrSubResultSize = *o.SubResultSize - } - qSubResultSize := swag.FormatInt32(qrSubResultSize) - if qSubResultSize != "" { - - if err := r.SetQueryParam("subResultSize", qSubResultSize); err != nil { - return err - } - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamSearchProtectedObjects binds the parameter environments -func (o *SearchProtectedObjectsParams) bindParamEnvironments(formats strfmt.Registry) []string { - environmentsIR := o.Environments - - var environmentsIC []string - for _, environmentsIIR := range environmentsIR { // explode []string - - environmentsIIV := environmentsIIR // string as string - environmentsIC = append(environmentsIC, environmentsIIV) - } - - // items.CollectionFormat: "" - environmentsIS := swag.JoinByFormat(environmentsIC, "") - - return environmentsIS -} - -// bindParamSearchProtectedObjects binds the parameter objectIds -func (o *SearchProtectedObjectsParams) bindParamObjectIds(formats strfmt.Registry) []string { - objectIdsIR := o.ObjectIds - - var objectIdsIC []string - for _, objectIdsIIR := range objectIdsIR { // explode []int64 - - objectIdsIIV := swag.FormatInt64(objectIdsIIR) // int64 as string - objectIdsIC = append(objectIdsIC, objectIdsIIV) - } - - // items.CollectionFormat: "" - objectIdsIS := swag.JoinByFormat(objectIdsIC, "") - - return objectIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter osTypes -func (o *SearchProtectedObjectsParams) bindParamOsTypes(formats strfmt.Registry) []string { - osTypesIR := o.OsTypes - - var osTypesIC []string - for _, osTypesIIR := range osTypesIR { // explode []string - - osTypesIIV := osTypesIIR // string as string - osTypesIC = append(osTypesIC, osTypesIIV) - } - - // items.CollectionFormat: "" - osTypesIS := swag.JoinByFormat(osTypesIC, "") - - return osTypesIS -} - -// bindParamSearchProtectedObjects binds the parameter protectionGroupIds -func (o *SearchProtectedObjectsParams) bindParamProtectionGroupIds(formats strfmt.Registry) []string { - protectionGroupIdsIR := o.ProtectionGroupIds - - var protectionGroupIdsIC []string - for _, protectionGroupIdsIIR := range protectionGroupIdsIR { // explode []string - - protectionGroupIdsIIV := protectionGroupIdsIIR // string as string - protectionGroupIdsIC = append(protectionGroupIdsIC, protectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - protectionGroupIdsIS := swag.JoinByFormat(protectionGroupIdsIC, "") - - return protectionGroupIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter regionIds -func (o *SearchProtectedObjectsParams) bindParamRegionIds(formats strfmt.Registry) []string { - regionIdsIR := o.RegionIds - - var regionIdsIC []string - for _, regionIdsIIR := range regionIdsIR { // explode []string - - regionIdsIIV := regionIdsIIR // string as string - regionIdsIC = append(regionIdsIC, regionIdsIIV) - } - - // items.CollectionFormat: "" - regionIdsIS := swag.JoinByFormat(regionIdsIC, "") - - return regionIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter runInstanceIds -func (o *SearchProtectedObjectsParams) bindParamRunInstanceIds(formats strfmt.Registry) []string { - runInstanceIdsIR := o.RunInstanceIds - - var runInstanceIdsIC []string - for _, runInstanceIdsIIR := range runInstanceIdsIR { // explode []int64 - - runInstanceIdsIIV := swag.FormatInt64(runInstanceIdsIIR) // int64 as string - runInstanceIdsIC = append(runInstanceIdsIC, runInstanceIdsIIV) - } - - // items.CollectionFormat: "" - runInstanceIdsIS := swag.JoinByFormat(runInstanceIdsIC, "") - - return runInstanceIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter snapshotActions -func (o *SearchProtectedObjectsParams) bindParamSnapshotActions(formats strfmt.Registry) []string { - snapshotActionsIR := o.SnapshotActions - - var snapshotActionsIC []string - for _, snapshotActionsIIR := range snapshotActionsIR { // explode []string - - snapshotActionsIIV := snapshotActionsIIR // string as string - snapshotActionsIC = append(snapshotActionsIC, snapshotActionsIIV) - } - - // items.CollectionFormat: "" - snapshotActionsIS := swag.JoinByFormat(snapshotActionsIC, "") - - return snapshotActionsIS -} - -// bindParamSearchProtectedObjects binds the parameter sourceIds -func (o *SearchProtectedObjectsParams) bindParamSourceIds(formats strfmt.Registry) []string { - sourceIdsIR := o.SourceIds - - var sourceIdsIC []string - for _, sourceIdsIIR := range sourceIdsIR { // explode []int64 - - sourceIdsIIV := swag.FormatInt64(sourceIdsIIR) // int64 as string - sourceIdsIC = append(sourceIdsIC, sourceIdsIIV) - } - - // items.CollectionFormat: "" - sourceIdsIS := swag.JoinByFormat(sourceIdsIC, "") - - return sourceIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter storageDomainIds -func (o *SearchProtectedObjectsParams) bindParamStorageDomainIds(formats strfmt.Registry) []string { - storageDomainIdsIR := o.StorageDomainIds - - var storageDomainIdsIC []string - for _, storageDomainIdsIIR := range storageDomainIdsIR { // explode []int64 - - storageDomainIdsIIV := swag.FormatInt64(storageDomainIdsIIR) // int64 as string - storageDomainIdsIC = append(storageDomainIdsIC, storageDomainIdsIIV) - } - - // items.CollectionFormat: "" - storageDomainIdsIS := swag.JoinByFormat(storageDomainIdsIC, "") - - return storageDomainIdsIS -} - -// bindParamSearchProtectedObjects binds the parameter tenantIds -func (o *SearchProtectedObjectsParams) 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/client/search/search_protected_objects_responses.go b/v2/client/search/search_protected_objects_responses.go deleted file mode 100644 index f950c6af..00000000 --- a/v2/client/search/search_protected_objects_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package search - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// SearchProtectedObjectsReader is a Reader for the SearchProtectedObjects structure. -type SearchProtectedObjectsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *SearchProtectedObjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewSearchProtectedObjectsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewSearchProtectedObjectsDefault(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 - } -} - -// NewSearchProtectedObjectsOK creates a SearchProtectedObjectsOK with default headers values -func NewSearchProtectedObjectsOK() *SearchProtectedObjectsOK { - return &SearchProtectedObjectsOK{} -} - -/* -SearchProtectedObjectsOK describes a response with status code 200, with default header values. - -Success -*/ -type SearchProtectedObjectsOK struct { - Payload *models.ProtectedObjectsSearchResponseBody -} - -// IsSuccess returns true when this search protected objects o k response has a 2xx status code -func (o *SearchProtectedObjectsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this search protected objects o k response has a 3xx status code -func (o *SearchProtectedObjectsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this search protected objects o k response has a 4xx status code -func (o *SearchProtectedObjectsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this search protected objects o k response has a 5xx status code -func (o *SearchProtectedObjectsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this search protected objects o k response a status code equal to that given -func (o *SearchProtectedObjectsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the search protected objects o k response -func (o *SearchProtectedObjectsOK) Code() int { - return 200 -} - -func (o *SearchProtectedObjectsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/protected-objects][%d] searchProtectedObjectsOK %s", 200, payload) -} - -func (o *SearchProtectedObjectsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/protected-objects][%d] searchProtectedObjectsOK %s", 200, payload) -} - -func (o *SearchProtectedObjectsOK) GetPayload() *models.ProtectedObjectsSearchResponseBody { - return o.Payload -} - -func (o *SearchProtectedObjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ProtectedObjectsSearchResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewSearchProtectedObjectsDefault creates a SearchProtectedObjectsDefault with default headers values -func NewSearchProtectedObjectsDefault(code int) *SearchProtectedObjectsDefault { - return &SearchProtectedObjectsDefault{ - _statusCode: code, - } -} - -/* -SearchProtectedObjectsDefault describes a response with status code -1, with default header values. - -Error -*/ -type SearchProtectedObjectsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this search protected objects default response has a 2xx status code -func (o *SearchProtectedObjectsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this search protected objects default response has a 3xx status code -func (o *SearchProtectedObjectsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this search protected objects default response has a 4xx status code -func (o *SearchProtectedObjectsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this search protected objects default response has a 5xx status code -func (o *SearchProtectedObjectsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this search protected objects default response a status code equal to that given -func (o *SearchProtectedObjectsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the search protected objects default response -func (o *SearchProtectedObjectsDefault) Code() int { - return o._statusCode -} - -func (o *SearchProtectedObjectsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/protected-objects][%d] SearchProtectedObjects default %s", o._statusCode, payload) -} - -func (o *SearchProtectedObjectsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/search/protected-objects][%d] SearchProtectedObjects default %s", o._statusCode, payload) -} - -func (o *SearchProtectedObjectsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *SearchProtectedObjectsDefault) 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/security/create_clientcsr_parameters.go b/v2/client/security/create_clientcsr_parameters.go deleted file mode 100644 index 2e70af13..00000000 --- a/v2/client/security/create_clientcsr_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateClientcsrParams creates a new CreateClientcsrParams 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 NewCreateClientcsrParams() *CreateClientcsrParams { - return &CreateClientcsrParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateClientcsrParamsWithTimeout creates a new CreateClientcsrParams object -// with the ability to set a timeout on a request. -func NewCreateClientcsrParamsWithTimeout(timeout time.Duration) *CreateClientcsrParams { - return &CreateClientcsrParams{ - timeout: timeout, - } -} - -// NewCreateClientcsrParamsWithContext creates a new CreateClientcsrParams object -// with the ability to set a context for a request. -func NewCreateClientcsrParamsWithContext(ctx context.Context) *CreateClientcsrParams { - return &CreateClientcsrParams{ - Context: ctx, - } -} - -// NewCreateClientcsrParamsWithHTTPClient creates a new CreateClientcsrParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateClientcsrParamsWithHTTPClient(client *http.Client) *CreateClientcsrParams { - return &CreateClientcsrParams{ - HTTPClient: client, - } -} - -/* -CreateClientcsrParams contains all the parameters to send to the API endpoint - - for the create clientcsr operation. - - Typically these are written to a http.Request. -*/ -type CreateClientcsrParams struct { - - /* Body. - - Specifies the parameters to create the Certificate Signing Requests. - */ - Body *models.CreateCsrRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create clientcsr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClientcsrParams) WithDefaults() *CreateClientcsrParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create clientcsr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateClientcsrParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create clientcsr params -func (o *CreateClientcsrParams) WithTimeout(timeout time.Duration) *CreateClientcsrParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create clientcsr params -func (o *CreateClientcsrParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create clientcsr params -func (o *CreateClientcsrParams) WithContext(ctx context.Context) *CreateClientcsrParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create clientcsr params -func (o *CreateClientcsrParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create clientcsr params -func (o *CreateClientcsrParams) WithHTTPClient(client *http.Client) *CreateClientcsrParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create clientcsr params -func (o *CreateClientcsrParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create clientcsr params -func (o *CreateClientcsrParams) WithBody(body *models.CreateCsrRequest) *CreateClientcsrParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create clientcsr params -func (o *CreateClientcsrParams) SetBody(body *models.CreateCsrRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateClientcsrParams) 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/security/create_clientcsr_responses.go b/v2/client/security/create_clientcsr_responses.go deleted file mode 100644 index 94028634..00000000 --- a/v2/client/security/create_clientcsr_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateClientcsrReader is a Reader for the CreateClientcsr structure. -type CreateClientcsrReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateClientcsrReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateClientcsrCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateClientcsrDefault(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 - } -} - -// NewCreateClientcsrCreated creates a CreateClientcsrCreated with default headers values -func NewCreateClientcsrCreated() *CreateClientcsrCreated { - return &CreateClientcsrCreated{} -} - -/* -CreateClientcsrCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateClientcsrCreated struct { - Payload *models.CreateClientcsrResponseBody -} - -// IsSuccess returns true when this create clientcsr created response has a 2xx status code -func (o *CreateClientcsrCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create clientcsr created response has a 3xx status code -func (o *CreateClientcsrCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create clientcsr created response has a 4xx status code -func (o *CreateClientcsrCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create clientcsr created response has a 5xx status code -func (o *CreateClientcsrCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create clientcsr created response a status code equal to that given -func (o *CreateClientcsrCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create clientcsr created response -func (o *CreateClientcsrCreated) Code() int { - return 201 -} - -func (o *CreateClientcsrCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr][%d] createClientcsrCreated %s", 201, payload) -} - -func (o *CreateClientcsrCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr][%d] createClientcsrCreated %s", 201, payload) -} - -func (o *CreateClientcsrCreated) GetPayload() *models.CreateClientcsrResponseBody { - return o.Payload -} - -func (o *CreateClientcsrCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateClientcsrResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateClientcsrDefault creates a CreateClientcsrDefault with default headers values -func NewCreateClientcsrDefault(code int) *CreateClientcsrDefault { - return &CreateClientcsrDefault{ - _statusCode: code, - } -} - -/* -CreateClientcsrDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateClientcsrDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create clientcsr default response has a 2xx status code -func (o *CreateClientcsrDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create clientcsr default response has a 3xx status code -func (o *CreateClientcsrDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create clientcsr default response has a 4xx status code -func (o *CreateClientcsrDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create clientcsr default response has a 5xx status code -func (o *CreateClientcsrDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create clientcsr default response a status code equal to that given -func (o *CreateClientcsrDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create clientcsr default response -func (o *CreateClientcsrDefault) Code() int { - return o._statusCode -} - -func (o *CreateClientcsrDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr][%d] CreateClientcsr default %s", o._statusCode, payload) -} - -func (o *CreateClientcsrDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr][%d] CreateClientcsr default %s", o._statusCode, payload) -} - -func (o *CreateClientcsrDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateClientcsrDefault) 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/security/create_csr_parameters.go b/v2/client/security/create_csr_parameters.go deleted file mode 100644 index e2eb17c6..00000000 --- a/v2/client/security/create_csr_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateCsrParams creates a new CreateCsrParams 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 NewCreateCsrParams() *CreateCsrParams { - return &CreateCsrParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCsrParamsWithTimeout creates a new CreateCsrParams object -// with the ability to set a timeout on a request. -func NewCreateCsrParamsWithTimeout(timeout time.Duration) *CreateCsrParams { - return &CreateCsrParams{ - timeout: timeout, - } -} - -// NewCreateCsrParamsWithContext creates a new CreateCsrParams object -// with the ability to set a context for a request. -func NewCreateCsrParamsWithContext(ctx context.Context) *CreateCsrParams { - return &CreateCsrParams{ - Context: ctx, - } -} - -// NewCreateCsrParamsWithHTTPClient creates a new CreateCsrParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCsrParamsWithHTTPClient(client *http.Client) *CreateCsrParams { - return &CreateCsrParams{ - HTTPClient: client, - } -} - -/* -CreateCsrParams contains all the parameters to send to the API endpoint - - for the create csr operation. - - Typically these are written to a http.Request. -*/ -type CreateCsrParams struct { - - /* Body. - - Specifies the parameters to create a Certificate Signing Request. - */ - Body *models.CreateCsrRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCsrParams) WithDefaults() *CreateCsrParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCsrParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create csr params -func (o *CreateCsrParams) WithTimeout(timeout time.Duration) *CreateCsrParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create csr params -func (o *CreateCsrParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create csr params -func (o *CreateCsrParams) WithContext(ctx context.Context) *CreateCsrParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create csr params -func (o *CreateCsrParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create csr params -func (o *CreateCsrParams) WithHTTPClient(client *http.Client) *CreateCsrParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create csr params -func (o *CreateCsrParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create csr params -func (o *CreateCsrParams) WithBody(body *models.CreateCsrRequest) *CreateCsrParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create csr params -func (o *CreateCsrParams) SetBody(body *models.CreateCsrRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCsrParams) 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/security/create_csr_responses.go b/v2/client/security/create_csr_responses.go deleted file mode 100644 index d867f2a8..00000000 --- a/v2/client/security/create_csr_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateCsrReader is a Reader for the CreateCsr structure. -type CreateCsrReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCsrReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCsrCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateCsrDefault(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 - } -} - -// NewCreateCsrCreated creates a CreateCsrCreated with default headers values -func NewCreateCsrCreated() *CreateCsrCreated { - return &CreateCsrCreated{} -} - -/* -CreateCsrCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateCsrCreated struct { - Payload *models.CreateCsrResponseBody -} - -// IsSuccess returns true when this create csr created response has a 2xx status code -func (o *CreateCsrCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create csr created response has a 3xx status code -func (o *CreateCsrCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create csr created response has a 4xx status code -func (o *CreateCsrCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create csr created response has a 5xx status code -func (o *CreateCsrCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create csr created response a status code equal to that given -func (o *CreateCsrCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create csr created response -func (o *CreateCsrCreated) Code() int { - return 201 -} - -func (o *CreateCsrCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr][%d] createCsrCreated %s", 201, payload) -} - -func (o *CreateCsrCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr][%d] createCsrCreated %s", 201, payload) -} - -func (o *CreateCsrCreated) GetPayload() *models.CreateCsrResponseBody { - return o.Payload -} - -func (o *CreateCsrCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateCsrResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateCsrDefault creates a CreateCsrDefault with default headers values -func NewCreateCsrDefault(code int) *CreateCsrDefault { - return &CreateCsrDefault{ - _statusCode: code, - } -} - -/* -CreateCsrDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateCsrDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create csr default response has a 2xx status code -func (o *CreateCsrDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create csr default response has a 3xx status code -func (o *CreateCsrDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create csr default response has a 4xx status code -func (o *CreateCsrDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create csr default response has a 5xx status code -func (o *CreateCsrDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create csr default response a status code equal to that given -func (o *CreateCsrDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create csr default response -func (o *CreateCsrDefault) Code() int { - return o._statusCode -} - -func (o *CreateCsrDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr][%d] CreateCsr default %s", o._statusCode, payload) -} - -func (o *CreateCsrDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr][%d] CreateCsr default %s", o._statusCode, payload) -} - -func (o *CreateCsrDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateCsrDefault) 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/security/delete_csr_parameters.go b/v2/client/security/delete_csr_parameters.go deleted file mode 100644 index f4fe05f2..00000000 --- a/v2/client/security/delete_csr_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewDeleteCsrParams creates a new DeleteCsrParams 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 NewDeleteCsrParams() *DeleteCsrParams { - return &DeleteCsrParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteCsrParamsWithTimeout creates a new DeleteCsrParams object -// with the ability to set a timeout on a request. -func NewDeleteCsrParamsWithTimeout(timeout time.Duration) *DeleteCsrParams { - return &DeleteCsrParams{ - timeout: timeout, - } -} - -// NewDeleteCsrParamsWithContext creates a new DeleteCsrParams object -// with the ability to set a context for a request. -func NewDeleteCsrParamsWithContext(ctx context.Context) *DeleteCsrParams { - return &DeleteCsrParams{ - Context: ctx, - } -} - -// NewDeleteCsrParamsWithHTTPClient creates a new DeleteCsrParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteCsrParamsWithHTTPClient(client *http.Client) *DeleteCsrParams { - return &DeleteCsrParams{ - HTTPClient: client, - } -} - -/* -DeleteCsrParams contains all the parameters to send to the API endpoint - - for the delete csr operation. - - Typically these are written to a http.Request. -*/ -type DeleteCsrParams struct { - - /* ID. - - Specifies the id of the csr to be deleted. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCsrParams) WithDefaults() *DeleteCsrParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCsrParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete csr params -func (o *DeleteCsrParams) WithTimeout(timeout time.Duration) *DeleteCsrParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete csr params -func (o *DeleteCsrParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete csr params -func (o *DeleteCsrParams) WithContext(ctx context.Context) *DeleteCsrParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete csr params -func (o *DeleteCsrParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete csr params -func (o *DeleteCsrParams) WithHTTPClient(client *http.Client) *DeleteCsrParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete csr params -func (o *DeleteCsrParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete csr params -func (o *DeleteCsrParams) WithID(id string) *DeleteCsrParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete csr params -func (o *DeleteCsrParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteCsrParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/security/delete_csr_responses.go b/v2/client/security/delete_csr_responses.go deleted file mode 100644 index 3b4363a1..00000000 --- a/v2/client/security/delete_csr_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteCsrReader is a Reader for the DeleteCsr structure. -type DeleteCsrReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteCsrReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteCsrNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteCsrDefault(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 - } -} - -// NewDeleteCsrNoContent creates a DeleteCsrNoContent with default headers values -func NewDeleteCsrNoContent() *DeleteCsrNoContent { - return &DeleteCsrNoContent{} -} - -/* -DeleteCsrNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteCsrNoContent struct { -} - -// IsSuccess returns true when this delete csr no content response has a 2xx status code -func (o *DeleteCsrNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete csr no content response has a 3xx status code -func (o *DeleteCsrNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete csr no content response has a 4xx status code -func (o *DeleteCsrNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete csr no content response has a 5xx status code -func (o *DeleteCsrNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete csr no content response a status code equal to that given -func (o *DeleteCsrNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete csr no content response -func (o *DeleteCsrNoContent) Code() int { - return 204 -} - -func (o *DeleteCsrNoContent) Error() string { - return fmt.Sprintf("[DELETE /csr/{id}][%d] deleteCsrNoContent", 204) -} - -func (o *DeleteCsrNoContent) String() string { - return fmt.Sprintf("[DELETE /csr/{id}][%d] deleteCsrNoContent", 204) -} - -func (o *DeleteCsrNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteCsrDefault creates a DeleteCsrDefault with default headers values -func NewDeleteCsrDefault(code int) *DeleteCsrDefault { - return &DeleteCsrDefault{ - _statusCode: code, - } -} - -/* -DeleteCsrDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteCsrDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete csr default response has a 2xx status code -func (o *DeleteCsrDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete csr default response has a 3xx status code -func (o *DeleteCsrDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete csr default response has a 4xx status code -func (o *DeleteCsrDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete csr default response has a 5xx status code -func (o *DeleteCsrDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete csr default response a status code equal to that given -func (o *DeleteCsrDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete csr default response -func (o *DeleteCsrDefault) Code() int { - return o._statusCode -} - -func (o *DeleteCsrDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /csr/{id}][%d] DeleteCsr default %s", o._statusCode, payload) -} - -func (o *DeleteCsrDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /csr/{id}][%d] DeleteCsr default %s", o._statusCode, payload) -} - -func (o *DeleteCsrDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteCsrDefault) 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/security/get_ciphers_parameters.go b/v2/client/security/get_ciphers_parameters.go deleted file mode 100644 index d688ef48..00000000 --- a/v2/client/security/get_ciphers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewGetCiphersParams creates a new GetCiphersParams 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 NewGetCiphersParams() *GetCiphersParams { - return &GetCiphersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCiphersParamsWithTimeout creates a new GetCiphersParams object -// with the ability to set a timeout on a request. -func NewGetCiphersParamsWithTimeout(timeout time.Duration) *GetCiphersParams { - return &GetCiphersParams{ - timeout: timeout, - } -} - -// NewGetCiphersParamsWithContext creates a new GetCiphersParams object -// with the ability to set a context for a request. -func NewGetCiphersParamsWithContext(ctx context.Context) *GetCiphersParams { - return &GetCiphersParams{ - Context: ctx, - } -} - -// NewGetCiphersParamsWithHTTPClient creates a new GetCiphersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCiphersParamsWithHTTPClient(client *http.Client) *GetCiphersParams { - return &GetCiphersParams{ - HTTPClient: client, - } -} - -/* -GetCiphersParams contains all the parameters to send to the API endpoint - - for the get ciphers operation. - - Typically these are written to a http.Request. -*/ -type GetCiphersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCiphersParams) WithDefaults() *GetCiphersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCiphersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get ciphers params -func (o *GetCiphersParams) WithTimeout(timeout time.Duration) *GetCiphersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get ciphers params -func (o *GetCiphersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get ciphers params -func (o *GetCiphersParams) WithContext(ctx context.Context) *GetCiphersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get ciphers params -func (o *GetCiphersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get ciphers params -func (o *GetCiphersParams) WithHTTPClient(client *http.Client) *GetCiphersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get ciphers params -func (o *GetCiphersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCiphersParams) 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/security/get_ciphers_responses.go b/v2/client/security/get_ciphers_responses.go deleted file mode 100644 index 5529f895..00000000 --- a/v2/client/security/get_ciphers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCiphersReader is a Reader for the GetCiphers structure. -type GetCiphersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCiphersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCiphersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCiphersDefault(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 - } -} - -// NewGetCiphersOK creates a GetCiphersOK with default headers values -func NewGetCiphersOK() *GetCiphersOK { - return &GetCiphersOK{} -} - -/* -GetCiphersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCiphersOK struct { - Payload *models.CiphersResp -} - -// IsSuccess returns true when this get ciphers o k response has a 2xx status code -func (o *GetCiphersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get ciphers o k response has a 3xx status code -func (o *GetCiphersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get ciphers o k response has a 4xx status code -func (o *GetCiphersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get ciphers o k response has a 5xx status code -func (o *GetCiphersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get ciphers o k response a status code equal to that given -func (o *GetCiphersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get ciphers o k response -func (o *GetCiphersOK) Code() int { - return 200 -} - -func (o *GetCiphersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/ciphers][%d] getCiphersOK %s", 200, payload) -} - -func (o *GetCiphersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/ciphers][%d] getCiphersOK %s", 200, payload) -} - -func (o *GetCiphersOK) GetPayload() *models.CiphersResp { - return o.Payload -} - -func (o *GetCiphersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CiphersResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCiphersDefault creates a GetCiphersDefault with default headers values -func NewGetCiphersDefault(code int) *GetCiphersDefault { - return &GetCiphersDefault{ - _statusCode: code, - } -} - -/* -GetCiphersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCiphersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get ciphers default response has a 2xx status code -func (o *GetCiphersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get ciphers default response has a 3xx status code -func (o *GetCiphersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get ciphers default response has a 4xx status code -func (o *GetCiphersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get ciphers default response has a 5xx status code -func (o *GetCiphersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get ciphers default response a status code equal to that given -func (o *GetCiphersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get ciphers default response -func (o *GetCiphersDefault) Code() int { - return o._statusCode -} - -func (o *GetCiphersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/ciphers][%d] GetCiphers default %s", o._statusCode, payload) -} - -func (o *GetCiphersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/ciphers][%d] GetCiphers default %s", o._statusCode, payload) -} - -func (o *GetCiphersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCiphersDefault) 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/security/get_csr_by_id_parameters.go b/v2/client/security/get_csr_by_id_parameters.go deleted file mode 100644 index 5ab0a502..00000000 --- a/v2/client/security/get_csr_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewGetCsrByIDParams creates a new GetCsrByIDParams 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 NewGetCsrByIDParams() *GetCsrByIDParams { - return &GetCsrByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCsrByIDParamsWithTimeout creates a new GetCsrByIDParams object -// with the ability to set a timeout on a request. -func NewGetCsrByIDParamsWithTimeout(timeout time.Duration) *GetCsrByIDParams { - return &GetCsrByIDParams{ - timeout: timeout, - } -} - -// NewGetCsrByIDParamsWithContext creates a new GetCsrByIDParams object -// with the ability to set a context for a request. -func NewGetCsrByIDParamsWithContext(ctx context.Context) *GetCsrByIDParams { - return &GetCsrByIDParams{ - Context: ctx, - } -} - -// NewGetCsrByIDParamsWithHTTPClient creates a new GetCsrByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCsrByIDParamsWithHTTPClient(client *http.Client) *GetCsrByIDParams { - return &GetCsrByIDParams{ - HTTPClient: client, - } -} - -/* -GetCsrByIDParams contains all the parameters to send to the API endpoint - - for the get csr by Id operation. - - Typically these are written to a http.Request. -*/ -type GetCsrByIDParams struct { - - /* ID. - - Specifies the id of the csr. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get csr by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCsrByIDParams) WithDefaults() *GetCsrByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get csr by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCsrByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get csr by Id params -func (o *GetCsrByIDParams) WithTimeout(timeout time.Duration) *GetCsrByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get csr by Id params -func (o *GetCsrByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get csr by Id params -func (o *GetCsrByIDParams) WithContext(ctx context.Context) *GetCsrByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get csr by Id params -func (o *GetCsrByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get csr by Id params -func (o *GetCsrByIDParams) WithHTTPClient(client *http.Client) *GetCsrByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get csr by Id params -func (o *GetCsrByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get csr by Id params -func (o *GetCsrByIDParams) WithID(id string) *GetCsrByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get csr by Id params -func (o *GetCsrByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCsrByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/security/get_csr_by_id_responses.go b/v2/client/security/get_csr_by_id_responses.go deleted file mode 100644 index 9761a84b..00000000 --- a/v2/client/security/get_csr_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCsrByIDReader is a Reader for the GetCsrByID structure. -type GetCsrByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCsrByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCsrByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCsrByIDDefault(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 - } -} - -// NewGetCsrByIDOK creates a GetCsrByIDOK with default headers values -func NewGetCsrByIDOK() *GetCsrByIDOK { - return &GetCsrByIDOK{} -} - -/* -GetCsrByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCsrByIDOK struct { - Payload *models.CommonCsrResponseParams -} - -// IsSuccess returns true when this get csr by Id o k response has a 2xx status code -func (o *GetCsrByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get csr by Id o k response has a 3xx status code -func (o *GetCsrByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get csr by Id o k response has a 4xx status code -func (o *GetCsrByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get csr by Id o k response has a 5xx status code -func (o *GetCsrByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get csr by Id o k response a status code equal to that given -func (o *GetCsrByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get csr by Id o k response -func (o *GetCsrByIDOK) Code() int { - return 200 -} - -func (o *GetCsrByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr/{id}][%d] getCsrByIdOK %s", 200, payload) -} - -func (o *GetCsrByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr/{id}][%d] getCsrByIdOK %s", 200, payload) -} - -func (o *GetCsrByIDOK) GetPayload() *models.CommonCsrResponseParams { - return o.Payload -} - -func (o *GetCsrByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CommonCsrResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCsrByIDDefault creates a GetCsrByIDDefault with default headers values -func NewGetCsrByIDDefault(code int) *GetCsrByIDDefault { - return &GetCsrByIDDefault{ - _statusCode: code, - } -} - -/* -GetCsrByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCsrByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get csr by Id default response has a 2xx status code -func (o *GetCsrByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get csr by Id default response has a 3xx status code -func (o *GetCsrByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get csr by Id default response has a 4xx status code -func (o *GetCsrByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get csr by Id default response has a 5xx status code -func (o *GetCsrByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get csr by Id default response a status code equal to that given -func (o *GetCsrByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get csr by Id default response -func (o *GetCsrByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetCsrByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr/{id}][%d] GetCsrById default %s", o._statusCode, payload) -} - -func (o *GetCsrByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr/{id}][%d] GetCsrById default %s", o._statusCode, payload) -} - -func (o *GetCsrByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCsrByIDDefault) 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/security/get_csr_list_parameters.go b/v2/client/security/get_csr_list_parameters.go deleted file mode 100644 index 81d152bd..00000000 --- a/v2/client/security/get_csr_list_parameters.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/go-openapi/swag" -) - -// NewGetCsrListParams creates a new GetCsrListParams 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 NewGetCsrListParams() *GetCsrListParams { - return &GetCsrListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCsrListParamsWithTimeout creates a new GetCsrListParams object -// with the ability to set a timeout on a request. -func NewGetCsrListParamsWithTimeout(timeout time.Duration) *GetCsrListParams { - return &GetCsrListParams{ - timeout: timeout, - } -} - -// NewGetCsrListParamsWithContext creates a new GetCsrListParams object -// with the ability to set a context for a request. -func NewGetCsrListParamsWithContext(ctx context.Context) *GetCsrListParams { - return &GetCsrListParams{ - Context: ctx, - } -} - -// NewGetCsrListParamsWithHTTPClient creates a new GetCsrListParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCsrListParamsWithHTTPClient(client *http.Client) *GetCsrListParams { - return &GetCsrListParams{ - HTTPClient: client, - } -} - -/* -GetCsrListParams contains all the parameters to send to the API endpoint - - for the get csr list operation. - - Typically these are written to a http.Request. -*/ -type GetCsrListParams struct { - - /* Ids. - - Specifies the ids of the csrs. If this is not specified, all the csrs on the cluster will be returned. - */ - Ids []string - - /* ServiceName. - - Specifies the Cohesity service name for which the CSR is generated. If this is not specified, all the csrs on the cluster will be returned. - */ - ServiceName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get csr list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCsrListParams) WithDefaults() *GetCsrListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get csr list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCsrListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get csr list params -func (o *GetCsrListParams) WithTimeout(timeout time.Duration) *GetCsrListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get csr list params -func (o *GetCsrListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get csr list params -func (o *GetCsrListParams) WithContext(ctx context.Context) *GetCsrListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get csr list params -func (o *GetCsrListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get csr list params -func (o *GetCsrListParams) WithHTTPClient(client *http.Client) *GetCsrListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get csr list params -func (o *GetCsrListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get csr list params -func (o *GetCsrListParams) WithIds(ids []string) *GetCsrListParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get csr list params -func (o *GetCsrListParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithServiceName adds the serviceName to the get csr list params -func (o *GetCsrListParams) WithServiceName(serviceName *string) *GetCsrListParams { - o.SetServiceName(serviceName) - return o -} - -// SetServiceName adds the serviceName to the get csr list params -func (o *GetCsrListParams) SetServiceName(serviceName *string) { - o.ServiceName = serviceName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCsrListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.ServiceName != nil { - - // query param serviceName - var qrServiceName string - - if o.ServiceName != nil { - qrServiceName = *o.ServiceName - } - qServiceName := qrServiceName - if qServiceName != "" { - - if err := r.SetQueryParam("serviceName", qServiceName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetCsrList binds the parameter ids -func (o *GetCsrListParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/security/get_csr_list_responses.go b/v2/client/security/get_csr_list_responses.go deleted file mode 100644 index 1d0aef61..00000000 --- a/v2/client/security/get_csr_list_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetCsrListReader is a Reader for the GetCsrList structure. -type GetCsrListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCsrListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCsrListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetCsrListDefault(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 - } -} - -// NewGetCsrListOK creates a GetCsrListOK with default headers values -func NewGetCsrListOK() *GetCsrListOK { - return &GetCsrListOK{} -} - -/* -GetCsrListOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCsrListOK struct { - Payload models.GetCsrListResponseBody -} - -// IsSuccess returns true when this get csr list o k response has a 2xx status code -func (o *GetCsrListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get csr list o k response has a 3xx status code -func (o *GetCsrListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get csr list o k response has a 4xx status code -func (o *GetCsrListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get csr list o k response has a 5xx status code -func (o *GetCsrListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get csr list o k response a status code equal to that given -func (o *GetCsrListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get csr list o k response -func (o *GetCsrListOK) Code() int { - return 200 -} - -func (o *GetCsrListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr][%d] getCsrListOK %s", 200, payload) -} - -func (o *GetCsrListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr][%d] getCsrListOK %s", 200, payload) -} - -func (o *GetCsrListOK) GetPayload() models.GetCsrListResponseBody { - return o.Payload -} - -func (o *GetCsrListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCsrListDefault creates a GetCsrListDefault with default headers values -func NewGetCsrListDefault(code int) *GetCsrListDefault { - return &GetCsrListDefault{ - _statusCode: code, - } -} - -/* -GetCsrListDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetCsrListDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get csr list default response has a 2xx status code -func (o *GetCsrListDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get csr list default response has a 3xx status code -func (o *GetCsrListDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get csr list default response has a 4xx status code -func (o *GetCsrListDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get csr list default response has a 5xx status code -func (o *GetCsrListDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get csr list default response a status code equal to that given -func (o *GetCsrListDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get csr list default response -func (o *GetCsrListDefault) Code() int { - return o._statusCode -} - -func (o *GetCsrListDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr][%d] GetCsrList default %s", o._statusCode, payload) -} - -func (o *GetCsrListDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /csr][%d] GetCsrList default %s", o._statusCode, payload) -} - -func (o *GetCsrListDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetCsrListDefault) 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/security/get_object_store_ciphers_parameters.go b/v2/client/security/get_object_store_ciphers_parameters.go deleted file mode 100644 index e8019db0..00000000 --- a/v2/client/security/get_object_store_ciphers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewGetObjectStoreCiphersParams creates a new GetObjectStoreCiphersParams 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 NewGetObjectStoreCiphersParams() *GetObjectStoreCiphersParams { - return &GetObjectStoreCiphersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetObjectStoreCiphersParamsWithTimeout creates a new GetObjectStoreCiphersParams object -// with the ability to set a timeout on a request. -func NewGetObjectStoreCiphersParamsWithTimeout(timeout time.Duration) *GetObjectStoreCiphersParams { - return &GetObjectStoreCiphersParams{ - timeout: timeout, - } -} - -// NewGetObjectStoreCiphersParamsWithContext creates a new GetObjectStoreCiphersParams object -// with the ability to set a context for a request. -func NewGetObjectStoreCiphersParamsWithContext(ctx context.Context) *GetObjectStoreCiphersParams { - return &GetObjectStoreCiphersParams{ - Context: ctx, - } -} - -// NewGetObjectStoreCiphersParamsWithHTTPClient creates a new GetObjectStoreCiphersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetObjectStoreCiphersParamsWithHTTPClient(client *http.Client) *GetObjectStoreCiphersParams { - return &GetObjectStoreCiphersParams{ - HTTPClient: client, - } -} - -/* -GetObjectStoreCiphersParams contains all the parameters to send to the API endpoint - - for the get object store ciphers operation. - - Typically these are written to a http.Request. -*/ -type GetObjectStoreCiphersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get object store ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectStoreCiphersParams) WithDefaults() *GetObjectStoreCiphersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get object store ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetObjectStoreCiphersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) WithTimeout(timeout time.Duration) *GetObjectStoreCiphersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) WithContext(ctx context.Context) *GetObjectStoreCiphersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) WithHTTPClient(client *http.Client) *GetObjectStoreCiphersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get object store ciphers params -func (o *GetObjectStoreCiphersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetObjectStoreCiphersParams) 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/security/get_object_store_ciphers_responses.go b/v2/client/security/get_object_store_ciphers_responses.go deleted file mode 100644 index 9133c473..00000000 --- a/v2/client/security/get_object_store_ciphers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetObjectStoreCiphersReader is a Reader for the GetObjectStoreCiphers structure. -type GetObjectStoreCiphersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetObjectStoreCiphersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetObjectStoreCiphersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetObjectStoreCiphersDefault(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 - } -} - -// NewGetObjectStoreCiphersOK creates a GetObjectStoreCiphersOK with default headers values -func NewGetObjectStoreCiphersOK() *GetObjectStoreCiphersOK { - return &GetObjectStoreCiphersOK{} -} - -/* -GetObjectStoreCiphersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetObjectStoreCiphersOK struct { - Payload *models.ObjectStoreCiphersResp -} - -// IsSuccess returns true when this get object store ciphers o k response has a 2xx status code -func (o *GetObjectStoreCiphersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get object store ciphers o k response has a 3xx status code -func (o *GetObjectStoreCiphersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get object store ciphers o k response has a 4xx status code -func (o *GetObjectStoreCiphersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get object store ciphers o k response has a 5xx status code -func (o *GetObjectStoreCiphersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get object store ciphers o k response a status code equal to that given -func (o *GetObjectStoreCiphersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get object store ciphers o k response -func (o *GetObjectStoreCiphersOK) Code() int { - return 200 -} - -func (o *GetObjectStoreCiphersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/object-store-ciphers][%d] getObjectStoreCiphersOK %s", 200, payload) -} - -func (o *GetObjectStoreCiphersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/object-store-ciphers][%d] getObjectStoreCiphersOK %s", 200, payload) -} - -func (o *GetObjectStoreCiphersOK) GetPayload() *models.ObjectStoreCiphersResp { - return o.Payload -} - -func (o *GetObjectStoreCiphersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectStoreCiphersResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetObjectStoreCiphersDefault creates a GetObjectStoreCiphersDefault with default headers values -func NewGetObjectStoreCiphersDefault(code int) *GetObjectStoreCiphersDefault { - return &GetObjectStoreCiphersDefault{ - _statusCode: code, - } -} - -/* -GetObjectStoreCiphersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetObjectStoreCiphersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get object store ciphers default response has a 2xx status code -func (o *GetObjectStoreCiphersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get object store ciphers default response has a 3xx status code -func (o *GetObjectStoreCiphersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get object store ciphers default response has a 4xx status code -func (o *GetObjectStoreCiphersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get object store ciphers default response has a 5xx status code -func (o *GetObjectStoreCiphersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get object store ciphers default response a status code equal to that given -func (o *GetObjectStoreCiphersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get object store ciphers default response -func (o *GetObjectStoreCiphersDefault) Code() int { - return o._statusCode -} - -func (o *GetObjectStoreCiphersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/object-store-ciphers][%d] GetObjectStoreCiphers default %s", o._statusCode, payload) -} - -func (o *GetObjectStoreCiphersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security/object-store-ciphers][%d] GetObjectStoreCiphers default %s", o._statusCode, payload) -} - -func (o *GetObjectStoreCiphersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetObjectStoreCiphersDefault) 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/security/get_security_config_parameters.go b/v2/client/security/get_security_config_parameters.go deleted file mode 100644 index efeb00df..00000000 --- a/v2/client/security/get_security_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewGetSecurityConfigParams creates a new GetSecurityConfigParams 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 NewGetSecurityConfigParams() *GetSecurityConfigParams { - return &GetSecurityConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSecurityConfigParamsWithTimeout creates a new GetSecurityConfigParams object -// with the ability to set a timeout on a request. -func NewGetSecurityConfigParamsWithTimeout(timeout time.Duration) *GetSecurityConfigParams { - return &GetSecurityConfigParams{ - timeout: timeout, - } -} - -// NewGetSecurityConfigParamsWithContext creates a new GetSecurityConfigParams object -// with the ability to set a context for a request. -func NewGetSecurityConfigParamsWithContext(ctx context.Context) *GetSecurityConfigParams { - return &GetSecurityConfigParams{ - Context: ctx, - } -} - -// NewGetSecurityConfigParamsWithHTTPClient creates a new GetSecurityConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSecurityConfigParamsWithHTTPClient(client *http.Client) *GetSecurityConfigParams { - return &GetSecurityConfigParams{ - HTTPClient: client, - } -} - -/* -GetSecurityConfigParams contains all the parameters to send to the API endpoint - - for the get security config operation. - - Typically these are written to a http.Request. -*/ -type GetSecurityConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get security config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSecurityConfigParams) WithDefaults() *GetSecurityConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get security config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSecurityConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get security config params -func (o *GetSecurityConfigParams) WithTimeout(timeout time.Duration) *GetSecurityConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get security config params -func (o *GetSecurityConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get security config params -func (o *GetSecurityConfigParams) WithContext(ctx context.Context) *GetSecurityConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get security config params -func (o *GetSecurityConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get security config params -func (o *GetSecurityConfigParams) WithHTTPClient(client *http.Client) *GetSecurityConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get security config params -func (o *GetSecurityConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSecurityConfigParams) 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/security/get_security_config_responses.go b/v2/client/security/get_security_config_responses.go deleted file mode 100644 index a3658045..00000000 --- a/v2/client/security/get_security_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSecurityConfigReader is a Reader for the GetSecurityConfig structure. -type GetSecurityConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSecurityConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSecurityConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSecurityConfigDefault(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 - } -} - -// NewGetSecurityConfigOK creates a GetSecurityConfigOK with default headers values -func NewGetSecurityConfigOK() *GetSecurityConfigOK { - return &GetSecurityConfigOK{} -} - -/* -GetSecurityConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSecurityConfigOK struct { - Payload *models.SecurityConfigResponse -} - -// IsSuccess returns true when this get security config o k response has a 2xx status code -func (o *GetSecurityConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get security config o k response has a 3xx status code -func (o *GetSecurityConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get security config o k response has a 4xx status code -func (o *GetSecurityConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get security config o k response has a 5xx status code -func (o *GetSecurityConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get security config o k response a status code equal to that given -func (o *GetSecurityConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get security config o k response -func (o *GetSecurityConfigOK) Code() int { - return 200 -} - -func (o *GetSecurityConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-config][%d] getSecurityConfigOK %s", 200, payload) -} - -func (o *GetSecurityConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-config][%d] getSecurityConfigOK %s", 200, payload) -} - -func (o *GetSecurityConfigOK) GetPayload() *models.SecurityConfigResponse { - return o.Payload -} - -func (o *GetSecurityConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SecurityConfigResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSecurityConfigDefault creates a GetSecurityConfigDefault with default headers values -func NewGetSecurityConfigDefault(code int) *GetSecurityConfigDefault { - return &GetSecurityConfigDefault{ - _statusCode: code, - } -} - -/* -GetSecurityConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSecurityConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get security config default response has a 2xx status code -func (o *GetSecurityConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get security config default response has a 3xx status code -func (o *GetSecurityConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get security config default response has a 4xx status code -func (o *GetSecurityConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get security config default response has a 5xx status code -func (o *GetSecurityConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get security config default response a status code equal to that given -func (o *GetSecurityConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get security config default response -func (o *GetSecurityConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetSecurityConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-config][%d] GetSecurityConfig default %s", o._statusCode, payload) -} - -func (o *GetSecurityConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-config][%d] GetSecurityConfig default %s", o._statusCode, payload) -} - -func (o *GetSecurityConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSecurityConfigDefault) 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/security/import_certificate_by_clientcsr_parameters.go b/v2/client/security/import_certificate_by_clientcsr_parameters.go deleted file mode 100644 index e631c0de..00000000 --- a/v2/client/security/import_certificate_by_clientcsr_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewImportCertificateByClientcsrParams creates a new ImportCertificateByClientcsrParams 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 NewImportCertificateByClientcsrParams() *ImportCertificateByClientcsrParams { - return &ImportCertificateByClientcsrParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewImportCertificateByClientcsrParamsWithTimeout creates a new ImportCertificateByClientcsrParams object -// with the ability to set a timeout on a request. -func NewImportCertificateByClientcsrParamsWithTimeout(timeout time.Duration) *ImportCertificateByClientcsrParams { - return &ImportCertificateByClientcsrParams{ - timeout: timeout, - } -} - -// NewImportCertificateByClientcsrParamsWithContext creates a new ImportCertificateByClientcsrParams object -// with the ability to set a context for a request. -func NewImportCertificateByClientcsrParamsWithContext(ctx context.Context) *ImportCertificateByClientcsrParams { - return &ImportCertificateByClientcsrParams{ - Context: ctx, - } -} - -// NewImportCertificateByClientcsrParamsWithHTTPClient creates a new ImportCertificateByClientcsrParams object -// with the ability to set a custom HTTPClient for a request. -func NewImportCertificateByClientcsrParamsWithHTTPClient(client *http.Client) *ImportCertificateByClientcsrParams { - return &ImportCertificateByClientcsrParams{ - HTTPClient: client, - } -} - -/* -ImportCertificateByClientcsrParams contains all the parameters to send to the API endpoint - - for the import certificate by clientcsr operation. - - Typically these are written to a http.Request. -*/ -type ImportCertificateByClientcsrParams struct { - - /* Body. - - Specifies the parameters to import the certificate. - */ - Body *models.ImportCertificateByClientcsrRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the import certificate by clientcsr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportCertificateByClientcsrParams) WithDefaults() *ImportCertificateByClientcsrParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the import certificate by clientcsr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ImportCertificateByClientcsrParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) WithTimeout(timeout time.Duration) *ImportCertificateByClientcsrParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) WithContext(ctx context.Context) *ImportCertificateByClientcsrParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) WithHTTPClient(client *http.Client) *ImportCertificateByClientcsrParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) WithBody(body *models.ImportCertificateByClientcsrRequest) *ImportCertificateByClientcsrParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the import certificate by clientcsr params -func (o *ImportCertificateByClientcsrParams) SetBody(body *models.ImportCertificateByClientcsrRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ImportCertificateByClientcsrParams) 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/security/import_certificate_by_clientcsr_responses.go b/v2/client/security/import_certificate_by_clientcsr_responses.go deleted file mode 100644 index 638a9943..00000000 --- a/v2/client/security/import_certificate_by_clientcsr_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ImportCertificateByClientcsrReader is a Reader for the ImportCertificateByClientcsr structure. -type ImportCertificateByClientcsrReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ImportCertificateByClientcsrReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewImportCertificateByClientcsrOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewImportCertificateByClientcsrDefault(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 - } -} - -// NewImportCertificateByClientcsrOK creates a ImportCertificateByClientcsrOK with default headers values -func NewImportCertificateByClientcsrOK() *ImportCertificateByClientcsrOK { - return &ImportCertificateByClientcsrOK{} -} - -/* -ImportCertificateByClientcsrOK describes a response with status code 200, with default header values. - -Success -*/ -type ImportCertificateByClientcsrOK struct { - Payload *models.ImportCertificateByClientcsrResponseBody -} - -// IsSuccess returns true when this import certificate by clientcsr o k response has a 2xx status code -func (o *ImportCertificateByClientcsrOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this import certificate by clientcsr o k response has a 3xx status code -func (o *ImportCertificateByClientcsrOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this import certificate by clientcsr o k response has a 4xx status code -func (o *ImportCertificateByClientcsrOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this import certificate by clientcsr o k response has a 5xx status code -func (o *ImportCertificateByClientcsrOK) IsServerError() bool { - return false -} - -// IsCode returns true when this import certificate by clientcsr o k response a status code equal to that given -func (o *ImportCertificateByClientcsrOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the import certificate by clientcsr o k response -func (o *ImportCertificateByClientcsrOK) Code() int { - return 200 -} - -func (o *ImportCertificateByClientcsrOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr/certificate][%d] importCertificateByClientcsrOK %s", 200, payload) -} - -func (o *ImportCertificateByClientcsrOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr/certificate][%d] importCertificateByClientcsrOK %s", 200, payload) -} - -func (o *ImportCertificateByClientcsrOK) GetPayload() *models.ImportCertificateByClientcsrResponseBody { - return o.Payload -} - -func (o *ImportCertificateByClientcsrOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ImportCertificateByClientcsrResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewImportCertificateByClientcsrDefault creates a ImportCertificateByClientcsrDefault with default headers values -func NewImportCertificateByClientcsrDefault(code int) *ImportCertificateByClientcsrDefault { - return &ImportCertificateByClientcsrDefault{ - _statusCode: code, - } -} - -/* -ImportCertificateByClientcsrDefault describes a response with status code -1, with default header values. - -Error -*/ -type ImportCertificateByClientcsrDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this import certificate by clientcsr default response has a 2xx status code -func (o *ImportCertificateByClientcsrDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this import certificate by clientcsr default response has a 3xx status code -func (o *ImportCertificateByClientcsrDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this import certificate by clientcsr default response has a 4xx status code -func (o *ImportCertificateByClientcsrDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this import certificate by clientcsr default response has a 5xx status code -func (o *ImportCertificateByClientcsrDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this import certificate by clientcsr default response a status code equal to that given -func (o *ImportCertificateByClientcsrDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the import certificate by clientcsr default response -func (o *ImportCertificateByClientcsrDefault) Code() int { - return o._statusCode -} - -func (o *ImportCertificateByClientcsrDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr/certificate][%d] ImportCertificateByClientcsr default %s", o._statusCode, payload) -} - -func (o *ImportCertificateByClientcsrDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /client-csr/certificate][%d] ImportCertificateByClientcsr default %s", o._statusCode, payload) -} - -func (o *ImportCertificateByClientcsrDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ImportCertificateByClientcsrDefault) 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/security/list_trusted_ca_by_id_parameters.go b/v2/client/security/list_trusted_ca_by_id_parameters.go deleted file mode 100644 index 27db5421..00000000 --- a/v2/client/security/list_trusted_ca_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewListTrustedCaByIDParams creates a new ListTrustedCaByIDParams 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 NewListTrustedCaByIDParams() *ListTrustedCaByIDParams { - return &ListTrustedCaByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListTrustedCaByIDParamsWithTimeout creates a new ListTrustedCaByIDParams object -// with the ability to set a timeout on a request. -func NewListTrustedCaByIDParamsWithTimeout(timeout time.Duration) *ListTrustedCaByIDParams { - return &ListTrustedCaByIDParams{ - timeout: timeout, - } -} - -// NewListTrustedCaByIDParamsWithContext creates a new ListTrustedCaByIDParams object -// with the ability to set a context for a request. -func NewListTrustedCaByIDParamsWithContext(ctx context.Context) *ListTrustedCaByIDParams { - return &ListTrustedCaByIDParams{ - Context: ctx, - } -} - -// NewListTrustedCaByIDParamsWithHTTPClient creates a new ListTrustedCaByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewListTrustedCaByIDParamsWithHTTPClient(client *http.Client) *ListTrustedCaByIDParams { - return &ListTrustedCaByIDParams{ - HTTPClient: client, - } -} - -/* -ListTrustedCaByIDParams contains all the parameters to send to the API endpoint - - for the list trusted ca by Id operation. - - Typically these are written to a http.Request. -*/ -type ListTrustedCaByIDParams struct { - - /* ID. - - Specifies the id of the certificate. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list trusted ca by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTrustedCaByIDParams) WithDefaults() *ListTrustedCaByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list trusted ca by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTrustedCaByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) WithTimeout(timeout time.Duration) *ListTrustedCaByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) WithContext(ctx context.Context) *ListTrustedCaByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) WithHTTPClient(client *http.Client) *ListTrustedCaByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) WithID(id string) *ListTrustedCaByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the list trusted ca by Id params -func (o *ListTrustedCaByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ListTrustedCaByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/security/list_trusted_ca_by_id_responses.go b/v2/client/security/list_trusted_ca_by_id_responses.go deleted file mode 100644 index 4b68433b..00000000 --- a/v2/client/security/list_trusted_ca_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListTrustedCaByIDReader is a Reader for the ListTrustedCaByID structure. -type ListTrustedCaByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListTrustedCaByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListTrustedCaByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListTrustedCaByIDDefault(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 - } -} - -// NewListTrustedCaByIDOK creates a ListTrustedCaByIDOK with default headers values -func NewListTrustedCaByIDOK() *ListTrustedCaByIDOK { - return &ListTrustedCaByIDOK{} -} - -/* -ListTrustedCaByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type ListTrustedCaByIDOK struct { - Payload *models.TrustedCa -} - -// IsSuccess returns true when this list trusted ca by Id o k response has a 2xx status code -func (o *ListTrustedCaByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list trusted ca by Id o k response has a 3xx status code -func (o *ListTrustedCaByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list trusted ca by Id o k response has a 4xx status code -func (o *ListTrustedCaByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list trusted ca by Id o k response has a 5xx status code -func (o *ListTrustedCaByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list trusted ca by Id o k response a status code equal to that given -func (o *ListTrustedCaByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list trusted ca by Id o k response -func (o *ListTrustedCaByIDOK) Code() int { - return 200 -} - -func (o *ListTrustedCaByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas/{id}][%d] listTrustedCaByIdOK %s", 200, payload) -} - -func (o *ListTrustedCaByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas/{id}][%d] listTrustedCaByIdOK %s", 200, payload) -} - -func (o *ListTrustedCaByIDOK) GetPayload() *models.TrustedCa { - return o.Payload -} - -func (o *ListTrustedCaByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TrustedCa) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListTrustedCaByIDDefault creates a ListTrustedCaByIDDefault with default headers values -func NewListTrustedCaByIDDefault(code int) *ListTrustedCaByIDDefault { - return &ListTrustedCaByIDDefault{ - _statusCode: code, - } -} - -/* -ListTrustedCaByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListTrustedCaByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list trusted ca by Id default response has a 2xx status code -func (o *ListTrustedCaByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list trusted ca by Id default response has a 3xx status code -func (o *ListTrustedCaByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list trusted ca by Id default response has a 4xx status code -func (o *ListTrustedCaByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list trusted ca by Id default response has a 5xx status code -func (o *ListTrustedCaByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list trusted ca by Id default response a status code equal to that given -func (o *ListTrustedCaByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list trusted ca by Id default response -func (o *ListTrustedCaByIDDefault) Code() int { - return o._statusCode -} - -func (o *ListTrustedCaByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas/{id}][%d] ListTrustedCaById default %s", o._statusCode, payload) -} - -func (o *ListTrustedCaByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas/{id}][%d] ListTrustedCaById default %s", o._statusCode, payload) -} - -func (o *ListTrustedCaByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListTrustedCaByIDDefault) 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/security/list_trusted_cas_parameters.go b/v2/client/security/list_trusted_cas_parameters.go deleted file mode 100644 index 741f23cb..00000000 --- a/v2/client/security/list_trusted_cas_parameters.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/go-openapi/swag" -) - -// NewListTrustedCasParams creates a new ListTrustedCasParams 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 NewListTrustedCasParams() *ListTrustedCasParams { - return &ListTrustedCasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListTrustedCasParamsWithTimeout creates a new ListTrustedCasParams object -// with the ability to set a timeout on a request. -func NewListTrustedCasParamsWithTimeout(timeout time.Duration) *ListTrustedCasParams { - return &ListTrustedCasParams{ - timeout: timeout, - } -} - -// NewListTrustedCasParamsWithContext creates a new ListTrustedCasParams object -// with the ability to set a context for a request. -func NewListTrustedCasParamsWithContext(ctx context.Context) *ListTrustedCasParams { - return &ListTrustedCasParams{ - Context: ctx, - } -} - -// NewListTrustedCasParamsWithHTTPClient creates a new ListTrustedCasParams object -// with the ability to set a custom HTTPClient for a request. -func NewListTrustedCasParamsWithHTTPClient(client *http.Client) *ListTrustedCasParams { - return &ListTrustedCasParams{ - HTTPClient: client, - } -} - -/* -ListTrustedCasParams contains all the parameters to send to the API endpoint - - for the list trusted cas operation. - - Typically these are written to a http.Request. -*/ -type ListTrustedCasParams struct { - - /* Ids. - - Specifies the ids of the certificates to be returned. - */ - Ids []string - - /* Names. - - Specifies the names of the certificates to be returned. - */ - Names []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list trusted cas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTrustedCasParams) WithDefaults() *ListTrustedCasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list trusted cas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTrustedCasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list trusted cas params -func (o *ListTrustedCasParams) WithTimeout(timeout time.Duration) *ListTrustedCasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list trusted cas params -func (o *ListTrustedCasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list trusted cas params -func (o *ListTrustedCasParams) WithContext(ctx context.Context) *ListTrustedCasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list trusted cas params -func (o *ListTrustedCasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list trusted cas params -func (o *ListTrustedCasParams) WithHTTPClient(client *http.Client) *ListTrustedCasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list trusted cas params -func (o *ListTrustedCasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the list trusted cas params -func (o *ListTrustedCasParams) WithIds(ids []string) *ListTrustedCasParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the list trusted cas params -func (o *ListTrustedCasParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithNames adds the names to the list trusted cas params -func (o *ListTrustedCasParams) WithNames(names []string) *ListTrustedCasParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the list trusted cas params -func (o *ListTrustedCasParams) SetNames(names []string) { - o.Names = names -} - -// WriteToRequest writes these params to a swagger request -func (o *ListTrustedCasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListTrustedCas binds the parameter ids -func (o *ListTrustedCasParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamListTrustedCas binds the parameter names -func (o *ListTrustedCasParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} diff --git a/v2/client/security/list_trusted_cas_responses.go b/v2/client/security/list_trusted_cas_responses.go deleted file mode 100644 index 2c1d5224..00000000 --- a/v2/client/security/list_trusted_cas_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListTrustedCasReader is a Reader for the ListTrustedCas structure. -type ListTrustedCasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListTrustedCasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListTrustedCasOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListTrustedCasDefault(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 - } -} - -// NewListTrustedCasOK creates a ListTrustedCasOK with default headers values -func NewListTrustedCasOK() *ListTrustedCasOK { - return &ListTrustedCasOK{} -} - -/* -ListTrustedCasOK describes a response with status code 200, with default header values. - -Success -*/ -type ListTrustedCasOK struct { - Payload *models.ListTrustedCasResult -} - -// IsSuccess returns true when this list trusted cas o k response has a 2xx status code -func (o *ListTrustedCasOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list trusted cas o k response has a 3xx status code -func (o *ListTrustedCasOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list trusted cas o k response has a 4xx status code -func (o *ListTrustedCasOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list trusted cas o k response has a 5xx status code -func (o *ListTrustedCasOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list trusted cas o k response a status code equal to that given -func (o *ListTrustedCasOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list trusted cas o k response -func (o *ListTrustedCasOK) Code() int { - return 200 -} - -func (o *ListTrustedCasOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas][%d] listTrustedCasOK %s", 200, payload) -} - -func (o *ListTrustedCasOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas][%d] listTrustedCasOK %s", 200, payload) -} - -func (o *ListTrustedCasOK) GetPayload() *models.ListTrustedCasResult { - return o.Payload -} - -func (o *ListTrustedCasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListTrustedCasResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListTrustedCasDefault creates a ListTrustedCasDefault with default headers values -func NewListTrustedCasDefault(code int) *ListTrustedCasDefault { - return &ListTrustedCasDefault{ - _statusCode: code, - } -} - -/* -ListTrustedCasDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListTrustedCasDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list trusted cas default response has a 2xx status code -func (o *ListTrustedCasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list trusted cas default response has a 3xx status code -func (o *ListTrustedCasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list trusted cas default response has a 4xx status code -func (o *ListTrustedCasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list trusted cas default response has a 5xx status code -func (o *ListTrustedCasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list trusted cas default response a status code equal to that given -func (o *ListTrustedCasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list trusted cas default response -func (o *ListTrustedCasDefault) Code() int { - return o._statusCode -} - -func (o *ListTrustedCasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas][%d] ListTrustedCas default %s", o._statusCode, payload) -} - -func (o *ListTrustedCasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /trusted-cas][%d] ListTrustedCas default %s", o._statusCode, payload) -} - -func (o *ListTrustedCasDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListTrustedCasDefault) 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/security/modify_ciphers_parameters.go b/v2/client/security/modify_ciphers_parameters.go deleted file mode 100644 index 48f994a5..00000000 --- a/v2/client/security/modify_ciphers_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewModifyCiphersParams creates a new ModifyCiphersParams 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 NewModifyCiphersParams() *ModifyCiphersParams { - return &ModifyCiphersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewModifyCiphersParamsWithTimeout creates a new ModifyCiphersParams object -// with the ability to set a timeout on a request. -func NewModifyCiphersParamsWithTimeout(timeout time.Duration) *ModifyCiphersParams { - return &ModifyCiphersParams{ - timeout: timeout, - } -} - -// NewModifyCiphersParamsWithContext creates a new ModifyCiphersParams object -// with the ability to set a context for a request. -func NewModifyCiphersParamsWithContext(ctx context.Context) *ModifyCiphersParams { - return &ModifyCiphersParams{ - Context: ctx, - } -} - -// NewModifyCiphersParamsWithHTTPClient creates a new ModifyCiphersParams object -// with the ability to set a custom HTTPClient for a request. -func NewModifyCiphersParamsWithHTTPClient(client *http.Client) *ModifyCiphersParams { - return &ModifyCiphersParams{ - HTTPClient: client, - } -} - -/* -ModifyCiphersParams contains all the parameters to send to the API endpoint - - for the modify ciphers operation. - - Typically these are written to a http.Request. -*/ -type ModifyCiphersParams struct { - - /* Body. - - Enable/Disable ciphers. - */ - Body *models.ModifyCiphersRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the modify ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ModifyCiphersParams) WithDefaults() *ModifyCiphersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the modify ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ModifyCiphersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the modify ciphers params -func (o *ModifyCiphersParams) WithTimeout(timeout time.Duration) *ModifyCiphersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the modify ciphers params -func (o *ModifyCiphersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the modify ciphers params -func (o *ModifyCiphersParams) WithContext(ctx context.Context) *ModifyCiphersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the modify ciphers params -func (o *ModifyCiphersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the modify ciphers params -func (o *ModifyCiphersParams) WithHTTPClient(client *http.Client) *ModifyCiphersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the modify ciphers params -func (o *ModifyCiphersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the modify ciphers params -func (o *ModifyCiphersParams) WithBody(body *models.ModifyCiphersRequestBody) *ModifyCiphersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the modify ciphers params -func (o *ModifyCiphersParams) SetBody(body *models.ModifyCiphersRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ModifyCiphersParams) 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/security/modify_ciphers_responses.go b/v2/client/security/modify_ciphers_responses.go deleted file mode 100644 index b55f3b3b..00000000 --- a/v2/client/security/modify_ciphers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ModifyCiphersReader is a Reader for the ModifyCiphers structure. -type ModifyCiphersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ModifyCiphersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewModifyCiphersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewModifyCiphersDefault(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 - } -} - -// NewModifyCiphersOK creates a ModifyCiphersOK with default headers values -func NewModifyCiphersOK() *ModifyCiphersOK { - return &ModifyCiphersOK{} -} - -/* -ModifyCiphersOK describes a response with status code 200, with default header values. - -Success -*/ -type ModifyCiphersOK struct { - Payload *models.CiphersResp -} - -// IsSuccess returns true when this modify ciphers o k response has a 2xx status code -func (o *ModifyCiphersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this modify ciphers o k response has a 3xx status code -func (o *ModifyCiphersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this modify ciphers o k response has a 4xx status code -func (o *ModifyCiphersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this modify ciphers o k response has a 5xx status code -func (o *ModifyCiphersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this modify ciphers o k response a status code equal to that given -func (o *ModifyCiphersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the modify ciphers o k response -func (o *ModifyCiphersOK) Code() int { - return 200 -} - -func (o *ModifyCiphersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/ciphers][%d] modifyCiphersOK %s", 200, payload) -} - -func (o *ModifyCiphersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/ciphers][%d] modifyCiphersOK %s", 200, payload) -} - -func (o *ModifyCiphersOK) GetPayload() *models.CiphersResp { - return o.Payload -} - -func (o *ModifyCiphersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CiphersResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewModifyCiphersDefault creates a ModifyCiphersDefault with default headers values -func NewModifyCiphersDefault(code int) *ModifyCiphersDefault { - return &ModifyCiphersDefault{ - _statusCode: code, - } -} - -/* -ModifyCiphersDefault describes a response with status code -1, with default header values. - -Error -*/ -type ModifyCiphersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this modify ciphers default response has a 2xx status code -func (o *ModifyCiphersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this modify ciphers default response has a 3xx status code -func (o *ModifyCiphersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this modify ciphers default response has a 4xx status code -func (o *ModifyCiphersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this modify ciphers default response has a 5xx status code -func (o *ModifyCiphersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this modify ciphers default response a status code equal to that given -func (o *ModifyCiphersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the modify ciphers default response -func (o *ModifyCiphersDefault) Code() int { - return o._statusCode -} - -func (o *ModifyCiphersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/ciphers][%d] ModifyCiphers default %s", o._statusCode, payload) -} - -func (o *ModifyCiphersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/ciphers][%d] ModifyCiphers default %s", o._statusCode, payload) -} - -func (o *ModifyCiphersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ModifyCiphersDefault) 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/security/modify_object_store_ciphers_parameters.go b/v2/client/security/modify_object_store_ciphers_parameters.go deleted file mode 100644 index 96d2d1a2..00000000 --- a/v2/client/security/modify_object_store_ciphers_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewModifyObjectStoreCiphersParams creates a new ModifyObjectStoreCiphersParams 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 NewModifyObjectStoreCiphersParams() *ModifyObjectStoreCiphersParams { - return &ModifyObjectStoreCiphersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewModifyObjectStoreCiphersParamsWithTimeout creates a new ModifyObjectStoreCiphersParams object -// with the ability to set a timeout on a request. -func NewModifyObjectStoreCiphersParamsWithTimeout(timeout time.Duration) *ModifyObjectStoreCiphersParams { - return &ModifyObjectStoreCiphersParams{ - timeout: timeout, - } -} - -// NewModifyObjectStoreCiphersParamsWithContext creates a new ModifyObjectStoreCiphersParams object -// with the ability to set a context for a request. -func NewModifyObjectStoreCiphersParamsWithContext(ctx context.Context) *ModifyObjectStoreCiphersParams { - return &ModifyObjectStoreCiphersParams{ - Context: ctx, - } -} - -// NewModifyObjectStoreCiphersParamsWithHTTPClient creates a new ModifyObjectStoreCiphersParams object -// with the ability to set a custom HTTPClient for a request. -func NewModifyObjectStoreCiphersParamsWithHTTPClient(client *http.Client) *ModifyObjectStoreCiphersParams { - return &ModifyObjectStoreCiphersParams{ - HTTPClient: client, - } -} - -/* -ModifyObjectStoreCiphersParams contains all the parameters to send to the API endpoint - - for the modify object store ciphers operation. - - Typically these are written to a http.Request. -*/ -type ModifyObjectStoreCiphersParams struct { - - /* Body. - - Enable/Disable object store ciphers. - */ - Body *models.ModifyObjectStoreCiphersRequestBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the modify object store ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ModifyObjectStoreCiphersParams) WithDefaults() *ModifyObjectStoreCiphersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the modify object store ciphers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ModifyObjectStoreCiphersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) WithTimeout(timeout time.Duration) *ModifyObjectStoreCiphersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) WithContext(ctx context.Context) *ModifyObjectStoreCiphersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) WithHTTPClient(client *http.Client) *ModifyObjectStoreCiphersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) WithBody(body *models.ModifyObjectStoreCiphersRequestBody) *ModifyObjectStoreCiphersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the modify object store ciphers params -func (o *ModifyObjectStoreCiphersParams) SetBody(body *models.ModifyObjectStoreCiphersRequestBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ModifyObjectStoreCiphersParams) 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/security/modify_object_store_ciphers_responses.go b/v2/client/security/modify_object_store_ciphers_responses.go deleted file mode 100644 index 5839bcae..00000000 --- a/v2/client/security/modify_object_store_ciphers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ModifyObjectStoreCiphersReader is a Reader for the ModifyObjectStoreCiphers structure. -type ModifyObjectStoreCiphersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ModifyObjectStoreCiphersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewModifyObjectStoreCiphersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewModifyObjectStoreCiphersDefault(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 - } -} - -// NewModifyObjectStoreCiphersOK creates a ModifyObjectStoreCiphersOK with default headers values -func NewModifyObjectStoreCiphersOK() *ModifyObjectStoreCiphersOK { - return &ModifyObjectStoreCiphersOK{} -} - -/* -ModifyObjectStoreCiphersOK describes a response with status code 200, with default header values. - -Success -*/ -type ModifyObjectStoreCiphersOK struct { - Payload *models.ObjectStoreCiphersResp -} - -// IsSuccess returns true when this modify object store ciphers o k response has a 2xx status code -func (o *ModifyObjectStoreCiphersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this modify object store ciphers o k response has a 3xx status code -func (o *ModifyObjectStoreCiphersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this modify object store ciphers o k response has a 4xx status code -func (o *ModifyObjectStoreCiphersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this modify object store ciphers o k response has a 5xx status code -func (o *ModifyObjectStoreCiphersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this modify object store ciphers o k response a status code equal to that given -func (o *ModifyObjectStoreCiphersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the modify object store ciphers o k response -func (o *ModifyObjectStoreCiphersOK) Code() int { - return 200 -} - -func (o *ModifyObjectStoreCiphersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/object-store-ciphers][%d] modifyObjectStoreCiphersOK %s", 200, payload) -} - -func (o *ModifyObjectStoreCiphersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/object-store-ciphers][%d] modifyObjectStoreCiphersOK %s", 200, payload) -} - -func (o *ModifyObjectStoreCiphersOK) GetPayload() *models.ObjectStoreCiphersResp { - return o.Payload -} - -func (o *ModifyObjectStoreCiphersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ObjectStoreCiphersResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewModifyObjectStoreCiphersDefault creates a ModifyObjectStoreCiphersDefault with default headers values -func NewModifyObjectStoreCiphersDefault(code int) *ModifyObjectStoreCiphersDefault { - return &ModifyObjectStoreCiphersDefault{ - _statusCode: code, - } -} - -/* -ModifyObjectStoreCiphersDefault describes a response with status code -1, with default header values. - -Error -*/ -type ModifyObjectStoreCiphersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this modify object store ciphers default response has a 2xx status code -func (o *ModifyObjectStoreCiphersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this modify object store ciphers default response has a 3xx status code -func (o *ModifyObjectStoreCiphersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this modify object store ciphers default response has a 4xx status code -func (o *ModifyObjectStoreCiphersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this modify object store ciphers default response has a 5xx status code -func (o *ModifyObjectStoreCiphersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this modify object store ciphers default response a status code equal to that given -func (o *ModifyObjectStoreCiphersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the modify object store ciphers default response -func (o *ModifyObjectStoreCiphersDefault) Code() int { - return o._statusCode -} - -func (o *ModifyObjectStoreCiphersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/object-store-ciphers][%d] ModifyObjectStoreCiphers default %s", o._statusCode, payload) -} - -func (o *ModifyObjectStoreCiphersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /security/object-store-ciphers][%d] ModifyObjectStoreCiphers default %s", o._statusCode, payload) -} - -func (o *ModifyObjectStoreCiphersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ModifyObjectStoreCiphersDefault) 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/security/register_trusted_cas_parameters.go b/v2/client/security/register_trusted_cas_parameters.go deleted file mode 100644 index 6598ad55..00000000 --- a/v2/client/security/register_trusted_cas_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterTrustedCasParams creates a new RegisterTrustedCasParams 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 NewRegisterTrustedCasParams() *RegisterTrustedCasParams { - return &RegisterTrustedCasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterTrustedCasParamsWithTimeout creates a new RegisterTrustedCasParams object -// with the ability to set a timeout on a request. -func NewRegisterTrustedCasParamsWithTimeout(timeout time.Duration) *RegisterTrustedCasParams { - return &RegisterTrustedCasParams{ - timeout: timeout, - } -} - -// NewRegisterTrustedCasParamsWithContext creates a new RegisterTrustedCasParams object -// with the ability to set a context for a request. -func NewRegisterTrustedCasParamsWithContext(ctx context.Context) *RegisterTrustedCasParams { - return &RegisterTrustedCasParams{ - Context: ctx, - } -} - -// NewRegisterTrustedCasParamsWithHTTPClient creates a new RegisterTrustedCasParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterTrustedCasParamsWithHTTPClient(client *http.Client) *RegisterTrustedCasParams { - return &RegisterTrustedCasParams{ - HTTPClient: client, - } -} - -/* -RegisterTrustedCasParams contains all the parameters to send to the API endpoint - - for the register trusted cas operation. - - Typically these are written to a http.Request. -*/ -type RegisterTrustedCasParams struct { - - /* Body. - - Specifies the parameters to register a Certificate. - */ - Body *models.RegisterTrustedCas - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register trusted cas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterTrustedCasParams) WithDefaults() *RegisterTrustedCasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register trusted cas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterTrustedCasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register trusted cas params -func (o *RegisterTrustedCasParams) WithTimeout(timeout time.Duration) *RegisterTrustedCasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register trusted cas params -func (o *RegisterTrustedCasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register trusted cas params -func (o *RegisterTrustedCasParams) WithContext(ctx context.Context) *RegisterTrustedCasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register trusted cas params -func (o *RegisterTrustedCasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register trusted cas params -func (o *RegisterTrustedCasParams) WithHTTPClient(client *http.Client) *RegisterTrustedCasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register trusted cas params -func (o *RegisterTrustedCasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register trusted cas params -func (o *RegisterTrustedCasParams) WithBody(body *models.RegisterTrustedCas) *RegisterTrustedCasParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register trusted cas params -func (o *RegisterTrustedCasParams) SetBody(body *models.RegisterTrustedCas) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterTrustedCasParams) 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/security/register_trusted_cas_responses.go b/v2/client/security/register_trusted_cas_responses.go deleted file mode 100644 index af336e2e..00000000 --- a/v2/client/security/register_trusted_cas_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterTrustedCasReader is a Reader for the RegisterTrustedCas structure. -type RegisterTrustedCasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterTrustedCasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegisterTrustedCasCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterTrustedCasDefault(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 - } -} - -// NewRegisterTrustedCasCreated creates a RegisterTrustedCasCreated with default headers values -func NewRegisterTrustedCasCreated() *RegisterTrustedCasCreated { - return &RegisterTrustedCasCreated{} -} - -/* -RegisterTrustedCasCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegisterTrustedCasCreated struct { - Payload *models.ListTrustedCasResult -} - -// IsSuccess returns true when this register trusted cas created response has a 2xx status code -func (o *RegisterTrustedCasCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register trusted cas created response has a 3xx status code -func (o *RegisterTrustedCasCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register trusted cas created response has a 4xx status code -func (o *RegisterTrustedCasCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this register trusted cas created response has a 5xx status code -func (o *RegisterTrustedCasCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this register trusted cas created response a status code equal to that given -func (o *RegisterTrustedCasCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the register trusted cas created response -func (o *RegisterTrustedCasCreated) Code() int { - return 201 -} - -func (o *RegisterTrustedCasCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas][%d] registerTrustedCasCreated %s", 201, payload) -} - -func (o *RegisterTrustedCasCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas][%d] registerTrustedCasCreated %s", 201, payload) -} - -func (o *RegisterTrustedCasCreated) GetPayload() *models.ListTrustedCasResult { - return o.Payload -} - -func (o *RegisterTrustedCasCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ListTrustedCasResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterTrustedCasDefault creates a RegisterTrustedCasDefault with default headers values -func NewRegisterTrustedCasDefault(code int) *RegisterTrustedCasDefault { - return &RegisterTrustedCasDefault{ - _statusCode: code, - } -} - -/* -RegisterTrustedCasDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterTrustedCasDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register trusted cas default response has a 2xx status code -func (o *RegisterTrustedCasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register trusted cas default response has a 3xx status code -func (o *RegisterTrustedCasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register trusted cas default response has a 4xx status code -func (o *RegisterTrustedCasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register trusted cas default response has a 5xx status code -func (o *RegisterTrustedCasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register trusted cas default response a status code equal to that given -func (o *RegisterTrustedCasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register trusted cas default response -func (o *RegisterTrustedCasDefault) Code() int { - return o._statusCode -} - -func (o *RegisterTrustedCasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas][%d] RegisterTrustedCas default %s", o._statusCode, payload) -} - -func (o *RegisterTrustedCasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas][%d] RegisterTrustedCas default %s", o._statusCode, payload) -} - -func (o *RegisterTrustedCasDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterTrustedCasDefault) 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/security/security_client.go b/v2/client/security/security_client.go deleted file mode 100644 index 767d4d49..00000000 --- a/v2/client/security/security_client.go +++ /dev/null @@ -1,819 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new security API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new security API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new security API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for security API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateClientcsr(params *CreateClientcsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClientcsrCreated, error) - - CreateCsr(params *CreateCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCsrCreated, error) - - DeleteCsr(params *DeleteCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCsrNoContent, error) - - GetCiphers(params *GetCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCiphersOK, error) - - GetCsrByID(params *GetCsrByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCsrByIDOK, error) - - GetCsrList(params *GetCsrListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCsrListOK, error) - - GetObjectStoreCiphers(params *GetObjectStoreCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectStoreCiphersOK, error) - - GetSecurityConfig(params *GetSecurityConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSecurityConfigOK, error) - - ImportCertificateByClientcsr(params *ImportCertificateByClientcsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportCertificateByClientcsrOK, error) - - ListTrustedCaByID(params *ListTrustedCaByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTrustedCaByIDOK, error) - - ListTrustedCas(params *ListTrustedCasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTrustedCasOK, error) - - ModifyCiphers(params *ModifyCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyCiphersOK, error) - - ModifyObjectStoreCiphers(params *ModifyObjectStoreCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyObjectStoreCiphersOK, error) - - RegisterTrustedCas(params *RegisterTrustedCasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterTrustedCasCreated, error) - - UnregisterTrustedCa(params *UnregisterTrustedCaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterTrustedCaNoContent, error) - - UpdateCertificateByCsr(params *UpdateCertificateByCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCertificateByCsrOK, error) - - UpdateSecurityConfig(params *UpdateSecurityConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSecurityConfigOK, error) - - ValidateTrustedCaByID(params *ValidateTrustedCaByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateTrustedCaByIDOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateClientcsr creates certificate signing requests on the cluster - -Create two Certificate Signing Request on the cluster with the given details one each for client and server. Each service can have at most one outstanding pair of CSR. -*/ -func (a *Client) CreateClientcsr(params *CreateClientcsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateClientcsrCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateClientcsrParams() - } - op := &runtime.ClientOperation{ - ID: "CreateClientcsr", - Method: "POST", - PathPattern: "/client-csr", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateClientcsrReader{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.(*CreateClientcsrCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateClientcsrDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateCsr creates a certificate signing request on the cluster - -Create a Certificate Signing Request on the cluster with the given details. Each service has at most one outstanding CSR. -*/ -func (a *Client) CreateCsr(params *CreateCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCsrCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCsrParams() - } - op := &runtime.ClientOperation{ - ID: "CreateCsr", - Method: "POST", - PathPattern: "/csr", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateCsrReader{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.(*CreateCsrCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateCsrDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteCsr deletes a certificate signing request on the cluster - -Delete a Certificate Signing Request on the cluster. -*/ -func (a *Client) DeleteCsr(params *DeleteCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCsrNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteCsrParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteCsr", - Method: "DELETE", - PathPattern: "/csr/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteCsrReader{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.(*DeleteCsrNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteCsrDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCiphers gets the list of ciphers enabled on the cluster - -Gets the list of ciphers enabled on the cluster. -*/ -func (a *Client) GetCiphers(params *GetCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCiphersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCiphersParams() - } - op := &runtime.ClientOperation{ - ID: "GetCiphers", - Method: "GET", - PathPattern: "/security/ciphers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCiphersReader{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.(*GetCiphersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCiphersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCsrByID lists the specified certificate signing request - -List the specified Certificate Signing Request. -*/ -func (a *Client) GetCsrByID(params *GetCsrByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCsrByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCsrByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetCsrById", - Method: "GET", - PathPattern: "/csr/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCsrByIDReader{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.(*GetCsrByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCsrByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetCsrList lists certificate signing requests on the cluster - -List Certificate Signing Requests on the cluster with service name filtering. -*/ -func (a *Client) GetCsrList(params *GetCsrListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCsrListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCsrListParams() - } - op := &runtime.ClientOperation{ - ID: "GetCsrList", - Method: "GET", - PathPattern: "/csr", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetCsrListReader{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.(*GetCsrListOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetCsrListDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetObjectStoreCiphers gets the list of object store ciphers enabled on the cluster - -Gets the list of object store ciphers enabled on the cluster. -*/ -func (a *Client) GetObjectStoreCiphers(params *GetObjectStoreCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetObjectStoreCiphersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetObjectStoreCiphersParams() - } - op := &runtime.ClientOperation{ - ID: "GetObjectStoreCiphers", - Method: "GET", - PathPattern: "/security/object-store-ciphers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetObjectStoreCiphersReader{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.(*GetObjectStoreCiphersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetObjectStoreCiphersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSecurityConfig gets cluster security settings - -Get cluster security settings. -*/ -func (a *Client) GetSecurityConfig(params *GetSecurityConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSecurityConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSecurityConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetSecurityConfig", - Method: "GET", - PathPattern: "/security-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSecurityConfigReader{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.(*GetSecurityConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSecurityConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ImportCertificateByClientcsr imports the signed certificates on the cluster after the certificate signing requests are created - -Import the signed certificates on the cluster after the Certificate Signing Requests are created. -*/ -func (a *Client) ImportCertificateByClientcsr(params *ImportCertificateByClientcsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ImportCertificateByClientcsrOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewImportCertificateByClientcsrParams() - } - op := &runtime.ClientOperation{ - ID: "ImportCertificateByClientcsr", - Method: "POST", - PathPattern: "/client-csr/certificate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ImportCertificateByClientcsrReader{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.(*ImportCertificateByClientcsrOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ImportCertificateByClientcsrDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListTrustedCaByID lists the specified certificate - -List the specified Certificate. -*/ -func (a *Client) ListTrustedCaByID(params *ListTrustedCaByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTrustedCaByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListTrustedCaByIDParams() - } - op := &runtime.ClientOperation{ - ID: "ListTrustedCaById", - Method: "GET", - PathPattern: "/trusted-cas/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListTrustedCaByIDReader{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.(*ListTrustedCaByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListTrustedCaByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListTrustedCas lists all certificates with cluster trust store - -List all trusted certificates in cluster trust store. -*/ -func (a *Client) ListTrustedCas(params *ListTrustedCasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTrustedCasOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListTrustedCasParams() - } - op := &runtime.ClientOperation{ - ID: "ListTrustedCas", - Method: "GET", - PathPattern: "/trusted-cas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListTrustedCasReader{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.(*ListTrustedCasOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListTrustedCasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ModifyCiphers enables disable a list of ciphers on the cluster iris must be restarted for the change to take effect - -Enable/Disable a list of ciphers on the cluster. -*/ -func (a *Client) ModifyCiphers(params *ModifyCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyCiphersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewModifyCiphersParams() - } - op := &runtime.ClientOperation{ - ID: "ModifyCiphers", - Method: "POST", - PathPattern: "/security/ciphers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ModifyCiphersReader{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.(*ModifyCiphersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ModifyCiphersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ModifyObjectStoreCiphers enables disable a list of object store ciphers on the cluster bridge must be restarted for the change to take effect - -Enable/Disable a list of object store ciphers on the cluster. -*/ -func (a *Client) ModifyObjectStoreCiphers(params *ModifyObjectStoreCiphersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyObjectStoreCiphersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewModifyObjectStoreCiphersParams() - } - op := &runtime.ClientOperation{ - ID: "ModifyObjectStoreCiphers", - Method: "POST", - PathPattern: "/security/object-store-ciphers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ModifyObjectStoreCiphersReader{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.(*ModifyObjectStoreCiphersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ModifyObjectStoreCiphersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterTrustedCas registers c a certificate to the cluster trust store - -Register CA Certificate to the cluster trust store. -*/ -func (a *Client) RegisterTrustedCas(params *RegisterTrustedCasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterTrustedCasCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterTrustedCasParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterTrustedCas", - Method: "POST", - PathPattern: "/trusted-cas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterTrustedCasReader{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.(*RegisterTrustedCasCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterTrustedCasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnregisterTrustedCa unregisters c a certificate from the cluster trust store - -Unregister CA Certificate from the cluster trust store. -*/ -func (a *Client) UnregisterTrustedCa(params *UnregisterTrustedCaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterTrustedCaNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterTrustedCaParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterTrustedCa", - Method: "DELETE", - PathPattern: "/trusted-cas/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnregisterTrustedCaReader{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.(*UnregisterTrustedCaNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterTrustedCaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateCertificateByCsr updates the signed certificate on the cluster after a certificate signing request is created - -Update the signed certificate on the cluster after a Certificate Signing Request is created. -*/ -func (a *Client) UpdateCertificateByCsr(params *UpdateCertificateByCsrParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCertificateByCsrOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateCertificateByCsrParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateCertificateByCsr", - Method: "POST", - PathPattern: "/csr/certificate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateCertificateByCsrReader{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.(*UpdateCertificateByCsrOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateCertificateByCsrDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSecurityConfig updates cluster security settings - -Update cluster security settings. -*/ -func (a *Client) UpdateSecurityConfig(params *UpdateSecurityConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSecurityConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSecurityConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSecurityConfig", - Method: "PUT", - PathPattern: "/security-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSecurityConfigReader{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.(*UpdateSecurityConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSecurityConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ValidateTrustedCaByID validates c a certificate - -Certificate will be checked for Expiration and Revocation. -*/ -func (a *Client) ValidateTrustedCaByID(params *ValidateTrustedCaByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateTrustedCaByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewValidateTrustedCaByIDParams() - } - op := &runtime.ClientOperation{ - ID: "ValidateTrustedCaById", - Method: "POST", - PathPattern: "/trusted-cas/{id}/validate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ValidateTrustedCaByIDReader{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.(*ValidateTrustedCaByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ValidateTrustedCaByIDDefault) - 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/v2/client/security/unregister_trusted_ca_parameters.go b/v2/client/security/unregister_trusted_ca_parameters.go deleted file mode 100644 index af7b10a7..00000000 --- a/v2/client/security/unregister_trusted_ca_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewUnregisterTrustedCaParams creates a new UnregisterTrustedCaParams 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 NewUnregisterTrustedCaParams() *UnregisterTrustedCaParams { - return &UnregisterTrustedCaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterTrustedCaParamsWithTimeout creates a new UnregisterTrustedCaParams object -// with the ability to set a timeout on a request. -func NewUnregisterTrustedCaParamsWithTimeout(timeout time.Duration) *UnregisterTrustedCaParams { - return &UnregisterTrustedCaParams{ - timeout: timeout, - } -} - -// NewUnregisterTrustedCaParamsWithContext creates a new UnregisterTrustedCaParams object -// with the ability to set a context for a request. -func NewUnregisterTrustedCaParamsWithContext(ctx context.Context) *UnregisterTrustedCaParams { - return &UnregisterTrustedCaParams{ - Context: ctx, - } -} - -// NewUnregisterTrustedCaParamsWithHTTPClient creates a new UnregisterTrustedCaParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterTrustedCaParamsWithHTTPClient(client *http.Client) *UnregisterTrustedCaParams { - return &UnregisterTrustedCaParams{ - HTTPClient: client, - } -} - -/* -UnregisterTrustedCaParams contains all the parameters to send to the API endpoint - - for the unregister trusted ca operation. - - Typically these are written to a http.Request. -*/ -type UnregisterTrustedCaParams struct { - - /* ID. - - Specifies the id of the certificate to be unregistered. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister trusted ca params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterTrustedCaParams) WithDefaults() *UnregisterTrustedCaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister trusted ca params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterTrustedCaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) WithTimeout(timeout time.Duration) *UnregisterTrustedCaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) WithContext(ctx context.Context) *UnregisterTrustedCaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) WithHTTPClient(client *http.Client) *UnregisterTrustedCaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) WithID(id string) *UnregisterTrustedCaParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unregister trusted ca params -func (o *UnregisterTrustedCaParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterTrustedCaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/security/unregister_trusted_ca_responses.go b/v2/client/security/unregister_trusted_ca_responses.go deleted file mode 100644 index cfeac52d..00000000 --- a/v2/client/security/unregister_trusted_ca_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UnregisterTrustedCaReader is a Reader for the UnregisterTrustedCa structure. -type UnregisterTrustedCaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterTrustedCaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUnregisterTrustedCaNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterTrustedCaDefault(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 - } -} - -// NewUnregisterTrustedCaNoContent creates a UnregisterTrustedCaNoContent with default headers values -func NewUnregisterTrustedCaNoContent() *UnregisterTrustedCaNoContent { - return &UnregisterTrustedCaNoContent{} -} - -/* -UnregisterTrustedCaNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UnregisterTrustedCaNoContent struct { -} - -// IsSuccess returns true when this unregister trusted ca no content response has a 2xx status code -func (o *UnregisterTrustedCaNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unregister trusted ca no content response has a 3xx status code -func (o *UnregisterTrustedCaNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unregister trusted ca no content response has a 4xx status code -func (o *UnregisterTrustedCaNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this unregister trusted ca no content response has a 5xx status code -func (o *UnregisterTrustedCaNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this unregister trusted ca no content response a status code equal to that given -func (o *UnregisterTrustedCaNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the unregister trusted ca no content response -func (o *UnregisterTrustedCaNoContent) Code() int { - return 204 -} - -func (o *UnregisterTrustedCaNoContent) Error() string { - return fmt.Sprintf("[DELETE /trusted-cas/{id}][%d] unregisterTrustedCaNoContent", 204) -} - -func (o *UnregisterTrustedCaNoContent) String() string { - return fmt.Sprintf("[DELETE /trusted-cas/{id}][%d] unregisterTrustedCaNoContent", 204) -} - -func (o *UnregisterTrustedCaNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUnregisterTrustedCaDefault creates a UnregisterTrustedCaDefault with default headers values -func NewUnregisterTrustedCaDefault(code int) *UnregisterTrustedCaDefault { - return &UnregisterTrustedCaDefault{ - _statusCode: code, - } -} - -/* -UnregisterTrustedCaDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnregisterTrustedCaDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this unregister trusted ca default response has a 2xx status code -func (o *UnregisterTrustedCaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unregister trusted ca default response has a 3xx status code -func (o *UnregisterTrustedCaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unregister trusted ca default response has a 4xx status code -func (o *UnregisterTrustedCaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unregister trusted ca default response has a 5xx status code -func (o *UnregisterTrustedCaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unregister trusted ca default response a status code equal to that given -func (o *UnregisterTrustedCaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unregister trusted ca default response -func (o *UnregisterTrustedCaDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterTrustedCaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /trusted-cas/{id}][%d] UnregisterTrustedCa default %s", o._statusCode, payload) -} - -func (o *UnregisterTrustedCaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /trusted-cas/{id}][%d] UnregisterTrustedCa default %s", o._statusCode, payload) -} - -func (o *UnregisterTrustedCaDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UnregisterTrustedCaDefault) 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/security/update_certificate_by_csr_parameters.go b/v2/client/security/update_certificate_by_csr_parameters.go deleted file mode 100644 index fff99c63..00000000 --- a/v2/client/security/update_certificate_by_csr_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateCertificateByCsrParams creates a new UpdateCertificateByCsrParams 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 NewUpdateCertificateByCsrParams() *UpdateCertificateByCsrParams { - return &UpdateCertificateByCsrParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateCertificateByCsrParamsWithTimeout creates a new UpdateCertificateByCsrParams object -// with the ability to set a timeout on a request. -func NewUpdateCertificateByCsrParamsWithTimeout(timeout time.Duration) *UpdateCertificateByCsrParams { - return &UpdateCertificateByCsrParams{ - timeout: timeout, - } -} - -// NewUpdateCertificateByCsrParamsWithContext creates a new UpdateCertificateByCsrParams object -// with the ability to set a context for a request. -func NewUpdateCertificateByCsrParamsWithContext(ctx context.Context) *UpdateCertificateByCsrParams { - return &UpdateCertificateByCsrParams{ - Context: ctx, - } -} - -// NewUpdateCertificateByCsrParamsWithHTTPClient creates a new UpdateCertificateByCsrParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateCertificateByCsrParamsWithHTTPClient(client *http.Client) *UpdateCertificateByCsrParams { - return &UpdateCertificateByCsrParams{ - HTTPClient: client, - } -} - -/* -UpdateCertificateByCsrParams contains all the parameters to send to the API endpoint - - for the update certificate by csr operation. - - Typically these are written to a http.Request. -*/ -type UpdateCertificateByCsrParams struct { - - /* Body. - - Specifies the parameters to update the certificate. - */ - Body *models.UpdateCertificateByCsrRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update certificate by csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateCertificateByCsrParams) WithDefaults() *UpdateCertificateByCsrParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update certificate by csr params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateCertificateByCsrParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) WithTimeout(timeout time.Duration) *UpdateCertificateByCsrParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) WithContext(ctx context.Context) *UpdateCertificateByCsrParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) WithHTTPClient(client *http.Client) *UpdateCertificateByCsrParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) WithBody(body *models.UpdateCertificateByCsrRequest) *UpdateCertificateByCsrParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update certificate by csr params -func (o *UpdateCertificateByCsrParams) SetBody(body *models.UpdateCertificateByCsrRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateCertificateByCsrParams) 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/security/update_certificate_by_csr_responses.go b/v2/client/security/update_certificate_by_csr_responses.go deleted file mode 100644 index b7ec37b9..00000000 --- a/v2/client/security/update_certificate_by_csr_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateCertificateByCsrReader is a Reader for the UpdateCertificateByCsr structure. -type UpdateCertificateByCsrReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateCertificateByCsrReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateCertificateByCsrOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateCertificateByCsrDefault(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 - } -} - -// NewUpdateCertificateByCsrOK creates a UpdateCertificateByCsrOK with default headers values -func NewUpdateCertificateByCsrOK() *UpdateCertificateByCsrOK { - return &UpdateCertificateByCsrOK{} -} - -/* -UpdateCertificateByCsrOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateCertificateByCsrOK struct { - Payload *models.UpdateCertificateByCsrResponseBody -} - -// IsSuccess returns true when this update certificate by csr o k response has a 2xx status code -func (o *UpdateCertificateByCsrOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update certificate by csr o k response has a 3xx status code -func (o *UpdateCertificateByCsrOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update certificate by csr o k response has a 4xx status code -func (o *UpdateCertificateByCsrOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update certificate by csr o k response has a 5xx status code -func (o *UpdateCertificateByCsrOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update certificate by csr o k response a status code equal to that given -func (o *UpdateCertificateByCsrOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update certificate by csr o k response -func (o *UpdateCertificateByCsrOK) Code() int { - return 200 -} - -func (o *UpdateCertificateByCsrOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr/certificate][%d] updateCertificateByCsrOK %s", 200, payload) -} - -func (o *UpdateCertificateByCsrOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr/certificate][%d] updateCertificateByCsrOK %s", 200, payload) -} - -func (o *UpdateCertificateByCsrOK) GetPayload() *models.UpdateCertificateByCsrResponseBody { - return o.Payload -} - -func (o *UpdateCertificateByCsrOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UpdateCertificateByCsrResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateCertificateByCsrDefault creates a UpdateCertificateByCsrDefault with default headers values -func NewUpdateCertificateByCsrDefault(code int) *UpdateCertificateByCsrDefault { - return &UpdateCertificateByCsrDefault{ - _statusCode: code, - } -} - -/* -UpdateCertificateByCsrDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateCertificateByCsrDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update certificate by csr default response has a 2xx status code -func (o *UpdateCertificateByCsrDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update certificate by csr default response has a 3xx status code -func (o *UpdateCertificateByCsrDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update certificate by csr default response has a 4xx status code -func (o *UpdateCertificateByCsrDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update certificate by csr default response has a 5xx status code -func (o *UpdateCertificateByCsrDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update certificate by csr default response a status code equal to that given -func (o *UpdateCertificateByCsrDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update certificate by csr default response -func (o *UpdateCertificateByCsrDefault) Code() int { - return o._statusCode -} - -func (o *UpdateCertificateByCsrDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr/certificate][%d] UpdateCertificateByCsr default %s", o._statusCode, payload) -} - -func (o *UpdateCertificateByCsrDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /csr/certificate][%d] UpdateCertificateByCsr default %s", o._statusCode, payload) -} - -func (o *UpdateCertificateByCsrDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateCertificateByCsrDefault) 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/security/update_security_config_parameters.go b/v2/client/security/update_security_config_parameters.go deleted file mode 100644 index 04703706..00000000 --- a/v2/client/security/update_security_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSecurityConfigParams creates a new UpdateSecurityConfigParams 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 NewUpdateSecurityConfigParams() *UpdateSecurityConfigParams { - return &UpdateSecurityConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSecurityConfigParamsWithTimeout creates a new UpdateSecurityConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateSecurityConfigParamsWithTimeout(timeout time.Duration) *UpdateSecurityConfigParams { - return &UpdateSecurityConfigParams{ - timeout: timeout, - } -} - -// NewUpdateSecurityConfigParamsWithContext creates a new UpdateSecurityConfigParams object -// with the ability to set a context for a request. -func NewUpdateSecurityConfigParamsWithContext(ctx context.Context) *UpdateSecurityConfigParams { - return &UpdateSecurityConfigParams{ - Context: ctx, - } -} - -// NewUpdateSecurityConfigParamsWithHTTPClient creates a new UpdateSecurityConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSecurityConfigParamsWithHTTPClient(client *http.Client) *UpdateSecurityConfigParams { - return &UpdateSecurityConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateSecurityConfigParams contains all the parameters to send to the API endpoint - - for the update security config operation. - - Typically these are written to a http.Request. -*/ -type UpdateSecurityConfigParams struct { - - /* Body. - - Specifies the parameters to update security config. - */ - Body *models.UpdateSecurityConfigRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update security config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSecurityConfigParams) WithDefaults() *UpdateSecurityConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update security config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSecurityConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update security config params -func (o *UpdateSecurityConfigParams) WithTimeout(timeout time.Duration) *UpdateSecurityConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update security config params -func (o *UpdateSecurityConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update security config params -func (o *UpdateSecurityConfigParams) WithContext(ctx context.Context) *UpdateSecurityConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update security config params -func (o *UpdateSecurityConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update security config params -func (o *UpdateSecurityConfigParams) WithHTTPClient(client *http.Client) *UpdateSecurityConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update security config params -func (o *UpdateSecurityConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update security config params -func (o *UpdateSecurityConfigParams) WithBody(body *models.UpdateSecurityConfigRequest) *UpdateSecurityConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update security config params -func (o *UpdateSecurityConfigParams) SetBody(body *models.UpdateSecurityConfigRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSecurityConfigParams) 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/security/update_security_config_responses.go b/v2/client/security/update_security_config_responses.go deleted file mode 100644 index bb4d4643..00000000 --- a/v2/client/security/update_security_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSecurityConfigReader is a Reader for the UpdateSecurityConfig structure. -type UpdateSecurityConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSecurityConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSecurityConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSecurityConfigDefault(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 - } -} - -// NewUpdateSecurityConfigOK creates a UpdateSecurityConfigOK with default headers values -func NewUpdateSecurityConfigOK() *UpdateSecurityConfigOK { - return &UpdateSecurityConfigOK{} -} - -/* -UpdateSecurityConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSecurityConfigOK struct { - Payload *models.SecurityConfigResponse -} - -// IsSuccess returns true when this update security config o k response has a 2xx status code -func (o *UpdateSecurityConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update security config o k response has a 3xx status code -func (o *UpdateSecurityConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update security config o k response has a 4xx status code -func (o *UpdateSecurityConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update security config o k response has a 5xx status code -func (o *UpdateSecurityConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update security config o k response a status code equal to that given -func (o *UpdateSecurityConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update security config o k response -func (o *UpdateSecurityConfigOK) Code() int { - return 200 -} - -func (o *UpdateSecurityConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-config][%d] updateSecurityConfigOK %s", 200, payload) -} - -func (o *UpdateSecurityConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-config][%d] updateSecurityConfigOK %s", 200, payload) -} - -func (o *UpdateSecurityConfigOK) GetPayload() *models.SecurityConfigResponse { - return o.Payload -} - -func (o *UpdateSecurityConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SecurityConfigResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSecurityConfigDefault creates a UpdateSecurityConfigDefault with default headers values -func NewUpdateSecurityConfigDefault(code int) *UpdateSecurityConfigDefault { - return &UpdateSecurityConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateSecurityConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSecurityConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update security config default response has a 2xx status code -func (o *UpdateSecurityConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update security config default response has a 3xx status code -func (o *UpdateSecurityConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update security config default response has a 4xx status code -func (o *UpdateSecurityConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update security config default response has a 5xx status code -func (o *UpdateSecurityConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update security config default response a status code equal to that given -func (o *UpdateSecurityConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update security config default response -func (o *UpdateSecurityConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSecurityConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-config][%d] UpdateSecurityConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSecurityConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-config][%d] UpdateSecurityConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSecurityConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSecurityConfigDefault) 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/security/validate_trusted_ca_by_id_parameters.go b/v2/client/security/validate_trusted_ca_by_id_parameters.go deleted file mode 100644 index 8d45920f..00000000 --- a/v2/client/security/validate_trusted_ca_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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" -) - -// NewValidateTrustedCaByIDParams creates a new ValidateTrustedCaByIDParams 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 NewValidateTrustedCaByIDParams() *ValidateTrustedCaByIDParams { - return &ValidateTrustedCaByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewValidateTrustedCaByIDParamsWithTimeout creates a new ValidateTrustedCaByIDParams object -// with the ability to set a timeout on a request. -func NewValidateTrustedCaByIDParamsWithTimeout(timeout time.Duration) *ValidateTrustedCaByIDParams { - return &ValidateTrustedCaByIDParams{ - timeout: timeout, - } -} - -// NewValidateTrustedCaByIDParamsWithContext creates a new ValidateTrustedCaByIDParams object -// with the ability to set a context for a request. -func NewValidateTrustedCaByIDParamsWithContext(ctx context.Context) *ValidateTrustedCaByIDParams { - return &ValidateTrustedCaByIDParams{ - Context: ctx, - } -} - -// NewValidateTrustedCaByIDParamsWithHTTPClient creates a new ValidateTrustedCaByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewValidateTrustedCaByIDParamsWithHTTPClient(client *http.Client) *ValidateTrustedCaByIDParams { - return &ValidateTrustedCaByIDParams{ - HTTPClient: client, - } -} - -/* -ValidateTrustedCaByIDParams contains all the parameters to send to the API endpoint - - for the validate trusted ca by Id operation. - - Typically these are written to a http.Request. -*/ -type ValidateTrustedCaByIDParams struct { - - /* ID. - - Specifies the id of the certificate to be validated. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the validate trusted ca by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateTrustedCaByIDParams) WithDefaults() *ValidateTrustedCaByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the validate trusted ca by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateTrustedCaByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) WithTimeout(timeout time.Duration) *ValidateTrustedCaByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) WithContext(ctx context.Context) *ValidateTrustedCaByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) WithHTTPClient(client *http.Client) *ValidateTrustedCaByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) WithID(id string) *ValidateTrustedCaByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the validate trusted ca by Id params -func (o *ValidateTrustedCaByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ValidateTrustedCaByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/security/validate_trusted_ca_by_id_responses.go b/v2/client/security/validate_trusted_ca_by_id_responses.go deleted file mode 100644 index 5eea9f30..00000000 --- a/v2/client/security/validate_trusted_ca_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ValidateTrustedCaByIDReader is a Reader for the ValidateTrustedCaByID structure. -type ValidateTrustedCaByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ValidateTrustedCaByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewValidateTrustedCaByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewValidateTrustedCaByIDDefault(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 - } -} - -// NewValidateTrustedCaByIDOK creates a ValidateTrustedCaByIDOK with default headers values -func NewValidateTrustedCaByIDOK() *ValidateTrustedCaByIDOK { - return &ValidateTrustedCaByIDOK{} -} - -/* -ValidateTrustedCaByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type ValidateTrustedCaByIDOK struct { - Payload *models.TrustedCa -} - -// IsSuccess returns true when this validate trusted ca by Id o k response has a 2xx status code -func (o *ValidateTrustedCaByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this validate trusted ca by Id o k response has a 3xx status code -func (o *ValidateTrustedCaByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this validate trusted ca by Id o k response has a 4xx status code -func (o *ValidateTrustedCaByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this validate trusted ca by Id o k response has a 5xx status code -func (o *ValidateTrustedCaByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this validate trusted ca by Id o k response a status code equal to that given -func (o *ValidateTrustedCaByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the validate trusted ca by Id o k response -func (o *ValidateTrustedCaByIDOK) Code() int { - return 200 -} - -func (o *ValidateTrustedCaByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas/{id}/validate][%d] validateTrustedCaByIdOK %s", 200, payload) -} - -func (o *ValidateTrustedCaByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas/{id}/validate][%d] validateTrustedCaByIdOK %s", 200, payload) -} - -func (o *ValidateTrustedCaByIDOK) GetPayload() *models.TrustedCa { - return o.Payload -} - -func (o *ValidateTrustedCaByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TrustedCa) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewValidateTrustedCaByIDDefault creates a ValidateTrustedCaByIDDefault with default headers values -func NewValidateTrustedCaByIDDefault(code int) *ValidateTrustedCaByIDDefault { - return &ValidateTrustedCaByIDDefault{ - _statusCode: code, - } -} - -/* -ValidateTrustedCaByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type ValidateTrustedCaByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this validate trusted ca by Id default response has a 2xx status code -func (o *ValidateTrustedCaByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this validate trusted ca by Id default response has a 3xx status code -func (o *ValidateTrustedCaByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this validate trusted ca by Id default response has a 4xx status code -func (o *ValidateTrustedCaByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this validate trusted ca by Id default response has a 5xx status code -func (o *ValidateTrustedCaByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this validate trusted ca by Id default response a status code equal to that given -func (o *ValidateTrustedCaByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the validate trusted ca by Id default response -func (o *ValidateTrustedCaByIDDefault) Code() int { - return o._statusCode -} - -func (o *ValidateTrustedCaByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas/{id}/validate][%d] ValidateTrustedCaById default %s", o._statusCode, payload) -} - -func (o *ValidateTrustedCaByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /trusted-cas/{id}/validate][%d] ValidateTrustedCaById default %s", o._statusCode, payload) -} - -func (o *ValidateTrustedCaByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ValidateTrustedCaByIDDefault) 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/source/create_azure_applications_parameters.go b/v2/client/source/create_azure_applications_parameters.go deleted file mode 100644 index 7cbb4d33..00000000 --- a/v2/client/source/create_azure_applications_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateAzureApplicationsParams creates a new CreateAzureApplicationsParams 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 NewCreateAzureApplicationsParams() *CreateAzureApplicationsParams { - return &CreateAzureApplicationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateAzureApplicationsParamsWithTimeout creates a new CreateAzureApplicationsParams object -// with the ability to set a timeout on a request. -func NewCreateAzureApplicationsParamsWithTimeout(timeout time.Duration) *CreateAzureApplicationsParams { - return &CreateAzureApplicationsParams{ - timeout: timeout, - } -} - -// NewCreateAzureApplicationsParamsWithContext creates a new CreateAzureApplicationsParams object -// with the ability to set a context for a request. -func NewCreateAzureApplicationsParamsWithContext(ctx context.Context) *CreateAzureApplicationsParams { - return &CreateAzureApplicationsParams{ - Context: ctx, - } -} - -// NewCreateAzureApplicationsParamsWithHTTPClient creates a new CreateAzureApplicationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateAzureApplicationsParamsWithHTTPClient(client *http.Client) *CreateAzureApplicationsParams { - return &CreateAzureApplicationsParams{ - HTTPClient: client, - } -} - -/* -CreateAzureApplicationsParams contains all the parameters to send to the API endpoint - - for the create azure applications operation. - - Typically these are written to a http.Request. -*/ -type CreateAzureApplicationsParams struct { - - /* Body. - - Specifies the parameters to create Azure applications within a given Microsoft365 source. - */ - Body *models.CreateAzureApplicationRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create azure applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAzureApplicationsParams) WithDefaults() *CreateAzureApplicationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create azure applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateAzureApplicationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create azure applications params -func (o *CreateAzureApplicationsParams) WithTimeout(timeout time.Duration) *CreateAzureApplicationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create azure applications params -func (o *CreateAzureApplicationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create azure applications params -func (o *CreateAzureApplicationsParams) WithContext(ctx context.Context) *CreateAzureApplicationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create azure applications params -func (o *CreateAzureApplicationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create azure applications params -func (o *CreateAzureApplicationsParams) WithHTTPClient(client *http.Client) *CreateAzureApplicationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create azure applications params -func (o *CreateAzureApplicationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create azure applications params -func (o *CreateAzureApplicationsParams) WithBody(body *models.CreateAzureApplicationRequestParams) *CreateAzureApplicationsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create azure applications params -func (o *CreateAzureApplicationsParams) SetBody(body *models.CreateAzureApplicationRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateAzureApplicationsParams) 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/source/create_azure_applications_responses.go b/v2/client/source/create_azure_applications_responses.go deleted file mode 100644 index 6e4a2ac8..00000000 --- a/v2/client/source/create_azure_applications_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateAzureApplicationsReader is a Reader for the CreateAzureApplications structure. -type CreateAzureApplicationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateAzureApplicationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateAzureApplicationsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateAzureApplicationsDefault(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 - } -} - -// NewCreateAzureApplicationsCreated creates a CreateAzureApplicationsCreated with default headers values -func NewCreateAzureApplicationsCreated() *CreateAzureApplicationsCreated { - return &CreateAzureApplicationsCreated{} -} - -/* -CreateAzureApplicationsCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateAzureApplicationsCreated struct { - Payload *models.CreateAzureApplicationResponseParams -} - -// IsSuccess returns true when this create azure applications created response has a 2xx status code -func (o *CreateAzureApplicationsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create azure applications created response has a 3xx status code -func (o *CreateAzureApplicationsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create azure applications created response has a 4xx status code -func (o *CreateAzureApplicationsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create azure applications created response has a 5xx status code -func (o *CreateAzureApplicationsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create azure applications created response a status code equal to that given -func (o *CreateAzureApplicationsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create azure applications created response -func (o *CreateAzureApplicationsCreated) Code() int { - return 201 -} - -func (o *CreateAzureApplicationsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/azure-applications][%d] createAzureApplicationsCreated %s", 201, payload) -} - -func (o *CreateAzureApplicationsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/azure-applications][%d] createAzureApplicationsCreated %s", 201, payload) -} - -func (o *CreateAzureApplicationsCreated) GetPayload() *models.CreateAzureApplicationResponseParams { - return o.Payload -} - -func (o *CreateAzureApplicationsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateAzureApplicationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateAzureApplicationsDefault creates a CreateAzureApplicationsDefault with default headers values -func NewCreateAzureApplicationsDefault(code int) *CreateAzureApplicationsDefault { - return &CreateAzureApplicationsDefault{ - _statusCode: code, - } -} - -/* -CreateAzureApplicationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateAzureApplicationsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create azure applications default response has a 2xx status code -func (o *CreateAzureApplicationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create azure applications default response has a 3xx status code -func (o *CreateAzureApplicationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create azure applications default response has a 4xx status code -func (o *CreateAzureApplicationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create azure applications default response has a 5xx status code -func (o *CreateAzureApplicationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create azure applications default response a status code equal to that given -func (o *CreateAzureApplicationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create azure applications default response -func (o *CreateAzureApplicationsDefault) Code() int { - return o._statusCode -} - -func (o *CreateAzureApplicationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/azure-applications][%d] CreateAzureApplications default %s", o._statusCode, payload) -} - -func (o *CreateAzureApplicationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/azure-applications][%d] CreateAzureApplications default %s", o._statusCode, payload) -} - -func (o *CreateAzureApplicationsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateAzureApplicationsDefault) 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/source/create_or_update_azure_applications_parameters.go b/v2/client/source/create_or_update_azure_applications_parameters.go deleted file mode 100644 index 6b460225..00000000 --- a/v2/client/source/create_or_update_azure_applications_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateOrUpdateAzureApplicationsParams creates a new CreateOrUpdateAzureApplicationsParams 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 NewCreateOrUpdateAzureApplicationsParams() *CreateOrUpdateAzureApplicationsParams { - return &CreateOrUpdateAzureApplicationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateOrUpdateAzureApplicationsParamsWithTimeout creates a new CreateOrUpdateAzureApplicationsParams object -// with the ability to set a timeout on a request. -func NewCreateOrUpdateAzureApplicationsParamsWithTimeout(timeout time.Duration) *CreateOrUpdateAzureApplicationsParams { - return &CreateOrUpdateAzureApplicationsParams{ - timeout: timeout, - } -} - -// NewCreateOrUpdateAzureApplicationsParamsWithContext creates a new CreateOrUpdateAzureApplicationsParams object -// with the ability to set a context for a request. -func NewCreateOrUpdateAzureApplicationsParamsWithContext(ctx context.Context) *CreateOrUpdateAzureApplicationsParams { - return &CreateOrUpdateAzureApplicationsParams{ - Context: ctx, - } -} - -// NewCreateOrUpdateAzureApplicationsParamsWithHTTPClient creates a new CreateOrUpdateAzureApplicationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateOrUpdateAzureApplicationsParamsWithHTTPClient(client *http.Client) *CreateOrUpdateAzureApplicationsParams { - return &CreateOrUpdateAzureApplicationsParams{ - HTTPClient: client, - } -} - -/* -CreateOrUpdateAzureApplicationsParams contains all the parameters to send to the API endpoint - - for the create or update azure applications operation. - - Typically these are written to a http.Request. -*/ -type CreateOrUpdateAzureApplicationsParams struct { - - /* Body. - - Specifies the parameters to create/update Azure applications within a given Microsoft365 source. - */ - Body *models.CreateAzureApplicationRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create or update azure applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrUpdateAzureApplicationsParams) WithDefaults() *CreateOrUpdateAzureApplicationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create or update azure applications params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrUpdateAzureApplicationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) WithTimeout(timeout time.Duration) *CreateOrUpdateAzureApplicationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) WithContext(ctx context.Context) *CreateOrUpdateAzureApplicationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) WithHTTPClient(client *http.Client) *CreateOrUpdateAzureApplicationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) WithBody(body *models.CreateAzureApplicationRequestParams) *CreateOrUpdateAzureApplicationsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create or update azure applications params -func (o *CreateOrUpdateAzureApplicationsParams) SetBody(body *models.CreateAzureApplicationRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateOrUpdateAzureApplicationsParams) 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/source/create_or_update_azure_applications_responses.go b/v2/client/source/create_or_update_azure_applications_responses.go deleted file mode 100644 index a7eb18da..00000000 --- a/v2/client/source/create_or_update_azure_applications_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateOrUpdateAzureApplicationsReader is a Reader for the CreateOrUpdateAzureApplications structure. -type CreateOrUpdateAzureApplicationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateOrUpdateAzureApplicationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateOrUpdateAzureApplicationsCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateOrUpdateAzureApplicationsDefault(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 - } -} - -// NewCreateOrUpdateAzureApplicationsCreated creates a CreateOrUpdateAzureApplicationsCreated with default headers values -func NewCreateOrUpdateAzureApplicationsCreated() *CreateOrUpdateAzureApplicationsCreated { - return &CreateOrUpdateAzureApplicationsCreated{} -} - -/* -CreateOrUpdateAzureApplicationsCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateOrUpdateAzureApplicationsCreated struct { - Payload *models.CreateAzureApplicationResponseParams -} - -// IsSuccess returns true when this create or update azure applications created response has a 2xx status code -func (o *CreateOrUpdateAzureApplicationsCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create or update azure applications created response has a 3xx status code -func (o *CreateOrUpdateAzureApplicationsCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create or update azure applications created response has a 4xx status code -func (o *CreateOrUpdateAzureApplicationsCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create or update azure applications created response has a 5xx status code -func (o *CreateOrUpdateAzureApplicationsCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create or update azure applications created response a status code equal to that given -func (o *CreateOrUpdateAzureApplicationsCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create or update azure applications created response -func (o *CreateOrUpdateAzureApplicationsCreated) Code() int { - return 201 -} - -func (o *CreateOrUpdateAzureApplicationsCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/microsoft365/azure-applications][%d] createOrUpdateAzureApplicationsCreated %s", 201, payload) -} - -func (o *CreateOrUpdateAzureApplicationsCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/microsoft365/azure-applications][%d] createOrUpdateAzureApplicationsCreated %s", 201, payload) -} - -func (o *CreateOrUpdateAzureApplicationsCreated) GetPayload() *models.CreateAzureApplicationResponseParams { - return o.Payload -} - -func (o *CreateOrUpdateAzureApplicationsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateAzureApplicationResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOrUpdateAzureApplicationsDefault creates a CreateOrUpdateAzureApplicationsDefault with default headers values -func NewCreateOrUpdateAzureApplicationsDefault(code int) *CreateOrUpdateAzureApplicationsDefault { - return &CreateOrUpdateAzureApplicationsDefault{ - _statusCode: code, - } -} - -/* -CreateOrUpdateAzureApplicationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateOrUpdateAzureApplicationsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create or update azure applications default response has a 2xx status code -func (o *CreateOrUpdateAzureApplicationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create or update azure applications default response has a 3xx status code -func (o *CreateOrUpdateAzureApplicationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create or update azure applications default response has a 4xx status code -func (o *CreateOrUpdateAzureApplicationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create or update azure applications default response has a 5xx status code -func (o *CreateOrUpdateAzureApplicationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create or update azure applications default response a status code equal to that given -func (o *CreateOrUpdateAzureApplicationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create or update azure applications default response -func (o *CreateOrUpdateAzureApplicationsDefault) Code() int { - return o._statusCode -} - -func (o *CreateOrUpdateAzureApplicationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/microsoft365/azure-applications][%d] CreateOrUpdateAzureApplications default %s", o._statusCode, payload) -} - -func (o *CreateOrUpdateAzureApplicationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/microsoft365/azure-applications][%d] CreateOrUpdateAzureApplications default %s", o._statusCode, payload) -} - -func (o *CreateOrUpdateAzureApplicationsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateOrUpdateAzureApplicationsDefault) 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/source/delete_protection_source_registration_parameters.go b/v2/client/source/delete_protection_source_registration_parameters.go deleted file mode 100644 index 1e750f71..00000000 --- a/v2/client/source/delete_protection_source_registration_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewDeleteProtectionSourceRegistrationParams creates a new DeleteProtectionSourceRegistrationParams 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 NewDeleteProtectionSourceRegistrationParams() *DeleteProtectionSourceRegistrationParams { - return &DeleteProtectionSourceRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteProtectionSourceRegistrationParamsWithTimeout creates a new DeleteProtectionSourceRegistrationParams object -// with the ability to set a timeout on a request. -func NewDeleteProtectionSourceRegistrationParamsWithTimeout(timeout time.Duration) *DeleteProtectionSourceRegistrationParams { - return &DeleteProtectionSourceRegistrationParams{ - timeout: timeout, - } -} - -// NewDeleteProtectionSourceRegistrationParamsWithContext creates a new DeleteProtectionSourceRegistrationParams object -// with the ability to set a context for a request. -func NewDeleteProtectionSourceRegistrationParamsWithContext(ctx context.Context) *DeleteProtectionSourceRegistrationParams { - return &DeleteProtectionSourceRegistrationParams{ - Context: ctx, - } -} - -// NewDeleteProtectionSourceRegistrationParamsWithHTTPClient creates a new DeleteProtectionSourceRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteProtectionSourceRegistrationParamsWithHTTPClient(client *http.Client) *DeleteProtectionSourceRegistrationParams { - return &DeleteProtectionSourceRegistrationParams{ - HTTPClient: client, - } -} - -/* -DeleteProtectionSourceRegistrationParams contains all the parameters to send to the API endpoint - - for the delete protection source registration operation. - - Typically these are written to a http.Request. -*/ -type DeleteProtectionSourceRegistrationParams struct { - - /* ID. - - Specifies the ID of the Protection Source Registration. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionSourceRegistrationParams) WithDefaults() *DeleteProtectionSourceRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteProtectionSourceRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) WithTimeout(timeout time.Duration) *DeleteProtectionSourceRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) WithContext(ctx context.Context) *DeleteProtectionSourceRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) WithHTTPClient(client *http.Client) *DeleteProtectionSourceRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) WithID(id int64) *DeleteProtectionSourceRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete protection source registration params -func (o *DeleteProtectionSourceRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteProtectionSourceRegistrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/delete_protection_source_registration_responses.go b/v2/client/source/delete_protection_source_registration_responses.go deleted file mode 100644 index 5025d22b..00000000 --- a/v2/client/source/delete_protection_source_registration_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteProtectionSourceRegistrationReader is a Reader for the DeleteProtectionSourceRegistration structure. -type DeleteProtectionSourceRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteProtectionSourceRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteProtectionSourceRegistrationNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteProtectionSourceRegistrationDefault(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 - } -} - -// NewDeleteProtectionSourceRegistrationNoContent creates a DeleteProtectionSourceRegistrationNoContent with default headers values -func NewDeleteProtectionSourceRegistrationNoContent() *DeleteProtectionSourceRegistrationNoContent { - return &DeleteProtectionSourceRegistrationNoContent{} -} - -/* -DeleteProtectionSourceRegistrationNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteProtectionSourceRegistrationNoContent struct { -} - -// IsSuccess returns true when this delete protection source registration no content response has a 2xx status code -func (o *DeleteProtectionSourceRegistrationNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete protection source registration no content response has a 3xx status code -func (o *DeleteProtectionSourceRegistrationNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete protection source registration no content response has a 4xx status code -func (o *DeleteProtectionSourceRegistrationNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete protection source registration no content response has a 5xx status code -func (o *DeleteProtectionSourceRegistrationNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete protection source registration no content response a status code equal to that given -func (o *DeleteProtectionSourceRegistrationNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete protection source registration no content response -func (o *DeleteProtectionSourceRegistrationNoContent) Code() int { - return 204 -} - -func (o *DeleteProtectionSourceRegistrationNoContent) Error() string { - return fmt.Sprintf("[DELETE /data-protect/sources/registrations/{id}][%d] deleteProtectionSourceRegistrationNoContent", 204) -} - -func (o *DeleteProtectionSourceRegistrationNoContent) String() string { - return fmt.Sprintf("[DELETE /data-protect/sources/registrations/{id}][%d] deleteProtectionSourceRegistrationNoContent", 204) -} - -func (o *DeleteProtectionSourceRegistrationNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteProtectionSourceRegistrationDefault creates a DeleteProtectionSourceRegistrationDefault with default headers values -func NewDeleteProtectionSourceRegistrationDefault(code int) *DeleteProtectionSourceRegistrationDefault { - return &DeleteProtectionSourceRegistrationDefault{ - _statusCode: code, - } -} - -/* -DeleteProtectionSourceRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteProtectionSourceRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete protection source registration default response has a 2xx status code -func (o *DeleteProtectionSourceRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete protection source registration default response has a 3xx status code -func (o *DeleteProtectionSourceRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete protection source registration default response has a 4xx status code -func (o *DeleteProtectionSourceRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete protection source registration default response has a 5xx status code -func (o *DeleteProtectionSourceRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete protection source registration default response a status code equal to that given -func (o *DeleteProtectionSourceRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete protection source registration default response -func (o *DeleteProtectionSourceRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *DeleteProtectionSourceRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/sources/registrations/{id}][%d] DeleteProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionSourceRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /data-protect/sources/registrations/{id}][%d] DeleteProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *DeleteProtectionSourceRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteProtectionSourceRegistrationDefault) 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/source/generate_m365_device_access_token_parameters.go b/v2/client/source/generate_m365_device_access_token_parameters.go deleted file mode 100644 index cc212398..00000000 --- a/v2/client/source/generate_m365_device_access_token_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewGenerateM365DeviceAccessTokenParams creates a new GenerateM365DeviceAccessTokenParams 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 NewGenerateM365DeviceAccessTokenParams() *GenerateM365DeviceAccessTokenParams { - return &GenerateM365DeviceAccessTokenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGenerateM365DeviceAccessTokenParamsWithTimeout creates a new GenerateM365DeviceAccessTokenParams object -// with the ability to set a timeout on a request. -func NewGenerateM365DeviceAccessTokenParamsWithTimeout(timeout time.Duration) *GenerateM365DeviceAccessTokenParams { - return &GenerateM365DeviceAccessTokenParams{ - timeout: timeout, - } -} - -// NewGenerateM365DeviceAccessTokenParamsWithContext creates a new GenerateM365DeviceAccessTokenParams object -// with the ability to set a context for a request. -func NewGenerateM365DeviceAccessTokenParamsWithContext(ctx context.Context) *GenerateM365DeviceAccessTokenParams { - return &GenerateM365DeviceAccessTokenParams{ - Context: ctx, - } -} - -// NewGenerateM365DeviceAccessTokenParamsWithHTTPClient creates a new GenerateM365DeviceAccessTokenParams object -// with the ability to set a custom HTTPClient for a request. -func NewGenerateM365DeviceAccessTokenParamsWithHTTPClient(client *http.Client) *GenerateM365DeviceAccessTokenParams { - return &GenerateM365DeviceAccessTokenParams{ - HTTPClient: client, - } -} - -/* -GenerateM365DeviceAccessTokenParams contains all the parameters to send to the API endpoint - - for the generate m365 device access token operation. - - Typically these are written to a http.Request. -*/ -type GenerateM365DeviceAccessTokenParams struct { - - /* Body. - - Specifies the parameters to validate and generate access token for authorizing the client within Microsoft365. - */ - Body *models.GenerateM365DeviceAccessTokenRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the generate m365 device access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateM365DeviceAccessTokenParams) WithDefaults() *GenerateM365DeviceAccessTokenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the generate m365 device access token params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateM365DeviceAccessTokenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) WithTimeout(timeout time.Duration) *GenerateM365DeviceAccessTokenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) WithContext(ctx context.Context) *GenerateM365DeviceAccessTokenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) WithHTTPClient(client *http.Client) *GenerateM365DeviceAccessTokenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) WithBody(body *models.GenerateM365DeviceAccessTokenRequestParams) *GenerateM365DeviceAccessTokenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the generate m365 device access token params -func (o *GenerateM365DeviceAccessTokenParams) SetBody(body *models.GenerateM365DeviceAccessTokenRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GenerateM365DeviceAccessTokenParams) 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/source/generate_m365_device_access_token_responses.go b/v2/client/source/generate_m365_device_access_token_responses.go deleted file mode 100644 index a07699b0..00000000 --- a/v2/client/source/generate_m365_device_access_token_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GenerateM365DeviceAccessTokenReader is a Reader for the GenerateM365DeviceAccessToken structure. -type GenerateM365DeviceAccessTokenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GenerateM365DeviceAccessTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGenerateM365DeviceAccessTokenCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGenerateM365DeviceAccessTokenDefault(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 - } -} - -// NewGenerateM365DeviceAccessTokenCreated creates a GenerateM365DeviceAccessTokenCreated with default headers values -func NewGenerateM365DeviceAccessTokenCreated() *GenerateM365DeviceAccessTokenCreated { - return &GenerateM365DeviceAccessTokenCreated{} -} - -/* -GenerateM365DeviceAccessTokenCreated describes a response with status code 201, with default header values. - -Success -*/ -type GenerateM365DeviceAccessTokenCreated struct { - Payload *models.GenerateM365DeviceAccessTokenResponseParams -} - -// IsSuccess returns true when this generate m365 device access token created response has a 2xx status code -func (o *GenerateM365DeviceAccessTokenCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this generate m365 device access token created response has a 3xx status code -func (o *GenerateM365DeviceAccessTokenCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this generate m365 device access token created response has a 4xx status code -func (o *GenerateM365DeviceAccessTokenCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this generate m365 device access token created response has a 5xx status code -func (o *GenerateM365DeviceAccessTokenCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this generate m365 device access token created response a status code equal to that given -func (o *GenerateM365DeviceAccessTokenCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the generate m365 device access token created response -func (o *GenerateM365DeviceAccessTokenCreated) Code() int { - return 201 -} - -func (o *GenerateM365DeviceAccessTokenCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/token][%d] generateM365DeviceAccessTokenCreated %s", 201, payload) -} - -func (o *GenerateM365DeviceAccessTokenCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/token][%d] generateM365DeviceAccessTokenCreated %s", 201, payload) -} - -func (o *GenerateM365DeviceAccessTokenCreated) GetPayload() *models.GenerateM365DeviceAccessTokenResponseParams { - return o.Payload -} - -func (o *GenerateM365DeviceAccessTokenCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GenerateM365DeviceAccessTokenResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGenerateM365DeviceAccessTokenDefault creates a GenerateM365DeviceAccessTokenDefault with default headers values -func NewGenerateM365DeviceAccessTokenDefault(code int) *GenerateM365DeviceAccessTokenDefault { - return &GenerateM365DeviceAccessTokenDefault{ - _statusCode: code, - } -} - -/* -GenerateM365DeviceAccessTokenDefault describes a response with status code -1, with default header values. - -Error -*/ -type GenerateM365DeviceAccessTokenDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this generate m365 device access token default response has a 2xx status code -func (o *GenerateM365DeviceAccessTokenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this generate m365 device access token default response has a 3xx status code -func (o *GenerateM365DeviceAccessTokenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this generate m365 device access token default response has a 4xx status code -func (o *GenerateM365DeviceAccessTokenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this generate m365 device access token default response has a 5xx status code -func (o *GenerateM365DeviceAccessTokenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this generate m365 device access token default response a status code equal to that given -func (o *GenerateM365DeviceAccessTokenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the generate m365 device access token default response -func (o *GenerateM365DeviceAccessTokenDefault) Code() int { - return o._statusCode -} - -func (o *GenerateM365DeviceAccessTokenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/token][%d] GenerateM365DeviceAccessToken default %s", o._statusCode, payload) -} - -func (o *GenerateM365DeviceAccessTokenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/token][%d] GenerateM365DeviceAccessToken default %s", o._statusCode, payload) -} - -func (o *GenerateM365DeviceAccessTokenDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GenerateM365DeviceAccessTokenDefault) 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/source/generate_m365_device_code_parameters.go b/v2/client/source/generate_m365_device_code_parameters.go deleted file mode 100644 index 0d89ec5b..00000000 --- a/v2/client/source/generate_m365_device_code_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewGenerateM365DeviceCodeParams creates a new GenerateM365DeviceCodeParams 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 NewGenerateM365DeviceCodeParams() *GenerateM365DeviceCodeParams { - return &GenerateM365DeviceCodeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGenerateM365DeviceCodeParamsWithTimeout creates a new GenerateM365DeviceCodeParams object -// with the ability to set a timeout on a request. -func NewGenerateM365DeviceCodeParamsWithTimeout(timeout time.Duration) *GenerateM365DeviceCodeParams { - return &GenerateM365DeviceCodeParams{ - timeout: timeout, - } -} - -// NewGenerateM365DeviceCodeParamsWithContext creates a new GenerateM365DeviceCodeParams object -// with the ability to set a context for a request. -func NewGenerateM365DeviceCodeParamsWithContext(ctx context.Context) *GenerateM365DeviceCodeParams { - return &GenerateM365DeviceCodeParams{ - Context: ctx, - } -} - -// NewGenerateM365DeviceCodeParamsWithHTTPClient creates a new GenerateM365DeviceCodeParams object -// with the ability to set a custom HTTPClient for a request. -func NewGenerateM365DeviceCodeParamsWithHTTPClient(client *http.Client) *GenerateM365DeviceCodeParams { - return &GenerateM365DeviceCodeParams{ - HTTPClient: client, - } -} - -/* -GenerateM365DeviceCodeParams contains all the parameters to send to the API endpoint - - for the generate m365 device code operation. - - Typically these are written to a http.Request. -*/ -type GenerateM365DeviceCodeParams struct { - - /* Body. - - Specifies the parameters to generate the user and device code to initiate authentication with Microsoft365. - */ - Body *models.GenerateM365DeviceCodeRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the generate m365 device code params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateM365DeviceCodeParams) WithDefaults() *GenerateM365DeviceCodeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the generate m365 device code params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GenerateM365DeviceCodeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) WithTimeout(timeout time.Duration) *GenerateM365DeviceCodeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) WithContext(ctx context.Context) *GenerateM365DeviceCodeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) WithHTTPClient(client *http.Client) *GenerateM365DeviceCodeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) WithBody(body *models.GenerateM365DeviceCodeRequestParams) *GenerateM365DeviceCodeParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the generate m365 device code params -func (o *GenerateM365DeviceCodeParams) SetBody(body *models.GenerateM365DeviceCodeRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GenerateM365DeviceCodeParams) 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/source/generate_m365_device_code_responses.go b/v2/client/source/generate_m365_device_code_responses.go deleted file mode 100644 index 9ee8ef63..00000000 --- a/v2/client/source/generate_m365_device_code_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GenerateM365DeviceCodeReader is a Reader for the GenerateM365DeviceCode structure. -type GenerateM365DeviceCodeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GenerateM365DeviceCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewGenerateM365DeviceCodeCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGenerateM365DeviceCodeDefault(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 - } -} - -// NewGenerateM365DeviceCodeCreated creates a GenerateM365DeviceCodeCreated with default headers values -func NewGenerateM365DeviceCodeCreated() *GenerateM365DeviceCodeCreated { - return &GenerateM365DeviceCodeCreated{} -} - -/* -GenerateM365DeviceCodeCreated describes a response with status code 201, with default header values. - -Success -*/ -type GenerateM365DeviceCodeCreated struct { - Payload *models.GenerateM365DeviceCodeResponseParams -} - -// IsSuccess returns true when this generate m365 device code created response has a 2xx status code -func (o *GenerateM365DeviceCodeCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this generate m365 device code created response has a 3xx status code -func (o *GenerateM365DeviceCodeCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this generate m365 device code created response has a 4xx status code -func (o *GenerateM365DeviceCodeCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this generate m365 device code created response has a 5xx status code -func (o *GenerateM365DeviceCodeCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this generate m365 device code created response a status code equal to that given -func (o *GenerateM365DeviceCodeCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the generate m365 device code created response -func (o *GenerateM365DeviceCodeCreated) Code() int { - return 201 -} - -func (o *GenerateM365DeviceCodeCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/device-code][%d] generateM365DeviceCodeCreated %s", 201, payload) -} - -func (o *GenerateM365DeviceCodeCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/device-code][%d] generateM365DeviceCodeCreated %s", 201, payload) -} - -func (o *GenerateM365DeviceCodeCreated) GetPayload() *models.GenerateM365DeviceCodeResponseParams { - return o.Payload -} - -func (o *GenerateM365DeviceCodeCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GenerateM365DeviceCodeResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGenerateM365DeviceCodeDefault creates a GenerateM365DeviceCodeDefault with default headers values -func NewGenerateM365DeviceCodeDefault(code int) *GenerateM365DeviceCodeDefault { - return &GenerateM365DeviceCodeDefault{ - _statusCode: code, - } -} - -/* -GenerateM365DeviceCodeDefault describes a response with status code -1, with default header values. - -Error -*/ -type GenerateM365DeviceCodeDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this generate m365 device code default response has a 2xx status code -func (o *GenerateM365DeviceCodeDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this generate m365 device code default response has a 3xx status code -func (o *GenerateM365DeviceCodeDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this generate m365 device code default response has a 4xx status code -func (o *GenerateM365DeviceCodeDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this generate m365 device code default response has a 5xx status code -func (o *GenerateM365DeviceCodeDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this generate m365 device code default response a status code equal to that given -func (o *GenerateM365DeviceCodeDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the generate m365 device code default response -func (o *GenerateM365DeviceCodeDefault) Code() int { - return o._statusCode -} - -func (o *GenerateM365DeviceCodeDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/device-code][%d] GenerateM365DeviceCode default %s", o._statusCode, payload) -} - -func (o *GenerateM365DeviceCodeDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/microsoft365/auth/device-code][%d] GenerateM365DeviceCode default %s", o._statusCode, payload) -} - -func (o *GenerateM365DeviceCodeDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GenerateM365DeviceCodeDefault) 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/source/get_protection_source_registration_parameters.go b/v2/client/source/get_protection_source_registration_parameters.go deleted file mode 100644 index 9e0165b8..00000000 --- a/v2/client/source/get_protection_source_registration_parameters.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourceRegistrationParams creates a new GetProtectionSourceRegistrationParams 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 NewGetProtectionSourceRegistrationParams() *GetProtectionSourceRegistrationParams { - return &GetProtectionSourceRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourceRegistrationParamsWithTimeout creates a new GetProtectionSourceRegistrationParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourceRegistrationParamsWithTimeout(timeout time.Duration) *GetProtectionSourceRegistrationParams { - return &GetProtectionSourceRegistrationParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourceRegistrationParamsWithContext creates a new GetProtectionSourceRegistrationParams object -// with the ability to set a context for a request. -func NewGetProtectionSourceRegistrationParamsWithContext(ctx context.Context) *GetProtectionSourceRegistrationParams { - return &GetProtectionSourceRegistrationParams{ - Context: ctx, - } -} - -// NewGetProtectionSourceRegistrationParamsWithHTTPClient creates a new GetProtectionSourceRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourceRegistrationParamsWithHTTPClient(client *http.Client) *GetProtectionSourceRegistrationParams { - return &GetProtectionSourceRegistrationParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourceRegistrationParams contains all the parameters to send to the API endpoint - - for the get protection source registration operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourceRegistrationParams struct { - - /* ID. - - Specifies the id of the Protection Source registration. - - Format: int64 - */ - ID int64 - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourceRegistrationParams) WithDefaults() *GetProtectionSourceRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourceRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) WithTimeout(timeout time.Duration) *GetProtectionSourceRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) WithContext(ctx context.Context) *GetProtectionSourceRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) WithHTTPClient(client *http.Client) *GetProtectionSourceRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) WithID(id int64) *GetProtectionSourceRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionSourceRegistrationParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection source registration params -func (o *GetProtectionSourceRegistrationParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourceRegistrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/get_protection_source_registration_responses.go b/v2/client/source/get_protection_source_registration_responses.go deleted file mode 100644 index 8b4a4645..00000000 --- a/v2/client/source/get_protection_source_registration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionSourceRegistrationReader is a Reader for the GetProtectionSourceRegistration structure. -type GetProtectionSourceRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourceRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourceRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourceRegistrationDefault(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 - } -} - -// NewGetProtectionSourceRegistrationOK creates a GetProtectionSourceRegistrationOK with default headers values -func NewGetProtectionSourceRegistrationOK() *GetProtectionSourceRegistrationOK { - return &GetProtectionSourceRegistrationOK{} -} - -/* -GetProtectionSourceRegistrationOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourceRegistrationOK struct { - Payload *models.SourceRegistration -} - -// IsSuccess returns true when this get protection source registration o k response has a 2xx status code -func (o *GetProtectionSourceRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection source registration o k response has a 3xx status code -func (o *GetProtectionSourceRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection source registration o k response has a 4xx status code -func (o *GetProtectionSourceRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection source registration o k response has a 5xx status code -func (o *GetProtectionSourceRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection source registration o k response a status code equal to that given -func (o *GetProtectionSourceRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection source registration o k response -func (o *GetProtectionSourceRegistrationOK) Code() int { - return 200 -} - -func (o *GetProtectionSourceRegistrationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations/{id}][%d] getProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *GetProtectionSourceRegistrationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations/{id}][%d] getProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *GetProtectionSourceRegistrationOK) GetPayload() *models.SourceRegistration { - return o.Payload -} - -func (o *GetProtectionSourceRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceRegistration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourceRegistrationDefault creates a GetProtectionSourceRegistrationDefault with default headers values -func NewGetProtectionSourceRegistrationDefault(code int) *GetProtectionSourceRegistrationDefault { - return &GetProtectionSourceRegistrationDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourceRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourceRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection source registration default response has a 2xx status code -func (o *GetProtectionSourceRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection source registration default response has a 3xx status code -func (o *GetProtectionSourceRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection source registration default response has a 4xx status code -func (o *GetProtectionSourceRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection source registration default response has a 5xx status code -func (o *GetProtectionSourceRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection source registration default response a status code equal to that given -func (o *GetProtectionSourceRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection source registration default response -func (o *GetProtectionSourceRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourceRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations/{id}][%d] GetProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourceRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations/{id}][%d] GetProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourceRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionSourceRegistrationDefault) 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/source/get_protection_sources_parameters.go b/v2/client/source/get_protection_sources_parameters.go deleted file mode 100644 index b67aef5c..00000000 --- a/v2/client/source/get_protection_sources_parameters.go +++ /dev/null @@ -1,302 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewGetProtectionSourcesParams creates a new GetProtectionSourcesParams 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 NewGetProtectionSourcesParams() *GetProtectionSourcesParams { - return &GetProtectionSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionSourcesParamsWithTimeout creates a new GetProtectionSourcesParams object -// with the ability to set a timeout on a request. -func NewGetProtectionSourcesParamsWithTimeout(timeout time.Duration) *GetProtectionSourcesParams { - return &GetProtectionSourcesParams{ - timeout: timeout, - } -} - -// NewGetProtectionSourcesParamsWithContext creates a new GetProtectionSourcesParams object -// with the ability to set a context for a request. -func NewGetProtectionSourcesParamsWithContext(ctx context.Context) *GetProtectionSourcesParams { - return &GetProtectionSourcesParams{ - Context: ctx, - } -} - -// NewGetProtectionSourcesParamsWithHTTPClient creates a new GetProtectionSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionSourcesParamsWithHTTPClient(client *http.Client) *GetProtectionSourcesParams { - return &GetProtectionSourcesParams{ - HTTPClient: client, - } -} - -/* -GetProtectionSourcesParams contains all the parameters to send to the API endpoint - - for the get protection sources operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionSourcesParams struct { - - /* EncryptionKey. - - Specifies the key to be used to encrypt the source credential. If includeSourceCredentials is set to true this key must be specified. - */ - EncryptionKey *string - - /* IncludeSourceCredentials. - - If true, the encrypted crednetial for the registered sources will be included. Credential is first encrypted with internal key and then reencrypted with user supplied encryption key. - */ - IncludeSourceCredentials *bool - - /* IncludeTenants. - - If true, the response will include Sources which belong belong to all tenants which the current user has permission to see. If false, then only Sources for the current user will be returned. - */ - IncludeTenants *bool - - /* RequestInitiatorType. - - Specifies the type of request from UI, which is used for services like magneto to determine the priority of requests. - */ - RequestInitiatorType *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which Sources are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesParams) WithDefaults() *GetProtectionSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection sources params -func (o *GetProtectionSourcesParams) WithTimeout(timeout time.Duration) *GetProtectionSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection sources params -func (o *GetProtectionSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection sources params -func (o *GetProtectionSourcesParams) WithContext(ctx context.Context) *GetProtectionSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection sources params -func (o *GetProtectionSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection sources params -func (o *GetProtectionSourcesParams) WithHTTPClient(client *http.Client) *GetProtectionSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection sources params -func (o *GetProtectionSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEncryptionKey adds the encryptionKey to the get protection sources params -func (o *GetProtectionSourcesParams) WithEncryptionKey(encryptionKey *string) *GetProtectionSourcesParams { - o.SetEncryptionKey(encryptionKey) - return o -} - -// SetEncryptionKey adds the encryptionKey to the get protection sources params -func (o *GetProtectionSourcesParams) SetEncryptionKey(encryptionKey *string) { - o.EncryptionKey = encryptionKey -} - -// WithIncludeSourceCredentials adds the includeSourceCredentials to the get protection sources params -func (o *GetProtectionSourcesParams) WithIncludeSourceCredentials(includeSourceCredentials *bool) *GetProtectionSourcesParams { - o.SetIncludeSourceCredentials(includeSourceCredentials) - return o -} - -// SetIncludeSourceCredentials adds the includeSourceCredentials to the get protection sources params -func (o *GetProtectionSourcesParams) SetIncludeSourceCredentials(includeSourceCredentials *bool) { - o.IncludeSourceCredentials = includeSourceCredentials -} - -// WithIncludeTenants adds the includeTenants to the get protection sources params -func (o *GetProtectionSourcesParams) WithIncludeTenants(includeTenants *bool) *GetProtectionSourcesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get protection sources params -func (o *GetProtectionSourcesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithRequestInitiatorType adds the requestInitiatorType to the get protection sources params -func (o *GetProtectionSourcesParams) WithRequestInitiatorType(requestInitiatorType *string) *GetProtectionSourcesParams { - o.SetRequestInitiatorType(requestInitiatorType) - return o -} - -// SetRequestInitiatorType adds the requestInitiatorType to the get protection sources params -func (o *GetProtectionSourcesParams) SetRequestInitiatorType(requestInitiatorType *string) { - o.RequestInitiatorType = requestInitiatorType -} - -// WithTenantIds adds the tenantIds to the get protection sources params -func (o *GetProtectionSourcesParams) WithTenantIds(tenantIds []string) *GetProtectionSourcesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get protection sources params -func (o *GetProtectionSourcesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionSourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EncryptionKey != nil { - - // query param encryptionKey - var qrEncryptionKey string - - if o.EncryptionKey != nil { - qrEncryptionKey = *o.EncryptionKey - } - qEncryptionKey := qrEncryptionKey - if qEncryptionKey != "" { - - if err := r.SetQueryParam("encryptionKey", qEncryptionKey); err != nil { - return err - } - } - } - - if o.IncludeSourceCredentials != nil { - - // query param includeSourceCredentials - var qrIncludeSourceCredentials bool - - if o.IncludeSourceCredentials != nil { - qrIncludeSourceCredentials = *o.IncludeSourceCredentials - } - qIncludeSourceCredentials := swag.FormatBool(qrIncludeSourceCredentials) - if qIncludeSourceCredentials != "" { - - if err := r.SetQueryParam("includeSourceCredentials", qIncludeSourceCredentials); 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.RequestInitiatorType != nil { - - // header param requestInitiatorType - if err := r.SetHeaderParam("requestInitiatorType", *o.RequestInitiatorType); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionSources binds the parameter tenantIds -func (o *GetProtectionSourcesParams) 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/client/source/get_protection_sources_responses.go b/v2/client/source/get_protection_sources_responses.go deleted file mode 100644 index 44bbf330..00000000 --- a/v2/client/source/get_protection_sources_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionSourcesReader is a Reader for the GetProtectionSources structure. -type GetProtectionSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionSourcesDefault(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 - } -} - -// NewGetProtectionSourcesOK creates a GetProtectionSourcesOK with default headers values -func NewGetProtectionSourcesOK() *GetProtectionSourcesOK { - return &GetProtectionSourcesOK{} -} - -/* -GetProtectionSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionSourcesOK struct { - Payload *models.Sources -} - -// IsSuccess returns true when this get protection sources o k response has a 2xx status code -func (o *GetProtectionSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection sources o k response has a 3xx status code -func (o *GetProtectionSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection sources o k response has a 4xx status code -func (o *GetProtectionSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection sources o k response has a 5xx status code -func (o *GetProtectionSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection sources o k response a status code equal to that given -func (o *GetProtectionSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection sources o k response -func (o *GetProtectionSourcesOK) Code() int { - return 200 -} - -func (o *GetProtectionSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources][%d] getProtectionSourcesOK %s", 200, payload) -} - -func (o *GetProtectionSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources][%d] getProtectionSourcesOK %s", 200, payload) -} - -func (o *GetProtectionSourcesOK) GetPayload() *models.Sources { - return o.Payload -} - -func (o *GetProtectionSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Sources) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionSourcesDefault creates a GetProtectionSourcesDefault with default headers values -func NewGetProtectionSourcesDefault(code int) *GetProtectionSourcesDefault { - return &GetProtectionSourcesDefault{ - _statusCode: code, - } -} - -/* -GetProtectionSourcesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionSourcesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection sources default response has a 2xx status code -func (o *GetProtectionSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection sources default response has a 3xx status code -func (o *GetProtectionSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection sources default response has a 4xx status code -func (o *GetProtectionSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection sources default response has a 5xx status code -func (o *GetProtectionSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection sources default response a status code equal to that given -func (o *GetProtectionSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection sources default response -func (o *GetProtectionSourcesDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources][%d] GetProtectionSources default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources][%d] GetProtectionSources default %s", o._statusCode, payload) -} - -func (o *GetProtectionSourcesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionSourcesDefault) 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/source/get_source_attribute_filters_parameters.go b/v2/client/source/get_source_attribute_filters_parameters.go deleted file mode 100644 index 777b31a3..00000000 --- a/v2/client/source/get_source_attribute_filters_parameters.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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" -) - -// NewGetSourceAttributeFiltersParams creates a new GetSourceAttributeFiltersParams 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 NewGetSourceAttributeFiltersParams() *GetSourceAttributeFiltersParams { - return &GetSourceAttributeFiltersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSourceAttributeFiltersParamsWithTimeout creates a new GetSourceAttributeFiltersParams object -// with the ability to set a timeout on a request. -func NewGetSourceAttributeFiltersParamsWithTimeout(timeout time.Duration) *GetSourceAttributeFiltersParams { - return &GetSourceAttributeFiltersParams{ - timeout: timeout, - } -} - -// NewGetSourceAttributeFiltersParamsWithContext creates a new GetSourceAttributeFiltersParams object -// with the ability to set a context for a request. -func NewGetSourceAttributeFiltersParamsWithContext(ctx context.Context) *GetSourceAttributeFiltersParams { - return &GetSourceAttributeFiltersParams{ - Context: ctx, - } -} - -// NewGetSourceAttributeFiltersParamsWithHTTPClient creates a new GetSourceAttributeFiltersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSourceAttributeFiltersParamsWithHTTPClient(client *http.Client) *GetSourceAttributeFiltersParams { - return &GetSourceAttributeFiltersParams{ - HTTPClient: client, - } -} - -/* -GetSourceAttributeFiltersParams contains all the parameters to send to the API endpoint - - for the get source attribute filters operation. - - Typically these are written to a http.Request. -*/ -type GetSourceAttributeFiltersParams struct { - - /* Environment. - - Specifies the environment type of the Protection Source. - */ - Environment *string - - /* SourceUUID. - - Specifies the source UUID of the parent entity. - */ - SourceUUID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get source attribute filters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceAttributeFiltersParams) WithDefaults() *GetSourceAttributeFiltersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get source attribute filters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceAttributeFiltersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) WithTimeout(timeout time.Duration) *GetSourceAttributeFiltersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) WithContext(ctx context.Context) *GetSourceAttributeFiltersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) WithHTTPClient(client *http.Client) *GetSourceAttributeFiltersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnvironment adds the environment to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) WithEnvironment(environment *string) *GetSourceAttributeFiltersParams { - o.SetEnvironment(environment) - return o -} - -// SetEnvironment adds the environment to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) SetEnvironment(environment *string) { - o.Environment = environment -} - -// WithSourceUUID adds the sourceUUID to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) WithSourceUUID(sourceUUID string) *GetSourceAttributeFiltersParams { - o.SetSourceUUID(sourceUUID) - return o -} - -// SetSourceUUID adds the sourceUuid to the get source attribute filters params -func (o *GetSourceAttributeFiltersParams) SetSourceUUID(sourceUUID string) { - o.SourceUUID = sourceUUID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSourceAttributeFiltersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Environment != nil { - - // query param environment - var qrEnvironment string - - if o.Environment != nil { - qrEnvironment = *o.Environment - } - qEnvironment := qrEnvironment - if qEnvironment != "" { - - if err := r.SetQueryParam("environment", qEnvironment); err != nil { - return err - } - } - } - - // query param sourceUuid - qrSourceUUID := o.SourceUUID - qSourceUUID := qrSourceUUID - if qSourceUUID != "" { - - if err := r.SetQueryParam("sourceUuid", qSourceUUID); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/get_source_attribute_filters_responses.go b/v2/client/source/get_source_attribute_filters_responses.go deleted file mode 100644 index 4f89689b..00000000 --- a/v2/client/source/get_source_attribute_filters_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSourceAttributeFiltersReader is a Reader for the GetSourceAttributeFilters structure. -type GetSourceAttributeFiltersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSourceAttributeFiltersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSourceAttributeFiltersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSourceAttributeFiltersDefault(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 - } -} - -// NewGetSourceAttributeFiltersOK creates a GetSourceAttributeFiltersOK with default headers values -func NewGetSourceAttributeFiltersOK() *GetSourceAttributeFiltersOK { - return &GetSourceAttributeFiltersOK{} -} - -/* -GetSourceAttributeFiltersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSourceAttributeFiltersOK struct { - Payload *models.SourceAttributeFiltersResponseParams -} - -// IsSuccess returns true when this get source attribute filters o k response has a 2xx status code -func (o *GetSourceAttributeFiltersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get source attribute filters o k response has a 3xx status code -func (o *GetSourceAttributeFiltersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get source attribute filters o k response has a 4xx status code -func (o *GetSourceAttributeFiltersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get source attribute filters o k response has a 5xx status code -func (o *GetSourceAttributeFiltersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get source attribute filters o k response a status code equal to that given -func (o *GetSourceAttributeFiltersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get source attribute filters o k response -func (o *GetSourceAttributeFiltersOK) Code() int { - return 200 -} - -func (o *GetSourceAttributeFiltersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/filters][%d] getSourceAttributeFiltersOK %s", 200, payload) -} - -func (o *GetSourceAttributeFiltersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/filters][%d] getSourceAttributeFiltersOK %s", 200, payload) -} - -func (o *GetSourceAttributeFiltersOK) GetPayload() *models.SourceAttributeFiltersResponseParams { - return o.Payload -} - -func (o *GetSourceAttributeFiltersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceAttributeFiltersResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSourceAttributeFiltersDefault creates a GetSourceAttributeFiltersDefault with default headers values -func NewGetSourceAttributeFiltersDefault(code int) *GetSourceAttributeFiltersDefault { - return &GetSourceAttributeFiltersDefault{ - _statusCode: code, - } -} - -/* -GetSourceAttributeFiltersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSourceAttributeFiltersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get source attribute filters default response has a 2xx status code -func (o *GetSourceAttributeFiltersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get source attribute filters default response has a 3xx status code -func (o *GetSourceAttributeFiltersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get source attribute filters default response has a 4xx status code -func (o *GetSourceAttributeFiltersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get source attribute filters default response has a 5xx status code -func (o *GetSourceAttributeFiltersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get source attribute filters default response a status code equal to that given -func (o *GetSourceAttributeFiltersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get source attribute filters default response -func (o *GetSourceAttributeFiltersDefault) Code() int { - return o._statusCode -} - -func (o *GetSourceAttributeFiltersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/filters][%d] GetSourceAttributeFilters default %s", o._statusCode, payload) -} - -func (o *GetSourceAttributeFiltersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/filters][%d] GetSourceAttributeFilters default %s", o._statusCode, payload) -} - -func (o *GetSourceAttributeFiltersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSourceAttributeFiltersDefault) 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/source/get_source_registrations_parameters.go b/v2/client/source/get_source_registrations_parameters.go deleted file mode 100644 index 38f77428..00000000 --- a/v2/client/source/get_source_registrations_parameters.go +++ /dev/null @@ -1,390 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewGetSourceRegistrationsParams creates a new GetSourceRegistrationsParams 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 NewGetSourceRegistrationsParams() *GetSourceRegistrationsParams { - return &GetSourceRegistrationsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSourceRegistrationsParamsWithTimeout creates a new GetSourceRegistrationsParams object -// with the ability to set a timeout on a request. -func NewGetSourceRegistrationsParamsWithTimeout(timeout time.Duration) *GetSourceRegistrationsParams { - return &GetSourceRegistrationsParams{ - timeout: timeout, - } -} - -// NewGetSourceRegistrationsParamsWithContext creates a new GetSourceRegistrationsParams object -// with the ability to set a context for a request. -func NewGetSourceRegistrationsParamsWithContext(ctx context.Context) *GetSourceRegistrationsParams { - return &GetSourceRegistrationsParams{ - Context: ctx, - } -} - -// NewGetSourceRegistrationsParamsWithHTTPClient creates a new GetSourceRegistrationsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSourceRegistrationsParamsWithHTTPClient(client *http.Client) *GetSourceRegistrationsParams { - return &GetSourceRegistrationsParams{ - HTTPClient: client, - } -} - -/* -GetSourceRegistrationsParams contains all the parameters to send to the API endpoint - - for the get source registrations operation. - - Typically these are written to a http.Request. -*/ -type GetSourceRegistrationsParams struct { - - /* EncryptionKey. - - Specifies the key to be used to encrypt the source credential. If includeSourceCredentials is set to true this key must be specified. - */ - EncryptionKey *string - - /* Ids. - - Ids specifies the list of source registration ids to return. If left empty, every source registration will be returned by default. - */ - Ids []int64 - - /* IncludeExternalMetadata. - - If true, the external entity metadata like maintenance mode config for the registered sources will be included. - */ - IncludeExternalMetadata *bool - - /* IncludeSourceCredentials. - - If true, the encrypted crednetial for the registered sources will be included. Credential is first encrypted with internal key and then reencrypted with user supplied encryption key. - */ - IncludeSourceCredentials *bool - - /* IncludeTenants. - - If true, the response will include Registrations which were created by all tenants which the current user has permission to see. If false, then only Registrations created by the current user will be returned. - */ - IncludeTenants *bool - - /* 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 from the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get source registrations params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceRegistrationsParams) WithDefaults() *GetSourceRegistrationsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get source registrations params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSourceRegistrationsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get source registrations params -func (o *GetSourceRegistrationsParams) WithTimeout(timeout time.Duration) *GetSourceRegistrationsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get source registrations params -func (o *GetSourceRegistrationsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get source registrations params -func (o *GetSourceRegistrationsParams) WithContext(ctx context.Context) *GetSourceRegistrationsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get source registrations params -func (o *GetSourceRegistrationsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get source registrations params -func (o *GetSourceRegistrationsParams) WithHTTPClient(client *http.Client) *GetSourceRegistrationsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get source registrations params -func (o *GetSourceRegistrationsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEncryptionKey adds the encryptionKey to the get source registrations params -func (o *GetSourceRegistrationsParams) WithEncryptionKey(encryptionKey *string) *GetSourceRegistrationsParams { - o.SetEncryptionKey(encryptionKey) - return o -} - -// SetEncryptionKey adds the encryptionKey to the get source registrations params -func (o *GetSourceRegistrationsParams) SetEncryptionKey(encryptionKey *string) { - o.EncryptionKey = encryptionKey -} - -// WithIds adds the ids to the get source registrations params -func (o *GetSourceRegistrationsParams) WithIds(ids []int64) *GetSourceRegistrationsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get source registrations params -func (o *GetSourceRegistrationsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeExternalMetadata adds the includeExternalMetadata to the get source registrations params -func (o *GetSourceRegistrationsParams) WithIncludeExternalMetadata(includeExternalMetadata *bool) *GetSourceRegistrationsParams { - o.SetIncludeExternalMetadata(includeExternalMetadata) - return o -} - -// SetIncludeExternalMetadata adds the includeExternalMetadata to the get source registrations params -func (o *GetSourceRegistrationsParams) SetIncludeExternalMetadata(includeExternalMetadata *bool) { - o.IncludeExternalMetadata = includeExternalMetadata -} - -// WithIncludeSourceCredentials adds the includeSourceCredentials to the get source registrations params -func (o *GetSourceRegistrationsParams) WithIncludeSourceCredentials(includeSourceCredentials *bool) *GetSourceRegistrationsParams { - o.SetIncludeSourceCredentials(includeSourceCredentials) - return o -} - -// SetIncludeSourceCredentials adds the includeSourceCredentials to the get source registrations params -func (o *GetSourceRegistrationsParams) SetIncludeSourceCredentials(includeSourceCredentials *bool) { - o.IncludeSourceCredentials = includeSourceCredentials -} - -// WithIncludeTenants adds the includeTenants to the get source registrations params -func (o *GetSourceRegistrationsParams) WithIncludeTenants(includeTenants *bool) *GetSourceRegistrationsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get source registrations params -func (o *GetSourceRegistrationsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithTenantIds adds the tenantIds to the get source registrations params -func (o *GetSourceRegistrationsParams) WithTenantIds(tenantIds []string) *GetSourceRegistrationsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get source registrations params -func (o *GetSourceRegistrationsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get source registrations params -func (o *GetSourceRegistrationsParams) WithUseCachedData(useCachedData *bool) *GetSourceRegistrationsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get source registrations params -func (o *GetSourceRegistrationsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSourceRegistrationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EncryptionKey != nil { - - // query param encryptionKey - var qrEncryptionKey string - - if o.EncryptionKey != nil { - qrEncryptionKey = *o.EncryptionKey - } - qEncryptionKey := qrEncryptionKey - if qEncryptionKey != "" { - - if err := r.SetQueryParam("encryptionKey", qEncryptionKey); err != nil { - return err - } - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeExternalMetadata != nil { - - // query param includeExternalMetadata - var qrIncludeExternalMetadata bool - - if o.IncludeExternalMetadata != nil { - qrIncludeExternalMetadata = *o.IncludeExternalMetadata - } - qIncludeExternalMetadata := swag.FormatBool(qrIncludeExternalMetadata) - if qIncludeExternalMetadata != "" { - - if err := r.SetQueryParam("includeExternalMetadata", qIncludeExternalMetadata); err != nil { - return err - } - } - } - - if o.IncludeSourceCredentials != nil { - - // query param includeSourceCredentials - var qrIncludeSourceCredentials bool - - if o.IncludeSourceCredentials != nil { - qrIncludeSourceCredentials = *o.IncludeSourceCredentials - } - qIncludeSourceCredentials := swag.FormatBool(qrIncludeSourceCredentials) - if qIncludeSourceCredentials != "" { - - if err := r.SetQueryParam("includeSourceCredentials", qIncludeSourceCredentials); 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.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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSourceRegistrations binds the parameter ids -func (o *GetSourceRegistrationsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetSourceRegistrations binds the parameter tenantIds -func (o *GetSourceRegistrationsParams) 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/client/source/get_source_registrations_responses.go b/v2/client/source/get_source_registrations_responses.go deleted file mode 100644 index d3df170e..00000000 --- a/v2/client/source/get_source_registrations_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSourceRegistrationsReader is a Reader for the GetSourceRegistrations structure. -type GetSourceRegistrationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSourceRegistrationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSourceRegistrationsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSourceRegistrationsDefault(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 - } -} - -// NewGetSourceRegistrationsOK creates a GetSourceRegistrationsOK with default headers values -func NewGetSourceRegistrationsOK() *GetSourceRegistrationsOK { - return &GetSourceRegistrationsOK{} -} - -/* -GetSourceRegistrationsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSourceRegistrationsOK struct { - Payload *models.SourceRegistrations -} - -// IsSuccess returns true when this get source registrations o k response has a 2xx status code -func (o *GetSourceRegistrationsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get source registrations o k response has a 3xx status code -func (o *GetSourceRegistrationsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get source registrations o k response has a 4xx status code -func (o *GetSourceRegistrationsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get source registrations o k response has a 5xx status code -func (o *GetSourceRegistrationsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get source registrations o k response a status code equal to that given -func (o *GetSourceRegistrationsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get source registrations o k response -func (o *GetSourceRegistrationsOK) Code() int { - return 200 -} - -func (o *GetSourceRegistrationsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations][%d] getSourceRegistrationsOK %s", 200, payload) -} - -func (o *GetSourceRegistrationsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations][%d] getSourceRegistrationsOK %s", 200, payload) -} - -func (o *GetSourceRegistrationsOK) GetPayload() *models.SourceRegistrations { - return o.Payload -} - -func (o *GetSourceRegistrationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceRegistrations) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSourceRegistrationsDefault creates a GetSourceRegistrationsDefault with default headers values -func NewGetSourceRegistrationsDefault(code int) *GetSourceRegistrationsDefault { - return &GetSourceRegistrationsDefault{ - _statusCode: code, - } -} - -/* -GetSourceRegistrationsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSourceRegistrationsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get source registrations default response has a 2xx status code -func (o *GetSourceRegistrationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get source registrations default response has a 3xx status code -func (o *GetSourceRegistrationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get source registrations default response has a 4xx status code -func (o *GetSourceRegistrationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get source registrations default response has a 5xx status code -func (o *GetSourceRegistrationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get source registrations default response a status code equal to that given -func (o *GetSourceRegistrationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get source registrations default response -func (o *GetSourceRegistrationsDefault) Code() int { - return o._statusCode -} - -func (o *GetSourceRegistrationsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations][%d] GetSourceRegistrations default %s", o._statusCode, payload) -} - -func (o *GetSourceRegistrationsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/registrations][%d] GetSourceRegistrations default %s", o._statusCode, payload) -} - -func (o *GetSourceRegistrationsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSourceRegistrationsDefault) 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/source/get_vdc_details_parameters.go b/v2/client/source/get_vdc_details_parameters.go deleted file mode 100644 index 263c1b31..00000000 --- a/v2/client/source/get_vdc_details_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewGetVdcDetailsParams creates a new GetVdcDetailsParams 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 NewGetVdcDetailsParams() *GetVdcDetailsParams { - return &GetVdcDetailsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetVdcDetailsParamsWithTimeout creates a new GetVdcDetailsParams object -// with the ability to set a timeout on a request. -func NewGetVdcDetailsParamsWithTimeout(timeout time.Duration) *GetVdcDetailsParams { - return &GetVdcDetailsParams{ - timeout: timeout, - } -} - -// NewGetVdcDetailsParamsWithContext creates a new GetVdcDetailsParams object -// with the ability to set a context for a request. -func NewGetVdcDetailsParamsWithContext(ctx context.Context) *GetVdcDetailsParams { - return &GetVdcDetailsParams{ - Context: ctx, - } -} - -// NewGetVdcDetailsParamsWithHTTPClient creates a new GetVdcDetailsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetVdcDetailsParamsWithHTTPClient(client *http.Client) *GetVdcDetailsParams { - return &GetVdcDetailsParams{ - HTTPClient: client, - } -} - -/* -GetVdcDetailsParams contains all the parameters to send to the API endpoint - - for the get vdc details operation. - - Typically these are written to a http.Request. -*/ -type GetVdcDetailsParams struct { - - /* ID. - - Specifies the ID of the VMware virtual datacenter. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get vdc details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVdcDetailsParams) WithDefaults() *GetVdcDetailsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get vdc details params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetVdcDetailsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get vdc details params -func (o *GetVdcDetailsParams) WithTimeout(timeout time.Duration) *GetVdcDetailsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get vdc details params -func (o *GetVdcDetailsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get vdc details params -func (o *GetVdcDetailsParams) WithContext(ctx context.Context) *GetVdcDetailsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get vdc details params -func (o *GetVdcDetailsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get vdc details params -func (o *GetVdcDetailsParams) WithHTTPClient(client *http.Client) *GetVdcDetailsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get vdc details params -func (o *GetVdcDetailsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get vdc details params -func (o *GetVdcDetailsParams) WithID(id int64) *GetVdcDetailsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get vdc details params -func (o *GetVdcDetailsParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVdcDetailsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/get_vdc_details_responses.go b/v2/client/source/get_vdc_details_responses.go deleted file mode 100644 index 0cec5141..00000000 --- a/v2/client/source/get_vdc_details_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetVdcDetailsReader is a Reader for the GetVdcDetails structure. -type GetVdcDetailsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVdcDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVdcDetailsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVdcDetailsDefault(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 - } -} - -// NewGetVdcDetailsOK creates a GetVdcDetailsOK with default headers values -func NewGetVdcDetailsOK() *GetVdcDetailsOK { - return &GetVdcDetailsOK{} -} - -/* -GetVdcDetailsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetVdcDetailsOK struct { - Payload *models.VdcObject -} - -// IsSuccess returns true when this get vdc details o k response has a 2xx status code -func (o *GetVdcDetailsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get vdc details o k response has a 3xx status code -func (o *GetVdcDetailsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get vdc details o k response has a 4xx status code -func (o *GetVdcDetailsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get vdc details o k response has a 5xx status code -func (o *GetVdcDetailsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get vdc details o k response a status code equal to that given -func (o *GetVdcDetailsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get vdc details o k response -func (o *GetVdcDetailsOK) Code() int { - return 200 -} - -func (o *GetVdcDetailsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/virtual-datacenter/{id}][%d] getVdcDetailsOK %s", 200, payload) -} - -func (o *GetVdcDetailsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/virtual-datacenter/{id}][%d] getVdcDetailsOK %s", 200, payload) -} - -func (o *GetVdcDetailsOK) GetPayload() *models.VdcObject { - return o.Payload -} - -func (o *GetVdcDetailsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.VdcObject) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVdcDetailsDefault creates a GetVdcDetailsDefault with default headers values -func NewGetVdcDetailsDefault(code int) *GetVdcDetailsDefault { - return &GetVdcDetailsDefault{ - _statusCode: code, - } -} - -/* -GetVdcDetailsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetVdcDetailsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get vdc details default response has a 2xx status code -func (o *GetVdcDetailsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get vdc details default response has a 3xx status code -func (o *GetVdcDetailsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get vdc details default response has a 4xx status code -func (o *GetVdcDetailsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get vdc details default response has a 5xx status code -func (o *GetVdcDetailsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get vdc details default response a status code equal to that given -func (o *GetVdcDetailsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get vdc details default response -func (o *GetVdcDetailsDefault) Code() int { - return o._statusCode -} - -func (o *GetVdcDetailsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/virtual-datacenter/{id}][%d] GetVdcDetails default %s", o._statusCode, payload) -} - -func (o *GetVdcDetailsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/virtual-datacenter/{id}][%d] GetVdcDetails default %s", o._statusCode, payload) -} - -func (o *GetVdcDetailsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetVdcDetailsDefault) 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/source/patch_protection_source_registration_parameters.go b/v2/client/source/patch_protection_source_registration_parameters.go deleted file mode 100644 index 6357bd6f..00000000 --- a/v2/client/source/patch_protection_source_registration_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPatchProtectionSourceRegistrationParams creates a new PatchProtectionSourceRegistrationParams 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 NewPatchProtectionSourceRegistrationParams() *PatchProtectionSourceRegistrationParams { - return &PatchProtectionSourceRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchProtectionSourceRegistrationParamsWithTimeout creates a new PatchProtectionSourceRegistrationParams object -// with the ability to set a timeout on a request. -func NewPatchProtectionSourceRegistrationParamsWithTimeout(timeout time.Duration) *PatchProtectionSourceRegistrationParams { - return &PatchProtectionSourceRegistrationParams{ - timeout: timeout, - } -} - -// NewPatchProtectionSourceRegistrationParamsWithContext creates a new PatchProtectionSourceRegistrationParams object -// with the ability to set a context for a request. -func NewPatchProtectionSourceRegistrationParamsWithContext(ctx context.Context) *PatchProtectionSourceRegistrationParams { - return &PatchProtectionSourceRegistrationParams{ - Context: ctx, - } -} - -// NewPatchProtectionSourceRegistrationParamsWithHTTPClient creates a new PatchProtectionSourceRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchProtectionSourceRegistrationParamsWithHTTPClient(client *http.Client) *PatchProtectionSourceRegistrationParams { - return &PatchProtectionSourceRegistrationParams{ - HTTPClient: client, - } -} - -/* -PatchProtectionSourceRegistrationParams contains all the parameters to send to the API endpoint - - for the patch protection source registration operation. - - Typically these are written to a http.Request. -*/ -type PatchProtectionSourceRegistrationParams struct { - - /* Body. - - Specifies the parameters to partially update the registration. - */ - Body *models.SourceRegistrationPatchRequestParams - - /* ID. - - Specifies the id of the Protection Source registration. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchProtectionSourceRegistrationParams) WithDefaults() *PatchProtectionSourceRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchProtectionSourceRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) WithTimeout(timeout time.Duration) *PatchProtectionSourceRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) WithContext(ctx context.Context) *PatchProtectionSourceRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) WithHTTPClient(client *http.Client) *PatchProtectionSourceRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) WithBody(body *models.SourceRegistrationPatchRequestParams) *PatchProtectionSourceRegistrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) SetBody(body *models.SourceRegistrationPatchRequestParams) { - o.Body = body -} - -// WithID adds the id to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) WithID(id int64) *PatchProtectionSourceRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the patch protection source registration params -func (o *PatchProtectionSourceRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchProtectionSourceRegistrationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/patch_protection_source_registration_responses.go b/v2/client/source/patch_protection_source_registration_responses.go deleted file mode 100644 index 0ed67bf9..00000000 --- a/v2/client/source/patch_protection_source_registration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PatchProtectionSourceRegistrationReader is a Reader for the PatchProtectionSourceRegistration structure. -type PatchProtectionSourceRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchProtectionSourceRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchProtectionSourceRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPatchProtectionSourceRegistrationDefault(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 - } -} - -// NewPatchProtectionSourceRegistrationOK creates a PatchProtectionSourceRegistrationOK with default headers values -func NewPatchProtectionSourceRegistrationOK() *PatchProtectionSourceRegistrationOK { - return &PatchProtectionSourceRegistrationOK{} -} - -/* -PatchProtectionSourceRegistrationOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchProtectionSourceRegistrationOK struct { - Payload *models.SourceRegistration -} - -// IsSuccess returns true when this patch protection source registration o k response has a 2xx status code -func (o *PatchProtectionSourceRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch protection source registration o k response has a 3xx status code -func (o *PatchProtectionSourceRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch protection source registration o k response has a 4xx status code -func (o *PatchProtectionSourceRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch protection source registration o k response has a 5xx status code -func (o *PatchProtectionSourceRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch protection source registration o k response a status code equal to that given -func (o *PatchProtectionSourceRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the patch protection source registration o k response -func (o *PatchProtectionSourceRegistrationOK) Code() int { - return 200 -} - -func (o *PatchProtectionSourceRegistrationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /data-protect/sources/registrations/{id}][%d] patchProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *PatchProtectionSourceRegistrationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /data-protect/sources/registrations/{id}][%d] patchProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *PatchProtectionSourceRegistrationOK) GetPayload() *models.SourceRegistration { - return o.Payload -} - -func (o *PatchProtectionSourceRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceRegistration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchProtectionSourceRegistrationDefault creates a PatchProtectionSourceRegistrationDefault with default headers values -func NewPatchProtectionSourceRegistrationDefault(code int) *PatchProtectionSourceRegistrationDefault { - return &PatchProtectionSourceRegistrationDefault{ - _statusCode: code, - } -} - -/* -PatchProtectionSourceRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type PatchProtectionSourceRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this patch protection source registration default response has a 2xx status code -func (o *PatchProtectionSourceRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this patch protection source registration default response has a 3xx status code -func (o *PatchProtectionSourceRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this patch protection source registration default response has a 4xx status code -func (o *PatchProtectionSourceRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this patch protection source registration default response has a 5xx status code -func (o *PatchProtectionSourceRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this patch protection source registration default response a status code equal to that given -func (o *PatchProtectionSourceRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the patch protection source registration default response -func (o *PatchProtectionSourceRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *PatchProtectionSourceRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /data-protect/sources/registrations/{id}][%d] PatchProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *PatchProtectionSourceRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /data-protect/sources/registrations/{id}][%d] PatchProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *PatchProtectionSourceRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PatchProtectionSourceRegistrationDefault) 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/source/protection_source_by_id_parameters.go b/v2/client/source/protection_source_by_id_parameters.go deleted file mode 100644 index 44d4811e..00000000 --- a/v2/client/source/protection_source_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewProtectionSourceByIDParams creates a new ProtectionSourceByIDParams 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 NewProtectionSourceByIDParams() *ProtectionSourceByIDParams { - return &ProtectionSourceByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewProtectionSourceByIDParamsWithTimeout creates a new ProtectionSourceByIDParams object -// with the ability to set a timeout on a request. -func NewProtectionSourceByIDParamsWithTimeout(timeout time.Duration) *ProtectionSourceByIDParams { - return &ProtectionSourceByIDParams{ - timeout: timeout, - } -} - -// NewProtectionSourceByIDParamsWithContext creates a new ProtectionSourceByIDParams object -// with the ability to set a context for a request. -func NewProtectionSourceByIDParamsWithContext(ctx context.Context) *ProtectionSourceByIDParams { - return &ProtectionSourceByIDParams{ - Context: ctx, - } -} - -// NewProtectionSourceByIDParamsWithHTTPClient creates a new ProtectionSourceByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewProtectionSourceByIDParamsWithHTTPClient(client *http.Client) *ProtectionSourceByIDParams { - return &ProtectionSourceByIDParams{ - HTTPClient: client, - } -} - -/* -ProtectionSourceByIDParams contains all the parameters to send to the API endpoint - - for the protection source by Id operation. - - Typically these are written to a http.Request. -*/ -type ProtectionSourceByIDParams struct { - - /* ID. - - Specifies the id of the Protection Source. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectionSourceByIDParams) WithDefaults() *ProtectionSourceByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ProtectionSourceByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the protection source by Id params -func (o *ProtectionSourceByIDParams) WithTimeout(timeout time.Duration) *ProtectionSourceByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the protection source by Id params -func (o *ProtectionSourceByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the protection source by Id params -func (o *ProtectionSourceByIDParams) WithContext(ctx context.Context) *ProtectionSourceByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the protection source by Id params -func (o *ProtectionSourceByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the protection source by Id params -func (o *ProtectionSourceByIDParams) WithHTTPClient(client *http.Client) *ProtectionSourceByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the protection source by Id params -func (o *ProtectionSourceByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the protection source by Id params -func (o *ProtectionSourceByIDParams) WithID(id int64) *ProtectionSourceByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the protection source by Id params -func (o *ProtectionSourceByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ProtectionSourceByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/protection_source_by_id_responses.go b/v2/client/source/protection_source_by_id_responses.go deleted file mode 100644 index 984f6b6b..00000000 --- a/v2/client/source/protection_source_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ProtectionSourceByIDReader is a Reader for the ProtectionSourceByID structure. -type ProtectionSourceByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ProtectionSourceByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewProtectionSourceByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewProtectionSourceByIDDefault(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 - } -} - -// NewProtectionSourceByIDOK creates a ProtectionSourceByIDOK with default headers values -func NewProtectionSourceByIDOK() *ProtectionSourceByIDOK { - return &ProtectionSourceByIDOK{} -} - -/* -ProtectionSourceByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type ProtectionSourceByIDOK struct { - Payload *models.Source -} - -// IsSuccess returns true when this protection source by Id o k response has a 2xx status code -func (o *ProtectionSourceByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this protection source by Id o k response has a 3xx status code -func (o *ProtectionSourceByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this protection source by Id o k response has a 4xx status code -func (o *ProtectionSourceByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this protection source by Id o k response has a 5xx status code -func (o *ProtectionSourceByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this protection source by Id o k response a status code equal to that given -func (o *ProtectionSourceByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the protection source by Id o k response -func (o *ProtectionSourceByIDOK) Code() int { - return 200 -} - -func (o *ProtectionSourceByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{id}][%d] protectionSourceByIdOK %s", 200, payload) -} - -func (o *ProtectionSourceByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{id}][%d] protectionSourceByIdOK %s", 200, payload) -} - -func (o *ProtectionSourceByIDOK) GetPayload() *models.Source { - return o.Payload -} - -func (o *ProtectionSourceByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Source) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewProtectionSourceByIDDefault creates a ProtectionSourceByIDDefault with default headers values -func NewProtectionSourceByIDDefault(code int) *ProtectionSourceByIDDefault { - return &ProtectionSourceByIDDefault{ - _statusCode: code, - } -} - -/* -ProtectionSourceByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type ProtectionSourceByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this protection source by Id default response has a 2xx status code -func (o *ProtectionSourceByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this protection source by Id default response has a 3xx status code -func (o *ProtectionSourceByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this protection source by Id default response has a 4xx status code -func (o *ProtectionSourceByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this protection source by Id default response has a 5xx status code -func (o *ProtectionSourceByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this protection source by Id default response a status code equal to that given -func (o *ProtectionSourceByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the protection source by Id default response -func (o *ProtectionSourceByIDDefault) Code() int { - return o._statusCode -} - -func (o *ProtectionSourceByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{id}][%d] ProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *ProtectionSourceByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/sources/{id}][%d] ProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *ProtectionSourceByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ProtectionSourceByIDDefault) 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/source/refresh_protection_source_by_id_parameters.go b/v2/client/source/refresh_protection_source_by_id_parameters.go deleted file mode 100644 index 80dbc09e..00000000 --- a/v2/client/source/refresh_protection_source_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" -) - -// NewRefreshProtectionSourceByIDParams creates a new RefreshProtectionSourceByIDParams 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 NewRefreshProtectionSourceByIDParams() *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRefreshProtectionSourceByIDParamsWithTimeout creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a timeout on a request. -func NewRefreshProtectionSourceByIDParamsWithTimeout(timeout time.Duration) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - timeout: timeout, - } -} - -// NewRefreshProtectionSourceByIDParamsWithContext creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a context for a request. -func NewRefreshProtectionSourceByIDParamsWithContext(ctx context.Context) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - Context: ctx, - } -} - -// NewRefreshProtectionSourceByIDParamsWithHTTPClient creates a new RefreshProtectionSourceByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewRefreshProtectionSourceByIDParamsWithHTTPClient(client *http.Client) *RefreshProtectionSourceByIDParams { - return &RefreshProtectionSourceByIDParams{ - HTTPClient: client, - } -} - -/* -RefreshProtectionSourceByIDParams contains all the parameters to send to the API endpoint - - for the refresh protection source by Id operation. - - Typically these are written to a http.Request. -*/ -type RefreshProtectionSourceByIDParams struct { - - /* ID. - - Specifies the id of the Protection Source. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the refresh protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RefreshProtectionSourceByIDParams) WithDefaults() *RefreshProtectionSourceByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the refresh protection source by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RefreshProtectionSourceByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithTimeout(timeout time.Duration) *RefreshProtectionSourceByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithContext(ctx context.Context) *RefreshProtectionSourceByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithHTTPClient(client *http.Client) *RefreshProtectionSourceByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) WithID(id int64) *RefreshProtectionSourceByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the refresh protection source by Id params -func (o *RefreshProtectionSourceByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RefreshProtectionSourceByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/refresh_protection_source_by_id_responses.go b/v2/client/source/refresh_protection_source_by_id_responses.go deleted file mode 100644 index 62d746c8..00000000 --- a/v2/client/source/refresh_protection_source_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RefreshProtectionSourceByIDReader is a Reader for the RefreshProtectionSourceByID structure. -type RefreshProtectionSourceByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RefreshProtectionSourceByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRefreshProtectionSourceByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRefreshProtectionSourceByIDDefault(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 - } -} - -// NewRefreshProtectionSourceByIDNoContent creates a RefreshProtectionSourceByIDNoContent with default headers values -func NewRefreshProtectionSourceByIDNoContent() *RefreshProtectionSourceByIDNoContent { - return &RefreshProtectionSourceByIDNoContent{} -} - -/* -RefreshProtectionSourceByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RefreshProtectionSourceByIDNoContent struct { -} - -// IsSuccess returns true when this refresh protection source by Id no content response has a 2xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this refresh protection source by Id no content response has a 3xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this refresh protection source by Id no content response has a 4xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this refresh protection source by Id no content response has a 5xx status code -func (o *RefreshProtectionSourceByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this refresh protection source by Id no content response a status code equal to that given -func (o *RefreshProtectionSourceByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the refresh protection source by Id no content response -func (o *RefreshProtectionSourceByIDNoContent) Code() int { - return 204 -} - -func (o *RefreshProtectionSourceByIDNoContent) Error() string { - return fmt.Sprintf("[POST /data-protect/sources/{id}/refresh][%d] refreshProtectionSourceByIdNoContent", 204) -} - -func (o *RefreshProtectionSourceByIDNoContent) String() string { - return fmt.Sprintf("[POST /data-protect/sources/{id}/refresh][%d] refreshProtectionSourceByIdNoContent", 204) -} - -func (o *RefreshProtectionSourceByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRefreshProtectionSourceByIDDefault creates a RefreshProtectionSourceByIDDefault with default headers values -func NewRefreshProtectionSourceByIDDefault(code int) *RefreshProtectionSourceByIDDefault { - return &RefreshProtectionSourceByIDDefault{ - _statusCode: code, - } -} - -/* -RefreshProtectionSourceByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type RefreshProtectionSourceByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this refresh protection source by Id default response has a 2xx status code -func (o *RefreshProtectionSourceByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this refresh protection source by Id default response has a 3xx status code -func (o *RefreshProtectionSourceByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this refresh protection source by Id default response has a 4xx status code -func (o *RefreshProtectionSourceByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this refresh protection source by Id default response has a 5xx status code -func (o *RefreshProtectionSourceByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this refresh protection source by Id default response a status code equal to that given -func (o *RefreshProtectionSourceByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the refresh protection source by Id default response -func (o *RefreshProtectionSourceByIDDefault) Code() int { - return o._statusCode -} - -func (o *RefreshProtectionSourceByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/{id}/refresh][%d] RefreshProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *RefreshProtectionSourceByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/{id}/refresh][%d] RefreshProtectionSourceById default %s", o._statusCode, payload) -} - -func (o *RefreshProtectionSourceByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RefreshProtectionSourceByIDDefault) 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/source/register_protection_source_parameters.go b/v2/client/source/register_protection_source_parameters.go deleted file mode 100644 index a58e9d4f..00000000 --- a/v2/client/source/register_protection_source_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterProtectionSourceParams creates a new RegisterProtectionSourceParams 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 NewRegisterProtectionSourceParams() *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterProtectionSourceParamsWithTimeout creates a new RegisterProtectionSourceParams object -// with the ability to set a timeout on a request. -func NewRegisterProtectionSourceParamsWithTimeout(timeout time.Duration) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - timeout: timeout, - } -} - -// NewRegisterProtectionSourceParamsWithContext creates a new RegisterProtectionSourceParams object -// with the ability to set a context for a request. -func NewRegisterProtectionSourceParamsWithContext(ctx context.Context) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - Context: ctx, - } -} - -// NewRegisterProtectionSourceParamsWithHTTPClient creates a new RegisterProtectionSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterProtectionSourceParamsWithHTTPClient(client *http.Client) *RegisterProtectionSourceParams { - return &RegisterProtectionSourceParams{ - HTTPClient: client, - } -} - -/* -RegisterProtectionSourceParams contains all the parameters to send to the API endpoint - - for the register protection source operation. - - Typically these are written to a http.Request. -*/ -type RegisterProtectionSourceParams struct { - - /* Body. - - Specifies the parameters to register a Protection Source. - */ - Body *models.SourceRegistrationRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterProtectionSourceParams) WithDefaults() *RegisterProtectionSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterProtectionSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register protection source params -func (o *RegisterProtectionSourceParams) WithTimeout(timeout time.Duration) *RegisterProtectionSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register protection source params -func (o *RegisterProtectionSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register protection source params -func (o *RegisterProtectionSourceParams) WithContext(ctx context.Context) *RegisterProtectionSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register protection source params -func (o *RegisterProtectionSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register protection source params -func (o *RegisterProtectionSourceParams) WithHTTPClient(client *http.Client) *RegisterProtectionSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register protection source params -func (o *RegisterProtectionSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register protection source params -func (o *RegisterProtectionSourceParams) WithBody(body *models.SourceRegistrationRequestParams) *RegisterProtectionSourceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register protection source params -func (o *RegisterProtectionSourceParams) SetBody(body *models.SourceRegistrationRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterProtectionSourceParams) 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/source/register_protection_source_responses.go b/v2/client/source/register_protection_source_responses.go deleted file mode 100644 index 4c6b282f..00000000 --- a/v2/client/source/register_protection_source_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterProtectionSourceReader is a Reader for the RegisterProtectionSource structure. -type RegisterProtectionSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterProtectionSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegisterProtectionSourceCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterProtectionSourceDefault(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 - } -} - -// NewRegisterProtectionSourceCreated creates a RegisterProtectionSourceCreated with default headers values -func NewRegisterProtectionSourceCreated() *RegisterProtectionSourceCreated { - return &RegisterProtectionSourceCreated{} -} - -/* -RegisterProtectionSourceCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegisterProtectionSourceCreated struct { - Payload *models.SourceRegistration -} - -// IsSuccess returns true when this register protection source created response has a 2xx status code -func (o *RegisterProtectionSourceCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register protection source created response has a 3xx status code -func (o *RegisterProtectionSourceCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register protection source created response has a 4xx status code -func (o *RegisterProtectionSourceCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this register protection source created response has a 5xx status code -func (o *RegisterProtectionSourceCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this register protection source created response a status code equal to that given -func (o *RegisterProtectionSourceCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the register protection source created response -func (o *RegisterProtectionSourceCreated) Code() int { - return 201 -} - -func (o *RegisterProtectionSourceCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/registrations][%d] registerProtectionSourceCreated %s", 201, payload) -} - -func (o *RegisterProtectionSourceCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/registrations][%d] registerProtectionSourceCreated %s", 201, payload) -} - -func (o *RegisterProtectionSourceCreated) GetPayload() *models.SourceRegistration { - return o.Payload -} - -func (o *RegisterProtectionSourceCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceRegistration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterProtectionSourceDefault creates a RegisterProtectionSourceDefault with default headers values -func NewRegisterProtectionSourceDefault(code int) *RegisterProtectionSourceDefault { - return &RegisterProtectionSourceDefault{ - _statusCode: code, - } -} - -/* -RegisterProtectionSourceDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterProtectionSourceDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register protection source default response has a 2xx status code -func (o *RegisterProtectionSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register protection source default response has a 3xx status code -func (o *RegisterProtectionSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register protection source default response has a 4xx status code -func (o *RegisterProtectionSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register protection source default response has a 5xx status code -func (o *RegisterProtectionSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register protection source default response a status code equal to that given -func (o *RegisterProtectionSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register protection source default response -func (o *RegisterProtectionSourceDefault) Code() int { - return o._statusCode -} - -func (o *RegisterProtectionSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/registrations][%d] RegisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *RegisterProtectionSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/registrations][%d] RegisterProtectionSource default %s", o._statusCode, payload) -} - -func (o *RegisterProtectionSourceDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterProtectionSourceDefault) 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/source/source_client.go b/v2/client/source/source_client.go deleted file mode 100644 index c1f4db2c..00000000 --- a/v2/client/source/source_client.go +++ /dev/null @@ -1,735 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new source API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new source API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new source API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for source API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateAzureApplications(params *CreateAzureApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAzureApplicationsCreated, error) - - CreateOrUpdateAzureApplications(params *CreateOrUpdateAzureApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateOrUpdateAzureApplicationsCreated, error) - - DeleteProtectionSourceRegistration(params *DeleteProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionSourceRegistrationNoContent, error) - - GenerateM365DeviceAccessToken(params *GenerateM365DeviceAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateM365DeviceAccessTokenCreated, error) - - GenerateM365DeviceCode(params *GenerateM365DeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateM365DeviceCodeCreated, error) - - GetProtectionSourceRegistration(params *GetProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourceRegistrationOK, error) - - GetProtectionSources(params *GetProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesOK, error) - - GetSourceAttributeFilters(params *GetSourceAttributeFiltersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceAttributeFiltersOK, error) - - GetSourceRegistrations(params *GetSourceRegistrationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceRegistrationsOK, error) - - GetVdcDetails(params *GetVdcDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVdcDetailsOK, error) - - PatchProtectionSourceRegistration(params *PatchProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchProtectionSourceRegistrationOK, error) - - ProtectionSourceByID(params *ProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectionSourceByIDOK, error) - - RefreshProtectionSourceByID(params *RefreshProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RefreshProtectionSourceByIDNoContent, error) - - RegisterProtectionSource(params *RegisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterProtectionSourceCreated, error) - - TestConnectionProtectionSource(params *TestConnectionProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TestConnectionProtectionSourceOK, error) - - UpdateProtectionSourceRegistration(params *UpdateProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionSourceRegistrationOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateAzureApplications creates microsoft 365 azure applications for a given domain - -Creates Microsoft 365 Azure Applications -*/ -func (a *Client) CreateAzureApplications(params *CreateAzureApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAzureApplicationsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateAzureApplicationsParams() - } - op := &runtime.ClientOperation{ - ID: "CreateAzureApplications", - Method: "POST", - PathPattern: "/data-protect/sources/microsoft365/azure-applications", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateAzureApplicationsReader{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.(*CreateAzureApplicationsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateAzureApplicationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateOrUpdateAzureApplications creates update microsoft 365 azure applications for a given domain - -Creates/Updates Microsoft 365 Azure Applications -*/ -func (a *Client) CreateOrUpdateAzureApplications(params *CreateOrUpdateAzureApplicationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateOrUpdateAzureApplicationsCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateOrUpdateAzureApplicationsParams() - } - op := &runtime.ClientOperation{ - ID: "CreateOrUpdateAzureApplications", - Method: "PUT", - PathPattern: "/data-protect/sources/microsoft365/azure-applications", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateOrUpdateAzureApplicationsReader{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.(*CreateOrUpdateAzureApplicationsCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateOrUpdateAzureApplicationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteProtectionSourceRegistration deletes protection source registration - -Delete Protection Source Registration. -*/ -func (a *Client) DeleteProtectionSourceRegistration(params *DeleteProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteProtectionSourceRegistrationNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteProtectionSourceRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteProtectionSourceRegistration", - Method: "DELETE", - PathPattern: "/data-protect/sources/registrations/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteProtectionSourceRegistrationReader{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.(*DeleteProtectionSourceRegistrationNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteProtectionSourceRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GenerateM365DeviceAccessToken generates access token for microsoft365 device authorization grant flow - -Generates the access token if the device code has been granted authorization as part of device login flow. -*/ -func (a *Client) GenerateM365DeviceAccessToken(params *GenerateM365DeviceAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateM365DeviceAccessTokenCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGenerateM365DeviceAccessTokenParams() - } - op := &runtime.ClientOperation{ - ID: "GenerateM365DeviceAccessToken", - Method: "POST", - PathPattern: "/data-protect/sources/microsoft365/auth/token", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GenerateM365DeviceAccessTokenReader{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.(*GenerateM365DeviceAccessTokenCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GenerateM365DeviceAccessTokenDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GenerateM365DeviceCode generates device code for microsoft365 device authorization grant flow - -Generates User and Device code for Microsoft365 Device Authorization Grant for a given domain. -*/ -func (a *Client) GenerateM365DeviceCode(params *GenerateM365DeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateM365DeviceCodeCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGenerateM365DeviceCodeParams() - } - op := &runtime.ClientOperation{ - ID: "GenerateM365DeviceCode", - Method: "POST", - PathPattern: "/data-protect/sources/microsoft365/auth/device-code", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GenerateM365DeviceCodeReader{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.(*GenerateM365DeviceCodeCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GenerateM365DeviceCodeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionSourceRegistration gets a protection source registration - -Get a Protection Source registration. -*/ -func (a *Client) GetProtectionSourceRegistration(params *GetProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourceRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourceRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSourceRegistration", - Method: "GET", - PathPattern: "/data-protect/sources/registrations/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourceRegistrationReader{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.(*GetProtectionSourceRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourceRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionSources gets a list of protection sources - -Get a List of Protection Sources. -*/ -func (a *Client) GetProtectionSources(params *GetProtectionSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionSources", - Method: "GET", - PathPattern: "/data-protect/sources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionSourcesReader{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.(*GetProtectionSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionSourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSourceAttributeFilters lists attribute filters for a source - -Get a List of attribute filters for leaf entities within a a source -*/ -func (a *Client) GetSourceAttributeFilters(params *GetSourceAttributeFiltersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceAttributeFiltersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSourceAttributeFiltersParams() - } - op := &runtime.ClientOperation{ - ID: "GetSourceAttributeFilters", - Method: "GET", - PathPattern: "/data-protect/sources/filters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSourceAttributeFiltersReader{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.(*GetSourceAttributeFiltersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSourceAttributeFiltersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSourceRegistrations gets the list of protection source registrations - -Get the list of Protection Source registrations. -*/ -func (a *Client) GetSourceRegistrations(params *GetSourceRegistrationsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSourceRegistrationsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSourceRegistrationsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSourceRegistrations", - Method: "GET", - PathPattern: "/data-protect/sources/registrations", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSourceRegistrationsReader{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.(*GetSourceRegistrationsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSourceRegistrationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVdcDetails gets v d c details - -Get the details such as catelogs, Org networks associated with a VMware virtual datacenter (VDC). -*/ -func (a *Client) GetVdcDetails(params *GetVdcDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVdcDetailsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVdcDetailsParams() - } - op := &runtime.ClientOperation{ - ID: "GetVdcDetails", - Method: "GET", - PathPattern: "/data-protect/sources/virtual-datacenter/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetVdcDetailsReader{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.(*GetVdcDetailsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVdcDetailsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PatchProtectionSourceRegistration performs partial update on protection source registration currently this API is supported only for cassandra - -Patches a Protection Source. -*/ -func (a *Client) PatchProtectionSourceRegistration(params *PatchProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchProtectionSourceRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchProtectionSourceRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "PatchProtectionSourceRegistration", - Method: "PATCH", - PathPattern: "/data-protect/sources/registrations/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PatchProtectionSourceRegistrationReader{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.(*PatchProtectionSourceRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PatchProtectionSourceRegistrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ProtectionSourceByID gets a protection sources - -Get a Protection Source. -*/ -func (a *Client) ProtectionSourceByID(params *ProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ProtectionSourceByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewProtectionSourceByIDParams() - } - op := &runtime.ClientOperation{ - ID: "ProtectionSourceById", - Method: "GET", - PathPattern: "/data-protect/sources/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ProtectionSourceByIDReader{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.(*ProtectionSourceByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ProtectionSourceByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RefreshProtectionSourceByID refreshes a protection source - -Refresh a Protection Source. -*/ -func (a *Client) RefreshProtectionSourceByID(params *RefreshProtectionSourceByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RefreshProtectionSourceByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRefreshProtectionSourceByIDParams() - } - op := &runtime.ClientOperation{ - ID: "RefreshProtectionSourceById", - Method: "POST", - PathPattern: "/data-protect/sources/{id}/refresh", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RefreshProtectionSourceByIDReader{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.(*RefreshProtectionSourceByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RefreshProtectionSourceByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterProtectionSource registers a protection source - -Register a Protection Source. -*/ -func (a *Client) RegisterProtectionSource(params *RegisterProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterProtectionSourceCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterProtectionSourceParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterProtectionSource", - Method: "POST", - PathPattern: "/data-protect/sources/registrations", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterProtectionSourceReader{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.(*RegisterProtectionSourceCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterProtectionSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -TestConnectionProtectionSource tests connection to a source - -Test connection to a source. -*/ -func (a *Client) TestConnectionProtectionSource(params *TestConnectionProtectionSourceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TestConnectionProtectionSourceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewTestConnectionProtectionSourceParams() - } - op := &runtime.ClientOperation{ - ID: "TestConnectionProtectionSource", - Method: "POST", - PathPattern: "/data-protect/sources/test-connection", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &TestConnectionProtectionSourceReader{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.(*TestConnectionProtectionSourceOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*TestConnectionProtectionSourceDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateProtectionSourceRegistration updates protection source registration - -Update Protection Source registration. -*/ -func (a *Client) UpdateProtectionSourceRegistration(params *UpdateProtectionSourceRegistrationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateProtectionSourceRegistrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateProtectionSourceRegistrationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateProtectionSourceRegistration", - Method: "PUT", - PathPattern: "/data-protect/sources/registrations/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateProtectionSourceRegistrationReader{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.(*UpdateProtectionSourceRegistrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateProtectionSourceRegistrationDefault) - 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/v2/client/source/test_connection_protection_source_parameters.go b/v2/client/source/test_connection_protection_source_parameters.go deleted file mode 100644 index 2d73b429..00000000 --- a/v2/client/source/test_connection_protection_source_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewTestConnectionProtectionSourceParams creates a new TestConnectionProtectionSourceParams 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 NewTestConnectionProtectionSourceParams() *TestConnectionProtectionSourceParams { - return &TestConnectionProtectionSourceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewTestConnectionProtectionSourceParamsWithTimeout creates a new TestConnectionProtectionSourceParams object -// with the ability to set a timeout on a request. -func NewTestConnectionProtectionSourceParamsWithTimeout(timeout time.Duration) *TestConnectionProtectionSourceParams { - return &TestConnectionProtectionSourceParams{ - timeout: timeout, - } -} - -// NewTestConnectionProtectionSourceParamsWithContext creates a new TestConnectionProtectionSourceParams object -// with the ability to set a context for a request. -func NewTestConnectionProtectionSourceParamsWithContext(ctx context.Context) *TestConnectionProtectionSourceParams { - return &TestConnectionProtectionSourceParams{ - Context: ctx, - } -} - -// NewTestConnectionProtectionSourceParamsWithHTTPClient creates a new TestConnectionProtectionSourceParams object -// with the ability to set a custom HTTPClient for a request. -func NewTestConnectionProtectionSourceParamsWithHTTPClient(client *http.Client) *TestConnectionProtectionSourceParams { - return &TestConnectionProtectionSourceParams{ - HTTPClient: client, - } -} - -/* -TestConnectionProtectionSourceParams contains all the parameters to send to the API endpoint - - for the test connection protection source operation. - - Typically these are written to a http.Request. -*/ -type TestConnectionProtectionSourceParams struct { - - /* Body. - - Specifies the parameters to test connectivity with a source. - */ - Body *models.SourceConnectionRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the test connection protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TestConnectionProtectionSourceParams) WithDefaults() *TestConnectionProtectionSourceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the test connection protection source params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *TestConnectionProtectionSourceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) WithTimeout(timeout time.Duration) *TestConnectionProtectionSourceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) WithContext(ctx context.Context) *TestConnectionProtectionSourceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) WithHTTPClient(client *http.Client) *TestConnectionProtectionSourceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) WithBody(body *models.SourceConnectionRequestParams) *TestConnectionProtectionSourceParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the test connection protection source params -func (o *TestConnectionProtectionSourceParams) SetBody(body *models.SourceConnectionRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *TestConnectionProtectionSourceParams) 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/source/test_connection_protection_source_responses.go b/v2/client/source/test_connection_protection_source_responses.go deleted file mode 100644 index cc9fc072..00000000 --- a/v2/client/source/test_connection_protection_source_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// TestConnectionProtectionSourceReader is a Reader for the TestConnectionProtectionSource structure. -type TestConnectionProtectionSourceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TestConnectionProtectionSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewTestConnectionProtectionSourceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewTestConnectionProtectionSourceDefault(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 - } -} - -// NewTestConnectionProtectionSourceOK creates a TestConnectionProtectionSourceOK with default headers values -func NewTestConnectionProtectionSourceOK() *TestConnectionProtectionSourceOK { - return &TestConnectionProtectionSourceOK{} -} - -/* -TestConnectionProtectionSourceOK describes a response with status code 200, with default header values. - -Success -*/ -type TestConnectionProtectionSourceOK struct { - Payload *models.SourceConnectionResponseParams -} - -// IsSuccess returns true when this test connection protection source o k response has a 2xx status code -func (o *TestConnectionProtectionSourceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this test connection protection source o k response has a 3xx status code -func (o *TestConnectionProtectionSourceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this test connection protection source o k response has a 4xx status code -func (o *TestConnectionProtectionSourceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this test connection protection source o k response has a 5xx status code -func (o *TestConnectionProtectionSourceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this test connection protection source o k response a status code equal to that given -func (o *TestConnectionProtectionSourceOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the test connection protection source o k response -func (o *TestConnectionProtectionSourceOK) Code() int { - return 200 -} - -func (o *TestConnectionProtectionSourceOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/test-connection][%d] testConnectionProtectionSourceOK %s", 200, payload) -} - -func (o *TestConnectionProtectionSourceOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/test-connection][%d] testConnectionProtectionSourceOK %s", 200, payload) -} - -func (o *TestConnectionProtectionSourceOK) GetPayload() *models.SourceConnectionResponseParams { - return o.Payload -} - -func (o *TestConnectionProtectionSourceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceConnectionResponseParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTestConnectionProtectionSourceDefault creates a TestConnectionProtectionSourceDefault with default headers values -func NewTestConnectionProtectionSourceDefault(code int) *TestConnectionProtectionSourceDefault { - return &TestConnectionProtectionSourceDefault{ - _statusCode: code, - } -} - -/* -TestConnectionProtectionSourceDefault describes a response with status code -1, with default header values. - -Error -*/ -type TestConnectionProtectionSourceDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this test connection protection source default response has a 2xx status code -func (o *TestConnectionProtectionSourceDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this test connection protection source default response has a 3xx status code -func (o *TestConnectionProtectionSourceDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this test connection protection source default response has a 4xx status code -func (o *TestConnectionProtectionSourceDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this test connection protection source default response has a 5xx status code -func (o *TestConnectionProtectionSourceDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this test connection protection source default response a status code equal to that given -func (o *TestConnectionProtectionSourceDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the test connection protection source default response -func (o *TestConnectionProtectionSourceDefault) Code() int { - return o._statusCode -} - -func (o *TestConnectionProtectionSourceDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/test-connection][%d] TestConnectionProtectionSource default %s", o._statusCode, payload) -} - -func (o *TestConnectionProtectionSourceDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /data-protect/sources/test-connection][%d] TestConnectionProtectionSource default %s", o._statusCode, payload) -} - -func (o *TestConnectionProtectionSourceDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *TestConnectionProtectionSourceDefault) 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/source/update_protection_source_registration_parameters.go b/v2/client/source/update_protection_source_registration_parameters.go deleted file mode 100644 index 58b5e3e4..00000000 --- a/v2/client/source/update_protection_source_registration_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateProtectionSourceRegistrationParams creates a new UpdateProtectionSourceRegistrationParams 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 NewUpdateProtectionSourceRegistrationParams() *UpdateProtectionSourceRegistrationParams { - return &UpdateProtectionSourceRegistrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateProtectionSourceRegistrationParamsWithTimeout creates a new UpdateProtectionSourceRegistrationParams object -// with the ability to set a timeout on a request. -func NewUpdateProtectionSourceRegistrationParamsWithTimeout(timeout time.Duration) *UpdateProtectionSourceRegistrationParams { - return &UpdateProtectionSourceRegistrationParams{ - timeout: timeout, - } -} - -// NewUpdateProtectionSourceRegistrationParamsWithContext creates a new UpdateProtectionSourceRegistrationParams object -// with the ability to set a context for a request. -func NewUpdateProtectionSourceRegistrationParamsWithContext(ctx context.Context) *UpdateProtectionSourceRegistrationParams { - return &UpdateProtectionSourceRegistrationParams{ - Context: ctx, - } -} - -// NewUpdateProtectionSourceRegistrationParamsWithHTTPClient creates a new UpdateProtectionSourceRegistrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateProtectionSourceRegistrationParamsWithHTTPClient(client *http.Client) *UpdateProtectionSourceRegistrationParams { - return &UpdateProtectionSourceRegistrationParams{ - HTTPClient: client, - } -} - -/* -UpdateProtectionSourceRegistrationParams contains all the parameters to send to the API endpoint - - for the update protection source registration operation. - - Typically these are written to a http.Request. -*/ -type UpdateProtectionSourceRegistrationParams struct { - - /* Body. - - Specifies the parameters to update the registration. - */ - Body *models.SourceRegistrationUpdateRequestParams - - /* ID. - - Specifies the id of the Protection Source registration. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionSourceRegistrationParams) WithDefaults() *UpdateProtectionSourceRegistrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update protection source registration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateProtectionSourceRegistrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) WithTimeout(timeout time.Duration) *UpdateProtectionSourceRegistrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) WithContext(ctx context.Context) *UpdateProtectionSourceRegistrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) WithHTTPClient(client *http.Client) *UpdateProtectionSourceRegistrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) WithBody(body *models.SourceRegistrationUpdateRequestParams) *UpdateProtectionSourceRegistrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) SetBody(body *models.SourceRegistrationUpdateRequestParams) { - o.Body = body -} - -// WithID adds the id to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) WithID(id int64) *UpdateProtectionSourceRegistrationParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update protection source registration params -func (o *UpdateProtectionSourceRegistrationParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateProtectionSourceRegistrationParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/source/update_protection_source_registration_responses.go b/v2/client/source/update_protection_source_registration_responses.go deleted file mode 100644 index a96c3d77..00000000 --- a/v2/client/source/update_protection_source_registration_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package source - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateProtectionSourceRegistrationReader is a Reader for the UpdateProtectionSourceRegistration structure. -type UpdateProtectionSourceRegistrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateProtectionSourceRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateProtectionSourceRegistrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateProtectionSourceRegistrationDefault(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 - } -} - -// NewUpdateProtectionSourceRegistrationOK creates a UpdateProtectionSourceRegistrationOK with default headers values -func NewUpdateProtectionSourceRegistrationOK() *UpdateProtectionSourceRegistrationOK { - return &UpdateProtectionSourceRegistrationOK{} -} - -/* -UpdateProtectionSourceRegistrationOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateProtectionSourceRegistrationOK struct { - Payload *models.SourceRegistration -} - -// IsSuccess returns true when this update protection source registration o k response has a 2xx status code -func (o *UpdateProtectionSourceRegistrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update protection source registration o k response has a 3xx status code -func (o *UpdateProtectionSourceRegistrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update protection source registration o k response has a 4xx status code -func (o *UpdateProtectionSourceRegistrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update protection source registration o k response has a 5xx status code -func (o *UpdateProtectionSourceRegistrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update protection source registration o k response a status code equal to that given -func (o *UpdateProtectionSourceRegistrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update protection source registration o k response -func (o *UpdateProtectionSourceRegistrationOK) Code() int { - return 200 -} - -func (o *UpdateProtectionSourceRegistrationOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/registrations/{id}][%d] updateProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *UpdateProtectionSourceRegistrationOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/registrations/{id}][%d] updateProtectionSourceRegistrationOK %s", 200, payload) -} - -func (o *UpdateProtectionSourceRegistrationOK) GetPayload() *models.SourceRegistration { - return o.Payload -} - -func (o *UpdateProtectionSourceRegistrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SourceRegistration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateProtectionSourceRegistrationDefault creates a UpdateProtectionSourceRegistrationDefault with default headers values -func NewUpdateProtectionSourceRegistrationDefault(code int) *UpdateProtectionSourceRegistrationDefault { - return &UpdateProtectionSourceRegistrationDefault{ - _statusCode: code, - } -} - -/* -UpdateProtectionSourceRegistrationDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateProtectionSourceRegistrationDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update protection source registration default response has a 2xx status code -func (o *UpdateProtectionSourceRegistrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update protection source registration default response has a 3xx status code -func (o *UpdateProtectionSourceRegistrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update protection source registration default response has a 4xx status code -func (o *UpdateProtectionSourceRegistrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update protection source registration default response has a 5xx status code -func (o *UpdateProtectionSourceRegistrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update protection source registration default response a status code equal to that given -func (o *UpdateProtectionSourceRegistrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update protection source registration default response -func (o *UpdateProtectionSourceRegistrationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateProtectionSourceRegistrationDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/registrations/{id}][%d] UpdateProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionSourceRegistrationDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /data-protect/sources/registrations/{id}][%d] UpdateProtectionSourceRegistration default %s", o._statusCode, payload) -} - -func (o *UpdateProtectionSourceRegistrationDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateProtectionSourceRegistrationDefault) 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/stats/get_cluster_storage_stats_parameters.go b/v2/client/stats/get_cluster_storage_stats_parameters.go deleted file mode 100644 index d35d6832..00000000 --- a/v2/client/stats/get_cluster_storage_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetClusterStorageStatsParams creates a new GetClusterStorageStatsParams 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 NewGetClusterStorageStatsParams() *GetClusterStorageStatsParams { - return &GetClusterStorageStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterStorageStatsParamsWithTimeout creates a new GetClusterStorageStatsParams object -// with the ability to set a timeout on a request. -func NewGetClusterStorageStatsParamsWithTimeout(timeout time.Duration) *GetClusterStorageStatsParams { - return &GetClusterStorageStatsParams{ - timeout: timeout, - } -} - -// NewGetClusterStorageStatsParamsWithContext creates a new GetClusterStorageStatsParams object -// with the ability to set a context for a request. -func NewGetClusterStorageStatsParamsWithContext(ctx context.Context) *GetClusterStorageStatsParams { - return &GetClusterStorageStatsParams{ - Context: ctx, - } -} - -// NewGetClusterStorageStatsParamsWithHTTPClient creates a new GetClusterStorageStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterStorageStatsParamsWithHTTPClient(client *http.Client) *GetClusterStorageStatsParams { - return &GetClusterStorageStatsParams{ - HTTPClient: client, - } -} - -/* -GetClusterStorageStatsParams contains all the parameters to send to the API endpoint - - for the get cluster storage stats operation. - - Typically these are written to a http.Request. -*/ -type GetClusterStorageStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster storage stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStorageStatsParams) WithDefaults() *GetClusterStorageStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster storage stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterStorageStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) WithTimeout(timeout time.Duration) *GetClusterStorageStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) WithContext(ctx context.Context) *GetClusterStorageStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) WithHTTPClient(client *http.Client) *GetClusterStorageStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster storage stats params -func (o *GetClusterStorageStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterStorageStatsParams) 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/stats/get_cluster_storage_stats_responses.go b/v2/client/stats/get_cluster_storage_stats_responses.go deleted file mode 100644 index eb2d8574..00000000 --- a/v2/client/stats/get_cluster_storage_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetClusterStorageStatsReader is a Reader for the GetClusterStorageStats structure. -type GetClusterStorageStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterStorageStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterStorageStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterStorageStatsDefault(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 - } -} - -// NewGetClusterStorageStatsOK creates a GetClusterStorageStatsOK with default headers values -func NewGetClusterStorageStatsOK() *GetClusterStorageStatsOK { - return &GetClusterStorageStatsOK{} -} - -/* -GetClusterStorageStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterStorageStatsOK struct { - Payload *models.ClusterStorageStats -} - -// IsSuccess returns true when this get cluster storage stats o k response has a 2xx status code -func (o *GetClusterStorageStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster storage stats o k response has a 3xx status code -func (o *GetClusterStorageStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster storage stats o k response has a 4xx status code -func (o *GetClusterStorageStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster storage stats o k response has a 5xx status code -func (o *GetClusterStorageStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster storage stats o k response a status code equal to that given -func (o *GetClusterStorageStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get cluster storage stats o k response -func (o *GetClusterStorageStatsOK) Code() int { - return 200 -} - -func (o *GetClusterStorageStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/cluster-storage][%d] getClusterStorageStatsOK %s", 200, payload) -} - -func (o *GetClusterStorageStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/cluster-storage][%d] getClusterStorageStatsOK %s", 200, payload) -} - -func (o *GetClusterStorageStatsOK) GetPayload() *models.ClusterStorageStats { - return o.Payload -} - -func (o *GetClusterStorageStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterStorageStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterStorageStatsDefault creates a GetClusterStorageStatsDefault with default headers values -func NewGetClusterStorageStatsDefault(code int) *GetClusterStorageStatsDefault { - return &GetClusterStorageStatsDefault{ - _statusCode: code, - } -} - -/* -GetClusterStorageStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetClusterStorageStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get cluster storage stats default response has a 2xx status code -func (o *GetClusterStorageStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get cluster storage stats default response has a 3xx status code -func (o *GetClusterStorageStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get cluster storage stats default response has a 4xx status code -func (o *GetClusterStorageStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get cluster storage stats default response has a 5xx status code -func (o *GetClusterStorageStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get cluster storage stats default response a status code equal to that given -func (o *GetClusterStorageStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get cluster storage stats default response -func (o *GetClusterStorageStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterStorageStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/cluster-storage][%d] GetClusterStorageStats default %s", o._statusCode, payload) -} - -func (o *GetClusterStorageStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/cluster-storage][%d] GetClusterStorageStats default %s", o._statusCode, payload) -} - -func (o *GetClusterStorageStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetClusterStorageStatsDefault) 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/stats/get_files_stats_parameters.go b/v2/client/stats/get_files_stats_parameters.go deleted file mode 100644 index bc2c29c0..00000000 --- a/v2/client/stats/get_files_stats_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetFilesStatsParams creates a new GetFilesStatsParams 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 NewGetFilesStatsParams() *GetFilesStatsParams { - return &GetFilesStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFilesStatsParamsWithTimeout creates a new GetFilesStatsParams object -// with the ability to set a timeout on a request. -func NewGetFilesStatsParamsWithTimeout(timeout time.Duration) *GetFilesStatsParams { - return &GetFilesStatsParams{ - timeout: timeout, - } -} - -// NewGetFilesStatsParamsWithContext creates a new GetFilesStatsParams object -// with the ability to set a context for a request. -func NewGetFilesStatsParamsWithContext(ctx context.Context) *GetFilesStatsParams { - return &GetFilesStatsParams{ - Context: ctx, - } -} - -// NewGetFilesStatsParamsWithHTTPClient creates a new GetFilesStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFilesStatsParamsWithHTTPClient(client *http.Client) *GetFilesStatsParams { - return &GetFilesStatsParams{ - HTTPClient: client, - } -} - -/* -GetFilesStatsParams contains all the parameters to send to the API endpoint - - for the get files stats operation. - - Typically these are written to a http.Request. -*/ -type GetFilesStatsParams struct { - - /* EntityType. - - Specifies the entity type based on which the files stats are calculated. By default stats are calculated based on Cluster - */ - EntityType *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get files stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFilesStatsParams) WithDefaults() *GetFilesStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get files stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFilesStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get files stats params -func (o *GetFilesStatsParams) WithTimeout(timeout time.Duration) *GetFilesStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get files stats params -func (o *GetFilesStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get files stats params -func (o *GetFilesStatsParams) WithContext(ctx context.Context) *GetFilesStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get files stats params -func (o *GetFilesStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get files stats params -func (o *GetFilesStatsParams) WithHTTPClient(client *http.Client) *GetFilesStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get files stats params -func (o *GetFilesStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEntityType adds the entityType to the get files stats params -func (o *GetFilesStatsParams) WithEntityType(entityType *string) *GetFilesStatsParams { - o.SetEntityType(entityType) - return o -} - -// SetEntityType adds the entityType to the get files stats params -func (o *GetFilesStatsParams) SetEntityType(entityType *string) { - o.EntityType = entityType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFilesStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EntityType != nil { - - // query param entityType - var qrEntityType string - - if o.EntityType != nil { - qrEntityType = *o.EntityType - } - qEntityType := qrEntityType - if qEntityType != "" { - - if err := r.SetQueryParam("entityType", qEntityType); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/stats/get_files_stats_responses.go b/v2/client/stats/get_files_stats_responses.go deleted file mode 100644 index a4b63661..00000000 --- a/v2/client/stats/get_files_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetFilesStatsReader is a Reader for the GetFilesStats structure. -type GetFilesStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFilesStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFilesStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFilesStatsDefault(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 - } -} - -// NewGetFilesStatsOK creates a GetFilesStatsOK with default headers values -func NewGetFilesStatsOK() *GetFilesStatsOK { - return &GetFilesStatsOK{} -} - -/* -GetFilesStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFilesStatsOK struct { - Payload *models.FilesStats -} - -// IsSuccess returns true when this get files stats o k response has a 2xx status code -func (o *GetFilesStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get files stats o k response has a 3xx status code -func (o *GetFilesStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get files stats o k response has a 4xx status code -func (o *GetFilesStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get files stats o k response has a 5xx status code -func (o *GetFilesStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get files stats o k response a status code equal to that given -func (o *GetFilesStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get files stats o k response -func (o *GetFilesStatsOK) Code() int { - return 200 -} - -func (o *GetFilesStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/files][%d] getFilesStatsOK %s", 200, payload) -} - -func (o *GetFilesStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/files][%d] getFilesStatsOK %s", 200, payload) -} - -func (o *GetFilesStatsOK) GetPayload() *models.FilesStats { - return o.Payload -} - -func (o *GetFilesStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FilesStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFilesStatsDefault creates a GetFilesStatsDefault with default headers values -func NewGetFilesStatsDefault(code int) *GetFilesStatsDefault { - return &GetFilesStatsDefault{ - _statusCode: code, - } -} - -/* -GetFilesStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFilesStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get files stats default response has a 2xx status code -func (o *GetFilesStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get files stats default response has a 3xx status code -func (o *GetFilesStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get files stats default response has a 4xx status code -func (o *GetFilesStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get files stats default response has a 5xx status code -func (o *GetFilesStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get files stats default response a status code equal to that given -func (o *GetFilesStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get files stats default response -func (o *GetFilesStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetFilesStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/files][%d] GetFilesStats default %s", o._statusCode, payload) -} - -func (o *GetFilesStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/files][%d] GetFilesStats default %s", o._statusCode, payload) -} - -func (o *GetFilesStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetFilesStatsDefault) 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/stats/get_protection_runs_stats_parameters.go b/v2/client/stats/get_protection_runs_stats_parameters.go deleted file mode 100644 index 5ccc5fcf..00000000 --- a/v2/client/stats/get_protection_runs_stats_parameters.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetProtectionRunsStatsParams creates a new GetProtectionRunsStatsParams 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 NewGetProtectionRunsStatsParams() *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetProtectionRunsStatsParamsWithTimeout creates a new GetProtectionRunsStatsParams object -// with the ability to set a timeout on a request. -func NewGetProtectionRunsStatsParamsWithTimeout(timeout time.Duration) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - timeout: timeout, - } -} - -// NewGetProtectionRunsStatsParamsWithContext creates a new GetProtectionRunsStatsParams object -// with the ability to set a context for a request. -func NewGetProtectionRunsStatsParamsWithContext(ctx context.Context) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - Context: ctx, - } -} - -// NewGetProtectionRunsStatsParamsWithHTTPClient creates a new GetProtectionRunsStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetProtectionRunsStatsParamsWithHTTPClient(client *http.Client) *GetProtectionRunsStatsParams { - return &GetProtectionRunsStatsParams{ - HTTPClient: client, - } -} - -/* -GetProtectionRunsStatsParams contains all the parameters to send to the API endpoint - - for the get protection runs stats operation. - - Typically these are written to a http.Request. -*/ -type GetProtectionRunsStatsParams struct { - - /* EndTimeUsecs. - - Specify the end time as a Unix epoch Timestamp (in microseconds), only runs executing before this time will be counted. By default it is current time. - - Format: int64 - */ - EndTimeUsecs *int64 - - /* RunStatus. - - Specifies a list of status, runs matching the status will be returned. 'Running' indicates that the run is still running. 'Canceled' indicates that the run has been canceled. 'Failed' indicates that the run has failed. 'Succeeded' indicates that the run has finished successfully. 'SucceededWithWarning' indicates that the run finished successfully, but there were some warning messages. - */ - RunStatus []string - - /* StartTimeUsecs. - - Specify the start time as a Unix epoch Timestamp (in microseconds), only runs executing after this time will be counted. By default it is current time minus a day. - - Format: int64 - */ - StartTimeUsecs *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get protection runs stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsStatsParams) WithDefaults() *GetProtectionRunsStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get protection runs stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetProtectionRunsStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithTimeout(timeout time.Duration) *GetProtectionRunsStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithContext(ctx context.Context) *GetProtectionRunsStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithHTTPClient(client *http.Client) *GetProtectionRunsStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeUsecs adds the endTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithEndTimeUsecs(endTimeUsecs *int64) *GetProtectionRunsStatsParams { - o.SetEndTimeUsecs(endTimeUsecs) - return o -} - -// SetEndTimeUsecs adds the endTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetEndTimeUsecs(endTimeUsecs *int64) { - o.EndTimeUsecs = endTimeUsecs -} - -// WithRunStatus adds the runStatus to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithRunStatus(runStatus []string) *GetProtectionRunsStatsParams { - o.SetRunStatus(runStatus) - return o -} - -// SetRunStatus adds the runStatus to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetRunStatus(runStatus []string) { - o.RunStatus = runStatus -} - -// WithStartTimeUsecs adds the startTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) WithStartTimeUsecs(startTimeUsecs *int64) *GetProtectionRunsStatsParams { - o.SetStartTimeUsecs(startTimeUsecs) - return o -} - -// SetStartTimeUsecs adds the startTimeUsecs to the get protection runs stats params -func (o *GetProtectionRunsStatsParams) SetStartTimeUsecs(startTimeUsecs *int64) { - o.StartTimeUsecs = startTimeUsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetProtectionRunsStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeUsecs != nil { - - // query param endTimeUsecs - var qrEndTimeUsecs int64 - - if o.EndTimeUsecs != nil { - qrEndTimeUsecs = *o.EndTimeUsecs - } - qEndTimeUsecs := swag.FormatInt64(qrEndTimeUsecs) - if qEndTimeUsecs != "" { - - if err := r.SetQueryParam("endTimeUsecs", qEndTimeUsecs); err != nil { - return err - } - } - } - - if o.RunStatus != nil { - - // binding items for runStatus - joinedRunStatus := o.bindParamRunStatus(reg) - - // query array param runStatus - if err := r.SetQueryParam("runStatus", joinedRunStatus...); err != nil { - return err - } - } - - if o.StartTimeUsecs != nil { - - // query param startTimeUsecs - var qrStartTimeUsecs int64 - - if o.StartTimeUsecs != nil { - qrStartTimeUsecs = *o.StartTimeUsecs - } - qStartTimeUsecs := swag.FormatInt64(qrStartTimeUsecs) - if qStartTimeUsecs != "" { - - if err := r.SetQueryParam("startTimeUsecs", qStartTimeUsecs); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetProtectionRunsStats binds the parameter runStatus -func (o *GetProtectionRunsStatsParams) bindParamRunStatus(formats strfmt.Registry) []string { - runStatusIR := o.RunStatus - - var runStatusIC []string - for _, runStatusIIR := range runStatusIR { // explode []string - - runStatusIIV := runStatusIIR // string as string - runStatusIC = append(runStatusIC, runStatusIIV) - } - - // items.CollectionFormat: "" - runStatusIS := swag.JoinByFormat(runStatusIC, "") - - return runStatusIS -} diff --git a/v2/client/stats/get_protection_runs_stats_responses.go b/v2/client/stats/get_protection_runs_stats_responses.go deleted file mode 100644 index 9b54d9c8..00000000 --- a/v2/client/stats/get_protection_runs_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetProtectionRunsStatsReader is a Reader for the GetProtectionRunsStats structure. -type GetProtectionRunsStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetProtectionRunsStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetProtectionRunsStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetProtectionRunsStatsDefault(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 - } -} - -// NewGetProtectionRunsStatsOK creates a GetProtectionRunsStatsOK with default headers values -func NewGetProtectionRunsStatsOK() *GetProtectionRunsStatsOK { - return &GetProtectionRunsStatsOK{} -} - -/* -GetProtectionRunsStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetProtectionRunsStatsOK struct { - Payload *models.GetProtectionRunsStatusResponseBody -} - -// IsSuccess returns true when this get protection runs stats o k response has a 2xx status code -func (o *GetProtectionRunsStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get protection runs stats o k response has a 3xx status code -func (o *GetProtectionRunsStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get protection runs stats o k response has a 4xx status code -func (o *GetProtectionRunsStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get protection runs stats o k response has a 5xx status code -func (o *GetProtectionRunsStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get protection runs stats o k response a status code equal to that given -func (o *GetProtectionRunsStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get protection runs stats o k response -func (o *GetProtectionRunsStatsOK) Code() int { - return 200 -} - -func (o *GetProtectionRunsStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/protection-runs][%d] getProtectionRunsStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunsStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/protection-runs][%d] getProtectionRunsStatsOK %s", 200, payload) -} - -func (o *GetProtectionRunsStatsOK) GetPayload() *models.GetProtectionRunsStatusResponseBody { - return o.Payload -} - -func (o *GetProtectionRunsStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetProtectionRunsStatusResponseBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetProtectionRunsStatsDefault creates a GetProtectionRunsStatsDefault with default headers values -func NewGetProtectionRunsStatsDefault(code int) *GetProtectionRunsStatsDefault { - return &GetProtectionRunsStatsDefault{ - _statusCode: code, - } -} - -/* -GetProtectionRunsStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetProtectionRunsStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get protection runs stats default response has a 2xx status code -func (o *GetProtectionRunsStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get protection runs stats default response has a 3xx status code -func (o *GetProtectionRunsStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get protection runs stats default response has a 4xx status code -func (o *GetProtectionRunsStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get protection runs stats default response has a 5xx status code -func (o *GetProtectionRunsStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get protection runs stats default response a status code equal to that given -func (o *GetProtectionRunsStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get protection runs stats default response -func (o *GetProtectionRunsStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetProtectionRunsStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/protection-runs][%d] GetProtectionRunsStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/protection-runs][%d] GetProtectionRunsStats default %s", o._statusCode, payload) -} - -func (o *GetProtectionRunsStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetProtectionRunsStatsDefault) 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/stats/get_time_series_stats_parameters.go b/v2/client/stats/get_time_series_stats_parameters.go deleted file mode 100644 index cdc8ad15..00000000 --- a/v2/client/stats/get_time_series_stats_parameters.go +++ /dev/null @@ -1,364 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetTimeSeriesStatsParams creates a new GetTimeSeriesStatsParams 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 NewGetTimeSeriesStatsParams() *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTimeSeriesStatsParamsWithTimeout creates a new GetTimeSeriesStatsParams object -// with the ability to set a timeout on a request. -func NewGetTimeSeriesStatsParamsWithTimeout(timeout time.Duration) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - timeout: timeout, - } -} - -// NewGetTimeSeriesStatsParamsWithContext creates a new GetTimeSeriesStatsParams object -// with the ability to set a context for a request. -func NewGetTimeSeriesStatsParamsWithContext(ctx context.Context) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - Context: ctx, - } -} - -// NewGetTimeSeriesStatsParamsWithHTTPClient creates a new GetTimeSeriesStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTimeSeriesStatsParamsWithHTTPClient(client *http.Client) *GetTimeSeriesStatsParams { - return &GetTimeSeriesStatsParams{ - HTTPClient: client, - } -} - -/* -GetTimeSeriesStatsParams contains all the parameters to send to the API endpoint - - for the get time series stats operation. - - Typically these are written to a http.Request. -*/ -type GetTimeSeriesStatsParams struct { - - /* EndTimeMsecs. - - Specifies the end time of series stats, by default it is current time. - - Format: int64 - */ - EndTimeMsecs *int64 - - /* EntityID. - - Specifies the entity id. - */ - EntityID string - - /* MetricNames. - - Specifies a list of metric names. - */ - MetricNames []string - - /* RollupFunction. - - Specifies the rollup function to apply to the data points for the time interval specified by rollupInternalSecs. - */ - RollupFunction *string - - /* RollupIntervalSecs. - - Specifies the time interval granularity for the specified rollup function. - - Format: int32 - */ - RollupIntervalSecs *int32 - - /* SchemaName. - - Specifies the schema name. - */ - SchemaName string - - /* StartTimeMsecs. - - Specifies the start time of series stats. - - Format: int64 - */ - StartTimeMsecs int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get time series stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesStatsParams) WithDefaults() *GetTimeSeriesStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get time series stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTimeSeriesStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithTimeout(timeout time.Duration) *GetTimeSeriesStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithContext(ctx context.Context) *GetTimeSeriesStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithHTTPClient(client *http.Client) *GetTimeSeriesStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndTimeMsecs adds the endTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithEndTimeMsecs(endTimeMsecs *int64) *GetTimeSeriesStatsParams { - o.SetEndTimeMsecs(endTimeMsecs) - return o -} - -// SetEndTimeMsecs adds the endTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetEndTimeMsecs(endTimeMsecs *int64) { - o.EndTimeMsecs = endTimeMsecs -} - -// WithEntityID adds the entityID to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithEntityID(entityID string) *GetTimeSeriesStatsParams { - o.SetEntityID(entityID) - return o -} - -// SetEntityID adds the entityId to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetEntityID(entityID string) { - o.EntityID = entityID -} - -// WithMetricNames adds the metricNames to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithMetricNames(metricNames []string) *GetTimeSeriesStatsParams { - o.SetMetricNames(metricNames) - return o -} - -// SetMetricNames adds the metricNames to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetMetricNames(metricNames []string) { - o.MetricNames = metricNames -} - -// WithRollupFunction adds the rollupFunction to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithRollupFunction(rollupFunction *string) *GetTimeSeriesStatsParams { - o.SetRollupFunction(rollupFunction) - return o -} - -// SetRollupFunction adds the rollupFunction to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetRollupFunction(rollupFunction *string) { - o.RollupFunction = rollupFunction -} - -// WithRollupIntervalSecs adds the rollupIntervalSecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithRollupIntervalSecs(rollupIntervalSecs *int32) *GetTimeSeriesStatsParams { - o.SetRollupIntervalSecs(rollupIntervalSecs) - return o -} - -// SetRollupIntervalSecs adds the rollupIntervalSecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetRollupIntervalSecs(rollupIntervalSecs *int32) { - o.RollupIntervalSecs = rollupIntervalSecs -} - -// WithSchemaName adds the schemaName to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithSchemaName(schemaName string) *GetTimeSeriesStatsParams { - o.SetSchemaName(schemaName) - return o -} - -// SetSchemaName adds the schemaName to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetSchemaName(schemaName string) { - o.SchemaName = schemaName -} - -// WithStartTimeMsecs adds the startTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) WithStartTimeMsecs(startTimeMsecs int64) *GetTimeSeriesStatsParams { - o.SetStartTimeMsecs(startTimeMsecs) - return o -} - -// SetStartTimeMsecs adds the startTimeMsecs to the get time series stats params -func (o *GetTimeSeriesStatsParams) SetStartTimeMsecs(startTimeMsecs int64) { - o.StartTimeMsecs = startTimeMsecs -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTimeSeriesStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.EndTimeMsecs != nil { - - // query param endTimeMsecs - var qrEndTimeMsecs int64 - - if o.EndTimeMsecs != nil { - qrEndTimeMsecs = *o.EndTimeMsecs - } - qEndTimeMsecs := swag.FormatInt64(qrEndTimeMsecs) - if qEndTimeMsecs != "" { - - if err := r.SetQueryParam("endTimeMsecs", qEndTimeMsecs); err != nil { - return err - } - } - } - - // query param entityId - qrEntityID := o.EntityID - qEntityID := qrEntityID - if qEntityID != "" { - - if err := r.SetQueryParam("entityId", qEntityID); err != nil { - return err - } - } - - if o.MetricNames != nil { - - // binding items for metricNames - joinedMetricNames := o.bindParamMetricNames(reg) - - // query array param metricNames - if err := r.SetQueryParam("metricNames", joinedMetricNames...); err != nil { - return err - } - } - - if o.RollupFunction != nil { - - // query param rollupFunction - var qrRollupFunction string - - if o.RollupFunction != nil { - qrRollupFunction = *o.RollupFunction - } - qRollupFunction := qrRollupFunction - if qRollupFunction != "" { - - if err := r.SetQueryParam("rollupFunction", qRollupFunction); err != nil { - return err - } - } - } - - if o.RollupIntervalSecs != nil { - - // query param rollupIntervalSecs - var qrRollupIntervalSecs int32 - - if o.RollupIntervalSecs != nil { - qrRollupIntervalSecs = *o.RollupIntervalSecs - } - qRollupIntervalSecs := swag.FormatInt32(qrRollupIntervalSecs) - if qRollupIntervalSecs != "" { - - if err := r.SetQueryParam("rollupIntervalSecs", qRollupIntervalSecs); err != nil { - return err - } - } - } - - // query param schemaName - qrSchemaName := o.SchemaName - qSchemaName := qrSchemaName - if qSchemaName != "" { - - if err := r.SetQueryParam("schemaName", qSchemaName); err != nil { - return err - } - } - - // query param startTimeMsecs - qrStartTimeMsecs := o.StartTimeMsecs - qStartTimeMsecs := swag.FormatInt64(qrStartTimeMsecs) - if qStartTimeMsecs != "" { - - if err := r.SetQueryParam("startTimeMsecs", qStartTimeMsecs); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTimeSeriesStats binds the parameter metricNames -func (o *GetTimeSeriesStatsParams) bindParamMetricNames(formats strfmt.Registry) []string { - metricNamesIR := o.MetricNames - - var metricNamesIC []string - for _, metricNamesIIR := range metricNamesIR { // explode []string - - metricNamesIIV := metricNamesIIR // string as string - metricNamesIC = append(metricNamesIC, metricNamesIIV) - } - - // items.CollectionFormat: "" - metricNamesIS := swag.JoinByFormat(metricNamesIC, "") - - return metricNamesIS -} diff --git a/v2/client/stats/get_time_series_stats_responses.go b/v2/client/stats/get_time_series_stats_responses.go deleted file mode 100644 index a028682c..00000000 --- a/v2/client/stats/get_time_series_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTimeSeriesStatsReader is a Reader for the GetTimeSeriesStats structure. -type GetTimeSeriesStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTimeSeriesStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTimeSeriesStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTimeSeriesStatsDefault(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 - } -} - -// NewGetTimeSeriesStatsOK creates a GetTimeSeriesStatsOK with default headers values -func NewGetTimeSeriesStatsOK() *GetTimeSeriesStatsOK { - return &GetTimeSeriesStatsOK{} -} - -/* -GetTimeSeriesStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTimeSeriesStatsOK struct { - Payload *models.TimeSeriesStats -} - -// IsSuccess returns true when this get time series stats o k response has a 2xx status code -func (o *GetTimeSeriesStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get time series stats o k response has a 3xx status code -func (o *GetTimeSeriesStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get time series stats o k response has a 4xx status code -func (o *GetTimeSeriesStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get time series stats o k response has a 5xx status code -func (o *GetTimeSeriesStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get time series stats o k response a status code equal to that given -func (o *GetTimeSeriesStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get time series stats o k response -func (o *GetTimeSeriesStatsOK) Code() int { - return 200 -} - -func (o *GetTimeSeriesStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/time-series-stats][%d] getTimeSeriesStatsOK %s", 200, payload) -} - -func (o *GetTimeSeriesStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/time-series-stats][%d] getTimeSeriesStatsOK %s", 200, payload) -} - -func (o *GetTimeSeriesStatsOK) GetPayload() *models.TimeSeriesStats { - return o.Payload -} - -func (o *GetTimeSeriesStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TimeSeriesStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTimeSeriesStatsDefault creates a GetTimeSeriesStatsDefault with default headers values -func NewGetTimeSeriesStatsDefault(code int) *GetTimeSeriesStatsDefault { - return &GetTimeSeriesStatsDefault{ - _statusCode: code, - } -} - -/* -GetTimeSeriesStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTimeSeriesStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get time series stats default response has a 2xx status code -func (o *GetTimeSeriesStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get time series stats default response has a 3xx status code -func (o *GetTimeSeriesStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get time series stats default response has a 4xx status code -func (o *GetTimeSeriesStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get time series stats default response has a 5xx status code -func (o *GetTimeSeriesStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get time series stats default response a status code equal to that given -func (o *GetTimeSeriesStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get time series stats default response -func (o *GetTimeSeriesStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetTimeSeriesStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/time-series-stats][%d] GetTimeSeriesStats default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/time-series-stats][%d] GetTimeSeriesStats default %s", o._statusCode, payload) -} - -func (o *GetTimeSeriesStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTimeSeriesStatsDefault) 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/stats/get_view_client_stats_parameters.go b/v2/client/stats/get_view_client_stats_parameters.go deleted file mode 100644 index 09c0c78f..00000000 --- a/v2/client/stats/get_view_client_stats_parameters.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetViewClientStatsParams creates a new GetViewClientStatsParams 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 NewGetViewClientStatsParams() *GetViewClientStatsParams { - return &GetViewClientStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewClientStatsParamsWithTimeout creates a new GetViewClientStatsParams object -// with the ability to set a timeout on a request. -func NewGetViewClientStatsParamsWithTimeout(timeout time.Duration) *GetViewClientStatsParams { - return &GetViewClientStatsParams{ - timeout: timeout, - } -} - -// NewGetViewClientStatsParamsWithContext creates a new GetViewClientStatsParams object -// with the ability to set a context for a request. -func NewGetViewClientStatsParamsWithContext(ctx context.Context) *GetViewClientStatsParams { - return &GetViewClientStatsParams{ - Context: ctx, - } -} - -// NewGetViewClientStatsParamsWithHTTPClient creates a new GetViewClientStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewClientStatsParamsWithHTTPClient(client *http.Client) *GetViewClientStatsParams { - return &GetViewClientStatsParams{ - HTTPClient: client, - } -} - -/* -GetViewClientStatsParams contains all the parameters to send to the API endpoint - - for the get view client stats operation. - - Typically these are written to a http.Request. -*/ -type GetViewClientStatsParams struct { - - /* LastHours. - - Specifies the last hours of stats to sort. - - Format: int64 - */ - LastHours *int64 - - /* Metric. - - Specifies the metric to which stats has to be sorted. - */ - Metric *string - - /* NumTopViewClients. - - Specifies the number of view clients for which stats has to be computed. Specifying this field will return the Views sorted in the descending order on the metric specified. If specified, minimum value is 1. If not specified, all view clients will be returned. If metric is not specified, this parameter must also not be specified. - - Format: int64 - */ - NumTopViewClients *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view client stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientStatsParams) WithDefaults() *GetViewClientStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view client stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view client stats params -func (o *GetViewClientStatsParams) WithTimeout(timeout time.Duration) *GetViewClientStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view client stats params -func (o *GetViewClientStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view client stats params -func (o *GetViewClientStatsParams) WithContext(ctx context.Context) *GetViewClientStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view client stats params -func (o *GetViewClientStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view client stats params -func (o *GetViewClientStatsParams) WithHTTPClient(client *http.Client) *GetViewClientStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view client stats params -func (o *GetViewClientStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLastHours adds the lastHours to the get view client stats params -func (o *GetViewClientStatsParams) WithLastHours(lastHours *int64) *GetViewClientStatsParams { - o.SetLastHours(lastHours) - return o -} - -// SetLastHours adds the lastHours to the get view client stats params -func (o *GetViewClientStatsParams) SetLastHours(lastHours *int64) { - o.LastHours = lastHours -} - -// WithMetric adds the metric to the get view client stats params -func (o *GetViewClientStatsParams) WithMetric(metric *string) *GetViewClientStatsParams { - o.SetMetric(metric) - return o -} - -// SetMetric adds the metric to the get view client stats params -func (o *GetViewClientStatsParams) SetMetric(metric *string) { - o.Metric = metric -} - -// WithNumTopViewClients adds the numTopViewClients to the get view client stats params -func (o *GetViewClientStatsParams) WithNumTopViewClients(numTopViewClients *int64) *GetViewClientStatsParams { - o.SetNumTopViewClients(numTopViewClients) - return o -} - -// SetNumTopViewClients adds the numTopViewClients to the get view client stats params -func (o *GetViewClientStatsParams) SetNumTopViewClients(numTopViewClients *int64) { - o.NumTopViewClients = numTopViewClients -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewClientStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.LastHours != nil { - - // query param lastHours - var qrLastHours int64 - - if o.LastHours != nil { - qrLastHours = *o.LastHours - } - qLastHours := swag.FormatInt64(qrLastHours) - if qLastHours != "" { - - if err := r.SetQueryParam("lastHours", qLastHours); err != nil { - return err - } - } - } - - if o.Metric != nil { - - // query param metric - var qrMetric string - - if o.Metric != nil { - qrMetric = *o.Metric - } - qMetric := qrMetric - if qMetric != "" { - - if err := r.SetQueryParam("metric", qMetric); err != nil { - return err - } - } - } - - if o.NumTopViewClients != nil { - - // query param numTopViewClients - var qrNumTopViewClients int64 - - if o.NumTopViewClients != nil { - qrNumTopViewClients = *o.NumTopViewClients - } - qNumTopViewClients := swag.FormatInt64(qrNumTopViewClients) - if qNumTopViewClients != "" { - - if err := r.SetQueryParam("numTopViewClients", qNumTopViewClients); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/stats/get_view_client_stats_responses.go b/v2/client/stats/get_view_client_stats_responses.go deleted file mode 100644 index 5f166aec..00000000 --- a/v2/client/stats/get_view_client_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewClientStatsReader is a Reader for the GetViewClientStats structure. -type GetViewClientStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewClientStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewClientStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewClientStatsDefault(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 - } -} - -// NewGetViewClientStatsOK creates a GetViewClientStatsOK with default headers values -func NewGetViewClientStatsOK() *GetViewClientStatsOK { - return &GetViewClientStatsOK{} -} - -/* -GetViewClientStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewClientStatsOK struct { - Payload *models.ViewClientsStats -} - -// IsSuccess returns true when this get view client stats o k response has a 2xx status code -func (o *GetViewClientStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view client stats o k response has a 3xx status code -func (o *GetViewClientStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view client stats o k response has a 4xx status code -func (o *GetViewClientStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view client stats o k response has a 5xx status code -func (o *GetViewClientStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view client stats o k response a status code equal to that given -func (o *GetViewClientStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view client stats o k response -func (o *GetViewClientStatsOK) Code() int { - return 200 -} - -func (o *GetViewClientStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/view-clients][%d] getViewClientStatsOK %s", 200, payload) -} - -func (o *GetViewClientStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/view-clients][%d] getViewClientStatsOK %s", 200, payload) -} - -func (o *GetViewClientStatsOK) GetPayload() *models.ViewClientsStats { - return o.Payload -} - -func (o *GetViewClientStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewClientsStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewClientStatsDefault creates a GetViewClientStatsDefault with default headers values -func NewGetViewClientStatsDefault(code int) *GetViewClientStatsDefault { - return &GetViewClientStatsDefault{ - _statusCode: code, - } -} - -/* -GetViewClientStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewClientStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view client stats default response has a 2xx status code -func (o *GetViewClientStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view client stats default response has a 3xx status code -func (o *GetViewClientStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view client stats default response has a 4xx status code -func (o *GetViewClientStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view client stats default response has a 5xx status code -func (o *GetViewClientStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view client stats default response a status code equal to that given -func (o *GetViewClientStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view client stats default response -func (o *GetViewClientStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewClientStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/view-clients][%d] GetViewClientStats default %s", o._statusCode, payload) -} - -func (o *GetViewClientStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/view-clients][%d] GetViewClientStats default %s", o._statusCode, payload) -} - -func (o *GetViewClientStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewClientStatsDefault) 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/stats/get_views_stats_parameters.go b/v2/client/stats/get_views_stats_parameters.go deleted file mode 100644 index b4de1ba1..00000000 --- a/v2/client/stats/get_views_stats_parameters.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/go-openapi/swag" -) - -// NewGetViewsStatsParams creates a new GetViewsStatsParams 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 NewGetViewsStatsParams() *GetViewsStatsParams { - return &GetViewsStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewsStatsParamsWithTimeout creates a new GetViewsStatsParams object -// with the ability to set a timeout on a request. -func NewGetViewsStatsParamsWithTimeout(timeout time.Duration) *GetViewsStatsParams { - return &GetViewsStatsParams{ - timeout: timeout, - } -} - -// NewGetViewsStatsParamsWithContext creates a new GetViewsStatsParams object -// with the ability to set a context for a request. -func NewGetViewsStatsParamsWithContext(ctx context.Context) *GetViewsStatsParams { - return &GetViewsStatsParams{ - Context: ctx, - } -} - -// NewGetViewsStatsParamsWithHTTPClient creates a new GetViewsStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewsStatsParamsWithHTTPClient(client *http.Client) *GetViewsStatsParams { - return &GetViewsStatsParams{ - HTTPClient: client, - } -} - -/* -GetViewsStatsParams contains all the parameters to send to the API endpoint - - for the get views stats operation. - - Typically these are written to a http.Request. -*/ -type GetViewsStatsParams struct { - - /* LastHours. - - Specifies the last hours of stats to sort. - - Format: int64 - */ - LastHours *int64 - - /* Metric. - - Specifies the metric to which stats has to be sorted. - */ - Metric *string - - /* NumTopViews. - - Specifies the number of view for which stats has to be computed. Specifying this field will return the Views sorted in the descending order on the metric specified. If specified, minimum value is 1. If not specified, all view will be returned. If metric is not specified, this parameter must also not be specified. - - Format: int64 - */ - NumTopViews *int64 - - /* Protocol. - - Specifies the protocol to sort. - */ - Protocol *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get views stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsStatsParams) WithDefaults() *GetViewsStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get views stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get views stats params -func (o *GetViewsStatsParams) WithTimeout(timeout time.Duration) *GetViewsStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get views stats params -func (o *GetViewsStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get views stats params -func (o *GetViewsStatsParams) WithContext(ctx context.Context) *GetViewsStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get views stats params -func (o *GetViewsStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get views stats params -func (o *GetViewsStatsParams) WithHTTPClient(client *http.Client) *GetViewsStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get views stats params -func (o *GetViewsStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLastHours adds the lastHours to the get views stats params -func (o *GetViewsStatsParams) WithLastHours(lastHours *int64) *GetViewsStatsParams { - o.SetLastHours(lastHours) - return o -} - -// SetLastHours adds the lastHours to the get views stats params -func (o *GetViewsStatsParams) SetLastHours(lastHours *int64) { - o.LastHours = lastHours -} - -// WithMetric adds the metric to the get views stats params -func (o *GetViewsStatsParams) WithMetric(metric *string) *GetViewsStatsParams { - o.SetMetric(metric) - return o -} - -// SetMetric adds the metric to the get views stats params -func (o *GetViewsStatsParams) SetMetric(metric *string) { - o.Metric = metric -} - -// WithNumTopViews adds the numTopViews to the get views stats params -func (o *GetViewsStatsParams) WithNumTopViews(numTopViews *int64) *GetViewsStatsParams { - o.SetNumTopViews(numTopViews) - return o -} - -// SetNumTopViews adds the numTopViews to the get views stats params -func (o *GetViewsStatsParams) SetNumTopViews(numTopViews *int64) { - o.NumTopViews = numTopViews -} - -// WithProtocol adds the protocol to the get views stats params -func (o *GetViewsStatsParams) WithProtocol(protocol *string) *GetViewsStatsParams { - o.SetProtocol(protocol) - return o -} - -// SetProtocol adds the protocol to the get views stats params -func (o *GetViewsStatsParams) SetProtocol(protocol *string) { - o.Protocol = protocol -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewsStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.LastHours != nil { - - // query param lastHours - var qrLastHours int64 - - if o.LastHours != nil { - qrLastHours = *o.LastHours - } - qLastHours := swag.FormatInt64(qrLastHours) - if qLastHours != "" { - - if err := r.SetQueryParam("lastHours", qLastHours); err != nil { - return err - } - } - } - - if o.Metric != nil { - - // query param metric - var qrMetric string - - if o.Metric != nil { - qrMetric = *o.Metric - } - qMetric := qrMetric - if qMetric != "" { - - if err := r.SetQueryParam("metric", qMetric); err != nil { - return err - } - } - } - - if o.NumTopViews != nil { - - // query param numTopViews - var qrNumTopViews int64 - - if o.NumTopViews != nil { - qrNumTopViews = *o.NumTopViews - } - qNumTopViews := swag.FormatInt64(qrNumTopViews) - if qNumTopViews != "" { - - if err := r.SetQueryParam("numTopViews", qNumTopViews); err != nil { - return err - } - } - } - - if o.Protocol != nil { - - // query param protocol - var qrProtocol string - - if o.Protocol != nil { - qrProtocol = *o.Protocol - } - qProtocol := qrProtocol - if qProtocol != "" { - - if err := r.SetQueryParam("protocol", qProtocol); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/stats/get_views_stats_responses.go b/v2/client/stats/get_views_stats_responses.go deleted file mode 100644 index 427aea64..00000000 --- a/v2/client/stats/get_views_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewsStatsReader is a Reader for the GetViewsStats structure. -type GetViewsStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewsStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewsStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewsStatsDefault(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 - } -} - -// NewGetViewsStatsOK creates a GetViewsStatsOK with default headers values -func NewGetViewsStatsOK() *GetViewsStatsOK { - return &GetViewsStatsOK{} -} - -/* -GetViewsStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewsStatsOK struct { - Payload *models.ViewsStats -} - -// IsSuccess returns true when this get views stats o k response has a 2xx status code -func (o *GetViewsStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get views stats o k response has a 3xx status code -func (o *GetViewsStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get views stats o k response has a 4xx status code -func (o *GetViewsStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get views stats o k response has a 5xx status code -func (o *GetViewsStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get views stats o k response a status code equal to that given -func (o *GetViewsStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get views stats o k response -func (o *GetViewsStatsOK) Code() int { - return 200 -} - -func (o *GetViewsStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/views][%d] getViewsStatsOK %s", 200, payload) -} - -func (o *GetViewsStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/views][%d] getViewsStatsOK %s", 200, payload) -} - -func (o *GetViewsStatsOK) GetPayload() *models.ViewsStats { - return o.Payload -} - -func (o *GetViewsStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewsStats) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewsStatsDefault creates a GetViewsStatsDefault with default headers values -func NewGetViewsStatsDefault(code int) *GetViewsStatsDefault { - return &GetViewsStatsDefault{ - _statusCode: code, - } -} - -/* -GetViewsStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewsStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get views stats default response has a 2xx status code -func (o *GetViewsStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get views stats default response has a 3xx status code -func (o *GetViewsStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get views stats default response has a 4xx status code -func (o *GetViewsStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get views stats default response has a 5xx status code -func (o *GetViewsStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get views stats default response a status code equal to that given -func (o *GetViewsStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get views stats default response -func (o *GetViewsStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewsStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/views][%d] GetViewsStats default %s", o._statusCode, payload) -} - -func (o *GetViewsStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/views][%d] GetViewsStats default %s", o._statusCode, payload) -} - -func (o *GetViewsStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewsStatsDefault) 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/stats/get_workload_stats_parameters.go b/v2/client/stats/get_workload_stats_parameters.go deleted file mode 100644 index 3303b19b..00000000 --- a/v2/client/stats/get_workload_stats_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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" -) - -// NewGetWorkloadStatsParams creates a new GetWorkloadStatsParams 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 NewGetWorkloadStatsParams() *GetWorkloadStatsParams { - return &GetWorkloadStatsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetWorkloadStatsParamsWithTimeout creates a new GetWorkloadStatsParams object -// with the ability to set a timeout on a request. -func NewGetWorkloadStatsParamsWithTimeout(timeout time.Duration) *GetWorkloadStatsParams { - return &GetWorkloadStatsParams{ - timeout: timeout, - } -} - -// NewGetWorkloadStatsParamsWithContext creates a new GetWorkloadStatsParams object -// with the ability to set a context for a request. -func NewGetWorkloadStatsParamsWithContext(ctx context.Context) *GetWorkloadStatsParams { - return &GetWorkloadStatsParams{ - Context: ctx, - } -} - -// NewGetWorkloadStatsParamsWithHTTPClient creates a new GetWorkloadStatsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetWorkloadStatsParamsWithHTTPClient(client *http.Client) *GetWorkloadStatsParams { - return &GetWorkloadStatsParams{ - HTTPClient: client, - } -} - -/* -GetWorkloadStatsParams contains all the parameters to send to the API endpoint - - for the get workload stats operation. - - Typically these are written to a http.Request. -*/ -type GetWorkloadStatsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get workload stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetWorkloadStatsParams) WithDefaults() *GetWorkloadStatsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get workload stats params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetWorkloadStatsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get workload stats params -func (o *GetWorkloadStatsParams) WithTimeout(timeout time.Duration) *GetWorkloadStatsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get workload stats params -func (o *GetWorkloadStatsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get workload stats params -func (o *GetWorkloadStatsParams) WithContext(ctx context.Context) *GetWorkloadStatsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get workload stats params -func (o *GetWorkloadStatsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get workload stats params -func (o *GetWorkloadStatsParams) WithHTTPClient(client *http.Client) *GetWorkloadStatsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get workload stats params -func (o *GetWorkloadStatsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetWorkloadStatsParams) 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/stats/get_workload_stats_responses.go b/v2/client/stats/get_workload_stats_responses.go deleted file mode 100644 index 9d8ae115..00000000 --- a/v2/client/stats/get_workload_stats_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetWorkloadStatsReader is a Reader for the GetWorkloadStats structure. -type GetWorkloadStatsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetWorkloadStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetWorkloadStatsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetWorkloadStatsDefault(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 - } -} - -// NewGetWorkloadStatsOK creates a GetWorkloadStatsOK with default headers values -func NewGetWorkloadStatsOK() *GetWorkloadStatsOK { - return &GetWorkloadStatsOK{} -} - -/* -GetWorkloadStatsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetWorkloadStatsOK struct { - Payload *models.WorkloadStatsSummary -} - -// IsSuccess returns true when this get workload stats o k response has a 2xx status code -func (o *GetWorkloadStatsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get workload stats o k response has a 3xx status code -func (o *GetWorkloadStatsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get workload stats o k response has a 4xx status code -func (o *GetWorkloadStatsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get workload stats o k response has a 5xx status code -func (o *GetWorkloadStatsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get workload stats o k response a status code equal to that given -func (o *GetWorkloadStatsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get workload stats o k response -func (o *GetWorkloadStatsOK) Code() int { - return 200 -} - -func (o *GetWorkloadStatsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/workload-stats][%d] getWorkloadStatsOK %s", 200, payload) -} - -func (o *GetWorkloadStatsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/workload-stats][%d] getWorkloadStatsOK %s", 200, payload) -} - -func (o *GetWorkloadStatsOK) GetPayload() *models.WorkloadStatsSummary { - return o.Payload -} - -func (o *GetWorkloadStatsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.WorkloadStatsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetWorkloadStatsDefault creates a GetWorkloadStatsDefault with default headers values -func NewGetWorkloadStatsDefault(code int) *GetWorkloadStatsDefault { - return &GetWorkloadStatsDefault{ - _statusCode: code, - } -} - -/* -GetWorkloadStatsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetWorkloadStatsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get workload stats default response has a 2xx status code -func (o *GetWorkloadStatsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get workload stats default response has a 3xx status code -func (o *GetWorkloadStatsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get workload stats default response has a 4xx status code -func (o *GetWorkloadStatsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get workload stats default response has a 5xx status code -func (o *GetWorkloadStatsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get workload stats default response a status code equal to that given -func (o *GetWorkloadStatsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get workload stats default response -func (o *GetWorkloadStatsDefault) Code() int { - return o._statusCode -} - -func (o *GetWorkloadStatsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/workload-stats][%d] GetWorkloadStats default %s", o._statusCode, payload) -} - -func (o *GetWorkloadStatsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /stats/workload-stats][%d] GetWorkloadStats default %s", o._statusCode, payload) -} - -func (o *GetWorkloadStatsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetWorkloadStatsDefault) 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/stats/stats_client.go b/v2/client/stats/stats_client.go deleted file mode 100644 index 996b08c3..00000000 --- a/v2/client/stats/stats_client.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package stats - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new stats API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new stats API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new stats API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for stats API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetClusterStorageStats(params *GetClusterStorageStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStorageStatsOK, error) - - GetFilesStats(params *GetFilesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFilesStatsOK, error) - - GetProtectionRunsStats(params *GetProtectionRunsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsStatsOK, error) - - GetTimeSeriesStats(params *GetTimeSeriesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesStatsOK, error) - - GetViewClientStats(params *GetViewClientStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientStatsOK, error) - - GetViewsStats(params *GetViewsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsStatsOK, error) - - GetWorkloadStats(params *GetWorkloadStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWorkloadStatsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetClusterStorageStats gets cluster storage stats - -Get Cluster Storage Stats. -*/ -func (a *Client) GetClusterStorageStats(params *GetClusterStorageStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStorageStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterStorageStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterStorageStats", - Method: "GET", - PathPattern: "/stats/cluster-storage", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetClusterStorageStatsReader{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.(*GetClusterStorageStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterStorageStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFilesStats gets stats of files - -Get Stats of files. -*/ -func (a *Client) GetFilesStats(params *GetFilesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFilesStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFilesStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetFilesStats", - Method: "GET", - PathPattern: "/stats/files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFilesStatsReader{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.(*GetFilesStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFilesStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetProtectionRunsStats gets statistics of protection runs - -Get statistics of protection runs. -*/ -func (a *Client) GetProtectionRunsStats(params *GetProtectionRunsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProtectionRunsStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetProtectionRunsStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetProtectionRunsStats", - Method: "GET", - PathPattern: "/stats/protection-runs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetProtectionRunsStatsReader{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.(*GetProtectionRunsStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetProtectionRunsStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTimeSeriesStats gets time series stats - -Get Time Series Stats. -*/ -func (a *Client) GetTimeSeriesStats(params *GetTimeSeriesStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTimeSeriesStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTimeSeriesStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTimeSeriesStats", - Method: "GET", - PathPattern: "/stats/time-series-stats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTimeSeriesStatsReader{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.(*GetTimeSeriesStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTimeSeriesStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewClientStats gets stats of view clients - -Get Stats of View Clients. -*/ -func (a *Client) GetViewClientStats(params *GetViewClientStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewClientStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewClientStats", - Method: "GET", - PathPattern: "/stats/view-clients", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewClientStatsReader{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.(*GetViewClientStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewClientStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewsStats gets views stats - -Get Views Stats. -*/ -func (a *Client) GetViewsStats(params *GetViewsStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewsStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewsStats", - Method: "GET", - PathPattern: "/stats/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewsStatsReader{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.(*GetViewsStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewsStatsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetWorkloadStats gets workload stats schema - -Get Workload Stats Schema. API will provide the high level information about different Workloads on Cohesity cluster along with their Entity Ids. -*/ -func (a *Client) GetWorkloadStats(params *GetWorkloadStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetWorkloadStatsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetWorkloadStatsParams() - } - op := &runtime.ClientOperation{ - ID: "GetWorkloadStats", - Method: "GET", - PathPattern: "/stats/workload-stats", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetWorkloadStatsReader{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.(*GetWorkloadStatsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetWorkloadStatsDefault) - 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/v2/client/storage_domain/create_storage_domain_parameters.go b/v2/client/storage_domain/create_storage_domain_parameters.go deleted file mode 100644 index 34b36dc9..00000000 --- a/v2/client/storage_domain/create_storage_domain_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateStorageDomainParams creates a new CreateStorageDomainParams 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 NewCreateStorageDomainParams() *CreateStorageDomainParams { - return &CreateStorageDomainParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateStorageDomainParamsWithTimeout creates a new CreateStorageDomainParams object -// with the ability to set a timeout on a request. -func NewCreateStorageDomainParamsWithTimeout(timeout time.Duration) *CreateStorageDomainParams { - return &CreateStorageDomainParams{ - timeout: timeout, - } -} - -// NewCreateStorageDomainParamsWithContext creates a new CreateStorageDomainParams object -// with the ability to set a context for a request. -func NewCreateStorageDomainParamsWithContext(ctx context.Context) *CreateStorageDomainParams { - return &CreateStorageDomainParams{ - Context: ctx, - } -} - -// NewCreateStorageDomainParamsWithHTTPClient creates a new CreateStorageDomainParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateStorageDomainParamsWithHTTPClient(client *http.Client) *CreateStorageDomainParams { - return &CreateStorageDomainParams{ - HTTPClient: client, - } -} - -/* -CreateStorageDomainParams contains all the parameters to send to the API endpoint - - for the create storage domain operation. - - Typically these are written to a http.Request. -*/ -type CreateStorageDomainParams struct { - - /* Body. - - Specified the request to create a Storage Domain. - */ - Body *models.CreateStorageDomainParam - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateStorageDomainParams) WithDefaults() *CreateStorageDomainParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateStorageDomainParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create storage domain params -func (o *CreateStorageDomainParams) WithTimeout(timeout time.Duration) *CreateStorageDomainParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create storage domain params -func (o *CreateStorageDomainParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create storage domain params -func (o *CreateStorageDomainParams) WithContext(ctx context.Context) *CreateStorageDomainParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create storage domain params -func (o *CreateStorageDomainParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create storage domain params -func (o *CreateStorageDomainParams) WithHTTPClient(client *http.Client) *CreateStorageDomainParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create storage domain params -func (o *CreateStorageDomainParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create storage domain params -func (o *CreateStorageDomainParams) WithBody(body *models.CreateStorageDomainParam) *CreateStorageDomainParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create storage domain params -func (o *CreateStorageDomainParams) SetBody(body *models.CreateStorageDomainParam) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateStorageDomainParams) 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/storage_domain/create_storage_domain_responses.go b/v2/client/storage_domain/create_storage_domain_responses.go deleted file mode 100644 index fe24d361..00000000 --- a/v2/client/storage_domain/create_storage_domain_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateStorageDomainReader is a Reader for the CreateStorageDomain structure. -type CreateStorageDomainReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateStorageDomainReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateStorageDomainCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateStorageDomainDefault(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 - } -} - -// NewCreateStorageDomainCreated creates a CreateStorageDomainCreated with default headers values -func NewCreateStorageDomainCreated() *CreateStorageDomainCreated { - return &CreateStorageDomainCreated{} -} - -/* -CreateStorageDomainCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateStorageDomainCreated struct { - Payload *models.StorageDomain -} - -// IsSuccess returns true when this create storage domain created response has a 2xx status code -func (o *CreateStorageDomainCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create storage domain created response has a 3xx status code -func (o *CreateStorageDomainCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create storage domain created response has a 4xx status code -func (o *CreateStorageDomainCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create storage domain created response has a 5xx status code -func (o *CreateStorageDomainCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create storage domain created response a status code equal to that given -func (o *CreateStorageDomainCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create storage domain created response -func (o *CreateStorageDomainCreated) Code() int { - return 201 -} - -func (o *CreateStorageDomainCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /storage-domains][%d] createStorageDomainCreated %s", 201, payload) -} - -func (o *CreateStorageDomainCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /storage-domains][%d] createStorageDomainCreated %s", 201, payload) -} - -func (o *CreateStorageDomainCreated) GetPayload() *models.StorageDomain { - return o.Payload -} - -func (o *CreateStorageDomainCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StorageDomain) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateStorageDomainDefault creates a CreateStorageDomainDefault with default headers values -func NewCreateStorageDomainDefault(code int) *CreateStorageDomainDefault { - return &CreateStorageDomainDefault{ - _statusCode: code, - } -} - -/* -CreateStorageDomainDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateStorageDomainDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create storage domain default response has a 2xx status code -func (o *CreateStorageDomainDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create storage domain default response has a 3xx status code -func (o *CreateStorageDomainDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create storage domain default response has a 4xx status code -func (o *CreateStorageDomainDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create storage domain default response has a 5xx status code -func (o *CreateStorageDomainDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create storage domain default response a status code equal to that given -func (o *CreateStorageDomainDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create storage domain default response -func (o *CreateStorageDomainDefault) Code() int { - return o._statusCode -} - -func (o *CreateStorageDomainDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /storage-domains][%d] CreateStorageDomain default %s", o._statusCode, payload) -} - -func (o *CreateStorageDomainDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /storage-domains][%d] CreateStorageDomain default %s", o._statusCode, payload) -} - -func (o *CreateStorageDomainDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateStorageDomainDefault) 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/storage_domain/delete_storage_domain_parameters.go b/v2/client/storage_domain/delete_storage_domain_parameters.go deleted file mode 100644 index 2a4337a2..00000000 --- a/v2/client/storage_domain/delete_storage_domain_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/go-openapi/swag" -) - -// NewDeleteStorageDomainParams creates a new DeleteStorageDomainParams 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 NewDeleteStorageDomainParams() *DeleteStorageDomainParams { - return &DeleteStorageDomainParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteStorageDomainParamsWithTimeout creates a new DeleteStorageDomainParams object -// with the ability to set a timeout on a request. -func NewDeleteStorageDomainParamsWithTimeout(timeout time.Duration) *DeleteStorageDomainParams { - return &DeleteStorageDomainParams{ - timeout: timeout, - } -} - -// NewDeleteStorageDomainParamsWithContext creates a new DeleteStorageDomainParams object -// with the ability to set a context for a request. -func NewDeleteStorageDomainParamsWithContext(ctx context.Context) *DeleteStorageDomainParams { - return &DeleteStorageDomainParams{ - Context: ctx, - } -} - -// NewDeleteStorageDomainParamsWithHTTPClient creates a new DeleteStorageDomainParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteStorageDomainParamsWithHTTPClient(client *http.Client) *DeleteStorageDomainParams { - return &DeleteStorageDomainParams{ - HTTPClient: client, - } -} - -/* -DeleteStorageDomainParams contains all the parameters to send to the API endpoint - - for the delete storage domain operation. - - Typically these are written to a http.Request. -*/ -type DeleteStorageDomainParams struct { - - /* ID. - - Specified the Storage Domain id to delete. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteStorageDomainParams) WithDefaults() *DeleteStorageDomainParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteStorageDomainParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete storage domain params -func (o *DeleteStorageDomainParams) WithTimeout(timeout time.Duration) *DeleteStorageDomainParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete storage domain params -func (o *DeleteStorageDomainParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete storage domain params -func (o *DeleteStorageDomainParams) WithContext(ctx context.Context) *DeleteStorageDomainParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete storage domain params -func (o *DeleteStorageDomainParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete storage domain params -func (o *DeleteStorageDomainParams) WithHTTPClient(client *http.Client) *DeleteStorageDomainParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete storage domain params -func (o *DeleteStorageDomainParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete storage domain params -func (o *DeleteStorageDomainParams) WithID(id int64) *DeleteStorageDomainParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete storage domain params -func (o *DeleteStorageDomainParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteStorageDomainParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/storage_domain/delete_storage_domain_responses.go b/v2/client/storage_domain/delete_storage_domain_responses.go deleted file mode 100644 index 48471226..00000000 --- a/v2/client/storage_domain/delete_storage_domain_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteStorageDomainReader is a Reader for the DeleteStorageDomain structure. -type DeleteStorageDomainReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteStorageDomainReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteStorageDomainNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteStorageDomainDefault(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 - } -} - -// NewDeleteStorageDomainNoContent creates a DeleteStorageDomainNoContent with default headers values -func NewDeleteStorageDomainNoContent() *DeleteStorageDomainNoContent { - return &DeleteStorageDomainNoContent{} -} - -/* -DeleteStorageDomainNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteStorageDomainNoContent struct { -} - -// IsSuccess returns true when this delete storage domain no content response has a 2xx status code -func (o *DeleteStorageDomainNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete storage domain no content response has a 3xx status code -func (o *DeleteStorageDomainNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete storage domain no content response has a 4xx status code -func (o *DeleteStorageDomainNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete storage domain no content response has a 5xx status code -func (o *DeleteStorageDomainNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete storage domain no content response a status code equal to that given -func (o *DeleteStorageDomainNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete storage domain no content response -func (o *DeleteStorageDomainNoContent) Code() int { - return 204 -} - -func (o *DeleteStorageDomainNoContent) Error() string { - return fmt.Sprintf("[DELETE /storage-domains/{id}][%d] deleteStorageDomainNoContent", 204) -} - -func (o *DeleteStorageDomainNoContent) String() string { - return fmt.Sprintf("[DELETE /storage-domains/{id}][%d] deleteStorageDomainNoContent", 204) -} - -func (o *DeleteStorageDomainNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteStorageDomainDefault creates a DeleteStorageDomainDefault with default headers values -func NewDeleteStorageDomainDefault(code int) *DeleteStorageDomainDefault { - return &DeleteStorageDomainDefault{ - _statusCode: code, - } -} - -/* -DeleteStorageDomainDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteStorageDomainDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete storage domain default response has a 2xx status code -func (o *DeleteStorageDomainDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete storage domain default response has a 3xx status code -func (o *DeleteStorageDomainDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete storage domain default response has a 4xx status code -func (o *DeleteStorageDomainDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete storage domain default response has a 5xx status code -func (o *DeleteStorageDomainDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete storage domain default response a status code equal to that given -func (o *DeleteStorageDomainDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete storage domain default response -func (o *DeleteStorageDomainDefault) Code() int { - return o._statusCode -} - -func (o *DeleteStorageDomainDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /storage-domains/{id}][%d] DeleteStorageDomain default %s", o._statusCode, payload) -} - -func (o *DeleteStorageDomainDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /storage-domains/{id}][%d] DeleteStorageDomain default %s", o._statusCode, payload) -} - -func (o *DeleteStorageDomainDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteStorageDomainDefault) 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/storage_domain/get_storage_domain_by_id_parameters.go b/v2/client/storage_domain/get_storage_domain_by_id_parameters.go deleted file mode 100644 index 13872ef2..00000000 --- a/v2/client/storage_domain/get_storage_domain_by_id_parameters.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/go-openapi/swag" -) - -// NewGetStorageDomainByIDParams creates a new GetStorageDomainByIDParams 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 NewGetStorageDomainByIDParams() *GetStorageDomainByIDParams { - return &GetStorageDomainByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStorageDomainByIDParamsWithTimeout creates a new GetStorageDomainByIDParams object -// with the ability to set a timeout on a request. -func NewGetStorageDomainByIDParamsWithTimeout(timeout time.Duration) *GetStorageDomainByIDParams { - return &GetStorageDomainByIDParams{ - timeout: timeout, - } -} - -// NewGetStorageDomainByIDParamsWithContext creates a new GetStorageDomainByIDParams object -// with the ability to set a context for a request. -func NewGetStorageDomainByIDParamsWithContext(ctx context.Context) *GetStorageDomainByIDParams { - return &GetStorageDomainByIDParams{ - Context: ctx, - } -} - -// NewGetStorageDomainByIDParamsWithHTTPClient creates a new GetStorageDomainByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStorageDomainByIDParamsWithHTTPClient(client *http.Client) *GetStorageDomainByIDParams { - return &GetStorageDomainByIDParams{ - HTTPClient: client, - } -} - -/* -GetStorageDomainByIDParams contains all the parameters to send to the API endpoint - - for the get storage domain by Id operation. - - Typically these are written to a http.Request. -*/ -type GetStorageDomainByIDParams struct { - - /* ID. - - Specified the Storage Domain id to fetch. - - Format: int64 - */ - ID int64 - - /* IncludeFileCountBySize. - - Whether to include Storage Domain file count by size. - */ - IncludeFileCountBySize *bool - - /* IncludeStats. - - Whether to include Storage Domain stats in response. - */ - IncludeStats *bool - - /* IncludeTenants. - - Whether to include Storage Domains that belong to Tenants. This param is only effective when the User has privilege to view Storage Domain details of a tenant. - */ - IncludeTenants *bool - - /* IncludeTimeSeriesSchema. - - Whether to include Storage Domain time series schema in response. - */ - IncludeTimeSeriesSchema *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get storage domain by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageDomainByIDParams) WithDefaults() *GetStorageDomainByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get storage domain by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageDomainByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithTimeout(timeout time.Duration) *GetStorageDomainByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithContext(ctx context.Context) *GetStorageDomainByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithHTTPClient(client *http.Client) *GetStorageDomainByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithID(id int64) *GetStorageDomainByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetID(id int64) { - o.ID = id -} - -// WithIncludeFileCountBySize adds the includeFileCountBySize to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithIncludeFileCountBySize(includeFileCountBySize *bool) *GetStorageDomainByIDParams { - o.SetIncludeFileCountBySize(includeFileCountBySize) - return o -} - -// SetIncludeFileCountBySize adds the includeFileCountBySize to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetIncludeFileCountBySize(includeFileCountBySize *bool) { - o.IncludeFileCountBySize = includeFileCountBySize -} - -// WithIncludeStats adds the includeStats to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithIncludeStats(includeStats *bool) *GetStorageDomainByIDParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeTenants adds the includeTenants to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithIncludeTenants(includeTenants *bool) *GetStorageDomainByIDParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIncludeTimeSeriesSchema adds the includeTimeSeriesSchema to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) WithIncludeTimeSeriesSchema(includeTimeSeriesSchema *bool) *GetStorageDomainByIDParams { - o.SetIncludeTimeSeriesSchema(includeTimeSeriesSchema) - return o -} - -// SetIncludeTimeSeriesSchema adds the includeTimeSeriesSchema to the get storage domain by Id params -func (o *GetStorageDomainByIDParams) SetIncludeTimeSeriesSchema(includeTimeSeriesSchema *bool) { - o.IncludeTimeSeriesSchema = includeTimeSeriesSchema -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStorageDomainByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.IncludeFileCountBySize != nil { - - // query param includeFileCountBySize - var qrIncludeFileCountBySize bool - - if o.IncludeFileCountBySize != nil { - qrIncludeFileCountBySize = *o.IncludeFileCountBySize - } - qIncludeFileCountBySize := swag.FormatBool(qrIncludeFileCountBySize) - if qIncludeFileCountBySize != "" { - - if err := r.SetQueryParam("includeFileCountBySize", qIncludeFileCountBySize); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); 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.IncludeTimeSeriesSchema != nil { - - // query param includeTimeSeriesSchema - var qrIncludeTimeSeriesSchema bool - - if o.IncludeTimeSeriesSchema != nil { - qrIncludeTimeSeriesSchema = *o.IncludeTimeSeriesSchema - } - qIncludeTimeSeriesSchema := swag.FormatBool(qrIncludeTimeSeriesSchema) - if qIncludeTimeSeriesSchema != "" { - - if err := r.SetQueryParam("includeTimeSeriesSchema", qIncludeTimeSeriesSchema); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/storage_domain/get_storage_domain_by_id_responses.go b/v2/client/storage_domain/get_storage_domain_by_id_responses.go deleted file mode 100644 index 8911d36c..00000000 --- a/v2/client/storage_domain/get_storage_domain_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetStorageDomainByIDReader is a Reader for the GetStorageDomainByID structure. -type GetStorageDomainByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetStorageDomainByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStorageDomainByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetStorageDomainByIDDefault(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 - } -} - -// NewGetStorageDomainByIDOK creates a GetStorageDomainByIDOK with default headers values -func NewGetStorageDomainByIDOK() *GetStorageDomainByIDOK { - return &GetStorageDomainByIDOK{} -} - -/* -GetStorageDomainByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStorageDomainByIDOK struct { - Payload *models.StorageDomain -} - -// IsSuccess returns true when this get storage domain by Id o k response has a 2xx status code -func (o *GetStorageDomainByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get storage domain by Id o k response has a 3xx status code -func (o *GetStorageDomainByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get storage domain by Id o k response has a 4xx status code -func (o *GetStorageDomainByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get storage domain by Id o k response has a 5xx status code -func (o *GetStorageDomainByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get storage domain by Id o k response a status code equal to that given -func (o *GetStorageDomainByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get storage domain by Id o k response -func (o *GetStorageDomainByIDOK) Code() int { - return 200 -} - -func (o *GetStorageDomainByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains/{id}][%d] getStorageDomainByIdOK %s", 200, payload) -} - -func (o *GetStorageDomainByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains/{id}][%d] getStorageDomainByIdOK %s", 200, payload) -} - -func (o *GetStorageDomainByIDOK) GetPayload() *models.StorageDomain { - return o.Payload -} - -func (o *GetStorageDomainByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StorageDomain) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetStorageDomainByIDDefault creates a GetStorageDomainByIDDefault with default headers values -func NewGetStorageDomainByIDDefault(code int) *GetStorageDomainByIDDefault { - return &GetStorageDomainByIDDefault{ - _statusCode: code, - } -} - -/* -GetStorageDomainByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetStorageDomainByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get storage domain by Id default response has a 2xx status code -func (o *GetStorageDomainByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get storage domain by Id default response has a 3xx status code -func (o *GetStorageDomainByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get storage domain by Id default response has a 4xx status code -func (o *GetStorageDomainByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get storage domain by Id default response has a 5xx status code -func (o *GetStorageDomainByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get storage domain by Id default response a status code equal to that given -func (o *GetStorageDomainByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get storage domain by Id default response -func (o *GetStorageDomainByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetStorageDomainByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains/{id}][%d] GetStorageDomainById default %s", o._statusCode, payload) -} - -func (o *GetStorageDomainByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains/{id}][%d] GetStorageDomainById default %s", o._statusCode, payload) -} - -func (o *GetStorageDomainByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetStorageDomainByIDDefault) 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/storage_domain/get_storage_domains_parameters.go b/v2/client/storage_domain/get_storage_domains_parameters.go deleted file mode 100644 index 49ee8ef9..00000000 --- a/v2/client/storage_domain/get_storage_domains_parameters.go +++ /dev/null @@ -1,516 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/go-openapi/swag" -) - -// NewGetStorageDomainsParams creates a new GetStorageDomainsParams 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 NewGetStorageDomainsParams() *GetStorageDomainsParams { - return &GetStorageDomainsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStorageDomainsParamsWithTimeout creates a new GetStorageDomainsParams object -// with the ability to set a timeout on a request. -func NewGetStorageDomainsParamsWithTimeout(timeout time.Duration) *GetStorageDomainsParams { - return &GetStorageDomainsParams{ - timeout: timeout, - } -} - -// NewGetStorageDomainsParamsWithContext creates a new GetStorageDomainsParams object -// with the ability to set a context for a request. -func NewGetStorageDomainsParamsWithContext(ctx context.Context) *GetStorageDomainsParams { - return &GetStorageDomainsParams{ - Context: ctx, - } -} - -// NewGetStorageDomainsParamsWithHTTPClient creates a new GetStorageDomainsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStorageDomainsParamsWithHTTPClient(client *http.Client) *GetStorageDomainsParams { - return &GetStorageDomainsParams{ - HTTPClient: client, - } -} - -/* -GetStorageDomainsParams contains all the parameters to send to the API endpoint - - for the get storage domains operation. - - Typically these are written to a http.Request. -*/ -type GetStorageDomainsParams struct { - - /* ClusterPartitionIds. - - Filter by a list of cluster partition ids. - */ - ClusterPartitionIds []int64 - - /* Ids. - - Filter by a list of Storage Domain ids. - */ - Ids []int64 - - /* IncludeFileCountBySize. - - Whether to include Storage Domain file count by size. - */ - IncludeFileCountBySize *bool - - /* IncludeStats. - - Whether to include Storage Domain stats in response. - */ - IncludeStats *bool - - /* IncludeTenants. - - IncludeTenants specifies if Storage Domains of all the tenants under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* IncludeTimeSeriesSchema. - - Whether to include Storage Domain time series schema in response. - */ - IncludeTimeSeriesSchema *bool - - /* MatchPartialNames. - - If true, the names in viewNames are matched by any partial rather than exactly matched. - */ - MatchPartialNames *bool - - /* Names. - - Filter by a list of Storage Domain names. - */ - Names []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which Storage Domains are to be returned. - */ - TenantIds []string - - /* ViewTemplateID. - - Specifies a view template id for Storage Domain. Storage Domains with same deduplication and compression settings will be recommended. - - Format: int64 - */ - ViewTemplateID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get storage domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageDomainsParams) WithDefaults() *GetStorageDomainsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get storage domains params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStorageDomainsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get storage domains params -func (o *GetStorageDomainsParams) WithTimeout(timeout time.Duration) *GetStorageDomainsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get storage domains params -func (o *GetStorageDomainsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get storage domains params -func (o *GetStorageDomainsParams) WithContext(ctx context.Context) *GetStorageDomainsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get storage domains params -func (o *GetStorageDomainsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get storage domains params -func (o *GetStorageDomainsParams) WithHTTPClient(client *http.Client) *GetStorageDomainsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get storage domains params -func (o *GetStorageDomainsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterPartitionIds adds the clusterPartitionIds to the get storage domains params -func (o *GetStorageDomainsParams) WithClusterPartitionIds(clusterPartitionIds []int64) *GetStorageDomainsParams { - o.SetClusterPartitionIds(clusterPartitionIds) - return o -} - -// SetClusterPartitionIds adds the clusterPartitionIds to the get storage domains params -func (o *GetStorageDomainsParams) SetClusterPartitionIds(clusterPartitionIds []int64) { - o.ClusterPartitionIds = clusterPartitionIds -} - -// WithIds adds the ids to the get storage domains params -func (o *GetStorageDomainsParams) WithIds(ids []int64) *GetStorageDomainsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get storage domains params -func (o *GetStorageDomainsParams) SetIds(ids []int64) { - o.Ids = ids -} - -// WithIncludeFileCountBySize adds the includeFileCountBySize to the get storage domains params -func (o *GetStorageDomainsParams) WithIncludeFileCountBySize(includeFileCountBySize *bool) *GetStorageDomainsParams { - o.SetIncludeFileCountBySize(includeFileCountBySize) - return o -} - -// SetIncludeFileCountBySize adds the includeFileCountBySize to the get storage domains params -func (o *GetStorageDomainsParams) SetIncludeFileCountBySize(includeFileCountBySize *bool) { - o.IncludeFileCountBySize = includeFileCountBySize -} - -// WithIncludeStats adds the includeStats to the get storage domains params -func (o *GetStorageDomainsParams) WithIncludeStats(includeStats *bool) *GetStorageDomainsParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the get storage domains params -func (o *GetStorageDomainsParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeTenants adds the includeTenants to the get storage domains params -func (o *GetStorageDomainsParams) WithIncludeTenants(includeTenants *bool) *GetStorageDomainsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get storage domains params -func (o *GetStorageDomainsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIncludeTimeSeriesSchema adds the includeTimeSeriesSchema to the get storage domains params -func (o *GetStorageDomainsParams) WithIncludeTimeSeriesSchema(includeTimeSeriesSchema *bool) *GetStorageDomainsParams { - o.SetIncludeTimeSeriesSchema(includeTimeSeriesSchema) - return o -} - -// SetIncludeTimeSeriesSchema adds the includeTimeSeriesSchema to the get storage domains params -func (o *GetStorageDomainsParams) SetIncludeTimeSeriesSchema(includeTimeSeriesSchema *bool) { - o.IncludeTimeSeriesSchema = includeTimeSeriesSchema -} - -// WithMatchPartialNames adds the matchPartialNames to the get storage domains params -func (o *GetStorageDomainsParams) WithMatchPartialNames(matchPartialNames *bool) *GetStorageDomainsParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get storage domains params -func (o *GetStorageDomainsParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithNames adds the names to the get storage domains params -func (o *GetStorageDomainsParams) WithNames(names []string) *GetStorageDomainsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get storage domains params -func (o *GetStorageDomainsParams) SetNames(names []string) { - o.Names = names -} - -// WithTenantIds adds the tenantIds to the get storage domains params -func (o *GetStorageDomainsParams) WithTenantIds(tenantIds []string) *GetStorageDomainsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get storage domains params -func (o *GetStorageDomainsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithViewTemplateID adds the viewTemplateID to the get storage domains params -func (o *GetStorageDomainsParams) WithViewTemplateID(viewTemplateID *int64) *GetStorageDomainsParams { - o.SetViewTemplateID(viewTemplateID) - return o -} - -// SetViewTemplateID adds the viewTemplateId to the get storage domains params -func (o *GetStorageDomainsParams) SetViewTemplateID(viewTemplateID *int64) { - o.ViewTemplateID = viewTemplateID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStorageDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClusterPartitionIds != nil { - - // binding items for clusterPartitionIds - joinedClusterPartitionIds := o.bindParamClusterPartitionIds(reg) - - // query array param clusterPartitionIds - if err := r.SetQueryParam("clusterPartitionIds", joinedClusterPartitionIds...); err != nil { - return err - } - } - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeFileCountBySize != nil { - - // query param includeFileCountBySize - var qrIncludeFileCountBySize bool - - if o.IncludeFileCountBySize != nil { - qrIncludeFileCountBySize = *o.IncludeFileCountBySize - } - qIncludeFileCountBySize := swag.FormatBool(qrIncludeFileCountBySize) - if qIncludeFileCountBySize != "" { - - if err := r.SetQueryParam("includeFileCountBySize", qIncludeFileCountBySize); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); 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.IncludeTimeSeriesSchema != nil { - - // query param includeTimeSeriesSchema - var qrIncludeTimeSeriesSchema bool - - if o.IncludeTimeSeriesSchema != nil { - qrIncludeTimeSeriesSchema = *o.IncludeTimeSeriesSchema - } - qIncludeTimeSeriesSchema := swag.FormatBool(qrIncludeTimeSeriesSchema) - if qIncludeTimeSeriesSchema != "" { - - if err := r.SetQueryParam("includeTimeSeriesSchema", qIncludeTimeSeriesSchema); err != nil { - return err - } - } - } - - if o.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - 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.ViewTemplateID != nil { - - // query param viewTemplateId - var qrViewTemplateID int64 - - if o.ViewTemplateID != nil { - qrViewTemplateID = *o.ViewTemplateID - } - qViewTemplateID := swag.FormatInt64(qrViewTemplateID) - if qViewTemplateID != "" { - - if err := r.SetQueryParam("viewTemplateId", qViewTemplateID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetStorageDomains binds the parameter clusterPartitionIds -func (o *GetStorageDomainsParams) bindParamClusterPartitionIds(formats strfmt.Registry) []string { - clusterPartitionIdsIR := o.ClusterPartitionIds - - var clusterPartitionIdsIC []string - for _, clusterPartitionIdsIIR := range clusterPartitionIdsIR { // explode []int64 - - clusterPartitionIdsIIV := swag.FormatInt64(clusterPartitionIdsIIR) // int64 as string - clusterPartitionIdsIC = append(clusterPartitionIdsIC, clusterPartitionIdsIIV) - } - - // items.CollectionFormat: "" - clusterPartitionIdsIS := swag.JoinByFormat(clusterPartitionIdsIC, "") - - return clusterPartitionIdsIS -} - -// bindParamGetStorageDomains binds the parameter ids -func (o *GetStorageDomainsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []int64 - - idsIIV := swag.FormatInt64(idsIIR) // int64 as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetStorageDomains binds the parameter names -func (o *GetStorageDomainsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetStorageDomains binds the parameter tenantIds -func (o *GetStorageDomainsParams) 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/client/storage_domain/get_storage_domains_responses.go b/v2/client/storage_domain/get_storage_domains_responses.go deleted file mode 100644 index cca36bfb..00000000 --- a/v2/client/storage_domain/get_storage_domains_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetStorageDomainsReader is a Reader for the GetStorageDomains structure. -type GetStorageDomainsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetStorageDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStorageDomainsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetStorageDomainsDefault(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 - } -} - -// NewGetStorageDomainsOK creates a GetStorageDomainsOK with default headers values -func NewGetStorageDomainsOK() *GetStorageDomainsOK { - return &GetStorageDomainsOK{} -} - -/* -GetStorageDomainsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStorageDomainsOK struct { - Payload *models.StorageDomains -} - -// IsSuccess returns true when this get storage domains o k response has a 2xx status code -func (o *GetStorageDomainsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get storage domains o k response has a 3xx status code -func (o *GetStorageDomainsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get storage domains o k response has a 4xx status code -func (o *GetStorageDomainsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get storage domains o k response has a 5xx status code -func (o *GetStorageDomainsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get storage domains o k response a status code equal to that given -func (o *GetStorageDomainsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get storage domains o k response -func (o *GetStorageDomainsOK) Code() int { - return 200 -} - -func (o *GetStorageDomainsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains][%d] getStorageDomainsOK %s", 200, payload) -} - -func (o *GetStorageDomainsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains][%d] getStorageDomainsOK %s", 200, payload) -} - -func (o *GetStorageDomainsOK) GetPayload() *models.StorageDomains { - return o.Payload -} - -func (o *GetStorageDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StorageDomains) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetStorageDomainsDefault creates a GetStorageDomainsDefault with default headers values -func NewGetStorageDomainsDefault(code int) *GetStorageDomainsDefault { - return &GetStorageDomainsDefault{ - _statusCode: code, - } -} - -/* -GetStorageDomainsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetStorageDomainsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get storage domains default response has a 2xx status code -func (o *GetStorageDomainsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get storage domains default response has a 3xx status code -func (o *GetStorageDomainsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get storage domains default response has a 4xx status code -func (o *GetStorageDomainsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get storage domains default response has a 5xx status code -func (o *GetStorageDomainsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get storage domains default response a status code equal to that given -func (o *GetStorageDomainsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get storage domains default response -func (o *GetStorageDomainsDefault) Code() int { - return o._statusCode -} - -func (o *GetStorageDomainsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains][%d] GetStorageDomains default %s", o._statusCode, payload) -} - -func (o *GetStorageDomainsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /storage-domains][%d] GetStorageDomains default %s", o._statusCode, payload) -} - -func (o *GetStorageDomainsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetStorageDomainsDefault) 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/storage_domain/storage_domain_client.go b/v2/client/storage_domain/storage_domain_client.go deleted file mode 100644 index 5cc3830d..00000000 --- a/v2/client/storage_domain/storage_domain_client.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new storage domain API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new storage domain API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new storage domain API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for storage domain API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateStorageDomain(params *CreateStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateStorageDomainCreated, error) - - DeleteStorageDomain(params *DeleteStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteStorageDomainNoContent, error) - - GetStorageDomainByID(params *GetStorageDomainByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageDomainByIDOK, error) - - GetStorageDomains(params *GetStorageDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageDomainsOK, error) - - UpdateStorageDomain(params *UpdateStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateStorageDomainOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateStorageDomain creates a storage domain - -Create a Storage Domain. -*/ -func (a *Client) CreateStorageDomain(params *CreateStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateStorageDomainCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateStorageDomainParams() - } - op := &runtime.ClientOperation{ - ID: "CreateStorageDomain", - Method: "POST", - PathPattern: "/storage-domains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateStorageDomainReader{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.(*CreateStorageDomainCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateStorageDomainDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteStorageDomain deletes a storage domain - -Delete a Storage Domain. -*/ -func (a *Client) DeleteStorageDomain(params *DeleteStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteStorageDomainNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteStorageDomainParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteStorageDomain", - Method: "DELETE", - PathPattern: "/storage-domains/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteStorageDomainReader{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.(*DeleteStorageDomainNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteStorageDomainDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetStorageDomainByID gets a storage domain by id - -Get a Storage Domain by id. -*/ -func (a *Client) GetStorageDomainByID(params *GetStorageDomainByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageDomainByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStorageDomainByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetStorageDomainById", - Method: "GET", - PathPattern: "/storage-domains/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetStorageDomainByIDReader{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.(*GetStorageDomainByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetStorageDomainByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetStorageDomains gets storage domains - -Get Storage Domains. -*/ -func (a *Client) GetStorageDomains(params *GetStorageDomainsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStorageDomainsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStorageDomainsParams() - } - op := &runtime.ClientOperation{ - ID: "GetStorageDomains", - Method: "GET", - PathPattern: "/storage-domains", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetStorageDomainsReader{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.(*GetStorageDomainsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetStorageDomainsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateStorageDomain updates a storage domain - -Update a Storage Domain. -*/ -func (a *Client) UpdateStorageDomain(params *UpdateStorageDomainParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateStorageDomainOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateStorageDomainParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateStorageDomain", - Method: "PUT", - PathPattern: "/storage-domains/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateStorageDomainReader{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.(*UpdateStorageDomainOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateStorageDomainDefault) - 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/v2/client/storage_domain/update_storage_domain_parameters.go b/v2/client/storage_domain/update_storage_domain_parameters.go deleted file mode 100644 index 1b9aa6eb..00000000 --- a/v2/client/storage_domain/update_storage_domain_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateStorageDomainParams creates a new UpdateStorageDomainParams 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 NewUpdateStorageDomainParams() *UpdateStorageDomainParams { - return &UpdateStorageDomainParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateStorageDomainParamsWithTimeout creates a new UpdateStorageDomainParams object -// with the ability to set a timeout on a request. -func NewUpdateStorageDomainParamsWithTimeout(timeout time.Duration) *UpdateStorageDomainParams { - return &UpdateStorageDomainParams{ - timeout: timeout, - } -} - -// NewUpdateStorageDomainParamsWithContext creates a new UpdateStorageDomainParams object -// with the ability to set a context for a request. -func NewUpdateStorageDomainParamsWithContext(ctx context.Context) *UpdateStorageDomainParams { - return &UpdateStorageDomainParams{ - Context: ctx, - } -} - -// NewUpdateStorageDomainParamsWithHTTPClient creates a new UpdateStorageDomainParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateStorageDomainParamsWithHTTPClient(client *http.Client) *UpdateStorageDomainParams { - return &UpdateStorageDomainParams{ - HTTPClient: client, - } -} - -/* -UpdateStorageDomainParams contains all the parameters to send to the API endpoint - - for the update storage domain operation. - - Typically these are written to a http.Request. -*/ -type UpdateStorageDomainParams struct { - - /* Body. - - Specified the request to update a Storage Domain. - */ - Body *models.UpdateStorageDomainParam - - /* ID. - - Specified the Storage Domain id to update. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateStorageDomainParams) WithDefaults() *UpdateStorageDomainParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update storage domain params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateStorageDomainParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update storage domain params -func (o *UpdateStorageDomainParams) WithTimeout(timeout time.Duration) *UpdateStorageDomainParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update storage domain params -func (o *UpdateStorageDomainParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update storage domain params -func (o *UpdateStorageDomainParams) WithContext(ctx context.Context) *UpdateStorageDomainParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update storage domain params -func (o *UpdateStorageDomainParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update storage domain params -func (o *UpdateStorageDomainParams) WithHTTPClient(client *http.Client) *UpdateStorageDomainParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update storage domain params -func (o *UpdateStorageDomainParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update storage domain params -func (o *UpdateStorageDomainParams) WithBody(body *models.UpdateStorageDomainParam) *UpdateStorageDomainParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update storage domain params -func (o *UpdateStorageDomainParams) SetBody(body *models.UpdateStorageDomainParam) { - o.Body = body -} - -// WithID adds the id to the update storage domain params -func (o *UpdateStorageDomainParams) WithID(id int64) *UpdateStorageDomainParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update storage domain params -func (o *UpdateStorageDomainParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateStorageDomainParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/storage_domain/update_storage_domain_responses.go b/v2/client/storage_domain/update_storage_domain_responses.go deleted file mode 100644 index 8a5b852b..00000000 --- a/v2/client/storage_domain/update_storage_domain_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package storage_domain - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateStorageDomainReader is a Reader for the UpdateStorageDomain structure. -type UpdateStorageDomainReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateStorageDomainReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateStorageDomainOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateStorageDomainDefault(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 - } -} - -// NewUpdateStorageDomainOK creates a UpdateStorageDomainOK with default headers values -func NewUpdateStorageDomainOK() *UpdateStorageDomainOK { - return &UpdateStorageDomainOK{} -} - -/* -UpdateStorageDomainOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateStorageDomainOK struct { - Payload *models.StorageDomain -} - -// IsSuccess returns true when this update storage domain o k response has a 2xx status code -func (o *UpdateStorageDomainOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update storage domain o k response has a 3xx status code -func (o *UpdateStorageDomainOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update storage domain o k response has a 4xx status code -func (o *UpdateStorageDomainOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update storage domain o k response has a 5xx status code -func (o *UpdateStorageDomainOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update storage domain o k response a status code equal to that given -func (o *UpdateStorageDomainOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update storage domain o k response -func (o *UpdateStorageDomainOK) Code() int { - return 200 -} - -func (o *UpdateStorageDomainOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /storage-domains/{id}][%d] updateStorageDomainOK %s", 200, payload) -} - -func (o *UpdateStorageDomainOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /storage-domains/{id}][%d] updateStorageDomainOK %s", 200, payload) -} - -func (o *UpdateStorageDomainOK) GetPayload() *models.StorageDomain { - return o.Payload -} - -func (o *UpdateStorageDomainOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StorageDomain) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateStorageDomainDefault creates a UpdateStorageDomainDefault with default headers values -func NewUpdateStorageDomainDefault(code int) *UpdateStorageDomainDefault { - return &UpdateStorageDomainDefault{ - _statusCode: code, - } -} - -/* -UpdateStorageDomainDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateStorageDomainDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update storage domain default response has a 2xx status code -func (o *UpdateStorageDomainDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update storage domain default response has a 3xx status code -func (o *UpdateStorageDomainDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update storage domain default response has a 4xx status code -func (o *UpdateStorageDomainDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update storage domain default response has a 5xx status code -func (o *UpdateStorageDomainDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update storage domain default response a status code equal to that given -func (o *UpdateStorageDomainDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update storage domain default response -func (o *UpdateStorageDomainDefault) Code() int { - return o._statusCode -} - -func (o *UpdateStorageDomainDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /storage-domains/{id}][%d] UpdateStorageDomain default %s", o._statusCode, payload) -} - -func (o *UpdateStorageDomainDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /storage-domains/{id}][%d] UpdateStorageDomain default %s", o._statusCode, payload) -} - -func (o *UpdateStorageDomainDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateStorageDomainDefault) 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/support/get_support_user_config_parameters.go b/v2/client/support/get_support_user_config_parameters.go deleted file mode 100644 index 3d07bd57..00000000 --- a/v2/client/support/get_support_user_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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" -) - -// NewGetSupportUserConfigParams creates a new GetSupportUserConfigParams 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 NewGetSupportUserConfigParams() *GetSupportUserConfigParams { - return &GetSupportUserConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSupportUserConfigParamsWithTimeout creates a new GetSupportUserConfigParams object -// with the ability to set a timeout on a request. -func NewGetSupportUserConfigParamsWithTimeout(timeout time.Duration) *GetSupportUserConfigParams { - return &GetSupportUserConfigParams{ - timeout: timeout, - } -} - -// NewGetSupportUserConfigParamsWithContext creates a new GetSupportUserConfigParams object -// with the ability to set a context for a request. -func NewGetSupportUserConfigParamsWithContext(ctx context.Context) *GetSupportUserConfigParams { - return &GetSupportUserConfigParams{ - Context: ctx, - } -} - -// NewGetSupportUserConfigParamsWithHTTPClient creates a new GetSupportUserConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSupportUserConfigParamsWithHTTPClient(client *http.Client) *GetSupportUserConfigParams { - return &GetSupportUserConfigParams{ - HTTPClient: client, - } -} - -/* -GetSupportUserConfigParams contains all the parameters to send to the API endpoint - - for the get support user config operation. - - Typically these are written to a http.Request. -*/ -type GetSupportUserConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get support user config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportUserConfigParams) WithDefaults() *GetSupportUserConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get support user config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportUserConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get support user config params -func (o *GetSupportUserConfigParams) WithTimeout(timeout time.Duration) *GetSupportUserConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get support user config params -func (o *GetSupportUserConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get support user config params -func (o *GetSupportUserConfigParams) WithContext(ctx context.Context) *GetSupportUserConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get support user config params -func (o *GetSupportUserConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get support user config params -func (o *GetSupportUserConfigParams) WithHTTPClient(client *http.Client) *GetSupportUserConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get support user config params -func (o *GetSupportUserConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSupportUserConfigParams) 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/support/get_support_user_config_responses.go b/v2/client/support/get_support_user_config_responses.go deleted file mode 100644 index 01120324..00000000 --- a/v2/client/support/get_support_user_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSupportUserConfigReader is a Reader for the GetSupportUserConfig structure. -type GetSupportUserConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSupportUserConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSupportUserConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSupportUserConfigDefault(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 - } -} - -// NewGetSupportUserConfigOK creates a GetSupportUserConfigOK with default headers values -func NewGetSupportUserConfigOK() *GetSupportUserConfigOK { - return &GetSupportUserConfigOK{} -} - -/* -GetSupportUserConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSupportUserConfigOK struct { - Payload *models.SupportUserConfig -} - -// IsSuccess returns true when this get support user config o k response has a 2xx status code -func (o *GetSupportUserConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get support user config o k response has a 3xx status code -func (o *GetSupportUserConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get support user config o k response has a 4xx status code -func (o *GetSupportUserConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get support user config o k response has a 5xx status code -func (o *GetSupportUserConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get support user config o k response a status code equal to that given -func (o *GetSupportUserConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get support user config o k response -func (o *GetSupportUserConfigOK) Code() int { - return 200 -} - -func (o *GetSupportUserConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/config][%d] getSupportUserConfigOK %s", 200, payload) -} - -func (o *GetSupportUserConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/config][%d] getSupportUserConfigOK %s", 200, payload) -} - -func (o *GetSupportUserConfigOK) GetPayload() *models.SupportUserConfig { - return o.Payload -} - -func (o *GetSupportUserConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SupportUserConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSupportUserConfigDefault creates a GetSupportUserConfigDefault with default headers values -func NewGetSupportUserConfigDefault(code int) *GetSupportUserConfigDefault { - return &GetSupportUserConfigDefault{ - _statusCode: code, - } -} - -/* -GetSupportUserConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSupportUserConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get support user config default response has a 2xx status code -func (o *GetSupportUserConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get support user config default response has a 3xx status code -func (o *GetSupportUserConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get support user config default response has a 4xx status code -func (o *GetSupportUserConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get support user config default response has a 5xx status code -func (o *GetSupportUserConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get support user config default response a status code equal to that given -func (o *GetSupportUserConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get support user config default response -func (o *GetSupportUserConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetSupportUserConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/config][%d] GetSupportUserConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportUserConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /support-user/config][%d] GetSupportUserConfig default %s", o._statusCode, payload) -} - -func (o *GetSupportUserConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSupportUserConfigDefault) 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/support/support_client.go b/v2/client/support/support_client.go deleted file mode 100644 index 7c5e9772..00000000 --- a/v2/client/support/support_client.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new support API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new support API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new support API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for support API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetSupportUserConfig(params *GetSupportUserConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportUserConfigOK, error) - - UpdateSupportUserConfig(params *UpdateSupportUserConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportUserConfigOK, error) - - ValidateSupportUserCreds(params *ValidateSupportUserCredsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateSupportUserCredsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetSupportUserConfig gets support user configuration - -Cohesity provides a support user account for improved security and you need to use the support user account to log in to the Cohesity cluster bash shell using SSH. This endpoint returns the current support user configuration on the Cohesity cluster. -*/ -func (a *Client) GetSupportUserConfig(params *GetSupportUserConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportUserConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSupportUserConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetSupportUserConfig", - Method: "GET", - PathPattern: "/support-user/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSupportUserConfigReader{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.(*GetSupportUserConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSupportUserConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSupportUserConfig updates support user configuration - -Update support user's configuration. This allows you to update the support user's password and/or grant sudo access to the user. -*/ -func (a *Client) UpdateSupportUserConfig(params *UpdateSupportUserConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSupportUserConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSupportUserConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSupportUserConfig", - Method: "PUT", - PathPattern: "/support-user/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSupportUserConfigReader{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.(*UpdateSupportUserConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSupportUserConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ValidateSupportUserCreds validates the support user credentials - -Validates the support user credentials. -*/ -func (a *Client) ValidateSupportUserCreds(params *ValidateSupportUserCredsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ValidateSupportUserCredsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewValidateSupportUserCredsParams() - } - op := &runtime.ClientOperation{ - ID: "ValidateSupportUserCreds", - Method: "POST", - PathPattern: "/support-user/config/validate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ValidateSupportUserCredsReader{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.(*ValidateSupportUserCredsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ValidateSupportUserCredsDefault) - 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/v2/client/support/update_support_user_config_parameters.go b/v2/client/support/update_support_user_config_parameters.go deleted file mode 100644 index d643aebc..00000000 --- a/v2/client/support/update_support_user_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSupportUserConfigParams creates a new UpdateSupportUserConfigParams 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 NewUpdateSupportUserConfigParams() *UpdateSupportUserConfigParams { - return &UpdateSupportUserConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSupportUserConfigParamsWithTimeout creates a new UpdateSupportUserConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateSupportUserConfigParamsWithTimeout(timeout time.Duration) *UpdateSupportUserConfigParams { - return &UpdateSupportUserConfigParams{ - timeout: timeout, - } -} - -// NewUpdateSupportUserConfigParamsWithContext creates a new UpdateSupportUserConfigParams object -// with the ability to set a context for a request. -func NewUpdateSupportUserConfigParamsWithContext(ctx context.Context) *UpdateSupportUserConfigParams { - return &UpdateSupportUserConfigParams{ - Context: ctx, - } -} - -// NewUpdateSupportUserConfigParamsWithHTTPClient creates a new UpdateSupportUserConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSupportUserConfigParamsWithHTTPClient(client *http.Client) *UpdateSupportUserConfigParams { - return &UpdateSupportUserConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateSupportUserConfigParams contains all the parameters to send to the API endpoint - - for the update support user config operation. - - Typically these are written to a http.Request. -*/ -type UpdateSupportUserConfigParams struct { - - /* Body. - - Specifies the support user configuration. - */ - Body *models.UpdateSupportUserParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update support user config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportUserConfigParams) WithDefaults() *UpdateSupportUserConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update support user config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSupportUserConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update support user config params -func (o *UpdateSupportUserConfigParams) WithTimeout(timeout time.Duration) *UpdateSupportUserConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update support user config params -func (o *UpdateSupportUserConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update support user config params -func (o *UpdateSupportUserConfigParams) WithContext(ctx context.Context) *UpdateSupportUserConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update support user config params -func (o *UpdateSupportUserConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update support user config params -func (o *UpdateSupportUserConfigParams) WithHTTPClient(client *http.Client) *UpdateSupportUserConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update support user config params -func (o *UpdateSupportUserConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update support user config params -func (o *UpdateSupportUserConfigParams) WithBody(body *models.UpdateSupportUserParams) *UpdateSupportUserConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update support user config params -func (o *UpdateSupportUserConfigParams) SetBody(body *models.UpdateSupportUserParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSupportUserConfigParams) 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/support/update_support_user_config_responses.go b/v2/client/support/update_support_user_config_responses.go deleted file mode 100644 index 8b99a0d4..00000000 --- a/v2/client/support/update_support_user_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSupportUserConfigReader is a Reader for the UpdateSupportUserConfig structure. -type UpdateSupportUserConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSupportUserConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSupportUserConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSupportUserConfigDefault(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 - } -} - -// NewUpdateSupportUserConfigOK creates a UpdateSupportUserConfigOK with default headers values -func NewUpdateSupportUserConfigOK() *UpdateSupportUserConfigOK { - return &UpdateSupportUserConfigOK{} -} - -/* -UpdateSupportUserConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSupportUserConfigOK struct { - Payload *models.SuccessResp -} - -// IsSuccess returns true when this update support user config o k response has a 2xx status code -func (o *UpdateSupportUserConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update support user config o k response has a 3xx status code -func (o *UpdateSupportUserConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update support user config o k response has a 4xx status code -func (o *UpdateSupportUserConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update support user config o k response has a 5xx status code -func (o *UpdateSupportUserConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update support user config o k response a status code equal to that given -func (o *UpdateSupportUserConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update support user config o k response -func (o *UpdateSupportUserConfigOK) Code() int { - return 200 -} - -func (o *UpdateSupportUserConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-user/config][%d] updateSupportUserConfigOK %s", 200, payload) -} - -func (o *UpdateSupportUserConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-user/config][%d] updateSupportUserConfigOK %s", 200, payload) -} - -func (o *UpdateSupportUserConfigOK) GetPayload() *models.SuccessResp { - return o.Payload -} - -func (o *UpdateSupportUserConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SuccessResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSupportUserConfigDefault creates a UpdateSupportUserConfigDefault with default headers values -func NewUpdateSupportUserConfigDefault(code int) *UpdateSupportUserConfigDefault { - return &UpdateSupportUserConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateSupportUserConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSupportUserConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update support user config default response has a 2xx status code -func (o *UpdateSupportUserConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update support user config default response has a 3xx status code -func (o *UpdateSupportUserConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update support user config default response has a 4xx status code -func (o *UpdateSupportUserConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update support user config default response has a 5xx status code -func (o *UpdateSupportUserConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update support user config default response a status code equal to that given -func (o *UpdateSupportUserConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update support user config default response -func (o *UpdateSupportUserConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSupportUserConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-user/config][%d] UpdateSupportUserConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportUserConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /support-user/config][%d] UpdateSupportUserConfig default %s", o._statusCode, payload) -} - -func (o *UpdateSupportUserConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSupportUserConfigDefault) 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/support/validate_support_user_creds_parameters.go b/v2/client/support/validate_support_user_creds_parameters.go deleted file mode 100644 index 0de7bfed..00000000 --- a/v2/client/support/validate_support_user_creds_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewValidateSupportUserCredsParams creates a new ValidateSupportUserCredsParams 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 NewValidateSupportUserCredsParams() *ValidateSupportUserCredsParams { - return &ValidateSupportUserCredsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewValidateSupportUserCredsParamsWithTimeout creates a new ValidateSupportUserCredsParams object -// with the ability to set a timeout on a request. -func NewValidateSupportUserCredsParamsWithTimeout(timeout time.Duration) *ValidateSupportUserCredsParams { - return &ValidateSupportUserCredsParams{ - timeout: timeout, - } -} - -// NewValidateSupportUserCredsParamsWithContext creates a new ValidateSupportUserCredsParams object -// with the ability to set a context for a request. -func NewValidateSupportUserCredsParamsWithContext(ctx context.Context) *ValidateSupportUserCredsParams { - return &ValidateSupportUserCredsParams{ - Context: ctx, - } -} - -// NewValidateSupportUserCredsParamsWithHTTPClient creates a new ValidateSupportUserCredsParams object -// with the ability to set a custom HTTPClient for a request. -func NewValidateSupportUserCredsParamsWithHTTPClient(client *http.Client) *ValidateSupportUserCredsParams { - return &ValidateSupportUserCredsParams{ - HTTPClient: client, - } -} - -/* -ValidateSupportUserCredsParams contains all the parameters to send to the API endpoint - - for the validate support user creds operation. - - Typically these are written to a http.Request. -*/ -type ValidateSupportUserCredsParams struct { - - /* Body. - - Specifies the support user credentials. - */ - Body *models.ValidateSupportUserCredParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the validate support user creds params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateSupportUserCredsParams) WithDefaults() *ValidateSupportUserCredsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the validate support user creds params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ValidateSupportUserCredsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the validate support user creds params -func (o *ValidateSupportUserCredsParams) WithTimeout(timeout time.Duration) *ValidateSupportUserCredsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the validate support user creds params -func (o *ValidateSupportUserCredsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the validate support user creds params -func (o *ValidateSupportUserCredsParams) WithContext(ctx context.Context) *ValidateSupportUserCredsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the validate support user creds params -func (o *ValidateSupportUserCredsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the validate support user creds params -func (o *ValidateSupportUserCredsParams) WithHTTPClient(client *http.Client) *ValidateSupportUserCredsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the validate support user creds params -func (o *ValidateSupportUserCredsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the validate support user creds params -func (o *ValidateSupportUserCredsParams) WithBody(body *models.ValidateSupportUserCredParams) *ValidateSupportUserCredsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the validate support user creds params -func (o *ValidateSupportUserCredsParams) SetBody(body *models.ValidateSupportUserCredParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ValidateSupportUserCredsParams) 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/support/validate_support_user_creds_responses.go b/v2/client/support/validate_support_user_creds_responses.go deleted file mode 100644 index b10111c2..00000000 --- a/v2/client/support/validate_support_user_creds_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package support - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ValidateSupportUserCredsReader is a Reader for the ValidateSupportUserCreds structure. -type ValidateSupportUserCredsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ValidateSupportUserCredsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewValidateSupportUserCredsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewValidateSupportUserCredsDefault(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 - } -} - -// NewValidateSupportUserCredsOK creates a ValidateSupportUserCredsOK with default headers values -func NewValidateSupportUserCredsOK() *ValidateSupportUserCredsOK { - return &ValidateSupportUserCredsOK{} -} - -/* -ValidateSupportUserCredsOK describes a response with status code 200, with default header values. - -Success -*/ -type ValidateSupportUserCredsOK struct { - Payload *models.SuccessResp -} - -// IsSuccess returns true when this validate support user creds o k response has a 2xx status code -func (o *ValidateSupportUserCredsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this validate support user creds o k response has a 3xx status code -func (o *ValidateSupportUserCredsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this validate support user creds o k response has a 4xx status code -func (o *ValidateSupportUserCredsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this validate support user creds o k response has a 5xx status code -func (o *ValidateSupportUserCredsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this validate support user creds o k response a status code equal to that given -func (o *ValidateSupportUserCredsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the validate support user creds o k response -func (o *ValidateSupportUserCredsOK) Code() int { - return 200 -} - -func (o *ValidateSupportUserCredsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/config/validate][%d] validateSupportUserCredsOK %s", 200, payload) -} - -func (o *ValidateSupportUserCredsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/config/validate][%d] validateSupportUserCredsOK %s", 200, payload) -} - -func (o *ValidateSupportUserCredsOK) GetPayload() *models.SuccessResp { - return o.Payload -} - -func (o *ValidateSupportUserCredsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SuccessResp) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewValidateSupportUserCredsDefault creates a ValidateSupportUserCredsDefault with default headers values -func NewValidateSupportUserCredsDefault(code int) *ValidateSupportUserCredsDefault { - return &ValidateSupportUserCredsDefault{ - _statusCode: code, - } -} - -/* -ValidateSupportUserCredsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ValidateSupportUserCredsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this validate support user creds default response has a 2xx status code -func (o *ValidateSupportUserCredsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this validate support user creds default response has a 3xx status code -func (o *ValidateSupportUserCredsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this validate support user creds default response has a 4xx status code -func (o *ValidateSupportUserCredsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this validate support user creds default response has a 5xx status code -func (o *ValidateSupportUserCredsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this validate support user creds default response a status code equal to that given -func (o *ValidateSupportUserCredsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the validate support user creds default response -func (o *ValidateSupportUserCredsDefault) Code() int { - return o._statusCode -} - -func (o *ValidateSupportUserCredsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/config/validate][%d] ValidateSupportUserCreds default %s", o._statusCode, payload) -} - -func (o *ValidateSupportUserCredsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /support-user/config/validate][%d] ValidateSupportUserCreds default %s", o._statusCode, payload) -} - -func (o *ValidateSupportUserCredsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ValidateSupportUserCredsDefault) 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/syslog/add_syslog_server_parameters.go b/v2/client/syslog/add_syslog_server_parameters.go deleted file mode 100644 index 1155835a..00000000 --- a/v2/client/syslog/add_syslog_server_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddSyslogServerParams creates a new AddSyslogServerParams 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 NewAddSyslogServerParams() *AddSyslogServerParams { - return &AddSyslogServerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddSyslogServerParamsWithTimeout creates a new AddSyslogServerParams object -// with the ability to set a timeout on a request. -func NewAddSyslogServerParamsWithTimeout(timeout time.Duration) *AddSyslogServerParams { - return &AddSyslogServerParams{ - timeout: timeout, - } -} - -// NewAddSyslogServerParamsWithContext creates a new AddSyslogServerParams object -// with the ability to set a context for a request. -func NewAddSyslogServerParamsWithContext(ctx context.Context) *AddSyslogServerParams { - return &AddSyslogServerParams{ - Context: ctx, - } -} - -// NewAddSyslogServerParamsWithHTTPClient creates a new AddSyslogServerParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddSyslogServerParamsWithHTTPClient(client *http.Client) *AddSyslogServerParams { - return &AddSyslogServerParams{ - HTTPClient: client, - } -} - -/* -AddSyslogServerParams contains all the parameters to send to the API endpoint - - for the add syslog server operation. - - Typically these are written to a http.Request. -*/ -type AddSyslogServerParams struct { - - /* Body. - - Specifies parameters to add syslog server. - */ - Body *models.SyslogServer - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add syslog server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddSyslogServerParams) WithDefaults() *AddSyslogServerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add syslog server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddSyslogServerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add syslog server params -func (o *AddSyslogServerParams) WithTimeout(timeout time.Duration) *AddSyslogServerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add syslog server params -func (o *AddSyslogServerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add syslog server params -func (o *AddSyslogServerParams) WithContext(ctx context.Context) *AddSyslogServerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add syslog server params -func (o *AddSyslogServerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add syslog server params -func (o *AddSyslogServerParams) WithHTTPClient(client *http.Client) *AddSyslogServerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add syslog server params -func (o *AddSyslogServerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add syslog server params -func (o *AddSyslogServerParams) WithBody(body *models.SyslogServer) *AddSyslogServerParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add syslog server params -func (o *AddSyslogServerParams) SetBody(body *models.SyslogServer) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddSyslogServerParams) 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/syslog/add_syslog_server_responses.go b/v2/client/syslog/add_syslog_server_responses.go deleted file mode 100644 index bb01823a..00000000 --- a/v2/client/syslog/add_syslog_server_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddSyslogServerReader is a Reader for the AddSyslogServer structure. -type AddSyslogServerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddSyslogServerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddSyslogServerCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddSyslogServerDefault(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 - } -} - -// NewAddSyslogServerCreated creates a AddSyslogServerCreated with default headers values -func NewAddSyslogServerCreated() *AddSyslogServerCreated { - return &AddSyslogServerCreated{} -} - -/* -AddSyslogServerCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddSyslogServerCreated struct { - Payload *models.SyslogServer -} - -// IsSuccess returns true when this add syslog server created response has a 2xx status code -func (o *AddSyslogServerCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add syslog server created response has a 3xx status code -func (o *AddSyslogServerCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add syslog server created response has a 4xx status code -func (o *AddSyslogServerCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add syslog server created response has a 5xx status code -func (o *AddSyslogServerCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add syslog server created response a status code equal to that given -func (o *AddSyslogServerCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add syslog server created response -func (o *AddSyslogServerCreated) Code() int { - return 201 -} - -func (o *AddSyslogServerCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog][%d] addSyslogServerCreated %s", 201, payload) -} - -func (o *AddSyslogServerCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog][%d] addSyslogServerCreated %s", 201, payload) -} - -func (o *AddSyslogServerCreated) GetPayload() *models.SyslogServer { - return o.Payload -} - -func (o *AddSyslogServerCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServer) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddSyslogServerDefault creates a AddSyslogServerDefault with default headers values -func NewAddSyslogServerDefault(code int) *AddSyslogServerDefault { - return &AddSyslogServerDefault{ - _statusCode: code, - } -} - -/* -AddSyslogServerDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddSyslogServerDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add syslog server default response has a 2xx status code -func (o *AddSyslogServerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add syslog server default response has a 3xx status code -func (o *AddSyslogServerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add syslog server default response has a 4xx status code -func (o *AddSyslogServerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add syslog server default response has a 5xx status code -func (o *AddSyslogServerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add syslog server default response a status code equal to that given -func (o *AddSyslogServerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add syslog server default response -func (o *AddSyslogServerDefault) Code() int { - return o._statusCode -} - -func (o *AddSyslogServerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog][%d] AddSyslogServer default %s", o._statusCode, payload) -} - -func (o *AddSyslogServerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog][%d] AddSyslogServer default %s", o._statusCode, payload) -} - -func (o *AddSyslogServerDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddSyslogServerDefault) 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/syslog/get_supported_syslog_program_names_parameters.go b/v2/client/syslog/get_supported_syslog_program_names_parameters.go deleted file mode 100644 index 00e902a1..00000000 --- a/v2/client/syslog/get_supported_syslog_program_names_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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" -) - -// NewGetSupportedSyslogProgramNamesParams creates a new GetSupportedSyslogProgramNamesParams 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 NewGetSupportedSyslogProgramNamesParams() *GetSupportedSyslogProgramNamesParams { - return &GetSupportedSyslogProgramNamesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSupportedSyslogProgramNamesParamsWithTimeout creates a new GetSupportedSyslogProgramNamesParams object -// with the ability to set a timeout on a request. -func NewGetSupportedSyslogProgramNamesParamsWithTimeout(timeout time.Duration) *GetSupportedSyslogProgramNamesParams { - return &GetSupportedSyslogProgramNamesParams{ - timeout: timeout, - } -} - -// NewGetSupportedSyslogProgramNamesParamsWithContext creates a new GetSupportedSyslogProgramNamesParams object -// with the ability to set a context for a request. -func NewGetSupportedSyslogProgramNamesParamsWithContext(ctx context.Context) *GetSupportedSyslogProgramNamesParams { - return &GetSupportedSyslogProgramNamesParams{ - Context: ctx, - } -} - -// NewGetSupportedSyslogProgramNamesParamsWithHTTPClient creates a new GetSupportedSyslogProgramNamesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSupportedSyslogProgramNamesParamsWithHTTPClient(client *http.Client) *GetSupportedSyslogProgramNamesParams { - return &GetSupportedSyslogProgramNamesParams{ - HTTPClient: client, - } -} - -/* -GetSupportedSyslogProgramNamesParams contains all the parameters to send to the API endpoint - - for the get supported syslog program names operation. - - Typically these are written to a http.Request. -*/ -type GetSupportedSyslogProgramNamesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get supported syslog program names params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportedSyslogProgramNamesParams) WithDefaults() *GetSupportedSyslogProgramNamesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get supported syslog program names params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSupportedSyslogProgramNamesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) WithTimeout(timeout time.Duration) *GetSupportedSyslogProgramNamesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) WithContext(ctx context.Context) *GetSupportedSyslogProgramNamesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) WithHTTPClient(client *http.Client) *GetSupportedSyslogProgramNamesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get supported syslog program names params -func (o *GetSupportedSyslogProgramNamesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSupportedSyslogProgramNamesParams) 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/syslog/get_supported_syslog_program_names_responses.go b/v2/client/syslog/get_supported_syslog_program_names_responses.go deleted file mode 100644 index b72cc3f1..00000000 --- a/v2/client/syslog/get_supported_syslog_program_names_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSupportedSyslogProgramNamesReader is a Reader for the GetSupportedSyslogProgramNames structure. -type GetSupportedSyslogProgramNamesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSupportedSyslogProgramNamesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSupportedSyslogProgramNamesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSupportedSyslogProgramNamesDefault(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 - } -} - -// NewGetSupportedSyslogProgramNamesOK creates a GetSupportedSyslogProgramNamesOK with default headers values -func NewGetSupportedSyslogProgramNamesOK() *GetSupportedSyslogProgramNamesOK { - return &GetSupportedSyslogProgramNamesOK{} -} - -/* -GetSupportedSyslogProgramNamesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSupportedSyslogProgramNamesOK struct { - Payload []string -} - -// IsSuccess returns true when this get supported syslog program names o k response has a 2xx status code -func (o *GetSupportedSyslogProgramNamesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get supported syslog program names o k response has a 3xx status code -func (o *GetSupportedSyslogProgramNamesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get supported syslog program names o k response has a 4xx status code -func (o *GetSupportedSyslogProgramNamesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get supported syslog program names o k response has a 5xx status code -func (o *GetSupportedSyslogProgramNamesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get supported syslog program names o k response a status code equal to that given -func (o *GetSupportedSyslogProgramNamesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get supported syslog program names o k response -func (o *GetSupportedSyslogProgramNamesOK) Code() int { - return 200 -} - -func (o *GetSupportedSyslogProgramNamesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/program-names][%d] getSupportedSyslogProgramNamesOK %s", 200, payload) -} - -func (o *GetSupportedSyslogProgramNamesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/program-names][%d] getSupportedSyslogProgramNamesOK %s", 200, payload) -} - -func (o *GetSupportedSyslogProgramNamesOK) GetPayload() []string { - return o.Payload -} - -func (o *GetSupportedSyslogProgramNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSupportedSyslogProgramNamesDefault creates a GetSupportedSyslogProgramNamesDefault with default headers values -func NewGetSupportedSyslogProgramNamesDefault(code int) *GetSupportedSyslogProgramNamesDefault { - return &GetSupportedSyslogProgramNamesDefault{ - _statusCode: code, - } -} - -/* -GetSupportedSyslogProgramNamesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSupportedSyslogProgramNamesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get supported syslog program names default response has a 2xx status code -func (o *GetSupportedSyslogProgramNamesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get supported syslog program names default response has a 3xx status code -func (o *GetSupportedSyslogProgramNamesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get supported syslog program names default response has a 4xx status code -func (o *GetSupportedSyslogProgramNamesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get supported syslog program names default response has a 5xx status code -func (o *GetSupportedSyslogProgramNamesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get supported syslog program names default response a status code equal to that given -func (o *GetSupportedSyslogProgramNamesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get supported syslog program names default response -func (o *GetSupportedSyslogProgramNamesDefault) Code() int { - return o._statusCode -} - -func (o *GetSupportedSyslogProgramNamesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/program-names][%d] GetSupportedSyslogProgramNames default %s", o._statusCode, payload) -} - -func (o *GetSupportedSyslogProgramNamesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/program-names][%d] GetSupportedSyslogProgramNames default %s", o._statusCode, payload) -} - -func (o *GetSupportedSyslogProgramNamesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSupportedSyslogProgramNamesDefault) 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/syslog/get_syslog_audit_tags_parameters.go b/v2/client/syslog/get_syslog_audit_tags_parameters.go deleted file mode 100644 index be44a45e..00000000 --- a/v2/client/syslog/get_syslog_audit_tags_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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" -) - -// NewGetSyslogAuditTagsParams creates a new GetSyslogAuditTagsParams 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 NewGetSyslogAuditTagsParams() *GetSyslogAuditTagsParams { - return &GetSyslogAuditTagsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSyslogAuditTagsParamsWithTimeout creates a new GetSyslogAuditTagsParams object -// with the ability to set a timeout on a request. -func NewGetSyslogAuditTagsParamsWithTimeout(timeout time.Duration) *GetSyslogAuditTagsParams { - return &GetSyslogAuditTagsParams{ - timeout: timeout, - } -} - -// NewGetSyslogAuditTagsParamsWithContext creates a new GetSyslogAuditTagsParams object -// with the ability to set a context for a request. -func NewGetSyslogAuditTagsParamsWithContext(ctx context.Context) *GetSyslogAuditTagsParams { - return &GetSyslogAuditTagsParams{ - Context: ctx, - } -} - -// NewGetSyslogAuditTagsParamsWithHTTPClient creates a new GetSyslogAuditTagsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSyslogAuditTagsParamsWithHTTPClient(client *http.Client) *GetSyslogAuditTagsParams { - return &GetSyslogAuditTagsParams{ - HTTPClient: client, - } -} - -/* -GetSyslogAuditTagsParams contains all the parameters to send to the API endpoint - - for the get syslog audit tags operation. - - Typically these are written to a http.Request. -*/ -type GetSyslogAuditTagsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get syslog audit tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogAuditTagsParams) WithDefaults() *GetSyslogAuditTagsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get syslog audit tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogAuditTagsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) WithTimeout(timeout time.Duration) *GetSyslogAuditTagsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) WithContext(ctx context.Context) *GetSyslogAuditTagsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) WithHTTPClient(client *http.Client) *GetSyslogAuditTagsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get syslog audit tags params -func (o *GetSyslogAuditTagsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSyslogAuditTagsParams) 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/syslog/get_syslog_audit_tags_responses.go b/v2/client/syslog/get_syslog_audit_tags_responses.go deleted file mode 100644 index 7414acbc..00000000 --- a/v2/client/syslog/get_syslog_audit_tags_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSyslogAuditTagsReader is a Reader for the GetSyslogAuditTags structure. -type GetSyslogAuditTagsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSyslogAuditTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSyslogAuditTagsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSyslogAuditTagsDefault(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 - } -} - -// NewGetSyslogAuditTagsOK creates a GetSyslogAuditTagsOK with default headers values -func NewGetSyslogAuditTagsOK() *GetSyslogAuditTagsOK { - return &GetSyslogAuditTagsOK{} -} - -/* -GetSyslogAuditTagsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSyslogAuditTagsOK struct { - Payload *models.SyslogAuditTag -} - -// IsSuccess returns true when this get syslog audit tags o k response has a 2xx status code -func (o *GetSyslogAuditTagsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get syslog audit tags o k response has a 3xx status code -func (o *GetSyslogAuditTagsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get syslog audit tags o k response has a 4xx status code -func (o *GetSyslogAuditTagsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get syslog audit tags o k response has a 5xx status code -func (o *GetSyslogAuditTagsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get syslog audit tags o k response a status code equal to that given -func (o *GetSyslogAuditTagsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get syslog audit tags o k response -func (o *GetSyslogAuditTagsOK) Code() int { - return 200 -} - -func (o *GetSyslogAuditTagsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/audit-tags][%d] getSyslogAuditTagsOK %s", 200, payload) -} - -func (o *GetSyslogAuditTagsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/audit-tags][%d] getSyslogAuditTagsOK %s", 200, payload) -} - -func (o *GetSyslogAuditTagsOK) GetPayload() *models.SyslogAuditTag { - return o.Payload -} - -func (o *GetSyslogAuditTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogAuditTag) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSyslogAuditTagsDefault creates a GetSyslogAuditTagsDefault with default headers values -func NewGetSyslogAuditTagsDefault(code int) *GetSyslogAuditTagsDefault { - return &GetSyslogAuditTagsDefault{ - _statusCode: code, - } -} - -/* -GetSyslogAuditTagsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSyslogAuditTagsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get syslog audit tags default response has a 2xx status code -func (o *GetSyslogAuditTagsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get syslog audit tags default response has a 3xx status code -func (o *GetSyslogAuditTagsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get syslog audit tags default response has a 4xx status code -func (o *GetSyslogAuditTagsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get syslog audit tags default response has a 5xx status code -func (o *GetSyslogAuditTagsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get syslog audit tags default response a status code equal to that given -func (o *GetSyslogAuditTagsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get syslog audit tags default response -func (o *GetSyslogAuditTagsDefault) Code() int { - return o._statusCode -} - -func (o *GetSyslogAuditTagsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/audit-tags][%d] GetSyslogAuditTags default %s", o._statusCode, payload) -} - -func (o *GetSyslogAuditTagsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/audit-tags][%d] GetSyslogAuditTags default %s", o._statusCode, payload) -} - -func (o *GetSyslogAuditTagsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSyslogAuditTagsDefault) 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/syslog/get_syslog_server_by_id_parameters.go b/v2/client/syslog/get_syslog_server_by_id_parameters.go deleted file mode 100644 index ea76ed5d..00000000 --- a/v2/client/syslog/get_syslog_server_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/go-openapi/swag" -) - -// NewGetSyslogServerByIDParams creates a new GetSyslogServerByIDParams 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 NewGetSyslogServerByIDParams() *GetSyslogServerByIDParams { - return &GetSyslogServerByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSyslogServerByIDParamsWithTimeout creates a new GetSyslogServerByIDParams object -// with the ability to set a timeout on a request. -func NewGetSyslogServerByIDParamsWithTimeout(timeout time.Duration) *GetSyslogServerByIDParams { - return &GetSyslogServerByIDParams{ - timeout: timeout, - } -} - -// NewGetSyslogServerByIDParamsWithContext creates a new GetSyslogServerByIDParams object -// with the ability to set a context for a request. -func NewGetSyslogServerByIDParamsWithContext(ctx context.Context) *GetSyslogServerByIDParams { - return &GetSyslogServerByIDParams{ - Context: ctx, - } -} - -// NewGetSyslogServerByIDParamsWithHTTPClient creates a new GetSyslogServerByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSyslogServerByIDParamsWithHTTPClient(client *http.Client) *GetSyslogServerByIDParams { - return &GetSyslogServerByIDParams{ - HTTPClient: client, - } -} - -/* -GetSyslogServerByIDParams contains all the parameters to send to the API endpoint - - for the get syslog server by Id operation. - - Typically these are written to a http.Request. -*/ -type GetSyslogServerByIDParams struct { - - /* ID. - - Specifies the id of syslog server. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServerByIDParams) WithDefaults() *GetSyslogServerByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServerByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) WithTimeout(timeout time.Duration) *GetSyslogServerByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) WithContext(ctx context.Context) *GetSyslogServerByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) WithHTTPClient(client *http.Client) *GetSyslogServerByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) WithID(id int32) *GetSyslogServerByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get syslog server by Id params -func (o *GetSyslogServerByIDParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSyslogServerByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/syslog/get_syslog_server_by_id_responses.go b/v2/client/syslog/get_syslog_server_by_id_responses.go deleted file mode 100644 index 554bd442..00000000 --- a/v2/client/syslog/get_syslog_server_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSyslogServerByIDReader is a Reader for the GetSyslogServerByID structure. -type GetSyslogServerByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSyslogServerByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSyslogServerByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSyslogServerByIDDefault(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 - } -} - -// NewGetSyslogServerByIDOK creates a GetSyslogServerByIDOK with default headers values -func NewGetSyslogServerByIDOK() *GetSyslogServerByIDOK { - return &GetSyslogServerByIDOK{} -} - -/* -GetSyslogServerByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSyslogServerByIDOK struct { - Payload *models.SyslogServer -} - -// IsSuccess returns true when this get syslog server by Id o k response has a 2xx status code -func (o *GetSyslogServerByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get syslog server by Id o k response has a 3xx status code -func (o *GetSyslogServerByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get syslog server by Id o k response has a 4xx status code -func (o *GetSyslogServerByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get syslog server by Id o k response has a 5xx status code -func (o *GetSyslogServerByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get syslog server by Id o k response a status code equal to that given -func (o *GetSyslogServerByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get syslog server by Id o k response -func (o *GetSyslogServerByIDOK) Code() int { - return 200 -} - -func (o *GetSyslogServerByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}][%d] getSyslogServerByIdOK %s", 200, payload) -} - -func (o *GetSyslogServerByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}][%d] getSyslogServerByIdOK %s", 200, payload) -} - -func (o *GetSyslogServerByIDOK) GetPayload() *models.SyslogServer { - return o.Payload -} - -func (o *GetSyslogServerByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServer) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSyslogServerByIDDefault creates a GetSyslogServerByIDDefault with default headers values -func NewGetSyslogServerByIDDefault(code int) *GetSyslogServerByIDDefault { - return &GetSyslogServerByIDDefault{ - _statusCode: code, - } -} - -/* -GetSyslogServerByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSyslogServerByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get syslog server by Id default response has a 2xx status code -func (o *GetSyslogServerByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get syslog server by Id default response has a 3xx status code -func (o *GetSyslogServerByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get syslog server by Id default response has a 4xx status code -func (o *GetSyslogServerByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get syslog server by Id default response has a 5xx status code -func (o *GetSyslogServerByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get syslog server by Id default response a status code equal to that given -func (o *GetSyslogServerByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get syslog server by Id default response -func (o *GetSyslogServerByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetSyslogServerByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}][%d] GetSyslogServerById default %s", o._statusCode, payload) -} - -func (o *GetSyslogServerByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}][%d] GetSyslogServerById default %s", o._statusCode, payload) -} - -func (o *GetSyslogServerByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSyslogServerByIDDefault) 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/syslog/get_syslog_server_status_by_id_parameters.go b/v2/client/syslog/get_syslog_server_status_by_id_parameters.go deleted file mode 100644 index 989abf53..00000000 --- a/v2/client/syslog/get_syslog_server_status_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/go-openapi/swag" -) - -// NewGetSyslogServerStatusByIDParams creates a new GetSyslogServerStatusByIDParams 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 NewGetSyslogServerStatusByIDParams() *GetSyslogServerStatusByIDParams { - return &GetSyslogServerStatusByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSyslogServerStatusByIDParamsWithTimeout creates a new GetSyslogServerStatusByIDParams object -// with the ability to set a timeout on a request. -func NewGetSyslogServerStatusByIDParamsWithTimeout(timeout time.Duration) *GetSyslogServerStatusByIDParams { - return &GetSyslogServerStatusByIDParams{ - timeout: timeout, - } -} - -// NewGetSyslogServerStatusByIDParamsWithContext creates a new GetSyslogServerStatusByIDParams object -// with the ability to set a context for a request. -func NewGetSyslogServerStatusByIDParamsWithContext(ctx context.Context) *GetSyslogServerStatusByIDParams { - return &GetSyslogServerStatusByIDParams{ - Context: ctx, - } -} - -// NewGetSyslogServerStatusByIDParamsWithHTTPClient creates a new GetSyslogServerStatusByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSyslogServerStatusByIDParamsWithHTTPClient(client *http.Client) *GetSyslogServerStatusByIDParams { - return &GetSyslogServerStatusByIDParams{ - HTTPClient: client, - } -} - -/* -GetSyslogServerStatusByIDParams contains all the parameters to send to the API endpoint - - for the get syslog server status by Id operation. - - Typically these are written to a http.Request. -*/ -type GetSyslogServerStatusByIDParams struct { - - /* ID. - - Specifies the id of syslog server. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get syslog server status by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServerStatusByIDParams) WithDefaults() *GetSyslogServerStatusByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get syslog server status by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServerStatusByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) WithTimeout(timeout time.Duration) *GetSyslogServerStatusByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) WithContext(ctx context.Context) *GetSyslogServerStatusByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) WithHTTPClient(client *http.Client) *GetSyslogServerStatusByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) WithID(id int32) *GetSyslogServerStatusByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get syslog server status by Id params -func (o *GetSyslogServerStatusByIDParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSyslogServerStatusByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/syslog/get_syslog_server_status_by_id_responses.go b/v2/client/syslog/get_syslog_server_status_by_id_responses.go deleted file mode 100644 index ec337636..00000000 --- a/v2/client/syslog/get_syslog_server_status_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSyslogServerStatusByIDReader is a Reader for the GetSyslogServerStatusByID structure. -type GetSyslogServerStatusByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSyslogServerStatusByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSyslogServerStatusByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSyslogServerStatusByIDDefault(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 - } -} - -// NewGetSyslogServerStatusByIDOK creates a GetSyslogServerStatusByIDOK with default headers values -func NewGetSyslogServerStatusByIDOK() *GetSyslogServerStatusByIDOK { - return &GetSyslogServerStatusByIDOK{} -} - -/* -GetSyslogServerStatusByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSyslogServerStatusByIDOK struct { - Payload *models.SyslogServerStatus -} - -// IsSuccess returns true when this get syslog server status by Id o k response has a 2xx status code -func (o *GetSyslogServerStatusByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get syslog server status by Id o k response has a 3xx status code -func (o *GetSyslogServerStatusByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get syslog server status by Id o k response has a 4xx status code -func (o *GetSyslogServerStatusByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get syslog server status by Id o k response has a 5xx status code -func (o *GetSyslogServerStatusByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get syslog server status by Id o k response a status code equal to that given -func (o *GetSyslogServerStatusByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get syslog server status by Id o k response -func (o *GetSyslogServerStatusByIDOK) Code() int { - return 200 -} - -func (o *GetSyslogServerStatusByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}/status][%d] getSyslogServerStatusByIdOK %s", 200, payload) -} - -func (o *GetSyslogServerStatusByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}/status][%d] getSyslogServerStatusByIdOK %s", 200, payload) -} - -func (o *GetSyslogServerStatusByIDOK) GetPayload() *models.SyslogServerStatus { - return o.Payload -} - -func (o *GetSyslogServerStatusByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServerStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSyslogServerStatusByIDDefault creates a GetSyslogServerStatusByIDDefault with default headers values -func NewGetSyslogServerStatusByIDDefault(code int) *GetSyslogServerStatusByIDDefault { - return &GetSyslogServerStatusByIDDefault{ - _statusCode: code, - } -} - -/* -GetSyslogServerStatusByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSyslogServerStatusByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get syslog server status by Id default response has a 2xx status code -func (o *GetSyslogServerStatusByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get syslog server status by Id default response has a 3xx status code -func (o *GetSyslogServerStatusByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get syslog server status by Id default response has a 4xx status code -func (o *GetSyslogServerStatusByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get syslog server status by Id default response has a 5xx status code -func (o *GetSyslogServerStatusByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get syslog server status by Id default response a status code equal to that given -func (o *GetSyslogServerStatusByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get syslog server status by Id default response -func (o *GetSyslogServerStatusByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetSyslogServerStatusByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}/status][%d] GetSyslogServerStatusById default %s", o._statusCode, payload) -} - -func (o *GetSyslogServerStatusByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog/{id}/status][%d] GetSyslogServerStatusById default %s", o._statusCode, payload) -} - -func (o *GetSyslogServerStatusByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSyslogServerStatusByIDDefault) 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/syslog/get_syslog_servers_parameters.go b/v2/client/syslog/get_syslog_servers_parameters.go deleted file mode 100644 index 767efd09..00000000 --- a/v2/client/syslog/get_syslog_servers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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" -) - -// NewGetSyslogServersParams creates a new GetSyslogServersParams 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 NewGetSyslogServersParams() *GetSyslogServersParams { - return &GetSyslogServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSyslogServersParamsWithTimeout creates a new GetSyslogServersParams object -// with the ability to set a timeout on a request. -func NewGetSyslogServersParamsWithTimeout(timeout time.Duration) *GetSyslogServersParams { - return &GetSyslogServersParams{ - timeout: timeout, - } -} - -// NewGetSyslogServersParamsWithContext creates a new GetSyslogServersParams object -// with the ability to set a context for a request. -func NewGetSyslogServersParamsWithContext(ctx context.Context) *GetSyslogServersParams { - return &GetSyslogServersParams{ - Context: ctx, - } -} - -// NewGetSyslogServersParamsWithHTTPClient creates a new GetSyslogServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSyslogServersParamsWithHTTPClient(client *http.Client) *GetSyslogServersParams { - return &GetSyslogServersParams{ - HTTPClient: client, - } -} - -/* -GetSyslogServersParams contains all the parameters to send to the API endpoint - - for the get syslog servers operation. - - Typically these are written to a http.Request. -*/ -type GetSyslogServersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get syslog servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServersParams) WithDefaults() *GetSyslogServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get syslog servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSyslogServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get syslog servers params -func (o *GetSyslogServersParams) WithTimeout(timeout time.Duration) *GetSyslogServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get syslog servers params -func (o *GetSyslogServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get syslog servers params -func (o *GetSyslogServersParams) WithContext(ctx context.Context) *GetSyslogServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get syslog servers params -func (o *GetSyslogServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get syslog servers params -func (o *GetSyslogServersParams) WithHTTPClient(client *http.Client) *GetSyslogServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get syslog servers params -func (o *GetSyslogServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSyslogServersParams) 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/syslog/get_syslog_servers_responses.go b/v2/client/syslog/get_syslog_servers_responses.go deleted file mode 100644 index 7a7ac1bc..00000000 --- a/v2/client/syslog/get_syslog_servers_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSyslogServersReader is a Reader for the GetSyslogServers structure. -type GetSyslogServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSyslogServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSyslogServersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSyslogServersDefault(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 - } -} - -// NewGetSyslogServersOK creates a GetSyslogServersOK with default headers values -func NewGetSyslogServersOK() *GetSyslogServersOK { - return &GetSyslogServersOK{} -} - -/* -GetSyslogServersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSyslogServersOK struct { - Payload *models.SyslogServers -} - -// IsSuccess returns true when this get syslog servers o k response has a 2xx status code -func (o *GetSyslogServersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get syslog servers o k response has a 3xx status code -func (o *GetSyslogServersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get syslog servers o k response has a 4xx status code -func (o *GetSyslogServersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get syslog servers o k response has a 5xx status code -func (o *GetSyslogServersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get syslog servers o k response a status code equal to that given -func (o *GetSyslogServersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get syslog servers o k response -func (o *GetSyslogServersOK) Code() int { - return 200 -} - -func (o *GetSyslogServersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog][%d] getSyslogServersOK %s", 200, payload) -} - -func (o *GetSyslogServersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog][%d] getSyslogServersOK %s", 200, payload) -} - -func (o *GetSyslogServersOK) GetPayload() *models.SyslogServers { - return o.Payload -} - -func (o *GetSyslogServersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSyslogServersDefault creates a GetSyslogServersDefault with default headers values -func NewGetSyslogServersDefault(code int) *GetSyslogServersDefault { - return &GetSyslogServersDefault{ - _statusCode: code, - } -} - -/* -GetSyslogServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSyslogServersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get syslog servers default response has a 2xx status code -func (o *GetSyslogServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get syslog servers default response has a 3xx status code -func (o *GetSyslogServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get syslog servers default response has a 4xx status code -func (o *GetSyslogServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get syslog servers default response has a 5xx status code -func (o *GetSyslogServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get syslog servers default response a status code equal to that given -func (o *GetSyslogServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get syslog servers default response -func (o *GetSyslogServersDefault) Code() int { - return o._statusCode -} - -func (o *GetSyslogServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog][%d] GetSyslogServers default %s", o._statusCode, payload) -} - -func (o *GetSyslogServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /syslog][%d] GetSyslogServers default %s", o._statusCode, payload) -} - -func (o *GetSyslogServersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSyslogServersDefault) 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/syslog/patch_syslog_server_by_id_parameters.go b/v2/client/syslog/patch_syslog_server_by_id_parameters.go deleted file mode 100644 index f7663ef7..00000000 --- a/v2/client/syslog/patch_syslog_server_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPatchSyslogServerByIDParams creates a new PatchSyslogServerByIDParams 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 NewPatchSyslogServerByIDParams() *PatchSyslogServerByIDParams { - return &PatchSyslogServerByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchSyslogServerByIDParamsWithTimeout creates a new PatchSyslogServerByIDParams object -// with the ability to set a timeout on a request. -func NewPatchSyslogServerByIDParamsWithTimeout(timeout time.Duration) *PatchSyslogServerByIDParams { - return &PatchSyslogServerByIDParams{ - timeout: timeout, - } -} - -// NewPatchSyslogServerByIDParamsWithContext creates a new PatchSyslogServerByIDParams object -// with the ability to set a context for a request. -func NewPatchSyslogServerByIDParamsWithContext(ctx context.Context) *PatchSyslogServerByIDParams { - return &PatchSyslogServerByIDParams{ - Context: ctx, - } -} - -// NewPatchSyslogServerByIDParamsWithHTTPClient creates a new PatchSyslogServerByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchSyslogServerByIDParamsWithHTTPClient(client *http.Client) *PatchSyslogServerByIDParams { - return &PatchSyslogServerByIDParams{ - HTTPClient: client, - } -} - -/* -PatchSyslogServerByIDParams contains all the parameters to send to the API endpoint - - for the patch syslog server by Id operation. - - Typically these are written to a http.Request. -*/ -type PatchSyslogServerByIDParams struct { - - /* Body. - - Specifies the body of syslog server fields to patch. - */ - Body *models.SyslogServer - - /* ID. - - Specifies the id of syslog server. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchSyslogServerByIDParams) WithDefaults() *PatchSyslogServerByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchSyslogServerByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) WithTimeout(timeout time.Duration) *PatchSyslogServerByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) WithContext(ctx context.Context) *PatchSyslogServerByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) WithHTTPClient(client *http.Client) *PatchSyslogServerByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) WithBody(body *models.SyslogServer) *PatchSyslogServerByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) SetBody(body *models.SyslogServer) { - o.Body = body -} - -// WithID adds the id to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) WithID(id int32) *PatchSyslogServerByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the patch syslog server by Id params -func (o *PatchSyslogServerByIDParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchSyslogServerByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/syslog/patch_syslog_server_by_id_responses.go b/v2/client/syslog/patch_syslog_server_by_id_responses.go deleted file mode 100644 index 86293242..00000000 --- a/v2/client/syslog/patch_syslog_server_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PatchSyslogServerByIDReader is a Reader for the PatchSyslogServerByID structure. -type PatchSyslogServerByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchSyslogServerByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchSyslogServerByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPatchSyslogServerByIDDefault(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 - } -} - -// NewPatchSyslogServerByIDOK creates a PatchSyslogServerByIDOK with default headers values -func NewPatchSyslogServerByIDOK() *PatchSyslogServerByIDOK { - return &PatchSyslogServerByIDOK{} -} - -/* -PatchSyslogServerByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchSyslogServerByIDOK struct { - Payload *models.SyslogServer -} - -// IsSuccess returns true when this patch syslog server by Id o k response has a 2xx status code -func (o *PatchSyslogServerByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch syslog server by Id o k response has a 3xx status code -func (o *PatchSyslogServerByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch syslog server by Id o k response has a 4xx status code -func (o *PatchSyslogServerByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch syslog server by Id o k response has a 5xx status code -func (o *PatchSyslogServerByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch syslog server by Id o k response a status code equal to that given -func (o *PatchSyslogServerByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the patch syslog server by Id o k response -func (o *PatchSyslogServerByIDOK) Code() int { - return 200 -} - -func (o *PatchSyslogServerByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /syslog/{id}][%d] patchSyslogServerByIdOK %s", 200, payload) -} - -func (o *PatchSyslogServerByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /syslog/{id}][%d] patchSyslogServerByIdOK %s", 200, payload) -} - -func (o *PatchSyslogServerByIDOK) GetPayload() *models.SyslogServer { - return o.Payload -} - -func (o *PatchSyslogServerByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServer) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchSyslogServerByIDDefault creates a PatchSyslogServerByIDDefault with default headers values -func NewPatchSyslogServerByIDDefault(code int) *PatchSyslogServerByIDDefault { - return &PatchSyslogServerByIDDefault{ - _statusCode: code, - } -} - -/* -PatchSyslogServerByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type PatchSyslogServerByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this patch syslog server by Id default response has a 2xx status code -func (o *PatchSyslogServerByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this patch syslog server by Id default response has a 3xx status code -func (o *PatchSyslogServerByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this patch syslog server by Id default response has a 4xx status code -func (o *PatchSyslogServerByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this patch syslog server by Id default response has a 5xx status code -func (o *PatchSyslogServerByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this patch syslog server by Id default response a status code equal to that given -func (o *PatchSyslogServerByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the patch syslog server by Id default response -func (o *PatchSyslogServerByIDDefault) Code() int { - return o._statusCode -} - -func (o *PatchSyslogServerByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /syslog/{id}][%d] PatchSyslogServerById default %s", o._statusCode, payload) -} - -func (o *PatchSyslogServerByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PATCH /syslog/{id}][%d] PatchSyslogServerById default %s", o._statusCode, payload) -} - -func (o *PatchSyslogServerByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PatchSyslogServerByIDDefault) 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/syslog/remove_syslog_server_parameters.go b/v2/client/syslog/remove_syslog_server_parameters.go deleted file mode 100644 index 88136170..00000000 --- a/v2/client/syslog/remove_syslog_server_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/go-openapi/swag" -) - -// NewRemoveSyslogServerParams creates a new RemoveSyslogServerParams 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 NewRemoveSyslogServerParams() *RemoveSyslogServerParams { - return &RemoveSyslogServerParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveSyslogServerParamsWithTimeout creates a new RemoveSyslogServerParams object -// with the ability to set a timeout on a request. -func NewRemoveSyslogServerParamsWithTimeout(timeout time.Duration) *RemoveSyslogServerParams { - return &RemoveSyslogServerParams{ - timeout: timeout, - } -} - -// NewRemoveSyslogServerParamsWithContext creates a new RemoveSyslogServerParams object -// with the ability to set a context for a request. -func NewRemoveSyslogServerParamsWithContext(ctx context.Context) *RemoveSyslogServerParams { - return &RemoveSyslogServerParams{ - Context: ctx, - } -} - -// NewRemoveSyslogServerParamsWithHTTPClient creates a new RemoveSyslogServerParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveSyslogServerParamsWithHTTPClient(client *http.Client) *RemoveSyslogServerParams { - return &RemoveSyslogServerParams{ - HTTPClient: client, - } -} - -/* -RemoveSyslogServerParams contains all the parameters to send to the API endpoint - - for the remove syslog server operation. - - Typically these are written to a http.Request. -*/ -type RemoveSyslogServerParams struct { - - /* ID. - - Specifies a unique id of the syslog server. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove syslog server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveSyslogServerParams) WithDefaults() *RemoveSyslogServerParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove syslog server params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveSyslogServerParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove syslog server params -func (o *RemoveSyslogServerParams) WithTimeout(timeout time.Duration) *RemoveSyslogServerParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove syslog server params -func (o *RemoveSyslogServerParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove syslog server params -func (o *RemoveSyslogServerParams) WithContext(ctx context.Context) *RemoveSyslogServerParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove syslog server params -func (o *RemoveSyslogServerParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove syslog server params -func (o *RemoveSyslogServerParams) WithHTTPClient(client *http.Client) *RemoveSyslogServerParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove syslog server params -func (o *RemoveSyslogServerParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the remove syslog server params -func (o *RemoveSyslogServerParams) WithID(id int32) *RemoveSyslogServerParams { - o.SetID(id) - return o -} - -// SetID adds the id to the remove syslog server params -func (o *RemoveSyslogServerParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveSyslogServerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/syslog/remove_syslog_server_responses.go b/v2/client/syslog/remove_syslog_server_responses.go deleted file mode 100644 index 38b4e6bb..00000000 --- a/v2/client/syslog/remove_syslog_server_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RemoveSyslogServerReader is a Reader for the RemoveSyslogServer structure. -type RemoveSyslogServerReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveSyslogServerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveSyslogServerNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveSyslogServerDefault(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 - } -} - -// NewRemoveSyslogServerNoContent creates a RemoveSyslogServerNoContent with default headers values -func NewRemoveSyslogServerNoContent() *RemoveSyslogServerNoContent { - return &RemoveSyslogServerNoContent{} -} - -/* -RemoveSyslogServerNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveSyslogServerNoContent struct { -} - -// IsSuccess returns true when this remove syslog server no content response has a 2xx status code -func (o *RemoveSyslogServerNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove syslog server no content response has a 3xx status code -func (o *RemoveSyslogServerNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove syslog server no content response has a 4xx status code -func (o *RemoveSyslogServerNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove syslog server no content response has a 5xx status code -func (o *RemoveSyslogServerNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove syslog server no content response a status code equal to that given -func (o *RemoveSyslogServerNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove syslog server no content response -func (o *RemoveSyslogServerNoContent) Code() int { - return 204 -} - -func (o *RemoveSyslogServerNoContent) Error() string { - return fmt.Sprintf("[DELETE /syslog/{id}][%d] removeSyslogServerNoContent", 204) -} - -func (o *RemoveSyslogServerNoContent) String() string { - return fmt.Sprintf("[DELETE /syslog/{id}][%d] removeSyslogServerNoContent", 204) -} - -func (o *RemoveSyslogServerNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveSyslogServerDefault creates a RemoveSyslogServerDefault with default headers values -func NewRemoveSyslogServerDefault(code int) *RemoveSyslogServerDefault { - return &RemoveSyslogServerDefault{ - _statusCode: code, - } -} - -/* -RemoveSyslogServerDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveSyslogServerDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this remove syslog server default response has a 2xx status code -func (o *RemoveSyslogServerDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove syslog server default response has a 3xx status code -func (o *RemoveSyslogServerDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove syslog server default response has a 4xx status code -func (o *RemoveSyslogServerDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove syslog server default response has a 5xx status code -func (o *RemoveSyslogServerDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove syslog server default response a status code equal to that given -func (o *RemoveSyslogServerDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove syslog server default response -func (o *RemoveSyslogServerDefault) Code() int { - return o._statusCode -} - -func (o *RemoveSyslogServerDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /syslog/{id}][%d] RemoveSyslogServer default %s", o._statusCode, payload) -} - -func (o *RemoveSyslogServerDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /syslog/{id}][%d] RemoveSyslogServer default %s", o._statusCode, payload) -} - -func (o *RemoveSyslogServerDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RemoveSyslogServerDefault) 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/syslog/remove_syslog_servers_parameters.go b/v2/client/syslog/remove_syslog_servers_parameters.go deleted file mode 100644 index c5b87da7..00000000 --- a/v2/client/syslog/remove_syslog_servers_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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" -) - -// NewRemoveSyslogServersParams creates a new RemoveSyslogServersParams 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 NewRemoveSyslogServersParams() *RemoveSyslogServersParams { - return &RemoveSyslogServersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRemoveSyslogServersParamsWithTimeout creates a new RemoveSyslogServersParams object -// with the ability to set a timeout on a request. -func NewRemoveSyslogServersParamsWithTimeout(timeout time.Duration) *RemoveSyslogServersParams { - return &RemoveSyslogServersParams{ - timeout: timeout, - } -} - -// NewRemoveSyslogServersParamsWithContext creates a new RemoveSyslogServersParams object -// with the ability to set a context for a request. -func NewRemoveSyslogServersParamsWithContext(ctx context.Context) *RemoveSyslogServersParams { - return &RemoveSyslogServersParams{ - Context: ctx, - } -} - -// NewRemoveSyslogServersParamsWithHTTPClient creates a new RemoveSyslogServersParams object -// with the ability to set a custom HTTPClient for a request. -func NewRemoveSyslogServersParamsWithHTTPClient(client *http.Client) *RemoveSyslogServersParams { - return &RemoveSyslogServersParams{ - HTTPClient: client, - } -} - -/* -RemoveSyslogServersParams contains all the parameters to send to the API endpoint - - for the remove syslog servers operation. - - Typically these are written to a http.Request. -*/ -type RemoveSyslogServersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the remove syslog servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveSyslogServersParams) WithDefaults() *RemoveSyslogServersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the remove syslog servers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RemoveSyslogServersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the remove syslog servers params -func (o *RemoveSyslogServersParams) WithTimeout(timeout time.Duration) *RemoveSyslogServersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the remove syslog servers params -func (o *RemoveSyslogServersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the remove syslog servers params -func (o *RemoveSyslogServersParams) WithContext(ctx context.Context) *RemoveSyslogServersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the remove syslog servers params -func (o *RemoveSyslogServersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the remove syslog servers params -func (o *RemoveSyslogServersParams) WithHTTPClient(client *http.Client) *RemoveSyslogServersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the remove syslog servers params -func (o *RemoveSyslogServersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *RemoveSyslogServersParams) 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/syslog/remove_syslog_servers_responses.go b/v2/client/syslog/remove_syslog_servers_responses.go deleted file mode 100644 index 839309ed..00000000 --- a/v2/client/syslog/remove_syslog_servers_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RemoveSyslogServersReader is a Reader for the RemoveSyslogServers structure. -type RemoveSyslogServersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RemoveSyslogServersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRemoveSyslogServersNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRemoveSyslogServersDefault(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 - } -} - -// NewRemoveSyslogServersNoContent creates a RemoveSyslogServersNoContent with default headers values -func NewRemoveSyslogServersNoContent() *RemoveSyslogServersNoContent { - return &RemoveSyslogServersNoContent{} -} - -/* -RemoveSyslogServersNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RemoveSyslogServersNoContent struct { -} - -// IsSuccess returns true when this remove syslog servers no content response has a 2xx status code -func (o *RemoveSyslogServersNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this remove syslog servers no content response has a 3xx status code -func (o *RemoveSyslogServersNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this remove syslog servers no content response has a 4xx status code -func (o *RemoveSyslogServersNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this remove syslog servers no content response has a 5xx status code -func (o *RemoveSyslogServersNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this remove syslog servers no content response a status code equal to that given -func (o *RemoveSyslogServersNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the remove syslog servers no content response -func (o *RemoveSyslogServersNoContent) Code() int { - return 204 -} - -func (o *RemoveSyslogServersNoContent) Error() string { - return fmt.Sprintf("[DELETE /syslog][%d] removeSyslogServersNoContent", 204) -} - -func (o *RemoveSyslogServersNoContent) String() string { - return fmt.Sprintf("[DELETE /syslog][%d] removeSyslogServersNoContent", 204) -} - -func (o *RemoveSyslogServersNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRemoveSyslogServersDefault creates a RemoveSyslogServersDefault with default headers values -func NewRemoveSyslogServersDefault(code int) *RemoveSyslogServersDefault { - return &RemoveSyslogServersDefault{ - _statusCode: code, - } -} - -/* -RemoveSyslogServersDefault describes a response with status code -1, with default header values. - -Error -*/ -type RemoveSyslogServersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this remove syslog servers default response has a 2xx status code -func (o *RemoveSyslogServersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this remove syslog servers default response has a 3xx status code -func (o *RemoveSyslogServersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this remove syslog servers default response has a 4xx status code -func (o *RemoveSyslogServersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this remove syslog servers default response has a 5xx status code -func (o *RemoveSyslogServersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this remove syslog servers default response a status code equal to that given -func (o *RemoveSyslogServersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the remove syslog servers default response -func (o *RemoveSyslogServersDefault) Code() int { - return o._statusCode -} - -func (o *RemoveSyslogServersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /syslog][%d] RemoveSyslogServers default %s", o._statusCode, payload) -} - -func (o *RemoveSyslogServersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /syslog][%d] RemoveSyslogServers default %s", o._statusCode, payload) -} - -func (o *RemoveSyslogServersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RemoveSyslogServersDefault) 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/syslog/syslog_client.go b/v2/client/syslog/syslog_client.go deleted file mode 100644 index 26c34818..00000000 --- a/v2/client/syslog/syslog_client.go +++ /dev/null @@ -1,525 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new syslog API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new syslog API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new syslog API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for syslog API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddSyslogServer(params *AddSyslogServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddSyslogServerCreated, error) - - GetSupportedSyslogProgramNames(params *GetSupportedSyslogProgramNamesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportedSyslogProgramNamesOK, error) - - GetSyslogAuditTags(params *GetSyslogAuditTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogAuditTagsOK, error) - - GetSyslogServerByID(params *GetSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServerByIDOK, error) - - GetSyslogServerStatusByID(params *GetSyslogServerStatusByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServerStatusByIDOK, error) - - GetSyslogServers(params *GetSyslogServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServersOK, error) - - PatchSyslogServerByID(params *PatchSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchSyslogServerByIDOK, error) - - RemoveSyslogServer(params *RemoveSyslogServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveSyslogServerNoContent, error) - - RemoveSyslogServers(params *RemoveSyslogServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveSyslogServersNoContent, error) - - UpdateSyslogAuditTags(params *UpdateSyslogAuditTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSyslogAuditTagsOK, error) - - UpdateSyslogServerByID(params *UpdateSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSyslogServerByIDOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddSyslogServer adds syslog server - -Add a new syslog server -*/ -func (a *Client) AddSyslogServer(params *AddSyslogServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddSyslogServerCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddSyslogServerParams() - } - op := &runtime.ClientOperation{ - ID: "AddSyslogServer", - Method: "POST", - PathPattern: "/syslog", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddSyslogServerReader{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.(*AddSyslogServerCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddSyslogServerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSupportedSyslogProgramNames gets supported program names - -Get supported program names to configure for a syslog server. -*/ -func (a *Client) GetSupportedSyslogProgramNames(params *GetSupportedSyslogProgramNamesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSupportedSyslogProgramNamesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSupportedSyslogProgramNamesParams() - } - op := &runtime.ClientOperation{ - ID: "GetSupportedSyslogProgramNames", - Method: "GET", - PathPattern: "/syslog/program-names", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSupportedSyslogProgramNamesReader{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.(*GetSupportedSyslogProgramNamesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSupportedSyslogProgramNamesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSyslogAuditTags gets cluster audit tags - -Get cluster audit tags. -*/ -func (a *Client) GetSyslogAuditTags(params *GetSyslogAuditTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogAuditTagsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSyslogAuditTagsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSyslogAuditTags", - Method: "GET", - PathPattern: "/syslog/audit-tags", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSyslogAuditTagsReader{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.(*GetSyslogAuditTagsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSyslogAuditTagsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSyslogServerByID gets a syslog server by id - -Get a syslog server by id. -*/ -func (a *Client) GetSyslogServerByID(params *GetSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServerByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSyslogServerByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetSyslogServerById", - Method: "GET", - PathPattern: "/syslog/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSyslogServerByIDReader{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.(*GetSyslogServerByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSyslogServerByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSyslogServerStatusByID gets a syslog server reachability status - -Check syslog server reachability by given Id. -*/ -func (a *Client) GetSyslogServerStatusByID(params *GetSyslogServerStatusByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServerStatusByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSyslogServerStatusByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetSyslogServerStatusById", - Method: "GET", - PathPattern: "/syslog/{id}/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSyslogServerStatusByIDReader{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.(*GetSyslogServerStatusByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSyslogServerStatusByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSyslogServers gets list of syslog servers - -Get list of syslog servers. -*/ -func (a *Client) GetSyslogServers(params *GetSyslogServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSyslogServersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSyslogServersParams() - } - op := &runtime.ClientOperation{ - ID: "GetSyslogServers", - Method: "GET", - PathPattern: "/syslog", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSyslogServersReader{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.(*GetSyslogServersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSyslogServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PatchSyslogServerByID patches a syslog server by id - -Patch syslog server by id. -*/ -func (a *Client) PatchSyslogServerByID(params *PatchSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PatchSyslogServerByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchSyslogServerByIDParams() - } - op := &runtime.ClientOperation{ - ID: "PatchSyslogServerById", - Method: "PATCH", - PathPattern: "/syslog/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PatchSyslogServerByIDReader{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.(*PatchSyslogServerByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PatchSyslogServerByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveSyslogServer removes syslog server by id - -Delete syslog server by id. -*/ -func (a *Client) RemoveSyslogServer(params *RemoveSyslogServerParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveSyslogServerNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveSyslogServerParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveSyslogServer", - Method: "DELETE", - PathPattern: "/syslog/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveSyslogServerReader{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.(*RemoveSyslogServerNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveSyslogServerDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RemoveSyslogServers removes syslog servers - -Delete all syslog servers. -*/ -func (a *Client) RemoveSyslogServers(params *RemoveSyslogServersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveSyslogServersNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRemoveSyslogServersParams() - } - op := &runtime.ClientOperation{ - ID: "RemoveSyslogServers", - Method: "DELETE", - PathPattern: "/syslog", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RemoveSyslogServersReader{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.(*RemoveSyslogServersNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RemoveSyslogServersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSyslogAuditTags updates cluster audit tags - -Update cluster audit tags. -*/ -func (a *Client) UpdateSyslogAuditTags(params *UpdateSyslogAuditTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSyslogAuditTagsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSyslogAuditTagsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSyslogAuditTags", - Method: "POST", - PathPattern: "/syslog/audit-tags", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSyslogAuditTagsReader{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.(*UpdateSyslogAuditTagsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSyslogAuditTagsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateSyslogServerByID updates a syslog server by id - -Update syslog server by id. -*/ -func (a *Client) UpdateSyslogServerByID(params *UpdateSyslogServerByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateSyslogServerByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateSyslogServerByIDParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateSyslogServerById", - Method: "PUT", - PathPattern: "/syslog/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateSyslogServerByIDReader{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.(*UpdateSyslogServerByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateSyslogServerByIDDefault) - 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/v2/client/syslog/update_syslog_audit_tags_parameters.go b/v2/client/syslog/update_syslog_audit_tags_parameters.go deleted file mode 100644 index 23de8ff5..00000000 --- a/v2/client/syslog/update_syslog_audit_tags_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSyslogAuditTagsParams creates a new UpdateSyslogAuditTagsParams 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 NewUpdateSyslogAuditTagsParams() *UpdateSyslogAuditTagsParams { - return &UpdateSyslogAuditTagsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSyslogAuditTagsParamsWithTimeout creates a new UpdateSyslogAuditTagsParams object -// with the ability to set a timeout on a request. -func NewUpdateSyslogAuditTagsParamsWithTimeout(timeout time.Duration) *UpdateSyslogAuditTagsParams { - return &UpdateSyslogAuditTagsParams{ - timeout: timeout, - } -} - -// NewUpdateSyslogAuditTagsParamsWithContext creates a new UpdateSyslogAuditTagsParams object -// with the ability to set a context for a request. -func NewUpdateSyslogAuditTagsParamsWithContext(ctx context.Context) *UpdateSyslogAuditTagsParams { - return &UpdateSyslogAuditTagsParams{ - Context: ctx, - } -} - -// NewUpdateSyslogAuditTagsParamsWithHTTPClient creates a new UpdateSyslogAuditTagsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSyslogAuditTagsParamsWithHTTPClient(client *http.Client) *UpdateSyslogAuditTagsParams { - return &UpdateSyslogAuditTagsParams{ - HTTPClient: client, - } -} - -/* -UpdateSyslogAuditTagsParams contains all the parameters to send to the API endpoint - - for the update syslog audit tags operation. - - Typically these are written to a http.Request. -*/ -type UpdateSyslogAuditTagsParams struct { - - /* Body. - - Specifies syslog audit tag to update. - */ - Body *models.SyslogAuditTag - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update syslog audit tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSyslogAuditTagsParams) WithDefaults() *UpdateSyslogAuditTagsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update syslog audit tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSyslogAuditTagsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) WithTimeout(timeout time.Duration) *UpdateSyslogAuditTagsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) WithContext(ctx context.Context) *UpdateSyslogAuditTagsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) WithHTTPClient(client *http.Client) *UpdateSyslogAuditTagsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) WithBody(body *models.SyslogAuditTag) *UpdateSyslogAuditTagsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update syslog audit tags params -func (o *UpdateSyslogAuditTagsParams) SetBody(body *models.SyslogAuditTag) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSyslogAuditTagsParams) 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/syslog/update_syslog_audit_tags_responses.go b/v2/client/syslog/update_syslog_audit_tags_responses.go deleted file mode 100644 index 5771ce3c..00000000 --- a/v2/client/syslog/update_syslog_audit_tags_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSyslogAuditTagsReader is a Reader for the UpdateSyslogAuditTags structure. -type UpdateSyslogAuditTagsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSyslogAuditTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSyslogAuditTagsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSyslogAuditTagsDefault(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 - } -} - -// NewUpdateSyslogAuditTagsOK creates a UpdateSyslogAuditTagsOK with default headers values -func NewUpdateSyslogAuditTagsOK() *UpdateSyslogAuditTagsOK { - return &UpdateSyslogAuditTagsOK{} -} - -/* -UpdateSyslogAuditTagsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSyslogAuditTagsOK struct { - Payload *models.SyslogAuditTag -} - -// IsSuccess returns true when this update syslog audit tags o k response has a 2xx status code -func (o *UpdateSyslogAuditTagsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update syslog audit tags o k response has a 3xx status code -func (o *UpdateSyslogAuditTagsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update syslog audit tags o k response has a 4xx status code -func (o *UpdateSyslogAuditTagsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update syslog audit tags o k response has a 5xx status code -func (o *UpdateSyslogAuditTagsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update syslog audit tags o k response a status code equal to that given -func (o *UpdateSyslogAuditTagsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update syslog audit tags o k response -func (o *UpdateSyslogAuditTagsOK) Code() int { - return 200 -} - -func (o *UpdateSyslogAuditTagsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog/audit-tags][%d] updateSyslogAuditTagsOK %s", 200, payload) -} - -func (o *UpdateSyslogAuditTagsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog/audit-tags][%d] updateSyslogAuditTagsOK %s", 200, payload) -} - -func (o *UpdateSyslogAuditTagsOK) GetPayload() *models.SyslogAuditTag { - return o.Payload -} - -func (o *UpdateSyslogAuditTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogAuditTag) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSyslogAuditTagsDefault creates a UpdateSyslogAuditTagsDefault with default headers values -func NewUpdateSyslogAuditTagsDefault(code int) *UpdateSyslogAuditTagsDefault { - return &UpdateSyslogAuditTagsDefault{ - _statusCode: code, - } -} - -/* -UpdateSyslogAuditTagsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSyslogAuditTagsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update syslog audit tags default response has a 2xx status code -func (o *UpdateSyslogAuditTagsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update syslog audit tags default response has a 3xx status code -func (o *UpdateSyslogAuditTagsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update syslog audit tags default response has a 4xx status code -func (o *UpdateSyslogAuditTagsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update syslog audit tags default response has a 5xx status code -func (o *UpdateSyslogAuditTagsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update syslog audit tags default response a status code equal to that given -func (o *UpdateSyslogAuditTagsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update syslog audit tags default response -func (o *UpdateSyslogAuditTagsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSyslogAuditTagsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog/audit-tags][%d] UpdateSyslogAuditTags default %s", o._statusCode, payload) -} - -func (o *UpdateSyslogAuditTagsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /syslog/audit-tags][%d] UpdateSyslogAuditTags default %s", o._statusCode, payload) -} - -func (o *UpdateSyslogAuditTagsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSyslogAuditTagsDefault) 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/syslog/update_syslog_server_by_id_parameters.go b/v2/client/syslog/update_syslog_server_by_id_parameters.go deleted file mode 100644 index b22d3825..00000000 --- a/v2/client/syslog/update_syslog_server_by_id_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateSyslogServerByIDParams creates a new UpdateSyslogServerByIDParams 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 NewUpdateSyslogServerByIDParams() *UpdateSyslogServerByIDParams { - return &UpdateSyslogServerByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateSyslogServerByIDParamsWithTimeout creates a new UpdateSyslogServerByIDParams object -// with the ability to set a timeout on a request. -func NewUpdateSyslogServerByIDParamsWithTimeout(timeout time.Duration) *UpdateSyslogServerByIDParams { - return &UpdateSyslogServerByIDParams{ - timeout: timeout, - } -} - -// NewUpdateSyslogServerByIDParamsWithContext creates a new UpdateSyslogServerByIDParams object -// with the ability to set a context for a request. -func NewUpdateSyslogServerByIDParamsWithContext(ctx context.Context) *UpdateSyslogServerByIDParams { - return &UpdateSyslogServerByIDParams{ - Context: ctx, - } -} - -// NewUpdateSyslogServerByIDParamsWithHTTPClient creates a new UpdateSyslogServerByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateSyslogServerByIDParamsWithHTTPClient(client *http.Client) *UpdateSyslogServerByIDParams { - return &UpdateSyslogServerByIDParams{ - HTTPClient: client, - } -} - -/* -UpdateSyslogServerByIDParams contains all the parameters to send to the API endpoint - - for the update syslog server by Id operation. - - Typically these are written to a http.Request. -*/ -type UpdateSyslogServerByIDParams struct { - - /* Body. - - Specifies the body of syslog server body to update. - */ - Body *models.SyslogServer - - /* ID. - - Specifies the id of syslog server. - - Format: int32 - */ - ID int32 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSyslogServerByIDParams) WithDefaults() *UpdateSyslogServerByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update syslog server by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateSyslogServerByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) WithTimeout(timeout time.Duration) *UpdateSyslogServerByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) WithContext(ctx context.Context) *UpdateSyslogServerByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) WithHTTPClient(client *http.Client) *UpdateSyslogServerByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) WithBody(body *models.SyslogServer) *UpdateSyslogServerByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) SetBody(body *models.SyslogServer) { - o.Body = body -} - -// WithID adds the id to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) WithID(id int32) *UpdateSyslogServerByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update syslog server by Id params -func (o *UpdateSyslogServerByIDParams) SetID(id int32) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateSyslogServerByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt32(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/syslog/update_syslog_server_by_id_responses.go b/v2/client/syslog/update_syslog_server_by_id_responses.go deleted file mode 100644 index 1c357398..00000000 --- a/v2/client/syslog/update_syslog_server_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package syslog - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateSyslogServerByIDReader is a Reader for the UpdateSyslogServerByID structure. -type UpdateSyslogServerByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateSyslogServerByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateSyslogServerByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateSyslogServerByIDDefault(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 - } -} - -// NewUpdateSyslogServerByIDOK creates a UpdateSyslogServerByIDOK with default headers values -func NewUpdateSyslogServerByIDOK() *UpdateSyslogServerByIDOK { - return &UpdateSyslogServerByIDOK{} -} - -/* -UpdateSyslogServerByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateSyslogServerByIDOK struct { - Payload *models.SyslogServer -} - -// IsSuccess returns true when this update syslog server by Id o k response has a 2xx status code -func (o *UpdateSyslogServerByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update syslog server by Id o k response has a 3xx status code -func (o *UpdateSyslogServerByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update syslog server by Id o k response has a 4xx status code -func (o *UpdateSyslogServerByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update syslog server by Id o k response has a 5xx status code -func (o *UpdateSyslogServerByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update syslog server by Id o k response a status code equal to that given -func (o *UpdateSyslogServerByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update syslog server by Id o k response -func (o *UpdateSyslogServerByIDOK) Code() int { - return 200 -} - -func (o *UpdateSyslogServerByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /syslog/{id}][%d] updateSyslogServerByIdOK %s", 200, payload) -} - -func (o *UpdateSyslogServerByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /syslog/{id}][%d] updateSyslogServerByIdOK %s", 200, payload) -} - -func (o *UpdateSyslogServerByIDOK) GetPayload() *models.SyslogServer { - return o.Payload -} - -func (o *UpdateSyslogServerByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SyslogServer) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateSyslogServerByIDDefault creates a UpdateSyslogServerByIDDefault with default headers values -func NewUpdateSyslogServerByIDDefault(code int) *UpdateSyslogServerByIDDefault { - return &UpdateSyslogServerByIDDefault{ - _statusCode: code, - } -} - -/* -UpdateSyslogServerByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateSyslogServerByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update syslog server by Id default response has a 2xx status code -func (o *UpdateSyslogServerByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update syslog server by Id default response has a 3xx status code -func (o *UpdateSyslogServerByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update syslog server by Id default response has a 4xx status code -func (o *UpdateSyslogServerByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update syslog server by Id default response has a 5xx status code -func (o *UpdateSyslogServerByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update syslog server by Id default response a status code equal to that given -func (o *UpdateSyslogServerByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update syslog server by Id default response -func (o *UpdateSyslogServerByIDDefault) Code() int { - return o._statusCode -} - -func (o *UpdateSyslogServerByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /syslog/{id}][%d] UpdateSyslogServerById default %s", o._statusCode, payload) -} - -func (o *UpdateSyslogServerByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /syslog/{id}][%d] UpdateSyslogServerById default %s", o._statusCode, payload) -} - -func (o *UpdateSyslogServerByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateSyslogServerByIDDefault) 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/tag/create_tag_parameters.go b/v2/client/tag/create_tag_parameters.go deleted file mode 100644 index bf1a85fd..00000000 --- a/v2/client/tag/create_tag_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateTagParams creates a new CreateTagParams 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 NewCreateTagParams() *CreateTagParams { - return &CreateTagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTagParamsWithTimeout creates a new CreateTagParams object -// with the ability to set a timeout on a request. -func NewCreateTagParamsWithTimeout(timeout time.Duration) *CreateTagParams { - return &CreateTagParams{ - timeout: timeout, - } -} - -// NewCreateTagParamsWithContext creates a new CreateTagParams object -// with the ability to set a context for a request. -func NewCreateTagParamsWithContext(ctx context.Context) *CreateTagParams { - return &CreateTagParams{ - Context: ctx, - } -} - -// NewCreateTagParamsWithHTTPClient creates a new CreateTagParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTagParamsWithHTTPClient(client *http.Client) *CreateTagParams { - return &CreateTagParams{ - HTTPClient: client, - } -} - -/* -CreateTagParams contains all the parameters to send to the API endpoint - - for the create tag operation. - - Typically these are written to a http.Request. -*/ -type CreateTagParams struct { - - /* Body. - - Request to create a Tag. - */ - Body *models.Tag - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTagParams) WithDefaults() *CreateTagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create tag params -func (o *CreateTagParams) WithTimeout(timeout time.Duration) *CreateTagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create tag params -func (o *CreateTagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create tag params -func (o *CreateTagParams) WithContext(ctx context.Context) *CreateTagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create tag params -func (o *CreateTagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create tag params -func (o *CreateTagParams) WithHTTPClient(client *http.Client) *CreateTagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create tag params -func (o *CreateTagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create tag params -func (o *CreateTagParams) WithBody(body *models.Tag) *CreateTagParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create tag params -func (o *CreateTagParams) SetBody(body *models.Tag) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTagParams) 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/tag/create_tag_responses.go b/v2/client/tag/create_tag_responses.go deleted file mode 100644 index d812132e..00000000 --- a/v2/client/tag/create_tag_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateTagReader is a Reader for the CreateTag structure. -type CreateTagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTagCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateTagDefault(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 - } -} - -// NewCreateTagCreated creates a CreateTagCreated with default headers values -func NewCreateTagCreated() *CreateTagCreated { - return &CreateTagCreated{} -} - -/* -CreateTagCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateTagCreated struct { - Payload *models.Tag -} - -// IsSuccess returns true when this create tag created response has a 2xx status code -func (o *CreateTagCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create tag created response has a 3xx status code -func (o *CreateTagCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create tag created response has a 4xx status code -func (o *CreateTagCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create tag created response has a 5xx status code -func (o *CreateTagCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create tag created response a status code equal to that given -func (o *CreateTagCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create tag created response -func (o *CreateTagCreated) Code() int { - return 201 -} - -func (o *CreateTagCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tags][%d] createTagCreated %s", 201, payload) -} - -func (o *CreateTagCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tags][%d] createTagCreated %s", 201, payload) -} - -func (o *CreateTagCreated) GetPayload() *models.Tag { - return o.Payload -} - -func (o *CreateTagCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Tag) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTagDefault creates a CreateTagDefault with default headers values -func NewCreateTagDefault(code int) *CreateTagDefault { - return &CreateTagDefault{ - _statusCode: code, - } -} - -/* -CreateTagDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateTagDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create tag default response has a 2xx status code -func (o *CreateTagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create tag default response has a 3xx status code -func (o *CreateTagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create tag default response has a 4xx status code -func (o *CreateTagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create tag default response has a 5xx status code -func (o *CreateTagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create tag default response a status code equal to that given -func (o *CreateTagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create tag default response -func (o *CreateTagDefault) Code() int { - return o._statusCode -} - -func (o *CreateTagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tags][%d] CreateTag default %s", o._statusCode, payload) -} - -func (o *CreateTagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tags][%d] CreateTag default %s", o._statusCode, payload) -} - -func (o *CreateTagDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateTagDefault) 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/tag/delete_tag_parameters.go b/v2/client/tag/delete_tag_parameters.go deleted file mode 100644 index 8046a5a2..00000000 --- a/v2/client/tag/delete_tag_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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" -) - -// NewDeleteTagParams creates a new DeleteTagParams 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 NewDeleteTagParams() *DeleteTagParams { - return &DeleteTagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteTagParamsWithTimeout creates a new DeleteTagParams object -// with the ability to set a timeout on a request. -func NewDeleteTagParamsWithTimeout(timeout time.Duration) *DeleteTagParams { - return &DeleteTagParams{ - timeout: timeout, - } -} - -// NewDeleteTagParamsWithContext creates a new DeleteTagParams object -// with the ability to set a context for a request. -func NewDeleteTagParamsWithContext(ctx context.Context) *DeleteTagParams { - return &DeleteTagParams{ - Context: ctx, - } -} - -// NewDeleteTagParamsWithHTTPClient creates a new DeleteTagParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteTagParamsWithHTTPClient(client *http.Client) *DeleteTagParams { - return &DeleteTagParams{ - HTTPClient: client, - } -} - -/* -DeleteTagParams contains all the parameters to send to the API endpoint - - for the delete tag operation. - - Typically these are written to a http.Request. -*/ -type DeleteTagParams struct { - - /* ID. - - Specifies the Id of the tag. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTagParams) WithDefaults() *DeleteTagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete tag params -func (o *DeleteTagParams) WithTimeout(timeout time.Duration) *DeleteTagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete tag params -func (o *DeleteTagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete tag params -func (o *DeleteTagParams) WithContext(ctx context.Context) *DeleteTagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete tag params -func (o *DeleteTagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete tag params -func (o *DeleteTagParams) WithHTTPClient(client *http.Client) *DeleteTagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete tag params -func (o *DeleteTagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete tag params -func (o *DeleteTagParams) WithID(id string) *DeleteTagParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete tag params -func (o *DeleteTagParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteTagParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tag/delete_tag_responses.go b/v2/client/tag/delete_tag_responses.go deleted file mode 100644 index 1969f40d..00000000 --- a/v2/client/tag/delete_tag_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteTagReader is a Reader for the DeleteTag structure. -type DeleteTagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteTagNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteTagDefault(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 - } -} - -// NewDeleteTagNoContent creates a DeleteTagNoContent with default headers values -func NewDeleteTagNoContent() *DeleteTagNoContent { - return &DeleteTagNoContent{} -} - -/* -DeleteTagNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteTagNoContent struct { -} - -// IsSuccess returns true when this delete tag no content response has a 2xx status code -func (o *DeleteTagNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete tag no content response has a 3xx status code -func (o *DeleteTagNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete tag no content response has a 4xx status code -func (o *DeleteTagNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete tag no content response has a 5xx status code -func (o *DeleteTagNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete tag no content response a status code equal to that given -func (o *DeleteTagNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete tag no content response -func (o *DeleteTagNoContent) Code() int { - return 204 -} - -func (o *DeleteTagNoContent) Error() string { - return fmt.Sprintf("[DELETE /tags/{id}][%d] deleteTagNoContent", 204) -} - -func (o *DeleteTagNoContent) String() string { - return fmt.Sprintf("[DELETE /tags/{id}][%d] deleteTagNoContent", 204) -} - -func (o *DeleteTagNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteTagDefault creates a DeleteTagDefault with default headers values -func NewDeleteTagDefault(code int) *DeleteTagDefault { - return &DeleteTagDefault{ - _statusCode: code, - } -} - -/* -DeleteTagDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteTagDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete tag default response has a 2xx status code -func (o *DeleteTagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete tag default response has a 3xx status code -func (o *DeleteTagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete tag default response has a 4xx status code -func (o *DeleteTagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete tag default response has a 5xx status code -func (o *DeleteTagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete tag default response a status code equal to that given -func (o *DeleteTagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete tag default response -func (o *DeleteTagDefault) Code() int { - return o._statusCode -} - -func (o *DeleteTagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /tags/{id}][%d] DeleteTag default %s", o._statusCode, payload) -} - -func (o *DeleteTagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /tags/{id}][%d] DeleteTag default %s", o._statusCode, payload) -} - -func (o *DeleteTagDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteTagDefault) 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/tag/get_tag_by_id_parameters.go b/v2/client/tag/get_tag_by_id_parameters.go deleted file mode 100644 index 605fc5b3..00000000 --- a/v2/client/tag/get_tag_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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" -) - -// NewGetTagByIDParams creates a new GetTagByIDParams 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 NewGetTagByIDParams() *GetTagByIDParams { - return &GetTagByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTagByIDParamsWithTimeout creates a new GetTagByIDParams object -// with the ability to set a timeout on a request. -func NewGetTagByIDParamsWithTimeout(timeout time.Duration) *GetTagByIDParams { - return &GetTagByIDParams{ - timeout: timeout, - } -} - -// NewGetTagByIDParamsWithContext creates a new GetTagByIDParams object -// with the ability to set a context for a request. -func NewGetTagByIDParamsWithContext(ctx context.Context) *GetTagByIDParams { - return &GetTagByIDParams{ - Context: ctx, - } -} - -// NewGetTagByIDParamsWithHTTPClient creates a new GetTagByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTagByIDParamsWithHTTPClient(client *http.Client) *GetTagByIDParams { - return &GetTagByIDParams{ - HTTPClient: client, - } -} - -/* -GetTagByIDParams contains all the parameters to send to the API endpoint - - for the get tag by Id operation. - - Typically these are written to a http.Request. -*/ -type GetTagByIDParams struct { - - /* ID. - - Specifies the Id of the tag. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tag by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTagByIDParams) WithDefaults() *GetTagByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tag by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTagByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tag by Id params -func (o *GetTagByIDParams) WithTimeout(timeout time.Duration) *GetTagByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tag by Id params -func (o *GetTagByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tag by Id params -func (o *GetTagByIDParams) WithContext(ctx context.Context) *GetTagByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tag by Id params -func (o *GetTagByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tag by Id params -func (o *GetTagByIDParams) WithHTTPClient(client *http.Client) *GetTagByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tag by Id params -func (o *GetTagByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get tag by Id params -func (o *GetTagByIDParams) WithID(id string) *GetTagByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get tag by Id params -func (o *GetTagByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTagByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tag/get_tag_by_id_responses.go b/v2/client/tag/get_tag_by_id_responses.go deleted file mode 100644 index 7f4f54d4..00000000 --- a/v2/client/tag/get_tag_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTagByIDReader is a Reader for the GetTagByID structure. -type GetTagByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTagByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTagByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTagByIDDefault(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 - } -} - -// NewGetTagByIDOK creates a GetTagByIDOK with default headers values -func NewGetTagByIDOK() *GetTagByIDOK { - return &GetTagByIDOK{} -} - -/* -GetTagByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTagByIDOK struct { - Payload *models.Tag -} - -// IsSuccess returns true when this get tag by Id o k response has a 2xx status code -func (o *GetTagByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tag by Id o k response has a 3xx status code -func (o *GetTagByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tag by Id o k response has a 4xx status code -func (o *GetTagByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tag by Id o k response has a 5xx status code -func (o *GetTagByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tag by Id o k response a status code equal to that given -func (o *GetTagByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tag by Id o k response -func (o *GetTagByIDOK) Code() int { - return 200 -} - -func (o *GetTagByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags/{id}][%d] getTagByIdOK %s", 200, payload) -} - -func (o *GetTagByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags/{id}][%d] getTagByIdOK %s", 200, payload) -} - -func (o *GetTagByIDOK) GetPayload() *models.Tag { - return o.Payload -} - -func (o *GetTagByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Tag) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTagByIDDefault creates a GetTagByIDDefault with default headers values -func NewGetTagByIDDefault(code int) *GetTagByIDDefault { - return &GetTagByIDDefault{ - _statusCode: code, - } -} - -/* -GetTagByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTagByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get tag by Id default response has a 2xx status code -func (o *GetTagByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tag by Id default response has a 3xx status code -func (o *GetTagByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tag by Id default response has a 4xx status code -func (o *GetTagByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tag by Id default response has a 5xx status code -func (o *GetTagByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tag by Id default response a status code equal to that given -func (o *GetTagByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tag by Id default response -func (o *GetTagByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetTagByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags/{id}][%d] GetTagById default %s", o._statusCode, payload) -} - -func (o *GetTagByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags/{id}][%d] GetTagById default %s", o._statusCode, payload) -} - -func (o *GetTagByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTagByIDDefault) 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/tag/get_tags_parameters.go b/v2/client/tag/get_tags_parameters.go deleted file mode 100644 index 6a84c1be..00000000 --- a/v2/client/tag/get_tags_parameters.go +++ /dev/null @@ -1,383 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/go-openapi/swag" -) - -// NewGetTagsParams creates a new GetTagsParams 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 NewGetTagsParams() *GetTagsParams { - return &GetTagsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTagsParamsWithTimeout creates a new GetTagsParams object -// with the ability to set a timeout on a request. -func NewGetTagsParamsWithTimeout(timeout time.Duration) *GetTagsParams { - return &GetTagsParams{ - timeout: timeout, - } -} - -// NewGetTagsParamsWithContext creates a new GetTagsParams object -// with the ability to set a context for a request. -func NewGetTagsParamsWithContext(ctx context.Context) *GetTagsParams { - return &GetTagsParams{ - Context: ctx, - } -} - -// NewGetTagsParamsWithHTTPClient creates a new GetTagsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTagsParamsWithHTTPClient(client *http.Client) *GetTagsParams { - return &GetTagsParams{ - HTTPClient: client, - } -} - -/* -GetTagsParams contains all the parameters to send to the API endpoint - - for the get tags operation. - - Typically these are written to a http.Request. -*/ -type GetTagsParams struct { - - /* Ids. - - Filter by a list of Tag Ids. If Ids are mentioned all other fields - will be ignored. - */ - Ids []string - - /* IncludeMarkedForDeletion. - - Specifies if tags marked for deletion should be shown. These are - tags which are undergoing deletion. False, by default. - */ - IncludeMarkedForDeletion *bool - - /* IncludeTenants. - - IncludeTenants specifies if tags of all the tenants under the - hierarchy of the logged in user's organization should be returned. - False, by default. - */ - IncludeTenants *bool - - /* Names. - - Filter by a list of Tag names. - */ - Names []string - - /* Namespaces. - - Filter by a list of Namespaces. - */ - Namespaces []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which tags are to be - returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTagsParams) WithDefaults() *GetTagsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tags params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTagsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tags params -func (o *GetTagsParams) WithTimeout(timeout time.Duration) *GetTagsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tags params -func (o *GetTagsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tags params -func (o *GetTagsParams) WithContext(ctx context.Context) *GetTagsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tags params -func (o *GetTagsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tags params -func (o *GetTagsParams) WithHTTPClient(client *http.Client) *GetTagsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tags params -func (o *GetTagsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get tags params -func (o *GetTagsParams) WithIds(ids []string) *GetTagsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get tags params -func (o *GetTagsParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIncludeMarkedForDeletion adds the includeMarkedForDeletion to the get tags params -func (o *GetTagsParams) WithIncludeMarkedForDeletion(includeMarkedForDeletion *bool) *GetTagsParams { - o.SetIncludeMarkedForDeletion(includeMarkedForDeletion) - return o -} - -// SetIncludeMarkedForDeletion adds the includeMarkedForDeletion to the get tags params -func (o *GetTagsParams) SetIncludeMarkedForDeletion(includeMarkedForDeletion *bool) { - o.IncludeMarkedForDeletion = includeMarkedForDeletion -} - -// WithIncludeTenants adds the includeTenants to the get tags params -func (o *GetTagsParams) WithIncludeTenants(includeTenants *bool) *GetTagsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get tags params -func (o *GetTagsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithNames adds the names to the get tags params -func (o *GetTagsParams) WithNames(names []string) *GetTagsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get tags params -func (o *GetTagsParams) SetNames(names []string) { - o.Names = names -} - -// WithNamespaces adds the namespaces to the get tags params -func (o *GetTagsParams) WithNamespaces(namespaces []string) *GetTagsParams { - o.SetNamespaces(namespaces) - return o -} - -// SetNamespaces adds the namespaces to the get tags params -func (o *GetTagsParams) SetNamespaces(namespaces []string) { - o.Namespaces = namespaces -} - -// WithTenantIds adds the tenantIds to the get tags params -func (o *GetTagsParams) WithTenantIds(tenantIds []string) *GetTagsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get tags params -func (o *GetTagsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IncludeMarkedForDeletion != nil { - - // query param includeMarkedForDeletion - var qrIncludeMarkedForDeletion bool - - if o.IncludeMarkedForDeletion != nil { - qrIncludeMarkedForDeletion = *o.IncludeMarkedForDeletion - } - qIncludeMarkedForDeletion := swag.FormatBool(qrIncludeMarkedForDeletion) - if qIncludeMarkedForDeletion != "" { - - if err := r.SetQueryParam("includeMarkedForDeletion", qIncludeMarkedForDeletion); 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.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.Namespaces != nil { - - // binding items for namespaces - joinedNamespaces := o.bindParamNamespaces(reg) - - // query array param namespaces - if err := r.SetQueryParam("namespaces", joinedNamespaces...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetTags binds the parameter ids -func (o *GetTagsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetTags binds the parameter names -func (o *GetTagsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetTags binds the parameter namespaces -func (o *GetTagsParams) bindParamNamespaces(formats strfmt.Registry) []string { - namespacesIR := o.Namespaces - - var namespacesIC []string - for _, namespacesIIR := range namespacesIR { // explode []string - - namespacesIIV := namespacesIIR // string as string - namespacesIC = append(namespacesIC, namespacesIIV) - } - - // items.CollectionFormat: "" - namespacesIS := swag.JoinByFormat(namespacesIC, "") - - return namespacesIS -} - -// bindParamGetTags binds the parameter tenantIds -func (o *GetTagsParams) 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/client/tag/get_tags_responses.go b/v2/client/tag/get_tags_responses.go deleted file mode 100644 index d70f807c..00000000 --- a/v2/client/tag/get_tags_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTagsReader is a Reader for the GetTags structure. -type GetTagsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTagsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTagsDefault(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 - } -} - -// NewGetTagsOK creates a GetTagsOK with default headers values -func NewGetTagsOK() *GetTagsOK { - return &GetTagsOK{} -} - -/* -GetTagsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTagsOK struct { - Payload models.GetTagsResult -} - -// IsSuccess returns true when this get tags o k response has a 2xx status code -func (o *GetTagsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tags o k response has a 3xx status code -func (o *GetTagsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tags o k response has a 4xx status code -func (o *GetTagsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tags o k response has a 5xx status code -func (o *GetTagsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tags o k response a status code equal to that given -func (o *GetTagsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tags o k response -func (o *GetTagsOK) Code() int { - return 200 -} - -func (o *GetTagsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags][%d] getTagsOK %s", 200, payload) -} - -func (o *GetTagsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags][%d] getTagsOK %s", 200, payload) -} - -func (o *GetTagsOK) GetPayload() models.GetTagsResult { - return o.Payload -} - -func (o *GetTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTagsDefault creates a GetTagsDefault with default headers values -func NewGetTagsDefault(code int) *GetTagsDefault { - return &GetTagsDefault{ - _statusCode: code, - } -} - -/* -GetTagsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTagsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get tags default response has a 2xx status code -func (o *GetTagsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tags default response has a 3xx status code -func (o *GetTagsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tags default response has a 4xx status code -func (o *GetTagsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tags default response has a 5xx status code -func (o *GetTagsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tags default response a status code equal to that given -func (o *GetTagsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tags default response -func (o *GetTagsDefault) Code() int { - return o._statusCode -} - -func (o *GetTagsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags][%d] GetTags default %s", o._statusCode, payload) -} - -func (o *GetTagsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tags][%d] GetTags default %s", o._statusCode, payload) -} - -func (o *GetTagsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTagsDefault) 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/tag/tag_client.go b/v2/client/tag/tag_client.go deleted file mode 100644 index bb21e708..00000000 --- a/v2/client/tag/tag_client.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new tag API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new tag API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new tag API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for tag API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateTag(params *CreateTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTagCreated, error) - - DeleteTag(params *DeleteTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTagNoContent, error) - - GetTagByID(params *GetTagByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTagByIDOK, error) - - GetTags(params *GetTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTagsOK, error) - - UpdateTag(params *UpdateTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTagOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateTag creates a tag - -Creates a Tag. -*/ -func (a *Client) CreateTag(params *CreateTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTagCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTagParams() - } - op := &runtime.ClientOperation{ - ID: "CreateTag", - Method: "POST", - PathPattern: "/tags", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateTagReader{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.(*CreateTagCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateTagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteTag deletes a tag - -Deletes a Tag by id. -*/ -func (a *Client) DeleteTag(params *DeleteTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTagNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteTagParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteTag", - Method: "DELETE", - PathPattern: "/tags/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteTagReader{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.(*DeleteTagNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteTagDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTagByID gets tag by id - -Get Tag by id. -*/ -func (a *Client) GetTagByID(params *GetTagByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTagByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTagByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetTagById", - Method: "GET", - PathPattern: "/tags/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTagByIDReader{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.(*GetTagByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTagByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetTags gets tags based on filters - - If no parameters are specified, all tags are returned. - -Specifying parameters filters the results that are returned. -*/ -func (a *Client) GetTags(params *GetTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTagsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTagsParams() - } - op := &runtime.ClientOperation{ - ID: "GetTags", - Method: "GET", - PathPattern: "/tags", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTagsReader{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.(*GetTagsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTagsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTag updates a tag - -Updates a Tag by id. -*/ -func (a *Client) UpdateTag(params *UpdateTagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTagOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTagParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTag", - Method: "PUT", - PathPattern: "/tags/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTagReader{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.(*UpdateTagOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTagDefault) - 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/v2/client/tag/update_tag_parameters.go b/v2/client/tag/update_tag_parameters.go deleted file mode 100644 index 741650ca..00000000 --- a/v2/client/tag/update_tag_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateTagParams creates a new UpdateTagParams 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 NewUpdateTagParams() *UpdateTagParams { - return &UpdateTagParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTagParamsWithTimeout creates a new UpdateTagParams object -// with the ability to set a timeout on a request. -func NewUpdateTagParamsWithTimeout(timeout time.Duration) *UpdateTagParams { - return &UpdateTagParams{ - timeout: timeout, - } -} - -// NewUpdateTagParamsWithContext creates a new UpdateTagParams object -// with the ability to set a context for a request. -func NewUpdateTagParamsWithContext(ctx context.Context) *UpdateTagParams { - return &UpdateTagParams{ - Context: ctx, - } -} - -// NewUpdateTagParamsWithHTTPClient creates a new UpdateTagParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTagParamsWithHTTPClient(client *http.Client) *UpdateTagParams { - return &UpdateTagParams{ - HTTPClient: client, - } -} - -/* -UpdateTagParams contains all the parameters to send to the API endpoint - - for the update tag operation. - - Typically these are written to a http.Request. -*/ -type UpdateTagParams struct { - - /* Body. - - Request to update a tag. - */ - Body *models.Tag - - /* ID. - - Specifies the Id of the tag. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTagParams) WithDefaults() *UpdateTagParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tag params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTagParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tag params -func (o *UpdateTagParams) WithTimeout(timeout time.Duration) *UpdateTagParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tag params -func (o *UpdateTagParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tag params -func (o *UpdateTagParams) WithContext(ctx context.Context) *UpdateTagParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tag params -func (o *UpdateTagParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tag params -func (o *UpdateTagParams) WithHTTPClient(client *http.Client) *UpdateTagParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tag params -func (o *UpdateTagParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tag params -func (o *UpdateTagParams) WithBody(body *models.Tag) *UpdateTagParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tag params -func (o *UpdateTagParams) SetBody(body *models.Tag) { - o.Body = body -} - -// WithID adds the id to the update tag params -func (o *UpdateTagParams) WithID(id string) *UpdateTagParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update tag params -func (o *UpdateTagParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTagParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tag/update_tag_responses.go b/v2/client/tag/update_tag_responses.go deleted file mode 100644 index b9c1a553..00000000 --- a/v2/client/tag/update_tag_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tag - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateTagReader is a Reader for the UpdateTag structure. -type UpdateTagReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTagReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTagOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTagDefault(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 - } -} - -// NewUpdateTagOK creates a UpdateTagOK with default headers values -func NewUpdateTagOK() *UpdateTagOK { - return &UpdateTagOK{} -} - -/* -UpdateTagOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateTagOK struct { - Payload *models.Tag -} - -// IsSuccess returns true when this update tag o k response has a 2xx status code -func (o *UpdateTagOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tag o k response has a 3xx status code -func (o *UpdateTagOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tag o k response has a 4xx status code -func (o *UpdateTagOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tag o k response has a 5xx status code -func (o *UpdateTagOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tag o k response a status code equal to that given -func (o *UpdateTagOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tag o k response -func (o *UpdateTagOK) Code() int { - return 200 -} - -func (o *UpdateTagOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tags/{id}][%d] updateTagOK %s", 200, payload) -} - -func (o *UpdateTagOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tags/{id}][%d] updateTagOK %s", 200, payload) -} - -func (o *UpdateTagOK) GetPayload() *models.Tag { - return o.Payload -} - -func (o *UpdateTagOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Tag) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTagDefault creates a UpdateTagDefault with default headers values -func NewUpdateTagDefault(code int) *UpdateTagDefault { - return &UpdateTagDefault{ - _statusCode: code, - } -} - -/* -UpdateTagDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTagDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update tag default response has a 2xx status code -func (o *UpdateTagDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tag default response has a 3xx status code -func (o *UpdateTagDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tag default response has a 4xx status code -func (o *UpdateTagDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tag default response has a 5xx status code -func (o *UpdateTagDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tag default response a status code equal to that given -func (o *UpdateTagDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tag default response -func (o *UpdateTagDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTagDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tags/{id}][%d] UpdateTag default %s", o._statusCode, payload) -} - -func (o *UpdateTagDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tags/{id}][%d] UpdateTag default %s", o._statusCode, payload) -} - -func (o *UpdateTagDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateTagDefault) 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/templates/download_art_file_parameters.go b/v2/client/templates/download_art_file_parameters.go deleted file mode 100644 index 2cf08249..00000000 --- a/v2/client/templates/download_art_file_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// 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" -) - -// NewDownloadArtFileParams creates a new DownloadArtFileParams 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 NewDownloadArtFileParams() *DownloadArtFileParams { - return &DownloadArtFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDownloadArtFileParamsWithTimeout creates a new DownloadArtFileParams object -// with the ability to set a timeout on a request. -func NewDownloadArtFileParamsWithTimeout(timeout time.Duration) *DownloadArtFileParams { - return &DownloadArtFileParams{ - timeout: timeout, - } -} - -// NewDownloadArtFileParamsWithContext creates a new DownloadArtFileParams object -// with the ability to set a context for a request. -func NewDownloadArtFileParamsWithContext(ctx context.Context) *DownloadArtFileParams { - return &DownloadArtFileParams{ - Context: ctx, - } -} - -// NewDownloadArtFileParamsWithHTTPClient creates a new DownloadArtFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewDownloadArtFileParamsWithHTTPClient(client *http.Client) *DownloadArtFileParams { - return &DownloadArtFileParams{ - HTTPClient: client, - } -} - -/* -DownloadArtFileParams contains all the parameters to send to the API endpoint - - for the download art file operation. - - Typically these are written to a http.Request. -*/ -type DownloadArtFileParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the download art file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadArtFileParams) WithDefaults() *DownloadArtFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the download art file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DownloadArtFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the download art file params -func (o *DownloadArtFileParams) WithTimeout(timeout time.Duration) *DownloadArtFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the download art file params -func (o *DownloadArtFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the download art file params -func (o *DownloadArtFileParams) WithContext(ctx context.Context) *DownloadArtFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the download art file params -func (o *DownloadArtFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the download art file params -func (o *DownloadArtFileParams) WithHTTPClient(client *http.Client) *DownloadArtFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the download art file params -func (o *DownloadArtFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DownloadArtFileParams) 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/templates/download_art_file_responses.go b/v2/client/templates/download_art_file_responses.go deleted file mode 100644 index 9a10d849..00000000 --- a/v2/client/templates/download_art_file_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DownloadArtFileReader is a Reader for the DownloadArtFile structure. -type DownloadArtFileReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *DownloadArtFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDownloadArtFileOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDownloadArtFileDefault(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 - } -} - -// NewDownloadArtFileOK creates a DownloadArtFileOK with default headers values -func NewDownloadArtFileOK(writer io.Writer) *DownloadArtFileOK { - return &DownloadArtFileOK{ - - Payload: writer, - } -} - -/* -DownloadArtFileOK describes a response with status code 200, with default header values. - -Success -*/ -type DownloadArtFileOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this download art file o k response has a 2xx status code -func (o *DownloadArtFileOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this download art file o k response has a 3xx status code -func (o *DownloadArtFileOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this download art file o k response has a 4xx status code -func (o *DownloadArtFileOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this download art file o k response has a 5xx status code -func (o *DownloadArtFileOK) IsServerError() bool { - return false -} - -// IsCode returns true when this download art file o k response a status code equal to that given -func (o *DownloadArtFileOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the download art file o k response -func (o *DownloadArtFileOK) Code() int { - return 200 -} - -func (o *DownloadArtFileOK) Error() string { - return fmt.Sprintf("[GET /data-protect/templates/downloadArtFile][%d] downloadArtFileOK", 200) -} - -func (o *DownloadArtFileOK) String() string { - return fmt.Sprintf("[GET /data-protect/templates/downloadArtFile][%d] downloadArtFileOK", 200) -} - -func (o *DownloadArtFileOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *DownloadArtFileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDownloadArtFileDefault creates a DownloadArtFileDefault with default headers values -func NewDownloadArtFileDefault(code int) *DownloadArtFileDefault { - return &DownloadArtFileDefault{ - _statusCode: code, - } -} - -/* -DownloadArtFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type DownloadArtFileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this download art file default response has a 2xx status code -func (o *DownloadArtFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this download art file default response has a 3xx status code -func (o *DownloadArtFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this download art file default response has a 4xx status code -func (o *DownloadArtFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this download art file default response has a 5xx status code -func (o *DownloadArtFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this download art file default response a status code equal to that given -func (o *DownloadArtFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the download art file default response -func (o *DownloadArtFileDefault) Code() int { - return o._statusCode -} - -func (o *DownloadArtFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/templates/downloadArtFile][%d] DownloadArtFile default %s", o._statusCode, payload) -} - -func (o *DownloadArtFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /data-protect/templates/downloadArtFile][%d] DownloadArtFile default %s", o._statusCode, payload) -} - -func (o *DownloadArtFileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DownloadArtFileDefault) 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/templates/templates_client.go b/v2/client/templates/templates_client.go deleted file mode 100644 index bf1b1a56..00000000 --- a/v2/client/templates/templates_client.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new templates API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new templates API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new templates API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for templates API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// This client is generated with a few options you might find useful for your swagger spec. -// -// Feel free to add you own set of options. - -// WithAccept allows the client to force the Accept header -// to negotiate a specific Producer from the server. -// -// You may use this option to set arbitrary extensions to your MIME media type. -func WithAccept(mime string) ClientOption { - return func(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{mime} - } -} - -// WithAcceptApplicationJSON sets the Accept header to "application/json". -func WithAcceptApplicationJSON(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/json"} -} - -// WithAcceptApplicationOctetStream sets the Accept header to "application/octet-stream". -func WithAcceptApplicationOctetStream(r *runtime.ClientOperation) { - r.ProducesMediaTypes = []string{"application/octet-stream"} -} - -// ClientService is the interface for Client methods -type ClientService interface { - DownloadArtFile(params *DownloadArtFileParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*DownloadArtFileOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DownloadArtFile downloads the azure resource template - -Download the azure resource template. -*/ -func (a *Client) DownloadArtFile(params *DownloadArtFileParams, authInfo runtime.ClientAuthInfoWriter, writer io.Writer, opts ...ClientOption) (*DownloadArtFileOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDownloadArtFileParams() - } - op := &runtime.ClientOperation{ - ID: "DownloadArtFile", - Method: "GET", - PathPattern: "/data-protect/templates/downloadArtFile", - ProducesMediaTypes: []string{"application/octet-stream"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DownloadArtFileReader{formats: a.formats, writer: writer}, - 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.(*DownloadArtFileOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DownloadArtFileDefault) - 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/v2/client/tenant/assign_properties_to_tenant_parameters.go b/v2/client/tenant/assign_properties_to_tenant_parameters.go deleted file mode 100644 index f3027ebd..00000000 --- a/v2/client/tenant/assign_properties_to_tenant_parameters.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAssignPropertiesToTenantParams creates a new AssignPropertiesToTenantParams 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 NewAssignPropertiesToTenantParams() *AssignPropertiesToTenantParams { - return &AssignPropertiesToTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAssignPropertiesToTenantParamsWithTimeout creates a new AssignPropertiesToTenantParams object -// with the ability to set a timeout on a request. -func NewAssignPropertiesToTenantParamsWithTimeout(timeout time.Duration) *AssignPropertiesToTenantParams { - return &AssignPropertiesToTenantParams{ - timeout: timeout, - } -} - -// NewAssignPropertiesToTenantParamsWithContext creates a new AssignPropertiesToTenantParams object -// with the ability to set a context for a request. -func NewAssignPropertiesToTenantParamsWithContext(ctx context.Context) *AssignPropertiesToTenantParams { - return &AssignPropertiesToTenantParams{ - Context: ctx, - } -} - -// NewAssignPropertiesToTenantParamsWithHTTPClient creates a new AssignPropertiesToTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewAssignPropertiesToTenantParamsWithHTTPClient(client *http.Client) *AssignPropertiesToTenantParams { - return &AssignPropertiesToTenantParams{ - HTTPClient: client, - } -} - -/* -AssignPropertiesToTenantParams contains all the parameters to send to the API endpoint - - for the assign properties to tenant operation. - - Typically these are written to a http.Request. -*/ -type AssignPropertiesToTenantParams struct { - - // Body. - Body *models.TenantAssignmentsParams - - /* ID. - - The Tenant id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the assign properties to tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AssignPropertiesToTenantParams) WithDefaults() *AssignPropertiesToTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the assign properties to tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AssignPropertiesToTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) WithTimeout(timeout time.Duration) *AssignPropertiesToTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) WithContext(ctx context.Context) *AssignPropertiesToTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) WithHTTPClient(client *http.Client) *AssignPropertiesToTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) WithBody(body *models.TenantAssignmentsParams) *AssignPropertiesToTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) SetBody(body *models.TenantAssignmentsParams) { - o.Body = body -} - -// WithID adds the id to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) WithID(id string) *AssignPropertiesToTenantParams { - o.SetID(id) - return o -} - -// SetID adds the id to the assign properties to tenant params -func (o *AssignPropertiesToTenantParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *AssignPropertiesToTenantParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/assign_properties_to_tenant_responses.go b/v2/client/tenant/assign_properties_to_tenant_responses.go deleted file mode 100644 index 2f78165c..00000000 --- a/v2/client/tenant/assign_properties_to_tenant_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AssignPropertiesToTenantReader is a Reader for the AssignPropertiesToTenant structure. -type AssignPropertiesToTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AssignPropertiesToTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAssignPropertiesToTenantOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAssignPropertiesToTenantDefault(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 - } -} - -// NewAssignPropertiesToTenantOK creates a AssignPropertiesToTenantOK with default headers values -func NewAssignPropertiesToTenantOK() *AssignPropertiesToTenantOK { - return &AssignPropertiesToTenantOK{} -} - -/* -AssignPropertiesToTenantOK describes a response with status code 200, with default header values. - -Success -*/ -type AssignPropertiesToTenantOK struct { - Payload *models.TenantAssignments -} - -// IsSuccess returns true when this assign properties to tenant o k response has a 2xx status code -func (o *AssignPropertiesToTenantOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this assign properties to tenant o k response has a 3xx status code -func (o *AssignPropertiesToTenantOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this assign properties to tenant o k response has a 4xx status code -func (o *AssignPropertiesToTenantOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this assign properties to tenant o k response has a 5xx status code -func (o *AssignPropertiesToTenantOK) IsServerError() bool { - return false -} - -// IsCode returns true when this assign properties to tenant o k response a status code equal to that given -func (o *AssignPropertiesToTenantOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the assign properties to tenant o k response -func (o *AssignPropertiesToTenantOK) Code() int { - return 200 -} - -func (o *AssignPropertiesToTenantOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}/assignments][%d] assignPropertiesToTenantOK %s", 200, payload) -} - -func (o *AssignPropertiesToTenantOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}/assignments][%d] assignPropertiesToTenantOK %s", 200, payload) -} - -func (o *AssignPropertiesToTenantOK) GetPayload() *models.TenantAssignments { - return o.Payload -} - -func (o *AssignPropertiesToTenantOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantAssignments) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAssignPropertiesToTenantDefault creates a AssignPropertiesToTenantDefault with default headers values -func NewAssignPropertiesToTenantDefault(code int) *AssignPropertiesToTenantDefault { - return &AssignPropertiesToTenantDefault{ - _statusCode: code, - } -} - -/* -AssignPropertiesToTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type AssignPropertiesToTenantDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this assign properties to tenant default response has a 2xx status code -func (o *AssignPropertiesToTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this assign properties to tenant default response has a 3xx status code -func (o *AssignPropertiesToTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this assign properties to tenant default response has a 4xx status code -func (o *AssignPropertiesToTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this assign properties to tenant default response has a 5xx status code -func (o *AssignPropertiesToTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this assign properties to tenant default response a status code equal to that given -func (o *AssignPropertiesToTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the assign properties to tenant default response -func (o *AssignPropertiesToTenantDefault) Code() int { - return o._statusCode -} - -func (o *AssignPropertiesToTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}/assignments][%d] AssignPropertiesToTenant default %s", o._statusCode, payload) -} - -func (o *AssignPropertiesToTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}/assignments][%d] AssignPropertiesToTenant default %s", o._statusCode, payload) -} - -func (o *AssignPropertiesToTenantDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AssignPropertiesToTenantDefault) 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/tenant/create_tenant_parameters.go b/v2/client/tenant/create_tenant_parameters.go deleted file mode 100644 index 7ac456c9..00000000 --- a/v2/client/tenant/create_tenant_parameters.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewCreateTenantParams creates a new CreateTenantParams 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 NewCreateTenantParams() *CreateTenantParams { - return &CreateTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTenantParamsWithTimeout creates a new CreateTenantParams object -// with the ability to set a timeout on a request. -func NewCreateTenantParamsWithTimeout(timeout time.Duration) *CreateTenantParams { - return &CreateTenantParams{ - timeout: timeout, - } -} - -// NewCreateTenantParamsWithContext creates a new CreateTenantParams object -// with the ability to set a context for a request. -func NewCreateTenantParamsWithContext(ctx context.Context) *CreateTenantParams { - return &CreateTenantParams{ - Context: ctx, - } -} - -// NewCreateTenantParamsWithHTTPClient creates a new CreateTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTenantParamsWithHTTPClient(client *http.Client) *CreateTenantParams { - return &CreateTenantParams{ - HTTPClient: client, - } -} - -/* -CreateTenantParams contains all the parameters to send to the API endpoint - - for the create tenant operation. - - Typically these are written to a http.Request. -*/ -type CreateTenantParams struct { - - // Body. - Body CreateTenantBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTenantParams) WithDefaults() *CreateTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create tenant params -func (o *CreateTenantParams) WithTimeout(timeout time.Duration) *CreateTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create tenant params -func (o *CreateTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create tenant params -func (o *CreateTenantParams) WithContext(ctx context.Context) *CreateTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create tenant params -func (o *CreateTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create tenant params -func (o *CreateTenantParams) WithHTTPClient(client *http.Client) *CreateTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create tenant params -func (o *CreateTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create tenant params -func (o *CreateTenantParams) WithBody(body CreateTenantBody) *CreateTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create tenant params -func (o *CreateTenantParams) SetBody(body CreateTenantBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTenantParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - 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/tenant/create_tenant_responses.go b/v2/client/tenant/create_tenant_responses.go deleted file mode 100644 index cb1a5bd1..00000000 --- a/v2/client/tenant/create_tenant_responses.go +++ /dev/null @@ -1,368 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" - "fmt" - "io" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateTenantReader is a Reader for the CreateTenant structure. -type CreateTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTenantCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateTenantDefault(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 - } -} - -// NewCreateTenantCreated creates a CreateTenantCreated with default headers values -func NewCreateTenantCreated() *CreateTenantCreated { - return &CreateTenantCreated{} -} - -/* -CreateTenantCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateTenantCreated struct { - Payload *models.TenantInfo -} - -// IsSuccess returns true when this create tenant created response has a 2xx status code -func (o *CreateTenantCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create tenant created response has a 3xx status code -func (o *CreateTenantCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create tenant created response has a 4xx status code -func (o *CreateTenantCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create tenant created response has a 5xx status code -func (o *CreateTenantCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create tenant created response a status code equal to that given -func (o *CreateTenantCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create tenant created response -func (o *CreateTenantCreated) Code() int { - return 201 -} - -func (o *CreateTenantCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants][%d] createTenantCreated %s", 201, payload) -} - -func (o *CreateTenantCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants][%d] createTenantCreated %s", 201, payload) -} - -func (o *CreateTenantCreated) GetPayload() *models.TenantInfo { - return o.Payload -} - -func (o *CreateTenantCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateTenantDefault creates a CreateTenantDefault with default headers values -func NewCreateTenantDefault(code int) *CreateTenantDefault { - return &CreateTenantDefault{ - _statusCode: code, - } -} - -/* -CreateTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateTenantDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create tenant default response has a 2xx status code -func (o *CreateTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create tenant default response has a 3xx status code -func (o *CreateTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create tenant default response has a 4xx status code -func (o *CreateTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create tenant default response has a 5xx status code -func (o *CreateTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create tenant default response a status code equal to that given -func (o *CreateTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create tenant default response -func (o *CreateTenantDefault) Code() int { - return o._statusCode -} - -func (o *CreateTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants][%d] CreateTenant default %s", o._statusCode, payload) -} - -func (o *CreateTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants][%d] CreateTenant default %s", o._statusCode, payload) -} - -func (o *CreateTenantDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateTenantDefault) 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 -} - -/* -CreateTenantBody create tenant body -swagger:model CreateTenantBody -*/ -type CreateTenantBody struct { - models.CreateTenantParams - - // network - Network *models.TenantNetwork `json:"network,omitempty"` - - CreateTenantParamsBodyAllOf2 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (o *CreateTenantBody) UnmarshalJSON(raw []byte) error { - // CreateTenantParamsBodyAO0 - var createTenantParamsBodyAO0 models.CreateTenantParams - if err := swag.ReadJSON(raw, &createTenantParamsBodyAO0); err != nil { - return err - } - o.CreateTenantParams = createTenantParamsBodyAO0 - - // CreateTenantParamsBodyAO1 - var dataCreateTenantParamsBodyAO1 struct { - Network *models.TenantNetwork `json:"network,omitempty"` - } - if err := swag.ReadJSON(raw, &dataCreateTenantParamsBodyAO1); err != nil { - return err - } - - o.Network = dataCreateTenantParamsBodyAO1.Network - - // CreateTenantParamsBodyAO2 - var createTenantParamsBodyAO2 CreateTenantParamsBodyAllOf2 - if err := swag.ReadJSON(raw, &createTenantParamsBodyAO2); err != nil { - return err - } - o.CreateTenantParamsBodyAllOf2 = createTenantParamsBodyAO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (o CreateTenantBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - createTenantParamsBodyAO0, err := swag.WriteJSON(o.CreateTenantParams) - if err != nil { - return nil, err - } - _parts = append(_parts, createTenantParamsBodyAO0) - var dataCreateTenantParamsBodyAO1 struct { - Network *models.TenantNetwork `json:"network,omitempty"` - } - - dataCreateTenantParamsBodyAO1.Network = o.Network - - jsonDataCreateTenantParamsBodyAO1, errCreateTenantParamsBodyAO1 := swag.WriteJSON(dataCreateTenantParamsBodyAO1) - if errCreateTenantParamsBodyAO1 != nil { - return nil, errCreateTenantParamsBodyAO1 - } - _parts = append(_parts, jsonDataCreateTenantParamsBodyAO1) - - createTenantParamsBodyAO2, err := swag.WriteJSON(o.CreateTenantParamsBodyAllOf2) - if err != nil { - return nil, err - } - _parts = append(_parts, createTenantParamsBodyAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create tenant body -func (o *CreateTenantBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with models.CreateTenantParams - if err := o.CreateTenantParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := o.validateNetwork(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CreateTenantParamsBodyAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreateTenantBody) validateNetwork(formats strfmt.Registry) error { - - if swag.IsZero(o.Network) { // not required - return nil - } - - if o.Network != nil { - if err := o.Network.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "network") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create tenant body based on the context it is used -func (o *CreateTenantBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with models.CreateTenantParams - if err := o.CreateTenantParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CreateTenantParamsBodyAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreateTenantBody) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { - - if o.Network != nil { - - if swag.IsZero(o.Network) { // not required - return nil - } - - if err := o.Network.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "network") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreateTenantBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreateTenantBody) UnmarshalBinary(b []byte) error { - var res CreateTenantBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreateTenantParamsBodyAllOf2 create tenant params body all of2 -swagger:model CreateTenantParamsBodyAllOf2 -*/ -type CreateTenantParamsBodyAllOf2 interface{} diff --git a/v2/client/tenant/delete_tenant_parameters.go b/v2/client/tenant/delete_tenant_parameters.go deleted file mode 100644 index e841d76b..00000000 --- a/v2/client/tenant/delete_tenant_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewDeleteTenantParams creates a new DeleteTenantParams 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 NewDeleteTenantParams() *DeleteTenantParams { - return &DeleteTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteTenantParamsWithTimeout creates a new DeleteTenantParams object -// with the ability to set a timeout on a request. -func NewDeleteTenantParamsWithTimeout(timeout time.Duration) *DeleteTenantParams { - return &DeleteTenantParams{ - timeout: timeout, - } -} - -// NewDeleteTenantParamsWithContext creates a new DeleteTenantParams object -// with the ability to set a context for a request. -func NewDeleteTenantParamsWithContext(ctx context.Context) *DeleteTenantParams { - return &DeleteTenantParams{ - Context: ctx, - } -} - -// NewDeleteTenantParamsWithHTTPClient creates a new DeleteTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteTenantParamsWithHTTPClient(client *http.Client) *DeleteTenantParams { - return &DeleteTenantParams{ - HTTPClient: client, - } -} - -/* -DeleteTenantParams contains all the parameters to send to the API endpoint - - for the delete tenant operation. - - Typically these are written to a http.Request. -*/ -type DeleteTenantParams struct { - - /* ID. - - The Tenant id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTenantParams) WithDefaults() *DeleteTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete tenant params -func (o *DeleteTenantParams) WithTimeout(timeout time.Duration) *DeleteTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete tenant params -func (o *DeleteTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete tenant params -func (o *DeleteTenantParams) WithContext(ctx context.Context) *DeleteTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete tenant params -func (o *DeleteTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete tenant params -func (o *DeleteTenantParams) WithHTTPClient(client *http.Client) *DeleteTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete tenant params -func (o *DeleteTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete tenant params -func (o *DeleteTenantParams) WithID(id string) *DeleteTenantParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete tenant params -func (o *DeleteTenantParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteTenantParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/delete_tenant_responses.go b/v2/client/tenant/delete_tenant_responses.go deleted file mode 100644 index 5a2f0c98..00000000 --- a/v2/client/tenant/delete_tenant_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteTenantReader is a Reader for the DeleteTenant structure. -type DeleteTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteTenantNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteTenantDefault(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 - } -} - -// NewDeleteTenantNoContent creates a DeleteTenantNoContent with default headers values -func NewDeleteTenantNoContent() *DeleteTenantNoContent { - return &DeleteTenantNoContent{} -} - -/* -DeleteTenantNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteTenantNoContent struct { -} - -// IsSuccess returns true when this delete tenant no content response has a 2xx status code -func (o *DeleteTenantNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete tenant no content response has a 3xx status code -func (o *DeleteTenantNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete tenant no content response has a 4xx status code -func (o *DeleteTenantNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete tenant no content response has a 5xx status code -func (o *DeleteTenantNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete tenant no content response a status code equal to that given -func (o *DeleteTenantNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete tenant no content response -func (o *DeleteTenantNoContent) Code() int { - return 204 -} - -func (o *DeleteTenantNoContent) Error() string { - return fmt.Sprintf("[DELETE /tenants/{id}][%d] deleteTenantNoContent", 204) -} - -func (o *DeleteTenantNoContent) String() string { - return fmt.Sprintf("[DELETE /tenants/{id}][%d] deleteTenantNoContent", 204) -} - -func (o *DeleteTenantNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteTenantDefault creates a DeleteTenantDefault with default headers values -func NewDeleteTenantDefault(code int) *DeleteTenantDefault { - return &DeleteTenantDefault{ - _statusCode: code, - } -} - -/* -DeleteTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteTenantDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete tenant default response has a 2xx status code -func (o *DeleteTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete tenant default response has a 3xx status code -func (o *DeleteTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete tenant default response has a 4xx status code -func (o *DeleteTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete tenant default response has a 5xx status code -func (o *DeleteTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete tenant default response a status code equal to that given -func (o *DeleteTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete tenant default response -func (o *DeleteTenantDefault) Code() int { - return o._statusCode -} - -func (o *DeleteTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /tenants/{id}][%d] DeleteTenant default %s", o._statusCode, payload) -} - -func (o *DeleteTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /tenants/{id}][%d] DeleteTenant default %s", o._statusCode, payload) -} - -func (o *DeleteTenantDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteTenantDefault) 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/tenant/get_assigned_properties_for_tenant_parameters.go b/v2/client/tenant/get_assigned_properties_for_tenant_parameters.go deleted file mode 100644 index 440759e8..00000000 --- a/v2/client/tenant/get_assigned_properties_for_tenant_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewGetAssignedPropertiesForTenantParams creates a new GetAssignedPropertiesForTenantParams 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 NewGetAssignedPropertiesForTenantParams() *GetAssignedPropertiesForTenantParams { - return &GetAssignedPropertiesForTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAssignedPropertiesForTenantParamsWithTimeout creates a new GetAssignedPropertiesForTenantParams object -// with the ability to set a timeout on a request. -func NewGetAssignedPropertiesForTenantParamsWithTimeout(timeout time.Duration) *GetAssignedPropertiesForTenantParams { - return &GetAssignedPropertiesForTenantParams{ - timeout: timeout, - } -} - -// NewGetAssignedPropertiesForTenantParamsWithContext creates a new GetAssignedPropertiesForTenantParams object -// with the ability to set a context for a request. -func NewGetAssignedPropertiesForTenantParamsWithContext(ctx context.Context) *GetAssignedPropertiesForTenantParams { - return &GetAssignedPropertiesForTenantParams{ - Context: ctx, - } -} - -// NewGetAssignedPropertiesForTenantParamsWithHTTPClient creates a new GetAssignedPropertiesForTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAssignedPropertiesForTenantParamsWithHTTPClient(client *http.Client) *GetAssignedPropertiesForTenantParams { - return &GetAssignedPropertiesForTenantParams{ - HTTPClient: client, - } -} - -/* -GetAssignedPropertiesForTenantParams contains all the parameters to send to the API endpoint - - for the get assigned properties for tenant operation. - - Typically these are written to a http.Request. -*/ -type GetAssignedPropertiesForTenantParams struct { - - /* ID. - - The Tenant id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get assigned properties for tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAssignedPropertiesForTenantParams) WithDefaults() *GetAssignedPropertiesForTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get assigned properties for tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAssignedPropertiesForTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) WithTimeout(timeout time.Duration) *GetAssignedPropertiesForTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) WithContext(ctx context.Context) *GetAssignedPropertiesForTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) WithHTTPClient(client *http.Client) *GetAssignedPropertiesForTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) WithID(id string) *GetAssignedPropertiesForTenantParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get assigned properties for tenant params -func (o *GetAssignedPropertiesForTenantParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAssignedPropertiesForTenantParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/get_assigned_properties_for_tenant_responses.go b/v2/client/tenant/get_assigned_properties_for_tenant_responses.go deleted file mode 100644 index 037b7520..00000000 --- a/v2/client/tenant/get_assigned_properties_for_tenant_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAssignedPropertiesForTenantReader is a Reader for the GetAssignedPropertiesForTenant structure. -type GetAssignedPropertiesForTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAssignedPropertiesForTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAssignedPropertiesForTenantOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAssignedPropertiesForTenantDefault(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 - } -} - -// NewGetAssignedPropertiesForTenantOK creates a GetAssignedPropertiesForTenantOK with default headers values -func NewGetAssignedPropertiesForTenantOK() *GetAssignedPropertiesForTenantOK { - return &GetAssignedPropertiesForTenantOK{} -} - -/* -GetAssignedPropertiesForTenantOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAssignedPropertiesForTenantOK struct { - Payload *models.TenantAssignmentProperties -} - -// IsSuccess returns true when this get assigned properties for tenant o k response has a 2xx status code -func (o *GetAssignedPropertiesForTenantOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get assigned properties for tenant o k response has a 3xx status code -func (o *GetAssignedPropertiesForTenantOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get assigned properties for tenant o k response has a 4xx status code -func (o *GetAssignedPropertiesForTenantOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get assigned properties for tenant o k response has a 5xx status code -func (o *GetAssignedPropertiesForTenantOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get assigned properties for tenant o k response a status code equal to that given -func (o *GetAssignedPropertiesForTenantOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get assigned properties for tenant o k response -func (o *GetAssignedPropertiesForTenantOK) Code() int { - return 200 -} - -func (o *GetAssignedPropertiesForTenantOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}/assignments][%d] getAssignedPropertiesForTenantOK %s", 200, payload) -} - -func (o *GetAssignedPropertiesForTenantOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}/assignments][%d] getAssignedPropertiesForTenantOK %s", 200, payload) -} - -func (o *GetAssignedPropertiesForTenantOK) GetPayload() *models.TenantAssignmentProperties { - return o.Payload -} - -func (o *GetAssignedPropertiesForTenantOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantAssignmentProperties) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAssignedPropertiesForTenantDefault creates a GetAssignedPropertiesForTenantDefault with default headers values -func NewGetAssignedPropertiesForTenantDefault(code int) *GetAssignedPropertiesForTenantDefault { - return &GetAssignedPropertiesForTenantDefault{ - _statusCode: code, - } -} - -/* -GetAssignedPropertiesForTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAssignedPropertiesForTenantDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get assigned properties for tenant default response has a 2xx status code -func (o *GetAssignedPropertiesForTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get assigned properties for tenant default response has a 3xx status code -func (o *GetAssignedPropertiesForTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get assigned properties for tenant default response has a 4xx status code -func (o *GetAssignedPropertiesForTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get assigned properties for tenant default response has a 5xx status code -func (o *GetAssignedPropertiesForTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get assigned properties for tenant default response a status code equal to that given -func (o *GetAssignedPropertiesForTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get assigned properties for tenant default response -func (o *GetAssignedPropertiesForTenantDefault) Code() int { - return o._statusCode -} - -func (o *GetAssignedPropertiesForTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}/assignments][%d] GetAssignedPropertiesForTenant default %s", o._statusCode, payload) -} - -func (o *GetAssignedPropertiesForTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}/assignments][%d] GetAssignedPropertiesForTenant default %s", o._statusCode, payload) -} - -func (o *GetAssignedPropertiesForTenantDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAssignedPropertiesForTenantDefault) 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/tenant/get_on_prem_tenant_config_parameters.go b/v2/client/tenant/get_on_prem_tenant_config_parameters.go deleted file mode 100644 index 47e9c21d..00000000 --- a/v2/client/tenant/get_on_prem_tenant_config_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewGetOnPremTenantConfigParams creates a new GetOnPremTenantConfigParams 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 NewGetOnPremTenantConfigParams() *GetOnPremTenantConfigParams { - return &GetOnPremTenantConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetOnPremTenantConfigParamsWithTimeout creates a new GetOnPremTenantConfigParams object -// with the ability to set a timeout on a request. -func NewGetOnPremTenantConfigParamsWithTimeout(timeout time.Duration) *GetOnPremTenantConfigParams { - return &GetOnPremTenantConfigParams{ - timeout: timeout, - } -} - -// NewGetOnPremTenantConfigParamsWithContext creates a new GetOnPremTenantConfigParams object -// with the ability to set a context for a request. -func NewGetOnPremTenantConfigParamsWithContext(ctx context.Context) *GetOnPremTenantConfigParams { - return &GetOnPremTenantConfigParams{ - Context: ctx, - } -} - -// NewGetOnPremTenantConfigParamsWithHTTPClient creates a new GetOnPremTenantConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetOnPremTenantConfigParamsWithHTTPClient(client *http.Client) *GetOnPremTenantConfigParams { - return &GetOnPremTenantConfigParams{ - HTTPClient: client, - } -} - -/* -GetOnPremTenantConfigParams contains all the parameters to send to the API endpoint - - for the get on prem tenant config operation. - - Typically these are written to a http.Request. -*/ -type GetOnPremTenantConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get on prem tenant config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOnPremTenantConfigParams) WithDefaults() *GetOnPremTenantConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get on prem tenant config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetOnPremTenantConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) WithTimeout(timeout time.Duration) *GetOnPremTenantConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) WithContext(ctx context.Context) *GetOnPremTenantConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) WithHTTPClient(client *http.Client) *GetOnPremTenantConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get on prem tenant config params -func (o *GetOnPremTenantConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetOnPremTenantConfigParams) 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/tenant/get_on_prem_tenant_config_responses.go b/v2/client/tenant/get_on_prem_tenant_config_responses.go deleted file mode 100644 index cf2a9064..00000000 --- a/v2/client/tenant/get_on_prem_tenant_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetOnPremTenantConfigReader is a Reader for the GetOnPremTenantConfig structure. -type GetOnPremTenantConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetOnPremTenantConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetOnPremTenantConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetOnPremTenantConfigDefault(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 - } -} - -// NewGetOnPremTenantConfigOK creates a GetOnPremTenantConfigOK with default headers values -func NewGetOnPremTenantConfigOK() *GetOnPremTenantConfigOK { - return &GetOnPremTenantConfigOK{} -} - -/* -GetOnPremTenantConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetOnPremTenantConfigOK struct { - Payload *models.OnPremTenantConfig -} - -// IsSuccess returns true when this get on prem tenant config o k response has a 2xx status code -func (o *GetOnPremTenantConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get on prem tenant config o k response has a 3xx status code -func (o *GetOnPremTenantConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get on prem tenant config o k response has a 4xx status code -func (o *GetOnPremTenantConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get on prem tenant config o k response has a 5xx status code -func (o *GetOnPremTenantConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get on prem tenant config o k response a status code equal to that given -func (o *GetOnPremTenantConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get on prem tenant config o k response -func (o *GetOnPremTenantConfigOK) Code() int { - return 200 -} - -func (o *GetOnPremTenantConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/tenant-config][%d] getOnPremTenantConfigOK %s", 200, payload) -} - -func (o *GetOnPremTenantConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/tenant-config][%d] getOnPremTenantConfigOK %s", 200, payload) -} - -func (o *GetOnPremTenantConfigOK) GetPayload() *models.OnPremTenantConfig { - return o.Payload -} - -func (o *GetOnPremTenantConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.OnPremTenantConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetOnPremTenantConfigDefault creates a GetOnPremTenantConfigDefault with default headers values -func NewGetOnPremTenantConfigDefault(code int) *GetOnPremTenantConfigDefault { - return &GetOnPremTenantConfigDefault{ - _statusCode: code, - } -} - -/* -GetOnPremTenantConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetOnPremTenantConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get on prem tenant config default response has a 2xx status code -func (o *GetOnPremTenantConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get on prem tenant config default response has a 3xx status code -func (o *GetOnPremTenantConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get on prem tenant config default response has a 4xx status code -func (o *GetOnPremTenantConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get on prem tenant config default response has a 5xx status code -func (o *GetOnPremTenantConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get on prem tenant config default response a status code equal to that given -func (o *GetOnPremTenantConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get on prem tenant config default response -func (o *GetOnPremTenantConfigDefault) Code() int { - return o._statusCode -} - -func (o *GetOnPremTenantConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/tenant-config][%d] GetOnPremTenantConfig default %s", o._statusCode, payload) -} - -func (o *GetOnPremTenantConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /clusters/tenant-config][%d] GetOnPremTenantConfig default %s", o._statusCode, payload) -} - -func (o *GetOnPremTenantConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetOnPremTenantConfigDefault) 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/tenant/get_tenant_by_id_parameters.go b/v2/client/tenant/get_tenant_by_id_parameters.go deleted file mode 100644 index 851a026a..00000000 --- a/v2/client/tenant/get_tenant_by_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewGetTenantByIDParams creates a new GetTenantByIDParams 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 NewGetTenantByIDParams() *GetTenantByIDParams { - return &GetTenantByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantByIDParamsWithTimeout creates a new GetTenantByIDParams object -// with the ability to set a timeout on a request. -func NewGetTenantByIDParamsWithTimeout(timeout time.Duration) *GetTenantByIDParams { - return &GetTenantByIDParams{ - timeout: timeout, - } -} - -// NewGetTenantByIDParamsWithContext creates a new GetTenantByIDParams object -// with the ability to set a context for a request. -func NewGetTenantByIDParamsWithContext(ctx context.Context) *GetTenantByIDParams { - return &GetTenantByIDParams{ - Context: ctx, - } -} - -// NewGetTenantByIDParamsWithHTTPClient creates a new GetTenantByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantByIDParamsWithHTTPClient(client *http.Client) *GetTenantByIDParams { - return &GetTenantByIDParams{ - HTTPClient: client, - } -} - -/* -GetTenantByIDParams contains all the parameters to send to the API endpoint - - for the get tenant by ID operation. - - Typically these are written to a http.Request. -*/ -type GetTenantByIDParams struct { - - /* ID. - - The Tenant id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenant by ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantByIDParams) WithDefaults() *GetTenantByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenant by ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenant by ID params -func (o *GetTenantByIDParams) WithTimeout(timeout time.Duration) *GetTenantByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenant by ID params -func (o *GetTenantByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenant by ID params -func (o *GetTenantByIDParams) WithContext(ctx context.Context) *GetTenantByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenant by ID params -func (o *GetTenantByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenant by ID params -func (o *GetTenantByIDParams) WithHTTPClient(client *http.Client) *GetTenantByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenant by ID params -func (o *GetTenantByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get tenant by ID params -func (o *GetTenantByIDParams) WithID(id string) *GetTenantByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get tenant by ID params -func (o *GetTenantByIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/get_tenant_by_id_responses.go b/v2/client/tenant/get_tenant_by_id_responses.go deleted file mode 100644 index f4686b0a..00000000 --- a/v2/client/tenant/get_tenant_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTenantByIDReader is a Reader for the GetTenantByID structure. -type GetTenantByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantByIDDefault(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 - } -} - -// NewGetTenantByIDOK creates a GetTenantByIDOK with default headers values -func NewGetTenantByIDOK() *GetTenantByIDOK { - return &GetTenantByIDOK{} -} - -/* -GetTenantByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTenantByIDOK struct { - Payload *models.TenantInfo -} - -// IsSuccess returns true when this get tenant by Id o k response has a 2xx status code -func (o *GetTenantByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenant by Id o k response has a 3xx status code -func (o *GetTenantByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenant by Id o k response has a 4xx status code -func (o *GetTenantByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenant by Id o k response has a 5xx status code -func (o *GetTenantByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenant by Id o k response a status code equal to that given -func (o *GetTenantByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenant by Id o k response -func (o *GetTenantByIDOK) Code() int { - return 200 -} - -func (o *GetTenantByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}][%d] getTenantByIdOK %s", 200, payload) -} - -func (o *GetTenantByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}][%d] getTenantByIdOK %s", 200, payload) -} - -func (o *GetTenantByIDOK) GetPayload() *models.TenantInfo { - return o.Payload -} - -func (o *GetTenantByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantByIDDefault creates a GetTenantByIDDefault with default headers values -func NewGetTenantByIDDefault(code int) *GetTenantByIDDefault { - return &GetTenantByIDDefault{ - _statusCode: code, - } -} - -/* -GetTenantByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get tenant by ID default response has a 2xx status code -func (o *GetTenantByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenant by ID default response has a 3xx status code -func (o *GetTenantByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenant by ID default response has a 4xx status code -func (o *GetTenantByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenant by ID default response has a 5xx status code -func (o *GetTenantByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenant by ID default response a status code equal to that given -func (o *GetTenantByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenant by ID default response -func (o *GetTenantByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}][%d] GetTenantByID default %s", o._statusCode, payload) -} - -func (o *GetTenantByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/{id}][%d] GetTenantByID default %s", o._statusCode, payload) -} - -func (o *GetTenantByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTenantByIDDefault) 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/tenant/get_tenant_swift_parameters.go b/v2/client/tenant/get_tenant_swift_parameters.go deleted file mode 100644 index c275fda3..00000000 --- a/v2/client/tenant/get_tenant_swift_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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" -) - -// NewGetTenantSwiftParams creates a new GetTenantSwiftParams 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 NewGetTenantSwiftParams() *GetTenantSwiftParams { - return &GetTenantSwiftParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetTenantSwiftParamsWithTimeout creates a new GetTenantSwiftParams object -// with the ability to set a timeout on a request. -func NewGetTenantSwiftParamsWithTimeout(timeout time.Duration) *GetTenantSwiftParams { - return &GetTenantSwiftParams{ - timeout: timeout, - } -} - -// NewGetTenantSwiftParamsWithContext creates a new GetTenantSwiftParams object -// with the ability to set a context for a request. -func NewGetTenantSwiftParamsWithContext(ctx context.Context) *GetTenantSwiftParams { - return &GetTenantSwiftParams{ - Context: ctx, - } -} - -// NewGetTenantSwiftParamsWithHTTPClient creates a new GetTenantSwiftParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetTenantSwiftParamsWithHTTPClient(client *http.Client) *GetTenantSwiftParams { - return &GetTenantSwiftParams{ - HTTPClient: client, - } -} - -/* -GetTenantSwiftParams contains all the parameters to send to the API endpoint - - for the get tenant swift operation. - - Typically these are written to a http.Request. -*/ -type GetTenantSwiftParams struct { - - /* TenantID. - - Specifies the tenant Id. - */ - TenantID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get tenant swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantSwiftParams) WithDefaults() *GetTenantSwiftParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get tenant swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetTenantSwiftParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get tenant swift params -func (o *GetTenantSwiftParams) WithTimeout(timeout time.Duration) *GetTenantSwiftParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get tenant swift params -func (o *GetTenantSwiftParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get tenant swift params -func (o *GetTenantSwiftParams) WithContext(ctx context.Context) *GetTenantSwiftParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get tenant swift params -func (o *GetTenantSwiftParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get tenant swift params -func (o *GetTenantSwiftParams) WithHTTPClient(client *http.Client) *GetTenantSwiftParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get tenant swift params -func (o *GetTenantSwiftParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTenantID adds the tenantID to the get tenant swift params -func (o *GetTenantSwiftParams) WithTenantID(tenantID *string) *GetTenantSwiftParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get tenant swift params -func (o *GetTenantSwiftParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTenantSwiftParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/get_tenant_swift_responses.go b/v2/client/tenant/get_tenant_swift_responses.go deleted file mode 100644 index 18ea9a5e..00000000 --- a/v2/client/tenant/get_tenant_swift_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetTenantSwiftReader is a Reader for the GetTenantSwift structure. -type GetTenantSwiftReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTenantSwiftReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetTenantSwiftOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetTenantSwiftDefault(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 - } -} - -// NewGetTenantSwiftOK creates a GetTenantSwiftOK with default headers values -func NewGetTenantSwiftOK() *GetTenantSwiftOK { - return &GetTenantSwiftOK{} -} - -/* -GetTenantSwiftOK describes a response with status code 200, with default header values. - -Success -*/ -type GetTenantSwiftOK struct { - Payload *models.SwiftParams -} - -// IsSuccess returns true when this get tenant swift o k response has a 2xx status code -func (o *GetTenantSwiftOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get tenant swift o k response has a 3xx status code -func (o *GetTenantSwiftOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get tenant swift o k response has a 4xx status code -func (o *GetTenantSwiftOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get tenant swift o k response has a 5xx status code -func (o *GetTenantSwiftOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get tenant swift o k response a status code equal to that given -func (o *GetTenantSwiftOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get tenant swift o k response -func (o *GetTenantSwiftOK) Code() int { - return 200 -} - -func (o *GetTenantSwiftOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/swift][%d] getTenantSwiftOK %s", 200, payload) -} - -func (o *GetTenantSwiftOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/swift][%d] getTenantSwiftOK %s", 200, payload) -} - -func (o *GetTenantSwiftOK) GetPayload() *models.SwiftParams { - return o.Payload -} - -func (o *GetTenantSwiftOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SwiftParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTenantSwiftDefault creates a GetTenantSwiftDefault with default headers values -func NewGetTenantSwiftDefault(code int) *GetTenantSwiftDefault { - return &GetTenantSwiftDefault{ - _statusCode: code, - } -} - -/* -GetTenantSwiftDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetTenantSwiftDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get tenant swift default response has a 2xx status code -func (o *GetTenantSwiftDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get tenant swift default response has a 3xx status code -func (o *GetTenantSwiftDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get tenant swift default response has a 4xx status code -func (o *GetTenantSwiftDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get tenant swift default response has a 5xx status code -func (o *GetTenantSwiftDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get tenant swift default response a status code equal to that given -func (o *GetTenantSwiftDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get tenant swift default response -func (o *GetTenantSwiftDefault) Code() int { - return o._statusCode -} - -func (o *GetTenantSwiftDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/swift][%d] GetTenantSwift default %s", o._statusCode, payload) -} - -func (o *GetTenantSwiftDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants/swift][%d] GetTenantSwift default %s", o._statusCode, payload) -} - -func (o *GetTenantSwiftDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetTenantSwiftDefault) 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/tenant/list_tenants_parameters.go b/v2/client/tenant/list_tenants_parameters.go deleted file mode 100644 index c8de6466..00000000 --- a/v2/client/tenant/list_tenants_parameters.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/go-openapi/swag" -) - -// NewListTenantsParams creates a new ListTenantsParams 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 NewListTenantsParams() *ListTenantsParams { - return &ListTenantsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListTenantsParamsWithTimeout creates a new ListTenantsParams object -// with the ability to set a timeout on a request. -func NewListTenantsParamsWithTimeout(timeout time.Duration) *ListTenantsParams { - return &ListTenantsParams{ - timeout: timeout, - } -} - -// NewListTenantsParamsWithContext creates a new ListTenantsParams object -// with the ability to set a context for a request. -func NewListTenantsParamsWithContext(ctx context.Context) *ListTenantsParams { - return &ListTenantsParams{ - Context: ctx, - } -} - -// NewListTenantsParamsWithHTTPClient creates a new ListTenantsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListTenantsParamsWithHTTPClient(client *http.Client) *ListTenantsParams { - return &ListTenantsParams{ - HTTPClient: client, - } -} - -/* -ListTenantsParams contains all the parameters to send to the API endpoint - - for the list tenants operation. - - Typically these are written to a http.Request. -*/ -type ListTenantsParams struct { - - /* Ids. - - List of tenantIds to filter. - */ - Ids []string - - /* Statuses. - - Filter by current status of tenant. - If left blank, only active and inactive tenants are returned. - */ - Statuses []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list tenants params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTenantsParams) WithDefaults() *ListTenantsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list tenants params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTenantsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list tenants params -func (o *ListTenantsParams) WithTimeout(timeout time.Duration) *ListTenantsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list tenants params -func (o *ListTenantsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list tenants params -func (o *ListTenantsParams) WithContext(ctx context.Context) *ListTenantsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list tenants params -func (o *ListTenantsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list tenants params -func (o *ListTenantsParams) WithHTTPClient(client *http.Client) *ListTenantsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list tenants params -func (o *ListTenantsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the list tenants params -func (o *ListTenantsParams) WithIds(ids []string) *ListTenantsParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the list tenants params -func (o *ListTenantsParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithStatuses adds the statuses to the list tenants params -func (o *ListTenantsParams) WithStatuses(statuses []string) *ListTenantsParams { - o.SetStatuses(statuses) - return o -} - -// SetStatuses adds the statuses to the list tenants params -func (o *ListTenantsParams) SetStatuses(statuses []string) { - o.Statuses = statuses -} - -// WriteToRequest writes these params to a swagger request -func (o *ListTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.Statuses != nil { - - // binding items for statuses - joinedStatuses := o.bindParamStatuses(reg) - - // query array param statuses - if err := r.SetQueryParam("statuses", joinedStatuses...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamListTenants binds the parameter ids -func (o *ListTenantsParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamListTenants binds the parameter statuses -func (o *ListTenantsParams) bindParamStatuses(formats strfmt.Registry) []string { - statusesIR := o.Statuses - - var statusesIC []string - for _, statusesIIR := range statusesIR { // explode []string - - statusesIIV := statusesIIR // string as string - statusesIC = append(statusesIC, statusesIIV) - } - - // items.CollectionFormat: "" - statusesIS := swag.JoinByFormat(statusesIC, "") - - return statusesIS -} diff --git a/v2/client/tenant/list_tenants_responses.go b/v2/client/tenant/list_tenants_responses.go deleted file mode 100644 index d647ec11..00000000 --- a/v2/client/tenant/list_tenants_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListTenantsReader is a Reader for the ListTenants structure. -type ListTenantsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListTenantsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListTenantsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListTenantsDefault(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 - } -} - -// NewListTenantsOK creates a ListTenantsOK with default headers values -func NewListTenantsOK() *ListTenantsOK { - return &ListTenantsOK{} -} - -/* -ListTenantsOK describes a response with status code 200, with default header values. - -Success -*/ -type ListTenantsOK struct { - Payload models.TenantsInfo -} - -// IsSuccess returns true when this list tenants o k response has a 2xx status code -func (o *ListTenantsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list tenants o k response has a 3xx status code -func (o *ListTenantsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list tenants o k response has a 4xx status code -func (o *ListTenantsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list tenants o k response has a 5xx status code -func (o *ListTenantsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list tenants o k response a status code equal to that given -func (o *ListTenantsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list tenants o k response -func (o *ListTenantsOK) Code() int { - return 200 -} - -func (o *ListTenantsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants][%d] listTenantsOK %s", 200, payload) -} - -func (o *ListTenantsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants][%d] listTenantsOK %s", 200, payload) -} - -func (o *ListTenantsOK) GetPayload() models.TenantsInfo { - return o.Payload -} - -func (o *ListTenantsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListTenantsDefault creates a ListTenantsDefault with default headers values -func NewListTenantsDefault(code int) *ListTenantsDefault { - return &ListTenantsDefault{ - _statusCode: code, - } -} - -/* -ListTenantsDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListTenantsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list tenants default response has a 2xx status code -func (o *ListTenantsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list tenants default response has a 3xx status code -func (o *ListTenantsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list tenants default response has a 4xx status code -func (o *ListTenantsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list tenants default response has a 5xx status code -func (o *ListTenantsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list tenants default response a status code equal to that given -func (o *ListTenantsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list tenants default response -func (o *ListTenantsDefault) Code() int { - return o._statusCode -} - -func (o *ListTenantsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants][%d] ListTenants default %s", o._statusCode, payload) -} - -func (o *ListTenantsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /tenants][%d] ListTenants default %s", o._statusCode, payload) -} - -func (o *ListTenantsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListTenantsDefault) 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/tenant/perform_tenant_action_parameters.go b/v2/client/tenant/perform_tenant_action_parameters.go deleted file mode 100644 index 151314b0..00000000 --- a/v2/client/tenant/perform_tenant_action_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewPerformTenantActionParams creates a new PerformTenantActionParams 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 NewPerformTenantActionParams() *PerformTenantActionParams { - return &PerformTenantActionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPerformTenantActionParamsWithTimeout creates a new PerformTenantActionParams object -// with the ability to set a timeout on a request. -func NewPerformTenantActionParamsWithTimeout(timeout time.Duration) *PerformTenantActionParams { - return &PerformTenantActionParams{ - timeout: timeout, - } -} - -// NewPerformTenantActionParamsWithContext creates a new PerformTenantActionParams object -// with the ability to set a context for a request. -func NewPerformTenantActionParamsWithContext(ctx context.Context) *PerformTenantActionParams { - return &PerformTenantActionParams{ - Context: ctx, - } -} - -// NewPerformTenantActionParamsWithHTTPClient creates a new PerformTenantActionParams object -// with the ability to set a custom HTTPClient for a request. -func NewPerformTenantActionParamsWithHTTPClient(client *http.Client) *PerformTenantActionParams { - return &PerformTenantActionParams{ - HTTPClient: client, - } -} - -/* -PerformTenantActionParams contains all the parameters to send to the API endpoint - - for the perform tenant action operation. - - Typically these are written to a http.Request. -*/ -type PerformTenantActionParams struct { - - /* Body. - - Specifies the parameters to perform an action on a Tenant. - */ - Body *models.TenantActionBody - - /* ID. - - The Tenant id. - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the perform tenant action params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformTenantActionParams) WithDefaults() *PerformTenantActionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the perform tenant action params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PerformTenantActionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the perform tenant action params -func (o *PerformTenantActionParams) WithTimeout(timeout time.Duration) *PerformTenantActionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the perform tenant action params -func (o *PerformTenantActionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the perform tenant action params -func (o *PerformTenantActionParams) WithContext(ctx context.Context) *PerformTenantActionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the perform tenant action params -func (o *PerformTenantActionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the perform tenant action params -func (o *PerformTenantActionParams) WithHTTPClient(client *http.Client) *PerformTenantActionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the perform tenant action params -func (o *PerformTenantActionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the perform tenant action params -func (o *PerformTenantActionParams) WithBody(body *models.TenantActionBody) *PerformTenantActionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the perform tenant action params -func (o *PerformTenantActionParams) SetBody(body *models.TenantActionBody) { - o.Body = body -} - -// WithID adds the id to the perform tenant action params -func (o *PerformTenantActionParams) WithID(id string) *PerformTenantActionParams { - o.SetID(id) - return o -} - -// SetID adds the id to the perform tenant action params -func (o *PerformTenantActionParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PerformTenantActionParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/perform_tenant_action_responses.go b/v2/client/tenant/perform_tenant_action_responses.go deleted file mode 100644 index 8b4ac561..00000000 --- a/v2/client/tenant/perform_tenant_action_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// PerformTenantActionReader is a Reader for the PerformTenantAction structure. -type PerformTenantActionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PerformTenantActionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPerformTenantActionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPerformTenantActionDefault(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 - } -} - -// NewPerformTenantActionOK creates a PerformTenantActionOK with default headers values -func NewPerformTenantActionOK() *PerformTenantActionOK { - return &PerformTenantActionOK{} -} - -/* -PerformTenantActionOK describes a response with status code 200, with default header values. - -Success -*/ -type PerformTenantActionOK struct { - Payload *models.TenantInfo -} - -// IsSuccess returns true when this perform tenant action o k response has a 2xx status code -func (o *PerformTenantActionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this perform tenant action o k response has a 3xx status code -func (o *PerformTenantActionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this perform tenant action o k response has a 4xx status code -func (o *PerformTenantActionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this perform tenant action o k response has a 5xx status code -func (o *PerformTenantActionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this perform tenant action o k response a status code equal to that given -func (o *PerformTenantActionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the perform tenant action o k response -func (o *PerformTenantActionOK) Code() int { - return 200 -} - -func (o *PerformTenantActionOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/{id}/actions][%d] performTenantActionOK %s", 200, payload) -} - -func (o *PerformTenantActionOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/{id}/actions][%d] performTenantActionOK %s", 200, payload) -} - -func (o *PerformTenantActionOK) GetPayload() *models.TenantInfo { - return o.Payload -} - -func (o *PerformTenantActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPerformTenantActionDefault creates a PerformTenantActionDefault with default headers values -func NewPerformTenantActionDefault(code int) *PerformTenantActionDefault { - return &PerformTenantActionDefault{ - _statusCode: code, - } -} - -/* -PerformTenantActionDefault describes a response with status code -1, with default header values. - -Error -*/ -type PerformTenantActionDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this perform tenant action default response has a 2xx status code -func (o *PerformTenantActionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this perform tenant action default response has a 3xx status code -func (o *PerformTenantActionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this perform tenant action default response has a 4xx status code -func (o *PerformTenantActionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this perform tenant action default response has a 5xx status code -func (o *PerformTenantActionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this perform tenant action default response a status code equal to that given -func (o *PerformTenantActionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the perform tenant action default response -func (o *PerformTenantActionDefault) Code() int { - return o._statusCode -} - -func (o *PerformTenantActionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/{id}/actions][%d] PerformTenantAction default %s", o._statusCode, payload) -} - -func (o *PerformTenantActionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/{id}/actions][%d] PerformTenantAction default %s", o._statusCode, payload) -} - -func (o *PerformTenantActionDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *PerformTenantActionDefault) 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/tenant/register_swift_parameters.go b/v2/client/tenant/register_swift_parameters.go deleted file mode 100644 index 4e6aeb19..00000000 --- a/v2/client/tenant/register_swift_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewRegisterSwiftParams creates a new RegisterSwiftParams 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 NewRegisterSwiftParams() *RegisterSwiftParams { - return &RegisterSwiftParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterSwiftParamsWithTimeout creates a new RegisterSwiftParams object -// with the ability to set a timeout on a request. -func NewRegisterSwiftParamsWithTimeout(timeout time.Duration) *RegisterSwiftParams { - return &RegisterSwiftParams{ - timeout: timeout, - } -} - -// NewRegisterSwiftParamsWithContext creates a new RegisterSwiftParams object -// with the ability to set a context for a request. -func NewRegisterSwiftParamsWithContext(ctx context.Context) *RegisterSwiftParams { - return &RegisterSwiftParams{ - Context: ctx, - } -} - -// NewRegisterSwiftParamsWithHTTPClient creates a new RegisterSwiftParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterSwiftParamsWithHTTPClient(client *http.Client) *RegisterSwiftParams { - return &RegisterSwiftParams{ - HTTPClient: client, - } -} - -/* -RegisterSwiftParams contains all the parameters to send to the API endpoint - - for the register swift operation. - - Typically these are written to a http.Request. -*/ -type RegisterSwiftParams struct { - - /* Body. - - Specifies the parameters to register a Swift service on Keystone server. - */ - Body *models.RegisterSwiftParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterSwiftParams) WithDefaults() *RegisterSwiftParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterSwiftParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register swift params -func (o *RegisterSwiftParams) WithTimeout(timeout time.Duration) *RegisterSwiftParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register swift params -func (o *RegisterSwiftParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register swift params -func (o *RegisterSwiftParams) WithContext(ctx context.Context) *RegisterSwiftParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register swift params -func (o *RegisterSwiftParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register swift params -func (o *RegisterSwiftParams) WithHTTPClient(client *http.Client) *RegisterSwiftParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register swift params -func (o *RegisterSwiftParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register swift params -func (o *RegisterSwiftParams) WithBody(body *models.RegisterSwiftParams) *RegisterSwiftParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register swift params -func (o *RegisterSwiftParams) SetBody(body *models.RegisterSwiftParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterSwiftParams) 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/tenant/register_swift_responses.go b/v2/client/tenant/register_swift_responses.go deleted file mode 100644 index 00f9766c..00000000 --- a/v2/client/tenant/register_swift_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegisterSwiftReader is a Reader for the RegisterSwift structure. -type RegisterSwiftReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterSwiftReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewRegisterSwiftNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterSwiftDefault(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 - } -} - -// NewRegisterSwiftNoContent creates a RegisterSwiftNoContent with default headers values -func NewRegisterSwiftNoContent() *RegisterSwiftNoContent { - return &RegisterSwiftNoContent{} -} - -/* -RegisterSwiftNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type RegisterSwiftNoContent struct { -} - -// IsSuccess returns true when this register swift no content response has a 2xx status code -func (o *RegisterSwiftNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this register swift no content response has a 3xx status code -func (o *RegisterSwiftNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this register swift no content response has a 4xx status code -func (o *RegisterSwiftNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this register swift no content response has a 5xx status code -func (o *RegisterSwiftNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this register swift no content response a status code equal to that given -func (o *RegisterSwiftNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the register swift no content response -func (o *RegisterSwiftNoContent) Code() int { - return 204 -} - -func (o *RegisterSwiftNoContent) Error() string { - return fmt.Sprintf("[POST /tenants/swift/register][%d] registerSwiftNoContent", 204) -} - -func (o *RegisterSwiftNoContent) String() string { - return fmt.Sprintf("[POST /tenants/swift/register][%d] registerSwiftNoContent", 204) -} - -func (o *RegisterSwiftNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewRegisterSwiftDefault creates a RegisterSwiftDefault with default headers values -func NewRegisterSwiftDefault(code int) *RegisterSwiftDefault { - return &RegisterSwiftDefault{ - _statusCode: code, - } -} - -/* -RegisterSwiftDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegisterSwiftDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this register swift default response has a 2xx status code -func (o *RegisterSwiftDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this register swift default response has a 3xx status code -func (o *RegisterSwiftDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this register swift default response has a 4xx status code -func (o *RegisterSwiftDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this register swift default response has a 5xx status code -func (o *RegisterSwiftDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this register swift default response a status code equal to that given -func (o *RegisterSwiftDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the register swift default response -func (o *RegisterSwiftDefault) Code() int { - return o._statusCode -} - -func (o *RegisterSwiftDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/swift/register][%d] RegisterSwift default %s", o._statusCode, payload) -} - -func (o *RegisterSwiftDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/swift/register][%d] RegisterSwift default %s", o._statusCode, payload) -} - -func (o *RegisterSwiftDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegisterSwiftDefault) 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/tenant/tenant_client.go b/v2/client/tenant/tenant_client.go deleted file mode 100644 index d48a4534..00000000 --- a/v2/client/tenant/tenant_client.go +++ /dev/null @@ -1,653 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new tenant API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new tenant API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new tenant API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for tenant API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AssignPropertiesToTenant(params *AssignPropertiesToTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AssignPropertiesToTenantOK, error) - - CreateTenant(params *CreateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTenantCreated, error) - - DeleteTenant(params *DeleteTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTenantNoContent, error) - - GetAssignedPropertiesForTenant(params *GetAssignedPropertiesForTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssignedPropertiesForTenantOK, error) - - GetOnPremTenantConfig(params *GetOnPremTenantConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOnPremTenantConfigOK, error) - - GetTenantByID(params *GetTenantByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantByIDOK, error) - - GetTenantSwift(params *GetTenantSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantSwiftOK, error) - - ListTenants(params *ListTenantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTenantsOK, error) - - PerformTenantAction(params *PerformTenantActionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformTenantActionOK, error) - - RegisterSwift(params *RegisterSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterSwiftNoContent, error) - - UnregisterSwift(params *UnregisterSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterSwiftNoContent, error) - - UpdateOnPremTenantConfig(params *UpdateOnPremTenantConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateOnPremTenantConfigOK, error) - - UpdateTenant(params *UpdateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantOK, error) - - UpdateTenantSwift(params *UpdateTenantSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantSwiftOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - AssignPropertiesToTenant updates assginment of properties for a tenant - - Assign/Unassign properties like storage domain, entities, policies etc. - -to the tenant. -The API expects a list of all the assignments (policies etc.) that are -supposed to be associated to the Tenant. The list of assignments passed -get assigned to the Tenant and anything else that was already assigned -gets unassigned. -In case a few objects fail the assignment and some objects get assigned, -error is returned for all assignments except for policies. -*/ -func (a *Client) AssignPropertiesToTenant(params *AssignPropertiesToTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AssignPropertiesToTenantOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAssignPropertiesToTenantParams() - } - op := &runtime.ClientOperation{ - ID: "AssignPropertiesToTenant", - Method: "PUT", - PathPattern: "/tenants/{id}/assignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AssignPropertiesToTenantReader{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.(*AssignPropertiesToTenantOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AssignPropertiesToTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateTenant creates a new tenant -*/ -func (a *Client) CreateTenant(params *CreateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTenantCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTenantParams() - } - op := &runtime.ClientOperation{ - ID: "CreateTenant", - Method: "POST", - PathPattern: "/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateTenantReader{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.(*CreateTenantCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteTenant deletes tenant with given ID -*/ -func (a *Client) DeleteTenant(params *DeleteTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTenantNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteTenantParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteTenant", - Method: "DELETE", - PathPattern: "/tenants/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteTenantReader{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.(*DeleteTenantNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetAssignedPropertiesForTenant gets tenant assignments - - Get all assigned properties like storage domain, entities, policies, - -objects, views etc for a given tenant. -*/ -func (a *Client) GetAssignedPropertiesForTenant(params *GetAssignedPropertiesForTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssignedPropertiesForTenantOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAssignedPropertiesForTenantParams() - } - op := &runtime.ClientOperation{ - ID: "GetAssignedPropertiesForTenant", - Method: "GET", - PathPattern: "/tenants/{id}/assignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAssignedPropertiesForTenantReader{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.(*GetAssignedPropertiesForTenantOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAssignedPropertiesForTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetOnPremTenantConfig gets tenants config - -Get Tenant related configurations for the cluster. -*/ -func (a *Client) GetOnPremTenantConfig(params *GetOnPremTenantConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOnPremTenantConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetOnPremTenantConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetOnPremTenantConfig", - Method: "GET", - PathPattern: "/clusters/tenant-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetOnPremTenantConfigReader{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.(*GetOnPremTenantConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetOnPremTenantConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenantByID gets tenant by ID -*/ -func (a *Client) GetTenantByID(params *GetTenantByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenantByID", - Method: "GET", - PathPattern: "/tenants/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantByIDReader{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.(*GetTenantByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetTenantSwift gets a swift configuration - -Get a Swift configuration. -*/ -func (a *Client) GetTenantSwift(params *GetTenantSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTenantSwiftOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetTenantSwiftParams() - } - op := &runtime.ClientOperation{ - ID: "GetTenantSwift", - Method: "GET", - PathPattern: "/tenants/swift", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetTenantSwiftReader{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.(*GetTenantSwiftOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetTenantSwiftDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListTenants gets a list of tenants -*/ -func (a *Client) ListTenants(params *ListTenantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTenantsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListTenantsParams() - } - op := &runtime.ClientOperation{ - ID: "ListTenants", - Method: "GET", - PathPattern: "/tenants", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListTenantsReader{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.(*ListTenantsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListTenantsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PerformTenantAction performs actions on a tenant - -Perform actions like activate and deactivate on a given Tenant. -*/ -func (a *Client) PerformTenantAction(params *PerformTenantActionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PerformTenantActionOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPerformTenantActionParams() - } - op := &runtime.ClientOperation{ - ID: "PerformTenantAction", - Method: "POST", - PathPattern: "/tenants/{id}/actions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PerformTenantActionReader{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.(*PerformTenantActionOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PerformTenantActionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterSwift registers swift service on a keystone server - -Register Swift service on Keystone server. -*/ -func (a *Client) RegisterSwift(params *RegisterSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegisterSwiftNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterSwiftParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterSwift", - Method: "POST", - PathPattern: "/tenants/swift/register", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegisterSwiftReader{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.(*RegisterSwiftNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterSwiftDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnregisterSwift unregisters swift service from a keystone server - -Unregister Swift service from Keystone server. -*/ -func (a *Client) UnregisterSwift(params *UnregisterSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnregisterSwiftNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterSwiftParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterSwift", - Method: "POST", - PathPattern: "/tenants/swift/unregister", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UnregisterSwiftReader{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.(*UnregisterSwiftNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterSwiftDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateOnPremTenantConfig updates tenants config - -Update Tenant related configurations for the cluster. -*/ -func (a *Client) UpdateOnPremTenantConfig(params *UpdateOnPremTenantConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateOnPremTenantConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateOnPremTenantConfigParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateOnPremTenantConfig", - Method: "POST", - PathPattern: "/clusters/tenant-config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateOnPremTenantConfigReader{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.(*UpdateOnPremTenantConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateOnPremTenantConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenant updates tenant - -Update Tenant's properties. -*/ -func (a *Client) UpdateTenant(params *UpdateTenantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenant", - Method: "PUT", - PathPattern: "/tenants/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantReader{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.(*UpdateTenantOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateTenantSwift updates a swift configuration - -Update a Swift configuration. -*/ -func (a *Client) UpdateTenantSwift(params *UpdateTenantSwiftParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTenantSwiftOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateTenantSwiftParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateTenantSwift", - Method: "PUT", - PathPattern: "/tenants/swift", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateTenantSwiftReader{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.(*UpdateTenantSwiftOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateTenantSwiftDefault) - 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/v2/client/tenant/unregister_swift_parameters.go b/v2/client/tenant/unregister_swift_parameters.go deleted file mode 100644 index 1db555d5..00000000 --- a/v2/client/tenant/unregister_swift_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUnregisterSwiftParams creates a new UnregisterSwiftParams 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 NewUnregisterSwiftParams() *UnregisterSwiftParams { - return &UnregisterSwiftParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterSwiftParamsWithTimeout creates a new UnregisterSwiftParams object -// with the ability to set a timeout on a request. -func NewUnregisterSwiftParamsWithTimeout(timeout time.Duration) *UnregisterSwiftParams { - return &UnregisterSwiftParams{ - timeout: timeout, - } -} - -// NewUnregisterSwiftParamsWithContext creates a new UnregisterSwiftParams object -// with the ability to set a context for a request. -func NewUnregisterSwiftParamsWithContext(ctx context.Context) *UnregisterSwiftParams { - return &UnregisterSwiftParams{ - Context: ctx, - } -} - -// NewUnregisterSwiftParamsWithHTTPClient creates a new UnregisterSwiftParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterSwiftParamsWithHTTPClient(client *http.Client) *UnregisterSwiftParams { - return &UnregisterSwiftParams{ - HTTPClient: client, - } -} - -/* -UnregisterSwiftParams contains all the parameters to send to the API endpoint - - for the unregister swift operation. - - Typically these are written to a http.Request. -*/ -type UnregisterSwiftParams struct { - - /* Body. - - Specifies the parameters to unregister a Swift service from Keystone server. - */ - Body *models.UnregisterSwiftParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterSwiftParams) WithDefaults() *UnregisterSwiftParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterSwiftParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister swift params -func (o *UnregisterSwiftParams) WithTimeout(timeout time.Duration) *UnregisterSwiftParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister swift params -func (o *UnregisterSwiftParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister swift params -func (o *UnregisterSwiftParams) WithContext(ctx context.Context) *UnregisterSwiftParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister swift params -func (o *UnregisterSwiftParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister swift params -func (o *UnregisterSwiftParams) WithHTTPClient(client *http.Client) *UnregisterSwiftParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister swift params -func (o *UnregisterSwiftParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unregister swift params -func (o *UnregisterSwiftParams) WithBody(body *models.UnregisterSwiftParams) *UnregisterSwiftParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unregister swift params -func (o *UnregisterSwiftParams) SetBody(body *models.UnregisterSwiftParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterSwiftParams) 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/tenant/unregister_swift_responses.go b/v2/client/tenant/unregister_swift_responses.go deleted file mode 100644 index f730883e..00000000 --- a/v2/client/tenant/unregister_swift_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UnregisterSwiftReader is a Reader for the UnregisterSwift structure. -type UnregisterSwiftReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterSwiftReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewUnregisterSwiftNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterSwiftDefault(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 - } -} - -// NewUnregisterSwiftNoContent creates a UnregisterSwiftNoContent with default headers values -func NewUnregisterSwiftNoContent() *UnregisterSwiftNoContent { - return &UnregisterSwiftNoContent{} -} - -/* -UnregisterSwiftNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type UnregisterSwiftNoContent struct { -} - -// IsSuccess returns true when this unregister swift no content response has a 2xx status code -func (o *UnregisterSwiftNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this unregister swift no content response has a 3xx status code -func (o *UnregisterSwiftNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this unregister swift no content response has a 4xx status code -func (o *UnregisterSwiftNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this unregister swift no content response has a 5xx status code -func (o *UnregisterSwiftNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this unregister swift no content response a status code equal to that given -func (o *UnregisterSwiftNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the unregister swift no content response -func (o *UnregisterSwiftNoContent) Code() int { - return 204 -} - -func (o *UnregisterSwiftNoContent) Error() string { - return fmt.Sprintf("[POST /tenants/swift/unregister][%d] unregisterSwiftNoContent", 204) -} - -func (o *UnregisterSwiftNoContent) String() string { - return fmt.Sprintf("[POST /tenants/swift/unregister][%d] unregisterSwiftNoContent", 204) -} - -func (o *UnregisterSwiftNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewUnregisterSwiftDefault creates a UnregisterSwiftDefault with default headers values -func NewUnregisterSwiftDefault(code int) *UnregisterSwiftDefault { - return &UnregisterSwiftDefault{ - _statusCode: code, - } -} - -/* -UnregisterSwiftDefault describes a response with status code -1, with default header values. - -Error -*/ -type UnregisterSwiftDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this unregister swift default response has a 2xx status code -func (o *UnregisterSwiftDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this unregister swift default response has a 3xx status code -func (o *UnregisterSwiftDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this unregister swift default response has a 4xx status code -func (o *UnregisterSwiftDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this unregister swift default response has a 5xx status code -func (o *UnregisterSwiftDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this unregister swift default response a status code equal to that given -func (o *UnregisterSwiftDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the unregister swift default response -func (o *UnregisterSwiftDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterSwiftDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/swift/unregister][%d] UnregisterSwift default %s", o._statusCode, payload) -} - -func (o *UnregisterSwiftDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /tenants/swift/unregister][%d] UnregisterSwift default %s", o._statusCode, payload) -} - -func (o *UnregisterSwiftDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UnregisterSwiftDefault) 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/tenant/update_on_prem_tenant_config_parameters.go b/v2/client/tenant/update_on_prem_tenant_config_parameters.go deleted file mode 100644 index 2e228c25..00000000 --- a/v2/client/tenant/update_on_prem_tenant_config_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateOnPremTenantConfigParams creates a new UpdateOnPremTenantConfigParams 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 NewUpdateOnPremTenantConfigParams() *UpdateOnPremTenantConfigParams { - return &UpdateOnPremTenantConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateOnPremTenantConfigParamsWithTimeout creates a new UpdateOnPremTenantConfigParams object -// with the ability to set a timeout on a request. -func NewUpdateOnPremTenantConfigParamsWithTimeout(timeout time.Duration) *UpdateOnPremTenantConfigParams { - return &UpdateOnPremTenantConfigParams{ - timeout: timeout, - } -} - -// NewUpdateOnPremTenantConfigParamsWithContext creates a new UpdateOnPremTenantConfigParams object -// with the ability to set a context for a request. -func NewUpdateOnPremTenantConfigParamsWithContext(ctx context.Context) *UpdateOnPremTenantConfigParams { - return &UpdateOnPremTenantConfigParams{ - Context: ctx, - } -} - -// NewUpdateOnPremTenantConfigParamsWithHTTPClient creates a new UpdateOnPremTenantConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateOnPremTenantConfigParamsWithHTTPClient(client *http.Client) *UpdateOnPremTenantConfigParams { - return &UpdateOnPremTenantConfigParams{ - HTTPClient: client, - } -} - -/* -UpdateOnPremTenantConfigParams contains all the parameters to send to the API endpoint - - for the update on prem tenant config operation. - - Typically these are written to a http.Request. -*/ -type UpdateOnPremTenantConfigParams struct { - - // Body. - Body *models.OnPremTenantConfig - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update on prem tenant config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOnPremTenantConfigParams) WithDefaults() *UpdateOnPremTenantConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update on prem tenant config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOnPremTenantConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) WithTimeout(timeout time.Duration) *UpdateOnPremTenantConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) WithContext(ctx context.Context) *UpdateOnPremTenantConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) WithHTTPClient(client *http.Client) *UpdateOnPremTenantConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) WithBody(body *models.OnPremTenantConfig) *UpdateOnPremTenantConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update on prem tenant config params -func (o *UpdateOnPremTenantConfigParams) SetBody(body *models.OnPremTenantConfig) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateOnPremTenantConfigParams) 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/tenant/update_on_prem_tenant_config_responses.go b/v2/client/tenant/update_on_prem_tenant_config_responses.go deleted file mode 100644 index 351c9075..00000000 --- a/v2/client/tenant/update_on_prem_tenant_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateOnPremTenantConfigReader is a Reader for the UpdateOnPremTenantConfig structure. -type UpdateOnPremTenantConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateOnPremTenantConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateOnPremTenantConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateOnPremTenantConfigDefault(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 - } -} - -// NewUpdateOnPremTenantConfigOK creates a UpdateOnPremTenantConfigOK with default headers values -func NewUpdateOnPremTenantConfigOK() *UpdateOnPremTenantConfigOK { - return &UpdateOnPremTenantConfigOK{} -} - -/* -UpdateOnPremTenantConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateOnPremTenantConfigOK struct { - Payload *models.OnPremTenantConfig -} - -// IsSuccess returns true when this update on prem tenant config o k response has a 2xx status code -func (o *UpdateOnPremTenantConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update on prem tenant config o k response has a 3xx status code -func (o *UpdateOnPremTenantConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update on prem tenant config o k response has a 4xx status code -func (o *UpdateOnPremTenantConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update on prem tenant config o k response has a 5xx status code -func (o *UpdateOnPremTenantConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update on prem tenant config o k response a status code equal to that given -func (o *UpdateOnPremTenantConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update on prem tenant config o k response -func (o *UpdateOnPremTenantConfigOK) Code() int { - return 200 -} - -func (o *UpdateOnPremTenantConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/tenant-config][%d] updateOnPremTenantConfigOK %s", 200, payload) -} - -func (o *UpdateOnPremTenantConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/tenant-config][%d] updateOnPremTenantConfigOK %s", 200, payload) -} - -func (o *UpdateOnPremTenantConfigOK) GetPayload() *models.OnPremTenantConfig { - return o.Payload -} - -func (o *UpdateOnPremTenantConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.OnPremTenantConfig) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOnPremTenantConfigDefault creates a UpdateOnPremTenantConfigDefault with default headers values -func NewUpdateOnPremTenantConfigDefault(code int) *UpdateOnPremTenantConfigDefault { - return &UpdateOnPremTenantConfigDefault{ - _statusCode: code, - } -} - -/* -UpdateOnPremTenantConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateOnPremTenantConfigDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update on prem tenant config default response has a 2xx status code -func (o *UpdateOnPremTenantConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update on prem tenant config default response has a 3xx status code -func (o *UpdateOnPremTenantConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update on prem tenant config default response has a 4xx status code -func (o *UpdateOnPremTenantConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update on prem tenant config default response has a 5xx status code -func (o *UpdateOnPremTenantConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update on prem tenant config default response a status code equal to that given -func (o *UpdateOnPremTenantConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update on prem tenant config default response -func (o *UpdateOnPremTenantConfigDefault) Code() int { - return o._statusCode -} - -func (o *UpdateOnPremTenantConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/tenant-config][%d] UpdateOnPremTenantConfig default %s", o._statusCode, payload) -} - -func (o *UpdateOnPremTenantConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /clusters/tenant-config][%d] UpdateOnPremTenantConfig default %s", o._statusCode, payload) -} - -func (o *UpdateOnPremTenantConfigDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateOnPremTenantConfigDefault) 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/tenant/update_tenant_parameters.go b/v2/client/tenant/update_tenant_parameters.go deleted file mode 100644 index ae5a7cbb..00000000 --- a/v2/client/tenant/update_tenant_parameters.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateTenantParams creates a new UpdateTenantParams 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 NewUpdateTenantParams() *UpdateTenantParams { - return &UpdateTenantParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantParamsWithTimeout creates a new UpdateTenantParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantParamsWithTimeout(timeout time.Duration) *UpdateTenantParams { - return &UpdateTenantParams{ - timeout: timeout, - } -} - -// NewUpdateTenantParamsWithContext creates a new UpdateTenantParams object -// with the ability to set a context for a request. -func NewUpdateTenantParamsWithContext(ctx context.Context) *UpdateTenantParams { - return &UpdateTenantParams{ - Context: ctx, - } -} - -// NewUpdateTenantParamsWithHTTPClient creates a new UpdateTenantParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantParamsWithHTTPClient(client *http.Client) *UpdateTenantParams { - return &UpdateTenantParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantParams contains all the parameters to send to the API endpoint - - for the update tenant operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantParams struct { - - // Body. - Body *models.UpdateTenantBody - - // ID. - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantParams) WithDefaults() *UpdateTenantParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant params -func (o *UpdateTenantParams) WithTimeout(timeout time.Duration) *UpdateTenantParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant params -func (o *UpdateTenantParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant params -func (o *UpdateTenantParams) WithContext(ctx context.Context) *UpdateTenantParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant params -func (o *UpdateTenantParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant params -func (o *UpdateTenantParams) WithHTTPClient(client *http.Client) *UpdateTenantParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant params -func (o *UpdateTenantParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant params -func (o *UpdateTenantParams) WithBody(body *models.UpdateTenantBody) *UpdateTenantParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant params -func (o *UpdateTenantParams) SetBody(body *models.UpdateTenantBody) { - o.Body = body -} - -// WithID adds the id to the update tenant params -func (o *UpdateTenantParams) WithID(id string) *UpdateTenantParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update tenant params -func (o *UpdateTenantParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/tenant/update_tenant_responses.go b/v2/client/tenant/update_tenant_responses.go deleted file mode 100644 index f37c40b9..00000000 --- a/v2/client/tenant/update_tenant_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateTenantReader is a Reader for the UpdateTenant structure. -type UpdateTenantReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantDefault(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 - } -} - -// NewUpdateTenantOK creates a UpdateTenantOK with default headers values -func NewUpdateTenantOK() *UpdateTenantOK { - return &UpdateTenantOK{} -} - -/* -UpdateTenantOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateTenantOK struct { - Payload *models.TenantInfo -} - -// IsSuccess returns true when this update tenant o k response has a 2xx status code -func (o *UpdateTenantOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant o k response has a 3xx status code -func (o *UpdateTenantOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant o k response has a 4xx status code -func (o *UpdateTenantOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant o k response has a 5xx status code -func (o *UpdateTenantOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant o k response a status code equal to that given -func (o *UpdateTenantOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant o k response -func (o *UpdateTenantOK) Code() int { - return 200 -} - -func (o *UpdateTenantOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}][%d] updateTenantOK %s", 200, payload) -} - -func (o *UpdateTenantOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}][%d] updateTenantOK %s", 200, payload) -} - -func (o *UpdateTenantOK) GetPayload() *models.TenantInfo { - return o.Payload -} - -func (o *UpdateTenantOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TenantInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantDefault creates a UpdateTenantDefault with default headers values -func NewUpdateTenantDefault(code int) *UpdateTenantDefault { - return &UpdateTenantDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update tenant default response has a 2xx status code -func (o *UpdateTenantDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant default response has a 3xx status code -func (o *UpdateTenantDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant default response has a 4xx status code -func (o *UpdateTenantDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant default response has a 5xx status code -func (o *UpdateTenantDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant default response a status code equal to that given -func (o *UpdateTenantDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant default response -func (o *UpdateTenantDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}][%d] UpdateTenant default %s", o._statusCode, payload) -} - -func (o *UpdateTenantDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/{id}][%d] UpdateTenant default %s", o._statusCode, payload) -} - -func (o *UpdateTenantDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateTenantDefault) 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/tenant/update_tenant_swift_parameters.go b/v2/client/tenant/update_tenant_swift_parameters.go deleted file mode 100644 index 4435a5d3..00000000 --- a/v2/client/tenant/update_tenant_swift_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateTenantSwiftParams creates a new UpdateTenantSwiftParams 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 NewUpdateTenantSwiftParams() *UpdateTenantSwiftParams { - return &UpdateTenantSwiftParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateTenantSwiftParamsWithTimeout creates a new UpdateTenantSwiftParams object -// with the ability to set a timeout on a request. -func NewUpdateTenantSwiftParamsWithTimeout(timeout time.Duration) *UpdateTenantSwiftParams { - return &UpdateTenantSwiftParams{ - timeout: timeout, - } -} - -// NewUpdateTenantSwiftParamsWithContext creates a new UpdateTenantSwiftParams object -// with the ability to set a context for a request. -func NewUpdateTenantSwiftParamsWithContext(ctx context.Context) *UpdateTenantSwiftParams { - return &UpdateTenantSwiftParams{ - Context: ctx, - } -} - -// NewUpdateTenantSwiftParamsWithHTTPClient creates a new UpdateTenantSwiftParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateTenantSwiftParamsWithHTTPClient(client *http.Client) *UpdateTenantSwiftParams { - return &UpdateTenantSwiftParams{ - HTTPClient: client, - } -} - -/* -UpdateTenantSwiftParams contains all the parameters to send to the API endpoint - - for the update tenant swift operation. - - Typically these are written to a http.Request. -*/ -type UpdateTenantSwiftParams struct { - - /* Body. - - Specifies the parameters to update a Swift configuration. - */ - Body *models.SwiftParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update tenant swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantSwiftParams) WithDefaults() *UpdateTenantSwiftParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update tenant swift params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateTenantSwiftParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update tenant swift params -func (o *UpdateTenantSwiftParams) WithTimeout(timeout time.Duration) *UpdateTenantSwiftParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update tenant swift params -func (o *UpdateTenantSwiftParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update tenant swift params -func (o *UpdateTenantSwiftParams) WithContext(ctx context.Context) *UpdateTenantSwiftParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update tenant swift params -func (o *UpdateTenantSwiftParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update tenant swift params -func (o *UpdateTenantSwiftParams) WithHTTPClient(client *http.Client) *UpdateTenantSwiftParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update tenant swift params -func (o *UpdateTenantSwiftParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update tenant swift params -func (o *UpdateTenantSwiftParams) WithBody(body *models.SwiftParams) *UpdateTenantSwiftParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update tenant swift params -func (o *UpdateTenantSwiftParams) SetBody(body *models.SwiftParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateTenantSwiftParams) 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/tenant/update_tenant_swift_responses.go b/v2/client/tenant/update_tenant_swift_responses.go deleted file mode 100644 index 564a8fce..00000000 --- a/v2/client/tenant/update_tenant_swift_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package tenant - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateTenantSwiftReader is a Reader for the UpdateTenantSwift structure. -type UpdateTenantSwiftReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateTenantSwiftReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateTenantSwiftOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateTenantSwiftDefault(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 - } -} - -// NewUpdateTenantSwiftOK creates a UpdateTenantSwiftOK with default headers values -func NewUpdateTenantSwiftOK() *UpdateTenantSwiftOK { - return &UpdateTenantSwiftOK{} -} - -/* -UpdateTenantSwiftOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateTenantSwiftOK struct { - Payload *models.SwiftParams -} - -// IsSuccess returns true when this update tenant swift o k response has a 2xx status code -func (o *UpdateTenantSwiftOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update tenant swift o k response has a 3xx status code -func (o *UpdateTenantSwiftOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update tenant swift o k response has a 4xx status code -func (o *UpdateTenantSwiftOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update tenant swift o k response has a 5xx status code -func (o *UpdateTenantSwiftOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update tenant swift o k response a status code equal to that given -func (o *UpdateTenantSwiftOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update tenant swift o k response -func (o *UpdateTenantSwiftOK) Code() int { - return 200 -} - -func (o *UpdateTenantSwiftOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/swift][%d] updateTenantSwiftOK %s", 200, payload) -} - -func (o *UpdateTenantSwiftOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/swift][%d] updateTenantSwiftOK %s", 200, payload) -} - -func (o *UpdateTenantSwiftOK) GetPayload() *models.SwiftParams { - return o.Payload -} - -func (o *UpdateTenantSwiftOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SwiftParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateTenantSwiftDefault creates a UpdateTenantSwiftDefault with default headers values -func NewUpdateTenantSwiftDefault(code int) *UpdateTenantSwiftDefault { - return &UpdateTenantSwiftDefault{ - _statusCode: code, - } -} - -/* -UpdateTenantSwiftDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateTenantSwiftDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update tenant swift default response has a 2xx status code -func (o *UpdateTenantSwiftDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update tenant swift default response has a 3xx status code -func (o *UpdateTenantSwiftDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update tenant swift default response has a 4xx status code -func (o *UpdateTenantSwiftDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update tenant swift default response has a 5xx status code -func (o *UpdateTenantSwiftDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update tenant swift default response a status code equal to that given -func (o *UpdateTenantSwiftDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update tenant swift default response -func (o *UpdateTenantSwiftDefault) Code() int { - return o._statusCode -} - -func (o *UpdateTenantSwiftDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/swift][%d] UpdateTenantSwift default %s", o._statusCode, payload) -} - -func (o *UpdateTenantSwiftDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /tenants/swift][%d] UpdateTenantSwift default %s", o._statusCode, payload) -} - -func (o *UpdateTenantSwiftDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateTenantSwiftDefault) 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/user/create_group_parameters.go b/v2/client/user/create_group_parameters.go deleted file mode 100644 index 12d5709b..00000000 --- a/v2/client/user/create_group_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateGroupParams creates a new CreateGroupParams 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 NewCreateGroupParams() *CreateGroupParams { - return &CreateGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateGroupParamsWithTimeout creates a new CreateGroupParams object -// with the ability to set a timeout on a request. -func NewCreateGroupParamsWithTimeout(timeout time.Duration) *CreateGroupParams { - return &CreateGroupParams{ - timeout: timeout, - } -} - -// NewCreateGroupParamsWithContext creates a new CreateGroupParams object -// with the ability to set a context for a request. -func NewCreateGroupParamsWithContext(ctx context.Context) *CreateGroupParams { - return &CreateGroupParams{ - Context: ctx, - } -} - -// NewCreateGroupParamsWithHTTPClient creates a new CreateGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateGroupParamsWithHTTPClient(client *http.Client) *CreateGroupParams { - return &CreateGroupParams{ - HTTPClient: client, - } -} - -/* -CreateGroupParams contains all the parameters to send to the API endpoint - - for the create group operation. - - Typically these are written to a http.Request. -*/ -type CreateGroupParams struct { - - /* Body. - - Specifies the new group parameters. - */ - Body models.CreateGroupsParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGroupParams) WithDefaults() *CreateGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create group params -func (o *CreateGroupParams) WithTimeout(timeout time.Duration) *CreateGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create group params -func (o *CreateGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create group params -func (o *CreateGroupParams) WithContext(ctx context.Context) *CreateGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create group params -func (o *CreateGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create group params -func (o *CreateGroupParams) WithHTTPClient(client *http.Client) *CreateGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create group params -func (o *CreateGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create group params -func (o *CreateGroupParams) WithBody(body models.CreateGroupsParams) *CreateGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create group params -func (o *CreateGroupParams) SetBody(body models.CreateGroupsParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateGroupParams) 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/user/create_group_responses.go b/v2/client/user/create_group_responses.go deleted file mode 100644 index 972c96d8..00000000 --- a/v2/client/user/create_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateGroupReader is a Reader for the CreateGroup structure. -type CreateGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateGroupCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateGroupDefault(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 - } -} - -// NewCreateGroupCreated creates a CreateGroupCreated with default headers values -func NewCreateGroupCreated() *CreateGroupCreated { - return &CreateGroupCreated{} -} - -/* -CreateGroupCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateGroupCreated struct { - Payload *models.Groups -} - -// IsSuccess returns true when this create group created response has a 2xx status code -func (o *CreateGroupCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create group created response has a 3xx status code -func (o *CreateGroupCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create group created response has a 4xx status code -func (o *CreateGroupCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create group created response has a 5xx status code -func (o *CreateGroupCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create group created response a status code equal to that given -func (o *CreateGroupCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create group created response -func (o *CreateGroupCreated) Code() int { - return 201 -} - -func (o *CreateGroupCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups][%d] createGroupCreated %s", 201, payload) -} - -func (o *CreateGroupCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups][%d] createGroupCreated %s", 201, payload) -} - -func (o *CreateGroupCreated) GetPayload() *models.Groups { - return o.Payload -} - -func (o *CreateGroupCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Groups) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateGroupDefault creates a CreateGroupDefault with default headers values -func NewCreateGroupDefault(code int) *CreateGroupDefault { - return &CreateGroupDefault{ - _statusCode: code, - } -} - -/* -CreateGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create group default response has a 2xx status code -func (o *CreateGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create group default response has a 3xx status code -func (o *CreateGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create group default response has a 4xx status code -func (o *CreateGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create group default response has a 5xx status code -func (o *CreateGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create group default response a status code equal to that given -func (o *CreateGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create group default response -func (o *CreateGroupDefault) Code() int { - return o._statusCode -} - -func (o *CreateGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups][%d] CreateGroup default %s", o._statusCode, payload) -} - -func (o *CreateGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups][%d] CreateGroup default %s", o._statusCode, payload) -} - -func (o *CreateGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateGroupDefault) 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/user/create_session_parameters.go b/v2/client/user/create_session_parameters.go deleted file mode 100644 index 5d2176c5..00000000 --- a/v2/client/user/create_session_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateSessionParams creates a new CreateSessionParams 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 NewCreateSessionParams() *CreateSessionParams { - return &CreateSessionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateSessionParamsWithTimeout creates a new CreateSessionParams object -// with the ability to set a timeout on a request. -func NewCreateSessionParamsWithTimeout(timeout time.Duration) *CreateSessionParams { - return &CreateSessionParams{ - timeout: timeout, - } -} - -// NewCreateSessionParamsWithContext creates a new CreateSessionParams object -// with the ability to set a context for a request. -func NewCreateSessionParamsWithContext(ctx context.Context) *CreateSessionParams { - return &CreateSessionParams{ - Context: ctx, - } -} - -// NewCreateSessionParamsWithHTTPClient creates a new CreateSessionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateSessionParamsWithHTTPClient(client *http.Client) *CreateSessionParams { - return &CreateSessionParams{ - HTTPClient: client, - } -} - -/* -CreateSessionParams contains all the parameters to send to the API endpoint - - for the create session operation. - - Typically these are written to a http.Request. -*/ -type CreateSessionParams struct { - - /* Body. - - Specifies the parameters to create a user session - */ - Body *models.CreateUserSessionRequestParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create session params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateSessionParams) WithDefaults() *CreateSessionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create session params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateSessionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create session params -func (o *CreateSessionParams) WithTimeout(timeout time.Duration) *CreateSessionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create session params -func (o *CreateSessionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create session params -func (o *CreateSessionParams) WithContext(ctx context.Context) *CreateSessionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create session params -func (o *CreateSessionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create session params -func (o *CreateSessionParams) WithHTTPClient(client *http.Client) *CreateSessionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create session params -func (o *CreateSessionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create session params -func (o *CreateSessionParams) WithBody(body *models.CreateUserSessionRequestParams) *CreateSessionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create session params -func (o *CreateSessionParams) SetBody(body *models.CreateUserSessionRequestParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateSessionParams) 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/user/create_session_responses.go b/v2/client/user/create_session_responses.go deleted file mode 100644 index 73dbce4f..00000000 --- a/v2/client/user/create_session_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateSessionReader is a Reader for the CreateSession structure. -type CreateSessionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateSessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateSessionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateSessionDefault(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 - } -} - -// NewCreateSessionCreated creates a CreateSessionCreated with default headers values -func NewCreateSessionCreated() *CreateSessionCreated { - return &CreateSessionCreated{} -} - -/* -CreateSessionCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateSessionCreated struct { - Payload *models.UserSession -} - -// IsSuccess returns true when this create session created response has a 2xx status code -func (o *CreateSessionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create session created response has a 3xx status code -func (o *CreateSessionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create session created response has a 4xx status code -func (o *CreateSessionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create session created response has a 5xx status code -func (o *CreateSessionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create session created response a status code equal to that given -func (o *CreateSessionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create session created response -func (o *CreateSessionCreated) Code() int { - return 201 -} - -func (o *CreateSessionCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/sessions][%d] createSessionCreated %s", 201, payload) -} - -func (o *CreateSessionCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/sessions][%d] createSessionCreated %s", 201, payload) -} - -func (o *CreateSessionCreated) GetPayload() *models.UserSession { - return o.Payload -} - -func (o *CreateSessionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserSession) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateSessionDefault creates a CreateSessionDefault with default headers values -func NewCreateSessionDefault(code int) *CreateSessionDefault { - return &CreateSessionDefault{ - _statusCode: code, - } -} - -/* -CreateSessionDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateSessionDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create session default response has a 2xx status code -func (o *CreateSessionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create session default response has a 3xx status code -func (o *CreateSessionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create session default response has a 4xx status code -func (o *CreateSessionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create session default response has a 5xx status code -func (o *CreateSessionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create session default response a status code equal to that given -func (o *CreateSessionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create session default response -func (o *CreateSessionDefault) Code() int { - return o._statusCode -} - -func (o *CreateSessionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/sessions][%d] CreateSession default %s", o._statusCode, payload) -} - -func (o *CreateSessionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/sessions][%d] CreateSession default %s", o._statusCode, payload) -} - -func (o *CreateSessionDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateSessionDefault) 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/user/create_user_api_key_parameters.go b/v2/client/user/create_user_api_key_parameters.go deleted file mode 100644 index 270ee4f6..00000000 --- a/v2/client/user/create_user_api_key_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateUserAPIKeyParams creates a new CreateUserAPIKeyParams 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 NewCreateUserAPIKeyParams() *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateUserAPIKeyParamsWithTimeout creates a new CreateUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewCreateUserAPIKeyParamsWithTimeout(timeout time.Duration) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewCreateUserAPIKeyParamsWithContext creates a new CreateUserAPIKeyParams object -// with the ability to set a context for a request. -func NewCreateUserAPIKeyParamsWithContext(ctx context.Context) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - Context: ctx, - } -} - -// NewCreateUserAPIKeyParamsWithHTTPClient creates a new CreateUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateUserAPIKeyParamsWithHTTPClient(client *http.Client) *CreateUserAPIKeyParams { - return &CreateUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -CreateUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the create user API key operation. - - Typically these are written to a http.Request. -*/ -type CreateUserAPIKeyParams struct { - - /* Body. - - Request to create a new API Key - */ - Body *models.CreateOrUpdateAPIKeyRequest - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create user API key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserAPIKeyParams) WithDefaults() *CreateUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create user API key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create user API key params -func (o *CreateUserAPIKeyParams) WithTimeout(timeout time.Duration) *CreateUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create user API key params -func (o *CreateUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create user API key params -func (o *CreateUserAPIKeyParams) WithContext(ctx context.Context) *CreateUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create user API key params -func (o *CreateUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create user API key params -func (o *CreateUserAPIKeyParams) WithHTTPClient(client *http.Client) *CreateUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create user API key params -func (o *CreateUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create user API key params -func (o *CreateUserAPIKeyParams) WithBody(body *models.CreateOrUpdateAPIKeyRequest) *CreateUserAPIKeyParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create user API key params -func (o *CreateUserAPIKeyParams) SetBody(body *models.CreateOrUpdateAPIKeyRequest) { - o.Body = body -} - -// WithUserSid adds the userSid to the create user API key params -func (o *CreateUserAPIKeyParams) WithUserSid(userSid string) *CreateUserAPIKeyParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the create user API key params -func (o *CreateUserAPIKeyParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateUserAPIKeyParams) 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 - } - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/create_user_api_key_responses.go b/v2/client/user/create_user_api_key_responses.go deleted file mode 100644 index f399af2e..00000000 --- a/v2/client/user/create_user_api_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateUserAPIKeyReader is a Reader for the CreateUserAPIKey structure. -type CreateUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateUserAPIKeyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateUserAPIKeyDefault(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 - } -} - -// NewCreateUserAPIKeyCreated creates a CreateUserAPIKeyCreated with default headers values -func NewCreateUserAPIKeyCreated() *CreateUserAPIKeyCreated { - return &CreateUserAPIKeyCreated{} -} - -/* -CreateUserAPIKeyCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateUserAPIKeyCreated struct { - Payload *models.CreatedUserAPIKey -} - -// IsSuccess returns true when this create user Api key created response has a 2xx status code -func (o *CreateUserAPIKeyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create user Api key created response has a 3xx status code -func (o *CreateUserAPIKeyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create user Api key created response has a 4xx status code -func (o *CreateUserAPIKeyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create user Api key created response has a 5xx status code -func (o *CreateUserAPIKeyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create user Api key created response a status code equal to that given -func (o *CreateUserAPIKeyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create user Api key created response -func (o *CreateUserAPIKeyCreated) Code() int { - return 201 -} - -func (o *CreateUserAPIKeyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys][%d] createUserApiKeyCreated %s", 201, payload) -} - -func (o *CreateUserAPIKeyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys][%d] createUserApiKeyCreated %s", 201, payload) -} - -func (o *CreateUserAPIKeyCreated) GetPayload() *models.CreatedUserAPIKey { - return o.Payload -} - -func (o *CreateUserAPIKeyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedUserAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateUserAPIKeyDefault creates a CreateUserAPIKeyDefault with default headers values -func NewCreateUserAPIKeyDefault(code int) *CreateUserAPIKeyDefault { - return &CreateUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -CreateUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateUserAPIKeyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create user API key default response has a 2xx status code -func (o *CreateUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create user API key default response has a 3xx status code -func (o *CreateUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create user API key default response has a 4xx status code -func (o *CreateUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create user API key default response has a 5xx status code -func (o *CreateUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create user API key default response a status code equal to that given -func (o *CreateUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create user API key default response -func (o *CreateUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *CreateUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys][%d] CreateUserAPIKey default %s", o._statusCode, payload) -} - -func (o *CreateUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys][%d] CreateUserAPIKey default %s", o._statusCode, payload) -} - -func (o *CreateUserAPIKeyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateUserAPIKeyDefault) 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/user/create_users_parameters.go b/v2/client/user/create_users_parameters.go deleted file mode 100644 index f8309e28..00000000 --- a/v2/client/user/create_users_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateUsersParams creates a new CreateUsersParams 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 NewCreateUsersParams() *CreateUsersParams { - return &CreateUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateUsersParamsWithTimeout creates a new CreateUsersParams object -// with the ability to set a timeout on a request. -func NewCreateUsersParamsWithTimeout(timeout time.Duration) *CreateUsersParams { - return &CreateUsersParams{ - timeout: timeout, - } -} - -// NewCreateUsersParamsWithContext creates a new CreateUsersParams object -// with the ability to set a context for a request. -func NewCreateUsersParamsWithContext(ctx context.Context) *CreateUsersParams { - return &CreateUsersParams{ - Context: ctx, - } -} - -// NewCreateUsersParamsWithHTTPClient creates a new CreateUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateUsersParamsWithHTTPClient(client *http.Client) *CreateUsersParams { - return &CreateUsersParams{ - HTTPClient: client, - } -} - -/* -CreateUsersParams contains all the parameters to send to the API endpoint - - for the create users operation. - - Typically these are written to a http.Request. -*/ -type CreateUsersParams struct { - - /* Body. - - If an Active Directory or an IdP domain is specified, a new user is added to the Cohesity Cluster against the specified Active Directory/IdP user principal. If the LOCAL domain is specified, a new user is created directly in the default LOCAL domain on the Cohesity Cluster. - */ - Body models.CreateUsersParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUsersParams) WithDefaults() *CreateUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create users params -func (o *CreateUsersParams) WithTimeout(timeout time.Duration) *CreateUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create users params -func (o *CreateUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create users params -func (o *CreateUsersParams) WithContext(ctx context.Context) *CreateUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create users params -func (o *CreateUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create users params -func (o *CreateUsersParams) WithHTTPClient(client *http.Client) *CreateUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create users params -func (o *CreateUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create users params -func (o *CreateUsersParams) WithBody(body models.CreateUsersParameters) *CreateUsersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create users params -func (o *CreateUsersParams) SetBody(body models.CreateUsersParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateUsersParams) 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/user/create_users_responses.go b/v2/client/user/create_users_responses.go deleted file mode 100644 index 1a0dded8..00000000 --- a/v2/client/user/create_users_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateUsersReader is a Reader for the CreateUsers structure. -type CreateUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateUsersCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateUsersDefault(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 - } -} - -// NewCreateUsersCreated creates a CreateUsersCreated with default headers values -func NewCreateUsersCreated() *CreateUsersCreated { - return &CreateUsersCreated{} -} - -/* -CreateUsersCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateUsersCreated struct { - Payload *models.UsersList -} - -// IsSuccess returns true when this create users created response has a 2xx status code -func (o *CreateUsersCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create users created response has a 3xx status code -func (o *CreateUsersCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create users created response has a 4xx status code -func (o *CreateUsersCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create users created response has a 5xx status code -func (o *CreateUsersCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create users created response a status code equal to that given -func (o *CreateUsersCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create users created response -func (o *CreateUsersCreated) Code() int { - return 201 -} - -func (o *CreateUsersCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users][%d] createUsersCreated %s", 201, payload) -} - -func (o *CreateUsersCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users][%d] createUsersCreated %s", 201, payload) -} - -func (o *CreateUsersCreated) GetPayload() *models.UsersList { - return o.Payload -} - -func (o *CreateUsersCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UsersList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateUsersDefault creates a CreateUsersDefault with default headers values -func NewCreateUsersDefault(code int) *CreateUsersDefault { - return &CreateUsersDefault{ - _statusCode: code, - } -} - -/* -CreateUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateUsersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create users default response has a 2xx status code -func (o *CreateUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create users default response has a 3xx status code -func (o *CreateUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create users default response has a 4xx status code -func (o *CreateUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create users default response has a 5xx status code -func (o *CreateUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create users default response a status code equal to that given -func (o *CreateUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create users default response -func (o *CreateUsersDefault) Code() int { - return o._statusCode -} - -func (o *CreateUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users][%d] CreateUsers default %s", o._statusCode, payload) -} - -func (o *CreateUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users][%d] CreateUsers default %s", o._statusCode, payload) -} - -func (o *CreateUsersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateUsersDefault) 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/user/delete_group_parameters.go b/v2/client/user/delete_group_parameters.go deleted file mode 100644 index 12a7118d..00000000 --- a/v2/client/user/delete_group_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewDeleteGroupParams creates a new DeleteGroupParams 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 NewDeleteGroupParams() *DeleteGroupParams { - return &DeleteGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteGroupParamsWithTimeout creates a new DeleteGroupParams object -// with the ability to set a timeout on a request. -func NewDeleteGroupParamsWithTimeout(timeout time.Duration) *DeleteGroupParams { - return &DeleteGroupParams{ - timeout: timeout, - } -} - -// NewDeleteGroupParamsWithContext creates a new DeleteGroupParams object -// with the ability to set a context for a request. -func NewDeleteGroupParamsWithContext(ctx context.Context) *DeleteGroupParams { - return &DeleteGroupParams{ - Context: ctx, - } -} - -// NewDeleteGroupParamsWithHTTPClient creates a new DeleteGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteGroupParamsWithHTTPClient(client *http.Client) *DeleteGroupParams { - return &DeleteGroupParams{ - HTTPClient: client, - } -} - -/* -DeleteGroupParams contains all the parameters to send to the API endpoint - - for the delete group operation. - - Typically these are written to a http.Request. -*/ -type DeleteGroupParams struct { - - /* Sid. - - Specify the SID of the group. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupParams) WithDefaults() *DeleteGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete group params -func (o *DeleteGroupParams) WithTimeout(timeout time.Duration) *DeleteGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete group params -func (o *DeleteGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete group params -func (o *DeleteGroupParams) WithContext(ctx context.Context) *DeleteGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete group params -func (o *DeleteGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete group params -func (o *DeleteGroupParams) WithHTTPClient(client *http.Client) *DeleteGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete group params -func (o *DeleteGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the delete group params -func (o *DeleteGroupParams) WithSid(sid string) *DeleteGroupParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the delete group params -func (o *DeleteGroupParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteGroupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/delete_group_responses.go b/v2/client/user/delete_group_responses.go deleted file mode 100644 index de65901e..00000000 --- a/v2/client/user/delete_group_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteGroupReader is a Reader for the DeleteGroup structure. -type DeleteGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteGroupNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteGroupDefault(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 - } -} - -// NewDeleteGroupNoContent creates a DeleteGroupNoContent with default headers values -func NewDeleteGroupNoContent() *DeleteGroupNoContent { - return &DeleteGroupNoContent{} -} - -/* -DeleteGroupNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteGroupNoContent struct { -} - -// IsSuccess returns true when this delete group no content response has a 2xx status code -func (o *DeleteGroupNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete group no content response has a 3xx status code -func (o *DeleteGroupNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete group no content response has a 4xx status code -func (o *DeleteGroupNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete group no content response has a 5xx status code -func (o *DeleteGroupNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete group no content response a status code equal to that given -func (o *DeleteGroupNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete group no content response -func (o *DeleteGroupNoContent) Code() int { - return 204 -} - -func (o *DeleteGroupNoContent) Error() string { - return fmt.Sprintf("[DELETE /groups/{sid}][%d] deleteGroupNoContent", 204) -} - -func (o *DeleteGroupNoContent) String() string { - return fmt.Sprintf("[DELETE /groups/{sid}][%d] deleteGroupNoContent", 204) -} - -func (o *DeleteGroupNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteGroupDefault creates a DeleteGroupDefault with default headers values -func NewDeleteGroupDefault(code int) *DeleteGroupDefault { - return &DeleteGroupDefault{ - _statusCode: code, - } -} - -/* -DeleteGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete group default response has a 2xx status code -func (o *DeleteGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete group default response has a 3xx status code -func (o *DeleteGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete group default response has a 4xx status code -func (o *DeleteGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete group default response has a 5xx status code -func (o *DeleteGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete group default response a status code equal to that given -func (o *DeleteGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete group default response -func (o *DeleteGroupDefault) Code() int { - return o._statusCode -} - -func (o *DeleteGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /groups/{sid}][%d] DeleteGroup default %s", o._statusCode, payload) -} - -func (o *DeleteGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /groups/{sid}][%d] DeleteGroup default %s", o._statusCode, payload) -} - -func (o *DeleteGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteGroupDefault) 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/user/delete_groups_parameters.go b/v2/client/user/delete_groups_parameters.go deleted file mode 100644 index 5e626df9..00000000 --- a/v2/client/user/delete_groups_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDeleteGroupsParams creates a new DeleteGroupsParams 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 NewDeleteGroupsParams() *DeleteGroupsParams { - return &DeleteGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteGroupsParamsWithTimeout creates a new DeleteGroupsParams object -// with the ability to set a timeout on a request. -func NewDeleteGroupsParamsWithTimeout(timeout time.Duration) *DeleteGroupsParams { - return &DeleteGroupsParams{ - timeout: timeout, - } -} - -// NewDeleteGroupsParamsWithContext creates a new DeleteGroupsParams object -// with the ability to set a context for a request. -func NewDeleteGroupsParamsWithContext(ctx context.Context) *DeleteGroupsParams { - return &DeleteGroupsParams{ - Context: ctx, - } -} - -// NewDeleteGroupsParamsWithHTTPClient creates a new DeleteGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteGroupsParamsWithHTTPClient(client *http.Client) *DeleteGroupsParams { - return &DeleteGroupsParams{ - HTTPClient: client, - } -} - -/* -DeleteGroupsParams contains all the parameters to send to the API endpoint - - for the delete groups operation. - - Typically these are written to a http.Request. -*/ -type DeleteGroupsParams struct { - - /* Body. - - Specifies the delete request payload. - */ - Body *models.DeleteGroupsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupsParams) WithDefaults() *DeleteGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete groups params -func (o *DeleteGroupsParams) WithTimeout(timeout time.Duration) *DeleteGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete groups params -func (o *DeleteGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete groups params -func (o *DeleteGroupsParams) WithContext(ctx context.Context) *DeleteGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete groups params -func (o *DeleteGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete groups params -func (o *DeleteGroupsParams) WithHTTPClient(client *http.Client) *DeleteGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete groups params -func (o *DeleteGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete groups params -func (o *DeleteGroupsParams) WithBody(body *models.DeleteGroupsRequest) *DeleteGroupsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete groups params -func (o *DeleteGroupsParams) SetBody(body *models.DeleteGroupsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteGroupsParams) 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/user/delete_groups_responses.go b/v2/client/user/delete_groups_responses.go deleted file mode 100644 index 455400ef..00000000 --- a/v2/client/user/delete_groups_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteGroupsReader is a Reader for the DeleteGroups structure. -type DeleteGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteGroupsNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteGroupsDefault(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 - } -} - -// NewDeleteGroupsNoContent creates a DeleteGroupsNoContent with default headers values -func NewDeleteGroupsNoContent() *DeleteGroupsNoContent { - return &DeleteGroupsNoContent{} -} - -/* -DeleteGroupsNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteGroupsNoContent struct { -} - -// IsSuccess returns true when this delete groups no content response has a 2xx status code -func (o *DeleteGroupsNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete groups no content response has a 3xx status code -func (o *DeleteGroupsNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete groups no content response has a 4xx status code -func (o *DeleteGroupsNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete groups no content response has a 5xx status code -func (o *DeleteGroupsNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete groups no content response a status code equal to that given -func (o *DeleteGroupsNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete groups no content response -func (o *DeleteGroupsNoContent) Code() int { - return 204 -} - -func (o *DeleteGroupsNoContent) Error() string { - return fmt.Sprintf("[POST /groups/delete][%d] deleteGroupsNoContent", 204) -} - -func (o *DeleteGroupsNoContent) String() string { - return fmt.Sprintf("[POST /groups/delete][%d] deleteGroupsNoContent", 204) -} - -func (o *DeleteGroupsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteGroupsDefault creates a DeleteGroupsDefault with default headers values -func NewDeleteGroupsDefault(code int) *DeleteGroupsDefault { - return &DeleteGroupsDefault{ - _statusCode: code, - } -} - -/* -DeleteGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete groups default response has a 2xx status code -func (o *DeleteGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete groups default response has a 3xx status code -func (o *DeleteGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete groups default response has a 4xx status code -func (o *DeleteGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete groups default response has a 5xx status code -func (o *DeleteGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete groups default response a status code equal to that given -func (o *DeleteGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete groups default response -func (o *DeleteGroupsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups/delete][%d] DeleteGroups default %s", o._statusCode, payload) -} - -func (o *DeleteGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /groups/delete][%d] DeleteGroups default %s", o._statusCode, payload) -} - -func (o *DeleteGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteGroupsDefault) 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/user/delete_session_parameters.go b/v2/client/user/delete_session_parameters.go deleted file mode 100644 index 423268ad..00000000 --- a/v2/client/user/delete_session_parameters.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewDeleteSessionParams creates a new DeleteSessionParams 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 NewDeleteSessionParams() *DeleteSessionParams { - return &DeleteSessionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteSessionParamsWithTimeout creates a new DeleteSessionParams object -// with the ability to set a timeout on a request. -func NewDeleteSessionParamsWithTimeout(timeout time.Duration) *DeleteSessionParams { - return &DeleteSessionParams{ - timeout: timeout, - } -} - -// NewDeleteSessionParamsWithContext creates a new DeleteSessionParams object -// with the ability to set a context for a request. -func NewDeleteSessionParamsWithContext(ctx context.Context) *DeleteSessionParams { - return &DeleteSessionParams{ - Context: ctx, - } -} - -// NewDeleteSessionParamsWithHTTPClient creates a new DeleteSessionParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteSessionParamsWithHTTPClient(client *http.Client) *DeleteSessionParams { - return &DeleteSessionParams{ - HTTPClient: client, - } -} - -/* -DeleteSessionParams contains all the parameters to send to the API endpoint - - for the delete session operation. - - Typically these are written to a http.Request. -*/ -type DeleteSessionParams struct { - - /* Sid. - - Specifies a user sid. If sid is not given system wide sessions are deleted. - */ - Sid *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete session params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSessionParams) WithDefaults() *DeleteSessionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete session params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSessionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete session params -func (o *DeleteSessionParams) WithTimeout(timeout time.Duration) *DeleteSessionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete session params -func (o *DeleteSessionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete session params -func (o *DeleteSessionParams) WithContext(ctx context.Context) *DeleteSessionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete session params -func (o *DeleteSessionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete session params -func (o *DeleteSessionParams) WithHTTPClient(client *http.Client) *DeleteSessionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete session params -func (o *DeleteSessionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the delete session params -func (o *DeleteSessionParams) WithSid(sid *string) *DeleteSessionParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the delete session params -func (o *DeleteSessionParams) SetSid(sid *string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Sid != nil { - - // query param sid - var qrSid string - - if o.Sid != nil { - qrSid = *o.Sid - } - qSid := qrSid - if qSid != "" { - - if err := r.SetQueryParam("sid", qSid); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/delete_session_responses.go b/v2/client/user/delete_session_responses.go deleted file mode 100644 index dde0b323..00000000 --- a/v2/client/user/delete_session_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteSessionReader is a Reader for the DeleteSession structure. -type DeleteSessionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteSessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteSessionNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteSessionDefault(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 - } -} - -// NewDeleteSessionNoContent creates a DeleteSessionNoContent with default headers values -func NewDeleteSessionNoContent() *DeleteSessionNoContent { - return &DeleteSessionNoContent{} -} - -/* -DeleteSessionNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteSessionNoContent struct { -} - -// IsSuccess returns true when this delete session no content response has a 2xx status code -func (o *DeleteSessionNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete session no content response has a 3xx status code -func (o *DeleteSessionNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete session no content response has a 4xx status code -func (o *DeleteSessionNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete session no content response has a 5xx status code -func (o *DeleteSessionNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete session no content response a status code equal to that given -func (o *DeleteSessionNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete session no content response -func (o *DeleteSessionNoContent) Code() int { - return 204 -} - -func (o *DeleteSessionNoContent) Error() string { - return fmt.Sprintf("[DELETE /users/sessions][%d] deleteSessionNoContent", 204) -} - -func (o *DeleteSessionNoContent) String() string { - return fmt.Sprintf("[DELETE /users/sessions][%d] deleteSessionNoContent", 204) -} - -func (o *DeleteSessionNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteSessionDefault creates a DeleteSessionDefault with default headers values -func NewDeleteSessionDefault(code int) *DeleteSessionDefault { - return &DeleteSessionDefault{ - _statusCode: code, - } -} - -/* -DeleteSessionDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteSessionDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete session default response has a 2xx status code -func (o *DeleteSessionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete session default response has a 3xx status code -func (o *DeleteSessionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete session default response has a 4xx status code -func (o *DeleteSessionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete session default response has a 5xx status code -func (o *DeleteSessionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete session default response a status code equal to that given -func (o *DeleteSessionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete session default response -func (o *DeleteSessionDefault) Code() int { - return o._statusCode -} - -func (o *DeleteSessionDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/sessions][%d] DeleteSession default %s", o._statusCode, payload) -} - -func (o *DeleteSessionDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/sessions][%d] DeleteSession default %s", o._statusCode, payload) -} - -func (o *DeleteSessionDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteSessionDefault) 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/user/delete_user_api_key_by_id_parameters.go b/v2/client/user/delete_user_api_key_by_id_parameters.go deleted file mode 100644 index b7afb551..00000000 --- a/v2/client/user/delete_user_api_key_by_id_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewDeleteUserAPIKeyByIDParams creates a new DeleteUserAPIKeyByIDParams 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 NewDeleteUserAPIKeyByIDParams() *DeleteUserAPIKeyByIDParams { - return &DeleteUserAPIKeyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUserAPIKeyByIDParamsWithTimeout creates a new DeleteUserAPIKeyByIDParams object -// with the ability to set a timeout on a request. -func NewDeleteUserAPIKeyByIDParamsWithTimeout(timeout time.Duration) *DeleteUserAPIKeyByIDParams { - return &DeleteUserAPIKeyByIDParams{ - timeout: timeout, - } -} - -// NewDeleteUserAPIKeyByIDParamsWithContext creates a new DeleteUserAPIKeyByIDParams object -// with the ability to set a context for a request. -func NewDeleteUserAPIKeyByIDParamsWithContext(ctx context.Context) *DeleteUserAPIKeyByIDParams { - return &DeleteUserAPIKeyByIDParams{ - Context: ctx, - } -} - -// NewDeleteUserAPIKeyByIDParamsWithHTTPClient creates a new DeleteUserAPIKeyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUserAPIKeyByIDParamsWithHTTPClient(client *http.Client) *DeleteUserAPIKeyByIDParams { - return &DeleteUserAPIKeyByIDParams{ - HTTPClient: client, - } -} - -/* -DeleteUserAPIKeyByIDParams contains all the parameters to send to the API endpoint - - for the delete user API key by Id operation. - - Typically these are written to a http.Request. -*/ -type DeleteUserAPIKeyByIDParams struct { - - /* ID. - - Specify the id of the API key. - */ - ID string - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserAPIKeyByIDParams) WithDefaults() *DeleteUserAPIKeyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserAPIKeyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) WithTimeout(timeout time.Duration) *DeleteUserAPIKeyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) WithContext(ctx context.Context) *DeleteUserAPIKeyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) WithHTTPClient(client *http.Client) *DeleteUserAPIKeyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) WithID(id string) *DeleteUserAPIKeyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) SetID(id string) { - o.ID = id -} - -// WithUserSid adds the userSid to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) WithUserSid(userSid string) *DeleteUserAPIKeyByIDParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the delete user API key by Id params -func (o *DeleteUserAPIKeyByIDParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUserAPIKeyByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/delete_user_api_key_by_id_responses.go b/v2/client/user/delete_user_api_key_by_id_responses.go deleted file mode 100644 index da97649f..00000000 --- a/v2/client/user/delete_user_api_key_by_id_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteUserAPIKeyByIDReader is a Reader for the DeleteUserAPIKeyByID structure. -type DeleteUserAPIKeyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUserAPIKeyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUserAPIKeyByIDNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUserAPIKeyByIDDefault(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 - } -} - -// NewDeleteUserAPIKeyByIDNoContent creates a DeleteUserAPIKeyByIDNoContent with default headers values -func NewDeleteUserAPIKeyByIDNoContent() *DeleteUserAPIKeyByIDNoContent { - return &DeleteUserAPIKeyByIDNoContent{} -} - -/* -DeleteUserAPIKeyByIDNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUserAPIKeyByIDNoContent struct { -} - -// IsSuccess returns true when this delete user Api key by Id no content response has a 2xx status code -func (o *DeleteUserAPIKeyByIDNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete user Api key by Id no content response has a 3xx status code -func (o *DeleteUserAPIKeyByIDNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete user Api key by Id no content response has a 4xx status code -func (o *DeleteUserAPIKeyByIDNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete user Api key by Id no content response has a 5xx status code -func (o *DeleteUserAPIKeyByIDNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete user Api key by Id no content response a status code equal to that given -func (o *DeleteUserAPIKeyByIDNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete user Api key by Id no content response -func (o *DeleteUserAPIKeyByIDNoContent) Code() int { - return 204 -} - -func (o *DeleteUserAPIKeyByIDNoContent) Error() string { - return fmt.Sprintf("[DELETE /users/{userSid}/api-keys/{id}][%d] deleteUserApiKeyByIdNoContent", 204) -} - -func (o *DeleteUserAPIKeyByIDNoContent) String() string { - return fmt.Sprintf("[DELETE /users/{userSid}/api-keys/{id}][%d] deleteUserApiKeyByIdNoContent", 204) -} - -func (o *DeleteUserAPIKeyByIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUserAPIKeyByIDDefault creates a DeleteUserAPIKeyByIDDefault with default headers values -func NewDeleteUserAPIKeyByIDDefault(code int) *DeleteUserAPIKeyByIDDefault { - return &DeleteUserAPIKeyByIDDefault{ - _statusCode: code, - } -} - -/* -DeleteUserAPIKeyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUserAPIKeyByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete user API key by Id default response has a 2xx status code -func (o *DeleteUserAPIKeyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete user API key by Id default response has a 3xx status code -func (o *DeleteUserAPIKeyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete user API key by Id default response has a 4xx status code -func (o *DeleteUserAPIKeyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete user API key by Id default response has a 5xx status code -func (o *DeleteUserAPIKeyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete user API key by Id default response a status code equal to that given -func (o *DeleteUserAPIKeyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete user API key by Id default response -func (o *DeleteUserAPIKeyByIDDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUserAPIKeyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/{userSid}/api-keys/{id}][%d] DeleteUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *DeleteUserAPIKeyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/{userSid}/api-keys/{id}][%d] DeleteUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *DeleteUserAPIKeyByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteUserAPIKeyByIDDefault) 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/user/delete_user_parameters.go b/v2/client/user/delete_user_parameters.go deleted file mode 100644 index d24349f9..00000000 --- a/v2/client/user/delete_user_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewDeleteUserParams creates a new DeleteUserParams 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 NewDeleteUserParams() *DeleteUserParams { - return &DeleteUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUserParamsWithTimeout creates a new DeleteUserParams object -// with the ability to set a timeout on a request. -func NewDeleteUserParamsWithTimeout(timeout time.Duration) *DeleteUserParams { - return &DeleteUserParams{ - timeout: timeout, - } -} - -// NewDeleteUserParamsWithContext creates a new DeleteUserParams object -// with the ability to set a context for a request. -func NewDeleteUserParamsWithContext(ctx context.Context) *DeleteUserParams { - return &DeleteUserParams{ - Context: ctx, - } -} - -// NewDeleteUserParamsWithHTTPClient creates a new DeleteUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUserParamsWithHTTPClient(client *http.Client) *DeleteUserParams { - return &DeleteUserParams{ - HTTPClient: client, - } -} - -/* -DeleteUserParams contains all the parameters to send to the API endpoint - - for the delete user operation. - - Typically these are written to a http.Request. -*/ -type DeleteUserParams struct { - - /* Sid. - - Specify the SID of the user. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserParams) WithDefaults() *DeleteUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete user params -func (o *DeleteUserParams) WithTimeout(timeout time.Duration) *DeleteUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete user params -func (o *DeleteUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete user params -func (o *DeleteUserParams) WithContext(ctx context.Context) *DeleteUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete user params -func (o *DeleteUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete user params -func (o *DeleteUserParams) WithHTTPClient(client *http.Client) *DeleteUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete user params -func (o *DeleteUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the delete user params -func (o *DeleteUserParams) WithSid(sid string) *DeleteUserParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the delete user params -func (o *DeleteUserParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/delete_user_responses.go b/v2/client/user/delete_user_responses.go deleted file mode 100644 index aa94f525..00000000 --- a/v2/client/user/delete_user_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteUserReader is a Reader for the DeleteUser structure. -type DeleteUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUserNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUserDefault(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 - } -} - -// NewDeleteUserNoContent creates a DeleteUserNoContent with default headers values -func NewDeleteUserNoContent() *DeleteUserNoContent { - return &DeleteUserNoContent{} -} - -/* -DeleteUserNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUserNoContent struct { -} - -// IsSuccess returns true when this delete user no content response has a 2xx status code -func (o *DeleteUserNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete user no content response has a 3xx status code -func (o *DeleteUserNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete user no content response has a 4xx status code -func (o *DeleteUserNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete user no content response has a 5xx status code -func (o *DeleteUserNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete user no content response a status code equal to that given -func (o *DeleteUserNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete user no content response -func (o *DeleteUserNoContent) Code() int { - return 204 -} - -func (o *DeleteUserNoContent) Error() string { - return fmt.Sprintf("[DELETE /users/{sid}][%d] deleteUserNoContent", 204) -} - -func (o *DeleteUserNoContent) String() string { - return fmt.Sprintf("[DELETE /users/{sid}][%d] deleteUserNoContent", 204) -} - -func (o *DeleteUserNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUserDefault creates a DeleteUserDefault with default headers values -func NewDeleteUserDefault(code int) *DeleteUserDefault { - return &DeleteUserDefault{ - _statusCode: code, - } -} - -/* -DeleteUserDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUserDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete user default response has a 2xx status code -func (o *DeleteUserDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete user default response has a 3xx status code -func (o *DeleteUserDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete user default response has a 4xx status code -func (o *DeleteUserDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete user default response has a 5xx status code -func (o *DeleteUserDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete user default response a status code equal to that given -func (o *DeleteUserDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete user default response -func (o *DeleteUserDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUserDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/{sid}][%d] DeleteUser default %s", o._statusCode, payload) -} - -func (o *DeleteUserDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /users/{sid}][%d] DeleteUser default %s", o._statusCode, payload) -} - -func (o *DeleteUserDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteUserDefault) 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/user/delete_users_parameters.go b/v2/client/user/delete_users_parameters.go deleted file mode 100644 index 4d0a3235..00000000 --- a/v2/client/user/delete_users_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDeleteUsersParams creates a new DeleteUsersParams 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 NewDeleteUsersParams() *DeleteUsersParams { - return &DeleteUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteUsersParamsWithTimeout creates a new DeleteUsersParams object -// with the ability to set a timeout on a request. -func NewDeleteUsersParamsWithTimeout(timeout time.Duration) *DeleteUsersParams { - return &DeleteUsersParams{ - timeout: timeout, - } -} - -// NewDeleteUsersParamsWithContext creates a new DeleteUsersParams object -// with the ability to set a context for a request. -func NewDeleteUsersParamsWithContext(ctx context.Context) *DeleteUsersParams { - return &DeleteUsersParams{ - Context: ctx, - } -} - -// NewDeleteUsersParamsWithHTTPClient creates a new DeleteUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteUsersParamsWithHTTPClient(client *http.Client) *DeleteUsersParams { - return &DeleteUsersParams{ - HTTPClient: client, - } -} - -/* -DeleteUsersParams contains all the parameters to send to the API endpoint - - for the delete users operation. - - Typically these are written to a http.Request. -*/ -type DeleteUsersParams struct { - - /* Body. - - If the Cohesity user was created against an Active Directory/IdP user, the referenced principal user on the Active Directory/IdP domain is NOT deleted. Only the user on the Cohesity Cluster is deleted. - */ - Body *models.DeleteUsersRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUsersParams) WithDefaults() *DeleteUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete users params -func (o *DeleteUsersParams) WithTimeout(timeout time.Duration) *DeleteUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete users params -func (o *DeleteUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete users params -func (o *DeleteUsersParams) WithContext(ctx context.Context) *DeleteUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete users params -func (o *DeleteUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete users params -func (o *DeleteUsersParams) WithHTTPClient(client *http.Client) *DeleteUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete users params -func (o *DeleteUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete users params -func (o *DeleteUsersParams) WithBody(body *models.DeleteUsersRequest) *DeleteUsersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete users params -func (o *DeleteUsersParams) SetBody(body *models.DeleteUsersRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteUsersParams) 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/user/delete_users_responses.go b/v2/client/user/delete_users_responses.go deleted file mode 100644 index 999a8ef9..00000000 --- a/v2/client/user/delete_users_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteUsersReader is a Reader for the DeleteUsers structure. -type DeleteUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteUsersNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteUsersDefault(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 - } -} - -// NewDeleteUsersNoContent creates a DeleteUsersNoContent with default headers values -func NewDeleteUsersNoContent() *DeleteUsersNoContent { - return &DeleteUsersNoContent{} -} - -/* -DeleteUsersNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteUsersNoContent struct { -} - -// IsSuccess returns true when this delete users no content response has a 2xx status code -func (o *DeleteUsersNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete users no content response has a 3xx status code -func (o *DeleteUsersNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete users no content response has a 4xx status code -func (o *DeleteUsersNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete users no content response has a 5xx status code -func (o *DeleteUsersNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete users no content response a status code equal to that given -func (o *DeleteUsersNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete users no content response -func (o *DeleteUsersNoContent) Code() int { - return 204 -} - -func (o *DeleteUsersNoContent) Error() string { - return fmt.Sprintf("[POST /users/delete][%d] deleteUsersNoContent", 204) -} - -func (o *DeleteUsersNoContent) String() string { - return fmt.Sprintf("[POST /users/delete][%d] deleteUsersNoContent", 204) -} - -func (o *DeleteUsersNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteUsersDefault creates a DeleteUsersDefault with default headers values -func NewDeleteUsersDefault(code int) *DeleteUsersDefault { - return &DeleteUsersDefault{ - _statusCode: code, - } -} - -/* -DeleteUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteUsersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete users default response has a 2xx status code -func (o *DeleteUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete users default response has a 3xx status code -func (o *DeleteUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete users default response has a 4xx status code -func (o *DeleteUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete users default response has a 5xx status code -func (o *DeleteUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete users default response a status code equal to that given -func (o *DeleteUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete users default response -func (o *DeleteUsersDefault) Code() int { - return o._statusCode -} - -func (o *DeleteUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/delete][%d] DeleteUsers default %s", o._statusCode, payload) -} - -func (o *DeleteUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/delete][%d] DeleteUsers default %s", o._statusCode, payload) -} - -func (o *DeleteUsersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteUsersDefault) 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/user/get_active_sessions_count_parameters.go b/v2/client/user/get_active_sessions_count_parameters.go deleted file mode 100644 index 440ccb0f..00000000 --- a/v2/client/user/get_active_sessions_count_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetActiveSessionsCountParams creates a new GetActiveSessionsCountParams 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 NewGetActiveSessionsCountParams() *GetActiveSessionsCountParams { - return &GetActiveSessionsCountParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetActiveSessionsCountParamsWithTimeout creates a new GetActiveSessionsCountParams object -// with the ability to set a timeout on a request. -func NewGetActiveSessionsCountParamsWithTimeout(timeout time.Duration) *GetActiveSessionsCountParams { - return &GetActiveSessionsCountParams{ - timeout: timeout, - } -} - -// NewGetActiveSessionsCountParamsWithContext creates a new GetActiveSessionsCountParams object -// with the ability to set a context for a request. -func NewGetActiveSessionsCountParamsWithContext(ctx context.Context) *GetActiveSessionsCountParams { - return &GetActiveSessionsCountParams{ - Context: ctx, - } -} - -// NewGetActiveSessionsCountParamsWithHTTPClient creates a new GetActiveSessionsCountParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetActiveSessionsCountParamsWithHTTPClient(client *http.Client) *GetActiveSessionsCountParams { - return &GetActiveSessionsCountParams{ - HTTPClient: client, - } -} - -/* -GetActiveSessionsCountParams contains all the parameters to send to the API endpoint - - for the get active sessions count operation. - - Typically these are written to a http.Request. -*/ -type GetActiveSessionsCountParams struct { - - /* Sids. - - Filter sessions based on user sids. - */ - Sids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get active sessions count params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveSessionsCountParams) WithDefaults() *GetActiveSessionsCountParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get active sessions count params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetActiveSessionsCountParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get active sessions count params -func (o *GetActiveSessionsCountParams) WithTimeout(timeout time.Duration) *GetActiveSessionsCountParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get active sessions count params -func (o *GetActiveSessionsCountParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get active sessions count params -func (o *GetActiveSessionsCountParams) WithContext(ctx context.Context) *GetActiveSessionsCountParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get active sessions count params -func (o *GetActiveSessionsCountParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get active sessions count params -func (o *GetActiveSessionsCountParams) WithHTTPClient(client *http.Client) *GetActiveSessionsCountParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get active sessions count params -func (o *GetActiveSessionsCountParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSids adds the sids to the get active sessions count params -func (o *GetActiveSessionsCountParams) WithSids(sids []string) *GetActiveSessionsCountParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the get active sessions count params -func (o *GetActiveSessionsCountParams) SetSids(sids []string) { - o.Sids = sids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetActiveSessionsCountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetActiveSessionsCount binds the parameter sids -func (o *GetActiveSessionsCountParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} diff --git a/v2/client/user/get_active_sessions_count_responses.go b/v2/client/user/get_active_sessions_count_responses.go deleted file mode 100644 index 0ce3ecd4..00000000 --- a/v2/client/user/get_active_sessions_count_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetActiveSessionsCountReader is a Reader for the GetActiveSessionsCount structure. -type GetActiveSessionsCountReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetActiveSessionsCountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetActiveSessionsCountOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetActiveSessionsCountDefault(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 - } -} - -// NewGetActiveSessionsCountOK creates a GetActiveSessionsCountOK with default headers values -func NewGetActiveSessionsCountOK() *GetActiveSessionsCountOK { - return &GetActiveSessionsCountOK{} -} - -/* -GetActiveSessionsCountOK describes a response with status code 200, with default header values. - -Success -*/ -type GetActiveSessionsCountOK struct { - Payload *models.ActiveSessionsCountParams -} - -// IsSuccess returns true when this get active sessions count o k response has a 2xx status code -func (o *GetActiveSessionsCountOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get active sessions count o k response has a 3xx status code -func (o *GetActiveSessionsCountOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get active sessions count o k response has a 4xx status code -func (o *GetActiveSessionsCountOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get active sessions count o k response has a 5xx status code -func (o *GetActiveSessionsCountOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get active sessions count o k response a status code equal to that given -func (o *GetActiveSessionsCountOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get active sessions count o k response -func (o *GetActiveSessionsCountOK) Code() int { - return 200 -} - -func (o *GetActiveSessionsCountOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/sessions][%d] getActiveSessionsCountOK %s", 200, payload) -} - -func (o *GetActiveSessionsCountOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/sessions][%d] getActiveSessionsCountOK %s", 200, payload) -} - -func (o *GetActiveSessionsCountOK) GetPayload() *models.ActiveSessionsCountParams { - return o.Payload -} - -func (o *GetActiveSessionsCountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ActiveSessionsCountParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetActiveSessionsCountDefault creates a GetActiveSessionsCountDefault with default headers values -func NewGetActiveSessionsCountDefault(code int) *GetActiveSessionsCountDefault { - return &GetActiveSessionsCountDefault{ - _statusCode: code, - } -} - -/* -GetActiveSessionsCountDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetActiveSessionsCountDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get active sessions count default response has a 2xx status code -func (o *GetActiveSessionsCountDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get active sessions count default response has a 3xx status code -func (o *GetActiveSessionsCountDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get active sessions count default response has a 4xx status code -func (o *GetActiveSessionsCountDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get active sessions count default response has a 5xx status code -func (o *GetActiveSessionsCountDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get active sessions count default response a status code equal to that given -func (o *GetActiveSessionsCountDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get active sessions count default response -func (o *GetActiveSessionsCountDefault) Code() int { - return o._statusCode -} - -func (o *GetActiveSessionsCountDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/sessions][%d] GetActiveSessionsCount default %s", o._statusCode, payload) -} - -func (o *GetActiveSessionsCountDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/sessions][%d] GetActiveSessionsCount default %s", o._statusCode, payload) -} - -func (o *GetActiveSessionsCountDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetActiveSessionsCountDefault) 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/user/get_all_api_keys_parameters.go b/v2/client/user/get_all_api_keys_parameters.go deleted file mode 100644 index c089b083..00000000 --- a/v2/client/user/get_all_api_keys_parameters.go +++ /dev/null @@ -1,288 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetAllAPIKeysParams creates a new GetAllAPIKeysParams 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 NewGetAllAPIKeysParams() *GetAllAPIKeysParams { - return &GetAllAPIKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAllAPIKeysParamsWithTimeout creates a new GetAllAPIKeysParams object -// with the ability to set a timeout on a request. -func NewGetAllAPIKeysParamsWithTimeout(timeout time.Duration) *GetAllAPIKeysParams { - return &GetAllAPIKeysParams{ - timeout: timeout, - } -} - -// NewGetAllAPIKeysParamsWithContext creates a new GetAllAPIKeysParams object -// with the ability to set a context for a request. -func NewGetAllAPIKeysParamsWithContext(ctx context.Context) *GetAllAPIKeysParams { - return &GetAllAPIKeysParams{ - Context: ctx, - } -} - -// NewGetAllAPIKeysParamsWithHTTPClient creates a new GetAllAPIKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAllAPIKeysParamsWithHTTPClient(client *http.Client) *GetAllAPIKeysParams { - return &GetAllAPIKeysParams{ - HTTPClient: client, - } -} - -/* -GetAllAPIKeysParams contains all the parameters to send to the API endpoint - - for the get all API keys operation. - - Typically these are written to a http.Request. -*/ -type GetAllAPIKeysParams struct { - - /* Ids. - - Filter by API Key Ids - */ - Ids []string - - /* IsActive. - - If true, the response will only include API keys which are active. Returns all keys if the query param is not set. - */ - IsActive *bool - - /* IsExpired. - - If true, the response will only include API keys which has been expired. Returns all keys if the query param is not set. - */ - IsExpired *bool - - /* OwnerSids. - - Filter by list of owner (user) SIDs - */ - OwnerSids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get all API keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllAPIKeysParams) WithDefaults() *GetAllAPIKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get all API keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAllAPIKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get all API keys params -func (o *GetAllAPIKeysParams) WithTimeout(timeout time.Duration) *GetAllAPIKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get all API keys params -func (o *GetAllAPIKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get all API keys params -func (o *GetAllAPIKeysParams) WithContext(ctx context.Context) *GetAllAPIKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get all API keys params -func (o *GetAllAPIKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get all API keys params -func (o *GetAllAPIKeysParams) WithHTTPClient(client *http.Client) *GetAllAPIKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get all API keys params -func (o *GetAllAPIKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get all API keys params -func (o *GetAllAPIKeysParams) WithIds(ids []string) *GetAllAPIKeysParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get all API keys params -func (o *GetAllAPIKeysParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIsActive adds the isActive to the get all API keys params -func (o *GetAllAPIKeysParams) WithIsActive(isActive *bool) *GetAllAPIKeysParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get all API keys params -func (o *GetAllAPIKeysParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsExpired adds the isExpired to the get all API keys params -func (o *GetAllAPIKeysParams) WithIsExpired(isExpired *bool) *GetAllAPIKeysParams { - o.SetIsExpired(isExpired) - return o -} - -// SetIsExpired adds the isExpired to the get all API keys params -func (o *GetAllAPIKeysParams) SetIsExpired(isExpired *bool) { - o.IsExpired = isExpired -} - -// WithOwnerSids adds the ownerSids to the get all API keys params -func (o *GetAllAPIKeysParams) WithOwnerSids(ownerSids []string) *GetAllAPIKeysParams { - o.SetOwnerSids(ownerSids) - return o -} - -// SetOwnerSids adds the ownerSids to the get all API keys params -func (o *GetAllAPIKeysParams) SetOwnerSids(ownerSids []string) { - o.OwnerSids = ownerSids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAllAPIKeysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsExpired != nil { - - // query param isExpired - var qrIsExpired bool - - if o.IsExpired != nil { - qrIsExpired = *o.IsExpired - } - qIsExpired := swag.FormatBool(qrIsExpired) - if qIsExpired != "" { - - if err := r.SetQueryParam("isExpired", qIsExpired); err != nil { - return err - } - } - } - - if o.OwnerSids != nil { - - // binding items for ownerSids - joinedOwnerSids := o.bindParamOwnerSids(reg) - - // query array param ownerSids - if err := r.SetQueryParam("ownerSids", joinedOwnerSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAllAPIKeys binds the parameter ids -func (o *GetAllAPIKeysParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} - -// bindParamGetAllAPIKeys binds the parameter ownerSids -func (o *GetAllAPIKeysParams) bindParamOwnerSids(formats strfmt.Registry) []string { - ownerSidsIR := o.OwnerSids - - var ownerSidsIC []string - for _, ownerSidsIIR := range ownerSidsIR { // explode []string - - ownerSidsIIV := ownerSidsIIR // string as string - ownerSidsIC = append(ownerSidsIC, ownerSidsIIV) - } - - // items.CollectionFormat: "" - ownerSidsIS := swag.JoinByFormat(ownerSidsIC, "") - - return ownerSidsIS -} diff --git a/v2/client/user/get_all_api_keys_responses.go b/v2/client/user/get_all_api_keys_responses.go deleted file mode 100644 index a0bc9fee..00000000 --- a/v2/client/user/get_all_api_keys_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetAllAPIKeysReader is a Reader for the GetAllAPIKeys structure. -type GetAllAPIKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAllAPIKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAllAPIKeysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetAllAPIKeysDefault(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 - } -} - -// NewGetAllAPIKeysOK creates a GetAllAPIKeysOK with default headers values -func NewGetAllAPIKeysOK() *GetAllAPIKeysOK { - return &GetAllAPIKeysOK{} -} - -/* -GetAllAPIKeysOK describes a response with status code 200, with default header values. - -Success -*/ -type GetAllAPIKeysOK struct { - Payload *models.UserAPIKeys -} - -// IsSuccess returns true when this get all Api keys o k response has a 2xx status code -func (o *GetAllAPIKeysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get all Api keys o k response has a 3xx status code -func (o *GetAllAPIKeysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get all Api keys o k response has a 4xx status code -func (o *GetAllAPIKeysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get all Api keys o k response has a 5xx status code -func (o *GetAllAPIKeysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get all Api keys o k response a status code equal to that given -func (o *GetAllAPIKeysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get all Api keys o k response -func (o *GetAllAPIKeysOK) Code() int { - return 200 -} - -func (o *GetAllAPIKeysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /api-keys][%d] getAllApiKeysOK %s", 200, payload) -} - -func (o *GetAllAPIKeysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /api-keys][%d] getAllApiKeysOK %s", 200, payload) -} - -func (o *GetAllAPIKeysOK) GetPayload() *models.UserAPIKeys { - return o.Payload -} - -func (o *GetAllAPIKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserAPIKeys) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAllAPIKeysDefault creates a GetAllAPIKeysDefault with default headers values -func NewGetAllAPIKeysDefault(code int) *GetAllAPIKeysDefault { - return &GetAllAPIKeysDefault{ - _statusCode: code, - } -} - -/* -GetAllAPIKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetAllAPIKeysDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get all API keys default response has a 2xx status code -func (o *GetAllAPIKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get all API keys default response has a 3xx status code -func (o *GetAllAPIKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get all API keys default response has a 4xx status code -func (o *GetAllAPIKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get all API keys default response has a 5xx status code -func (o *GetAllAPIKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get all API keys default response a status code equal to that given -func (o *GetAllAPIKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get all API keys default response -func (o *GetAllAPIKeysDefault) Code() int { - return o._statusCode -} - -func (o *GetAllAPIKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /api-keys][%d] GetAllAPIKeys default %s", o._statusCode, payload) -} - -func (o *GetAllAPIKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /api-keys][%d] GetAllAPIKeys default %s", o._statusCode, payload) -} - -func (o *GetAllAPIKeysDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetAllAPIKeysDefault) 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/user/get_group_by_s_id_parameters.go b/v2/client/user/get_group_by_s_id_parameters.go deleted file mode 100644 index bf348c06..00000000 --- a/v2/client/user/get_group_by_s_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewGetGroupBySIDParams creates a new GetGroupBySIDParams 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 NewGetGroupBySIDParams() *GetGroupBySIDParams { - return &GetGroupBySIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetGroupBySIDParamsWithTimeout creates a new GetGroupBySIDParams object -// with the ability to set a timeout on a request. -func NewGetGroupBySIDParamsWithTimeout(timeout time.Duration) *GetGroupBySIDParams { - return &GetGroupBySIDParams{ - timeout: timeout, - } -} - -// NewGetGroupBySIDParamsWithContext creates a new GetGroupBySIDParams object -// with the ability to set a context for a request. -func NewGetGroupBySIDParamsWithContext(ctx context.Context) *GetGroupBySIDParams { - return &GetGroupBySIDParams{ - Context: ctx, - } -} - -// NewGetGroupBySIDParamsWithHTTPClient creates a new GetGroupBySIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetGroupBySIDParamsWithHTTPClient(client *http.Client) *GetGroupBySIDParams { - return &GetGroupBySIDParams{ - HTTPClient: client, - } -} - -/* -GetGroupBySIDParams contains all the parameters to send to the API endpoint - - for the get group by s ID operation. - - Typically these are written to a http.Request. -*/ -type GetGroupBySIDParams struct { - - /* Sid. - - Specify the SID of the group. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get group by s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupBySIDParams) WithDefaults() *GetGroupBySIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get group by s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupBySIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get group by s ID params -func (o *GetGroupBySIDParams) WithTimeout(timeout time.Duration) *GetGroupBySIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get group by s ID params -func (o *GetGroupBySIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get group by s ID params -func (o *GetGroupBySIDParams) WithContext(ctx context.Context) *GetGroupBySIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get group by s ID params -func (o *GetGroupBySIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get group by s ID params -func (o *GetGroupBySIDParams) WithHTTPClient(client *http.Client) *GetGroupBySIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get group by s ID params -func (o *GetGroupBySIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the get group by s ID params -func (o *GetGroupBySIDParams) WithSid(sid string) *GetGroupBySIDParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get group by s ID params -func (o *GetGroupBySIDParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetGroupBySIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/get_group_by_s_id_responses.go b/v2/client/user/get_group_by_s_id_responses.go deleted file mode 100644 index 461dd5c1..00000000 --- a/v2/client/user/get_group_by_s_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetGroupBySIDReader is a Reader for the GetGroupBySID structure. -type GetGroupBySIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetGroupBySIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetGroupBySIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetGroupBySIDDefault(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 - } -} - -// NewGetGroupBySIDOK creates a GetGroupBySIDOK with default headers values -func NewGetGroupBySIDOK() *GetGroupBySIDOK { - return &GetGroupBySIDOK{} -} - -/* -GetGroupBySIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetGroupBySIDOK struct { - Payload *models.GroupParams -} - -// IsSuccess returns true when this get group by s Id o k response has a 2xx status code -func (o *GetGroupBySIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get group by s Id o k response has a 3xx status code -func (o *GetGroupBySIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get group by s Id o k response has a 4xx status code -func (o *GetGroupBySIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get group by s Id o k response has a 5xx status code -func (o *GetGroupBySIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get group by s Id o k response a status code equal to that given -func (o *GetGroupBySIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get group by s Id o k response -func (o *GetGroupBySIDOK) Code() int { - return 200 -} - -func (o *GetGroupBySIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups/{sid}][%d] getGroupBySIdOK %s", 200, payload) -} - -func (o *GetGroupBySIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups/{sid}][%d] getGroupBySIdOK %s", 200, payload) -} - -func (o *GetGroupBySIDOK) GetPayload() *models.GroupParams { - return o.Payload -} - -func (o *GetGroupBySIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GroupParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetGroupBySIDDefault creates a GetGroupBySIDDefault with default headers values -func NewGetGroupBySIDDefault(code int) *GetGroupBySIDDefault { - return &GetGroupBySIDDefault{ - _statusCode: code, - } -} - -/* -GetGroupBySIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetGroupBySIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get group by s ID default response has a 2xx status code -func (o *GetGroupBySIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get group by s ID default response has a 3xx status code -func (o *GetGroupBySIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get group by s ID default response has a 4xx status code -func (o *GetGroupBySIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get group by s ID default response has a 5xx status code -func (o *GetGroupBySIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get group by s ID default response a status code equal to that given -func (o *GetGroupBySIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get group by s ID default response -func (o *GetGroupBySIDDefault) Code() int { - return o._statusCode -} - -func (o *GetGroupBySIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups/{sid}][%d] GetGroupBySID default %s", o._statusCode, payload) -} - -func (o *GetGroupBySIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups/{sid}][%d] GetGroupBySID default %s", o._statusCode, payload) -} - -func (o *GetGroupBySIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetGroupBySIDDefault) 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/user/get_groups_parameters.go b/v2/client/user/get_groups_parameters.go deleted file mode 100644 index 13f5b25e..00000000 --- a/v2/client/user/get_groups_parameters.go +++ /dev/null @@ -1,412 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetGroupsParams creates a new GetGroupsParams 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 NewGetGroupsParams() *GetGroupsParams { - return &GetGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetGroupsParamsWithTimeout creates a new GetGroupsParams object -// with the ability to set a timeout on a request. -func NewGetGroupsParamsWithTimeout(timeout time.Duration) *GetGroupsParams { - return &GetGroupsParams{ - timeout: timeout, - } -} - -// NewGetGroupsParamsWithContext creates a new GetGroupsParams object -// with the ability to set a context for a request. -func NewGetGroupsParamsWithContext(ctx context.Context) *GetGroupsParams { - return &GetGroupsParams{ - Context: ctx, - } -} - -// NewGetGroupsParamsWithHTTPClient creates a new GetGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetGroupsParamsWithHTTPClient(client *http.Client) *GetGroupsParams { - return &GetGroupsParams{ - HTTPClient: client, - } -} - -/* -GetGroupsParams contains all the parameters to send to the API endpoint - - for the get groups operation. - - Typically these are written to a http.Request. -*/ -type GetGroupsParams struct { - - /* Domain. - - Specifies the group domain to filter. - */ - Domain *string - - /* IncludeTenants. - - IncludeTenants specifies if groups of all the tenants under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* MatchPartialNames. - - If true, the names in group names are matched by any partial rather than exactly matched. Default is false. - */ - MatchPartialNames *bool - - /* Names. - - Specifies a list of group names to filter. - */ - Names []string - - /* Roles. - - Specifies a list of roles to filter. - */ - Roles []string - - /* Sids. - - Specifies a list of sids to filter. - */ - Sids []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which groups are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupsParams) WithDefaults() *GetGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetGroupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get groups params -func (o *GetGroupsParams) WithTimeout(timeout time.Duration) *GetGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get groups params -func (o *GetGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get groups params -func (o *GetGroupsParams) WithContext(ctx context.Context) *GetGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get groups params -func (o *GetGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get groups params -func (o *GetGroupsParams) WithHTTPClient(client *http.Client) *GetGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get groups params -func (o *GetGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomain adds the domain to the get groups params -func (o *GetGroupsParams) WithDomain(domain *string) *GetGroupsParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the get groups params -func (o *GetGroupsParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithIncludeTenants adds the includeTenants to the get groups params -func (o *GetGroupsParams) WithIncludeTenants(includeTenants *bool) *GetGroupsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get groups params -func (o *GetGroupsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMatchPartialNames adds the matchPartialNames to the get groups params -func (o *GetGroupsParams) WithMatchPartialNames(matchPartialNames *bool) *GetGroupsParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get groups params -func (o *GetGroupsParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithNames adds the names to the get groups params -func (o *GetGroupsParams) WithNames(names []string) *GetGroupsParams { - o.SetNames(names) - return o -} - -// SetNames adds the names to the get groups params -func (o *GetGroupsParams) SetNames(names []string) { - o.Names = names -} - -// WithRoles adds the roles to the get groups params -func (o *GetGroupsParams) WithRoles(roles []string) *GetGroupsParams { - o.SetRoles(roles) - return o -} - -// SetRoles adds the roles to the get groups params -func (o *GetGroupsParams) SetRoles(roles []string) { - o.Roles = roles -} - -// WithSids adds the sids to the get groups params -func (o *GetGroupsParams) WithSids(sids []string) *GetGroupsParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the get groups params -func (o *GetGroupsParams) SetSids(sids []string) { - o.Sids = sids -} - -// WithTenantIds adds the tenantIds to the get groups params -func (o *GetGroupsParams) WithTenantIds(tenantIds []string) *GetGroupsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get groups params -func (o *GetGroupsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); 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.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.Names != nil { - - // binding items for names - joinedNames := o.bindParamNames(reg) - - // query array param names - if err := r.SetQueryParam("names", joinedNames...); err != nil { - return err - } - } - - if o.Roles != nil { - - // binding items for roles - joinedRoles := o.bindParamRoles(reg) - - // query array param roles - if err := r.SetQueryParam("roles", joinedRoles...); err != nil { - return err - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetGroups binds the parameter names -func (o *GetGroupsParams) bindParamNames(formats strfmt.Registry) []string { - namesIR := o.Names - - var namesIC []string - for _, namesIIR := range namesIR { // explode []string - - namesIIV := namesIIR // string as string - namesIC = append(namesIC, namesIIV) - } - - // items.CollectionFormat: "" - namesIS := swag.JoinByFormat(namesIC, "") - - return namesIS -} - -// bindParamGetGroups binds the parameter roles -func (o *GetGroupsParams) bindParamRoles(formats strfmt.Registry) []string { - rolesIR := o.Roles - - var rolesIC []string - for _, rolesIIR := range rolesIR { // explode []string - - rolesIIV := rolesIIR // string as string - rolesIC = append(rolesIC, rolesIIV) - } - - // items.CollectionFormat: "" - rolesIS := swag.JoinByFormat(rolesIC, "") - - return rolesIS -} - -// bindParamGetGroups binds the parameter sids -func (o *GetGroupsParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} - -// bindParamGetGroups binds the parameter tenantIds -func (o *GetGroupsParams) 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/client/user/get_groups_responses.go b/v2/client/user/get_groups_responses.go deleted file mode 100644 index 32d89942..00000000 --- a/v2/client/user/get_groups_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetGroupsReader is a Reader for the GetGroups structure. -type GetGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetGroupsDefault(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 - } -} - -// NewGetGroupsOK creates a GetGroupsOK with default headers values -func NewGetGroupsOK() *GetGroupsOK { - return &GetGroupsOK{} -} - -/* -GetGroupsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetGroupsOK struct { - Payload *models.Groups -} - -// IsSuccess returns true when this get groups o k response has a 2xx status code -func (o *GetGroupsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get groups o k response has a 3xx status code -func (o *GetGroupsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get groups o k response has a 4xx status code -func (o *GetGroupsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get groups o k response has a 5xx status code -func (o *GetGroupsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get groups o k response a status code equal to that given -func (o *GetGroupsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get groups o k response -func (o *GetGroupsOK) Code() int { - return 200 -} - -func (o *GetGroupsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups][%d] getGroupsOK %s", 200, payload) -} - -func (o *GetGroupsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups][%d] getGroupsOK %s", 200, payload) -} - -func (o *GetGroupsOK) GetPayload() *models.Groups { - return o.Payload -} - -func (o *GetGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Groups) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetGroupsDefault creates a GetGroupsDefault with default headers values -func NewGetGroupsDefault(code int) *GetGroupsDefault { - return &GetGroupsDefault{ - _statusCode: code, - } -} - -/* -GetGroupsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetGroupsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get groups default response has a 2xx status code -func (o *GetGroupsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get groups default response has a 3xx status code -func (o *GetGroupsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get groups default response has a 4xx status code -func (o *GetGroupsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get groups default response has a 5xx status code -func (o *GetGroupsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get groups default response a status code equal to that given -func (o *GetGroupsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get groups default response -func (o *GetGroupsDefault) Code() int { - return o._statusCode -} - -func (o *GetGroupsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups][%d] GetGroups default %s", o._statusCode, payload) -} - -func (o *GetGroupsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /groups][%d] GetGroups default %s", o._statusCode, payload) -} - -func (o *GetGroupsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetGroupsDefault) 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/user/get_principal_sources_parameters.go b/v2/client/user/get_principal_sources_parameters.go deleted file mode 100644 index a3e61988..00000000 --- a/v2/client/user/get_principal_sources_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewGetPrincipalSourcesParams creates a new GetPrincipalSourcesParams 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 NewGetPrincipalSourcesParams() *GetPrincipalSourcesParams { - return &GetPrincipalSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPrincipalSourcesParamsWithTimeout creates a new GetPrincipalSourcesParams object -// with the ability to set a timeout on a request. -func NewGetPrincipalSourcesParamsWithTimeout(timeout time.Duration) *GetPrincipalSourcesParams { - return &GetPrincipalSourcesParams{ - timeout: timeout, - } -} - -// NewGetPrincipalSourcesParamsWithContext creates a new GetPrincipalSourcesParams object -// with the ability to set a context for a request. -func NewGetPrincipalSourcesParamsWithContext(ctx context.Context) *GetPrincipalSourcesParams { - return &GetPrincipalSourcesParams{ - Context: ctx, - } -} - -// NewGetPrincipalSourcesParamsWithHTTPClient creates a new GetPrincipalSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPrincipalSourcesParamsWithHTTPClient(client *http.Client) *GetPrincipalSourcesParams { - return &GetPrincipalSourcesParams{ - HTTPClient: client, - } -} - -/* -GetPrincipalSourcesParams contains all the parameters to send to the API endpoint - - for the get principal sources operation. - - Typically these are written to a http.Request. -*/ -type GetPrincipalSourcesParams struct { - - /* Sid. - - Specify the SID of the principal. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get principal sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrincipalSourcesParams) WithDefaults() *GetPrincipalSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get principal sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrincipalSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get principal sources params -func (o *GetPrincipalSourcesParams) WithTimeout(timeout time.Duration) *GetPrincipalSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get principal sources params -func (o *GetPrincipalSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get principal sources params -func (o *GetPrincipalSourcesParams) WithContext(ctx context.Context) *GetPrincipalSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get principal sources params -func (o *GetPrincipalSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get principal sources params -func (o *GetPrincipalSourcesParams) WithHTTPClient(client *http.Client) *GetPrincipalSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get principal sources params -func (o *GetPrincipalSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the get principal sources params -func (o *GetPrincipalSourcesParams) WithSid(sid string) *GetPrincipalSourcesParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get principal sources params -func (o *GetPrincipalSourcesParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPrincipalSourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/get_principal_sources_responses.go b/v2/client/user/get_principal_sources_responses.go deleted file mode 100644 index d421faef..00000000 --- a/v2/client/user/get_principal_sources_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetPrincipalSourcesReader is a Reader for the GetPrincipalSources structure. -type GetPrincipalSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPrincipalSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPrincipalSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPrincipalSourcesDefault(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 - } -} - -// NewGetPrincipalSourcesOK creates a GetPrincipalSourcesOK with default headers values -func NewGetPrincipalSourcesOK() *GetPrincipalSourcesOK { - return &GetPrincipalSourcesOK{} -} - -/* -GetPrincipalSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPrincipalSourcesOK struct { - Payload *models.AssignedSources -} - -// IsSuccess returns true when this get principal sources o k response has a 2xx status code -func (o *GetPrincipalSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get principal sources o k response has a 3xx status code -func (o *GetPrincipalSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get principal sources o k response has a 4xx status code -func (o *GetPrincipalSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get principal sources o k response has a 5xx status code -func (o *GetPrincipalSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get principal sources o k response a status code equal to that given -func (o *GetPrincipalSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get principal sources o k response -func (o *GetPrincipalSourcesOK) Code() int { - return 200 -} - -func (o *GetPrincipalSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals/{sid}/sources][%d] getPrincipalSourcesOK %s", 200, payload) -} - -func (o *GetPrincipalSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals/{sid}/sources][%d] getPrincipalSourcesOK %s", 200, payload) -} - -func (o *GetPrincipalSourcesOK) GetPayload() *models.AssignedSources { - return o.Payload -} - -func (o *GetPrincipalSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AssignedSources) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPrincipalSourcesDefault creates a GetPrincipalSourcesDefault with default headers values -func NewGetPrincipalSourcesDefault(code int) *GetPrincipalSourcesDefault { - return &GetPrincipalSourcesDefault{ - _statusCode: code, - } -} - -/* -GetPrincipalSourcesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetPrincipalSourcesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get principal sources default response has a 2xx status code -func (o *GetPrincipalSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get principal sources default response has a 3xx status code -func (o *GetPrincipalSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get principal sources default response has a 4xx status code -func (o *GetPrincipalSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get principal sources default response has a 5xx status code -func (o *GetPrincipalSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get principal sources default response a status code equal to that given -func (o *GetPrincipalSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get principal sources default response -func (o *GetPrincipalSourcesDefault) Code() int { - return o._statusCode -} - -func (o *GetPrincipalSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals/{sid}/sources][%d] GetPrincipalSources default %s", o._statusCode, payload) -} - -func (o *GetPrincipalSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals/{sid}/sources][%d] GetPrincipalSources default %s", o._statusCode, payload) -} - -func (o *GetPrincipalSourcesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetPrincipalSourcesDefault) 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/user/get_security_principals_parameters.go b/v2/client/user/get_security_principals_parameters.go deleted file mode 100644 index 6ded9eb7..00000000 --- a/v2/client/user/get_security_principals_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetSecurityPrincipalsParams creates a new GetSecurityPrincipalsParams 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 NewGetSecurityPrincipalsParams() *GetSecurityPrincipalsParams { - return &GetSecurityPrincipalsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSecurityPrincipalsParamsWithTimeout creates a new GetSecurityPrincipalsParams object -// with the ability to set a timeout on a request. -func NewGetSecurityPrincipalsParamsWithTimeout(timeout time.Duration) *GetSecurityPrincipalsParams { - return &GetSecurityPrincipalsParams{ - timeout: timeout, - } -} - -// NewGetSecurityPrincipalsParamsWithContext creates a new GetSecurityPrincipalsParams object -// with the ability to set a context for a request. -func NewGetSecurityPrincipalsParamsWithContext(ctx context.Context) *GetSecurityPrincipalsParams { - return &GetSecurityPrincipalsParams{ - Context: ctx, - } -} - -// NewGetSecurityPrincipalsParamsWithHTTPClient creates a new GetSecurityPrincipalsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSecurityPrincipalsParamsWithHTTPClient(client *http.Client) *GetSecurityPrincipalsParams { - return &GetSecurityPrincipalsParams{ - HTTPClient: client, - } -} - -/* -GetSecurityPrincipalsParams contains all the parameters to send to the API endpoint - - for the get security principals operation. - - Typically these are written to a http.Request. -*/ -type GetSecurityPrincipalsParams struct { - - /* Sids. - - Specifies a list of SIDs. - */ - Sids []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get security principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSecurityPrincipalsParams) WithDefaults() *GetSecurityPrincipalsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get security principals params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSecurityPrincipalsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get security principals params -func (o *GetSecurityPrincipalsParams) WithTimeout(timeout time.Duration) *GetSecurityPrincipalsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get security principals params -func (o *GetSecurityPrincipalsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get security principals params -func (o *GetSecurityPrincipalsParams) WithContext(ctx context.Context) *GetSecurityPrincipalsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get security principals params -func (o *GetSecurityPrincipalsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get security principals params -func (o *GetSecurityPrincipalsParams) WithHTTPClient(client *http.Client) *GetSecurityPrincipalsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get security principals params -func (o *GetSecurityPrincipalsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSids adds the sids to the get security principals params -func (o *GetSecurityPrincipalsParams) WithSids(sids []string) *GetSecurityPrincipalsParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the get security principals params -func (o *GetSecurityPrincipalsParams) SetSids(sids []string) { - o.Sids = sids -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSecurityPrincipalsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSecurityPrincipals binds the parameter sids -func (o *GetSecurityPrincipalsParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} diff --git a/v2/client/user/get_security_principals_responses.go b/v2/client/user/get_security_principals_responses.go deleted file mode 100644 index 5eed979a..00000000 --- a/v2/client/user/get_security_principals_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSecurityPrincipalsReader is a Reader for the GetSecurityPrincipals structure. -type GetSecurityPrincipalsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSecurityPrincipalsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSecurityPrincipalsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSecurityPrincipalsDefault(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 - } -} - -// NewGetSecurityPrincipalsOK creates a GetSecurityPrincipalsOK with default headers values -func NewGetSecurityPrincipalsOK() *GetSecurityPrincipalsOK { - return &GetSecurityPrincipalsOK{} -} - -/* -GetSecurityPrincipalsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSecurityPrincipalsOK struct { - Payload *models.SecurityPrincipals -} - -// IsSuccess returns true when this get security principals o k response has a 2xx status code -func (o *GetSecurityPrincipalsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get security principals o k response has a 3xx status code -func (o *GetSecurityPrincipalsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get security principals o k response has a 4xx status code -func (o *GetSecurityPrincipalsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get security principals o k response has a 5xx status code -func (o *GetSecurityPrincipalsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get security principals o k response a status code equal to that given -func (o *GetSecurityPrincipalsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get security principals o k response -func (o *GetSecurityPrincipalsOK) Code() int { - return 200 -} - -func (o *GetSecurityPrincipalsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals][%d] getSecurityPrincipalsOK %s", 200, payload) -} - -func (o *GetSecurityPrincipalsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals][%d] getSecurityPrincipalsOK %s", 200, payload) -} - -func (o *GetSecurityPrincipalsOK) GetPayload() *models.SecurityPrincipals { - return o.Payload -} - -func (o *GetSecurityPrincipalsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SecurityPrincipals) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSecurityPrincipalsDefault creates a GetSecurityPrincipalsDefault with default headers values -func NewGetSecurityPrincipalsDefault(code int) *GetSecurityPrincipalsDefault { - return &GetSecurityPrincipalsDefault{ - _statusCode: code, - } -} - -/* -GetSecurityPrincipalsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSecurityPrincipalsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get security principals default response has a 2xx status code -func (o *GetSecurityPrincipalsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get security principals default response has a 3xx status code -func (o *GetSecurityPrincipalsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get security principals default response has a 4xx status code -func (o *GetSecurityPrincipalsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get security principals default response has a 5xx status code -func (o *GetSecurityPrincipalsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get security principals default response a status code equal to that given -func (o *GetSecurityPrincipalsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get security principals default response -func (o *GetSecurityPrincipalsDefault) Code() int { - return o._statusCode -} - -func (o *GetSecurityPrincipalsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals][%d] GetSecurityPrincipals default %s", o._statusCode, payload) -} - -func (o *GetSecurityPrincipalsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /security-principals][%d] GetSecurityPrincipals default %s", o._statusCode, payload) -} - -func (o *GetSecurityPrincipalsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSecurityPrincipalsDefault) 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/user/get_user_api_key_by_id_parameters.go b/v2/client/user/get_user_api_key_by_id_parameters.go deleted file mode 100644 index 153bfd94..00000000 --- a/v2/client/user/get_user_api_key_by_id_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewGetUserAPIKeyByIDParams creates a new GetUserAPIKeyByIDParams 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 NewGetUserAPIKeyByIDParams() *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserAPIKeyByIDParamsWithTimeout creates a new GetUserAPIKeyByIDParams object -// with the ability to set a timeout on a request. -func NewGetUserAPIKeyByIDParamsWithTimeout(timeout time.Duration) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - timeout: timeout, - } -} - -// NewGetUserAPIKeyByIDParamsWithContext creates a new GetUserAPIKeyByIDParams object -// with the ability to set a context for a request. -func NewGetUserAPIKeyByIDParamsWithContext(ctx context.Context) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - Context: ctx, - } -} - -// NewGetUserAPIKeyByIDParamsWithHTTPClient creates a new GetUserAPIKeyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserAPIKeyByIDParamsWithHTTPClient(client *http.Client) *GetUserAPIKeyByIDParams { - return &GetUserAPIKeyByIDParams{ - HTTPClient: client, - } -} - -/* -GetUserAPIKeyByIDParams contains all the parameters to send to the API endpoint - - for the get user API key by Id operation. - - Typically these are written to a http.Request. -*/ -type GetUserAPIKeyByIDParams struct { - - /* ID. - - Specify the id of the API key. - */ - ID string - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeyByIDParams) WithDefaults() *GetUserAPIKeyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) WithTimeout(timeout time.Duration) *GetUserAPIKeyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) WithContext(ctx context.Context) *GetUserAPIKeyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) WithHTTPClient(client *http.Client) *GetUserAPIKeyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) WithID(id string) *GetUserAPIKeyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) SetID(id string) { - o.ID = id -} - -// WithUserSid adds the userSid to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) WithUserSid(userSid string) *GetUserAPIKeyByIDParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the get user API key by Id params -func (o *GetUserAPIKeyByIDParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserAPIKeyByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/get_user_api_key_by_id_responses.go b/v2/client/user/get_user_api_key_by_id_responses.go deleted file mode 100644 index 8033e1a7..00000000 --- a/v2/client/user/get_user_api_key_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetUserAPIKeyByIDReader is a Reader for the GetUserAPIKeyByID structure. -type GetUserAPIKeyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserAPIKeyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserAPIKeyByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserAPIKeyByIDDefault(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 - } -} - -// NewGetUserAPIKeyByIDOK creates a GetUserAPIKeyByIDOK with default headers values -func NewGetUserAPIKeyByIDOK() *GetUserAPIKeyByIDOK { - return &GetUserAPIKeyByIDOK{} -} - -/* -GetUserAPIKeyByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserAPIKeyByIDOK struct { - Payload *models.UserAPIKey -} - -// IsSuccess returns true when this get user Api key by Id o k response has a 2xx status code -func (o *GetUserAPIKeyByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user Api key by Id o k response has a 3xx status code -func (o *GetUserAPIKeyByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user Api key by Id o k response has a 4xx status code -func (o *GetUserAPIKeyByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user Api key by Id o k response has a 5xx status code -func (o *GetUserAPIKeyByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user Api key by Id o k response a status code equal to that given -func (o *GetUserAPIKeyByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user Api key by Id o k response -func (o *GetUserAPIKeyByIDOK) Code() int { - return 200 -} - -func (o *GetUserAPIKeyByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys/{id}][%d] getUserApiKeyByIdOK %s", 200, payload) -} - -func (o *GetUserAPIKeyByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys/{id}][%d] getUserApiKeyByIdOK %s", 200, payload) -} - -func (o *GetUserAPIKeyByIDOK) GetPayload() *models.UserAPIKey { - return o.Payload -} - -func (o *GetUserAPIKeyByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserAPIKeyByIDDefault creates a GetUserAPIKeyByIDDefault with default headers values -func NewGetUserAPIKeyByIDDefault(code int) *GetUserAPIKeyByIDDefault { - return &GetUserAPIKeyByIDDefault{ - _statusCode: code, - } -} - -/* -GetUserAPIKeyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserAPIKeyByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get user API key by Id default response has a 2xx status code -func (o *GetUserAPIKeyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user API key by Id default response has a 3xx status code -func (o *GetUserAPIKeyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user API key by Id default response has a 4xx status code -func (o *GetUserAPIKeyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user API key by Id default response has a 5xx status code -func (o *GetUserAPIKeyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user API key by Id default response a status code equal to that given -func (o *GetUserAPIKeyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user API key by Id default response -func (o *GetUserAPIKeyByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetUserAPIKeyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys/{id}][%d] GetUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys/{id}][%d] GetUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeyByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetUserAPIKeyByIDDefault) 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/user/get_user_api_keys_parameters.go b/v2/client/user/get_user_api_keys_parameters.go deleted file mode 100644 index 604b5f20..00000000 --- a/v2/client/user/get_user_api_keys_parameters.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetUserAPIKeysParams creates a new GetUserAPIKeysParams 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 NewGetUserAPIKeysParams() *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserAPIKeysParamsWithTimeout creates a new GetUserAPIKeysParams object -// with the ability to set a timeout on a request. -func NewGetUserAPIKeysParamsWithTimeout(timeout time.Duration) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - timeout: timeout, - } -} - -// NewGetUserAPIKeysParamsWithContext creates a new GetUserAPIKeysParams object -// with the ability to set a context for a request. -func NewGetUserAPIKeysParamsWithContext(ctx context.Context) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - Context: ctx, - } -} - -// NewGetUserAPIKeysParamsWithHTTPClient creates a new GetUserAPIKeysParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserAPIKeysParamsWithHTTPClient(client *http.Client) *GetUserAPIKeysParams { - return &GetUserAPIKeysParams{ - HTTPClient: client, - } -} - -/* -GetUserAPIKeysParams contains all the parameters to send to the API endpoint - - for the get user API keys operation. - - Typically these are written to a http.Request. -*/ -type GetUserAPIKeysParams struct { - - /* Ids. - - Filter by API Key Ids - */ - Ids []string - - /* IsActive. - - If true, the response will only include API keys which are active. Returns all keys if the query param is not set. - */ - IsActive *bool - - /* IsExpired. - - If true, the response will only include API keys which has been expired. Returns all keys if the query param is not set. - */ - IsExpired *bool - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user API keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeysParams) WithDefaults() *GetUserAPIKeysParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user API keys params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserAPIKeysParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user API keys params -func (o *GetUserAPIKeysParams) WithTimeout(timeout time.Duration) *GetUserAPIKeysParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user API keys params -func (o *GetUserAPIKeysParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user API keys params -func (o *GetUserAPIKeysParams) WithContext(ctx context.Context) *GetUserAPIKeysParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user API keys params -func (o *GetUserAPIKeysParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user API keys params -func (o *GetUserAPIKeysParams) WithHTTPClient(client *http.Client) *GetUserAPIKeysParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user API keys params -func (o *GetUserAPIKeysParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIds adds the ids to the get user API keys params -func (o *GetUserAPIKeysParams) WithIds(ids []string) *GetUserAPIKeysParams { - o.SetIds(ids) - return o -} - -// SetIds adds the ids to the get user API keys params -func (o *GetUserAPIKeysParams) SetIds(ids []string) { - o.Ids = ids -} - -// WithIsActive adds the isActive to the get user API keys params -func (o *GetUserAPIKeysParams) WithIsActive(isActive *bool) *GetUserAPIKeysParams { - o.SetIsActive(isActive) - return o -} - -// SetIsActive adds the isActive to the get user API keys params -func (o *GetUserAPIKeysParams) SetIsActive(isActive *bool) { - o.IsActive = isActive -} - -// WithIsExpired adds the isExpired to the get user API keys params -func (o *GetUserAPIKeysParams) WithIsExpired(isExpired *bool) *GetUserAPIKeysParams { - o.SetIsExpired(isExpired) - return o -} - -// SetIsExpired adds the isExpired to the get user API keys params -func (o *GetUserAPIKeysParams) SetIsExpired(isExpired *bool) { - o.IsExpired = isExpired -} - -// WithUserSid adds the userSid to the get user API keys params -func (o *GetUserAPIKeysParams) WithUserSid(userSid string) *GetUserAPIKeysParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the get user API keys params -func (o *GetUserAPIKeysParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserAPIKeysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Ids != nil { - - // binding items for ids - joinedIds := o.bindParamIds(reg) - - // query array param ids - if err := r.SetQueryParam("ids", joinedIds...); err != nil { - return err - } - } - - if o.IsActive != nil { - - // query param isActive - var qrIsActive bool - - if o.IsActive != nil { - qrIsActive = *o.IsActive - } - qIsActive := swag.FormatBool(qrIsActive) - if qIsActive != "" { - - if err := r.SetQueryParam("isActive", qIsActive); err != nil { - return err - } - } - } - - if o.IsExpired != nil { - - // query param isExpired - var qrIsExpired bool - - if o.IsExpired != nil { - qrIsExpired = *o.IsExpired - } - qIsExpired := swag.FormatBool(qrIsExpired) - if qIsExpired != "" { - - if err := r.SetQueryParam("isExpired", qIsExpired); err != nil { - return err - } - } - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetUserAPIKeys binds the parameter ids -func (o *GetUserAPIKeysParams) bindParamIds(formats strfmt.Registry) []string { - idsIR := o.Ids - - var idsIC []string - for _, idsIIR := range idsIR { // explode []string - - idsIIV := idsIIR // string as string - idsIC = append(idsIC, idsIIV) - } - - // items.CollectionFormat: "" - idsIS := swag.JoinByFormat(idsIC, "") - - return idsIS -} diff --git a/v2/client/user/get_user_api_keys_responses.go b/v2/client/user/get_user_api_keys_responses.go deleted file mode 100644 index 5518cad1..00000000 --- a/v2/client/user/get_user_api_keys_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetUserAPIKeysReader is a Reader for the GetUserAPIKeys structure. -type GetUserAPIKeysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserAPIKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserAPIKeysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserAPIKeysDefault(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 - } -} - -// NewGetUserAPIKeysOK creates a GetUserAPIKeysOK with default headers values -func NewGetUserAPIKeysOK() *GetUserAPIKeysOK { - return &GetUserAPIKeysOK{} -} - -/* -GetUserAPIKeysOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserAPIKeysOK struct { - Payload *models.UserAPIKeys -} - -// IsSuccess returns true when this get user Api keys o k response has a 2xx status code -func (o *GetUserAPIKeysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user Api keys o k response has a 3xx status code -func (o *GetUserAPIKeysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user Api keys o k response has a 4xx status code -func (o *GetUserAPIKeysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user Api keys o k response has a 5xx status code -func (o *GetUserAPIKeysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user Api keys o k response a status code equal to that given -func (o *GetUserAPIKeysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user Api keys o k response -func (o *GetUserAPIKeysOK) Code() int { - return 200 -} - -func (o *GetUserAPIKeysOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys][%d] getUserApiKeysOK %s", 200, payload) -} - -func (o *GetUserAPIKeysOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys][%d] getUserApiKeysOK %s", 200, payload) -} - -func (o *GetUserAPIKeysOK) GetPayload() *models.UserAPIKeys { - return o.Payload -} - -func (o *GetUserAPIKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserAPIKeys) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserAPIKeysDefault creates a GetUserAPIKeysDefault with default headers values -func NewGetUserAPIKeysDefault(code int) *GetUserAPIKeysDefault { - return &GetUserAPIKeysDefault{ - _statusCode: code, - } -} - -/* -GetUserAPIKeysDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserAPIKeysDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get user API keys default response has a 2xx status code -func (o *GetUserAPIKeysDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user API keys default response has a 3xx status code -func (o *GetUserAPIKeysDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user API keys default response has a 4xx status code -func (o *GetUserAPIKeysDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user API keys default response has a 5xx status code -func (o *GetUserAPIKeysDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user API keys default response a status code equal to that given -func (o *GetUserAPIKeysDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user API keys default response -func (o *GetUserAPIKeysDefault) Code() int { - return o._statusCode -} - -func (o *GetUserAPIKeysDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys][%d] GetUserAPIKeys default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeysDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{userSid}/api-keys][%d] GetUserAPIKeys default %s", o._statusCode, payload) -} - -func (o *GetUserAPIKeysDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetUserAPIKeysDefault) 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/user/get_user_by_s_id_parameters.go b/v2/client/user/get_user_by_s_id_parameters.go deleted file mode 100644 index 556b9bbc..00000000 --- a/v2/client/user/get_user_by_s_id_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewGetUserBySIDParams creates a new GetUserBySIDParams 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 NewGetUserBySIDParams() *GetUserBySIDParams { - return &GetUserBySIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUserBySIDParamsWithTimeout creates a new GetUserBySIDParams object -// with the ability to set a timeout on a request. -func NewGetUserBySIDParamsWithTimeout(timeout time.Duration) *GetUserBySIDParams { - return &GetUserBySIDParams{ - timeout: timeout, - } -} - -// NewGetUserBySIDParamsWithContext creates a new GetUserBySIDParams object -// with the ability to set a context for a request. -func NewGetUserBySIDParamsWithContext(ctx context.Context) *GetUserBySIDParams { - return &GetUserBySIDParams{ - Context: ctx, - } -} - -// NewGetUserBySIDParamsWithHTTPClient creates a new GetUserBySIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUserBySIDParamsWithHTTPClient(client *http.Client) *GetUserBySIDParams { - return &GetUserBySIDParams{ - HTTPClient: client, - } -} - -/* -GetUserBySIDParams contains all the parameters to send to the API endpoint - - for the get user by s ID operation. - - Typically these are written to a http.Request. -*/ -type GetUserBySIDParams struct { - - /* Sid. - - Specify the SID of the user. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get user by s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserBySIDParams) WithDefaults() *GetUserBySIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get user by s ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUserBySIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get user by s ID params -func (o *GetUserBySIDParams) WithTimeout(timeout time.Duration) *GetUserBySIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get user by s ID params -func (o *GetUserBySIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get user by s ID params -func (o *GetUserBySIDParams) WithContext(ctx context.Context) *GetUserBySIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get user by s ID params -func (o *GetUserBySIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get user by s ID params -func (o *GetUserBySIDParams) WithHTTPClient(client *http.Client) *GetUserBySIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get user by s ID params -func (o *GetUserBySIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the get user by s ID params -func (o *GetUserBySIDParams) WithSid(sid string) *GetUserBySIDParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get user by s ID params -func (o *GetUserBySIDParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUserBySIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/get_user_by_s_id_responses.go b/v2/client/user/get_user_by_s_id_responses.go deleted file mode 100644 index 2d030327..00000000 --- a/v2/client/user/get_user_by_s_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetUserBySIDReader is a Reader for the GetUserBySID structure. -type GetUserBySIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUserBySIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUserBySIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUserBySIDDefault(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 - } -} - -// NewGetUserBySIDOK creates a GetUserBySIDOK with default headers values -func NewGetUserBySIDOK() *GetUserBySIDOK { - return &GetUserBySIDOK{} -} - -/* -GetUserBySIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUserBySIDOK struct { - Payload *models.UserParams -} - -// IsSuccess returns true when this get user by s Id o k response has a 2xx status code -func (o *GetUserBySIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get user by s Id o k response has a 3xx status code -func (o *GetUserBySIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get user by s Id o k response has a 4xx status code -func (o *GetUserBySIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get user by s Id o k response has a 5xx status code -func (o *GetUserBySIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get user by s Id o k response a status code equal to that given -func (o *GetUserBySIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get user by s Id o k response -func (o *GetUserBySIDOK) Code() int { - return 200 -} - -func (o *GetUserBySIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{sid}][%d] getUserBySIdOK %s", 200, payload) -} - -func (o *GetUserBySIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{sid}][%d] getUserBySIdOK %s", 200, payload) -} - -func (o *GetUserBySIDOK) GetPayload() *models.UserParams { - return o.Payload -} - -func (o *GetUserBySIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUserBySIDDefault creates a GetUserBySIDDefault with default headers values -func NewGetUserBySIDDefault(code int) *GetUserBySIDDefault { - return &GetUserBySIDDefault{ - _statusCode: code, - } -} - -/* -GetUserBySIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUserBySIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get user by s ID default response has a 2xx status code -func (o *GetUserBySIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get user by s ID default response has a 3xx status code -func (o *GetUserBySIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get user by s ID default response has a 4xx status code -func (o *GetUserBySIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get user by s ID default response has a 5xx status code -func (o *GetUserBySIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get user by s ID default response a status code equal to that given -func (o *GetUserBySIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get user by s ID default response -func (o *GetUserBySIDDefault) Code() int { - return o._statusCode -} - -func (o *GetUserBySIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{sid}][%d] GetUserBySID default %s", o._statusCode, payload) -} - -func (o *GetUserBySIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users/{sid}][%d] GetUserBySID default %s", o._statusCode, payload) -} - -func (o *GetUserBySIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetUserBySIDDefault) 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/user/get_users_parameters.go b/v2/client/user/get_users_parameters.go deleted file mode 100644 index 9bb89532..00000000 --- a/v2/client/user/get_users_parameters.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/go-openapi/swag" -) - -// NewGetUsersParams creates a new GetUsersParams 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 NewGetUsersParams() *GetUsersParams { - return &GetUsersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetUsersParamsWithTimeout creates a new GetUsersParams object -// with the ability to set a timeout on a request. -func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams { - return &GetUsersParams{ - timeout: timeout, - } -} - -// NewGetUsersParamsWithContext creates a new GetUsersParams object -// with the ability to set a context for a request. -func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams { - return &GetUsersParams{ - Context: ctx, - } -} - -// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams { - return &GetUsersParams{ - HTTPClient: client, - } -} - -/* -GetUsersParams contains all the parameters to send to the API endpoint - - for the get users operation. - - Typically these are written to a http.Request. -*/ -type GetUsersParams struct { - - /* Domain. - - Specifies the user domain to filter. - */ - Domain *string - - /* EmailAddresses. - - Specifies a list of email addresses to filter. - */ - EmailAddresses []string - - /* IncludeTenants. - - IncludeTenants specifies if users of all the tenants under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* MatchPartialNames. - - If true, the names in usernames are matched by any partial rather than exactly matched. - */ - MatchPartialNames *bool - - /* Roles. - - Specifies a list of roles to filter. - */ - Roles []string - - /* Sids. - - Specifies a list of sids to filter. - */ - Sids []string - - /* TenantIds. - - TenantIds contains ids of the tenants for which users are to be returned. - */ - TenantIds []string - - /* Usernames. - - Specifies a list of usernames to filter. - */ - Usernames []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUsersParams) WithDefaults() *GetUsersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get users params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetUsersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get users params -func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get users params -func (o *GetUsersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get users params -func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get users params -func (o *GetUsersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get users params -func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get users params -func (o *GetUsersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDomain adds the domain to the get users params -func (o *GetUsersParams) WithDomain(domain *string) *GetUsersParams { - o.SetDomain(domain) - return o -} - -// SetDomain adds the domain to the get users params -func (o *GetUsersParams) SetDomain(domain *string) { - o.Domain = domain -} - -// WithEmailAddresses adds the emailAddresses to the get users params -func (o *GetUsersParams) WithEmailAddresses(emailAddresses []string) *GetUsersParams { - o.SetEmailAddresses(emailAddresses) - return o -} - -// SetEmailAddresses adds the emailAddresses to the get users params -func (o *GetUsersParams) SetEmailAddresses(emailAddresses []string) { - o.EmailAddresses = emailAddresses -} - -// WithIncludeTenants adds the includeTenants to the get users params -func (o *GetUsersParams) WithIncludeTenants(includeTenants *bool) *GetUsersParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get users params -func (o *GetUsersParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMatchPartialNames adds the matchPartialNames to the get users params -func (o *GetUsersParams) WithMatchPartialNames(matchPartialNames *bool) *GetUsersParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get users params -func (o *GetUsersParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithRoles adds the roles to the get users params -func (o *GetUsersParams) WithRoles(roles []string) *GetUsersParams { - o.SetRoles(roles) - return o -} - -// SetRoles adds the roles to the get users params -func (o *GetUsersParams) SetRoles(roles []string) { - o.Roles = roles -} - -// WithSids adds the sids to the get users params -func (o *GetUsersParams) WithSids(sids []string) *GetUsersParams { - o.SetSids(sids) - return o -} - -// SetSids adds the sids to the get users params -func (o *GetUsersParams) SetSids(sids []string) { - o.Sids = sids -} - -// WithTenantIds adds the tenantIds to the get users params -func (o *GetUsersParams) WithTenantIds(tenantIds []string) *GetUsersParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get users params -func (o *GetUsersParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUsernames adds the usernames to the get users params -func (o *GetUsersParams) WithUsernames(usernames []string) *GetUsersParams { - o.SetUsernames(usernames) - return o -} - -// SetUsernames adds the usernames to the get users params -func (o *GetUsersParams) SetUsernames(usernames []string) { - o.Usernames = usernames -} - -// WriteToRequest writes these params to a swagger request -func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Domain != nil { - - // query param domain - var qrDomain string - - if o.Domain != nil { - qrDomain = *o.Domain - } - qDomain := qrDomain - if qDomain != "" { - - if err := r.SetQueryParam("domain", qDomain); err != nil { - return err - } - } - } - - if o.EmailAddresses != nil { - - // binding items for emailAddresses - joinedEmailAddresses := o.bindParamEmailAddresses(reg) - - // query array param emailAddresses - if err := r.SetQueryParam("emailAddresses", joinedEmailAddresses...); 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.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.Roles != nil { - - // binding items for roles - joinedRoles := o.bindParamRoles(reg) - - // query array param roles - if err := r.SetQueryParam("roles", joinedRoles...); err != nil { - return err - } - } - - if o.Sids != nil { - - // binding items for sids - joinedSids := o.bindParamSids(reg) - - // query array param sids - if err := r.SetQueryParam("sids", joinedSids...); err != nil { - return err - } - } - - 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.Usernames != nil { - - // binding items for usernames - joinedUsernames := o.bindParamUsernames(reg) - - // query array param usernames - if err := r.SetQueryParam("usernames", joinedUsernames...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetUsers binds the parameter emailAddresses -func (o *GetUsersParams) bindParamEmailAddresses(formats strfmt.Registry) []string { - emailAddressesIR := o.EmailAddresses - - var emailAddressesIC []string - for _, emailAddressesIIR := range emailAddressesIR { // explode []string - - emailAddressesIIV := emailAddressesIIR // string as string - emailAddressesIC = append(emailAddressesIC, emailAddressesIIV) - } - - // items.CollectionFormat: "" - emailAddressesIS := swag.JoinByFormat(emailAddressesIC, "") - - return emailAddressesIS -} - -// bindParamGetUsers binds the parameter roles -func (o *GetUsersParams) bindParamRoles(formats strfmt.Registry) []string { - rolesIR := o.Roles - - var rolesIC []string - for _, rolesIIR := range rolesIR { // explode []string - - rolesIIV := rolesIIR // string as string - rolesIC = append(rolesIC, rolesIIV) - } - - // items.CollectionFormat: "" - rolesIS := swag.JoinByFormat(rolesIC, "") - - return rolesIS -} - -// bindParamGetUsers binds the parameter sids -func (o *GetUsersParams) bindParamSids(formats strfmt.Registry) []string { - sidsIR := o.Sids - - var sidsIC []string - for _, sidsIIR := range sidsIR { // explode []string - - sidsIIV := sidsIIR // string as string - sidsIC = append(sidsIC, sidsIIV) - } - - // items.CollectionFormat: "" - sidsIS := swag.JoinByFormat(sidsIC, "") - - return sidsIS -} - -// bindParamGetUsers binds the parameter tenantIds -func (o *GetUsersParams) 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 -} - -// bindParamGetUsers binds the parameter usernames -func (o *GetUsersParams) bindParamUsernames(formats strfmt.Registry) []string { - usernamesIR := o.Usernames - - var usernamesIC []string - for _, usernamesIIR := range usernamesIR { // explode []string - - usernamesIIV := usernamesIIR // string as string - usernamesIC = append(usernamesIC, usernamesIIV) - } - - // items.CollectionFormat: "" - usernamesIS := swag.JoinByFormat(usernamesIC, "") - - return usernamesIS -} diff --git a/v2/client/user/get_users_responses.go b/v2/client/user/get_users_responses.go deleted file mode 100644 index 09a120be..00000000 --- a/v2/client/user/get_users_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetUsersReader is a Reader for the GetUsers structure. -type GetUsersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetUsersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetUsersDefault(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 - } -} - -// NewGetUsersOK creates a GetUsersOK with default headers values -func NewGetUsersOK() *GetUsersOK { - return &GetUsersOK{} -} - -/* -GetUsersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetUsersOK struct { - Payload *models.UsersList -} - -// IsSuccess returns true when this get users o k response has a 2xx status code -func (o *GetUsersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get users o k response has a 3xx status code -func (o *GetUsersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get users o k response has a 4xx status code -func (o *GetUsersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get users o k response has a 5xx status code -func (o *GetUsersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get users o k response a status code equal to that given -func (o *GetUsersOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get users o k response -func (o *GetUsersOK) Code() int { - return 200 -} - -func (o *GetUsersOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users][%d] getUsersOK %s", 200, payload) -} - -func (o *GetUsersOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users][%d] getUsersOK %s", 200, payload) -} - -func (o *GetUsersOK) GetPayload() *models.UsersList { - return o.Payload -} - -func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UsersList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetUsersDefault creates a GetUsersDefault with default headers values -func NewGetUsersDefault(code int) *GetUsersDefault { - return &GetUsersDefault{ - _statusCode: code, - } -} - -/* -GetUsersDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetUsersDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get users default response has a 2xx status code -func (o *GetUsersDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get users default response has a 3xx status code -func (o *GetUsersDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get users default response has a 4xx status code -func (o *GetUsersDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get users default response has a 5xx status code -func (o *GetUsersDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get users default response a status code equal to that given -func (o *GetUsersDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get users default response -func (o *GetUsersDefault) Code() int { - return o._statusCode -} - -func (o *GetUsersDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users][%d] GetUsers default %s", o._statusCode, payload) -} - -func (o *GetUsersDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /users][%d] GetUsers default %s", o._statusCode, payload) -} - -func (o *GetUsersDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetUsersDefault) 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/user/regenerate_s3_key_parameters.go b/v2/client/user/regenerate_s3_key_parameters.go deleted file mode 100644 index 74c807d1..00000000 --- a/v2/client/user/regenerate_s3_key_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewRegenerateS3KeyParams creates a new RegenerateS3KeyParams 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 NewRegenerateS3KeyParams() *RegenerateS3KeyParams { - return &RegenerateS3KeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegenerateS3KeyParamsWithTimeout creates a new RegenerateS3KeyParams object -// with the ability to set a timeout on a request. -func NewRegenerateS3KeyParamsWithTimeout(timeout time.Duration) *RegenerateS3KeyParams { - return &RegenerateS3KeyParams{ - timeout: timeout, - } -} - -// NewRegenerateS3KeyParamsWithContext creates a new RegenerateS3KeyParams object -// with the ability to set a context for a request. -func NewRegenerateS3KeyParamsWithContext(ctx context.Context) *RegenerateS3KeyParams { - return &RegenerateS3KeyParams{ - Context: ctx, - } -} - -// NewRegenerateS3KeyParamsWithHTTPClient creates a new RegenerateS3KeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegenerateS3KeyParamsWithHTTPClient(client *http.Client) *RegenerateS3KeyParams { - return &RegenerateS3KeyParams{ - HTTPClient: client, - } -} - -/* -RegenerateS3KeyParams contains all the parameters to send to the API endpoint - - for the regenerate s3 key operation. - - Typically these are written to a http.Request. -*/ -type RegenerateS3KeyParams struct { - - /* Sid. - - Specify the SID of the user. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the regenerate s3 key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegenerateS3KeyParams) WithDefaults() *RegenerateS3KeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the regenerate s3 key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegenerateS3KeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the regenerate s3 key params -func (o *RegenerateS3KeyParams) WithTimeout(timeout time.Duration) *RegenerateS3KeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the regenerate s3 key params -func (o *RegenerateS3KeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the regenerate s3 key params -func (o *RegenerateS3KeyParams) WithContext(ctx context.Context) *RegenerateS3KeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the regenerate s3 key params -func (o *RegenerateS3KeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the regenerate s3 key params -func (o *RegenerateS3KeyParams) WithHTTPClient(client *http.Client) *RegenerateS3KeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the regenerate s3 key params -func (o *RegenerateS3KeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSid adds the sid to the regenerate s3 key params -func (o *RegenerateS3KeyParams) WithSid(sid string) *RegenerateS3KeyParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the regenerate s3 key params -func (o *RegenerateS3KeyParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *RegenerateS3KeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/regenerate_s3_key_responses.go b/v2/client/user/regenerate_s3_key_responses.go deleted file mode 100644 index a59b8954..00000000 --- a/v2/client/user/regenerate_s3_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RegenerateS3KeyReader is a Reader for the RegenerateS3Key structure. -type RegenerateS3KeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegenerateS3KeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewRegenerateS3KeyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegenerateS3KeyDefault(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 - } -} - -// NewRegenerateS3KeyCreated creates a RegenerateS3KeyCreated with default headers values -func NewRegenerateS3KeyCreated() *RegenerateS3KeyCreated { - return &RegenerateS3KeyCreated{} -} - -/* -RegenerateS3KeyCreated describes a response with status code 201, with default header values. - -Success -*/ -type RegenerateS3KeyCreated struct { - Payload *models.SecretKeyEntity -} - -// IsSuccess returns true when this regenerate s3 key created response has a 2xx status code -func (o *RegenerateS3KeyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this regenerate s3 key created response has a 3xx status code -func (o *RegenerateS3KeyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this regenerate s3 key created response has a 4xx status code -func (o *RegenerateS3KeyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this regenerate s3 key created response has a 5xx status code -func (o *RegenerateS3KeyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this regenerate s3 key created response a status code equal to that given -func (o *RegenerateS3KeyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the regenerate s3 key created response -func (o *RegenerateS3KeyCreated) Code() int { - return 201 -} - -func (o *RegenerateS3KeyCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{sid}/s3-secret-key][%d] regenerateS3KeyCreated %s", 201, payload) -} - -func (o *RegenerateS3KeyCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{sid}/s3-secret-key][%d] regenerateS3KeyCreated %s", 201, payload) -} - -func (o *RegenerateS3KeyCreated) GetPayload() *models.SecretKeyEntity { - return o.Payload -} - -func (o *RegenerateS3KeyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SecretKeyEntity) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegenerateS3KeyDefault creates a RegenerateS3KeyDefault with default headers values -func NewRegenerateS3KeyDefault(code int) *RegenerateS3KeyDefault { - return &RegenerateS3KeyDefault{ - _statusCode: code, - } -} - -/* -RegenerateS3KeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type RegenerateS3KeyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this regenerate s3 key default response has a 2xx status code -func (o *RegenerateS3KeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this regenerate s3 key default response has a 3xx status code -func (o *RegenerateS3KeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this regenerate s3 key default response has a 4xx status code -func (o *RegenerateS3KeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this regenerate s3 key default response has a 5xx status code -func (o *RegenerateS3KeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this regenerate s3 key default response a status code equal to that given -func (o *RegenerateS3KeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the regenerate s3 key default response -func (o *RegenerateS3KeyDefault) Code() int { - return o._statusCode -} - -func (o *RegenerateS3KeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{sid}/s3-secret-key][%d] RegenerateS3Key default %s", o._statusCode, payload) -} - -func (o *RegenerateS3KeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{sid}/s3-secret-key][%d] RegenerateS3Key default %s", o._statusCode, payload) -} - -func (o *RegenerateS3KeyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RegenerateS3KeyDefault) 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/user/rotate_user_api_key_parameters.go b/v2/client/user/rotate_user_api_key_parameters.go deleted file mode 100644 index ee1f521e..00000000 --- a/v2/client/user/rotate_user_api_key_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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" -) - -// NewRotateUserAPIKeyParams creates a new RotateUserAPIKeyParams 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 NewRotateUserAPIKeyParams() *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRotateUserAPIKeyParamsWithTimeout creates a new RotateUserAPIKeyParams object -// with the ability to set a timeout on a request. -func NewRotateUserAPIKeyParamsWithTimeout(timeout time.Duration) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - timeout: timeout, - } -} - -// NewRotateUserAPIKeyParamsWithContext creates a new RotateUserAPIKeyParams object -// with the ability to set a context for a request. -func NewRotateUserAPIKeyParamsWithContext(ctx context.Context) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - Context: ctx, - } -} - -// NewRotateUserAPIKeyParamsWithHTTPClient creates a new RotateUserAPIKeyParams object -// with the ability to set a custom HTTPClient for a request. -func NewRotateUserAPIKeyParamsWithHTTPClient(client *http.Client) *RotateUserAPIKeyParams { - return &RotateUserAPIKeyParams{ - HTTPClient: client, - } -} - -/* -RotateUserAPIKeyParams contains all the parameters to send to the API endpoint - - for the rotate user API key operation. - - Typically these are written to a http.Request. -*/ -type RotateUserAPIKeyParams struct { - - /* ID. - - Specify the id of the API key. - */ - ID string - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the rotate user API key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RotateUserAPIKeyParams) WithDefaults() *RotateUserAPIKeyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the rotate user API key params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RotateUserAPIKeyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the rotate user API key params -func (o *RotateUserAPIKeyParams) WithTimeout(timeout time.Duration) *RotateUserAPIKeyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the rotate user API key params -func (o *RotateUserAPIKeyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the rotate user API key params -func (o *RotateUserAPIKeyParams) WithContext(ctx context.Context) *RotateUserAPIKeyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the rotate user API key params -func (o *RotateUserAPIKeyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the rotate user API key params -func (o *RotateUserAPIKeyParams) WithHTTPClient(client *http.Client) *RotateUserAPIKeyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the rotate user API key params -func (o *RotateUserAPIKeyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the rotate user API key params -func (o *RotateUserAPIKeyParams) WithID(id string) *RotateUserAPIKeyParams { - o.SetID(id) - return o -} - -// SetID adds the id to the rotate user API key params -func (o *RotateUserAPIKeyParams) SetID(id string) { - o.ID = id -} - -// WithUserSid adds the userSid to the rotate user API key params -func (o *RotateUserAPIKeyParams) WithUserSid(userSid string) *RotateUserAPIKeyParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the rotate user API key params -func (o *RotateUserAPIKeyParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *RotateUserAPIKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/rotate_user_api_key_responses.go b/v2/client/user/rotate_user_api_key_responses.go deleted file mode 100644 index 3a1e8cf5..00000000 --- a/v2/client/user/rotate_user_api_key_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// RotateUserAPIKeyReader is a Reader for the RotateUserAPIKey structure. -type RotateUserAPIKeyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RotateUserAPIKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRotateUserAPIKeyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRotateUserAPIKeyDefault(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 - } -} - -// NewRotateUserAPIKeyOK creates a RotateUserAPIKeyOK with default headers values -func NewRotateUserAPIKeyOK() *RotateUserAPIKeyOK { - return &RotateUserAPIKeyOK{} -} - -/* -RotateUserAPIKeyOK describes a response with status code 200, with default header values. - -Success -*/ -type RotateUserAPIKeyOK struct { - Payload *models.CreatedUserAPIKey -} - -// IsSuccess returns true when this rotate user Api key o k response has a 2xx status code -func (o *RotateUserAPIKeyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this rotate user Api key o k response has a 3xx status code -func (o *RotateUserAPIKeyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this rotate user Api key o k response has a 4xx status code -func (o *RotateUserAPIKeyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this rotate user Api key o k response has a 5xx status code -func (o *RotateUserAPIKeyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this rotate user Api key o k response a status code equal to that given -func (o *RotateUserAPIKeyOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the rotate user Api key o k response -func (o *RotateUserAPIKeyOK) Code() int { - return 200 -} - -func (o *RotateUserAPIKeyOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys/{id}/rotate][%d] rotateUserApiKeyOK %s", 200, payload) -} - -func (o *RotateUserAPIKeyOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys/{id}/rotate][%d] rotateUserApiKeyOK %s", 200, payload) -} - -func (o *RotateUserAPIKeyOK) GetPayload() *models.CreatedUserAPIKey { - return o.Payload -} - -func (o *RotateUserAPIKeyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreatedUserAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRotateUserAPIKeyDefault creates a RotateUserAPIKeyDefault with default headers values -func NewRotateUserAPIKeyDefault(code int) *RotateUserAPIKeyDefault { - return &RotateUserAPIKeyDefault{ - _statusCode: code, - } -} - -/* -RotateUserAPIKeyDefault describes a response with status code -1, with default header values. - -Error -*/ -type RotateUserAPIKeyDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this rotate user API key default response has a 2xx status code -func (o *RotateUserAPIKeyDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this rotate user API key default response has a 3xx status code -func (o *RotateUserAPIKeyDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this rotate user API key default response has a 4xx status code -func (o *RotateUserAPIKeyDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this rotate user API key default response has a 5xx status code -func (o *RotateUserAPIKeyDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this rotate user API key default response a status code equal to that given -func (o *RotateUserAPIKeyDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the rotate user API key default response -func (o *RotateUserAPIKeyDefault) Code() int { - return o._statusCode -} - -func (o *RotateUserAPIKeyDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys/{id}/rotate][%d] RotateUserAPIKey default %s", o._statusCode, payload) -} - -func (o *RotateUserAPIKeyDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /users/{userSid}/api-keys/{id}/rotate][%d] RotateUserAPIKey default %s", o._statusCode, payload) -} - -func (o *RotateUserAPIKeyDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *RotateUserAPIKeyDefault) 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/user/update_group_parameters.go b/v2/client/user/update_group_parameters.go deleted file mode 100644 index 05146f57..00000000 --- a/v2/client/user/update_group_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateGroupParams creates a new UpdateGroupParams 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 NewUpdateGroupParams() *UpdateGroupParams { - return &UpdateGroupParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateGroupParamsWithTimeout creates a new UpdateGroupParams object -// with the ability to set a timeout on a request. -func NewUpdateGroupParamsWithTimeout(timeout time.Duration) *UpdateGroupParams { - return &UpdateGroupParams{ - timeout: timeout, - } -} - -// NewUpdateGroupParamsWithContext creates a new UpdateGroupParams object -// with the ability to set a context for a request. -func NewUpdateGroupParamsWithContext(ctx context.Context) *UpdateGroupParams { - return &UpdateGroupParams{ - Context: ctx, - } -} - -// NewUpdateGroupParamsWithHTTPClient creates a new UpdateGroupParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateGroupParamsWithHTTPClient(client *http.Client) *UpdateGroupParams { - return &UpdateGroupParams{ - HTTPClient: client, - } -} - -/* -UpdateGroupParams contains all the parameters to send to the API endpoint - - for the update group operation. - - Typically these are written to a http.Request. -*/ -type UpdateGroupParams struct { - - /* Body. - - Specifies the group information. - */ - Body *models.UpdateGroupParameters - - /* Sid. - - Specify the SID of the group. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGroupParams) WithDefaults() *UpdateGroupParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update group params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGroupParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update group params -func (o *UpdateGroupParams) WithTimeout(timeout time.Duration) *UpdateGroupParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update group params -func (o *UpdateGroupParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update group params -func (o *UpdateGroupParams) WithContext(ctx context.Context) *UpdateGroupParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update group params -func (o *UpdateGroupParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update group params -func (o *UpdateGroupParams) WithHTTPClient(client *http.Client) *UpdateGroupParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update group params -func (o *UpdateGroupParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update group params -func (o *UpdateGroupParams) WithBody(body *models.UpdateGroupParameters) *UpdateGroupParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update group params -func (o *UpdateGroupParams) SetBody(body *models.UpdateGroupParameters) { - o.Body = body -} - -// WithSid adds the sid to the update group params -func (o *UpdateGroupParams) WithSid(sid string) *UpdateGroupParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the update group params -func (o *UpdateGroupParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateGroupParams) 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 - } - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/update_group_responses.go b/v2/client/user/update_group_responses.go deleted file mode 100644 index 46ce4587..00000000 --- a/v2/client/user/update_group_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateGroupReader is a Reader for the UpdateGroup structure. -type UpdateGroupReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateGroupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateGroupOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateGroupDefault(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 - } -} - -// NewUpdateGroupOK creates a UpdateGroupOK with default headers values -func NewUpdateGroupOK() *UpdateGroupOK { - return &UpdateGroupOK{} -} - -/* -UpdateGroupOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateGroupOK struct { - Payload *models.GroupParams -} - -// IsSuccess returns true when this update group o k response has a 2xx status code -func (o *UpdateGroupOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update group o k response has a 3xx status code -func (o *UpdateGroupOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update group o k response has a 4xx status code -func (o *UpdateGroupOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update group o k response has a 5xx status code -func (o *UpdateGroupOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update group o k response a status code equal to that given -func (o *UpdateGroupOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update group o k response -func (o *UpdateGroupOK) Code() int { - return 200 -} - -func (o *UpdateGroupOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /groups/{sid}][%d] updateGroupOK %s", 200, payload) -} - -func (o *UpdateGroupOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /groups/{sid}][%d] updateGroupOK %s", 200, payload) -} - -func (o *UpdateGroupOK) GetPayload() *models.GroupParams { - return o.Payload -} - -func (o *UpdateGroupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GroupParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateGroupDefault creates a UpdateGroupDefault with default headers values -func NewUpdateGroupDefault(code int) *UpdateGroupDefault { - return &UpdateGroupDefault{ - _statusCode: code, - } -} - -/* -UpdateGroupDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateGroupDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update group default response has a 2xx status code -func (o *UpdateGroupDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update group default response has a 3xx status code -func (o *UpdateGroupDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update group default response has a 4xx status code -func (o *UpdateGroupDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update group default response has a 5xx status code -func (o *UpdateGroupDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update group default response a status code equal to that given -func (o *UpdateGroupDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update group default response -func (o *UpdateGroupDefault) Code() int { - return o._statusCode -} - -func (o *UpdateGroupDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /groups/{sid}][%d] UpdateGroup default %s", o._statusCode, payload) -} - -func (o *UpdateGroupDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /groups/{sid}][%d] UpdateGroup default %s", o._statusCode, payload) -} - -func (o *UpdateGroupDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateGroupDefault) 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/user/update_principal_sources_parameters.go b/v2/client/user/update_principal_sources_parameters.go deleted file mode 100644 index 0e5d55df..00000000 --- a/v2/client/user/update_principal_sources_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdatePrincipalSourcesParams creates a new UpdatePrincipalSourcesParams 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 NewUpdatePrincipalSourcesParams() *UpdatePrincipalSourcesParams { - return &UpdatePrincipalSourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdatePrincipalSourcesParamsWithTimeout creates a new UpdatePrincipalSourcesParams object -// with the ability to set a timeout on a request. -func NewUpdatePrincipalSourcesParamsWithTimeout(timeout time.Duration) *UpdatePrincipalSourcesParams { - return &UpdatePrincipalSourcesParams{ - timeout: timeout, - } -} - -// NewUpdatePrincipalSourcesParamsWithContext creates a new UpdatePrincipalSourcesParams object -// with the ability to set a context for a request. -func NewUpdatePrincipalSourcesParamsWithContext(ctx context.Context) *UpdatePrincipalSourcesParams { - return &UpdatePrincipalSourcesParams{ - Context: ctx, - } -} - -// NewUpdatePrincipalSourcesParamsWithHTTPClient creates a new UpdatePrincipalSourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdatePrincipalSourcesParamsWithHTTPClient(client *http.Client) *UpdatePrincipalSourcesParams { - return &UpdatePrincipalSourcesParams{ - HTTPClient: client, - } -} - -/* -UpdatePrincipalSourcesParams contains all the parameters to send to the API endpoint - - for the update principal sources operation. - - Typically these are written to a http.Request. -*/ -type UpdatePrincipalSourcesParams struct { - - /* Body. - - Specify the sources to be assigned to a principal. - */ - Body *models.AssignedSources - - /* Sid. - - Specify the SID of the principal. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update principal sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePrincipalSourcesParams) WithDefaults() *UpdatePrincipalSourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update principal sources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePrincipalSourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update principal sources params -func (o *UpdatePrincipalSourcesParams) WithTimeout(timeout time.Duration) *UpdatePrincipalSourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update principal sources params -func (o *UpdatePrincipalSourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update principal sources params -func (o *UpdatePrincipalSourcesParams) WithContext(ctx context.Context) *UpdatePrincipalSourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update principal sources params -func (o *UpdatePrincipalSourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update principal sources params -func (o *UpdatePrincipalSourcesParams) WithHTTPClient(client *http.Client) *UpdatePrincipalSourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update principal sources params -func (o *UpdatePrincipalSourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update principal sources params -func (o *UpdatePrincipalSourcesParams) WithBody(body *models.AssignedSources) *UpdatePrincipalSourcesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update principal sources params -func (o *UpdatePrincipalSourcesParams) SetBody(body *models.AssignedSources) { - o.Body = body -} - -// WithSid adds the sid to the update principal sources params -func (o *UpdatePrincipalSourcesParams) WithSid(sid string) *UpdatePrincipalSourcesParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the update principal sources params -func (o *UpdatePrincipalSourcesParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdatePrincipalSourcesParams) 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 - } - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/update_principal_sources_responses.go b/v2/client/user/update_principal_sources_responses.go deleted file mode 100644 index d9c23d3f..00000000 --- a/v2/client/user/update_principal_sources_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdatePrincipalSourcesReader is a Reader for the UpdatePrincipalSources structure. -type UpdatePrincipalSourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdatePrincipalSourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdatePrincipalSourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdatePrincipalSourcesDefault(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 - } -} - -// NewUpdatePrincipalSourcesOK creates a UpdatePrincipalSourcesOK with default headers values -func NewUpdatePrincipalSourcesOK() *UpdatePrincipalSourcesOK { - return &UpdatePrincipalSourcesOK{} -} - -/* -UpdatePrincipalSourcesOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdatePrincipalSourcesOK struct { - Payload *models.AssignedSources -} - -// IsSuccess returns true when this update principal sources o k response has a 2xx status code -func (o *UpdatePrincipalSourcesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update principal sources o k response has a 3xx status code -func (o *UpdatePrincipalSourcesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update principal sources o k response has a 4xx status code -func (o *UpdatePrincipalSourcesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update principal sources o k response has a 5xx status code -func (o *UpdatePrincipalSourcesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update principal sources o k response a status code equal to that given -func (o *UpdatePrincipalSourcesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update principal sources o k response -func (o *UpdatePrincipalSourcesOK) Code() int { - return 200 -} - -func (o *UpdatePrincipalSourcesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-principals/{sid}/sources][%d] updatePrincipalSourcesOK %s", 200, payload) -} - -func (o *UpdatePrincipalSourcesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-principals/{sid}/sources][%d] updatePrincipalSourcesOK %s", 200, payload) -} - -func (o *UpdatePrincipalSourcesOK) GetPayload() *models.AssignedSources { - return o.Payload -} - -func (o *UpdatePrincipalSourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.AssignedSources) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdatePrincipalSourcesDefault creates a UpdatePrincipalSourcesDefault with default headers values -func NewUpdatePrincipalSourcesDefault(code int) *UpdatePrincipalSourcesDefault { - return &UpdatePrincipalSourcesDefault{ - _statusCode: code, - } -} - -/* -UpdatePrincipalSourcesDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdatePrincipalSourcesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update principal sources default response has a 2xx status code -func (o *UpdatePrincipalSourcesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update principal sources default response has a 3xx status code -func (o *UpdatePrincipalSourcesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update principal sources default response has a 4xx status code -func (o *UpdatePrincipalSourcesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update principal sources default response has a 5xx status code -func (o *UpdatePrincipalSourcesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update principal sources default response a status code equal to that given -func (o *UpdatePrincipalSourcesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update principal sources default response -func (o *UpdatePrincipalSourcesDefault) Code() int { - return o._statusCode -} - -func (o *UpdatePrincipalSourcesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-principals/{sid}/sources][%d] UpdatePrincipalSources default %s", o._statusCode, payload) -} - -func (o *UpdatePrincipalSourcesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /security-principals/{sid}/sources][%d] UpdatePrincipalSources default %s", o._statusCode, payload) -} - -func (o *UpdatePrincipalSourcesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdatePrincipalSourcesDefault) 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/user/update_user_api_key_by_id_parameters.go b/v2/client/user/update_user_api_key_by_id_parameters.go deleted file mode 100644 index 980f0309..00000000 --- a/v2/client/user/update_user_api_key_by_id_parameters.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateUserAPIKeyByIDParams creates a new UpdateUserAPIKeyByIDParams 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 NewUpdateUserAPIKeyByIDParams() *UpdateUserAPIKeyByIDParams { - return &UpdateUserAPIKeyByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserAPIKeyByIDParamsWithTimeout creates a new UpdateUserAPIKeyByIDParams object -// with the ability to set a timeout on a request. -func NewUpdateUserAPIKeyByIDParamsWithTimeout(timeout time.Duration) *UpdateUserAPIKeyByIDParams { - return &UpdateUserAPIKeyByIDParams{ - timeout: timeout, - } -} - -// NewUpdateUserAPIKeyByIDParamsWithContext creates a new UpdateUserAPIKeyByIDParams object -// with the ability to set a context for a request. -func NewUpdateUserAPIKeyByIDParamsWithContext(ctx context.Context) *UpdateUserAPIKeyByIDParams { - return &UpdateUserAPIKeyByIDParams{ - Context: ctx, - } -} - -// NewUpdateUserAPIKeyByIDParamsWithHTTPClient creates a new UpdateUserAPIKeyByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserAPIKeyByIDParamsWithHTTPClient(client *http.Client) *UpdateUserAPIKeyByIDParams { - return &UpdateUserAPIKeyByIDParams{ - HTTPClient: client, - } -} - -/* -UpdateUserAPIKeyByIDParams contains all the parameters to send to the API endpoint - - for the update user API key by Id operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserAPIKeyByIDParams struct { - - /* Body. - - Request to update a user API key - */ - Body *models.CreateOrUpdateAPIKeyRequest - - /* ID. - - Specify the id of the API key. - */ - ID string - - /* UserSid. - - Specify the SID of the API key owner. - */ - UserSid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserAPIKeyByIDParams) WithDefaults() *UpdateUserAPIKeyByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user API key by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserAPIKeyByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithTimeout(timeout time.Duration) *UpdateUserAPIKeyByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithContext(ctx context.Context) *UpdateUserAPIKeyByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithHTTPClient(client *http.Client) *UpdateUserAPIKeyByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithBody(body *models.CreateOrUpdateAPIKeyRequest) *UpdateUserAPIKeyByIDParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetBody(body *models.CreateOrUpdateAPIKeyRequest) { - o.Body = body -} - -// WithID adds the id to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithID(id string) *UpdateUserAPIKeyByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetID(id string) { - o.ID = id -} - -// WithUserSid adds the userSid to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) WithUserSid(userSid string) *UpdateUserAPIKeyByIDParams { - o.SetUserSid(userSid) - return o -} - -// SetUserSid adds the userSid to the update user API key by Id params -func (o *UpdateUserAPIKeyByIDParams) SetUserSid(userSid string) { - o.UserSid = userSid -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserAPIKeyByIDParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - // path param userSid - if err := r.SetPathParam("userSid", o.UserSid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/update_user_api_key_by_id_responses.go b/v2/client/user/update_user_api_key_by_id_responses.go deleted file mode 100644 index 9d723c47..00000000 --- a/v2/client/user/update_user_api_key_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateUserAPIKeyByIDReader is a Reader for the UpdateUserAPIKeyByID structure. -type UpdateUserAPIKeyByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserAPIKeyByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserAPIKeyByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserAPIKeyByIDDefault(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 - } -} - -// NewUpdateUserAPIKeyByIDOK creates a UpdateUserAPIKeyByIDOK with default headers values -func NewUpdateUserAPIKeyByIDOK() *UpdateUserAPIKeyByIDOK { - return &UpdateUserAPIKeyByIDOK{} -} - -/* -UpdateUserAPIKeyByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateUserAPIKeyByIDOK struct { - Payload *models.UserAPIKey -} - -// IsSuccess returns true when this update user Api key by Id o k response has a 2xx status code -func (o *UpdateUserAPIKeyByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user Api key by Id o k response has a 3xx status code -func (o *UpdateUserAPIKeyByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user Api key by Id o k response has a 4xx status code -func (o *UpdateUserAPIKeyByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user Api key by Id o k response has a 5xx status code -func (o *UpdateUserAPIKeyByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user Api key by Id o k response a status code equal to that given -func (o *UpdateUserAPIKeyByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user Api key by Id o k response -func (o *UpdateUserAPIKeyByIDOK) Code() int { - return 200 -} - -func (o *UpdateUserAPIKeyByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{userSid}/api-keys/{id}][%d] updateUserApiKeyByIdOK %s", 200, payload) -} - -func (o *UpdateUserAPIKeyByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{userSid}/api-keys/{id}][%d] updateUserApiKeyByIdOK %s", 200, payload) -} - -func (o *UpdateUserAPIKeyByIDOK) GetPayload() *models.UserAPIKey { - return o.Payload -} - -func (o *UpdateUserAPIKeyByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserAPIKey) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserAPIKeyByIDDefault creates a UpdateUserAPIKeyByIDDefault with default headers values -func NewUpdateUserAPIKeyByIDDefault(code int) *UpdateUserAPIKeyByIDDefault { - return &UpdateUserAPIKeyByIDDefault{ - _statusCode: code, - } -} - -/* -UpdateUserAPIKeyByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserAPIKeyByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update user API key by Id default response has a 2xx status code -func (o *UpdateUserAPIKeyByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user API key by Id default response has a 3xx status code -func (o *UpdateUserAPIKeyByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user API key by Id default response has a 4xx status code -func (o *UpdateUserAPIKeyByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user API key by Id default response has a 5xx status code -func (o *UpdateUserAPIKeyByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user API key by Id default response a status code equal to that given -func (o *UpdateUserAPIKeyByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user API key by Id default response -func (o *UpdateUserAPIKeyByIDDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserAPIKeyByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{userSid}/api-keys/{id}][%d] UpdateUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *UpdateUserAPIKeyByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{userSid}/api-keys/{id}][%d] UpdateUserAPIKeyById default %s", o._statusCode, payload) -} - -func (o *UpdateUserAPIKeyByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateUserAPIKeyByIDDefault) 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/user/update_user_parameters.go b/v2/client/user/update_user_parameters.go deleted file mode 100644 index a2ed46ed..00000000 --- a/v2/client/user/update_user_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateUserParams creates a new UpdateUserParams 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 NewUpdateUserParams() *UpdateUserParams { - return &UpdateUserParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateUserParamsWithTimeout creates a new UpdateUserParams object -// with the ability to set a timeout on a request. -func NewUpdateUserParamsWithTimeout(timeout time.Duration) *UpdateUserParams { - return &UpdateUserParams{ - timeout: timeout, - } -} - -// NewUpdateUserParamsWithContext creates a new UpdateUserParams object -// with the ability to set a context for a request. -func NewUpdateUserParamsWithContext(ctx context.Context) *UpdateUserParams { - return &UpdateUserParams{ - Context: ctx, - } -} - -// NewUpdateUserParamsWithHTTPClient creates a new UpdateUserParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateUserParamsWithHTTPClient(client *http.Client) *UpdateUserParams { - return &UpdateUserParams{ - HTTPClient: client, - } -} - -/* -UpdateUserParams contains all the parameters to send to the API endpoint - - for the update user operation. - - Typically these are written to a http.Request. -*/ -type UpdateUserParams struct { - - /* Body. - - Specifies the user information. - */ - Body *models.UpdateUserParameters - - /* Sid. - - Specify the SID of the user. - */ - Sid string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserParams) WithDefaults() *UpdateUserParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update user params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateUserParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update user params -func (o *UpdateUserParams) WithTimeout(timeout time.Duration) *UpdateUserParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update user params -func (o *UpdateUserParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update user params -func (o *UpdateUserParams) WithContext(ctx context.Context) *UpdateUserParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update user params -func (o *UpdateUserParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update user params -func (o *UpdateUserParams) WithHTTPClient(client *http.Client) *UpdateUserParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update user params -func (o *UpdateUserParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update user params -func (o *UpdateUserParams) WithBody(body *models.UpdateUserParameters) *UpdateUserParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update user params -func (o *UpdateUserParams) SetBody(body *models.UpdateUserParameters) { - o.Body = body -} - -// WithSid adds the sid to the update user params -func (o *UpdateUserParams) WithSid(sid string) *UpdateUserParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the update user params -func (o *UpdateUserParams) SetSid(sid string) { - o.Sid = sid -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateUserParams) 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 - } - } - - // path param sid - if err := r.SetPathParam("sid", o.Sid); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/user/update_user_responses.go b/v2/client/user/update_user_responses.go deleted file mode 100644 index 7d8595dc..00000000 --- a/v2/client/user/update_user_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateUserReader is a Reader for the UpdateUser structure. -type UpdateUserReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateUserOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateUserDefault(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 - } -} - -// NewUpdateUserOK creates a UpdateUserOK with default headers values -func NewUpdateUserOK() *UpdateUserOK { - return &UpdateUserOK{} -} - -/* -UpdateUserOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateUserOK struct { - Payload *models.UserParams -} - -// IsSuccess returns true when this update user o k response has a 2xx status code -func (o *UpdateUserOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update user o k response has a 3xx status code -func (o *UpdateUserOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update user o k response has a 4xx status code -func (o *UpdateUserOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update user o k response has a 5xx status code -func (o *UpdateUserOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update user o k response a status code equal to that given -func (o *UpdateUserOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update user o k response -func (o *UpdateUserOK) Code() int { - return 200 -} - -func (o *UpdateUserOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{sid}][%d] updateUserOK %s", 200, payload) -} - -func (o *UpdateUserOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{sid}][%d] updateUserOK %s", 200, payload) -} - -func (o *UpdateUserOK) GetPayload() *models.UserParams { - return o.Payload -} - -func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserParams) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateUserDefault creates a UpdateUserDefault with default headers values -func NewUpdateUserDefault(code int) *UpdateUserDefault { - return &UpdateUserDefault{ - _statusCode: code, - } -} - -/* -UpdateUserDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateUserDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update user default response has a 2xx status code -func (o *UpdateUserDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update user default response has a 3xx status code -func (o *UpdateUserDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update user default response has a 4xx status code -func (o *UpdateUserDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update user default response has a 5xx status code -func (o *UpdateUserDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update user default response a status code equal to that given -func (o *UpdateUserDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update user default response -func (o *UpdateUserDefault) Code() int { - return o._statusCode -} - -func (o *UpdateUserDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{sid}][%d] UpdateUser default %s", o._statusCode, payload) -} - -func (o *UpdateUserDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /users/{sid}][%d] UpdateUser default %s", o._statusCode, payload) -} - -func (o *UpdateUserDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateUserDefault) 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/user/user_client.go b/v2/client/user/user_client.go deleted file mode 100644 index 7a08cc20..00000000 --- a/v2/client/user/user_client.go +++ /dev/null @@ -1,1155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package user - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new user API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new user API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new user API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for user API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateGroup(params *CreateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateGroupCreated, error) - - CreateSession(params *CreateSessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateSessionCreated, error) - - CreateUserAPIKey(params *CreateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserAPIKeyCreated, error) - - CreateUsers(params *CreateUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUsersCreated, error) - - DeleteGroup(params *DeleteGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupNoContent, error) - - DeleteGroups(params *DeleteGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupsNoContent, error) - - DeleteSession(params *DeleteSessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSessionNoContent, error) - - DeleteUser(params *DeleteUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserNoContent, error) - - DeleteUserAPIKeyByID(params *DeleteUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserAPIKeyByIDNoContent, error) - - DeleteUsers(params *DeleteUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUsersNoContent, error) - - GetActiveSessionsCount(params *GetActiveSessionsCountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveSessionsCountOK, error) - - GetAllAPIKeys(params *GetAllAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllAPIKeysOK, error) - - GetGroupBySID(params *GetGroupBySIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupBySIDOK, error) - - GetGroups(params *GetGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupsOK, error) - - GetPrincipalSources(params *GetPrincipalSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrincipalSourcesOK, error) - - GetSecurityPrincipals(params *GetSecurityPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSecurityPrincipalsOK, error) - - GetUserAPIKeyByID(params *GetUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeyByIDOK, error) - - GetUserAPIKeys(params *GetUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeysOK, error) - - GetUserBySID(params *GetUserBySIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserBySIDOK, error) - - GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error) - - RegenerateS3Key(params *RegenerateS3KeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateS3KeyCreated, error) - - RotateUserAPIKey(params *RotateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RotateUserAPIKeyOK, error) - - UpdateGroup(params *UpdateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateGroupOK, error) - - UpdatePrincipalSources(params *UpdatePrincipalSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePrincipalSourcesOK, error) - - UpdateUser(params *UpdateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserOK, error) - - UpdateUserAPIKeyByID(params *UpdateUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserAPIKeyByIDOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateGroup creates groups - -If an Active Directory/IdP domain is specified, a new group is added to the Cohesity Cluster for the specified Active Directory/IdP group principal. If the LOCAL domain is specified, a new group is created directly in the default LOCAL domain on the Cohesity Cluster. -*/ -func (a *Client) CreateGroup(params *CreateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateGroupCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateGroupParams() - } - op := &runtime.ClientOperation{ - ID: "CreateGroup", - Method: "POST", - PathPattern: "/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateGroupReader{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.(*CreateGroupCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateSession creates a user session - -Create a user session -*/ -func (a *Client) CreateSession(params *CreateSessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateSessionCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateSessionParams() - } - op := &runtime.ClientOperation{ - ID: "CreateSession", - Method: "POST", - PathPattern: "/users/sessions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateSessionReader{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.(*CreateSessionCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateSessionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateUserAPIKey creates a new user API key - -Create a new user API key. -*/ -func (a *Client) CreateUserAPIKey(params *CreateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserAPIKeyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "CreateUserAPIKey", - Method: "POST", - PathPattern: "/users/{userSid}/api-keys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateUserAPIKeyReader{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.(*CreateUserAPIKeyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateUsers adds one or more users to cohesity cluster - -Add one or more users to Cohesity Cluster. -*/ -func (a *Client) CreateUsers(params *CreateUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUsersCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateUsersParams() - } - op := &runtime.ClientOperation{ - ID: "CreateUsers", - Method: "POST", - PathPattern: "/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateUsersReader{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.(*CreateUsersCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteGroup deletes group - -If the group on the Cohesity Cluster was added for an Active Directory/IdP group, the referenced principal group on the Active Directory/IdP domain is NOT deleted. Only the group on the Cohesity Cluster is deleted. -*/ -func (a *Client) DeleteGroup(params *DeleteGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteGroupParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteGroup", - Method: "DELETE", - PathPattern: "/groups/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteGroupReader{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.(*DeleteGroupNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteGroups deletes groups - -If the Cohesity group was created against an Active Directory/IdP, the referenced principal group on the Active Directory/IdP domain is NOT deleted. Only the group on the Cohesity Cluster is deleted. -*/ -func (a *Client) DeleteGroups(params *DeleteGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteGroupsNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteGroups", - Method: "POST", - PathPattern: "/groups/delete", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteGroupsReader{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.(*DeleteGroupsNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteSession deletes user sessions - -Deletes all sessions for given user sid or system wide sessions -*/ -func (a *Client) DeleteSession(params *DeleteSessionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteSessionNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteSessionParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteSession", - Method: "DELETE", - PathPattern: "/users/sessions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteSessionReader{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.(*DeleteSessionNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteSessionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteUser deletes a cohesity l o c a l Id p a d user - -Delete a Cohesity user. -*/ -func (a *Client) DeleteUser(params *DeleteUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUserParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUser", - Method: "DELETE", - PathPattern: "/users/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUserReader{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.(*DeleteUserNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUserDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteUserAPIKeyByID deletes a user API key - -Delete a user API key. -*/ -func (a *Client) DeleteUserAPIKeyByID(params *DeleteUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserAPIKeyByIDNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUserAPIKeyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUserAPIKeyById", - Method: "DELETE", - PathPattern: "/users/{userSid}/api-keys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUserAPIKeyByIDReader{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.(*DeleteUserAPIKeyByIDNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUserAPIKeyByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteUsers deletes one or more cohesity users - -Delete one or more Cohesity users. -*/ -func (a *Client) DeleteUsers(params *DeleteUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUsersNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteUsersParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteUsers", - Method: "POST", - PathPattern: "/users/delete", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteUsersReader{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.(*DeleteUsersNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetActiveSessionsCount gets sessions count - -Get the number of user sessions. -*/ -func (a *Client) GetActiveSessionsCount(params *GetActiveSessionsCountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetActiveSessionsCountOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetActiveSessionsCountParams() - } - op := &runtime.ClientOperation{ - ID: "GetActiveSessionsCount", - Method: "GET", - PathPattern: "/users/sessions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetActiveSessionsCountReader{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.(*GetActiveSessionsCountOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetActiveSessionsCountDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetAllAPIKeys gets the list of all API keys which are created or owned by the user - -Get the list of all API keys which are created or owned by the user. -*/ -func (a *Client) GetAllAPIKeys(params *GetAllAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAllAPIKeysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAllAPIKeysParams() - } - op := &runtime.ClientOperation{ - ID: "GetAllAPIKeys", - Method: "GET", - PathPattern: "/api-keys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetAllAPIKeysReader{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.(*GetAllAPIKeysOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetAllAPIKeysDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetGroupBySID gets group by s ID - -Get Group by SID. -*/ -func (a *Client) GetGroupBySID(params *GetGroupBySIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupBySIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetGroupBySIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetGroupBySID", - Method: "GET", - PathPattern: "/groups/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetGroupBySIDReader{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.(*GetGroupBySIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetGroupBySIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetGroups gets groups - -Get groups on the Cohesity cluster. -*/ -func (a *Client) GetGroups(params *GetGroupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "GetGroups", - Method: "GET", - PathPattern: "/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetGroupsReader{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.(*GetGroupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetGroupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPrincipalSources fetches sources and views assigned to a user group - -Fetches all the sources assigned to a principal. -*/ -func (a *Client) GetPrincipalSources(params *GetPrincipalSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPrincipalSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPrincipalSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPrincipalSources", - Method: "GET", - PathPattern: "/security-principals/{sid}/sources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetPrincipalSourcesReader{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.(*GetPrincipalSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPrincipalSourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetSecurityPrincipals gets security principals - -Get Security Principals -*/ -func (a *Client) GetSecurityPrincipals(params *GetSecurityPrincipalsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSecurityPrincipalsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSecurityPrincipalsParams() - } - op := &runtime.ClientOperation{ - ID: "GetSecurityPrincipals", - Method: "GET", - PathPattern: "/security-principals", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSecurityPrincipalsReader{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.(*GetSecurityPrincipalsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSecurityPrincipalsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserAPIKeyByID gets the API key by id - -Get the API key by id. -*/ -func (a *Client) GetUserAPIKeyByID(params *GetUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeyByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserAPIKeyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserAPIKeyById", - Method: "GET", - PathPattern: "/users/{userSid}/api-keys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserAPIKeyByIDReader{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.(*GetUserAPIKeyByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserAPIKeyByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserAPIKeys gets the list of API keys owned by the user - -Returns the list of API keys owned by the user. For security reasons there is no way to retrieve the key itself after it's created. -*/ -func (a *Client) GetUserAPIKeys(params *GetUserAPIKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserAPIKeysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserAPIKeysParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserAPIKeys", - Method: "GET", - PathPattern: "/users/{userSid}/api-keys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserAPIKeysReader{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.(*GetUserAPIKeysOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserAPIKeysDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUserBySID gets user by s ID - -Get User by SID. -*/ -func (a *Client) GetUserBySID(params *GetUserBySIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserBySIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUserBySIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetUserBySID", - Method: "GET", - PathPattern: "/users/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUserBySIDReader{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.(*GetUserBySIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUserBySIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetUsers gets users - -Get Users. -*/ -func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetUsersParams() - } - op := &runtime.ClientOperation{ - ID: "GetUsers", - Method: "GET", - PathPattern: "/users", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetUsersReader{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.(*GetUsersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetUsersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegenerateS3Key resets s3 secret access key - -Reset the S3 secret access key for the specified user on the Cohesity Cluster. Admin users who have the Manage Users privilege can generate keys for other users. When generating a new key, anyone using the old key will lose access until they retrieve and use the newly generated key. The user must have the following privilege to access this endpoint, 'Manage S3 Keys'. -*/ -func (a *Client) RegenerateS3Key(params *RegenerateS3KeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RegenerateS3KeyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegenerateS3KeyParams() - } - op := &runtime.ClientOperation{ - ID: "RegenerateS3Key", - Method: "POST", - PathPattern: "/users/{sid}/s3-secret-key", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RegenerateS3KeyReader{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.(*RegenerateS3KeyCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegenerateS3KeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RotateUserAPIKey refreshes an existing user API key - -Refresh an existing user API key. -*/ -func (a *Client) RotateUserAPIKey(params *RotateUserAPIKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RotateUserAPIKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRotateUserAPIKeyParams() - } - op := &runtime.ClientOperation{ - ID: "RotateUserAPIKey", - Method: "POST", - PathPattern: "/users/{userSid}/api-keys/{id}/rotate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &RotateUserAPIKeyReader{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.(*RotateUserAPIKeyOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RotateUserAPIKeyDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateGroup updates group - -Only group settings on the Cohesity Cluster are updated. No changes are made to the referenced group principal on the Active Directory/IdP. -*/ -func (a *Client) UpdateGroup(params *UpdateGroupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateGroupOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateGroupParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateGroup", - Method: "PUT", - PathPattern: "/groups/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateGroupReader{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.(*UpdateGroupOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateGroupDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdatePrincipalSources updates protection sources assigned to a user group - -Update protection sources assigned to a user/group. -*/ -func (a *Client) UpdatePrincipalSources(params *UpdatePrincipalSourcesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePrincipalSourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdatePrincipalSourcesParams() - } - op := &runtime.ClientOperation{ - ID: "UpdatePrincipalSources", - Method: "PUT", - PathPattern: "/security-principals/{sid}/sources", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdatePrincipalSourcesReader{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.(*UpdatePrincipalSourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdatePrincipalSourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUser updates user information - -Update an existing user on the Cohesity Cluster. Only user settings on the Cohesity Cluster are updated. No changes are made to the referenced user principal on the Active Directory/IdP. -*/ -func (a *Client) UpdateUser(params *UpdateUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUser", - Method: "PUT", - PathPattern: "/users/{sid}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserReader{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.(*UpdateUserOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateUserAPIKeyByID updates a user API key - -Update a user API key. -*/ -func (a *Client) UpdateUserAPIKeyByID(params *UpdateUserAPIKeyByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserAPIKeyByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateUserAPIKeyByIDParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateUserAPIKeyById", - Method: "PUT", - PathPattern: "/users/{userSid}/api-keys/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateUserAPIKeyByIDReader{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.(*UpdateUserAPIKeyByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateUserAPIKeyByIDDefault) - 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/v2/client/view/add_view_user_quota_overrides_parameters.go b/v2/client/view/add_view_user_quota_overrides_parameters.go deleted file mode 100644 index fcd14d68..00000000 --- a/v2/client/view/add_view_user_quota_overrides_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewAddViewUserQuotaOverridesParams creates a new AddViewUserQuotaOverridesParams 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 NewAddViewUserQuotaOverridesParams() *AddViewUserQuotaOverridesParams { - return &AddViewUserQuotaOverridesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddViewUserQuotaOverridesParamsWithTimeout creates a new AddViewUserQuotaOverridesParams object -// with the ability to set a timeout on a request. -func NewAddViewUserQuotaOverridesParamsWithTimeout(timeout time.Duration) *AddViewUserQuotaOverridesParams { - return &AddViewUserQuotaOverridesParams{ - timeout: timeout, - } -} - -// NewAddViewUserQuotaOverridesParamsWithContext creates a new AddViewUserQuotaOverridesParams object -// with the ability to set a context for a request. -func NewAddViewUserQuotaOverridesParamsWithContext(ctx context.Context) *AddViewUserQuotaOverridesParams { - return &AddViewUserQuotaOverridesParams{ - Context: ctx, - } -} - -// NewAddViewUserQuotaOverridesParamsWithHTTPClient creates a new AddViewUserQuotaOverridesParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddViewUserQuotaOverridesParamsWithHTTPClient(client *http.Client) *AddViewUserQuotaOverridesParams { - return &AddViewUserQuotaOverridesParams{ - HTTPClient: client, - } -} - -/* -AddViewUserQuotaOverridesParams contains all the parameters to send to the API endpoint - - for the add view user quota overrides operation. - - Typically these are written to a http.Request. -*/ -type AddViewUserQuotaOverridesParams struct { - - /* Body. - - Specifies the parameters to override the default user quota on the view. - */ - Body *models.UserQuotaOverrides - - /* ViewID. - - Specifies the id of a view. - - Format: int64 - */ - ViewID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add view user quota overrides params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddViewUserQuotaOverridesParams) WithDefaults() *AddViewUserQuotaOverridesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add view user quota overrides params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddViewUserQuotaOverridesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) WithTimeout(timeout time.Duration) *AddViewUserQuotaOverridesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) WithContext(ctx context.Context) *AddViewUserQuotaOverridesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) WithHTTPClient(client *http.Client) *AddViewUserQuotaOverridesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) WithBody(body *models.UserQuotaOverrides) *AddViewUserQuotaOverridesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) SetBody(body *models.UserQuotaOverrides) { - o.Body = body -} - -// WithViewID adds the viewID to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) WithViewID(viewID int64) *AddViewUserQuotaOverridesParams { - o.SetViewID(viewID) - return o -} - -// SetViewID adds the viewId to the add view user quota overrides params -func (o *AddViewUserQuotaOverridesParams) SetViewID(viewID int64) { - o.ViewID = viewID -} - -// WriteToRequest writes these params to a swagger request -func (o *AddViewUserQuotaOverridesParams) 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 - } - } - - // path param viewId - if err := r.SetPathParam("viewId", swag.FormatInt64(o.ViewID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/add_view_user_quota_overrides_responses.go b/v2/client/view/add_view_user_quota_overrides_responses.go deleted file mode 100644 index c7ed6150..00000000 --- a/v2/client/view/add_view_user_quota_overrides_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// AddViewUserQuotaOverridesReader is a Reader for the AddViewUserQuotaOverrides structure. -type AddViewUserQuotaOverridesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddViewUserQuotaOverridesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewAddViewUserQuotaOverridesCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddViewUserQuotaOverridesDefault(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 - } -} - -// NewAddViewUserQuotaOverridesCreated creates a AddViewUserQuotaOverridesCreated with default headers values -func NewAddViewUserQuotaOverridesCreated() *AddViewUserQuotaOverridesCreated { - return &AddViewUserQuotaOverridesCreated{} -} - -/* -AddViewUserQuotaOverridesCreated describes a response with status code 201, with default header values. - -Success -*/ -type AddViewUserQuotaOverridesCreated struct { - Payload *models.UserQuotaOverrides -} - -// IsSuccess returns true when this add view user quota overrides created response has a 2xx status code -func (o *AddViewUserQuotaOverridesCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this add view user quota overrides created response has a 3xx status code -func (o *AddViewUserQuotaOverridesCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this add view user quota overrides created response has a 4xx status code -func (o *AddViewUserQuotaOverridesCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this add view user quota overrides created response has a 5xx status code -func (o *AddViewUserQuotaOverridesCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this add view user quota overrides created response a status code equal to that given -func (o *AddViewUserQuotaOverridesCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the add view user quota overrides created response -func (o *AddViewUserQuotaOverridesCreated) Code() int { - return 201 -} - -func (o *AddViewUserQuotaOverridesCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{viewId}/user-quotas][%d] addViewUserQuotaOverridesCreated %s", 201, payload) -} - -func (o *AddViewUserQuotaOverridesCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{viewId}/user-quotas][%d] addViewUserQuotaOverridesCreated %s", 201, payload) -} - -func (o *AddViewUserQuotaOverridesCreated) GetPayload() *models.UserQuotaOverrides { - return o.Payload -} - -func (o *AddViewUserQuotaOverridesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserQuotaOverrides) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddViewUserQuotaOverridesDefault creates a AddViewUserQuotaOverridesDefault with default headers values -func NewAddViewUserQuotaOverridesDefault(code int) *AddViewUserQuotaOverridesDefault { - return &AddViewUserQuotaOverridesDefault{ - _statusCode: code, - } -} - -/* -AddViewUserQuotaOverridesDefault describes a response with status code -1, with default header values. - -Error -*/ -type AddViewUserQuotaOverridesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this add view user quota overrides default response has a 2xx status code -func (o *AddViewUserQuotaOverridesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this add view user quota overrides default response has a 3xx status code -func (o *AddViewUserQuotaOverridesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this add view user quota overrides default response has a 4xx status code -func (o *AddViewUserQuotaOverridesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this add view user quota overrides default response has a 5xx status code -func (o *AddViewUserQuotaOverridesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this add view user quota overrides default response a status code equal to that given -func (o *AddViewUserQuotaOverridesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the add view user quota overrides default response -func (o *AddViewUserQuotaOverridesDefault) Code() int { - return o._statusCode -} - -func (o *AddViewUserQuotaOverridesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{viewId}/user-quotas][%d] AddViewUserQuotaOverrides default %s", o._statusCode, payload) -} - -func (o *AddViewUserQuotaOverridesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{viewId}/user-quotas][%d] AddViewUserQuotaOverrides default %s", o._statusCode, payload) -} - -func (o *AddViewUserQuotaOverridesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *AddViewUserQuotaOverridesDefault) 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/view/clear_nlm_locks_parameters.go b/v2/client/view/clear_nlm_locks_parameters.go deleted file mode 100644 index 068ece6b..00000000 --- a/v2/client/view/clear_nlm_locks_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewClearNlmLocksParams creates a new ClearNlmLocksParams 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 NewClearNlmLocksParams() *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewClearNlmLocksParamsWithTimeout creates a new ClearNlmLocksParams object -// with the ability to set a timeout on a request. -func NewClearNlmLocksParamsWithTimeout(timeout time.Duration) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - timeout: timeout, - } -} - -// NewClearNlmLocksParamsWithContext creates a new ClearNlmLocksParams object -// with the ability to set a context for a request. -func NewClearNlmLocksParamsWithContext(ctx context.Context) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - Context: ctx, - } -} - -// NewClearNlmLocksParamsWithHTTPClient creates a new ClearNlmLocksParams object -// with the ability to set a custom HTTPClient for a request. -func NewClearNlmLocksParamsWithHTTPClient(client *http.Client) *ClearNlmLocksParams { - return &ClearNlmLocksParams{ - HTTPClient: client, - } -} - -/* -ClearNlmLocksParams contains all the parameters to send to the API endpoint - - for the clear nlm locks operation. - - Typically these are written to a http.Request. -*/ -type ClearNlmLocksParams struct { - - /* Body. - - Request to clear NLM lock. - */ - Body *models.ClearNlmLockRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clear nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearNlmLocksParams) WithDefaults() *ClearNlmLocksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clear nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ClearNlmLocksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clear nlm locks params -func (o *ClearNlmLocksParams) WithTimeout(timeout time.Duration) *ClearNlmLocksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clear nlm locks params -func (o *ClearNlmLocksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clear nlm locks params -func (o *ClearNlmLocksParams) WithContext(ctx context.Context) *ClearNlmLocksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clear nlm locks params -func (o *ClearNlmLocksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clear nlm locks params -func (o *ClearNlmLocksParams) WithHTTPClient(client *http.Client) *ClearNlmLocksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clear nlm locks params -func (o *ClearNlmLocksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clear nlm locks params -func (o *ClearNlmLocksParams) WithBody(body *models.ClearNlmLockRequest) *ClearNlmLocksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clear nlm locks params -func (o *ClearNlmLocksParams) SetBody(body *models.ClearNlmLockRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ClearNlmLocksParams) 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/view/clear_nlm_locks_responses.go b/v2/client/view/clear_nlm_locks_responses.go deleted file mode 100644 index 30a63a24..00000000 --- a/v2/client/view/clear_nlm_locks_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ClearNlmLocksReader is a Reader for the ClearNlmLocks structure. -type ClearNlmLocksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ClearNlmLocksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewClearNlmLocksNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewClearNlmLocksDefault(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 - } -} - -// NewClearNlmLocksNoContent creates a ClearNlmLocksNoContent with default headers values -func NewClearNlmLocksNoContent() *ClearNlmLocksNoContent { - return &ClearNlmLocksNoContent{} -} - -/* -ClearNlmLocksNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type ClearNlmLocksNoContent struct { -} - -// IsSuccess returns true when this clear nlm locks no content response has a 2xx status code -func (o *ClearNlmLocksNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clear nlm locks no content response has a 3xx status code -func (o *ClearNlmLocksNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clear nlm locks no content response has a 4xx status code -func (o *ClearNlmLocksNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this clear nlm locks no content response has a 5xx status code -func (o *ClearNlmLocksNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this clear nlm locks no content response a status code equal to that given -func (o *ClearNlmLocksNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the clear nlm locks no content response -func (o *ClearNlmLocksNoContent) Code() int { - return 204 -} - -func (o *ClearNlmLocksNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/nlm-locks][%d] clearNlmLocksNoContent", 204) -} - -func (o *ClearNlmLocksNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/nlm-locks][%d] clearNlmLocksNoContent", 204) -} - -func (o *ClearNlmLocksNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewClearNlmLocksDefault creates a ClearNlmLocksDefault with default headers values -func NewClearNlmLocksDefault(code int) *ClearNlmLocksDefault { - return &ClearNlmLocksDefault{ - _statusCode: code, - } -} - -/* -ClearNlmLocksDefault describes a response with status code -1, with default header values. - -Error -*/ -type ClearNlmLocksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this clear nlm locks default response has a 2xx status code -func (o *ClearNlmLocksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clear nlm locks default response has a 3xx status code -func (o *ClearNlmLocksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clear nlm locks default response has a 4xx status code -func (o *ClearNlmLocksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clear nlm locks default response has a 5xx status code -func (o *ClearNlmLocksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clear nlm locks default response a status code equal to that given -func (o *ClearNlmLocksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clear nlm locks default response -func (o *ClearNlmLocksDefault) Code() int { - return o._statusCode -} - -func (o *ClearNlmLocksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/nlm-locks][%d] ClearNlmLocks default %s", o._statusCode, payload) -} - -func (o *ClearNlmLocksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/nlm-locks][%d] ClearNlmLocks default %s", o._statusCode, payload) -} - -func (o *ClearNlmLocksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ClearNlmLocksDefault) 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/view/clone_view_directory_parameters.go b/v2/client/view/clone_view_directory_parameters.go deleted file mode 100644 index e364a59c..00000000 --- a/v2/client/view/clone_view_directory_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCloneViewDirectoryParams creates a new CloneViewDirectoryParams 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 NewCloneViewDirectoryParams() *CloneViewDirectoryParams { - return &CloneViewDirectoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneViewDirectoryParamsWithTimeout creates a new CloneViewDirectoryParams object -// with the ability to set a timeout on a request. -func NewCloneViewDirectoryParamsWithTimeout(timeout time.Duration) *CloneViewDirectoryParams { - return &CloneViewDirectoryParams{ - timeout: timeout, - } -} - -// NewCloneViewDirectoryParamsWithContext creates a new CloneViewDirectoryParams object -// with the ability to set a context for a request. -func NewCloneViewDirectoryParamsWithContext(ctx context.Context) *CloneViewDirectoryParams { - return &CloneViewDirectoryParams{ - Context: ctx, - } -} - -// NewCloneViewDirectoryParamsWithHTTPClient creates a new CloneViewDirectoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneViewDirectoryParamsWithHTTPClient(client *http.Client) *CloneViewDirectoryParams { - return &CloneViewDirectoryParams{ - HTTPClient: client, - } -} - -/* -CloneViewDirectoryParams contains all the parameters to send to the API endpoint - - for the clone view directory operation. - - Typically these are written to a http.Request. -*/ -type CloneViewDirectoryParams struct { - - /* Body. - - Specifies the request to clone View directory. - */ - Body *models.CloneViewDirectoryParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone view directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewDirectoryParams) WithDefaults() *CloneViewDirectoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone view directory params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewDirectoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone view directory params -func (o *CloneViewDirectoryParams) WithTimeout(timeout time.Duration) *CloneViewDirectoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone view directory params -func (o *CloneViewDirectoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone view directory params -func (o *CloneViewDirectoryParams) WithContext(ctx context.Context) *CloneViewDirectoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone view directory params -func (o *CloneViewDirectoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone view directory params -func (o *CloneViewDirectoryParams) WithHTTPClient(client *http.Client) *CloneViewDirectoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone view directory params -func (o *CloneViewDirectoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone view directory params -func (o *CloneViewDirectoryParams) WithBody(body *models.CloneViewDirectoryParams) *CloneViewDirectoryParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone view directory params -func (o *CloneViewDirectoryParams) SetBody(body *models.CloneViewDirectoryParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneViewDirectoryParams) 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/view/clone_view_directory_responses.go b/v2/client/view/clone_view_directory_responses.go deleted file mode 100644 index 59a246ce..00000000 --- a/v2/client/view/clone_view_directory_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CloneViewDirectoryReader is a Reader for the CloneViewDirectory structure. -type CloneViewDirectoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneViewDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCloneViewDirectoryNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneViewDirectoryDefault(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 - } -} - -// NewCloneViewDirectoryNoContent creates a CloneViewDirectoryNoContent with default headers values -func NewCloneViewDirectoryNoContent() *CloneViewDirectoryNoContent { - return &CloneViewDirectoryNoContent{} -} - -/* -CloneViewDirectoryNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CloneViewDirectoryNoContent struct { -} - -// IsSuccess returns true when this clone view directory no content response has a 2xx status code -func (o *CloneViewDirectoryNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone view directory no content response has a 3xx status code -func (o *CloneViewDirectoryNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone view directory no content response has a 4xx status code -func (o *CloneViewDirectoryNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone view directory no content response has a 5xx status code -func (o *CloneViewDirectoryNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this clone view directory no content response a status code equal to that given -func (o *CloneViewDirectoryNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the clone view directory no content response -func (o *CloneViewDirectoryNoContent) Code() int { - return 204 -} - -func (o *CloneViewDirectoryNoContent) Error() string { - return fmt.Sprintf("[POST /file-services/views/clone-directory][%d] cloneViewDirectoryNoContent", 204) -} - -func (o *CloneViewDirectoryNoContent) String() string { - return fmt.Sprintf("[POST /file-services/views/clone-directory][%d] cloneViewDirectoryNoContent", 204) -} - -func (o *CloneViewDirectoryNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCloneViewDirectoryDefault creates a CloneViewDirectoryDefault with default headers values -func NewCloneViewDirectoryDefault(code int) *CloneViewDirectoryDefault { - return &CloneViewDirectoryDefault{ - _statusCode: code, - } -} - -/* -CloneViewDirectoryDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloneViewDirectoryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this clone view directory default response has a 2xx status code -func (o *CloneViewDirectoryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone view directory default response has a 3xx status code -func (o *CloneViewDirectoryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone view directory default response has a 4xx status code -func (o *CloneViewDirectoryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone view directory default response has a 5xx status code -func (o *CloneViewDirectoryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone view directory default response a status code equal to that given -func (o *CloneViewDirectoryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone view directory default response -func (o *CloneViewDirectoryDefault) Code() int { - return o._statusCode -} - -func (o *CloneViewDirectoryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/clone-directory][%d] CloneViewDirectory default %s", o._statusCode, payload) -} - -func (o *CloneViewDirectoryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/clone-directory][%d] CloneViewDirectory default %s", o._statusCode, payload) -} - -func (o *CloneViewDirectoryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CloneViewDirectoryDefault) 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/view/clone_view_parameters.go b/v2/client/view/clone_view_parameters.go deleted file mode 100644 index d0ad6122..00000000 --- a/v2/client/view/clone_view_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCloneViewParams creates a new CloneViewParams 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 NewCloneViewParams() *CloneViewParams { - return &CloneViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloneViewParamsWithTimeout creates a new CloneViewParams object -// with the ability to set a timeout on a request. -func NewCloneViewParamsWithTimeout(timeout time.Duration) *CloneViewParams { - return &CloneViewParams{ - timeout: timeout, - } -} - -// NewCloneViewParamsWithContext creates a new CloneViewParams object -// with the ability to set a context for a request. -func NewCloneViewParamsWithContext(ctx context.Context) *CloneViewParams { - return &CloneViewParams{ - Context: ctx, - } -} - -// NewCloneViewParamsWithHTTPClient creates a new CloneViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloneViewParamsWithHTTPClient(client *http.Client) *CloneViewParams { - return &CloneViewParams{ - HTTPClient: client, - } -} - -/* -CloneViewParams contains all the parameters to send to the API endpoint - - for the clone view operation. - - Typically these are written to a http.Request. -*/ -type CloneViewParams struct { - - /* Body. - - Specifies the request to clone the View. - */ - Body *models.CloneViewParams - - /* ID. - - Specifies the View id to clone. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the clone view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewParams) WithDefaults() *CloneViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the clone view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloneViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the clone view params -func (o *CloneViewParams) WithTimeout(timeout time.Duration) *CloneViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the clone view params -func (o *CloneViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the clone view params -func (o *CloneViewParams) WithContext(ctx context.Context) *CloneViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the clone view params -func (o *CloneViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the clone view params -func (o *CloneViewParams) WithHTTPClient(client *http.Client) *CloneViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the clone view params -func (o *CloneViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the clone view params -func (o *CloneViewParams) WithBody(body *models.CloneViewParams) *CloneViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the clone view params -func (o *CloneViewParams) SetBody(body *models.CloneViewParams) { - o.Body = body -} - -// WithID adds the id to the clone view params -func (o *CloneViewParams) WithID(id int64) *CloneViewParams { - o.SetID(id) - return o -} - -// SetID adds the id to the clone view params -func (o *CloneViewParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CloneViewParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/clone_view_responses.go b/v2/client/view/clone_view_responses.go deleted file mode 100644 index 1271d988..00000000 --- a/v2/client/view/clone_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CloneViewReader is a Reader for the CloneView structure. -type CloneViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloneViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCloneViewCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloneViewDefault(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 - } -} - -// NewCloneViewCreated creates a CloneViewCreated with default headers values -func NewCloneViewCreated() *CloneViewCreated { - return &CloneViewCreated{} -} - -/* -CloneViewCreated describes a response with status code 201, with default header values. - -Success -*/ -type CloneViewCreated struct { - Payload *models.View -} - -// IsSuccess returns true when this clone view created response has a 2xx status code -func (o *CloneViewCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this clone view created response has a 3xx status code -func (o *CloneViewCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this clone view created response has a 4xx status code -func (o *CloneViewCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this clone view created response has a 5xx status code -func (o *CloneViewCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this clone view created response a status code equal to that given -func (o *CloneViewCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the clone view created response -func (o *CloneViewCreated) Code() int { - return 201 -} - -func (o *CloneViewCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/clone][%d] cloneViewCreated %s", 201, payload) -} - -func (o *CloneViewCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/clone][%d] cloneViewCreated %s", 201, payload) -} - -func (o *CloneViewCreated) GetPayload() *models.View { - return o.Payload -} - -func (o *CloneViewCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCloneViewDefault creates a CloneViewDefault with default headers values -func NewCloneViewDefault(code int) *CloneViewDefault { - return &CloneViewDefault{ - _statusCode: code, - } -} - -/* -CloneViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloneViewDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this clone view default response has a 2xx status code -func (o *CloneViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this clone view default response has a 3xx status code -func (o *CloneViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this clone view default response has a 4xx status code -func (o *CloneViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this clone view default response has a 5xx status code -func (o *CloneViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this clone view default response a status code equal to that given -func (o *CloneViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the clone view default response -func (o *CloneViewDefault) Code() int { - return o._statusCode -} - -func (o *CloneViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/clone][%d] CloneView default %s", o._statusCode, payload) -} - -func (o *CloneViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/clone][%d] CloneView default %s", o._statusCode, payload) -} - -func (o *CloneViewDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CloneViewDefault) 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/view/close_smb_file_open_parameters.go b/v2/client/view/close_smb_file_open_parameters.go deleted file mode 100644 index cc5ee2e5..00000000 --- a/v2/client/view/close_smb_file_open_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCloseSmbFileOpenParams creates a new CloseSmbFileOpenParams 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 NewCloseSmbFileOpenParams() *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCloseSmbFileOpenParamsWithTimeout creates a new CloseSmbFileOpenParams object -// with the ability to set a timeout on a request. -func NewCloseSmbFileOpenParamsWithTimeout(timeout time.Duration) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - timeout: timeout, - } -} - -// NewCloseSmbFileOpenParamsWithContext creates a new CloseSmbFileOpenParams object -// with the ability to set a context for a request. -func NewCloseSmbFileOpenParamsWithContext(ctx context.Context) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - Context: ctx, - } -} - -// NewCloseSmbFileOpenParamsWithHTTPClient creates a new CloseSmbFileOpenParams object -// with the ability to set a custom HTTPClient for a request. -func NewCloseSmbFileOpenParamsWithHTTPClient(client *http.Client) *CloseSmbFileOpenParams { - return &CloseSmbFileOpenParams{ - HTTPClient: client, - } -} - -/* -CloseSmbFileOpenParams contains all the parameters to send to the API endpoint - - for the close smb file open operation. - - Typically these are written to a http.Request. -*/ -type CloseSmbFileOpenParams struct { - - /* Body. - - Specifies parameters to close active SMB file open. - */ - Body *models.CloseSmbFileOpenParams - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the close smb file open params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloseSmbFileOpenParams) WithDefaults() *CloseSmbFileOpenParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the close smb file open params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CloseSmbFileOpenParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the close smb file open params -func (o *CloseSmbFileOpenParams) WithTimeout(timeout time.Duration) *CloseSmbFileOpenParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the close smb file open params -func (o *CloseSmbFileOpenParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the close smb file open params -func (o *CloseSmbFileOpenParams) WithContext(ctx context.Context) *CloseSmbFileOpenParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the close smb file open params -func (o *CloseSmbFileOpenParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the close smb file open params -func (o *CloseSmbFileOpenParams) WithHTTPClient(client *http.Client) *CloseSmbFileOpenParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the close smb file open params -func (o *CloseSmbFileOpenParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the close smb file open params -func (o *CloseSmbFileOpenParams) WithBody(body *models.CloseSmbFileOpenParams) *CloseSmbFileOpenParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the close smb file open params -func (o *CloseSmbFileOpenParams) SetBody(body *models.CloseSmbFileOpenParams) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CloseSmbFileOpenParams) 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/view/close_smb_file_open_responses.go b/v2/client/view/close_smb_file_open_responses.go deleted file mode 100644 index 79cb112f..00000000 --- a/v2/client/view/close_smb_file_open_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CloseSmbFileOpenReader is a Reader for the CloseSmbFileOpen structure. -type CloseSmbFileOpenReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CloseSmbFileOpenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewCloseSmbFileOpenNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCloseSmbFileOpenDefault(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 - } -} - -// NewCloseSmbFileOpenNoContent creates a CloseSmbFileOpenNoContent with default headers values -func NewCloseSmbFileOpenNoContent() *CloseSmbFileOpenNoContent { - return &CloseSmbFileOpenNoContent{} -} - -/* -CloseSmbFileOpenNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type CloseSmbFileOpenNoContent struct { -} - -// IsSuccess returns true when this close smb file open no content response has a 2xx status code -func (o *CloseSmbFileOpenNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this close smb file open no content response has a 3xx status code -func (o *CloseSmbFileOpenNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this close smb file open no content response has a 4xx status code -func (o *CloseSmbFileOpenNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this close smb file open no content response has a 5xx status code -func (o *CloseSmbFileOpenNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this close smb file open no content response a status code equal to that given -func (o *CloseSmbFileOpenNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the close smb file open no content response -func (o *CloseSmbFileOpenNoContent) Code() int { - return 204 -} - -func (o *CloseSmbFileOpenNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/smb-file-opens][%d] closeSmbFileOpenNoContent", 204) -} - -func (o *CloseSmbFileOpenNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/smb-file-opens][%d] closeSmbFileOpenNoContent", 204) -} - -func (o *CloseSmbFileOpenNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewCloseSmbFileOpenDefault creates a CloseSmbFileOpenDefault with default headers values -func NewCloseSmbFileOpenDefault(code int) *CloseSmbFileOpenDefault { - return &CloseSmbFileOpenDefault{ - _statusCode: code, - } -} - -/* -CloseSmbFileOpenDefault describes a response with status code -1, with default header values. - -Error -*/ -type CloseSmbFileOpenDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this close smb file open default response has a 2xx status code -func (o *CloseSmbFileOpenDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this close smb file open default response has a 3xx status code -func (o *CloseSmbFileOpenDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this close smb file open default response has a 4xx status code -func (o *CloseSmbFileOpenDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this close smb file open default response has a 5xx status code -func (o *CloseSmbFileOpenDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this close smb file open default response a status code equal to that given -func (o *CloseSmbFileOpenDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the close smb file open default response -func (o *CloseSmbFileOpenDefault) Code() int { - return o._statusCode -} - -func (o *CloseSmbFileOpenDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/smb-file-opens][%d] CloseSmbFileOpen default %s", o._statusCode, payload) -} - -func (o *CloseSmbFileOpenDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/smb-file-opens][%d] CloseSmbFileOpen default %s", o._statusCode, payload) -} - -func (o *CloseSmbFileOpenDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CloseSmbFileOpenDefault) 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/view/create_share_parameters.go b/v2/client/view/create_share_parameters.go deleted file mode 100644 index 4abcd37c..00000000 --- a/v2/client/view/create_share_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateShareParams creates a new CreateShareParams 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 NewCreateShareParams() *CreateShareParams { - return &CreateShareParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateShareParamsWithTimeout creates a new CreateShareParams object -// with the ability to set a timeout on a request. -func NewCreateShareParamsWithTimeout(timeout time.Duration) *CreateShareParams { - return &CreateShareParams{ - timeout: timeout, - } -} - -// NewCreateShareParamsWithContext creates a new CreateShareParams object -// with the ability to set a context for a request. -func NewCreateShareParamsWithContext(ctx context.Context) *CreateShareParams { - return &CreateShareParams{ - Context: ctx, - } -} - -// NewCreateShareParamsWithHTTPClient creates a new CreateShareParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateShareParamsWithHTTPClient(client *http.Client) *CreateShareParams { - return &CreateShareParams{ - HTTPClient: client, - } -} - -/* -CreateShareParams contains all the parameters to send to the API endpoint - - for the create share operation. - - Typically these are written to a http.Request. -*/ -type CreateShareParams struct { - - /* Body. - - Specifies the request to create a Share. - */ - Body *models.Share - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateShareParams) WithDefaults() *CreateShareParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateShareParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create share params -func (o *CreateShareParams) WithTimeout(timeout time.Duration) *CreateShareParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create share params -func (o *CreateShareParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create share params -func (o *CreateShareParams) WithContext(ctx context.Context) *CreateShareParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create share params -func (o *CreateShareParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create share params -func (o *CreateShareParams) WithHTTPClient(client *http.Client) *CreateShareParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create share params -func (o *CreateShareParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create share params -func (o *CreateShareParams) WithBody(body *models.Share) *CreateShareParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create share params -func (o *CreateShareParams) SetBody(body *models.Share) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateShareParams) 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/view/create_share_responses.go b/v2/client/view/create_share_responses.go deleted file mode 100644 index 30ebf6a0..00000000 --- a/v2/client/view/create_share_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateShareReader is a Reader for the CreateShare structure. -type CreateShareReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateShareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateShareCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateShareDefault(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 - } -} - -// NewCreateShareCreated creates a CreateShareCreated with default headers values -func NewCreateShareCreated() *CreateShareCreated { - return &CreateShareCreated{} -} - -/* -CreateShareCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateShareCreated struct { - Payload *models.Share -} - -// IsSuccess returns true when this create share created response has a 2xx status code -func (o *CreateShareCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create share created response has a 3xx status code -func (o *CreateShareCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create share created response has a 4xx status code -func (o *CreateShareCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create share created response has a 5xx status code -func (o *CreateShareCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create share created response a status code equal to that given -func (o *CreateShareCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create share created response -func (o *CreateShareCreated) Code() int { - return 201 -} - -func (o *CreateShareCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/shares][%d] createShareCreated %s", 201, payload) -} - -func (o *CreateShareCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/shares][%d] createShareCreated %s", 201, payload) -} - -func (o *CreateShareCreated) GetPayload() *models.Share { - return o.Payload -} - -func (o *CreateShareCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Share) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateShareDefault creates a CreateShareDefault with default headers values -func NewCreateShareDefault(code int) *CreateShareDefault { - return &CreateShareDefault{ - _statusCode: code, - } -} - -/* -CreateShareDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateShareDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create share default response has a 2xx status code -func (o *CreateShareDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create share default response has a 3xx status code -func (o *CreateShareDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create share default response has a 4xx status code -func (o *CreateShareDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create share default response has a 5xx status code -func (o *CreateShareDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create share default response a status code equal to that given -func (o *CreateShareDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create share default response -func (o *CreateShareDefault) Code() int { - return o._statusCode -} - -func (o *CreateShareDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/shares][%d] CreateShare default %s", o._statusCode, payload) -} - -func (o *CreateShareDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/shares][%d] CreateShare default %s", o._statusCode, payload) -} - -func (o *CreateShareDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateShareDefault) 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/view/create_view_parameters.go b/v2/client/view/create_view_parameters.go deleted file mode 100644 index 798dcacb..00000000 --- a/v2/client/view/create_view_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateViewParams creates a new CreateViewParams 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 NewCreateViewParams() *CreateViewParams { - return &CreateViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewParamsWithTimeout creates a new CreateViewParams object -// with the ability to set a timeout on a request. -func NewCreateViewParamsWithTimeout(timeout time.Duration) *CreateViewParams { - return &CreateViewParams{ - timeout: timeout, - } -} - -// NewCreateViewParamsWithContext creates a new CreateViewParams object -// with the ability to set a context for a request. -func NewCreateViewParamsWithContext(ctx context.Context) *CreateViewParams { - return &CreateViewParams{ - Context: ctx, - } -} - -// NewCreateViewParamsWithHTTPClient creates a new CreateViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewParamsWithHTTPClient(client *http.Client) *CreateViewParams { - return &CreateViewParams{ - HTTPClient: client, - } -} - -/* -CreateViewParams contains all the parameters to send to the API endpoint - - for the create view operation. - - Typically these are written to a http.Request. -*/ -type CreateViewParams struct { - - /* Body. - - Request to create a View. - */ - Body *models.CreateViewRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewParams) WithDefaults() *CreateViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view params -func (o *CreateViewParams) WithTimeout(timeout time.Duration) *CreateViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view params -func (o *CreateViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view params -func (o *CreateViewParams) WithContext(ctx context.Context) *CreateViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view params -func (o *CreateViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view params -func (o *CreateViewParams) WithHTTPClient(client *http.Client) *CreateViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view params -func (o *CreateViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view params -func (o *CreateViewParams) WithBody(body *models.CreateViewRequest) *CreateViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view params -func (o *CreateViewParams) SetBody(body *models.CreateViewRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewParams) 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/view/create_view_responses.go b/v2/client/view/create_view_responses.go deleted file mode 100644 index c7bfed6f..00000000 --- a/v2/client/view/create_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateViewReader is a Reader for the CreateView structure. -type CreateViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewDefault(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 - } -} - -// NewCreateViewCreated creates a CreateViewCreated with default headers values -func NewCreateViewCreated() *CreateViewCreated { - return &CreateViewCreated{} -} - -/* -CreateViewCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewCreated struct { - Payload *models.View -} - -// IsSuccess returns true when this create view created response has a 2xx status code -func (o *CreateViewCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view created response has a 3xx status code -func (o *CreateViewCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view created response has a 4xx status code -func (o *CreateViewCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view created response has a 5xx status code -func (o *CreateViewCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view created response a status code equal to that given -func (o *CreateViewCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view created response -func (o *CreateViewCreated) Code() int { - return 201 -} - -func (o *CreateViewCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views][%d] createViewCreated %s", 201, payload) -} - -func (o *CreateViewCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views][%d] createViewCreated %s", 201, payload) -} - -func (o *CreateViewCreated) GetPayload() *models.View { - return o.Payload -} - -func (o *CreateViewCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewDefault creates a CreateViewDefault with default headers values -func NewCreateViewDefault(code int) *CreateViewDefault { - return &CreateViewDefault{ - _statusCode: code, - } -} - -/* -CreateViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create view default response has a 2xx status code -func (o *CreateViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view default response has a 3xx status code -func (o *CreateViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view default response has a 4xx status code -func (o *CreateViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view default response has a 5xx status code -func (o *CreateViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view default response a status code equal to that given -func (o *CreateViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view default response -func (o *CreateViewDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views][%d] CreateView default %s", o._statusCode, payload) -} - -func (o *CreateViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views][%d] CreateView default %s", o._statusCode, payload) -} - -func (o *CreateViewDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateViewDefault) 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/view/create_view_template_parameters.go b/v2/client/view/create_view_template_parameters.go deleted file mode 100644 index 0cee3229..00000000 --- a/v2/client/view/create_view_template_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewCreateViewTemplateParams creates a new CreateViewTemplateParams 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 NewCreateViewTemplateParams() *CreateViewTemplateParams { - return &CreateViewTemplateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateViewTemplateParamsWithTimeout creates a new CreateViewTemplateParams object -// with the ability to set a timeout on a request. -func NewCreateViewTemplateParamsWithTimeout(timeout time.Duration) *CreateViewTemplateParams { - return &CreateViewTemplateParams{ - timeout: timeout, - } -} - -// NewCreateViewTemplateParamsWithContext creates a new CreateViewTemplateParams object -// with the ability to set a context for a request. -func NewCreateViewTemplateParamsWithContext(ctx context.Context) *CreateViewTemplateParams { - return &CreateViewTemplateParams{ - Context: ctx, - } -} - -// NewCreateViewTemplateParamsWithHTTPClient creates a new CreateViewTemplateParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateViewTemplateParamsWithHTTPClient(client *http.Client) *CreateViewTemplateParams { - return &CreateViewTemplateParams{ - HTTPClient: client, - } -} - -/* -CreateViewTemplateParams contains all the parameters to send to the API endpoint - - for the create view template operation. - - Typically these are written to a http.Request. -*/ -type CreateViewTemplateParams struct { - - /* Body. - - Request to create a view template. - */ - Body *models.Template - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewTemplateParams) WithDefaults() *CreateViewTemplateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateViewTemplateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create view template params -func (o *CreateViewTemplateParams) WithTimeout(timeout time.Duration) *CreateViewTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create view template params -func (o *CreateViewTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create view template params -func (o *CreateViewTemplateParams) WithContext(ctx context.Context) *CreateViewTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create view template params -func (o *CreateViewTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create view template params -func (o *CreateViewTemplateParams) WithHTTPClient(client *http.Client) *CreateViewTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create view template params -func (o *CreateViewTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create view template params -func (o *CreateViewTemplateParams) WithBody(body *models.Template) *CreateViewTemplateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create view template params -func (o *CreateViewTemplateParams) SetBody(body *models.Template) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateViewTemplateParams) 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/view/create_view_template_responses.go b/v2/client/view/create_view_template_responses.go deleted file mode 100644 index a943f753..00000000 --- a/v2/client/view/create_view_template_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// CreateViewTemplateReader is a Reader for the CreateViewTemplate structure. -type CreateViewTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateViewTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateViewTemplateCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateViewTemplateDefault(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 - } -} - -// NewCreateViewTemplateCreated creates a CreateViewTemplateCreated with default headers values -func NewCreateViewTemplateCreated() *CreateViewTemplateCreated { - return &CreateViewTemplateCreated{} -} - -/* -CreateViewTemplateCreated describes a response with status code 201, with default header values. - -Success -*/ -type CreateViewTemplateCreated struct { - Payload *models.Template -} - -// IsSuccess returns true when this create view template created response has a 2xx status code -func (o *CreateViewTemplateCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create view template created response has a 3xx status code -func (o *CreateViewTemplateCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create view template created response has a 4xx status code -func (o *CreateViewTemplateCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create view template created response has a 5xx status code -func (o *CreateViewTemplateCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create view template created response a status code equal to that given -func (o *CreateViewTemplateCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create view template created response -func (o *CreateViewTemplateCreated) Code() int { - return 201 -} - -func (o *CreateViewTemplateCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/view-template][%d] createViewTemplateCreated %s", 201, payload) -} - -func (o *CreateViewTemplateCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/view-template][%d] createViewTemplateCreated %s", 201, payload) -} - -func (o *CreateViewTemplateCreated) GetPayload() *models.Template { - return o.Payload -} - -func (o *CreateViewTemplateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Template) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateViewTemplateDefault creates a CreateViewTemplateDefault with default headers values -func NewCreateViewTemplateDefault(code int) *CreateViewTemplateDefault { - return &CreateViewTemplateDefault{ - _statusCode: code, - } -} - -/* -CreateViewTemplateDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateViewTemplateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this create view template default response has a 2xx status code -func (o *CreateViewTemplateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create view template default response has a 3xx status code -func (o *CreateViewTemplateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create view template default response has a 4xx status code -func (o *CreateViewTemplateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create view template default response has a 5xx status code -func (o *CreateViewTemplateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create view template default response a status code equal to that given -func (o *CreateViewTemplateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create view template default response -func (o *CreateViewTemplateDefault) Code() int { - return o._statusCode -} - -func (o *CreateViewTemplateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/view-template][%d] CreateViewTemplate default %s", o._statusCode, payload) -} - -func (o *CreateViewTemplateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/view-template][%d] CreateViewTemplate default %s", o._statusCode, payload) -} - -func (o *CreateViewTemplateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *CreateViewTemplateDefault) 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/view/delete_share_parameters.go b/v2/client/view/delete_share_parameters.go deleted file mode 100644 index 6a90c6a5..00000000 --- a/v2/client/view/delete_share_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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" -) - -// NewDeleteShareParams creates a new DeleteShareParams 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 NewDeleteShareParams() *DeleteShareParams { - return &DeleteShareParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteShareParamsWithTimeout creates a new DeleteShareParams object -// with the ability to set a timeout on a request. -func NewDeleteShareParamsWithTimeout(timeout time.Duration) *DeleteShareParams { - return &DeleteShareParams{ - timeout: timeout, - } -} - -// NewDeleteShareParamsWithContext creates a new DeleteShareParams object -// with the ability to set a context for a request. -func NewDeleteShareParamsWithContext(ctx context.Context) *DeleteShareParams { - return &DeleteShareParams{ - Context: ctx, - } -} - -// NewDeleteShareParamsWithHTTPClient creates a new DeleteShareParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteShareParamsWithHTTPClient(client *http.Client) *DeleteShareParams { - return &DeleteShareParams{ - HTTPClient: client, - } -} - -/* -DeleteShareParams contains all the parameters to send to the API endpoint - - for the delete share operation. - - Typically these are written to a http.Request. -*/ -type DeleteShareParams struct { - - /* Name. - - Specifies the Share name to delete. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteShareParams) WithDefaults() *DeleteShareParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteShareParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete share params -func (o *DeleteShareParams) WithTimeout(timeout time.Duration) *DeleteShareParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete share params -func (o *DeleteShareParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete share params -func (o *DeleteShareParams) WithContext(ctx context.Context) *DeleteShareParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete share params -func (o *DeleteShareParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete share params -func (o *DeleteShareParams) WithHTTPClient(client *http.Client) *DeleteShareParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete share params -func (o *DeleteShareParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the delete share params -func (o *DeleteShareParams) WithName(name string) *DeleteShareParams { - o.SetName(name) - return o -} - -// SetName adds the name to the delete share params -func (o *DeleteShareParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteShareParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/delete_share_responses.go b/v2/client/view/delete_share_responses.go deleted file mode 100644 index 4f9725df..00000000 --- a/v2/client/view/delete_share_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteShareReader is a Reader for the DeleteShare structure. -type DeleteShareReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteShareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteShareNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteShareDefault(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 - } -} - -// NewDeleteShareNoContent creates a DeleteShareNoContent with default headers values -func NewDeleteShareNoContent() *DeleteShareNoContent { - return &DeleteShareNoContent{} -} - -/* -DeleteShareNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteShareNoContent struct { -} - -// IsSuccess returns true when this delete share no content response has a 2xx status code -func (o *DeleteShareNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete share no content response has a 3xx status code -func (o *DeleteShareNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete share no content response has a 4xx status code -func (o *DeleteShareNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete share no content response has a 5xx status code -func (o *DeleteShareNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete share no content response a status code equal to that given -func (o *DeleteShareNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete share no content response -func (o *DeleteShareNoContent) Code() int { - return 204 -} - -func (o *DeleteShareNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/shares/{name}][%d] deleteShareNoContent", 204) -} - -func (o *DeleteShareNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/shares/{name}][%d] deleteShareNoContent", 204) -} - -func (o *DeleteShareNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteShareDefault creates a DeleteShareDefault with default headers values -func NewDeleteShareDefault(code int) *DeleteShareDefault { - return &DeleteShareDefault{ - _statusCode: code, - } -} - -/* -DeleteShareDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteShareDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete share default response has a 2xx status code -func (o *DeleteShareDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete share default response has a 3xx status code -func (o *DeleteShareDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete share default response has a 4xx status code -func (o *DeleteShareDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete share default response has a 5xx status code -func (o *DeleteShareDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete share default response a status code equal to that given -func (o *DeleteShareDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete share default response -func (o *DeleteShareDefault) Code() int { - return o._statusCode -} - -func (o *DeleteShareDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/shares/{name}][%d] DeleteShare default %s", o._statusCode, payload) -} - -func (o *DeleteShareDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/shares/{name}][%d] DeleteShare default %s", o._statusCode, payload) -} - -func (o *DeleteShareDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteShareDefault) 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/view/delete_view_directory_quota_parameters.go b/v2/client/view/delete_view_directory_quota_parameters.go deleted file mode 100644 index 3062ecf5..00000000 --- a/v2/client/view/delete_view_directory_quota_parameters.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewDeleteViewDirectoryQuotaParams creates a new DeleteViewDirectoryQuotaParams 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 NewDeleteViewDirectoryQuotaParams() *DeleteViewDirectoryQuotaParams { - return &DeleteViewDirectoryQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewDirectoryQuotaParamsWithTimeout creates a new DeleteViewDirectoryQuotaParams object -// with the ability to set a timeout on a request. -func NewDeleteViewDirectoryQuotaParamsWithTimeout(timeout time.Duration) *DeleteViewDirectoryQuotaParams { - return &DeleteViewDirectoryQuotaParams{ - timeout: timeout, - } -} - -// NewDeleteViewDirectoryQuotaParamsWithContext creates a new DeleteViewDirectoryQuotaParams object -// with the ability to set a context for a request. -func NewDeleteViewDirectoryQuotaParamsWithContext(ctx context.Context) *DeleteViewDirectoryQuotaParams { - return &DeleteViewDirectoryQuotaParams{ - Context: ctx, - } -} - -// NewDeleteViewDirectoryQuotaParamsWithHTTPClient creates a new DeleteViewDirectoryQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewDirectoryQuotaParamsWithHTTPClient(client *http.Client) *DeleteViewDirectoryQuotaParams { - return &DeleteViewDirectoryQuotaParams{ - HTTPClient: client, - } -} - -/* -DeleteViewDirectoryQuotaParams contains all the parameters to send to the API endpoint - - for the delete view directory quota operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewDirectoryQuotaParams struct { - - /* DeleteAllDirectoryQuotas. - - Specifies whether to delete all directory quotas for this view. Exactly one of 'directoryPath' and 'deleteAllDirectoryQuotas' should be provided. - */ - DeleteAllDirectoryQuotas *bool - - /* DirectoryPath. - - Specifies the directory path to delete. Exactly one of 'directoryPath' and 'deleteAllDirectoryQuotas' should be provided. - */ - DirectoryPath *string - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view directory quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewDirectoryQuotaParams) WithDefaults() *DeleteViewDirectoryQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view directory quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewDirectoryQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithTimeout(timeout time.Duration) *DeleteViewDirectoryQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithContext(ctx context.Context) *DeleteViewDirectoryQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithHTTPClient(client *http.Client) *DeleteViewDirectoryQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDeleteAllDirectoryQuotas adds the deleteAllDirectoryQuotas to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithDeleteAllDirectoryQuotas(deleteAllDirectoryQuotas *bool) *DeleteViewDirectoryQuotaParams { - o.SetDeleteAllDirectoryQuotas(deleteAllDirectoryQuotas) - return o -} - -// SetDeleteAllDirectoryQuotas adds the deleteAllDirectoryQuotas to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetDeleteAllDirectoryQuotas(deleteAllDirectoryQuotas *bool) { - o.DeleteAllDirectoryQuotas = deleteAllDirectoryQuotas -} - -// WithDirectoryPath adds the directoryPath to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithDirectoryPath(directoryPath *string) *DeleteViewDirectoryQuotaParams { - o.SetDirectoryPath(directoryPath) - return o -} - -// SetDirectoryPath adds the directoryPath to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetDirectoryPath(directoryPath *string) { - o.DirectoryPath = directoryPath -} - -// WithID adds the id to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) WithID(id int64) *DeleteViewDirectoryQuotaParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete view directory quota params -func (o *DeleteViewDirectoryQuotaParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewDirectoryQuotaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.DeleteAllDirectoryQuotas != nil { - - // query param deleteAllDirectoryQuotas - var qrDeleteAllDirectoryQuotas bool - - if o.DeleteAllDirectoryQuotas != nil { - qrDeleteAllDirectoryQuotas = *o.DeleteAllDirectoryQuotas - } - qDeleteAllDirectoryQuotas := swag.FormatBool(qrDeleteAllDirectoryQuotas) - if qDeleteAllDirectoryQuotas != "" { - - if err := r.SetQueryParam("deleteAllDirectoryQuotas", qDeleteAllDirectoryQuotas); err != nil { - return err - } - } - } - - if o.DirectoryPath != nil { - - // query param directoryPath - var qrDirectoryPath string - - if o.DirectoryPath != nil { - qrDirectoryPath = *o.DirectoryPath - } - qDirectoryPath := qrDirectoryPath - if qDirectoryPath != "" { - - if err := r.SetQueryParam("directoryPath", qDirectoryPath); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/delete_view_directory_quota_responses.go b/v2/client/view/delete_view_directory_quota_responses.go deleted file mode 100644 index 41cfd965..00000000 --- a/v2/client/view/delete_view_directory_quota_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteViewDirectoryQuotaReader is a Reader for the DeleteViewDirectoryQuota structure. -type DeleteViewDirectoryQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewDirectoryQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewDirectoryQuotaNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewDirectoryQuotaDefault(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 - } -} - -// NewDeleteViewDirectoryQuotaNoContent creates a DeleteViewDirectoryQuotaNoContent with default headers values -func NewDeleteViewDirectoryQuotaNoContent() *DeleteViewDirectoryQuotaNoContent { - return &DeleteViewDirectoryQuotaNoContent{} -} - -/* -DeleteViewDirectoryQuotaNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewDirectoryQuotaNoContent struct { -} - -// IsSuccess returns true when this delete view directory quota no content response has a 2xx status code -func (o *DeleteViewDirectoryQuotaNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view directory quota no content response has a 3xx status code -func (o *DeleteViewDirectoryQuotaNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view directory quota no content response has a 4xx status code -func (o *DeleteViewDirectoryQuotaNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view directory quota no content response has a 5xx status code -func (o *DeleteViewDirectoryQuotaNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view directory quota no content response a status code equal to that given -func (o *DeleteViewDirectoryQuotaNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view directory quota no content response -func (o *DeleteViewDirectoryQuotaNoContent) Code() int { - return 204 -} - -func (o *DeleteViewDirectoryQuotaNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/views/{id}/directory-quotas][%d] deleteViewDirectoryQuotaNoContent", 204) -} - -func (o *DeleteViewDirectoryQuotaNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/views/{id}/directory-quotas][%d] deleteViewDirectoryQuotaNoContent", 204) -} - -func (o *DeleteViewDirectoryQuotaNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewDirectoryQuotaDefault creates a DeleteViewDirectoryQuotaDefault with default headers values -func NewDeleteViewDirectoryQuotaDefault(code int) *DeleteViewDirectoryQuotaDefault { - return &DeleteViewDirectoryQuotaDefault{ - _statusCode: code, - } -} - -/* -DeleteViewDirectoryQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewDirectoryQuotaDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete view directory quota default response has a 2xx status code -func (o *DeleteViewDirectoryQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view directory quota default response has a 3xx status code -func (o *DeleteViewDirectoryQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view directory quota default response has a 4xx status code -func (o *DeleteViewDirectoryQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view directory quota default response has a 5xx status code -func (o *DeleteViewDirectoryQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view directory quota default response a status code equal to that given -func (o *DeleteViewDirectoryQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view directory quota default response -func (o *DeleteViewDirectoryQuotaDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewDirectoryQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{id}/directory-quotas][%d] DeleteViewDirectoryQuota default %s", o._statusCode, payload) -} - -func (o *DeleteViewDirectoryQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{id}/directory-quotas][%d] DeleteViewDirectoryQuota default %s", o._statusCode, payload) -} - -func (o *DeleteViewDirectoryQuotaDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteViewDirectoryQuotaDefault) 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/view/delete_view_parameters.go b/v2/client/view/delete_view_parameters.go deleted file mode 100644 index 0ef41ef3..00000000 --- a/v2/client/view/delete_view_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewDeleteViewParams creates a new DeleteViewParams 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 NewDeleteViewParams() *DeleteViewParams { - return &DeleteViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewParamsWithTimeout creates a new DeleteViewParams object -// with the ability to set a timeout on a request. -func NewDeleteViewParamsWithTimeout(timeout time.Duration) *DeleteViewParams { - return &DeleteViewParams{ - timeout: timeout, - } -} - -// NewDeleteViewParamsWithContext creates a new DeleteViewParams object -// with the ability to set a context for a request. -func NewDeleteViewParamsWithContext(ctx context.Context) *DeleteViewParams { - return &DeleteViewParams{ - Context: ctx, - } -} - -// NewDeleteViewParamsWithHTTPClient creates a new DeleteViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewParamsWithHTTPClient(client *http.Client) *DeleteViewParams { - return &DeleteViewParams{ - HTTPClient: client, - } -} - -/* -DeleteViewParams contains all the parameters to send to the API endpoint - - for the delete view operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewParams struct { - - /* ID. - - Specifies a unique id of the View to delete. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewParams) WithDefaults() *DeleteViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view params -func (o *DeleteViewParams) WithTimeout(timeout time.Duration) *DeleteViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view params -func (o *DeleteViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view params -func (o *DeleteViewParams) WithContext(ctx context.Context) *DeleteViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view params -func (o *DeleteViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view params -func (o *DeleteViewParams) WithHTTPClient(client *http.Client) *DeleteViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view params -func (o *DeleteViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete view params -func (o *DeleteViewParams) WithID(id int64) *DeleteViewParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete view params -func (o *DeleteViewParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/delete_view_responses.go b/v2/client/view/delete_view_responses.go deleted file mode 100644 index 637f209d..00000000 --- a/v2/client/view/delete_view_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteViewReader is a Reader for the DeleteView structure. -type DeleteViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewDefault(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 - } -} - -// NewDeleteViewNoContent creates a DeleteViewNoContent with default headers values -func NewDeleteViewNoContent() *DeleteViewNoContent { - return &DeleteViewNoContent{} -} - -/* -DeleteViewNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewNoContent struct { -} - -// IsSuccess returns true when this delete view no content response has a 2xx status code -func (o *DeleteViewNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view no content response has a 3xx status code -func (o *DeleteViewNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view no content response has a 4xx status code -func (o *DeleteViewNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view no content response has a 5xx status code -func (o *DeleteViewNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view no content response a status code equal to that given -func (o *DeleteViewNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view no content response -func (o *DeleteViewNoContent) Code() int { - return 204 -} - -func (o *DeleteViewNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/views/{id}][%d] deleteViewNoContent", 204) -} - -func (o *DeleteViewNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/views/{id}][%d] deleteViewNoContent", 204) -} - -func (o *DeleteViewNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewDefault creates a DeleteViewDefault with default headers values -func NewDeleteViewDefault(code int) *DeleteViewDefault { - return &DeleteViewDefault{ - _statusCode: code, - } -} - -/* -DeleteViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete view default response has a 2xx status code -func (o *DeleteViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view default response has a 3xx status code -func (o *DeleteViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view default response has a 4xx status code -func (o *DeleteViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view default response has a 5xx status code -func (o *DeleteViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view default response a status code equal to that given -func (o *DeleteViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view default response -func (o *DeleteViewDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{id}][%d] DeleteView default %s", o._statusCode, payload) -} - -func (o *DeleteViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{id}][%d] DeleteView default %s", o._statusCode, payload) -} - -func (o *DeleteViewDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteViewDefault) 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/view/delete_view_template_parameters.go b/v2/client/view/delete_view_template_parameters.go deleted file mode 100644 index 553e3492..00000000 --- a/v2/client/view/delete_view_template_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewDeleteViewTemplateParams creates a new DeleteViewTemplateParams 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 NewDeleteViewTemplateParams() *DeleteViewTemplateParams { - return &DeleteViewTemplateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewTemplateParamsWithTimeout creates a new DeleteViewTemplateParams object -// with the ability to set a timeout on a request. -func NewDeleteViewTemplateParamsWithTimeout(timeout time.Duration) *DeleteViewTemplateParams { - return &DeleteViewTemplateParams{ - timeout: timeout, - } -} - -// NewDeleteViewTemplateParamsWithContext creates a new DeleteViewTemplateParams object -// with the ability to set a context for a request. -func NewDeleteViewTemplateParamsWithContext(ctx context.Context) *DeleteViewTemplateParams { - return &DeleteViewTemplateParams{ - Context: ctx, - } -} - -// NewDeleteViewTemplateParamsWithHTTPClient creates a new DeleteViewTemplateParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewTemplateParamsWithHTTPClient(client *http.Client) *DeleteViewTemplateParams { - return &DeleteViewTemplateParams{ - HTTPClient: client, - } -} - -/* -DeleteViewTemplateParams contains all the parameters to send to the API endpoint - - for the delete view template operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewTemplateParams struct { - - /* ID. - - Specifies a unique id of the view template to delete. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewTemplateParams) WithDefaults() *DeleteViewTemplateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewTemplateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view template params -func (o *DeleteViewTemplateParams) WithTimeout(timeout time.Duration) *DeleteViewTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view template params -func (o *DeleteViewTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view template params -func (o *DeleteViewTemplateParams) WithContext(ctx context.Context) *DeleteViewTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view template params -func (o *DeleteViewTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view template params -func (o *DeleteViewTemplateParams) WithHTTPClient(client *http.Client) *DeleteViewTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view template params -func (o *DeleteViewTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete view template params -func (o *DeleteViewTemplateParams) WithID(id int64) *DeleteViewTemplateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete view template params -func (o *DeleteViewTemplateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/delete_view_template_responses.go b/v2/client/view/delete_view_template_responses.go deleted file mode 100644 index 1be158f8..00000000 --- a/v2/client/view/delete_view_template_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteViewTemplateReader is a Reader for the DeleteViewTemplate structure. -type DeleteViewTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewTemplateNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewTemplateDefault(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 - } -} - -// NewDeleteViewTemplateNoContent creates a DeleteViewTemplateNoContent with default headers values -func NewDeleteViewTemplateNoContent() *DeleteViewTemplateNoContent { - return &DeleteViewTemplateNoContent{} -} - -/* -DeleteViewTemplateNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewTemplateNoContent struct { -} - -// IsSuccess returns true when this delete view template no content response has a 2xx status code -func (o *DeleteViewTemplateNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view template no content response has a 3xx status code -func (o *DeleteViewTemplateNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view template no content response has a 4xx status code -func (o *DeleteViewTemplateNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view template no content response has a 5xx status code -func (o *DeleteViewTemplateNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view template no content response a status code equal to that given -func (o *DeleteViewTemplateNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view template no content response -func (o *DeleteViewTemplateNoContent) Code() int { - return 204 -} - -func (o *DeleteViewTemplateNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/view-template/{id}][%d] deleteViewTemplateNoContent", 204) -} - -func (o *DeleteViewTemplateNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/view-template/{id}][%d] deleteViewTemplateNoContent", 204) -} - -func (o *DeleteViewTemplateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewTemplateDefault creates a DeleteViewTemplateDefault with default headers values -func NewDeleteViewTemplateDefault(code int) *DeleteViewTemplateDefault { - return &DeleteViewTemplateDefault{ - _statusCode: code, - } -} - -/* -DeleteViewTemplateDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewTemplateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete view template default response has a 2xx status code -func (o *DeleteViewTemplateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view template default response has a 3xx status code -func (o *DeleteViewTemplateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view template default response has a 4xx status code -func (o *DeleteViewTemplateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view template default response has a 5xx status code -func (o *DeleteViewTemplateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view template default response a status code equal to that given -func (o *DeleteViewTemplateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view template default response -func (o *DeleteViewTemplateDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewTemplateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/view-template/{id}][%d] DeleteViewTemplate default %s", o._statusCode, payload) -} - -func (o *DeleteViewTemplateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/view-template/{id}][%d] DeleteViewTemplate default %s", o._statusCode, payload) -} - -func (o *DeleteViewTemplateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteViewTemplateDefault) 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/view/delete_view_user_quota_overrides_parameters.go b/v2/client/view/delete_view_user_quota_overrides_parameters.go deleted file mode 100644 index 6a16fd0c..00000000 --- a/v2/client/view/delete_view_user_quota_overrides_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewDeleteViewUserQuotaOverridesParams creates a new DeleteViewUserQuotaOverridesParams 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 NewDeleteViewUserQuotaOverridesParams() *DeleteViewUserQuotaOverridesParams { - return &DeleteViewUserQuotaOverridesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteViewUserQuotaOverridesParamsWithTimeout creates a new DeleteViewUserQuotaOverridesParams object -// with the ability to set a timeout on a request. -func NewDeleteViewUserQuotaOverridesParamsWithTimeout(timeout time.Duration) *DeleteViewUserQuotaOverridesParams { - return &DeleteViewUserQuotaOverridesParams{ - timeout: timeout, - } -} - -// NewDeleteViewUserQuotaOverridesParamsWithContext creates a new DeleteViewUserQuotaOverridesParams object -// with the ability to set a context for a request. -func NewDeleteViewUserQuotaOverridesParamsWithContext(ctx context.Context) *DeleteViewUserQuotaOverridesParams { - return &DeleteViewUserQuotaOverridesParams{ - Context: ctx, - } -} - -// NewDeleteViewUserQuotaOverridesParamsWithHTTPClient creates a new DeleteViewUserQuotaOverridesParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteViewUserQuotaOverridesParamsWithHTTPClient(client *http.Client) *DeleteViewUserQuotaOverridesParams { - return &DeleteViewUserQuotaOverridesParams{ - HTTPClient: client, - } -} - -/* -DeleteViewUserQuotaOverridesParams contains all the parameters to send to the API endpoint - - for the delete view user quota overrides operation. - - Typically these are written to a http.Request. -*/ -type DeleteViewUserQuotaOverridesParams struct { - - /* Body. - - Specifies parameters to delete user quotas. - */ - Body *models.UserQuotaDeleteParams - - /* ViewID. - - Specifies the id of a view. - - Format: int64 - */ - ViewID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete view user quota overrides params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewUserQuotaOverridesParams) WithDefaults() *DeleteViewUserQuotaOverridesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete view user quota overrides params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteViewUserQuotaOverridesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) WithTimeout(timeout time.Duration) *DeleteViewUserQuotaOverridesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) WithContext(ctx context.Context) *DeleteViewUserQuotaOverridesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) WithHTTPClient(client *http.Client) *DeleteViewUserQuotaOverridesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) WithBody(body *models.UserQuotaDeleteParams) *DeleteViewUserQuotaOverridesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) SetBody(body *models.UserQuotaDeleteParams) { - o.Body = body -} - -// WithViewID adds the viewID to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) WithViewID(viewID int64) *DeleteViewUserQuotaOverridesParams { - o.SetViewID(viewID) - return o -} - -// SetViewID adds the viewId to the delete view user quota overrides params -func (o *DeleteViewUserQuotaOverridesParams) SetViewID(viewID int64) { - o.ViewID = viewID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteViewUserQuotaOverridesParams) 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 - } - } - - // path param viewId - if err := r.SetPathParam("viewId", swag.FormatInt64(o.ViewID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/delete_view_user_quota_overrides_responses.go b/v2/client/view/delete_view_user_quota_overrides_responses.go deleted file mode 100644 index 5d3abb52..00000000 --- a/v2/client/view/delete_view_user_quota_overrides_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// DeleteViewUserQuotaOverridesReader is a Reader for the DeleteViewUserQuotaOverrides structure. -type DeleteViewUserQuotaOverridesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteViewUserQuotaOverridesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteViewUserQuotaOverridesNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteViewUserQuotaOverridesDefault(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 - } -} - -// NewDeleteViewUserQuotaOverridesNoContent creates a DeleteViewUserQuotaOverridesNoContent with default headers values -func NewDeleteViewUserQuotaOverridesNoContent() *DeleteViewUserQuotaOverridesNoContent { - return &DeleteViewUserQuotaOverridesNoContent{} -} - -/* -DeleteViewUserQuotaOverridesNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteViewUserQuotaOverridesNoContent struct { -} - -// IsSuccess returns true when this delete view user quota overrides no content response has a 2xx status code -func (o *DeleteViewUserQuotaOverridesNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete view user quota overrides no content response has a 3xx status code -func (o *DeleteViewUserQuotaOverridesNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete view user quota overrides no content response has a 4xx status code -func (o *DeleteViewUserQuotaOverridesNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete view user quota overrides no content response has a 5xx status code -func (o *DeleteViewUserQuotaOverridesNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete view user quota overrides no content response a status code equal to that given -func (o *DeleteViewUserQuotaOverridesNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete view user quota overrides no content response -func (o *DeleteViewUserQuotaOverridesNoContent) Code() int { - return 204 -} - -func (o *DeleteViewUserQuotaOverridesNoContent) Error() string { - return fmt.Sprintf("[DELETE /file-services/views/{viewId}/user-quotas][%d] deleteViewUserQuotaOverridesNoContent", 204) -} - -func (o *DeleteViewUserQuotaOverridesNoContent) String() string { - return fmt.Sprintf("[DELETE /file-services/views/{viewId}/user-quotas][%d] deleteViewUserQuotaOverridesNoContent", 204) -} - -func (o *DeleteViewUserQuotaOverridesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteViewUserQuotaOverridesDefault creates a DeleteViewUserQuotaOverridesDefault with default headers values -func NewDeleteViewUserQuotaOverridesDefault(code int) *DeleteViewUserQuotaOverridesDefault { - return &DeleteViewUserQuotaOverridesDefault{ - _statusCode: code, - } -} - -/* -DeleteViewUserQuotaOverridesDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteViewUserQuotaOverridesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this delete view user quota overrides default response has a 2xx status code -func (o *DeleteViewUserQuotaOverridesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete view user quota overrides default response has a 3xx status code -func (o *DeleteViewUserQuotaOverridesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete view user quota overrides default response has a 4xx status code -func (o *DeleteViewUserQuotaOverridesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete view user quota overrides default response has a 5xx status code -func (o *DeleteViewUserQuotaOverridesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete view user quota overrides default response a status code equal to that given -func (o *DeleteViewUserQuotaOverridesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete view user quota overrides default response -func (o *DeleteViewUserQuotaOverridesDefault) Code() int { - return o._statusCode -} - -func (o *DeleteViewUserQuotaOverridesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{viewId}/user-quotas][%d] DeleteViewUserQuotaOverrides default %s", o._statusCode, payload) -} - -func (o *DeleteViewUserQuotaOverridesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /file-services/views/{viewId}/user-quotas][%d] DeleteViewUserQuotaOverrides default %s", o._statusCode, payload) -} - -func (o *DeleteViewUserQuotaOverridesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *DeleteViewUserQuotaOverridesDefault) 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/view/get_file_lock_status_parameters.go b/v2/client/view/get_file_lock_status_parameters.go deleted file mode 100644 index dab7cd09..00000000 --- a/v2/client/view/get_file_lock_status_parameters.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetFileLockStatusParams creates a new GetFileLockStatusParams 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 NewGetFileLockStatusParams() *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFileLockStatusParamsWithTimeout creates a new GetFileLockStatusParams object -// with the ability to set a timeout on a request. -func NewGetFileLockStatusParamsWithTimeout(timeout time.Duration) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - timeout: timeout, - } -} - -// NewGetFileLockStatusParamsWithContext creates a new GetFileLockStatusParams object -// with the ability to set a context for a request. -func NewGetFileLockStatusParamsWithContext(ctx context.Context) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - Context: ctx, - } -} - -// NewGetFileLockStatusParamsWithHTTPClient creates a new GetFileLockStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFileLockStatusParamsWithHTTPClient(client *http.Client) *GetFileLockStatusParams { - return &GetFileLockStatusParams{ - HTTPClient: client, - } -} - -/* -GetFileLockStatusParams contains all the parameters to send to the API endpoint - - for the get file lock status operation. - - Typically these are written to a http.Request. -*/ -type GetFileLockStatusParams struct { - - /* ID. - - Specifies the id of a view. - - Format: int64 - */ - ID int64 - - /* Path. - - Specifies the request file path in a view. - */ - Path string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get file lock status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusParams) WithDefaults() *GetFileLockStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get file lock status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFileLockStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get file lock status params -func (o *GetFileLockStatusParams) WithTimeout(timeout time.Duration) *GetFileLockStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get file lock status params -func (o *GetFileLockStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get file lock status params -func (o *GetFileLockStatusParams) WithContext(ctx context.Context) *GetFileLockStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get file lock status params -func (o *GetFileLockStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get file lock status params -func (o *GetFileLockStatusParams) WithHTTPClient(client *http.Client) *GetFileLockStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get file lock status params -func (o *GetFileLockStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get file lock status params -func (o *GetFileLockStatusParams) WithID(id int64) *GetFileLockStatusParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get file lock status params -func (o *GetFileLockStatusParams) SetID(id int64) { - o.ID = id -} - -// WithPath adds the path to the get file lock status params -func (o *GetFileLockStatusParams) WithPath(path string) *GetFileLockStatusParams { - o.SetPath(path) - return o -} - -// SetPath adds the path to the get file lock status params -func (o *GetFileLockStatusParams) SetPath(path string) { - o.Path = path -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFileLockStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - // query param path - qrPath := o.Path - qPath := qrPath - if qPath != "" { - - if err := r.SetQueryParam("path", qPath); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_file_lock_status_responses.go b/v2/client/view/get_file_lock_status_responses.go deleted file mode 100644 index 3cb0ae6c..00000000 --- a/v2/client/view/get_file_lock_status_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetFileLockStatusReader is a Reader for the GetFileLockStatus structure. -type GetFileLockStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFileLockStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFileLockStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetFileLockStatusDefault(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 - } -} - -// NewGetFileLockStatusOK creates a GetFileLockStatusOK with default headers values -func NewGetFileLockStatusOK() *GetFileLockStatusOK { - return &GetFileLockStatusOK{} -} - -/* -GetFileLockStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFileLockStatusOK struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this get file lock status o k response has a 2xx status code -func (o *GetFileLockStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get file lock status o k response has a 3xx status code -func (o *GetFileLockStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get file lock status o k response has a 4xx status code -func (o *GetFileLockStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get file lock status o k response has a 5xx status code -func (o *GetFileLockStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get file lock status o k response a status code equal to that given -func (o *GetFileLockStatusOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get file lock status o k response -func (o *GetFileLockStatusOK) Code() int { - return 200 -} - -func (o *GetFileLockStatusOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/file-lock][%d] getFileLockStatusOK %s", 200, payload) -} - -func (o *GetFileLockStatusOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/file-lock][%d] getFileLockStatusOK %s", 200, payload) -} - -func (o *GetFileLockStatusOK) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *GetFileLockStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFileLockStatusDefault creates a GetFileLockStatusDefault with default headers values -func NewGetFileLockStatusDefault(code int) *GetFileLockStatusDefault { - return &GetFileLockStatusDefault{ - _statusCode: code, - } -} - -/* -GetFileLockStatusDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetFileLockStatusDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get file lock status default response has a 2xx status code -func (o *GetFileLockStatusDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get file lock status default response has a 3xx status code -func (o *GetFileLockStatusDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get file lock status default response has a 4xx status code -func (o *GetFileLockStatusDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get file lock status default response has a 5xx status code -func (o *GetFileLockStatusDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get file lock status default response a status code equal to that given -func (o *GetFileLockStatusDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get file lock status default response -func (o *GetFileLockStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetFileLockStatusDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/file-lock][%d] GetFileLockStatus default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/file-lock][%d] GetFileLockStatus default %s", o._statusCode, payload) -} - -func (o *GetFileLockStatusDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetFileLockStatusDefault) 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/view/get_nlm_locks_parameters.go b/v2/client/view/get_nlm_locks_parameters.go deleted file mode 100644 index 09cdf579..00000000 --- a/v2/client/view/get_nlm_locks_parameters.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetNlmLocksParams creates a new GetNlmLocksParams 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 NewGetNlmLocksParams() *GetNlmLocksParams { - return &GetNlmLocksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNlmLocksParamsWithTimeout creates a new GetNlmLocksParams object -// with the ability to set a timeout on a request. -func NewGetNlmLocksParamsWithTimeout(timeout time.Duration) *GetNlmLocksParams { - return &GetNlmLocksParams{ - timeout: timeout, - } -} - -// NewGetNlmLocksParamsWithContext creates a new GetNlmLocksParams object -// with the ability to set a context for a request. -func NewGetNlmLocksParamsWithContext(ctx context.Context) *GetNlmLocksParams { - return &GetNlmLocksParams{ - Context: ctx, - } -} - -// NewGetNlmLocksParamsWithHTTPClient creates a new GetNlmLocksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNlmLocksParamsWithHTTPClient(client *http.Client) *GetNlmLocksParams { - return &GetNlmLocksParams{ - HTTPClient: client, - } -} - -/* -GetNlmLocksParams contains all the parameters to send to the API endpoint - - for the get nlm locks operation. - - Typically these are written to a http.Request. -*/ -type GetNlmLocksParams struct { - - /* Cookie. - - Specifies the pagination cookie. If this is set, next set of locks - just after the previous response are returned. If this is - not set, first set of NLM locks are returned." - */ - Cookie *string - - /* FilePath. - - Specifies the filepath in the view relative to the root filesystem. - If this field is specified, viewName field must also be specified. - */ - FilePath *string - - /* MaxCount. - - Specifies the maximum number of NLM locks to return in the response. - By default, maxCount is set to 1000. At any given instance, maxCount - value cannot be set to more than 1000. - - Format: int32 - */ - MaxCount *int32 - - /* ViewName. - - Specifies the name of the View in which to search. - If a view name is not specified, all the views in the Cluster - is searched. This field is mandatory if filePath field is specified. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNlmLocksParams) WithDefaults() *GetNlmLocksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get nlm locks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNlmLocksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get nlm locks params -func (o *GetNlmLocksParams) WithTimeout(timeout time.Duration) *GetNlmLocksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get nlm locks params -func (o *GetNlmLocksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get nlm locks params -func (o *GetNlmLocksParams) WithContext(ctx context.Context) *GetNlmLocksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get nlm locks params -func (o *GetNlmLocksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get nlm locks params -func (o *GetNlmLocksParams) WithHTTPClient(client *http.Client) *GetNlmLocksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get nlm locks params -func (o *GetNlmLocksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get nlm locks params -func (o *GetNlmLocksParams) WithCookie(cookie *string) *GetNlmLocksParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get nlm locks params -func (o *GetNlmLocksParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithFilePath adds the filePath to the get nlm locks params -func (o *GetNlmLocksParams) WithFilePath(filePath *string) *GetNlmLocksParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the get nlm locks params -func (o *GetNlmLocksParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithMaxCount adds the maxCount to the get nlm locks params -func (o *GetNlmLocksParams) WithMaxCount(maxCount *int32) *GetNlmLocksParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get nlm locks params -func (o *GetNlmLocksParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithViewName adds the viewName to the get nlm locks params -func (o *GetNlmLocksParams) WithViewName(viewName *string) *GetNlmLocksParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the get nlm locks params -func (o *GetNlmLocksParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNlmLocksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_nlm_locks_responses.go b/v2/client/view/get_nlm_locks_responses.go deleted file mode 100644 index 60b9a3ea..00000000 --- a/v2/client/view/get_nlm_locks_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetNlmLocksReader is a Reader for the GetNlmLocks structure. -type GetNlmLocksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNlmLocksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNlmLocksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetNlmLocksDefault(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 - } -} - -// NewGetNlmLocksOK creates a GetNlmLocksOK with default headers values -func NewGetNlmLocksOK() *GetNlmLocksOK { - return &GetNlmLocksOK{} -} - -/* -GetNlmLocksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNlmLocksOK struct { - Payload *models.GetNlmLocksResult -} - -// IsSuccess returns true when this get nlm locks o k response has a 2xx status code -func (o *GetNlmLocksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get nlm locks o k response has a 3xx status code -func (o *GetNlmLocksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get nlm locks o k response has a 4xx status code -func (o *GetNlmLocksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get nlm locks o k response has a 5xx status code -func (o *GetNlmLocksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get nlm locks o k response a status code equal to that given -func (o *GetNlmLocksOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get nlm locks o k response -func (o *GetNlmLocksOK) Code() int { - return 200 -} - -func (o *GetNlmLocksOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/nlm-locks][%d] getNlmLocksOK %s", 200, payload) -} - -func (o *GetNlmLocksOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/nlm-locks][%d] getNlmLocksOK %s", 200, payload) -} - -func (o *GetNlmLocksOK) GetPayload() *models.GetNlmLocksResult { - return o.Payload -} - -func (o *GetNlmLocksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetNlmLocksResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetNlmLocksDefault creates a GetNlmLocksDefault with default headers values -func NewGetNlmLocksDefault(code int) *GetNlmLocksDefault { - return &GetNlmLocksDefault{ - _statusCode: code, - } -} - -/* -GetNlmLocksDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetNlmLocksDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get nlm locks default response has a 2xx status code -func (o *GetNlmLocksDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get nlm locks default response has a 3xx status code -func (o *GetNlmLocksDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get nlm locks default response has a 4xx status code -func (o *GetNlmLocksDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get nlm locks default response has a 5xx status code -func (o *GetNlmLocksDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get nlm locks default response a status code equal to that given -func (o *GetNlmLocksDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get nlm locks default response -func (o *GetNlmLocksDefault) Code() int { - return o._statusCode -} - -func (o *GetNlmLocksDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/nlm-locks][%d] GetNlmLocks default %s", o._statusCode, payload) -} - -func (o *GetNlmLocksDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/nlm-locks][%d] GetNlmLocks default %s", o._statusCode, payload) -} - -func (o *GetNlmLocksDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetNlmLocksDefault) 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/view/get_qos_policies_parameters.go b/v2/client/view/get_qos_policies_parameters.go deleted file mode 100644 index 7681d18f..00000000 --- a/v2/client/view/get_qos_policies_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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" -) - -// NewGetQosPoliciesParams creates a new GetQosPoliciesParams 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 NewGetQosPoliciesParams() *GetQosPoliciesParams { - return &GetQosPoliciesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetQosPoliciesParamsWithTimeout creates a new GetQosPoliciesParams object -// with the ability to set a timeout on a request. -func NewGetQosPoliciesParamsWithTimeout(timeout time.Duration) *GetQosPoliciesParams { - return &GetQosPoliciesParams{ - timeout: timeout, - } -} - -// NewGetQosPoliciesParamsWithContext creates a new GetQosPoliciesParams object -// with the ability to set a context for a request. -func NewGetQosPoliciesParamsWithContext(ctx context.Context) *GetQosPoliciesParams { - return &GetQosPoliciesParams{ - Context: ctx, - } -} - -// NewGetQosPoliciesParamsWithHTTPClient creates a new GetQosPoliciesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetQosPoliciesParamsWithHTTPClient(client *http.Client) *GetQosPoliciesParams { - return &GetQosPoliciesParams{ - HTTPClient: client, - } -} - -/* -GetQosPoliciesParams contains all the parameters to send to the API endpoint - - for the get qos policies operation. - - Typically these are written to a http.Request. -*/ -type GetQosPoliciesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get qos policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetQosPoliciesParams) WithDefaults() *GetQosPoliciesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get qos policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetQosPoliciesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get qos policies params -func (o *GetQosPoliciesParams) WithTimeout(timeout time.Duration) *GetQosPoliciesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get qos policies params -func (o *GetQosPoliciesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get qos policies params -func (o *GetQosPoliciesParams) WithContext(ctx context.Context) *GetQosPoliciesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get qos policies params -func (o *GetQosPoliciesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get qos policies params -func (o *GetQosPoliciesParams) WithHTTPClient(client *http.Client) *GetQosPoliciesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get qos policies params -func (o *GetQosPoliciesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetQosPoliciesParams) 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/view/get_qos_policies_responses.go b/v2/client/view/get_qos_policies_responses.go deleted file mode 100644 index 20678ff2..00000000 --- a/v2/client/view/get_qos_policies_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetQosPoliciesReader is a Reader for the GetQosPolicies structure. -type GetQosPoliciesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetQosPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetQosPoliciesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetQosPoliciesDefault(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 - } -} - -// NewGetQosPoliciesOK creates a GetQosPoliciesOK with default headers values -func NewGetQosPoliciesOK() *GetQosPoliciesOK { - return &GetQosPoliciesOK{} -} - -/* -GetQosPoliciesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetQosPoliciesOK struct { - Payload *models.QosPoliciesResult -} - -// IsSuccess returns true when this get qos policies o k response has a 2xx status code -func (o *GetQosPoliciesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get qos policies o k response has a 3xx status code -func (o *GetQosPoliciesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get qos policies o k response has a 4xx status code -func (o *GetQosPoliciesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get qos policies o k response has a 5xx status code -func (o *GetQosPoliciesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get qos policies o k response a status code equal to that given -func (o *GetQosPoliciesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get qos policies o k response -func (o *GetQosPoliciesOK) Code() int { - return 200 -} - -func (o *GetQosPoliciesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/qos-policies][%d] getQosPoliciesOK %s", 200, payload) -} - -func (o *GetQosPoliciesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/qos-policies][%d] getQosPoliciesOK %s", 200, payload) -} - -func (o *GetQosPoliciesOK) GetPayload() *models.QosPoliciesResult { - return o.Payload -} - -func (o *GetQosPoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.QosPoliciesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetQosPoliciesDefault creates a GetQosPoliciesDefault with default headers values -func NewGetQosPoliciesDefault(code int) *GetQosPoliciesDefault { - return &GetQosPoliciesDefault{ - _statusCode: code, - } -} - -/* -GetQosPoliciesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetQosPoliciesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get qos policies default response has a 2xx status code -func (o *GetQosPoliciesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get qos policies default response has a 3xx status code -func (o *GetQosPoliciesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get qos policies default response has a 4xx status code -func (o *GetQosPoliciesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get qos policies default response has a 5xx status code -func (o *GetQosPoliciesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get qos policies default response a status code equal to that given -func (o *GetQosPoliciesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get qos policies default response -func (o *GetQosPoliciesDefault) Code() int { - return o._statusCode -} - -func (o *GetQosPoliciesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/qos-policies][%d] GetQosPolicies default %s", o._statusCode, payload) -} - -func (o *GetQosPoliciesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/qos-policies][%d] GetQosPolicies default %s", o._statusCode, payload) -} - -func (o *GetQosPoliciesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetQosPoliciesDefault) 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/view/get_shares_parameters.go b/v2/client/view/get_shares_parameters.go deleted file mode 100644 index b2900ed9..00000000 --- a/v2/client/view/get_shares_parameters.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetSharesParams creates a new GetSharesParams 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 NewGetSharesParams() *GetSharesParams { - return &GetSharesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSharesParamsWithTimeout creates a new GetSharesParams object -// with the ability to set a timeout on a request. -func NewGetSharesParamsWithTimeout(timeout time.Duration) *GetSharesParams { - return &GetSharesParams{ - timeout: timeout, - } -} - -// NewGetSharesParamsWithContext creates a new GetSharesParams object -// with the ability to set a context for a request. -func NewGetSharesParamsWithContext(ctx context.Context) *GetSharesParams { - return &GetSharesParams{ - Context: ctx, - } -} - -// NewGetSharesParamsWithHTTPClient creates a new GetSharesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSharesParamsWithHTTPClient(client *http.Client) *GetSharesParams { - return &GetSharesParams{ - HTTPClient: client, - } -} - -/* -GetSharesParams contains all the parameters to send to the API endpoint - - for the get shares operation. - - Typically these are written to a http.Request. -*/ -type GetSharesParams struct { - - /* Cookie. - - Specifies the pagination cookie. Expected to be empty in the first call to the API. To get the next set of results, set this value to the pagination cookie value returned in the response of the previous call. - */ - Cookie *string - - /* IncludeTenants. - - IncludeTenants specifies if objects of all the tenants under the hierarchy of the logged in user's organization should be returned. - */ - IncludeTenants *bool - - /* MatchPartialName. - - If true, the share name is matched by any partial rather than exactly matched. - */ - MatchPartialName *bool - - /* MaxCount. - - Specifies a limit on the number of Shares returned. If maxCount is not specified, the first 2000 Shares. - - Format: int32 - */ - MaxCount *int32 - - /* Name. - - Specifies the Share name. - */ - Name *string - - /* TenantIds. - - TenantIds contains ids of the tenants for which objects are to be returned. - */ - TenantIds []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get shares params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSharesParams) WithDefaults() *GetSharesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get shares params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSharesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get shares params -func (o *GetSharesParams) WithTimeout(timeout time.Duration) *GetSharesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get shares params -func (o *GetSharesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get shares params -func (o *GetSharesParams) WithContext(ctx context.Context) *GetSharesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get shares params -func (o *GetSharesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get shares params -func (o *GetSharesParams) WithHTTPClient(client *http.Client) *GetSharesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get shares params -func (o *GetSharesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get shares params -func (o *GetSharesParams) WithCookie(cookie *string) *GetSharesParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get shares params -func (o *GetSharesParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithIncludeTenants adds the includeTenants to the get shares params -func (o *GetSharesParams) WithIncludeTenants(includeTenants *bool) *GetSharesParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get shares params -func (o *GetSharesParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithMatchPartialName adds the matchPartialName to the get shares params -func (o *GetSharesParams) WithMatchPartialName(matchPartialName *bool) *GetSharesParams { - o.SetMatchPartialName(matchPartialName) - return o -} - -// SetMatchPartialName adds the matchPartialName to the get shares params -func (o *GetSharesParams) SetMatchPartialName(matchPartialName *bool) { - o.MatchPartialName = matchPartialName -} - -// WithMaxCount adds the maxCount to the get shares params -func (o *GetSharesParams) WithMaxCount(maxCount *int32) *GetSharesParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get shares params -func (o *GetSharesParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithName adds the name to the get shares params -func (o *GetSharesParams) WithName(name *string) *GetSharesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get shares params -func (o *GetSharesParams) SetName(name *string) { - o.Name = name -} - -// WithTenantIds adds the tenantIds to the get shares params -func (o *GetSharesParams) WithTenantIds(tenantIds []string) *GetSharesParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get shares params -func (o *GetSharesParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSharesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); 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.MatchPartialName != nil { - - // query param matchPartialName - var qrMatchPartialName bool - - if o.MatchPartialName != nil { - qrMatchPartialName = *o.MatchPartialName - } - qMatchPartialName := swag.FormatBool(qrMatchPartialName) - if qMatchPartialName != "" { - - if err := r.SetQueryParam("matchPartialName", qMatchPartialName); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - 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 len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetShares binds the parameter tenantIds -func (o *GetSharesParams) 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/client/view/get_shares_responses.go b/v2/client/view/get_shares_responses.go deleted file mode 100644 index 02d3be69..00000000 --- a/v2/client/view/get_shares_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetSharesReader is a Reader for the GetShares structure. -type GetSharesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSharesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSharesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetSharesDefault(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 - } -} - -// NewGetSharesOK creates a GetSharesOK with default headers values -func NewGetSharesOK() *GetSharesOK { - return &GetSharesOK{} -} - -/* -GetSharesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetSharesOK struct { - Payload *models.Shares -} - -// IsSuccess returns true when this get shares o k response has a 2xx status code -func (o *GetSharesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get shares o k response has a 3xx status code -func (o *GetSharesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get shares o k response has a 4xx status code -func (o *GetSharesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get shares o k response has a 5xx status code -func (o *GetSharesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get shares o k response a status code equal to that given -func (o *GetSharesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get shares o k response -func (o *GetSharesOK) Code() int { - return 200 -} - -func (o *GetSharesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/shares][%d] getSharesOK %s", 200, payload) -} - -func (o *GetSharesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/shares][%d] getSharesOK %s", 200, payload) -} - -func (o *GetSharesOK) GetPayload() *models.Shares { - return o.Payload -} - -func (o *GetSharesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Shares) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSharesDefault creates a GetSharesDefault with default headers values -func NewGetSharesDefault(code int) *GetSharesDefault { - return &GetSharesDefault{ - _statusCode: code, - } -} - -/* -GetSharesDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetSharesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get shares default response has a 2xx status code -func (o *GetSharesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get shares default response has a 3xx status code -func (o *GetSharesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get shares default response has a 4xx status code -func (o *GetSharesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get shares default response has a 5xx status code -func (o *GetSharesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get shares default response a status code equal to that given -func (o *GetSharesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get shares default response -func (o *GetSharesDefault) Code() int { - return o._statusCode -} - -func (o *GetSharesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/shares][%d] GetShares default %s", o._statusCode, payload) -} - -func (o *GetSharesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/shares][%d] GetShares default %s", o._statusCode, payload) -} - -func (o *GetSharesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetSharesDefault) 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/view/get_view_by_id_parameters.go b/v2/client/view/get_view_by_id_parameters.go deleted file mode 100644 index b7f28b75..00000000 --- a/v2/client/view/get_view_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewByIDParams creates a new GetViewByIDParams 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 NewGetViewByIDParams() *GetViewByIDParams { - return &GetViewByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewByIDParamsWithTimeout creates a new GetViewByIDParams object -// with the ability to set a timeout on a request. -func NewGetViewByIDParamsWithTimeout(timeout time.Duration) *GetViewByIDParams { - return &GetViewByIDParams{ - timeout: timeout, - } -} - -// NewGetViewByIDParamsWithContext creates a new GetViewByIDParams object -// with the ability to set a context for a request. -func NewGetViewByIDParamsWithContext(ctx context.Context) *GetViewByIDParams { - return &GetViewByIDParams{ - Context: ctx, - } -} - -// NewGetViewByIDParamsWithHTTPClient creates a new GetViewByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewByIDParamsWithHTTPClient(client *http.Client) *GetViewByIDParams { - return &GetViewByIDParams{ - HTTPClient: client, - } -} - -/* -GetViewByIDParams contains all the parameters to send to the API endpoint - - for the get view by Id operation. - - Typically these are written to a http.Request. -*/ -type GetViewByIDParams struct { - - /* ID. - - Specifies a unique id of the View to fetch. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByIDParams) WithDefaults() *GetViewByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view by Id params -func (o *GetViewByIDParams) WithTimeout(timeout time.Duration) *GetViewByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view by Id params -func (o *GetViewByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view by Id params -func (o *GetViewByIDParams) WithContext(ctx context.Context) *GetViewByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view by Id params -func (o *GetViewByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view by Id params -func (o *GetViewByIDParams) WithHTTPClient(client *http.Client) *GetViewByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view by Id params -func (o *GetViewByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get view by Id params -func (o *GetViewByIDParams) WithID(id int64) *GetViewByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get view by Id params -func (o *GetViewByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_view_by_id_responses.go b/v2/client/view/get_view_by_id_responses.go deleted file mode 100644 index 6682a11b..00000000 --- a/v2/client/view/get_view_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewByIDReader is a Reader for the GetViewByID structure. -type GetViewByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewByIDDefault(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 - } -} - -// NewGetViewByIDOK creates a GetViewByIDOK with default headers values -func NewGetViewByIDOK() *GetViewByIDOK { - return &GetViewByIDOK{} -} - -/* -GetViewByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewByIDOK struct { - Payload *models.View -} - -// IsSuccess returns true when this get view by Id o k response has a 2xx status code -func (o *GetViewByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view by Id o k response has a 3xx status code -func (o *GetViewByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view by Id o k response has a 4xx status code -func (o *GetViewByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view by Id o k response has a 5xx status code -func (o *GetViewByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view by Id o k response a status code equal to that given -func (o *GetViewByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view by Id o k response -func (o *GetViewByIDOK) Code() int { - return 200 -} - -func (o *GetViewByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}][%d] getViewByIdOK %s", 200, payload) -} - -func (o *GetViewByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}][%d] getViewByIdOK %s", 200, payload) -} - -func (o *GetViewByIDOK) GetPayload() *models.View { - return o.Payload -} - -func (o *GetViewByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewByIDDefault creates a GetViewByIDDefault with default headers values -func NewGetViewByIDDefault(code int) *GetViewByIDDefault { - return &GetViewByIDDefault{ - _statusCode: code, - } -} - -/* -GetViewByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view by Id default response has a 2xx status code -func (o *GetViewByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view by Id default response has a 3xx status code -func (o *GetViewByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view by Id default response has a 4xx status code -func (o *GetViewByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view by Id default response has a 5xx status code -func (o *GetViewByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view by Id default response a status code equal to that given -func (o *GetViewByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view by Id default response -func (o *GetViewByIDDefault) Code() int { - return o._statusCode -} - -func (o *GetViewByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}][%d] GetViewById default %s", o._statusCode, payload) -} - -func (o *GetViewByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}][%d] GetViewById default %s", o._statusCode, payload) -} - -func (o *GetViewByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewByIDDefault) 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/view/get_view_clients_parameters.go b/v2/client/view/get_view_clients_parameters.go deleted file mode 100644 index ba18757a..00000000 --- a/v2/client/view/get_view_clients_parameters.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewClientsParams creates a new GetViewClientsParams 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 NewGetViewClientsParams() *GetViewClientsParams { - return &GetViewClientsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewClientsParamsWithTimeout creates a new GetViewClientsParams object -// with the ability to set a timeout on a request. -func NewGetViewClientsParamsWithTimeout(timeout time.Duration) *GetViewClientsParams { - return &GetViewClientsParams{ - timeout: timeout, - } -} - -// NewGetViewClientsParamsWithContext creates a new GetViewClientsParams object -// with the ability to set a context for a request. -func NewGetViewClientsParamsWithContext(ctx context.Context) *GetViewClientsParams { - return &GetViewClientsParams{ - Context: ctx, - } -} - -// NewGetViewClientsParamsWithHTTPClient creates a new GetViewClientsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewClientsParamsWithHTTPClient(client *http.Client) *GetViewClientsParams { - return &GetViewClientsParams{ - HTTPClient: client, - } -} - -/* -GetViewClientsParams contains all the parameters to send to the API endpoint - - for the get view clients operation. - - Typically these are written to a http.Request. -*/ -type GetViewClientsParams struct { - - /* MaxCount. - - Specifies the maximum number of connections to return for SMB and NFS protocols respectively. - - Format: int32 - */ - MaxCount *int32 - - /* NodeIP. - - Specifies a node ip. Only clients connected to this node will be returned. - */ - NodeIP *string - - /* Protocols. - - Specifies a list of protocols to filter the clients. - */ - Protocols []string - - /* ViewIds. - - Specifies a list of View ids. Only clients connected to these Views will be returned. - */ - ViewIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view clients params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientsParams) WithDefaults() *GetViewClientsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view clients params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view clients params -func (o *GetViewClientsParams) WithTimeout(timeout time.Duration) *GetViewClientsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view clients params -func (o *GetViewClientsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view clients params -func (o *GetViewClientsParams) WithContext(ctx context.Context) *GetViewClientsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view clients params -func (o *GetViewClientsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view clients params -func (o *GetViewClientsParams) WithHTTPClient(client *http.Client) *GetViewClientsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view clients params -func (o *GetViewClientsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMaxCount adds the maxCount to the get view clients params -func (o *GetViewClientsParams) WithMaxCount(maxCount *int32) *GetViewClientsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get view clients params -func (o *GetViewClientsParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithNodeIP adds the nodeIP to the get view clients params -func (o *GetViewClientsParams) WithNodeIP(nodeIP *string) *GetViewClientsParams { - o.SetNodeIP(nodeIP) - return o -} - -// SetNodeIP adds the nodeIp to the get view clients params -func (o *GetViewClientsParams) SetNodeIP(nodeIP *string) { - o.NodeIP = nodeIP -} - -// WithProtocols adds the protocols to the get view clients params -func (o *GetViewClientsParams) WithProtocols(protocols []string) *GetViewClientsParams { - o.SetProtocols(protocols) - return o -} - -// SetProtocols adds the protocols to the get view clients params -func (o *GetViewClientsParams) SetProtocols(protocols []string) { - o.Protocols = protocols -} - -// WithViewIds adds the viewIds to the get view clients params -func (o *GetViewClientsParams) WithViewIds(viewIds []int64) *GetViewClientsParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get view clients params -func (o *GetViewClientsParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewClientsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.NodeIP != nil { - - // query param nodeIp - var qrNodeIP string - - if o.NodeIP != nil { - qrNodeIP = *o.NodeIP - } - qNodeIP := qrNodeIP - if qNodeIP != "" { - - if err := r.SetQueryParam("nodeIp", qNodeIP); err != nil { - return err - } - } - } - - if o.Protocols != nil { - - // binding items for protocols - joinedProtocols := o.bindParamProtocols(reg) - - // query array param protocols - if err := r.SetQueryParam("protocols", joinedProtocols...); err != nil { - return err - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewClients binds the parameter protocols -func (o *GetViewClientsParams) bindParamProtocols(formats strfmt.Registry) []string { - protocolsIR := o.Protocols - - var protocolsIC []string - for _, protocolsIIR := range protocolsIR { // explode []string - - protocolsIIV := protocolsIIR // string as string - protocolsIC = append(protocolsIC, protocolsIIV) - } - - // items.CollectionFormat: "" - protocolsIS := swag.JoinByFormat(protocolsIC, "") - - return protocolsIS -} - -// bindParamGetViewClients binds the parameter viewIds -func (o *GetViewClientsParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} diff --git a/v2/client/view/get_view_clients_responses.go b/v2/client/view/get_view_clients_responses.go deleted file mode 100644 index 7e1afbe1..00000000 --- a/v2/client/view/get_view_clients_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewClientsReader is a Reader for the GetViewClients structure. -type GetViewClientsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewClientsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewClientsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewClientsDefault(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 - } -} - -// NewGetViewClientsOK creates a GetViewClientsOK with default headers values -func NewGetViewClientsOK() *GetViewClientsOK { - return &GetViewClientsOK{} -} - -/* -GetViewClientsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewClientsOK struct { - Payload *models.ViewClients -} - -// IsSuccess returns true when this get view clients o k response has a 2xx status code -func (o *GetViewClientsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view clients o k response has a 3xx status code -func (o *GetViewClientsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view clients o k response has a 4xx status code -func (o *GetViewClientsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view clients o k response has a 5xx status code -func (o *GetViewClientsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view clients o k response a status code equal to that given -func (o *GetViewClientsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view clients o k response -func (o *GetViewClientsOK) Code() int { - return 200 -} - -func (o *GetViewClientsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients][%d] getViewClientsOK %s", 200, payload) -} - -func (o *GetViewClientsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients][%d] getViewClientsOK %s", 200, payload) -} - -func (o *GetViewClientsOK) GetPayload() *models.ViewClients { - return o.Payload -} - -func (o *GetViewClientsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewClients) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewClientsDefault creates a GetViewClientsDefault with default headers values -func NewGetViewClientsDefault(code int) *GetViewClientsDefault { - return &GetViewClientsDefault{ - _statusCode: code, - } -} - -/* -GetViewClientsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewClientsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view clients default response has a 2xx status code -func (o *GetViewClientsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view clients default response has a 3xx status code -func (o *GetViewClientsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view clients default response has a 4xx status code -func (o *GetViewClientsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view clients default response has a 5xx status code -func (o *GetViewClientsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view clients default response a status code equal to that given -func (o *GetViewClientsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view clients default response -func (o *GetViewClientsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewClientsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients][%d] GetViewClients default %s", o._statusCode, payload) -} - -func (o *GetViewClientsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients][%d] GetViewClients default %s", o._statusCode, payload) -} - -func (o *GetViewClientsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewClientsDefault) 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/view/get_view_clients_summary_parameters.go b/v2/client/view/get_view_clients_summary_parameters.go deleted file mode 100644 index b1991891..00000000 --- a/v2/client/view/get_view_clients_summary_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewClientsSummaryParams creates a new GetViewClientsSummaryParams 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 NewGetViewClientsSummaryParams() *GetViewClientsSummaryParams { - return &GetViewClientsSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewClientsSummaryParamsWithTimeout creates a new GetViewClientsSummaryParams object -// with the ability to set a timeout on a request. -func NewGetViewClientsSummaryParamsWithTimeout(timeout time.Duration) *GetViewClientsSummaryParams { - return &GetViewClientsSummaryParams{ - timeout: timeout, - } -} - -// NewGetViewClientsSummaryParamsWithContext creates a new GetViewClientsSummaryParams object -// with the ability to set a context for a request. -func NewGetViewClientsSummaryParamsWithContext(ctx context.Context) *GetViewClientsSummaryParams { - return &GetViewClientsSummaryParams{ - Context: ctx, - } -} - -// NewGetViewClientsSummaryParamsWithHTTPClient creates a new GetViewClientsSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewClientsSummaryParamsWithHTTPClient(client *http.Client) *GetViewClientsSummaryParams { - return &GetViewClientsSummaryParams{ - HTTPClient: client, - } -} - -/* -GetViewClientsSummaryParams contains all the parameters to send to the API endpoint - - for the get view clients summary operation. - - Typically these are written to a http.Request. -*/ -type GetViewClientsSummaryParams struct { - - /* ViewIds. - - Specifies a list of View ids. Only clients connected to these Views will be included in the summary. - */ - ViewIds []int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view clients summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientsSummaryParams) WithDefaults() *GetViewClientsSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view clients summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewClientsSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view clients summary params -func (o *GetViewClientsSummaryParams) WithTimeout(timeout time.Duration) *GetViewClientsSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view clients summary params -func (o *GetViewClientsSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view clients summary params -func (o *GetViewClientsSummaryParams) WithContext(ctx context.Context) *GetViewClientsSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view clients summary params -func (o *GetViewClientsSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view clients summary params -func (o *GetViewClientsSummaryParams) WithHTTPClient(client *http.Client) *GetViewClientsSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view clients summary params -func (o *GetViewClientsSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithViewIds adds the viewIds to the get view clients summary params -func (o *GetViewClientsSummaryParams) WithViewIds(viewIds []int64) *GetViewClientsSummaryParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get view clients summary params -func (o *GetViewClientsSummaryParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewClientsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViewClientsSummary binds the parameter viewIds -func (o *GetViewClientsSummaryParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} diff --git a/v2/client/view/get_view_clients_summary_responses.go b/v2/client/view/get_view_clients_summary_responses.go deleted file mode 100644 index 09148c31..00000000 --- a/v2/client/view/get_view_clients_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewClientsSummaryReader is a Reader for the GetViewClientsSummary structure. -type GetViewClientsSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewClientsSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewClientsSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewClientsSummaryDefault(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 - } -} - -// NewGetViewClientsSummaryOK creates a GetViewClientsSummaryOK with default headers values -func NewGetViewClientsSummaryOK() *GetViewClientsSummaryOK { - return &GetViewClientsSummaryOK{} -} - -/* -GetViewClientsSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewClientsSummaryOK struct { - Payload *models.ViewClientsSummary -} - -// IsSuccess returns true when this get view clients summary o k response has a 2xx status code -func (o *GetViewClientsSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view clients summary o k response has a 3xx status code -func (o *GetViewClientsSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view clients summary o k response has a 4xx status code -func (o *GetViewClientsSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view clients summary o k response has a 5xx status code -func (o *GetViewClientsSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view clients summary o k response a status code equal to that given -func (o *GetViewClientsSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view clients summary o k response -func (o *GetViewClientsSummaryOK) Code() int { - return 200 -} - -func (o *GetViewClientsSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients/summary][%d] getViewClientsSummaryOK %s", 200, payload) -} - -func (o *GetViewClientsSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients/summary][%d] getViewClientsSummaryOK %s", 200, payload) -} - -func (o *GetViewClientsSummaryOK) GetPayload() *models.ViewClientsSummary { - return o.Payload -} - -func (o *GetViewClientsSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewClientsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewClientsSummaryDefault creates a GetViewClientsSummaryDefault with default headers values -func NewGetViewClientsSummaryDefault(code int) *GetViewClientsSummaryDefault { - return &GetViewClientsSummaryDefault{ - _statusCode: code, - } -} - -/* -GetViewClientsSummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewClientsSummaryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view clients summary default response has a 2xx status code -func (o *GetViewClientsSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view clients summary default response has a 3xx status code -func (o *GetViewClientsSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view clients summary default response has a 4xx status code -func (o *GetViewClientsSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view clients summary default response has a 5xx status code -func (o *GetViewClientsSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view clients summary default response a status code equal to that given -func (o *GetViewClientsSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view clients summary default response -func (o *GetViewClientsSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetViewClientsSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients/summary][%d] GetViewClientsSummary default %s", o._statusCode, payload) -} - -func (o *GetViewClientsSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-clients/summary][%d] GetViewClientsSummary default %s", o._statusCode, payload) -} - -func (o *GetViewClientsSummaryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewClientsSummaryDefault) 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/view/get_view_directory_quotas_parameters.go b/v2/client/view/get_view_directory_quotas_parameters.go deleted file mode 100644 index 96085cb1..00000000 --- a/v2/client/view/get_view_directory_quotas_parameters.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewDirectoryQuotasParams creates a new GetViewDirectoryQuotasParams 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 NewGetViewDirectoryQuotasParams() *GetViewDirectoryQuotasParams { - return &GetViewDirectoryQuotasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewDirectoryQuotasParamsWithTimeout creates a new GetViewDirectoryQuotasParams object -// with the ability to set a timeout on a request. -func NewGetViewDirectoryQuotasParamsWithTimeout(timeout time.Duration) *GetViewDirectoryQuotasParams { - return &GetViewDirectoryQuotasParams{ - timeout: timeout, - } -} - -// NewGetViewDirectoryQuotasParamsWithContext creates a new GetViewDirectoryQuotasParams object -// with the ability to set a context for a request. -func NewGetViewDirectoryQuotasParamsWithContext(ctx context.Context) *GetViewDirectoryQuotasParams { - return &GetViewDirectoryQuotasParams{ - Context: ctx, - } -} - -// NewGetViewDirectoryQuotasParamsWithHTTPClient creates a new GetViewDirectoryQuotasParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewDirectoryQuotasParamsWithHTTPClient(client *http.Client) *GetViewDirectoryQuotasParams { - return &GetViewDirectoryQuotasParams{ - HTTPClient: client, - } -} - -/* -GetViewDirectoryQuotasParams contains all the parameters to send to the API endpoint - - for the get view directory quotas operation. - - Typically these are written to a http.Request. -*/ -type GetViewDirectoryQuotasParams struct { - - /* Cookie. - - Specifies the cookie. - - Format: int64 - */ - Cookie *int64 - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - /* MaxCount. - - Specifies a limit on the number of quotas returned. - - Format: int64 - */ - MaxCount *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view directory quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewDirectoryQuotasParams) WithDefaults() *GetViewDirectoryQuotasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view directory quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewDirectoryQuotasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithTimeout(timeout time.Duration) *GetViewDirectoryQuotasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithContext(ctx context.Context) *GetViewDirectoryQuotasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithHTTPClient(client *http.Client) *GetViewDirectoryQuotasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithCookie(cookie *int64) *GetViewDirectoryQuotasParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetCookie(cookie *int64) { - o.Cookie = cookie -} - -// WithID adds the id to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithID(id int64) *GetViewDirectoryQuotasParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetID(id int64) { - o.ID = id -} - -// WithMaxCount adds the maxCount to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) WithMaxCount(maxCount *int64) *GetViewDirectoryQuotasParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get view directory quotas params -func (o *GetViewDirectoryQuotasParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewDirectoryQuotasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie int64 - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := swag.FormatInt64(qrCookie) - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_view_directory_quotas_responses.go b/v2/client/view/get_view_directory_quotas_responses.go deleted file mode 100644 index 2a08de1b..00000000 --- a/v2/client/view/get_view_directory_quotas_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewDirectoryQuotasReader is a Reader for the GetViewDirectoryQuotas structure. -type GetViewDirectoryQuotasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewDirectoryQuotasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewDirectoryQuotasOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewDirectoryQuotasDefault(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 - } -} - -// NewGetViewDirectoryQuotasOK creates a GetViewDirectoryQuotasOK with default headers values -func NewGetViewDirectoryQuotasOK() *GetViewDirectoryQuotasOK { - return &GetViewDirectoryQuotasOK{} -} - -/* -GetViewDirectoryQuotasOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewDirectoryQuotasOK struct { - Payload *models.ViewDirectoryQuotas -} - -// IsSuccess returns true when this get view directory quotas o k response has a 2xx status code -func (o *GetViewDirectoryQuotasOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view directory quotas o k response has a 3xx status code -func (o *GetViewDirectoryQuotasOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view directory quotas o k response has a 4xx status code -func (o *GetViewDirectoryQuotasOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view directory quotas o k response has a 5xx status code -func (o *GetViewDirectoryQuotasOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view directory quotas o k response a status code equal to that given -func (o *GetViewDirectoryQuotasOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view directory quotas o k response -func (o *GetViewDirectoryQuotasOK) Code() int { - return 200 -} - -func (o *GetViewDirectoryQuotasOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/directory-quotas][%d] getViewDirectoryQuotasOK %s", 200, payload) -} - -func (o *GetViewDirectoryQuotasOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/directory-quotas][%d] getViewDirectoryQuotasOK %s", 200, payload) -} - -func (o *GetViewDirectoryQuotasOK) GetPayload() *models.ViewDirectoryQuotas { - return o.Payload -} - -func (o *GetViewDirectoryQuotasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewDirectoryQuotas) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewDirectoryQuotasDefault creates a GetViewDirectoryQuotasDefault with default headers values -func NewGetViewDirectoryQuotasDefault(code int) *GetViewDirectoryQuotasDefault { - return &GetViewDirectoryQuotasDefault{ - _statusCode: code, - } -} - -/* -GetViewDirectoryQuotasDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewDirectoryQuotasDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view directory quotas default response has a 2xx status code -func (o *GetViewDirectoryQuotasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view directory quotas default response has a 3xx status code -func (o *GetViewDirectoryQuotasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view directory quotas default response has a 4xx status code -func (o *GetViewDirectoryQuotasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view directory quotas default response has a 5xx status code -func (o *GetViewDirectoryQuotasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view directory quotas default response a status code equal to that given -func (o *GetViewDirectoryQuotasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view directory quotas default response -func (o *GetViewDirectoryQuotasDefault) Code() int { - return o._statusCode -} - -func (o *GetViewDirectoryQuotasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/directory-quotas][%d] GetViewDirectoryQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewDirectoryQuotasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{id}/directory-quotas][%d] GetViewDirectoryQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewDirectoryQuotasDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewDirectoryQuotasDefault) 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/view/get_view_user_quotas_parameters.go b/v2/client/view/get_view_user_quotas_parameters.go deleted file mode 100644 index 4f0950b9..00000000 --- a/v2/client/view/get_view_user_quotas_parameters.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewUserQuotasParams creates a new GetViewUserQuotasParams 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 NewGetViewUserQuotasParams() *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewUserQuotasParamsWithTimeout creates a new GetViewUserQuotasParams object -// with the ability to set a timeout on a request. -func NewGetViewUserQuotasParamsWithTimeout(timeout time.Duration) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - timeout: timeout, - } -} - -// NewGetViewUserQuotasParamsWithContext creates a new GetViewUserQuotasParams object -// with the ability to set a context for a request. -func NewGetViewUserQuotasParamsWithContext(ctx context.Context) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - Context: ctx, - } -} - -// NewGetViewUserQuotasParamsWithHTTPClient creates a new GetViewUserQuotasParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewUserQuotasParamsWithHTTPClient(client *http.Client) *GetViewUserQuotasParams { - return &GetViewUserQuotasParams{ - HTTPClient: client, - } -} - -/* -GetViewUserQuotasParams contains all the parameters to send to the API endpoint - - for the get view user quotas operation. - - Typically these are written to a http.Request. -*/ -type GetViewUserQuotasParams struct { - - /* Cookie. - - Specifies the cookie. If there are more results than maxCount, response will include a cookie with has to be set as part of the next GET request. - */ - Cookie *string - - /* MaxCount. - - Specifies a limit on the number of quotas returned. If maxCount is not set, response will have a maximum of 100 results. - - Format: int64 - */ - MaxCount *int64 - - /* Sid. - - Specifies the user identifier of a SMB user. If a valid unix-id to SID mappings are available (i.e., when mixed mode is enabled) the server will perform the necessary id mapping and return the correct usage irrespective of whether the unix id / SID is provided. - */ - Sid *string - - /* UnixUID. - - Specifies the user identifier of an Unix user. If a valid unix-id to SID mappings are available (i.e., when mixed mode is enabled) the server will perform the necessary id mapping and return the correct usage irrespective of whether the unix id / SID is provided. - - Format: uint32 - */ - UnixUID *uint32 - - /* ViewID. - - Specifies the View id. - - Format: int64 - */ - ViewID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get view user quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewUserQuotasParams) WithDefaults() *GetViewUserQuotasParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get view user quotas params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewUserQuotasParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get view user quotas params -func (o *GetViewUserQuotasParams) WithTimeout(timeout time.Duration) *GetViewUserQuotasParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get view user quotas params -func (o *GetViewUserQuotasParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get view user quotas params -func (o *GetViewUserQuotasParams) WithContext(ctx context.Context) *GetViewUserQuotasParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get view user quotas params -func (o *GetViewUserQuotasParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get view user quotas params -func (o *GetViewUserQuotasParams) WithHTTPClient(client *http.Client) *GetViewUserQuotasParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get view user quotas params -func (o *GetViewUserQuotasParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the get view user quotas params -func (o *GetViewUserQuotasParams) WithCookie(cookie *string) *GetViewUserQuotasParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the get view user quotas params -func (o *GetViewUserQuotasParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithMaxCount adds the maxCount to the get view user quotas params -func (o *GetViewUserQuotasParams) WithMaxCount(maxCount *int64) *GetViewUserQuotasParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get view user quotas params -func (o *GetViewUserQuotasParams) SetMaxCount(maxCount *int64) { - o.MaxCount = maxCount -} - -// WithSid adds the sid to the get view user quotas params -func (o *GetViewUserQuotasParams) WithSid(sid *string) *GetViewUserQuotasParams { - o.SetSid(sid) - return o -} - -// SetSid adds the sid to the get view user quotas params -func (o *GetViewUserQuotasParams) SetSid(sid *string) { - o.Sid = sid -} - -// WithUnixUID adds the unixUID to the get view user quotas params -func (o *GetViewUserQuotasParams) WithUnixUID(unixUID *uint32) *GetViewUserQuotasParams { - o.SetUnixUID(unixUID) - return o -} - -// SetUnixUID adds the unixUid to the get view user quotas params -func (o *GetViewUserQuotasParams) SetUnixUID(unixUID *uint32) { - o.UnixUID = unixUID -} - -// WithViewID adds the viewID to the get view user quotas params -func (o *GetViewUserQuotasParams) WithViewID(viewID int64) *GetViewUserQuotasParams { - o.SetViewID(viewID) - return o -} - -// SetViewID adds the viewId to the get view user quotas params -func (o *GetViewUserQuotasParams) SetViewID(viewID int64) { - o.ViewID = viewID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewUserQuotasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int64 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt64(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.Sid != nil { - - // query param sid - var qrSid string - - if o.Sid != nil { - qrSid = *o.Sid - } - qSid := qrSid - if qSid != "" { - - if err := r.SetQueryParam("sid", qSid); err != nil { - return err - } - } - } - - if o.UnixUID != nil { - - // query param unixUid - var qrUnixUID uint32 - - if o.UnixUID != nil { - qrUnixUID = *o.UnixUID - } - qUnixUID := swag.FormatUint32(qrUnixUID) - if qUnixUID != "" { - - if err := r.SetQueryParam("unixUid", qUnixUID); err != nil { - return err - } - } - } - - // path param viewId - if err := r.SetPathParam("viewId", swag.FormatInt64(o.ViewID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_view_user_quotas_responses.go b/v2/client/view/get_view_user_quotas_responses.go deleted file mode 100644 index ea11aa94..00000000 --- a/v2/client/view/get_view_user_quotas_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewUserQuotasReader is a Reader for the GetViewUserQuotas structure. -type GetViewUserQuotasReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewUserQuotasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewUserQuotasOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewUserQuotasDefault(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 - } -} - -// NewGetViewUserQuotasOK creates a GetViewUserQuotasOK with default headers values -func NewGetViewUserQuotasOK() *GetViewUserQuotasOK { - return &GetViewUserQuotasOK{} -} - -/* -GetViewUserQuotasOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewUserQuotasOK struct { - Payload *models.ViewUserQuotas -} - -// IsSuccess returns true when this get view user quotas o k response has a 2xx status code -func (o *GetViewUserQuotasOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get view user quotas o k response has a 3xx status code -func (o *GetViewUserQuotasOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get view user quotas o k response has a 4xx status code -func (o *GetViewUserQuotasOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get view user quotas o k response has a 5xx status code -func (o *GetViewUserQuotasOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get view user quotas o k response a status code equal to that given -func (o *GetViewUserQuotasOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get view user quotas o k response -func (o *GetViewUserQuotasOK) Code() int { - return 200 -} - -func (o *GetViewUserQuotasOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{viewId}/user-quotas][%d] getViewUserQuotasOK %s", 200, payload) -} - -func (o *GetViewUserQuotasOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{viewId}/user-quotas][%d] getViewUserQuotasOK %s", 200, payload) -} - -func (o *GetViewUserQuotasOK) GetPayload() *models.ViewUserQuotas { - return o.Payload -} - -func (o *GetViewUserQuotasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewUserQuotas) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewUserQuotasDefault creates a GetViewUserQuotasDefault with default headers values -func NewGetViewUserQuotasDefault(code int) *GetViewUserQuotasDefault { - return &GetViewUserQuotasDefault{ - _statusCode: code, - } -} - -/* -GetViewUserQuotasDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewUserQuotasDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get view user quotas default response has a 2xx status code -func (o *GetViewUserQuotasDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get view user quotas default response has a 3xx status code -func (o *GetViewUserQuotasDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get view user quotas default response has a 4xx status code -func (o *GetViewUserQuotasDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get view user quotas default response has a 5xx status code -func (o *GetViewUserQuotasDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get view user quotas default response a status code equal to that given -func (o *GetViewUserQuotasDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get view user quotas default response -func (o *GetViewUserQuotasDefault) Code() int { - return o._statusCode -} - -func (o *GetViewUserQuotasDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{viewId}/user-quotas][%d] GetViewUserQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewUserQuotasDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views/{viewId}/user-quotas][%d] GetViewUserQuotas default %s", o._statusCode, payload) -} - -func (o *GetViewUserQuotasDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewUserQuotasDefault) 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/view/get_views_parameters.go b/v2/client/view/get_views_parameters.go deleted file mode 100644 index 3fe284cf..00000000 --- a/v2/client/view/get_views_parameters.go +++ /dev/null @@ -1,1528 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewsParams creates a new GetViewsParams 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 NewGetViewsParams() *GetViewsParams { - return &GetViewsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewsParamsWithTimeout creates a new GetViewsParams object -// with the ability to set a timeout on a request. -func NewGetViewsParamsWithTimeout(timeout time.Duration) *GetViewsParams { - return &GetViewsParams{ - timeout: timeout, - } -} - -// NewGetViewsParamsWithContext creates a new GetViewsParams object -// with the ability to set a context for a request. -func NewGetViewsParamsWithContext(ctx context.Context) *GetViewsParams { - return &GetViewsParams{ - Context: ctx, - } -} - -// NewGetViewsParamsWithHTTPClient creates a new GetViewsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewsParamsWithHTTPClient(client *http.Client) *GetViewsParams { - return &GetViewsParams{ - HTTPClient: client, - } -} - -/* -GetViewsParams contains all the parameters to send to the API endpoint - - for the get views operation. - - Typically these are written to a http.Request. -*/ -type GetViewsParams struct { - - /* Categories. - - Filter by a list of View categories. - */ - Categories []string - - /* FilerAuditLogEnabled. - - If set to true, only views with filer audit log enabled will be returned. - If set to false, only views with filer audit log disabled will be returned. - */ - FilerAuditLogEnabled *bool - - /* 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 - - /* IncludeFileCountBySize. - - Whether to include View file count by size. - */ - IncludeFileCountBySize *bool - - /* IncludeInactive. - - Specifies if inactive Views on this Remote Cluster (which have - Snapshots copied by replication) should also be returned. - Inactive Views are not counted towards the maxCount. - By default, this field is set to false. - */ - IncludeInactive *bool - - /* IncludeInternalViews. - - Specifies if internal Views created by the Cohesity Cluster are - also returned. In addition, regular Views are returned. - */ - IncludeInternalViews *bool - - /* IncludeProtectionGroups. - - Specifies if Protection Groups information needs to be returned along with - view metadata. By default, if not set or set to true, Group information is - returned. - */ - IncludeProtectionGroups *bool - - /* IncludeStats. - - If set to true, stats of views will be returned. By default this parameter - is set to false. - */ - IncludeStats *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 - - /* IncludeViewsWithAntivirusEnabledOnly. - - If set to true, the list will contain only the views for which antivirus - scan is enabled. - */ - IncludeViewsWithAntivirusEnabledOnly *bool - - /* IncludeViewsWithDataLockEnabledOnly. - - If set to true, the list will contain only the views for which either - file level data lock is enabled or view level data lock is enabled. - */ - IncludeViewsWithDataLockEnabledOnly *bool - - /* InternalAccessSids. - - Sids of restricted principals who can access the view. This is an - internal field and therefore does not have json tag. - */ - InternalAccessSids []string - - /* IsProtected. - - Specifies the protection status of Views. If set to true, only protected Views will be returned. If set to false, only unprotected Views will be returned. - */ - IsProtected *bool - - /* LastRunAnyStatuses. - - Filter by last any run status of the view.
'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.
'Skipped' indicates that the run was skipped. - */ - LastRunAnyStatuses []string - - /* LastRunArchivalStatuses. - - Filter by last cloud archival run status of the view.
'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.
'Skipped' indicates that the run was skipped. - */ - LastRunArchivalStatuses []string - - /* LastRunLocalBackupStatuses. - - Filter by last local backup run status of the view.
'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.
'Skipped' indicates that the run was skipped. - */ - LastRunLocalBackupStatuses []string - - /* LastRunReplicationStatuses. - - Filter by last remote replication run status of the view.
'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.
'Skipped' indicates that the run was skipped. - */ - LastRunReplicationStatuses []string - - /* MatchAliasNames. - - If true, view aliases are also matched with the names in viewNames. - */ - MatchAliasNames *bool - - /* MatchPartialNames. - - If true, the names in viewNames are matched by any partial rather than - exactly matched. - */ - MatchPartialNames *bool - - /* MaxCount. - - Specifies a limit on the number of Views returned. - - Format: int32 - */ - MaxCount *int32 - - /* MaxViewID. - - If the number of Views to return exceeds the maxCount specified in the - original request, specify the id of the last View - from the viewList in the previous response - to get the next set of Views. - - Format: int64 - */ - MaxViewID *int64 - - /* ProtectionGroupIds. - - This field will be deprecated. Filter by Protection Group ids. - Return Views that are being protected by listed Groups, which are specified by ids. - If both protectionGroupIds and viewProtectionGroupIds are specified, only - viewProtectionGroupIds will be used. - */ - ProtectionGroupIds []int64 - - /* ProtocolAccesses. - - Filter by a list of protocol accesses. Only views with - protocol accesses in these specified accesses list will be returned. - */ - ProtocolAccesses []string - - /* QosPrincipalIds. - - qosPrincipalIds contains ids of the QoS principal for which - views are to be returned. - */ - QosPrincipalIds []int64 - - /* SortByLogicalUsage. - - If set to true, the list is sorted descending by logical usage. - */ - SortByLogicalUsage *bool - - /* StorageDomainIds. - - Filter by a list of Storage Domains (View Boxes) specified by id. - */ - StorageDomainIds []int64 - - /* StorageDomainNames. - - Filter by a list of View Box names. - */ - StorageDomainNames []string - - /* SummaryOnly. - - Whether to get only view summary including 'name', 'viewId', - 'storageDomainName', 'storageDomainId' and 'tenantId'. - */ - SummaryOnly *bool - - /* 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. - */ - UseCachedData *bool - - /* ViewCountOnly. - - Whether to get just the total number of views with the given input - filters. If the flag is true, we ignore the parameter 'maxViews' for the - count. Also, if flag is true, list of views will not be returned. - */ - ViewCountOnly *bool - - /* ViewIds. - - Filter by a list of View ids. - */ - ViewIds []int64 - - /* ViewNames. - - Filter by a list of View names. - */ - ViewNames []string - - /* ViewProtectionGroupIds. - - Filter by Protection Group ids. Return Views that are being protected by - listed Groups, which are specified by ids. - */ - ViewProtectionGroupIds []string - - /* ViewProtectionTypes. - - Filter by a list of View protection types. Supported types: [Local Archival ReplicationOut ReplicationIn UnProtected]. UnProtected is mutually exclusive from remaining types. - */ - ViewProtectionTypes []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get views params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsParams) WithDefaults() *GetViewsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get views params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get views params -func (o *GetViewsParams) WithTimeout(timeout time.Duration) *GetViewsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get views params -func (o *GetViewsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get views params -func (o *GetViewsParams) WithContext(ctx context.Context) *GetViewsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get views params -func (o *GetViewsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get views params -func (o *GetViewsParams) WithHTTPClient(client *http.Client) *GetViewsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get views params -func (o *GetViewsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCategories adds the categories to the get views params -func (o *GetViewsParams) WithCategories(categories []string) *GetViewsParams { - o.SetCategories(categories) - return o -} - -// SetCategories adds the categories to the get views params -func (o *GetViewsParams) SetCategories(categories []string) { - o.Categories = categories -} - -// WithFilerAuditLogEnabled adds the filerAuditLogEnabled to the get views params -func (o *GetViewsParams) WithFilerAuditLogEnabled(filerAuditLogEnabled *bool) *GetViewsParams { - o.SetFilerAuditLogEnabled(filerAuditLogEnabled) - return o -} - -// SetFilerAuditLogEnabled adds the filerAuditLogEnabled to the get views params -func (o *GetViewsParams) SetFilerAuditLogEnabled(filerAuditLogEnabled *bool) { - o.FilerAuditLogEnabled = filerAuditLogEnabled -} - -// WithIncludeDeletedProtectionGroups adds the includeDeletedProtectionGroups to the get views params -func (o *GetViewsParams) WithIncludeDeletedProtectionGroups(includeDeletedProtectionGroups *bool) *GetViewsParams { - o.SetIncludeDeletedProtectionGroups(includeDeletedProtectionGroups) - return o -} - -// SetIncludeDeletedProtectionGroups adds the includeDeletedProtectionGroups to the get views params -func (o *GetViewsParams) SetIncludeDeletedProtectionGroups(includeDeletedProtectionGroups *bool) { - o.IncludeDeletedProtectionGroups = includeDeletedProtectionGroups -} - -// WithIncludeFileCountBySize adds the includeFileCountBySize to the get views params -func (o *GetViewsParams) WithIncludeFileCountBySize(includeFileCountBySize *bool) *GetViewsParams { - o.SetIncludeFileCountBySize(includeFileCountBySize) - return o -} - -// SetIncludeFileCountBySize adds the includeFileCountBySize to the get views params -func (o *GetViewsParams) SetIncludeFileCountBySize(includeFileCountBySize *bool) { - o.IncludeFileCountBySize = includeFileCountBySize -} - -// WithIncludeInactive adds the includeInactive to the get views params -func (o *GetViewsParams) WithIncludeInactive(includeInactive *bool) *GetViewsParams { - o.SetIncludeInactive(includeInactive) - return o -} - -// SetIncludeInactive adds the includeInactive to the get views params -func (o *GetViewsParams) SetIncludeInactive(includeInactive *bool) { - o.IncludeInactive = includeInactive -} - -// WithIncludeInternalViews adds the includeInternalViews to the get views params -func (o *GetViewsParams) WithIncludeInternalViews(includeInternalViews *bool) *GetViewsParams { - o.SetIncludeInternalViews(includeInternalViews) - return o -} - -// SetIncludeInternalViews adds the includeInternalViews to the get views params -func (o *GetViewsParams) SetIncludeInternalViews(includeInternalViews *bool) { - o.IncludeInternalViews = includeInternalViews -} - -// WithIncludeProtectionGroups adds the includeProtectionGroups to the get views params -func (o *GetViewsParams) WithIncludeProtectionGroups(includeProtectionGroups *bool) *GetViewsParams { - o.SetIncludeProtectionGroups(includeProtectionGroups) - return o -} - -// SetIncludeProtectionGroups adds the includeProtectionGroups to the get views params -func (o *GetViewsParams) SetIncludeProtectionGroups(includeProtectionGroups *bool) { - o.IncludeProtectionGroups = includeProtectionGroups -} - -// WithIncludeStats adds the includeStats to the get views params -func (o *GetViewsParams) WithIncludeStats(includeStats *bool) *GetViewsParams { - o.SetIncludeStats(includeStats) - return o -} - -// SetIncludeStats adds the includeStats to the get views params -func (o *GetViewsParams) SetIncludeStats(includeStats *bool) { - o.IncludeStats = includeStats -} - -// WithIncludeTenants adds the includeTenants to the get views params -func (o *GetViewsParams) WithIncludeTenants(includeTenants *bool) *GetViewsParams { - o.SetIncludeTenants(includeTenants) - return o -} - -// SetIncludeTenants adds the includeTenants to the get views params -func (o *GetViewsParams) SetIncludeTenants(includeTenants *bool) { - o.IncludeTenants = includeTenants -} - -// WithIncludeViewsWithAntivirusEnabledOnly adds the includeViewsWithAntivirusEnabledOnly to the get views params -func (o *GetViewsParams) WithIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly *bool) *GetViewsParams { - o.SetIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly) - return o -} - -// SetIncludeViewsWithAntivirusEnabledOnly adds the includeViewsWithAntivirusEnabledOnly to the get views params -func (o *GetViewsParams) SetIncludeViewsWithAntivirusEnabledOnly(includeViewsWithAntivirusEnabledOnly *bool) { - o.IncludeViewsWithAntivirusEnabledOnly = includeViewsWithAntivirusEnabledOnly -} - -// WithIncludeViewsWithDataLockEnabledOnly adds the includeViewsWithDataLockEnabledOnly to the get views params -func (o *GetViewsParams) WithIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly *bool) *GetViewsParams { - o.SetIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly) - return o -} - -// SetIncludeViewsWithDataLockEnabledOnly adds the includeViewsWithDataLockEnabledOnly to the get views params -func (o *GetViewsParams) SetIncludeViewsWithDataLockEnabledOnly(includeViewsWithDataLockEnabledOnly *bool) { - o.IncludeViewsWithDataLockEnabledOnly = includeViewsWithDataLockEnabledOnly -} - -// WithInternalAccessSids adds the internalAccessSids to the get views params -func (o *GetViewsParams) WithInternalAccessSids(internalAccessSids []string) *GetViewsParams { - o.SetInternalAccessSids(internalAccessSids) - return o -} - -// SetInternalAccessSids adds the internalAccessSids to the get views params -func (o *GetViewsParams) SetInternalAccessSids(internalAccessSids []string) { - o.InternalAccessSids = internalAccessSids -} - -// WithIsProtected adds the isProtected to the get views params -func (o *GetViewsParams) WithIsProtected(isProtected *bool) *GetViewsParams { - o.SetIsProtected(isProtected) - return o -} - -// SetIsProtected adds the isProtected to the get views params -func (o *GetViewsParams) SetIsProtected(isProtected *bool) { - o.IsProtected = isProtected -} - -// WithLastRunAnyStatuses adds the lastRunAnyStatuses to the get views params -func (o *GetViewsParams) WithLastRunAnyStatuses(lastRunAnyStatuses []string) *GetViewsParams { - o.SetLastRunAnyStatuses(lastRunAnyStatuses) - return o -} - -// SetLastRunAnyStatuses adds the lastRunAnyStatuses to the get views params -func (o *GetViewsParams) SetLastRunAnyStatuses(lastRunAnyStatuses []string) { - o.LastRunAnyStatuses = lastRunAnyStatuses -} - -// WithLastRunArchivalStatuses adds the lastRunArchivalStatuses to the get views params -func (o *GetViewsParams) WithLastRunArchivalStatuses(lastRunArchivalStatuses []string) *GetViewsParams { - o.SetLastRunArchivalStatuses(lastRunArchivalStatuses) - return o -} - -// SetLastRunArchivalStatuses adds the lastRunArchivalStatuses to the get views params -func (o *GetViewsParams) SetLastRunArchivalStatuses(lastRunArchivalStatuses []string) { - o.LastRunArchivalStatuses = lastRunArchivalStatuses -} - -// WithLastRunLocalBackupStatuses adds the lastRunLocalBackupStatuses to the get views params -func (o *GetViewsParams) WithLastRunLocalBackupStatuses(lastRunLocalBackupStatuses []string) *GetViewsParams { - o.SetLastRunLocalBackupStatuses(lastRunLocalBackupStatuses) - return o -} - -// SetLastRunLocalBackupStatuses adds the lastRunLocalBackupStatuses to the get views params -func (o *GetViewsParams) SetLastRunLocalBackupStatuses(lastRunLocalBackupStatuses []string) { - o.LastRunLocalBackupStatuses = lastRunLocalBackupStatuses -} - -// WithLastRunReplicationStatuses adds the lastRunReplicationStatuses to the get views params -func (o *GetViewsParams) WithLastRunReplicationStatuses(lastRunReplicationStatuses []string) *GetViewsParams { - o.SetLastRunReplicationStatuses(lastRunReplicationStatuses) - return o -} - -// SetLastRunReplicationStatuses adds the lastRunReplicationStatuses to the get views params -func (o *GetViewsParams) SetLastRunReplicationStatuses(lastRunReplicationStatuses []string) { - o.LastRunReplicationStatuses = lastRunReplicationStatuses -} - -// WithMatchAliasNames adds the matchAliasNames to the get views params -func (o *GetViewsParams) WithMatchAliasNames(matchAliasNames *bool) *GetViewsParams { - o.SetMatchAliasNames(matchAliasNames) - return o -} - -// SetMatchAliasNames adds the matchAliasNames to the get views params -func (o *GetViewsParams) SetMatchAliasNames(matchAliasNames *bool) { - o.MatchAliasNames = matchAliasNames -} - -// WithMatchPartialNames adds the matchPartialNames to the get views params -func (o *GetViewsParams) WithMatchPartialNames(matchPartialNames *bool) *GetViewsParams { - o.SetMatchPartialNames(matchPartialNames) - return o -} - -// SetMatchPartialNames adds the matchPartialNames to the get views params -func (o *GetViewsParams) SetMatchPartialNames(matchPartialNames *bool) { - o.MatchPartialNames = matchPartialNames -} - -// WithMaxCount adds the maxCount to the get views params -func (o *GetViewsParams) WithMaxCount(maxCount *int32) *GetViewsParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the get views params -func (o *GetViewsParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithMaxViewID adds the maxViewID to the get views params -func (o *GetViewsParams) WithMaxViewID(maxViewID *int64) *GetViewsParams { - o.SetMaxViewID(maxViewID) - return o -} - -// SetMaxViewID adds the maxViewId to the get views params -func (o *GetViewsParams) SetMaxViewID(maxViewID *int64) { - o.MaxViewID = maxViewID -} - -// WithProtectionGroupIds adds the protectionGroupIds to the get views params -func (o *GetViewsParams) WithProtectionGroupIds(protectionGroupIds []int64) *GetViewsParams { - o.SetProtectionGroupIds(protectionGroupIds) - return o -} - -// SetProtectionGroupIds adds the protectionGroupIds to the get views params -func (o *GetViewsParams) SetProtectionGroupIds(protectionGroupIds []int64) { - o.ProtectionGroupIds = protectionGroupIds -} - -// WithProtocolAccesses adds the protocolAccesses to the get views params -func (o *GetViewsParams) WithProtocolAccesses(protocolAccesses []string) *GetViewsParams { - o.SetProtocolAccesses(protocolAccesses) - return o -} - -// SetProtocolAccesses adds the protocolAccesses to the get views params -func (o *GetViewsParams) SetProtocolAccesses(protocolAccesses []string) { - o.ProtocolAccesses = protocolAccesses -} - -// WithQosPrincipalIds adds the qosPrincipalIds to the get views params -func (o *GetViewsParams) WithQosPrincipalIds(qosPrincipalIds []int64) *GetViewsParams { - o.SetQosPrincipalIds(qosPrincipalIds) - return o -} - -// SetQosPrincipalIds adds the qosPrincipalIds to the get views params -func (o *GetViewsParams) SetQosPrincipalIds(qosPrincipalIds []int64) { - o.QosPrincipalIds = qosPrincipalIds -} - -// WithSortByLogicalUsage adds the sortByLogicalUsage to the get views params -func (o *GetViewsParams) WithSortByLogicalUsage(sortByLogicalUsage *bool) *GetViewsParams { - o.SetSortByLogicalUsage(sortByLogicalUsage) - return o -} - -// SetSortByLogicalUsage adds the sortByLogicalUsage to the get views params -func (o *GetViewsParams) SetSortByLogicalUsage(sortByLogicalUsage *bool) { - o.SortByLogicalUsage = sortByLogicalUsage -} - -// WithStorageDomainIds adds the storageDomainIds to the get views params -func (o *GetViewsParams) WithStorageDomainIds(storageDomainIds []int64) *GetViewsParams { - o.SetStorageDomainIds(storageDomainIds) - return o -} - -// SetStorageDomainIds adds the storageDomainIds to the get views params -func (o *GetViewsParams) SetStorageDomainIds(storageDomainIds []int64) { - o.StorageDomainIds = storageDomainIds -} - -// WithStorageDomainNames adds the storageDomainNames to the get views params -func (o *GetViewsParams) WithStorageDomainNames(storageDomainNames []string) *GetViewsParams { - o.SetStorageDomainNames(storageDomainNames) - return o -} - -// SetStorageDomainNames adds the storageDomainNames to the get views params -func (o *GetViewsParams) SetStorageDomainNames(storageDomainNames []string) { - o.StorageDomainNames = storageDomainNames -} - -// WithSummaryOnly adds the summaryOnly to the get views params -func (o *GetViewsParams) WithSummaryOnly(summaryOnly *bool) *GetViewsParams { - o.SetSummaryOnly(summaryOnly) - return o -} - -// SetSummaryOnly adds the summaryOnly to the get views params -func (o *GetViewsParams) SetSummaryOnly(summaryOnly *bool) { - o.SummaryOnly = summaryOnly -} - -// WithTenantIds adds the tenantIds to the get views params -func (o *GetViewsParams) WithTenantIds(tenantIds []string) *GetViewsParams { - o.SetTenantIds(tenantIds) - return o -} - -// SetTenantIds adds the tenantIds to the get views params -func (o *GetViewsParams) SetTenantIds(tenantIds []string) { - o.TenantIds = tenantIds -} - -// WithUseCachedData adds the useCachedData to the get views params -func (o *GetViewsParams) WithUseCachedData(useCachedData *bool) *GetViewsParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get views params -func (o *GetViewsParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WithViewCountOnly adds the viewCountOnly to the get views params -func (o *GetViewsParams) WithViewCountOnly(viewCountOnly *bool) *GetViewsParams { - o.SetViewCountOnly(viewCountOnly) - return o -} - -// SetViewCountOnly adds the viewCountOnly to the get views params -func (o *GetViewsParams) SetViewCountOnly(viewCountOnly *bool) { - o.ViewCountOnly = viewCountOnly -} - -// WithViewIds adds the viewIds to the get views params -func (o *GetViewsParams) WithViewIds(viewIds []int64) *GetViewsParams { - o.SetViewIds(viewIds) - return o -} - -// SetViewIds adds the viewIds to the get views params -func (o *GetViewsParams) SetViewIds(viewIds []int64) { - o.ViewIds = viewIds -} - -// WithViewNames adds the viewNames to the get views params -func (o *GetViewsParams) WithViewNames(viewNames []string) *GetViewsParams { - o.SetViewNames(viewNames) - return o -} - -// SetViewNames adds the viewNames to the get views params -func (o *GetViewsParams) SetViewNames(viewNames []string) { - o.ViewNames = viewNames -} - -// WithViewProtectionGroupIds adds the viewProtectionGroupIds to the get views params -func (o *GetViewsParams) WithViewProtectionGroupIds(viewProtectionGroupIds []string) *GetViewsParams { - o.SetViewProtectionGroupIds(viewProtectionGroupIds) - return o -} - -// SetViewProtectionGroupIds adds the viewProtectionGroupIds to the get views params -func (o *GetViewsParams) SetViewProtectionGroupIds(viewProtectionGroupIds []string) { - o.ViewProtectionGroupIds = viewProtectionGroupIds -} - -// WithViewProtectionTypes adds the viewProtectionTypes to the get views params -func (o *GetViewsParams) WithViewProtectionTypes(viewProtectionTypes []string) *GetViewsParams { - o.SetViewProtectionTypes(viewProtectionTypes) - return o -} - -// SetViewProtectionTypes adds the viewProtectionTypes to the get views params -func (o *GetViewsParams) SetViewProtectionTypes(viewProtectionTypes []string) { - o.ViewProtectionTypes = viewProtectionTypes -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Categories != nil { - - // binding items for categories - joinedCategories := o.bindParamCategories(reg) - - // query array param categories - if err := r.SetQueryParam("categories", joinedCategories...); err != nil { - return err - } - } - - if o.FilerAuditLogEnabled != nil { - - // query param filerAuditLogEnabled - var qrFilerAuditLogEnabled bool - - if o.FilerAuditLogEnabled != nil { - qrFilerAuditLogEnabled = *o.FilerAuditLogEnabled - } - qFilerAuditLogEnabled := swag.FormatBool(qrFilerAuditLogEnabled) - if qFilerAuditLogEnabled != "" { - - if err := r.SetQueryParam("filerAuditLogEnabled", qFilerAuditLogEnabled); err != nil { - return err - } - } - } - - 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.IncludeFileCountBySize != nil { - - // query param includeFileCountBySize - var qrIncludeFileCountBySize bool - - if o.IncludeFileCountBySize != nil { - qrIncludeFileCountBySize = *o.IncludeFileCountBySize - } - qIncludeFileCountBySize := swag.FormatBool(qrIncludeFileCountBySize) - if qIncludeFileCountBySize != "" { - - if err := r.SetQueryParam("includeFileCountBySize", qIncludeFileCountBySize); err != nil { - return err - } - } - } - - if o.IncludeInactive != nil { - - // query param includeInactive - var qrIncludeInactive bool - - if o.IncludeInactive != nil { - qrIncludeInactive = *o.IncludeInactive - } - qIncludeInactive := swag.FormatBool(qrIncludeInactive) - if qIncludeInactive != "" { - - if err := r.SetQueryParam("includeInactive", qIncludeInactive); 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.IncludeProtectionGroups != nil { - - // query param includeProtectionGroups - var qrIncludeProtectionGroups bool - - if o.IncludeProtectionGroups != nil { - qrIncludeProtectionGroups = *o.IncludeProtectionGroups - } - qIncludeProtectionGroups := swag.FormatBool(qrIncludeProtectionGroups) - if qIncludeProtectionGroups != "" { - - if err := r.SetQueryParam("includeProtectionGroups", qIncludeProtectionGroups); err != nil { - return err - } - } - } - - if o.IncludeStats != nil { - - // query param includeStats - var qrIncludeStats bool - - if o.IncludeStats != nil { - qrIncludeStats = *o.IncludeStats - } - qIncludeStats := swag.FormatBool(qrIncludeStats) - if qIncludeStats != "" { - - if err := r.SetQueryParam("includeStats", qIncludeStats); 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.IncludeViewsWithAntivirusEnabledOnly != nil { - - // query param includeViewsWithAntivirusEnabledOnly - var qrIncludeViewsWithAntivirusEnabledOnly bool - - if o.IncludeViewsWithAntivirusEnabledOnly != nil { - qrIncludeViewsWithAntivirusEnabledOnly = *o.IncludeViewsWithAntivirusEnabledOnly - } - qIncludeViewsWithAntivirusEnabledOnly := swag.FormatBool(qrIncludeViewsWithAntivirusEnabledOnly) - if qIncludeViewsWithAntivirusEnabledOnly != "" { - - if err := r.SetQueryParam("includeViewsWithAntivirusEnabledOnly", qIncludeViewsWithAntivirusEnabledOnly); err != nil { - return err - } - } - } - - if o.IncludeViewsWithDataLockEnabledOnly != nil { - - // query param includeViewsWithDataLockEnabledOnly - var qrIncludeViewsWithDataLockEnabledOnly bool - - if o.IncludeViewsWithDataLockEnabledOnly != nil { - qrIncludeViewsWithDataLockEnabledOnly = *o.IncludeViewsWithDataLockEnabledOnly - } - qIncludeViewsWithDataLockEnabledOnly := swag.FormatBool(qrIncludeViewsWithDataLockEnabledOnly) - if qIncludeViewsWithDataLockEnabledOnly != "" { - - if err := r.SetQueryParam("includeViewsWithDataLockEnabledOnly", qIncludeViewsWithDataLockEnabledOnly); err != nil { - return err - } - } - } - - if o.InternalAccessSids != nil { - - // binding items for internalAccessSids - joinedInternalAccessSids := o.bindParamInternalAccessSids(reg) - - // query array param internalAccessSids - if err := r.SetQueryParam("internalAccessSids", joinedInternalAccessSids...); err != nil { - return err - } - } - - if o.IsProtected != nil { - - // query param isProtected - var qrIsProtected bool - - if o.IsProtected != nil { - qrIsProtected = *o.IsProtected - } - qIsProtected := swag.FormatBool(qrIsProtected) - if qIsProtected != "" { - - if err := r.SetQueryParam("isProtected", qIsProtected); err != nil { - return err - } - } - } - - if o.LastRunAnyStatuses != nil { - - // binding items for lastRunAnyStatuses - joinedLastRunAnyStatuses := o.bindParamLastRunAnyStatuses(reg) - - // query array param lastRunAnyStatuses - if err := r.SetQueryParam("lastRunAnyStatuses", joinedLastRunAnyStatuses...); err != nil { - return err - } - } - - if o.LastRunArchivalStatuses != nil { - - // binding items for lastRunArchivalStatuses - joinedLastRunArchivalStatuses := o.bindParamLastRunArchivalStatuses(reg) - - // query array param lastRunArchivalStatuses - if err := r.SetQueryParam("lastRunArchivalStatuses", joinedLastRunArchivalStatuses...); err != nil { - return err - } - } - - if o.LastRunLocalBackupStatuses != nil { - - // binding items for lastRunLocalBackupStatuses - joinedLastRunLocalBackupStatuses := o.bindParamLastRunLocalBackupStatuses(reg) - - // query array param lastRunLocalBackupStatuses - if err := r.SetQueryParam("lastRunLocalBackupStatuses", joinedLastRunLocalBackupStatuses...); err != nil { - return err - } - } - - if o.LastRunReplicationStatuses != nil { - - // binding items for lastRunReplicationStatuses - joinedLastRunReplicationStatuses := o.bindParamLastRunReplicationStatuses(reg) - - // query array param lastRunReplicationStatuses - if err := r.SetQueryParam("lastRunReplicationStatuses", joinedLastRunReplicationStatuses...); err != nil { - return err - } - } - - if o.MatchAliasNames != nil { - - // query param matchAliasNames - var qrMatchAliasNames bool - - if o.MatchAliasNames != nil { - qrMatchAliasNames = *o.MatchAliasNames - } - qMatchAliasNames := swag.FormatBool(qrMatchAliasNames) - if qMatchAliasNames != "" { - - if err := r.SetQueryParam("matchAliasNames", qMatchAliasNames); err != nil { - return err - } - } - } - - if o.MatchPartialNames != nil { - - // query param matchPartialNames - var qrMatchPartialNames bool - - if o.MatchPartialNames != nil { - qrMatchPartialNames = *o.MatchPartialNames - } - qMatchPartialNames := swag.FormatBool(qrMatchPartialNames) - if qMatchPartialNames != "" { - - if err := r.SetQueryParam("matchPartialNames", qMatchPartialNames); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.MaxViewID != nil { - - // query param maxViewId - var qrMaxViewID int64 - - if o.MaxViewID != nil { - qrMaxViewID = *o.MaxViewID - } - qMaxViewID := swag.FormatInt64(qrMaxViewID) - if qMaxViewID != "" { - - if err := r.SetQueryParam("maxViewId", qMaxViewID); err != nil { - return err - } - } - } - - if o.ProtectionGroupIds != nil { - - // binding items for protectionGroupIds - joinedProtectionGroupIds := o.bindParamProtectionGroupIds(reg) - - // query array param protectionGroupIds - if err := r.SetQueryParam("protectionGroupIds", joinedProtectionGroupIds...); err != nil { - return err - } - } - - if o.ProtocolAccesses != nil { - - // binding items for protocolAccesses - joinedProtocolAccesses := o.bindParamProtocolAccesses(reg) - - // query array param protocolAccesses - if err := r.SetQueryParam("protocolAccesses", joinedProtocolAccesses...); err != nil { - return err - } - } - - if o.QosPrincipalIds != nil { - - // binding items for qosPrincipalIds - joinedQosPrincipalIds := o.bindParamQosPrincipalIds(reg) - - // query array param qosPrincipalIds - if err := r.SetQueryParam("qosPrincipalIds", joinedQosPrincipalIds...); err != nil { - return err - } - } - - if o.SortByLogicalUsage != nil { - - // query param sortByLogicalUsage - var qrSortByLogicalUsage bool - - if o.SortByLogicalUsage != nil { - qrSortByLogicalUsage = *o.SortByLogicalUsage - } - qSortByLogicalUsage := swag.FormatBool(qrSortByLogicalUsage) - if qSortByLogicalUsage != "" { - - if err := r.SetQueryParam("sortByLogicalUsage", qSortByLogicalUsage); err != nil { - return err - } - } - } - - if o.StorageDomainIds != nil { - - // binding items for storageDomainIds - joinedStorageDomainIds := o.bindParamStorageDomainIds(reg) - - // query array param storageDomainIds - if err := r.SetQueryParam("storageDomainIds", joinedStorageDomainIds...); err != nil { - return err - } - } - - if o.StorageDomainNames != nil { - - // binding items for storageDomainNames - joinedStorageDomainNames := o.bindParamStorageDomainNames(reg) - - // query array param storageDomainNames - if err := r.SetQueryParam("storageDomainNames", joinedStorageDomainNames...); err != nil { - return err - } - } - - if o.SummaryOnly != nil { - - // query param summaryOnly - var qrSummaryOnly bool - - if o.SummaryOnly != nil { - qrSummaryOnly = *o.SummaryOnly - } - qSummaryOnly := swag.FormatBool(qrSummaryOnly) - if qSummaryOnly != "" { - - if err := r.SetQueryParam("summaryOnly", qSummaryOnly); err != nil { - return err - } - } - } - - 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 - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if o.ViewCountOnly != nil { - - // query param viewCountOnly - var qrViewCountOnly bool - - if o.ViewCountOnly != nil { - qrViewCountOnly = *o.ViewCountOnly - } - qViewCountOnly := swag.FormatBool(qrViewCountOnly) - if qViewCountOnly != "" { - - if err := r.SetQueryParam("viewCountOnly", qViewCountOnly); err != nil { - return err - } - } - } - - if o.ViewIds != nil { - - // binding items for viewIds - joinedViewIds := o.bindParamViewIds(reg) - - // query array param viewIds - if err := r.SetQueryParam("viewIds", joinedViewIds...); err != nil { - return err - } - } - - if o.ViewNames != nil { - - // binding items for viewNames - joinedViewNames := o.bindParamViewNames(reg) - - // query array param viewNames - if err := r.SetQueryParam("viewNames", joinedViewNames...); err != nil { - return err - } - } - - if o.ViewProtectionGroupIds != nil { - - // binding items for viewProtectionGroupIds - joinedViewProtectionGroupIds := o.bindParamViewProtectionGroupIds(reg) - - // query array param viewProtectionGroupIds - if err := r.SetQueryParam("viewProtectionGroupIds", joinedViewProtectionGroupIds...); err != nil { - return err - } - } - - if o.ViewProtectionTypes != nil { - - // binding items for viewProtectionTypes - joinedViewProtectionTypes := o.bindParamViewProtectionTypes(reg) - - // query array param viewProtectionTypes - if err := r.SetQueryParam("viewProtectionTypes", joinedViewProtectionTypes...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetViews binds the parameter categories -func (o *GetViewsParams) bindParamCategories(formats strfmt.Registry) []string { - categoriesIR := o.Categories - - var categoriesIC []string - for _, categoriesIIR := range categoriesIR { // explode []string - - categoriesIIV := categoriesIIR // string as string - categoriesIC = append(categoriesIC, categoriesIIV) - } - - // items.CollectionFormat: "" - categoriesIS := swag.JoinByFormat(categoriesIC, "") - - return categoriesIS -} - -// bindParamGetViews binds the parameter internalAccessSids -func (o *GetViewsParams) bindParamInternalAccessSids(formats strfmt.Registry) []string { - internalAccessSidsIR := o.InternalAccessSids - - var internalAccessSidsIC []string - for _, internalAccessSidsIIR := range internalAccessSidsIR { // explode []string - - internalAccessSidsIIV := internalAccessSidsIIR // string as string - internalAccessSidsIC = append(internalAccessSidsIC, internalAccessSidsIIV) - } - - // items.CollectionFormat: "" - internalAccessSidsIS := swag.JoinByFormat(internalAccessSidsIC, "") - - return internalAccessSidsIS -} - -// bindParamGetViews binds the parameter lastRunAnyStatuses -func (o *GetViewsParams) bindParamLastRunAnyStatuses(formats strfmt.Registry) []string { - lastRunAnyStatusesIR := o.LastRunAnyStatuses - - var lastRunAnyStatusesIC []string - for _, lastRunAnyStatusesIIR := range lastRunAnyStatusesIR { // explode []string - - lastRunAnyStatusesIIV := lastRunAnyStatusesIIR // string as string - lastRunAnyStatusesIC = append(lastRunAnyStatusesIC, lastRunAnyStatusesIIV) - } - - // items.CollectionFormat: "" - lastRunAnyStatusesIS := swag.JoinByFormat(lastRunAnyStatusesIC, "") - - return lastRunAnyStatusesIS -} - -// bindParamGetViews binds the parameter lastRunArchivalStatuses -func (o *GetViewsParams) bindParamLastRunArchivalStatuses(formats strfmt.Registry) []string { - lastRunArchivalStatusesIR := o.LastRunArchivalStatuses - - var lastRunArchivalStatusesIC []string - for _, lastRunArchivalStatusesIIR := range lastRunArchivalStatusesIR { // explode []string - - lastRunArchivalStatusesIIV := lastRunArchivalStatusesIIR // string as string - lastRunArchivalStatusesIC = append(lastRunArchivalStatusesIC, lastRunArchivalStatusesIIV) - } - - // items.CollectionFormat: "" - lastRunArchivalStatusesIS := swag.JoinByFormat(lastRunArchivalStatusesIC, "") - - return lastRunArchivalStatusesIS -} - -// bindParamGetViews binds the parameter lastRunLocalBackupStatuses -func (o *GetViewsParams) bindParamLastRunLocalBackupStatuses(formats strfmt.Registry) []string { - lastRunLocalBackupStatusesIR := o.LastRunLocalBackupStatuses - - var lastRunLocalBackupStatusesIC []string - for _, lastRunLocalBackupStatusesIIR := range lastRunLocalBackupStatusesIR { // explode []string - - lastRunLocalBackupStatusesIIV := lastRunLocalBackupStatusesIIR // string as string - lastRunLocalBackupStatusesIC = append(lastRunLocalBackupStatusesIC, lastRunLocalBackupStatusesIIV) - } - - // items.CollectionFormat: "" - lastRunLocalBackupStatusesIS := swag.JoinByFormat(lastRunLocalBackupStatusesIC, "") - - return lastRunLocalBackupStatusesIS -} - -// bindParamGetViews binds the parameter lastRunReplicationStatuses -func (o *GetViewsParams) bindParamLastRunReplicationStatuses(formats strfmt.Registry) []string { - lastRunReplicationStatusesIR := o.LastRunReplicationStatuses - - var lastRunReplicationStatusesIC []string - for _, lastRunReplicationStatusesIIR := range lastRunReplicationStatusesIR { // explode []string - - lastRunReplicationStatusesIIV := lastRunReplicationStatusesIIR // string as string - lastRunReplicationStatusesIC = append(lastRunReplicationStatusesIC, lastRunReplicationStatusesIIV) - } - - // items.CollectionFormat: "" - lastRunReplicationStatusesIS := swag.JoinByFormat(lastRunReplicationStatusesIC, "") - - return lastRunReplicationStatusesIS -} - -// bindParamGetViews binds the parameter protectionGroupIds -func (o *GetViewsParams) bindParamProtectionGroupIds(formats strfmt.Registry) []string { - protectionGroupIdsIR := o.ProtectionGroupIds - - var protectionGroupIdsIC []string - for _, protectionGroupIdsIIR := range protectionGroupIdsIR { // explode []int64 - - protectionGroupIdsIIV := swag.FormatInt64(protectionGroupIdsIIR) // int64 as string - protectionGroupIdsIC = append(protectionGroupIdsIC, protectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - protectionGroupIdsIS := swag.JoinByFormat(protectionGroupIdsIC, "") - - return protectionGroupIdsIS -} - -// bindParamGetViews binds the parameter protocolAccesses -func (o *GetViewsParams) bindParamProtocolAccesses(formats strfmt.Registry) []string { - protocolAccessesIR := o.ProtocolAccesses - - var protocolAccessesIC []string - for _, protocolAccessesIIR := range protocolAccessesIR { // explode []string - - protocolAccessesIIV := protocolAccessesIIR // string as string - protocolAccessesIC = append(protocolAccessesIC, protocolAccessesIIV) - } - - // items.CollectionFormat: "" - protocolAccessesIS := swag.JoinByFormat(protocolAccessesIC, "") - - return protocolAccessesIS -} - -// bindParamGetViews binds the parameter qosPrincipalIds -func (o *GetViewsParams) bindParamQosPrincipalIds(formats strfmt.Registry) []string { - qosPrincipalIdsIR := o.QosPrincipalIds - - var qosPrincipalIdsIC []string - for _, qosPrincipalIdsIIR := range qosPrincipalIdsIR { // explode []int64 - - qosPrincipalIdsIIV := swag.FormatInt64(qosPrincipalIdsIIR) // int64 as string - qosPrincipalIdsIC = append(qosPrincipalIdsIC, qosPrincipalIdsIIV) - } - - // items.CollectionFormat: "" - qosPrincipalIdsIS := swag.JoinByFormat(qosPrincipalIdsIC, "") - - return qosPrincipalIdsIS -} - -// bindParamGetViews binds the parameter storageDomainIds -func (o *GetViewsParams) bindParamStorageDomainIds(formats strfmt.Registry) []string { - storageDomainIdsIR := o.StorageDomainIds - - var storageDomainIdsIC []string - for _, storageDomainIdsIIR := range storageDomainIdsIR { // explode []int64 - - storageDomainIdsIIV := swag.FormatInt64(storageDomainIdsIIR) // int64 as string - storageDomainIdsIC = append(storageDomainIdsIC, storageDomainIdsIIV) - } - - // items.CollectionFormat: "" - storageDomainIdsIS := swag.JoinByFormat(storageDomainIdsIC, "") - - return storageDomainIdsIS -} - -// bindParamGetViews binds the parameter storageDomainNames -func (o *GetViewsParams) bindParamStorageDomainNames(formats strfmt.Registry) []string { - storageDomainNamesIR := o.StorageDomainNames - - var storageDomainNamesIC []string - for _, storageDomainNamesIIR := range storageDomainNamesIR { // explode []string - - storageDomainNamesIIV := storageDomainNamesIIR // string as string - storageDomainNamesIC = append(storageDomainNamesIC, storageDomainNamesIIV) - } - - // items.CollectionFormat: "" - storageDomainNamesIS := swag.JoinByFormat(storageDomainNamesIC, "") - - return storageDomainNamesIS -} - -// bindParamGetViews binds the parameter tenantIds -func (o *GetViewsParams) 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 -} - -// bindParamGetViews binds the parameter viewIds -func (o *GetViewsParams) bindParamViewIds(formats strfmt.Registry) []string { - viewIdsIR := o.ViewIds - - var viewIdsIC []string - for _, viewIdsIIR := range viewIdsIR { // explode []int64 - - viewIdsIIV := swag.FormatInt64(viewIdsIIR) // int64 as string - viewIdsIC = append(viewIdsIC, viewIdsIIV) - } - - // items.CollectionFormat: "" - viewIdsIS := swag.JoinByFormat(viewIdsIC, "") - - return viewIdsIS -} - -// bindParamGetViews binds the parameter viewNames -func (o *GetViewsParams) bindParamViewNames(formats strfmt.Registry) []string { - viewNamesIR := o.ViewNames - - var viewNamesIC []string - for _, viewNamesIIR := range viewNamesIR { // explode []string - - viewNamesIIV := viewNamesIIR // string as string - viewNamesIC = append(viewNamesIC, viewNamesIIV) - } - - // items.CollectionFormat: "" - viewNamesIS := swag.JoinByFormat(viewNamesIC, "") - - return viewNamesIS -} - -// bindParamGetViews binds the parameter viewProtectionGroupIds -func (o *GetViewsParams) bindParamViewProtectionGroupIds(formats strfmt.Registry) []string { - viewProtectionGroupIdsIR := o.ViewProtectionGroupIds - - var viewProtectionGroupIdsIC []string - for _, viewProtectionGroupIdsIIR := range viewProtectionGroupIdsIR { // explode []string - - viewProtectionGroupIdsIIV := viewProtectionGroupIdsIIR // string as string - viewProtectionGroupIdsIC = append(viewProtectionGroupIdsIC, viewProtectionGroupIdsIIV) - } - - // items.CollectionFormat: "" - viewProtectionGroupIdsIS := swag.JoinByFormat(viewProtectionGroupIdsIC, "") - - return viewProtectionGroupIdsIS -} - -// bindParamGetViews binds the parameter viewProtectionTypes -func (o *GetViewsParams) bindParamViewProtectionTypes(formats strfmt.Registry) []string { - viewProtectionTypesIR := o.ViewProtectionTypes - - var viewProtectionTypesIC []string - for _, viewProtectionTypesIIR := range viewProtectionTypesIR { // explode []string - - viewProtectionTypesIIV := viewProtectionTypesIIR // string as string - viewProtectionTypesIC = append(viewProtectionTypesIC, viewProtectionTypesIIV) - } - - // items.CollectionFormat: "" - viewProtectionTypesIS := swag.JoinByFormat(viewProtectionTypesIC, "") - - return viewProtectionTypesIS -} diff --git a/v2/client/view/get_views_responses.go b/v2/client/view/get_views_responses.go deleted file mode 100644 index 2ba4770e..00000000 --- a/v2/client/view/get_views_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewsReader is a Reader for the GetViews structure. -type GetViewsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewsDefault(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 - } -} - -// NewGetViewsOK creates a GetViewsOK with default headers values -func NewGetViewsOK() *GetViewsOK { - return &GetViewsOK{} -} - -/* -GetViewsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewsOK struct { - Payload *models.GetViewsResult -} - -// IsSuccess returns true when this get views o k response has a 2xx status code -func (o *GetViewsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get views o k response has a 3xx status code -func (o *GetViewsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get views o k response has a 4xx status code -func (o *GetViewsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get views o k response has a 5xx status code -func (o *GetViewsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get views o k response a status code equal to that given -func (o *GetViewsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get views o k response -func (o *GetViewsOK) Code() int { - return 200 -} - -func (o *GetViewsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views][%d] getViewsOK %s", 200, payload) -} - -func (o *GetViewsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views][%d] getViewsOK %s", 200, payload) -} - -func (o *GetViewsOK) GetPayload() *models.GetViewsResult { - return o.Payload -} - -func (o *GetViewsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewsResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewsDefault creates a GetViewsDefault with default headers values -func NewGetViewsDefault(code int) *GetViewsDefault { - return &GetViewsDefault{ - _statusCode: code, - } -} - -/* -GetViewsDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get views default response has a 2xx status code -func (o *GetViewsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get views default response has a 3xx status code -func (o *GetViewsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get views default response has a 4xx status code -func (o *GetViewsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get views default response has a 5xx status code -func (o *GetViewsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get views default response a status code equal to that given -func (o *GetViewsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get views default response -func (o *GetViewsDefault) Code() int { - return o._statusCode -} - -func (o *GetViewsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views][%d] GetViews default %s", o._statusCode, payload) -} - -func (o *GetViewsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views][%d] GetViews default %s", o._statusCode, payload) -} - -func (o *GetViewsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewsDefault) 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/view/get_views_summary_parameters.go b/v2/client/view/get_views_summary_parameters.go deleted file mode 100644 index 4134754f..00000000 --- a/v2/client/view/get_views_summary_parameters.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewGetViewsSummaryParams creates a new GetViewsSummaryParams 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 NewGetViewsSummaryParams() *GetViewsSummaryParams { - return &GetViewsSummaryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetViewsSummaryParamsWithTimeout creates a new GetViewsSummaryParams object -// with the ability to set a timeout on a request. -func NewGetViewsSummaryParamsWithTimeout(timeout time.Duration) *GetViewsSummaryParams { - return &GetViewsSummaryParams{ - timeout: timeout, - } -} - -// NewGetViewsSummaryParamsWithContext creates a new GetViewsSummaryParams object -// with the ability to set a context for a request. -func NewGetViewsSummaryParamsWithContext(ctx context.Context) *GetViewsSummaryParams { - return &GetViewsSummaryParams{ - Context: ctx, - } -} - -// NewGetViewsSummaryParamsWithHTTPClient creates a new GetViewsSummaryParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetViewsSummaryParamsWithHTTPClient(client *http.Client) *GetViewsSummaryParams { - return &GetViewsSummaryParams{ - HTTPClient: client, - } -} - -/* -GetViewsSummaryParams contains all the parameters to send to the API endpoint - - for the get views summary operation. - - Typically these are written to a http.Request. -*/ -type GetViewsSummaryParams struct { - - /* MsecsBeforeCurrentTimeToCompare. - - Specifies the time in msecs before current time to compare with. - - Format: int64 - */ - MsecsBeforeCurrentTimeToCompare *int64 - - /* 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. - */ - UseCachedData *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get views summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsSummaryParams) WithDefaults() *GetViewsSummaryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get views summary params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetViewsSummaryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get views summary params -func (o *GetViewsSummaryParams) WithTimeout(timeout time.Duration) *GetViewsSummaryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get views summary params -func (o *GetViewsSummaryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get views summary params -func (o *GetViewsSummaryParams) WithContext(ctx context.Context) *GetViewsSummaryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get views summary params -func (o *GetViewsSummaryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get views summary params -func (o *GetViewsSummaryParams) WithHTTPClient(client *http.Client) *GetViewsSummaryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get views summary params -func (o *GetViewsSummaryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get views summary params -func (o *GetViewsSummaryParams) WithMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) *GetViewsSummaryParams { - o.SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare) - return o -} - -// SetMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get views summary params -func (o *GetViewsSummaryParams) SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) { - o.MsecsBeforeCurrentTimeToCompare = msecsBeforeCurrentTimeToCompare -} - -// WithUseCachedData adds the useCachedData to the get views summary params -func (o *GetViewsSummaryParams) WithUseCachedData(useCachedData *bool) *GetViewsSummaryParams { - o.SetUseCachedData(useCachedData) - return o -} - -// SetUseCachedData adds the useCachedData to the get views summary params -func (o *GetViewsSummaryParams) SetUseCachedData(useCachedData *bool) { - o.UseCachedData = useCachedData -} - -// WriteToRequest writes these params to a swagger request -func (o *GetViewsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.MsecsBeforeCurrentTimeToCompare != nil { - - // query param msecsBeforeCurrentTimeToCompare - var qrMsecsBeforeCurrentTimeToCompare int64 - - if o.MsecsBeforeCurrentTimeToCompare != nil { - qrMsecsBeforeCurrentTimeToCompare = *o.MsecsBeforeCurrentTimeToCompare - } - qMsecsBeforeCurrentTimeToCompare := swag.FormatInt64(qrMsecsBeforeCurrentTimeToCompare) - if qMsecsBeforeCurrentTimeToCompare != "" { - - if err := r.SetQueryParam("msecsBeforeCurrentTimeToCompare", qMsecsBeforeCurrentTimeToCompare); err != nil { - return err - } - } - } - - if o.UseCachedData != nil { - - // query param useCachedData - var qrUseCachedData bool - - if o.UseCachedData != nil { - qrUseCachedData = *o.UseCachedData - } - qUseCachedData := swag.FormatBool(qrUseCachedData) - if qUseCachedData != "" { - - if err := r.SetQueryParam("useCachedData", qUseCachedData); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/get_views_summary_responses.go b/v2/client/view/get_views_summary_responses.go deleted file mode 100644 index e2a7a2b7..00000000 --- a/v2/client/view/get_views_summary_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// GetViewsSummaryReader is a Reader for the GetViewsSummary structure. -type GetViewsSummaryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetViewsSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetViewsSummaryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetViewsSummaryDefault(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 - } -} - -// NewGetViewsSummaryOK creates a GetViewsSummaryOK with default headers values -func NewGetViewsSummaryOK() *GetViewsSummaryOK { - return &GetViewsSummaryOK{} -} - -/* -GetViewsSummaryOK describes a response with status code 200, with default header values. - -Success -*/ -type GetViewsSummaryOK struct { - Payload *models.ViewsSummary -} - -// IsSuccess returns true when this get views summary o k response has a 2xx status code -func (o *GetViewsSummaryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get views summary o k response has a 3xx status code -func (o *GetViewsSummaryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get views summary o k response has a 4xx status code -func (o *GetViewsSummaryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get views summary o k response has a 5xx status code -func (o *GetViewsSummaryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get views summary o k response a status code equal to that given -func (o *GetViewsSummaryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get views summary o k response -func (o *GetViewsSummaryOK) Code() int { - return 200 -} - -func (o *GetViewsSummaryOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views-summary][%d] getViewsSummaryOK %s", 200, payload) -} - -func (o *GetViewsSummaryOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views-summary][%d] getViewsSummaryOK %s", 200, payload) -} - -func (o *GetViewsSummaryOK) GetPayload() *models.ViewsSummary { - return o.Payload -} - -func (o *GetViewsSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewsSummary) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetViewsSummaryDefault creates a GetViewsSummaryDefault with default headers values -func NewGetViewsSummaryDefault(code int) *GetViewsSummaryDefault { - return &GetViewsSummaryDefault{ - _statusCode: code, - } -} - -/* -GetViewsSummaryDefault describes a response with status code -1, with default header values. - -Error -*/ -type GetViewsSummaryDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this get views summary default response has a 2xx status code -func (o *GetViewsSummaryDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this get views summary default response has a 3xx status code -func (o *GetViewsSummaryDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this get views summary default response has a 4xx status code -func (o *GetViewsSummaryDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this get views summary default response has a 5xx status code -func (o *GetViewsSummaryDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this get views summary default response a status code equal to that given -func (o *GetViewsSummaryDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the get views summary default response -func (o *GetViewsSummaryDefault) Code() int { - return o._statusCode -} - -func (o *GetViewsSummaryDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views-summary][%d] GetViewsSummary default %s", o._statusCode, payload) -} - -func (o *GetViewsSummaryDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/views-summary][%d] GetViewsSummary default %s", o._statusCode, payload) -} - -func (o *GetViewsSummaryDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *GetViewsSummaryDefault) 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/view/list_smb_file_opens_parameters.go b/v2/client/view/list_smb_file_opens_parameters.go deleted file mode 100644 index 661e250e..00000000 --- a/v2/client/view/list_smb_file_opens_parameters.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewListSmbFileOpensParams creates a new ListSmbFileOpensParams 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 NewListSmbFileOpensParams() *ListSmbFileOpensParams { - return &ListSmbFileOpensParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListSmbFileOpensParamsWithTimeout creates a new ListSmbFileOpensParams object -// with the ability to set a timeout on a request. -func NewListSmbFileOpensParamsWithTimeout(timeout time.Duration) *ListSmbFileOpensParams { - return &ListSmbFileOpensParams{ - timeout: timeout, - } -} - -// NewListSmbFileOpensParamsWithContext creates a new ListSmbFileOpensParams object -// with the ability to set a context for a request. -func NewListSmbFileOpensParamsWithContext(ctx context.Context) *ListSmbFileOpensParams { - return &ListSmbFileOpensParams{ - Context: ctx, - } -} - -// NewListSmbFileOpensParamsWithHTTPClient creates a new ListSmbFileOpensParams object -// with the ability to set a custom HTTPClient for a request. -func NewListSmbFileOpensParamsWithHTTPClient(client *http.Client) *ListSmbFileOpensParams { - return &ListSmbFileOpensParams{ - HTTPClient: client, - } -} - -/* -ListSmbFileOpensParams contains all the parameters to send to the API endpoint - - for the list smb file opens operation. - - Typically these are written to a http.Request. -*/ -type ListSmbFileOpensParams struct { - - /* Cookie. - - Specifies the Pagination Cookie returned in the previous response. - */ - Cookie *string - - /* FilePath. - - Specifies the filepath in the Cohesity View relative to the root filesystem. If this field is specified, viewName field must also be specified. - */ - FilePath *string - - /* MaxCount. - - Specifies the maximum number of active file opens to return in the response. This field cannot be set above 1000. If this is not set, maximum of 1000 entries are returned. - - Format: int32 - */ - MaxCount *int32 - - /* ViewName. - - Specifies the name of the Cohesity View in which to search. If a view name is not specified, all the views in the Cluster are searched. This field is mandatory if filePath field is specified. - */ - ViewName *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list smb file opens params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSmbFileOpensParams) WithDefaults() *ListSmbFileOpensParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list smb file opens params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSmbFileOpensParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list smb file opens params -func (o *ListSmbFileOpensParams) WithTimeout(timeout time.Duration) *ListSmbFileOpensParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list smb file opens params -func (o *ListSmbFileOpensParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list smb file opens params -func (o *ListSmbFileOpensParams) WithContext(ctx context.Context) *ListSmbFileOpensParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list smb file opens params -func (o *ListSmbFileOpensParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list smb file opens params -func (o *ListSmbFileOpensParams) WithHTTPClient(client *http.Client) *ListSmbFileOpensParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list smb file opens params -func (o *ListSmbFileOpensParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCookie adds the cookie to the list smb file opens params -func (o *ListSmbFileOpensParams) WithCookie(cookie *string) *ListSmbFileOpensParams { - o.SetCookie(cookie) - return o -} - -// SetCookie adds the cookie to the list smb file opens params -func (o *ListSmbFileOpensParams) SetCookie(cookie *string) { - o.Cookie = cookie -} - -// WithFilePath adds the filePath to the list smb file opens params -func (o *ListSmbFileOpensParams) WithFilePath(filePath *string) *ListSmbFileOpensParams { - o.SetFilePath(filePath) - return o -} - -// SetFilePath adds the filePath to the list smb file opens params -func (o *ListSmbFileOpensParams) SetFilePath(filePath *string) { - o.FilePath = filePath -} - -// WithMaxCount adds the maxCount to the list smb file opens params -func (o *ListSmbFileOpensParams) WithMaxCount(maxCount *int32) *ListSmbFileOpensParams { - o.SetMaxCount(maxCount) - return o -} - -// SetMaxCount adds the maxCount to the list smb file opens params -func (o *ListSmbFileOpensParams) SetMaxCount(maxCount *int32) { - o.MaxCount = maxCount -} - -// WithViewName adds the viewName to the list smb file opens params -func (o *ListSmbFileOpensParams) WithViewName(viewName *string) *ListSmbFileOpensParams { - o.SetViewName(viewName) - return o -} - -// SetViewName adds the viewName to the list smb file opens params -func (o *ListSmbFileOpensParams) SetViewName(viewName *string) { - o.ViewName = viewName -} - -// WriteToRequest writes these params to a swagger request -func (o *ListSmbFileOpensParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cookie != nil { - - // query param cookie - var qrCookie string - - if o.Cookie != nil { - qrCookie = *o.Cookie - } - qCookie := qrCookie - if qCookie != "" { - - if err := r.SetQueryParam("cookie", qCookie); err != nil { - return err - } - } - } - - if o.FilePath != nil { - - // query param filePath - var qrFilePath string - - if o.FilePath != nil { - qrFilePath = *o.FilePath - } - qFilePath := qrFilePath - if qFilePath != "" { - - if err := r.SetQueryParam("filePath", qFilePath); err != nil { - return err - } - } - } - - if o.MaxCount != nil { - - // query param maxCount - var qrMaxCount int32 - - if o.MaxCount != nil { - qrMaxCount = *o.MaxCount - } - qMaxCount := swag.FormatInt32(qrMaxCount) - if qMaxCount != "" { - - if err := r.SetQueryParam("maxCount", qMaxCount); err != nil { - return err - } - } - } - - if o.ViewName != nil { - - // query param viewName - var qrViewName string - - if o.ViewName != nil { - qrViewName = *o.ViewName - } - qViewName := qrViewName - if qViewName != "" { - - if err := r.SetQueryParam("viewName", qViewName); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/list_smb_file_opens_responses.go b/v2/client/view/list_smb_file_opens_responses.go deleted file mode 100644 index f6924736..00000000 --- a/v2/client/view/list_smb_file_opens_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ListSmbFileOpensReader is a Reader for the ListSmbFileOpens structure. -type ListSmbFileOpensReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListSmbFileOpensReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListSmbFileOpensOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListSmbFileOpensDefault(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 - } -} - -// NewListSmbFileOpensOK creates a ListSmbFileOpensOK with default headers values -func NewListSmbFileOpensOK() *ListSmbFileOpensOK { - return &ListSmbFileOpensOK{} -} - -/* -ListSmbFileOpensOK describes a response with status code 200, with default header values. - -Success -*/ -type ListSmbFileOpensOK struct { - Payload *models.SmbFileOpens -} - -// IsSuccess returns true when this list smb file opens o k response has a 2xx status code -func (o *ListSmbFileOpensOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list smb file opens o k response has a 3xx status code -func (o *ListSmbFileOpensOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list smb file opens o k response has a 4xx status code -func (o *ListSmbFileOpensOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list smb file opens o k response has a 5xx status code -func (o *ListSmbFileOpensOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list smb file opens o k response a status code equal to that given -func (o *ListSmbFileOpensOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list smb file opens o k response -func (o *ListSmbFileOpensOK) Code() int { - return 200 -} - -func (o *ListSmbFileOpensOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/smb-file-opens][%d] listSmbFileOpensOK %s", 200, payload) -} - -func (o *ListSmbFileOpensOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/smb-file-opens][%d] listSmbFileOpensOK %s", 200, payload) -} - -func (o *ListSmbFileOpensOK) GetPayload() *models.SmbFileOpens { - return o.Payload -} - -func (o *ListSmbFileOpensOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SmbFileOpens) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListSmbFileOpensDefault creates a ListSmbFileOpensDefault with default headers values -func NewListSmbFileOpensDefault(code int) *ListSmbFileOpensDefault { - return &ListSmbFileOpensDefault{ - _statusCode: code, - } -} - -/* -ListSmbFileOpensDefault describes a response with status code -1, with default header values. - -Error -*/ -type ListSmbFileOpensDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this list smb file opens default response has a 2xx status code -func (o *ListSmbFileOpensDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list smb file opens default response has a 3xx status code -func (o *ListSmbFileOpensDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list smb file opens default response has a 4xx status code -func (o *ListSmbFileOpensDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list smb file opens default response has a 5xx status code -func (o *ListSmbFileOpensDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list smb file opens default response a status code equal to that given -func (o *ListSmbFileOpensDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list smb file opens default response -func (o *ListSmbFileOpensDefault) Code() int { - return o._statusCode -} - -func (o *ListSmbFileOpensDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/smb-file-opens][%d] ListSmbFileOpens default %s", o._statusCode, payload) -} - -func (o *ListSmbFileOpensDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/smb-file-opens][%d] ListSmbFileOpens default %s", o._statusCode, payload) -} - -func (o *ListSmbFileOpensDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ListSmbFileOpensDefault) 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/view/lock_file_parameters.go b/v2/client/view/lock_file_parameters.go deleted file mode 100644 index 45e6719d..00000000 --- a/v2/client/view/lock_file_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewLockFileParams creates a new LockFileParams 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 NewLockFileParams() *LockFileParams { - return &LockFileParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewLockFileParamsWithTimeout creates a new LockFileParams object -// with the ability to set a timeout on a request. -func NewLockFileParamsWithTimeout(timeout time.Duration) *LockFileParams { - return &LockFileParams{ - timeout: timeout, - } -} - -// NewLockFileParamsWithContext creates a new LockFileParams object -// with the ability to set a context for a request. -func NewLockFileParamsWithContext(ctx context.Context) *LockFileParams { - return &LockFileParams{ - Context: ctx, - } -} - -// NewLockFileParamsWithHTTPClient creates a new LockFileParams object -// with the ability to set a custom HTTPClient for a request. -func NewLockFileParamsWithHTTPClient(client *http.Client) *LockFileParams { - return &LockFileParams{ - HTTPClient: client, - } -} - -/* -LockFileParams contains all the parameters to send to the API endpoint - - for the lock file operation. - - Typically these are written to a http.Request. -*/ -type LockFileParams struct { - - /* Body. - - Specifies the request params to lock a file - */ - Body *models.LockFileParams - - /* ID. - - Specifies the id of a view. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the lock file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileParams) WithDefaults() *LockFileParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the lock file params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *LockFileParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the lock file params -func (o *LockFileParams) WithTimeout(timeout time.Duration) *LockFileParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the lock file params -func (o *LockFileParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the lock file params -func (o *LockFileParams) WithContext(ctx context.Context) *LockFileParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the lock file params -func (o *LockFileParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the lock file params -func (o *LockFileParams) WithHTTPClient(client *http.Client) *LockFileParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the lock file params -func (o *LockFileParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the lock file params -func (o *LockFileParams) WithBody(body *models.LockFileParams) *LockFileParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the lock file params -func (o *LockFileParams) SetBody(body *models.LockFileParams) { - o.Body = body -} - -// WithID adds the id to the lock file params -func (o *LockFileParams) WithID(id int64) *LockFileParams { - o.SetID(id) - return o -} - -// SetID adds the id to the lock file params -func (o *LockFileParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *LockFileParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/lock_file_responses.go b/v2/client/view/lock_file_responses.go deleted file mode 100644 index edcec757..00000000 --- a/v2/client/view/lock_file_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// LockFileReader is a Reader for the LockFile structure. -type LockFileReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *LockFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewLockFileCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewLockFileDefault(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 - } -} - -// NewLockFileCreated creates a LockFileCreated with default headers values -func NewLockFileCreated() *LockFileCreated { - return &LockFileCreated{} -} - -/* -LockFileCreated describes a response with status code 201, with default header values. - -Success -*/ -type LockFileCreated struct { - Payload *models.FileLockStatus -} - -// IsSuccess returns true when this lock file created response has a 2xx status code -func (o *LockFileCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this lock file created response has a 3xx status code -func (o *LockFileCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this lock file created response has a 4xx status code -func (o *LockFileCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this lock file created response has a 5xx status code -func (o *LockFileCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this lock file created response a status code equal to that given -func (o *LockFileCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the lock file created response -func (o *LockFileCreated) Code() int { - return 201 -} - -func (o *LockFileCreated) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/file-lock][%d] lockFileCreated %s", 201, payload) -} - -func (o *LockFileCreated) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/file-lock][%d] lockFileCreated %s", 201, payload) -} - -func (o *LockFileCreated) GetPayload() *models.FileLockStatus { - return o.Payload -} - -func (o *LockFileCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.FileLockStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewLockFileDefault creates a LockFileDefault with default headers values -func NewLockFileDefault(code int) *LockFileDefault { - return &LockFileDefault{ - _statusCode: code, - } -} - -/* -LockFileDefault describes a response with status code -1, with default header values. - -Error -*/ -type LockFileDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this lock file default response has a 2xx status code -func (o *LockFileDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this lock file default response has a 3xx status code -func (o *LockFileDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this lock file default response has a 4xx status code -func (o *LockFileDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this lock file default response has a 5xx status code -func (o *LockFileDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this lock file default response a status code equal to that given -func (o *LockFileDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the lock file default response -func (o *LockFileDefault) Code() int { - return o._statusCode -} - -func (o *LockFileDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/file-lock][%d] LockFile default %s", o._statusCode, payload) -} - -func (o *LockFileDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/file-lock][%d] LockFile default %s", o._statusCode, payload) -} - -func (o *LockFileDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *LockFileDefault) 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/view/overwrite_view_parameters.go b/v2/client/view/overwrite_view_parameters.go deleted file mode 100644 index 71112f6b..00000000 --- a/v2/client/view/overwrite_view_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewOverwriteViewParams creates a new OverwriteViewParams 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 NewOverwriteViewParams() *OverwriteViewParams { - return &OverwriteViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewOverwriteViewParamsWithTimeout creates a new OverwriteViewParams object -// with the ability to set a timeout on a request. -func NewOverwriteViewParamsWithTimeout(timeout time.Duration) *OverwriteViewParams { - return &OverwriteViewParams{ - timeout: timeout, - } -} - -// NewOverwriteViewParamsWithContext creates a new OverwriteViewParams object -// with the ability to set a context for a request. -func NewOverwriteViewParamsWithContext(ctx context.Context) *OverwriteViewParams { - return &OverwriteViewParams{ - Context: ctx, - } -} - -// NewOverwriteViewParamsWithHTTPClient creates a new OverwriteViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewOverwriteViewParamsWithHTTPClient(client *http.Client) *OverwriteViewParams { - return &OverwriteViewParams{ - HTTPClient: client, - } -} - -/* -OverwriteViewParams contains all the parameters to send to the API endpoint - - for the overwrite view operation. - - Typically these are written to a http.Request. -*/ -type OverwriteViewParams struct { - - /* Body. - - Specifies the request to overwrite the View. - */ - Body *models.OverwriteViewParams - - /* ID. - - Specifies the View id to be overwritten. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the overwrite view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *OverwriteViewParams) WithDefaults() *OverwriteViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the overwrite view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *OverwriteViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the overwrite view params -func (o *OverwriteViewParams) WithTimeout(timeout time.Duration) *OverwriteViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the overwrite view params -func (o *OverwriteViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the overwrite view params -func (o *OverwriteViewParams) WithContext(ctx context.Context) *OverwriteViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the overwrite view params -func (o *OverwriteViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the overwrite view params -func (o *OverwriteViewParams) WithHTTPClient(client *http.Client) *OverwriteViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the overwrite view params -func (o *OverwriteViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the overwrite view params -func (o *OverwriteViewParams) WithBody(body *models.OverwriteViewParams) *OverwriteViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the overwrite view params -func (o *OverwriteViewParams) SetBody(body *models.OverwriteViewParams) { - o.Body = body -} - -// WithID adds the id to the overwrite view params -func (o *OverwriteViewParams) WithID(id int64) *OverwriteViewParams { - o.SetID(id) - return o -} - -// SetID adds the id to the overwrite view params -func (o *OverwriteViewParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *OverwriteViewParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/overwrite_view_responses.go b/v2/client/view/overwrite_view_responses.go deleted file mode 100644 index 00dfd3d9..00000000 --- a/v2/client/view/overwrite_view_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// OverwriteViewReader is a Reader for the OverwriteView structure. -type OverwriteViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *OverwriteViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewOverwriteViewNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewOverwriteViewDefault(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 - } -} - -// NewOverwriteViewNoContent creates a OverwriteViewNoContent with default headers values -func NewOverwriteViewNoContent() *OverwriteViewNoContent { - return &OverwriteViewNoContent{} -} - -/* -OverwriteViewNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type OverwriteViewNoContent struct { -} - -// IsSuccess returns true when this overwrite view no content response has a 2xx status code -func (o *OverwriteViewNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this overwrite view no content response has a 3xx status code -func (o *OverwriteViewNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this overwrite view no content response has a 4xx status code -func (o *OverwriteViewNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this overwrite view no content response has a 5xx status code -func (o *OverwriteViewNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this overwrite view no content response a status code equal to that given -func (o *OverwriteViewNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the overwrite view no content response -func (o *OverwriteViewNoContent) Code() int { - return 204 -} - -func (o *OverwriteViewNoContent) Error() string { - return fmt.Sprintf("[POST /file-services/views/{id}/overwrite][%d] overwriteViewNoContent", 204) -} - -func (o *OverwriteViewNoContent) String() string { - return fmt.Sprintf("[POST /file-services/views/{id}/overwrite][%d] overwriteViewNoContent", 204) -} - -func (o *OverwriteViewNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewOverwriteViewDefault creates a OverwriteViewDefault with default headers values -func NewOverwriteViewDefault(code int) *OverwriteViewDefault { - return &OverwriteViewDefault{ - _statusCode: code, - } -} - -/* -OverwriteViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type OverwriteViewDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this overwrite view default response has a 2xx status code -func (o *OverwriteViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this overwrite view default response has a 3xx status code -func (o *OverwriteViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this overwrite view default response has a 4xx status code -func (o *OverwriteViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this overwrite view default response has a 5xx status code -func (o *OverwriteViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this overwrite view default response a status code equal to that given -func (o *OverwriteViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the overwrite view default response -func (o *OverwriteViewDefault) Code() int { - return o._statusCode -} - -func (o *OverwriteViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/overwrite][%d] OverwriteView default %s", o._statusCode, payload) -} - -func (o *OverwriteViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /file-services/views/{id}/overwrite][%d] OverwriteView default %s", o._statusCode, payload) -} - -func (o *OverwriteViewDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *OverwriteViewDefault) 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/view/read_view_template_by_id_parameters.go b/v2/client/view/read_view_template_by_id_parameters.go deleted file mode 100644 index 986a3745..00000000 --- a/v2/client/view/read_view_template_by_id_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" -) - -// NewReadViewTemplateByIDParams creates a new ReadViewTemplateByIDParams 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 NewReadViewTemplateByIDParams() *ReadViewTemplateByIDParams { - return &ReadViewTemplateByIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReadViewTemplateByIDParamsWithTimeout creates a new ReadViewTemplateByIDParams object -// with the ability to set a timeout on a request. -func NewReadViewTemplateByIDParamsWithTimeout(timeout time.Duration) *ReadViewTemplateByIDParams { - return &ReadViewTemplateByIDParams{ - timeout: timeout, - } -} - -// NewReadViewTemplateByIDParamsWithContext creates a new ReadViewTemplateByIDParams object -// with the ability to set a context for a request. -func NewReadViewTemplateByIDParamsWithContext(ctx context.Context) *ReadViewTemplateByIDParams { - return &ReadViewTemplateByIDParams{ - Context: ctx, - } -} - -// NewReadViewTemplateByIDParamsWithHTTPClient creates a new ReadViewTemplateByIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewReadViewTemplateByIDParamsWithHTTPClient(client *http.Client) *ReadViewTemplateByIDParams { - return &ReadViewTemplateByIDParams{ - HTTPClient: client, - } -} - -/* -ReadViewTemplateByIDParams contains all the parameters to send to the API endpoint - - for the read view template by Id operation. - - Typically these are written to a http.Request. -*/ -type ReadViewTemplateByIDParams struct { - - /* ID. - - Specifies a unique id of the view template. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the read view template by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadViewTemplateByIDParams) WithDefaults() *ReadViewTemplateByIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the read view template by Id params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadViewTemplateByIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the read view template by Id params -func (o *ReadViewTemplateByIDParams) WithTimeout(timeout time.Duration) *ReadViewTemplateByIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read view template by Id params -func (o *ReadViewTemplateByIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read view template by Id params -func (o *ReadViewTemplateByIDParams) WithContext(ctx context.Context) *ReadViewTemplateByIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read view template by Id params -func (o *ReadViewTemplateByIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read view template by Id params -func (o *ReadViewTemplateByIDParams) WithHTTPClient(client *http.Client) *ReadViewTemplateByIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read view template by Id params -func (o *ReadViewTemplateByIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the read view template by Id params -func (o *ReadViewTemplateByIDParams) WithID(id int64) *ReadViewTemplateByIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the read view template by Id params -func (o *ReadViewTemplateByIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadViewTemplateByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/read_view_template_by_id_responses.go b/v2/client/view/read_view_template_by_id_responses.go deleted file mode 100644 index 75fe4aac..00000000 --- a/v2/client/view/read_view_template_by_id_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ReadViewTemplateByIDReader is a Reader for the ReadViewTemplateByID structure. -type ReadViewTemplateByIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadViewTemplateByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewReadViewTemplateByIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewReadViewTemplateByIDDefault(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 - } -} - -// NewReadViewTemplateByIDOK creates a ReadViewTemplateByIDOK with default headers values -func NewReadViewTemplateByIDOK() *ReadViewTemplateByIDOK { - return &ReadViewTemplateByIDOK{} -} - -/* -ReadViewTemplateByIDOK describes a response with status code 200, with default header values. - -Success -*/ -type ReadViewTemplateByIDOK struct { - Payload *models.Template -} - -// IsSuccess returns true when this read view template by Id o k response has a 2xx status code -func (o *ReadViewTemplateByIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this read view template by Id o k response has a 3xx status code -func (o *ReadViewTemplateByIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read view template by Id o k response has a 4xx status code -func (o *ReadViewTemplateByIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this read view template by Id o k response has a 5xx status code -func (o *ReadViewTemplateByIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this read view template by Id o k response a status code equal to that given -func (o *ReadViewTemplateByIDOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the read view template by Id o k response -func (o *ReadViewTemplateByIDOK) Code() int { - return 200 -} - -func (o *ReadViewTemplateByIDOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template/{id}][%d] readViewTemplateByIdOK %s", 200, payload) -} - -func (o *ReadViewTemplateByIDOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template/{id}][%d] readViewTemplateByIdOK %s", 200, payload) -} - -func (o *ReadViewTemplateByIDOK) GetPayload() *models.Template { - return o.Payload -} - -func (o *ReadViewTemplateByIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Template) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadViewTemplateByIDDefault creates a ReadViewTemplateByIDDefault with default headers values -func NewReadViewTemplateByIDDefault(code int) *ReadViewTemplateByIDDefault { - return &ReadViewTemplateByIDDefault{ - _statusCode: code, - } -} - -/* -ReadViewTemplateByIDDefault describes a response with status code -1, with default header values. - -Error -*/ -type ReadViewTemplateByIDDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this read view template by Id default response has a 2xx status code -func (o *ReadViewTemplateByIDDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this read view template by Id default response has a 3xx status code -func (o *ReadViewTemplateByIDDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this read view template by Id default response has a 4xx status code -func (o *ReadViewTemplateByIDDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this read view template by Id default response has a 5xx status code -func (o *ReadViewTemplateByIDDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this read view template by Id default response a status code equal to that given -func (o *ReadViewTemplateByIDDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the read view template by Id default response -func (o *ReadViewTemplateByIDDefault) Code() int { - return o._statusCode -} - -func (o *ReadViewTemplateByIDDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template/{id}][%d] ReadViewTemplateById default %s", o._statusCode, payload) -} - -func (o *ReadViewTemplateByIDDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template/{id}][%d] ReadViewTemplateById default %s", o._statusCode, payload) -} - -func (o *ReadViewTemplateByIDDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ReadViewTemplateByIDDefault) 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/view/read_view_templates_parameters.go b/v2/client/view/read_view_templates_parameters.go deleted file mode 100644 index 8f9adb04..00000000 --- a/v2/client/view/read_view_templates_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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" -) - -// NewReadViewTemplatesParams creates a new ReadViewTemplatesParams 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 NewReadViewTemplatesParams() *ReadViewTemplatesParams { - return &ReadViewTemplatesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReadViewTemplatesParamsWithTimeout creates a new ReadViewTemplatesParams object -// with the ability to set a timeout on a request. -func NewReadViewTemplatesParamsWithTimeout(timeout time.Duration) *ReadViewTemplatesParams { - return &ReadViewTemplatesParams{ - timeout: timeout, - } -} - -// NewReadViewTemplatesParamsWithContext creates a new ReadViewTemplatesParams object -// with the ability to set a context for a request. -func NewReadViewTemplatesParamsWithContext(ctx context.Context) *ReadViewTemplatesParams { - return &ReadViewTemplatesParams{ - Context: ctx, - } -} - -// NewReadViewTemplatesParamsWithHTTPClient creates a new ReadViewTemplatesParams object -// with the ability to set a custom HTTPClient for a request. -func NewReadViewTemplatesParamsWithHTTPClient(client *http.Client) *ReadViewTemplatesParams { - return &ReadViewTemplatesParams{ - HTTPClient: client, - } -} - -/* -ReadViewTemplatesParams contains all the parameters to send to the API endpoint - - for the read view templates operation. - - Typically these are written to a http.Request. -*/ -type ReadViewTemplatesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the read view templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadViewTemplatesParams) WithDefaults() *ReadViewTemplatesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the read view templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadViewTemplatesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the read view templates params -func (o *ReadViewTemplatesParams) WithTimeout(timeout time.Duration) *ReadViewTemplatesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read view templates params -func (o *ReadViewTemplatesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read view templates params -func (o *ReadViewTemplatesParams) WithContext(ctx context.Context) *ReadViewTemplatesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read view templates params -func (o *ReadViewTemplatesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read view templates params -func (o *ReadViewTemplatesParams) WithHTTPClient(client *http.Client) *ReadViewTemplatesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read view templates params -func (o *ReadViewTemplatesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadViewTemplatesParams) 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/view/read_view_templates_responses.go b/v2/client/view/read_view_templates_responses.go deleted file mode 100644 index ec7276dd..00000000 --- a/v2/client/view/read_view_templates_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// ReadViewTemplatesReader is a Reader for the ReadViewTemplates structure. -type ReadViewTemplatesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadViewTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewReadViewTemplatesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewReadViewTemplatesDefault(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 - } -} - -// NewReadViewTemplatesOK creates a ReadViewTemplatesOK with default headers values -func NewReadViewTemplatesOK() *ReadViewTemplatesOK { - return &ReadViewTemplatesOK{} -} - -/* -ReadViewTemplatesOK describes a response with status code 200, with default header values. - -Success -*/ -type ReadViewTemplatesOK struct { - Payload *models.GetViewTemplatesResult -} - -// IsSuccess returns true when this read view templates o k response has a 2xx status code -func (o *ReadViewTemplatesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this read view templates o k response has a 3xx status code -func (o *ReadViewTemplatesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read view templates o k response has a 4xx status code -func (o *ReadViewTemplatesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this read view templates o k response has a 5xx status code -func (o *ReadViewTemplatesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this read view templates o k response a status code equal to that given -func (o *ReadViewTemplatesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the read view templates o k response -func (o *ReadViewTemplatesOK) Code() int { - return 200 -} - -func (o *ReadViewTemplatesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template][%d] readViewTemplatesOK %s", 200, payload) -} - -func (o *ReadViewTemplatesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template][%d] readViewTemplatesOK %s", 200, payload) -} - -func (o *ReadViewTemplatesOK) GetPayload() *models.GetViewTemplatesResult { - return o.Payload -} - -func (o *ReadViewTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.GetViewTemplatesResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadViewTemplatesDefault creates a ReadViewTemplatesDefault with default headers values -func NewReadViewTemplatesDefault(code int) *ReadViewTemplatesDefault { - return &ReadViewTemplatesDefault{ - _statusCode: code, - } -} - -/* -ReadViewTemplatesDefault describes a response with status code -1, with default header values. - -Error -*/ -type ReadViewTemplatesDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this read view templates default response has a 2xx status code -func (o *ReadViewTemplatesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this read view templates default response has a 3xx status code -func (o *ReadViewTemplatesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this read view templates default response has a 4xx status code -func (o *ReadViewTemplatesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this read view templates default response has a 5xx status code -func (o *ReadViewTemplatesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this read view templates default response a status code equal to that given -func (o *ReadViewTemplatesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the read view templates default response -func (o *ReadViewTemplatesDefault) Code() int { - return o._statusCode -} - -func (o *ReadViewTemplatesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template][%d] ReadViewTemplates default %s", o._statusCode, payload) -} - -func (o *ReadViewTemplatesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /file-services/view-template][%d] ReadViewTemplates default %s", o._statusCode, payload) -} - -func (o *ReadViewTemplatesDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *ReadViewTemplatesDefault) 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/view/update_share_parameters.go b/v2/client/view/update_share_parameters.go deleted file mode 100644 index 776b1e03..00000000 --- a/v2/client/view/update_share_parameters.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateShareParams creates a new UpdateShareParams 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 NewUpdateShareParams() *UpdateShareParams { - return &UpdateShareParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateShareParamsWithTimeout creates a new UpdateShareParams object -// with the ability to set a timeout on a request. -func NewUpdateShareParamsWithTimeout(timeout time.Duration) *UpdateShareParams { - return &UpdateShareParams{ - timeout: timeout, - } -} - -// NewUpdateShareParamsWithContext creates a new UpdateShareParams object -// with the ability to set a context for a request. -func NewUpdateShareParamsWithContext(ctx context.Context) *UpdateShareParams { - return &UpdateShareParams{ - Context: ctx, - } -} - -// NewUpdateShareParamsWithHTTPClient creates a new UpdateShareParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateShareParamsWithHTTPClient(client *http.Client) *UpdateShareParams { - return &UpdateShareParams{ - HTTPClient: client, - } -} - -/* -UpdateShareParams contains all the parameters to send to the API endpoint - - for the update share operation. - - Typically these are written to a http.Request. -*/ -type UpdateShareParams struct { - - /* Body. - - Specifies the request to update a Share. - */ - Body *models.UpdateShareParam - - /* Name. - - Specifies the Share name to update. - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateShareParams) WithDefaults() *UpdateShareParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update share params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateShareParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update share params -func (o *UpdateShareParams) WithTimeout(timeout time.Duration) *UpdateShareParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update share params -func (o *UpdateShareParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update share params -func (o *UpdateShareParams) WithContext(ctx context.Context) *UpdateShareParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update share params -func (o *UpdateShareParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update share params -func (o *UpdateShareParams) WithHTTPClient(client *http.Client) *UpdateShareParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update share params -func (o *UpdateShareParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update share params -func (o *UpdateShareParams) WithBody(body *models.UpdateShareParam) *UpdateShareParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update share params -func (o *UpdateShareParams) SetBody(body *models.UpdateShareParam) { - o.Body = body -} - -// WithName adds the name to the update share params -func (o *UpdateShareParams) WithName(name string) *UpdateShareParams { - o.SetName(name) - return o -} - -// SetName adds the name to the update share params -func (o *UpdateShareParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateShareParams) 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 - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_share_responses.go b/v2/client/view/update_share_responses.go deleted file mode 100644 index 5c3aad6b..00000000 --- a/v2/client/view/update_share_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateShareReader is a Reader for the UpdateShare structure. -type UpdateShareReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateShareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateShareOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateShareDefault(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 - } -} - -// NewUpdateShareOK creates a UpdateShareOK with default headers values -func NewUpdateShareOK() *UpdateShareOK { - return &UpdateShareOK{} -} - -/* -UpdateShareOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateShareOK struct { - Payload *models.Share -} - -// IsSuccess returns true when this update share o k response has a 2xx status code -func (o *UpdateShareOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update share o k response has a 3xx status code -func (o *UpdateShareOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update share o k response has a 4xx status code -func (o *UpdateShareOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update share o k response has a 5xx status code -func (o *UpdateShareOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update share o k response a status code equal to that given -func (o *UpdateShareOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update share o k response -func (o *UpdateShareOK) Code() int { - return 200 -} - -func (o *UpdateShareOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/shares/{name}][%d] updateShareOK %s", 200, payload) -} - -func (o *UpdateShareOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/shares/{name}][%d] updateShareOK %s", 200, payload) -} - -func (o *UpdateShareOK) GetPayload() *models.Share { - return o.Payload -} - -func (o *UpdateShareOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Share) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateShareDefault creates a UpdateShareDefault with default headers values -func NewUpdateShareDefault(code int) *UpdateShareDefault { - return &UpdateShareDefault{ - _statusCode: code, - } -} - -/* -UpdateShareDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateShareDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update share default response has a 2xx status code -func (o *UpdateShareDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update share default response has a 3xx status code -func (o *UpdateShareDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update share default response has a 4xx status code -func (o *UpdateShareDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update share default response has a 5xx status code -func (o *UpdateShareDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update share default response a status code equal to that given -func (o *UpdateShareDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update share default response -func (o *UpdateShareDefault) Code() int { - return o._statusCode -} - -func (o *UpdateShareDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/shares/{name}][%d] UpdateShare default %s", o._statusCode, payload) -} - -func (o *UpdateShareDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/shares/{name}][%d] UpdateShare default %s", o._statusCode, payload) -} - -func (o *UpdateShareDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateShareDefault) 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/view/update_view_directory_quota_parameters.go b/v2/client/view/update_view_directory_quota_parameters.go deleted file mode 100644 index 19954ec0..00000000 --- a/v2/client/view/update_view_directory_quota_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateViewDirectoryQuotaParams creates a new UpdateViewDirectoryQuotaParams 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 NewUpdateViewDirectoryQuotaParams() *UpdateViewDirectoryQuotaParams { - return &UpdateViewDirectoryQuotaParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewDirectoryQuotaParamsWithTimeout creates a new UpdateViewDirectoryQuotaParams object -// with the ability to set a timeout on a request. -func NewUpdateViewDirectoryQuotaParamsWithTimeout(timeout time.Duration) *UpdateViewDirectoryQuotaParams { - return &UpdateViewDirectoryQuotaParams{ - timeout: timeout, - } -} - -// NewUpdateViewDirectoryQuotaParamsWithContext creates a new UpdateViewDirectoryQuotaParams object -// with the ability to set a context for a request. -func NewUpdateViewDirectoryQuotaParamsWithContext(ctx context.Context) *UpdateViewDirectoryQuotaParams { - return &UpdateViewDirectoryQuotaParams{ - Context: ctx, - } -} - -// NewUpdateViewDirectoryQuotaParamsWithHTTPClient creates a new UpdateViewDirectoryQuotaParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewDirectoryQuotaParamsWithHTTPClient(client *http.Client) *UpdateViewDirectoryQuotaParams { - return &UpdateViewDirectoryQuotaParams{ - HTTPClient: client, - } -} - -/* -UpdateViewDirectoryQuotaParams contains all the parameters to send to the API endpoint - - for the update view directory quota operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewDirectoryQuotaParams struct { - - /* Body. - - Specifies the request to update directory quota. - */ - Body *models.ViewDirectoryQuota - - /* ID. - - Specifies the View id. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view directory quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewDirectoryQuotaParams) WithDefaults() *UpdateViewDirectoryQuotaParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view directory quota params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewDirectoryQuotaParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) WithTimeout(timeout time.Duration) *UpdateViewDirectoryQuotaParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) WithContext(ctx context.Context) *UpdateViewDirectoryQuotaParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) WithHTTPClient(client *http.Client) *UpdateViewDirectoryQuotaParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) WithBody(body *models.ViewDirectoryQuota) *UpdateViewDirectoryQuotaParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) SetBody(body *models.ViewDirectoryQuota) { - o.Body = body -} - -// WithID adds the id to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) WithID(id int64) *UpdateViewDirectoryQuotaParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update view directory quota params -func (o *UpdateViewDirectoryQuotaParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewDirectoryQuotaParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_view_directory_quota_responses.go b/v2/client/view/update_view_directory_quota_responses.go deleted file mode 100644 index ed26b054..00000000 --- a/v2/client/view/update_view_directory_quota_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateViewDirectoryQuotaReader is a Reader for the UpdateViewDirectoryQuota structure. -type UpdateViewDirectoryQuotaReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewDirectoryQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewDirectoryQuotaOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewDirectoryQuotaDefault(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 - } -} - -// NewUpdateViewDirectoryQuotaOK creates a UpdateViewDirectoryQuotaOK with default headers values -func NewUpdateViewDirectoryQuotaOK() *UpdateViewDirectoryQuotaOK { - return &UpdateViewDirectoryQuotaOK{} -} - -/* -UpdateViewDirectoryQuotaOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewDirectoryQuotaOK struct { - Payload *models.ViewDirectoryQuota -} - -// IsSuccess returns true when this update view directory quota o k response has a 2xx status code -func (o *UpdateViewDirectoryQuotaOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view directory quota o k response has a 3xx status code -func (o *UpdateViewDirectoryQuotaOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view directory quota o k response has a 4xx status code -func (o *UpdateViewDirectoryQuotaOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view directory quota o k response has a 5xx status code -func (o *UpdateViewDirectoryQuotaOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view directory quota o k response a status code equal to that given -func (o *UpdateViewDirectoryQuotaOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view directory quota o k response -func (o *UpdateViewDirectoryQuotaOK) Code() int { - return 200 -} - -func (o *UpdateViewDirectoryQuotaOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}/directory-quotas][%d] updateViewDirectoryQuotaOK %s", 200, payload) -} - -func (o *UpdateViewDirectoryQuotaOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}/directory-quotas][%d] updateViewDirectoryQuotaOK %s", 200, payload) -} - -func (o *UpdateViewDirectoryQuotaOK) GetPayload() *models.ViewDirectoryQuota { - return o.Payload -} - -func (o *UpdateViewDirectoryQuotaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewDirectoryQuota) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewDirectoryQuotaDefault creates a UpdateViewDirectoryQuotaDefault with default headers values -func NewUpdateViewDirectoryQuotaDefault(code int) *UpdateViewDirectoryQuotaDefault { - return &UpdateViewDirectoryQuotaDefault{ - _statusCode: code, - } -} - -/* -UpdateViewDirectoryQuotaDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewDirectoryQuotaDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update view directory quota default response has a 2xx status code -func (o *UpdateViewDirectoryQuotaDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view directory quota default response has a 3xx status code -func (o *UpdateViewDirectoryQuotaDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view directory quota default response has a 4xx status code -func (o *UpdateViewDirectoryQuotaDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view directory quota default response has a 5xx status code -func (o *UpdateViewDirectoryQuotaDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view directory quota default response a status code equal to that given -func (o *UpdateViewDirectoryQuotaDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view directory quota default response -func (o *UpdateViewDirectoryQuotaDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewDirectoryQuotaDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}/directory-quotas][%d] UpdateViewDirectoryQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewDirectoryQuotaDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}/directory-quotas][%d] UpdateViewDirectoryQuota default %s", o._statusCode, payload) -} - -func (o *UpdateViewDirectoryQuotaDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateViewDirectoryQuotaDefault) 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/view/update_view_parameters.go b/v2/client/view/update_view_parameters.go deleted file mode 100644 index 9d786f5a..00000000 --- a/v2/client/view/update_view_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateViewParams creates a new UpdateViewParams 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 NewUpdateViewParams() *UpdateViewParams { - return &UpdateViewParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewParamsWithTimeout creates a new UpdateViewParams object -// with the ability to set a timeout on a request. -func NewUpdateViewParamsWithTimeout(timeout time.Duration) *UpdateViewParams { - return &UpdateViewParams{ - timeout: timeout, - } -} - -// NewUpdateViewParamsWithContext creates a new UpdateViewParams object -// with the ability to set a context for a request. -func NewUpdateViewParamsWithContext(ctx context.Context) *UpdateViewParams { - return &UpdateViewParams{ - Context: ctx, - } -} - -// NewUpdateViewParamsWithHTTPClient creates a new UpdateViewParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewParamsWithHTTPClient(client *http.Client) *UpdateViewParams { - return &UpdateViewParams{ - HTTPClient: client, - } -} - -/* -UpdateViewParams contains all the parameters to send to the API endpoint - - for the update view operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewParams struct { - - /* Body. - - Request to update a view. - */ - Body *models.View - - /* ID. - - Specifies a unique id of the View to update. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewParams) WithDefaults() *UpdateViewParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view params -func (o *UpdateViewParams) WithTimeout(timeout time.Duration) *UpdateViewParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view params -func (o *UpdateViewParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view params -func (o *UpdateViewParams) WithContext(ctx context.Context) *UpdateViewParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view params -func (o *UpdateViewParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view params -func (o *UpdateViewParams) WithHTTPClient(client *http.Client) *UpdateViewParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view params -func (o *UpdateViewParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view params -func (o *UpdateViewParams) WithBody(body *models.View) *UpdateViewParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view params -func (o *UpdateViewParams) SetBody(body *models.View) { - o.Body = body -} - -// WithID adds the id to the update view params -func (o *UpdateViewParams) WithID(id int64) *UpdateViewParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update view params -func (o *UpdateViewParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_view_responses.go b/v2/client/view/update_view_responses.go deleted file mode 100644 index 5893a744..00000000 --- a/v2/client/view/update_view_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateViewReader is a Reader for the UpdateView structure. -type UpdateViewReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewDefault(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 - } -} - -// NewUpdateViewOK creates a UpdateViewOK with default headers values -func NewUpdateViewOK() *UpdateViewOK { - return &UpdateViewOK{} -} - -/* -UpdateViewOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewOK struct { - Payload *models.View -} - -// IsSuccess returns true when this update view o k response has a 2xx status code -func (o *UpdateViewOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view o k response has a 3xx status code -func (o *UpdateViewOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view o k response has a 4xx status code -func (o *UpdateViewOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view o k response has a 5xx status code -func (o *UpdateViewOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view o k response a status code equal to that given -func (o *UpdateViewOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view o k response -func (o *UpdateViewOK) Code() int { - return 200 -} - -func (o *UpdateViewOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}][%d] updateViewOK %s", 200, payload) -} - -func (o *UpdateViewOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}][%d] updateViewOK %s", 200, payload) -} - -func (o *UpdateViewOK) GetPayload() *models.View { - return o.Payload -} - -func (o *UpdateViewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.View) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewDefault creates a UpdateViewDefault with default headers values -func NewUpdateViewDefault(code int) *UpdateViewDefault { - return &UpdateViewDefault{ - _statusCode: code, - } -} - -/* -UpdateViewDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update view default response has a 2xx status code -func (o *UpdateViewDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view default response has a 3xx status code -func (o *UpdateViewDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view default response has a 4xx status code -func (o *UpdateViewDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view default response has a 5xx status code -func (o *UpdateViewDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view default response a status code equal to that given -func (o *UpdateViewDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view default response -func (o *UpdateViewDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}][%d] UpdateView default %s", o._statusCode, payload) -} - -func (o *UpdateViewDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{id}][%d] UpdateView default %s", o._statusCode, payload) -} - -func (o *UpdateViewDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateViewDefault) 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/view/update_view_template_parameters.go b/v2/client/view/update_view_template_parameters.go deleted file mode 100644 index e76961b3..00000000 --- a/v2/client/view/update_view_template_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateViewTemplateParams creates a new UpdateViewTemplateParams 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 NewUpdateViewTemplateParams() *UpdateViewTemplateParams { - return &UpdateViewTemplateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewTemplateParamsWithTimeout creates a new UpdateViewTemplateParams object -// with the ability to set a timeout on a request. -func NewUpdateViewTemplateParamsWithTimeout(timeout time.Duration) *UpdateViewTemplateParams { - return &UpdateViewTemplateParams{ - timeout: timeout, - } -} - -// NewUpdateViewTemplateParamsWithContext creates a new UpdateViewTemplateParams object -// with the ability to set a context for a request. -func NewUpdateViewTemplateParamsWithContext(ctx context.Context) *UpdateViewTemplateParams { - return &UpdateViewTemplateParams{ - Context: ctx, - } -} - -// NewUpdateViewTemplateParamsWithHTTPClient creates a new UpdateViewTemplateParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewTemplateParamsWithHTTPClient(client *http.Client) *UpdateViewTemplateParams { - return &UpdateViewTemplateParams{ - HTTPClient: client, - } -} - -/* -UpdateViewTemplateParams contains all the parameters to send to the API endpoint - - for the update view template operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewTemplateParams struct { - - /* Body. - - Request to update a view template. - */ - Body *models.Template - - /* ID. - - Specifies a unique id of the view template. - - Format: int64 - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewTemplateParams) WithDefaults() *UpdateViewTemplateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view template params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewTemplateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view template params -func (o *UpdateViewTemplateParams) WithTimeout(timeout time.Duration) *UpdateViewTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view template params -func (o *UpdateViewTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view template params -func (o *UpdateViewTemplateParams) WithContext(ctx context.Context) *UpdateViewTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view template params -func (o *UpdateViewTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view template params -func (o *UpdateViewTemplateParams) WithHTTPClient(client *http.Client) *UpdateViewTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view template params -func (o *UpdateViewTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view template params -func (o *UpdateViewTemplateParams) WithBody(body *models.Template) *UpdateViewTemplateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view template params -func (o *UpdateViewTemplateParams) SetBody(body *models.Template) { - o.Body = body -} - -// WithID adds the id to the update view template params -func (o *UpdateViewTemplateParams) WithID(id int64) *UpdateViewTemplateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update view template params -func (o *UpdateViewTemplateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewTemplateParams) 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 - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_view_template_responses.go b/v2/client/view/update_view_template_responses.go deleted file mode 100644 index 18de5508..00000000 --- a/v2/client/view/update_view_template_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateViewTemplateReader is a Reader for the UpdateViewTemplate structure. -type UpdateViewTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewTemplateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewTemplateDefault(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 - } -} - -// NewUpdateViewTemplateOK creates a UpdateViewTemplateOK with default headers values -func NewUpdateViewTemplateOK() *UpdateViewTemplateOK { - return &UpdateViewTemplateOK{} -} - -/* -UpdateViewTemplateOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewTemplateOK struct { - Payload *models.Template -} - -// IsSuccess returns true when this update view template o k response has a 2xx status code -func (o *UpdateViewTemplateOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view template o k response has a 3xx status code -func (o *UpdateViewTemplateOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view template o k response has a 4xx status code -func (o *UpdateViewTemplateOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view template o k response has a 5xx status code -func (o *UpdateViewTemplateOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view template o k response a status code equal to that given -func (o *UpdateViewTemplateOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view template o k response -func (o *UpdateViewTemplateOK) Code() int { - return 200 -} - -func (o *UpdateViewTemplateOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/view-template/{id}][%d] updateViewTemplateOK %s", 200, payload) -} - -func (o *UpdateViewTemplateOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/view-template/{id}][%d] updateViewTemplateOK %s", 200, payload) -} - -func (o *UpdateViewTemplateOK) GetPayload() *models.Template { - return o.Payload -} - -func (o *UpdateViewTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Template) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewTemplateDefault creates a UpdateViewTemplateDefault with default headers values -func NewUpdateViewTemplateDefault(code int) *UpdateViewTemplateDefault { - return &UpdateViewTemplateDefault{ - _statusCode: code, - } -} - -/* -UpdateViewTemplateDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewTemplateDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update view template default response has a 2xx status code -func (o *UpdateViewTemplateDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view template default response has a 3xx status code -func (o *UpdateViewTemplateDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view template default response has a 4xx status code -func (o *UpdateViewTemplateDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view template default response has a 5xx status code -func (o *UpdateViewTemplateDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view template default response a status code equal to that given -func (o *UpdateViewTemplateDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view template default response -func (o *UpdateViewTemplateDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewTemplateDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/view-template/{id}][%d] UpdateViewTemplate default %s", o._statusCode, payload) -} - -func (o *UpdateViewTemplateDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/view-template/{id}][%d] UpdateViewTemplate default %s", o._statusCode, payload) -} - -func (o *UpdateViewTemplateDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateViewTemplateDefault) 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/view/update_view_user_quota_override_parameters.go b/v2/client/view/update_view_user_quota_override_parameters.go deleted file mode 100644 index 58724bd0..00000000 --- a/v2/client/view/update_view_user_quota_override_parameters.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateViewUserQuotaOverrideParams creates a new UpdateViewUserQuotaOverrideParams 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 NewUpdateViewUserQuotaOverrideParams() *UpdateViewUserQuotaOverrideParams { - return &UpdateViewUserQuotaOverrideParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewUserQuotaOverrideParamsWithTimeout creates a new UpdateViewUserQuotaOverrideParams object -// with the ability to set a timeout on a request. -func NewUpdateViewUserQuotaOverrideParamsWithTimeout(timeout time.Duration) *UpdateViewUserQuotaOverrideParams { - return &UpdateViewUserQuotaOverrideParams{ - timeout: timeout, - } -} - -// NewUpdateViewUserQuotaOverrideParamsWithContext creates a new UpdateViewUserQuotaOverrideParams object -// with the ability to set a context for a request. -func NewUpdateViewUserQuotaOverrideParamsWithContext(ctx context.Context) *UpdateViewUserQuotaOverrideParams { - return &UpdateViewUserQuotaOverrideParams{ - Context: ctx, - } -} - -// NewUpdateViewUserQuotaOverrideParamsWithHTTPClient creates a new UpdateViewUserQuotaOverrideParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewUserQuotaOverrideParamsWithHTTPClient(client *http.Client) *UpdateViewUserQuotaOverrideParams { - return &UpdateViewUserQuotaOverrideParams{ - HTTPClient: client, - } -} - -/* -UpdateViewUserQuotaOverrideParams contains all the parameters to send to the API endpoint - - for the update view user quota override operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewUserQuotaOverrideParams struct { - - /* Body. - - Specifies the user quota policy of the user. - */ - Body *models.QuotaPolicy - - /* UserID. - - Specifies the unixUid or sid or an user. - */ - UserID string - - /* ViewID. - - Specifies the View id. - - Format: int64 - */ - ViewID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view user quota override params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaOverrideParams) WithDefaults() *UpdateViewUserQuotaOverrideParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view user quota override params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaOverrideParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithTimeout(timeout time.Duration) *UpdateViewUserQuotaOverrideParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithContext(ctx context.Context) *UpdateViewUserQuotaOverrideParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithHTTPClient(client *http.Client) *UpdateViewUserQuotaOverrideParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithBody(body *models.QuotaPolicy) *UpdateViewUserQuotaOverrideParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetBody(body *models.QuotaPolicy) { - o.Body = body -} - -// WithUserID adds the userID to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithUserID(userID string) *UpdateViewUserQuotaOverrideParams { - o.SetUserID(userID) - return o -} - -// SetUserID adds the userId to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetUserID(userID string) { - o.UserID = userID -} - -// WithViewID adds the viewID to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) WithViewID(viewID int64) *UpdateViewUserQuotaOverrideParams { - o.SetViewID(viewID) - return o -} - -// SetViewID adds the viewId to the update view user quota override params -func (o *UpdateViewUserQuotaOverrideParams) SetViewID(viewID int64) { - o.ViewID = viewID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewUserQuotaOverrideParams) 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 - } - } - - // path param userId - if err := r.SetPathParam("userId", o.UserID); err != nil { - return err - } - - // path param viewId - if err := r.SetPathParam("viewId", swag.FormatInt64(o.ViewID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_view_user_quota_override_responses.go b/v2/client/view/update_view_user_quota_override_responses.go deleted file mode 100644 index 1de08591..00000000 --- a/v2/client/view/update_view_user_quota_override_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateViewUserQuotaOverrideReader is a Reader for the UpdateViewUserQuotaOverride structure. -type UpdateViewUserQuotaOverrideReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewUserQuotaOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewUserQuotaOverrideOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewUserQuotaOverrideDefault(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 - } -} - -// NewUpdateViewUserQuotaOverrideOK creates a UpdateViewUserQuotaOverrideOK with default headers values -func NewUpdateViewUserQuotaOverrideOK() *UpdateViewUserQuotaOverrideOK { - return &UpdateViewUserQuotaOverrideOK{} -} - -/* -UpdateViewUserQuotaOverrideOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewUserQuotaOverrideOK struct { - Payload *models.UserQuota -} - -// IsSuccess returns true when this update view user quota override o k response has a 2xx status code -func (o *UpdateViewUserQuotaOverrideOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view user quota override o k response has a 3xx status code -func (o *UpdateViewUserQuotaOverrideOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view user quota override o k response has a 4xx status code -func (o *UpdateViewUserQuotaOverrideOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view user quota override o k response has a 5xx status code -func (o *UpdateViewUserQuotaOverrideOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view user quota override o k response a status code equal to that given -func (o *UpdateViewUserQuotaOverrideOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view user quota override o k response -func (o *UpdateViewUserQuotaOverrideOK) Code() int { - return 200 -} - -func (o *UpdateViewUserQuotaOverrideOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas/{userId}][%d] updateViewUserQuotaOverrideOK %s", 200, payload) -} - -func (o *UpdateViewUserQuotaOverrideOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas/{userId}][%d] updateViewUserQuotaOverrideOK %s", 200, payload) -} - -func (o *UpdateViewUserQuotaOverrideOK) GetPayload() *models.UserQuota { - return o.Payload -} - -func (o *UpdateViewUserQuotaOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UserQuota) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewUserQuotaOverrideDefault creates a UpdateViewUserQuotaOverrideDefault with default headers values -func NewUpdateViewUserQuotaOverrideDefault(code int) *UpdateViewUserQuotaOverrideDefault { - return &UpdateViewUserQuotaOverrideDefault{ - _statusCode: code, - } -} - -/* -UpdateViewUserQuotaOverrideDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewUserQuotaOverrideDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update view user quota override default response has a 2xx status code -func (o *UpdateViewUserQuotaOverrideDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view user quota override default response has a 3xx status code -func (o *UpdateViewUserQuotaOverrideDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view user quota override default response has a 4xx status code -func (o *UpdateViewUserQuotaOverrideDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view user quota override default response has a 5xx status code -func (o *UpdateViewUserQuotaOverrideDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view user quota override default response a status code equal to that given -func (o *UpdateViewUserQuotaOverrideDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view user quota override default response -func (o *UpdateViewUserQuotaOverrideDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewUserQuotaOverrideDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas/{userId}][%d] UpdateViewUserQuotaOverride default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaOverrideDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas/{userId}][%d] UpdateViewUserQuotaOverride default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaOverrideDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateViewUserQuotaOverrideDefault) 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/view/update_view_user_quota_settings_parameters.go b/v2/client/view/update_view_user_quota_settings_parameters.go deleted file mode 100644 index ba3f1617..00000000 --- a/v2/client/view/update_view_user_quota_settings_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/go-openapi/swag" - - "github.com/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// NewUpdateViewUserQuotaSettingsParams creates a new UpdateViewUserQuotaSettingsParams 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 NewUpdateViewUserQuotaSettingsParams() *UpdateViewUserQuotaSettingsParams { - return &UpdateViewUserQuotaSettingsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateViewUserQuotaSettingsParamsWithTimeout creates a new UpdateViewUserQuotaSettingsParams object -// with the ability to set a timeout on a request. -func NewUpdateViewUserQuotaSettingsParamsWithTimeout(timeout time.Duration) *UpdateViewUserQuotaSettingsParams { - return &UpdateViewUserQuotaSettingsParams{ - timeout: timeout, - } -} - -// NewUpdateViewUserQuotaSettingsParamsWithContext creates a new UpdateViewUserQuotaSettingsParams object -// with the ability to set a context for a request. -func NewUpdateViewUserQuotaSettingsParamsWithContext(ctx context.Context) *UpdateViewUserQuotaSettingsParams { - return &UpdateViewUserQuotaSettingsParams{ - Context: ctx, - } -} - -// NewUpdateViewUserQuotaSettingsParamsWithHTTPClient creates a new UpdateViewUserQuotaSettingsParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateViewUserQuotaSettingsParamsWithHTTPClient(client *http.Client) *UpdateViewUserQuotaSettingsParams { - return &UpdateViewUserQuotaSettingsParams{ - HTTPClient: client, - } -} - -/* -UpdateViewUserQuotaSettingsParams contains all the parameters to send to the API endpoint - - for the update view user quota settings operation. - - Typically these are written to a http.Request. -*/ -type UpdateViewUserQuotaSettingsParams struct { - - /* Body. - - Specifies the parameters to enable/disable or update the default quota config on the view. - */ - Body *models.ViewUserQuotaSettings - - /* ViewID. - - Specifies the View id. - - Format: int64 - */ - ViewID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update view user quota settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaSettingsParams) WithDefaults() *UpdateViewUserQuotaSettingsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update view user quota settings params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateViewUserQuotaSettingsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) WithTimeout(timeout time.Duration) *UpdateViewUserQuotaSettingsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) WithContext(ctx context.Context) *UpdateViewUserQuotaSettingsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) WithHTTPClient(client *http.Client) *UpdateViewUserQuotaSettingsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) WithBody(body *models.ViewUserQuotaSettings) *UpdateViewUserQuotaSettingsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) SetBody(body *models.ViewUserQuotaSettings) { - o.Body = body -} - -// WithViewID adds the viewID to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) WithViewID(viewID int64) *UpdateViewUserQuotaSettingsParams { - o.SetViewID(viewID) - return o -} - -// SetViewID adds the viewId to the update view user quota settings params -func (o *UpdateViewUserQuotaSettingsParams) SetViewID(viewID int64) { - o.ViewID = viewID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateViewUserQuotaSettingsParams) 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 - } - } - - // path param viewId - if err := r.SetPathParam("viewId", swag.FormatInt64(o.ViewID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/client/view/update_view_user_quota_settings_responses.go b/v2/client/view/update_view_user_quota_settings_responses.go deleted file mode 100644 index 35817c02..00000000 --- a/v2/client/view/update_view_user_quota_settings_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// 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/satwik-miyyapuram-cohesity/go-sdk/v2/models" -) - -// UpdateViewUserQuotaSettingsReader is a Reader for the UpdateViewUserQuotaSettings structure. -type UpdateViewUserQuotaSettingsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateViewUserQuotaSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateViewUserQuotaSettingsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdateViewUserQuotaSettingsDefault(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 - } -} - -// NewUpdateViewUserQuotaSettingsOK creates a UpdateViewUserQuotaSettingsOK with default headers values -func NewUpdateViewUserQuotaSettingsOK() *UpdateViewUserQuotaSettingsOK { - return &UpdateViewUserQuotaSettingsOK{} -} - -/* -UpdateViewUserQuotaSettingsOK describes a response with status code 200, with default header values. - -Success -*/ -type UpdateViewUserQuotaSettingsOK struct { - Payload *models.ViewUserQuotas -} - -// IsSuccess returns true when this update view user quota settings o k response has a 2xx status code -func (o *UpdateViewUserQuotaSettingsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update view user quota settings o k response has a 3xx status code -func (o *UpdateViewUserQuotaSettingsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update view user quota settings o k response has a 4xx status code -func (o *UpdateViewUserQuotaSettingsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update view user quota settings o k response has a 5xx status code -func (o *UpdateViewUserQuotaSettingsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update view user quota settings o k response a status code equal to that given -func (o *UpdateViewUserQuotaSettingsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update view user quota settings o k response -func (o *UpdateViewUserQuotaSettingsOK) Code() int { - return 200 -} - -func (o *UpdateViewUserQuotaSettingsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas][%d] updateViewUserQuotaSettingsOK %s", 200, payload) -} - -func (o *UpdateViewUserQuotaSettingsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas][%d] updateViewUserQuotaSettingsOK %s", 200, payload) -} - -func (o *UpdateViewUserQuotaSettingsOK) GetPayload() *models.ViewUserQuotas { - return o.Payload -} - -func (o *UpdateViewUserQuotaSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ViewUserQuotas) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateViewUserQuotaSettingsDefault creates a UpdateViewUserQuotaSettingsDefault with default headers values -func NewUpdateViewUserQuotaSettingsDefault(code int) *UpdateViewUserQuotaSettingsDefault { - return &UpdateViewUserQuotaSettingsDefault{ - _statusCode: code, - } -} - -/* -UpdateViewUserQuotaSettingsDefault describes a response with status code -1, with default header values. - -Error -*/ -type UpdateViewUserQuotaSettingsDefault struct { - _statusCode int - - Payload *models.Error -} - -// IsSuccess returns true when this update view user quota settings default response has a 2xx status code -func (o *UpdateViewUserQuotaSettingsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update view user quota settings default response has a 3xx status code -func (o *UpdateViewUserQuotaSettingsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update view user quota settings default response has a 4xx status code -func (o *UpdateViewUserQuotaSettingsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update view user quota settings default response has a 5xx status code -func (o *UpdateViewUserQuotaSettingsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update view user quota settings default response a status code equal to that given -func (o *UpdateViewUserQuotaSettingsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update view user quota settings default response -func (o *UpdateViewUserQuotaSettingsDefault) Code() int { - return o._statusCode -} - -func (o *UpdateViewUserQuotaSettingsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas][%d] UpdateViewUserQuotaSettings default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaSettingsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[PUT /file-services/views/{viewId}/user-quotas][%d] UpdateViewUserQuotaSettings default %s", o._statusCode, payload) -} - -func (o *UpdateViewUserQuotaSettingsDefault) GetPayload() *models.Error { - return o.Payload -} - -func (o *UpdateViewUserQuotaSettingsDefault) 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/view/view_client.go b/v2/client/view/view_client.go deleted file mode 100644 index 1fa6d656..00000000 --- a/v2/client/view/view_client.go +++ /dev/null @@ -1,1541 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package view - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// New creates a new view API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -// New creates a new view API client with basic auth credentials. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - user: user for basic authentication header. -// - password: password for basic authentication header. -func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BasicAuth(user, password) - return &Client{transport: transport, formats: strfmt.Default} -} - -// New creates a new view API client with a bearer token for authentication. -// It takes the following parameters: -// - host: http host (github.com). -// - basePath: any base path for the API client ("/v1", "/v3"). -// - scheme: http scheme ("http", "https"). -// - bearerToken: bearer token for Bearer authentication header. -func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { - transport := httptransport.New(host, basePath, []string{scheme}) - transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) - return &Client{transport: transport, formats: strfmt.Default} -} - -/* -Client for view API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption may be used to customize the behavior of Client methods. -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddViewUserQuotaOverrides(params *AddViewUserQuotaOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddViewUserQuotaOverridesCreated, error) - - ClearNlmLocks(params *ClearNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearNlmLocksNoContent, error) - - CloneView(params *CloneViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewCreated, error) - - CloneViewDirectory(params *CloneViewDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewDirectoryNoContent, error) - - CloseSmbFileOpen(params *CloseSmbFileOpenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloseSmbFileOpenNoContent, error) - - CreateShare(params *CreateShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateShareCreated, error) - - CreateView(params *CreateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewCreated, error) - - CreateViewTemplate(params *CreateViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewTemplateCreated, error) - - DeleteShare(params *DeleteShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteShareNoContent, error) - - DeleteView(params *DeleteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewNoContent, error) - - DeleteViewDirectoryQuota(params *DeleteViewDirectoryQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewDirectoryQuotaNoContent, error) - - DeleteViewTemplate(params *DeleteViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewTemplateNoContent, error) - - DeleteViewUserQuotaOverrides(params *DeleteViewUserQuotaOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewUserQuotaOverridesNoContent, error) - - GetFileLockStatus(params *GetFileLockStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusOK, error) - - GetNlmLocks(params *GetNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNlmLocksOK, error) - - GetQosPolicies(params *GetQosPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetQosPoliciesOK, error) - - GetShares(params *GetSharesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSharesOK, error) - - GetViewByID(params *GetViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByIDOK, error) - - GetViewClients(params *GetViewClientsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientsOK, error) - - GetViewClientsSummary(params *GetViewClientsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientsSummaryOK, error) - - GetViewDirectoryQuotas(params *GetViewDirectoryQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewDirectoryQuotasOK, error) - - GetViewUserQuotas(params *GetViewUserQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewUserQuotasOK, error) - - GetViews(params *GetViewsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsOK, error) - - GetViewsSummary(params *GetViewsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsSummaryOK, error) - - ListSmbFileOpens(params *ListSmbFileOpensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSmbFileOpensOK, error) - - LockFile(params *LockFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileCreated, error) - - OverwriteView(params *OverwriteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverwriteViewNoContent, error) - - ReadViewTemplateByID(params *ReadViewTemplateByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadViewTemplateByIDOK, error) - - ReadViewTemplates(params *ReadViewTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadViewTemplatesOK, error) - - UpdateShare(params *UpdateShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateShareOK, error) - - UpdateView(params *UpdateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewOK, error) - - UpdateViewDirectoryQuota(params *UpdateViewDirectoryQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewDirectoryQuotaOK, error) - - UpdateViewTemplate(params *UpdateViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewTemplateOK, error) - - UpdateViewUserQuotaOverride(params *UpdateViewUserQuotaOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaOverrideOK, error) - - UpdateViewUserQuotaSettings(params *UpdateViewUserQuotaSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaSettingsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddViewUserQuotaOverrides adds user quota overrides - -Specifies the parameters to override the user quota on the view. User quota on the view should be enabled before setting a user override. -*/ -func (a *Client) AddViewUserQuotaOverrides(params *AddViewUserQuotaOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AddViewUserQuotaOverridesCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddViewUserQuotaOverridesParams() - } - op := &runtime.ClientOperation{ - ID: "AddViewUserQuotaOverrides", - Method: "POST", - PathPattern: "/file-services/views/{viewId}/user-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &AddViewUserQuotaOverridesReader{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.(*AddViewUserQuotaOverridesCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddViewUserQuotaOverridesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ClearNlmLocks clears n l m locks - -Clear NLM locks that match the filter criteria specified using parameters -*/ -func (a *Client) ClearNlmLocks(params *ClearNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClearNlmLocksNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewClearNlmLocksParams() - } - op := &runtime.ClientOperation{ - ID: "ClearNlmLocks", - Method: "DELETE", - PathPattern: "/file-services/nlm-locks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ClearNlmLocksReader{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.(*ClearNlmLocksNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ClearNlmLocksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloneView clones view - -Clone View. -*/ -func (a *Client) CloneView(params *CloneViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneViewParams() - } - op := &runtime.ClientOperation{ - ID: "CloneView", - Method: "POST", - PathPattern: "/file-services/views/{id}/clone", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneViewReader{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.(*CloneViewCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloneViewDirectory clones view directory - -Clone View Directory. -*/ -func (a *Client) CloneViewDirectory(params *CloneViewDirectoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloneViewDirectoryNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloneViewDirectoryParams() - } - op := &runtime.ClientOperation{ - ID: "CloneViewDirectory", - Method: "POST", - PathPattern: "/file-services/views/clone-directory", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloneViewDirectoryReader{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.(*CloneViewDirectoryNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloneViewDirectoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CloseSmbFileOpen closes s m b file open - -Close an active SMB file open. -*/ -func (a *Client) CloseSmbFileOpen(params *CloseSmbFileOpenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CloseSmbFileOpenNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCloseSmbFileOpenParams() - } - op := &runtime.ClientOperation{ - ID: "CloseSmbFileOpen", - Method: "DELETE", - PathPattern: "/file-services/smb-file-opens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CloseSmbFileOpenReader{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.(*CloseSmbFileOpenNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CloseSmbFileOpenDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateShare creates a share - -Create a Share. -*/ -func (a *Client) CreateShare(params *CreateShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateShareCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateShareParams() - } - op := &runtime.ClientOperation{ - ID: "CreateShare", - Method: "POST", - PathPattern: "/file-services/shares", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateShareReader{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.(*CreateShareCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateShareDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateView creates a view - -Creates a View. -*/ -func (a *Client) CreateView(params *CreateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewParams() - } - op := &runtime.ClientOperation{ - ID: "CreateView", - Method: "POST", - PathPattern: "/file-services/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewReader{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.(*CreateViewCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CreateViewTemplate creates a view template - -Creates a View Template. -*/ -func (a *Client) CreateViewTemplate(params *CreateViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateViewTemplateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateViewTemplateParams() - } - op := &runtime.ClientOperation{ - ID: "CreateViewTemplate", - Method: "POST", - PathPattern: "/file-services/view-template", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateViewTemplateReader{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.(*CreateViewTemplateCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateViewTemplateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteShare deletes a share - -Delete a Share. -*/ -func (a *Client) DeleteShare(params *DeleteShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteShareNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteShareParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteShare", - Method: "DELETE", - PathPattern: "/file-services/shares/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteShareReader{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.(*DeleteShareNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteShareDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteView deletes a view - -Deletes a View based on given id. -*/ -func (a *Client) DeleteView(params *DeleteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteView", - Method: "DELETE", - PathPattern: "/file-services/views/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewReader{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.(*DeleteViewNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewDirectoryQuota deletes directory quota for the view - -Delete directory quota for the View. -*/ -func (a *Client) DeleteViewDirectoryQuota(params *DeleteViewDirectoryQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewDirectoryQuotaNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewDirectoryQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewDirectoryQuota", - Method: "DELETE", - PathPattern: "/file-services/views/{id}/directory-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewDirectoryQuotaReader{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.(*DeleteViewDirectoryQuotaNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewDirectoryQuotaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewTemplate deletes a view template - -Deletes a view template based on given template id. -*/ -func (a *Client) DeleteViewTemplate(params *DeleteViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewTemplateNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewTemplateParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewTemplate", - Method: "DELETE", - PathPattern: "/file-services/view-template/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewTemplateReader{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.(*DeleteViewTemplateNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewTemplateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteViewUserQuotaOverrides deletes user quota overrides - -Specifies the parameters to delete user quotas on the view. -*/ -func (a *Client) DeleteViewUserQuotaOverrides(params *DeleteViewUserQuotaOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteViewUserQuotaOverridesNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteViewUserQuotaOverridesParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteViewUserQuotaOverrides", - Method: "DELETE", - PathPattern: "/file-services/views/{viewId}/user-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteViewUserQuotaOverridesReader{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.(*DeleteViewUserQuotaOverridesNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteViewUserQuotaOverridesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetFileLockStatus gets file lock status - -Get the lock status of a file in a view. -*/ -func (a *Client) GetFileLockStatus(params *GetFileLockStatusParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFileLockStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFileLockStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetFileLockStatus", - Method: "GET", - PathPattern: "/file-services/views/{id}/file-lock", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetFileLockStatusReader{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.(*GetFileLockStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetFileLockStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetNlmLocks gets n l m locks - -Get the list of NLM locks in the views. -*/ -func (a *Client) GetNlmLocks(params *GetNlmLocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetNlmLocksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNlmLocksParams() - } - op := &runtime.ClientOperation{ - ID: "GetNlmLocks", - Method: "GET", - PathPattern: "/file-services/nlm-locks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetNlmLocksReader{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.(*GetNlmLocksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetNlmLocksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetQosPolicies gets qo s policies - -Get the list of QoS policies on the Cohesity cluster. -*/ -func (a *Client) GetQosPolicies(params *GetQosPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetQosPoliciesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetQosPoliciesParams() - } - op := &runtime.ClientOperation{ - ID: "GetQosPolicies", - Method: "GET", - PathPattern: "/file-services/qos-policies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetQosPoliciesReader{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.(*GetQosPoliciesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetQosPoliciesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetShares gets shares - -If no parameters are specified, all shares on the Cohesity Cluster are returned. Specifying share name/prefix filters the results that are returned. NOTE: If maxCount is set and the number of Shares returned exceeds the maxCount, there are more Share to return. To get the next set of Views, send another request and specify the pagination cookie from the previous response. If maxCount is not specified, the first 2000 Shares. -*/ -func (a *Client) GetShares(params *GetSharesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSharesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSharesParams() - } - op := &runtime.ClientOperation{ - ID: "GetShares", - Method: "GET", - PathPattern: "/file-services/shares", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetSharesReader{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.(*GetSharesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetSharesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewByID gets a view by Id - -Get a View based on given Id. -*/ -func (a *Client) GetViewByID(params *GetViewByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewByIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewById", - Method: "GET", - PathPattern: "/file-services/views/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewByIDReader{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.(*GetViewByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewClients gets view clients - -Get View Clients. -*/ -func (a *Client) GetViewClients(params *GetViewClientsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewClientsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewClients", - Method: "GET", - PathPattern: "/file-services/view-clients", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewClientsReader{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.(*GetViewClientsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewClientsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewClientsSummary gets view clients summary - -Get View Clients Summary. -*/ -func (a *Client) GetViewClientsSummary(params *GetViewClientsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewClientsSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewClientsSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewClientsSummary", - Method: "GET", - PathPattern: "/file-services/view-clients/summary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewClientsSummaryReader{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.(*GetViewClientsSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewClientsSummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewDirectoryQuotas gets directory quotas for the view - -Get directory quotas for the View. -*/ -func (a *Client) GetViewDirectoryQuotas(params *GetViewDirectoryQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewDirectoryQuotasOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewDirectoryQuotasParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewDirectoryQuotas", - Method: "GET", - PathPattern: "/file-services/views/{id}/directory-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewDirectoryQuotasReader{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.(*GetViewDirectoryQuotasOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewDirectoryQuotasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewUserQuotas gets view user quotas - -Get user quotas for the View. -*/ -func (a *Client) GetViewUserQuotas(params *GetViewUserQuotasParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewUserQuotasOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewUserQuotasParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewUserQuotas", - Method: "GET", - PathPattern: "/file-services/views/{viewId}/user-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewUserQuotasReader{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.(*GetViewUserQuotasOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewUserQuotasDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - GetViews lists views - - If no parameters are specified, all Views on the Cohesity Cluster are returned. - -Specifying parameters filters the results that are returned. -NOTE: If maxCount is set and the number of Views returned exceeds the maxCount, -there are more Views to return. -To get the next set of Views, send another request and specify the id of the -last View returned in viewList from the previous response. -*/ -func (a *Client) GetViews(params *GetViewsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewsParams() - } - op := &runtime.ClientOperation{ - ID: "GetViews", - Method: "GET", - PathPattern: "/file-services/views", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewsReader{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.(*GetViewsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetViewsSummary gets views summary - -Get Views summary. -*/ -func (a *Client) GetViewsSummary(params *GetViewsSummaryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetViewsSummaryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetViewsSummaryParams() - } - op := &runtime.ClientOperation{ - ID: "GetViewsSummary", - Method: "GET", - PathPattern: "/file-services/views-summary", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &GetViewsSummaryReader{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.(*GetViewsSummaryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetViewsSummaryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListSmbFileOpens gets s m b file opens - -Get SMB active file opens on a Cohesity View. -*/ -func (a *Client) ListSmbFileOpens(params *ListSmbFileOpensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListSmbFileOpensOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListSmbFileOpensParams() - } - op := &runtime.ClientOperation{ - ID: "ListSmbFileOpens", - Method: "GET", - PathPattern: "/file-services/smb-file-opens", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ListSmbFileOpensReader{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.(*ListSmbFileOpensOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListSmbFileOpensDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -LockFile creates a file lock - -Locks a file in a view and returns the lock status of the file. -*/ -func (a *Client) LockFile(params *LockFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LockFileCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLockFileParams() - } - op := &runtime.ClientOperation{ - ID: "LockFile", - Method: "POST", - PathPattern: "/file-services/views/{id}/file-lock", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &LockFileReader{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.(*LockFileCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LockFileDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -OverwriteView overwrites view - -Overwrite View. -*/ -func (a *Client) OverwriteView(params *OverwriteViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverwriteViewNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewOverwriteViewParams() - } - op := &runtime.ClientOperation{ - ID: "OverwriteView", - Method: "POST", - PathPattern: "/file-services/views/{id}/overwrite", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &OverwriteViewReader{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.(*OverwriteViewNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*OverwriteViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ReadViewTemplateByID reads a view template by Id - -Reads a view template based on given template id. -*/ -func (a *Client) ReadViewTemplateByID(params *ReadViewTemplateByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadViewTemplateByIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewReadViewTemplateByIDParams() - } - op := &runtime.ClientOperation{ - ID: "ReadViewTemplateById", - Method: "GET", - PathPattern: "/file-services/view-template/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ReadViewTemplateByIDReader{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.(*ReadViewTemplateByIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ReadViewTemplateByIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* - ReadViewTemplates lists view templates - - All view templates on the Cohesity Cluster are returned. - -Specifying parameters filters the results that are returned. -*/ -func (a *Client) ReadViewTemplates(params *ReadViewTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ReadViewTemplatesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewReadViewTemplatesParams() - } - op := &runtime.ClientOperation{ - ID: "ReadViewTemplates", - Method: "GET", - PathPattern: "/file-services/view-template", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &ReadViewTemplatesReader{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.(*ReadViewTemplatesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ReadViewTemplatesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateShare updates a share - -Update a Share. -*/ -func (a *Client) UpdateShare(params *UpdateShareParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateShareOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateShareParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateShare", - Method: "PUT", - PathPattern: "/file-services/shares/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateShareReader{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.(*UpdateShareOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateShareDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateView updates a view - -Updates a View based on given id. -*/ -func (a *Client) UpdateView(params *UpdateViewParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateView", - Method: "PUT", - PathPattern: "/file-services/views/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewReader{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.(*UpdateViewOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewDirectoryQuota updates directory quota for the view - -Update directory quota for the View. -*/ -func (a *Client) UpdateViewDirectoryQuota(params *UpdateViewDirectoryQuotaParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewDirectoryQuotaOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewDirectoryQuotaParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewDirectoryQuota", - Method: "PUT", - PathPattern: "/file-services/views/{id}/directory-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewDirectoryQuotaReader{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.(*UpdateViewDirectoryQuotaOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewDirectoryQuotaDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewTemplate updates a view template - -Updates a View Template. -*/ -func (a *Client) UpdateViewTemplate(params *UpdateViewTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewTemplateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewTemplateParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewTemplate", - Method: "PUT", - PathPattern: "/file-services/view-template/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewTemplateReader{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.(*UpdateViewTemplateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewTemplateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewUserQuotaOverride updates user quota override - -Update user quota. To use this API, User quota settings should be enabled on the View and there should be a user quota override added for this user. -*/ -func (a *Client) UpdateViewUserQuotaOverride(params *UpdateViewUserQuotaOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaOverrideOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewUserQuotaOverrideParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewUserQuotaOverride", - Method: "PUT", - PathPattern: "/file-services/views/{viewId}/user-quotas/{userId}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewUserQuotaOverrideReader{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.(*UpdateViewUserQuotaOverrideOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewUserQuotaOverrideDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdateViewUserQuotaSettings updates view user quota settings - -Specifies parameters to update View user quota settings. -*/ -func (a *Client) UpdateViewUserQuotaSettings(params *UpdateViewUserQuotaSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateViewUserQuotaSettingsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateViewUserQuotaSettingsParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateViewUserQuotaSettings", - Method: "PUT", - PathPattern: "/file-services/views/{viewId}/user-quotas", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UpdateViewUserQuotaSettingsReader{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.(*UpdateViewUserQuotaSettingsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateViewUserQuotaSettingsDefault) - 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/v2/models/a_a_g_group.go b/v2/models/a_a_g_group.go deleted file mode 100644 index 290f9bea..00000000 --- a/v2/models/a_a_g_group.go +++ /dev/null @@ -1,240 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AAGGroup Specifies the details of a AAG Group. -// -// swagger:model AAGGroup -type AAGGroup struct { - - // Specifies the unique identifier of the AGGGroup. - ID *string `json:"id,omitempty"` - - // Specifies the name of the AAG Group. - Name *string `json:"name,omitempty"` - - // Specifies the resource information about the AAG Group. - ResourceInfo *AppResource `json:"resourceInfo,omitempty"` - - // Specifies the list of SQL servers which belongs to the given AAG Group. - Servers []*SQLServer `json:"servers"` - - // Specifies the list of FCI clusters which belongs to the given AAG Group. - FciClusters []*FCICluster `json:"fciClusters"` -} - -// Validate validates this a a g group -func (m *AAGGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFciClusters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGGroup) validateResourceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if m.ResourceInfo != nil { - if err := m.ResourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *AAGGroup) validateServers(formats strfmt.Registry) error { - if swag.IsZero(m.Servers) { // not required - return nil - } - - for i := 0; i < len(m.Servers); i++ { - if swag.IsZero(m.Servers[i]) { // not required - continue - } - - if m.Servers[i] != nil { - if err := m.Servers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AAGGroup) validateFciClusters(formats strfmt.Registry) error { - if swag.IsZero(m.FciClusters) { // not required - return nil - } - - for i := 0; i < len(m.FciClusters); i++ { - if swag.IsZero(m.FciClusters[i]) { // not required - continue - } - - if m.FciClusters[i] != nil { - if err := m.FciClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a a g group based on the context it is used -func (m *AAGGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFciClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AAGGroup) contextValidateResourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceInfo != nil { - - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if err := m.ResourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *AAGGroup) contextValidateServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Servers); i++ { - - if m.Servers[i] != nil { - - if swag.IsZero(m.Servers[i]) { // not required - return nil - } - - if err := m.Servers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AAGGroup) contextValidateFciClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FciClusters); i++ { - - if m.FciClusters[i] != nil { - - if swag.IsZero(m.FciClusters[i]) { // not required - return nil - } - - if err := m.FciClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AAGGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGGroup) UnmarshalBinary(b []byte) error { - var res AAGGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_a_g_info.go b/v2/models/a_a_g_info.go deleted file mode 100644 index f03dee7f..00000000 --- a/v2/models/a_a_g_info.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" -) - -// AAGInfo Object details for Mssql. -// -// swagger:model AAGInfo -type AAGInfo struct { - - // Specifies the AAG object Id. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the AAG name. - Name *string `json:"name,omitempty"` -} - -// Validate validates this a a g info -func (m *AAGInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a a g info based on context it is used -func (m *AAGInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AAGInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AAGInfo) UnmarshalBinary(b []byte) error { - var res AAGInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_d_attribute_constants.go b/v2/models/a_d_attribute_constants.go deleted file mode 100644 index e5ee7b35..00000000 --- a/v2/models/a_d_attribute_constants.go +++ /dev/null @@ -1,113 +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" -) - -// ADAttributeConstants AD Attribute Constants -// -// # AD Attribute Constants -// -// swagger:model ADAttributeConstants -type ADAttributeConstants struct { - - // AD Attribute Constants - // Enum: ["name","objectSid","sAMAccountName","objectClass"] - AdAttributeConstants string `json:"adAttributeConstants,omitempty"` -} - -// Validate validates this a d attribute constants -func (m *ADAttributeConstants) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdAttributeConstants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aDAttributeConstantsTypeAdAttributeConstantsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["name","objectSid","sAMAccountName","objectClass"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aDAttributeConstantsTypeAdAttributeConstantsPropEnum = append(aDAttributeConstantsTypeAdAttributeConstantsPropEnum, v) - } -} - -const ( - - // ADAttributeConstantsAdAttributeConstantsName captures enum value "name" - ADAttributeConstantsAdAttributeConstantsName string = "name" - - // ADAttributeConstantsAdAttributeConstantsObjectSid captures enum value "objectSid" - ADAttributeConstantsAdAttributeConstantsObjectSid string = "objectSid" - - // ADAttributeConstantsAdAttributeConstantsSAMAccountName captures enum value "sAMAccountName" - ADAttributeConstantsAdAttributeConstantsSAMAccountName string = "sAMAccountName" - - // ADAttributeConstantsAdAttributeConstantsObjectClass captures enum value "objectClass" - ADAttributeConstantsAdAttributeConstantsObjectClass string = "objectClass" -) - -// prop value enum -func (m *ADAttributeConstants) validateAdAttributeConstantsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aDAttributeConstantsTypeAdAttributeConstantsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ADAttributeConstants) validateAdAttributeConstants(formats strfmt.Registry) error { - if swag.IsZero(m.AdAttributeConstants) { // not required - return nil - } - - // value enum - if err := m.validateAdAttributeConstantsEnum("adAttributeConstants", "body", m.AdAttributeConstants); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this a d attribute constants based on context it is used -func (m *ADAttributeConstants) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADAttributeConstants) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADAttributeConstants) UnmarshalBinary(b []byte) error { - var res ADAttributeConstants - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_d_class_constants.go b/v2/models/a_d_class_constants.go deleted file mode 100644 index bb46cc9b..00000000 --- a/v2/models/a_d_class_constants.go +++ /dev/null @@ -1,113 +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" -) - -// ADClassConstants AD Class Constants -// -// # AD Class Constants -// -// swagger:model ADClassConstants -type ADClassConstants struct { - - // AD Class Constants - // Enum: ["user","group","computer","wellKnownPrincipal"] - AdClassConstants string `json:"adClassConstants,omitempty"` -} - -// Validate validates this a d class constants -func (m *ADClassConstants) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdClassConstants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aDClassConstantsTypeAdClassConstantsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["user","group","computer","wellKnownPrincipal"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aDClassConstantsTypeAdClassConstantsPropEnum = append(aDClassConstantsTypeAdClassConstantsPropEnum, v) - } -} - -const ( - - // ADClassConstantsAdClassConstantsUser captures enum value "user" - ADClassConstantsAdClassConstantsUser string = "user" - - // ADClassConstantsAdClassConstantsGroup captures enum value "group" - ADClassConstantsAdClassConstantsGroup string = "group" - - // ADClassConstantsAdClassConstantsComputer captures enum value "computer" - ADClassConstantsAdClassConstantsComputer string = "computer" - - // ADClassConstantsAdClassConstantsWellKnownPrincipal captures enum value "wellKnownPrincipal" - ADClassConstantsAdClassConstantsWellKnownPrincipal string = "wellKnownPrincipal" -) - -// prop value enum -func (m *ADClassConstants) validateAdClassConstantsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aDClassConstantsTypeAdClassConstantsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ADClassConstants) validateAdClassConstants(formats strfmt.Registry) error { - if swag.IsZero(m.AdClassConstants) { // not required - return nil - } - - // value enum - if err := m.validateAdClassConstantsEnum("adClassConstants", "body", m.AdClassConstants); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this a d class constants based on context it is used -func (m *ADClassConstants) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ADClassConstants) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADClassConstants) UnmarshalBinary(b []byte) error { - var res ADClassConstants - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_d_protection_group_params.go b/v2/models/a_d_protection_group_params.go deleted file mode 100644 index 8488cbd3..00000000 --- a/v2/models/a_d_protection_group_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ADProtectionGroupParams Active Directory(AD) Protection Group Parameters. -// -// Specifies the parameters which are specific to Active directory related Protection Groups. -// -// swagger:model ADProtectionGroupParams -type ADProtectionGroupParams struct { - - // Specifies the list of object ids to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ActiveDirectoryProtectionGroupObjectParams `json:"objects"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` -} - -// Validate validates this a d protection group params -func (m *ADProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this a d protection group params based on the context it is used -func (m *ADProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ADProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ADProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ADProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ADProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res ADProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_w_s_tags.go b/v2/models/a_w_s_tags.go deleted file mode 100644 index 829e494f..00000000 --- a/v2/models/a_w_s_tags.go +++ /dev/null @@ -1,50 +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" -) - -// AWSTags Specifies the AWS tags. -// -// swagger:model AWSTags -type AWSTags struct { - - // Array of Arrays of VMs Tags Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` -} - -// Validate validates this a w s tags -func (m *AWSTags) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this a w s tags based on context it is used -func (m *AWSTags) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AWSTags) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSTags) UnmarshalBinary(b []byte) error { - var res AWSTags - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_w_s_target_config.go b/v2/models/a_w_s_target_config.go deleted file mode 100644 index 34bffd1f..00000000 --- a/v2/models/a_w_s_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// AWSTargetConfig AWS Target Configuration -// -// # Specifies the configuration for adding AWS as repilcation target -// -// swagger:model AWSTargetConfig -type AWSTargetConfig struct { - - // Specifies the source id of the AWS protection source registered on Cohesity cluster. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the AWS Replication target. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies id of the AWS region in which to replicate the Snapshot to. Applicable if replication target is AWS target. - // Required: true - Region *int64 `json:"region"` - - // Specifies name of the AWS region in which to replicate the Snapshot to. Applicable if replication target is AWS target. - // Read Only: true - RegionName *string `json:"regionName,omitempty"` -} - -// Validate validates this a w s target config -func (m *AWSTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSTargetConfig) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AWSTargetConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this a w s target config based on the context it is used -func (m *AWSTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegionName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSTargetConfig) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *AWSTargetConfig) contextValidateRegionName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "regionName", "body", m.RegionName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSTargetConfig) UnmarshalBinary(b []byte) error { - var res AWSTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_w_s_tier.go b/v2/models/a_w_s_tier.go deleted file mode 100644 index f05fe097..00000000 --- a/v2/models/a_w_s_tier.go +++ /dev/null @@ -1,159 +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" -) - -// AWSTier Specifies the settings for a aws tier. -// -// swagger:model AWSTier -type AWSTier struct { - CommonCloudTierSettings - - // Specifies the AWS tier types. - // Required: true - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AWSTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AWSTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this a w s tier -func (m *AWSTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aWSTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aWSTierTypeTierTypePropEnum = append(aWSTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *AWSTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aWSTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AWSTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this a w s tier based on the context it is used -func (m *AWSTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *AWSTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSTier) UnmarshalBinary(b []byte) error { - var res AWSTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_w_s_tiering_levels.go b/v2/models/a_w_s_tiering_levels.go deleted file mode 100644 index 1c5ab824..00000000 --- a/v2/models/a_w_s_tiering_levels.go +++ /dev/null @@ -1,119 +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" -) - -// AWSTieringLevels AWS Tiering Levels. -// -// # AWS Tiering Levels -// -// swagger:model AWSTieringLevels -type AWSTieringLevels struct { - - // AWS Tiering Levels - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"] - Type string `json:"type,omitempty"` -} - -// Validate validates this a w s tiering levels -func (m *AWSTieringLevels) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aWSTieringLevelsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aWSTieringLevelsTypeTypePropEnum = append(aWSTieringLevelsTypeTypePropEnum, v) - } -} - -const ( - - // AWSTieringLevelsTypeKAmazonS3Standard captures enum value "kAmazonS3Standard" - AWSTieringLevelsTypeKAmazonS3Standard string = "kAmazonS3Standard" - - // AWSTieringLevelsTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - AWSTieringLevelsTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // AWSTieringLevelsTypeKAmazonS3OneZoneIA captures enum value "kAmazonS3OneZoneIA" - AWSTieringLevelsTypeKAmazonS3OneZoneIA string = "kAmazonS3OneZoneIA" - - // AWSTieringLevelsTypeKAmazonS3IntelligentTiering captures enum value "kAmazonS3IntelligentTiering" - AWSTieringLevelsTypeKAmazonS3IntelligentTiering string = "kAmazonS3IntelligentTiering" - - // AWSTieringLevelsTypeKAmazonS3Glacier captures enum value "kAmazonS3Glacier" - AWSTieringLevelsTypeKAmazonS3Glacier string = "kAmazonS3Glacier" - - // AWSTieringLevelsTypeKAmazonS3GlacierDeepArchive captures enum value "kAmazonS3GlacierDeepArchive" - AWSTieringLevelsTypeKAmazonS3GlacierDeepArchive string = "kAmazonS3GlacierDeepArchive" -) - -// prop value enum -func (m *AWSTieringLevels) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aWSTieringLevelsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AWSTieringLevels) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this a w s tiering levels based on context it is used -func (m *AWSTieringLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AWSTieringLevels) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSTieringLevels) UnmarshalBinary(b []byte) error { - var res AWSTieringLevels - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/a_w_s_tiers.go b/v2/models/a_w_s_tiers.go deleted file mode 100644 index 67b7a887..00000000 --- a/v2/models/a_w_s_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AWSTiers Specifies aws tiers. -// -// swagger:model AWSTiers -type AWSTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*AWSTier `json:"tiers"` -} - -// Validate validates this a w s tiers -func (m *AWSTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this a w s tiers based on the context it is used -func (m *AWSTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AWSTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AWSTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AWSTiers) UnmarshalBinary(b []byte) error { - var res AWSTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aag_backup_preference.go b/v2/models/aag_backup_preference.go deleted file mode 100644 index 89a04165..00000000 --- a/v2/models/aag_backup_preference.go +++ /dev/null @@ -1,113 +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" -) - -// AagBackupPreference Aag Backup Preference Type. -// -// Specifies Aag Backup Preference Type. -// -// swagger:model AagBackupPreference -type AagBackupPreference struct { - - // Specifies Aag Backup Preference Type. - // Enum: ["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"] - AagBackupPreference string `json:"aagBackupPreference,omitempty"` -} - -// Validate validates this aag backup preference -func (m *AagBackupPreference) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAagBackupPreference(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aagBackupPreferenceTypeAagBackupPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aagBackupPreferenceTypeAagBackupPreferencePropEnum = append(aagBackupPreferenceTypeAagBackupPreferencePropEnum, v) - } -} - -const ( - - // AagBackupPreferenceAagBackupPreferenceKPrimaryReplicaOnly captures enum value "kPrimaryReplicaOnly" - AagBackupPreferenceAagBackupPreferenceKPrimaryReplicaOnly string = "kPrimaryReplicaOnly" - - // AagBackupPreferenceAagBackupPreferenceKSecondaryReplicaOnly captures enum value "kSecondaryReplicaOnly" - AagBackupPreferenceAagBackupPreferenceKSecondaryReplicaOnly string = "kSecondaryReplicaOnly" - - // AagBackupPreferenceAagBackupPreferenceKPreferSecondaryReplica captures enum value "kPreferSecondaryReplica" - AagBackupPreferenceAagBackupPreferenceKPreferSecondaryReplica string = "kPreferSecondaryReplica" - - // AagBackupPreferenceAagBackupPreferenceKAnyReplica captures enum value "kAnyReplica" - AagBackupPreferenceAagBackupPreferenceKAnyReplica string = "kAnyReplica" -) - -// prop value enum -func (m *AagBackupPreference) validateAagBackupPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aagBackupPreferenceTypeAagBackupPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AagBackupPreference) validateAagBackupPreference(formats strfmt.Registry) error { - if swag.IsZero(m.AagBackupPreference) { // not required - return nil - } - - // value enum - if err := m.validateAagBackupPreferenceEnum("aagBackupPreference", "body", m.AagBackupPreference); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aag backup preference based on context it is used -func (m *AagBackupPreference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AagBackupPreference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AagBackupPreference) UnmarshalBinary(b []byte) error { - var res AagBackupPreference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/abort_incomplete_multipart_upload_action.go b/v2/models/abort_incomplete_multipart_upload_action.go deleted file mode 100644 index daca73b4..00000000 --- a/v2/models/abort_incomplete_multipart_upload_action.go +++ /dev/null @@ -1,50 +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" -) - -// AbortIncompleteMultipartUploadAction Specifies the Lifecycle Abort Incomplete Multipart Upload Action. -// -// swagger:model AbortIncompleteMultipartUploadAction -type AbortIncompleteMultipartUploadAction struct { - - // Specifies the number of days after which to abort an incomplete multipart upload. - Days *int64 `json:"days,omitempty"` -} - -// Validate validates this abort incomplete multipart upload action -func (m *AbortIncompleteMultipartUploadAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this abort incomplete multipart upload action based on context it is used -func (m *AbortIncompleteMultipartUploadAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AbortIncompleteMultipartUploadAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AbortIncompleteMultipartUploadAction) UnmarshalBinary(b []byte) error { - var res AbortIncompleteMultipartUploadAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/access_token_response.go b/v2/models/access_token_response.go deleted file mode 100644 index 95ba3641..00000000 --- a/v2/models/access_token_response.go +++ /dev/null @@ -1,56 +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" -) - -// AccessTokenResponse Access token generation response -// -// swagger:model AccessTokenResponse -type AccessTokenResponse struct { - - // Created access token. - AccessToken *string `json:"accessToken,omitempty"` - - // Privileges for the user. - Privileges []string `json:"privileges,omitempty"` - - // Access token type. - TokenType *string `json:"tokenType,omitempty"` -} - -// Validate validates this access token response -func (m *AccessTokenResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this access token response based on context it is used -func (m *AccessTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccessTokenResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccessTokenResponse) UnmarshalBinary(b []byte) error { - var res AccessTokenResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acl_config.go b/v2/models/acl_config.go deleted file mode 100644 index 7185d256..00000000 --- a/v2/models/acl_config.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ACLConfig Specifies the ACL config of an S3 bucket. -// -// swagger:model AclConfig -type ACLConfig struct { - - // Specifies a list of ACL grants. - Grants []*ACLGrant `json:"grants"` -} - -// Validate validates this Acl config -func (m *ACLConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGrants(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLConfig) validateGrants(formats strfmt.Registry) error { - if swag.IsZero(m.Grants) { // not required - return nil - } - - for i := 0; i < len(m.Grants); i++ { - if swag.IsZero(m.Grants[i]) { // not required - continue - } - - if m.Grants[i] != nil { - if err := m.Grants[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this Acl config based on the context it is used -func (m *ACLConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGrants(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLConfig) contextValidateGrants(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Grants); i++ { - - if m.Grants[i] != nil { - - if swag.IsZero(m.Grants[i]) { // not required - return nil - } - - if err := m.Grants[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grants" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grants" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ACLConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ACLConfig) UnmarshalBinary(b []byte) error { - var res ACLConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acl_grant.go b/v2/models/acl_grant.go deleted file mode 100644 index db19a3dd..00000000 --- a/v2/models/acl_grant.go +++ /dev/null @@ -1,162 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ACLGrant Specifies an ACL grant. -// -// swagger:model AclGrant -type ACLGrant struct { - - // Specifies a list of permissions granted to the grantees. - // Required: true - // Min Items: 1 - Permissions []string `json:"permissions"` - - // Specifies the grantee. - // Required: true - Grantee *ACLGrantee `json:"grantee"` -} - -// Validate validates this Acl grant -func (m *ACLGrant) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGrantee(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aclGrantPermissionsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Read","Write","ReadACP","WriteACP","FullControl"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aclGrantPermissionsItemsEnum = append(aclGrantPermissionsItemsEnum, v) - } -} - -func (m *ACLGrant) validatePermissionsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aclGrantPermissionsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ACLGrant) validatePermissions(formats strfmt.Registry) error { - - if err := validate.Required("permissions", "body", m.Permissions); err != nil { - return err - } - - iPermissionsSize := int64(len(m.Permissions)) - - if err := validate.MinItems("permissions", "body", iPermissionsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Permissions); i++ { - - // value enum - if err := m.validatePermissionsItemsEnum("permissions"+"."+strconv.Itoa(i), "body", m.Permissions[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ACLGrant) validateGrantee(formats strfmt.Registry) error { - - if err := validate.Required("grantee", "body", m.Grantee); err != nil { - return err - } - - if m.Grantee != nil { - if err := m.Grantee.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantee") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantee") - } - return err - } - } - - return nil -} - -// ContextValidate validate this Acl grant based on the context it is used -func (m *ACLGrant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGrantee(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ACLGrant) contextValidateGrantee(ctx context.Context, formats strfmt.Registry) error { - - if m.Grantee != nil { - - if err := m.Grantee.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("grantee") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("grantee") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ACLGrant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ACLGrant) UnmarshalBinary(b []byte) error { - var res ACLGrant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acl_grantee.go b/v2/models/acl_grantee.go deleted file mode 100644 index 9ffd293a..00000000 --- a/v2/models/acl_grantee.go +++ /dev/null @@ -1,163 +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" -) - -// ACLGrantee Specifies an ACL grantee. -// -// swagger:model AclGrantee -type ACLGrantee struct { - - // Specifies the grantee type. - // Required: true - // Enum: ["RegisteredUser","Group"] - Type *string `json:"type"` - - // Specifies the user id of the grantee if the `type` is Registered User. - UserID *string `json:"userId,omitempty"` - - // Specifies the group to which permissions are granted if the `type` is Group. - // Enum: ["AuthenticatedUsersGroup","AllUsersGroup","LogDeliveryGroup"] - Group *string `json:"group,omitempty"` -} - -// Validate validates this Acl grantee -func (m *ACLGrantee) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aclGranteeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RegisteredUser","Group"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aclGranteeTypeTypePropEnum = append(aclGranteeTypeTypePropEnum, v) - } -} - -const ( - - // ACLGranteeTypeRegisteredUser captures enum value "RegisteredUser" - ACLGranteeTypeRegisteredUser string = "RegisteredUser" - - // ACLGranteeTypeGroup captures enum value "Group" - ACLGranteeTypeGroup string = "Group" -) - -// prop value enum -func (m *ACLGrantee) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aclGranteeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ACLGrantee) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var aclGranteeTypeGroupPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AuthenticatedUsersGroup","AllUsersGroup","LogDeliveryGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aclGranteeTypeGroupPropEnum = append(aclGranteeTypeGroupPropEnum, v) - } -} - -const ( - - // ACLGranteeGroupAuthenticatedUsersGroup captures enum value "AuthenticatedUsersGroup" - ACLGranteeGroupAuthenticatedUsersGroup string = "AuthenticatedUsersGroup" - - // ACLGranteeGroupAllUsersGroup captures enum value "AllUsersGroup" - ACLGranteeGroupAllUsersGroup string = "AllUsersGroup" - - // ACLGranteeGroupLogDeliveryGroup captures enum value "LogDeliveryGroup" - ACLGranteeGroupLogDeliveryGroup string = "LogDeliveryGroup" -) - -// prop value enum -func (m *ACLGrantee) validateGroupEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aclGranteeTypeGroupPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ACLGrantee) validateGroup(formats strfmt.Registry) error { - if swag.IsZero(m.Group) { // not required - return nil - } - - // value enum - if err := m.validateGroupEnum("group", "body", *m.Group); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Acl grantee based on context it is used -func (m *ACLGrantee) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ACLGrantee) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ACLGrantee) UnmarshalBinary(b []byte) error { - var res ACLGrantee - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_disk_info.go b/v2/models/acropolis_disk_info.go deleted file mode 100644 index ce8a4fb2..00000000 --- a/v2/models/acropolis_disk_info.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" -) - -// AcropolisDiskInfo Acropolis Disk Information -// -// Specifies information about a disk to be filtered. -// -// swagger:model AcropolisDiskInfo -type AcropolisDiskInfo struct { - - // Specifies the disk controller type. - // Required: true - // Enum: ["scsi","ide","pci","sata","spapr","nvme"] - ControllerType *string `json:"controllerType"` - - // Specifies the disk index number. - // Required: true - UnitNumber *int32 `json:"unitNumber"` -} - -// Validate validates this acropolis disk info -func (m *AcropolisDiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateControllerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnitNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var acropolisDiskInfoTypeControllerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scsi","ide","pci","sata","spapr","nvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - acropolisDiskInfoTypeControllerTypePropEnum = append(acropolisDiskInfoTypeControllerTypePropEnum, v) - } -} - -const ( - - // AcropolisDiskInfoControllerTypeScsi captures enum value "scsi" - AcropolisDiskInfoControllerTypeScsi string = "scsi" - - // AcropolisDiskInfoControllerTypeIde captures enum value "ide" - AcropolisDiskInfoControllerTypeIde string = "ide" - - // AcropolisDiskInfoControllerTypePci captures enum value "pci" - AcropolisDiskInfoControllerTypePci string = "pci" - - // AcropolisDiskInfoControllerTypeSata captures enum value "sata" - AcropolisDiskInfoControllerTypeSata string = "sata" - - // AcropolisDiskInfoControllerTypeSpapr captures enum value "spapr" - AcropolisDiskInfoControllerTypeSpapr string = "spapr" - - // AcropolisDiskInfoControllerTypeNvme captures enum value "nvme" - AcropolisDiskInfoControllerTypeNvme string = "nvme" -) - -// prop value enum -func (m *AcropolisDiskInfo) validateControllerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, acropolisDiskInfoTypeControllerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AcropolisDiskInfo) validateControllerType(formats strfmt.Registry) error { - - if err := validate.Required("controllerType", "body", m.ControllerType); err != nil { - return err - } - - // value enum - if err := m.validateControllerTypeEnum("controllerType", "body", *m.ControllerType); err != nil { - return err - } - - return nil -} - -func (m *AcropolisDiskInfo) validateUnitNumber(formats strfmt.Registry) error { - - if err := validate.Required("unitNumber", "body", m.UnitNumber); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this acropolis disk info based on context it is used -func (m *AcropolisDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisDiskInfo) UnmarshalBinary(b []byte) error { - var res AcropolisDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_protection_group_object_params.go b/v2/models/acropolis_protection_group_object_params.go deleted file mode 100644 index 570730df..00000000 --- a/v2/models/acropolis_protection_group_object_params.go +++ /dev/null @@ -1,218 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AcropolisProtectionGroupObjectParams Specifies an object protected by a Acropolis Protection Group. -// -// swagger:model AcropolisProtectionGroupObjectParams -type AcropolisProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies a list of disks to exclude from being protected. This is only applicable to VM objects. - ExcludeDisks []*AcropolisDiskInfo `json:"excludeDisks"` - - // Specifies a list of disks to include in the protection. This is only applicable to VM objects. - IncludeDisks []*AcropolisDiskInfo `json:"includeDisks"` -} - -// Validate validates this acropolis protection group object params -func (m *AcropolisProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) validateExcludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeDisks); i++ { - if swag.IsZero(m.ExcludeDisks[i]) { // not required - continue - } - - if m.ExcludeDisks[i] != nil { - if err := m.ExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) validateIncludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.IncludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.IncludeDisks); i++ { - if swag.IsZero(m.IncludeDisks[i]) { // not required - continue - } - - if m.IncludeDisks[i] != nil { - if err := m.IncludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this acropolis protection group object params based on the context it is used -func (m *AcropolisProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) contextValidateExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeDisks); i++ { - - if m.ExcludeDisks[i] != nil { - - if swag.IsZero(m.ExcludeDisks[i]) { // not required - return nil - } - - if err := m.ExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupObjectParams) contextValidateIncludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IncludeDisks); i++ { - - if m.IncludeDisks[i] != nil { - - if swag.IsZero(m.IncludeDisks[i]) { // not required - return nil - } - - if err := m.IncludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AcropolisProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_protection_group_params.go b/v2/models/acropolis_protection_group_params.go deleted file mode 100644 index 12840c48..00000000 --- a/v2/models/acropolis_protection_group_params.go +++ /dev/null @@ -1,371 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AcropolisProtectionGroupParams Specifies the parameters which are related to Acropolis Protection Groups. -// -// swagger:model AcropolisProtectionGroupParams -type AcropolisProtectionGroupParams struct { - - // Specifies the objects included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*AcropolisProtectionGroupObjectParams `json:"objects"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the object ids to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. If not specified or false then snapshots will not be app consistent. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` - - // Specifies whether to continue backing up on quiesce failure - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // Specifies a list of disks to exclude from the backup. - GlobalExcludeDisks []*AcropolisDiskInfo `json:"globalExcludeDisks"` - - // Specifies a list of disks to include in the backup. - GlobalIncludeDisks []*AcropolisDiskInfo `json:"globalIncludeDisks"` -} - -// Validate validates this acropolis protection group params -func (m *AcropolisProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalIncludeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) validateGlobalExcludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - continue - } - - if m.GlobalExcludeDisks[i] != nil { - if err := m.GlobalExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) validateGlobalIncludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalIncludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalIncludeDisks); i++ { - if swag.IsZero(m.GlobalIncludeDisks[i]) { // not required - continue - } - - if m.GlobalIncludeDisks[i] != nil { - if err := m.GlobalIncludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this acropolis protection group params based on the context it is used -func (m *AcropolisProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalIncludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateGlobalExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - - if m.GlobalExcludeDisks[i] != nil { - - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AcropolisProtectionGroupParams) contextValidateGlobalIncludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalIncludeDisks); i++ { - - if m.GlobalIncludeDisks[i] != nil { - - if swag.IsZero(m.GlobalIncludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalIncludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AcropolisProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_recover_files_new_target_config.go b/v2/models/acropolis_recover_files_new_target_config.go deleted file mode 100644 index bc402902..00000000 --- a/v2/models/acropolis_recover_files_new_target_config.go +++ /dev/null @@ -1,178 +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" -) - -// AcropolisRecoverFilesNewTargetConfig Acropolis Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to the new target. -// -// swagger:model AcropolisRecoverFilesNewTargetConfig -type AcropolisRecoverFilesNewTargetConfig struct { - - // Specifies the absolute path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this acropolis recover files new target config -func (m *AcropolisRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *AcropolisRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AcropolisRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this acropolis recover files new target config based on the context it is used -func (m *AcropolisRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AcropolisRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res AcropolisRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_recover_files_original_target_config.go b/v2/models/acropolis_recover_files_original_target_config.go deleted file mode 100644 index 36aef9b0..00000000 --- a/v2/models/acropolis_recover_files_original_target_config.go +++ /dev/null @@ -1,132 +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" -) - -// AcropolisRecoverFilesOriginalTargetConfig Acropolis Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model AcropolisRecoverFilesOriginalTargetConfig -type AcropolisRecoverFilesOriginalTargetConfig struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this acropolis recover files original target config -func (m *AcropolisRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *AcropolisRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this acropolis recover files original target config based on the context it is used -func (m *AcropolisRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res AcropolisRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_target_params_for_recover_file_and_folder.go b/v2/models/acropolis_target_params_for_recover_file_and_folder.go deleted file mode 100644 index f5ba443a..00000000 --- a/v2/models/acropolis_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// AcropolisTargetParamsForRecoverFileAndFolder Acropolis Target Params for Recover Files -// -// Specifies the parameters for an Acropolis files and folders recovery target. -// -// swagger:model AcropolisTargetParamsForRecoverFileAndFolder -type AcropolisTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to overwrite the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original file/folder attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the objects encounters an error. Default is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *AcropolisRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *AcropolisRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this acropolis target params for recover file and folder -func (m *AcropolisTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this acropolis target params for recover file and folder based on the context it is used -func (m *AcropolisTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res AcropolisTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/acropolis_target_params_for_recover_vm.go b/v2/models/acropolis_target_params_for_recover_vm.go deleted file mode 100644 index 9e0e6e8e..00000000 --- a/v2/models/acropolis_target_params_for_recover_vm.go +++ /dev/null @@ -1,274 +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" -) - -// AcropolisTargetParamsForRecoverVM Acropolis Target Params. -// -// Specifies the parameters for an Acropolis recovery target. -// -// swagger:model AcropolisTargetParamsForRecoverVm -type AcropolisTargetParamsForRecoverVM struct { - - // Specifies type of Recovery Process to be used. InstantRecovery/CopyRecovery etc... Default value is InstantRecovery. - // Enum: ["InstantRecovery","CopyRecovery"] - RecoveryProcessType string `json:"recoveryProcessType,omitempty"` - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to recover excluded disk while performing recovery of a VM by creating empty disks for them. Default value is false. - RecoverExcludedDisk *bool `json:"recoverExcludedDisk,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *RecoverAcropolisVMTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this acropolis target params for recover Vm -func (m *AcropolisTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var acropolisTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InstantRecovery","CopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - acropolisTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum = append(acropolisTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // AcropolisTargetParamsForRecoverVMRecoveryProcessTypeInstantRecovery captures enum value "InstantRecovery" - AcropolisTargetParamsForRecoverVMRecoveryProcessTypeInstantRecovery string = "InstantRecovery" - - // AcropolisTargetParamsForRecoverVMRecoveryProcessTypeCopyRecovery captures enum value "CopyRecovery" - AcropolisTargetParamsForRecoverVMRecoveryProcessTypeCopyRecovery string = "CopyRecovery" -) - -// prop value enum -func (m *AcropolisTargetParamsForRecoverVM) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, acropolisTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this acropolis target params for recover Vm based on the context it is used -func (m *AcropolisTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *AcropolisTargetParamsForRecoverVM) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AcropolisTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AcropolisTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res AcropolisTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/action_object_level_response.go b/v2/models/action_object_level_response.go deleted file mode 100644 index 8eb3ba4d..00000000 --- a/v2/models/action_object_level_response.go +++ /dev/null @@ -1,346 +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" -) - -// ActionObjectLevelResponse Specifies the object level response params after performing an action on a protected object. -// -// swagger:model ActionObjectLevelResponse -type ActionObjectLevelResponse struct { - ProtectionObjectInput - - // Specifies the infomration about status of resume action. - ResumeStatus *ResumeActionObjectLevelResponse `json:"resumeStatus,omitempty"` - - // Specifies the infomration about status of pause action. - PauseStatus *PauseActionObjectLevelResponse `json:"pauseStatus,omitempty"` - - // Specifies the infomration about status of run now action. - RunNowStatus *RunNowActionObjectLevelResponse `json:"runNowStatus,omitempty"` - - // Specifies the infomration about status of Unprotect action. - UnProtectStatus *UnprotectActionObjectLevelResponse `json:"unProtectStatus,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ActionObjectLevelResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - // AO1 - var dataAO1 struct { - ResumeStatus *ResumeActionObjectLevelResponse `json:"resumeStatus,omitempty"` - - PauseStatus *PauseActionObjectLevelResponse `json:"pauseStatus,omitempty"` - - RunNowStatus *RunNowActionObjectLevelResponse `json:"runNowStatus,omitempty"` - - UnProtectStatus *UnprotectActionObjectLevelResponse `json:"unProtectStatus,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ResumeStatus = dataAO1.ResumeStatus - - m.PauseStatus = dataAO1.PauseStatus - - m.RunNowStatus = dataAO1.RunNowStatus - - m.UnProtectStatus = dataAO1.UnProtectStatus - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ActionObjectLevelResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ResumeStatus *ResumeActionObjectLevelResponse `json:"resumeStatus,omitempty"` - - PauseStatus *PauseActionObjectLevelResponse `json:"pauseStatus,omitempty"` - - RunNowStatus *RunNowActionObjectLevelResponse `json:"runNowStatus,omitempty"` - - UnProtectStatus *UnprotectActionObjectLevelResponse `json:"unProtectStatus,omitempty"` - } - - dataAO1.ResumeStatus = m.ResumeStatus - - dataAO1.PauseStatus = m.PauseStatus - - dataAO1.RunNowStatus = m.RunNowStatus - - dataAO1.UnProtectStatus = m.UnProtectStatus - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this action object level response -func (m *ActionObjectLevelResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResumeStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePauseStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunNowStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnProtectStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActionObjectLevelResponse) validateResumeStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.ResumeStatus) { // not required - return nil - } - - if m.ResumeStatus != nil { - if err := m.ResumeStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) validatePauseStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.PauseStatus) { // not required - return nil - } - - if m.PauseStatus != nil { - if err := m.PauseStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) validateRunNowStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.RunNowStatus) { // not required - return nil - } - - if m.RunNowStatus != nil { - if err := m.RunNowStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) validateUnProtectStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.UnProtectStatus) { // not required - return nil - } - - if m.UnProtectStatus != nil { - if err := m.UnProtectStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unProtectStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unProtectStatus") - } - return err - } - } - - return nil -} - -// ContextValidate validate this action object level response based on the context it is used -func (m *ActionObjectLevelResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResumeStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePauseStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunNowStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnProtectStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActionObjectLevelResponse) contextValidateResumeStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.ResumeStatus != nil { - - if swag.IsZero(m.ResumeStatus) { // not required - return nil - } - - if err := m.ResumeStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) contextValidatePauseStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.PauseStatus != nil { - - if swag.IsZero(m.PauseStatus) { // not required - return nil - } - - if err := m.PauseStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) contextValidateRunNowStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.RunNowStatus != nil { - - if swag.IsZero(m.RunNowStatus) { // not required - return nil - } - - if err := m.RunNowStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowStatus") - } - return err - } - } - - return nil -} - -func (m *ActionObjectLevelResponse) contextValidateUnProtectStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.UnProtectStatus != nil { - - if swag.IsZero(m.UnProtectStatus) { // not required - return nil - } - - if err := m.UnProtectStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unProtectStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unProtectStatus") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActionObjectLevelResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActionObjectLevelResponse) UnmarshalBinary(b []byte) error { - var res ActionObjectLevelResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/action_object_mapping.go b/v2/models/action_object_mapping.go deleted file mode 100644 index b18f6723..00000000 --- a/v2/models/action_object_mapping.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" -) - -// ActionObjectMapping Specifies the object paring for performing action on list of objects. -// -// swagger:model ActionObjectMapping -type ActionObjectMapping struct { - - // Specifies the source object id. - SourceObjectID *int64 `json:"sourceObjectId,omitempty"` - - // Specifies the destination object id. - DestinationObjectID *int64 `json:"destinationObjectId,omitempty"` -} - -// Validate validates this action object mapping -func (m *ActionObjectMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this action object mapping based on context it is used -func (m *ActionObjectMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActionObjectMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActionObjectMapping) UnmarshalBinary(b []byte) error { - var res ActionObjectMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directories.go b/v2/models/active_directories.go deleted file mode 100644 index 44d949b9..00000000 --- a/v2/models/active_directories.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ActiveDirectories Response of Active Directories. -// -// swagger:model ActiveDirectories -type ActiveDirectories struct { - - // A list of Active Directories. - ActiveDirectories []*ActiveDirectory `json:"activeDirectories"` -} - -// Validate validates this active directories -func (m *ActiveDirectories) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveDirectories(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectories) validateActiveDirectories(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveDirectories) { // not required - return nil - } - - for i := 0; i < len(m.ActiveDirectories); i++ { - if swag.IsZero(m.ActiveDirectories[i]) { // not required - continue - } - - if m.ActiveDirectories[i] != nil { - if err := m.ActiveDirectories[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this active directories based on the context it is used -func (m *ActiveDirectories) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveDirectories(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectories) contextValidateActiveDirectories(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveDirectories); i++ { - - if m.ActiveDirectories[i] != nil { - - if swag.IsZero(m.ActiveDirectories[i]) { // not required - return nil - } - - if err := m.ActiveDirectories[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectories) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectories) UnmarshalBinary(b []byte) error { - var res ActiveDirectories - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directory.go b/v2/models/active_directory.go deleted file mode 100644 index b41360dc..00000000 --- a/v2/models/active_directory.go +++ /dev/null @@ -1,594 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ActiveDirectory Specifies an Active Directory. -// -// swagger:model ActiveDirectory -type ActiveDirectory struct { - CommonActiveDirectoryParams - - // Specifies the id of the task log related to this Active Directory. - // Read Only: true - TaskLogs *TaskLogs `json:"taskLogs,omitempty"` - - // Specifies the domain name of the Active Directory. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a list of Centrify zones. - CentrifyZones []*CentrifyZones `json:"centrifyZones"` - - // A list of domain names with a list of it's domain controllers. - DomainControllers []*DomainControllers `json:"domainControllers"` - - // Specifies a list of security principals. - SecurityPrincipals []*SecurityPrincipal `json:"securityPrincipals"` - - // Specifies the list of tenants that have permissions for this Active Directory. - Permissions []*Tenant `json:"permissions"` - - // Specifies level of transitive Active Directory trust domains to be used. - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - // Specifies a partial error, if any, as part of the Active Directory Create or Update response. Supported error codes: [MachineAccountNeedFixing] - Error *ActiveDirectoryError `json:"error,omitempty"` - - // Specifies the params of the user id mapping info of an Active Directory. - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ActiveDirectory) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonActiveDirectoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonActiveDirectoryParams = aO0 - - // AO1 - var dataAO1 struct { - TaskLogs *TaskLogs `json:"taskLogs,omitempty"` - - DomainName *string `json:"domainName,omitempty"` - - CentrifyZones []*CentrifyZones `json:"centrifyZones"` - - DomainControllers []*DomainControllers `json:"domainControllers"` - - SecurityPrincipals []*SecurityPrincipal `json:"securityPrincipals"` - - Permissions []*Tenant `json:"permissions"` - - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - Error *ActiveDirectoryError `json:"error,omitempty"` - - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TaskLogs = dataAO1.TaskLogs - - m.DomainName = dataAO1.DomainName - - m.CentrifyZones = dataAO1.CentrifyZones - - m.DomainControllers = dataAO1.DomainControllers - - m.SecurityPrincipals = dataAO1.SecurityPrincipals - - m.Permissions = dataAO1.Permissions - - m.TransitiveAdTrustLevelLimit = dataAO1.TransitiveAdTrustLevelLimit - - m.Error = dataAO1.Error - - m.IDMappingParams = dataAO1.IDMappingParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ActiveDirectory) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonActiveDirectoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TaskLogs *TaskLogs `json:"taskLogs,omitempty"` - - DomainName *string `json:"domainName,omitempty"` - - CentrifyZones []*CentrifyZones `json:"centrifyZones"` - - DomainControllers []*DomainControllers `json:"domainControllers"` - - SecurityPrincipals []*SecurityPrincipal `json:"securityPrincipals"` - - Permissions []*Tenant `json:"permissions"` - - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - Error *ActiveDirectoryError `json:"error,omitempty"` - - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` - } - - dataAO1.TaskLogs = m.TaskLogs - - dataAO1.DomainName = m.DomainName - - dataAO1.CentrifyZones = m.CentrifyZones - - dataAO1.DomainControllers = m.DomainControllers - - dataAO1.SecurityPrincipals = m.SecurityPrincipals - - dataAO1.Permissions = m.Permissions - - dataAO1.TransitiveAdTrustLevelLimit = m.TransitiveAdTrustLevelLimit - - dataAO1.Error = m.Error - - dataAO1.IDMappingParams = m.IDMappingParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this active directory -func (m *ActiveDirectory) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskLogs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCentrifyZones(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomainControllers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityPrincipals(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIDMappingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectory) validateTaskLogs(formats strfmt.Registry) error { - - if swag.IsZero(m.TaskLogs) { // not required - return nil - } - - if m.TaskLogs != nil { - if err := m.TaskLogs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskLogs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskLogs") - } - return err - } - } - - return nil -} - -func (m *ActiveDirectory) validateCentrifyZones(formats strfmt.Registry) error { - - if swag.IsZero(m.CentrifyZones) { // not required - return nil - } - - for i := 0; i < len(m.CentrifyZones); i++ { - if swag.IsZero(m.CentrifyZones[i]) { // not required - continue - } - - if m.CentrifyZones[i] != nil { - if err := m.CentrifyZones[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) validateDomainControllers(formats strfmt.Registry) error { - - if swag.IsZero(m.DomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.DomainControllers); i++ { - if swag.IsZero(m.DomainControllers[i]) { // not required - continue - } - - if m.DomainControllers[i] != nil { - if err := m.DomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) validateSecurityPrincipals(formats strfmt.Registry) error { - - if swag.IsZero(m.SecurityPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SecurityPrincipals); i++ { - if swag.IsZero(m.SecurityPrincipals[i]) { // not required - continue - } - - if m.SecurityPrincipals[i] != nil { - if err := m.SecurityPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) validatePermissions(formats strfmt.Registry) error { - - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) validateError(formats strfmt.Registry) error { - - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *ActiveDirectory) validateIDMappingParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IDMappingParams) { // not required - return nil - } - - if m.IDMappingParams != nil { - if err := m.IDMappingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idMappingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this active directory based on the context it is used -func (m *ActiveDirectory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCentrifyZones(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecurityPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIDMappingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectory) contextValidateTaskLogs(ctx context.Context, formats strfmt.Registry) error { - - if m.TaskLogs != nil { - - if swag.IsZero(m.TaskLogs) { // not required - return nil - } - - if err := m.TaskLogs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskLogs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskLogs") - } - return err - } - } - - return nil -} - -func (m *ActiveDirectory) contextValidateCentrifyZones(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CentrifyZones); i++ { - - if m.CentrifyZones[i] != nil { - - if swag.IsZero(m.CentrifyZones[i]) { // not required - return nil - } - - if err := m.CentrifyZones[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) contextValidateDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DomainControllers); i++ { - - if m.DomainControllers[i] != nil { - - if swag.IsZero(m.DomainControllers[i]) { // not required - return nil - } - - if err := m.DomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) contextValidateSecurityPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecurityPrincipals); i++ { - - if m.SecurityPrincipals[i] != nil { - - if swag.IsZero(m.SecurityPrincipals[i]) { // not required - return nil - } - - if err := m.SecurityPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ActiveDirectory) 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 -} - -func (m *ActiveDirectory) contextValidateIDMappingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IDMappingParams != nil { - - if swag.IsZero(m.IDMappingParams) { // not required - return nil - } - - if err := m.IDMappingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idMappingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectory) UnmarshalBinary(b []byte) error { - var res ActiveDirectory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directory_admin_params.go b/v2/models/active_directory_admin_params.go deleted file mode 100644 index b9d088db..00000000 --- a/v2/models/active_directory_admin_params.go +++ /dev/null @@ -1,88 +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" -) - -// ActiveDirectoryAdminParams Specifies the params of a user with administrative privilege of an Active Directory. -// -// swagger:model ActiveDirectoryAdminParams -type ActiveDirectoryAdminParams struct { - - // Specifies the user name. - // Required: true - Username *string `json:"username"` - - // Specifies the password of the user. - // Required: true - Password *string `json:"password"` -} - -// Validate validates this active directory admin params -func (m *ActiveDirectoryAdminParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryAdminParams) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *ActiveDirectoryAdminParams) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this active directory admin params based on context it is used -func (m *ActiveDirectoryAdminParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryAdminParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryAdminParams) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryAdminParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directory_app_params.go b/v2/models/active_directory_app_params.go deleted file mode 100644 index 8eee61a5..00000000 --- a/v2/models/active_directory_app_params.go +++ /dev/null @@ -1,76 +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" -) - -// ActiveDirectoryAppParams Active Directory App Parameters. -// -// Specifies the Active Directory special parameters for the Protection Group. -// -// swagger:model ActiveDirectoryAppParams -type ActiveDirectoryAppParams struct { - - // Specifies the application id of the Active Directory instance. - AppID *int64 `json:"appId,omitempty"` - - // Specifies the application name of the Active Directory instance. - // Read Only: true - AppName *string `json:"appName,omitempty"` -} - -// Validate validates this active directory app params -func (m *ActiveDirectoryAppParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this active directory app params based on the context it is used -func (m *ActiveDirectoryAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryAppParams) contextValidateAppName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "appName", "body", m.AppName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryAppParams) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directory_error.go b/v2/models/active_directory_error.go deleted file mode 100644 index 7639b374..00000000 --- a/v2/models/active_directory_error.go +++ /dev/null @@ -1,105 +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" -) - -// ActiveDirectoryError Specifies the Active Directory error object. -// -// swagger:model ActiveDirectoryError -type ActiveDirectoryError struct { - - // Specifies the error code. - // Enum: ["MachineAccountNeedFixing"] - ErrorCode *string `json:"errorCode,omitempty"` - - // Specifies the error message corresponding to the error code. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this active directory error -func (m *ActiveDirectoryError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateErrorCode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var activeDirectoryErrorTypeErrorCodePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["MachineAccountNeedFixing"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - activeDirectoryErrorTypeErrorCodePropEnum = append(activeDirectoryErrorTypeErrorCodePropEnum, v) - } -} - -const ( - - // ActiveDirectoryErrorErrorCodeMachineAccountNeedFixing captures enum value "MachineAccountNeedFixing" - ActiveDirectoryErrorErrorCodeMachineAccountNeedFixing string = "MachineAccountNeedFixing" -) - -// prop value enum -func (m *ActiveDirectoryError) validateErrorCodeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, activeDirectoryErrorTypeErrorCodePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ActiveDirectoryError) validateErrorCode(formats strfmt.Registry) error { - if swag.IsZero(m.ErrorCode) { // not required - return nil - } - - // value enum - if err := m.validateErrorCodeEnum("errorCode", "body", *m.ErrorCode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this active directory error based on context it is used -func (m *ActiveDirectoryError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryError) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_directory_protection_group_object_params.go b/v2/models/active_directory_protection_group_object_params.go deleted file mode 100644 index 0fc4eca8..00000000 --- a/v2/models/active_directory_protection_group_object_params.go +++ /dev/null @@ -1,161 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ActiveDirectoryProtectionGroupObjectParams Active Directory Protection Group Object Params. -// -// Specifies the object identifier to for the active directory protection group. -// -// swagger:model ActiveDirectoryProtectionGroupObjectParams -type ActiveDirectoryProtectionGroupObjectParams struct { - - // Specifies the id of the registered active directory source. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the registered active directory source. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the specific parameters required for active directory app configuration. - AppParams []*ActiveDirectoryAppParams `json:"appParams"` - - // Specifies whether to take bmr backup. If this is not specified, the bmr backup won't be enabled. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` -} - -// Validate validates this active directory protection group object params -func (m *ActiveDirectoryProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryProtectionGroupObjectParams) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *ActiveDirectoryProtectionGroupObjectParams) validateAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.AppParams) { // not required - return nil - } - - for i := 0; i < len(m.AppParams); i++ { - if swag.IsZero(m.AppParams[i]) { // not required - continue - } - - if m.AppParams[i] != nil { - if err := m.AppParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this active directory protection group object params based on the context it is used -func (m *ActiveDirectoryProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveDirectoryProtectionGroupObjectParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *ActiveDirectoryProtectionGroupObjectParams) contextValidateAppParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppParams); i++ { - - if m.AppParams[i] != nil { - - if swag.IsZero(m.AppParams[i]) { // not required - return nil - } - - if err := m.AppParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveDirectoryProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveDirectoryProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res ActiveDirectoryProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/active_sessions_count_params.go b/v2/models/active_sessions_count_params.go deleted file mode 100644 index 26446438..00000000 --- a/v2/models/active_sessions_count_params.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ActiveSessionsCountParams Specifies the number of sessions. -// -// swagger:model ActiveSessionsCountParams -type ActiveSessionsCountParams struct { - - // Specifies the aggregated sessions count for the user sessions returned. If sids are not given this returns the total system wide sessions count and if the sids are given, this returns the total sessions count for the given sids. - TotalSessionsCount int64 `json:"totalSessionsCount,omitempty"` - - // Specifies the sessions count per user. - SessionsPerUser []*UserSessionsCount `json:"sessionsPerUser,omitempty"` -} - -// Validate validates this active sessions count params -func (m *ActiveSessionsCountParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSessionsPerUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveSessionsCountParams) validateSessionsPerUser(formats strfmt.Registry) error { - if swag.IsZero(m.SessionsPerUser) { // not required - return nil - } - - for i := 0; i < len(m.SessionsPerUser); i++ { - if swag.IsZero(m.SessionsPerUser[i]) { // not required - continue - } - - if m.SessionsPerUser[i] != nil { - if err := m.SessionsPerUser[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionsPerUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionsPerUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this active sessions count params based on the context it is used -func (m *ActiveSessionsCountParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSessionsPerUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ActiveSessionsCountParams) contextValidateSessionsPerUser(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SessionsPerUser); i++ { - - if m.SessionsPerUser[i] != nil { - - if swag.IsZero(m.SessionsPerUser[i]) { // not required - return nil - } - - if err := m.SessionsPerUser[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionsPerUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionsPerUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ActiveSessionsCountParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ActiveSessionsCountParams) UnmarshalBinary(b []byte) error { - var res ActiveSessionsCountParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_auth_mapping.go b/v2/models/ad_auth_mapping.go deleted file mode 100644 index 4f698b3d..00000000 --- a/v2/models/ad_auth_mapping.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AdAuthMapping AD User Auth Mapping -// -// Describes AD user mapping options for certificate based authentication. -// -// swagger:model AdAuthMapping -type AdAuthMapping struct { - - // Specifies the auth field options - // Enum: ["SamAccountName","UserPrincipalName"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this ad auth mapping -func (m *AdAuthMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var adAuthMappingTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SamAccountName","UserPrincipalName"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - adAuthMappingTypeEnumPropEnum = append(adAuthMappingTypeEnumPropEnum, v) - } -} - -const ( - - // AdAuthMappingEnumSamAccountName captures enum value "SamAccountName" - AdAuthMappingEnumSamAccountName string = "SamAccountName" - - // AdAuthMappingEnumUserPrincipalName captures enum value "UserPrincipalName" - AdAuthMappingEnumUserPrincipalName string = "UserPrincipalName" -) - -// prop value enum -func (m *AdAuthMapping) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, adAuthMappingTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdAuthMapping) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ad auth mapping based on context it is used -func (m *AdAuthMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdAuthMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdAuthMapping) UnmarshalBinary(b []byte) error { - var res AdAuthMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_centrify_type_params.go b/v2/models/ad_centrify_type_params.go deleted file mode 100644 index 8da2ced3..00000000 --- a/v2/models/ad_centrify_type_params.go +++ /dev/null @@ -1,164 +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" -) - -// AdCentrifyTypeParams Specifies the properties associated to a Centrify type user id mapping. -// -// swagger:model AdCentrifyTypeParams -type AdCentrifyTypeParams struct { - CentrifyZone - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AdCentrifyTypeParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CentrifyZone - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CentrifyZone = aO0 - - // AO1 - var dataAO1 struct { - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.FallbackOption = dataAO1.FallbackOption - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AdCentrifyTypeParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CentrifyZone) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` - } - - dataAO1.FallbackOption = m.FallbackOption - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this ad centrify type params -func (m *AdCentrifyTypeParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CentrifyZone - if err := m.CentrifyZone.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdCentrifyTypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad centrify type params based on the context it is used -func (m *AdCentrifyTypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CentrifyZone - if err := m.CentrifyZone.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdCentrifyTypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdCentrifyTypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdCentrifyTypeParams) UnmarshalBinary(b []byte) error { - var res AdCentrifyTypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_custom_attributes_type_params.go b/v2/models/ad_custom_attributes_type_params.go deleted file mode 100644 index 362974ec..00000000 --- a/v2/models/ad_custom_attributes_type_params.go +++ /dev/null @@ -1,142 +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" -) - -// AdCustomAttributesTypeParams Specifies the properties accociated to a CustomAttributes type user id mapping. -// -// swagger:model AdCustomAttributesTypeParams -type AdCustomAttributesTypeParams struct { - - // Specifies the custom field name in Active Directory user properties to get the UID. - // Required: true - UIDAttrName *string `json:"uidAttrName"` - - // Specifies the custom field name in Active Directory user properties to get the GID. - // Required: true - GidAttrName *string `json:"gidAttrName"` - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// Validate validates this ad custom attributes type params -func (m *AdCustomAttributesTypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUIDAttrName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGidAttrName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdCustomAttributesTypeParams) validateUIDAttrName(formats strfmt.Registry) error { - - if err := validate.Required("uidAttrName", "body", m.UIDAttrName); err != nil { - return err - } - - return nil -} - -func (m *AdCustomAttributesTypeParams) validateGidAttrName(formats strfmt.Registry) error { - - if err := validate.Required("gidAttrName", "body", m.GidAttrName); err != nil { - return err - } - - return nil -} - -func (m *AdCustomAttributesTypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad custom attributes type params based on the context it is used -func (m *AdCustomAttributesTypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdCustomAttributesTypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdCustomAttributesTypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdCustomAttributesTypeParams) UnmarshalBinary(b []byte) error { - var res AdCustomAttributesTypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_fixed_type_params.go b/v2/models/ad_fixed_type_params.go deleted file mode 100644 index 0111d7df..00000000 --- a/v2/models/ad_fixed_type_params.go +++ /dev/null @@ -1,88 +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" -) - -// AdFixedTypeParams Specifies the properties accociated to a Fixed type user id mapping. -// -// swagger:model AdFixedTypeParams -type AdFixedTypeParams struct { - - // Specifies the fixed Unix UID, when mapping type is set to kFixed. - // Required: true - UID *int64 `json:"uid"` - - // Specifies the fixed Unix GID, when mapping type is set to kFixed. - // Required: true - Gid *int64 `json:"gid"` -} - -// Validate validates this ad fixed type params -func (m *AdFixedTypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGid(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdFixedTypeParams) validateUID(formats strfmt.Registry) error { - - if err := validate.Required("uid", "body", m.UID); err != nil { - return err - } - - return nil -} - -func (m *AdFixedTypeParams) validateGid(formats strfmt.Registry) error { - - if err := validate.Required("gid", "body", m.Gid); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ad fixed type params based on context it is used -func (m *AdFixedTypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdFixedTypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdFixedTypeParams) UnmarshalBinary(b []byte) error { - var res AdFixedTypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_ldap_provider_type_params.go b/v2/models/ad_ldap_provider_type_params.go deleted file mode 100644 index 2940388c..00000000 --- a/v2/models/ad_ldap_provider_type_params.go +++ /dev/null @@ -1,108 +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" -) - -// AdLdapProviderTypeParams Specifies the properties associated to a LdapProvider type user id mapping. -// -// swagger:model AdLdapProviderTypeParams -type AdLdapProviderTypeParams struct { - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// Validate validates this ad ldap provider type params -func (m *AdLdapProviderTypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdLdapProviderTypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad ldap provider type params based on the context it is used -func (m *AdLdapProviderTypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdLdapProviderTypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdLdapProviderTypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdLdapProviderTypeParams) UnmarshalBinary(b []byte) error { - var res AdLdapProviderTypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_nis_provider_type_params.go b/v2/models/ad_nis_provider_type_params.go deleted file mode 100644 index 7e52864a..00000000 --- a/v2/models/ad_nis_provider_type_params.go +++ /dev/null @@ -1,108 +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" -) - -// AdNisProviderTypeParams Specifies the properties associated to a NisProvider type user id mapping. -// -// swagger:model AdNisProviderTypeParams -type AdNisProviderTypeParams struct { - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// Validate validates this ad nis provider type params -func (m *AdNisProviderTypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdNisProviderTypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad nis provider type params based on the context it is used -func (m *AdNisProviderTypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdNisProviderTypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdNisProviderTypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdNisProviderTypeParams) UnmarshalBinary(b []byte) error { - var res AdNisProviderTypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_rfc2307_type_params.go b/v2/models/ad_rfc2307_type_params.go deleted file mode 100644 index fc6beef1..00000000 --- a/v2/models/ad_rfc2307_type_params.go +++ /dev/null @@ -1,108 +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" -) - -// AdRfc2307TypeParams Specifies the properties associated to a Rfc2307 type user id mapping. -// -// swagger:model AdRfc2307TypeParams -type AdRfc2307TypeParams struct { - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// Validate validates this ad rfc2307 type params -func (m *AdRfc2307TypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRfc2307TypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad rfc2307 type params based on the context it is used -func (m *AdRfc2307TypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdRfc2307TypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdRfc2307TypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdRfc2307TypeParams) UnmarshalBinary(b []byte) error { - var res AdRfc2307TypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ad_sfu30_type_params.go b/v2/models/ad_sfu30_type_params.go deleted file mode 100644 index 119c34b4..00000000 --- a/v2/models/ad_sfu30_type_params.go +++ /dev/null @@ -1,108 +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" -) - -// AdSfu30TypeParams Specifies the properties associated to a Sfu30 type user id mapping. -// -// swagger:model AdSfu30TypeParams -type AdSfu30TypeParams struct { - - // Specifies a fallback user id mapping param in case the primary config does not work. - // Required: true - FallbackOption *FallbackUserIDMappingParams `json:"fallbackOption"` -} - -// Validate validates this ad sfu30 type params -func (m *AdSfu30TypeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFallbackOption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdSfu30TypeParams) validateFallbackOption(formats strfmt.Registry) error { - - if err := validate.Required("fallbackOption", "body", m.FallbackOption); err != nil { - return err - } - - if m.FallbackOption != nil { - if err := m.FallbackOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ad sfu30 type params based on the context it is used -func (m *AdSfu30TypeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFallbackOption(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AdSfu30TypeParams) contextValidateFallbackOption(ctx context.Context, formats strfmt.Registry) error { - - if m.FallbackOption != nil { - - if err := m.FallbackOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fallbackOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fallbackOption") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AdSfu30TypeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdSfu30TypeParams) UnmarshalBinary(b []byte) error { - var res AdSfu30TypeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/add_dmaas_tenant_cert_request.go b/v2/models/add_dmaas_tenant_cert_request.go deleted file mode 100644 index 67d1fec7..00000000 --- a/v2/models/add_dmaas_tenant_cert_request.go +++ /dev/null @@ -1,127 +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" -) - -// AddDmaasTenantCertRequest Add Tenant Cert Request. -// -// Specifies the parameters to add an Orion tenant certificate. -// -// swagger:model AddDmaasTenantCertRequest -type AddDmaasTenantCertRequest struct { - - // The id of the tenant. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the tenant certificate. - // Required: true - Certificate *string `json:"certificate"` - - // Specifies the tenant private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // Specifies the CA chain that is used to sign the connector certificate. - // Required: true - ConnectorCaChain *string `json:"connectorCaChain"` - - // Specifies the passphrase used to encode the private key. - Passphrase *string `json:"passphrase,omitempty"` -} - -// Validate validates this add dmaas tenant cert request -func (m *AddDmaasTenantCertRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorCaChain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AddDmaasTenantCertRequest) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *AddDmaasTenantCertRequest) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -func (m *AddDmaasTenantCertRequest) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *AddDmaasTenantCertRequest) validateConnectorCaChain(formats strfmt.Registry) error { - - if err := validate.Required("connectorCaChain", "body", m.ConnectorCaChain); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add dmaas tenant cert request based on context it is used -func (m *AddDmaasTenantCertRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AddDmaasTenantCertRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddDmaasTenantCertRequest) UnmarshalBinary(b []byte) error { - var res AddDmaasTenantCertRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/add_remote_disk_response_body.go b/v2/models/add_remote_disk_response_body.go deleted file mode 100644 index 84692461..00000000 --- a/v2/models/add_remote_disk_response_body.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AddRemoteDiskResponseBody Specifies the response of creating remote disk. -// -// swagger:model AddRemoteDiskResponseBody -type AddRemoteDiskResponseBody struct { - - // Specifies a list of remote disk creating status. - RemoteDisks []*CreateRemoteDiskStatus `json:"remoteDisks"` -} - -// Validate validates this add remote disk response body -func (m *AddRemoteDiskResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AddRemoteDiskResponseBody) validateRemoteDisks(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteDisks) { // not required - return nil - } - - for i := 0; i < len(m.RemoteDisks); i++ { - if swag.IsZero(m.RemoteDisks[i]) { // not required - continue - } - - if m.RemoteDisks[i] != nil { - if err := m.RemoteDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this add remote disk response body based on the context it is used -func (m *AddRemoteDiskResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AddRemoteDiskResponseBody) contextValidateRemoteDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteDisks); i++ { - - if m.RemoteDisks[i] != nil { - - if swag.IsZero(m.RemoteDisks[i]) { // not required - return nil - } - - if err := m.RemoteDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AddRemoteDiskResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AddRemoteDiskResponseBody) UnmarshalBinary(b []byte) error { - var res AddRemoteDiskResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/advanced_settings.go b/v2/models/advanced_settings.go deleted file mode 100644 index 11d2de31..00000000 --- a/v2/models/advanced_settings.go +++ /dev/null @@ -1,373 +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" -) - -// AdvancedSettings This is used to regulate certain gflag values from the UI. The values passed by the user from the UI will be used for the respective gflags. -// -// swagger:model AdvancedSettings -type AdvancedSettings struct { - - // Fail the backup job when the database is missing. The database may be missing if it is deleted or corrupted. - // Enum: ["kError","kWarn","kIgnore"] - MissingDbBackupStatus *string `json:"missingDbBackupStatus,omitempty"` - - // Whether to report error for all dbs in non-autoprotect jobs. - // Enum: ["kError","kWarn","kIgnore"] - ReportAllNonAutoprotectDbErrors *string `json:"reportAllNonAutoprotectDbErrors,omitempty"` - - // Fail the backup job when database is offline or restoring. - // Enum: ["kError","kWarn","kIgnore"] - OfflineRestoringDbBackupStatus *string `json:"offlineRestoringDbBackupStatus,omitempty"` - - // Whether to report error if SQL database is cloned. - // Enum: ["kError","kWarn","kIgnore"] - ClonedDbBackupStatus *string `json:"clonedDbBackupStatus,omitempty"` - - // Whether to report error if SQL database is not online. - // Enum: ["kError","kWarn","kIgnore"] - DbBackupIfNotOnlineStatus *string `json:"dbBackupIfNotOnlineStatus,omitempty"` - - // Whether to skip backup for read-only SQL databases. - // Enum: ["kError","kWarn","kIgnore"] - ReadOnlyDbBackupStatus *string `json:"readOnlyDbBackupStatus,omitempty"` -} - -// Validate validates this advanced settings -func (m *AdvancedSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMissingDbBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReportAllNonAutoprotectDbErrors(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOfflineRestoringDbBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClonedDbBackupStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbBackupIfNotOnlineStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReadOnlyDbBackupStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var advancedSettingsTypeMissingDbBackupStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeMissingDbBackupStatusPropEnum = append(advancedSettingsTypeMissingDbBackupStatusPropEnum, v) - } -} - -const ( - - // AdvancedSettingsMissingDbBackupStatusKError captures enum value "kError" - AdvancedSettingsMissingDbBackupStatusKError string = "kError" - - // AdvancedSettingsMissingDbBackupStatusKWarn captures enum value "kWarn" - AdvancedSettingsMissingDbBackupStatusKWarn string = "kWarn" - - // AdvancedSettingsMissingDbBackupStatusKIgnore captures enum value "kIgnore" - AdvancedSettingsMissingDbBackupStatusKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateMissingDbBackupStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeMissingDbBackupStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateMissingDbBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.MissingDbBackupStatus) { // not required - return nil - } - - // value enum - if err := m.validateMissingDbBackupStatusEnum("missingDbBackupStatus", "body", *m.MissingDbBackupStatus); err != nil { - return err - } - - return nil -} - -var advancedSettingsTypeReportAllNonAutoprotectDbErrorsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeReportAllNonAutoprotectDbErrorsPropEnum = append(advancedSettingsTypeReportAllNonAutoprotectDbErrorsPropEnum, v) - } -} - -const ( - - // AdvancedSettingsReportAllNonAutoprotectDbErrorsKError captures enum value "kError" - AdvancedSettingsReportAllNonAutoprotectDbErrorsKError string = "kError" - - // AdvancedSettingsReportAllNonAutoprotectDbErrorsKWarn captures enum value "kWarn" - AdvancedSettingsReportAllNonAutoprotectDbErrorsKWarn string = "kWarn" - - // AdvancedSettingsReportAllNonAutoprotectDbErrorsKIgnore captures enum value "kIgnore" - AdvancedSettingsReportAllNonAutoprotectDbErrorsKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateReportAllNonAutoprotectDbErrorsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeReportAllNonAutoprotectDbErrorsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateReportAllNonAutoprotectDbErrors(formats strfmt.Registry) error { - if swag.IsZero(m.ReportAllNonAutoprotectDbErrors) { // not required - return nil - } - - // value enum - if err := m.validateReportAllNonAutoprotectDbErrorsEnum("reportAllNonAutoprotectDbErrors", "body", *m.ReportAllNonAutoprotectDbErrors); err != nil { - return err - } - - return nil -} - -var advancedSettingsTypeOfflineRestoringDbBackupStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeOfflineRestoringDbBackupStatusPropEnum = append(advancedSettingsTypeOfflineRestoringDbBackupStatusPropEnum, v) - } -} - -const ( - - // AdvancedSettingsOfflineRestoringDbBackupStatusKError captures enum value "kError" - AdvancedSettingsOfflineRestoringDbBackupStatusKError string = "kError" - - // AdvancedSettingsOfflineRestoringDbBackupStatusKWarn captures enum value "kWarn" - AdvancedSettingsOfflineRestoringDbBackupStatusKWarn string = "kWarn" - - // AdvancedSettingsOfflineRestoringDbBackupStatusKIgnore captures enum value "kIgnore" - AdvancedSettingsOfflineRestoringDbBackupStatusKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateOfflineRestoringDbBackupStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeOfflineRestoringDbBackupStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateOfflineRestoringDbBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.OfflineRestoringDbBackupStatus) { // not required - return nil - } - - // value enum - if err := m.validateOfflineRestoringDbBackupStatusEnum("offlineRestoringDbBackupStatus", "body", *m.OfflineRestoringDbBackupStatus); err != nil { - return err - } - - return nil -} - -var advancedSettingsTypeClonedDbBackupStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeClonedDbBackupStatusPropEnum = append(advancedSettingsTypeClonedDbBackupStatusPropEnum, v) - } -} - -const ( - - // AdvancedSettingsClonedDbBackupStatusKError captures enum value "kError" - AdvancedSettingsClonedDbBackupStatusKError string = "kError" - - // AdvancedSettingsClonedDbBackupStatusKWarn captures enum value "kWarn" - AdvancedSettingsClonedDbBackupStatusKWarn string = "kWarn" - - // AdvancedSettingsClonedDbBackupStatusKIgnore captures enum value "kIgnore" - AdvancedSettingsClonedDbBackupStatusKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateClonedDbBackupStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeClonedDbBackupStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateClonedDbBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ClonedDbBackupStatus) { // not required - return nil - } - - // value enum - if err := m.validateClonedDbBackupStatusEnum("clonedDbBackupStatus", "body", *m.ClonedDbBackupStatus); err != nil { - return err - } - - return nil -} - -var advancedSettingsTypeDbBackupIfNotOnlineStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeDbBackupIfNotOnlineStatusPropEnum = append(advancedSettingsTypeDbBackupIfNotOnlineStatusPropEnum, v) - } -} - -const ( - - // AdvancedSettingsDbBackupIfNotOnlineStatusKError captures enum value "kError" - AdvancedSettingsDbBackupIfNotOnlineStatusKError string = "kError" - - // AdvancedSettingsDbBackupIfNotOnlineStatusKWarn captures enum value "kWarn" - AdvancedSettingsDbBackupIfNotOnlineStatusKWarn string = "kWarn" - - // AdvancedSettingsDbBackupIfNotOnlineStatusKIgnore captures enum value "kIgnore" - AdvancedSettingsDbBackupIfNotOnlineStatusKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateDbBackupIfNotOnlineStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeDbBackupIfNotOnlineStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateDbBackupIfNotOnlineStatus(formats strfmt.Registry) error { - if swag.IsZero(m.DbBackupIfNotOnlineStatus) { // not required - return nil - } - - // value enum - if err := m.validateDbBackupIfNotOnlineStatusEnum("dbBackupIfNotOnlineStatus", "body", *m.DbBackupIfNotOnlineStatus); err != nil { - return err - } - - return nil -} - -var advancedSettingsTypeReadOnlyDbBackupStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - advancedSettingsTypeReadOnlyDbBackupStatusPropEnum = append(advancedSettingsTypeReadOnlyDbBackupStatusPropEnum, v) - } -} - -const ( - - // AdvancedSettingsReadOnlyDbBackupStatusKError captures enum value "kError" - AdvancedSettingsReadOnlyDbBackupStatusKError string = "kError" - - // AdvancedSettingsReadOnlyDbBackupStatusKWarn captures enum value "kWarn" - AdvancedSettingsReadOnlyDbBackupStatusKWarn string = "kWarn" - - // AdvancedSettingsReadOnlyDbBackupStatusKIgnore captures enum value "kIgnore" - AdvancedSettingsReadOnlyDbBackupStatusKIgnore string = "kIgnore" -) - -// prop value enum -func (m *AdvancedSettings) validateReadOnlyDbBackupStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, advancedSettingsTypeReadOnlyDbBackupStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AdvancedSettings) validateReadOnlyDbBackupStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ReadOnlyDbBackupStatus) { // not required - return nil - } - - // value enum - if err := m.validateReadOnlyDbBackupStatusEnum("readOnlyDbBackupStatus", "body", *m.ReadOnlyDbBackupStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this advanced settings based on context it is used -func (m *AdvancedSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AdvancedSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AdvancedSettings) UnmarshalBinary(b []byte) error { - var res AdvancedSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_info_object.go b/v2/models/agent_info_object.go deleted file mode 100644 index 77f04068..00000000 --- a/v2/models/agent_info_object.go +++ /dev/null @@ -1,182 +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" -) - -// AgentInfoObject Specifies the upgrade state of the agent. -// -// swagger:model AgentInfoObject -type AgentInfoObject struct { - - // Specifies the name of the source where the agent is installed. - Name *string `json:"name,omitempty"` - - // Specifies the software version of the agent before upgrade. - PreviousSoftwareVersion *string `json:"previousSoftwareVersion,omitempty"` - - // Specifies the upgrade status of the agent.
'Scheduled' indicates that upgrade for the agent is yet to start.
'Started' indicates that upgrade for the agent is started.
'Succeeded' indicates that agent was upgraded successfully.
'Failed' indicates that upgrade for the agent has failed.
'Skipped' indicates that upgrade for the agent was skipped. - // Enum: ["Scheduled","Started","Succeeded","Failed","Skipped"] - Status *string `json:"status,omitempty"` - - // Specifies the time when the upgrade for an agent started as a Unix epoch Timestamp (in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the time when the upgrade for an agent completed as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the error during upgrade for an agent. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this agent info object -func (m *AgentInfoObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var agentInfoObjectTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Scheduled","Started","Succeeded","Failed","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInfoObjectTypeStatusPropEnum = append(agentInfoObjectTypeStatusPropEnum, v) - } -} - -const ( - - // AgentInfoObjectStatusScheduled captures enum value "Scheduled" - AgentInfoObjectStatusScheduled string = "Scheduled" - - // AgentInfoObjectStatusStarted captures enum value "Started" - AgentInfoObjectStatusStarted string = "Started" - - // AgentInfoObjectStatusSucceeded captures enum value "Succeeded" - AgentInfoObjectStatusSucceeded string = "Succeeded" - - // AgentInfoObjectStatusFailed captures enum value "Failed" - AgentInfoObjectStatusFailed string = "Failed" - - // AgentInfoObjectStatusSkipped captures enum value "Skipped" - AgentInfoObjectStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *AgentInfoObject) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInfoObjectTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInfoObject) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *AgentInfoObject) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this agent info object based on the context it is used -func (m *AgentInfoObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentInfoObject) 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 -} - -// MarshalBinary interface implementation -func (m *AgentInfoObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentInfoObject) UnmarshalBinary(b []byte) error { - var res AgentInfoObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_information.go b/v2/models/agent_information.go deleted file mode 100644 index a7c7dafa..00000000 --- a/v2/models/agent_information.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AgentInformation Specifies the agent details. -// -// swagger:model AgentInformation -type AgentInformation struct { - - // Specifies the status of agent connection. - // Enum: ["Unknown","Healthy","Unregistered","Unreachable","Unhealthy","Error"] - ConnectionStatus *string `json:"connectionStatus,omitempty"` - - // Specifies the whether agent version is compatible with cluster version ro use various features. - // Enum: ["Supported","Upgrade","Unsupported"] - SupportStatus *string `json:"supportStatus,omitempty"` - - // Specifies the software version of the agent - AgentSwVersion *string `json:"agentSwVersion,omitempty"` - - // Specifies the time in usecs when the last agent info was fetched. - LastFetchedTimeInUsecs *int64 `json:"lastFetchedTimeInUsecs,omitempty"` - - // Specifies the list of host checks and its results. - HostSettingChecks []*HostSettingCheck `json:"hostSettingChecks"` -} - -// Validate validates this agent information -func (m *AgentInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSupportStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostSettingChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var agentInformationTypeConnectionStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Unknown","Healthy","Unregistered","Unreachable","Unhealthy","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeConnectionStatusPropEnum = append(agentInformationTypeConnectionStatusPropEnum, v) - } -} - -const ( - - // AgentInformationConnectionStatusUnknown captures enum value "Unknown" - AgentInformationConnectionStatusUnknown string = "Unknown" - - // AgentInformationConnectionStatusHealthy captures enum value "Healthy" - AgentInformationConnectionStatusHealthy string = "Healthy" - - // AgentInformationConnectionStatusUnregistered captures enum value "Unregistered" - AgentInformationConnectionStatusUnregistered string = "Unregistered" - - // AgentInformationConnectionStatusUnreachable captures enum value "Unreachable" - AgentInformationConnectionStatusUnreachable string = "Unreachable" - - // AgentInformationConnectionStatusUnhealthy captures enum value "Unhealthy" - AgentInformationConnectionStatusUnhealthy string = "Unhealthy" - - // AgentInformationConnectionStatusError captures enum value "Error" - AgentInformationConnectionStatusError string = "Error" -) - -// prop value enum -func (m *AgentInformation) validateConnectionStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeConnectionStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateConnectionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - // value enum - if err := m.validateConnectionStatusEnum("connectionStatus", "body", *m.ConnectionStatus); err != nil { - return err - } - - return nil -} - -var agentInformationTypeSupportStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Supported","Upgrade","Unsupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentInformationTypeSupportStatusPropEnum = append(agentInformationTypeSupportStatusPropEnum, v) - } -} - -const ( - - // AgentInformationSupportStatusSupported captures enum value "Supported" - AgentInformationSupportStatusSupported string = "Supported" - - // AgentInformationSupportStatusUpgrade captures enum value "Upgrade" - AgentInformationSupportStatusUpgrade string = "Upgrade" - - // AgentInformationSupportStatusUnsupported captures enum value "Unsupported" - AgentInformationSupportStatusUnsupported string = "Unsupported" -) - -// prop value enum -func (m *AgentInformation) validateSupportStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentInformationTypeSupportStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentInformation) validateSupportStatus(formats strfmt.Registry) error { - if swag.IsZero(m.SupportStatus) { // not required - return nil - } - - // value enum - if err := m.validateSupportStatusEnum("supportStatus", "body", *m.SupportStatus); err != nil { - return err - } - - return nil -} - -func (m *AgentInformation) validateHostSettingChecks(formats strfmt.Registry) error { - if swag.IsZero(m.HostSettingChecks) { // not required - return nil - } - - for i := 0; i < len(m.HostSettingChecks); i++ { - if swag.IsZero(m.HostSettingChecks[i]) { // not required - continue - } - - if m.HostSettingChecks[i] != nil { - if err := m.HostSettingChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this agent information based on the context it is used -func (m *AgentInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostSettingChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentInformation) contextValidateHostSettingChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostSettingChecks); i++ { - - if m.HostSettingChecks[i] != nil { - - if swag.IsZero(m.HostSettingChecks[i]) { // not required - return nil - } - - if err := m.HostSettingChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostSettingChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostSettingChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AgentInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentInformation) UnmarshalBinary(b []byte) error { - var res AgentInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_upgrade_info_object.go b/v2/models/agent_upgrade_info_object.go deleted file mode 100644 index 74782864..00000000 --- a/v2/models/agent_upgrade_info_object.go +++ /dev/null @@ -1,112 +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" -) - -// AgentUpgradeInfoObject Specifies the agent upgrade state. -// -// swagger:model AgentUpgradeInfoObject -type AgentUpgradeInfoObject struct { - - // Specifies the ID of the agent. - ID *int64 `json:"id,omitempty"` - - // Specifies the agent status object. - Info *AgentInfoObject `json:"info,omitempty"` -} - -// Validate validates this agent upgrade info object -func (m *AgentUpgradeInfoObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeInfoObject) validateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.Info) { // not required - return nil - } - - if m.Info != nil { - if err := m.Info.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info") - } - return err - } - } - - return nil -} - -// ContextValidate validate this agent upgrade info object based on the context it is used -func (m *AgentUpgradeInfoObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeInfoObject) contextValidateInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.Info != nil { - - if swag.IsZero(m.Info) { // not required - return nil - } - - if err := m.Info.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeInfoObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeInfoObject) UnmarshalBinary(b []byte) error { - var res AgentUpgradeInfoObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_upgrade_task_action_object.go b/v2/models/agent_upgrade_task_action_object.go deleted file mode 100644 index e85b3ea0..00000000 --- a/v2/models/agent_upgrade_task_action_object.go +++ /dev/null @@ -1,109 +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" -) - -// AgentUpgradeTaskActionObject Specifies the action on an upgrade task. -// -// swagger:model AgentUpgradeTaskActionObject -type AgentUpgradeTaskActionObject struct { - - // Specifies the error in case the action fails. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this agent upgrade task action object -func (m *AgentUpgradeTaskActionObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeTaskActionObject) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this agent upgrade task action object based on the context it is used -func (m *AgentUpgradeTaskActionObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeTaskActionObject) 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 -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeTaskActionObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeTaskActionObject) UnmarshalBinary(b []byte) error { - var res AgentUpgradeTaskActionObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_upgrade_task_action_request.go b/v2/models/agent_upgrade_task_action_request.go deleted file mode 100644 index 5de55706..00000000 --- a/v2/models/agent_upgrade_task_action_request.go +++ /dev/null @@ -1,110 +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" -) - -// AgentUpgradeTaskActionRequest Upgrade task action params -// -// Specifies the params to perform an action on an agent upgrade task. -// -// swagger:model AgentUpgradeTaskActionRequest -type AgentUpgradeTaskActionRequest struct { - - // Specifies the action type.
'Cancel' indicates that the upgrade task needs to be cancelled. - // Enum: ["Retry","Cancel"] - Action *string `json:"action,omitempty"` - - // Specifies the ID of the task. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this agent upgrade task action request -func (m *AgentUpgradeTaskActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var agentUpgradeTaskActionRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Retry","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentUpgradeTaskActionRequestTypeActionPropEnum = append(agentUpgradeTaskActionRequestTypeActionPropEnum, v) - } -} - -const ( - - // AgentUpgradeTaskActionRequestActionRetry captures enum value "Retry" - AgentUpgradeTaskActionRequestActionRetry string = "Retry" - - // AgentUpgradeTaskActionRequestActionCancel captures enum value "Cancel" - AgentUpgradeTaskActionRequestActionCancel string = "Cancel" -) - -// prop value enum -func (m *AgentUpgradeTaskActionRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentUpgradeTaskActionRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentUpgradeTaskActionRequest) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this agent upgrade task action request based on context it is used -func (m *AgentUpgradeTaskActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeTaskActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeTaskActionRequest) UnmarshalBinary(b []byte) error { - var res AgentUpgradeTaskActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_upgrade_task_state.go b/v2/models/agent_upgrade_task_state.go deleted file mode 100644 index f9732113..00000000 --- a/v2/models/agent_upgrade_task_state.go +++ /dev/null @@ -1,324 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AgentUpgradeTaskState Agent upgrade task state -// -// Specifies the state of an agent upgrade task. -// -// swagger:model AgentUpgradeTaskState -type AgentUpgradeTaskState struct { - - // Specifies the name of the task. - Name *string `json:"name,omitempty"` - - // Specifies the description of the task. - Description *string `json:"description,omitempty"` - - // Specifies the ID of the task. - ID *int64 `json:"id,omitempty"` - - // Specifies the time, as a Unix epoch timestamp in microseconds, when the task started execution. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the time when the upgrade task completed execution as a Unix epoch Timestamp (in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the status of the task.
'Scheduled' indicates that the upgrade task is yet to start.
'Running' indicates that the upgrade task has started execution.
'Succeeded' indicates that the upgrade task completed without an error.
'Failed' indicates that upgrade has failed for all agents. 'PartiallyFailed' indicates that upgrade has failed for some agents. - // Enum: ["Scheduled","Running","Succeeded","Failed","PartiallyFailed","Canceled"] - Status *string `json:"status,omitempty"` - - // Specifies the agents upgraded in the task. - AgentIDs []int64 `json:"agentIDs"` - - // Specifies the version to which agents are upgraded. - ClusterVersion *string `json:"clusterVersion,omitempty"` - - // Specifes the type of task.
'Auto' indicates an auto agent upgrade task which is started after a cluster upgrade.
'Manual' indicates a schedule based agent upgrade task.
'Retry' indicates an agent upgrade task which was retried. - // Enum: ["Auto","Manual","Retry"] - Type *string `json:"type,omitempty"` - - // Specifies the time when the task should start execution as a Unix epoch Timestamp (in microseconds). If no schedule is specified, the task will start immediately. - ScheduleTimeUsecs *int64 `json:"scheduleTimeUsecs,omitempty"` - - // Specifies the time before which the upgrade task should start execution as a Unix epoch Timestamp (in microseconds). If this is not specified the task will start anytime after scheduleTimeUsecs. - ScheduleEndTimeUsecs *int64 `json:"scheduleEndTimeUsecs,omitempty"` - - // Specifies ID of a task which was retried if type is 'Retry'. - RetriedTaskID *int64 `json:"retriedTaskID,omitempty"` - - // Specifies if a task can be retried. - IsRetryable *bool `json:"isRetryable,omitempty"` - - // Specifies a task level error. - Error *Error `json:"error,omitempty"` - - // Specifies the upgrade information for each agent. - Agents []*AgentUpgradeInfoObject `json:"agents"` -} - -// Validate validates this agent upgrade task state -func (m *AgentUpgradeTaskState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgents(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var agentUpgradeTaskStateTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Scheduled","Running","Succeeded","Failed","PartiallyFailed","Canceled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentUpgradeTaskStateTypeStatusPropEnum = append(agentUpgradeTaskStateTypeStatusPropEnum, v) - } -} - -const ( - - // AgentUpgradeTaskStateStatusScheduled captures enum value "Scheduled" - AgentUpgradeTaskStateStatusScheduled string = "Scheduled" - - // AgentUpgradeTaskStateStatusRunning captures enum value "Running" - AgentUpgradeTaskStateStatusRunning string = "Running" - - // AgentUpgradeTaskStateStatusSucceeded captures enum value "Succeeded" - AgentUpgradeTaskStateStatusSucceeded string = "Succeeded" - - // AgentUpgradeTaskStateStatusFailed captures enum value "Failed" - AgentUpgradeTaskStateStatusFailed string = "Failed" - - // AgentUpgradeTaskStateStatusPartiallyFailed captures enum value "PartiallyFailed" - AgentUpgradeTaskStateStatusPartiallyFailed string = "PartiallyFailed" - - // AgentUpgradeTaskStateStatusCanceled captures enum value "Canceled" - AgentUpgradeTaskStateStatusCanceled string = "Canceled" -) - -// prop value enum -func (m *AgentUpgradeTaskState) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentUpgradeTaskStateTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentUpgradeTaskState) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var agentUpgradeTaskStateTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Auto","Manual","Retry"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - agentUpgradeTaskStateTypeTypePropEnum = append(agentUpgradeTaskStateTypeTypePropEnum, v) - } -} - -const ( - - // AgentUpgradeTaskStateTypeAuto captures enum value "Auto" - AgentUpgradeTaskStateTypeAuto string = "Auto" - - // AgentUpgradeTaskStateTypeManual captures enum value "Manual" - AgentUpgradeTaskStateTypeManual string = "Manual" - - // AgentUpgradeTaskStateTypeRetry captures enum value "Retry" - AgentUpgradeTaskStateTypeRetry string = "Retry" -) - -// prop value enum -func (m *AgentUpgradeTaskState) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, agentUpgradeTaskStateTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AgentUpgradeTaskState) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *AgentUpgradeTaskState) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *AgentUpgradeTaskState) validateAgents(formats strfmt.Registry) error { - if swag.IsZero(m.Agents) { // not required - return nil - } - - for i := 0; i < len(m.Agents); i++ { - if swag.IsZero(m.Agents[i]) { // not required - continue - } - - if m.Agents[i] != nil { - if err := m.Agents[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this agent upgrade task state based on the context it is used -func (m *AgentUpgradeTaskState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgents(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeTaskState) 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 -} - -func (m *AgentUpgradeTaskState) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Agents); i++ { - - if m.Agents[i] != nil { - - if swag.IsZero(m.Agents[i]) { // not required - return nil - } - - if err := m.Agents[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agents" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agents" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeTaskState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeTaskState) UnmarshalBinary(b []byte) error { - var res AgentUpgradeTaskState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/agent_upgrade_task_states.go b/v2/models/agent_upgrade_task_states.go deleted file mode 100644 index 9c8cbc6b..00000000 --- a/v2/models/agent_upgrade_task_states.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AgentUpgradeTaskStates Agent upgrade task list -// -// List of agent upgrade tasks. -// -// swagger:model AgentUpgradeTaskStates -type AgentUpgradeTaskStates struct { - - // Specifies the list of agent upgrade tasks. - Tasks []*AgentUpgradeTaskState `json:"tasks"` -} - -// Validate validates this agent upgrade task states -func (m *AgentUpgradeTaskStates) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeTaskStates) validateTasks(formats strfmt.Registry) error { - if swag.IsZero(m.Tasks) { // not required - return nil - } - - for i := 0; i < len(m.Tasks); i++ { - if swag.IsZero(m.Tasks[i]) { // not required - continue - } - - if m.Tasks[i] != nil { - if err := m.Tasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this agent upgrade task states based on the context it is used -func (m *AgentUpgradeTaskStates) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AgentUpgradeTaskStates) contextValidateTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tasks); i++ { - - if m.Tasks[i] != nil { - - if swag.IsZero(m.Tasks[i]) { // not required - return nil - } - - if err := m.Tasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AgentUpgradeTaskStates) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AgentUpgradeTaskStates) UnmarshalBinary(b []byte) error { - var res AgentUpgradeTaskStates - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/airgap_config.go b/v2/models/airgap_config.go deleted file mode 100644 index fd723c13..00000000 --- a/v2/models/airgap_config.go +++ /dev/null @@ -1,110 +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" -) - -// AirgapConfig Airgap configuration -// -// Specifies the Airgap configuration. -// -// swagger:model AirgapConfig -type AirgapConfig struct { - - // Specifies Airgap should be enabled or disabled. - // Enum: ["Enable","Disable"] - AirgapStatus *string `json:"airgapStatus,omitempty"` - - // Specifies the firewall profiles allowed when Airgap is enabled. - ExceptionProfiles []string `json:"exceptionProfiles,omitempty"` -} - -// Validate validates this airgap config -func (m *AirgapConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAirgapStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var airgapConfigTypeAirgapStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Enable","Disable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - airgapConfigTypeAirgapStatusPropEnum = append(airgapConfigTypeAirgapStatusPropEnum, v) - } -} - -const ( - - // AirgapConfigAirgapStatusEnable captures enum value "Enable" - AirgapConfigAirgapStatusEnable string = "Enable" - - // AirgapConfigAirgapStatusDisable captures enum value "Disable" - AirgapConfigAirgapStatusDisable string = "Disable" -) - -// prop value enum -func (m *AirgapConfig) validateAirgapStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, airgapConfigTypeAirgapStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AirgapConfig) validateAirgapStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AirgapStatus) { // not required - return nil - } - - // value enum - if err := m.validateAirgapStatusEnum("airgapStatus", "body", *m.AirgapStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this airgap config based on context it is used -func (m *AirgapConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AirgapConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AirgapConfig) UnmarshalBinary(b []byte) error { - var res AirgapConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/airgap_status.go b/v2/models/airgap_status.go deleted file mode 100644 index c7e9ee54..00000000 --- a/v2/models/airgap_status.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AirgapStatus Airgap Status. -// -// Specifies the airgap statuss in a cluster. -// -// swagger:model AirgapStatus -type AirgapStatus struct { - - // Specifies the list of airgap statuses. - // Enum: ["Enable","Disable"] - Value string `json:"value,omitempty"` -} - -// Validate validates this airgap status -func (m *AirgapStatus) 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 airgapStatusTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Enable","Disable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - airgapStatusTypeValuePropEnum = append(airgapStatusTypeValuePropEnum, v) - } -} - -const ( - - // AirgapStatusValueEnable captures enum value "Enable" - AirgapStatusValueEnable string = "Enable" - - // AirgapStatusValueDisable captures enum value "Disable" - AirgapStatusValueDisable string = "Disable" -) - -// prop value enum -func (m *AirgapStatus) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, airgapStatusTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AirgapStatus) 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 airgap status based on context it is used -func (m *AirgapStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AirgapStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AirgapStatus) UnmarshalBinary(b []byte) error { - var res AirgapStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aix_agent_params.go b/v2/models/aix_agent_params.go deleted file mode 100644 index 79b378a2..00000000 --- a/v2/models/aix_agent_params.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AixAgentParams Aix agent parameters. -// -// swagger:model AixAgentParams -type AixAgentParams struct { - - // Specifies the type of agent. - // Required: true - // Enum: ["kGo","kJava"] - AgentType *string `json:"agentType"` -} - -// Validate validates this aix agent params -func (m *AixAgentParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgentType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var aixAgentParamsTypeAgentTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGo","kJava"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - aixAgentParamsTypeAgentTypePropEnum = append(aixAgentParamsTypeAgentTypePropEnum, v) - } -} - -const ( - - // AixAgentParamsAgentTypeKGo captures enum value "kGo" - AixAgentParamsAgentTypeKGo string = "kGo" - - // AixAgentParamsAgentTypeKJava captures enum value "kJava" - AixAgentParamsAgentTypeKJava string = "kJava" -) - -// prop value enum -func (m *AixAgentParams) validateAgentTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, aixAgentParamsTypeAgentTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AixAgentParams) validateAgentType(formats strfmt.Registry) error { - - if err := validate.Required("agentType", "body", m.AgentType); err != nil { - return err - } - - // value enum - if err := m.validateAgentTypeEnum("agentType", "body", *m.AgentType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aix agent params based on context it is used -func (m *AixAgentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AixAgentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AixAgentParams) UnmarshalBinary(b []byte) error { - var res AixAgentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/alert_group_summary.go b/v2/models/alert_group_summary.go deleted file mode 100644 index 45508672..00000000 --- a/v2/models/alert_group_summary.go +++ /dev/null @@ -1,219 +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" -) - -// AlertGroupSummary Specifies alerts summary grouped for an alert category. -// -// swagger:model AlertGroupSummary -type AlertGroupSummary struct { - - // Category of alerts by which summary is grouped. - // Enum: ["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"] - Category string `json:"category,omitempty"` - - // Type/bucket that this alert category belongs to. - Type string `json:"type,omitempty"` - - // Specifies count of warning alerts. - WarningCount *int64 `json:"warningCount,omitempty"` - - // Specifies count of critical alerts. - CriticalCount *int64 `json:"criticalCount,omitempty"` - - // Specifies count of info alerts. - InfoCount *int64 `json:"infoCount,omitempty"` - - // Specifies count of total alerts. - TotalCount *int64 `json:"totalCount,omitempty"` -} - -// Validate validates this alert group summary -func (m *AlertGroupSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var alertGroupSummaryTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisk","kNode","kCluster","kChassis","kPowerSupply","kCPU","kMemory","kTemperature","kFan","kNIC","kFirmware","kNodeHealth","kOperatingSystem","kDataPath","kMetadata","kIndexing","kHelios","kAppMarketPlace","kSystemService","kLicense","kSecurity","kUpgrade","kClusterManagement","kAuditLog","kNetworking","kConfiguration","kStorageUsage","kFaultTolerance","kBackupRestore","kArchivalRestore","kRemoteReplication","kQuota","kCDP","kViewFailover","kDisasterRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertGroupSummaryTypeCategoryPropEnum = append(alertGroupSummaryTypeCategoryPropEnum, v) - } -} - -const ( - - // AlertGroupSummaryCategoryKDisk captures enum value "kDisk" - AlertGroupSummaryCategoryKDisk string = "kDisk" - - // AlertGroupSummaryCategoryKNode captures enum value "kNode" - AlertGroupSummaryCategoryKNode string = "kNode" - - // AlertGroupSummaryCategoryKCluster captures enum value "kCluster" - AlertGroupSummaryCategoryKCluster string = "kCluster" - - // AlertGroupSummaryCategoryKChassis captures enum value "kChassis" - AlertGroupSummaryCategoryKChassis string = "kChassis" - - // AlertGroupSummaryCategoryKPowerSupply captures enum value "kPowerSupply" - AlertGroupSummaryCategoryKPowerSupply string = "kPowerSupply" - - // AlertGroupSummaryCategoryKCPU captures enum value "kCPU" - AlertGroupSummaryCategoryKCPU string = "kCPU" - - // AlertGroupSummaryCategoryKMemory captures enum value "kMemory" - AlertGroupSummaryCategoryKMemory string = "kMemory" - - // AlertGroupSummaryCategoryKTemperature captures enum value "kTemperature" - AlertGroupSummaryCategoryKTemperature string = "kTemperature" - - // AlertGroupSummaryCategoryKFan captures enum value "kFan" - AlertGroupSummaryCategoryKFan string = "kFan" - - // AlertGroupSummaryCategoryKNIC captures enum value "kNIC" - AlertGroupSummaryCategoryKNIC string = "kNIC" - - // AlertGroupSummaryCategoryKFirmware captures enum value "kFirmware" - AlertGroupSummaryCategoryKFirmware string = "kFirmware" - - // AlertGroupSummaryCategoryKNodeHealth captures enum value "kNodeHealth" - AlertGroupSummaryCategoryKNodeHealth string = "kNodeHealth" - - // AlertGroupSummaryCategoryKOperatingSystem captures enum value "kOperatingSystem" - AlertGroupSummaryCategoryKOperatingSystem string = "kOperatingSystem" - - // AlertGroupSummaryCategoryKDataPath captures enum value "kDataPath" - AlertGroupSummaryCategoryKDataPath string = "kDataPath" - - // AlertGroupSummaryCategoryKMetadata captures enum value "kMetadata" - AlertGroupSummaryCategoryKMetadata string = "kMetadata" - - // AlertGroupSummaryCategoryKIndexing captures enum value "kIndexing" - AlertGroupSummaryCategoryKIndexing string = "kIndexing" - - // AlertGroupSummaryCategoryKHelios captures enum value "kHelios" - AlertGroupSummaryCategoryKHelios string = "kHelios" - - // AlertGroupSummaryCategoryKAppMarketPlace captures enum value "kAppMarketPlace" - AlertGroupSummaryCategoryKAppMarketPlace string = "kAppMarketPlace" - - // AlertGroupSummaryCategoryKSystemService captures enum value "kSystemService" - AlertGroupSummaryCategoryKSystemService string = "kSystemService" - - // AlertGroupSummaryCategoryKLicense captures enum value "kLicense" - AlertGroupSummaryCategoryKLicense string = "kLicense" - - // AlertGroupSummaryCategoryKSecurity captures enum value "kSecurity" - AlertGroupSummaryCategoryKSecurity string = "kSecurity" - - // AlertGroupSummaryCategoryKUpgrade captures enum value "kUpgrade" - AlertGroupSummaryCategoryKUpgrade string = "kUpgrade" - - // AlertGroupSummaryCategoryKClusterManagement captures enum value "kClusterManagement" - AlertGroupSummaryCategoryKClusterManagement string = "kClusterManagement" - - // AlertGroupSummaryCategoryKAuditLog captures enum value "kAuditLog" - AlertGroupSummaryCategoryKAuditLog string = "kAuditLog" - - // AlertGroupSummaryCategoryKNetworking captures enum value "kNetworking" - AlertGroupSummaryCategoryKNetworking string = "kNetworking" - - // AlertGroupSummaryCategoryKConfiguration captures enum value "kConfiguration" - AlertGroupSummaryCategoryKConfiguration string = "kConfiguration" - - // AlertGroupSummaryCategoryKStorageUsage captures enum value "kStorageUsage" - AlertGroupSummaryCategoryKStorageUsage string = "kStorageUsage" - - // AlertGroupSummaryCategoryKFaultTolerance captures enum value "kFaultTolerance" - AlertGroupSummaryCategoryKFaultTolerance string = "kFaultTolerance" - - // AlertGroupSummaryCategoryKBackupRestore captures enum value "kBackupRestore" - AlertGroupSummaryCategoryKBackupRestore string = "kBackupRestore" - - // AlertGroupSummaryCategoryKArchivalRestore captures enum value "kArchivalRestore" - AlertGroupSummaryCategoryKArchivalRestore string = "kArchivalRestore" - - // AlertGroupSummaryCategoryKRemoteReplication captures enum value "kRemoteReplication" - AlertGroupSummaryCategoryKRemoteReplication string = "kRemoteReplication" - - // AlertGroupSummaryCategoryKQuota captures enum value "kQuota" - AlertGroupSummaryCategoryKQuota string = "kQuota" - - // AlertGroupSummaryCategoryKCDP captures enum value "kCDP" - AlertGroupSummaryCategoryKCDP string = "kCDP" - - // AlertGroupSummaryCategoryKViewFailover captures enum value "kViewFailover" - AlertGroupSummaryCategoryKViewFailover string = "kViewFailover" - - // AlertGroupSummaryCategoryKDisasterRecovery captures enum value "kDisasterRecovery" - AlertGroupSummaryCategoryKDisasterRecovery string = "kDisasterRecovery" -) - -// prop value enum -func (m *AlertGroupSummary) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertGroupSummaryTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertGroupSummary) validateCategory(formats strfmt.Registry) error { - if swag.IsZero(m.Category) { // not required - return nil - } - - // value enum - if err := m.validateCategoryEnum("category", "body", m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alert group summary based on context it is used -func (m *AlertGroupSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertGroupSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertGroupSummary) UnmarshalBinary(b []byte) error { - var res AlertGroupSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/alert_status.go b/v2/models/alert_status.go deleted file mode 100644 index a02093f5..00000000 --- a/v2/models/alert_status.go +++ /dev/null @@ -1,113 +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" -) - -// AlertStatus Alert Status type. -// -// Alert Status type. -// -// swagger:model AlertStatus -type AlertStatus struct { - - // Specifies Alert Status type. - // Enum: ["kSuccess","kFailure","kSlaViolation","kWarning"] - AlertStatus string `json:"alertStatus,omitempty"` -} - -// Validate validates this alert status -func (m *AlertStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var alertStatusTypeAlertStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kFailure","kSlaViolation","kWarning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertStatusTypeAlertStatusPropEnum = append(alertStatusTypeAlertStatusPropEnum, v) - } -} - -const ( - - // AlertStatusAlertStatusKSuccess captures enum value "kSuccess" - AlertStatusAlertStatusKSuccess string = "kSuccess" - - // AlertStatusAlertStatusKFailure captures enum value "kFailure" - AlertStatusAlertStatusKFailure string = "kFailure" - - // AlertStatusAlertStatusKSLAViolation captures enum value "kSlaViolation" - AlertStatusAlertStatusKSLAViolation string = "kSlaViolation" - - // AlertStatusAlertStatusKWarning captures enum value "kWarning" - AlertStatusAlertStatusKWarning string = "kWarning" -) - -// prop value enum -func (m *AlertStatus) validateAlertStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertStatusTypeAlertStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertStatus) validateAlertStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AlertStatus) { // not required - return nil - } - - // value enum - if err := m.validateAlertStatusEnum("alertStatus", "body", m.AlertStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alert status based on context it is used -func (m *AlertStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertStatus) UnmarshalBinary(b []byte) error { - var res AlertStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/alert_target.go b/v2/models/alert_target.go deleted file mode 100644 index 6df96e59..00000000 --- a/v2/models/alert_target.go +++ /dev/null @@ -1,175 +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" -) - -// AlertTarget Specifies an alert target to receive an alert. -// -// swagger:model AlertTarget -type AlertTarget struct { - - // Specifies an email address to receive an alert. - // Required: true - EmailAddress *string `json:"emailAddress"` - - // Specifies the language of the delivery target. Default value is 'en-us'. - // Enum: ["en-us","ja-jp","zh-cn"] - Language *string `json:"language,omitempty"` - - // Specifies the recipient type of email recipient. Default value is 'kTo'. - // Enum: ["kTo","kCc"] - RecipientType *string `json:"recipientType,omitempty"` -} - -// Validate validates this alert target -func (m *AlertTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEmailAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLanguage(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecipientType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertTarget) validateEmailAddress(formats strfmt.Registry) error { - - if err := validate.Required("emailAddress", "body", m.EmailAddress); err != nil { - return err - } - - return nil -} - -var alertTargetTypeLanguagePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["en-us","ja-jp","zh-cn"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTargetTypeLanguagePropEnum = append(alertTargetTypeLanguagePropEnum, v) - } -} - -const ( - - // AlertTargetLanguageEnDashUs captures enum value "en-us" - AlertTargetLanguageEnDashUs string = "en-us" - - // AlertTargetLanguageJaDashJp captures enum value "ja-jp" - AlertTargetLanguageJaDashJp string = "ja-jp" - - // AlertTargetLanguageZhDashCn captures enum value "zh-cn" - AlertTargetLanguageZhDashCn string = "zh-cn" -) - -// prop value enum -func (m *AlertTarget) validateLanguageEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTargetTypeLanguagePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertTarget) validateLanguage(formats strfmt.Registry) error { - if swag.IsZero(m.Language) { // not required - return nil - } - - // value enum - if err := m.validateLanguageEnum("language", "body", *m.Language); err != nil { - return err - } - - return nil -} - -var alertTargetTypeRecipientTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kTo","kCc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertTargetTypeRecipientTypePropEnum = append(alertTargetTypeRecipientTypePropEnum, v) - } -} - -const ( - - // AlertTargetRecipientTypeKTo captures enum value "kTo" - AlertTargetRecipientTypeKTo string = "kTo" - - // AlertTargetRecipientTypeKCc captures enum value "kCc" - AlertTargetRecipientTypeKCc string = "kCc" -) - -// prop value enum -func (m *AlertTarget) validateRecipientTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertTargetTypeRecipientTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertTarget) validateRecipientType(formats strfmt.Registry) error { - if swag.IsZero(m.RecipientType) { // not required - return nil - } - - // value enum - if err := m.validateRecipientTypeEnum("recipientType", "body", *m.RecipientType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alert target based on context it is used -func (m *AlertTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertTarget) UnmarshalBinary(b []byte) error { - var res AlertTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/alerts_summary_response.go b/v2/models/alerts_summary_response.go deleted file mode 100644 index af4711f6..00000000 --- a/v2/models/alerts_summary_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AlertsSummaryResponse Specifies the response of alerts summary. -// -// swagger:model AlertsSummaryResponse -type AlertsSummaryResponse struct { - - // Specifies a list of alerts summary grouped by category. - AlertsSummary []*AlertGroupSummary `json:"alertsSummary"` -} - -// Validate validates this alerts summary response -func (m *AlertsSummaryResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlertsSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertsSummaryResponse) validateAlertsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.AlertsSummary) { // not required - return nil - } - - for i := 0; i < len(m.AlertsSummary); i++ { - if swag.IsZero(m.AlertsSummary[i]) { // not required - continue - } - - if m.AlertsSummary[i] != nil { - if err := m.AlertsSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this alerts summary response based on the context it is used -func (m *AlertsSummaryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertsSummaryResponse) contextValidateAlertsSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AlertsSummary); i++ { - - if m.AlertsSummary[i] != nil { - - if swag.IsZero(m.AlertsSummary[i]) { // not required - return nil - } - - if err := m.AlertsSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertsSummaryResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertsSummaryResponse) UnmarshalBinary(b []byte) error { - var res AlertsSummaryResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/alias_smb_config.go b/v2/models/alias_smb_config.go deleted file mode 100644 index ffbb3191..00000000 --- a/v2/models/alias_smb_config.go +++ /dev/null @@ -1,145 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AliasSmbConfig Message defining SMB config for IRIS. SMB config contains SMB encryption flags, SMB discoverable flag and Share level permissions. -// -// swagger:model AliasSmbConfig -type AliasSmbConfig struct { - - // Whether the share is discoverable. - DiscoveryEnabled *bool `json:"discoveryEnabled,omitempty"` - - // Whether SMB encryption is enabled for this share. Encryption is supported only by SMB 3.x dialects. Dialects that do not support would still access data in unencrypted format. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Whether to enforce encryption for all the sessions for this view. When enabled all unencrypted sessions are disallowed. - EncryptionRequired *bool `json:"encryptionRequired,omitempty"` - - // Share level permissions. Note: Supported Access: FullControl, Modify, ReadOnly. Supported type: Allow, Deny. - Permissions []*SmbPermission `json:"permissions"` - - // Specifies a list of super user sids. - SuperUserSids []string `json:"superUserSids"` - - // Indicate if offline file caching is supported. - CachingEnabled *bool `json:"cachingEnabled,omitempty"` - - // Indicate if share level permission is cleared by user. - IsShareLevelPermissionEmpty *bool `json:"isShareLevelPermissionEmpty,omitempty"` - - // Indicate the operation lock is enabled by this view. - OplockEnabled *bool `json:"oplockEnabled,omitempty"` - - // Whether file open handles are persisted to scribe to survive bridge process crash. When set to false, open handles will be kept in memory until the current node has exclusive ticket for the entity handle. When the entity is opened from another node, the exclusive ticket would be revoked from the node. In revoke control flow, the current node would persist the state to scribe. On acquiring the exclusive ticket,another node would read the file open handles from scribe and resume the handling of operation. - ContinuousAvailability *bool `json:"continuousAvailability,omitempty"` -} - -// Validate validates this alias smb config -func (m *AliasSmbConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AliasSmbConfig) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this alias smb config based on the context it is used -func (m *AliasSmbConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AliasSmbConfig) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AliasSmbConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AliasSmbConfig) UnmarshalBinary(b []byte) error { - var res AliasSmbConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/allowed_failover_operation.go b/v2/models/allowed_failover_operation.go deleted file mode 100644 index ca934866..00000000 --- a/v2/models/allowed_failover_operation.go +++ /dev/null @@ -1,87 +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/validate" -) - -// AllowedFailoverOperation Specifies the allowed failover operation. -// -// swagger:model AllowedFailoverOperation -type AllowedFailoverOperation string - -func NewAllowedFailoverOperation(value AllowedFailoverOperation) *AllowedFailoverOperation { - return &value -} - -// Pointer returns a pointer to a freshly-allocated AllowedFailoverOperation. -func (m AllowedFailoverOperation) Pointer() *AllowedFailoverOperation { - return &m -} - -const ( - - // AllowedFailoverOperationUnknown captures enum value "Unknown" - AllowedFailoverOperationUnknown AllowedFailoverOperation = "Unknown" - - // AllowedFailoverOperationUnplanned captures enum value "Unplanned" - AllowedFailoverOperationUnplanned AllowedFailoverOperation = "Unplanned" - - // AllowedFailoverOperationPrepare captures enum value "Prepare" - AllowedFailoverOperationPrepare AllowedFailoverOperation = "Prepare" - - // AllowedFailoverOperationFinalize captures enum value "Finalize" - AllowedFailoverOperationFinalize AllowedFailoverOperation = "Finalize" - - // AllowedFailoverOperationCancel captures enum value "Cancel" - AllowedFailoverOperationCancel AllowedFailoverOperation = "Cancel" -) - -// for schema -var allowedFailoverOperationEnum []interface{} - -func init() { - var res []AllowedFailoverOperation - if err := json.Unmarshal([]byte(`["Unknown","Unplanned","Prepare","Finalize","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - allowedFailoverOperationEnum = append(allowedFailoverOperationEnum, v) - } -} - -func (m AllowedFailoverOperation) validateAllowedFailoverOperationEnum(path, location string, value AllowedFailoverOperation) error { - if err := validate.EnumCase(path, location, value, allowedFailoverOperationEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this allowed failover operation -func (m AllowedFailoverOperation) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateAllowedFailoverOperationEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this allowed failover operation based on context it is used -func (m AllowedFailoverOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/antivirus_scan_config.go b/v2/models/antivirus_scan_config.go deleted file mode 100644 index ff05ed62..00000000 --- a/v2/models/antivirus_scan_config.go +++ /dev/null @@ -1,148 +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" -) - -// AntivirusScanConfig Antivirus scan config -// -// Specifies the antivirus scan config settings for this View. -// -// swagger:model AntivirusScanConfig -type AntivirusScanConfig struct { - - // Specifies whether block access to the file when antivirus scan fails. - BlockAccessOnScanFailure *bool `json:"blockAccessOnScanFailure,omitempty"` - - // Specifies whether the antivirus service is enabled or not. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies maximum file size that will be sent to antivirus server for - // scanning. if greater than zero, the file size that exceeds this size - // would be skipped from virus scan. - MaximumScanFileSize *int64 `json:"maximumScanFileSize,omitempty"` - - // Specifies whether to scan a file when it is opened. - ScanOnAccess *bool `json:"scanOnAccess,omitempty"` - - // Specifies whether to scan a file when it is closed after modify. - ScanOnClose *bool `json:"scanOnClose,omitempty"` - - // Specifies the maximum amount of time that a scan can take before timing - // out. - // Required: true - ScanTimeoutUsecs *int32 `json:"scanTimeoutUsecs"` - - // Files extension that meets these filter criteria will be sent to - // antivirus server for the scan. - ScanFilter *FileExtensionFilter `json:"scanFilter,omitempty"` -} - -// Validate validates this antivirus scan config -func (m *AntivirusScanConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScanTimeoutUsecs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScanFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusScanConfig) validateScanTimeoutUsecs(formats strfmt.Registry) error { - - if err := validate.Required("scanTimeoutUsecs", "body", m.ScanTimeoutUsecs); err != nil { - return err - } - - return nil -} - -func (m *AntivirusScanConfig) validateScanFilter(formats strfmt.Registry) error { - if swag.IsZero(m.ScanFilter) { // not required - return nil - } - - if m.ScanFilter != nil { - if err := m.ScanFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scanFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scanFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this antivirus scan config based on the context it is used -func (m *AntivirusScanConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScanFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusScanConfig) contextValidateScanFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.ScanFilter != nil { - - if swag.IsZero(m.ScanFilter) { // not required - return nil - } - - if err := m.ScanFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scanFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scanFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusScanConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusScanConfig) UnmarshalBinary(b []byte) error { - var res AntivirusScanConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/antivirus_service.go b/v2/models/antivirus_service.go deleted file mode 100644 index 43072f43..00000000 --- a/v2/models/antivirus_service.go +++ /dev/null @@ -1,113 +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" -) - -// AntivirusService Specifies an Antivirus Service. -// -// swagger:model AntivirusService -type AntivirusService struct { - - // Specifies the ICAP Uri for the Antivirus Service. - // Required: true - IcapURI *string `json:"icapUri"` - - // Specifies the description for the Antivirus Service. - Description *string `json:"description,omitempty"` - - // Specifies the tag of the Antivirus Service. - // Read Only: true - Tag *string `json:"tag,omitempty"` - - // Specifies the tag id of the Antivirus Service. - // Read Only: true - TagID *int64 `json:"tagId,omitempty"` -} - -// Validate validates this antivirus service -func (m *AntivirusService) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIcapURI(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusService) validateIcapURI(formats strfmt.Registry) error { - - if err := validate.Required("icapUri", "body", m.IcapURI); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this antivirus service based on the context it is used -func (m *AntivirusService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTag(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusService) contextValidateTag(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tag", "body", m.Tag); err != nil { - return err - } - - return nil -} - -func (m *AntivirusService) contextValidateTagID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tagId", "body", m.TagID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusService) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusService) UnmarshalBinary(b []byte) error { - var res AntivirusService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/antivirus_service_group.go b/v2/models/antivirus_service_group.go deleted file mode 100644 index cd33b354..00000000 --- a/v2/models/antivirus_service_group.go +++ /dev/null @@ -1,117 +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" -) - -// AntivirusServiceGroup Specifies an Antivirus Service group. -// -// swagger:model AntivirusServiceGroup -type AntivirusServiceGroup struct { - CreateAntivirusServiceGroupParams - - // Specifies the Antivirus Service group id. - ID *int64 `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AntivirusServiceGroup) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateAntivirusServiceGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateAntivirusServiceGroupParams = aO0 - - // AO1 - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AntivirusServiceGroup) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateAntivirusServiceGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - } - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this antivirus service group -func (m *AntivirusServiceGroup) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateAntivirusServiceGroupParams - if err := m.CreateAntivirusServiceGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this antivirus service group based on the context it is used -func (m *AntivirusServiceGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateAntivirusServiceGroupParams - if err := m.CreateAntivirusServiceGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceGroup) UnmarshalBinary(b []byte) error { - var res AntivirusServiceGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/antivirus_service_groups.go b/v2/models/antivirus_service_groups.go deleted file mode 100644 index 25fe7ace..00000000 --- a/v2/models/antivirus_service_groups.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AntivirusServiceGroups Specifies a list of Antivirus Service groups. -// -// swagger:model AntivirusServiceGroups -type AntivirusServiceGroups struct { - - // Specifies the list of Antivirus Service groups. - AntivirusServiceGroups []*AntivirusServiceGroup `json:"antivirusServiceGroups"` -} - -// Validate validates this antivirus service groups -func (m *AntivirusServiceGroups) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAntivirusServiceGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroups) validateAntivirusServiceGroups(formats strfmt.Registry) error { - if swag.IsZero(m.AntivirusServiceGroups) { // not required - return nil - } - - for i := 0; i < len(m.AntivirusServiceGroups); i++ { - if swag.IsZero(m.AntivirusServiceGroups[i]) { // not required - continue - } - - if m.AntivirusServiceGroups[i] != nil { - if err := m.AntivirusServiceGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServiceGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServiceGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this antivirus service groups based on the context it is used -func (m *AntivirusServiceGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAntivirusServiceGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AntivirusServiceGroups) contextValidateAntivirusServiceGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AntivirusServiceGroups); i++ { - - if m.AntivirusServiceGroups[i] != nil { - - if swag.IsZero(m.AntivirusServiceGroups[i]) { // not required - return nil - } - - if err := m.AntivirusServiceGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServiceGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServiceGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AntivirusServiceGroups) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AntivirusServiceGroups) UnmarshalBinary(b []byte) error { - var res AntivirusServiceGroups - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/api_based_fetch_info.go b/v2/models/api_based_fetch_info.go deleted file mode 100644 index b6d0951b..00000000 --- a/v2/models/api_based_fetch_info.go +++ /dev/null @@ -1,71 +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" -) - -// APIBasedFetchInfo Parameters needed to do certain cluster Apis. -// -// swagger:model ApiBasedFetchInfo -type APIBasedFetchInfo struct { - - // Key in base32 form. - // Required: true - Key *string `json:"key"` -} - -// Validate validates this Api based fetch info -func (m *APIBasedFetchInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *APIBasedFetchInfo) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Api based fetch info based on context it is used -func (m *APIBasedFetchInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *APIBasedFetchInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *APIBasedFetchInfo) UnmarshalBinary(b []byte) error { - var res APIBasedFetchInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/app_resource.go b/v2/models/app_resource.go deleted file mode 100644 index 9d95a04b..00000000 --- a/v2/models/app_resource.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AppResource Specifies the details about App Resource. -// -// swagger:model AppResource -type AppResource struct { - - // Specifies the unique id of the app resource. - ID *string `json:"id,omitempty"` - - // Specifies the type of the app resource. - // Enum: ["standaloneServer","windowsCluster","sqlCluster"] - Type *string `json:"type,omitempty"` - - // Specifies the information about endpoint associated with this resorce. - Endpoints []*ResourceEndpoint `json:"endpoints"` -} - -// Validate validates this app resource -func (m *AppResource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndpoints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var appResourceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["standaloneServer","windowsCluster","sqlCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - appResourceTypeTypePropEnum = append(appResourceTypeTypePropEnum, v) - } -} - -const ( - - // AppResourceTypeStandaloneServer captures enum value "standaloneServer" - AppResourceTypeStandaloneServer string = "standaloneServer" - - // AppResourceTypeWindowsCluster captures enum value "windowsCluster" - AppResourceTypeWindowsCluster string = "windowsCluster" - - // AppResourceTypeSQLCluster captures enum value "sqlCluster" - AppResourceTypeSQLCluster string = "sqlCluster" -) - -// prop value enum -func (m *AppResource) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, appResourceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AppResource) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *AppResource) validateEndpoints(formats strfmt.Registry) error { - if swag.IsZero(m.Endpoints) { // not required - return nil - } - - for i := 0; i < len(m.Endpoints); i++ { - if swag.IsZero(m.Endpoints[i]) { // not required - continue - } - - if m.Endpoints[i] != nil { - if err := m.Endpoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this app resource based on the context it is used -func (m *AppResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpoints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppResource) contextValidateEndpoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Endpoints); i++ { - - if m.Endpoints[i] != nil { - - if swag.IsZero(m.Endpoints[i]) { // not required - return nil - } - - if err := m.Endpoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppResource) UnmarshalBinary(b []byte) error { - var res AppResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/applied_patch.go b/v2/models/applied_patch.go deleted file mode 100644 index afb48754..00000000 --- a/v2/models/applied_patch.go +++ /dev/null @@ -1,147 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AppliedPatch Applied Patch. -// -// Specifies the description of an applied patch. -// -// swagger:model AppliedPatch -type AppliedPatch struct { - - // Specifies the name of the service. - Service string `json:"service,omitempty"` - - // Specifies the description of the service. - Component string `json:"component,omitempty"` - - // Specifies the version of the patch. - Version string `json:"version,omitempty"` - - // Specifies the version it replaced. - VersionReplaced string `json:"versionReplaced,omitempty"` - - // Specifies the number of patches applied so far for this service. - PatchLevel int64 `json:"patchLevel,omitempty"` - - // Specifies the time when the patch was applied in Unix epoch in milliseconds. - AppliedTimeMsecs int64 `json:"appliedTimeMsecs,omitempty"` - - // Specifies the number of fixed issues. - Count int64 `json:"count,omitempty"` - - // Specifies the services for which their patches were applied together. They will also be reverted together. - Dependencies []string `json:"dependencies"` - - // Specifies the details of the issues fixed in the patch. - FixedIssues []*FixedIssue `json:"fixedIssues"` -} - -// Validate validates this applied patch -func (m *AppliedPatch) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFixedIssues(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppliedPatch) validateFixedIssues(formats strfmt.Registry) error { - if swag.IsZero(m.FixedIssues) { // not required - return nil - } - - for i := 0; i < len(m.FixedIssues); i++ { - if swag.IsZero(m.FixedIssues[i]) { // not required - continue - } - - if m.FixedIssues[i] != nil { - if err := m.FixedIssues[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this applied patch based on the context it is used -func (m *AppliedPatch) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFixedIssues(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AppliedPatch) contextValidateFixedIssues(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FixedIssues); i++ { - - if m.FixedIssues[i] != nil { - - if swag.IsZero(m.FixedIssues[i]) { // not required - return nil - } - - if err := m.FixedIssues[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AppliedPatch) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AppliedPatch) UnmarshalBinary(b []byte) error { - var res AppliedPatch - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/applied_patches.go b/v2/models/applied_patches.go deleted file mode 100644 index d49e8d24..00000000 --- a/v2/models/applied_patches.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AppliedPatches Applied Patches. -// -// Specifies the applied patches on the cluster. -// -// swagger:model AppliedPatches -type AppliedPatches []*AppliedPatch - -// Validate validates this applied patches -func (m AppliedPatches) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this applied patches based on the context it is used -func (m AppliedPatches) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/apply_baseos_patch_request.go b/v2/models/apply_baseos_patch_request.go deleted file mode 100644 index d929d35c..00000000 --- a/v2/models/apply_baseos_patch_request.go +++ /dev/null @@ -1,71 +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" -) - -// ApplyBaseosPatchRequest Specifies the name of the baseos patch. -// -// swagger:model ApplyBaseosPatchRequest -type ApplyBaseosPatchRequest struct { - - // Name of the hotfix with security patch - // Required: true - PatchName *string `json:"patchName"` -} - -// Validate validates this apply baseos patch request -func (m *ApplyBaseosPatchRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatchName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplyBaseosPatchRequest) validatePatchName(formats strfmt.Registry) error { - - if err := validate.Required("patchName", "body", m.PatchName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this apply baseos patch request based on context it is used -func (m *ApplyBaseosPatchRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplyBaseosPatchRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplyBaseosPatchRequest) UnmarshalBinary(b []byte) error { - var res ApplyBaseosPatchRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/apply_patches_request.go b/v2/models/apply_patches_request.go deleted file mode 100644 index c9b8d75c..00000000 --- a/v2/models/apply_patches_request.go +++ /dev/null @@ -1,55 +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" -) - -// ApplyPatchesRequest Apply patch. -// -// Specifies the request to apply a patch. -// -// swagger:model ApplyPatchesRequest -type ApplyPatchesRequest struct { - - // Specifies the name of the service whose patch should be applied. - Service *string `json:"service,omitempty"` - - // Specifies all the available patches should be applied. - All *bool `json:"all,omitempty"` -} - -// Validate validates this apply patches request -func (m *ApplyPatchesRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this apply patches request based on context it is used -func (m *ApplyPatchesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplyPatchesRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplyPatchesRequest) UnmarshalBinary(b []byte) error { - var res ApplyPatchesRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_aws_external_target_params.go b/v2/models/archival_aws_external_target_params.go deleted file mode 100644 index 627724e3..00000000 --- a/v2/models/archival_aws_external_target_params.go +++ /dev/null @@ -1,588 +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" -) - -// ArchivalAwsExternalTargetParams AWS External Target Request Params for archival purpose type. -// -// Specifies the common parameters which are specific to AWS related External Targets. -// -// swagger:model ArchivalAwsExternalTargetParams -type ArchivalAwsExternalTargetParams struct { - CommonArchivalAwsExternalTargetParams - - // aws s3 standard params - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - // aws s3 standard i a params - AwsS3StandardIAParams *AwsS3StandardIAParams `json:"awsS3StandardIAParams,omitempty"` - - // aws s3 one zone i a params - AwsS3OneZoneIAParams *AwsS3OneZoneIAParams `json:"awsS3OneZoneIAParams,omitempty"` - - // aws s3 intelligent params - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` - - // aws s3 glacier params - AwsS3GlacierParams *AwsS3GlacierParams `json:"awsS3GlacierParams,omitempty"` - - // aws s3 glacier deep archive params - AwsS3GlacierDeepArchiveParams *AwsS3GlacierDeepArchiveParams `json:"awsS3GlacierDeepArchiveParams,omitempty"` - - // aws glacier params - AwsGlacierParams *AwsGlacierParams `json:"awsGlacierParams,omitempty"` - - // aws s3 glacier i r params - AwsS3GlacierIRParams *AwsS3GlacierIRParams `json:"awsS3GlacierIRParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalAwsExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonArchivalAwsExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonArchivalAwsExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - AwsS3StandardIAParams *AwsS3StandardIAParams `json:"awsS3StandardIAParams,omitempty"` - - AwsS3OneZoneIAParams *AwsS3OneZoneIAParams `json:"awsS3OneZoneIAParams,omitempty"` - - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` - - AwsS3GlacierParams *AwsS3GlacierParams `json:"awsS3GlacierParams,omitempty"` - - AwsS3GlacierDeepArchiveParams *AwsS3GlacierDeepArchiveParams `json:"awsS3GlacierDeepArchiveParams,omitempty"` - - AwsGlacierParams *AwsGlacierParams `json:"awsGlacierParams,omitempty"` - - AwsS3GlacierIRParams *AwsS3GlacierIRParams `json:"awsS3GlacierIRParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsS3StandardParams = dataAO1.AwsS3StandardParams - - m.AwsS3StandardIAParams = dataAO1.AwsS3StandardIAParams - - m.AwsS3OneZoneIAParams = dataAO1.AwsS3OneZoneIAParams - - m.AwsS3IntelligentParams = dataAO1.AwsS3IntelligentParams - - m.AwsS3GlacierParams = dataAO1.AwsS3GlacierParams - - m.AwsS3GlacierDeepArchiveParams = dataAO1.AwsS3GlacierDeepArchiveParams - - m.AwsGlacierParams = dataAO1.AwsGlacierParams - - m.AwsS3GlacierIRParams = dataAO1.AwsS3GlacierIRParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalAwsExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonArchivalAwsExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - AwsS3StandardIAParams *AwsS3StandardIAParams `json:"awsS3StandardIAParams,omitempty"` - - AwsS3OneZoneIAParams *AwsS3OneZoneIAParams `json:"awsS3OneZoneIAParams,omitempty"` - - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` - - AwsS3GlacierParams *AwsS3GlacierParams `json:"awsS3GlacierParams,omitempty"` - - AwsS3GlacierDeepArchiveParams *AwsS3GlacierDeepArchiveParams `json:"awsS3GlacierDeepArchiveParams,omitempty"` - - AwsGlacierParams *AwsGlacierParams `json:"awsGlacierParams,omitempty"` - - AwsS3GlacierIRParams *AwsS3GlacierIRParams `json:"awsS3GlacierIRParams,omitempty"` - } - - dataAO1.AwsS3StandardParams = m.AwsS3StandardParams - - dataAO1.AwsS3StandardIAParams = m.AwsS3StandardIAParams - - dataAO1.AwsS3OneZoneIAParams = m.AwsS3OneZoneIAParams - - dataAO1.AwsS3IntelligentParams = m.AwsS3IntelligentParams - - dataAO1.AwsS3GlacierParams = m.AwsS3GlacierParams - - dataAO1.AwsS3GlacierDeepArchiveParams = m.AwsS3GlacierDeepArchiveParams - - dataAO1.AwsGlacierParams = m.AwsGlacierParams - - dataAO1.AwsS3GlacierIRParams = m.AwsS3GlacierIRParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival aws external target params -func (m *ArchivalAwsExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalAwsExternalTargetParams - if err := m.CommonArchivalAwsExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3StandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3StandardIAParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3OneZoneIAParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3IntelligentParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3GlacierParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3GlacierDeepArchiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsGlacierParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3GlacierIRParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3StandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3StandardParams) { // not required - return nil - } - - if m.AwsS3StandardParams != nil { - if err := m.AwsS3StandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3StandardIAParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3StandardIAParams) { // not required - return nil - } - - if m.AwsS3StandardIAParams != nil { - if err := m.AwsS3StandardIAParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardIAParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardIAParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3OneZoneIAParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3OneZoneIAParams) { // not required - return nil - } - - if m.AwsS3OneZoneIAParams != nil { - if err := m.AwsS3OneZoneIAParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3OneZoneIAParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3OneZoneIAParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3IntelligentParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3IntelligentParams) { // not required - return nil - } - - if m.AwsS3IntelligentParams != nil { - if err := m.AwsS3IntelligentParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3IntelligentParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3IntelligentParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3GlacierParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3GlacierParams) { // not required - return nil - } - - if m.AwsS3GlacierParams != nil { - if err := m.AwsS3GlacierParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3GlacierDeepArchiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3GlacierDeepArchiveParams) { // not required - return nil - } - - if m.AwsS3GlacierDeepArchiveParams != nil { - if err := m.AwsS3GlacierDeepArchiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierDeepArchiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierDeepArchiveParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsGlacierParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsGlacierParams) { // not required - return nil - } - - if m.AwsGlacierParams != nil { - if err := m.AwsGlacierParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsGlacierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsGlacierParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) validateAwsS3GlacierIRParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3GlacierIRParams) { // not required - return nil - } - - if m.AwsS3GlacierIRParams != nil { - if err := m.AwsS3GlacierIRParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierIRParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierIRParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival aws external target params based on the context it is used -func (m *ArchivalAwsExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalAwsExternalTargetParams - if err := m.CommonArchivalAwsExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3StandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3StandardIAParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3OneZoneIAParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3IntelligentParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3GlacierParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3GlacierDeepArchiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsGlacierParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3GlacierIRParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3StandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3StandardParams != nil { - - if swag.IsZero(m.AwsS3StandardParams) { // not required - return nil - } - - if err := m.AwsS3StandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3StandardIAParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3StandardIAParams != nil { - - if swag.IsZero(m.AwsS3StandardIAParams) { // not required - return nil - } - - if err := m.AwsS3StandardIAParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardIAParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardIAParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3OneZoneIAParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3OneZoneIAParams != nil { - - if swag.IsZero(m.AwsS3OneZoneIAParams) { // not required - return nil - } - - if err := m.AwsS3OneZoneIAParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3OneZoneIAParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3OneZoneIAParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3IntelligentParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3IntelligentParams != nil { - - if swag.IsZero(m.AwsS3IntelligentParams) { // not required - return nil - } - - if err := m.AwsS3IntelligentParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3IntelligentParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3IntelligentParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3GlacierParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3GlacierParams != nil { - - if swag.IsZero(m.AwsS3GlacierParams) { // not required - return nil - } - - if err := m.AwsS3GlacierParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3GlacierDeepArchiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3GlacierDeepArchiveParams != nil { - - if swag.IsZero(m.AwsS3GlacierDeepArchiveParams) { // not required - return nil - } - - if err := m.AwsS3GlacierDeepArchiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierDeepArchiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierDeepArchiveParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsGlacierParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsGlacierParams != nil { - - if swag.IsZero(m.AwsGlacierParams) { // not required - return nil - } - - if err := m.AwsGlacierParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsGlacierParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsGlacierParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAwsExternalTargetParams) contextValidateAwsS3GlacierIRParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3GlacierIRParams != nil { - - if swag.IsZero(m.AwsS3GlacierIRParams) { // not required - return nil - } - - if err := m.AwsS3GlacierIRParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3GlacierIRParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3GlacierIRParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalAwsExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalAwsExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalAwsExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_azure_external_target_params.go b/v2/models/archival_azure_external_target_params.go deleted file mode 100644 index 1566b3e5..00000000 --- a/v2/models/archival_azure_external_target_params.go +++ /dev/null @@ -1,288 +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" -) - -// ArchivalAzureExternalTargetParams Azure External Target Request Params for archival purpose type. -// -// Specifies the common parameters which are specific to Azure related External Targets. -// -// swagger:model ArchivalAzureExternalTargetParams -type ArchivalAzureExternalTargetParams struct { - CommonArchivalAzureExternalTargetParams - - // cool blob params - CoolBlobParams *AzureCoolBlobParams `json:"coolBlobParams,omitempty"` - - // hot blob params - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` - - // archive blob params - ArchiveBlobParams *AzureArchiveBlobParams `json:"archiveBlobParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalAzureExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonArchivalAzureExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonArchivalAzureExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - CoolBlobParams *AzureCoolBlobParams `json:"coolBlobParams,omitempty"` - - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` - - ArchiveBlobParams *AzureArchiveBlobParams `json:"archiveBlobParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CoolBlobParams = dataAO1.CoolBlobParams - - m.HotBlobParams = dataAO1.HotBlobParams - - m.ArchiveBlobParams = dataAO1.ArchiveBlobParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalAzureExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonArchivalAzureExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CoolBlobParams *AzureCoolBlobParams `json:"coolBlobParams,omitempty"` - - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` - - ArchiveBlobParams *AzureArchiveBlobParams `json:"archiveBlobParams,omitempty"` - } - - dataAO1.CoolBlobParams = m.CoolBlobParams - - dataAO1.HotBlobParams = m.HotBlobParams - - dataAO1.ArchiveBlobParams = m.ArchiveBlobParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival azure external target params -func (m *ArchivalAzureExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalAzureExternalTargetParams - if err := m.CommonArchivalAzureExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCoolBlobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHotBlobParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchiveBlobParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalAzureExternalTargetParams) validateCoolBlobParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CoolBlobParams) { // not required - return nil - } - - if m.CoolBlobParams != nil { - if err := m.CoolBlobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("coolBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("coolBlobParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAzureExternalTargetParams) validateHotBlobParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HotBlobParams) { // not required - return nil - } - - if m.HotBlobParams != nil { - if err := m.HotBlobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hotBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hotBlobParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAzureExternalTargetParams) validateArchiveBlobParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ArchiveBlobParams) { // not required - return nil - } - - if m.ArchiveBlobParams != nil { - if err := m.ArchiveBlobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveBlobParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival azure external target params based on the context it is used -func (m *ArchivalAzureExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalAzureExternalTargetParams - if err := m.CommonArchivalAzureExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCoolBlobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHotBlobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchiveBlobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalAzureExternalTargetParams) contextValidateCoolBlobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CoolBlobParams != nil { - - if swag.IsZero(m.CoolBlobParams) { // not required - return nil - } - - if err := m.CoolBlobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("coolBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("coolBlobParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAzureExternalTargetParams) contextValidateHotBlobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HotBlobParams != nil { - - if swag.IsZero(m.HotBlobParams) { // not required - return nil - } - - if err := m.HotBlobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hotBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hotBlobParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalAzureExternalTargetParams) contextValidateArchiveBlobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchiveBlobParams != nil { - - if swag.IsZero(m.ArchiveBlobParams) { // not required - return nil - } - - if err := m.ArchiveBlobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveBlobParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalAzureExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalAzureExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalAzureExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_bandwidth_settings.go b/v2/models/archival_bandwidth_settings.go deleted file mode 100644 index f0386b7a..00000000 --- a/v2/models/archival_bandwidth_settings.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" -) - -// ArchivalBandwidthSettings Archival Bandwidth Settings -// -// Specifies the global bandwidth setting of the Archival External Target. -// -// swagger:model ArchivalBandwidthSettings -type ArchivalBandwidthSettings struct { - CommonBandwidthSettings -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalBandwidthSettings) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonBandwidthSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonBandwidthSettings = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalBandwidthSettings) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonBandwidthSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival bandwidth settings -func (m *ArchivalBandwidthSettings) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBandwidthSettings - if err := m.CommonBandwidthSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this archival bandwidth settings based on the context it is used -func (m *ArchivalBandwidthSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBandwidthSettings - if err := m.CommonBandwidthSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalBandwidthSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalBandwidthSettings) UnmarshalBinary(b []byte) error { - var res ArchivalBandwidthSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_config.go b/v2/models/archival_config.go deleted file mode 100644 index 127db922..00000000 --- a/v2/models/archival_config.go +++ /dev/null @@ -1,356 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ArchivalConfig Archival Target Configuration -// -// Specifies settings for copying Snapshots External Targets (such as AWS or Tape). This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model ArchivalConfig -type ArchivalConfig struct { - CommonTargetConfiguration - - // Specifies the Archival target to copy the Snapshots to. - // Required: true - TargetID *int64 `json:"targetId"` - - // Specifies the Archival target name where Snapshots are copied. - // Read Only: true - TargetName *string `json:"targetName,omitempty"` - - // Specifies the Archival target type where Snapshots are copied. - // Read Only: true - // Enum: ["Tape","Cloud","Nas"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the tier settings that will be applied to given target. If provided target is of type 'cloud', then only tiering can be applied. The respective cloud platform details need to be provided here. - TierSettings *TierLevelSettings `json:"tierSettings,omitempty"` - - // Specifies additional retention policies that should be applied to the archived backup. Archived backup snapshot will be retained up to a time that is the maximum of all retention policies that are applicable to it. - ExtendedRetention []*ExtendedRetentionPolicy `json:"extendedRetention"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - - TierSettings *TierLevelSettings `json:"tierSettings,omitempty"` - - ExtendedRetention []*ExtendedRetentionPolicy `json:"extendedRetention"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetID = dataAO1.TargetID - - m.TargetName = dataAO1.TargetName - - m.TargetType = dataAO1.TargetType - - m.TierSettings = dataAO1.TierSettings - - m.ExtendedRetention = dataAO1.ExtendedRetention - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - - TierSettings *TierLevelSettings `json:"tierSettings,omitempty"` - - ExtendedRetention []*ExtendedRetentionPolicy `json:"extendedRetention"` - } - - dataAO1.TargetID = m.TargetID - - dataAO1.TargetName = m.TargetName - - dataAO1.TargetType = m.TargetType - - dataAO1.TierSettings = m.TierSettings - - dataAO1.ExtendedRetention = m.ExtendedRetention - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival config -func (m *ArchivalConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalConfig) validateTargetID(formats strfmt.Registry) error { - - if err := validate.Required("targetId", "body", m.TargetID); err != nil { - return err - } - - return nil -} - -var archivalConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalConfigTypeTargetTypePropEnum = append(archivalConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *ArchivalConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalConfig) validateTargetType(formats strfmt.Registry) error { - - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *ArchivalConfig) validateTierSettings(formats strfmt.Registry) error { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if m.TierSettings != nil { - if err := m.TierSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -func (m *ArchivalConfig) validateExtendedRetention(formats strfmt.Registry) error { - - if swag.IsZero(m.ExtendedRetention) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetention); i++ { - if swag.IsZero(m.ExtendedRetention[i]) { // not required - continue - } - - if m.ExtendedRetention[i] != nil { - if err := m.ExtendedRetention[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this archival config based on the context it is used -func (m *ArchivalConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTierSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalConfig) contextValidateTargetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetName", "body", m.TargetName); err != nil { - return err - } - - return nil -} - -func (m *ArchivalConfig) contextValidateTargetType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetType", "body", m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *ArchivalConfig) contextValidateTierSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.TierSettings != nil { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if err := m.TierSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -func (m *ArchivalConfig) contextValidateExtendedRetention(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetention); i++ { - - if m.ExtendedRetention[i] != nil { - - if swag.IsZero(m.ExtendedRetention[i]) { // not required - return nil - } - - if err := m.ExtendedRetention[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalConfig) UnmarshalBinary(b []byte) error { - var res ArchivalConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_data_stats.go b/v2/models/archival_data_stats.go deleted file mode 100644 index 17ba67ca..00000000 --- a/v2/models/archival_data_stats.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/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalDataStats Archival data statistics. -// -// Specifies statistics about archival data. -// -// swagger:model ArchivalDataStats -type ArchivalDataStats struct { - - // Specifies the logicalSizeBytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies total logical bytes read for creating the snapshot. - BytesRead *int64 `json:"bytesRead,omitempty"` - - // Specifies the logical bytes transferred. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Specifies the physical bytes transferred. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` - - // Specifies the average rate of transfer in bytes per second. - AvgLogicalTransferRateBps *int64 `json:"avgLogicalTransferRateBps,omitempty"` - - // Specifies whether the file system walk is done. Only applicable to file based backups. - FileWalkDone *bool `json:"fileWalkDone,omitempty"` - - // Specifies the total number of file and directory entities visited in this backup. Only applicable to file based backups. - TotalFileCount *int64 `json:"totalFileCount,omitempty"` - - // Specifies the total number of file and directory entities that are backed up in this run. Only applicable to file based backups. - BackupFileCount *int64 `json:"backupFileCount,omitempty"` -} - -// Validate validates this archival data stats -func (m *ArchivalDataStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this archival data stats based on context it is used -func (m *ArchivalDataStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalDataStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalDataStats) UnmarshalBinary(b []byte) error { - var res ArchivalDataStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_external_target_params.go b/v2/models/archival_external_target_params.go deleted file mode 100644 index 6f14eaa3..00000000 --- a/v2/models/archival_external_target_params.go +++ /dev/null @@ -1,526 +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" -) - -// ArchivalExternalTargetParams Specifies the parameters which are specific to Archival purpose type External Targets. -// -// swagger:model ArchivalExternalTargetParams -type ArchivalExternalTargetParams struct { - CommonArchivalExternalTargetParams - - // azure params - AzureParams *ArchivalAzureExternalTargetParams `json:"azureParams,omitempty"` - - // gcp params - GcpParams *ArchivalGcpExternalTargetParams `json:"gcpParams,omitempty"` - - // aws params - AwsParams *ArchivalAwsExternalTargetParams `json:"awsParams,omitempty"` - - // oracle params - OracleParams *ArchivalOracleExternalTargetParams `json:"oracleParams,omitempty"` - - // nas params - NasParams *ArchivalNasExternalTargetParams `json:"nasParams,omitempty"` - - // qstar tape params - QstarTapeParams *ArchivalQstarTapeExternalTargetParams `json:"qstarTapeParams,omitempty"` - - // s3 comp params - S3CompParams *ArchivalS3CompExternalTargetParams `json:"s3CompParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonArchivalExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonArchivalExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - AzureParams *ArchivalAzureExternalTargetParams `json:"azureParams,omitempty"` - - GcpParams *ArchivalGcpExternalTargetParams `json:"gcpParams,omitempty"` - - AwsParams *ArchivalAwsExternalTargetParams `json:"awsParams,omitempty"` - - OracleParams *ArchivalOracleExternalTargetParams `json:"oracleParams,omitempty"` - - NasParams *ArchivalNasExternalTargetParams `json:"nasParams,omitempty"` - - QstarTapeParams *ArchivalQstarTapeExternalTargetParams `json:"qstarTapeParams,omitempty"` - - S3CompParams *ArchivalS3CompExternalTargetParams `json:"s3CompParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AzureParams = dataAO1.AzureParams - - m.GcpParams = dataAO1.GcpParams - - m.AwsParams = dataAO1.AwsParams - - m.OracleParams = dataAO1.OracleParams - - m.NasParams = dataAO1.NasParams - - m.QstarTapeParams = dataAO1.QstarTapeParams - - m.S3CompParams = dataAO1.S3CompParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonArchivalExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AzureParams *ArchivalAzureExternalTargetParams `json:"azureParams,omitempty"` - - GcpParams *ArchivalGcpExternalTargetParams `json:"gcpParams,omitempty"` - - AwsParams *ArchivalAwsExternalTargetParams `json:"awsParams,omitempty"` - - OracleParams *ArchivalOracleExternalTargetParams `json:"oracleParams,omitempty"` - - NasParams *ArchivalNasExternalTargetParams `json:"nasParams,omitempty"` - - QstarTapeParams *ArchivalQstarTapeExternalTargetParams `json:"qstarTapeParams,omitempty"` - - S3CompParams *ArchivalS3CompExternalTargetParams `json:"s3CompParams,omitempty"` - } - - dataAO1.AzureParams = m.AzureParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.NasParams = m.NasParams - - dataAO1.QstarTapeParams = m.QstarTapeParams - - dataAO1.S3CompParams = m.S3CompParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival external target params -func (m *ArchivalExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalExternalTargetParams - if err := m.CommonArchivalExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQstarTapeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3CompParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalExternalTargetParams) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NasParams) { // not required - return nil - } - - if m.NasParams != nil { - if err := m.NasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateQstarTapeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.QstarTapeParams) { // not required - return nil - } - - if m.QstarTapeParams != nil { - if err := m.QstarTapeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qstarTapeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qstarTapeParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) validateS3CompParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3CompParams) { // not required - return nil - } - - if m.S3CompParams != nil { - if err := m.S3CompParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival external target params based on the context it is used -func (m *ArchivalExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonArchivalExternalTargetParams - if err := m.CommonArchivalExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQstarTapeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3CompParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NasParams != nil { - - if swag.IsZero(m.NasParams) { // not required - return nil - } - - if err := m.NasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateQstarTapeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.QstarTapeParams != nil { - - if swag.IsZero(m.QstarTapeParams) { // not required - return nil - } - - if err := m.QstarTapeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qstarTapeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qstarTapeParams") - } - return err - } - } - - return nil -} - -func (m *ArchivalExternalTargetParams) contextValidateS3CompParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3CompParams != nil { - - if swag.IsZero(m.S3CompParams) { // not required - return nil - } - - if err := m.S3CompParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_gcp_external_target_params.go b/v2/models/archival_gcp_external_target_params.go deleted file mode 100644 index 17e8bf20..00000000 --- a/v2/models/archival_gcp_external_target_params.go +++ /dev/null @@ -1,194 +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" -) - -// ArchivalGcpExternalTargetParams GCP Common External Target Request Common Params for archival purpose type. -// -// Specifies the parameters which are specific to GCP related External Targets of archival purpose type. -// -// swagger:model ArchivalGcpExternalTargetParams -type ArchivalGcpExternalTargetParams struct { - CommonGcpExternalTargetParams - - // Specifies the GCP External Target storage class. - // Required: true - // Enum: ["GCPStandard","GCPColdline","GCPNearline"] - StorageClass *string `json:"storageClass"` - - // Specifies the Source Side Deduplication setting for the GCP external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalGcpExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonGcpExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonGcpExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - m.SourceSideDeduplication = dataAO1.SourceSideDeduplication - - m.IsIncrementalArchivalEnabled = dataAO1.IsIncrementalArchivalEnabled - - m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalGcpExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonGcpExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - - dataAO1.StorageClass = m.StorageClass - - dataAO1.SourceSideDeduplication = m.SourceSideDeduplication - - dataAO1.IsIncrementalArchivalEnabled = m.IsIncrementalArchivalEnabled - - dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival gcp external target params -func (m *ArchivalGcpExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonGcpExternalTargetParams - if err := m.CommonGcpExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalGcpExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GCPStandard","GCPColdline","GCPNearline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalGcpExternalTargetParamsTypeStorageClassPropEnum = append(archivalGcpExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *ArchivalGcpExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalGcpExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalGcpExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this archival gcp external target params based on the context it is used -func (m *ArchivalGcpExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonGcpExternalTargetParams - if err := m.CommonGcpExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalGcpExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalGcpExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalGcpExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_media_info.go b/v2/models/archival_media_info.go deleted file mode 100644 index c6af9395..00000000 --- a/v2/models/archival_media_info.go +++ /dev/null @@ -1,91 +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" -) - -// ArchivalMediaInfo Specifies the media information in QStar Archival. -// -// swagger:model ArchivalMediaInfo -type ArchivalMediaInfo struct { - - // Specifies a unique identifier for the media. - // Read Only: true - Barcode *string `json:"barcode,omitempty"` - - // Specifies the location of the offline media as recorded by the backup administrator using media management software. - // Read Only: true - Location *string `json:"location,omitempty"` - - // Specifies a flag that indicates if the media is online or offline. Offline media must be manually loaded into the media library before a recovery can occur. - IsOnline *bool `json:"isOnline,omitempty"` -} - -// Validate validates this archival media info -func (m *ArchivalMediaInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this archival media info based on the context it is used -func (m *ArchivalMediaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBarcode(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocation(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalMediaInfo) contextValidateBarcode(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "barcode", "body", m.Barcode); err != nil { - return err - } - - return nil -} - -func (m *ArchivalMediaInfo) contextValidateLocation(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "location", "body", m.Location); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalMediaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalMediaInfo) UnmarshalBinary(b []byte) error { - var res ArchivalMediaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_nas_external_target_params.go b/v2/models/archival_nas_external_target_params.go deleted file mode 100644 index 1b0fd94c..00000000 --- a/v2/models/archival_nas_external_target_params.go +++ /dev/null @@ -1,293 +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" -) - -// ArchivalNasExternalTargetParams Nas External Target Params for archival purpose type. -// -// Specifies the parameters which are specific to Nas related External Targets of archival purpose type. -// -// swagger:model ArchivalNasExternalTargetParams -type ArchivalNasExternalTargetParams struct { - - // Specifies the host of the NAS external target. - // Required: true - Host *string `json:"host"` - - // Specifies the mount path of the NAS external target. - // Required: true - MountPath *string `json:"mountPath"` - - // Specifies the share type of the NAS external target. - // Read Only: true - // Enum: ["CIFS","NFS"] - ShareType *string `json:"shareType,omitempty"` - - // Specifies the Source Side Deduplication setting for the Nas external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - - // Specifies the NFS version number of the target. - // Enum: ["NFSv3","NFSv4","NFSv4_0","NFSv4_1","NFSv4_2"] - NfsVersionNumber *string `json:"nfsVersionNumber,omitempty"` - - // Specifies the NFS security type of the target. - // Enum: ["Default","None","System","KRB5","KRB5I","KRB5P"] - NfsSecurityType *string `json:"nfsSecurityType,omitempty"` - - // Specifies the Kerberos realm name for a Kerberos-secured target. - KerberosRealmName *string `json:"kerberosRealmName,omitempty"` -} - -// Validate validates this archival nas external target params -func (m *ArchivalNasExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateShareType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsVersionNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsSecurityType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalNasExternalTargetParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *ArchivalNasExternalTargetParams) validateMountPath(formats strfmt.Registry) error { - - if err := validate.Required("mountPath", "body", m.MountPath); err != nil { - return err - } - - return nil -} - -var archivalNasExternalTargetParamsTypeShareTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CIFS","NFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalNasExternalTargetParamsTypeShareTypePropEnum = append(archivalNasExternalTargetParamsTypeShareTypePropEnum, v) - } -} - -const ( - - // ArchivalNasExternalTargetParamsShareTypeCIFS captures enum value "CIFS" - ArchivalNasExternalTargetParamsShareTypeCIFS string = "CIFS" - - // ArchivalNasExternalTargetParamsShareTypeNFS captures enum value "NFS" - ArchivalNasExternalTargetParamsShareTypeNFS string = "NFS" -) - -// prop value enum -func (m *ArchivalNasExternalTargetParams) validateShareTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalNasExternalTargetParamsTypeShareTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalNasExternalTargetParams) validateShareType(formats strfmt.Registry) error { - if swag.IsZero(m.ShareType) { // not required - return nil - } - - // value enum - if err := m.validateShareTypeEnum("shareType", "body", *m.ShareType); err != nil { - return err - } - - return nil -} - -var archivalNasExternalTargetParamsTypeNfsVersionNumberPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NFSv3","NFSv4","NFSv4_0","NFSv4_1","NFSv4_2"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalNasExternalTargetParamsTypeNfsVersionNumberPropEnum = append(archivalNasExternalTargetParamsTypeNfsVersionNumberPropEnum, v) - } -} - -const ( - - // ArchivalNasExternalTargetParamsNfsVersionNumberNFSv3 captures enum value "NFSv3" - ArchivalNasExternalTargetParamsNfsVersionNumberNFSv3 string = "NFSv3" - - // ArchivalNasExternalTargetParamsNfsVersionNumberNFSv4 captures enum value "NFSv4" - ArchivalNasExternalTargetParamsNfsVersionNumberNFSv4 string = "NFSv4" - - // ArchivalNasExternalTargetParamsNfsVersionNumberNFSv40 captures enum value "NFSv4_0" - ArchivalNasExternalTargetParamsNfsVersionNumberNFSv40 string = "NFSv4_0" - - // ArchivalNasExternalTargetParamsNfsVersionNumberNFSv41 captures enum value "NFSv4_1" - ArchivalNasExternalTargetParamsNfsVersionNumberNFSv41 string = "NFSv4_1" - - // ArchivalNasExternalTargetParamsNfsVersionNumberNFSv42 captures enum value "NFSv4_2" - ArchivalNasExternalTargetParamsNfsVersionNumberNFSv42 string = "NFSv4_2" -) - -// prop value enum -func (m *ArchivalNasExternalTargetParams) validateNfsVersionNumberEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalNasExternalTargetParamsTypeNfsVersionNumberPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalNasExternalTargetParams) validateNfsVersionNumber(formats strfmt.Registry) error { - if swag.IsZero(m.NfsVersionNumber) { // not required - return nil - } - - // value enum - if err := m.validateNfsVersionNumberEnum("nfsVersionNumber", "body", *m.NfsVersionNumber); err != nil { - return err - } - - return nil -} - -var archivalNasExternalTargetParamsTypeNfsSecurityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","None","System","KRB5","KRB5I","KRB5P"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalNasExternalTargetParamsTypeNfsSecurityTypePropEnum = append(archivalNasExternalTargetParamsTypeNfsSecurityTypePropEnum, v) - } -} - -const ( - - // ArchivalNasExternalTargetParamsNfsSecurityTypeDefault captures enum value "Default" - ArchivalNasExternalTargetParamsNfsSecurityTypeDefault string = "Default" - - // ArchivalNasExternalTargetParamsNfsSecurityTypeNone captures enum value "None" - ArchivalNasExternalTargetParamsNfsSecurityTypeNone string = "None" - - // ArchivalNasExternalTargetParamsNfsSecurityTypeSystem captures enum value "System" - ArchivalNasExternalTargetParamsNfsSecurityTypeSystem string = "System" - - // ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5 captures enum value "KRB5" - ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5 string = "KRB5" - - // ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5I captures enum value "KRB5I" - ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5I string = "KRB5I" - - // ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5P captures enum value "KRB5P" - ArchivalNasExternalTargetParamsNfsSecurityTypeKRB5P string = "KRB5P" -) - -// prop value enum -func (m *ArchivalNasExternalTargetParams) validateNfsSecurityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalNasExternalTargetParamsTypeNfsSecurityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalNasExternalTargetParams) validateNfsSecurityType(formats strfmt.Registry) error { - if swag.IsZero(m.NfsSecurityType) { // not required - return nil - } - - // value enum - if err := m.validateNfsSecurityTypeEnum("nfsSecurityType", "body", *m.NfsSecurityType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this archival nas external target params based on the context it is used -func (m *ArchivalNasExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateShareType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalNasExternalTargetParams) contextValidateShareType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "shareType", "body", m.ShareType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalNasExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalNasExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalNasExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_oracle_external_target_params.go b/v2/models/archival_oracle_external_target_params.go deleted file mode 100644 index f59a1a7c..00000000 --- a/v2/models/archival_oracle_external_target_params.go +++ /dev/null @@ -1,194 +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" -) - -// ArchivalOracleExternalTargetParams Oracle External Target Request Params for archival purpose type. -// -// Specifies the common parameters which are specific to Oracle related External Targets. -// -// swagger:model ArchivalOracleExternalTargetParams -type ArchivalOracleExternalTargetParams struct { - CommonOracleExternalTargetParams - - // Specifies the Oracle External Target storage class. - // Required: true - // Enum: ["OracleObjectStorage","OracleArchiveStorage"] - StorageClass *string `json:"storageClass"` - - // Specifies the Source Side Deduplication setting for the Oracle external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalOracleExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - m.SourceSideDeduplication = dataAO1.SourceSideDeduplication - - m.IsIncrementalArchivalEnabled = dataAO1.IsIncrementalArchivalEnabled - - m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalOracleExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonOracleExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - - dataAO1.StorageClass = m.StorageClass - - dataAO1.SourceSideDeduplication = m.SourceSideDeduplication - - dataAO1.IsIncrementalArchivalEnabled = m.IsIncrementalArchivalEnabled - - dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival oracle external target params -func (m *ArchivalOracleExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleExternalTargetParams - if err := m.CommonOracleExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalOracleExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OracleObjectStorage","OracleArchiveStorage"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalOracleExternalTargetParamsTypeStorageClassPropEnum = append(archivalOracleExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *ArchivalOracleExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalOracleExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalOracleExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this archival oracle external target params based on the context it is used -func (m *ArchivalOracleExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleExternalTargetParams - if err := m.CommonOracleExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalOracleExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalOracleExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalOracleExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_qstar_tape_external_target_params.go b/v2/models/archival_qstar_tape_external_target_params.go deleted file mode 100644 index 2de50e92..00000000 --- a/v2/models/archival_qstar_tape_external_target_params.go +++ /dev/null @@ -1,173 +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" -) - -// ArchivalQstarTapeExternalTargetParams QStar Tape External Target Params for archival purpose type. -// -// Specifies the parameters which are specific to QStar Tape related External Targets of archival purpose type. -// -// swagger:model ArchivalQstarTapeExternalTargetParams -type ArchivalQstarTapeExternalTargetParams struct { - - // Specifies the host of the QStar Tape external target. - // Required: true - Host *string `json:"host"` - - // Specifies the Web Services Port of the QStar Tape external target. - // Required: true - WebServicesPort *int32 `json:"webServicesPort"` - - // Specifies the Username of the QStar Tape external target. - // Required: true - Username *string `json:"username"` - - // Specifies the Password of the QStar Tape external target. - Password *string `json:"password,omitempty"` - - // Specifies the share type of QStar Tape external target. - // Enum: ["CIFS","NFS"] - ShareType *string `json:"shareType,omitempty"` - - // Specifies whether HTTPS is used or not. - UseHTTPS *bool `json:"useHttps,omitempty"` - - // Specifies the Integral Volume Names of the QStar Tape external target. - IntegralVolumeNames []string `json:"integralVolumeNames"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` -} - -// Validate validates this archival qstar tape external target params -func (m *ArchivalQstarTapeExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWebServicesPort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validateShareType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalQstarTapeExternalTargetParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *ArchivalQstarTapeExternalTargetParams) validateWebServicesPort(formats strfmt.Registry) error { - - if err := validate.Required("webServicesPort", "body", m.WebServicesPort); err != nil { - return err - } - - return nil -} - -func (m *ArchivalQstarTapeExternalTargetParams) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -var archivalQstarTapeExternalTargetParamsTypeShareTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CIFS","NFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalQstarTapeExternalTargetParamsTypeShareTypePropEnum = append(archivalQstarTapeExternalTargetParamsTypeShareTypePropEnum, v) - } -} - -const ( - - // ArchivalQstarTapeExternalTargetParamsShareTypeCIFS captures enum value "CIFS" - ArchivalQstarTapeExternalTargetParamsShareTypeCIFS string = "CIFS" - - // ArchivalQstarTapeExternalTargetParamsShareTypeNFS captures enum value "NFS" - ArchivalQstarTapeExternalTargetParamsShareTypeNFS string = "NFS" -) - -// prop value enum -func (m *ArchivalQstarTapeExternalTargetParams) validateShareTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalQstarTapeExternalTargetParamsTypeShareTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalQstarTapeExternalTargetParams) validateShareType(formats strfmt.Registry) error { - if swag.IsZero(m.ShareType) { // not required - return nil - } - - // value enum - if err := m.validateShareTypeEnum("shareType", "body", *m.ShareType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this archival qstar tape external target params based on context it is used -func (m *ArchivalQstarTapeExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalQstarTapeExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalQstarTapeExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalQstarTapeExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_run.go b/v2/models/archival_run.go deleted file mode 100644 index dc8fb401..00000000 --- a/v2/models/archival_run.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalRun Archival run information for an object. -// -// Specifies information about archival run for an object. -// -// swagger:model ArchivalRun -type ArchivalRun struct { - - // Archival result for an archival target. - ArchivalTargetResults []*ArchivalTargetResult `json:"archivalTargetResults"` -} - -// Validate validates this archival run -func (m *ArchivalRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalRun) validateArchivalTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalTargetResults); i++ { - if swag.IsZero(m.ArchivalTargetResults[i]) { // not required - continue - } - - if m.ArchivalTargetResults[i] != nil { - if err := m.ArchivalTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this archival run based on the context it is used -func (m *ArchivalRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalRun) contextValidateArchivalTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalTargetResults); i++ { - - if m.ArchivalTargetResults[i] != nil { - - if swag.IsZero(m.ArchivalTargetResults[i]) { // not required - return nil - } - - if err := m.ArchivalTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalRun) UnmarshalBinary(b []byte) error { - var res ArchivalRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_run_summary.go b/v2/models/archival_run_summary.go deleted file mode 100644 index bca21f9d..00000000 --- a/v2/models/archival_run_summary.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalRunSummary Summary information for archival run. -// -// Specifies summary information about archival run. -// -// swagger:model ArchivalRunSummary -type ArchivalRunSummary struct { - - // Archival results for each archival target. - ArchivalTargetResults []*ArchivalTargetResult `json:"archivalTargetResults"` -} - -// Validate validates this archival run summary -func (m *ArchivalRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalRunSummary) validateArchivalTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalTargetResults); i++ { - if swag.IsZero(m.ArchivalTargetResults[i]) { // not required - continue - } - - if m.ArchivalTargetResults[i] != nil { - if err := m.ArchivalTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this archival run summary based on the context it is used -func (m *ArchivalRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalRunSummary) contextValidateArchivalTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalTargetResults); i++ { - - if m.ArchivalTargetResults[i] != nil { - - if swag.IsZero(m.ArchivalTargetResults[i]) { // not required - return nil - } - - if err := m.ArchivalTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalRunSummary) UnmarshalBinary(b []byte) error { - var res ArchivalRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_s3_comp_external_target_params.go b/v2/models/archival_s3_comp_external_target_params.go deleted file mode 100644 index 32e24bed..00000000 --- a/v2/models/archival_s3_comp_external_target_params.go +++ /dev/null @@ -1,193 +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" -) - -// ArchivalS3CompExternalTargetParams S3 Compatible Common External Target Request Common Params for archival purpose type. -// -// Specifies the parameters which are specific to S3 Compatible related External Targets of archival purpose type. -// -// swagger:model ArchivalS3CompExternalTargetParams -type ArchivalS3CompExternalTargetParams struct { - CommonS3CompExternalTargetParams - - // Specifies the S3Compatible External Target storage class. - // Enum: ["S3CompatibleRegular","S3CompatibleTapeBased"] - StorageClass *string `json:"storageClass,omitempty"` - - // Specifies the Source Side Deduplication setting for the S3 Compatible external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalS3CompExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonS3CompExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonS3CompExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass,omitempty"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - m.SourceSideDeduplication = dataAO1.SourceSideDeduplication - - m.IsIncrementalArchivalEnabled = dataAO1.IsIncrementalArchivalEnabled - - m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalS3CompExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonS3CompExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass,omitempty"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - - dataAO1.StorageClass = m.StorageClass - - dataAO1.SourceSideDeduplication = m.SourceSideDeduplication - - dataAO1.IsIncrementalArchivalEnabled = m.IsIncrementalArchivalEnabled - - dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival s3 comp external target params -func (m *ArchivalS3CompExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonS3CompExternalTargetParams - if err := m.CommonS3CompExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalS3CompExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["S3CompatibleRegular","S3CompatibleTapeBased"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalS3CompExternalTargetParamsTypeStorageClassPropEnum = append(archivalS3CompExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *ArchivalS3CompExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalS3CompExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalS3CompExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if swag.IsZero(m.StorageClass) { // not required - return nil - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this archival s3 comp external target params based on the context it is used -func (m *ArchivalS3CompExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonS3CompExternalTargetParams - if err := m.CommonS3CompExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalS3CompExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalS3CompExternalTargetParams) UnmarshalBinary(b []byte) error { - var res ArchivalS3CompExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_progress_info.go b/v2/models/archival_target_progress_info.go deleted file mode 100644 index 93ea30ce..00000000 --- a/v2/models/archival_target_progress_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalTargetProgressInfo Specifies the progress of an archival run target. -// -// swagger:model ArchivalTargetProgressInfo -type ArchivalTargetProgressInfo struct { - ArchivalTargetSummaryInfo - - ProgressTaskInfo - - // Specifies progress for objects. - Objects []*ObjectProgressInfo `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalTargetProgressInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ArchivalTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ArchivalTargetSummaryInfo = aO0 - - // AO1 - var aO1 ProgressTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ProgressTaskInfo = aO1 - - // AO2 - var dataAO2 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.Objects = dataAO2.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalTargetProgressInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.ArchivalTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ProgressTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - - dataAO2.Objects = m.Objects - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival target progress info -func (m *ArchivalTargetProgressInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetProgressInfo) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this archival target progress info based on the context it is used -func (m *ArchivalTargetProgressInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetProgressInfo) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetProgressInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetProgressInfo) UnmarshalBinary(b []byte) error { - var res ArchivalTargetProgressInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_result.go b/v2/models/archival_target_result.go deleted file mode 100644 index 9fa348c8..00000000 --- a/v2/models/archival_target_result.go +++ /dev/null @@ -1,621 +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" -) - -// ArchivalTargetResult Archival result for a target. -// -// Archival result for an archival target. -// -// swagger:model ArchivalTargetResult -type ArchivalTargetResult struct { - ArchivalTargetSummaryInfo - - // Type of Protection Group run. 'kRegular' indicates an incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a kRegular schedule captures all the blocks. 'kFull' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. 'kLog' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. 'kSystem' indicates system volume backup. It produces an image for bare metal recovery. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Indicated if SLA has been violated for this run. - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - // Snapshot id for a successful snapshot. This field will not be set if the archival Run fails to take the snapshot. - SnapshotID *string `json:"snapshotId,omitempty"` - - // Specifies the start time of replication run in Unix epoch Timestamp(in microseconds) for an archival target. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of replication run in Unix epoch Timestamp(in microseconds) for an archival target. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the time when the archival is queued for schedule in Unix epoch Timestamp(in microseconds) for a target. - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - // Whether this is an incremental archive. If set to true, this is an incremental archive, otherwise this is a full archive. - IsIncremental *bool `json:"isIncremental,omitempty"` - - // Whether this is forever incremental or not - IsForeverIncremental *bool `json:"isForeverIncremental,omitempty"` - - // Whether this is CAD archive or not - IsCadArchive *bool `json:"isCadArchive,omitempty"` - - // Status of the replication run for an archival target. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Message about the archival run. - Message *string `json:"message,omitempty"` - - // Progress monitor task id for archival. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Run Stats task id for archival. - StatsTaskID *string `json:"statsTaskId,omitempty"` - - // Progress monitor task for indexing. - IndexingTaskID *string `json:"indexingTaskId,omitempty"` - - // Specifies the count of objects for which backup was successful. - SuccessfulObjectsCount *int64 `json:"successfulObjectsCount,omitempty"` - - // Specifies the count of objects for which backup failed. - FailedObjectsCount *int64 `json:"failedObjectsCount,omitempty"` - - // Specifies the count of objects for which backup was cancelled. - CancelledObjectsCount *int64 `json:"cancelledObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup was successful. - SuccessfulAppObjectsCount *int32 `json:"successfulAppObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup failed. - FailedAppObjectsCount *int32 `json:"failedAppObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup was cancelled. - CancelledAppObjectsCount *int32 `json:"cancelledAppObjectsCount,omitempty"` - - // Archival data statistics for a target. - Stats *ArchivalDataStats `json:"stats,omitempty"` - - // Specifies whether the snapshot is deleted manually. - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - // Specifies the expiry time of attempt in Unix epoch Timestamp (in microseconds). - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the dataLock constraints for the archival target. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - // Specifies the legal hold status for a archival target. - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - // Specifies the worm related properties for this archive. - WormProperties *WormProperties `json:"wormProperties,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalTargetResult) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ArchivalTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ArchivalTargetSummaryInfo = aO0 - - // AO1 - var dataAO1 struct { - RunType *string `json:"runType,omitempty"` - - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - SnapshotID *string `json:"snapshotId,omitempty"` - - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - IsIncremental *bool `json:"isIncremental,omitempty"` - - IsForeverIncremental *bool `json:"isForeverIncremental,omitempty"` - - IsCadArchive *bool `json:"isCadArchive,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - StatsTaskID *string `json:"statsTaskId,omitempty"` - - IndexingTaskID *string `json:"indexingTaskId,omitempty"` - - SuccessfulObjectsCount *int64 `json:"successfulObjectsCount,omitempty"` - - FailedObjectsCount *int64 `json:"failedObjectsCount,omitempty"` - - CancelledObjectsCount *int64 `json:"cancelledObjectsCount,omitempty"` - - SuccessfulAppObjectsCount *int32 `json:"successfulAppObjectsCount,omitempty"` - - FailedAppObjectsCount *int32 `json:"failedAppObjectsCount,omitempty"` - - CancelledAppObjectsCount *int32 `json:"cancelledAppObjectsCount,omitempty"` - - Stats *ArchivalDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - WormProperties *WormProperties `json:"wormProperties,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.RunType = dataAO1.RunType - - m.IsSLAViolated = dataAO1.IsSLAViolated - - m.SnapshotID = dataAO1.SnapshotID - - m.StartTimeUsecs = dataAO1.StartTimeUsecs - - m.EndTimeUsecs = dataAO1.EndTimeUsecs - - m.QueuedTimeUsecs = dataAO1.QueuedTimeUsecs - - m.IsIncremental = dataAO1.IsIncremental - - m.IsForeverIncremental = dataAO1.IsForeverIncremental - - m.IsCadArchive = dataAO1.IsCadArchive - - m.Status = dataAO1.Status - - m.Message = dataAO1.Message - - m.ProgressTaskID = dataAO1.ProgressTaskID - - m.StatsTaskID = dataAO1.StatsTaskID - - m.IndexingTaskID = dataAO1.IndexingTaskID - - m.SuccessfulObjectsCount = dataAO1.SuccessfulObjectsCount - - m.FailedObjectsCount = dataAO1.FailedObjectsCount - - m.CancelledObjectsCount = dataAO1.CancelledObjectsCount - - m.SuccessfulAppObjectsCount = dataAO1.SuccessfulAppObjectsCount - - m.FailedAppObjectsCount = dataAO1.FailedAppObjectsCount - - m.CancelledAppObjectsCount = dataAO1.CancelledAppObjectsCount - - m.Stats = dataAO1.Stats - - m.IsManuallyDeleted = dataAO1.IsManuallyDeleted - - m.ExpiryTimeUsecs = dataAO1.ExpiryTimeUsecs - - m.DataLockConstraints = dataAO1.DataLockConstraints - - m.OnLegalHold = dataAO1.OnLegalHold - - m.WormProperties = dataAO1.WormProperties - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalTargetResult) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ArchivalTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - RunType *string `json:"runType,omitempty"` - - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - SnapshotID *string `json:"snapshotId,omitempty"` - - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - IsIncremental *bool `json:"isIncremental,omitempty"` - - IsForeverIncremental *bool `json:"isForeverIncremental,omitempty"` - - IsCadArchive *bool `json:"isCadArchive,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - StatsTaskID *string `json:"statsTaskId,omitempty"` - - IndexingTaskID *string `json:"indexingTaskId,omitempty"` - - SuccessfulObjectsCount *int64 `json:"successfulObjectsCount,omitempty"` - - FailedObjectsCount *int64 `json:"failedObjectsCount,omitempty"` - - CancelledObjectsCount *int64 `json:"cancelledObjectsCount,omitempty"` - - SuccessfulAppObjectsCount *int32 `json:"successfulAppObjectsCount,omitempty"` - - FailedAppObjectsCount *int32 `json:"failedAppObjectsCount,omitempty"` - - CancelledAppObjectsCount *int32 `json:"cancelledAppObjectsCount,omitempty"` - - Stats *ArchivalDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - WormProperties *WormProperties `json:"wormProperties,omitempty"` - } - - dataAO1.RunType = m.RunType - - dataAO1.IsSLAViolated = m.IsSLAViolated - - dataAO1.SnapshotID = m.SnapshotID - - dataAO1.StartTimeUsecs = m.StartTimeUsecs - - dataAO1.EndTimeUsecs = m.EndTimeUsecs - - dataAO1.QueuedTimeUsecs = m.QueuedTimeUsecs - - dataAO1.IsIncremental = m.IsIncremental - - dataAO1.IsForeverIncremental = m.IsForeverIncremental - - dataAO1.IsCadArchive = m.IsCadArchive - - dataAO1.Status = m.Status - - dataAO1.Message = m.Message - - dataAO1.ProgressTaskID = m.ProgressTaskID - - dataAO1.StatsTaskID = m.StatsTaskID - - dataAO1.IndexingTaskID = m.IndexingTaskID - - dataAO1.SuccessfulObjectsCount = m.SuccessfulObjectsCount - - dataAO1.FailedObjectsCount = m.FailedObjectsCount - - dataAO1.CancelledObjectsCount = m.CancelledObjectsCount - - dataAO1.SuccessfulAppObjectsCount = m.SuccessfulAppObjectsCount - - dataAO1.FailedAppObjectsCount = m.FailedAppObjectsCount - - dataAO1.CancelledAppObjectsCount = m.CancelledAppObjectsCount - - dataAO1.Stats = m.Stats - - dataAO1.IsManuallyDeleted = m.IsManuallyDeleted - - dataAO1.ExpiryTimeUsecs = m.ExpiryTimeUsecs - - dataAO1.DataLockConstraints = m.DataLockConstraints - - dataAO1.OnLegalHold = m.OnLegalHold - - dataAO1.WormProperties = m.WormProperties - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival target result -func (m *ArchivalTargetResult) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalTargetResultTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetResultTypeRunTypePropEnum = append(archivalTargetResultTypeRunTypePropEnum, v) - } -} - -// property enum -func (m *ArchivalTargetResult) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetResultTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetResult) validateRunType(formats strfmt.Registry) error { - - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -var archivalTargetResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetResultTypeStatusPropEnum = append(archivalTargetResultTypeStatusPropEnum, v) - } -} - -// property enum -func (m *ArchivalTargetResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetResult) validateStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *ArchivalTargetResult) validateStats(formats strfmt.Registry) error { - - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *ArchivalTargetResult) validateDataLockConstraints(formats strfmt.Registry) error { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *ArchivalTargetResult) validateWormProperties(formats strfmt.Registry) error { - - if swag.IsZero(m.WormProperties) { // not required - return nil - } - - if m.WormProperties != nil { - if err := m.WormProperties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormProperties") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival target result based on the context it is used -func (m *ArchivalTargetResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWormProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetResult) 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 -} - -func (m *ArchivalTargetResult) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -func (m *ArchivalTargetResult) contextValidateWormProperties(ctx context.Context, formats strfmt.Registry) error { - - if m.WormProperties != nil { - - if swag.IsZero(m.WormProperties) { // not required - return nil - } - - if err := m.WormProperties.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormProperties") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormProperties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetResult) UnmarshalBinary(b []byte) error { - var res ArchivalTargetResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_stats_info.go b/v2/models/archival_target_stats_info.go deleted file mode 100644 index ce26e8b8..00000000 --- a/v2/models/archival_target_stats_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ArchivalTargetStatsInfo Specifies the stats of an archival run target. -// -// swagger:model ArchivalTargetStatsInfo -type ArchivalTargetStatsInfo struct { - ArchivalTargetSummaryInfo - - StatsTaskInfo - - // Specifies stats for objects. - Objects []*ObjectStatsInfo `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalTargetStatsInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ArchivalTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ArchivalTargetSummaryInfo = aO0 - - // AO1 - var aO1 StatsTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.StatsTaskInfo = aO1 - - // AO2 - var dataAO2 struct { - Objects []*ObjectStatsInfo `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.Objects = dataAO2.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalTargetStatsInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.ArchivalTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.StatsTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - Objects []*ObjectStatsInfo `json:"objects"` - } - - dataAO2.Objects = m.Objects - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival target stats info -func (m *ArchivalTargetStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetStatsInfo) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this archival target stats info based on the context it is used -func (m *ArchivalTargetStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetStatsInfo) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetStatsInfo) UnmarshalBinary(b []byte) error { - var res ArchivalTargetStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_storage_type.go b/v2/models/archival_target_storage_type.go deleted file mode 100644 index 70dec8a6..00000000 --- a/v2/models/archival_target_storage_type.go +++ /dev/null @@ -1,125 +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" -) - -// ArchivalTargetStorageType Archival Target Storage Type -// -// Specifies the storage type of External Target of archival purpose type. -// -// swagger:model ArchivalTargetStorageType -type ArchivalTargetStorageType struct { - - // Specifies the storage type of External Target of archival purpose type. Nas option in archival_target_storage_type will soon be deprecated. Please use NAS instead. - // Enum: ["Azure","Google","AWS","Oracle","Nas","NAS","QStarTape","S3Compatible"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this archival target storage type -func (m *ArchivalTargetStorageType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalTargetStorageTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","Google","AWS","Oracle","Nas","NAS","QStarTape","S3Compatible"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetStorageTypeTypeEnumPropEnum = append(archivalTargetStorageTypeTypeEnumPropEnum, v) - } -} - -const ( - - // ArchivalTargetStorageTypeEnumAzure captures enum value "Azure" - ArchivalTargetStorageTypeEnumAzure string = "Azure" - - // ArchivalTargetStorageTypeEnumGoogle captures enum value "Google" - ArchivalTargetStorageTypeEnumGoogle string = "Google" - - // ArchivalTargetStorageTypeEnumAWS captures enum value "AWS" - ArchivalTargetStorageTypeEnumAWS string = "AWS" - - // ArchivalTargetStorageTypeEnumOracle captures enum value "Oracle" - ArchivalTargetStorageTypeEnumOracle string = "Oracle" - - // ArchivalTargetStorageTypeEnumNas captures enum value "Nas" - ArchivalTargetStorageTypeEnumNas string = "Nas" - - // ArchivalTargetStorageTypeEnumNAS captures enum value "NAS" - ArchivalTargetStorageTypeEnumNAS string = "NAS" - - // ArchivalTargetStorageTypeEnumQStarTape captures enum value "QStarTape" - ArchivalTargetStorageTypeEnumQStarTape string = "QStarTape" - - // ArchivalTargetStorageTypeEnumS3Compatible captures enum value "S3Compatible" - ArchivalTargetStorageTypeEnumS3Compatible string = "S3Compatible" -) - -// prop value enum -func (m *ArchivalTargetStorageType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetStorageTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetStorageType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this archival target storage type based on context it is used -func (m *ArchivalTargetStorageType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetStorageType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetStorageType) UnmarshalBinary(b []byte) error { - var res ArchivalTargetStorageType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_summary_info.go b/v2/models/archival_target_summary_info.go deleted file mode 100644 index 03fc8bb7..00000000 --- a/v2/models/archival_target_summary_info.go +++ /dev/null @@ -1,278 +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" -) - -// ArchivalTargetSummaryInfo Archival target. -// -// Specifies archival target summary information. -// -// swagger:model ArchivalTargetSummaryInfo -type ArchivalTargetSummaryInfo struct { - - // Specifies the archival target ID. - TargetID *int64 `json:"targetId,omitempty"` - - // Specifies the archival task id. This is a protection group UID which only applies when archival type is 'Tape'. - ArchivalTaskID *string `json:"archivalTaskId,omitempty"` - - // Specifies the archival target name. - TargetName *string `json:"targetName,omitempty"` - - // Specifies the archival target type. - // Enum: ["Tape","Cloud","Nas"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the usage type for the target. - // Enum: ["Archival","Tiering","Rpaas"] - UsageType *string `json:"usageType,omitempty"` - - // Specifies the ownership context for the target. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies the tier level settings configured with archival target. This will be specified if the run is a CAD run. - TierSettings *ArchivalTargetTierInfo `json:"tierSettings,omitempty"` -} - -// Validate validates this archival target summary info -func (m *ArchivalTargetSummaryInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalTargetSummaryInfoTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetSummaryInfoTypeTargetTypePropEnum = append(archivalTargetSummaryInfoTypeTargetTypePropEnum, v) - } -} - -const ( - - // ArchivalTargetSummaryInfoTargetTypeTape captures enum value "Tape" - ArchivalTargetSummaryInfoTargetTypeTape string = "Tape" - - // ArchivalTargetSummaryInfoTargetTypeCloud captures enum value "Cloud" - ArchivalTargetSummaryInfoTargetTypeCloud string = "Cloud" - - // ArchivalTargetSummaryInfoTargetTypeNas captures enum value "Nas" - ArchivalTargetSummaryInfoTargetTypeNas string = "Nas" -) - -// prop value enum -func (m *ArchivalTargetSummaryInfo) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetSummaryInfoTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetSummaryInfo) validateTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -var archivalTargetSummaryInfoTypeUsageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Archival","Tiering","Rpaas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetSummaryInfoTypeUsageTypePropEnum = append(archivalTargetSummaryInfoTypeUsageTypePropEnum, v) - } -} - -const ( - - // ArchivalTargetSummaryInfoUsageTypeArchival captures enum value "Archival" - ArchivalTargetSummaryInfoUsageTypeArchival string = "Archival" - - // ArchivalTargetSummaryInfoUsageTypeTiering captures enum value "Tiering" - ArchivalTargetSummaryInfoUsageTypeTiering string = "Tiering" - - // ArchivalTargetSummaryInfoUsageTypeRpaas captures enum value "Rpaas" - ArchivalTargetSummaryInfoUsageTypeRpaas string = "Rpaas" -) - -// prop value enum -func (m *ArchivalTargetSummaryInfo) validateUsageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetSummaryInfoTypeUsageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetSummaryInfo) validateUsageType(formats strfmt.Registry) error { - if swag.IsZero(m.UsageType) { // not required - return nil - } - - // value enum - if err := m.validateUsageTypeEnum("usageType", "body", *m.UsageType); err != nil { - return err - } - - return nil -} - -var archivalTargetSummaryInfoTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetSummaryInfoTypeOwnershipContextPropEnum = append(archivalTargetSummaryInfoTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // ArchivalTargetSummaryInfoOwnershipContextLocal captures enum value "Local" - ArchivalTargetSummaryInfoOwnershipContextLocal string = "Local" - - // ArchivalTargetSummaryInfoOwnershipContextFortKnox captures enum value "FortKnox" - ArchivalTargetSummaryInfoOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *ArchivalTargetSummaryInfo) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetSummaryInfoTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetSummaryInfo) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -func (m *ArchivalTargetSummaryInfo) validateTierSettings(formats strfmt.Registry) error { - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if m.TierSettings != nil { - if err := m.TierSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this archival target summary info based on the context it is used -func (m *ArchivalTargetSummaryInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTierSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ArchivalTargetSummaryInfo) contextValidateTierSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.TierSettings != nil { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if err := m.TierSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetSummaryInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetSummaryInfo) UnmarshalBinary(b []byte) error { - var res ArchivalTargetSummaryInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_target_tier_info.go b/v2/models/archival_target_tier_info.go deleted file mode 100644 index 11e00d2a..00000000 --- a/v2/models/archival_target_tier_info.go +++ /dev/null @@ -1,160 +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" -) - -// ArchivalTargetTierInfo Archival Target Tier Info -// -// Specifies the tier info for archival. -// -// swagger:model ArchivalTargetTierInfo -type ArchivalTargetTierInfo struct { - TierLevelSettings - - // Specifies the type of the current tier where the snapshot resides. This will be specified if the run is a CAD run. - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAzureTierHot","kAzureTierCool","kAzureTierArchive","kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline","kOracleTierStandard","kOracleTierArchive"] - CurrentTierType *string `json:"currentTierType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ArchivalTargetTierInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TierLevelSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TierLevelSettings = aO0 - - // AO1 - var dataAO1 struct { - CurrentTierType *string `json:"currentTierType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CurrentTierType = dataAO1.CurrentTierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ArchivalTargetTierInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.TierLevelSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CurrentTierType *string `json:"currentTierType,omitempty"` - } - - dataAO1.CurrentTierType = m.CurrentTierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this archival target tier info -func (m *ArchivalTargetTierInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TierLevelSettings - if err := m.TierLevelSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCurrentTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalTargetTierInfoTypeCurrentTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAzureTierHot","kAzureTierCool","kAzureTierArchive","kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline","kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetTierInfoTypeCurrentTierTypePropEnum = append(archivalTargetTierInfoTypeCurrentTierTypePropEnum, v) - } -} - -// property enum -func (m *ArchivalTargetTierInfo) validateCurrentTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetTierInfoTypeCurrentTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargetTierInfo) validateCurrentTierType(formats strfmt.Registry) error { - - if swag.IsZero(m.CurrentTierType) { // not required - return nil - } - - // value enum - if err := m.validateCurrentTierTypeEnum("currentTierType", "body", *m.CurrentTierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this archival target tier info based on the context it is used -func (m *ArchivalTargetTierInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TierLevelSettings - if err := m.TierLevelSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargetTierInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargetTierInfo) UnmarshalBinary(b []byte) error { - var res ArchivalTargetTierInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/archival_targets.go b/v2/models/archival_targets.go deleted file mode 100644 index 3bdda3a4..00000000 --- a/v2/models/archival_targets.go +++ /dev/null @@ -1,110 +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" -) - -// ArchivalTargets ArchivalTargets -// -// # Archival Targets -// -// swagger:model ArchivalTargets -type ArchivalTargets struct { - - // Specifies the archival target. - // Enum: ["Tape","Cloud","Nas"] - ArchivalTargets string `json:"archivalTargets,omitempty"` -} - -// Validate validates this archival targets -func (m *ArchivalTargets) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var archivalTargetsTypeArchivalTargetsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - archivalTargetsTypeArchivalTargetsPropEnum = append(archivalTargetsTypeArchivalTargetsPropEnum, v) - } -} - -const ( - - // ArchivalTargetsArchivalTargetsTape captures enum value "Tape" - ArchivalTargetsArchivalTargetsTape string = "Tape" - - // ArchivalTargetsArchivalTargetsCloud captures enum value "Cloud" - ArchivalTargetsArchivalTargetsCloud string = "Cloud" - - // ArchivalTargetsArchivalTargetsNas captures enum value "Nas" - ArchivalTargetsArchivalTargetsNas string = "Nas" -) - -// prop value enum -func (m *ArchivalTargets) validateArchivalTargetsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, archivalTargetsTypeArchivalTargetsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ArchivalTargets) validateArchivalTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargets) { // not required - return nil - } - - // value enum - if err := m.validateArchivalTargetsEnum("archivalTargets", "body", m.ArchivalTargets); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this archival targets based on context it is used -func (m *ArchivalTargets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ArchivalTargets) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ArchivalTargets) UnmarshalBinary(b []byte) error { - var res ArchivalTargets - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/assigned_sources.go b/v2/models/assigned_sources.go deleted file mode 100644 index 9ca4d992..00000000 --- a/v2/models/assigned_sources.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" -) - -// AssignedSources Sources assigned to a user. -// -// swagger:model AssignedSources -type AssignedSources struct { - - // Specifies a list of source Ids assigned to a principal. - SourceIds []int64 `json:"sourceIds,omitempty"` - - // Specifies a list of view Ids assigned to a principal. - ViewIds []int64 `json:"viewIds,omitempty"` -} - -// Validate validates this assigned sources -func (m *AssignedSources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this assigned sources based on context it is used -func (m *AssignedSources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AssignedSources) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AssignedSources) UnmarshalBinary(b []byte) error { - var res AssignedSources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/associate_entity_metadata_request.go b/v2/models/associate_entity_metadata_request.go deleted file mode 100644 index 24f205db..00000000 --- a/v2/models/associate_entity_metadata_request.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AssociateEntityMetadataRequest Specifies the parameters to associate metadata with entities in the entity hierarchy. -// -// swagger:model AssociateEntityMetadataRequest -type AssociateEntityMetadataRequest struct { - - // Specifies the source id of the entities vector whose metadata is being updated. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies a list of entity and associated metadata mappings. - // Required: true - EntityList []*EntityMetadataParams `json:"entityList"` -} - -// Validate validates this associate entity metadata request -func (m *AssociateEntityMetadataRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AssociateEntityMetadataRequest) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AssociateEntityMetadataRequest) validateEntityList(formats strfmt.Registry) error { - - if err := validate.Required("entityList", "body", m.EntityList); err != nil { - return err - } - - for i := 0; i < len(m.EntityList); i++ { - if swag.IsZero(m.EntityList[i]) { // not required - continue - } - - if m.EntityList[i] != nil { - if err := m.EntityList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this associate entity metadata request based on the context it is used -func (m *AssociateEntityMetadataRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AssociateEntityMetadataRequest) contextValidateEntityList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityList); i++ { - - if m.EntityList[i] != nil { - - if swag.IsZero(m.EntityList[i]) { // not required - return nil - } - - if err := m.EntityList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AssociateEntityMetadataRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AssociateEntityMetadataRequest) UnmarshalBinary(b []byte) error { - var res AssociateEntityMetadataRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/associate_entity_metadata_result.go b/v2/models/associate_entity_metadata_result.go deleted file mode 100644 index cd75056d..00000000 --- a/v2/models/associate_entity_metadata_result.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AssociateEntityMetadataResult Specifies the response for the AssociateEntityMetadataRequest. -// -// swagger:model AssociateEntityMetadataResult -type AssociateEntityMetadataResult struct { - - // Specifies the source id of the entities vector whose metadata is being updated. - SourceID int64 `json:"sourceId,omitempty"` - - // Specifies the list of entity ids mapped to errors (if any). - EntityList []*AssociateEntityMetadataResultParams `json:"entityList"` -} - -// Validate validates this associate entity metadata result -func (m *AssociateEntityMetadataResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AssociateEntityMetadataResult) validateEntityList(formats strfmt.Registry) error { - if swag.IsZero(m.EntityList) { // not required - return nil - } - - for i := 0; i < len(m.EntityList); i++ { - if swag.IsZero(m.EntityList[i]) { // not required - continue - } - - if m.EntityList[i] != nil { - if err := m.EntityList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this associate entity metadata result based on the context it is used -func (m *AssociateEntityMetadataResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AssociateEntityMetadataResult) contextValidateEntityList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityList); i++ { - - if m.EntityList[i] != nil { - - if swag.IsZero(m.EntityList[i]) { // not required - return nil - } - - if err := m.EntityList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AssociateEntityMetadataResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AssociateEntityMetadataResult) UnmarshalBinary(b []byte) error { - var res AssociateEntityMetadataResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/associate_entity_metadata_result_params.go b/v2/models/associate_entity_metadata_result_params.go deleted file mode 100644 index 49ef8dc3..00000000 --- a/v2/models/associate_entity_metadata_result_params.go +++ /dev/null @@ -1,56 +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" -) - -// AssociateEntityMetadataResultParams Specifies the response parameters for the AssociateEntityMetadataRequest. -// -// swagger:model AssociateEntityMetadataResultParams -type AssociateEntityMetadataResultParams struct { - - // Specifies the entity id of the object. - EntityID int64 `json:"entityId,omitempty"` - - // Specifies an error type(if any) corresponding to this entityId. - ErrorType *string `json:"errorType,omitempty"` - - // Specifies an error message (if any) corresponding to this entityId. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this associate entity metadata result params -func (m *AssociateEntityMetadataResultParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this associate entity metadata result params based on context it is used -func (m *AssociateEntityMetadataResultParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AssociateEntityMetadataResultParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AssociateEntityMetadataResultParams) UnmarshalBinary(b []byte) error { - var res AssociateEntityMetadataResultParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/attachment.go b/v2/models/attachment.go deleted file mode 100644 index 0c4389bf..00000000 --- a/v2/models/attachment.go +++ /dev/null @@ -1,142 +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" -) - -// Attachment Specifies the attachment information of a firewall profile. -// -// swagger:model Attachment -type Attachment struct { - - // Specifies the network interfaces - Interfaces []string `json:"interfaces,omitempty"` - - // Specifies the network interface groups. - InterfaceGroups []string `json:"interfaceGroups,omitempty"` - - // Specifies the ip sets. - IpsetNames []string `json:"ipsetNames,omitempty"` - - // is implicit - // Read Only: true - IsImplicit *bool `json:"isImplicit,omitempty"` - - // Specifies a description for the attachment. - Description *string `json:"description,omitempty"` - - // Specifies the action. - // Enum: ["allow","deny","return"] - Action *string `json:"action,omitempty"` -} - -// Validate validates this attachment -func (m *Attachment) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var attachmentTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["allow","deny","return"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - attachmentTypeActionPropEnum = append(attachmentTypeActionPropEnum, v) - } -} - -const ( - - // AttachmentActionAllow captures enum value "allow" - AttachmentActionAllow string = "allow" - - // AttachmentActionDeny captures enum value "deny" - AttachmentActionDeny string = "deny" - - // AttachmentActionReturn captures enum value "return" - AttachmentActionReturn string = "return" -) - -// prop value enum -func (m *Attachment) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, attachmentTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Attachment) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this attachment based on the context it is used -func (m *Attachment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIsImplicit(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Attachment) contextValidateIsImplicit(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isImplicit", "body", m.IsImplicit); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Attachment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Attachment) UnmarshalBinary(b []byte) error { - var res Attachment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_actions.go b/v2/models/audit_actions.go deleted file mode 100644 index a2c0cb07..00000000 --- a/v2/models/audit_actions.go +++ /dev/null @@ -1,272 +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" -) - -// AuditActions Audit Actions -// -// # Audit Actions -// -// swagger:model AuditActions -type AuditActions struct { - - // Audit Actions - // Enum: ["Login","Logout","Create","Modify","Delete","Activate","Deactivate","Pause","Resume","RunNow","Clone","Recover","Cancel","Register","Unregister","Update","Refresh","Upgrade","Upload","Download","Rename","Accept","Mark","Close","Join","DisJoin","Overwrite","MarkRemoval","CloudSpin","Assign","Unassign","NotificationRule","ScheduleReport","Install","Uninstall","Stop","Start","Restart","RunDiagnostics","Apply","Revert","Import","Validate","ClusterExpand","Fetch","Search","PrepareFailover","Failover","PrepareFailback","Failback","Teardown","RetryReplication","ManualSync","Protect","RetryExecution","Add","Schedule"] - Actions string `json:"actions,omitempty"` -} - -// Validate validates this audit actions -func (m *AuditActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var auditActionsTypeActionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Login","Logout","Create","Modify","Delete","Activate","Deactivate","Pause","Resume","RunNow","Clone","Recover","Cancel","Register","Unregister","Update","Refresh","Upgrade","Upload","Download","Rename","Accept","Mark","Close","Join","DisJoin","Overwrite","MarkRemoval","CloudSpin","Assign","Unassign","NotificationRule","ScheduleReport","Install","Uninstall","Stop","Start","Restart","RunDiagnostics","Apply","Revert","Import","Validate","ClusterExpand","Fetch","Search","PrepareFailover","Failover","PrepareFailback","Failback","Teardown","RetryReplication","ManualSync","Protect","RetryExecution","Add","Schedule"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - auditActionsTypeActionsPropEnum = append(auditActionsTypeActionsPropEnum, v) - } -} - -const ( - - // AuditActionsActionsLogin captures enum value "Login" - AuditActionsActionsLogin string = "Login" - - // AuditActionsActionsLogout captures enum value "Logout" - AuditActionsActionsLogout string = "Logout" - - // AuditActionsActionsCreate captures enum value "Create" - AuditActionsActionsCreate string = "Create" - - // AuditActionsActionsModify captures enum value "Modify" - AuditActionsActionsModify string = "Modify" - - // AuditActionsActionsDelete captures enum value "Delete" - AuditActionsActionsDelete string = "Delete" - - // AuditActionsActionsActivate captures enum value "Activate" - AuditActionsActionsActivate string = "Activate" - - // AuditActionsActionsDeactivate captures enum value "Deactivate" - AuditActionsActionsDeactivate string = "Deactivate" - - // AuditActionsActionsPause captures enum value "Pause" - AuditActionsActionsPause string = "Pause" - - // AuditActionsActionsResume captures enum value "Resume" - AuditActionsActionsResume string = "Resume" - - // AuditActionsActionsRunNow captures enum value "RunNow" - AuditActionsActionsRunNow string = "RunNow" - - // AuditActionsActionsClone captures enum value "Clone" - AuditActionsActionsClone string = "Clone" - - // AuditActionsActionsRecover captures enum value "Recover" - AuditActionsActionsRecover string = "Recover" - - // AuditActionsActionsCancel captures enum value "Cancel" - AuditActionsActionsCancel string = "Cancel" - - // AuditActionsActionsRegister captures enum value "Register" - AuditActionsActionsRegister string = "Register" - - // AuditActionsActionsUnregister captures enum value "Unregister" - AuditActionsActionsUnregister string = "Unregister" - - // AuditActionsActionsUpdate captures enum value "Update" - AuditActionsActionsUpdate string = "Update" - - // AuditActionsActionsRefresh captures enum value "Refresh" - AuditActionsActionsRefresh string = "Refresh" - - // AuditActionsActionsUpgrade captures enum value "Upgrade" - AuditActionsActionsUpgrade string = "Upgrade" - - // AuditActionsActionsUpload captures enum value "Upload" - AuditActionsActionsUpload string = "Upload" - - // AuditActionsActionsDownload captures enum value "Download" - AuditActionsActionsDownload string = "Download" - - // AuditActionsActionsRename captures enum value "Rename" - AuditActionsActionsRename string = "Rename" - - // AuditActionsActionsAccept captures enum value "Accept" - AuditActionsActionsAccept string = "Accept" - - // AuditActionsActionsMark captures enum value "Mark" - AuditActionsActionsMark string = "Mark" - - // AuditActionsActionsClose captures enum value "Close" - AuditActionsActionsClose string = "Close" - - // AuditActionsActionsJoin captures enum value "Join" - AuditActionsActionsJoin string = "Join" - - // AuditActionsActionsDisJoin captures enum value "DisJoin" - AuditActionsActionsDisJoin string = "DisJoin" - - // AuditActionsActionsOverwrite captures enum value "Overwrite" - AuditActionsActionsOverwrite string = "Overwrite" - - // AuditActionsActionsMarkRemoval captures enum value "MarkRemoval" - AuditActionsActionsMarkRemoval string = "MarkRemoval" - - // AuditActionsActionsCloudSpin captures enum value "CloudSpin" - AuditActionsActionsCloudSpin string = "CloudSpin" - - // AuditActionsActionsAssign captures enum value "Assign" - AuditActionsActionsAssign string = "Assign" - - // AuditActionsActionsUnassign captures enum value "Unassign" - AuditActionsActionsUnassign string = "Unassign" - - // AuditActionsActionsNotificationRule captures enum value "NotificationRule" - AuditActionsActionsNotificationRule string = "NotificationRule" - - // AuditActionsActionsScheduleReport captures enum value "ScheduleReport" - AuditActionsActionsScheduleReport string = "ScheduleReport" - - // AuditActionsActionsInstall captures enum value "Install" - AuditActionsActionsInstall string = "Install" - - // AuditActionsActionsUninstall captures enum value "Uninstall" - AuditActionsActionsUninstall string = "Uninstall" - - // AuditActionsActionsStop captures enum value "Stop" - AuditActionsActionsStop string = "Stop" - - // AuditActionsActionsStart captures enum value "Start" - AuditActionsActionsStart string = "Start" - - // AuditActionsActionsRestart captures enum value "Restart" - AuditActionsActionsRestart string = "Restart" - - // AuditActionsActionsRunDiagnostics captures enum value "RunDiagnostics" - AuditActionsActionsRunDiagnostics string = "RunDiagnostics" - - // AuditActionsActionsApply captures enum value "Apply" - AuditActionsActionsApply string = "Apply" - - // AuditActionsActionsRevert captures enum value "Revert" - AuditActionsActionsRevert string = "Revert" - - // AuditActionsActionsImport captures enum value "Import" - AuditActionsActionsImport string = "Import" - - // AuditActionsActionsValidate captures enum value "Validate" - AuditActionsActionsValidate string = "Validate" - - // AuditActionsActionsClusterExpand captures enum value "ClusterExpand" - AuditActionsActionsClusterExpand string = "ClusterExpand" - - // AuditActionsActionsFetch captures enum value "Fetch" - AuditActionsActionsFetch string = "Fetch" - - // AuditActionsActionsSearch captures enum value "Search" - AuditActionsActionsSearch string = "Search" - - // AuditActionsActionsPrepareFailover captures enum value "PrepareFailover" - AuditActionsActionsPrepareFailover string = "PrepareFailover" - - // AuditActionsActionsFailover captures enum value "Failover" - AuditActionsActionsFailover string = "Failover" - - // AuditActionsActionsPrepareFailback captures enum value "PrepareFailback" - AuditActionsActionsPrepareFailback string = "PrepareFailback" - - // AuditActionsActionsFailback captures enum value "Failback" - AuditActionsActionsFailback string = "Failback" - - // AuditActionsActionsTeardown captures enum value "Teardown" - AuditActionsActionsTeardown string = "Teardown" - - // AuditActionsActionsRetryReplication captures enum value "RetryReplication" - AuditActionsActionsRetryReplication string = "RetryReplication" - - // AuditActionsActionsManualSync captures enum value "ManualSync" - AuditActionsActionsManualSync string = "ManualSync" - - // AuditActionsActionsProtect captures enum value "Protect" - AuditActionsActionsProtect string = "Protect" - - // AuditActionsActionsRetryExecution captures enum value "RetryExecution" - AuditActionsActionsRetryExecution string = "RetryExecution" - - // AuditActionsActionsAdd captures enum value "Add" - AuditActionsActionsAdd string = "Add" - - // AuditActionsActionsSchedule captures enum value "Schedule" - AuditActionsActionsSchedule string = "Schedule" -) - -// prop value enum -func (m *AuditActions) validateActionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, auditActionsTypeActionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AuditActions) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - // value enum - if err := m.validateActionsEnum("actions", "body", m.Actions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this audit actions based on context it is used -func (m *AuditActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditActions) UnmarshalBinary(b []byte) error { - var res AuditActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_entity_types.go b/v2/models/audit_entity_types.go deleted file mode 100644 index 11ea9292..00000000 --- a/v2/models/audit_entity_types.go +++ /dev/null @@ -1,335 +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" -) - -// AuditEntityTypes Entity Types -// -// # Entity Types -// -// swagger:model AuditEntityTypes -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"] - EntityTypes string `json:"entityTypes,omitempty"` -} - -// Validate validates this audit entity types -func (m *AuditEntityTypes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 { - panic(err) - } - for _, v := range res { - auditEntityTypesTypeEntityTypesPropEnum = append(auditEntityTypesTypeEntityTypesPropEnum, v) - } -} - -const ( - - // AuditEntityTypesEntityTypesClusterPartition captures enum value "ClusterPartition" - AuditEntityTypesEntityTypesClusterPartition string = "ClusterPartition" - - // AuditEntityTypesEntityTypesStorageDomain captures enum value "StorageDomain" - AuditEntityTypesEntityTypesStorageDomain string = "StorageDomain" - - // AuditEntityTypesEntityTypesView captures enum value "View" - AuditEntityTypesEntityTypesView string = "View" - - // AuditEntityTypesEntityTypesShare captures enum value "Share" - AuditEntityTypesEntityTypesShare string = "Share" - - // AuditEntityTypesEntityTypesNode captures enum value "Node" - AuditEntityTypesEntityTypesNode string = "Node" - - // AuditEntityTypesEntityTypesDisk captures enum value "Disk" - AuditEntityTypesEntityTypesDisk string = "Disk" - - // AuditEntityTypesEntityTypesCluster captures enum value "Cluster" - AuditEntityTypesEntityTypesCluster string = "Cluster" - - // AuditEntityTypesEntityTypesVlan captures enum value "Vlan" - AuditEntityTypesEntityTypesVlan string = "Vlan" - - // AuditEntityTypesEntityTypesUser captures enum value "User" - AuditEntityTypesEntityTypesUser string = "User" - - // AuditEntityTypesEntityTypesAPIKey captures enum value "ApiKey" - AuditEntityTypesEntityTypesAPIKey string = "ApiKey" - - // AuditEntityTypesEntityTypesChassis captures enum value "Chassis" - AuditEntityTypesEntityTypesChassis string = "Chassis" - - // AuditEntityTypesEntityTypesSslCertificate captures enum value "SslCertificate" - AuditEntityTypesEntityTypesSslCertificate string = "SslCertificate" - - // AuditEntityTypesEntityTypesProtectionGroup captures enum value "ProtectionGroup" - AuditEntityTypesEntityTypesProtectionGroup string = "ProtectionGroup" - - // AuditEntityTypesEntityTypesSource captures enum value "Source" - AuditEntityTypesEntityTypesSource string = "Source" - - // AuditEntityTypesEntityTypesRecoveryTask captures enum value "RecoveryTask" - AuditEntityTypesEntityTypesRecoveryTask string = "RecoveryTask" - - // AuditEntityTypesEntityTypesSMTPServer captures enum value "SmtpServer" - AuditEntityTypesEntityTypesSMTPServer string = "SmtpServer" - - // AuditEntityTypesEntityTypesEncryptionKey captures enum value "EncryptionKey" - AuditEntityTypesEntityTypesEncryptionKey string = "EncryptionKey" - - // AuditEntityTypesEntityTypesProtectionPolicy captures enum value "ProtectionPolicy" - AuditEntityTypesEntityTypesProtectionPolicy string = "ProtectionPolicy" - - // AuditEntityTypesEntityTypesAlert captures enum value "Alert" - AuditEntityTypesEntityTypesAlert string = "Alert" - - // AuditEntityTypesEntityTypesResolution captures enum value "Resolution" - AuditEntityTypesEntityTypesResolution string = "Resolution" - - // AuditEntityTypesEntityTypesAlertNotificationRule captures enum value "AlertNotificationRule" - AuditEntityTypesEntityTypesAlertNotificationRule string = "AlertNotificationRule" - - // AuditEntityTypesEntityTypesVault captures enum value "Vault" - AuditEntityTypesEntityTypesVault string = "Vault" - - // AuditEntityTypesEntityTypesRemoteCluster captures enum value "RemoteCluster" - AuditEntityTypesEntityTypesRemoteCluster string = "RemoteCluster" - - // AuditEntityTypesEntityTypesActiveDirectory captures enum value "ActiveDirectory" - AuditEntityTypesEntityTypesActiveDirectory string = "ActiveDirectory" - - // AuditEntityTypesEntityTypesKerberosProvider captures enum value "KerberosProvider" - AuditEntityTypesEntityTypesKerberosProvider string = "KerberosProvider" - - // AuditEntityTypesEntityTypesLdap captures enum value "Ldap" - AuditEntityTypesEntityTypesLdap string = "Ldap" - - // AuditEntityTypesEntityTypesAntivirusServiceGroup captures enum value "AntivirusServiceGroup" - AuditEntityTypesEntityTypesAntivirusServiceGroup string = "AntivirusServiceGroup" - - // AuditEntityTypesEntityTypesInfectedFile captures enum value "InfectedFile" - AuditEntityTypesEntityTypesInfectedFile string = "InfectedFile" - - // AuditEntityTypesEntityTypesPreferredDomainController captures enum value "PreferredDomainController" - AuditEntityTypesEntityTypesPreferredDomainController string = "PreferredDomainController" - - // AuditEntityTypesEntityTypesGroup captures enum value "Group" - AuditEntityTypesEntityTypesGroup string = "Group" - - // AuditEntityTypesEntityTypesRole captures enum value "Role" - AuditEntityTypesEntityTypesRole string = "Role" - - // AuditEntityTypesEntityTypesProtectionRun captures enum value "ProtectionRun" - AuditEntityTypesEntityTypesProtectionRun string = "ProtectionRun" - - // AuditEntityTypesEntityTypesSearchJob captures enum value "SearchJob" - AuditEntityTypesEntityTypesSearchJob string = "SearchJob" - - // AuditEntityTypesEntityTypesPhysicalAgent captures enum value "PhysicalAgent" - AuditEntityTypesEntityTypesPhysicalAgent string = "PhysicalAgent" - - // AuditEntityTypesEntityTypesCloneTask captures enum value "CloneTask" - AuditEntityTypesEntityTypesCloneTask string = "CloneTask" - - // AuditEntityTypesEntityTypesCloneRefreshTask captures enum value "CloneRefreshTask" - AuditEntityTypesEntityTypesCloneRefreshTask string = "CloneRefreshTask" - - // AuditEntityTypesEntityTypesNetwork captures enum value "Network" - AuditEntityTypesEntityTypesNetwork string = "Network" - - // AuditEntityTypesEntityTypesInterface captures enum value "Interface" - AuditEntityTypesEntityTypesInterface string = "Interface" - - // AuditEntityTypesEntityTypesNetworkInerfaceGroup captures enum value "NetworkInerfaceGroup" - AuditEntityTypesEntityTypesNetworkInerfaceGroup string = "NetworkInerfaceGroup" - - // AuditEntityTypesEntityTypesScheduler captures enum value "Scheduler" - AuditEntityTypesEntityTypesScheduler string = "Scheduler" - - // AuditEntityTypesEntityTypesProxyServer captures enum value "ProxyServer" - AuditEntityTypesEntityTypesProxyServer string = "ProxyServer" - - // AuditEntityTypesEntityTypesStaticRoute captures enum value "StaticRoute" - AuditEntityTypesEntityTypesStaticRoute string = "StaticRoute" - - // AuditEntityTypesEntityTypesIP captures enum value "Ip" - AuditEntityTypesEntityTypesIP string = "Ip" - - // AuditEntityTypesEntityTypesQos captures enum value "Qos" - AuditEntityTypesEntityTypesQos string = "Qos" - - // AuditEntityTypesEntityTypesKmsConfiguration captures enum value "KmsConfiguration" - AuditEntityTypesEntityTypesKmsConfiguration string = "KmsConfiguration" - - // AuditEntityTypesEntityTypesCloudSpin captures enum value "CloudSpin" - AuditEntityTypesEntityTypesCloudSpin string = "CloudSpin" - - // AuditEntityTypesEntityTypesTenant captures enum value "Tenant" - AuditEntityTypesEntityTypesTenant string = "Tenant" - - // AuditEntityTypesEntityTypesIdpConfiguration captures enum value "IdpConfiguration" - AuditEntityTypesEntityTypesIdpConfiguration string = "IdpConfiguration" - - // AuditEntityTypesEntityTypesApp captures enum value "App" - AuditEntityTypesEntityTypesApp string = "App" - - // AuditEntityTypesEntityTypesHeliosEvent captures enum value "HeliosEvent" - AuditEntityTypesEntityTypesHeliosEvent string = "HeliosEvent" - - // AuditEntityTypesEntityTypesObject captures enum value "Object" - AuditEntityTypesEntityTypesObject string = "Object" - - // AuditEntityTypesEntityTypesClusterServices captures enum value "ClusterServices" - AuditEntityTypesEntityTypesClusterServices string = "ClusterServices" - - // AuditEntityTypesEntityTypesAccessToken captures enum value "AccessToken" - AuditEntityTypesEntityTypesAccessToken string = "AccessToken" - - // AuditEntityTypesEntityTypesSnmpConfig captures enum value "SnmpConfig" - AuditEntityTypesEntityTypesSnmpConfig string = "SnmpConfig" - - // AuditEntityTypesEntityTypesIoTier captures enum value "IoTier" - AuditEntityTypesEntityTypesIoTier string = "IoTier" - - // AuditEntityTypesEntityTypesServiceFlag captures enum value "ServiceFlag" - AuditEntityTypesEntityTypesServiceFlag string = "ServiceFlag" - - // AuditEntityTypesEntityTypesSupportServer captures enum value "SupportServer" - AuditEntityTypesEntityTypesSupportServer string = "SupportServer" - - // AuditEntityTypesEntityTypesCsr captures enum value "Csr" - AuditEntityTypesEntityTypesCsr string = "Csr" - - // AuditEntityTypesEntityTypesKeystone captures enum value "Keystone" - AuditEntityTypesEntityTypesKeystone string = "Keystone" - - // AuditEntityTypesEntityTypesSwiftRoles captures enum value "SwiftRoles" - AuditEntityTypesEntityTypesSwiftRoles string = "SwiftRoles" - - // AuditEntityTypesEntityTypesTags captures enum value "Tags" - AuditEntityTypesEntityTypesTags string = "Tags" - - // AuditEntityTypesEntityTypesNis captures enum value "Nis" - AuditEntityTypesEntityTypesNis string = "Nis" - - // AuditEntityTypesEntityTypesSnapshot captures enum value "Snapshot" - AuditEntityTypesEntityTypesSnapshot string = "Snapshot" - - // AuditEntityTypesEntityTypesHybridExtender captures enum value "HybridExtender" - AuditEntityTypesEntityTypesHybridExtender string = "HybridExtender" - - // AuditEntityTypesEntityTypesDataTieringAnalysisGroup captures enum value "DataTieringAnalysisGroup" - AuditEntityTypesEntityTypesDataTieringAnalysisGroup string = "DataTieringAnalysisGroup" - - // AuditEntityTypesEntityTypesDataTieringDowntierTask captures enum value "DataTieringDowntierTask" - AuditEntityTypesEntityTypesDataTieringDowntierTask string = "DataTieringDowntierTask" - - // AuditEntityTypesEntityTypesDataTieringUptierTask captures enum value "DataTieringUptierTask" - AuditEntityTypesEntityTypesDataTieringUptierTask string = "DataTieringUptierTask" - - // AuditEntityTypesEntityTypesTrustedCA captures enum value "TrustedCA" - AuditEntityTypesEntityTypesTrustedCA string = "TrustedCA" - - // AuditEntityTypesEntityTypesAMQPTargetConfiguration captures enum value "AMQPTargetConfiguration" - AuditEntityTypesEntityTypesAMQPTargetConfiguration string = "AMQPTargetConfiguration" - - // AuditEntityTypesEntityTypesPatch captures enum value "Patch" - AuditEntityTypesEntityTypesPatch string = "Patch" - - // AuditEntityTypesEntityTypesHotfix captures enum value "Hotfix" - AuditEntityTypesEntityTypesHotfix string = "Hotfix" - - // AuditEntityTypesEntityTypesNisNetgroup captures enum value "NisNetgroup" - AuditEntityTypesEntityTypesNisNetgroup string = "NisNetgroup" - - // AuditEntityTypesEntityTypesQuorumGroup captures enum value "QuorumGroup" - AuditEntityTypesEntityTypesQuorumGroup string = "QuorumGroup" - - // AuditEntityTypesEntityTypesQuorumApplication captures enum value "QuorumApplication" - AuditEntityTypesEntityTypesQuorumApplication string = "QuorumApplication" - - // AuditEntityTypesEntityTypesBifrostConnection captures enum value "BifrostConnection" - AuditEntityTypesEntityTypesBifrostConnection string = "BifrostConnection" - - // AuditEntityTypesEntityTypesBifrostConnector captures enum value "BifrostConnector" - AuditEntityTypesEntityTypesBifrostConnector string = "BifrostConnector" - - // AuditEntityTypesEntityTypesHostMapping captures enum value "HostMapping" - AuditEntityTypesEntityTypesHostMapping string = "HostMapping" - - // AuditEntityTypesEntityTypesFirewallSetting captures enum value "FirewallSetting" - AuditEntityTypesEntityTypesFirewallSetting string = "FirewallSetting" -) - -// prop value enum -func (m *AuditEntityTypes) validateEntityTypesEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, auditEntityTypesTypeEntityTypesPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AuditEntityTypes) validateEntityTypes(formats strfmt.Registry) error { - if swag.IsZero(m.EntityTypes) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypesEnum("entityTypes", "body", m.EntityTypes); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this audit entity types based on context it is used -func (m *AuditEntityTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditEntityTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditEntityTypes) UnmarshalBinary(b []byte) error { - var res AuditEntityTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_log.go b/v2/models/audit_log.go deleted file mode 100644 index c16dad42..00000000 --- a/v2/models/audit_log.go +++ /dev/null @@ -1,92 +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" -) - -// AuditLog Specifies an audit log message. -// -// swagger:model AuditLog -type AuditLog struct { - - // Specifies the change details of this audit log. - Details *string `json:"details,omitempty"` - - // Specifies the username who made this audit log. - Username *string `json:"username,omitempty"` - - // Specifies the domain of user who made this audit log. - Domain *string `json:"domain,omitempty"` - - // Specifies the entity name. - EntityName *string `json:"entityName,omitempty"` - - // Specifies the entity type. - EntityType *string `json:"entityType,omitempty"` - - // Specifies the action type of this audit log. - Action *string `json:"action,omitempty"` - - // Specifies a unix timestamp in micro seconds when the audit log was taken. - TimestampUsecs *int64 `json:"timestampUsecs,omitempty"` - - // Specifies the ip of user who made this audit log. - IP *string `json:"ip,omitempty"` - - // Specifies if the action is made through impersonation. - IsImpersonation *bool `json:"isImpersonation,omitempty"` - - // Specifies the tenant id who made this audit log. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant name who made this audit log. - TenantName *string `json:"tenantName,omitempty"` - - // Specifies the original tenant id who made this audit log. - OriginalTenantID *string `json:"originalTenantId,omitempty"` - - // Specifies the original tenant name who made this audit log. - OriginalTenantName *string `json:"originalTenantName,omitempty"` - - // Specifies the record before the action is invoked. This will be returned only if verbose audit is enabled. - PreviousRecord *string `json:"previousRecord,omitempty"` - - // Specifies the record after the action is invoked. This will be returned only if verbose audit is enabled. - NewRecord *string `json:"newRecord,omitempty"` -} - -// Validate validates this audit log -func (m *AuditLog) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this audit log based on context it is used -func (m *AuditLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLog) UnmarshalBinary(b []byte) error { - var res AuditLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_log_config.go b/v2/models/audit_log_config.go deleted file mode 100644 index 353348a6..00000000 --- a/v2/models/audit_log_config.go +++ /dev/null @@ -1,88 +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" -) - -// AuditLogConfig Specifies the generic object for audit log configuration. -// -// swagger:model AuditLogConfig -type AuditLogConfig struct { - - // Specifies if audit log is enabled. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the audit log retention period in days. Audit logs generated before the period of time specified by retentionPeriodDays are removed from the Cohesity Cluster. - // Required: true - RetentionPeriodDays *int32 `json:"retentionPeriodDays"` -} - -// Validate validates this audit log config -func (m *AuditLogConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetentionPeriodDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuditLogConfig) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *AuditLogConfig) validateRetentionPeriodDays(formats strfmt.Registry) error { - - if err := validate.Required("retentionPeriodDays", "body", m.RetentionPeriodDays); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this audit log config based on context it is used -func (m *AuditLogConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogConfig) UnmarshalBinary(b []byte) error { - var res AuditLogConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_logs.go b/v2/models/audit_logs.go deleted file mode 100644 index ddf7aa23..00000000 --- a/v2/models/audit_logs.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AuditLogs Sepcifies the audit logs. -// -// swagger:model AuditLogs -type AuditLogs struct { - - // Specifies a list of audit logs. - AuditLogs []*AuditLog `json:"auditLogs"` - - // Specifies the total number of audit logs that match the filter and search criteria. Use this value to determine how many additional requests are required to get the full result. - Count *int64 `json:"count,omitempty"` -} - -// Validate validates this audit logs -func (m *AuditLogs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuditLogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuditLogs) validateAuditLogs(formats strfmt.Registry) error { - if swag.IsZero(m.AuditLogs) { // not required - return nil - } - - for i := 0; i < len(m.AuditLogs); i++ { - if swag.IsZero(m.AuditLogs[i]) { // not required - continue - } - - if m.AuditLogs[i] != nil { - if err := m.AuditLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this audit logs based on the context it is used -func (m *AuditLogs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuditLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuditLogs) contextValidateAuditLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AuditLogs); i++ { - - if m.AuditLogs[i] != nil { - - if swag.IsZero(m.AuditLogs[i]) { // not required - return nil - } - - if err := m.AuditLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auditLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogs) UnmarshalBinary(b []byte) error { - var res AuditLogs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_logs_actions.go b/v2/models/audit_logs_actions.go deleted file mode 100644 index 78e057f8..00000000 --- a/v2/models/audit_logs_actions.go +++ /dev/null @@ -1,50 +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" -) - -// AuditLogsActions Specifies actions of audit logs. -// -// swagger:model AuditLogsActions -type AuditLogsActions struct { - - // Specifies a list of audit logs actions. - Actions []string `json:"actions"` -} - -// Validate validates this audit logs actions -func (m *AuditLogsActions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this audit logs actions based on context it is used -func (m *AuditLogsActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogsActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogsActions) UnmarshalBinary(b []byte) error { - var res AuditLogsActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/audit_logs_entity_types.go b/v2/models/audit_logs_entity_types.go deleted file mode 100644 index b6f61c74..00000000 --- a/v2/models/audit_logs_entity_types.go +++ /dev/null @@ -1,50 +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" -) - -// AuditLogsEntityTypes Specifies entity types of audit logs. -// -// swagger:model AuditLogsEntityTypes -type AuditLogsEntityTypes struct { - - // Specifies a list of audit logs entity types. - EntityTypes []string `json:"entityTypes"` -} - -// Validate validates this audit logs entity types -func (m *AuditLogsEntityTypes) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this audit logs entity types based on context it is used -func (m *AuditLogsEntityTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AuditLogsEntityTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuditLogsEntityTypes) UnmarshalBinary(b []byte) error { - var res AuditLogsEntityTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aurora_config.go b/v2/models/aurora_config.go deleted file mode 100644 index 423f9778..00000000 --- a/v2/models/aurora_config.go +++ /dev/null @@ -1,271 +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" -) - -// AuroraConfig Recover AWS Aurora params. -// -// Specifies the parameters to recover AWS Aurora. -// -// swagger:model AuroraConfig -type AuroraConfig struct { - - // Specifies the port to use for the DB in the restored Aurora instance. - // Required: true - DbPort *int32 `json:"dbPort"` - - // Specifies the DB instance identifier to use for the restored DB. - // Required: true - DbInstanceID *string `json:"dbInstanceId"` - - // Specifies whether this is a multi-az deployment or not. - // Required: true - IsMultiAzDeployment *bool `json:"isMultiAzDeployment"` - - // Specifies whether this DB will be publicly accessible or not. - EnablePublicAccessibility *bool `json:"enablePublicAccessibility,omitempty"` - - // Specifies whether to enable IAM authentication for the DB. - // Required: true - EnableIamDbAuthentication *bool `json:"enableIamDbAuthentication"` - - // Specifies whether to enable copying of tags to snapshots of the DB. - // Required: true - EnableCopyTagsToSnapshots *bool `json:"enableCopyTagsToSnapshots"` - - // Specifies whether to enable auto minor version upgrade in the restored DB. - // Required: true - EnableAutoMinorVersionUpgrade *bool `json:"enableAutoMinorVersionUpgrade"` - - // Specifies a point in time for recovery in microseconds. - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - - // Specifies entity representing the Aurora option group to use while restoring the DB. - DbOptionGroup *RecoveryObjectIdentifier `json:"dbOptionGroup,omitempty"` - - // Specifies the entity representing the Aurora parameter group to use while restoring the DB. - DbParameterGroup *RecoveryObjectIdentifier `json:"dbParameterGroup,omitempty"` -} - -// Validate validates this aurora config -func (m *AuroraConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbPort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsMultiAzDeployment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableIamDbAuthentication(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableCopyTagsToSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableAutoMinorVersionUpgrade(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbOptionGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbParameterGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuroraConfig) validateDbPort(formats strfmt.Registry) error { - - if err := validate.Required("dbPort", "body", m.DbPort); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateDbInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("dbInstanceId", "body", m.DbInstanceID); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateIsMultiAzDeployment(formats strfmt.Registry) error { - - if err := validate.Required("isMultiAzDeployment", "body", m.IsMultiAzDeployment); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateEnableIamDbAuthentication(formats strfmt.Registry) error { - - if err := validate.Required("enableIamDbAuthentication", "body", m.EnableIamDbAuthentication); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateEnableCopyTagsToSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("enableCopyTagsToSnapshots", "body", m.EnableCopyTagsToSnapshots); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateEnableAutoMinorVersionUpgrade(formats strfmt.Registry) error { - - if err := validate.Required("enableAutoMinorVersionUpgrade", "body", m.EnableAutoMinorVersionUpgrade); err != nil { - return err - } - - return nil -} - -func (m *AuroraConfig) validateDbOptionGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if m.DbOptionGroup != nil { - if err := m.DbOptionGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *AuroraConfig) validateDbParameterGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if m.DbParameterGroup != nil { - if err := m.DbParameterGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aurora config based on the context it is used -func (m *AuroraConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbOptionGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbParameterGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AuroraConfig) contextValidateDbOptionGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbOptionGroup != nil { - - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if err := m.DbOptionGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *AuroraConfig) contextValidateDbParameterGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbParameterGroup != nil { - - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if err := m.DbParameterGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AuroraConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AuroraConfig) UnmarshalBinary(b []byte) error { - var res AuroraConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/available_patch.go b/v2/models/available_patch.go deleted file mode 100644 index 7c7857af..00000000 --- a/v2/models/available_patch.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AvailablePatch Available Patch. -// -// Specifies the description of an available patch. -// -// swagger:model AvailablePatch -type AvailablePatch struct { - - // Specifies the name of the service. - Service string `json:"service,omitempty"` - - // Specifies the description of the service. - Component string `json:"component,omitempty"` - - // Specifies the version of the patch. - Version string `json:"version,omitempty"` - - // Specifies the number of fixed issues. - Count int64 `json:"count,omitempty"` - - // Specifies the services for which their patches must be applied together. - Dependencies []string `json:"dependencies"` - - // Specifies the details of the issues fixed in the patch. - FixedIssues []*FixedIssue `json:"fixedIssues"` -} - -// Validate validates this available patch -func (m *AvailablePatch) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFixedIssues(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AvailablePatch) validateFixedIssues(formats strfmt.Registry) error { - if swag.IsZero(m.FixedIssues) { // not required - return nil - } - - for i := 0; i < len(m.FixedIssues); i++ { - if swag.IsZero(m.FixedIssues[i]) { // not required - continue - } - - if m.FixedIssues[i] != nil { - if err := m.FixedIssues[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this available patch based on the context it is used -func (m *AvailablePatch) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFixedIssues(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AvailablePatch) contextValidateFixedIssues(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FixedIssues); i++ { - - if m.FixedIssues[i] != nil { - - if swag.IsZero(m.FixedIssues[i]) { // not required - return nil - } - - if err := m.FixedIssues[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedIssues" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AvailablePatch) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AvailablePatch) UnmarshalBinary(b []byte) error { - var res AvailablePatch - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/available_patches.go b/v2/models/available_patches.go deleted file mode 100644 index cc8b62a5..00000000 --- a/v2/models/available_patches.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AvailablePatches Available Patches. -// -// Specifies the available patches for the cluster. -// -// swagger:model AvailablePatches -type AvailablePatches []*AvailablePatch - -// Validate validates this available patches -func (m AvailablePatches) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this available patches based on the context it is used -func (m AvailablePatches) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/aws_agent_protection_group_object_params.go b/v2/models/aws_agent_protection_group_object_params.go deleted file mode 100644 index 392bac0a..00000000 --- a/v2/models/aws_agent_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AwsAgentProtectionGroupObjectParams Agent based AWS Protection Group Object Params. -// -// Specifies the object parameters to create agent based AWS Protection Group. -// -// swagger:model AwsAgentProtectionGroupObjectParams -type AwsAgentProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws agent protection group object params -func (m *AwsAgentProtectionGroupObjectParams) 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 *AwsAgentProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws agent protection group object params based on the context it is used -func (m *AwsAgentProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAgentProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAgentProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAgentProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsAgentProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_agent_protection_group_params.go b/v2/models/aws_agent_protection_group_params.go deleted file mode 100644 index 0d82734e..00000000 --- a/v2/models/aws_agent_protection_group_params.go +++ /dev/null @@ -1,246 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsAgentProtectionGroupParams Agent based AWS Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS related Protection Groups using cohesity protection-service installed on EC2 instance. -// -// swagger:model AwsAgentProtectionGroupParams -type AwsAgentProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*AwsAgentProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. If not specified or false then snapshots will not be app consistent. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` -} - -// Validate validates this aws agent protection group params -func (m *AwsAgentProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAgentProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsAgentProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AwsAgentProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws agent protection group params based on the context it is used -func (m *AwsAgentProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAgentProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsAgentProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsAgentProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *AwsAgentProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAgentProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAgentProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsAgentProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_archival_storage_class.go b/v2/models/aws_archival_storage_class.go deleted file mode 100644 index b1ecebec..00000000 --- a/v2/models/aws_archival_storage_class.go +++ /dev/null @@ -1,125 +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" -) - -// AwsArchivalStorageClass Aws Archival Storage Class -// -// Specifies the storage class of Aws External Target of archival purpose type. -// -// swagger:model AwsArchivalStorageClass -type AwsArchivalStorageClass struct { - - // Specifies the storage class of Aws External Target of archival purpose type. - // Enum: ["AmazonS3Standard","AmazonS3StandardIA","AmazonS3OneZoneIA","AmazonS3IntelligentTiering","AmazonS3Glacier","AmazonS3GlacierDeepArchive","AmazonGlacier","AmazonS3GlacierIR"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this aws archival storage class -func (m *AwsArchivalStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsArchivalStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3StandardIA","AmazonS3OneZoneIA","AmazonS3IntelligentTiering","AmazonS3Glacier","AmazonS3GlacierDeepArchive","AmazonGlacier","AmazonS3GlacierIR"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsArchivalStorageClassTypeEnumPropEnum = append(awsArchivalStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // AwsArchivalStorageClassEnumAmazonS3Standard captures enum value "AmazonS3Standard" - AwsArchivalStorageClassEnumAmazonS3Standard string = "AmazonS3Standard" - - // AwsArchivalStorageClassEnumAmazonS3StandardIA captures enum value "AmazonS3StandardIA" - AwsArchivalStorageClassEnumAmazonS3StandardIA string = "AmazonS3StandardIA" - - // AwsArchivalStorageClassEnumAmazonS3OneZoneIA captures enum value "AmazonS3OneZoneIA" - AwsArchivalStorageClassEnumAmazonS3OneZoneIA string = "AmazonS3OneZoneIA" - - // AwsArchivalStorageClassEnumAmazonS3IntelligentTiering captures enum value "AmazonS3IntelligentTiering" - AwsArchivalStorageClassEnumAmazonS3IntelligentTiering string = "AmazonS3IntelligentTiering" - - // AwsArchivalStorageClassEnumAmazonS3Glacier captures enum value "AmazonS3Glacier" - AwsArchivalStorageClassEnumAmazonS3Glacier string = "AmazonS3Glacier" - - // AwsArchivalStorageClassEnumAmazonS3GlacierDeepArchive captures enum value "AmazonS3GlacierDeepArchive" - AwsArchivalStorageClassEnumAmazonS3GlacierDeepArchive string = "AmazonS3GlacierDeepArchive" - - // AwsArchivalStorageClassEnumAmazonGlacier captures enum value "AmazonGlacier" - AwsArchivalStorageClassEnumAmazonGlacier string = "AmazonGlacier" - - // AwsArchivalStorageClassEnumAmazonS3GlacierIR captures enum value "AmazonS3GlacierIR" - AwsArchivalStorageClassEnumAmazonS3GlacierIR string = "AmazonS3GlacierIR" -) - -// prop value enum -func (m *AwsArchivalStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsArchivalStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsArchivalStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws archival storage class based on context it is used -func (m *AwsArchivalStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsArchivalStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsArchivalStorageClass) UnmarshalBinary(b []byte) error { - var res AwsArchivalStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_aurora_protection_group_object_params.go b/v2/models/aws_aurora_protection_group_object_params.go deleted file mode 100644 index 318d3a2d..00000000 --- a/v2/models/aws_aurora_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AwsAuroraProtectionGroupObjectParams AWS Aurora Snapshot Manager Protection Group Object Params. -// -// Specifies the object parameters to create an AWS Aurora Protection Group. -// -// swagger:model AwsAuroraProtectionGroupObjectParams -type AwsAuroraProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws aurora protection group object params -func (m *AwsAuroraProtectionGroupObjectParams) 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 *AwsAuroraProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws aurora protection group object params based on the context it is used -func (m *AwsAuroraProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuroraProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuroraProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsAuroraProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_aurora_protection_group_params.go b/v2/models/aws_aurora_protection_group_params.go deleted file mode 100644 index d7c2eb6d..00000000 --- a/v2/models/aws_aurora_protection_group_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsAuroraProtectionGroupParams AWS Aurora Snapshot Manager Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS Aurora related Protection Groups. -// -// swagger:model AwsAuroraProtectionGroupParams -type AwsAuroraProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*AwsAuroraProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Array of arrays of Aurora Tag Ids that specify aurora clusters to protect. - AuroraTagIds [][]int64 `json:"auroraTagIds"` - - // Array of arrays of RDS Tag Ids that specify aurora clusters to exclude. - ExcludeAuroraTagIds [][]int64 `json:"excludeAuroraTagIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this aws aurora protection group params -func (m *AwsAuroraProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsAuroraProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws aurora protection group params based on the context it is used -func (m *AwsAuroraProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsAuroraProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsAuroraProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuroraProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuroraProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsAuroraProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_aurora_recovery_target_config.go b/v2/models/aws_aurora_recovery_target_config.go deleted file mode 100644 index c166d3ff..00000000 --- a/v2/models/aws_aurora_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// AwsAuroraRecoveryTargetConfig AWS Aurora Recovery Target Config. -// -// Specifies the target object parameters to recover AWS Aurora. -// -// swagger:model AwsAuroraRecoveryTargetConfig -type AwsAuroraRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the Aurora instances will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAwsAuroraNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this aws aurora recovery target config -func (m *AwsAuroraRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *AwsAuroraRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws aurora recovery target config based on the context it is used -func (m *AwsAuroraRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuroraRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuroraRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsAuroraRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_aurora_snapshot_manager_object_protection_params.go b/v2/models/aws_aurora_snapshot_manager_object_protection_params.go deleted file mode 100644 index d19bd0b6..00000000 --- a/v2/models/aws_aurora_snapshot_manager_object_protection_params.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsAuroraSnapshotManagerObjectProtectionParams Create AWS Aurora Snapshot Manager Object Protection Request Body -// -// Specifies the parameters which are specific to AWS Object Protection using AWS Aurora snapshot orchestration with snapshot manager. Atlease one of tags or objects must be specified. -// -// swagger:model AwsAuroraSnapshotManagerObjectProtectionParams -type AwsAuroraSnapshotManagerObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AwsObjectLevelParams `json:"objects"` -} - -// Validate validates this aws aurora snapshot manager object protection params -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws aurora snapshot manager object protection params based on the context it is used -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuroraSnapshotManagerObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsAuroraSnapshotManagerObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_auth_method.go b/v2/models/aws_auth_method.go deleted file mode 100644 index 0d140fcf..00000000 --- a/v2/models/aws_auth_method.go +++ /dev/null @@ -1,113 +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" -) - -// AwsAuthMethod AWS External Target Authentication Methods -// -// # Describes the Authentication Methods of AWS External Targets -// -// swagger:model AwsAuthMethod -type AwsAuthMethod struct { - - // Specifies Authentication Methods of AWS External Targets - // Enum: ["kUseIAMUser","kUseIAMRole","kUseSTS","kUseHelios"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this aws auth method -func (m *AwsAuthMethod) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsAuthMethodTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseSTS","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsAuthMethodTypeEnumPropEnum = append(awsAuthMethodTypeEnumPropEnum, v) - } -} - -const ( - - // AwsAuthMethodEnumKUseIAMUser captures enum value "kUseIAMUser" - AwsAuthMethodEnumKUseIAMUser string = "kUseIAMUser" - - // AwsAuthMethodEnumKUseIAMRole captures enum value "kUseIAMRole" - AwsAuthMethodEnumKUseIAMRole string = "kUseIAMRole" - - // AwsAuthMethodEnumKUseSTS captures enum value "kUseSTS" - AwsAuthMethodEnumKUseSTS string = "kUseSTS" - - // AwsAuthMethodEnumKUseHelios captures enum value "kUseHelios" - AwsAuthMethodEnumKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *AwsAuthMethod) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsAuthMethodTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsAuthMethod) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws auth method based on context it is used -func (m *AwsAuthMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuthMethod) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuthMethod) UnmarshalBinary(b []byte) error { - var res AwsAuthMethod - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_auth_method_type.go b/v2/models/aws_auth_method_type.go deleted file mode 100644 index 656bc77d..00000000 --- a/v2/models/aws_auth_method_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsAuthMethodType AWS Authentication Method Type -// -// # AWS Authentication Method Type -// -// swagger:model AwsAuthMethodType -type AwsAuthMethodType struct { - - // Specifies the AWS Authentication Method types. - // Enum: ["kUseIAMUser","kUseIAMRole"] - AwsAuthMethodType string `json:"awsAuthMethodType,omitempty"` -} - -// Validate validates this aws auth method type -func (m *AwsAuthMethodType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsAuthMethodType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsAuthMethodTypeTypeAwsAuthMethodTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsAuthMethodTypeTypeAwsAuthMethodTypePropEnum = append(awsAuthMethodTypeTypeAwsAuthMethodTypePropEnum, v) - } -} - -const ( - - // AwsAuthMethodTypeAwsAuthMethodTypeKUseIAMUser captures enum value "kUseIAMUser" - AwsAuthMethodTypeAwsAuthMethodTypeKUseIAMUser string = "kUseIAMUser" - - // AwsAuthMethodTypeAwsAuthMethodTypeKUseIAMRole captures enum value "kUseIAMRole" - AwsAuthMethodTypeAwsAuthMethodTypeKUseIAMRole string = "kUseIAMRole" -) - -// prop value enum -func (m *AwsAuthMethodType) validateAwsAuthMethodTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsAuthMethodTypeTypeAwsAuthMethodTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsAuthMethodType) validateAwsAuthMethodType(formats strfmt.Registry) error { - if swag.IsZero(m.AwsAuthMethodType) { // not required - return nil - } - - // value enum - if err := m.validateAwsAuthMethodTypeEnum("awsAuthMethodType", "body", m.AwsAuthMethodType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws auth method type based on context it is used -func (m *AwsAuthMethodType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuthMethodType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuthMethodType) UnmarshalBinary(b []byte) error { - var res AwsAuthMethodType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_authentication_methods_params.go b/v2/models/aws_authentication_methods_params.go deleted file mode 100644 index 9dbe6e09..00000000 --- a/v2/models/aws_authentication_methods_params.go +++ /dev/null @@ -1,288 +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" -) - -// AwsAuthenticationMethodsParams AWS External Targets Authentication Methods Params. -// -// Specifies the Authentication Methods parameters which are specific to AWS related External Targets. -// -// swagger:model AwsAuthenticationMethodsParams -type AwsAuthenticationMethodsParams struct { - CommonAuthenticationMethodParams - - // i am user params - IAmUserParams *AwsIAmUserParams `json:"iAmUserParams,omitempty"` - - // i am role params - IAmRoleParams *AwsIAmRoleParams `json:"iAmRoleParams,omitempty"` - - // use s t s params - UseSTSParams *AwsUseSTSParams `json:"useSTSParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsAuthenticationMethodsParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAuthenticationMethodParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAuthenticationMethodParams = aO0 - - // AO1 - var dataAO1 struct { - IAmUserParams *AwsIAmUserParams `json:"iAmUserParams,omitempty"` - - IAmRoleParams *AwsIAmRoleParams `json:"iAmRoleParams,omitempty"` - - UseSTSParams *AwsUseSTSParams `json:"useSTSParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.IAmUserParams = dataAO1.IAmUserParams - - m.IAmRoleParams = dataAO1.IAmRoleParams - - m.UseSTSParams = dataAO1.UseSTSParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsAuthenticationMethodsParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAuthenticationMethodParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - IAmUserParams *AwsIAmUserParams `json:"iAmUserParams,omitempty"` - - IAmRoleParams *AwsIAmRoleParams `json:"iAmRoleParams,omitempty"` - - UseSTSParams *AwsUseSTSParams `json:"useSTSParams,omitempty"` - } - - dataAO1.IAmUserParams = m.IAmUserParams - - dataAO1.IAmRoleParams = m.IAmRoleParams - - dataAO1.UseSTSParams = m.UseSTSParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws authentication methods params -func (m *AwsAuthenticationMethodsParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAuthenticationMethodParams - if err := m.CommonAuthenticationMethodParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIAmUserParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIAmRoleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUseSTSParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuthenticationMethodsParams) validateIAmUserParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IAmUserParams) { // not required - return nil - } - - if m.IAmUserParams != nil { - if err := m.IAmUserParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iAmUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iAmUserParams") - } - return err - } - } - - return nil -} - -func (m *AwsAuthenticationMethodsParams) validateIAmRoleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IAmRoleParams) { // not required - return nil - } - - if m.IAmRoleParams != nil { - if err := m.IAmRoleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iAmRoleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iAmRoleParams") - } - return err - } - } - - return nil -} - -func (m *AwsAuthenticationMethodsParams) validateUseSTSParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UseSTSParams) { // not required - return nil - } - - if m.UseSTSParams != nil { - if err := m.UseSTSParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("useSTSParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("useSTSParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws authentication methods params based on the context it is used -func (m *AwsAuthenticationMethodsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAuthenticationMethodParams - if err := m.CommonAuthenticationMethodParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIAmUserParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIAmRoleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUseSTSParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsAuthenticationMethodsParams) contextValidateIAmUserParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IAmUserParams != nil { - - if swag.IsZero(m.IAmUserParams) { // not required - return nil - } - - if err := m.IAmUserParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iAmUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iAmUserParams") - } - return err - } - } - - return nil -} - -func (m *AwsAuthenticationMethodsParams) contextValidateIAmRoleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IAmRoleParams != nil { - - if swag.IsZero(m.IAmRoleParams) { // not required - return nil - } - - if err := m.IAmRoleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iAmRoleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iAmRoleParams") - } - return err - } - } - - return nil -} - -func (m *AwsAuthenticationMethodsParams) contextValidateUseSTSParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UseSTSParams != nil { - - if swag.IsZero(m.UseSTSParams) { // not required - return nil - } - - if err := m.UseSTSParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("useSTSParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("useSTSParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsAuthenticationMethodsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsAuthenticationMethodsParams) UnmarshalBinary(b []byte) error { - var res AwsAuthenticationMethodsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_cloud_c2_s_params.go b/v2/models/aws_cloud_c2_s_params.go deleted file mode 100644 index f00d3c51..00000000 --- a/v2/models/aws_cloud_c2_s_params.go +++ /dev/null @@ -1,192 +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" -) - -// AwsCloudC2SParams AWS External Target C2S Cloud Type Params. -// -// Specifies the parameters which are specific to AWS related External Targets with Cloud Type C2S. -// -// swagger:model AwsCloudC2SParams -type AwsCloudC2SParams struct { - - // Specifies base url of the External Target. - // Required: true - BaseURL *string `json:"baseURL"` - - // Specifies agency of the External Target. - // Required: true - Agency *string `json:"agency"` - - // Specifies mission of the External Target - // Required: true - Mission *string `json:"mission"` - - // Specifies role of the External Target - // Required: true - Role *string `json:"role"` - - // Specifies client certificate password of the External Target - // Required: true - ClientCertificatePassword *string `json:"clientCertificatePassword"` - - // Specifies server CA trusted certificate of the External Target - // Required: true - ServerCATrustedCertificate *string `json:"serverCATrustedCertificate"` - - // Specifies client certificate of the External Target - // Required: true - ClientCertificate *string `json:"clientCertificate"` - - // Specifies client private key of the External Target - // Required: true - ClientPrivateKey *string `json:"clientPrivateKey"` -} - -// Validate validates this aws cloud c2 s params -func (m *AwsCloudC2SParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBaseURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgency(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMission(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientCertificatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerCATrustedCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientPrivateKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudC2SParams) validateBaseURL(formats strfmt.Registry) error { - - if err := validate.Required("baseURL", "body", m.BaseURL); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateAgency(formats strfmt.Registry) error { - - if err := validate.Required("agency", "body", m.Agency); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateMission(formats strfmt.Registry) error { - - if err := validate.Required("mission", "body", m.Mission); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateRole(formats strfmt.Registry) error { - - if err := validate.Required("role", "body", m.Role); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateClientCertificatePassword(formats strfmt.Registry) error { - - if err := validate.Required("clientCertificatePassword", "body", m.ClientCertificatePassword); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateServerCATrustedCertificate(formats strfmt.Registry) error { - - if err := validate.Required("serverCATrustedCertificate", "body", m.ServerCATrustedCertificate); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateClientCertificate(formats strfmt.Registry) error { - - if err := validate.Required("clientCertificate", "body", m.ClientCertificate); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudC2SParams) validateClientPrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("clientPrivateKey", "body", m.ClientPrivateKey); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws cloud c2 s params based on context it is used -func (m *AwsCloudC2SParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCloudC2SParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCloudC2SParams) UnmarshalBinary(b []byte) error { - var res AwsCloudC2SParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_cloud_gov_params.go b/v2/models/aws_cloud_gov_params.go deleted file mode 100644 index 29c07bd5..00000000 --- a/v2/models/aws_cloud_gov_params.go +++ /dev/null @@ -1,111 +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" -) - -// AwsCloudGovParams AWS External Target Gov Cloud Type Params. -// -// Specifies the parameters which are specific to AWS related External Targets with Cloud Type Gov. -// -// swagger:model AwsCloudGovParams -type AwsCloudGovParams struct { - - // authentication method - AuthenticationMethod *AwsAuthenticationMethodsParams `json:"authenticationMethod,omitempty"` -} - -// Validate validates this aws cloud gov params -func (m *AwsCloudGovParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudGovParams) validateAuthenticationMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationMethod) { // not required - return nil - } - - if m.AuthenticationMethod != nil { - if err := m.AuthenticationMethod.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authenticationMethod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("authenticationMethod") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws cloud gov params based on the context it is used -func (m *AwsCloudGovParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuthenticationMethod(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudGovParams) contextValidateAuthenticationMethod(ctx context.Context, formats strfmt.Registry) error { - - if m.AuthenticationMethod != nil { - - if swag.IsZero(m.AuthenticationMethod) { // not required - return nil - } - - if err := m.AuthenticationMethod.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authenticationMethod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("authenticationMethod") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCloudGovParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCloudGovParams) UnmarshalBinary(b []byte) error { - var res AwsCloudGovParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_cloud_spin_params.go b/v2/models/aws_cloud_spin_params.go deleted file mode 100644 index 00c10bbf..00000000 --- a/v2/models/aws_cloud_spin_params.go +++ /dev/null @@ -1,147 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsCloudSpinParams AWS Parameters. -// -// Specifies various resources when converting and deploying a VM to AWS. -// -// swagger:model AwsCloudSpinParams -type AwsCloudSpinParams struct { - - // Specifies id of the AWS region in which to deploy the VM. - // Required: true - Region *int64 `json:"region"` - - // Specifies id of the Virtual Private Cloud to chose for the instance type. - VpcID *int64 `json:"vpcId,omitempty"` - - // Specifies id of the subnet within above VPC. - SubnetID *int64 `json:"subnetId,omitempty"` - - // Specifies tags of various resources when converting and deploying a VM to AWS. - CustomTagList []*CustomTagParams `json:"customTagList"` -} - -// Validate validates this aws cloud spin params -func (m *AwsCloudSpinParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomTagList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudSpinParams) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -func (m *AwsCloudSpinParams) validateCustomTagList(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTagList) { // not required - return nil - } - - for i := 0; i < len(m.CustomTagList); i++ { - if swag.IsZero(m.CustomTagList[i]) { // not required - continue - } - - if m.CustomTagList[i] != nil { - if err := m.CustomTagList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws cloud spin params based on the context it is used -func (m *AwsCloudSpinParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomTagList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudSpinParams) contextValidateCustomTagList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTagList); i++ { - - if m.CustomTagList[i] != nil { - - if swag.IsZero(m.CustomTagList[i]) { // not required - return nil - } - - if err := m.CustomTagList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTagList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCloudSpinParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCloudSpinParams) UnmarshalBinary(b []byte) error { - var res AwsCloudSpinParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_cloud_standard_params.go b/v2/models/aws_cloud_standard_params.go deleted file mode 100644 index 1472a27f..00000000 --- a/v2/models/aws_cloud_standard_params.go +++ /dev/null @@ -1,111 +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" -) - -// AwsCloudStandardParams AWS External Target Standard Cloud Type Params. -// -// Specifies the parameters which are specific to AWS related External Targets with Cloud Type Standard. -// -// swagger:model AwsCloudStandardParams -type AwsCloudStandardParams struct { - - // authentication method - AuthenticationMethod *AwsAuthenticationMethodsParams `json:"authenticationMethod,omitempty"` -} - -// Validate validates this aws cloud standard params -func (m *AwsCloudStandardParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudStandardParams) validateAuthenticationMethod(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationMethod) { // not required - return nil - } - - if m.AuthenticationMethod != nil { - if err := m.AuthenticationMethod.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authenticationMethod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("authenticationMethod") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws cloud standard params based on the context it is used -func (m *AwsCloudStandardParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuthenticationMethod(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsCloudStandardParams) contextValidateAuthenticationMethod(ctx context.Context, formats strfmt.Registry) error { - - if m.AuthenticationMethod != nil { - - if swag.IsZero(m.AuthenticationMethod) { // not required - return nil - } - - if err := m.AuthenticationMethod.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("authenticationMethod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("authenticationMethod") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCloudStandardParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCloudStandardParams) UnmarshalBinary(b []byte) error { - var res AwsCloudStandardParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_common_object_protection_params.go b/v2/models/aws_common_object_protection_params.go deleted file mode 100644 index 9b5150e9..00000000 --- a/v2/models/aws_common_object_protection_params.go +++ /dev/null @@ -1,122 +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" -) - -// AwsCommonObjectProtectionParams AWS Common Object Protection Params. -// -// Specifies the parameters which are specific to AWS related Object Protection and common to different AWS protection types. -// -// swagger:model AwsCommonObjectProtectionParams -type AwsCommonObjectProtectionParams struct { - - // Specifies the AWS Protection Job type. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"] - ProtectionType string `json:"protectionType,omitempty"` -} - -// Validate validates this aws common object protection params -func (m *AwsCommonObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsCommonObjectProtectionParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsCommonObjectProtectionParamsTypeProtectionTypePropEnum = append(awsCommonObjectProtectionParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AwsCommonObjectProtectionParamsProtectionTypeKAgent captures enum value "kAgent" - AwsCommonObjectProtectionParamsProtectionTypeKAgent string = "kAgent" - - // AwsCommonObjectProtectionParamsProtectionTypeKNative captures enum value "kNative" - AwsCommonObjectProtectionParamsProtectionTypeKNative string = "kNative" - - // AwsCommonObjectProtectionParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AwsCommonObjectProtectionParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AwsCommonObjectProtectionParamsProtectionTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - AwsCommonObjectProtectionParamsProtectionTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // AwsCommonObjectProtectionParamsProtectionTypeKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - AwsCommonObjectProtectionParamsProtectionTypeKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // AwsCommonObjectProtectionParamsProtectionTypeKAwsS3 captures enum value "kAwsS3" - AwsCommonObjectProtectionParamsProtectionTypeKAwsS3 string = "kAwsS3" - - // AwsCommonObjectProtectionParamsProtectionTypeKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - AwsCommonObjectProtectionParamsProtectionTypeKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" -) - -// prop value enum -func (m *AwsCommonObjectProtectionParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsCommonObjectProtectionParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsCommonObjectProtectionParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws common object protection params based on context it is used -func (m *AwsCommonObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsCommonObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsCommonObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsCommonObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_entity_metadata.go b/v2/models/aws_entity_metadata.go deleted file mode 100644 index 36c8f7fd..00000000 --- a/v2/models/aws_entity_metadata.go +++ /dev/null @@ -1,109 +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" -) - -// AwsEntityMetadata Specifies the entity metadata of aws entities. -// -// swagger:model AwsEntityMetadata -type AwsEntityMetadata struct { - - // Specifies the entity metadata of postgres entities. - PostgresParams *AwsPostgresEntityMetadata `json:"postgresParams,omitempty"` -} - -// Validate validates this aws entity metadata -func (m *AwsEntityMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePostgresParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsEntityMetadata) validatePostgresParams(formats strfmt.Registry) error { - if swag.IsZero(m.PostgresParams) { // not required - return nil - } - - if m.PostgresParams != nil { - if err := m.PostgresParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postgresParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postgresParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws entity metadata based on the context it is used -func (m *AwsEntityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePostgresParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsEntityMetadata) contextValidatePostgresParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PostgresParams != nil { - - if swag.IsZero(m.PostgresParams) { // not required - return nil - } - - if err := m.PostgresParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postgresParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postgresParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsEntityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsEntityMetadata) UnmarshalBinary(b []byte) error { - var res AwsEntityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_fleet_info.go b/v2/models/aws_fleet_info.go deleted file mode 100644 index 6d5548b6..00000000 --- a/v2/models/aws_fleet_info.go +++ /dev/null @@ -1,141 +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" -) - -// AwsFleetInfo Update AWS Fleet Env Info Request. -// -// Specifies the params to add AWS specific fleet env info. -// -// swagger:model AwsFleetInfo -type AwsFleetInfo struct { - - // Specifies the IAM role used to create instances. - // Required: true - IamRole *string `json:"iamRole"` - - // Specifies the Region of the CE cluster. - // Required: true - Region *string `json:"region"` - - // Specifies the VPC of the CE cluster. - // Required: true - VpcID *string `json:"vpcId"` - - // Specifies the Subnet of the CE cluster. - // Required: true - SubnetID *string `json:"subnetId"` - - // Specifies the security group Id. - // Required: true - SecurityGroupID *string `json:"securityGroupId"` -} - -// Validate validates this aws fleet info -func (m *AwsFleetInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIamRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpcID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityGroupID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsFleetInfo) validateIamRole(formats strfmt.Registry) error { - - if err := validate.Required("iamRole", "body", m.IamRole); err != nil { - return err - } - - return nil -} - -func (m *AwsFleetInfo) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -func (m *AwsFleetInfo) validateVpcID(formats strfmt.Registry) error { - - if err := validate.Required("vpcId", "body", m.VpcID); err != nil { - return err - } - - return nil -} - -func (m *AwsFleetInfo) validateSubnetID(formats strfmt.Registry) error { - - if err := validate.Required("subnetId", "body", m.SubnetID); err != nil { - return err - } - - return nil -} - -func (m *AwsFleetInfo) validateSecurityGroupID(formats strfmt.Registry) error { - - if err := validate.Required("securityGroupId", "body", m.SecurityGroupID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws fleet info based on context it is used -func (m *AwsFleetInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsFleetInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsFleetInfo) UnmarshalBinary(b []byte) error { - var res AwsFleetInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_glacier_params.go b/v2/models/aws_glacier_params.go deleted file mode 100644 index c1cf059c..00000000 --- a/v2/models/aws_glacier_params.go +++ /dev/null @@ -1,288 +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" -) - -// AwsGlacierParams AWS Glacier Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class Glacier. -// -// swagger:model AwsGlacierParams -type AwsGlacierParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - // aws cloud c2 s params - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsGlacierParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - m.AwsCloudC2SParams = dataAO1.AwsCloudC2SParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsGlacierParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - dataAO1.AwsCloudC2SParams = m.AwsCloudC2SParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws glacier params -func (m *AwsGlacierParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudC2SParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsGlacierParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsGlacierParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsGlacierParams) validateAwsCloudC2SParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if m.AwsCloudC2SParams != nil { - if err := m.AwsCloudC2SParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws glacier params based on the context it is used -func (m *AwsGlacierParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudC2SParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsGlacierParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsGlacierParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsGlacierParams) contextValidateAwsCloudC2SParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudC2SParams != nil { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if err := m.AwsCloudC2SParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsGlacierParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsGlacierParams) UnmarshalBinary(b []byte) error { - var res AwsGlacierParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_i_am_role_params.go b/v2/models/aws_i_am_role_params.go deleted file mode 100644 index 643f3d1b..00000000 --- a/v2/models/aws_i_am_role_params.go +++ /dev/null @@ -1,90 +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" -) - -// AwsIAmRoleParams AWS IAmRole params. -// -// Specifies the parameters which are specific to IAmRole Authentication Method for AWS External Target. -// -// swagger:model AwsIAmRoleParams -type AwsIAmRoleParams struct { - - // Specifies the Account Id of the external target. - // Required: true - AccountID *string `json:"accountId"` - - // Specifies the I Am Role of the external target. - // Required: true - IAmRole *string `json:"iAmRole"` -} - -// Validate validates this aws i am role params -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) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - 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 { - return err - } - - return nil -} - -// ContextValidate validates this aws i am role params based on context it is used -func (m *AwsIAmRoleParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsIAmRoleParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsIAmRoleParams) UnmarshalBinary(b []byte) error { - var res AwsIAmRoleParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_i_am_user_params.go b/v2/models/aws_i_am_user_params.go deleted file mode 100644 index acce131b..00000000 --- a/v2/models/aws_i_am_user_params.go +++ /dev/null @@ -1,76 +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" -) - -// AwsIAmUserParams AWS IAmUser params. -// -// Specifies the parameters which are specific to IAmUSer Authentication Method for AWS External Target. -// -// swagger:model AwsIAmUserParams -type AwsIAmUserParams struct { - - // Specifies the Access Key Id of the external target. - // Required: true - AccessKeyID *string `json:"accessKeyId"` - - // Specifies the Secret Access Key of the external target. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` -} - -// Validate validates this aws i am user params -func (m *AwsIAmUserParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessKeyID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsIAmUserParams) validateAccessKeyID(formats strfmt.Registry) error { - - if err := validate.Required("accessKeyId", "body", m.AccessKeyID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws i am user params based on context it is used -func (m *AwsIAmUserParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsIAmUserParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsIAmUserParams) UnmarshalBinary(b []byte) error { - var res AwsIAmUserParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_kms_configuration.go b/v2/models/aws_kms_configuration.go deleted file mode 100644 index a70ac82e..00000000 --- a/v2/models/aws_kms_configuration.go +++ /dev/null @@ -1,152 +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" -) - -// AwsKmsConfiguration AWS KMS configuration response. -// -// swagger:model AwsKmsConfiguration -type AwsKmsConfiguration struct { - - // AWS CMK alias. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkAlias *string `json:"cmkAlias,omitempty"` - - // AWS CMK Amazon resource number. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkArn *string `json:"cmkArn,omitempty"` - - // AWS CMK key id. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkKeyID *string `json:"cmkKeyId,omitempty"` - - // AWS region, e.g. us-east-1, us-west-2, for the AWS Glacier service to be used to authenticate resources within this region by the configured AWS account. - Region *string `json:"region,omitempty"` - - AwsKmsConfigurationUpdateParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsKmsConfiguration) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - CmkAlias *string `json:"cmkAlias,omitempty"` - - CmkArn *string `json:"cmkArn,omitempty"` - - CmkKeyID *string `json:"cmkKeyId,omitempty"` - - Region *string `json:"region,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.CmkAlias = dataAO0.CmkAlias - - m.CmkArn = dataAO0.CmkArn - - m.CmkKeyID = dataAO0.CmkKeyID - - m.Region = dataAO0.Region - - // AO1 - var aO1 AwsKmsConfigurationUpdateParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.AwsKmsConfigurationUpdateParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsKmsConfiguration) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - CmkAlias *string `json:"cmkAlias,omitempty"` - - CmkArn *string `json:"cmkArn,omitempty"` - - CmkKeyID *string `json:"cmkKeyId,omitempty"` - - Region *string `json:"region,omitempty"` - } - - dataAO0.CmkAlias = m.CmkAlias - - dataAO0.CmkArn = m.CmkArn - - dataAO0.CmkKeyID = m.CmkKeyID - - dataAO0.Region = m.Region - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.AwsKmsConfigurationUpdateParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws kms configuration -func (m *AwsKmsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsKmsConfigurationUpdateParams - if err := m.AwsKmsConfigurationUpdateParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this aws kms configuration based on the context it is used -func (m *AwsKmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsKmsConfigurationUpdateParams - if err := m.AwsKmsConfigurationUpdateParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *AwsKmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsKmsConfiguration) UnmarshalBinary(b []byte) error { - var res AwsKmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_kms_configuration_response.go b/v2/models/aws_kms_configuration_response.go deleted file mode 100644 index 2e5dd249..00000000 --- a/v2/models/aws_kms_configuration_response.go +++ /dev/null @@ -1,68 +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" -) - -// AwsKmsConfigurationResponse AWS KMS configuration parameters. -// -// swagger:model AwsKmsConfigurationResponse -type AwsKmsConfigurationResponse struct { - - // AWS account access key id. Required when 'iamRoleArn' is not given. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // AWS CMK alias. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkAlias *string `json:"cmkAlias,omitempty"` - - // AWS CMK Amazon resource number. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkArn *string `json:"cmkArn,omitempty"` - - // AWS CMK key id. Only need one of cmkAlias, cmkArn, cmkKeyId to connect to AWS KMS. - CmkKeyID *string `json:"cmkKeyId,omitempty"` - - // The IAM role which will be used to authenticate with AWS KMS. Required when 'accessKeyId' and 'secretAccessKey' fields are not provided. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // AWS region, e.g. us-east-1, us-west-2, for the AWS Glacier service to be used to authenticate resources within this region by the configured AWS account. - Region *string `json:"region,omitempty"` - - // Enable SSL verification or not. - VerifySSL *bool `json:"verifySSL,omitempty"` -} - -// Validate validates this aws kms configuration response -func (m *AwsKmsConfigurationResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws kms configuration response based on context it is used -func (m *AwsKmsConfigurationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsKmsConfigurationResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsKmsConfigurationResponse) UnmarshalBinary(b []byte) error { - var res AwsKmsConfigurationResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_kms_configuration_update_params.go b/v2/models/aws_kms_configuration_update_params.go deleted file mode 100644 index 88207262..00000000 --- a/v2/models/aws_kms_configuration_update_params.go +++ /dev/null @@ -1,62 +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" -) - -// AwsKmsConfigurationUpdateParams AWS KMS configuration updatable parameters. -// -// swagger:model AwsKmsConfigurationUpdateParams -type AwsKmsConfigurationUpdateParams struct { - - // Specify the ca certificate. - CaCertificate *string `json:"caCertificate,omitempty"` - - // AWS account secret access key. Required when 'iamRoleArn' is not given. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // AWS account access key id. Required when 'iamRoleArn' is not given. - AccessKeyID *string `json:"accessKeyId,omitempty"` - - // The IAM role which will be used to authenticate with AWS KMS. Required when 'accessKeyId' and 'secretAccessKey' fields are not provided. - IamRoleArn *string `json:"iamRoleArn,omitempty"` - - // Enable SSL verification or not. - VerifySSL *bool `json:"verifySSL,omitempty"` -} - -// Validate validates this aws kms configuration update params -func (m *AwsKmsConfigurationUpdateParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws kms configuration update params based on context it is used -func (m *AwsKmsConfigurationUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsKmsConfigurationUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsKmsConfigurationUpdateParams) UnmarshalBinary(b []byte) error { - var res AwsKmsConfigurationUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_native_object_protection_params.go b/v2/models/aws_native_object_protection_params.go deleted file mode 100644 index 753795d3..00000000 --- a/v2/models/aws_native_object_protection_params.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsNativeObjectProtectionParams AWS Native Object Protection Request Params. -// -// Specifies the parameters which are specific to AWS Object Protection Groups using AWS native snapshot APIs. Atlease one of tags or objects must be specified. -// -// swagger:model AwsNativeObjectProtectionParams -type AwsNativeObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AwsObjectLevelParams `json:"objects"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at global level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this aws native object protection params -func (m *AwsNativeObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsNativeObjectProtectionParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws native object protection params based on the context it is used -func (m *AwsNativeObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsNativeObjectProtectionParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsNativeObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsNativeObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsNativeObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_native_protection_group_object_params.go b/v2/models/aws_native_protection_group_object_params.go deleted file mode 100644 index 7b92b35c..00000000 --- a/v2/models/aws_native_protection_group_object_params.go +++ /dev/null @@ -1,146 +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" -) - -// AwsNativeProtectionGroupObjectParams AWS Native Protection Group Object Params. -// -// Specifies the object parameters to create AWS Native Protection Group. -// -// swagger:model AwsNativeProtectionGroupObjectParams -type AwsNativeProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at object level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this aws native protection group object params -func (m *AwsNativeProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *AwsNativeProtectionGroupObjectParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws native protection group object params based on the context it is used -func (m *AwsNativeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *AwsNativeProtectionGroupObjectParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsNativeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsNativeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsNativeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_native_protection_group_params.go b/v2/models/aws_native_protection_group_params.go deleted file mode 100644 index bca1b289..00000000 --- a/v2/models/aws_native_protection_group_params.go +++ /dev/null @@ -1,286 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsNativeProtectionGroupParams AWS Native Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS related Protection Groups using AWS native snapshot APIs. Atlease one of tags or objects must be specified. -// -// swagger:model AwsNativeProtectionGroupParams -type AwsNativeProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - Objects []*AwsNativeProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at global level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` - - // Array of Array of VM Tag Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. Optionally specify a list of VMs to exclude from protecting by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. For example a Datacenter is selected to be protected but you want to exclude all the 'Former Employees' VMs in the East and West but keep all the VMs for 'Former Employees' in the South which are also stored in this Datacenter, by specifying the following tag id array: [ [1000, 2221], [1000, 3031] ], where 1000 is the 'Former Employee' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The first inner array [1000, 2221] produces a list of VMs that are both tagged with 'Former Employees' and 'East' (an intersection). The second inner array [1000, 3031] produces a list of VMs that are both tagged with 'Former Employees' and 'West' (an intersection). The outer array combines the list of VMs from the two inner arrays. The list of resulting VMs are excluded from being protected this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` -} - -// Validate validates this aws native protection group params -func (m *AwsNativeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws native protection group params based on the context it is used -func (m *AwsNativeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsNativeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *AwsNativeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsNativeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsNativeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsNativeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_object_level_params.go b/v2/models/aws_object_level_params.go deleted file mode 100644 index a71f6ed4..00000000 --- a/v2/models/aws_object_level_params.go +++ /dev/null @@ -1,132 +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" -) - -// AwsObjectLevelParams AWS Object Level Params -// -// Specifies the Aws object level settings for object protection. -// -// swagger:model AwsObjectLevelParams -type AwsObjectLevelParams struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the paramaters to exclude ebs volumes at object level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` - - // Specifies the list of IDs of the objects to not be protected in this backup. This field only applies if provided object id is non leaf entity such as Tag or a folder. This can be used to ignore specific objects (can include tags) under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` -} - -// Validate validates this aws object level params -func (m *AwsObjectLevelParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectLevelParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *AwsObjectLevelParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws object level params based on the context it is used -func (m *AwsObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectLevelParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsObjectLevelParams) UnmarshalBinary(b []byte) error { - var res AwsObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_object_protection_request_params.go b/v2/models/aws_object_protection_request_params.go deleted file mode 100644 index 68818d6d..00000000 --- a/v2/models/aws_object_protection_request_params.go +++ /dev/null @@ -1,468 +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" -) - -// AwsObjectProtectionRequestParams AWS Object Protection Request Params. -// -// Specifies the parameters which are specific to AWS related Object Protection. -// -// swagger:model AwsObjectProtectionRequestParams -type AwsObjectProtectionRequestParams struct { - AwsCommonObjectProtectionParams - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot APIs. - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot orchestration with snapshot manager. - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS RDS snapshot orchestration with snapshot manager. - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS Aurora snapshot orchestration with snapshot manager. - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS S3 Protection. - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS RDS Postgres related Object protection. - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AwsCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AwsCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.SnapshotManagerProtectionTypeParams = dataAO1.SnapshotManagerProtectionTypeParams - - m.RdsSnapshotManagerProtectionTypeParams = dataAO1.RdsSnapshotManagerProtectionTypeParams - - m.AuroraSnapshotManagerProtectionTypeParams = dataAO1.AuroraSnapshotManagerProtectionTypeParams - - m.S3ProtectionTypeParams = dataAO1.S3ProtectionTypeParams - - m.RdsPostgresProtectionTypeParams = dataAO1.RdsPostgresProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AwsCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.SnapshotManagerProtectionTypeParams = m.SnapshotManagerProtectionTypeParams - - dataAO1.RdsSnapshotManagerProtectionTypeParams = m.RdsSnapshotManagerProtectionTypeParams - - dataAO1.AuroraSnapshotManagerProtectionTypeParams = m.AuroraSnapshotManagerProtectionTypeParams - - dataAO1.S3ProtectionTypeParams = m.S3ProtectionTypeParams - - dataAO1.RdsPostgresProtectionTypeParams = m.RdsPostgresProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws object protection request params -func (m *AwsObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuroraSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3ProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsPostgresProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.SnapshotManagerProtectionTypeParams != nil { - if err := m.SnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateRdsSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - if err := m.RdsSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateAuroraSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - if err := m.AuroraSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateS3ProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if m.S3ProtectionTypeParams != nil { - if err := m.S3ProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) validateRdsPostgresProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if m.RdsPostgresProtectionTypeParams != nil { - if err := m.RdsPostgresProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws object protection request params based on the context it is used -func (m *AwsObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3ProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsPostgresProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.SnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateRdsSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.AuroraSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateS3ProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3ProtectionTypeParams != nil { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if err := m.S3ProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionRequestParams) contextValidateRdsPostgresProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsPostgresProtectionTypeParams != nil { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsPostgresProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res AwsObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_object_protection_response_params.go b/v2/models/aws_object_protection_response_params.go deleted file mode 100644 index 305ab51a..00000000 --- a/v2/models/aws_object_protection_response_params.go +++ /dev/null @@ -1,468 +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" -) - -// AwsObjectProtectionResponseParams AWS Object Protection Response Params. -// -// Specifies the parameters which are specific to AWS related Object Protection response. -// -// swagger:model AwsObjectProtectionResponseParams -type AwsObjectProtectionResponseParams struct { - AwsCommonObjectProtectionParams - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot APIs. - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot orchestration with snapshot manager. - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS RDS snapshot orchestration with snapshot manager. - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS Aurora snapshot orchestration with snapshot manager. - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS S3 Protection. - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS RDS Postgres related Object protection. - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AwsCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AwsCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.SnapshotManagerProtectionTypeParams = dataAO1.SnapshotManagerProtectionTypeParams - - m.RdsSnapshotManagerProtectionTypeParams = dataAO1.RdsSnapshotManagerProtectionTypeParams - - m.AuroraSnapshotManagerProtectionTypeParams = dataAO1.AuroraSnapshotManagerProtectionTypeParams - - m.S3ProtectionTypeParams = dataAO1.S3ProtectionTypeParams - - m.RdsPostgresProtectionTypeParams = dataAO1.RdsPostgresProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AwsCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.SnapshotManagerProtectionTypeParams = m.SnapshotManagerProtectionTypeParams - - dataAO1.RdsSnapshotManagerProtectionTypeParams = m.RdsSnapshotManagerProtectionTypeParams - - dataAO1.AuroraSnapshotManagerProtectionTypeParams = m.AuroraSnapshotManagerProtectionTypeParams - - dataAO1.S3ProtectionTypeParams = m.S3ProtectionTypeParams - - dataAO1.RdsPostgresProtectionTypeParams = m.RdsPostgresProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws object protection response params -func (m *AwsObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuroraSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3ProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsPostgresProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.SnapshotManagerProtectionTypeParams != nil { - if err := m.SnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateRdsSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - if err := m.RdsSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateAuroraSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - if err := m.AuroraSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateS3ProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if m.S3ProtectionTypeParams != nil { - if err := m.S3ProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) validateRdsPostgresProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if m.RdsPostgresProtectionTypeParams != nil { - if err := m.RdsPostgresProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws object protection response params based on the context it is used -func (m *AwsObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3ProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsPostgresProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.SnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateRdsSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.AuroraSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateS3ProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3ProtectionTypeParams != nil { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if err := m.S3ProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionResponseParams) contextValidateRdsPostgresProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsPostgresProtectionTypeParams != nil { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsPostgresProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res AwsObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_object_protection_update_request_params.go b/v2/models/aws_object_protection_update_request_params.go deleted file mode 100644 index da71e876..00000000 --- a/v2/models/aws_object_protection_update_request_params.go +++ /dev/null @@ -1,468 +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" -) - -// AwsObjectProtectionUpdateRequestParams AWS Object Protection Update Request Params. -// -// Specifies the parameters which are specific to AWS related Object Protection update request. -// -// swagger:model AwsObjectProtectionUpdateRequestParams -type AwsObjectProtectionUpdateRequestParams struct { - AwsCommonObjectProtectionParams - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot APIs. - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS native snapshot orchestration with snapshot manager. - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS RDS snapshot orchestration with snapshot manager. - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection using AWS Aurora snapshot orchestration with snapshot manager. - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS S3 Protection. - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS RDS Postgres related Object protection. - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AwsCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AwsCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.SnapshotManagerProtectionTypeParams = dataAO1.SnapshotManagerProtectionTypeParams - - m.RdsSnapshotManagerProtectionTypeParams = dataAO1.RdsSnapshotManagerProtectionTypeParams - - m.AuroraSnapshotManagerProtectionTypeParams = dataAO1.AuroraSnapshotManagerProtectionTypeParams - - m.S3ProtectionTypeParams = dataAO1.S3ProtectionTypeParams - - m.RdsPostgresProtectionTypeParams = dataAO1.RdsPostgresProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AwsCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AwsNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerObjectProtectionParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - RdsSnapshotManagerProtectionTypeParams *AwsRdsSnapshotManagerObjectProtectionParams `json:"rdsSnapshotManagerProtectionTypeParams,omitempty"` - - AuroraSnapshotManagerProtectionTypeParams *AwsAuroraSnapshotManagerObjectProtectionParams `json:"auroraSnapshotManagerProtectionTypeParams,omitempty"` - - S3ProtectionTypeParams *AwsS3ProtectionParams `json:"s3ProtectionTypeParams,omitempty"` - - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionParams `json:"rdsPostgresProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.SnapshotManagerProtectionTypeParams = m.SnapshotManagerProtectionTypeParams - - dataAO1.RdsSnapshotManagerProtectionTypeParams = m.RdsSnapshotManagerProtectionTypeParams - - dataAO1.AuroraSnapshotManagerProtectionTypeParams = m.AuroraSnapshotManagerProtectionTypeParams - - dataAO1.S3ProtectionTypeParams = m.S3ProtectionTypeParams - - dataAO1.RdsPostgresProtectionTypeParams = m.RdsPostgresProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws object protection update request params -func (m *AwsObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuroraSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3ProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsPostgresProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.SnapshotManagerProtectionTypeParams != nil { - if err := m.SnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateRdsSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - if err := m.RdsSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateAuroraSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - if err := m.AuroraSnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateS3ProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if m.S3ProtectionTypeParams != nil { - if err := m.S3ProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) validateRdsPostgresProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if m.RdsPostgresProtectionTypeParams != nil { - if err := m.RdsPostgresProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws object protection update request params based on the context it is used -func (m *AwsObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsCommonObjectProtectionParams - if err := m.AwsCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3ProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsPostgresProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.SnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateRdsSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.RdsSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateAuroraSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraSnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.AuroraSnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.AuroraSnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraSnapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateS3ProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3ProtectionTypeParams != nil { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if err := m.S3ProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsObjectProtectionUpdateRequestParams) contextValidateRdsPostgresProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsPostgresProtectionTypeParams != nil { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsPostgresProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res AwsObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_postgres_entity_metadata.go b/v2/models/aws_postgres_entity_metadata.go deleted file mode 100644 index 21508b42..00000000 --- a/v2/models/aws_postgres_entity_metadata.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsPostgresEntityMetadata Specifies the entity metadata of aws postgres entities. -// -// swagger:model AwsPostgresEntityMetadata -type AwsPostgresEntityMetadata struct { - - // Specifies the metadata list. - // Required: true - MetadataList []*AwsPostgresMetadata `json:"metadataList"` - - // Specifies the engine id of the database which can be used to identify the type of database. - DbEngineID string `json:"dbEngineId,omitempty"` -} - -// Validate validates this aws postgres entity metadata -func (m *AwsPostgresEntityMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadataList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsPostgresEntityMetadata) validateMetadataList(formats strfmt.Registry) error { - - if err := validate.Required("metadataList", "body", m.MetadataList); err != nil { - return err - } - - for i := 0; i < len(m.MetadataList); i++ { - if swag.IsZero(m.MetadataList[i]) { // not required - continue - } - - if m.MetadataList[i] != nil { - if err := m.MetadataList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws postgres entity metadata based on the context it is used -func (m *AwsPostgresEntityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadataList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsPostgresEntityMetadata) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MetadataList); i++ { - - if m.MetadataList[i] != nil { - - if swag.IsZero(m.MetadataList[i]) { // not required - return nil - } - - if err := m.MetadataList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsPostgresEntityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsPostgresEntityMetadata) UnmarshalBinary(b []byte) error { - var res AwsPostgresEntityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_postgres_metadata.go b/v2/models/aws_postgres_metadata.go deleted file mode 100644 index 6a8612c2..00000000 --- a/v2/models/aws_postgres_metadata.go +++ /dev/null @@ -1,160 +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" -) - -// AwsPostgresMetadata Specifies the metadata types and values of aws postgres. -// -// swagger:model AwsPostgresMetadata -type AwsPostgresMetadata struct { - - // Specifies the standard username and password type of credentials. - StandardCredentials *Credentials `json:"standardCredentials,omitempty"` - - // Specifies the type of metadata being sent in the request. - // Required: true - // Enum: ["Credentials"] - MetadataType *string `json:"metadataType"` -} - -// Validate validates this aws postgres metadata -func (m *AwsPostgresMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStandardCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadataType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsPostgresMetadata) validateStandardCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.StandardCredentials) { // not required - return nil - } - - if m.StandardCredentials != nil { - if err := m.StandardCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -var awsPostgresMetadataTypeMetadataTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Credentials"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsPostgresMetadataTypeMetadataTypePropEnum = append(awsPostgresMetadataTypeMetadataTypePropEnum, v) - } -} - -const ( - - // AwsPostgresMetadataMetadataTypeCredentials captures enum value "Credentials" - AwsPostgresMetadataMetadataTypeCredentials string = "Credentials" -) - -// prop value enum -func (m *AwsPostgresMetadata) validateMetadataTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsPostgresMetadataTypeMetadataTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsPostgresMetadata) validateMetadataType(formats strfmt.Registry) error { - - if err := validate.Required("metadataType", "body", m.MetadataType); err != nil { - return err - } - - // value enum - if err := m.validateMetadataTypeEnum("metadataType", "body", *m.MetadataType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws postgres metadata based on the context it is used -func (m *AwsPostgresMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStandardCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsPostgresMetadata) contextValidateStandardCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.StandardCredentials != nil { - - if swag.IsZero(m.StandardCredentials) { // not required - return nil - } - - if err := m.StandardCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsPostgresMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsPostgresMetadata) UnmarshalBinary(b []byte) error { - var res AwsPostgresMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_postgres_metadata_type.go b/v2/models/aws_postgres_metadata_type.go deleted file mode 100644 index 0cfabced..00000000 --- a/v2/models/aws_postgres_metadata_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsPostgresMetadataType ObjectMetadataType -// -// Specifies the metadata type for AWS postgres. -// -// swagger:model AwsPostgresMetadataType -type AwsPostgresMetadataType struct { - - // Specifies the types of metadatas associated to entity. - // Enum: ["Credentials"] - EntityMetadataType string `json:"entityMetadataType,omitempty"` -} - -// Validate validates this aws postgres metadata type -func (m *AwsPostgresMetadataType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityMetadataType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsPostgresMetadataTypeTypeEntityMetadataTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Credentials"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsPostgresMetadataTypeTypeEntityMetadataTypePropEnum = append(awsPostgresMetadataTypeTypeEntityMetadataTypePropEnum, v) - } -} - -const ( - - // AwsPostgresMetadataTypeEntityMetadataTypeCredentials captures enum value "Credentials" - AwsPostgresMetadataTypeEntityMetadataTypeCredentials string = "Credentials" -) - -// prop value enum -func (m *AwsPostgresMetadataType) validateEntityMetadataTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsPostgresMetadataTypeTypeEntityMetadataTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsPostgresMetadataType) validateEntityMetadataType(formats strfmt.Registry) error { - if swag.IsZero(m.EntityMetadataType) { // not required - return nil - } - - // value enum - if err := m.validateEntityMetadataTypeEnum("entityMetadataType", "body", m.EntityMetadataType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws postgres metadata type based on context it is used -func (m *AwsPostgresMetadataType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsPostgresMetadataType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsPostgresMetadataType) UnmarshalBinary(b []byte) error { - var res AwsPostgresMetadataType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_protection_group_params.go b/v2/models/aws_protection_group_params.go deleted file mode 100644 index a0999a74..00000000 --- a/v2/models/aws_protection_group_params.go +++ /dev/null @@ -1,486 +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" -) - -// AwsProtectionGroupParams AWS Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS related Protection Groups. -// -// swagger:model AwsProtectionGroupParams -type AwsProtectionGroupParams struct { - - // Specifies the AWS Protection Group type. - // Required: true - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"] - ProtectionType *string `json:"protectionType"` - - // Specifies the parameters which are specific to AWS related Protection Groups using cohesity protection-service installed on EC2 instance. - AgentProtectionTypeParams *AwsAgentProtectionGroupParams `json:"agentProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection Groups using AWS native snapshot APIs. - NativeProtectionTypeParams *AwsNativeProtectionGroupParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection Groups using AWS native snapshot orchestration with snapshot manager. - SnapshotManagerProtectionTypeParams *AwsSnapshotManagerProtectionGroupParams `json:"snapshotManagerProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS RDS related Protection Groups. - RdsProtectionTypeParams *AwsRdsProtectionGroupParams `json:"rdsProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS Aurora related Protection Groups. - AuroraProtectionTypeParams *AwsAuroraProtectionGroupParams `json:"auroraProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS S3 Protection. - S3ProtectionTypeParams *AwsS3ProtectionGroupParams `json:"s3ProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to AWS RDS Postgres related Protection Groups. - RdsPostgresProtectionTypeParams *AwsRdsPostgresProtectionGroupParams `json:"rdsPostgresProtectionTypeParams,omitempty"` -} - -// Validate validates this aws protection group params -func (m *AwsProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuroraProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3ProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRdsPostgresProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionGroupParamsTypeProtectionTypePropEnum = append(awsProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AwsProtectionGroupParamsProtectionTypeKAgent captures enum value "kAgent" - AwsProtectionGroupParamsProtectionTypeKAgent string = "kAgent" - - // AwsProtectionGroupParamsProtectionTypeKNative captures enum value "kNative" - AwsProtectionGroupParamsProtectionTypeKNative string = "kNative" - - // AwsProtectionGroupParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AwsProtectionGroupParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AwsProtectionGroupParamsProtectionTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - AwsProtectionGroupParamsProtectionTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // AwsProtectionGroupParamsProtectionTypeKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - AwsProtectionGroupParamsProtectionTypeKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // AwsProtectionGroupParamsProtectionTypeKAwsS3 captures enum value "kAwsS3" - AwsProtectionGroupParamsProtectionTypeKAwsS3 string = "kAwsS3" - - // AwsProtectionGroupParamsProtectionTypeKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - AwsProtectionGroupParamsProtectionTypeKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" -) - -// prop value enum -func (m *AwsProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateAgentProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.AgentProtectionTypeParams) { // not required - return nil - } - - if m.AgentProtectionTypeParams != nil { - if err := m.AgentProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.SnapshotManagerProtectionTypeParams != nil { - if err := m.SnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateRdsProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RdsProtectionTypeParams) { // not required - return nil - } - - if m.RdsProtectionTypeParams != nil { - if err := m.RdsProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateAuroraProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraProtectionTypeParams) { // not required - return nil - } - - if m.AuroraProtectionTypeParams != nil { - if err := m.AuroraProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateS3ProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if m.S3ProtectionTypeParams != nil { - if err := m.S3ProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) validateRdsPostgresProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if m.RdsPostgresProtectionTypeParams != nil { - if err := m.RdsPostgresProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws protection group params based on the context it is used -func (m *AwsProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuroraProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3ProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRdsPostgresProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateAgentProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentProtectionTypeParams != nil { - - if swag.IsZero(m.AgentProtectionTypeParams) { // not required - return nil - } - - if err := m.AgentProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.SnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateRdsProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsProtectionTypeParams != nil { - - if swag.IsZero(m.RdsProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateAuroraProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraProtectionTypeParams != nil { - - if swag.IsZero(m.AuroraProtectionTypeParams) { // not required - return nil - } - - if err := m.AuroraProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateS3ProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3ProtectionTypeParams != nil { - - if swag.IsZero(m.S3ProtectionTypeParams) { // not required - return nil - } - - if err := m.S3ProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3ProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3ProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AwsProtectionGroupParams) contextValidateRdsPostgresProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsPostgresProtectionTypeParams != nil { - - if swag.IsZero(m.RdsPostgresProtectionTypeParams) { // not required - return nil - } - - if err := m.RdsPostgresProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsPostgresProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsPostgresProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_protection_group_type.go b/v2/models/aws_protection_group_type.go deleted file mode 100644 index 7e105031..00000000 --- a/v2/models/aws_protection_group_type.go +++ /dev/null @@ -1,122 +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" -) - -// AwsProtectionGroupType AWS Protection Group type. -// -// AWS Protection Group type. -// -// swagger:model AwsProtectionGroupType -type AwsProtectionGroupType struct { - - // Specifies AWS Protection Group type. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this aws protection group type -func (m *AwsProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsProtectionGroupTypeTypeEnvironmentPropEnum = append(awsProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // AwsProtectionGroupTypeEnvironmentKAgent captures enum value "kAgent" - AwsProtectionGroupTypeEnvironmentKAgent string = "kAgent" - - // AwsProtectionGroupTypeEnvironmentKNative captures enum value "kNative" - AwsProtectionGroupTypeEnvironmentKNative string = "kNative" - - // AwsProtectionGroupTypeEnvironmentKSnapshotManager captures enum value "kSnapshotManager" - AwsProtectionGroupTypeEnvironmentKSnapshotManager string = "kSnapshotManager" - - // AwsProtectionGroupTypeEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - AwsProtectionGroupTypeEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // AwsProtectionGroupTypeEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - AwsProtectionGroupTypeEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // AwsProtectionGroupTypeEnvironmentKAwsS3 captures enum value "kAwsS3" - AwsProtectionGroupTypeEnvironmentKAwsS3 string = "kAwsS3" - - // AwsProtectionGroupTypeEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - AwsProtectionGroupTypeEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" -) - -// prop value enum -func (m *AwsProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsProtectionGroupType) 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 validates this aws protection group type based on context it is used -func (m *AwsProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsProtectionGroupType) UnmarshalBinary(b []byte) error { - var res AwsProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_postgres_object_level_params.go b/v2/models/aws_rds_postgres_object_level_params.go deleted file mode 100644 index 9667a067..00000000 --- a/v2/models/aws_rds_postgres_object_level_params.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" - "github.com/go-openapi/validate" -) - -// AwsRdsPostgresObjectLevelParams AWS RDS Postgres Ingest Object protection Object Params. -// -// Specifies the object parameters to create an AWS RDS Postgres Ingest Object protection. -// -// swagger:model AwsRdsPostgresObjectLevelParams -type AwsRdsPostgresObjectLevelParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the database. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws rds postgres object level params -func (m *AwsRdsPostgresObjectLevelParams) 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 *AwsRdsPostgresObjectLevelParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws rds postgres object level params based on the context it is used -func (m *AwsRdsPostgresObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresObjectLevelParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsPostgresObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsPostgresObjectLevelParams) UnmarshalBinary(b []byte) error { - var res AwsRdsPostgresObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_postgres_protection_group_object_params.go b/v2/models/aws_rds_postgres_protection_group_object_params.go deleted file mode 100644 index ae305d59..00000000 --- a/v2/models/aws_rds_postgres_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AwsRdsPostgresProtectionGroupObjectParams AWS RDS Postgres Ingest Protection Group Object Params. -// -// Specifies the object parameters to create an AWS RDS Postgres Ingest Protection Group. -// -// swagger:model AwsRdsPostgresProtectionGroupObjectParams -type AwsRdsPostgresProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the database. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws rds postgres protection group object params -func (m *AwsRdsPostgresProtectionGroupObjectParams) 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 *AwsRdsPostgresProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws rds postgres protection group object params based on the context it is used -func (m *AwsRdsPostgresProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsRdsPostgresProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_postgres_protection_group_params.go b/v2/models/aws_rds_postgres_protection_group_params.go deleted file mode 100644 index 3f65d1e8..00000000 --- a/v2/models/aws_rds_postgres_protection_group_params.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsRdsPostgresProtectionGroupParams AWS RDS Snapshot Manager Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS RDS Postgres related Protection Groups. -// -// swagger:model AwsRdsPostgresProtectionGroupParams -type AwsRdsPostgresProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*AwsRdsPostgresProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this aws rds postgres protection group params -func (m *AwsRdsPostgresProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsRdsPostgresProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws rds postgres protection group params based on the context it is used -func (m *AwsRdsPostgresProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsRdsPostgresProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsRdsPostgresProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsRdsPostgresProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_postgres_protection_params.go b/v2/models/aws_rds_postgres_protection_params.go deleted file mode 100644 index f782ce2f..00000000 --- a/v2/models/aws_rds_postgres_protection_params.go +++ /dev/null @@ -1,146 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsRdsPostgresProtectionParams AWS RDS Snapshot Manager Object protection Request Params. -// -// Specifies the parameters which are specific to AWS RDS Postgres related Object protection. -// -// swagger:model AwsRdsPostgresProtectionParams -type AwsRdsPostgresProtectionParams struct { - - // Specifies the objects to be protected. - // Unique: true - Objects []*AwsRdsPostgresObjectLevelParams `json:"objects"` - - // Specifies the id of the source of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this aws rds postgres protection params -func (m *AwsRdsPostgresProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws rds postgres protection params based on the context it is used -func (m *AwsRdsPostgresProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsPostgresProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsRdsPostgresProtectionParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsPostgresProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsRdsPostgresProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_protection_group_object_params.go b/v2/models/aws_rds_protection_group_object_params.go deleted file mode 100644 index 3b8fdf95..00000000 --- a/v2/models/aws_rds_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AwsRdsProtectionGroupObjectParams AWS RDS Snapshot Manager Protection Group Object Params. -// -// Specifies the object parameters to create an AWS RDS Protection Group. -// -// swagger:model AwsRdsProtectionGroupObjectParams -type AwsRdsProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws rds protection group object params -func (m *AwsRdsProtectionGroupObjectParams) 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 *AwsRdsProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws rds protection group object params based on the context it is used -func (m *AwsRdsProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsRdsProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_protection_group_params.go b/v2/models/aws_rds_protection_group_params.go deleted file mode 100644 index fc515ef3..00000000 --- a/v2/models/aws_rds_protection_group_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsRdsProtectionGroupParams AWS RDS Snapshot Manager Protection Group Request Params. -// -// Specifies the parameters which are specific to AWS RDS related Protection Groups. -// -// swagger:model AwsRdsProtectionGroupParams -type AwsRdsProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*AwsRdsProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Array of arrays of RDS Tag Ids that Specify db instaces to Protect. - RdsTagIds [][]int64 `json:"rdsTagIds"` - - // Array of arrays of RDS Tag Ids that Specify db instaces to Exclude. - ExcludeRdsTagIds [][]int64 `json:"excludeRdsTagIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this aws rds protection group params -func (m *AwsRdsProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsRdsProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws rds protection group params based on the context it is used -func (m *AwsRdsProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsRdsProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsRdsProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsRdsProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_recovery_target_config.go b/v2/models/aws_rds_recovery_target_config.go deleted file mode 100644 index fd00c076..00000000 --- a/v2/models/aws_rds_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// AwsRdsRecoveryTargetConfig AWS RDS Recovery Target Config. -// -// Specifies the target object parameters to recover AWS RDS. -// -// swagger:model AwsRdsRecoveryTargetConfig -type AwsRdsRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the RDS instances will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAwsRdsNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this aws rds recovery target config -func (m *AwsRdsRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *AwsRdsRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws rds recovery target config based on the context it is used -func (m *AwsRdsRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsRdsRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_rds_snapshot_manager_object_protection_params.go b/v2/models/aws_rds_snapshot_manager_object_protection_params.go deleted file mode 100644 index 2564d386..00000000 --- a/v2/models/aws_rds_snapshot_manager_object_protection_params.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsRdsSnapshotManagerObjectProtectionParams Create AWS RDS Snapshot Manager Object Protection Request Body -// -// Specifies the parameters which are specific to AWS Object Protection using AWS RDS snapshot orchestration with snapshot manager. Atlease one of tags or objects must be specified. -// -// swagger:model AwsRdsSnapshotManagerObjectProtectionParams -type AwsRdsSnapshotManagerObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AwsObjectLevelParams `json:"objects"` -} - -// Validate validates this aws rds snapshot manager object protection params -func (m *AwsRdsSnapshotManagerObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsSnapshotManagerObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this aws rds snapshot manager object protection params based on the context it is used -func (m *AwsRdsSnapshotManagerObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRdsSnapshotManagerObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRdsSnapshotManagerObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRdsSnapshotManagerObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsRdsSnapshotManagerObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_recover_files_new_target_config.go b/v2/models/aws_recover_files_new_target_config.go deleted file mode 100644 index 2a5529e8..00000000 --- a/v2/models/aws_recover_files_new_target_config.go +++ /dev/null @@ -1,178 +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" -) - -// AwsRecoverFilesNewTargetConfig AWS Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to a new target. -// -// swagger:model AwsRecoverFilesNewTargetConfig -type AwsRecoverFilesNewTargetConfig struct { - - // Specifies the path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this aws recover files new target config -func (m *AwsRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *AwsRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws recover files new target config based on the context it is used -func (m *AwsRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_recover_files_original_target_config.go b/v2/models/aws_recover_files_original_target_config.go deleted file mode 100644 index ff044b63..00000000 --- a/v2/models/aws_recover_files_original_target_config.go +++ /dev/null @@ -1,132 +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" -) - -// AwsRecoverFilesOriginalTargetConfig AWS Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model AwsRecoverFilesOriginalTargetConfig -type AwsRecoverFilesOriginalTargetConfig struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this aws recover files original target config -func (m *AwsRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *AwsRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws recover files original target config based on the context it is used -func (m *AwsRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_recover_s3_new_target_config.go b/v2/models/aws_recover_s3_new_target_config.go deleted file mode 100644 index 5bff2c06..00000000 --- a/v2/models/aws_recover_s3_new_target_config.go +++ /dev/null @@ -1,208 +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" -) - -// AwsRecoverS3NewTargetConfig AWS Recover S3 Buckets and Objects New Target Config. -// -// Specifies the configuration for recovering S3 objects and buckets to a new target. -// -// swagger:model AwsRecoverS3NewTargetConfig -type AwsRecoverS3NewTargetConfig struct { - - // Specifies the AWS bucket in which to recover S3 Objects. - // Required: true - Bucket *RecoveryObjectIdentifier `json:"bucket"` - - // Specifies the AWS region in which to recover S3 Objects. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` - - // Specifies the AWS account ID in which to recover S3 Objects. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this aws recover s3 new target config -func (m *AwsRecoverS3NewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) validateBucket(formats strfmt.Registry) error { - - if err := validate.Required("bucket", "body", m.Bucket); err != nil { - return err - } - - if m.Bucket != nil { - if err := m.Bucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucket") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws recover s3 new target config based on the context it is used -func (m *AwsRecoverS3NewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBucket(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) contextValidateBucket(ctx context.Context, formats strfmt.Registry) error { - - if m.Bucket != nil { - - if err := m.Bucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucket") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *AwsRecoverS3NewTargetConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRecoverS3NewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRecoverS3NewTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsRecoverS3NewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_region_id.go b/v2/models/aws_region_id.go deleted file mode 100644 index f27c8336..00000000 --- a/v2/models/aws_region_id.go +++ /dev/null @@ -1,140 +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" -) - -// AwsRegionID Aws Region Id -// -// Specifies the AWS region id. -// -// swagger:model AwsRegionId -type AwsRegionID struct { - - // Specifies the AWS region id. - // Enum: ["us-east-1","us-east-2","us-west-1","us-west-2","ca-central-1","ap-northeast-1","ap-south-1","ap-southeast-1","ap-southeast-2","eu-central-1","eu-west-2","me-south-1","eu-west-3"] - AwsRegionID string `json:"awsRegionId,omitempty"` -} - -// Validate validates this aws region Id -func (m *AwsRegionID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsRegionID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsRegionIdTypeAwsRegionIDPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["us-east-1","us-east-2","us-west-1","us-west-2","ca-central-1","ap-northeast-1","ap-south-1","ap-southeast-1","ap-southeast-2","eu-central-1","eu-west-2","me-south-1","eu-west-3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsRegionIdTypeAwsRegionIDPropEnum = append(awsRegionIdTypeAwsRegionIDPropEnum, v) - } -} - -const ( - - // AwsRegionIDAwsRegionIDUsDashEastDash1 captures enum value "us-east-1" - AwsRegionIDAwsRegionIDUsDashEastDash1 string = "us-east-1" - - // AwsRegionIDAwsRegionIDUsDashEastDash2 captures enum value "us-east-2" - AwsRegionIDAwsRegionIDUsDashEastDash2 string = "us-east-2" - - // AwsRegionIDAwsRegionIDUsDashWestDash1 captures enum value "us-west-1" - AwsRegionIDAwsRegionIDUsDashWestDash1 string = "us-west-1" - - // AwsRegionIDAwsRegionIDUsDashWestDash2 captures enum value "us-west-2" - AwsRegionIDAwsRegionIDUsDashWestDash2 string = "us-west-2" - - // AwsRegionIDAwsRegionIDCaDashCentralDash1 captures enum value "ca-central-1" - AwsRegionIDAwsRegionIDCaDashCentralDash1 string = "ca-central-1" - - // AwsRegionIDAwsRegionIDApDashNortheastDash1 captures enum value "ap-northeast-1" - AwsRegionIDAwsRegionIDApDashNortheastDash1 string = "ap-northeast-1" - - // AwsRegionIDAwsRegionIDApDashSouthDash1 captures enum value "ap-south-1" - AwsRegionIDAwsRegionIDApDashSouthDash1 string = "ap-south-1" - - // AwsRegionIDAwsRegionIDApDashSoutheastDash1 captures enum value "ap-southeast-1" - AwsRegionIDAwsRegionIDApDashSoutheastDash1 string = "ap-southeast-1" - - // AwsRegionIDAwsRegionIDApDashSoutheastDash2 captures enum value "ap-southeast-2" - AwsRegionIDAwsRegionIDApDashSoutheastDash2 string = "ap-southeast-2" - - // AwsRegionIDAwsRegionIDEuDashCentralDash1 captures enum value "eu-central-1" - AwsRegionIDAwsRegionIDEuDashCentralDash1 string = "eu-central-1" - - // AwsRegionIDAwsRegionIDEuDashWestDash2 captures enum value "eu-west-2" - AwsRegionIDAwsRegionIDEuDashWestDash2 string = "eu-west-2" - - // AwsRegionIDAwsRegionIDMeDashSouthDash1 captures enum value "me-south-1" - AwsRegionIDAwsRegionIDMeDashSouthDash1 string = "me-south-1" - - // AwsRegionIDAwsRegionIDEuDashWestDash3 captures enum value "eu-west-3" - AwsRegionIDAwsRegionIDEuDashWestDash3 string = "eu-west-3" -) - -// prop value enum -func (m *AwsRegionID) validateAwsRegionIDEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsRegionIdTypeAwsRegionIDPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsRegionID) validateAwsRegionID(formats strfmt.Registry) error { - if swag.IsZero(m.AwsRegionID) { // not required - return nil - } - - // value enum - if err := m.validateAwsRegionIDEnum("awsRegionId", "body", m.AwsRegionID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws region Id based on context it is used -func (m *AwsRegionID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsRegionID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsRegionID) UnmarshalBinary(b []byte) error { - var res AwsRegionID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_bucket_restore_filter_policy.go b/v2/models/aws_s3_bucket_restore_filter_policy.go deleted file mode 100644 index 4e96d9f3..00000000 --- a/v2/models/aws_s3_bucket_restore_filter_policy.go +++ /dev/null @@ -1,50 +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" -) - -// AwsS3BucketRestoreFilterPolicy Specifies the filtering policy for S3 Bucket Restore. This contains a list of include prefixes. If specified, only S3 Objects with a matching prefix will be recovered. -// -// swagger:model AwsS3BucketRestoreFilterPolicy -type AwsS3BucketRestoreFilterPolicy struct { - - // List of include prefixes that need to be recovered. - IncludeList []string `json:"includeList"` -} - -// Validate validates this aws s3 bucket restore filter policy -func (m *AwsS3BucketRestoreFilterPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this aws s3 bucket restore filter policy based on context it is used -func (m *AwsS3BucketRestoreFilterPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3BucketRestoreFilterPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3BucketRestoreFilterPolicy) UnmarshalBinary(b []byte) error { - var res AwsS3BucketRestoreFilterPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_glacier_deep_archive_params.go b/v2/models/aws_s3_glacier_deep_archive_params.go deleted file mode 100644 index 389ac96e..00000000 --- a/v2/models/aws_s3_glacier_deep_archive_params.go +++ /dev/null @@ -1,228 +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" -) - -// AwsS3GlacierDeepArchiveParams AWS S3 Glacier Deep Archive Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Glacier Deep Archive. -// -// swagger:model AwsS3GlacierDeepArchiveParams -type AwsS3GlacierDeepArchiveParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3GlacierDeepArchiveParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3GlacierDeepArchiveParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 glacier deep archive params -func (m *AwsS3GlacierDeepArchiveParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierDeepArchiveParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierDeepArchiveParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 glacier deep archive params based on the context it is used -func (m *AwsS3GlacierDeepArchiveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierDeepArchiveParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierDeepArchiveParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3GlacierDeepArchiveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3GlacierDeepArchiveParams) UnmarshalBinary(b []byte) error { - var res AwsS3GlacierDeepArchiveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_glacier_i_r_params.go b/v2/models/aws_s3_glacier_i_r_params.go deleted file mode 100644 index c4d2eb61..00000000 --- a/v2/models/aws_s3_glacier_i_r_params.go +++ /dev/null @@ -1,228 +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" -) - -// AwsS3GlacierIRParams AWS S3 Glacier IR Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Glacier IR. -// -// swagger:model AwsS3GlacierIRParams -type AwsS3GlacierIRParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3GlacierIRParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3GlacierIRParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 glacier i r params -func (m *AwsS3GlacierIRParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierIRParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierIRParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 glacier i r params based on the context it is used -func (m *AwsS3GlacierIRParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierIRParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierIRParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3GlacierIRParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3GlacierIRParams) UnmarshalBinary(b []byte) error { - var res AwsS3GlacierIRParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_glacier_params.go b/v2/models/aws_s3_glacier_params.go deleted file mode 100644 index 4cf491c4..00000000 --- a/v2/models/aws_s3_glacier_params.go +++ /dev/null @@ -1,228 +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" -) - -// AwsS3GlacierParams AWS S3 Glacier Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Glacier. -// -// swagger:model AwsS3GlacierParams -type AwsS3GlacierParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3GlacierParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3GlacierParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 glacier params -func (m *AwsS3GlacierParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 glacier params based on the context it is used -func (m *AwsS3GlacierParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3GlacierParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3GlacierParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3GlacierParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3GlacierParams) UnmarshalBinary(b []byte) error { - var res AwsS3GlacierParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_intelligent_params.go b/v2/models/aws_s3_intelligent_params.go deleted file mode 100644 index fe84e122..00000000 --- a/v2/models/aws_s3_intelligent_params.go +++ /dev/null @@ -1,228 +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" -) - -// AwsS3IntelligentParams AWS S3 Intelligent Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Intelligent. -// -// swagger:model AwsS3IntelligentParams -type AwsS3IntelligentParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3IntelligentParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3IntelligentParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 intelligent params -func (m *AwsS3IntelligentParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3IntelligentParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3IntelligentParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 intelligent params based on the context it is used -func (m *AwsS3IntelligentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3IntelligentParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3IntelligentParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3IntelligentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3IntelligentParams) UnmarshalBinary(b []byte) error { - var res AwsS3IntelligentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_object_level_params.go b/v2/models/aws_s3_object_level_params.go deleted file mode 100644 index c495ac7c..00000000 --- a/v2/models/aws_s3_object_level_params.go +++ /dev/null @@ -1,79 +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" -) - -// AwsS3ObjectLevelParams AWS S3 Object Level Params -// -// Specifies the Aws S3 object level settings for object protection. -// -// swagger:model AwsS3ObjectLevelParams -type AwsS3ObjectLevelParams struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the list of prefix paths included. Objects containing any of these prefixes in their path will be included. Among inclusion and exclusion, inclusion will take precedence. - ObjectPrefixInclusions []string `json:"objectPrefixInclusions"` - - // Specifies the list of prefix paths excluded. Objects containing any of these prefixes in their path will be excluded. - ObjectPrefixExclusions []string `json:"objectPrefixExclusions"` -} - -// Validate validates this aws s3 object level params -func (m *AwsS3ObjectLevelParams) 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 *AwsS3ObjectLevelParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws s3 object level params based on context it is used -func (m *AwsS3ObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3ObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3ObjectLevelParams) UnmarshalBinary(b []byte) error { - var res AwsS3ObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_one_zone_i_a_params.go b/v2/models/aws_s3_one_zone_i_a_params.go deleted file mode 100644 index 1f2aa302..00000000 --- a/v2/models/aws_s3_one_zone_i_a_params.go +++ /dev/null @@ -1,228 +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" -) - -// AwsS3OneZoneIAParams AWS S3 One Zone IA Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 One Zone IA. -// -// swagger:model AwsS3OneZoneIAParams -type AwsS3OneZoneIAParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3OneZoneIAParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3OneZoneIAParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 one zone i a params -func (m *AwsS3OneZoneIAParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3OneZoneIAParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3OneZoneIAParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 one zone i a params based on the context it is used -func (m *AwsS3OneZoneIAParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3OneZoneIAParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3OneZoneIAParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3OneZoneIAParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3OneZoneIAParams) UnmarshalBinary(b []byte) error { - var res AwsS3OneZoneIAParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_protection_group_object_params.go b/v2/models/aws_s3_protection_group_object_params.go deleted file mode 100644 index 884338dd..00000000 --- a/v2/models/aws_s3_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AwsS3ProtectionGroupObjectParams AWS S3 Protection Group Object Params. -// -// Specifies the object parameters to create an AWS S3 Protection Group. -// -// swagger:model AwsS3ProtectionGroupObjectParams -type AwsS3ProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this aws s3 protection group object params -func (m *AwsS3ProtectionGroupObjectParams) 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 *AwsS3ProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this aws s3 protection group object params based on the context it is used -func (m *AwsS3ProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3ProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3ProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3ProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsS3ProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_protection_group_params.go b/v2/models/aws_s3_protection_group_params.go deleted file mode 100644 index ed119e2a..00000000 --- a/v2/models/aws_s3_protection_group_params.go +++ /dev/null @@ -1,208 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsS3ProtectionGroupParams Create AWS S3 Protection Request Body -// -// Specifies the parameters which are specific to AWS S3 Protection. -// -// swagger:model AwsS3ProtectionGroupParams -type AwsS3ProtectionGroupParams struct { - - // Specifies the objects to be protected. - Objects []*AwsS3ProtectionGroupObjectParams `json:"objects"` - - // Specifies whether to skip files on error or not. Default value is false. - SkipOnError *bool `json:"skipOnError,omitempty"` - - // Specifies the AWS S3 Storage classes to backup. - StorageClass []string `json:"storageClass"` - - // Specifies whether to backup object level acls. Default value is false. - BackupObjectLevelACLs *bool `json:"backupObjectLevelACLs,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this aws s3 protection group params -func (m *AwsS3ProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3ProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var awsS3ProtectionGroupParamsStorageClassItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3IntelligentTiering","AmazonS3StandardIA","AmazonS3OneZoneIA"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsS3ProtectionGroupParamsStorageClassItemsEnum = append(awsS3ProtectionGroupParamsStorageClassItemsEnum, v) - } -} - -func (m *AwsS3ProtectionGroupParams) validateStorageClassItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsS3ProtectionGroupParamsStorageClassItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsS3ProtectionGroupParams) validateStorageClass(formats strfmt.Registry) error { - if swag.IsZero(m.StorageClass) { // not required - return nil - } - - for i := 0; i < len(m.StorageClass); i++ { - - // value enum - if err := m.validateStorageClassItemsEnum("storageClass"+"."+strconv.Itoa(i), "body", m.StorageClass[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this aws s3 protection group params based on the context it is used -func (m *AwsS3ProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3ProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsS3ProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsS3ProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3ProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3ProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsS3ProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_protection_params.go b/v2/models/aws_s3_protection_params.go deleted file mode 100644 index 902877eb..00000000 --- a/v2/models/aws_s3_protection_params.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsS3ProtectionParams Create AWS S3 Protection Request Body -// -// Specifies the parameters which are specific to AWS Object Protection for AWS S3. Atlease one of tags or objects must be specified. -// -// swagger:model AwsS3ProtectionParams -type AwsS3ProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AwsS3ObjectLevelParams `json:"objects"` - - // Specifies whether to skip files on error or not. Default value is false. - SkipOnError *bool `json:"skipOnError,omitempty"` - - // Specifies the AWS S3 Storage classes to backup. - StorageClass []string `json:"storageClass"` - - // Specifies whether to backup object level acls. Default value is false. - BackupObjectLevelACLs *bool `json:"backupObjectLevelACLs,omitempty"` -} - -// Validate validates this aws s3 protection params -func (m *AwsS3ProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3ProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var awsS3ProtectionParamsStorageClassItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3IntelligentTiering","AmazonS3StandardIA","AmazonS3OneZoneIA"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsS3ProtectionParamsStorageClassItemsEnum = append(awsS3ProtectionParamsStorageClassItemsEnum, v) - } -} - -func (m *AwsS3ProtectionParams) validateStorageClassItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsS3ProtectionParamsStorageClassItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsS3ProtectionParams) validateStorageClass(formats strfmt.Registry) error { - if swag.IsZero(m.StorageClass) { // not required - return nil - } - - for i := 0; i < len(m.StorageClass); i++ { - - // value enum - if err := m.validateStorageClassItemsEnum("storageClass"+"."+strconv.Itoa(i), "body", m.StorageClass[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this aws s3 protection params based on the context it is used -func (m *AwsS3ProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3ProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3ProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3ProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsS3ProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_standard_i_a_params.go b/v2/models/aws_s3_standard_i_a_params.go deleted file mode 100644 index 4e864356..00000000 --- a/v2/models/aws_s3_standard_i_a_params.go +++ /dev/null @@ -1,288 +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" -) - -// AwsS3StandardIAParams AWS S3 Standard IA Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Standard IA. -// -// swagger:model AwsS3StandardIAParams -type AwsS3StandardIAParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - // aws cloud c2 s params - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3StandardIAParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - m.AwsCloudC2SParams = dataAO1.AwsCloudC2SParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3StandardIAParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - dataAO1.AwsCloudC2SParams = m.AwsCloudC2SParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 standard i a params -func (m *AwsS3StandardIAParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudC2SParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3StandardIAParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardIAParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardIAParams) validateAwsCloudC2SParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if m.AwsCloudC2SParams != nil { - if err := m.AwsCloudC2SParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 standard i a params based on the context it is used -func (m *AwsS3StandardIAParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudC2SParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3StandardIAParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardIAParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardIAParams) contextValidateAwsCloudC2SParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudC2SParams != nil { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if err := m.AwsCloudC2SParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3StandardIAParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3StandardIAParams) UnmarshalBinary(b []byte) error { - var res AwsS3StandardIAParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_standard_params.go b/v2/models/aws_s3_standard_params.go deleted file mode 100644 index 41a90ccc..00000000 --- a/v2/models/aws_s3_standard_params.go +++ /dev/null @@ -1,288 +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" -) - -// AwsS3StandardParams AWS S3 Standard Request Params. -// -// Specifies the parameters which are specific to AWS related External Targets with storage class S3 Standard. -// -// swagger:model AwsS3StandardParams -type AwsS3StandardParams struct { - CommonAWSCategoryParams - - // aws cloud standard params - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - // aws cloud gov params - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - // aws cloud c2 s params - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AwsS3StandardParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAWSCategoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAWSCategoryParams = aO0 - - // AO1 - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsCloudStandardParams = dataAO1.AwsCloudStandardParams - - m.AwsCloudGovParams = dataAO1.AwsCloudGovParams - - m.AwsCloudC2SParams = dataAO1.AwsCloudC2SParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AwsS3StandardParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAWSCategoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsCloudStandardParams *AwsCloudStandardParams `json:"awsCloudStandardParams,omitempty"` - - AwsCloudGovParams *AwsCloudGovParams `json:"awsCloudGovParams,omitempty"` - - AwsCloudC2SParams *AwsCloudC2SParams `json:"awsCloudC2SParams,omitempty"` - } - - dataAO1.AwsCloudStandardParams = m.AwsCloudStandardParams - - dataAO1.AwsCloudGovParams = m.AwsCloudGovParams - - dataAO1.AwsCloudC2SParams = m.AwsCloudC2SParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this aws s3 standard params -func (m *AwsS3StandardParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudStandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudGovParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsCloudC2SParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3StandardParams) validateAwsCloudStandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if m.AwsCloudStandardParams != nil { - if err := m.AwsCloudStandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardParams) validateAwsCloudGovParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if m.AwsCloudGovParams != nil { - if err := m.AwsCloudGovParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardParams) validateAwsCloudC2SParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if m.AwsCloudC2SParams != nil { - if err := m.AwsCloudC2SParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws s3 standard params based on the context it is used -func (m *AwsS3StandardParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAWSCategoryParams - if err := m.CommonAWSCategoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudGovParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsCloudC2SParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsS3StandardParams) contextValidateAwsCloudStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudStandardParams != nil { - - if swag.IsZero(m.AwsCloudStandardParams) { // not required - return nil - } - - if err := m.AwsCloudStandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudStandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudStandardParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardParams) contextValidateAwsCloudGovParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudGovParams != nil { - - if swag.IsZero(m.AwsCloudGovParams) { // not required - return nil - } - - if err := m.AwsCloudGovParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudGovParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudGovParams") - } - return err - } - } - - return nil -} - -func (m *AwsS3StandardParams) contextValidateAwsCloudC2SParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCloudC2SParams != nil { - - if swag.IsZero(m.AwsCloudC2SParams) { // not required - return nil - } - - if err := m.AwsCloudC2SParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCloudC2SParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCloudC2SParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3StandardParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3StandardParams) UnmarshalBinary(b []byte) error { - var res AwsS3StandardParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_s3_storage_class.go b/v2/models/aws_s3_storage_class.go deleted file mode 100644 index f346fc6b..00000000 --- a/v2/models/aws_s3_storage_class.go +++ /dev/null @@ -1,113 +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" -) - -// AwsS3StorageClass S3 Storage Class -// -// Specifies the S3 storage class type. -// -// swagger:model AwsS3StorageClass -type AwsS3StorageClass struct { - - // Specifies the S3 storage class type. - // Enum: ["AmazonS3Standard","AmazonS3IntelligentTiering","AmazonS3StandardIA","AmazonS3OneZoneIA"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this aws s3 storage class -func (m *AwsS3StorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsS3StorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3IntelligentTiering","AmazonS3StandardIA","AmazonS3OneZoneIA"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsS3StorageClassTypeEnumPropEnum = append(awsS3StorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // AwsS3StorageClassEnumAmazonS3Standard captures enum value "AmazonS3Standard" - AwsS3StorageClassEnumAmazonS3Standard string = "AmazonS3Standard" - - // AwsS3StorageClassEnumAmazonS3IntelligentTiering captures enum value "AmazonS3IntelligentTiering" - AwsS3StorageClassEnumAmazonS3IntelligentTiering string = "AmazonS3IntelligentTiering" - - // AwsS3StorageClassEnumAmazonS3StandardIA captures enum value "AmazonS3StandardIA" - AwsS3StorageClassEnumAmazonS3StandardIA string = "AmazonS3StandardIA" - - // AwsS3StorageClassEnumAmazonS3OneZoneIA captures enum value "AmazonS3OneZoneIA" - AwsS3StorageClassEnumAmazonS3OneZoneIA string = "AmazonS3OneZoneIA" -) - -// prop value enum -func (m *AwsS3StorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsS3StorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsS3StorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws s3 storage class based on context it is used -func (m *AwsS3StorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsS3StorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsS3StorageClass) UnmarshalBinary(b []byte) error { - var res AwsS3StorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_snapshot_manager_object_protection_params.go b/v2/models/aws_snapshot_manager_object_protection_params.go deleted file mode 100644 index de559839..00000000 --- a/v2/models/aws_snapshot_manager_object_protection_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsSnapshotManagerObjectProtectionParams Create AWS Snapshot Manager Object Protection Request Body -// -// Specifies the parameters which are specific to AWS Object Protection using AWS native snapshot orchestration with snapshot manager. Atlease one of tags or objects must be specified. -// -// swagger:model AwsSnapshotManagerObjectProtectionParams -type AwsSnapshotManagerObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AwsObjectLevelParams `json:"objects"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at global level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` - - // Specifies whether AMI should be created after taking snapshots of the instance. - CreateAmi *bool `json:"createAmi,omitempty"` - - // The frequency of AMI creation. This should be set if the option to create AMI is set. A value of n creates an AMI from the snapshots after every n runs. eg. n = 2 implies every alternate backup run starting from the first will create an AMI. - AmiCreationFrequency *int32 `json:"amiCreationFrequency,omitempty"` -} - -// Validate validates this aws snapshot manager object protection params -func (m *AwsSnapshotManagerObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsSnapshotManagerObjectProtectionParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws snapshot manager object protection params based on the context it is used -func (m *AwsSnapshotManagerObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsSnapshotManagerObjectProtectionParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSnapshotManagerObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSnapshotManagerObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AwsSnapshotManagerObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_snapshot_manager_protection_group_object_params.go b/v2/models/aws_snapshot_manager_protection_group_object_params.go deleted file mode 100644 index ff90a3aa..00000000 --- a/v2/models/aws_snapshot_manager_protection_group_object_params.go +++ /dev/null @@ -1,146 +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" -) - -// AwsSnapshotManagerProtectionGroupObjectParams AWS Snapshot Manager Protection Group Object Params. -// -// Specifies the object parameters to create AWS Snapshot Manager Protection Group. -// -// swagger:model AwsSnapshotManagerProtectionGroupObjectParams -type AwsSnapshotManagerProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at object level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` -} - -// Validate validates this aws snapshot manager protection group object params -func (m *AwsSnapshotManagerProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupObjectParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws snapshot manager protection group object params based on the context it is used -func (m *AwsSnapshotManagerProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupObjectParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSnapshotManagerProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSnapshotManagerProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AwsSnapshotManagerProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_snapshot_manager_protection_group_params.go b/v2/models/aws_snapshot_manager_protection_group_params.go deleted file mode 100644 index 22b010c4..00000000 --- a/v2/models/aws_snapshot_manager_protection_group_params.go +++ /dev/null @@ -1,241 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AwsSnapshotManagerProtectionGroupParams Create AWS Snapshot Manager Protection Group Request Body -// -// Specifies the parameters which are specific to AWS related Protection Groups using AWS native snapshot orchestration with snapshot manager. Atlease one of tags or objects must be specified. -// -// swagger:model AwsSnapshotManagerProtectionGroupParams -type AwsSnapshotManagerProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - Objects []*AwsSnapshotManagerProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the paramaters to exclude volumes attached to EC2 instances at global level. - VolumeExclusionParams *EbsVolumeExclusionParams `json:"volumeExclusionParams,omitempty"` - - // Array of Array of VM Tag Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. Optionally specify a list of VMs to exclude from protecting by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. For example a Datacenter is selected to be protected but you want to exclude all the 'Former Employees' VMs in the East and West but keep all the VMs for 'Former Employees' in the South which are also stored in this Datacenter, by specifying the following tag id array: [ [1000, 2221], [1000, 3031] ], where 1000 is the 'Former Employee' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The first inner array [1000, 2221] produces a list of VMs that are both tagged with 'Former Employees' and 'East' (an intersection). The second inner array [1000, 3031] produces a list of VMs that are both tagged with 'Former Employees' and 'West' (an intersection). The outer array combines the list of VMs from the two inner arrays. The list of resulting VMs are excluded from being protected this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies whether AMI should be created after taking snapshots of the instance. - CreateAmi *bool `json:"createAmi,omitempty"` - - // The frequency of AMI creation. This should be set if the option to create AMI is set. A value of n creates an AMI from the snapshots after every n runs. eg. n = 2 implies every alternate backup run starting from the first will create an AMI. - AmiCreationFrequency *int32 `json:"amiCreationFrequency,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this aws snapshot manager protection group params -func (m *AwsSnapshotManagerProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExclusionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) validateVolumeExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if m.VolumeExclusionParams != nil { - if err := m.VolumeExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws snapshot manager protection group params based on the context it is used -func (m *AwsSnapshotManagerProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) contextValidateVolumeExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeExclusionParams != nil { - - if swag.IsZero(m.VolumeExclusionParams) { // not required - return nil - } - - if err := m.VolumeExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeExclusionParams") - } - return err - } - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AwsSnapshotManagerProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSnapshotManagerProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSnapshotManagerProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AwsSnapshotManagerProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_snapshot_params.go b/v2/models/aws_snapshot_params.go deleted file mode 100644 index 39e7ab62..00000000 --- a/v2/models/aws_snapshot_params.go +++ /dev/null @@ -1,120 +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" -) - -// AwsSnapshotParams Specifies parameters of AWS type snapshots. -// -// swagger:model AwsSnapshotParams -type AwsSnapshotParams struct { - - // Specifies the protection type of AWS snapshots. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"] - ProtectionType *string `json:"protectionType,omitempty"` -} - -// Validate validates this aws snapshot params -func (m *AwsSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsSnapshotParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsSnapshotParamsTypeProtectionTypePropEnum = append(awsSnapshotParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AwsSnapshotParamsProtectionTypeKAgent captures enum value "kAgent" - AwsSnapshotParamsProtectionTypeKAgent string = "kAgent" - - // AwsSnapshotParamsProtectionTypeKNative captures enum value "kNative" - AwsSnapshotParamsProtectionTypeKNative string = "kNative" - - // AwsSnapshotParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AwsSnapshotParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AwsSnapshotParamsProtectionTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - AwsSnapshotParamsProtectionTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // AwsSnapshotParamsProtectionTypeKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - AwsSnapshotParamsProtectionTypeKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // AwsSnapshotParamsProtectionTypeKAwsS3 captures enum value "kAwsS3" - AwsSnapshotParamsProtectionTypeKAwsS3 string = "kAwsS3" - - // AwsSnapshotParamsProtectionTypeKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - AwsSnapshotParamsProtectionTypeKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" -) - -// prop value enum -func (m *AwsSnapshotParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsSnapshotParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsSnapshotParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws snapshot params based on context it is used -func (m *AwsSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSnapshotParams) UnmarshalBinary(b []byte) error { - var res AwsSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_source_registration_params.go b/v2/models/aws_source_registration_params.go deleted file mode 100644 index 63330c58..00000000 --- a/v2/models/aws_source_registration_params.go +++ /dev/null @@ -1,166 +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" -) - -// AwsSourceRegistrationParams Specifies the paramaters to register an AWS source. -// -// swagger:model AwsSourceRegistrationParams -type AwsSourceRegistrationParams struct { - - // Specifies the AWS Subscription type (Commercial/Gov). - // Required: true - // Enum: ["kAWSCommercial","kAWSGovCloud","kAWSC2S"] - SubscriptionType *string `json:"subscriptionType"` - - // Specifies the parameters to register a commercial AWS. - StandardParams *StandardParams `json:"standardParams,omitempty"` -} - -// Validate validates this aws source registration params -func (m *AwsSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandardParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsSourceRegistrationParamsTypeSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSCommercial","kAWSGovCloud","kAWSC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsSourceRegistrationParamsTypeSubscriptionTypePropEnum = append(awsSourceRegistrationParamsTypeSubscriptionTypePropEnum, v) - } -} - -const ( - - // AwsSourceRegistrationParamsSubscriptionTypeKAWSCommercial captures enum value "kAWSCommercial" - AwsSourceRegistrationParamsSubscriptionTypeKAWSCommercial string = "kAWSCommercial" - - // AwsSourceRegistrationParamsSubscriptionTypeKAWSGovCloud captures enum value "kAWSGovCloud" - AwsSourceRegistrationParamsSubscriptionTypeKAWSGovCloud string = "kAWSGovCloud" - - // AwsSourceRegistrationParamsSubscriptionTypeKAWSC2S captures enum value "kAWSC2S" - AwsSourceRegistrationParamsSubscriptionTypeKAWSC2S string = "kAWSC2S" -) - -// prop value enum -func (m *AwsSourceRegistrationParams) validateSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsSourceRegistrationParamsTypeSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsSourceRegistrationParams) validateSubscriptionType(formats strfmt.Registry) error { - - if err := validate.Required("subscriptionType", "body", m.SubscriptionType); err != nil { - return err - } - - // value enum - if err := m.validateSubscriptionTypeEnum("subscriptionType", "body", *m.SubscriptionType); err != nil { - return err - } - - return nil -} - -func (m *AwsSourceRegistrationParams) validateStandardParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandardParams) { // not required - return nil - } - - if m.StandardParams != nil { - if err := m.StandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardParams") - } - 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 - - if err := m.contextValidateStandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsSourceRegistrationParams) contextValidateStandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandardParams != nil { - - if swag.IsZero(m.StandardParams) { // not required - return nil - } - - if err := m.StandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res AwsSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_subscription_type.go b/v2/models/aws_subscription_type.go deleted file mode 100644 index 44ef5a3e..00000000 --- a/v2/models/aws_subscription_type.go +++ /dev/null @@ -1,110 +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" -) - -// AwsSubscriptionType AWS Subscription Type -// -// # AWS Subscription Type -// -// swagger:model AwsSubscriptionType -type AwsSubscriptionType struct { - - // Specifies the AWS Subscription types. - // Enum: ["kAWSCommercial","kAWSGovCloud","kAWSC2S"] - AwsSubscriptionType string `json:"awsSubscriptionType,omitempty"` -} - -// Validate validates this aws subscription type -func (m *AwsSubscriptionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsSubscriptionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsSubscriptionTypeTypeAwsSubscriptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSCommercial","kAWSGovCloud","kAWSC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsSubscriptionTypeTypeAwsSubscriptionTypePropEnum = append(awsSubscriptionTypeTypeAwsSubscriptionTypePropEnum, v) - } -} - -const ( - - // AwsSubscriptionTypeAwsSubscriptionTypeKAWSCommercial captures enum value "kAWSCommercial" - AwsSubscriptionTypeAwsSubscriptionTypeKAWSCommercial string = "kAWSCommercial" - - // AwsSubscriptionTypeAwsSubscriptionTypeKAWSGovCloud captures enum value "kAWSGovCloud" - AwsSubscriptionTypeAwsSubscriptionTypeKAWSGovCloud string = "kAWSGovCloud" - - // AwsSubscriptionTypeAwsSubscriptionTypeKAWSC2S captures enum value "kAWSC2S" - AwsSubscriptionTypeAwsSubscriptionTypeKAWSC2S string = "kAWSC2S" -) - -// prop value enum -func (m *AwsSubscriptionType) validateAwsSubscriptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsSubscriptionTypeTypeAwsSubscriptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsSubscriptionType) validateAwsSubscriptionType(formats strfmt.Registry) error { - if swag.IsZero(m.AwsSubscriptionType) { // not required - return nil - } - - // value enum - if err := m.validateAwsSubscriptionTypeEnum("awsSubscriptionType", "body", m.AwsSubscriptionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws subscription type based on context it is used -func (m *AwsSubscriptionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsSubscriptionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsSubscriptionType) UnmarshalBinary(b []byte) error { - var res AwsSubscriptionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_category.go b/v2/models/aws_target_category.go deleted file mode 100644 index 1a392eaf..00000000 --- a/v2/models/aws_target_category.go +++ /dev/null @@ -1,110 +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" -) - -// AwsTargetCategory AWS Target Category -// -// Specifies the category of AWS External Target. -// -// swagger:model AwsTargetCategory -type AwsTargetCategory struct { - - // Specifies the category of AWS External Target. - // Enum: ["AmazonStandard","AmazonGov","AmazonC2S"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this aws target category -func (m *AwsTargetCategory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsTargetCategoryTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonStandard","AmazonGov","AmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsTargetCategoryTypeEnumPropEnum = append(awsTargetCategoryTypeEnumPropEnum, v) - } -} - -const ( - - // AwsTargetCategoryEnumAmazonStandard captures enum value "AmazonStandard" - AwsTargetCategoryEnumAmazonStandard string = "AmazonStandard" - - // AwsTargetCategoryEnumAmazonGov captures enum value "AmazonGov" - AwsTargetCategoryEnumAmazonGov string = "AmazonGov" - - // AwsTargetCategoryEnumAmazonC2S captures enum value "AmazonC2S" - AwsTargetCategoryEnumAmazonC2S string = "AmazonC2S" -) - -// prop value enum -func (m *AwsTargetCategory) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsTargetCategoryTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsTargetCategory) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws target category based on context it is used -func (m *AwsTargetCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetCategory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetCategory) UnmarshalBinary(b []byte) error { - var res AwsTargetCategory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_aurora.go b/v2/models/aws_target_params_for_recover_aurora.go deleted file mode 100644 index e0873de7..00000000 --- a/v2/models/aws_target_params_for_recover_aurora.go +++ /dev/null @@ -1,162 +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" -) - -// AwsTargetParamsForRecoverAurora AWS Aurora Recovery Target Params -// -// Specifies the parameters for an AWS recovery target. -// -// swagger:model AwsTargetParamsForRecoverAurora -type AwsTargetParamsForRecoverAurora struct { - - // Specifies the Aurora params. - AuroraConfig *AuroraConfig `json:"auroraConfig,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *AwsAuroraRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` -} - -// Validate validates this aws target params for recover aurora -func (m *AwsTargetParamsForRecoverAurora) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuroraConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverAurora) validateAuroraConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AuroraConfig) { // not required - return nil - } - - if m.AuroraConfig != nil { - if err := m.AuroraConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverAurora) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover aurora based on the context it is used -func (m *AwsTargetParamsForRecoverAurora) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuroraConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverAurora) contextValidateAuroraConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AuroraConfig != nil { - - if swag.IsZero(m.AuroraConfig) { // not required - return nil - } - - if err := m.AuroraConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("auroraConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("auroraConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverAurora) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverAurora) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverAurora) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverAurora - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_file_and_folder.go b/v2/models/aws_target_params_for_recover_file_and_folder.go deleted file mode 100644 index be5878e3..00000000 --- a/v2/models/aws_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// AwsTargetParamsForRecoverFileAndFolder AWS Target Params for Recover File And Folder -// -// Specifies the parameters for an AWS recovery target. -// -// swagger:model AwsTargetParamsForRecoverFileAndFolder -type AwsTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to override the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of files or folders failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *AwsRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *AwsRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this aws target params for recover file and folder -func (m *AwsTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover file and folder based on the context it is used -func (m *AwsTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_r_d_s_postgres.go b/v2/models/aws_target_params_for_recover_r_d_s_postgres.go deleted file mode 100644 index d97200b5..00000000 --- a/v2/models/aws_target_params_for_recover_r_d_s_postgres.go +++ /dev/null @@ -1,178 +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" -) - -// AwsTargetParamsForRecoverRDSPostgres Specifies the recovery target params for RDS Postgres target config. -// -// swagger:model AwsTargetParamsForRecoverRDSPostgres -type AwsTargetParamsForRecoverRDSPostgres struct { - - // Specifies whether the recovery should be performed to a known or a custom target. - // Required: true - RecoverToKnownSource *bool `json:"recoverToKnownSource"` - - // Specifies the custom destination Server configuration parameters where the RDS Postgres instances will be recovered. - CustomServerConfig *RecoverRDSPostgresCustomServerConfig `json:"customServerConfig,omitempty"` - - // Specifies the destination Source configuration parameters where the RDS Postgres instances will be recovered. This is mandatory if recoverToKnownSource is set to true. - KnownSourceConfig *RecoverRDSPostgresToKnownSourceConfig `json:"knownSourceConfig,omitempty"` -} - -// Validate validates this aws target params for recover r d s postgres -func (m *AwsTargetParamsForRecoverRDSPostgres) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToKnownSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomServerConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKnownSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverRDSPostgres) validateRecoverToKnownSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToKnownSource", "body", m.RecoverToKnownSource); err != nil { - return err - } - - return nil -} - -func (m *AwsTargetParamsForRecoverRDSPostgres) validateCustomServerConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CustomServerConfig) { // not required - return nil - } - - if m.CustomServerConfig != nil { - if err := m.CustomServerConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customServerConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverRDSPostgres) validateKnownSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.KnownSourceConfig) { // not required - return nil - } - - if m.KnownSourceConfig != nil { - if err := m.KnownSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover r d s postgres based on the context it is used -func (m *AwsTargetParamsForRecoverRDSPostgres) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomServerConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKnownSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverRDSPostgres) contextValidateCustomServerConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.CustomServerConfig != nil { - - if swag.IsZero(m.CustomServerConfig) { // not required - return nil - } - - if err := m.CustomServerConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customServerConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverRDSPostgres) contextValidateKnownSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.KnownSourceConfig != nil { - - if swag.IsZero(m.KnownSourceConfig) { // not required - return nil - } - - if err := m.KnownSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverRDSPostgres) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverRDSPostgres) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverRDSPostgres - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_rds.go b/v2/models/aws_target_params_for_recover_rds.go deleted file mode 100644 index 9a2aa103..00000000 --- a/v2/models/aws_target_params_for_recover_rds.go +++ /dev/null @@ -1,162 +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" -) - -// AwsTargetParamsForRecoverRds AWS RDS Recovery Target Params -// -// Specifies the parameters for an AWS recovery target. -// -// swagger:model AwsTargetParamsForRecoverRds -type AwsTargetParamsForRecoverRds struct { - - // Specifies the RDS params. - RdsConfig *RdsConfig `json:"rdsConfig,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *AwsRdsRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` -} - -// Validate validates this aws target params for recover rds -func (m *AwsTargetParamsForRecoverRds) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRdsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverRds) validateRdsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RdsConfig) { // not required - return nil - } - - if m.RdsConfig != nil { - if err := m.RdsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverRds) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover rds based on the context it is used -func (m *AwsTargetParamsForRecoverRds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRdsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverRds) contextValidateRdsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RdsConfig != nil { - - if swag.IsZero(m.RdsConfig) { // not required - return nil - } - - if err := m.RdsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rdsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rdsConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverRds) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverRds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverRds) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverRds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_s3.go b/v2/models/aws_target_params_for_recover_s3.go deleted file mode 100644 index e82d3a60..00000000 --- a/v2/models/aws_target_params_for_recover_s3.go +++ /dev/null @@ -1,141 +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" -) - -// AwsTargetParamsForRecoverS3 AWS Target Params for Recover S3 Buckets or Objects. -// -// Specifies the parameters for an AWS recovery target. -// -// swagger:model AwsTargetParamsForRecoverS3 -type AwsTargetParamsForRecoverS3 struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to override the existing objects. Default is false. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve the objects attributes at the time of restore. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue restore on receiving error or not. Default is true. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the prefix to be added to all the objects being recovered. - ObjectPrefix *string `json:"objectPrefix,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *AwsRecoverS3NewTargetConfig `json:"newTargetConfig,omitempty"` -} - -// Validate validates this aws target params for recover s3 -func (m *AwsTargetParamsForRecoverS3) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverS3) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *AwsTargetParamsForRecoverS3) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover s3 based on the context it is used -func (m *AwsTargetParamsForRecoverS3) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverS3) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverS3) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverS3) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverS3 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_target_params_for_recover_vm.go b/v2/models/aws_target_params_for_recover_vm.go deleted file mode 100644 index 5cf2f39a..00000000 --- a/v2/models/aws_target_params_for_recover_vm.go +++ /dev/null @@ -1,282 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AwsTargetParamsForRecoverVM AWS Recovery Target Params -// -// Specifies the parameters for an AWS recovery target. -// -// swagger:model AwsTargetParamsForRecoverVm -type AwsTargetParamsForRecoverVM struct { - - // Specifies the custom tags that need to be present on on every temporary and permanent entity that this job creates. - CustomTags []*SimpleTags `json:"customTags"` - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the fleet params. - FleetConfig *FleetConfig `json:"fleetConfig,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *AwsVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` -} - -// Validate validates this aws target params for recover Vm -func (m *AwsTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCustomTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverVM) validateCustomTags(formats strfmt.Registry) error { - if swag.IsZero(m.CustomTags) { // not required - return nil - } - - for i := 0; i < len(m.CustomTags); i++ { - if swag.IsZero(m.CustomTags[i]) { // not required - continue - } - - if m.CustomTags[i] != nil { - if err := m.CustomTags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) validateFleetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FleetConfig) { // not required - return nil - } - - if m.FleetConfig != nil { - if err := m.FleetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws target params for recover Vm based on the context it is used -func (m *AwsTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCustomTags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFleetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsTargetParamsForRecoverVM) contextValidateCustomTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CustomTags); i++ { - - if m.CustomTags[i] != nil { - - if swag.IsZero(m.CustomTags[i]) { // not required - return nil - } - - if err := m.CustomTags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) contextValidateFleetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FleetConfig != nil { - - if swag.IsZero(m.FleetConfig) { // not required - return nil - } - - if err := m.FleetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AwsTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res AwsTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_tiering_storage_class.go b/v2/models/aws_tiering_storage_class.go deleted file mode 100644 index 80e10dd4..00000000 --- a/v2/models/aws_tiering_storage_class.go +++ /dev/null @@ -1,110 +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" -) - -// AwsTieringStorageClass Aws Tiering Storage Class -// -// Specifies the storage class of Aws External Target of tiering purpose type. -// -// swagger:model AwsTieringStorageClass -type AwsTieringStorageClass struct { - - // Specifies the storage class of Aws External Target of tiering purpose type. - // Enum: ["AmazonS3Standard","AmazonS3StandardIA","AmazonS3IntelligentTiering"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this aws tiering storage class -func (m *AwsTieringStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var awsTieringStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3StandardIA","AmazonS3IntelligentTiering"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - awsTieringStorageClassTypeEnumPropEnum = append(awsTieringStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // AwsTieringStorageClassEnumAmazonS3Standard captures enum value "AmazonS3Standard" - AwsTieringStorageClassEnumAmazonS3Standard string = "AmazonS3Standard" - - // AwsTieringStorageClassEnumAmazonS3StandardIA captures enum value "AmazonS3StandardIA" - AwsTieringStorageClassEnumAmazonS3StandardIA string = "AmazonS3StandardIA" - - // AwsTieringStorageClassEnumAmazonS3IntelligentTiering captures enum value "AmazonS3IntelligentTiering" - AwsTieringStorageClassEnumAmazonS3IntelligentTiering string = "AmazonS3IntelligentTiering" -) - -// prop value enum -func (m *AwsTieringStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, awsTieringStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AwsTieringStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws tiering storage class based on context it is used -func (m *AwsTieringStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsTieringStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsTieringStorageClass) UnmarshalBinary(b []byte) error { - var res AwsTieringStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_use_s_t_s_params.go b/v2/models/aws_use_s_t_s_params.go deleted file mode 100644 index 7b65a12a..00000000 --- a/v2/models/aws_use_s_t_s_params.go +++ /dev/null @@ -1,76 +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" -) - -// AwsUseSTSParams AWS UseSTS params. -// -// Specifies the parameters which are specific to UseSTS Authentication Method for AWS External Target. -// -// swagger:model AwsUseSTSParams -type AwsUseSTSParams struct { - - // Specifies the credential endpoint to use to generate the security token. - // Required: true - AuthEndpoint *string `json:"authEndpoint"` - - // Credential blob to use when interacting with credential endpoint. - AuthBlob *string `json:"authBlob,omitempty"` -} - -// Validate validates this aws use s t s params -func (m *AwsUseSTSParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthEndpoint(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsUseSTSParams) validateAuthEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("authEndpoint", "body", m.AuthEndpoint); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this aws use s t s params based on context it is used -func (m *AwsUseSTSParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AwsUseSTSParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsUseSTSParams) UnmarshalBinary(b []byte) error { - var res AwsUseSTSParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/aws_vm_recovery_target_config.go b/v2/models/aws_vm_recovery_target_config.go deleted file mode 100644 index ed0d6ea3..00000000 --- a/v2/models/aws_vm_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// AwsVMRecoveryTargetConfig AWS VMs Recovery Target Config. -// -// Specifies the target object parameters to recover AWS vms. -// -// swagger:model AwsVmRecoveryTargetConfig -type AwsVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAwsVMNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this aws Vm recovery target config -func (m *AwsVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *AwsVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this aws Vm recovery target config based on the context it is used -func (m *AwsVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AwsVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AwsVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AwsVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res AwsVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_agent_protection_group_object_params.go b/v2/models/azure_agent_protection_group_object_params.go deleted file mode 100644 index af594c82..00000000 --- a/v2/models/azure_agent_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AzureAgentProtectionGroupObjectParams Agent based Azure Protection Group Object Params has. -// -// Specifies the object parameters to create agent based Azure Protection Group. -// -// swagger:model AzureAgentProtectionGroupObjectParams -type AzureAgentProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this azure agent protection group object params -func (m *AzureAgentProtectionGroupObjectParams) 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 *AzureAgentProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure agent protection group object params based on the context it is used -func (m *AzureAgentProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureAgentProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureAgentProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureAgentProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AzureAgentProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_agent_protection_group_params.go b/v2/models/azure_agent_protection_group_params.go deleted file mode 100644 index 8dcb93a5..00000000 --- a/v2/models/azure_agent_protection_group_params.go +++ /dev/null @@ -1,249 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureAgentProtectionGroupParams Agent based Azure Protection Group Request Params. -// -// Specifies the parameters which are specific to Azure related Protection Groups using cohesity protection-service installed on the instance. Objects must be specified. -// -// swagger:model AzureAgentProtectionGroupParams -type AzureAgentProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*AzureAgentProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` - - // Specifies the indexing policy for VMs in this Group. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to move the workload to the cloud. - CloudMigration *bool `json:"cloudMigration,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this azure agent protection group params -func (m *AzureAgentProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureAgentProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureAgentProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AzureAgentProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure agent protection group params based on the context it is used -func (m *AzureAgentProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureAgentProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureAgentProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *AzureAgentProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AzureAgentProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureAgentProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureAgentProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AzureAgentProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_application_credentials.go b/v2/models/azure_application_credentials.go deleted file mode 100644 index 1f0608fc..00000000 --- a/v2/models/azure_application_credentials.go +++ /dev/null @@ -1,77 +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" -) - -// AzureApplicationCredentials Specifies the credentials of an application from Azure active directory. -// -// swagger:model AzureApplicationCredentials -type AzureApplicationCredentials struct { - - // Specifies the application id of an Azure active directory application. - // Required: true - ApplicationID *string `json:"applicationId"` - - // Specifies the application object id of an Azure active directory application. - ApplicationObjectID *string `json:"applicationObjectId,omitempty"` - - // Specifies the encrypted application key of an Azure active directory application. - EncryptedApplicationKey *string `json:"encryptedApplicationKey,omitempty"` -} - -// Validate validates this azure application credentials -func (m *AzureApplicationCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureApplicationCredentials) validateApplicationID(formats strfmt.Registry) error { - - if err := validate.Required("applicationId", "body", m.ApplicationID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure application credentials based on context it is used -func (m *AzureApplicationCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureApplicationCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureApplicationCredentials) UnmarshalBinary(b []byte) error { - var res AzureApplicationCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_archival_storage_class.go b/v2/models/azure_archival_storage_class.go deleted file mode 100644 index df11ea78..00000000 --- a/v2/models/azure_archival_storage_class.go +++ /dev/null @@ -1,110 +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" -) - -// AzureArchivalStorageClass Azure Archival Storage Class -// -// Specifies the storage class of Azure External Target of archival purpose type. -// -// swagger:model AzureArchivalStorageClass -type AzureArchivalStorageClass struct { - - // Specifies the storage class of Azure External Target of archival purpose type. - // Enum: ["AzureArchiveBlob","AzureCoolBlob","AzureHotBlob"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this azure archival storage class -func (m *AzureArchivalStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureArchivalStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AzureArchiveBlob","AzureCoolBlob","AzureHotBlob"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureArchivalStorageClassTypeEnumPropEnum = append(azureArchivalStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // AzureArchivalStorageClassEnumAzureArchiveBlob captures enum value "AzureArchiveBlob" - AzureArchivalStorageClassEnumAzureArchiveBlob string = "AzureArchiveBlob" - - // AzureArchivalStorageClassEnumAzureCoolBlob captures enum value "AzureCoolBlob" - AzureArchivalStorageClassEnumAzureCoolBlob string = "AzureCoolBlob" - - // AzureArchivalStorageClassEnumAzureHotBlob captures enum value "AzureHotBlob" - AzureArchivalStorageClassEnumAzureHotBlob string = "AzureHotBlob" -) - -// prop value enum -func (m *AzureArchivalStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureArchivalStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureArchivalStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure archival storage class based on context it is used -func (m *AzureArchivalStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureArchivalStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureArchivalStorageClass) UnmarshalBinary(b []byte) error { - var res AzureArchivalStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_archive_blob_params.go b/v2/models/azure_archive_blob_params.go deleted file mode 100644 index 139bfffc..00000000 --- a/v2/models/azure_archive_blob_params.go +++ /dev/null @@ -1,112 +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" -) - -// AzureArchiveBlobParams Azure Archive Blob Request Params. -// -// # Specifies the parameters which are specific to Azure related with tier type Archive Blob -// -// swagger:model AzureArchiveBlobParams -type AzureArchiveBlobParams struct { - - // Specifies the category of the external target. - // Required: true - // Enum: ["Azure","AzureStandard","AzureGovCloud"] - Category *string `json:"category"` -} - -// Validate validates this azure archive blob params -func (m *AzureArchiveBlobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureArchiveBlobParamsTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","AzureStandard","AzureGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureArchiveBlobParamsTypeCategoryPropEnum = append(azureArchiveBlobParamsTypeCategoryPropEnum, v) - } -} - -const ( - - // AzureArchiveBlobParamsCategoryAzure captures enum value "Azure" - AzureArchiveBlobParamsCategoryAzure string = "Azure" - - // AzureArchiveBlobParamsCategoryAzureStandard captures enum value "AzureStandard" - AzureArchiveBlobParamsCategoryAzureStandard string = "AzureStandard" - - // AzureArchiveBlobParamsCategoryAzureGovCloud captures enum value "AzureGovCloud" - AzureArchiveBlobParamsCategoryAzureGovCloud string = "AzureGovCloud" -) - -// prop value enum -func (m *AzureArchiveBlobParams) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureArchiveBlobParamsTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureArchiveBlobParams) validateCategory(formats strfmt.Registry) error { - - if err := validate.Required("category", "body", m.Category); err != nil { - return err - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure archive blob params based on context it is used -func (m *AzureArchiveBlobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureArchiveBlobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureArchiveBlobParams) UnmarshalBinary(b []byte) error { - var res AzureArchiveBlobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_cloud_spin_params.go b/v2/models/azure_cloud_spin_params.go deleted file mode 100644 index 933f0bc4..00000000 --- a/v2/models/azure_cloud_spin_params.go +++ /dev/null @@ -1,82 +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" -) - -// AzureCloudSpinParams Azure Parameters. -// -// Specifies various resources when converting and deploying a VM to Azure. -// -// swagger:model AzureCloudSpinParams -type AzureCloudSpinParams struct { - - // Specifies id of the resource group for the selected virtual network. - NetworkResourceGroupID *int64 `json:"networkResourceGroupId,omitempty"` - - // Specifies id of the Azure resource group. Its value is globally unique within Azure. - ResourceGroupID *int64 `json:"resourceGroupId,omitempty"` - - // Specifies id of the storage account that will contain the storage container within which we will create the blob that will become the VHD disk for the cloned VM. - StorageAccountID *int64 `json:"storageAccountId,omitempty"` - - // Specifies id of the storage container within the above storage account. - StorageContainerID *int64 `json:"storageContainerId,omitempty"` - - // Specifies id of the resource group for the selected storage account. - StorageResourceGroupID *int64 `json:"storageResourceGroupId,omitempty"` - - // Specifies the availability set. - AvailabilitySetID *int64 `json:"availabilitySetId,omitempty"` - - // Specifies id of the temporary Azure resource group. - TempVMResourceGroupID *int64 `json:"tempVmResourceGroupId,omitempty"` - - // Specifies id of the temporary VM storage account that will contain the storage container within which we will create the blob that will become the VHD disk for the cloned VM. - TempVMStorageAccountID *int64 `json:"tempVmStorageAccountId,omitempty"` - - // Specifies id of the temporary VM storage container within the above storage account. - TempVMStorageContainerID *int64 `json:"tempVmStorageContainerId,omitempty"` - - // Specifies Id of the temporary VM subnet within the above virtual network. - TempVMSubnetID *int64 `json:"tempVmSubnetId,omitempty"` - - // Specifies Id of the temporary VM Virtual Network. - TempVMVirtualNetworkID *int64 `json:"tempVmVirtualNetworkId,omitempty"` -} - -// Validate validates this azure cloud spin params -func (m *AzureCloudSpinParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this azure cloud spin params based on context it is used -func (m *AzureCloudSpinParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureCloudSpinParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureCloudSpinParams) UnmarshalBinary(b []byte) error { - var res AzureCloudSpinParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_common_object_protection_params.go b/v2/models/azure_common_object_protection_params.go deleted file mode 100644 index f94779f2..00000000 --- a/v2/models/azure_common_object_protection_params.go +++ /dev/null @@ -1,113 +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" -) - -// AzureCommonObjectProtectionParams Azure Common Object Protection Params. -// -// Specifies the parameters which are specific to Azure related Object Protection and common to different Azure protection types. -// -// swagger:model AzureCommonObjectProtectionParams -type AzureCommonObjectProtectionParams struct { - - // Specifies the Azure Protection Job type. - // Enum: ["kAgent","kNative","kSnapshotManager","kAzureSQL"] - ProtectionType string `json:"protectionType,omitempty"` -} - -// Validate validates this azure common object protection params -func (m *AzureCommonObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureCommonObjectProtectionParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCommonObjectProtectionParamsTypeProtectionTypePropEnum = append(azureCommonObjectProtectionParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AzureCommonObjectProtectionParamsProtectionTypeKAgent captures enum value "kAgent" - AzureCommonObjectProtectionParamsProtectionTypeKAgent string = "kAgent" - - // AzureCommonObjectProtectionParamsProtectionTypeKNative captures enum value "kNative" - AzureCommonObjectProtectionParamsProtectionTypeKNative string = "kNative" - - // AzureCommonObjectProtectionParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AzureCommonObjectProtectionParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AzureCommonObjectProtectionParamsProtectionTypeKAzureSQL captures enum value "kAzureSQL" - AzureCommonObjectProtectionParamsProtectionTypeKAzureSQL string = "kAzureSQL" -) - -// prop value enum -func (m *AzureCommonObjectProtectionParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCommonObjectProtectionParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCommonObjectProtectionParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure common object protection params based on context it is used -func (m *AzureCommonObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureCommonObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureCommonObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AzureCommonObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_cool_blob_params.go b/v2/models/azure_cool_blob_params.go deleted file mode 100644 index ca41e3c8..00000000 --- a/v2/models/azure_cool_blob_params.go +++ /dev/null @@ -1,118 +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" -) - -// AzureCoolBlobParams Azure Cool Blob Request Params. -// -// # Specifies the parameters which are specific to Azure related with tier type Cool Blob -// -// swagger:model AzureCoolBlobParams -type AzureCoolBlobParams struct { - - // Specifies the category of the external target. - // Required: true - // Enum: ["Azure","AzureStandard","AzureGovCloud"] - Category *string `json:"category"` - - // Specifies the name of the Azure function app, which is the host of Azure functions. - FunctionAppName *string `json:"functionAppName,omitempty"` - - // Specifies the access key to deploy Azure function to function app - FunctionAppDeploymentKey *string `json:"functionAppDeploymentKey,omitempty"` -} - -// Validate validates this azure cool blob params -func (m *AzureCoolBlobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureCoolBlobParamsTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","AzureStandard","AzureGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureCoolBlobParamsTypeCategoryPropEnum = append(azureCoolBlobParamsTypeCategoryPropEnum, v) - } -} - -const ( - - // AzureCoolBlobParamsCategoryAzure captures enum value "Azure" - AzureCoolBlobParamsCategoryAzure string = "Azure" - - // AzureCoolBlobParamsCategoryAzureStandard captures enum value "AzureStandard" - AzureCoolBlobParamsCategoryAzureStandard string = "AzureStandard" - - // AzureCoolBlobParamsCategoryAzureGovCloud captures enum value "AzureGovCloud" - AzureCoolBlobParamsCategoryAzureGovCloud string = "AzureGovCloud" -) - -// prop value enum -func (m *AzureCoolBlobParams) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureCoolBlobParamsTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureCoolBlobParams) validateCategory(formats strfmt.Registry) error { - - if err := validate.Required("category", "body", m.Category); err != nil { - return err - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure cool blob params based on context it is used -func (m *AzureCoolBlobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureCoolBlobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureCoolBlobParams) UnmarshalBinary(b []byte) error { - var res AzureCoolBlobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_e_s_config_for_indexing.go b/v2/models/azure_e_s_config_for_indexing.go deleted file mode 100644 index db8bacbe..00000000 --- a/v2/models/azure_e_s_config_for_indexing.go +++ /dev/null @@ -1,124 +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" -) - -// AzureESConfigForIndexing AzureESConfigForIndexing -// -// Elasticsearch config for indexing in Azure CE. -// -// swagger:model AzureESConfigForIndexing -type AzureESConfigForIndexing struct { - - // Fully qualified ES domain name. - // Required: true - EsDomain *string `json:"esDomain"` - - // URL of the KeyVault where ES creds will be stored. - // Required: true - VaultURL *string `json:"vaultURL"` - - // Client Id for the KeyVault. - // Required: true - ClientID *string `json:"clientId"` - - // Name of the secret corresponding to tenant's ES creds. - // Required: true - SecretName *string `json:"secretName"` -} - -// Validate validates this azure e s config for indexing -func (m *AzureESConfigForIndexing) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEsDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVaultURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecretName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureESConfigForIndexing) validateEsDomain(formats strfmt.Registry) error { - - if err := validate.Required("esDomain", "body", m.EsDomain); err != nil { - return err - } - - return nil -} - -func (m *AzureESConfigForIndexing) validateVaultURL(formats strfmt.Registry) error { - - if err := validate.Required("vaultURL", "body", m.VaultURL); err != nil { - return err - } - - return nil -} - -func (m *AzureESConfigForIndexing) validateClientID(formats strfmt.Registry) error { - - if err := validate.Required("clientId", "body", m.ClientID); err != nil { - return err - } - - return nil -} - -func (m *AzureESConfigForIndexing) validateSecretName(formats strfmt.Registry) error { - - if err := validate.Required("secretName", "body", m.SecretName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure e s config for indexing based on context it is used -func (m *AzureESConfigForIndexing) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureESConfigForIndexing) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureESConfigForIndexing) UnmarshalBinary(b []byte) error { - var res AzureESConfigForIndexing - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_entity_metadata.go b/v2/models/azure_entity_metadata.go deleted file mode 100644 index a04d2343..00000000 --- a/v2/models/azure_entity_metadata.go +++ /dev/null @@ -1,109 +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" -) - -// AzureEntityMetadata Specifies the entity metadata of azure entities. -// -// swagger:model AzureEntityMetadata -type AzureEntityMetadata struct { - - // Specifies the entity metadata of Azure SQL entities. - AzureSQLParams *AzureSQLEntityMetadata `json:"azureSqlParams,omitempty"` -} - -// Validate validates this azure entity metadata -func (m *AzureEntityMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureSQLParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureEntityMetadata) validateAzureSQLParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureSQLParams) { // not required - return nil - } - - if m.AzureSQLParams != nil { - if err := m.AzureSQLParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure entity metadata based on the context it is used -func (m *AzureEntityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAzureSQLParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureEntityMetadata) contextValidateAzureSQLParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLParams != nil { - - if swag.IsZero(m.AzureSQLParams) { // not required - return nil - } - - if err := m.AzureSQLParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureEntityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureEntityMetadata) UnmarshalBinary(b []byte) error { - var res AzureEntityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_fleet_info.go b/v2/models/azure_fleet_info.go deleted file mode 100644 index 7ba17fb8..00000000 --- a/v2/models/azure_fleet_info.go +++ /dev/null @@ -1,192 +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" -) - -// AzureFleetInfo Update Azure Fleet Env Info Request. -// -// Specifies the params to add Azure specific fleet env info. -// -// swagger:model AzureFleetInfo -type AzureFleetInfo struct { - - // Specifies the client Id. - // Required: true - ClientID *string `json:"clientId"` - - // Specifies the region of Azure dataplane cluster. - // Required: true - Region *string `json:"region"` - - // Specifies the virtual network of Azure dataplane cluster. - // Required: true - VnetName *string `json:"vnetName"` - - // Specifies the subnet of Azure dataplane cluster. - // Required: true - SubnetName *string `json:"subnetName"` - - // Specifies the appplication security group of Azure dataplane cluster. - // Required: true - AppSecurityGroupName *string `json:"appSecurityGroupName"` - - // Specifies the proximity placement group of Azure dataplane cluster. - // Required: true - ProximityPlacementGroupName *string `json:"proximityPlacementGroupName"` - - // Specifies the availabilty set of Azure dataplane cluster. - // Required: true - AvailabilitySetName *string `json:"availabilitySetName"` - - // Specifies the resource group of Azure dataplane cluster. - // Required: true - ResourceGroupName *string `json:"resourceGroupName"` -} - -// Validate validates this azure fleet info -func (m *AzureFleetInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVnetName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppSecurityGroupName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProximityPlacementGroupName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAvailabilitySetName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceGroupName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureFleetInfo) validateClientID(formats strfmt.Registry) error { - - if err := validate.Required("clientId", "body", m.ClientID); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateVnetName(formats strfmt.Registry) error { - - if err := validate.Required("vnetName", "body", m.VnetName); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateSubnetName(formats strfmt.Registry) error { - - if err := validate.Required("subnetName", "body", m.SubnetName); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateAppSecurityGroupName(formats strfmt.Registry) error { - - if err := validate.Required("appSecurityGroupName", "body", m.AppSecurityGroupName); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateProximityPlacementGroupName(formats strfmt.Registry) error { - - if err := validate.Required("proximityPlacementGroupName", "body", m.ProximityPlacementGroupName); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateAvailabilitySetName(formats strfmt.Registry) error { - - if err := validate.Required("availabilitySetName", "body", m.AvailabilitySetName); err != nil { - return err - } - - return nil -} - -func (m *AzureFleetInfo) validateResourceGroupName(formats strfmt.Registry) error { - - if err := validate.Required("resourceGroupName", "body", m.ResourceGroupName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure fleet info based on context it is used -func (m *AzureFleetInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureFleetInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureFleetInfo) UnmarshalBinary(b []byte) error { - var res AzureFleetInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_hot_blob_params.go b/v2/models/azure_hot_blob_params.go deleted file mode 100644 index 9979b16d..00000000 --- a/v2/models/azure_hot_blob_params.go +++ /dev/null @@ -1,118 +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" -) - -// AzureHotBlobParams Azure Hot Blob Request Params. -// -// # Specifies the parameters which are specific to Azure related with tier type Hot Blob -// -// swagger:model AzureHotBlobParams -type AzureHotBlobParams struct { - - // Specifies the category of the external target. - // Required: true - // Enum: ["Azure","AzureStandard","AzureGovCloud"] - Category *string `json:"category"` - - // Specifies the name of the Azure function app, which is the host of Azure functions. - FunctionAppName *string `json:"functionAppName,omitempty"` - - // Specifies the access key to deploy Azure function to function app - FunctionAppDeploymentKey *string `json:"functionAppDeploymentKey,omitempty"` -} - -// Validate validates this azure hot blob params -func (m *AzureHotBlobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureHotBlobParamsTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","AzureStandard","AzureGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureHotBlobParamsTypeCategoryPropEnum = append(azureHotBlobParamsTypeCategoryPropEnum, v) - } -} - -const ( - - // AzureHotBlobParamsCategoryAzure captures enum value "Azure" - AzureHotBlobParamsCategoryAzure string = "Azure" - - // AzureHotBlobParamsCategoryAzureStandard captures enum value "AzureStandard" - AzureHotBlobParamsCategoryAzureStandard string = "AzureStandard" - - // AzureHotBlobParamsCategoryAzureGovCloud captures enum value "AzureGovCloud" - AzureHotBlobParamsCategoryAzureGovCloud string = "AzureGovCloud" -) - -// prop value enum -func (m *AzureHotBlobParams) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureHotBlobParamsTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureHotBlobParams) validateCategory(formats strfmt.Registry) error { - - if err := validate.Required("category", "body", m.Category); err != nil { - return err - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure hot blob params based on context it is used -func (m *AzureHotBlobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureHotBlobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureHotBlobParams) UnmarshalBinary(b []byte) error { - var res AzureHotBlobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_native_object_protection_params.go b/v2/models/azure_native_object_protection_params.go deleted file mode 100644 index 101ee023..00000000 --- a/v2/models/azure_native_object_protection_params.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AzureNativeObjectProtectionParams Azure Native Object Protection Request Params. -// -// Specifies the parameters which are specific to Azure Object Protection Groups using Azure native APIs. Atlease one of tags or objects must be specified. -// -// swagger:model AzureNativeObjectProtectionParams -type AzureNativeObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AzureObjectLevelParams `json:"objects"` - - // Specifies the the details of network used in transferring the data from source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` -} - -// Validate validates this azure native object protection params -func (m *AzureNativeObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureNativeObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureNativeObjectProtectionParams) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure native object protection params based on the context it is used -func (m *AzureNativeObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureNativeObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureNativeObjectProtectionParams) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureNativeObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureNativeObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AzureNativeObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_native_protection_group_object_params.go b/v2/models/azure_native_protection_group_object_params.go deleted file mode 100644 index 14198619..00000000 --- a/v2/models/azure_native_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AzureNativeProtectionGroupObjectParams Azure Native Protection Group Object Params. -// -// Specifies the object parameters to create Azure Native Protection Group. -// -// swagger:model AzureNativeProtectionGroupObjectParams -type AzureNativeProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this azure native protection group object params -func (m *AzureNativeProtectionGroupObjectParams) 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 *AzureNativeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure native protection group object params based on the context it is used -func (m *AzureNativeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureNativeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureNativeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureNativeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AzureNativeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_native_protection_group_params.go b/v2/models/azure_native_protection_group_params.go deleted file mode 100644 index 4b31182e..00000000 --- a/v2/models/azure_native_protection_group_params.go +++ /dev/null @@ -1,340 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureNativeProtectionGroupParams Azure Native Protection Group Request Params. -// -// Specifies the parameters which are specific to Azure related Protection Groups using Azure native snapshot APIs. Objects must be specified. -// -// swagger:model AzureNativeProtectionGroupParams -type AzureNativeProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - Objects []*AzureNativeProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Array of arrays of VM Tag Ids that Specify VMs to Protect. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of arrays of VM Tag Ids that Specify VMs to Exclude. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies the indexing policy for VMs in this Group. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to move the workload to the cloud. - CloudMigration *bool `json:"cloudMigration,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the the details of network used in transferring the data from source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // Specifies the pre script and post script to run before and after the backup. - CloudPrePostScript *CloudBackupScriptParams `json:"cloudPrePostScript,omitempty"` -} - -// Validate validates this azure native protection group params -func (m *AzureNativeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudPrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureNativeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) validateCloudPrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.CloudPrePostScript) { // not required - return nil - } - - if m.CloudPrePostScript != nil { - if err := m.CloudPrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPrePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPrePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure native protection group params based on the context it is used -func (m *AzureNativeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudPrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *AzureNativeProtectionGroupParams) contextValidateCloudPrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudPrePostScript != nil { - - if swag.IsZero(m.CloudPrePostScript) { // not required - return nil - } - - if err := m.CloudPrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPrePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPrePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureNativeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureNativeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AzureNativeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_object_level_params.go b/v2/models/azure_object_level_params.go deleted file mode 100644 index 106dc4c8..00000000 --- a/v2/models/azure_object_level_params.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" -) - -// AzureObjectLevelParams Azure Object Level Params -// -// Specifies the Azure object level settings for object protection. -// -// swagger:model AzureObjectLevelParams -type AzureObjectLevelParams struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` -} - -// Validate validates this azure object level params -func (m *AzureObjectLevelParams) 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 *AzureObjectLevelParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure object level params based on context it is used -func (m *AzureObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureObjectLevelParams) UnmarshalBinary(b []byte) error { - var res AzureObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_object_protection_request_params.go b/v2/models/azure_object_protection_request_params.go deleted file mode 100644 index 68439e22..00000000 --- a/v2/models/azure_object_protection_request_params.go +++ /dev/null @@ -1,228 +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" -) - -// AzureObjectProtectionRequestParams Azure Object Protection Request Params. -// -// Specifies the parameters which are specific to Azure related Object Protection. -// -// swagger:model AzureObjectProtectionRequestParams -type AzureObjectProtectionRequestParams struct { - AzureCommonObjectProtectionParams - - // Specifies the parameters which are specific to Azure related Protection using Azure native APIs. - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to Azure SQL related Protection using Azure native APIs. - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AzureObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AzureCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AzureCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.AzureSQLProtectionTypeParams = dataAO1.AzureSQLProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AzureObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AzureCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.AzureSQLProtectionTypeParams = m.AzureSQLProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this azure object protection request params -func (m *AzureObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureSQLProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionRequestParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionRequestParams) validateAzureSQLProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if m.AzureSQLProtectionTypeParams != nil { - if err := m.AzureSQLProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure object protection request params based on the context it is used -func (m *AzureObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureSQLProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionRequestParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionRequestParams) contextValidateAzureSQLProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLProtectionTypeParams != nil { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if err := m.AzureSQLProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res AzureObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_object_protection_response_params.go b/v2/models/azure_object_protection_response_params.go deleted file mode 100644 index b4694849..00000000 --- a/v2/models/azure_object_protection_response_params.go +++ /dev/null @@ -1,228 +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" -) - -// AzureObjectProtectionResponseParams Azure Object Protection Response Params. -// -// Specifies the parameters which are specific to Azure related Object Protection response. -// -// swagger:model AzureObjectProtectionResponseParams -type AzureObjectProtectionResponseParams struct { - AzureCommonObjectProtectionParams - - // Specifies the parameters which are specific to Azure related Protection using Azure native APIs. - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to Azure SQL related Protection using Azure native APIs. - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AzureObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AzureCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AzureCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.AzureSQLProtectionTypeParams = dataAO1.AzureSQLProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AzureObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AzureCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.AzureSQLProtectionTypeParams = m.AzureSQLProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this azure object protection response params -func (m *AzureObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureSQLProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionResponseParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionResponseParams) validateAzureSQLProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if m.AzureSQLProtectionTypeParams != nil { - if err := m.AzureSQLProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure object protection response params based on the context it is used -func (m *AzureObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureSQLProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionResponseParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionResponseParams) contextValidateAzureSQLProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLProtectionTypeParams != nil { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if err := m.AzureSQLProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res AzureObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_object_protection_update_request_params.go b/v2/models/azure_object_protection_update_request_params.go deleted file mode 100644 index c9a92552..00000000 --- a/v2/models/azure_object_protection_update_request_params.go +++ /dev/null @@ -1,228 +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" -) - -// AzureObjectProtectionUpdateRequestParams Azure Object Protection Update Request Params. -// -// Specifies the parameters which are specific to Azure related Object Protection update request. -// -// swagger:model AzureObjectProtectionUpdateRequestParams -type AzureObjectProtectionUpdateRequestParams struct { - AzureCommonObjectProtectionParams - - // Specifies the parameters which are specific to Azure related Protection using Azure native snapshot APIs. - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to Azure SQL related Protection using Azure native APIs. - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AzureObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AzureCommonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AzureCommonObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NativeProtectionTypeParams = dataAO1.NativeProtectionTypeParams - - m.AzureSQLProtectionTypeParams = dataAO1.AzureSQLProtectionTypeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AzureObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AzureCommonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NativeProtectionTypeParams *AzureNativeObjectProtectionParams `json:"nativeProtectionTypeParams,omitempty"` - - AzureSQLProtectionTypeParams *AzureSQLObjectProtectionParams `json:"azureSqlProtectionTypeParams,omitempty"` - } - - dataAO1.NativeProtectionTypeParams = m.NativeProtectionTypeParams - - dataAO1.AzureSQLProtectionTypeParams = m.AzureSQLProtectionTypeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this azure object protection update request params -func (m *AzureObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureSQLProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionUpdateRequestParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionUpdateRequestParams) validateAzureSQLProtectionTypeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if m.AzureSQLProtectionTypeParams != nil { - if err := m.AzureSQLProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure object protection update request params based on the context it is used -func (m *AzureObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureCommonObjectProtectionParams - if err := m.AzureCommonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureSQLProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureObjectProtectionUpdateRequestParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureObjectProtectionUpdateRequestParams) contextValidateAzureSQLProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLProtectionTypeParams != nil { - - if swag.IsZero(m.AzureSQLProtectionTypeParams) { // not required - return nil - } - - if err := m.AzureSQLProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res AzureObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_protection_group_params.go b/v2/models/azure_protection_group_params.go deleted file mode 100644 index 83978d12..00000000 --- a/v2/models/azure_protection_group_params.go +++ /dev/null @@ -1,273 +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" -) - -// AzureProtectionGroupParams Azure Protection Group Request Params. -// -// Specifies the parameters which are specific to Azure related Protection Groups. -// -// swagger:model AzureProtectionGroupParams -type AzureProtectionGroupParams struct { - - // Specifies the Azure Protection Group type. - // Required: true - // Enum: ["kAgent","kNative","kSnapshotManager","kAzureSQL"] - ProtectionType *string `json:"protectionType"` - - // Specifies the parameters which are specific to Azure related protection groups using cohesity protection-service installed on the instance. Objects must be specified. - AgentProtectionTypeParams *AzureAgentProtectionGroupParams `json:"agentProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Protection Groups using Azure native snapshot APIs. - NativeProtectionTypeParams *AzureNativeProtectionGroupParams `json:"nativeProtectionTypeParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Protection Groups using Azure native snapshot orchestration with snapshot manager. - SnapshotManagerProtectionTypeParams *AzureSnapshotManagerProtectionGroupParams `json:"snapshotManagerProtectionTypeParams,omitempty"` -} - -// Validate validates this azure protection group params -func (m *AzureProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotManagerProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionGroupParamsTypeProtectionTypePropEnum = append(azureProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AzureProtectionGroupParamsProtectionTypeKAgent captures enum value "kAgent" - AzureProtectionGroupParamsProtectionTypeKAgent string = "kAgent" - - // AzureProtectionGroupParamsProtectionTypeKNative captures enum value "kNative" - AzureProtectionGroupParamsProtectionTypeKNative string = "kNative" - - // AzureProtectionGroupParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AzureProtectionGroupParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AzureProtectionGroupParamsProtectionTypeKAzureSQL captures enum value "kAzureSQL" - AzureProtectionGroupParamsProtectionTypeKAzureSQL string = "kAzureSQL" -) - -// prop value enum -func (m *AzureProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *AzureProtectionGroupParams) validateAgentProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.AgentProtectionTypeParams) { // not required - return nil - } - - if m.AgentProtectionTypeParams != nil { - if err := m.AgentProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureProtectionGroupParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureProtectionGroupParams) validateSnapshotManagerProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if m.SnapshotManagerProtectionTypeParams != nil { - if err := m.SnapshotManagerProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure protection group params based on the context it is used -func (m *AzureProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgentProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotManagerProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureProtectionGroupParams) contextValidateAgentProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentProtectionTypeParams != nil { - - if swag.IsZero(m.AgentProtectionTypeParams) { // not required - return nil - } - - if err := m.AgentProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureProtectionGroupParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *AzureProtectionGroupParams) contextValidateSnapshotManagerProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotManagerProtectionTypeParams != nil { - - if swag.IsZero(m.SnapshotManagerProtectionTypeParams) { // not required - return nil - } - - if err := m.SnapshotManagerProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotManagerProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotManagerProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AzureProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_protection_group_type.go b/v2/models/azure_protection_group_type.go deleted file mode 100644 index 96952481..00000000 --- a/v2/models/azure_protection_group_type.go +++ /dev/null @@ -1,113 +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" -) - -// AzureProtectionGroupType Azure Protection Group type. -// -// Azure Protection Group type. -// -// swagger:model AzureProtectionGroupType -type AzureProtectionGroupType struct { - - // Specifies Azure Protection Group type. - // Enum: ["kAgent","kNative","kSnapshotManager","kAzureSQL"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this azure protection group type -func (m *AzureProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionGroupTypeTypeEnvironmentPropEnum = append(azureProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // AzureProtectionGroupTypeEnvironmentKAgent captures enum value "kAgent" - AzureProtectionGroupTypeEnvironmentKAgent string = "kAgent" - - // AzureProtectionGroupTypeEnvironmentKNative captures enum value "kNative" - AzureProtectionGroupTypeEnvironmentKNative string = "kNative" - - // AzureProtectionGroupTypeEnvironmentKSnapshotManager captures enum value "kSnapshotManager" - AzureProtectionGroupTypeEnvironmentKSnapshotManager string = "kSnapshotManager" - - // AzureProtectionGroupTypeEnvironmentKAzureSQL captures enum value "kAzureSQL" - AzureProtectionGroupTypeEnvironmentKAzureSQL string = "kAzureSQL" -) - -// prop value enum -func (m *AzureProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionGroupType) 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 validates this azure protection group type based on context it is used -func (m *AzureProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureProtectionGroupType) UnmarshalBinary(b []byte) error { - var res AzureProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_protection_use_case_type.go b/v2/models/azure_protection_use_case_type.go deleted file mode 100644 index 019e317d..00000000 --- a/v2/models/azure_protection_use_case_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureProtectionUseCaseType Azure Protection Use case type. -// -// Azure Protection Use case type. -// -// swagger:model AzureProtectionUseCaseType -type AzureProtectionUseCaseType struct { - - // Specifies Azure Protection Use case type. - // Enum: ["kVirtualMachine","kSQL"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this azure protection use case type -func (m *AzureProtectionUseCaseType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureProtectionUseCaseTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVirtualMachine","kSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureProtectionUseCaseTypeTypeEnumPropEnum = append(azureProtectionUseCaseTypeTypeEnumPropEnum, v) - } -} - -const ( - - // AzureProtectionUseCaseTypeEnumKVirtualMachine captures enum value "kVirtualMachine" - AzureProtectionUseCaseTypeEnumKVirtualMachine string = "kVirtualMachine" - - // AzureProtectionUseCaseTypeEnumKSQL captures enum value "kSQL" - AzureProtectionUseCaseTypeEnumKSQL string = "kSQL" -) - -// prop value enum -func (m *AzureProtectionUseCaseType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureProtectionUseCaseTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureProtectionUseCaseType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure protection use case type based on context it is used -func (m *AzureProtectionUseCaseType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureProtectionUseCaseType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureProtectionUseCaseType) UnmarshalBinary(b []byte) error { - var res AzureProtectionUseCaseType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_recover_files_new_target_config.go b/v2/models/azure_recover_files_new_target_config.go deleted file mode 100644 index 2fdc201c..00000000 --- a/v2/models/azure_recover_files_new_target_config.go +++ /dev/null @@ -1,178 +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" -) - -// AzureRecoverFilesNewTargetConfig Azure Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to the new target. -// -// swagger:model AzureRecoverFilesNewTargetConfig -type AzureRecoverFilesNewTargetConfig struct { - - // Specifies the absolute path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this azure recover files new target config -func (m *AzureRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *AzureRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AzureRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure recover files new target config based on the context it is used -func (m *AzureRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *AzureRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res AzureRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_recover_files_original_target_config.go b/v2/models/azure_recover_files_original_target_config.go deleted file mode 100644 index ca09b701..00000000 --- a/v2/models/azure_recover_files_original_target_config.go +++ /dev/null @@ -1,132 +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" -) - -// AzureRecoverFilesOriginalTargetConfig Azure Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model AzureRecoverFilesOriginalTargetConfig -type AzureRecoverFilesOriginalTargetConfig struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this azure recover files original target config -func (m *AzureRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *AzureRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure recover files original target config based on the context it is used -func (m *AzureRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res AzureRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_snapshot_manager_protection_group_object_params.go b/v2/models/azure_snapshot_manager_protection_group_object_params.go deleted file mode 100644 index 3377a334..00000000 --- a/v2/models/azure_snapshot_manager_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// AzureSnapshotManagerProtectionGroupObjectParams Azure Snapshot Manager Protection Group Object Params. -// -// Specifies the object parameters to create Azure Snapshot Manager Protection Group. -// -// swagger:model AzureSnapshotManagerProtectionGroupObjectParams -type AzureSnapshotManagerProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this azure snapshot manager protection group object params -func (m *AzureSnapshotManagerProtectionGroupObjectParams) 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 *AzureSnapshotManagerProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure snapshot manager protection group object params based on the context it is used -func (m *AzureSnapshotManagerProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSnapshotManagerProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSnapshotManagerProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res AzureSnapshotManagerProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_snapshot_manager_protection_group_params.go b/v2/models/azure_snapshot_manager_protection_group_params.go deleted file mode 100644 index c7941681..00000000 --- a/v2/models/azure_snapshot_manager_protection_group_params.go +++ /dev/null @@ -1,240 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureSnapshotManagerProtectionGroupParams Create Azure Snapshot Manager Protection Group Request Body -// -// Specifies the parameters which are specific to Azure related Protection Groups using Azure native snapshot orchestration with snapshot manager. Objects must be specified. -// -// swagger:model AzureSnapshotManagerProtectionGroupParams -type AzureSnapshotManagerProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*AzureSnapshotManagerProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Array of arrays of VM Tag Ids that Specify VMs to Protect. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of arrays of VM Tag Ids that Specify VMs to Exclude. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the backup. - CloudPrePostScript *CloudBackupScriptParams `json:"cloudPrePostScript,omitempty"` -} - -// Validate validates this azure snapshot manager protection group params -func (m *AzureSnapshotManagerProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudPrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) validateCloudPrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.CloudPrePostScript) { // not required - return nil - } - - if m.CloudPrePostScript != nil { - if err := m.CloudPrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPrePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPrePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure snapshot manager protection group params based on the context it is used -func (m *AzureSnapshotManagerProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudPrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *AzureSnapshotManagerProtectionGroupParams) contextValidateCloudPrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudPrePostScript != nil { - - if swag.IsZero(m.CloudPrePostScript) { // not required - return nil - } - - if err := m.CloudPrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudPrePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudPrePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSnapshotManagerProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSnapshotManagerProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res AzureSnapshotManagerProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_snapshot_params.go b/v2/models/azure_snapshot_params.go deleted file mode 100644 index 3efbbaf7..00000000 --- a/v2/models/azure_snapshot_params.go +++ /dev/null @@ -1,111 +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" -) - -// AzureSnapshotParams Specifies parameters of Azure type snapshots. -// -// swagger:model AzureSnapshotParams -type AzureSnapshotParams struct { - - // Specifies the protection type of Azure snapshots. - // Enum: ["kAgent","kNative","kSnapshotManager","kAzureSQL"] - ProtectionType *string `json:"protectionType,omitempty"` -} - -// Validate validates this azure snapshot params -func (m *AzureSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureSnapshotParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSnapshotParamsTypeProtectionTypePropEnum = append(azureSnapshotParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // AzureSnapshotParamsProtectionTypeKAgent captures enum value "kAgent" - AzureSnapshotParamsProtectionTypeKAgent string = "kAgent" - - // AzureSnapshotParamsProtectionTypeKNative captures enum value "kNative" - AzureSnapshotParamsProtectionTypeKNative string = "kNative" - - // AzureSnapshotParamsProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - AzureSnapshotParamsProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // AzureSnapshotParamsProtectionTypeKAzureSQL captures enum value "kAzureSQL" - AzureSnapshotParamsProtectionTypeKAzureSQL string = "kAzureSQL" -) - -// prop value enum -func (m *AzureSnapshotParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSnapshotParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSnapshotParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure snapshot params based on context it is used -func (m *AzureSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSnapshotParams) UnmarshalBinary(b []byte) error { - var res AzureSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_source_registration_params.go b/v2/models/azure_source_registration_params.go deleted file mode 100644 index afc39bfd..00000000 --- a/v2/models/azure_source_registration_params.go +++ /dev/null @@ -1,359 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureSourceRegistrationParams Specifies the paramaters to register an Azure source. -// -// swagger:model AzureSourceRegistrationParams -type AzureSourceRegistrationParams struct { - - // Specifies whether the registration is at tenant level or subscription level. - // Required: true - // Enum: ["kTenant","kSubscription"] - RegistrationLevel *string `json:"registrationLevel"` - - // Specifies whether the type of registration is express or manual. - // Required: true - // Enum: ["kExpress","kManual"] - RegistrationWorkflow *string `json:"registrationWorkflow"` - - // Specifies Tenant Id of the active directory of Azure account. Accpets both Azure tanant Id and tenant domain name. - AzureTenantID *string `json:"azureTenantId,omitempty"` - - // Specifies the credentials for a list of applications from azure active directory. - ApplicationCredentials []*AzureApplicationCredentials `json:"applicationCredentials"` - - // Specifies the list subscription ids to be registered. - // Min Items: 1 - // Unique: true - SubscriptionDetails []*AzureSubscription `json:"subscriptionDetails"` - - // The use cases for which the source is to be registered. - // Min Items: 1 - // Unique: true - UseCases []string `json:"useCases"` -} - -// Validate validates this azure source registration params -func (m *AzureSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegistrationLevel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegistrationWorkflow(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionDetails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUseCases(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureSourceRegistrationParamsTypeRegistrationLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kTenant","kSubscription"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSourceRegistrationParamsTypeRegistrationLevelPropEnum = append(azureSourceRegistrationParamsTypeRegistrationLevelPropEnum, v) - } -} - -const ( - - // AzureSourceRegistrationParamsRegistrationLevelKTenant captures enum value "kTenant" - AzureSourceRegistrationParamsRegistrationLevelKTenant string = "kTenant" - - // AzureSourceRegistrationParamsRegistrationLevelKSubscription captures enum value "kSubscription" - AzureSourceRegistrationParamsRegistrationLevelKSubscription string = "kSubscription" -) - -// prop value enum -func (m *AzureSourceRegistrationParams) validateRegistrationLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSourceRegistrationParamsTypeRegistrationLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSourceRegistrationParams) validateRegistrationLevel(formats strfmt.Registry) error { - - if err := validate.Required("registrationLevel", "body", m.RegistrationLevel); err != nil { - return err - } - - // value enum - if err := m.validateRegistrationLevelEnum("registrationLevel", "body", *m.RegistrationLevel); err != nil { - return err - } - - return nil -} - -var azureSourceRegistrationParamsTypeRegistrationWorkflowPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kExpress","kManual"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSourceRegistrationParamsTypeRegistrationWorkflowPropEnum = append(azureSourceRegistrationParamsTypeRegistrationWorkflowPropEnum, v) - } -} - -const ( - - // AzureSourceRegistrationParamsRegistrationWorkflowKExpress captures enum value "kExpress" - AzureSourceRegistrationParamsRegistrationWorkflowKExpress string = "kExpress" - - // AzureSourceRegistrationParamsRegistrationWorkflowKManual captures enum value "kManual" - AzureSourceRegistrationParamsRegistrationWorkflowKManual string = "kManual" -) - -// prop value enum -func (m *AzureSourceRegistrationParams) validateRegistrationWorkflowEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSourceRegistrationParamsTypeRegistrationWorkflowPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSourceRegistrationParams) validateRegistrationWorkflow(formats strfmt.Registry) error { - - if err := validate.Required("registrationWorkflow", "body", m.RegistrationWorkflow); err != nil { - return err - } - - // value enum - if err := m.validateRegistrationWorkflowEnum("registrationWorkflow", "body", *m.RegistrationWorkflow); err != nil { - return err - } - - return nil -} - -func (m *AzureSourceRegistrationParams) validateApplicationCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationCredentials) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationCredentials); i++ { - if swag.IsZero(m.ApplicationCredentials[i]) { // not required - continue - } - - if m.ApplicationCredentials[i] != nil { - if err := m.ApplicationCredentials[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationCredentials" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationCredentials" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureSourceRegistrationParams) validateSubscriptionDetails(formats strfmt.Registry) error { - if swag.IsZero(m.SubscriptionDetails) { // not required - return nil - } - - iSubscriptionDetailsSize := int64(len(m.SubscriptionDetails)) - - if err := validate.MinItems("subscriptionDetails", "body", iSubscriptionDetailsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("subscriptionDetails", "body", m.SubscriptionDetails); err != nil { - return err - } - - for i := 0; i < len(m.SubscriptionDetails); i++ { - if swag.IsZero(m.SubscriptionDetails[i]) { // not required - continue - } - - if m.SubscriptionDetails[i] != nil { - if err := m.SubscriptionDetails[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptionDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptionDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var azureSourceRegistrationParamsUseCasesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVirtualMachine","kSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSourceRegistrationParamsUseCasesItemsEnum = append(azureSourceRegistrationParamsUseCasesItemsEnum, v) - } -} - -func (m *AzureSourceRegistrationParams) validateUseCasesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSourceRegistrationParamsUseCasesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSourceRegistrationParams) validateUseCases(formats strfmt.Registry) error { - if swag.IsZero(m.UseCases) { // not required - return nil - } - - iUseCasesSize := int64(len(m.UseCases)) - - if err := validate.MinItems("useCases", "body", iUseCasesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("useCases", "body", m.UseCases); err != nil { - return err - } - - for i := 0; i < len(m.UseCases); i++ { - - // value enum - if err := m.validateUseCasesItemsEnum("useCases"+"."+strconv.Itoa(i), "body", m.UseCases[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this azure source registration params based on the context it is used -func (m *AzureSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubscriptionDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSourceRegistrationParams) contextValidateApplicationCredentials(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationCredentials); i++ { - - if m.ApplicationCredentials[i] != nil { - - if swag.IsZero(m.ApplicationCredentials[i]) { // not required - return nil - } - - if err := m.ApplicationCredentials[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationCredentials" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationCredentials" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureSourceRegistrationParams) contextValidateSubscriptionDetails(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubscriptionDetails); i++ { - - if m.SubscriptionDetails[i] != nil { - - if swag.IsZero(m.SubscriptionDetails[i]) { // not required - return nil - } - - if err := m.SubscriptionDetails[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscriptionDetails" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscriptionDetails" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res AzureSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_entity_metadata.go b/v2/models/azure_sql_entity_metadata.go deleted file mode 100644 index 6b12c603..00000000 --- a/v2/models/azure_sql_entity_metadata.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureSQLEntityMetadata Specifies the entity metadata of azure sql entities. -// -// swagger:model AzureSqlEntityMetadata -type AzureSQLEntityMetadata struct { - - // Specifies the metadata list. - // Required: true - MetadataList []*AzureSQLMetadata `json:"metadataList"` -} - -// Validate validates this azure Sql entity metadata -func (m *AzureSQLEntityMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadataList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLEntityMetadata) validateMetadataList(formats strfmt.Registry) error { - - if err := validate.Required("metadataList", "body", m.MetadataList); err != nil { - return err - } - - for i := 0; i < len(m.MetadataList); i++ { - if swag.IsZero(m.MetadataList[i]) { // not required - continue - } - - if m.MetadataList[i] != nil { - if err := m.MetadataList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this azure Sql entity metadata based on the context it is used -func (m *AzureSQLEntityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadataList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLEntityMetadata) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MetadataList); i++ { - - if m.MetadataList[i] != nil { - - if swag.IsZero(m.MetadataList[i]) { // not required - return nil - } - - if err := m.MetadataList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadataList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLEntityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLEntityMetadata) UnmarshalBinary(b []byte) error { - var res AzureSQLEntityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_metadata.go b/v2/models/azure_sql_metadata.go deleted file mode 100644 index 5440cc69..00000000 --- a/v2/models/azure_sql_metadata.go +++ /dev/null @@ -1,163 +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" -) - -// AzureSQLMetadata Specifies the metadata types and values of azure sql. -// -// swagger:model AzureSqlMetadata -type AzureSQLMetadata struct { - - // Specifies the standard username and password type of credentials. - StandardCredentials *Credentials `json:"standardCredentials,omitempty"` - - // Specifies the type of metadata being sent in the request. - // Required: true - // Enum: ["Credentials","ManagedIdentity"] - MetadataType *string `json:"metadataType"` -} - -// Validate validates this azure Sql metadata -func (m *AzureSQLMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStandardCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadataType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLMetadata) validateStandardCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.StandardCredentials) { // not required - return nil - } - - if m.StandardCredentials != nil { - if err := m.StandardCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -var azureSqlMetadataTypeMetadataTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Credentials","ManagedIdentity"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlMetadataTypeMetadataTypePropEnum = append(azureSqlMetadataTypeMetadataTypePropEnum, v) - } -} - -const ( - - // AzureSQLMetadataMetadataTypeCredentials captures enum value "Credentials" - AzureSQLMetadataMetadataTypeCredentials string = "Credentials" - - // AzureSQLMetadataMetadataTypeManagedIdentity captures enum value "ManagedIdentity" - AzureSQLMetadataMetadataTypeManagedIdentity string = "ManagedIdentity" -) - -// prop value enum -func (m *AzureSQLMetadata) validateMetadataTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlMetadataTypeMetadataTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLMetadata) validateMetadataType(formats strfmt.Registry) error { - - if err := validate.Required("metadataType", "body", m.MetadataType); err != nil { - return err - } - - // value enum - if err := m.validateMetadataTypeEnum("metadataType", "body", *m.MetadataType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure Sql metadata based on the context it is used -func (m *AzureSQLMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStandardCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLMetadata) contextValidateStandardCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.StandardCredentials != nil { - - if swag.IsZero(m.StandardCredentials) { // not required - return nil - } - - if err := m.StandardCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLMetadata) UnmarshalBinary(b []byte) error { - var res AzureSQLMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_metadata_type.go b/v2/models/azure_sql_metadata_type.go deleted file mode 100644 index d145b4a3..00000000 --- a/v2/models/azure_sql_metadata_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureSQLMetadataType ObjectMetadataType -// -// Specifies the metadata type for AWS postgres. -// -// swagger:model AzureSqlMetadataType -type AzureSQLMetadataType struct { - - // Specifies the types of metadatas associated to entity. - // Enum: ["Credentials","ManagedIdentity"] - EntityMetadataType string `json:"entityMetadataType,omitempty"` -} - -// Validate validates this azure Sql metadata type -func (m *AzureSQLMetadataType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityMetadataType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureSqlMetadataTypeTypeEntityMetadataTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Credentials","ManagedIdentity"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlMetadataTypeTypeEntityMetadataTypePropEnum = append(azureSqlMetadataTypeTypeEntityMetadataTypePropEnum, v) - } -} - -const ( - - // AzureSQLMetadataTypeEntityMetadataTypeCredentials captures enum value "Credentials" - AzureSQLMetadataTypeEntityMetadataTypeCredentials string = "Credentials" - - // AzureSQLMetadataTypeEntityMetadataTypeManagedIdentity captures enum value "ManagedIdentity" - AzureSQLMetadataTypeEntityMetadataTypeManagedIdentity string = "ManagedIdentity" -) - -// prop value enum -func (m *AzureSQLMetadataType) validateEntityMetadataTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlMetadataTypeTypeEntityMetadataTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLMetadataType) validateEntityMetadataType(formats strfmt.Registry) error { - if swag.IsZero(m.EntityMetadataType) { // not required - return nil - } - - // value enum - if err := m.validateEntityMetadataTypeEnum("entityMetadataType", "body", m.EntityMetadataType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure Sql metadata type based on context it is used -func (m *AzureSQLMetadataType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLMetadataType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLMetadataType) UnmarshalBinary(b []byte) error { - var res AzureSQLMetadataType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_object_protection_params.go b/v2/models/azure_sql_object_protection_params.go deleted file mode 100644 index b3240675..00000000 --- a/v2/models/azure_sql_object_protection_params.go +++ /dev/null @@ -1,333 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureSQLObjectProtectionParams Azure SQL Object Protection Request Params. -// -// Specifies the parameters which are specific to Azure SQL Object Protection Groups using Azure native APIs. Atlease one of objects must be specified. -// -// swagger:model AzureSqlObjectProtectionParams -type AzureSQLObjectProtectionParams struct { - - // Specifies the objects to be protected. - Objects []*AzureObjectLevelParams `json:"objects"` - - // Specifies azure managed storage disk to be used for object protection. By default Premium LRS is being used to support Azure SQL workloads. - // Enum: ["PremiumSSD","PremiumSSDv2","StandardSSD","StandardHDD","UltraDisk","Premium_LRS","PremiumV2_LRS","Premium_ZRS","StandardSSD_LRS","StandardSSD_ZRS","Standard_LRS","UltraSSD_LRS"] - DiskType *string `json:"diskType,omitempty"` - - // If set to true, a copy of the database is created during backup, and the backup is performed from the copied database. This backup will be transactionally consistent. If set to false, the backup is performed from the production database while transactions are in progress. In this case, the backup will be transactionally inconsistent, and recovery can fail or the recovered database may be in an inconsistent state. - CopyDatabase *bool `json:"copyDatabase,omitempty"` - - // Specifies the SQL package options to be used during Azure SQL object Protection. - SQLPackageOptions *AzureSQLPackageOptions `json:"sqlPackageOptions,omitempty"` - - // Specifies the copy database sku options to be used during Azure SQL object Protection. - CopyDatabaseSku *AzureSQLSkuOptions `json:"copyDatabaseSku,omitempty"` - - // Specifies the size of the disk we will attach to rigel to use for exporting this DB(in GB). - TempDiskSizeGb *int32 `json:"tempDiskSizeGb,omitempty"` - - // Specifies the ids of the objects to be excluded in the Object Protection. This can be used to ignore specific objects under a parent object which has been included for protection. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` -} - -// Validate validates this azure Sql object protection params -func (m *AzureSQLObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLPackageOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCopyDatabaseSku(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var azureSqlObjectProtectionParamsTypeDiskTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PremiumSSD","PremiumSSDv2","StandardSSD","StandardHDD","UltraDisk","Premium_LRS","PremiumV2_LRS","Premium_ZRS","StandardSSD_LRS","StandardSSD_ZRS","Standard_LRS","UltraSSD_LRS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlObjectProtectionParamsTypeDiskTypePropEnum = append(azureSqlObjectProtectionParamsTypeDiskTypePropEnum, v) - } -} - -const ( - - // AzureSQLObjectProtectionParamsDiskTypePremiumSSD captures enum value "PremiumSSD" - AzureSQLObjectProtectionParamsDiskTypePremiumSSD string = "PremiumSSD" - - // AzureSQLObjectProtectionParamsDiskTypePremiumSSDv2 captures enum value "PremiumSSDv2" - AzureSQLObjectProtectionParamsDiskTypePremiumSSDv2 string = "PremiumSSDv2" - - // AzureSQLObjectProtectionParamsDiskTypeStandardSSD captures enum value "StandardSSD" - AzureSQLObjectProtectionParamsDiskTypeStandardSSD string = "StandardSSD" - - // AzureSQLObjectProtectionParamsDiskTypeStandardHDD captures enum value "StandardHDD" - AzureSQLObjectProtectionParamsDiskTypeStandardHDD string = "StandardHDD" - - // AzureSQLObjectProtectionParamsDiskTypeUltraDisk captures enum value "UltraDisk" - AzureSQLObjectProtectionParamsDiskTypeUltraDisk string = "UltraDisk" - - // AzureSQLObjectProtectionParamsDiskTypePremiumLRS captures enum value "Premium_LRS" - AzureSQLObjectProtectionParamsDiskTypePremiumLRS string = "Premium_LRS" - - // AzureSQLObjectProtectionParamsDiskTypePremiumV2LRS captures enum value "PremiumV2_LRS" - AzureSQLObjectProtectionParamsDiskTypePremiumV2LRS string = "PremiumV2_LRS" - - // AzureSQLObjectProtectionParamsDiskTypePremiumZRS captures enum value "Premium_ZRS" - AzureSQLObjectProtectionParamsDiskTypePremiumZRS string = "Premium_ZRS" - - // AzureSQLObjectProtectionParamsDiskTypeStandardSSDLRS captures enum value "StandardSSD_LRS" - AzureSQLObjectProtectionParamsDiskTypeStandardSSDLRS string = "StandardSSD_LRS" - - // AzureSQLObjectProtectionParamsDiskTypeStandardSSDZRS captures enum value "StandardSSD_ZRS" - AzureSQLObjectProtectionParamsDiskTypeStandardSSDZRS string = "StandardSSD_ZRS" - - // AzureSQLObjectProtectionParamsDiskTypeStandardLRS captures enum value "Standard_LRS" - AzureSQLObjectProtectionParamsDiskTypeStandardLRS string = "Standard_LRS" - - // AzureSQLObjectProtectionParamsDiskTypeUltraSSDLRS captures enum value "UltraSSD_LRS" - AzureSQLObjectProtectionParamsDiskTypeUltraSSDLRS string = "UltraSSD_LRS" -) - -// prop value enum -func (m *AzureSQLObjectProtectionParams) validateDiskTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlObjectProtectionParamsTypeDiskTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLObjectProtectionParams) validateDiskType(formats strfmt.Registry) error { - if swag.IsZero(m.DiskType) { // not required - return nil - } - - // value enum - if err := m.validateDiskTypeEnum("diskType", "body", *m.DiskType); err != nil { - return err - } - - return nil -} - -func (m *AzureSQLObjectProtectionParams) validateSQLPackageOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if m.SQLPackageOptions != nil { - if err := m.SQLPackageOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -func (m *AzureSQLObjectProtectionParams) validateCopyDatabaseSku(formats strfmt.Registry) error { - if swag.IsZero(m.CopyDatabaseSku) { // not required - return nil - } - - if m.CopyDatabaseSku != nil { - if err := m.CopyDatabaseSku.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyDatabaseSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyDatabaseSku") - } - return err - } - } - - return nil -} - -func (m *AzureSQLObjectProtectionParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure Sql object protection params based on the context it is used -func (m *AzureSQLObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLPackageOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCopyDatabaseSku(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSQLObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AzureSQLObjectProtectionParams) contextValidateSQLPackageOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLPackageOptions != nil { - - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if err := m.SQLPackageOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -func (m *AzureSQLObjectProtectionParams) contextValidateCopyDatabaseSku(ctx context.Context, formats strfmt.Registry) error { - - if m.CopyDatabaseSku != nil { - - if swag.IsZero(m.CopyDatabaseSku) { // not required - return nil - } - - if err := m.CopyDatabaseSku.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("copyDatabaseSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("copyDatabaseSku") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res AzureSQLObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_package_options.go b/v2/models/azure_sql_package_options.go deleted file mode 100644 index 8267d7e9..00000000 --- a/v2/models/azure_sql_package_options.go +++ /dev/null @@ -1,116 +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" -) - -// AzureSQLPackageOptions Azure Object Protection & Recovery SQL Package Options. -// -// Specifies the SQL package parameters which are specific to Azure related Object Protection & Recovery. -// -// swagger:model AzureSqlPackageOptions -type AzureSQLPackageOptions struct { - - // Specifies the compression option supported by SQL package export command during Azure SQL backup. - // Enum: ["Normal","Maximum","Fast","SuperFast","NotCompressed"] - Compression *string `json:"compression,omitempty"` -} - -// Validate validates this azure Sql package options -func (m *AzureSQLPackageOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompression(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureSqlPackageOptionsTypeCompressionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Normal","Maximum","Fast","SuperFast","NotCompressed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlPackageOptionsTypeCompressionPropEnum = append(azureSqlPackageOptionsTypeCompressionPropEnum, v) - } -} - -const ( - - // AzureSQLPackageOptionsCompressionNormal captures enum value "Normal" - AzureSQLPackageOptionsCompressionNormal string = "Normal" - - // AzureSQLPackageOptionsCompressionMaximum captures enum value "Maximum" - AzureSQLPackageOptionsCompressionMaximum string = "Maximum" - - // AzureSQLPackageOptionsCompressionFast captures enum value "Fast" - AzureSQLPackageOptionsCompressionFast string = "Fast" - - // AzureSQLPackageOptionsCompressionSuperFast captures enum value "SuperFast" - AzureSQLPackageOptionsCompressionSuperFast string = "SuperFast" - - // AzureSQLPackageOptionsCompressionNotCompressed captures enum value "NotCompressed" - AzureSQLPackageOptionsCompressionNotCompressed string = "NotCompressed" -) - -// prop value enum -func (m *AzureSQLPackageOptions) validateCompressionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlPackageOptionsTypeCompressionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLPackageOptions) validateCompression(formats strfmt.Registry) error { - if swag.IsZero(m.Compression) { // not required - return nil - } - - // value enum - if err := m.validateCompressionEnum("compression", "body", *m.Compression); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure Sql package options based on context it is used -func (m *AzureSQLPackageOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLPackageOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLPackageOptions) UnmarshalBinary(b []byte) error { - var res AzureSQLPackageOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_sql_sku_options.go b/v2/models/azure_sql_sku_options.go deleted file mode 100644 index 3d6a54c8..00000000 --- a/v2/models/azure_sql_sku_options.go +++ /dev/null @@ -1,271 +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" -) - -// AzureSQLSkuOptions Azure SQL SKU Options. -// -// Specifies the SQL SKU parameters which are specific to Azure related Object Protection & Recovery. -// -// swagger:model AzureSqlSkuOptions -type AzureSQLSkuOptions struct { - - // Specifies the sku name for azure sql databases and by default Hyperscale is selected. - // Enum: ["Basic","Standard","Premium","GeneralPurpose","BusinessCritical","Hyperscale","DataWarehouse","Stretch"] - Name *string `json:"name,omitempty"` - - // Specifies the sku tier selection for azure sql databases and by default HS_Gen5 is selected. The tiers must match their sku name selected. - // Enum: ["S0","S1","S2","S3","S4","S6","S7","S9","S12","P1","P2","P4","P6","P11","P15","BC_DC","BC_Gen5","BC_M","GP_DC","GP_Fsv2","GP_Gen5","GP_S_Gen5","HS_DC","HS_Gen5","HS_S_Gen5","HS_MOPRMS","HS_PRMS","Free","Basic","Standard","Premium","DataWarehouse","Stretch"] - TierType *string `json:"tierType,omitempty"` - - // Specifies the capacity of the sku. For azure sql dbs, this is the number of cores. Default value is 4. - Capacity *int32 `json:"capacity,omitempty"` -} - -// Validate validates this azure Sql sku options -func (m *AzureSQLSkuOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureSqlSkuOptionsTypeNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Basic","Standard","Premium","GeneralPurpose","BusinessCritical","Hyperscale","DataWarehouse","Stretch"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlSkuOptionsTypeNamePropEnum = append(azureSqlSkuOptionsTypeNamePropEnum, v) - } -} - -const ( - - // AzureSQLSkuOptionsNameBasic captures enum value "Basic" - AzureSQLSkuOptionsNameBasic string = "Basic" - - // AzureSQLSkuOptionsNameStandard captures enum value "Standard" - AzureSQLSkuOptionsNameStandard string = "Standard" - - // AzureSQLSkuOptionsNamePremium captures enum value "Premium" - AzureSQLSkuOptionsNamePremium string = "Premium" - - // AzureSQLSkuOptionsNameGeneralPurpose captures enum value "GeneralPurpose" - AzureSQLSkuOptionsNameGeneralPurpose string = "GeneralPurpose" - - // AzureSQLSkuOptionsNameBusinessCritical captures enum value "BusinessCritical" - AzureSQLSkuOptionsNameBusinessCritical string = "BusinessCritical" - - // AzureSQLSkuOptionsNameHyperscale captures enum value "Hyperscale" - AzureSQLSkuOptionsNameHyperscale string = "Hyperscale" - - // AzureSQLSkuOptionsNameDataWarehouse captures enum value "DataWarehouse" - AzureSQLSkuOptionsNameDataWarehouse string = "DataWarehouse" - - // AzureSQLSkuOptionsNameStretch captures enum value "Stretch" - AzureSQLSkuOptionsNameStretch string = "Stretch" -) - -// prop value enum -func (m *AzureSQLSkuOptions) validateNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlSkuOptionsTypeNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLSkuOptions) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil - } - - // value enum - if err := m.validateNameEnum("name", "body", *m.Name); err != nil { - return err - } - - return nil -} - -var azureSqlSkuOptionsTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["S0","S1","S2","S3","S4","S6","S7","S9","S12","P1","P2","P4","P6","P11","P15","BC_DC","BC_Gen5","BC_M","GP_DC","GP_Fsv2","GP_Gen5","GP_S_Gen5","HS_DC","HS_Gen5","HS_S_Gen5","HS_MOPRMS","HS_PRMS","Free","Basic","Standard","Premium","DataWarehouse","Stretch"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureSqlSkuOptionsTypeTierTypePropEnum = append(azureSqlSkuOptionsTypeTierTypePropEnum, v) - } -} - -const ( - - // AzureSQLSkuOptionsTierTypeS0 captures enum value "S0" - AzureSQLSkuOptionsTierTypeS0 string = "S0" - - // AzureSQLSkuOptionsTierTypeS1 captures enum value "S1" - AzureSQLSkuOptionsTierTypeS1 string = "S1" - - // AzureSQLSkuOptionsTierTypeS2 captures enum value "S2" - AzureSQLSkuOptionsTierTypeS2 string = "S2" - - // AzureSQLSkuOptionsTierTypeS3 captures enum value "S3" - AzureSQLSkuOptionsTierTypeS3 string = "S3" - - // AzureSQLSkuOptionsTierTypeS4 captures enum value "S4" - AzureSQLSkuOptionsTierTypeS4 string = "S4" - - // AzureSQLSkuOptionsTierTypeS6 captures enum value "S6" - AzureSQLSkuOptionsTierTypeS6 string = "S6" - - // AzureSQLSkuOptionsTierTypeS7 captures enum value "S7" - AzureSQLSkuOptionsTierTypeS7 string = "S7" - - // AzureSQLSkuOptionsTierTypeS9 captures enum value "S9" - AzureSQLSkuOptionsTierTypeS9 string = "S9" - - // AzureSQLSkuOptionsTierTypeS12 captures enum value "S12" - AzureSQLSkuOptionsTierTypeS12 string = "S12" - - // AzureSQLSkuOptionsTierTypeP1 captures enum value "P1" - AzureSQLSkuOptionsTierTypeP1 string = "P1" - - // AzureSQLSkuOptionsTierTypeP2 captures enum value "P2" - AzureSQLSkuOptionsTierTypeP2 string = "P2" - - // AzureSQLSkuOptionsTierTypeP4 captures enum value "P4" - AzureSQLSkuOptionsTierTypeP4 string = "P4" - - // AzureSQLSkuOptionsTierTypeP6 captures enum value "P6" - AzureSQLSkuOptionsTierTypeP6 string = "P6" - - // AzureSQLSkuOptionsTierTypeP11 captures enum value "P11" - AzureSQLSkuOptionsTierTypeP11 string = "P11" - - // AzureSQLSkuOptionsTierTypeP15 captures enum value "P15" - AzureSQLSkuOptionsTierTypeP15 string = "P15" - - // AzureSQLSkuOptionsTierTypeBCDC captures enum value "BC_DC" - AzureSQLSkuOptionsTierTypeBCDC string = "BC_DC" - - // AzureSQLSkuOptionsTierTypeBCGen5 captures enum value "BC_Gen5" - AzureSQLSkuOptionsTierTypeBCGen5 string = "BC_Gen5" - - // AzureSQLSkuOptionsTierTypeBCM captures enum value "BC_M" - AzureSQLSkuOptionsTierTypeBCM string = "BC_M" - - // AzureSQLSkuOptionsTierTypeGPDC captures enum value "GP_DC" - AzureSQLSkuOptionsTierTypeGPDC string = "GP_DC" - - // AzureSQLSkuOptionsTierTypeGPFsv2 captures enum value "GP_Fsv2" - AzureSQLSkuOptionsTierTypeGPFsv2 string = "GP_Fsv2" - - // AzureSQLSkuOptionsTierTypeGPGen5 captures enum value "GP_Gen5" - AzureSQLSkuOptionsTierTypeGPGen5 string = "GP_Gen5" - - // AzureSQLSkuOptionsTierTypeGPSGen5 captures enum value "GP_S_Gen5" - AzureSQLSkuOptionsTierTypeGPSGen5 string = "GP_S_Gen5" - - // AzureSQLSkuOptionsTierTypeHSDC captures enum value "HS_DC" - AzureSQLSkuOptionsTierTypeHSDC string = "HS_DC" - - // AzureSQLSkuOptionsTierTypeHSGen5 captures enum value "HS_Gen5" - AzureSQLSkuOptionsTierTypeHSGen5 string = "HS_Gen5" - - // AzureSQLSkuOptionsTierTypeHSSGen5 captures enum value "HS_S_Gen5" - AzureSQLSkuOptionsTierTypeHSSGen5 string = "HS_S_Gen5" - - // AzureSQLSkuOptionsTierTypeHSMOPRMS captures enum value "HS_MOPRMS" - AzureSQLSkuOptionsTierTypeHSMOPRMS string = "HS_MOPRMS" - - // AzureSQLSkuOptionsTierTypeHSPRMS captures enum value "HS_PRMS" - AzureSQLSkuOptionsTierTypeHSPRMS string = "HS_PRMS" - - // AzureSQLSkuOptionsTierTypeFree captures enum value "Free" - AzureSQLSkuOptionsTierTypeFree string = "Free" - - // AzureSQLSkuOptionsTierTypeBasic captures enum value "Basic" - AzureSQLSkuOptionsTierTypeBasic string = "Basic" - - // AzureSQLSkuOptionsTierTypeStandard captures enum value "Standard" - AzureSQLSkuOptionsTierTypeStandard string = "Standard" - - // AzureSQLSkuOptionsTierTypePremium captures enum value "Premium" - AzureSQLSkuOptionsTierTypePremium string = "Premium" - - // AzureSQLSkuOptionsTierTypeDataWarehouse captures enum value "DataWarehouse" - AzureSQLSkuOptionsTierTypeDataWarehouse string = "DataWarehouse" - - // AzureSQLSkuOptionsTierTypeStretch captures enum value "Stretch" - AzureSQLSkuOptionsTierTypeStretch string = "Stretch" -) - -// prop value enum -func (m *AzureSQLSkuOptions) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureSqlSkuOptionsTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureSQLSkuOptions) validateTierType(formats strfmt.Registry) error { - if swag.IsZero(m.TierType) { // not required - return nil - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure Sql sku options based on context it is used -func (m *AzureSQLSkuOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSQLSkuOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSQLSkuOptions) UnmarshalBinary(b []byte) error { - var res AzureSQLSkuOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_storage_config_for_indexing.go b/v2/models/azure_storage_config_for_indexing.go deleted file mode 100644 index 68de4d7f..00000000 --- a/v2/models/azure_storage_config_for_indexing.go +++ /dev/null @@ -1,90 +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" -) - -// AzureStorageConfigForIndexing AzureStorageConfigForIndexing -// -// Storage config for indexing in Azure CE. -// -// swagger:model AzureStorageConfigForIndexing -type AzureStorageConfigForIndexing struct { - - // The container to be used for the tenant. - // Required: true - ContainerName *string `json:"containerName"` - - // The storage account to be used for the tenant. - // Required: true - StorageAccountName *string `json:"storageAccountName"` -} - -// Validate validates this azure storage config for indexing -func (m *AzureStorageConfigForIndexing) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContainerName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageAccountName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureStorageConfigForIndexing) validateContainerName(formats strfmt.Registry) error { - - if err := validate.Required("containerName", "body", m.ContainerName); err != nil { - return err - } - - return nil -} - -func (m *AzureStorageConfigForIndexing) validateStorageAccountName(formats strfmt.Registry) error { - - if err := validate.Required("storageAccountName", "body", m.StorageAccountName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure storage config for indexing based on context it is used -func (m *AzureStorageConfigForIndexing) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureStorageConfigForIndexing) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureStorageConfigForIndexing) UnmarshalBinary(b []byte) error { - var res AzureStorageConfigForIndexing - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_subscription.go b/v2/models/azure_subscription.go deleted file mode 100644 index 1c4dd19a..00000000 --- a/v2/models/azure_subscription.go +++ /dev/null @@ -1,71 +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" -) - -// AzureSubscription Specifies the details of an Azure subscription -// -// swagger:model AzureSubscription -type AzureSubscription struct { - - // Specifies the id of Azure subscription. - // Required: true - SubscriptionID *string `json:"subscriptionId"` -} - -// Validate validates this azure subscription -func (m *AzureSubscription) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSubscriptionID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureSubscription) validateSubscriptionID(formats strfmt.Registry) error { - - if err := validate.Required("subscriptionId", "body", m.SubscriptionID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure subscription based on context it is used -func (m *AzureSubscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureSubscription) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureSubscription) UnmarshalBinary(b []byte) error { - var res AzureSubscription - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_target_category.go b/v2/models/azure_target_category.go deleted file mode 100644 index 3c825fa4..00000000 --- a/v2/models/azure_target_category.go +++ /dev/null @@ -1,110 +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" -) - -// AzureTargetCategory Azure Target Category -// -// Specifies the category of Azure External Target. -// -// swagger:model AzureTargetCategory -type AzureTargetCategory struct { - - // Specifies the category of Azure External Target. - // Enum: ["Azure","AzureStandard","AzureGovCloud"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this azure target category -func (m *AzureTargetCategory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureTargetCategoryTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","AzureStandard","AzureGovCloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureTargetCategoryTypeEnumPropEnum = append(azureTargetCategoryTypeEnumPropEnum, v) - } -} - -const ( - - // AzureTargetCategoryEnumAzure captures enum value "Azure" - AzureTargetCategoryEnumAzure string = "Azure" - - // AzureTargetCategoryEnumAzureStandard captures enum value "AzureStandard" - AzureTargetCategoryEnumAzureStandard string = "AzureStandard" - - // AzureTargetCategoryEnumAzureGovCloud captures enum value "AzureGovCloud" - AzureTargetCategoryEnumAzureGovCloud string = "AzureGovCloud" -) - -// prop value enum -func (m *AzureTargetCategory) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureTargetCategoryTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureTargetCategory) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure target category based on context it is used -func (m *AzureTargetCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTargetCategory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTargetCategory) UnmarshalBinary(b []byte) error { - var res AzureTargetCategory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_target_config.go b/v2/models/azure_target_config.go deleted file mode 100644 index 65644bad..00000000 --- a/v2/models/azure_target_config.go +++ /dev/null @@ -1,217 +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" -) - -// AzureTargetConfig Azure Target Configuration -// -// # Specifies the configuration for adding Azure as replication target -// -// swagger:model AzureTargetConfig -type AzureTargetConfig struct { - - // Specifies the source id of the Azure protection source registered on Cohesity cluster. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the Azure Replication target. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies id of the Azure resource group used to filter regions in UI. - ResourceGroup *int64 `json:"resourceGroup,omitempty"` - - // Specifies name of the Azure resource group used to filter regions in UI. - // Read Only: true - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - - // Specifies id of the storage account of Azure replication target which will contain storage container. - // Read Only: true - StorageAccount *int64 `json:"storageAccount,omitempty"` - - // Specifies name of the storage account of Azure replication target which will contain storage container. - // Read Only: true - StorageAccountName *string `json:"storageAccountName,omitempty"` - - // Specifies id of the storage container of Azure Replication target. - // Read Only: true - StorageContainer *int64 `json:"storageContainer,omitempty"` - - // Specifies name of the storage container of Azure Replication target. - // Read Only: true - StorageContainerName *string `json:"storageContainerName,omitempty"` - - // Specifies id of the storage resource group of Azure Replication target. - // Read Only: true - StorageResourceGroup *int64 `json:"storageResourceGroup,omitempty"` - - // Specifies name of the storage resource group of Azure Replication target. - // Read Only: true - StorageResourceGroupName *string `json:"storageResourceGroupName,omitempty"` -} - -// Validate validates this azure target config -func (m *AzureTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetConfig) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure target config based on the context it is used -func (m *AzureTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceGroupName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccountName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainerName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroupName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetConfig) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateResourceGroupName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "resourceGroupName", "body", m.ResourceGroupName); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageAccount", "body", m.StorageAccount); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageAccountName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageAccountName", "body", m.StorageAccountName); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageContainer", "body", m.StorageContainer); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageContainerName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageContainerName", "body", m.StorageContainerName); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageResourceGroup", "body", m.StorageResourceGroup); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetConfig) contextValidateStorageResourceGroupName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageResourceGroupName", "body", m.StorageResourceGroupName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTargetConfig) UnmarshalBinary(b []byte) error { - var res AzureTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_target_params_for_recover_azure_sql.go b/v2/models/azure_target_params_for_recover_azure_sql.go deleted file mode 100644 index 1673b2ce..00000000 --- a/v2/models/azure_target_params_for_recover_azure_sql.go +++ /dev/null @@ -1,127 +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" -) - -// AzureTargetParamsForRecoverAzureSQL Specifies the recovery target params for Azure SQL target config. -// -// swagger:model AzureTargetParamsForRecoverAzureSql -type AzureTargetParamsForRecoverAzureSQL struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the Azure SQL instances will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAzureSQLNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this azure target params for recover azure Sql -func (m *AzureTargetParamsForRecoverAzureSQL) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverAzureSQL) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetParamsForRecoverAzureSQL) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure target params for recover azure Sql based on the context it is used -func (m *AzureTargetParamsForRecoverAzureSQL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverAzureSQL) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverAzureSQL) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverAzureSQL) UnmarshalBinary(b []byte) error { - var res AzureTargetParamsForRecoverAzureSQL - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_target_params_for_recover_file_and_folder.go b/v2/models/azure_target_params_for_recover_file_and_folder.go deleted file mode 100644 index 9eabd71d..00000000 --- a/v2/models/azure_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// AzureTargetParamsForRecoverFileAndFolder Azure Target Params for Recover Files -// -// Specifies the parameters for an Azure files and folders recovery target. -// -// swagger:model AzureTargetParamsForRecoverFileAndFolder -type AzureTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to overwrite the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original file/folder attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the objects encounters an error. Default is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *AzureRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *AzureRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this azure target params for recover file and folder -func (m *AzureTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure target params for recover file and folder based on the context it is used -func (m *AzureTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res AzureTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_target_params_for_recover_vm.go b/v2/models/azure_target_params_for_recover_vm.go deleted file mode 100644 index db871bb9..00000000 --- a/v2/models/azure_target_params_for_recover_vm.go +++ /dev/null @@ -1,168 +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" -) - -// AzureTargetParamsForRecoverVM Azure Recovery Target Params -// -// Specifies the parameters for an Azure recovery target. -// -// swagger:model AzureTargetParamsForRecoverVm -type AzureTargetParamsForRecoverVM struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *AzureVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` -} - -// Validate validates this azure target params for recover Vm -func (m *AzureTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure target params for recover Vm based on the context it is used -func (m *AzureTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *AzureTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res AzureTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_tier.go b/v2/models/azure_tier.go deleted file mode 100644 index 378d532e..00000000 --- a/v2/models/azure_tier.go +++ /dev/null @@ -1,159 +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" -) - -// AzureTier Specifies the settings for a Azure tier. -// -// swagger:model AzureTier -type AzureTier struct { - CommonCloudTierSettings - - // Specifies the Azure tier types. - // Required: true - // Enum: ["kAzureTierHot","kAzureTierCool","kAzureTierArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *AzureTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m AzureTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this azure tier -func (m *AzureTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureTierHot","kAzureTierCool","kAzureTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureTierTypeTierTypePropEnum = append(azureTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *AzureTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this azure tier based on the context it is used -func (m *AzureTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTier) UnmarshalBinary(b []byte) error { - var res AzureTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_tiering_levels.go b/v2/models/azure_tiering_levels.go deleted file mode 100644 index 2e918213..00000000 --- a/v2/models/azure_tiering_levels.go +++ /dev/null @@ -1,110 +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" -) - -// AzureTieringLevels Azure Tiering Levels. -// -// # Azure Tiering Levels -// -// swagger:model AzureTieringLevels -type AzureTieringLevels struct { - - // Azure Tiering Levels - // Enum: ["kAzureTierHot","kAzureTierCool","kAzureTierArchive"] - Type string `json:"type,omitempty"` -} - -// Validate validates this azure tiering levels -func (m *AzureTieringLevels) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureTieringLevelsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureTierHot","kAzureTierCool","kAzureTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureTieringLevelsTypeTypePropEnum = append(azureTieringLevelsTypeTypePropEnum, v) - } -} - -const ( - - // AzureTieringLevelsTypeKAzureTierHot captures enum value "kAzureTierHot" - AzureTieringLevelsTypeKAzureTierHot string = "kAzureTierHot" - - // AzureTieringLevelsTypeKAzureTierCool captures enum value "kAzureTierCool" - AzureTieringLevelsTypeKAzureTierCool string = "kAzureTierCool" - - // AzureTieringLevelsTypeKAzureTierArchive captures enum value "kAzureTierArchive" - AzureTieringLevelsTypeKAzureTierArchive string = "kAzureTierArchive" -) - -// prop value enum -func (m *AzureTieringLevels) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureTieringLevelsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureTieringLevels) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure tiering levels based on context it is used -func (m *AzureTieringLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTieringLevels) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTieringLevels) UnmarshalBinary(b []byte) error { - var res AzureTieringLevels - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_tiering_storage_class.go b/v2/models/azure_tiering_storage_class.go deleted file mode 100644 index a5fc937f..00000000 --- a/v2/models/azure_tiering_storage_class.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureTieringStorageClass Azure Tiering Storage Class -// -// Specifies the storage class of Azure External Target of tiering purpose type. -// -// swagger:model AzureTieringStorageClass -type AzureTieringStorageClass struct { - - // Specifies the storage class of Azure External Target of tiering purpose type. - // Enum: ["AzureHotBlob"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this azure tiering storage class -func (m *AzureTieringStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var azureTieringStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AzureHotBlob"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - azureTieringStorageClassTypeEnumPropEnum = append(azureTieringStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // AzureTieringStorageClassEnumAzureHotBlob captures enum value "AzureHotBlob" - AzureTieringStorageClassEnumAzureHotBlob string = "AzureHotBlob" -) - -// prop value enum -func (m *AzureTieringStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, azureTieringStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AzureTieringStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this azure tiering storage class based on context it is used -func (m *AzureTieringStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTieringStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTieringStorageClass) UnmarshalBinary(b []byte) error { - var res AzureTieringStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_tiers.go b/v2/models/azure_tiers.go deleted file mode 100644 index 700b2c26..00000000 --- a/v2/models/azure_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AzureTiers Specifies Azure tiers. -// -// swagger:model AzureTiers -type AzureTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*AzureTier `json:"tiers"` -} - -// Validate validates this azure tiers -func (m *AzureTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this azure tiers based on the context it is used -func (m *AzureTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureTiers) UnmarshalBinary(b []byte) error { - var res AzureTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/azure_vm_recovery_target_config.go b/v2/models/azure_vm_recovery_target_config.go deleted file mode 100644 index aa7987eb..00000000 --- a/v2/models/azure_vm_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// AzureVMRecoveryTargetConfig Azure VMs Recovery Target Config. -// -// Specifies the target object parameters to recover Azure vms. -// -// swagger:model AzureVmRecoveryTargetConfig -type AzureVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAzureVMNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. - OriginalSourceConfig *RecoverAzureVMOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this azure Vm recovery target config -func (m *AzureVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *AzureVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *AzureVMRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this azure Vm recovery target config based on the context it is used -func (m *AzureVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AzureVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *AzureVMRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AzureVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res AzureVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_attempt.go b/v2/models/backup_attempt.go deleted file mode 100644 index 6f512d4b..00000000 --- a/v2/models/backup_attempt.go +++ /dev/null @@ -1,217 +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" -) - -// BackupAttempt Attempt information for an object. -// -// Specifies a backup attempt for an object. -// -// swagger:model BackupAttempt -type BackupAttempt struct { - - // Specifies the start time of attempt in Unix epoch Timestamp(in microseconds) for an object. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of attempt in Unix epoch Timestamp(in microseconds) for an object. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the time at which the backup task was admitted to run in Unix epoch Timestamp(in microseconds) for an object. - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // Specifies the time when gatekeeper permit is granted to the backup task. If the backup task is rescheduled due to errors, the field is updated to the time when permit is granted again. - PermitGrantTimeUsecs *int64 `json:"permitGrantTimeUsecs,omitempty"` - - // Specifies the duration between the startTime and when gatekeeper permit is granted to the backup task. If the backup task is rescheduled due to errors, the field is updated considering the time when permit is granted again. Queue duration = PermitGrantTimeUsecs - StartTimeUsecs - QueueDurationUsecs *int64 `json:"queueDurationUsecs,omitempty"` - - // Specifies the time at which the source snapshot was taken in Unix epoch Timestamp(in microseconds) for an object. - SnapshotCreationTimeUsecs *int64 `json:"snapshotCreationTimeUsecs,omitempty"` - - // Status of the attempt for an object. '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. 'Paused' indicates that the ongoing run has been paused. 'Pausing' indicates that the ongoing run is in the process of being paused. 'Resuming' indicates that the already paused run is in the process of being running again. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Statistics about backup data for an object. - Stats *BackupDataStats `json:"stats,omitempty"` - - // Progress monitor task for an object.. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // A message about the error if encountered while performing backup. - Message *string `json:"message,omitempty"` -} - -// Validate validates this backup attempt -func (m *BackupAttempt) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var backupAttemptTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupAttemptTypeStatusPropEnum = append(backupAttemptTypeStatusPropEnum, v) - } -} - -const ( - - // BackupAttemptStatusAccepted captures enum value "Accepted" - BackupAttemptStatusAccepted string = "Accepted" - - // BackupAttemptStatusRunning captures enum value "Running" - BackupAttemptStatusRunning string = "Running" - - // BackupAttemptStatusCanceled captures enum value "Canceled" - BackupAttemptStatusCanceled string = "Canceled" - - // BackupAttemptStatusCanceling captures enum value "Canceling" - BackupAttemptStatusCanceling string = "Canceling" - - // BackupAttemptStatusFailed captures enum value "Failed" - BackupAttemptStatusFailed string = "Failed" - - // BackupAttemptStatusMissed captures enum value "Missed" - BackupAttemptStatusMissed string = "Missed" - - // BackupAttemptStatusSucceeded captures enum value "Succeeded" - BackupAttemptStatusSucceeded string = "Succeeded" - - // BackupAttemptStatusSucceededWithWarning captures enum value "SucceededWithWarning" - BackupAttemptStatusSucceededWithWarning string = "SucceededWithWarning" - - // BackupAttemptStatusOnHold captures enum value "OnHold" - BackupAttemptStatusOnHold string = "OnHold" - - // BackupAttemptStatusFinalizing captures enum value "Finalizing" - BackupAttemptStatusFinalizing string = "Finalizing" - - // BackupAttemptStatusSkipped captures enum value "Skipped" - BackupAttemptStatusSkipped string = "Skipped" - - // BackupAttemptStatusPaused captures enum value "Paused" - BackupAttemptStatusPaused string = "Paused" -) - -// prop value enum -func (m *BackupAttempt) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupAttemptTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupAttempt) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *BackupAttempt) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this backup attempt based on the context it is used -func (m *BackupAttempt) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupAttempt) 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 -} - -// MarshalBinary interface implementation -func (m *BackupAttempt) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupAttempt) UnmarshalBinary(b []byte) error { - var res BackupAttempt - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_data_stats.go b/v2/models/backup_data_stats.go deleted file mode 100644 index 044da6f6..00000000 --- a/v2/models/backup_data_stats.go +++ /dev/null @@ -1,58 +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" -) - -// BackupDataStats Local snapshot statistics. -// -// Specifies statistics about local snapshot. -// -// swagger:model BackupDataStats -type BackupDataStats struct { - - // Specifies total logical size of object(s) in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies total size of data in bytes written after taking backup. - BytesWritten *int64 `json:"bytesWritten,omitempty"` - - // Specifies total logical bytes read for creating the snapshot. - BytesRead *int64 `json:"bytesRead,omitempty"` -} - -// Validate validates this backup data stats -func (m *BackupDataStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup data stats based on context it is used -func (m *BackupDataStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupDataStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupDataStats) UnmarshalBinary(b []byte) error { - var res BackupDataStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_error_class.go b/v2/models/backup_error_class.go deleted file mode 100644 index 89dee03a..00000000 --- a/v2/models/backup_error_class.go +++ /dev/null @@ -1,119 +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" -) - -// BackupErrorClass Backup Error Class. -// -// Specifies the class for an error which occurred during a backup. -// -// swagger:model BackupErrorClass -type BackupErrorClass struct { - - // Specifies a class of error. - // Enum: ["File","Folder","Persistent","Intermittent","Discovery","Ingestion"] - Value string `json:"value,omitempty"` -} - -// Validate validates this backup error class -func (m *BackupErrorClass) 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 backupErrorClassTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Folder","Persistent","Intermittent","Discovery","Ingestion"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupErrorClassTypeValuePropEnum = append(backupErrorClassTypeValuePropEnum, v) - } -} - -const ( - - // BackupErrorClassValueFile captures enum value "File" - BackupErrorClassValueFile string = "File" - - // BackupErrorClassValueFolder captures enum value "Folder" - BackupErrorClassValueFolder string = "Folder" - - // BackupErrorClassValuePersistent captures enum value "Persistent" - BackupErrorClassValuePersistent string = "Persistent" - - // BackupErrorClassValueIntermittent captures enum value "Intermittent" - BackupErrorClassValueIntermittent string = "Intermittent" - - // BackupErrorClassValueDiscovery captures enum value "Discovery" - BackupErrorClassValueDiscovery string = "Discovery" - - // BackupErrorClassValueIngestion captures enum value "Ingestion" - BackupErrorClassValueIngestion string = "Ingestion" -) - -// prop value enum -func (m *BackupErrorClass) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupErrorClassTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupErrorClass) 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 backup error class based on context it is used -func (m *BackupErrorClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupErrorClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupErrorClass) UnmarshalBinary(b []byte) error { - var res BackupErrorClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_generic_stats.go b/v2/models/backup_generic_stats.go deleted file mode 100644 index 2ab157ba..00000000 --- a/v2/models/backup_generic_stats.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupGenericStats Specifies the stats which are generic for all adapters. -// -// swagger:model BackupGenericStats -type BackupGenericStats struct { - - // Specifies the number of errors for this run. - NumErrors *int64 `json:"numErrors,omitempty"` - - // Specifies the amount of data which has to be ingested in bytes. - RemainingDataIngested *int64 `json:"remainingDataIngested,omitempty"` - - // Specifies the amount of data which has been ingested in bytes. - DataIngested *int64 `json:"dataIngested,omitempty"` - - // Specifies the rate at which data is being ingested in bytes per minute. - DataIngestionRate *int64 `json:"dataIngestionRate,omitempty"` - - // Specifies the time in which backup should finish in minutes. - EstimatedBackupTime *int64 `json:"estimatedBackupTime,omitempty"` - - // Divides the errors into classes for better understanding for the user. - ErrorClasses []*ErrorClass `json:"errorClasses"` -} - -// Validate validates this backup generic stats -func (m *BackupGenericStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateErrorClasses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupGenericStats) validateErrorClasses(formats strfmt.Registry) error { - if swag.IsZero(m.ErrorClasses) { // not required - return nil - } - - for i := 0; i < len(m.ErrorClasses); i++ { - if swag.IsZero(m.ErrorClasses[i]) { // not required - continue - } - - if m.ErrorClasses[i] != nil { - if err := m.ErrorClasses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("errorClasses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("errorClasses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup generic stats based on the context it is used -func (m *BackupGenericStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateErrorClasses(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupGenericStats) contextValidateErrorClasses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ErrorClasses); i++ { - - if m.ErrorClasses[i] != nil { - - if swag.IsZero(m.ErrorClasses[i]) { // not required - return nil - } - - if err := m.ErrorClasses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("errorClasses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("errorClasses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupGenericStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupGenericStats) UnmarshalBinary(b []byte) error { - var res BackupGenericStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_nas_stats.go b/v2/models/backup_nas_stats.go deleted file mode 100644 index a582c945..00000000 --- a/v2/models/backup_nas_stats.go +++ /dev/null @@ -1,71 +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" -) - -// BackupNasStats Specifies the stats which are specific for NAS adapter. -// -// swagger:model BackupNasStats -type BackupNasStats struct { - - // Specifies the number of files which have already been discovered. - FilesDiscovered *int64 `json:"filesDiscovered,omitempty"` - - // Specifies the rate at which files are being discovered in files per minute. - FileDiscoveryRate *int64 `json:"fileDiscoveryRate,omitempty"` - - // Specifies the time taken for file discovery. - FileDiscoveryTime *int64 `json:"fileDiscoveryTime,omitempty"` - - // Specifies the number of files which have been analyzed. - FilesAnalyzed *int64 `json:"filesAnalyzed,omitempty"` - - // Specifies the rate at which files are being analyzed in files per minute. - FileAnalysisRate *int64 `json:"fileAnalysisRate,omitempty"` - - // Specifies the number of files which have been ingested. - FilesIngested *int64 `json:"filesIngested,omitempty"` - - // Specifies the rate at which files are being ingested in files per minute. - FileIngestionRate *int64 `json:"fileIngestionRate,omitempty"` - - // Specifies the run time for directory walker in seconds. - WalkerRunTime *int64 `json:"walkerRunTime,omitempty"` -} - -// Validate validates this backup nas stats -func (m *BackupNasStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this backup nas stats based on context it is used -func (m *BackupNasStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupNasStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupNasStats) UnmarshalBinary(b []byte) error { - var res BackupNasStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_policy.go b/v2/models/backup_policy.go deleted file mode 100644 index 96bca9cd..00000000 --- a/v2/models/backup_policy.go +++ /dev/null @@ -1,377 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// BackupPolicy Backup Schedule and Retention. -// -// Specifies the backup schedule and retentions of a Protection Policy. -// -// swagger:model BackupPolicy -type BackupPolicy struct { - - // Specifies the Incremental and Full policy settings and also the common Retention policy settings. - // Required: true - Regular *RegularBackupPolicy `json:"regular"` - - // Specifies the Log backup schedule of a Protection Policy. - Log *LogBackupPolicy `json:"log,omitempty"` - - // Specifies the BMR backup schedule of a Protection Policy. - Bmr *BmrBackupPolicy `json:"bmr,omitempty"` - - // Specifies the settings for CDP (Continious Data Protection) Protection policy. - Cdp *CdpBackupPolicy `json:"cdp,omitempty"` - - // Specifies the settings for Storage Array Snapshot Protection policy. - StorageArraySnapshot *StorageArraySnapshotBackupPolicy `json:"storageArraySnapshot,omitempty"` - - // Specifies the backup timeouts for different type of runs(kFull, kRegular etc.). - RunTimeouts []*CancellationTimeoutParams `json:"runTimeouts"` -} - -// Validate validates this backup policy -func (m *BackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegular(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLog(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBmr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshot(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicy) validateRegular(formats strfmt.Registry) error { - - if err := validate.Required("regular", "body", m.Regular); err != nil { - return err - } - - if m.Regular != nil { - if err := m.Regular.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regular") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regular") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) validateLog(formats strfmt.Registry) error { - if swag.IsZero(m.Log) { // not required - return nil - } - - if m.Log != nil { - if err := m.Log.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) validateBmr(formats strfmt.Registry) error { - if swag.IsZero(m.Bmr) { // not required - return nil - } - - if m.Bmr != nil { - if err := m.Bmr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bmr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bmr") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) validateCdp(formats strfmt.Registry) error { - if swag.IsZero(m.Cdp) { // not required - return nil - } - - if m.Cdp != nil { - if err := m.Cdp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdp") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) validateStorageArraySnapshot(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshot) { // not required - return nil - } - - if m.StorageArraySnapshot != nil { - if err := m.StorageArraySnapshot.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshot") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) validateRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeouts); i++ { - if swag.IsZero(m.RunTimeouts[i]) { // not required - continue - } - - if m.RunTimeouts[i] != nil { - if err := m.RunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup policy based on the context it is used -func (m *BackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegular(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBmr(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshot(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupPolicy) contextValidateRegular(ctx context.Context, formats strfmt.Registry) error { - - if m.Regular != nil { - - if err := m.Regular.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regular") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regular") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) contextValidateLog(ctx context.Context, formats strfmt.Registry) error { - - if m.Log != nil { - - if swag.IsZero(m.Log) { // not required - return nil - } - - if err := m.Log.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) contextValidateBmr(ctx context.Context, formats strfmt.Registry) error { - - if m.Bmr != nil { - - if swag.IsZero(m.Bmr) { // not required - return nil - } - - if err := m.Bmr.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bmr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bmr") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) contextValidateCdp(ctx context.Context, formats strfmt.Registry) error { - - if m.Cdp != nil { - - if swag.IsZero(m.Cdp) { // not required - return nil - } - - if err := m.Cdp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdp") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) contextValidateStorageArraySnapshot(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshot != nil { - - if swag.IsZero(m.StorageArraySnapshot) { // not required - return nil - } - - if err := m.StorageArraySnapshot.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshot") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshot") - } - return err - } - } - - return nil -} - -func (m *BackupPolicy) contextValidateRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeouts); i++ { - - if m.RunTimeouts[i] != nil { - - if swag.IsZero(m.RunTimeouts[i]) { // not required - return nil - } - - if err := m.RunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupPolicy) UnmarshalBinary(b []byte) error { - var res BackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_run.go b/v2/models/backup_run.go deleted file mode 100644 index 1ec82755..00000000 --- a/v2/models/backup_run.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupRun Snapshot run information for an object. -// -// Specifies information about backup run for an object. -// -// swagger:model BackupRun -type BackupRun struct { - - // Snapshot information for an object. - SnapshotInfo *SnapshotInfo `json:"snapshotInfo,omitempty"` - - // Failed backup attempts for an object. - FailedAttempts []*BackupAttempt `json:"failedAttempts"` -} - -// Validate validates this backup run -func (m *BackupRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailedAttempts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRun) validateSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotInfo) { // not required - return nil - } - - if m.SnapshotInfo != nil { - if err := m.SnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupRun) validateFailedAttempts(formats strfmt.Registry) error { - if swag.IsZero(m.FailedAttempts) { // not required - return nil - } - - for i := 0; i < len(m.FailedAttempts); i++ { - if swag.IsZero(m.FailedAttempts[i]) { // not required - continue - } - - if m.FailedAttempts[i] != nil { - if err := m.FailedAttempts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup run based on the context it is used -func (m *BackupRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFailedAttempts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRun) contextValidateSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotInfo != nil { - - if swag.IsZero(m.SnapshotInfo) { // not required - return nil - } - - if err := m.SnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotInfo") - } - return err - } - } - - return nil -} - -func (m *BackupRun) contextValidateFailedAttempts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailedAttempts); i++ { - - if m.FailedAttempts[i] != nil { - - if swag.IsZero(m.FailedAttempts[i]) { // not required - return nil - } - - if err := m.FailedAttempts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRun) UnmarshalBinary(b []byte) error { - var res BackupRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_run_progress_info.go b/v2/models/backup_run_progress_info.go deleted file mode 100644 index fc5854b8..00000000 --- a/v2/models/backup_run_progress_info.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupRunProgressInfo Specifies the progress of a local backup run. -// -// swagger:model BackupRunProgressInfo -type BackupRunProgressInfo struct { - ProgressTaskInfo - - // Specifies progress for objects. - Objects []*ObjectProgressInfo `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupRunProgressInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProgressTaskInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProgressTaskInfo = aO0 - - // AO1 - var dataAO1 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupRunProgressInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProgressTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup run progress info -func (m *BackupRunProgressInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunProgressInfo) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup run progress info based on the context it is used -func (m *BackupRunProgressInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunProgressInfo) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupRunProgressInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRunProgressInfo) UnmarshalBinary(b []byte) error { - var res BackupRunProgressInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_run_stats_info.go b/v2/models/backup_run_stats_info.go deleted file mode 100644 index 75c08333..00000000 --- a/v2/models/backup_run_stats_info.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupRunStatsInfo Specifies the stats of a local backup run. -// -// swagger:model BackupRunStatsInfo -type BackupRunStatsInfo struct { - StatsTaskInfo - - // Specifies stats for objects. - Objects []*ObjectStatsInfo `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupRunStatsInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 StatsTaskInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.StatsTaskInfo = aO0 - - // AO1 - var dataAO1 struct { - Objects []*ObjectStatsInfo `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupRunStatsInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.StatsTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*ObjectStatsInfo `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup run stats info -func (m *BackupRunStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunStatsInfo) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this backup run stats info based on the context it is used -func (m *BackupRunStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunStatsInfo) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupRunStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRunStatsInfo) UnmarshalBinary(b []byte) error { - var res BackupRunStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/backup_run_summary.go b/v2/models/backup_run_summary.go deleted file mode 100644 index 0d5c985f..00000000 --- a/v2/models/backup_run_summary.go +++ /dev/null @@ -1,401 +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" -) - -// BackupRunSummary Summary information for local snapshot run. -// -// Specifies summary information about local snapshot run across all objects. -// -// swagger:model BackupRunSummary -type BackupRunSummary struct { - - // Type of Protection Group run. 'kRegular' indicates an incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a kRegular schedule captures all the blocks. 'kFull' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. 'kLog' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. 'kSystem' indicates system volume backup. It produces an image for bare metal recovery. 'kStorageArraySnapshot' indicates storage array snapshot backup. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Indicated if SLA has been violated for this run. - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - // Specifies the start time of backup run in Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of backup run in Unix epoch Timestamp(in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Status of the backup run. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Message about the backup run. - Messages []string `json:"messages"` - - // Specifies the count of objects for which backup was successful. - SuccessfulObjectsCount *int64 `json:"successfulObjectsCount,omitempty"` - - // Specifies the count of objects for which backup failed. - FailedObjectsCount *int64 `json:"failedObjectsCount,omitempty"` - - // Specifies the count of objects for which backup was cancelled. - CancelledObjectsCount *int64 `json:"cancelledObjectsCount,omitempty"` - - // Specifies the count of objects for which backup was skipped. - SkippedObjectsCount *int64 `json:"skippedObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup was successful. - SuccessfulAppObjectsCount *int32 `json:"successfulAppObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup failed. - FailedAppObjectsCount *int32 `json:"failedAppObjectsCount,omitempty"` - - // Specifies the count of app objects for which backup was cancelled. - CancelledAppObjectsCount *int32 `json:"cancelledAppObjectsCount,omitempty"` - - // Statistics about local snapshot (across all objects). - LocalSnapshotStats *BackupDataStats `json:"localSnapshotStats,omitempty"` - - // Progress monitor task for indexing. - IndexingTaskID *string `json:"indexingTaskId,omitempty"` - - // Progress monitor task id for local backup run. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Stats task id for local backup run. - StatsTaskID *string `json:"statsTaskId,omitempty"` - - // This field is deprecated. Use DataLockConstraints field instead. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Task ID for a local protection run. - LocalTaskID *string `json:"localTaskId,omitempty"` - - // Specifies the dataLock constraints for the archival target. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` -} - -// Validate validates this backup run summary -func (m *BackupRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalSnapshotStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var backupRunSummaryTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunSummaryTypeRunTypePropEnum = append(backupRunSummaryTypeRunTypePropEnum, v) - } -} - -const ( - - // BackupRunSummaryRunTypeKRegular captures enum value "kRegular" - BackupRunSummaryRunTypeKRegular string = "kRegular" - - // BackupRunSummaryRunTypeKFull captures enum value "kFull" - BackupRunSummaryRunTypeKFull string = "kFull" - - // BackupRunSummaryRunTypeKLog captures enum value "kLog" - BackupRunSummaryRunTypeKLog string = "kLog" - - // BackupRunSummaryRunTypeKSystem captures enum value "kSystem" - BackupRunSummaryRunTypeKSystem string = "kSystem" - - // BackupRunSummaryRunTypeKHydrateCDP captures enum value "kHydrateCDP" - BackupRunSummaryRunTypeKHydrateCDP string = "kHydrateCDP" - - // BackupRunSummaryRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - BackupRunSummaryRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *BackupRunSummary) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunSummaryTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRunSummary) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -var backupRunSummaryTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunSummaryTypeStatusPropEnum = append(backupRunSummaryTypeStatusPropEnum, v) - } -} - -const ( - - // BackupRunSummaryStatusAccepted captures enum value "Accepted" - BackupRunSummaryStatusAccepted string = "Accepted" - - // BackupRunSummaryStatusRunning captures enum value "Running" - BackupRunSummaryStatusRunning string = "Running" - - // BackupRunSummaryStatusCanceled captures enum value "Canceled" - BackupRunSummaryStatusCanceled string = "Canceled" - - // BackupRunSummaryStatusCanceling captures enum value "Canceling" - BackupRunSummaryStatusCanceling string = "Canceling" - - // BackupRunSummaryStatusFailed captures enum value "Failed" - BackupRunSummaryStatusFailed string = "Failed" - - // BackupRunSummaryStatusMissed captures enum value "Missed" - BackupRunSummaryStatusMissed string = "Missed" - - // BackupRunSummaryStatusSucceeded captures enum value "Succeeded" - BackupRunSummaryStatusSucceeded string = "Succeeded" - - // BackupRunSummaryStatusSucceededWithWarning captures enum value "SucceededWithWarning" - BackupRunSummaryStatusSucceededWithWarning string = "SucceededWithWarning" - - // BackupRunSummaryStatusOnHold captures enum value "OnHold" - BackupRunSummaryStatusOnHold string = "OnHold" - - // BackupRunSummaryStatusFinalizing captures enum value "Finalizing" - BackupRunSummaryStatusFinalizing string = "Finalizing" - - // BackupRunSummaryStatusSkipped captures enum value "Skipped" - BackupRunSummaryStatusSkipped string = "Skipped" - - // BackupRunSummaryStatusPaused captures enum value "Paused" - BackupRunSummaryStatusPaused string = "Paused" -) - -// prop value enum -func (m *BackupRunSummary) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunSummaryTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRunSummary) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *BackupRunSummary) validateLocalSnapshotStats(formats strfmt.Registry) error { - if swag.IsZero(m.LocalSnapshotStats) { // not required - return nil - } - - if m.LocalSnapshotStats != nil { - if err := m.LocalSnapshotStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotStats") - } - return err - } - } - - return nil -} - -var backupRunSummaryTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - backupRunSummaryTypeDataLockPropEnum = append(backupRunSummaryTypeDataLockPropEnum, v) - } -} - -const ( - - // BackupRunSummaryDataLockCompliance captures enum value "Compliance" - BackupRunSummaryDataLockCompliance string = "Compliance" - - // BackupRunSummaryDataLockAdministrative captures enum value "Administrative" - BackupRunSummaryDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *BackupRunSummary) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, backupRunSummaryTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BackupRunSummary) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -func (m *BackupRunSummary) validateDataLockConstraints(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// ContextValidate validate this backup run summary based on the context it is used -func (m *BackupRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalSnapshotStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupRunSummary) contextValidateLocalSnapshotStats(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalSnapshotStats != nil { - - if swag.IsZero(m.LocalSnapshotStats) { // not required - return nil - } - - if err := m.LocalSnapshotStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotStats") - } - return err - } - } - - return nil -} - -func (m *BackupRunSummary) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupRunSummary) UnmarshalBinary(b []byte) error { - var res BackupRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bandwidth_limit.go b/v2/models/bandwidth_limit.go deleted file mode 100644 index 9fa4870c..00000000 --- a/v2/models/bandwidth_limit.go +++ /dev/null @@ -1,114 +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" -) - -// BandwidthLimit Bandwidth Limit -// -// Specifies bandwidth limit for limiting the data transfer rate between the SaaS Connection and Helios to be enforced during the specified daily time period for the specified days of the week. -// -// swagger:model BandwidthLimit -type BandwidthLimit struct { - - // Specifies the value for the specified time period. The value is specified in bytes per second. - BytesPerSecond *int64 `json:"bytesPerSecond,omitempty"` - - // Specifies a daily time period and days of the week when the bandwidth rate should be set. - TimePeriods *TimeOfAWeek `json:"timePeriods,omitempty"` -} - -// Validate validates this bandwidth limit -func (m *BandwidthLimit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimePeriods(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimit) validateTimePeriods(formats strfmt.Registry) error { - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if m.TimePeriods != nil { - if err := m.TimePeriods.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bandwidth limit based on the context it is used -func (m *BandwidthLimit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimePeriods(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthLimit) contextValidateTimePeriods(ctx context.Context, formats strfmt.Registry) error { - - if m.TimePeriods != nil { - - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if err := m.TimePeriods.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BandwidthLimit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BandwidthLimit) UnmarshalBinary(b []byte) error { - var res BandwidthLimit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bandwidth_throttling.go b/v2/models/bandwidth_throttling.go deleted file mode 100644 index 9b9e519a..00000000 --- a/v2/models/bandwidth_throttling.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BandwidthThrottling Bandwidth Throttling -// -// Specifies settings for limiting the data transfer rate between the local and remote Clusters. -// -// swagger:model BandwidthThrottling -type BandwidthThrottling struct { - - // Specifies the maximum allowed data transfer rate between the local Cluster and remote Clusters. - RateLimitBytesPerSec *int64 `json:"RateLimitBytesPerSec,omitempty"` - - // Specifies a time zone for the specified time period. - Timezone *string `json:"timezone,omitempty"` - - // Specifies the max rate limit at which we upload the data. - BandwidthLimitOverrides []*BandwidthThrottlingOverride `json:"bandwidthLimitOverrides,omitempty"` -} - -// Validate validates this bandwidth throttling -func (m *BandwidthThrottling) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBandwidthLimitOverrides(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthThrottling) validateBandwidthLimitOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.BandwidthLimitOverrides) { // not required - return nil - } - - for i := 0; i < len(m.BandwidthLimitOverrides); i++ { - if swag.IsZero(m.BandwidthLimitOverrides[i]) { // not required - continue - } - - if m.BandwidthLimitOverrides[i] != nil { - if err := m.BandwidthLimitOverrides[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this bandwidth throttling based on the context it is used -func (m *BandwidthThrottling) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBandwidthLimitOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthThrottling) contextValidateBandwidthLimitOverrides(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BandwidthLimitOverrides); i++ { - - if m.BandwidthLimitOverrides[i] != nil { - - if swag.IsZero(m.BandwidthLimitOverrides[i]) { // not required - return nil - } - - if err := m.BandwidthLimitOverrides[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimitOverrides" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BandwidthThrottling) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BandwidthThrottling) UnmarshalBinary(b []byte) error { - var res BandwidthThrottling - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bandwidth_throttling_override.go b/v2/models/bandwidth_throttling_override.go deleted file mode 100644 index e2c5be18..00000000 --- a/v2/models/bandwidth_throttling_override.go +++ /dev/null @@ -1,114 +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" -) - -// BandwidthThrottlingOverride BandWidth -// -// Specifies a list of override bandwidth limits and time periods when those limits override the rateLimitBytesPerSec limit. -// -// swagger:model BandwidthThrottlingOverride -type BandwidthThrottlingOverride struct { - - // Specifies the value for the specified time period. The value is specified in bytes per second. - BytesPerSecond *int64 `json:"bytesPerSecond,omitempty"` - - // time periods - TimePeriods *TimeOfAWeek `json:"timePeriods,omitempty"` -} - -// Validate validates this bandwidth throttling override -func (m *BandwidthThrottlingOverride) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimePeriods(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthThrottlingOverride) validateTimePeriods(formats strfmt.Registry) error { - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if m.TimePeriods != nil { - if err := m.TimePeriods.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bandwidth throttling override based on the context it is used -func (m *BandwidthThrottlingOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimePeriods(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BandwidthThrottlingOverride) contextValidateTimePeriods(ctx context.Context, formats strfmt.Registry) error { - - if m.TimePeriods != nil { - - if swag.IsZero(m.TimePeriods) { // not required - return nil - } - - if err := m.TimePeriods.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timePeriods") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timePeriods") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BandwidthThrottlingOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BandwidthThrottlingOverride) UnmarshalBinary(b []byte) error { - var res BandwidthThrottlingOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/baseos_patch_list.go b/v2/models/baseos_patch_list.go deleted file mode 100644 index 923a20aa..00000000 --- a/v2/models/baseos_patch_list.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BaseosPatchList Available baseos patches. -// -// Array of available baseos patches. -// -// swagger:model BaseosPatchList -type BaseosPatchList []*BaseosPatchListItem - -// Validate validates this baseos patch list -func (m BaseosPatchList) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this baseos patch list based on the context it is used -func (m BaseosPatchList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/baseos_patch_list_item.go b/v2/models/baseos_patch_list_item.go deleted file mode 100644 index a1dc8003..00000000 --- a/v2/models/baseos_patch_list_item.go +++ /dev/null @@ -1,119 +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" -) - -// BaseosPatchListItem Available baseos patch -// -// # Available Baseos patch -// -// swagger:model BaseosPatchListItem -type BaseosPatchListItem struct { - - // Name of the baseos patch - Name string `json:"name,omitempty"` - - // Baseos patch application status - // Enum: ["UnKnown","NotStarted","InProgress","Failed","Succeeded"] - Status string `json:"status,omitempty"` -} - -// Validate validates this baseos patch list item -func (m *BaseosPatchListItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var baseosPatchListItemTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["UnKnown","NotStarted","InProgress","Failed","Succeeded"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - baseosPatchListItemTypeStatusPropEnum = append(baseosPatchListItemTypeStatusPropEnum, v) - } -} - -const ( - - // BaseosPatchListItemStatusUnKnown captures enum value "UnKnown" - BaseosPatchListItemStatusUnKnown string = "UnKnown" - - // BaseosPatchListItemStatusNotStarted captures enum value "NotStarted" - BaseosPatchListItemStatusNotStarted string = "NotStarted" - - // BaseosPatchListItemStatusInProgress captures enum value "InProgress" - BaseosPatchListItemStatusInProgress string = "InProgress" - - // BaseosPatchListItemStatusFailed captures enum value "Failed" - BaseosPatchListItemStatusFailed string = "Failed" - - // BaseosPatchListItemStatusSucceeded captures enum value "Succeeded" - BaseosPatchListItemStatusSucceeded string = "Succeeded" -) - -// prop value enum -func (m *BaseosPatchListItem) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, baseosPatchListItemTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BaseosPatchListItem) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this baseos patch list item based on context it is used -func (m *BaseosPatchListItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BaseosPatchListItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BaseosPatchListItem) UnmarshalBinary(b []byte) error { - var res BaseosPatchListItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/baseos_patch_log.go b/v2/models/baseos_patch_log.go deleted file mode 100644 index 6f6e03db..00000000 --- a/v2/models/baseos_patch_log.go +++ /dev/null @@ -1,119 +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" -) - -// BaseosPatchLog Baseos patch Log and status. -// -// Baseos patch Log and status. -// -// swagger:model BaseosPatchLog -type BaseosPatchLog struct { - - // Baseos patch Log file. - Log string `json:"log,omitempty"` - - // Baseos patch application status - // Enum: ["UnKnown","NotStarted","InProgress","Failed","Succeeded"] - Status string `json:"status,omitempty"` -} - -// Validate validates this baseos patch log -func (m *BaseosPatchLog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var baseosPatchLogTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["UnKnown","NotStarted","InProgress","Failed","Succeeded"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - baseosPatchLogTypeStatusPropEnum = append(baseosPatchLogTypeStatusPropEnum, v) - } -} - -const ( - - // BaseosPatchLogStatusUnKnown captures enum value "UnKnown" - BaseosPatchLogStatusUnKnown string = "UnKnown" - - // BaseosPatchLogStatusNotStarted captures enum value "NotStarted" - BaseosPatchLogStatusNotStarted string = "NotStarted" - - // BaseosPatchLogStatusInProgress captures enum value "InProgress" - BaseosPatchLogStatusInProgress string = "InProgress" - - // BaseosPatchLogStatusFailed captures enum value "Failed" - BaseosPatchLogStatusFailed string = "Failed" - - // BaseosPatchLogStatusSucceeded captures enum value "Succeeded" - BaseosPatchLogStatusSucceeded string = "Succeeded" -) - -// prop value enum -func (m *BaseosPatchLog) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, baseosPatchLogTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BaseosPatchLog) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this baseos patch log based on context it is used -func (m *BaseosPatchLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BaseosPatchLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BaseosPatchLog) UnmarshalBinary(b []byte) error { - var res BaseosPatchLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bgp_instance.go b/v2/models/bgp_instance.go deleted file mode 100644 index 6b41a8ff..00000000 --- a/v2/models/bgp_instance.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BgpInstance bgpInstance -// -// BGP instance. -// -// swagger:model BgpInstance -type BgpInstance struct { - - // Local AS. - LocalAS *uint32 `json:"localAS,omitempty"` - - // List of bgp peer groups. - Peers []*BgpPeer `json:"peers"` - - // BGP timers. - Timers *BgpTimers `json:"timers,omitempty"` -} - -// Validate validates this bgp instance -func (m *BgpInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePeers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BgpInstance) validatePeers(formats strfmt.Registry) error { - if swag.IsZero(m.Peers) { // not required - return nil - } - - for i := 0; i < len(m.Peers); i++ { - if swag.IsZero(m.Peers[i]) { // not required - continue - } - - if m.Peers[i] != nil { - if err := m.Peers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("peers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("peers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BgpInstance) validateTimers(formats strfmt.Registry) error { - if swag.IsZero(m.Timers) { // not required - return nil - } - - if m.Timers != nil { - if err := m.Timers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timers") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bgp instance based on the context it is used -func (m *BgpInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePeers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BgpInstance) contextValidatePeers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Peers); i++ { - - if m.Peers[i] != nil { - - if swag.IsZero(m.Peers[i]) { // not required - return nil - } - - if err := m.Peers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("peers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("peers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BgpInstance) contextValidateTimers(ctx context.Context, formats strfmt.Registry) error { - - if m.Timers != nil { - - if swag.IsZero(m.Timers) { // not required - return nil - } - - if err := m.Timers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timers") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BgpInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BgpInstance) UnmarshalBinary(b []byte) error { - var res BgpInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bgp_peer.go b/v2/models/bgp_peer.go deleted file mode 100644 index 9f6c9f0b..00000000 --- a/v2/models/bgp_peer.go +++ /dev/null @@ -1,120 +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" -) - -// BgpPeer BgpPeer -// -// BGP peer information. -// -// swagger:model BgpPeer -type BgpPeer struct { - - // IP Address. - AddressOrTag *string `json:"addressOrTag,omitempty"` - - // Peer's description. - Description *string `json:"description,omitempty"` - - // Remote AS. - RemoteAS *uint32 `json:"remoteAS,omitempty"` - - // Bgp timers. - Timers *BgpTimers `json:"timers,omitempty"` -} - -// Validate validates this bgp peer -func (m *BgpPeer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BgpPeer) validateTimers(formats strfmt.Registry) error { - if swag.IsZero(m.Timers) { // not required - return nil - } - - if m.Timers != nil { - if err := m.Timers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timers") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bgp peer based on the context it is used -func (m *BgpPeer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BgpPeer) contextValidateTimers(ctx context.Context, formats strfmt.Registry) error { - - if m.Timers != nil { - - if swag.IsZero(m.Timers) { // not required - return nil - } - - if err := m.Timers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timers") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BgpPeer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BgpPeer) UnmarshalBinary(b []byte) error { - var res BgpPeer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bgp_timers.go b/v2/models/bgp_timers.go deleted file mode 100644 index 8f58aa74..00000000 --- a/v2/models/bgp_timers.go +++ /dev/null @@ -1,55 +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" -) - -// BgpTimers BgpTimers -// -// BGP protocol timers. -// -// swagger:model BgpTimers -type BgpTimers struct { - - // Keep alive interval in seconds. - KeepAlive *int32 `json:"keepAlive,omitempty"` - - // Hold time in seconds. - HoldTime *int32 `json:"holdTime,omitempty"` -} - -// Validate validates this bgp timers -func (m *BgpTimers) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this bgp timers based on context it is used -func (m *BgpTimers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BgpTimers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BgpTimers) UnmarshalBinary(b []byte) error { - var res BgpTimers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bifrost_connection.go b/v2/models/bifrost_connection.go deleted file mode 100644 index 4c0ada96..00000000 --- a/v2/models/bifrost_connection.go +++ /dev/null @@ -1,152 +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" -) - -// BifrostConnection Bifrost connection. -// -// Specify a connection of Bifrost. -// -// swagger:model BifrostConnection -type BifrostConnection struct { - - // Specifies the id of the connection. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the connection. - // Required: true - Name *string `json:"name"` - - // Specifies the version of the connection's certificate. The version is used to revoke/renew connection's certificates. - CertificateVersion *int64 `json:"certificateVersion,omitempty"` - - // Specifies the network connection information. - NetworkConnectionInfo *NetworkConnectionInfo `json:"networkConnectionInfo,omitempty"` - - // Specifies the ids of the connectors in this connection - Connectors []string `json:"connectors"` -} - -// Validate validates this bifrost connection -func (m *BifrostConnection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConnectionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnection) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnection) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnection) validateNetworkConnectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkConnectionInfo) { // not required - return nil - } - - if m.NetworkConnectionInfo != nil { - if err := m.NetworkConnectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkConnectionInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bifrost connection based on the context it is used -func (m *BifrostConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConnectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnection) contextValidateNetworkConnectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConnectionInfo != nil { - - if swag.IsZero(m.NetworkConnectionInfo) { // not required - return nil - } - - if err := m.NetworkConnectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkConnectionInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConnection) UnmarshalBinary(b []byte) error { - var res BifrostConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bifrost_connections.go b/v2/models/bifrost_connections.go deleted file mode 100644 index ef00b97c..00000000 --- a/v2/models/bifrost_connections.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BifrostConnections Bifrost connections. -// -// Specify a list of connection of Bifrost. -// -// swagger:model BifrostConnections -type BifrostConnections struct { - - // Specifies a list of connection of Bifrost. - BifrostConnections []*BifrostConnection `json:"BifrostConnections"` -} - -// Validate validates this bifrost connections -func (m *BifrostConnections) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBifrostConnections(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnections) validateBifrostConnections(formats strfmt.Registry) error { - if swag.IsZero(m.BifrostConnections) { // not required - return nil - } - - for i := 0; i < len(m.BifrostConnections); i++ { - if swag.IsZero(m.BifrostConnections[i]) { // not required - continue - } - - if m.BifrostConnections[i] != nil { - if err := m.BifrostConnections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("BifrostConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("BifrostConnections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this bifrost connections based on the context it is used -func (m *BifrostConnections) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBifrostConnections(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnections) contextValidateBifrostConnections(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BifrostConnections); i++ { - - if m.BifrostConnections[i] != nil { - - if swag.IsZero(m.BifrostConnections[i]) { // not required - return nil - } - - if err := m.BifrostConnections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("BifrostConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("BifrostConnections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostConnections) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConnections) UnmarshalBinary(b []byte) error { - var res BifrostConnections - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bifrost_connector.go b/v2/models/bifrost_connector.go deleted file mode 100644 index c2129508..00000000 --- a/v2/models/bifrost_connector.go +++ /dev/null @@ -1,200 +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" -) - -// BifrostConnector Bifrost Connector. -// -// Specify a Bifrost connector. -// -// swagger:model BifrostConnector -type BifrostConnector struct { - - // Specifies the id of the connector. - // Required: true - ID *string `json:"id"` - - // Specifies the name of the connector. - Name *string `json:"name,omitempty"` - - // Specifies the Id of the connection which this connector belongs to. - // Required: true - ConnectionID *int64 `json:"connectionId"` - - // Specifies the connection status. - ConnectionStatus *ConnectorConnectionInfo `json:"connectionStatus,omitempty"` - - // Specifies the cohesity side ip of the connector - // Read Only: true - CohesitySideIP *string `json:"cohesitySideIp,omitempty"` - - // Specifies the tenant source side ip of the connector - // Read Only: true - TenantSourceSideIP *string `json:"tenantSourceSideIp,omitempty"` - - // Specifies the connector's software Version - // Read Only: true - HyxVersion *string `json:"hyxVersion,omitempty"` -} - -// Validate validates this bifrost connector -func (m *BifrostConnector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnector) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnector) validateConnectionID(formats strfmt.Registry) error { - - if err := validate.Required("connectionId", "body", m.ConnectionID); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnector) validateConnectionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - if m.ConnectionStatus != nil { - if err := m.ConnectionStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionStatus") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bifrost connector based on the context it is used -func (m *BifrostConnector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectionStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCohesitySideIP(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantSourceSideIP(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHyxVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnector) contextValidateConnectionStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectionStatus != nil { - - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - if err := m.ConnectionStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionStatus") - } - return err - } - } - - return nil -} - -func (m *BifrostConnector) contextValidateCohesitySideIP(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cohesitySideIp", "body", m.CohesitySideIP); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnector) contextValidateTenantSourceSideIP(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantSourceSideIp", "body", m.TenantSourceSideIP); err != nil { - return err - } - - return nil -} - -func (m *BifrostConnector) contextValidateHyxVersion(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hyxVersion", "body", m.HyxVersion); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostConnector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConnector) UnmarshalBinary(b []byte) error { - var res BifrostConnector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bifrost_connectors.go b/v2/models/bifrost_connectors.go deleted file mode 100644 index 905334fa..00000000 --- a/v2/models/bifrost_connectors.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BifrostConnectors Bifrost Connectors. -// -// Specify a list of Bifrost connectors. -// -// swagger:model BifrostConnectors -type BifrostConnectors struct { - - // Specifies a list of Bifrost Connectors. - BifrostConnectors []*BifrostConnector `json:"BifrostConnectors"` -} - -// Validate validates this bifrost connectors -func (m *BifrostConnectors) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBifrostConnectors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnectors) validateBifrostConnectors(formats strfmt.Registry) error { - if swag.IsZero(m.BifrostConnectors) { // not required - return nil - } - - for i := 0; i < len(m.BifrostConnectors); i++ { - if swag.IsZero(m.BifrostConnectors[i]) { // not required - continue - } - - if m.BifrostConnectors[i] != nil { - if err := m.BifrostConnectors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("BifrostConnectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("BifrostConnectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this bifrost connectors based on the context it is used -func (m *BifrostConnectors) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBifrostConnectors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BifrostConnectors) contextValidateBifrostConnectors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BifrostConnectors); i++ { - - if m.BifrostConnectors[i] != nil { - - if swag.IsZero(m.BifrostConnectors[i]) { // not required - return nil - } - - if err := m.BifrostConnectors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("BifrostConnectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("BifrostConnectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostConnectors) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConnectors) UnmarshalBinary(b []byte) error { - var res BifrostConnectors - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/blackout_window.go b/v2/models/blackout_window.go deleted file mode 100644 index 36e45c43..00000000 --- a/v2/models/blackout_window.go +++ /dev/null @@ -1,234 +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" -) - -// BlackoutWindow Blackout Window -// -// Specifies a time range in a single day when new Protection Group Runs of Protection Groups cannot be started. For example, a Protection Group with a daily schedule could define a blackout period for Sunday. -// -// swagger:model BlackoutWindow -type BlackoutWindow struct { - - // Specifies a day in the week when no new Protection Group Runs should be started such as 'Sunday'. Specifies a day in a week such as 'Sunday', 'Monday', etc. - // Required: true - // Enum: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] - Day *string `json:"day"` - - // Blackout Start Time. - // - // Specifies the start time of the blackout time range. - // Required: true - StartTime *TimeOfDay `json:"startTime"` - - // Blackout End Time. - // - // Specifies the end time of the blackout time range. - // Required: true - EndTime *TimeOfDay `json:"endTime"` - - // Specifies the unique identifier for the target getting added. This field need to be passed olny when policies are updated. - ConfigID *string `json:"configId,omitempty"` -} - -// Validate validates this blackout window -func (m *BlackoutWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDay(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var blackoutWindowTypeDayPropEnum []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 { - blackoutWindowTypeDayPropEnum = append(blackoutWindowTypeDayPropEnum, v) - } -} - -const ( - - // BlackoutWindowDaySunday captures enum value "Sunday" - BlackoutWindowDaySunday string = "Sunday" - - // BlackoutWindowDayMonday captures enum value "Monday" - BlackoutWindowDayMonday string = "Monday" - - // BlackoutWindowDayTuesday captures enum value "Tuesday" - BlackoutWindowDayTuesday string = "Tuesday" - - // BlackoutWindowDayWednesday captures enum value "Wednesday" - BlackoutWindowDayWednesday string = "Wednesday" - - // BlackoutWindowDayThursday captures enum value "Thursday" - BlackoutWindowDayThursday string = "Thursday" - - // BlackoutWindowDayFriday captures enum value "Friday" - BlackoutWindowDayFriday string = "Friday" - - // BlackoutWindowDaySaturday captures enum value "Saturday" - BlackoutWindowDaySaturday string = "Saturday" -) - -// prop value enum -func (m *BlackoutWindow) validateDayEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, blackoutWindowTypeDayPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BlackoutWindow) validateDay(formats strfmt.Registry) error { - - if err := validate.Required("day", "body", m.Day); err != nil { - return err - } - - // value enum - if err := m.validateDayEnum("day", "body", *m.Day); err != nil { - return err - } - - return nil -} - -func (m *BlackoutWindow) validateStartTime(formats strfmt.Registry) error { - - if err := validate.Required("startTime", "body", m.StartTime); err != nil { - return err - } - - 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 -} - -func (m *BlackoutWindow) validateEndTime(formats strfmt.Registry) error { - - if err := validate.Required("endTime", "body", m.EndTime); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this blackout window based on the context it is used -func (m *BlackoutWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BlackoutWindow) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - - if m.StartTime != 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 -} - -func (m *BlackoutWindow) contextValidateEndTime(ctx context.Context, formats strfmt.Registry) error { - - if m.EndTime != 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 -} - -// MarshalBinary interface implementation -func (m *BlackoutWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BlackoutWindow) UnmarshalBinary(b []byte) error { - var res BlackoutWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bmr_backup_policy.go b/v2/models/bmr_backup_policy.go deleted file mode 100644 index cc64ae40..00000000 --- a/v2/models/bmr_backup_policy.go +++ /dev/null @@ -1,159 +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" -) - -// BmrBackupPolicy BMR Backup (Physical) Schedule and Retention. -// -// Specifies the BMR schedule in case of physical source protection. -// -// swagger:model BmrBackupPolicy -type BmrBackupPolicy struct { - - // Specifies the schedule settings for BMR backup. - // Required: true - Schedule *BmrSchedule `json:"schedule"` - - // Specifies the Retention period of a backup in days, months or years. - // Required: true - Retention *Retention `json:"retention"` -} - -// Validate validates this bmr backup policy -func (m *BmrBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BmrBackupPolicy) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *BmrBackupPolicy) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this bmr backup policy based on the context it is used -func (m *BmrBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *BmrBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *BmrBackupPolicy) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *BmrBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BmrBackupPolicy) UnmarshalBinary(b []byte) error { - var res BmrBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bmr_schedule.go b/v2/models/bmr_schedule.go deleted file mode 100644 index 246b19d5..00000000 --- a/v2/models/bmr_schedule.go +++ /dev/null @@ -1,324 +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" -) - -// BmrSchedule Bmr Schedule -// -// Specifies settings that defines how frequent bmr backup will be performed for a Protection Group. -// -// swagger:model BmrSchedule -type BmrSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Weeks' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Months' specifies that new Protection Group runs start monthly on certain day of specific week. - // Required: true - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *DaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *WeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *MonthSchedule `json:"monthSchedule,omitempty"` - - // Specifies the year Schedule for Protection Group to start runs on specific day of that year. - YearSchedule *YearSchedule `json:"yearSchedule,omitempty"` -} - -// Validate validates this bmr schedule -func (m *BmrSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYearSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var bmrScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bmrScheduleTypeUnitPropEnum = append(bmrScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // BmrScheduleUnitDays captures enum value "Days" - BmrScheduleUnitDays string = "Days" - - // BmrScheduleUnitWeeks captures enum value "Weeks" - BmrScheduleUnitWeeks string = "Weeks" - - // BmrScheduleUnitMonths captures enum value "Months" - BmrScheduleUnitMonths string = "Months" - - // BmrScheduleUnitYears captures enum value "Years" - BmrScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *BmrSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bmrScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BmrSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *BmrSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) validateYearSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if m.YearSchedule != nil { - if err := m.YearSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bmr schedule based on the context it is used -func (m *BmrSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateYearSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BmrSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *BmrSchedule) contextValidateYearSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.YearSchedule != nil { - - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if err := m.YearSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BmrSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BmrSchedule) UnmarshalBinary(b []byte) error { - var res BmrSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bond_interface_network_params.go b/v2/models/bond_interface_network_params.go deleted file mode 100644 index 8f61813d..00000000 --- a/v2/models/bond_interface_network_params.go +++ /dev/null @@ -1,208 +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" -) - -// BondInterfaceNetworkParams Bond interface network parameters. -// -// swagger:model BondInterfaceNetworkParams -type BondInterfaceNetworkParams struct { - - // Rate option to use for link partner to transmit LACPDU packets in 802.3ad mode. - // Enum: ["Slow","Fast"] - LacpRate *string `json:"lacpRate,omitempty"` - - // Bonding mode of the interface. - // Enum: ["ActiveBackup","802_3ad"] - BondingMode *string `json:"bondingMode,omitempty"` - - // Transmit hash policy to use for selection in 802.3ad mode. - // Enum: ["layer2","layer3_4","layer2_3"] - XmitHashPolicy *string `json:"xmitHashPolicy,omitempty"` -} - -// Validate validates this bond interface network params -func (m *BondInterfaceNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLacpRate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBondingMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateXmitHashPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var bondInterfaceNetworkParamsTypeLacpRatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Slow","Fast"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondInterfaceNetworkParamsTypeLacpRatePropEnum = append(bondInterfaceNetworkParamsTypeLacpRatePropEnum, v) - } -} - -const ( - - // BondInterfaceNetworkParamsLacpRateSlow captures enum value "Slow" - BondInterfaceNetworkParamsLacpRateSlow string = "Slow" - - // BondInterfaceNetworkParamsLacpRateFast captures enum value "Fast" - BondInterfaceNetworkParamsLacpRateFast string = "Fast" -) - -// prop value enum -func (m *BondInterfaceNetworkParams) validateLacpRateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondInterfaceNetworkParamsTypeLacpRatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondInterfaceNetworkParams) validateLacpRate(formats strfmt.Registry) error { - if swag.IsZero(m.LacpRate) { // not required - return nil - } - - // value enum - if err := m.validateLacpRateEnum("lacpRate", "body", *m.LacpRate); err != nil { - return err - } - - return nil -} - -var bondInterfaceNetworkParamsTypeBondingModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ActiveBackup","802_3ad"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondInterfaceNetworkParamsTypeBondingModePropEnum = append(bondInterfaceNetworkParamsTypeBondingModePropEnum, v) - } -} - -const ( - - // BondInterfaceNetworkParamsBondingModeActiveBackup captures enum value "ActiveBackup" - BondInterfaceNetworkParamsBondingModeActiveBackup string = "ActiveBackup" - - // BondInterfaceNetworkParamsBondingModeNr8023ad captures enum value "802_3ad" - BondInterfaceNetworkParamsBondingModeNr8023ad string = "802_3ad" -) - -// prop value enum -func (m *BondInterfaceNetworkParams) validateBondingModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondInterfaceNetworkParamsTypeBondingModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondInterfaceNetworkParams) validateBondingMode(formats strfmt.Registry) error { - if swag.IsZero(m.BondingMode) { // not required - return nil - } - - // value enum - if err := m.validateBondingModeEnum("bondingMode", "body", *m.BondingMode); err != nil { - return err - } - - return nil -} - -var bondInterfaceNetworkParamsTypeXmitHashPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["layer2","layer3_4","layer2_3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondInterfaceNetworkParamsTypeXmitHashPolicyPropEnum = append(bondInterfaceNetworkParamsTypeXmitHashPolicyPropEnum, v) - } -} - -const ( - - // BondInterfaceNetworkParamsXmitHashPolicyLayer2 captures enum value "layer2" - BondInterfaceNetworkParamsXmitHashPolicyLayer2 string = "layer2" - - // BondInterfaceNetworkParamsXmitHashPolicyLayer34 captures enum value "layer3_4" - BondInterfaceNetworkParamsXmitHashPolicyLayer34 string = "layer3_4" - - // BondInterfaceNetworkParamsXmitHashPolicyLayer23 captures enum value "layer2_3" - BondInterfaceNetworkParamsXmitHashPolicyLayer23 string = "layer2_3" -) - -// prop value enum -func (m *BondInterfaceNetworkParams) validateXmitHashPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondInterfaceNetworkParamsTypeXmitHashPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondInterfaceNetworkParams) validateXmitHashPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.XmitHashPolicy) { // not required - return nil - } - - // value enum - if err := m.validateXmitHashPolicyEnum("xmitHashPolicy", "body", *m.XmitHashPolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this bond interface network params based on context it is used -func (m *BondInterfaceNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BondInterfaceNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BondInterfaceNetworkParams) UnmarshalBinary(b []byte) error { - var res BondInterfaceNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bond_member.go b/v2/models/bond_member.go deleted file mode 100644 index 27a07cd6..00000000 --- a/v2/models/bond_member.go +++ /dev/null @@ -1,286 +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" -) - -// BondMember Bond member details. -// -// swagger:model BondMember -type BondMember struct { - - // Name of the bond secondary. - Name *string `json:"name,omitempty"` - - // MAC address of the bond secondary. - MacAddress *string `json:"macAddress,omitempty"` - - // Speed of the bond secondary. - // Enum: ["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"] - Speed *string `json:"speed,omitempty"` - - // Bond secondary link state. - // Enum: ["Up","Down"] - LinkState *string `json:"linkState,omitempty"` - - // Specifies whether or not this is a active secondary. This is only valid in ActiveBackup bonding mode. - ActiveSecondary *bool `json:"activeSecondary,omitempty"` - - // Slot information of the bond secondary. - Slot *string `json:"slot,omitempty"` - - // Bond secondary interface stats. - Stats *InterfaceStats `json:"stats,omitempty"` - - // Uplink switch information of bond secondary. - UplinkSwitch *UplinkSwitch `json:"uplinkSwitch,omitempty"` -} - -// Validate validates this bond member -func (m *BondMember) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSpeed(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinkState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUplinkSwitch(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var bondMemberTypeSpeedPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondMemberTypeSpeedPropEnum = append(bondMemberTypeSpeedPropEnum, v) - } -} - -const ( - - // BondMemberSpeedNr1Gbits captures enum value "1Gbit/s" - BondMemberSpeedNr1Gbits string = "1Gbit/s" - - // BondMemberSpeedNr10Gbits captures enum value "10Gbit/s" - BondMemberSpeedNr10Gbits string = "10Gbit/s" - - // BondMemberSpeedNr25Gbits captures enum value "25Gbit/s" - BondMemberSpeedNr25Gbits string = "25Gbit/s" - - // BondMemberSpeedNr40Gbits captures enum value "40Gbit/s" - BondMemberSpeedNr40Gbits string = "40Gbit/s" - - // BondMemberSpeedNr100Gbits captures enum value "100Gbit/s" - BondMemberSpeedNr100Gbits string = "100Gbit/s" - - // BondMemberSpeedUnknown captures enum value "Unknown" - BondMemberSpeedUnknown string = "Unknown" -) - -// prop value enum -func (m *BondMember) validateSpeedEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondMemberTypeSpeedPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondMember) validateSpeed(formats strfmt.Registry) error { - if swag.IsZero(m.Speed) { // not required - return nil - } - - // value enum - if err := m.validateSpeedEnum("speed", "body", *m.Speed); err != nil { - return err - } - - return nil -} - -var bondMemberTypeLinkStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Up","Down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondMemberTypeLinkStatePropEnum = append(bondMemberTypeLinkStatePropEnum, v) - } -} - -const ( - - // BondMemberLinkStateUp captures enum value "Up" - BondMemberLinkStateUp string = "Up" - - // BondMemberLinkStateDown captures enum value "Down" - BondMemberLinkStateDown string = "Down" -) - -// prop value enum -func (m *BondMember) validateLinkStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondMemberTypeLinkStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondMember) validateLinkState(formats strfmt.Registry) error { - if swag.IsZero(m.LinkState) { // not required - return nil - } - - // value enum - if err := m.validateLinkStateEnum("linkState", "body", *m.LinkState); err != nil { - return err - } - - return nil -} - -func (m *BondMember) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *BondMember) validateUplinkSwitch(formats strfmt.Registry) error { - if swag.IsZero(m.UplinkSwitch) { // not required - return nil - } - - if m.UplinkSwitch != nil { - if err := m.UplinkSwitch.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkSwitch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkSwitch") - } - return err - } - } - - return nil -} - -// ContextValidate validate this bond member based on the context it is used -func (m *BondMember) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUplinkSwitch(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BondMember) 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 -} - -func (m *BondMember) contextValidateUplinkSwitch(ctx context.Context, formats strfmt.Registry) error { - - if m.UplinkSwitch != nil { - - if swag.IsZero(m.UplinkSwitch) { // not required - return nil - } - - if err := m.UplinkSwitch.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uplinkSwitch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uplinkSwitch") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BondMember) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BondMember) UnmarshalBinary(b []byte) error { - var res BondMember - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bonding_mode_type.go b/v2/models/bonding_mode_type.go deleted file mode 100644 index fb9e2b8e..00000000 --- a/v2/models/bonding_mode_type.go +++ /dev/null @@ -1,113 +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" -) - -// BondingModeType Bonding Mode Type -// -// Type of bonding mode. -// -// swagger:model BondingModeType -type BondingModeType struct { - - // Specifies the bonding mode type. - // Enum: ["ActiveBackup","802_3ad","BalanceAlb","Invalid"] - BondingModeType string `json:"bondingModeType,omitempty"` -} - -// Validate validates this bonding mode type -func (m *BondingModeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondingModeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var bondingModeTypeTypeBondingModeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ActiveBackup","802_3ad","BalanceAlb","Invalid"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - bondingModeTypeTypeBondingModeTypePropEnum = append(bondingModeTypeTypeBondingModeTypePropEnum, v) - } -} - -const ( - - // BondingModeTypeBondingModeTypeActiveBackup captures enum value "ActiveBackup" - BondingModeTypeBondingModeTypeActiveBackup string = "ActiveBackup" - - // BondingModeTypeBondingModeTypeNr8023ad captures enum value "802_3ad" - BondingModeTypeBondingModeTypeNr8023ad string = "802_3ad" - - // BondingModeTypeBondingModeTypeBalanceAlb captures enum value "BalanceAlb" - BondingModeTypeBondingModeTypeBalanceAlb string = "BalanceAlb" - - // BondingModeTypeBondingModeTypeInvalid captures enum value "Invalid" - BondingModeTypeBondingModeTypeInvalid string = "Invalid" -) - -// prop value enum -func (m *BondingModeType) validateBondingModeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, bondingModeTypeTypeBondingModeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *BondingModeType) validateBondingModeType(formats strfmt.Registry) error { - if swag.IsZero(m.BondingModeType) { // not required - return nil - } - - // value enum - if err := m.validateBondingModeTypeEnum("bondingModeType", "body", m.BondingModeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this bonding mode type based on context it is used -func (m *BondingModeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BondingModeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BondingModeType) UnmarshalBinary(b []byte) error { - var res BondingModeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/boolean_form_field_params.go b/v2/models/boolean_form_field_params.go deleted file mode 100644 index a1e46728..00000000 --- a/v2/models/boolean_form_field_params.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" -) - -// BooleanFormFieldParams Parameters to specify a boolean form field -// -// swagger:model BooleanFormFieldParams -type BooleanFormFieldParams struct { - - // Default value for the field - DefaultValue *bool `json:"defaultValue,omitempty"` - - // Description for the field to be shown on UI screen - Description *string `json:"description,omitempty"` -} - -// Validate validates this boolean form field params -func (m *BooleanFormFieldParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this boolean form field params based on context it is used -func (m *BooleanFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BooleanFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BooleanFormFieldParams) UnmarshalBinary(b []byte) error { - var res BooleanFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/bucket_policy.go b/v2/models/bucket_policy.go deleted file mode 100644 index 405b5a7d..00000000 --- a/v2/models/bucket_policy.go +++ /dev/null @@ -1,77 +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" -) - -// BucketPolicy Specifies the policy in effect for this bucket. -// -// swagger:model BucketPolicy -type BucketPolicy struct { - - // Specifies the language syntax rules that are to be used to process the policy. This is a read-only property. - Version *string `json:"version,omitempty"` - - // Specifies the identifier of the bucket policy. This is a read-only property. - ID *string `json:"id,omitempty"` - - // Specifies the raw JSON string of the store policy. - // Required: true - RawPolicy *string `json:"rawPolicy"` -} - -// Validate validates this bucket policy -func (m *BucketPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRawPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BucketPolicy) validateRawPolicy(formats strfmt.Registry) error { - - if err := validate.Required("rawPolicy", "body", m.RawPolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this bucket policy based on context it is used -func (m *BucketPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BucketPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BucketPolicy) UnmarshalBinary(b []byte) error { - var res BucketPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/byte_size.go b/v2/models/byte_size.go deleted file mode 100644 index 005804e1..00000000 --- a/v2/models/byte_size.go +++ /dev/null @@ -1,27 +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" -) - -// ByteSize Specifies the number of Bytes. -// -// swagger:model ByteSize -type ByteSize int64 - -// Validate validates this byte size -func (m ByteSize) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this byte size based on context it is used -func (m ByteSize) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/c_d_p_filter_status.go b/v2/models/c_d_p_filter_status.go deleted file mode 100644 index 50ce896a..00000000 --- a/v2/models/c_d_p_filter_status.go +++ /dev/null @@ -1,137 +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" -) - -// CDPFilterStatus CDP Filter Status -// -// # CDP Filter Status -// -// swagger:model CDPFilterStatus -type CDPFilterStatus struct { - - // Specifies the CDP filter status. - // Enum: ["NotInstalled","InstallFilterInProgress","FilterInstalledIOInactive","FilterInstalled","IOInactive","IOActivationInProgress","IOActive","IODeactivationInProgress","UninstallFilterInProgress","UpgradeFilterInProgress","UpgradeFilterFailed","WaitingForCDPPolicyAttach"] - CdpFilterStatus string `json:"cdpFilterStatus,omitempty"` -} - -// Validate validates this c d p filter status -func (m *CDPFilterStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCdpFilterStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cDPFilterStatusTypeCdpFilterStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotInstalled","InstallFilterInProgress","FilterInstalledIOInactive","FilterInstalled","IOInactive","IOActivationInProgress","IOActive","IODeactivationInProgress","UninstallFilterInProgress","UpgradeFilterInProgress","UpgradeFilterFailed","WaitingForCDPPolicyAttach"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cDPFilterStatusTypeCdpFilterStatusPropEnum = append(cDPFilterStatusTypeCdpFilterStatusPropEnum, v) - } -} - -const ( - - // CDPFilterStatusCdpFilterStatusNotInstalled captures enum value "NotInstalled" - CDPFilterStatusCdpFilterStatusNotInstalled string = "NotInstalled" - - // CDPFilterStatusCdpFilterStatusInstallFilterInProgress captures enum value "InstallFilterInProgress" - CDPFilterStatusCdpFilterStatusInstallFilterInProgress string = "InstallFilterInProgress" - - // CDPFilterStatusCdpFilterStatusFilterInstalledIOInactive captures enum value "FilterInstalledIOInactive" - CDPFilterStatusCdpFilterStatusFilterInstalledIOInactive string = "FilterInstalledIOInactive" - - // CDPFilterStatusCdpFilterStatusFilterInstalled captures enum value "FilterInstalled" - CDPFilterStatusCdpFilterStatusFilterInstalled string = "FilterInstalled" - - // CDPFilterStatusCdpFilterStatusIOInactive captures enum value "IOInactive" - CDPFilterStatusCdpFilterStatusIOInactive string = "IOInactive" - - // CDPFilterStatusCdpFilterStatusIOActivationInProgress captures enum value "IOActivationInProgress" - CDPFilterStatusCdpFilterStatusIOActivationInProgress string = "IOActivationInProgress" - - // CDPFilterStatusCdpFilterStatusIOActive captures enum value "IOActive" - CDPFilterStatusCdpFilterStatusIOActive string = "IOActive" - - // CDPFilterStatusCdpFilterStatusIODeactivationInProgress captures enum value "IODeactivationInProgress" - CDPFilterStatusCdpFilterStatusIODeactivationInProgress string = "IODeactivationInProgress" - - // CDPFilterStatusCdpFilterStatusUninstallFilterInProgress captures enum value "UninstallFilterInProgress" - CDPFilterStatusCdpFilterStatusUninstallFilterInProgress string = "UninstallFilterInProgress" - - // CDPFilterStatusCdpFilterStatusUpgradeFilterInProgress captures enum value "UpgradeFilterInProgress" - CDPFilterStatusCdpFilterStatusUpgradeFilterInProgress string = "UpgradeFilterInProgress" - - // CDPFilterStatusCdpFilterStatusUpgradeFilterFailed captures enum value "UpgradeFilterFailed" - CDPFilterStatusCdpFilterStatusUpgradeFilterFailed string = "UpgradeFilterFailed" - - // CDPFilterStatusCdpFilterStatusWaitingForCDPPolicyAttach captures enum value "WaitingForCDPPolicyAttach" - CDPFilterStatusCdpFilterStatusWaitingForCDPPolicyAttach string = "WaitingForCDPPolicyAttach" -) - -// prop value enum -func (m *CDPFilterStatus) validateCdpFilterStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cDPFilterStatusTypeCdpFilterStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CDPFilterStatus) validateCdpFilterStatus(formats strfmt.Registry) error { - if swag.IsZero(m.CdpFilterStatus) { // not required - return nil - } - - // value enum - if err := m.validateCdpFilterStatusEnum("cdpFilterStatus", "body", m.CdpFilterStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this c d p filter status based on context it is used -func (m *CDPFilterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CDPFilterStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CDPFilterStatus) UnmarshalBinary(b []byte) error { - var res CDPFilterStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_gaia_indexing_params.go b/v2/models/cancel_gaia_indexing_params.go deleted file mode 100644 index 2065b2f1..00000000 --- a/v2/models/cancel_gaia_indexing_params.go +++ /dev/null @@ -1,109 +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" -) - -// CancelGaiaIndexingParams Specifies the cancel index documents params. -// -// swagger:model CancelGaiaIndexingParams -type CancelGaiaIndexingParams struct { - - // job handle - JobHandle *JobHandle `json:"jobHandle,omitempty"` -} - -// Validate validates this cancel gaia indexing params -func (m *CancelGaiaIndexingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobHandle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelGaiaIndexingParams) validateJobHandle(formats strfmt.Registry) error { - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if m.JobHandle != nil { - if err := m.JobHandle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cancel gaia indexing params based on the context it is used -func (m *CancelGaiaIndexingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobHandle(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelGaiaIndexingParams) contextValidateJobHandle(ctx context.Context, formats strfmt.Registry) error { - - if m.JobHandle != nil { - - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if err := m.JobHandle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelGaiaIndexingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelGaiaIndexingParams) UnmarshalBinary(b []byte) error { - var res CancelGaiaIndexingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_gaia_indexing_result.go b/v2/models/cancel_gaia_indexing_result.go deleted file mode 100644 index 5d276cd0..00000000 --- a/v2/models/cancel_gaia_indexing_result.go +++ /dev/null @@ -1,50 +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" -) - -// CancelGaiaIndexingResult Specifies the cancel indexing response. -// -// swagger:model CancelGaiaIndexingResult -type CancelGaiaIndexingResult struct { - - // Whether the cancellation is finished. - Cancelled *bool `json:"cancelled,omitempty"` -} - -// Validate validates this cancel gaia indexing result -func (m *CancelGaiaIndexingResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cancel gaia indexing result based on context it is used -func (m *CancelGaiaIndexingResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancelGaiaIndexingResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelGaiaIndexingResult) UnmarshalBinary(b []byte) error { - var res CancelGaiaIndexingResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_object_run_params.go b/v2/models/cancel_object_run_params.go deleted file mode 100644 index bf847ca6..00000000 --- a/v2/models/cancel_object_run_params.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CancelObjectRunParams One object run to cancel. -// -// swagger:model CancelObjectRunParams -type CancelObjectRunParams struct { - - // Specifies the id of the run to cancel. - // Required: true - RunID *string `json:"runId"` - - // Specifies whether to cancel the local backup run. Default is false. - CancelLocalRun *bool `json:"cancelLocalRun,omitempty"` - - // Specifies the archival target ids where the tasks run. If specified, the archival target ids must be present within the run specified by the runId above. - ArchivalTargetIds []int64 `json:"archivalTargetIds"` - - // Specifies the cluster identifiers where the tasks run. If specified, the archival target ids must be present within the run specified by the runId above. - ReplicationTargets []*ClusterIdentifier `json:"replicationTargets"` - - // Specifies the cloud spin target ids where the tasks run. If specified, the archival target ids must be present within the run specified by the runId above. - CloudSpinTargetIds []int64 `json:"cloudSpinTargetIds"` -} - -// Validate validates this cancel object run params -func (m *CancelObjectRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunParams) validateRunID(formats strfmt.Registry) error { - - if err := validate.Required("runId", "body", m.RunID); err != nil { - return err - } - - return nil -} - -func (m *CancelObjectRunParams) validateReplicationTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargets) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTargets); i++ { - if swag.IsZero(m.ReplicationTargets[i]) { // not required - continue - } - - if m.ReplicationTargets[i] != nil { - if err := m.ReplicationTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cancel object run params based on the context it is used -func (m *CancelObjectRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicationTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunParams) contextValidateReplicationTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationTargets); i++ { - - if m.ReplicationTargets[i] != nil { - - if swag.IsZero(m.ReplicationTargets[i]) { // not required - return nil - } - - if err := m.ReplicationTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelObjectRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelObjectRunParams) UnmarshalBinary(b []byte) error { - var res CancelObjectRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_object_runs_params.go b/v2/models/cancel_object_runs_params.go deleted file mode 100644 index ac9c812e..00000000 --- a/v2/models/cancel_object_runs_params.go +++ /dev/null @@ -1,188 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CancelObjectRunsParams Request to cancel object runs. -// -// swagger:model CancelObjectRunsParams -type CancelObjectRunsParams struct { - - // Specifies object id - // Required: true - ObjectID *int64 `json:"objectId"` - - // Specifies a list of runs to cancel. If no runs are specified, then all the outstanding runs will be canceled. - RunsConfig []*CancelObjectRunParams `json:"runsConfig"` - - // Specifies the protections type on which action to be performed. This is used when an object is protected by multiple protection types. If not specified action will be performed on all protection types. - // Unique: true - SnapshotBackendTypes []string `json:"snapshotBackendTypes"` -} - -// Validate validates this cancel object runs params -func (m *CancelObjectRunsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotBackendTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsParams) validateObjectID(formats strfmt.Registry) error { - - if err := validate.Required("objectId", "body", m.ObjectID); err != nil { - return err - } - - return nil -} - -func (m *CancelObjectRunsParams) validateRunsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RunsConfig) { // not required - return nil - } - - for i := 0; i < len(m.RunsConfig); i++ { - if swag.IsZero(m.RunsConfig[i]) { // not required - continue - } - - if m.RunsConfig[i] != nil { - if err := m.RunsConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runsConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runsConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var cancelObjectRunsParamsSnapshotBackendTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSNative","kAWSSnapshotManager","kPhysical","kSQL","kOracle","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureNative","kAzureSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cancelObjectRunsParamsSnapshotBackendTypesItemsEnum = append(cancelObjectRunsParamsSnapshotBackendTypesItemsEnum, v) - } -} - -func (m *CancelObjectRunsParams) validateSnapshotBackendTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cancelObjectRunsParamsSnapshotBackendTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CancelObjectRunsParams) validateSnapshotBackendTypes(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotBackendTypes) { // not required - return nil - } - - if err := validate.UniqueItems("snapshotBackendTypes", "body", m.SnapshotBackendTypes); err != nil { - return err - } - - for i := 0; i < len(m.SnapshotBackendTypes); i++ { - - // value enum - if err := m.validateSnapshotBackendTypesItemsEnum("snapshotBackendTypes"+"."+strconv.Itoa(i), "body", m.SnapshotBackendTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this cancel object runs params based on the context it is used -func (m *CancelObjectRunsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRunsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsParams) contextValidateRunsConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunsConfig); i++ { - - if m.RunsConfig[i] != nil { - - if swag.IsZero(m.RunsConfig[i]) { // not required - return nil - } - - if err := m.RunsConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runsConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runsConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelObjectRunsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelObjectRunsParams) UnmarshalBinary(b []byte) error { - var res CancelObjectRunsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_object_runs_request.go b/v2/models/cancel_object_runs_request.go deleted file mode 100644 index 0b4e6ee7..00000000 --- a/v2/models/cancel_object_runs_request.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CancelObjectRunsRequest Request to cancel object runs. -// -// swagger:model CancelObjectRunsRequest -type CancelObjectRunsRequest struct { - - // Specifies a list of object runs to cancel. - ObjectRuns []*CancelObjectRunsParams `json:"objectRuns"` -} - -// Validate validates this cancel object runs request -func (m *CancelObjectRunsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsRequest) validateObjectRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectRuns) { // not required - return nil - } - - for i := 0; i < len(m.ObjectRuns); i++ { - if swag.IsZero(m.ObjectRuns[i]) { // not required - continue - } - - if m.ObjectRuns[i] != nil { - if err := m.ObjectRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cancel object runs request based on the context it is used -func (m *CancelObjectRunsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsRequest) contextValidateObjectRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectRuns); i++ { - - if m.ObjectRuns[i] != nil { - - if swag.IsZero(m.ObjectRuns[i]) { // not required - return nil - } - - if err := m.ObjectRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelObjectRunsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelObjectRunsRequest) UnmarshalBinary(b []byte) error { - var res CancelObjectRunsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_object_runs_result.go b/v2/models/cancel_object_runs_result.go deleted file mode 100644 index 061b7c7b..00000000 --- a/v2/models/cancel_object_runs_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" -) - -// CancelObjectRunsResult Result after canceling object runs. -// -// swagger:model CancelObjectRunsResult -type CancelObjectRunsResult struct { - - // Specifies the id of the object. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the error message if any error happens. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this cancel object runs result -func (m *CancelObjectRunsResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cancel object runs result based on context it is used -func (m *CancelObjectRunsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancelObjectRunsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelObjectRunsResult) UnmarshalBinary(b []byte) error { - var res CancelObjectRunsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_object_runs_results.go b/v2/models/cancel_object_runs_results.go deleted file mode 100644 index a9c6e60e..00000000 --- a/v2/models/cancel_object_runs_results.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CancelObjectRunsResults Results after canceling object runs. If no errors happen, this will not be returned. -// -// swagger:model CancelObjectRunsResults -type CancelObjectRunsResults struct { - - // Specifies results after canceling object runs. - Results []*CancelObjectRunsResult `json:"results"` -} - -// Validate validates this cancel object runs results -func (m *CancelObjectRunsResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsResults) validateResults(formats strfmt.Registry) error { - if swag.IsZero(m.Results) { // not required - return nil - } - - for i := 0; i < len(m.Results); i++ { - if swag.IsZero(m.Results[i]) { // not required - continue - } - - if m.Results[i] != nil { - if err := m.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("results" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cancel object runs results based on the context it is used -func (m *CancelObjectRunsResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelObjectRunsResults) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Results); i++ { - - if m.Results[i] != nil { - - if swag.IsZero(m.Results[i]) { // not required - return nil - } - - if err := m.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("results" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CancelObjectRunsResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelObjectRunsResults) UnmarshalBinary(b []byte) error { - var res CancelObjectRunsResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_protection_group_run_request.go b/v2/models/cancel_protection_group_run_request.go deleted file mode 100644 index 84cfb2e1..00000000 --- a/v2/models/cancel_protection_group_run_request.go +++ /dev/null @@ -1,171 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CancelProtectionGroupRunRequest Cancel protection run request. -// -// Specifies the request to cancel a protection run. -// -// swagger:model CancelProtectionGroupRunRequest -type CancelProtectionGroupRunRequest struct { - - // Specifies a unique run id of the Protection Group run. - // Required: true - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId"` - - // Specifies the task id of the local run. - // Pattern: ^\d+:\d+:\d+$ - LocalTaskID *string `json:"localTaskId,omitempty"` - - // List of entity ids for which we need to cancel the backup tasks. If this is provided it will not cancel the complete run but will cancel only subset of backup tasks (if backup tasks are cancelled correspoding copy task will also get cancelled). If the backup tasks are completed successfully it will not cancel those backup tasks. - ObjectIds []int64 `json:"objectIds"` - - // Specifies the task id of the replication run. - ReplicationTaskID []string `json:"replicationTaskId"` - - // Specifies the task id of the archival run. - ArchivalTaskID []string `json:"archivalTaskId"` - - // Specifies the task id of the cloudSpin run. - CloudSpinTaskID []string `json:"cloudSpinTaskId"` -} - -// Validate validates this cancel protection group run request -func (m *CancelProtectionGroupRunRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalTaskID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationTaskID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTaskID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinTaskID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelProtectionGroupRunRequest) validateRunID(formats strfmt.Registry) error { - - if err := validate.Required("runId", "body", m.RunID); err != nil { - return err - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *CancelProtectionGroupRunRequest) validateLocalTaskID(formats strfmt.Registry) error { - if swag.IsZero(m.LocalTaskID) { // not required - return nil - } - - if err := validate.Pattern("localTaskId", "body", *m.LocalTaskID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *CancelProtectionGroupRunRequest) validateReplicationTaskID(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTaskID) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTaskID); i++ { - - if err := validate.Pattern("replicationTaskId"+"."+strconv.Itoa(i), "body", m.ReplicationTaskID[i], `^\d+:\d+:\d+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *CancelProtectionGroupRunRequest) validateArchivalTaskID(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTaskID) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalTaskID); i++ { - - if err := validate.Pattern("archivalTaskId"+"."+strconv.Itoa(i), "body", m.ArchivalTaskID[i], `^\d+:\d+:\d+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *CancelProtectionGroupRunRequest) validateCloudSpinTaskID(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinTaskID) { // not required - return nil - } - - for i := 0; i < len(m.CloudSpinTaskID); i++ { - - if err := validate.Pattern("cloudSpinTaskId"+"."+strconv.Itoa(i), "body", m.CloudSpinTaskID[i], `^\d+:\d+:\d+$`); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this cancel protection group run request based on context it is used -func (m *CancelProtectionGroupRunRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancelProtectionGroupRunRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelProtectionGroupRunRequest) UnmarshalBinary(b []byte) error { - var res CancelProtectionGroupRunRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancel_protection_group_run_response_params.go b/v2/models/cancel_protection_group_run_response_params.go deleted file mode 100644 index b95bd6f5..00000000 --- a/v2/models/cancel_protection_group_run_response_params.go +++ /dev/null @@ -1,74 +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" -) - -// CancelProtectionGroupRunResponseParams Specifies the response of a cancel action on protection runs. -// -// swagger:model CancelProtectionGroupRunResponseParams -type CancelProtectionGroupRunResponseParams struct { - - // Specifies a unique run id of the Protection Group run. - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId,omitempty"` -} - -// Validate validates this cancel protection group run response params -func (m *CancelProtectionGroupRunResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CancelProtectionGroupRunResponseParams) validateRunID(formats strfmt.Registry) error { - if swag.IsZero(m.RunID) { // not required - return nil - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cancel protection group run response params based on context it is used -func (m *CancelProtectionGroupRunResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancelProtectionGroupRunResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancelProtectionGroupRunResponseParams) UnmarshalBinary(b []byte) error { - var res CancelProtectionGroupRunResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cancellation_timeout_params.go b/v2/models/cancellation_timeout_params.go deleted file mode 100644 index 5d6a101d..00000000 --- a/v2/models/cancellation_timeout_params.go +++ /dev/null @@ -1,122 +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" -) - -// CancellationTimeoutParams Cancellation Timeout Params. -// -// Specifies timeouts for different backup types (kFull, kRegular etc.) -// -// swagger:model CancellationTimeoutParams -type CancellationTimeoutParams struct { - - // Specifies the timeout in mins - TimeoutMins *int64 `json:"timeoutMins,omitempty"` - - // The scheduled backup type(kFull, kRegular etc.) - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - BackupType *string `json:"backupType,omitempty"` -} - -// Validate validates this cancellation timeout params -func (m *CancellationTimeoutParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cancellationTimeoutParamsTypeBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cancellationTimeoutParamsTypeBackupTypePropEnum = append(cancellationTimeoutParamsTypeBackupTypePropEnum, v) - } -} - -const ( - - // CancellationTimeoutParamsBackupTypeKRegular captures enum value "kRegular" - CancellationTimeoutParamsBackupTypeKRegular string = "kRegular" - - // CancellationTimeoutParamsBackupTypeKFull captures enum value "kFull" - CancellationTimeoutParamsBackupTypeKFull string = "kFull" - - // CancellationTimeoutParamsBackupTypeKLog captures enum value "kLog" - CancellationTimeoutParamsBackupTypeKLog string = "kLog" - - // CancellationTimeoutParamsBackupTypeKSystem captures enum value "kSystem" - CancellationTimeoutParamsBackupTypeKSystem string = "kSystem" - - // CancellationTimeoutParamsBackupTypeKHydrateCDP captures enum value "kHydrateCDP" - CancellationTimeoutParamsBackupTypeKHydrateCDP string = "kHydrateCDP" - - // CancellationTimeoutParamsBackupTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - CancellationTimeoutParamsBackupTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *CancellationTimeoutParams) validateBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cancellationTimeoutParamsTypeBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CancellationTimeoutParams) validateBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupType) { // not required - return nil - } - - // value enum - if err := m.validateBackupTypeEnum("backupType", "body", *m.BackupType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cancellation timeout params based on context it is used -func (m *CancellationTimeoutParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CancellationTimeoutParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CancellationTimeoutParams) UnmarshalBinary(b []byte) error { - var res CancellationTimeoutParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/capacity_by_tier.go b/v2/models/capacity_by_tier.go deleted file mode 100644 index 8a1a1de0..00000000 --- a/v2/models/capacity_by_tier.go +++ /dev/null @@ -1,125 +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" -) - -// CapacityByTier Capacity By Tier. -// -// CapacityByTier provides the physical capacity in bytes of each storage -// tier. -// -// swagger:model CapacityByTier -type CapacityByTier struct { - - // StorageTier is the type of StorageTier. - // StorageTierType represents the various values for the Storage Tier. - // 'kPCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'kSATAHDD' indicates storage tier type of SATA Solid State Drive. - // 'kSATAHDD' indicates storage tier type of SATA Hard Disk Drive. - // 'kCLOUD' indicates storage tier type of Cloud. - // Enum: ["PCIeSSD","SATASSD","SATAHDD","CLOUD","INVALID"] - StorageTier *string `json:"storageTier,omitempty"` - - // maxPhysicalCapacityBytesTier is the maximum physical capacity in bytes of the storage tier. - MaxPhysicalCapacityBytesTier *int64 `json:"maxPhysicalCapacityBytesTier,omitempty"` -} - -// Validate validates this capacity by tier -func (m *CapacityByTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var capacityByTierTypeStorageTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATASSD","SATAHDD","CLOUD","INVALID"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - capacityByTierTypeStorageTierPropEnum = append(capacityByTierTypeStorageTierPropEnum, v) - } -} - -const ( - - // CapacityByTierStorageTierPCIeSSD captures enum value "PCIeSSD" - CapacityByTierStorageTierPCIeSSD string = "PCIeSSD" - - // CapacityByTierStorageTierSATASSD captures enum value "SATASSD" - CapacityByTierStorageTierSATASSD string = "SATASSD" - - // CapacityByTierStorageTierSATAHDD captures enum value "SATAHDD" - CapacityByTierStorageTierSATAHDD string = "SATAHDD" - - // CapacityByTierStorageTierCLOUD captures enum value "CLOUD" - CapacityByTierStorageTierCLOUD string = "CLOUD" - - // CapacityByTierStorageTierINVALID captures enum value "INVALID" - CapacityByTierStorageTierINVALID string = "INVALID" -) - -// prop value enum -func (m *CapacityByTier) validateStorageTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, capacityByTierTypeStorageTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CapacityByTier) validateStorageTier(formats strfmt.Registry) error { - if swag.IsZero(m.StorageTier) { // not required - return nil - } - - // value enum - if err := m.validateStorageTierEnum("storageTier", "body", *m.StorageTier); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this capacity by tier based on context it is used -func (m *CapacityByTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CapacityByTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CapacityByTier) UnmarshalBinary(b []byte) error { - var res CapacityByTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/capacity_trend_analysis.go b/v2/models/capacity_trend_analysis.go deleted file mode 100644 index 2b2b89ec..00000000 --- a/v2/models/capacity_trend_analysis.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CapacityTrendAnalysis Capacity Trend analysis of the requested sources in the given time range. -// -// swagger:model CapacityTrendAnalysis -type CapacityTrendAnalysis struct { - - // Last updated time of capacity trend. - LastUpdatedTimeUsecs *int64 `json:"lastUpdatedTimeUsecs,omitempty"` - - // Vector of data points. Each data point contains statistics on analysis and downtiered data. - DataPointVec []*CapacityTrendDatapoint `json:"dataPointVec"` -} - -// Validate validates this capacity trend analysis -func (m *CapacityTrendAnalysis) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataPointVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendAnalysis) validateDataPointVec(formats strfmt.Registry) error { - if swag.IsZero(m.DataPointVec) { // not required - return nil - } - - for i := 0; i < len(m.DataPointVec); i++ { - if swag.IsZero(m.DataPointVec[i]) { // not required - continue - } - - if m.DataPointVec[i] != nil { - if err := m.DataPointVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this capacity trend analysis based on the context it is used -func (m *CapacityTrendAnalysis) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataPointVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendAnalysis) contextValidateDataPointVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataPointVec); i++ { - - if m.DataPointVec[i] != nil { - - if swag.IsZero(m.DataPointVec[i]) { // not required - return nil - } - - if err := m.DataPointVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CapacityTrendAnalysis) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CapacityTrendAnalysis) UnmarshalBinary(b []byte) error { - var res CapacityTrendAnalysis - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/capacity_trend_datapoint.go b/v2/models/capacity_trend_datapoint.go deleted file mode 100644 index 75b2609f..00000000 --- a/v2/models/capacity_trend_datapoint.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CapacityTrendDatapoint A data point for the capacity trend analysis chart. -// -// swagger:model CapacityTrendDatapoint -type CapacityTrendDatapoint struct { - - // Specifies an array of tag and its corresponding statistic. - DataPointStats []*CapacityTrendDatapointStats `json:"dataPointStats"` - - // Specifies the timestamp of this data point. - DataPointTimestamp int64 `json:"dataPointTimestamp,omitempty"` - - // Specifies error messages, if any error is encountered while fetching the datapoint stats. - ErrorMessages []string `json:"errorMessages"` -} - -// Validate validates this capacity trend datapoint -func (m *CapacityTrendDatapoint) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataPointStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendDatapoint) validateDataPointStats(formats strfmt.Registry) error { - if swag.IsZero(m.DataPointStats) { // not required - return nil - } - - for i := 0; i < len(m.DataPointStats); i++ { - if swag.IsZero(m.DataPointStats[i]) { // not required - continue - } - - if m.DataPointStats[i] != nil { - if err := m.DataPointStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this capacity trend datapoint based on the context it is used -func (m *CapacityTrendDatapoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataPointStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendDatapoint) contextValidateDataPointStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataPointStats); i++ { - - if m.DataPointStats[i] != nil { - - if swag.IsZero(m.DataPointStats[i]) { // not required - return nil - } - - if err := m.DataPointStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPointStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPointStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CapacityTrendDatapoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CapacityTrendDatapoint) UnmarshalBinary(b []byte) error { - var res CapacityTrendDatapoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/capacity_trend_datapoint_stats.go b/v2/models/capacity_trend_datapoint_stats.go deleted file mode 100644 index b411747e..00000000 --- a/v2/models/capacity_trend_datapoint_stats.go +++ /dev/null @@ -1,112 +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" -) - -// CapacityTrendDatapointStats Stats contained inside a data point of the capacity trend analysis chart. -// -// swagger:model CapacityTrendDatapointStats -type CapacityTrendDatapointStats struct { - - // Specifies the tag information of this statistic. - TagInfo *DataTieringTag `json:"tagInfo,omitempty"` - - // Specifies the size of data corresponding to above tag. - NumBytes *int64 `json:"numBytes,omitempty"` -} - -// Validate validates this capacity trend datapoint stats -func (m *CapacityTrendDatapointStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendDatapointStats) validateTagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TagInfo) { // not required - return nil - } - - if m.TagInfo != nil { - if err := m.TagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this capacity trend datapoint stats based on the context it is used -func (m *CapacityTrendDatapointStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CapacityTrendDatapointStats) contextValidateTagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TagInfo != nil { - - if swag.IsZero(m.TagInfo) { // not required - return nil - } - - if err := m.TagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CapacityTrendDatapointStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CapacityTrendDatapointStats) UnmarshalBinary(b []byte) error { - var res CapacityTrendDatapointStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cascaded_target_configuration.go b/v2/models/cascaded_target_configuration.go deleted file mode 100644 index b7a0b180..00000000 --- a/v2/models/cascaded_target_configuration.go +++ /dev/null @@ -1,125 +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" -) - -// CascadedTargetConfiguration Specifies the source of the cascadded replication and list of all remote targets that needs to added. Each source cluster and remote targets are considered as nodes and immediate connections between them are considered as edges. -// -// swagger:model CascadedTargetConfiguration -type CascadedTargetConfiguration struct { - - // Specifies the source cluster id from where the remote operations will be performed to the next set of remote targets. - // Required: true - SourceClusterID *int64 `json:"sourceClusterId"` - - // Specifies the list of remote targets that need to be added from the current source. - // Required: true - RemoteTargets *TargetsConfiguration `json:"remoteTargets"` -} - -// Validate validates this cascaded target configuration -func (m *CascadedTargetConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CascadedTargetConfiguration) validateSourceClusterID(formats strfmt.Registry) error { - - if err := validate.Required("sourceClusterId", "body", m.SourceClusterID); err != nil { - return err - } - - return nil -} - -func (m *CascadedTargetConfiguration) validateRemoteTargets(formats strfmt.Registry) error { - - if err := validate.Required("remoteTargets", "body", m.RemoteTargets); err != nil { - return err - } - - if m.RemoteTargets != nil { - if err := m.RemoteTargets.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargets") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargets") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cascaded target configuration based on the context it is used -func (m *CascadedTargetConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CascadedTargetConfiguration) contextValidateRemoteTargets(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteTargets != nil { - - if err := m.RemoteTargets.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargets") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargets") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CascadedTargetConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CascadedTargetConfiguration) UnmarshalBinary(b []byte) error { - var res CascadedTargetConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_auth_type.go b/v2/models/cassandra_auth_type.go deleted file mode 100644 index 2bd67424..00000000 --- a/v2/models/cassandra_auth_type.go +++ /dev/null @@ -1,110 +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" -) - -// CassandraAuthType Enumeration of all the Cassandra Authentication types. -// -// Enumeration of all the Cassandra Authentication types. -// -// swagger:model CassandraAuthType -type CassandraAuthType struct { - - // Enumeration of all the Cassandra Authentication. - // Enum: ["PASSWORD","KERBEROS","LDAP"] - CassandraAuthType string `json:"CassandraAuthType,omitempty"` -} - -// Validate validates this cassandra auth type -func (m *CassandraAuthType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraAuthTypeTypeCassandraAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PASSWORD","KERBEROS","LDAP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraAuthTypeTypeCassandraAuthTypePropEnum = append(cassandraAuthTypeTypeCassandraAuthTypePropEnum, v) - } -} - -const ( - - // CassandraAuthTypeCassandraAuthTypePASSWORD captures enum value "PASSWORD" - CassandraAuthTypeCassandraAuthTypePASSWORD string = "PASSWORD" - - // CassandraAuthTypeCassandraAuthTypeKERBEROS captures enum value "KERBEROS" - CassandraAuthTypeCassandraAuthTypeKERBEROS string = "KERBEROS" - - // CassandraAuthTypeCassandraAuthTypeLDAP captures enum value "LDAP" - CassandraAuthTypeCassandraAuthTypeLDAP string = "LDAP" -) - -// prop value enum -func (m *CassandraAuthType) validateCassandraAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraAuthTypeTypeCassandraAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraAuthType) validateCassandraAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAuthType) { // not required - return nil - } - - // value enum - if err := m.validateCassandraAuthTypeEnum("CassandraAuthType", "body", m.CassandraAuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra auth type based on context it is used -func (m *CassandraAuthType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraAuthType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraAuthType) UnmarshalBinary(b []byte) error { - var res CassandraAuthType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_connection_params.go b/v2/models/cassandra_connection_params.go deleted file mode 100644 index 35bbc62b..00000000 --- a/v2/models/cassandra_connection_params.go +++ /dev/null @@ -1,234 +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" -) - -// CassandraConnectionParams Parameters to connect and query cassandra config file. -// -// Specifies the parameters to connect to a Cassandra seed node and fetch information from its cassandra config file. -// -// swagger:model CassandraConnectionParams -type CassandraConnectionParams struct { - - // Any one seed node of the Cassandra cluster. - // Required: true - SeedNode *string `json:"seedNode"` - - // Directory path containing Cassandra configuration YAML file. - // Required: true - ConfigDirectory *string `json:"configDirectory"` - - // Directory from where DSE specific configuration can be read. This should be set only when you are using the DSE distribution of Cassandra. - DseConfigurationDirectory *string `json:"dseConfigurationDirectory,omitempty"` - - // Set to true if this cluster has DSE tiered storage. - // Required: true - IsDseTieredStorage *bool `json:"isDseTieredStorage"` - - // Set to true if this cluster has DSE Authenticator. - // Required: true - IsDseAuthenticator *bool `json:"isDseAuthenticator"` - - // SSH username + password that will be used for reading configuration file and for scp backup.Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. - SSHPasswordCredentials *SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // SSH userID + privateKey that will be used for reading configuration file and for scp backup. - SSHPrivateKeyCredentials *SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// Validate validates this cassandra connection params -func (m *CassandraConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSeedNode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsDseTieredStorage(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsDseAuthenticator(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraConnectionParams) validateSeedNode(formats strfmt.Registry) error { - - if err := validate.Required("seedNode", "body", m.SeedNode); err != nil { - return err - } - - return nil -} - -func (m *CassandraConnectionParams) validateConfigDirectory(formats strfmt.Registry) error { - - if err := validate.Required("configDirectory", "body", m.ConfigDirectory); err != nil { - return err - } - - return nil -} - -func (m *CassandraConnectionParams) validateIsDseTieredStorage(formats strfmt.Registry) error { - - if err := validate.Required("isDseTieredStorage", "body", m.IsDseTieredStorage); err != nil { - return err - } - - return nil -} - -func (m *CassandraConnectionParams) validateIsDseAuthenticator(formats strfmt.Registry) error { - - if err := validate.Required("isDseAuthenticator", "body", m.IsDseAuthenticator); err != nil { - return err - } - - return nil -} - -func (m *CassandraConnectionParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraConnectionParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra connection params based on the context it is used -func (m *CassandraConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraConnectionParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraConnectionParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraConnectionParams) UnmarshalBinary(b []byte) error { - var res CassandraConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_indexed_object.go b/v2/models/cassandra_indexed_object.go deleted file mode 100644 index 54705bb7..00000000 --- a/v2/models/cassandra_indexed_object.go +++ /dev/null @@ -1,221 +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" -) - -// CassandraIndexedObject CassandraIndexedObject -// -// Specifies a Cassandra indexed object. -// -// swagger:model CassandraIndexedObject -type CassandraIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the Cassandra Object type. - // Enum: ["CassandraKeyspaces","CassandraTables"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` - - // Specifies type of Keyspace. - // Enum: ["kRegular","kGraph","kSystem"] - KeyspaceType *string `json:"keyspaceType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CassandraIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - KeyspaceType *string `json:"keyspaceType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - m.KeyspaceType = dataAO1.KeyspaceType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CassandraIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - KeyspaceType *string `json:"keyspaceType,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - dataAO1.KeyspaceType = m.KeyspaceType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cassandra indexed object -func (m *CassandraIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyspaceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CassandraKeyspaces","CassandraTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraIndexedObjectTypeTypePropEnum = append(cassandraIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *CassandraIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var cassandraIndexedObjectTypeKeyspaceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kGraph","kSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraIndexedObjectTypeKeyspaceTypePropEnum = append(cassandraIndexedObjectTypeKeyspaceTypePropEnum, v) - } -} - -// property enum -func (m *CassandraIndexedObject) validateKeyspaceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraIndexedObjectTypeKeyspaceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraIndexedObject) validateKeyspaceType(formats strfmt.Registry) error { - - if swag.IsZero(m.KeyspaceType) { // not required - return nil - } - - // value enum - if err := m.validateKeyspaceTypeEnum("keyspaceType", "body", *m.KeyspaceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cassandra indexed object based on the context it is used -func (m *CassandraIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraIndexedObject) UnmarshalBinary(b []byte) error { - var res CassandraIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_indexed_objects.go b/v2/models/cassandra_indexed_objects.go deleted file mode 100644 index 1f3ddbb1..00000000 --- a/v2/models/cassandra_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CassandraIndexedObjects Specifies the indexed Cassandra objects. -// -// swagger:model CassandraIndexedObjects -type CassandraIndexedObjects []*CassandraIndexedObject - -// Validate validates this cassandra indexed objects -func (m CassandraIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cassandra indexed objects based on the context it is used -func (m CassandraIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/cassandra_on_prem_search_params.go b/v2/models/cassandra_on_prem_search_params.go deleted file mode 100644 index 1107b4a2..00000000 --- a/v2/models/cassandra_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// CassandraOnPremSearchParams CassandraOnPremSearchParams -// -// Parameters required to search Cassandra on a cluster. -// -// swagger:model CassandraOnPremSearchParams -type CassandraOnPremSearchParams struct { - CassandraSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CassandraOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CassandraSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CassandraSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CassandraOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CassandraSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cassandra on prem search params -func (m *CassandraOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraSearchParams - if err := m.CassandraSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cassandra on prem search params based on the context it is used -func (m *CassandraOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraSearchParams - if err := m.CassandraSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res CassandraOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_params.go b/v2/models/cassandra_params.go deleted file mode 100644 index 9cdc80c5..00000000 --- a/v2/models/cassandra_params.go +++ /dev/null @@ -1,166 +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" -) - -// CassandraParams Recover Cassandra environment params. -// -// Specifies the recovery options specific to Cassandra environment. -// -// swagger:model CassandraParams -type CassandraParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies whether the current recovery operation is a multi-stage restore operation. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // Specifies whether to continue recovering other objects if one of Object failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the parameters to recover Cassandra objects. - // Required: true - RecoverCassandraParams *RecoverCassandraParams `json:"recoverCassandraParams"` -} - -// Validate validates this cassandra params -func (m *CassandraParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverCassandraParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraParamsTypeRecoveryActionPropEnum = append(cassandraParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // CassandraParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - CassandraParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *CassandraParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *CassandraParams) validateRecoverCassandraParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverCassandraParams", "body", m.RecoverCassandraParams); err != nil { - return err - } - - if m.RecoverCassandraParams != nil { - if err := m.RecoverCassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverCassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverCassandraParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra params based on the context it is used -func (m *CassandraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraParams) contextValidateRecoverCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverCassandraParams != nil { - - if err := m.RecoverCassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverCassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverCassandraParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraParams) UnmarshalBinary(b []byte) error { - var res CassandraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_port_info.go b/v2/models/cassandra_port_info.go deleted file mode 100644 index 17d28595..00000000 --- a/v2/models/cassandra_port_info.go +++ /dev/null @@ -1,64 +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" -) - -// CassandraPortInfo Cassandra specific port info. -// -// Contains info about specific cassandra ports. -// -// swagger:model CassandraPortInfo -type CassandraPortInfo struct { - - // Port for the CQL native transport. - NativeTransportPort *int32 `json:"nativeTransportPort,omitempty"` - - // Remote Procedure Call (RPC) port for general mechanism for client-server applications. - RPCPort *int32 `json:"rpcPort,omitempty"` - - // TCP port for data. Internally used by Cassandra bulk loader. - StoragePort *int32 `json:"storagePort,omitempty"` - - // SSL port for encrypted communication. Internally used by the Cassandra bulk loader. - SslStoragePort *int32 `json:"sslStoragePort,omitempty"` - - // Cassandra management port. - JmxPort *int32 `json:"jmxPort,omitempty"` -} - -// Validate validates this cassandra port info -func (m *CassandraPortInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra port info based on context it is used -func (m *CassandraPortInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraPortInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraPortInfo) UnmarshalBinary(b []byte) error { - var res CassandraPortInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_protection_group_params.go b/v2/models/cassandra_protection_group_params.go deleted file mode 100644 index fc195e76..00000000 --- a/v2/models/cassandra_protection_group_params.go +++ /dev/null @@ -1,139 +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" -) - -// CassandraProtectionGroupParams Specifies the parameters for Cassandra Protection Group. -// -// swagger:model CassandraProtectionGroupParams -type CassandraProtectionGroupParams struct { - NoSQLProtectionGroupParams - - // Only the specified data centers will be considered while taking backup. The keyspaces having replication strategy 'Simple' can be backed up only if all the datacenters for the cassandra cluster are specified. For any keyspace having replication strategy as 'Network', all the associated data centers should be specified. - DataCenters []string `json:"dataCenters"` - - // Specifies the type of job for Cassandra. If true, only log backup job will be scheduled for the source. This requires a policy with log Backup option enabled. - IsLogBackup *bool `json:"isLogBackup,omitempty"` - - // Specifies whether this ia a system keyspace backup job. - IsSystemKeyspaceBackup *bool `json:"isSystemKeyspaceBackup,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CassandraProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NoSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NoSQLProtectionGroupParams = aO0 - - // AO1 - var dataAO1 struct { - DataCenters []string `json:"dataCenters"` - - IsLogBackup *bool `json:"isLogBackup,omitempty"` - - IsSystemKeyspaceBackup *bool `json:"isSystemKeyspaceBackup,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DataCenters = dataAO1.DataCenters - - m.IsLogBackup = dataAO1.IsLogBackup - - m.IsSystemKeyspaceBackup = dataAO1.IsSystemKeyspaceBackup - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CassandraProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.NoSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DataCenters []string `json:"dataCenters"` - - IsLogBackup *bool `json:"isLogBackup,omitempty"` - - IsSystemKeyspaceBackup *bool `json:"isSystemKeyspaceBackup,omitempty"` - } - - dataAO1.DataCenters = m.DataCenters - - dataAO1.IsLogBackup = m.IsLogBackup - - dataAO1.IsSystemKeyspaceBackup = m.IsSystemKeyspaceBackup - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cassandra protection group params -func (m *CassandraProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NoSQLProtectionGroupParams - if err := m.NoSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cassandra protection group params based on the context it is used -func (m *CassandraProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NoSQLProtectionGroupParams - if err := m.NoSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res CassandraProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_protection_run_params.go b/v2/models/cassandra_protection_run_params.go deleted file mode 100644 index 245eae6c..00000000 --- a/v2/models/cassandra_protection_run_params.go +++ /dev/null @@ -1,50 +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" -) - -// CassandraProtectionRunParams Specifies the parameters for Cassandra Adapter protection run. -// -// swagger:model CassandraProtectionRunParams -type CassandraProtectionRunParams struct { - - // Specifies the parameters to set this cluster as primary and trigger a new protection run for Log backup job. Default value is false. - SetPrimaryForLog *bool `json:"setPrimaryForLog,omitempty"` -} - -// Validate validates this cassandra protection run params -func (m *CassandraProtectionRunParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cassandra protection run params based on context it is used -func (m *CassandraProtectionRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraProtectionRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraProtectionRunParams) UnmarshalBinary(b []byte) error { - var res CassandraProtectionRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_search_params.go b/v2/models/cassandra_search_params.go deleted file mode 100644 index f38cf16d..00000000 --- a/v2/models/cassandra_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CassandraSearchParams Specifies the parameters which are specific for searching Cassandra objects. -// -// swagger:model CassandraSearchParams -type CassandraSearchParams struct { - - // Specifies the search string to search the Cassandra Objects - // Required: true - SearchString *string `json:"searchString"` - - // Specifies one or more Cassandra object types to be searched. - // Required: true - CassandraObjectTypes []string `json:"cassandraObjectTypes"` -} - -// Validate validates this cassandra search params -func (m *CassandraSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraObjectTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var cassandraSearchParamsCassandraObjectTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CassandraKeyspaces","CassandraTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraSearchParamsCassandraObjectTypesItemsEnum = append(cassandraSearchParamsCassandraObjectTypesItemsEnum, v) - } -} - -func (m *CassandraSearchParams) validateCassandraObjectTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraSearchParamsCassandraObjectTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraSearchParams) validateCassandraObjectTypes(formats strfmt.Registry) error { - - if err := validate.Required("cassandraObjectTypes", "body", m.CassandraObjectTypes); err != nil { - return err - } - - for i := 0; i < len(m.CassandraObjectTypes); i++ { - - // value enum - if err := m.validateCassandraObjectTypesItemsEnum("cassandraObjectTypes"+"."+strconv.Itoa(i), "body", m.CassandraObjectTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this cassandra search params based on context it is used -func (m *CassandraSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSearchParams) UnmarshalBinary(b []byte) error { - var res CassandraSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_security_info.go b/v2/models/cassandra_security_info.go deleted file mode 100644 index e65558c1..00000000 --- a/v2/models/cassandra_security_info.go +++ /dev/null @@ -1,128 +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" -) - -// CassandraSecurityInfo Cassandra security info. -// -// Cassandra security related info. -// -// swagger:model CassandraSecurityInfo -type CassandraSecurityInfo struct { - - // Cassandra Authenticator/Authorizer. - CassandraAuthorizer *string `json:"cassandraAuthorizer,omitempty"` - - // Is Cassandra authentication required ? - CassandraAuthRequired *bool `json:"cassandraAuthRequired,omitempty"` - - // Cassandra Authentication type. - // Enum: ["PASSWORD","KERBEROS","LDAP"] - CassandraAuthType *string `json:"cassandraAuthType,omitempty"` - - // Is DSE Authorization enabled for this cluster ? - DseAuthorization *bool `json:"dseAuthorization,omitempty"` - - // Is Client Encryption enabled for this cluster ? - ClientEncryption *bool `json:"clientEncryption,omitempty"` - - // 'Server internal node Encryption' type. - ServerInternodeEncryptionType *string `json:"serverInternodeEncryptionType,omitempty"` - - // Is 'Server encryption request client authentication' enabled for this cluster ? - ServerEncryptionReqClientAuth *bool `json:"serverEncryptionReqClientAuth,omitempty"` -} - -// Validate validates this cassandra security info -func (m *CassandraSecurityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cassandraSecurityInfoTypeCassandraAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PASSWORD","KERBEROS","LDAP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cassandraSecurityInfoTypeCassandraAuthTypePropEnum = append(cassandraSecurityInfoTypeCassandraAuthTypePropEnum, v) - } -} - -const ( - - // CassandraSecurityInfoCassandraAuthTypePASSWORD captures enum value "PASSWORD" - CassandraSecurityInfoCassandraAuthTypePASSWORD string = "PASSWORD" - - // CassandraSecurityInfoCassandraAuthTypeKERBEROS captures enum value "KERBEROS" - CassandraSecurityInfoCassandraAuthTypeKERBEROS string = "KERBEROS" - - // CassandraSecurityInfoCassandraAuthTypeLDAP captures enum value "LDAP" - CassandraSecurityInfoCassandraAuthTypeLDAP string = "LDAP" -) - -// prop value enum -func (m *CassandraSecurityInfo) validateCassandraAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cassandraSecurityInfoTypeCassandraAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CassandraSecurityInfo) validateCassandraAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraAuthType) { // not required - return nil - } - - // value enum - if err := m.validateCassandraAuthTypeEnum("cassandraAuthType", "body", *m.CassandraAuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra security info based on context it is used -func (m *CassandraSecurityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSecurityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSecurityInfo) UnmarshalBinary(b []byte) error { - var res CassandraSecurityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_source_config_params.go b/v2/models/cassandra_source_config_params.go deleted file mode 100644 index d00784ea..00000000 --- a/v2/models/cassandra_source_config_params.go +++ /dev/null @@ -1,189 +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" -) - -// CassandraSourceConfigParams Parameters fetched by reading cassandra config file. -// -// Specifies the parameters fetched by reading cassandra configuration on the seed node. -// -// swagger:model CassandraSourceConfigParams -type CassandraSourceConfigParams struct { - - // Seed nodes of this cluster. - Seeds []string `json:"seeds"` - - // Is JMX Authentication enabled in this cluster ? - IsJmxAuthEnable *bool `json:"isJmxAuthEnable,omitempty"` - - // Info about specific cassandra ports. - CassandraPortInfo *CassandraPortInfo `json:"cassandraPortInfo,omitempty"` - - // Cassandra security related info. - CassandraSecurityInfo *CassandraSecurityInfo `json:"cassandraSecurityInfo,omitempty"` - - // Data centers for this cluster. - DataCenterNames []string `json:"dataCenterNames"` - - // Commit Logs backup location on cassandra nodes - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - // Endpoint snitch used for this cluster. - EndpointSnitch *string `json:"endpointSnitch,omitempty"` - - // Cassandra partitioner required in compaction. - CassandraPartitioner *string `json:"cassandraPartitioner,omitempty"` - - // Populated if cassandraAuthType is Kerberos. - KerberosSaslProtocol *string `json:"kerberosSaslProtocol,omitempty"` - - // Cassandra Version. - CassandraVersion *string `json:"cassandraVersion,omitempty"` - - // DSE Version - DseVersion *string `json:"dseVersion,omitempty"` -} - -// Validate validates this cassandra source config params -func (m *CassandraSourceConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCassandraPortInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraSecurityInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceConfigParams) validateCassandraPortInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraPortInfo) { // not required - return nil - } - - if m.CassandraPortInfo != nil { - if err := m.CassandraPortInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceConfigParams) validateCassandraSecurityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if m.CassandraSecurityInfo != nil { - if err := m.CassandraSecurityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra source config params based on the context it is used -func (m *CassandraSourceConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraPortInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraSecurityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceConfigParams) contextValidateCassandraPortInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraPortInfo != nil { - - if swag.IsZero(m.CassandraPortInfo) { // not required - return nil - } - - if err := m.CassandraPortInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraPortInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraPortInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceConfigParams) contextValidateCassandraSecurityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraSecurityInfo != nil { - - if swag.IsZero(m.CassandraSecurityInfo) { // not required - return nil - } - - if err := m.CassandraSecurityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraSecurityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraSecurityInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceConfigParams) UnmarshalBinary(b []byte) error { - var res CassandraSourceConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_source_registration_params.go b/v2/models/cassandra_source_registration_params.go deleted file mode 100644 index e0ffc06a..00000000 --- a/v2/models/cassandra_source_registration_params.go +++ /dev/null @@ -1,468 +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" -) - -// CassandraSourceRegistrationParams Register cassandra source request parameters. -// -// Specifies parameters to register cassandra source. -// -// swagger:model CassandraSourceRegistrationParams -type CassandraSourceRegistrationParams struct { - CassandraConnectionParams - - // Data centers for this cluster. - DataCenterNames []string `json:"dataCenterNames"` - - // Commit Logs backup location on cassandra nodes - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - // Principal for the kerberos connection. (This is required only if your Cassandra has Kerberos authentication. Please refer to the user guide.) - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Contains information about the DSE Solr on this cluster. - DseSolrInfo *DSESolrInfo `json:"dseSolrInfo,omitempty"` - - // cassandra credentials - CassandraCredentials *CassandraSourceRegistrationParamsAO1CassandraCredentials `json:"cassandraCredentials,omitempty"` - - // jmx credentials - JmxCredentials *CassandraSourceRegistrationParamsAO1JmxCredentials `json:"jmxCredentials,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CassandraSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CassandraConnectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CassandraConnectionParams = aO0 - - // AO1 - var dataAO1 struct { - DataCenterNames []string `json:"dataCenterNames"` - - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - DseSolrInfo *DSESolrInfo `json:"dseSolrInfo,omitempty"` - - CassandraCredentials *CassandraSourceRegistrationParamsAO1CassandraCredentials `json:"cassandraCredentials,omitempty"` - - JmxCredentials *CassandraSourceRegistrationParamsAO1JmxCredentials `json:"jmxCredentials,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DataCenterNames = dataAO1.DataCenterNames - - m.CommitLogBackupLocation = dataAO1.CommitLogBackupLocation - - m.KerberosPrincipal = dataAO1.KerberosPrincipal - - m.DseSolrInfo = dataAO1.DseSolrInfo - - m.CassandraCredentials = dataAO1.CassandraCredentials - - m.JmxCredentials = dataAO1.JmxCredentials - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CassandraSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CassandraConnectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DataCenterNames []string `json:"dataCenterNames"` - - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - DseSolrInfo *DSESolrInfo `json:"dseSolrInfo,omitempty"` - - CassandraCredentials *CassandraSourceRegistrationParamsAO1CassandraCredentials `json:"cassandraCredentials,omitempty"` - - JmxCredentials *CassandraSourceRegistrationParamsAO1JmxCredentials `json:"jmxCredentials,omitempty"` - } - - dataAO1.DataCenterNames = m.DataCenterNames - - dataAO1.CommitLogBackupLocation = m.CommitLogBackupLocation - - dataAO1.KerberosPrincipal = m.KerberosPrincipal - - dataAO1.DseSolrInfo = m.DseSolrInfo - - dataAO1.CassandraCredentials = m.CassandraCredentials - - dataAO1.JmxCredentials = m.JmxCredentials - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cassandra source registration params -func (m *CassandraSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraConnectionParams - if err := m.CassandraConnectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDseSolrInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJmxCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationParams) validateDseSolrInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if m.DseSolrInfo != nil { - if err := m.DseSolrInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationParams) validateCassandraCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if m.CassandraCredentials != nil { - if err := m.CassandraCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationParams) validateJmxCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if m.JmxCredentials != nil { - if err := m.JmxCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra source registration params based on the context it is used -func (m *CassandraSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraConnectionParams - if err := m.CassandraConnectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDseSolrInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJmxCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationParams) contextValidateDseSolrInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DseSolrInfo != nil { - - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if err := m.DseSolrInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationParams) contextValidateCassandraCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraCredentials != nil { - - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if err := m.CassandraCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationParams) contextValidateJmxCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.JmxCredentials != nil { - - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if err := m.JmxCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// CassandraSourceRegistrationParamsAO1CassandraCredentials Cassandra Credentials for this cluster. -// -// swagger:model CassandraSourceRegistrationParamsAO1CassandraCredentials -type CassandraSourceRegistrationParamsAO1CassandraCredentials struct { - - // Cassandra password. - // Required: true - Password *string `json:"password"` - - // Cassandra username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this cassandra source registration params a o1 cassandra credentials -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("cassandraCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("cassandraCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra source registration params a o1 cassandra credentials based on context it is used -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationParamsAO1CassandraCredentials) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationParamsAO1CassandraCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// CassandraSourceRegistrationParamsAO1JmxCredentials JMX Credentials for this cluster. These should be the same for all the nodes -// -// swagger:model CassandraSourceRegistrationParamsAO1JmxCredentials -type CassandraSourceRegistrationParamsAO1JmxCredentials struct { - - // JMX password. - // Required: true - Password *string `json:"password"` - - // JMX username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this cassandra source registration params a o1 jmx credentials -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("jmxCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("jmxCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra source registration params a o1 jmx credentials based on context it is used -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationParamsAO1JmxCredentials) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationParamsAO1JmxCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cassandra_source_registration_patch_params.go b/v2/models/cassandra_source_registration_patch_params.go deleted file mode 100644 index 13a0b2eb..00000000 --- a/v2/models/cassandra_source_registration_patch_params.go +++ /dev/null @@ -1,486 +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" -) - -// CassandraSourceRegistrationPatchParams Update cassandra source request parameters. -// -// Specifies parameters to update cassandra source. -// -// swagger:model CassandraSourceRegistrationPatchParams -type CassandraSourceRegistrationPatchParams struct { - - // Any one seed node of the Cassandra cluster. - SeedNode *string `json:"seedNode,omitempty"` - - // Directory path containing Cassandra configuration YAML file. - ConfigDirectory *string `json:"configDirectory,omitempty"` - - // Directory from where DSE specific configuration can be read. This should be set only when you are using the DSE distribution of Cassandra. - DseConfigurationDirectory *string `json:"dseConfigurationDirectory,omitempty"` - - // Set to true if this cluster has DSE tiered storage. - IsDseTieredStorage *bool `json:"isDseTieredStorage,omitempty"` - - // Set to true if this cluster has DSE Authenticator. - IsDseAuthenticator *bool `json:"isDseAuthenticator,omitempty"` - - // SSH username + password that will be used for reading configuration file and for scp backup.Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. - SSHPasswordCredentials *SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // SSH userID + privateKey that will be used for reading configuration file and for scp backup. - SSHPrivateKeyCredentials *SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - - // Data centers for this cluster. - DataCenterNames []string `json:"dataCenterNames"` - - // Commit Logs backup location on cassandra nodes - CommitLogBackupLocation *string `json:"commitLogBackupLocation,omitempty"` - - // Principal for the kerberos connection. (This is required only if your Cassandra has Kerberos authentication. Please refer to the user guide.) - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // Contains information about the DSE Solr on this cluster. - DseSolrInfo *DSESolrInfo `json:"dseSolrInfo,omitempty"` - - // cassandra credentials - CassandraCredentials *CassandraSourceRegistrationPatchParamsCassandraCredentials `json:"cassandraCredentials,omitempty"` - - // jmx credentials - JmxCredentials *CassandraSourceRegistrationPatchParamsJmxCredentials `json:"jmxCredentials,omitempty"` -} - -// Validate validates this cassandra source registration patch params -func (m *CassandraSourceRegistrationPatchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDseSolrInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJmxCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) validateDseSolrInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if m.DseSolrInfo != nil { - if err := m.DseSolrInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) validateCassandraCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if m.CassandraCredentials != nil { - if err := m.CassandraCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) validateJmxCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if m.JmxCredentials != nil { - if err := m.JmxCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cassandra source registration patch params based on the context it is used -func (m *CassandraSourceRegistrationPatchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDseSolrInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJmxCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) contextValidateDseSolrInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DseSolrInfo != nil { - - if swag.IsZero(m.DseSolrInfo) { // not required - return nil - } - - if err := m.DseSolrInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dseSolrInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dseSolrInfo") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) contextValidateCassandraCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraCredentials != nil { - - if swag.IsZero(m.CassandraCredentials) { // not required - return nil - } - - if err := m.CassandraCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraCredentials") - } - return err - } - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParams) contextValidateJmxCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.JmxCredentials != nil { - - if swag.IsZero(m.JmxCredentials) { // not required - return nil - } - - if err := m.JmxCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jmxCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jmxCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParams) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationPatchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// CassandraSourceRegistrationPatchParamsCassandraCredentials Cassandra Credentials for this cluster. -// -// swagger:model CassandraSourceRegistrationPatchParamsCassandraCredentials -type CassandraSourceRegistrationPatchParamsCassandraCredentials struct { - - // Cassandra password. - // Required: true - Password *string `json:"password"` - - // Cassandra username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this cassandra source registration patch params cassandra credentials -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("cassandraCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("cassandraCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra source registration patch params cassandra credentials based on context it is used -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParamsCassandraCredentials) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationPatchParamsCassandraCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// CassandraSourceRegistrationPatchParamsJmxCredentials JMX Credentials for this cluster. These should be the same for all the nodes -// -// swagger:model CassandraSourceRegistrationPatchParamsJmxCredentials -type CassandraSourceRegistrationPatchParamsJmxCredentials struct { - - // JMX password. - // Required: true - Password *string `json:"password"` - - // JMX username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this cassandra source registration patch params jmx credentials -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("jmxCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("jmxCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cassandra source registration patch params jmx credentials based on context it is used -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CassandraSourceRegistrationPatchParamsJmxCredentials) UnmarshalBinary(b []byte) error { - var res CassandraSourceRegistrationPatchParamsJmxCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cdp_backup_policy.go b/v2/models/cdp_backup_policy.go deleted file mode 100644 index c3dbf16b..00000000 --- a/v2/models/cdp_backup_policy.go +++ /dev/null @@ -1,110 +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" -) - -// CdpBackupPolicy Continious Data Protection (CDP) Policy. -// -// Specifies CDP (Continious Data Protection) backup settings for a Protection Group. -// -// swagger:model CdpBackupPolicy -type CdpBackupPolicy struct { - - // Specifies the Retention period of a log backup in days, months or years. - // Required: true - Retention *CdpRetention `json:"retention"` -} - -// Validate validates this cdp backup policy -func (m *CdpBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpBackupPolicy) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this cdp backup policy based on the context it is used -func (m *CdpBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpBackupPolicy) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *CdpBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpBackupPolicy) UnmarshalBinary(b []byte) error { - var res CdpBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cdp_local_backup_info.go b/v2/models/cdp_local_backup_info.go deleted file mode 100644 index d6b58f08..00000000 --- a/v2/models/cdp_local_backup_info.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" -) - -// CdpLocalBackupInfo Specifies the last local backup information for a given CDP object. -// -// swagger:model CdpLocalBackupInfo -type CdpLocalBackupInfo struct { - - // Specifies the start time of the last local backup taken. - StartTimeInUsecs *int64 `json:"startTimeInUsecs,omitempty"` - - // Specifies the end time of the last local backup taken. - EndTimeInUsecs *int64 `json:"endTimeInUsecs,omitempty"` -} - -// Validate validates this cdp local backup info -func (m *CdpLocalBackupInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cdp local backup info based on context it is used -func (m *CdpLocalBackupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CdpLocalBackupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpLocalBackupInfo) UnmarshalBinary(b []byte) error { - var res CdpLocalBackupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cdp_object_info.go b/v2/models/cdp_object_info.go deleted file mode 100644 index c8d42674..00000000 --- a/v2/models/cdp_object_info.go +++ /dev/null @@ -1,133 +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" -) - -// CdpObjectInfo Specifies the CDP related information for a given object. This field will only be populated when protection group is configured with policy having CDP retention settings. -// -// swagger:model CdpObjectInfo -type CdpObjectInfo struct { - - // Specifies whether CDP is currently active or not. CDP might have been active on this object before, but it might not be anymore. - CdpEnabled *bool `json:"cdpEnabled,omitempty"` - - // Specifies if re-enabling CDP is allowed or not through UI without any job or policy update through API. - AllowReEnableCdp *bool `json:"allowReEnableCdp,omitempty"` - - // Specifies the details about last continious backup taken for this object. - LastRunInfo *CdpObjectLastRunInfo `json:"lastRunInfo,omitempty"` - - // Specifies the protection group id to which this CDP object belongs. - // Read Only: true - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` -} - -// Validate validates this cdp object info -func (m *CdpObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastRunInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpObjectInfo) validateLastRunInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LastRunInfo) { // not required - return nil - } - - if m.LastRunInfo != nil { - if err := m.LastRunInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRunInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRunInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp object info based on the context it is used -func (m *CdpObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastRunInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionGroupID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpObjectInfo) contextValidateLastRunInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRunInfo != nil { - - if swag.IsZero(m.LastRunInfo) { // not required - return nil - } - - if err := m.LastRunInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRunInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRunInfo") - } - return err - } - } - - return nil -} - -func (m *CdpObjectInfo) contextValidateProtectionGroupID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "protectionGroupId", "body", m.ProtectionGroupID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpObjectInfo) UnmarshalBinary(b []byte) error { - var res CdpObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cdp_object_last_run_info.go b/v2/models/cdp_object_last_run_info.go deleted file mode 100644 index b3eeeb26..00000000 --- a/v2/models/cdp_object_last_run_info.go +++ /dev/null @@ -1,109 +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" -) - -// CdpObjectLastRunInfo Specifies the last backup information for a given CDP object. -// -// swagger:model CdpObjectLastRunInfo -type CdpObjectLastRunInfo struct { - - // Specifies the last backup information for a given CDP object. - LocalBackupInfo *CdpLocalBackupInfo `json:"localBackupInfo,omitempty"` -} - -// Validate validates this cdp object last run info -func (m *CdpObjectLastRunInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocalBackupInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpObjectLastRunInfo) validateLocalBackupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalBackupInfo) { // not required - return nil - } - - if m.LocalBackupInfo != nil { - if err := m.LocalBackupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localBackupInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp object last run info based on the context it is used -func (m *CdpObjectLastRunInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalBackupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpObjectLastRunInfo) contextValidateLocalBackupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalBackupInfo != nil { - - if swag.IsZero(m.LocalBackupInfo) { // not required - return nil - } - - if err := m.LocalBackupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localBackupInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpObjectLastRunInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpObjectLastRunInfo) UnmarshalBinary(b []byte) error { - var res CdpObjectLastRunInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cdp_retention.go b/v2/models/cdp_retention.go deleted file mode 100644 index b92608ac..00000000 --- a/v2/models/cdp_retention.go +++ /dev/null @@ -1,185 +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" -) - -// CdpRetention Specifies the retention of a CDP backup. -// -// swagger:model CdpRetention -type CdpRetention struct { - - // Specificies the Retention Unit of a CDP backup measured in minutes or hours. - // Required: true - // Enum: ["Minutes","Hours"] - Unit *string `json:"unit"` - - // Specifies the duration for a cdp backup retention. - // Required: true - // Minimum: 1 - Duration *int32 `json:"duration"` - - // Specifies WORM retention type for the 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. - DataLockConfig *DataLockConfig `json:"dataLockConfig,omitempty"` -} - -// Validate validates this cdp retention -func (m *CdpRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cdpRetentionTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cdpRetentionTypeUnitPropEnum = append(cdpRetentionTypeUnitPropEnum, v) - } -} - -const ( - - // CdpRetentionUnitMinutes captures enum value "Minutes" - CdpRetentionUnitMinutes string = "Minutes" - - // CdpRetentionUnitHours captures enum value "Hours" - CdpRetentionUnitHours string = "Hours" -) - -// prop value enum -func (m *CdpRetention) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cdpRetentionTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CdpRetention) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *CdpRetention) validateDuration(formats strfmt.Registry) error { - - if err := validate.Required("duration", "body", m.Duration); err != nil { - return err - } - - if err := validate.MinimumInt("duration", "body", int64(*m.Duration), 1, false); err != nil { - return err - } - - return nil -} - -func (m *CdpRetention) validateDataLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if m.DataLockConfig != nil { - if err := m.DataLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cdp retention based on the context it is used -func (m *CdpRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CdpRetention) contextValidateDataLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConfig != nil { - - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if err := m.DataLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CdpRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CdpRetention) UnmarshalBinary(b []byte) error { - var res CdpRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/centrify_zone.go b/v2/models/centrify_zone.go deleted file mode 100644 index cff040bc..00000000 --- a/v2/models/centrify_zone.go +++ /dev/null @@ -1,204 +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" -) - -// CentrifyZone Specifies a centrify zone. -// -// swagger:model CentrifyZone -type CentrifyZone struct { - - // Specifies a description of the Centrify zone. - // Required: true - Description *string `json:"description"` - - // Specifies the distinguished name of the Centrify zone. - // Required: true - DistinguishedName *string `json:"distinguishedName"` - - // Specifies the schema of this Centrify zone. - // Required: true - // Enum: ["CentrifyDynamicSchema_1_0","CentrifyDynamicSchema_2_0","CentrifySfu_3_0","CentrifySfu_4_0","CentrifyCdcRfc2307","CentrifyDynamicSchema_3_0","CentrifyCdcRfc2307_2","CentrifyDynamicSchema_5_0","CentrifyCdcRfc2307_3","CentrifySfu_3_0_V5"] - Schema *string `json:"schema"` - - // Specifies the zone name of the Centrify zone. - // Read Only: true - ZoneName *string `json:"zoneName,omitempty"` - - // Specifies the zone domain of the Centrify zone. - // Read Only: true - ZoneDomain *string `json:"zoneDomain,omitempty"` -} - -// Validate validates this centrify zone -func (m *CentrifyZone) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDistinguishedName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchema(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CentrifyZone) validateDescription(formats strfmt.Registry) error { - - if err := validate.Required("description", "body", m.Description); err != nil { - return err - } - - return nil -} - -func (m *CentrifyZone) validateDistinguishedName(formats strfmt.Registry) error { - - if err := validate.Required("distinguishedName", "body", m.DistinguishedName); err != nil { - return err - } - - return nil -} - -var centrifyZoneTypeSchemaPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CentrifyDynamicSchema_1_0","CentrifyDynamicSchema_2_0","CentrifySfu_3_0","CentrifySfu_4_0","CentrifyCdcRfc2307","CentrifyDynamicSchema_3_0","CentrifyCdcRfc2307_2","CentrifyDynamicSchema_5_0","CentrifyCdcRfc2307_3","CentrifySfu_3_0_V5"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - centrifyZoneTypeSchemaPropEnum = append(centrifyZoneTypeSchemaPropEnum, v) - } -} - -const ( - - // CentrifyZoneSchemaCentrifyDynamicSchema10 captures enum value "CentrifyDynamicSchema_1_0" - CentrifyZoneSchemaCentrifyDynamicSchema10 string = "CentrifyDynamicSchema_1_0" - - // CentrifyZoneSchemaCentrifyDynamicSchema20 captures enum value "CentrifyDynamicSchema_2_0" - CentrifyZoneSchemaCentrifyDynamicSchema20 string = "CentrifyDynamicSchema_2_0" - - // CentrifyZoneSchemaCentrifySfu30 captures enum value "CentrifySfu_3_0" - CentrifyZoneSchemaCentrifySfu30 string = "CentrifySfu_3_0" - - // CentrifyZoneSchemaCentrifySfu40 captures enum value "CentrifySfu_4_0" - CentrifyZoneSchemaCentrifySfu40 string = "CentrifySfu_4_0" - - // CentrifyZoneSchemaCentrifyCdcRfc2307 captures enum value "CentrifyCdcRfc2307" - CentrifyZoneSchemaCentrifyCdcRfc2307 string = "CentrifyCdcRfc2307" - - // CentrifyZoneSchemaCentrifyDynamicSchema30 captures enum value "CentrifyDynamicSchema_3_0" - CentrifyZoneSchemaCentrifyDynamicSchema30 string = "CentrifyDynamicSchema_3_0" - - // CentrifyZoneSchemaCentrifyCdcRfc23072 captures enum value "CentrifyCdcRfc2307_2" - CentrifyZoneSchemaCentrifyCdcRfc23072 string = "CentrifyCdcRfc2307_2" - - // CentrifyZoneSchemaCentrifyDynamicSchema50 captures enum value "CentrifyDynamicSchema_5_0" - CentrifyZoneSchemaCentrifyDynamicSchema50 string = "CentrifyDynamicSchema_5_0" - - // CentrifyZoneSchemaCentrifyCdcRfc23073 captures enum value "CentrifyCdcRfc2307_3" - CentrifyZoneSchemaCentrifyCdcRfc23073 string = "CentrifyCdcRfc2307_3" - - // CentrifyZoneSchemaCentrifySfu30V5 captures enum value "CentrifySfu_3_0_V5" - CentrifyZoneSchemaCentrifySfu30V5 string = "CentrifySfu_3_0_V5" -) - -// prop value enum -func (m *CentrifyZone) validateSchemaEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, centrifyZoneTypeSchemaPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CentrifyZone) validateSchema(formats strfmt.Registry) error { - - if err := validate.Required("schema", "body", m.Schema); err != nil { - return err - } - - // value enum - if err := m.validateSchemaEnum("schema", "body", *m.Schema); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this centrify zone based on the context it is used -func (m *CentrifyZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateZoneName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateZoneDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CentrifyZone) contextValidateZoneName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "zoneName", "body", m.ZoneName); err != nil { - return err - } - - return nil -} - -func (m *CentrifyZone) contextValidateZoneDomain(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "zoneDomain", "body", m.ZoneDomain); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CentrifyZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CentrifyZone) UnmarshalBinary(b []byte) error { - var res CentrifyZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/centrify_zones.go b/v2/models/centrify_zones.go deleted file mode 100644 index c278a58b..00000000 --- a/v2/models/centrify_zones.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CentrifyZones Specifies a list of centrify zones for a domain. -// -// swagger:model CentrifyZones -type CentrifyZones struct { - - // Specifies a domain name with these centrify zones. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a list of centrify zones for this domain. - CentrifyZones []*CentrifyZone `json:"centrifyZones"` -} - -// Validate validates this centrify zones -func (m *CentrifyZones) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCentrifyZones(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CentrifyZones) validateCentrifyZones(formats strfmt.Registry) error { - if swag.IsZero(m.CentrifyZones) { // not required - return nil - } - - for i := 0; i < len(m.CentrifyZones); i++ { - if swag.IsZero(m.CentrifyZones[i]) { // not required - continue - } - - if m.CentrifyZones[i] != nil { - if err := m.CentrifyZones[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this centrify zones based on the context it is used -func (m *CentrifyZones) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCentrifyZones(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CentrifyZones) contextValidateCentrifyZones(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CentrifyZones); i++ { - - if m.CentrifyZones[i] != nil { - - if swag.IsZero(m.CentrifyZones[i]) { // not required - return nil - } - - if err := m.CentrifyZones[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CentrifyZones) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CentrifyZones) UnmarshalBinary(b []byte) error { - var res CentrifyZones - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/certificate.go b/v2/models/certificate.go deleted file mode 100644 index 2742099a..00000000 --- a/v2/models/certificate.go +++ /dev/null @@ -1,62 +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" -) - -// Certificate Certificate payload -// -// swagger:model Certificate -type Certificate struct { - - // Certificate (pem) to be imported - CertPem []string `json:"certPem"` - - // Private key - PrivateKey string `json:"privateKey,omitempty"` - - // CA chain - CaChainPem []string `json:"caChainPem"` - - // service types - ServiceTypes []string `json:"serviceTypes"` - - // proto type - ProtoType string `json:"protoType,omitempty"` -} - -// Validate validates this certificate -func (m *Certificate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this certificate based on context it is used -func (m *Certificate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Certificate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Certificate) UnmarshalBinary(b []byte) error { - var res Certificate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/certificate_auth_mapping.go b/v2/models/certificate_auth_mapping.go deleted file mode 100644 index 5873844d..00000000 --- a/v2/models/certificate_auth_mapping.go +++ /dev/null @@ -1,111 +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" -) - -// CertificateAuthMapping Certificate Auth Mapping -// -// Describes certificate mapping options for certificate based -// authentication. -// -// swagger:model CertificateAuthMapping -type CertificateAuthMapping struct { - - // Specifies the auth field options - // Enum: ["CommonName","EmailAddress","UserPrincipalName"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this certificate auth mapping -func (m *CertificateAuthMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var certificateAuthMappingTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CommonName","EmailAddress","UserPrincipalName"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - certificateAuthMappingTypeEnumPropEnum = append(certificateAuthMappingTypeEnumPropEnum, v) - } -} - -const ( - - // CertificateAuthMappingEnumCommonName captures enum value "CommonName" - CertificateAuthMappingEnumCommonName string = "CommonName" - - // CertificateAuthMappingEnumEmailAddress captures enum value "EmailAddress" - CertificateAuthMappingEnumEmailAddress string = "EmailAddress" - - // CertificateAuthMappingEnumUserPrincipalName captures enum value "UserPrincipalName" - CertificateAuthMappingEnumUserPrincipalName string = "UserPrincipalName" -) - -// prop value enum -func (m *CertificateAuthMapping) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, certificateAuthMappingTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CertificateAuthMapping) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this certificate auth mapping based on context it is used -func (m *CertificateAuthMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CertificateAuthMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CertificateAuthMapping) UnmarshalBinary(b []byte) error { - var res CertificateAuthMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/certificate_request_params.go b/v2/models/certificate_request_params.go deleted file mode 100644 index 5c572756..00000000 --- a/v2/models/certificate_request_params.go +++ /dev/null @@ -1,250 +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" -) - -// CertificateRequestParams Specifies the parameters of a CSR. -// -// swagger:model CertificateRequestParams -type CertificateRequestParams struct { - - // Specifies the organization attribute, which is part of the distinguished name definition. It is used to specify the name of the company. - // Required: true - Organization *string `json:"organization"` - - // Specifies the organization unit attribute, which is part of the distinguished name definition. It is used to identify the specific department or business unit in the company that is owning the Cluster. - // Required: true - OrganizationUnit *string `json:"organizationUnit"` - - // Specifies the country attribute, which is part of the distinguished name definition. It is used to identify the country where the state is located. It is specified as two letter code defined by the ISO standard. - // Required: true - CountryCode *string `json:"countryCode"` - - // Specifies the state attribute, which is part of the distinguished name definition. It is used to identify the state where the city is located. - // Required: true - State *string `json:"state"` - - // Specifies the locality attribute, which is part of the distinguished name definition. It is used to identify the city where the company is located or the Cluster is installed. - // Required: true - City *string `json:"city"` - - // Specifies the algorithm to be used to generate the key pair. RSA is the default value. - // Enum: ["RSA_3072","RSA_4096","RSA_7680","ECDSA_256","ECDSA_384","ECDSA_512"] - KeyType *string `json:"keyType,omitempty"` - - // Specifies the common name attribute, which is part of the distinguished name definition. Common name is used to specify a context for the certificate, for example, the name of the Cluster to which the certificate is to be assigned. Default value is the name of the Cluster. - // Required: true - CommonName *string `json:"commonName"` - - // Specifies an alternative subject name component to be included in the certificate. It is used to identify the ways the Cluster will be accessed. It is given as a comma separated list of FQDNs. The default value is the Cluster's VIP hostname. - // Min Items: 1 - SanList []string `json:"sanList"` - - // Specifies an alternative subject name component to be included in the certificate. Format is a standard e-mail address, for example joe@company.com. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies duration of the certificate expiry in(hours). - Duration *string `json:"duration,omitempty"` - - // Specifies the tenant id - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this certificate request params -func (m *CertificateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOrganization(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrganizationUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCountryCode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CertificateRequestParams) validateOrganization(formats strfmt.Registry) error { - - if err := validate.Required("organization", "body", m.Organization); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateOrganizationUnit(formats strfmt.Registry) error { - - if err := validate.Required("organizationUnit", "body", m.OrganizationUnit); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateCountryCode(formats strfmt.Registry) error { - - if err := validate.Required("countryCode", "body", m.CountryCode); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateState(formats strfmt.Registry) error { - - if err := validate.Required("state", "body", m.State); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateCity(formats strfmt.Registry) error { - - if err := validate.Required("city", "body", m.City); err != nil { - return err - } - - return nil -} - -var certificateRequestParamsTypeKeyTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RSA_3072","RSA_4096","RSA_7680","ECDSA_256","ECDSA_384","ECDSA_512"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - certificateRequestParamsTypeKeyTypePropEnum = append(certificateRequestParamsTypeKeyTypePropEnum, v) - } -} - -const ( - - // CertificateRequestParamsKeyTypeRSA3072 captures enum value "RSA_3072" - CertificateRequestParamsKeyTypeRSA3072 string = "RSA_3072" - - // CertificateRequestParamsKeyTypeRSA4096 captures enum value "RSA_4096" - CertificateRequestParamsKeyTypeRSA4096 string = "RSA_4096" - - // CertificateRequestParamsKeyTypeRSA7680 captures enum value "RSA_7680" - CertificateRequestParamsKeyTypeRSA7680 string = "RSA_7680" - - // CertificateRequestParamsKeyTypeECDSA256 captures enum value "ECDSA_256" - CertificateRequestParamsKeyTypeECDSA256 string = "ECDSA_256" - - // CertificateRequestParamsKeyTypeECDSA384 captures enum value "ECDSA_384" - CertificateRequestParamsKeyTypeECDSA384 string = "ECDSA_384" - - // CertificateRequestParamsKeyTypeECDSA512 captures enum value "ECDSA_512" - CertificateRequestParamsKeyTypeECDSA512 string = "ECDSA_512" -) - -// prop value enum -func (m *CertificateRequestParams) validateKeyTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, certificateRequestParamsTypeKeyTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CertificateRequestParams) validateKeyType(formats strfmt.Registry) error { - if swag.IsZero(m.KeyType) { // not required - return nil - } - - // value enum - if err := m.validateKeyTypeEnum("keyType", "body", *m.KeyType); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateCommonName(formats strfmt.Registry) error { - - if err := validate.Required("commonName", "body", m.CommonName); err != nil { - return err - } - - return nil -} - -func (m *CertificateRequestParams) validateSanList(formats strfmt.Registry) error { - if swag.IsZero(m.SanList) { // not required - return nil - } - - iSanListSize := int64(len(m.SanList)) - - if err := validate.MinItems("sanList", "body", iSanListSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this certificate request params based on context it is used -func (m *CertificateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CertificateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CertificateRequestParams) UnmarshalBinary(b []byte) error { - var res CertificateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/certificate_validation_status.go b/v2/models/certificate_validation_status.go deleted file mode 100644 index 255b89f0..00000000 --- a/v2/models/certificate_validation_status.go +++ /dev/null @@ -1,113 +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" -) - -// CertificateValidationStatus Certificate Validation Status. -// -// Describes the certificate validation status. -// -// swagger:model CertificateValidationStatus -type CertificateValidationStatus struct { - - // Specifies the certificate validation status - // Enum: ["Valid","Expired","Revoked","Unknown"] - Type string `json:"type,omitempty"` -} - -// Validate validates this certificate validation status -func (m *CertificateValidationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var certificateValidationStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Valid","Expired","Revoked","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - certificateValidationStatusTypeTypePropEnum = append(certificateValidationStatusTypeTypePropEnum, v) - } -} - -const ( - - // CertificateValidationStatusTypeValid captures enum value "Valid" - CertificateValidationStatusTypeValid string = "Valid" - - // CertificateValidationStatusTypeExpired captures enum value "Expired" - CertificateValidationStatusTypeExpired string = "Expired" - - // CertificateValidationStatusTypeRevoked captures enum value "Revoked" - CertificateValidationStatusTypeRevoked string = "Revoked" - - // CertificateValidationStatusTypeUnknown captures enum value "Unknown" - CertificateValidationStatusTypeUnknown string = "Unknown" -) - -// prop value enum -func (m *CertificateValidationStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, certificateValidationStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CertificateValidationStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this certificate validation status based on context it is used -func (m *CertificateValidationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CertificateValidationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CertificateValidationStatus) UnmarshalBinary(b []byte) error { - var res CertificateValidationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/channel_item.go b/v2/models/channel_item.go deleted file mode 100644 index 0884179f..00000000 --- a/v2/models/channel_item.go +++ /dev/null @@ -1,122 +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" -) - -// ChannelItem ChannelItem -// -// Specifies a M365 Teams channel item. -// -// swagger:model ChannelItem -type ChannelItem struct { - - // Specifies the id of this channel. - ChannelID *string `json:"channelId,omitempty"` - - // Specifies the channel type. - // Enum: ["Private","Public"] - ChannelType *string `json:"channelType,omitempty"` - - // Specifies the channel name. - ChannelName *string `json:"channelName,omitempty"` - - // Specifies the Unix timestamp epoch in seconds at which this channel is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // Specifies the names of owners of this channel. - OwnerNames []string `json:"ownerNames"` - - // Specifies the email of this channel. - ChannelEmail *string `json:"channelEmail,omitempty"` -} - -// Validate validates this channel item -func (m *ChannelItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChannelType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var channelItemTypeChannelTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Private","Public"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - channelItemTypeChannelTypePropEnum = append(channelItemTypeChannelTypePropEnum, v) - } -} - -const ( - - // ChannelItemChannelTypePrivate captures enum value "Private" - ChannelItemChannelTypePrivate string = "Private" - - // ChannelItemChannelTypePublic captures enum value "Public" - ChannelItemChannelTypePublic string = "Public" -) - -// prop value enum -func (m *ChannelItem) validateChannelTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, channelItemTypeChannelTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ChannelItem) validateChannelType(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelType) { // not required - return nil - } - - // value enum - if err := m.validateChannelTypeEnum("channelType", "body", *m.ChannelType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this channel item based on context it is used -func (m *ChannelItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChannelItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChannelItem) UnmarshalBinary(b []byte) error { - var res ChannelItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/channel_param.go b/v2/models/channel_param.go deleted file mode 100644 index 12e238ba..00000000 --- a/v2/models/channel_param.go +++ /dev/null @@ -1,210 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ChannelParam Specifies the parameters to recover a Microsoft 365 Teams Channel. -// -// swagger:model ChannelParam -type ChannelParam struct { - - // Specifies the Channel id. - // Required: true - ID *string `json:"id"` - - // Specifies the Channel name. - Name *string `json:"name,omitempty"` - - // Specifies the type of channel public or private - // Enum: ["Private","Public"] - Type string `json:"type,omitempty"` - - // Specifies whether to recover the whole Microsoft 365 Channel. - // Required: true - RecoverEntireChannel *bool `json:"recoverEntireChannel"` - - // Specifies the list of doclibs of the Channel to recover. It is populated iff recoverEntireChannel is false. - DocumentLibraryParams []*OneDriveParam `json:"documentLibraryParams"` -} - -// Validate validates this channel param -func (m *ChannelParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverEntireChannel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDocumentLibraryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChannelParam) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var channelParamTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Private","Public"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - channelParamTypeTypePropEnum = append(channelParamTypeTypePropEnum, v) - } -} - -const ( - - // ChannelParamTypePrivate captures enum value "Private" - ChannelParamTypePrivate string = "Private" - - // ChannelParamTypePublic captures enum value "Public" - ChannelParamTypePublic string = "Public" -) - -// prop value enum -func (m *ChannelParam) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, channelParamTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ChannelParam) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -func (m *ChannelParam) validateRecoverEntireChannel(formats strfmt.Registry) error { - - if err := validate.Required("recoverEntireChannel", "body", m.RecoverEntireChannel); err != nil { - return err - } - - return nil -} - -func (m *ChannelParam) validateDocumentLibraryParams(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentLibraryParams) { // not required - return nil - } - - for i := 0; i < len(m.DocumentLibraryParams); i++ { - if swag.IsZero(m.DocumentLibraryParams[i]) { // not required - continue - } - - if m.DocumentLibraryParams[i] != nil { - if err := m.DocumentLibraryParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this channel param based on the context it is used -func (m *ChannelParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDocumentLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChannelParam) contextValidateDocumentLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DocumentLibraryParams); i++ { - - if m.DocumentLibraryParams[i] != nil { - - if swag.IsZero(m.DocumentLibraryParams[i]) { // not required - return nil - } - - if err := m.DocumentLibraryParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ChannelParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChannelParam) UnmarshalBinary(b []byte) error { - var res ChannelParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/chassis.go b/v2/models/chassis.go deleted file mode 100644 index a8772c7d..00000000 --- a/v2/models/chassis.go +++ /dev/null @@ -1,67 +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" -) - -// Chassis Chassis specific response. -// -// Specifies information about hardware chassis. -// -// swagger:model Chassis -type Chassis struct { - - // Specifies the id of the chassis used to uniquely identify a chassis. - ID *int64 `json:"id,omitempty"` - - // Specifies the hardware model of the chassis. - HardwareModel *string `json:"hardwareModel,omitempty"` - - // Specifies the name of the chassis. - Name *string `json:"name,omitempty"` - - // Specifies the serial number of the chassis. - SerialNumber *string `json:"serialNumber,omitempty"` - - // Specifies list of ids of all the nodes in chassis. - NodeIds []int64 `json:"nodeIds"` - - // Rack Id that this chassis belong to - RackID *int64 `json:"rackId,omitempty"` -} - -// Validate validates this chassis -func (m *Chassis) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this chassis based on context it is used -func (m *Chassis) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Chassis) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Chassis) UnmarshalBinary(b []byte) error { - var res Chassis - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/chassis_info.go b/v2/models/chassis_info.go deleted file mode 100644 index cf02929b..00000000 --- a/v2/models/chassis_info.go +++ /dev/null @@ -1,65 +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" -) - -// ChassisInfo Chassis Information. -// -// ChassisInfo is the struct for the Chassis. -// -// swagger:model ChassisInfo -type ChassisInfo struct { - - // ChassisId is a unique id assigned to the chassis. - ChassisID *int64 `json:"chassisId,omitempty"` - - // ChassisName is the name of the chassis. This could be the chassis serial - // number by default. - ChassisName *string `json:"chassisName,omitempty"` - - // Chassis serial. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Location is the location of the chassis within the rack. - Location *string `json:"location,omitempty"` - - // Rack is the rack within which this chassis lives. - RackID *int64 `json:"rackId,omitempty"` -} - -// Validate validates this chassis info -func (m *ChassisInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this chassis info based on context it is used -func (m *ChassisInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChassisInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChassisInfo) UnmarshalBinary(b []byte) error { - var res ChassisInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/chassis_list.go b/v2/models/chassis_list.go deleted file mode 100644 index f6566eb8..00000000 --- a/v2/models/chassis_list.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ChassisList List of chassis -// -// Specifies the list of hardware chassis. -// -// swagger:model ChassisList -type ChassisList struct { - - // Specifies the list of chassis. - Chassis []*Chassis `json:"chassis"` -} - -// Validate validates this chassis list -func (m *ChassisList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChassis(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChassisList) validateChassis(formats strfmt.Registry) error { - if swag.IsZero(m.Chassis) { // not required - return nil - } - - for i := 0; i < len(m.Chassis); i++ { - if swag.IsZero(m.Chassis[i]) { // not required - continue - } - - if m.Chassis[i] != nil { - if err := m.Chassis[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassis" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassis" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this chassis list based on the context it is used -func (m *ChassisList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChassis(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ChassisList) contextValidateChassis(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Chassis); i++ { - - if m.Chassis[i] != nil { - - if swag.IsZero(m.Chassis[i]) { // not required - return nil - } - - if err := m.Chassis[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassis" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassis" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ChassisList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChassisList) UnmarshalBinary(b []byte) error { - var res ChassisList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/chassis_rack_config_params.go b/v2/models/chassis_rack_config_params.go deleted file mode 100644 index ebf6f2ee..00000000 --- a/v2/models/chassis_rack_config_params.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" -) - -// ChassisRackConfigParams Specifies the chassis serial to rack id mapping configuration. -// -// swagger:model ChassisRackConfigParams -type ChassisRackConfigParams struct { - - // Specifies the chassis serial. - ChassisSerial string `json:"chassisSerial,omitempty"` - - // Specifies the rack id. - RackID int64 `json:"rackId,omitempty"` -} - -// Validate validates this chassis rack config params -func (m *ChassisRackConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this chassis rack config params based on context it is used -func (m *ChassisRackConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ChassisRackConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ChassisRackConfigParams) UnmarshalBinary(b []byte) error { - var res ChassisRackConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cipher_suite.go b/v2/models/cipher_suite.go deleted file mode 100644 index 906e974d..00000000 --- a/v2/models/cipher_suite.go +++ /dev/null @@ -1,143 +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" -) - -// CipherSuite CipherSuite -// -// # Cipher Suite -// -// swagger:model CipherSuite -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"] - Cipher string `json:"cipher,omitempty"` -} - -// Validate validates this cipher suite -func (m *CipherSuite) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCipher(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 { - panic(err) - } - for _, v := range res { - cipherSuiteTypeCipherPropEnum = append(cipherSuiteTypeCipherPropEnum, v) - } -} - -const ( - - // CipherSuiteCipherTLSAES256GCMSHA384 captures enum value "TLS_AES_256_GCM_SHA384" - CipherSuiteCipherTLSAES256GCMSHA384 string = "TLS_AES_256_GCM_SHA384" - - // CipherSuiteCipherTLSAES128GCMSHA256 captures enum value "TLS_AES_128_GCM_SHA256" - CipherSuiteCipherTLSAES128GCMSHA256 string = "TLS_AES_128_GCM_SHA256" - - // CipherSuiteCipherTLSECDHEECDSAWITHAES256GCMSHA384 captures enum value "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - CipherSuiteCipherTLSECDHEECDSAWITHAES256GCMSHA384 string = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - - // CipherSuiteCipherTLSECDHEECDSAWITHAES128GCMSHA256 captures enum value "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - CipherSuiteCipherTLSECDHEECDSAWITHAES128GCMSHA256 string = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - - // CipherSuiteCipherTLSECDHERSAWITHAES256GCMSHA384 captures enum value "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - CipherSuiteCipherTLSECDHERSAWITHAES256GCMSHA384 string = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - - // CipherSuiteCipherTLSECDHERSAWITHAES128GCMSHA256 captures enum value "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - CipherSuiteCipherTLSECDHERSAWITHAES128GCMSHA256 string = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - - // CipherSuiteCipherTLSECDHEECDSAWITHAES256CBCSHA captures enum value "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - CipherSuiteCipherTLSECDHEECDSAWITHAES256CBCSHA string = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - - // 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" - - // CipherSuiteCipherTLSRSAWITHAES128GCMSHA256 captures enum value "TLS_RSA_WITH_AES_128_GCM_SHA256" - CipherSuiteCipherTLSRSAWITHAES128GCMSHA256 string = "TLS_RSA_WITH_AES_128_GCM_SHA256" - - // CipherSuiteCipherTLSRSAWITHAES256CBCSHA captures enum value "TLS_RSA_WITH_AES_256_CBC_SHA" - CipherSuiteCipherTLSRSAWITHAES256CBCSHA string = "TLS_RSA_WITH_AES_256_CBC_SHA" - - // CipherSuiteCipherTLSRSAWITHAES128CBCSHA captures enum value "TLS_RSA_WITH_AES_128_CBC_SHA" - CipherSuiteCipherTLSRSAWITHAES128CBCSHA string = "TLS_RSA_WITH_AES_128_CBC_SHA" -) - -// prop value enum -func (m *CipherSuite) validateCipherEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cipherSuiteTypeCipherPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CipherSuite) validateCipher(formats strfmt.Registry) error { - if swag.IsZero(m.Cipher) { // not required - return nil - } - - // value enum - if err := m.validateCipherEnum("cipher", "body", m.Cipher); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cipher suite based on context it is used -func (m *CipherSuite) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CipherSuite) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CipherSuite) UnmarshalBinary(b []byte) error { - var res CipherSuite - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ciphers_resp.go b/v2/models/ciphers_resp.go deleted file mode 100644 index dc893de5..00000000 --- a/v2/models/ciphers_resp.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CiphersResp Response with two lists: a list of enabled ciphers and a list of disabled ciphers. -// -// Specifies a list of enabled/disabled ciphers on the cluster. -// -// swagger:model CiphersResp -type CiphersResp struct { - - // Enabled ciphers. - EnabledCiphers []string `json:"enabledCiphers"` - - // Disabled ciphers. - DisabledCiphers []string `json:"disabledCiphers"` -} - -// Validate validates this ciphers resp -func (m *CiphersResp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabledCiphers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDisabledCiphers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 { - panic(err) - } - for _, v := range res { - ciphersRespEnabledCiphersItemsEnum = append(ciphersRespEnabledCiphersItemsEnum, v) - } -} - -func (m *CiphersResp) validateEnabledCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ciphersRespEnabledCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CiphersResp) validateEnabledCiphers(formats strfmt.Registry) error { - if swag.IsZero(m.EnabledCiphers) { // not required - return nil - } - - for i := 0; i < len(m.EnabledCiphers); i++ { - - // value enum - if err := m.validateEnabledCiphersItemsEnum("enabledCiphers"+"."+strconv.Itoa(i), "body", m.EnabledCiphers[i]); err != nil { - return err - } - - } - - return nil -} - -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 { - panic(err) - } - for _, v := range res { - ciphersRespDisabledCiphersItemsEnum = append(ciphersRespDisabledCiphersItemsEnum, v) - } -} - -func (m *CiphersResp) validateDisabledCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ciphersRespDisabledCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CiphersResp) validateDisabledCiphers(formats strfmt.Registry) error { - if swag.IsZero(m.DisabledCiphers) { // not required - return nil - } - - for i := 0; i < len(m.DisabledCiphers); i++ { - - // value enum - if err := m.validateDisabledCiphersItemsEnum("disabledCiphers"+"."+strconv.Itoa(i), "body", m.DisabledCiphers[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this ciphers resp based on context it is used -func (m *CiphersResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CiphersResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CiphersResp) UnmarshalBinary(b []byte) error { - var res CiphersResp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clear_nlm_lock_request.go b/v2/models/clear_nlm_lock_request.go deleted file mode 100644 index 8eda0f90..00000000 --- a/v2/models/clear_nlm_lock_request.go +++ /dev/null @@ -1,61 +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" -) - -// ClearNlmLockRequest Specifies details required to clear NLM lock. -// -// swagger:model ClearNlmLockRequest -type ClearNlmLockRequest struct { - - // Specifies the filepath in the view relative to the - // root filesystem. If this field is specified, viewName field must - // also be specified. - FilePath string `json:"filePath,omitempty"` - - // Specifies the name of the View in which to search. - // If a view name is not specified, all the views in the Cluster are - // searched. This field is mandatory if filePath field is specified. - ViewName string `json:"viewName,omitempty"` - - // Specifies the id of the client, related to which NLM - // locks needs to be clear. - ClientID string `json:"clientId,omitempty"` -} - -// Validate validates this clear nlm lock request -func (m *ClearNlmLockRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clear nlm lock request based on context it is used -func (m *ClearNlmLockRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClearNlmLockRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClearNlmLockRequest) UnmarshalBinary(b []byte) error { - var res ClearNlmLockRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/client_stats.go b/v2/models/client_stats.go deleted file mode 100644 index c50a71b2..00000000 --- a/v2/models/client_stats.go +++ /dev/null @@ -1,419 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClientStats Specifies the Client stats. -// -// swagger:model ClientStats -type ClientStats struct { - - // Specifies the stats metric. - // Enum: ["kNumBytesRead","kNumBytesWritten","kReadIos","kWriteIos","kReadLatencyUsecs","kWriteLatencyUsecs","kNumReadErrors","kNumWriteErrors","kNFSv3MntLatUsecs","kNFSv3MntOps","kNFSv3MntErr","kNFSv3UmntLatUsecs","kNFSv3UmntOps","kNFSv3UmntErr","kNFSv3CreateLatUsecs","kNFSv3CreateOps","kNFSv3CreateErr","kNFSv3RemoveLatUsecs","kNFSv3RemoveOps","kNFSv3RemoveErr","kNFSv3MkdirLatUsecs","kNFSv3MkdirOps","kNFSv3MkdirErr","kNFSv3RmdirLatUsecs","kNFSv3RmdirOps","kNFSv3RmdirErr","kNFSv3LookupLatUsecs","kNFSv3LookupOps","kNFSv3LookupErr","kNFSv3ReaddirLatUsecs","kNFSv3ReaddirOps","kNFSv3ReaddirErr","kNFSv3ReaddirplusLatUsecs","kNFSv3ReaddirplusOps","kNFSv3ReaddirplusErr","kNFSv3SymlinkLatUsecs","kNFSv3SymlinkOps","kNFSv3SymlinkErr","kNFSv3RenameLatUsecs","kNFSv3RenameOps","kNFSv3RenameErr","kSMBSessionSetupLatUsecs","kSMBSessionSetupOps","kSMBSessionSetupErr","kSMBLogoffLatUsecs","kSMBLogoffOps","kSMBLogoffErr","kSMBTreeConnectLatUsecs","kSMBTreeConnectOps","kSMBTreeConnectErr","kSMBTreeDisconnectLatUsecs","kSMBTreeDisconnectOps","kSMBTreeDisconnectErr","kSMBOpenLatUsecs","kSMBOpenOps","kSMBOpenErr","kSMBCloseLatUsecs","kSMBCloseOps","kSMBCloseErr","kSMBCreateFileLatUsecs","kSMBCreateFileOps","kSMBCreateFileErr","kSMBDeleteFileLatUsecs","kSMBDeleteFileOps","kSMBDeleteFileErr","kSMBMkdirLatUsecs","kSMBMkdirOps","kSMBMkdirErr","kSMBRmdirLatUsecs","kSMBRmdirOps","kSMBRmdirErr","kSMBReaddirLatUsecs","kSMBReaddirOps","kSMBReaddirErr","kSMBGetInfoLatUsecs","kSMBGetInfoOps","kSMBGetInfoErr","kSMBSetInfoLatUsecs","kSMBSetInfoOps","kSMBSetInfoErr","kSMBRenameLatUsecs","kSMBRenameOps","kSMBRenameErr"] - Metric *string `json:"metric,omitempty"` - - // Specifies the stats value. - Value *int64 `json:"value,omitempty"` - - // Specifies the stats value in last hours. - ValueInLastHours []*ClientStatsInLastHours `json:"valueInLastHours"` -} - -// Validate validates this client stats -func (m *ClientStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetric(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValueInLastHours(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clientStatsTypeMetricPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNumBytesRead","kNumBytesWritten","kReadIos","kWriteIos","kReadLatencyUsecs","kWriteLatencyUsecs","kNumReadErrors","kNumWriteErrors","kNFSv3MntLatUsecs","kNFSv3MntOps","kNFSv3MntErr","kNFSv3UmntLatUsecs","kNFSv3UmntOps","kNFSv3UmntErr","kNFSv3CreateLatUsecs","kNFSv3CreateOps","kNFSv3CreateErr","kNFSv3RemoveLatUsecs","kNFSv3RemoveOps","kNFSv3RemoveErr","kNFSv3MkdirLatUsecs","kNFSv3MkdirOps","kNFSv3MkdirErr","kNFSv3RmdirLatUsecs","kNFSv3RmdirOps","kNFSv3RmdirErr","kNFSv3LookupLatUsecs","kNFSv3LookupOps","kNFSv3LookupErr","kNFSv3ReaddirLatUsecs","kNFSv3ReaddirOps","kNFSv3ReaddirErr","kNFSv3ReaddirplusLatUsecs","kNFSv3ReaddirplusOps","kNFSv3ReaddirplusErr","kNFSv3SymlinkLatUsecs","kNFSv3SymlinkOps","kNFSv3SymlinkErr","kNFSv3RenameLatUsecs","kNFSv3RenameOps","kNFSv3RenameErr","kSMBSessionSetupLatUsecs","kSMBSessionSetupOps","kSMBSessionSetupErr","kSMBLogoffLatUsecs","kSMBLogoffOps","kSMBLogoffErr","kSMBTreeConnectLatUsecs","kSMBTreeConnectOps","kSMBTreeConnectErr","kSMBTreeDisconnectLatUsecs","kSMBTreeDisconnectOps","kSMBTreeDisconnectErr","kSMBOpenLatUsecs","kSMBOpenOps","kSMBOpenErr","kSMBCloseLatUsecs","kSMBCloseOps","kSMBCloseErr","kSMBCreateFileLatUsecs","kSMBCreateFileOps","kSMBCreateFileErr","kSMBDeleteFileLatUsecs","kSMBDeleteFileOps","kSMBDeleteFileErr","kSMBMkdirLatUsecs","kSMBMkdirOps","kSMBMkdirErr","kSMBRmdirLatUsecs","kSMBRmdirOps","kSMBRmdirErr","kSMBReaddirLatUsecs","kSMBReaddirOps","kSMBReaddirErr","kSMBGetInfoLatUsecs","kSMBGetInfoOps","kSMBGetInfoErr","kSMBSetInfoLatUsecs","kSMBSetInfoOps","kSMBSetInfoErr","kSMBRenameLatUsecs","kSMBRenameOps","kSMBRenameErr"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clientStatsTypeMetricPropEnum = append(clientStatsTypeMetricPropEnum, v) - } -} - -const ( - - // ClientStatsMetricKNumBytesRead captures enum value "kNumBytesRead" - ClientStatsMetricKNumBytesRead string = "kNumBytesRead" - - // ClientStatsMetricKNumBytesWritten captures enum value "kNumBytesWritten" - ClientStatsMetricKNumBytesWritten string = "kNumBytesWritten" - - // ClientStatsMetricKReadIos captures enum value "kReadIos" - ClientStatsMetricKReadIos string = "kReadIos" - - // ClientStatsMetricKWriteIos captures enum value "kWriteIos" - ClientStatsMetricKWriteIos string = "kWriteIos" - - // ClientStatsMetricKReadLatencyUsecs captures enum value "kReadLatencyUsecs" - ClientStatsMetricKReadLatencyUsecs string = "kReadLatencyUsecs" - - // ClientStatsMetricKWriteLatencyUsecs captures enum value "kWriteLatencyUsecs" - ClientStatsMetricKWriteLatencyUsecs string = "kWriteLatencyUsecs" - - // ClientStatsMetricKNumReadErrors captures enum value "kNumReadErrors" - ClientStatsMetricKNumReadErrors string = "kNumReadErrors" - - // ClientStatsMetricKNumWriteErrors captures enum value "kNumWriteErrors" - ClientStatsMetricKNumWriteErrors string = "kNumWriteErrors" - - // ClientStatsMetricKNFSv3MntLatUsecs captures enum value "kNFSv3MntLatUsecs" - ClientStatsMetricKNFSv3MntLatUsecs string = "kNFSv3MntLatUsecs" - - // ClientStatsMetricKNFSv3MntOps captures enum value "kNFSv3MntOps" - ClientStatsMetricKNFSv3MntOps string = "kNFSv3MntOps" - - // ClientStatsMetricKNFSv3MntErr captures enum value "kNFSv3MntErr" - ClientStatsMetricKNFSv3MntErr string = "kNFSv3MntErr" - - // ClientStatsMetricKNFSv3UmntLatUsecs captures enum value "kNFSv3UmntLatUsecs" - ClientStatsMetricKNFSv3UmntLatUsecs string = "kNFSv3UmntLatUsecs" - - // ClientStatsMetricKNFSv3UmntOps captures enum value "kNFSv3UmntOps" - ClientStatsMetricKNFSv3UmntOps string = "kNFSv3UmntOps" - - // ClientStatsMetricKNFSv3UmntErr captures enum value "kNFSv3UmntErr" - ClientStatsMetricKNFSv3UmntErr string = "kNFSv3UmntErr" - - // ClientStatsMetricKNFSv3CreateLatUsecs captures enum value "kNFSv3CreateLatUsecs" - ClientStatsMetricKNFSv3CreateLatUsecs string = "kNFSv3CreateLatUsecs" - - // ClientStatsMetricKNFSv3CreateOps captures enum value "kNFSv3CreateOps" - ClientStatsMetricKNFSv3CreateOps string = "kNFSv3CreateOps" - - // ClientStatsMetricKNFSv3CreateErr captures enum value "kNFSv3CreateErr" - ClientStatsMetricKNFSv3CreateErr string = "kNFSv3CreateErr" - - // ClientStatsMetricKNFSv3RemoveLatUsecs captures enum value "kNFSv3RemoveLatUsecs" - ClientStatsMetricKNFSv3RemoveLatUsecs string = "kNFSv3RemoveLatUsecs" - - // ClientStatsMetricKNFSv3RemoveOps captures enum value "kNFSv3RemoveOps" - ClientStatsMetricKNFSv3RemoveOps string = "kNFSv3RemoveOps" - - // ClientStatsMetricKNFSv3RemoveErr captures enum value "kNFSv3RemoveErr" - ClientStatsMetricKNFSv3RemoveErr string = "kNFSv3RemoveErr" - - // ClientStatsMetricKNFSv3MkdirLatUsecs captures enum value "kNFSv3MkdirLatUsecs" - ClientStatsMetricKNFSv3MkdirLatUsecs string = "kNFSv3MkdirLatUsecs" - - // ClientStatsMetricKNFSv3MkdirOps captures enum value "kNFSv3MkdirOps" - ClientStatsMetricKNFSv3MkdirOps string = "kNFSv3MkdirOps" - - // ClientStatsMetricKNFSv3MkdirErr captures enum value "kNFSv3MkdirErr" - ClientStatsMetricKNFSv3MkdirErr string = "kNFSv3MkdirErr" - - // ClientStatsMetricKNFSv3RmdirLatUsecs captures enum value "kNFSv3RmdirLatUsecs" - ClientStatsMetricKNFSv3RmdirLatUsecs string = "kNFSv3RmdirLatUsecs" - - // ClientStatsMetricKNFSv3RmdirOps captures enum value "kNFSv3RmdirOps" - ClientStatsMetricKNFSv3RmdirOps string = "kNFSv3RmdirOps" - - // ClientStatsMetricKNFSv3RmdirErr captures enum value "kNFSv3RmdirErr" - ClientStatsMetricKNFSv3RmdirErr string = "kNFSv3RmdirErr" - - // ClientStatsMetricKNFSv3LookupLatUsecs captures enum value "kNFSv3LookupLatUsecs" - ClientStatsMetricKNFSv3LookupLatUsecs string = "kNFSv3LookupLatUsecs" - - // ClientStatsMetricKNFSv3LookupOps captures enum value "kNFSv3LookupOps" - ClientStatsMetricKNFSv3LookupOps string = "kNFSv3LookupOps" - - // ClientStatsMetricKNFSv3LookupErr captures enum value "kNFSv3LookupErr" - ClientStatsMetricKNFSv3LookupErr string = "kNFSv3LookupErr" - - // ClientStatsMetricKNFSv3ReaddirLatUsecs captures enum value "kNFSv3ReaddirLatUsecs" - ClientStatsMetricKNFSv3ReaddirLatUsecs string = "kNFSv3ReaddirLatUsecs" - - // ClientStatsMetricKNFSv3ReaddirOps captures enum value "kNFSv3ReaddirOps" - ClientStatsMetricKNFSv3ReaddirOps string = "kNFSv3ReaddirOps" - - // ClientStatsMetricKNFSv3ReaddirErr captures enum value "kNFSv3ReaddirErr" - ClientStatsMetricKNFSv3ReaddirErr string = "kNFSv3ReaddirErr" - - // ClientStatsMetricKNFSv3ReaddirplusLatUsecs captures enum value "kNFSv3ReaddirplusLatUsecs" - ClientStatsMetricKNFSv3ReaddirplusLatUsecs string = "kNFSv3ReaddirplusLatUsecs" - - // ClientStatsMetricKNFSv3ReaddirplusOps captures enum value "kNFSv3ReaddirplusOps" - ClientStatsMetricKNFSv3ReaddirplusOps string = "kNFSv3ReaddirplusOps" - - // ClientStatsMetricKNFSv3ReaddirplusErr captures enum value "kNFSv3ReaddirplusErr" - ClientStatsMetricKNFSv3ReaddirplusErr string = "kNFSv3ReaddirplusErr" - - // ClientStatsMetricKNFSv3SymlinkLatUsecs captures enum value "kNFSv3SymlinkLatUsecs" - ClientStatsMetricKNFSv3SymlinkLatUsecs string = "kNFSv3SymlinkLatUsecs" - - // ClientStatsMetricKNFSv3SymlinkOps captures enum value "kNFSv3SymlinkOps" - ClientStatsMetricKNFSv3SymlinkOps string = "kNFSv3SymlinkOps" - - // ClientStatsMetricKNFSv3SymlinkErr captures enum value "kNFSv3SymlinkErr" - ClientStatsMetricKNFSv3SymlinkErr string = "kNFSv3SymlinkErr" - - // ClientStatsMetricKNFSv3RenameLatUsecs captures enum value "kNFSv3RenameLatUsecs" - ClientStatsMetricKNFSv3RenameLatUsecs string = "kNFSv3RenameLatUsecs" - - // ClientStatsMetricKNFSv3RenameOps captures enum value "kNFSv3RenameOps" - ClientStatsMetricKNFSv3RenameOps string = "kNFSv3RenameOps" - - // ClientStatsMetricKNFSv3RenameErr captures enum value "kNFSv3RenameErr" - ClientStatsMetricKNFSv3RenameErr string = "kNFSv3RenameErr" - - // ClientStatsMetricKSMBSessionSetupLatUsecs captures enum value "kSMBSessionSetupLatUsecs" - ClientStatsMetricKSMBSessionSetupLatUsecs string = "kSMBSessionSetupLatUsecs" - - // ClientStatsMetricKSMBSessionSetupOps captures enum value "kSMBSessionSetupOps" - ClientStatsMetricKSMBSessionSetupOps string = "kSMBSessionSetupOps" - - // ClientStatsMetricKSMBSessionSetupErr captures enum value "kSMBSessionSetupErr" - ClientStatsMetricKSMBSessionSetupErr string = "kSMBSessionSetupErr" - - // ClientStatsMetricKSMBLogoffLatUsecs captures enum value "kSMBLogoffLatUsecs" - ClientStatsMetricKSMBLogoffLatUsecs string = "kSMBLogoffLatUsecs" - - // ClientStatsMetricKSMBLogoffOps captures enum value "kSMBLogoffOps" - ClientStatsMetricKSMBLogoffOps string = "kSMBLogoffOps" - - // ClientStatsMetricKSMBLogoffErr captures enum value "kSMBLogoffErr" - ClientStatsMetricKSMBLogoffErr string = "kSMBLogoffErr" - - // ClientStatsMetricKSMBTreeConnectLatUsecs captures enum value "kSMBTreeConnectLatUsecs" - ClientStatsMetricKSMBTreeConnectLatUsecs string = "kSMBTreeConnectLatUsecs" - - // ClientStatsMetricKSMBTreeConnectOps captures enum value "kSMBTreeConnectOps" - ClientStatsMetricKSMBTreeConnectOps string = "kSMBTreeConnectOps" - - // ClientStatsMetricKSMBTreeConnectErr captures enum value "kSMBTreeConnectErr" - ClientStatsMetricKSMBTreeConnectErr string = "kSMBTreeConnectErr" - - // ClientStatsMetricKSMBTreeDisconnectLatUsecs captures enum value "kSMBTreeDisconnectLatUsecs" - ClientStatsMetricKSMBTreeDisconnectLatUsecs string = "kSMBTreeDisconnectLatUsecs" - - // ClientStatsMetricKSMBTreeDisconnectOps captures enum value "kSMBTreeDisconnectOps" - ClientStatsMetricKSMBTreeDisconnectOps string = "kSMBTreeDisconnectOps" - - // ClientStatsMetricKSMBTreeDisconnectErr captures enum value "kSMBTreeDisconnectErr" - ClientStatsMetricKSMBTreeDisconnectErr string = "kSMBTreeDisconnectErr" - - // ClientStatsMetricKSMBOpenLatUsecs captures enum value "kSMBOpenLatUsecs" - ClientStatsMetricKSMBOpenLatUsecs string = "kSMBOpenLatUsecs" - - // ClientStatsMetricKSMBOpenOps captures enum value "kSMBOpenOps" - ClientStatsMetricKSMBOpenOps string = "kSMBOpenOps" - - // ClientStatsMetricKSMBOpenErr captures enum value "kSMBOpenErr" - ClientStatsMetricKSMBOpenErr string = "kSMBOpenErr" - - // ClientStatsMetricKSMBCloseLatUsecs captures enum value "kSMBCloseLatUsecs" - ClientStatsMetricKSMBCloseLatUsecs string = "kSMBCloseLatUsecs" - - // ClientStatsMetricKSMBCloseOps captures enum value "kSMBCloseOps" - ClientStatsMetricKSMBCloseOps string = "kSMBCloseOps" - - // ClientStatsMetricKSMBCloseErr captures enum value "kSMBCloseErr" - ClientStatsMetricKSMBCloseErr string = "kSMBCloseErr" - - // ClientStatsMetricKSMBCreateFileLatUsecs captures enum value "kSMBCreateFileLatUsecs" - ClientStatsMetricKSMBCreateFileLatUsecs string = "kSMBCreateFileLatUsecs" - - // ClientStatsMetricKSMBCreateFileOps captures enum value "kSMBCreateFileOps" - ClientStatsMetricKSMBCreateFileOps string = "kSMBCreateFileOps" - - // ClientStatsMetricKSMBCreateFileErr captures enum value "kSMBCreateFileErr" - ClientStatsMetricKSMBCreateFileErr string = "kSMBCreateFileErr" - - // ClientStatsMetricKSMBDeleteFileLatUsecs captures enum value "kSMBDeleteFileLatUsecs" - ClientStatsMetricKSMBDeleteFileLatUsecs string = "kSMBDeleteFileLatUsecs" - - // ClientStatsMetricKSMBDeleteFileOps captures enum value "kSMBDeleteFileOps" - ClientStatsMetricKSMBDeleteFileOps string = "kSMBDeleteFileOps" - - // ClientStatsMetricKSMBDeleteFileErr captures enum value "kSMBDeleteFileErr" - ClientStatsMetricKSMBDeleteFileErr string = "kSMBDeleteFileErr" - - // ClientStatsMetricKSMBMkdirLatUsecs captures enum value "kSMBMkdirLatUsecs" - ClientStatsMetricKSMBMkdirLatUsecs string = "kSMBMkdirLatUsecs" - - // ClientStatsMetricKSMBMkdirOps captures enum value "kSMBMkdirOps" - ClientStatsMetricKSMBMkdirOps string = "kSMBMkdirOps" - - // ClientStatsMetricKSMBMkdirErr captures enum value "kSMBMkdirErr" - ClientStatsMetricKSMBMkdirErr string = "kSMBMkdirErr" - - // ClientStatsMetricKSMBRmdirLatUsecs captures enum value "kSMBRmdirLatUsecs" - ClientStatsMetricKSMBRmdirLatUsecs string = "kSMBRmdirLatUsecs" - - // ClientStatsMetricKSMBRmdirOps captures enum value "kSMBRmdirOps" - ClientStatsMetricKSMBRmdirOps string = "kSMBRmdirOps" - - // ClientStatsMetricKSMBRmdirErr captures enum value "kSMBRmdirErr" - ClientStatsMetricKSMBRmdirErr string = "kSMBRmdirErr" - - // ClientStatsMetricKSMBReaddirLatUsecs captures enum value "kSMBReaddirLatUsecs" - ClientStatsMetricKSMBReaddirLatUsecs string = "kSMBReaddirLatUsecs" - - // ClientStatsMetricKSMBReaddirOps captures enum value "kSMBReaddirOps" - ClientStatsMetricKSMBReaddirOps string = "kSMBReaddirOps" - - // ClientStatsMetricKSMBReaddirErr captures enum value "kSMBReaddirErr" - ClientStatsMetricKSMBReaddirErr string = "kSMBReaddirErr" - - // ClientStatsMetricKSMBGetInfoLatUsecs captures enum value "kSMBGetInfoLatUsecs" - ClientStatsMetricKSMBGetInfoLatUsecs string = "kSMBGetInfoLatUsecs" - - // ClientStatsMetricKSMBGetInfoOps captures enum value "kSMBGetInfoOps" - ClientStatsMetricKSMBGetInfoOps string = "kSMBGetInfoOps" - - // ClientStatsMetricKSMBGetInfoErr captures enum value "kSMBGetInfoErr" - ClientStatsMetricKSMBGetInfoErr string = "kSMBGetInfoErr" - - // ClientStatsMetricKSMBSetInfoLatUsecs captures enum value "kSMBSetInfoLatUsecs" - ClientStatsMetricKSMBSetInfoLatUsecs string = "kSMBSetInfoLatUsecs" - - // ClientStatsMetricKSMBSetInfoOps captures enum value "kSMBSetInfoOps" - ClientStatsMetricKSMBSetInfoOps string = "kSMBSetInfoOps" - - // ClientStatsMetricKSMBSetInfoErr captures enum value "kSMBSetInfoErr" - ClientStatsMetricKSMBSetInfoErr string = "kSMBSetInfoErr" - - // ClientStatsMetricKSMBRenameLatUsecs captures enum value "kSMBRenameLatUsecs" - ClientStatsMetricKSMBRenameLatUsecs string = "kSMBRenameLatUsecs" - - // ClientStatsMetricKSMBRenameOps captures enum value "kSMBRenameOps" - ClientStatsMetricKSMBRenameOps string = "kSMBRenameOps" - - // ClientStatsMetricKSMBRenameErr captures enum value "kSMBRenameErr" - ClientStatsMetricKSMBRenameErr string = "kSMBRenameErr" -) - -// prop value enum -func (m *ClientStats) validateMetricEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clientStatsTypeMetricPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClientStats) validateMetric(formats strfmt.Registry) error { - if swag.IsZero(m.Metric) { // not required - return nil - } - - // value enum - if err := m.validateMetricEnum("metric", "body", *m.Metric); err != nil { - return err - } - - return nil -} - -func (m *ClientStats) validateValueInLastHours(formats strfmt.Registry) error { - if swag.IsZero(m.ValueInLastHours) { // not required - return nil - } - - for i := 0; i < len(m.ValueInLastHours); i++ { - if swag.IsZero(m.ValueInLastHours[i]) { // not required - continue - } - - if m.ValueInLastHours[i] != nil { - if err := m.ValueInLastHours[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this client stats based on the context it is used -func (m *ClientStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValueInLastHours(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClientStats) contextValidateValueInLastHours(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValueInLastHours); i++ { - - if m.ValueInLastHours[i] != nil { - - if swag.IsZero(m.ValueInLastHours[i]) { // not required - return nil - } - - if err := m.ValueInLastHours[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClientStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClientStats) UnmarshalBinary(b []byte) error { - var res ClientStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/client_stats_in_last_hours.go b/v2/models/client_stats_in_last_hours.go deleted file mode 100644 index 27292a69..00000000 --- a/v2/models/client_stats_in_last_hours.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" -) - -// ClientStatsInLastHours Specifies the Client stats for last hours. -// -// swagger:model ClientStatsInLastHours -type ClientStatsInLastHours struct { - - // Specifies the time range. - LastHours *int64 `json:"lastHours,omitempty"` - - // Specifies the stats value. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this client stats in last hours -func (m *ClientStatsInLastHours) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this client stats in last hours based on context it is used -func (m *ClientStatsInLastHours) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClientStatsInLastHours) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClientStatsInLastHours) UnmarshalBinary(b []byte) error { - var res ClientStatsInLastHours - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clone_action_cleanup_cloud_resources_cleanup_params.go b/v2/models/clone_action_cleanup_cloud_resources_cleanup_params.go deleted file mode 100644 index e898d50b..00000000 --- a/v2/models/clone_action_cleanup_cloud_resources_cleanup_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloneActionCleanupCloudResourcesCleanupParams Specifies the params for cloud resource cleanup. -// -// swagger:model CloneActionCleanupCloudResourcesCleanupParams -type CloneActionCleanupCloudResourcesCleanupParams struct { - - // Specifies the details of the restore tasks. - RestoreTasks []*CloudResourcesCleanupRestoreTaskDetails `json:"restoreTasks"` -} - -// Validate validates this clone action cleanup cloud resources cleanup params -func (m *CloneActionCleanupCloudResourcesCleanupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneActionCleanupCloudResourcesCleanupParams) validateRestoreTasks(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreTasks) { // not required - return nil - } - - for i := 0; i < len(m.RestoreTasks); i++ { - if swag.IsZero(m.RestoreTasks[i]) { // not required - continue - } - - if m.RestoreTasks[i] != nil { - if err := m.RestoreTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this clone action cleanup cloud resources cleanup params based on the context it is used -func (m *CloneActionCleanupCloudResourcesCleanupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneActionCleanupCloudResourcesCleanupParams) contextValidateRestoreTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestoreTasks); i++ { - - if m.RestoreTasks[i] != nil { - - if swag.IsZero(m.RestoreTasks[i]) { // not required - return nil - } - - if err := m.RestoreTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneActionCleanupCloudResourcesCleanupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneActionCleanupCloudResourcesCleanupParams) UnmarshalBinary(b []byte) error { - var res CloneActionCleanupCloudResourcesCleanupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clone_action_cleanup_params.go b/v2/models/clone_action_cleanup_params.go deleted file mode 100644 index 460ff18c..00000000 --- a/v2/models/clone_action_cleanup_params.go +++ /dev/null @@ -1,214 +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" -) - -// CloneActionCleanupParams Specifies the params for the cleanup action. -// -// swagger:model CloneActionCleanupParams -type CloneActionCleanupParams struct { - - // Specifies the type of cleanup to be done. - // Required: true - // Enum: ["PowerOffVM","CloudResourcesCleanup"] - CleanupType *string `json:"cleanupType"` - - // power off Vm params - PowerOffVMParams *CloneActionCleanupPowerOffVMParams `json:"powerOffVmParams,omitempty"` - - // cloud resources cleanup params - CloudResourcesCleanupParams *CloneActionCleanupCloudResourcesCleanupParams `json:"cloudResourcesCleanupParams,omitempty"` -} - -// Validate validates this clone action cleanup params -func (m *CloneActionCleanupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCleanupType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerOffVMParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudResourcesCleanupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cloneActionCleanupParamsTypeCleanupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PowerOffVM","CloudResourcesCleanup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloneActionCleanupParamsTypeCleanupTypePropEnum = append(cloneActionCleanupParamsTypeCleanupTypePropEnum, v) - } -} - -const ( - - // CloneActionCleanupParamsCleanupTypePowerOffVM captures enum value "PowerOffVM" - CloneActionCleanupParamsCleanupTypePowerOffVM string = "PowerOffVM" - - // CloneActionCleanupParamsCleanupTypeCloudResourcesCleanup captures enum value "CloudResourcesCleanup" - CloneActionCleanupParamsCleanupTypeCloudResourcesCleanup string = "CloudResourcesCleanup" -) - -// prop value enum -func (m *CloneActionCleanupParams) validateCleanupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloneActionCleanupParamsTypeCleanupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloneActionCleanupParams) validateCleanupType(formats strfmt.Registry) error { - - if err := validate.Required("cleanupType", "body", m.CleanupType); err != nil { - return err - } - - // value enum - if err := m.validateCleanupTypeEnum("cleanupType", "body", *m.CleanupType); err != nil { - return err - } - - return nil -} - -func (m *CloneActionCleanupParams) validatePowerOffVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.PowerOffVMParams) { // not required - return nil - } - - if m.PowerOffVMParams != nil { - if err := m.PowerOffVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerOffVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerOffVmParams") - } - return err - } - } - - return nil -} - -func (m *CloneActionCleanupParams) validateCloudResourcesCleanupParams(formats strfmt.Registry) error { - if swag.IsZero(m.CloudResourcesCleanupParams) { // not required - return nil - } - - if m.CloudResourcesCleanupParams != nil { - if err := m.CloudResourcesCleanupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudResourcesCleanupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudResourcesCleanupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone action cleanup params based on the context it is used -func (m *CloneActionCleanupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePowerOffVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudResourcesCleanupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneActionCleanupParams) contextValidatePowerOffVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerOffVMParams != nil { - - if swag.IsZero(m.PowerOffVMParams) { // not required - return nil - } - - if err := m.PowerOffVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerOffVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerOffVmParams") - } - return err - } - } - - return nil -} - -func (m *CloneActionCleanupParams) contextValidateCloudResourcesCleanupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudResourcesCleanupParams != nil { - - if swag.IsZero(m.CloudResourcesCleanupParams) { // not required - return nil - } - - if err := m.CloudResourcesCleanupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudResourcesCleanupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudResourcesCleanupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneActionCleanupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneActionCleanupParams) UnmarshalBinary(b []byte) error { - var res CloneActionCleanupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clone_action_cleanup_power_off_vm_params.go b/v2/models/clone_action_cleanup_power_off_vm_params.go deleted file mode 100644 index 5158c1c5..00000000 --- a/v2/models/clone_action_cleanup_power_off_vm_params.go +++ /dev/null @@ -1,50 +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" -) - -// CloneActionCleanupPowerOffVMParams Specifies the params for powering off the VMs. -// -// swagger:model CloneActionCleanupPowerOffVmParams -type CloneActionCleanupPowerOffVMParams struct { - - // Specifies the Entity IDs of the VMs to be powered off. - VMIds []int64 `json:"vmIds"` -} - -// Validate validates this clone action cleanup power off Vm params -func (m *CloneActionCleanupPowerOffVMParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this clone action cleanup power off Vm params based on context it is used -func (m *CloneActionCleanupPowerOffVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneActionCleanupPowerOffVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneActionCleanupPowerOffVMParams) UnmarshalBinary(b []byte) error { - var res CloneActionCleanupPowerOffVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clone_view_directory_params.go b/v2/models/clone_view_directory_params.go deleted file mode 100644 index 843b6206..00000000 --- a/v2/models/clone_view_directory_params.go +++ /dev/null @@ -1,105 +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" -) - -// CloneViewDirectoryParams Specifies the parameters to clone View directory. -// -// swagger:model CloneViewDirectoryParams -type CloneViewDirectoryParams struct { - - // Specifies the path of source directory. This is the full path including the Storage Domain name and View name. - // Required: true - SourceDirectoryPath *string `json:"sourceDirectoryPath"` - - // Specifies the path of parent directory of the target directory. This is the full path including the Storage Domain name and View Name. - // Required: true - TargetParentDirectoryPath *string `json:"targetParentDirectoryPath"` - - // Specifies the name of the target directory. - // Required: true - TargetDirectoryName *string `json:"targetDirectoryName"` -} - -// Validate validates this clone view directory params -func (m *CloneViewDirectoryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceDirectoryPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetParentDirectoryPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetDirectoryName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneViewDirectoryParams) validateSourceDirectoryPath(formats strfmt.Registry) error { - - if err := validate.Required("sourceDirectoryPath", "body", m.SourceDirectoryPath); err != nil { - return err - } - - return nil -} - -func (m *CloneViewDirectoryParams) validateTargetParentDirectoryPath(formats strfmt.Registry) error { - - if err := validate.Required("targetParentDirectoryPath", "body", m.TargetParentDirectoryPath); err != nil { - return err - } - - return nil -} - -func (m *CloneViewDirectoryParams) validateTargetDirectoryName(formats strfmt.Registry) error { - - if err := validate.Required("targetDirectoryName", "body", m.TargetDirectoryName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this clone view directory params based on context it is used -func (m *CloneViewDirectoryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloneViewDirectoryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneViewDirectoryParams) UnmarshalBinary(b []byte) error { - var res CloneViewDirectoryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/clone_view_params.go b/v2/models/clone_view_params.go deleted file mode 100644 index f7abe2af..00000000 --- a/v2/models/clone_view_params.go +++ /dev/null @@ -1,363 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloneViewParams Specifies the parameters to clone a View. -// -// swagger:model CloneViewParams -type CloneViewParams struct { - - // Specifies the name of the cloned View. - // Required: true - Name *string `json:"name"` - - // Specifies the description of the cloned View. - Description *string `json:"description,omitempty"` - - // DataLock (Write Once Read Many) lock expiry epoch time in microseconds. If a view is marked as a DataLock view, only a Data Security Officer (a user having Data Security Privilege) can delete the view until the lock expiry time. - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - // Array of Subnets. Specifies a list of Subnets with IP addresses that have permissions to access the View. (Overrides or extends the Subnets specified at the global Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies the supported Protocols for the View. - ProtocolAccess []*ViewProtocol `json:"protocolAccess"` - - // Specifies if the view is a read only view. User will no longer be able to write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // Array of Netgroups. Specifies a list of netgroups with domains that have permissions to access the View. (Overrides or extends the Netgroup specified at the global Cohesity Cluster level.) - NetgroupWhitelist *NisNetgroups `json:"netgroupWhitelist,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` -} - -// Validate validates this clone view params -func (m *CloneViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneViewParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CloneViewParams) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewParams) validateProtocolAccess(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - for i := 0; i < len(m.ProtocolAccess); i++ { - if swag.IsZero(m.ProtocolAccess[i]) { // not required - continue - } - - if m.ProtocolAccess[i] != nil { - if err := m.ProtocolAccess[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewParams) validateNetgroupWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - if m.NetgroupWhitelist != nil { - if err := m.NetgroupWhitelist.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist") - } - return err - } - } - - return nil -} - -func (m *CloneViewParams) validateQos(formats strfmt.Registry) error { - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *CloneViewParams) validateStoragePolicyOverride(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -// ContextValidate validate this clone view params based on the context it is used -func (m *CloneViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtocolAccess(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloneViewParams) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewParams) contextValidateProtocolAccess(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtocolAccess); i++ { - - if m.ProtocolAccess[i] != nil { - - if swag.IsZero(m.ProtocolAccess[i]) { // not required - return nil - } - - if err := m.ProtocolAccess[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CloneViewParams) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - if m.NetgroupWhitelist != nil { - - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - if err := m.NetgroupWhitelist.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist") - } - return err - } - } - - return nil -} - -func (m *CloneViewParams) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *CloneViewParams) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloneViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneViewParams) UnmarshalBinary(b []byte) error { - var res CloneViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/close_smb_file_open_params.go b/v2/models/close_smb_file_open_params.go deleted file mode 100644 index 4ab3c18f..00000000 --- a/v2/models/close_smb_file_open_params.go +++ /dev/null @@ -1,105 +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" -) - -// CloseSmbFileOpenParams Specifies params to close active SMB file open. -// -// swagger:model CloseSmbFileOpenParams -type CloseSmbFileOpenParams struct { - - // Specifies the filepath in the Cohesity View relative to the root filesystem. If this field is specified, viewName field must also be specified. - // Required: true - FilePath *string `json:"filePath"` - - // Specifies the name of the Cohesity View in which to search. If a view name is not specified, all the views in the Cluster are searched. This field is mandatory if filePath field is specified. - // Required: true - ViewName *string `json:"viewName"` - - // Specifies the id of the active open. - // Required: true - OpenID *int64 `json:"openId"` -} - -// Validate validates this close smb file open params -func (m *CloseSmbFileOpenParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOpenID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloseSmbFileOpenParams) validateFilePath(formats strfmt.Registry) error { - - if err := validate.Required("filePath", "body", m.FilePath); err != nil { - return err - } - - return nil -} - -func (m *CloseSmbFileOpenParams) validateViewName(formats strfmt.Registry) error { - - if err := validate.Required("viewName", "body", m.ViewName); err != nil { - return err - } - - return nil -} - -func (m *CloseSmbFileOpenParams) validateOpenID(formats strfmt.Registry) error { - - if err := validate.Required("openId", "body", m.OpenID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this close smb file open params based on context it is used -func (m *CloseSmbFileOpenParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloseSmbFileOpenParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloseSmbFileOpenParams) UnmarshalBinary(b []byte) error { - var res CloseSmbFileOpenParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_backup_script_params.go b/v2/models/cloud_backup_script_params.go deleted file mode 100644 index aa4b37fe..00000000 --- a/v2/models/cloud_backup_script_params.go +++ /dev/null @@ -1,213 +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" -) - -// CloudBackupScriptParams Cloud Pre Post Backup Scripts -// -// Specifies params of a pre/post scripts to be executed before and after a backup run. -// -// swagger:model CloudBackupScriptParams -type CloudBackupScriptParams struct { - - // Specifies the pre script and its params. - PreBackupScript *CommonPrePostCloudScriptParams `json:"preBackupScript,omitempty"` - - // Specifies the post backup script and its params. - PostBackupScript *CommonPrePostCloudScriptParams `json:"postBackupScript,omitempty"` - - // Specifies the post snapshot script and its params. - PostSnapshotScript *CommonPrePostCloudScriptParams `json:"postSnapshotScript,omitempty"` -} - -// Validate validates this cloud backup script params -func (m *CloudBackupScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostSnapshotScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudBackupScriptParams) validatePreBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreBackupScript) { // not required - 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 -} - -func (m *CloudBackupScriptParams) validatePostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScript) { // not required - 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 -} - -func (m *CloudBackupScriptParams) validatePostSnapshotScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if m.PostSnapshotScript != nil { - if err := m.PostSnapshotScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud backup script params based on the context it is used -func (m *CloudBackupScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostSnapshotScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudBackupScriptParams) 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 *CloudBackupScriptParams) 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 *CloudBackupScriptParams) contextValidatePostSnapshotScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostSnapshotScript != nil { - - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if err := m.PostSnapshotScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudBackupScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudBackupScriptParams) UnmarshalBinary(b []byte) error { - var res CloudBackupScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_cluster_expand_params.go b/v2/models/cloud_cluster_expand_params.go deleted file mode 100644 index 1209c1e0..00000000 --- a/v2/models/cloud_cluster_expand_params.go +++ /dev/null @@ -1,71 +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" -) - -// CloudClusterExpandParams Parameters to expand cloud edition cluster. -// -// swagger:model CloudClusterExpandParams -type CloudClusterExpandParams struct { - - // List of IPs of the new nodes. - // Required: true - NodeIps []string `json:"nodeIps"` -} - -// Validate validates this cloud cluster expand params -func (m *CloudClusterExpandParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeIps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudClusterExpandParams) validateNodeIps(formats strfmt.Registry) error { - - if err := validate.Required("nodeIps", "body", m.NodeIps); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cloud cluster expand params based on context it is used -func (m *CloudClusterExpandParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudClusterExpandParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudClusterExpandParams) UnmarshalBinary(b []byte) error { - var res CloudClusterExpandParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_domain.go b/v2/models/cloud_domain.go deleted file mode 100644 index f0e7261d..00000000 --- a/v2/models/cloud_domain.go +++ /dev/null @@ -1,105 +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" -) - -// CloudDomain Specifies the parameters which are specific to cloud domain. -// -// swagger:model CloudDomain -type CloudDomain struct { - - // Specifies the Id of the cloud domain.. - // Read Only: true - DomainID *int64 `json:"domainId,omitempty"` - - // Specifies the Id of ViewBox related to the cloud domain. - // Read Only: true - ViewBoxID *int64 `json:"viewBoxId,omitempty"` - - // Specifies the Name of StorageDomain related to the cloud domain. - // Read Only: true - StorageDomainName *string `json:"storageDomainName,omitempty"` -} - -// Validate validates this cloud domain -func (m *CloudDomain) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this cloud domain based on the context it is used -func (m *CloudDomain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomainID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewBoxID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageDomainName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudDomain) contextValidateDomainID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "domainId", "body", m.DomainID); err != nil { - return err - } - - return nil -} - -func (m *CloudDomain) contextValidateViewBoxID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "viewBoxId", "body", m.ViewBoxID); err != nil { - return err - } - - return nil -} - -func (m *CloudDomain) contextValidateStorageDomainName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageDomainName", "body", m.StorageDomainName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDomain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDomain) UnmarshalBinary(b []byte) error { - var res CloudDomain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_down_water_fall_params.go b/v2/models/cloud_down_water_fall_params.go deleted file mode 100644 index 15c00d21..00000000 --- a/v2/models/cloud_down_water_fall_params.go +++ /dev/null @@ -1,55 +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" -) - -// CloudDownWaterFallParams Cloud Down Water Fall Parameters -// -// Specifies parameters for cloud down water fall thresholds. -// -// swagger:model CloudDownWaterFallParams -type CloudDownWaterFallParams struct { - - // Specifies the threshold percentage for cloud down water fall. This value indicates how full a storage domain is before cohesity cluster down water fall its data to cloud tier. This field is only appliciable if physicalQuota is set. - ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"` - - // Specifes a time in seconds when cloud down water fall starts. - ThresholdSecs *int32 `json:"thresholdSecs,omitempty"` -} - -// Validate validates this cloud down water fall params -func (m *CloudDownWaterFallParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud down water fall params based on context it is used -func (m *CloudDownWaterFallParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudDownWaterFallParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudDownWaterFallParams) UnmarshalBinary(b []byte) error { - var res CloudDownWaterFallParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_resources_cleanup_ami_instance_id.go b/v2/models/cloud_resources_cleanup_ami_instance_id.go deleted file mode 100644 index b0d11cf3..00000000 --- a/v2/models/cloud_resources_cleanup_ami_instance_id.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" -) - -// CloudResourcesCleanupAmiInstanceID Specifies the relation between an AMI ID and the created EC2 instance. -// -// swagger:model CloudResourcesCleanupAmiInstanceId -type CloudResourcesCleanupAmiInstanceID struct { - - // Specifies the ID of the AMI used. - AmiID *string `json:"amiId,omitempty"` - - // Specifies the ID of the created EC2 instance. - InstanceID *string `json:"instanceId,omitempty"` -} - -// Validate validates this cloud resources cleanup ami instance Id -func (m *CloudResourcesCleanupAmiInstanceID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud resources cleanup ami instance Id based on context it is used -func (m *CloudResourcesCleanupAmiInstanceID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudResourcesCleanupAmiInstanceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudResourcesCleanupAmiInstanceID) UnmarshalBinary(b []byte) error { - var res CloudResourcesCleanupAmiInstanceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_resources_cleanup_restore_task_details.go b/v2/models/cloud_resources_cleanup_restore_task_details.go deleted file mode 100644 index 3050a9df..00000000 --- a/v2/models/cloud_resources_cleanup_restore_task_details.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CloudResourcesCleanupRestoreTaskDetails Specifies the details about the restore task for cloud resources cleanup. -// -// swagger:model CloudResourcesCleanupRestoreTaskDetails -type CloudResourcesCleanupRestoreTaskDetails struct { - - // Specifies the ID of the restore task which was used to spawn the clones. - // Required: true - TaskID *int64 `json:"taskId"` - - // Specifies the mapping between AMI ID and the EC2 instance created. - AmiInstanceIds []*CloudResourcesCleanupAmiInstanceID `json:"amiInstanceIds"` -} - -// Validate validates this cloud resources cleanup restore task details -func (m *CloudResourcesCleanupRestoreTaskDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTaskID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAmiInstanceIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudResourcesCleanupRestoreTaskDetails) validateTaskID(formats strfmt.Registry) error { - - if err := validate.Required("taskId", "body", m.TaskID); err != nil { - return err - } - - return nil -} - -func (m *CloudResourcesCleanupRestoreTaskDetails) validateAmiInstanceIds(formats strfmt.Registry) error { - if swag.IsZero(m.AmiInstanceIds) { // not required - return nil - } - - for i := 0; i < len(m.AmiInstanceIds); i++ { - if swag.IsZero(m.AmiInstanceIds[i]) { // not required - continue - } - - if m.AmiInstanceIds[i] != nil { - if err := m.AmiInstanceIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amiInstanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amiInstanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud resources cleanup restore task details based on the context it is used -func (m *CloudResourcesCleanupRestoreTaskDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAmiInstanceIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudResourcesCleanupRestoreTaskDetails) contextValidateAmiInstanceIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AmiInstanceIds); i++ { - - if m.AmiInstanceIds[i] != nil { - - if swag.IsZero(m.AmiInstanceIds[i]) { // not required - return nil - } - - if err := m.AmiInstanceIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("amiInstanceIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("amiInstanceIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudResourcesCleanupRestoreTaskDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudResourcesCleanupRestoreTaskDetails) UnmarshalBinary(b []byte) error { - var res CloudResourcesCleanupRestoreTaskDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_retrieve_task.go b/v2/models/cloud_retrieve_task.go deleted file mode 100644 index 6751a7d3..00000000 --- a/v2/models/cloud_retrieve_task.go +++ /dev/null @@ -1,150 +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" -) - -// CloudRetrieveTask Specifies cloud retrieve task info. -// -// swagger:model CloudRetrieveTask -type CloudRetrieveTask struct { - - // Specifies the task start time in microseconds. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the task end time in microseconds. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the status of the retrieve task. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Message about the cloud retrieve task. - Message *string `json:"message,omitempty"` - - // Specifies the percentage of the task. - PercentageFinished *int64 `json:"percentageFinished,omitempty"` - - // Specifies the time remaining to complete the retrieve task. - TimeRemainingSeconds *int64 `json:"timeRemainingSeconds,omitempty"` - - // Specifies the pulse task id. - PulseTaskID *int32 `json:"pulseTaskId,omitempty"` -} - -// Validate validates this cloud retrieve task -func (m *CloudRetrieveTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cloudRetrieveTaskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudRetrieveTaskTypeStatusPropEnum = append(cloudRetrieveTaskTypeStatusPropEnum, v) - } -} - -const ( - - // CloudRetrieveTaskStatusAccepted captures enum value "Accepted" - CloudRetrieveTaskStatusAccepted string = "Accepted" - - // CloudRetrieveTaskStatusRunning captures enum value "Running" - CloudRetrieveTaskStatusRunning string = "Running" - - // CloudRetrieveTaskStatusCanceled captures enum value "Canceled" - CloudRetrieveTaskStatusCanceled string = "Canceled" - - // CloudRetrieveTaskStatusCanceling captures enum value "Canceling" - CloudRetrieveTaskStatusCanceling string = "Canceling" - - // CloudRetrieveTaskStatusFailed captures enum value "Failed" - CloudRetrieveTaskStatusFailed string = "Failed" - - // CloudRetrieveTaskStatusMissed captures enum value "Missed" - CloudRetrieveTaskStatusMissed string = "Missed" - - // CloudRetrieveTaskStatusSucceeded captures enum value "Succeeded" - CloudRetrieveTaskStatusSucceeded string = "Succeeded" - - // CloudRetrieveTaskStatusSucceededWithWarning captures enum value "SucceededWithWarning" - CloudRetrieveTaskStatusSucceededWithWarning string = "SucceededWithWarning" - - // CloudRetrieveTaskStatusOnHold captures enum value "OnHold" - CloudRetrieveTaskStatusOnHold string = "OnHold" - - // CloudRetrieveTaskStatusFinalizing captures enum value "Finalizing" - CloudRetrieveTaskStatusFinalizing string = "Finalizing" - - // CloudRetrieveTaskStatusSkipped captures enum value "Skipped" - CloudRetrieveTaskStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *CloudRetrieveTask) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudRetrieveTaskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudRetrieveTask) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cloud retrieve task based on context it is used -func (m *CloudRetrieveTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudRetrieveTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudRetrieveTask) UnmarshalBinary(b []byte) error { - var res CloudRetrieveTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_retrieve_tasks.go b/v2/models/cloud_retrieve_tasks.go deleted file mode 100644 index a546b8ac..00000000 --- a/v2/models/cloud_retrieve_tasks.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudRetrieveTasks List of cloud retrieve tasks. -// -// swagger:model CloudRetrieveTasks -type CloudRetrieveTasks struct { - - // Specifies the list of cloud retrieve tasks. - RetrieveTasks []*CloudRetrieveTask `json:"retrieveTasks"` -} - -// Validate validates this cloud retrieve tasks -func (m *CloudRetrieveTasks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetrieveTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudRetrieveTasks) validateRetrieveTasks(formats strfmt.Registry) error { - if swag.IsZero(m.RetrieveTasks) { // not required - return nil - } - - for i := 0; i < len(m.RetrieveTasks); i++ { - if swag.IsZero(m.RetrieveTasks[i]) { // not required - continue - } - - if m.RetrieveTasks[i] != nil { - if err := m.RetrieveTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud retrieve tasks based on the context it is used -func (m *CloudRetrieveTasks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetrieveTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudRetrieveTasks) contextValidateRetrieveTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RetrieveTasks); i++ { - - if m.RetrieveTasks[i] != nil { - - if swag.IsZero(m.RetrieveTasks[i]) { // not required - return nil - } - - if err := m.RetrieveTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudRetrieveTasks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudRetrieveTasks) UnmarshalBinary(b []byte) error { - var res CloudRetrieveTasks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_config.go b/v2/models/cloud_spin_config.go deleted file mode 100644 index 3a570411..00000000 --- a/v2/models/cloud_spin_config.go +++ /dev/null @@ -1,166 +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" -) - -// CloudSpinConfig CloudSpin Target Configuration. -// -// Specifies settings for copying Snapshots to Cloud. This also specifies the retention policy that should be applied to Snapshots after they have been copied to Cloud. -// -// swagger:model CloudSpinConfig -type CloudSpinConfig struct { - CommonTargetConfiguration - - // Specifies the details about CloudSpin target where backup snapshots may be converted and stored. - // Required: true - Target *CloudSpinTarget `json:"target"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CloudSpinConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - Target *CloudSpinTarget `json:"target"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Target = dataAO1.Target - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CloudSpinConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Target *CloudSpinTarget `json:"target"` - } - - dataAO1.Target = m.Target - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cloud spin config -func (m *CloudSpinConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinConfig) validateTarget(formats strfmt.Registry) error { - - if err := validate.Required("target", "body", m.Target); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this cloud spin config based on the context it is used -func (m *CloudSpinConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinConfig) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.Target != 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 -} - -// MarshalBinary interface implementation -func (m *CloudSpinConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinConfig) UnmarshalBinary(b []byte) error { - var res CloudSpinConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_data_stats.go b/v2/models/cloud_spin_data_stats.go deleted file mode 100644 index 2cd8ec41..00000000 --- a/v2/models/cloud_spin_data_stats.go +++ /dev/null @@ -1,52 +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" -) - -// CloudSpinDataStats Cloud Spin data statistics. -// -// Specifies statistics about Cloud Spin data. -// -// swagger:model CloudSpinDataStats -type CloudSpinDataStats struct { - - // Specifies the physical bytes transferred. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` -} - -// Validate validates this cloud spin data stats -func (m *CloudSpinDataStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cloud spin data stats based on context it is used -func (m *CloudSpinDataStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpinDataStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinDataStats) UnmarshalBinary(b []byte) error { - var res CloudSpinDataStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_run.go b/v2/models/cloud_spin_run.go deleted file mode 100644 index 9eedab2f..00000000 --- a/v2/models/cloud_spin_run.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudSpinRun Cloud Spin run information for an object. -// -// Specifies information about Cloud Spin run for an object. -// -// swagger:model CloudSpinRun -type CloudSpinRun struct { - - // Cloud Spin result for a target. - CloudSpinTargetResults []*CloudSpinTargetResult `json:"cloudSpinTargetResults"` -} - -// Validate validates this cloud spin run -func (m *CloudSpinRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudSpinTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinRun) validateCloudSpinTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.CloudSpinTargetResults); i++ { - if swag.IsZero(m.CloudSpinTargetResults[i]) { // not required - continue - } - - if m.CloudSpinTargetResults[i] != nil { - if err := m.CloudSpinTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud spin run based on the context it is used -func (m *CloudSpinRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudSpinTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinRun) contextValidateCloudSpinTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudSpinTargetResults); i++ { - - if m.CloudSpinTargetResults[i] != nil { - - if swag.IsZero(m.CloudSpinTargetResults[i]) { // not required - return nil - } - - if err := m.CloudSpinTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpinRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinRun) UnmarshalBinary(b []byte) error { - var res CloudSpinRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_run_summary.go b/v2/models/cloud_spin_run_summary.go deleted file mode 100644 index 767722bb..00000000 --- a/v2/models/cloud_spin_run_summary.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloudSpinRunSummary Summary information for cloud spin run. -// -// Specifies summary information about cloud spin run. -// -// swagger:model CloudSpinRunSummary -type CloudSpinRunSummary struct { - - // Cloud Spin results for each Cloud Spin target. - CloudSpinTargetResults []*CloudSpinTargetResult `json:"cloudSpinTargetResults"` -} - -// Validate validates this cloud spin run summary -func (m *CloudSpinRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudSpinTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinRunSummary) validateCloudSpinTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.CloudSpinTargetResults); i++ { - if swag.IsZero(m.CloudSpinTargetResults[i]) { // not required - continue - } - - if m.CloudSpinTargetResults[i] != nil { - if err := m.CloudSpinTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cloud spin run summary based on the context it is used -func (m *CloudSpinRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudSpinTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinRunSummary) contextValidateCloudSpinTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudSpinTargetResults); i++ { - - if m.CloudSpinTargetResults[i] != nil { - - if swag.IsZero(m.CloudSpinTargetResults[i]) { // not required - return nil - } - - if err := m.CloudSpinTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpinRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinRunSummary) UnmarshalBinary(b []byte) error { - var res CloudSpinRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_target.go b/v2/models/cloud_spin_target.go deleted file mode 100644 index 5b1c9c9f..00000000 --- a/v2/models/cloud_spin_target.go +++ /dev/null @@ -1,183 +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" -) - -// CloudSpinTarget Specifies the details about Cloud Spin target where backup snapshots may be converted and stored. -// -// swagger:model CloudSpinTarget -type CloudSpinTarget struct { - - // Specifies the unique id of the cloud spin entity. - ID *int64 `json:"id,omitempty"` - - // Contains information needed to identify various resources when deploying VMs to Cloud. - // - // Specifies various resources when converting and deploying a VM to AWS. - AwsParams *AwsCloudSpinParams `json:"awsParams,omitempty"` - - // Specifies various resources when converting and deploying a VM to Azure. - AzureParams *AzureCloudSpinParams `json:"azureParams,omitempty"` - - // Specifies the name of the already added cloud spin target. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this cloud spin target -func (m *CloudSpinTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinTarget) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CloudSpinTarget) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud spin target based on the context it is used -func (m *CloudSpinTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinTarget) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CloudSpinTarget) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CloudSpinTarget) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpinTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinTarget) UnmarshalBinary(b []byte) error { - var res CloudSpinTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cloud_spin_target_result.go b/v2/models/cloud_spin_target_result.go deleted file mode 100644 index db31fc0d..00000000 --- a/v2/models/cloud_spin_target_result.go +++ /dev/null @@ -1,368 +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" -) - -// CloudSpinTargetResult Cloud Spin result for a target. -// -// Cloud Spin result for a target. -// -// swagger:model CloudSpinTargetResult -type CloudSpinTargetResult struct { - CloudSpinTarget - - // Specifies the start time of Cloud Spin in Unix epoch Timestamp(in microseconds) for a target. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of Cloud Spin in Unix epoch Timestamp(in microseconds) for a target. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Status of the Cloud Spin for a target. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Message about the Cloud Spin run. - Message *string `json:"message,omitempty"` - - // Cloud Spin data statistics for a target. - Stats *CloudSpinDataStats `json:"stats,omitempty"` - - // Specifies whether the snapshot is deleted manually. - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - // Specifies the expiry time of attempt in Unix epoch Timestamp (in microseconds) for an object. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Task ID for a CloudSpin protection run. - CloudspinTaskID *string `json:"cloudspinTaskId,omitempty"` - - // Progress monitor task id for Cloud Spin run. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Specifies the dataLock constraints for the archival target. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - // Specifies the legal hold status for a cloud spin target. - OnLegalHold *bool `json:"onLegalHold,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CloudSpinTargetResult) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CloudSpinTarget - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CloudSpinTarget = aO0 - - // AO1 - var dataAO1 struct { - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - Stats *CloudSpinDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - CloudspinTaskID *string `json:"cloudspinTaskId,omitempty"` - - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StartTimeUsecs = dataAO1.StartTimeUsecs - - m.EndTimeUsecs = dataAO1.EndTimeUsecs - - m.Status = dataAO1.Status - - m.Message = dataAO1.Message - - m.Stats = dataAO1.Stats - - m.IsManuallyDeleted = dataAO1.IsManuallyDeleted - - m.ExpiryTimeUsecs = dataAO1.ExpiryTimeUsecs - - m.CloudspinTaskID = dataAO1.CloudspinTaskID - - m.ProgressTaskID = dataAO1.ProgressTaskID - - m.DataLockConstraints = dataAO1.DataLockConstraints - - m.OnLegalHold = dataAO1.OnLegalHold - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CloudSpinTargetResult) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CloudSpinTarget) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - Stats *CloudSpinDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - CloudspinTaskID *string `json:"cloudspinTaskId,omitempty"` - - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - } - - dataAO1.StartTimeUsecs = m.StartTimeUsecs - - dataAO1.EndTimeUsecs = m.EndTimeUsecs - - dataAO1.Status = m.Status - - dataAO1.Message = m.Message - - dataAO1.Stats = m.Stats - - dataAO1.IsManuallyDeleted = m.IsManuallyDeleted - - dataAO1.ExpiryTimeUsecs = m.ExpiryTimeUsecs - - dataAO1.CloudspinTaskID = m.CloudspinTaskID - - dataAO1.ProgressTaskID = m.ProgressTaskID - - dataAO1.DataLockConstraints = m.DataLockConstraints - - dataAO1.OnLegalHold = m.OnLegalHold - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cloud spin target result -func (m *CloudSpinTargetResult) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloudSpinTarget - if err := m.CloudSpinTarget.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cloudSpinTargetResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cloudSpinTargetResultTypeStatusPropEnum = append(cloudSpinTargetResultTypeStatusPropEnum, v) - } -} - -// property enum -func (m *CloudSpinTargetResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cloudSpinTargetResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CloudSpinTargetResult) validateStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *CloudSpinTargetResult) validateStats(formats strfmt.Registry) error { - - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *CloudSpinTargetResult) validateDataLockConstraints(formats strfmt.Registry) error { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cloud spin target result based on the context it is used -func (m *CloudSpinTargetResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloudSpinTarget - if err := m.CloudSpinTarget.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CloudSpinTargetResult) 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 -} - -func (m *CloudSpinTargetResult) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CloudSpinTargetResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloudSpinTargetResult) UnmarshalBinary(b []byte) error { - var res CloudSpinTargetResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster.go b/v2/models/cluster.go deleted file mode 100644 index 5565b11e..00000000 --- a/v2/models/cluster.go +++ /dev/null @@ -1,642 +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" -) - -// Cluster Create Cluster Response. -// -// Specifies the cluster details. -// -// swagger:model Cluster -type Cluster struct { - - // Specifies the cluster id of the new cluster. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the incarnation id of the new cluster. - // Read Only: true - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // Name of the new cluster. - Name *string `json:"name,omitempty"` - - // Description of the cluster. - Description *string `json:"description,omitempty"` - - // Specifies the type of the new cluster. - // Read Only: true - // Enum: ["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"] - Type *string `json:"type,omitempty"` - - // Specifies the size of the cloud platforms. - // Read Only: true - // Enum: ["Small","Medium","Large","XLarge","NextGen"] - ClusterSize *string `json:"clusterSize,omitempty"` - - // Specifies the local tenant id. Only applicable on Helios. - // Read Only: true - LocalTenantID *string `json:"localTenantId,omitempty"` - - // Specifies the globally unique tenant id. Only applicable on Helios. - // Read Only: true - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the region id on which this cluster is present. Only applicable on Helios for DMaaS clusters. - // Read Only: true - RegionID *string `json:"regionId,omitempty"` - - // Specifies the Rigel specific parameters. - RigelClusterParams *RigelClusterConfigParams `json:"rigelClusterParams,omitempty"` - - // Software version of the new cluster. - // Read Only: true - SwVersion *string `json:"swVersion,omitempty"` - - // Network config of the new cluster. - NetworkConfig *ClusterCreateNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the proxy to use for external HTTP traffic. - ProxyServerConfig *ClusterProxyServerConfig `json:"proxyServerConfig,omitempty"` - - // Specifies whether or not encryption is enabled. If encryption is enabled, all data on the Cluster will be encrypted. - // Read Only: true - EnableEncryption *bool `json:"enableEncryption,omitempty"` - - // Specifies the Global Settings for SmartFiles. - ViewsGlobalSettings *ViewsGlobalSettings `json:"viewsGlobalSettings,omitempty"` - - // Specifies the File Services audit log configuration. - FileServicesAuditLogConfig *AuditLogConfig `json:"fileServicesAuditLogConfig,omitempty"` - - // cluster audit log config - ClusterAuditLogConfig *ClusterAuditLogConfig `json:"clusterAuditLogConfig,omitempty"` -} - -// Validate validates this cluster -func (m *Cluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterSize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyServerConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewsGlobalSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileServicesAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterAuditLogConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeTypePropEnum = append(clusterTypeTypePropEnum, v) - } -} - -const ( - - // ClusterTypePhysical captures enum value "Physical" - ClusterTypePhysical string = "Physical" - - // ClusterTypeVirtual captures enum value "Virtual" - ClusterTypeVirtual string = "Virtual" - - // ClusterTypeCloud captures enum value "Cloud" - ClusterTypeCloud string = "Cloud" - - // ClusterTypeRigel captures enum value "Rigel" - ClusterTypeRigel string = "Rigel" - - // ClusterTypeUnknown captures enum value "Unknown" - ClusterTypeUnknown string = "Unknown" - - // ClusterTypeHeliosOnPremVM captures enum value "HeliosOnPremVM" - ClusterTypeHeliosOnPremVM string = "HeliosOnPremVM" -) - -// prop value enum -func (m *Cluster) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var clusterTypeClusterSizePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Small","Medium","Large","XLarge","NextGen"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeClusterSizePropEnum = append(clusterTypeClusterSizePropEnum, v) - } -} - -const ( - - // ClusterClusterSizeSmall captures enum value "Small" - ClusterClusterSizeSmall string = "Small" - - // ClusterClusterSizeMedium captures enum value "Medium" - ClusterClusterSizeMedium string = "Medium" - - // ClusterClusterSizeLarge captures enum value "Large" - ClusterClusterSizeLarge string = "Large" - - // ClusterClusterSizeXLarge captures enum value "XLarge" - ClusterClusterSizeXLarge string = "XLarge" - - // ClusterClusterSizeNextGen captures enum value "NextGen" - ClusterClusterSizeNextGen string = "NextGen" -) - -// prop value enum -func (m *Cluster) validateClusterSizeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeClusterSizePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Cluster) validateClusterSize(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterSize) { // not required - return nil - } - - // value enum - if err := m.validateClusterSizeEnum("clusterSize", "body", *m.ClusterSize); err != nil { - return err - } - - return nil -} - -func (m *Cluster) validateRigelClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.RigelClusterParams) { // not required - return nil - } - - if m.RigelClusterParams != nil { - if err := m.RigelClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClusterParams") - } - return err - } - } - - return nil -} - -func (m *Cluster) 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 -} - -func (m *Cluster) validateProxyServerConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if m.ProxyServerConfig != nil { - if err := m.ProxyServerConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateViewsGlobalSettings(formats strfmt.Registry) error { - if swag.IsZero(m.ViewsGlobalSettings) { // not required - return nil - } - - if m.ViewsGlobalSettings != nil { - if err := m.ViewsGlobalSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewsGlobalSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewsGlobalSettings") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateFileServicesAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileServicesAuditLogConfig) { // not required - return nil - } - - if m.FileServicesAuditLogConfig != nil { - if err := m.FileServicesAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileServicesAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileServicesAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) validateClusterAuditLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if m.ClusterAuditLogConfig != nil { - if err := m.ClusterAuditLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster based on the context it is used -func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncarnationID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterSize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalTenantID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegionID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRigelClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSwVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyServerConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEnableEncryption(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewsGlobalSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileServicesAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterAuditLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Cluster) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateIncarnationID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "incarnationId", "body", m.IncarnationID); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "type", "body", m.Type); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateClusterSize(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterSize", "body", m.ClusterSize); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateLocalTenantID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "localTenantId", "body", m.LocalTenantID); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateTenantID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateRegionID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "regionId", "body", m.RegionID); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateRigelClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RigelClusterParams != nil { - - if swag.IsZero(m.RigelClusterParams) { // not required - return nil - } - - if err := m.RigelClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClusterParams") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateSwVersion(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "swVersion", "body", m.SwVersion); err != nil { - return err - } - - return nil -} - -func (m *Cluster) 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 -} - -func (m *Cluster) contextValidateProxyServerConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyServerConfig != nil { - - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if err := m.ProxyServerConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateEnableEncryption(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "enableEncryption", "body", m.EnableEncryption); err != nil { - return err - } - - return nil -} - -func (m *Cluster) contextValidateViewsGlobalSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewsGlobalSettings != nil { - - if swag.IsZero(m.ViewsGlobalSettings) { // not required - return nil - } - - if err := m.ViewsGlobalSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewsGlobalSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewsGlobalSettings") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateFileServicesAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileServicesAuditLogConfig != nil { - - if swag.IsZero(m.FileServicesAuditLogConfig) { // not required - return nil - } - - if err := m.FileServicesAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileServicesAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileServicesAuditLogConfig") - } - return err - } - } - - return nil -} - -func (m *Cluster) contextValidateClusterAuditLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterAuditLogConfig != nil { - - if swag.IsZero(m.ClusterAuditLogConfig) { // not required - return nil - } - - if err := m.ClusterAuditLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterAuditLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterAuditLogConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Cluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Cluster) UnmarshalBinary(b []byte) error { - var res Cluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_a_m_q_p_target_config.go b/v2/models/cluster_a_m_q_p_target_config.go deleted file mode 100644 index 5f51fd46..00000000 --- a/v2/models/cluster_a_m_q_p_target_config.go +++ /dev/null @@ -1,68 +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" -) - -// ClusterAMQPTargetConfig Specifies the AMQP target config. -// -// swagger:model ClusterAMQPTargetConfig -type ClusterAMQPTargetConfig struct { - - // Specifies the server ip. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the username. - Username *string `json:"username,omitempty"` - - // Specifies the password. - Password *string `json:"password,omitempty"` - - // Specifies the virtual host. - VirtualHost *string `json:"virtualHost,omitempty"` - - // Specifies the exchange. - Exchange *string `json:"exchange,omitempty"` - - // Specifies the filer id. - FilerID *int64 `json:"filerId,omitempty"` - - // Specifies the certificate. - Certificate *string `json:"certificate,omitempty"` -} - -// Validate validates this cluster a m q p target config -func (m *ClusterAMQPTargetConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster a m q p target config based on context it is used -func (m *ClusterAMQPTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterAMQPTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterAMQPTargetConfig) UnmarshalBinary(b []byte) error { - var res ClusterAMQPTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_audit_log_config.go b/v2/models/cluster_audit_log_config.go deleted file mode 100644 index acacf5a3..00000000 --- a/v2/models/cluster_audit_log_config.go +++ /dev/null @@ -1,117 +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" -) - -// ClusterAuditLogConfig Specifies the Cluster audit log configuration. -// -// swagger:model ClusterAuditLogConfig -type ClusterAuditLogConfig struct { - AuditLogConfig - - // Specifies if the Cluster audit logging includes prev value and new value. - VerboseAudit *bool `json:"verboseAudit,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterAuditLogConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AuditLogConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AuditLogConfig = aO0 - - // AO1 - var dataAO1 struct { - VerboseAudit *bool `json:"verboseAudit,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VerboseAudit = dataAO1.VerboseAudit - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterAuditLogConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.AuditLogConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VerboseAudit *bool `json:"verboseAudit,omitempty"` - } - - dataAO1.VerboseAudit = m.VerboseAudit - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster audit log config -func (m *ClusterAuditLogConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AuditLogConfig - if err := m.AuditLogConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster audit log config based on the context it is used -func (m *ClusterAuditLogConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AuditLogConfig - if err := m.AuditLogConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterAuditLogConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterAuditLogConfig) UnmarshalBinary(b []byte) error { - var res ClusterAuditLogConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_cloud_params.go b/v2/models/cluster_create_cloud_params.go deleted file mode 100644 index 6454493e..00000000 --- a/v2/models/cluster_create_cloud_params.go +++ /dev/null @@ -1,83 +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" -) - -// ClusterCreateCloudParams Cloud Cluster Params. -// -// # Params for Cloud Edition Cluster Creation -// -// swagger:model ClusterCreateCloudParams -type ClusterCreateCloudParams struct { - - // node ips - // Min Items: 1 - // Unique: true - NodeIps []string `json:"nodeIps"` -} - -// Validate validates this cluster create cloud params -func (m *ClusterCreateCloudParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeIps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateCloudParams) validateNodeIps(formats strfmt.Registry) error { - if swag.IsZero(m.NodeIps) { // not required - return nil - } - - iNodeIpsSize := int64(len(m.NodeIps)) - - if err := validate.MinItems("nodeIps", "body", iNodeIpsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("nodeIps", "body", m.NodeIps); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster create cloud params based on context it is used -func (m *ClusterCreateCloudParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateCloudParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateCloudParams) UnmarshalBinary(b []byte) error { - var res ClusterCreateCloudParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_network_config.go b/v2/models/cluster_create_network_config.go deleted file mode 100644 index 29d3fd25..00000000 --- a/v2/models/cluster_create_network_config.go +++ /dev/null @@ -1,370 +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" -) - -// ClusterCreateNetworkConfig Cluster Network Config. -// -// Specifies all of the parameters needed for network configuration of the new Cluster. -// -// swagger:model ClusterCreateNetworkConfig -type ClusterCreateNetworkConfig struct { - - // Specifies the list of NTP Servers new cluster should be configured with. - // Required: true - NtpServers []string `json:"ntpServers"` - - // Specifies the list of Domain Names new cluster should be configured with. - // Required: true - DomainNames []string `json:"domainNames"` - - // Specifies the FQDN hostname of the cluster. - VipHostName *string `json:"vipHostName,omitempty"` - - // Specifies IP preference of the cluster to be Ipv4/Ipv6. It is Ipv4 by default. - // Enum: ["Ipv4","Ipv6"] - IPPreference *string `json:"ipPreference,omitempty"` - - // Specifies whether or not to use DHCP to configure the network of the Cluster. - // Required: true - UseDhcp *bool `json:"useDhcp"` - - // Specifies the parameters needed for DHCP based network configuration. - DhcpNetworkConfig *ClusterDhcpNetworkConfig `json:"dhcpNetworkConfig,omitempty"` - - // Specifies the parameters needed for manual network configuration. - ManualNetworkConfig *ClusterManualNetworkConfig `json:"manualNetworkConfig,omitempty"` - - // Specifies the parameters needed for DHCP based secondary network configuration. - SecondaryDhcpNetworkConfig *ClusterDhcpNetworkConfig `json:"secondaryDhcpNetworkConfig,omitempty"` - - // Specifies the parameters needed for manual secondary network configuration. - SecondaryManualNetworkConfig *ClusterManualNetworkConfig `json:"secondaryManualNetworkConfig,omitempty"` -} - -// Validate validates this cluster create network config -func (m *ClusterCreateNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNtpServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomainNames(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUseDhcp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDhcpNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateManualNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryDhcpNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryManualNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateNetworkConfig) validateNtpServers(formats strfmt.Registry) error { - - if err := validate.Required("ntpServers", "body", m.NtpServers); err != nil { - return err - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateDomainNames(formats strfmt.Registry) error { - - if err := validate.Required("domainNames", "body", m.DomainNames); err != nil { - return err - } - - return nil -} - -var clusterCreateNetworkConfigTypeIPPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Ipv4","Ipv6"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterCreateNetworkConfigTypeIPPreferencePropEnum = append(clusterCreateNetworkConfigTypeIPPreferencePropEnum, v) - } -} - -const ( - - // ClusterCreateNetworkConfigIPPreferenceIPV4 captures enum value "Ipv4" - ClusterCreateNetworkConfigIPPreferenceIPV4 string = "Ipv4" - - // ClusterCreateNetworkConfigIPPreferenceIPV6 captures enum value "Ipv6" - ClusterCreateNetworkConfigIPPreferenceIPV6 string = "Ipv6" -) - -// prop value enum -func (m *ClusterCreateNetworkConfig) validateIPPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterCreateNetworkConfigTypeIPPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterCreateNetworkConfig) validateIPPreference(formats strfmt.Registry) error { - if swag.IsZero(m.IPPreference) { // not required - return nil - } - - // value enum - if err := m.validateIPPreferenceEnum("ipPreference", "body", *m.IPPreference); err != nil { - return err - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateUseDhcp(formats strfmt.Registry) error { - - if err := validate.Required("useDhcp", "body", m.UseDhcp); err != nil { - return err - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateDhcpNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DhcpNetworkConfig) { // not required - return nil - } - - if m.DhcpNetworkConfig != nil { - if err := m.DhcpNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dhcpNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dhcpNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateManualNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ManualNetworkConfig) { // not required - return nil - } - - if m.ManualNetworkConfig != nil { - if err := m.ManualNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("manualNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("manualNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateSecondaryDhcpNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryDhcpNetworkConfig) { // not required - return nil - } - - if m.SecondaryDhcpNetworkConfig != nil { - if err := m.SecondaryDhcpNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDhcpNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDhcpNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) validateSecondaryManualNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryManualNetworkConfig) { // not required - return nil - } - - if m.SecondaryManualNetworkConfig != nil { - if err := m.SecondaryManualNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryManualNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryManualNetworkConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster create network config based on the context it is used -func (m *ClusterCreateNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDhcpNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateManualNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecondaryDhcpNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecondaryManualNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateNetworkConfig) contextValidateDhcpNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DhcpNetworkConfig != nil { - - if swag.IsZero(m.DhcpNetworkConfig) { // not required - return nil - } - - if err := m.DhcpNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dhcpNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dhcpNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) contextValidateManualNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ManualNetworkConfig != nil { - - if swag.IsZero(m.ManualNetworkConfig) { // not required - return nil - } - - if err := m.ManualNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("manualNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("manualNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) contextValidateSecondaryDhcpNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SecondaryDhcpNetworkConfig != nil { - - if swag.IsZero(m.SecondaryDhcpNetworkConfig) { // not required - return nil - } - - if err := m.SecondaryDhcpNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDhcpNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDhcpNetworkConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterCreateNetworkConfig) contextValidateSecondaryManualNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SecondaryManualNetworkConfig != nil { - - if swag.IsZero(m.SecondaryManualNetworkConfig) { // not required - return nil - } - - if err := m.SecondaryManualNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryManualNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryManualNetworkConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateNetworkConfig) UnmarshalBinary(b []byte) error { - var res ClusterCreateNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_node_params.go b/v2/models/cluster_create_node_params.go deleted file mode 100644 index 3cd2c9aa..00000000 --- a/v2/models/cluster_create_node_params.go +++ /dev/null @@ -1,90 +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" -) - -// ClusterCreateNodeParams Node Specific Params. -// -// # Node params required for cluster creation -// -// swagger:model ClusterCreateNodeParams -type ClusterCreateNodeParams struct { - - // Specifies the node id of the node. - // Required: true - NodeID *int64 `json:"nodeId"` - - // Specifies the node ip address which is either in ipv4/ipv6 format. - // Required: true - NodeIP *string `json:"nodeIp"` -} - -// Validate validates this cluster create node params -func (m *ClusterCreateNodeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateNodeParams) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -func (m *ClusterCreateNodeParams) validateNodeIP(formats strfmt.Registry) error { - - if err := validate.Required("nodeIp", "body", m.NodeIP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster create node params based on context it is used -func (m *ClusterCreateNodeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateNodeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateNodeParams) UnmarshalBinary(b []byte) error { - var res ClusterCreateNodeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_node_status_response.go b/v2/models/cluster_create_node_status_response.go deleted file mode 100644 index cb0ff621..00000000 --- a/v2/models/cluster_create_node_status_response.go +++ /dev/null @@ -1,58 +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" -) - -// ClusterCreateNodeStatusResponse Node specific response. -// -// Specifies node specific response of cluster create. -// -// swagger:model ClusterCreateNodeStatusResponse -type ClusterCreateNodeStatusResponse struct { - - // Specifies the id of the node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the Ip address of the node. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies optional message related to node status. - Message *string `json:"message,omitempty"` -} - -// Validate validates this cluster create node status response -func (m *ClusterCreateNodeStatusResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster create node status response based on context it is used -func (m *ClusterCreateNodeStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateNodeStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateNodeStatusResponse) UnmarshalBinary(b []byte) error { - var res ClusterCreateNodeStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_physical_params.go b/v2/models/cluster_create_physical_params.go deleted file mode 100644 index eaad8442..00000000 --- a/v2/models/cluster_create_physical_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterCreatePhysicalParams Physical Cluster Params. -// -// # Params for Physical Edition Cluster Creation -// -// swagger:model ClusterCreatePhysicalParams -type ClusterCreatePhysicalParams struct { - - // nodes - // Min Items: 1 - // Unique: true - Nodes []*ClusterCreateNodeParams `json:"nodes"` -} - -// Validate validates this cluster create physical params -func (m *ClusterCreatePhysicalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreatePhysicalParams) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - iNodesSize := int64(len(m.Nodes)) - - if err := validate.MinItems("nodes", "body", iNodesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("nodes", "body", m.Nodes); err != nil { - return err - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster create physical params based on the context it is used -func (m *ClusterCreatePhysicalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreatePhysicalParams) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreatePhysicalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreatePhysicalParams) UnmarshalBinary(b []byte) error { - var res ClusterCreatePhysicalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_rigel_params.go b/v2/models/cluster_create_rigel_params.go deleted file mode 100644 index 83ef12f2..00000000 --- a/v2/models/cluster_create_rigel_params.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterCreateRigelParams Rigel Cluster Params. -// -// # Params for Rigel Cluster Creation -// -// swagger:model ClusterCreateRigelParams -type ClusterCreateRigelParams struct { - - // nodes - // Required: true - // Unique: true - Nodes []*RigelClusterNode `json:"nodes"` - - // Specifies the token which will be used to claim this Cluster to Helios. - // Required: true - ClaimToken *string `json:"claimToken"` -} - -// Validate validates this cluster create rigel params -func (m *ClusterCreateRigelParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateRigelParams) validateNodes(formats strfmt.Registry) error { - - if err := validate.Required("nodes", "body", m.Nodes); err != nil { - return err - } - - if err := validate.UniqueItems("nodes", "body", m.Nodes); err != nil { - return err - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterCreateRigelParams) validateClaimToken(formats strfmt.Registry) error { - - if err := validate.Required("claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cluster create rigel params based on the context it is used -func (m *ClusterCreateRigelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateRigelParams) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateRigelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateRigelParams) UnmarshalBinary(b []byte) error { - var res ClusterCreateRigelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_create_virtual_params.go b/v2/models/cluster_create_virtual_params.go deleted file mode 100644 index 01e86707..00000000 --- a/v2/models/cluster_create_virtual_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterCreateVirtualParams Virtual Cluster Params. -// -// # Params for Virtual Edition Cluster Creation -// -// swagger:model ClusterCreateVirtualParams -type ClusterCreateVirtualParams struct { - - // nodes - // Min Items: 1 - // Unique: true - Nodes []*ClusterCreateNodeParams `json:"nodes"` -} - -// Validate validates this cluster create virtual params -func (m *ClusterCreateVirtualParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateVirtualParams) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - iNodesSize := int64(len(m.Nodes)) - - if err := validate.MinItems("nodes", "body", iNodesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("nodes", "body", m.Nodes); err != nil { - return err - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster create virtual params based on the context it is used -func (m *ClusterCreateVirtualParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterCreateVirtualParams) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterCreateVirtualParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterCreateVirtualParams) UnmarshalBinary(b []byte) error { - var res ClusterCreateVirtualParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_dhcp_network_config.go b/v2/models/cluster_dhcp_network_config.go deleted file mode 100644 index 09b3ac95..00000000 --- a/v2/models/cluster_dhcp_network_config.go +++ /dev/null @@ -1,129 +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" -) - -// ClusterDhcpNetworkConfig Cluster Network Config. -// -// Specifies all of the parameters needed for network configuration of the new Cluster using DHCP. -// -// swagger:model ClusterDhcpNetworkConfig -type ClusterDhcpNetworkConfig struct { - - // Specifies the gateway of the new cluster network. - // Read Only: true - Gateway *string `json:"gateway,omitempty"` - - // Specifies the ip subnet ip of the cluster network. - // Read Only: true - SubnetIP *string `json:"subnetIp,omitempty"` - - // Specifies the ip subnet mask of the cluster network. - // Read Only: true - SubnetMask *string `json:"subnetMask,omitempty"` - - // Specifies the list of Dns Servers new cluster should be configured with. - // Required: true - DNSServers []string `json:"dnsServers"` -} - -// Validate validates this cluster dhcp network config -func (m *ClusterDhcpNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDNSServers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterDhcpNetworkConfig) validateDNSServers(formats strfmt.Registry) error { - - if err := validate.Required("dnsServers", "body", m.DNSServers); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cluster dhcp network config based on the context it is used -func (m *ClusterDhcpNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGateway(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetIP(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetMask(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterDhcpNetworkConfig) contextValidateGateway(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "gateway", "body", m.Gateway); err != nil { - return err - } - - return nil -} - -func (m *ClusterDhcpNetworkConfig) contextValidateSubnetIP(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "subnetIp", "body", m.SubnetIP); err != nil { - return err - } - - return nil -} - -func (m *ClusterDhcpNetworkConfig) contextValidateSubnetMask(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "subnetMask", "body", m.SubnetMask); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterDhcpNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterDhcpNetworkConfig) UnmarshalBinary(b []byte) error { - var res ClusterDhcpNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_expand_params.go b/v2/models/cluster_expand_params.go deleted file mode 100644 index e1b36992..00000000 --- a/v2/models/cluster_expand_params.go +++ /dev/null @@ -1,217 +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" -) - -// ClusterExpandParams The parameters to expand the cluster. -// -// swagger:model ClusterExpandParams -type ClusterExpandParams struct { - - // Type of the cluster. 'Cloud' indicates cloud edition cluster. 'Physical' indicates physical edition cluster. 'Virtual' indicates virtual edition cluster. - // Required: true - // Enum: ["Physical","Cloud","Virtual"] - Type *string `json:"type"` - - // Parameters to expand cloud edition cluster. - CloudClusterParams *CloudClusterExpandParams `json:"cloudClusterParams,omitempty"` - - // Parameters to expand physical edition cluster. - PhysicalClusterParams *PhysicalClusterExpandParams `json:"physicalClusterParams,omitempty"` -} - -// Validate validates this cluster expand params -func (m *ClusterExpandParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalClusterParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterExpandParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Cloud","Virtual"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterExpandParamsTypeTypePropEnum = append(clusterExpandParamsTypeTypePropEnum, v) - } -} - -const ( - - // ClusterExpandParamsTypePhysical captures enum value "Physical" - ClusterExpandParamsTypePhysical string = "Physical" - - // ClusterExpandParamsTypeCloud captures enum value "Cloud" - ClusterExpandParamsTypeCloud string = "Cloud" - - // ClusterExpandParamsTypeVirtual captures enum value "Virtual" - ClusterExpandParamsTypeVirtual string = "Virtual" -) - -// prop value enum -func (m *ClusterExpandParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterExpandParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterExpandParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *ClusterExpandParams) validateCloudClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.CloudClusterParams) { // not required - return nil - } - - if m.CloudClusterParams != nil { - if err := m.CloudClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudClusterParams") - } - return err - } - } - - return nil -} - -func (m *ClusterExpandParams) validatePhysicalClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalClusterParams) { // not required - return nil - } - - if m.PhysicalClusterParams != nil { - if err := m.PhysicalClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalClusterParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this cluster expand params based on the context it is used -func (m *ClusterExpandParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCloudClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterExpandParams) contextValidateCloudClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudClusterParams != nil { - - if swag.IsZero(m.CloudClusterParams) { // not required - return nil - } - - if err := m.CloudClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudClusterParams") - } - return err - } - } - - return nil -} - -func (m *ClusterExpandParams) contextValidatePhysicalClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalClusterParams != nil { - - if swag.IsZero(m.PhysicalClusterParams) { // not required - return nil - } - - if err := m.PhysicalClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalClusterParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterExpandParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterExpandParams) UnmarshalBinary(b []byte) error { - var res ClusterExpandParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_free_disks.go b/v2/models/cluster_free_disks.go deleted file mode 100644 index 18c030bd..00000000 --- a/v2/models/cluster_free_disks.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterFreeDisks ClusterFreeDisks -// -// Sepcifies the free disks of cluster. -// -// swagger:model ClusterFreeDisks -type ClusterFreeDisks struct { - - // Specifies list of free disks of cluster. - // Required: true - NodeFreeDisks []*NodeFreeDisks `json:"nodeFreeDisks"` -} - -// Validate validates this cluster free disks -func (m *ClusterFreeDisks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeFreeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterFreeDisks) validateNodeFreeDisks(formats strfmt.Registry) error { - - if err := validate.Required("nodeFreeDisks", "body", m.NodeFreeDisks); err != nil { - return err - } - - for i := 0; i < len(m.NodeFreeDisks); i++ { - if swag.IsZero(m.NodeFreeDisks[i]) { // not required - continue - } - - if m.NodeFreeDisks[i] != nil { - if err := m.NodeFreeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeFreeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeFreeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster free disks based on the context it is used -func (m *ClusterFreeDisks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeFreeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterFreeDisks) contextValidateNodeFreeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeFreeDisks); i++ { - - if m.NodeFreeDisks[i] != nil { - - if swag.IsZero(m.NodeFreeDisks[i]) { // not required - return nil - } - - if err := m.NodeFreeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeFreeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeFreeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterFreeDisks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterFreeDisks) UnmarshalBinary(b []byte) error { - var res ClusterFreeDisks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_health_status.go b/v2/models/cluster_health_status.go deleted file mode 100644 index 3704c4ad..00000000 --- a/v2/models/cluster_health_status.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterHealthStatus ClusterHealthStatus -// -// # Cluster Health Status -// -// swagger:model ClusterHealthStatus -type ClusterHealthStatus struct { - - // Specifies the cluster health status. - // Enum: ["Critical","NonCritical"] - Status string `json:"status,omitempty"` -} - -// Validate validates this cluster health status -func (m *ClusterHealthStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterHealthStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Critical","NonCritical"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterHealthStatusTypeStatusPropEnum = append(clusterHealthStatusTypeStatusPropEnum, v) - } -} - -const ( - - // ClusterHealthStatusStatusCritical captures enum value "Critical" - ClusterHealthStatusStatusCritical string = "Critical" - - // ClusterHealthStatusStatusNonCritical captures enum value "NonCritical" - ClusterHealthStatusStatusNonCritical string = "NonCritical" -) - -// prop value enum -func (m *ClusterHealthStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterHealthStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterHealthStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster health status based on context it is used -func (m *ClusterHealthStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterHealthStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterHealthStatus) UnmarshalBinary(b []byte) error { - var res ClusterHealthStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_identifier.go b/v2/models/cluster_identifier.go deleted file mode 100644 index c407581f..00000000 --- a/v2/models/cluster_identifier.go +++ /dev/null @@ -1,79 +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" -) - -// ClusterIdentifier Cluster Identifier -// -// Specifies the information about a cluster. -// -// swagger:model ClusterIdentifier -type ClusterIdentifier struct { - - // Specifies the id of the cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the name of the cluster. - // Read Only: true - ClusterName *string `json:"clusterName,omitempty"` -} - -// Validate validates this cluster identifier -func (m *ClusterIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this cluster identifier based on the context it is used -func (m *ClusterIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterIdentifier) contextValidateClusterName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterIdentifier) UnmarshalBinary(b []byte) error { - var res ClusterIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_interfaces.go b/v2/models/cluster_interfaces.go deleted file mode 100644 index 923e3884..00000000 --- a/v2/models/cluster_interfaces.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterInterfaces Cluster Interfaces -// -// Specifies the interfaces present on a Cluster grouped by the Node where they are present. -// -// swagger:model ClusterInterfaces -type ClusterInterfaces struct { - - // Specifies the list of nodes present in the cluster. If the request was sent to a free node, then this list will have exactly one entry. - Nodes []*NodeInterfaces `json:"nodes"` -} - -// Validate validates this cluster interfaces -func (m *ClusterInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterInterfaces) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster interfaces based on the context it is used -func (m *ClusterInterfaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterInterfaces) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterInterfaces) UnmarshalBinary(b []byte) error { - var res ClusterInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_ipmi_user.go b/v2/models/cluster_ipmi_user.go deleted file mode 100644 index 82a511ee..00000000 --- a/v2/models/cluster_ipmi_user.go +++ /dev/null @@ -1,71 +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" -) - -// ClusterIpmiUser Cluster level IPMI user parameters. -// -// swagger:model ClusterIpmiUser -type ClusterIpmiUser struct { - - // IPMI username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this cluster ipmi user -func (m *ClusterIpmiUser) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterIpmiUser) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster ipmi user based on context it is used -func (m *ClusterIpmiUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterIpmiUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterIpmiUser) UnmarshalBinary(b []byte) error { - var res ClusterIpmiUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_local_domain_s_id.go b/v2/models/cluster_local_domain_s_id.go deleted file mode 100644 index 942f9588..00000000 --- a/v2/models/cluster_local_domain_s_id.go +++ /dev/null @@ -1,50 +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" -) - -// ClusterLocalDomainSID Specifies the SID of cluster local domain. -// -// swagger:model ClusterLocalDomainSID -type ClusterLocalDomainSID struct { - - // Specifies the SID of cluster local domain. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this cluster local domain s ID -func (m *ClusterLocalDomainSID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster local domain s ID based on context it is used -func (m *ClusterLocalDomainSID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterLocalDomainSID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterLocalDomainSID) UnmarshalBinary(b []byte) error { - var res ClusterLocalDomainSID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_log_type.go b/v2/models/cluster_log_type.go deleted file mode 100644 index 9c7a3a2d..00000000 --- a/v2/models/cluster_log_type.go +++ /dev/null @@ -1,110 +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" -) - -// ClusterLogType Cluster Log Type. -// -// cluster log type. -// -// swagger:model ClusterLogType -type ClusterLogType struct { - - // Cluster Log Type. - // Enum: ["Info","Warning","Error"] - Type string `json:"type,omitempty"` -} - -// Validate validates this cluster log type -func (m *ClusterLogType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterLogTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Info","Warning","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterLogTypeTypeTypePropEnum = append(clusterLogTypeTypeTypePropEnum, v) - } -} - -const ( - - // ClusterLogTypeTypeInfo captures enum value "Info" - ClusterLogTypeTypeInfo string = "Info" - - // ClusterLogTypeTypeWarning captures enum value "Warning" - ClusterLogTypeTypeWarning string = "Warning" - - // ClusterLogTypeTypeError captures enum value "Error" - ClusterLogTypeTypeError string = "Error" -) - -// prop value enum -func (m *ClusterLogType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterLogTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterLogType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster log type based on context it is used -func (m *ClusterLogType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterLogType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterLogType) UnmarshalBinary(b []byte) error { - var res ClusterLogType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_manual_network_config.go b/v2/models/cluster_manual_network_config.go deleted file mode 100644 index d410fa3f..00000000 --- a/v2/models/cluster_manual_network_config.go +++ /dev/null @@ -1,124 +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" -) - -// ClusterManualNetworkConfig Cluster Network Config. -// -// Specifies all of the parameters needed for network configuration of the new Cluster using manual configuration. -// -// swagger:model ClusterManualNetworkConfig -type ClusterManualNetworkConfig struct { - - // Specifies the gateway of the new cluster network. - // Required: true - Gateway *string `json:"gateway"` - - // Specifies the ip subnet ip of the cluster network. - // Required: true - SubnetIP *string `json:"subnetIp"` - - // Specifies the ip subnet mask of the cluster network. - // Required: true - SubnetMask *string `json:"subnetMask"` - - // Specifies the list of Dns Servers new cluster should be configured with. - // Required: true - DNSServers []string `json:"dnsServers"` -} - -// Validate validates this cluster manual network config -func (m *ClusterManualNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGateway(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetIP(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetMask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDNSServers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterManualNetworkConfig) validateGateway(formats strfmt.Registry) error { - - if err := validate.Required("gateway", "body", m.Gateway); err != nil { - return err - } - - return nil -} - -func (m *ClusterManualNetworkConfig) validateSubnetIP(formats strfmt.Registry) error { - - if err := validate.Required("subnetIp", "body", m.SubnetIP); err != nil { - return err - } - - return nil -} - -func (m *ClusterManualNetworkConfig) validateSubnetMask(formats strfmt.Registry) error { - - if err := validate.Required("subnetMask", "body", m.SubnetMask); err != nil { - return err - } - - return nil -} - -func (m *ClusterManualNetworkConfig) validateDNSServers(formats strfmt.Registry) error { - - if err := validate.Required("dnsServers", "body", m.DNSServers); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster manual network config based on context it is used -func (m *ClusterManualNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterManualNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterManualNetworkConfig) UnmarshalBinary(b []byte) error { - var res ClusterManualNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_node_operation_status.go b/v2/models/cluster_node_operation_status.go deleted file mode 100644 index 3e1732f1..00000000 --- a/v2/models/cluster_node_operation_status.go +++ /dev/null @@ -1,188 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterNodeOperationStatus Specifies the operation status of the nodes. -// -// swagger:model ClusterNodeOperationStatus -type ClusterNodeOperationStatus struct { - - // Specifies the id of the node. - ID *int64 `json:"id,omitempty"` - - // Specifies the Ip address of the node. - IP *string `json:"ip,omitempty"` - - // Specifies an approximate completion percentage for the operation. - Percentage int32 `json:"percentage,omitempty"` - - // Specifies an estimated number of seconds until the operation is complete. - TimeRemainingSeconds int64 `json:"timeRemainingSeconds,omitempty"` - - // Specifies the status of the operation. 'Success' indicates the operation is successful. 'Failed' indicates the operation failed due to an error. 'InProgress' indicates the operation is in progress. - // Enum: ["InProgress","Success","Failed"] - Status *string `json:"status,omitempty"` - - // Specifies the list of events that took place during the operation. - Events []*OperationEvents `json:"events,omitempty"` -} - -// Validate validates this cluster node operation status -func (m *ClusterNodeOperationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEvents(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterNodeOperationStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InProgress","Success","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterNodeOperationStatusTypeStatusPropEnum = append(clusterNodeOperationStatusTypeStatusPropEnum, v) - } -} - -const ( - - // ClusterNodeOperationStatusStatusInProgress captures enum value "InProgress" - ClusterNodeOperationStatusStatusInProgress string = "InProgress" - - // ClusterNodeOperationStatusStatusSuccess captures enum value "Success" - ClusterNodeOperationStatusStatusSuccess string = "Success" - - // ClusterNodeOperationStatusStatusFailed captures enum value "Failed" - ClusterNodeOperationStatusStatusFailed string = "Failed" -) - -// prop value enum -func (m *ClusterNodeOperationStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterNodeOperationStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterNodeOperationStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *ClusterNodeOperationStatus) validateEvents(formats strfmt.Registry) error { - if swag.IsZero(m.Events) { // not required - return nil - } - - for i := 0; i < len(m.Events); i++ { - if swag.IsZero(m.Events[i]) { // not required - continue - } - - if m.Events[i] != nil { - if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster node operation status based on the context it is used -func (m *ClusterNodeOperationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEvents(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterNodeOperationStatus) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Events); i++ { - - if m.Events[i] != nil { - - if swag.IsZero(m.Events[i]) { // not required - return nil - } - - if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterNodeOperationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterNodeOperationStatus) UnmarshalBinary(b []byte) error { - var res ClusterNodeOperationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_operation_response_params.go b/v2/models/cluster_operation_response_params.go deleted file mode 100644 index b508ca8f..00000000 --- a/v2/models/cluster_operation_response_params.go +++ /dev/null @@ -1,50 +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" -) - -// ClusterOperationResponseParams Specifies cluster operation response parameters. -// -// swagger:model ClusterOperationResponseParams -type ClusterOperationResponseParams struct { - - // Specifies the cluster operation id. This can be used to track the progress of the operation. - OperationID string `json:"operationId,omitempty"` -} - -// Validate validates this cluster operation response params -func (m *ClusterOperationResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster operation response params based on context it is used -func (m *ClusterOperationResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterOperationResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterOperationResponseParams) UnmarshalBinary(b []byte) error { - var res ClusterOperationResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_operation_status.go b/v2/models/cluster_operation_status.go deleted file mode 100644 index 8d9cac5f..00000000 --- a/v2/models/cluster_operation_status.go +++ /dev/null @@ -1,318 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterOperationStatus Specifies cluster operation status parameters. -// -// swagger:model ClusterOperationStatus -type ClusterOperationStatus struct { - - // Specifies the id of the cluster. - ClusterID int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster. - ClusterIncarnationID int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the type of cluster operation. 'Destroy' indicates cluster destroy operation. 'Create' indicates cluster create operation. 'NodeAddition' indicates the operation to add nodes to the cluster. 'Upgrade' indicates cluster upgrade operation. 'UploadPackageByUrl' indicates the operation to upload a package by URL. 'UploadPackageAndUpgrade' indicates the operation to upload package by URL and upgrade the cluster. 'NodeRemoval' indicates a node removal operation. 'PackageRemoval' indicates the operation to remove a software package from the cluster. - // Enum: ["Destroy","Create","NodeAddition","Upgrade","UploadPackageByUrl","UploadPackageAndUpgrade","NodeRemoval","PackageRemoval"] - Type string `json:"type,omitempty"` - - // Specifies an approximate completion percentage for the operation. - Percentage int32 `json:"percentage,omitempty"` - - // Specifies an estimated number of seconds until the operation is complete. - TimeRemainingSeconds int64 `json:"timeRemainingSeconds,omitempty"` - - // Specifies the status of the operation. 'Success' indicates the operation is successful. 'Failed' indicates the operation failed due to an error. 'InProgress' indicates the operation is in progress. - // Enum: ["InProgress","Success","Failed"] - Status string `json:"status,omitempty"` - - // Specifies the list of events that took place during the operation. - Events []*OperationEvents `json:"events,omitempty"` - - // Specifies the operation status of the nodes. - NodesOperationStatus []*ClusterNodeOperationStatus `json:"nodesOperationStatus,omitempty"` -} - -// Validate validates this cluster operation status -func (m *ClusterOperationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEvents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodesOperationStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterOperationStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Destroy","Create","NodeAddition","Upgrade","UploadPackageByUrl","UploadPackageAndUpgrade","NodeRemoval","PackageRemoval"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterOperationStatusTypeTypePropEnum = append(clusterOperationStatusTypeTypePropEnum, v) - } -} - -const ( - - // ClusterOperationStatusTypeDestroy captures enum value "Destroy" - ClusterOperationStatusTypeDestroy string = "Destroy" - - // ClusterOperationStatusTypeCreate captures enum value "Create" - ClusterOperationStatusTypeCreate string = "Create" - - // ClusterOperationStatusTypeNodeAddition captures enum value "NodeAddition" - ClusterOperationStatusTypeNodeAddition string = "NodeAddition" - - // ClusterOperationStatusTypeUpgrade captures enum value "Upgrade" - ClusterOperationStatusTypeUpgrade string = "Upgrade" - - // ClusterOperationStatusTypeUploadPackageByURL captures enum value "UploadPackageByUrl" - ClusterOperationStatusTypeUploadPackageByURL string = "UploadPackageByUrl" - - // ClusterOperationStatusTypeUploadPackageAndUpgrade captures enum value "UploadPackageAndUpgrade" - ClusterOperationStatusTypeUploadPackageAndUpgrade string = "UploadPackageAndUpgrade" - - // ClusterOperationStatusTypeNodeRemoval captures enum value "NodeRemoval" - ClusterOperationStatusTypeNodeRemoval string = "NodeRemoval" - - // ClusterOperationStatusTypePackageRemoval captures enum value "PackageRemoval" - ClusterOperationStatusTypePackageRemoval string = "PackageRemoval" -) - -// prop value enum -func (m *ClusterOperationStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterOperationStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterOperationStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -var clusterOperationStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InProgress","Success","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterOperationStatusTypeStatusPropEnum = append(clusterOperationStatusTypeStatusPropEnum, v) - } -} - -const ( - - // ClusterOperationStatusStatusInProgress captures enum value "InProgress" - ClusterOperationStatusStatusInProgress string = "InProgress" - - // ClusterOperationStatusStatusSuccess captures enum value "Success" - ClusterOperationStatusStatusSuccess string = "Success" - - // ClusterOperationStatusStatusFailed captures enum value "Failed" - ClusterOperationStatusStatusFailed string = "Failed" -) - -// prop value enum -func (m *ClusterOperationStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterOperationStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterOperationStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *ClusterOperationStatus) validateEvents(formats strfmt.Registry) error { - if swag.IsZero(m.Events) { // not required - return nil - } - - for i := 0; i < len(m.Events); i++ { - if swag.IsZero(m.Events[i]) { // not required - continue - } - - if m.Events[i] != nil { - if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterOperationStatus) validateNodesOperationStatus(formats strfmt.Registry) error { - if swag.IsZero(m.NodesOperationStatus) { // not required - return nil - } - - for i := 0; i < len(m.NodesOperationStatus); i++ { - if swag.IsZero(m.NodesOperationStatus[i]) { // not required - continue - } - - if m.NodesOperationStatus[i] != nil { - if err := m.NodesOperationStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesOperationStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesOperationStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster operation status based on the context it is used -func (m *ClusterOperationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEvents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodesOperationStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterOperationStatus) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Events); i++ { - - if m.Events[i] != nil { - - if swag.IsZero(m.Events[i]) { // not required - return nil - } - - if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterOperationStatus) contextValidateNodesOperationStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesOperationStatus); i++ { - - if m.NodesOperationStatus[i] != nil { - - if swag.IsZero(m.NodesOperationStatus[i]) { // not required - return nil - } - - if err := m.NodesOperationStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesOperationStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesOperationStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterOperationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterOperationStatus) UnmarshalBinary(b []byte) error { - var res ClusterOperationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_package_params.go b/v2/models/cluster_package_params.go deleted file mode 100644 index 948ec496..00000000 --- a/v2/models/cluster_package_params.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" -) - -// ClusterPackageParams Cluster software package parameters. -// -// swagger:model ClusterPackageParams -type ClusterPackageParams struct { - - // Name of the package version. Example: 6.3.1h_release-20210714_0fad884e - VersionName *string `json:"versionName,omitempty"` - - // Release date of the package. - ReleaseDate *string `json:"releaseDate,omitempty"` -} - -// Validate validates this cluster package params -func (m *ClusterPackageParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster package params based on context it is used -func (m *ClusterPackageParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterPackageParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterPackageParams) UnmarshalBinary(b []byte) error { - var res ClusterPackageParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_packages.go b/v2/models/cluster_packages.go deleted file mode 100644 index 08b2aef6..00000000 --- a/v2/models/cluster_packages.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterPackages List of cluster software packages. -// -// swagger:model ClusterPackages -type ClusterPackages struct { - - // List of cluster software packages. - Packages []*ClusterPackageParams `json:"packages"` -} - -// Validate validates this cluster packages -func (m *ClusterPackages) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePackages(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterPackages) validatePackages(formats strfmt.Registry) error { - if swag.IsZero(m.Packages) { // not required - return nil - } - - for i := 0; i < len(m.Packages); i++ { - if swag.IsZero(m.Packages[i]) { // not required - continue - } - - if m.Packages[i] != nil { - if err := m.Packages[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("packages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("packages" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster packages based on the context it is used -func (m *ClusterPackages) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePackages(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterPackages) contextValidatePackages(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Packages); i++ { - - if m.Packages[i] != nil { - - if swag.IsZero(m.Packages[i]) { // not required - return nil - } - - if err := m.Packages[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("packages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("packages" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterPackages) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterPackages) UnmarshalBinary(b []byte) error { - var res ClusterPackages - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_provider_type.go b/v2/models/cluster_provider_type.go deleted file mode 100644 index 451d0115..00000000 --- a/v2/models/cluster_provider_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterProviderType ClusterProviderType -// -// # Cluster Provider Type -// -// swagger:model ClusterProviderType -type ClusterProviderType struct { - - // Specifies the cluster provider type. - // Enum: ["kMCMCohesity","kIBMStorageProtect"] - ClusterProviderType string `json:"clusterProviderType,omitempty"` -} - -// Validate validates this cluster provider type -func (m *ClusterProviderType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterProviderType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterProviderTypeTypeClusterProviderTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMCMCohesity","kIBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterProviderTypeTypeClusterProviderTypePropEnum = append(clusterProviderTypeTypeClusterProviderTypePropEnum, v) - } -} - -const ( - - // ClusterProviderTypeClusterProviderTypeKMCMCohesity captures enum value "kMCMCohesity" - ClusterProviderTypeClusterProviderTypeKMCMCohesity string = "kMCMCohesity" - - // ClusterProviderTypeClusterProviderTypeKIBMStorageProtect captures enum value "kIBMStorageProtect" - ClusterProviderTypeClusterProviderTypeKIBMStorageProtect string = "kIBMStorageProtect" -) - -// prop value enum -func (m *ClusterProviderType) validateClusterProviderTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterProviderTypeTypeClusterProviderTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterProviderType) validateClusterProviderType(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterProviderType) { // not required - return nil - } - - // value enum - if err := m.validateClusterProviderTypeEnum("clusterProviderType", "body", m.ClusterProviderType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster provider type based on context it is used -func (m *ClusterProviderType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterProviderType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterProviderType) UnmarshalBinary(b []byte) error { - var res ClusterProviderType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_proxy_server_config.go b/v2/models/cluster_proxy_server_config.go deleted file mode 100644 index f6facc7c..00000000 --- a/v2/models/cluster_proxy_server_config.go +++ /dev/null @@ -1,118 +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" -) - -// ClusterProxyServerConfig Cluster Proxy Server Config. -// -// Specifies the parameters of the proxy server to be used for external traffic. -// -// swagger:model ClusterProxyServerConfig -type ClusterProxyServerConfig struct { - - // Specifies the unique name of the proxy server. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the IP address of the proxy server. - // Required: true - IP *string `json:"ip"` - - // Specifies the port on which the server is listening. - // Required: true - Port *int32 `json:"port"` - - // Specifies the username for the proxy. - Username *string `json:"username,omitempty"` - - // Specifies the password for the proxy. - Password *string `json:"password,omitempty"` -} - -// Validate validates this cluster proxy server config -func (m *ClusterProxyServerConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIP(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterProxyServerConfig) validateIP(formats strfmt.Registry) error { - - if err := validate.Required("ip", "body", m.IP); err != nil { - return err - } - - return nil -} - -func (m *ClusterProxyServerConfig) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", m.Port); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cluster proxy server config based on the context it is used -func (m *ClusterProxyServerConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterProxyServerConfig) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterProxyServerConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterProxyServerConfig) UnmarshalBinary(b []byte) error { - var res ClusterProxyServerConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_size.go b/v2/models/cluster_size.go deleted file mode 100644 index f78754da..00000000 --- a/v2/models/cluster_size.go +++ /dev/null @@ -1,116 +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" -) - -// ClusterSize Cluster Size -// -// Cluster Size of cloud platforms. -// -// swagger:model ClusterSize -type ClusterSize struct { - - // Specifies the cluster size. - // Enum: ["Small","Medium","Large","XLarge","NextGen"] - ClusterSize string `json:"clusterSize,omitempty"` -} - -// Validate validates this cluster size -func (m *ClusterSize) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterSize(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterSizeTypeClusterSizePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Small","Medium","Large","XLarge","NextGen"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterSizeTypeClusterSizePropEnum = append(clusterSizeTypeClusterSizePropEnum, v) - } -} - -const ( - - // ClusterSizeClusterSizeSmall captures enum value "Small" - ClusterSizeClusterSizeSmall string = "Small" - - // ClusterSizeClusterSizeMedium captures enum value "Medium" - ClusterSizeClusterSizeMedium string = "Medium" - - // ClusterSizeClusterSizeLarge captures enum value "Large" - ClusterSizeClusterSizeLarge string = "Large" - - // ClusterSizeClusterSizeXLarge captures enum value "XLarge" - ClusterSizeClusterSizeXLarge string = "XLarge" - - // ClusterSizeClusterSizeNextGen captures enum value "NextGen" - ClusterSizeClusterSizeNextGen string = "NextGen" -) - -// prop value enum -func (m *ClusterSize) validateClusterSizeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterSizeTypeClusterSizePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterSize) validateClusterSize(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterSize) { // not required - return nil - } - - // value enum - if err := m.validateClusterSizeEnum("clusterSize", "body", m.ClusterSize); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster size based on context it is used -func (m *ClusterSize) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterSize) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterSize) UnmarshalBinary(b []byte) error { - var res ClusterSize - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_state_params.go b/v2/models/cluster_state_params.go deleted file mode 100644 index 38490fb1..00000000 --- a/v2/models/cluster_state_params.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterStateParams Specifies the current cluster state details. -// -// swagger:model ClusterStateParams -type ClusterStateParams struct { - - // Specifies the id of the cluster. - ClusterID int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster. - ClusterIncarnationID int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the name of the cluster. - Name string `json:"name,omitempty"` - - // Specifies the software version of the cluster. - SoftwareVersion string `json:"softwareVersion,omitempty"` - - // Specifies the operations running on the cluster. 'None' indicates that there are no operations currently running on the cluster. 'Destroy' indicates that the cluster is currently being destroyed. 'Upgrade' indicates that the cluster is currently being upgraded. 'Clean' indicates that the cluster is being cleaned. 'NodeRemoval' indicates that a node is being removed from the cluster. 'DiskRemoval' indicates that a disk is being removed from the cluster. 'DiskAddition' indicates that a disk is being added tos the cluster. 'UploadPackageByUrl' indicates that a package is being uploaded using a URL. 'UploadPackageAndUpgrade' indicates package upload by URL and upgrade operation. 'BaseOSUpgrade' indicates that the BaseOSUpgrade operation on the cluster is set. 'ServiceRestart' indicates that the services on the Cluster are currently being restarted. 'SystemServiceRestart' indicates that system services on the Cluster are currently being restarted. - Operations []string `json:"operations,omitempty"` - - // Specifies the details of each system app state on the cluster. - SystemApps []*SystemAppStatusParams `json:"systemApps,omitempty"` -} - -// Validate validates this cluster state params -func (m *ClusterStateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemApps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterStateParamsOperationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Destroy","Upgrade","Clean","NodeRemoval","DiskRemoval","DiskAddition","NodeAddition","UploadPackageByUrl","UploadPackageAndUpgrade","BaseOSUpgrade","ServiceRestart","SystemServiceRestart"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterStateParamsOperationsItemsEnum = append(clusterStateParamsOperationsItemsEnum, v) - } -} - -func (m *ClusterStateParams) validateOperationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterStateParamsOperationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterStateParams) validateOperations(formats strfmt.Registry) error { - if swag.IsZero(m.Operations) { // not required - return nil - } - - for i := 0; i < len(m.Operations); i++ { - - // value enum - if err := m.validateOperationsItemsEnum("operations"+"."+strconv.Itoa(i), "body", m.Operations[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ClusterStateParams) validateSystemApps(formats strfmt.Registry) error { - if swag.IsZero(m.SystemApps) { // not required - return nil - } - - for i := 0; i < len(m.SystemApps); i++ { - if swag.IsZero(m.SystemApps[i]) { // not required - continue - } - - if m.SystemApps[i] != nil { - if err := m.SystemApps[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemApps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemApps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster state params based on the context it is used -func (m *ClusterStateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSystemApps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStateParams) contextValidateSystemApps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SystemApps); i++ { - - if m.SystemApps[i] != nil { - - if swag.IsZero(m.SystemApps[i]) { // not required - return nil - } - - if err := m.SystemApps[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemApps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemApps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStateParams) UnmarshalBinary(b []byte) error { - var res ClusterStateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_storage_stats.go b/v2/models/cluster_storage_stats.go deleted file mode 100644 index b1b02e3a..00000000 --- a/v2/models/cluster_storage_stats.go +++ /dev/null @@ -1,68 +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" -) - -// ClusterStorageStats Specifies the Cluster storage stats. -// -// swagger:model ClusterStorageStats -type ClusterStorageStats struct { - - // Specifies the logical size of protected objects in bytes. - DataProtectionLogicalUsageBytes *int64 `json:"dataProtectionLogicalUsageBytes,omitempty"` - - // Specifies the physical size of protected objects in bytes. - DataProtectionPhysicalUsageBytes *int64 `json:"dataProtectionPhysicalUsageBytes,omitempty"` - - // Specifies the logical size consumed by file services in bytes. - FileServicesLogicalUsageBytes *int64 `json:"fileServicesLogicalUsageBytes,omitempty"` - - // Specifies the physical size consumed by file services in bytes. - FileServicesPhysicalUsageBytes *int64 `json:"fileServicesPhysicalUsageBytes,omitempty"` - - // Specifies the local storage currently in use on the cluster in bytes. - LocalUsageBytes *int64 `json:"localUsageBytes,omitempty"` - - // Specifies the local storage currently available on the cluster in bytes. - LocalAvailableBytes *int64 `json:"localAvailableBytes,omitempty"` - - // Specifies the total capacity of the cluster in bytes. - TotalCapacityBytes *int64 `json:"totalCapacityBytes,omitempty"` -} - -// Validate validates this cluster storage stats -func (m *ClusterStorageStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster storage stats based on context it is used -func (m *ClusterStorageStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStorageStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStorageStats) UnmarshalBinary(b []byte) error { - var res ClusterStorageStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_type.go b/v2/models/cluster_type.go deleted file mode 100644 index 056a22b8..00000000 --- a/v2/models/cluster_type.go +++ /dev/null @@ -1,119 +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" -) - -// ClusterType Cluster Type -// -// # Cluster Type -// -// swagger:model ClusterType -type ClusterType struct { - - // Specifies the cluster types. - // Enum: ["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"] - ClusterType string `json:"clusterType,omitempty"` -} - -// Validate validates this cluster type -func (m *ClusterType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterTypeTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterTypeTypeClusterTypePropEnum = append(clusterTypeTypeClusterTypePropEnum, v) - } -} - -const ( - - // ClusterTypeClusterTypePhysical captures enum value "Physical" - ClusterTypeClusterTypePhysical string = "Physical" - - // ClusterTypeClusterTypeVirtual captures enum value "Virtual" - ClusterTypeClusterTypeVirtual string = "Virtual" - - // ClusterTypeClusterTypeCloud captures enum value "Cloud" - ClusterTypeClusterTypeCloud string = "Cloud" - - // ClusterTypeClusterTypeRigel captures enum value "Rigel" - ClusterTypeClusterTypeRigel string = "Rigel" - - // ClusterTypeClusterTypeUnknown captures enum value "Unknown" - ClusterTypeClusterTypeUnknown string = "Unknown" - - // ClusterTypeClusterTypeHeliosOnPremVM captures enum value "HeliosOnPremVM" - ClusterTypeClusterTypeHeliosOnPremVM string = "HeliosOnPremVM" -) - -// prop value enum -func (m *ClusterType) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterTypeTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterType) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterType) { // not required - return nil - } - - // value enum - if err := m.validateClusterTypeEnum("clusterType", "body", m.ClusterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster type based on context it is used -func (m *ClusterType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterType) UnmarshalBinary(b []byte) error { - var res ClusterType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_ui_config.go b/v2/models/cluster_ui_config.go deleted file mode 100644 index 702468af..00000000 --- a/v2/models/cluster_ui_config.go +++ /dev/null @@ -1,71 +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" -) - -// ClusterUIConfig Specifies the params to update UI config. -// -// swagger:model ClusterUiConfig -type ClusterUIConfig struct { - - // Specifies the customized UI config. - // Required: true - UIConfig *string `json:"uiConfig"` -} - -// Validate validates this cluster Ui config -func (m *ClusterUIConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUIConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterUIConfig) validateUIConfig(formats strfmt.Registry) error { - - if err := validate.Required("uiConfig", "body", m.UIConfig); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster Ui config based on context it is used -func (m *ClusterUIConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterUIConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterUIConfig) UnmarshalBinary(b []byte) error { - var res ClusterUIConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_uprade_params.go b/v2/models/cluster_uprade_params.go deleted file mode 100644 index 29fd83ca..00000000 --- a/v2/models/cluster_uprade_params.go +++ /dev/null @@ -1,116 +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" -) - -// ClusterUpradeParams Specifies the parameters to upgrade the software on the cluster. -// -// swagger:model ClusterUpradeParams -type ClusterUpradeParams struct { - - // The operation type. 'Upgrade' indicates to upgrade the software on the cluster. 'UploadPackageAndUpgrade' indicates to first upload the package using the url where package is hosted and then upgrade the cluster. - // Required: true - // Enum: ["Upgrade","UploadPackageAndUpgrade"] - Type *string `json:"type"` - - // Version name of the package. Example: 6.3.1h_release-20210714_0fad884e. This is required when the operation type is 'Upgrade' - VersionName string `json:"versionName,omitempty"` - - // The URL where the package is hosted. This is required when the operation type is 'UploadPackageAndUpgrade' - URL string `json:"url,omitempty"` - - // Specifies if pre upgrade healthchecks failure will cause upgrade to be aborted. By default we abort upgrade if there are healthchecks failures .Cluster will stop the upgrade.and present the failures which need to be resolved before proceeding with upgrade. If set to false upgrade will not be aborted on healthchecks failure. - AbortUpgradeOnChecksFailure *bool `json:"abortUpgradeOnChecksFailure,omitempty"` -} - -// Validate validates this cluster uprade params -func (m *ClusterUpradeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var clusterUpradeParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Upgrade","UploadPackageAndUpgrade"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterUpradeParamsTypeTypePropEnum = append(clusterUpradeParamsTypeTypePropEnum, v) - } -} - -const ( - - // ClusterUpradeParamsTypeUpgrade captures enum value "Upgrade" - ClusterUpradeParamsTypeUpgrade string = "Upgrade" - - // ClusterUpradeParamsTypeUploadPackageAndUpgrade captures enum value "UploadPackageAndUpgrade" - ClusterUpradeParamsTypeUploadPackageAndUpgrade string = "UploadPackageAndUpgrade" -) - -// prop value enum -func (m *ClusterUpradeParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterUpradeParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterUpradeParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cluster uprade params based on context it is used -func (m *ClusterUpradeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterUpradeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterUpradeParams) UnmarshalBinary(b []byte) error { - var res ClusterUpradeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_vlan_params.go b/v2/models/cluster_vlan_params.go deleted file mode 100644 index d9dcc9f1..00000000 --- a/v2/models/cluster_vlan_params.go +++ /dev/null @@ -1,117 +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" -) - -// ClusterVlanParams Cluster vlan parameters. -// -// swagger:model ClusterVlanParams -type ClusterVlanParams struct { - CreateClusterVlanParams - - // Set to true when vlan app IP addresses are being used by apps. When this is set to true, the vlan interface can't be deleted. - AppIpsInUse *bool `json:"appIpsInUse,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterVlanParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateClusterVlanParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateClusterVlanParams = aO0 - - // AO1 - var dataAO1 struct { - AppIpsInUse *bool `json:"appIpsInUse,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AppIpsInUse = dataAO1.AppIpsInUse - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterVlanParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateClusterVlanParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AppIpsInUse *bool `json:"appIpsInUse,omitempty"` - } - - dataAO1.AppIpsInUse = m.AppIpsInUse - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster vlan params -func (m *ClusterVlanParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateClusterVlanParams - if err := m.CreateClusterVlanParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster vlan params based on the context it is used -func (m *ClusterVlanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateClusterVlanParams - if err := m.CreateClusterVlanParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterVlanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterVlanParams) UnmarshalBinary(b []byte) error { - var res ClusterVlanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cluster_vlans.go b/v2/models/cluster_vlans.go deleted file mode 100644 index 503b49c9..00000000 --- a/v2/models/cluster_vlans.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterVlans Cluster vlans. -// -// swagger:model ClusterVlans -type ClusterVlans struct { - - // List of vlans. - Vlans []*ClusterVlanParams `json:"vlans"` -} - -// Validate validates this cluster vlans -func (m *ClusterVlans) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlans(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterVlans) validateVlans(formats strfmt.Registry) error { - if swag.IsZero(m.Vlans) { // not required - return nil - } - - for i := 0; i < len(m.Vlans); i++ { - if swag.IsZero(m.Vlans[i]) { // not required - continue - } - - if m.Vlans[i] != nil { - if err := m.Vlans[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster vlans based on the context it is used -func (m *ClusterVlans) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlans(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterVlans) contextValidateVlans(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Vlans); i++ { - - if m.Vlans[i] != nil { - - if swag.IsZero(m.Vlans[i]) { // not required - return nil - } - - if err := m.Vlans[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterVlans) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterVlans) UnmarshalBinary(b []byte) error { - var res ClusterVlans - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cohesity_ca_key_info.go b/v2/models/cohesity_ca_key_info.go deleted file mode 100644 index 506d13b3..00000000 --- a/v2/models/cohesity_ca_key_info.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" -) - -// CohesityCaKeyInfo Specifies the response to the cohesity ca keys request -// -// swagger:model CohesityCaKeyInfo -type CohesityCaKeyInfo struct { - - // Private key of the Cohesity CA. - PrivateKey *string `json:"privateKey,omitempty"` - - // Certificate chain in pem format - CaChain []string `json:"caChain,omitempty"` -} - -// Validate validates this cohesity ca key info -func (m *CohesityCaKeyInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cohesity ca key info based on context it is used -func (m *CohesityCaKeyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CohesityCaKeyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CohesityCaKeyInfo) UnmarshalBinary(b []byte) error { - var res CohesityCaKeyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/cohesity_ca_status_response.go b/v2/models/cohesity_ca_status_response.go deleted file mode 100644 index b0c1f6d0..00000000 --- a/v2/models/cohesity_ca_status_response.go +++ /dev/null @@ -1,108 +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" -) - -// CohesityCaStatusResponse Specifies the status of cohesity ca bootstrapping request -// -// swagger:model CohesityCaStatusResponse -type CohesityCaStatusResponse struct { - - // Specfies the status of cohesity ca bootstrapping - // Enum: ["Pending","Complete"] - BootstrapStatus *string `json:"bootstrapStatus,omitempty"` - - // Specifies ca cert in pem format - CaCertChain []string `json:"caCertChain,omitempty"` -} - -// Validate validates this cohesity ca status response -func (m *CohesityCaStatusResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBootstrapStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var cohesityCaStatusResponseTypeBootstrapStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pending","Complete"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cohesityCaStatusResponseTypeBootstrapStatusPropEnum = append(cohesityCaStatusResponseTypeBootstrapStatusPropEnum, v) - } -} - -const ( - - // CohesityCaStatusResponseBootstrapStatusPending captures enum value "Pending" - CohesityCaStatusResponseBootstrapStatusPending string = "Pending" - - // CohesityCaStatusResponseBootstrapStatusComplete captures enum value "Complete" - CohesityCaStatusResponseBootstrapStatusComplete string = "Complete" -) - -// prop value enum -func (m *CohesityCaStatusResponse) validateBootstrapStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, cohesityCaStatusResponseTypeBootstrapStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CohesityCaStatusResponse) validateBootstrapStatus(formats strfmt.Registry) error { - if swag.IsZero(m.BootstrapStatus) { // not required - return nil - } - - // value enum - if err := m.validateBootstrapStatusEnum("bootstrapStatus", "body", *m.BootstrapStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this cohesity ca status response based on context it is used -func (m *CohesityCaStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CohesityCaStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CohesityCaStatusResponse) UnmarshalBinary(b []byte) error { - var res CohesityCaStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_a_w_s_category_params.go b/v2/models/common_a_w_s_category_params.go deleted file mode 100644 index 9ab0f600..00000000 --- a/v2/models/common_a_w_s_category_params.go +++ /dev/null @@ -1,112 +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" -) - -// CommonAWSCategoryParams AWS External Target Request Cloud Category Params. -// -// Specifies the cloud category parameter which are specific to AWS related External Targets. -// -// swagger:model CommonAWSCategoryParams -type CommonAWSCategoryParams struct { - - // Specifies the AWS External Target type. - // Required: true - // Enum: ["AmazonStandard","AmazonGov","AmazonC2S"] - CloudType *string `json:"cloudType"` -} - -// Validate validates this common a w s category params -func (m *CommonAWSCategoryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonAWSCategoryParamsTypeCloudTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonStandard","AmazonGov","AmazonC2S"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonAWSCategoryParamsTypeCloudTypePropEnum = append(commonAWSCategoryParamsTypeCloudTypePropEnum, v) - } -} - -const ( - - // CommonAWSCategoryParamsCloudTypeAmazonStandard captures enum value "AmazonStandard" - CommonAWSCategoryParamsCloudTypeAmazonStandard string = "AmazonStandard" - - // CommonAWSCategoryParamsCloudTypeAmazonGov captures enum value "AmazonGov" - CommonAWSCategoryParamsCloudTypeAmazonGov string = "AmazonGov" - - // CommonAWSCategoryParamsCloudTypeAmazonC2S captures enum value "AmazonC2S" - CommonAWSCategoryParamsCloudTypeAmazonC2S string = "AmazonC2S" -) - -// prop value enum -func (m *CommonAWSCategoryParams) validateCloudTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonAWSCategoryParamsTypeCloudTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonAWSCategoryParams) validateCloudType(formats strfmt.Registry) error { - - if err := validate.Required("cloudType", "body", m.CloudType); err != nil { - return err - } - - // value enum - if err := m.validateCloudTypeEnum("cloudType", "body", *m.CloudType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common a w s category params based on context it is used -func (m *CommonAWSCategoryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonAWSCategoryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonAWSCategoryParams) UnmarshalBinary(b []byte) error { - var res CommonAWSCategoryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_active_directory_params.go b/v2/models/common_active_directory_params.go deleted file mode 100644 index c027c79f..00000000 --- a/v2/models/common_active_directory_params.go +++ /dev/null @@ -1,284 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonActiveDirectoryParams Specifies the params of Active Directory which are used across creating and updating. -// -// swagger:model CommonActiveDirectoryParams -type CommonActiveDirectoryParams struct { - - // Specifies a list of computer names used to identify the Cohesity Cluster on the Active Directory domain. The first machine account is used as primary machine account and it can not be modified. - // Required: true - // Min Items: 1 - // Unique: true - MachineAccounts []*MachineAccount `json:"machineAccounts"` - - // Specifies the id of the Active Directory. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies an optional organizational unit name. - OrganizationalUnitName *string `json:"organizationalUnitName,omitempty"` - - // Specifies a work group name. - WorkGroupName *string `json:"workGroupName,omitempty"` - - // Specifies a list of preferred domain controllers of this Active Directory. - PreferredDomainControllers []*DomainController `json:"preferredDomainControllers"` - - // Specifies a list of denied domain controllers of this Active Directory Domain. - DomainControllersDenyList []*string `json:"domainControllersDenyList"` - - // Specifies the LDAP provider id which is mapped to this Active Directory - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Specifies the name of the NIS Provider which is mapped to this Active Directory. - NisProviderDomainName *string `json:"nisProviderDomainName,omitempty"` - - // Specifies the id of the connection. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the params of trusted domain info of an Active Directory. - TrustedDomainParams *TrustedDomainParams `json:"trustedDomainParams,omitempty"` -} - -// Validate validates this common active directory params -func (m *CommonActiveDirectoryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMachineAccounts(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreferredDomainControllers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTrustedDomainParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonActiveDirectoryParams) validateMachineAccounts(formats strfmt.Registry) error { - - if err := validate.Required("machineAccounts", "body", m.MachineAccounts); err != nil { - return err - } - - iMachineAccountsSize := int64(len(m.MachineAccounts)) - - if err := validate.MinItems("machineAccounts", "body", iMachineAccountsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("machineAccounts", "body", m.MachineAccounts); err != nil { - return err - } - - for i := 0; i < len(m.MachineAccounts); i++ { - if swag.IsZero(m.MachineAccounts[i]) { // not required - continue - } - - if m.MachineAccounts[i] != nil { - if err := m.MachineAccounts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("machineAccounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("machineAccounts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonActiveDirectoryParams) validatePreferredDomainControllers(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredDomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - continue - } - - if m.PreferredDomainControllers[i] != nil { - if err := m.PreferredDomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonActiveDirectoryParams) validateTrustedDomainParams(formats strfmt.Registry) error { - if swag.IsZero(m.TrustedDomainParams) { // not required - return nil - } - - if m.TrustedDomainParams != nil { - if err := m.TrustedDomainParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trustedDomainParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trustedDomainParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common active directory params based on the context it is used -func (m *CommonActiveDirectoryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMachineAccounts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreferredDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTrustedDomainParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonActiveDirectoryParams) contextValidateMachineAccounts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MachineAccounts); i++ { - - if m.MachineAccounts[i] != nil { - - if swag.IsZero(m.MachineAccounts[i]) { // not required - return nil - } - - if err := m.MachineAccounts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("machineAccounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("machineAccounts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonActiveDirectoryParams) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *CommonActiveDirectoryParams) contextValidatePreferredDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - - if m.PreferredDomainControllers[i] != nil { - - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - return nil - } - - if err := m.PreferredDomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonActiveDirectoryParams) contextValidateTrustedDomainParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TrustedDomainParams != nil { - - if swag.IsZero(m.TrustedDomainParams) { // not required - return nil - } - - if err := m.TrustedDomainParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trustedDomainParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trustedDomainParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonActiveDirectoryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonActiveDirectoryParams) UnmarshalBinary(b []byte) error { - var res CommonActiveDirectoryParams - 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 deleted file mode 100644 index 3430c17f..00000000 --- a/v2/models/common_archival_aws_external_target_params.go +++ /dev/null @@ -1,194 +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" -) - -// CommonArchivalAwsExternalTargetParams AWS External Target Request Common Params for archival purpose type. -// -// Specifies the common parameters which are specific to AWS related External Targets of archival purpose type. -// -// swagger:model CommonArchivalAwsExternalTargetParams -type CommonArchivalAwsExternalTargetParams struct { - CommonAwsExternalTargetParams - - // Specifies the AWS External Target storage class. - // Required: true - // Enum: ["AmazonS3Standard","AmazonS3StandardIA","AmazonS3OneZoneIA","AmazonS3IntelligentTiering","AmazonS3Glacier","AmazonS3GlacierDeepArchive","AmazonGlacier","AmazonS3GlacierIR"] - StorageClass *string `json:"storageClass"` - - // Specifies the Source Side Deduplication setting for the AWS external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonArchivalAwsExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAwsExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAwsExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - m.SourceSideDeduplication = dataAO1.SourceSideDeduplication - - m.IsIncrementalArchivalEnabled = dataAO1.IsIncrementalArchivalEnabled - - m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonArchivalAwsExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAwsExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - } - - dataAO1.StorageClass = m.StorageClass - - dataAO1.SourceSideDeduplication = m.SourceSideDeduplication - - dataAO1.IsIncrementalArchivalEnabled = m.IsIncrementalArchivalEnabled - - dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common archival aws external target params -func (m *CommonArchivalAwsExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAwsExternalTargetParams - if err := m.CommonAwsExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonArchivalAwsExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3StandardIA","AmazonS3OneZoneIA","AmazonS3IntelligentTiering","AmazonS3Glacier","AmazonS3GlacierDeepArchive","AmazonGlacier","AmazonS3GlacierIR"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonArchivalAwsExternalTargetParamsTypeStorageClassPropEnum = append(commonArchivalAwsExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *CommonArchivalAwsExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonArchivalAwsExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonArchivalAwsExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common archival aws external target params based on the context it is used -func (m *CommonArchivalAwsExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAwsExternalTargetParams - if err := m.CommonAwsExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonArchivalAwsExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonArchivalAwsExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonArchivalAwsExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_archival_azure_external_target_params.go b/v2/models/common_archival_azure_external_target_params.go deleted file mode 100644 index e49a1e34..00000000 --- a/v2/models/common_archival_azure_external_target_params.go +++ /dev/null @@ -1,265 +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" -) - -// CommonArchivalAzureExternalTargetParams Azure External Target Request Common Params for archival purpose type. -// -// Specifies the common parameters which are specific to Azure related External Targets of archival purpose type. -// -// swagger:model CommonArchivalAzureExternalTargetParams -type CommonArchivalAzureExternalTargetParams struct { - CommonAzureExternalTargetParams - - // Specifies the Azure External Target storage class. - // Required: true - // Enum: ["AzureArchiveBlob","AzureCoolBlob","AzureHotBlob"] - StorageClass *string `json:"storageClass"` - - // Specifies the Source Side Deduplication setting for the Azure external target - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - // Specifies if Incremental Archival setting is enabled or not. - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - // Specifies if Forever Incremental Archival setting is enabled or not. - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - - // Specifies whether write once read many (WORM) protection is enabled for the Azure container or not. - IsWormEnabled *bool `json:"isWormEnabled,omitempty"` - - // worm specific target params - WormSpecificTargetParams *WormSpecificTargetParams `json:"wormSpecificTargetParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonArchivalAzureExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAzureExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAzureExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - - IsWormEnabled *bool `json:"isWormEnabled,omitempty"` - - WormSpecificTargetParams *WormSpecificTargetParams `json:"wormSpecificTargetParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - m.SourceSideDeduplication = dataAO1.SourceSideDeduplication - - m.IsIncrementalArchivalEnabled = dataAO1.IsIncrementalArchivalEnabled - - m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled - - m.IsWormEnabled = dataAO1.IsWormEnabled - - m.WormSpecificTargetParams = dataAO1.WormSpecificTargetParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonArchivalAzureExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAzureExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - - SourceSideDeduplication *bool `json:"sourceSideDeduplication,omitempty"` - - IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` - - IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` - - IsWormEnabled *bool `json:"isWormEnabled,omitempty"` - - WormSpecificTargetParams *WormSpecificTargetParams `json:"wormSpecificTargetParams,omitempty"` - } - - dataAO1.StorageClass = m.StorageClass - - dataAO1.SourceSideDeduplication = m.SourceSideDeduplication - - dataAO1.IsIncrementalArchivalEnabled = m.IsIncrementalArchivalEnabled - - dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled - - dataAO1.IsWormEnabled = m.IsWormEnabled - - dataAO1.WormSpecificTargetParams = m.WormSpecificTargetParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common archival azure external target params -func (m *CommonArchivalAzureExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAzureExternalTargetParams - if err := m.CommonAzureExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWormSpecificTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonArchivalAzureExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AzureArchiveBlob","AzureCoolBlob","AzureHotBlob"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonArchivalAzureExternalTargetParamsTypeStorageClassPropEnum = append(commonArchivalAzureExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *CommonArchivalAzureExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonArchivalAzureExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonArchivalAzureExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -func (m *CommonArchivalAzureExternalTargetParams) validateWormSpecificTargetParams(formats strfmt.Registry) error { - - if swag.IsZero(m.WormSpecificTargetParams) { // not required - return nil - } - - if m.WormSpecificTargetParams != nil { - if err := m.WormSpecificTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormSpecificTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormSpecificTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common archival azure external target params based on the context it is used -func (m *CommonArchivalAzureExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAzureExternalTargetParams - if err := m.CommonAzureExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWormSpecificTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonArchivalAzureExternalTargetParams) contextValidateWormSpecificTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.WormSpecificTargetParams != nil { - - if swag.IsZero(m.WormSpecificTargetParams) { // not required - return nil - } - - if err := m.WormSpecificTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("wormSpecificTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("wormSpecificTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonArchivalAzureExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonArchivalAzureExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonArchivalAzureExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_archival_external_target_params.go b/v2/models/common_archival_external_target_params.go deleted file mode 100644 index 39a56525..00000000 --- a/v2/models/common_archival_external_target_params.go +++ /dev/null @@ -1,230 +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" -) - -// CommonArchivalExternalTargetParams Specifies the common parameters which are specific to Archival purpose type External Targets. -// -// swagger:model CommonArchivalExternalTargetParams -type CommonArchivalExternalTargetParams struct { - - // Specifies the Storage type of the External Target. Nas option in archival_target_storage_type will soon be deprecated. Please use NAS instead. - // Required: true - // Enum: ["Azure","Google","AWS","Oracle","Nas","NAS","QStarTape","S3Compatible"] - StorageType *string `json:"storageType"` - - // encryption - // Required: true - Encryption *EncryptionSettings `json:"encryption"` - - // target bandwidth throttlings - TargetBandwidthThrottlings *TargetBandwidthThrottlings `json:"targetBandwidthThrottlings,omitempty"` -} - -// Validate validates this common archival external target params -func (m *CommonArchivalExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryption(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetBandwidthThrottlings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonArchivalExternalTargetParamsTypeStorageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","Google","AWS","Oracle","Nas","NAS","QStarTape","S3Compatible"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonArchivalExternalTargetParamsTypeStorageTypePropEnum = append(commonArchivalExternalTargetParamsTypeStorageTypePropEnum, v) - } -} - -const ( - - // CommonArchivalExternalTargetParamsStorageTypeAzure captures enum value "Azure" - CommonArchivalExternalTargetParamsStorageTypeAzure string = "Azure" - - // CommonArchivalExternalTargetParamsStorageTypeGoogle captures enum value "Google" - CommonArchivalExternalTargetParamsStorageTypeGoogle string = "Google" - - // CommonArchivalExternalTargetParamsStorageTypeAWS captures enum value "AWS" - CommonArchivalExternalTargetParamsStorageTypeAWS string = "AWS" - - // CommonArchivalExternalTargetParamsStorageTypeOracle captures enum value "Oracle" - CommonArchivalExternalTargetParamsStorageTypeOracle string = "Oracle" - - // CommonArchivalExternalTargetParamsStorageTypeNas captures enum value "Nas" - CommonArchivalExternalTargetParamsStorageTypeNas string = "Nas" - - // CommonArchivalExternalTargetParamsStorageTypeNAS captures enum value "NAS" - CommonArchivalExternalTargetParamsStorageTypeNAS string = "NAS" - - // CommonArchivalExternalTargetParamsStorageTypeQStarTape captures enum value "QStarTape" - CommonArchivalExternalTargetParamsStorageTypeQStarTape string = "QStarTape" - - // CommonArchivalExternalTargetParamsStorageTypeS3Compatible captures enum value "S3Compatible" - CommonArchivalExternalTargetParamsStorageTypeS3Compatible string = "S3Compatible" -) - -// prop value enum -func (m *CommonArchivalExternalTargetParams) validateStorageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonArchivalExternalTargetParamsTypeStorageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonArchivalExternalTargetParams) validateStorageType(formats strfmt.Registry) error { - - if err := validate.Required("storageType", "body", m.StorageType); err != nil { - return err - } - - // value enum - if err := m.validateStorageTypeEnum("storageType", "body", *m.StorageType); err != nil { - return err - } - - return nil -} - -func (m *CommonArchivalExternalTargetParams) validateEncryption(formats strfmt.Registry) error { - - if err := validate.Required("encryption", "body", m.Encryption); err != nil { - return err - } - - if m.Encryption != nil { - if err := m.Encryption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryption") - } - return err - } - } - - return nil -} - -func (m *CommonArchivalExternalTargetParams) validateTargetBandwidthThrottlings(formats strfmt.Registry) error { - if swag.IsZero(m.TargetBandwidthThrottlings) { // not required - return nil - } - - if m.TargetBandwidthThrottlings != nil { - if err := m.TargetBandwidthThrottlings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetBandwidthThrottlings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetBandwidthThrottlings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common archival external target params based on the context it is used -func (m *CommonArchivalExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryption(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetBandwidthThrottlings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonArchivalExternalTargetParams) contextValidateEncryption(ctx context.Context, formats strfmt.Registry) error { - - if m.Encryption != nil { - - if err := m.Encryption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryption") - } - return err - } - } - - return nil -} - -func (m *CommonArchivalExternalTargetParams) contextValidateTargetBandwidthThrottlings(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetBandwidthThrottlings != nil { - - if swag.IsZero(m.TargetBandwidthThrottlings) { // not required - return nil - } - - if err := m.TargetBandwidthThrottlings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetBandwidthThrottlings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetBandwidthThrottlings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonArchivalExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonArchivalExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonArchivalExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_authentication_method_params.go b/v2/models/common_authentication_method_params.go deleted file mode 100644 index 423b5312..00000000 --- a/v2/models/common_authentication_method_params.go +++ /dev/null @@ -1,115 +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" -) - -// CommonAuthenticationMethodParams AWS External Target Request Cloud Category Params. -// -// Specifies the cloud category parameter which are specific to AWS related External Targets. -// -// swagger:model CommonAuthenticationMethodParams -type CommonAuthenticationMethodParams struct { - - // Specifies the AWS External Target Authentication type. - // Required: true - // Enum: ["kUseIAMUser","kUseIAMRole","kUseSTS","kUseHelios"] - AuthenticationType *string `json:"authenticationType"` -} - -// Validate validates this common authentication method params -func (m *CommonAuthenticationMethodParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonAuthenticationMethodParamsTypeAuthenticationTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole","kUseSTS","kUseHelios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonAuthenticationMethodParamsTypeAuthenticationTypePropEnum = append(commonAuthenticationMethodParamsTypeAuthenticationTypePropEnum, v) - } -} - -const ( - - // CommonAuthenticationMethodParamsAuthenticationTypeKUseIAMUser captures enum value "kUseIAMUser" - CommonAuthenticationMethodParamsAuthenticationTypeKUseIAMUser string = "kUseIAMUser" - - // CommonAuthenticationMethodParamsAuthenticationTypeKUseIAMRole captures enum value "kUseIAMRole" - CommonAuthenticationMethodParamsAuthenticationTypeKUseIAMRole string = "kUseIAMRole" - - // CommonAuthenticationMethodParamsAuthenticationTypeKUseSTS captures enum value "kUseSTS" - CommonAuthenticationMethodParamsAuthenticationTypeKUseSTS string = "kUseSTS" - - // CommonAuthenticationMethodParamsAuthenticationTypeKUseHelios captures enum value "kUseHelios" - CommonAuthenticationMethodParamsAuthenticationTypeKUseHelios string = "kUseHelios" -) - -// prop value enum -func (m *CommonAuthenticationMethodParams) validateAuthenticationTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonAuthenticationMethodParamsTypeAuthenticationTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonAuthenticationMethodParams) validateAuthenticationType(formats strfmt.Registry) error { - - if err := validate.Required("authenticationType", "body", m.AuthenticationType); err != nil { - return err - } - - // value enum - if err := m.validateAuthenticationTypeEnum("authenticationType", "body", *m.AuthenticationType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common authentication method params based on context it is used -func (m *CommonAuthenticationMethodParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonAuthenticationMethodParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonAuthenticationMethodParams) UnmarshalBinary(b []byte) error { - var res CommonAuthenticationMethodParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_aws_external_target_params.go b/v2/models/common_aws_external_target_params.go deleted file mode 100644 index fdf4f85b..00000000 --- a/v2/models/common_aws_external_target_params.go +++ /dev/null @@ -1,90 +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" -) - -// CommonAwsExternalTargetParams AWS External Target Request Common Params. -// -// Specifies the common parameters which are specific to AWS related External Targets. -// -// swagger:model CommonAwsExternalTargetParams -type CommonAwsExternalTargetParams struct { - - // Specifies bucket name of the External Target. - // Required: true - BucketName *string `json:"bucketName"` - - // Specifies region of the External Target. - // Required: true - Region *string `json:"region"` -} - -// Validate validates this common aws external target params -func (m *CommonAwsExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonAwsExternalTargetParams) validateBucketName(formats strfmt.Registry) error { - - if err := validate.Required("bucketName", "body", m.BucketName); err != nil { - return err - } - - return nil -} - -func (m *CommonAwsExternalTargetParams) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common aws external target params based on context it is used -func (m *CommonAwsExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonAwsExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonAwsExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonAwsExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_azure_external_target_params.go b/v2/models/common_azure_external_target_params.go deleted file mode 100644 index b63a9ce3..00000000 --- a/v2/models/common_azure_external_target_params.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" - "github.com/go-openapi/validate" -) - -// CommonAzureExternalTargetParams Azure External Target Request Common Params for archival purpose type. -// -// Specifies the common parameters which are specific to Azure related External Targets. -// -// swagger:model CommonAzureExternalTargetParams -type CommonAzureExternalTargetParams struct { - - // Specifies the container name of the external target. - // Required: true - ContainerName *string `json:"containerName"` - - // Specifies the storage account name of the external target. - // Required: true - StorageAccountName *string `json:"storageAccountName"` - - // Specifies the storage access key of the external target. - StorageAccessKey *string `json:"storageAccessKey,omitempty"` - - // Specifies the client id of the managed identity assigned to the cluster This is used only for clusters running as Azure VMs where authentication is done using AD. - ClientID *string `json:"clientId,omitempty"` - - // Specifies region of the External Target. This is only populated for FortKnox vaults. - Region *string `json:"region,omitempty"` -} - -// Validate validates this common azure external target params -func (m *CommonAzureExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContainerName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageAccountName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonAzureExternalTargetParams) validateContainerName(formats strfmt.Registry) error { - - if err := validate.Required("containerName", "body", m.ContainerName); err != nil { - return err - } - - return nil -} - -func (m *CommonAzureExternalTargetParams) validateStorageAccountName(formats strfmt.Registry) error { - - if err := validate.Required("storageAccountName", "body", m.StorageAccountName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common azure external target params based on context it is used -func (m *CommonAzureExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonAzureExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonAzureExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonAzureExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_backup_params.go b/v2/models/common_backup_params.go deleted file mode 100644 index 355ff9c1..00000000 --- a/v2/models/common_backup_params.go +++ /dev/null @@ -1,349 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonBackupParams Specifies the common parameters for backup. These parameters are common across protection group and object protection. -// -// swagger:model CommonBackupParams -type CommonBackupParams struct { - - // Specifies the unique id of the Protection Policy. The Policy settings will be attached with every object and will be used in backup. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the policies for protecting an object with multiple policies. One of policyId and policyConfig is required. - PolicyConfig *PolicyConfig `json:"policyConfig,omitempty"` - - // Specifies the Storage Domain (View Box) ID where the object backup will be taken. This is not required if Cloud archive direct is benig used. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the start time for the backup to trigger. If no start time is specified, the start time will default to 2am. This field is only used if the policy has a daily or monthly schedule. - StartTime *TimeOfDay `json:"startTime,omitempty"` - - // Specifies the priority for the objects backup. - // Enum: ["kLow","kMedium","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies the SLA parameters for list of objects. - SLA []*SLARule `json:"sla"` - - // Specifies whether object backup will be written to HDD or SSD. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosPolicy *string `json:"qosPolicy,omitempty"` - - // Specifies whether currently executing object backup should abort if a blackout period specified by a policy starts. Available only if the selected policy has at least one blackout period. Default value is false. - AbortInBlackouts *bool `json:"abortInBlackouts,omitempty"` - - // Specifies whether to skip Rigel for backup or not. - SkipRigelForBackup *bool `json:"skipRigelForBackup,omitempty"` - - // Specifies the end time in micro seconds for this Protection Group. If this is not specified, the Protection Group won't be ended. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` -} - -// Validate validates this common backup params -func (m *CommonBackupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicyConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSLA(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonBackupParams) validatePolicyConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PolicyConfig) { // not required - return nil - } - - if m.PolicyConfig != nil { - if err := m.PolicyConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policyConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policyConfig") - } - return err - } - } - - return nil -} - -func (m *CommonBackupParams) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -var commonBackupParamsTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonBackupParamsTypePriorityPropEnum = append(commonBackupParamsTypePriorityPropEnum, v) - } -} - -const ( - - // CommonBackupParamsPriorityKLow captures enum value "kLow" - CommonBackupParamsPriorityKLow string = "kLow" - - // CommonBackupParamsPriorityKMedium captures enum value "kMedium" - CommonBackupParamsPriorityKMedium string = "kMedium" - - // CommonBackupParamsPriorityKHigh captures enum value "kHigh" - CommonBackupParamsPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *CommonBackupParams) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonBackupParamsTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonBackupParams) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -func (m *CommonBackupParams) validateSLA(formats strfmt.Registry) error { - if swag.IsZero(m.SLA) { // not required - return nil - } - - for i := 0; i < len(m.SLA); i++ { - if swag.IsZero(m.SLA[i]) { // not required - continue - } - - if m.SLA[i] != nil { - if err := m.SLA[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var commonBackupParamsTypeQosPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonBackupParamsTypeQosPolicyPropEnum = append(commonBackupParamsTypeQosPolicyPropEnum, v) - } -} - -const ( - - // CommonBackupParamsQosPolicyKBackupHDD captures enum value "kBackupHDD" - CommonBackupParamsQosPolicyKBackupHDD string = "kBackupHDD" - - // CommonBackupParamsQosPolicyKBackupSSD captures enum value "kBackupSSD" - CommonBackupParamsQosPolicyKBackupSSD string = "kBackupSSD" - - // CommonBackupParamsQosPolicyKTestAndDevHigh captures enum value "kTestAndDevHigh" - CommonBackupParamsQosPolicyKTestAndDevHigh string = "kTestAndDevHigh" - - // CommonBackupParamsQosPolicyKBackupAll captures enum value "kBackupAll" - CommonBackupParamsQosPolicyKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *CommonBackupParams) validateQosPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonBackupParamsTypeQosPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonBackupParams) validateQosPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - // value enum - if err := m.validateQosPolicyEnum("qosPolicy", "body", *m.QosPolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common backup params based on the context it is used -func (m *CommonBackupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicyConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSLA(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonBackupParams) contextValidatePolicyConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PolicyConfig != nil { - - if swag.IsZero(m.PolicyConfig) { // not required - return nil - } - - if err := m.PolicyConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policyConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policyConfig") - } - return err - } - } - - return nil -} - -func (m *CommonBackupParams) 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 -} - -func (m *CommonBackupParams) contextValidateSLA(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SLA); i++ { - - if m.SLA[i] != nil { - - if swag.IsZero(m.SLA[i]) { // not required - return nil - } - - if err := m.SLA[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonBackupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonBackupParams) UnmarshalBinary(b []byte) error { - var res CommonBackupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_bandwidth_settings.go b/v2/models/common_bandwidth_settings.go deleted file mode 100644 index bfa514ad..00000000 --- a/v2/models/common_bandwidth_settings.go +++ /dev/null @@ -1,162 +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" -) - -// CommonBandwidthSettings Common Bandwidth Settings -// -// # Specifies the common bandwidth setting of the External Target -// -// swagger:model CommonBandwidthSettings -type CommonBandwidthSettings struct { - - // download - Download *BandwidthThrottling `json:"download,omitempty"` - - // upload - Upload *BandwidthThrottling `json:"upload,omitempty"` -} - -// Validate validates this common bandwidth settings -func (m *CommonBandwidthSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDownload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpload(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonBandwidthSettings) validateDownload(formats strfmt.Registry) error { - if swag.IsZero(m.Download) { // not required - return nil - } - - if m.Download != nil { - if err := m.Download.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *CommonBandwidthSettings) validateUpload(formats strfmt.Registry) error { - if swag.IsZero(m.Upload) { // not required - return nil - } - - if m.Upload != nil { - if err := m.Upload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common bandwidth settings based on the context it is used -func (m *CommonBandwidthSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDownload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonBandwidthSettings) contextValidateDownload(ctx context.Context, formats strfmt.Registry) error { - - if m.Download != nil { - - if swag.IsZero(m.Download) { // not required - return nil - } - - if err := m.Download.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *CommonBandwidthSettings) contextValidateUpload(ctx context.Context, formats strfmt.Registry) error { - - if m.Upload != nil { - - if swag.IsZero(m.Upload) { // not required - return nil - } - - if err := m.Upload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonBandwidthSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonBandwidthSettings) UnmarshalBinary(b []byte) error { - var res CommonBandwidthSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_cdp_params.go b/v2/models/common_cdp_params.go deleted file mode 100644 index a2452602..00000000 --- a/v2/models/common_cdp_params.go +++ /dev/null @@ -1,52 +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" -) - -// CommonCdpParams Continuous Data Protection Params. -// -// Specifies the params for Continuous Data Protection. -// -// swagger:model CommonCdpParams -type CommonCdpParams struct { - - // Specifies whether synchronous replication is enabled for CDP Protection Group when replication target is specified in attached policy. - EnableCdpSyncReplication *bool `json:"enableCdpSyncReplication,omitempty"` -} - -// Validate validates this common cdp params -func (m *CommonCdpParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common cdp params based on context it is used -func (m *CommonCdpParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCdpParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCdpParams) UnmarshalBinary(b []byte) error { - var res CommonCdpParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_cloud_tier_settings.go b/v2/models/common_cloud_tier_settings.go deleted file mode 100644 index 02fb0d60..00000000 --- a/v2/models/common_cloud_tier_settings.go +++ /dev/null @@ -1,114 +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" -) - -// CommonCloudTierSettings Specifies the common settings required for configuring cloud tiering. -// -// swagger:model CommonCloudTierSettings -type CommonCloudTierSettings struct { - - // Specifies the unit for moving the data from current tier to next tier. This unit will be a base unit for the 'moveAfter' field specified below. - // Enum: ["Days","Weeks","Months","Years"] - MoveAfterUnit *string `json:"moveAfterUnit,omitempty"` - - // Specifies the time period after which the backup will be moved from current tier to next tier. - MoveAfter *int64 `json:"moveAfter,omitempty"` -} - -// Validate validates this common cloud tier settings -func (m *CommonCloudTierSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMoveAfterUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonCloudTierSettingsTypeMoveAfterUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonCloudTierSettingsTypeMoveAfterUnitPropEnum = append(commonCloudTierSettingsTypeMoveAfterUnitPropEnum, v) - } -} - -const ( - - // CommonCloudTierSettingsMoveAfterUnitDays captures enum value "Days" - CommonCloudTierSettingsMoveAfterUnitDays string = "Days" - - // CommonCloudTierSettingsMoveAfterUnitWeeks captures enum value "Weeks" - CommonCloudTierSettingsMoveAfterUnitWeeks string = "Weeks" - - // CommonCloudTierSettingsMoveAfterUnitMonths captures enum value "Months" - CommonCloudTierSettingsMoveAfterUnitMonths string = "Months" - - // CommonCloudTierSettingsMoveAfterUnitYears captures enum value "Years" - CommonCloudTierSettingsMoveAfterUnitYears string = "Years" -) - -// prop value enum -func (m *CommonCloudTierSettings) validateMoveAfterUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonCloudTierSettingsTypeMoveAfterUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonCloudTierSettings) validateMoveAfterUnit(formats strfmt.Registry) error { - if swag.IsZero(m.MoveAfterUnit) { // not required - return nil - } - - // value enum - if err := m.validateMoveAfterUnitEnum("moveAfterUnit", "body", *m.MoveAfterUnit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common cloud tier settings based on context it is used -func (m *CommonCloudTierSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCloudTierSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCloudTierSettings) UnmarshalBinary(b []byte) error { - var res CommonCloudTierSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_create_or_update_rigel_connection_request.go b/v2/models/common_create_or_update_rigel_connection_request.go deleted file mode 100644 index d0dd2e06..00000000 --- a/v2/models/common_create_or_update_rigel_connection_request.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" - "github.com/go-openapi/validate" -) - -// CommonCreateOrUpdateRigelConnectionRequest Common Create Or Update Rigel Connection Request. -// -// Specify the common params to create or update a connection of Rigel. -// -// swagger:model CommonCreateOrUpdateRigelConnectionRequest -type CommonCreateOrUpdateRigelConnectionRequest struct { - - // Specifies the id of the tenant which the connection belongs to. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the name of the connection. - // Required: true - Name *string `json:"name"` - - // Flag to specify if the connection is scalable. - Scalable *bool `json:"scalable,omitempty"` -} - -// Validate validates this common create or update rigel connection request -func (m *CommonCreateOrUpdateRigelConnectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectionRequest) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectionRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common create or update rigel connection request based on context it is used -func (m *CommonCreateOrUpdateRigelConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCreateOrUpdateRigelConnectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCreateOrUpdateRigelConnectionRequest) UnmarshalBinary(b []byte) error { - var res CommonCreateOrUpdateRigelConnectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_create_or_update_rigel_connector_request.go b/v2/models/common_create_or_update_rigel_connector_request.go deleted file mode 100644 index 61701621..00000000 --- a/v2/models/common_create_or_update_rigel_connector_request.go +++ /dev/null @@ -1,169 +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" -) - -// CommonCreateOrUpdateRigelConnectorRequest Common Create Or Update Rigel connector Request. -// -// Specify the common params to create or update a Rigel connector. -// -// swagger:model CommonCreateOrUpdateRigelConnectorRequest -type CommonCreateOrUpdateRigelConnectorRequest struct { - - // Specifies the Id of the connection which this connector belongs to. - // Required: true - ConnectionID *int64 `json:"connectionId"` - - // Specifies the id of the tenant which the connector belongs to. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the name of the connector. - // Required: true - Name *string `json:"name"` - - // Specifies the version of the connector's certificate. The version is used to revoke/renew connector's certificates. - CertificateVersion *int64 `json:"certificateVersion,omitempty"` - - // Specifies the list of accepted version of the connector's certificate. The version is used to revoke/renew connector's certificates. - CertificateVersionList []int64 `json:"certificateVersionList"` - - // Specifies any cloud specific metadata for the saas connector like EC2 instance_id in case of AWS, or Azure VM name in case of Azure. - ConnectorCloudMetadata *ConnectorCloudMetadata `json:"connectorCloudMetadata,omitempty"` -} - -// Validate validates this common create or update rigel connector request -func (m *CommonCreateOrUpdateRigelConnectorRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorCloudMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectorRequest) validateConnectionID(formats strfmt.Registry) error { - - if err := validate.Required("connectionId", "body", m.ConnectionID); err != nil { - return err - } - - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectorRequest) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectorRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectorRequest) validateConnectorCloudMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorCloudMetadata) { // not required - return nil - } - - if m.ConnectorCloudMetadata != nil { - if err := m.ConnectorCloudMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorCloudMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorCloudMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common create or update rigel connector request based on the context it is used -func (m *CommonCreateOrUpdateRigelConnectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectorCloudMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonCreateOrUpdateRigelConnectorRequest) contextValidateConnectorCloudMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectorCloudMetadata != nil { - - if swag.IsZero(m.ConnectorCloudMetadata) { // not required - return nil - } - - if err := m.ConnectorCloudMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorCloudMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorCloudMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCreateOrUpdateRigelConnectorRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCreateOrUpdateRigelConnectorRequest) UnmarshalBinary(b []byte) error { - var res CommonCreateOrUpdateRigelConnectorRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_csr_request_params.go b/v2/models/common_csr_request_params.go deleted file mode 100644 index f8a7a8c9..00000000 --- a/v2/models/common_csr_request_params.go +++ /dev/null @@ -1,252 +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" -) - -// CommonCsrRequestParams Specifies the parameters of a CSR. -// -// swagger:model CommonCsrRequestParams -type CommonCsrRequestParams struct { - - // Specifies the organization attribute, which is part of the distinguished name definition. It is used to specify the name of the company. - // Required: true - Organization *string `json:"organization"` - - // Specifies the organization unit attribute, which is part of the distinguished name definition. It is used to identify the specific department or business unit in the company that is owning the Cluster. - // Required: true - OrganizationUnit *string `json:"organizationUnit"` - - // Specifies the country attribute, which is part of the distinguished name definition. It is used to identify the country where the state is located. It is specified as two letter code defined by the ISO standard. - // Required: true - CountryCode *string `json:"countryCode"` - - // Specifies the state attribute, which is part of the distinguished name definition. It is used to identify the state where the city is located. - // Required: true - State *string `json:"state"` - - // Specifies the locality attribute, which is part of the distinguished name definition. It is used to identify the city where the company is located or the Cluster is installed. - // Required: true - City *string `json:"city"` - - // Specifies the algorithm to be used to generate the key pair. RSA is the default value. - // Enum: ["rsa","ecdsa"] - KeyType *string `json:"keyType,omitempty"` - - // Specifies the size of the keys in bits. The default is 2048 bits for the RSA keys and 256 bits for ECDSA. - KeySizeBits *int64 `json:"keySizeBits,omitempty"` - - // Specifies the common name attribute, which is part of the distinguished name definition. Common name is used to specify a context for the certificate, for example, the name of the Cluster to which the certificate is to be assigned. Default value is the name of the Cluster. - CommonName *string `json:"commonName,omitempty"` - - // Specifies an alternative subject name component to be included in the certificate. It is used to identify the ways the Cluster will be accessed. It is given as a comma separated list of FQDNs. The default value is the Cluster's VIP hostname. - DNSNames []string `json:"dnsNames"` - - // Specifies an alternative subject name component to be included in the certificate. It is used to identify the ways the Cluster will be accessed. It is given as a comma separated list of IP addresses. The default value is the Cluster's VIP addresses. - HostIps []string `json:"hostIps"` - - // Specifies an alternative subject name component to be included in the certificate. Format is a standard e-mail address, for example joe@company.com. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies the Cohesity service name for which the CSR is generated. Default service name is iris. - // Enum: ["iris"] - ServiceName *string `json:"serviceName,omitempty"` -} - -// Validate validates this common csr request params -func (m *CommonCsrRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOrganization(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrganizationUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCountryCode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCity(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonCsrRequestParams) validateOrganization(formats strfmt.Registry) error { - - if err := validate.Required("organization", "body", m.Organization); err != nil { - return err - } - - return nil -} - -func (m *CommonCsrRequestParams) validateOrganizationUnit(formats strfmt.Registry) error { - - if err := validate.Required("organizationUnit", "body", m.OrganizationUnit); err != nil { - return err - } - - return nil -} - -func (m *CommonCsrRequestParams) validateCountryCode(formats strfmt.Registry) error { - - if err := validate.Required("countryCode", "body", m.CountryCode); err != nil { - return err - } - - return nil -} - -func (m *CommonCsrRequestParams) validateState(formats strfmt.Registry) error { - - if err := validate.Required("state", "body", m.State); err != nil { - return err - } - - return nil -} - -func (m *CommonCsrRequestParams) validateCity(formats strfmt.Registry) error { - - if err := validate.Required("city", "body", m.City); err != nil { - return err - } - - return nil -} - -var commonCsrRequestParamsTypeKeyTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["rsa","ecdsa"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonCsrRequestParamsTypeKeyTypePropEnum = append(commonCsrRequestParamsTypeKeyTypePropEnum, v) - } -} - -const ( - - // CommonCsrRequestParamsKeyTypeRsa captures enum value "rsa" - CommonCsrRequestParamsKeyTypeRsa string = "rsa" - - // CommonCsrRequestParamsKeyTypeEcdsa captures enum value "ecdsa" - CommonCsrRequestParamsKeyTypeEcdsa string = "ecdsa" -) - -// prop value enum -func (m *CommonCsrRequestParams) validateKeyTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonCsrRequestParamsTypeKeyTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonCsrRequestParams) validateKeyType(formats strfmt.Registry) error { - if swag.IsZero(m.KeyType) { // not required - return nil - } - - // value enum - if err := m.validateKeyTypeEnum("keyType", "body", *m.KeyType); err != nil { - return err - } - - return nil -} - -var commonCsrRequestParamsTypeServiceNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["iris"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonCsrRequestParamsTypeServiceNamePropEnum = append(commonCsrRequestParamsTypeServiceNamePropEnum, v) - } -} - -const ( - - // CommonCsrRequestParamsServiceNameIris captures enum value "iris" - CommonCsrRequestParamsServiceNameIris string = "iris" -) - -// prop value enum -func (m *CommonCsrRequestParams) validateServiceNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonCsrRequestParamsTypeServiceNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonCsrRequestParams) validateServiceName(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceName) { // not required - return nil - } - - // value enum - if err := m.validateServiceNameEnum("serviceName", "body", *m.ServiceName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common csr request params based on context it is used -func (m *CommonCsrRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCsrRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCsrRequestParams) UnmarshalBinary(b []byte) error { - var res CommonCsrRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_csr_response_params.go b/v2/models/common_csr_response_params.go deleted file mode 100644 index 8a995adf..00000000 --- a/v2/models/common_csr_response_params.go +++ /dev/null @@ -1,139 +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" -) - -// CommonCsrResponseParams Specifies the common response params for a CSR. -// -// swagger:model CommonCsrResponseParams -type CommonCsrResponseParams struct { - CommonCsrRequestParams - - // Specifies the id of the CSR. - ID *string `json:"id,omitempty"` - - // Specifies the public key generated for this CSR. - PublicKey *string `json:"publicKey,omitempty"` - - // Specifies the CSR generated for the service. - Csr *string `json:"csr,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonCsrResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCsrRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCsrRequestParams = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - PublicKey *string `json:"publicKey,omitempty"` - - Csr *string `json:"csr,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.PublicKey = dataAO1.PublicKey - - m.Csr = dataAO1.Csr - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonCsrResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCsrRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - PublicKey *string `json:"publicKey,omitempty"` - - Csr *string `json:"csr,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.PublicKey = m.PublicKey - - dataAO1.Csr = m.Csr - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common csr response params -func (m *CommonCsrResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrRequestParams - if err := m.CommonCsrRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common csr response params based on the context it is used -func (m *CommonCsrResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrRequestParams - if err := m.CommonCsrRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonCsrResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonCsrResponseParams) UnmarshalBinary(b []byte) error { - var res CommonCsrResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_data_tiering_analysis_group_params.go b/v2/models/common_data_tiering_analysis_group_params.go deleted file mode 100644 index d12b6a31..00000000 --- a/v2/models/common_data_tiering_analysis_group_params.go +++ /dev/null @@ -1,178 +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" -) - -// CommonDataTieringAnalysisGroupParams Specifies the data tiering analysis group. -// -// swagger:model CommonDataTieringAnalysisGroupParams -type CommonDataTieringAnalysisGroupParams struct { - - // Specifies the name of the data tiering analysis group. - // Required: true - Name *string `json:"name"` - - // source - Source *DataTieringSource `json:"source,omitempty"` - - // Specifies schedule for data tiering analysis - Schedule *DataTieringSchedule `json:"schedule,omitempty"` -} - -// Validate validates this common data tiering analysis group params -func (m *CommonDataTieringAnalysisGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringAnalysisGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CommonDataTieringAnalysisGroupParams) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringAnalysisGroupParams) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common data tiering analysis group params based on the context it is used -func (m *CommonDataTieringAnalysisGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringAnalysisGroupParams) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringAnalysisGroupParams) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonDataTieringAnalysisGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonDataTieringAnalysisGroupParams) UnmarshalBinary(b []byte) error { - var res CommonDataTieringAnalysisGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_data_tiering_task_params.go b/v2/models/common_data_tiering_task_params.go deleted file mode 100644 index 1ef68430..00000000 --- a/v2/models/common_data_tiering_task_params.go +++ /dev/null @@ -1,338 +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" -) - -// CommonDataTieringTaskParams Specifies the data tiering task details. -// -// swagger:model CommonDataTieringTaskParams -type CommonDataTieringTaskParams struct { - - // Specifies the name of the data tiering task. - // Required: true - Name *string `json:"name"` - - // Specifies a description of the data tiering task. - Description *string `json:"description,omitempty"` - - // Specifies the alerting policy for the data tiering task. - AlertPolicy *ProtectionGroupAlertingPolicy `json:"alertPolicy,omitempty"` - - // Specifies source for data tiering. - Source *DataTieringSource `json:"source,omitempty"` - - // Specifies target for data tiering. - Target *DataTieringTarget `json:"target,omitempty"` - - // Specifies schedule for data tiering - Schedule *DataTieringSchedule `json:"schedule,omitempty"` - - // Type of data tiering task. - // 'Downtier' indicates downtiering task. - // 'Uptier' indicates uptiering task. - // Required: true - // Enum: ["Downtier","Uptier"] - Type *string `json:"type"` -} - -// Validate validates this common data tiering task params -func (m *CommonDataTieringTaskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringTaskParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CommonDataTieringTaskParams) validateAlertPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if m.AlertPolicy != nil { - if err := m.AlertPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskParams) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskParams) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -func (m *CommonDataTieringTaskParams) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -var commonDataTieringTaskParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Downtier","Uptier"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonDataTieringTaskParamsTypeTypePropEnum = append(commonDataTieringTaskParamsTypeTypePropEnum, v) - } -} - -const ( - - // CommonDataTieringTaskParamsTypeDowntier captures enum value "Downtier" - CommonDataTieringTaskParamsTypeDowntier string = "Downtier" - - // CommonDataTieringTaskParamsTypeUptier captures enum value "Uptier" - CommonDataTieringTaskParamsTypeUptier string = "Uptier" -) - -// prop value enum -func (m *CommonDataTieringTaskParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonDataTieringTaskParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonDataTieringTaskParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common data tiering task params based on the context it is used -func (m *CommonDataTieringTaskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringTaskParams) contextValidateAlertPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertPolicy != nil { - - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if err := m.AlertPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskParams) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskParams) 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 -} - -func (m *CommonDataTieringTaskParams) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonDataTieringTaskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonDataTieringTaskParams) UnmarshalBinary(b []byte) error { - var res CommonDataTieringTaskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_data_tiering_task_response.go b/v2/models/common_data_tiering_task_response.go deleted file mode 100644 index 4583de9d..00000000 --- a/v2/models/common_data_tiering_task_response.go +++ /dev/null @@ -1,404 +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" -) - -// CommonDataTieringTaskResponse Specifies the data tiering task details. -// -// swagger:model CommonDataTieringTaskResponse -type CommonDataTieringTaskResponse struct { - - // Specifies the id of the data tiering task. - ID *string `json:"id,omitempty"` - - // Specifies the name of the data tiering task. - // Required: true - Name *string `json:"name"` - - // Specifies a description of the data tiering task. - Description *string `json:"description,omitempty"` - - // Specifies the alerting policy for the data tiering task. - AlertPolicy *ProtectionGroupAlertingPolicy `json:"alertPolicy,omitempty"` - - // Specifies source for data tiering. - Source *DataTieringSource `json:"source,omitempty"` - - // Specifies target for data tiering. - Target *DataTieringTarget `json:"target,omitempty"` - - // Specifies schedule for data tiering - Schedule *DataTieringSchedule `json:"schedule,omitempty"` - - // Type of data tiering task. - // 'Downtier' indicates downtiering task. - // 'Uptier' indicates uptiering task. - // Required: true - // Enum: ["Downtier","Uptier"] - Type *string `json:"type"` - - // Specifies last run details for data tiering task. - // Read Only: true - LastRun *DataTieringTaskRun `json:"lastRun,omitempty"` - - // Whether the data tiering task is active or not. - IsActive *bool `json:"isActive,omitempty"` - - // Whether the data tiering task is paused. New runs are not scheduled - // for the paused tasks. Active run of the task (if any) is not - // impacted. - IsPaused *bool `json:"isPaused,omitempty"` - - // Tracks whether the backup job has actually been deleted. - IsDeleted *bool `json:"isDeleted,omitempty"` -} - -// Validate validates this common data tiering task response -func (m *CommonDataTieringTaskResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringTaskResponse) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) validateAlertPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if m.AlertPolicy != nil { - if err := m.AlertPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - 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 -} - -func (m *CommonDataTieringTaskResponse) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -var commonDataTieringTaskResponseTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Downtier","Uptier"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonDataTieringTaskResponseTypeTypePropEnum = append(commonDataTieringTaskResponseTypeTypePropEnum, v) - } -} - -const ( - - // CommonDataTieringTaskResponseTypeDowntier captures enum value "Downtier" - CommonDataTieringTaskResponseTypeDowntier string = "Downtier" - - // CommonDataTieringTaskResponseTypeUptier captures enum value "Uptier" - CommonDataTieringTaskResponseTypeUptier string = "Uptier" -) - -// prop value enum -func (m *CommonDataTieringTaskResponse) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonDataTieringTaskResponseTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonDataTieringTaskResponse) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) validateLastRun(formats strfmt.Registry) error { - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common data tiering task response based on the context it is used -func (m *CommonDataTieringTaskResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDataTieringTaskResponse) contextValidateAlertPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertPolicy != nil { - - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if err := m.AlertPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) 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 -} - -func (m *CommonDataTieringTaskResponse) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *CommonDataTieringTaskResponse) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonDataTieringTaskResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonDataTieringTaskResponse) UnmarshalBinary(b []byte) error { - var res CommonDataTieringTaskResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_download_file_and_folder_params.go b/v2/models/common_download_file_and_folder_params.go deleted file mode 100644 index affb6ab2..00000000 --- a/v2/models/common_download_file_and_folder_params.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonDownloadFileAndFolderParams Download File And Folder Params -// -// Specifies the parameters to download files and folders. -// -// swagger:model CommonDownloadFileAndFolderParams -type CommonDownloadFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the path location to download the files and folders. - DownloadFilePath *string `json:"downloadFilePath,omitempty"` - - // Specifies the time upto which the download link is available. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` -} - -// Validate validates this common download file and folder params -func (m *CommonDownloadFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDownloadFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - if swag.IsZero(m.FilesAndFolders) { // not required - return nil - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common download file and folder params based on the context it is used -func (m *CommonDownloadFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonDownloadFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonDownloadFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonDownloadFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res CommonDownloadFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_env_specific_object_protection_params.go b/v2/models/common_env_specific_object_protection_params.go deleted file mode 100644 index 65940bc1..00000000 --- a/v2/models/common_env_specific_object_protection_params.go +++ /dev/null @@ -1,246 +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" -) - -// CommonEnvSpecificObjectProtectionParams Specifies common properties of Object Protection Operations -// -// swagger:model CommonEnvSpecificObjectProtectionParams -type CommonEnvSpecificObjectProtectionParams struct { - - // Specifies the environment for current object. - // 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 common env specific object protection params -func (m *CommonEnvSpecificObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonEnvSpecificObjectProtectionParamsTypeEnvironmentPropEnum []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 { - commonEnvSpecificObjectProtectionParamsTypeEnvironmentPropEnum = append(commonEnvSpecificObjectProtectionParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKVMware captures enum value "kVMware" - CommonEnvSpecificObjectProtectionParamsEnvironmentKVMware string = "kVMware" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKHyperV captures enum value "kHyperV" - CommonEnvSpecificObjectProtectionParamsEnvironmentKHyperV string = "kHyperV" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKVCD captures enum value "kVCD" - CommonEnvSpecificObjectProtectionParamsEnvironmentKVCD string = "kVCD" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAzure captures enum value "kAzure" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAzure string = "kAzure" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKGCP captures enum value "kGCP" - CommonEnvSpecificObjectProtectionParamsEnvironmentKGCP string = "kGCP" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKKVM captures enum value "kKVM" - CommonEnvSpecificObjectProtectionParamsEnvironmentKKVM string = "kKVM" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAcropolis captures enum value "kAcropolis" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAcropolis string = "kAcropolis" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAWS captures enum value "kAWS" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAWS string = "kAWS" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAWSNative captures enum value "kAWSNative" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAWSNative string = "kAWSNative" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAwsS3 captures enum value "kAwsS3" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAwsS3 string = "kAwsS3" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - CommonEnvSpecificObjectProtectionParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureNative captures enum value "kAzureNative" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureNative string = "kAzureNative" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureSQL string = "kAzureSQL" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKPhysical captures enum value "kPhysical" - CommonEnvSpecificObjectProtectionParamsEnvironmentKPhysical string = "kPhysical" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - CommonEnvSpecificObjectProtectionParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKGPFS captures enum value "kGPFS" - CommonEnvSpecificObjectProtectionParamsEnvironmentKGPFS string = "kGPFS" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKElastifile captures enum value "kElastifile" - CommonEnvSpecificObjectProtectionParamsEnvironmentKElastifile string = "kElastifile" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKNetapp captures enum value "kNetapp" - CommonEnvSpecificObjectProtectionParamsEnvironmentKNetapp string = "kNetapp" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKGenericNas captures enum value "kGenericNas" - CommonEnvSpecificObjectProtectionParamsEnvironmentKGenericNas string = "kGenericNas" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKIsilon captures enum value "kIsilon" - CommonEnvSpecificObjectProtectionParamsEnvironmentKIsilon string = "kIsilon" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonEnvSpecificObjectProtectionParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKPure captures enum value "kPure" - CommonEnvSpecificObjectProtectionParamsEnvironmentKPure string = "kPure" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonEnvSpecificObjectProtectionParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKSQL captures enum value "kSQL" - CommonEnvSpecificObjectProtectionParamsEnvironmentKSQL string = "kSQL" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKExchange captures enum value "kExchange" - CommonEnvSpecificObjectProtectionParamsEnvironmentKExchange string = "kExchange" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKAD captures enum value "kAD" - CommonEnvSpecificObjectProtectionParamsEnvironmentKAD string = "kAD" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKOracle captures enum value "kOracle" - CommonEnvSpecificObjectProtectionParamsEnvironmentKOracle string = "kOracle" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKView captures enum value "kView" - CommonEnvSpecificObjectProtectionParamsEnvironmentKView string = "kView" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - CommonEnvSpecificObjectProtectionParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365 captures enum value "kO365" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365 string = "kO365" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Teams captures enum value "kO365Teams" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Teams string = "kO365Teams" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Group captures enum value "kO365Group" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Group string = "kO365Group" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Exchange string = "kO365Exchange" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - CommonEnvSpecificObjectProtectionParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKKubernetes captures enum value "kKubernetes" - CommonEnvSpecificObjectProtectionParamsEnvironmentKKubernetes string = "kKubernetes" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKCassandra captures enum value "kCassandra" - CommonEnvSpecificObjectProtectionParamsEnvironmentKCassandra string = "kCassandra" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKMongoDB captures enum value "kMongoDB" - CommonEnvSpecificObjectProtectionParamsEnvironmentKMongoDB string = "kMongoDB" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKCouchbase captures enum value "kCouchbase" - CommonEnvSpecificObjectProtectionParamsEnvironmentKCouchbase string = "kCouchbase" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKHdfs captures enum value "kHdfs" - CommonEnvSpecificObjectProtectionParamsEnvironmentKHdfs string = "kHdfs" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKHive captures enum value "kHive" - CommonEnvSpecificObjectProtectionParamsEnvironmentKHive string = "kHive" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKHBase captures enum value "kHBase" - CommonEnvSpecificObjectProtectionParamsEnvironmentKHBase string = "kHBase" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKUDA captures enum value "kUDA" - CommonEnvSpecificObjectProtectionParamsEnvironmentKUDA string = "kUDA" - - // CommonEnvSpecificObjectProtectionParamsEnvironmentKSfdc captures enum value "kSfdc" - CommonEnvSpecificObjectProtectionParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonEnvSpecificObjectProtectionParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonEnvSpecificObjectProtectionParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonEnvSpecificObjectProtectionParams) 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 validates this common env specific object protection params based on context it is used -func (m *CommonEnvSpecificObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonEnvSpecificObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonEnvSpecificObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonEnvSpecificObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_external_target_params.go b/v2/models/common_external_target_params.go deleted file mode 100644 index b1d030f3..00000000 --- a/v2/models/common_external_target_params.go +++ /dev/null @@ -1,411 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonExternalTargetParams Specifies the parameters which are common between all External Target. -// -// swagger:model CommonExternalTargetParams -type CommonExternalTargetParams struct { - - // Specifies the ID of the External Target. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the global identifier of the External Target. - GlobalID *string `json:"globalId,omitempty"` - - // Specifies the name of the External Target. - // Required: true - Name *string `json:"name"` - - // Specifies the purpose of the External Target. - // Required: true - // Enum: ["Archival","Tiering","Rpaas"] - PurposeType *string `json:"purposeType"` - - // Specifies whether the type of compression of the External Target - // Enum: ["None","Low","High"] - Compression *string `json:"compression,omitempty"` - - // Specifies the registration status of the External Target - // Read Only: true - // Enum: ["Registered","Unregistering","Unregistered"] - Status *string `json:"status,omitempty"` - - // Specifies the error message if the event is in failed state. - // Read Only: true - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the list of tenantIds for the External Target - TenantIds []string `json:"tenantIds"` - - // Specifies the cloud domain information. - CloudDomains []*CloudDomain `json:"cloudDomains"` - - // Specifies the storage domain associated with the target. - StorageDomainName *string `json:"storageDomainName,omitempty"` - - // Specifies whether how this external target is being consumed either Local or FortKnox. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies whether this external target has been found to be capable of supporting WORM archives. - IsWormCapable *bool `json:"isWormCapable,omitempty"` -} - -// Validate validates this common external target params -func (m *CommonExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePurposeType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCompression(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonExternalTargetParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var commonExternalTargetParamsTypePurposeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Archival","Tiering","Rpaas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonExternalTargetParamsTypePurposeTypePropEnum = append(commonExternalTargetParamsTypePurposeTypePropEnum, v) - } -} - -const ( - - // CommonExternalTargetParamsPurposeTypeArchival captures enum value "Archival" - CommonExternalTargetParamsPurposeTypeArchival string = "Archival" - - // CommonExternalTargetParamsPurposeTypeTiering captures enum value "Tiering" - CommonExternalTargetParamsPurposeTypeTiering string = "Tiering" - - // CommonExternalTargetParamsPurposeTypeRpaas captures enum value "Rpaas" - CommonExternalTargetParamsPurposeTypeRpaas string = "Rpaas" -) - -// prop value enum -func (m *CommonExternalTargetParams) validatePurposeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonExternalTargetParamsTypePurposeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonExternalTargetParams) validatePurposeType(formats strfmt.Registry) error { - - if err := validate.Required("purposeType", "body", m.PurposeType); err != nil { - return err - } - - // value enum - if err := m.validatePurposeTypeEnum("purposeType", "body", *m.PurposeType); err != nil { - return err - } - - return nil -} - -var commonExternalTargetParamsTypeCompressionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Low","High"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonExternalTargetParamsTypeCompressionPropEnum = append(commonExternalTargetParamsTypeCompressionPropEnum, v) - } -} - -const ( - - // CommonExternalTargetParamsCompressionNone captures enum value "None" - CommonExternalTargetParamsCompressionNone string = "None" - - // CommonExternalTargetParamsCompressionLow captures enum value "Low" - CommonExternalTargetParamsCompressionLow string = "Low" - - // CommonExternalTargetParamsCompressionHigh captures enum value "High" - CommonExternalTargetParamsCompressionHigh string = "High" -) - -// prop value enum -func (m *CommonExternalTargetParams) validateCompressionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonExternalTargetParamsTypeCompressionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonExternalTargetParams) validateCompression(formats strfmt.Registry) error { - if swag.IsZero(m.Compression) { // not required - return nil - } - - // value enum - if err := m.validateCompressionEnum("compression", "body", *m.Compression); err != nil { - return err - } - - return nil -} - -var commonExternalTargetParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Registered","Unregistering","Unregistered"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonExternalTargetParamsTypeStatusPropEnum = append(commonExternalTargetParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonExternalTargetParamsStatusRegistered captures enum value "Registered" - CommonExternalTargetParamsStatusRegistered string = "Registered" - - // CommonExternalTargetParamsStatusUnregistering captures enum value "Unregistering" - CommonExternalTargetParamsStatusUnregistering string = "Unregistering" - - // CommonExternalTargetParamsStatusUnregistered captures enum value "Unregistered" - CommonExternalTargetParamsStatusUnregistered string = "Unregistered" -) - -// prop value enum -func (m *CommonExternalTargetParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonExternalTargetParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonExternalTargetParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *CommonExternalTargetParams) validateCloudDomains(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDomains) { // not required - return nil - } - - for i := 0; i < len(m.CloudDomains); i++ { - if swag.IsZero(m.CloudDomains[i]) { // not required - continue - } - - if m.CloudDomains[i] != nil { - if err := m.CloudDomains[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var commonExternalTargetParamsTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonExternalTargetParamsTypeOwnershipContextPropEnum = append(commonExternalTargetParamsTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // CommonExternalTargetParamsOwnershipContextLocal captures enum value "Local" - CommonExternalTargetParamsOwnershipContextLocal string = "Local" - - // CommonExternalTargetParamsOwnershipContextFortKnox captures enum value "FortKnox" - CommonExternalTargetParamsOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *CommonExternalTargetParams) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonExternalTargetParamsTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonExternalTargetParams) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common external target params based on the context it is used -func (m *CommonExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateErrorMessage(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonExternalTargetParams) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *CommonExternalTargetParams) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *CommonExternalTargetParams) contextValidateErrorMessage(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "errorMessage", "body", m.ErrorMessage); err != nil { - return err - } - - return nil -} - -func (m *CommonExternalTargetParams) contextValidateCloudDomains(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudDomains); i++ { - - if m.CloudDomains[i] != nil { - - if swag.IsZero(m.CloudDomains[i]) { // not required - return nil - } - - if err := m.CloudDomains[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_gcp_external_target_params.go b/v2/models/common_gcp_external_target_params.go deleted file mode 100644 index c47c04db..00000000 --- a/v2/models/common_gcp_external_target_params.go +++ /dev/null @@ -1,110 +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" -) - -// CommonGcpExternalTargetParams GCP External Target Request Common Params. -// -// Specifies the common parameters which are specific to GCP related External Targets. -// -// swagger:model CommonGcpExternalTargetParams -type CommonGcpExternalTargetParams struct { - - // Specifies the bucket name of the external target. - // Required: true - BucketName *string `json:"bucketName"` - - // Specifies the project Id of the external target. - // Required: true - ProjectID *string `json:"projectId"` - - // Specifies the client email address of the external target. - // Required: true - ClientEmailAddress *string `json:"clientEmailAddress"` - - // Specifies the client private key of the external target. - ClientPrivateKey *string `json:"clientPrivateKey,omitempty"` -} - -// Validate validates this common gcp external target params -func (m *CommonGcpExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientEmailAddress(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonGcpExternalTargetParams) validateBucketName(formats strfmt.Registry) error { - - if err := validate.Required("bucketName", "body", m.BucketName); err != nil { - return err - } - - return nil -} - -func (m *CommonGcpExternalTargetParams) validateProjectID(formats strfmt.Registry) error { - - if err := validate.Required("projectId", "body", m.ProjectID); err != nil { - return err - } - - return nil -} - -func (m *CommonGcpExternalTargetParams) validateClientEmailAddress(formats strfmt.Registry) error { - - if err := validate.Required("clientEmailAddress", "body", m.ClientEmailAddress); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common gcp external target params based on context it is used -func (m *CommonGcpExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonGcpExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonGcpExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonGcpExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_generic_nas_protection_params.go b/v2/models/common_generic_nas_protection_params.go deleted file mode 100644 index b54ccbf2..00000000 --- a/v2/models/common_generic_nas_protection_params.go +++ /dev/null @@ -1,319 +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" -) - -// CommonGenericNasProtectionParams Specifies the parameters which are specific to Generic NAS Protection. -// -// swagger:model CommonGenericNasProtectionParams -type CommonGenericNasProtectionParams struct { - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not the backup should continue regardless of whether or not an error was encountered. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the encryption should be used while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the pre script and post script to run before and after the backup. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this common generic nas protection params -func (m *CommonGenericNasProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonGenericNasProtectionParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common generic nas protection params based on the context it is used -func (m *CommonGenericNasProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonGenericNasProtectionParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonGenericNasProtectionParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonGenericNasProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonGenericNasProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonGenericNasProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_hyper_v_object_params.go b/v2/models/common_hyper_v_object_params.go deleted file mode 100644 index be23d6db..00000000 --- a/v2/models/common_hyper_v_object_params.go +++ /dev/null @@ -1,50 +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" -) - -// CommonHyperVObjectParams Specifies the common object parameters required for HyperV protection. -// -// swagger:model CommonHyperVObjectParams -type CommonHyperVObjectParams struct { - - // Specifies whether the backups should be copy-only. - BackupsCopyOnly *bool `json:"backupsCopyOnly,omitempty"` -} - -// Validate validates this common hyper v object params -func (m *CommonHyperVObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common hyper v object params based on context it is used -func (m *CommonHyperVObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonHyperVObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonHyperVObjectParams) UnmarshalBinary(b []byte) error { - var res CommonHyperVObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_hyper_v_protection_params.go b/v2/models/common_hyper_v_protection_params.go deleted file mode 100644 index 5a3d0e30..00000000 --- a/v2/models/common_hyper_v_protection_params.go +++ /dev/null @@ -1,115 +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" -) - -// CommonHyperVProtectionParams Specifies the common parameters which are specific to HyperV related protection. -// -// swagger:model CommonHyperVProtectionParams -type CommonHyperVProtectionParams struct { - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. If not specified or false then snapshots will not be app consistent. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` - - // Specifies whether or not to fallback to a crash consistent snapshot in the event that an app consistent snapshot fails. - FallbackToCrashConsistentSnapshot *bool `json:"fallbackToCrashConsistentSnapshot,omitempty"` - - // Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` -} - -// Validate validates this common hyper v protection params -func (m *CommonHyperVProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonHyperVProtectionParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common hyper v protection params based on the context it is used -func (m *CommonHyperVProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonHyperVProtectionParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonHyperVProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonHyperVProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonHyperVProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_identity_provider_configuration.go b/v2/models/common_identity_provider_configuration.go deleted file mode 100644 index 9f110b69..00000000 --- a/v2/models/common_identity_provider_configuration.go +++ /dev/null @@ -1,123 +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" -) - -// CommonIdentityProviderConfiguration Identity provider configuration -// -// swagger:model CommonIdentityProviderConfiguration -type CommonIdentityProviderConfiguration struct { - - // Specifies identity provider issuer id - // Required: true - IssuerID *string `json:"issuerId"` - - // Specifies the identity provider SSO url - // Required: true - SsoURL *string `json:"ssoUrl"` - - // Specifies the certificate generated for the app by the idp service when the cluster is registered as an app. This is required to verify the SAML response. - // Required: true - Certificate *string `json:"certificate"` - - // Specifies the filename used for the certificate. The default value is idp_certificate.pem - CertificateFilename *string `json:"certificateFilename,omitempty"` - - // Specifies the default roles assined for all SSO users - Roles []string `json:"roles"` - - // Specifies the SAML attribute name that contains a comma separated list of cluster roles. This sets the default roles for all SSO users. Either this field or roles must be set, this field takes higher precedence than the roles field. - SamlAttributeName *string `json:"samlAttributeName,omitempty"` - - // Specifies if local user login is allowed. When idp is configured, only idp users are allowed to login to the cluster, local login is disabled except for users with admin role. If this flag is set to true, local (non-idp) logins are allowed for all local and AD users. Local or AD users with admin role can login always independent of this flag's setting. By default there is no local authentication i.e the value is false. - AllowLocalUserLogin *bool `json:"allowLocalUserLogin,omitempty"` - - // Specifies whether to sign the SAML request or not. When it is set to true, SAML request will be signed. When it is set to false, SAML request is not signed. Default is false, set this flag to true if the idp site is configured to expect the SAML request from the Cluster signed. If this is set to true, users must get the cluster's certificate and upload it on the idp site. - SignRequest *bool `json:"signRequest,omitempty"` - - // Specifies a flag to enable or disable this idp service. When it is set to true, idp service is enabled. When it is set to false, idp service is disabled. By defaut idp is enabled i.e the value is true. - IsEnabled *bool `json:"isEnabled,omitempty"` -} - -// Validate validates this common identity provider configuration -func (m *CommonIdentityProviderConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIssuerID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSsoURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonIdentityProviderConfiguration) validateIssuerID(formats strfmt.Registry) error { - - if err := validate.Required("issuerId", "body", m.IssuerID); err != nil { - return err - } - - return nil -} - -func (m *CommonIdentityProviderConfiguration) validateSsoURL(formats strfmt.Registry) error { - - if err := validate.Required("ssoUrl", "body", m.SsoURL); err != nil { - return err - } - - return nil -} - -func (m *CommonIdentityProviderConfiguration) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common identity provider configuration based on context it is used -func (m *CommonIdentityProviderConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonIdentityProviderConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonIdentityProviderConfiguration) UnmarshalBinary(b []byte) error { - var res CommonIdentityProviderConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_indexed_object_params.go b/v2/models/common_indexed_object_params.go deleted file mode 100644 index 35c82446..00000000 --- a/v2/models/common_indexed_object_params.go +++ /dev/null @@ -1,248 +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" -) - -// CommonIndexedObjectParams CommonIndexedObjectParams -// -// Holds parameters common to an indexed object. -// -// swagger:model CommonIndexedObjectParams -type CommonIndexedObjectParams struct { - - // Specifies the name of the object. - Name *string `json:"name,omitempty"` - - // Specifies the path of the object. - Path *string `json:"path,omitempty"` - - // "Specifies the protection group id which contains this object." - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // "Specifies the protection group name which contains this object." - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the protection policy id for this file. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the protection policy name for this file. - PolicyName *string `json:"policyName,omitempty"` - - // "Specifies the Storage Domain id where the backup data of Object - // is present." - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the Source Object information. - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` - - TagObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonIndexedObjectParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Path *string `json:"path,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Name = dataAO0.Name - - m.Path = dataAO0.Path - - m.ProtectionGroupID = dataAO0.ProtectionGroupID - - m.ProtectionGroupName = dataAO0.ProtectionGroupName - - m.PolicyID = dataAO0.PolicyID - - m.PolicyName = dataAO0.PolicyName - - m.StorageDomainID = dataAO0.StorageDomainID - - m.SourceInfo = dataAO0.SourceInfo - - // AO1 - var aO1 TagObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.TagObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonIndexedObjectParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Path *string `json:"path,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` - } - - dataAO0.Name = m.Name - - dataAO0.Path = m.Path - - dataAO0.ProtectionGroupID = m.ProtectionGroupID - - dataAO0.ProtectionGroupName = m.ProtectionGroupName - - dataAO0.PolicyID = m.PolicyID - - dataAO0.PolicyName = m.PolicyName - - dataAO0.StorageDomainID = m.StorageDomainID - - dataAO0.SourceInfo = m.SourceInfo - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.TagObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common indexed object params -func (m *CommonIndexedObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceInfo(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonIndexedObjectParams) validateSourceInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if m.SourceInfo != nil { - if err := m.SourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common indexed object params based on the context it is used -func (m *CommonIndexedObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonIndexedObjectParams) contextValidateSourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceInfo != nil { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if err := m.SourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonIndexedObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonIndexedObjectParams) UnmarshalBinary(b []byte) error { - var res CommonIndexedObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_m_s_sql_protection_group_params.go b/v2/models/common_m_s_sql_protection_group_params.go deleted file mode 100644 index b10c55cc..00000000 --- a/v2/models/common_m_s_sql_protection_group_params.go +++ /dev/null @@ -1,351 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonMSSQLProtectionGroupParams Common MSSQL Protection Group Request Params. -// -// Specifies the common params to create a MSSQL Protection Group. -// -// swagger:model CommonMSSQLProtectionGroupParams -type CommonMSSQLProtectionGroupParams struct { - - // Specifies the preference type for backing up user databases on the host. - // Enum: ["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"] - UserDbBackupPreferenceType *string `json:"userDbBackupPreferenceType,omitempty"` - - // Specifies whether to backup system databases. If not specified then parameter is set to true. - BackupSystemDbs *bool `json:"backupSystemDbs,omitempty"` - - // Specifies whether or not the AAG backup preferences specified on the SQL Server host should be used. - UseAagPreferencesFromServer *bool `json:"useAagPreferencesFromServer,omitempty"` - - // Specifies the preference type for backing up databases that are part of an AAG. If not specified, then default preferences of the AAG server are applied. This field wont be applicable if user DB preference is set to skip AAG databases. - // Enum: ["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"] - AagBackupPreferenceType *string `json:"aagBackupPreferenceType,omitempty"` - - // Specifies whether full backups should be copy-only. - FullBackupsCopyOnly *bool `json:"fullBackupsCopyOnly,omitempty"` - - // Specifies the pre and post script parameters associated with a protection group. - PrePostScript *PrePostScriptParams `json:"prePostScript,omitempty"` - - // Specifies the list of exclusion filters applied during the group creation or edit. These exclusion filters can be wildcard supported strings or regular expressions. Objects satisfying the will filters will be excluded during backup and also auto protected objects will be ignored if filtered by any of the filters. - ExcludeFilters []*Filter `json:"excludeFilters"` - - // Specifies the number of streams to be used for log backups. - LogBackupNumStreams *int32 `json:"logBackupNumStreams,omitempty"` - - // Specifies the WithClause to be used for log backups. - LogBackupWithClause *string `json:"logBackupWithClause,omitempty"` - - // This is used to regulate certain gflag values from the UI. The values passed by the user from the UI will be used for the respective gflags. - AdvancedSettings *AdvancedSettings `json:"advancedSettings,omitempty"` -} - -// Validate validates this common m s SQL protection group params -func (m *CommonMSSQLProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserDbBackupPreferenceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAagBackupPreferenceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdvancedSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonMSSqlProtectionGroupParamsTypeUserDbBackupPreferenceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonMSSqlProtectionGroupParamsTypeUserDbBackupPreferenceTypePropEnum = append(commonMSSqlProtectionGroupParamsTypeUserDbBackupPreferenceTypePropEnum, v) - } -} - -const ( - - // CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupAllDatabases captures enum value "kBackupAllDatabases" - CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupAllDatabases string = "kBackupAllDatabases" - - // CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupAllExceptAAGDatabases captures enum value "kBackupAllExceptAAGDatabases" - CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupAllExceptAAGDatabases string = "kBackupAllExceptAAGDatabases" - - // CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupOnlyAAGDatabases captures enum value "kBackupOnlyAAGDatabases" - CommonMSSQLProtectionGroupParamsUserDbBackupPreferenceTypeKBackupOnlyAAGDatabases string = "kBackupOnlyAAGDatabases" -) - -// prop value enum -func (m *CommonMSSQLProtectionGroupParams) validateUserDbBackupPreferenceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonMSSqlProtectionGroupParamsTypeUserDbBackupPreferenceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) validateUserDbBackupPreferenceType(formats strfmt.Registry) error { - if swag.IsZero(m.UserDbBackupPreferenceType) { // not required - return nil - } - - // value enum - if err := m.validateUserDbBackupPreferenceTypeEnum("userDbBackupPreferenceType", "body", *m.UserDbBackupPreferenceType); err != nil { - return err - } - - return nil -} - -var commonMSSqlProtectionGroupParamsTypeAagBackupPreferenceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimaryReplicaOnly","kSecondaryReplicaOnly","kPreferSecondaryReplica","kAnyReplica"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonMSSqlProtectionGroupParamsTypeAagBackupPreferenceTypePropEnum = append(commonMSSqlProtectionGroupParamsTypeAagBackupPreferenceTypePropEnum, v) - } -} - -const ( - - // CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKPrimaryReplicaOnly captures enum value "kPrimaryReplicaOnly" - CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKPrimaryReplicaOnly string = "kPrimaryReplicaOnly" - - // CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKSecondaryReplicaOnly captures enum value "kSecondaryReplicaOnly" - CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKSecondaryReplicaOnly string = "kSecondaryReplicaOnly" - - // CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKPreferSecondaryReplica captures enum value "kPreferSecondaryReplica" - CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKPreferSecondaryReplica string = "kPreferSecondaryReplica" - - // CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKAnyReplica captures enum value "kAnyReplica" - CommonMSSQLProtectionGroupParamsAagBackupPreferenceTypeKAnyReplica string = "kAnyReplica" -) - -// prop value enum -func (m *CommonMSSQLProtectionGroupParams) validateAagBackupPreferenceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonMSSqlProtectionGroupParamsTypeAagBackupPreferenceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) validateAagBackupPreferenceType(formats strfmt.Registry) error { - if swag.IsZero(m.AagBackupPreferenceType) { // not required - return nil - } - - // value enum - if err := m.validateAagBackupPreferenceTypeEnum("aagBackupPreferenceType", "body", *m.AagBackupPreferenceType); err != nil { - return err - } - - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) validateExcludeFilters(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeFilters) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeFilters); i++ { - if swag.IsZero(m.ExcludeFilters[i]) { // not required - continue - } - - if m.ExcludeFilters[i] != nil { - if err := m.ExcludeFilters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) validateAdvancedSettings(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedSettings) { // not required - return nil - } - - if m.AdvancedSettings != nil { - if err := m.AdvancedSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common m s SQL protection group params based on the context it is used -func (m *CommonMSSQLProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) contextValidateExcludeFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeFilters); i++ { - - if m.ExcludeFilters[i] != nil { - - if swag.IsZero(m.ExcludeFilters[i]) { // not required - return nil - } - - if err := m.ExcludeFilters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonMSSQLProtectionGroupParams) contextValidateAdvancedSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.AdvancedSettings != nil { - - if swag.IsZero(m.AdvancedSettings) { // not required - return nil - } - - if err := m.AdvancedSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonMSSQLProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonMSSQLProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_mssql_file_object_protection_params.go b/v2/models/common_mssql_file_object_protection_params.go deleted file mode 100644 index a627655d..00000000 --- a/v2/models/common_mssql_file_object_protection_params.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" -) - -// CommonMssqlFileObjectProtectionParams Specifies the common params to create a File based MSSQL Object Protection. -// -// swagger:model CommonMssqlFileObjectProtectionParams -type CommonMssqlFileObjectProtectionParams struct { - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonMssqlFileObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonMssqlFileObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common mssql file object protection params -func (m *CommonMssqlFileObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common mssql file object protection params based on the context it is used -func (m *CommonMssqlFileObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonMssqlFileObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonMssqlFileObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonMssqlFileObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_mssql_native_object_protection_params.go b/v2/models/common_mssql_native_object_protection_params.go deleted file mode 100644 index 104fd3f0..00000000 --- a/v2/models/common_mssql_native_object_protection_params.go +++ /dev/null @@ -1,130 +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" -) - -// CommonMssqlNativeObjectProtectionParams Specifies the common params to create a Native based MSSQL Object Protection. -// -// swagger:model CommonMssqlNativeObjectProtectionParams -type CommonMssqlNativeObjectProtectionParams struct { - - // Specifies the number of streams to be used. - NumStreams *int32 `json:"numStreams,omitempty"` - - // Specifies the WithClause to be used. - WithClause *string `json:"withClause,omitempty"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonMssqlNativeObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.NumStreams = dataAO0.NumStreams - - m.WithClause = dataAO0.WithClause - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonMssqlNativeObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - - dataAO0.NumStreams = m.NumStreams - - dataAO0.WithClause = m.WithClause - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common mssql native object protection params -func (m *CommonMssqlNativeObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common mssql native object protection params based on the context it is used -func (m *CommonMssqlNativeObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonMssqlNativeObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonMssqlNativeObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonMssqlNativeObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_mssql_object_protection_params.go b/v2/models/common_mssql_object_protection_params.go deleted file mode 100644 index d81acc0c..00000000 --- a/v2/models/common_mssql_object_protection_params.go +++ /dev/null @@ -1,217 +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" -) - -// CommonMssqlObjectProtectionParams Specifies the common parameters for MSSQL Object Protection. -// -// swagger:model CommonMssqlObjectProtectionParams -type CommonMssqlObjectProtectionParams struct { - - // Specifies the MSSQL Object Protection type. - // Required: true - // Enum: ["kFile","kVolume","kNative"] - ObjectProtectionType *string `json:"objectProtectionType"` - - // Specifies the common File based MSSQL Object Protection params. - CommonFileObjectProtectionTypeParams *CommonMssqlFileObjectProtectionParams `json:"commonFileObjectProtectionTypeParams,omitempty"` - - // Specifies the common Native based MSSQL Object Protection params. - CommonNativeObjectProtectionTypeParams *CommonMssqlNativeObjectProtectionParams `json:"commonNativeObjectProtectionTypeParams,omitempty"` -} - -// Validate validates this common mssql object protection params -func (m *CommonMssqlObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonFileObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCommonNativeObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonMssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume","kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonMssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum = append(commonMssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum, v) - } -} - -const ( - - // CommonMssqlObjectProtectionParamsObjectProtectionTypeKFile captures enum value "kFile" - CommonMssqlObjectProtectionParamsObjectProtectionTypeKFile string = "kFile" - - // CommonMssqlObjectProtectionParamsObjectProtectionTypeKVolume captures enum value "kVolume" - CommonMssqlObjectProtectionParamsObjectProtectionTypeKVolume string = "kVolume" - - // CommonMssqlObjectProtectionParamsObjectProtectionTypeKNative captures enum value "kNative" - CommonMssqlObjectProtectionParamsObjectProtectionTypeKNative string = "kNative" -) - -// prop value enum -func (m *CommonMssqlObjectProtectionParams) validateObjectProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonMssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonMssqlObjectProtectionParams) validateObjectProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("objectProtectionType", "body", m.ObjectProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateObjectProtectionTypeEnum("objectProtectionType", "body", *m.ObjectProtectionType); err != nil { - return err - } - - return nil -} - -func (m *CommonMssqlObjectProtectionParams) validateCommonFileObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.CommonFileObjectProtectionTypeParams) { // not required - return nil - } - - if m.CommonFileObjectProtectionTypeParams != nil { - if err := m.CommonFileObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonFileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonFileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *CommonMssqlObjectProtectionParams) validateCommonNativeObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.CommonNativeObjectProtectionTypeParams) { // not required - return nil - } - - if m.CommonNativeObjectProtectionTypeParams != nil { - if err := m.CommonNativeObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonNativeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonNativeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common mssql object protection params based on the context it is used -func (m *CommonMssqlObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCommonFileObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCommonNativeObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonMssqlObjectProtectionParams) contextValidateCommonFileObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonFileObjectProtectionTypeParams != nil { - - if swag.IsZero(m.CommonFileObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.CommonFileObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonFileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonFileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *CommonMssqlObjectProtectionParams) contextValidateCommonNativeObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CommonNativeObjectProtectionTypeParams != nil { - - if swag.IsZero(m.CommonNativeObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.CommonNativeObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("commonNativeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("commonNativeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonMssqlObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonMssqlObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonMssqlObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_nas_object_params.go b/v2/models/common_nas_object_params.go deleted file mode 100644 index 247b1987..00000000 --- a/v2/models/common_nas_object_params.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" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonNasObjectParams Specifies the common parameters for NAS objects. -// -// swagger:model CommonNasObjectParams -type CommonNasObjectParams struct { - - // Specifies a list of NAS mount protocols supported by this object. - SupportedNasMountProtocols []string `json:"supportedNasMountProtocols"` -} - -// Validate validates this common nas object params -func (m *CommonNasObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSupportedNasMountProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonNasObjectParamsSupportedNasMountProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonNasObjectParamsSupportedNasMountProtocolsItemsEnum = append(commonNasObjectParamsSupportedNasMountProtocolsItemsEnum, v) - } -} - -func (m *CommonNasObjectParams) validateSupportedNasMountProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonNasObjectParamsSupportedNasMountProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonNasObjectParams) validateSupportedNasMountProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedNasMountProtocols) { // not required - return nil - } - - for i := 0; i < len(m.SupportedNasMountProtocols); i++ { - - // value enum - if err := m.validateSupportedNasMountProtocolsItemsEnum("supportedNasMountProtocols"+"."+strconv.Itoa(i), "body", m.SupportedNasMountProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this common nas object params based on context it is used -func (m *CommonNasObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonNasObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonNasObjectParams) UnmarshalBinary(b []byte) error { - var res CommonNasObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_nas_protection_params.go b/v2/models/common_nas_protection_params.go deleted file mode 100644 index ad00aed8..00000000 --- a/v2/models/common_nas_protection_params.go +++ /dev/null @@ -1,319 +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" -) - -// CommonNasProtectionParams Specifies the parameters which are specific to NAS Protection. -// -// swagger:model CommonNasProtectionParams -type CommonNasProtectionParams struct { - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not the backup should continue regardless of whether or not an error was encountered. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the encryption should be used while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the pre script and post script to run before and after the backup. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this common nas protection params -func (m *CommonNasProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonNasProtectionParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common nas protection params based on the context it is used -func (m *CommonNasProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonNasProtectionParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *CommonNasProtectionParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonNasProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonNasProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonNasProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_no_sql_recovery_options.go b/v2/models/common_no_sql_recovery_options.go deleted file mode 100644 index 58e9bb28..00000000 --- a/v2/models/common_no_sql_recovery_options.go +++ /dev/null @@ -1,151 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonNoSQLRecoveryOptions Specifies the common properties required by all Nosl adapters at the time of recovery. -// -// swagger:model CommonNoSqlRecoveryOptions -type CommonNoSQLRecoveryOptions struct { - - // Specifies the 'Source Registration ID' of the source where the objects are to be recovered. If this is not specified, the recovery job will recover to the original location. - RecoverTo *int64 `json:"recoverTo,omitempty"` - - // Set to true to overwrite an existing object at the destination. If set to false, and the same object exists at the destination, then recovery will fail for that object. - Overwrite *bool `json:"overwrite,omitempty"` - - // Specifies the maximum number of concurrent IO Streams that will be created to exchange data with the cluster. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum network bandwidth that each concurrent IO Stream can use for exchanging data with the cluster. - BandwidthMBPS *int64 `json:"bandwidthMBPS,omitempty"` - - // This field will hold the warnings in cases where the job status is SucceededWithWarnings. - // Read Only: true - Warnings []string `json:"warnings"` - - // Specifies the advanced configuration for a recovery job. - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` -} - -// Validate validates this common no Sql recovery options -func (m *CommonNoSQLRecoveryOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdvancedConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonNoSQLRecoveryOptions) validateAdvancedConfigs(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedConfigs) { // not required - return nil - } - - for i := 0; i < len(m.AdvancedConfigs); i++ { - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - continue - } - - if m.AdvancedConfigs[i] != nil { - if err := m.AdvancedConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common no Sql recovery options based on the context it is used -func (m *CommonNoSQLRecoveryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonNoSQLRecoveryOptions) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "warnings", "body", []string(m.Warnings)); err != nil { - return err - } - - return nil -} - -func (m *CommonNoSQLRecoveryOptions) contextValidateAdvancedConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdvancedConfigs); i++ { - - if m.AdvancedConfigs[i] != nil { - - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - return nil - } - - if err := m.AdvancedConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonNoSQLRecoveryOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonNoSQLRecoveryOptions) UnmarshalBinary(b []byte) error { - var res CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_object_action_request.go b/v2/models/common_object_action_request.go deleted file mode 100644 index 8f2cbb13..00000000 --- a/v2/models/common_object_action_request.go +++ /dev/null @@ -1,208 +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" -) - -// CommonObjectActionRequest Common Object Action Request. -// -// Specifies the common request parameters for performing an action on Object. -// -// swagger:model CommonObjectActionRequest -type CommonObjectActionRequest struct { - - // Specifies the environment type of the Object. - // Required: true - // 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"` -} - -// Validate validates this common object action request -func (m *CommonObjectActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonObjectActionRequestTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonObjectActionRequestTypeEnvironmentPropEnum = append(commonObjectActionRequestTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonObjectActionRequestEnvironmentKVMware captures enum value "kVMware" - CommonObjectActionRequestEnvironmentKVMware string = "kVMware" - - // CommonObjectActionRequestEnvironmentKHyperV captures enum value "kHyperV" - CommonObjectActionRequestEnvironmentKHyperV string = "kHyperV" - - // CommonObjectActionRequestEnvironmentKAzure captures enum value "kAzure" - CommonObjectActionRequestEnvironmentKAzure string = "kAzure" - - // CommonObjectActionRequestEnvironmentKKVM captures enum value "kKVM" - CommonObjectActionRequestEnvironmentKKVM string = "kKVM" - - // CommonObjectActionRequestEnvironmentKAWS captures enum value "kAWS" - CommonObjectActionRequestEnvironmentKAWS string = "kAWS" - - // CommonObjectActionRequestEnvironmentKAzureSQL captures enum value "kAzureSQL" - CommonObjectActionRequestEnvironmentKAzureSQL string = "kAzureSQL" - - // CommonObjectActionRequestEnvironmentKAcropolis captures enum value "kAcropolis" - CommonObjectActionRequestEnvironmentKAcropolis string = "kAcropolis" - - // CommonObjectActionRequestEnvironmentKGCP captures enum value "kGCP" - CommonObjectActionRequestEnvironmentKGCP string = "kGCP" - - // CommonObjectActionRequestEnvironmentKPhysical captures enum value "kPhysical" - CommonObjectActionRequestEnvironmentKPhysical string = "kPhysical" - - // CommonObjectActionRequestEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - CommonObjectActionRequestEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // CommonObjectActionRequestEnvironmentKIsilon captures enum value "kIsilon" - CommonObjectActionRequestEnvironmentKIsilon string = "kIsilon" - - // CommonObjectActionRequestEnvironmentKNetapp captures enum value "kNetapp" - CommonObjectActionRequestEnvironmentKNetapp string = "kNetapp" - - // CommonObjectActionRequestEnvironmentKGenericNas captures enum value "kGenericNas" - CommonObjectActionRequestEnvironmentKGenericNas string = "kGenericNas" - - // CommonObjectActionRequestEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonObjectActionRequestEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonObjectActionRequestEnvironmentKElastifile captures enum value "kElastifile" - CommonObjectActionRequestEnvironmentKElastifile string = "kElastifile" - - // CommonObjectActionRequestEnvironmentKGPFS captures enum value "kGPFS" - CommonObjectActionRequestEnvironmentKGPFS string = "kGPFS" - - // CommonObjectActionRequestEnvironmentKPure captures enum value "kPure" - CommonObjectActionRequestEnvironmentKPure string = "kPure" - - // CommonObjectActionRequestEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonObjectActionRequestEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonObjectActionRequestEnvironmentKNimble captures enum value "kNimble" - CommonObjectActionRequestEnvironmentKNimble string = "kNimble" - - // CommonObjectActionRequestEnvironmentKSQL captures enum value "kSQL" - CommonObjectActionRequestEnvironmentKSQL string = "kSQL" - - // CommonObjectActionRequestEnvironmentKOracle captures enum value "kOracle" - CommonObjectActionRequestEnvironmentKOracle string = "kOracle" - - // CommonObjectActionRequestEnvironmentKExchange captures enum value "kExchange" - CommonObjectActionRequestEnvironmentKExchange string = "kExchange" - - // CommonObjectActionRequestEnvironmentKAD captures enum value "kAD" - CommonObjectActionRequestEnvironmentKAD string = "kAD" - - // CommonObjectActionRequestEnvironmentKView captures enum value "kView" - CommonObjectActionRequestEnvironmentKView string = "kView" - - // CommonObjectActionRequestEnvironmentKO365 captures enum value "kO365" - CommonObjectActionRequestEnvironmentKO365 string = "kO365" - - // CommonObjectActionRequestEnvironmentKHyperFlex captures enum value "kHyperFlex" - CommonObjectActionRequestEnvironmentKHyperFlex string = "kHyperFlex" - - // CommonObjectActionRequestEnvironmentKKubernetes captures enum value "kKubernetes" - CommonObjectActionRequestEnvironmentKKubernetes string = "kKubernetes" - - // CommonObjectActionRequestEnvironmentKCassandra captures enum value "kCassandra" - CommonObjectActionRequestEnvironmentKCassandra string = "kCassandra" - - // CommonObjectActionRequestEnvironmentKMongoDB captures enum value "kMongoDB" - CommonObjectActionRequestEnvironmentKMongoDB string = "kMongoDB" - - // CommonObjectActionRequestEnvironmentKCouchbase captures enum value "kCouchbase" - CommonObjectActionRequestEnvironmentKCouchbase string = "kCouchbase" - - // CommonObjectActionRequestEnvironmentKHdfs captures enum value "kHdfs" - CommonObjectActionRequestEnvironmentKHdfs string = "kHdfs" - - // CommonObjectActionRequestEnvironmentKHive captures enum value "kHive" - CommonObjectActionRequestEnvironmentKHive string = "kHive" - - // CommonObjectActionRequestEnvironmentKHBase captures enum value "kHBase" - CommonObjectActionRequestEnvironmentKHBase string = "kHBase" - - // CommonObjectActionRequestEnvironmentKUDA captures enum value "kUDA" - CommonObjectActionRequestEnvironmentKUDA string = "kUDA" - - // CommonObjectActionRequestEnvironmentKSfdc captures enum value "kSfdc" - CommonObjectActionRequestEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonObjectActionRequest) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonObjectActionRequestTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonObjectActionRequest) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common object action request based on context it is used -func (m *CommonObjectActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonObjectActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonObjectActionRequest) UnmarshalBinary(b []byte) error { - var res CommonObjectActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_object_protect_params.go b/v2/models/common_object_protect_params.go deleted file mode 100644 index 9c4da35b..00000000 --- a/v2/models/common_object_protect_params.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" -) - -// CommonObjectProtectParams Specifies the common parameters for object backup. These parameters are common across all types of adapters and objects. -// -// swagger:model CommonObjectProtectParams -type CommonObjectProtectParams struct { - CommonBackupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonObjectProtectParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonBackupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonBackupParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonObjectProtectParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonBackupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common object protect params -func (m *CommonObjectProtectParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBackupParams - if err := m.CommonBackupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common object protect params based on the context it is used -func (m *CommonObjectProtectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBackupParams - if err := m.CommonBackupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonObjectProtectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonObjectProtectParams) UnmarshalBinary(b []byte) error { - var res CommonObjectProtectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_object_snapshot_volume_params.go b/v2/models/common_object_snapshot_volume_params.go deleted file mode 100644 index f83c8773..00000000 --- a/v2/models/common_object_snapshot_volume_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonObjectSnapshotVolumeParams Specifies volume info of snapshot across all enviroments. -// -// swagger:model CommonObjectSnapshotVolumeParams -type CommonObjectSnapshotVolumeParams struct { - - // Specifies a list of volume info. - Volumes []*VolumeInfo `json:"volumes"` -} - -// Validate validates this common object snapshot volume params -func (m *CommonObjectSnapshotVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectSnapshotVolumeParams) validateVolumes(formats strfmt.Registry) error { - if swag.IsZero(m.Volumes) { // not required - return nil - } - - for i := 0; i < len(m.Volumes); i++ { - if swag.IsZero(m.Volumes[i]) { // not required - continue - } - - if m.Volumes[i] != nil { - if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common object snapshot volume params based on the context it is used -func (m *CommonObjectSnapshotVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectSnapshotVolumeParams) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Volumes); i++ { - - if m.Volumes[i] != nil { - - if swag.IsZero(m.Volumes[i]) { // not required - return nil - } - - if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonObjectSnapshotVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonObjectSnapshotVolumeParams) UnmarshalBinary(b []byte) error { - var res CommonObjectSnapshotVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_object_summary.go b/v2/models/common_object_summary.go deleted file mode 100644 index bd2e6c32..00000000 --- a/v2/models/common_object_summary.go +++ /dev/null @@ -1,240 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonObjectSummary Common Object Entity Summary. -// -// Specifies an Common summary properties for an object. -// -// swagger:model CommonObjectSummary -type CommonObjectSummary struct { - ObjectSummary - - // Specifies the count and size of protected and unprotected objects for the size. - ProtectionStats []*ObjectProtectionStatsSummary `json:"protectionStats"` - - // Specifies the list of users, groups and tenants that have permissions for this object. - Permissions *PermissionInfo `json:"permissions,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonObjectSummary) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - ProtectionStats []*ObjectProtectionStatsSummary `json:"protectionStats"` - - Permissions *PermissionInfo `json:"permissions,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ProtectionStats = dataAO1.ProtectionStats - - m.Permissions = dataAO1.Permissions - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonObjectSummary) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ProtectionStats []*ObjectProtectionStatsSummary `json:"protectionStats"` - - Permissions *PermissionInfo `json:"permissions,omitempty"` - } - - dataAO1.ProtectionStats = m.ProtectionStats - - dataAO1.Permissions = m.Permissions - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common object summary -func (m *CommonObjectSummary) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectSummary) validateProtectionStats(formats strfmt.Registry) error { - - if swag.IsZero(m.ProtectionStats) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionStats); i++ { - if swag.IsZero(m.ProtectionStats[i]) { // not required - continue - } - - if m.ProtectionStats[i] != nil { - if err := m.ProtectionStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonObjectSummary) validatePermissions(formats strfmt.Registry) error { - - if swag.IsZero(m.Permissions) { // not required - return nil - } - - if m.Permissions != nil { - if err := m.Permissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common object summary based on the context it is used -func (m *CommonObjectSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectSummary) contextValidateProtectionStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionStats); i++ { - - if m.ProtectionStats[i] != nil { - - if swag.IsZero(m.ProtectionStats[i]) { // not required - return nil - } - - if err := m.ProtectionStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonObjectSummary) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.Permissions != nil { - - if swag.IsZero(m.Permissions) { // not required - return nil - } - - if err := m.Permissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonObjectSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonObjectSummary) UnmarshalBinary(b []byte) error { - var res CommonObjectSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_objects_action_params.go b/v2/models/common_objects_action_params.go deleted file mode 100644 index cf4d8855..00000000 --- a/v2/models/common_objects_action_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonObjectsActionParams Specifies the common action params needed for performing bulk actions on list of objects. -// -// swagger:model CommonObjectsActionParams -type CommonObjectsActionParams struct { - - // Specifies the objectMap that will be used to perform bulk actions such as linking and unlinking. - ObjectMap []*ActionObjectMapping `json:"objectMap"` -} - -// Validate validates this common objects action params -func (m *CommonObjectsActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectsActionParams) validateObjectMap(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectMap) { // not required - return nil - } - - for i := 0; i < len(m.ObjectMap); i++ { - if swag.IsZero(m.ObjectMap[i]) { // not required - continue - } - - if m.ObjectMap[i] != nil { - if err := m.ObjectMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common objects action params based on the context it is used -func (m *CommonObjectsActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonObjectsActionParams) contextValidateObjectMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectMap); i++ { - - if m.ObjectMap[i] != nil { - - if swag.IsZero(m.ObjectMap[i]) { // not required - return nil - } - - if err := m.ObjectMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonObjectsActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonObjectsActionParams) UnmarshalBinary(b []byte) error { - var res CommonObjectsActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_oracle_app_source_config.go b/v2/models/common_oracle_app_source_config.go deleted file mode 100644 index aa105d7c..00000000 --- a/v2/models/common_oracle_app_source_config.go +++ /dev/null @@ -1,398 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonOracleAppSourceConfig Common Oracle App Source Config. -// -// Specifies a common parameters used when restoring back to original or new source. -// -// swagger:model CommonOracleAppSourceConfig -type CommonOracleAppSourceConfig struct { - - // Specifies the time in the past to which the Oracle db needs to be restored. This allows for granular recovery of Oracle databases. If this is not set, the Oracle db will be restored from the full/incremental snapshot. - RestoreTimeUsecs *int64 `json:"restoreTimeUsecs,omitempty"` - - // Specifies the Oracle database node channels info. If not specified, the default values assigned by the server are applied to all the databases. - DbChannels []*OracleDbChannel `json:"dbChannels"` - - // Specifies if database should be left in recovery mode. - RecoveryMode *bool `json:"recoveryMode,omitempty"` - - // Specifies key value pairs of shell variables which defines the restore shell environment. - ShellEvironmentVars []*ShellKeyValuePair `json:"shellEvironmentVars"` - - // Specifies whether database recovery performed should use scn value or not. - UseScnForRestore *bool `json:"useScnForRestore,omitempty"` - - // Specifies information about list of objects (PDBs) to restore. - GranularRestoreInfo *RecoverOracleGranularRestoreInfo `json:"granularRestoreInfo,omitempty"` - - // Specifies Range in Time, Scn or Sequence to restore archive logs of a DB. - OracleArchiveLogInfo *OracleArchiveLogInfo `json:"oracleArchiveLogInfo,omitempty"` - - // Specifies parameters related to Oracle Recovery Validation. - OracleRecoveryValidationInfo *OracleRecoveryValidationInfo `json:"oracleRecoveryValidationInfo,omitempty"` - - // Specifies parameters related to spfile/pfile restore. - RestoreSpfileOrPfileInfo *RestoreSpfileOrPfileInfo `json:"restoreSpfileOrPfileInfo,omitempty"` -} - -// Validate validates this common oracle app source config -func (m *CommonOracleAppSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbChannels(formats); err != nil { - res = append(res, err) - } - - if err := m.validateShellEvironmentVars(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGranularRestoreInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleArchiveLogInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleRecoveryValidationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreSpfileOrPfileInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonOracleAppSourceConfig) validateDbChannels(formats strfmt.Registry) error { - if swag.IsZero(m.DbChannels) { // not required - return nil - } - - for i := 0; i < len(m.DbChannels); i++ { - if swag.IsZero(m.DbChannels[i]) { // not required - continue - } - - if m.DbChannels[i] != nil { - if err := m.DbChannels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) validateShellEvironmentVars(formats strfmt.Registry) error { - if swag.IsZero(m.ShellEvironmentVars) { // not required - return nil - } - - for i := 0; i < len(m.ShellEvironmentVars); i++ { - if swag.IsZero(m.ShellEvironmentVars[i]) { // not required - continue - } - - if m.ShellEvironmentVars[i] != nil { - if err := m.ShellEvironmentVars[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shellEvironmentVars" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shellEvironmentVars" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) validateGranularRestoreInfo(formats strfmt.Registry) error { - if swag.IsZero(m.GranularRestoreInfo) { // not required - return nil - } - - if m.GranularRestoreInfo != nil { - if err := m.GranularRestoreInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) validateOracleArchiveLogInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OracleArchiveLogInfo) { // not required - return nil - } - - if m.OracleArchiveLogInfo != nil { - if err := m.OracleArchiveLogInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) validateOracleRecoveryValidationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OracleRecoveryValidationInfo) { // not required - return nil - } - - if m.OracleRecoveryValidationInfo != nil { - if err := m.OracleRecoveryValidationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRecoveryValidationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRecoveryValidationInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) validateRestoreSpfileOrPfileInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreSpfileOrPfileInfo) { // not required - return nil - } - - if m.RestoreSpfileOrPfileInfo != nil { - if err := m.RestoreSpfileOrPfileInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSpfileOrPfileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSpfileOrPfileInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common oracle app source config based on the context it is used -func (m *CommonOracleAppSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbChannels(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateShellEvironmentVars(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGranularRestoreInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleArchiveLogInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleRecoveryValidationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoreSpfileOrPfileInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateDbChannels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbChannels); i++ { - - if m.DbChannels[i] != nil { - - if swag.IsZero(m.DbChannels[i]) { // not required - return nil - } - - if err := m.DbChannels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateShellEvironmentVars(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ShellEvironmentVars); i++ { - - if m.ShellEvironmentVars[i] != nil { - - if swag.IsZero(m.ShellEvironmentVars[i]) { // not required - return nil - } - - if err := m.ShellEvironmentVars[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shellEvironmentVars" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shellEvironmentVars" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateGranularRestoreInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.GranularRestoreInfo != nil { - - if swag.IsZero(m.GranularRestoreInfo) { // not required - return nil - } - - if err := m.GranularRestoreInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("granularRestoreInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("granularRestoreInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateOracleArchiveLogInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleArchiveLogInfo != nil { - - if swag.IsZero(m.OracleArchiveLogInfo) { // not required - return nil - } - - if err := m.OracleArchiveLogInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleArchiveLogInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleArchiveLogInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateOracleRecoveryValidationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleRecoveryValidationInfo != nil { - - if swag.IsZero(m.OracleRecoveryValidationInfo) { // not required - return nil - } - - if err := m.OracleRecoveryValidationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRecoveryValidationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRecoveryValidationInfo") - } - return err - } - } - - return nil -} - -func (m *CommonOracleAppSourceConfig) contextValidateRestoreSpfileOrPfileInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreSpfileOrPfileInfo != nil { - - if swag.IsZero(m.RestoreSpfileOrPfileInfo) { // not required - return nil - } - - if err := m.RestoreSpfileOrPfileInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreSpfileOrPfileInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreSpfileOrPfileInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonOracleAppSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonOracleAppSourceConfig) UnmarshalBinary(b []byte) error { - var res CommonOracleAppSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_oracle_clone_params.go b/v2/models/common_oracle_clone_params.go deleted file mode 100644 index 3e38f911..00000000 --- a/v2/models/common_oracle_clone_params.go +++ /dev/null @@ -1,108 +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" -) - -// CommonOracleCloneParams Specifies the common properties of an Oracle clone. -// -// swagger:model CommonOracleCloneParams -type CommonOracleCloneParams struct { - - // Specifies the name of the cloned database. - // Required: true - DbName *string `json:"dbName"` - - // Specifies the home folder for the cloned database. - // Required: true - HomeFolder *string `json:"homeFolder"` - - // Specifies the base folder of Oracle installation on the target host. - // Required: true - BaseFolder *string `json:"baseFolder"` - - // Specifies the System Global Area (SGA) for the clone database. - Sga *string `json:"sga,omitempty"` -} - -// Validate validates this common oracle clone params -func (m *CommonOracleCloneParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHomeFolder(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBaseFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonOracleCloneParams) validateDbName(formats strfmt.Registry) error { - - if err := validate.Required("dbName", "body", m.DbName); err != nil { - return err - } - - return nil -} - -func (m *CommonOracleCloneParams) validateHomeFolder(formats strfmt.Registry) error { - - if err := validate.Required("homeFolder", "body", m.HomeFolder); err != nil { - return err - } - - return nil -} - -func (m *CommonOracleCloneParams) validateBaseFolder(formats strfmt.Registry) error { - - if err := validate.Required("baseFolder", "body", m.BaseFolder); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common oracle clone params based on context it is used -func (m *CommonOracleCloneParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonOracleCloneParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonOracleCloneParams) UnmarshalBinary(b []byte) error { - var res CommonOracleCloneParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_oracle_external_target_params.go b/v2/models/common_oracle_external_target_params.go deleted file mode 100644 index d4fcd933..00000000 --- a/v2/models/common_oracle_external_target_params.go +++ /dev/null @@ -1,127 +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" -) - -// CommonOracleExternalTargetParams Oracle External Target Request Common Params for archival purpose type. -// -// Specifies the common parameters which are specific to Oracle related External Targets. -// -// swagger:model CommonOracleExternalTargetParams -type CommonOracleExternalTargetParams struct { - - // Specifies the bucket name of the external target. - // Required: true - BucketName *string `json:"bucketName"` - - // Specifies the region of the external target. - // Required: true - Region *string `json:"region"` - - // Specifies the access key id of the external target. - // Required: true - AccessKeyID *string `json:"accessKeyId"` - - // Specifies the storage access key of the external target. - StorageAccessKey *string `json:"storageAccessKey,omitempty"` - - // Specifies the tenancy of the external target. - // Required: true - Tenancy *string `json:"tenancy"` -} - -// Validate validates this common oracle external target params -func (m *CommonOracleExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAccessKeyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenancy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonOracleExternalTargetParams) validateBucketName(formats strfmt.Registry) error { - - if err := validate.Required("bucketName", "body", m.BucketName); err != nil { - return err - } - - return nil -} - -func (m *CommonOracleExternalTargetParams) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -func (m *CommonOracleExternalTargetParams) validateAccessKeyID(formats strfmt.Registry) error { - - if err := validate.Required("accessKeyId", "body", m.AccessKeyID); err != nil { - return err - } - - return nil -} - -func (m *CommonOracleExternalTargetParams) validateTenancy(formats strfmt.Registry) error { - - if err := validate.Required("tenancy", "body", m.Tenancy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common oracle external target params based on context it is used -func (m *CommonOracleExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonOracleExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonOracleExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonOracleExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_p_i_t_ranges_protected_object_response.go b/v2/models/common_p_i_t_ranges_protected_object_response.go deleted file mode 100644 index 8fb1ca76..00000000 --- a/v2/models/common_p_i_t_ranges_protected_object_response.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonPITRangesProtectedObjectResponse Common PIT Response -// -// # Specifies common properties for PIT Response -// -// swagger:model CommonPITRangesProtectedObjectResponse -type CommonPITRangesProtectedObjectResponse struct { - - // Specifies the environment for which restore ranges are returned. - // Enum: ["kOracle"] - Environment *string `json:"environment,omitempty"` -} - -// Validate validates this common p i t ranges protected object response -func (m *CommonPITRangesProtectedObjectResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonPITRangesProtectedObjectResponseTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonPITRangesProtectedObjectResponseTypeEnvironmentPropEnum = append(commonPITRangesProtectedObjectResponseTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonPITRangesProtectedObjectResponseEnvironmentKOracle captures enum value "kOracle" - CommonPITRangesProtectedObjectResponseEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *CommonPITRangesProtectedObjectResponse) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonPITRangesProtectedObjectResponseTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonPITRangesProtectedObjectResponse) 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 validates this common p i t ranges protected object response based on context it is used -func (m *CommonPITRangesProtectedObjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonPITRangesProtectedObjectResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonPITRangesProtectedObjectResponse) UnmarshalBinary(b []byte) error { - var res CommonPITRangesProtectedObjectResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_post_backup_script_params.go b/v2/models/common_post_backup_script_params.go deleted file mode 100644 index 15350703..00000000 --- a/v2/models/common_post_backup_script_params.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" -) - -// CommonPostBackupScriptParams Common PostBackup Script Params -// -// Specifies the common params for PostBackup scripts. -// -// swagger:model CommonPostBackupScriptParams -type CommonPostBackupScriptParams struct { - CommonPrePostScriptParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonPostBackupScriptParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonPrePostScriptParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonPrePostScriptParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonPostBackupScriptParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonPrePostScriptParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common post backup script params -func (m *CommonPostBackupScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPrePostScriptParams - if err := m.CommonPrePostScriptParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common post backup script params based on the context it is used -func (m *CommonPostBackupScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPrePostScriptParams - if err := m.CommonPrePostScriptParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonPostBackupScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonPostBackupScriptParams) UnmarshalBinary(b []byte) error { - var res CommonPostBackupScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_pre_backup_script_params.go b/v2/models/common_pre_backup_script_params.go deleted file mode 100644 index 025bfc55..00000000 --- a/v2/models/common_pre_backup_script_params.go +++ /dev/null @@ -1,119 +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" -) - -// CommonPreBackupScriptParams Common PreBackup Script Params -// -// Specifies the common params for PreBackup scripts. -// -// swagger:model CommonPreBackupScriptParams -type CommonPreBackupScriptParams struct { - CommonPrePostScriptParams - - // Specifies if the script needs to continue even if there is an occurence of an error. If this flag is set to true, then Backup Run will start even if the pre backup script fails. If not specified or false, then backup run will not start when script fails. - ContinueOnError *bool `json:"continueOnError,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonPreBackupScriptParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonPrePostScriptParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonPrePostScriptParams = aO0 - - // AO1 - var dataAO1 struct { - ContinueOnError *bool `json:"continueOnError,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ContinueOnError = dataAO1.ContinueOnError - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonPreBackupScriptParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonPrePostScriptParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ContinueOnError *bool `json:"continueOnError,omitempty"` - } - - dataAO1.ContinueOnError = m.ContinueOnError - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common pre backup script params -func (m *CommonPreBackupScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPrePostScriptParams - if err := m.CommonPrePostScriptParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this common pre backup script params based on the context it is used -func (m *CommonPreBackupScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPrePostScriptParams - if err := m.CommonPrePostScriptParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonPreBackupScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonPreBackupScriptParams) UnmarshalBinary(b []byte) error { - var res CommonPreBackupScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_pre_post_cloud_script_params.go b/v2/models/common_pre_post_cloud_script_params.go deleted file mode 100644 index 047d51c7..00000000 --- a/v2/models/common_pre_post_cloud_script_params.go +++ /dev/null @@ -1,162 +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" -) - -// CommonPrePostCloudScriptParams Common Pre Post Cloud Script Params -// -// Specifies the common params for PrePost backup scripts specific for cloud-adapters. They have two different scripts for the two different shell types - windows and linux -// -// swagger:model CommonPrePostCloudScriptParams -type CommonPrePostCloudScriptParams struct { - - // Specifies the script details that will be specific to linux machines and executed on bash. - LinuxScript *CommonPreBackupScriptParams `json:"linuxScript,omitempty"` - - // Specifies the script details that will be specific to windows machines and executed on powershell. - WindowsScript *CommonPreBackupScriptParams `json:"windowsScript,omitempty"` -} - -// Validate validates this common pre post cloud script params -func (m *CommonPrePostCloudScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLinuxScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWindowsScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonPrePostCloudScriptParams) validateLinuxScript(formats strfmt.Registry) error { - if swag.IsZero(m.LinuxScript) { // not required - return nil - } - - if m.LinuxScript != nil { - if err := m.LinuxScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxScript") - } - return err - } - } - - return nil -} - -func (m *CommonPrePostCloudScriptParams) validateWindowsScript(formats strfmt.Registry) error { - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if m.WindowsScript != nil { - if err := m.WindowsScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common pre post cloud script params based on the context it is used -func (m *CommonPrePostCloudScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLinuxScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWindowsScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonPrePostCloudScriptParams) contextValidateLinuxScript(ctx context.Context, formats strfmt.Registry) error { - - if m.LinuxScript != nil { - - if swag.IsZero(m.LinuxScript) { // not required - return nil - } - - if err := m.LinuxScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxScript") - } - return err - } - } - - return nil -} - -func (m *CommonPrePostCloudScriptParams) contextValidateWindowsScript(ctx context.Context, formats strfmt.Registry) error { - - if m.WindowsScript != nil { - - if swag.IsZero(m.WindowsScript) { // not required - return nil - } - - if err := m.WindowsScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonPrePostCloudScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonPrePostCloudScriptParams) UnmarshalBinary(b []byte) error { - var res CommonPrePostCloudScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_pre_post_script_params.go b/v2/models/common_pre_post_script_params.go deleted file mode 100644 index 7373973a..00000000 --- a/v2/models/common_pre_post_script_params.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" - "github.com/go-openapi/validate" -) - -// CommonPrePostScriptParams Common PrePost Script Params -// -// Specifies the path to the remote script and any common parameters expected by the remote script. -// -// swagger:model CommonPrePostScriptParams -type CommonPrePostScriptParams struct { - - // Specifies the absolute path to the script on the remote host. - // Required: true - Path *string `json:"path"` - - // Specifies the arguments or parameters and values to pass into the remote script. For example if the script expects values for the 'database' and 'user' parameters, specify the parameters and values using the following string: "database=myDatabase user=me". - Params *string `json:"params,omitempty"` - - // Specifies the timeout of the script in seconds. The script will be killed if it exceeds this value. By default, no timeout will occur if left empty. - // Minimum: 1 - TimeoutSecs *int32 `json:"timeoutSecs,omitempty"` - - // Specifies whether the script should be enabled, default value set to true. - IsActive *bool `json:"isActive,omitempty"` -} - -// Validate validates this common pre post script params -func (m *CommonPrePostScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeoutSecs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonPrePostScriptParams) validatePath(formats strfmt.Registry) error { - - if err := validate.Required("path", "body", m.Path); err != nil { - return err - } - - return nil -} - -func (m *CommonPrePostScriptParams) validateTimeoutSecs(formats strfmt.Registry) error { - if swag.IsZero(m.TimeoutSecs) { // not required - return nil - } - - if err := validate.MinimumInt("timeoutSecs", "body", int64(*m.TimeoutSecs), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common pre post script params based on context it is used -func (m *CommonPrePostScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonPrePostScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonPrePostScriptParams) UnmarshalBinary(b []byte) error { - var res CommonPrePostScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_protection_group_request_params.go b/v2/models/common_protection_group_request_params.go deleted file mode 100644 index dfe5d0a6..00000000 --- a/v2/models/common_protection_group_request_params.go +++ /dev/null @@ -1,644 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonProtectionGroupRequestParams Specifies the parameters which are common between all Protection Group requests. -// -// swagger:model CommonProtectionGroupRequestParams -type CommonProtectionGroupRequestParams struct { - - // Specifies the name of the Protection Group. - // Required: true - Name *string `json:"name"` - - // Specifies the unique id of the Protection Policy associated with the Protection Group. The Policy provides retry settings Protection Schedules, Priority, SLA, etc. - // Required: true - PolicyID *string `json:"policyId"` - - // Specifies the priority of the Protection Group. - // Enum: ["kLow","kMedium","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies the Storage Domain (View Box) ID where this Protection Group writes data. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies a description of the Protection Group. - Description *string `json:"description,omitempty"` - - // Specifies the start time for this Protection Group. If no start time is specified, the start time will default to 2am. This field is only used if the policy has a daily or monthly schedule. - StartTime *TimeOfDay `json:"startTime,omitempty"` - - // Specifies the end time in micro seconds for this Protection Group. If this is not specified, the Protection Group won't be ended. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the last time this protection group was updated. If this is passed into a PUT request, then the backend will validate that the timestamp passed in matches the time that the protection group was actually last modified. If the two timestamps do not match, then the request will be rejected with a stale error. - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - // Specifies the alerting policy for this Protection Group. - AlertPolicy *ProtectionGroupAlertingPolicy `json:"alertPolicy,omitempty"` - - // Specifies the SLA parameters for this Protection Group. - SLA []*SLARule `json:"sla"` - - // Specifies whether the Protection Group will be written to HDD or SSD. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosPolicy *string `json:"qosPolicy,omitempty"` - - // Specifies whether currently executing jobs should abort if a blackout period specified by a policy starts. Available only if the selected policy has at least one blackout period. Default value is false. This field should not be set to true if 'pauseInBlackouts' is set to true. - AbortInBlackouts *bool `json:"abortInBlackouts,omitempty"` - - // Specifies whether currently executing jobs should be paused if a blackout period specified by a policy starts. Available only if the selected policy has at least one blackout period. Default value is false. This field should not be set to true if 'abortInBlackouts' is sent as true. - PauseInBlackouts *bool `json:"pauseInBlackouts,omitempty"` - - // Specifies the environment type of the Protection Group. - // Required: true - // 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"` - - // Specifies if the the Protection Group is paused. New runs are not scheduled for the paused Protection Groups. Active run if any is not impacted. - IsPaused *bool `json:"isPaused,omitempty"` - - // Specifies the advanced configuration for a protection job. - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` -} - -// Validate validates this common protection group request params -func (m *CommonProtectionGroupRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSLA(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdvancedConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) validatePolicyID(formats strfmt.Registry) error { - - if err := validate.Required("policyId", "body", m.PolicyID); err != nil { - return err - } - - return nil -} - -var commonProtectionGroupRequestParamsTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonProtectionGroupRequestParamsTypePriorityPropEnum = append(commonProtectionGroupRequestParamsTypePriorityPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupRequestParamsPriorityKLow captures enum value "kLow" - CommonProtectionGroupRequestParamsPriorityKLow string = "kLow" - - // CommonProtectionGroupRequestParamsPriorityKMedium captures enum value "kMedium" - CommonProtectionGroupRequestParamsPriorityKMedium string = "kMedium" - - // CommonProtectionGroupRequestParamsPriorityKHigh captures enum value "kHigh" - CommonProtectionGroupRequestParamsPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *CommonProtectionGroupRequestParams) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupRequestParamsTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupRequestParams) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *CommonProtectionGroupRequestParams) validateAlertPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if m.AlertPolicy != nil { - if err := m.AlertPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateSLA(formats strfmt.Registry) error { - if swag.IsZero(m.SLA) { // not required - return nil - } - - for i := 0; i < len(m.SLA); i++ { - if swag.IsZero(m.SLA[i]) { // not required - continue - } - - if m.SLA[i] != nil { - if err := m.SLA[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var commonProtectionGroupRequestParamsTypeQosPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonProtectionGroupRequestParamsTypeQosPolicyPropEnum = append(commonProtectionGroupRequestParamsTypeQosPolicyPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupRequestParamsQosPolicyKBackupHDD captures enum value "kBackupHDD" - CommonProtectionGroupRequestParamsQosPolicyKBackupHDD string = "kBackupHDD" - - // CommonProtectionGroupRequestParamsQosPolicyKBackupSSD captures enum value "kBackupSSD" - CommonProtectionGroupRequestParamsQosPolicyKBackupSSD string = "kBackupSSD" - - // CommonProtectionGroupRequestParamsQosPolicyKTestAndDevHigh captures enum value "kTestAndDevHigh" - CommonProtectionGroupRequestParamsQosPolicyKTestAndDevHigh string = "kTestAndDevHigh" - - // CommonProtectionGroupRequestParamsQosPolicyKBackupAll captures enum value "kBackupAll" - CommonProtectionGroupRequestParamsQosPolicyKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *CommonProtectionGroupRequestParams) validateQosPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupRequestParamsTypeQosPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateQosPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - // value enum - if err := m.validateQosPolicyEnum("qosPolicy", "body", *m.QosPolicy); err != nil { - return err - } - - return nil -} - -var commonProtectionGroupRequestParamsTypeEnvironmentPropEnum []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 { - commonProtectionGroupRequestParamsTypeEnvironmentPropEnum = append(commonProtectionGroupRequestParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupRequestParamsEnvironmentKVMware captures enum value "kVMware" - CommonProtectionGroupRequestParamsEnvironmentKVMware string = "kVMware" - - // CommonProtectionGroupRequestParamsEnvironmentKHyperV captures enum value "kHyperV" - CommonProtectionGroupRequestParamsEnvironmentKHyperV string = "kHyperV" - - // CommonProtectionGroupRequestParamsEnvironmentKVCD captures enum value "kVCD" - CommonProtectionGroupRequestParamsEnvironmentKVCD string = "kVCD" - - // CommonProtectionGroupRequestParamsEnvironmentKAzure captures enum value "kAzure" - CommonProtectionGroupRequestParamsEnvironmentKAzure string = "kAzure" - - // CommonProtectionGroupRequestParamsEnvironmentKGCP captures enum value "kGCP" - CommonProtectionGroupRequestParamsEnvironmentKGCP string = "kGCP" - - // CommonProtectionGroupRequestParamsEnvironmentKKVM captures enum value "kKVM" - CommonProtectionGroupRequestParamsEnvironmentKKVM string = "kKVM" - - // CommonProtectionGroupRequestParamsEnvironmentKAcropolis captures enum value "kAcropolis" - CommonProtectionGroupRequestParamsEnvironmentKAcropolis string = "kAcropolis" - - // CommonProtectionGroupRequestParamsEnvironmentKAWS captures enum value "kAWS" - CommonProtectionGroupRequestParamsEnvironmentKAWS string = "kAWS" - - // CommonProtectionGroupRequestParamsEnvironmentKAWSNative captures enum value "kAWSNative" - CommonProtectionGroupRequestParamsEnvironmentKAWSNative string = "kAWSNative" - - // CommonProtectionGroupRequestParamsEnvironmentKAwsS3 captures enum value "kAwsS3" - CommonProtectionGroupRequestParamsEnvironmentKAwsS3 string = "kAwsS3" - - // CommonProtectionGroupRequestParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - CommonProtectionGroupRequestParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // CommonProtectionGroupRequestParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - CommonProtectionGroupRequestParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // CommonProtectionGroupRequestParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - CommonProtectionGroupRequestParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // CommonProtectionGroupRequestParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - CommonProtectionGroupRequestParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // CommonProtectionGroupRequestParamsEnvironmentKAzureNative captures enum value "kAzureNative" - CommonProtectionGroupRequestParamsEnvironmentKAzureNative string = "kAzureNative" - - // CommonProtectionGroupRequestParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" - CommonProtectionGroupRequestParamsEnvironmentKAzureSQL string = "kAzureSQL" - - // CommonProtectionGroupRequestParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - CommonProtectionGroupRequestParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // CommonProtectionGroupRequestParamsEnvironmentKPhysical captures enum value "kPhysical" - CommonProtectionGroupRequestParamsEnvironmentKPhysical string = "kPhysical" - - // CommonProtectionGroupRequestParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - CommonProtectionGroupRequestParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // CommonProtectionGroupRequestParamsEnvironmentKGPFS captures enum value "kGPFS" - CommonProtectionGroupRequestParamsEnvironmentKGPFS string = "kGPFS" - - // CommonProtectionGroupRequestParamsEnvironmentKElastifile captures enum value "kElastifile" - CommonProtectionGroupRequestParamsEnvironmentKElastifile string = "kElastifile" - - // CommonProtectionGroupRequestParamsEnvironmentKNetapp captures enum value "kNetapp" - CommonProtectionGroupRequestParamsEnvironmentKNetapp string = "kNetapp" - - // CommonProtectionGroupRequestParamsEnvironmentKGenericNas captures enum value "kGenericNas" - CommonProtectionGroupRequestParamsEnvironmentKGenericNas string = "kGenericNas" - - // CommonProtectionGroupRequestParamsEnvironmentKIsilon captures enum value "kIsilon" - CommonProtectionGroupRequestParamsEnvironmentKIsilon string = "kIsilon" - - // CommonProtectionGroupRequestParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonProtectionGroupRequestParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonProtectionGroupRequestParamsEnvironmentKPure captures enum value "kPure" - CommonProtectionGroupRequestParamsEnvironmentKPure string = "kPure" - - // CommonProtectionGroupRequestParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonProtectionGroupRequestParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonProtectionGroupRequestParamsEnvironmentKSQL captures enum value "kSQL" - CommonProtectionGroupRequestParamsEnvironmentKSQL string = "kSQL" - - // CommonProtectionGroupRequestParamsEnvironmentKExchange captures enum value "kExchange" - CommonProtectionGroupRequestParamsEnvironmentKExchange string = "kExchange" - - // CommonProtectionGroupRequestParamsEnvironmentKAD captures enum value "kAD" - CommonProtectionGroupRequestParamsEnvironmentKAD string = "kAD" - - // CommonProtectionGroupRequestParamsEnvironmentKOracle captures enum value "kOracle" - CommonProtectionGroupRequestParamsEnvironmentKOracle string = "kOracle" - - // CommonProtectionGroupRequestParamsEnvironmentKView captures enum value "kView" - CommonProtectionGroupRequestParamsEnvironmentKView string = "kView" - - // CommonProtectionGroupRequestParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - CommonProtectionGroupRequestParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // CommonProtectionGroupRequestParamsEnvironmentKO365 captures enum value "kO365" - CommonProtectionGroupRequestParamsEnvironmentKO365 string = "kO365" - - // CommonProtectionGroupRequestParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - CommonProtectionGroupRequestParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // CommonProtectionGroupRequestParamsEnvironmentKO365Teams captures enum value "kO365Teams" - CommonProtectionGroupRequestParamsEnvironmentKO365Teams string = "kO365Teams" - - // CommonProtectionGroupRequestParamsEnvironmentKO365Group captures enum value "kO365Group" - CommonProtectionGroupRequestParamsEnvironmentKO365Group string = "kO365Group" - - // CommonProtectionGroupRequestParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" - CommonProtectionGroupRequestParamsEnvironmentKO365Exchange string = "kO365Exchange" - - // CommonProtectionGroupRequestParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - CommonProtectionGroupRequestParamsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // CommonProtectionGroupRequestParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - CommonProtectionGroupRequestParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // CommonProtectionGroupRequestParamsEnvironmentKKubernetes captures enum value "kKubernetes" - CommonProtectionGroupRequestParamsEnvironmentKKubernetes string = "kKubernetes" - - // CommonProtectionGroupRequestParamsEnvironmentKCassandra captures enum value "kCassandra" - CommonProtectionGroupRequestParamsEnvironmentKCassandra string = "kCassandra" - - // CommonProtectionGroupRequestParamsEnvironmentKMongoDB captures enum value "kMongoDB" - CommonProtectionGroupRequestParamsEnvironmentKMongoDB string = "kMongoDB" - - // CommonProtectionGroupRequestParamsEnvironmentKCouchbase captures enum value "kCouchbase" - CommonProtectionGroupRequestParamsEnvironmentKCouchbase string = "kCouchbase" - - // CommonProtectionGroupRequestParamsEnvironmentKHdfs captures enum value "kHdfs" - CommonProtectionGroupRequestParamsEnvironmentKHdfs string = "kHdfs" - - // CommonProtectionGroupRequestParamsEnvironmentKHive captures enum value "kHive" - CommonProtectionGroupRequestParamsEnvironmentKHive string = "kHive" - - // CommonProtectionGroupRequestParamsEnvironmentKHBase captures enum value "kHBase" - CommonProtectionGroupRequestParamsEnvironmentKHBase string = "kHBase" - - // CommonProtectionGroupRequestParamsEnvironmentKUDA captures enum value "kUDA" - CommonProtectionGroupRequestParamsEnvironmentKUDA string = "kUDA" - - // CommonProtectionGroupRequestParamsEnvironmentKSfdc captures enum value "kSfdc" - CommonProtectionGroupRequestParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonProtectionGroupRequestParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupRequestParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) validateAdvancedConfigs(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedConfigs) { // not required - return nil - } - - for i := 0; i < len(m.AdvancedConfigs); i++ { - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - continue - } - - if m.AdvancedConfigs[i] != nil { - if err := m.AdvancedConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common protection group request params based on the context it is used -func (m *CommonProtectionGroupRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAlertPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSLA(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonProtectionGroupRequestParams) 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 -} - -func (m *CommonProtectionGroupRequestParams) contextValidateAlertPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertPolicy != nil { - - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if err := m.AlertPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) contextValidateSLA(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SLA); i++ { - - if m.SLA[i] != nil { - - if swag.IsZero(m.SLA[i]) { // not required - return nil - } - - if err := m.SLA[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupRequestParams) contextValidateAdvancedConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdvancedConfigs); i++ { - - if m.AdvancedConfigs[i] != nil { - - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - return nil - } - - if err := m.AdvancedConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonProtectionGroupRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonProtectionGroupRequestParams) UnmarshalBinary(b []byte) error { - var res CommonProtectionGroupRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_protection_group_response_params.go b/v2/models/common_protection_group_response_params.go deleted file mode 100644 index 799cc3ea..00000000 --- a/v2/models/common_protection_group_response_params.go +++ /dev/null @@ -1,872 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonProtectionGroupResponseParams Specifies the parameters which are common between all Protection Group responses. -// -// swagger:model CommonProtectionGroupResponseParams -type CommonProtectionGroupResponseParams struct { - - // Specifies the ID of the Protection Group. - ID *string `json:"id,omitempty"` - - // Specifies the name of the Protection Group. - Name *string `json:"name,omitempty"` - - // Specifies the cluster ID. - ClusterID *string `json:"clusterId,omitempty"` - - // Specifies the region ID. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the unique id of the Protection Policy associated with the Protection Group. The Policy provides retry settings Protection Schedules, Priority, SLA, etc. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the priority of the Protection Group. - // Enum: ["kLow","kMedium","kHigh"] - Priority *string `json:"priority,omitempty"` - - // Specifies the Storage Domain (View Box) ID where this Protection Group writes data. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies a description of the Protection Group. - Description *string `json:"description,omitempty"` - - // Specifies the start time for this Protection Group. If no start time is specified, the start time will default to 2am. This field is only used if the policy has a daily or monthly schedule. - StartTime *TimeOfDay `json:"startTime,omitempty"` - - // Specifies the end time in micro seconds for this Protection Group. If this is not specified, the Protection Group won't be ended. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the last time this protection group was updated. If this is passed into a PUT request, then the backend will validate that the timestamp passed in matches the time that the protection group was actually last modified. If the two timestamps do not match, then the request will be rejected with a stale error. - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - // Specifies the alerting policy for this Protection Group. - AlertPolicy *ProtectionGroupAlertingPolicy `json:"alertPolicy,omitempty"` - - // Specifies the SLA parameters for this Protection Group. - SLA []*SLARule `json:"sla"` - - // Specifies whether the Protection Group will be written to HDD or SSD. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosPolicy *string `json:"qosPolicy,omitempty"` - - // Specifies whether currently executing jobs should abort if a blackout period specified by a policy starts. Available only if the selected policy has at least one blackout period. Default value is false. - AbortInBlackouts *bool `json:"abortInBlackouts,omitempty"` - - // Specifies whether currently executing jobs should be paused if a blackout period specified by a policy starts. Available only if the selected policy has at least one blackout period. Default value is false. This field should not be set to true if 'abortInBlackouts' is sent as true. - PauseInBlackouts *bool `json:"pauseInBlackouts,omitempty"` - - // Specifies if the Protection Group is active or not. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies if the Protection Group has been deleted. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // Specifies if the the Protection Group is paused. New runs are not scheduled for the paused Protection Groups. Active run if any is not impacted. - IsPaused *bool `json:"isPaused,omitempty"` - - // Specifies the environment of the Protection Group. - // 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"` - - // Specifies information about the last run for this Protection Group. - LastRun *ProtectionGroupRun `json:"lastRun,omitempty"` - - // Specifies the list of tenants that have permissions for this protection group. - Permissions []*Tenant `json:"permissions"` - - // Specifies if the the Protection Group is using a protect once type of policy. This field is helpful to identify run happen for this group. - IsProtectOnce *bool `json:"isProtectOnce,omitempty"` - - // Specifies the Information about missing entities. - MissingEntities []*MissingEntityParams `json:"missingEntities"` - - // Specifies the Information about invalid entities. An entity will be considered invalid if it is part of an active protection group but has lost compatibility for the given backup type. - InvalidEntities []*MissingEntityParams `json:"invalidEntities"` - - // Specifies the number of protected objects of the Protection Group. - NumProtectedObjects *int64 `json:"numProtectedObjects,omitempty"` - - // Specifies the advanced configuration for a protection job. - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` -} - -// Validate validates this common protection group response params -func (m *CommonProtectionGroupResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePriority(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSLA(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMissingEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInvalidEntities(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdvancedConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonProtectionGroupResponseParamsTypePriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonProtectionGroupResponseParamsTypePriorityPropEnum = append(commonProtectionGroupResponseParamsTypePriorityPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupResponseParamsPriorityKLow captures enum value "kLow" - CommonProtectionGroupResponseParamsPriorityKLow string = "kLow" - - // CommonProtectionGroupResponseParamsPriorityKMedium captures enum value "kMedium" - CommonProtectionGroupResponseParamsPriorityKMedium string = "kMedium" - - // CommonProtectionGroupResponseParamsPriorityKHigh captures enum value "kHigh" - CommonProtectionGroupResponseParamsPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *CommonProtectionGroupResponseParams) validatePriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupResponseParamsTypePriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupResponseParams) validatePriority(formats strfmt.Registry) error { - if swag.IsZero(m.Priority) { // not required - return nil - } - - // value enum - if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { - return err - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *CommonProtectionGroupResponseParams) validateAlertPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if m.AlertPolicy != nil { - if err := m.AlertPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateSLA(formats strfmt.Registry) error { - if swag.IsZero(m.SLA) { // not required - return nil - } - - for i := 0; i < len(m.SLA); i++ { - if swag.IsZero(m.SLA[i]) { // not required - continue - } - - if m.SLA[i] != nil { - if err := m.SLA[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var commonProtectionGroupResponseParamsTypeQosPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonProtectionGroupResponseParamsTypeQosPolicyPropEnum = append(commonProtectionGroupResponseParamsTypeQosPolicyPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupResponseParamsQosPolicyKBackupHDD captures enum value "kBackupHDD" - CommonProtectionGroupResponseParamsQosPolicyKBackupHDD string = "kBackupHDD" - - // CommonProtectionGroupResponseParamsQosPolicyKBackupSSD captures enum value "kBackupSSD" - CommonProtectionGroupResponseParamsQosPolicyKBackupSSD string = "kBackupSSD" - - // CommonProtectionGroupResponseParamsQosPolicyKTestAndDevHigh captures enum value "kTestAndDevHigh" - CommonProtectionGroupResponseParamsQosPolicyKTestAndDevHigh string = "kTestAndDevHigh" - - // CommonProtectionGroupResponseParamsQosPolicyKBackupAll captures enum value "kBackupAll" - CommonProtectionGroupResponseParamsQosPolicyKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *CommonProtectionGroupResponseParams) validateQosPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupResponseParamsTypeQosPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateQosPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - // value enum - if err := m.validateQosPolicyEnum("qosPolicy", "body", *m.QosPolicy); err != nil { - return err - } - - return nil -} - -var commonProtectionGroupResponseParamsTypeEnvironmentPropEnum []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 { - commonProtectionGroupResponseParamsTypeEnvironmentPropEnum = append(commonProtectionGroupResponseParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonProtectionGroupResponseParamsEnvironmentKVMware captures enum value "kVMware" - CommonProtectionGroupResponseParamsEnvironmentKVMware string = "kVMware" - - // CommonProtectionGroupResponseParamsEnvironmentKHyperV captures enum value "kHyperV" - CommonProtectionGroupResponseParamsEnvironmentKHyperV string = "kHyperV" - - // CommonProtectionGroupResponseParamsEnvironmentKVCD captures enum value "kVCD" - CommonProtectionGroupResponseParamsEnvironmentKVCD string = "kVCD" - - // CommonProtectionGroupResponseParamsEnvironmentKAzure captures enum value "kAzure" - CommonProtectionGroupResponseParamsEnvironmentKAzure string = "kAzure" - - // CommonProtectionGroupResponseParamsEnvironmentKGCP captures enum value "kGCP" - CommonProtectionGroupResponseParamsEnvironmentKGCP string = "kGCP" - - // CommonProtectionGroupResponseParamsEnvironmentKKVM captures enum value "kKVM" - CommonProtectionGroupResponseParamsEnvironmentKKVM string = "kKVM" - - // CommonProtectionGroupResponseParamsEnvironmentKAcropolis captures enum value "kAcropolis" - CommonProtectionGroupResponseParamsEnvironmentKAcropolis string = "kAcropolis" - - // CommonProtectionGroupResponseParamsEnvironmentKAWS captures enum value "kAWS" - CommonProtectionGroupResponseParamsEnvironmentKAWS string = "kAWS" - - // CommonProtectionGroupResponseParamsEnvironmentKAWSNative captures enum value "kAWSNative" - CommonProtectionGroupResponseParamsEnvironmentKAWSNative string = "kAWSNative" - - // CommonProtectionGroupResponseParamsEnvironmentKAwsS3 captures enum value "kAwsS3" - CommonProtectionGroupResponseParamsEnvironmentKAwsS3 string = "kAwsS3" - - // CommonProtectionGroupResponseParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - CommonProtectionGroupResponseParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // CommonProtectionGroupResponseParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - CommonProtectionGroupResponseParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // CommonProtectionGroupResponseParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - CommonProtectionGroupResponseParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // CommonProtectionGroupResponseParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - CommonProtectionGroupResponseParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // CommonProtectionGroupResponseParamsEnvironmentKAzureNative captures enum value "kAzureNative" - CommonProtectionGroupResponseParamsEnvironmentKAzureNative string = "kAzureNative" - - // CommonProtectionGroupResponseParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" - CommonProtectionGroupResponseParamsEnvironmentKAzureSQL string = "kAzureSQL" - - // CommonProtectionGroupResponseParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - CommonProtectionGroupResponseParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // CommonProtectionGroupResponseParamsEnvironmentKPhysical captures enum value "kPhysical" - CommonProtectionGroupResponseParamsEnvironmentKPhysical string = "kPhysical" - - // CommonProtectionGroupResponseParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - CommonProtectionGroupResponseParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // CommonProtectionGroupResponseParamsEnvironmentKGPFS captures enum value "kGPFS" - CommonProtectionGroupResponseParamsEnvironmentKGPFS string = "kGPFS" - - // CommonProtectionGroupResponseParamsEnvironmentKElastifile captures enum value "kElastifile" - CommonProtectionGroupResponseParamsEnvironmentKElastifile string = "kElastifile" - - // CommonProtectionGroupResponseParamsEnvironmentKNetapp captures enum value "kNetapp" - CommonProtectionGroupResponseParamsEnvironmentKNetapp string = "kNetapp" - - // CommonProtectionGroupResponseParamsEnvironmentKGenericNas captures enum value "kGenericNas" - CommonProtectionGroupResponseParamsEnvironmentKGenericNas string = "kGenericNas" - - // CommonProtectionGroupResponseParamsEnvironmentKIsilon captures enum value "kIsilon" - CommonProtectionGroupResponseParamsEnvironmentKIsilon string = "kIsilon" - - // CommonProtectionGroupResponseParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonProtectionGroupResponseParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonProtectionGroupResponseParamsEnvironmentKPure captures enum value "kPure" - CommonProtectionGroupResponseParamsEnvironmentKPure string = "kPure" - - // CommonProtectionGroupResponseParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonProtectionGroupResponseParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonProtectionGroupResponseParamsEnvironmentKSQL captures enum value "kSQL" - CommonProtectionGroupResponseParamsEnvironmentKSQL string = "kSQL" - - // CommonProtectionGroupResponseParamsEnvironmentKExchange captures enum value "kExchange" - CommonProtectionGroupResponseParamsEnvironmentKExchange string = "kExchange" - - // CommonProtectionGroupResponseParamsEnvironmentKAD captures enum value "kAD" - CommonProtectionGroupResponseParamsEnvironmentKAD string = "kAD" - - // CommonProtectionGroupResponseParamsEnvironmentKOracle captures enum value "kOracle" - CommonProtectionGroupResponseParamsEnvironmentKOracle string = "kOracle" - - // CommonProtectionGroupResponseParamsEnvironmentKView captures enum value "kView" - CommonProtectionGroupResponseParamsEnvironmentKView string = "kView" - - // CommonProtectionGroupResponseParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - CommonProtectionGroupResponseParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // CommonProtectionGroupResponseParamsEnvironmentKO365 captures enum value "kO365" - CommonProtectionGroupResponseParamsEnvironmentKO365 string = "kO365" - - // CommonProtectionGroupResponseParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - CommonProtectionGroupResponseParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // CommonProtectionGroupResponseParamsEnvironmentKO365Teams captures enum value "kO365Teams" - CommonProtectionGroupResponseParamsEnvironmentKO365Teams string = "kO365Teams" - - // CommonProtectionGroupResponseParamsEnvironmentKO365Group captures enum value "kO365Group" - CommonProtectionGroupResponseParamsEnvironmentKO365Group string = "kO365Group" - - // CommonProtectionGroupResponseParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" - CommonProtectionGroupResponseParamsEnvironmentKO365Exchange string = "kO365Exchange" - - // CommonProtectionGroupResponseParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - CommonProtectionGroupResponseParamsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // CommonProtectionGroupResponseParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - CommonProtectionGroupResponseParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // CommonProtectionGroupResponseParamsEnvironmentKKubernetes captures enum value "kKubernetes" - CommonProtectionGroupResponseParamsEnvironmentKKubernetes string = "kKubernetes" - - // CommonProtectionGroupResponseParamsEnvironmentKCassandra captures enum value "kCassandra" - CommonProtectionGroupResponseParamsEnvironmentKCassandra string = "kCassandra" - - // CommonProtectionGroupResponseParamsEnvironmentKMongoDB captures enum value "kMongoDB" - CommonProtectionGroupResponseParamsEnvironmentKMongoDB string = "kMongoDB" - - // CommonProtectionGroupResponseParamsEnvironmentKCouchbase captures enum value "kCouchbase" - CommonProtectionGroupResponseParamsEnvironmentKCouchbase string = "kCouchbase" - - // CommonProtectionGroupResponseParamsEnvironmentKHdfs captures enum value "kHdfs" - CommonProtectionGroupResponseParamsEnvironmentKHdfs string = "kHdfs" - - // CommonProtectionGroupResponseParamsEnvironmentKHive captures enum value "kHive" - CommonProtectionGroupResponseParamsEnvironmentKHive string = "kHive" - - // CommonProtectionGroupResponseParamsEnvironmentKHBase captures enum value "kHBase" - CommonProtectionGroupResponseParamsEnvironmentKHBase string = "kHBase" - - // CommonProtectionGroupResponseParamsEnvironmentKUDA captures enum value "kUDA" - CommonProtectionGroupResponseParamsEnvironmentKUDA string = "kUDA" - - // CommonProtectionGroupResponseParamsEnvironmentKSfdc captures enum value "kSfdc" - CommonProtectionGroupResponseParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonProtectionGroupResponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonProtectionGroupResponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonProtectionGroupResponseParams) 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 -} - -func (m *CommonProtectionGroupResponseParams) validateLastRun(formats strfmt.Registry) error { - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateMissingEntities(formats strfmt.Registry) error { - if swag.IsZero(m.MissingEntities) { // not required - return nil - } - - for i := 0; i < len(m.MissingEntities); i++ { - if swag.IsZero(m.MissingEntities[i]) { // not required - continue - } - - if m.MissingEntities[i] != nil { - if err := m.MissingEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateInvalidEntities(formats strfmt.Registry) error { - if swag.IsZero(m.InvalidEntities) { // not required - return nil - } - - for i := 0; i < len(m.InvalidEntities); i++ { - if swag.IsZero(m.InvalidEntities[i]) { // not required - continue - } - - if m.InvalidEntities[i] != nil { - if err := m.InvalidEntities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("invalidEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("invalidEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) validateAdvancedConfigs(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedConfigs) { // not required - return nil - } - - for i := 0; i < len(m.AdvancedConfigs); i++ { - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - continue - } - - if m.AdvancedConfigs[i] != nil { - if err := m.AdvancedConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common protection group response params based on the context it is used -func (m *CommonProtectionGroupResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAlertPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSLA(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMissingEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInvalidEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonProtectionGroupResponseParams) 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 -} - -func (m *CommonProtectionGroupResponseParams) contextValidateAlertPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AlertPolicy != nil { - - if swag.IsZero(m.AlertPolicy) { // not required - return nil - } - - if err := m.AlertPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidateSLA(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SLA); i++ { - - if m.SLA[i] != nil { - - if swag.IsZero(m.SLA[i]) { // not required - return nil - } - - if err := m.SLA[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sla" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sla" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidateMissingEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MissingEntities); i++ { - - if m.MissingEntities[i] != nil { - - if swag.IsZero(m.MissingEntities[i]) { // not required - return nil - } - - if err := m.MissingEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("missingEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidateInvalidEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InvalidEntities); i++ { - - if m.InvalidEntities[i] != nil { - - if swag.IsZero(m.InvalidEntities[i]) { // not required - return nil - } - - if err := m.InvalidEntities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("invalidEntities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("invalidEntities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupResponseParams) contextValidateAdvancedConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdvancedConfigs); i++ { - - if m.AdvancedConfigs[i] != nil { - - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - return nil - } - - if err := m.AdvancedConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonProtectionGroupResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonProtectionGroupResponseParams) UnmarshalBinary(b []byte) error { - var res CommonProtectionGroupResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_protection_group_run_response_parameters.go b/v2/models/common_protection_group_run_response_parameters.go deleted file mode 100644 index 980c9907..00000000 --- a/v2/models/common_protection_group_run_response_parameters.go +++ /dev/null @@ -1,527 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonProtectionGroupRunResponseParameters Common Protection Group run response parameters. -// -// Specifies the parameters which are common between Protection Group runs of all Protection Groups. -// -// swagger:model CommonProtectionGroupRunResponseParameters -type CommonProtectionGroupRunResponseParameters struct { - - // Specifies the ID of the Protection Group run. - ID *string `json:"id,omitempty"` - - // Protection Group instance Id. This field will be removed later. - ProtectionGroupInstanceID *int64 `json:"protectionGroupInstanceId,omitempty"` - - // ProtectionGroupId to which this run belongs. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies if this protection run is a replication run. - IsReplicationRun *bool `json:"isReplicationRun,omitempty"` - - // Specifies the information of the primary cluster if this run is a replication run. - OriginClusterIdentifier *ClusterIdentifier `json:"originClusterIdentifier,omitempty"` - - // ProtectionGroupId to which this run belongs on the primary cluster if this run is a replication run. - OriginProtectionGroupID *string `json:"originProtectionGroupId,omitempty"` - - // Name of the Protection Group to which this run belongs. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies if snapshots for this run has been deleted. - IsLocalSnapshotsDeleted *bool `json:"isLocalSnapshotsDeleted,omitempty"` - - // Snapahot, replication, archival results for each object. - Objects []*ObjectRunResult `json:"objects"` - - // Summary information about local snapshot run across all objects. - LocalBackupInfo *BackupRunSummary `json:"localBackupInfo,omitempty"` - - // Summary information about snapshot run on the original cluster. This only applies to replication run. - OriginalBackupInfo *BackupRunSummary `json:"originalBackupInfo,omitempty"` - - // Summary information about replication run across all objects. - ReplicationInfo *ReplicationRunSummary `json:"replicationInfo,omitempty"` - - // Summary information about archival run. - ArchivalInfo *ArchivalRunSummary `json:"archivalInfo,omitempty"` - - // Summary information about cloud spin run. - CloudSpinInfo *CloudSpinRunSummary `json:"cloudSpinInfo,omitempty"` - - // Specifies if the Protection Run is on legal hold. - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - // Specifies the list of tenants that have permissions for this protection group run. - Permissions []*Tenant `json:"permissions"` - - // Specifies whether the run is a CAD run if cloud archive direct feature is enabled. If this field is true, the primary backup copy will only be available at the given archived location. - IsCloudArchivalDirect *bool `json:"isCloudArchivalDirect,omitempty"` - - // Specifies whether the run has a local snapshot. For cloud retrieved runs there may not be local snapshots. - HasLocalSnapshot *bool `json:"hasLocalSnapshot,omitempty"` - - // Specifies the environment of the Protection Group. - Environment *string `json:"environment,omitempty"` - - // The tag of externally triggered backup job. - ExternallyTriggeredBackupTag *string `json:"externallyTriggeredBackupTag,omitempty"` -} - -// Validate validates this common protection group run response parameters -func (m *CommonProtectionGroupRunResponseParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOriginClusterIdentifier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalBackupInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalBackupInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateOriginClusterIdentifier(formats strfmt.Registry) error { - if swag.IsZero(m.OriginClusterIdentifier) { // not required - return nil - } - - if m.OriginClusterIdentifier != nil { - if err := m.OriginClusterIdentifier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originClusterIdentifier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originClusterIdentifier") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateLocalBackupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalBackupInfo) { // not required - return nil - } - - if m.LocalBackupInfo != nil { - if err := m.LocalBackupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localBackupInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateOriginalBackupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if m.OriginalBackupInfo != nil { - if err := m.OriginalBackupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateReplicationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if m.ReplicationInfo != nil { - if err := m.ReplicationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateArchivalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if m.ArchivalInfo != nil { - if err := m.ArchivalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validateCloudSpinInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if m.CloudSpinInfo != nil { - if err := m.CloudSpinInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common protection group run response parameters based on the context it is used -func (m *CommonProtectionGroupRunResponseParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOriginClusterIdentifier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalBackupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalBackupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudSpinInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateOriginClusterIdentifier(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginClusterIdentifier != nil { - - if swag.IsZero(m.OriginClusterIdentifier) { // not required - return nil - } - - if err := m.OriginClusterIdentifier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originClusterIdentifier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originClusterIdentifier") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateLocalBackupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalBackupInfo != nil { - - if swag.IsZero(m.LocalBackupInfo) { // not required - return nil - } - - if err := m.LocalBackupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localBackupInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateOriginalBackupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalBackupInfo != nil { - - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if err := m.OriginalBackupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateReplicationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationInfo != nil { - - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if err := m.ReplicationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateArchivalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalInfo != nil { - - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if err := m.ArchivalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidateCloudSpinInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudSpinInfo != nil { - - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if err := m.CloudSpinInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -func (m *CommonProtectionGroupRunResponseParameters) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonProtectionGroupRunResponseParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonProtectionGroupRunResponseParameters) UnmarshalBinary(b []byte) error { - var res CommonProtectionGroupRunResponseParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recover_file_and_folder_info.go b/v2/models/common_recover_file_and_folder_info.go deleted file mode 100644 index 5166c8b5..00000000 --- a/v2/models/common_recover_file_and_folder_info.go +++ /dev/null @@ -1,192 +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" -) - -// CommonRecoverFileAndFolderInfo Common File And Folder Info -// -// Specifies the information about the specific file or folder to recover. -// -// swagger:model CommonRecoverFileAndFolderInfo -type CommonRecoverFileAndFolderInfo struct { - - // Specifies the absolute path to the file or folder. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the destination directory where the file/directory was copied. - // Read Only: true - DestinationDir *string `json:"destinationDir,omitempty"` - - // Specifies whether this is a directory or not. - IsDirectory *bool `json:"isDirectory,omitempty"` - - // Specifies the recovery status for this file or folder. - // Read Only: true - // Enum: ["NotStarted","EstimationInProgress","EstimationDone","CopyInProgress","Finished"] - Status *string `json:"status,omitempty"` - - // Specify error messages about the file during recovery. - // Read Only: true - Messages []string `json:"messages"` - - // Specify if the recovery is of type view file/folder. - IsViewFileRecovery *bool `json:"isViewFileRecovery,omitempty"` -} - -// Validate validates this common recover file and folder info -func (m *CommonRecoverFileAndFolderInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverFileAndFolderInfo) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -var commonRecoverFileAndFolderInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotStarted","EstimationInProgress","EstimationDone","CopyInProgress","Finished"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoverFileAndFolderInfoTypeStatusPropEnum = append(commonRecoverFileAndFolderInfoTypeStatusPropEnum, v) - } -} - -const ( - - // CommonRecoverFileAndFolderInfoStatusNotStarted captures enum value "NotStarted" - CommonRecoverFileAndFolderInfoStatusNotStarted string = "NotStarted" - - // CommonRecoverFileAndFolderInfoStatusEstimationInProgress captures enum value "EstimationInProgress" - CommonRecoverFileAndFolderInfoStatusEstimationInProgress string = "EstimationInProgress" - - // CommonRecoverFileAndFolderInfoStatusEstimationDone captures enum value "EstimationDone" - CommonRecoverFileAndFolderInfoStatusEstimationDone string = "EstimationDone" - - // CommonRecoverFileAndFolderInfoStatusCopyInProgress captures enum value "CopyInProgress" - CommonRecoverFileAndFolderInfoStatusCopyInProgress string = "CopyInProgress" - - // CommonRecoverFileAndFolderInfoStatusFinished captures enum value "Finished" - CommonRecoverFileAndFolderInfoStatusFinished string = "Finished" -) - -// prop value enum -func (m *CommonRecoverFileAndFolderInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoverFileAndFolderInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoverFileAndFolderInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common recover file and folder info based on the context it is used -func (m *CommonRecoverFileAndFolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestinationDir(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMessages(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverFileAndFolderInfo) contextValidateDestinationDir(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "destinationDir", "body", m.DestinationDir); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverFileAndFolderInfo) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverFileAndFolderInfo) contextValidateMessages(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "messages", "body", []string(m.Messages)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoverFileAndFolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoverFileAndFolderInfo) UnmarshalBinary(b []byte) error { - var res CommonRecoverFileAndFolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recover_object_snapshot_params.go b/v2/models/common_recover_object_snapshot_params.go deleted file mode 100644 index 82a0e33f..00000000 --- a/v2/models/common_recover_object_snapshot_params.go +++ /dev/null @@ -1,478 +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" -) - -// CommonRecoverObjectSnapshotParams Common Recover Object Snapshot Params. -// -// Specifies the common snapshot parameters for a protected object. -// -// swagger:model CommonRecoverObjectSnapshotParams -type CommonRecoverObjectSnapshotParams struct { - - // Specifies the snapshot id. - // Required: true - SnapshotID *string `json:"snapshotId"` - - // Specifies the timestamp (in microseconds. from epoch) for recovering to a point-in-time in the past. - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - - // Specifies the protection group id of the object snapshot. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the protection group name of the object snapshot. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the time when the snapshot is created in Unix timestamp epoch in microseconds. - // Read Only: true - SnapshotCreationTimeUsecs *int64 `json:"snapshotCreationTimeUsecs,omitempty"` - - // Specifies the snapshot target type. - // Read Only: true - // Enum: ["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"] - SnapshotTargetType *string `json:"snapshotTargetType,omitempty"` - - // Specifies the ID of the Storage Domain where this snapshot is stored. - // Read Only: true - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Progress monitor task id for Recovery of VM. - // Read Only: true - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Specifies that user wants to perform standby restore if it is enabled for this object. - RecoverFromStandby *bool `json:"recoverFromStandby,omitempty"` - - // Status of the Recovery. 'Running' indicates that the Recovery is still running. 'Canceled' indicates that the Recovery has been cancelled. 'Canceling' indicates that the Recovery is in the process of being cancelled. 'Failed' indicates that the Recovery has failed. 'Succeeded' indicates that the Recovery has finished successfully. 'SucceededWithWarning' indicates that the Recovery finished successfully, but there were some warning messages. 'Skipped' indicates that the Recovery task was skipped. - // Read Only: true - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Specifies the start time of the Recovery in Unix timestamp epoch in microseconds. - // Read Only: true - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of the Recovery in Unix timestamp epoch in microseconds. This field will be populated only after Recovery is finished. - // Read Only: true - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specify error messages about the object. - // Read Only: true - Messages []string `json:"messages"` - - // Specify the total bytes restored. - // Read Only: true - BytesRestored *int64 `json:"bytesRestored,omitempty"` - - // Specifies the archival target information if the snapshot is an archival snapshot. - // Read Only: true - ArchivalTargetInfo *ArchivalTargetSummaryInfo `json:"archivalTargetInfo,omitempty"` - - // Specifies the information about the object for which the snapshot is taken. - // Read Only: true - ObjectInfo *ObjectSummary `json:"objectInfo,omitempty"` -} - -// Validate validates this common recover object snapshot params -func (m *CommonRecoverObjectSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargetInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) validateSnapshotID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotId", "body", m.SnapshotID); err != nil { - return err - } - - return nil -} - -var commonRecoverObjectSnapshotParamsTypeSnapshotTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoverObjectSnapshotParamsTypeSnapshotTargetTypePropEnum = append(commonRecoverObjectSnapshotParamsTypeSnapshotTargetTypePropEnum, v) - } -} - -const ( - - // CommonRecoverObjectSnapshotParamsSnapshotTargetTypeLocal captures enum value "Local" - CommonRecoverObjectSnapshotParamsSnapshotTargetTypeLocal string = "Local" - - // CommonRecoverObjectSnapshotParamsSnapshotTargetTypeArchival captures enum value "Archival" - CommonRecoverObjectSnapshotParamsSnapshotTargetTypeArchival string = "Archival" - - // CommonRecoverObjectSnapshotParamsSnapshotTargetTypeRpaasArchival captures enum value "RpaasArchival" - CommonRecoverObjectSnapshotParamsSnapshotTargetTypeRpaasArchival string = "RpaasArchival" - - // CommonRecoverObjectSnapshotParamsSnapshotTargetTypeStorageArraySnapshot captures enum value "StorageArraySnapshot" - CommonRecoverObjectSnapshotParamsSnapshotTargetTypeStorageArraySnapshot string = "StorageArraySnapshot" - - // CommonRecoverObjectSnapshotParamsSnapshotTargetTypeRemote captures enum value "Remote" - CommonRecoverObjectSnapshotParamsSnapshotTargetTypeRemote string = "Remote" -) - -// prop value enum -func (m *CommonRecoverObjectSnapshotParams) validateSnapshotTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoverObjectSnapshotParamsTypeSnapshotTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) validateSnapshotTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetType) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotTargetTypeEnum("snapshotTargetType", "body", *m.SnapshotTargetType); err != nil { - return err - } - - return nil -} - -var commonRecoverObjectSnapshotParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoverObjectSnapshotParamsTypeStatusPropEnum = append(commonRecoverObjectSnapshotParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonRecoverObjectSnapshotParamsStatusAccepted captures enum value "Accepted" - CommonRecoverObjectSnapshotParamsStatusAccepted string = "Accepted" - - // CommonRecoverObjectSnapshotParamsStatusRunning captures enum value "Running" - CommonRecoverObjectSnapshotParamsStatusRunning string = "Running" - - // CommonRecoverObjectSnapshotParamsStatusCanceled captures enum value "Canceled" - CommonRecoverObjectSnapshotParamsStatusCanceled string = "Canceled" - - // CommonRecoverObjectSnapshotParamsStatusCanceling captures enum value "Canceling" - CommonRecoverObjectSnapshotParamsStatusCanceling string = "Canceling" - - // CommonRecoverObjectSnapshotParamsStatusFailed captures enum value "Failed" - CommonRecoverObjectSnapshotParamsStatusFailed string = "Failed" - - // CommonRecoverObjectSnapshotParamsStatusMissed captures enum value "Missed" - CommonRecoverObjectSnapshotParamsStatusMissed string = "Missed" - - // CommonRecoverObjectSnapshotParamsStatusSucceeded captures enum value "Succeeded" - CommonRecoverObjectSnapshotParamsStatusSucceeded string = "Succeeded" - - // CommonRecoverObjectSnapshotParamsStatusSucceededWithWarning captures enum value "SucceededWithWarning" - CommonRecoverObjectSnapshotParamsStatusSucceededWithWarning string = "SucceededWithWarning" - - // CommonRecoverObjectSnapshotParamsStatusOnHold captures enum value "OnHold" - CommonRecoverObjectSnapshotParamsStatusOnHold string = "OnHold" - - // CommonRecoverObjectSnapshotParamsStatusFinalizing captures enum value "Finalizing" - CommonRecoverObjectSnapshotParamsStatusFinalizing string = "Finalizing" - - // CommonRecoverObjectSnapshotParamsStatusSkipped captures enum value "Skipped" - CommonRecoverObjectSnapshotParamsStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *CommonRecoverObjectSnapshotParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoverObjectSnapshotParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) validateArchivalTargetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargetInfo) { // not required - return nil - } - - if m.ArchivalTargetInfo != nil { - if err := m.ArchivalTargetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetInfo") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) validateObjectInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if m.ObjectInfo != nil { - if err := m.ObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common recover object snapshot params based on the context it is used -func (m *CommonRecoverObjectSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotCreationTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTargetType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageDomainID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProgressTaskID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMessages(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBytesRestored(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalTargetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateSnapshotCreationTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "snapshotCreationTimeUsecs", "body", m.SnapshotCreationTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateSnapshotTargetType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "snapshotTargetType", "body", m.SnapshotTargetType); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateStorageDomainID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateProgressTaskID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "progressTaskId", "body", m.ProgressTaskID); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateStartTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "startTimeUsecs", "body", m.StartTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateEndTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "endTimeUsecs", "body", m.EndTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateMessages(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "messages", "body", []string(m.Messages)); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateBytesRestored(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "bytesRestored", "body", m.BytesRestored); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateArchivalTargetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalTargetInfo != nil { - - if swag.IsZero(m.ArchivalTargetInfo) { // not required - return nil - } - - if err := m.ArchivalTargetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetInfo") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverObjectSnapshotParams) contextValidateObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectInfo != nil { - - if swag.IsZero(m.ObjectInfo) { // not required - return nil - } - - if err := m.ObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoverObjectSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoverObjectSnapshotParams) UnmarshalBinary(b []byte) error { - var res CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recover_oracle_app_target_params.go b/v2/models/common_recover_oracle_app_target_params.go deleted file mode 100644 index e64256ff..00000000 --- a/v2/models/common_recover_oracle_app_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// CommonRecoverOracleAppTargetParams Recover Oracle App Snapshot Params. -// -// Specifies the snapshot parameters to recover Oracle databases. -// -// swagger:model CommonRecoverOracleAppTargetParams -type CommonRecoverOracleAppTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new source or an original Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the destination Source configuration parameters where the databases will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOracleAppNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if databases are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverOracleAppOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this common recover oracle app target params -func (m *CommonRecoverOracleAppTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverOracleAppTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverOracleAppTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverOracleAppTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common recover oracle app target params based on the context it is used -func (m *CommonRecoverOracleAppTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverOracleAppTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverOracleAppTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoverOracleAppTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoverOracleAppTargetParams) UnmarshalBinary(b []byte) error { - var res CommonRecoverOracleAppTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recover_sql_app_target_params.go b/v2/models/common_recover_sql_app_target_params.go deleted file mode 100644 index a42fa68d..00000000 --- a/v2/models/common_recover_sql_app_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// CommonRecoverSQLAppTargetParams Recover Sql App Snapshot Params. -// -// Specifies the snapshot parameters to recover Sql databases. -// -// swagger:model CommonRecoverSqlAppTargetParams -type CommonRecoverSQLAppTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new sources or an original Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the destination Source configuration parameters where the databases will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverSQLAppNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if databases are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverSQLAppOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this common recover Sql app target params -func (m *CommonRecoverSQLAppTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverSQLAppTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoverSQLAppTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverSQLAppTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common recover Sql app target params based on the context it is used -func (m *CommonRecoverSQLAppTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoverSQLAppTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *CommonRecoverSQLAppTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoverSQLAppTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoverSQLAppTargetParams) UnmarshalBinary(b []byte) error { - var res CommonRecoverSQLAppTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recovery_request_params.go b/v2/models/common_recovery_request_params.go deleted file mode 100644 index 5f607ae0..00000000 --- a/v2/models/common_recovery_request_params.go +++ /dev/null @@ -1,216 +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" -) - -// CommonRecoveryRequestParams Common Recovery Request Params. -// -// Specifies the common request parameters to create a Recovery. -// -// swagger:model CommonRecoveryRequestParams -type CommonRecoveryRequestParams struct { - - // Specifies the name of the Recovery. - // Required: true - Name *string `json:"name"` - - // Specifies the type of environment of snapshots for which the Recovery has to be performed. - // Required: true - // Enum: ["kVMware","kHyperV","kAzure","kGCP","kKVM","kAcropolis","kAWS","kPhysical","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"] - SnapshotEnvironment *string `json:"snapshotEnvironment"` -} - -// Validate validates this common recovery request params -func (m *CommonRecoveryRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoveryRequestParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var commonRecoveryRequestParamsTypeSnapshotEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kAzure","kGCP","kKVM","kAcropolis","kAWS","kPhysical","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoveryRequestParamsTypeSnapshotEnvironmentPropEnum = append(commonRecoveryRequestParamsTypeSnapshotEnvironmentPropEnum, v) - } -} - -const ( - - // CommonRecoveryRequestParamsSnapshotEnvironmentKVMware captures enum value "kVMware" - CommonRecoveryRequestParamsSnapshotEnvironmentKVMware string = "kVMware" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKHyperV captures enum value "kHyperV" - CommonRecoveryRequestParamsSnapshotEnvironmentKHyperV string = "kHyperV" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKAzure captures enum value "kAzure" - CommonRecoveryRequestParamsSnapshotEnvironmentKAzure string = "kAzure" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKGCP captures enum value "kGCP" - CommonRecoveryRequestParamsSnapshotEnvironmentKGCP string = "kGCP" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKKVM captures enum value "kKVM" - CommonRecoveryRequestParamsSnapshotEnvironmentKKVM string = "kKVM" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKAcropolis captures enum value "kAcropolis" - CommonRecoveryRequestParamsSnapshotEnvironmentKAcropolis string = "kAcropolis" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKAWS captures enum value "kAWS" - CommonRecoveryRequestParamsSnapshotEnvironmentKAWS string = "kAWS" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKPhysical captures enum value "kPhysical" - CommonRecoveryRequestParamsSnapshotEnvironmentKPhysical string = "kPhysical" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKGPFS captures enum value "kGPFS" - CommonRecoveryRequestParamsSnapshotEnvironmentKGPFS string = "kGPFS" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKElastifile captures enum value "kElastifile" - CommonRecoveryRequestParamsSnapshotEnvironmentKElastifile string = "kElastifile" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKNetapp captures enum value "kNetapp" - CommonRecoveryRequestParamsSnapshotEnvironmentKNetapp string = "kNetapp" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKGenericNas captures enum value "kGenericNas" - CommonRecoveryRequestParamsSnapshotEnvironmentKGenericNas string = "kGenericNas" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKIsilon captures enum value "kIsilon" - CommonRecoveryRequestParamsSnapshotEnvironmentKIsilon string = "kIsilon" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonRecoveryRequestParamsSnapshotEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKPure captures enum value "kPure" - CommonRecoveryRequestParamsSnapshotEnvironmentKPure string = "kPure" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonRecoveryRequestParamsSnapshotEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKSQL captures enum value "kSQL" - CommonRecoveryRequestParamsSnapshotEnvironmentKSQL string = "kSQL" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKExchange captures enum value "kExchange" - CommonRecoveryRequestParamsSnapshotEnvironmentKExchange string = "kExchange" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKAD captures enum value "kAD" - CommonRecoveryRequestParamsSnapshotEnvironmentKAD string = "kAD" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKOracle captures enum value "kOracle" - CommonRecoveryRequestParamsSnapshotEnvironmentKOracle string = "kOracle" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKView captures enum value "kView" - CommonRecoveryRequestParamsSnapshotEnvironmentKView string = "kView" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - CommonRecoveryRequestParamsSnapshotEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKO365 captures enum value "kO365" - CommonRecoveryRequestParamsSnapshotEnvironmentKO365 string = "kO365" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKKubernetes captures enum value "kKubernetes" - CommonRecoveryRequestParamsSnapshotEnvironmentKKubernetes string = "kKubernetes" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKCassandra captures enum value "kCassandra" - CommonRecoveryRequestParamsSnapshotEnvironmentKCassandra string = "kCassandra" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKMongoDB captures enum value "kMongoDB" - CommonRecoveryRequestParamsSnapshotEnvironmentKMongoDB string = "kMongoDB" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKCouchbase captures enum value "kCouchbase" - CommonRecoveryRequestParamsSnapshotEnvironmentKCouchbase string = "kCouchbase" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKHdfs captures enum value "kHdfs" - CommonRecoveryRequestParamsSnapshotEnvironmentKHdfs string = "kHdfs" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKHive captures enum value "kHive" - CommonRecoveryRequestParamsSnapshotEnvironmentKHive string = "kHive" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKHBase captures enum value "kHBase" - CommonRecoveryRequestParamsSnapshotEnvironmentKHBase string = "kHBase" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKUDA captures enum value "kUDA" - CommonRecoveryRequestParamsSnapshotEnvironmentKUDA string = "kUDA" - - // CommonRecoveryRequestParamsSnapshotEnvironmentKSfdc captures enum value "kSfdc" - CommonRecoveryRequestParamsSnapshotEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonRecoveryRequestParams) validateSnapshotEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoveryRequestParamsTypeSnapshotEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoveryRequestParams) validateSnapshotEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("snapshotEnvironment", "body", m.SnapshotEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateSnapshotEnvironmentEnum("snapshotEnvironment", "body", *m.SnapshotEnvironment); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common recovery request params based on context it is used -func (m *CommonRecoveryRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoveryRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoveryRequestParams) UnmarshalBinary(b []byte) error { - var res CommonRecoveryRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_recovery_response_params.go b/v2/models/common_recovery_response_params.go deleted file mode 100644 index 9f8d9d9d..00000000 --- a/v2/models/common_recovery_response_params.go +++ /dev/null @@ -1,745 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonRecoveryResponseParams Common Recovery Response Params. -// -// # Specifies the common response parameters to create a Recovery -// -// swagger:model CommonRecoveryResponseParams -type CommonRecoveryResponseParams struct { - - // Specifies the id of the Recovery. - // Pattern: ^\d+:\d+:\d+$ - ID *string `json:"id,omitempty"` - - // Specifies the name of the Recovery. - Name *string `json:"name,omitempty"` - - // Specifies the start time of the Recovery in Unix timestamp epoch in microseconds. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of the Recovery in Unix timestamp epoch in microseconds. This field will be populated only after Recovery is finished. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Status of the Recovery. 'Running' indicates that the Recovery is still running. 'Canceled' indicates that the Recovery has been cancelled. 'Canceling' indicates that the Recovery is in the process of being cancelled. 'Failed' indicates that the Recovery has failed. 'Succeeded' indicates that the Recovery has finished successfully. 'SucceededWithWarning' indicates that the Recovery finished successfully, but there were some warning messages. 'Skipped' indicates that the Recovery task was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Progress monitor task id for Recovery. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Specifies the type of snapshot environment for which the Recovery was performed. - // Enum: ["kVMware","kHyperV","kAzure","kGCP","kKVM","kAcropolis","kAWS","kPhysical","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"] - SnapshotEnvironment string `json:"snapshotEnvironment,omitempty"` - - // Specifies the type of recover action. - // Enum: ["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverRDSPostgres","RecoverAzureSQL","RecoverApps","CloneApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverExchangeDbs","CloneAppView","RecoverSanVolumes","RecoverSanGroup","RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats","RecoverNamespaces","RecoverObjects","RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords","DownloadFilesAndFolders","CloneVMs","CloneView","CloneRefreshApp","CloneVMsToView","ConvertAndDeployVMs","DeployVMs"] - RecoveryAction string `json:"recoveryAction,omitempty"` - - // Specifies the list of tenants that have permissions for this recovery. - Permissions []*Tenant `json:"permissions"` - - // Specifies the information about the creation of the recovery. - CreationInfo *CreationInfo `json:"creationInfo,omitempty"` - - // Specifies whether it's possible to tear down the objects created by the recovery. - CanTearDown *bool `json:"canTearDown,omitempty"` - - // Specifies the status of the tear down operation. This is only set when the canTearDown is set to true. 'DestroyScheduled' indicates that the tear down is ready to schedule. 'Destroying' indicates that the tear down is still running. 'Destroyed' indicates that the tear down succeeded. 'DestroyError' indicates that the tear down failed. - // Enum: ["DestroyScheduled","Destroying","Destroyed","DestroyError"] - TearDownStatus *string `json:"tearDownStatus,omitempty"` - - // Specifies the error message about the tear down operation if it fails. - TearDownMessage *string `json:"tearDownMessage,omitempty"` - - // Specifies messages about the recovery. - Messages []string `json:"messages"` - - // Specifies whether the current recovery operation has created child recoveries. This is currently used in SQL recovery where multiple child recoveries can be tracked under a common/parent recovery. - IsParentRecovery *bool `json:"isParentRecovery,omitempty"` - - // If current recovery is child recovery triggered by another parent recovery operation, then this field willt specify the id of the parent recovery. - // Pattern: ^\d+:\d+:\d+$ - ParentRecoveryID *string `json:"parentRecoveryId,omitempty"` - - // Specifies the list of persistent state of a retrieve of an archive task. - RetrieveArchiveTasks []*RetrieveArchiveTask `json:"retrieveArchiveTasks"` - - // Specifies whether the current recovery operation is a multi-stage restore operation. This is currently used by VMware recoveres for the migration/hot-standby use case. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` -} - -// Validate validates this common recovery response params -func (m *CommonRecoveryResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTearDownStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentRecoveryID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetrieveArchiveTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoveryResponseParams) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := validate.Pattern("id", "body", *m.ID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -var commonRecoveryResponseParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoveryResponseParamsTypeStatusPropEnum = append(commonRecoveryResponseParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonRecoveryResponseParamsStatusAccepted captures enum value "Accepted" - CommonRecoveryResponseParamsStatusAccepted string = "Accepted" - - // CommonRecoveryResponseParamsStatusRunning captures enum value "Running" - CommonRecoveryResponseParamsStatusRunning string = "Running" - - // CommonRecoveryResponseParamsStatusCanceled captures enum value "Canceled" - CommonRecoveryResponseParamsStatusCanceled string = "Canceled" - - // CommonRecoveryResponseParamsStatusCanceling captures enum value "Canceling" - CommonRecoveryResponseParamsStatusCanceling string = "Canceling" - - // CommonRecoveryResponseParamsStatusFailed captures enum value "Failed" - CommonRecoveryResponseParamsStatusFailed string = "Failed" - - // CommonRecoveryResponseParamsStatusMissed captures enum value "Missed" - CommonRecoveryResponseParamsStatusMissed string = "Missed" - - // CommonRecoveryResponseParamsStatusSucceeded captures enum value "Succeeded" - CommonRecoveryResponseParamsStatusSucceeded string = "Succeeded" - - // CommonRecoveryResponseParamsStatusSucceededWithWarning captures enum value "SucceededWithWarning" - CommonRecoveryResponseParamsStatusSucceededWithWarning string = "SucceededWithWarning" - - // CommonRecoveryResponseParamsStatusOnHold captures enum value "OnHold" - CommonRecoveryResponseParamsStatusOnHold string = "OnHold" - - // CommonRecoveryResponseParamsStatusFinalizing captures enum value "Finalizing" - CommonRecoveryResponseParamsStatusFinalizing string = "Finalizing" - - // CommonRecoveryResponseParamsStatusSkipped captures enum value "Skipped" - CommonRecoveryResponseParamsStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *CommonRecoveryResponseParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoveryResponseParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoveryResponseParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var commonRecoveryResponseParamsTypeSnapshotEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kAzure","kGCP","kKVM","kAcropolis","kAWS","kPhysical","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoveryResponseParamsTypeSnapshotEnvironmentPropEnum = append(commonRecoveryResponseParamsTypeSnapshotEnvironmentPropEnum, v) - } -} - -const ( - - // CommonRecoveryResponseParamsSnapshotEnvironmentKVMware captures enum value "kVMware" - CommonRecoveryResponseParamsSnapshotEnvironmentKVMware string = "kVMware" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKHyperV captures enum value "kHyperV" - CommonRecoveryResponseParamsSnapshotEnvironmentKHyperV string = "kHyperV" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKAzure captures enum value "kAzure" - CommonRecoveryResponseParamsSnapshotEnvironmentKAzure string = "kAzure" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKGCP captures enum value "kGCP" - CommonRecoveryResponseParamsSnapshotEnvironmentKGCP string = "kGCP" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKKVM captures enum value "kKVM" - CommonRecoveryResponseParamsSnapshotEnvironmentKKVM string = "kKVM" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKAcropolis captures enum value "kAcropolis" - CommonRecoveryResponseParamsSnapshotEnvironmentKAcropolis string = "kAcropolis" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKAWS captures enum value "kAWS" - CommonRecoveryResponseParamsSnapshotEnvironmentKAWS string = "kAWS" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKPhysical captures enum value "kPhysical" - CommonRecoveryResponseParamsSnapshotEnvironmentKPhysical string = "kPhysical" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKGPFS captures enum value "kGPFS" - CommonRecoveryResponseParamsSnapshotEnvironmentKGPFS string = "kGPFS" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKElastifile captures enum value "kElastifile" - CommonRecoveryResponseParamsSnapshotEnvironmentKElastifile string = "kElastifile" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKNetapp captures enum value "kNetapp" - CommonRecoveryResponseParamsSnapshotEnvironmentKNetapp string = "kNetapp" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKGenericNas captures enum value "kGenericNas" - CommonRecoveryResponseParamsSnapshotEnvironmentKGenericNas string = "kGenericNas" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKIsilon captures enum value "kIsilon" - CommonRecoveryResponseParamsSnapshotEnvironmentKIsilon string = "kIsilon" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonRecoveryResponseParamsSnapshotEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKPure captures enum value "kPure" - CommonRecoveryResponseParamsSnapshotEnvironmentKPure string = "kPure" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonRecoveryResponseParamsSnapshotEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKSQL captures enum value "kSQL" - CommonRecoveryResponseParamsSnapshotEnvironmentKSQL string = "kSQL" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKExchange captures enum value "kExchange" - CommonRecoveryResponseParamsSnapshotEnvironmentKExchange string = "kExchange" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKAD captures enum value "kAD" - CommonRecoveryResponseParamsSnapshotEnvironmentKAD string = "kAD" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKOracle captures enum value "kOracle" - CommonRecoveryResponseParamsSnapshotEnvironmentKOracle string = "kOracle" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKView captures enum value "kView" - CommonRecoveryResponseParamsSnapshotEnvironmentKView string = "kView" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - CommonRecoveryResponseParamsSnapshotEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKO365 captures enum value "kO365" - CommonRecoveryResponseParamsSnapshotEnvironmentKO365 string = "kO365" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKKubernetes captures enum value "kKubernetes" - CommonRecoveryResponseParamsSnapshotEnvironmentKKubernetes string = "kKubernetes" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKCassandra captures enum value "kCassandra" - CommonRecoveryResponseParamsSnapshotEnvironmentKCassandra string = "kCassandra" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKMongoDB captures enum value "kMongoDB" - CommonRecoveryResponseParamsSnapshotEnvironmentKMongoDB string = "kMongoDB" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKCouchbase captures enum value "kCouchbase" - CommonRecoveryResponseParamsSnapshotEnvironmentKCouchbase string = "kCouchbase" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKHdfs captures enum value "kHdfs" - CommonRecoveryResponseParamsSnapshotEnvironmentKHdfs string = "kHdfs" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKHive captures enum value "kHive" - CommonRecoveryResponseParamsSnapshotEnvironmentKHive string = "kHive" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKHBase captures enum value "kHBase" - CommonRecoveryResponseParamsSnapshotEnvironmentKHBase string = "kHBase" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKUDA captures enum value "kUDA" - CommonRecoveryResponseParamsSnapshotEnvironmentKUDA string = "kUDA" - - // CommonRecoveryResponseParamsSnapshotEnvironmentKSfdc captures enum value "kSfdc" - CommonRecoveryResponseParamsSnapshotEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonRecoveryResponseParams) validateSnapshotEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoveryResponseParamsTypeSnapshotEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoveryResponseParams) validateSnapshotEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotEnvironmentEnum("snapshotEnvironment", "body", m.SnapshotEnvironment); err != nil { - return err - } - - return nil -} - -var commonRecoveryResponseParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverRDSPostgres","RecoverAzureSQL","RecoverApps","CloneApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverExchangeDbs","CloneAppView","RecoverSanVolumes","RecoverSanGroup","RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats","RecoverNamespaces","RecoverObjects","RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords","DownloadFilesAndFolders","CloneVMs","CloneView","CloneRefreshApp","CloneVMsToView","ConvertAndDeployVMs","DeployVMs"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoveryResponseParamsTypeRecoveryActionPropEnum = append(commonRecoveryResponseParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // CommonRecoveryResponseParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - CommonRecoveryResponseParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // CommonRecoveryResponseParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - CommonRecoveryResponseParamsRecoveryActionRecoverFiles string = "RecoverFiles" - - // CommonRecoveryResponseParamsRecoveryActionInstantVolumeMount captures enum value "InstantVolumeMount" - CommonRecoveryResponseParamsRecoveryActionInstantVolumeMount string = "InstantVolumeMount" - - // CommonRecoveryResponseParamsRecoveryActionRecoverVMDisks captures enum value "RecoverVmDisks" - CommonRecoveryResponseParamsRecoveryActionRecoverVMDisks string = "RecoverVmDisks" - - // CommonRecoveryResponseParamsRecoveryActionRecoverVApps captures enum value "RecoverVApps" - CommonRecoveryResponseParamsRecoveryActionRecoverVApps string = "RecoverVApps" - - // CommonRecoveryResponseParamsRecoveryActionRecoverVAppTemplates captures enum value "RecoverVAppTemplates" - CommonRecoveryResponseParamsRecoveryActionRecoverVAppTemplates string = "RecoverVAppTemplates" - - // CommonRecoveryResponseParamsRecoveryActionUptierSnapshot captures enum value "UptierSnapshot" - CommonRecoveryResponseParamsRecoveryActionUptierSnapshot string = "UptierSnapshot" - - // CommonRecoveryResponseParamsRecoveryActionRecoverRDS captures enum value "RecoverRDS" - CommonRecoveryResponseParamsRecoveryActionRecoverRDS string = "RecoverRDS" - - // CommonRecoveryResponseParamsRecoveryActionRecoverAurora captures enum value "RecoverAurora" - CommonRecoveryResponseParamsRecoveryActionRecoverAurora string = "RecoverAurora" - - // CommonRecoveryResponseParamsRecoveryActionRecoverS3Buckets captures enum value "RecoverS3Buckets" - CommonRecoveryResponseParamsRecoveryActionRecoverS3Buckets string = "RecoverS3Buckets" - - // CommonRecoveryResponseParamsRecoveryActionRecoverRDSPostgres captures enum value "RecoverRDSPostgres" - CommonRecoveryResponseParamsRecoveryActionRecoverRDSPostgres string = "RecoverRDSPostgres" - - // CommonRecoveryResponseParamsRecoveryActionRecoverAzureSQL captures enum value "RecoverAzureSQL" - CommonRecoveryResponseParamsRecoveryActionRecoverAzureSQL string = "RecoverAzureSQL" - - // CommonRecoveryResponseParamsRecoveryActionRecoverApps captures enum value "RecoverApps" - CommonRecoveryResponseParamsRecoveryActionRecoverApps string = "RecoverApps" - - // CommonRecoveryResponseParamsRecoveryActionCloneApps captures enum value "CloneApps" - CommonRecoveryResponseParamsRecoveryActionCloneApps string = "CloneApps" - - // CommonRecoveryResponseParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - CommonRecoveryResponseParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // CommonRecoveryResponseParamsRecoveryActionRecoverPhysicalVolumes captures enum value "RecoverPhysicalVolumes" - CommonRecoveryResponseParamsRecoveryActionRecoverPhysicalVolumes string = "RecoverPhysicalVolumes" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSystem captures enum value "RecoverSystem" - CommonRecoveryResponseParamsRecoveryActionRecoverSystem string = "RecoverSystem" - - // CommonRecoveryResponseParamsRecoveryActionRecoverExchangeDbs captures enum value "RecoverExchangeDbs" - CommonRecoveryResponseParamsRecoveryActionRecoverExchangeDbs string = "RecoverExchangeDbs" - - // CommonRecoveryResponseParamsRecoveryActionCloneAppView captures enum value "CloneAppView" - CommonRecoveryResponseParamsRecoveryActionCloneAppView string = "CloneAppView" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSanVolumes captures enum value "RecoverSanVolumes" - CommonRecoveryResponseParamsRecoveryActionRecoverSanVolumes string = "RecoverSanVolumes" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSanGroup captures enum value "RecoverSanGroup" - CommonRecoveryResponseParamsRecoveryActionRecoverSanGroup string = "RecoverSanGroup" - - // CommonRecoveryResponseParamsRecoveryActionRecoverMailbox captures enum value "RecoverMailbox" - CommonRecoveryResponseParamsRecoveryActionRecoverMailbox string = "RecoverMailbox" - - // CommonRecoveryResponseParamsRecoveryActionRecoverOneDrive captures enum value "RecoverOneDrive" - CommonRecoveryResponseParamsRecoveryActionRecoverOneDrive string = "RecoverOneDrive" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSharePoint captures enum value "RecoverSharePoint" - CommonRecoveryResponseParamsRecoveryActionRecoverSharePoint string = "RecoverSharePoint" - - // CommonRecoveryResponseParamsRecoveryActionRecoverPublicFolders captures enum value "RecoverPublicFolders" - CommonRecoveryResponseParamsRecoveryActionRecoverPublicFolders string = "RecoverPublicFolders" - - // CommonRecoveryResponseParamsRecoveryActionRecoverMsGroup captures enum value "RecoverMsGroup" - CommonRecoveryResponseParamsRecoveryActionRecoverMsGroup string = "RecoverMsGroup" - - // CommonRecoveryResponseParamsRecoveryActionRecoverMsTeam captures enum value "RecoverMsTeam" - CommonRecoveryResponseParamsRecoveryActionRecoverMsTeam string = "RecoverMsTeam" - - // CommonRecoveryResponseParamsRecoveryActionConvertToPst captures enum value "ConvertToPst" - CommonRecoveryResponseParamsRecoveryActionConvertToPst string = "ConvertToPst" - - // CommonRecoveryResponseParamsRecoveryActionDownloadChats captures enum value "DownloadChats" - CommonRecoveryResponseParamsRecoveryActionDownloadChats string = "DownloadChats" - - // CommonRecoveryResponseParamsRecoveryActionRecoverNamespaces captures enum value "RecoverNamespaces" - CommonRecoveryResponseParamsRecoveryActionRecoverNamespaces string = "RecoverNamespaces" - - // CommonRecoveryResponseParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - CommonRecoveryResponseParamsRecoveryActionRecoverObjects string = "RecoverObjects" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSfdcObjects captures enum value "RecoverSfdcObjects" - CommonRecoveryResponseParamsRecoveryActionRecoverSfdcObjects string = "RecoverSfdcObjects" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSfdcOrg captures enum value "RecoverSfdcOrg" - CommonRecoveryResponseParamsRecoveryActionRecoverSfdcOrg string = "RecoverSfdcOrg" - - // CommonRecoveryResponseParamsRecoveryActionRecoverSfdcRecords captures enum value "RecoverSfdcRecords" - CommonRecoveryResponseParamsRecoveryActionRecoverSfdcRecords string = "RecoverSfdcRecords" - - // CommonRecoveryResponseParamsRecoveryActionDownloadFilesAndFolders captures enum value "DownloadFilesAndFolders" - CommonRecoveryResponseParamsRecoveryActionDownloadFilesAndFolders string = "DownloadFilesAndFolders" - - // CommonRecoveryResponseParamsRecoveryActionCloneVMs captures enum value "CloneVMs" - CommonRecoveryResponseParamsRecoveryActionCloneVMs string = "CloneVMs" - - // CommonRecoveryResponseParamsRecoveryActionCloneView captures enum value "CloneView" - CommonRecoveryResponseParamsRecoveryActionCloneView string = "CloneView" - - // CommonRecoveryResponseParamsRecoveryActionCloneRefreshApp captures enum value "CloneRefreshApp" - CommonRecoveryResponseParamsRecoveryActionCloneRefreshApp string = "CloneRefreshApp" - - // CommonRecoveryResponseParamsRecoveryActionCloneVMsToView captures enum value "CloneVMsToView" - CommonRecoveryResponseParamsRecoveryActionCloneVMsToView string = "CloneVMsToView" - - // CommonRecoveryResponseParamsRecoveryActionConvertAndDeployVMs captures enum value "ConvertAndDeployVMs" - CommonRecoveryResponseParamsRecoveryActionConvertAndDeployVMs string = "ConvertAndDeployVMs" - - // CommonRecoveryResponseParamsRecoveryActionDeployVMs captures enum value "DeployVMs" - CommonRecoveryResponseParamsRecoveryActionDeployVMs string = "DeployVMs" -) - -// prop value enum -func (m *CommonRecoveryResponseParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoveryResponseParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoveryResponseParams) validateRecoveryAction(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryAction) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoveryResponseParams) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonRecoveryResponseParams) validateCreationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CreationInfo) { // not required - return nil - } - - if m.CreationInfo != nil { - if err := m.CreationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationInfo") - } - return err - } - } - - return nil -} - -var commonRecoveryResponseParamsTypeTearDownStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DestroyScheduled","Destroying","Destroyed","DestroyError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRecoveryResponseParamsTypeTearDownStatusPropEnum = append(commonRecoveryResponseParamsTypeTearDownStatusPropEnum, v) - } -} - -const ( - - // CommonRecoveryResponseParamsTearDownStatusDestroyScheduled captures enum value "DestroyScheduled" - CommonRecoveryResponseParamsTearDownStatusDestroyScheduled string = "DestroyScheduled" - - // CommonRecoveryResponseParamsTearDownStatusDestroying captures enum value "Destroying" - CommonRecoveryResponseParamsTearDownStatusDestroying string = "Destroying" - - // CommonRecoveryResponseParamsTearDownStatusDestroyed captures enum value "Destroyed" - CommonRecoveryResponseParamsTearDownStatusDestroyed string = "Destroyed" - - // CommonRecoveryResponseParamsTearDownStatusDestroyError captures enum value "DestroyError" - CommonRecoveryResponseParamsTearDownStatusDestroyError string = "DestroyError" -) - -// prop value enum -func (m *CommonRecoveryResponseParams) validateTearDownStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRecoveryResponseParamsTypeTearDownStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRecoveryResponseParams) validateTearDownStatus(formats strfmt.Registry) error { - if swag.IsZero(m.TearDownStatus) { // not required - return nil - } - - // value enum - if err := m.validateTearDownStatusEnum("tearDownStatus", "body", *m.TearDownStatus); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoveryResponseParams) validateParentRecoveryID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentRecoveryID) { // not required - return nil - } - - if err := validate.Pattern("parentRecoveryId", "body", *m.ParentRecoveryID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *CommonRecoveryResponseParams) validateRetrieveArchiveTasks(formats strfmt.Registry) error { - if swag.IsZero(m.RetrieveArchiveTasks) { // not required - return nil - } - - for i := 0; i < len(m.RetrieveArchiveTasks); i++ { - if swag.IsZero(m.RetrieveArchiveTasks[i]) { // not required - continue - } - - if m.RetrieveArchiveTasks[i] != nil { - if err := m.RetrieveArchiveTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common recovery response params based on the context it is used -func (m *CommonRecoveryResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetrieveArchiveTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRecoveryResponseParams) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonRecoveryResponseParams) contextValidateCreationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CreationInfo != nil { - - if swag.IsZero(m.CreationInfo) { // not required - return nil - } - - if err := m.CreationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationInfo") - } - return err - } - } - - return nil -} - -func (m *CommonRecoveryResponseParams) contextValidateRetrieveArchiveTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RetrieveArchiveTasks); i++ { - - if m.RetrieveArchiveTasks[i] != nil { - - if swag.IsZero(m.RetrieveArchiveTasks[i]) { // not required - return nil - } - - if err := m.RetrieveArchiveTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retrieveArchiveTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retrieveArchiveTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRecoveryResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRecoveryResponseParams) UnmarshalBinary(b []byte) error { - var res CommonRecoveryResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_remote_storage_info.go b/v2/models/common_remote_storage_info.go deleted file mode 100644 index 544e432b..00000000 --- a/v2/models/common_remote_storage_info.go +++ /dev/null @@ -1,128 +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" -) - -// CommonRemoteStorageInfo Common Remote Storage Info -// -// Specifies the details of common remote storage info. -// -// swagger:model CommonRemoteStorageInfo -type CommonRemoteStorageInfo struct { - - // Specifies unique id of the registered remote storage. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the product type of the remote storage. - // Required: true - // Enum: ["FlashBlade"] - Product *string `json:"product"` -} - -// Validate validates this common remote storage info -func (m *CommonRemoteStorageInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProduct(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonRemoteStorageInfoTypeProductPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FlashBlade"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonRemoteStorageInfoTypeProductPropEnum = append(commonRemoteStorageInfoTypeProductPropEnum, v) - } -} - -const ( - - // CommonRemoteStorageInfoProductFlashBlade captures enum value "FlashBlade" - CommonRemoteStorageInfoProductFlashBlade string = "FlashBlade" -) - -// prop value enum -func (m *CommonRemoteStorageInfo) validateProductEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonRemoteStorageInfoTypeProductPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonRemoteStorageInfo) validateProduct(formats strfmt.Registry) error { - - if err := validate.Required("product", "body", m.Product); err != nil { - return err - } - - // value enum - if err := m.validateProductEnum("product", "body", *m.Product); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common remote storage info based on the context it is used -func (m *CommonRemoteStorageInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonRemoteStorageInfo) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonRemoteStorageInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonRemoteStorageInfo) UnmarshalBinary(b []byte) error { - var res CommonRemoteStorageInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_s3_comp_external_target_params.go b/v2/models/common_s3_comp_external_target_params.go deleted file mode 100644 index d7f5236b..00000000 --- a/v2/models/common_s3_comp_external_target_params.go +++ /dev/null @@ -1,122 +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" -) - -// CommonS3CompExternalTargetParams S3 Compatible External Target Request Common Params. -// -// Specifies the common parameters which are specific to S3 Compatible related External Targets. -// -// swagger:model CommonS3CompExternalTargetParams -type CommonS3CompExternalTargetParams struct { - - // Specifies the bucket name of the external target. - // Required: true - BucketName *string `json:"bucketName"` - - // Specifies the access key id of the external target. - // Required: true - AccessKeyID *string `json:"accessKeyId"` - - // Specifies the secret access key of the external target. - SecretAccessKey *string `json:"secretAccessKey,omitempty"` - - // Specifies the endpoint of the external target. - // Required: true - EndPoint *string `json:"endPoint"` - - // Specifies the region of the external target. - Region *string `json:"region,omitempty"` - - // Specifies the secure connection(https) is enabled or not. - SecureConnection *bool `json:"secureConnection,omitempty"` - - // Specifies the aws signature version of the external target. - SignatureVersion *int32 `json:"signatureVersion,omitempty"` - - // Specifies whether the external target is AWS Snowball. - IsAwsSnowball *bool `json:"isAwsSnowball,omitempty"` -} - -// Validate validates this common s3 comp external target params -func (m *CommonS3CompExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAccessKeyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndPoint(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonS3CompExternalTargetParams) validateBucketName(formats strfmt.Registry) error { - - if err := validate.Required("bucketName", "body", m.BucketName); err != nil { - return err - } - - return nil -} - -func (m *CommonS3CompExternalTargetParams) validateAccessKeyID(formats strfmt.Registry) error { - - if err := validate.Required("accessKeyId", "body", m.AccessKeyID); err != nil { - return err - } - - return nil -} - -func (m *CommonS3CompExternalTargetParams) validateEndPoint(formats strfmt.Registry) error { - - if err := validate.Required("endPoint", "body", m.EndPoint); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common s3 comp external target params based on context it is used -func (m *CommonS3CompExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonS3CompExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonS3CompExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonS3CompExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_search_indexed_objects_request_params.go b/v2/models/common_search_indexed_objects_request_params.go deleted file mode 100644 index 3de56883..00000000 --- a/v2/models/common_search_indexed_objects_request_params.go +++ /dev/null @@ -1,312 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonSearchIndexedObjectsRequestParams Common Search Indexed Objects Params -// -// Specifies the common params to search for indexed objects. -// -// swagger:model CommonSearchIndexedObjectsRequestParams -type CommonSearchIndexedObjectsRequestParams struct { - - // Specifies a list of Protection Group ids to filter the indexed objects. If specified, the objects indexed by specified Protection Group ids will be returned. - ProtectionGroupIds []string `json:"protectionGroupIds"` - - // Specifies the Storage Domain ids to filter indexed objects for which Protection Groups are writing data to Cohesity Views on the specified Storage Domains. - StorageDomainIds []int64 `json:"storageDomainIds"` - - // TenantId contains id of the tenant for which objects are to be returned. - TenantID *string `json:"tenantId,omitempty"` - - // If true, the response will include objects which belongs to all tenants which the current user has permission to see. Default value is false. - IncludeTenants *bool `json:"includeTenants,omitempty"` - - // "This field is deprecated. Please use mightHaveTagIds." - // Unique: true - Tags []string `json:"tags"` - - // "This field is deprecated. Please use mightHaveSnapshotTagIds." - SnapshotTags []string `json:"snapshotTags"` - - // Specifies tags which must be all present in the document. - // Unique: true - MustHaveTagIds []string `json:"mustHaveTagIds"` - - // Specifies list of tags, one or more of which might be present in the - // document. These are OR'ed together and the resulting criteria AND'ed - // with the rest of the query. - // Unique: true - MightHaveTagIds []string `json:"mightHaveTagIds"` - - // Specifies snapshot tags which must be all present in the document. - // Unique: true - MustHaveSnapshotTagIds []string `json:"mustHaveSnapshotTagIds"` - - // Specifies list of snapshot tags, one or more of which might be - // present in the document. These are OR'ed together and the resulting - // criteria AND'ed with the rest of the query. - // Unique: true - MightHaveSnapshotTagIds []string `json:"mightHaveSnapshotTagIds"` - - // Specifies the pagination cookie with which subsequent parts of the response can be fetched. - PaginationCookie *string `json:"paginationCookie,omitempty"` - - // Specifies the number of indexed objects to be fetched for the specified pagination cookie. - Count *int32 `json:"count,omitempty"` - - // Specifies the object type to be searched for. - // Required: true - // Enum: ["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"] - ObjectType *string `json:"objectType"` - - // Specifies whether we can serve the GET request from the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. - UseCachedData *bool `json:"useCachedData,omitempty"` -} - -// Validate validates this common search indexed objects request params -func (m *CommonSearchIndexedObjectsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMustHaveTagIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMightHaveTagIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMustHaveSnapshotTagIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMightHaveSnapshotTagIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - if err := validate.UniqueItems("tags", "body", m.Tags); err != nil { - return err - } - - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateMustHaveTagIds(formats strfmt.Registry) error { - if swag.IsZero(m.MustHaveTagIds) { // not required - return nil - } - - if err := validate.UniqueItems("mustHaveTagIds", "body", m.MustHaveTagIds); err != nil { - return err - } - - for i := 0; i < len(m.MustHaveTagIds); i++ { - - if err := validate.Pattern("mustHaveTagIds"+"."+strconv.Itoa(i), "body", m.MustHaveTagIds[i], `^\d+:\d+:[A-Z0-9-]+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateMightHaveTagIds(formats strfmt.Registry) error { - if swag.IsZero(m.MightHaveTagIds) { // not required - return nil - } - - if err := validate.UniqueItems("mightHaveTagIds", "body", m.MightHaveTagIds); err != nil { - return err - } - - for i := 0; i < len(m.MightHaveTagIds); i++ { - - if err := validate.Pattern("mightHaveTagIds"+"."+strconv.Itoa(i), "body", m.MightHaveTagIds[i], `^\d+:\d+:[A-Z0-9-]+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateMustHaveSnapshotTagIds(formats strfmt.Registry) error { - if swag.IsZero(m.MustHaveSnapshotTagIds) { // not required - return nil - } - - if err := validate.UniqueItems("mustHaveSnapshotTagIds", "body", m.MustHaveSnapshotTagIds); err != nil { - return err - } - - for i := 0; i < len(m.MustHaveSnapshotTagIds); i++ { - - if err := validate.Pattern("mustHaveSnapshotTagIds"+"."+strconv.Itoa(i), "body", m.MustHaveSnapshotTagIds[i], `^\d+:\d+:[A-Z0-9-]+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateMightHaveSnapshotTagIds(formats strfmt.Registry) error { - if swag.IsZero(m.MightHaveSnapshotTagIds) { // not required - return nil - } - - if err := validate.UniqueItems("mightHaveSnapshotTagIds", "body", m.MightHaveSnapshotTagIds); err != nil { - return err - } - - for i := 0; i < len(m.MightHaveSnapshotTagIds); i++ { - - if err := validate.Pattern("mightHaveSnapshotTagIds"+"."+strconv.Itoa(i), "body", m.MightHaveSnapshotTagIds[i], `^\d+:\d+:[A-Z0-9-]+$`); err != nil { - return err - } - - } - - return nil -} - -var commonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum = append(commonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum, v) - } -} - -const ( - - // CommonSearchIndexedObjectsRequestParamsObjectTypeEmails captures enum value "Emails" - CommonSearchIndexedObjectsRequestParamsObjectTypeEmails string = "Emails" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeFiles captures enum value "Files" - CommonSearchIndexedObjectsRequestParamsObjectTypeFiles string = "Files" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeCassandraObjects captures enum value "CassandraObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeCassandraObjects string = "CassandraObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeCouchbaseObjects captures enum value "CouchbaseObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeCouchbaseObjects string = "CouchbaseObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeHbaseObjects captures enum value "HbaseObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeHbaseObjects string = "HbaseObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeHiveObjects captures enum value "HiveObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeHiveObjects string = "HiveObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeMongoObjects captures enum value "MongoObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeMongoObjects string = "MongoObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeHDFSObjects captures enum value "HDFSObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeHDFSObjects string = "HDFSObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeExchangeObjects captures enum value "ExchangeObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeExchangeObjects string = "ExchangeObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypePublicFolders captures enum value "PublicFolders" - CommonSearchIndexedObjectsRequestParamsObjectTypePublicFolders string = "PublicFolders" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeGroupsObjects captures enum value "GroupsObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeGroupsObjects string = "GroupsObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeTeamsObjects captures enum value "TeamsObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeTeamsObjects string = "TeamsObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeSharepointObjects captures enum value "SharepointObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeSharepointObjects string = "SharepointObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeOneDriveObjects captures enum value "OneDriveObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeOneDriveObjects string = "OneDriveObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeUdaObjects captures enum value "UdaObjects" - CommonSearchIndexedObjectsRequestParamsObjectTypeUdaObjects string = "UdaObjects" - - // CommonSearchIndexedObjectsRequestParamsObjectTypeSfdcRecords captures enum value "SfdcRecords" - CommonSearchIndexedObjectsRequestParamsObjectTypeSfdcRecords string = "SfdcRecords" -) - -// prop value enum -func (m *CommonSearchIndexedObjectsRequestParams) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSearchIndexedObjectsRequestParams) validateObjectType(formats strfmt.Registry) error { - - if err := validate.Required("objectType", "body", m.ObjectType); err != nil { - return err - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", *m.ObjectType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common search indexed objects request params based on context it is used -func (m *CommonSearchIndexedObjectsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSearchIndexedObjectsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSearchIndexedObjectsRequestParams) UnmarshalBinary(b []byte) error { - var res CommonSearchIndexedObjectsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_search_indexed_objects_response_params.go b/v2/models/common_search_indexed_objects_response_params.go deleted file mode 100644 index 2834f82f..00000000 --- a/v2/models/common_search_indexed_objects_response_params.go +++ /dev/null @@ -1,155 +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" -) - -// CommonSearchIndexedObjectsResponseParams Common Search Indexed Objects Response Params. -// -// Specifies the common search indexed objects response params. -// -// swagger:model CommonSearchIndexedObjectsResponseParams -type CommonSearchIndexedObjectsResponseParams struct { - - // Specifies the object type. - // Enum: ["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"] - ObjectType string `json:"objectType,omitempty"` - - // Specifies the total number of indexed objects that match the filter and search criteria. Use this value to determine how many additional requests are required to get the full result. - Count *int32 `json:"count,omitempty"` - - // Specifies cookie for resuming search if pagination is being used. - PaginationCookie *string `json:"paginationCookie,omitempty"` -} - -// Validate validates this common search indexed objects response params -func (m *CommonSearchIndexedObjectsResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum = append(commonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum, v) - } -} - -const ( - - // CommonSearchIndexedObjectsResponseParamsObjectTypeEmails captures enum value "Emails" - CommonSearchIndexedObjectsResponseParamsObjectTypeEmails string = "Emails" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeFiles captures enum value "Files" - CommonSearchIndexedObjectsResponseParamsObjectTypeFiles string = "Files" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeCassandraObjects captures enum value "CassandraObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeCassandraObjects string = "CassandraObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeCouchbaseObjects captures enum value "CouchbaseObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeCouchbaseObjects string = "CouchbaseObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeHbaseObjects captures enum value "HbaseObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeHbaseObjects string = "HbaseObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeHiveObjects captures enum value "HiveObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeHiveObjects string = "HiveObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeMongoObjects captures enum value "MongoObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeMongoObjects string = "MongoObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeHDFSObjects captures enum value "HDFSObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeHDFSObjects string = "HDFSObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeExchangeObjects captures enum value "ExchangeObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeExchangeObjects string = "ExchangeObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypePublicFolders captures enum value "PublicFolders" - CommonSearchIndexedObjectsResponseParamsObjectTypePublicFolders string = "PublicFolders" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeGroupsObjects captures enum value "GroupsObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeGroupsObjects string = "GroupsObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeTeamsObjects captures enum value "TeamsObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeTeamsObjects string = "TeamsObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeSharepointObjects captures enum value "SharepointObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeSharepointObjects string = "SharepointObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeOneDriveObjects captures enum value "OneDriveObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeOneDriveObjects string = "OneDriveObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeUdaObjects captures enum value "UdaObjects" - CommonSearchIndexedObjectsResponseParamsObjectTypeUdaObjects string = "UdaObjects" - - // CommonSearchIndexedObjectsResponseParamsObjectTypeSfdcRecords captures enum value "SfdcRecords" - CommonSearchIndexedObjectsResponseParamsObjectTypeSfdcRecords string = "SfdcRecords" -) - -// prop value enum -func (m *CommonSearchIndexedObjectsResponseParams) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSearchIndexedObjectsResponseParams) validateObjectType(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", m.ObjectType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common search indexed objects response params based on context it is used -func (m *CommonSearchIndexedObjectsResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSearchIndexedObjectsResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSearchIndexedObjectsResponseParams) UnmarshalBinary(b []byte) error { - var res CommonSearchIndexedObjectsResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_source_connection_request_params.go b/v2/models/common_source_connection_request_params.go deleted file mode 100644 index e8c860a4..00000000 --- a/v2/models/common_source_connection_request_params.go +++ /dev/null @@ -1,124 +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" -) - -// CommonSourceConnectionRequestParams Test common connection request parameters. -// -// Specifies the common set of parameters to test connectivity with a source. -// -// swagger:model CommonSourceConnectionRequestParams -type CommonSourceConnectionRequestParams struct { - - // Specifies the environment type of the Protection Source. - // Required: true - // Enum: ["kCassandra","kHive","kHBase","kHdfs","kSQL","kOracle"] - Environment *string `json:"environment"` - - // Specifies the id of the connection from where this source is reachable. This should only be set for a source being registered by a tenant user. - ConnectionID *int64 `json:"connectionId,omitempty"` -} - -// Validate validates this common source connection request params -func (m *CommonSourceConnectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonSourceConnectionRequestParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCassandra","kHive","kHBase","kHdfs","kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSourceConnectionRequestParamsTypeEnvironmentPropEnum = append(commonSourceConnectionRequestParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonSourceConnectionRequestParamsEnvironmentKCassandra captures enum value "kCassandra" - CommonSourceConnectionRequestParamsEnvironmentKCassandra string = "kCassandra" - - // CommonSourceConnectionRequestParamsEnvironmentKHive captures enum value "kHive" - CommonSourceConnectionRequestParamsEnvironmentKHive string = "kHive" - - // CommonSourceConnectionRequestParamsEnvironmentKHBase captures enum value "kHBase" - CommonSourceConnectionRequestParamsEnvironmentKHBase string = "kHBase" - - // CommonSourceConnectionRequestParamsEnvironmentKHdfs captures enum value "kHdfs" - CommonSourceConnectionRequestParamsEnvironmentKHdfs string = "kHdfs" - - // CommonSourceConnectionRequestParamsEnvironmentKSQL captures enum value "kSQL" - CommonSourceConnectionRequestParamsEnvironmentKSQL string = "kSQL" - - // CommonSourceConnectionRequestParamsEnvironmentKOracle captures enum value "kOracle" - CommonSourceConnectionRequestParamsEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *CommonSourceConnectionRequestParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSourceConnectionRequestParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSourceConnectionRequestParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common source connection request params based on context it is used -func (m *CommonSourceConnectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSourceConnectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSourceConnectionRequestParams) UnmarshalBinary(b []byte) error { - var res CommonSourceConnectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_source_registration_params.go b/v2/models/common_source_registration_params.go deleted file mode 100644 index d3f4bae6..00000000 --- a/v2/models/common_source_registration_params.go +++ /dev/null @@ -1,145 +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" -) - -// CommonSourceRegistrationParams Register source common request parameters. -// -// Specifies common parameters to register a source. -// -// swagger:model CommonSourceRegistrationParams -type CommonSourceRegistrationParams struct { - Credentials - - // Specifies the endpoint IPaddress, URL or hostname of the host. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the description of the source being registered. - Description *string `json:"description,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Credentials - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Credentials = aO0 - - // AO1 - var dataAO1 struct { - Endpoint *string `json:"endpoint"` - - Description *string `json:"description,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Endpoint = dataAO1.Endpoint - - m.Description = dataAO1.Description - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Credentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Endpoint *string `json:"endpoint"` - - Description *string `json:"description,omitempty"` - } - - dataAO1.Endpoint = m.Endpoint - - dataAO1.Description = m.Description - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common source registration params -func (m *CommonSourceRegistrationParams) 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 err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSourceRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common source registration params based on the context it is used -func (m *CommonSourceRegistrationParams) 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 *CommonSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res CommonSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_source_registration_reponse_params.go b/v2/models/common_source_registration_reponse_params.go deleted file mode 100644 index 3fbb0281..00000000 --- a/v2/models/common_source_registration_reponse_params.go +++ /dev/null @@ -1,446 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonSourceRegistrationReponseParams Specifies the parameters which are common between all Protection Source registrations. -// -// swagger:model CommonSourceRegistrationReponseParams -type CommonSourceRegistrationReponseParams struct { - - // Source Registration ID. This can be used to retrieve, edit or delete the source registration. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // ID of top level source object discovered after the registration. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies detailed info about the source. - SourceInfo *Object `json:"sourceInfo,omitempty"` - - // Specifies the environment type of the Protection Source. - // Enum: ["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"] - Environment *string `json:"environment,omitempty"` - - // The user specified name for this source. - Name *string `json:"name,omitempty"` - - // Specifies the id of the connection from where this source is reachable. This should only be set for a source being registered by a tenant user. This field will be depricated in future. Use connections field. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specfies the list of connections for the source. - Connections []*ConnectionConfig `json:"connections"` - - // Specifies the connector group id of connector groups. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Specifies the advanced configuration for a protection source. - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` - - RegistrationInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonSourceRegistrationReponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *int64 `json:"id,omitempty"` - - SourceID *int64 `json:"sourceId,omitempty"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - - Environment *string `json:"environment,omitempty"` - - Name *string `json:"name,omitempty"` - - ConnectionID *int64 `json:"connectionId,omitempty"` - - Connections []*ConnectionConfig `json:"connections"` - - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.SourceID = dataAO0.SourceID - - m.SourceInfo = dataAO0.SourceInfo - - m.Environment = dataAO0.Environment - - m.Name = dataAO0.Name - - m.ConnectionID = dataAO0.ConnectionID - - m.Connections = dataAO0.Connections - - m.ConnectorGroupID = dataAO0.ConnectorGroupID - - m.AdvancedConfigs = dataAO0.AdvancedConfigs - - // AO1 - var aO1 RegistrationInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.RegistrationInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonSourceRegistrationReponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *int64 `json:"id,omitempty"` - - SourceID *int64 `json:"sourceId,omitempty"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - - Environment *string `json:"environment,omitempty"` - - Name *string `json:"name,omitempty"` - - ConnectionID *int64 `json:"connectionId,omitempty"` - - Connections []*ConnectionConfig `json:"connections"` - - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` - } - - dataAO0.ID = m.ID - - dataAO0.SourceID = m.SourceID - - dataAO0.SourceInfo = m.SourceInfo - - dataAO0.Environment = m.Environment - - dataAO0.Name = m.Name - - dataAO0.ConnectionID = m.ConnectionID - - dataAO0.Connections = m.Connections - - dataAO0.ConnectorGroupID = m.ConnectorGroupID - - dataAO0.AdvancedConfigs = m.AdvancedConfigs - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.RegistrationInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common source registration reponse params -func (m *CommonSourceRegistrationReponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnections(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdvancedConfigs(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with RegistrationInfo - if err := m.RegistrationInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSourceRegistrationReponseParams) validateSourceInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if m.SourceInfo != nil { - if err := m.SourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -var commonSourceRegistrationReponseParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSourceRegistrationReponseParamsTypeEnvironmentPropEnum = append(commonSourceRegistrationReponseParamsTypeEnvironmentPropEnum, v) - } -} - -// property enum -func (m *CommonSourceRegistrationReponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSourceRegistrationReponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSourceRegistrationReponseParams) 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 -} - -func (m *CommonSourceRegistrationReponseParams) validateConnections(formats strfmt.Registry) error { - - if swag.IsZero(m.Connections) { // not required - return nil - } - - for i := 0; i < len(m.Connections); i++ { - if swag.IsZero(m.Connections[i]) { // not required - continue - } - - if m.Connections[i] != nil { - if err := m.Connections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonSourceRegistrationReponseParams) validateAdvancedConfigs(formats strfmt.Registry) error { - - if swag.IsZero(m.AdvancedConfigs) { // not required - return nil - } - - for i := 0; i < len(m.AdvancedConfigs); i++ { - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - continue - } - - if m.AdvancedConfigs[i] != nil { - if err := m.AdvancedConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common source registration reponse params based on the context it is used -func (m *CommonSourceRegistrationReponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnections(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with RegistrationInfo - if err := m.RegistrationInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSourceRegistrationReponseParams) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *CommonSourceRegistrationReponseParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *CommonSourceRegistrationReponseParams) contextValidateSourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceInfo != nil { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if err := m.SourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -func (m *CommonSourceRegistrationReponseParams) contextValidateConnections(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Connections); i++ { - - if m.Connections[i] != nil { - - if swag.IsZero(m.Connections[i]) { // not required - return nil - } - - if err := m.Connections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonSourceRegistrationReponseParams) contextValidateAdvancedConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdvancedConfigs); i++ { - - if m.AdvancedConfigs[i] != nil { - - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - return nil - } - - if err := m.AdvancedConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSourceRegistrationReponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSourceRegistrationReponseParams) UnmarshalBinary(b []byte) error { - var res CommonSourceRegistrationReponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_source_registration_request_params.go b/v2/models/common_source_registration_request_params.go deleted file mode 100644 index 9e8e82e1..00000000 --- a/v2/models/common_source_registration_request_params.go +++ /dev/null @@ -1,336 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonSourceRegistrationRequestParams Specifies the parameters which are common between all Protection Source registrations. -// -// swagger:model CommonSourceRegistrationRequestParams -type CommonSourceRegistrationRequestParams struct { - - // Specifies the environment type of the Protection Source. - // Required: true - // Enum: ["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"] - Environment *string `json:"environment"` - - // A user specified name for this source. - Name *string `json:"name,omitempty"` - - // Specifies if credentials are encrypted by internal key. - IsInternalEncrypted *bool `json:"isInternalEncrypted,omitempty"` - - // Specifies the key that user has encrypted the credential with. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Specifies the id of the connection from where this source is reachable. This should only be set for a source being registered by a tenant user. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specfies the list of connections for the source. - Connections []*ConnectionConfig `json:"connections"` - - // Specifies the connector group id of connector groups. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - - // Specifies the advanced configuration for a protection source. - AdvancedConfigs []*KeyValuePair `json:"advancedConfigs"` -} - -// Validate validates this common source registration request params -func (m *CommonSourceRegistrationRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnections(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdvancedConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonSourceRegistrationRequestParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSourceRegistrationRequestParamsTypeEnvironmentPropEnum = append(commonSourceRegistrationRequestParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonSourceRegistrationRequestParamsEnvironmentKVMware captures enum value "kVMware" - CommonSourceRegistrationRequestParamsEnvironmentKVMware string = "kVMware" - - // CommonSourceRegistrationRequestParamsEnvironmentKHyperV captures enum value "kHyperV" - CommonSourceRegistrationRequestParamsEnvironmentKHyperV string = "kHyperV" - - // CommonSourceRegistrationRequestParamsEnvironmentKAcropolis captures enum value "kAcropolis" - CommonSourceRegistrationRequestParamsEnvironmentKAcropolis string = "kAcropolis" - - // CommonSourceRegistrationRequestParamsEnvironmentKKVM captures enum value "kKVM" - CommonSourceRegistrationRequestParamsEnvironmentKKVM string = "kKVM" - - // CommonSourceRegistrationRequestParamsEnvironmentKAWS captures enum value "kAWS" - CommonSourceRegistrationRequestParamsEnvironmentKAWS string = "kAWS" - - // CommonSourceRegistrationRequestParamsEnvironmentKGCP captures enum value "kGCP" - CommonSourceRegistrationRequestParamsEnvironmentKGCP string = "kGCP" - - // CommonSourceRegistrationRequestParamsEnvironmentKAzure captures enum value "kAzure" - CommonSourceRegistrationRequestParamsEnvironmentKAzure string = "kAzure" - - // CommonSourceRegistrationRequestParamsEnvironmentKPhysical captures enum value "kPhysical" - CommonSourceRegistrationRequestParamsEnvironmentKPhysical string = "kPhysical" - - // CommonSourceRegistrationRequestParamsEnvironmentKPure captures enum value "kPure" - CommonSourceRegistrationRequestParamsEnvironmentKPure string = "kPure" - - // CommonSourceRegistrationRequestParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - CommonSourceRegistrationRequestParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // CommonSourceRegistrationRequestParamsEnvironmentKNimble captures enum value "kNimble" - CommonSourceRegistrationRequestParamsEnvironmentKNimble string = "kNimble" - - // CommonSourceRegistrationRequestParamsEnvironmentKNetapp captures enum value "kNetapp" - CommonSourceRegistrationRequestParamsEnvironmentKNetapp string = "kNetapp" - - // CommonSourceRegistrationRequestParamsEnvironmentKGenericNas captures enum value "kGenericNas" - CommonSourceRegistrationRequestParamsEnvironmentKGenericNas string = "kGenericNas" - - // CommonSourceRegistrationRequestParamsEnvironmentKIsilon captures enum value "kIsilon" - CommonSourceRegistrationRequestParamsEnvironmentKIsilon string = "kIsilon" - - // CommonSourceRegistrationRequestParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - CommonSourceRegistrationRequestParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // CommonSourceRegistrationRequestParamsEnvironmentKGPFS captures enum value "kGPFS" - CommonSourceRegistrationRequestParamsEnvironmentKGPFS string = "kGPFS" - - // CommonSourceRegistrationRequestParamsEnvironmentKElastifile captures enum value "kElastifile" - CommonSourceRegistrationRequestParamsEnvironmentKElastifile string = "kElastifile" - - // CommonSourceRegistrationRequestParamsEnvironmentKO365 captures enum value "kO365" - CommonSourceRegistrationRequestParamsEnvironmentKO365 string = "kO365" - - // CommonSourceRegistrationRequestParamsEnvironmentKHyperFlex captures enum value "kHyperFlex" - CommonSourceRegistrationRequestParamsEnvironmentKHyperFlex string = "kHyperFlex" - - // CommonSourceRegistrationRequestParamsEnvironmentKKubernetes captures enum value "kKubernetes" - CommonSourceRegistrationRequestParamsEnvironmentKKubernetes string = "kKubernetes" - - // CommonSourceRegistrationRequestParamsEnvironmentKCassandra captures enum value "kCassandra" - CommonSourceRegistrationRequestParamsEnvironmentKCassandra string = "kCassandra" - - // CommonSourceRegistrationRequestParamsEnvironmentKMongoDB captures enum value "kMongoDB" - CommonSourceRegistrationRequestParamsEnvironmentKMongoDB string = "kMongoDB" - - // CommonSourceRegistrationRequestParamsEnvironmentKCouchbase captures enum value "kCouchbase" - CommonSourceRegistrationRequestParamsEnvironmentKCouchbase string = "kCouchbase" - - // CommonSourceRegistrationRequestParamsEnvironmentKHdfs captures enum value "kHdfs" - CommonSourceRegistrationRequestParamsEnvironmentKHdfs string = "kHdfs" - - // CommonSourceRegistrationRequestParamsEnvironmentKHive captures enum value "kHive" - CommonSourceRegistrationRequestParamsEnvironmentKHive string = "kHive" - - // CommonSourceRegistrationRequestParamsEnvironmentKHBase captures enum value "kHBase" - CommonSourceRegistrationRequestParamsEnvironmentKHBase string = "kHBase" - - // CommonSourceRegistrationRequestParamsEnvironmentKUDA captures enum value "kUDA" - CommonSourceRegistrationRequestParamsEnvironmentKUDA string = "kUDA" - - // CommonSourceRegistrationRequestParamsEnvironmentKSQL captures enum value "kSQL" - CommonSourceRegistrationRequestParamsEnvironmentKSQL string = "kSQL" - - // CommonSourceRegistrationRequestParamsEnvironmentKOracle captures enum value "kOracle" - CommonSourceRegistrationRequestParamsEnvironmentKOracle string = "kOracle" - - // CommonSourceRegistrationRequestParamsEnvironmentKSfdc captures enum value "kSfdc" - CommonSourceRegistrationRequestParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *CommonSourceRegistrationRequestParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSourceRegistrationRequestParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSourceRegistrationRequestParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *CommonSourceRegistrationRequestParams) validateConnections(formats strfmt.Registry) error { - if swag.IsZero(m.Connections) { // not required - return nil - } - - for i := 0; i < len(m.Connections); i++ { - if swag.IsZero(m.Connections[i]) { // not required - continue - } - - if m.Connections[i] != nil { - if err := m.Connections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonSourceRegistrationRequestParams) validateAdvancedConfigs(formats strfmt.Registry) error { - if swag.IsZero(m.AdvancedConfigs) { // not required - return nil - } - - for i := 0; i < len(m.AdvancedConfigs); i++ { - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - continue - } - - if m.AdvancedConfigs[i] != nil { - if err := m.AdvancedConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common source registration request params based on the context it is used -func (m *CommonSourceRegistrationRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnections(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdvancedConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSourceRegistrationRequestParams) contextValidateConnections(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Connections); i++ { - - if m.Connections[i] != nil { - - if swag.IsZero(m.Connections[i]) { // not required - return nil - } - - if err := m.Connections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonSourceRegistrationRequestParams) contextValidateAdvancedConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdvancedConfigs); i++ { - - if m.AdvancedConfigs[i] != nil { - - if swag.IsZero(m.AdvancedConfigs[i]) { // not required - return nil - } - - if err := m.AdvancedConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("advancedConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSourceRegistrationRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSourceRegistrationRequestParams) UnmarshalBinary(b []byte) error { - var res CommonSourceRegistrationRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_sql_app_source_config.go b/v2/models/common_sql_app_source_config.go deleted file mode 100644 index 912ab15e..00000000 --- a/v2/models/common_sql_app_source_config.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonSQLAppSourceConfig Common Sql App Source Config. -// -// Specifies a common parameters used when restroring back to original or new source. -// -// swagger:model CommonSqlAppSourceConfig -type CommonSQLAppSourceConfig struct { - - // Specifies the time in the past 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 restored from the full/incremental snapshot. - RestoreTimeUsecs *int64 `json:"restoreTimeUsecs,omitempty"` - - // Specifies the secondary data filename pattern and corresponding direcories of the DB. Secondary data files are optional and are user defined. The recommended file extention for secondary files is ".ndf". If this option is specified and the destination folders do not exist they will be automatically created. - SecondaryDataFilesDirList []*FilenamePatternToDirectory `json:"secondaryDataFilesDirList"` - - // Specifies the flag to bring DBs online or not after successful recovery. If this is passed as true, then it means DBs won't be brought online. - WithNoRecovery *bool `json:"withNoRecovery,omitempty"` - - // Specifies whether to keep CDC (Change Data Capture) on recovered databases or not. If not passed, this is assumed to be true. If withNoRecovery is passed as true, then this field must not be set to true. Passing this field as true in this scenario will be a invalid request. - KeepCdc *bool `json:"keepCdc,omitempty"` - - // Specifies a policy to be used while recovering existing databases. - // Enum: ["FailIfExists","Overwrite"] - OverwritingPolicy *string `json:"overwritingPolicy,omitempty"` - - // Specifies the parameters related to multi stage Sql restore. - MultiStageRestoreOptions *MultiStageRestoreOptions `json:"multiStageRestoreOptions,omitempty"` - - // 'with_clause' contains 'with clause' to be used in native sql restore command. This is only applicable for database restore of native sql backup. Here user can specify multiple restore options. Example: 'WITH BUFFERCOUNT = 575, MAXTRANSFERSIZE = 2097152'. - NativeRecoveryWithClause *string `json:"nativeRecoveryWithClause,omitempty"` -} - -// Validate validates this common Sql app source config -func (m *CommonSQLAppSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecondaryDataFilesDirList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOverwritingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMultiStageRestoreOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSQLAppSourceConfig) validateSecondaryDataFilesDirList(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryDataFilesDirList) { // not required - return nil - } - - for i := 0; i < len(m.SecondaryDataFilesDirList); i++ { - if swag.IsZero(m.SecondaryDataFilesDirList[i]) { // not required - continue - } - - if m.SecondaryDataFilesDirList[i] != nil { - if err := m.SecondaryDataFilesDirList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDataFilesDirList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDataFilesDirList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var commonSqlAppSourceConfigTypeOverwritingPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FailIfExists","Overwrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonSqlAppSourceConfigTypeOverwritingPolicyPropEnum = append(commonSqlAppSourceConfigTypeOverwritingPolicyPropEnum, v) - } -} - -const ( - - // CommonSQLAppSourceConfigOverwritingPolicyFailIfExists captures enum value "FailIfExists" - CommonSQLAppSourceConfigOverwritingPolicyFailIfExists string = "FailIfExists" - - // CommonSQLAppSourceConfigOverwritingPolicyOverwrite captures enum value "Overwrite" - CommonSQLAppSourceConfigOverwritingPolicyOverwrite string = "Overwrite" -) - -// prop value enum -func (m *CommonSQLAppSourceConfig) validateOverwritingPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonSqlAppSourceConfigTypeOverwritingPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonSQLAppSourceConfig) validateOverwritingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.OverwritingPolicy) { // not required - return nil - } - - // value enum - if err := m.validateOverwritingPolicyEnum("overwritingPolicy", "body", *m.OverwritingPolicy); err != nil { - return err - } - - return nil -} - -func (m *CommonSQLAppSourceConfig) validateMultiStageRestoreOptions(formats strfmt.Registry) error { - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if m.MultiStageRestoreOptions != nil { - if err := m.MultiStageRestoreOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common Sql app source config based on the context it is used -func (m *CommonSQLAppSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecondaryDataFilesDirList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMultiStageRestoreOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonSQLAppSourceConfig) contextValidateSecondaryDataFilesDirList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecondaryDataFilesDirList); i++ { - - if m.SecondaryDataFilesDirList[i] != nil { - - if swag.IsZero(m.SecondaryDataFilesDirList[i]) { // not required - return nil - } - - if err := m.SecondaryDataFilesDirList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondaryDataFilesDirList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondaryDataFilesDirList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonSQLAppSourceConfig) contextValidateMultiStageRestoreOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.MultiStageRestoreOptions != nil { - - if swag.IsZero(m.MultiStageRestoreOptions) { // not required - return nil - } - - if err := m.MultiStageRestoreOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("multiStageRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("multiStageRestoreOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonSQLAppSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonSQLAppSourceConfig) UnmarshalBinary(b []byte) error { - var res CommonSQLAppSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_standby_resource_params.go b/v2/models/common_standby_resource_params.go deleted file mode 100644 index cdc25794..00000000 --- a/v2/models/common_standby_resource_params.go +++ /dev/null @@ -1,52 +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" -) - -// CommonStandbyResourceParams Standby resoure Params. -// -// Specifies the params for standby resource. -// -// swagger:model CommonStandbyResourceParams -type CommonStandbyResourceParams struct { - - // Specifies the recovery point objective time user expects for this standby resource. - RecoveryPointObjectiveSecs *int64 `json:"recoveryPointObjectiveSecs,omitempty"` -} - -// Validate validates this common standby resource params -func (m *CommonStandbyResourceParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common standby resource params based on context it is used -func (m *CommonStandbyResourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonStandbyResourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonStandbyResourceParams) UnmarshalBinary(b []byte) error { - var res CommonStandbyResourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_target_configuration.go b/v2/models/common_target_configuration.go deleted file mode 100644 index c8bb8a28..00000000 --- a/v2/models/common_target_configuration.go +++ /dev/null @@ -1,336 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CommonTargetConfiguration Common Target Configuration. -// -// Specifies common parameters required while setting up additional protection target configuration. -// -// swagger:model CommonTargetConfiguration -type CommonTargetConfiguration struct { - - // Specifies the Id for a backup copy policy. This is generated when the policy is created - // Required: true - Schedule *TargetSchedule `json:"schedule"` - - // Specifies the Retention period of backup in days, months or years to retain copied Snapshots on the target. - // Required: true - Retention *Retention `json:"retention"` - - // Specifies if Snapshots are copied from the first completely successful Protection Group Run or the first partially successful Protection Group Run occurring at the start of the replication schedule.
If true, Snapshots are copied from the first Protection Group Run occurring at the start of the replication schedule that was completely successful i.e. Snapshots for all the Objects in the Protection Group were successfully captured.
If false, Snapshots are copied from the first Protection Group Run occurring at the start of the replication schedule, even if first Protection Group Run was not completely successful i.e. Snapshots were not captured for all Objects in the Protection Group. - CopyOnRunSuccess *bool `json:"copyOnRunSuccess,omitempty"` - - // Specifies the unique identifier for the target getting added. This field need to be passed only when policies are being updated. - ConfigID *string `json:"configId,omitempty"` - - // Specifies which type of run should be copied, if not set, all types of runs will be eligible for copying. If set, this will ensure that the first run of given type in the scheduled period will get copied. Currently, this can only be set to Full. - // Enum: ["Regular","Full","Log","System"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies the replication/archival timeouts for different type of runs(kFull, kRegular etc.). - RunTimeouts []*CancellationTimeoutParams `json:"runTimeouts"` - - // Specifies the retention period of log backup in days, months or years to retain copied Snapshots on the external target. - LogRetention *LogRetention `json:"logRetention,omitempty"` -} - -// Validate validates this common target configuration -func (m *CommonTargetConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTargetConfiguration) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *CommonTargetConfiguration) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 commonTargetConfigurationTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Regular","Full","Log","System"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTargetConfigurationTypeBackupRunTypePropEnum = append(commonTargetConfigurationTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // CommonTargetConfigurationBackupRunTypeRegular captures enum value "Regular" - CommonTargetConfigurationBackupRunTypeRegular string = "Regular" - - // CommonTargetConfigurationBackupRunTypeFull captures enum value "Full" - CommonTargetConfigurationBackupRunTypeFull string = "Full" - - // CommonTargetConfigurationBackupRunTypeLog captures enum value "Log" - CommonTargetConfigurationBackupRunTypeLog string = "Log" - - // CommonTargetConfigurationBackupRunTypeSystem captures enum value "System" - CommonTargetConfigurationBackupRunTypeSystem string = "System" -) - -// prop value enum -func (m *CommonTargetConfiguration) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTargetConfigurationTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTargetConfiguration) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *CommonTargetConfiguration) validateRunTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.RunTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.RunTimeouts); i++ { - if swag.IsZero(m.RunTimeouts[i]) { // not required - continue - } - - if m.RunTimeouts[i] != nil { - if err := m.RunTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonTargetConfiguration) validateLogRetention(formats strfmt.Registry) error { - if swag.IsZero(m.LogRetention) { // not required - return nil - } - - if m.LogRetention != nil { - if err := m.LogRetention.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRetention") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common target configuration based on the context it is used -func (m *CommonTargetConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTargetConfiguration) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *CommonTargetConfiguration) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 -} - -func (m *CommonTargetConfiguration) contextValidateRunTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RunTimeouts); i++ { - - if m.RunTimeouts[i] != nil { - - if swag.IsZero(m.RunTimeouts[i]) { // not required - return nil - } - - if err := m.RunTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CommonTargetConfiguration) contextValidateLogRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.LogRetention != nil { - - if swag.IsZero(m.LogRetention) { // not required - return nil - } - - if err := m.LogRetention.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logRetention") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logRetention") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTargetConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTargetConfiguration) UnmarshalBinary(b []byte) error { - var res CommonTargetConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_clone_snapshot_params.go b/v2/models/common_tdm_clone_snapshot_params.go deleted file mode 100644 index 20b5b0f4..00000000 --- a/v2/models/common_tdm_clone_snapshot_params.go +++ /dev/null @@ -1,50 +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" -) - -// CommonTdmCloneSnapshotParams Specifies the common properties of a clone snapshot. -// -// swagger:model CommonTdmCloneSnapshotParams -type CommonTdmCloneSnapshotParams struct { - - // Specifies the label for the snapshot. - Label *string `json:"label,omitempty"` -} - -// Validate validates this common tdm clone snapshot params -func (m *CommonTdmCloneSnapshotParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common tdm clone snapshot params based on context it is used -func (m *CommonTdmCloneSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmCloneSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmCloneSnapshotParams) UnmarshalBinary(b []byte) error { - var res CommonTdmCloneSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_clone_task_params.go b/v2/models/common_tdm_clone_task_params.go deleted file mode 100644 index 1c17c62f..00000000 --- a/v2/models/common_tdm_clone_task_params.go +++ /dev/null @@ -1,116 +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" -) - -// CommonTdmCloneTaskParams Specifies the common params for a TDM clone task. -// -// swagger:model CommonTdmCloneTaskParams -type CommonTdmCloneTaskParams struct { - - // Specifies the environment of the TDM Clone task. - // Required: true - // Enum: ["kSQL","kOracle"] - Environment *string `json:"environment"` - - // Specifies the ID of an existing protection group, which should start protecting this clone. Specifying this implies that the clone is eligible for automated snapshots based on the policy configuration. If this is specified, policyId should also be specified and protectionGroupName should not be specified. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the name of a new protection group, which should be created to protect this clone. Specifying this implies that the clone is eligible for automated snapshots based on the policy configuration. If this is specified, policyId should also be specified and protectionGroupId should not be specified. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the ID of the policy, which should be used to protect this clone. This is useful for automatic snapshots. This must be specified if either of protectionGroupId and protectionGroupName is specified. - PolicyID *string `json:"policyId,omitempty"` -} - -// Validate validates this common tdm clone task params -func (m *CommonTdmCloneTaskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTdmCloneTaskParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmCloneTaskParamsTypeEnvironmentPropEnum = append(commonTdmCloneTaskParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonTdmCloneTaskParamsEnvironmentKSQL captures enum value "kSQL" - CommonTdmCloneTaskParamsEnvironmentKSQL string = "kSQL" - - // CommonTdmCloneTaskParamsEnvironmentKOracle captures enum value "kOracle" - CommonTdmCloneTaskParamsEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *CommonTdmCloneTaskParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmCloneTaskParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmCloneTaskParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common tdm clone task params based on context it is used -func (m *CommonTdmCloneTaskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmCloneTaskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmCloneTaskParams) UnmarshalBinary(b []byte) error { - var res CommonTdmCloneTaskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_clone_task_request_params.go b/v2/models/common_tdm_clone_task_request_params.go deleted file mode 100644 index 8198cbcd..00000000 --- a/v2/models/common_tdm_clone_task_request_params.go +++ /dev/null @@ -1,168 +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" -) - -// CommonTdmCloneTaskRequestParams Specifies the common request params for a TDM clone task. -// -// swagger:model CommonTdmCloneTaskRequestParams -type CommonTdmCloneTaskRequestParams struct { - CommonTdmCloneTaskParams - - // Specifies the snapshot ID, from which the clone is to be created. - // Required: true - SnapshotID *string `json:"snapshotId"` - - // Specifies the ID of the host, where the clone needs to be created. - // Required: true - TargetHostID *int64 `json:"targetHostId"` - - // Specifies the timestamp (in usecs from epoch) for creating the clone at a point in time in the past. - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonTdmCloneTaskRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneTaskParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneTaskParams = aO0 - - // AO1 - var dataAO1 struct { - SnapshotID *string `json:"snapshotId"` - - TargetHostID *int64 `json:"targetHostId"` - - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.SnapshotID = dataAO1.SnapshotID - - m.TargetHostID = dataAO1.TargetHostID - - m.PointInTimeUsecs = dataAO1.PointInTimeUsecs - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonTdmCloneTaskRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneTaskParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - SnapshotID *string `json:"snapshotId"` - - TargetHostID *int64 `json:"targetHostId"` - - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - } - - dataAO1.SnapshotID = m.SnapshotID - - dataAO1.TargetHostID = m.TargetHostID - - dataAO1.PointInTimeUsecs = m.PointInTimeUsecs - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common tdm clone task request params -func (m *CommonTdmCloneTaskRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskParams - if err := m.CommonTdmCloneTaskParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetHostID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmCloneTaskRequestParams) validateSnapshotID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotId", "body", m.SnapshotID); err != nil { - return err - } - - return nil -} - -func (m *CommonTdmCloneTaskRequestParams) validateTargetHostID(formats strfmt.Registry) error { - - if err := validate.Required("targetHostId", "body", m.TargetHostID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common tdm clone task request params based on the context it is used -func (m *CommonTdmCloneTaskRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskParams - if err := m.CommonTdmCloneTaskParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmCloneTaskRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmCloneTaskRequestParams) UnmarshalBinary(b []byte) error { - var res CommonTdmCloneTaskRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_clone_task_response_params.go b/v2/models/common_tdm_clone_task_response_params.go deleted file mode 100644 index 7b90a042..00000000 --- a/v2/models/common_tdm_clone_task_response_params.go +++ /dev/null @@ -1,262 +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" -) - -// CommonTdmCloneTaskResponseParams Specifies the common response params for a TDM clone task. -// -// swagger:model CommonTdmCloneTaskResponseParams -type CommonTdmCloneTaskResponseParams struct { - CommonTdmCloneTaskParams - - // Specifies the details of the snapshot used for cloning. - Snapshot struct { - ObjectSnapshot - } `json:"snapshot,omitempty"` - - // Specifies the details of the parent object of the clone. - Parent struct { - ObjectSummary - } `json:"parent,omitempty"` - - // Specifies the details of the target, where the clone is created. - Target struct { - ObjectSummary - } `json:"target,omitempty"` - - // Specifies the details of the view, which is used for the clone. - View struct { - ViewParams - } `json:"view,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonTdmCloneTaskResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneTaskParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneTaskParams = aO0 - - // AO1 - var dataAO1 struct { - Snapshot struct { - ObjectSnapshot - } `json:"snapshot,omitempty"` - - Parent struct { - ObjectSummary - } `json:"parent,omitempty"` - - Target struct { - ObjectSummary - } `json:"target,omitempty"` - - View struct { - ViewParams - } `json:"view,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshot = dataAO1.Snapshot - - m.Parent = dataAO1.Parent - - m.Target = dataAO1.Target - - m.View = dataAO1.View - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonTdmCloneTaskResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneTaskParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshot struct { - ObjectSnapshot - } `json:"snapshot,omitempty"` - - Parent struct { - ObjectSummary - } `json:"parent,omitempty"` - - Target struct { - ObjectSummary - } `json:"target,omitempty"` - - View struct { - ViewParams - } `json:"view,omitempty"` - } - - dataAO1.Snapshot = m.Snapshot - - dataAO1.Parent = m.Parent - - dataAO1.Target = m.Target - - dataAO1.View = m.View - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common tdm clone task response params -func (m *CommonTdmCloneTaskResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskParams - if err := m.CommonTdmCloneTaskParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshot(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateView(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) validateSnapshot(formats strfmt.Registry) error { - - if swag.IsZero(m.Snapshot) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) validateParent(formats strfmt.Registry) error { - - if swag.IsZero(m.Parent) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) validateTarget(formats strfmt.Registry) error { - - if swag.IsZero(m.Target) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) validateView(formats strfmt.Registry) error { - - if swag.IsZero(m.View) { // not required - return nil - } - - return nil -} - -// ContextValidate validate this common tdm clone task response params based on the context it is used -func (m *CommonTdmCloneTaskResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskParams - if err := m.CommonTdmCloneTaskParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshot(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateView(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) contextValidateSnapshot(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmCloneTaskResponseParams) contextValidateView(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmCloneTaskResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmCloneTaskResponseParams) UnmarshalBinary(b []byte) error { - var res CommonTdmCloneTaskResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_object_response_params.go b/v2/models/common_tdm_object_response_params.go deleted file mode 100644 index 65d05012..00000000 --- a/v2/models/common_tdm_object_response_params.go +++ /dev/null @@ -1,272 +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" -) - -// CommonTdmObjectResponseParams Specifies the common parameters for a TDM object response. -// -// swagger:model CommonTdmObjectResponseParams -type CommonTdmObjectResponseParams struct { - - // Specifies the unique ID of the object. - // Required: true - ID *string `json:"id"` - - // Specifies the name of the object. - Name *string `json:"name,omitempty"` - - // Specifies the current status of the object. - // Enum: ["scheduled","inProgress","succeeded","failed","canceled"] - Status *string `json:"status,omitempty"` - - // Specifies the environment of the object. - // Required: true - // Enum: ["kSQL","kOracle"] - Environment *string `json:"environment"` - - // Specifies the user, who created the object. - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - // Specifies the details of the last action performed on this object. - LastAction struct { - TdmObjectTimelineEvent - } `json:"lastAction,omitempty"` - - // Specifies the size (in bytes) of the object. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the parent of the object. - Parent struct { - ObjectSummary - } `json:"parent,omitempty"` -} - -// Validate validates this common tdm object response params -func (m *CommonTdmObjectResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedByUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParent(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmObjectResponseParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var commonTdmObjectResponseParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scheduled","inProgress","succeeded","failed","canceled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmObjectResponseParamsTypeStatusPropEnum = append(commonTdmObjectResponseParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonTdmObjectResponseParamsStatusScheduled captures enum value "scheduled" - CommonTdmObjectResponseParamsStatusScheduled string = "scheduled" - - // CommonTdmObjectResponseParamsStatusInProgress captures enum value "inProgress" - CommonTdmObjectResponseParamsStatusInProgress string = "inProgress" - - // CommonTdmObjectResponseParamsStatusSucceeded captures enum value "succeeded" - CommonTdmObjectResponseParamsStatusSucceeded string = "succeeded" - - // CommonTdmObjectResponseParamsStatusFailed captures enum value "failed" - CommonTdmObjectResponseParamsStatusFailed string = "failed" - - // CommonTdmObjectResponseParamsStatusCanceled captures enum value "canceled" - CommonTdmObjectResponseParamsStatusCanceled string = "canceled" -) - -// prop value enum -func (m *CommonTdmObjectResponseParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmObjectResponseParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmObjectResponseParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var commonTdmObjectResponseParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmObjectResponseParamsTypeEnvironmentPropEnum = append(commonTdmObjectResponseParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonTdmObjectResponseParamsEnvironmentKSQL captures enum value "kSQL" - CommonTdmObjectResponseParamsEnvironmentKSQL string = "kSQL" - - // CommonTdmObjectResponseParamsEnvironmentKOracle captures enum value "kOracle" - CommonTdmObjectResponseParamsEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *CommonTdmObjectResponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmObjectResponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmObjectResponseParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *CommonTdmObjectResponseParams) validateCreatedByUser(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedByUser) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmObjectResponseParams) validateLastAction(formats strfmt.Registry) error { - if swag.IsZero(m.LastAction) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmObjectResponseParams) validateParent(formats strfmt.Registry) error { - if swag.IsZero(m.Parent) { // not required - return nil - } - - return nil -} - -// ContextValidate validate this common tdm object response params based on the context it is used -func (m *CommonTdmObjectResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreatedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastAction(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmObjectResponseParams) contextValidateCreatedByUser(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmObjectResponseParams) contextValidateLastAction(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmObjectResponseParams) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmObjectResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmObjectResponseParams) UnmarshalBinary(b []byte) error { - var res CommonTdmObjectResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_object_timeline_events_response_params.go b/v2/models/common_tdm_object_timeline_events_response_params.go deleted file mode 100644 index 48592965..00000000 --- a/v2/models/common_tdm_object_timeline_events_response_params.go +++ /dev/null @@ -1,235 +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" -) - -// CommonTdmObjectTimelineEventsResponseParams Specifies the common parameters for the TDM object timeline events response. -// -// swagger:model CommonTdmObjectTimelineEventsResponseParams -type CommonTdmObjectTimelineEventsResponseParams struct { - - // Specifies the unique ID of the event. - // Required: true - ID *string `json:"id"` - - // Specifies the time (in usecs from epoch) at which the event was created. - CreatedAt *int64 `json:"createdAt,omitempty"` - - // Specifies the user, who triggered the event. - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - // Specifies the current status of the event. - // Enum: ["scheduled","inProgress","succeeded","failed","canceled"] - Status *string `json:"status,omitempty"` - - // Specifies the error message if the event is in failed state. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the description of the event, as provided by the user. - Description *string `json:"description,omitempty"` - - // Specifies the ID of the group this event belongs to. Events with same group ID are considered to be a single timeline for the TDM object. Different group IDs mean different timelines for the TDM object. - EventGroupID *string `json:"eventGroupId,omitempty"` - - // Specifies the action for the event. - // Required: true - // Enum: ["clone","teardown","refresh","snapshot","rewind"] - Action *string `json:"action"` -} - -// Validate validates this common tdm object timeline events response params -func (m *CommonTdmObjectTimelineEventsResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedByUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmObjectTimelineEventsResponseParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *CommonTdmObjectTimelineEventsResponseParams) validateCreatedByUser(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedByUser) { // not required - return nil - } - - return nil -} - -var commonTdmObjectTimelineEventsResponseParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scheduled","inProgress","succeeded","failed","canceled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmObjectTimelineEventsResponseParamsTypeStatusPropEnum = append(commonTdmObjectTimelineEventsResponseParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonTdmObjectTimelineEventsResponseParamsStatusScheduled captures enum value "scheduled" - CommonTdmObjectTimelineEventsResponseParamsStatusScheduled string = "scheduled" - - // CommonTdmObjectTimelineEventsResponseParamsStatusInProgress captures enum value "inProgress" - CommonTdmObjectTimelineEventsResponseParamsStatusInProgress string = "inProgress" - - // CommonTdmObjectTimelineEventsResponseParamsStatusSucceeded captures enum value "succeeded" - CommonTdmObjectTimelineEventsResponseParamsStatusSucceeded string = "succeeded" - - // CommonTdmObjectTimelineEventsResponseParamsStatusFailed captures enum value "failed" - CommonTdmObjectTimelineEventsResponseParamsStatusFailed string = "failed" - - // CommonTdmObjectTimelineEventsResponseParamsStatusCanceled captures enum value "canceled" - CommonTdmObjectTimelineEventsResponseParamsStatusCanceled string = "canceled" -) - -// prop value enum -func (m *CommonTdmObjectTimelineEventsResponseParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmObjectTimelineEventsResponseParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmObjectTimelineEventsResponseParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var commonTdmObjectTimelineEventsResponseParamsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["clone","teardown","refresh","snapshot","rewind"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmObjectTimelineEventsResponseParamsTypeActionPropEnum = append(commonTdmObjectTimelineEventsResponseParamsTypeActionPropEnum, v) - } -} - -const ( - - // CommonTdmObjectTimelineEventsResponseParamsActionClone captures enum value "clone" - CommonTdmObjectTimelineEventsResponseParamsActionClone string = "clone" - - // CommonTdmObjectTimelineEventsResponseParamsActionTeardown captures enum value "teardown" - CommonTdmObjectTimelineEventsResponseParamsActionTeardown string = "teardown" - - // CommonTdmObjectTimelineEventsResponseParamsActionRefresh captures enum value "refresh" - CommonTdmObjectTimelineEventsResponseParamsActionRefresh string = "refresh" - - // CommonTdmObjectTimelineEventsResponseParamsActionSnapshot captures enum value "snapshot" - CommonTdmObjectTimelineEventsResponseParamsActionSnapshot string = "snapshot" - - // CommonTdmObjectTimelineEventsResponseParamsActionRewind captures enum value "rewind" - CommonTdmObjectTimelineEventsResponseParamsActionRewind string = "rewind" -) - -// prop value enum -func (m *CommonTdmObjectTimelineEventsResponseParams) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmObjectTimelineEventsResponseParamsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmObjectTimelineEventsResponseParams) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common tdm object timeline events response params based on the context it is used -func (m *CommonTdmObjectTimelineEventsResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreatedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmObjectTimelineEventsResponseParams) contextValidateCreatedByUser(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmObjectTimelineEventsResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmObjectTimelineEventsResponseParams) UnmarshalBinary(b []byte) error { - var res CommonTdmObjectTimelineEventsResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_refresh_task_response_params.go b/v2/models/common_tdm_refresh_task_response_params.go deleted file mode 100644 index e4bc7366..00000000 --- a/v2/models/common_tdm_refresh_task_response_params.go +++ /dev/null @@ -1,213 +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" -) - -// CommonTdmRefreshTaskResponseParams Specifies the common response params for a TDM refresh task. -// -// swagger:model CommonTdmRefreshTaskResponseParams -type CommonTdmRefreshTaskResponseParams struct { - - // Specifies the environment of the TDM refresh task. - // Required: true - // Enum: ["kOracle"] - Environment *string `json:"environment"` - - // Specifies the details of the parent object of the clone. - Parent struct { - ObjectSummary - } `json:"parent,omitempty"` - - // Specifies the details of the target, where the clone is created. - Target struct { - ObjectSummary - } `json:"target,omitempty"` - - // Specifies the details of the snapshot used for refresh. - Snapshot struct { - ObjectSnapshot - } `json:"snapshot,omitempty"` - - // Specifies the details of the view, which is used for the clone. - View struct { - ViewParams - } `json:"view,omitempty"` -} - -// Validate validates this common tdm refresh task response params -func (m *CommonTdmRefreshTaskResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshot(formats); err != nil { - res = append(res, err) - } - - if err := m.validateView(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTdmRefreshTaskResponseParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmRefreshTaskResponseParamsTypeEnvironmentPropEnum = append(commonTdmRefreshTaskResponseParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // CommonTdmRefreshTaskResponseParamsEnvironmentKOracle captures enum value "kOracle" - CommonTdmRefreshTaskResponseParamsEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *CommonTdmRefreshTaskResponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmRefreshTaskResponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) validateParent(formats strfmt.Registry) error { - if swag.IsZero(m.Parent) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) validateSnapshot(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshot) { // not required - return nil - } - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) validateView(formats strfmt.Registry) error { - if swag.IsZero(m.View) { // not required - return nil - } - - return nil -} - -// ContextValidate validate this common tdm refresh task response params based on the context it is used -func (m *CommonTdmRefreshTaskResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshot(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateView(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) contextValidateSnapshot(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *CommonTdmRefreshTaskResponseParams) contextValidateView(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmRefreshTaskResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmRefreshTaskResponseParams) UnmarshalBinary(b []byte) error { - var res CommonTdmRefreshTaskResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_task_request_params.go b/v2/models/common_tdm_task_request_params.go deleted file mode 100644 index 0e50a86c..00000000 --- a/v2/models/common_tdm_task_request_params.go +++ /dev/null @@ -1,119 +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" -) - -// CommonTdmTaskRequestParams Specifies the common parameters used in TDM Task Creation. -// -// swagger:model CommonTdmTaskRequestParams -type CommonTdmTaskRequestParams struct { - - // Specifies the name of the task. - Name *string `json:"name,omitempty"` - - // Specifies the TDM Task action. - // Required: true - // Enum: ["clone","teardown","refresh","snapshot","rewind"] - Action *string `json:"action"` -} - -// Validate validates this common tdm task request params -func (m *CommonTdmTaskRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTdmTaskRequestParamsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["clone","teardown","refresh","snapshot","rewind"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmTaskRequestParamsTypeActionPropEnum = append(commonTdmTaskRequestParamsTypeActionPropEnum, v) - } -} - -const ( - - // CommonTdmTaskRequestParamsActionClone captures enum value "clone" - CommonTdmTaskRequestParamsActionClone string = "clone" - - // CommonTdmTaskRequestParamsActionTeardown captures enum value "teardown" - CommonTdmTaskRequestParamsActionTeardown string = "teardown" - - // CommonTdmTaskRequestParamsActionRefresh captures enum value "refresh" - CommonTdmTaskRequestParamsActionRefresh string = "refresh" - - // CommonTdmTaskRequestParamsActionSnapshot captures enum value "snapshot" - CommonTdmTaskRequestParamsActionSnapshot string = "snapshot" - - // CommonTdmTaskRequestParamsActionRewind captures enum value "rewind" - CommonTdmTaskRequestParamsActionRewind string = "rewind" -) - -// prop value enum -func (m *CommonTdmTaskRequestParams) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmTaskRequestParamsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmTaskRequestParams) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common tdm task request params based on context it is used -func (m *CommonTdmTaskRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmTaskRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmTaskRequestParams) UnmarshalBinary(b []byte) error { - var res CommonTdmTaskRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tdm_task_response_params.go b/v2/models/common_tdm_task_response_params.go deleted file mode 100644 index e0a2c61a..00000000 --- a/v2/models/common_tdm_task_response_params.go +++ /dev/null @@ -1,235 +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" -) - -// CommonTdmTaskResponseParams Specifies the common parameters for a TDM task response. -// -// swagger:model CommonTdmTaskResponseParams -type CommonTdmTaskResponseParams struct { - - // Specifies the unique ID of the task. - // Required: true - ID *string `json:"id"` - - // Specifies the name of the task. - Name *string `json:"name,omitempty"` - - // Specifies the time (in usecs from epoch) when the task was started. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the time (in usecs from epoch) when the task was completed. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the current status of the task. - // Enum: ["scheduled","inProgress","succeeded","failed","canceled"] - Status *string `json:"status,omitempty"` - - // Specifies the TDM Task action. - // Required: true - // Enum: ["clone","teardown","refresh","snapshot","rewind"] - Action *string `json:"action"` - - // Specifies the user, who created this task. - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - // Specifies the ID for tracking progress of this task. - ProgressTaskID *string `json:"progressTaskId,omitempty"` -} - -// Validate validates this common tdm task response params -func (m *CommonTdmTaskResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedByUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmTaskResponseParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var commonTdmTaskResponseParamsTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scheduled","inProgress","succeeded","failed","canceled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmTaskResponseParamsTypeStatusPropEnum = append(commonTdmTaskResponseParamsTypeStatusPropEnum, v) - } -} - -const ( - - // CommonTdmTaskResponseParamsStatusScheduled captures enum value "scheduled" - CommonTdmTaskResponseParamsStatusScheduled string = "scheduled" - - // CommonTdmTaskResponseParamsStatusInProgress captures enum value "inProgress" - CommonTdmTaskResponseParamsStatusInProgress string = "inProgress" - - // CommonTdmTaskResponseParamsStatusSucceeded captures enum value "succeeded" - CommonTdmTaskResponseParamsStatusSucceeded string = "succeeded" - - // CommonTdmTaskResponseParamsStatusFailed captures enum value "failed" - CommonTdmTaskResponseParamsStatusFailed string = "failed" - - // CommonTdmTaskResponseParamsStatusCanceled captures enum value "canceled" - CommonTdmTaskResponseParamsStatusCanceled string = "canceled" -) - -// prop value enum -func (m *CommonTdmTaskResponseParams) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmTaskResponseParamsTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmTaskResponseParams) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var commonTdmTaskResponseParamsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["clone","teardown","refresh","snapshot","rewind"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTdmTaskResponseParamsTypeActionPropEnum = append(commonTdmTaskResponseParamsTypeActionPropEnum, v) - } -} - -const ( - - // CommonTdmTaskResponseParamsActionClone captures enum value "clone" - CommonTdmTaskResponseParamsActionClone string = "clone" - - // CommonTdmTaskResponseParamsActionTeardown captures enum value "teardown" - CommonTdmTaskResponseParamsActionTeardown string = "teardown" - - // CommonTdmTaskResponseParamsActionRefresh captures enum value "refresh" - CommonTdmTaskResponseParamsActionRefresh string = "refresh" - - // CommonTdmTaskResponseParamsActionSnapshot captures enum value "snapshot" - CommonTdmTaskResponseParamsActionSnapshot string = "snapshot" - - // CommonTdmTaskResponseParamsActionRewind captures enum value "rewind" - CommonTdmTaskResponseParamsActionRewind string = "rewind" -) - -// prop value enum -func (m *CommonTdmTaskResponseParams) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTdmTaskResponseParamsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTdmTaskResponseParams) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *CommonTdmTaskResponseParams) validateCreatedByUser(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedByUser) { // not required - return nil - } - - return nil -} - -// ContextValidate validate this common tdm task response params based on the context it is used -func (m *CommonTdmTaskResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreatedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTdmTaskResponseParams) contextValidateCreatedByUser(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTdmTaskResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTdmTaskResponseParams) UnmarshalBinary(b []byte) error { - var res CommonTdmTaskResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tiering_aws_external_target_params.go b/v2/models/common_tiering_aws_external_target_params.go deleted file mode 100644 index 25df186e..00000000 --- a/v2/models/common_tiering_aws_external_target_params.go +++ /dev/null @@ -1,161 +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" -) - -// CommonTieringAwsExternalTargetParams AWS External Target Request Common Params for tiering purpose type. -// -// Specifies the common parameters which are specific to AWS related External Targets of tiering purpose type. -// -// swagger:model CommonTieringAwsExternalTargetParams -type CommonTieringAwsExternalTargetParams struct { - CommonAwsExternalTargetParams - - // Specifies the AWS External Target storage class. - // Required: true - // Enum: ["AmazonS3Standard","AmazonS3StandardIA","AmazonS3IntelligentTiering"] - StorageClass *string `json:"storageClass"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonTieringAwsExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAwsExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAwsExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonTieringAwsExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAwsExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - - dataAO1.StorageClass = m.StorageClass - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common tiering aws external target params -func (m *CommonTieringAwsExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAwsExternalTargetParams - if err := m.CommonAwsExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTieringAwsExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AmazonS3Standard","AmazonS3StandardIA","AmazonS3IntelligentTiering"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTieringAwsExternalTargetParamsTypeStorageClassPropEnum = append(commonTieringAwsExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *CommonTieringAwsExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTieringAwsExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTieringAwsExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common tiering aws external target params based on the context it is used -func (m *CommonTieringAwsExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAwsExternalTargetParams - if err := m.CommonAwsExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTieringAwsExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTieringAwsExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonTieringAwsExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tiering_azure_external_target_params.go b/v2/models/common_tiering_azure_external_target_params.go deleted file mode 100644 index c16e0ae9..00000000 --- a/v2/models/common_tiering_azure_external_target_params.go +++ /dev/null @@ -1,161 +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" -) - -// CommonTieringAzureExternalTargetParams Azure External Target Request Common Params for tiering purpose type. -// -// Specifies the common parameters which are specific to Azure related External Targets of tiering purpose type. -// -// swagger:model CommonTieringAzureExternalTargetParams -type CommonTieringAzureExternalTargetParams struct { - CommonAzureExternalTargetParams - - // Specifies the Azure External Target class. - // Required: true - // Enum: ["AzureHotBlob"] - StorageClass *string `json:"storageClass"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CommonTieringAzureExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonAzureExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonAzureExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CommonTieringAzureExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonAzureExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - - dataAO1.StorageClass = m.StorageClass - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this common tiering azure external target params -func (m *CommonTieringAzureExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAzureExternalTargetParams - if err := m.CommonAzureExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTieringAzureExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AzureHotBlob"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTieringAzureExternalTargetParamsTypeStorageClassPropEnum = append(commonTieringAzureExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *CommonTieringAzureExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTieringAzureExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTieringAzureExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this common tiering azure external target params based on the context it is used -func (m *CommonTieringAzureExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonAzureExternalTargetParams - if err := m.CommonAzureExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTieringAzureExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTieringAzureExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonTieringAzureExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tiering_external_target_params.go b/v2/models/common_tiering_external_target_params.go deleted file mode 100644 index a70dfef5..00000000 --- a/v2/models/common_tiering_external_target_params.go +++ /dev/null @@ -1,171 +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" -) - -// CommonTieringExternalTargetParams Specifies the common parameters which are specific to Tiering purpose type External Targets. -// -// swagger:model CommonTieringExternalTargetParams -type CommonTieringExternalTargetParams struct { - - // Specifies the Storage type of the External Target. - // Required: true - // Enum: ["Azure","Google","AWS","Oracle","S3Compatible"] - StorageType *string `json:"storageType"` - - // Specifies the type of encryption for the Setting. - // Required: true - // Enum: ["None","Weak","Strong"] - EncryptionLevel *string `json:"encryptionLevel"` -} - -// Validate validates this common tiering external target params -func (m *CommonTieringExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var commonTieringExternalTargetParamsTypeStorageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","Google","AWS","Oracle","S3Compatible"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTieringExternalTargetParamsTypeStorageTypePropEnum = append(commonTieringExternalTargetParamsTypeStorageTypePropEnum, v) - } -} - -const ( - - // CommonTieringExternalTargetParamsStorageTypeAzure captures enum value "Azure" - CommonTieringExternalTargetParamsStorageTypeAzure string = "Azure" - - // CommonTieringExternalTargetParamsStorageTypeGoogle captures enum value "Google" - CommonTieringExternalTargetParamsStorageTypeGoogle string = "Google" - - // CommonTieringExternalTargetParamsStorageTypeAWS captures enum value "AWS" - CommonTieringExternalTargetParamsStorageTypeAWS string = "AWS" - - // CommonTieringExternalTargetParamsStorageTypeOracle captures enum value "Oracle" - CommonTieringExternalTargetParamsStorageTypeOracle string = "Oracle" - - // CommonTieringExternalTargetParamsStorageTypeS3Compatible captures enum value "S3Compatible" - CommonTieringExternalTargetParamsStorageTypeS3Compatible string = "S3Compatible" -) - -// prop value enum -func (m *CommonTieringExternalTargetParams) validateStorageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTieringExternalTargetParamsTypeStorageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTieringExternalTargetParams) validateStorageType(formats strfmt.Registry) error { - - if err := validate.Required("storageType", "body", m.StorageType); err != nil { - return err - } - - // value enum - if err := m.validateStorageTypeEnum("storageType", "body", *m.StorageType); err != nil { - return err - } - - return nil -} - -var commonTieringExternalTargetParamsTypeEncryptionLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Weak","Strong"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - commonTieringExternalTargetParamsTypeEncryptionLevelPropEnum = append(commonTieringExternalTargetParamsTypeEncryptionLevelPropEnum, v) - } -} - -const ( - - // CommonTieringExternalTargetParamsEncryptionLevelNone captures enum value "None" - CommonTieringExternalTargetParamsEncryptionLevelNone string = "None" - - // CommonTieringExternalTargetParamsEncryptionLevelWeak captures enum value "Weak" - CommonTieringExternalTargetParamsEncryptionLevelWeak string = "Weak" - - // CommonTieringExternalTargetParamsEncryptionLevelStrong captures enum value "Strong" - CommonTieringExternalTargetParamsEncryptionLevelStrong string = "Strong" -) - -// prop value enum -func (m *CommonTieringExternalTargetParams) validateEncryptionLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, commonTieringExternalTargetParamsTypeEncryptionLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CommonTieringExternalTargetParams) validateEncryptionLevel(formats strfmt.Registry) error { - - if err := validate.Required("encryptionLevel", "body", m.EncryptionLevel); err != nil { - return err - } - - // value enum - if err := m.validateEncryptionLevelEnum("encryptionLevel", "body", *m.EncryptionLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this common tiering external target params based on context it is used -func (m *CommonTieringExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTieringExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTieringExternalTargetParams) UnmarshalBinary(b []byte) error { - var res CommonTieringExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_tiering_policy.go b/v2/models/common_tiering_policy.go deleted file mode 100644 index 4aeb2851..00000000 --- a/v2/models/common_tiering_policy.go +++ /dev/null @@ -1,163 +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" -) - -// CommonTieringPolicy Specifies the common tiering params between uptiering and downtiering. -// -// swagger:model CommonTieringPolicy -type CommonTieringPolicy struct { - - // Specifies whether to audit log the file tiering activity. - EnableAuditLogging *bool `json:"enableAuditLogging,omitempty"` - - // file size - FileSize *FileSizePolicy `json:"fileSize,omitempty"` - - // file path - FilePath *FileFilteringPolicy `json:"filePath,omitempty"` -} - -// Validate validates this common tiering policy -func (m *CommonTieringPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileSize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilePath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTieringPolicy) validateFileSize(formats strfmt.Registry) error { - if swag.IsZero(m.FileSize) { // not required - return nil - } - - if m.FileSize != nil { - if err := m.FileSize.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSize") - } - return err - } - } - - return nil -} - -func (m *CommonTieringPolicy) validateFilePath(formats strfmt.Registry) error { - if swag.IsZero(m.FilePath) { // not required - return nil - } - - if m.FilePath != nil { - if err := m.FilePath.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePath") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePath") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common tiering policy based on the context it is used -func (m *CommonTieringPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileSize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilePath(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonTieringPolicy) contextValidateFileSize(ctx context.Context, formats strfmt.Registry) error { - - if m.FileSize != nil { - - if swag.IsZero(m.FileSize) { // not required - return nil - } - - if err := m.FileSize.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSize") - } - return err - } - } - - return nil -} - -func (m *CommonTieringPolicy) contextValidateFilePath(ctx context.Context, formats strfmt.Registry) error { - - if m.FilePath != nil { - - if swag.IsZero(m.FilePath) { // not required - return nil - } - - if err := m.FilePath.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePath") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePath") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonTieringPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonTieringPolicy) UnmarshalBinary(b []byte) error { - var res CommonTieringPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_updatable_user_params.go b/v2/models/common_updatable_user_params.go deleted file mode 100644 index c17b5e5e..00000000 --- a/v2/models/common_updatable_user_params.go +++ /dev/null @@ -1,65 +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" -) - -// CommonUpdatableUserParams Specifies user properties which can be updated. -// -// swagger:model CommonUpdatableUserParams -type CommonUpdatableUserParams struct { - - // Specifies the description of the User. - Description *string `json:"description,omitempty"` - - // Specifies the Cohesity roles to associate with the user. The Cohesity roles determine privileges on the Cohesity Cluster for this user. - Roles []string `json:"roles"` - - // Specifies whether the User is restricted. A restricted user can only view & manage the objects it has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Specifies the epoch time in milliseconds since when the user can login. - EffectiveTimeMsecs *int64 `json:"effectiveTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the user expires. Post expiry the user cannot access Cohesity cluster. - ExpiryTimeMsecs *int64 `json:"expiryTimeMsecs,omitempty"` - - // Specifies whether the User is locked. - Locked *bool `json:"locked,omitempty"` -} - -// Validate validates this common updatable user params -func (m *CommonUpdatableUserParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this common updatable user params based on context it is used -func (m *CommonUpdatableUserParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CommonUpdatableUserParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonUpdatableUserParams) UnmarshalBinary(b []byte) error { - var res CommonUpdatableUserParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_vmware_object_params.go b/v2/models/common_vmware_object_params.go deleted file mode 100644 index c46ee764..00000000 --- a/v2/models/common_vmware_object_params.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CommonVmwareObjectParams Specifies the common object parameters required for VMware protection. -// -// swagger:model CommonVmwareObjectParams -type CommonVmwareObjectParams struct { - - // Specifies a list of disks to exclude from being protected. This is only applicable to VM objects. - ExcludeDisks []*DiskInfo `json:"excludeDisks"` - - // Specifies whether or not to truncate MS Exchange logs while taking an app consistent snapshot of this object. This is only applicable to objects which have a registered MS Exchange app. - TruncateExchangeLogs *bool `json:"truncateExchangeLogs,omitempty"` -} - -// Validate validates this common vmware object params -func (m *CommonVmwareObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonVmwareObjectParams) validateExcludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeDisks); i++ { - if swag.IsZero(m.ExcludeDisks[i]) { // not required - continue - } - - if m.ExcludeDisks[i] != nil { - if err := m.ExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this common vmware object params based on the context it is used -func (m *CommonVmwareObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonVmwareObjectParams) contextValidateExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeDisks); i++ { - - if m.ExcludeDisks[i] != nil { - - if swag.IsZero(m.ExcludeDisks[i]) { // not required - return nil - } - - if err := m.ExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonVmwareObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonVmwareObjectParams) UnmarshalBinary(b []byte) error { - var res CommonVmwareObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/common_vmware_protection_params.go b/v2/models/common_vmware_protection_params.go deleted file mode 100644 index e4314423..00000000 --- a/v2/models/common_vmware_protection_params.go +++ /dev/null @@ -1,175 +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" -) - -// CommonVmwareProtectionParams Specifies the common parameters which are specific to VMware related protection. -// -// swagger:model CommonVmwareProtectionParams -type CommonVmwareProtectionParams struct { - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` - - // Specifies whether or not to fallback to a crash consistent snapshot in the event that an app consistent snapshot fails. This parameter defaults to true and only changes the behavior of the operation if 'appConsistentSnapshot' is set to 'true'. - FallbackToCrashConsistentSnapshot *bool `json:"fallbackToCrashConsistentSnapshot,omitempty"` - - // Specifies whether or not to skip backing up physical RDM disks. Physical RDM disks cannot be backed up, so if you attempt to backup a VM with physical RDM disks and this value is set to 'false', then those VM backups will fail. - SkipPhysicalRDMDisks *bool `json:"skipPhysicalRDMDisks,omitempty"` - - // Specifies the indexing policy for VMs in this group. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the pre and post script parameters associated with a given backup. - PrePostScript *PrePostScriptParams `json:"prePostScript,omitempty"` - - // If this field is set to true, then the backup for the objects will be performed using dedicated storage area network (SAN) instead of LAN or managment network. - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // If this field is set to true and SAN transport backup fails, then backup will fallback to use NBDSSL transport. This field only applies if 'leverageSanTransport' is set to true. - EnableNBDSSLFallback *bool `json:"enableNBDSSLFallback,omitempty"` -} - -// Validate validates this common vmware protection params -func (m *CommonVmwareProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonVmwareProtectionParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonVmwareProtectionParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this common vmware protection params based on the context it is used -func (m *CommonVmwareProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CommonVmwareProtectionParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *CommonVmwareProtectionParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CommonVmwareProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CommonVmwareProtectionParams) UnmarshalBinary(b []byte) error { - var res CommonVmwareProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/component_removal_progress.go b/v2/models/component_removal_progress.go deleted file mode 100644 index f9ba0e4c..00000000 --- a/v2/models/component_removal_progress.go +++ /dev/null @@ -1,64 +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" -) - -// ComponentRemovalProgress Component Removal Progress -// -// Specifies the removal progress details for services that are not acked yet. -// -// swagger:model ComponentRemovalProgress -type ComponentRemovalProgress struct { - - // Specifies service name. - ServiceName *string `json:"serviceName,omitempty"` - - // Specifies removal progress details. - RemovalProgress *string `json:"removalProgress,omitempty"` - - // Specifies the overall progress percentage for the service. - ProgressPercentage *int32 `json:"progressPercentage,omitempty"` - - // Specifies the total duration in seconds left to Ack the service. - TimeRemaining *int64 `json:"timeRemaining,omitempty"` - - // Specifies if the removal is stuck. - IsRemovalStuck *bool `json:"isRemovalStuck,omitempty"` -} - -// Validate validates this component removal progress -func (m *ComponentRemovalProgress) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this component removal progress based on context it is used -func (m *ComponentRemovalProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ComponentRemovalProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ComponentRemovalProgress) UnmarshalBinary(b []byte) error { - var res ComponentRemovalProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/compression_params.go b/v2/models/compression_params.go deleted file mode 100644 index f18286c4..00000000 --- a/v2/models/compression_params.go +++ /dev/null @@ -1,113 +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" -) - -// CompressionParams Compression Parameters -// -// Specifies parameters for compression. -// -// swagger:model CompressionParams -type CompressionParams struct { - - // Specifies copmpression type for a Storage Domain. - // Enum: ["None","Low","High"] - Type *string `json:"type,omitempty"` - - // Specifies whether inline compression is enabled. This field is appliciable only if inlineDeduplicationEnabled is set to true and compression is enabled. - InlineEnabled *bool `json:"inlineEnabled,omitempty"` -} - -// Validate validates this compression params -func (m *CompressionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var compressionParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Low","High"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - compressionParamsTypeTypePropEnum = append(compressionParamsTypeTypePropEnum, v) - } -} - -const ( - - // CompressionParamsTypeNone captures enum value "None" - CompressionParamsTypeNone string = "None" - - // CompressionParamsTypeLow captures enum value "Low" - CompressionParamsTypeLow string = "Low" - - // CompressionParamsTypeHigh captures enum value "High" - CompressionParamsTypeHigh string = "High" -) - -// prop value enum -func (m *CompressionParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, compressionParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CompressionParams) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this compression params based on context it is used -func (m *CompressionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CompressionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompressionParams) UnmarshalBinary(b []byte) error { - var res CompressionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/compression_type.go b/v2/models/compression_type.go deleted file mode 100644 index 610eaa0e..00000000 --- a/v2/models/compression_type.go +++ /dev/null @@ -1,110 +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" -) - -// CompressionType Target Compression Type -// -// Specifies the compression type of the external target. -// -// swagger:model CompressionType -type CompressionType struct { - - // Specifies the compression type of the external target. - // Enum: ["None","Low","High"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this compression type -func (m *CompressionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var compressionTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Low","High"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - compressionTypeTypeEnumPropEnum = append(compressionTypeTypeEnumPropEnum, v) - } -} - -const ( - - // CompressionTypeEnumNone captures enum value "None" - CompressionTypeEnumNone string = "None" - - // CompressionTypeEnumLow captures enum value "Low" - CompressionTypeEnumLow string = "Low" - - // CompressionTypeEnumHigh captures enum value "High" - CompressionTypeEnumHigh string = "High" -) - -// prop value enum -func (m *CompressionType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, compressionTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CompressionType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this compression type based on context it is used -func (m *CompressionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CompressionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CompressionType) UnmarshalBinary(b []byte) error { - var res CompressionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connection_bandwidth_limits.go b/v2/models/connection_bandwidth_limits.go deleted file mode 100644 index 9cd97166..00000000 --- a/v2/models/connection_bandwidth_limits.go +++ /dev/null @@ -1,209 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ConnectionBandwidthLimits Connection Bandwidth Limits -// -// ConnectionBandwidthLimits represents the network bandwidth limits while uploading/downloading data to/from the SaaS Connection. -// -// swagger:model ConnectionBandwidthLimits -type ConnectionBandwidthLimits struct { - - // Specifies the max rate limit at which we download the data. - Download []*BandwidthLimit `json:"download"` - - // Specifies the max rate limit at which we upload the data. - Upload []*BandwidthLimit `json:"upload"` - - // The tenant Id corresponding to this request. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies a time zone for the specified time period. The time zone is defined in the following format: 'Area/Location', for example: 'America/New_York'. - Timezone *string `json:"timezone,omitempty"` - - // Specifies the connector group id of connector groups. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` -} - -// Validate validates this connection bandwidth limits -func (m *ConnectionBandwidthLimits) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDownload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectionBandwidthLimits) validateDownload(formats strfmt.Registry) error { - if swag.IsZero(m.Download) { // not required - return nil - } - - for i := 0; i < len(m.Download); i++ { - if swag.IsZero(m.Download[i]) { // not required - continue - } - - if m.Download[i] != nil { - if err := m.Download[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConnectionBandwidthLimits) validateUpload(formats strfmt.Registry) error { - if swag.IsZero(m.Upload) { // not required - return nil - } - - for i := 0; i < len(m.Upload); i++ { - if swag.IsZero(m.Upload[i]) { // not required - continue - } - - if m.Upload[i] != nil { - if err := m.Upload[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConnectionBandwidthLimits) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this connection bandwidth limits based on the context it is used -func (m *ConnectionBandwidthLimits) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDownload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectionBandwidthLimits) contextValidateDownload(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Download); i++ { - - if m.Download[i] != nil { - - if swag.IsZero(m.Download[i]) { // not required - return nil - } - - if err := m.Download[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ConnectionBandwidthLimits) contextValidateUpload(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Upload); i++ { - - if m.Upload[i] != nil { - - if swag.IsZero(m.Upload[i]) { // not required - return nil - } - - if err := m.Upload[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectionBandwidthLimits) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectionBandwidthLimits) UnmarshalBinary(b []byte) error { - var res ConnectionBandwidthLimits - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connection_config.go b/v2/models/connection_config.go deleted file mode 100644 index b8af472b..00000000 --- a/v2/models/connection_config.go +++ /dev/null @@ -1,56 +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" -) - -// ConnectionConfig Specifies a connection associated with the source. -// -// swagger:model ConnectionConfig -type ConnectionConfig struct { - - // Specifies the id of the connection. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the entity id of the source. The source can a non-root entity. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the connector group id of connector groups. - ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` -} - -// Validate validates this connection config -func (m *ConnectionConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this connection config based on context it is used -func (m *ConnectionConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectionConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectionConfig) UnmarshalBinary(b []byte) error { - var res ConnectionConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connectivity_check_response_body.go b/v2/models/connectivity_check_response_body.go deleted file mode 100644 index 1431039b..00000000 --- a/v2/models/connectivity_check_response_body.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConnectivityCheckResponseBody Connectivity Check Response. -// -// Specify the results after checking connectivity on endpoints. -// -// swagger:model ConnectivityCheckResponseBody -type ConnectivityCheckResponseBody struct { - - // Specifies the results of the nodes in the cluster. - Nodes []*NodeEndpointState `json:"Nodes"` -} - -// Validate validates this connectivity check response body -func (m *ConnectivityCheckResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectivityCheckResponseBody) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this connectivity check response body based on the context it is used -func (m *ConnectivityCheckResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectivityCheckResponseBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectivityCheckResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectivityCheckResponseBody) UnmarshalBinary(b []byte) error { - var res ConnectivityCheckResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connectivity_status.go b/v2/models/connectivity_status.go deleted file mode 100644 index a8804647..00000000 --- a/v2/models/connectivity_status.go +++ /dev/null @@ -1,111 +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" -) - -// ConnectivityStatus Specifies the connectivity status from rigel to endpoints. -// -// swagger:model ConnectivityStatus -type ConnectivityStatus struct { - - // Specifies the connectivity status from rigel to endpoints. - // Enum: ["kStateUnknown","kStateOk","kStateFail","kStateInProgress"] - Type string `json:"type,omitempty"` -} - -// Validate validates this connectivity status -func (m *ConnectivityStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var connectivityStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStateUnknown","kStateOk","kStateFail","kStateInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - connectivityStatusTypeTypePropEnum = append(connectivityStatusTypeTypePropEnum, v) - } -} - -const ( - - // ConnectivityStatusTypeKStateUnknown captures enum value "kStateUnknown" - ConnectivityStatusTypeKStateUnknown string = "kStateUnknown" - - // ConnectivityStatusTypeKStateOk captures enum value "kStateOk" - ConnectivityStatusTypeKStateOk string = "kStateOk" - - // ConnectivityStatusTypeKStateFail captures enum value "kStateFail" - ConnectivityStatusTypeKStateFail string = "kStateFail" - - // ConnectivityStatusTypeKStateInProgress captures enum value "kStateInProgress" - ConnectivityStatusTypeKStateInProgress string = "kStateInProgress" -) - -// prop value enum -func (m *ConnectivityStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, connectivityStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConnectivityStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this connectivity status based on context it is used -func (m *ConnectivityStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectivityStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectivityStatus) UnmarshalBinary(b []byte) error { - var res ConnectivityStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_aws_metadata.go b/v2/models/connector_aws_metadata.go deleted file mode 100644 index 9cd3f5a1..00000000 --- a/v2/models/connector_aws_metadata.go +++ /dev/null @@ -1,71 +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" -) - -// ConnectorAwsMetadata Specifies AWS specific instance metadata details. -// -// swagger:model ConnectorAwsMetadata -type ConnectorAwsMetadata struct { - - // AWS EC2 instance id. - // Required: true - AwsInstanceID *string `json:"awsInstanceId"` -} - -// Validate validates this connector aws metadata -func (m *ConnectorAwsMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsInstanceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorAwsMetadata) validateAwsInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("awsInstanceId", "body", m.AwsInstanceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this connector aws metadata based on context it is used -func (m *ConnectorAwsMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorAwsMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorAwsMetadata) UnmarshalBinary(b []byte) error { - var res ConnectorAwsMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_azure_metadata.go b/v2/models/connector_azure_metadata.go deleted file mode 100644 index 0750aae2..00000000 --- a/v2/models/connector_azure_metadata.go +++ /dev/null @@ -1,88 +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" -) - -// ConnectorAzureMetadata Specifies Azure specific instance metadata details. -// -// swagger:model ConnectorAzureMetadata -type ConnectorAzureMetadata struct { - - // Azure VM id. - // Required: true - AzureVMID *string `json:"azureVmId"` - - // Maximum number of data disks which could be attached to rigel VM. - // Required: true - MaxDataDiskCount *int64 `json:"maxDataDiskCount"` -} - -// Validate validates this connector azure metadata -func (m *ConnectorAzureMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzureVMID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxDataDiskCount(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorAzureMetadata) validateAzureVMID(formats strfmt.Registry) error { - - if err := validate.Required("azureVmId", "body", m.AzureVMID); err != nil { - return err - } - - return nil -} - -func (m *ConnectorAzureMetadata) validateMaxDataDiskCount(formats strfmt.Registry) error { - - if err := validate.Required("maxDataDiskCount", "body", m.MaxDataDiskCount); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this connector azure metadata based on context it is used -func (m *ConnectorAzureMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorAzureMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorAzureMetadata) UnmarshalBinary(b []byte) error { - var res ConnectorAzureMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_cloud_metadata.go b/v2/models/connector_cloud_metadata.go deleted file mode 100644 index 89cb4091..00000000 --- a/v2/models/connector_cloud_metadata.go +++ /dev/null @@ -1,160 +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" -) - -// ConnectorCloudMetadata Specifies cloud specific metadata details if any. -// -// swagger:model ConnectorCloudMetadata -type ConnectorCloudMetadata struct { - - // Specifies AWS cloud specific metadata details if any. - ConnectorAwsMetadata *ConnectorAwsMetadata `json:"connectorAwsMetadata,omitempty"` - - // Specifies Azure cloud specific metadata details if any. - ConnectorAzureMetadata *ConnectorAzureMetadata `json:"connectorAzureMetadata,omitempty"` -} - -// Validate validates this connector cloud metadata -func (m *ConnectorCloudMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectorAwsMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorAzureMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorCloudMetadata) validateConnectorAwsMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorAwsMetadata) { // not required - return nil - } - - if m.ConnectorAwsMetadata != nil { - if err := m.ConnectorAwsMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorAwsMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorAwsMetadata") - } - return err - } - } - - return nil -} - -func (m *ConnectorCloudMetadata) validateConnectorAzureMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorAzureMetadata) { // not required - return nil - } - - if m.ConnectorAzureMetadata != nil { - if err := m.ConnectorAzureMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorAzureMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorAzureMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this connector cloud metadata based on the context it is used -func (m *ConnectorCloudMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectorAwsMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnectorAzureMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConnectorCloudMetadata) contextValidateConnectorAwsMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectorAwsMetadata != nil { - - if swag.IsZero(m.ConnectorAwsMetadata) { // not required - return nil - } - - if err := m.ConnectorAwsMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorAwsMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorAwsMetadata") - } - return err - } - } - - return nil -} - -func (m *ConnectorCloudMetadata) contextValidateConnectorAzureMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectorAzureMetadata != nil { - - if swag.IsZero(m.ConnectorAzureMetadata) { // not required - return nil - } - - if err := m.ConnectorAzureMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorAzureMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorAzureMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorCloudMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorCloudMetadata) UnmarshalBinary(b []byte) error { - var res ConnectorCloudMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_connection_info.go b/v2/models/connector_connection_info.go deleted file mode 100644 index e4667dc9..00000000 --- a/v2/models/connector_connection_info.go +++ /dev/null @@ -1,58 +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" -) - -// ConnectorConnectionInfo Connection Info. -// -// Specifies the connection info of a connector. -// -// swagger:model ConnectorConnectionInfo -type ConnectorConnectionInfo struct { - - // Specifies whether the connector is currently connected to cohesity server. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies possible error message when the connector is not able to connect. - Message *string `json:"message,omitempty"` - - // Specifies last timestamp for which connection status was known. - LastConnectedTimestampMsecs *int64 `json:"lastConnectedTimestampMsecs,omitempty"` -} - -// Validate validates this connector connection info -func (m *ConnectorConnectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this connector connection info based on context it is used -func (m *ConnectorConnectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorConnectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorConnectionInfo) UnmarshalBinary(b []byte) error { - var res ConnectorConnectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_group.go b/v2/models/connector_group.go deleted file mode 100644 index 3e8daa02..00000000 --- a/v2/models/connector_group.go +++ /dev/null @@ -1,58 +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" -) - -// ConnectorGroup Connector Group -// -// Specify a group of connectors. -// -// swagger:model ConnectorGroup -type ConnectorGroup struct { - - // Specifies the id of the group. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the group. - Name *string `json:"name,omitempty"` - - // Specifies the ids of the connectors in the group. - Connectors []int64 `json:"connectors"` -} - -// Validate validates this connector group -func (m *ConnectorGroup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this connector group based on context it is used -func (m *ConnectorGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorGroup) UnmarshalBinary(b []byte) error { - var res ConnectorGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/connector_type.go b/v2/models/connector_type.go deleted file mode 100644 index 1cb4ac7c..00000000 --- a/v2/models/connector_type.go +++ /dev/null @@ -1,52 +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" -) - -// ConnectorType Connector Type. -// -// connector type. -// -// swagger:model ConnectorType -type ConnectorType struct { - - // connector type. - Type string `json:"type,omitempty"` -} - -// Validate validates this connector type -func (m *ConnectorType) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this connector type based on context it is used -func (m *ConnectorType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectorType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectorType) UnmarshalBinary(b []byte) error { - var res ConnectorType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/construct_meta_info_params.go b/v2/models/construct_meta_info_params.go deleted file mode 100644 index 527ae42c..00000000 --- a/v2/models/construct_meta_info_params.go +++ /dev/null @@ -1,180 +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" -) - -// ConstructMetaInfoParams ConstructMetaInfoParams -// -// # Params to construct meta info -// -// swagger:model ConstructMetaInfoParams -type ConstructMetaInfoParams struct { - - // Specifies the environment type of the Protection group - // Required: true - Environment *string `json:"environment"` - - // Oracle Params to construct meta info for alternate restore or clone. - OracleParams *ConstructRestoreMetaInfoOracleParams `json:"oracleParams,omitempty"` - - // Specifies params to construct list of dependent objects. - SfdcParams *ConstructMetaInfoSfdcParams `json:"sfdcParams,omitempty"` -} - -// Validate validates this construct meta info params -func (m *ConstructMetaInfoParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConstructMetaInfoParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - return nil -} - -func (m *ConstructMetaInfoParams) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoParams) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this construct meta info params based on the context it is used -func (m *ConstructMetaInfoParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConstructMetaInfoParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConstructMetaInfoParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConstructMetaInfoParams) UnmarshalBinary(b []byte) error { - var res ConstructMetaInfoParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/construct_meta_info_request.go b/v2/models/construct_meta_info_request.go deleted file mode 100644 index e06e500a..00000000 --- a/v2/models/construct_meta_info_request.go +++ /dev/null @@ -1,180 +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" -) - -// ConstructMetaInfoRequest ConstructMetaInfoRequest -// -// # Params to construct meta info -// -// swagger:model ConstructMetaInfoRequest -type ConstructMetaInfoRequest struct { - - // Specifies the environment type of the Protection group - // Required: true - Environment *string `json:"environment"` - - // Oracle Params to construct meta info for alternate restore or clone. - OracleParams *ConstructRestoreMetaInfoOracleParams `json:"oracleParams,omitempty"` - - // Specifies params to construct list of dependent objects. - SfdcParams *ConstructMetaInfoSfdcParams `json:"sfdcParams,omitempty"` -} - -// Validate validates this construct meta info request -func (m *ConstructMetaInfoRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConstructMetaInfoRequest) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - return nil -} - -func (m *ConstructMetaInfoRequest) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoRequest) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this construct meta info request based on the context it is used -func (m *ConstructMetaInfoRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConstructMetaInfoRequest) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoRequest) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConstructMetaInfoRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConstructMetaInfoRequest) UnmarshalBinary(b []byte) error { - var res ConstructMetaInfoRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/construct_meta_info_result.go b/v2/models/construct_meta_info_result.go deleted file mode 100644 index 4d5ec564..00000000 --- a/v2/models/construct_meta_info_result.go +++ /dev/null @@ -1,355 +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" -) - -// ConstructMetaInfoResult ConstructMetaInfoResult -// -// Result to store meta-info from an object snapshot and additional information. -// -// swagger:model ConstructMetaInfoResult -type ConstructMetaInfoResult struct { - - // Specifies the environment type for fetching the meta Info. - // 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"` - - // Specifies 3 Maps required to fill pfile text box. - OracleParams *OracleRestoreMetaInfoResult `json:"oracleParams,omitempty"` - - // Specifies the meta info params for salesforce object. - SfdcParams *SfdcMetaInfoResult `json:"sfdcParams,omitempty"` -} - -// Validate validates this construct meta info result -func (m *ConstructMetaInfoResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var constructMetaInfoResultTypeEnvironmentPropEnum []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 { - constructMetaInfoResultTypeEnvironmentPropEnum = append(constructMetaInfoResultTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ConstructMetaInfoResultEnvironmentKVMware captures enum value "kVMware" - ConstructMetaInfoResultEnvironmentKVMware string = "kVMware" - - // ConstructMetaInfoResultEnvironmentKHyperV captures enum value "kHyperV" - ConstructMetaInfoResultEnvironmentKHyperV string = "kHyperV" - - // ConstructMetaInfoResultEnvironmentKVCD captures enum value "kVCD" - ConstructMetaInfoResultEnvironmentKVCD string = "kVCD" - - // ConstructMetaInfoResultEnvironmentKAzure captures enum value "kAzure" - ConstructMetaInfoResultEnvironmentKAzure string = "kAzure" - - // ConstructMetaInfoResultEnvironmentKGCP captures enum value "kGCP" - ConstructMetaInfoResultEnvironmentKGCP string = "kGCP" - - // ConstructMetaInfoResultEnvironmentKKVM captures enum value "kKVM" - ConstructMetaInfoResultEnvironmentKKVM string = "kKVM" - - // ConstructMetaInfoResultEnvironmentKAcropolis captures enum value "kAcropolis" - ConstructMetaInfoResultEnvironmentKAcropolis string = "kAcropolis" - - // ConstructMetaInfoResultEnvironmentKAWS captures enum value "kAWS" - ConstructMetaInfoResultEnvironmentKAWS string = "kAWS" - - // ConstructMetaInfoResultEnvironmentKAWSNative captures enum value "kAWSNative" - ConstructMetaInfoResultEnvironmentKAWSNative string = "kAWSNative" - - // ConstructMetaInfoResultEnvironmentKAwsS3 captures enum value "kAwsS3" - ConstructMetaInfoResultEnvironmentKAwsS3 string = "kAwsS3" - - // ConstructMetaInfoResultEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ConstructMetaInfoResultEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // ConstructMetaInfoResultEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ConstructMetaInfoResultEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ConstructMetaInfoResultEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ConstructMetaInfoResultEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ConstructMetaInfoResultEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ConstructMetaInfoResultEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ConstructMetaInfoResultEnvironmentKAzureNative captures enum value "kAzureNative" - ConstructMetaInfoResultEnvironmentKAzureNative string = "kAzureNative" - - // ConstructMetaInfoResultEnvironmentKAzureSQL captures enum value "kAzureSQL" - ConstructMetaInfoResultEnvironmentKAzureSQL string = "kAzureSQL" - - // ConstructMetaInfoResultEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - ConstructMetaInfoResultEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // ConstructMetaInfoResultEnvironmentKPhysical captures enum value "kPhysical" - ConstructMetaInfoResultEnvironmentKPhysical string = "kPhysical" - - // ConstructMetaInfoResultEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ConstructMetaInfoResultEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ConstructMetaInfoResultEnvironmentKGPFS captures enum value "kGPFS" - ConstructMetaInfoResultEnvironmentKGPFS string = "kGPFS" - - // ConstructMetaInfoResultEnvironmentKElastifile captures enum value "kElastifile" - ConstructMetaInfoResultEnvironmentKElastifile string = "kElastifile" - - // ConstructMetaInfoResultEnvironmentKNetapp captures enum value "kNetapp" - ConstructMetaInfoResultEnvironmentKNetapp string = "kNetapp" - - // ConstructMetaInfoResultEnvironmentKGenericNas captures enum value "kGenericNas" - ConstructMetaInfoResultEnvironmentKGenericNas string = "kGenericNas" - - // ConstructMetaInfoResultEnvironmentKIsilon captures enum value "kIsilon" - ConstructMetaInfoResultEnvironmentKIsilon string = "kIsilon" - - // ConstructMetaInfoResultEnvironmentKFlashBlade captures enum value "kFlashBlade" - ConstructMetaInfoResultEnvironmentKFlashBlade string = "kFlashBlade" - - // ConstructMetaInfoResultEnvironmentKPure captures enum value "kPure" - ConstructMetaInfoResultEnvironmentKPure string = "kPure" - - // ConstructMetaInfoResultEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ConstructMetaInfoResultEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ConstructMetaInfoResultEnvironmentKSQL captures enum value "kSQL" - ConstructMetaInfoResultEnvironmentKSQL string = "kSQL" - - // ConstructMetaInfoResultEnvironmentKExchange captures enum value "kExchange" - ConstructMetaInfoResultEnvironmentKExchange string = "kExchange" - - // ConstructMetaInfoResultEnvironmentKAD captures enum value "kAD" - ConstructMetaInfoResultEnvironmentKAD string = "kAD" - - // ConstructMetaInfoResultEnvironmentKOracle captures enum value "kOracle" - ConstructMetaInfoResultEnvironmentKOracle string = "kOracle" - - // ConstructMetaInfoResultEnvironmentKView captures enum value "kView" - ConstructMetaInfoResultEnvironmentKView string = "kView" - - // ConstructMetaInfoResultEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - ConstructMetaInfoResultEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // ConstructMetaInfoResultEnvironmentKO365 captures enum value "kO365" - ConstructMetaInfoResultEnvironmentKO365 string = "kO365" - - // ConstructMetaInfoResultEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ConstructMetaInfoResultEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // ConstructMetaInfoResultEnvironmentKO365Teams captures enum value "kO365Teams" - ConstructMetaInfoResultEnvironmentKO365Teams string = "kO365Teams" - - // ConstructMetaInfoResultEnvironmentKO365Group captures enum value "kO365Group" - ConstructMetaInfoResultEnvironmentKO365Group string = "kO365Group" - - // ConstructMetaInfoResultEnvironmentKO365Exchange captures enum value "kO365Exchange" - ConstructMetaInfoResultEnvironmentKO365Exchange string = "kO365Exchange" - - // ConstructMetaInfoResultEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ConstructMetaInfoResultEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ConstructMetaInfoResultEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ConstructMetaInfoResultEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ConstructMetaInfoResultEnvironmentKKubernetes captures enum value "kKubernetes" - ConstructMetaInfoResultEnvironmentKKubernetes string = "kKubernetes" - - // ConstructMetaInfoResultEnvironmentKCassandra captures enum value "kCassandra" - ConstructMetaInfoResultEnvironmentKCassandra string = "kCassandra" - - // ConstructMetaInfoResultEnvironmentKMongoDB captures enum value "kMongoDB" - ConstructMetaInfoResultEnvironmentKMongoDB string = "kMongoDB" - - // ConstructMetaInfoResultEnvironmentKCouchbase captures enum value "kCouchbase" - ConstructMetaInfoResultEnvironmentKCouchbase string = "kCouchbase" - - // ConstructMetaInfoResultEnvironmentKHdfs captures enum value "kHdfs" - ConstructMetaInfoResultEnvironmentKHdfs string = "kHdfs" - - // ConstructMetaInfoResultEnvironmentKHive captures enum value "kHive" - ConstructMetaInfoResultEnvironmentKHive string = "kHive" - - // ConstructMetaInfoResultEnvironmentKHBase captures enum value "kHBase" - ConstructMetaInfoResultEnvironmentKHBase string = "kHBase" - - // ConstructMetaInfoResultEnvironmentKUDA captures enum value "kUDA" - ConstructMetaInfoResultEnvironmentKUDA string = "kUDA" - - // ConstructMetaInfoResultEnvironmentKSfdc captures enum value "kSfdc" - ConstructMetaInfoResultEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ConstructMetaInfoResult) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, constructMetaInfoResultTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConstructMetaInfoResult) 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 -} - -func (m *ConstructMetaInfoResult) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoResult) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this construct meta info result based on the context it is used -func (m *ConstructMetaInfoResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConstructMetaInfoResult) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ConstructMetaInfoResult) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConstructMetaInfoResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConstructMetaInfoResult) UnmarshalBinary(b []byte) error { - var res ConstructMetaInfoResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/construct_meta_info_sfdc_params.go b/v2/models/construct_meta_info_sfdc_params.go deleted file mode 100644 index 7db616fc..00000000 --- a/v2/models/construct_meta_info_sfdc_params.go +++ /dev/null @@ -1,109 +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" -) - -// ConstructMetaInfoSfdcParams ConstructMetaInfoSfdcParams -// -// Params to fetch meta info for a salesforce object. -// -// swagger:model ConstructMetaInfoSfdcParams -type ConstructMetaInfoSfdcParams struct { - - // Specifies the type of meta info to fetch for salesforce object. - // Required: true - // Enum: ["DependentObjects"] - MetaInfoType *string `json:"metaInfoType"` - - // Specifies the name of the object. - ObjectName *string `json:"objectName,omitempty"` -} - -// Validate validates this construct meta info sfdc params -func (m *ConstructMetaInfoSfdcParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetaInfoType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var constructMetaInfoSfdcParamsTypeMetaInfoTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DependentObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - constructMetaInfoSfdcParamsTypeMetaInfoTypePropEnum = append(constructMetaInfoSfdcParamsTypeMetaInfoTypePropEnum, v) - } -} - -const ( - - // ConstructMetaInfoSfdcParamsMetaInfoTypeDependentObjects captures enum value "DependentObjects" - ConstructMetaInfoSfdcParamsMetaInfoTypeDependentObjects string = "DependentObjects" -) - -// prop value enum -func (m *ConstructMetaInfoSfdcParams) validateMetaInfoTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, constructMetaInfoSfdcParamsTypeMetaInfoTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ConstructMetaInfoSfdcParams) validateMetaInfoType(formats strfmt.Registry) error { - - if err := validate.Required("metaInfoType", "body", m.MetaInfoType); err != nil { - return err - } - - // value enum - if err := m.validateMetaInfoTypeEnum("metaInfoType", "body", *m.MetaInfoType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this construct meta info sfdc params based on context it is used -func (m *ConstructMetaInfoSfdcParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConstructMetaInfoSfdcParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConstructMetaInfoSfdcParams) UnmarshalBinary(b []byte) error { - var res ConstructMetaInfoSfdcParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/construct_restore_meta_info_oracle_params.go b/v2/models/construct_restore_meta_info_oracle_params.go deleted file mode 100644 index 445bb165..00000000 --- a/v2/models/construct_restore_meta_info_oracle_params.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/strfmt" - "github.com/go-openapi/swag" -) - -// ConstructRestoreMetaInfoOracleParams ConstructRestoreMetaInfoOracleParams -// -// # Params to fetch oracle restore meta info -// -// swagger:model ConstructRestoreMetaInfoOracleParams -type ConstructRestoreMetaInfoOracleParams struct { - - // Specifies the name of the Oracle database that we restore to. - DbName *string `json:"dbName,omitempty"` - - // Specifies the base directory of Oracle at destination. - BaseDir *string `json:"baseDir,omitempty"` - - // Specifies the home directory of Oracle at destination. - HomeDir *string `json:"homeDir,omitempty"` - - // Specifies the location to put the database files(datafiles, logfiles etc.) - DbFileDestination *string `json:"dbFileDestination,omitempty"` - - // Specifies whether operation is clone or not - IsClone *bool `json:"isClone,omitempty"` - - // Specifies whether the operation is granular restore or not. - IsGranularRestore *bool `json:"isGranularRestore,omitempty"` - - // Specifies whether the operation is recovery validation or not. - IsRecoveryValidation *bool `json:"isRecoveryValidation,omitempty"` - - // Specifies whether the recovery is of type Disaster Recovery. - IsDisasterRecovery *bool `json:"isDisasterRecovery,omitempty"` -} - -// Validate validates this construct restore meta info oracle params -func (m *ConstructRestoreMetaInfoOracleParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this construct restore meta info oracle params based on context it is used -func (m *ConstructRestoreMetaInfoOracleParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConstructRestoreMetaInfoOracleParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConstructRestoreMetaInfoOracleParams) UnmarshalBinary(b []byte) error { - var res ConstructRestoreMetaInfoOracleParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/container_database_info.go b/v2/models/container_database_info.go deleted file mode 100644 index 278a1c80..00000000 --- a/v2/models/container_database_info.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ContainerDatabaseInfo Object details about Oracle container database. -// -// swagger:model ContainerDatabaseInfo -type ContainerDatabaseInfo struct { - - // Specifies the list of Pluggable databases within a container database. - PluggableDatabaseList []*PluggableDatabaseInfo `json:"pluggableDatabaseList"` -} - -// Validate validates this container database info -func (m *ContainerDatabaseInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePluggableDatabaseList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ContainerDatabaseInfo) validatePluggableDatabaseList(formats strfmt.Registry) error { - if swag.IsZero(m.PluggableDatabaseList) { // not required - return nil - } - - for i := 0; i < len(m.PluggableDatabaseList); i++ { - if swag.IsZero(m.PluggableDatabaseList[i]) { // not required - continue - } - - if m.PluggableDatabaseList[i] != nil { - if err := m.PluggableDatabaseList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluggableDatabaseList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pluggableDatabaseList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this container database info based on the context it is used -func (m *ContainerDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePluggableDatabaseList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ContainerDatabaseInfo) contextValidatePluggableDatabaseList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PluggableDatabaseList); i++ { - - if m.PluggableDatabaseList[i] != nil { - - if swag.IsZero(m.PluggableDatabaseList[i]) { // not required - return nil - } - - if err := m.PluggableDatabaseList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluggableDatabaseList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pluggableDatabaseList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ContainerDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ContainerDatabaseInfo) UnmarshalBinary(b []byte) error { - var res ContainerDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/continuous_snapshot_params.go b/v2/models/continuous_snapshot_params.go deleted file mode 100644 index 45039a38..00000000 --- a/v2/models/continuous_snapshot_params.go +++ /dev/null @@ -1,76 +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" -) - -// ContinuousSnapshotParams Continuous Snapshot Params -// -// Specifies the source snapshots to be taken even if there is a pending run in a protection group. -// -// swagger:model ContinuousSnapshotParams -type ContinuousSnapshotParams struct { - - // Specifies whether source snapshots should be taken even if there is a pending run. - // Required: true - IsEnabled *bool `json:"isEnabled"` - - // Specifies the maximum number of source snapshots allowed for a given object in a protection group. This is only applicable if isContinuousSnapshottingEnabled is set to true. - MaxAllowedSnapshots *int32 `json:"maxAllowedSnapshots,omitempty"` -} - -// Validate validates this continuous snapshot params -func (m *ContinuousSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ContinuousSnapshotParams) validateIsEnabled(formats strfmt.Registry) error { - - if err := validate.Required("isEnabled", "body", m.IsEnabled); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this continuous snapshot params based on context it is used -func (m *ContinuousSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ContinuousSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ContinuousSnapshotParams) UnmarshalBinary(b []byte) error { - var res ContinuousSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/couch_base_on_prem_search_params.go b/v2/models/couch_base_on_prem_search_params.go deleted file mode 100644 index 6f89741d..00000000 --- a/v2/models/couch_base_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// CouchBaseOnPremSearchParams CouchBaseOnPremSearchParams -// -// Parameters required to search CouchBase on a cluster. -// -// swagger:model CouchBaseOnPremSearchParams -type CouchBaseOnPremSearchParams struct { - CouchbaseSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CouchBaseOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CouchbaseSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CouchbaseSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CouchBaseOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CouchbaseSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this couch base on prem search params -func (m *CouchBaseOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CouchbaseSearchParams - if err := m.CouchbaseSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this couch base on prem search params based on the context it is used -func (m *CouchBaseOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CouchbaseSearchParams - if err := m.CouchbaseSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CouchBaseOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchBaseOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res CouchBaseOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/couchbase_indexed_object.go b/v2/models/couchbase_indexed_object.go deleted file mode 100644 index e8ad161d..00000000 --- a/v2/models/couchbase_indexed_object.go +++ /dev/null @@ -1,171 +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" -) - -// CouchbaseIndexedObject CouchbaseIndexedObject -// -// Specifies a Couchbase indexed object. -// -// swagger:model CouchbaseIndexedObject -type CouchbaseIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the Couchbase Object Type. For Couchbase this is alywas set to Bucket. - // Enum: ["CouchbaseBuckets"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CouchbaseIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CouchbaseIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this couchbase indexed object -func (m *CouchbaseIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var couchbaseIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CouchbaseBuckets"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - couchbaseIndexedObjectTypeTypePropEnum = append(couchbaseIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *CouchbaseIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, couchbaseIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CouchbaseIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this couchbase indexed object based on the context it is used -func (m *CouchbaseIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseIndexedObject) UnmarshalBinary(b []byte) error { - var res CouchbaseIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/couchbase_indexed_objects.go b/v2/models/couchbase_indexed_objects.go deleted file mode 100644 index 32cf5f63..00000000 --- a/v2/models/couchbase_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CouchbaseIndexedObjects Specifies the indexed Couchbase objects. -// -// swagger:model CouchbaseIndexedObjects -type CouchbaseIndexedObjects []*CouchbaseIndexedObject - -// Validate validates this couchbase indexed objects -func (m CouchbaseIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this couchbase indexed objects based on the context it is used -func (m CouchbaseIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/couchbase_params.go b/v2/models/couchbase_params.go deleted file mode 100644 index b333300c..00000000 --- a/v2/models/couchbase_params.go +++ /dev/null @@ -1,160 +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" -) - -// CouchbaseParams Recover Couchbase environment params. -// -// Specifies the recovery options specific to Couchbase environment. -// -// swagger:model CouchbaseParams -type CouchbaseParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Couchbase objects. - // Required: true - RecoverCouchbaseParams *RecoverCouchbaseParams `json:"recoverCouchbaseParams"` -} - -// Validate validates this couchbase params -func (m *CouchbaseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var couchbaseParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - couchbaseParamsTypeRecoveryActionPropEnum = append(couchbaseParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // CouchbaseParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - CouchbaseParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *CouchbaseParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, couchbaseParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CouchbaseParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *CouchbaseParams) validateRecoverCouchbaseParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverCouchbaseParams", "body", m.RecoverCouchbaseParams); err != nil { - return err - } - - if m.RecoverCouchbaseParams != nil { - if err := m.RecoverCouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverCouchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverCouchbaseParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this couchbase params based on the context it is used -func (m *CouchbaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CouchbaseParams) contextValidateRecoverCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverCouchbaseParams != nil { - - if err := m.RecoverCouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverCouchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverCouchbaseParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseParams) UnmarshalBinary(b []byte) error { - var res CouchbaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/couchbase_search_params.go b/v2/models/couchbase_search_params.go deleted file mode 100644 index 41b4761f..00000000 --- a/v2/models/couchbase_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CouchbaseSearchParams Specifies the parameters which are specific for searching Couchbase objects. -// -// swagger:model CouchbaseSearchParams -type CouchbaseSearchParams struct { - - // Specifies the search string to search the Couchbase Objects - // Required: true - SearchString *string `json:"searchString"` - - // Specifies Couchbase object types be searched. For Couchbase it can only be set to 'CouchbaseBuckets'. - // Required: true - CouchbaseObjectTypes []string `json:"couchbaseObjectTypes"` -} - -// Validate validates this couchbase search params -func (m *CouchbaseSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseObjectTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CouchbaseSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var couchbaseSearchParamsCouchbaseObjectTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CouchbaseBuckets"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - couchbaseSearchParamsCouchbaseObjectTypesItemsEnum = append(couchbaseSearchParamsCouchbaseObjectTypesItemsEnum, v) - } -} - -func (m *CouchbaseSearchParams) validateCouchbaseObjectTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, couchbaseSearchParamsCouchbaseObjectTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *CouchbaseSearchParams) validateCouchbaseObjectTypes(formats strfmt.Registry) error { - - if err := validate.Required("couchbaseObjectTypes", "body", m.CouchbaseObjectTypes); err != nil { - return err - } - - for i := 0; i < len(m.CouchbaseObjectTypes); i++ { - - // value enum - if err := m.validateCouchbaseObjectTypesItemsEnum("couchbaseObjectTypes"+"."+strconv.Itoa(i), "body", m.CouchbaseObjectTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this couchbase search params based on context it is used -func (m *CouchbaseSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CouchbaseSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseSearchParams) UnmarshalBinary(b []byte) error { - var res CouchbaseSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/couchbase_source_registration_params.go b/v2/models/couchbase_source_registration_params.go deleted file mode 100644 index c63b442e..00000000 --- a/v2/models/couchbase_source_registration_params.go +++ /dev/null @@ -1,221 +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" -) - -// CouchbaseSourceRegistrationParams Register Couchbase source request parameters. -// -// Specifies parameters to register Couchbase source. -// -// swagger:model CouchbaseSourceRegistrationParams -type CouchbaseSourceRegistrationParams struct { - Credentials - - // Specifies the IP Addresses or hostnames of the Couchbase cluster seed nodes. - // Required: true - // Min Items: 1 - // Unique: true - Seeds []string `json:"seeds"` - - // Set to true if connection to couchbase has to be using SSL. - // Required: true - IsSslRequired *bool `json:"isSslRequired"` - - // HTTP direct or HTTP SSL port. - // Required: true - HTTPPort *int32 `json:"httpPort"` - - // Carrier direct or Carrier SSL port. - // Required: true - CarrierPort *int32 `json:"carrierPort"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CouchbaseSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Credentials - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Credentials = aO0 - - // AO1 - var dataAO1 struct { - Seeds []string `json:"seeds"` - - IsSslRequired *bool `json:"isSslRequired"` - - HTTPPort *int32 `json:"httpPort"` - - CarrierPort *int32 `json:"carrierPort"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Seeds = dataAO1.Seeds - - m.IsSslRequired = dataAO1.IsSslRequired - - m.HTTPPort = dataAO1.HTTPPort - - m.CarrierPort = dataAO1.CarrierPort - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CouchbaseSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Credentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Seeds []string `json:"seeds"` - - IsSslRequired *bool `json:"isSslRequired"` - - HTTPPort *int32 `json:"httpPort"` - - CarrierPort *int32 `json:"carrierPort"` - } - - dataAO1.Seeds = m.Seeds - - dataAO1.IsSslRequired = m.IsSslRequired - - dataAO1.HTTPPort = m.HTTPPort - - dataAO1.CarrierPort = m.CarrierPort - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this couchbase source registration params -func (m *CouchbaseSourceRegistrationParams) 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 err := m.validateSeeds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsSslRequired(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHTTPPort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCarrierPort(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CouchbaseSourceRegistrationParams) validateSeeds(formats strfmt.Registry) error { - - if err := validate.Required("seeds", "body", m.Seeds); err != nil { - return err - } - - iSeedsSize := int64(len(m.Seeds)) - - if err := validate.MinItems("seeds", "body", iSeedsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("seeds", "body", m.Seeds); err != nil { - return err - } - - return nil -} - -func (m *CouchbaseSourceRegistrationParams) validateIsSslRequired(formats strfmt.Registry) error { - - if err := validate.Required("isSslRequired", "body", m.IsSslRequired); err != nil { - return err - } - - return nil -} - -func (m *CouchbaseSourceRegistrationParams) validateHTTPPort(formats strfmt.Registry) error { - - if err := validate.Required("httpPort", "body", m.HTTPPort); err != nil { - return err - } - - return nil -} - -func (m *CouchbaseSourceRegistrationParams) validateCarrierPort(formats strfmt.Registry) error { - - if err := validate.Required("carrierPort", "body", m.CarrierPort); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this couchbase source registration params based on the context it is used -func (m *CouchbaseSourceRegistrationParams) 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 *CouchbaseSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CouchbaseSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res CouchbaseSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/count_by_tier.go b/v2/models/count_by_tier.go deleted file mode 100644 index 0bcfaee1..00000000 --- a/v2/models/count_by_tier.go +++ /dev/null @@ -1,121 +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" -) - -// CountByTier Disk count By Tier. -// -// CountByTier provides the disk count of each storage tier. -// -// swagger:model CountByTier -type CountByTier struct { - - // DiskCount is the disk number of the storage tier. - DiskCount *int64 `json:"diskCount,omitempty"` - - // StorageTier is the type of StorageTier. - // StorageTierType represents the various values for the Storage Tier. - // 'kPCIeSSD' indicates storage tier type of Pci Solid State Drive. - // 'kSATAHDD' indicates storage tier type of SATA Solid State Drive. - // 'kSATAHDD' indicates storage tier type of SATA Hard Disk Drive. - // 'kCLOUD' indicates storage tier type of Cloud. - // Enum: ["PCIeSSD","SATASSD","SATAHDD","CLOUD"] - StorageTier *string `json:"storageTier,omitempty"` -} - -// Validate validates this count by tier -func (m *CountByTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageTier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var countByTierTypeStorageTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATASSD","SATAHDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - countByTierTypeStorageTierPropEnum = append(countByTierTypeStorageTierPropEnum, v) - } -} - -const ( - - // CountByTierStorageTierPCIeSSD captures enum value "PCIeSSD" - CountByTierStorageTierPCIeSSD string = "PCIeSSD" - - // CountByTierStorageTierSATASSD captures enum value "SATASSD" - CountByTierStorageTierSATASSD string = "SATASSD" - - // CountByTierStorageTierSATAHDD captures enum value "SATAHDD" - CountByTierStorageTierSATAHDD string = "SATAHDD" - - // CountByTierStorageTierCLOUD captures enum value "CLOUD" - CountByTierStorageTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *CountByTier) validateStorageTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, countByTierTypeStorageTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CountByTier) validateStorageTier(formats strfmt.Registry) error { - if swag.IsZero(m.StorageTier) { // not required - return nil - } - - // value enum - if err := m.validateStorageTierEnum("storageTier", "body", *m.StorageTier); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this count by tier based on context it is used -func (m *CountByTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CountByTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CountByTier) UnmarshalBinary(b []byte) error { - var res CountByTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_access_token_request_params.go b/v2/models/create_access_token_request_params.go deleted file mode 100644 index 9a36a33c..00000000 --- a/v2/models/create_access_token_request_params.go +++ /dev/null @@ -1,91 +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" -) - -// CreateAccessTokenRequestParams Specifies the Cohesity credentials required for creating an access token. -// -// swagger:model CreateAccessTokenRequestParams -type CreateAccessTokenRequestParams struct { - - // Specifies the login name of the Cohesity user. - // Required: true - Username *string `json:"username"` - - // Specifies the password of the Cohesity user account. - // Required: true - Password *string `json:"password"` - - // Specifies the domain the user is logging in to. For a local user the domain is LOCAL. For LDAP/AD user, the domain will map to a LDAP connection string. A user is uniquely identified by a combination of username and domain. LOCAL is the default domain. - Domain *string `json:"domain,omitempty"` -} - -// Validate validates this create access token request params -func (m *CreateAccessTokenRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAccessTokenRequestParams) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *CreateAccessTokenRequestParams) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create access token request params based on context it is used -func (m *CreateAccessTokenRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateAccessTokenRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateAccessTokenRequestParams) UnmarshalBinary(b []byte) error { - var res CreateAccessTokenRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_active_directory_request.go b/v2/models/create_active_directory_request.go deleted file mode 100644 index 0cbfd4b7..00000000 --- a/v2/models/create_active_directory_request.go +++ /dev/null @@ -1,205 +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" -) - -// CreateActiveDirectoryRequest Specifies the request to create an Active Directory. -// -// swagger:model CreateActiveDirectoryRequest -type CreateActiveDirectoryRequest struct { - CommonActiveDirectoryParams - - // Specifies the domain name of the Active Directory. - // Required: true - // Pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9]))*$ - DomainName *string `json:"domainName"` - - // Specifies if specified machine accounts should overwrite existing machine accounts. - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - // Specifies the params of a user with administrative privilege of this Active Directory. - // Required: true - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateActiveDirectoryRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonActiveDirectoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonActiveDirectoryParams = aO0 - - // AO1 - var dataAO1 struct { - DomainName *string `json:"domainName"` - - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DomainName = dataAO1.DomainName - - m.OverwriteMachineAccounts = dataAO1.OverwriteMachineAccounts - - m.ActiveDirectoryAdminParams = dataAO1.ActiveDirectoryAdminParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateActiveDirectoryRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonActiveDirectoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DomainName *string `json:"domainName"` - - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams"` - } - - dataAO1.DomainName = m.DomainName - - dataAO1.OverwriteMachineAccounts = m.OverwriteMachineAccounts - - dataAO1.ActiveDirectoryAdminParams = m.ActiveDirectoryAdminParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create active directory request -func (m *CreateActiveDirectoryRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomainName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateActiveDirectoryAdminParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateActiveDirectoryRequest) validateDomainName(formats strfmt.Registry) error { - - if err := validate.Required("domainName", "body", m.DomainName); err != nil { - return err - } - - if err := validate.Pattern("domainName", "body", *m.DomainName, `^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9]))*$`); err != nil { - return err - } - - return nil -} - -func (m *CreateActiveDirectoryRequest) validateActiveDirectoryAdminParams(formats strfmt.Registry) error { - - if err := validate.Required("activeDirectoryAdminParams", "body", m.ActiveDirectoryAdminParams); err != nil { - return err - } - - if m.ActiveDirectoryAdminParams != nil { - if err := m.ActiveDirectoryAdminParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create active directory request based on the context it is used -func (m *CreateActiveDirectoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateActiveDirectoryAdminParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateActiveDirectoryRequest) contextValidateActiveDirectoryAdminParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ActiveDirectoryAdminParams != nil { - - if err := m.ActiveDirectoryAdminParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateActiveDirectoryRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateActiveDirectoryRequest) UnmarshalBinary(b []byte) error { - var res CreateActiveDirectoryRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_antivirus_service_group_params.go b/v2/models/create_antivirus_service_group_params.go deleted file mode 100644 index 2834d9f6..00000000 --- a/v2/models/create_antivirus_service_group_params.go +++ /dev/null @@ -1,205 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateAntivirusServiceGroupParams Specifies the parameters to create an Antivirus Service group. -// -// swagger:model CreateAntivirusServiceGroupParams -type CreateAntivirusServiceGroupParams struct { - - // Specifies the Antivirus Service group name. - // Required: true - Name *string `json:"name"` - - // Specifies a list of Antivirus Services for this group. - // Required: true - // Min Items: 1 - AntivirusServices []*AntivirusService `json:"antivirusServices"` - - // This field is currently deprecated. Specifies whether the Antivirus Group is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies the description for the Antivirus Service group. - Description *string `json:"description,omitempty"` - - // Specifies the state[Enable, Disable] of the group. - // Enum: ["Enable","Disable"] - State *string `json:"state,omitempty"` -} - -// Validate validates this create antivirus service group params -func (m *CreateAntivirusServiceGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAntivirusServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAntivirusServiceGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateAntivirusServiceGroupParams) validateAntivirusServices(formats strfmt.Registry) error { - - if err := validate.Required("antivirusServices", "body", m.AntivirusServices); err != nil { - return err - } - - iAntivirusServicesSize := int64(len(m.AntivirusServices)) - - if err := validate.MinItems("antivirusServices", "body", iAntivirusServicesSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.AntivirusServices); i++ { - if swag.IsZero(m.AntivirusServices[i]) { // not required - continue - } - - if m.AntivirusServices[i] != nil { - if err := m.AntivirusServices[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var createAntivirusServiceGroupParamsTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Enable","Disable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createAntivirusServiceGroupParamsTypeStatePropEnum = append(createAntivirusServiceGroupParamsTypeStatePropEnum, v) - } -} - -const ( - - // CreateAntivirusServiceGroupParamsStateEnable captures enum value "Enable" - CreateAntivirusServiceGroupParamsStateEnable string = "Enable" - - // CreateAntivirusServiceGroupParamsStateDisable captures enum value "Disable" - CreateAntivirusServiceGroupParamsStateDisable string = "Disable" -) - -// prop value enum -func (m *CreateAntivirusServiceGroupParams) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createAntivirusServiceGroupParamsTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateAntivirusServiceGroupParams) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create antivirus service group params based on the context it is used -func (m *CreateAntivirusServiceGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAntivirusServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAntivirusServiceGroupParams) contextValidateAntivirusServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AntivirusServices); i++ { - - if m.AntivirusServices[i] != nil { - - if swag.IsZero(m.AntivirusServices[i]) { // not required - return nil - } - - if err := m.AntivirusServices[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusServices" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateAntivirusServiceGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateAntivirusServiceGroupParams) UnmarshalBinary(b []byte) error { - var res CreateAntivirusServiceGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_azure_application_request_params.go b/v2/models/create_azure_application_request_params.go deleted file mode 100644 index 315de0cb..00000000 --- a/v2/models/create_azure_application_request_params.go +++ /dev/null @@ -1,235 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateAzureApplicationRequestParams Azure Application Creation parameters -// -// # Specifies the request parameters for creating Azure Applications -// -// swagger:model CreateAzureApplicationRequestParams -type CreateAzureApplicationRequestParams struct { - - // Specifies the access token for Azure PowerShell Application access. - // Required: true - AccessToken *string `json:"accessToken"` - - // Specifies the username to access Microsoft365 source. - // Required: true - Username *string `json:"username"` - - // Specifies the region where Office 365 Exchange environment is. - // Enum: ["Default","China","Germany","UsDoD","UsGccHigh"] - Microsoft365Region *string `json:"microsoft365Region,omitempty"` - - // Specifies the count of Azure application to be created. - // Required: true - AppCount *int32 `json:"appCount"` - - // Specifies a list of Microsoft365 azure application credentials already added within the Microsoft365 source. - ExistingMicrosoft365AppCredentialsList []*Office365AppCredentials `json:"existingMicrosoft365AppCredentialsList"` -} - -// Validate validates this create azure application request params -func (m *CreateAzureApplicationRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessToken(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMicrosoft365Region(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppCount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExistingMicrosoft365AppCredentialsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAzureApplicationRequestParams) validateAccessToken(formats strfmt.Registry) error { - - if err := validate.Required("accessToken", "body", m.AccessToken); err != nil { - return err - } - - return nil -} - -func (m *CreateAzureApplicationRequestParams) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -var createAzureApplicationRequestParamsTypeMicrosoft365RegionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","China","Germany","UsDoD","UsGccHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createAzureApplicationRequestParamsTypeMicrosoft365RegionPropEnum = append(createAzureApplicationRequestParamsTypeMicrosoft365RegionPropEnum, v) - } -} - -const ( - - // CreateAzureApplicationRequestParamsMicrosoft365RegionDefault captures enum value "Default" - CreateAzureApplicationRequestParamsMicrosoft365RegionDefault string = "Default" - - // CreateAzureApplicationRequestParamsMicrosoft365RegionChina captures enum value "China" - CreateAzureApplicationRequestParamsMicrosoft365RegionChina string = "China" - - // CreateAzureApplicationRequestParamsMicrosoft365RegionGermany captures enum value "Germany" - CreateAzureApplicationRequestParamsMicrosoft365RegionGermany string = "Germany" - - // CreateAzureApplicationRequestParamsMicrosoft365RegionUsDoD captures enum value "UsDoD" - CreateAzureApplicationRequestParamsMicrosoft365RegionUsDoD string = "UsDoD" - - // CreateAzureApplicationRequestParamsMicrosoft365RegionUsGccHigh captures enum value "UsGccHigh" - CreateAzureApplicationRequestParamsMicrosoft365RegionUsGccHigh string = "UsGccHigh" -) - -// prop value enum -func (m *CreateAzureApplicationRequestParams) validateMicrosoft365RegionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createAzureApplicationRequestParamsTypeMicrosoft365RegionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateAzureApplicationRequestParams) validateMicrosoft365Region(formats strfmt.Registry) error { - if swag.IsZero(m.Microsoft365Region) { // not required - return nil - } - - // value enum - if err := m.validateMicrosoft365RegionEnum("microsoft365Region", "body", *m.Microsoft365Region); err != nil { - return err - } - - return nil -} - -func (m *CreateAzureApplicationRequestParams) validateAppCount(formats strfmt.Registry) error { - - if err := validate.Required("appCount", "body", m.AppCount); err != nil { - return err - } - - return nil -} - -func (m *CreateAzureApplicationRequestParams) validateExistingMicrosoft365AppCredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.ExistingMicrosoft365AppCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.ExistingMicrosoft365AppCredentialsList); i++ { - if swag.IsZero(m.ExistingMicrosoft365AppCredentialsList[i]) { // not required - continue - } - - if m.ExistingMicrosoft365AppCredentialsList[i] != nil { - if err := m.ExistingMicrosoft365AppCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingMicrosoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingMicrosoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create azure application request params based on the context it is used -func (m *CreateAzureApplicationRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExistingMicrosoft365AppCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAzureApplicationRequestParams) contextValidateExistingMicrosoft365AppCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExistingMicrosoft365AppCredentialsList); i++ { - - if m.ExistingMicrosoft365AppCredentialsList[i] != nil { - - if swag.IsZero(m.ExistingMicrosoft365AppCredentialsList[i]) { // not required - return nil - } - - if err := m.ExistingMicrosoft365AppCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingMicrosoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingMicrosoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateAzureApplicationRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateAzureApplicationRequestParams) UnmarshalBinary(b []byte) error { - var res CreateAzureApplicationRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_azure_application_response_params.go b/v2/models/create_azure_application_response_params.go deleted file mode 100644 index 1b2f0121..00000000 --- a/v2/models/create_azure_application_response_params.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateAzureApplicationResponseParams Azure Application Creation parameters -// -// Specifies the response parameters containing the Azure apps created within the Microsoft365 domain. -// -// swagger:model CreateAzureApplicationResponseParams -type CreateAzureApplicationResponseParams struct { - - // Specifies a list of Microsoft365 azure application credentials needed to authenticate & authorize users for Office 365. - // Min Items: 1 - Microsoft365AppCredentialsList []*Office365AppCredentials `json:"microsoft365AppCredentialsList"` -} - -// Validate validates this create azure application response params -func (m *CreateAzureApplicationResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMicrosoft365AppCredentialsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAzureApplicationResponseParams) validateMicrosoft365AppCredentialsList(formats strfmt.Registry) error { - if swag.IsZero(m.Microsoft365AppCredentialsList) { // not required - return nil - } - - iMicrosoft365AppCredentialsListSize := int64(len(m.Microsoft365AppCredentialsList)) - - if err := validate.MinItems("microsoft365AppCredentialsList", "body", iMicrosoft365AppCredentialsListSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Microsoft365AppCredentialsList); i++ { - if swag.IsZero(m.Microsoft365AppCredentialsList[i]) { // not required - continue - } - - if m.Microsoft365AppCredentialsList[i] != nil { - if err := m.Microsoft365AppCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("microsoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("microsoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create azure application response params based on the context it is used -func (m *CreateAzureApplicationResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMicrosoft365AppCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateAzureApplicationResponseParams) contextValidateMicrosoft365AppCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Microsoft365AppCredentialsList); i++ { - - if m.Microsoft365AppCredentialsList[i] != nil { - - if swag.IsZero(m.Microsoft365AppCredentialsList[i]) { // not required - return nil - } - - if err := m.Microsoft365AppCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("microsoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("microsoft365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateAzureApplicationResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateAzureApplicationResponseParams) UnmarshalBinary(b []byte) error { - var res CreateAzureApplicationResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_bifrost_connection_request.go b/v2/models/create_bifrost_connection_request.go deleted file mode 100644 index dd6ebc56..00000000 --- a/v2/models/create_bifrost_connection_request.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" -) - -// CreateBifrostConnectionRequest Create Or Update Bifrost Connection Request. -// -// Specify the params to create or update a connection of Bifrost. -// -// swagger:model CreateBifrostConnectionRequest -type CreateBifrostConnectionRequest struct { - - // Specifies the name of the connection. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this create bifrost connection request -func (m *CreateBifrostConnectionRequest) 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 *CreateBifrostConnectionRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create bifrost connection request based on context it is used -func (m *CreateBifrostConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateBifrostConnectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateBifrostConnectionRequest) UnmarshalBinary(b []byte) error { - var res CreateBifrostConnectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_cad_storage_domain_param.go b/v2/models/create_cad_storage_domain_param.go deleted file mode 100644 index d594dc5c..00000000 --- a/v2/models/create_cad_storage_domain_param.go +++ /dev/null @@ -1,71 +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" -) - -// CreateCadStorageDomainParam Sepcifies the parameters to create a CAD Storage Domain. -// -// swagger:model CreateCadStorageDomainParam -type CreateCadStorageDomainParam struct { - - // Specifies the external target id mapped to the CAD Storage Domain. - // Required: true - ExternalTargetID *int64 `json:"externalTargetId"` -} - -// Validate validates this create cad storage domain param -func (m *CreateCadStorageDomainParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExternalTargetID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateCadStorageDomainParam) validateExternalTargetID(formats strfmt.Registry) error { - - if err := validate.Required("externalTargetId", "body", m.ExternalTargetID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create cad storage domain param based on context it is used -func (m *CreateCadStorageDomainParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCadStorageDomainParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCadStorageDomainParam) UnmarshalBinary(b []byte) error { - var res CreateCadStorageDomainParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_clientcsr_response_body.go b/v2/models/create_clientcsr_response_body.go deleted file mode 100644 index 677ca463..00000000 --- a/v2/models/create_clientcsr_response_body.go +++ /dev/null @@ -1,67 +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" -) - -// CreateClientcsrResponseBody Create CSR response -// -// Specifies the response to creating the CSRs. -// -// swagger:model CreateClientcsrResponseBody -type CreateClientcsrResponseBody struct { - - // Specifies the public key generated for this CSR for the server. - PublicKeyServer *string `json:"publicKeyServer,omitempty"` - - // Specifies the CSR generated for the server. - CsrServer *string `json:"csrServer,omitempty"` - - // Specifies the public key generated for this CSR for the client. - PublicKeyClient *string `json:"publicKeyClient,omitempty"` - - // Specifies the CSR generated for the client. - CsrClient *string `json:"csrClient,omitempty"` - - // Specifies the path to CSR generated for the server - FileCsrServer *string `json:"fileCsrServer,omitempty"` - - // Specifies the path to CSR generated for the client - FileCsrClient *string `json:"fileCsrClient,omitempty"` -} - -// Validate validates this create clientcsr response body -func (m *CreateClientcsrResponseBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create clientcsr response body based on context it is used -func (m *CreateClientcsrResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateClientcsrResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateClientcsrResponseBody) UnmarshalBinary(b []byte) error { - var res CreateClientcsrResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_cloud_retrieve_task_request.go b/v2/models/create_cloud_retrieve_task_request.go deleted file mode 100644 index 9c229af7..00000000 --- a/v2/models/create_cloud_retrieve_task_request.go +++ /dev/null @@ -1,65 +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" -) - -// CreateCloudRetrieveTaskRequest Specifies create cloud retrieve task request parameters. -// -// swagger:model CreateCloudRetrieveTaskRequest -type CreateCloudRetrieveTaskRequest struct { - - // Specifies the array of vault IDs. - VaultIds []int64 `json:"vaultIds"` - - // Specifies the cluster ID. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies whether to retrieve all tasks. - RetrieveAllJobs *bool `json:"retrieveAllJobs,omitempty"` - - // Job ids to retrieve. - JobIds []string `json:"jobIds"` - - // Specifies the start time in microseconds and filter the task by the start time. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time in microseconds and filter the tasks by the end time. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` -} - -// Validate validates this create cloud retrieve task request -func (m *CreateCloudRetrieveTaskRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create cloud retrieve task request based on context it is used -func (m *CreateCloudRetrieveTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCloudRetrieveTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCloudRetrieveTaskRequest) UnmarshalBinary(b []byte) error { - var res CreateCloudRetrieveTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_cloud_retrieve_task_resp_body.go b/v2/models/create_cloud_retrieve_task_resp_body.go deleted file mode 100644 index 5e35534c..00000000 --- a/v2/models/create_cloud_retrieve_task_resp_body.go +++ /dev/null @@ -1,55 +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" -) - -// CreateCloudRetrieveTaskRespBody Create Cloud Retrieve Task Response. -// -// Specifies the response to create cloud retrieve tasks. -// -// swagger:model CreateCloudRetrieveTaskRespBody -type CreateCloudRetrieveTaskRespBody struct { - - // Specifies the cloud retrieve job Id - RetrieveJobID *string `json:"retrieveJobId,omitempty"` - - // Specifies the progress task id. - ProgressTaskID *int32 `json:"progressTaskId,omitempty"` -} - -// Validate validates this create cloud retrieve task resp body -func (m *CreateCloudRetrieveTaskRespBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create cloud retrieve task resp body based on context it is used -func (m *CreateCloudRetrieveTaskRespBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCloudRetrieveTaskRespBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCloudRetrieveTaskRespBody) UnmarshalBinary(b []byte) error { - var res CreateCloudRetrieveTaskRespBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_cluster_params.go b/v2/models/create_cluster_params.go deleted file mode 100644 index 053fc6e4..00000000 --- a/v2/models/create_cluster_params.go +++ /dev/null @@ -1,464 +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" -) - -// CreateClusterParams Create Cluster Request Parameters. -// -// Specifies the parameters required to create cluster. -// -// swagger:model CreateClusterParams -type CreateClusterParams struct { - - // Specifies the name of the new cluster. - // Required: true - Name *string `json:"name"` - - // Specifies the type of the new cluster. - // Required: true - // Enum: ["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"] - Type *string `json:"type"` - - // Specifies whether or not to enable encryption. If encryption is enabled, all data on the Cluster will be encrypted. This can only be enabled at Cluster creation time and cannot be disabled later. - // Required: true - EnableEncryption *bool `json:"enableEncryption"` - - // Specifies all of the parameters needed for network configuration of the new Cluster. - // Required: true - NetworkConfig *ClusterCreateNetworkConfig `json:"networkConfig"` - - // Specifies the proxy to use for external HTTP traffic. - ProxyServerConfig *ClusterProxyServerConfig `json:"proxyServerConfig,omitempty"` - - // Specifies the parameters which are specific to creation of physical cluster. It is required if clusterType is Physical. - PhysicalClusterParams *ClusterCreatePhysicalParams `json:"physicalClusterParams,omitempty"` - - // Specifies the parameters which are specific to creation of virtual cluster. It is required if clusterType is Virtual. - VirtualClusterParams *ClusterCreateVirtualParams `json:"virtualClusterParams,omitempty"` - - // Specifies the parameters which are specific to creation of cloud cluster. It is required if clusterType is Cloud. - CloudClusterParams *ClusterCreateCloudParams `json:"cloudClusterParams,omitempty"` - - // Specifies the parameters which are specific to creation of rigel cluster. It is required if clusterType is Rigel. - RigelClusterParams *ClusterCreateRigelParams `json:"rigelClusterParams,omitempty"` -} - -// Validate validates this create cluster params -func (m *CreateClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableEncryption(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyServerConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelClusterParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateClusterParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var createClusterParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Virtual","Cloud","Rigel","Unknown","HeliosOnPremVM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createClusterParamsTypeTypePropEnum = append(createClusterParamsTypeTypePropEnum, v) - } -} - -const ( - - // CreateClusterParamsTypePhysical captures enum value "Physical" - CreateClusterParamsTypePhysical string = "Physical" - - // CreateClusterParamsTypeVirtual captures enum value "Virtual" - CreateClusterParamsTypeVirtual string = "Virtual" - - // CreateClusterParamsTypeCloud captures enum value "Cloud" - CreateClusterParamsTypeCloud string = "Cloud" - - // CreateClusterParamsTypeRigel captures enum value "Rigel" - CreateClusterParamsTypeRigel string = "Rigel" - - // CreateClusterParamsTypeUnknown captures enum value "Unknown" - CreateClusterParamsTypeUnknown string = "Unknown" - - // CreateClusterParamsTypeHeliosOnPremVM captures enum value "HeliosOnPremVM" - CreateClusterParamsTypeHeliosOnPremVM string = "HeliosOnPremVM" -) - -// prop value enum -func (m *CreateClusterParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createClusterParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateClusterParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *CreateClusterParams) validateEnableEncryption(formats strfmt.Registry) error { - - if err := validate.Required("enableEncryption", "body", m.EnableEncryption); err != nil { - return err - } - - return nil -} - -func (m *CreateClusterParams) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *CreateClusterParams) validateProxyServerConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if m.ProxyServerConfig != nil { - if err := m.ProxyServerConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) validatePhysicalClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalClusterParams) { // not required - return nil - } - - if m.PhysicalClusterParams != nil { - if err := m.PhysicalClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) validateVirtualClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualClusterParams) { // not required - return nil - } - - if m.VirtualClusterParams != nil { - if err := m.VirtualClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) validateCloudClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.CloudClusterParams) { // not required - return nil - } - - if m.CloudClusterParams != nil { - if err := m.CloudClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) validateRigelClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.RigelClusterParams) { // not required - return nil - } - - if m.RigelClusterParams != nil { - if err := m.RigelClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClusterParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create cluster params based on the context it is used -func (m *CreateClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyServerConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRigelClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateClusterParams) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *CreateClusterParams) contextValidateProxyServerConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyServerConfig != nil { - - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if err := m.ProxyServerConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) contextValidatePhysicalClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalClusterParams != nil { - - if swag.IsZero(m.PhysicalClusterParams) { // not required - return nil - } - - if err := m.PhysicalClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) contextValidateVirtualClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualClusterParams != nil { - - if swag.IsZero(m.VirtualClusterParams) { // not required - return nil - } - - if err := m.VirtualClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) contextValidateCloudClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudClusterParams != nil { - - if swag.IsZero(m.CloudClusterParams) { // not required - return nil - } - - if err := m.CloudClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudClusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateClusterParams) contextValidateRigelClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RigelClusterParams != nil { - - if swag.IsZero(m.RigelClusterParams) { // not required - return nil - } - - if err := m.RigelClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClusterParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateClusterParams) UnmarshalBinary(b []byte) error { - var res CreateClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_cluster_vlan_params.go b/v2/models/create_cluster_vlan_params.go deleted file mode 100644 index 384c3429..00000000 --- a/v2/models/create_cluster_vlan_params.go +++ /dev/null @@ -1,132 +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" -) - -// CreateClusterVlanParams Parameters to create vlan on the cluster. -// -// swagger:model CreateClusterVlanParams -type CreateClusterVlanParams struct { - UpdateClusterVlanParams - - // Vlan interface name, it should be in interface_group_name.vlan_id format. - // Required: true - InterfaceName *string `json:"interfaceName"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateClusterVlanParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateClusterVlanParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateClusterVlanParams = aO0 - - // AO1 - var dataAO1 struct { - InterfaceName *string `json:"interfaceName"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.InterfaceName = dataAO1.InterfaceName - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateClusterVlanParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UpdateClusterVlanParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - InterfaceName *string `json:"interfaceName"` - } - - dataAO1.InterfaceName = m.InterfaceName - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create cluster vlan params -func (m *CreateClusterVlanParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateClusterVlanParams - if err := m.UpdateClusterVlanParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInterfaceName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateClusterVlanParams) validateInterfaceName(formats strfmt.Registry) error { - - if err := validate.Required("interfaceName", "body", m.InterfaceName); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create cluster vlan params based on the context it is used -func (m *CreateClusterVlanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateClusterVlanParams - if err := m.UpdateClusterVlanParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateClusterVlanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateClusterVlanParams) UnmarshalBinary(b []byte) error { - var res CreateClusterVlanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_csr_request.go b/v2/models/create_csr_request.go deleted file mode 100644 index 9101fac8..00000000 --- a/v2/models/create_csr_request.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" -) - -// CreateCsrRequest Create CSR Request. -// -// Specifies the request to create a CSR. -// -// swagger:model CreateCsrRequest -type CreateCsrRequest struct { - CommonCsrRequestParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateCsrRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCsrRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCsrRequestParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateCsrRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonCsrRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create csr request -func (m *CreateCsrRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrRequestParams - if err := m.CommonCsrRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create csr request based on the context it is used -func (m *CreateCsrRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrRequestParams - if err := m.CommonCsrRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCsrRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCsrRequest) UnmarshalBinary(b []byte) error { - var res CreateCsrRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_csr_response_body.go b/v2/models/create_csr_response_body.go deleted file mode 100644 index 1862085b..00000000 --- a/v2/models/create_csr_response_body.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" -) - -// CreateCsrResponseBody Create CSR response -// -// Specifies the response to create a CSR. -// -// swagger:model CreateCsrResponseBody -type CreateCsrResponseBody struct { - CommonCsrResponseParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateCsrResponseBody) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCsrResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCsrResponseParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateCsrResponseBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonCsrResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create csr response body -func (m *CreateCsrResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrResponseParams - if err := m.CommonCsrResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create csr response body based on the context it is used -func (m *CreateCsrResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCsrResponseParams - if err := m.CommonCsrResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateCsrResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateCsrResponseBody) UnmarshalBinary(b []byte) error { - var res CreateCsrResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_email_otp_request_body.go b/v2/models/create_email_otp_request_body.go deleted file mode 100644 index 2d0b9fdf..00000000 --- a/v2/models/create_email_otp_request_body.go +++ /dev/null @@ -1,60 +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" -) - -// CreateEmailOtpRequestBody Specifies user session request parameters -// -// swagger:model CreateEmailOtpRequestBody -type CreateEmailOtpRequestBody struct { - - // Specifies the login name of the Cohesity user - Username *string `json:"username,omitempty"` - - // Specifies the password of the Cohesity user - Password *string `json:"password,omitempty"` - - // Specifies the domain the user is logging in to. For a local user - // the domain is LOCAL. For LDAP/AD user, the domain will map to - // a LDAP connection string. A user is uniquely identified by a - // combination of username and domain. LOCAL is the default domain. - // - Domain *string `json:"domain,omitempty"` -} - -// Validate validates this create email otp request body -func (m *CreateEmailOtpRequestBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create email otp request body based on context it is used -func (m *CreateEmailOtpRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateEmailOtpRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateEmailOtpRequestBody) UnmarshalBinary(b []byte) error { - var res CreateEmailOtpRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_gaia_index_params.go b/v2/models/create_gaia_index_params.go deleted file mode 100644 index 8ade5412..00000000 --- a/v2/models/create_gaia_index_params.go +++ /dev/null @@ -1,280 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateGaiaIndexParams Specifies the Index documents params. -// -// swagger:model CreateGaiaIndexParams -type CreateGaiaIndexParams struct { - - // The objects and their snapshots to index. - // Required: true - Objects []*ObjectInfo `json:"objects"` - - // Opaque Id passed to emblem service on where to store the generated vector embeddings for these documents - CollectionID *string `json:"collectionId,omitempty"` - - // emblem service info - EmblemServiceInfo *EmblemServiceInfo `json:"emblemServiceInfo,omitempty"` - - // job handle - JobHandle *JobHandle `json:"jobHandle,omitempty"` - - // This determines the max document size we'll index in bytes. - MaxDocumentSize *ByteSize `json:"maxDocumentSize,omitempty"` -} - -// Validate validates this create gaia index params -func (m *CreateGaiaIndexParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmblemServiceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobHandle(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxDocumentSize(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateGaiaIndexParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateGaiaIndexParams) validateEmblemServiceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.EmblemServiceInfo) { // not required - return nil - } - - if m.EmblemServiceInfo != nil { - if err := m.EmblemServiceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emblemServiceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emblemServiceInfo") - } - return err - } - } - - return nil -} - -func (m *CreateGaiaIndexParams) validateJobHandle(formats strfmt.Registry) error { - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if m.JobHandle != nil { - if err := m.JobHandle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -func (m *CreateGaiaIndexParams) validateMaxDocumentSize(formats strfmt.Registry) error { - if swag.IsZero(m.MaxDocumentSize) { // not required - return nil - } - - if m.MaxDocumentSize != nil { - if err := m.MaxDocumentSize.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxDocumentSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxDocumentSize") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create gaia index params based on the context it is used -func (m *CreateGaiaIndexParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmblemServiceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateJobHandle(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxDocumentSize(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateGaiaIndexParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateGaiaIndexParams) contextValidateEmblemServiceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.EmblemServiceInfo != nil { - - if swag.IsZero(m.EmblemServiceInfo) { // not required - return nil - } - - if err := m.EmblemServiceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emblemServiceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emblemServiceInfo") - } - return err - } - } - - return nil -} - -func (m *CreateGaiaIndexParams) contextValidateJobHandle(ctx context.Context, formats strfmt.Registry) error { - - if m.JobHandle != nil { - - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if err := m.JobHandle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -func (m *CreateGaiaIndexParams) contextValidateMaxDocumentSize(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxDocumentSize != nil { - - if swag.IsZero(m.MaxDocumentSize) { // not required - return nil - } - - if err := m.MaxDocumentSize.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxDocumentSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxDocumentSize") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateGaiaIndexParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateGaiaIndexParams) UnmarshalBinary(b []byte) error { - var res CreateGaiaIndexParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_gaia_index_result.go b/v2/models/create_gaia_index_result.go deleted file mode 100644 index f26581c5..00000000 --- a/v2/models/create_gaia_index_result.go +++ /dev/null @@ -1,11 +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 - -// CreateGaiaIndexResult Specifies the index documents response. -// -// swagger:model CreateGaiaIndexResult -type CreateGaiaIndexResult interface{} diff --git a/v2/models/create_group_params.go b/v2/models/create_group_params.go deleted file mode 100644 index 7eb00316..00000000 --- a/v2/models/create_group_params.go +++ /dev/null @@ -1,156 +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" -) - -// CreateGroupParams Specifies the parameters to create a new Cohesity Group. -// -// swagger:model CreateGroupParams -type CreateGroupParams struct { - - // Specifies the name of the group. - // Required: true - Name string `json:"name"` - - // Specifies the domain of the group. For active directories, this is the fully qualified domain name (FQDN). It is 'LOCAL' for local groups on the Cohesity Cluster. A group is uniquely identified by combination of the name and the domain. - // Required: true - Domain string `json:"domain"` - - // Specifies the description of the group. - Description *string `json:"description,omitempty"` - - // Specifies the Cohesity roles to associate with the group. The Cohesity roles determine privileges on the Cohesity Cluster for this group. - Roles []string `json:"roles,omitempty"` - - // Specifies whether the Group is restricted. A restricted group can only view & manage the objects it has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Specifies a list of tenant ids who can access this group. - TenantIds []string `json:"tenantIds,omitempty"` - - // Specifies the LOCAL group properties. - LocalGroupParams *LocalGroupParams `json:"localGroupParams,omitempty"` -} - -// Validate validates this create group params -func (m *CreateGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalGroupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.RequiredString("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateGroupParams) validateDomain(formats strfmt.Registry) error { - - if err := validate.RequiredString("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -func (m *CreateGroupParams) validateLocalGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.LocalGroupParams) { // not required - return nil - } - - if m.LocalGroupParams != nil { - if err := m.LocalGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localGroupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create group params based on the context it is used -func (m *CreateGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateGroupParams) contextValidateLocalGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalGroupParams != nil { - - if swag.IsZero(m.LocalGroupParams) { // not required - return nil - } - - if err := m.LocalGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localGroupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateGroupParams) UnmarshalBinary(b []byte) error { - var res CreateGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_groups_params.go b/v2/models/create_groups_params.go deleted file mode 100644 index c6ed38fb..00000000 --- a/v2/models/create_groups_params.go +++ /dev/null @@ -1,85 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateGroupsParams Specifies the parameters to add one or more Cohesity groups. -// -// swagger:model CreateGroupsParams -type CreateGroupsParams []*CreateGroupParams - -// Validate validates this create groups params -func (m CreateGroupsParams) Validate(formats strfmt.Registry) error { - var res []error - - iCreateGroupsParamsSize := int64(len(m)) - - if err := validate.MinItems("", "body", iCreateGroupsParamsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create groups params based on the context it is used -func (m CreateGroupsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/create_idp_request_params.go b/v2/models/create_idp_request_params.go deleted file mode 100644 index c560effb..00000000 --- a/v2/models/create_idp_request_params.go +++ /dev/null @@ -1,168 +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" -) - -// CreateIdpRequestParams Specifies parameters to configure identity provider -// -// swagger:model CreateIdpRequestParams -type CreateIdpRequestParams struct { - CommonIdentityProviderConfiguration - - // Specifies the tenant id if the idp is configured for a tenant. If this is not set, this idp configuration is used for the cluster level users and for all users of tenants not having an idp configuration. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies name of the vendor providing idp service - // Required: true - Name *string `json:"name"` - - // Specifies domain of idp configuration - // Required: true - Domain *string `json:"domain"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateIdpRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIdentityProviderConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIdentityProviderConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TenantID *string `json:"tenantId,omitempty"` - - Name *string `json:"name"` - - Domain *string `json:"domain"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TenantID = dataAO1.TenantID - - m.Name = dataAO1.Name - - m.Domain = dataAO1.Domain - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateIdpRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIdentityProviderConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TenantID *string `json:"tenantId,omitempty"` - - Name *string `json:"name"` - - Domain *string `json:"domain"` - } - - dataAO1.TenantID = m.TenantID - - dataAO1.Name = m.Name - - dataAO1.Domain = m.Domain - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create idp request params -func (m *CreateIdpRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateIdpRequestParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateIdpRequestParams) validateDomain(formats strfmt.Registry) error { - - if err := validate.Required("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create idp request params based on the context it is used -func (m *CreateIdpRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateIdpRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateIdpRequestParams) UnmarshalBinary(b []byte) error { - var res CreateIdpRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_keystone_request.go b/v2/models/create_keystone_request.go deleted file mode 100644 index 40740668..00000000 --- a/v2/models/create_keystone_request.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" -) - -// CreateKeystoneRequest Specifies the parameters to create a Keystone configuration. -// -// swagger:model CreateKeystoneRequest -type CreateKeystoneRequest struct { - Keystone -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateKeystoneRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Keystone - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Keystone = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateKeystoneRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Keystone) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create keystone request -func (m *CreateKeystoneRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Keystone - if err := m.Keystone.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create keystone request based on the context it is used -func (m *CreateKeystoneRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Keystone - if err := m.Keystone.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateKeystoneRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateKeystoneRequest) UnmarshalBinary(b []byte) error { - var res CreateKeystoneRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_ldap_params.go b/v2/models/create_ldap_params.go deleted file mode 100644 index de6d1a22..00000000 --- a/v2/models/create_ldap_params.go +++ /dev/null @@ -1,252 +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" -) - -// CreateLdapParams Specifies the parameters to create an LDAP. -// -// swagger:model CreateLdapParams -type CreateLdapParams struct { - - // Specifies the LDAP name. - // Required: true - Name *string `json:"name"` - - // Specifies a list of preferred LDAP servers. Servers should either be FQDNs or IP addresses. - // Min Items: 1 - PreferredLdapServers []string `json:"preferredLdapServers"` - - // Specifies the name of the domain name to be used for querying LDAP servers from DNS. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the base distinguished name used as the base for LDAP search requests. - // Required: true - BaseDistinguishedName *string `json:"baseDistinguishedName"` - - // Specifies the LDAP authentication type. - // Required: true - // Enum: ["Anonymous","Simple"] - AuthType *string `json:"authType"` - - // Specifies the LDAP server port. - Port *int32 `json:"port,omitempty"` - - // Specifies the Active Directory id which is mapped to this LDAP. - ActiveDirectoryID int64 `json:"activeDirectoryId,omitempty"` - - // Specifies the domain name of an Active Directory which is mapped to this LDAP provider - AdDomainName *string `json:"adDomainName,omitempty"` - - // Specifies name of the LDAP attribute used for common name of an object. - AttributeCommonName *string `json:"attributeCommonName,omitempty"` - - // Specifies name of the attribute used to lookup unix GID of an LDAP user. - AttributeGid *string `json:"attributeGid,omitempty"` - - // Specifies name of the attribute used to lookup unix UID of an LDAP user. - AttributeUID *string `json:"attributeUid,omitempty"` - - // Specifies name of the LDAP attribute used to lookup members of a group. - AttributeMemberOf *string `json:"attributeMemberOf,omitempty"` - - // Specifies name of the LDAP attribute used to lookup a user by user ID. - AttributeUsername *string `json:"attributeUsername,omitempty"` - - // Specifies name of the LDAP group object class for user accounts. - ObjectClassGroup *string `json:"objectClassGroup,omitempty"` - - // Specifies name of the LDAP user object class for user accounts. - ObjectClassUser *string `json:"objectClassUser,omitempty"` - - // Specifies the parameters for LDAP with 'Simple' authentication type. - SimpleAuthParams *SimpleAuthParams `json:"simpleAuthParams,omitempty"` -} - -// Validate validates this create ldap params -func (m *CreateLdapParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreferredLdapServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBaseDistinguishedName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSimpleAuthParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateLdapParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateLdapParams) validatePreferredLdapServers(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredLdapServers) { // not required - return nil - } - - iPreferredLdapServersSize := int64(len(m.PreferredLdapServers)) - - if err := validate.MinItems("preferredLdapServers", "body", iPreferredLdapServersSize, 1); err != nil { - return err - } - - return nil -} - -func (m *CreateLdapParams) validateBaseDistinguishedName(formats strfmt.Registry) error { - - if err := validate.Required("baseDistinguishedName", "body", m.BaseDistinguishedName); err != nil { - return err - } - - return nil -} - -var createLdapParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Anonymous","Simple"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createLdapParamsTypeAuthTypePropEnum = append(createLdapParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // CreateLdapParamsAuthTypeAnonymous captures enum value "Anonymous" - CreateLdapParamsAuthTypeAnonymous string = "Anonymous" - - // CreateLdapParamsAuthTypeSimple captures enum value "Simple" - CreateLdapParamsAuthTypeSimple string = "Simple" -) - -// prop value enum -func (m *CreateLdapParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createLdapParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateLdapParams) validateAuthType(formats strfmt.Registry) error { - - if err := validate.Required("authType", "body", m.AuthType); err != nil { - return err - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -func (m *CreateLdapParams) validateSimpleAuthParams(formats strfmt.Registry) error { - if swag.IsZero(m.SimpleAuthParams) { // not required - return nil - } - - if m.SimpleAuthParams != nil { - if err := m.SimpleAuthParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("simpleAuthParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("simpleAuthParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create ldap params based on the context it is used -func (m *CreateLdapParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSimpleAuthParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateLdapParams) contextValidateSimpleAuthParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SimpleAuthParams != nil { - - if swag.IsZero(m.SimpleAuthParams) { // not required - return nil - } - - if err := m.SimpleAuthParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("simpleAuthParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("simpleAuthParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateLdapParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateLdapParams) UnmarshalBinary(b []byte) error { - var res CreateLdapParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_mcm_claim_request.go b/v2/models/create_mcm_claim_request.go deleted file mode 100644 index 39b54b42..00000000 --- a/v2/models/create_mcm_claim_request.go +++ /dev/null @@ -1,324 +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" -) - -// CreateMcmClaimRequest Request params to claim an entity to Helios. -// -// Specifies the request params to claim an entity to Helios. -// -// swagger:model CreateMcmClaimRequest -type CreateMcmClaimRequest struct { - - // Specfies the type of entity. - // Required: true - // Enum: ["Rigel","Cluster","Cohesion","IBMStorageProtect"] - EntityType *string `json:"entityType"` - - // Specifies the request params to claim Rigel to Helios. - RigelParams *McmRigelClaimRequestParams `json:"rigelParams,omitempty"` - - // Specifies the request params to claim cluster to Helios. - ClusterParams *McmClusterClaimRequestParams `json:"clusterParams,omitempty"` - - // Specifies the request params to claim cohesion appliance to Helios. - CohesionParams *McmCohesionClaimRequestParams `json:"cohesionParams,omitempty"` - - // Specifies the request params to claim IBM storage protect cluster to Helios. - IbmStorageProtectParams *McmIBMStorageProtectClaimRequestParams `json:"ibmStorageProtectParams,omitempty"` -} - -// Validate validates this create mcm claim request -func (m *CreateMcmClaimRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCohesionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmStorageProtectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createMcmClaimRequestTypeEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rigel","Cluster","Cohesion","IBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createMcmClaimRequestTypeEntityTypePropEnum = append(createMcmClaimRequestTypeEntityTypePropEnum, v) - } -} - -const ( - - // CreateMcmClaimRequestEntityTypeRigel captures enum value "Rigel" - CreateMcmClaimRequestEntityTypeRigel string = "Rigel" - - // CreateMcmClaimRequestEntityTypeCluster captures enum value "Cluster" - CreateMcmClaimRequestEntityTypeCluster string = "Cluster" - - // CreateMcmClaimRequestEntityTypeCohesion captures enum value "Cohesion" - CreateMcmClaimRequestEntityTypeCohesion string = "Cohesion" - - // CreateMcmClaimRequestEntityTypeIBMStorageProtect captures enum value "IBMStorageProtect" - CreateMcmClaimRequestEntityTypeIBMStorageProtect string = "IBMStorageProtect" -) - -// prop value enum -func (m *CreateMcmClaimRequest) validateEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createMcmClaimRequestTypeEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateMcmClaimRequest) validateEntityType(formats strfmt.Registry) error { - - if err := validate.Required("entityType", "body", m.EntityType); err != nil { - return err - } - - // value enum - if err := m.validateEntityTypeEnum("entityType", "body", *m.EntityType); err != nil { - return err - } - - return nil -} - -func (m *CreateMcmClaimRequest) validateRigelParams(formats strfmt.Registry) error { - if swag.IsZero(m.RigelParams) { // not required - return nil - } - - if m.RigelParams != nil { - if err := m.RigelParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) validateClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterParams) { // not required - return nil - } - - if m.ClusterParams != nil { - if err := m.ClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) validateCohesionParams(formats strfmt.Registry) error { - if swag.IsZero(m.CohesionParams) { // not required - return nil - } - - if m.CohesionParams != nil { - if err := m.CohesionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesionParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) validateIbmStorageProtectParams(formats strfmt.Registry) error { - if swag.IsZero(m.IbmStorageProtectParams) { // not required - return nil - } - - if m.IbmStorageProtectParams != nil { - if err := m.IbmStorageProtectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmStorageProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmStorageProtectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create mcm claim request based on the context it is used -func (m *CreateMcmClaimRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCohesionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmStorageProtectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateMcmClaimRequest) contextValidateRigelParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RigelParams != nil { - - if swag.IsZero(m.RigelParams) { // not required - return nil - } - - if err := m.RigelParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) contextValidateClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterParams != nil { - - if swag.IsZero(m.ClusterParams) { // not required - return nil - } - - if err := m.ClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) contextValidateCohesionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CohesionParams != nil { - - if swag.IsZero(m.CohesionParams) { // not required - return nil - } - - if err := m.CohesionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesionParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimRequest) contextValidateIbmStorageProtectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmStorageProtectParams != nil { - - if swag.IsZero(m.IbmStorageProtectParams) { // not required - return nil - } - - if err := m.IbmStorageProtectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmStorageProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmStorageProtectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateMcmClaimRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateMcmClaimRequest) UnmarshalBinary(b []byte) error { - var res CreateMcmClaimRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_mcm_claim_response_body.go b/v2/models/create_mcm_claim_response_body.go deleted file mode 100644 index 52209615..00000000 --- a/v2/models/create_mcm_claim_response_body.go +++ /dev/null @@ -1,322 +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" -) - -// CreateMcmClaimResponseBody Response of claiming an entity to Helios. -// -// Specifies the response of claiming an entity to Helios. -// -// swagger:model CreateMcmClaimResponseBody -type CreateMcmClaimResponseBody struct { - - // Specfies the type of entity. - // Enum: ["Rigel","Cluster","Cohesion","IBMStorageProtect"] - EntityType *string `json:"entityType,omitempty"` - - // Specifies the response of Rigel claim to Helios. - RigelParams *McmRigelClaimResponseParams `json:"rigelParams,omitempty"` - - // Specifies the response of Cohesity cluster claim to Helios. - ClusterParams *McmClusterClaimResponseParams `json:"clusterParams,omitempty"` - - // Specifies the response of Cohesion Appliance claim to Helios. - CohesionParams *McmCohesionClaimResponseParams `json:"cohesionParams,omitempty"` - - // Specifies the response of IBM storage protect claim to Helios. - IbmStorageProtectParams *McmIBMStorageProtectClaimResponseParams `json:"ibmStorageProtectParams,omitempty"` -} - -// Validate validates this create mcm claim response body -func (m *CreateMcmClaimResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCohesionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmStorageProtectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createMcmClaimResponseBodyTypeEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rigel","Cluster","Cohesion","IBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createMcmClaimResponseBodyTypeEntityTypePropEnum = append(createMcmClaimResponseBodyTypeEntityTypePropEnum, v) - } -} - -const ( - - // CreateMcmClaimResponseBodyEntityTypeRigel captures enum value "Rigel" - CreateMcmClaimResponseBodyEntityTypeRigel string = "Rigel" - - // CreateMcmClaimResponseBodyEntityTypeCluster captures enum value "Cluster" - CreateMcmClaimResponseBodyEntityTypeCluster string = "Cluster" - - // CreateMcmClaimResponseBodyEntityTypeCohesion captures enum value "Cohesion" - CreateMcmClaimResponseBodyEntityTypeCohesion string = "Cohesion" - - // CreateMcmClaimResponseBodyEntityTypeIBMStorageProtect captures enum value "IBMStorageProtect" - CreateMcmClaimResponseBodyEntityTypeIBMStorageProtect string = "IBMStorageProtect" -) - -// prop value enum -func (m *CreateMcmClaimResponseBody) validateEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createMcmClaimResponseBodyTypeEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateMcmClaimResponseBody) validateEntityType(formats strfmt.Registry) error { - if swag.IsZero(m.EntityType) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypeEnum("entityType", "body", *m.EntityType); err != nil { - return err - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) validateRigelParams(formats strfmt.Registry) error { - if swag.IsZero(m.RigelParams) { // not required - return nil - } - - if m.RigelParams != nil { - if err := m.RigelParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) validateClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterParams) { // not required - return nil - } - - if m.ClusterParams != nil { - if err := m.ClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) validateCohesionParams(formats strfmt.Registry) error { - if swag.IsZero(m.CohesionParams) { // not required - return nil - } - - if m.CohesionParams != nil { - if err := m.CohesionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesionParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) validateIbmStorageProtectParams(formats strfmt.Registry) error { - if swag.IsZero(m.IbmStorageProtectParams) { // not required - return nil - } - - if m.IbmStorageProtectParams != nil { - if err := m.IbmStorageProtectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmStorageProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmStorageProtectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create mcm claim response body based on the context it is used -func (m *CreateMcmClaimResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCohesionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmStorageProtectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateMcmClaimResponseBody) contextValidateRigelParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RigelParams != nil { - - if swag.IsZero(m.RigelParams) { // not required - return nil - } - - if err := m.RigelParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) contextValidateClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterParams != nil { - - if swag.IsZero(m.ClusterParams) { // not required - return nil - } - - if err := m.ClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) contextValidateCohesionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CohesionParams != nil { - - if swag.IsZero(m.CohesionParams) { // not required - return nil - } - - if err := m.CohesionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesionParams") - } - return err - } - } - - return nil -} - -func (m *CreateMcmClaimResponseBody) contextValidateIbmStorageProtectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmStorageProtectParams != nil { - - if swag.IsZero(m.IbmStorageProtectParams) { // not required - return nil - } - - if err := m.IbmStorageProtectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmStorageProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmStorageProtectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateMcmClaimResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateMcmClaimResponseBody) UnmarshalBinary(b []byte) error { - var res CreateMcmClaimResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_odp_remote_cluster_params.go b/v2/models/create_odp_remote_cluster_params.go deleted file mode 100644 index 5ac1cfe4..00000000 --- a/v2/models/create_odp_remote_cluster_params.go +++ /dev/null @@ -1,159 +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" -) - -// CreateOdpRemoteClusterParams Specifies the parameters to create an ODP Remote Cluster config. -// -// swagger:model CreateOdpRemoteClusterParams -type CreateOdpRemoteClusterParams struct { - - // Specifies the ODP Remote Cluster id. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the ODP Remote Cluster incarnation id. - // Required: true - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - - UpdateOdpRemoteClusterParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateOdpRemoteClusterParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ClusterID *int64 `json:"clusterId"` - - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ClusterID = dataAO0.ClusterID - - m.ClusterIncarnationID = dataAO0.ClusterIncarnationID - - // AO1 - var aO1 UpdateOdpRemoteClusterParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UpdateOdpRemoteClusterParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateOdpRemoteClusterParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ClusterID *int64 `json:"clusterId"` - - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - } - - dataAO0.ClusterID = m.ClusterID - - dataAO0.ClusterIncarnationID = m.ClusterIncarnationID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.UpdateOdpRemoteClusterParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create odp remote cluster params -func (m *CreateOdpRemoteClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIncarnationID(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with UpdateOdpRemoteClusterParams - if err := m.UpdateOdpRemoteClusterParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateOdpRemoteClusterParams) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *CreateOdpRemoteClusterParams) validateClusterIncarnationID(formats strfmt.Registry) error { - - if err := validate.Required("clusterIncarnationId", "body", m.ClusterIncarnationID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create odp remote cluster params based on the context it is used -func (m *CreateOdpRemoteClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateOdpRemoteClusterParams - if err := m.UpdateOdpRemoteClusterParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateOdpRemoteClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateOdpRemoteClusterParams) UnmarshalBinary(b []byte) error { - var res CreateOdpRemoteClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_or_update_api_key_request.go b/v2/models/create_or_update_api_key_request.go deleted file mode 100644 index 7a8507b5..00000000 --- a/v2/models/create_or_update_api_key_request.go +++ /dev/null @@ -1,77 +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" -) - -// CreateOrUpdateAPIKeyRequest Specified the request to create a new user API key. -// -// swagger:model CreateOrUpdateAPIKeyRequest -type CreateOrUpdateAPIKeyRequest struct { - - // Specifies the API key name. - // Required: true - Name *string `json:"name"` - - // Specifies if the API key is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies the time in milliseconds when the API key will expire. Set null for no expiry. - ExpiryTimeMsecs *int64 `json:"expiryTimeMsecs,omitempty"` -} - -// Validate validates this create or update API key request -func (m *CreateOrUpdateAPIKeyRequest) 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 *CreateOrUpdateAPIKeyRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create or update API key request based on context it is used -func (m *CreateOrUpdateAPIKeyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateOrUpdateAPIKeyRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateOrUpdateAPIKeyRequest) UnmarshalBinary(b []byte) error { - var res CreateOrUpdateAPIKeyRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_or_update_data_tiering_task_request.go b/v2/models/create_or_update_data_tiering_task_request.go deleted file mode 100644 index e31c3306..00000000 --- a/v2/models/create_or_update_data_tiering_task_request.go +++ /dev/null @@ -1,228 +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" -) - -// CreateOrUpdateDataTieringTaskRequest Create Or Update data tiering task Request. -// -// Specifies the request to create or update a data tiering task. -// -// swagger:model CreateOrUpdateDataTieringTaskRequest -type CreateOrUpdateDataTieringTaskRequest struct { - CommonDataTieringTaskParams - - // Specifies downtiering policy for Data Tiering - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - // Specifies uptiering policy for Data Tiering - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateOrUpdateDataTieringTaskRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonDataTieringTaskParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonDataTieringTaskParams = aO0 - - // AO1 - var dataAO1 struct { - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DowntieringPolicy = dataAO1.DowntieringPolicy - - m.UptieringPolicy = dataAO1.UptieringPolicy - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateOrUpdateDataTieringTaskRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonDataTieringTaskParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` - } - - dataAO1.DowntieringPolicy = m.DowntieringPolicy - - dataAO1.UptieringPolicy = m.UptieringPolicy - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create or update data tiering task request -func (m *CreateOrUpdateDataTieringTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringTaskParams - if err := m.CommonDataTieringTaskParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDowntieringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptieringPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateOrUpdateDataTieringTaskRequest) validateDowntieringPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.DowntieringPolicy) { // not required - return nil - } - - if m.DowntieringPolicy != nil { - if err := m.DowntieringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieringPolicy") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateDataTieringTaskRequest) validateUptieringPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.UptieringPolicy) { // not required - return nil - } - - if m.UptieringPolicy != nil { - if err := m.UptieringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptieringPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create or update data tiering task request based on the context it is used -func (m *CreateOrUpdateDataTieringTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringTaskParams - if err := m.CommonDataTieringTaskParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDowntieringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUptieringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateOrUpdateDataTieringTaskRequest) contextValidateDowntieringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DowntieringPolicy != nil { - - if swag.IsZero(m.DowntieringPolicy) { // not required - return nil - } - - if err := m.DowntieringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieringPolicy") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateDataTieringTaskRequest) contextValidateUptieringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.UptieringPolicy != nil { - - if swag.IsZero(m.UptieringPolicy) { // not required - return nil - } - - if err := m.UptieringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptieringPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateOrUpdateDataTieringTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateOrUpdateDataTieringTaskRequest) UnmarshalBinary(b []byte) error { - var res CreateOrUpdateDataTieringTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_or_update_protection_group_request.go b/v2/models/create_or_update_protection_group_request.go deleted file mode 100644 index 82290bcb..00000000 --- a/v2/models/create_or_update_protection_group_request.go +++ /dev/null @@ -1,2088 +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" -) - -// CreateOrUpdateProtectionGroupRequest Create Or Update Protection Group Request. -// -// Specifies the request to create or update a Protection Group. -// -// swagger:model CreateOrUpdateProtectionGroupRequest -type CreateOrUpdateProtectionGroupRequest struct { - CommonProtectionGroupRequestParams - - // Specifies the parameters which are specific to VMware related Protection Groups. - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters which are specific to Acropolis related Protection Groups. - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - // Specifies the parameters which are specific to Kubernetes related Protection Groups. - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - // Specifies the parameters specific to MSSQL Protection Group. - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Oracle Protection Group. - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to View related Protection Groups. - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - // Specifies the parameters which are specific to Pure related Protection Groups. - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - // Specifies the parameters which are specific to IBM FlashSystem related Protection Groups. - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - // Specifies the parameters which are specific to Nimble related Protection Groups. - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Protection Groups. - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection Group. - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Protection Group. - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - // Specifies the parameters which are specific to GCP related Protection Groups. - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - // Specifies the parameters which are specific to Kvm related Protection Groups. - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - // Specifies the parameters which are specific to Physical related Protection Groups. - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Active Directory related Protection Groups. - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - // Specifies the parameters which are specific to Office 365 related Protection Groups. - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to NetApp related Protection Groups. - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Generic Nas related Protection Groups. - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Protection Groups. - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Flashblade related Protection Groups. - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to GPFS related Protection Groups. - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Couchbase Protection Groups - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Protection Groups. - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Cassandra Protection Groups. - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters which are specific to MongoDB Protection Groups. - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters which are specific to Hive Protection Groups. - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - // Specifies the parameters which are specific to HDFS Protection Groups. - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific to HBase Protection Groups. - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters which are specific to Remote Adapter related Protection Groups. - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - // Specifies the parameters which are specific to Exchangee related Protection Groups. - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter related Protection Groups. - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to SFDC Adapter related Protection Groups. - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateOrUpdateProtectionGroupRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonProtectionGroupRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonProtectionGroupRequestParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.AcropolisParams = dataAO1.AcropolisParams - - m.KubernetesParams = dataAO1.KubernetesParams - - m.MssqlParams = dataAO1.MssqlParams - - m.OracleParams = dataAO1.OracleParams - - m.ViewParams = dataAO1.ViewParams - - m.PureParams = dataAO1.PureParams - - m.IbmFlashSystemParams = dataAO1.IbmFlashSystemParams - - m.NimbleParams = dataAO1.NimbleParams - - m.HypervParams = dataAO1.HypervParams - - m.AwsParams = dataAO1.AwsParams - - m.AzureParams = dataAO1.AzureParams - - m.GcpParams = dataAO1.GcpParams - - m.KvmParams = dataAO1.KvmParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.AdParams = dataAO1.AdParams - - m.Office365Params = dataAO1.Office365Params - - m.NetappParams = dataAO1.NetappParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.IsilonParams = dataAO1.IsilonParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GpfsParams = dataAO1.GpfsParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.CassandraParams = dataAO1.CassandraParams - - m.MongodbParams = dataAO1.MongodbParams - - m.HiveParams = dataAO1.HiveParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.RemoteAdapterParams = dataAO1.RemoteAdapterParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.UdaParams = dataAO1.UdaParams - - m.SfdcParams = dataAO1.SfdcParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateOrUpdateProtectionGroupRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonProtectionGroupRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.AcropolisParams = m.AcropolisParams - - dataAO1.KubernetesParams = m.KubernetesParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.ViewParams = m.ViewParams - - dataAO1.PureParams = m.PureParams - - dataAO1.IbmFlashSystemParams = m.IbmFlashSystemParams - - dataAO1.NimbleParams = m.NimbleParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.AzureParams = m.AzureParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.KvmParams = m.KvmParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.AdParams = m.AdParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.NetappParams = m.NetappParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.RemoteAdapterParams = m.RemoteAdapterParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.SfdcParams = m.SfdcParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create or update protection group request -func (m *CreateOrUpdateProtectionGroupRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupRequestParams - if err := m.CommonProtectionGroupRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNimbleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteAdapterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateAcropolisParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateKubernetesParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateViewParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validatePureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if m.PureParams != nil { - if err := m.PureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateIbmFlashSystemParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if m.IbmFlashSystemParams != nil { - if err := m.IbmFlashSystemParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateNimbleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NimbleParams) { // not required - return nil - } - - if m.NimbleParams != nil { - if err := m.NimbleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateKvmParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if m.KvmParams != nil { - if err := m.KvmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateAdParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AdParams) { // not required - return nil - } - - if m.AdParams != nil { - if err := m.AdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateRemoteAdapterParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RemoteAdapterParams) { // not required - return nil - } - - if m.RemoteAdapterParams != nil { - if err := m.RemoteAdapterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAdapterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAdapterParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create or update protection group request based on the context it is used -func (m *CreateOrUpdateProtectionGroupRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupRequestParams - if err := m.CommonProtectionGroupRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmFlashSystemParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNimbleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteAdapterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidatePureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureParams != nil { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if err := m.PureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateIbmFlashSystemParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmFlashSystemParams != nil { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if err := m.IbmFlashSystemParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateNimbleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NimbleParams != nil { - - if swag.IsZero(m.NimbleParams) { // not required - return nil - } - - if err := m.NimbleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateKvmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmParams != nil { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if err := m.KvmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateAdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdParams != nil { - - if swag.IsZero(m.AdParams) { // not required - return nil - } - - if err := m.AdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateRemoteAdapterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteAdapterParams != nil { - - if swag.IsZero(m.RemoteAdapterParams) { // not required - return nil - } - - if err := m.RemoteAdapterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAdapterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAdapterParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateOrUpdateProtectionGroupRequest) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateOrUpdateProtectionGroupRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateOrUpdateProtectionGroupRequest) UnmarshalBinary(b []byte) error { - var res CreateOrUpdateProtectionGroupRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_protected_objects_request.go b/v2/models/create_protected_objects_request.go deleted file mode 100644 index 40b5536b..00000000 --- a/v2/models/create_protected_objects_request.go +++ /dev/null @@ -1,204 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateProtectedObjectsRequest Specifies the request for creating an object backup. -// -// swagger:model CreateProtectedObjectsRequest -type CreateProtectedObjectsRequest struct { - - // Specifies the list of objects to be protected. Multiple objects from different adapters can be provided as input. - // Required: true - Objects []*EnvSpecificObjectProtectionRequestParams `json:"objects"` - - // If set to true, it will look for the remote backup of the given user and object, and activates it. Creates a new backup if the remote backup is not found. After activation, this object cannot get snapshots from remote clusters. - ActivateRemoteObjectProtection *bool `json:"activateRemoteObjectProtection,omitempty"` - - // If set to true, then the object specs will be created in the paused state preventing any runs from happening until they are unpaused. - IsPaused *bool `json:"isPaused,omitempty"` - - CommonObjectProtectParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateProtectedObjectsRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*EnvSpecificObjectProtectionRequestParams `json:"objects"` - - ActivateRemoteObjectProtection *bool `json:"activateRemoteObjectProtection,omitempty"` - - IsPaused *bool `json:"isPaused,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.ActivateRemoteObjectProtection = dataAO0.ActivateRemoteObjectProtection - - m.IsPaused = dataAO0.IsPaused - - // AO1 - var aO1 CommonObjectProtectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonObjectProtectParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateProtectedObjectsRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*EnvSpecificObjectProtectionRequestParams `json:"objects"` - - ActivateRemoteObjectProtection *bool `json:"activateRemoteObjectProtection,omitempty"` - - IsPaused *bool `json:"isPaused,omitempty"` - } - - dataAO0.Objects = m.Objects - - dataAO0.ActivateRemoteObjectProtection = m.ActivateRemoteObjectProtection - - dataAO0.IsPaused = m.IsPaused - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonObjectProtectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create protected objects request -func (m *CreateProtectedObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectedObjectsRequest) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create protected objects request based on the context it is used -func (m *CreateProtectedObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectedObjectsRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateProtectedObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateProtectedObjectsRequest) UnmarshalBinary(b []byte) error { - var res CreateProtectedObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_protected_objects_response.go b/v2/models/create_protected_objects_response.go deleted file mode 100644 index 66308e75..00000000 --- a/v2/models/create_protected_objects_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateProtectedObjectsResponse Specifies the protected objects response. -// -// swagger:model CreateProtectedObjectsResponse -type CreateProtectedObjectsResponse struct { - - // Specifies the list of protected objects. - ProtectedObjects []*ObjectProtectionSummary `json:"protectedObjects"` -} - -// Validate validates this create protected objects response -func (m *CreateProtectedObjectsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectedObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectedObjectsResponse) validateProtectedObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectedObjects) { // not required - return nil - } - - for i := 0; i < len(m.ProtectedObjects); i++ { - if swag.IsZero(m.ProtectedObjects[i]) { // not required - continue - } - - if m.ProtectedObjects[i] != nil { - if err := m.ProtectedObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create protected objects response based on the context it is used -func (m *CreateProtectedObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectedObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectedObjectsResponse) contextValidateProtectedObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectedObjects); i++ { - - if m.ProtectedObjects[i] != nil { - - if swag.IsZero(m.ProtectedObjects[i]) { // not required - return nil - } - - if err := m.ProtectedObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectedObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectedObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateProtectedObjectsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateProtectedObjectsResponse) UnmarshalBinary(b []byte) error { - var res CreateProtectedObjectsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_protection_group_run_request.go b/v2/models/create_protection_group_run_request.go deleted file mode 100644 index 89e8d84b..00000000 --- a/v2/models/create_protection_group_run_request.go +++ /dev/null @@ -1,340 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateProtectionGroupRunRequest Specifies the request to create a protection run. On success, the system will accept the request and return the Protection Group id for which the run is supposed to start. The actual run may start at a later time if the system is busy. Consumers must query the Protection Group to see the run. -// -// swagger:model CreateProtectionGroupRunRequest -type CreateProtectionGroupRunRequest struct { - - // Type of protection run. 'kRegular' indicates an incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a kRegular schedule captures all the blocks. 'kFull' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. 'kLog' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. 'kSystem' indicates system volume backup. It produces an image for bare metal recovery. - // Required: true - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType"` - - // Specifies the list of objects to be protected by this Protection Group run. These can be leaf objects or non-leaf objects in the protection hierarchy. This must be specified only if a subset of objects from the Protection Groups needs to be protected. - Objects []*RunObject `json:"objects"` - - // Specifies the remote, archival or cloudSpin targets where the snapshot is backed up. - TargetsConfig *RunTargetsConfiguration `json:"targetsConfig,omitempty"` - - // Specifies the parameters specific to Universal Data Adapter. - UdaParams *UdaProtectionRunParams `json:"udaParams,omitempty"` - - // Specifies the parameters specific to Cassandra Adapter. - CassandraParams *CassandraProtectionRunParams `json:"cassandraParams,omitempty"` -} - -// Validate validates this create protection group run request -func (m *CreateProtectionGroupRunRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createProtectionGroupRunRequestTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createProtectionGroupRunRequestTypeRunTypePropEnum = append(createProtectionGroupRunRequestTypeRunTypePropEnum, v) - } -} - -const ( - - // CreateProtectionGroupRunRequestRunTypeKRegular captures enum value "kRegular" - CreateProtectionGroupRunRequestRunTypeKRegular string = "kRegular" - - // CreateProtectionGroupRunRequestRunTypeKFull captures enum value "kFull" - CreateProtectionGroupRunRequestRunTypeKFull string = "kFull" - - // CreateProtectionGroupRunRequestRunTypeKLog captures enum value "kLog" - CreateProtectionGroupRunRequestRunTypeKLog string = "kLog" - - // CreateProtectionGroupRunRequestRunTypeKSystem captures enum value "kSystem" - CreateProtectionGroupRunRequestRunTypeKSystem string = "kSystem" - - // CreateProtectionGroupRunRequestRunTypeKHydrateCDP captures enum value "kHydrateCDP" - CreateProtectionGroupRunRequestRunTypeKHydrateCDP string = "kHydrateCDP" - - // CreateProtectionGroupRunRequestRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - CreateProtectionGroupRunRequestRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *CreateProtectionGroupRunRequest) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createProtectionGroupRunRequestTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateProtectionGroupRunRequest) validateRunType(formats strfmt.Registry) error { - - if err := validate.Required("runType", "body", m.RunType); err != nil { - return err - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) validateTargetsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.TargetsConfig) { // not required - return nil - } - - if m.TargetsConfig != nil { - if err := m.TargetsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetsConfig") - } - return err - } - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) validateCassandraParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create protection group run request based on the context it is used -func (m *CreateProtectionGroupRunRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectionGroupRunRequest) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) contextValidateTargetsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetsConfig != nil { - - if swag.IsZero(m.TargetsConfig) { // not required - return nil - } - - if err := m.TargetsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetsConfig") - } - return err - } - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateProtectionGroupRunRequest) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateProtectionGroupRunRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateProtectionGroupRunRequest) UnmarshalBinary(b []byte) error { - var res CreateProtectionGroupRunRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_protection_group_run_response_body.go b/v2/models/create_protection_group_run_response_body.go deleted file mode 100644 index a0876e52..00000000 --- a/v2/models/create_protection_group_run_response_body.go +++ /dev/null @@ -1,114 +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" -) - -// CreateProtectionGroupRunResponseBody Create protection run response. -// -// Specifies the response for create a protection run. On success, the system will accept the request and return the Protection Group id for which the run is supposed to start. The actual run may start at a later time if the system is busy. Consumers must query the Protection Group to see the run. -// -// swagger:model CreateProtectionGroupRunResponseBody -type CreateProtectionGroupRunResponseBody struct { - - // Specifies id of the Protection Group which must be polled for seeing the new run. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies parameters which are returned only for a Universal Data Adapter protection run. - UdaParams *UdaCreateRunResponseParams `json:"udaParams,omitempty"` -} - -// Validate validates this create protection group run response body -func (m *CreateProtectionGroupRunResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectionGroupRunResponseBody) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create protection group run response body based on the context it is used -func (m *CreateProtectionGroupRunResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateProtectionGroupRunResponseBody) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateProtectionGroupRunResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateProtectionGroupRunResponseBody) UnmarshalBinary(b []byte) error { - var res CreateProtectionGroupRunResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_recovery_request.go b/v2/models/create_recovery_request.go deleted file mode 100644 index ca98bfcb..00000000 --- a/v2/models/create_recovery_request.go +++ /dev/null @@ -1,1908 +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" -) - -// CreateRecoveryRequest Create Recovery request params. -// -// Specifies the request parameters to create a Recovery. -// -// swagger:model CreateRecoveryRequest -type CreateRecoveryRequest struct { - CommonRecoveryRequestParams - - // Specifies the parameters which are specific to Acropolis related Recovery. - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Recovery. - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Recovery. - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - // Specifies the parameters which are specific to Cassandra Recovery. - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters which are specific to Couchbase Recovery. - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Recovery. - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Exchange related Recovery. - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific to FlashBlade related Recovery. - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to GCP related Recovery. - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - // Specifies the parameters which are specific to Generic NAS related Recovery. - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to GPFS related Recovery. - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Hbase Recovery. - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters which are specific to HDFS Recovery. - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific to Hive Recovery. - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Recovery. - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - // Specifies the parameters which are specific to Ibm FlashSystem related Recovery. - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Recovery. - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Kubernetes related Recovery. - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - // Specifies the parameters which are specific to KVM related Recovery. - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - // Specifies the parameters which are specific to MongoDB Recovery. - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters which are specific to MsSQL related Recovery. - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Netapp related Recovery. - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Office 365 related Recovery. - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to Oracle related Recovery. - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to Physical related Recovery. - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Pure related Recovery. - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - // Specifies the parameters which are specific to Salesforce related Recovery. - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter Recovery. - UdaParams *UdaParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to View related Recovery. - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - // Specifies the parameters which are specific to VMware related Recovery. - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateRecoveryRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoveryRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoveryRequestParams = aO0 - - // AO1 - var dataAO1 struct { - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaParams `json:"udaParams,omitempty"` - - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AcropolisParams = dataAO1.AcropolisParams - - m.AwsParams = dataAO1.AwsParams - - m.AzureParams = dataAO1.AzureParams - - m.CassandraParams = dataAO1.CassandraParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GcpParams = dataAO1.GcpParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.GpfsParams = dataAO1.GpfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HiveParams = dataAO1.HiveParams - - m.HypervParams = dataAO1.HypervParams - - m.IbmFlashSystemParams = dataAO1.IbmFlashSystemParams - - m.IsilonParams = dataAO1.IsilonParams - - m.KubernetesParams = dataAO1.KubernetesParams - - m.KvmParams = dataAO1.KvmParams - - m.MongodbParams = dataAO1.MongodbParams - - m.MssqlParams = dataAO1.MssqlParams - - m.NetappParams = dataAO1.NetappParams - - m.Office365Params = dataAO1.Office365Params - - m.OracleParams = dataAO1.OracleParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.PureParams = dataAO1.PureParams - - m.SfdcParams = dataAO1.SfdcParams - - m.UdaParams = dataAO1.UdaParams - - m.ViewParams = dataAO1.ViewParams - - m.VmwareParams = dataAO1.VmwareParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateRecoveryRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoveryRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaParams `json:"udaParams,omitempty"` - - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` - } - - dataAO1.AcropolisParams = m.AcropolisParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.AzureParams = m.AzureParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.IbmFlashSystemParams = m.IbmFlashSystemParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.KubernetesParams = m.KubernetesParams - - dataAO1.KvmParams = m.KvmParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.OracleParams = m.OracleParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.PureParams = m.PureParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.ViewParams = m.ViewParams - - dataAO1.VmwareParams = m.VmwareParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create recovery request -func (m *CreateRecoveryRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoveryRequestParams - if err := m.CommonRecoveryRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRecoveryRequest) validateAcropolisParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateIbmFlashSystemParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if m.IbmFlashSystemParams != nil { - if err := m.IbmFlashSystemParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateKubernetesParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateKvmParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if m.KvmParams != nil { - if err := m.KvmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validatePureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if m.PureParams != nil { - if err := m.PureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateViewParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create recovery request based on the context it is used -func (m *CreateRecoveryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoveryRequestParams - if err := m.CommonRecoveryRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmFlashSystemParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRecoveryRequest) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateIbmFlashSystemParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmFlashSystemParams != nil { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if err := m.IbmFlashSystemParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateKvmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmParams != nil { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if err := m.KvmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidatePureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureParams != nil { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if err := m.PureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *CreateRecoveryRequest) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRecoveryRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRecoveryRequest) UnmarshalBinary(b []byte) error { - var res CreateRecoveryRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_remote_disk_status.go b/v2/models/create_remote_disk_status.go deleted file mode 100644 index 4ca7bdb4..00000000 --- a/v2/models/create_remote_disk_status.go +++ /dev/null @@ -1,170 +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" -) - -// CreateRemoteDiskStatus Specifies the status of creating remote disk. -// -// swagger:model CreateRemoteDiskStatus -type CreateRemoteDiskStatus struct { - - // Specifies the NFS mount path of the remote disk. - MountPath *string `json:"mountPath,omitempty"` - - // Specifies the node id of the disk. If not specified, the disk will be evenly distributed across all the nodes. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the tier of the disk - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - Tier *string `json:"tier,omitempty"` - - // Specifies the creating status of this disk. - // Enum: ["Succeeded","Failed"] - Status *string `json:"status,omitempty"` - - // Specifies the error message when creating remote disk fails. - Message *string `json:"message,omitempty"` -} - -// Validate validates this create remote disk status -func (m *CreateRemoteDiskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createRemoteDiskStatusTypeTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createRemoteDiskStatusTypeTierPropEnum = append(createRemoteDiskStatusTypeTierPropEnum, v) - } -} - -const ( - - // CreateRemoteDiskStatusTierPCIeSSD captures enum value "PCIeSSD" - CreateRemoteDiskStatusTierPCIeSSD string = "PCIeSSD" - - // CreateRemoteDiskStatusTierSATADashSSD captures enum value "SATA-SSD" - CreateRemoteDiskStatusTierSATADashSSD string = "SATA-SSD" - - // CreateRemoteDiskStatusTierSATADashHDD captures enum value "SATA-HDD" - CreateRemoteDiskStatusTierSATADashHDD string = "SATA-HDD" - - // CreateRemoteDiskStatusTierCLOUD captures enum value "CLOUD" - CreateRemoteDiskStatusTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *CreateRemoteDiskStatus) validateTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createRemoteDiskStatusTypeTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateRemoteDiskStatus) validateTier(formats strfmt.Registry) error { - if swag.IsZero(m.Tier) { // not required - return nil - } - - // value enum - if err := m.validateTierEnum("tier", "body", *m.Tier); err != nil { - return err - } - - return nil -} - -var createRemoteDiskStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createRemoteDiskStatusTypeStatusPropEnum = append(createRemoteDiskStatusTypeStatusPropEnum, v) - } -} - -const ( - - // CreateRemoteDiskStatusStatusSucceeded captures enum value "Succeeded" - CreateRemoteDiskStatusStatusSucceeded string = "Succeeded" - - // CreateRemoteDiskStatusStatusFailed captures enum value "Failed" - CreateRemoteDiskStatusStatusFailed string = "Failed" -) - -// prop value enum -func (m *CreateRemoteDiskStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createRemoteDiskStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateRemoteDiskStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create remote disk status based on context it is used -func (m *CreateRemoteDiskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRemoteDiskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRemoteDiskStatus) UnmarshalBinary(b []byte) error { - var res CreateRemoteDiskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_rigel_connection_request.go b/v2/models/create_rigel_connection_request.go deleted file mode 100644 index a4545222..00000000 --- a/v2/models/create_rigel_connection_request.go +++ /dev/null @@ -1,134 +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" -) - -// CreateRigelConnectionRequest Create Rigel Connection Request. -// -// Specify the params to create a connection of Rigel. -// -// swagger:model CreateRigelConnectionRequest -type CreateRigelConnectionRequest struct { - CommonCreateOrUpdateRigelConnectionRequest - - // Specifies the id of the connection. - // Required: true - ConnectionID *int64 `json:"connectionId"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateRigelConnectionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCreateOrUpdateRigelConnectionRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCreateOrUpdateRigelConnectionRequest = aO0 - - // AO1 - var dataAO1 struct { - ConnectionID *int64 `json:"connectionId"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ConnectionID = dataAO1.ConnectionID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateRigelConnectionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCreateOrUpdateRigelConnectionRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ConnectionID *int64 `json:"connectionId"` - } - - dataAO1.ConnectionID = m.ConnectionID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create rigel connection request -func (m *CreateRigelConnectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectionRequest - if err := m.CommonCreateOrUpdateRigelConnectionRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRigelConnectionRequest) validateConnectionID(formats strfmt.Registry) error { - - if err := validate.Required("connectionId", "body", m.ConnectionID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create rigel connection request based on the context it is used -func (m *CreateRigelConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectionRequest - if err := m.CommonCreateOrUpdateRigelConnectionRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRigelConnectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRigelConnectionRequest) UnmarshalBinary(b []byte) error { - var res CreateRigelConnectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_rigel_connector_request.go b/v2/models/create_rigel_connector_request.go deleted file mode 100644 index c370867c..00000000 --- a/v2/models/create_rigel_connector_request.go +++ /dev/null @@ -1,134 +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" -) - -// CreateRigelConnectorRequest Create Rigel connector Request. -// -// Specify the params to create a Rigel connector. -// -// swagger:model CreateRigelConnectorRequest -type CreateRigelConnectorRequest struct { - CommonCreateOrUpdateRigelConnectorRequest - - // Specifies the Id of the connector. - // Required: true - ConnectorID *int64 `json:"connectorId"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateRigelConnectorRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCreateOrUpdateRigelConnectorRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCreateOrUpdateRigelConnectorRequest = aO0 - - // AO1 - var dataAO1 struct { - ConnectorID *int64 `json:"connectorId"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ConnectorID = dataAO1.ConnectorID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateRigelConnectorRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCreateOrUpdateRigelConnectorRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ConnectorID *int64 `json:"connectorId"` - } - - dataAO1.ConnectorID = m.ConnectorID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create rigel connector request -func (m *CreateRigelConnectorRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectorRequest - if err := m.CommonCreateOrUpdateRigelConnectorRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRigelConnectorRequest) validateConnectorID(formats strfmt.Registry) error { - - if err := validate.Required("connectorId", "body", m.ConnectorID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create rigel connector request based on the context it is used -func (m *CreateRigelConnectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectorRequest - if err := m.CommonCreateOrUpdateRigelConnectorRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRigelConnectorRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRigelConnectorRequest) UnmarshalBinary(b []byte) error { - var res CreateRigelConnectorRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_role_parameters.go b/v2/models/create_role_parameters.go deleted file mode 100644 index 3b41c3e2..00000000 --- a/v2/models/create_role_parameters.go +++ /dev/null @@ -1,134 +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" -) - -// CreateRoleParameters Specifies the parameters to create a Role. -// -// swagger:model CreateRoleParameters -type CreateRoleParameters struct { - - // Specifies the Role name. - // Required: true - Name *string `json:"name"` - - UpdateRoleParameters -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateRoleParameters) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Name *string `json:"name"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Name = dataAO0.Name - - // AO1 - var aO1 UpdateRoleParameters - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UpdateRoleParameters = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateRoleParameters) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Name *string `json:"name"` - } - - dataAO0.Name = m.Name - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.UpdateRoleParameters) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create role parameters -func (m *CreateRoleParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with UpdateRoleParameters - if err := m.UpdateRoleParameters.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateRoleParameters) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this create role parameters based on the context it is used -func (m *CreateRoleParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateRoleParameters - if err := m.UpdateRoleParameters.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRoleParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRoleParameters) UnmarshalBinary(b []byte) error { - var res CreateRoleParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_storage_domain_param.go b/v2/models/create_storage_domain_param.go deleted file mode 100644 index 75e793eb..00000000 --- a/v2/models/create_storage_domain_param.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" -) - -// CreateStorageDomainParam Specifies the parameter to create a Storage Domain. -// -// swagger:model CreateStorageDomainParam -type CreateStorageDomainParam struct { - StorageDomain -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateStorageDomainParam) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 StorageDomain - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.StorageDomain = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateStorageDomainParam) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.StorageDomain) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create storage domain param -func (m *CreateStorageDomainParam) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StorageDomain - if err := m.StorageDomain.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create storage domain param based on the context it is used -func (m *CreateStorageDomainParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StorageDomain - if err := m.StorageDomain.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateStorageDomainParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateStorageDomainParam) UnmarshalBinary(b []byte) error { - var res CreateStorageDomainParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_tdm_task_request.go b/v2/models/create_tdm_task_request.go deleted file mode 100644 index 52d55831..00000000 --- a/v2/models/create_tdm_task_request.go +++ /dev/null @@ -1,346 +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" -) - -// CreateTdmTaskRequest Specifies the request parameters to create a TDM task. -// -// swagger:model CreateTdmTaskRequest -type CreateTdmTaskRequest struct { - CommonTdmTaskRequestParams - - // clone params - CloneParams *TdmCloneTaskRequestParams `json:"cloneParams,omitempty"` - - // snapshot params - SnapshotParams *TdmSnapshotTaskParams `json:"snapshotParams,omitempty"` - - // refresh params - RefreshParams *TdmRefreshTaskRequestParams `json:"refreshParams,omitempty"` - - // teardown params - TeardownParams *TdmTeardownTaskRequestParams `json:"teardownParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateTdmTaskRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmTaskRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmTaskRequestParams = aO0 - - // AO1 - var dataAO1 struct { - CloneParams *TdmCloneTaskRequestParams `json:"cloneParams,omitempty"` - - SnapshotParams *TdmSnapshotTaskParams `json:"snapshotParams,omitempty"` - - RefreshParams *TdmRefreshTaskRequestParams `json:"refreshParams,omitempty"` - - TeardownParams *TdmTeardownTaskRequestParams `json:"teardownParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CloneParams = dataAO1.CloneParams - - m.SnapshotParams = dataAO1.SnapshotParams - - m.RefreshParams = dataAO1.RefreshParams - - m.TeardownParams = dataAO1.TeardownParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateTdmTaskRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmTaskRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CloneParams *TdmCloneTaskRequestParams `json:"cloneParams,omitempty"` - - SnapshotParams *TdmSnapshotTaskParams `json:"snapshotParams,omitempty"` - - RefreshParams *TdmRefreshTaskRequestParams `json:"refreshParams,omitempty"` - - TeardownParams *TdmTeardownTaskRequestParams `json:"teardownParams,omitempty"` - } - - dataAO1.CloneParams = m.CloneParams - - dataAO1.SnapshotParams = m.SnapshotParams - - dataAO1.RefreshParams = m.RefreshParams - - dataAO1.TeardownParams = m.TeardownParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create tdm task request -func (m *CreateTdmTaskRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmTaskRequestParams - if err := m.CommonTdmTaskRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeardownParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateTdmTaskRequest) validateCloneParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if m.CloneParams != nil { - if err := m.CloneParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) validateSnapshotParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if m.SnapshotParams != nil { - if err := m.SnapshotParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) validateRefreshParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RefreshParams) { // not required - return nil - } - - if m.RefreshParams != nil { - if err := m.RefreshParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) validateTeardownParams(formats strfmt.Registry) error { - - if swag.IsZero(m.TeardownParams) { // not required - return nil - } - - if m.TeardownParams != nil { - if err := m.TeardownParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teardownParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teardownParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create tdm task request based on the context it is used -func (m *CreateTdmTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmTaskRequestParams - if err := m.CommonTdmTaskRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeardownParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateTdmTaskRequest) contextValidateCloneParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloneParams != nil { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if err := m.CloneParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) contextValidateSnapshotParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotParams != nil { - - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if err := m.SnapshotParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) contextValidateRefreshParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshParams != nil { - - if swag.IsZero(m.RefreshParams) { // not required - return nil - } - - if err := m.RefreshParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshParams") - } - return err - } - } - - return nil -} - -func (m *CreateTdmTaskRequest) contextValidateTeardownParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeardownParams != nil { - - if swag.IsZero(m.TeardownParams) { // not required - return nil - } - - if err := m.TeardownParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teardownParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teardownParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateTdmTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateTdmTaskRequest) UnmarshalBinary(b []byte) error { - var res CreateTdmTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_tenant_params.go b/v2/models/create_tenant_params.go deleted file mode 100644 index 38d92abb..00000000 --- a/v2/models/create_tenant_params.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" - "github.com/go-openapi/validate" -) - -// CreateTenantParams CreateTenantParams -// -// Parameters to be specified for creating a tenant. -// -// swagger:model CreateTenantParams -type CreateTenantParams struct { - - // Name of the Tenant. - // Required: true - Name *string `json:"name"` - - // This suffix is used by cohesity to generate the actual tenant Id by - // appending the parent's tenant id to it. - // Required: true - // Max Length: 10 - TenantIDSuffix *string `json:"tenantIdSuffix"` - - // Description about the tenant - Description *string `json:"description,omitempty"` - - // Flag to indicate if tenant is managed on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` -} - -// Validate validates this create tenant params -func (m *CreateTenantParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantIDSuffix(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateTenantParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *CreateTenantParams) validateTenantIDSuffix(formats strfmt.Registry) error { - - if err := validate.Required("tenantIdSuffix", "body", m.TenantIDSuffix); err != nil { - return err - } - - if err := validate.MaxLength("tenantIdSuffix", "body", *m.TenantIDSuffix, 10); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create tenant params based on context it is used -func (m *CreateTenantParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateTenantParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateTenantParams) UnmarshalBinary(b []byte) error { - var res CreateTenantParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_totp_key_request_body.go b/v2/models/create_totp_key_request_body.go deleted file mode 100644 index 773bd899..00000000 --- a/v2/models/create_totp_key_request_body.go +++ /dev/null @@ -1,50 +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" -) - -// CreateTotpKeyRequestBody Specifies create Time based OTP key request parameters. -// -// swagger:model CreateTotpKeyRequestBody -type CreateTotpKeyRequestBody struct { - - // Specifies the key name. - TotpKeyName *string `json:"totpKeyName,omitempty"` -} - -// Validate validates this create totp key request body -func (m *CreateTotpKeyRequestBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create totp key request body based on context it is used -func (m *CreateTotpKeyRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateTotpKeyRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateTotpKeyRequestBody) UnmarshalBinary(b []byte) error { - var res CreateTotpKeyRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_upgrade_task_request.go b/v2/models/create_upgrade_task_request.go deleted file mode 100644 index c9b1ddb9..00000000 --- a/v2/models/create_upgrade_task_request.go +++ /dev/null @@ -1,67 +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" -) - -// CreateUpgradeTaskRequest Create agent upgrade task params -// -// Specifies the params to create a schedule based agent upgrade task. -// -// swagger:model CreateUpgradeTaskRequest -type CreateUpgradeTaskRequest struct { - - // Specifies the name of the task. - Name *string `json:"name,omitempty"` - - // Specifies the description of the task. - Description *string `json:"description,omitempty"` - - // Specifies agent IDs to be upgraded in the task. - AgentIDs []int64 `json:"agentIDs"` - - // Specifies the start time of the task specified by the user as a Unix epoch Timestamp (in microseconds). If no schedule is specified, the agents will be upgraded immediately. - ScheduleTimeUsecs *int64 `json:"scheduleTimeUsecs,omitempty"` - - // Specifies the time before which the upgrade task should start execution as a Unix epoch Timestamp (in microseconds). If this is not specified the task will start anytime after scheduleTimeUsecs. - ScheduleEndTimeUsecs *int64 `json:"scheduleEndTimeUsecs,omitempty"` - - // Specifies the task that needs to be retried. - RetryTaskID *int64 `json:"retryTaskId,omitempty"` -} - -// Validate validates this create upgrade task request -func (m *CreateUpgradeTaskRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create upgrade task request based on context it is used -func (m *CreateUpgradeTaskRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateUpgradeTaskRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateUpgradeTaskRequest) UnmarshalBinary(b []byte) error { - var res CreateUpgradeTaskRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_user_parameters.go b/v2/models/create_user_parameters.go deleted file mode 100644 index c722457e..00000000 --- a/v2/models/create_user_parameters.go +++ /dev/null @@ -1,199 +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" -) - -// CreateUserParameters Specifies the parameters to create a new Cohesity User. -// -// swagger:model CreateUserParameters -type CreateUserParameters struct { - - // Specifies the username. - // Required: true - Username string `json:"username"` - - // Specifies the domain of the user. For active directories, this is the fully qualified domain name (FQDN). It is 'LOCAL' for local users on the Cohesity Cluster. A user is uniquely identified by combination of the username and the domain. - // Required: true - Domain string `json:"domain"` - - // Specifies the description of the User. - Description *string `json:"description,omitempty"` - - // Specifies the Cohesity roles to associate with the user. The Cohesity roles determine privileges on the Cohesity Cluster for this user. - Roles []string `json:"roles"` - - // Specifies the primary group of the User. Primary group is used for file access. - // Read Only: true - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - // Specifies additional groups the User may belong to. - // Read Only: true - OtherGroups []string `json:"otherGroups,omitempty"` - - // Specifies whether the User is restricted. A restricted user can only view & manage the objects it has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Specifies the epoch time in milliseconds since when the user can login. - EffectiveTimeMsecs *int64 `json:"effectiveTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the user expires. Post expiry the user cannot access Cohesity cluster. - ExpiryTimeMsecs *int64 `json:"expiryTimeMsecs,omitempty"` - - // Specifies whether the User is locked. - Locked *bool `json:"locked,omitempty"` - - // Specifies whether the SMB access token is to be set for the user. - AllowSmbAccessToken *bool `json:"allowSmbAccessToken,omitempty"` - - // Specifies the LOCAL user properties. This field is required when adding a new LOCAL Cohesity User. - LocalUserParams *LocalUserParams `json:"localUserParams,omitempty"` -} - -// Validate validates this create user parameters -func (m *CreateUserParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalUserParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateUserParameters) validateUsername(formats strfmt.Registry) error { - - if err := validate.RequiredString("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *CreateUserParameters) validateDomain(formats strfmt.Registry) error { - - if err := validate.RequiredString("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -func (m *CreateUserParameters) validateLocalUserParams(formats strfmt.Registry) error { - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if m.LocalUserParams != nil { - if err := m.LocalUserParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create user parameters based on the context it is used -func (m *CreateUserParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrimaryGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOtherGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalUserParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateUserParameters) contextValidatePrimaryGroup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "primaryGroup", "body", m.PrimaryGroup); err != nil { - return err - } - - return nil -} - -func (m *CreateUserParameters) contextValidateOtherGroups(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "otherGroups", "body", []string(m.OtherGroups)); err != nil { - return err - } - - return nil -} - -func (m *CreateUserParameters) contextValidateLocalUserParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalUserParams != nil { - - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if err := m.LocalUserParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateUserParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateUserParameters) UnmarshalBinary(b []byte) error { - var res CreateUserParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_user_session_request_params.go b/v2/models/create_user_session_request_params.go deleted file mode 100644 index bb5ca9a9..00000000 --- a/v2/models/create_user_session_request_params.go +++ /dev/null @@ -1,126 +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" -) - -// CreateUserSessionRequestParams Specifies user session request parameters -// -// swagger:model CreateUserSessionRequestParams -type CreateUserSessionRequestParams struct { - - // Specifies the login name of the Cohesity user - Username *string `json:"username,omitempty"` - - // Specifies the password of the Cohesity user - Password *string `json:"password,omitempty"` - - // Specifies the domain the user is logging in to. For a local user the domain is LOCAL. For LDAP/AD user, the domain will map to a LDAP connection string. A user is uniquely identified by a combination of username and domain. LOCAL is the default domain. - Domain *string `json:"domain,omitempty"` - - // Specifies the certificate for cert based authentication. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the private key for cert based authentication. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies OTP code for MFA verification. - OtpCode *string `json:"otpCode,omitempty"` - - // Specifies OTP Type for MFA verification. - // Enum: ["email","totp","salesforce"] - OtpType *string `json:"otpType,omitempty"` -} - -// Validate validates this create user session request params -func (m *CreateUserSessionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOtpType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createUserSessionRequestParamsTypeOtpTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["email","totp","salesforce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createUserSessionRequestParamsTypeOtpTypePropEnum = append(createUserSessionRequestParamsTypeOtpTypePropEnum, v) - } -} - -const ( - - // CreateUserSessionRequestParamsOtpTypeEmail captures enum value "email" - CreateUserSessionRequestParamsOtpTypeEmail string = "email" - - // CreateUserSessionRequestParamsOtpTypeTotp captures enum value "totp" - CreateUserSessionRequestParamsOtpTypeTotp string = "totp" - - // CreateUserSessionRequestParamsOtpTypeSalesforce captures enum value "salesforce" - CreateUserSessionRequestParamsOtpTypeSalesforce string = "salesforce" -) - -// prop value enum -func (m *CreateUserSessionRequestParams) validateOtpTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createUserSessionRequestParamsTypeOtpTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateUserSessionRequestParams) validateOtpType(formats strfmt.Registry) error { - if swag.IsZero(m.OtpType) { // not required - return nil - } - - // value enum - if err := m.validateOtpTypeEnum("otpType", "body", *m.OtpType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create user session request params based on context it is used -func (m *CreateUserSessionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateUserSessionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateUserSessionRequestParams) UnmarshalBinary(b []byte) error { - var res CreateUserSessionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_users_parameters.go b/v2/models/create_users_parameters.go deleted file mode 100644 index ee8c675c..00000000 --- a/v2/models/create_users_parameters.go +++ /dev/null @@ -1,85 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateUsersParameters Specifies the parameters to add one or more Cohesity users. -// -// swagger:model CreateUsersParameters -type CreateUsersParameters []*CreateUserParameters - -// Validate validates this create users parameters -func (m CreateUsersParameters) Validate(formats strfmt.Registry) error { - var res []error - - iCreateUsersParametersSize := int64(len(m)) - - if err := validate.MinItems("", "body", iCreateUsersParametersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create users parameters based on the context it is used -func (m CreateUsersParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/create_view.go b/v2/models/create_view.go deleted file mode 100644 index 211beca2..00000000 --- a/v2/models/create_view.go +++ /dev/null @@ -1,321 +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" -) - -// CreateView Create View. -// -// Specifies the information required for creating a new View w/o required fields. -// -// swagger:model CreateView -type CreateView struct { - - // Specifies the id of the Storage Domain (View Box) where the View will be - // created. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies whether to support case insensitive file/folder names. This - // parameter can only be set during create and cannot be changed. - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - // Specifies the Object Services key mapping config of the view. This parameter can only - // be set during create and cannot be changed. - // Configuration of Object Services key mapping. - // Specifies the type of Object Services key mapping config. - // Enum: ["Random","Short","Long","Hierarchical","ObjectId"] - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - // Specifies whether to support s3 folder support feature. This - // parameter can only be set during create and cannot be changed. - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - // Specifies the intent of the View. - Intent *ViewIntent `json:"intent,omitempty"` - - // Specifies the protection config of the View. - ViewProtectionConfig *ViewProtectionConfig `json:"viewProtectionConfig,omitempty"` - - UpdateViewParam -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateView) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - Intent *ViewIntent `json:"intent,omitempty"` - - ViewProtectionConfig *ViewProtectionConfig `json:"viewProtectionConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.StorageDomainID = dataAO0.StorageDomainID - - m.CaseInsensitiveNamesEnabled = dataAO0.CaseInsensitiveNamesEnabled - - m.ObjectServicesMappingConfig = dataAO0.ObjectServicesMappingConfig - - m.S3FolderSupportEnabled = dataAO0.S3FolderSupportEnabled - - m.Intent = dataAO0.Intent - - m.ViewProtectionConfig = dataAO0.ViewProtectionConfig - - // AO1 - var aO1 UpdateViewParam - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UpdateViewParam = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateView) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - Intent *ViewIntent `json:"intent,omitempty"` - - ViewProtectionConfig *ViewProtectionConfig `json:"viewProtectionConfig,omitempty"` - } - - dataAO0.StorageDomainID = m.StorageDomainID - - dataAO0.CaseInsensitiveNamesEnabled = m.CaseInsensitiveNamesEnabled - - dataAO0.ObjectServicesMappingConfig = m.ObjectServicesMappingConfig - - dataAO0.S3FolderSupportEnabled = m.S3FolderSupportEnabled - - dataAO0.Intent = m.Intent - - dataAO0.ViewProtectionConfig = m.ViewProtectionConfig - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.UpdateViewParam) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view -func (m *CreateView) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectServicesMappingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIntent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewProtectionConfig(formats); err != nil { - res = append(res, err) - } - - // 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 -} - -var createViewTypeObjectServicesMappingConfigPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Random","Short","Long","Hierarchical","ObjectId"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createViewTypeObjectServicesMappingConfigPropEnum = append(createViewTypeObjectServicesMappingConfigPropEnum, v) - } -} - -// property enum -func (m *CreateView) validateObjectServicesMappingConfigEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createViewTypeObjectServicesMappingConfigPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateView) validateObjectServicesMappingConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectServicesMappingConfig) { // not required - return nil - } - - // value enum - if err := m.validateObjectServicesMappingConfigEnum("objectServicesMappingConfig", "body", *m.ObjectServicesMappingConfig); err != nil { - return err - } - - return nil -} - -func (m *CreateView) validateIntent(formats strfmt.Registry) error { - - if swag.IsZero(m.Intent) { // not required - return nil - } - - if m.Intent != nil { - if err := m.Intent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -func (m *CreateView) validateViewProtectionConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewProtectionConfig) { // not required - return nil - } - - if m.ViewProtectionConfig != nil { - if err := m.ViewProtectionConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtectionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtectionConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create view based on the context it is used -func (m *CreateView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIntent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewProtectionConfig(ctx, formats); err != nil { - res = append(res, err) - } - - // 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 -} - -func (m *CreateView) contextValidateIntent(ctx context.Context, formats strfmt.Registry) error { - - if m.Intent != nil { - - if swag.IsZero(m.Intent) { // not required - return nil - } - - if err := m.Intent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -func (m *CreateView) contextValidateViewProtectionConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewProtectionConfig != nil { - - if swag.IsZero(m.ViewProtectionConfig) { // not required - return nil - } - - if err := m.ViewProtectionConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtectionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtectionConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateView) UnmarshalBinary(b []byte) error { - var res CreateView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_view_failover_request.go b/v2/models/create_view_failover_request.go deleted file mode 100644 index 97fdb1f6..00000000 --- a/v2/models/create_view_failover_request.go +++ /dev/null @@ -1,214 +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" -) - -// CreateViewFailoverRequest Specifies the request parameters to create a view failover task. -// -// swagger:model CreateViewFailoverRequest -type CreateViewFailoverRequest struct { - - // Specifies the failover type.
'Planned' indicates this is a planned failover.
'Unplanned' indicates this is an unplanned failover, which is used when source cluster is down. - // Required: true - // Enum: ["Planned","Unplanned"] - Type *string `json:"type"` - - // Specifies parameters to create a planned failover. - PlannedFailoverParams *PlannedFailoverParams `json:"plannedFailoverParams,omitempty"` - - // Specifies parameters to create an unplanned failover. - UnplannedFailoverParams *UnplannedFailoverParams `json:"unplannedFailoverParams,omitempty"` -} - -// Validate validates this create view failover request -func (m *CreateViewFailoverRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlannedFailoverParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnplannedFailoverParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var createViewFailoverRequestTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Planned","Unplanned"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createViewFailoverRequestTypeTypePropEnum = append(createViewFailoverRequestTypeTypePropEnum, v) - } -} - -const ( - - // CreateViewFailoverRequestTypePlanned captures enum value "Planned" - CreateViewFailoverRequestTypePlanned string = "Planned" - - // CreateViewFailoverRequestTypeUnplanned captures enum value "Unplanned" - CreateViewFailoverRequestTypeUnplanned string = "Unplanned" -) - -// prop value enum -func (m *CreateViewFailoverRequest) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createViewFailoverRequestTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateViewFailoverRequest) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *CreateViewFailoverRequest) validatePlannedFailoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.PlannedFailoverParams) { // not required - return nil - } - - if m.PlannedFailoverParams != nil { - if err := m.PlannedFailoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plannedFailoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plannedFailoverParams") - } - return err - } - } - - return nil -} - -func (m *CreateViewFailoverRequest) validateUnplannedFailoverParams(formats strfmt.Registry) error { - if swag.IsZero(m.UnplannedFailoverParams) { // not required - return nil - } - - if m.UnplannedFailoverParams != nil { - if err := m.UnplannedFailoverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unplannedFailoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unplannedFailoverParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create view failover request based on the context it is used -func (m *CreateViewFailoverRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePlannedFailoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnplannedFailoverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateViewFailoverRequest) contextValidatePlannedFailoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PlannedFailoverParams != nil { - - if swag.IsZero(m.PlannedFailoverParams) { // not required - return nil - } - - if err := m.PlannedFailoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plannedFailoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plannedFailoverParams") - } - return err - } - } - - return nil -} - -func (m *CreateViewFailoverRequest) contextValidateUnplannedFailoverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UnplannedFailoverParams != nil { - - if swag.IsZero(m.UnplannedFailoverParams) { // not required - return nil - } - - if err := m.UnplannedFailoverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unplannedFailoverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unplannedFailoverParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewFailoverRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewFailoverRequest) UnmarshalBinary(b []byte) error { - var res CreateViewFailoverRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/create_view_request.go b/v2/models/create_view_request.go deleted file mode 100644 index d3c0c2dd..00000000 --- a/v2/models/create_view_request.go +++ /dev/null @@ -1,117 +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" -) - -// CreateViewRequest Create View Request. -// -// Specifies the information required for creating a new View. -// -// swagger:model CreateViewRequest -type CreateViewRequest struct { - CreateView - - CreateViewRequestAllOf1 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateViewRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateView - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateView = aO0 - - // AO1 - var aO1 CreateViewRequestAllOf1 - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CreateViewRequestAllOf1 = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateViewRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateView) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CreateViewRequestAllOf1) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view request -func (m *CreateViewRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateView - if err := m.CreateView.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CreateViewRequestAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - 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 - - // validation for a type composition with CreateView - if err := m.CreateView.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CreateViewRequestAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewRequest) UnmarshalBinary(b []byte) error { - var res CreateViewRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// CreateViewRequestAllOf1 create view request all of1 -// -// swagger:model CreateViewRequestAllOf1 -type CreateViewRequestAllOf1 interface{} diff --git a/v2/models/created_user_api_key.go b/v2/models/created_user_api_key.go deleted file mode 100644 index e60a0240..00000000 --- a/v2/models/created_user_api_key.go +++ /dev/null @@ -1,132 +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" -) - -// CreatedUserAPIKey Response instance after creating/rotating user API Keys. -// -// swagger:model CreatedUserAPIKey -type CreatedUserAPIKey struct { - UserAPIKey - - // Specifies the API key. - // Read Only: true - APIKey *string `json:"apiKey,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreatedUserAPIKey) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UserAPIKey - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UserAPIKey = aO0 - - // AO1 - var dataAO1 struct { - APIKey *string `json:"apiKey,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.APIKey = dataAO1.APIKey - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreatedUserAPIKey) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UserAPIKey) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - APIKey *string `json:"apiKey,omitempty"` - } - - dataAO1.APIKey = m.APIKey - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this created user API key -func (m *CreatedUserAPIKey) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UserAPIKey - if err := m.UserAPIKey.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this created user API key based on the context it is used -func (m *CreatedUserAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UserAPIKey - if err := m.UserAPIKey.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAPIKey(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreatedUserAPIKey) contextValidateAPIKey(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "apiKey", "body", m.APIKey); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CreatedUserAPIKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreatedUserAPIKey) UnmarshalBinary(b []byte) error { - var res CreatedUserAPIKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/creation_info.go b/v2/models/creation_info.go deleted file mode 100644 index 76a9e554..00000000 --- a/v2/models/creation_info.go +++ /dev/null @@ -1,52 +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" -) - -// CreationInfo Creation Info -// -// Specifies the information about the creation of the protection group or recovery. -// -// swagger:model CreationInfo -type CreationInfo struct { - - // Specifies the name of the user who created the protection group or recovery. - UserName *string `json:"userName,omitempty"` -} - -// Validate validates this creation info -func (m *CreationInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this creation info based on context it is used -func (m *CreationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreationInfo) UnmarshalBinary(b []byte) error { - var res CreationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/credentials.go b/v2/models/credentials.go deleted file mode 100644 index c4b318b0..00000000 --- a/v2/models/credentials.go +++ /dev/null @@ -1,90 +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" -) - -// Credentials Credentials -// -// Specifies the object to hold username and password. -// -// swagger:model Credentials -type Credentials struct { - - // Specifies the username to access target entity. - // Required: true - Username *string `json:"username"` - - // Specifies the password to access target entity. - // Required: true - Password *string `json:"password"` -} - -// Validate validates this credentials -func (m *Credentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Credentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *Credentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this credentials based on context it is used -func (m *Credentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Credentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Credentials) UnmarshalBinary(b []byte) error { - var res Credentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/csr_key_type.go b/v2/models/csr_key_type.go deleted file mode 100644 index ec77144d..00000000 --- a/v2/models/csr_key_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CsrKeyType CsrKeyType -// -// # Csr Key Type -// -// swagger:model CsrKeyType -type CsrKeyType struct { - - // Specifies the csr key type. - // Enum: ["rsa","ecdsa"] - CsrKeyType string `json:"csrKeyType,omitempty"` -} - -// Validate validates this csr key type -func (m *CsrKeyType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCsrKeyType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var csrKeyTypeTypeCsrKeyTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["rsa","ecdsa"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - csrKeyTypeTypeCsrKeyTypePropEnum = append(csrKeyTypeTypeCsrKeyTypePropEnum, v) - } -} - -const ( - - // CsrKeyTypeCsrKeyTypeRsa captures enum value "rsa" - CsrKeyTypeCsrKeyTypeRsa string = "rsa" - - // CsrKeyTypeCsrKeyTypeEcdsa captures enum value "ecdsa" - CsrKeyTypeCsrKeyTypeEcdsa string = "ecdsa" -) - -// prop value enum -func (m *CsrKeyType) validateCsrKeyTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, csrKeyTypeTypeCsrKeyTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CsrKeyType) validateCsrKeyType(formats strfmt.Registry) error { - if swag.IsZero(m.CsrKeyType) { // not required - return nil - } - - // value enum - if err := m.validateCsrKeyTypeEnum("csrKeyType", "body", m.CsrKeyType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this csr key type based on context it is used -func (m *CsrKeyType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CsrKeyType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CsrKeyType) UnmarshalBinary(b []byte) error { - var res CsrKeyType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/csr_service_name.go b/v2/models/csr_service_name.go deleted file mode 100644 index 2eb8ddac..00000000 --- a/v2/models/csr_service_name.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CsrServiceName CsrServiceName -// -// # Csr Service Name -// -// swagger:model CsrServiceName -type CsrServiceName struct { - - // Specifies the csr service name. - // Enum: ["iris"] - CsrServiceName string `json:"csrServiceName,omitempty"` -} - -// Validate validates this csr service name -func (m *CsrServiceName) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCsrServiceName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var csrServiceNameTypeCsrServiceNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["iris"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - csrServiceNameTypeCsrServiceNamePropEnum = append(csrServiceNameTypeCsrServiceNamePropEnum, v) - } -} - -const ( - - // CsrServiceNameCsrServiceNameIris captures enum value "iris" - CsrServiceNameCsrServiceNameIris string = "iris" -) - -// prop value enum -func (m *CsrServiceName) validateCsrServiceNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, csrServiceNameTypeCsrServiceNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CsrServiceName) validateCsrServiceName(formats strfmt.Registry) error { - if swag.IsZero(m.CsrServiceName) { // not required - return nil - } - - // value enum - if err := m.validateCsrServiceNameEnum("csrServiceName", "body", m.CsrServiceName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this csr service name based on context it is used -func (m *CsrServiceName) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CsrServiceName) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CsrServiceName) UnmarshalBinary(b []byte) error { - var res CsrServiceName - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/current_cluster_operations.go b/v2/models/current_cluster_operations.go deleted file mode 100644 index a7292274..00000000 --- a/v2/models/current_cluster_operations.go +++ /dev/null @@ -1,140 +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" -) - -// CurrentClusterOperations Current Cluster Operations. -// -// Specifies the current operations in a cluster. -// -// swagger:model CurrentClusterOperations -type CurrentClusterOperations struct { - - // Specifies the list of cluster operations. - // Enum: ["None","Destroy","Upgrade","Clean","NodeRemoval","DiskRemoval","DiskAddition","NodeAddition","UploadPackageByUrl","UploadPackageAndUpgrade","BaseOSUpgrade","ServiceRestart","SystemServiceRestart"] - Value string `json:"value,omitempty"` -} - -// Validate validates this current cluster operations -func (m *CurrentClusterOperations) 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 currentClusterOperationsTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Destroy","Upgrade","Clean","NodeRemoval","DiskRemoval","DiskAddition","NodeAddition","UploadPackageByUrl","UploadPackageAndUpgrade","BaseOSUpgrade","ServiceRestart","SystemServiceRestart"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - currentClusterOperationsTypeValuePropEnum = append(currentClusterOperationsTypeValuePropEnum, v) - } -} - -const ( - - // CurrentClusterOperationsValueNone captures enum value "None" - CurrentClusterOperationsValueNone string = "None" - - // CurrentClusterOperationsValueDestroy captures enum value "Destroy" - CurrentClusterOperationsValueDestroy string = "Destroy" - - // CurrentClusterOperationsValueUpgrade captures enum value "Upgrade" - CurrentClusterOperationsValueUpgrade string = "Upgrade" - - // CurrentClusterOperationsValueClean captures enum value "Clean" - CurrentClusterOperationsValueClean string = "Clean" - - // CurrentClusterOperationsValueNodeRemoval captures enum value "NodeRemoval" - CurrentClusterOperationsValueNodeRemoval string = "NodeRemoval" - - // CurrentClusterOperationsValueDiskRemoval captures enum value "DiskRemoval" - CurrentClusterOperationsValueDiskRemoval string = "DiskRemoval" - - // CurrentClusterOperationsValueDiskAddition captures enum value "DiskAddition" - CurrentClusterOperationsValueDiskAddition string = "DiskAddition" - - // CurrentClusterOperationsValueNodeAddition captures enum value "NodeAddition" - CurrentClusterOperationsValueNodeAddition string = "NodeAddition" - - // CurrentClusterOperationsValueUploadPackageByURL captures enum value "UploadPackageByUrl" - CurrentClusterOperationsValueUploadPackageByURL string = "UploadPackageByUrl" - - // CurrentClusterOperationsValueUploadPackageAndUpgrade captures enum value "UploadPackageAndUpgrade" - CurrentClusterOperationsValueUploadPackageAndUpgrade string = "UploadPackageAndUpgrade" - - // CurrentClusterOperationsValueBaseOSUpgrade captures enum value "BaseOSUpgrade" - CurrentClusterOperationsValueBaseOSUpgrade string = "BaseOSUpgrade" - - // CurrentClusterOperationsValueServiceRestart captures enum value "ServiceRestart" - CurrentClusterOperationsValueServiceRestart string = "ServiceRestart" - - // CurrentClusterOperationsValueSystemServiceRestart captures enum value "SystemServiceRestart" - CurrentClusterOperationsValueSystemServiceRestart string = "SystemServiceRestart" -) - -// prop value enum -func (m *CurrentClusterOperations) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, currentClusterOperationsTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CurrentClusterOperations) 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 current cluster operations based on context it is used -func (m *CurrentClusterOperations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CurrentClusterOperations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CurrentClusterOperations) UnmarshalBinary(b []byte) error { - var res CurrentClusterOperations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/custom_tag_params.go b/v2/models/custom_tag_params.go deleted file mode 100644 index 4da4b3bf..00000000 --- a/v2/models/custom_tag_params.go +++ /dev/null @@ -1,88 +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" -) - -// CustomTagParams Specifies tag information of custom tags to be applied to various resources when converting and deploying a VM to AWS. -// -// swagger:model CustomTagParams -type CustomTagParams struct { - - // Specifies key of the custom tag. - // Required: true - Key *string `json:"key"` - - // Specifies value of the custom tag. - // Required: true - Value *string `json:"value"` -} - -// Validate validates this custom tag params -func (m *CustomTagParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CustomTagParams) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *CustomTagParams) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this custom tag params based on context it is used -func (m *CustomTagParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CustomTagParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CustomTagParams) UnmarshalBinary(b []byte) error { - var res CustomTagParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/d_maa_s_info.go b/v2/models/d_maa_s_info.go deleted file mode 100644 index 61d6fc23..00000000 --- a/v2/models/d_maa_s_info.go +++ /dev/null @@ -1,71 +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" -) - -// DMaaSInfo Specifies the DMaaS info about the cluster. -// -// swagger:model DMaaSInfo -type DMaaSInfo struct { - - // Specifies whether the cluster is a DMaaS cluster. - // Required: true - IsDmaas *bool `json:"isDmaas"` -} - -// Validate validates this d maa s info -func (m *DMaaSInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsDmaas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DMaaSInfo) validateIsDmaas(formats strfmt.Registry) error { - - if err := validate.Required("isDmaas", "body", m.IsDmaas); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this d maa s info based on context it is used -func (m *DMaaSInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DMaaSInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DMaaSInfo) UnmarshalBinary(b []byte) error { - var res DMaaSInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/d_s_e_solr_info.go b/v2/models/d_s_e_solr_info.go deleted file mode 100644 index bb43a169..00000000 --- a/v2/models/d_s_e_solr_info.go +++ /dev/null @@ -1,90 +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" -) - -// DSESolrInfo Authentication details for DSE solr. -// -// Contains details about DSE Solr. -// -// swagger:model DSESolrInfo -type DSESolrInfo struct { - - // Solr node IP Addresses - // Required: true - SolrNodes []string `json:"solrNodes"` - - // Solr node Port. - // Required: true - SolrPort *int32 `json:"solrPort"` -} - -// Validate validates this d s e solr info -func (m *DSESolrInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSolrNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSolrPort(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DSESolrInfo) validateSolrNodes(formats strfmt.Registry) error { - - if err := validate.Required("solrNodes", "body", m.SolrNodes); err != nil { - return err - } - - return nil -} - -func (m *DSESolrInfo) validateSolrPort(formats strfmt.Registry) error { - - if err := validate.Required("solrPort", "body", m.SolrPort); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this d s e solr info based on context it is used -func (m *DSESolrInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DSESolrInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DSESolrInfo) UnmarshalBinary(b []byte) error { - var res DSESolrInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_lock_config.go b/v2/models/data_lock_config.go deleted file mode 100644 index cf4f027b..00000000 --- a/v2/models/data_lock_config.go +++ /dev/null @@ -1,192 +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" -) - -// DataLockConfig Specifies WORM retention type for the 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. -// -// swagger:model DataLockConfig -type DataLockConfig struct { - - // Specifies the type of WORM retention type. - // 'Compliance' implies WORM retention is set for compliance reason. - // 'Administrative' implies WORM retention is set for administrative purposes. - // Required: true - // Enum: ["Compliance","Administrative"] - Mode *string `json:"mode"` - - // Specificies the Retention Unit of a dataLock measured in days, months or years.
If unit is 'Months', then number specified in duration is multiplied to 30.
Example: If duration is 4 and unit is 'Months' then number of retention days will be 30 * 4 = 120 days.
If unit is 'Years', then number specified in duration is multiplied to 365.
If duration is 2 and unit is 'Months' then number of retention days will be 365 * 2 = 730 days. - // Required: true - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the duration for a dataLock.
Example. If duration is 7 and unit is Months, the dataLock is enabled for last 7 * 30 = 210 days of the backup. - // Required: true - // Minimum: 1 - Duration *int64 `json:"duration"` - - // Specifies whether objects in the external target associated with this policy need to be made immutable. - EnableWormOnExternalTarget *bool `json:"enableWormOnExternalTarget,omitempty"` -} - -// Validate validates this data lock config -func (m *DataLockConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataLockConfigTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataLockConfigTypeModePropEnum = append(dataLockConfigTypeModePropEnum, v) - } -} - -const ( - - // DataLockConfigModeCompliance captures enum value "Compliance" - DataLockConfigModeCompliance string = "Compliance" - - // DataLockConfigModeAdministrative captures enum value "Administrative" - DataLockConfigModeAdministrative string = "Administrative" -) - -// prop value enum -func (m *DataLockConfig) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataLockConfigTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataLockConfig) validateMode(formats strfmt.Registry) error { - - if err := validate.Required("mode", "body", m.Mode); err != nil { - return err - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -var dataLockConfigTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataLockConfigTypeUnitPropEnum = append(dataLockConfigTypeUnitPropEnum, v) - } -} - -const ( - - // DataLockConfigUnitDays captures enum value "Days" - DataLockConfigUnitDays string = "Days" - - // DataLockConfigUnitWeeks captures enum value "Weeks" - DataLockConfigUnitWeeks string = "Weeks" - - // DataLockConfigUnitMonths captures enum value "Months" - DataLockConfigUnitMonths string = "Months" - - // DataLockConfigUnitYears captures enum value "Years" - DataLockConfigUnitYears string = "Years" -) - -// prop value enum -func (m *DataLockConfig) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataLockConfigTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataLockConfig) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *DataLockConfig) validateDuration(formats strfmt.Registry) error { - - if err := validate.Required("duration", "body", m.Duration); err != nil { - return err - } - - if err := validate.MinimumInt("duration", "body", *m.Duration, 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data lock config based on context it is used -func (m *DataLockConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataLockConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataLockConfig) UnmarshalBinary(b []byte) error { - var res DataLockConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_lock_constraints.go b/v2/models/data_lock_constraints.go deleted file mode 100644 index 4c2eec71..00000000 --- a/v2/models/data_lock_constraints.go +++ /dev/null @@ -1,110 +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" -) - -// DataLockConstraints DataLock Constraints -// -// Specifies the dataLock constraints for local or target snapshot. -// -// swagger:model DataLockConstraints -type DataLockConstraints struct { - - // Specifies the type of WORM retention type.
'Compliance' implies WORM retention is set for compliance reason.
'Administrative' implies WORM retention is set for administrative purposes. - // Enum: ["Compliance","Administrative"] - Mode *string `json:"mode,omitempty"` - - // Specifies the expiry time of attempt in Unix epoch Timestamp (in microseconds). - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` -} - -// Validate validates this data lock constraints -func (m *DataLockConstraints) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataLockConstraintsTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataLockConstraintsTypeModePropEnum = append(dataLockConstraintsTypeModePropEnum, v) - } -} - -const ( - - // DataLockConstraintsModeCompliance captures enum value "Compliance" - DataLockConstraintsModeCompliance string = "Compliance" - - // DataLockConstraintsModeAdministrative captures enum value "Administrative" - DataLockConstraintsModeAdministrative string = "Administrative" -) - -// prop value enum -func (m *DataLockConstraints) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataLockConstraintsTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataLockConstraints) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data lock constraints based on context it is used -func (m *DataLockConstraints) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataLockConstraints) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataLockConstraints) UnmarshalBinary(b []byte) error { - var res DataLockConstraints - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_point.go b/v2/models/data_point.go deleted file mode 100644 index e0d15400..00000000 --- a/v2/models/data_point.go +++ /dev/null @@ -1,59 +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" -) - -// DataPoint Specifies a data point. -// -// swagger:model DataPoint -type DataPoint struct { - - // Specifies the timestamp of the data point. - TimestampMsecs *int64 `json:"timestampMsecs,omitempty"` - - // Specifies the data point value in string format. - StringValue *string `json:"stringValue,omitempty"` - - // Specifies the data point value in double format. - DoubleValue *float64 `json:"doubleValue,omitempty"` - - // Specifies the data point value in int64 format. - Int64Value *int64 `json:"int64Value,omitempty"` -} - -// Validate validates this data point -func (m *DataPoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data point based on context it is used -func (m *DataPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPoint) UnmarshalBinary(b []byte) error { - var res DataPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_analysis_group.go b/v2/models/data_tiering_analysis_group.go deleted file mode 100644 index 18025d2b..00000000 --- a/v2/models/data_tiering_analysis_group.go +++ /dev/null @@ -1,240 +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" -) - -// DataTieringAnalysisGroup Specifies the data tiering analysis group. -// -// swagger:model DataTieringAnalysisGroup -type DataTieringAnalysisGroup struct { - CommonDataTieringAnalysisGroupParams - - // Specifies the ID of the data tiering analysis group. - ID *string `json:"id,omitempty"` - - // Specifies the last run information. - // Read Only: true - LastRun *DataTieringAnalysisGroupRun `json:"lastRun,omitempty"` - - // Specifies the last successful run information. If no successful - // run has occurred, this will be nil. - // Read Only: true - LastSuccessfulRun *DataTieringAnalysisGroupRun `json:"lastSuccessfulRun,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DataTieringAnalysisGroup) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonDataTieringAnalysisGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonDataTieringAnalysisGroupParams = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - LastRun *DataTieringAnalysisGroupRun `json:"lastRun,omitempty"` - - LastSuccessfulRun *DataTieringAnalysisGroupRun `json:"lastSuccessfulRun,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.LastRun = dataAO1.LastRun - - m.LastSuccessfulRun = dataAO1.LastSuccessfulRun - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DataTieringAnalysisGroup) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonDataTieringAnalysisGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - LastRun *DataTieringAnalysisGroupRun `json:"lastRun,omitempty"` - - LastSuccessfulRun *DataTieringAnalysisGroupRun `json:"lastSuccessfulRun,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.LastRun = m.LastRun - - dataAO1.LastSuccessfulRun = m.LastSuccessfulRun - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this data tiering analysis group -func (m *DataTieringAnalysisGroup) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringAnalysisGroupParams - if err := m.CommonDataTieringAnalysisGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastSuccessfulRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisGroup) validateLastRun(formats strfmt.Registry) error { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *DataTieringAnalysisGroup) validateLastSuccessfulRun(formats strfmt.Registry) error { - - if swag.IsZero(m.LastSuccessfulRun) { // not required - return nil - } - - if m.LastSuccessfulRun != nil { - if err := m.LastSuccessfulRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastSuccessfulRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastSuccessfulRun") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering analysis group based on the context it is used -func (m *DataTieringAnalysisGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringAnalysisGroupParams - if err := m.CommonDataTieringAnalysisGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastSuccessfulRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisGroup) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -func (m *DataTieringAnalysisGroup) contextValidateLastSuccessfulRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastSuccessfulRun != nil { - - if swag.IsZero(m.LastSuccessfulRun) { // not required - return nil - } - - if err := m.LastSuccessfulRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastSuccessfulRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastSuccessfulRun") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringAnalysisGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringAnalysisGroup) UnmarshalBinary(b []byte) error { - var res DataTieringAnalysisGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_analysis_group_run.go b/v2/models/data_tiering_analysis_group_run.go deleted file mode 100644 index 370f1d3f..00000000 --- a/v2/models/data_tiering_analysis_group_run.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringAnalysisGroupRun Specifies the data tiering analysis group run. -// -// swagger:model DataTieringAnalysisGroupRun -type DataTieringAnalysisGroupRun struct { - - // Specifies the ID of the data tiering analysis group run. - ID *string `json:"id,omitempty"` - - // Specifies the objects details analyzed during data tiering analysis - // group run. - Objects []*DataTieringObjectInfo `json:"objects"` - - // Specifies the start time of analysis run in Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of analysis run in Unix epoch Timestamp(in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the data tiering analysis details. - AnalysisInfo *DataTieringAnalysisInfo `json:"analysisInfo,omitempty"` -} - -// Validate validates this data tiering analysis group run -func (m *DataTieringAnalysisGroupRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAnalysisInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisGroupRun) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DataTieringAnalysisGroupRun) validateAnalysisInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AnalysisInfo) { // not required - return nil - } - - if m.AnalysisInfo != nil { - if err := m.AnalysisInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering analysis group run based on the context it is used -func (m *DataTieringAnalysisGroupRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAnalysisInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisGroupRun) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DataTieringAnalysisGroupRun) contextValidateAnalysisInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AnalysisInfo != nil { - - if swag.IsZero(m.AnalysisInfo) { // not required - return nil - } - - if err := m.AnalysisInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringAnalysisGroupRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringAnalysisGroupRun) UnmarshalBinary(b []byte) error { - var res DataTieringAnalysisGroupRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_analysis_group_runs.go b/v2/models/data_tiering_analysis_group_runs.go deleted file mode 100644 index 96c4083a..00000000 --- a/v2/models/data_tiering_analysis_group_runs.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringAnalysisGroupRuns Specifies the runs of a data tiering analysis group. -// -// swagger:model DataTieringAnalysisGroupRuns -type DataTieringAnalysisGroupRuns []*DataTieringAnalysisGroupRun - -// Validate validates this data tiering analysis group runs -func (m DataTieringAnalysisGroupRuns) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this data tiering analysis group runs based on the context it is used -func (m DataTieringAnalysisGroupRuns) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/data_tiering_analysis_groups.go b/v2/models/data_tiering_analysis_groups.go deleted file mode 100644 index ca6a67e5..00000000 --- a/v2/models/data_tiering_analysis_groups.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringAnalysisGroups Specifies the data tiering analysis groups. -// -// swagger:model DataTieringAnalysisGroups -type DataTieringAnalysisGroups []*DataTieringAnalysisGroup - -// Validate validates this data tiering analysis groups -func (m DataTieringAnalysisGroups) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this data tiering analysis groups based on the context it is used -func (m DataTieringAnalysisGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/data_tiering_analysis_info.go b/v2/models/data_tiering_analysis_info.go deleted file mode 100644 index 6e3f5149..00000000 --- a/v2/models/data_tiering_analysis_info.go +++ /dev/null @@ -1,266 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataTieringAnalysisInfo Specifies the data tiering analysis details. -// -// swagger:model DataTieringAnalysisInfo -type DataTieringAnalysisInfo struct { - - // Array of Tag objects. - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` - - // progress - Progress *ProgressSummary `json:"progress,omitempty"` - - // Status of the analysis run. - // '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. - // 'OnHold' indicates that the run has On hold. - // 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // message from the last analysis run stating the error message in case of error in analysis run or warning message if the run finished successfully, but there were some warning messages. - Message *string `json:"message,omitempty"` -} - -// Validate validates this data tiering analysis info -func (m *DataTieringAnalysisInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProgress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisInfo) validateTagsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TagsInfo) { // not required - return nil - } - - for i := 0; i < len(m.TagsInfo); i++ { - if swag.IsZero(m.TagsInfo[i]) { // not required - continue - } - - if m.TagsInfo[i] != nil { - if err := m.TagsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DataTieringAnalysisInfo) validateProgress(formats strfmt.Registry) error { - if swag.IsZero(m.Progress) { // not required - return nil - } - - if m.Progress != nil { - if err := m.Progress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -var dataTieringAnalysisInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTieringAnalysisInfoTypeStatusPropEnum = append(dataTieringAnalysisInfoTypeStatusPropEnum, v) - } -} - -const ( - - // DataTieringAnalysisInfoStatusAccepted captures enum value "Accepted" - DataTieringAnalysisInfoStatusAccepted string = "Accepted" - - // DataTieringAnalysisInfoStatusRunning captures enum value "Running" - DataTieringAnalysisInfoStatusRunning string = "Running" - - // DataTieringAnalysisInfoStatusCanceled captures enum value "Canceled" - DataTieringAnalysisInfoStatusCanceled string = "Canceled" - - // DataTieringAnalysisInfoStatusCanceling captures enum value "Canceling" - DataTieringAnalysisInfoStatusCanceling string = "Canceling" - - // DataTieringAnalysisInfoStatusFailed captures enum value "Failed" - DataTieringAnalysisInfoStatusFailed string = "Failed" - - // DataTieringAnalysisInfoStatusMissed captures enum value "Missed" - DataTieringAnalysisInfoStatusMissed string = "Missed" - - // DataTieringAnalysisInfoStatusSucceeded captures enum value "Succeeded" - DataTieringAnalysisInfoStatusSucceeded string = "Succeeded" - - // DataTieringAnalysisInfoStatusSucceededWithWarning captures enum value "SucceededWithWarning" - DataTieringAnalysisInfoStatusSucceededWithWarning string = "SucceededWithWarning" - - // DataTieringAnalysisInfoStatusOnHold captures enum value "OnHold" - DataTieringAnalysisInfoStatusOnHold string = "OnHold" - - // DataTieringAnalysisInfoStatusFinalizing captures enum value "Finalizing" - DataTieringAnalysisInfoStatusFinalizing string = "Finalizing" - - // DataTieringAnalysisInfoStatusSkipped captures enum value "Skipped" - DataTieringAnalysisInfoStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *DataTieringAnalysisInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTieringAnalysisInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTieringAnalysisInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this data tiering analysis info based on the context it is used -func (m *DataTieringAnalysisInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProgress(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisInfo) contextValidateTagsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagsInfo); i++ { - - if m.TagsInfo[i] != nil { - - if swag.IsZero(m.TagsInfo[i]) { // not required - return nil - } - - if err := m.TagsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DataTieringAnalysisInfo) contextValidateProgress(ctx context.Context, formats strfmt.Registry) error { - - if m.Progress != nil { - - if swag.IsZero(m.Progress) { // not required - return nil - } - - if err := m.Progress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringAnalysisInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringAnalysisInfo) UnmarshalBinary(b []byte) error { - var res DataTieringAnalysisInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_analysis_run_request.go b/v2/models/data_tiering_analysis_run_request.go deleted file mode 100644 index eca865be..00000000 --- a/v2/models/data_tiering_analysis_run_request.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringAnalysisRunRequest Specifies the request to run analysis group once. -// -// swagger:model DataTieringAnalysisRunRequest -type DataTieringAnalysisRunRequest struct { - - // Specifies the list of shares to analyse. - Shares []*DataTieringAnalysisShareInfo `json:"shares"` -} - -// Validate validates this data tiering analysis run request -func (m *DataTieringAnalysisRunRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShares(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisRunRequest) validateShares(formats strfmt.Registry) error { - if swag.IsZero(m.Shares) { // not required - return nil - } - - for i := 0; i < len(m.Shares); i++ { - if swag.IsZero(m.Shares[i]) { // not required - continue - } - - if m.Shares[i] != nil { - if err := m.Shares[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data tiering analysis run request based on the context it is used -func (m *DataTieringAnalysisRunRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateShares(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisRunRequest) contextValidateShares(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Shares); i++ { - - if m.Shares[i] != nil { - - if swag.IsZero(m.Shares[i]) { // not required - return nil - } - - if err := m.Shares[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringAnalysisRunRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringAnalysisRunRequest) UnmarshalBinary(b []byte) error { - var res DataTieringAnalysisRunRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_analysis_share_info.go b/v2/models/data_tiering_analysis_share_info.go deleted file mode 100644 index b6eb6fc1..00000000 --- a/v2/models/data_tiering_analysis_share_info.go +++ /dev/null @@ -1,71 +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" -) - -// DataTieringAnalysisShareInfo Specifies the info for a particular share. -// -// swagger:model DataTieringAnalysisShareInfo -type DataTieringAnalysisShareInfo struct { - - // Specifies the id of the share. - // Required: true - ShareID *int64 `json:"shareId"` -} - -// Validate validates this data tiering analysis share info -func (m *DataTieringAnalysisShareInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShareID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringAnalysisShareInfo) validateShareID(formats strfmt.Registry) error { - - if err := validate.Required("shareId", "body", m.ShareID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data tiering analysis share info based on context it is used -func (m *DataTieringAnalysisShareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringAnalysisShareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringAnalysisShareInfo) UnmarshalBinary(b []byte) error { - var res DataTieringAnalysisShareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_object_analysis_info.go b/v2/models/data_tiering_object_analysis_info.go deleted file mode 100644 index 4a2d849d..00000000 --- a/v2/models/data_tiering_object_analysis_info.go +++ /dev/null @@ -1,278 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataTieringObjectAnalysisInfo Specifies the data tiering object analysis details. -// -// swagger:model DataTieringObjectAnalysisInfo -type DataTieringObjectAnalysisInfo struct { - - // Array of Tag objects. - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` - - // Status of the analysis run. - // '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. - // 'OnHold' indicates that the run has On hold. - // 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // A message about the error if encountered while performing data - // tiering analysis. - Message *string `json:"message,omitempty"` - - // Specifies the source share analysis stats. - Stats []*DataTieringShareStats `json:"stats"` -} - -// Validate validates this data tiering object analysis info -func (m *DataTieringObjectAnalysisInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringObjectAnalysisInfo) validateTagsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TagsInfo) { // not required - return nil - } - - for i := 0; i < len(m.TagsInfo); i++ { - if swag.IsZero(m.TagsInfo[i]) { // not required - continue - } - - if m.TagsInfo[i] != nil { - if err := m.TagsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var dataTieringObjectAnalysisInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTieringObjectAnalysisInfoTypeStatusPropEnum = append(dataTieringObjectAnalysisInfoTypeStatusPropEnum, v) - } -} - -const ( - - // DataTieringObjectAnalysisInfoStatusAccepted captures enum value "Accepted" - DataTieringObjectAnalysisInfoStatusAccepted string = "Accepted" - - // DataTieringObjectAnalysisInfoStatusRunning captures enum value "Running" - DataTieringObjectAnalysisInfoStatusRunning string = "Running" - - // DataTieringObjectAnalysisInfoStatusCanceled captures enum value "Canceled" - DataTieringObjectAnalysisInfoStatusCanceled string = "Canceled" - - // DataTieringObjectAnalysisInfoStatusCanceling captures enum value "Canceling" - DataTieringObjectAnalysisInfoStatusCanceling string = "Canceling" - - // DataTieringObjectAnalysisInfoStatusFailed captures enum value "Failed" - DataTieringObjectAnalysisInfoStatusFailed string = "Failed" - - // DataTieringObjectAnalysisInfoStatusMissed captures enum value "Missed" - DataTieringObjectAnalysisInfoStatusMissed string = "Missed" - - // DataTieringObjectAnalysisInfoStatusSucceeded captures enum value "Succeeded" - DataTieringObjectAnalysisInfoStatusSucceeded string = "Succeeded" - - // DataTieringObjectAnalysisInfoStatusSucceededWithWarning captures enum value "SucceededWithWarning" - DataTieringObjectAnalysisInfoStatusSucceededWithWarning string = "SucceededWithWarning" - - // DataTieringObjectAnalysisInfoStatusOnHold captures enum value "OnHold" - DataTieringObjectAnalysisInfoStatusOnHold string = "OnHold" - - // DataTieringObjectAnalysisInfoStatusFinalizing captures enum value "Finalizing" - DataTieringObjectAnalysisInfoStatusFinalizing string = "Finalizing" - - // DataTieringObjectAnalysisInfoStatusSkipped captures enum value "Skipped" - DataTieringObjectAnalysisInfoStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *DataTieringObjectAnalysisInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTieringObjectAnalysisInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTieringObjectAnalysisInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *DataTieringObjectAnalysisInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - return nil - } - - for i := 0; i < len(m.Stats); i++ { - if swag.IsZero(m.Stats[i]) { // not required - continue - } - - if m.Stats[i] != nil { - if err := m.Stats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data tiering object analysis info based on the context it is used -func (m *DataTieringObjectAnalysisInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringObjectAnalysisInfo) contextValidateTagsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagsInfo); i++ { - - if m.TagsInfo[i] != nil { - - if swag.IsZero(m.TagsInfo[i]) { // not required - return nil - } - - if err := m.TagsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DataTieringObjectAnalysisInfo) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Stats); i++ { - - if m.Stats[i] != nil { - - if swag.IsZero(m.Stats[i]) { // not required - return nil - } - - if err := m.Stats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringObjectAnalysisInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringObjectAnalysisInfo) UnmarshalBinary(b []byte) error { - var res DataTieringObjectAnalysisInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_object_info.go b/v2/models/data_tiering_object_info.go deleted file mode 100644 index 88cc14a4..00000000 --- a/v2/models/data_tiering_object_info.go +++ /dev/null @@ -1,166 +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" -) - -// DataTieringObjectInfo Specifies the data tiering analysis group run object details. -// -// swagger:model DataTieringObjectInfo -type DataTieringObjectInfo struct { - ProtectionObjectInput - - // Specifies the data tiering object analysis details. - AnalysisInfo *DataTieringObjectAnalysisInfo `json:"analysisInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DataTieringObjectInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - // AO1 - var dataAO1 struct { - AnalysisInfo *DataTieringObjectAnalysisInfo `json:"analysisInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AnalysisInfo = dataAO1.AnalysisInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DataTieringObjectInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AnalysisInfo *DataTieringObjectAnalysisInfo `json:"analysisInfo,omitempty"` - } - - dataAO1.AnalysisInfo = m.AnalysisInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this data tiering object info -func (m *DataTieringObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAnalysisInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringObjectInfo) validateAnalysisInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.AnalysisInfo) { // not required - return nil - } - - if m.AnalysisInfo != nil { - if err := m.AnalysisInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering object info based on the context it is used -func (m *DataTieringObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAnalysisInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringObjectInfo) contextValidateAnalysisInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AnalysisInfo != nil { - - if swag.IsZero(m.AnalysisInfo) { // not required - return nil - } - - if err := m.AnalysisInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("analysisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("analysisInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringObjectInfo) UnmarshalBinary(b []byte) error { - var res DataTieringObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_schedule.go b/v2/models/data_tiering_schedule.go deleted file mode 100644 index 1f08da3a..00000000 --- a/v2/models/data_tiering_schedule.go +++ /dev/null @@ -1,320 +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" -) - -// DataTieringSchedule Specifies the data tiering schedule. -// -// swagger:model DataTieringSchedule -type DataTieringSchedule struct { - - // Specifies how often to migrate data from source to target - // Enum: ["Days","Weeks","Months"] - Unit *string `json:"unit,omitempty"` - - // Specifies settings that define a schedule for a data tiering runs to - // start every n days. - DaySchedule *DaySchedule `json:"daySchedule,omitempty"` - - // Specifies settings that define a schedule for a data tiering runs to - // start on certain days of week. - WeekSchedule *WeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies settings that define a schedule for a data tiering runs to - // on specific week and specific days of that week. - MonthSchedule *MonthSchedule `json:"monthSchedule,omitempty"` - - // Specifies the start time for the data tiering task. - StartTime *TimeOfDay `json:"startTime,omitempty"` -} - -// Validate validates this data tiering schedule -func (m *DataTieringSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataTieringScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTieringScheduleTypeUnitPropEnum = append(dataTieringScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // DataTieringScheduleUnitDays captures enum value "Days" - DataTieringScheduleUnitDays string = "Days" - - // DataTieringScheduleUnitWeeks captures enum value "Weeks" - DataTieringScheduleUnitWeeks string = "Weeks" - - // DataTieringScheduleUnitMonths captures enum value "Months" - DataTieringScheduleUnitMonths string = "Months" -) - -// prop value enum -func (m *DataTieringSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTieringScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTieringSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *DataTieringSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -// ContextValidate validate this data tiering schedule based on the context it is used -func (m *DataTieringSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *DataTieringSchedule) 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 -} - -// MarshalBinary interface implementation -func (m *DataTieringSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringSchedule) UnmarshalBinary(b []byte) error { - var res DataTieringSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_share_info.go b/v2/models/data_tiering_share_info.go deleted file mode 100644 index 90276514..00000000 --- a/v2/models/data_tiering_share_info.go +++ /dev/null @@ -1,78 +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" -) - -// DataTieringShareInfo Specifies the info for a particular share. -// -// swagger:model DataTieringShareInfo -type DataTieringShareInfo struct { - - // Specifies the id of the share. - // Required: true - ShareID *int64 `json:"shareId"` - - // Only applicable for uptiering tasks. - // Ignore the uptiering policy and uptier the directory pointed by the - // 'uptierPath'. If path is '/', then uptier everything - // - // This will override the global uptier path. - UptierPath *string `json:"uptierPath,omitempty"` -} - -// Validate validates this data tiering share info -func (m *DataTieringShareInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShareID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringShareInfo) validateShareID(formats strfmt.Registry) error { - - if err := validate.Required("shareId", "body", m.ShareID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data tiering share info based on context it is used -func (m *DataTieringShareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringShareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringShareInfo) UnmarshalBinary(b []byte) error { - var res DataTieringShareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_share_stats.go b/v2/models/data_tiering_share_stats.go deleted file mode 100644 index 4713d61a..00000000 --- a/v2/models/data_tiering_share_stats.go +++ /dev/null @@ -1,68 +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" -) - -// DataTieringShareStats Specifies the source shares analysis stats. -// -// swagger:model DataTieringShareStats -type DataTieringShareStats struct { - - // Specifies the file type bucket. - FileTypeTag *string `json:"fileTypeTag,omitempty"` - - // Specifies the file size bucket. - FileSizeTag *string `json:"fileSizeTag,omitempty"` - - // Specifies the access time bucket. - AccessTimeTag *string `json:"accessTimeTag,omitempty"` - - // Specifies the modification time bucket. - ModTimeTag *string `json:"modTimeTag,omitempty"` - - // Specifies the file count. - FileCount *uint64 `json:"fileCount,omitempty"` - - // Specifies the total count. - TotalSize *uint64 `json:"totalSize,omitempty"` - - // Specifies the unique identifer for stat. - ID *uint64 `json:"id,omitempty"` -} - -// Validate validates this data tiering share stats -func (m *DataTieringShareStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data tiering share stats based on context it is used -func (m *DataTieringShareStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringShareStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringShareStats) UnmarshalBinary(b []byte) error { - var res DataTieringShareStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_source.go b/v2/models/data_tiering_source.go deleted file mode 100644 index 9828b467..00000000 --- a/v2/models/data_tiering_source.go +++ /dev/null @@ -1,269 +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" -) - -// DataTieringSource Specifies the source data tiering details. -// -// swagger:model DataTieringSource -type DataTieringSource struct { - - // Specifies the environment type of the data tiering source. - // Enum: ["kGenericNas","kIsilon","kNetapp"] - Environment *string `json:"environment,omitempty"` - - // Specifies the parameters which are specific to data tiering generic - // NAS source. - GenericNasParams *GenericNasDataTieringParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to data tiering Isilon - // NAS source. - IsilonParams *IsilonDataTieringParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to data tiering Netapp - // NAS source. - NetappParams *NetappDataTieringParams `json:"netappParams,omitempty"` -} - -// Validate validates this data tiering source -func (m *DataTieringSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataTieringSourceTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGenericNas","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTieringSourceTypeEnvironmentPropEnum = append(dataTieringSourceTypeEnvironmentPropEnum, v) - } -} - -const ( - - // DataTieringSourceEnvironmentKGenericNas captures enum value "kGenericNas" - DataTieringSourceEnvironmentKGenericNas string = "kGenericNas" - - // DataTieringSourceEnvironmentKIsilon captures enum value "kIsilon" - DataTieringSourceEnvironmentKIsilon string = "kIsilon" - - // DataTieringSourceEnvironmentKNetapp captures enum value "kNetapp" - DataTieringSourceEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *DataTieringSource) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTieringSourceTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTieringSource) 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 -} - -func (m *DataTieringSource) validateGenericNasParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *DataTieringSource) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *DataTieringSource) validateNetappParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering source based on the context it is used -func (m *DataTieringSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringSource) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *DataTieringSource) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *DataTieringSource) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringSource) UnmarshalBinary(b []byte) error { - var res DataTieringSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_tag.go b/v2/models/data_tiering_tag.go deleted file mode 100644 index 1cb93993..00000000 --- a/v2/models/data_tiering_tag.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" -) - -// DataTieringTag Specifies label and value of tags. -// -// swagger:model DataTieringTag -type DataTieringTag struct { - - // Specifies label of tag. - Label *string `json:"label,omitempty"` - - // Specifies value of tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this data tiering tag -func (m *DataTieringTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data tiering tag based on context it is used -func (m *DataTieringTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTag) UnmarshalBinary(b []byte) error { - var res DataTieringTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_tag_config.go b/v2/models/data_tiering_tag_config.go deleted file mode 100644 index 7161f07b..00000000 --- a/v2/models/data_tiering_tag_config.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataTieringTagConfig Array of data tiering tag objects. -// -// swagger:model DataTieringTagConfig -type DataTieringTagConfig struct { - - // Specifies the ID of the data tiering analysis group. - // Read Only: true - ID *string `json:"id,omitempty"` - - // Array of Tag objects. - // Required: true - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` -} - -// Validate validates this data tiering tag config -func (m *DataTieringTagConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagsInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTagConfig) validateTagsInfo(formats strfmt.Registry) error { - - if err := validate.Required("tagsInfo", "body", m.TagsInfo); err != nil { - return err - } - - for i := 0; i < len(m.TagsInfo); i++ { - if swag.IsZero(m.TagsInfo[i]) { // not required - continue - } - - if m.TagsInfo[i] != nil { - if err := m.TagsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data tiering tag config based on the context it is used -func (m *DataTieringTagConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTagConfig) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *DataTieringTagConfig) contextValidateTagsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagsInfo); i++ { - - if m.TagsInfo[i] != nil { - - if swag.IsZero(m.TagsInfo[i]) { // not required - return nil - } - - if err := m.TagsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTagConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTagConfig) UnmarshalBinary(b []byte) error { - var res DataTieringTagConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_tag_object.go b/v2/models/data_tiering_tag_object.go deleted file mode 100644 index 57388397..00000000 --- a/v2/models/data_tiering_tag_object.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataTieringTagObject Specifies the tag information of type and array of (label, value). -// -// swagger:model DataTieringTagObject -type DataTieringTagObject struct { - - // Specifies type of tag. - // Enum: ["fileTypeTag","fileSizeTag","accessTimeTag","modTimeTag"] - Type *string `json:"type,omitempty"` - - // Array of tag label and value. - Tags []*DataTieringTag `json:"tags"` -} - -// Validate validates this data tiering tag object -func (m *DataTieringTagObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataTieringTagObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["fileTypeTag","fileSizeTag","accessTimeTag","modTimeTag"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataTieringTagObjectTypeTypePropEnum = append(dataTieringTagObjectTypeTypePropEnum, v) - } -} - -const ( - - // DataTieringTagObjectTypeFileTypeTag captures enum value "fileTypeTag" - DataTieringTagObjectTypeFileTypeTag string = "fileTypeTag" - - // DataTieringTagObjectTypeFileSizeTag captures enum value "fileSizeTag" - DataTieringTagObjectTypeFileSizeTag string = "fileSizeTag" - - // DataTieringTagObjectTypeAccessTimeTag captures enum value "accessTimeTag" - DataTieringTagObjectTypeAccessTimeTag string = "accessTimeTag" - - // DataTieringTagObjectTypeModTimeTag captures enum value "modTimeTag" - DataTieringTagObjectTypeModTimeTag string = "modTimeTag" -) - -// prop value enum -func (m *DataTieringTagObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataTieringTagObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataTieringTagObject) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *DataTieringTagObject) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - for i := 0; i < len(m.Tags); i++ { - if swag.IsZero(m.Tags[i]) { // not required - continue - } - - if m.Tags[i] != nil { - if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data tiering tag object based on the context it is used -func (m *DataTieringTagObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTagObject) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tags); i++ { - - if m.Tags[i] != nil { - - if swag.IsZero(m.Tags[i]) { // not required - return nil - } - - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTagObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTagObject) UnmarshalBinary(b []byte) error { - var res DataTieringTagObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_target.go b/v2/models/data_tiering_target.go deleted file mode 100644 index 713e13a2..00000000 --- a/v2/models/data_tiering_target.go +++ /dev/null @@ -1,91 +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" -) - -// DataTieringTarget Specifies the target data tiering details. -// -// swagger:model DataTieringTarget -type DataTieringTarget struct { - - // Specifies the view name. - // Required: true - ViewName *string `json:"viewName"` - - // Specifies the mount path inside the view. - MountPath *string `json:"mountPath,omitempty"` - - // Specifies the Storage Domain ID where the view will be kept. - // Required: true - StorageDomainID *int64 `json:"storageDomainId"` -} - -// Validate validates this data tiering target -func (m *DataTieringTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTarget) validateViewName(formats strfmt.Registry) error { - - if err := validate.Required("viewName", "body", m.ViewName); err != nil { - return err - } - - return nil -} - -func (m *DataTieringTarget) validateStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this data tiering target based on context it is used -func (m *DataTieringTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTarget) UnmarshalBinary(b []byte) error { - var res DataTieringTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_task.go b/v2/models/data_tiering_task.go deleted file mode 100644 index eea129c3..00000000 --- a/v2/models/data_tiering_task.go +++ /dev/null @@ -1,226 +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" -) - -// DataTieringTask Specifies the data tiering task details. -// -// swagger:model DataTieringTask -type DataTieringTask struct { - CommonDataTieringTaskResponse - - // Specifies downtiering policy for data tiering task. - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - // Specifies uptiering policy for data tiering task. - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DataTieringTask) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonDataTieringTaskResponse - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonDataTieringTaskResponse = aO0 - - // AO1 - var dataAO1 struct { - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DowntieringPolicy = dataAO1.DowntieringPolicy - - m.UptieringPolicy = dataAO1.UptieringPolicy - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DataTieringTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonDataTieringTaskResponse) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DowntieringPolicy *DowntieringPolicy `json:"downtieringPolicy,omitempty"` - - UptieringPolicy *UptieringPolicy `json:"uptieringPolicy,omitempty"` - } - - dataAO1.DowntieringPolicy = m.DowntieringPolicy - - dataAO1.UptieringPolicy = m.UptieringPolicy - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this data tiering task -func (m *DataTieringTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringTaskResponse - if err := m.CommonDataTieringTaskResponse.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDowntieringPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptieringPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTask) validateDowntieringPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.DowntieringPolicy) { // not required - return nil - } - - if m.DowntieringPolicy != nil { - if err := m.DowntieringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieringPolicy") - } - return err - } - } - - return nil -} - -func (m *DataTieringTask) validateUptieringPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.UptieringPolicy) { // not required - return nil - } - - if m.UptieringPolicy != nil { - if err := m.UptieringPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptieringPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering task based on the context it is used -func (m *DataTieringTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonDataTieringTaskResponse - if err := m.CommonDataTieringTaskResponse.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDowntieringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUptieringPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTask) contextValidateDowntieringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DowntieringPolicy != nil { - - if swag.IsZero(m.DowntieringPolicy) { // not required - return nil - } - - if err := m.DowntieringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieringPolicy") - } - return err - } - } - - return nil -} - -func (m *DataTieringTask) contextValidateUptieringPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.UptieringPolicy != nil { - - if swag.IsZero(m.UptieringPolicy) { // not required - return nil - } - - if err := m.UptieringPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uptieringPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uptieringPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTask) UnmarshalBinary(b []byte) error { - var res DataTieringTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_task_run.go b/v2/models/data_tiering_task_run.go deleted file mode 100644 index 5efc872c..00000000 --- a/v2/models/data_tiering_task_run.go +++ /dev/null @@ -1,118 +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" -) - -// DataTieringTaskRun Specifies the data tiering task run. -// -// swagger:model DataTieringTaskRun -type DataTieringTaskRun struct { - - // Specifies the id of the data tiering task run. - ID *string `json:"id,omitempty"` - - // Specifies the start time of task run in Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of task run in Unix epoch Timestamp(in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the data tiering tiering task details. - TieringInfo *TieringInfo `json:"tieringInfo,omitempty"` -} - -// Validate validates this data tiering task run -func (m *DataTieringTaskRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTieringInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTaskRun) validateTieringInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TieringInfo) { // not required - return nil - } - - if m.TieringInfo != nil { - if err := m.TieringInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this data tiering task run based on the context it is used -func (m *DataTieringTaskRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTieringInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTaskRun) contextValidateTieringInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringInfo != nil { - - if swag.IsZero(m.TieringInfo) { // not required - return nil - } - - if err := m.TieringInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTaskRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTaskRun) UnmarshalBinary(b []byte) error { - var res DataTieringTaskRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_task_run_request.go b/v2/models/data_tiering_task_run_request.go deleted file mode 100644 index edfd085e..00000000 --- a/v2/models/data_tiering_task_run_request.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringTaskRunRequest Run once data tiering task request. -// -// Specifies the request to run tiering task once. -// -// swagger:model DataTieringTaskRunRequest -type DataTieringTaskRunRequest struct { - - // Only applicable for uptiering tasks. - // Ignore the uptiering policy and uptier the directory pointed by the - // 'uptierPath'. If path is '/', then uptier everything. - // - // This is a global property which will be applied to all shares by default. - // This can be overriden by specifying uptierPath for each share. - UptierPath *string `json:"uptierPath,omitempty"` - - // Specifies the list of shares to tier. - Shares []*DataTieringShareInfo `json:"shares"` -} - -// Validate validates this data tiering task run request -func (m *DataTieringTaskRunRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShares(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTaskRunRequest) validateShares(formats strfmt.Registry) error { - if swag.IsZero(m.Shares) { // not required - return nil - } - - for i := 0; i < len(m.Shares); i++ { - if swag.IsZero(m.Shares[i]) { // not required - continue - } - - if m.Shares[i] != nil { - if err := m.Shares[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data tiering task run request based on the context it is used -func (m *DataTieringTaskRunRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateShares(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTieringTaskRunRequest) contextValidateShares(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Shares); i++ { - - if m.Shares[i] != nil { - - if swag.IsZero(m.Shares[i]) { // not required - return nil - } - - if err := m.Shares[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTaskRunRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTaskRunRequest) UnmarshalBinary(b []byte) error { - var res DataTieringTaskRunRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_task_stats.go b/v2/models/data_tiering_task_stats.go deleted file mode 100644 index f86054e8..00000000 --- a/v2/models/data_tiering_task_stats.go +++ /dev/null @@ -1,150 +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" -) - -// DataTieringTaskStats Specifies the stats of data tiering task. -// -// swagger:model DataTieringTaskStats -type DataTieringTaskStats struct { - BackupDataStats - - // Specifies total entity count. - EntityCount *int64 `json:"entityCount,omitempty"` - - // Specifies changed entity count. - ChangedEntityCount *int64 `json:"changedEntityCount,omitempty"` - - // Specifies whether tiering goal has been met. - IsTieringGoalMet *bool `json:"isTieringGoalMet,omitempty"` - - // Specifies total amount of data successfully tiered from the NAS source. - TotalTieredBytes *int64 `json:"totalTieredBytes,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DataTieringTaskStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BackupDataStats - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BackupDataStats = aO0 - - // AO1 - var dataAO1 struct { - EntityCount *int64 `json:"entityCount,omitempty"` - - ChangedEntityCount *int64 `json:"changedEntityCount,omitempty"` - - IsTieringGoalMet *bool `json:"isTieringGoalMet,omitempty"` - - TotalTieredBytes *int64 `json:"totalTieredBytes,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.EntityCount = dataAO1.EntityCount - - m.ChangedEntityCount = dataAO1.ChangedEntityCount - - m.IsTieringGoalMet = dataAO1.IsTieringGoalMet - - m.TotalTieredBytes = dataAO1.TotalTieredBytes - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DataTieringTaskStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.BackupDataStats) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - EntityCount *int64 `json:"entityCount,omitempty"` - - ChangedEntityCount *int64 `json:"changedEntityCount,omitempty"` - - IsTieringGoalMet *bool `json:"isTieringGoalMet,omitempty"` - - TotalTieredBytes *int64 `json:"totalTieredBytes,omitempty"` - } - - dataAO1.EntityCount = m.EntityCount - - dataAO1.ChangedEntityCount = m.ChangedEntityCount - - dataAO1.IsTieringGoalMet = m.IsTieringGoalMet - - dataAO1.TotalTieredBytes = m.TotalTieredBytes - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this data tiering task stats -func (m *DataTieringTaskStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupDataStats - if err := m.BackupDataStats.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this data tiering task stats based on the context it is used -func (m *DataTieringTaskStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupDataStats - if err := m.BackupDataStats.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *DataTieringTaskStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTieringTaskStats) UnmarshalBinary(b []byte) error { - var res DataTieringTaskStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_tiering_tasks.go b/v2/models/data_tiering_tasks.go deleted file mode 100644 index df0b2839..00000000 --- a/v2/models/data_tiering_tasks.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTieringTasks The list of data tiering tasks. -// -// swagger:model DataTieringTasks -type DataTieringTasks []*DataTieringTask - -// Validate validates this data tiering tasks -func (m DataTieringTasks) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this data tiering tasks based on the context it is used -func (m DataTieringTasks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/data_transfer_info.go b/v2/models/data_transfer_info.go deleted file mode 100644 index e65505cc..00000000 --- a/v2/models/data_transfer_info.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataTransferInfo Data transfer info request. -// -// Specifies the the details of network used in transferring the data from source account to Cohesity cluster. -// -// swagger:model DataTransferInfo -type DataTransferInfo struct { - - // Specifies whether to use private network or public network. - IsPrivateNetwork *bool `json:"isPrivateNetwork,omitempty"` - - // Specifies Whether to use private network info which was used in backup of VMs.This should be populated only for restore job. - UseProtectionJobInfo *bool `json:"useProtectionJobInfo,omitempty"` - - // Specifies Information required to create endpoints in private networks for all regions whose VMs are getting protected. - PrivateNetworkInfoList []*PrivateNetworkInfo `json:"privateNetworkInfoList"` -} - -// Validate validates this data transfer info -func (m *DataTransferInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateNetworkInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfo) validatePrivateNetworkInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.PrivateNetworkInfoList) { // not required - return nil - } - - for i := 0; i < len(m.PrivateNetworkInfoList); i++ { - if swag.IsZero(m.PrivateNetworkInfoList[i]) { // not required - continue - } - - if m.PrivateNetworkInfoList[i] != nil { - if err := m.PrivateNetworkInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateNetworkInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateNetworkInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this data transfer info based on the context it is used -func (m *DataTransferInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrivateNetworkInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataTransferInfo) contextValidatePrivateNetworkInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PrivateNetworkInfoList); i++ { - - if m.PrivateNetworkInfoList[i] != nil { - - if swag.IsZero(m.PrivateNetworkInfoList[i]) { // not required - return nil - } - - if err := m.PrivateNetworkInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privateNetworkInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privateNetworkInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataTransferInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataTransferInfo) UnmarshalBinary(b []byte) error { - var res DataTransferInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/data_usage_stats.go b/v2/models/data_usage_stats.go deleted file mode 100644 index 4af08ac5..00000000 --- a/v2/models/data_usage_stats.go +++ /dev/null @@ -1,167 +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" -) - -// DataUsageStats Data Usage Statistics. -// -// Specifies the data usage metric of the data stored on the Cohesity -// Cluster or Storage Domains (View Boxes). -// -// swagger:model DataUsageStats -type DataUsageStats struct { - - // Specifies the total data written on cloud tiers, as computed by the - // Cohesity Cluster. - CloudDataWrittenBytes *int64 `json:"cloudDataWrittenBytes,omitempty"` - - // Specifies Timestamp of CloudDataWrittenBytes. - CloudDataWrittenBytesTimestampUsec *int64 `json:"cloudDataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the total cloud capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. - CloudTotalPhysicalUsageBytes *int64 `json:"cloudTotalPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of CloudTotalPhysicalUsageBytes. - CloudTotalPhysicalUsageBytesTimestampUsec *int64 `json:"cloudTotalPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the data read from the protected objects by the Cohesity - // Cluster before any data reduction using deduplication and compression. - DataInBytes *int64 `json:"dataInBytes,omitempty"` - - // Specifies the size of the data has been reduced by change-block - // tracking and deduplication but before compression or data is replicated to - // other nodes as per RF or Erasure Coding policy. - DataInBytesAfterDedup *int64 `json:"dataInBytesAfterDedup,omitempty"` - - // Specifies Timestamp of DataInBytesAfterDedup. - DataInBytesAfterDedupTimestampUsec *int64 `json:"dataInBytesAfterDedupTimestampUsec,omitempty"` - - // Specifies Timestamp of DataInBytes. - DataInBytesTimestampUsec *int64 `json:"dataInBytesTimestampUsec,omitempty"` - - // Specifies the logical data used by Data Protect on Cohesity cluster. - DataProtectLogicalUsageBytes *int64 `json:"dataProtectLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of DataProtectLogicalUsageBytes. - DataProtectLogicalUsageBytesTimestampUsec *int64 `json:"dataProtectLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the physical data used by Data Protect on Cohesity cluster. - DataProtectPhysicalUsageBytes *int64 `json:"dataProtectPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of DataProtectPhysicalUsageBytes. - DataProtectPhysicalUsageBytesTimestampUsec *int64 `json:"dataProtectPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the data written after it has been reduced by deduplication - // and compression. This does not include resiliency impact. - DataWrittenBytes *int64 `json:"dataWrittenBytes,omitempty"` - - // Specifies Timestamp of DataWrittenBytes. - DataWrittenBytesTimestampUsec *int64 `json:"dataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the logical data used by File services on Cohesity cluster. - FileServicesLogicalUsageBytes *int64 `json:"fileServicesLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of FileServicesLogicalUsageBytes. - FileServicesLogicalUsageBytesTimestampUsec *int64 `json:"fileServicesLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the physical data used by File services on Cohesity cluster. - FileServicesPhysicalUsageBytes *int64 `json:"fileServicesPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of FileServicesPhysicalUsageBytes. - FileServicesPhysicalUsageBytesTimestampUsec *int64 `json:"fileServicesPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the total data written on local tiers, as computed by the - // Cohesity Cluster, after the size of the data has been reduced by - // change-block tracking, deduplication and compression. This does not - // include resiliency impact. - LocalDataWrittenBytes *int64 `json:"localDataWrittenBytes,omitempty"` - - // Specifies Timestamp of LocalDataWrittenBytes. - LocalDataWrittenBytesTimestampUsec *int64 `json:"localDataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the size of the data has been replicated to other nodes as per - // RF or Erasure Coding policy. - LocalTierResiliencyImpactBytes *int64 `json:"localTierResiliencyImpactBytes,omitempty"` - - // Specifies Timestamp of LocalTierResiliencyImpactBytes. - LocalTierResiliencyImpactBytesTimestampUsec *int64 `json:"localTierResiliencyImpactBytesTimestampUsec,omitempty"` - - // Specifies the total local capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. - LocalTotalPhysicalUsageBytes *int64 `json:"localTotalPhysicalUsageBytes,omitempty"` - - // Specifies Timestamp of LocalTotalPhysicalUsageBytes. - LocalTotalPhysicalUsageBytesTimestampUsec *int64 `json:"localTotalPhysicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the logical usage as computed by the Cohesity Cluster. This - // field is computed on a same frequency as 'StorageConsumedBytes', - // and it may not be the latest value. It is used to compute reduction ratio. - OutdatedLogicalUsageBytes *int64 `json:"outdatedLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of OutdatedLogicalUsageBytes. - OutdatedLogicalUsageBytesTimestampUsec *int64 `json:"outdatedLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the total capacity, as computed by the Cohesity Cluster, - // after the size of the data has been reduced by change-block tracking, - // compression and deduplication. This includes resiliency impact. - StorageConsumedBytes *int64 `json:"storageConsumedBytes,omitempty"` - - // Specifies Timestamp of StorageConsumedBytes. - StorageConsumedBytesTimestampUsec *int64 `json:"storageConsumedBytesTimestampUsec,omitempty"` - - // Provides the combined data residing on protected objects. - // The size of data before reduction by deduplication and compression. - TotalLogicalUsageBytes *int64 `json:"totalLogicalUsageBytes,omitempty"` - - // Specifies Timestamp of TotalLogicalUsageBytes. - TotalLogicalUsageBytesTimestampUsec *int64 `json:"totalLogicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the unique physical data usage in bytes. - UniquePhysicalDataBytes *int64 `json:"uniquePhysicalDataBytes,omitempty"` - - // Specifies the number of files. - NumFiles *int64 `json:"numFiles,omitempty"` - - // Specifies the number of directories. - NumDirectories *int64 `json:"numDirectories,omitempty"` -} - -// Validate validates this data usage stats -func (m *DataUsageStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this data usage stats based on context it is used -func (m *DataUsageStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataUsageStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataUsageStats) UnmarshalBinary(b []byte) error { - var res DataUsageStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/database_entity_info.go b/v2/models/database_entity_info.go deleted file mode 100644 index 6cd4b733..00000000 --- a/v2/models/database_entity_info.go +++ /dev/null @@ -1,160 +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" -) - -// DatabaseEntityInfo Object details about Oracle database entity info. -// -// swagger:model DatabaseEntityInfo -type DatabaseEntityInfo struct { - - // Specifies the information about container database. - ContainerDatabaseInfo *ContainerDatabaseInfo `json:"containerDatabaseInfo,omitempty"` - - // Specifies the dataguard information about container database. - DataGuardInfo *OracleDataGuardInfo `json:"dataGuardInfo,omitempty"` -} - -// Validate validates this database entity info -func (m *DatabaseEntityInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateContainerDatabaseInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataGuardInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DatabaseEntityInfo) validateContainerDatabaseInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ContainerDatabaseInfo) { // not required - return nil - } - - if m.ContainerDatabaseInfo != nil { - if err := m.ContainerDatabaseInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *DatabaseEntityInfo) validateDataGuardInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataGuardInfo) { // not required - return nil - } - - if m.DataGuardInfo != nil { - if err := m.DataGuardInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataGuardInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataGuardInfo") - } - 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 - - if err := m.contextValidateContainerDatabaseInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataGuardInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DatabaseEntityInfo) contextValidateContainerDatabaseInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ContainerDatabaseInfo != nil { - - if swag.IsZero(m.ContainerDatabaseInfo) { // not required - return nil - } - - if err := m.ContainerDatabaseInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("containerDatabaseInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("containerDatabaseInfo") - } - return err - } - } - - return nil -} - -func (m *DatabaseEntityInfo) contextValidateDataGuardInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataGuardInfo != nil { - - if swag.IsZero(m.DataGuardInfo) { // not required - return nil - } - - if err := m.DataGuardInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataGuardInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataGuardInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DatabaseEntityInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DatabaseEntityInfo) UnmarshalBinary(b []byte) error { - var res DatabaseEntityInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/datastore_params.go b/v2/models/datastore_params.go deleted file mode 100644 index cade134d..00000000 --- a/v2/models/datastore_params.go +++ /dev/null @@ -1,55 +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" -) - -// DatastoreParams Datastore params. -// -// Specifies the datastore params. -// -// swagger:model DatastoreParams -type DatastoreParams struct { - - // Specifies the Id of the datastore. - ID *int64 `json:"id,omitempty"` - - // Specifies the max concurrent stream per datastore. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` -} - -// Validate validates this datastore params -func (m *DatastoreParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this datastore params based on context it is used -func (m *DatastoreParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DatastoreParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DatastoreParams) UnmarshalBinary(b []byte) error { - var res DatastoreParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/day_schedule.go b/v2/models/day_schedule.go deleted file mode 100644 index be4281ab..00000000 --- a/v2/models/day_schedule.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" -) - -// DaySchedule Days Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of days. -// -// swagger:model DaySchedule -type DaySchedule struct { - FrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DaySchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 FrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.FrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DaySchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.FrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this day schedule -func (m *DaySchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this day schedule based on the context it is used -func (m *DaySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *DaySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DaySchedule) UnmarshalBinary(b []byte) error { - var res DaySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/db_recovery_over_writing_policy.go b/v2/models/db_recovery_over_writing_policy.go deleted file mode 100644 index c1cfa436..00000000 --- a/v2/models/db_recovery_over_writing_policy.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DbRecoveryOverWritingPolicy DB Recovery Overwriting Policy. -// -// DB Recovery Overwriting Policy. -// -// swagger:model DbRecoveryOverWritingPolicy -type DbRecoveryOverWritingPolicy struct { - - // Specifies the overwriting policies in case of SQL App Recoveries. - // Enum: ["FailIfExists","Overwrite"] - DbRecoveryOverWritingPolicy string `json:"dbRecoveryOverWritingPolicy,omitempty"` -} - -// Validate validates this db recovery over writing policy -func (m *DbRecoveryOverWritingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbRecoveryOverWritingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dbRecoveryOverWritingPolicyTypeDbRecoveryOverWritingPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FailIfExists","Overwrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dbRecoveryOverWritingPolicyTypeDbRecoveryOverWritingPolicyPropEnum = append(dbRecoveryOverWritingPolicyTypeDbRecoveryOverWritingPolicyPropEnum, v) - } -} - -const ( - - // DbRecoveryOverWritingPolicyDbRecoveryOverWritingPolicyFailIfExists captures enum value "FailIfExists" - DbRecoveryOverWritingPolicyDbRecoveryOverWritingPolicyFailIfExists string = "FailIfExists" - - // DbRecoveryOverWritingPolicyDbRecoveryOverWritingPolicyOverwrite captures enum value "Overwrite" - DbRecoveryOverWritingPolicyDbRecoveryOverWritingPolicyOverwrite string = "Overwrite" -) - -// prop value enum -func (m *DbRecoveryOverWritingPolicy) validateDbRecoveryOverWritingPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dbRecoveryOverWritingPolicyTypeDbRecoveryOverWritingPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DbRecoveryOverWritingPolicy) validateDbRecoveryOverWritingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DbRecoveryOverWritingPolicy) { // not required - return nil - } - - // value enum - if err := m.validateDbRecoveryOverWritingPolicyEnum("dbRecoveryOverWritingPolicy", "body", m.DbRecoveryOverWritingPolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this db recovery over writing policy based on context it is used -func (m *DbRecoveryOverWritingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DbRecoveryOverWritingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DbRecoveryOverWritingPolicy) UnmarshalBinary(b []byte) error { - var res DbRecoveryOverWritingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/deduplication_params.go b/v2/models/deduplication_params.go deleted file mode 100644 index 538f9ba4..00000000 --- a/v2/models/deduplication_params.go +++ /dev/null @@ -1,55 +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" -) - -// DeduplicationParams Deduplication Parameters -// -// Specifies parameters for deduplication. -// -// swagger:model DeduplicationParams -type DeduplicationParams struct { - - // Specifies whether deduplication is enabled on this Storage Domain. If enabled, cohesity cluster will eliminate duplicate blocks and thus reducing the amount of storage space. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies if inline deduplication is enabled. This field is appliciable only if deduplicationEnabled is set to true. - InlineEnabled *bool `json:"inlineEnabled,omitempty"` -} - -// Validate validates this deduplication params -func (m *DeduplicationParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this deduplication params based on context it is used -func (m *DeduplicationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeduplicationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeduplicationParams) UnmarshalBinary(b []byte) error { - var res DeduplicationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_active_directory_request.go b/v2/models/delete_active_directory_request.go deleted file mode 100644 index dab8bfd3..00000000 --- a/v2/models/delete_active_directory_request.go +++ /dev/null @@ -1,108 +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" -) - -// DeleteActiveDirectoryRequest Specifies the request to delete an Active Directory. -// -// swagger:model DeleteActiveDirectoryRequest -type DeleteActiveDirectoryRequest struct { - - // Specifies the params of a user with administrative privilege of this Active Directory. This field is mandatory if machine accounts are updated. - // Required: true - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams"` -} - -// Validate validates this delete active directory request -func (m *DeleteActiveDirectoryRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveDirectoryAdminParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteActiveDirectoryRequest) validateActiveDirectoryAdminParams(formats strfmt.Registry) error { - - if err := validate.Required("activeDirectoryAdminParams", "body", m.ActiveDirectoryAdminParams); err != nil { - return err - } - - if m.ActiveDirectoryAdminParams != nil { - if err := m.ActiveDirectoryAdminParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this delete active directory request based on the context it is used -func (m *DeleteActiveDirectoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveDirectoryAdminParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteActiveDirectoryRequest) contextValidateActiveDirectoryAdminParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ActiveDirectoryAdminParams != nil { - - if err := m.ActiveDirectoryAdminParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteActiveDirectoryRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteActiveDirectoryRequest) UnmarshalBinary(b []byte) error { - var res DeleteActiveDirectoryRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_groups_request.go b/v2/models/delete_groups_request.go deleted file mode 100644 index 31176ea8..00000000 --- a/v2/models/delete_groups_request.go +++ /dev/null @@ -1,83 +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" -) - -// DeleteGroupsRequest Specifies list of groups to delete. -// -// swagger:model DeleteGroupsRequest -type DeleteGroupsRequest struct { - - // Specifies a list of group sids to delete. - // Required: true - // Min Items: 1 - // Unique: true - Sids []string `json:"sids"` -} - -// Validate validates this delete groups request -func (m *DeleteGroupsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSids(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteGroupsRequest) validateSids(formats strfmt.Registry) error { - - if err := validate.Required("sids", "body", m.Sids); err != nil { - return err - } - - iSidsSize := int64(len(m.Sids)) - - if err := validate.MinItems("sids", "body", iSidsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("sids", "body", m.Sids); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this delete groups request based on context it is used -func (m *DeleteGroupsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteGroupsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteGroupsRequest) UnmarshalBinary(b []byte) error { - var res DeleteGroupsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_hosts_parameters.go b/v2/models/delete_hosts_parameters.go deleted file mode 100644 index cf07d18f..00000000 --- a/v2/models/delete_hosts_parameters.go +++ /dev/null @@ -1,52 +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" -) - -// DeleteHostsParameters Delete Hosts Parameters -// -// # Specifies the params for deleting hosts -// -// swagger:model DeleteHostsParameters -type DeleteHostsParameters struct { - - // Specifies the list of IPs to be deleted - Ips []string `json:"ips"` -} - -// Validate validates this delete hosts parameters -func (m *DeleteHostsParameters) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this delete hosts parameters based on context it is used -func (m *DeleteHostsParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteHostsParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteHostsParameters) UnmarshalBinary(b []byte) error { - var res DeleteHostsParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_infected_files.go b/v2/models/delete_infected_files.go deleted file mode 100644 index 9a34efe5..00000000 --- a/v2/models/delete_infected_files.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeleteInfectedFiles Specifies a list of infected files. -// -// swagger:model DeleteInfectedFiles -type DeleteInfectedFiles struct { - - // Specifies the list of infected files that are successfully deleted. - DeleteSucceededInfectedFiles []*InfectedFile `json:"deleteSucceededInfectedFiles"` - - // Specifies the list of infected files that failed deletion. - DeleteFailedInfectedFiles []*InfectedFile `json:"deleteFailedInfectedFiles"` -} - -// Validate validates this delete infected files -func (m *DeleteInfectedFiles) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeleteSucceededInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeleteFailedInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFiles) validateDeleteSucceededInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.DeleteSucceededInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.DeleteSucceededInfectedFiles); i++ { - if swag.IsZero(m.DeleteSucceededInfectedFiles[i]) { // not required - continue - } - - if m.DeleteSucceededInfectedFiles[i] != nil { - if err := m.DeleteSucceededInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeleteInfectedFiles) validateDeleteFailedInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.DeleteFailedInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.DeleteFailedInfectedFiles); i++ { - if swag.IsZero(m.DeleteFailedInfectedFiles[i]) { // not required - continue - } - - if m.DeleteFailedInfectedFiles[i] != nil { - if err := m.DeleteFailedInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete infected files based on the context it is used -func (m *DeleteInfectedFiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeleteSucceededInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeleteFailedInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFiles) contextValidateDeleteSucceededInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeleteSucceededInfectedFiles); i++ { - - if m.DeleteSucceededInfectedFiles[i] != nil { - - if swag.IsZero(m.DeleteSucceededInfectedFiles[i]) { // not required - return nil - } - - if err := m.DeleteSucceededInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeleteInfectedFiles) contextValidateDeleteFailedInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DeleteFailedInfectedFiles); i++ { - - if m.DeleteFailedInfectedFiles[i] != nil { - - if swag.IsZero(m.DeleteFailedInfectedFiles[i]) { // not required - return nil - } - - if err := m.DeleteFailedInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deleteFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteInfectedFiles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteInfectedFiles) UnmarshalBinary(b []byte) error { - var res DeleteInfectedFiles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_infected_files_parameters.go b/v2/models/delete_infected_files_parameters.go deleted file mode 100644 index 96f0b17c..00000000 --- a/v2/models/delete_infected_files_parameters.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeleteInfectedFilesParameters Specifies the parameters to delete infected files. -// -// swagger:model DeleteInfectedFilesParameters -type DeleteInfectedFilesParameters struct { - - // Specifies a list of infected files to be deleted. - // Required: true - // Min Items: 1 - InfectedFiles []*InfectedFile `json:"infectedFiles"` -} - -// Validate validates this delete infected files parameters -func (m *DeleteInfectedFilesParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFilesParameters) validateInfectedFiles(formats strfmt.Registry) error { - - if err := validate.Required("infectedFiles", "body", m.InfectedFiles); err != nil { - return err - } - - iInfectedFilesSize := int64(len(m.InfectedFiles)) - - if err := validate.MinItems("infectedFiles", "body", iInfectedFilesSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.InfectedFiles); i++ { - if swag.IsZero(m.InfectedFiles[i]) { // not required - continue - } - - if m.InfectedFiles[i] != nil { - if err := m.InfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete infected files parameters based on the context it is used -func (m *DeleteInfectedFilesParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteInfectedFilesParameters) contextValidateInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFiles); i++ { - - if m.InfectedFiles[i] != nil { - - if swag.IsZero(m.InfectedFiles[i]) { // not required - return nil - } - - if err := m.InfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteInfectedFilesParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteInfectedFilesParameters) UnmarshalBinary(b []byte) error { - var res DeleteInfectedFilesParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_rigel_connector_request.go b/v2/models/delete_rigel_connector_request.go deleted file mode 100644 index 74b499e4..00000000 --- a/v2/models/delete_rigel_connector_request.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" -) - -// DeleteRigelConnectorRequest Delete Rigel Connector Request. -// -// Specify the params to delete a Rigel connector. -// -// swagger:model DeleteRigelConnectorRequest -type DeleteRigelConnectorRequest struct { - - // Specifies the id of the tenant which the connector belongs to. - // Required: true - TenantID *string `json:"tenantId"` -} - -// Validate validates this delete rigel connector request -func (m *DeleteRigelConnectorRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteRigelConnectorRequest) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this delete rigel connector request based on context it is used -func (m *DeleteRigelConnectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteRigelConnectorRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteRigelConnectorRequest) UnmarshalBinary(b []byte) error { - var res DeleteRigelConnectorRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/delete_users_request.go b/v2/models/delete_users_request.go deleted file mode 100644 index c215d83c..00000000 --- a/v2/models/delete_users_request.go +++ /dev/null @@ -1,83 +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" -) - -// DeleteUsersRequest Specifies list of users to delete. -// -// swagger:model DeleteUsersRequest -type DeleteUsersRequest struct { - - // Specifies a list of user sids to delete. - // Required: true - // Min Items: 1 - // Unique: true - Sids []string `json:"sids"` -} - -// Validate validates this delete users request -func (m *DeleteUsersRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSids(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteUsersRequest) validateSids(formats strfmt.Registry) error { - - if err := validate.Required("sids", "body", m.Sids); err != nil { - return err - } - - iSidsSize := int64(len(m.Sids)) - - if err := validate.MinItems("sids", "body", iSidsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("sids", "body", m.Sids); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this delete users request based on context it is used -func (m *DeleteUsersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteUsersRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteUsersRequest) UnmarshalBinary(b []byte) error { - var res DeleteUsersRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/deleted_protected_objects_response_body.go b/v2/models/deleted_protected_objects_response_body.go deleted file mode 100644 index b8eee07e..00000000 --- a/v2/models/deleted_protected_objects_response_body.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DeletedProtectedObjectsResponseBody Specifies the deleted protected objects response. -// -// swagger:model DeletedProtectedObjectsResponseBody -type DeletedProtectedObjectsResponseBody struct { - - // Specifies the protected deleted objects. - Objects []*ProtectedObjectInfo `json:"objects"` - - // Specifies the information needed in order to support pagination. This will not be included for the last page of results. - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this deleted protected objects response body -func (m *DeletedProtectedObjectsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeletedProtectedObjectsResponseBody) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeletedProtectedObjectsResponseBody) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this deleted protected objects response body based on the context it is used -func (m *DeletedProtectedObjectsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeletedProtectedObjectsResponseBody) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *DeletedProtectedObjectsResponseBody) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeletedProtectedObjectsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeletedProtectedObjectsResponseBody) UnmarshalBinary(b []byte) error { - var res DeletedProtectedObjectsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/device_tree_leaf_node.go b/v2/models/device_tree_leaf_node.go deleted file mode 100644 index b0e5193e..00000000 --- a/v2/models/device_tree_leaf_node.go +++ /dev/null @@ -1,59 +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" -) - -// DeviceTreeLeafNode Specifies the parameters of a leaf node in device tree. -// -// swagger:model DeviceTreeLeafNode -type DeviceTreeLeafNode struct { - - // Specifies the disk name. - DiskName *string `json:"diskName,omitempty"` - - // Specifies the paritition number. - PartitionNumber *int32 `json:"partitionNumber,omitempty"` - - // Specifies the offset in bytes where data for the LVM volume (for which this device tree is being build) starts relative to the start of the partition. - OffsetBytes *int64 `json:"offsetBytes,omitempty"` - - // Specifies The length of data in bytes for the LVM volume (for which this device tree is being built). It does not include size of the LVM meta data. - LengthBytes *int64 `json:"lengthBytes,omitempty"` -} - -// Validate validates this device tree leaf node -func (m *DeviceTreeLeafNode) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this device tree leaf node based on context it is used -func (m *DeviceTreeLeafNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreeLeafNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreeLeafNode) UnmarshalBinary(b []byte) error { - var res DeviceTreeLeafNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/device_tree_node.go b/v2/models/device_tree_node.go deleted file mode 100644 index a8dc3c1c..00000000 --- a/v2/models/device_tree_node.go +++ /dev/null @@ -1,163 +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" -) - -// DeviceTreeNode Specifies the tree structure of a logical volume. The leaves are slices of partitions and the other nodes are assemled by combining nodes in some mode. -// -// swagger:model DeviceTreeNode -type DeviceTreeNode struct { - - // Specifies if the node is a leaf node. - IsLeaf *bool `json:"isLeaf,omitempty"` - - // Specifies the parameters for a leaf node. - LeafNodeParams *DeviceTreeLeafNode `json:"leafNodeParams,omitempty"` - - // Specifies the parameters for a non leaf node. - NonLeafNodeParams *DeviceTreeNonLeafNode `json:"nonLeafNodeParams,omitempty"` -} - -// Validate validates this device tree node -func (m *DeviceTreeNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLeafNodeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNonLeafNodeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeNode) validateLeafNodeParams(formats strfmt.Registry) error { - if swag.IsZero(m.LeafNodeParams) { // not required - return nil - } - - if m.LeafNodeParams != nil { - if err := m.LeafNodeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leafNodeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leafNodeParams") - } - return err - } - } - - return nil -} - -func (m *DeviceTreeNode) validateNonLeafNodeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NonLeafNodeParams) { // not required - return nil - } - - if m.NonLeafNodeParams != nil { - if err := m.NonLeafNodeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nonLeafNodeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nonLeafNodeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this device tree node based on the context it is used -func (m *DeviceTreeNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLeafNodeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNonLeafNodeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeNode) contextValidateLeafNodeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LeafNodeParams != nil { - - if swag.IsZero(m.LeafNodeParams) { // not required - return nil - } - - if err := m.LeafNodeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("leafNodeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("leafNodeParams") - } - return err - } - } - - return nil -} - -func (m *DeviceTreeNode) contextValidateNonLeafNodeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NonLeafNodeParams != nil { - - if swag.IsZero(m.NonLeafNodeParams) { // not required - return nil - } - - if err := m.NonLeafNodeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nonLeafNodeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nonLeafNodeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreeNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreeNode) UnmarshalBinary(b []byte) error { - var res DeviceTreeNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/device_tree_non_leaf_node.go b/v2/models/device_tree_non_leaf_node.go deleted file mode 100644 index a6bcdf6d..00000000 --- a/v2/models/device_tree_non_leaf_node.go +++ /dev/null @@ -1,206 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeviceTreeNonLeafNode Specifies the parameters of a non leaf node in device tree. -// -// swagger:model DeviceTreeNonLeafNode -type DeviceTreeNonLeafNode struct { - - // Specifies the children nodes combine type. - // Enum: ["Linear","Stripe","Mirror","Raid5","Raid6","Zero","Thin","ThinPool","Snapshot","Cache","CachePool"] - Type *string `json:"type,omitempty"` - - // Specifies the length of device. - DeviceLength *int64 `json:"deviceLength,omitempty"` - - // Specifies the id of device. - DeviceID *int64 `json:"deviceId,omitempty"` - - // Specifies a list of children nodes. - ChildrenNodes []*DeviceTreeNode `json:"childrenNodes"` -} - -// Validate validates this device tree non leaf node -func (m *DeviceTreeNonLeafNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChildrenNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var deviceTreeNonLeafNodeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Linear","Stripe","Mirror","Raid5","Raid6","Zero","Thin","ThinPool","Snapshot","Cache","CachePool"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - deviceTreeNonLeafNodeTypeTypePropEnum = append(deviceTreeNonLeafNodeTypeTypePropEnum, v) - } -} - -const ( - - // DeviceTreeNonLeafNodeTypeLinear captures enum value "Linear" - DeviceTreeNonLeafNodeTypeLinear string = "Linear" - - // DeviceTreeNonLeafNodeTypeStripe captures enum value "Stripe" - DeviceTreeNonLeafNodeTypeStripe string = "Stripe" - - // DeviceTreeNonLeafNodeTypeMirror captures enum value "Mirror" - DeviceTreeNonLeafNodeTypeMirror string = "Mirror" - - // DeviceTreeNonLeafNodeTypeRaid5 captures enum value "Raid5" - DeviceTreeNonLeafNodeTypeRaid5 string = "Raid5" - - // DeviceTreeNonLeafNodeTypeRaid6 captures enum value "Raid6" - DeviceTreeNonLeafNodeTypeRaid6 string = "Raid6" - - // DeviceTreeNonLeafNodeTypeZero captures enum value "Zero" - DeviceTreeNonLeafNodeTypeZero string = "Zero" - - // DeviceTreeNonLeafNodeTypeThin captures enum value "Thin" - DeviceTreeNonLeafNodeTypeThin string = "Thin" - - // DeviceTreeNonLeafNodeTypeThinPool captures enum value "ThinPool" - DeviceTreeNonLeafNodeTypeThinPool string = "ThinPool" - - // DeviceTreeNonLeafNodeTypeSnapshot captures enum value "Snapshot" - DeviceTreeNonLeafNodeTypeSnapshot string = "Snapshot" - - // DeviceTreeNonLeafNodeTypeCache captures enum value "Cache" - DeviceTreeNonLeafNodeTypeCache string = "Cache" - - // DeviceTreeNonLeafNodeTypeCachePool captures enum value "CachePool" - DeviceTreeNonLeafNodeTypeCachePool string = "CachePool" -) - -// prop value enum -func (m *DeviceTreeNonLeafNode) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, deviceTreeNonLeafNodeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DeviceTreeNonLeafNode) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *DeviceTreeNonLeafNode) validateChildrenNodes(formats strfmt.Registry) error { - if swag.IsZero(m.ChildrenNodes) { // not required - return nil - } - - for i := 0; i < len(m.ChildrenNodes); i++ { - if swag.IsZero(m.ChildrenNodes[i]) { // not required - continue - } - - if m.ChildrenNodes[i] != nil { - if err := m.ChildrenNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childrenNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childrenNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this device tree non leaf node based on the context it is used -func (m *DeviceTreeNonLeafNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChildrenNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeviceTreeNonLeafNode) contextValidateChildrenNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildrenNodes); i++ { - - if m.ChildrenNodes[i] != nil { - - if swag.IsZero(m.ChildrenNodes[i]) { // not required - return nil - } - - if err := m.ChildrenNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childrenNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childrenNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DeviceTreeNonLeafNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeviceTreeNonLeafNode) UnmarshalBinary(b []byte) error { - var res DeviceTreeNonLeafNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disaster_recovery_options.go b/v2/models/disaster_recovery_options.go deleted file mode 100644 index d34cb860..00000000 --- a/v2/models/disaster_recovery_options.go +++ /dev/null @@ -1,58 +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" -) - -// DisasterRecoveryOptions Oracle Disaster Recovery parameters. -// -// Specifies the parameters that are needed for Disaster Recovery of a database to its production configuration. -// -// swagger:model DisasterRecoveryOptions -type DisasterRecoveryOptions struct { - - // Specifies whether the recovery is of type Disaster Recovery. - IsDisasterRecovery *bool `json:"isDisasterRecovery,omitempty"` - - // Specifies whether to cleanup the original database files or to do precheck to ensure no conflicting files exists. Recovery will fail if there are any conflicting files. - CleanupOriginalDbFiles *bool `json:"cleanupOriginalDbFiles,omitempty"` - - // Whether to rename the database ASM directory. If false, the adapter will leave the database files and continue with clone and migration of datafiles. This might cause extra files left behind on the Oracle host from the existing database instance. - RenameDatabaseAsmDirectory *bool `json:"renameDatabaseAsmDirectory,omitempty"` -} - -// Validate validates this disaster recovery options -func (m *DisasterRecoveryOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this disaster recovery options based on context it is used -func (m *DisasterRecoveryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DisasterRecoveryOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DisasterRecoveryOptions) UnmarshalBinary(b []byte) error { - var res DisasterRecoveryOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk.go b/v2/models/disk.go deleted file mode 100644 index aff9a155..00000000 --- a/v2/models/disk.go +++ /dev/null @@ -1,433 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Disk Disk details -// -// Specifies the details of a disk that belongs to a node. -// -// swagger:model Disk -type Disk struct { - - // Specifies id to uniquely identify a disk. - ID *int64 `json:"id,omitempty"` - - // Specifies serial number of disk. - SerialNumber *string `json:"serialNumber,omitempty"` - - // Specifies capacity of disk in bytes. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` - - // Specifies product model of disk. - Model *string `json:"model,omitempty"` - - // Specifies node id of the node that this disk belong to. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies status of the disk. - // Enum: ["Online","Offline","Removing","OkToRemove","Blacklist","New","Empty","Unknown","Activating"] - Status string `json:"status,omitempty"` - - // Specifies type of the disk. - // Enum: ["SystemDisk","BootDisk","DataDisk","NvmeSsdDisk","SataSsdDisk","HddDisk","Unknown"] - Type string `json:"type,omitempty"` - - // Specifies location of the disk in node. - Location *string `json:"location,omitempty"` - - // Specifies disk encryption state. - // Enum: ["Activating","Active","NotInCluster","KeyRotating","Locked","Unknown","NotSupported"] - EncryptionStatus string `json:"encryptionStatus,omitempty"` - - // Specifies SSD used percentage. - SsdUsedPercentage *int32 `json:"ssdUsedPercentage,omitempty"` - - // Specifies the removal reason of the disk. - RemovalReason *string `json:"removalReason,omitempty"` - - // Specifies the services that are not ACKed after disk is marked for removal. - ServicesNotAcked *string `json:"servicesNotAcked,omitempty"` - - // Specifies the services not ACKed yet for removal of this entity. - ServicesNotAckedList []string `json:"servicesNotAckedList"` - - // Specifies the services already ACKed for removal of this entity. - ServicesAckedList []string `json:"servicesAckedList"` - - // Specifies the overall progress percentage in removing the Disk. - ProgressPercentage *int32 `json:"progressPercentage,omitempty"` - - // Specifies the total duration in seconds left to remove the Disk. - TimeRemaining *int64 `json:"timeRemaining,omitempty"` - - // Specifies the removal progress details for services that are not acked yet. - RemovalProgressList []*ComponentRemovalProgress `json:"removalProgressList"` - - // Specifies the Unix epoch timestamp (in seconds) when the Disk was marked for removal. - RemovalTimestampSecs *int64 `json:"removalTimestampSecs,omitempty"` - - // Specifies the last run time of the pre-checks execution in Unix epoch timestamp (in seconds). - PrecheckTimestampSecs *int64 `json:"precheckTimestampSecs,omitempty"` - - // Specifies the pre-check validations results. - ValidationChecks []*PreCheckValidation `json:"validationChecks"` -} - -// Validate validates this disk -func (m *Disk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryptionStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalProgressList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Online","Offline","Removing","OkToRemove","Blacklist","New","Empty","Unknown","Activating"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypeStatusPropEnum = append(diskTypeStatusPropEnum, v) - } -} - -const ( - - // DiskStatusOnline captures enum value "Online" - DiskStatusOnline string = "Online" - - // DiskStatusOffline captures enum value "Offline" - DiskStatusOffline string = "Offline" - - // DiskStatusRemoving captures enum value "Removing" - DiskStatusRemoving string = "Removing" - - // DiskStatusOkToRemove captures enum value "OkToRemove" - DiskStatusOkToRemove string = "OkToRemove" - - // DiskStatusBlacklist captures enum value "Blacklist" - DiskStatusBlacklist string = "Blacklist" - - // DiskStatusNew captures enum value "New" - DiskStatusNew string = "New" - - // DiskStatusEmpty captures enum value "Empty" - DiskStatusEmpty string = "Empty" - - // DiskStatusUnknown captures enum value "Unknown" - DiskStatusUnknown string = "Unknown" - - // DiskStatusActivating captures enum value "Activating" - DiskStatusActivating string = "Activating" -) - -// prop value enum -func (m *Disk) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Disk) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -var diskTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SystemDisk","BootDisk","DataDisk","NvmeSsdDisk","SataSsdDisk","HddDisk","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypeTypePropEnum = append(diskTypeTypePropEnum, v) - } -} - -const ( - - // DiskTypeSystemDisk captures enum value "SystemDisk" - DiskTypeSystemDisk string = "SystemDisk" - - // DiskTypeBootDisk captures enum value "BootDisk" - DiskTypeBootDisk string = "BootDisk" - - // DiskTypeDataDisk captures enum value "DataDisk" - DiskTypeDataDisk string = "DataDisk" - - // DiskTypeNvmeSsdDisk captures enum value "NvmeSsdDisk" - DiskTypeNvmeSsdDisk string = "NvmeSsdDisk" - - // DiskTypeSataSsdDisk captures enum value "SataSsdDisk" - DiskTypeSataSsdDisk string = "SataSsdDisk" - - // DiskTypeHddDisk captures enum value "HddDisk" - DiskTypeHddDisk string = "HddDisk" - - // DiskTypeUnknown captures enum value "Unknown" - DiskTypeUnknown string = "Unknown" -) - -// prop value enum -func (m *Disk) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Disk) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -var diskTypeEncryptionStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Activating","Active","NotInCluster","KeyRotating","Locked","Unknown","NotSupported"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypeEncryptionStatusPropEnum = append(diskTypeEncryptionStatusPropEnum, v) - } -} - -const ( - - // DiskEncryptionStatusActivating captures enum value "Activating" - DiskEncryptionStatusActivating string = "Activating" - - // DiskEncryptionStatusActive captures enum value "Active" - DiskEncryptionStatusActive string = "Active" - - // DiskEncryptionStatusNotInCluster captures enum value "NotInCluster" - DiskEncryptionStatusNotInCluster string = "NotInCluster" - - // DiskEncryptionStatusKeyRotating captures enum value "KeyRotating" - DiskEncryptionStatusKeyRotating string = "KeyRotating" - - // DiskEncryptionStatusLocked captures enum value "Locked" - DiskEncryptionStatusLocked string = "Locked" - - // DiskEncryptionStatusUnknown captures enum value "Unknown" - DiskEncryptionStatusUnknown string = "Unknown" - - // DiskEncryptionStatusNotSupported captures enum value "NotSupported" - DiskEncryptionStatusNotSupported string = "NotSupported" -) - -// prop value enum -func (m *Disk) validateEncryptionStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypeEncryptionStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Disk) validateEncryptionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionStatus) { // not required - return nil - } - - // value enum - if err := m.validateEncryptionStatusEnum("encryptionStatus", "body", m.EncryptionStatus); err != nil { - return err - } - - return nil -} - -func (m *Disk) validateRemovalProgressList(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalProgressList) { // not required - return nil - } - - for i := 0; i < len(m.RemovalProgressList); i++ { - if swag.IsZero(m.RemovalProgressList[i]) { // not required - continue - } - - if m.RemovalProgressList[i] != nil { - if err := m.RemovalProgressList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Disk) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this disk based on the context it is used -func (m *Disk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemovalProgressList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Disk) contextValidateRemovalProgressList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemovalProgressList); i++ { - - if m.RemovalProgressList[i] != nil { - - if swag.IsZero(m.RemovalProgressList[i]) { // not required - return nil - } - - if err := m.RemovalProgressList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Disk) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Disk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Disk) UnmarshalBinary(b []byte) error { - var res Disk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_identify.go b/v2/models/disk_identify.go deleted file mode 100644 index 4268c896..00000000 --- a/v2/models/disk_identify.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" - "github.com/go-openapi/validate" -) - -// DiskIdentify Disk identify params. -// -// Specifies the parameters needed to identify disk. -// -// swagger:model DiskIdentify -type DiskIdentify struct { - - // Specifies the node id of node that disk belongs to. - // Required: true - NodeID *int64 `json:"nodeId"` - - // Specifies serial number of disk. - // Required: true - SerialNumber *string `json:"serialNumber"` - - // Turn on/off led light if it is set to true/false - // Required: true - Identify *bool `json:"identify"` -} - -// Validate validates this disk identify -func (m *DiskIdentify) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSerialNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIdentify(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskIdentify) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -func (m *DiskIdentify) validateSerialNumber(formats strfmt.Registry) error { - - if err := validate.Required("serialNumber", "body", m.SerialNumber); err != nil { - return err - } - - return nil -} - -func (m *DiskIdentify) validateIdentify(formats strfmt.Registry) error { - - if err := validate.Required("identify", "body", m.Identify); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk identify based on context it is used -func (m *DiskIdentify) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskIdentify) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskIdentify) UnmarshalBinary(b []byte) error { - var res DiskIdentify - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_info.go b/v2/models/disk_info.go deleted file mode 100644 index e044a9d4..00000000 --- a/v2/models/disk_info.go +++ /dev/null @@ -1,144 +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" -) - -// DiskInfo Disk Information -// -// Specifies information about a disk. -// -// swagger:model DiskInfo -type DiskInfo struct { - - // Specifies the disk controller type. - // Enum: ["kScsi","kIde","kSata"] - ControllerType *string `json:"controllerType,omitempty"` - - // Specifies the disk file name. This is the VMDK name and not the flat file name. - // Required: true - UnitNumber *int64 `json:"unitNumber"` - - // Specifies the Id of the controller bus that controls the disk. - // Required: true - BusNumber *int64 `json:"busNumber"` -} - -// Validate validates this disk info -func (m *DiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateControllerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnitNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBusNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskInfoTypeControllerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScsi","kIde","kSata"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskInfoTypeControllerTypePropEnum = append(diskInfoTypeControllerTypePropEnum, v) - } -} - -const ( - - // DiskInfoControllerTypeKScsi captures enum value "kScsi" - DiskInfoControllerTypeKScsi string = "kScsi" - - // DiskInfoControllerTypeKIde captures enum value "kIde" - DiskInfoControllerTypeKIde string = "kIde" - - // DiskInfoControllerTypeKSata captures enum value "kSata" - DiskInfoControllerTypeKSata string = "kSata" -) - -// prop value enum -func (m *DiskInfo) validateControllerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskInfoTypeControllerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskInfo) validateControllerType(formats strfmt.Registry) error { - if swag.IsZero(m.ControllerType) { // not required - return nil - } - - // value enum - if err := m.validateControllerTypeEnum("controllerType", "body", *m.ControllerType); err != nil { - return err - } - - return nil -} - -func (m *DiskInfo) validateUnitNumber(formats strfmt.Registry) error { - - if err := validate.Required("unitNumber", "body", m.UnitNumber); err != nil { - return err - } - - return nil -} - -func (m *DiskInfo) validateBusNumber(formats strfmt.Registry) error { - - if err := validate.Required("busNumber", "body", m.BusNumber); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk info based on context it is used -func (m *DiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskInfo) UnmarshalBinary(b []byte) error { - var res DiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_removal_params.go b/v2/models/disk_removal_params.go deleted file mode 100644 index e06294d1..00000000 --- a/v2/models/disk_removal_params.go +++ /dev/null @@ -1,76 +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" -) - -// DiskRemovalParams Disk Removal Parameters. -// -// Specifies parameters to initiate/cancel disk removal. -// -// swagger:model DiskRemovalParams -type DiskRemovalParams struct { - - // If true, cancels disk removal which is already in progress. - // Required: true - Cancel *bool `json:"cancel"` - - // Specifies whether request is for pre-check validations only - IsValidateOnly *bool `json:"isValidateOnly,omitempty"` -} - -// Validate validates this disk removal params -func (m *DiskRemovalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCancel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DiskRemovalParams) validateCancel(formats strfmt.Registry) error { - - if err := validate.Required("cancel", "body", m.Cancel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk removal params based on context it is used -func (m *DiskRemovalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskRemovalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskRemovalParams) UnmarshalBinary(b []byte) error { - var res DiskRemovalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_status.go b/v2/models/disk_status.go deleted file mode 100644 index 7a692b24..00000000 --- a/v2/models/disk_status.go +++ /dev/null @@ -1,131 +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" -) - -// DiskStatus Disk Status -// -// # Disk Status -// -// swagger:model DiskStatus -type DiskStatus struct { - - // Disk Status - // Enum: ["Active","Offline","Deleting","Deleted","DataVipNotReachable","FileSystemNotAccessible","FileSystemDeleted","Mounting","Migrating","Unknown"] - DiskStatus string `json:"diskStatus,omitempty"` -} - -// Validate validates this disk status -func (m *DiskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskStatusTypeDiskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Offline","Deleting","Deleted","DataVipNotReachable","FileSystemNotAccessible","FileSystemDeleted","Mounting","Migrating","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskStatusTypeDiskStatusPropEnum = append(diskStatusTypeDiskStatusPropEnum, v) - } -} - -const ( - - // DiskStatusDiskStatusActive captures enum value "Active" - DiskStatusDiskStatusActive string = "Active" - - // DiskStatusDiskStatusOffline captures enum value "Offline" - DiskStatusDiskStatusOffline string = "Offline" - - // DiskStatusDiskStatusDeleting captures enum value "Deleting" - DiskStatusDiskStatusDeleting string = "Deleting" - - // DiskStatusDiskStatusDeleted captures enum value "Deleted" - DiskStatusDiskStatusDeleted string = "Deleted" - - // DiskStatusDiskStatusDataVipNotReachable captures enum value "DataVipNotReachable" - DiskStatusDiskStatusDataVipNotReachable string = "DataVipNotReachable" - - // DiskStatusDiskStatusFileSystemNotAccessible captures enum value "FileSystemNotAccessible" - DiskStatusDiskStatusFileSystemNotAccessible string = "FileSystemNotAccessible" - - // DiskStatusDiskStatusFileSystemDeleted captures enum value "FileSystemDeleted" - DiskStatusDiskStatusFileSystemDeleted string = "FileSystemDeleted" - - // DiskStatusDiskStatusMounting captures enum value "Mounting" - DiskStatusDiskStatusMounting string = "Mounting" - - // DiskStatusDiskStatusMigrating captures enum value "Migrating" - DiskStatusDiskStatusMigrating string = "Migrating" - - // DiskStatusDiskStatusUnknown captures enum value "Unknown" - DiskStatusDiskStatusUnknown string = "Unknown" -) - -// prop value enum -func (m *DiskStatus) validateDiskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskStatusTypeDiskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskStatus) validateDiskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.DiskStatus) { // not required - return nil - } - - // value enum - if err := m.validateDiskStatusEnum("diskStatus", "body", m.DiskStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk status based on context it is used -func (m *DiskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskStatus) UnmarshalBinary(b []byte) error { - var res DiskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_tiers.go b/v2/models/disk_tiers.go deleted file mode 100644 index 3ff9364a..00000000 --- a/v2/models/disk_tiers.go +++ /dev/null @@ -1,113 +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" -) - -// DiskTiers Disk Tiers -// -// # Disk Tiers -// -// swagger:model DiskTiers -type DiskTiers struct { - - // Disk Tiers - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - DiskTiers string `json:"diskTiers,omitempty"` -} - -// Validate validates this disk tiers -func (m *DiskTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskTiersTypeDiskTiersPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTiersTypeDiskTiersPropEnum = append(diskTiersTypeDiskTiersPropEnum, v) - } -} - -const ( - - // DiskTiersDiskTiersPCIeSSD captures enum value "PCIeSSD" - DiskTiersDiskTiersPCIeSSD string = "PCIeSSD" - - // DiskTiersDiskTiersSATADashSSD captures enum value "SATA-SSD" - DiskTiersDiskTiersSATADashSSD string = "SATA-SSD" - - // DiskTiersDiskTiersSATADashHDD captures enum value "SATA-HDD" - DiskTiersDiskTiersSATADashHDD string = "SATA-HDD" - - // DiskTiersDiskTiersCLOUD captures enum value "CLOUD" - DiskTiersDiskTiersCLOUD string = "CLOUD" -) - -// prop value enum -func (m *DiskTiers) validateDiskTiersEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTiersTypeDiskTiersPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskTiers) validateDiskTiers(formats strfmt.Registry) error { - if swag.IsZero(m.DiskTiers) { // not required - return nil - } - - // value enum - if err := m.validateDiskTiersEnum("diskTiers", "body", m.DiskTiers); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk tiers based on context it is used -func (m *DiskTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskTiers) UnmarshalBinary(b []byte) error { - var res DiskTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disk_type.go b/v2/models/disk_type.go deleted file mode 100644 index a77927bf..00000000 --- a/v2/models/disk_type.go +++ /dev/null @@ -1,122 +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" -) - -// DiskType Disk type. -// -// Type of disk. -// -// swagger:model DiskType -type DiskType struct { - - // Specifies type of the disk. - // Enum: ["SystemDisk","BootDisk","DataDisk","NvmeSsdDisk","SataSsdDisk","HddDisk","Unknown"] - Status string `json:"status,omitempty"` -} - -// Validate validates this disk type -func (m *DiskType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var diskTypeTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SystemDisk","BootDisk","DataDisk","NvmeSsdDisk","SataSsdDisk","HddDisk","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - diskTypeTypeStatusPropEnum = append(diskTypeTypeStatusPropEnum, v) - } -} - -const ( - - // DiskTypeStatusSystemDisk captures enum value "SystemDisk" - DiskTypeStatusSystemDisk string = "SystemDisk" - - // DiskTypeStatusBootDisk captures enum value "BootDisk" - DiskTypeStatusBootDisk string = "BootDisk" - - // DiskTypeStatusDataDisk captures enum value "DataDisk" - DiskTypeStatusDataDisk string = "DataDisk" - - // DiskTypeStatusNvmeSsdDisk captures enum value "NvmeSsdDisk" - DiskTypeStatusNvmeSsdDisk string = "NvmeSsdDisk" - - // DiskTypeStatusSataSsdDisk captures enum value "SataSsdDisk" - DiskTypeStatusSataSsdDisk string = "SataSsdDisk" - - // DiskTypeStatusHddDisk captures enum value "HddDisk" - DiskTypeStatusHddDisk string = "HddDisk" - - // DiskTypeStatusUnknown captures enum value "Unknown" - DiskTypeStatusUnknown string = "Unknown" -) - -// prop value enum -func (m *DiskType) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, diskTypeTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DiskType) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this disk type based on context it is used -func (m *DiskType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DiskType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DiskType) UnmarshalBinary(b []byte) error { - var res DiskType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/disks_list.go b/v2/models/disks_list.go deleted file mode 100644 index 68f3c899..00000000 --- a/v2/models/disks_list.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DisksList List of Disks -// -// Specifies the list of disks that belong to node. -// -// swagger:model DisksList -type DisksList struct { - - // Specifies the list of disks. - DisksList []*Disk `json:"disksList"` -} - -// Validate validates this disks list -func (m *DisksList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDisksList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DisksList) validateDisksList(formats strfmt.Registry) error { - if swag.IsZero(m.DisksList) { // not required - return nil - } - - for i := 0; i < len(m.DisksList); i++ { - if swag.IsZero(m.DisksList[i]) { // not required - continue - } - - if m.DisksList[i] != nil { - if err := m.DisksList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disksList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disksList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this disks list based on the context it is used -func (m *DisksList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDisksList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DisksList) contextValidateDisksList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DisksList); i++ { - - if m.DisksList[i] != nil { - - if swag.IsZero(m.DisksList[i]) { // not required - return nil - } - - if err := m.DisksList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disksList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disksList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DisksList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DisksList) UnmarshalBinary(b []byte) error { - var res DisksList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/dmaas_audit_actions.go b/v2/models/dmaas_audit_actions.go deleted file mode 100644 index ce8a12d0..00000000 --- a/v2/models/dmaas_audit_actions.go +++ /dev/null @@ -1,122 +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" -) - -// DmaasAuditActions Dmaas Audit Actions -// -// # Dmaas Audit Actions -// -// swagger:model DmaasAuditActions -type DmaasAuditActions struct { - - // Dmaas Audit Actions - // Enum: ["Login","Logout","Create","Add","Modify","Delete","Fetch"] - Actions string `json:"actions,omitempty"` -} - -// Validate validates this dmaas audit actions -func (m *DmaasAuditActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dmaasAuditActionsTypeActionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Login","Logout","Create","Add","Modify","Delete","Fetch"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dmaasAuditActionsTypeActionsPropEnum = append(dmaasAuditActionsTypeActionsPropEnum, v) - } -} - -const ( - - // DmaasAuditActionsActionsLogin captures enum value "Login" - DmaasAuditActionsActionsLogin string = "Login" - - // DmaasAuditActionsActionsLogout captures enum value "Logout" - DmaasAuditActionsActionsLogout string = "Logout" - - // DmaasAuditActionsActionsCreate captures enum value "Create" - DmaasAuditActionsActionsCreate string = "Create" - - // DmaasAuditActionsActionsAdd captures enum value "Add" - DmaasAuditActionsActionsAdd string = "Add" - - // DmaasAuditActionsActionsModify captures enum value "Modify" - DmaasAuditActionsActionsModify string = "Modify" - - // DmaasAuditActionsActionsDelete captures enum value "Delete" - DmaasAuditActionsActionsDelete string = "Delete" - - // DmaasAuditActionsActionsFetch captures enum value "Fetch" - DmaasAuditActionsActionsFetch string = "Fetch" -) - -// prop value enum -func (m *DmaasAuditActions) validateActionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dmaasAuditActionsTypeActionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DmaasAuditActions) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - // value enum - if err := m.validateActionsEnum("actions", "body", m.Actions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this dmaas audit actions based on context it is used -func (m *DmaasAuditActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DmaasAuditActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DmaasAuditActions) UnmarshalBinary(b []byte) error { - var res DmaasAuditActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/dmaas_audit_entity_types.go b/v2/models/dmaas_audit_entity_types.go deleted file mode 100644 index c64acc0a..00000000 --- a/v2/models/dmaas_audit_entity_types.go +++ /dev/null @@ -1,110 +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" -) - -// DmaasAuditEntityTypes Dmaas Audit Entity Types -// -// # Dmaas Audit Entity Types -// -// swagger:model DmaasAuditEntityTypes -type DmaasAuditEntityTypes struct { - - // Dmaas Audit Entity Types - // Enum: ["Region","SaasConnector","ProtectionPolicy"] - EntityTypes string `json:"entityTypes,omitempty"` -} - -// Validate validates this dmaas audit entity types -func (m *DmaasAuditEntityTypes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dmaasAuditEntityTypesTypeEntityTypesPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Region","SaasConnector","ProtectionPolicy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dmaasAuditEntityTypesTypeEntityTypesPropEnum = append(dmaasAuditEntityTypesTypeEntityTypesPropEnum, v) - } -} - -const ( - - // DmaasAuditEntityTypesEntityTypesRegion captures enum value "Region" - DmaasAuditEntityTypesEntityTypesRegion string = "Region" - - // DmaasAuditEntityTypesEntityTypesSaasConnector captures enum value "SaasConnector" - DmaasAuditEntityTypesEntityTypesSaasConnector string = "SaasConnector" - - // DmaasAuditEntityTypesEntityTypesProtectionPolicy captures enum value "ProtectionPolicy" - DmaasAuditEntityTypesEntityTypesProtectionPolicy string = "ProtectionPolicy" -) - -// prop value enum -func (m *DmaasAuditEntityTypes) validateEntityTypesEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dmaasAuditEntityTypesTypeEntityTypesPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DmaasAuditEntityTypes) validateEntityTypes(formats strfmt.Registry) error { - if swag.IsZero(m.EntityTypes) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypesEnum("entityTypes", "body", m.EntityTypes); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this dmaas audit entity types based on context it is used -func (m *DmaasAuditEntityTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DmaasAuditEntityTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DmaasAuditEntityTypes) UnmarshalBinary(b []byte) error { - var res DmaasAuditEntityTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/dmaas_tenant_action.go b/v2/models/dmaas_tenant_action.go deleted file mode 100644 index 8a079ec7..00000000 --- a/v2/models/dmaas_tenant_action.go +++ /dev/null @@ -1,149 +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" -) - -// DmaasTenantAction DMaaS Tenant Action -// -// Describes DMaaS tenant actions. -// -// swagger:model DmaasTenantAction -type DmaasTenantAction struct { - - // Specifies the DMaaS Tenant Actions - // Enum: ["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this dmaas tenant action -func (m *DmaasTenantAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dmaasTenantActionTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dmaasTenantActionTypeEnumPropEnum = append(dmaasTenantActionTypeEnumPropEnum, v) - } -} - -const ( - - // DmaasTenantActionEnumStartMigration captures enum value "StartMigration" - DmaasTenantActionEnumStartMigration string = "StartMigration" - - // DmaasTenantActionEnumStopMigration captures enum value "StopMigration" - DmaasTenantActionEnumStopMigration string = "StopMigration" - - // DmaasTenantActionEnumGetTenantMigrationServices captures enum value "GetTenantMigrationServices" - DmaasTenantActionEnumGetTenantMigrationServices string = "GetTenantMigrationServices" - - // DmaasTenantActionEnumPreCheck captures enum value "PreCheck" - DmaasTenantActionEnumPreCheck string = "PreCheck" - - // DmaasTenantActionEnumImport captures enum value "Import" - DmaasTenantActionEnumImport string = "Import" - - // DmaasTenantActionEnumExport captures enum value "Export" - DmaasTenantActionEnumExport string = "Export" - - // DmaasTenantActionEnumQuiesce captures enum value "Quiesce" - DmaasTenantActionEnumQuiesce string = "Quiesce" - - // DmaasTenantActionEnumUnquiesce captures enum value "Unquiesce" - DmaasTenantActionEnumUnquiesce string = "Unquiesce" - - // DmaasTenantActionEnumMigrateMetadata captures enum value "MigrateMetadata" - DmaasTenantActionEnumMigrateMetadata string = "MigrateMetadata" - - // DmaasTenantActionEnumMigrateData captures enum value "MigrateData" - DmaasTenantActionEnumMigrateData string = "MigrateData" - - // DmaasTenantActionEnumPurgeTenantData captures enum value "PurgeTenantData" - DmaasTenantActionEnumPurgeTenantData string = "PurgeTenantData" - - // DmaasTenantActionEnumExportMetadataForValidation captures enum value "ExportMetadataForValidation" - DmaasTenantActionEnumExportMetadataForValidation string = "ExportMetadataForValidation" - - // DmaasTenantActionEnumImportMetadataForValidation captures enum value "ImportMetadataForValidation" - DmaasTenantActionEnumImportMetadataForValidation string = "ImportMetadataForValidation" - - // DmaasTenantActionEnumValidateMetadata captures enum value "ValidateMetadata" - DmaasTenantActionEnumValidateMetadata string = "ValidateMetadata" - - // DmaasTenantActionEnumDisableInlineChanges captures enum value "DisableInlineChanges" - DmaasTenantActionEnumDisableInlineChanges string = "DisableInlineChanges" - - // DmaasTenantActionEnumEnableInlineChanges captures enum value "EnableInlineChanges" - DmaasTenantActionEnumEnableInlineChanges string = "EnableInlineChanges" -) - -// prop value enum -func (m *DmaasTenantAction) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dmaasTenantActionTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DmaasTenantAction) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this dmaas tenant action based on context it is used -func (m *DmaasTenantAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DmaasTenantAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DmaasTenantAction) UnmarshalBinary(b []byte) error { - var res DmaasTenantAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/dns_delegation_zone.go b/v2/models/dns_delegation_zone.go deleted file mode 100644 index 41bc3a42..00000000 --- a/v2/models/dns_delegation_zone.go +++ /dev/null @@ -1,77 +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" -) - -// DNSDelegationZone Dns delegation zone of the vlan. -// -// swagger:model DnsDelegationZone -type DNSDelegationZone struct { - - // Name of dns zone. - // Required: true - Name *string `json:"name"` - - // VIPs part of dns zone. - DNSZoneVips []string `json:"dnsZoneVips"` - - // Dns zone resolved VIPs. - DNSZoneResolvedVips []string `json:"dnsZoneResolvedVips"` -} - -// Validate validates this Dns delegation zone -func (m *DNSDelegationZone) 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 *DNSDelegationZone) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Dns delegation zone based on context it is used -func (m *DNSDelegationZone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DNSDelegationZone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DNSDelegationZone) UnmarshalBinary(b []byte) error { - var res DNSDelegationZone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/dns_servers_info.go b/v2/models/dns_servers_info.go deleted file mode 100644 index 99510018..00000000 --- a/v2/models/dns_servers_info.go +++ /dev/null @@ -1,52 +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" -) - -// DNSServersInfo DnsServersInfo -// -// List of DNS servers in cluster. -// -// swagger:model DnsServersInfo -type DNSServersInfo struct { - - // List of DNS servers in cluster. - DNSServers []string `json:"dnsServers"` -} - -// Validate validates this Dns servers info -func (m *DNSServersInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this Dns servers info based on context it is used -func (m *DNSServersInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DNSServersInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DNSServersInfo) UnmarshalBinary(b []byte) error { - var res DNSServersInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/document_library_item.go b/v2/models/document_library_item.go deleted file mode 100644 index 7567c591..00000000 --- a/v2/models/document_library_item.go +++ /dev/null @@ -1,204 +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" -) - -// DocumentLibraryItem DocumentLibraryItem -// -// Specifies a Document Library indexed item. -// -// swagger:model DocumentLibraryItem -type DocumentLibraryItem struct { - CommonIndexedObjectParams - - // Specifies the file type. - // Enum: ["File","Directory","Symlink"] - FileType *string `json:"fileType,omitempty"` - - // Specifies the size in bytes for the indexed item. - ItemSize *int64 `json:"itemSize,omitempty"` - - // Specifies the Unix timestamp epoch in seconds at which this item is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // Specifies the name of the owner of the document library item. - OwnerName *string `json:"ownerName,omitempty"` - - // Specifies the email of the owner of the document library item. - OwnerEmail *string `json:"ownerEmail,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DocumentLibraryItem) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - FileType *string `json:"fileType,omitempty"` - - ItemSize *int64 `json:"itemSize,omitempty"` - - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - OwnerName *string `json:"ownerName,omitempty"` - - OwnerEmail *string `json:"ownerEmail,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.FileType = dataAO1.FileType - - m.ItemSize = dataAO1.ItemSize - - m.CreationTimeSecs = dataAO1.CreationTimeSecs - - m.OwnerName = dataAO1.OwnerName - - m.OwnerEmail = dataAO1.OwnerEmail - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DocumentLibraryItem) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - FileType *string `json:"fileType,omitempty"` - - ItemSize *int64 `json:"itemSize,omitempty"` - - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - OwnerName *string `json:"ownerName,omitempty"` - - OwnerEmail *string `json:"ownerEmail,omitempty"` - } - - dataAO1.FileType = m.FileType - - dataAO1.ItemSize = m.ItemSize - - dataAO1.CreationTimeSecs = m.CreationTimeSecs - - dataAO1.OwnerName = m.OwnerName - - dataAO1.OwnerEmail = m.OwnerEmail - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this document library item -func (m *DocumentLibraryItem) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var documentLibraryItemTypeFileTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - documentLibraryItemTypeFileTypePropEnum = append(documentLibraryItemTypeFileTypePropEnum, v) - } -} - -// property enum -func (m *DocumentLibraryItem) validateFileTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, documentLibraryItemTypeFileTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DocumentLibraryItem) validateFileType(formats strfmt.Registry) error { - - if swag.IsZero(m.FileType) { // not required - return nil - } - - // value enum - if err := m.validateFileTypeEnum("fileType", "body", *m.FileType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this document library item based on the context it is used -func (m *DocumentLibraryItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *DocumentLibraryItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DocumentLibraryItem) UnmarshalBinary(b []byte) error { - var res DocumentLibraryItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/documents_filter_type.go b/v2/models/documents_filter_type.go deleted file mode 100644 index 6e56dfde..00000000 --- a/v2/models/documents_filter_type.go +++ /dev/null @@ -1,110 +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" -) - -// DocumentsFilterType Enumeration of all the document filter option. -// -// Enumeration of all the document filter option. -// -// swagger:model DocumentsFilterType -type DocumentsFilterType struct { - - // Enumeration of all the document filter option. - // Enum: ["NONE","ID","CONTENT"] - DocumentsFilterType string `json:"DocumentsFilterType,omitempty"` -} - -// Validate validates this documents filter type -func (m *DocumentsFilterType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentsFilterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var documentsFilterTypeTypeDocumentsFilterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NONE","ID","CONTENT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - documentsFilterTypeTypeDocumentsFilterTypePropEnum = append(documentsFilterTypeTypeDocumentsFilterTypePropEnum, v) - } -} - -const ( - - // DocumentsFilterTypeDocumentsFilterTypeNONE captures enum value "NONE" - DocumentsFilterTypeDocumentsFilterTypeNONE string = "NONE" - - // DocumentsFilterTypeDocumentsFilterTypeID captures enum value "ID" - DocumentsFilterTypeDocumentsFilterTypeID string = "ID" - - // DocumentsFilterTypeDocumentsFilterTypeCONTENT captures enum value "CONTENT" - DocumentsFilterTypeDocumentsFilterTypeCONTENT string = "CONTENT" -) - -// prop value enum -func (m *DocumentsFilterType) validateDocumentsFilterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, documentsFilterTypeTypeDocumentsFilterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DocumentsFilterType) validateDocumentsFilterType(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentsFilterType) { // not required - return nil - } - - // value enum - if err := m.validateDocumentsFilterTypeEnum("DocumentsFilterType", "body", m.DocumentsFilterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this documents filter type based on context it is used -func (m *DocumentsFilterType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DocumentsFilterType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DocumentsFilterType) UnmarshalBinary(b []byte) error { - var res DocumentsFilterType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/domain_controller.go b/v2/models/domain_controller.go deleted file mode 100644 index 1820b4a0..00000000 --- a/v2/models/domain_controller.go +++ /dev/null @@ -1,147 +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" -) - -// DomainController Specifies a domain controller. -// -// swagger:model DomainController -type DomainController struct { - - // Specifies the domain controller name. - // Required: true - Name *string `json:"name"` - - // Specifies the connection status. - // Read Only: true - // Enum: ["Reachable","Flapping","Incompatible","ClockSkew"] - Status *string `json:"status,omitempty"` -} - -// Validate validates this domain controller -func (m *DomainController) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainController) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var domainControllerTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Reachable","Flapping","Incompatible","ClockSkew"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - domainControllerTypeStatusPropEnum = append(domainControllerTypeStatusPropEnum, v) - } -} - -const ( - - // DomainControllerStatusReachable captures enum value "Reachable" - DomainControllerStatusReachable string = "Reachable" - - // DomainControllerStatusFlapping captures enum value "Flapping" - DomainControllerStatusFlapping string = "Flapping" - - // DomainControllerStatusIncompatible captures enum value "Incompatible" - DomainControllerStatusIncompatible string = "Incompatible" - - // DomainControllerStatusClockSkew captures enum value "ClockSkew" - DomainControllerStatusClockSkew string = "ClockSkew" -) - -// prop value enum -func (m *DomainController) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, domainControllerTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DomainController) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this domain controller based on the context it is used -func (m *DomainController) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainController) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DomainController) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainController) UnmarshalBinary(b []byte) error { - var res DomainController - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/domain_controller_status.go b/v2/models/domain_controller_status.go deleted file mode 100644 index b3a1da18..00000000 --- a/v2/models/domain_controller_status.go +++ /dev/null @@ -1,113 +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" -) - -// DomainControllerStatus Domain Controller Status -// -// Connection status of domain controller. -// -// swagger:model DomainControllerStatus -type DomainControllerStatus struct { - - // Specifies the connection status of a domain controller. - // Enum: ["Reachable","Flapping","Incompatible","ClockSkew"] - DomainControllerStatus string `json:"domainControllerStatus,omitempty"` -} - -// Validate validates this domain controller status -func (m *DomainControllerStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainControllerStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var domainControllerStatusTypeDomainControllerStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Reachable","Flapping","Incompatible","ClockSkew"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - domainControllerStatusTypeDomainControllerStatusPropEnum = append(domainControllerStatusTypeDomainControllerStatusPropEnum, v) - } -} - -const ( - - // DomainControllerStatusDomainControllerStatusReachable captures enum value "Reachable" - DomainControllerStatusDomainControllerStatusReachable string = "Reachable" - - // DomainControllerStatusDomainControllerStatusFlapping captures enum value "Flapping" - DomainControllerStatusDomainControllerStatusFlapping string = "Flapping" - - // DomainControllerStatusDomainControllerStatusIncompatible captures enum value "Incompatible" - DomainControllerStatusDomainControllerStatusIncompatible string = "Incompatible" - - // DomainControllerStatusDomainControllerStatusClockSkew captures enum value "ClockSkew" - DomainControllerStatusDomainControllerStatusClockSkew string = "ClockSkew" -) - -// prop value enum -func (m *DomainControllerStatus) validateDomainControllerStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, domainControllerStatusTypeDomainControllerStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DomainControllerStatus) validateDomainControllerStatus(formats strfmt.Registry) error { - if swag.IsZero(m.DomainControllerStatus) { // not required - return nil - } - - // value enum - if err := m.validateDomainControllerStatusEnum("domainControllerStatus", "body", m.DomainControllerStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this domain controller status based on context it is used -func (m *DomainControllerStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DomainControllerStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainControllerStatus) UnmarshalBinary(b []byte) error { - var res DomainControllerStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/domain_controllers.go b/v2/models/domain_controllers.go deleted file mode 100644 index e13af9f5..00000000 --- a/v2/models/domain_controllers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DomainControllers Specifies the domain controllers of a domain. -// -// swagger:model DomainControllers -type DomainControllers struct { - - // Specifies the domain name. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a list of domain controllers of the domain. - Controllers []*DomainController `json:"controllers"` -} - -// Validate validates this domain controllers -func (m *DomainControllers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateControllers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainControllers) validateControllers(formats strfmt.Registry) error { - if swag.IsZero(m.Controllers) { // not required - return nil - } - - for i := 0; i < len(m.Controllers); i++ { - if swag.IsZero(m.Controllers[i]) { // not required - continue - } - - if m.Controllers[i] != nil { - if err := m.Controllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this domain controllers based on the context it is used -func (m *DomainControllers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainControllers) contextValidateControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Controllers); i++ { - - if m.Controllers[i] != nil { - - if swag.IsZero(m.Controllers[i]) { // not required - return nil - } - - if err := m.Controllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DomainControllers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainControllers) UnmarshalBinary(b []byte) error { - var res DomainControllers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/domain_controllers_response.go b/v2/models/domain_controllers_response.go deleted file mode 100644 index e3636020..00000000 --- a/v2/models/domain_controllers_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DomainControllersResponse Specifies the response of get domain controllers request. -// -// swagger:model DomainControllersResponse -type DomainControllersResponse struct { - - // A list of domain names with a list of it's domain controllers. - DomainControllers []*DomainControllers `json:"domainControllers"` -} - -// Validate validates this domain controllers response -func (m *DomainControllersResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainControllers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainControllersResponse) validateDomainControllers(formats strfmt.Registry) error { - if swag.IsZero(m.DomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.DomainControllers); i++ { - if swag.IsZero(m.DomainControllers[i]) { // not required - continue - } - - if m.DomainControllers[i] != nil { - if err := m.DomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this domain controllers response based on the context it is used -func (m *DomainControllersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainControllersResponse) contextValidateDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DomainControllers); i++ { - - if m.DomainControllers[i] != nil { - - if swag.IsZero(m.DomainControllers[i]) { // not required - return nil - } - - if err := m.DomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DomainControllersResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainControllersResponse) UnmarshalBinary(b []byte) error { - var res DomainControllersResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/domain_scope_params.go b/v2/models/domain_scope_params.go deleted file mode 100644 index 4a4b5280..00000000 --- a/v2/models/domain_scope_params.go +++ /dev/null @@ -1,71 +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" -) - -// DomainScopeParams Specifies the parameters for domain type scope -// -// swagger:model DomainScopeParams -type DomainScopeParams struct { - - // Specifies the domain name. - // Required: true - DomainName *string `json:"domainName"` -} - -// Validate validates this domain scope params -func (m *DomainScopeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DomainScopeParams) validateDomainName(formats strfmt.Registry) error { - - if err := validate.Required("domainName", "body", m.DomainName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this domain scope params based on context it is used -func (m *DomainScopeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DomainScopeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DomainScopeParams) UnmarshalBinary(b []byte) error { - var res DomainScopeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/down_tiering_file_selection_type.go b/v2/models/down_tiering_file_selection_type.go deleted file mode 100644 index 8f5ac6be..00000000 --- a/v2/models/down_tiering_file_selection_type.go +++ /dev/null @@ -1,110 +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" -) - -// DownTieringFileSelectionType Data down-tiering file selection type. -// -// Data down-tiering file selection type. -// -// swagger:model DownTieringFileSelectionType -type DownTieringFileSelectionType struct { - - // Specifies the data down-tiering file selection type. - // Enum: ["OlderThan","LastAccessed","LastModified"] - Type string `json:"type,omitempty"` -} - -// Validate validates this down tiering file selection type -func (m *DownTieringFileSelectionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downTieringFileSelectionTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OlderThan","LastAccessed","LastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downTieringFileSelectionTypeTypeTypePropEnum = append(downTieringFileSelectionTypeTypeTypePropEnum, v) - } -} - -const ( - - // DownTieringFileSelectionTypeTypeOlderThan captures enum value "OlderThan" - DownTieringFileSelectionTypeTypeOlderThan string = "OlderThan" - - // DownTieringFileSelectionTypeTypeLastAccessed captures enum value "LastAccessed" - DownTieringFileSelectionTypeTypeLastAccessed string = "LastAccessed" - - // DownTieringFileSelectionTypeTypeLastModified captures enum value "LastModified" - DownTieringFileSelectionTypeTypeLastModified string = "LastModified" -) - -// prop value enum -func (m *DownTieringFileSelectionType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downTieringFileSelectionTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownTieringFileSelectionType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this down tiering file selection type based on context it is used -func (m *DownTieringFileSelectionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownTieringFileSelectionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownTieringFileSelectionType) UnmarshalBinary(b []byte) error { - var res DownTieringFileSelectionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_agent_request_params.go b/v2/models/download_agent_request_params.go deleted file mode 100644 index 5ea45f73..00000000 --- a/v2/models/download_agent_request_params.go +++ /dev/null @@ -1,445 +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" -) - -// DownloadAgentRequestParams Specifies agent download request parameters. -// -// swagger:model DownloadAgentRequestParams -type DownloadAgentRequestParams struct { - - // Specifies the platform for which agent needs to be downloaded. - // Required: true - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kHPUX","kVOS","kVMWareCDPFilter"] - Platform *string `json:"platform"` - - // Specifies agent download parameters for Linux platform. - LinuxParams *LinuxAgentParams `json:"linuxParams,omitempty"` - - // Specifies agent download parameters for Aix platform. - AixParams *AixAgentParams `json:"aixParams,omitempty"` - - // Specifies agent download parameters for SapHana platform. - SapHanaParams *SapHanaAgentParams `json:"sapHanaParams,omitempty"` - - // Specifies agent download parameters for SapOracle platform. - SapOracleParams *SapOracleAgentParams `json:"sapOracleParams,omitempty"` - - // Specifies agent download parameters for MySQL platform. - MySQLParams *MySQLAgentParams `json:"mySqlParams,omitempty"` - - // Specifies the download parameters for VMWare CDP IO Filter. - VmwareCDPFilterParams *VMWareCDPFilterParams `json:"vmwareCDPFilterParams,omitempty"` -} - -// Validate validates this download agent request params -func (m *DownloadAgentRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePlatform(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinuxParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAixParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSapHanaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSapOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMySQLParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareCDPFilterParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downloadAgentRequestParamsTypePlatformPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kHPUX","kVOS","kVMWareCDPFilter"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downloadAgentRequestParamsTypePlatformPropEnum = append(downloadAgentRequestParamsTypePlatformPropEnum, v) - } -} - -const ( - - // DownloadAgentRequestParamsPlatformKLinux captures enum value "kLinux" - DownloadAgentRequestParamsPlatformKLinux string = "kLinux" - - // DownloadAgentRequestParamsPlatformKWindows captures enum value "kWindows" - DownloadAgentRequestParamsPlatformKWindows string = "kWindows" - - // DownloadAgentRequestParamsPlatformKAix captures enum value "kAix" - DownloadAgentRequestParamsPlatformKAix string = "kAix" - - // DownloadAgentRequestParamsPlatformKSolaris captures enum value "kSolaris" - DownloadAgentRequestParamsPlatformKSolaris string = "kSolaris" - - // DownloadAgentRequestParamsPlatformKSapHana captures enum value "kSapHana" - DownloadAgentRequestParamsPlatformKSapHana string = "kSapHana" - - // DownloadAgentRequestParamsPlatformKSapOracle captures enum value "kSapOracle" - DownloadAgentRequestParamsPlatformKSapOracle string = "kSapOracle" - - // DownloadAgentRequestParamsPlatformKCockroachDB captures enum value "kCockroachDB" - DownloadAgentRequestParamsPlatformKCockroachDB string = "kCockroachDB" - - // DownloadAgentRequestParamsPlatformKMySQL captures enum value "kMySQL" - DownloadAgentRequestParamsPlatformKMySQL string = "kMySQL" - - // DownloadAgentRequestParamsPlatformKHPUX captures enum value "kHPUX" - DownloadAgentRequestParamsPlatformKHPUX string = "kHPUX" - - // DownloadAgentRequestParamsPlatformKVOS captures enum value "kVOS" - DownloadAgentRequestParamsPlatformKVOS string = "kVOS" - - // DownloadAgentRequestParamsPlatformKVMWareCDPFilter captures enum value "kVMWareCDPFilter" - DownloadAgentRequestParamsPlatformKVMWareCDPFilter string = "kVMWareCDPFilter" -) - -// prop value enum -func (m *DownloadAgentRequestParams) validatePlatformEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downloadAgentRequestParamsTypePlatformPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownloadAgentRequestParams) validatePlatform(formats strfmt.Registry) error { - - if err := validate.Required("platform", "body", m.Platform); err != nil { - return err - } - - // value enum - if err := m.validatePlatformEnum("platform", "body", *m.Platform); err != nil { - return err - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateLinuxParams(formats strfmt.Registry) error { - if swag.IsZero(m.LinuxParams) { // not required - return nil - } - - if m.LinuxParams != nil { - if err := m.LinuxParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateAixParams(formats strfmt.Registry) error { - if swag.IsZero(m.AixParams) { // not required - return nil - } - - if m.AixParams != nil { - if err := m.AixParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aixParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aixParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateSapHanaParams(formats strfmt.Registry) error { - if swag.IsZero(m.SapHanaParams) { // not required - return nil - } - - if m.SapHanaParams != nil { - if err := m.SapHanaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sapHanaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sapHanaParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateSapOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.SapOracleParams) { // not required - return nil - } - - if m.SapOracleParams != nil { - if err := m.SapOracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sapOracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sapOracleParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateMySQLParams(formats strfmt.Registry) error { - if swag.IsZero(m.MySQLParams) { // not required - return nil - } - - if m.MySQLParams != nil { - if err := m.MySQLParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mySqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mySqlParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) validateVmwareCDPFilterParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareCDPFilterParams) { // not required - return nil - } - - if m.VmwareCDPFilterParams != nil { - if err := m.VmwareCDPFilterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareCDPFilterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareCDPFilterParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this download agent request params based on the context it is used -func (m *DownloadAgentRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLinuxParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAixParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSapHanaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSapOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMySQLParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareCDPFilterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateLinuxParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LinuxParams != nil { - - if swag.IsZero(m.LinuxParams) { // not required - return nil - } - - if err := m.LinuxParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linuxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linuxParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateAixParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AixParams != nil { - - if swag.IsZero(m.AixParams) { // not required - return nil - } - - if err := m.AixParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aixParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aixParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateSapHanaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SapHanaParams != nil { - - if swag.IsZero(m.SapHanaParams) { // not required - return nil - } - - if err := m.SapHanaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sapHanaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sapHanaParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateSapOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SapOracleParams != nil { - - if swag.IsZero(m.SapOracleParams) { // not required - return nil - } - - if err := m.SapOracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sapOracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sapOracleParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateMySQLParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MySQLParams != nil { - - if swag.IsZero(m.MySQLParams) { // not required - return nil - } - - if err := m.MySQLParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mySqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mySqlParams") - } - return err - } - } - - return nil -} - -func (m *DownloadAgentRequestParams) contextValidateVmwareCDPFilterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareCDPFilterParams != nil { - - if swag.IsZero(m.VmwareCDPFilterParams) { // not required - return nil - } - - if err := m.VmwareCDPFilterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareCDPFilterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareCDPFilterParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadAgentRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadAgentRequestParams) UnmarshalBinary(b []byte) error { - var res DownloadAgentRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_baseos_patch_request.go b/v2/models/download_baseos_patch_request.go deleted file mode 100644 index 2219e214..00000000 --- a/v2/models/download_baseos_patch_request.go +++ /dev/null @@ -1,71 +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" -) - -// DownloadBaseosPatchRequest Specifies the url of baseos patch. -// -// swagger:model DownloadBaseosPatchRequest -type DownloadBaseosPatchRequest struct { - - // Url of the hotfix with security patch - // Required: true - PatchURL *string `json:"patchUrl"` -} - -// Validate validates this download baseos patch request -func (m *DownloadBaseosPatchRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatchURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadBaseosPatchRequest) validatePatchURL(formats strfmt.Registry) error { - - if err := validate.Required("patchUrl", "body", m.PatchURL); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this download baseos patch request based on context it is used -func (m *DownloadBaseosPatchRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadBaseosPatchRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadBaseosPatchRequest) UnmarshalBinary(b []byte) error { - var res DownloadBaseosPatchRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_chats_params.go b/v2/models/download_chats_params.go deleted file mode 100644 index c3088740..00000000 --- a/v2/models/download_chats_params.go +++ /dev/null @@ -1,113 +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" -) - -// DownloadChatsParams Specifies the Download chat/posts specific parameters. -// -// swagger:model DownloadChatsParams -type DownloadChatsParams struct { - - // Specifies the html template for the downloaded chats. - HTMLTemplate *string `json:"htmlTemplate,omitempty"` - - // Specifies channel IDs whose posts needs to be downloaded. If channelIds is nil or empty then full teams' posts will be downloaded. - ChannelIds []string `json:"channelIds"` - - // Specifies the file type for the downloaded content. - // Required: true - // Enum: ["kHTML","kJSON"] - DownloadFileType *string `json:"downloadFileType"` -} - -// Validate validates this download chats params -func (m *DownloadChatsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDownloadFileType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downloadChatsParamsTypeDownloadFileTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHTML","kJSON"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downloadChatsParamsTypeDownloadFileTypePropEnum = append(downloadChatsParamsTypeDownloadFileTypePropEnum, v) - } -} - -const ( - - // DownloadChatsParamsDownloadFileTypeKHTML captures enum value "kHTML" - DownloadChatsParamsDownloadFileTypeKHTML string = "kHTML" - - // DownloadChatsParamsDownloadFileTypeKJSON captures enum value "kJSON" - DownloadChatsParamsDownloadFileTypeKJSON string = "kJSON" -) - -// prop value enum -func (m *DownloadChatsParams) validateDownloadFileTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downloadChatsParamsTypeDownloadFileTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownloadChatsParams) validateDownloadFileType(formats strfmt.Registry) error { - - if err := validate.Required("downloadFileType", "body", m.DownloadFileType); err != nil { - return err - } - - // value enum - if err := m.validateDownloadFileTypeEnum("downloadFileType", "body", *m.DownloadFileType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this download chats params based on context it is used -func (m *DownloadChatsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadChatsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadChatsParams) UnmarshalBinary(b []byte) error { - var res DownloadChatsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_cluster_cert_response.go b/v2/models/download_cluster_cert_response.go deleted file mode 100644 index edf490b5..00000000 --- a/v2/models/download_cluster_cert_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DownloadClusterCertResponse Specifies the response of the download cluster certificate request -// -// swagger:model DownloadClusterCertResponse -type DownloadClusterCertResponse struct { - - // Array of certificates from the cluster certificates proto - Certificates []*Certificate `json:"certificates"` -} - -// Validate validates this download cluster cert response -func (m *DownloadClusterCertResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadClusterCertResponse) validateCertificates(formats strfmt.Registry) error { - if swag.IsZero(m.Certificates) { // not required - return nil - } - - for i := 0; i < len(m.Certificates); i++ { - if swag.IsZero(m.Certificates[i]) { // not required - continue - } - - if m.Certificates[i] != nil { - if err := m.Certificates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this download cluster cert response based on the context it is used -func (m *DownloadClusterCertResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadClusterCertResponse) contextValidateCertificates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Certificates); i++ { - - if m.Certificates[i] != nil { - - if swag.IsZero(m.Certificates[i]) { // not required - return nil - } - - if err := m.Certificates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadClusterCertResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadClusterCertResponse) UnmarshalBinary(b []byte) error { - var res DownloadClusterCertResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_file_type.go b/v2/models/download_file_type.go deleted file mode 100644 index b6b40df2..00000000 --- a/v2/models/download_file_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DownloadFileType DownloadFileType -// -// Download File Type for Microsoft365 chats. -// -// swagger:model DownloadFileType -type DownloadFileType struct { - - // Specifies the download file type for Microsoft365 chats. If unspecified, default is HTML. - // Enum: ["kHTML","kJSON"] - Type string `json:"type,omitempty"` -} - -// Validate validates this download file type -func (m *DownloadFileType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downloadFileTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHTML","kJSON"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downloadFileTypeTypeTypePropEnum = append(downloadFileTypeTypeTypePropEnum, v) - } -} - -const ( - - // DownloadFileTypeTypeKHTML captures enum value "kHTML" - DownloadFileTypeTypeKHTML string = "kHTML" - - // DownloadFileTypeTypeKJSON captures enum value "kJSON" - DownloadFileTypeTypeKJSON string = "kJSON" -) - -// prop value enum -func (m *DownloadFileType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downloadFileTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownloadFileType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this download file type based on context it is used -func (m *DownloadFileType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadFileType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadFileType) UnmarshalBinary(b []byte) error { - var res DownloadFileType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_files_and_folders_request_params.go b/v2/models/download_files_and_folders_request_params.go deleted file mode 100644 index 19727dc5..00000000 --- a/v2/models/download_files_and_folders_request_params.go +++ /dev/null @@ -1,273 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DownloadFilesAndFoldersRequestParams Download Files And Folders Recovery Params. -// -// Specifies the parameters to create a download files and folders Recovery. -// -// swagger:model DownloadFilesAndFoldersRequestParams -type DownloadFilesAndFoldersRequestParams struct { - - // Specifies the name of the recovery task. This field must be set and must be a unique name. - // Required: true - Name *string `json:"name"` - - // Specifies the snapshot object from which to download files and folders. - // Required: true - Object *CommonRecoverObjectSnapshotParams `json:"object"` - - // If current recovery is child task triggered through another parent recovery operation, then this field will specify the id of the parent recovery. - // Pattern: ^\d+:\d+:\d+$ - ParentRecoveryID *string `json:"parentRecoveryId,omitempty"` - - // Specifies the list of files and folders to download. - // Required: true - // Min Items: 1 - FilesAndFolders []*FilesAndFoldersObject `json:"filesAndFolders"` - - // Specifies the glacier retrieval type when restoring or downloding files or folders from a Glacier-based cloud snapshot. - // Enum: ["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` -} - -// Validate validates this download files and folders request params -func (m *DownloadFilesAndFoldersRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentRecoveryID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) validateObject(formats strfmt.Registry) error { - - if err := validate.Required("object", "body", m.Object); err != nil { - return err - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) validateParentRecoveryID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentRecoveryID) { // not required - return nil - } - - if err := validate.Pattern("parentRecoveryId", "body", *m.ParentRecoveryID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - iFilesAndFoldersSize := int64(len(m.FilesAndFolders)) - - if err := validate.MinItems("filesAndFolders", "body", iFilesAndFoldersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var downloadFilesAndFoldersRequestParamsTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downloadFilesAndFoldersRequestParamsTypeGlacierRetrievalTypePropEnum = append(downloadFilesAndFoldersRequestParamsTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKStandard captures enum value "kStandard" - DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKStandard string = "kStandard" - - // DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKExpeditedNoPCU captures enum value "kExpeditedNoPCU" - DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKExpeditedNoPCU string = "kExpeditedNoPCU" - - // DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKExpeditedWithPCU captures enum value "kExpeditedWithPCU" - DownloadFilesAndFoldersRequestParamsGlacierRetrievalTypeKExpeditedWithPCU string = "kExpeditedWithPCU" -) - -// prop value enum -func (m *DownloadFilesAndFoldersRequestParams) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downloadFilesAndFoldersRequestParamsTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this download files and folders request params based on the context it is used -func (m *DownloadFilesAndFoldersRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *DownloadFilesAndFoldersRequestParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadFilesAndFoldersRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadFilesAndFoldersRequestParams) UnmarshalBinary(b []byte) error { - var res DownloadFilesAndFoldersRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/download_files_and_folders_response_params.go b/v2/models/download_files_and_folders_response_params.go deleted file mode 100644 index 61177630..00000000 --- a/v2/models/download_files_and_folders_response_params.go +++ /dev/null @@ -1,242 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DownloadFilesAndFoldersResponseParams Download Files And Folders Recovery Params. -// -// Specifies the parameters to create a download files and folders Recovery. -// -// swagger:model DownloadFilesAndFoldersResponseParams -type DownloadFilesAndFoldersResponseParams struct { - - // Specifies the id of the Recovery. - ID *string `json:"id,omitempty"` - - // Specifies the name of the recovery task. This field must be set and must be a unique name. - Name *string `json:"name,omitempty"` - - // Specifies the snapshot object from which to download files and folders. - Object *CommonRecoverObjectSnapshotParams `json:"object,omitempty"` - - // Specifies the list of files and folders to download. - // Min Items: 1 - FilesAndFolders []*FilesAndFoldersObject `json:"filesAndFolders"` - - // Specifies the glacier retrieval type when restoring or downloding files or folders from a Glacier-based cloud snapshot. - // Enum: ["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` -} - -// Validate validates this download files and folders response params -func (m *DownloadFilesAndFoldersResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersResponseParams) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *DownloadFilesAndFoldersResponseParams) validateFilesAndFolders(formats strfmt.Registry) error { - if swag.IsZero(m.FilesAndFolders) { // not required - return nil - } - - iFilesAndFoldersSize := int64(len(m.FilesAndFolders)) - - if err := validate.MinItems("filesAndFolders", "body", iFilesAndFoldersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var downloadFilesAndFoldersResponseParamsTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downloadFilesAndFoldersResponseParamsTypeGlacierRetrievalTypePropEnum = append(downloadFilesAndFoldersResponseParamsTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKStandard captures enum value "kStandard" - DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKStandard string = "kStandard" - - // DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKExpeditedNoPCU captures enum value "kExpeditedNoPCU" - DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKExpeditedNoPCU string = "kExpeditedNoPCU" - - // DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKExpeditedWithPCU captures enum value "kExpeditedWithPCU" - DownloadFilesAndFoldersResponseParamsGlacierRetrievalTypeKExpeditedWithPCU string = "kExpeditedWithPCU" -) - -// prop value enum -func (m *DownloadFilesAndFoldersResponseParams) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downloadFilesAndFoldersResponseParamsTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DownloadFilesAndFoldersResponseParams) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this download files and folders response params based on the context it is used -func (m *DownloadFilesAndFoldersResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DownloadFilesAndFoldersResponseParams) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *DownloadFilesAndFoldersResponseParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DownloadFilesAndFoldersResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DownloadFilesAndFoldersResponseParams) UnmarshalBinary(b []byte) error { - var res DownloadFilesAndFoldersResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/downtiered_data_location.go b/v2/models/downtiered_data_location.go deleted file mode 100644 index 6d454c4b..00000000 --- a/v2/models/downtiered_data_location.go +++ /dev/null @@ -1,92 +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" -) - -// DowntieredDataLocation Specifies a map between source Id and the corresponding viewName and mount -// path, where the source was downtiered. -// -// swagger:model DowntieredDataLocation -type DowntieredDataLocation struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the view name. - // Required: true - ViewName *string `json:"viewName"` - - // Specifies the mount path inside the view. - MountPath *string `json:"mountPath,omitempty"` -} - -// Validate validates this downtiered data location -func (m *DowntieredDataLocation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DowntieredDataLocation) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *DowntieredDataLocation) validateViewName(formats strfmt.Registry) error { - - if err := validate.Required("viewName", "body", m.ViewName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this downtiered data location based on context it is used -func (m *DowntieredDataLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DowntieredDataLocation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DowntieredDataLocation) UnmarshalBinary(b []byte) error { - var res DowntieredDataLocation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/downtiering_file_age_policy.go b/v2/models/downtiering_file_age_policy.go deleted file mode 100644 index 74b047a2..00000000 --- a/v2/models/downtiering_file_age_policy.go +++ /dev/null @@ -1,115 +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" -) - -// DowntieringFileAgePolicy Specifies the file's selection rule by file age for down tiering data -// tiering task eg. -// 1. select files older than 10 days. -// 2. select files last accessed 2 weeks ago. -// 3. select files last modified 1 month ago. -// -// swagger:model DowntieringFileAgePolicy -type DowntieringFileAgePolicy struct { - - // Specifies the condition for the file age. - // Enum: ["OlderThan","LastAccessed","LastModified"] - Condition *string `json:"condition,omitempty"` - - // Specifies the number of msecs used for file selection. - AgeMsecs *int64 `json:"ageMsecs,omitempty"` -} - -// Validate validates this downtiering file age policy -func (m *DowntieringFileAgePolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCondition(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downtieringFileAgePolicyTypeConditionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OlderThan","LastAccessed","LastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downtieringFileAgePolicyTypeConditionPropEnum = append(downtieringFileAgePolicyTypeConditionPropEnum, v) - } -} - -const ( - - // DowntieringFileAgePolicyConditionOlderThan captures enum value "OlderThan" - DowntieringFileAgePolicyConditionOlderThan string = "OlderThan" - - // DowntieringFileAgePolicyConditionLastAccessed captures enum value "LastAccessed" - DowntieringFileAgePolicyConditionLastAccessed string = "LastAccessed" - - // DowntieringFileAgePolicyConditionLastModified captures enum value "LastModified" - DowntieringFileAgePolicyConditionLastModified string = "LastModified" -) - -// prop value enum -func (m *DowntieringFileAgePolicy) validateConditionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downtieringFileAgePolicyTypeConditionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DowntieringFileAgePolicy) validateCondition(formats strfmt.Registry) error { - if swag.IsZero(m.Condition) { // not required - return nil - } - - // value enum - if err := m.validateConditionEnum("condition", "body", *m.Condition); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this downtiering file age policy based on context it is used -func (m *DowntieringFileAgePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DowntieringFileAgePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DowntieringFileAgePolicy) UnmarshalBinary(b []byte) error { - var res DowntieringFileAgePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/downtiering_policy.go b/v2/models/downtiering_policy.go deleted file mode 100644 index 4a8a28f9..00000000 --- a/v2/models/downtiering_policy.go +++ /dev/null @@ -1,512 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DowntieringPolicy Specifies the data downtiering policy. -// -// swagger:model DowntieringPolicy -type DowntieringPolicy struct { - - // Specifies whether the data tiering task will be written to HDD or - // SSD. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosPolicy *string `json:"qosPolicy,omitempty"` - - // Specifies settings for indexing files found in an Object - // (such as a VM) so these files can be searched and recovered. This - // also specifies inclusion and exclusion rules that determine the - // directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // retention - Retention *Retention `json:"retention,omitempty"` - - // Specifies whether to create a symlink for the migrated data from - // source to target. - SkipBackSymlink *bool `json:"skipBackSymlink,omitempty"` - - // Specifies whether to remove the orphan data from the target if the - // symlink is removed from the source. - AutoOrphanDataCleanup *bool `json:"autoOrphanDataCleanup,omitempty"` - - // Specifies the maximum amount of data that should be present on source - // after downtiering. - TieringGoal *int64 `json:"tieringGoal,omitempty"` - - // file age - FileAge *DowntieringFileAgePolicy `json:"fileAge,omitempty"` - - // target - Target *DowntieringTarget `json:"target,omitempty"` - - // Array of Tag objects used to represent different file based policies - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` - - CommonTieringPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *DowntieringPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - QosPolicy *string `json:"qosPolicy,omitempty"` - - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - Retention *Retention `json:"retention,omitempty"` - - SkipBackSymlink *bool `json:"skipBackSymlink,omitempty"` - - AutoOrphanDataCleanup *bool `json:"autoOrphanDataCleanup,omitempty"` - - TieringGoal *int64 `json:"tieringGoal,omitempty"` - - FileAge *DowntieringFileAgePolicy `json:"fileAge,omitempty"` - - Target *DowntieringTarget `json:"target,omitempty"` - - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.QosPolicy = dataAO0.QosPolicy - - m.IndexingPolicy = dataAO0.IndexingPolicy - - m.Retention = dataAO0.Retention - - m.SkipBackSymlink = dataAO0.SkipBackSymlink - - m.AutoOrphanDataCleanup = dataAO0.AutoOrphanDataCleanup - - m.TieringGoal = dataAO0.TieringGoal - - m.FileAge = dataAO0.FileAge - - m.Target = dataAO0.Target - - m.TagsInfo = dataAO0.TagsInfo - - // AO1 - var aO1 CommonTieringPolicy - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonTieringPolicy = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m DowntieringPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - QosPolicy *string `json:"qosPolicy,omitempty"` - - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - Retention *Retention `json:"retention,omitempty"` - - SkipBackSymlink *bool `json:"skipBackSymlink,omitempty"` - - AutoOrphanDataCleanup *bool `json:"autoOrphanDataCleanup,omitempty"` - - TieringGoal *int64 `json:"tieringGoal,omitempty"` - - FileAge *DowntieringFileAgePolicy `json:"fileAge,omitempty"` - - Target *DowntieringTarget `json:"target,omitempty"` - - TagsInfo []*DataTieringTagObject `json:"tagsInfo"` - } - - dataAO0.QosPolicy = m.QosPolicy - - dataAO0.IndexingPolicy = m.IndexingPolicy - - dataAO0.Retention = m.Retention - - dataAO0.SkipBackSymlink = m.SkipBackSymlink - - dataAO0.AutoOrphanDataCleanup = m.AutoOrphanDataCleanup - - dataAO0.TieringGoal = m.TieringGoal - - dataAO0.FileAge = m.FileAge - - dataAO0.Target = m.Target - - dataAO0.TagsInfo = m.TagsInfo - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonTieringPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this downtiering policy -func (m *DowntieringPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileAge(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTagsInfo(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonTieringPolicy - if err := m.CommonTieringPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var downtieringPolicyTypeQosPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - downtieringPolicyTypeQosPolicyPropEnum = append(downtieringPolicyTypeQosPolicyPropEnum, v) - } -} - -// property enum -func (m *DowntieringPolicy) validateQosPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, downtieringPolicyTypeQosPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DowntieringPolicy) validateQosPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - // value enum - if err := m.validateQosPolicyEnum("qosPolicy", "body", *m.QosPolicy); err != nil { - return err - } - - return nil -} - -func (m *DowntieringPolicy) validateIndexingPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *DowntieringPolicy) 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 -} - -func (m *DowntieringPolicy) validateFileAge(formats strfmt.Registry) error { - - if swag.IsZero(m.FileAge) { // not required - return nil - } - - if m.FileAge != nil { - if err := m.FileAge.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileAge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileAge") - } - return err - } - } - - return nil -} - -func (m *DowntieringPolicy) validateTarget(formats strfmt.Registry) error { - - if swag.IsZero(m.Target) { // not required - 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 -} - -func (m *DowntieringPolicy) validateTagsInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.TagsInfo) { // not required - return nil - } - - for i := 0; i < len(m.TagsInfo); i++ { - if swag.IsZero(m.TagsInfo[i]) { // not required - continue - } - - if m.TagsInfo[i] != nil { - if err := m.TagsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this downtiering policy based on the context it is used -func (m *DowntieringPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileAge(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTagsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonTieringPolicy - if err := m.CommonTieringPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DowntieringPolicy) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *DowntieringPolicy) 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 -} - -func (m *DowntieringPolicy) contextValidateFileAge(ctx context.Context, formats strfmt.Registry) error { - - if m.FileAge != nil { - - if swag.IsZero(m.FileAge) { // not required - return nil - } - - if err := m.FileAge.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileAge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileAge") - } - return err - } - } - - return nil -} - -func (m *DowntieringPolicy) 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 -} - -func (m *DowntieringPolicy) contextValidateTagsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagsInfo); i++ { - - if m.TagsInfo[i] != nil { - - if swag.IsZero(m.TagsInfo[i]) { // not required - return nil - } - - if err := m.TagsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DowntieringPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DowntieringPolicy) UnmarshalBinary(b []byte) error { - var res DowntieringPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/downtiering_target.go b/v2/models/downtiering_target.go deleted file mode 100644 index 361b7d87..00000000 --- a/v2/models/downtiering_target.go +++ /dev/null @@ -1,169 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DowntieringTarget Specifies the target data tiering details for downtier job. -// This is in beta phase. Please use target inside -// CommonDataTieringTaskParams, present directly under data tiering request -// body. If target is present inside CommonDataTieringTaskParams, this -// target will be ignored. -// -// swagger:model DowntieringTarget -type DowntieringTarget struct { - - // Specifies the view name prefix. - // Required: true - ViewNamePrefix *string `json:"viewNamePrefix"` - - // Specifies the mount path prefix inside the view. - MountPathPrefix *string `json:"mountPathPrefix,omitempty"` - - // Specifies the Storage Domain ID where the view will be kept. - // Required: true - StorageDomainID *int64 `json:"storageDomainId"` - - // Specifies a list of mapping between sources and its corresponding - // viewNames and mountPaths, where the sources were downtiered. - // Read Only: true - DowntieredDataLocations []*DowntieredDataLocation `json:"downtieredDataLocations"` -} - -// Validate validates this downtiering target -func (m *DowntieringTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewNamePrefix(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDowntieredDataLocations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DowntieringTarget) validateViewNamePrefix(formats strfmt.Registry) error { - - if err := validate.Required("viewNamePrefix", "body", m.ViewNamePrefix); err != nil { - return err - } - - return nil -} - -func (m *DowntieringTarget) validateStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -func (m *DowntieringTarget) validateDowntieredDataLocations(formats strfmt.Registry) error { - if swag.IsZero(m.DowntieredDataLocations) { // not required - return nil - } - - for i := 0; i < len(m.DowntieredDataLocations); i++ { - if swag.IsZero(m.DowntieredDataLocations[i]) { // not required - continue - } - - if m.DowntieredDataLocations[i] != nil { - if err := m.DowntieredDataLocations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this downtiering target based on the context it is used -func (m *DowntieringTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDowntieredDataLocations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DowntieringTarget) contextValidateDowntieredDataLocations(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "downtieredDataLocations", "body", []*DowntieredDataLocation(m.DowntieredDataLocations)); err != nil { - return err - } - - for i := 0; i < len(m.DowntieredDataLocations); i++ { - - if m.DowntieredDataLocations[i] != nil { - - if swag.IsZero(m.DowntieredDataLocations[i]) { // not required - return nil - } - - if err := m.DowntieredDataLocations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DowntieringTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DowntieringTarget) UnmarshalBinary(b []byte) error { - var res DowntieringTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/draas_audit_actions.go b/v2/models/draas_audit_actions.go deleted file mode 100644 index f394fd2b..00000000 --- a/v2/models/draas_audit_actions.go +++ /dev/null @@ -1,158 +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" -) - -// DraasAuditActions Draas Audit Actions -// -// # Draas Audit Actions -// -// swagger:model DraasAuditActions -type DraasAuditActions struct { - - // Draas Audit Actions - // Enum: ["Login","Logout","Create","Activate","Modify","Delete","Fetch","PrepareFailover","TestFailover","Failover","PrepareFailback","TestFailback","Failback","Teardown","RetryReplication","RetryExecution","Cancel","Resume","ForceFinish"] - Actions string `json:"actions,omitempty"` -} - -// Validate validates this draas audit actions -func (m *DraasAuditActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var draasAuditActionsTypeActionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Login","Logout","Create","Activate","Modify","Delete","Fetch","PrepareFailover","TestFailover","Failover","PrepareFailback","TestFailback","Failback","Teardown","RetryReplication","RetryExecution","Cancel","Resume","ForceFinish"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - draasAuditActionsTypeActionsPropEnum = append(draasAuditActionsTypeActionsPropEnum, v) - } -} - -const ( - - // DraasAuditActionsActionsLogin captures enum value "Login" - DraasAuditActionsActionsLogin string = "Login" - - // DraasAuditActionsActionsLogout captures enum value "Logout" - DraasAuditActionsActionsLogout string = "Logout" - - // DraasAuditActionsActionsCreate captures enum value "Create" - DraasAuditActionsActionsCreate string = "Create" - - // DraasAuditActionsActionsActivate captures enum value "Activate" - DraasAuditActionsActionsActivate string = "Activate" - - // DraasAuditActionsActionsModify captures enum value "Modify" - DraasAuditActionsActionsModify string = "Modify" - - // DraasAuditActionsActionsDelete captures enum value "Delete" - DraasAuditActionsActionsDelete string = "Delete" - - // DraasAuditActionsActionsFetch captures enum value "Fetch" - DraasAuditActionsActionsFetch string = "Fetch" - - // DraasAuditActionsActionsPrepareFailover captures enum value "PrepareFailover" - DraasAuditActionsActionsPrepareFailover string = "PrepareFailover" - - // DraasAuditActionsActionsTestFailover captures enum value "TestFailover" - DraasAuditActionsActionsTestFailover string = "TestFailover" - - // DraasAuditActionsActionsFailover captures enum value "Failover" - DraasAuditActionsActionsFailover string = "Failover" - - // DraasAuditActionsActionsPrepareFailback captures enum value "PrepareFailback" - DraasAuditActionsActionsPrepareFailback string = "PrepareFailback" - - // DraasAuditActionsActionsTestFailback captures enum value "TestFailback" - DraasAuditActionsActionsTestFailback string = "TestFailback" - - // DraasAuditActionsActionsFailback captures enum value "Failback" - DraasAuditActionsActionsFailback string = "Failback" - - // DraasAuditActionsActionsTeardown captures enum value "Teardown" - DraasAuditActionsActionsTeardown string = "Teardown" - - // DraasAuditActionsActionsRetryReplication captures enum value "RetryReplication" - DraasAuditActionsActionsRetryReplication string = "RetryReplication" - - // DraasAuditActionsActionsRetryExecution captures enum value "RetryExecution" - DraasAuditActionsActionsRetryExecution string = "RetryExecution" - - // DraasAuditActionsActionsCancel captures enum value "Cancel" - DraasAuditActionsActionsCancel string = "Cancel" - - // DraasAuditActionsActionsResume captures enum value "Resume" - DraasAuditActionsActionsResume string = "Resume" - - // DraasAuditActionsActionsForceFinish captures enum value "ForceFinish" - DraasAuditActionsActionsForceFinish string = "ForceFinish" -) - -// prop value enum -func (m *DraasAuditActions) validateActionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, draasAuditActionsTypeActionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DraasAuditActions) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - // value enum - if err := m.validateActionsEnum("actions", "body", m.Actions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this draas audit actions based on context it is used -func (m *DraasAuditActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DraasAuditActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DraasAuditActions) UnmarshalBinary(b []byte) error { - var res DraasAuditActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/draas_audit_entity_types.go b/v2/models/draas_audit_entity_types.go deleted file mode 100644 index 7c523b62..00000000 --- a/v2/models/draas_audit_entity_types.go +++ /dev/null @@ -1,116 +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" -) - -// DraasAuditEntityTypes Draas Audit Entity Types -// -// # Draas Audit Entity Types -// -// swagger:model DraasAuditEntityTypes -type DraasAuditEntityTypes struct { - - // Draas Audit Entity Types - // Enum: ["DataPool","DRPlan","Site","Source","Application"] - EntityTypes string `json:"entityTypes,omitempty"` -} - -// Validate validates this draas audit entity types -func (m *DraasAuditEntityTypes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var draasAuditEntityTypesTypeEntityTypesPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DataPool","DRPlan","Site","Source","Application"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - draasAuditEntityTypesTypeEntityTypesPropEnum = append(draasAuditEntityTypesTypeEntityTypesPropEnum, v) - } -} - -const ( - - // DraasAuditEntityTypesEntityTypesDataPool captures enum value "DataPool" - DraasAuditEntityTypesEntityTypesDataPool string = "DataPool" - - // DraasAuditEntityTypesEntityTypesDRPlan captures enum value "DRPlan" - DraasAuditEntityTypesEntityTypesDRPlan string = "DRPlan" - - // DraasAuditEntityTypesEntityTypesSite captures enum value "Site" - DraasAuditEntityTypesEntityTypesSite string = "Site" - - // DraasAuditEntityTypesEntityTypesSource captures enum value "Source" - DraasAuditEntityTypesEntityTypesSource string = "Source" - - // DraasAuditEntityTypesEntityTypesApplication captures enum value "Application" - DraasAuditEntityTypesEntityTypesApplication string = "Application" -) - -// prop value enum -func (m *DraasAuditEntityTypes) validateEntityTypesEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, draasAuditEntityTypesTypeEntityTypesPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DraasAuditEntityTypes) validateEntityTypes(formats strfmt.Registry) error { - if swag.IsZero(m.EntityTypes) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypesEnum("entityTypes", "body", m.EntityTypes); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this draas audit entity types based on context it is used -func (m *DraasAuditEntityTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DraasAuditEntityTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DraasAuditEntityTypes) UnmarshalBinary(b []byte) error { - var res DraasAuditEntityTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/e_b_s_tag.go b/v2/models/e_b_s_tag.go deleted file mode 100644 index 419a3895..00000000 --- a/v2/models/e_b_s_tag.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" -) - -// EBSTag A key - value pair tag that may be specified on AWS volumes. -// -// swagger:model EBSTag -type EBSTag struct { - - // key - Key string `json:"key,omitempty"` - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this e b s tag -func (m *EBSTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this e b s tag based on context it is used -func (m *EBSTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EBSTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EBSTag) UnmarshalBinary(b []byte) error { - var res EBSTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/e_s_config_for_indexing.go b/v2/models/e_s_config_for_indexing.go deleted file mode 100644 index b3c3fb1e..00000000 --- a/v2/models/e_s_config_for_indexing.go +++ /dev/null @@ -1,90 +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" -) - -// ESConfigForIndexing ESConfigForIndexing -// -// Elasticsearch config for indexing in AWS CE. -// -// swagger:model ESConfigForIndexing -type ESConfigForIndexing struct { - - // Fully qualified ES domain name. - // Required: true - EsDomain *string `json:"esDomain"` - - // IAM role ARN which has access to ES instance. - // Required: true - EsIamRoleArn *string `json:"esIamRoleArn"` -} - -// Validate validates this e s config for indexing -func (m *ESConfigForIndexing) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEsDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEsIamRoleArn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ESConfigForIndexing) validateEsDomain(formats strfmt.Registry) error { - - if err := validate.Required("esDomain", "body", m.EsDomain); err != nil { - return err - } - - return nil -} - -func (m *ESConfigForIndexing) validateEsIamRoleArn(formats strfmt.Registry) error { - - if err := validate.Required("esIamRoleArn", "body", m.EsIamRoleArn); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this e s config for indexing based on context it is used -func (m *ESConfigForIndexing) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ESConfigForIndexing) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ESConfigForIndexing) UnmarshalBinary(b []byte) error { - var res ESConfigForIndexing - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ebs_volume_exclusion_params.go b/v2/models/ebs_volume_exclusion_params.go deleted file mode 100644 index 6bc07028..00000000 --- a/v2/models/ebs_volume_exclusion_params.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EbsVolumeExclusionParams EBS Volume Exclusion Params. -// -// Specifies the parameters to exclude EBS volumes attached to EC2 instances at global and object level. A volume satisfying any of these criteria will be excluded. -// -// swagger:model EbsVolumeExclusionParams -type EbsVolumeExclusionParams struct { - - // Array of volume IDs that are to be excluded. This is only for object level exclusion. - VolumeIds []string `json:"volumeIds"` - - // Any volume larger than this size will be excluded. - MaxVolumeSizeBytes *int64 `json:"maxVolumeSizeBytes,omitempty"` - - // Array of volume types to exclude. Eg - gp2, gp3. - VolumeTypes []string `json:"volumeTypes"` - - // Array of device names to exclude. Eg - /dev/sda. - DeviceNames []string `json:"deviceNames"` - - // Array of TagParams objects. Each TagParams object consists of two vectors: for exclusion and inclusion. Each TagPararms object is present as an ORed item. User can only input queries of form: (<> AND <> AND <> ..) OR (<> AND <> AND <> ..) OR (..) OR (..) OR .. There cannot be an OR operator inside the bracket. Example query: (K1 = V1 AND K2 = V2 AND K3 != V3) OR (K4 = V4 AND K6 != V6). This will lead to formation of two items in tagParamsArray. First item: {exclusionTagArray: [(K1, V1), (K2, V2)], inclusionTagArray: [(K3, V3)]} Second item: {exclusionTagArray: [(K4, V4)], inclusionTagArray: [(K6, V6)]}. - TagParamsArray []*TagParams `json:"tagParamsArray"` - - // Raw boolean query given as input by the user to exclude volume based on tags. In the current version, the query contains only tags. Eg. query 1 - "K1" = "V1" AND "K2" IN ("V2", "V3") AND "K4" != "V4" Eg. query 2 - "K1" != "V1" OR "K2" NOT IN ("V2", "V3") OR "K4" = "V4" All Keys and Values must be wrapped inside double quotes. Comparision Operators supported - IN, NOT IN, =, !=. Logical Operators supported - AND, OR. We cannot have AND, OR together in the query. Only one of them is allowed. The processed form for this query is stored in the above tagParamsArray. - RawQuery *string `json:"rawQuery,omitempty"` -} - -// Validate validates this ebs volume exclusion params -func (m *EbsVolumeExclusionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagParamsArray(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EbsVolumeExclusionParams) validateTagParamsArray(formats strfmt.Registry) error { - if swag.IsZero(m.TagParamsArray) { // not required - return nil - } - - for i := 0; i < len(m.TagParamsArray); i++ { - if swag.IsZero(m.TagParamsArray[i]) { // not required - continue - } - - if m.TagParamsArray[i] != nil { - if err := m.TagParamsArray[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagParamsArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagParamsArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ebs volume exclusion params based on the context it is used -func (m *EbsVolumeExclusionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagParamsArray(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EbsVolumeExclusionParams) contextValidateTagParamsArray(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagParamsArray); i++ { - - if m.TagParamsArray[i] != nil { - - if swag.IsZero(m.TagParamsArray[i]) { // not required - return nil - } - - if err := m.TagParamsArray[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagParamsArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagParamsArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EbsVolumeExclusionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EbsVolumeExclusionParams) UnmarshalBinary(b []byte) error { - var res EbsVolumeExclusionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_object_protection_params.go b/v2/models/elastifile_object_protection_params.go deleted file mode 100644 index 0c9ae9c1..00000000 --- a/v2/models/elastifile_object_protection_params.go +++ /dev/null @@ -1,117 +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" -) - -// ElastifileObjectProtectionParams Specifies the parameters which are specific to Elastifile object protection. -// -// swagger:model ElastifileObjectProtectionParams -type ElastifileObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` -} - -// Validate validates this elastifile object protection params -func (m *ElastifileObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var elastifileObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - elastifileObjectProtectionParamsTypeProtocolPropEnum = append(elastifileObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // ElastifileObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - ElastifileObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // ElastifileObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - ElastifileObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // ElastifileObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - ElastifileObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // ElastifileObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - ElastifileObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // ElastifileObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - ElastifileObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // ElastifileObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - ElastifileObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *ElastifileObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, elastifileObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ElastifileObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this elastifile object protection params based on context it is used -func (m *ElastifileObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res ElastifileObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_object_protection_request_params.go b/v2/models/elastifile_object_protection_request_params.go deleted file mode 100644 index 8c503920..00000000 --- a/v2/models/elastifile_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ElastifileObjectProtectionRequestParams Specifies the parameters which are specific to Elastifile object protection. -// -// swagger:model ElastifileObjectProtectionRequestParams -type ElastifileObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - ElastifileObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ElastifileObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 ElastifileObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.ElastifileObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ElastifileObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.ElastifileObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this elastifile object protection request params -func (m *ElastifileObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this elastifile object protection request params based on the context it is used -func (m *ElastifileObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res ElastifileObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_object_protection_response_params.go b/v2/models/elastifile_object_protection_response_params.go deleted file mode 100644 index 3c8f7722..00000000 --- a/v2/models/elastifile_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// ElastifileObjectProtectionResponseParams Specifies the parameters which are specific to Elastifile object protection. -// -// swagger:model ElastifileObjectProtectionResponseParams -type ElastifileObjectProtectionResponseParams struct { - CommonNasProtectionParams - - ElastifileObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ElastifileObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 ElastifileObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ElastifileObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ElastifileObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ElastifileObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this elastifile object protection response params -func (m *ElastifileObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this elastifile object protection response params based on the context it is used -func (m *ElastifileObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res ElastifileObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_object_protection_update_request_params.go b/v2/models/elastifile_object_protection_update_request_params.go deleted file mode 100644 index 1adf8986..00000000 --- a/v2/models/elastifile_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// ElastifileObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Elastifile object protection. -// -// swagger:model ElastifileObjectProtectionUpdateRequestParams -type ElastifileObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - ElastifileObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ElastifileObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 ElastifileObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ElastifileObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ElastifileObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ElastifileObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this elastifile object protection update request params -func (m *ElastifileObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this elastifile object protection update request params based on the context it is used -func (m *ElastifileObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ElastifileObjectProtectionParams - if err := m.ElastifileObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res ElastifileObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_protection_group_object_params.go b/v2/models/elastifile_protection_group_object_params.go deleted file mode 100644 index a9ffc321..00000000 --- a/v2/models/elastifile_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// ElastifileProtectionGroupObjectParams Specifies an object protected by an Elastifile Protection Group. -// -// swagger:model ElastifileProtectionGroupObjectParams -type ElastifileProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this elastifile protection group object params -func (m *ElastifileProtectionGroupObjectParams) 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 *ElastifileProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this elastifile protection group object params based on the context it is used -func (m *ElastifileProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res ElastifileProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_protection_group_params.go b/v2/models/elastifile_protection_group_params.go deleted file mode 100644 index 07bf2cfd..00000000 --- a/v2/models/elastifile_protection_group_params.go +++ /dev/null @@ -1,551 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ElastifileProtectionGroupParams Specifies the parameters which are specific to Elastifile related Protection Groups. -// -// swagger:model ElastifileProtectionGroupParams -type ElastifileProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ElastifileProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies whether or not the Protection Group should continue regardless of whether or not an error was encountered. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the protection group should use encryption while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this elastifile protection group params -func (m *ElastifileProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var elastifileProtectionGroupParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - elastifileProtectionGroupParamsTypeProtocolPropEnum = append(elastifileProtectionGroupParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // ElastifileProtectionGroupParamsProtocolKNoProtocol captures enum value "kNoProtocol" - ElastifileProtectionGroupParamsProtocolKNoProtocol string = "kNoProtocol" - - // ElastifileProtectionGroupParamsProtocolKNfs3 captures enum value "kNfs3" - ElastifileProtectionGroupParamsProtocolKNfs3 string = "kNfs3" - - // ElastifileProtectionGroupParamsProtocolKNfs41 captures enum value "kNfs4_1" - ElastifileProtectionGroupParamsProtocolKNfs41 string = "kNfs4_1" - - // ElastifileProtectionGroupParamsProtocolKCifs1 captures enum value "kCifs1" - ElastifileProtectionGroupParamsProtocolKCifs1 string = "kCifs1" - - // ElastifileProtectionGroupParamsProtocolKCifs2 captures enum value "kCifs2" - ElastifileProtectionGroupParamsProtocolKCifs2 string = "kCifs2" - - // ElastifileProtectionGroupParamsProtocolKCifs3 captures enum value "kCifs3" - ElastifileProtectionGroupParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *ElastifileProtectionGroupParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, elastifileProtectionGroupParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ElastifileProtectionGroupParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this elastifile protection group params based on the context it is used -func (m *ElastifileProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *ElastifileProtectionGroupParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res ElastifileProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/elastifile_registration_params.go b/v2/models/elastifile_registration_params.go deleted file mode 100644 index 67bcdd8b..00000000 --- a/v2/models/elastifile_registration_params.go +++ /dev/null @@ -1,178 +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" -) - -// ElastifileRegistrationParams Elastifile Protection Source. -// -// Specifies parameters to register an Elastifile Source. -// -// swagger:model ElastifileRegistrationParams -type ElastifileRegistrationParams struct { - - // Specifies the Hostname or IP Address Endpoint for the Elastifile Source. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the credentials for an Elastifile Source. - // Required: true - Credentials *Credentials `json:"credentials"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this elastifile registration params -func (m *ElastifileRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -func (m *ElastifileRegistrationParams) validateCredentials(formats strfmt.Registry) error { - - if err := validate.Required("credentials", "body", m.Credentials); err != nil { - return err - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *ElastifileRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this elastifile registration params based on the context it is used -func (m *ElastifileRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ElastifileRegistrationParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *ElastifileRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ElastifileRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ElastifileRegistrationParams) UnmarshalBinary(b []byte) error { - var res ElastifileRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/email.go b/v2/models/email.go deleted file mode 100644 index 2a982e16..00000000 --- a/v2/models/email.go +++ /dev/null @@ -1,592 +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" -) - -// Email Email -// -// Specifies an email or an email folder. -// -// swagger:model Email -type Email struct { - - // Specifies the id of the email object. - ID *string `json:"id,omitempty"` - - // Specifies the User object info for which this email belongs to. - UserObjectInfo *ObjectSummary `json:"userObjectInfo,omitempty"` - - // Specify the name of the email folder. - FolderName *string `json:"folderName,omitempty"` - - // Specifies the id of parent folder the mailbox item. - ParentFolderID *int64 `json:"parentFolderId,omitempty"` - - // Specifies the path to this mailbox item. - Path *string `json:"path,omitempty"` - - // Specifies the directory path to this mailbox item. - DirectoryPath *string `json:"directoryPath,omitempty"` - - // Specifies the Mailbox item type. - // Enum: ["Email","Folder","Calendar","Contact","Task","Note"] - Type *string `json:"type,omitempty"` - - // Specifies the subject of this email. - EmailSubject *string `json:"emailSubject,omitempty"` - - // Specifies whether email has an attachment. - HasAttachment *bool `json:"hasAttachment,omitempty"` - - // Specifies the sender's email address. - SenderAddress *string `json:"senderAddress,omitempty"` - - // "Specifies the email addresses of all receipients of this email." - RecipientAddresses []string `json:"recipientAddresses"` - - // "Specifies the email addresses of all the CC receipients of this - // email." - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - // "Specifies the email addresses of all the BCC receipients of this - // email." - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // email is sent." - SentTimeSecs *int64 `json:"sentTimeSecs,omitempty"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // email is received." - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // item is created." - CreatedTimeSecs *int64 `json:"createdTimeSecs,omitempty"` - - // "Specifies the calendar item organizer's email address." - OrganizerAddress *string `json:"organizerAddress,omitempty"` - - // "Specifies the email addresses of all required attendees of this - // calendar item." - RequiredAttendeesAddresses []string `json:"requiredAttendeesAddresses"` - - // "Specifies the email addresses of all the optional attendees of - // this calendar item." - OptionalAttendeesAddresses []string `json:"optionalAttendeesAddresses"` - - // Specifies the contact's first name. - FirstName *string `json:"firstName,omitempty"` - - // Specifies the contact's last name. - LastName *string `json:"lastName,omitempty"` - - // Specifies the email addresses of a contact. - EmailAddresses []string `json:"emailAddresses"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // item was modified." - LastModificationTimeSecs *int64 `json:"lastModificationTimeSecs,omitempty"` - - // "Specifies the name of the person who modified this item." - LastModificationName *string `json:"lastModificationName,omitempty"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // task item is due." - TaskDueDateTimeSecs *int64 `json:"taskDueDateTimeSecs,omitempty"` - - // "Specifies the Unix timestamp epoch in seconds at which this - // task item was completed." - TaskCompletionDateTimeSecs *int64 `json:"taskCompletionDateTimeSecs,omitempty"` - - // Specifies the task item status type. - // Enum: ["NotStarted","InProgress","Completed","WaitingOnOthers","Deferred"] - TaskStatus *string `json:"taskStatus,omitempty"` - - // "Specifies the Protection Group id protecting the mailbox." - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // "Specifies the Protection Group name protecting the mailbox - // item." - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // "Specifies the Storage Domain id where the backup data of Object - // is present." - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // "Specify the tenant id to which this email belongs to." - TenantID *string `json:"tenantId,omitempty"` - - TagObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Email) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *string `json:"id,omitempty"` - - UserObjectInfo *ObjectSummary `json:"userObjectInfo,omitempty"` - - FolderName *string `json:"folderName,omitempty"` - - ParentFolderID *int64 `json:"parentFolderId,omitempty"` - - Path *string `json:"path,omitempty"` - - DirectoryPath *string `json:"directoryPath,omitempty"` - - Type *string `json:"type,omitempty"` - - EmailSubject *string `json:"emailSubject,omitempty"` - - HasAttachment *bool `json:"hasAttachment,omitempty"` - - SenderAddress *string `json:"senderAddress,omitempty"` - - RecipientAddresses []string `json:"recipientAddresses"` - - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - SentTimeSecs *int64 `json:"sentTimeSecs,omitempty"` - - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - CreatedTimeSecs *int64 `json:"createdTimeSecs,omitempty"` - - OrganizerAddress *string `json:"organizerAddress,omitempty"` - - RequiredAttendeesAddresses []string `json:"requiredAttendeesAddresses"` - - OptionalAttendeesAddresses []string `json:"optionalAttendeesAddresses"` - - FirstName *string `json:"firstName,omitempty"` - - LastName *string `json:"lastName,omitempty"` - - EmailAddresses []string `json:"emailAddresses"` - - LastModificationTimeSecs *int64 `json:"lastModificationTimeSecs,omitempty"` - - LastModificationName *string `json:"lastModificationName,omitempty"` - - TaskDueDateTimeSecs *int64 `json:"taskDueDateTimeSecs,omitempty"` - - TaskCompletionDateTimeSecs *int64 `json:"taskCompletionDateTimeSecs,omitempty"` - - TaskStatus *string `json:"taskStatus,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.UserObjectInfo = dataAO0.UserObjectInfo - - m.FolderName = dataAO0.FolderName - - m.ParentFolderID = dataAO0.ParentFolderID - - m.Path = dataAO0.Path - - m.DirectoryPath = dataAO0.DirectoryPath - - m.Type = dataAO0.Type - - m.EmailSubject = dataAO0.EmailSubject - - m.HasAttachment = dataAO0.HasAttachment - - m.SenderAddress = dataAO0.SenderAddress - - m.RecipientAddresses = dataAO0.RecipientAddresses - - m.CcRecipientAddresses = dataAO0.CcRecipientAddresses - - m.BccRecipientAddresses = dataAO0.BccRecipientAddresses - - m.SentTimeSecs = dataAO0.SentTimeSecs - - m.ReceivedTimeSecs = dataAO0.ReceivedTimeSecs - - m.CreatedTimeSecs = dataAO0.CreatedTimeSecs - - m.OrganizerAddress = dataAO0.OrganizerAddress - - m.RequiredAttendeesAddresses = dataAO0.RequiredAttendeesAddresses - - m.OptionalAttendeesAddresses = dataAO0.OptionalAttendeesAddresses - - m.FirstName = dataAO0.FirstName - - m.LastName = dataAO0.LastName - - m.EmailAddresses = dataAO0.EmailAddresses - - m.LastModificationTimeSecs = dataAO0.LastModificationTimeSecs - - m.LastModificationName = dataAO0.LastModificationName - - m.TaskDueDateTimeSecs = dataAO0.TaskDueDateTimeSecs - - m.TaskCompletionDateTimeSecs = dataAO0.TaskCompletionDateTimeSecs - - m.TaskStatus = dataAO0.TaskStatus - - m.ProtectionGroupID = dataAO0.ProtectionGroupID - - m.ProtectionGroupName = dataAO0.ProtectionGroupName - - m.StorageDomainID = dataAO0.StorageDomainID - - m.TenantID = dataAO0.TenantID - - // AO1 - var aO1 TagObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.TagObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Email) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *string `json:"id,omitempty"` - - UserObjectInfo *ObjectSummary `json:"userObjectInfo,omitempty"` - - FolderName *string `json:"folderName,omitempty"` - - ParentFolderID *int64 `json:"parentFolderId,omitempty"` - - Path *string `json:"path,omitempty"` - - DirectoryPath *string `json:"directoryPath,omitempty"` - - Type *string `json:"type,omitempty"` - - EmailSubject *string `json:"emailSubject,omitempty"` - - HasAttachment *bool `json:"hasAttachment,omitempty"` - - SenderAddress *string `json:"senderAddress,omitempty"` - - RecipientAddresses []string `json:"recipientAddresses"` - - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - SentTimeSecs *int64 `json:"sentTimeSecs,omitempty"` - - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - CreatedTimeSecs *int64 `json:"createdTimeSecs,omitempty"` - - OrganizerAddress *string `json:"organizerAddress,omitempty"` - - RequiredAttendeesAddresses []string `json:"requiredAttendeesAddresses"` - - OptionalAttendeesAddresses []string `json:"optionalAttendeesAddresses"` - - FirstName *string `json:"firstName,omitempty"` - - LastName *string `json:"lastName,omitempty"` - - EmailAddresses []string `json:"emailAddresses"` - - LastModificationTimeSecs *int64 `json:"lastModificationTimeSecs,omitempty"` - - LastModificationName *string `json:"lastModificationName,omitempty"` - - TaskDueDateTimeSecs *int64 `json:"taskDueDateTimeSecs,omitempty"` - - TaskCompletionDateTimeSecs *int64 `json:"taskCompletionDateTimeSecs,omitempty"` - - TaskStatus *string `json:"taskStatus,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - - dataAO0.ID = m.ID - - dataAO0.UserObjectInfo = m.UserObjectInfo - - dataAO0.FolderName = m.FolderName - - dataAO0.ParentFolderID = m.ParentFolderID - - dataAO0.Path = m.Path - - dataAO0.DirectoryPath = m.DirectoryPath - - dataAO0.Type = m.Type - - dataAO0.EmailSubject = m.EmailSubject - - dataAO0.HasAttachment = m.HasAttachment - - dataAO0.SenderAddress = m.SenderAddress - - dataAO0.RecipientAddresses = m.RecipientAddresses - - dataAO0.CcRecipientAddresses = m.CcRecipientAddresses - - dataAO0.BccRecipientAddresses = m.BccRecipientAddresses - - dataAO0.SentTimeSecs = m.SentTimeSecs - - dataAO0.ReceivedTimeSecs = m.ReceivedTimeSecs - - dataAO0.CreatedTimeSecs = m.CreatedTimeSecs - - dataAO0.OrganizerAddress = m.OrganizerAddress - - dataAO0.RequiredAttendeesAddresses = m.RequiredAttendeesAddresses - - dataAO0.OptionalAttendeesAddresses = m.OptionalAttendeesAddresses - - dataAO0.FirstName = m.FirstName - - dataAO0.LastName = m.LastName - - dataAO0.EmailAddresses = m.EmailAddresses - - dataAO0.LastModificationTimeSecs = m.LastModificationTimeSecs - - dataAO0.LastModificationName = m.LastModificationName - - dataAO0.TaskDueDateTimeSecs = m.TaskDueDateTimeSecs - - dataAO0.TaskCompletionDateTimeSecs = m.TaskCompletionDateTimeSecs - - dataAO0.TaskStatus = m.TaskStatus - - dataAO0.ProtectionGroupID = m.ProtectionGroupID - - dataAO0.ProtectionGroupName = m.ProtectionGroupName - - dataAO0.StorageDomainID = m.StorageDomainID - - dataAO0.TenantID = m.TenantID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.TagObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this email -func (m *Email) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserObjectInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskStatus(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Email) validateUserObjectInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.UserObjectInfo) { // not required - return nil - } - - if m.UserObjectInfo != nil { - if err := m.UserObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userObjectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userObjectInfo") - } - return err - } - } - - return nil -} - -var emailTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Email","Folder","Calendar","Contact","Task","Note"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - emailTypeTypePropEnum = append(emailTypeTypePropEnum, v) - } -} - -// property enum -func (m *Email) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, emailTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Email) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var emailTypeTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotStarted","InProgress","Completed","WaitingOnOthers","Deferred"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - emailTypeTaskStatusPropEnum = append(emailTypeTaskStatusPropEnum, v) - } -} - -// property enum -func (m *Email) validateTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, emailTypeTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Email) validateTaskStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.TaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateTaskStatusEnum("taskStatus", "body", *m.TaskStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this email based on the context it is used -func (m *Email) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserObjectInfo(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Email) contextValidateUserObjectInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.UserObjectInfo != nil { - - if swag.IsZero(m.UserObjectInfo) { // not required - return nil - } - - if err := m.UserObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userObjectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userObjectInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Email) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Email) UnmarshalBinary(b []byte) error { - var res Email - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/email_helios_search_params.go b/v2/models/email_helios_search_params.go deleted file mode 100644 index 5bdfae15..00000000 --- a/v2/models/email_helios_search_params.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EmailHeliosSearchParams Specifies the parameters which are specific for -// searching emails and email folders. -// -// swagger:model EmailHeliosSearchParams -type EmailHeliosSearchParams struct { - SearchEmailRequestParamsBase - - // Specifies the O365 specific params to search emails. - O365Params []*O365HeliosSearchEmailsRequestParams `json:"o365Params"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *EmailHeliosSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SearchEmailRequestParamsBase - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SearchEmailRequestParamsBase = aO0 - - // AO1 - var dataAO1 struct { - O365Params []*O365HeliosSearchEmailsRequestParams `json:"o365Params"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.O365Params = dataAO1.O365Params - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m EmailHeliosSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.SearchEmailRequestParamsBase) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - O365Params []*O365HeliosSearchEmailsRequestParams `json:"o365Params"` - } - - dataAO1.O365Params = m.O365Params - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this email helios search params -func (m *EmailHeliosSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchEmailRequestParamsBase - if err := m.SearchEmailRequestParamsBase.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EmailHeliosSearchParams) validateO365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - for i := 0; i < len(m.O365Params); i++ { - if swag.IsZero(m.O365Params[i]) { // not required - continue - } - - if m.O365Params[i] != nil { - if err := m.O365Params[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this email helios search params based on the context it is used -func (m *EmailHeliosSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchEmailRequestParamsBase - if err := m.SearchEmailRequestParamsBase.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EmailHeliosSearchParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.O365Params); i++ { - - if m.O365Params[i] != nil { - - if swag.IsZero(m.O365Params[i]) { // not required - return nil - } - - if err := m.O365Params[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EmailHeliosSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EmailHeliosSearchParams) UnmarshalBinary(b []byte) error { - var res EmailHeliosSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/emails.go b/v2/models/emails.go deleted file mode 100644 index ab73a4bd..00000000 --- a/v2/models/emails.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Emails Specifies the indexed emails and email folders. -// -// swagger:model Emails -type Emails []*Email - -// Validate validates this emails -func (m Emails) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this emails based on the context it is used -func (m Emails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/emblem_service_info.go b/v2/models/emblem_service_info.go deleted file mode 100644 index 34caf580..00000000 --- a/v2/models/emblem_service_info.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" -) - -// EmblemServiceInfo Emblem Service Info. -// -// swagger:model EmblemServiceInfo -type EmblemServiceInfo struct { - - // Address of the service to connect to. - EmblemHostAddress *string `json:"emblemHostAddress,omitempty"` - - // Port on which service is listening. - EmblemPort *int32 `json:"emblemPort,omitempty"` -} - -// Validate validates this emblem service info -func (m *EmblemServiceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this emblem service info based on context it is used -func (m *EmblemServiceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EmblemServiceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EmblemServiceInfo) UnmarshalBinary(b []byte) error { - var res EmblemServiceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/encryption_config.go b/v2/models/encryption_config.go deleted file mode 100644 index 9c6ced14..00000000 --- a/v2/models/encryption_config.go +++ /dev/null @@ -1,132 +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" -) - -// EncryptionConfig Encryption configuration. -// -// Specifies the encryption configuration. -// -// swagger:model EncryptionConfig -type EncryptionConfig struct { - - // Specifies whether to encrypt recovered volumes or not. Default value is true. - // Required: true - ShouldEncrypt *bool `json:"shouldEncrypt"` - - // Specifies custom KMS key arn. It will be of form arn:aws:kms:::key/ - CustomKmsKeyArn *string `json:"customKmsKeyArn,omitempty"` - - // Specifies AWS KMS key to use for encryption of restored volumes. This is only populated for selection from dropdown. - KmsKey *RecoveryObjectIdentifier `json:"kmsKey,omitempty"` -} - -// Validate validates this encryption config -func (m *EncryptionConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShouldEncrypt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKmsKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EncryptionConfig) validateShouldEncrypt(formats strfmt.Registry) error { - - if err := validate.Required("shouldEncrypt", "body", m.ShouldEncrypt); err != nil { - return err - } - - return nil -} - -func (m *EncryptionConfig) validateKmsKey(formats strfmt.Registry) error { - if swag.IsZero(m.KmsKey) { // not required - return nil - } - - if m.KmsKey != nil { - if err := m.KmsKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKey") - } - return err - } - } - - return nil -} - -// ContextValidate validate this encryption config based on the context it is used -func (m *EncryptionConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKmsKey(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EncryptionConfig) contextValidateKmsKey(ctx context.Context, formats strfmt.Registry) error { - - if m.KmsKey != nil { - - if swag.IsZero(m.KmsKey) { // not required - return nil - } - - if err := m.KmsKey.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmsKey") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmsKey") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EncryptionConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EncryptionConfig) UnmarshalBinary(b []byte) error { - var res EncryptionConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/encryption_settings.go b/v2/models/encryption_settings.go deleted file mode 100644 index 94b4dedd..00000000 --- a/v2/models/encryption_settings.go +++ /dev/null @@ -1,158 +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" -) - -// EncryptionSettings Specifis the encryption setting of the External Target -// -// swagger:model EncryptionSettings -type EncryptionSettings struct { - - // Specifies the type of encryption for the Setting. - // Required: true - // Enum: ["None","Weak","Strong"] - EncryptionLevel *string `json:"encryptionLevel"` - - // Specifies the Key Management Service Server ID for the Encryption Setting. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Enable Additional security by managing key manually - EnableAdditionalSecurity *bool `json:"enableAdditionalSecurity,omitempty"` - - // Specifies the time (in microseconds) when the encryption key file was downloaded from the Cohesity Dashboard (Cohesity UI). An encryption key can only be downloaded once using Cohesity Dashboard. Can be set only once when the key is downloaded. - // Read Only: true - KeyFileDownloadTimeUsecs *int64 `json:"keyFileDownloadTimeUsecs,omitempty"` - - // Specifies the user who downloaded the encryption key from the Cohesity Dashboard (Cohesity UI). This field is only populated if encryption is enabled for the Vault and customerManagingEncryptionKeys is true. Can be set only once when the key is downloaded. - // Read Only: true - KeyFileDownloadUser *string `json:"keyFileDownloadUser,omitempty"` - - // Specifies if the encryption key file has been downloaded using the Cohesity Dashboard (Cohesity UI). If true, the encryption key has been downloaded using the Cohesity Dashboard. An encryption key can only be downloaded once using the Cohesity Dashboard. After setting it to true once, subsequent updates to this field will be ignored. - EncryptionKeyFileDownloaded *bool `json:"encryptionKeyFileDownloaded,omitempty"` -} - -// Validate validates this encryption settings -func (m *EncryptionSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEncryptionLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var encryptionSettingsTypeEncryptionLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Weak","Strong"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - encryptionSettingsTypeEncryptionLevelPropEnum = append(encryptionSettingsTypeEncryptionLevelPropEnum, v) - } -} - -const ( - - // EncryptionSettingsEncryptionLevelNone captures enum value "None" - EncryptionSettingsEncryptionLevelNone string = "None" - - // EncryptionSettingsEncryptionLevelWeak captures enum value "Weak" - EncryptionSettingsEncryptionLevelWeak string = "Weak" - - // EncryptionSettingsEncryptionLevelStrong captures enum value "Strong" - EncryptionSettingsEncryptionLevelStrong string = "Strong" -) - -// prop value enum -func (m *EncryptionSettings) validateEncryptionLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, encryptionSettingsTypeEncryptionLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *EncryptionSettings) validateEncryptionLevel(formats strfmt.Registry) error { - - if err := validate.Required("encryptionLevel", "body", m.EncryptionLevel); err != nil { - return err - } - - // value enum - if err := m.validateEncryptionLevelEnum("encryptionLevel", "body", *m.EncryptionLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this encryption settings based on the context it is used -func (m *EncryptionSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeyFileDownloadTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeyFileDownloadUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EncryptionSettings) contextValidateKeyFileDownloadTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "keyFileDownloadTimeUsecs", "body", m.KeyFileDownloadTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *EncryptionSettings) contextValidateKeyFileDownloadUser(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "keyFileDownloadUser", "body", m.KeyFileDownloadUser); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EncryptionSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EncryptionSettings) UnmarshalBinary(b []byte) error { - var res EncryptionSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/end_point.go b/v2/models/end_point.go deleted file mode 100644 index d38aa6db..00000000 --- a/v2/models/end_point.go +++ /dev/null @@ -1,58 +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" -) - -// EndPoint Interface Information -// -// Specifies information about a node interface. -// -// swagger:model EndPoint -type EndPoint struct { - - // Index of the interface as given by 'ip a' command. - Index int32 `json:"index,omitempty"` - - // Name of the interface like bond0. - Name string `json:"name,omitempty"` - - // IP addresses on the interface - IPAddresses []string `json:"ipAddresses"` -} - -// Validate validates this end point -func (m *EndPoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this end point based on context it is used -func (m *EndPoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EndPoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EndPoint) UnmarshalBinary(b []byte) error { - var res EndPoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/endpoint_check_result.go b/v2/models/endpoint_check_result.go deleted file mode 100644 index f6b2fafd..00000000 --- a/v2/models/endpoint_check_result.go +++ /dev/null @@ -1,119 +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" -) - -// EndpointCheckResult Endpoint Check Result. -// -// Specify the connectivity check results on each endpoint. -// -// swagger:model EndpointCheckResult -type EndpointCheckResult struct { - - // Specifies the name of the check. - CheckName *string `json:"checkName,omitempty"` - - // Specifies the status of the check. - // Enum: ["kStateUnknown","kStateOk","kStateFail","kStateInProgress"] - Status *string `json:"status,omitempty"` - - // Specifies the error message to help troubleshoot. - ErrorMsg *string `json:"errorMsg,omitempty"` -} - -// Validate validates this endpoint check result -func (m *EndpointCheckResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var endpointCheckResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStateUnknown","kStateOk","kStateFail","kStateInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - endpointCheckResultTypeStatusPropEnum = append(endpointCheckResultTypeStatusPropEnum, v) - } -} - -const ( - - // EndpointCheckResultStatusKStateUnknown captures enum value "kStateUnknown" - EndpointCheckResultStatusKStateUnknown string = "kStateUnknown" - - // EndpointCheckResultStatusKStateOk captures enum value "kStateOk" - EndpointCheckResultStatusKStateOk string = "kStateOk" - - // EndpointCheckResultStatusKStateFail captures enum value "kStateFail" - EndpointCheckResultStatusKStateFail string = "kStateFail" - - // EndpointCheckResultStatusKStateInProgress captures enum value "kStateInProgress" - EndpointCheckResultStatusKStateInProgress string = "kStateInProgress" -) - -// prop value enum -func (m *EndpointCheckResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, endpointCheckResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *EndpointCheckResult) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this endpoint check result based on context it is used -func (m *EndpointCheckResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EndpointCheckResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EndpointCheckResult) UnmarshalBinary(b []byte) error { - var res EndpointCheckResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/endpoint_connection_state.go b/v2/models/endpoint_connection_state.go deleted file mode 100644 index f34c8f2c..00000000 --- a/v2/models/endpoint_connection_state.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EndpointConnectionState Endpoint Connection State. -// -// Specify the connection state to each endpoint. -// -// swagger:model EndpointConnectionState -type EndpointConnectionState struct { - - // Specifies the name of the endpoint - Name *string `json:"name,omitempty"` - - // Specifies the port of the endpoint - Port *string `json:"port,omitempty"` - - // Specifies the results of the endpoints. - Results []*EndpointCheckResult `json:"results"` -} - -// Validate validates this endpoint connection state -func (m *EndpointConnectionState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EndpointConnectionState) validateResults(formats strfmt.Registry) error { - if swag.IsZero(m.Results) { // not required - return nil - } - - for i := 0; i < len(m.Results); i++ { - if swag.IsZero(m.Results[i]) { // not required - continue - } - - if m.Results[i] != nil { - if err := m.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("results" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this endpoint connection state based on the context it is used -func (m *EndpointConnectionState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EndpointConnectionState) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Results); i++ { - - if m.Results[i] != nil { - - if swag.IsZero(m.Results[i]) { // not required - return nil - } - - if err := m.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("results" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EndpointConnectionState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EndpointConnectionState) UnmarshalBinary(b []byte) error { - var res EndpointConnectionState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/endpoint_only_registration_params.go b/v2/models/endpoint_only_registration_params.go deleted file mode 100644 index a64d6821..00000000 --- a/v2/models/endpoint_only_registration_params.go +++ /dev/null @@ -1,76 +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" -) - -// EndpointOnlyRegistrationParams Register source endpoint-only request parameters. -// -// Specifies an endpoint to register a source. -// -// swagger:model EndpointOnlyRegistrationParams -type EndpointOnlyRegistrationParams struct { - - // Specifies the endpoint IPaddress, URL or hostname of the host. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the description of the source being registered. - Description *string `json:"description,omitempty"` -} - -// Validate validates this endpoint only registration params -func (m *EndpointOnlyRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EndpointOnlyRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this endpoint only registration params based on context it is used -func (m *EndpointOnlyRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EndpointOnlyRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EndpointOnlyRegistrationParams) UnmarshalBinary(b []byte) error { - var res EndpointOnlyRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/entity_external_metadata.go b/v2/models/entity_external_metadata.go deleted file mode 100644 index dbf2f51e..00000000 --- a/v2/models/entity_external_metadata.go +++ /dev/null @@ -1,109 +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" -) - -// EntityExternalMetadata Specifies the External metadata of an entity -// -// swagger:model EntityExternalMetadata -type EntityExternalMetadata struct { - - // Specifies the entity metadata for maintenance mode. - MaintenanceModeConfig *MaintenanceModeConfig `json:"maintenanceModeConfig,omitempty"` -} - -// Validate validates this entity external metadata -func (m *EntityExternalMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaintenanceModeConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityExternalMetadata) validateMaintenanceModeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if m.MaintenanceModeConfig != nil { - if err := m.MaintenanceModeConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity external metadata based on the context it is used -func (m *EntityExternalMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMaintenanceModeConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityExternalMetadata) contextValidateMaintenanceModeConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceModeConfig != nil { - - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if err := m.MaintenanceModeConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityExternalMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityExternalMetadata) UnmarshalBinary(b []byte) error { - var res EntityExternalMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/entity_identifier.go b/v2/models/entity_identifier.go deleted file mode 100644 index 6a22f571..00000000 --- a/v2/models/entity_identifier.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" -) - -// EntityIdentifier Specifies the Identifier for an Entity. -// -// swagger:model EntityIdentifier -type EntityIdentifier struct { - - // Specifies the name of an Entity. - Name *string `json:"name,omitempty"` - - // Specifies the Id of an Entity. - EntityID *string `json:"entityId,omitempty"` -} - -// Validate validates this entity identifier -func (m *EntityIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this entity identifier based on context it is used -func (m *EntityIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EntityIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityIdentifier) UnmarshalBinary(b []byte) error { - var res EntityIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/entity_metadata_params.go b/v2/models/entity_metadata_params.go deleted file mode 100644 index 50890062..00000000 --- a/v2/models/entity_metadata_params.go +++ /dev/null @@ -1,229 +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" -) - -// EntityMetadataParams Specifies the parameters to associate metadata with entities in the entity hierarchy. -// -// swagger:model EntityMetadataParams -type EntityMetadataParams struct { - - // Specifies the entity id of the entity whose metadata is being updated. - // Required: true - EntityID *int64 `json:"entityId"` - - // Sepecifies the parameters if the entity is a aws type entity. - AwsParams *AwsEntityMetadata `json:"awsParams,omitempty"` - - // Specifies the parameters to be filled for maintenance mode. - MaintenanceModeConfig *MaintenanceModeConfig `json:"maintenanceModeConfig,omitempty"` - - // Specifies the parameters if the entity is a azure entity. - AzureParams *AzureEntityMetadata `json:"azureParams,omitempty"` -} - -// Validate validates this entity metadata params -func (m *EntityMetadataParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceModeConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityMetadataParams) validateEntityID(formats strfmt.Registry) error { - - if err := validate.Required("entityId", "body", m.EntityID); err != nil { - return err - } - - return nil -} - -func (m *EntityMetadataParams) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EntityMetadataParams) validateMaintenanceModeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if m.MaintenanceModeConfig != nil { - if err := m.MaintenanceModeConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *EntityMetadataParams) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this entity metadata params based on the context it is used -func (m *EntityMetadataParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceModeConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EntityMetadataParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EntityMetadataParams) contextValidateMaintenanceModeConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceModeConfig != nil { - - if swag.IsZero(m.MaintenanceModeConfig) { // not required - return nil - } - - if err := m.MaintenanceModeConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceModeConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceModeConfig") - } - return err - } - } - - return nil -} - -func (m *EntityMetadataParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EntityMetadataParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EntityMetadataParams) UnmarshalBinary(b []byte) error { - var res EntityMetadataParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/env_specific_object_protection_request_params.go b/v2/models/env_specific_object_protection_request_params.go deleted file mode 100644 index 2ec11ced..00000000 --- a/v2/models/env_specific_object_protection_request_params.go +++ /dev/null @@ -1,1066 +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" -) - -// EnvSpecificObjectProtectionRequestParams Specifies the parameters which are specific to adapter identified by environment. -// -// swagger:model EnvSpecificObjectProtectionRequestParams -type EnvSpecificObjectProtectionRequestParams struct { - CommonEnvSpecificObjectProtectionParams - - // Specifies the parameters which are specific to VMware related Object Backup. - VmwareParams *VmwareObjectProtectionRequestParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters which are specific to Generic Nas related Object Backup. - GenericNasParams *GenericNasObjectProtectionRequestParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to Gpfs related Object Backup. - GpfsParams *GpfsObjectProtectionRequestParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Object Backup. - ElastifileParams *ElastifileObjectProtectionRequestParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Netapp related Object Backup. - NetappParams *NetappObjectProtectionRequestParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Object Backup. - IsilonParams *IsilonObjectProtectionRequestParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Flashblade related Object Backup. - FlashbladeParams *FlashbladeObjectProtectionRequestParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to Mssql related Object Backup. - MssqlParams *MssqlObjectProtectionRequestParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Oracle related Object Backup. - OracleParams *OracleObjectProtectionRequestParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to Microsoft 365 related Object Backup. - Office365Params *Office365ObjectProtectionRequestParams `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to Aws related Object Backup. - AwsParams *AwsObjectProtectionRequestParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Object Backup. - HypervParams *HyperVObjectProtectionRequestParams `json:"hypervParams,omitempty"` - - // physical params - PhysicalParams *PhysicalObjectProtectionRequestParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Sfdc related Object Backup. - SfdcParams *SfdcObjectProtectionRequestParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter related Object Backup. - UdaParams *UdaObjectProtectionRequestParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Object Backup. - AzureParams *AzureObjectProtectionRequestParams `json:"azureParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *EnvSpecificObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonEnvSpecificObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonEnvSpecificObjectProtectionParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareObjectProtectionRequestParams `json:"vmwareParams,omitempty"` - - GenericNasParams *GenericNasObjectProtectionRequestParams `json:"genericNasParams,omitempty"` - - GpfsParams *GpfsObjectProtectionRequestParams `json:"gpfsParams,omitempty"` - - ElastifileParams *ElastifileObjectProtectionRequestParams `json:"elastifileParams,omitempty"` - - NetappParams *NetappObjectProtectionRequestParams `json:"netappParams,omitempty"` - - IsilonParams *IsilonObjectProtectionRequestParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeObjectProtectionRequestParams `json:"flashbladeParams,omitempty"` - - MssqlParams *MssqlObjectProtectionRequestParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleObjectProtectionRequestParams `json:"oracleParams,omitempty"` - - Office365Params *Office365ObjectProtectionRequestParams `json:"office365Params,omitempty"` - - AwsParams *AwsObjectProtectionRequestParams `json:"awsParams,omitempty"` - - HypervParams *HyperVObjectProtectionRequestParams `json:"hypervParams,omitempty"` - - PhysicalParams *PhysicalObjectProtectionRequestParams `json:"physicalParams,omitempty"` - - SfdcParams *SfdcObjectProtectionRequestParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaObjectProtectionRequestParams `json:"udaParams,omitempty"` - - AzureParams *AzureObjectProtectionRequestParams `json:"azureParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.GpfsParams = dataAO1.GpfsParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.NetappParams = dataAO1.NetappParams - - m.IsilonParams = dataAO1.IsilonParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.MssqlParams = dataAO1.MssqlParams - - m.OracleParams = dataAO1.OracleParams - - m.Office365Params = dataAO1.Office365Params - - m.AwsParams = dataAO1.AwsParams - - m.HypervParams = dataAO1.HypervParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.SfdcParams = dataAO1.SfdcParams - - m.UdaParams = dataAO1.UdaParams - - m.AzureParams = dataAO1.AzureParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m EnvSpecificObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonEnvSpecificObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareObjectProtectionRequestParams `json:"vmwareParams,omitempty"` - - GenericNasParams *GenericNasObjectProtectionRequestParams `json:"genericNasParams,omitempty"` - - GpfsParams *GpfsObjectProtectionRequestParams `json:"gpfsParams,omitempty"` - - ElastifileParams *ElastifileObjectProtectionRequestParams `json:"elastifileParams,omitempty"` - - NetappParams *NetappObjectProtectionRequestParams `json:"netappParams,omitempty"` - - IsilonParams *IsilonObjectProtectionRequestParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeObjectProtectionRequestParams `json:"flashbladeParams,omitempty"` - - MssqlParams *MssqlObjectProtectionRequestParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleObjectProtectionRequestParams `json:"oracleParams,omitempty"` - - Office365Params *Office365ObjectProtectionRequestParams `json:"office365Params,omitempty"` - - AwsParams *AwsObjectProtectionRequestParams `json:"awsParams,omitempty"` - - HypervParams *HyperVObjectProtectionRequestParams `json:"hypervParams,omitempty"` - - PhysicalParams *PhysicalObjectProtectionRequestParams `json:"physicalParams,omitempty"` - - SfdcParams *SfdcObjectProtectionRequestParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaObjectProtectionRequestParams `json:"udaParams,omitempty"` - - AzureParams *AzureObjectProtectionRequestParams `json:"azureParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.AwsParams = m.AwsParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.AzureParams = m.AzureParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this env specific object protection request params -func (m *EnvSpecificObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonEnvSpecificObjectProtectionParams - if err := m.CommonEnvSpecificObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this env specific object protection request params based on the context it is used -func (m *EnvSpecificObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonEnvSpecificObjectProtectionParams - if err := m.CommonEnvSpecificObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionRequestParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res EnvSpecificObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/env_specific_object_protection_response_params.go b/v2/models/env_specific_object_protection_response_params.go deleted file mode 100644 index c2844467..00000000 --- a/v2/models/env_specific_object_protection_response_params.go +++ /dev/null @@ -1,1067 +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" -) - -// EnvSpecificObjectProtectionResponseParams Specifies the parameters which are specific to adapter identified by enviournment. -// -// swagger:model EnvSpecificObjectProtectionResponseParams -type EnvSpecificObjectProtectionResponseParams struct { - - // Specifies the environment for current object. - // 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"` - - // Specifies the parameters which are specific to VMware related Object Backup. - VmwareParams *VmwareObjectProtectionResponseParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters which are specific to Generic Nas related Object Backup. - GenericNasParams *GenericNasObjectProtectionResponseParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to Gpfs related Object Backup. - GpfsParams *GpfsObjectProtectionResponseParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Object Backup. - ElastifileParams *ElastifileObjectProtectionResponseParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Netapp related Object Backup. - NetappParams *NetappObjectProtectionResponseParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Object Backup. - IsilonParams *IsilonObjectProtectionResponseParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Flashblade related Object Backup. - FlashbladeParams *FlashbladeObjectProtectionResponseParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to Mssql related Object Backup. - MssqlParams *MssqlObjectProtectionResponseParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Oracle related Object Backup. - OracleParams *OracleObjectProtectionResponseParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to Microsoft 365 related Object Backup. - Office365Params *Office365ObjectProtectionResponseParams `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to Aws related Object Backup. - AwsParams *AwsObjectProtectionResponseParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Object Backup. - HypervParams *HyperVObjectProtectionResponseParams `json:"hypervParams,omitempty"` - - // physical params - PhysicalParams *PhysicalObjectProtectionResponseParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Sfdc related Object Backup. - SfdcParams *SfdcObjectProtectionResponseParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter related Object Backup. - UdaParams *UdaObjectProtectionResponseParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Object Backup. - AzureParams *AzureObjectProtectionResponseParams `json:"azureParams,omitempty"` -} - -// Validate validates this env specific object protection response params -func (m *EnvSpecificObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var envSpecificObjectProtectionResponseParamsTypeEnvironmentPropEnum []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 { - envSpecificObjectProtectionResponseParamsTypeEnvironmentPropEnum = append(envSpecificObjectProtectionResponseParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKVMware captures enum value "kVMware" - EnvSpecificObjectProtectionResponseParamsEnvironmentKVMware string = "kVMware" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKHyperV captures enum value "kHyperV" - EnvSpecificObjectProtectionResponseParamsEnvironmentKHyperV string = "kHyperV" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKVCD captures enum value "kVCD" - EnvSpecificObjectProtectionResponseParamsEnvironmentKVCD string = "kVCD" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAzure captures enum value "kAzure" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAzure string = "kAzure" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKGCP captures enum value "kGCP" - EnvSpecificObjectProtectionResponseParamsEnvironmentKGCP string = "kGCP" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKKVM captures enum value "kKVM" - EnvSpecificObjectProtectionResponseParamsEnvironmentKKVM string = "kKVM" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAcropolis captures enum value "kAcropolis" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAcropolis string = "kAcropolis" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAWS captures enum value "kAWS" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAWS string = "kAWS" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAWSNative captures enum value "kAWSNative" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAWSNative string = "kAWSNative" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAwsS3 captures enum value "kAwsS3" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAwsS3 string = "kAwsS3" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - EnvSpecificObjectProtectionResponseParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureNative captures enum value "kAzureNative" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureNative string = "kAzureNative" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureSQL string = "kAzureSQL" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKPhysical captures enum value "kPhysical" - EnvSpecificObjectProtectionResponseParamsEnvironmentKPhysical string = "kPhysical" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - EnvSpecificObjectProtectionResponseParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKGPFS captures enum value "kGPFS" - EnvSpecificObjectProtectionResponseParamsEnvironmentKGPFS string = "kGPFS" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKElastifile captures enum value "kElastifile" - EnvSpecificObjectProtectionResponseParamsEnvironmentKElastifile string = "kElastifile" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKNetapp captures enum value "kNetapp" - EnvSpecificObjectProtectionResponseParamsEnvironmentKNetapp string = "kNetapp" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKGenericNas captures enum value "kGenericNas" - EnvSpecificObjectProtectionResponseParamsEnvironmentKGenericNas string = "kGenericNas" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKIsilon captures enum value "kIsilon" - EnvSpecificObjectProtectionResponseParamsEnvironmentKIsilon string = "kIsilon" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - EnvSpecificObjectProtectionResponseParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKPure captures enum value "kPure" - EnvSpecificObjectProtectionResponseParamsEnvironmentKPure string = "kPure" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - EnvSpecificObjectProtectionResponseParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKSQL captures enum value "kSQL" - EnvSpecificObjectProtectionResponseParamsEnvironmentKSQL string = "kSQL" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKExchange captures enum value "kExchange" - EnvSpecificObjectProtectionResponseParamsEnvironmentKExchange string = "kExchange" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKAD captures enum value "kAD" - EnvSpecificObjectProtectionResponseParamsEnvironmentKAD string = "kAD" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKOracle captures enum value "kOracle" - EnvSpecificObjectProtectionResponseParamsEnvironmentKOracle string = "kOracle" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKView captures enum value "kView" - EnvSpecificObjectProtectionResponseParamsEnvironmentKView string = "kView" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - EnvSpecificObjectProtectionResponseParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365 captures enum value "kO365" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365 string = "kO365" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Teams captures enum value "kO365Teams" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Teams string = "kO365Teams" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Group captures enum value "kO365Group" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Group string = "kO365Group" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Exchange string = "kO365Exchange" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - EnvSpecificObjectProtectionResponseParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKKubernetes captures enum value "kKubernetes" - EnvSpecificObjectProtectionResponseParamsEnvironmentKKubernetes string = "kKubernetes" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKCassandra captures enum value "kCassandra" - EnvSpecificObjectProtectionResponseParamsEnvironmentKCassandra string = "kCassandra" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKMongoDB captures enum value "kMongoDB" - EnvSpecificObjectProtectionResponseParamsEnvironmentKMongoDB string = "kMongoDB" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKCouchbase captures enum value "kCouchbase" - EnvSpecificObjectProtectionResponseParamsEnvironmentKCouchbase string = "kCouchbase" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKHdfs captures enum value "kHdfs" - EnvSpecificObjectProtectionResponseParamsEnvironmentKHdfs string = "kHdfs" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKHive captures enum value "kHive" - EnvSpecificObjectProtectionResponseParamsEnvironmentKHive string = "kHive" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKHBase captures enum value "kHBase" - EnvSpecificObjectProtectionResponseParamsEnvironmentKHBase string = "kHBase" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKUDA captures enum value "kUDA" - EnvSpecificObjectProtectionResponseParamsEnvironmentKUDA string = "kUDA" - - // EnvSpecificObjectProtectionResponseParamsEnvironmentKSfdc captures enum value "kSfdc" - EnvSpecificObjectProtectionResponseParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *EnvSpecificObjectProtectionResponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, envSpecificObjectProtectionResponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) 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 -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateGenericNasParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateGpfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateElastifileParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateNetappParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateFlashbladeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateMssqlParams(formats strfmt.Registry) error { - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateOffice365Params(formats strfmt.Registry) error { - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this env specific object protection response params based on the context it is used -func (m *EnvSpecificObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionResponseParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res EnvSpecificObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/env_specific_object_protection_update_request_params.go b/v2/models/env_specific_object_protection_update_request_params.go deleted file mode 100644 index bf698114..00000000 --- a/v2/models/env_specific_object_protection_update_request_params.go +++ /dev/null @@ -1,1067 +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" -) - -// EnvSpecificObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to adapter identified by enviournment. -// -// swagger:model EnvSpecificObjectProtectionUpdateRequestParams -type EnvSpecificObjectProtectionUpdateRequestParams struct { - - // Specifies the environment for current object. - // 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"` - - // Specifies the parameters which are specific to VMware related Object Backup. - VmwareParams *VmwareObjectProtectionUpdateRequestParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters which are specific to Generic Nas related Object Backup. - GenericNasParams *GenericNasObjectProtectionUpdateRequestParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to Gpfs related Object Backup. - GpfsParams *GpfsObjectProtectionUpdateRequestParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Object Backup. - ElastifileParams *ElastifileObjectProtectionUpdateRequestParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Netapp related Object Backup. - NetappParams *NetappObjectProtectionUpdateRequestParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Object Backup. - IsilonParams *IsilonObjectProtectionUpdateRequestParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Flashblade related Object Backup. - FlashbladeParams *FlashbladeObjectProtectionUpdateRequestParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to Mssql related Object Backup. - MssqlParams *MssqlObjectProtectionUpdateRequestParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Oracle related Object Backup. - OracleParams *OracleObjectProtectionUpdateRequestParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to Microsoft 365 related Object Backup. - Office365Params *Office365ObjectProtectionUpdateRequestParams `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to Aws related Object Backup. - AwsParams *AwsObjectProtectionUpdateRequestParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Object Backup. - HypervParams *HyperVObjectProtectionUpdateRequestParams `json:"hypervParams,omitempty"` - - // physical params - PhysicalParams *PhysicalObjectProtectionUpdateRequestParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Sfdc related Object Backup. - SfdcParams *SfdcObjectProtectionUpdateRequestParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter related Object Backup. - UdaParams *UdaObjectProtectionUpdateRequestParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Object Backup. - AzureParams *AzureObjectProtectionUpdateRequestParams `json:"azureParams,omitempty"` -} - -// Validate validates this env specific object protection update request params -func (m *EnvSpecificObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var envSpecificObjectProtectionUpdateRequestParamsTypeEnvironmentPropEnum []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 { - envSpecificObjectProtectionUpdateRequestParamsTypeEnvironmentPropEnum = append(envSpecificObjectProtectionUpdateRequestParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKVMware captures enum value "kVMware" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKVMware string = "kVMware" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHyperV captures enum value "kHyperV" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHyperV string = "kHyperV" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKVCD captures enum value "kVCD" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKVCD string = "kVCD" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzure captures enum value "kAzure" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzure string = "kAzure" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGCP captures enum value "kGCP" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGCP string = "kGCP" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKKVM captures enum value "kKVM" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKKVM string = "kKVM" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAcropolis captures enum value "kAcropolis" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAcropolis string = "kAcropolis" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWS captures enum value "kAWS" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWS string = "kAWS" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWSNative captures enum value "kAWSNative" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWSNative string = "kAWSNative" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAwsS3 captures enum value "kAwsS3" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAwsS3 string = "kAwsS3" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureNative captures enum value "kAzureNative" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureNative string = "kAzureNative" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureSQL string = "kAzureSQL" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPhysical captures enum value "kPhysical" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPhysical string = "kPhysical" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGPFS captures enum value "kGPFS" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGPFS string = "kGPFS" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKElastifile captures enum value "kElastifile" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKElastifile string = "kElastifile" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKNetapp captures enum value "kNetapp" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKNetapp string = "kNetapp" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGenericNas captures enum value "kGenericNas" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKGenericNas string = "kGenericNas" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKIsilon captures enum value "kIsilon" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKIsilon string = "kIsilon" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPure captures enum value "kPure" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKPure string = "kPure" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKSQL captures enum value "kSQL" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKSQL string = "kSQL" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKExchange captures enum value "kExchange" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKExchange string = "kExchange" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAD captures enum value "kAD" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKAD string = "kAD" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKOracle captures enum value "kOracle" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKOracle string = "kOracle" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKView captures enum value "kView" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKView string = "kView" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365 captures enum value "kO365" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365 string = "kO365" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Teams captures enum value "kO365Teams" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Teams string = "kO365Teams" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Group captures enum value "kO365Group" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Group string = "kO365Group" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Exchange string = "kO365Exchange" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365OneDrive string = "kO365OneDrive" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKKubernetes captures enum value "kKubernetes" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKKubernetes string = "kKubernetes" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKCassandra captures enum value "kCassandra" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKCassandra string = "kCassandra" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKMongoDB captures enum value "kMongoDB" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKMongoDB string = "kMongoDB" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKCouchbase captures enum value "kCouchbase" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKCouchbase string = "kCouchbase" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHdfs captures enum value "kHdfs" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHdfs string = "kHdfs" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHive captures enum value "kHive" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHive string = "kHive" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHBase captures enum value "kHBase" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKHBase string = "kHBase" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKUDA captures enum value "kUDA" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKUDA string = "kUDA" - - // EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKSfdc captures enum value "kSfdc" - EnvSpecificObjectProtectionUpdateRequestParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, envSpecificObjectProtectionUpdateRequestParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) 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 -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateGenericNasParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateGpfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateElastifileParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateNetappParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateFlashbladeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateMssqlParams(formats strfmt.Registry) error { - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateOracleParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateOffice365Params(formats strfmt.Registry) error { - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateUdaParams(formats strfmt.Registry) error { - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this env specific object protection update request params based on the context it is used -func (m *EnvSpecificObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *EnvSpecificObjectProtectionUpdateRequestParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EnvSpecificObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res EnvSpecificObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/environment.go b/v2/models/environment.go deleted file mode 100644 index 37258883..00000000 --- a/v2/models/environment.go +++ /dev/null @@ -1,251 +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" -) - -// Environment Environment type. -// -// Environment type. -// -// swagger:model Environment -type Environment struct { - - // Specifies Environment type. - // Enum: ["kVMware","kHyperV","kVCD","kSQL","kView","kRemoteAdapter","kPhysical","kPure","kIbmFlashSystem","kAzure","kNetapp","kGenericNas","kAcropolis","kIsilon","kKVM","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kExchange","kOracle","kGCP","kFlashBlade","kO365","kHyperFlex","kAD","kGPFS","kKubernetes","kNimble","kElastifile","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kO365Sharepoint","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kSfdc"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this environment -func (m *Environment) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var environmentTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kVCD","kSQL","kView","kRemoteAdapter","kPhysical","kPure","kIbmFlashSystem","kAzure","kNetapp","kGenericNas","kAcropolis","kIsilon","kKVM","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kExchange","kOracle","kGCP","kFlashBlade","kO365","kHyperFlex","kAD","kGPFS","kKubernetes","kNimble","kElastifile","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kO365Sharepoint","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - environmentTypeEnvironmentPropEnum = append(environmentTypeEnvironmentPropEnum, v) - } -} - -const ( - - // EnvironmentEnvironmentKVMware captures enum value "kVMware" - EnvironmentEnvironmentKVMware string = "kVMware" - - // EnvironmentEnvironmentKHyperV captures enum value "kHyperV" - EnvironmentEnvironmentKHyperV string = "kHyperV" - - // EnvironmentEnvironmentKVCD captures enum value "kVCD" - EnvironmentEnvironmentKVCD string = "kVCD" - - // EnvironmentEnvironmentKSQL captures enum value "kSQL" - EnvironmentEnvironmentKSQL string = "kSQL" - - // EnvironmentEnvironmentKView captures enum value "kView" - EnvironmentEnvironmentKView string = "kView" - - // EnvironmentEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - EnvironmentEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // EnvironmentEnvironmentKPhysical captures enum value "kPhysical" - EnvironmentEnvironmentKPhysical string = "kPhysical" - - // EnvironmentEnvironmentKPure captures enum value "kPure" - EnvironmentEnvironmentKPure string = "kPure" - - // EnvironmentEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - EnvironmentEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // EnvironmentEnvironmentKAzure captures enum value "kAzure" - EnvironmentEnvironmentKAzure string = "kAzure" - - // EnvironmentEnvironmentKNetapp captures enum value "kNetapp" - EnvironmentEnvironmentKNetapp string = "kNetapp" - - // EnvironmentEnvironmentKGenericNas captures enum value "kGenericNas" - EnvironmentEnvironmentKGenericNas string = "kGenericNas" - - // EnvironmentEnvironmentKAcropolis captures enum value "kAcropolis" - EnvironmentEnvironmentKAcropolis string = "kAcropolis" - - // EnvironmentEnvironmentKIsilon captures enum value "kIsilon" - EnvironmentEnvironmentKIsilon string = "kIsilon" - - // EnvironmentEnvironmentKKVM captures enum value "kKVM" - EnvironmentEnvironmentKKVM string = "kKVM" - - // EnvironmentEnvironmentKAWS captures enum value "kAWS" - EnvironmentEnvironmentKAWS string = "kAWS" - - // EnvironmentEnvironmentKAWSNative captures enum value "kAWSNative" - EnvironmentEnvironmentKAWSNative string = "kAWSNative" - - // EnvironmentEnvironmentKAwsS3 captures enum value "kAwsS3" - EnvironmentEnvironmentKAwsS3 string = "kAwsS3" - - // EnvironmentEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - EnvironmentEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // EnvironmentEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - EnvironmentEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // EnvironmentEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - EnvironmentEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // EnvironmentEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - EnvironmentEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // EnvironmentEnvironmentKAzureNative captures enum value "kAzureNative" - EnvironmentEnvironmentKAzureNative string = "kAzureNative" - - // EnvironmentEnvironmentKAzureSQL captures enum value "kAzureSQL" - EnvironmentEnvironmentKAzureSQL string = "kAzureSQL" - - // EnvironmentEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - EnvironmentEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // EnvironmentEnvironmentKExchange captures enum value "kExchange" - EnvironmentEnvironmentKExchange string = "kExchange" - - // EnvironmentEnvironmentKOracle captures enum value "kOracle" - EnvironmentEnvironmentKOracle string = "kOracle" - - // EnvironmentEnvironmentKGCP captures enum value "kGCP" - EnvironmentEnvironmentKGCP string = "kGCP" - - // EnvironmentEnvironmentKFlashBlade captures enum value "kFlashBlade" - EnvironmentEnvironmentKFlashBlade string = "kFlashBlade" - - // EnvironmentEnvironmentKO365 captures enum value "kO365" - EnvironmentEnvironmentKO365 string = "kO365" - - // EnvironmentEnvironmentKHyperFlex captures enum value "kHyperFlex" - EnvironmentEnvironmentKHyperFlex string = "kHyperFlex" - - // EnvironmentEnvironmentKAD captures enum value "kAD" - EnvironmentEnvironmentKAD string = "kAD" - - // EnvironmentEnvironmentKGPFS captures enum value "kGPFS" - EnvironmentEnvironmentKGPFS string = "kGPFS" - - // EnvironmentEnvironmentKKubernetes captures enum value "kKubernetes" - EnvironmentEnvironmentKKubernetes string = "kKubernetes" - - // EnvironmentEnvironmentKNimble captures enum value "kNimble" - EnvironmentEnvironmentKNimble string = "kNimble" - - // EnvironmentEnvironmentKElastifile captures enum value "kElastifile" - EnvironmentEnvironmentKElastifile string = "kElastifile" - - // EnvironmentEnvironmentKCassandra captures enum value "kCassandra" - EnvironmentEnvironmentKCassandra string = "kCassandra" - - // EnvironmentEnvironmentKMongoDB captures enum value "kMongoDB" - EnvironmentEnvironmentKMongoDB string = "kMongoDB" - - // EnvironmentEnvironmentKCouchbase captures enum value "kCouchbase" - EnvironmentEnvironmentKCouchbase string = "kCouchbase" - - // EnvironmentEnvironmentKHdfs captures enum value "kHdfs" - EnvironmentEnvironmentKHdfs string = "kHdfs" - - // EnvironmentEnvironmentKHive captures enum value "kHive" - EnvironmentEnvironmentKHive string = "kHive" - - // EnvironmentEnvironmentKHBase captures enum value "kHBase" - EnvironmentEnvironmentKHBase string = "kHBase" - - // EnvironmentEnvironmentKUDA captures enum value "kUDA" - EnvironmentEnvironmentKUDA string = "kUDA" - - // EnvironmentEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - EnvironmentEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // EnvironmentEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - EnvironmentEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // EnvironmentEnvironmentKO365Teams captures enum value "kO365Teams" - EnvironmentEnvironmentKO365Teams string = "kO365Teams" - - // EnvironmentEnvironmentKO365Group captures enum value "kO365Group" - EnvironmentEnvironmentKO365Group string = "kO365Group" - - // EnvironmentEnvironmentKO365Exchange captures enum value "kO365Exchange" - EnvironmentEnvironmentKO365Exchange string = "kO365Exchange" - - // EnvironmentEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - EnvironmentEnvironmentKO365OneDrive string = "kO365OneDrive" - - // EnvironmentEnvironmentKSfdc captures enum value "kSfdc" - EnvironmentEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *Environment) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, environmentTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Environment) 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 validates this environment based on context it is used -func (m *Environment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Environment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Environment) UnmarshalBinary(b []byte) error { - var res Environment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/erasure_coding_params.go b/v2/models/erasure_coding_params.go deleted file mode 100644 index 6fc02724..00000000 --- a/v2/models/erasure_coding_params.go +++ /dev/null @@ -1,113 +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" -) - -// ErasureCodingParams Erasure Coding Parameters -// -// Specifies parameters for erasure coding. -// -// swagger:model ErasureCodingParams -type ErasureCodingParams struct { - - // Specifies whether to enable erasure coding on a Storage Domain. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the number of data stripes. - // Required: true - NumDataStripes *int32 `json:"numDataStripes"` - - // Specifies the number of coded stripes. - // Required: true - NumCodedStripes *int32 `json:"numCodedStripes"` - - // Specifies whether inline erasure coding is enabled. This field is appliciable only if enabled is set to true. - InlineEnabled *bool `json:"inlineEnabled,omitempty"` - - // Specifies the time in seconds when erasure coding starts. - DelaySecs *int32 `json:"delaySecs,omitempty"` -} - -// Validate validates this erasure coding params -func (m *ErasureCodingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNumDataStripes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNumCodedStripes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ErasureCodingParams) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *ErasureCodingParams) validateNumDataStripes(formats strfmt.Registry) error { - - if err := validate.Required("numDataStripes", "body", m.NumDataStripes); err != nil { - return err - } - - return nil -} - -func (m *ErasureCodingParams) validateNumCodedStripes(formats strfmt.Registry) error { - - if err := validate.Required("numCodedStripes", "body", m.NumCodedStripes); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this erasure coding params based on context it is used -func (m *ErasureCodingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErasureCodingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErasureCodingParams) UnmarshalBinary(b []byte) error { - var res ErasureCodingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/error.go b/v2/models/error.go deleted file mode 100644 index feb27179..00000000 --- a/v2/models/error.go +++ /dev/null @@ -1,58 +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" -) - -// Error Error. -// -// Specifies the error object with error code and a message. -// -// swagger:model Error -type Error struct { - - // Specifies the error code. - ErrorCode *string `json:"errorCode,omitempty"` - - // Specifies the error message. - Message *string `json:"message,omitempty"` - - // Specifies the TaskLogId of the failed task. - TaskLogID *string `json:"taskLogId,omitempty"` -} - -// Validate validates this error -func (m *Error) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this error based on context it is used -func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Error) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Error) UnmarshalBinary(b []byte) error { - var res Error - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/error_class.go b/v2/models/error_class.go deleted file mode 100644 index 42e635cc..00000000 --- a/v2/models/error_class.go +++ /dev/null @@ -1,120 +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" -) - -// ErrorClass Specifies a class of error with name and count of that class. -// -// swagger:model ErrorClass -type ErrorClass struct { - - // class name - // Enum: ["File","Folder","Persistent","Intermittent","Discovery","Ingestion"] - ClassName string `json:"className,omitempty"` - - // count - Count *int64 `json:"count,omitempty"` -} - -// Validate validates this error class -func (m *ErrorClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClassName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var errorClassTypeClassNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Folder","Persistent","Intermittent","Discovery","Ingestion"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - errorClassTypeClassNamePropEnum = append(errorClassTypeClassNamePropEnum, v) - } -} - -const ( - - // ErrorClassClassNameFile captures enum value "File" - ErrorClassClassNameFile string = "File" - - // ErrorClassClassNameFolder captures enum value "Folder" - ErrorClassClassNameFolder string = "Folder" - - // ErrorClassClassNamePersistent captures enum value "Persistent" - ErrorClassClassNamePersistent string = "Persistent" - - // ErrorClassClassNameIntermittent captures enum value "Intermittent" - ErrorClassClassNameIntermittent string = "Intermittent" - - // ErrorClassClassNameDiscovery captures enum value "Discovery" - ErrorClassClassNameDiscovery string = "Discovery" - - // ErrorClassClassNameIngestion captures enum value "Ingestion" - ErrorClassClassNameIngestion string = "Ingestion" -) - -// prop value enum -func (m *ErrorClass) validateClassNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, errorClassTypeClassNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ErrorClass) validateClassName(formats strfmt.Registry) error { - if swag.IsZero(m.ClassName) { // not required - return nil - } - - // value enum - if err := m.validateClassNameEnum("className", "body", m.ClassName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this error class based on context it is used -func (m *ErrorClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErrorClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErrorClass) UnmarshalBinary(b []byte) error { - var res ErrorClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/error_type.go b/v2/models/error_type.go deleted file mode 100644 index 2d15b577..00000000 --- a/v2/models/error_type.go +++ /dev/null @@ -1,110 +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" -) - -// ErrorType Error Type. -// -// Specifies type of error for faulty dbs. -// -// swagger:model ErrorType -type ErrorType struct { - - // Specifies type of error for faulty dbs. - // Enum: ["kError","kWarn","kIgnore"] - ErrorType string `json:"errorType,omitempty"` -} - -// Validate validates this error type -func (m *ErrorType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateErrorType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var errorTypeTypeErrorTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kError","kWarn","kIgnore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - errorTypeTypeErrorTypePropEnum = append(errorTypeTypeErrorTypePropEnum, v) - } -} - -const ( - - // ErrorTypeErrorTypeKError captures enum value "kError" - ErrorTypeErrorTypeKError string = "kError" - - // ErrorTypeErrorTypeKWarn captures enum value "kWarn" - ErrorTypeErrorTypeKWarn string = "kWarn" - - // ErrorTypeErrorTypeKIgnore captures enum value "kIgnore" - ErrorTypeErrorTypeKIgnore string = "kIgnore" -) - -// prop value enum -func (m *ErrorType) validateErrorTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, errorTypeTypeErrorTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ErrorType) validateErrorType(formats strfmt.Registry) error { - if swag.IsZero(m.ErrorType) { // not required - return nil - } - - // value enum - if err := m.validateErrorTypeEnum("errorType", "body", m.ErrorType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this error type based on context it is used -func (m *ErrorType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErrorType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErrorType) UnmarshalBinary(b []byte) error { - var res ErrorType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/esxi_registration_params.go b/v2/models/esxi_registration_params.go deleted file mode 100644 index bf340599..00000000 --- a/v2/models/esxi_registration_params.go +++ /dev/null @@ -1,213 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EsxiRegistrationParams Register VMware ESXi host request parameters. -// -// Specifies parameters to register VMware ESXi host. -// -// swagger:model EsxiRegistrationParams -type EsxiRegistrationParams struct { - CommonSourceRegistrationParams - - // Specifies the minimum free space (in GB) expected to be available in the datastore where the virtual disks of the VM being backed up reside. If the space available is lower than the specified value, backup will be aborted. - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - // Specifies the minimum free space (in percentage) expected to be available in the datastore where the virtual disks of the VM being backed up reside. If the space available is lower than the specified value, backup will be aborted. - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - // If this value is > 0 and the number of streams concurrently active on a datastore is equal to it, then any further requests to access the datastore would be denied until the number of active streams reduces. This applies for all the datastores in the specified host. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - // Specifies the datastore specific params. - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *EsxiRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.MinFreeDatastoreSpaceForBackupGb = dataAO1.MinFreeDatastoreSpaceForBackupGb - - m.MinFreeDatastoreSpaceForBackupPercentage = dataAO1.MinFreeDatastoreSpaceForBackupPercentage - - m.MaxConcurrentStreams = dataAO1.MaxConcurrentStreams - - m.DataStoreParams = dataAO1.DataStoreParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m EsxiRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` - } - - dataAO1.MinFreeDatastoreSpaceForBackupGb = m.MinFreeDatastoreSpaceForBackupGb - - dataAO1.MinFreeDatastoreSpaceForBackupPercentage = m.MinFreeDatastoreSpaceForBackupPercentage - - dataAO1.MaxConcurrentStreams = m.MaxConcurrentStreams - - dataAO1.DataStoreParams = m.DataStoreParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this esxi registration params -func (m *EsxiRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataStoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EsxiRegistrationParams) validateDataStoreParams(formats strfmt.Registry) error { - - if swag.IsZero(m.DataStoreParams) { // not required - return nil - } - - for i := 0; i < len(m.DataStoreParams); i++ { - if swag.IsZero(m.DataStoreParams[i]) { // not required - continue - } - - if m.DataStoreParams[i] != nil { - if err := m.DataStoreParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this esxi registration params based on the context it is used -func (m *EsxiRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataStoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EsxiRegistrationParams) contextValidateDataStoreParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataStoreParams); i++ { - - if m.DataStoreParams[i] != nil { - - if swag.IsZero(m.DataStoreParams[i]) { // not required - return nil - } - - if err := m.DataStoreParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EsxiRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EsxiRegistrationParams) UnmarshalBinary(b []byte) error { - var res EsxiRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_app_params.go b/v2/models/exchange_app_params.go deleted file mode 100644 index b8d1df03..00000000 --- a/v2/models/exchange_app_params.go +++ /dev/null @@ -1,76 +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" -) - -// ExchangeAppParams Exchange App Parameters. -// -// Specifies the Exchange special parameters for the Protection Group. -// -// swagger:model ExchangeAppParams -type ExchangeAppParams struct { - - // Specifies the application id of the Exchange database which has to be protected. - AppID *int64 `json:"appId,omitempty"` - - // Specifies the application name of the Exchange database which has to be protected. - // Read Only: true - AppName *string `json:"appName,omitempty"` -} - -// Validate validates this exchange app params -func (m *ExchangeAppParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this exchange app params based on the context it is used -func (m *ExchangeAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeAppParams) contextValidateAppName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "appName", "body", m.AppName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeAppParams) UnmarshalBinary(b []byte) error { - var res ExchangeAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_database_recovery_target_config.go b/v2/models/exchange_database_recovery_target_config.go deleted file mode 100644 index d6c68de4..00000000 --- a/v2/models/exchange_database_recovery_target_config.go +++ /dev/null @@ -1,110 +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" -) - -// ExchangeDatabaseRecoveryTargetConfig Exchange database Recovery Target Config. -// -// Specifies the target object parameters to recover Exchange database. -// -// swagger:model ExchangeDatabaseRecoveryTargetConfig -type ExchangeDatabaseRecoveryTargetConfig struct { - - // Specifies the id of the physical source to which the exchange database will be recovered. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this exchange database recovery target config -func (m *ExchangeDatabaseRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabaseRecoveryTargetConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange database recovery target config based on the context it is used -func (m *ExchangeDatabaseRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeDatabaseRecoveryTargetConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeDatabaseRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeDatabaseRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res ExchangeDatabaseRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_indexed_object.go b/v2/models/exchange_indexed_object.go deleted file mode 100644 index c5813f97..00000000 --- a/v2/models/exchange_indexed_object.go +++ /dev/null @@ -1,141 +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" -) - -// ExchangeIndexedObject ExchangeIndexedObject -// -// Specifies the Exchange Indexed object. -// -// swagger:model ExchangeIndexedObject -type ExchangeIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the name of the Exchange mailbox. - ObjectName *string `json:"objectName,omitempty"` - - // Specifies the email corresponding to the mailbox. - Email *string `json:"email,omitempty"` - - // Specifies the name of the Exchange database corresponding to the mailbox. - DatabaseName *string `json:"databaseName,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ExchangeIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - ObjectName *string `json:"objectName,omitempty"` - - Email *string `json:"email,omitempty"` - - DatabaseName *string `json:"databaseName,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ObjectName = dataAO1.ObjectName - - m.Email = dataAO1.Email - - m.DatabaseName = dataAO1.DatabaseName - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ExchangeIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ObjectName *string `json:"objectName,omitempty"` - - Email *string `json:"email,omitempty"` - - DatabaseName *string `json:"databaseName,omitempty"` - } - - dataAO1.ObjectName = m.ObjectName - - dataAO1.Email = m.Email - - dataAO1.DatabaseName = m.DatabaseName - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this exchange indexed object -func (m *ExchangeIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this exchange indexed object based on the context it is used -func (m *ExchangeIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeIndexedObject) UnmarshalBinary(b []byte) error { - var res ExchangeIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_indexed_objects.go b/v2/models/exchange_indexed_objects.go deleted file mode 100644 index 4c3ccc45..00000000 --- a/v2/models/exchange_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExchangeIndexedObjects Specifies the indexed HDFS objects. -// -// swagger:model ExchangeIndexedObjects -type ExchangeIndexedObjects []*ExchangeIndexedObject - -// Validate validates this exchange indexed objects -func (m ExchangeIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this exchange indexed objects based on the context it is used -func (m ExchangeIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/exchange_protection_group_object_params.go b/v2/models/exchange_protection_group_object_params.go deleted file mode 100644 index 7d306418..00000000 --- a/v2/models/exchange_protection_group_object_params.go +++ /dev/null @@ -1,158 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExchangeProtectionGroupObjectParams Exchange Protection Group Object Params. -// -// Specifies the object identifier to for the exchange protection group. -// -// swagger:model ExchangeProtectionGroupObjectParams -type ExchangeProtectionGroupObjectParams struct { - - // Specifies the id of the registered Exchange DAG(Database Availability Group) source or Exchange physical source. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the registered Exchange DAG(Database Availability Group) source or Exchange physical source. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the specific parameters required for Exchange app configuration. - AppParams []*ExchangeAppParams `json:"appParams"` -} - -// Validate validates this exchange protection group object params -func (m *ExchangeProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *ExchangeProtectionGroupObjectParams) validateAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.AppParams) { // not required - return nil - } - - for i := 0; i < len(m.AppParams); i++ { - if swag.IsZero(m.AppParams[i]) { // not required - continue - } - - if m.AppParams[i] != nil { - if err := m.AppParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this exchange protection group object params based on the context it is used -func (m *ExchangeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ExchangeProtectionGroupObjectParams) contextValidateAppParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppParams); i++ { - - if m.AppParams[i] != nil { - - if swag.IsZero(m.AppParams[i]) { // not required - return nil - } - - if err := m.AppParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res ExchangeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_protection_group_params.go b/v2/models/exchange_protection_group_params.go deleted file mode 100644 index 38e5753f..00000000 --- a/v2/models/exchange_protection_group_params.go +++ /dev/null @@ -1,195 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExchangeProtectionGroupParams Exchange Protection Group Parameters. -// -// Specifies the parameters which are specific to Exchange related Protection Groups. -// -// swagger:model ExchangeProtectionGroupParams -type ExchangeProtectionGroupParams struct { - - // Specifies the list of object ids to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ExchangeProtectionGroupObjectParams `json:"objects"` - - // Specifies the list of IDs of the databases to not be protected by this Protection Group. This can be used to ignore specific databases under Exchange Server/DAG which has been included for protection. - ExcludeDatabaseIds []*int64 `json:"excludeDatabaseIds"` - - // Specifies the fields required to enable indexing of the mailboxes of an Exchange database. The name, email and guid corresponding to the mailbox are indexed for every mailbox. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether the backups should be copy-only. - BackupsCopyOnly *bool `json:"backupsCopyOnly,omitempty"` -} - -// Validate validates this exchange protection group params -func (m *ExchangeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange protection group params based on the context it is used -func (m *ExchangeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ExchangeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res ExchangeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_recover_database_params.go b/v2/models/exchange_recover_database_params.go deleted file mode 100644 index de870068..00000000 --- a/v2/models/exchange_recover_database_params.go +++ /dev/null @@ -1,279 +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" -) - -// ExchangeRecoverDatabaseParams Exchange database Recovery params. -// -// Specifies the parameters to recover an Exchange database. database. -// -// swagger:model ExchangeRecoverDatabaseParams -type ExchangeRecoverDatabaseParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the type of exchange restore. - // Required: true - // Enum: ["RestoreView"] - RestoreType *string `json:"restoreType"` - - // Specifies the parameters related to the Exchange restore of type view. This is mandatory if restore type is RestoreView. - ViewOptions *ViewOptions `json:"viewOptions,omitempty"` - - // Specifies the source id of Exchange database which has to be recovered. - // Required: true - DatabaseSource *RecoveryObjectIdentifier `json:"databaseSource"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source. - RecoveryTargetConfig *ExchangeDatabaseRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` -} - -// Validate validates this exchange recover database params -func (m *ExchangeRecoverDatabaseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoreType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeRecoverDatabaseParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -var exchangeRecoverDatabaseParamsTypeRestoreTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RestoreView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - exchangeRecoverDatabaseParamsTypeRestoreTypePropEnum = append(exchangeRecoverDatabaseParamsTypeRestoreTypePropEnum, v) - } -} - -const ( - - // ExchangeRecoverDatabaseParamsRestoreTypeRestoreView captures enum value "RestoreView" - ExchangeRecoverDatabaseParamsRestoreTypeRestoreView string = "RestoreView" -) - -// prop value enum -func (m *ExchangeRecoverDatabaseParams) validateRestoreTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, exchangeRecoverDatabaseParamsTypeRestoreTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExchangeRecoverDatabaseParams) validateRestoreType(formats strfmt.Registry) error { - - if err := validate.Required("restoreType", "body", m.RestoreType); err != nil { - return err - } - - // value enum - if err := m.validateRestoreTypeEnum("restoreType", "body", *m.RestoreType); err != nil { - return err - } - - return nil -} - -func (m *ExchangeRecoverDatabaseParams) validateViewOptions(formats strfmt.Registry) error { - if swag.IsZero(m.ViewOptions) { // not required - return nil - } - - if m.ViewOptions != nil { - if err := m.ViewOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewOptions") - } - return err - } - } - - return nil -} - -func (m *ExchangeRecoverDatabaseParams) validateDatabaseSource(formats strfmt.Registry) error { - - if err := validate.Required("databaseSource", "body", m.DatabaseSource); err != nil { - return err - } - - if m.DatabaseSource != nil { - if err := m.DatabaseSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseSource") - } - return err - } - } - - return nil -} - -func (m *ExchangeRecoverDatabaseParams) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange recover database params based on the context it is used -func (m *ExchangeRecoverDatabaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabaseSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeRecoverDatabaseParams) contextValidateViewOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewOptions != nil { - - if swag.IsZero(m.ViewOptions) { // not required - return nil - } - - if err := m.ViewOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewOptions") - } - return err - } - } - - return nil -} - -func (m *ExchangeRecoverDatabaseParams) contextValidateDatabaseSource(ctx context.Context, formats strfmt.Registry) error { - - if m.DatabaseSource != nil { - - if err := m.DatabaseSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseSource") - } - return err - } - } - - return nil -} - -func (m *ExchangeRecoverDatabaseParams) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeRecoverDatabaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeRecoverDatabaseParams) UnmarshalBinary(b []byte) error { - var res ExchangeRecoverDatabaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_recovery_target_config.go b/v2/models/exchange_recovery_target_config.go deleted file mode 100644 index ee72a0d2..00000000 --- a/v2/models/exchange_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// ExchangeRecoveryTargetConfig Exchange database Recovery Target Config. -// -// Specifies the target object parameters to recover an Exchange database. -// -// swagger:model ExchangeRecoveryTargetConfig -type ExchangeRecoveryTargetConfig struct { - - // Specifies a new name for the restored database. - DatabaseName *string `json:"databaseName,omitempty"` - - // Specifies the directory where to put the database data files. Missing directory will be automatically created. - DatabaseDirectoryLocation *string `json:"databaseDirectoryLocation,omitempty"` - - // Specifies the directory where to put the database log files. Missing directory will be automatically created. - LogDirectoryLocation *string `json:"logDirectoryLocation,omitempty"` - - // Specifies whether to mount the database after successful recovery. - MountDatabase *bool `json:"mountDatabase,omitempty"` - - // Specifies whether to restore the Database as Recovery database. - RestoreAsRecoveryDB *bool `json:"restoreAsRecoveryDB,omitempty"` - - // Specifies whether to use the latest logs on Exchange Server to perform roll-forward recovery. - RollForwardRecovery *bool `json:"rollForwardRecovery,omitempty"` - - // Specifies the id of the source to which the Exchange database will be recovered. - Source *RecoveryObjectIdentifier `json:"source,omitempty"` -} - -// Validate validates this exchange recovery target config -func (m *ExchangeRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeRecoveryTargetConfig) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange recovery target config based on the context it is used -func (m *ExchangeRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeRecoveryTargetConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res ExchangeRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_target_params_for_recover_exchange_app.go b/v2/models/exchange_target_params_for_recover_exchange_app.go deleted file mode 100644 index 6f8d1431..00000000 --- a/v2/models/exchange_target_params_for_recover_exchange_app.go +++ /dev/null @@ -1,110 +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" -) - -// ExchangeTargetParamsForRecoverExchangeApp Recover Exchange App params. -// -// Specifies the parameters to recover Exchange applications to an Exchange target. -// -// swagger:model ExchangeTargetParamsForRecoverExchangeApp -type ExchangeTargetParamsForRecoverExchangeApp struct { - - // Specifies the Recovered Object parameters. - // Required: true - Object *RecoverExchangeAppSnapshotParams `json:"object"` -} - -// Validate validates this exchange target params for recover exchange app -func (m *ExchangeTargetParamsForRecoverExchangeApp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTargetParamsForRecoverExchangeApp) validateObject(formats strfmt.Registry) error { - - if err := validate.Required("object", "body", m.Object); err != nil { - return err - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this exchange target params for recover exchange app based on the context it is used -func (m *ExchangeTargetParamsForRecoverExchangeApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTargetParamsForRecoverExchangeApp) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeTargetParamsForRecoverExchangeApp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeTargetParamsForRecoverExchangeApp) UnmarshalBinary(b []byte) error { - var res ExchangeTargetParamsForRecoverExchangeApp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/exchange_target_params_for_recover_exchange_dbs.go b/v2/models/exchange_target_params_for_recover_exchange_dbs.go deleted file mode 100644 index 8cc293ef..00000000 --- a/v2/models/exchange_target_params_for_recover_exchange_dbs.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExchangeTargetParamsForRecoverExchangeDbs Recover Exchange Databases params. -// -// Specifies the parameters to recover Exchange applications to an Exchange target. -// -// swagger:model ExchangeTargetParamsForRecoverExchangeDbs -type ExchangeTargetParamsForRecoverExchangeDbs struct { - - // Specifies the Exchange Database object parameters. - // Required: true - Objects []*RecoverExchangeDbsSnapshotParams `json:"objects"` -} - -// Validate validates this exchange target params for recover exchange dbs -func (m *ExchangeTargetParamsForRecoverExchangeDbs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTargetParamsForRecoverExchangeDbs) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this exchange target params for recover exchange dbs based on the context it is used -func (m *ExchangeTargetParamsForRecoverExchangeDbs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExchangeTargetParamsForRecoverExchangeDbs) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExchangeTargetParamsForRecoverExchangeDbs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExchangeTargetParamsForRecoverExchangeDbs) UnmarshalBinary(b []byte) error { - var res ExchangeTargetParamsForRecoverExchangeDbs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/execute_runbook_action_request.go b/v2/models/execute_runbook_action_request.go deleted file mode 100644 index b396480c..00000000 --- a/v2/models/execute_runbook_action_request.go +++ /dev/null @@ -1,162 +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" -) - -// ExecuteRunbookActionRequest Perform action as per passed parameters. -// -// Specifies the request parameters to perform an action. -// -// swagger:model ExecuteRunbookActionRequest -type ExecuteRunbookActionRequest struct { - - // Specifies the action to be performed. - // Required: true - // Enum: ["PowerOffVM"] - Action *string `json:"action"` - - // power off Vm params - PowerOffVMParams *PowerOffVMParams `json:"powerOffVmParams,omitempty"` -} - -// Validate validates this execute runbook action request -func (m *ExecuteRunbookActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePowerOffVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var executeRunbookActionRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PowerOffVM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - executeRunbookActionRequestTypeActionPropEnum = append(executeRunbookActionRequestTypeActionPropEnum, v) - } -} - -const ( - - // ExecuteRunbookActionRequestActionPowerOffVM captures enum value "PowerOffVM" - ExecuteRunbookActionRequestActionPowerOffVM string = "PowerOffVM" -) - -// prop value enum -func (m *ExecuteRunbookActionRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, executeRunbookActionRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExecuteRunbookActionRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *ExecuteRunbookActionRequest) validatePowerOffVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.PowerOffVMParams) { // not required - return nil - } - - if m.PowerOffVMParams != nil { - if err := m.PowerOffVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerOffVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerOffVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this execute runbook action request based on the context it is used -func (m *ExecuteRunbookActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePowerOffVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExecuteRunbookActionRequest) contextValidatePowerOffVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PowerOffVMParams != nil { - - if swag.IsZero(m.PowerOffVMParams) { // not required - return nil - } - - if err := m.PowerOffVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("powerOffVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("powerOffVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExecuteRunbookActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExecuteRunbookActionRequest) UnmarshalBinary(b []byte) error { - var res ExecuteRunbookActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/existing_group_param.go b/v2/models/existing_group_param.go deleted file mode 100644 index 107b4abe..00000000 --- a/v2/models/existing_group_param.go +++ /dev/null @@ -1,71 +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" -) - -// ExistingGroupParam Specifies the parameters for using existing protection group. -// -// swagger:model ExistingGroupParam -type ExistingGroupParam struct { - - // Specifies the protection group id. - // Required: true - ID *string `json:"id"` -} - -// Validate validates this existing group param -func (m *ExistingGroupParam) 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 *ExistingGroupParam) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this existing group param based on context it is used -func (m *ExistingGroupParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExistingGroupParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExistingGroupParam) UnmarshalBinary(b []byte) error { - var res ExistingGroupParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/expiration_action.go b/v2/models/expiration_action.go deleted file mode 100644 index 9c911e83..00000000 --- a/v2/models/expiration_action.go +++ /dev/null @@ -1,56 +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" -) - -// ExpirationAction Specifies the Lifecycle current version ExpirationAction. Note: All the three fields are mutually exclusive to each other. -// -// swagger:model ExpirationAction -type ExpirationAction struct { - - // Specifies the Timestamp in Usecs for the date when the object is subject to the rule. - DateInUsecs *int64 `json:"dateInUsecs,omitempty"` - - // Specifies the Lifetime in days of the objects that are subject to the rule. - Days *uint64 `json:"days,omitempty"` - - // Specifies whether Amazon S3 will remove a delete marker with no non-current versions. If set, the delete marker will be expired. - ExpiredObjectDeleteMarker *bool `json:"expiredObjectDeleteMarker,omitempty"` -} - -// Validate validates this expiration action -func (m *ExpirationAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this expiration action based on context it is used -func (m *ExpirationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExpirationAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExpirationAction) UnmarshalBinary(b []byte) error { - var res ExpirationAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/extended_retention_policy.go b/v2/models/extended_retention_policy.go deleted file mode 100644 index 421bd13b..00000000 --- a/v2/models/extended_retention_policy.go +++ /dev/null @@ -1,223 +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" -) - -// ExtendedRetentionPolicy Extended Retention Policy. -// -// Specifies additional retention policies to apply to backup snapshots. -// -// swagger:model ExtendedRetentionPolicy -type ExtendedRetentionPolicy struct { - - // Specifies the schedule settings for extended retention. - // Required: true - Schedule *ExtendedRetentionSchedule `json:"schedule"` - - // Specifies the Retention period of a backup in days, months or years. - // Required: true - Retention *Retention `json:"retention"` - - // The backup run type to which this extended retention applies to. If this is not set, the extended retention will be applicable to all non-log backup types. Currently, the only value that can be set here is Full. - // 'Regular' indicates a incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a Regular schedule captures all the blocks. - // 'Full' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. - // 'Log' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. - // 'System' indicates a system backup. System backups are used to do bare metal recovery of the system to a specific point in time. - // Enum: ["Regular","Full","Log","System"] - RunType *string `json:"runType,omitempty"` - - // Specifies the unique identifier for the target getting added. This field need to be passed olny when policies are updated. - ConfigID *string `json:"configId,omitempty"` -} - -// Validate validates this extended retention policy -func (m *ExtendedRetentionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtendedRetentionPolicy) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *ExtendedRetentionPolicy) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 extendedRetentionPolicyTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Regular","Full","Log","System"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - extendedRetentionPolicyTypeRunTypePropEnum = append(extendedRetentionPolicyTypeRunTypePropEnum, v) - } -} - -const ( - - // ExtendedRetentionPolicyRunTypeRegular captures enum value "Regular" - ExtendedRetentionPolicyRunTypeRegular string = "Regular" - - // ExtendedRetentionPolicyRunTypeFull captures enum value "Full" - ExtendedRetentionPolicyRunTypeFull string = "Full" - - // ExtendedRetentionPolicyRunTypeLog captures enum value "Log" - ExtendedRetentionPolicyRunTypeLog string = "Log" - - // ExtendedRetentionPolicyRunTypeSystem captures enum value "System" - ExtendedRetentionPolicyRunTypeSystem string = "System" -) - -// prop value enum -func (m *ExtendedRetentionPolicy) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, extendedRetentionPolicyTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExtendedRetentionPolicy) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this extended retention policy based on the context it is used -func (m *ExtendedRetentionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *ExtendedRetentionPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *ExtendedRetentionPolicy) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *ExtendedRetentionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedRetentionPolicy) UnmarshalBinary(b []byte) error { - var res ExtendedRetentionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/extended_retention_schedule.go b/v2/models/extended_retention_schedule.go deleted file mode 100644 index 73e44eaf..00000000 --- a/v2/models/extended_retention_schedule.go +++ /dev/null @@ -1,142 +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" -) - -// ExtendedRetentionSchedule Extended Retention Schedule -// -// Specifies a schedule frequency and schedule unit for Extended Retentions. -// -// swagger:model ExtendedRetentionSchedule -type ExtendedRetentionSchedule struct { - - // Specifies the unit interval for retention of Snapshots.
'Runs' means that the Snapshot copy retained after the number of Protection Group Runs equals the number specified in the frequency.
'Hours' means that the Snapshot copy retained hourly at the frequency set in the frequency, for example if scheduleFrequency is 2, the copy occurs every 2 hours.
'Days' means that the Snapshot copy gets retained daily at the frequency set in the frequency.
'Weeks' means that the Snapshot copy is retained weekly at the frequency set in the frequency.
'Months' means that the Snapshot copy is retained monthly at the frequency set in the Frequency.
'Years' means that the Snapshot copy is retained yearly at the frequency set in the Frequency. - // Required: true - // Enum: ["Runs","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies a factor to multiply the unit by, to determine the retention schedule. - // For example if set to 2 and the unit is hourly, then Snapshots from the first eligible Job Run for every 2 hour period is retained. - // Minimum: 1 - Frequency *int32 `json:"frequency,omitempty"` -} - -// Validate validates this extended retention schedule -func (m *ExtendedRetentionSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var extendedRetentionScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Runs","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - extendedRetentionScheduleTypeUnitPropEnum = append(extendedRetentionScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // ExtendedRetentionScheduleUnitRuns captures enum value "Runs" - ExtendedRetentionScheduleUnitRuns string = "Runs" - - // ExtendedRetentionScheduleUnitHours captures enum value "Hours" - ExtendedRetentionScheduleUnitHours string = "Hours" - - // ExtendedRetentionScheduleUnitDays captures enum value "Days" - ExtendedRetentionScheduleUnitDays string = "Days" - - // ExtendedRetentionScheduleUnitWeeks captures enum value "Weeks" - ExtendedRetentionScheduleUnitWeeks string = "Weeks" - - // ExtendedRetentionScheduleUnitMonths captures enum value "Months" - ExtendedRetentionScheduleUnitMonths string = "Months" - - // ExtendedRetentionScheduleUnitYears captures enum value "Years" - ExtendedRetentionScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *ExtendedRetentionSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, extendedRetentionScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExtendedRetentionSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *ExtendedRetentionSchedule) validateFrequency(formats strfmt.Registry) error { - if swag.IsZero(m.Frequency) { // not required - return nil - } - - if err := validate.MinimumInt("frequency", "body", int64(*m.Frequency), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this extended retention schedule based on context it is used -func (m *ExtendedRetentionSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExtendedRetentionSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedRetentionSchedule) UnmarshalBinary(b []byte) error { - var res ExtendedRetentionSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/external_target.go b/v2/models/external_target.go deleted file mode 100644 index dedb42bd..00000000 --- a/v2/models/external_target.go +++ /dev/null @@ -1,226 +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" -) - -// ExternalTarget External Target. -// -// swagger:model ExternalTarget -type ExternalTarget struct { - CommonExternalTargetParams - - // archival params - ArchivalParams *ArchivalExternalTargetParams `json:"archivalParams,omitempty"` - - // tiering params - TieringParams *TieringExternalTargetParams `json:"tieringParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ExternalTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - ArchivalParams *ArchivalExternalTargetParams `json:"archivalParams,omitempty"` - - TieringParams *TieringExternalTargetParams `json:"tieringParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ArchivalParams = dataAO1.ArchivalParams - - m.TieringParams = dataAO1.TieringParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ExternalTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ArchivalParams *ArchivalExternalTargetParams `json:"archivalParams,omitempty"` - - TieringParams *TieringExternalTargetParams `json:"tieringParams,omitempty"` - } - - dataAO1.ArchivalParams = m.ArchivalParams - - dataAO1.TieringParams = m.TieringParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this external target -func (m *ExternalTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonExternalTargetParams - if err := m.CommonExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieringParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalTarget) validateArchivalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ArchivalParams) { // not required - return nil - } - - if m.ArchivalParams != nil { - if err := m.ArchivalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalParams") - } - return err - } - } - - return nil -} - -func (m *ExternalTarget) validateTieringParams(formats strfmt.Registry) error { - - if swag.IsZero(m.TieringParams) { // not required - return nil - } - - if m.TieringParams != nil { - if err := m.TieringParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this external target based on the context it is used -func (m *ExternalTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonExternalTargetParams - if err := m.CommonExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieringParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalTarget) contextValidateArchivalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalParams != nil { - - if swag.IsZero(m.ArchivalParams) { // not required - return nil - } - - if err := m.ArchivalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalParams") - } - return err - } - } - - return nil -} - -func (m *ExternalTarget) contextValidateTieringParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringParams != nil { - - if swag.IsZero(m.TieringParams) { // not required - return nil - } - - if err := m.TieringParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternalTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternalTarget) UnmarshalBinary(b []byte) error { - var res ExternalTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/external_targets.go b/v2/models/external_targets.go deleted file mode 100644 index 89bfd886..00000000 --- a/v2/models/external_targets.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ExternalTargets List of External Target. -// -// swagger:model ExternalTargets -type ExternalTargets struct { - - // Specifies the list of External Targets which were returned by the request. - ExternalTargets []*ExternalTarget `json:"externalTargets"` -} - -// Validate validates this external targets -func (m *ExternalTargets) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExternalTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalTargets) validateExternalTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalTargets) { // not required - return nil - } - - for i := 0; i < len(m.ExternalTargets); i++ { - if swag.IsZero(m.ExternalTargets[i]) { // not required - continue - } - - if m.ExternalTargets[i] != nil { - if err := m.ExternalTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this external targets based on the context it is used -func (m *ExternalTargets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExternalTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternalTargets) contextValidateExternalTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExternalTargets); i++ { - - if m.ExternalTargets[i] != nil { - - if swag.IsZero(m.ExternalTargets[i]) { // not required - return nil - } - - if err := m.ExternalTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternalTargets) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternalTargets) UnmarshalBinary(b []byte) error { - var res ExternalTargets - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/externally_triggered_client_type.go b/v2/models/externally_triggered_client_type.go deleted file mode 100644 index 91e425f4..00000000 --- a/v2/models/externally_triggered_client_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExternallyTriggeredClientType Externally Triggered Backup Client Type -// -// Client type of an externally triggered backup. -// -// swagger:model ExternallyTriggeredClientType -type ExternallyTriggeredClientType struct { - - // Specifies the client type of an externally triggered backup. - // Enum: ["Generic","SBT"] - Type string `json:"type,omitempty"` -} - -// Validate validates this externally triggered client type -func (m *ExternallyTriggeredClientType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var externallyTriggeredClientTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Generic","SBT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - externallyTriggeredClientTypeTypeTypePropEnum = append(externallyTriggeredClientTypeTypeTypePropEnum, v) - } -} - -const ( - - // ExternallyTriggeredClientTypeTypeGeneric captures enum value "Generic" - ExternallyTriggeredClientTypeTypeGeneric string = "Generic" - - // ExternallyTriggeredClientTypeTypeSBT captures enum value "SBT" - ExternallyTriggeredClientTypeTypeSBT string = "SBT" -) - -// prop value enum -func (m *ExternallyTriggeredClientType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, externallyTriggeredClientTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExternallyTriggeredClientType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this externally triggered client type based on context it is used -func (m *ExternallyTriggeredClientType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredClientType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredClientType) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredClientType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/externally_triggered_job_params.go b/v2/models/externally_triggered_job_params.go deleted file mode 100644 index aab72d0e..00000000 --- a/v2/models/externally_triggered_job_params.go +++ /dev/null @@ -1,164 +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" -) - -// ExternallyTriggeredJobParams Specifies the externally triggered job paramters. -// -// swagger:model ExternallyTriggeredJobParams -type ExternallyTriggeredJobParams struct { - - // Specifies the client type of the externally triggered backup job. - // Enum: ["Generic","SBT"] - ClientType *string `json:"clientType,omitempty"` - - // Specifies all the tags of the externally triggered job. - Tags []string `json:"tags,omitempty"` - - // Specifies the SBT parameters for the externally triggered backup job. - SbtParams *ExternallyTriggeredSbtParams `json:"sbtParams,omitempty"` -} - -// Validate validates this externally triggered job params -func (m *ExternallyTriggeredJobParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSbtParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var externallyTriggeredJobParamsTypeClientTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Generic","SBT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - externallyTriggeredJobParamsTypeClientTypePropEnum = append(externallyTriggeredJobParamsTypeClientTypePropEnum, v) - } -} - -const ( - - // ExternallyTriggeredJobParamsClientTypeGeneric captures enum value "Generic" - ExternallyTriggeredJobParamsClientTypeGeneric string = "Generic" - - // ExternallyTriggeredJobParamsClientTypeSBT captures enum value "SBT" - ExternallyTriggeredJobParamsClientTypeSBT string = "SBT" -) - -// prop value enum -func (m *ExternallyTriggeredJobParams) validateClientTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, externallyTriggeredJobParamsTypeClientTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ExternallyTriggeredJobParams) validateClientType(formats strfmt.Registry) error { - if swag.IsZero(m.ClientType) { // not required - return nil - } - - // value enum - if err := m.validateClientTypeEnum("clientType", "body", *m.ClientType); err != nil { - return err - } - - return nil -} - -func (m *ExternallyTriggeredJobParams) validateSbtParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if m.SbtParams != nil { - if err := m.SbtParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this externally triggered job params based on the context it is used -func (m *ExternallyTriggeredJobParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExternallyTriggeredJobParams) contextValidateSbtParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtParams != nil { - - if swag.IsZero(m.SbtParams) { // not required - return nil - } - - if err := m.SbtParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredJobParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredJobParams) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredJobParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/externally_triggered_sbt_params.go b/v2/models/externally_triggered_sbt_params.go deleted file mode 100644 index 8223cb09..00000000 --- a/v2/models/externally_triggered_sbt_params.go +++ /dev/null @@ -1,50 +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" -) - -// ExternallyTriggeredSbtParams Specifies SBT paramters for the externally triggered job. -// -// swagger:model ExternallyTriggeredSbtParams -type ExternallyTriggeredSbtParams struct { - - // Specifies the catalog view for the SBT backup. - CatalogView *string `json:"catalogView,omitempty"` -} - -// Validate validates this externally triggered sbt params -func (m *ExternallyTriggeredSbtParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this externally triggered sbt params based on context it is used -func (m *ExternallyTriggeredSbtParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ExternallyTriggeredSbtParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExternallyTriggeredSbtParams) UnmarshalBinary(b []byte) error { - var res ExternallyTriggeredSbtParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/f_c_i_cluster.go b/v2/models/f_c_i_cluster.go deleted file mode 100644 index f58efe3b..00000000 --- a/v2/models/f_c_i_cluster.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FCICluster Specifies the details of a Failover Cluster Instance. -// -// swagger:model FCICluster -type FCICluster struct { - - // Specifies the unique identifier of the FCI. - ID *string `json:"id,omitempty"` - - // Specifies the name of the FCI. - Name *string `json:"name,omitempty"` - - // Specifies the error information if any associated with this FCI cluster. - Error *Error `json:"error,omitempty"` - - // Specifies the resource information about the FCI. - ResourceInfo *AppResource `json:"resourceInfo,omitempty"` - - // Specifies the list of SQL servers which belongs to the given FCI. - Servers []*SQLServer `json:"servers"` - - // Indicates to the UI whether this FCI cluster should be selected by default - IsSelectedByDefault *bool `json:"isSelectedByDefault,omitempty"` -} - -// Validate validates this f c i cluster -func (m *FCICluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FCICluster) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *FCICluster) validateResourceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if m.ResourceInfo != nil { - if err := m.ResourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *FCICluster) validateServers(formats strfmt.Registry) error { - if swag.IsZero(m.Servers) { // not required - return nil - } - - for i := 0; i < len(m.Servers); i++ { - if swag.IsZero(m.Servers[i]) { // not required - continue - } - - if m.Servers[i] != nil { - if err := m.Servers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this f c i cluster based on the context it is used -func (m *FCICluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FCICluster) 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 -} - -func (m *FCICluster) contextValidateResourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceInfo != nil { - - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if err := m.ResourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *FCICluster) contextValidateServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Servers); i++ { - - if m.Servers[i] != nil { - - if swag.IsZero(m.Servers[i]) { // not required - return nil - } - - if err := m.Servers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FCICluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FCICluster) UnmarshalBinary(b []byte) error { - var res FCICluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failed_protection_group_details.go b/v2/models/failed_protection_group_details.go deleted file mode 100644 index 7aa1277f..00000000 --- a/v2/models/failed_protection_group_details.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" -) - -// FailedProtectionGroupDetails Specifies a list of ids of Protection Group that failed to update along with error details -// -// swagger:model FailedProtectionGroupDetails -type FailedProtectionGroupDetails struct { - - // Specifies the id of the failed protection group. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the error mesage for failed protection group. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this failed protection group details -func (m *FailedProtectionGroupDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this failed protection group details based on context it is used -func (m *FailedProtectionGroupDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailedProtectionGroupDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailedProtectionGroupDetails) UnmarshalBinary(b []byte) error { - var res FailedProtectionGroupDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failed_run_details.go b/v2/models/failed_run_details.go deleted file mode 100644 index 6adef853..00000000 --- a/v2/models/failed_run_details.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" -) - -// FailedRunDetails Specifies a list of ids of Protection Group Runs that failed to update along with error details -// -// swagger:model FailedRunDetails -type FailedRunDetails struct { - - // Specifies the id of the failed run. - RunID *string `json:"runId,omitempty"` - - // Specifies the error mesage for failed run. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this failed run details -func (m *FailedRunDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this failed run details based on context it is used -func (m *FailedRunDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailedRunDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailedRunDetails) UnmarshalBinary(b []byte) error { - var res FailedRunDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover.go b/v2/models/failover.go deleted file mode 100644 index 8c4f366b..00000000 --- a/v2/models/failover.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Failover Specifies the details of a failover. -// -// swagger:model Failover -type Failover struct { - - // Specifies the failover id. - ID *string `json:"id,omitempty"` - - // Specifies the failover type. - // Enum: ["Planned","Unplanned"] - Type *string `json:"type,omitempty"` - - // Specifies the failover status. - // Enum: ["Running","Succeeded","Failed"] - Status *string `json:"status,omitempty"` - - // Specifies the error details if failover status is 'Failed'. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the failover start time in micro seconds. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the failover complete time in micro seconds. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies a list of replications in this failover. - Replications []*FailoverReplication `json:"replications"` -} - -// Validate validates this failover -func (m *Failover) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var failoverTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Planned","Unplanned"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - failoverTypeTypePropEnum = append(failoverTypeTypePropEnum, v) - } -} - -const ( - - // FailoverTypePlanned captures enum value "Planned" - FailoverTypePlanned string = "Planned" - - // FailoverTypeUnplanned captures enum value "Unplanned" - FailoverTypeUnplanned string = "Unplanned" -) - -// prop value enum -func (m *Failover) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, failoverTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Failover) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var failoverTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - failoverTypeStatusPropEnum = append(failoverTypeStatusPropEnum, v) - } -} - -const ( - - // FailoverStatusRunning captures enum value "Running" - FailoverStatusRunning string = "Running" - - // FailoverStatusSucceeded captures enum value "Succeeded" - FailoverStatusSucceeded string = "Succeeded" - - // FailoverStatusFailed captures enum value "Failed" - FailoverStatusFailed string = "Failed" -) - -// prop value enum -func (m *Failover) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, failoverTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Failover) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *Failover) validateReplications(formats strfmt.Registry) error { - if swag.IsZero(m.Replications) { // not required - return nil - } - - for i := 0; i < len(m.Replications); i++ { - if swag.IsZero(m.Replications[i]) { // not required - continue - } - - if m.Replications[i] != nil { - if err := m.Replications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this failover based on the context it is used -func (m *Failover) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplications(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Failover) contextValidateReplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Replications); i++ { - - if m.Replications[i] != nil { - - if swag.IsZero(m.Replications[i]) { // not required - return nil - } - - if err := m.Replications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Failover) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Failover) UnmarshalBinary(b []byte) error { - var res Failover - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_create_run_response.go b/v2/models/failover_create_run_response.go deleted file mode 100644 index 522cad34..00000000 --- a/v2/models/failover_create_run_response.go +++ /dev/null @@ -1,50 +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" -) - -// FailoverCreateRunResponse Specifies the response upon creating a special run during failover workflow. -// -// swagger:model FailoverCreateRunResponse -type FailoverCreateRunResponse struct { - - // Specifies the unique failover Id which will be generated by orchestrator. This Id will be used to uniquely identify current failover operation. - FailoverID *string `json:"failoverId,omitempty"` -} - -// Validate validates this failover create run response -func (m *FailoverCreateRunResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this failover create run response based on context it is used -func (m *FailoverCreateRunResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverCreateRunResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverCreateRunResponse) UnmarshalBinary(b []byte) error { - var res FailoverCreateRunResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_object.go b/v2/models/failover_object.go deleted file mode 100644 index 76f3fc2d..00000000 --- a/v2/models/failover_object.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" -) - -// FailoverObject Failover Objects -// -// Specifies the details about the objects being failed over. -// -// swagger:model FailoverObject -type FailoverObject struct { - - // Specifies the object Id involved in failover operation. - // Required: true - ObjectID *int64 `json:"objectId"` -} - -// Validate validates this failover object -func (m *FailoverObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverObject) validateObjectID(formats strfmt.Registry) error { - - if err := validate.Required("objectId", "body", m.ObjectID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this failover object based on context it is used -func (m *FailoverObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverObject) UnmarshalBinary(b []byte) error { - var res FailoverObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_replica_cluster.go b/v2/models/failover_replica_cluster.go deleted file mode 100644 index e0bc7d9f..00000000 --- a/v2/models/failover_replica_cluster.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FailoverReplicaCluster Failover source cluster. -// -// Specifies the details about replication cluster involved in the failover operation. -// -// swagger:model FailoverReplicaCluster -type FailoverReplicaCluster struct { - - // Specifies the details about the objects being failed over. In case if view based orchastrator is calling this then they should pass a object id for replicated view entity which belongs to the live tracking view on replication cluster. - // Required: true - Objects []*FailoverObject `json:"objects"` - - // Specifies the protection group id from the replication cluster from where the objects being failed over. If this is not specified then it will be infer from the list of objects being failed over. The protection group id must be specified in this format : - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` -} - -// Validate validates this failover replica cluster -func (m *FailoverReplicaCluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverReplicaCluster) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this failover replica cluster based on the context it is used -func (m *FailoverReplicaCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverReplicaCluster) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverReplicaCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverReplicaCluster) UnmarshalBinary(b []byte) error { - var res FailoverReplicaCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_replication.go b/v2/models/failover_replication.go deleted file mode 100644 index 53230f63..00000000 --- a/v2/models/failover_replication.go +++ /dev/null @@ -1,141 +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" -) - -// FailoverReplication Specifies the details of a failover replication. -// -// swagger:model FailoverReplication -type FailoverReplication struct { - - // Specifies the replication id. - ID *string `json:"id,omitempty"` - - // Specifies the replication status. - // Enum: ["Running","Succeeded","Failed"] - Status *string `json:"status,omitempty"` - - // Specifies the error details if replication status is 'Failed'. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the replication start time in micro seconds. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the replication complete time in micro seconds. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the percentage completed in the replication. - PercentageCompleted *int32 `json:"percentageCompleted,omitempty"` - - // Specifies the total amount of logical data to be transferred for this replication. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the number of logical bytes transferred for this replication so far. This value can never exceed the total logical size of the replicated view. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Specifies the number of bytes sent over the wire for this replication so far. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` - - // Specifies the failover target cluster id. - TargetClusterID *int64 `json:"targetClusterId,omitempty"` - - // Specifies the failover target cluster incarnation id. - TargetClusterIncarnationID *int64 `json:"targetClusterIncarnationId,omitempty"` - - // Specifies the failover target cluster name. - TargetClusterName *string `json:"targetClusterName,omitempty"` -} - -// Validate validates this failover replication -func (m *FailoverReplication) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var failoverReplicationTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - failoverReplicationTypeStatusPropEnum = append(failoverReplicationTypeStatusPropEnum, v) - } -} - -const ( - - // FailoverReplicationStatusRunning captures enum value "Running" - FailoverReplicationStatusRunning string = "Running" - - // FailoverReplicationStatusSucceeded captures enum value "Succeeded" - FailoverReplicationStatusSucceeded string = "Succeeded" - - // FailoverReplicationStatusFailed captures enum value "Failed" - FailoverReplicationStatusFailed string = "Failed" -) - -// prop value enum -func (m *FailoverReplication) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, failoverReplicationTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FailoverReplication) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this failover replication based on context it is used -func (m *FailoverReplication) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverReplication) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverReplication) UnmarshalBinary(b []byte) error { - var res FailoverReplication - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_run_configuration.go b/v2/models/failover_run_configuration.go deleted file mode 100644 index 9666afdc..00000000 --- a/v2/models/failover_run_configuration.go +++ /dev/null @@ -1,219 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FailoverRunConfiguration Specifies the configuration required for execting special run as a part of failover workflow. This special run is triggered during palnned failover to sync the source cluster to replication cluster with minimum possible delta. Please note that if this object is passed then this special run will ignore the other archivals and retention settings. -// -// swagger:model FailoverRunConfiguration -type FailoverRunConfiguration struct { - - // Specifies the replication cluster Id where planned run will replicate objects. - // Required: true - ReplicationClusterID *int64 `json:"replicationClusterId"` - - // Specifies the list of all local entity ids of all the objects being failed from the source cluster. - // Required: true - Objects []*FailoverObject `json:"objects"` - - // Specifies the active protection group id on the source cluster from where the objects are being failed over. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the type of the backup run to be triggered by this request. If this is not set defaults to incremental backup. - // Enum: ["kAll","kHydrateCDP","kSystem","kStorageArraySnapshot","kIncremental","kFull","kLog"] - RunType string `json:"runType,omitempty"` - - // If failover is initiated by view based orchastrator, then this field specifies the local view id of source cluster which is being failed over. - ViewID *int64 `json:"viewId,omitempty"` - - // If set to true, other ongoing runs backing up the same set of entities being failed over will be initiated for cancellation. Non conflicting run operations such as replications to other clusters, archivals will not be cancelled. If set to false, then new run will wait for all the pending operations to finish normally before scheduling a new backup/replication. - CancelNonFailoverRuns *bool `json:"cancelNonFailoverRuns,omitempty"` - - // If this is set to true then unless failover operation is completed, all the next runs will be pasued. - PauseNextRuns *bool `json:"pauseNextRuns,omitempty"` -} - -// Validate validates this failover run configuration -func (m *FailoverRunConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverRunConfiguration) validateReplicationClusterID(formats strfmt.Registry) error { - - if err := validate.Required("replicationClusterId", "body", m.ReplicationClusterID); err != nil { - return err - } - - return nil -} - -func (m *FailoverRunConfiguration) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var failoverRunConfigurationTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kHydrateCDP","kSystem","kStorageArraySnapshot","kIncremental","kFull","kLog"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - failoverRunConfigurationTypeRunTypePropEnum = append(failoverRunConfigurationTypeRunTypePropEnum, v) - } -} - -const ( - - // FailoverRunConfigurationRunTypeKAll captures enum value "kAll" - FailoverRunConfigurationRunTypeKAll string = "kAll" - - // FailoverRunConfigurationRunTypeKHydrateCDP captures enum value "kHydrateCDP" - FailoverRunConfigurationRunTypeKHydrateCDP string = "kHydrateCDP" - - // FailoverRunConfigurationRunTypeKSystem captures enum value "kSystem" - FailoverRunConfigurationRunTypeKSystem string = "kSystem" - - // FailoverRunConfigurationRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - FailoverRunConfigurationRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" - - // FailoverRunConfigurationRunTypeKIncremental captures enum value "kIncremental" - FailoverRunConfigurationRunTypeKIncremental string = "kIncremental" - - // FailoverRunConfigurationRunTypeKFull captures enum value "kFull" - FailoverRunConfigurationRunTypeKFull string = "kFull" - - // FailoverRunConfigurationRunTypeKLog captures enum value "kLog" - FailoverRunConfigurationRunTypeKLog string = "kLog" -) - -// prop value enum -func (m *FailoverRunConfiguration) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, failoverRunConfigurationTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FailoverRunConfiguration) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this failover run configuration based on the context it is used -func (m *FailoverRunConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverRunConfiguration) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverRunConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverRunConfiguration) UnmarshalBinary(b []byte) error { - var res FailoverRunConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_runs_response.go b/v2/models/failover_runs_response.go deleted file mode 100644 index 0d1fb43a..00000000 --- a/v2/models/failover_runs_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FailoverRunsResponse Specifies the response upon creating a special run during failover workflow. -// -// swagger:model FailoverRunsResponse -type FailoverRunsResponse struct { - - // Specifies the list of planned runs created during various planeed failover workflows. Each planned run is uniqely identified by falioverId and runId. - FailoverPlannedRuns []*PlannedRunPollStatus `json:"failoverPlannedRuns"` -} - -// Validate validates this failover runs response -func (m *FailoverRunsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFailoverPlannedRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverRunsResponse) validateFailoverPlannedRuns(formats strfmt.Registry) error { - if swag.IsZero(m.FailoverPlannedRuns) { // not required - return nil - } - - for i := 0; i < len(m.FailoverPlannedRuns); i++ { - if swag.IsZero(m.FailoverPlannedRuns[i]) { // not required - continue - } - - if m.FailoverPlannedRuns[i] != nil { - if err := m.FailoverPlannedRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failoverPlannedRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failoverPlannedRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this failover runs response based on the context it is used -func (m *FailoverRunsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFailoverPlannedRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverRunsResponse) contextValidateFailoverPlannedRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailoverPlannedRuns); i++ { - - if m.FailoverPlannedRuns[i] != nil { - - if swag.IsZero(m.FailoverPlannedRuns[i]) { // not required - return nil - } - - if err := m.FailoverPlannedRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failoverPlannedRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failoverPlannedRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverRunsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverRunsResponse) UnmarshalBinary(b []byte) error { - var res FailoverRunsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/failover_source_cluster.go b/v2/models/failover_source_cluster.go deleted file mode 100644 index 65015e61..00000000 --- a/v2/models/failover_source_cluster.go +++ /dev/null @@ -1,129 +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" -) - -// FailoverSourceCluster Failover source cluster. -// -// Specifies the details about source cluster involved in the failover operation. -// -// swagger:model FailoverSourceCluster -type FailoverSourceCluster struct { - - // Specifies the source cluster Id involved in failover operation. - // Required: true - ID *int64 `json:"id"` - - // Specifies the source cluster incarnation Id involved in failover operation. - // Read Only: true - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // Specifies the protection group Id involved in failover operation. - // Read Only: true - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // If failover is initiated by view based orchastrator, then this field specifies the local view id of source cluster which is being failed over. - // Read Only: true - ViewID *int64 `json:"viewId,omitempty"` -} - -// Validate validates this failover source cluster -func (m *FailoverSourceCluster) 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 *FailoverSourceCluster) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this failover source cluster based on the context it is used -func (m *FailoverSourceCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIncarnationID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionGroupID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FailoverSourceCluster) contextValidateIncarnationID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "incarnationId", "body", m.IncarnationID); err != nil { - return err - } - - return nil -} - -func (m *FailoverSourceCluster) contextValidateProtectionGroupID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "protectionGroupId", "body", m.ProtectionGroupID); err != nil { - return err - } - - return nil -} - -func (m *FailoverSourceCluster) contextValidateViewID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "viewId", "body", m.ViewID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FailoverSourceCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FailoverSourceCluster) UnmarshalBinary(b []byte) error { - var res FailoverSourceCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fallback_user_id_mapping_params.go b/v2/models/fallback_user_id_mapping_params.go deleted file mode 100644 index 26491f67..00000000 --- a/v2/models/fallback_user_id_mapping_params.go +++ /dev/null @@ -1,163 +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" -) - -// FallbackUserIDMappingParams Specifies a fallback param for Unix and Windows users mapping. -// -// swagger:model FallbackUserIdMappingParams -type FallbackUserIDMappingParams struct { - - // Specifies the type of the mapping. - // Required: true - // Enum: ["Rid","Fixed"] - Type *string `json:"type"` - - // Specifies the params for Fixed mapping type mapping. - FixedTypeParams *AdFixedTypeParams `json:"fixedTypeParams,omitempty"` -} - -// Validate validates this fallback user Id mapping params -func (m *FallbackUserIDMappingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFixedTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fallbackUserIdMappingParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rid","Fixed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fallbackUserIdMappingParamsTypeTypePropEnum = append(fallbackUserIdMappingParamsTypeTypePropEnum, v) - } -} - -const ( - - // FallbackUserIDMappingParamsTypeRid captures enum value "Rid" - FallbackUserIDMappingParamsTypeRid string = "Rid" - - // FallbackUserIDMappingParamsTypeFixed captures enum value "Fixed" - FallbackUserIDMappingParamsTypeFixed string = "Fixed" -) - -// prop value enum -func (m *FallbackUserIDMappingParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fallbackUserIdMappingParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FallbackUserIDMappingParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *FallbackUserIDMappingParams) validateFixedTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FixedTypeParams) { // not required - return nil - } - - if m.FixedTypeParams != nil { - if err := m.FixedTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this fallback user Id mapping params based on the context it is used -func (m *FallbackUserIDMappingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFixedTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FallbackUserIDMappingParams) contextValidateFixedTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FixedTypeParams != nil { - - if swag.IsZero(m.FixedTypeParams) { // not required - return nil - } - - if err := m.FixedTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FallbackUserIDMappingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FallbackUserIDMappingParams) UnmarshalBinary(b []byte) error { - var res FallbackUserIDMappingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/feature_flag.go b/v2/models/feature_flag.go deleted file mode 100644 index 00f84989..00000000 --- a/v2/models/feature_flag.go +++ /dev/null @@ -1,64 +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" -) - -// FeatureFlag Feature Flag struct. -// -// Describes the feature flag struct. -// -// swagger:model FeatureFlag -type FeatureFlag struct { - - // Name of the feature flag. - Name *string `json:"name,omitempty"` - - // Bool to denote if it's a UI feature. - IsUIFeature *bool `json:"isUiFeature,omitempty"` - - // Bool to approval status of feature flag. - IsApproved *bool `json:"isApproved,omitempty"` - - // Reason for the feature flag override status. - Reason *string `json:"reason,omitempty"` - - // Timestamp in secs when the override is done. - Timestamp *int64 `json:"timestamp,omitempty"` -} - -// Validate validates this feature flag -func (m *FeatureFlag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this feature flag based on context it is used -func (m *FeatureFlag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FeatureFlag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FeatureFlag) UnmarshalBinary(b []byte) error { - var res FeatureFlag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/feature_flag_list.go b/v2/models/feature_flag_list.go deleted file mode 100644 index 18dca2a9..00000000 --- a/v2/models/feature_flag_list.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FeatureFlagList List of feature flags -// -// Specifies list of feature flags. -// -// swagger:model FeatureFlagList -type FeatureFlagList []*FeatureFlag - -// Validate validates this feature flag list -func (m FeatureFlagList) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this feature flag list based on the context it is used -func (m FeatureFlagList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/fetch_uptier_data_request_params.go b/v2/models/fetch_uptier_data_request_params.go deleted file mode 100644 index 9428fe52..00000000 --- a/v2/models/fetch_uptier_data_request_params.go +++ /dev/null @@ -1,78 +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" -) - -// FetchUptierDataRequestParams Fetch Uptier Data Params. -// -// Specifies the parameters to fetch amount of data to be uptiered as part of a restore job. -// -// swagger:model FetchUptierDataRequestParams -type FetchUptierDataRequestParams struct { - - // Archive UID of the current restore. - // Required: true - // Pattern: ^\d+:\d+:\d+$ - ArchiveUID *string `json:"archiveUId"` -} - -// Validate validates this fetch uptier data request params -func (m *FetchUptierDataRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchiveUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FetchUptierDataRequestParams) validateArchiveUID(formats strfmt.Registry) error { - - if err := validate.Required("archiveUId", "body", m.ArchiveUID); err != nil { - return err - } - - if err := validate.Pattern("archiveUId", "body", *m.ArchiveUID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this fetch uptier data request params based on context it is used -func (m *FetchUptierDataRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FetchUptierDataRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FetchUptierDataRequestParams) UnmarshalBinary(b []byte) error { - var res FetchUptierDataRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fetch_uptier_data_response.go b/v2/models/fetch_uptier_data_response.go deleted file mode 100644 index 7cdd7d08..00000000 --- a/v2/models/fetch_uptier_data_response.go +++ /dev/null @@ -1,52 +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" -) - -// FetchUptierDataResponse Fetch Uptier Data Response. -// -// Specifies the amount of data in bytes estimated to be uptiered as part of the current restore job. -// -// swagger:model FetchUptierDataResponse -type FetchUptierDataResponse struct { - - // Specifies the amount of data in bytes estimated to be uptiered as part of the current restore job. - DataSize *int64 `json:"dataSize,omitempty"` -} - -// Validate validates this fetch uptier data response -func (m *FetchUptierDataResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fetch uptier data response based on context it is used -func (m *FetchUptierDataResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FetchUptierDataResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FetchUptierDataResponse) UnmarshalBinary(b []byte) error { - var res FetchUptierDataResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file.go b/v2/models/file.go deleted file mode 100644 index 4a5e62d8..00000000 --- a/v2/models/file.go +++ /dev/null @@ -1,300 +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" -) - -// File File -// -// Specifies a File. -// -// swagger:model File -type File struct { - - // Specifies the file name. - Name *string `json:"name,omitempty"` - - // Specifies the path to this file. - Path *string `json:"path,omitempty"` - - // Specifies the file type. - // Enum: ["File","Directory","Symlink"] - Type *string `json:"type,omitempty"` - - // "Specifies the protection group id which contains this file." - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // "Specifies the protection group name which contains this file." - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the protection policy id for this file. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the protection policy name for this file. - PolicyName *string `json:"policyName,omitempty"` - - // "Specifies the Storage Domain id where the backup data of Object - // is present." - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the Source Object information. - SourceInfo *Object `json:"sourceInfo,omitempty"` - - TagObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *File) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Path *string `json:"path,omitempty"` - - Type *string `json:"type,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Name = dataAO0.Name - - m.Path = dataAO0.Path - - m.Type = dataAO0.Type - - m.ProtectionGroupID = dataAO0.ProtectionGroupID - - m.ProtectionGroupName = dataAO0.ProtectionGroupName - - m.PolicyID = dataAO0.PolicyID - - m.PolicyName = dataAO0.PolicyName - - m.StorageDomainID = dataAO0.StorageDomainID - - m.SourceInfo = dataAO0.SourceInfo - - // AO1 - var aO1 TagObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.TagObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m File) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Path *string `json:"path,omitempty"` - - Type *string `json:"type,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - } - - dataAO0.Name = m.Name - - dataAO0.Path = m.Path - - dataAO0.Type = m.Type - - dataAO0.ProtectionGroupID = m.ProtectionGroupID - - dataAO0.ProtectionGroupName = m.ProtectionGroupName - - dataAO0.PolicyID = m.PolicyID - - dataAO0.PolicyName = m.PolicyName - - dataAO0.StorageDomainID = m.StorageDomainID - - dataAO0.SourceInfo = m.SourceInfo - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.TagObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this file -func (m *File) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceInfo(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileTypeTypePropEnum = append(fileTypeTypePropEnum, v) - } -} - -// property enum -func (m *File) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *File) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *File) validateSourceInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if m.SourceInfo != nil { - if err := m.SourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file based on the context it is used -func (m *File) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with TagObject - if err := m.TagObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *File) contextValidateSourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceInfo != nil { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if err := m.SourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *File) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *File) UnmarshalBinary(b []byte) error { - var res File - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_access_types.go b/v2/models/file_access_types.go deleted file mode 100644 index 69776f3e..00000000 --- a/v2/models/file_access_types.go +++ /dev/null @@ -1,110 +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" -) - -// FileAccessTypes File Access types. -// -// Specifies the Read/Write/Delete Access types for SMB files. -// -// swagger:model FileAccessTypes -type FileAccessTypes struct { - - // Specifies the access types. - // Enum: ["Read","Write","Delete"] - Value string `json:"value,omitempty"` -} - -// Validate validates this file access types -func (m *FileAccessTypes) 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 fileAccessTypesTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Read","Write","Delete"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileAccessTypesTypeValuePropEnum = append(fileAccessTypesTypeValuePropEnum, v) - } -} - -const ( - - // FileAccessTypesValueRead captures enum value "Read" - FileAccessTypesValueRead string = "Read" - - // FileAccessTypesValueWrite captures enum value "Write" - FileAccessTypesValueWrite string = "Write" - - // FileAccessTypesValueDelete captures enum value "Delete" - FileAccessTypesValueDelete string = "Delete" -) - -// prop value enum -func (m *FileAccessTypes) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileAccessTypesTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileAccessTypes) 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 file access types based on context it is used -func (m *FileAccessTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileAccessTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileAccessTypes) UnmarshalBinary(b []byte) error { - var res FileAccessTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_category_type.go b/v2/models/file_category_type.go deleted file mode 100644 index 11d91ad7..00000000 --- a/v2/models/file_category_type.go +++ /dev/null @@ -1,116 +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" -) - -// FileCategoryType Sharepoint document library file types for search. -// -// Sharepoint document library file types for search. -// -// swagger:model FileCategoryType -type FileCategoryType struct { - - // Specifies the Sharepoint document library file types for search. - // Enum: ["Document","Excel","Powerpoint","Image","OneNote"] - Type string `json:"type,omitempty"` -} - -// Validate validates this file category type -func (m *FileCategoryType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileCategoryTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Document","Excel","Powerpoint","Image","OneNote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileCategoryTypeTypeTypePropEnum = append(fileCategoryTypeTypeTypePropEnum, v) - } -} - -const ( - - // FileCategoryTypeTypeDocument captures enum value "Document" - FileCategoryTypeTypeDocument string = "Document" - - // FileCategoryTypeTypeExcel captures enum value "Excel" - FileCategoryTypeTypeExcel string = "Excel" - - // FileCategoryTypeTypePowerpoint captures enum value "Powerpoint" - FileCategoryTypeTypePowerpoint string = "Powerpoint" - - // FileCategoryTypeTypeImage captures enum value "Image" - FileCategoryTypeTypeImage string = "Image" - - // FileCategoryTypeTypeOneNote captures enum value "OneNote" - FileCategoryTypeTypeOneNote string = "OneNote" -) - -// prop value enum -func (m *FileCategoryType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileCategoryTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileCategoryType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file category type based on context it is used -func (m *FileCategoryType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileCategoryType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileCategoryType) UnmarshalBinary(b []byte) error { - var res FileCategoryType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_count.go b/v2/models/file_count.go deleted file mode 100644 index cd439ff3..00000000 --- a/v2/models/file_count.go +++ /dev/null @@ -1,56 +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" -) - -// FileCount Specifies the number of files with provided size range. -// -// swagger:model FileCount -type FileCount struct { - - // Specifies the lower bound of file size in bytes. This value is inclusive. - LowerSizeBytes *int64 `json:"lowerSizeBytes,omitempty"` - - // Specifies the upper bound of file size in bytes. This value is exclusive. - UpperSizeBytes *int64 `json:"upperSizeBytes,omitempty"` - - // Specifies the number of files with size in this range. - Count *int64 `json:"count,omitempty"` -} - -// Validate validates this file count -func (m *FileCount) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file count based on context it is used -func (m *FileCount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileCount) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileCount) UnmarshalBinary(b []byte) error { - var res FileCount - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_extension_filter.go b/v2/models/file_extension_filter.go deleted file mode 100644 index 5e774ae7..00000000 --- a/v2/models/file_extension_filter.go +++ /dev/null @@ -1,113 +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" -) - -// FileExtensionFilter file extension filter -// -// swagger:model FileExtensionFilter -type FileExtensionFilter struct { - - // The list of file extensions to apply - FileExtensionsList []string `json:"fileExtensionsList"` - - // If set, it enables the file extension filter - IsEnabled *bool `json:"isEnabled,omitempty"` - - // The mode applied to the list of file extensions - // 'Whitelist' indicates a whitelist extension filter. - // 'Blacklist' indicates a blacklist extension filter. - // Enum: ["Whitelist","Blacklist"] - Mode *string `json:"mode,omitempty"` -} - -// Validate validates this file extension filter -func (m *FileExtensionFilter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileExtensionFilterTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Whitelist","Blacklist"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileExtensionFilterTypeModePropEnum = append(fileExtensionFilterTypeModePropEnum, v) - } -} - -const ( - - // FileExtensionFilterModeWhitelist captures enum value "Whitelist" - FileExtensionFilterModeWhitelist string = "Whitelist" - - // FileExtensionFilterModeBlacklist captures enum value "Blacklist" - FileExtensionFilterModeBlacklist string = "Blacklist" -) - -// prop value enum -func (m *FileExtensionFilter) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileExtensionFilterTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileExtensionFilter) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file extension filter based on context it is used -func (m *FileExtensionFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileExtensionFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileExtensionFilter) UnmarshalBinary(b []byte) error { - var res FileExtensionFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_filtering_policy.go b/v2/models/file_filtering_policy.go deleted file mode 100644 index a1700225..00000000 --- a/v2/models/file_filtering_policy.go +++ /dev/null @@ -1,59 +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" -) - -// FileFilteringPolicy Specifies a set of filters for a file based Protection Group. -// These values are strings which can represent a prefix or suffix. -// Example: '/tmp' or '*.mp4'. For file based Protection Groups, all files -// under prefixes specified by the 'includeFilters' list will be protected -// unless they are explicitly excluded by the 'excludeFilters' list. -// -// swagger:model FileFilteringPolicy -type FileFilteringPolicy struct { - - // Specifies the list of included files for this Protection Group. - IncludeList []string `json:"includeList"` - - // Specifies the list of excluded files for this protection - // Protection Group. Exclude filters have a higher priority than include - // filters. - ExcludeList []string `json:"excludeList"` -} - -// Validate validates this file filtering policy -func (m *FileFilteringPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file filtering policy based on context it is used -func (m *FileFilteringPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileFilteringPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileFilteringPolicy) UnmarshalBinary(b []byte) error { - var res FileFilteringPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_folder_info.go b/v2/models/file_folder_info.go deleted file mode 100644 index 81576f1b..00000000 --- a/v2/models/file_folder_info.go +++ /dev/null @@ -1,325 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FileFolderInfo Contents information -// -// Specifies information of the contents (files and folders). -// -// swagger:model FileFolderInfo -type FileFolderInfo 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 parameters for Hdfs. - HdfsParams []*HdfsFileFolderParams `json:"hdfsParams"` - - // Specifies the information needed in order to support pagination. This will not be included for the last page of results. - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this file folder info -func (m *FileFolderInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileFolderInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileFolderInfoTypeEnvironmentPropEnum = append(fileFolderInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // FileFolderInfoEnvironmentKVMware captures enum value "kVMware" - FileFolderInfoEnvironmentKVMware string = "kVMware" - - // FileFolderInfoEnvironmentKHyperV captures enum value "kHyperV" - FileFolderInfoEnvironmentKHyperV string = "kHyperV" - - // FileFolderInfoEnvironmentKAzure captures enum value "kAzure" - FileFolderInfoEnvironmentKAzure string = "kAzure" - - // FileFolderInfoEnvironmentKKVM captures enum value "kKVM" - FileFolderInfoEnvironmentKKVM string = "kKVM" - - // FileFolderInfoEnvironmentKAWS captures enum value "kAWS" - FileFolderInfoEnvironmentKAWS string = "kAWS" - - // FileFolderInfoEnvironmentKAzureSQL captures enum value "kAzureSQL" - FileFolderInfoEnvironmentKAzureSQL string = "kAzureSQL" - - // FileFolderInfoEnvironmentKAcropolis captures enum value "kAcropolis" - FileFolderInfoEnvironmentKAcropolis string = "kAcropolis" - - // FileFolderInfoEnvironmentKGCP captures enum value "kGCP" - FileFolderInfoEnvironmentKGCP string = "kGCP" - - // FileFolderInfoEnvironmentKPhysical captures enum value "kPhysical" - FileFolderInfoEnvironmentKPhysical string = "kPhysical" - - // FileFolderInfoEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - FileFolderInfoEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // FileFolderInfoEnvironmentKIsilon captures enum value "kIsilon" - FileFolderInfoEnvironmentKIsilon string = "kIsilon" - - // FileFolderInfoEnvironmentKNetapp captures enum value "kNetapp" - FileFolderInfoEnvironmentKNetapp string = "kNetapp" - - // FileFolderInfoEnvironmentKGenericNas captures enum value "kGenericNas" - FileFolderInfoEnvironmentKGenericNas string = "kGenericNas" - - // FileFolderInfoEnvironmentKFlashBlade captures enum value "kFlashBlade" - FileFolderInfoEnvironmentKFlashBlade string = "kFlashBlade" - - // FileFolderInfoEnvironmentKElastifile captures enum value "kElastifile" - FileFolderInfoEnvironmentKElastifile string = "kElastifile" - - // FileFolderInfoEnvironmentKGPFS captures enum value "kGPFS" - FileFolderInfoEnvironmentKGPFS string = "kGPFS" - - // FileFolderInfoEnvironmentKPure captures enum value "kPure" - FileFolderInfoEnvironmentKPure string = "kPure" - - // FileFolderInfoEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - FileFolderInfoEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // FileFolderInfoEnvironmentKNimble captures enum value "kNimble" - FileFolderInfoEnvironmentKNimble string = "kNimble" - - // FileFolderInfoEnvironmentKSQL captures enum value "kSQL" - FileFolderInfoEnvironmentKSQL string = "kSQL" - - // FileFolderInfoEnvironmentKOracle captures enum value "kOracle" - FileFolderInfoEnvironmentKOracle string = "kOracle" - - // FileFolderInfoEnvironmentKExchange captures enum value "kExchange" - FileFolderInfoEnvironmentKExchange string = "kExchange" - - // FileFolderInfoEnvironmentKAD captures enum value "kAD" - FileFolderInfoEnvironmentKAD string = "kAD" - - // FileFolderInfoEnvironmentKView captures enum value "kView" - FileFolderInfoEnvironmentKView string = "kView" - - // FileFolderInfoEnvironmentKO365 captures enum value "kO365" - FileFolderInfoEnvironmentKO365 string = "kO365" - - // FileFolderInfoEnvironmentKHyperFlex captures enum value "kHyperFlex" - FileFolderInfoEnvironmentKHyperFlex string = "kHyperFlex" - - // FileFolderInfoEnvironmentKKubernetes captures enum value "kKubernetes" - FileFolderInfoEnvironmentKKubernetes string = "kKubernetes" - - // FileFolderInfoEnvironmentKCassandra captures enum value "kCassandra" - FileFolderInfoEnvironmentKCassandra string = "kCassandra" - - // FileFolderInfoEnvironmentKMongoDB captures enum value "kMongoDB" - FileFolderInfoEnvironmentKMongoDB string = "kMongoDB" - - // FileFolderInfoEnvironmentKCouchbase captures enum value "kCouchbase" - FileFolderInfoEnvironmentKCouchbase string = "kCouchbase" - - // FileFolderInfoEnvironmentKHdfs captures enum value "kHdfs" - FileFolderInfoEnvironmentKHdfs string = "kHdfs" - - // FileFolderInfoEnvironmentKHive captures enum value "kHive" - FileFolderInfoEnvironmentKHive string = "kHive" - - // FileFolderInfoEnvironmentKHBase captures enum value "kHBase" - FileFolderInfoEnvironmentKHBase string = "kHBase" - - // FileFolderInfoEnvironmentKUDA captures enum value "kUDA" - FileFolderInfoEnvironmentKUDA string = "kUDA" - - // FileFolderInfoEnvironmentKSfdc captures enum value "kSfdc" - FileFolderInfoEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *FileFolderInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileFolderInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileFolderInfo) 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 -} - -func (m *FileFolderInfo) validateHdfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - for i := 0; i < len(m.HdfsParams); i++ { - if swag.IsZero(m.HdfsParams[i]) { // not required - continue - } - - if m.HdfsParams[i] != nil { - if err := m.HdfsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileFolderInfo) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file folder info based on the context it is used -func (m *FileFolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileFolderInfo) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HdfsParams); i++ { - - if m.HdfsParams[i] != nil { - - if swag.IsZero(m.HdfsParams[i]) { // not required - return nil - } - - if err := m.HdfsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileFolderInfo) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileFolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileFolderInfo) UnmarshalBinary(b []byte) error { - var res FileFolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_id.go b/v2/models/file_id.go deleted file mode 100644 index d8ed102b..00000000 --- a/v2/models/file_id.go +++ /dev/null @@ -1,56 +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" -) - -// FileID Specifies the file Identifier. -// -// swagger:model FileId -type FileID struct { - - // Specifies the id of the View the file belongs to. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the root inode id of the file system that file belongs to. - RootInodeID *int64 `json:"rootInodeId,omitempty"` - - // Specifies the entity id of the file. - EntityID *int64 `json:"entityId,omitempty"` -} - -// Validate validates this file Id -func (m *FileID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this file Id based on context it is used -func (m *FileID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileID) UnmarshalBinary(b []byte) error { - var res FileID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_level_data_lock_config.go b/v2/models/file_level_data_lock_config.go deleted file mode 100644 index 1a17da4f..00000000 --- a/v2/models/file_level_data_lock_config.go +++ /dev/null @@ -1,221 +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" -) - -// FileLevelDataLockConfig File Level Data Lock Configurations. -// -// Specifies a config to lock files in a view - to protect from malicious or -// an accidental attempt to delete or modify the files in this view. -// -// swagger:model FileLevelDataLockConfig -type FileLevelDataLockConfig struct { - - // Specifies the duration to lock a file that has not been accessed or - // modified (ie. has been idle) for a certain duration of time in - // milliseconds. Do not set if it is required to disable auto lock. - AutoLockAfterDurationIdleMsecs *uint64 `json:"autoLockAfterDurationIdleMsecs,omitempty"` - - // Specified if files in the View can be locked in different modes. - // This property is immutable and - // can only be set when enabling File level datalock. - // If this property is set for an S3 View, - // S3 bucket Versioning should also be enabled. - CoexistingLockMode *bool `json:"coexistingLockMode,omitempty"` - - // Specifies a global default retention duration for files in this view, if - // file lock is enabled for this view. Also, it is a required field if file - // lock is enabled. Set to -1 if the required default retention period is - // forever. - DefaultRetentionDurationMsecs *int64 `json:"defaultRetentionDurationMsecs,omitempty"` - - // Specifies a global default retention duration in years - // for files in this view, if file/object lock is enabled for this view. - DefaultRetentionDurationYears *int64 `json:"defaultRetentionDurationYears,omitempty"` - - // Specifies a definite timestamp in milliseconds for retaining the file. - ExpiryTimestampMsecs *uint64 `json:"expiryTimestampMsecs,omitempty"` - - // Specifies the supported mechanisms to explicity lock a file from NFS/SMB - // interface. Supported locking protocols: SetReadOnly, SetAtime. - // 'SetReadOnly' is compatible with Isilon/Netapp behaviour. This locks the - // file and the retention duration is determined in this order: - // 1) atime, if set by user/application and within min and max retention - // duration. - // 2) Min retention duration, if set. - // 3) Otherwise, file is switched to expired data automatically. - // 'SetAtime' is compatible with Data Domain behaviour. - // Enum: ["SetReadOnly","SetAtime"] - LockingProtocol *string `json:"lockingProtocol,omitempty"` - - // Specifies a maximum duration in milliseconds for which any file in this - // view can be retained for. Set to -1 if the required retention duration is - // forever. If set, it should be greater than or equal to the default - // retention period as well as the min retention period. - MaxRetentionDurationMsecs *int64 `json:"maxRetentionDurationMsecs,omitempty"` - - // Specifies a minimum retention duration in milliseconds after a file gets - // locked. The file cannot be modified or deleted during this timeframe. Set - // to -1 if the required retention duration is forever. This should be set - // less than or equal to the default retention duration. - MinRetentionDurationMsecs *int64 `json:"minRetentionDurationMsecs,omitempty"` - - // Specifies the mode of file level datalock. - // Enterprise mode can be upgraded to Compliance mode, but Compliance mode - // cannot be downgraded to Enterprise mode. - // Compliance: This mode would disallow all user to delete/modify file or - // view under any condition when it 's in locked status except for deleting - // view when the view is empty. - // Enterprise: This mode would follow the rules as compliance mode for - // normal users. But it would allow the storage admin - // (1) to delete view or file anytime no matter - // it is in locked status or expired. - // (2) to rename the view - // (3) to bring back the retention period when it's in locked mode - // A lock mode of a file in a view can be in one of the following: - // 'Compliance': Default mode of datalock, in this mode, Data Security Admin - // cannot modify/delete this view when datalock is in effect. Data Security - // Admin can delete this view when datalock is expired. - // 'kEnterprise' : In this mode, Data Security Admin can change view name or - // delete view when datalock is in effect. Datalock in this mode can be - // upgraded to 'Compliance' mode. - // Enum: ["Compliance","Enterprise"] - Mode *string `json:"mode,omitempty"` -} - -// Validate validates this file level data lock config -func (m *FileLevelDataLockConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockingProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileLevelDataLockConfigTypeLockingProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SetReadOnly","SetAtime"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLevelDataLockConfigTypeLockingProtocolPropEnum = append(fileLevelDataLockConfigTypeLockingProtocolPropEnum, v) - } -} - -const ( - - // FileLevelDataLockConfigLockingProtocolSetReadOnly captures enum value "SetReadOnly" - FileLevelDataLockConfigLockingProtocolSetReadOnly string = "SetReadOnly" - - // FileLevelDataLockConfigLockingProtocolSetAtime captures enum value "SetAtime" - FileLevelDataLockConfigLockingProtocolSetAtime string = "SetAtime" -) - -// prop value enum -func (m *FileLevelDataLockConfig) validateLockingProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLevelDataLockConfigTypeLockingProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLevelDataLockConfig) validateLockingProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.LockingProtocol) { // not required - return nil - } - - // value enum - if err := m.validateLockingProtocolEnum("lockingProtocol", "body", *m.LockingProtocol); err != nil { - return err - } - - return nil -} - -var fileLevelDataLockConfigTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Enterprise"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLevelDataLockConfigTypeModePropEnum = append(fileLevelDataLockConfigTypeModePropEnum, v) - } -} - -const ( - - // FileLevelDataLockConfigModeCompliance captures enum value "Compliance" - FileLevelDataLockConfigModeCompliance string = "Compliance" - - // FileLevelDataLockConfigModeEnterprise captures enum value "Enterprise" - FileLevelDataLockConfigModeEnterprise string = "Enterprise" -) - -// prop value enum -func (m *FileLevelDataLockConfig) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLevelDataLockConfigTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLevelDataLockConfig) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file level data lock config based on context it is used -func (m *FileLevelDataLockConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileLevelDataLockConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileLevelDataLockConfig) UnmarshalBinary(b []byte) error { - var res FileLevelDataLockConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_lock_status.go b/v2/models/file_lock_status.go deleted file mode 100644 index 56a21399..00000000 --- a/v2/models/file_lock_status.go +++ /dev/null @@ -1,194 +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" -) - -// FileLockStatus Specified the information about the lock status of a file. -// -// swagger:model FileLockStatus -type FileLockStatus struct { - - // Specifies the lock state of the file. - // A lock state of a file in a view can be in one of the following: - // Unconfigured: File does not belong to data lock enabled view. - // Unlocked: A file created in a file lock enabled view. It will remain in - // this state until auto-lock timer expires or user manually locks the file. - // Locked: A locked file has a set retention period that prevents users from - // modifying the file data or extending, deleting, or renaming the file. - // A locked file remain in this state untill retention period expires. - // Expired: When retention period ends, the file transition from the locked - // state to the expired state. User can not modify or rename a file in expired - // state, but can delete a file. - // Hold: Expired file is kept in hold for administrator specified retention - // periods and deny any mutable or remove operation on locked files until a - // specific date. - // Enum: ["Unconfigured","Unlocked","Locked","Expired","Hold"] - State *string `json:"state,omitempty"` - - // Specifies the timestamp at which the file was locked. - LockTimestampMsecs *int64 `json:"lockTimestampMsecs,omitempty"` - - // Specifies a expiry timestamp in milliseconds until the file is locked. - ExpiryTimestampMsecs *int64 `json:"expiryTimestampMsecs,omitempty"` - - // Specifies a override timestamp in milliseconds when an expired file is kept on hold. - HoldTimestampMsecs *int64 `json:"holdTimestampMsecs,omitempty"` - - // Specifies the mode of the file lock. - // A lock mode of a file in a view can be in one of the following: - // Compliance: Default mode of datalock, in this mode, - // Data Security Admin cannot modify/delete this view when datalock - // is in effect. Data Security Admin can delete this view - // when datalock is expired. - // Enterprise: In this mode, Data Security Admin can change view name or - // delete view when datalock is in effect. Datalock in this mode can - // be upgraded to 'Compliance' mode. - // Enum: ["Compliance","Enterprise"] - Mode *string `json:"mode,omitempty"` -} - -// Validate validates this file lock status -func (m *FileLockStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileLockStatusTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Unconfigured","Unlocked","Locked","Expired","Hold"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLockStatusTypeStatePropEnum = append(fileLockStatusTypeStatePropEnum, v) - } -} - -const ( - - // FileLockStatusStateUnconfigured captures enum value "Unconfigured" - FileLockStatusStateUnconfigured string = "Unconfigured" - - // FileLockStatusStateUnlocked captures enum value "Unlocked" - FileLockStatusStateUnlocked string = "Unlocked" - - // FileLockStatusStateLocked captures enum value "Locked" - FileLockStatusStateLocked string = "Locked" - - // FileLockStatusStateExpired captures enum value "Expired" - FileLockStatusStateExpired string = "Expired" - - // FileLockStatusStateHold captures enum value "Hold" - FileLockStatusStateHold string = "Hold" -) - -// prop value enum -func (m *FileLockStatus) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLockStatusTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLockStatus) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -var fileLockStatusTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Enterprise"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileLockStatusTypeModePropEnum = append(fileLockStatusTypeModePropEnum, v) - } -} - -const ( - - // FileLockStatusModeCompliance captures enum value "Compliance" - FileLockStatusModeCompliance string = "Compliance" - - // FileLockStatusModeEnterprise captures enum value "Enterprise" - FileLockStatusModeEnterprise string = "Enterprise" -) - -// prop value enum -func (m *FileLockStatus) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileLockStatusTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileLockStatus) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file lock status based on context it is used -func (m *FileLockStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileLockStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileLockStatus) UnmarshalBinary(b []byte) error { - var res FileLockStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_nlm_locks.go b/v2/models/file_nlm_locks.go deleted file mode 100644 index 83535362..00000000 --- a/v2/models/file_nlm_locks.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileNlmLocks Specifies NLM locks per file. -// -// swagger:model FileNlmLocks -type FileNlmLocks struct { - - // Specifies the list of NLM locks. - NlmLocks []*NlmLock `json:"nlmLocks"` - - // File identitfiers. - FileID *FileID `json:"fileId,omitempty"` -} - -// Validate validates this file nlm locks -func (m *FileNlmLocks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNlmLocks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileNlmLocks) validateNlmLocks(formats strfmt.Registry) error { - if swag.IsZero(m.NlmLocks) { // not required - return nil - } - - for i := 0; i < len(m.NlmLocks); i++ { - if swag.IsZero(m.NlmLocks[i]) { // not required - continue - } - - if m.NlmLocks[i] != nil { - if err := m.NlmLocks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileNlmLocks) validateFileID(formats strfmt.Registry) error { - if swag.IsZero(m.FileID) { // not required - return nil - } - - if m.FileID != nil { - if err := m.FileID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this file nlm locks based on the context it is used -func (m *FileNlmLocks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNlmLocks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileNlmLocks) contextValidateNlmLocks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NlmLocks); i++ { - - if m.NlmLocks[i] != nil { - - if swag.IsZero(m.NlmLocks[i]) { // not required - return nil - } - - if err := m.NlmLocks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FileNlmLocks) contextValidateFileID(ctx context.Context, formats strfmt.Registry) error { - - if m.FileID != nil { - - if swag.IsZero(m.FileID) { // not required - return nil - } - - if err := m.FileID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FileNlmLocks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileNlmLocks) UnmarshalBinary(b []byte) error { - var res FileNlmLocks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_operation.go b/v2/models/file_operation.go deleted file mode 100644 index 986479f4..00000000 --- a/v2/models/file_operation.go +++ /dev/null @@ -1,124 +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" -) - -// FileOperation file operation -// -// swagger:model FileOperation -type FileOperation struct { - - // file path - // Required: true - FilePath *string `json:"filePath"` - - // operation - // Required: true - // Enum: ["kAdded","kDeleted"] - Operation *string `json:"operation"` -} - -// Validate validates this file operation -func (m *FileOperation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FileOperation) validateFilePath(formats strfmt.Registry) error { - - if err := validate.Required("filePath", "body", m.FilePath); err != nil { - return err - } - - return nil -} - -var fileOperationTypeOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAdded","kDeleted"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileOperationTypeOperationPropEnum = append(fileOperationTypeOperationPropEnum, v) - } -} - -const ( - - // FileOperationOperationKAdded captures enum value "kAdded" - FileOperationOperationKAdded string = "kAdded" - - // FileOperationOperationKDeleted captures enum value "kDeleted" - FileOperationOperationKDeleted string = "kDeleted" -) - -// prop value enum -func (m *FileOperation) validateOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileOperationTypeOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileOperation) validateOperation(formats strfmt.Registry) error { - - if err := validate.Required("operation", "body", m.Operation); err != nil { - return err - } - - // value enum - if err := m.validateOperationEnum("operation", "body", *m.Operation); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file operation based on context it is used -func (m *FileOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileOperation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileOperation) UnmarshalBinary(b []byte) error { - var res FileOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_size_policy.go b/v2/models/file_size_policy.go deleted file mode 100644 index 6bf3e8f6..00000000 --- a/v2/models/file_size_policy.go +++ /dev/null @@ -1,112 +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" -) - -// FileSizePolicy Specifies the file's selection rule by file size eg. -// 1. select files greather than 10 Bytes. -// 2. select files less than 20 TiB. -// 3. select files greather than 5 MiB. -// type: object -// -// swagger:model FileSizePolicy -type FileSizePolicy struct { - - // Specifies condition for the file selection. - // Enum: ["GreaterThan","SmallerThan"] - Condition *string `json:"condition,omitempty"` - - // Specifies the number of bytes. - NBytes *int64 `json:"nBytes,omitempty"` -} - -// Validate validates this file size policy -func (m *FileSizePolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCondition(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileSizePolicyTypeConditionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GreaterThan","SmallerThan"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileSizePolicyTypeConditionPropEnum = append(fileSizePolicyTypeConditionPropEnum, v) - } -} - -const ( - - // FileSizePolicyConditionGreaterThan captures enum value "GreaterThan" - FileSizePolicyConditionGreaterThan string = "GreaterThan" - - // FileSizePolicyConditionSmallerThan captures enum value "SmallerThan" - FileSizePolicyConditionSmallerThan string = "SmallerThan" -) - -// prop value enum -func (m *FileSizePolicy) validateConditionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileSizePolicyTypeConditionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileSizePolicy) validateCondition(formats strfmt.Registry) error { - if swag.IsZero(m.Condition) { // not required - return nil - } - - // value enum - if err := m.validateConditionEnum("condition", "body", *m.Condition); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file size policy based on context it is used -func (m *FileSizePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileSizePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSizePolicy) UnmarshalBinary(b []byte) error { - var res FileSizePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_size_rule_condition.go b/v2/models/file_size_rule_condition.go deleted file mode 100644 index 10914869..00000000 --- a/v2/models/file_size_rule_condition.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FileSizeRuleCondition Data tiering task file size rule condition type. -// -// Data tiering task file size rule condition type. -// -// swagger:model FileSizeRuleCondition -type FileSizeRuleCondition struct { - - // Specifies the data tiering task file size rule condition type. - // Enum: ["GreaterThan","SmallerThan"] - Type string `json:"type,omitempty"` -} - -// Validate validates this file size rule condition -func (m *FileSizeRuleCondition) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileSizeRuleConditionTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GreaterThan","SmallerThan"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileSizeRuleConditionTypeTypePropEnum = append(fileSizeRuleConditionTypeTypePropEnum, v) - } -} - -const ( - - // FileSizeRuleConditionTypeGreaterThan captures enum value "GreaterThan" - FileSizeRuleConditionTypeGreaterThan string = "GreaterThan" - - // FileSizeRuleConditionTypeSmallerThan captures enum value "SmallerThan" - FileSizeRuleConditionTypeSmallerThan string = "SmallerThan" -) - -// prop value enum -func (m *FileSizeRuleCondition) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileSizeRuleConditionTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileSizeRuleCondition) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file size rule condition based on context it is used -func (m *FileSizeRuleCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileSizeRuleCondition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSizeRuleCondition) UnmarshalBinary(b []byte) error { - var res FileSizeRuleCondition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_stats.go b/v2/models/file_stats.go deleted file mode 100644 index fa9b142b..00000000 --- a/v2/models/file_stats.go +++ /dev/null @@ -1,132 +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" -) - -// FileStats Specifies the file stats. -// -// swagger:model FileStats -type FileStats struct { - - // Specifies the file type. - // Enum: ["TextFile","AudioFile","VideoFile","CompressedFile","DatabaseFile","ImageFile","ExecutableFile","LogFile","OtherFile"] - Type *string `json:"type,omitempty"` - - // Specifies the number of files. - FilesCount *int64 `json:"filesCount,omitempty"` - - // Specifies the size of all the files in bytes. - FilesSizeBytes *int64 `json:"filesSizeBytes,omitempty"` -} - -// Validate validates this file stats -func (m *FileStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileStatsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["TextFile","AudioFile","VideoFile","CompressedFile","DatabaseFile","ImageFile","ExecutableFile","LogFile","OtherFile"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileStatsTypeTypePropEnum = append(fileStatsTypeTypePropEnum, v) - } -} - -const ( - - // FileStatsTypeTextFile captures enum value "TextFile" - FileStatsTypeTextFile string = "TextFile" - - // FileStatsTypeAudioFile captures enum value "AudioFile" - FileStatsTypeAudioFile string = "AudioFile" - - // FileStatsTypeVideoFile captures enum value "VideoFile" - FileStatsTypeVideoFile string = "VideoFile" - - // FileStatsTypeCompressedFile captures enum value "CompressedFile" - FileStatsTypeCompressedFile string = "CompressedFile" - - // FileStatsTypeDatabaseFile captures enum value "DatabaseFile" - FileStatsTypeDatabaseFile string = "DatabaseFile" - - // FileStatsTypeImageFile captures enum value "ImageFile" - FileStatsTypeImageFile string = "ImageFile" - - // FileStatsTypeExecutableFile captures enum value "ExecutableFile" - FileStatsTypeExecutableFile string = "ExecutableFile" - - // FileStatsTypeLogFile captures enum value "LogFile" - FileStatsTypeLogFile string = "LogFile" - - // FileStatsTypeOtherFile captures enum value "OtherFile" - FileStatsTypeOtherFile string = "OtherFile" -) - -// prop value enum -func (m *FileStats) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileStatsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileStats) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file stats based on context it is used -func (m *FileStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileStats) UnmarshalBinary(b []byte) error { - var res FileStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/file_type.go b/v2/models/file_type.go deleted file mode 100644 index c57a37d5..00000000 --- a/v2/models/file_type.go +++ /dev/null @@ -1,110 +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" -) - -// FileType File Type. -// -// Describes file types. -// -// swagger:model FileType -type FileType struct { - - // Specifies the file type - // Enum: ["File","Directory","Symlink"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this file type -func (m *FileType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fileTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fileTypeTypeEnumPropEnum = append(fileTypeTypeEnumPropEnum, v) - } -} - -const ( - - // FileTypeEnumFile captures enum value "File" - FileTypeEnumFile string = "File" - - // FileTypeEnumDirectory captures enum value "Directory" - FileTypeEnumDirectory string = "Directory" - - // FileTypeEnumSymlink captures enum value "Symlink" - FileTypeEnumSymlink string = "Symlink" -) - -// prop value enum -func (m *FileType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fileTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FileType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this file type based on context it is used -func (m *FileType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FileType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileType) UnmarshalBinary(b []byte) error { - var res FileType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filename_pattern_to_directory.go b/v2/models/filename_pattern_to_directory.go deleted file mode 100644 index 0b1635b1..00000000 --- a/v2/models/filename_pattern_to_directory.go +++ /dev/null @@ -1,56 +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" -) - -// FilenamePatternToDirectory Filename Pattern to Directory. -// -// Specifies a filename pattern and the directory path where to keep files matching that pattern. -// -// swagger:model FilenamePatternToDirectory -type FilenamePatternToDirectory struct { - - // Specifies the directory where to keep the files matching the pattern. - Directory *string `json:"directory,omitempty"` - - // Specifies a pattern to be matched with filenames. This can be a - // regex expression. - FilenamePattern *string `json:"filenamePattern,omitempty"` -} - -// Validate validates this filename pattern to directory -func (m *FilenamePatternToDirectory) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filename pattern to directory based on context it is used -func (m *FilenamePatternToDirectory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilenamePatternToDirectory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilenamePatternToDirectory) UnmarshalBinary(b []byte) error { - var res FilenamePatternToDirectory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_audit_log_configs.go b/v2/models/filer_audit_log_configs.go deleted file mode 100644 index 814522a4..00000000 --- a/v2/models/filer_audit_log_configs.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FilerAuditLogConfigs Specifies the filer audit log configs. -// -// swagger:model FilerAuditLogConfigs -type FilerAuditLogConfigs struct { - - // Specifies a list of share level permissions. - SharePermissions []*SmbPermission `json:"sharePermissions"` - - // Specifies a list of Subnets with IP addresses that have permissions to access a Cohesity View containing filer audit logs. - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies whether view level client subnet whitelist overrides cluster and global setting. - OverrideGlobalSubnetWhitelist *bool `json:"overrideGlobalSubnetWhitelist,omitempty"` - - // Specifies a list of SMB mount paths of a Cohesity View containing filer audit logs. - // Read Only: true - SmbMountPaths []string `json:"smbMountPaths"` - - // This field is currently deprecated. Please use NFS MountPaths which would be an array of strings. - // Read Only: true - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Specifies a list of NFS mount paths of a Cohesity View containing filer audit logs. - // Read Only: true - NfsMountPaths []string `json:"nfsMountPaths"` -} - -// Validate validates this filer audit log configs -func (m *FilerAuditLogConfigs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerAuditLogConfigs) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - for i := 0; i < len(m.SharePermissions); i++ { - if swag.IsZero(m.SharePermissions[i]) { // not required - continue - } - - if m.SharePermissions[i] != nil { - if err := m.SharePermissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilerAuditLogConfigs) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this filer audit log configs based on the context it is used -func (m *FilerAuditLogConfigs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsMountPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerAuditLogConfigs) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SharePermissions); i++ { - - if m.SharePermissions[i] != nil { - - if swag.IsZero(m.SharePermissions[i]) { // not required - return nil - } - - if err := m.SharePermissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilerAuditLogConfigs) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilerAuditLogConfigs) contextValidateSmbMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "smbMountPaths", "body", []string(m.SmbMountPaths)); err != nil { - return err - } - - return nil -} - -func (m *FilerAuditLogConfigs) contextValidateNfsMountPath(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "nfsMountPath", "body", m.NfsMountPath); err != nil { - return err - } - - return nil -} - -func (m *FilerAuditLogConfigs) contextValidateNfsMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "nfsMountPaths", "body", []string(m.NfsMountPaths)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilerAuditLogConfigs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerAuditLogConfigs) UnmarshalBinary(b []byte) error { - var res FilerAuditLogConfigs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_lifecycle_aging_policy.go b/v2/models/filer_lifecycle_aging_policy.go deleted file mode 100644 index 714049f3..00000000 --- a/v2/models/filer_lifecycle_aging_policy.go +++ /dev/null @@ -1,116 +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" -) - -// FilerLifecycleAgingPolicy Specifies the aging policy. Note: Both the fields days and dateInUsecs are mutually exclusive to each other. -// -// swagger:model FilerLifecycleAgingPolicy -type FilerLifecycleAgingPolicy struct { - - // Files that possess timestamps exceeding the specified value will be eligible for selection. - DateInUsecs *int64 `json:"dateInUsecs,omitempty"` - - // Files that possess timestamps older than the specified value in days will be eligible for selection. - Days *uint64 `json:"days,omitempty"` - - // Specifies the criteria for aging - // Required: true - // Enum: ["LastModificationTime","CreationTime","LastAccessTime"] - AgingCriteria *string `json:"agingCriteria"` -} - -// Validate validates this filer lifecycle aging policy -func (m *FilerLifecycleAgingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAgingCriteria(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var filerLifecycleAgingPolicyTypeAgingCriteriaPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LastModificationTime","CreationTime","LastAccessTime"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filerLifecycleAgingPolicyTypeAgingCriteriaPropEnum = append(filerLifecycleAgingPolicyTypeAgingCriteriaPropEnum, v) - } -} - -const ( - - // FilerLifecycleAgingPolicyAgingCriteriaLastModificationTime captures enum value "LastModificationTime" - FilerLifecycleAgingPolicyAgingCriteriaLastModificationTime string = "LastModificationTime" - - // FilerLifecycleAgingPolicyAgingCriteriaCreationTime captures enum value "CreationTime" - FilerLifecycleAgingPolicyAgingCriteriaCreationTime string = "CreationTime" - - // FilerLifecycleAgingPolicyAgingCriteriaLastAccessTime captures enum value "LastAccessTime" - FilerLifecycleAgingPolicyAgingCriteriaLastAccessTime string = "LastAccessTime" -) - -// prop value enum -func (m *FilerLifecycleAgingPolicy) validateAgingCriteriaEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filerLifecycleAgingPolicyTypeAgingCriteriaPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilerLifecycleAgingPolicy) validateAgingCriteria(formats strfmt.Registry) error { - - if err := validate.Required("agingCriteria", "body", m.AgingCriteria); err != nil { - return err - } - - // value enum - if err := m.validateAgingCriteriaEnum("agingCriteria", "body", *m.AgingCriteria); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this filer lifecycle aging policy based on context it is used -func (m *FilerLifecycleAgingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilerLifecycleAgingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerLifecycleAgingPolicy) UnmarshalBinary(b []byte) error { - var res FilerLifecycleAgingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_lifecycle_management.go b/v2/models/filer_lifecycle_management.go deleted file mode 100644 index 83b68ac2..00000000 --- a/v2/models/filer_lifecycle_management.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FilerLifecycleManagement Specifies the filer Lifecycle policy of a NFS/SMB view. If not specified no Lifecycle management is performed for entites in filer view. -// -// swagger:model FilerLifecycleManagement -type FilerLifecycleManagement struct { - - // Specifies Lifecycle configuration rules for a filer view. A maximum of 100 rules can be specified. - Rules []*FilerLifecycleRule `json:"rules"` -} - -// Validate validates this filer lifecycle management -func (m *FilerLifecycleManagement) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRules(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleManagement) validateRules(formats strfmt.Registry) error { - if swag.IsZero(m.Rules) { // not required - return nil - } - - for i := 0; i < len(m.Rules); i++ { - if swag.IsZero(m.Rules[i]) { // not required - continue - } - - if m.Rules[i] != nil { - if err := m.Rules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this filer lifecycle management based on the context it is used -func (m *FilerLifecycleManagement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRules(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleManagement) contextValidateRules(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Rules); i++ { - - if m.Rules[i] != nil { - - if swag.IsZero(m.Rules[i]) { // not required - return nil - } - - if err := m.Rules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilerLifecycleManagement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerLifecycleManagement) UnmarshalBinary(b []byte) error { - var res FilerLifecycleManagement - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_lifecycle_rule.go b/v2/models/filer_lifecycle_rule.go deleted file mode 100644 index a5acc797..00000000 --- a/v2/models/filer_lifecycle_rule.go +++ /dev/null @@ -1,283 +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" -) - -// FilerLifecycleRule Specifies the Lifecycle configuration rule. -// -// swagger:model FilerLifecycleRule -type FilerLifecycleRule struct { - - // Specifies the Unique identifier for the rule. No 2 rules in a policy should have the same name. The value cannot be longer than 255 characters. - // Required: true - Name *string `json:"name"` - - // Specifies if the rule is currently being applied. - // Required: true - // Enum: ["Enabled","Disabled"] - Status *string `json:"status"` - - // Specifies if the rule is Allow or Deny type. - // Required: true - // Enum: ["Allow","Deny"] - Type *string `json:"type"` - - // Specifies the file's selection based on of the following: last modification time, creation time or last access time. This filed is mandatory for rules that are Allow type. Note: Both the fields days and dateInUsecs are mutually exclusive to each other. - AgingPolicy *FilerLifecycleAgingPolicy `json:"agingPolicy,omitempty"` - - // Specifies the filter used to identify files that a Lifecycle Rule applies to. - FileFilter *FilerLifecycleRuleFilter `json:"fileFilter,omitempty"` -} - -// Validate validates this filer lifecycle rule -func (m *FilerLifecycleRule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilter(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleRule) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var filerLifecycleRuleTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Enabled","Disabled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filerLifecycleRuleTypeStatusPropEnum = append(filerLifecycleRuleTypeStatusPropEnum, v) - } -} - -const ( - - // FilerLifecycleRuleStatusEnabled captures enum value "Enabled" - FilerLifecycleRuleStatusEnabled string = "Enabled" - - // FilerLifecycleRuleStatusDisabled captures enum value "Disabled" - FilerLifecycleRuleStatusDisabled string = "Disabled" -) - -// prop value enum -func (m *FilerLifecycleRule) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filerLifecycleRuleTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilerLifecycleRule) validateStatus(formats strfmt.Registry) error { - - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var filerLifecycleRuleTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Allow","Deny"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filerLifecycleRuleTypeTypePropEnum = append(filerLifecycleRuleTypeTypePropEnum, v) - } -} - -const ( - - // FilerLifecycleRuleTypeAllow captures enum value "Allow" - FilerLifecycleRuleTypeAllow string = "Allow" - - // FilerLifecycleRuleTypeDeny captures enum value "Deny" - FilerLifecycleRuleTypeDeny string = "Deny" -) - -// prop value enum -func (m *FilerLifecycleRule) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filerLifecycleRuleTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilerLifecycleRule) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *FilerLifecycleRule) validateAgingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AgingPolicy) { // not required - return nil - } - - if m.AgingPolicy != nil { - if err := m.AgingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agingPolicy") - } - return err - } - } - - return nil -} - -func (m *FilerLifecycleRule) validateFileFilter(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilter) { // not required - return nil - } - - if m.FileFilter != nil { - if err := m.FileFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilter") - } - return err - } - } - - return nil -} - -// ContextValidate validate this filer lifecycle rule based on the context it is used -func (m *FilerLifecycleRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAgingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleRule) contextValidateAgingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AgingPolicy != nil { - - if swag.IsZero(m.AgingPolicy) { // not required - return nil - } - - if err := m.AgingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agingPolicy") - } - return err - } - } - - return nil -} - -func (m *FilerLifecycleRule) contextValidateFileFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilter != nil { - - if swag.IsZero(m.FileFilter) { // not required - return nil - } - - if err := m.FileFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilter") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilerLifecycleRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerLifecycleRule) UnmarshalBinary(b []byte) error { - var res FilerLifecycleRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_lifecycle_rule_filter.go b/v2/models/filer_lifecycle_rule_filter.go deleted file mode 100644 index 1cd02158..00000000 --- a/v2/models/filer_lifecycle_rule_filter.go +++ /dev/null @@ -1,112 +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" -) - -// FilerLifecycleRuleFilter Specifies the filter used to identify files that a Lifecycle Rule applies to. -// -// swagger:model FilerLifecycleRuleFilter -type FilerLifecycleRuleFilter struct { - - // Specifies the file's selection based on their extension. Eg: .pdf, .txt, etc. Note: Provide extensions here with the initial '.' character, example .pdf and not pdf. Extensions are case-insensitive, i.e. .pdf extension in filter will delete all files have .pdf, .PDF, .pDF, etc. - FileExtensions []string `json:"fileExtensions"` - - // Specifies the file's selection based on their size. - FileSize *FilerLifecycleSizeFilter `json:"fileSize,omitempty"` -} - -// Validate validates this filer lifecycle rule filter -func (m *FilerLifecycleRuleFilter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileSize(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleRuleFilter) validateFileSize(formats strfmt.Registry) error { - if swag.IsZero(m.FileSize) { // not required - return nil - } - - if m.FileSize != nil { - if err := m.FileSize.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSize") - } - return err - } - } - - return nil -} - -// ContextValidate validate this filer lifecycle rule filter based on the context it is used -func (m *FilerLifecycleRuleFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileSize(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilerLifecycleRuleFilter) contextValidateFileSize(ctx context.Context, formats strfmt.Registry) error { - - if m.FileSize != nil { - - if swag.IsZero(m.FileSize) { // not required - return nil - } - - if err := m.FileSize.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSize") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilerLifecycleRuleFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerLifecycleRuleFilter) UnmarshalBinary(b []byte) error { - var res FilerLifecycleRuleFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filer_lifecycle_size_filter.go b/v2/models/filer_lifecycle_size_filter.go deleted file mode 100644 index d86ff2f3..00000000 --- a/v2/models/filer_lifecycle_size_filter.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" -) - -// FilerLifecycleSizeFilter Specifies the Lifecycle Size Filter information with minimum and maximum values. -// -// swagger:model FilerLifecycleSizeFilter -type FilerLifecycleSizeFilter struct { - - // Specifies the minimum size in bytes. - MinBytes *uint64 `json:"minBytes,omitempty"` - - // Specifies the maximum size in bytes. - MaxBytes *uint64 `json:"maxBytes,omitempty"` -} - -// Validate validates this filer lifecycle size filter -func (m *FilerLifecycleSizeFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filer lifecycle size filter based on context it is used -func (m *FilerLifecycleSizeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilerLifecycleSizeFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilerLifecycleSizeFilter) UnmarshalBinary(b []byte) error { - var res FilerLifecycleSizeFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/files.go b/v2/models/files.go deleted file mode 100644 index 38259faf..00000000 --- a/v2/models/files.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Files Specifies the indexed files. -// -// swagger:model Files -type Files []*File - -// Validate validates this files -func (m Files) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this files based on the context it is used -func (m Files) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/files_and_folders_object.go b/v2/models/files_and_folders_object.go deleted file mode 100644 index 586899cb..00000000 --- a/v2/models/files_and_folders_object.go +++ /dev/null @@ -1,74 +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" -) - -// FilesAndFoldersObject Specifies a file or folder to download. -// -// swagger:model FilesAndFoldersObject -type FilesAndFoldersObject struct { - - // Specifies the absolute path of the file or folder. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies whether the file or folder object is a directory. - IsDirectory *bool `json:"isDirectory,omitempty"` -} - -// Validate validates this files and folders object -func (m *FilesAndFoldersObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesAndFoldersObject) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this files and folders object based on context it is used -func (m *FilesAndFoldersObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilesAndFoldersObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesAndFoldersObject) UnmarshalBinary(b []byte) error { - var res FilesAndFoldersObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/files_stats.go b/v2/models/files_stats.go deleted file mode 100644 index 80a854b1..00000000 --- a/v2/models/files_stats.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FilesStats Specifies the files stats. -// -// swagger:model FilesStats -type FilesStats struct { - - // Specifies a list of file stats for entities. - FilesStats []*FilesStatsForEntity `json:"filesStats"` - - // Specifies the aggregated distribution by size of files stored in the Cohesity cluster. - FileSizeDistribution []*FileCount `json:"fileSizeDistribution"` -} - -// Validate validates this files stats -func (m *FilesStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileSizeDistribution(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesStats) validateFilesStats(formats strfmt.Registry) error { - if swag.IsZero(m.FilesStats) { // not required - return nil - } - - for i := 0; i < len(m.FilesStats); i++ { - if swag.IsZero(m.FilesStats[i]) { // not required - continue - } - - if m.FilesStats[i] != nil { - if err := m.FilesStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilesStats) validateFileSizeDistribution(formats strfmt.Registry) error { - if swag.IsZero(m.FileSizeDistribution) { // not required - return nil - } - - for i := 0; i < len(m.FileSizeDistribution); i++ { - if swag.IsZero(m.FileSizeDistribution[i]) { // not required - continue - } - - if m.FileSizeDistribution[i] != nil { - if err := m.FileSizeDistribution[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeDistribution" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeDistribution" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this files stats based on the context it is used -func (m *FilesStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileSizeDistribution(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesStats) contextValidateFilesStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesStats); i++ { - - if m.FilesStats[i] != nil { - - if swag.IsZero(m.FilesStats[i]) { // not required - return nil - } - - if err := m.FilesStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilesStats) contextValidateFileSizeDistribution(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileSizeDistribution); i++ { - - if m.FileSizeDistribution[i] != nil { - - if swag.IsZero(m.FileSizeDistribution[i]) { // not required - return nil - } - - if err := m.FileSizeDistribution[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileSizeDistribution" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileSizeDistribution" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilesStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesStats) UnmarshalBinary(b []byte) error { - var res FilesStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/files_stats_for_entity.go b/v2/models/files_stats_for_entity.go deleted file mode 100644 index 50be733e..00000000 --- a/v2/models/files_stats_for_entity.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FilesStatsForEntity Specifies the files stats for an entity. -// -// swagger:model FilesStatsForEntity -type FilesStatsForEntity struct { - - // Specifies the cluster id of the entity. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id of the entity. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the entity id. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the entity name. - EntityName *string `json:"entityName,omitempty"` - - // Specifies the entity type. - // Enum: ["kCluster","kStorageDomain"] - EntityType *string `json:"entityType,omitempty"` - - // Specifies a list of files stats for the entity. - FilesStats []*FileStats `json:"filesStats"` -} - -// Validate validates this files stats for entity -func (m *FilesStatsForEntity) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilesStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var filesStatsForEntityTypeEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kStorageDomain"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filesStatsForEntityTypeEntityTypePropEnum = append(filesStatsForEntityTypeEntityTypePropEnum, v) - } -} - -const ( - - // FilesStatsForEntityEntityTypeKCluster captures enum value "kCluster" - FilesStatsForEntityEntityTypeKCluster string = "kCluster" - - // FilesStatsForEntityEntityTypeKStorageDomain captures enum value "kStorageDomain" - FilesStatsForEntityEntityTypeKStorageDomain string = "kStorageDomain" -) - -// prop value enum -func (m *FilesStatsForEntity) validateEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filesStatsForEntityTypeEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilesStatsForEntity) validateEntityType(formats strfmt.Registry) error { - if swag.IsZero(m.EntityType) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypeEnum("entityType", "body", *m.EntityType); err != nil { - return err - } - - return nil -} - -func (m *FilesStatsForEntity) validateFilesStats(formats strfmt.Registry) error { - if swag.IsZero(m.FilesStats) { // not required - return nil - } - - for i := 0; i < len(m.FilesStats); i++ { - if swag.IsZero(m.FilesStats[i]) { // not required - continue - } - - if m.FilesStats[i] != nil { - if err := m.FilesStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this files stats for entity based on the context it is used -func (m *FilesStatsForEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilesStatsForEntity) contextValidateFilesStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesStats); i++ { - - if m.FilesStats[i] != nil { - - if swag.IsZero(m.FilesStats[i]) { // not required - return nil - } - - if err := m.FilesStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilesStatsForEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesStatsForEntity) UnmarshalBinary(b []byte) error { - var res FilesStatsForEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filter.go b/v2/models/filter.go deleted file mode 100644 index 69d347e4..00000000 --- a/v2/models/filter.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" -) - -// Filter Specifies the filter details. -// -// swagger:model Filter -type Filter struct { - - // Specifies the filter string using wildcard supported strings or regular expressions. - FilterString *string `json:"filterString,omitempty"` - - // Specifies whether the provided filter string is a regular expression or not. This needs to be explicitly set to true if user is trying to filter by regular expressions. Not providing this value in case of regular expression can result in unintended results. The default value is assumed to be false. - IsRegularExpression *bool `json:"isRegularExpression,omitempty"` -} - -// Validate validates this filter -func (m *Filter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filter based on context it is used -func (m *Filter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Filter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Filter) UnmarshalBinary(b []byte) error { - var res Filter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filter_documents_params.go b/v2/models/filter_documents_params.go deleted file mode 100644 index dcbb28f9..00000000 --- a/v2/models/filter_documents_params.go +++ /dev/null @@ -1,118 +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" -) - -// FilterDocumentsParams Recover Couchbase Object Params. -// -// Specifies the parameters to filter documents to be restored. -// -// swagger:model FilterDocumentsParams -type FilterDocumentsParams struct { - - // Specifies the filter type for Documents to be restored. - // Required: true - // Enum: ["NONE","ID","CONTENT"] - DocumentFilterType *string `json:"documentFilterType"` - - // A regular expression to match Documents ID's to be restored. - IDRegex *string `json:"idRegex,omitempty"` - - // A filter expression to match Documents content to be restored. - FilterExpression *string `json:"filterExpression,omitempty"` -} - -// Validate validates this filter documents params -func (m *FilterDocumentsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentFilterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var filterDocumentsParamsTypeDocumentFilterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NONE","ID","CONTENT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filterDocumentsParamsTypeDocumentFilterTypePropEnum = append(filterDocumentsParamsTypeDocumentFilterTypePropEnum, v) - } -} - -const ( - - // FilterDocumentsParamsDocumentFilterTypeNONE captures enum value "NONE" - FilterDocumentsParamsDocumentFilterTypeNONE string = "NONE" - - // FilterDocumentsParamsDocumentFilterTypeID captures enum value "ID" - FilterDocumentsParamsDocumentFilterTypeID string = "ID" - - // FilterDocumentsParamsDocumentFilterTypeCONTENT captures enum value "CONTENT" - FilterDocumentsParamsDocumentFilterTypeCONTENT string = "CONTENT" -) - -// prop value enum -func (m *FilterDocumentsParams) validateDocumentFilterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filterDocumentsParamsTypeDocumentFilterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilterDocumentsParams) validateDocumentFilterType(formats strfmt.Registry) error { - - if err := validate.Required("documentFilterType", "body", m.DocumentFilterType); err != nil { - return err - } - - // value enum - if err := m.validateDocumentFilterTypeEnum("documentFilterType", "body", *m.DocumentFilterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this filter documents params based on context it is used -func (m *FilterDocumentsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilterDocumentsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilterDocumentsParams) UnmarshalBinary(b []byte) error { - var res FilterDocumentsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filter_ip_config.go b/v2/models/filter_ip_config.go deleted file mode 100644 index e6643941..00000000 --- a/v2/models/filter_ip_config.go +++ /dev/null @@ -1,55 +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" -) - -// FilterIPConfig Filter IP Configuration -// -// Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. -// -// swagger:model FilterIpConfig -type FilterIPConfig struct { - - // Specifies the IP addresses that should not be used during recovery recovery. Cannot be set if allowedIpAddresses is set. - DeniedIPAddresses []string `json:"deniedIpAddresses"` - - // Specifies the IP addresses that should be used exclusively during recovery. Cannot be set if deniedIpAddresses is set. - AllowedIPAddresses []string `json:"allowedIpAddresses"` -} - -// Validate validates this filter Ip config -func (m *FilterIPConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filter Ip config based on context it is used -func (m *FilterIPConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilterIPConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilterIPConfig) UnmarshalBinary(b []byte) error { - var res FilterIPConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filter_objects_request.go b/v2/models/filter_objects_request.go deleted file mode 100644 index bd7b35dd..00000000 --- a/v2/models/filter_objects_request.go +++ /dev/null @@ -1,263 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FilterObjectsRequest Specifies the filter details. -// -// swagger:model FilterObjectsRequest -type FilterObjectsRequest struct { - - // Specifies the type of filtering user wants to perform. Currently, we only support exclude type of filter. - // Required: true - // Enum: ["exclude"] - FilterType *string `json:"filterType"` - - // Specifies the list of filters that need to be applied on given list of discovered objects. - // Required: true - // Min Items: 1 - Filters []*Filter `json:"filters"` - - // Specifies a list of non leaf object ids to filter the leaf level objects. Non leaf object such host (physical or vm) or database instance can be specified. - // Required: true - // Min Items: 1 - // Unique: true - ObjectIds []int64 `json:"objectIds"` - - // Specifies the type of application enviornment needed for filtering to be applied on. This is needed because in case of applications like SQL, Oracle, a single source can contain multiple application enviornments. - // Enum: ["kSQL"] - ApplicationEnvironment *string `json:"applicationEnvironment,omitempty"` - - // TenantIds contains list of the tenant for which objects are to be returned. - TenantIds []string `json:"tenantIds"` - - // If true, the response will include objects which belongs to all tenants which the current user has permission to see. Default value is false. - IncludeTenants *bool `json:"includeTenants,omitempty"` -} - -// Validate validates this filter objects request -func (m *FilterObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplicationEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var filterObjectsRequestTypeFilterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["exclude"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filterObjectsRequestTypeFilterTypePropEnum = append(filterObjectsRequestTypeFilterTypePropEnum, v) - } -} - -const ( - - // FilterObjectsRequestFilterTypeExclude captures enum value "exclude" - FilterObjectsRequestFilterTypeExclude string = "exclude" -) - -// prop value enum -func (m *FilterObjectsRequest) validateFilterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filterObjectsRequestTypeFilterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilterObjectsRequest) validateFilterType(formats strfmt.Registry) error { - - if err := validate.Required("filterType", "body", m.FilterType); err != nil { - return err - } - - // value enum - if err := m.validateFilterTypeEnum("filterType", "body", *m.FilterType); err != nil { - return err - } - - return nil -} - -func (m *FilterObjectsRequest) validateFilters(formats strfmt.Registry) error { - - if err := validate.Required("filters", "body", m.Filters); err != nil { - return err - } - - iFiltersSize := int64(len(m.Filters)) - - if err := validate.MinItems("filters", "body", iFiltersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Filters); i++ { - if swag.IsZero(m.Filters[i]) { // not required - continue - } - - if m.Filters[i] != nil { - if err := m.Filters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FilterObjectsRequest) validateObjectIds(formats strfmt.Registry) error { - - if err := validate.Required("objectIds", "body", m.ObjectIds); err != nil { - return err - } - - iObjectIdsSize := int64(len(m.ObjectIds)) - - if err := validate.MinItems("objectIds", "body", iObjectIdsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objectIds", "body", m.ObjectIds); err != nil { - return err - } - - return nil -} - -var filterObjectsRequestTypeApplicationEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - filterObjectsRequestTypeApplicationEnvironmentPropEnum = append(filterObjectsRequestTypeApplicationEnvironmentPropEnum, v) - } -} - -const ( - - // FilterObjectsRequestApplicationEnvironmentKSQL captures enum value "kSQL" - FilterObjectsRequestApplicationEnvironmentKSQL string = "kSQL" -) - -// prop value enum -func (m *FilterObjectsRequest) validateApplicationEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, filterObjectsRequestTypeApplicationEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FilterObjectsRequest) validateApplicationEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateApplicationEnvironmentEnum("applicationEnvironment", "body", *m.ApplicationEnvironment); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this filter objects request based on the context it is used -func (m *FilterObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilterObjectsRequest) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Filters); i++ { - - if m.Filters[i] != nil { - - if swag.IsZero(m.Filters[i]) { // not required - return nil - } - - if err := m.Filters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilterObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilterObjectsRequest) UnmarshalBinary(b []byte) error { - var res FilterObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filtered_object.go b/v2/models/filtered_object.go deleted file mode 100644 index 35655181..00000000 --- a/v2/models/filtered_object.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" -) - -// FilteredObject Specifies the filter details. -// -// swagger:model FilteredObject -type FilteredObject struct { - - // Specifies object id. - ID *int64 `json:"id,omitempty"` - - // Specifies the source id to which this object belongs to. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this filtered object -func (m *FilteredObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this filtered object based on context it is used -func (m *FilteredObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FilteredObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilteredObject) UnmarshalBinary(b []byte) error { - var res FilteredObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/filtered_objects_response_body.go b/v2/models/filtered_objects_response_body.go deleted file mode 100644 index b72ae20a..00000000 --- a/v2/models/filtered_objects_response_body.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FilteredObjectsResponseBody Specifies the filter details. -// -// swagger:model FilteredObjectsResponseBody -type FilteredObjectsResponseBody struct { - - // Specifies the list of filtered Objects. - FilteredObjects []*FilteredObject `json:"filteredObjects"` -} - -// Validate validates this filtered objects response body -func (m *FilteredObjectsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilteredObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilteredObjectsResponseBody) validateFilteredObjects(formats strfmt.Registry) error { - if swag.IsZero(m.FilteredObjects) { // not required - return nil - } - - for i := 0; i < len(m.FilteredObjects); i++ { - if swag.IsZero(m.FilteredObjects[i]) { // not required - continue - } - - if m.FilteredObjects[i] != nil { - if err := m.FilteredObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteredObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteredObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this filtered objects response body based on the context it is used -func (m *FilteredObjectsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilteredObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FilteredObjectsResponseBody) contextValidateFilteredObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilteredObjects); i++ { - - if m.FilteredObjects[i] != nil { - - if swag.IsZero(m.FilteredObjects[i]) { // not required - return nil - } - - if err := m.FilteredObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filteredObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filteredObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FilteredObjectsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilteredObjectsResponseBody) UnmarshalBinary(b []byte) error { - var res FilteredObjectsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_ip_set.go b/v2/models/firewall_ip_set.go deleted file mode 100644 index 829e1644..00000000 --- a/v2/models/firewall_ip_set.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" - "github.com/go-openapi/validate" -) - -// FirewallIPSet Specifies a firewall IP set information -// -// swagger:model FirewallIPSet -type FirewallIPSet struct { - - // Specifies the name of the IP set. - // Required: true - Name *string `json:"name"` - - // Specifies the subnets in the IP set. - // Required: true - // Min Items: 1 - Subnets []string `json:"subnets"` -} - -// Validate validates this firewall IP set -func (m *FirewallIPSet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallIPSet) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *FirewallIPSet) validateSubnets(formats strfmt.Registry) error { - - if err := validate.Required("subnets", "body", m.Subnets); err != nil { - return err - } - - iSubnetsSize := int64(len(m.Subnets)) - - if err := validate.MinItems("subnets", "body", iSubnetsSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this firewall IP set based on context it is used -func (m *FirewallIPSet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallIPSet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallIPSet) UnmarshalBinary(b []byte) error { - var res FirewallIPSet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_ip_sets.go b/v2/models/firewall_ip_sets.go deleted file mode 100644 index 2277ae31..00000000 --- a/v2/models/firewall_ip_sets.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FirewallIPSets Specifies the list of firewall IP sets. -// -// swagger:model FirewallIPSets -type FirewallIPSets struct { - - // ip sets - // Min Items: 1 - IPSets []*FirewallIPSet `json:"ipSets"` -} - -// Validate validates this firewall IP sets -func (m *FirewallIPSets) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPSets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallIPSets) validateIPSets(formats strfmt.Registry) error { - if swag.IsZero(m.IPSets) { // not required - return nil - } - - iIPSetsSize := int64(len(m.IPSets)) - - if err := validate.MinItems("ipSets", "body", iIPSetsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.IPSets); i++ { - if swag.IsZero(m.IPSets[i]) { // not required - continue - } - - if m.IPSets[i] != nil { - if err := m.IPSets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipSets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipSets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this firewall IP sets based on the context it is used -func (m *FirewallIPSets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIPSets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallIPSets) contextValidateIPSets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IPSets); i++ { - - if m.IPSets[i] != nil { - - if swag.IsZero(m.IPSets[i]) { // not required - return nil - } - - if err := m.IPSets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipSets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipSets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallIPSets) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallIPSets) UnmarshalBinary(b []byte) error { - var res FirewallIPSets - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_profile.go b/v2/models/firewall_profile.go deleted file mode 100644 index d4ce0f2c..00000000 --- a/v2/models/firewall_profile.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FirewallProfile Specifies the firewall profile & their attachments. -// -// swagger:model FirewallProfile -type FirewallProfile struct { - - // Specifies the name of the profile. - // Required: true - Name *string `json:"name"` - - // Specifies the port & direction settings. - GatewayParams []*GatewayParams `json:"gatewayParams,omitempty"` - - // Specifies the profile attachments. - Attachments []*Attachment `json:"attachments,omitempty"` -} - -// Validate validates this firewall profile -func (m *FirewallProfile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGatewayParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAttachments(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfile) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *FirewallProfile) validateGatewayParams(formats strfmt.Registry) error { - if swag.IsZero(m.GatewayParams) { // not required - return nil - } - - for i := 0; i < len(m.GatewayParams); i++ { - if swag.IsZero(m.GatewayParams[i]) { // not required - continue - } - - if m.GatewayParams[i] != nil { - if err := m.GatewayParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gatewayParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gatewayParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FirewallProfile) validateAttachments(formats strfmt.Registry) error { - if swag.IsZero(m.Attachments) { // not required - return nil - } - - for i := 0; i < len(m.Attachments); i++ { - if swag.IsZero(m.Attachments[i]) { // not required - continue - } - - if m.Attachments[i] != nil { - if err := m.Attachments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attachments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attachments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this firewall profile based on the context it is used -func (m *FirewallProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGatewayParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAttachments(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfile) contextValidateGatewayParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GatewayParams); i++ { - - if m.GatewayParams[i] != nil { - - if swag.IsZero(m.GatewayParams[i]) { // not required - return nil - } - - if err := m.GatewayParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gatewayParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gatewayParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FirewallProfile) contextValidateAttachments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Attachments); i++ { - - if m.Attachments[i] != nil { - - if swag.IsZero(m.Attachments[i]) { // not required - return nil - } - - if err := m.Attachments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attachments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attachments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallProfile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallProfile) UnmarshalBinary(b []byte) error { - var res FirewallProfile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_profile_names_params.go b/v2/models/firewall_profile_names_params.go deleted file mode 100644 index d51197c1..00000000 --- a/v2/models/firewall_profile_names_params.go +++ /dev/null @@ -1,71 +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" -) - -// FirewallProfileNamesParams Specifies the firewall profile names to be removed. -// -// swagger:model FirewallProfileNamesParams -type FirewallProfileNamesParams struct { - - // Specifies the list of profile names to be removed. - // Required: true - Names []string `json:"names"` -} - -// Validate validates this firewall profile names params -func (m *FirewallProfileNamesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNames(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfileNamesParams) validateNames(formats strfmt.Registry) error { - - if err := validate.Required("names", "body", m.Names); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this firewall profile names params based on context it is used -func (m *FirewallProfileNamesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallProfileNamesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallProfileNamesParams) UnmarshalBinary(b []byte) error { - var res FirewallProfileNamesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_profile_params.go b/v2/models/firewall_profile_params.go deleted file mode 100644 index fa6ffc08..00000000 --- a/v2/models/firewall_profile_params.go +++ /dev/null @@ -1,192 +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" -) - -// FirewallProfileParams Specifies the firewall profile & their attachments. -// -// swagger:model FirewallProfileParams -type FirewallProfileParams struct { - - // Specifies the name of the profile. - // Required: true - Name *string `json:"name"` - - // Specifies the packet direction settings. - // Enum: ["INPUT","OUTPUT","NAT_INPUT"] - Direction *string `json:"direction,omitempty"` - - // Specifies the port along with the protocol settings. - Ports []string `json:"ports,omitempty"` - - // Specifies the action. - // Required: true - // Enum: ["allow","deny","return"] - Action *string `json:"action"` - - // Specifies a description for the profile attachments. - Description *string `json:"description,omitempty"` - - // Specifies the subnets. - Subnets []string `json:"subnets,omitempty"` - - // Specifies the network interface groups. - InterfaceGroups []string `json:"interfaceGroups,omitempty"` -} - -// Validate validates this firewall profile params -func (m *FirewallProfileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDirection(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfileParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var firewallProfileParamsTypeDirectionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["INPUT","OUTPUT","NAT_INPUT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - firewallProfileParamsTypeDirectionPropEnum = append(firewallProfileParamsTypeDirectionPropEnum, v) - } -} - -const ( - - // FirewallProfileParamsDirectionINPUT captures enum value "INPUT" - FirewallProfileParamsDirectionINPUT string = "INPUT" - - // FirewallProfileParamsDirectionOUTPUT captures enum value "OUTPUT" - FirewallProfileParamsDirectionOUTPUT string = "OUTPUT" - - // FirewallProfileParamsDirectionNATINPUT captures enum value "NAT_INPUT" - FirewallProfileParamsDirectionNATINPUT string = "NAT_INPUT" -) - -// prop value enum -func (m *FirewallProfileParams) validateDirectionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, firewallProfileParamsTypeDirectionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FirewallProfileParams) validateDirection(formats strfmt.Registry) error { - if swag.IsZero(m.Direction) { // not required - return nil - } - - // value enum - if err := m.validateDirectionEnum("direction", "body", *m.Direction); err != nil { - return err - } - - return nil -} - -var firewallProfileParamsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["allow","deny","return"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - firewallProfileParamsTypeActionPropEnum = append(firewallProfileParamsTypeActionPropEnum, v) - } -} - -const ( - - // FirewallProfileParamsActionAllow captures enum value "allow" - FirewallProfileParamsActionAllow string = "allow" - - // FirewallProfileParamsActionDeny captures enum value "deny" - FirewallProfileParamsActionDeny string = "deny" - - // FirewallProfileParamsActionReturn captures enum value "return" - FirewallProfileParamsActionReturn string = "return" -) - -// prop value enum -func (m *FirewallProfileParams) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, firewallProfileParamsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FirewallProfileParams) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this firewall profile params based on context it is used -func (m *FirewallProfileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallProfileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallProfileParams) UnmarshalBinary(b []byte) error { - var res FirewallProfileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/firewall_profiles.go b/v2/models/firewall_profiles.go deleted file mode 100644 index 460360b8..00000000 --- a/v2/models/firewall_profiles.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FirewallProfiles Specifies the firewall profile & their attachments. -// -// swagger:model FirewallProfiles -type FirewallProfiles struct { - - // profiles - Profiles []*FirewallProfile `json:"profiles"` -} - -// Validate validates this firewall profiles -func (m *FirewallProfiles) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProfiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfiles) validateProfiles(formats strfmt.Registry) error { - if swag.IsZero(m.Profiles) { // not required - return nil - } - - for i := 0; i < len(m.Profiles); i++ { - if swag.IsZero(m.Profiles[i]) { // not required - continue - } - - if m.Profiles[i] != nil { - if err := m.Profiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this firewall profiles based on the context it is used -func (m *FirewallProfiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProfiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FirewallProfiles) contextValidateProfiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Profiles); i++ { - - if m.Profiles[i] != nil { - - if swag.IsZero(m.Profiles[i]) { // not required - return nil - } - - if err := m.Profiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FirewallProfiles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FirewallProfiles) UnmarshalBinary(b []byte) error { - var res FirewallProfiles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fixed_issue.go b/v2/models/fixed_issue.go deleted file mode 100644 index cba484af..00000000 --- a/v2/models/fixed_issue.go +++ /dev/null @@ -1,55 +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" -) - -// FixedIssue Fixed Issue. -// -// Specifies the description of a fixed issue. -// -// swagger:model FixedIssue -type FixedIssue struct { - - // Specifies a unique number of the bug. - ID int64 `json:"id,omitempty"` - - // Specifies the description of fix made for the issue. - ReleaseNote string `json:"releaseNote,omitempty"` -} - -// Validate validates this fixed issue -func (m *FixedIssue) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this fixed issue based on context it is used -func (m *FixedIssue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FixedIssue) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FixedIssue) UnmarshalBinary(b []byte) error { - var res FixedIssue - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flash_blade_registration_info.go b/v2/models/flash_blade_registration_info.go deleted file mode 100644 index 448407a1..00000000 --- a/v2/models/flash_blade_registration_info.go +++ /dev/null @@ -1,74 +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" -) - -// FlashBladeRegistrationInfo Specifies the information specific to flashblade registration. -// -// swagger:model FlashBladeRegistrationInfo -type FlashBladeRegistrationInfo struct { - - // Specifies management ip of pure flashblade server. - IP *string `json:"ip,omitempty"` - - // Specifies the api token of the pure flashblade. - // Required: true - APIToken *string `json:"apiToken"` -} - -// Validate validates this flash blade registration info -func (m *FlashBladeRegistrationInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAPIToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashBladeRegistrationInfo) validateAPIToken(formats strfmt.Registry) error { - - if err := validate.Required("apiToken", "body", m.APIToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this flash blade registration info based on context it is used -func (m *FlashBladeRegistrationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashBladeRegistrationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashBladeRegistrationInfo) UnmarshalBinary(b []byte) error { - var res FlashBladeRegistrationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_object_params.go b/v2/models/flashblade_object_params.go deleted file mode 100644 index 0a4f1caa..00000000 --- a/v2/models/flashblade_object_params.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" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FlashbladeObjectParams Specifies the common parameters for Flashblade objects. -// -// swagger:model FlashbladeObjectParams -type FlashbladeObjectParams struct { - - // Specifies a list of NAS mount protocols supported by this object. - SupportedNasMountProtocols []string `json:"supportedNasMountProtocols"` -} - -// Validate validates this flashblade object params -func (m *FlashbladeObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSupportedNasMountProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var flashbladeObjectParamsSupportedNasMountProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs2","kHttp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashbladeObjectParamsSupportedNasMountProtocolsItemsEnum = append(flashbladeObjectParamsSupportedNasMountProtocolsItemsEnum, v) - } -} - -func (m *FlashbladeObjectParams) validateSupportedNasMountProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashbladeObjectParamsSupportedNasMountProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashbladeObjectParams) validateSupportedNasMountProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedNasMountProtocols) { // not required - return nil - } - - for i := 0; i < len(m.SupportedNasMountProtocols); i++ { - - // value enum - if err := m.validateSupportedNasMountProtocolsItemsEnum("supportedNasMountProtocols"+"."+strconv.Itoa(i), "body", m.SupportedNasMountProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this flashblade object params based on context it is used -func (m *FlashbladeObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeObjectParams) UnmarshalBinary(b []byte) error { - var res FlashbladeObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_object_protection_params.go b/v2/models/flashblade_object_protection_params.go deleted file mode 100644 index 9b5d9b88..00000000 --- a/v2/models/flashblade_object_protection_params.go +++ /dev/null @@ -1,117 +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" -) - -// FlashbladeObjectProtectionParams Specifies the parameters which are specific to Flashblade object protection. -// -// swagger:model FlashbladeObjectProtectionParams -type FlashbladeObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` -} - -// Validate validates this flashblade object protection params -func (m *FlashbladeObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var flashbladeObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashbladeObjectProtectionParamsTypeProtocolPropEnum = append(flashbladeObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // FlashbladeObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - FlashbladeObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // FlashbladeObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - FlashbladeObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // FlashbladeObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - FlashbladeObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // FlashbladeObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - FlashbladeObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // FlashbladeObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - FlashbladeObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // FlashbladeObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - FlashbladeObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *FlashbladeObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashbladeObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashbladeObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this flashblade object protection params based on context it is used -func (m *FlashbladeObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res FlashbladeObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_object_protection_request_params.go b/v2/models/flashblade_object_protection_request_params.go deleted file mode 100644 index 34ebf8b4..00000000 --- a/v2/models/flashblade_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FlashbladeObjectProtectionRequestParams Specifies the parameters which are specific to Flashblade object protection. -// -// swagger:model FlashbladeObjectProtectionRequestParams -type FlashbladeObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - FlashbladeObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *FlashbladeObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 FlashbladeObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.FlashbladeObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m FlashbladeObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.FlashbladeObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this flashblade object protection request params -func (m *FlashbladeObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this flashblade object protection request params based on the context it is used -func (m *FlashbladeObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res FlashbladeObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_object_protection_response_params.go b/v2/models/flashblade_object_protection_response_params.go deleted file mode 100644 index 3766ac58..00000000 --- a/v2/models/flashblade_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// FlashbladeObjectProtectionResponseParams Specifies the parameters which are specific to Flashblade object protection. -// -// swagger:model FlashbladeObjectProtectionResponseParams -type FlashbladeObjectProtectionResponseParams struct { - CommonNasProtectionParams - - FlashbladeObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *FlashbladeObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 FlashbladeObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.FlashbladeObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m FlashbladeObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.FlashbladeObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this flashblade object protection response params -func (m *FlashbladeObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this flashblade object protection response params based on the context it is used -func (m *FlashbladeObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res FlashbladeObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_object_protection_update_request_params.go b/v2/models/flashblade_object_protection_update_request_params.go deleted file mode 100644 index c0147e47..00000000 --- a/v2/models/flashblade_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// FlashbladeObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Flashblade object protection. -// -// swagger:model FlashbladeObjectProtectionUpdateRequestParams -type FlashbladeObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - FlashbladeObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *FlashbladeObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 FlashbladeObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.FlashbladeObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m FlashbladeObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.FlashbladeObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this flashblade object protection update request params -func (m *FlashbladeObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this flashblade object protection update request params based on the context it is used -func (m *FlashbladeObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with FlashbladeObjectProtectionParams - if err := m.FlashbladeObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res FlashbladeObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_params.go b/v2/models/flashblade_params.go deleted file mode 100644 index 9582151a..00000000 --- a/v2/models/flashblade_params.go +++ /dev/null @@ -1,274 +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" -) - -// FlashbladeParams Specifies the information related to Registered Pure Flashblade. -// -// swagger:model FlashbladeParams -type FlashbladeParams struct { - - // Specifies the parameters to register a VMware Protection Source. - RegistrationParams *FlashBladeRegistrationInfo `json:"registrationParams,omitempty"` - - // Specifies uuid of the pure flashblade server. - // Read Only: true - UUID *string `json:"uuid,omitempty"` - - // Specifies list of data vips that are assigned to cohesity cluster to create nfs share mountpoints. - // Min Items: 1 - AssignedDataVips []string `json:"assignedDataVips"` - - // Specifies the capacity in bytes assigned on pure flashblade for remote storage usage on cohesity cluster. - AssignedCapacityBytes *int64 `json:"assignedCapacityBytes,omitempty"` - - // If true, cohesity cluster uses all available capacity on pure flashblade for remote storage. - IsDedicatedStorage *bool `json:"isDedicatedStorage,omitempty"` - - // Available data vips configured on pure flashblade. - // Read Only: true - AvailableDataVips []*string `json:"availableDataVips"` - - // Available capacity on pure flashblade. - // Read Only: true - AvailableCapacity *int64 `json:"availableCapacity,omitempty"` - - // Number of new file systems created on pure flashblade when assignedCapacityBytes is updated. - // Read Only: true - CreatedFileSystemCount *int64 `json:"createdFileSystemCount,omitempty"` - - // Number of file systems that are updated on pure flashblade when assignedCapacityBytes is updated. - // Read Only: true - UpdatedFileSystemCount *int64 `json:"updatedFileSystemCount,omitempty"` - - // Software OS and version running on pure flashblade - // Read Only: true - SoftwareOsVersion *string `json:"softwareOsVersion,omitempty"` - - // Name of the pure flashblade specified on pure storage. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Total capacity of pure flashblade. - // Read Only: true - TotalCapacity *int64 `json:"totalCapacity,omitempty"` -} - -// Validate validates this flashblade params -func (m *FlashbladeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegistrationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAssignedDataVips(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeParams) validateRegistrationParams(formats strfmt.Registry) error { - if swag.IsZero(m.RegistrationParams) { // not required - return nil - } - - if m.RegistrationParams != nil { - if err := m.RegistrationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationParams") - } - return err - } - } - - return nil -} - -func (m *FlashbladeParams) validateAssignedDataVips(formats strfmt.Registry) error { - if swag.IsZero(m.AssignedDataVips) { // not required - return nil - } - - iAssignedDataVipsSize := int64(len(m.AssignedDataVips)) - - if err := validate.MinItems("assignedDataVips", "body", iAssignedDataVipsSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this flashblade params based on the context it is used -func (m *FlashbladeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegistrationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAvailableDataVips(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAvailableCapacity(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedFileSystemCount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdatedFileSystemCount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSoftwareOsVersion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTotalCapacity(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeParams) contextValidateRegistrationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RegistrationParams != nil { - - if swag.IsZero(m.RegistrationParams) { // not required - return nil - } - - if err := m.RegistrationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationParams") - } - return err - } - } - - return nil -} - -func (m *FlashbladeParams) contextValidateUUID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "uuid", "body", m.UUID); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateAvailableDataVips(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "availableDataVips", "body", []*string(m.AvailableDataVips)); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateAvailableCapacity(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "availableCapacity", "body", m.AvailableCapacity); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateCreatedFileSystemCount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdFileSystemCount", "body", m.CreatedFileSystemCount); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateUpdatedFileSystemCount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "updatedFileSystemCount", "body", m.UpdatedFileSystemCount); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateSoftwareOsVersion(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "softwareOsVersion", "body", m.SoftwareOsVersion); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeParams) contextValidateTotalCapacity(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "totalCapacity", "body", m.TotalCapacity); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeParams) UnmarshalBinary(b []byte) error { - var res FlashbladeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_protection_group_object_params.go b/v2/models/flashblade_protection_group_object_params.go deleted file mode 100644 index 0c713ade..00000000 --- a/v2/models/flashblade_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// FlashbladeProtectionGroupObjectParams Specifies an object protected by a Flashblade Protection Group. -// -// swagger:model FlashbladeProtectionGroupObjectParams -type FlashbladeProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this flashblade protection group object params -func (m *FlashbladeProtectionGroupObjectParams) 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 *FlashbladeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this flashblade protection group object params based on the context it is used -func (m *FlashbladeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res FlashbladeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_protection_group_params.go b/v2/models/flashblade_protection_group_params.go deleted file mode 100644 index 0e90e8dc..00000000 --- a/v2/models/flashblade_protection_group_params.go +++ /dev/null @@ -1,551 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FlashbladeProtectionGroupParams Specifies the parameters which are specific to Flashblade related Protection Groups. -// -// swagger:model FlashbladeProtectionGroupParams -type FlashbladeProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*FlashbladeProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the preferred protocol to use if this device supports multiple protocols. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies whether or not the Protection Group should continue regardless of whether or not an error was encountered. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the protection group should use encryption while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this flashblade protection group params -func (m *FlashbladeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var flashbladeProtectionGroupParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashbladeProtectionGroupParamsTypeProtocolPropEnum = append(flashbladeProtectionGroupParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // FlashbladeProtectionGroupParamsProtocolKNoProtocol captures enum value "kNoProtocol" - FlashbladeProtectionGroupParamsProtocolKNoProtocol string = "kNoProtocol" - - // FlashbladeProtectionGroupParamsProtocolKNfs3 captures enum value "kNfs3" - FlashbladeProtectionGroupParamsProtocolKNfs3 string = "kNfs3" - - // FlashbladeProtectionGroupParamsProtocolKNfs41 captures enum value "kNfs4_1" - FlashbladeProtectionGroupParamsProtocolKNfs41 string = "kNfs4_1" - - // FlashbladeProtectionGroupParamsProtocolKCifs1 captures enum value "kCifs1" - FlashbladeProtectionGroupParamsProtocolKCifs1 string = "kCifs1" - - // FlashbladeProtectionGroupParamsProtocolKCifs2 captures enum value "kCifs2" - FlashbladeProtectionGroupParamsProtocolKCifs2 string = "kCifs2" - - // FlashbladeProtectionGroupParamsProtocolKCifs3 captures enum value "kCifs3" - FlashbladeProtectionGroupParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *FlashbladeProtectionGroupParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashbladeProtectionGroupParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this flashblade protection group params based on the context it is used -func (m *FlashbladeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *FlashbladeProtectionGroupParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res FlashbladeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_protocol.go b/v2/models/flashblade_protocol.go deleted file mode 100644 index 8c9393c8..00000000 --- a/v2/models/flashblade_protocol.go +++ /dev/null @@ -1,110 +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" -) - -// FlashbladeProtocol Flashblade Protocol type. -// -// Flashblade Protocol type. -// -// swagger:model FlashbladeProtocol -type FlashbladeProtocol struct { - - // Specifies Flashblade Protocol type. - // Enum: ["kNfs","kCifs2","kHttp"] - FlashbladeProtocol string `json:"flashbladeProtocol,omitempty"` -} - -// Validate validates this flashblade protocol -func (m *FlashbladeProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFlashbladeProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var flashbladeProtocolTypeFlashbladeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs2","kHttp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - flashbladeProtocolTypeFlashbladeProtocolPropEnum = append(flashbladeProtocolTypeFlashbladeProtocolPropEnum, v) - } -} - -const ( - - // FlashbladeProtocolFlashbladeProtocolKNfs captures enum value "kNfs" - FlashbladeProtocolFlashbladeProtocolKNfs string = "kNfs" - - // FlashbladeProtocolFlashbladeProtocolKCifs2 captures enum value "kCifs2" - FlashbladeProtocolFlashbladeProtocolKCifs2 string = "kCifs2" - - // FlashbladeProtocolFlashbladeProtocolKHTTP captures enum value "kHttp" - FlashbladeProtocolFlashbladeProtocolKHTTP string = "kHttp" -) - -// prop value enum -func (m *FlashbladeProtocol) validateFlashbladeProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, flashbladeProtocolTypeFlashbladeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FlashbladeProtocol) validateFlashbladeProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeProtocol) { // not required - return nil - } - - // value enum - if err := m.validateFlashbladeProtocolEnum("flashbladeProtocol", "body", m.FlashbladeProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this flashblade protocol based on context it is used -func (m *FlashbladeProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeProtocol) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeProtocol) UnmarshalBinary(b []byte) error { - var res FlashbladeProtocol - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/flashblade_registration_params.go b/v2/models/flashblade_registration_params.go deleted file mode 100644 index ecb25ab6..00000000 --- a/v2/models/flashblade_registration_params.go +++ /dev/null @@ -1,200 +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" -) - -// FlashbladeRegistrationParams Flashblade Protection Source. -// -// Specifies parameters to register an Flashblade Source. -// -// swagger:model FlashbladeRegistrationParams -type FlashbladeRegistrationParams struct { - - // Specifies the Hostname or IP Address Endpoint for the Flashblade Source. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the API Token of the Flashblade Source - // Required: true - APIToken *string `json:"apiToken"` - - // Specifies whether or not to back up SMB Volumes. - BackUpSMBVolumes *bool `json:"backUpSMBVolumes,omitempty"` - - // Specifies the credentials for SMB Volumes. Must be specified if backUpSMBVolumes is set to true. - SmbCredentials *SmbMountCredentials `json:"smbCredentials,omitempty"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this flashblade registration params -func (m *FlashbladeRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAPIToken(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeRegistrationParams) validateAPIToken(formats strfmt.Registry) error { - - if err := validate.Required("apiToken", "body", m.APIToken); err != nil { - return err - } - - return nil -} - -func (m *FlashbladeRegistrationParams) validateSmbCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if m.SmbCredentials != nil { - if err := m.SmbCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *FlashbladeRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this flashblade registration params based on the context it is used -func (m *FlashbladeRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSmbCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FlashbladeRegistrationParams) contextValidateSmbCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbCredentials != nil { - - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if err := m.SmbCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *FlashbladeRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FlashbladeRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FlashbladeRegistrationParams) UnmarshalBinary(b []byte) error { - var res FlashbladeRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fleet_config.go b/v2/models/fleet_config.go deleted file mode 100644 index b00e3b51..00000000 --- a/v2/models/fleet_config.go +++ /dev/null @@ -1,229 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// FleetConfig Recover as fleet config. -// -// Specifies various resources while deploying fleet params. -// -// swagger:model FleetConfig -type FleetConfig struct { - - // Specifies the subnet type of the fleet. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetType *string `json:"fleetSubnetType,omitempty"` - - // Specifies the network security groups within above VPC. - FleetTags []*FleetTags `json:"fleetTags"` - - // Specifies the network security groups within above VPC. - FleetNetworkParams *FleetNetworkParams `json:"fleetNetworkParams,omitempty"` -} - -// Validate validates this fleet config -func (m *FleetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetSubnetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFleetNetworkParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fleetConfigTypeFleetSubnetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fleetConfigTypeFleetSubnetTypePropEnum = append(fleetConfigTypeFleetSubnetTypePropEnum, v) - } -} - -const ( - - // FleetConfigFleetSubnetTypeKCluster captures enum value "kCluster" - FleetConfigFleetSubnetTypeKCluster string = "kCluster" - - // FleetConfigFleetSubnetTypeKSourceVM captures enum value "kSourceVM" - FleetConfigFleetSubnetTypeKSourceVM string = "kSourceVM" - - // FleetConfigFleetSubnetTypeKCustom captures enum value "kCustom" - FleetConfigFleetSubnetTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *FleetConfig) validateFleetSubnetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fleetConfigTypeFleetSubnetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FleetConfig) validateFleetSubnetType(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetType) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetTypeEnum("fleetSubnetType", "body", *m.FleetSubnetType); err != nil { - return err - } - - return nil -} - -func (m *FleetConfig) validateFleetTags(formats strfmt.Registry) error { - if swag.IsZero(m.FleetTags) { // not required - return nil - } - - for i := 0; i < len(m.FleetTags); i++ { - if swag.IsZero(m.FleetTags[i]) { // not required - continue - } - - if m.FleetTags[i] != nil { - if err := m.FleetTags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FleetConfig) validateFleetNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.FleetNetworkParams) { // not required - return nil - } - - if m.FleetNetworkParams != nil { - if err := m.FleetNetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this fleet config based on the context it is used -func (m *FleetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFleetTags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFleetNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FleetConfig) contextValidateFleetTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FleetTags); i++ { - - if m.FleetTags[i] != nil { - - if swag.IsZero(m.FleetTags[i]) { // not required - return nil - } - - if err := m.FleetTags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *FleetConfig) contextValidateFleetNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FleetNetworkParams != nil { - - if swag.IsZero(m.FleetNetworkParams) { // not required - return nil - } - - if err := m.FleetNetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fleetNetworkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fleetNetworkParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FleetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetConfig) UnmarshalBinary(b []byte) error { - var res FleetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fleet_network_params.go b/v2/models/fleet_network_params.go deleted file mode 100644 index f4c62dfe..00000000 --- a/v2/models/fleet_network_params.go +++ /dev/null @@ -1,90 +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" -) - -// FleetNetworkParams Fleet Network Params. -// -// Specifies various network params for the fleet. -// -// swagger:model FleetNetworkParams -type FleetNetworkParams struct { - - // Specifies vpc for the fleet. - // Required: true - Vpc *string `json:"vpc"` - - // Specifies subnet for the fleet. - // Required: true - Subnet *string `json:"subnet"` -} - -// Validate validates this fleet network params -func (m *FleetNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVpc(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FleetNetworkParams) validateVpc(formats strfmt.Registry) error { - - if err := validate.Required("vpc", "body", m.Vpc); err != nil { - return err - } - - return nil -} - -func (m *FleetNetworkParams) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this fleet network params based on context it is used -func (m *FleetNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetNetworkParams) UnmarshalBinary(b []byte) error { - var res FleetNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fleet_subnet_type.go b/v2/models/fleet_subnet_type.go deleted file mode 100644 index a5c59aff..00000000 --- a/v2/models/fleet_subnet_type.go +++ /dev/null @@ -1,110 +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" -) - -// FleetSubnetType Fleet Subnet Type -// -// # Fleet Subnet Type -// -// swagger:model FleetSubnetType -type FleetSubnetType struct { - - // Specifies the fleet type of the subnet. - // Enum: ["kCluster","kSourceVM","kCustom"] - FleetSubnetType string `json:"fleetSubnetType,omitempty"` -} - -// Validate validates this fleet subnet type -func (m *FleetSubnetType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFleetSubnetType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fleetSubnetTypeTypeFleetSubnetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kSourceVM","kCustom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fleetSubnetTypeTypeFleetSubnetTypePropEnum = append(fleetSubnetTypeTypeFleetSubnetTypePropEnum, v) - } -} - -const ( - - // FleetSubnetTypeFleetSubnetTypeKCluster captures enum value "kCluster" - FleetSubnetTypeFleetSubnetTypeKCluster string = "kCluster" - - // FleetSubnetTypeFleetSubnetTypeKSourceVM captures enum value "kSourceVM" - FleetSubnetTypeFleetSubnetTypeKSourceVM string = "kSourceVM" - - // FleetSubnetTypeFleetSubnetTypeKCustom captures enum value "kCustom" - FleetSubnetTypeFleetSubnetTypeKCustom string = "kCustom" -) - -// prop value enum -func (m *FleetSubnetType) validateFleetSubnetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fleetSubnetTypeTypeFleetSubnetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FleetSubnetType) validateFleetSubnetType(formats strfmt.Registry) error { - if swag.IsZero(m.FleetSubnetType) { // not required - return nil - } - - // value enum - if err := m.validateFleetSubnetTypeEnum("fleetSubnetType", "body", m.FleetSubnetType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this fleet subnet type based on context it is used -func (m *FleetSubnetType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetSubnetType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetSubnetType) UnmarshalBinary(b []byte) error { - var res FleetSubnetType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/fleet_tags.go b/v2/models/fleet_tags.go deleted file mode 100644 index b7b25364..00000000 --- a/v2/models/fleet_tags.go +++ /dev/null @@ -1,90 +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" -) - -// FleetTags Fleet tags. -// -// Specifies the fleet tag parameters. -// -// swagger:model FleetTags -type FleetTags struct { - - // Specifies key for the fleet tag. - // Required: true - Key *string `json:"key"` - - // Specifies value for the fleet tag. - // Required: true - Value *string `json:"value"` -} - -// Validate validates this fleet tags -func (m *FleetTags) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FleetTags) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *FleetTags) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this fleet tags based on context it is used -func (m *FleetTags) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FleetTags) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FleetTags) UnmarshalBinary(b []byte) error { - var res FleetTags - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/folder_item.go b/v2/models/folder_item.go deleted file mode 100644 index 13cda0a1..00000000 --- a/v2/models/folder_item.go +++ /dev/null @@ -1,77 +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" -) - -// FolderItem Specifies an email folder to recover. -// -// swagger:model FolderItem -type FolderItem struct { - - // Specifies the email folder key. - // Required: true - Key *int64 `json:"key"` - - // Specifies whether to recover the whole email folder. - RecoverEntireFolder *bool `json:"recoverEntireFolder,omitempty"` - - // Specifies a list of item ids to recover. This field is applicable only if 'recoverEntireFolder' is false. - ItemIds []string `json:"itemIds"` -} - -// Validate validates this folder item -func (m *FolderItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FolderItem) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this folder item based on context it is used -func (m *FolderItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FolderItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FolderItem) UnmarshalBinary(b []byte) error { - var res FolderItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/form_field_params.go b/v2/models/form_field_params.go deleted file mode 100644 index 1195b1a9..00000000 --- a/v2/models/form_field_params.go +++ /dev/null @@ -1,325 +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" -) - -// FormFieldParams Parameters to specify a form field -// -// swagger:model FormFieldParams -type FormFieldParams struct { - - // Id to identify the form field. This is also be used for assigning component html ids which can be leveraged for writing automation against the form field. - ID *string `json:"id,omitempty"` - - // Label to be shown on the UI screen - Label *string `json:"label,omitempty"` - - // Key against which the form field value will be returned - Key *string `json:"key,omitempty"` - - // Type of the form field. Available types are 'string', 'password', 'number', 'boolean', 'radioGroup' - Type *string `json:"type,omitempty"` - - // string config - StringConfig *StringFormFieldParams `json:"stringConfig,omitempty"` - - // password config - PasswordConfig *PasswordFormFieldParams `json:"passwordConfig,omitempty"` - - // number config - NumberConfig *NumberFormFieldParams `json:"numberConfig,omitempty"` - - // boolean config - BooleanConfig *BooleanFormFieldParams `json:"booleanConfig,omitempty"` - - // radio group config - RadioGroupConfig *RadioGroupFormFieldParams `json:"radioGroupConfig,omitempty"` -} - -// Validate validates this form field params -func (m *FormFieldParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStringConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePasswordConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNumberConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBooleanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRadioGroupConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormFieldParams) validateStringConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StringConfig) { // not required - return nil - } - - if m.StringConfig != nil { - if err := m.StringConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stringConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stringConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) validatePasswordConfig(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordConfig) { // not required - return nil - } - - if m.PasswordConfig != nil { - if err := m.PasswordConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) validateNumberConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NumberConfig) { // not required - return nil - } - - if m.NumberConfig != nil { - if err := m.NumberConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("numberConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("numberConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) validateBooleanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.BooleanConfig) { // not required - return nil - } - - if m.BooleanConfig != nil { - if err := m.BooleanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("booleanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("booleanConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) validateRadioGroupConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RadioGroupConfig) { // not required - return nil - } - - if m.RadioGroupConfig != nil { - if err := m.RadioGroupConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("radioGroupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("radioGroupConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this form field params based on the context it is used -func (m *FormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStringConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePasswordConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNumberConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBooleanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRadioGroupConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormFieldParams) contextValidateStringConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StringConfig != nil { - - if swag.IsZero(m.StringConfig) { // not required - return nil - } - - if err := m.StringConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stringConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stringConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) contextValidatePasswordConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.PasswordConfig != nil { - - if swag.IsZero(m.PasswordConfig) { // not required - return nil - } - - if err := m.PasswordConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) contextValidateNumberConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NumberConfig != nil { - - if swag.IsZero(m.NumberConfig) { // not required - return nil - } - - if err := m.NumberConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("numberConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("numberConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) contextValidateBooleanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.BooleanConfig != nil { - - if swag.IsZero(m.BooleanConfig) { // not required - return nil - } - - if err := m.BooleanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("booleanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("booleanConfig") - } - return err - } - } - - return nil -} - -func (m *FormFieldParams) contextValidateRadioGroupConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RadioGroupConfig != nil { - - if swag.IsZero(m.RadioGroupConfig) { // not required - return nil - } - - if err := m.RadioGroupConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("radioGroupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("radioGroupConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FormFieldParams) UnmarshalBinary(b []byte) error { - var res FormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/form_panel_params.go b/v2/models/form_panel_params.go deleted file mode 100644 index 1664bae5..00000000 --- a/v2/models/form_panel_params.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FormPanelParams Specifies parameters for a form panel. A form panel is a grouping of form fields. -// -// swagger:model FormPanelParams -type FormPanelParams struct { - - // Id to identify the panel. This is also be used for assigning component html ids which can be leveraged for writing automation against the panel. - ID *string `json:"id,omitempty"` - - // Specifies whether the panel is optional and kept behind a toggle slider/collapsed state - Optional *bool `json:"optional,omitempty"` - - // Title for the panel to be shown on UI screen - Title *string `json:"title,omitempty"` - - // Array of fields - Fields []*FormFieldParams `json:"fields"` -} - -// Validate validates this form panel params -func (m *FormPanelParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFields(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormPanelParams) validateFields(formats strfmt.Registry) error { - if swag.IsZero(m.Fields) { // not required - return nil - } - - for i := 0; i < len(m.Fields); i++ { - if swag.IsZero(m.Fields[i]) { // not required - continue - } - - if m.Fields[i] != nil { - if err := m.Fields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this form panel params based on the context it is used -func (m *FormPanelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormPanelParams) contextValidateFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Fields); i++ { - - if m.Fields[i] != nil { - - if swag.IsZero(m.Fields[i]) { // not required - return nil - } - - if err := m.Fields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FormPanelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FormPanelParams) UnmarshalBinary(b []byte) error { - var res FormPanelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/free_disk.go b/v2/models/free_disk.go deleted file mode 100644 index 6c3b82c3..00000000 --- a/v2/models/free_disk.go +++ /dev/null @@ -1,82 +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" -) - -// FreeDisk FreeDisk -// -// Specifies the details of a free disk. -// -// swagger:model FreeDisk -type FreeDisk struct { - - // Specifies the location of disk. - Location *string `json:"location,omitempty"` - - // Specifies serial number of disk. - // Required: true - SerialNumber *string `json:"serialNumber"` - - // Specifies path of disk. - Path *string `json:"path,omitempty"` - - // Size of disk. - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` -} - -// Validate validates this free disk -func (m *FreeDisk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSerialNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FreeDisk) validateSerialNumber(formats strfmt.Registry) error { - - if err := validate.Required("serialNumber", "body", m.SerialNumber); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this free disk based on context it is used -func (m *FreeDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FreeDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FreeDisk) UnmarshalBinary(b []byte) error { - var res FreeDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/free_node_information.go b/v2/models/free_node_information.go deleted file mode 100644 index fa230383..00000000 --- a/v2/models/free_node_information.go +++ /dev/null @@ -1,80 +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" -) - -// FreeNodeInformation Specifies the Metadata of a free Node on the network -// -// swagger:model FreeNodeInformation -type FreeNodeInformation struct { - - // Specifies the ID of the node. - ID *int64 `json:"id,omitempty"` - - // Specifies the serial number of the Chassis the Node is installed in. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Specifies if Node can be connected. - CanConnect *bool `json:"canConnect,omitempty"` - - // Specifies the IPMI IP of the Node. - IpmiIP *string `json:"ipmiIp,omitempty"` - - // List of discovered ipv4/ipv6 addresses of the node. Ip field returns ips as comma separated single string which is incorrect. - Ips []string `json:"ips"` - - // Specifies the serial number of the Node. - NodeSerial *string `json:"nodeSerial,omitempty"` - - // Specifies the position for the UI to display the Node in the Cluster creation page. - NodeUISlot *string `json:"nodeUiSlot,omitempty"` - - // Specifies the number of Node slots present in the Chassis where this Node is installed. - NumSlotsInChassis *uint32 `json:"numSlotsInChassis,omitempty"` - - // Specifies the product model of the node. - ProductModel *string `json:"productModel,omitempty"` - - // Specifies the number of the slot the Node is installed in. - SlotNumber *string `json:"slotNumber,omitempty"` - - // Specifies the version of the software installed on the Node. - SoftwareVersion *string `json:"softwareVersion,omitempty"` -} - -// Validate validates this free node information -func (m *FreeNodeInformation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this free node information based on context it is used -func (m *FreeNodeInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FreeNodeInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FreeNodeInformation) UnmarshalBinary(b []byte) error { - var res FreeNodeInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/free_nodes.go b/v2/models/free_nodes.go deleted file mode 100644 index a7014584..00000000 --- a/v2/models/free_nodes.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FreeNodes Specifies the free nodes information. -// -// swagger:model FreeNodes -type FreeNodes struct { - - // Specifies the list of free nodes. - Nodes []*FreeNodeInformation `json:"nodes"` -} - -// Validate validates this free nodes -func (m *FreeNodes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FreeNodes) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this free nodes based on the context it is used -func (m *FreeNodes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FreeNodes) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FreeNodes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FreeNodes) UnmarshalBinary(b []byte) error { - var res FreeNodes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/frequency_schedule.go b/v2/models/frequency_schedule.go deleted file mode 100644 index da6cfa8e..00000000 --- a/v2/models/frequency_schedule.go +++ /dev/null @@ -1,78 +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" -) - -// FrequencySchedule Daily Schedule -// -// Specifies settings that define a daily schedule for a Protection Policy. -// -// swagger:model FrequencySchedule -type FrequencySchedule struct { - - // Specifies a factor to multiply the unit by, to determine the backup schedule.
Example: If 'frequency' set to 2 and the unit is 'Hours', then Snapshots are backed up every 2 hours.
This field is only applicable if unit is 'Minutes', 'Hours' or 'Days'. - // Required: true - // Minimum: 1 - Frequency *int64 `json:"frequency"` -} - -// Validate validates this frequency schedule -func (m *FrequencySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FrequencySchedule) validateFrequency(formats strfmt.Registry) error { - - if err := validate.Required("frequency", "body", m.Frequency); err != nil { - return err - } - - if err := validate.MinimumInt("frequency", "body", *m.Frequency, 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this frequency schedule based on context it is used -func (m *FrequencySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FrequencySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FrequencySchedule) UnmarshalBinary(b []byte) error { - var res FrequencySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/full_backup_policy.go b/v2/models/full_backup_policy.go deleted file mode 100644 index a8a3e36e..00000000 --- a/v2/models/full_backup_policy.go +++ /dev/null @@ -1,111 +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" -) - -// FullBackupPolicy Full Backup Schedule and Retention. -// -// Specifies full backup settings for a Protection Group. Currently, full backup settings can be specified by using either of 'schedule' or 'schdulesAndRetentions' field. Using 'schdulesAndRetentions' is recommended when multiple full backups need to be configured. If full and incremental backup has common retention then only setting 'schedule' is recommended. -// -// swagger:model FullBackupPolicy -type FullBackupPolicy struct { - - // Specifies the schedule settings for full backup. If 'schdulesAndRetentions' field is already specified then setting 'schedule' field is prohibited. - Schedule *FullSchedule `json:"schedule,omitempty"` -} - -// Validate validates this full backup policy -func (m *FullBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullBackupPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this full backup policy based on the context it is used -func (m *FullBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FullBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FullBackupPolicy) UnmarshalBinary(b []byte) error { - var res FullBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/full_schedule.go b/v2/models/full_schedule.go deleted file mode 100644 index ae7e6f2e..00000000 --- a/v2/models/full_schedule.go +++ /dev/null @@ -1,327 +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" -) - -// FullSchedule Full Schedule -// -// Specifies settings that defines how frequent full backup will be performed for a Protection Group. -// -// swagger:model FullSchedule -type FullSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Days' specifies that Protection Group run starts periodically on every day. For full backup schedule, currently we only support frequecny of 1 which indicates that full backup will be performed daily.
'Weeks' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Months' specifies that new Protection Group runs start monthly on certain day of specific week. This schedule needs 'weekOfMonth' and 'dayOfWeek' fields to be set.
'ProtectOnce' specifies that groups using this policy option will run only once and after that group will permanently be disabled.
Example: To run the Protection Group on Second Sunday of Every Month, following schedule need to be set:
unit: 'Month'
dayOfWeek: 'Sunday'
weekOfMonth: 'Second' - // Required: true - // Enum: ["Days","Weeks","Months","Years","ProtectOnce"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *DaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *WeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *MonthSchedule `json:"monthSchedule,omitempty"` - - // Specifies the year Schedule for Protection Group to start runs on specific day of that year. - YearSchedule *YearSchedule `json:"yearSchedule,omitempty"` -} - -// Validate validates this full schedule -func (m *FullSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYearSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fullScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years","ProtectOnce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fullScheduleTypeUnitPropEnum = append(fullScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // FullScheduleUnitDays captures enum value "Days" - FullScheduleUnitDays string = "Days" - - // FullScheduleUnitWeeks captures enum value "Weeks" - FullScheduleUnitWeeks string = "Weeks" - - // FullScheduleUnitMonths captures enum value "Months" - FullScheduleUnitMonths string = "Months" - - // FullScheduleUnitYears captures enum value "Years" - FullScheduleUnitYears string = "Years" - - // FullScheduleUnitProtectOnce captures enum value "ProtectOnce" - FullScheduleUnitProtectOnce string = "ProtectOnce" -) - -// prop value enum -func (m *FullSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fullScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FullSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *FullSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) validateYearSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if m.YearSchedule != nil { - if err := m.YearSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this full schedule based on the context it is used -func (m *FullSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateYearSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *FullSchedule) contextValidateYearSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.YearSchedule != nil { - - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if err := m.YearSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FullSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FullSchedule) UnmarshalBinary(b []byte) error { - var res FullSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/full_schedule_and_retention.go b/v2/models/full_schedule_and_retention.go deleted file mode 100644 index 8566e3fd..00000000 --- a/v2/models/full_schedule_and_retention.go +++ /dev/null @@ -1,159 +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" -) - -// FullScheduleAndRetention Full Schedule And Retention -// -// Specifies the settings to schedule the full backup and retention for each schedule. -// -// swagger:model FullScheduleAndRetention -type FullScheduleAndRetention struct { - - // Specifies the schedule settings for full backup. - // Required: true - Schedule *FullSchedule `json:"schedule"` - - // Specifies the Retention period for full backup schedule mentioned above. - // Required: true - Retention *Retention `json:"retention"` -} - -// Validate validates this full schedule and retention -func (m *FullScheduleAndRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FullScheduleAndRetention) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *FullScheduleAndRetention) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this full schedule and retention based on the context it is used -func (m *FullScheduleAndRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *FullScheduleAndRetention) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *FullScheduleAndRetention) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *FullScheduleAndRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FullScheduleAndRetention) UnmarshalBinary(b []byte) error { - var res FullScheduleAndRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/full_schedule_unit.go b/v2/models/full_schedule_unit.go deleted file mode 100644 index ee53e7f6..00000000 --- a/v2/models/full_schedule_unit.go +++ /dev/null @@ -1,116 +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" -) - -// FullScheduleUnit FullScheduleUnit -// -// # Full Schedule Units -// -// swagger:model FullScheduleUnit -type FullScheduleUnit struct { - - // Specifies the full schedule unit (including ProtectOnce policy). - // Enum: ["Days","Weeks","Months","Years","ProtectOnce"] - FullScheduleUnit string `json:"fullScheduleUnit,omitempty"` -} - -// Validate validates this full schedule unit -func (m *FullScheduleUnit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullScheduleUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var fullScheduleUnitTypeFullScheduleUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years","ProtectOnce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - fullScheduleUnitTypeFullScheduleUnitPropEnum = append(fullScheduleUnitTypeFullScheduleUnitPropEnum, v) - } -} - -const ( - - // FullScheduleUnitFullScheduleUnitDays captures enum value "Days" - FullScheduleUnitFullScheduleUnitDays string = "Days" - - // FullScheduleUnitFullScheduleUnitWeeks captures enum value "Weeks" - FullScheduleUnitFullScheduleUnitWeeks string = "Weeks" - - // FullScheduleUnitFullScheduleUnitMonths captures enum value "Months" - FullScheduleUnitFullScheduleUnitMonths string = "Months" - - // FullScheduleUnitFullScheduleUnitYears captures enum value "Years" - FullScheduleUnitFullScheduleUnitYears string = "Years" - - // FullScheduleUnitFullScheduleUnitProtectOnce captures enum value "ProtectOnce" - FullScheduleUnitFullScheduleUnitProtectOnce string = "ProtectOnce" -) - -// prop value enum -func (m *FullScheduleUnit) validateFullScheduleUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, fullScheduleUnitTypeFullScheduleUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *FullScheduleUnit) validateFullScheduleUnit(formats strfmt.Registry) error { - if swag.IsZero(m.FullScheduleUnit) { // not required - return nil - } - - // value enum - if err := m.validateFullScheduleUnitEnum("fullScheduleUnit", "body", m.FullScheduleUnit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this full schedule unit based on context it is used -func (m *FullScheduleUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *FullScheduleUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FullScheduleUnit) UnmarshalBinary(b []byte) error { - var res FullScheduleUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/g_c_p_archival_storage_class.go b/v2/models/g_c_p_archival_storage_class.go deleted file mode 100644 index 2a94e552..00000000 --- a/v2/models/g_c_p_archival_storage_class.go +++ /dev/null @@ -1,110 +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" -) - -// GCPArchivalStorageClass GCP Archival Storage Class -// -// Specifies the storage class of GCP External Target of archival purpose type. -// -// swagger:model GCPArchivalStorageClass -type GCPArchivalStorageClass struct { - - // Specifies the storage class of GCP External Target of archival purpose type. - // Enum: ["GCPStandard","GCPColdline","GCPNearline"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this g c p archival storage class -func (m *GCPArchivalStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gCPArchivalStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GCPStandard","GCPColdline","GCPNearline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gCPArchivalStorageClassTypeEnumPropEnum = append(gCPArchivalStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // GCPArchivalStorageClassEnumGCPStandard captures enum value "GCPStandard" - GCPArchivalStorageClassEnumGCPStandard string = "GCPStandard" - - // GCPArchivalStorageClassEnumGCPColdline captures enum value "GCPColdline" - GCPArchivalStorageClassEnumGCPColdline string = "GCPColdline" - - // GCPArchivalStorageClassEnumGCPNearline captures enum value "GCPNearline" - GCPArchivalStorageClassEnumGCPNearline string = "GCPNearline" -) - -// prop value enum -func (m *GCPArchivalStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gCPArchivalStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GCPArchivalStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this g c p archival storage class based on context it is used -func (m *GCPArchivalStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GCPArchivalStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPArchivalStorageClass) UnmarshalBinary(b []byte) error { - var res GCPArchivalStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/g_c_p_tiering_storage_class.go b/v2/models/g_c_p_tiering_storage_class.go deleted file mode 100644 index 17ae3b21..00000000 --- a/v2/models/g_c_p_tiering_storage_class.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GCPTieringStorageClass GCP Tiering Storage Class -// -// Specifies the storage class of GCP External Target of tiering purpose type. -// -// swagger:model GCPTieringStorageClass -type GCPTieringStorageClass struct { - - // Specifies the storage class of GCP External Target of tiering purpose type. - // Enum: ["GCPStandard"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this g c p tiering storage class -func (m *GCPTieringStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gCPTieringStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GCPStandard"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gCPTieringStorageClassTypeEnumPropEnum = append(gCPTieringStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // GCPTieringStorageClassEnumGCPStandard captures enum value "GCPStandard" - GCPTieringStorageClassEnumGCPStandard string = "GCPStandard" -) - -// prop value enum -func (m *GCPTieringStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gCPTieringStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GCPTieringStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this g c p tiering storage class based on context it is used -func (m *GCPTieringStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GCPTieringStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GCPTieringStorageClass) UnmarshalBinary(b []byte) error { - var res GCPTieringStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gaia_generic_params.go b/v2/models/gaia_generic_params.go deleted file mode 100644 index dade1302..00000000 --- a/v2/models/gaia_generic_params.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" -) - -// GaiaGenericParams Specifies the Gaia generic params. -// -// swagger:model GaiaGenericParams -type GaiaGenericParams struct { - - // Specifies the Grpc Method type. - GrpcMethod *string `json:"grpc_method,omitempty"` - - // Specifies the serialized parameters. - GrpcReqSerialized *string `json:"grpc_req_serialized,omitempty"` -} - -// Validate validates this gaia generic params -func (m *GaiaGenericParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gaia generic params based on context it is used -func (m *GaiaGenericParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GaiaGenericParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GaiaGenericParams) UnmarshalBinary(b []byte) error { - var res GaiaGenericParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gaia_generic_result.go b/v2/models/gaia_generic_result.go deleted file mode 100644 index 7ba0f637..00000000 --- a/v2/models/gaia_generic_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" -) - -// GaiaGenericResult Specifies the Gaia generic results. -// -// swagger:model GaiaGenericResult -type GaiaGenericResult struct { - - // Specifies the Grpc Error type. - GrpcError *string `json:"grpc_error,omitempty"` - - // Specifies the serialized result. - GrpcRespSerialized *string `json:"grpc_resp_serialized,omitempty"` -} - -// Validate validates this gaia generic result -func (m *GaiaGenericResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gaia generic result based on context it is used -func (m *GaiaGenericResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GaiaGenericResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GaiaGenericResult) UnmarshalBinary(b []byte) error { - var res GaiaGenericResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gaia_indexing_stats.go b/v2/models/gaia_indexing_stats.go deleted file mode 100644 index 5a8f525e..00000000 --- a/v2/models/gaia_indexing_stats.go +++ /dev/null @@ -1,80 +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" -) - -// GaiaIndexingStats Containes stats about indexing process. -// -// swagger:model GaiaIndexingStats -type GaiaIndexingStats struct { - - // num objects - NumObjects *int64 `json:"numObjects,omitempty"` - - // num snapshots - NumSnapshots *int64 `json:"numSnapshots,omitempty"` - - // num finished objects - NumFinishedObjects *int64 `json:"numFinishedObjects,omitempty"` - - // num finished snapshots - NumFinishedSnapshots *int64 `json:"numFinishedSnapshots,omitempty"` - - // num finished sub objects - NumFinishedSubObjects *int64 `json:"numFinishedSubObjects,omitempty"` - - // num finished docs - NumFinishedDocs *int64 `json:"numFinishedDocs,omitempty"` - - // num converted docs - NumConvertedDocs *int64 `json:"numConvertedDocs,omitempty"` - - // num errors seen - NumErrorsSeen *int64 `json:"numErrorsSeen,omitempty"` - - // num indexed docs - NumIndexedDocs *int64 `json:"numIndexedDocs,omitempty"` - - // Embeddings are created over chunks of a doc - NumIndexedChunks *int64 `json:"numIndexedChunks,omitempty"` - - // num indexed bytes - NumIndexedBytes *int64 `json:"numIndexedBytes,omitempty"` -} - -// Validate validates this gaia indexing stats -func (m *GaiaIndexingStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gaia indexing stats based on context it is used -func (m *GaiaIndexingStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GaiaIndexingStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GaiaIndexingStats) UnmarshalBinary(b []byte) error { - var res GaiaIndexingStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gaia_snapshot_info.go b/v2/models/gaia_snapshot_info.go deleted file mode 100644 index 2741670e..00000000 --- a/v2/models/gaia_snapshot_info.go +++ /dev/null @@ -1,109 +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" -) - -// GaiaSnapshotInfo gaia snapshot info -// -// swagger:model GaiaSnapshotInfo -type GaiaSnapshotInfo struct { - - // snapshot handle - SnapshotHandle *SnapshotHandle `json:"snapshotHandle,omitempty"` -} - -// Validate validates this gaia snapshot info -func (m *GaiaSnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotHandle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GaiaSnapshotInfo) validateSnapshotHandle(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotHandle) { // not required - return nil - } - - if m.SnapshotHandle != nil { - if err := m.SnapshotHandle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotHandle") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gaia snapshot info based on the context it is used -func (m *GaiaSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotHandle(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GaiaSnapshotInfo) contextValidateSnapshotHandle(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotHandle != nil { - - if swag.IsZero(m.SnapshotHandle) { // not required - return nil - } - - if err := m.SnapshotHandle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotHandle") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GaiaSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GaiaSnapshotInfo) UnmarshalBinary(b []byte) error { - var res GaiaSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gateway_params.go b/v2/models/gateway_params.go deleted file mode 100644 index bc0525fc..00000000 --- a/v2/models/gateway_params.go +++ /dev/null @@ -1,111 +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" -) - -// GatewayParams Specifies the port & direction settings. -// -// swagger:model GatewayParams -type GatewayParams struct { - - // Specifies the port along with the protocol settings. For example 22/tcp, 68/udp. - Port *string `json:"port,omitempty"` - - // Specifies the packet direction settings. - // Enum: ["INPUT","OUTPUT","NAT_INPUT"] - Direction *string `json:"direction,omitempty"` -} - -// Validate validates this gateway params -func (m *GatewayParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirection(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gatewayParamsTypeDirectionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["INPUT","OUTPUT","NAT_INPUT"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gatewayParamsTypeDirectionPropEnum = append(gatewayParamsTypeDirectionPropEnum, v) - } -} - -const ( - - // GatewayParamsDirectionINPUT captures enum value "INPUT" - GatewayParamsDirectionINPUT string = "INPUT" - - // GatewayParamsDirectionOUTPUT captures enum value "OUTPUT" - GatewayParamsDirectionOUTPUT string = "OUTPUT" - - // GatewayParamsDirectionNATINPUT captures enum value "NAT_INPUT" - GatewayParamsDirectionNATINPUT string = "NAT_INPUT" -) - -// prop value enum -func (m *GatewayParams) validateDirectionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gatewayParamsTypeDirectionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GatewayParams) validateDirection(formats strfmt.Registry) error { - if swag.IsZero(m.Direction) { // not required - return nil - } - - // value enum - if err := m.validateDirectionEnum("direction", "body", *m.Direction); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this gateway params based on context it is used -func (m *GatewayParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayParams) UnmarshalBinary(b []byte) error { - var res GatewayParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_disk_exclusion_params.go b/v2/models/gcp_disk_exclusion_params.go deleted file mode 100644 index 232b880b..00000000 --- a/v2/models/gcp_disk_exclusion_params.go +++ /dev/null @@ -1,55 +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" -) - -// GcpDiskExclusionParams Gcp Disk Exclusion Params. -// -// Specifies the paramaters to exclude disks attached to GCP VM instances and exclude VMs without disks. -// -// swagger:model GcpDiskExclusionParams -type GcpDiskExclusionParams struct { - - // Raw boolean query given as input by the user to exclude disk. User can input params in raw query form: (<> AND <> AND <> ..) OR (<> AND <> AND <> ..) OR (..) OR (..) OR .. There cannot be an OR operator inside the bracket. Example query: (K1 = V1 AND K2 = V2 AND K3 != V3) OR (K4 = V4 AND K6 != V6). - RawQuery *string `json:"rawQuery,omitempty"` - - // Specifies the paramaters to exclude VM without disks. - ExcludeVMWithNoDisk *bool `json:"excludeVmWithNoDisk,omitempty"` -} - -// Validate validates this gcp disk exclusion params -func (m *GcpDiskExclusionParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gcp disk exclusion params based on context it is used -func (m *GcpDiskExclusionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpDiskExclusionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpDiskExclusionParams) UnmarshalBinary(b []byte) error { - var res GcpDiskExclusionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_native_protection_group_object_params.go b/v2/models/gcp_native_protection_group_object_params.go deleted file mode 100644 index 1b80a04a..00000000 --- a/v2/models/gcp_native_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// GcpNativeProtectionGroupObjectParams GCP Native Protection Group Object Params. -// -// Specifies the object parameters to create GCP Native Protection Group. -// -// swagger:model GcpNativeProtectionGroupObjectParams -type GcpNativeProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the paramaters to exclude disks attached to GCP VM instances. Here only the name of the disks are taken for exclusion. - DiskExclusionNameParams []string `json:"diskExclusionNameParams"` -} - -// Validate validates this gcp native protection group object params -func (m *GcpNativeProtectionGroupObjectParams) 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 *GcpNativeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gcp native protection group object params based on the context it is used -func (m *GcpNativeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpNativeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpNativeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpNativeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res GcpNativeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_native_protection_group_params.go b/v2/models/gcp_native_protection_group_params.go deleted file mode 100644 index 4a35d4c5..00000000 --- a/v2/models/gcp_native_protection_group_params.go +++ /dev/null @@ -1,291 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GcpNativeProtectionGroupParams GCP Native Protection Group Request Params. -// -// Specifies the parameters which are specific to GCP related Protection Groups using GCP native snapshot APIs. Atlease one of tags or objects must be specified. -// -// swagger:model GcpNativeProtectionGroupParams -type GcpNativeProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*GcpNativeProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the paramaters to exclude disks attached to GCP VM instances. - GcpDiskExclusionParams *GcpDiskExclusionParams `json:"gcpDiskExclusionParams,omitempty"` - - // Specifies the indexing policy for VMs in this Group. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Array of Array of VM Tag Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. Optionally specify a list of VMs to exclude from protecting by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. For example a Datacenter is selected to be protected but you want to exclude all the 'Former Employees' VMs in the East and West but keep all the VMs for 'Former Employees' in the South which are also stored in this Datacenter, by specifying the following tag id array: [ [1000, 2221], [1000, 3031] ], where 1000 is the 'Former Employee' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The first inner array [1000, 2221] produces a list of VMs that are both tagged with 'Former Employees' and 'East' (an intersection). The second inner array [1000, 3031] produces a list of VMs that are both tagged with 'Former Employees' and 'West' (an intersection). The outer array combines the list of VMs from the two inner arrays. The list of resulting VMs are excluded from being protected this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` -} - -// Validate validates this gcp native protection group params -func (m *GcpNativeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpDiskExclusionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpNativeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) validateGcpDiskExclusionParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpDiskExclusionParams) { // not required - return nil - } - - if m.GcpDiskExclusionParams != nil { - if err := m.GcpDiskExclusionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpDiskExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpDiskExclusionParams") - } - return err - } - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp native protection group params based on the context it is used -func (m *GcpNativeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpDiskExclusionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpNativeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) contextValidateGcpDiskExclusionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpDiskExclusionParams != nil { - - if swag.IsZero(m.GcpDiskExclusionParams) { // not required - return nil - } - - if err := m.GcpDiskExclusionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpDiskExclusionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpDiskExclusionParams") - } - return err - } - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *GcpNativeProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpNativeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpNativeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res GcpNativeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_protection_group_params.go b/v2/models/gcp_protection_group_params.go deleted file mode 100644 index b9806056..00000000 --- a/v2/models/gcp_protection_group_params.go +++ /dev/null @@ -1,162 +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" -) - -// GcpProtectionGroupParams GCP Protection Group Request Params. -// -// Specifies the parameters which are specific to GCP related Protection Groups. -// -// swagger:model GcpProtectionGroupParams -type GcpProtectionGroupParams struct { - - // Specifies the GCP Protection Group type. - // Required: true - // Enum: ["kNative"] - ProtectionType *string `json:"protectionType"` - - // Specifies the parameters which are specific to GCP related Protection Groups using GCP native snapshot APIs. - NativeProtectionTypeParams *GcpNativeProtectionGroupParams `json:"nativeProtectionTypeParams,omitempty"` -} - -// Validate validates this gcp protection group params -func (m *GcpProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gcpProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpProtectionGroupParamsTypeProtectionTypePropEnum = append(gcpProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // GcpProtectionGroupParamsProtectionTypeKNative captures enum value "kNative" - GcpProtectionGroupParamsProtectionTypeKNative string = "kNative" -) - -// prop value enum -func (m *GcpProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *GcpProtectionGroupParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp protection group params based on the context it is used -func (m *GcpProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpProtectionGroupParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res GcpProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_protection_group_type.go b/v2/models/gcp_protection_group_type.go deleted file mode 100644 index a0f7e73e..00000000 --- a/v2/models/gcp_protection_group_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GcpProtectionGroupType GCP Protection Group type. -// -// GCP Protection Group type. -// -// swagger:model GcpProtectionGroupType -type GcpProtectionGroupType struct { - - // Specifies GCP Protection Group type. - // Enum: ["kNative"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this gcp protection group type -func (m *GcpProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gcpProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gcpProtectionGroupTypeTypeEnvironmentPropEnum = append(gcpProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // GcpProtectionGroupTypeEnvironmentKNative captures enum value "kNative" - GcpProtectionGroupTypeEnvironmentKNative string = "kNative" -) - -// prop value enum -func (m *GcpProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gcpProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GcpProtectionGroupType) 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 validates this gcp protection group type based on context it is used -func (m *GcpProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpProtectionGroupType) UnmarshalBinary(b []byte) error { - var res GcpProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_recover_files_new_target_config.go b/v2/models/gcp_recover_files_new_target_config.go deleted file mode 100644 index c1fe87fc..00000000 --- a/v2/models/gcp_recover_files_new_target_config.go +++ /dev/null @@ -1,178 +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" -) - -// GcpRecoverFilesNewTargetConfig GCP Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to a new target. -// -// swagger:model GcpRecoverFilesNewTargetConfig -type GcpRecoverFilesNewTargetConfig struct { - - // Specifies the path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this gcp recover files new target config -func (m *GcpRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *GcpRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *GcpRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp recover files new target config based on the context it is used -func (m *GcpRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *GcpRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res GcpRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_recover_files_original_target_config.go b/v2/models/gcp_recover_files_original_target_config.go deleted file mode 100644 index 4da0331f..00000000 --- a/v2/models/gcp_recover_files_original_target_config.go +++ /dev/null @@ -1,132 +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" -) - -// GcpRecoverFilesOriginalTargetConfig GCP Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model GcpRecoverFilesOriginalTargetConfig -type GcpRecoverFilesOriginalTargetConfig struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this gcp recover files original target config -func (m *GcpRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *GcpRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp recover files original target config based on the context it is used -func (m *GcpRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res GcpRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_target_params_for_recover_file_and_folder.go b/v2/models/gcp_target_params_for_recover_file_and_folder.go deleted file mode 100644 index 2eb85d4f..00000000 --- a/v2/models/gcp_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// GcpTargetParamsForRecoverFileAndFolder GCP Target Params for Recover File And Folder -// -// Specifies the parameters for a GCP recovery target. -// -// swagger:model GcpTargetParamsForRecoverFileAndFolder -type GcpTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to override the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of files or folders failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *GcpRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *GcpRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this gcp target params for recover file and folder -func (m *GcpTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp target params for recover file and folder based on the context it is used -func (m *GcpTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res GcpTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_target_params_for_recover_vm.go b/v2/models/gcp_target_params_for_recover_vm.go deleted file mode 100644 index 1c8f07a9..00000000 --- a/v2/models/gcp_target_params_for_recover_vm.go +++ /dev/null @@ -1,168 +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" -) - -// GcpTargetParamsForRecoverVM GCP Recovery Target Params -// -// Specifies the parameters for a GCP recovery target. -// -// swagger:model GcpTargetParamsForRecoverVm -type GcpTargetParamsForRecoverVM struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *GcpVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` -} - -// Validate validates this gcp target params for recover Vm -func (m *GcpTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp target params for recover Vm based on the context it is used -func (m *GcpTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *GcpTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res GcpTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_vm_recovery_target_config.go b/v2/models/gcp_vm_recovery_target_config.go deleted file mode 100644 index 196dbedb..00000000 --- a/v2/models/gcp_vm_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// GcpVMRecoveryTargetConfig GCP VMs Recovery Target Config. -// -// Specifies the target object parameters to recover GCP vms. -// -// swagger:model GcpVmRecoveryTargetConfig -type GcpVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverGcpVMNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this gcp Vm recovery target config -func (m *GcpVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *GcpVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gcp Vm recovery target config based on the context it is used -func (m *GcpVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res GcpVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gcp_vpc_subnet_config.go b/v2/models/gcp_vpc_subnet_config.go deleted file mode 100644 index 6df78c37..00000000 --- a/v2/models/gcp_vpc_subnet_config.go +++ /dev/null @@ -1,112 +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" -) - -// GcpVpcSubnetConfig GCP VPC Subnet Config -// -// Specifies the group of a GCP VPC and the subnet in it. -// -// swagger:model GcpVpcSubnetConfig -type GcpVpcSubnetConfig struct { - - // Specifies the id of the subnet. - // Required: true - SubnetID *int64 `json:"subnetId"` - - // Specifies the name of the subnet. - // Read Only: true - SubnetName *string `json:"subnetName,omitempty"` - - // Specifies the name of the vpc network. - // Read Only: true - VpcName *string `json:"vpcName,omitempty"` -} - -// Validate validates this gcp vpc subnet config -func (m *GcpVpcSubnetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSubnetID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpVpcSubnetConfig) validateSubnetID(formats strfmt.Registry) error { - - if err := validate.Required("subnetId", "body", m.SubnetID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gcp vpc subnet config based on the context it is used -func (m *GcpVpcSubnetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSubnetName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpcName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GcpVpcSubnetConfig) contextValidateSubnetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "subnetName", "body", m.SubnetName); err != nil { - return err - } - - return nil -} - -func (m *GcpVpcSubnetConfig) contextValidateVpcName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "vpcName", "body", m.VpcName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GcpVpcSubnetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpVpcSubnetConfig) UnmarshalBinary(b []byte) error { - var res GcpVpcSubnetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_ca_certificate_request.go b/v2/models/generate_ca_certificate_request.go deleted file mode 100644 index d5d2fba7..00000000 --- a/v2/models/generate_ca_certificate_request.go +++ /dev/null @@ -1,128 +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" -) - -// GenerateCaCertificateRequest Specifies the parameters required to generate CA certificate/key material -// -// swagger:model GenerateCaCertificateRequest -type GenerateCaCertificateRequest struct { - - // Common Name - // Required: true - CommonName *string `json:"commonName"` - - // Organization - // Required: true - Organization *string `json:"organization"` - - // Organizational Unit - OrganizationalUnit string `json:"organizationalUnit,omitempty"` - - // Country - // Required: true - Country *string `json:"country"` - - // Locality - // Required: true - Locality *string `json:"locality"` - - // Duration (in hours) of the CA certificate. - Expiry string `json:"expiry,omitempty"` -} - -// Validate validates this generate ca certificate request -func (m *GenerateCaCertificateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCommonName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrganization(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCountry(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocality(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenerateCaCertificateRequest) validateCommonName(formats strfmt.Registry) error { - - if err := validate.Required("commonName", "body", m.CommonName); err != nil { - return err - } - - return nil -} - -func (m *GenerateCaCertificateRequest) validateOrganization(formats strfmt.Registry) error { - - if err := validate.Required("organization", "body", m.Organization); err != nil { - return err - } - - return nil -} - -func (m *GenerateCaCertificateRequest) validateCountry(formats strfmt.Registry) error { - - if err := validate.Required("country", "body", m.Country); err != nil { - return err - } - - return nil -} - -func (m *GenerateCaCertificateRequest) validateLocality(formats strfmt.Registry) error { - - if err := validate.Required("locality", "body", m.Locality); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this generate ca certificate request based on context it is used -func (m *GenerateCaCertificateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateCaCertificateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateCaCertificateRequest) UnmarshalBinary(b []byte) error { - var res GenerateCaCertificateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_ca_certificate_response.go b/v2/models/generate_ca_certificate_response.go deleted file mode 100644 index 3f79cc44..00000000 --- a/v2/models/generate_ca_certificate_response.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" -) - -// GenerateCaCertificateResponse Specifies the response to generate ca certificate request -// -// swagger:model GenerateCaCertificateResponse -type GenerateCaCertificateResponse struct { - - // Private key of the certificate. - PrivateKey *string `json:"privateKey,omitempty"` - - // Certificate in pem format. - Certificate *string `json:"certificate,omitempty"` -} - -// Validate validates this generate ca certificate response -func (m *GenerateCaCertificateResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate ca certificate response based on context it is used -func (m *GenerateCaCertificateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateCaCertificateResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateCaCertificateResponse) UnmarshalBinary(b []byte) error { - var res GenerateCaCertificateResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_csr_response.go b/v2/models/generate_csr_response.go deleted file mode 100644 index 64bc8580..00000000 --- a/v2/models/generate_csr_response.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" -) - -// GenerateCsrResponse Specifies the response to generate csr. -// -// swagger:model GenerateCsrResponse -type GenerateCsrResponse struct { - - // Actual private key of the certificate. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies csr in pem format. - CsrPem *string `json:"csrPem,omitempty"` -} - -// Validate validates this generate csr response -func (m *GenerateCsrResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate csr response based on context it is used -func (m *GenerateCsrResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateCsrResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateCsrResponse) UnmarshalBinary(b []byte) error { - var res GenerateCsrResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_m365_device_access_token_request_params.go b/v2/models/generate_m365_device_access_token_request_params.go deleted file mode 100644 index 2f56dfc2..00000000 --- a/v2/models/generate_m365_device_access_token_request_params.go +++ /dev/null @@ -1,55 +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" -) - -// GenerateM365DeviceAccessTokenRequestParams Microsoft365 Device Authorization Access Token request parameters -// -// Specifies the request parameters to generate access token code for Microsoft365 Device Authorization Grant against the specified device code. -// -// swagger:model GenerateM365DeviceAccessTokenRequestParams -type GenerateM365DeviceAccessTokenRequestParams struct { - - // Specifies the Microsoft365 domain. - Domain *string `json:"domain,omitempty"` - - // Specifies the string used to verify the session between the client and the authorization server. The client uses this parameter to request the access token from the authorization server. - DeviceCode *string `json:"deviceCode,omitempty"` -} - -// Validate validates this generate m365 device access token request params -func (m *GenerateM365DeviceAccessTokenRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate m365 device access token request params based on context it is used -func (m *GenerateM365DeviceAccessTokenRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateM365DeviceAccessTokenRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateM365DeviceAccessTokenRequestParams) UnmarshalBinary(b []byte) error { - var res GenerateM365DeviceAccessTokenRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_m365_device_access_token_response_params.go b/v2/models/generate_m365_device_access_token_response_params.go deleted file mode 100644 index f1c5dedd..00000000 --- a/v2/models/generate_m365_device_access_token_response_params.go +++ /dev/null @@ -1,55 +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" -) - -// GenerateM365DeviceAccessTokenResponseParams Microsoft365 Device Authorization Access Token response parameters -// -// Specifies the response parameters for Device Authorization Grant containing the access token for creating Applications through Azure PowerShell. -// -// swagger:model GenerateM365DeviceAccessTokenResponseParams -type GenerateM365DeviceAccessTokenResponseParams struct { - - // Specifies the access token for Microsoft365 Azure PowerShell. - AccessToken *string `json:"accessToken,omitempty"` - - // Specifies the number of seconds before the included access token is valid for. - ExpiresInSecs *int64 `json:"expiresInSecs,omitempty"` -} - -// Validate validates this generate m365 device access token response params -func (m *GenerateM365DeviceAccessTokenResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate m365 device access token response params based on context it is used -func (m *GenerateM365DeviceAccessTokenResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateM365DeviceAccessTokenResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateM365DeviceAccessTokenResponseParams) UnmarshalBinary(b []byte) error { - var res GenerateM365DeviceAccessTokenResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_m365_device_code_request_params.go b/v2/models/generate_m365_device_code_request_params.go deleted file mode 100644 index 64757195..00000000 --- a/v2/models/generate_m365_device_code_request_params.go +++ /dev/null @@ -1,52 +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" -) - -// GenerateM365DeviceCodeRequestParams Microsoft365 Device Authorization User Code Generation parameters -// -// Specifies the request parameters to generate user and device codes for Microsoft365 Device Authorization Grant for Azure PowerShell. -// -// swagger:model GenerateM365DeviceCodeRequestParams -type GenerateM365DeviceCodeRequestParams struct { - - // Specifies the Microsoft365 domain. - Domain *string `json:"domain,omitempty"` -} - -// Validate validates this generate m365 device code request params -func (m *GenerateM365DeviceCodeRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate m365 device code request params based on context it is used -func (m *GenerateM365DeviceCodeRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateM365DeviceCodeRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateM365DeviceCodeRequestParams) UnmarshalBinary(b []byte) error { - var res GenerateM365DeviceCodeRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_m365_device_code_response_params.go b/v2/models/generate_m365_device_code_response_params.go deleted file mode 100644 index 1bfcb24f..00000000 --- a/v2/models/generate_m365_device_code_response_params.go +++ /dev/null @@ -1,64 +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" -) - -// GenerateM365DeviceCodeResponseParams Microsoft365 Device Authorization User Code Response parameters -// -// Specifies the response containing the user and device codes along with the verification URI needed for Device Authorization grant. -// -// swagger:model GenerateM365DeviceCodeResponseParams -type GenerateM365DeviceCodeResponseParams struct { - - // Specifies the string used to verify the session between the client and the authorization server. The client uses this parameter to request the access token from the authorization server. - DeviceCode *string `json:"deviceCode,omitempty"` - - // A short string shown to the user that's used to identify the session on a secondary device. - UserCode *string `json:"userCode,omitempty"` - - // The URI the user should go to with the userCode in order to sign in. - VerificationURI *string `json:"verificationUri,omitempty"` - - // The number of seconds before the deviceCode and userCode expire. - ExpiresInSecs *int64 `json:"expiresInSecs,omitempty"` - - // The number of seconds the client should wait between polling requests to check for token. - IntervalSecs *int64 `json:"intervalSecs,omitempty"` -} - -// Validate validates this generate m365 device code response params -func (m *GenerateM365DeviceCodeResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate m365 device code response params based on context it is used -func (m *GenerateM365DeviceCodeResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateM365DeviceCodeResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateM365DeviceCodeResponseParams) UnmarshalBinary(b []byte) error { - var res GenerateM365DeviceCodeResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_new_certificate_request.go b/v2/models/generate_new_certificate_request.go deleted file mode 100644 index 08cde7d5..00000000 --- a/v2/models/generate_new_certificate_request.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" -) - -// GenerateNewCertificateRequest Specifies the parameters required to generate a certificate. -// -// swagger:model GenerateNewCertificateRequest -type GenerateNewCertificateRequest struct { - CertificateRequestParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GenerateNewCertificateRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CertificateRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CertificateRequestParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GenerateNewCertificateRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CertificateRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this generate new certificate request -func (m *GenerateNewCertificateRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CertificateRequestParams - if err := m.CertificateRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this generate new certificate request based on the context it is used -func (m *GenerateNewCertificateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CertificateRequestParams - if err := m.CertificateRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateNewCertificateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateNewCertificateRequest) UnmarshalBinary(b []byte) error { - var res GenerateNewCertificateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_new_certificate_response.go b/v2/models/generate_new_certificate_response.go deleted file mode 100644 index d3801a12..00000000 --- a/v2/models/generate_new_certificate_response.go +++ /dev/null @@ -1,56 +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" -) - -// GenerateNewCertificateResponse Specifies the response to generate new certificate. -// -// swagger:model GenerateNewCertificateResponse -type GenerateNewCertificateResponse struct { - - // Actual private key of the certificate. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies certificate in pem format. - Certificate *string `json:"certificate,omitempty"` - - // Specifies ca cert in pem format - CaCert []string `json:"caCert,omitempty"` -} - -// Validate validates this generate new certificate response -func (m *GenerateNewCertificateResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate new certificate response based on context it is used -func (m *GenerateNewCertificateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateNewCertificateResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateNewCertificateResponse) UnmarshalBinary(b []byte) error { - var res GenerateNewCertificateResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_sign_csr_request.go b/v2/models/generate_sign_csr_request.go deleted file mode 100644 index 5e95feb8..00000000 --- a/v2/models/generate_sign_csr_request.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" - "github.com/go-openapi/validate" -) - -// GenerateSignCsrRequest Specifies the parameters required to sign a certificate. -// -// swagger:model GenerateSignCsrRequest -type GenerateSignCsrRequest struct { - - // Certificate signing request (csr) in pem format - // Required: true - CsrPem *string `json:"csrPem"` - - // Duration(e.g. 100h) of the certificate - Expiry string `json:"expiry,omitempty"` - - // Specifies the tenant id - TenantID *string `json:"tenantId,omitempty"` - - // Specifies an alternative subject name component to be included in the certificate. It is used to identify the ways the Cluster will be accessed. It is given as a comma separated list of FQDNs. The default value is the Cluster's VIP hostname. - // Min Items: 1 - SanList []string `json:"sanList"` -} - -// Validate validates this generate sign csr request -func (m *GenerateSignCsrRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCsrPem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSanList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenerateSignCsrRequest) validateCsrPem(formats strfmt.Registry) error { - - if err := validate.Required("csrPem", "body", m.CsrPem); err != nil { - return err - } - - return nil -} - -func (m *GenerateSignCsrRequest) validateSanList(formats strfmt.Registry) error { - if swag.IsZero(m.SanList) { // not required - return nil - } - - iSanListSize := int64(len(m.SanList)) - - if err := validate.MinItems("sanList", "body", iSanListSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this generate sign csr request based on context it is used -func (m *GenerateSignCsrRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateSignCsrRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateSignCsrRequest) UnmarshalBinary(b []byte) error { - var res GenerateSignCsrRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generate_sign_csr_response.go b/v2/models/generate_sign_csr_response.go deleted file mode 100644 index 920aafe8..00000000 --- a/v2/models/generate_sign_csr_response.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" -) - -// GenerateSignCsrResponse Specifies the response to sign csr request -// -// swagger:model GenerateSignCsrResponse -type GenerateSignCsrResponse struct { - - // Specifies certificate in pem format. - Certificate *string `json:"certificate,omitempty"` - - // Specifies ca cert in pem format - CaCert []string `json:"caCert,omitempty"` -} - -// Validate validates this generate sign csr response -func (m *GenerateSignCsrResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this generate sign csr response based on context it is used -func (m *GenerateSignCsrResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenerateSignCsrResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenerateSignCsrResponse) UnmarshalBinary(b []byte) error { - var res GenerateSignCsrResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_data_tiering_params.go b/v2/models/generic_nas_data_tiering_params.go deleted file mode 100644 index bb799dc4..00000000 --- a/v2/models/generic_nas_data_tiering_params.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GenericNasDataTieringParams Specifies the parameters which are specific to NAS related Protection Groups. -// -// swagger:model GenericNasDataTieringParams -type GenericNasDataTieringParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - // Specifies the id of the root of data tiering source. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this generic nas data tiering params -func (m *GenericNasDataTieringParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasDataTieringParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this generic nas data tiering params based on the context it is used -func (m *GenericNasDataTieringParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasDataTieringParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasDataTieringParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasDataTieringParams) UnmarshalBinary(b []byte) error { - var res GenericNasDataTieringParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_object_protection_params.go b/v2/models/generic_nas_object_protection_params.go deleted file mode 100644 index c3e1a1cf..00000000 --- a/v2/models/generic_nas_object_protection_params.go +++ /dev/null @@ -1,117 +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" -) - -// GenericNasObjectProtectionParams Specifies the parameters which are specific to Generic NAS object protection. -// -// swagger:model GenericNasObjectProtectionParams -type GenericNasObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` -} - -// Validate validates this generic nas object protection params -func (m *GenericNasObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var genericNasObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - genericNasObjectProtectionParamsTypeProtocolPropEnum = append(genericNasObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // GenericNasObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - GenericNasObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // GenericNasObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - GenericNasObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // GenericNasObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - GenericNasObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // GenericNasObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - GenericNasObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // GenericNasObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - GenericNasObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // GenericNasObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - GenericNasObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *GenericNasObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, genericNasObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GenericNasObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this generic nas object protection params based on context it is used -func (m *GenericNasObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res GenericNasObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_object_protection_request_params.go b/v2/models/generic_nas_object_protection_request_params.go deleted file mode 100644 index b0c19b61..00000000 --- a/v2/models/generic_nas_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GenericNasObjectProtectionRequestParams Specifies the parameters which are specific to Generic NAS object protection. -// -// swagger:model GenericNasObjectProtectionRequestParams -type GenericNasObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - GenericNasObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GenericNasObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 GenericNasObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.GenericNasObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GenericNasObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.GenericNasObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this generic nas object protection request params -func (m *GenericNasObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this generic nas object protection request params based on the context it is used -func (m *GenericNasObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res GenericNasObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_object_protection_response_params.go b/v2/models/generic_nas_object_protection_response_params.go deleted file mode 100644 index 71487a63..00000000 --- a/v2/models/generic_nas_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// GenericNasObjectProtectionResponseParams Specifies the parameters which are specific to Generic NAS object protection. -// -// swagger:model GenericNasObjectProtectionResponseParams -type GenericNasObjectProtectionResponseParams struct { - CommonNasProtectionParams - - GenericNasObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GenericNasObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 GenericNasObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.GenericNasObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GenericNasObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.GenericNasObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this generic nas object protection response params -func (m *GenericNasObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this generic nas object protection response params based on the context it is used -func (m *GenericNasObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res GenericNasObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_object_protection_update_request_params.go b/v2/models/generic_nas_object_protection_update_request_params.go deleted file mode 100644 index 9724b875..00000000 --- a/v2/models/generic_nas_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// GenericNasObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Generic NAS object protection. -// -// swagger:model GenericNasObjectProtectionUpdateRequestParams -type GenericNasObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - GenericNasObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GenericNasObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 GenericNasObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.GenericNasObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GenericNasObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.GenericNasObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this generic nas object protection update request params -func (m *GenericNasObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this generic nas object protection update request params based on the context it is used -func (m *GenericNasObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasObjectProtectionParams - if err := m.GenericNasObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res GenericNasObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_protection_group_extra_params.go b/v2/models/generic_nas_protection_group_extra_params.go deleted file mode 100644 index 2697ebc8..00000000 --- a/v2/models/generic_nas_protection_group_extra_params.go +++ /dev/null @@ -1,123 +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" -) - -// GenericNasProtectionGroupExtraParams Specifies the extra parameters which are specific to NAS related Protection Groups. -// -// swagger:model GenericNasProtectionGroupExtraParams -type GenericNasProtectionGroupExtraParams struct { - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the preferred protocol to use if this device supports multiple protocols. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` -} - -// Validate validates this generic nas protection group extra params -func (m *GenericNasProtectionGroupExtraParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var genericNasProtectionGroupExtraParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - genericNasProtectionGroupExtraParamsTypeProtocolPropEnum = append(genericNasProtectionGroupExtraParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // GenericNasProtectionGroupExtraParamsProtocolKNoProtocol captures enum value "kNoProtocol" - GenericNasProtectionGroupExtraParamsProtocolKNoProtocol string = "kNoProtocol" - - // GenericNasProtectionGroupExtraParamsProtocolKNfs3 captures enum value "kNfs3" - GenericNasProtectionGroupExtraParamsProtocolKNfs3 string = "kNfs3" - - // GenericNasProtectionGroupExtraParamsProtocolKNfs41 captures enum value "kNfs4_1" - GenericNasProtectionGroupExtraParamsProtocolKNfs41 string = "kNfs4_1" - - // GenericNasProtectionGroupExtraParamsProtocolKCifs1 captures enum value "kCifs1" - GenericNasProtectionGroupExtraParamsProtocolKCifs1 string = "kCifs1" - - // GenericNasProtectionGroupExtraParamsProtocolKCifs2 captures enum value "kCifs2" - GenericNasProtectionGroupExtraParamsProtocolKCifs2 string = "kCifs2" - - // GenericNasProtectionGroupExtraParamsProtocolKCifs3 captures enum value "kCifs3" - GenericNasProtectionGroupExtraParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *GenericNasProtectionGroupExtraParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, genericNasProtectionGroupExtraParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GenericNasProtectionGroupExtraParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this generic nas protection group extra params based on context it is used -func (m *GenericNasProtectionGroupExtraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasProtectionGroupExtraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasProtectionGroupExtraParams) UnmarshalBinary(b []byte) error { - var res GenericNasProtectionGroupExtraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_protection_group_params.go b/v2/models/generic_nas_protection_group_params.go deleted file mode 100644 index b6f1b197..00000000 --- a/v2/models/generic_nas_protection_group_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GenericNasProtectionGroupParams Specifies the parameters which are specific to NAS related Protection Groups. -// -// swagger:model GenericNasProtectionGroupParams -type GenericNasProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonGenericNasProtectionParams - - GenericNasProtectionGroupExtraParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GenericNasProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonGenericNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonGenericNasProtectionParams = aO1 - - // AO2 - var aO2 GenericNasProtectionGroupExtraParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.GenericNasProtectionGroupExtraParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GenericNasProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonGenericNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.GenericNasProtectionGroupExtraParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this generic nas protection group params -func (m *GenericNasProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonGenericNasProtectionParams - if err := m.CommonGenericNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasProtectionGroupExtraParams - if err := m.GenericNasProtectionGroupExtraParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this generic nas protection group params based on the context it is used -func (m *GenericNasProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonGenericNasProtectionParams - if err := m.CommonGenericNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GenericNasProtectionGroupExtraParams - if err := m.GenericNasProtectionGroupExtraParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res GenericNasProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/generic_nas_registration_params.go b/v2/models/generic_nas_registration_params.go deleted file mode 100644 index c0b37286..00000000 --- a/v2/models/generic_nas_registration_params.go +++ /dev/null @@ -1,296 +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" -) - -// GenericNasRegistrationParams Generic NAS Protection Source. -// -// Specifies parameters to register GenericNas MountPoint. -// -// swagger:model GenericNasRegistrationParams -type GenericNasRegistrationParams struct { - - // Specifies the MountPoint for Generic NAS Source. - // Required: true - MountPoint *string `json:"mountPoint"` - - // Specifies the mode of the source. - // 'kNfs3' indicates NFS3 mode. - // 'kNfs4_1' indicates NFS4.1 mode. - // 'kCifs1' indicates SMB mode. - // Required: true - // Enum: ["kNfs4_1","kNfs3","kCifs1"] - Mode *string `json:"mode"` - - // Specifies the Description for Generic NAS Source. - Description *string `json:"description,omitempty"` - - // Specifies if validation has to be skipped while registering the mount point. - SkipValidation *bool `json:"skipValidation,omitempty"` - - // Specifies a distinct value that's unique to a source. - UID *UniversalID `json:"uid,omitempty"` - - // Specifies the credentials to mount a SMB view. Must be specified if protocol is set to SMB. - SmbMountCredentials *SmbMountCredentials `json:"smbMountCredentials,omitempty"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this generic nas registration params -func (m *GenericNasRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountPoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbMountCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasRegistrationParams) validateMountPoint(formats strfmt.Registry) error { - - if err := validate.Required("mountPoint", "body", m.MountPoint); err != nil { - return err - } - - return nil -} - -var genericNasRegistrationParamsTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs4_1","kNfs3","kCifs1"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - genericNasRegistrationParamsTypeModePropEnum = append(genericNasRegistrationParamsTypeModePropEnum, v) - } -} - -const ( - - // GenericNasRegistrationParamsModeKNfs41 captures enum value "kNfs4_1" - GenericNasRegistrationParamsModeKNfs41 string = "kNfs4_1" - - // GenericNasRegistrationParamsModeKNfs3 captures enum value "kNfs3" - GenericNasRegistrationParamsModeKNfs3 string = "kNfs3" - - // GenericNasRegistrationParamsModeKCifs1 captures enum value "kCifs1" - GenericNasRegistrationParamsModeKCifs1 string = "kCifs1" -) - -// prop value enum -func (m *GenericNasRegistrationParams) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, genericNasRegistrationParamsTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GenericNasRegistrationParams) validateMode(formats strfmt.Registry) error { - - if err := validate.Required("mode", "body", m.Mode); err != nil { - return err - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -func (m *GenericNasRegistrationParams) validateUID(formats strfmt.Registry) error { - if swag.IsZero(m.UID) { // not required - 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 -} - -func (m *GenericNasRegistrationParams) validateSmbMountCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbMountCredentials) { // not required - return nil - } - - if m.SmbMountCredentials != nil { - if err := m.SmbMountCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbMountCredentials") - } - return err - } - } - - return nil -} - -func (m *GenericNasRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this generic nas registration params based on the context it is used -func (m *GenericNasRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbMountCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GenericNasRegistrationParams) 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 -} - -func (m *GenericNasRegistrationParams) contextValidateSmbMountCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbMountCredentials != nil { - - if swag.IsZero(m.SmbMountCredentials) { // not required - return nil - } - - if err := m.SmbMountCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbMountCredentials") - } - return err - } - } - - return nil -} - -func (m *GenericNasRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GenericNasRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GenericNasRegistrationParams) UnmarshalBinary(b []byte) error { - var res GenericNasRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_connection_bandwidth_response_body.go b/v2/models/get_connection_bandwidth_response_body.go deleted file mode 100644 index 25bcb80d..00000000 --- a/v2/models/get_connection_bandwidth_response_body.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetConnectionBandwidthResponseBody Get Connection Bandwidth Response Body -// -// The response body for put and get connection bandwidth. -// -// swagger:model GetConnectionBandwidthResponseBody -type GetConnectionBandwidthResponseBody struct { - - // Connection Id for which bandwidth settings are to be returned - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the list of connector groups. - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` - - ConnectionBandwidthLimits -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GetConnectionBandwidthResponseBody) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ConnectionID *int64 `json:"connectionId,omitempty"` - - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ConnectionID = dataAO0.ConnectionID - - m.ConnectorGroups = dataAO0.ConnectorGroups - - // AO1 - var aO1 ConnectionBandwidthLimits - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ConnectionBandwidthLimits = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GetConnectionBandwidthResponseBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ConnectionID *int64 `json:"connectionId,omitempty"` - - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` - } - - dataAO0.ConnectionID = m.ConnectionID - - dataAO0.ConnectorGroups = m.ConnectorGroups - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.ConnectionBandwidthLimits) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this get connection bandwidth response body -func (m *GetConnectionBandwidthResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectorGroups(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with ConnectionBandwidthLimits - if err := m.ConnectionBandwidthLimits.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetConnectionBandwidthResponseBody) validateConnectorGroups(formats strfmt.Registry) error { - - if swag.IsZero(m.ConnectorGroups) { // not required - return nil - } - - for i := 0; i < len(m.ConnectorGroups); i++ { - if swag.IsZero(m.ConnectorGroups[i]) { // not required - continue - } - - if m.ConnectorGroups[i] != nil { - if err := m.ConnectorGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get connection bandwidth response body based on the context it is used -func (m *GetConnectionBandwidthResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectorGroups(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with ConnectionBandwidthLimits - if err := m.ConnectionBandwidthLimits.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetConnectionBandwidthResponseBody) contextValidateConnectorGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConnectorGroups); i++ { - - if m.ConnectorGroups[i] != nil { - - if swag.IsZero(m.ConnectorGroups[i]) { // not required - return nil - } - - if err := m.ConnectorGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetConnectionBandwidthResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetConnectionBandwidthResponseBody) UnmarshalBinary(b []byte) error { - var res GetConnectionBandwidthResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_csr_list_response_body.go b/v2/models/get_csr_list_response_body.go deleted file mode 100644 index 6f6e3233..00000000 --- a/v2/models/get_csr_list_response_body.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetCsrListResponseBody Get CSR List response -// -// Specifies the list of CSRs. -// -// swagger:model GetCsrListResponseBody -type GetCsrListResponseBody []*CommonCsrResponseParams - -// Validate validates this get csr list response body -func (m GetCsrListResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this get csr list response body based on the context it is used -func (m GetCsrListResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/get_entity_metadata_result.go b/v2/models/get_entity_metadata_result.go deleted file mode 100644 index fbc82aa0..00000000 --- a/v2/models/get_entity_metadata_result.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetEntityMetadataResult Specifies the response for the GetEntityMetadata. -// -// swagger:model GetEntityMetadataResult -type GetEntityMetadataResult struct { - - // Specifies the source id of the entities whose metadata is being requested. - SourceID int64 `json:"sourceId,omitempty"` - - // Specifies the list of entities with thier metadata. - EntityList []*EntityMetadataParams `json:"entityList"` -} - -// Validate validates this get entity metadata result -func (m *GetEntityMetadataResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetEntityMetadataResult) validateEntityList(formats strfmt.Registry) error { - if swag.IsZero(m.EntityList) { // not required - return nil - } - - for i := 0; i < len(m.EntityList); i++ { - if swag.IsZero(m.EntityList[i]) { // not required - continue - } - - if m.EntityList[i] != nil { - if err := m.EntityList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get entity metadata result based on the context it is used -func (m *GetEntityMetadataResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEntityList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetEntityMetadataResult) contextValidateEntityList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.EntityList); i++ { - - if m.EntityList[i] != nil { - - if swag.IsZero(m.EntityList[i]) { // not required - return nil - } - - if err := m.EntityList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entityList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entityList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetEntityMetadataResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetEntityMetadataResult) UnmarshalBinary(b []byte) error { - var res GetEntityMetadataResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_failover_ops_response.go b/v2/models/get_failover_ops_response.go deleted file mode 100644 index 5aeafa2d..00000000 --- a/v2/models/get_failover_ops_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetFailoverOpsResponse Specifies the response upon requesting a allowed failover operations for a view id -// -// swagger:model GetFailoverOpsResponse -type GetFailoverOpsResponse struct { - - // Failover operations that can be performed corresponding to the view id. - AllowedFailoverOperations []*AllowedFailoverOperation `json:"allowedFailoverOperations"` -} - -// Validate validates this get failover ops response -func (m *GetFailoverOpsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAllowedFailoverOperations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetFailoverOpsResponse) validateAllowedFailoverOperations(formats strfmt.Registry) error { - if swag.IsZero(m.AllowedFailoverOperations) { // not required - return nil - } - - for i := 0; i < len(m.AllowedFailoverOperations); i++ { - if swag.IsZero(m.AllowedFailoverOperations[i]) { // not required - continue - } - - if m.AllowedFailoverOperations[i] != nil { - if err := m.AllowedFailoverOperations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("allowedFailoverOperations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("allowedFailoverOperations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get failover ops response based on the context it is used -func (m *GetFailoverOpsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAllowedFailoverOperations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetFailoverOpsResponse) contextValidateAllowedFailoverOperations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AllowedFailoverOperations); i++ { - - if m.AllowedFailoverOperations[i] != nil { - - if swag.IsZero(m.AllowedFailoverOperations[i]) { // not required - return nil - } - - if err := m.AllowedFailoverOperations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("allowedFailoverOperations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("allowedFailoverOperations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetFailoverOpsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetFailoverOpsResponse) UnmarshalBinary(b []byte) error { - var res GetFailoverOpsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_gaia_indexing_status_params.go b/v2/models/get_gaia_indexing_status_params.go deleted file mode 100644 index c64322b3..00000000 --- a/v2/models/get_gaia_indexing_status_params.go +++ /dev/null @@ -1,109 +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" -) - -// GetGaiaIndexingStatusParams Specifies the Get Index documents params. -// -// swagger:model GetGaiaIndexingStatusParams -type GetGaiaIndexingStatusParams struct { - - // job handle - JobHandle *JobHandle `json:"jobHandle,omitempty"` -} - -// Validate validates this get gaia indexing status params -func (m *GetGaiaIndexingStatusParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJobHandle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetGaiaIndexingStatusParams) validateJobHandle(formats strfmt.Registry) error { - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if m.JobHandle != nil { - if err := m.JobHandle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get gaia indexing status params based on the context it is used -func (m *GetGaiaIndexingStatusParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJobHandle(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetGaiaIndexingStatusParams) contextValidateJobHandle(ctx context.Context, formats strfmt.Registry) error { - - if m.JobHandle != nil { - - if swag.IsZero(m.JobHandle) { // not required - return nil - } - - if err := m.JobHandle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobHandle") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetGaiaIndexingStatusParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetGaiaIndexingStatusParams) UnmarshalBinary(b []byte) error { - var res GetGaiaIndexingStatusParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_gaia_indexing_status_result.go b/v2/models/get_gaia_indexing_status_result.go deleted file mode 100644 index f9500a6f..00000000 --- a/v2/models/get_gaia_indexing_status_result.go +++ /dev/null @@ -1,115 +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" -) - -// GetGaiaIndexingStatusResult Specifies the get indexing status response. -// -// swagger:model GetGaiaIndexingStatusResult -type GetGaiaIndexingStatusResult struct { - - // Whether the indexing is finished. - Finished *bool `json:"finished,omitempty"` - - // Whether cancellation has been scheduled on the job. - CancellationScheduled *bool `json:"cancellationScheduled,omitempty"` - - // stats - Stats *GaiaIndexingStats `json:"stats,omitempty"` -} - -// Validate validates this get gaia indexing status result -func (m *GetGaiaIndexingStatusResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetGaiaIndexingStatusResult) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this get gaia indexing status result based on the context it is used -func (m *GetGaiaIndexingStatusResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetGaiaIndexingStatusResult) 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 -} - -// MarshalBinary interface implementation -func (m *GetGaiaIndexingStatusResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetGaiaIndexingStatusResult) UnmarshalBinary(b []byte) error { - var res GetGaiaIndexingStatusResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_indexed_object_snapshots_response_body.go b/v2/models/get_indexed_object_snapshots_response_body.go deleted file mode 100644 index 178d0599..00000000 --- a/v2/models/get_indexed_object_snapshots_response_body.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetIndexedObjectSnapshotsResponseBody Specifies the snapshots of an indexed object. -// -// swagger:model GetIndexedObjectSnapshotsResponseBody -type GetIndexedObjectSnapshotsResponseBody struct { - - // Specifies a list of snapshots containing the indexed object. - Snapshots []*IndexedObjectSnapshot `json:"snapshots"` -} - -// Validate validates this get indexed object snapshots response body -func (m *GetIndexedObjectSnapshotsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetIndexedObjectSnapshotsResponseBody) validateSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshots) { // not required - return nil - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get indexed object snapshots response body based on the context it is used -func (m *GetIndexedObjectSnapshotsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetIndexedObjectSnapshotsResponseBody) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetIndexedObjectSnapshotsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetIndexedObjectSnapshotsResponseBody) UnmarshalBinary(b []byte) error { - var res GetIndexedObjectSnapshotsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_m365_source_region_endpoint_response_params.go b/v2/models/get_m365_source_region_endpoint_response_params.go deleted file mode 100644 index 7099238d..00000000 --- a/v2/models/get_m365_source_region_endpoint_response_params.go +++ /dev/null @@ -1,131 +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" -) - -// GetM365SourceRegionEndpointResponseParams Microsoft365 OpenId Connect metadata parameter -// -// Specifies the response parameters containing region and various endpoint for Microsoft365 source. -// -// swagger:model GetM365SourceRegionEndpointResponseParams -type GetM365SourceRegionEndpointResponseParams struct { - - // Specifies the scope of the region. For eg NA for North America or AS for Australia. For Azure Gov cloud it can be USG or USGov. - Region *string `json:"region,omitempty"` - - // Specifies the scope of the sub region. - SubRegion *string `json:"subRegion,omitempty"` - - // Specifies the token endpoint of the Microsoft365 source. - TokenEndpoint *string `json:"tokenEndpoint,omitempty"` - - // Specifies the Microsoft graph host url to be used for graph calls. - GraphEndpoint *string `json:"graphEndpoint,omitempty"` - - // Specifies the device authorization endpoint to be used for Microsoft graph calls. - DeviceAuthEndpoint *string `json:"deviceAuthEndpoint,omitempty"` - - // Specifies the tenant region for the given domain. This can be either Default(Commercial), GCC, GCC High or DoD. This is different from the Geo location which is represented by the region parameter. - // Enum: ["Default","China","Germany","UsDoD","UsGccHigh"] - TenantRegion *string `json:"tenantRegion,omitempty"` -} - -// Validate validates this get m365 source region endpoint response params -func (m *GetM365SourceRegionEndpointResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var getM365SourceRegionEndpointResponseParamsTypeTenantRegionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","China","Germany","UsDoD","UsGccHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - getM365SourceRegionEndpointResponseParamsTypeTenantRegionPropEnum = append(getM365SourceRegionEndpointResponseParamsTypeTenantRegionPropEnum, v) - } -} - -const ( - - // GetM365SourceRegionEndpointResponseParamsTenantRegionDefault captures enum value "Default" - GetM365SourceRegionEndpointResponseParamsTenantRegionDefault string = "Default" - - // GetM365SourceRegionEndpointResponseParamsTenantRegionChina captures enum value "China" - GetM365SourceRegionEndpointResponseParamsTenantRegionChina string = "China" - - // GetM365SourceRegionEndpointResponseParamsTenantRegionGermany captures enum value "Germany" - GetM365SourceRegionEndpointResponseParamsTenantRegionGermany string = "Germany" - - // GetM365SourceRegionEndpointResponseParamsTenantRegionUsDoD captures enum value "UsDoD" - GetM365SourceRegionEndpointResponseParamsTenantRegionUsDoD string = "UsDoD" - - // GetM365SourceRegionEndpointResponseParamsTenantRegionUsGccHigh captures enum value "UsGccHigh" - GetM365SourceRegionEndpointResponseParamsTenantRegionUsGccHigh string = "UsGccHigh" -) - -// prop value enum -func (m *GetM365SourceRegionEndpointResponseParams) validateTenantRegionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, getM365SourceRegionEndpointResponseParamsTypeTenantRegionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GetM365SourceRegionEndpointResponseParams) validateTenantRegion(formats strfmt.Registry) error { - if swag.IsZero(m.TenantRegion) { // not required - return nil - } - - // value enum - if err := m.validateTenantRegionEnum("tenantRegion", "body", *m.TenantRegion); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this get m365 source region endpoint response params based on context it is used -func (m *GetM365SourceRegionEndpointResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetM365SourceRegionEndpointResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetM365SourceRegionEndpointResponseParams) UnmarshalBinary(b []byte) error { - var res GetM365SourceRegionEndpointResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_nlm_locks_result.go b/v2/models/get_nlm_locks_result.go deleted file mode 100644 index a8317ba8..00000000 --- a/v2/models/get_nlm_locks_result.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetNlmLocksResult Get NLM locks result. -// -// Specifies the list of NLM locks. -// -// swagger:model GetNlmLocksResult -type GetNlmLocksResult struct { - - // Specifies the list of NLM locks. - FileNlmLocks []*FileNlmLocks `json:"fileNlmLocks"` - - // Specifies the pagination cookie. - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this get nlm locks result -func (m *GetNlmLocksResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileNlmLocks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetNlmLocksResult) validateFileNlmLocks(formats strfmt.Registry) error { - if swag.IsZero(m.FileNlmLocks) { // not required - return nil - } - - for i := 0; i < len(m.FileNlmLocks); i++ { - if swag.IsZero(m.FileNlmLocks[i]) { // not required - continue - } - - if m.FileNlmLocks[i] != nil { - if err := m.FileNlmLocks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileNlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileNlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get nlm locks result based on the context it is used -func (m *GetNlmLocksResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileNlmLocks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetNlmLocksResult) contextValidateFileNlmLocks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileNlmLocks); i++ { - - if m.FileNlmLocks[i] != nil { - - if swag.IsZero(m.FileNlmLocks[i]) { // not required - return nil - } - - if err := m.FileNlmLocks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileNlmLocks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileNlmLocks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetNlmLocksResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetNlmLocksResult) UnmarshalBinary(b []byte) error { - var res GetNlmLocksResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_object_runs_response_body.go b/v2/models/get_object_runs_response_body.go deleted file mode 100644 index 82175514..00000000 --- a/v2/models/get_object_runs_response_body.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetObjectRunsResponseBody Get Object Run Response Body. -// -// Specifies the response body of the get object run request. -// -// swagger:model GetObjectRunsResponseBody -type GetObjectRunsResponseBody struct { - - // Specifies the protection runs of the given object. - ProtectionRuns []*ObjectProtectionRunSummary `json:"protectionRuns"` - - // Specifies the information needed in order to support pagination. This will not be included for the last page of results. - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this get object runs response body -func (m *GetObjectRunsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionRuns(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetObjectRunsResponseBody) validateProtectionRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRuns) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionRuns); i++ { - if swag.IsZero(m.ProtectionRuns[i]) { // not required - continue - } - - if m.ProtectionRuns[i] != nil { - if err := m.ProtectionRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetObjectRunsResponseBody) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get object runs response body based on the context it is used -func (m *GetObjectRunsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetObjectRunsResponseBody) contextValidateProtectionRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionRuns); i++ { - - if m.ProtectionRuns[i] != nil { - - if swag.IsZero(m.ProtectionRuns[i]) { // not required - return nil - } - - if err := m.ProtectionRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetObjectRunsResponseBody) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetObjectRunsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetObjectRunsResponseBody) UnmarshalBinary(b []byte) error { - var res GetObjectRunsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_object_snapshots_response_body.go b/v2/models/get_object_snapshots_response_body.go deleted file mode 100644 index 32a49eaf..00000000 --- a/v2/models/get_object_snapshots_response_body.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetObjectSnapshotsResponseBody Object Snapshots. -// -// Specifies the list of object snapshots. -// -// swagger:model GetObjectSnapshotsResponseBody -type GetObjectSnapshotsResponseBody struct { - - // Specifies the list of snapshots. - Snapshots []*ObjectSnapshot `json:"snapshots"` -} - -// Validate validates this get object snapshots response body -func (m *GetObjectSnapshotsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetObjectSnapshotsResponseBody) validateSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshots) { // not required - return nil - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get object snapshots response body based on the context it is used -func (m *GetObjectSnapshotsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetObjectSnapshotsResponseBody) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetObjectSnapshotsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetObjectSnapshotsResponseBody) UnmarshalBinary(b []byte) error { - var res GetObjectSnapshotsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_p_i_t_ranges_protected_object_response_body.go b/v2/models/get_p_i_t_ranges_protected_object_response_body.go deleted file mode 100644 index 29ba5ec8..00000000 --- a/v2/models/get_p_i_t_ranges_protected_object_response_body.go +++ /dev/null @@ -1,168 +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" -) - -// GetPITRangesProtectedObjectResponseBody Points in time for restore -// -// Specifies the points in time available for restore as a set of one or more time ranges. If the number of available ranges exceeds 1000, then the latest 1000 will be returned. -// -// swagger:model GetPITRangesProtectedObjectResponseBody -type GetPITRangesProtectedObjectResponseBody struct { - CommonPITRangesProtectedObjectResponse - - // Specifies 3 arrays containing range info of types time, SCN, Sequence number. - OracleRestoreRangeInfo *OracleRestoreRangeInfo `json:"oracleRestoreRangeInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GetPITRangesProtectedObjectResponseBody) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonPITRangesProtectedObjectResponse - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonPITRangesProtectedObjectResponse = aO0 - - // AO1 - var dataAO1 struct { - OracleRestoreRangeInfo *OracleRestoreRangeInfo `json:"oracleRestoreRangeInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OracleRestoreRangeInfo = dataAO1.OracleRestoreRangeInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GetPITRangesProtectedObjectResponseBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonPITRangesProtectedObjectResponse) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OracleRestoreRangeInfo *OracleRestoreRangeInfo `json:"oracleRestoreRangeInfo,omitempty"` - } - - dataAO1.OracleRestoreRangeInfo = m.OracleRestoreRangeInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this get p i t ranges protected object response body -func (m *GetPITRangesProtectedObjectResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPITRangesProtectedObjectResponse - if err := m.CommonPITRangesProtectedObjectResponse.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleRestoreRangeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetPITRangesProtectedObjectResponseBody) validateOracleRestoreRangeInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleRestoreRangeInfo) { // not required - return nil - } - - if m.OracleRestoreRangeInfo != nil { - if err := m.OracleRestoreRangeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRestoreRangeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRestoreRangeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get p i t ranges protected object response body based on the context it is used -func (m *GetPITRangesProtectedObjectResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonPITRangesProtectedObjectResponse - if err := m.CommonPITRangesProtectedObjectResponse.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleRestoreRangeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetPITRangesProtectedObjectResponseBody) contextValidateOracleRestoreRangeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleRestoreRangeInfo != nil { - - if swag.IsZero(m.OracleRestoreRangeInfo) { // not required - return nil - } - - if err := m.OracleRestoreRangeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleRestoreRangeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleRestoreRangeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetPITRangesProtectedObjectResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetPITRangesProtectedObjectResponseBody) UnmarshalBinary(b []byte) error { - var res GetPITRangesProtectedObjectResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_protected_object_response.go b/v2/models/get_protected_object_response.go deleted file mode 100644 index 58149ac7..00000000 --- a/v2/models/get_protected_object_response.go +++ /dev/null @@ -1,109 +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" -) - -// GetProtectedObjectResponse Specifies the protected objects response. -// -// swagger:model GetProtectedObjectResponse -type GetProtectedObjectResponse struct { - - // Specifies the protected object backup configuration and lastRun details if it has happned. - Object *ProtectedObjectInfo `json:"object,omitempty"` -} - -// Validate validates this get protected object response -func (m *GetProtectedObjectResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectedObjectResponse) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get protected object response based on the context it is used -func (m *GetProtectedObjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectedObjectResponse) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetProtectedObjectResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetProtectedObjectResponse) UnmarshalBinary(b []byte) error { - var res GetProtectedObjectResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_protected_objects_response.go b/v2/models/get_protected_objects_response.go deleted file mode 100644 index 4b247c43..00000000 --- a/v2/models/get_protected_objects_response.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetProtectedObjectsResponse Specifies the protected objects response. -// -// swagger:model GetProtectedObjectsResponse -type GetProtectedObjectsResponse struct { - - // Specifies the protected object backup configuration and lastRun details if it has happned. - Objects []*ProtectedObjectInfo `json:"objects"` - - // Specifies the information needed in order to support pagination. This will not be included for the last page of results. - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this get protected objects response -func (m *GetProtectedObjectsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectedObjectsResponse) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetProtectedObjectsResponse) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get protected objects response based on the context it is used -func (m *GetProtectedObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectedObjectsResponse) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetProtectedObjectsResponse) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetProtectedObjectsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetProtectedObjectsResponse) UnmarshalBinary(b []byte) error { - var res GetProtectedObjectsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_protection_run_progress_body.go b/v2/models/get_protection_run_progress_body.go deleted file mode 100644 index 84d5421a..00000000 --- a/v2/models/get_protection_run_progress_body.go +++ /dev/null @@ -1,234 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetProtectionRunProgressBody Specifies the progress of a protection run. -// -// swagger:model GetProtectionRunProgressBody -type GetProtectionRunProgressBody struct { - - // Progress for the local backup run. - LocalRun *BackupRunProgressInfo `json:"localRun,omitempty"` - - // Progress for the archival run. - ArchivalRun []*ArchivalTargetProgressInfo `json:"archivalRun"` - - // Progress for the replication run. - ReplicationRun []*ReplicationTargetProgressInfo `json:"replicationRun"` -} - -// Validate validates this get protection run progress body -func (m *GetProtectionRunProgressBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocalRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunProgressBody) validateLocalRun(formats strfmt.Registry) error { - if swag.IsZero(m.LocalRun) { // not required - return nil - } - - if m.LocalRun != nil { - if err := m.LocalRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localRun") - } - return err - } - } - - return nil -} - -func (m *GetProtectionRunProgressBody) validateArchivalRun(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalRun) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalRun); i++ { - if swag.IsZero(m.ArchivalRun[i]) { // not required - continue - } - - if m.ArchivalRun[i] != nil { - if err := m.ArchivalRun[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetProtectionRunProgressBody) validateReplicationRun(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationRun) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationRun); i++ { - if swag.IsZero(m.ReplicationRun[i]) { // not required - continue - } - - if m.ReplicationRun[i] != nil { - if err := m.ReplicationRun[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get protection run progress body based on the context it is used -func (m *GetProtectionRunProgressBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunProgressBody) contextValidateLocalRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalRun != nil { - - if swag.IsZero(m.LocalRun) { // not required - return nil - } - - if err := m.LocalRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localRun") - } - return err - } - } - - return nil -} - -func (m *GetProtectionRunProgressBody) contextValidateArchivalRun(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalRun); i++ { - - if m.ArchivalRun[i] != nil { - - if swag.IsZero(m.ArchivalRun[i]) { // not required - return nil - } - - if err := m.ArchivalRun[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GetProtectionRunProgressBody) contextValidateReplicationRun(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationRun); i++ { - - if m.ReplicationRun[i] != nil { - - if swag.IsZero(m.ReplicationRun[i]) { // not required - return nil - } - - if err := m.ReplicationRun[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetProtectionRunProgressBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetProtectionRunProgressBody) UnmarshalBinary(b []byte) error { - var res GetProtectionRunProgressBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_protection_run_stats_body.go b/v2/models/get_protection_run_stats_body.go deleted file mode 100644 index 24eece7d..00000000 --- a/v2/models/get_protection_run_stats_body.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetProtectionRunStatsBody Specifies the stats of a protection run. -// -// swagger:model GetProtectionRunStatsBody -type GetProtectionRunStatsBody struct { - - // Stats for the local backup run. - LocalRun *BackupRunStatsInfo `json:"localRun,omitempty"` - - // Stats for the archival run. - ArchivalRun []*ArchivalTargetStatsInfo `json:"archivalRun"` -} - -// Validate validates this get protection run stats body -func (m *GetProtectionRunStatsBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocalRun(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunStatsBody) validateLocalRun(formats strfmt.Registry) error { - if swag.IsZero(m.LocalRun) { // not required - return nil - } - - if m.LocalRun != nil { - if err := m.LocalRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localRun") - } - return err - } - } - - return nil -} - -func (m *GetProtectionRunStatsBody) validateArchivalRun(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalRun) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalRun); i++ { - if swag.IsZero(m.ArchivalRun[i]) { // not required - continue - } - - if m.ArchivalRun[i] != nil { - if err := m.ArchivalRun[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get protection run stats body based on the context it is used -func (m *GetProtectionRunStatsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalRun(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunStatsBody) contextValidateLocalRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalRun != nil { - - if swag.IsZero(m.LocalRun) { // not required - return nil - } - - if err := m.LocalRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localRun") - } - return err - } - } - - return nil -} - -func (m *GetProtectionRunStatsBody) contextValidateArchivalRun(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalRun); i++ { - - if m.ArchivalRun[i] != nil { - - if swag.IsZero(m.ArchivalRun[i]) { // not required - return nil - } - - if err := m.ArchivalRun[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalRun" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetProtectionRunStatsBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetProtectionRunStatsBody) UnmarshalBinary(b []byte) error { - var res GetProtectionRunStatsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_protection_runs_status_response_body.go b/v2/models/get_protection_runs_status_response_body.go deleted file mode 100644 index 604bd44e..00000000 --- a/v2/models/get_protection_runs_status_response_body.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetProtectionRunsStatusResponseBody Specifies a list of protection runs stats taken at different time. -// -// swagger:model GetProtectionRunsStatusResponseBody -type GetProtectionRunsStatusResponseBody struct { - - // Specifies a list of protection runs stats taken at different time. - ProtectionRunsStatsList []*ProtectionRunsStatsList `json:"protectionRunsStatsList"` -} - -// Validate validates this get protection runs status response body -func (m *GetProtectionRunsStatusResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionRunsStatsList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunsStatusResponseBody) validateProtectionRunsStatsList(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRunsStatsList) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionRunsStatsList); i++ { - if swag.IsZero(m.ProtectionRunsStatsList[i]) { // not required - continue - } - - if m.ProtectionRunsStatsList[i] != nil { - if err := m.ProtectionRunsStatsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get protection runs status response body based on the context it is used -func (m *GetProtectionRunsStatusResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionRunsStatsList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetProtectionRunsStatusResponseBody) contextValidateProtectionRunsStatsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionRunsStatsList); i++ { - - if m.ProtectionRunsStatsList[i] != nil { - - if swag.IsZero(m.ProtectionRunsStatsList[i]) { // not required - return nil - } - - if err := m.ProtectionRunsStatsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsStatsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsStatsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetProtectionRunsStatusResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetProtectionRunsStatusResponseBody) UnmarshalBinary(b []byte) error { - var res GetProtectionRunsStatusResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_tags_result.go b/v2/models/get_tags_result.go deleted file mode 100644 index 21edc895..00000000 --- a/v2/models/get_tags_result.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetTagsResult List tags result. -// -// # List tags result -// -// swagger:model GetTagsResult -type GetTagsResult []*Tag - -// Validate validates this get tags result -func (m GetTagsResult) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this get tags result based on the context it is used -func (m GetTagsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/get_tracking_view_id_response.go b/v2/models/get_tracking_view_id_response.go deleted file mode 100644 index b7f6d42a..00000000 --- a/v2/models/get_tracking_view_id_response.go +++ /dev/null @@ -1,50 +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" -) - -// GetTrackingViewIDResponse Specifies the response upon requesting a tracking view id -// -// swagger:model GetTrackingViewIdResponse -type GetTrackingViewIDResponse struct { - - // Specifies the local view id corresponding to the view uid. - TrackingViewID *int64 `json:"trackingViewId,omitempty"` -} - -// Validate validates this get tracking view Id response -func (m *GetTrackingViewIDResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get tracking view Id response based on context it is used -func (m *GetTrackingViewIDResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GetTrackingViewIDResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetTrackingViewIDResponse) UnmarshalBinary(b []byte) error { - var res GetTrackingViewIDResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_view_failover_response_body.go b/v2/models/get_view_failover_response_body.go deleted file mode 100644 index 6c39aa92..00000000 --- a/v2/models/get_view_failover_response_body.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewFailoverResponseBody Specifies planned failovers and unplanned failovers of a view. -// -// swagger:model GetViewFailoverResponseBody -type GetViewFailoverResponseBody struct { - - // Specifies a list of failovers. - Failovers []*Failover `json:"failovers"` -} - -// Validate validates this get view failover response body -func (m *GetViewFailoverResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFailovers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewFailoverResponseBody) validateFailovers(formats strfmt.Registry) error { - if swag.IsZero(m.Failovers) { // not required - return nil - } - - for i := 0; i < len(m.Failovers); i++ { - if swag.IsZero(m.Failovers[i]) { // not required - continue - } - - if m.Failovers[i] != nil { - if err := m.Failovers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failovers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failovers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get view failover response body based on the context it is used -func (m *GetViewFailoverResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFailovers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewFailoverResponseBody) contextValidateFailovers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Failovers); i++ { - - if m.Failovers[i] != nil { - - if swag.IsZero(m.Failovers[i]) { // not required - return nil - } - - if err := m.Failovers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failovers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failovers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewFailoverResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewFailoverResponseBody) UnmarshalBinary(b []byte) error { - var res GetViewFailoverResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_view_templates_result.go b/v2/models/get_view_templates_result.go deleted file mode 100644 index d161e4f4..00000000 --- a/v2/models/get_view_templates_result.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewTemplatesResult Get view templates Result. -// -// Specifies the list of view template returned that matched the specified filter -// criteria. -// -// swagger:model GetViewTemplatesResult -type GetViewTemplatesResult struct { - - // Array of view template. - // Specifies the list of view templates returned in this response. - Templates []*Template `json:"Templates"` -} - -// Validate validates this get view templates result -func (m *GetViewTemplatesResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTemplates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewTemplatesResult) validateTemplates(formats strfmt.Registry) error { - if swag.IsZero(m.Templates) { // not required - return nil - } - - for i := 0; i < len(m.Templates); i++ { - if swag.IsZero(m.Templates[i]) { // not required - continue - } - - if m.Templates[i] != nil { - if err := m.Templates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Templates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Templates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get view templates result based on the context it is used -func (m *GetViewTemplatesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTemplates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewTemplatesResult) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Templates); i++ { - - if m.Templates[i] != nil { - - if swag.IsZero(m.Templates[i]) { // not required - return nil - } - - if err := m.Templates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("Templates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("Templates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewTemplatesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewTemplatesResult) UnmarshalBinary(b []byte) error { - var res GetViewTemplatesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/get_views_result.go b/v2/models/get_views_result.go deleted file mode 100644 index 0e8ed554..00000000 --- a/v2/models/get_views_result.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetViewsResult Get Views Result. -// -// Specifies the list of Views returned that matched the specified filter -// criteria. -// -// swagger:model GetViewsResult -type GetViewsResult struct { - - // Array of Views. - // Specifies the list of Views returned in this response. - // The list is sorted by decreasing View ids. - Views []*View `json:"views"` - - // If false, more Views are available to return. If the number of - // Views to return exceeds the number of Views specified in maxCount - // (default of 1000) of the original GET /public/views request, - // the first set of Views are returned and this field returns false. - // To get the next set of Views, in the next GET /public/views request - // send the last id from the previous viewList. - LastResult *bool `json:"lastResult,omitempty"` - - // Number of views returned. This will only be returned if ViewCountOnly is - // set in arguments. - Count *int64 `json:"count,omitempty"` -} - -// Validate validates this get views result -func (m *GetViewsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsResult) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - for i := 0; i < len(m.Views); i++ { - if swag.IsZero(m.Views[i]) { // not required - continue - } - - if m.Views[i] != nil { - if err := m.Views[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get views result based on the context it is used -func (m *GetViewsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetViewsResult) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Views); i++ { - - if m.Views[i] != nil { - - if swag.IsZero(m.Views[i]) { // not required - return nil - } - - if err := m.Views[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetViewsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetViewsResult) UnmarshalBinary(b []byte) error { - var res GetViewsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/glacier_flr_restore_type.go b/v2/models/glacier_flr_restore_type.go deleted file mode 100644 index bcbcd577..00000000 --- a/v2/models/glacier_flr_restore_type.go +++ /dev/null @@ -1,110 +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" -) - -// GlacierFlrRestoreType Glacier Retrieval Type -// -// # Glacier Retrieval Type -// -// swagger:model GlacierFlrRestoreType -type GlacierFlrRestoreType struct { - - // Specifies the glacier retrieval type. - // Enum: ["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"] - GlacierFlrRestoreType string `json:"glacierFlrRestoreType,omitempty"` -} - -// Validate validates this glacier flr restore type -func (m *GlacierFlrRestoreType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGlacierFlrRestoreType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var glacierFlrRestoreTypeTypeGlacierFlrRestoreTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - glacierFlrRestoreTypeTypeGlacierFlrRestoreTypePropEnum = append(glacierFlrRestoreTypeTypeGlacierFlrRestoreTypePropEnum, v) - } -} - -const ( - - // GlacierFlrRestoreTypeGlacierFlrRestoreTypeKStandard captures enum value "kStandard" - GlacierFlrRestoreTypeGlacierFlrRestoreTypeKStandard string = "kStandard" - - // GlacierFlrRestoreTypeGlacierFlrRestoreTypeKExpeditedNoPCU captures enum value "kExpeditedNoPCU" - GlacierFlrRestoreTypeGlacierFlrRestoreTypeKExpeditedNoPCU string = "kExpeditedNoPCU" - - // GlacierFlrRestoreTypeGlacierFlrRestoreTypeKExpeditedWithPCU captures enum value "kExpeditedWithPCU" - GlacierFlrRestoreTypeGlacierFlrRestoreTypeKExpeditedWithPCU string = "kExpeditedWithPCU" -) - -// prop value enum -func (m *GlacierFlrRestoreType) validateGlacierFlrRestoreTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, glacierFlrRestoreTypeTypeGlacierFlrRestoreTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GlacierFlrRestoreType) validateGlacierFlrRestoreType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierFlrRestoreType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierFlrRestoreTypeEnum("glacierFlrRestoreType", "body", m.GlacierFlrRestoreType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this glacier flr restore type based on context it is used -func (m *GlacierFlrRestoreType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GlacierFlrRestoreType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GlacierFlrRestoreType) UnmarshalBinary(b []byte) error { - var res GlacierFlrRestoreType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/global_bandwidth_settings.go b/v2/models/global_bandwidth_settings.go deleted file mode 100644 index 00a0fb9a..00000000 --- a/v2/models/global_bandwidth_settings.go +++ /dev/null @@ -1,162 +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" -) - -// GlobalBandwidthSettings Global Target Bandwidth Settings -// -// Specifies the bandwidth setting of the External Target. -// -// swagger:model GlobalBandwidthSettings -type GlobalBandwidthSettings struct { - - // archival params - ArchivalParams *ArchivalBandwidthSettings `json:"archivalParams,omitempty"` - - // tiering params - TieringParams *TieringBandwidthSettings `json:"tieringParams,omitempty"` -} - -// Validate validates this global bandwidth settings -func (m *GlobalBandwidthSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTieringParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GlobalBandwidthSettings) validateArchivalParams(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalParams) { // not required - return nil - } - - if m.ArchivalParams != nil { - if err := m.ArchivalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalParams") - } - return err - } - } - - return nil -} - -func (m *GlobalBandwidthSettings) validateTieringParams(formats strfmt.Registry) error { - if swag.IsZero(m.TieringParams) { // not required - return nil - } - - if m.TieringParams != nil { - if err := m.TieringParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this global bandwidth settings based on the context it is used -func (m *GlobalBandwidthSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTieringParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GlobalBandwidthSettings) contextValidateArchivalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalParams != nil { - - if swag.IsZero(m.ArchivalParams) { // not required - return nil - } - - if err := m.ArchivalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalParams") - } - return err - } - } - - return nil -} - -func (m *GlobalBandwidthSettings) contextValidateTieringParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TieringParams != nil { - - if swag.IsZero(m.TieringParams) { // not required - return nil - } - - if err := m.TieringParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tieringParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tieringParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GlobalBandwidthSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GlobalBandwidthSettings) UnmarshalBinary(b []byte) error { - var res GlobalBandwidthSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/global_cluster_identifier.go b/v2/models/global_cluster_identifier.go deleted file mode 100644 index f43d9ec3..00000000 --- a/v2/models/global_cluster_identifier.go +++ /dev/null @@ -1,79 +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" -) - -// GlobalClusterIdentifier MCM OnPrem Cluster Identifier. -// -// Specifies the MCM cluster identifier. -// -// swagger:model GlobalClusterIdentifier -type GlobalClusterIdentifier struct { - - // List of Clusters Identifiers to filter from. The format is clusterId:clusterIncarnationId. - // Pattern: ^([0-9]+:[0-9]+)$ - ClusterIdentifier *string `json:"clusterIdentifier,omitempty"` - - // Specifies the region id of the cluster. Only valid for DMaaS clusters. - RegionID *string `json:"regionId,omitempty"` -} - -// Validate validates this global cluster identifier -func (m *GlobalClusterIdentifier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIdentifier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GlobalClusterIdentifier) validateClusterIdentifier(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifier) { // not required - return nil - } - - if err := validate.Pattern("clusterIdentifier", "body", *m.ClusterIdentifier, `^([0-9]+:[0-9]+)$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this global cluster identifier based on context it is used -func (m *GlobalClusterIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GlobalClusterIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GlobalClusterIdentifier) UnmarshalBinary(b []byte) error { - var res GlobalClusterIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/global_id.go b/v2/models/global_id.go deleted file mode 100644 index 1442c776..00000000 --- a/v2/models/global_id.go +++ /dev/null @@ -1,27 +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" -) - -// GlobalID Specifies the object id. -// -// swagger:model GlobalId -type GlobalID string - -// Validate validates this global Id -func (m GlobalID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this global Id based on context it is used -func (m GlobalID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/google_tier.go b/v2/models/google_tier.go deleted file mode 100644 index 78a6cc21..00000000 --- a/v2/models/google_tier.go +++ /dev/null @@ -1,159 +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" -) - -// GoogleTier Specifies the settings for a Google tier. -// -// swagger:model GoogleTier -type GoogleTier struct { - CommonCloudTierSettings - - // Specifies the Google tier types. - // Required: true - // Enum: ["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GoogleTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GoogleTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this google tier -func (m *GoogleTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var googleTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - googleTierTypeTierTypePropEnum = append(googleTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *GoogleTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, googleTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GoogleTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this google tier based on the context it is used -func (m *GoogleTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GoogleTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GoogleTier) UnmarshalBinary(b []byte) error { - var res GoogleTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/google_tiering_levels.go b/v2/models/google_tiering_levels.go deleted file mode 100644 index db8088c8..00000000 --- a/v2/models/google_tiering_levels.go +++ /dev/null @@ -1,116 +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" -) - -// GoogleTieringLevels Google Tiering Levels. -// -// # Google Tiering Levels -// -// swagger:model GoogleTieringLevels -type GoogleTieringLevels struct { - - // Google Tiering Levels - // Enum: ["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"] - Type string `json:"type,omitempty"` -} - -// Validate validates this google tiering levels -func (m *GoogleTieringLevels) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var googleTieringLevelsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - googleTieringLevelsTypeTypePropEnum = append(googleTieringLevelsTypeTypePropEnum, v) - } -} - -const ( - - // GoogleTieringLevelsTypeKGoogleStandard captures enum value "kGoogleStandard" - GoogleTieringLevelsTypeKGoogleStandard string = "kGoogleStandard" - - // GoogleTieringLevelsTypeKGoogleRegional captures enum value "kGoogleRegional" - GoogleTieringLevelsTypeKGoogleRegional string = "kGoogleRegional" - - // GoogleTieringLevelsTypeKGoogleMultiRegional captures enum value "kGoogleMultiRegional" - GoogleTieringLevelsTypeKGoogleMultiRegional string = "kGoogleMultiRegional" - - // GoogleTieringLevelsTypeKGoogleNearline captures enum value "kGoogleNearline" - GoogleTieringLevelsTypeKGoogleNearline string = "kGoogleNearline" - - // GoogleTieringLevelsTypeKGoogleColdline captures enum value "kGoogleColdline" - GoogleTieringLevelsTypeKGoogleColdline string = "kGoogleColdline" -) - -// prop value enum -func (m *GoogleTieringLevels) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, googleTieringLevelsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GoogleTieringLevels) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this google tiering levels based on context it is used -func (m *GoogleTieringLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GoogleTieringLevels) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GoogleTieringLevels) UnmarshalBinary(b []byte) error { - var res GoogleTieringLevels - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/google_tiers.go b/v2/models/google_tiers.go deleted file mode 100644 index 83ffb944..00000000 --- a/v2/models/google_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GoogleTiers Specifies Google tiers. -// -// swagger:model GoogleTiers -type GoogleTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*GoogleTier `json:"tiers"` -} - -// Validate validates this google tiers -func (m *GoogleTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GoogleTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this google tiers based on the context it is used -func (m *GoogleTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GoogleTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GoogleTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GoogleTiers) UnmarshalBinary(b []byte) error { - var res GoogleTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_object_protection_params.go b/v2/models/gpfs_object_protection_params.go deleted file mode 100644 index def05e15..00000000 --- a/v2/models/gpfs_object_protection_params.go +++ /dev/null @@ -1,117 +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" -) - -// GpfsObjectProtectionParams Specifies the parameters which are specific to Gpfs object protection. -// -// swagger:model GpfsObjectProtectionParams -type GpfsObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` -} - -// Validate validates this gpfs object protection params -func (m *GpfsObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var gpfsObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gpfsObjectProtectionParamsTypeProtocolPropEnum = append(gpfsObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // GpfsObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - GpfsObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // GpfsObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - GpfsObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // GpfsObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - GpfsObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // GpfsObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - GpfsObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // GpfsObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - GpfsObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // GpfsObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - GpfsObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *GpfsObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gpfsObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GpfsObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this gpfs object protection params based on context it is used -func (m *GpfsObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res GpfsObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_object_protection_request_params.go b/v2/models/gpfs_object_protection_request_params.go deleted file mode 100644 index 2a08109d..00000000 --- a/v2/models/gpfs_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GpfsObjectProtectionRequestParams Specifies the parameters which are specific to Gpfs object protection. -// -// swagger:model GpfsObjectProtectionRequestParams -type GpfsObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - GpfsObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GpfsObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 GpfsObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.GpfsObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GpfsObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.GpfsObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this gpfs object protection request params -func (m *GpfsObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this gpfs object protection request params based on the context it is used -func (m *GpfsObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res GpfsObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_object_protection_response_params.go b/v2/models/gpfs_object_protection_response_params.go deleted file mode 100644 index 4dfc914c..00000000 --- a/v2/models/gpfs_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// GpfsObjectProtectionResponseParams Specifies the parameters which are specific to Gpfs object protection. -// -// swagger:model GpfsObjectProtectionResponseParams -type GpfsObjectProtectionResponseParams struct { - CommonNasProtectionParams - - GpfsObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GpfsObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 GpfsObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.GpfsObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GpfsObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.GpfsObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this gpfs object protection response params -func (m *GpfsObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this gpfs object protection response params based on the context it is used -func (m *GpfsObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res GpfsObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_object_protection_update_request_params.go b/v2/models/gpfs_object_protection_update_request_params.go deleted file mode 100644 index 150bd847..00000000 --- a/v2/models/gpfs_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// GpfsObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Gpfs object protection. -// -// swagger:model GpfsObjectProtectionUpdateRequestParams -type GpfsObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - GpfsObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GpfsObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 GpfsObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.GpfsObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GpfsObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.GpfsObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this gpfs object protection update request params -func (m *GpfsObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this gpfs object protection update request params based on the context it is used -func (m *GpfsObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with GpfsObjectProtectionParams - if err := m.GpfsObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res GpfsObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_protection_group_object_params.go b/v2/models/gpfs_protection_group_object_params.go deleted file mode 100644 index 968f4107..00000000 --- a/v2/models/gpfs_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// GpfsProtectionGroupObjectParams Specifies an object protected by a GPFS Protection Group. -// -// swagger:model GpfsProtectionGroupObjectParams -type GpfsProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this gpfs protection group object params -func (m *GpfsProtectionGroupObjectParams) 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 *GpfsProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gpfs protection group object params based on the context it is used -func (m *GpfsProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res GpfsProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_protection_group_params.go b/v2/models/gpfs_protection_group_params.go deleted file mode 100644 index 6fedb49e..00000000 --- a/v2/models/gpfs_protection_group_params.go +++ /dev/null @@ -1,551 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GpfsProtectionGroupParams Specifies the parameters which are specific to GPFS related Protection Groups. -// -// swagger:model GpfsProtectionGroupParams -type GpfsProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*GpfsProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the preferred protocol to use if this device supports multiple protocols. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies whether or not the Protection Group should continue regardless of whether or not an error was encountered during protection group run. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the protection group should use encryption while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this gpfs protection group params -func (m *GpfsProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var gpfsProtectionGroupParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - gpfsProtectionGroupParamsTypeProtocolPropEnum = append(gpfsProtectionGroupParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // GpfsProtectionGroupParamsProtocolKNoProtocol captures enum value "kNoProtocol" - GpfsProtectionGroupParamsProtocolKNoProtocol string = "kNoProtocol" - - // GpfsProtectionGroupParamsProtocolKNfs3 captures enum value "kNfs3" - GpfsProtectionGroupParamsProtocolKNfs3 string = "kNfs3" - - // GpfsProtectionGroupParamsProtocolKNfs41 captures enum value "kNfs4_1" - GpfsProtectionGroupParamsProtocolKNfs41 string = "kNfs4_1" - - // GpfsProtectionGroupParamsProtocolKCifs1 captures enum value "kCifs1" - GpfsProtectionGroupParamsProtocolKCifs1 string = "kCifs1" - - // GpfsProtectionGroupParamsProtocolKCifs2 captures enum value "kCifs2" - GpfsProtectionGroupParamsProtocolKCifs2 string = "kCifs2" - - // GpfsProtectionGroupParamsProtocolKCifs3 captures enum value "kCifs3" - GpfsProtectionGroupParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *GpfsProtectionGroupParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, gpfsProtectionGroupParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *GpfsProtectionGroupParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gpfs protection group params based on the context it is used -func (m *GpfsProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsProtectionGroupParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res GpfsProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/gpfs_registration_params.go b/v2/models/gpfs_registration_params.go deleted file mode 100644 index af90c6d2..00000000 --- a/v2/models/gpfs_registration_params.go +++ /dev/null @@ -1,229 +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" -) - -// GpfsRegistrationParams GPFS Protection Source. -// -// Specifies parameters to register an GPFS Source. -// -// swagger:model GpfsRegistrationParams -type GpfsRegistrationParams struct { - - // Specifies the Hostname or IP Address Endpoint for the GPFS Source. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the credentials for an GPFS Source. - // Required: true - Credentials *Credentials `json:"credentials"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` -} - -// Validate validates this gpfs registration params -func (m *GpfsRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -func (m *GpfsRegistrationParams) validateCredentials(formats strfmt.Registry) error { - - if err := validate.Required("credentials", "body", m.Credentials); err != nil { - return err - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *GpfsRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsRegistrationParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gpfs registration params based on the context it is used -func (m *GpfsRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpfsRegistrationParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *GpfsRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -func (m *GpfsRegistrationParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpfsRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpfsRegistrationParams) UnmarshalBinary(b []byte) error { - var res GpfsRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/group.go b/v2/models/group.go deleted file mode 100644 index c24ed735..00000000 --- a/v2/models/group.go +++ /dev/null @@ -1,58 +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" -) - -// Group User Group -// -// Specifies a user group object. -// -// swagger:model Group -type Group struct { - - // Specifies the name of the user group. - Name *string `json:"name,omitempty"` - - // Specifies the sid of the user group. - Sid *string `json:"sid,omitempty"` - - // Specifies the domain of the user group. - Domain *string `json:"domain,omitempty"` -} - -// Validate validates this group -func (m *Group) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this group based on context it is used -func (m *Group) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Group) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Group) UnmarshalBinary(b []byte) error { - var res Group - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/group_object_entity_params.go b/v2/models/group_object_entity_params.go deleted file mode 100644 index 6db88677..00000000 --- a/v2/models/group_object_entity_params.go +++ /dev/null @@ -1,56 +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" -) - -// GroupObjectEntityParams Specifies the common parameters for Office365 Group objects. -// -// swagger:model GroupObjectEntityParams -type GroupObjectEntityParams struct { - - // Specifies whether the Group is security enabled. Security enabled groups are used to grant access permissions to resources in Exchange and Active Directory. - IsSecurityEnabled *bool `json:"isSecurityEnabled,omitempty"` - - // Specifies whether the Group is mail enabled. Mail enabled groups are used within Microsoft to distribute messages. - IsMailEnabled *bool `json:"isMailEnabled,omitempty"` - - // Specifies the count of members within the Group. - MemberCount *int64 `json:"memberCount,omitempty"` -} - -// Validate validates this group object entity params -func (m *GroupObjectEntityParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this group object entity params based on context it is used -func (m *GroupObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GroupObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupObjectEntityParams) UnmarshalBinary(b []byte) error { - var res GroupObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/group_params.go b/v2/models/group_params.go deleted file mode 100644 index 0e390020..00000000 --- a/v2/models/group_params.go +++ /dev/null @@ -1,254 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GroupParams Specifies a Group. -// -// swagger:model GroupParams -type GroupParams struct { - CreateGroupParams - - // Specifies the sid of the Group. - // Read Only: true - Sid *string `json:"sid,omitempty"` - - // Specifies the SMB principals. - SmbPrincipals []*SMBPrincipal `json:"smbPrincipals,omitempty"` - - // Specifies the epoch time in milliseconds when the group was created. - // Read Only: true - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the group was last modified. - // Read Only: true - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateGroupParams = aO0 - - // AO1 - var dataAO1 struct { - Sid *string `json:"sid,omitempty"` - - SmbPrincipals []*SMBPrincipal `json:"smbPrincipals,omitempty"` - - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Sid = dataAO1.Sid - - m.SmbPrincipals = dataAO1.SmbPrincipals - - m.CreatedTimeMsecs = dataAO1.CreatedTimeMsecs - - m.LastUpdatedTimeMsecs = dataAO1.LastUpdatedTimeMsecs - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Sid *string `json:"sid,omitempty"` - - SmbPrincipals []*SMBPrincipal `json:"smbPrincipals,omitempty"` - - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - } - - dataAO1.Sid = m.Sid - - dataAO1.SmbPrincipals = m.SmbPrincipals - - dataAO1.CreatedTimeMsecs = m.CreatedTimeMsecs - - dataAO1.LastUpdatedTimeMsecs = m.LastUpdatedTimeMsecs - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this group params -func (m *GroupParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateGroupParams - if err := m.CreateGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPrincipals(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GroupParams) validateSmbPrincipals(formats strfmt.Registry) error { - - if swag.IsZero(m.SmbPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SmbPrincipals); i++ { - if swag.IsZero(m.SmbPrincipals[i]) { // not required - continue - } - - if m.SmbPrincipals[i] != nil { - if err := m.SmbPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this group params based on the context it is used -func (m *GroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateGroupParams - if err := m.CreateGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSid(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GroupParams) contextValidateSid(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sid", "body", m.Sid); err != nil { - return err - } - - return nil -} - -func (m *GroupParams) contextValidateSmbPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SmbPrincipals); i++ { - - if m.SmbPrincipals[i] != nil { - - if swag.IsZero(m.SmbPrincipals[i]) { // not required - return nil - } - - if err := m.SmbPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GroupParams) contextValidateCreatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdTimeMsecs", "body", m.CreatedTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *GroupParams) contextValidateLastUpdatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedTimeMsecs", "body", m.LastUpdatedTimeMsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GroupParams) UnmarshalBinary(b []byte) error { - var res GroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/groups.go b/v2/models/groups.go deleted file mode 100644 index a8542e89..00000000 --- a/v2/models/groups.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Groups Specifies a list of groups. -// -// swagger:model Groups -type Groups struct { - - // Specifies the list of groups. - Groups []*GroupParams `json:"groups"` -} - -// Validate validates this groups -func (m *Groups) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Groups) validateGroups(formats strfmt.Registry) error { - if swag.IsZero(m.Groups) { // not required - return nil - } - - for i := 0; i < len(m.Groups); i++ { - if swag.IsZero(m.Groups[i]) { // not required - continue - } - - if m.Groups[i] != nil { - if err := m.Groups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this groups based on the context it is used -func (m *Groups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Groups) contextValidateGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Groups); i++ { - - if m.Groups[i] != nil { - - if swag.IsZero(m.Groups[i]) { // not required - return nil - } - - if err := m.Groups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Groups) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Groups) UnmarshalBinary(b []byte) error { - var res Groups - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/h_base_additional_params.go b/v2/models/h_base_additional_params.go deleted file mode 100644 index a5f66c1c..00000000 --- a/v2/models/h_base_additional_params.go +++ /dev/null @@ -1,160 +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" -) - -// HBaseAdditionalParams HBAse Additional Params. -// -// Additional params for HBase protection source. -// -// swagger:model HBaseAdditionalParams -type HBaseAdditionalParams struct { - - // The 'Zookeeper Quorum' for this HBase. - // Read Only: true - ZookeeperQuorum []string `json:"zookeeperQuorum"` - - // The 'Data root directory' for this HBase. - // Read Only: true - DataRootDirectory *string `json:"dataRootDirectory,omitempty"` - - // Authentication type. - // Read Only: true - // Enum: ["KERBEROS","NONE"] - AuthType *string `json:"authType,omitempty"` -} - -// Validate validates this h base additional params -func (m *HBaseAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hBaseAdditionalParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KERBEROS","NONE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hBaseAdditionalParamsTypeAuthTypePropEnum = append(hBaseAdditionalParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // HBaseAdditionalParamsAuthTypeKERBEROS captures enum value "KERBEROS" - HBaseAdditionalParamsAuthTypeKERBEROS string = "KERBEROS" - - // HBaseAdditionalParamsAuthTypeNONE captures enum value "NONE" - HBaseAdditionalParamsAuthTypeNONE string = "NONE" -) - -// prop value enum -func (m *HBaseAdditionalParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hBaseAdditionalParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HBaseAdditionalParams) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this h base additional params based on the context it is used -func (m *HBaseAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateZookeeperQuorum(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataRootDirectory(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuthType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HBaseAdditionalParams) contextValidateZookeeperQuorum(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "zookeeperQuorum", "body", []string(m.ZookeeperQuorum)); err != nil { - return err - } - - return nil -} - -func (m *HBaseAdditionalParams) contextValidateDataRootDirectory(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "dataRootDirectory", "body", m.DataRootDirectory); err != nil { - return err - } - - return nil -} - -func (m *HBaseAdditionalParams) contextValidateAuthType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "authType", "body", m.AuthType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HBaseAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HBaseAdditionalParams) UnmarshalBinary(b []byte) error { - var res HBaseAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/h_d_f_s_indexed_object.go b/v2/models/h_d_f_s_indexed_object.go deleted file mode 100644 index 1f5f5f8b..00000000 --- a/v2/models/h_d_f_s_indexed_object.go +++ /dev/null @@ -1,171 +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" -) - -// HDFSIndexedObject HDFSIndexedObject -// -// Specifies an HDFS indexed object. -// -// swagger:model HDFSIndexedObject -type HDFSIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the HDFS Object Type. - // Enum: ["HDFSFolders","HDFSFiles"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HDFSIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HDFSIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this h d f s indexed object -func (m *HDFSIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hDFSIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HDFSFolders","HDFSFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hDFSIndexedObjectTypeTypePropEnum = append(hDFSIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *HDFSIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hDFSIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HDFSIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this h d f s indexed object based on the context it is used -func (m *HDFSIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HDFSIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HDFSIndexedObject) UnmarshalBinary(b []byte) error { - var res HDFSIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/h_d_f_s_indexed_objects.go b/v2/models/h_d_f_s_indexed_objects.go deleted file mode 100644 index 568f85c3..00000000 --- a/v2/models/h_d_f_s_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HDFSIndexedObjects Specifies the indexed HDFS objects. -// -// swagger:model HDFSIndexedObjects -type HDFSIndexedObjects []*HDFSIndexedObject - -// Validate validates this h d f s indexed objects -func (m HDFSIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this h d f s indexed objects based on the context it is used -func (m HDFSIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/h_d_f_s_on_prem_search_params.go b/v2/models/h_d_f_s_on_prem_search_params.go deleted file mode 100644 index 365083a0..00000000 --- a/v2/models/h_d_f_s_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// HDFSOnPremSearchParams HDFSOnPremSearchParams -// -// Parameters required to search HDFS on a cluster. -// -// swagger:model HDFSOnPremSearchParams -type HDFSOnPremSearchParams struct { - HdfsSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HDFSOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HdfsSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HdfsSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HDFSOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HdfsSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this h d f s on prem search params -func (m *HDFSOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsSearchParams - if err := m.HdfsSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this h d f s on prem search params based on the context it is used -func (m *HDFSOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsSearchParams - if err := m.HdfsSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HDFSOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HDFSOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res HDFSOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hadoop_auth_type.go b/v2/models/hadoop_auth_type.go deleted file mode 100644 index 434452be..00000000 --- a/v2/models/hadoop_auth_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HadoopAuthType Enumeration of all the Hadoop Authentication types. -// -// Enumeration of all the Hadoop Authentication types. -// -// swagger:model HadoopAuthType -type HadoopAuthType struct { - - // Enumeration of all the Hadoop Authentication types. - // Enum: ["KERBEROS","NONE"] - HadoopAuthType string `json:"HadoopAuthType,omitempty"` -} - -// Validate validates this hadoop auth type -func (m *HadoopAuthType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHadoopAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hadoopAuthTypeTypeHadoopAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KERBEROS","NONE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hadoopAuthTypeTypeHadoopAuthTypePropEnum = append(hadoopAuthTypeTypeHadoopAuthTypePropEnum, v) - } -} - -const ( - - // HadoopAuthTypeHadoopAuthTypeKERBEROS captures enum value "KERBEROS" - HadoopAuthTypeHadoopAuthTypeKERBEROS string = "KERBEROS" - - // HadoopAuthTypeHadoopAuthTypeNONE captures enum value "NONE" - HadoopAuthTypeHadoopAuthTypeNONE string = "NONE" -) - -// prop value enum -func (m *HadoopAuthType) validateHadoopAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hadoopAuthTypeTypeHadoopAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HadoopAuthType) validateHadoopAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.HadoopAuthType) { // not required - return nil - } - - // value enum - if err := m.validateHadoopAuthTypeEnum("HadoopAuthType", "body", m.HadoopAuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hadoop auth type based on context it is used -func (m *HadoopAuthType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HadoopAuthType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HadoopAuthType) UnmarshalBinary(b []byte) error { - var res HadoopAuthType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hadoop_connection_params.go b/v2/models/hadoop_connection_params.go deleted file mode 100644 index 9f9128e9..00000000 --- a/v2/models/hadoop_connection_params.go +++ /dev/null @@ -1,346 +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" -) - -// HadoopConnectionParams Parameters to connect and query hdfs config file. -// -// Specifies the parameters to connect to a seed node and fetch information from its config file. -// -// swagger:model HadoopConnectionParams -type HadoopConnectionParams struct { - - // IP or hostname of any host from which the configuration file can be read. - // Required: true - Host *string `json:"host"` - - // The directory containing the application specific config file. . - // Required: true - ConfigurationDirectory *string `json:"configurationDirectory"` - - // ssh password credentials - SSHPasswordCredentials *HadoopConnectionParamsSSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HadoopConnectionParamsSSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// Validate validates this hadoop connection params -func (m *HadoopConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigurationDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HadoopConnectionParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *HadoopConnectionParams) validateConfigurationDirectory(formats strfmt.Registry) error { - - if err := validate.Required("configurationDirectory", "body", m.ConfigurationDirectory); err != nil { - return err - } - - return nil -} - -func (m *HadoopConnectionParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HadoopConnectionParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hadoop connection params based on the context it is used -func (m *HadoopConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HadoopConnectionParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HadoopConnectionParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HadoopConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HadoopConnectionParams) UnmarshalBinary(b []byte) error { - var res HadoopConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HadoopConnectionParamsSSHPasswordCredentials SSH username + password required for reading configuration file and for scp backup.Either 'sshPasswordCredential' or 'sshPrivateKeyCredential' are required. -// -// swagger:model HadoopConnectionParamsSSHPasswordCredentials -type HadoopConnectionParamsSSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hadoop connection params SSH password credentials -func (m *HadoopConnectionParamsSSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HadoopConnectionParamsSSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HadoopConnectionParamsSSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hadoop connection params SSH password credentials based on context it is used -func (m *HadoopConnectionParamsSSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HadoopConnectionParamsSSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HadoopConnectionParamsSSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HadoopConnectionParamsSSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HadoopConnectionParamsSSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file and for scp backup. -// -// swagger:model HadoopConnectionParamsSSHPrivateKeyCredentials -type HadoopConnectionParamsSSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hadoop connection params SSH private key credentials -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hadoop connection params SSH private key credentials based on context it is used -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HadoopConnectionParamsSSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HadoopConnectionParamsSSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_indexed_object.go b/v2/models/hbase_indexed_object.go deleted file mode 100644 index 8ddc56d9..00000000 --- a/v2/models/hbase_indexed_object.go +++ /dev/null @@ -1,171 +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" -) - -// HbaseIndexedObject HbaseIndexedObject -// -// Specifies an Hbase indexed object. -// -// swagger:model HbaseIndexedObject -type HbaseIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the Hbase Object Type. - // Enum: ["HbaseNamespaces","HbaseTables"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HbaseIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HbaseIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hbase indexed object -func (m *HbaseIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hbaseIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HbaseNamespaces","HbaseTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hbaseIndexedObjectTypeTypePropEnum = append(hbaseIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *HbaseIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hbaseIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HbaseIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hbase indexed object based on the context it is used -func (m *HbaseIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseIndexedObject) UnmarshalBinary(b []byte) error { - var res HbaseIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_indexed_objects.go b/v2/models/hbase_indexed_objects.go deleted file mode 100644 index 43828174..00000000 --- a/v2/models/hbase_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HbaseIndexedObjects Specifies the indexed Hbase objects. -// -// swagger:model HbaseIndexedObjects -type HbaseIndexedObjects []*HbaseIndexedObject - -// Validate validates this hbase indexed objects -func (m HbaseIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hbase indexed objects based on the context it is used -func (m HbaseIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/hbase_on_prem_search_params.go b/v2/models/hbase_on_prem_search_params.go deleted file mode 100644 index f597eaf3..00000000 --- a/v2/models/hbase_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// HbaseOnPremSearchParams HbaseOnPremSearchParams -// -// Parameters required to search Hbase on a cluster. -// -// swagger:model HbaseOnPremSearchParams -type HbaseOnPremSearchParams struct { - HbaseSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HbaseOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HbaseSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HbaseSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HbaseOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HbaseSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hbase on prem search params -func (m *HbaseOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HbaseSearchParams - if err := m.HbaseSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hbase on prem search params based on the context it is used -func (m *HbaseOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HbaseSearchParams - if err := m.HbaseSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res HbaseOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_params.go b/v2/models/hbase_params.go deleted file mode 100644 index 97d82136..00000000 --- a/v2/models/hbase_params.go +++ /dev/null @@ -1,160 +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" -) - -// HbaseParams Recover Hbase environment params. -// -// Specifies the recovery options specific to Hbase environment. -// -// swagger:model HbaseParams -type HbaseParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Hbase objects. - // Required: true - RecoverHbaseParams *RecoverHbaseParams `json:"recoverHbaseParams"` -} - -// Validate validates this hbase params -func (m *HbaseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverHbaseParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hbaseParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hbaseParamsTypeRecoveryActionPropEnum = append(hbaseParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // HbaseParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - HbaseParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *HbaseParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hbaseParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HbaseParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *HbaseParams) validateRecoverHbaseParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverHbaseParams", "body", m.RecoverHbaseParams); err != nil { - return err - } - - if m.RecoverHbaseParams != nil { - if err := m.RecoverHbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHbaseParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hbase params based on the context it is used -func (m *HbaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseParams) contextValidateRecoverHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverHbaseParams != nil { - - if err := m.RecoverHbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHbaseParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseParams) UnmarshalBinary(b []byte) error { - var res HbaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_search_params.go b/v2/models/hbase_search_params.go deleted file mode 100644 index 56fe2e4c..00000000 --- a/v2/models/hbase_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HbaseSearchParams Specifies the parameters which are specific for searching Hbase objects. -// -// swagger:model HbaseSearchParams -type HbaseSearchParams struct { - - // Specifies the search string to search the Hbase Objects - // Required: true - SearchString *string `json:"searchString"` - - // Specifies one or more Hbase object types be searched. - // Required: true - HbaseObjectTypes []string `json:"hbaseObjectTypes"` -} - -// Validate validates this hbase search params -func (m *HbaseSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseObjectTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var hbaseSearchParamsHbaseObjectTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HbaseNamespaces","HbaseTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hbaseSearchParamsHbaseObjectTypesItemsEnum = append(hbaseSearchParamsHbaseObjectTypesItemsEnum, v) - } -} - -func (m *HbaseSearchParams) validateHbaseObjectTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hbaseSearchParamsHbaseObjectTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *HbaseSearchParams) validateHbaseObjectTypes(formats strfmt.Registry) error { - - if err := validate.Required("hbaseObjectTypes", "body", m.HbaseObjectTypes); err != nil { - return err - } - - for i := 0; i < len(m.HbaseObjectTypes); i++ { - - // value enum - if err := m.validateHbaseObjectTypesItemsEnum("hbaseObjectTypes"+"."+strconv.Itoa(i), "body", m.HbaseObjectTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this hbase search params based on context it is used -func (m *HbaseSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSearchParams) UnmarshalBinary(b []byte) error { - var res HbaseSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_source_registration_params.go b/v2/models/hbase_source_registration_params.go deleted file mode 100644 index 2c8e57b6..00000000 --- a/v2/models/hbase_source_registration_params.go +++ /dev/null @@ -1,464 +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" -) - -// HbaseSourceRegistrationParams Register HBase source request parameters. -// -// Specifies parameters to register an HBase source. -// -// swagger:model HbaseSourceRegistrationParams -type HbaseSourceRegistrationParams struct { - HBaseAdditionalParams - - // IP or hostname of any host from which the HBase configuration file hbase-site.xml can be read. - // Required: true - Host *string `json:"host"` - - // The directory containing the hbase-site.xml. - // Required: true - ConfigurationDirectory *string `json:"configurationDirectory"` - - // Protection Source registration id of the HDFS on which this HBase is running. - // Required: true - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - // The kerberos principal to be used to connect to this Hbase source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // ssh password credentials - SSHPasswordCredentials *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HbaseSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HBaseAdditionalParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HBaseAdditionalParams = aO0 - - // AO1 - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - SSHPasswordCredentials *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Host = dataAO1.Host - - m.ConfigurationDirectory = dataAO1.ConfigurationDirectory - - m.HdfsSourceRegistrationID = dataAO1.HdfsSourceRegistrationID - - m.KerberosPrincipal = dataAO1.KerberosPrincipal - - m.SSHPasswordCredentials = dataAO1.SSHPasswordCredentials - - m.SSHPrivateKeyCredentials = dataAO1.SSHPrivateKeyCredentials - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HbaseSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HBaseAdditionalParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - SSHPasswordCredentials *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - - dataAO1.Host = m.Host - - dataAO1.ConfigurationDirectory = m.ConfigurationDirectory - - dataAO1.HdfsSourceRegistrationID = m.HdfsSourceRegistrationID - - dataAO1.KerberosPrincipal = m.KerberosPrincipal - - dataAO1.SSHPasswordCredentials = m.SSHPasswordCredentials - - dataAO1.SSHPrivateKeyCredentials = m.SSHPrivateKeyCredentials - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hbase source registration params -func (m *HbaseSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HBaseAdditionalParams - if err := m.HBaseAdditionalParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigurationDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsSourceRegistrationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationParams) validateConfigurationDirectory(formats strfmt.Registry) error { - - if err := validate.Required("configurationDirectory", "body", m.ConfigurationDirectory); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationParams) validateHdfsSourceRegistrationID(formats strfmt.Registry) error { - - if err := validate.Required("hdfsSourceRegistrationID", "body", m.HdfsSourceRegistrationID); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HbaseSourceRegistrationParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hbase source registration params based on the context it is used -func (m *HbaseSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HBaseAdditionalParams - if err := m.HBaseAdditionalParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HbaseSourceRegistrationParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HbaseSourceRegistrationParamsAO1SSHPasswordCredentials SSH username + password required for reading configuration file. Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HbaseSourceRegistrationParamsAO1SSHPasswordCredentials -type HbaseSourceRegistrationParamsAO1SSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hbase source registration params a o1 SSH password credentials -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hbase source registration params a o1 SSH password credentials based on context it is used -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationParamsAO1SSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationParamsAO1SSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials -type HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hbase source registration params a o1 SSH private key credentials -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hbase source registration params a o1 SSH private key credentials based on context it is used -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationParamsAO1SSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hbase_source_registration_update_params.go b/v2/models/hbase_source_registration_update_params.go deleted file mode 100644 index 697fdd22..00000000 --- a/v2/models/hbase_source_registration_update_params.go +++ /dev/null @@ -1,321 +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" -) - -// HbaseSourceRegistrationUpdateParams Update HBase source registration parameters. -// -// Specifies parameters to update registeration of an HBase source. -// -// swagger:model HbaseSourceRegistrationUpdateParams -type HbaseSourceRegistrationUpdateParams struct { - - // IP or hostname of any host from which the HBase configuration file hbase-site.xml can be read. - Host *string `json:"host,omitempty"` - - // The directory containing the hbase-site.xml. - ConfigurationDirectory *string `json:"configurationDirectory,omitempty"` - - // The kerberos principal to be used to connect to this Hbase source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // ssh password credentials - SSHPasswordCredentials *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// Validate validates this hbase source registration update params -func (m *HbaseSourceRegistrationUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationUpdateParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HbaseSourceRegistrationUpdateParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hbase source registration update params based on the context it is used -func (m *HbaseSourceRegistrationUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationUpdateParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HbaseSourceRegistrationUpdateParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParams) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials SSH username + password required for reading configuration file. Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials -type HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hbase source registration update params SSH password credentials -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hbase source registration update params SSH password credentials based on context it is used -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationUpdateParamsSSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials -type HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hbase source registration update params SSH private key credentials -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hbase source registration update params SSH private key credentials based on context it is used -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HbaseSourceRegistrationUpdateParamsSSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_additional_params.go b/v2/models/hdfs_additional_params.go deleted file mode 100644 index e22a7d70..00000000 --- a/v2/models/hdfs_additional_params.go +++ /dev/null @@ -1,160 +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" -) - -// HdfsAdditionalParams Hdfs Additional Params. -// -// Additional params for Hdfs protection source. -// -// swagger:model HdfsAdditionalParams -type HdfsAdditionalParams struct { - - // The HDFS Namenode IP or hostname. - // Read Only: true - NamenodeAddress string `json:"namenodeAddress,omitempty"` - - // The HDFS WebHDFS port. - // Read Only: true - WebhdfsPort int32 `json:"webhdfsPort,omitempty"` - - // Authentication type. - // Read Only: true - // Enum: ["KERBEROS","NONE"] - AuthType *string `json:"authType,omitempty"` -} - -// Validate validates this hdfs additional params -func (m *HdfsAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hdfsAdditionalParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KERBEROS","NONE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsAdditionalParamsTypeAuthTypePropEnum = append(hdfsAdditionalParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // HdfsAdditionalParamsAuthTypeKERBEROS captures enum value "KERBEROS" - HdfsAdditionalParamsAuthTypeKERBEROS string = "KERBEROS" - - // HdfsAdditionalParamsAuthTypeNONE captures enum value "NONE" - HdfsAdditionalParamsAuthTypeNONE string = "NONE" -) - -// prop value enum -func (m *HdfsAdditionalParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsAdditionalParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsAdditionalParams) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hdfs additional params based on the context it is used -func (m *HdfsAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNamenodeAddress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWebhdfsPort(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuthType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsAdditionalParams) contextValidateNamenodeAddress(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "namenodeAddress", "body", string(m.NamenodeAddress)); err != nil { - return err - } - - return nil -} - -func (m *HdfsAdditionalParams) contextValidateWebhdfsPort(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "webhdfsPort", "body", int32(m.WebhdfsPort)); err != nil { - return err - } - - return nil -} - -func (m *HdfsAdditionalParams) contextValidateAuthType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "authType", "body", m.AuthType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsAdditionalParams) UnmarshalBinary(b []byte) error { - var res HdfsAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_browse_request_params.go b/v2/models/hdfs_browse_request_params.go deleted file mode 100644 index 54678549..00000000 --- a/v2/models/hdfs_browse_request_params.go +++ /dev/null @@ -1,50 +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" -) - -// HdfsBrowseRequestParams hdfs browse request params -// -// swagger:model HdfsBrowseRequestParams -type HdfsBrowseRequestParams struct { - - // Specifies the path whose contents are to be returned. The last token in the path can be a regex. In this case the regex is applied on the contents of the path upto the second-last token and the matching contents are returned. - ParentPath *string `json:"parentPath,omitempty"` -} - -// Validate validates this hdfs browse request params -func (m *HdfsBrowseRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this hdfs browse request params based on context it is used -func (m *HdfsBrowseRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsBrowseRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsBrowseRequestParams) UnmarshalBinary(b []byte) error { - var res HdfsBrowseRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_file_folder_params.go b/v2/models/hdfs_file_folder_params.go deleted file mode 100644 index ccad236e..00000000 --- a/v2/models/hdfs_file_folder_params.go +++ /dev/null @@ -1,120 +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" -) - -// HdfsFileFolderParams Object details for Hdfs. -// -// swagger:model HdfsFileFolderParams -type HdfsFileFolderParams struct { - - // Specifies the name. - Name *string `json:"name,omitempty"` - - // Specifies the path. - Path *string `json:"path,omitempty"` - - // Specifies the type of the contents. - // Enum: ["File","Directory","Symlink"] - Type string `json:"type,omitempty"` - - // Specifies the last time file was modified in unix timestamp. - LastModifiedTimeUsecs *int64 `json:"lastModifiedTimeUsecs,omitempty"` - - // Specifies the file size in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` -} - -// Validate validates this hdfs file folder params -func (m *HdfsFileFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hdfsFileFolderParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsFileFolderParamsTypeTypePropEnum = append(hdfsFileFolderParamsTypeTypePropEnum, v) - } -} - -const ( - - // HdfsFileFolderParamsTypeFile captures enum value "File" - HdfsFileFolderParamsTypeFile string = "File" - - // HdfsFileFolderParamsTypeDirectory captures enum value "Directory" - HdfsFileFolderParamsTypeDirectory string = "Directory" - - // HdfsFileFolderParamsTypeSymlink captures enum value "Symlink" - HdfsFileFolderParamsTypeSymlink string = "Symlink" -) - -// prop value enum -func (m *HdfsFileFolderParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsFileFolderParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsFileFolderParams) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs file folder params based on context it is used -func (m *HdfsFileFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsFileFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsFileFolderParams) UnmarshalBinary(b []byte) error { - var res HdfsFileFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_params.go b/v2/models/hdfs_params.go deleted file mode 100644 index 76f40ebf..00000000 --- a/v2/models/hdfs_params.go +++ /dev/null @@ -1,160 +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" -) - -// HdfsParams Recover HDFS environment params. -// -// Specifies the recovery options specific to HDFS environment. -// -// swagger:model HdfsParams -type HdfsParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover HDFS objects. - // Required: true - RecoverHdfsParams *RecoverHdfsParams `json:"recoverHdfsParams"` -} - -// Validate validates this hdfs params -func (m *HdfsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverHdfsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hdfsParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsParamsTypeRecoveryActionPropEnum = append(hdfsParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // HdfsParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - HdfsParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *HdfsParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *HdfsParams) validateRecoverHdfsParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverHdfsParams", "body", m.RecoverHdfsParams); err != nil { - return err - } - - if m.RecoverHdfsParams != nil { - if err := m.RecoverHdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHdfsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs params based on the context it is used -func (m *HdfsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsParams) contextValidateRecoverHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverHdfsParams != nil { - - if err := m.RecoverHdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHdfsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsParams) UnmarshalBinary(b []byte) error { - var res HdfsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_protection_group_params.go b/v2/models/hdfs_protection_group_params.go deleted file mode 100644 index a5bb0afd..00000000 --- a/v2/models/hdfs_protection_group_params.go +++ /dev/null @@ -1,192 +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" -) - -// HdfsProtectionGroupParams Specifies the parameters for HDFS Protection Group. -// -// swagger:model HdfsProtectionGroupParams -type HdfsProtectionGroupParams struct { - - // Specifies the paths to be included in the Protection Group. - // Min Items: 1 - IncludePaths []string `json:"includePaths"` - - // Specifies the paths to be excluded in the Protection Group. excludePaths will ovrride includePaths. - ExcludePaths []string `json:"excludePaths"` - - // Specifies the maximum number of concurrent IO Streams that will be created to exchange data with the cluster. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum network bandwidth that each concurrent IO Stream can use for exchanging data with the cluster. - BandwidthMBPS *int64 `json:"bandwidthMBPS,omitempty"` - - // The object ID of the HDFS source for this protection group. - // Required: true - HdfsSourceID *int64 `json:"hdfsSourceId"` - - // Object ID of the Source on which this protection was run . - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies settings for indexing files found in an Object so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the name of the Source on which this protection was run. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this hdfs protection group params -func (m *HdfsProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIncludePaths(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsProtectionGroupParams) validateIncludePaths(formats strfmt.Registry) error { - if swag.IsZero(m.IncludePaths) { // not required - return nil - } - - iIncludePathsSize := int64(len(m.IncludePaths)) - - if err := validate.MinItems("includePaths", "body", iIncludePathsSize, 1); err != nil { - return err - } - - return nil -} - -func (m *HdfsProtectionGroupParams) validateHdfsSourceID(formats strfmt.Registry) error { - - if err := validate.Required("hdfsSourceId", "body", m.HdfsSourceID); err != nil { - return err - } - - return nil -} - -func (m *HdfsProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs protection group params based on the context it is used -func (m *HdfsProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *HdfsProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *HdfsProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res HdfsProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_search_params.go b/v2/models/hdfs_search_params.go deleted file mode 100644 index 0016f2df..00000000 --- a/v2/models/hdfs_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HdfsSearchParams Specifies the parameters for searching HDFS Folders and Files. -// -// swagger:model HdfsSearchParams -type HdfsSearchParams struct { - - // Specifies the search string to search the HDFS Folders and Files. - // Required: true - SearchString *string `json:"searchString"` - - // Specifies types as Folders or Files or both to be searched. - // Required: true - HdfsTypes []string `json:"hdfsTypes"` -} - -// Validate validates this hdfs search params -func (m *HdfsSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var hdfsSearchParamsHdfsTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HDFSFolders","HDFSFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsSearchParamsHdfsTypesItemsEnum = append(hdfsSearchParamsHdfsTypesItemsEnum, v) - } -} - -func (m *HdfsSearchParams) validateHdfsTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsSearchParamsHdfsTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsSearchParams) validateHdfsTypes(formats strfmt.Registry) error { - - if err := validate.Required("hdfsTypes", "body", m.HdfsTypes); err != nil { - return err - } - - for i := 0; i < len(m.HdfsTypes); i++ { - - // value enum - if err := m.validateHdfsTypesItemsEnum("hdfsTypes"+"."+strconv.Itoa(i), "body", m.HdfsTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this hdfs search params based on context it is used -func (m *HdfsSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSearchParams) UnmarshalBinary(b []byte) error { - var res HdfsSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_source_registration_params.go b/v2/models/hdfs_source_registration_params.go deleted file mode 100644 index 171bad95..00000000 --- a/v2/models/hdfs_source_registration_params.go +++ /dev/null @@ -1,516 +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" -) - -// HdfsSourceRegistrationParams Register HDFS source request parameters. -// -// Specifies parameters to register an HDFS source. -// -// swagger:model HdfsSourceRegistrationParams -type HdfsSourceRegistrationParams struct { - HdfsAdditionalParams - - // IP or hostname of any host from which the HDFS configuration files core-site.xml and hdfs-site.xml can be read. - // Required: true - Host *string `json:"host"` - - // The directory containing the core-site.xml and hdfs-site.xml configuration files. - // Required: true - ConfigurationDirectory *string `json:"configurationDirectory"` - - // The kerberos principal to be used to connect to this HDFS source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // The hadoop distribution for this cluster. This can be either 'CDH' or 'HDP' - // Required: true - // Enum: ["CDH","HDP"] - HadoopDistribution *string `json:"hadoopDistribution"` - - // The hadoop version for this cluster. - // Required: true - HadoopVersion *string `json:"hadoopVersion"` - - // ssh password credentials - SSHPasswordCredentials *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HdfsSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HdfsAdditionalParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HdfsAdditionalParams = aO0 - - // AO1 - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - HadoopDistribution *string `json:"hadoopDistribution"` - - HadoopVersion *string `json:"hadoopVersion"` - - SSHPasswordCredentials *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Host = dataAO1.Host - - m.ConfigurationDirectory = dataAO1.ConfigurationDirectory - - m.KerberosPrincipal = dataAO1.KerberosPrincipal - - m.HadoopDistribution = dataAO1.HadoopDistribution - - m.HadoopVersion = dataAO1.HadoopVersion - - m.SSHPasswordCredentials = dataAO1.SSHPasswordCredentials - - m.SSHPrivateKeyCredentials = dataAO1.SSHPrivateKeyCredentials - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HdfsSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HdfsAdditionalParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - HadoopDistribution *string `json:"hadoopDistribution"` - - HadoopVersion *string `json:"hadoopVersion"` - - SSHPasswordCredentials *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - - dataAO1.Host = m.Host - - dataAO1.ConfigurationDirectory = m.ConfigurationDirectory - - dataAO1.KerberosPrincipal = m.KerberosPrincipal - - dataAO1.HadoopDistribution = m.HadoopDistribution - - dataAO1.HadoopVersion = m.HadoopVersion - - dataAO1.SSHPasswordCredentials = m.SSHPasswordCredentials - - dataAO1.SSHPrivateKeyCredentials = m.SSHPrivateKeyCredentials - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hdfs source registration params -func (m *HdfsSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsAdditionalParams - if err := m.HdfsAdditionalParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigurationDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHadoopDistribution(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHadoopVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationParams) validateConfigurationDirectory(formats strfmt.Registry) error { - - if err := validate.Required("configurationDirectory", "body", m.ConfigurationDirectory); err != nil { - return err - } - - return nil -} - -var hdfsSourceRegistrationParamsTypeHadoopDistributionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CDH","HDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hdfsSourceRegistrationParamsTypeHadoopDistributionPropEnum = append(hdfsSourceRegistrationParamsTypeHadoopDistributionPropEnum, v) - } -} - -// property enum -func (m *HdfsSourceRegistrationParams) validateHadoopDistributionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hdfsSourceRegistrationParamsTypeHadoopDistributionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HdfsSourceRegistrationParams) validateHadoopDistribution(formats strfmt.Registry) error { - - if err := validate.Required("hadoopDistribution", "body", m.HadoopDistribution); err != nil { - return err - } - - // value enum - if err := m.validateHadoopDistributionEnum("hadoopDistribution", "body", *m.HadoopDistribution); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationParams) validateHadoopVersion(formats strfmt.Registry) error { - - if err := validate.Required("hadoopVersion", "body", m.HadoopVersion); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HdfsSourceRegistrationParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs source registration params based on the context it is used -func (m *HdfsSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsAdditionalParams - if err := m.HdfsAdditionalParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HdfsSourceRegistrationParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HdfsSourceRegistrationParamsAO1SSHPasswordCredentials SSH username + password required for reading configuration file. Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HdfsSourceRegistrationParamsAO1SSHPasswordCredentials -type HdfsSourceRegistrationParamsAO1SSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hdfs source registration params a o1 SSH password credentials -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs source registration params a o1 SSH password credentials based on context it is used -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationParamsAO1SSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationParamsAO1SSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials -type HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hdfs source registration params a o1 SSH private key credentials -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs source registration params a o1 SSH private key credentials based on context it is used -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationParamsAO1SSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hdfs_source_registration_update_params.go b/v2/models/hdfs_source_registration_update_params.go deleted file mode 100644 index c06e2335..00000000 --- a/v2/models/hdfs_source_registration_update_params.go +++ /dev/null @@ -1,321 +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" -) - -// HdfsSourceRegistrationUpdateParams Update HDFS source request parameters. -// -// Specifies parameters to update the registeration of an HDFS source. -// -// swagger:model HdfsSourceRegistrationUpdateParams -type HdfsSourceRegistrationUpdateParams struct { - - // IP or hostname of any host from which the HDFS configuration files core-site.xml and hdfs-site.xml can be read. - Host *string `json:"host,omitempty"` - - // The directory containing the core-site.xml and hdfs-site.xml configuration files. - ConfigurationDirectory *string `json:"configurationDirectory,omitempty"` - - // The kerberos principal to be used to connect to this HDFS source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // ssh password credentials - SSHPasswordCredentials *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// Validate validates this hdfs source registration update params -func (m *HdfsSourceRegistrationUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationUpdateParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HdfsSourceRegistrationUpdateParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hdfs source registration update params based on the context it is used -func (m *HdfsSourceRegistrationUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationUpdateParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HdfsSourceRegistrationUpdateParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParams) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials SSH username + password required for reading configuration file. Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials -type HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hdfs source registration update params SSH password credentials -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs source registration update params SSH password credentials based on context it is used -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationUpdateParamsSSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials -type HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hdfs source registration update params SSH private key credentials -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hdfs source registration update params SSH private key credentials based on context it is used -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HdfsSourceRegistrationUpdateParamsSSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_a_w_s_target_config.go b/v2/models/helios_a_w_s_target_config.go deleted file mode 100644 index 670fc202..00000000 --- a/v2/models/helios_a_w_s_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// HeliosAWSTargetConfig AWS Target Configuration -// -// # Specifies the configuration for adding AWS as repilcation target -// -// swagger:model HeliosAWSTargetConfig -type HeliosAWSTargetConfig struct { - - // Specifies the source id of the AWS protection source registered on Cohesity cluster. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the AWS Replication target. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies id of the AWS region in which to replicate the Snapshot to. Applicable if replication target is AWS target. - // Required: true - Region *int64 `json:"region"` - - // Specifies name of the AWS region in which to replicate the Snapshot to. Applicable if replication target is AWS target. - // Read Only: true - RegionName *string `json:"regionName,omitempty"` -} - -// Validate validates this helios a w s target config -func (m *HeliosAWSTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAWSTargetConfig) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *HeliosAWSTargetConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios a w s target config based on the context it is used -func (m *HeliosAWSTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegionName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAWSTargetConfig) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *HeliosAWSTargetConfig) contextValidateRegionName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "regionName", "body", m.RegionName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAWSTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAWSTargetConfig) UnmarshalBinary(b []byte) error { - var res HeliosAWSTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_a_w_s_tier.go b/v2/models/helios_a_w_s_tier.go deleted file mode 100644 index 00124ce4..00000000 --- a/v2/models/helios_a_w_s_tier.go +++ /dev/null @@ -1,159 +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" -) - -// HeliosAWSTier Specifies the settings for a aws tier. -// -// swagger:model HeliosAWSTier -type HeliosAWSTier struct { - HeliosCommonCloudTierSettings - - // Specifies the AWS tier types. - // Required: true - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosAWSTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosAWSTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios a w s tier -func (m *HeliosAWSTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosAWSTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosAWSTierTypeTierTypePropEnum = append(heliosAWSTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *HeliosAWSTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosAWSTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosAWSTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios a w s tier based on the context it is used -func (m *HeliosAWSTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAWSTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAWSTier) UnmarshalBinary(b []byte) error { - var res HeliosAWSTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_a_w_s_tiers.go b/v2/models/helios_a_w_s_tiers.go deleted file mode 100644 index daa6242d..00000000 --- a/v2/models/helios_a_w_s_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosAWSTiers Specifies aws tiers. -// -// swagger:model HeliosAWSTiers -type HeliosAWSTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*HeliosAWSTier `json:"tiers"` -} - -// Validate validates this helios a w s tiers -func (m *HeliosAWSTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAWSTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios a w s tiers based on the context it is used -func (m *HeliosAWSTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAWSTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAWSTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAWSTiers) UnmarshalBinary(b []byte) error { - var res HeliosAWSTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_archival_config.go b/v2/models/helios_archival_config.go deleted file mode 100644 index 5ccb5063..00000000 --- a/v2/models/helios_archival_config.go +++ /dev/null @@ -1,356 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosArchivalConfig Archival Target Configuration -// -// Specifies settings for copying Snapshots External Targets (such as AWS or Tape). This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model HeliosArchivalConfig -type HeliosArchivalConfig struct { - HeliosCommonTargetConfiguration - - // Specifies the Archival target to copy the Snapshots to. - // Required: true - TargetID *int64 `json:"targetId"` - - // Specifies the Archival target name where Snapshots are copied. - // Read Only: true - TargetName *string `json:"targetName,omitempty"` - - // Specifies the Archival target type where Snapshots are copied. - // Read Only: true - // Enum: ["Tape","Cloud","Nas"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the tier settings that will be applied to given target. If provided target is of type 'cloud', then only tiering can be applied. The respective cloud platform details need to be provided here. - TierSettings *HeliosTierLevelSettings `json:"tierSettings,omitempty"` - - // Specifies additional retention policies that should be applied to the archived backup. Archived backup snapshot will be retained up to a time that is the maximum of all retention policies that are applicable to it. - ExtendedRetention []*HeliosExtendedRetentionPolicy `json:"extendedRetention"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosArchivalConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - - TierSettings *HeliosTierLevelSettings `json:"tierSettings,omitempty"` - - ExtendedRetention []*HeliosExtendedRetentionPolicy `json:"extendedRetention"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetID = dataAO1.TargetID - - m.TargetName = dataAO1.TargetName - - m.TargetType = dataAO1.TargetType - - m.TierSettings = dataAO1.TierSettings - - m.ExtendedRetention = dataAO1.ExtendedRetention - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosArchivalConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - - TierSettings *HeliosTierLevelSettings `json:"tierSettings,omitempty"` - - ExtendedRetention []*HeliosExtendedRetentionPolicy `json:"extendedRetention"` - } - - dataAO1.TargetID = m.TargetID - - dataAO1.TargetName = m.TargetName - - dataAO1.TargetType = m.TargetType - - dataAO1.TierSettings = m.TierSettings - - dataAO1.ExtendedRetention = m.ExtendedRetention - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios archival config -func (m *HeliosArchivalConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierSettings(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosArchivalConfig) validateTargetID(formats strfmt.Registry) error { - - if err := validate.Required("targetId", "body", m.TargetID); err != nil { - return err - } - - return nil -} - -var heliosArchivalConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosArchivalConfigTypeTargetTypePropEnum = append(heliosArchivalConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *HeliosArchivalConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosArchivalConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosArchivalConfig) validateTargetType(formats strfmt.Registry) error { - - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *HeliosArchivalConfig) validateTierSettings(formats strfmt.Registry) error { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if m.TierSettings != nil { - if err := m.TierSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -func (m *HeliosArchivalConfig) validateExtendedRetention(formats strfmt.Registry) error { - - if swag.IsZero(m.ExtendedRetention) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetention); i++ { - if swag.IsZero(m.ExtendedRetention[i]) { // not required - continue - } - - if m.ExtendedRetention[i] != nil { - if err := m.ExtendedRetention[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios archival config based on the context it is used -func (m *HeliosArchivalConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTierSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosArchivalConfig) contextValidateTargetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetName", "body", m.TargetName); err != nil { - return err - } - - return nil -} - -func (m *HeliosArchivalConfig) contextValidateTargetType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetType", "body", m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *HeliosArchivalConfig) contextValidateTierSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.TierSettings != nil { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if err := m.TierSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -func (m *HeliosArchivalConfig) contextValidateExtendedRetention(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetention); i++ { - - if m.ExtendedRetention[i] != nil { - - if swag.IsZero(m.ExtendedRetention[i]) { // not required - return nil - } - - if err := m.ExtendedRetention[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosArchivalConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosArchivalConfig) UnmarshalBinary(b []byte) error { - var res HeliosArchivalConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_auto_tier_type.go b/v2/models/helios_auto_tier_type.go deleted file mode 100644 index bf242168..00000000 --- a/v2/models/helios_auto_tier_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosAutoTierType Helios Auto Tier Type -// -// Specifies the type of Tiers in Helios. -// -// swagger:model HeliosAutoTierType -type HeliosAutoTierType struct { - - // Specifies the type of Tiers in Helios. - // Enum: ["kAmazonS3Standard","kAmazonS3Glacier"] - HeliosAutoTierType string `json:"heliosAutoTierType,omitempty"` -} - -// Validate validates this helios auto tier type -func (m *HeliosAutoTierType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHeliosAutoTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosAutoTierTypeTypeHeliosAutoTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3Glacier"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosAutoTierTypeTypeHeliosAutoTierTypePropEnum = append(heliosAutoTierTypeTypeHeliosAutoTierTypePropEnum, v) - } -} - -const ( - - // HeliosAutoTierTypeHeliosAutoTierTypeKAmazonS3Standard captures enum value "kAmazonS3Standard" - HeliosAutoTierTypeHeliosAutoTierTypeKAmazonS3Standard string = "kAmazonS3Standard" - - // HeliosAutoTierTypeHeliosAutoTierTypeKAmazonS3Glacier captures enum value "kAmazonS3Glacier" - HeliosAutoTierTypeHeliosAutoTierTypeKAmazonS3Glacier string = "kAmazonS3Glacier" -) - -// prop value enum -func (m *HeliosAutoTierType) validateHeliosAutoTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosAutoTierTypeTypeHeliosAutoTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosAutoTierType) validateHeliosAutoTierType(formats strfmt.Registry) error { - if swag.IsZero(m.HeliosAutoTierType) { // not required - return nil - } - - // value enum - if err := m.validateHeliosAutoTierTypeEnum("heliosAutoTierType", "body", m.HeliosAutoTierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios auto tier type based on context it is used -func (m *HeliosAutoTierType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAutoTierType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAutoTierType) UnmarshalBinary(b []byte) error { - var res HeliosAutoTierType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_aws_cloud_spin_params.go b/v2/models/helios_aws_cloud_spin_params.go deleted file mode 100644 index c5ca5ec6..00000000 --- a/v2/models/helios_aws_cloud_spin_params.go +++ /dev/null @@ -1,79 +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" -) - -// HeliosAwsCloudSpinParams AWS Parameters. -// -// Specifies various resources when converting and deploying a VM to AWS. -// -// swagger:model HeliosAwsCloudSpinParams -type HeliosAwsCloudSpinParams struct { - - // Specifies id of the AWS region in which to deploy the VM. - // Required: true - Region *int64 `json:"region"` - - // Specifies id of the Virtual Private Cloud to chose for the instance type. - VpcID *int64 `json:"vpcId,omitempty"` - - // Specifies id of the subnet within above VPC. - SubnetID *int64 `json:"subnetId,omitempty"` -} - -// Validate validates this helios aws cloud spin params -func (m *HeliosAwsCloudSpinParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAwsCloudSpinParams) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios aws cloud spin params based on context it is used -func (m *HeliosAwsCloudSpinParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAwsCloudSpinParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAwsCloudSpinParams) UnmarshalBinary(b []byte) error { - var res HeliosAwsCloudSpinParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_azure_cloud_spin_params.go b/v2/models/helios_azure_cloud_spin_params.go deleted file mode 100644 index f72cc801..00000000 --- a/v2/models/helios_azure_cloud_spin_params.go +++ /dev/null @@ -1,82 +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" -) - -// HeliosAzureCloudSpinParams Azure Parameters. -// -// Specifies various resources when converting and deploying a VM to Azure. -// -// swagger:model HeliosAzureCloudSpinParams -type HeliosAzureCloudSpinParams struct { - - // Specifies id of the resource group for the selected virtual network. - NetworkResourceGroupID *int64 `json:"networkResourceGroupId,omitempty"` - - // Specifies id of the Azure resource group. Its value is globally unique within Azure. - ResourceGroupID *int64 `json:"resourceGroupId,omitempty"` - - // Specifies id of the storage account that will contain the storage container within which we will create the blob that will become the VHD disk for the cloned VM. - StorageAccountID *int64 `json:"storageAccountId,omitempty"` - - // Specifies id of the storage container within the above storage account. - StorageContainerID *int64 `json:"storageContainerId,omitempty"` - - // Specifies id of the resource group for the selected storage account. - StorageResourceGroupID *int64 `json:"storageResourceGroupId,omitempty"` - - // Specifies the availability set. - AvailabilitySetID *int64 `json:"availabilitySetId,omitempty"` - - // Specifies id of the temporary Azure resource group. - TempVMResourceGroupID *int64 `json:"tempVmResourceGroupId,omitempty"` - - // Specifies id of the temporary VM storage account that will contain the storage container within which we will create the blob that will become the VHD disk for the cloned VM. - TempVMStorageAccountID *int64 `json:"tempVmStorageAccountId,omitempty"` - - // Specifies id of the temporary VM storage container within the above storage account. - TempVMStorageContainerID *int64 `json:"tempVmStorageContainerId,omitempty"` - - // Specifies Id of the temporary VM subnet within the above virtual network. - TempVMSubnetID *int64 `json:"tempVmSubnetId,omitempty"` - - // Specifies Id of the temporary VM Virtual Network. - TempVMVirtualNetworkID *int64 `json:"tempVmVirtualNetworkId,omitempty"` -} - -// Validate validates this helios azure cloud spin params -func (m *HeliosAzureCloudSpinParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this helios azure cloud spin params based on context it is used -func (m *HeliosAzureCloudSpinParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAzureCloudSpinParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAzureCloudSpinParams) UnmarshalBinary(b []byte) error { - var res HeliosAzureCloudSpinParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_azure_target_config.go b/v2/models/helios_azure_target_config.go deleted file mode 100644 index 70b667a9..00000000 --- a/v2/models/helios_azure_target_config.go +++ /dev/null @@ -1,217 +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" -) - -// HeliosAzureTargetConfig Azure Target Configuration -// -// # Specifies the configuration for adding Azure as replication target -// -// swagger:model HeliosAzureTargetConfig -type HeliosAzureTargetConfig struct { - - // Specifies the source id of the Azure protection source registered on Cohesity cluster. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the Azure Replication target. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies id of the Azure resource group used to filter regions in UI. - ResourceGroup *int64 `json:"resourceGroup,omitempty"` - - // Specifies name of the Azure resource group used to filter regions in UI. - // Read Only: true - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - - // Specifies id of the storage account of Azure replication target which will contain storage container. - // Read Only: true - StorageAccount *int64 `json:"storageAccount,omitempty"` - - // Specifies name of the storage account of Azure replication target which will contain storage container. - // Read Only: true - StorageAccountName *string `json:"storageAccountName,omitempty"` - - // Specifies id of the storage container of Azure Replication target. - // Read Only: true - StorageContainer *int64 `json:"storageContainer,omitempty"` - - // Specifies name of the storage container of Azure Replication target. - // Read Only: true - StorageContainerName *string `json:"storageContainerName,omitempty"` - - // Specifies id of the storage resource group of Azure Replication target. - // Read Only: true - StorageResourceGroup *int64 `json:"storageResourceGroup,omitempty"` - - // Specifies name of the storage resource group of Azure Replication target. - // Read Only: true - StorageResourceGroupName *string `json:"storageResourceGroupName,omitempty"` -} - -// Validate validates this helios azure target config -func (m *HeliosAzureTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAzureTargetConfig) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios azure target config based on the context it is used -func (m *HeliosAzureTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceGroupName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccountName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainerName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroupName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateResourceGroupName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "resourceGroupName", "body", m.ResourceGroupName); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageAccount", "body", m.StorageAccount); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageAccountName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageAccountName", "body", m.StorageAccountName); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageContainer", "body", m.StorageContainer); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageContainerName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageContainerName", "body", m.StorageContainerName); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageResourceGroup", "body", m.StorageResourceGroup); err != nil { - return err - } - - return nil -} - -func (m *HeliosAzureTargetConfig) contextValidateStorageResourceGroupName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageResourceGroupName", "body", m.StorageResourceGroupName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAzureTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAzureTargetConfig) UnmarshalBinary(b []byte) error { - var res HeliosAzureTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_azure_tier.go b/v2/models/helios_azure_tier.go deleted file mode 100644 index 7bfba9d6..00000000 --- a/v2/models/helios_azure_tier.go +++ /dev/null @@ -1,159 +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" -) - -// HeliosAzureTier Specifies the settings for a Azure tier. -// -// swagger:model HeliosAzureTier -type HeliosAzureTier struct { - HeliosCommonCloudTierSettings - - // Specifies the Azure tier types. - // Required: true - // Enum: ["kAzureTierHot","kAzureTierCool","kAzureTierArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosAzureTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosAzureTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios azure tier -func (m *HeliosAzureTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosAzureTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzureTierHot","kAzureTierCool","kAzureTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosAzureTierTypeTierTypePropEnum = append(heliosAzureTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *HeliosAzureTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosAzureTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosAzureTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios azure tier based on the context it is used -func (m *HeliosAzureTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAzureTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAzureTier) UnmarshalBinary(b []byte) error { - var res HeliosAzureTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_azure_tiers.go b/v2/models/helios_azure_tiers.go deleted file mode 100644 index 3adcd88f..00000000 --- a/v2/models/helios_azure_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosAzureTiers Specifies Azure tiers. -// -// swagger:model HeliosAzureTiers -type HeliosAzureTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*HeliosAzureTier `json:"tiers"` -} - -// Validate validates this helios azure tiers -func (m *HeliosAzureTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAzureTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios azure tiers based on the context it is used -func (m *HeliosAzureTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosAzureTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosAzureTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosAzureTiers) UnmarshalBinary(b []byte) error { - var res HeliosAzureTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_backup_policy.go b/v2/models/helios_backup_policy.go deleted file mode 100644 index 82ecf960..00000000 --- a/v2/models/helios_backup_policy.go +++ /dev/null @@ -1,264 +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" -) - -// HeliosBackupPolicy Backup Schedule and Retention. -// -// Specifies the backup schedule and retentions of a Protection Policy. -// -// swagger:model HeliosBackupPolicy -type HeliosBackupPolicy struct { - - // Specifies the Incremental and Full policy settings and also the common Retention policy settings. - Regular *HeliosRegularBackupPolicy `json:"regular,omitempty"` - - // Specifies the Log backup schedule of a Protection Policy. - Log *HeliosLogBackupPolicy `json:"log,omitempty"` - - // Specifies the BMR backup schedule of a Protection Policy. - Bmr *HeliosBmrBackupPolicy `json:"bmr,omitempty"` - - // Specifies the settings for CDP (Continious Data Protection) Protection policy. - Cdp *HeliosCdpBackupPolicy `json:"cdp,omitempty"` -} - -// Validate validates this helios backup policy -func (m *HeliosBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegular(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLog(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBmr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdp(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosBackupPolicy) validateRegular(formats strfmt.Registry) error { - if swag.IsZero(m.Regular) { // not required - return nil - } - - if m.Regular != nil { - if err := m.Regular.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regular") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regular") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) validateLog(formats strfmt.Registry) error { - if swag.IsZero(m.Log) { // not required - return nil - } - - if m.Log != nil { - if err := m.Log.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) validateBmr(formats strfmt.Registry) error { - if swag.IsZero(m.Bmr) { // not required - return nil - } - - if m.Bmr != nil { - if err := m.Bmr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bmr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bmr") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) validateCdp(formats strfmt.Registry) error { - if swag.IsZero(m.Cdp) { // not required - return nil - } - - if m.Cdp != nil { - if err := m.Cdp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdp") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios backup policy based on the context it is used -func (m *HeliosBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegular(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBmr(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdp(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosBackupPolicy) contextValidateRegular(ctx context.Context, formats strfmt.Registry) error { - - if m.Regular != nil { - - if swag.IsZero(m.Regular) { // not required - return nil - } - - if err := m.Regular.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regular") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regular") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) contextValidateLog(ctx context.Context, formats strfmt.Registry) error { - - if m.Log != nil { - - if swag.IsZero(m.Log) { // not required - return nil - } - - if err := m.Log.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("log") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("log") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) contextValidateBmr(ctx context.Context, formats strfmt.Registry) error { - - if m.Bmr != nil { - - if swag.IsZero(m.Bmr) { // not required - return nil - } - - if err := m.Bmr.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bmr") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bmr") - } - return err - } - } - - return nil -} - -func (m *HeliosBackupPolicy) contextValidateCdp(ctx context.Context, formats strfmt.Registry) error { - - if m.Cdp != nil { - - if swag.IsZero(m.Cdp) { // not required - return nil - } - - if err := m.Cdp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdp") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_blackout_window.go b/v2/models/helios_blackout_window.go deleted file mode 100644 index 8127c9e7..00000000 --- a/v2/models/helios_blackout_window.go +++ /dev/null @@ -1,234 +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" -) - -// HeliosBlackoutWindow Blackout Window -// -// List of Blackout Windows. If specified, this field defines blackout periods when backups are not triggered.. -// -// swagger:model HeliosBlackoutWindow -type HeliosBlackoutWindow struct { - - // Specifies a day in the week when no new Protection Group Runs should be started such as 'Sunday'. Specifies a day in a week such as 'Sunday', 'Monday', etc. - // Required: true - // Enum: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] - Day *string `json:"day"` - - // Blackout Start Time. - // - // Specifies the start time of the blackout time range. - // Required: true - StartTime *TimeOfDay `json:"startTime"` - - // Blackout End Time. - // - // Specifies the end time of the blackout time range. - // Required: true - EndTime *TimeOfDay `json:"endTime"` - - // Specifies the unique identifier for the blackout getting added. This field should only be set if policy is getting updated. - ConfigID *string `json:"configId,omitempty"` -} - -// Validate validates this helios blackout window -func (m *HeliosBlackoutWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDay(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosBlackoutWindowTypeDayPropEnum []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 { - heliosBlackoutWindowTypeDayPropEnum = append(heliosBlackoutWindowTypeDayPropEnum, v) - } -} - -const ( - - // HeliosBlackoutWindowDaySunday captures enum value "Sunday" - HeliosBlackoutWindowDaySunday string = "Sunday" - - // HeliosBlackoutWindowDayMonday captures enum value "Monday" - HeliosBlackoutWindowDayMonday string = "Monday" - - // HeliosBlackoutWindowDayTuesday captures enum value "Tuesday" - HeliosBlackoutWindowDayTuesday string = "Tuesday" - - // HeliosBlackoutWindowDayWednesday captures enum value "Wednesday" - HeliosBlackoutWindowDayWednesday string = "Wednesday" - - // HeliosBlackoutWindowDayThursday captures enum value "Thursday" - HeliosBlackoutWindowDayThursday string = "Thursday" - - // HeliosBlackoutWindowDayFriday captures enum value "Friday" - HeliosBlackoutWindowDayFriday string = "Friday" - - // HeliosBlackoutWindowDaySaturday captures enum value "Saturday" - HeliosBlackoutWindowDaySaturday string = "Saturday" -) - -// prop value enum -func (m *HeliosBlackoutWindow) validateDayEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosBlackoutWindowTypeDayPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosBlackoutWindow) validateDay(formats strfmt.Registry) error { - - if err := validate.Required("day", "body", m.Day); err != nil { - return err - } - - // value enum - if err := m.validateDayEnum("day", "body", *m.Day); err != nil { - return err - } - - return nil -} - -func (m *HeliosBlackoutWindow) validateStartTime(formats strfmt.Registry) error { - - if err := validate.Required("startTime", "body", m.StartTime); err != nil { - return err - } - - 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 -} - -func (m *HeliosBlackoutWindow) validateEndTime(formats strfmt.Registry) error { - - if err := validate.Required("endTime", "body", m.EndTime); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this helios blackout window based on the context it is used -func (m *HeliosBlackoutWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosBlackoutWindow) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - - if m.StartTime != 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 -} - -func (m *HeliosBlackoutWindow) contextValidateEndTime(ctx context.Context, formats strfmt.Registry) error { - - if m.EndTime != 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 -} - -// MarshalBinary interface implementation -func (m *HeliosBlackoutWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosBlackoutWindow) UnmarshalBinary(b []byte) error { - var res HeliosBlackoutWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_bmr_backup_policy.go b/v2/models/helios_bmr_backup_policy.go deleted file mode 100644 index e8138b1d..00000000 --- a/v2/models/helios_bmr_backup_policy.go +++ /dev/null @@ -1,162 +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" -) - -// HeliosBmrBackupPolicy BMR Backup (Physical) Schedule and Retention. -// -// Specifies the BMR schedule in case of physical source protection. -// -// swagger:model HeliosBmrBackupPolicy -type HeliosBmrBackupPolicy struct { - - // Specifies the schedule settings for BMR backup. - Schedule *HeliosBmrSchedule `json:"schedule,omitempty"` - - // Specifies the Retention period of a backup in days, months or years. - Retention *HeliosRetention `json:"retention,omitempty"` -} - -// Validate validates this helios bmr backup policy -func (m *HeliosBmrBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosBmrBackupPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosBmrBackupPolicy) 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 -} - -// ContextValidate validate this helios bmr backup policy based on the context it is used -func (m *HeliosBmrBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *HeliosBmrBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosBmrBackupPolicy) 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 *HeliosBmrBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosBmrBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosBmrBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_bmr_schedule.go b/v2/models/helios_bmr_schedule.go deleted file mode 100644 index 24fbf01b..00000000 --- a/v2/models/helios_bmr_schedule.go +++ /dev/null @@ -1,214 +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" -) - -// HeliosBmrSchedule Bmr Schedule -// -// Specifies settings that defines how frequent bmr backup will be performed for a Protection Group. -// -// swagger:model HeliosBmrSchedule -type HeliosBmrSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Weeks' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Months' specifies that new Protection Group runs start monthly on certain day of specific week. - // Enum: ["Weeks","Months"] - Unit *string `json:"unit,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *HeliosWeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *HeliosMonthSchedule `json:"monthSchedule,omitempty"` -} - -// Validate validates this helios bmr schedule -func (m *HeliosBmrSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosBmrScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Weeks","Months"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosBmrScheduleTypeUnitPropEnum = append(heliosBmrScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosBmrScheduleUnitWeeks captures enum value "Weeks" - HeliosBmrScheduleUnitWeeks string = "Weeks" - - // HeliosBmrScheduleUnitMonths captures enum value "Months" - HeliosBmrScheduleUnitMonths string = "Months" -) - -// prop value enum -func (m *HeliosBmrSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosBmrScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosBmrSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosBmrSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosBmrSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios bmr schedule based on the context it is used -func (m *HeliosBmrSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosBmrSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosBmrSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosBmrSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosBmrSchedule) UnmarshalBinary(b []byte) error { - var res HeliosBmrSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cassandra_objects.go b/v2/models/helios_cassandra_objects.go deleted file mode 100644 index aae84ccc..00000000 --- a/v2/models/helios_cassandra_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosCassandraObjects Specifies the indexed Cassandra objects. -// -// swagger:model HeliosCassandraObjects -type HeliosCassandraObjects []*HeliosCassandraObjectsItems0 - -// Validate validates this helios cassandra objects -func (m HeliosCassandraObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios cassandra objects based on the context it is used -func (m HeliosCassandraObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosCassandraObjectsItems0 helios cassandra objects items0 -// -// swagger:model HeliosCassandraObjectsItems0 -type HeliosCassandraObjectsItems0 struct { - GlobalClusterIdentifier - - CassandraIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosCassandraObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 CassandraIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CassandraIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosCassandraObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CassandraIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios cassandra objects items0 -func (m *HeliosCassandraObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CassandraIndexedObject - if err := m.CassandraIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios cassandra objects items0 based on the context it is used -func (m *HeliosCassandraObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CassandraIndexedObject - if err := m.CassandraIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCassandraObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCassandraObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosCassandraObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cdp_backup_policy.go b/v2/models/helios_cdp_backup_policy.go deleted file mode 100644 index 4bcad42d..00000000 --- a/v2/models/helios_cdp_backup_policy.go +++ /dev/null @@ -1,111 +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" -) - -// HeliosCdpBackupPolicy Continious Data Protection (CDP) Policy. -// -// Specifies CDP (Continious Data Protection) backup settings for a Protection Group. -// -// swagger:model HeliosCdpBackupPolicy -type HeliosCdpBackupPolicy struct { - - // Specifies the Retention period of a log backup in days, months or years. - Retention *HeliosCdpRetention `json:"retention,omitempty"` -} - -// Validate validates this helios cdp backup policy -func (m *HeliosCdpBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCdpBackupPolicy) 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 -} - -// ContextValidate validate this helios cdp backup policy based on the context it is used -func (m *HeliosCdpBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCdpBackupPolicy) 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 *HeliosCdpBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCdpBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosCdpBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cdp_retention.go b/v2/models/helios_cdp_retention.go deleted file mode 100644 index c4deec14..00000000 --- a/v2/models/helios_cdp_retention.go +++ /dev/null @@ -1,181 +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" -) - -// HeliosCdpRetention Specifies the retention of a CDP backup. -// -// swagger:model HeliosCdpRetention -type HeliosCdpRetention struct { - - // Specificies the Retention Unit of a CDP backup measured in minutes or hours. - // Enum: ["Minutes","Hours"] - Unit *string `json:"unit,omitempty"` - - // Specifies the duration for a cdp backup retention. - // Minimum: 1 - Duration *int32 `json:"duration,omitempty"` - - // Specifies WORM retention type for the 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. - DataLockConfig *DataLockConfig `json:"dataLockConfig,omitempty"` -} - -// Validate validates this helios cdp retention -func (m *HeliosCdpRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosCdpRetentionTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosCdpRetentionTypeUnitPropEnum = append(heliosCdpRetentionTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosCdpRetentionUnitMinutes captures enum value "Minutes" - HeliosCdpRetentionUnitMinutes string = "Minutes" - - // HeliosCdpRetentionUnitHours captures enum value "Hours" - HeliosCdpRetentionUnitHours string = "Hours" -) - -// prop value enum -func (m *HeliosCdpRetention) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosCdpRetentionTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosCdpRetention) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosCdpRetention) validateDuration(formats strfmt.Registry) error { - if swag.IsZero(m.Duration) { // not required - return nil - } - - if err := validate.MinimumInt("duration", "body", int64(*m.Duration), 1, false); err != nil { - return err - } - - return nil -} - -func (m *HeliosCdpRetention) validateDataLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if m.DataLockConfig != nil { - if err := m.DataLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios cdp retention based on the context it is used -func (m *HeliosCdpRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCdpRetention) contextValidateDataLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConfig != nil { - - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if err := m.DataLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCdpRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCdpRetention) UnmarshalBinary(b []byte) error { - var res HeliosCdpRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_claim_request.go b/v2/models/helios_claim_request.go deleted file mode 100644 index fa236351..00000000 --- a/v2/models/helios_claim_request.go +++ /dev/null @@ -1,76 +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" -) - -// HeliosClaimRequest Register to Helios. -// -// Specifies the request to register to Helios. -// -// swagger:model HeliosClaimRequest -type HeliosClaimRequest struct { - - // Specifies the Helios registration token. - // Required: true - RegistrationToken *string `json:"registrationToken"` - - // Specifies the rigel guid to be used for registration. - RigelGUID *int64 `json:"rigelGuid,omitempty"` -} - -// Validate validates this helios claim request -func (m *HeliosClaimRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegistrationToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosClaimRequest) validateRegistrationToken(formats strfmt.Registry) error { - - if err := validate.Required("registrationToken", "body", m.RegistrationToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios claim request based on context it is used -func (m *HeliosClaimRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosClaimRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosClaimRequest) UnmarshalBinary(b []byte) error { - var res HeliosClaimRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cloud_spin_config.go b/v2/models/helios_cloud_spin_config.go deleted file mode 100644 index df623c0a..00000000 --- a/v2/models/helios_cloud_spin_config.go +++ /dev/null @@ -1,166 +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" -) - -// HeliosCloudSpinConfig CloudSpin Target Configuration. -// -// Specifies settings for copying Snapshots to on prem. -// -// swagger:model HeliosCloudSpinConfig -type HeliosCloudSpinConfig struct { - HeliosCommonTargetConfiguration - - // Specifies the details about CloudSpin target where backup snapshots may be converted and stored. - // Required: true - Target *HeliosCloudSpinTarget `json:"target"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosCloudSpinConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - Target *HeliosCloudSpinTarget `json:"target"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Target = dataAO1.Target - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosCloudSpinConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Target *HeliosCloudSpinTarget `json:"target"` - } - - dataAO1.Target = m.Target - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios cloud spin config -func (m *HeliosCloudSpinConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCloudSpinConfig) validateTarget(formats strfmt.Registry) error { - - if err := validate.Required("target", "body", m.Target); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this helios cloud spin config based on the context it is used -func (m *HeliosCloudSpinConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCloudSpinConfig) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.Target != 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 -} - -// MarshalBinary interface implementation -func (m *HeliosCloudSpinConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCloudSpinConfig) UnmarshalBinary(b []byte) error { - var res HeliosCloudSpinConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cloud_spin_target.go b/v2/models/helios_cloud_spin_target.go deleted file mode 100644 index 58c31d25..00000000 --- a/v2/models/helios_cloud_spin_target.go +++ /dev/null @@ -1,183 +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" -) - -// HeliosCloudSpinTarget Specifies the details about Cloud Spin target where backup snapshots may be converted and stored. -// -// swagger:model HeliosCloudSpinTarget -type HeliosCloudSpinTarget struct { - - // Specifies the unique id of the cloud spin entity. - ID *int64 `json:"id,omitempty"` - - // Contains information needed to identify various resources when deploying VMs to Cloud. - // - // Specifies various resources when converting and deploying a VM to AWS. - AwsParams *HeliosAwsCloudSpinParams `json:"awsParams,omitempty"` - - // Specifies various resources when converting and deploying a VM to Azure. - AzureParams *HeliosAzureCloudSpinParams `json:"azureParams,omitempty"` - - // Specifies the name of the already added cloud spin target. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this helios cloud spin target -func (m *HeliosCloudSpinTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCloudSpinTarget) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosCloudSpinTarget) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios cloud spin target based on the context it is used -func (m *HeliosCloudSpinTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCloudSpinTarget) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosCloudSpinTarget) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *HeliosCloudSpinTarget) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCloudSpinTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCloudSpinTarget) UnmarshalBinary(b []byte) error { - var res HeliosCloudSpinTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_cluster_tenant.go b/v2/models/helios_cluster_tenant.go deleted file mode 100644 index 8a65f294..00000000 --- a/v2/models/helios_cluster_tenant.go +++ /dev/null @@ -1,140 +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" -) - -// HeliosClusterTenant HeliosClusterTenant -// -// Description of a Tenant and cluster related properties. -// -// swagger:model HeliosClusterTenant -type HeliosClusterTenant struct { - McmClusterIdentifier - - TenantInfo - - HeliosClusterTenantAllOf2 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosClusterTenant) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 McmClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.McmClusterIdentifier = aO0 - - // AO1 - var aO1 TenantInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.TenantInfo = aO1 - - // AO2 - var aO2 HeliosClusterTenantAllOf2 - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.HeliosClusterTenantAllOf2 = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosClusterTenant) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.McmClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.TenantInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.HeliosClusterTenantAllOf2) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios cluster tenant -func (m *HeliosClusterTenant) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with McmClusterIdentifier - if err := m.McmClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with TenantInfo - if err := m.TenantInfo.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HeliosClusterTenantAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios cluster tenant based on the context it is used -func (m *HeliosClusterTenant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with McmClusterIdentifier - if err := m.McmClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with TenantInfo - if err := m.TenantInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HeliosClusterTenantAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosClusterTenant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosClusterTenant) UnmarshalBinary(b []byte) error { - var res HeliosClusterTenant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HeliosClusterTenantAllOf2 helios cluster tenant all of2 -// -// swagger:model HeliosClusterTenantAllOf2 -type HeliosClusterTenantAllOf2 interface{} diff --git a/v2/models/helios_common_cloud_tier_settings.go b/v2/models/helios_common_cloud_tier_settings.go deleted file mode 100644 index 687e7bd6..00000000 --- a/v2/models/helios_common_cloud_tier_settings.go +++ /dev/null @@ -1,114 +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" -) - -// HeliosCommonCloudTierSettings Specifies the common settings required for configuring cloud tiering. -// -// swagger:model HeliosCommonCloudTierSettings -type HeliosCommonCloudTierSettings struct { - - // Specifies the unit for moving the data from current tier to next tier. This unit will be a base unit for the 'moveAfter' field specified below. - // Enum: ["Days","Weeks","Months","Years"] - MoveAfterUnit *string `json:"moveAfterUnit,omitempty"` - - // Specifies the time period after which the backup will be moved from current tier to next tier. - MoveAfter *int64 `json:"moveAfter,omitempty"` -} - -// Validate validates this helios common cloud tier settings -func (m *HeliosCommonCloudTierSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMoveAfterUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosCommonCloudTierSettingsTypeMoveAfterUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosCommonCloudTierSettingsTypeMoveAfterUnitPropEnum = append(heliosCommonCloudTierSettingsTypeMoveAfterUnitPropEnum, v) - } -} - -const ( - - // HeliosCommonCloudTierSettingsMoveAfterUnitDays captures enum value "Days" - HeliosCommonCloudTierSettingsMoveAfterUnitDays string = "Days" - - // HeliosCommonCloudTierSettingsMoveAfterUnitWeeks captures enum value "Weeks" - HeliosCommonCloudTierSettingsMoveAfterUnitWeeks string = "Weeks" - - // HeliosCommonCloudTierSettingsMoveAfterUnitMonths captures enum value "Months" - HeliosCommonCloudTierSettingsMoveAfterUnitMonths string = "Months" - - // HeliosCommonCloudTierSettingsMoveAfterUnitYears captures enum value "Years" - HeliosCommonCloudTierSettingsMoveAfterUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosCommonCloudTierSettings) validateMoveAfterUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosCommonCloudTierSettingsTypeMoveAfterUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosCommonCloudTierSettings) validateMoveAfterUnit(formats strfmt.Registry) error { - if swag.IsZero(m.MoveAfterUnit) { // not required - return nil - } - - // value enum - if err := m.validateMoveAfterUnitEnum("moveAfterUnit", "body", *m.MoveAfterUnit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios common cloud tier settings based on context it is used -func (m *HeliosCommonCloudTierSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCommonCloudTierSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCommonCloudTierSettings) UnmarshalBinary(b []byte) error { - var res HeliosCommonCloudTierSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_common_search_indexed_objects_request_params.go b/v2/models/helios_common_search_indexed_objects_request_params.go deleted file mode 100644 index 50ebb75e..00000000 --- a/v2/models/helios_common_search_indexed_objects_request_params.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosCommonSearchIndexedObjectsRequestParams Helios Common Search Indexed Objects Params -// -// Specifies the common params to search for global indexed objects. -// -// swagger:model HeliosCommonSearchIndexedObjectsRequestParams -type HeliosCommonSearchIndexedObjectsRequestParams struct { - - // List of Clusters Identifiers to filter from. The format is clusterId:clusterIncarnationId. - // Unique: true - ClusterIdentifiers []string `json:"clusterIdentifiers"` - - // List of Regions to filter from. - // Unique: true - RegionIds []string `json:"regionIds"` - - // Specifies the number of indexed objects to be fetched. - Count *int32 `json:"count,omitempty"` - - // Specifies the object type to be searched for. - // Required: true - // Enum: ["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"] - ObjectType *string `json:"objectType"` - - // source u UI ds - SourceUUIDs HeliosSourceUUIDs `json:"sourceUUIDs,omitempty"` -} - -// Validate validates this helios common search indexed objects request params -func (m *HeliosCommonSearchIndexedObjectsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIdentifiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegionIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceUUIDs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsRequestParams) validateClusterIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifiers) { // not required - return nil - } - - if err := validate.UniqueItems("clusterIdentifiers", "body", m.ClusterIdentifiers); err != nil { - return err - } - - for i := 0; i < len(m.ClusterIdentifiers); i++ { - - if err := validate.Pattern("clusterIdentifiers"+"."+strconv.Itoa(i), "body", m.ClusterIdentifiers[i], `^([0-9]+:[0-9]+)$`); err != nil { - return err - } - - } - - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsRequestParams) validateRegionIds(formats strfmt.Registry) error { - if swag.IsZero(m.RegionIds) { // not required - return nil - } - - if err := validate.UniqueItems("regionIds", "body", m.RegionIds); err != nil { - return err - } - - return nil -} - -var heliosCommonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosCommonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum = append(heliosCommonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum, v) - } -} - -const ( - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeEmails captures enum value "Emails" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeEmails string = "Emails" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeFiles captures enum value "Files" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeFiles string = "Files" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeCassandraObjects captures enum value "CassandraObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeCassandraObjects string = "CassandraObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeCouchbaseObjects captures enum value "CouchbaseObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeCouchbaseObjects string = "CouchbaseObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHbaseObjects captures enum value "HbaseObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHbaseObjects string = "HbaseObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHiveObjects captures enum value "HiveObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHiveObjects string = "HiveObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeMongoObjects captures enum value "MongoObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeMongoObjects string = "MongoObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHDFSObjects captures enum value "HDFSObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeHDFSObjects string = "HDFSObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeExchangeObjects captures enum value "ExchangeObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeExchangeObjects string = "ExchangeObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypePublicFolders captures enum value "PublicFolders" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypePublicFolders string = "PublicFolders" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeGroupsObjects captures enum value "GroupsObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeGroupsObjects string = "GroupsObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeTeamsObjects captures enum value "TeamsObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeTeamsObjects string = "TeamsObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeSharepointObjects captures enum value "SharepointObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeSharepointObjects string = "SharepointObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeOneDriveObjects captures enum value "OneDriveObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeOneDriveObjects string = "OneDriveObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeUdaObjects captures enum value "UdaObjects" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeUdaObjects string = "UdaObjects" - - // HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeSfdcRecords captures enum value "SfdcRecords" - HeliosCommonSearchIndexedObjectsRequestParamsObjectTypeSfdcRecords string = "SfdcRecords" -) - -// prop value enum -func (m *HeliosCommonSearchIndexedObjectsRequestParams) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosCommonSearchIndexedObjectsRequestParamsTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsRequestParams) validateObjectType(formats strfmt.Registry) error { - - if err := validate.Required("objectType", "body", m.ObjectType); err != nil { - return err - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", *m.ObjectType); err != nil { - return err - } - - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsRequestParams) validateSourceUUIDs(formats strfmt.Registry) error { - if swag.IsZero(m.SourceUUIDs) { // not required - return nil - } - - if err := m.SourceUUIDs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceUUIDs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceUUIDs") - } - return err - } - - return nil -} - -// ContextValidate validate this helios common search indexed objects request params based on the context it is used -func (m *HeliosCommonSearchIndexedObjectsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceUUIDs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsRequestParams) contextValidateSourceUUIDs(ctx context.Context, formats strfmt.Registry) error { - - if err := m.SourceUUIDs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceUUIDs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceUUIDs") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCommonSearchIndexedObjectsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCommonSearchIndexedObjectsRequestParams) UnmarshalBinary(b []byte) error { - var res HeliosCommonSearchIndexedObjectsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_common_search_indexed_objects_response_params.go b/v2/models/helios_common_search_indexed_objects_response_params.go deleted file mode 100644 index 5405e821..00000000 --- a/v2/models/helios_common_search_indexed_objects_response_params.go +++ /dev/null @@ -1,220 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosCommonSearchIndexedObjectsResponseParams Helios Common Search Indexed Objects Response Params. -// -// Specifies the common search indexed objects response params. -// -// swagger:model HeliosCommonSearchIndexedObjectsResponseParams -type HeliosCommonSearchIndexedObjectsResponseParams struct { - - // Specifies the object type. - // Enum: ["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"] - ObjectType *string `json:"objectType,omitempty"` - - // Specifies the total number of indexed objects that match the filter and search criteria. Use this value to determine how many additional requests are required to get the full result. - Count *int32 `json:"count,omitempty"` - - // A List of errors that occured on a subset of clusters. - ClusterErrors []*HeliosSearchIndexedObjectsClusterError `json:"clusterErrors"` -} - -// Validate validates this helios common search indexed objects response params -func (m *HeliosCommonSearchIndexedObjectsResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterErrors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosCommonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosCommonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum = append(heliosCommonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum, v) - } -} - -const ( - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeEmails captures enum value "Emails" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeEmails string = "Emails" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeFiles captures enum value "Files" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeFiles string = "Files" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeCassandraObjects captures enum value "CassandraObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeCassandraObjects string = "CassandraObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeCouchbaseObjects captures enum value "CouchbaseObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeCouchbaseObjects string = "CouchbaseObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHbaseObjects captures enum value "HbaseObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHbaseObjects string = "HbaseObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHiveObjects captures enum value "HiveObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHiveObjects string = "HiveObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeMongoObjects captures enum value "MongoObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeMongoObjects string = "MongoObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHDFSObjects captures enum value "HDFSObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeHDFSObjects string = "HDFSObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeExchangeObjects captures enum value "ExchangeObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeExchangeObjects string = "ExchangeObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypePublicFolders captures enum value "PublicFolders" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypePublicFolders string = "PublicFolders" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeGroupsObjects captures enum value "GroupsObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeGroupsObjects string = "GroupsObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeTeamsObjects captures enum value "TeamsObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeTeamsObjects string = "TeamsObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeSharepointObjects captures enum value "SharepointObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeSharepointObjects string = "SharepointObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeOneDriveObjects captures enum value "OneDriveObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeOneDriveObjects string = "OneDriveObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeUdaObjects captures enum value "UdaObjects" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeUdaObjects string = "UdaObjects" - - // HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeSfdcRecords captures enum value "SfdcRecords" - HeliosCommonSearchIndexedObjectsResponseParamsObjectTypeSfdcRecords string = "SfdcRecords" -) - -// prop value enum -func (m *HeliosCommonSearchIndexedObjectsResponseParams) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosCommonSearchIndexedObjectsResponseParamsTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsResponseParams) validateObjectType(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", *m.ObjectType); err != nil { - return err - } - - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsResponseParams) validateClusterErrors(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterErrors) { // not required - return nil - } - - for i := 0; i < len(m.ClusterErrors); i++ { - if swag.IsZero(m.ClusterErrors[i]) { // not required - continue - } - - if m.ClusterErrors[i] != nil { - if err := m.ClusterErrors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios common search indexed objects response params based on the context it is used -func (m *HeliosCommonSearchIndexedObjectsResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterErrors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCommonSearchIndexedObjectsResponseParams) contextValidateClusterErrors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterErrors); i++ { - - if m.ClusterErrors[i] != nil { - - if swag.IsZero(m.ClusterErrors[i]) { // not required - return nil - } - - if err := m.ClusterErrors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCommonSearchIndexedObjectsResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCommonSearchIndexedObjectsResponseParams) UnmarshalBinary(b []byte) error { - var res HeliosCommonSearchIndexedObjectsResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_common_target_configuration.go b/v2/models/helios_common_target_configuration.go deleted file mode 100644 index 10b32adf..00000000 --- a/v2/models/helios_common_target_configuration.go +++ /dev/null @@ -1,168 +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" -) - -// HeliosCommonTargetConfiguration Common Target Configuration. -// -// Specifies common parameters required while setting up additional protection target configuration. -// -// swagger:model HeliosCommonTargetConfiguration -type HeliosCommonTargetConfiguration struct { - - // Specifies the Id for a backup copy policy. This is generated when the policy is created - Schedule *HeliosTargetSchedule `json:"schedule,omitempty"` - - // Specifies the Retention period of backup in days, months or years to retain copied Snapshots on the target. - Retention *HeliosRetention `json:"retention,omitempty"` - - // Specifies if Snapshots are copied from the first completely successful Protection Group Run or the first partially successful Protection Group Run occurring at the start of the replication schedule.
If true, Snapshots are copied from the first Protection Group Run occurring at the start of the replication schedule that was completely successful i.e. Snapshots for all the Objects in the Protection Group were successfully captured.
If false, Snapshots are copied from the first Protection Group Run occurring at the start of the replication schedule, even if first Protection Group Run was not completely successful i.e. Snapshots were not captured for all Objects in the Protection Group. - CopyOnRunSuccess *bool `json:"copyOnRunSuccess,omitempty"` - - // Specifies the unique identifier for the target getting added. This field need to be passed only when helios policies are updated. - ConfigID *string `json:"configId,omitempty"` -} - -// Validate validates this helios common target configuration -func (m *HeliosCommonTargetConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosCommonTargetConfiguration) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosCommonTargetConfiguration) 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 -} - -// ContextValidate validate this helios common target configuration based on the context it is used -func (m *HeliosCommonTargetConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *HeliosCommonTargetConfiguration) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosCommonTargetConfiguration) 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 *HeliosCommonTargetConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCommonTargetConfiguration) UnmarshalBinary(b []byte) error { - var res HeliosCommonTargetConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_couchbase_objects.go b/v2/models/helios_couchbase_objects.go deleted file mode 100644 index ccb31ff6..00000000 --- a/v2/models/helios_couchbase_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosCouchbaseObjects Specifies the indexed Couchbase objects. -// -// swagger:model HeliosCouchbaseObjects -type HeliosCouchbaseObjects []*HeliosCouchbaseObjectsItems0 - -// Validate validates this helios couchbase objects -func (m HeliosCouchbaseObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios couchbase objects based on the context it is used -func (m HeliosCouchbaseObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosCouchbaseObjectsItems0 helios couchbase objects items0 -// -// swagger:model HeliosCouchbaseObjectsItems0 -type HeliosCouchbaseObjectsItems0 struct { - GlobalClusterIdentifier - - CouchbaseIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosCouchbaseObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 CouchbaseIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CouchbaseIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosCouchbaseObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CouchbaseIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios couchbase objects items0 -func (m *HeliosCouchbaseObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CouchbaseIndexedObject - if err := m.CouchbaseIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios couchbase objects items0 based on the context it is used -func (m *HeliosCouchbaseObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CouchbaseIndexedObject - if err := m.CouchbaseIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosCouchbaseObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosCouchbaseObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosCouchbaseObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_day_schedule.go b/v2/models/helios_day_schedule.go deleted file mode 100644 index a49cad7b..00000000 --- a/v2/models/helios_day_schedule.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" -) - -// HeliosDaySchedule Days Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of days. -// -// swagger:model HeliosDaySchedule -type HeliosDaySchedule struct { - HeliosFrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosDaySchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosFrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosFrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosDaySchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HeliosFrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios day schedule -func (m *HeliosDaySchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios day schedule based on the context it is used -func (m *HeliosDaySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosDaySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosDaySchedule) UnmarshalBinary(b []byte) error { - var res HeliosDaySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_emails.go b/v2/models/helios_emails.go deleted file mode 100644 index 9198588d..00000000 --- a/v2/models/helios_emails.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosEmails Specifies the indexed emails and email folders. -// -// swagger:model HeliosEmails -type HeliosEmails []*HeliosEmailsItems0 - -// Validate validates this helios emails -func (m HeliosEmails) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios emails based on the context it is used -func (m HeliosEmails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosEmailsItems0 helios emails items0 -// -// swagger:model HeliosEmailsItems0 -type HeliosEmailsItems0 struct { - GlobalClusterIdentifier - - Email -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosEmailsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 Email - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Email = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosEmailsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.Email) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios emails items0 -func (m *HeliosEmailsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with Email - if err := m.Email.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios emails items0 based on the context it is used -func (m *HeliosEmailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with Email - if err := m.Email.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosEmailsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosEmailsItems0) UnmarshalBinary(b []byte) error { - var res HeliosEmailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_exchange_objects.go b/v2/models/helios_exchange_objects.go deleted file mode 100644 index 04d0087b..00000000 --- a/v2/models/helios_exchange_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosExchangeObjects Specifies the indexed HDFS objects. -// -// swagger:model HeliosExchangeObjects -type HeliosExchangeObjects []*HeliosExchangeObjectsItems0 - -// Validate validates this helios exchange objects -func (m HeliosExchangeObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios exchange objects based on the context it is used -func (m HeliosExchangeObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosExchangeObjectsItems0 helios exchange objects items0 -// -// swagger:model HeliosExchangeObjectsItems0 -type HeliosExchangeObjectsItems0 struct { - GlobalClusterIdentifier - - ExchangeIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosExchangeObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 ExchangeIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ExchangeIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosExchangeObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ExchangeIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios exchange objects items0 -func (m *HeliosExchangeObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ExchangeIndexedObject - if err := m.ExchangeIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios exchange objects items0 based on the context it is used -func (m *HeliosExchangeObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ExchangeIndexedObject - if err := m.ExchangeIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosExchangeObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosExchangeObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosExchangeObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_extended_retention_policy.go b/v2/models/helios_extended_retention_policy.go deleted file mode 100644 index 61149eab..00000000 --- a/v2/models/helios_extended_retention_policy.go +++ /dev/null @@ -1,227 +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" -) - -// HeliosExtendedRetentionPolicy Extended Retention Policy. -// -// Specifies additional retention policies to apply to backup snapshots. -// -// swagger:model HeliosExtendedRetentionPolicy -type HeliosExtendedRetentionPolicy struct { - - // Specifies the schedule settings for extended retention. - Schedule *HeliosExtendedRetentionSchedule `json:"schedule,omitempty"` - - // Specifies the Retention period of a backup in days, months or years. - Retention *HeliosRetention `json:"retention,omitempty"` - - // Specifies the unique identifier for the extedned retention getting added. This field should only be set if policy is getting updated. - ConfigID *string `json:"configId,omitempty"` - - // The backup run type to which this extended retention applies to. If this is not set, the extended retention will be applicable to all non-log backup types. Currently, the only value that can be set here is Full. - // 'Regular' indicates a incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a Regular schedule captures all the blocks. - // 'Full' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. - // 'Log' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. - // 'System' indicates a system backup. System backups are used to do bare metal recovery of the system to a specific point in time. - // Enum: ["Regular","Full","Log","System"] - RunType *string `json:"runType,omitempty"` -} - -// Validate validates this helios extended retention policy -func (m *HeliosExtendedRetentionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosExtendedRetentionPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosExtendedRetentionPolicy) 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 heliosExtendedRetentionPolicyTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Regular","Full","Log","System"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosExtendedRetentionPolicyTypeRunTypePropEnum = append(heliosExtendedRetentionPolicyTypeRunTypePropEnum, v) - } -} - -const ( - - // HeliosExtendedRetentionPolicyRunTypeRegular captures enum value "Regular" - HeliosExtendedRetentionPolicyRunTypeRegular string = "Regular" - - // HeliosExtendedRetentionPolicyRunTypeFull captures enum value "Full" - HeliosExtendedRetentionPolicyRunTypeFull string = "Full" - - // HeliosExtendedRetentionPolicyRunTypeLog captures enum value "Log" - HeliosExtendedRetentionPolicyRunTypeLog string = "Log" - - // HeliosExtendedRetentionPolicyRunTypeSystem captures enum value "System" - HeliosExtendedRetentionPolicyRunTypeSystem string = "System" -) - -// prop value enum -func (m *HeliosExtendedRetentionPolicy) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosExtendedRetentionPolicyTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosExtendedRetentionPolicy) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios extended retention policy based on the context it is used -func (m *HeliosExtendedRetentionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *HeliosExtendedRetentionPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosExtendedRetentionPolicy) 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 *HeliosExtendedRetentionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosExtendedRetentionPolicy) UnmarshalBinary(b []byte) error { - var res HeliosExtendedRetentionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_extended_retention_schedule.go b/v2/models/helios_extended_retention_schedule.go deleted file mode 100644 index 38da9f9b..00000000 --- a/v2/models/helios_extended_retention_schedule.go +++ /dev/null @@ -1,140 +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" -) - -// HeliosExtendedRetentionSchedule Extended Retention Schedule -// -// Specifies a schedule frequency and schedule unit for Extended Retentions. -// -// swagger:model HeliosExtendedRetentionSchedule -type HeliosExtendedRetentionSchedule struct { - - // Specifies the unit interval for retention of Snapshots.
'Runs' means that the Snapshot copy retained after the number of Protection Group Runs equals the number specified in the frequency.
'Hours' means that the Snapshot copy retained hourly at the frequency set in the frequency, for example if scheduleFrequency is 2, the copy occurs every 2 hours.
'Days' means that the Snapshot copy gets retained daily at the frequency set in the frequency.
'Weeks' means that the Snapshot copy is retained weekly at the frequency set in the frequency.
'Months' means that the Snapshot copy is retained monthly at the frequency set in the Frequency.
'Years' means that the Snapshot copy is retained yearly at the frequency set in the Frequency. - // Enum: ["Runs","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit,omitempty"` - - // Specifies a factor to multiply the unit by, to determine the retention schedule. - // For example if set to 2 and the unit is hourly, then Snapshots from the first eligible Job Run for every 2 hour period is retained. - // Minimum: 1 - Frequency *int32 `json:"frequency,omitempty"` -} - -// Validate validates this helios extended retention schedule -func (m *HeliosExtendedRetentionSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosExtendedRetentionScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Runs","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosExtendedRetentionScheduleTypeUnitPropEnum = append(heliosExtendedRetentionScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosExtendedRetentionScheduleUnitRuns captures enum value "Runs" - HeliosExtendedRetentionScheduleUnitRuns string = "Runs" - - // HeliosExtendedRetentionScheduleUnitHours captures enum value "Hours" - HeliosExtendedRetentionScheduleUnitHours string = "Hours" - - // HeliosExtendedRetentionScheduleUnitDays captures enum value "Days" - HeliosExtendedRetentionScheduleUnitDays string = "Days" - - // HeliosExtendedRetentionScheduleUnitWeeks captures enum value "Weeks" - HeliosExtendedRetentionScheduleUnitWeeks string = "Weeks" - - // HeliosExtendedRetentionScheduleUnitMonths captures enum value "Months" - HeliosExtendedRetentionScheduleUnitMonths string = "Months" - - // HeliosExtendedRetentionScheduleUnitYears captures enum value "Years" - HeliosExtendedRetentionScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosExtendedRetentionSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosExtendedRetentionScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosExtendedRetentionSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosExtendedRetentionSchedule) validateFrequency(formats strfmt.Registry) error { - if swag.IsZero(m.Frequency) { // not required - return nil - } - - if err := validate.MinimumInt("frequency", "body", int64(*m.Frequency), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios extended retention schedule based on context it is used -func (m *HeliosExtendedRetentionSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosExtendedRetentionSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosExtendedRetentionSchedule) UnmarshalBinary(b []byte) error { - var res HeliosExtendedRetentionSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_files.go b/v2/models/helios_files.go deleted file mode 100644 index 3c0226f7..00000000 --- a/v2/models/helios_files.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosFiles Specifies the indexed files and file folders. -// -// swagger:model HeliosFiles -type HeliosFiles []*HeliosFilesItems0 - -// Validate validates this helios files -func (m HeliosFiles) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios files based on the context it is used -func (m HeliosFiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosFilesItems0 helios files items0 -// -// swagger:model HeliosFilesItems0 -type HeliosFilesItems0 struct { - GlobalClusterIdentifier - - File -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosFilesItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 File - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.File = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosFilesItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.File) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios files items0 -func (m *HeliosFilesItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with File - if err := m.File.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios files items0 based on the context it is used -func (m *HeliosFilesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with File - if err := m.File.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosFilesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosFilesItems0) UnmarshalBinary(b []byte) error { - var res HeliosFilesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_frequency_schedule.go b/v2/models/helios_frequency_schedule.go deleted file mode 100644 index 6ac4ab32..00000000 --- a/v2/models/helios_frequency_schedule.go +++ /dev/null @@ -1,76 +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" -) - -// HeliosFrequencySchedule Specifies settings that define a daily schedule for a Protection Policy. -// -// swagger:model HeliosFrequencySchedule -type HeliosFrequencySchedule struct { - - // Specifies a factor to multiply the unit by, to determine the backup schedule.
Example: If 'frequency' set to 2 and the unit is 'Hours', then Snapshots are backed up every 2 hours. If selected unit is 'Weeks' or 'Months' then frequency will only be applied if policy type is DMaas. - // Required: true - // Minimum: 1 - Frequency *int64 `json:"frequency"` -} - -// Validate validates this helios frequency schedule -func (m *HeliosFrequencySchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosFrequencySchedule) validateFrequency(formats strfmt.Registry) error { - - if err := validate.Required("frequency", "body", m.Frequency); err != nil { - return err - } - - if err := validate.MinimumInt("frequency", "body", *m.Frequency, 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios frequency schedule based on context it is used -func (m *HeliosFrequencySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosFrequencySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosFrequencySchedule) UnmarshalBinary(b []byte) error { - var res HeliosFrequencySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_full_backup_policy.go b/v2/models/helios_full_backup_policy.go deleted file mode 100644 index 9bf1d101..00000000 --- a/v2/models/helios_full_backup_policy.go +++ /dev/null @@ -1,111 +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" -) - -// HeliosFullBackupPolicy Full Backup Schedule and Retention. -// -// Specifies full backup settings for a Protection Group. -// -// swagger:model HeliosFullBackupPolicy -type HeliosFullBackupPolicy struct { - - // Specifies the schedule settings for full backup. - Schedule *HeliosFullSchedule `json:"schedule,omitempty"` -} - -// Validate validates this helios full backup policy -func (m *HeliosFullBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosFullBackupPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios full backup policy based on the context it is used -func (m *HeliosFullBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosFullBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosFullBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosFullBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosFullBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_full_schedule.go b/v2/models/helios_full_schedule.go deleted file mode 100644 index c158afa3..00000000 --- a/v2/models/helios_full_schedule.go +++ /dev/null @@ -1,274 +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" -) - -// HeliosFullSchedule Full Schedule -// -// Specifies settings that defines how frequent full backup will be performed for a Protection Group. -// -// swagger:model HeliosFullSchedule -type HeliosFullSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Days' specifies that Protection Group run starts periodically on every day. For full backup schedule, currently we only support frequecny of 1 which indicates that full backup will be performed daily.
'Weeks' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Months' specifies that new Protection Group runs start monthly on certain day of specific week. This schedule needs 'weekOfMonth' and 'dayOfWeek' fields to be set.
'ProtectOnce' specifies that groups using this policy option will run only once and after that group will permanently be disabled.
Example: To run the Protection Group on Second Sunday of Every Month, following schedule need to be set:
unit: 'Month'
dayOfWeek: 'Sunday'
weekOfMonth: 'Second' - // Enum: ["Days","Weeks","Months","Years","ProtectOnce"] - Unit *string `json:"unit,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *HeliosDaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *HeliosWeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *HeliosMonthSchedule `json:"monthSchedule,omitempty"` -} - -// Validate validates this helios full schedule -func (m *HeliosFullSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosFullScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years","ProtectOnce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosFullScheduleTypeUnitPropEnum = append(heliosFullScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosFullScheduleUnitDays captures enum value "Days" - HeliosFullScheduleUnitDays string = "Days" - - // HeliosFullScheduleUnitWeeks captures enum value "Weeks" - HeliosFullScheduleUnitWeeks string = "Weeks" - - // HeliosFullScheduleUnitMonths captures enum value "Months" - HeliosFullScheduleUnitMonths string = "Months" - - // HeliosFullScheduleUnitYears captures enum value "Years" - HeliosFullScheduleUnitYears string = "Years" - - // HeliosFullScheduleUnitProtectOnce captures enum value "ProtectOnce" - HeliosFullScheduleUnitProtectOnce string = "ProtectOnce" -) - -// prop value enum -func (m *HeliosFullSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosFullScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosFullSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosFullSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosFullSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosFullSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios full schedule based on the context it is used -func (m *HeliosFullSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosFullSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosFullSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosFullSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosFullSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosFullSchedule) UnmarshalBinary(b []byte) error { - var res HeliosFullSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_google_tier.go b/v2/models/helios_google_tier.go deleted file mode 100644 index f6653205..00000000 --- a/v2/models/helios_google_tier.go +++ /dev/null @@ -1,159 +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" -) - -// HeliosGoogleTier Specifies the settings for a Google tier. -// -// swagger:model HeliosGoogleTier -type HeliosGoogleTier struct { - HeliosCommonCloudTierSettings - - // Specifies the Google tier types. - // Required: true - // Enum: ["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosGoogleTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosGoogleTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios google tier -func (m *HeliosGoogleTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosGoogleTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosGoogleTierTypeTierTypePropEnum = append(heliosGoogleTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *HeliosGoogleTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosGoogleTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosGoogleTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios google tier based on the context it is used -func (m *HeliosGoogleTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosGoogleTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosGoogleTier) UnmarshalBinary(b []byte) error { - var res HeliosGoogleTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_google_tiers.go b/v2/models/helios_google_tiers.go deleted file mode 100644 index be0fb4c1..00000000 --- a/v2/models/helios_google_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosGoogleTiers Specifies Google tiers. -// -// swagger:model HeliosGoogleTiers -type HeliosGoogleTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*HeliosGoogleTier `json:"tiers"` -} - -// Validate validates this helios google tiers -func (m *HeliosGoogleTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosGoogleTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios google tiers based on the context it is used -func (m *HeliosGoogleTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosGoogleTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosGoogleTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosGoogleTiers) UnmarshalBinary(b []byte) error { - var res HeliosGoogleTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_hbase_objects.go b/v2/models/helios_hbase_objects.go deleted file mode 100644 index f55ed21e..00000000 --- a/v2/models/helios_hbase_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosHbaseObjects Specifies the indexed Hbase objects. -// -// swagger:model HeliosHbaseObjects -type HeliosHbaseObjects []*HeliosHbaseObjectsItems0 - -// Validate validates this helios hbase objects -func (m HeliosHbaseObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hbase objects based on the context it is used -func (m HeliosHbaseObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosHbaseObjectsItems0 helios hbase objects items0 -// -// swagger:model HeliosHbaseObjectsItems0 -type HeliosHbaseObjectsItems0 struct { - GlobalClusterIdentifier - - HbaseIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosHbaseObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 HbaseIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.HbaseIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosHbaseObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.HbaseIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios hbase objects items0 -func (m *HeliosHbaseObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HbaseIndexedObject - if err := m.HbaseIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hbase objects items0 based on the context it is used -func (m *HeliosHbaseObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HbaseIndexedObject - if err := m.HbaseIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosHbaseObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosHbaseObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosHbaseObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_hdfs_objects.go b/v2/models/helios_hdfs_objects.go deleted file mode 100644 index 685df8a3..00000000 --- a/v2/models/helios_hdfs_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosHdfsObjects Specifies the indexed HDFS objects. -// -// swagger:model HeliosHdfsObjects -type HeliosHdfsObjects []*HeliosHdfsObjectsItems0 - -// Validate validates this helios hdfs objects -func (m HeliosHdfsObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hdfs objects based on the context it is used -func (m HeliosHdfsObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosHdfsObjectsItems0 helios hdfs objects items0 -// -// swagger:model HeliosHdfsObjectsItems0 -type HeliosHdfsObjectsItems0 struct { - GlobalClusterIdentifier - - HDFSIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosHdfsObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 HDFSIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.HDFSIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosHdfsObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.HDFSIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios hdfs objects items0 -func (m *HeliosHdfsObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HDFSIndexedObject - if err := m.HDFSIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hdfs objects items0 based on the context it is used -func (m *HeliosHdfsObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HDFSIndexedObject - if err := m.HDFSIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosHdfsObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosHdfsObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosHdfsObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_hive_objects.go b/v2/models/helios_hive_objects.go deleted file mode 100644 index 152ae1e4..00000000 --- a/v2/models/helios_hive_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosHiveObjects Specifies the indexed Hive objects. -// -// swagger:model HeliosHiveObjects -type HeliosHiveObjects []*HeliosHiveObjectsItems0 - -// Validate validates this helios hive objects -func (m HeliosHiveObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hive objects based on the context it is used -func (m HeliosHiveObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosHiveObjectsItems0 helios hive objects items0 -// -// swagger:model HeliosHiveObjectsItems0 -type HeliosHiveObjectsItems0 struct { - GlobalClusterIdentifier - - HiveIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosHiveObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 HiveIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.HiveIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosHiveObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.HiveIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios hive objects items0 -func (m *HeliosHiveObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HiveIndexedObject - if err := m.HiveIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hive objects items0 based on the context it is used -func (m *HeliosHiveObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with HiveIndexedObject - if err := m.HiveIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosHiveObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosHiveObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosHiveObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_hour_schedule.go b/v2/models/helios_hour_schedule.go deleted file mode 100644 index 7ac60120..00000000 --- a/v2/models/helios_hour_schedule.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" -) - -// HeliosHourSchedule Hours Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of hours. Hourly schedule must be greater than 5 hours in case of DMaaS policy. -// -// swagger:model HeliosHourSchedule -type HeliosHourSchedule struct { - HeliosFrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosHourSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosFrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosFrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosHourSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HeliosFrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios hour schedule -func (m *HeliosHourSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios hour schedule based on the context it is used -func (m *HeliosHourSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosHourSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosHourSchedule) UnmarshalBinary(b []byte) error { - var res HeliosHourSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_incremental_backup_policy.go b/v2/models/helios_incremental_backup_policy.go deleted file mode 100644 index ec4b9a89..00000000 --- a/v2/models/helios_incremental_backup_policy.go +++ /dev/null @@ -1,111 +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" -) - -// HeliosIncrementalBackupPolicy Incremental Backup Schedule and Retention. -// -// Specifies incremental backup settings for a Protection Group. -// -// swagger:model HeliosIncrementalBackupPolicy -type HeliosIncrementalBackupPolicy struct { - - // Specifies the schedule settings for incremental backup. - Schedule *HeliosIncrementalSchedule `json:"schedule,omitempty"` -} - -// Validate validates this helios incremental backup policy -func (m *HeliosIncrementalBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosIncrementalBackupPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios incremental backup policy based on the context it is used -func (m *HeliosIncrementalBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosIncrementalBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosIncrementalBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosIncrementalBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosIncrementalBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_incremental_schedule.go b/v2/models/helios_incremental_schedule.go deleted file mode 100644 index f911c085..00000000 --- a/v2/models/helios_incremental_schedule.go +++ /dev/null @@ -1,381 +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" -) - -// HeliosIncrementalSchedule Run Schedule -// -// Specifies settings that defines how frequent backup will be performed for a Protection Group. -// -// swagger:model HeliosIncrementalSchedule -type HeliosIncrementalSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Minutes' specifies that Protection Group run starts periodically after certain number of minutes specified in 'frequency' field.
'Hours' specifies that Protection Group run starts periodically after certain number of hours specified in 'frequency' field.
'Days' specifies that Protection Group run starts periodically after certain number of days specified in 'frequency' field.
'Week' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Month' specifies that new Protection Group runs start monthly on certain day of specific week. This schedule needs 'weekOfMonth' and 'dayOfWeek' fields to be set.
Example: To run the Protection Group on Second Sunday of Every Month, following schedule need to be set:
unit: 'Month'
dayOfWeek: 'Sunday'
weekOfMonth: 'Second' - // Required: true - // Enum: ["Minutes","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of minutes. - MinuteSchedule *HeliosMinuteSchedule `json:"minuteSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of hours. - HourSchedule *HeliosHourSchedule `json:"hourSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *HeliosDaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *HeliosWeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *HeliosMonthSchedule `json:"monthSchedule,omitempty"` -} - -// Validate validates this helios incremental schedule -func (m *HeliosIncrementalSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinuteSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHourSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosIncrementalScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosIncrementalScheduleTypeUnitPropEnum = append(heliosIncrementalScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosIncrementalScheduleUnitMinutes captures enum value "Minutes" - HeliosIncrementalScheduleUnitMinutes string = "Minutes" - - // HeliosIncrementalScheduleUnitHours captures enum value "Hours" - HeliosIncrementalScheduleUnitHours string = "Hours" - - // HeliosIncrementalScheduleUnitDays captures enum value "Days" - HeliosIncrementalScheduleUnitDays string = "Days" - - // HeliosIncrementalScheduleUnitWeeks captures enum value "Weeks" - HeliosIncrementalScheduleUnitWeeks string = "Weeks" - - // HeliosIncrementalScheduleUnitMonths captures enum value "Months" - HeliosIncrementalScheduleUnitMonths string = "Months" - - // HeliosIncrementalScheduleUnitYears captures enum value "Years" - HeliosIncrementalScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosIncrementalSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosIncrementalScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosIncrementalSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosIncrementalSchedule) validateMinuteSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if m.MinuteSchedule != nil { - if err := m.MinuteSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) validateHourSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if m.HourSchedule != nil { - if err := m.HourSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios incremental schedule based on the context it is used -func (m *HeliosIncrementalSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMinuteSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHourSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosIncrementalSchedule) contextValidateMinuteSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MinuteSchedule != nil { - - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if err := m.MinuteSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) contextValidateHourSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.HourSchedule != nil { - - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if err := m.HourSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosIncrementalSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosIncrementalSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosIncrementalSchedule) UnmarshalBinary(b []byte) error { - var res HeliosIncrementalSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_log_backup_policy.go b/v2/models/helios_log_backup_policy.go deleted file mode 100644 index 62741cdc..00000000 --- a/v2/models/helios_log_backup_policy.go +++ /dev/null @@ -1,162 +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" -) - -// HeliosLogBackupPolicy Log Backup (Databases) Schedule and Retention. -// -// Specifies log backup settings for a Protection Group. -// -// swagger:model HeliosLogBackupPolicy -type HeliosLogBackupPolicy struct { - - // Specifies the schedule settings for log backup. - Schedule *HeliosLogSchedule `json:"schedule,omitempty"` - - // Specifies the Retention period of a log backup in days, months or years. - Retention *HeliosRetention `json:"retention,omitempty"` -} - -// Validate validates this helios log backup policy -func (m *HeliosLogBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosLogBackupPolicy) validateSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosLogBackupPolicy) 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 -} - -// ContextValidate validate this helios log backup policy based on the context it is used -func (m *HeliosLogBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *HeliosLogBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *HeliosLogBackupPolicy) 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 *HeliosLogBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosLogBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosLogBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_log_schedule.go b/v2/models/helios_log_schedule.go deleted file mode 100644 index b7f514c7..00000000 --- a/v2/models/helios_log_schedule.go +++ /dev/null @@ -1,214 +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" -) - -// HeliosLogSchedule Log Schedule -// -// Specifies settings that defines how frequent log backup will be performed for a Protection Group. -// -// swagger:model HeliosLogSchedule -type HeliosLogSchedule struct { - - // Specifies how often to start new Protection Group Runs of a Protection Group.
'Minutes' specifies that Protection Group run starts periodically after certain number of minutes specified in 'frequency' field.
'Hours' specifies that Protection Group run starts periodically after certain number of hours specified in 'frequency' field. - // Enum: ["Minutes","Hours"] - Unit *string `json:"unit,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of minutes. - MinuteSchedule *HeliosMinuteSchedule `json:"minuteSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of hours. - HourSchedule *HeliosHourSchedule `json:"hourSchedule,omitempty"` -} - -// Validate validates this helios log schedule -func (m *HeliosLogSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinuteSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHourSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosLogScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosLogScheduleTypeUnitPropEnum = append(heliosLogScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosLogScheduleUnitMinutes captures enum value "Minutes" - HeliosLogScheduleUnitMinutes string = "Minutes" - - // HeliosLogScheduleUnitHours captures enum value "Hours" - HeliosLogScheduleUnitHours string = "Hours" -) - -// prop value enum -func (m *HeliosLogSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosLogScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosLogSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosLogSchedule) validateMinuteSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if m.MinuteSchedule != nil { - if err := m.MinuteSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosLogSchedule) validateHourSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if m.HourSchedule != nil { - if err := m.HourSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios log schedule based on the context it is used -func (m *HeliosLogSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMinuteSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHourSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosLogSchedule) contextValidateMinuteSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MinuteSchedule != nil { - - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if err := m.MinuteSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *HeliosLogSchedule) contextValidateHourSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.HourSchedule != nil { - - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if err := m.HourSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosLogSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosLogSchedule) UnmarshalBinary(b []byte) error { - var res HeliosLogSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_minute_schedule.go b/v2/models/helios_minute_schedule.go deleted file mode 100644 index ddd31a26..00000000 --- a/v2/models/helios_minute_schedule.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" -) - -// HeliosMinuteSchedule Minutes Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of minutes. -// -// swagger:model HeliosMinuteSchedule -type HeliosMinuteSchedule struct { - HeliosFrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosMinuteSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosFrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosFrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosMinuteSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HeliosFrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios minute schedule -func (m *HeliosMinuteSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios minute schedule based on the context it is used -func (m *HeliosMinuteSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosFrequencySchedule - if err := m.HeliosFrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosMinuteSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosMinuteSchedule) UnmarshalBinary(b []byte) error { - var res HeliosMinuteSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_mongo_objects.go b/v2/models/helios_mongo_objects.go deleted file mode 100644 index e3844822..00000000 --- a/v2/models/helios_mongo_objects.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosMongoObjects Specifies the indexed Mongo objects. -// -// swagger:model HeliosMongoObjects -type HeliosMongoObjects []*HeliosMongoObjectsItems0 - -// Validate validates this helios mongo objects -func (m HeliosMongoObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios mongo objects based on the context it is used -func (m HeliosMongoObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosMongoObjectsItems0 helios mongo objects items0 -// -// swagger:model HeliosMongoObjectsItems0 -type HeliosMongoObjectsItems0 struct { - GlobalClusterIdentifier - - MongoIndexedObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosMongoObjectsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 MongoIndexedObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.MongoIndexedObject = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosMongoObjectsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.MongoIndexedObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios mongo objects items0 -func (m *HeliosMongoObjectsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with MongoIndexedObject - if err := m.MongoIndexedObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios mongo objects items0 based on the context it is used -func (m *HeliosMongoObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with MongoIndexedObject - if err := m.MongoIndexedObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosMongoObjectsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosMongoObjectsItems0) UnmarshalBinary(b []byte) error { - var res HeliosMongoObjectsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_month_schedule.go b/v2/models/helios_month_schedule.go deleted file mode 100644 index f94c4beb..00000000 --- a/v2/models/helios_month_schedule.go +++ /dev/null @@ -1,160 +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" -) - -// HeliosMonthSchedule Month Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to on specific week and specific days of that week. -// -// swagger:model HeliosMonthSchedule -type HeliosMonthSchedule struct { - HeliosWeekSchedule - - // Specifies the week of the month (such as 'Third') in a Monthly Schedule specified by unit field as 'Months'.
This field is used in combination with 'dayOfWeek' to define the day in the month to start the Protection Group Run.
Example: if 'weekOfMonth' is set to 'Third' and day is set to 'Monday', a backup is performed on the third Monday of every month. - // Enum: ["First","Second","Third","Fourth","Last"] - WeekOfMonth *string `json:"weekOfMonth,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosMonthSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosWeekSchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosWeekSchedule = aO0 - - // AO1 - var dataAO1 struct { - WeekOfMonth *string `json:"weekOfMonth,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.WeekOfMonth = dataAO1.WeekOfMonth - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosMonthSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosWeekSchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - WeekOfMonth *string `json:"weekOfMonth,omitempty"` - } - - dataAO1.WeekOfMonth = m.WeekOfMonth - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios month schedule -func (m *HeliosMonthSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosWeekSchedule - if err := m.HeliosWeekSchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekOfMonth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosMonthScheduleTypeWeekOfMonthPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["First","Second","Third","Fourth","Last"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosMonthScheduleTypeWeekOfMonthPropEnum = append(heliosMonthScheduleTypeWeekOfMonthPropEnum, v) - } -} - -// property enum -func (m *HeliosMonthSchedule) validateWeekOfMonthEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosMonthScheduleTypeWeekOfMonthPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosMonthSchedule) validateWeekOfMonth(formats strfmt.Registry) error { - - if swag.IsZero(m.WeekOfMonth) { // not required - return nil - } - - // value enum - if err := m.validateWeekOfMonthEnum("weekOfMonth", "body", *m.WeekOfMonth); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios month schedule based on the context it is used -func (m *HeliosMonthSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosWeekSchedule - if err := m.HeliosWeekSchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosMonthSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosMonthSchedule) UnmarshalBinary(b []byte) error { - var res HeliosMonthSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_object_u_ui_ds.go b/v2/models/helios_object_u_ui_ds.go deleted file mode 100644 index 4a4b04b5..00000000 --- a/v2/models/helios_object_u_ui_ds.go +++ /dev/null @@ -1,40 +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/validate" -) - -// HeliosObjectUUIDs Helios Object UUIDs -// -// Specifies a list of object UUIDs. Only matches found in these objects will be returned. -// -// swagger:model HeliosObjectUUIDs -type HeliosObjectUUIDs []string - -// Validate validates this helios object u UI ds -func (m HeliosObjectUUIDs) Validate(formats strfmt.Registry) error { - var res []error - - if err := validate.UniqueItems("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this helios object u UI ds based on context it is used -func (m HeliosObjectUUIDs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/helios_on_prem_config.go b/v2/models/helios_on_prem_config.go deleted file mode 100644 index 555d41c5..00000000 --- a/v2/models/helios_on_prem_config.go +++ /dev/null @@ -1,328 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosOnPremConfig Helios OnPrem VM Config Params -// -// Params for Helios OnPrem VM Configuration. -// -// swagger:model HeliosOnPremConfig -type HeliosOnPremConfig struct { - - // Name of the new Helios OnPrem VM. - // Required: true - Name *string `json:"name"` - - // Specifies the ID of the Cluster. - // Read Only: true - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the Nodes present in this Cluster. - Nodes []*HeliosOnPremVMNode `json:"nodes"` - - // Subnet to use for setting up the Kubernetes cluster's internal network on which Cohesity Helios will run. - // Required: true - KubernetesSubnetCidr *string `json:"kubernetesSubnetCidr"` - - // network config - NetworkConfig *ClusterCreateNetworkConfig `json:"networkConfig,omitempty"` - - // proxy server config - ProxyServerConfig *ClusterProxyServerConfig `json:"proxyServerConfig,omitempty"` - - // ssh config - SSHConfig *HeliosOnPremSSHConfig `json:"sshConfig,omitempty"` -} - -// Validate validates this helios on prem config -func (m *HeliosOnPremConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesSubnetCidr(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProxyServerConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOnPremConfig) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *HeliosOnPremConfig) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosOnPremConfig) validateKubernetesSubnetCidr(formats strfmt.Registry) error { - - if err := validate.Required("kubernetesSubnetCidr", "body", m.KubernetesSubnetCidr); err != nil { - return err - } - - return nil -} - -func (m *HeliosOnPremConfig) 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 -} - -func (m *HeliosOnPremConfig) validateProxyServerConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if m.ProxyServerConfig != nil { - if err := m.ProxyServerConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosOnPremConfig) validateSSHConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SSHConfig) { // not required - return nil - } - - if m.SSHConfig != nil { - if err := m.SSHConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios on prem config based on the context it is used -func (m *HeliosOnPremConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProxyServerConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOnPremConfig) contextValidateClusterID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *HeliosOnPremConfig) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosOnPremConfig) 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 -} - -func (m *HeliosOnPremConfig) contextValidateProxyServerConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ProxyServerConfig != nil { - - if swag.IsZero(m.ProxyServerConfig) { // not required - return nil - } - - if err := m.ProxyServerConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proxyServerConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("proxyServerConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosOnPremConfig) contextValidateSSHConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHConfig != nil { - - if swag.IsZero(m.SSHConfig) { // not required - return nil - } - - if err := m.SSHConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOnPremConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOnPremConfig) UnmarshalBinary(b []byte) error { - var res HeliosOnPremConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_on_prem_ssh_config.go b/v2/models/helios_on_prem_ssh_config.go deleted file mode 100644 index 2539de0d..00000000 --- a/v2/models/helios_on_prem_ssh_config.go +++ /dev/null @@ -1,90 +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" -) - -// HeliosOnPremSSHConfig HeliosOnPremSSHConfig -// -// Params for a HeliosOnPremVM SSH access. -// -// swagger:model HeliosOnPremSSHConfig -type HeliosOnPremSSHConfig struct { - - // Specifies if SSH password is set for support user. - // Read Only: true - SSHSupportUserPasswordSet *bool `json:"sshSupportUserPasswordSet,omitempty"` - - // Specifies if SSH sudo access is set for support user. - // Read Only: true - SSHSupportUserSudoEnabled *bool `json:"sshSupportUserSudoEnabled,omitempty"` -} - -// Validate validates this helios on prem SSH config -func (m *HeliosOnPremSSHConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this helios on prem SSH config based on the context it is used -func (m *HeliosOnPremSSHConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHSupportUserPasswordSet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHSupportUserSudoEnabled(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOnPremSSHConfig) contextValidateSSHSupportUserPasswordSet(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sshSupportUserPasswordSet", "body", m.SSHSupportUserPasswordSet); err != nil { - return err - } - - return nil -} - -func (m *HeliosOnPremSSHConfig) contextValidateSSHSupportUserSudoEnabled(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sshSupportUserSudoEnabled", "body", m.SSHSupportUserSudoEnabled); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOnPremSSHConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOnPremSSHConfig) UnmarshalBinary(b []byte) error { - var res HeliosOnPremSSHConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_on_prem_vm_node.go b/v2/models/helios_on_prem_vm_node.go deleted file mode 100644 index c74d1cea..00000000 --- a/v2/models/helios_on_prem_vm_node.go +++ /dev/null @@ -1,76 +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" -) - -// HeliosOnPremVMNode HeliosOnPremVM Node -// -// # Params for a HeliosOnPremVM Node -// -// swagger:model HeliosOnPremVMNode -type HeliosOnPremVMNode struct { - - // Specifies the IP address of the Node. - // Required: true - NodeIP *string `json:"nodeIp"` - - // Specifies the ID of the Node. - NodeID *int64 `json:"nodeId,omitempty"` -} - -// Validate validates this helios on prem VM node -func (m *HeliosOnPremVMNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOnPremVMNode) validateNodeIP(formats strfmt.Registry) error { - - if err := validate.Required("nodeIp", "body", m.NodeIP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios on prem VM node based on context it is used -func (m *HeliosOnPremVMNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOnPremVMNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOnPremVMNode) UnmarshalBinary(b []byte) error { - var res HeliosOnPremVMNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_onprem_deploy_config.go b/v2/models/helios_onprem_deploy_config.go deleted file mode 100644 index 3d8924e6..00000000 --- a/v2/models/helios_onprem_deploy_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" -) - -// HeliosOnpremDeployConfig Onprem Deploy Target Configuration. -// -// Specifies settings for copying Snapshots to Cloud. This also specifies the retention policy that should be applied to Snapshots after they have been copied to Cloud. -// -// swagger:model HeliosOnpremDeployConfig -type HeliosOnpremDeployConfig struct { - HeliosCommonTargetConfiguration -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosOnpremDeployConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonTargetConfiguration = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosOnpremDeployConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HeliosCommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios onprem deploy config -func (m *HeliosOnpremDeployConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios onprem deploy config based on the context it is used -func (m *HeliosOnpremDeployConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOnpremDeployConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOnpremDeployConfig) UnmarshalBinary(b []byte) error { - var res HeliosOnpremDeployConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_oracle_tier.go b/v2/models/helios_oracle_tier.go deleted file mode 100644 index bdf473f6..00000000 --- a/v2/models/helios_oracle_tier.go +++ /dev/null @@ -1,159 +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" -) - -// HeliosOracleTier Specifies the settings for a Oracle tier. -// -// swagger:model HeliosOracleTier -type HeliosOracleTier struct { - HeliosCommonCloudTierSettings - - // Specifies the Oracle tier types. - // Required: true - // Enum: ["kOracleTierStandard","kOracleTierArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosOracleTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosOracleTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios oracle tier -func (m *HeliosOracleTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosOracleTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosOracleTierTypeTierTypePropEnum = append(heliosOracleTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *HeliosOracleTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosOracleTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosOracleTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios oracle tier based on the context it is used -func (m *HeliosOracleTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonCloudTierSettings - if err := m.HeliosCommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOracleTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOracleTier) UnmarshalBinary(b []byte) error { - var res HeliosOracleTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_oracle_tiers.go b/v2/models/helios_oracle_tiers.go deleted file mode 100644 index 3752de86..00000000 --- a/v2/models/helios_oracle_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosOracleTiers Specifies Oracle tiers. -// -// swagger:model HeliosOracleTiers -type HeliosOracleTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*HeliosOracleTier `json:"tiers"` -} - -// Validate validates this helios oracle tiers -func (m *HeliosOracleTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOracleTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios oracle tiers based on the context it is used -func (m *HeliosOracleTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosOracleTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosOracleTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosOracleTiers) UnmarshalBinary(b []byte) error { - var res HeliosOracleTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_policies_response_with_pagination.go b/v2/models/helios_policies_response_with_pagination.go deleted file mode 100644 index a90d334d..00000000 --- a/v2/models/helios_policies_response_with_pagination.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosPoliciesResponseWithPagination Specifies the list of Policies. -// -// swagger:model HeliosPoliciesResponseWithPagination -type HeliosPoliciesResponseWithPagination struct { - - // Specifies a list of policies. - Policies []*HeliosPolicyResponse `json:"policies"` -} - -// Validate validates this helios policies response with pagination -func (m *HeliosPoliciesResponseWithPagination) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosPoliciesResponseWithPagination) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - for i := 0; i < len(m.Policies); i++ { - if swag.IsZero(m.Policies[i]) { // not required - continue - } - - if m.Policies[i] != nil { - if err := m.Policies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios policies response with pagination based on the context it is used -func (m *HeliosPoliciesResponseWithPagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosPoliciesResponseWithPagination) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Policies); i++ { - - if m.Policies[i] != nil { - - if swag.IsZero(m.Policies[i]) { // not required - return nil - } - - if err := m.Policies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosPoliciesResponseWithPagination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosPoliciesResponseWithPagination) UnmarshalBinary(b []byte) error { - var res HeliosPoliciesResponseWithPagination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_policy_request.go b/v2/models/helios_policy_request.go deleted file mode 100644 index af3dfbca..00000000 --- a/v2/models/helios_policy_request.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" -) - -// HeliosPolicyRequest Specifies the request parameters to cretae a policy. -// -// swagger:model HeliosPolicyRequest -type HeliosPolicyRequest struct { - HeliosProtectionPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosPolicyRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosProtectionPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosProtectionPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosPolicyRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HeliosProtectionPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios policy request -func (m *HeliosPolicyRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosProtectionPolicy - if err := m.HeliosProtectionPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios policy request based on the context it is used -func (m *HeliosPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosProtectionPolicy - if err := m.HeliosProtectionPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosPolicyRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosPolicyRequest) UnmarshalBinary(b []byte) error { - var res HeliosPolicyRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_policy_response.go b/v2/models/helios_policy_response.go deleted file mode 100644 index df0deb89..00000000 --- a/v2/models/helios_policy_response.go +++ /dev/null @@ -1,139 +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" -) - -// HeliosPolicyResponse Specifies the details about the Policy. -// -// swagger:model HeliosPolicyResponse -type HeliosPolicyResponse struct { - HeliosProtectionPolicy - - // Specifies a unique policy id assigned by the Helios. - ID *string `json:"id,omitempty"` - - // In case of global policy response, specifies the number of policies linked to this global policy on the cluster. - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - // Specifies the number of object protections using the protection policy. - NumObjectProtections *int64 `json:"numObjectProtections,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosPolicyResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosProtectionPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosProtectionPolicy = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - NumObjectProtections *int64 `json:"numObjectProtections,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.NumLinkedPolicies = dataAO1.NumLinkedPolicies - - m.NumObjectProtections = dataAO1.NumObjectProtections - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosPolicyResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosProtectionPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - NumObjectProtections *int64 `json:"numObjectProtections,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.NumLinkedPolicies = m.NumLinkedPolicies - - dataAO1.NumObjectProtections = m.NumObjectProtections - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios policy response -func (m *HeliosPolicyResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosProtectionPolicy - if err := m.HeliosProtectionPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios policy response based on the context it is used -func (m *HeliosPolicyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosProtectionPolicy - if err := m.HeliosProtectionPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosPolicyResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosPolicyResponse) UnmarshalBinary(b []byte) error { - var res HeliosPolicyResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_primary_backup_target.go b/v2/models/helios_primary_backup_target.go deleted file mode 100644 index 4a16fb5c..00000000 --- a/v2/models/helios_primary_backup_target.go +++ /dev/null @@ -1,161 +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" -) - -// HeliosPrimaryBackupTarget Specifies the primary backup target settings for regular backups. If the backup target field is not specified then backup will be taken locally on the Cohesity cluster. -// -// swagger:model HeliosPrimaryBackupTarget -type HeliosPrimaryBackupTarget struct { - - // Specifies the primary backup location where backups will be stored. If not specified, then default is assumed as local backup on Cohesity cluster. - // Enum: ["Local","Archival"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the archival backup target details. This is applicable only if targetType is set to 'archival'. - ArchivalTargetSettings *PrimaryArchivalTarget `json:"archivalTargetSettings,omitempty"` -} - -// Validate validates this helios primary backup target -func (m *HeliosPrimaryBackupTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargetSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosPrimaryBackupTargetTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosPrimaryBackupTargetTypeTargetTypePropEnum = append(heliosPrimaryBackupTargetTypeTargetTypePropEnum, v) - } -} - -const ( - - // HeliosPrimaryBackupTargetTargetTypeLocal captures enum value "Local" - HeliosPrimaryBackupTargetTargetTypeLocal string = "Local" - - // HeliosPrimaryBackupTargetTargetTypeArchival captures enum value "Archival" - HeliosPrimaryBackupTargetTargetTypeArchival string = "Archival" -) - -// prop value enum -func (m *HeliosPrimaryBackupTarget) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosPrimaryBackupTargetTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosPrimaryBackupTarget) validateTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *HeliosPrimaryBackupTarget) validateArchivalTargetSettings(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargetSettings) { // not required - return nil - } - - if m.ArchivalTargetSettings != nil { - if err := m.ArchivalTargetSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios primary backup target based on the context it is used -func (m *HeliosPrimaryBackupTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTargetSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosPrimaryBackupTarget) contextValidateArchivalTargetSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalTargetSettings != nil { - - if swag.IsZero(m.ArchivalTargetSettings) { // not required - return nil - } - - if err := m.ArchivalTargetSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosPrimaryBackupTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosPrimaryBackupTarget) UnmarshalBinary(b []byte) error { - var res HeliosPrimaryBackupTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_protection_policy.go b/v2/models/helios_protection_policy.go deleted file mode 100644 index e628f5a7..00000000 --- a/v2/models/helios_protection_policy.go +++ /dev/null @@ -1,505 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosProtectionPolicy Specifies common fields required to define Protection Policy on Helios. -// -// swagger:model HeliosProtectionPolicy -type HeliosProtectionPolicy struct { - - // Specifies the name of the Protection Policy. - // Required: true - Name *string `json:"name"` - - // Specifies the type of the Protection Policy to be created on Helios. - // Required: true - // Enum: ["GlobalPolicy","DMaaSPolicy","OnPremPolicy"] - Type *string `json:"type"` - - // Specifies the cluster to which this policy belongs. - // This required is only for type OnPremPolicy. The format is clusterId:clusterIncarnationId. - // Pattern: ^([0-9]+:[0-9]+)$ - ClusterIdentifier *string `json:"clusterIdentifier,omitempty"` - - // Specifies the tenants which have access to this object. - // Read Only: true - TenantIds []*string `json:"tenantIds"` - - // Specifies the backup schedule of a Protection Policy. - BackupPolicy *HeliosBackupPolicy `json:"backupPolicy,omitempty"` - - // Specifies the description of the Protection Policy. - Description *string `json:"description,omitempty"` - - // Blackout Window - // - // List of Blackout Windows. If specified, this field defines blackout periods when new Group Runs are not started. If a Group Run has been scheduled but not yet executed and the blackout period starts, the behavior depends on the policy field AbortInBlackoutPeriod. - BlackoutWindow []*HeliosBlackoutWindow `json:"blackoutWindow"` - - // Extended Retention - // - // Specifies additional retention policies that should be applied to the backup snapshots. A backup snapshot will be retained up to a time that is the maximum of all retention policies that are applicable to it. - ExtendedRetention []*HeliosExtendedRetentionPolicy `json:"extendedRetention"` - - // Specifies the remote, archival or cloudSpin targets where the snapshot is backed up. This only applies to OnPrem policy created from Helios. Does not apply to DMaaS policies. - RemoteTargetPolicy *HeliosTargetsConfiguration `json:"remoteTargetPolicy,omitempty"` - - // Specifies the retry options of a Protection Policy. - RetryOptions *HeliosRetryOptions `json:"retryOptions,omitempty"` - - // This field is now deprecated. Please use the DataLockConfig in the backup retention. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` -} - -// Validate validates this helios protection policy -func (m *HeliosProtectionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIdentifier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBlackoutWindow(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteTargetPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetryOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosProtectionPolicy) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var heliosProtectionPolicyTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GlobalPolicy","DMaaSPolicy","OnPremPolicy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosProtectionPolicyTypeTypePropEnum = append(heliosProtectionPolicyTypeTypePropEnum, v) - } -} - -const ( - - // HeliosProtectionPolicyTypeGlobalPolicy captures enum value "GlobalPolicy" - HeliosProtectionPolicyTypeGlobalPolicy string = "GlobalPolicy" - - // HeliosProtectionPolicyTypeDMaaSPolicy captures enum value "DMaaSPolicy" - HeliosProtectionPolicyTypeDMaaSPolicy string = "DMaaSPolicy" - - // HeliosProtectionPolicyTypeOnPremPolicy captures enum value "OnPremPolicy" - HeliosProtectionPolicyTypeOnPremPolicy string = "OnPremPolicy" -) - -// prop value enum -func (m *HeliosProtectionPolicy) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosProtectionPolicyTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosProtectionPolicy) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateClusterIdentifier(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIdentifier) { // not required - return nil - } - - if err := validate.Pattern("clusterIdentifier", "body", *m.ClusterIdentifier, `^([0-9]+:[0-9]+)$`); err != nil { - return err - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateBackupPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.BackupPolicy) { // not required - return nil - } - - if m.BackupPolicy != nil { - if err := m.BackupPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateBlackoutWindow(formats strfmt.Registry) error { - if swag.IsZero(m.BlackoutWindow) { // not required - return nil - } - - for i := 0; i < len(m.BlackoutWindow); i++ { - if swag.IsZero(m.BlackoutWindow[i]) { // not required - continue - } - - if m.BlackoutWindow[i] != nil { - if err := m.BlackoutWindow[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateExtendedRetention(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedRetention) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetention); i++ { - if swag.IsZero(m.ExtendedRetention[i]) { // not required - continue - } - - if m.ExtendedRetention[i] != nil { - if err := m.ExtendedRetention[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateRemoteTargetPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteTargetPolicy) { // not required - return nil - } - - if m.RemoteTargetPolicy != nil { - if err := m.RemoteTargetPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetPolicy") - } - return err - } - } - - return nil -} - -func (m *HeliosProtectionPolicy) validateRetryOptions(formats strfmt.Registry) error { - if swag.IsZero(m.RetryOptions) { // not required - return nil - } - - if m.RetryOptions != nil { - if err := m.RetryOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryOptions") - } - return err - } - } - - return nil -} - -var heliosProtectionPolicyTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosProtectionPolicyTypeDataLockPropEnum = append(heliosProtectionPolicyTypeDataLockPropEnum, v) - } -} - -const ( - - // HeliosProtectionPolicyDataLockCompliance captures enum value "Compliance" - HeliosProtectionPolicyDataLockCompliance string = "Compliance" - - // HeliosProtectionPolicyDataLockAdministrative captures enum value "Administrative" - HeliosProtectionPolicyDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *HeliosProtectionPolicy) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosProtectionPolicyTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosProtectionPolicy) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios protection policy based on the context it is used -func (m *HeliosProtectionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTenantIds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBlackoutWindow(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteTargetPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetryOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateTenantIds(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantIds", "body", []*string(m.TenantIds)); err != nil { - return err - } - - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateBackupPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupPolicy != nil { - - if swag.IsZero(m.BackupPolicy) { // not required - return nil - } - - if err := m.BackupPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateBlackoutWindow(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BlackoutWindow); i++ { - - if m.BlackoutWindow[i] != nil { - - if swag.IsZero(m.BlackoutWindow[i]) { // not required - return nil - } - - if err := m.BlackoutWindow[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateExtendedRetention(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetention); i++ { - - if m.ExtendedRetention[i] != nil { - - if swag.IsZero(m.ExtendedRetention[i]) { // not required - return nil - } - - if err := m.ExtendedRetention[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateRemoteTargetPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteTargetPolicy != nil { - - if swag.IsZero(m.RemoteTargetPolicy) { // not required - return nil - } - - if err := m.RemoteTargetPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetPolicy") - } - return err - } - } - - return nil -} - -func (m *HeliosProtectionPolicy) contextValidateRetryOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.RetryOptions != nil { - - if swag.IsZero(m.RetryOptions) { // not required - return nil - } - - if err := m.RetryOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosProtectionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosProtectionPolicy) UnmarshalBinary(b []byte) error { - var res HeliosProtectionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_protection_policy_identifier.go b/v2/models/helios_protection_policy_identifier.go deleted file mode 100644 index a70e8df8..00000000 --- a/v2/models/helios_protection_policy_identifier.go +++ /dev/null @@ -1,55 +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" -) - -// HeliosProtectionPolicyIdentifier Protection Policy Identifier. -// -// Specifies Protection Policy Identifier. -// -// swagger:model HeliosProtectionPolicyIdentifier -type HeliosProtectionPolicyIdentifier struct { - - // Specifies Protection Policy id. - ProtectionPolicyID *string `json:"protectionPolicyId,omitempty"` - - // Specifies Protection Policy name. - ProtectionPolicyName *string `json:"protectionPolicyName,omitempty"` -} - -// Validate validates this helios protection policy identifier -func (m *HeliosProtectionPolicyIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this helios protection policy identifier based on context it is used -func (m *HeliosProtectionPolicyIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosProtectionPolicyIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosProtectionPolicyIdentifier) UnmarshalBinary(b []byte) error { - var res HeliosProtectionPolicyIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_public_folder_items.go b/v2/models/helios_public_folder_items.go deleted file mode 100644 index 1105d6f5..00000000 --- a/v2/models/helios_public_folder_items.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosPublicFolderItems Specifies the indexed Public folder items. -// -// swagger:model HeliosPublicFolderItems -type HeliosPublicFolderItems []*HeliosPublicFolderItemsItems0 - -// Validate validates this helios public folder items -func (m HeliosPublicFolderItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios public folder items based on the context it is used -func (m HeliosPublicFolderItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// HeliosPublicFolderItemsItems0 helios public folder items items0 -// -// swagger:model HeliosPublicFolderItemsItems0 -type HeliosPublicFolderItemsItems0 struct { - GlobalClusterIdentifier - - PublicFolderItem -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosPublicFolderItemsItems0) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var aO1 PublicFolderItem - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.PublicFolderItem = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosPublicFolderItemsItems0) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.PublicFolderItem) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios public folder items items0 -func (m *HeliosPublicFolderItemsItems0) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with PublicFolderItem - if err := m.PublicFolderItem.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this helios public folder items items0 based on the context it is used -func (m *HeliosPublicFolderItemsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with PublicFolderItem - if err := m.PublicFolderItem.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosPublicFolderItemsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosPublicFolderItemsItems0) UnmarshalBinary(b []byte) error { - var res HeliosPublicFolderItemsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_reg_config.go b/v2/models/helios_reg_config.go deleted file mode 100644 index 2d95d73a..00000000 --- a/v2/models/helios_reg_config.go +++ /dev/null @@ -1,169 +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" -) - -// HeliosRegConfig Helios Registration Config. -// -// Specifies the Helios Registration Config. -// -// swagger:model HeliosRegConfig -type HeliosRegConfig struct { - - // Specifies the type of entity that is registered on Helios. - // Enum: ["Rigel","Cluster","Cohesion","IBMStorageProtect"] - EntityType *string `json:"entityType,omitempty"` - - // Specifies the Rigel Registration Config. - RigelRegConfig *RigelRegConfig `json:"rigelRegConfig,omitempty"` -} - -// Validate validates this helios reg config -func (m *HeliosRegConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelRegConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosRegConfigTypeEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rigel","Cluster","Cohesion","IBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosRegConfigTypeEntityTypePropEnum = append(heliosRegConfigTypeEntityTypePropEnum, v) - } -} - -const ( - - // HeliosRegConfigEntityTypeRigel captures enum value "Rigel" - HeliosRegConfigEntityTypeRigel string = "Rigel" - - // HeliosRegConfigEntityTypeCluster captures enum value "Cluster" - HeliosRegConfigEntityTypeCluster string = "Cluster" - - // HeliosRegConfigEntityTypeCohesion captures enum value "Cohesion" - HeliosRegConfigEntityTypeCohesion string = "Cohesion" - - // HeliosRegConfigEntityTypeIBMStorageProtect captures enum value "IBMStorageProtect" - HeliosRegConfigEntityTypeIBMStorageProtect string = "IBMStorageProtect" -) - -// prop value enum -func (m *HeliosRegConfig) validateEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosRegConfigTypeEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosRegConfig) validateEntityType(formats strfmt.Registry) error { - if swag.IsZero(m.EntityType) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypeEnum("entityType", "body", *m.EntityType); err != nil { - return err - } - - return nil -} - -func (m *HeliosRegConfig) validateRigelRegConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RigelRegConfig) { // not required - return nil - } - - if m.RigelRegConfig != nil { - if err := m.RigelRegConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelRegConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelRegConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios reg config based on the context it is used -func (m *HeliosRegConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelRegConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRegConfig) contextValidateRigelRegConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RigelRegConfig != nil { - - if swag.IsZero(m.RigelRegConfig) { // not required - return nil - } - - if err := m.RigelRegConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelRegConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelRegConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRegConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRegConfig) UnmarshalBinary(b []byte) error { - var res HeliosRegConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_reg_status.go b/v2/models/helios_reg_status.go deleted file mode 100644 index 2266c727..00000000 --- a/v2/models/helios_reg_status.go +++ /dev/null @@ -1,113 +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" -) - -// HeliosRegStatus Helios reg Status. -// -// helios reg status. -// -// swagger:model HeliosRegStatus -type HeliosRegStatus struct { - - // Helios reg Status. - // Enum: ["NotDone","InProgress","Success","Failed"] - Type string `json:"type,omitempty"` -} - -// Validate validates this helios reg status -func (m *HeliosRegStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosRegStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotDone","InProgress","Success","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosRegStatusTypeTypePropEnum = append(heliosRegStatusTypeTypePropEnum, v) - } -} - -const ( - - // HeliosRegStatusTypeNotDone captures enum value "NotDone" - HeliosRegStatusTypeNotDone string = "NotDone" - - // HeliosRegStatusTypeInProgress captures enum value "InProgress" - HeliosRegStatusTypeInProgress string = "InProgress" - - // HeliosRegStatusTypeSuccess captures enum value "Success" - HeliosRegStatusTypeSuccess string = "Success" - - // HeliosRegStatusTypeFailed captures enum value "Failed" - HeliosRegStatusTypeFailed string = "Failed" -) - -// prop value enum -func (m *HeliosRegStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosRegStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosRegStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios reg status based on context it is used -func (m *HeliosRegStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRegStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRegStatus) UnmarshalBinary(b []byte) error { - var res HeliosRegStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_regular_backup_policy.go b/v2/models/helios_regular_backup_policy.go deleted file mode 100644 index 0eea2216..00000000 --- a/v2/models/helios_regular_backup_policy.go +++ /dev/null @@ -1,264 +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" -) - -// HeliosRegularBackupPolicy Incremental, Full and Retention Policy. -// -// Specifies the Incremental and Full policy settings and also the common Retention policy settings." -// -// swagger:model HeliosRegularBackupPolicy -type HeliosRegularBackupPolicy struct { - - // Specifies the Incremental backup schedule and retention of a Protection Policy. - Incremental *HeliosIncrementalBackupPolicy `json:"incremental,omitempty"` - - // Specifies the Full backup schedule of a Protection Policy. - Full *HeliosFullBackupPolicy `json:"full,omitempty"` - - // Specifies the Retention period for incremental and full backup in days, months or years. - Retention *HeliosRetention `json:"retention,omitempty"` - - // Specifies the primary backup target settings for regular backups. Specifying this field shows that instead of local backups on Cohesity cluster, primary backup location is different such as Cloud Archives like s3 or azure. - PrimaryBackupTarget *HeliosPrimaryBackupTarget `json:"primaryBackupTarget,omitempty"` -} - -// Validate validates this helios regular backup policy -func (m *HeliosRegularBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIncremental(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFull(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryBackupTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRegularBackupPolicy) validateIncremental(formats strfmt.Registry) error { - if swag.IsZero(m.Incremental) { // not required - return nil - } - - if m.Incremental != nil { - if err := m.Incremental.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incremental") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incremental") - } - return err - } - } - - return nil -} - -func (m *HeliosRegularBackupPolicy) validateFull(formats strfmt.Registry) error { - if swag.IsZero(m.Full) { // not required - return nil - } - - if m.Full != nil { - if err := m.Full.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("full") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("full") - } - return err - } - } - - return nil -} - -func (m *HeliosRegularBackupPolicy) 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 -} - -func (m *HeliosRegularBackupPolicy) validatePrimaryBackupTarget(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryBackupTarget) { // not required - return nil - } - - if m.PrimaryBackupTarget != nil { - if err := m.PrimaryBackupTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios regular backup policy based on the context it is used -func (m *HeliosRegularBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIncremental(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFull(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryBackupTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRegularBackupPolicy) contextValidateIncremental(ctx context.Context, formats strfmt.Registry) error { - - if m.Incremental != nil { - - if swag.IsZero(m.Incremental) { // not required - return nil - } - - if err := m.Incremental.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incremental") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incremental") - } - return err - } - } - - return nil -} - -func (m *HeliosRegularBackupPolicy) contextValidateFull(ctx context.Context, formats strfmt.Registry) error { - - if m.Full != nil { - - if swag.IsZero(m.Full) { // not required - return nil - } - - if err := m.Full.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("full") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("full") - } - return err - } - } - - return nil -} - -func (m *HeliosRegularBackupPolicy) 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 -} - -func (m *HeliosRegularBackupPolicy) contextValidatePrimaryBackupTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryBackupTarget != nil { - - if swag.IsZero(m.PrimaryBackupTarget) { // not required - return nil - } - - if err := m.PrimaryBackupTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRegularBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRegularBackupPolicy) UnmarshalBinary(b []byte) error { - var res HeliosRegularBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_remote_target_config.go b/v2/models/helios_remote_target_config.go deleted file mode 100644 index 63d292e3..00000000 --- a/v2/models/helios_remote_target_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" - "github.com/go-openapi/validate" -) - -// HeliosRemoteTargetConfig Cluster Target Configuration -// -// # Specifies the configuration for adding remote cluster as repilcation target -// -// swagger:model HeliosRemoteTargetConfig -type HeliosRemoteTargetConfig struct { - - // Specifies the cluster id of the target replication cluster. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the cluster name of the target replication cluster. - // Read Only: true - ClusterName *string `json:"clusterName,omitempty"` -} - -// Validate validates this helios remote target config -func (m *HeliosRemoteTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRemoteTargetConfig) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios remote target config based on the context it is used -func (m *HeliosRemoteTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRemoteTargetConfig) contextValidateClusterName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRemoteTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRemoteTargetConfig) UnmarshalBinary(b []byte) error { - var res HeliosRemoteTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_replication_config.go b/v2/models/helios_replication_config.go deleted file mode 100644 index 15103ee0..00000000 --- a/v2/models/helios_replication_config.go +++ /dev/null @@ -1,340 +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" -) - -// HeliosReplicationConfig Replication Target Configuration -// -// Specifies settings for copying Snapshots to Remote Clusters. This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model HeliosReplicationConfig -type HeliosReplicationConfig struct { - HeliosCommonTargetConfiguration - - // Specifies the type of target to which replication need to be performed. - // Enum: ["RemoteCluster","AWS","Azure"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the required information to add remote cluster as replication target. - RemoteTargetConfig *HeliosRemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - // Specifies the required information to add AWS as replication target. - AwsTargetConfig *HeliosAWSTargetConfig `json:"awsTargetConfig,omitempty"` - - // Specifies the required information to add Azure as replication target. - AzureTargetConfig *HeliosAzureTargetConfig `json:"azureTargetConfig,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosReplicationConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetType *string `json:"targetType,omitempty"` - - RemoteTargetConfig *HeliosRemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - AwsTargetConfig *HeliosAWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *HeliosAzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetType = dataAO1.TargetType - - m.RemoteTargetConfig = dataAO1.RemoteTargetConfig - - m.AwsTargetConfig = dataAO1.AwsTargetConfig - - m.AzureTargetConfig = dataAO1.AzureTargetConfig - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosReplicationConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetType *string `json:"targetType,omitempty"` - - RemoteTargetConfig *HeliosRemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - AwsTargetConfig *HeliosAWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *HeliosAzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - - dataAO1.TargetType = m.TargetType - - dataAO1.RemoteTargetConfig = m.RemoteTargetConfig - - dataAO1.AwsTargetConfig = m.AwsTargetConfig - - dataAO1.AzureTargetConfig = m.AzureTargetConfig - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios replication config -func (m *HeliosReplicationConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosReplicationConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RemoteCluster","AWS","Azure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosReplicationConfigTypeTargetTypePropEnum = append(heliosReplicationConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *HeliosReplicationConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosReplicationConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosReplicationConfig) validateTargetType(formats strfmt.Registry) error { - - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *HeliosReplicationConfig) validateRemoteTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.RemoteTargetConfig) { // not required - return nil - } - - if m.RemoteTargetConfig != nil { - if err := m.RemoteTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosReplicationConfig) validateAwsTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if m.AwsTargetConfig != nil { - if err := m.AwsTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosReplicationConfig) validateAzureTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if m.AzureTargetConfig != nil { - if err := m.AzureTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios replication config based on the context it is used -func (m *HeliosReplicationConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosReplicationConfig) contextValidateRemoteTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteTargetConfig != nil { - - if swag.IsZero(m.RemoteTargetConfig) { // not required - return nil - } - - if err := m.RemoteTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosReplicationConfig) contextValidateAwsTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetConfig != nil { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if err := m.AwsTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HeliosReplicationConfig) contextValidateAzureTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetConfig != nil { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if err := m.AzureTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosReplicationConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosReplicationConfig) UnmarshalBinary(b []byte) error { - var res HeliosReplicationConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_retention.go b/v2/models/helios_retention.go deleted file mode 100644 index a45f8a3d..00000000 --- a/v2/models/helios_retention.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosRetention Specifies the retention of a backup. -// -// swagger:model HeliosRetention -type HeliosRetention struct { - - // Specificies the Retention Unit of a backup measured in days, months or years.
If unit is 'Months', then number specified in duration is multiplied to 30.
Example: If duration is 4 and unit is 'Months' then number of retention days will be 30 * 4 = 120 days.
If unit is 'Years', then number specified in duration is multiplied to 365.
If duration is 2 and unit is 'Months' then number of retention days will be 365 * 2 = 730 days. - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit,omitempty"` - - // Specifies the duration for a backup retention.
Example. If duration is 7 and unit is Months, the retention of a backup is 7 * 30 = 210 days. - // Minimum: 1 - Duration *int64 `json:"duration,omitempty"` - - // Specifies the list of tiers where backup will be moved. This will be populated only if poilcy type is DMaaS. - Tiers []*HeliosTier `json:"tiers"` - - // Specifies WORM retention type for the 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. - DataLockConfig *DataLockConfig `json:"dataLockConfig,omitempty"` -} - -// Validate validates this helios retention -func (m *HeliosRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosRetentionTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosRetentionTypeUnitPropEnum = append(heliosRetentionTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosRetentionUnitDays captures enum value "Days" - HeliosRetentionUnitDays string = "Days" - - // HeliosRetentionUnitWeeks captures enum value "Weeks" - HeliosRetentionUnitWeeks string = "Weeks" - - // HeliosRetentionUnitMonths captures enum value "Months" - HeliosRetentionUnitMonths string = "Months" - - // HeliosRetentionUnitYears captures enum value "Years" - HeliosRetentionUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosRetention) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosRetentionTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosRetention) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosRetention) validateDuration(formats strfmt.Registry) error { - if swag.IsZero(m.Duration) { // not required - return nil - } - - if err := validate.MinimumInt("duration", "body", *m.Duration, 1, false); err != nil { - return err - } - - return nil -} - -func (m *HeliosRetention) validateTiers(formats strfmt.Registry) error { - if swag.IsZero(m.Tiers) { // not required - return nil - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosRetention) validateDataLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if m.DataLockConfig != nil { - if err := m.DataLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios retention based on the context it is used -func (m *HeliosRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRetention) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosRetention) contextValidateDataLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConfig != nil { - - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if err := m.DataLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRetention) UnmarshalBinary(b []byte) error { - var res HeliosRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_retry_options.go b/v2/models/helios_retry_options.go deleted file mode 100644 index 596da41e..00000000 --- a/v2/models/helios_retry_options.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" - "github.com/go-openapi/validate" -) - -// HeliosRetryOptions Retry Options of a Protection Policy when a Protection Group run fails. -// -// swagger:model HeliosRetryOptions -type HeliosRetryOptions struct { - - // Specifies the number of times to retry capturing Snapshots before - // the Protection Group Run fails. - // Minimum: 0 - Retries *int32 `json:"retries,omitempty"` - - // Specifies the number of minutes before retrying a failed Protection Group. - // Minimum: 1 - RetryIntervalMins *int32 `json:"retryIntervalMins,omitempty"` -} - -// Validate validates this helios retry options -func (m *HeliosRetryOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetries(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetryIntervalMins(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRetryOptions) validateRetries(formats strfmt.Registry) error { - if swag.IsZero(m.Retries) { // not required - return nil - } - - if err := validate.MinimumInt("retries", "body", int64(*m.Retries), 0, false); err != nil { - return err - } - - return nil -} - -func (m *HeliosRetryOptions) validateRetryIntervalMins(formats strfmt.Registry) error { - if swag.IsZero(m.RetryIntervalMins) { // not required - return nil - } - - if err := validate.MinimumInt("retryIntervalMins", "body", int64(*m.RetryIntervalMins), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios retry options based on context it is used -func (m *HeliosRetryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRetryOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRetryOptions) UnmarshalBinary(b []byte) error { - var res HeliosRetryOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_rpaas_config.go b/v2/models/helios_rpaas_config.go deleted file mode 100644 index 92da35d8..00000000 --- a/v2/models/helios_rpaas_config.go +++ /dev/null @@ -1,210 +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" -) - -// HeliosRpaasConfig RPaaS Target Configuration -// -// Specifies settings for copying Snapshots to RPaaS Targets. -// -// swagger:model HeliosRpaasConfig -type HeliosRpaasConfig struct { - HeliosCommonTargetConfiguration - - // Specifies the RPaaS target to copy the Snapshots. - // Required: true - TargetID *int64 `json:"targetId"` - - // Specifies the RPaaS target name where Snapshots are copied. - // Read Only: true - TargetName *string `json:"targetName,omitempty"` - - // Specifies the RPaaS target type where Snapshots are copied. - // Enum: ["Tape","Cloud","Nas"] - TargetType *string `json:"targetType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosRpaasConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetID = dataAO1.TargetID - - m.TargetName = dataAO1.TargetName - - m.TargetType = dataAO1.TargetType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosRpaasConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - } - - dataAO1.TargetID = m.TargetID - - dataAO1.TargetName = m.TargetName - - dataAO1.TargetType = m.TargetType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios rpaas config -func (m *HeliosRpaasConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRpaasConfig) validateTargetID(formats strfmt.Registry) error { - - if err := validate.Required("targetId", "body", m.TargetID); err != nil { - return err - } - - return nil -} - -var heliosRpaasConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosRpaasConfigTypeTargetTypePropEnum = append(heliosRpaasConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *HeliosRpaasConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosRpaasConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosRpaasConfig) validateTargetType(formats strfmt.Registry) error { - - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this helios rpaas config based on the context it is used -func (m *HeliosRpaasConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonTargetConfiguration - if err := m.HeliosCommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosRpaasConfig) contextValidateTargetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetName", "body", m.TargetName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosRpaasConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosRpaasConfig) UnmarshalBinary(b []byte) error { - var res HeliosRpaasConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_search_indexed_objects_cluster_error.go b/v2/models/helios_search_indexed_objects_cluster_error.go deleted file mode 100644 index dfabaca7..00000000 --- a/v2/models/helios_search_indexed_objects_cluster_error.go +++ /dev/null @@ -1,55 +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" -) - -// HeliosSearchIndexedObjectsClusterError Helios SearchIndexedObjects Websocket ClusterErrors. -// -// The error from an individual cluster while calling MCM Search Indexed Objects. -// -// swagger:model HeliosSearchIndexedObjectsClusterError -type HeliosSearchIndexedObjectsClusterError struct { - - // clusterIdentifier for the error. - ClusterIdentifier *string `json:"clusterIdentifier,omitempty"` - - // The error message. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this helios search indexed objects cluster error -func (m *HeliosSearchIndexedObjectsClusterError) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this helios search indexed objects cluster error based on context it is used -func (m *HeliosSearchIndexedObjectsClusterError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsClusterError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsClusterError) UnmarshalBinary(b []byte) error { - var res HeliosSearchIndexedObjectsClusterError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_search_indexed_objects_request.go b/v2/models/helios_search_indexed_objects_request.go deleted file mode 100644 index 228804dc..00000000 --- a/v2/models/helios_search_indexed_objects_request.go +++ /dev/null @@ -1,949 +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" -) - -// HeliosSearchIndexedObjectsRequest Helios Search indexed objects request params. -// -// Specifies the request parameters to search for global indexed -// objects. -// -// swagger:model HeliosSearchIndexedObjectsRequest -type HeliosSearchIndexedObjectsRequest struct { - HeliosCommonSearchIndexedObjectsRequestParams - - // email params - EmailParams *EmailHeliosSearchParams `json:"emailParams,omitempty"` - - // file params - FileParams *SearchFileRequestParamsBase `json:"fileParams,omitempty"` - - // cassandra params - CassandraParams *CassandraSearchParams `json:"cassandraParams,omitempty"` - - // couchbase params - CouchbaseParams *CouchbaseSearchParams `json:"couchbaseParams,omitempty"` - - // hbase params - HbaseParams *HbaseSearchParams `json:"hbaseParams,omitempty"` - - // hive params - HiveParams *HiveSearchParams `json:"hiveParams,omitempty"` - - // mongodb params - MongodbParams *MongodbSearchParams `json:"mongodbParams,omitempty"` - - // hdfs params - HdfsParams *HdfsSearchParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific for searching Exchange mailboxes. - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific for searching Public folder items. - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - // Specifies the parameters which are specific for searching Microsoft365 Group items. - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - // Specifies the parameters which are specific for searching Microsoft365 Teams items. - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - // Specifies the parameters which are specific for searching UDA objects. - UdaParams *UdaSearchParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific for searching records related to a salesforce Object. - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosSearchIndexedObjectsRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonSearchIndexedObjectsRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonSearchIndexedObjectsRequestParams = aO0 - - // AO1 - var dataAO1 struct { - EmailParams *EmailHeliosSearchParams `json:"emailParams,omitempty"` - - FileParams *SearchFileRequestParamsBase `json:"fileParams,omitempty"` - - CassandraParams *CassandraSearchParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseSearchParams `json:"couchbaseParams,omitempty"` - - HbaseParams *HbaseSearchParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSearchParams `json:"hiveParams,omitempty"` - - MongodbParams *MongodbSearchParams `json:"mongodbParams,omitempty"` - - HdfsParams *HdfsSearchParams `json:"hdfsParams,omitempty"` - - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - UdaParams *UdaSearchParams `json:"udaParams,omitempty"` - - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.EmailParams = dataAO1.EmailParams - - m.FileParams = dataAO1.FileParams - - m.CassandraParams = dataAO1.CassandraParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HiveParams = dataAO1.HiveParams - - m.MongodbParams = dataAO1.MongodbParams - - m.HdfsParams = dataAO1.HdfsParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.PublicFolderParams = dataAO1.PublicFolderParams - - m.MsGroupsParams = dataAO1.MsGroupsParams - - m.MsTeamsParams = dataAO1.MsTeamsParams - - m.UdaParams = dataAO1.UdaParams - - m.SfdcParams = dataAO1.SfdcParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosSearchIndexedObjectsRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonSearchIndexedObjectsRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - EmailParams *EmailHeliosSearchParams `json:"emailParams,omitempty"` - - FileParams *SearchFileRequestParamsBase `json:"fileParams,omitempty"` - - CassandraParams *CassandraSearchParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseSearchParams `json:"couchbaseParams,omitempty"` - - HbaseParams *HbaseSearchParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSearchParams `json:"hiveParams,omitempty"` - - MongodbParams *MongodbSearchParams `json:"mongodbParams,omitempty"` - - HdfsParams *HdfsSearchParams `json:"hdfsParams,omitempty"` - - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - UdaParams *UdaSearchParams `json:"udaParams,omitempty"` - - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` - } - - dataAO1.EmailParams = m.EmailParams - - dataAO1.FileParams = m.FileParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.PublicFolderParams = m.PublicFolderParams - - dataAO1.MsGroupsParams = m.MsGroupsParams - - dataAO1.MsTeamsParams = m.MsTeamsParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.SfdcParams = m.SfdcParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios search indexed objects request -func (m *HeliosSearchIndexedObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonSearchIndexedObjectsRequestParams - if err := m.HeliosCommonSearchIndexedObjectsRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmailParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsGroupsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsTeamsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateEmailParams(formats strfmt.Registry) error { - - if swag.IsZero(m.EmailParams) { // not required - return nil - } - - if m.EmailParams != nil { - if err := m.EmailParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateFileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FileParams) { // not required - return nil - } - - if m.FileParams != nil { - if err := m.FileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validatePublicFolderParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PublicFolderParams) { // not required - return nil - } - - if m.PublicFolderParams != nil { - if err := m.PublicFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateMsGroupsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MsGroupsParams) { // not required - return nil - } - - if m.MsGroupsParams != nil { - if err := m.MsGroupsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateMsTeamsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MsTeamsParams) { // not required - return nil - } - - if m.MsTeamsParams != nil { - if err := m.MsTeamsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios search indexed objects request based on the context it is used -func (m *HeliosSearchIndexedObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonSearchIndexedObjectsRequestParams - if err := m.HeliosCommonSearchIndexedObjectsRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmailParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsGroupsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsTeamsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateEmailParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EmailParams != nil { - - if swag.IsZero(m.EmailParams) { // not required - return nil - } - - if err := m.EmailParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateFileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileParams != nil { - - if swag.IsZero(m.FileParams) { // not required - return nil - } - - if err := m.FileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidatePublicFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFolderParams != nil { - - if swag.IsZero(m.PublicFolderParams) { // not required - return nil - } - - if err := m.PublicFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateMsGroupsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MsGroupsParams != nil { - - if swag.IsZero(m.MsGroupsParams) { // not required - return nil - } - - if err := m.MsGroupsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateMsTeamsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MsTeamsParams != nil { - - if swag.IsZero(m.MsTeamsParams) { // not required - return nil - } - - if err := m.MsTeamsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsRequest) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsRequest) UnmarshalBinary(b []byte) error { - var res HeliosSearchIndexedObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_search_indexed_objects_response_body.go b/v2/models/helios_search_indexed_objects_response_body.go deleted file mode 100644 index feca694a..00000000 --- a/v2/models/helios_search_indexed_objects_response_body.go +++ /dev/null @@ -1,678 +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" -) - -// HeliosSearchIndexedObjectsResponseBody Helios Search Indexed objects response body. -// -// Specifies the search indexed objects response body. -// -// swagger:model HeliosSearchIndexedObjectsResponseBody -type HeliosSearchIndexedObjectsResponseBody struct { - HeliosCommonSearchIndexedObjectsResponseParams - - // emails - Emails HeliosEmails `json:"emails,omitempty"` - - // files - Files HeliosFiles `json:"files,omitempty"` - - // cassandra objects - CassandraObjects HeliosCassandraObjects `json:"cassandraObjects,omitempty"` - - // couchbase objects - CouchbaseObjects HeliosCouchbaseObjects `json:"couchbaseObjects,omitempty"` - - // hbase objects - HbaseObjects HeliosHbaseObjects `json:"hbaseObjects,omitempty"` - - // hive objects - HiveObjects HeliosHiveObjects `json:"hiveObjects,omitempty"` - - // mongo objects - MongoObjects HeliosMongoObjects `json:"mongoObjects,omitempty"` - - // hdfs objects - HdfsObjects HeliosHdfsObjects `json:"hdfsObjects,omitempty"` - - // exchange objects - ExchangeObjects HeliosExchangeObjects `json:"exchangeObjects,omitempty"` - - // public folder items - PublicFolderItems HeliosPublicFolderItems `json:"publicFolderItems,omitempty"` - - // sfdc records - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HeliosSearchIndexedObjectsResponseBody) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HeliosCommonSearchIndexedObjectsResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HeliosCommonSearchIndexedObjectsResponseParams = aO0 - - // AO1 - var dataAO1 struct { - Emails HeliosEmails `json:"emails,omitempty"` - - Files HeliosFiles `json:"files,omitempty"` - - CassandraObjects HeliosCassandraObjects `json:"cassandraObjects,omitempty"` - - CouchbaseObjects HeliosCouchbaseObjects `json:"couchbaseObjects,omitempty"` - - HbaseObjects HeliosHbaseObjects `json:"hbaseObjects,omitempty"` - - HiveObjects HeliosHiveObjects `json:"hiveObjects,omitempty"` - - MongoObjects HeliosMongoObjects `json:"mongoObjects,omitempty"` - - HdfsObjects HeliosHdfsObjects `json:"hdfsObjects,omitempty"` - - ExchangeObjects HeliosExchangeObjects `json:"exchangeObjects,omitempty"` - - PublicFolderItems HeliosPublicFolderItems `json:"publicFolderItems,omitempty"` - - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Emails = dataAO1.Emails - - m.Files = dataAO1.Files - - m.CassandraObjects = dataAO1.CassandraObjects - - m.CouchbaseObjects = dataAO1.CouchbaseObjects - - m.HbaseObjects = dataAO1.HbaseObjects - - m.HiveObjects = dataAO1.HiveObjects - - m.MongoObjects = dataAO1.MongoObjects - - m.HdfsObjects = dataAO1.HdfsObjects - - m.ExchangeObjects = dataAO1.ExchangeObjects - - m.PublicFolderItems = dataAO1.PublicFolderItems - - m.SfdcRecords = dataAO1.SfdcRecords - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HeliosSearchIndexedObjectsResponseBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HeliosCommonSearchIndexedObjectsResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Emails HeliosEmails `json:"emails,omitempty"` - - Files HeliosFiles `json:"files,omitempty"` - - CassandraObjects HeliosCassandraObjects `json:"cassandraObjects,omitempty"` - - CouchbaseObjects HeliosCouchbaseObjects `json:"couchbaseObjects,omitempty"` - - HbaseObjects HeliosHbaseObjects `json:"hbaseObjects,omitempty"` - - HiveObjects HeliosHiveObjects `json:"hiveObjects,omitempty"` - - MongoObjects HeliosMongoObjects `json:"mongoObjects,omitempty"` - - HdfsObjects HeliosHdfsObjects `json:"hdfsObjects,omitempty"` - - ExchangeObjects HeliosExchangeObjects `json:"exchangeObjects,omitempty"` - - PublicFolderItems HeliosPublicFolderItems `json:"publicFolderItems,omitempty"` - - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` - } - - dataAO1.Emails = m.Emails - - dataAO1.Files = m.Files - - dataAO1.CassandraObjects = m.CassandraObjects - - dataAO1.CouchbaseObjects = m.CouchbaseObjects - - dataAO1.HbaseObjects = m.HbaseObjects - - dataAO1.HiveObjects = m.HiveObjects - - dataAO1.MongoObjects = m.MongoObjects - - dataAO1.HdfsObjects = m.HdfsObjects - - dataAO1.ExchangeObjects = m.ExchangeObjects - - dataAO1.PublicFolderItems = m.PublicFolderItems - - dataAO1.SfdcRecords = m.SfdcRecords - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this helios search indexed objects response body -func (m *HeliosSearchIndexedObjectsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonSearchIndexedObjectsResponseParams - if err := m.HeliosCommonSearchIndexedObjectsResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongoObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcRecords(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateEmails(formats strfmt.Registry) error { - - if swag.IsZero(m.Emails) { // not required - return nil - } - - if err := m.Emails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emails") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateFiles(formats strfmt.Registry) error { - - if swag.IsZero(m.Files) { // not required - return nil - } - - if err := m.Files.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateCassandraObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraObjects) { // not required - return nil - } - - if err := m.CassandraObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateCouchbaseObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseObjects) { // not required - return nil - } - - if err := m.CouchbaseObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateHbaseObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseObjects) { // not required - return nil - } - - if err := m.HbaseObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateHiveObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveObjects) { // not required - return nil - } - - if err := m.HiveObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateMongoObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.MongoObjects) { // not required - return nil - } - - if err := m.MongoObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongoObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongoObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateHdfsObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsObjects) { // not required - return nil - } - - if err := m.HdfsObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateExchangeObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeObjects) { // not required - return nil - } - - if err := m.ExchangeObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validatePublicFolderItems(formats strfmt.Registry) error { - - if swag.IsZero(m.PublicFolderItems) { // not required - return nil - } - - if err := m.PublicFolderItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderItems") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) validateSfdcRecords(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcRecords) { // not required - return nil - } - - if m.SfdcRecords != nil { - if err := m.SfdcRecords.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecords") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecords") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios search indexed objects response body based on the context it is used -func (m *HeliosSearchIndexedObjectsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HeliosCommonSearchIndexedObjectsResponseParams - if err := m.HeliosCommonSearchIndexedObjectsResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongoObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcRecords(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateEmails(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Emails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emails") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Files.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateCassandraObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.CassandraObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateCouchbaseObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.CouchbaseObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateHbaseObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HbaseObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateHiveObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HiveObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateMongoObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.MongoObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongoObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongoObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateHdfsObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HdfsObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateExchangeObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.ExchangeObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeObjects") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidatePublicFolderItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.PublicFolderItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderItems") - } - return err - } - - return nil -} - -func (m *HeliosSearchIndexedObjectsResponseBody) contextValidateSfdcRecords(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcRecords != nil { - - if swag.IsZero(m.SfdcRecords) { // not required - return nil - } - - if err := m.SfdcRecords.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecords") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecords") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosSearchIndexedObjectsResponseBody) UnmarshalBinary(b []byte) error { - var res HeliosSearchIndexedObjectsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_source_u_ui_ds.go b/v2/models/helios_source_u_ui_ds.go deleted file mode 100644 index b2b32822..00000000 --- a/v2/models/helios_source_u_ui_ds.go +++ /dev/null @@ -1,40 +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/validate" -) - -// HeliosSourceUUIDs Helios Source UUIDs -// -// Specifies a list of source UUIDs. Only matches found in these sources will be returned. -// -// swagger:model HeliosSourceUUIDs -type HeliosSourceUUIDs []string - -// Validate validates this helios source u UI ds -func (m HeliosSourceUUIDs) Validate(formats strfmt.Registry) error { - var res []error - - if err := validate.UniqueItems("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this helios source u UI ds based on context it is used -func (m HeliosSourceUUIDs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/helios_storage_domain_u_ui_ds.go b/v2/models/helios_storage_domain_u_ui_ds.go deleted file mode 100644 index 6135f810..00000000 --- a/v2/models/helios_storage_domain_u_ui_ds.go +++ /dev/null @@ -1,40 +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/validate" -) - -// HeliosStorageDomainUUIDs Storage Domain UUIDs -// -// Specifies a list of storage domain UUIDs on Helios. Only matches found in these storage domains will be returned. -// -// swagger:model HeliosStorageDomainUUIDs -type HeliosStorageDomainUUIDs []string - -// Validate validates this helios storage domain u UI ds -func (m HeliosStorageDomainUUIDs) Validate(formats strfmt.Registry) error { - var res []error - - if err := validate.UniqueItems("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this helios storage domain u UI ds based on context it is used -func (m HeliosStorageDomainUUIDs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/helios_target_schedule.go b/v2/models/helios_target_schedule.go deleted file mode 100644 index 88e3c26a..00000000 --- a/v2/models/helios_target_schedule.go +++ /dev/null @@ -1,140 +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" -) - -// HeliosTargetSchedule Schedule -// -// Specifies a schedule frequency and schedule unit for copying Snapshots to backup targets. -// -// swagger:model HeliosTargetSchedule -type HeliosTargetSchedule struct { - - // Specifies the frequency that Snapshots should be copied to the specified target. Used in combination with multiplier.
'Runs' means that the Snapshot copy occurs after the number of Protection Group Runs equals the number specified in the frequency.
'Hours' means that the Snapshot copy occurs hourly at the frequency set in the frequency, for example if scheduleFrequency is 2, the copy occurs every 2 hours.
'Days' means that the Snapshot copy occurs daily at the frequency set in the frequency.
'Weeks' means that the Snapshot copy occurs weekly at the frequency set in the frequency.
'Months' means that the Snapshot copy occurs monthly at the frequency set in the Frequency.
'Years' means that the Snapshot copy occurs yearly at the frequency set in the scheduleFrequency. - // Enum: ["Runs","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit,omitempty"` - - // Specifies a factor to multiply the unit by, to determine the copy schedule. - // For example if set to 2 and the unit is hourly, then Snapshots from the first eligible Job Run for every 2 hour period is copied. - // Minimum: 1 - Frequency *int32 `json:"frequency,omitempty"` -} - -// Validate validates this helios target schedule -func (m *HeliosTargetSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosTargetScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Runs","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosTargetScheduleTypeUnitPropEnum = append(heliosTargetScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosTargetScheduleUnitRuns captures enum value "Runs" - HeliosTargetScheduleUnitRuns string = "Runs" - - // HeliosTargetScheduleUnitHours captures enum value "Hours" - HeliosTargetScheduleUnitHours string = "Hours" - - // HeliosTargetScheduleUnitDays captures enum value "Days" - HeliosTargetScheduleUnitDays string = "Days" - - // HeliosTargetScheduleUnitWeeks captures enum value "Weeks" - HeliosTargetScheduleUnitWeeks string = "Weeks" - - // HeliosTargetScheduleUnitMonths captures enum value "Months" - HeliosTargetScheduleUnitMonths string = "Months" - - // HeliosTargetScheduleUnitYears captures enum value "Years" - HeliosTargetScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosTargetSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosTargetScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosTargetSchedule) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *HeliosTargetSchedule) validateFrequency(formats strfmt.Registry) error { - if swag.IsZero(m.Frequency) { // not required - return nil - } - - if err := validate.MinimumInt("frequency", "body", int64(*m.Frequency), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios target schedule based on context it is used -func (m *HeliosTargetSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosTargetSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosTargetSchedule) UnmarshalBinary(b []byte) error { - var res HeliosTargetSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_targets_configuration.go b/v2/models/helios_targets_configuration.go deleted file mode 100644 index b6bcaf31..00000000 --- a/v2/models/helios_targets_configuration.go +++ /dev/null @@ -1,369 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HeliosTargetsConfiguration Specifies the replication, archival and cloud spin targets of Protection Policy. -// -// swagger:model HeliosTargetsConfiguration -type HeliosTargetsConfiguration struct { - - // replication targets - ReplicationTargets []*HeliosReplicationConfig `json:"replicationTargets"` - - // archival targets - ArchivalTargets []*HeliosArchivalConfig `json:"archivalTargets"` - - // cloud spin targets - CloudSpinTargets []*HeliosCloudSpinConfig `json:"cloudSpinTargets"` - - // onprem deploy targets - OnpremDeployTargets []*HeliosOnpremDeployConfig `json:"onpremDeployTargets"` - - // rpaas targets - RpaasTargets []*HeliosRpaasConfig `json:"rpaasTargets"` -} - -// Validate validates this helios targets configuration -func (m *HeliosTargetsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnpremDeployTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpaasTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosTargetsConfiguration) validateReplicationTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargets) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTargets); i++ { - if swag.IsZero(m.ReplicationTargets[i]) { // not required - continue - } - - if m.ReplicationTargets[i] != nil { - if err := m.ReplicationTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) validateArchivalTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargets) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalTargets); i++ { - if swag.IsZero(m.ArchivalTargets[i]) { // not required - continue - } - - if m.ArchivalTargets[i] != nil { - if err := m.ArchivalTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) validateCloudSpinTargets(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinTargets) { // not required - return nil - } - - for i := 0; i < len(m.CloudSpinTargets); i++ { - if swag.IsZero(m.CloudSpinTargets[i]) { // not required - continue - } - - if m.CloudSpinTargets[i] != nil { - if err := m.CloudSpinTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) validateOnpremDeployTargets(formats strfmt.Registry) error { - if swag.IsZero(m.OnpremDeployTargets) { // not required - return nil - } - - for i := 0; i < len(m.OnpremDeployTargets); i++ { - if swag.IsZero(m.OnpremDeployTargets[i]) { // not required - continue - } - - if m.OnpremDeployTargets[i] != nil { - if err := m.OnpremDeployTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) validateRpaasTargets(formats strfmt.Registry) error { - if swag.IsZero(m.RpaasTargets) { // not required - return nil - } - - for i := 0; i < len(m.RpaasTargets); i++ { - if swag.IsZero(m.RpaasTargets[i]) { // not required - continue - } - - if m.RpaasTargets[i] != nil { - if err := m.RpaasTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios targets configuration based on the context it is used -func (m *HeliosTargetsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicationTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudSpinTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnpremDeployTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpaasTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosTargetsConfiguration) contextValidateReplicationTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationTargets); i++ { - - if m.ReplicationTargets[i] != nil { - - if swag.IsZero(m.ReplicationTargets[i]) { // not required - return nil - } - - if err := m.ReplicationTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) contextValidateArchivalTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalTargets); i++ { - - if m.ArchivalTargets[i] != nil { - - if swag.IsZero(m.ArchivalTargets[i]) { // not required - return nil - } - - if err := m.ArchivalTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) contextValidateCloudSpinTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudSpinTargets); i++ { - - if m.CloudSpinTargets[i] != nil { - - if swag.IsZero(m.CloudSpinTargets[i]) { // not required - return nil - } - - if err := m.CloudSpinTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) contextValidateOnpremDeployTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OnpremDeployTargets); i++ { - - if m.OnpremDeployTargets[i] != nil { - - if swag.IsZero(m.OnpremDeployTargets[i]) { // not required - return nil - } - - if err := m.OnpremDeployTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTargetsConfiguration) contextValidateRpaasTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RpaasTargets); i++ { - - if m.RpaasTargets[i] != nil { - - if swag.IsZero(m.RpaasTargets[i]) { // not required - return nil - } - - if err := m.RpaasTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosTargetsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosTargetsConfiguration) UnmarshalBinary(b []byte) error { - var res HeliosTargetsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_tenant.go b/v2/models/helios_tenant.go deleted file mode 100644 index 4b6d52c1..00000000 --- a/v2/models/helios_tenant.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosTenant HeliosTenant -// -// Description of a Tenant and it's properties on various clusters. -// -// swagger:model HeliosTenant -type HeliosTenant struct { - - // The tenant id. - ID *string `json:"id,omitempty"` - - // Name of the Tenant - Name *string `json:"name,omitempty"` - - // Description about the tenant. - Description *string `json:"description,omitempty"` - - // Wether managed on helios or not. - ManagedOnHelios *bool `json:"managedOnHelios,omitempty"` - - // Current Status of the Tenant. - // Enum: ["Active","Inactive","MarkedForDeletion","Deleted"] - Status *string `json:"status,omitempty"` - - // Details of tenant on each system that it is living. - Systems []*HeliosClusterTenant `json:"systems"` - - // Epoch time when tenant was created. - // Read Only: true - CreatedAtTimeMsecs *int64 `json:"createdAtTimeMsecs,omitempty"` - - // Epoch time when tenant was last updated. - // Read Only: true - LastUpdatedAtTimeMsecs *int64 `json:"lastUpdatedAtTimeMsecs,omitempty"` - - // Epoch time when tenant was last updated. - // Read Only: true - DeletedAtTimeMsecs *int64 `json:"deletedAtTimeMsecs,omitempty"` -} - -// Validate validates this helios tenant -func (m *HeliosTenant) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosTenantTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Inactive","MarkedForDeletion","Deleted"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosTenantTypeStatusPropEnum = append(heliosTenantTypeStatusPropEnum, v) - } -} - -const ( - - // HeliosTenantStatusActive captures enum value "Active" - HeliosTenantStatusActive string = "Active" - - // HeliosTenantStatusInactive captures enum value "Inactive" - HeliosTenantStatusInactive string = "Inactive" - - // HeliosTenantStatusMarkedForDeletion captures enum value "MarkedForDeletion" - HeliosTenantStatusMarkedForDeletion string = "MarkedForDeletion" - - // HeliosTenantStatusDeleted captures enum value "Deleted" - HeliosTenantStatusDeleted string = "Deleted" -) - -// prop value enum -func (m *HeliosTenant) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosTenantTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosTenant) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *HeliosTenant) validateSystems(formats strfmt.Registry) error { - if swag.IsZero(m.Systems) { // not required - return nil - } - - for i := 0; i < len(m.Systems); i++ { - if swag.IsZero(m.Systems[i]) { // not required - continue - } - - if m.Systems[i] != nil { - if err := m.Systems[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this helios tenant based on the context it is used -func (m *HeliosTenant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSystems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdatedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeletedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosTenant) contextValidateSystems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Systems); i++ { - - if m.Systems[i] != nil { - - if swag.IsZero(m.Systems[i]) { // not required - return nil - } - - if err := m.Systems[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HeliosTenant) contextValidateCreatedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdAtTimeMsecs", "body", m.CreatedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *HeliosTenant) contextValidateLastUpdatedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedAtTimeMsecs", "body", m.LastUpdatedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *HeliosTenant) contextValidateDeletedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "deletedAtTimeMsecs", "body", m.DeletedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosTenant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosTenant) UnmarshalBinary(b []byte) error { - var res HeliosTenant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_tier.go b/v2/models/helios_tier.go deleted file mode 100644 index fa23bbee..00000000 --- a/v2/models/helios_tier.go +++ /dev/null @@ -1,167 +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" -) - -// HeliosTier Specifies the Helios Tier details. -// -// swagger:model HeliosTier -type HeliosTier struct { - - // Specifies the tier type. - // Enum: ["kAmazonS3Standard","kAmazonS3Glacier"] - Type *string `json:"type,omitempty"` - - // Specifies whether the current tier will be the default tier for primary retention. - IsDefaultTier *bool `json:"isDefaultTier,omitempty"` - - // Specificies the time unit after which backup will be moved to next tier. - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit,omitempty"` - - // Specifies the duration after which the backup will be moved to next tier. - MoveAfter *int64 `json:"moveAfter,omitempty"` -} - -// Validate validates this helios tier -func (m *HeliosTier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosTierTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3Glacier"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosTierTypeTypePropEnum = append(heliosTierTypeTypePropEnum, v) - } -} - -const ( - - // HeliosTierTypeKAmazonS3Standard captures enum value "kAmazonS3Standard" - HeliosTierTypeKAmazonS3Standard string = "kAmazonS3Standard" - - // HeliosTierTypeKAmazonS3Glacier captures enum value "kAmazonS3Glacier" - HeliosTierTypeKAmazonS3Glacier string = "kAmazonS3Glacier" -) - -// prop value enum -func (m *HeliosTier) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosTierTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosTier) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var heliosTierTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosTierTypeUnitPropEnum = append(heliosTierTypeUnitPropEnum, v) - } -} - -const ( - - // HeliosTierUnitDays captures enum value "Days" - HeliosTierUnitDays string = "Days" - - // HeliosTierUnitWeeks captures enum value "Weeks" - HeliosTierUnitWeeks string = "Weeks" - - // HeliosTierUnitMonths captures enum value "Months" - HeliosTierUnitMonths string = "Months" - - // HeliosTierUnitYears captures enum value "Years" - HeliosTierUnitYears string = "Years" -) - -// prop value enum -func (m *HeliosTier) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosTierTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosTier) validateUnit(formats strfmt.Registry) error { - if swag.IsZero(m.Unit) { // not required - return nil - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this helios tier based on context it is used -func (m *HeliosTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosTier) UnmarshalBinary(b []byte) error { - var res HeliosTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_tier_level_settings.go b/v2/models/helios_tier_level_settings.go deleted file mode 100644 index 8fa4126d..00000000 --- a/v2/models/helios_tier_level_settings.go +++ /dev/null @@ -1,322 +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" -) - -// HeliosTierLevelSettings Specifies the settings tier levels configured with each archival target. The tier settings need to be applied in specific order and default tier should always be passed as first entry in tiers array. The following example illustrates how to configure tiering input for AWS tiering. Same type of input structure applied to other cloud platforms also.
If user wants to achieve following tiering for backup,
User Desired Tiering-
1.Archive Full back up for 12 Months
2.Tier Levels
[1,12] [
s3 (1 to 2 months), (default tier)
s3 Intelligent tiering (3 to 6 months),
s3 One Zone (7 to 9 months)
Glacier (10 to 12 months)]
API Input
1.tiers-[
{'tierType': 'S3','moveAfterUnit':'months',
'moveAfter':2 - move from s3 to s3Inte after 2 months},
{'tierType': 'S3Inte','moveAfterUnit':'months',
'moveAfter':4 - move from S3Inte to Glacier after 4 months},
{'tierType': 'Glacier', 'moveAfterUnit':'months',
'moveAfter': 3 - move from Glacier to S3 One Zone after 3 months },
{'tierType': 'S3 One Zone', 'moveAfterUnit': nil,
'moveAfter': nil - For the last record, 'moveAfter' and 'moveAfterUnit'
will be ignored since there are no further tier for data movement }
}] -// -// swagger:model HeliosTierLevelSettings -type HeliosTierLevelSettings struct { - - // Specifies the cloud platform to enable tiering. - // Required: true - // Enum: ["AWS","Azure","Oracle","Google"] - CloudPlatform *string `json:"cloudPlatform"` - - // Specifies the settings for AWS Tiers. - AwsTiering *HeliosAWSTiers `json:"awsTiering,omitempty"` - - // Specifies the settings for Azure Tiers. - AzureTiering *HeliosAzureTiers `json:"azureTiering,omitempty"` - - // Specifies the settings for Google Tiers. - GoogleTiering *HeliosGoogleTiers `json:"googleTiering,omitempty"` - - // Specifies the settings for Oracle Tiers. - OracleTiering *HeliosOracleTiers `json:"oracleTiering,omitempty"` -} - -// Validate validates this helios tier level settings -func (m *HeliosTierLevelSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudPlatform(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogleTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleTiering(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosTierLevelSettingsTypeCloudPlatformPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AWS","Azure","Oracle","Google"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - heliosTierLevelSettingsTypeCloudPlatformPropEnum = append(heliosTierLevelSettingsTypeCloudPlatformPropEnum, v) - } -} - -const ( - - // HeliosTierLevelSettingsCloudPlatformAWS captures enum value "AWS" - HeliosTierLevelSettingsCloudPlatformAWS string = "AWS" - - // HeliosTierLevelSettingsCloudPlatformAzure captures enum value "Azure" - HeliosTierLevelSettingsCloudPlatformAzure string = "Azure" - - // HeliosTierLevelSettingsCloudPlatformOracle captures enum value "Oracle" - HeliosTierLevelSettingsCloudPlatformOracle string = "Oracle" - - // HeliosTierLevelSettingsCloudPlatformGoogle captures enum value "Google" - HeliosTierLevelSettingsCloudPlatformGoogle string = "Google" -) - -// prop value enum -func (m *HeliosTierLevelSettings) validateCloudPlatformEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosTierLevelSettingsTypeCloudPlatformPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosTierLevelSettings) validateCloudPlatform(formats strfmt.Registry) error { - - if err := validate.Required("cloudPlatform", "body", m.CloudPlatform); err != nil { - return err - } - - // value enum - if err := m.validateCloudPlatformEnum("cloudPlatform", "body", *m.CloudPlatform); err != nil { - return err - } - - return nil -} - -func (m *HeliosTierLevelSettings) validateAwsTiering(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTiering) { // not required - return nil - } - - if m.AwsTiering != nil { - if err := m.AwsTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) validateAzureTiering(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTiering) { // not required - return nil - } - - if m.AzureTiering != nil { - if err := m.AzureTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) validateGoogleTiering(formats strfmt.Registry) error { - if swag.IsZero(m.GoogleTiering) { // not required - return nil - } - - if m.GoogleTiering != nil { - if err := m.GoogleTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) validateOracleTiering(formats strfmt.Registry) error { - if swag.IsZero(m.OracleTiering) { // not required - return nil - } - - if m.OracleTiering != nil { - if err := m.OracleTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTiering") - } - return err - } - } - - return nil -} - -// ContextValidate validate this helios tier level settings based on the context it is used -func (m *HeliosTierLevelSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogleTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HeliosTierLevelSettings) contextValidateAwsTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTiering != nil { - - if swag.IsZero(m.AwsTiering) { // not required - return nil - } - - if err := m.AwsTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) contextValidateAzureTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTiering != nil { - - if swag.IsZero(m.AzureTiering) { // not required - return nil - } - - if err := m.AzureTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) contextValidateGoogleTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.GoogleTiering != nil { - - if swag.IsZero(m.GoogleTiering) { // not required - return nil - } - - if err := m.GoogleTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleTiering") - } - return err - } - } - - return nil -} - -func (m *HeliosTierLevelSettings) contextValidateOracleTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleTiering != nil { - - if swag.IsZero(m.OracleTiering) { // not required - return nil - } - - if err := m.OracleTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTiering") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosTierLevelSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosTierLevelSettings) UnmarshalBinary(b []byte) error { - var res HeliosTierLevelSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/helios_week_schedule.go b/v2/models/helios_week_schedule.go deleted file mode 100644 index 7bdeaf07..00000000 --- a/v2/models/helios_week_schedule.go +++ /dev/null @@ -1,101 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HeliosWeekSchedule Week Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start on certain days of week. -// -// swagger:model HeliosWeekSchedule -type HeliosWeekSchedule struct { - - // Specifies a list of days of the week when to start Protection Group Runs.
Example: To run a Protection Group on every Monday and Tuesday, set the schedule with following values:
unit: 'Weeks'
dayOfWeek: ['Monday','Tuesday'] - DayOfWeek []string `json:"dayOfWeek"` -} - -// Validate validates this helios week schedule -func (m *HeliosWeekSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayOfWeek(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var heliosWeekScheduleDayOfWeekItemsEnum []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 { - heliosWeekScheduleDayOfWeekItemsEnum = append(heliosWeekScheduleDayOfWeekItemsEnum, v) - } -} - -func (m *HeliosWeekSchedule) validateDayOfWeekItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, heliosWeekScheduleDayOfWeekItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *HeliosWeekSchedule) validateDayOfWeek(formats strfmt.Registry) error { - if swag.IsZero(m.DayOfWeek) { // not required - return nil - } - - for i := 0; i < len(m.DayOfWeek); i++ { - - // value enum - if err := m.validateDayOfWeekItemsEnum("dayOfWeek"+"."+strconv.Itoa(i), "body", m.DayOfWeek[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this helios week schedule based on context it is used -func (m *HeliosWeekSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HeliosWeekSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HeliosWeekSchedule) UnmarshalBinary(b []byte) error { - var res HeliosWeekSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_additional_params.go b/v2/models/hive_additional_params.go deleted file mode 100644 index 3f50f05d..00000000 --- a/v2/models/hive_additional_params.go +++ /dev/null @@ -1,160 +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" -) - -// HiveAdditionalParams Hive Additional Params. -// -// Additional params for Hive protection source. -// -// swagger:model HiveAdditionalParams -type HiveAdditionalParams struct { - - // The MetastoreAddress for this Hive. - // Read Only: true - MetastoreAddress string `json:"metastoreAddress,omitempty"` - - // The MetastorePort for this Hive. - // Read Only: true - MetastorePort int32 `json:"metastorePort,omitempty"` - - // Authentication type. - // Read Only: true - // Enum: ["KERBEROS","NONE"] - AuthType *string `json:"authType,omitempty"` -} - -// Validate validates this hive additional params -func (m *HiveAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hiveAdditionalParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KERBEROS","NONE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveAdditionalParamsTypeAuthTypePropEnum = append(hiveAdditionalParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // HiveAdditionalParamsAuthTypeKERBEROS captures enum value "KERBEROS" - HiveAdditionalParamsAuthTypeKERBEROS string = "KERBEROS" - - // HiveAdditionalParamsAuthTypeNONE captures enum value "NONE" - HiveAdditionalParamsAuthTypeNONE string = "NONE" -) - -// prop value enum -func (m *HiveAdditionalParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveAdditionalParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveAdditionalParams) validateAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.AuthType) { // not required - return nil - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hive additional params based on the context it is used -func (m *HiveAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetastoreAddress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetastorePort(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAuthType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveAdditionalParams) contextValidateMetastoreAddress(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "metastoreAddress", "body", string(m.MetastoreAddress)); err != nil { - return err - } - - return nil -} - -func (m *HiveAdditionalParams) contextValidateMetastorePort(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "metastorePort", "body", int32(m.MetastorePort)); err != nil { - return err - } - - return nil -} - -func (m *HiveAdditionalParams) contextValidateAuthType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "authType", "body", m.AuthType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveAdditionalParams) UnmarshalBinary(b []byte) error { - var res HiveAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_indexed_object.go b/v2/models/hive_indexed_object.go deleted file mode 100644 index 873d0288..00000000 --- a/v2/models/hive_indexed_object.go +++ /dev/null @@ -1,171 +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" -) - -// HiveIndexedObject HiveIndexedObject -// -// Specifies a Hive indexed object. -// -// swagger:model HiveIndexedObject -type HiveIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the Hive Object Type. - // Enum: ["HiveDatabases","HiveTables","HivePartitions"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HiveIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HiveIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hive indexed object -func (m *HiveIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hiveIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HiveDatabases","HiveTables","HivePartitions"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveIndexedObjectTypeTypePropEnum = append(hiveIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *HiveIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hive indexed object based on the context it is used -func (m *HiveIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HiveIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveIndexedObject) UnmarshalBinary(b []byte) error { - var res HiveIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_indexed_objects.go b/v2/models/hive_indexed_objects.go deleted file mode 100644 index 323cdacf..00000000 --- a/v2/models/hive_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HiveIndexedObjects Specifies the indexed Hive objects. -// -// swagger:model HiveIndexedObjects -type HiveIndexedObjects []*HiveIndexedObject - -// Validate validates this hive indexed objects -func (m HiveIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hive indexed objects based on the context it is used -func (m HiveIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/hive_on_prem_search_params.go b/v2/models/hive_on_prem_search_params.go deleted file mode 100644 index 3080f0f7..00000000 --- a/v2/models/hive_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// HiveOnPremSearchParams HiveOnPremSearchParams -// -// Parameters required to search Hive on a cluster. -// -// swagger:model HiveOnPremSearchParams -type HiveOnPremSearchParams struct { - HiveSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HiveOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HiveSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HiveSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HiveOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HiveSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hive on prem search params -func (m *HiveOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveSearchParams - if err := m.HiveSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hive on prem search params based on the context it is used -func (m *HiveOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveSearchParams - if err := m.HiveSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HiveOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res HiveOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_params.go b/v2/models/hive_params.go deleted file mode 100644 index 76d6543e..00000000 --- a/v2/models/hive_params.go +++ /dev/null @@ -1,160 +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" -) - -// HiveParams Recover Hive environment params. -// -// Specifies the recovery options specific to Hive environment. -// -// swagger:model HiveParams -type HiveParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Hive objects. - // Required: true - RecoverHiveParams *RecoverHiveParams `json:"recoverHiveParams"` -} - -// Validate validates this hive params -func (m *HiveParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverHiveParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hiveParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveParamsTypeRecoveryActionPropEnum = append(hiveParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // HiveParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - HiveParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *HiveParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *HiveParams) validateRecoverHiveParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverHiveParams", "body", m.RecoverHiveParams); err != nil { - return err - } - - if m.RecoverHiveParams != nil { - if err := m.RecoverHiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHiveParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive params based on the context it is used -func (m *HiveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveParams) contextValidateRecoverHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverHiveParams != nil { - - if err := m.RecoverHiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverHiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverHiveParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveParams) UnmarshalBinary(b []byte) error { - var res HiveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_search_params.go b/v2/models/hive_search_params.go deleted file mode 100644 index 86ee88b1..00000000 --- a/v2/models/hive_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HiveSearchParams Specifies the parameters which are specific for searching Hive objects. -// -// swagger:model HiveSearchParams -type HiveSearchParams struct { - - // Specifies the search string to search the Hive Objects - // Required: true - SearchString *string `json:"searchString"` - - // Specifies one or more Hive object types be searched. - // Required: true - HiveObjectTypes []string `json:"hiveObjectTypes"` -} - -// Validate validates this hive search params -func (m *HiveSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveObjectTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var hiveSearchParamsHiveObjectTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HiveDatabases","HiveTables","HivePartitions"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hiveSearchParamsHiveObjectTypesItemsEnum = append(hiveSearchParamsHiveObjectTypesItemsEnum, v) - } -} - -func (m *HiveSearchParams) validateHiveObjectTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hiveSearchParamsHiveObjectTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *HiveSearchParams) validateHiveObjectTypes(formats strfmt.Registry) error { - - if err := validate.Required("hiveObjectTypes", "body", m.HiveObjectTypes); err != nil { - return err - } - - for i := 0; i < len(m.HiveObjectTypes); i++ { - - // value enum - if err := m.validateHiveObjectTypesItemsEnum("hiveObjectTypes"+"."+strconv.Itoa(i), "body", m.HiveObjectTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this hive search params based on context it is used -func (m *HiveSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSearchParams) UnmarshalBinary(b []byte) error { - var res HiveSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_source_registration_params.go b/v2/models/hive_source_registration_params.go deleted file mode 100644 index eb283658..00000000 --- a/v2/models/hive_source_registration_params.go +++ /dev/null @@ -1,464 +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" -) - -// HiveSourceRegistrationParams Register Hive source request parameters. -// -// Specifies parameters to register Hive source. -// -// swagger:model HiveSourceRegistrationParams -type HiveSourceRegistrationParams struct { - HiveAdditionalParams - - // IP or hostname of any host from which the Hive configuration file hive-site.xml can be read. - // Required: true - Host *string `json:"host"` - - // The directory containing the hive-site.xml. - // Required: true - ConfigurationDirectory *string `json:"configurationDirectory"` - - // Protection Source registration id of the HDFS on which this Hive is running. - // Required: true - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - // The kerberos principal to be used to connect to this Hive source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // ssh password credentials - SSHPasswordCredentials *HiveSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HiveSourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HiveAdditionalParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HiveAdditionalParams = aO0 - - // AO1 - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - SSHPasswordCredentials *HiveSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Host = dataAO1.Host - - m.ConfigurationDirectory = dataAO1.ConfigurationDirectory - - m.HdfsSourceRegistrationID = dataAO1.HdfsSourceRegistrationID - - m.KerberosPrincipal = dataAO1.KerberosPrincipal - - m.SSHPasswordCredentials = dataAO1.SSHPasswordCredentials - - m.SSHPrivateKeyCredentials = dataAO1.SSHPrivateKeyCredentials - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HiveSourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HiveAdditionalParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Host *string `json:"host"` - - ConfigurationDirectory *string `json:"configurationDirectory"` - - HdfsSourceRegistrationID *int64 `json:"hdfsSourceRegistrationID"` - - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - SSHPasswordCredentials *HiveSourceRegistrationParamsAO1SSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - SSHPrivateKeyCredentials *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` - } - - dataAO1.Host = m.Host - - dataAO1.ConfigurationDirectory = m.ConfigurationDirectory - - dataAO1.HdfsSourceRegistrationID = m.HdfsSourceRegistrationID - - dataAO1.KerberosPrincipal = m.KerberosPrincipal - - dataAO1.SSHPasswordCredentials = m.SSHPasswordCredentials - - dataAO1.SSHPrivateKeyCredentials = m.SSHPrivateKeyCredentials - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hive source registration params -func (m *HiveSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveAdditionalParams - if err := m.HiveAdditionalParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfigurationDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsSourceRegistrationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationParams) validateConfigurationDirectory(formats strfmt.Registry) error { - - if err := validate.Required("configurationDirectory", "body", m.ConfigurationDirectory); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationParams) validateHdfsSourceRegistrationID(formats strfmt.Registry) error { - - if err := validate.Required("hdfsSourceRegistrationID", "body", m.HdfsSourceRegistrationID); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HiveSourceRegistrationParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive source registration params based on the context it is used -func (m *HiveSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveAdditionalParams - if err := m.HiveAdditionalParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HiveSourceRegistrationParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HiveSourceRegistrationParamsAO1SSHPasswordCredentials SSH username + password required for reading configuration file.Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HiveSourceRegistrationParamsAO1SSHPasswordCredentials -type HiveSourceRegistrationParamsAO1SSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hive source registration params a o1 SSH password credentials -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hive source registration params a o1 SSH password credentials based on context it is used -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationParamsAO1SSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationParamsAO1SSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials -type HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hive source registration params a o1 SSH private key credentials -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hive source registration params a o1 SSH private key credentials based on context it is used -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationParamsAO1SSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hive_source_registration_update_params.go b/v2/models/hive_source_registration_update_params.go deleted file mode 100644 index fcedbcc2..00000000 --- a/v2/models/hive_source_registration_update_params.go +++ /dev/null @@ -1,321 +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" -) - -// HiveSourceRegistrationUpdateParams Update Registeration of Hive source . -// -// Specifies parameters to update registration of Hive source. -// -// swagger:model HiveSourceRegistrationUpdateParams -type HiveSourceRegistrationUpdateParams struct { - - // IP or hostname of any host from which the Hive configuration file hive-site.xml can be read. - Host *string `json:"host,omitempty"` - - // The directory containing the hive-site.xml. - ConfigurationDirectory *string `json:"configurationDirectory,omitempty"` - - // The kerberos principal to be used to connect to this Hive source. - KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - - // ssh password credentials - SSHPasswordCredentials *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials `json:"sshPasswordCredentials,omitempty"` - - // ssh private key credentials - SSHPrivateKeyCredentials *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials `json:"sshPrivateKeyCredentials,omitempty"` -} - -// Validate validates this hive source registration update params -func (m *HiveSourceRegistrationUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSSHPasswordCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHPrivateKeyCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationUpdateParams) validateSSHPasswordCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if m.SSHPasswordCredentials != nil { - if err := m.SSHPasswordCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HiveSourceRegistrationUpdateParams) validateSSHPrivateKeyCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if m.SSHPrivateKeyCredentials != nil { - if err := m.SSHPrivateKeyCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hive source registration update params based on the context it is used -func (m *HiveSourceRegistrationUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSSHPasswordCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHPrivateKeyCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationUpdateParams) contextValidateSSHPasswordCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPasswordCredentials != nil { - - if swag.IsZero(m.SSHPasswordCredentials) { // not required - return nil - } - - if err := m.SSHPasswordCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPasswordCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPasswordCredentials") - } - return err - } - } - - return nil -} - -func (m *HiveSourceRegistrationUpdateParams) contextValidateSSHPrivateKeyCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHPrivateKeyCredentials != nil { - - if swag.IsZero(m.SSHPrivateKeyCredentials) { // not required - return nil - } - - if err := m.SSHPrivateKeyCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshPrivateKeyCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshPrivateKeyCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParams) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HiveSourceRegistrationUpdateParamsSSHPasswordCredentials SSH username + password required for reading configuration file. Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model HiveSourceRegistrationUpdateParamsSSHPasswordCredentials -type HiveSourceRegistrationUpdateParamsSSHPasswordCredentials struct { - - // SSH password. - // Required: true - Password *string `json:"password"` - - // SSH username. - // Required: true - Username *string `json:"username"` -} - -// Validate validates this hive source registration update params SSH password credentials -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("sshPasswordCredentials"+"."+"username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hive source registration update params SSH password credentials based on context it is used -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParamsSSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationUpdateParamsSSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials SSH userID + privateKey required for reading configuration file. -// -// swagger:model HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials -type HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials struct { - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` -} - -// Validate validates this hive source registration update params SSH private key credentials -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("sshPrivateKeyCredentials"+"."+"userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hive source registration update params SSH private key credentials based on context it is used -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res HiveSourceRegistrationUpdateParamsSSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/host_based_backup_script_params.go b/v2/models/host_based_backup_script_params.go deleted file mode 100644 index b282b8be..00000000 --- a/v2/models/host_based_backup_script_params.go +++ /dev/null @@ -1,314 +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" -) - -// HostBasedBackupScriptParams Host Based Backup Script Params -// -// Specifies params of a pre/post scripts to be executed before and after a backup run. -// -// swagger:model HostBasedBackupScriptParams -type HostBasedBackupScriptParams struct { - - // Specifies the host and its params. - // Required: true - Host *ScriptHost `json:"host"` - - // Specifies the pre script and its params. - PreScript *CommonPreBackupScriptParams `json:"preScript,omitempty"` - - // Specifies the post script and its params. - PostScript *CommonPostBackupScriptParams `json:"postScript,omitempty"` - - // Specifies the post backup script and its params. - PostBackupScript *CommonPostBackupScriptParams `json:"postBackupScript,omitempty"` - - // Specifies the post snapshot script and its params. - PostSnapshotScript *CommonPostBackupScriptParams `json:"postSnapshotScript,omitempty"` -} - -// Validate validates this host based backup script params -func (m *HostBasedBackupScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostSnapshotScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostBasedBackupScriptParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) validatePreScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if m.PreScript != nil { - if err := m.PreScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) validatePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if m.PostScript != nil { - if err := m.PostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) validatePostBackupScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostBackupScript) { // not required - 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 -} - -func (m *HostBasedBackupScriptParams) validatePostSnapshotScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if m.PostSnapshotScript != nil { - if err := m.PostSnapshotScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this host based backup script params based on the context it is used -func (m *HostBasedBackupScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostSnapshotScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostBasedBackupScriptParams) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) contextValidatePreScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScript != nil { - - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if err := m.PreScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) contextValidatePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostScript != nil { - - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if err := m.PostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -func (m *HostBasedBackupScriptParams) 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 *HostBasedBackupScriptParams) contextValidatePostSnapshotScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostSnapshotScript != nil { - - if swag.IsZero(m.PostSnapshotScript) { // not required - return nil - } - - if err := m.PostSnapshotScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postSnapshotScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postSnapshotScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HostBasedBackupScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostBasedBackupScriptParams) UnmarshalBinary(b []byte) error { - var res HostBasedBackupScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/host_entry.go b/v2/models/host_entry.go deleted file mode 100644 index 8dbc4010..00000000 --- a/v2/models/host_entry.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" - "github.com/go-openapi/validate" -) - -// HostEntry Host Entry. -// -// Specifies the parameters of a host entry that can be stored in the cluster's /etc/hosts file. -// -// swagger:model HostEntry -type HostEntry struct { - - // Description the host entry. - Description *string `json:"description,omitempty"` - - // Specifies the domain names of the host. - // Required: true - DomainNames []string `json:"domainNames"` - - // Specifies the IP address of the host. - // Required: true - IP *string `json:"ip"` -} - -// Validate validates this host entry -func (m *HostEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomainNames(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostEntry) validateDomainNames(formats strfmt.Registry) error { - - if err := validate.Required("domainNames", "body", m.DomainNames); err != nil { - return err - } - - return nil -} - -func (m *HostEntry) validateIP(formats strfmt.Registry) error { - - if err := validate.Required("ip", "body", m.IP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this host entry based on context it is used -func (m *HostEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostEntry) UnmarshalBinary(b []byte) error { - var res HostEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/host_information.go b/v2/models/host_information.go deleted file mode 100644 index a3da63ae..00000000 --- a/v2/models/host_information.go +++ /dev/null @@ -1,210 +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" -) - -// HostInformation Specifies the host information for a objects. This is mainly populated in case of App objects where app object is hosted by another object such as VM or physical server. -// -// swagger:model HostInformation -type HostInformation struct { - - // Specifies the id of the host object. - ID *string `json:"id,omitempty"` - - // Specifies the name of the host object. - Name *string `json:"name,omitempty"` - - // 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"` -} - -// Validate validates this host information -func (m *HostInformation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hostInformationTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostInformationTypeEnvironmentPropEnum = append(hostInformationTypeEnvironmentPropEnum, v) - } -} - -const ( - - // HostInformationEnvironmentKVMware captures enum value "kVMware" - HostInformationEnvironmentKVMware string = "kVMware" - - // HostInformationEnvironmentKHyperV captures enum value "kHyperV" - HostInformationEnvironmentKHyperV string = "kHyperV" - - // HostInformationEnvironmentKAzure captures enum value "kAzure" - HostInformationEnvironmentKAzure string = "kAzure" - - // HostInformationEnvironmentKKVM captures enum value "kKVM" - HostInformationEnvironmentKKVM string = "kKVM" - - // HostInformationEnvironmentKAWS captures enum value "kAWS" - HostInformationEnvironmentKAWS string = "kAWS" - - // HostInformationEnvironmentKAzureSQL captures enum value "kAzureSQL" - HostInformationEnvironmentKAzureSQL string = "kAzureSQL" - - // HostInformationEnvironmentKAcropolis captures enum value "kAcropolis" - HostInformationEnvironmentKAcropolis string = "kAcropolis" - - // HostInformationEnvironmentKGCP captures enum value "kGCP" - HostInformationEnvironmentKGCP string = "kGCP" - - // HostInformationEnvironmentKPhysical captures enum value "kPhysical" - HostInformationEnvironmentKPhysical string = "kPhysical" - - // HostInformationEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - HostInformationEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // HostInformationEnvironmentKIsilon captures enum value "kIsilon" - HostInformationEnvironmentKIsilon string = "kIsilon" - - // HostInformationEnvironmentKNetapp captures enum value "kNetapp" - HostInformationEnvironmentKNetapp string = "kNetapp" - - // HostInformationEnvironmentKGenericNas captures enum value "kGenericNas" - HostInformationEnvironmentKGenericNas string = "kGenericNas" - - // HostInformationEnvironmentKFlashBlade captures enum value "kFlashBlade" - HostInformationEnvironmentKFlashBlade string = "kFlashBlade" - - // HostInformationEnvironmentKElastifile captures enum value "kElastifile" - HostInformationEnvironmentKElastifile string = "kElastifile" - - // HostInformationEnvironmentKGPFS captures enum value "kGPFS" - HostInformationEnvironmentKGPFS string = "kGPFS" - - // HostInformationEnvironmentKPure captures enum value "kPure" - HostInformationEnvironmentKPure string = "kPure" - - // HostInformationEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - HostInformationEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // HostInformationEnvironmentKNimble captures enum value "kNimble" - HostInformationEnvironmentKNimble string = "kNimble" - - // HostInformationEnvironmentKSQL captures enum value "kSQL" - HostInformationEnvironmentKSQL string = "kSQL" - - // HostInformationEnvironmentKOracle captures enum value "kOracle" - HostInformationEnvironmentKOracle string = "kOracle" - - // HostInformationEnvironmentKExchange captures enum value "kExchange" - HostInformationEnvironmentKExchange string = "kExchange" - - // HostInformationEnvironmentKAD captures enum value "kAD" - HostInformationEnvironmentKAD string = "kAD" - - // HostInformationEnvironmentKView captures enum value "kView" - HostInformationEnvironmentKView string = "kView" - - // HostInformationEnvironmentKO365 captures enum value "kO365" - HostInformationEnvironmentKO365 string = "kO365" - - // HostInformationEnvironmentKHyperFlex captures enum value "kHyperFlex" - HostInformationEnvironmentKHyperFlex string = "kHyperFlex" - - // HostInformationEnvironmentKKubernetes captures enum value "kKubernetes" - HostInformationEnvironmentKKubernetes string = "kKubernetes" - - // HostInformationEnvironmentKCassandra captures enum value "kCassandra" - HostInformationEnvironmentKCassandra string = "kCassandra" - - // HostInformationEnvironmentKMongoDB captures enum value "kMongoDB" - HostInformationEnvironmentKMongoDB string = "kMongoDB" - - // HostInformationEnvironmentKCouchbase captures enum value "kCouchbase" - HostInformationEnvironmentKCouchbase string = "kCouchbase" - - // HostInformationEnvironmentKHdfs captures enum value "kHdfs" - HostInformationEnvironmentKHdfs string = "kHdfs" - - // HostInformationEnvironmentKHive captures enum value "kHive" - HostInformationEnvironmentKHive string = "kHive" - - // HostInformationEnvironmentKHBase captures enum value "kHBase" - HostInformationEnvironmentKHBase string = "kHBase" - - // HostInformationEnvironmentKUDA captures enum value "kUDA" - HostInformationEnvironmentKUDA string = "kUDA" - - // HostInformationEnvironmentKSfdc captures enum value "kSfdc" - HostInformationEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *HostInformation) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostInformationTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostInformation) 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 validates this host information based on context it is used -func (m *HostInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostInformation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostInformation) UnmarshalBinary(b []byte) error { - var res HostInformation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/host_mappings.go b/v2/models/host_mappings.go deleted file mode 100644 index 9694fc63..00000000 --- a/v2/models/host_mappings.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HostMappings Host Mappings -// -// # Specifies the list of host mappings -// -// swagger:model HostMappings -type HostMappings struct { - - // Specifies the list of host entries - Hosts []*HostEntry `json:"hosts"` -} - -// Validate validates this host mappings -func (m *HostMappings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostMappings) validateHosts(formats strfmt.Registry) error { - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this host mappings based on the context it is used -func (m *HostMappings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostMappings) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HostMappings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostMappings) UnmarshalBinary(b []byte) error { - var res HostMappings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/host_mappings_parameters.go b/v2/models/host_mappings_parameters.go deleted file mode 100644 index cd6dcc39..00000000 --- a/v2/models/host_mappings_parameters.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HostMappingsParameters Specifies the list of host entries to be added to the Cluster's etc/hosts file. -// -// swagger:model HostMappingsParameters -type HostMappingsParameters []*HostEntry - -// Validate validates this host mappings parameters -func (m HostMappingsParameters) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this host mappings parameters based on the context it is used -func (m HostMappingsParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/host_setting_check.go b/v2/models/host_setting_check.go deleted file mode 100644 index d7da9c71..00000000 --- a/v2/models/host_setting_check.go +++ /dev/null @@ -1,173 +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" -) - -// HostSettingCheck Specifies the host checking details. -// -// swagger:model HostSettingCheck -type HostSettingCheck struct { - - // Specifies the type of host checking that was performed. - // Enum: ["IsAgentPortAccessible","IsAgentRunning","IsSQLWriterRunning","AreSQLInstancesRunning","CheckServiceLoginsConfig","CheckSQLFCIVIP","CheckSQLDiskSpace"] - Type *string `json:"type,omitempty"` - - // Specifies the result of host checking performed by agent. - // Enum: ["Pass","Fail","Warning"] - Result *string `json:"result,omitempty"` -} - -// Validate validates this host setting check -func (m *HostSettingCheck) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResult(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hostSettingCheckTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["IsAgentPortAccessible","IsAgentRunning","IsSQLWriterRunning","AreSQLInstancesRunning","CheckServiceLoginsConfig","CheckSQLFCIVIP","CheckSQLDiskSpace"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostSettingCheckTypeTypePropEnum = append(hostSettingCheckTypeTypePropEnum, v) - } -} - -const ( - - // HostSettingCheckTypeIsAgentPortAccessible captures enum value "IsAgentPortAccessible" - HostSettingCheckTypeIsAgentPortAccessible string = "IsAgentPortAccessible" - - // HostSettingCheckTypeIsAgentRunning captures enum value "IsAgentRunning" - HostSettingCheckTypeIsAgentRunning string = "IsAgentRunning" - - // HostSettingCheckTypeIsSQLWriterRunning captures enum value "IsSQLWriterRunning" - HostSettingCheckTypeIsSQLWriterRunning string = "IsSQLWriterRunning" - - // HostSettingCheckTypeAreSQLInstancesRunning captures enum value "AreSQLInstancesRunning" - HostSettingCheckTypeAreSQLInstancesRunning string = "AreSQLInstancesRunning" - - // HostSettingCheckTypeCheckServiceLoginsConfig captures enum value "CheckServiceLoginsConfig" - HostSettingCheckTypeCheckServiceLoginsConfig string = "CheckServiceLoginsConfig" - - // HostSettingCheckTypeCheckSQLFCIVIP captures enum value "CheckSQLFCIVIP" - HostSettingCheckTypeCheckSQLFCIVIP string = "CheckSQLFCIVIP" - - // HostSettingCheckTypeCheckSQLDiskSpace captures enum value "CheckSQLDiskSpace" - HostSettingCheckTypeCheckSQLDiskSpace string = "CheckSQLDiskSpace" -) - -// prop value enum -func (m *HostSettingCheck) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostSettingCheckTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostSettingCheck) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var hostSettingCheckTypeResultPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pass","Fail","Warning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostSettingCheckTypeResultPropEnum = append(hostSettingCheckTypeResultPropEnum, v) - } -} - -const ( - - // HostSettingCheckResultPass captures enum value "Pass" - HostSettingCheckResultPass string = "Pass" - - // HostSettingCheckResultFail captures enum value "Fail" - HostSettingCheckResultFail string = "Fail" - - // HostSettingCheckResultWarning captures enum value "Warning" - HostSettingCheckResultWarning string = "Warning" -) - -// prop value enum -func (m *HostSettingCheck) validateResultEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostSettingCheckTypeResultPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostSettingCheck) validateResult(formats strfmt.Registry) error { - if swag.IsZero(m.Result) { // not required - return nil - } - - // value enum - if err := m.validateResultEnum("result", "body", *m.Result); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this host setting check based on context it is used -func (m *HostSettingCheck) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostSettingCheck) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostSettingCheck) UnmarshalBinary(b []byte) error { - var res HostSettingCheck - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hour_schedule.go b/v2/models/hour_schedule.go deleted file mode 100644 index 39c34b3d..00000000 --- a/v2/models/hour_schedule.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" -) - -// HourSchedule Hours Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of hours. -// -// swagger:model HourSchedule -type HourSchedule struct { - FrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HourSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 FrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.FrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HourSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.FrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hour schedule -func (m *HourSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hour schedule based on the context it is used -func (m *HourSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HourSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HourSchedule) UnmarshalBinary(b []byte) error { - var res HourSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_disk_info.go b/v2/models/hyper_v_disk_info.go deleted file mode 100644 index 571eee82..00000000 --- a/v2/models/hyper_v_disk_info.go +++ /dev/null @@ -1,143 +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" -) - -// HyperVDiskInfo HyperV Disk Information -// -// Specifies information about a disk to be filtered. -// -// swagger:model HyperVDiskInfo -type HyperVDiskInfo struct { - - // Specifies the disk controller type. - // Required: true - // Enum: ["scsi","ide"] - ControllerType *string `json:"controllerType"` - - // Specifies the disk controller number. - // Required: true - ControllerNumber *int64 `json:"controllerNumber"` - - // Specifies the disk index number. - // Required: true - UnitNumber *int64 `json:"unitNumber"` -} - -// Validate validates this hyper v disk info -func (m *HyperVDiskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateControllerType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateControllerNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnitNumber(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hyperVDiskInfoTypeControllerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scsi","ide"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hyperVDiskInfoTypeControllerTypePropEnum = append(hyperVDiskInfoTypeControllerTypePropEnum, v) - } -} - -const ( - - // HyperVDiskInfoControllerTypeScsi captures enum value "scsi" - HyperVDiskInfoControllerTypeScsi string = "scsi" - - // HyperVDiskInfoControllerTypeIde captures enum value "ide" - HyperVDiskInfoControllerTypeIde string = "ide" -) - -// prop value enum -func (m *HyperVDiskInfo) validateControllerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hyperVDiskInfoTypeControllerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HyperVDiskInfo) validateControllerType(formats strfmt.Registry) error { - - if err := validate.Required("controllerType", "body", m.ControllerType); err != nil { - return err - } - - // value enum - if err := m.validateControllerTypeEnum("controllerType", "body", *m.ControllerType); err != nil { - return err - } - - return nil -} - -func (m *HyperVDiskInfo) validateControllerNumber(formats strfmt.Registry) error { - - if err := validate.Required("controllerNumber", "body", m.ControllerNumber); err != nil { - return err - } - - return nil -} - -func (m *HyperVDiskInfo) validateUnitNumber(formats strfmt.Registry) error { - - if err := validate.Required("unitNumber", "body", m.UnitNumber); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hyper v disk info based on context it is used -func (m *HyperVDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVDiskInfo) UnmarshalBinary(b []byte) error { - var res HyperVDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_mount_volumes_new_target_config.go b/v2/models/hyper_v_mount_volumes_new_target_config.go deleted file mode 100644 index ed87dd12..00000000 --- a/v2/models/hyper_v_mount_volumes_new_target_config.go +++ /dev/null @@ -1,178 +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" -) - -// HyperVMountVolumesNewTargetConfig HyperV Mount Volumes New Target Config. -// -// Specifies the configuration for mounting volumes to a new target. -// -// swagger:model HyperVMountVolumesNewTargetConfig -type HyperVMountVolumesNewTargetConfig struct { - - // Specifies the target entity where the volumes are being mounted. - // Required: true - MountTarget *RecoverTarget `json:"mountTarget"` - - // Specifies whether the volumes need to be online within the target environment after attaching the disks. For linux VMs, this should always be set to false because bring disks online is only supported for Windows VM. If this is set to true, HyperV Integration Services must be installed on the VM. - // Required: true - BringDisksOnline *bool `json:"bringDisksOnline"` - - // Specifies credentials to access the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this hyper v mount volumes new target config -func (m *HyperVMountVolumesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBringDisksOnline(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVMountVolumesNewTargetConfig) validateMountTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountTarget", "body", m.MountTarget); err != nil { - return err - } - - if m.MountTarget != nil { - if err := m.MountTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *HyperVMountVolumesNewTargetConfig) validateBringDisksOnline(formats strfmt.Registry) error { - - if err := validate.Required("bringDisksOnline", "body", m.BringDisksOnline); err != nil { - return err - } - - return nil -} - -func (m *HyperVMountVolumesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v mount volumes new target config based on the context it is used -func (m *HyperVMountVolumesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVMountVolumesNewTargetConfig) contextValidateMountTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.MountTarget != nil { - - if err := m.MountTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *HyperVMountVolumesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVMountVolumesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVMountVolumesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res HyperVMountVolumesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_mount_volumes_original_target_config.go b/v2/models/hyper_v_mount_volumes_original_target_config.go deleted file mode 100644 index ab399a89..00000000 --- a/v2/models/hyper_v_mount_volumes_original_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// HyperVMountVolumesOriginalTargetConfig HyperV Mount Volumes Original Target Config. -// -// Specifies the configuration for mounting volumes to the original target. -// -// swagger:model HyperVMountVolumesOriginalTargetConfig -type HyperVMountVolumesOriginalTargetConfig struct { - - // Specifies whether the volumes need to be online within the target environment after attaching the disks. For linux VMs, this should always be set to false because bring disks online is only supported for Windows VM. For Windows, this is optional. If this is set to true, HyperV Integration Services must be installed on the VM. - // Required: true - BringDisksOnline *bool `json:"bringDisksOnline"` - - // Specifies credentials to access the target VM. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this hyper v mount volumes original target config -func (m *HyperVMountVolumesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBringDisksOnline(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVMountVolumesOriginalTargetConfig) validateBringDisksOnline(formats strfmt.Registry) error { - - if err := validate.Required("bringDisksOnline", "body", m.BringDisksOnline); err != nil { - return err - } - - return nil -} - -func (m *HyperVMountVolumesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v mount volumes original target config based on the context it is used -func (m *HyperVMountVolumesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVMountVolumesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVMountVolumesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVMountVolumesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res HyperVMountVolumesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_object_protection_request.go b/v2/models/hyper_v_object_protection_request.go deleted file mode 100644 index b8d6e7d2..00000000 --- a/v2/models/hyper_v_object_protection_request.go +++ /dev/null @@ -1,145 +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" -) - -// HyperVObjectProtectionRequest Specifies the HyperV object level settings for object protection. -// -// swagger:model HyperVObjectProtectionRequest -type HyperVObjectProtectionRequest struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the list of IDs of the objects to not be protected by this Protection Group. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - CommonHyperVObjectParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVObjectProtectionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *int64 `json:"id"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.ExcludeObjectIds = dataAO0.ExcludeObjectIds - - // AO1 - var aO1 CommonHyperVObjectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonHyperVObjectParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVObjectProtectionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *int64 `json:"id"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - - dataAO0.ID = m.ID - - dataAO0.ExcludeObjectIds = m.ExcludeObjectIds - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonHyperVObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v object protection request -func (m *HyperVObjectProtectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVObjectProtectionRequest) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this hyper v object protection request based on the context it is used -func (m *HyperVObjectProtectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVObjectProtectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVObjectProtectionRequest) UnmarshalBinary(b []byte) error { - var res HyperVObjectProtectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_object_protection_request_params.go b/v2/models/hyper_v_object_protection_request_params.go deleted file mode 100644 index 4f6bfa2e..00000000 --- a/v2/models/hyper_v_object_protection_request_params.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HyperVObjectProtectionRequestParams Specifies the parameters which are specific to HyperV object protection. -// -// swagger:model HyperVObjectProtectionRequestParams -type HyperVObjectProtectionRequestParams struct { - - // Specifies the objects to include in the backup. - // Required: true - Objects []*HyperVObjectProtectionRequest `json:"objects"` - - CommonHyperVProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*HyperVObjectProtectionRequest `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonHyperVProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonHyperVProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*HyperVObjectProtectionRequest `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonHyperVProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v object protection request params -func (m *HyperVObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this hyper v object protection request params based on the context it is used -func (m *HyperVObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res HyperVObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_object_protection_response.go b/v2/models/hyper_v_object_protection_response.go deleted file mode 100644 index dc3ba4ab..00000000 --- a/v2/models/hyper_v_object_protection_response.go +++ /dev/null @@ -1,117 +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" -) - -// HyperVObjectProtectionResponse Specifies the input for a protection object in the HyperV environment. -// -// swagger:model HyperVObjectProtectionResponse -type HyperVObjectProtectionResponse struct { - CommonHyperVObjectParams - - // Specifies the list of IDs of the objects to not be protected by this Protection Group. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVObjectProtectionResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonHyperVObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonHyperVObjectParams = aO0 - - // AO1 - var dataAO1 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ExcludeObjectIds = dataAO1.ExcludeObjectIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVObjectProtectionResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonHyperVObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - - dataAO1.ExcludeObjectIds = m.ExcludeObjectIds - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v object protection response -func (m *HyperVObjectProtectionResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hyper v object protection response based on the context it is used -func (m *HyperVObjectProtectionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVObjectProtectionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVObjectProtectionResponse) UnmarshalBinary(b []byte) error { - var res HyperVObjectProtectionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_object_protection_response_params.go b/v2/models/hyper_v_object_protection_response_params.go deleted file mode 100644 index 09bb9bef..00000000 --- a/v2/models/hyper_v_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// HyperVObjectProtectionResponseParams Specifies the parameters which are specific to HyperV object protection. -// -// swagger:model HyperVObjectProtectionResponseParams -type HyperVObjectProtectionResponseParams struct { - HyperVObjectProtectionResponse - - CommonHyperVProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HyperVObjectProtectionResponse - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HyperVObjectProtectionResponse = aO0 - - // AO1 - var aO1 CommonHyperVProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonHyperVProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.HyperVObjectProtectionResponse) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CommonHyperVProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v object protection response params -func (m *HyperVObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HyperVObjectProtectionResponse - if err := m.HyperVObjectProtectionResponse.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hyper v object protection response params based on the context it is used -func (m *HyperVObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HyperVObjectProtectionResponse - if err := m.HyperVObjectProtectionResponse.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res HyperVObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_object_protection_update_request_params.go b/v2/models/hyper_v_object_protection_update_request_params.go deleted file mode 100644 index b6288c45..00000000 --- a/v2/models/hyper_v_object_protection_update_request_params.go +++ /dev/null @@ -1,140 +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" -) - -// HyperVObjectProtectionUpdateRequestParams Specifies the parameters which are specific to HyperV object protection. -// -// swagger:model HyperVObjectProtectionUpdateRequestParams -type HyperVObjectProtectionUpdateRequestParams struct { - CommonHyperVProtectionParams - - CommonHyperVObjectParams - - // Specifies the list of IDs of the objects to not be protected by this Protection Group. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonHyperVProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonHyperVProtectionParams = aO0 - - // AO1 - var aO1 CommonHyperVObjectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonHyperVObjectParams = aO1 - - // AO2 - var dataAO2 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.ExcludeObjectIds = dataAO2.ExcludeObjectIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.CommonHyperVProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CommonHyperVObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - - dataAO2.ExcludeObjectIds = m.ExcludeObjectIds - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v object protection update request params -func (m *HyperVObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this hyper v object protection update request params based on the context it is used -func (m *HyperVObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonHyperVObjectParams - if err := m.CommonHyperVObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res HyperVObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_protection_group_object_params.go b/v2/models/hyper_v_protection_group_object_params.go deleted file mode 100644 index 72afa855..00000000 --- a/v2/models/hyper_v_protection_group_object_params.go +++ /dev/null @@ -1,220 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HyperVProtectionGroupObjectParams HyperV Protection Group Object Params. -// -// Specifies the object parameters to create HyperV Protection Group. -// -// swagger:model HyperVProtectionGroupObjectParams -type HyperVProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies a list of disks to exclude from being protected for the object/vm. - ExcludeDisks []*HyperVDiskInfo `json:"excludeDisks"` - - // Specifies a list of disks to included in the protection for the object/vm. - IncludeDisks []*HyperVDiskInfo `json:"includeDisks"` -} - -// Validate validates this hyper v protection group object params -func (m *HyperVProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *HyperVProtectionGroupObjectParams) validateExcludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeDisks); i++ { - if swag.IsZero(m.ExcludeDisks[i]) { // not required - continue - } - - if m.ExcludeDisks[i] != nil { - if err := m.ExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupObjectParams) validateIncludeDisks(formats strfmt.Registry) error { - if swag.IsZero(m.IncludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.IncludeDisks); i++ { - if swag.IsZero(m.IncludeDisks[i]) { // not required - continue - } - - if m.IncludeDisks[i] != nil { - if err := m.IncludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this hyper v protection group object params based on the context it is used -func (m *HyperVProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *HyperVProtectionGroupObjectParams) contextValidateExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeDisks); i++ { - - if m.ExcludeDisks[i] != nil { - - if swag.IsZero(m.ExcludeDisks[i]) { // not required - return nil - } - - if err := m.ExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupObjectParams) contextValidateIncludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IncludeDisks); i++ { - - if m.IncludeDisks[i] != nil { - - if swag.IsZero(m.IncludeDisks[i]) { // not required - return nil - } - - if err := m.IncludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res HyperVProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_protection_group_params.go b/v2/models/hyper_v_protection_group_params.go deleted file mode 100644 index 4854b1ec..00000000 --- a/v2/models/hyper_v_protection_group_params.go +++ /dev/null @@ -1,475 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HyperVProtectionGroupParams HyperV Protection Group Request Params. -// -// Specifies the parameters which are specific to HyperV related Protection Groups. -// -// swagger:model HyperVProtectionGroupParams -type HyperVProtectionGroupParams struct { - - // Specifies the Protection Group type. If not specified, then backup method is auto determined. Specifying RCT will forcibly use RCT backup for all VMs in this Protection Group. Available only for VMs with hardware version 8.0 and above, but is more efficient. Specifying VSS will forcibly use VSS backup for all VMs in this Protection Group. Available for VMs with hardware version 5.0 and above, but is slower than RCT backup. - // Enum: ["kAuto","kRCT","kVSS"] - ProtectionType *string `json:"protectionType,omitempty"` - - // Specifies the objects to be included in the Protection Group. - // Unique: true - Objects []*HyperVProtectionGroupObjectParams `json:"objects"` - - // Specifies the list of IDs of the objects to not be protected by this Protection Group. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - // Array of Array of VM Tag Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. Optionally specify a list of VMs to exclude from protecting by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. For example a Datacenter is selected to be protected but you want to exclude all the 'Former Employees' VMs in the East and West but keep all the VMs for 'Former Employees' in the South which are also stored in this Datacenter, by specifying the following tag id array: [ [1000, 2221], [1000, 3031] ], where 1000 is the 'Former Employee' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The first inner array [1000, 2221] produces a list of VMs that are both tagged with 'Former Employees' and 'East' (an intersection). The second inner array [1000, 3031] produces a list of VMs that are both tagged with 'Former Employees' and 'West' (an intersection). The outer array combines the list of VMs from the two inner arrays. The list of resulting VMs are excluded from being protected this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies whether or not to move the workload to the cloud. - CloudMigration *bool `json:"cloudMigration,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies a global list of disks to be excluded for the all the VMs part of the protection group. - GlobalExcludeDisks []*HyperVDiskInfo `json:"globalExcludeDisks"` - - // Specifies a global list of disks to be included for the all the VMs part of the protection group. - GlobalIncludeDisks []*HyperVDiskInfo `json:"globalIncludeDisks"` - - CommonHyperVProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *HyperVProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ProtectionType *string `json:"protectionType,omitempty"` - - Objects []*HyperVProtectionGroupObjectParams `json:"objects"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - VMTagIds [][]int64 `json:"vmTagIds"` - - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - CloudMigration *bool `json:"cloudMigration,omitempty"` - - SourceID *int64 `json:"sourceId,omitempty"` - - SourceName *string `json:"sourceName,omitempty"` - - GlobalExcludeDisks []*HyperVDiskInfo `json:"globalExcludeDisks"` - - GlobalIncludeDisks []*HyperVDiskInfo `json:"globalIncludeDisks"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ProtectionType = dataAO0.ProtectionType - - m.Objects = dataAO0.Objects - - m.ExcludeObjectIds = dataAO0.ExcludeObjectIds - - m.VMTagIds = dataAO0.VMTagIds - - m.ExcludeVMTagIds = dataAO0.ExcludeVMTagIds - - m.CloudMigration = dataAO0.CloudMigration - - m.SourceID = dataAO0.SourceID - - m.SourceName = dataAO0.SourceName - - m.GlobalExcludeDisks = dataAO0.GlobalExcludeDisks - - m.GlobalIncludeDisks = dataAO0.GlobalIncludeDisks - - // AO1 - var aO1 CommonHyperVProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonHyperVProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m HyperVProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ProtectionType *string `json:"protectionType,omitempty"` - - Objects []*HyperVProtectionGroupObjectParams `json:"objects"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - VMTagIds [][]int64 `json:"vmTagIds"` - - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - CloudMigration *bool `json:"cloudMigration,omitempty"` - - SourceID *int64 `json:"sourceId,omitempty"` - - SourceName *string `json:"sourceName,omitempty"` - - GlobalExcludeDisks []*HyperVDiskInfo `json:"globalExcludeDisks"` - - GlobalIncludeDisks []*HyperVDiskInfo `json:"globalIncludeDisks"` - } - - dataAO0.ProtectionType = m.ProtectionType - - dataAO0.Objects = m.Objects - - dataAO0.ExcludeObjectIds = m.ExcludeObjectIds - - dataAO0.VMTagIds = m.VMTagIds - - dataAO0.ExcludeVMTagIds = m.ExcludeVMTagIds - - dataAO0.CloudMigration = m.CloudMigration - - dataAO0.SourceID = m.SourceID - - dataAO0.SourceName = m.SourceName - - dataAO0.GlobalExcludeDisks = m.GlobalExcludeDisks - - dataAO0.GlobalIncludeDisks = m.GlobalIncludeDisks - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonHyperVProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this hyper v protection group params -func (m *HyperVProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalIncludeDisks(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hyperVProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAuto","kRCT","kVSS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hyperVProtectionGroupParamsTypeProtectionTypePropEnum = append(hyperVProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -// property enum -func (m *HyperVProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hyperVProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HyperVProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *HyperVProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupParams) validateGlobalExcludeDisks(formats strfmt.Registry) error { - - if swag.IsZero(m.GlobalExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - continue - } - - if m.GlobalExcludeDisks[i] != nil { - if err := m.GlobalExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupParams) validateGlobalIncludeDisks(formats strfmt.Registry) error { - - if swag.IsZero(m.GlobalIncludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalIncludeDisks); i++ { - if swag.IsZero(m.GlobalIncludeDisks[i]) { // not required - continue - } - - if m.GlobalIncludeDisks[i] != nil { - if err := m.GlobalIncludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this hyper v protection group params based on the context it is used -func (m *HyperVProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalIncludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonHyperVProtectionParams - if err := m.CommonHyperVProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *HyperVProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *HyperVProtectionGroupParams) contextValidateGlobalExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - - if m.GlobalExcludeDisks[i] != nil { - - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVProtectionGroupParams) contextValidateGlobalIncludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalIncludeDisks); i++ { - - if m.GlobalIncludeDisks[i] != nil { - - if swag.IsZero(m.GlobalIncludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalIncludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalIncludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res HyperVProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_protection_group_type.go b/v2/models/hyper_v_protection_group_type.go deleted file mode 100644 index bb218c66..00000000 --- a/v2/models/hyper_v_protection_group_type.go +++ /dev/null @@ -1,110 +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" -) - -// HyperVProtectionGroupType HyperV Protection Group type. -// -// HyperV Protection Group type. -// -// swagger:model HyperVProtectionGroupType -type HyperVProtectionGroupType struct { - - // Specifies HyperV Protection Group type. - // Enum: ["kAuto","kRCT","kVSS"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this hyper v protection group type -func (m *HyperVProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hyperVProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAuto","kRCT","kVSS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hyperVProtectionGroupTypeTypeEnvironmentPropEnum = append(hyperVProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // HyperVProtectionGroupTypeEnvironmentKAuto captures enum value "kAuto" - HyperVProtectionGroupTypeEnvironmentKAuto string = "kAuto" - - // HyperVProtectionGroupTypeEnvironmentKRCT captures enum value "kRCT" - HyperVProtectionGroupTypeEnvironmentKRCT string = "kRCT" - - // HyperVProtectionGroupTypeEnvironmentKVSS captures enum value "kVSS" - HyperVProtectionGroupTypeEnvironmentKVSS string = "kVSS" -) - -// prop value enum -func (m *HyperVProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hyperVProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HyperVProtectionGroupType) 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 validates this hyper v protection group type based on context it is used -func (m *HyperVProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVProtectionGroupType) UnmarshalBinary(b []byte) error { - var res HyperVProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_recover_files_new_target_config.go b/v2/models/hyper_v_recover_files_new_target_config.go deleted file mode 100644 index 1707afdd..00000000 --- a/v2/models/hyper_v_recover_files_new_target_config.go +++ /dev/null @@ -1,176 +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" -) - -// HyperVRecoverFilesNewTargetConfig HyperV Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to a new target. -// -// swagger:model HyperVRecoverFilesNewTargetConfig -type HyperVRecoverFilesNewTargetConfig struct { - - // Specifies the path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. - // Required: true - TargetVMCredentials *Credentials `json:"targetVmCredentials"` -} - -// Validate validates this hyper v recover files new target config -func (m *HyperVRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *HyperVRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *HyperVRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - - if err := validate.Required("targetVmCredentials", "body", m.TargetVMCredentials); err != nil { - return err - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v recover files new target config based on the context it is used -func (m *HyperVRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *HyperVRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res HyperVRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_recover_files_original_target_config.go b/v2/models/hyper_v_recover_files_original_target_config.go deleted file mode 100644 index 09329257..00000000 --- a/v2/models/hyper_v_recover_files_original_target_config.go +++ /dev/null @@ -1,130 +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" -) - -// HyperVRecoverFilesOriginalTargetConfig HyperV Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model HyperVRecoverFilesOriginalTargetConfig -type HyperVRecoverFilesOriginalTargetConfig struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. - // Required: true - TargetVMCredentials *Credentials `json:"targetVmCredentials"` -} - -// Validate validates this hyper v recover files original target config -func (m *HyperVRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *HyperVRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - - if err := validate.Required("targetVmCredentials", "body", m.TargetVMCredentials); err != nil { - return err - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v recover files original target config based on the context it is used -func (m *HyperVRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res HyperVRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_source_registration_params.go b/v2/models/hyper_v_source_registration_params.go deleted file mode 100644 index 237f5378..00000000 --- a/v2/models/hyper_v_source_registration_params.go +++ /dev/null @@ -1,268 +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" -) - -// HyperVSourceRegistrationParams Specifies the paramaters to register a HyperV source. -// -// swagger:model HyperVSourceRegistrationParams -type HyperVSourceRegistrationParams struct { - - // Specifies the HyperV Source type. - // Required: true - // Enum: ["kSCVMMServer","kStandaloneHost","kStandaloneCluster"] - Type *string `json:"type"` - - // Specifies the parameters to register a HyperV SCVMM. - ScvmmParams *ScvmmRegistrationParams `json:"scvmmParams,omitempty"` - - // Specifies the parameters to register a standalone HyperV host. - StandaloneHostParams *StandaloneHostRegistrationParams `json:"standaloneHostParams,omitempty"` - - // Specifies the parameters to register a failover cluster. - StandaloneClusterParams *StandaloneClusterRegistrationParams `json:"standaloneClusterParams,omitempty"` -} - -// Validate validates this hyper v source registration params -func (m *HyperVSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScvmmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneHostParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneClusterParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hyperVSourceRegistrationParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSCVMMServer","kStandaloneHost","kStandaloneCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hyperVSourceRegistrationParamsTypeTypePropEnum = append(hyperVSourceRegistrationParamsTypeTypePropEnum, v) - } -} - -const ( - - // HyperVSourceRegistrationParamsTypeKSCVMMServer captures enum value "kSCVMMServer" - HyperVSourceRegistrationParamsTypeKSCVMMServer string = "kSCVMMServer" - - // HyperVSourceRegistrationParamsTypeKStandaloneHost captures enum value "kStandaloneHost" - HyperVSourceRegistrationParamsTypeKStandaloneHost string = "kStandaloneHost" - - // HyperVSourceRegistrationParamsTypeKStandaloneCluster captures enum value "kStandaloneCluster" - HyperVSourceRegistrationParamsTypeKStandaloneCluster string = "kStandaloneCluster" -) - -// prop value enum -func (m *HyperVSourceRegistrationParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hyperVSourceRegistrationParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HyperVSourceRegistrationParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *HyperVSourceRegistrationParams) validateScvmmParams(formats strfmt.Registry) error { - if swag.IsZero(m.ScvmmParams) { // not required - return nil - } - - if m.ScvmmParams != nil { - if err := m.ScvmmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scvmmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scvmmParams") - } - return err - } - } - - return nil -} - -func (m *HyperVSourceRegistrationParams) validateStandaloneHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if m.StandaloneHostParams != nil { - if err := m.StandaloneHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *HyperVSourceRegistrationParams) validateStandaloneClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneClusterParams) { // not required - return nil - } - - if m.StandaloneClusterParams != nil { - if err := m.StandaloneClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneClusterParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v source registration params based on the context it is used -func (m *HyperVSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScvmmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVSourceRegistrationParams) contextValidateScvmmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ScvmmParams != nil { - - if swag.IsZero(m.ScvmmParams) { // not required - return nil - } - - if err := m.ScvmmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scvmmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scvmmParams") - } - return err - } - } - - return nil -} - -func (m *HyperVSourceRegistrationParams) contextValidateStandaloneHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneHostParams != nil { - - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if err := m.StandaloneHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *HyperVSourceRegistrationParams) contextValidateStandaloneClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneClusterParams != nil { - - if swag.IsZero(m.StandaloneClusterParams) { // not required - return nil - } - - if err := m.StandaloneClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneClusterParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res HyperVSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_target_params_for_mount_volume.go b/v2/models/hyper_v_target_params_for_mount_volume.go deleted file mode 100644 index 2e1030fd..00000000 --- a/v2/models/hyper_v_target_params_for_mount_volume.go +++ /dev/null @@ -1,305 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HyperVTargetParamsForMountVolume HyperV Target Params. -// -// Specifies the parameters for a HyperV recovery target. -// -// swagger:model HyperVTargetParamsForMountVolume -type HyperVTargetParamsForMountVolume struct { - - // Specifies whether to mount to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - MountToOriginalTarget *bool `json:"mountToOriginalTarget"` - - // Specifies whether to perform a read-only mount. Default is false. - ReadOnlyMount *bool `json:"readOnlyMount,omitempty"` - - // Specifies the names of volumes that need to be mounted. If this is not specified then all volumes that are part of the source VM will be mounted on the target VM. - VolumeNames []string `json:"volumeNames"` - - // Specifies the mapping of original volumes and mounted volumes - // Read Only: true - MountedVolumeMapping []*MountedVolumeMapping `json:"mountedVolumeMapping"` - - // Specifies the configuration for mounting to a new target. - NewTargetConfig *HyperVMountVolumesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for mounting to the original target. - OriginalTargetConfig *HyperVMountVolumesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this hyper v target params for mount volume -func (m *HyperVTargetParamsForMountVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountedVolumeMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForMountVolume) validateMountToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountToOriginalTarget", "body", m.MountToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) validateMountedVolumeMapping(formats strfmt.Registry) error { - if swag.IsZero(m.MountedVolumeMapping) { // not required - return nil - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - continue - } - - if m.MountedVolumeMapping[i] != nil { - if err := m.MountedVolumeMapping[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v target params for mount volume based on the context it is used -func (m *HyperVTargetParamsForMountVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountedVolumeMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForMountVolume) contextValidateMountedVolumeMapping(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "mountedVolumeMapping", "body", []*MountedVolumeMapping(m.MountedVolumeMapping)); err != nil { - return err - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - - if m.MountedVolumeMapping[i] != nil { - - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - return nil - } - - if err := m.MountedVolumeMapping[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForMountVolume) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVTargetParamsForMountVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVTargetParamsForMountVolume) UnmarshalBinary(b []byte) error { - var res HyperVTargetParamsForMountVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_target_params_for_recover_file_and_folder.go b/v2/models/hyper_v_target_params_for_recover_file_and_folder.go deleted file mode 100644 index cc04d630..00000000 --- a/v2/models/hyper_v_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// HyperVTargetParamsForRecoverFileAndFolder HyperV Target Params for Recover File And Folder -// -// Specifies the parameters for a HyperV recovery target. -// -// swagger:model HyperVTargetParamsForRecoverFileAndFolder -type HyperVTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to override the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of files or folders failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *HyperVRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *HyperVRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this hyper v target params for recover file and folder -func (m *HyperVTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v target params for recover file and folder based on the context it is used -func (m *HyperVTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res HyperVTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_target_params_for_recover_vm.go b/v2/models/hyper_v_target_params_for_recover_vm.go deleted file mode 100644 index 093f2546..00000000 --- a/v2/models/hyper_v_target_params_for_recover_vm.go +++ /dev/null @@ -1,231 +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" -) - -// HyperVTargetParamsForRecoverVM HyperV Target Params. -// -// Specifies the parameters for a HyperV recovery target. -// -// swagger:model HyperVTargetParamsForRecoverVm -type HyperVTargetParamsForRecoverVM struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to perform an instant recovery. By instant recovery, the recovered VM is available before files are completely copied to the recovered VM. Default is true. - InstantRecovery *bool `json:"instantRecovery,omitempty"` - - // Specifies whether to recover excluded disk while performing recovery of a VM by creating empty disks for them. Default value is false. - RecoverExcludedDisk *bool `json:"recoverExcludedDisk,omitempty"` - - // Specifies if the HyperV recovery is using the SMB service to perform the restore. On-prem, this is the case by default. However, as of today, DMaaS does not support SMB, and HyperV VM VM restores will employ an alternative restore method in this case. - UseSmbService *bool `json:"useSmbService,omitempty"` - - // Specifies whether to preserve uuids of recovered VMs. Default is false. - PreserveUuids *bool `json:"preserveUuids,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *HyperVVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this hyper v target params for recover Vm -func (m *HyperVTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v target params for recover Vm based on the context it is used -func (m *HyperVTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *HyperVTargetParamsForRecoverVM) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res HyperVTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyper_v_vm_recovery_target_config.go b/v2/models/hyper_v_vm_recovery_target_config.go deleted file mode 100644 index cb825148..00000000 --- a/v2/models/hyper_v_vm_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// HyperVVMRecoveryTargetConfig HyperV VMs Recovery Target Config. -// -// Specifies the target object parameters to recover HyperV vms. -// -// swagger:model HyperVVmRecoveryTargetConfig -type HyperVVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverHyperVVMNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverHyperVVMOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this hyper v Vm recovery target config -func (m *HyperVVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *HyperVVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVVMRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this hyper v Vm recovery target config based on the context it is used -func (m *HyperVVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HyperVVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *HyperVVMRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HyperVVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HyperVVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res HyperVVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/hyperv_snapshot_params.go b/v2/models/hyperv_snapshot_params.go deleted file mode 100644 index 15ae1759..00000000 --- a/v2/models/hyperv_snapshot_params.go +++ /dev/null @@ -1,108 +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" -) - -// HypervSnapshotParams Specifies parameters of HyperV type snapshots. -// -// swagger:model HypervSnapshotParams -type HypervSnapshotParams struct { - - // Specifies the protection type of HyperV snapshots. - // Enum: ["kAuto","kRCT","kVSS"] - ProtectionType *string `json:"protectionType,omitempty"` -} - -// Validate validates this hyperv snapshot params -func (m *HypervSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hypervSnapshotParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAuto","kRCT","kVSS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hypervSnapshotParamsTypeProtectionTypePropEnum = append(hypervSnapshotParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // HypervSnapshotParamsProtectionTypeKAuto captures enum value "kAuto" - HypervSnapshotParamsProtectionTypeKAuto string = "kAuto" - - // HypervSnapshotParamsProtectionTypeKRCT captures enum value "kRCT" - HypervSnapshotParamsProtectionTypeKRCT string = "kRCT" - - // HypervSnapshotParamsProtectionTypeKVSS captures enum value "kVSS" - HypervSnapshotParamsProtectionTypeKVSS string = "kVSS" -) - -// prop value enum -func (m *HypervSnapshotParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hypervSnapshotParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HypervSnapshotParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this hyperv snapshot params based on context it is used -func (m *HypervSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HypervSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HypervSnapshotParams) UnmarshalBinary(b []byte) error { - var res HypervSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/i_c_a_p_uri_status.go b/v2/models/i_c_a_p_uri_status.go deleted file mode 100644 index a9e0c6a2..00000000 --- a/v2/models/i_c_a_p_uri_status.go +++ /dev/null @@ -1,105 +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" -) - -// ICAPURIStatus Specifies the ICAP Uri connection status. -// -// swagger:model ICAPUriStatus -type ICAPURIStatus struct { - - // Specifies the ICAP Uri connection status. - // Enum: ["Succeeded","Failed"] - Type string `json:"type,omitempty"` -} - -// Validate validates this i c a p Uri status -func (m *ICAPURIStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var iCAPUriStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - iCAPUriStatusTypeTypePropEnum = append(iCAPUriStatusTypeTypePropEnum, v) - } -} - -const ( - - // ICAPURIStatusTypeSucceeded captures enum value "Succeeded" - ICAPURIStatusTypeSucceeded string = "Succeeded" - - // ICAPURIStatusTypeFailed captures enum value "Failed" - ICAPURIStatusTypeFailed string = "Failed" -) - -// prop value enum -func (m *ICAPURIStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, iCAPUriStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ICAPURIStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this i c a p Uri status based on context it is used -func (m *ICAPURIStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ICAPURIStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ICAPURIStatus) UnmarshalBinary(b []byte) error { - var res ICAPURIStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/iam_role_aws_credentials.go b/v2/models/iam_role_aws_credentials.go deleted file mode 100644 index ae6014a0..00000000 --- a/v2/models/iam_role_aws_credentials.go +++ /dev/null @@ -1,76 +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" -) - -// IamRoleAwsCredentials AWS IAM Role credentials request parameters. -// -// # Specifies the credentials to register a commercial AWS -// -// swagger:model IamRoleAwsCredentials -type IamRoleAwsCredentials struct { - - // Specifies the IAM role which will be used to access the security credentials required for API calls. This should have all the permissions required for the tenant's use case. In case of DMaaS this will be the Tenant's IAM role ARN. This is assumed only after the cp_iam_role_arn(control plane role) is assumed - // Required: true - IamRoleArn *string `json:"iamRoleArn"` - - // This is only applicable in case of DMaaS. Control plane IAM role ARN, this is first assumed by the dataplane(cluster). Then we assume the iam_role_arn which is tenant's IAM role with all required permissions. - CpIamRoleArn *string `json:"cpIamRoleArn,omitempty"` -} - -// Validate validates this iam role aws credentials -func (m *IamRoleAwsCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIamRoleArn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IamRoleAwsCredentials) validateIamRoleArn(formats strfmt.Registry) error { - - if err := validate.Required("iamRoleArn", "body", m.IamRoleArn); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this iam role aws credentials based on context it is used -func (m *IamRoleAwsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IamRoleAwsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IamRoleAwsCredentials) UnmarshalBinary(b []byte) error { - var res IamRoleAwsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/iam_user_aws_credentials.go b/v2/models/iam_user_aws_credentials.go deleted file mode 100644 index 5b5a1c01..00000000 --- a/v2/models/iam_user_aws_credentials.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" - "github.com/go-openapi/validate" -) - -// IamUserAwsCredentials AWS IAM User credentials request parameters. -// -// # Specifies the credentials to register a commercial AWS -// -// swagger:model IamUserAwsCredentials -type IamUserAwsCredentials struct { - - // Specifies Access key of the AWS account. - // Required: true - AccessKey *string `json:"accessKey"` - - // Specifies Secret Access key of the AWS account. - // Required: true - SecretAccessKey *string `json:"secretAccessKey"` - - // Specifies Amazon Resource Name (owner ID) of the IAM user, acts as an unique identifier of as AWS entity. - // Required: true - Arn *string `json:"arn"` -} - -// Validate validates this iam user aws credentials -func (m *IamUserAwsCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecretAccessKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IamUserAwsCredentials) validateAccessKey(formats strfmt.Registry) error { - - if err := validate.Required("accessKey", "body", m.AccessKey); err != nil { - return err - } - - return nil -} - -func (m *IamUserAwsCredentials) validateSecretAccessKey(formats strfmt.Registry) error { - - if err := validate.Required("secretAccessKey", "body", m.SecretAccessKey); err != nil { - return err - } - - return nil -} - -func (m *IamUserAwsCredentials) validateArn(formats strfmt.Registry) error { - - if err := validate.Required("arn", "body", m.Arn); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this iam user aws credentials based on context it is used -func (m *IamUserAwsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IamUserAwsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IamUserAwsCredentials) UnmarshalBinary(b []byte) error { - var res IamUserAwsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ibm_flash_system_protection_group_object_params.go b/v2/models/ibm_flash_system_protection_group_object_params.go deleted file mode 100644 index 4c797f48..00000000 --- a/v2/models/ibm_flash_system_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// IbmFlashSystemProtectionGroupObjectParams IBM FlashSystem Protection Group Object Params. -// -// Specifies the object parameters to create IBM FlashSystem Protection Group. -// -// swagger:model IbmFlashSystemProtectionGroupObjectParams -type IbmFlashSystemProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this ibm flash system protection group object params -func (m *IbmFlashSystemProtectionGroupObjectParams) 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 *IbmFlashSystemProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this ibm flash system protection group object params based on the context it is used -func (m *IbmFlashSystemProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IbmFlashSystemProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IbmFlashSystemProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IbmFlashSystemProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res IbmFlashSystemProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ibm_flash_system_protection_group_params.go b/v2/models/ibm_flash_system_protection_group_params.go deleted file mode 100644 index d6951fe3..00000000 --- a/v2/models/ibm_flash_system_protection_group_params.go +++ /dev/null @@ -1,224 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IbmFlashSystemProtectionGroupParams Specifies the parameters which are specific to IBM Flash System related Protection Groups. -// -// swagger:model IbmFlashSystemProtectionGroupParams -type IbmFlashSystemProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*IbmFlashSystemProtectionGroupObjectParams `json:"objects"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies whether the safeguarded copy snapshots are allowed or not - IsSafeGuardedCopySnapshot *bool `json:"isSafeGuardedCopySnapshot,omitempty"` -} - -// Validate validates this ibm flash system protection group params -func (m *IbmFlashSystemProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ibm flash system protection group params based on the context it is used -func (m *IbmFlashSystemProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *IbmFlashSystemProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IbmFlashSystemProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IbmFlashSystemProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res IbmFlashSystemProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/icap_uri_connection_status.go b/v2/models/icap_uri_connection_status.go deleted file mode 100644 index 7da9c5c4..00000000 --- a/v2/models/icap_uri_connection_status.go +++ /dev/null @@ -1,108 +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" -) - -// IcapURIConnectionStatus Specifies the ICAP Uri connection status. -// -// swagger:model IcapUriConnectionStatus -type IcapURIConnectionStatus struct { - - // Specifies the ICAP Uri. - IcapURI *string `json:"icapUri,omitempty"` - - // Specifies the connection status. - // Enum: ["Succeeded","Failed"] - ConnectionStatus *string `json:"connectionStatus,omitempty"` -} - -// Validate validates this icap Uri connection status -func (m *IcapURIConnectionStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var icapUriConnectionStatusTypeConnectionStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Succeeded","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - icapUriConnectionStatusTypeConnectionStatusPropEnum = append(icapUriConnectionStatusTypeConnectionStatusPropEnum, v) - } -} - -const ( - - // IcapURIConnectionStatusConnectionStatusSucceeded captures enum value "Succeeded" - IcapURIConnectionStatusConnectionStatusSucceeded string = "Succeeded" - - // IcapURIConnectionStatusConnectionStatusFailed captures enum value "Failed" - IcapURIConnectionStatusConnectionStatusFailed string = "Failed" -) - -// prop value enum -func (m *IcapURIConnectionStatus) validateConnectionStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, icapUriConnectionStatusTypeConnectionStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IcapURIConnectionStatus) validateConnectionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - // value enum - if err := m.validateConnectionStatusEnum("connectionStatus", "body", *m.ConnectionStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this icap Uri connection status based on context it is used -func (m *IcapURIConnectionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IcapURIConnectionStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IcapURIConnectionStatus) UnmarshalBinary(b []byte) error { - var res IcapURIConnectionStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/icap_uri_connection_status_list.go b/v2/models/icap_uri_connection_status_list.go deleted file mode 100644 index 44ab3b0e..00000000 --- a/v2/models/icap_uri_connection_status_list.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IcapURIConnectionStatusList Specifies a list of ICAP Uri connection status. -// -// swagger:model IcapUriConnectionStatusList -type IcapURIConnectionStatusList struct { - - // Specifies the list of ICAP Uri connection status. - IcapURIConnectionStatusList []*IcapURIConnectionStatus `json:"icapUriConnectionStatusList"` -} - -// Validate validates this icap Uri connection status list -func (m *IcapURIConnectionStatusList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIcapURIConnectionStatusList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IcapURIConnectionStatusList) validateIcapURIConnectionStatusList(formats strfmt.Registry) error { - if swag.IsZero(m.IcapURIConnectionStatusList) { // not required - return nil - } - - for i := 0; i < len(m.IcapURIConnectionStatusList); i++ { - if swag.IsZero(m.IcapURIConnectionStatusList[i]) { // not required - continue - } - - if m.IcapURIConnectionStatusList[i] != nil { - if err := m.IcapURIConnectionStatusList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("icapUriConnectionStatusList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("icapUriConnectionStatusList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this icap Uri connection status list based on the context it is used -func (m *IcapURIConnectionStatusList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIcapURIConnectionStatusList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IcapURIConnectionStatusList) contextValidateIcapURIConnectionStatusList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IcapURIConnectionStatusList); i++ { - - if m.IcapURIConnectionStatusList[i] != nil { - - if swag.IsZero(m.IcapURIConnectionStatusList[i]) { // not required - return nil - } - - if err := m.IcapURIConnectionStatusList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("icapUriConnectionStatusList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("icapUriConnectionStatusList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IcapURIConnectionStatusList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IcapURIConnectionStatusList) UnmarshalBinary(b []byte) error { - var res IcapURIConnectionStatusList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/id_mapping_params.go b/v2/models/id_mapping_params.go deleted file mode 100644 index ddcfec2c..00000000 --- a/v2/models/id_mapping_params.go +++ /dev/null @@ -1,125 +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" -) - -// IDMappingParams Specifies the params of the user id mapping info of an Active Directory. -// -// swagger:model IdMappingParams -type IDMappingParams struct { - - // Specifies the sid of an Active Directory domain user mapping to unix root user. - // Required: true - SidMappedToUnixRootUser *string `json:"sidMappedToUnixRootUser"` - - // Specifies the information about how the Unix and Windows users are mapped for this domain. - // Required: true - UserIDMappingParams *UserIDMappingParams `json:"userIdMappingParams"` -} - -// Validate validates this Id mapping params -func (m *IDMappingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSidMappedToUnixRootUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserIDMappingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IDMappingParams) validateSidMappedToUnixRootUser(formats strfmt.Registry) error { - - if err := validate.Required("sidMappedToUnixRootUser", "body", m.SidMappedToUnixRootUser); err != nil { - return err - } - - return nil -} - -func (m *IDMappingParams) validateUserIDMappingParams(formats strfmt.Registry) error { - - if err := validate.Required("userIdMappingParams", "body", m.UserIDMappingParams); err != nil { - return err - } - - if m.UserIDMappingParams != nil { - if err := m.UserIDMappingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this Id mapping params based on the context it is used -func (m *IDMappingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserIDMappingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IDMappingParams) contextValidateUserIDMappingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UserIDMappingParams != nil { - - if err := m.UserIDMappingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIdMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIdMappingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IDMappingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IDMappingParams) UnmarshalBinary(b []byte) error { - var res IDMappingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/identity_action.go b/v2/models/identity_action.go deleted file mode 100644 index 69766525..00000000 --- a/v2/models/identity_action.go +++ /dev/null @@ -1,214 +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" -) - -// IdentityAction Identity Action -// -// swagger:model IdentityAction -type IdentityAction struct { - - // Specifies the type of identity provider the action will be performed on. - // Required: true - // Enum: ["OpenIdConnect","OAuth2"] - IdentityProviderType *string `json:"identityProviderType"` - - // open Id connect params - OpenIDConnectParams *OpenIDConnectAction `json:"openIdConnectParams,omitempty"` - - // o auth2 params - OAuth2Params *OAuth2Action `json:"oAuth2Params,omitempty"` -} - -// Validate validates this identity action -func (m *IdentityAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIdentityProviderType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOpenIDConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOAuth2Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var identityActionTypeIdentityProviderTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OpenIdConnect","OAuth2"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - identityActionTypeIdentityProviderTypePropEnum = append(identityActionTypeIdentityProviderTypePropEnum, v) - } -} - -const ( - - // IdentityActionIdentityProviderTypeOpenIDConnect captures enum value "OpenIdConnect" - IdentityActionIdentityProviderTypeOpenIDConnect string = "OpenIdConnect" - - // IdentityActionIdentityProviderTypeOAuth2 captures enum value "OAuth2" - IdentityActionIdentityProviderTypeOAuth2 string = "OAuth2" -) - -// prop value enum -func (m *IdentityAction) validateIdentityProviderTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, identityActionTypeIdentityProviderTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IdentityAction) validateIdentityProviderType(formats strfmt.Registry) error { - - if err := validate.Required("identityProviderType", "body", m.IdentityProviderType); err != nil { - return err - } - - // value enum - if err := m.validateIdentityProviderTypeEnum("identityProviderType", "body", *m.IdentityProviderType); err != nil { - return err - } - - return nil -} - -func (m *IdentityAction) validateOpenIDConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.OpenIDConnectParams) { // not required - return nil - } - - if m.OpenIDConnectParams != nil { - if err := m.OpenIDConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("openIdConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("openIdConnectParams") - } - return err - } - } - - return nil -} - -func (m *IdentityAction) validateOAuth2Params(formats strfmt.Registry) error { - if swag.IsZero(m.OAuth2Params) { // not required - return nil - } - - if m.OAuth2Params != nil { - if err := m.OAuth2Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oAuth2Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oAuth2Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this identity action based on the context it is used -func (m *IdentityAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenIDConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOAuth2Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityAction) contextValidateOpenIDConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenIDConnectParams != nil { - - if swag.IsZero(m.OpenIDConnectParams) { // not required - return nil - } - - if err := m.OpenIDConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("openIdConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("openIdConnectParams") - } - return err - } - } - - return nil -} - -func (m *IdentityAction) contextValidateOAuth2Params(ctx context.Context, formats strfmt.Registry) error { - - if m.OAuth2Params != nil { - - if swag.IsZero(m.OAuth2Params) { // not required - return nil - } - - if err := m.OAuth2Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oAuth2Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oAuth2Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IdentityAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentityAction) UnmarshalBinary(b []byte) error { - var res IdentityAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/identity_config.go b/v2/models/identity_config.go deleted file mode 100644 index 89f6ebe9..00000000 --- a/v2/models/identity_config.go +++ /dev/null @@ -1,257 +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" -) - -// IdentityConfig Identity Provider Configuration -// -// swagger:model IdentityConfig -type IdentityConfig struct { - - // Specifies the ID of the IDP. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies domain of idp configuration - // Required: true - Domain *string `json:"domain"` - - // Specifies the tenant id if the idp is configured for a tenant. If this is not set, this idp configuration is used for the cluster level users and for all users of tenants not having an idp configuration. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies a flag to enable or disable this idp service. When it is set to true, idp service is enabled. When it is set to false, idp service is disabled. By defaut idp is enabled i.e the value is true. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Specifies the last time this configuration was modified in microseconds since the epoch. This is may be specified for PUT operations to prevent stale requests from being written. If it is specified during a PUT operation then the request will be rejected if the specified time does not match the actual last modified time. - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - // Specifies the type of identity provider. - // Required: true - // Enum: ["OpenIdConnect","OAuth2"] - IdentityProviderType *string `json:"identityProviderType"` - - // open Id connect params - OpenIDConnectParams *OpenIDProvider `json:"openIdConnectParams,omitempty"` - - // o auth2 params - OAuth2Params *OAuth2Provider `json:"oAuth2Params,omitempty"` -} - -// Validate validates this identity config -func (m *IdentityConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIdentityProviderType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOpenIDConnectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOAuth2Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityConfig) validateDomain(formats strfmt.Registry) error { - - if err := validate.Required("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -var identityConfigTypeIdentityProviderTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OpenIdConnect","OAuth2"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - identityConfigTypeIdentityProviderTypePropEnum = append(identityConfigTypeIdentityProviderTypePropEnum, v) - } -} - -const ( - - // IdentityConfigIdentityProviderTypeOpenIDConnect captures enum value "OpenIdConnect" - IdentityConfigIdentityProviderTypeOpenIDConnect string = "OpenIdConnect" - - // IdentityConfigIdentityProviderTypeOAuth2 captures enum value "OAuth2" - IdentityConfigIdentityProviderTypeOAuth2 string = "OAuth2" -) - -// prop value enum -func (m *IdentityConfig) validateIdentityProviderTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, identityConfigTypeIdentityProviderTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IdentityConfig) validateIdentityProviderType(formats strfmt.Registry) error { - - if err := validate.Required("identityProviderType", "body", m.IdentityProviderType); err != nil { - return err - } - - // value enum - if err := m.validateIdentityProviderTypeEnum("identityProviderType", "body", *m.IdentityProviderType); err != nil { - return err - } - - return nil -} - -func (m *IdentityConfig) validateOpenIDConnectParams(formats strfmt.Registry) error { - if swag.IsZero(m.OpenIDConnectParams) { // not required - return nil - } - - if m.OpenIDConnectParams != nil { - if err := m.OpenIDConnectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("openIdConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("openIdConnectParams") - } - return err - } - } - - return nil -} - -func (m *IdentityConfig) validateOAuth2Params(formats strfmt.Registry) error { - if swag.IsZero(m.OAuth2Params) { // not required - return nil - } - - if m.OAuth2Params != nil { - if err := m.OAuth2Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oAuth2Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oAuth2Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this identity config based on the context it is used -func (m *IdentityConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOpenIDConnectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOAuth2Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityConfig) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *IdentityConfig) contextValidateOpenIDConnectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenIDConnectParams != nil { - - if swag.IsZero(m.OpenIDConnectParams) { // not required - return nil - } - - if err := m.OpenIDConnectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("openIdConnectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("openIdConnectParams") - } - return err - } - } - - return nil -} - -func (m *IdentityConfig) contextValidateOAuth2Params(ctx context.Context, formats strfmt.Registry) error { - - if m.OAuth2Params != nil { - - if swag.IsZero(m.OAuth2Params) { // not required - return nil - } - - if err := m.OAuth2Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oAuth2Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oAuth2Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IdentityConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentityConfig) UnmarshalBinary(b []byte) error { - var res IdentityConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/identity_configs.go b/v2/models/identity_configs.go deleted file mode 100644 index 198283b9..00000000 --- a/v2/models/identity_configs.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IdentityConfigs Identity Provider Configurations -// -// swagger:model IdentityConfigs -type IdentityConfigs struct { - - // Specifies a list of Identity Providers. - Idps []*IdentityConfig `json:"idps"` -} - -// Validate validates this identity configs -func (m *IdentityConfigs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIdps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityConfigs) validateIdps(formats strfmt.Registry) error { - if swag.IsZero(m.Idps) { // not required - return nil - } - - for i := 0; i < len(m.Idps); i++ { - if swag.IsZero(m.Idps[i]) { // not required - continue - } - - if m.Idps[i] != nil { - if err := m.Idps[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this identity configs based on the context it is used -func (m *IdentityConfigs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIdps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityConfigs) contextValidateIdps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Idps); i++ { - - if m.Idps[i] != nil { - - if swag.IsZero(m.Idps[i]) { // not required - return nil - } - - if err := m.Idps[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IdentityConfigs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentityConfigs) UnmarshalBinary(b []byte) error { - var res IdentityConfigs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/identity_provider_configuration.go b/v2/models/identity_provider_configuration.go deleted file mode 100644 index f0da43f4..00000000 --- a/v2/models/identity_provider_configuration.go +++ /dev/null @@ -1,150 +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" -) - -// IdentityProviderConfiguration Identity provider configuration -// -// swagger:model IdentityProviderConfiguration -type IdentityProviderConfiguration struct { - CommonIdentityProviderConfiguration - - // Specifies id of idp configuration - ID *int64 `json:"id,omitempty"` - - // Specifies the tenant id if the idp is configured for a tenant. If this is not set, this idp configuration is used for the cluster level users and for all users of tenants not having an idp configuration. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies name of the vendor providing idp service - Name *string `json:"name,omitempty"` - - // Specifies domain of idp configuration - Domain *string `json:"domain,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IdentityProviderConfiguration) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIdentityProviderConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIdentityProviderConfiguration = aO0 - - // AO1 - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - Name *string `json:"name,omitempty"` - - Domain *string `json:"domain,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.TenantID = dataAO1.TenantID - - m.Name = dataAO1.Name - - m.Domain = dataAO1.Domain - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IdentityProviderConfiguration) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIdentityProviderConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - Name *string `json:"name,omitempty"` - - Domain *string `json:"domain,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.TenantID = m.TenantID - - dataAO1.Name = m.Name - - dataAO1.Domain = m.Domain - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this identity provider configuration -func (m *IdentityProviderConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this identity provider configuration based on the context it is used -func (m *IdentityProviderConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *IdentityProviderConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentityProviderConfiguration) UnmarshalBinary(b []byte) error { - var res IdentityProviderConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/identity_provider_configurations.go b/v2/models/identity_provider_configurations.go deleted file mode 100644 index 88353413..00000000 --- a/v2/models/identity_provider_configurations.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IdentityProviderConfigurations Identity provider configurations -// -// swagger:model IdentityProviderConfigurations -type IdentityProviderConfigurations struct { - - // Specifies a list of identity provider configurations - Idps []*IdentityProviderConfiguration `json:"idps"` -} - -// Validate validates this identity provider configurations -func (m *IdentityProviderConfigurations) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIdps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityProviderConfigurations) validateIdps(formats strfmt.Registry) error { - if swag.IsZero(m.Idps) { // not required - return nil - } - - for i := 0; i < len(m.Idps); i++ { - if swag.IsZero(m.Idps[i]) { // not required - continue - } - - if m.Idps[i] != nil { - if err := m.Idps[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this identity provider configurations based on the context it is used -func (m *IdentityProviderConfigurations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIdps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IdentityProviderConfigurations) contextValidateIdps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Idps); i++ { - - if m.Idps[i] != nil { - - if swag.IsZero(m.Idps[i]) { // not required - return nil - } - - if err := m.Idps[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IdentityProviderConfigurations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IdentityProviderConfigurations) UnmarshalBinary(b []byte) error { - var res IdentityProviderConfigurations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/import_cert_request.go b/v2/models/import_cert_request.go deleted file mode 100644 index dcd9dd28..00000000 --- a/v2/models/import_cert_request.go +++ /dev/null @@ -1,162 +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" -) - -// ImportCertRequest Specifies the paramaters required to import external ca signed certificate -// -// swagger:model ImportCertRequest -type ImportCertRequest struct { - - // Certificate (pem) to be imported - // Required: true - CertPem *string `json:"certPem"` - - // Private key - // Required: true - PrivateKey *string `json:"privateKey"` - - // Full ca certificate chain in pem format. - // Required: true - CaChainPem []string `json:"caChainPem"` - - // Specifies the service that this certificate/key material is used. - // Enum: ["kAll","kMagneto","kClusterUI"] - ServiceType *string `json:"serviceType,omitempty"` - - // Specifies the tenant id - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this import cert request -func (m *ImportCertRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertPem(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCaChainPem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ImportCertRequest) validateCertPem(formats strfmt.Registry) error { - - if err := validate.Required("certPem", "body", m.CertPem); err != nil { - return err - } - - return nil -} - -func (m *ImportCertRequest) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *ImportCertRequest) validateCaChainPem(formats strfmt.Registry) error { - - if err := validate.Required("caChainPem", "body", m.CaChainPem); err != nil { - return err - } - - return nil -} - -var importCertRequestTypeServiceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kMagneto","kClusterUI"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - importCertRequestTypeServiceTypePropEnum = append(importCertRequestTypeServiceTypePropEnum, v) - } -} - -const ( - - // ImportCertRequestServiceTypeKAll captures enum value "kAll" - ImportCertRequestServiceTypeKAll string = "kAll" - - // ImportCertRequestServiceTypeKMagneto captures enum value "kMagneto" - ImportCertRequestServiceTypeKMagneto string = "kMagneto" - - // ImportCertRequestServiceTypeKClusterUI captures enum value "kClusterUI" - ImportCertRequestServiceTypeKClusterUI string = "kClusterUI" -) - -// prop value enum -func (m *ImportCertRequest) validateServiceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, importCertRequestTypeServiceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ImportCertRequest) validateServiceType(formats strfmt.Registry) error { - if swag.IsZero(m.ServiceType) { // not required - return nil - } - - // value enum - if err := m.validateServiceTypeEnum("serviceType", "body", *m.ServiceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this import cert request based on context it is used -func (m *ImportCertRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ImportCertRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ImportCertRequest) UnmarshalBinary(b []byte) error { - var res ImportCertRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/import_cert_response.go b/v2/models/import_cert_response.go deleted file mode 100644 index 1dec406d..00000000 --- a/v2/models/import_cert_response.go +++ /dev/null @@ -1,50 +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" -) - -// ImportCertResponse Specifies the response to import certificate request -// -// swagger:model ImportCertResponse -type ImportCertResponse struct { - - // Specifies the status of importing external ca signed certificates. - Messages []string `json:"messages,omitempty"` -} - -// Validate validates this import cert response -func (m *ImportCertResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this import cert response based on context it is used -func (m *ImportCertResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ImportCertResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ImportCertResponse) UnmarshalBinary(b []byte) error { - var res ImportCertResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/import_certificate_by_clientcsr_request.go b/v2/models/import_certificate_by_clientcsr_request.go deleted file mode 100644 index 6a90f373..00000000 --- a/v2/models/import_certificate_by_clientcsr_request.go +++ /dev/null @@ -1,88 +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" -) - -// ImportCertificateByClientcsrRequest Specifies the request to import a certificate. -// -// swagger:model ImportCertificateByClientcsrRequest -type ImportCertificateByClientcsrRequest struct { - - // Specifies the server certificate to be imported. - // Required: true - CertificateServer *string `json:"certificateServer"` - - // Specifies the client certificate to be imported. - // Required: true - CertificateClient *string `json:"certificateClient"` -} - -// Validate validates this import certificate by clientcsr request -func (m *ImportCertificateByClientcsrRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificateServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCertificateClient(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ImportCertificateByClientcsrRequest) validateCertificateServer(formats strfmt.Registry) error { - - if err := validate.Required("certificateServer", "body", m.CertificateServer); err != nil { - return err - } - - return nil -} - -func (m *ImportCertificateByClientcsrRequest) validateCertificateClient(formats strfmt.Registry) error { - - if err := validate.Required("certificateClient", "body", m.CertificateClient); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this import certificate by clientcsr request based on context it is used -func (m *ImportCertificateByClientcsrRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ImportCertificateByClientcsrRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ImportCertificateByClientcsrRequest) UnmarshalBinary(b []byte) error { - var res ImportCertificateByClientcsrRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/import_certificate_by_clientcsr_response_body.go b/v2/models/import_certificate_by_clientcsr_response_body.go deleted file mode 100644 index 1a8fc217..00000000 --- a/v2/models/import_certificate_by_clientcsr_response_body.go +++ /dev/null @@ -1,58 +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" -) - -// ImportCertificateByClientcsrResponseBody Import Certificate Response -// -// Specifies the response to import a certificate. -// -// swagger:model ImportCertificateByClientcsrResponseBody -type ImportCertificateByClientcsrResponseBody struct { - - // Specifies the server certificate. - CertificateServer *string `json:"certificateServer,omitempty"` - - // Specifies the private key of agent. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies the path to the file to be uploaded to server. This file has the server cert, id and encrypted private key - FileServerCert *string `json:"fileServerCert,omitempty"` -} - -// Validate validates this import certificate by clientcsr response body -func (m *ImportCertificateByClientcsrResponseBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this import certificate by clientcsr response body based on context it is used -func (m *ImportCertificateByClientcsrResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ImportCertificateByClientcsrResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ImportCertificateByClientcsrResponseBody) UnmarshalBinary(b []byte) error { - var res ImportCertificateByClientcsrResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/import_certificate_request.go b/v2/models/import_certificate_request.go deleted file mode 100644 index 72abcb94..00000000 --- a/v2/models/import_certificate_request.go +++ /dev/null @@ -1,116 +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" -) - -// ImportCertificateRequest Specifies the request for importing custom certificates -// -// swagger:model ImportCertificateRequest -type ImportCertificateRequest struct { - - // SSL identity file in PKCS12 format - // Format: byte - CertBundle strfmt.Base64 `json:"certBundle,omitempty"` - - // passphrase for certBundle file - Passphrase string `json:"passphrase,omitempty"` - - // Certificate chain in pem format - CertRequest *ImportCertRequest `json:"certRequest,omitempty"` -} - -// Validate validates this import certificate request -func (m *ImportCertificateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertRequest(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ImportCertificateRequest) validateCertRequest(formats strfmt.Registry) error { - if swag.IsZero(m.CertRequest) { // not required - return nil - } - - if m.CertRequest != nil { - if err := m.CertRequest.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certRequest") - } - return err - } - } - - return nil -} - -// ContextValidate validate this import certificate request based on the context it is used -func (m *ImportCertificateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertRequest(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ImportCertificateRequest) contextValidateCertRequest(ctx context.Context, formats strfmt.Registry) error { - - if m.CertRequest != nil { - - if swag.IsZero(m.CertRequest) { // not required - return nil - } - - if err := m.CertRequest.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certRequest") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ImportCertificateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ImportCertificateRequest) UnmarshalBinary(b []byte) error { - var res ImportCertificateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/incremental_backup_policy.go b/v2/models/incremental_backup_policy.go deleted file mode 100644 index 487e783b..00000000 --- a/v2/models/incremental_backup_policy.go +++ /dev/null @@ -1,110 +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" -) - -// IncrementalBackupPolicy Incremental Backup Schedule and Retention. -// -// Specifies incremental backup settings for a Protection Group. -// -// swagger:model IncrementalBackupPolicy -type IncrementalBackupPolicy struct { - - // Specifies the schedule settings for incremental backup. - // Required: true - Schedule *IncrementalSchedule `json:"schedule"` -} - -// Validate validates this incremental backup policy -func (m *IncrementalBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IncrementalBackupPolicy) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this incremental backup policy based on the context it is used -func (m *IncrementalBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IncrementalBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IncrementalBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IncrementalBackupPolicy) UnmarshalBinary(b []byte) error { - var res IncrementalBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/incremental_schedule.go b/v2/models/incremental_schedule.go deleted file mode 100644 index 5bb670dd..00000000 --- a/v2/models/incremental_schedule.go +++ /dev/null @@ -1,432 +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" -) - -// IncrementalSchedule Run Schedule -// -// Specifies settings that defines how frequent backup will be performed for a Protection Group. -// -// swagger:model IncrementalSchedule -type IncrementalSchedule struct { - - // Specifies how often to start new runs of a Protection Group.
'Minutes' specifies that Protection Group run starts periodically after certain number of minutes specified in 'frequency' field.
'Hours' specifies that Protection Group run starts periodically after certain number of hours specified in 'frequency' field.
'Days' specifies that Protection Group run starts periodically after certain number of days specified in 'frequency' field.
'Week' specifies that new Protection Group runs start weekly on certain days specified using 'dayOfWeek' field.
'Month' specifies that new Protection Group runs start monthly on certain day of specific week. This schedule needs 'weekOfMonth' and 'dayOfWeek' fields to be set.
Example: To run the Protection Group on Second Sunday of Every Month, following schedule need to be set:
unit: 'Month'
dayOfWeek: 'Sunday'
weekOfMonth: 'Second' - // Required: true - // Enum: ["Minutes","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of minutes. - MinuteSchedule *MinuteSchedule `json:"minuteSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of hours. - HourSchedule *HourSchedule `json:"hourSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *DaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *WeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *MonthSchedule `json:"monthSchedule,omitempty"` - - // Specifies the year Schedule for Protection Group to start runs on specific day of that year. - YearSchedule *YearSchedule `json:"yearSchedule,omitempty"` -} - -// Validate validates this incremental schedule -func (m *IncrementalSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinuteSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHourSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYearSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var incrementalScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - incrementalScheduleTypeUnitPropEnum = append(incrementalScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // IncrementalScheduleUnitMinutes captures enum value "Minutes" - IncrementalScheduleUnitMinutes string = "Minutes" - - // IncrementalScheduleUnitHours captures enum value "Hours" - IncrementalScheduleUnitHours string = "Hours" - - // IncrementalScheduleUnitDays captures enum value "Days" - IncrementalScheduleUnitDays string = "Days" - - // IncrementalScheduleUnitWeeks captures enum value "Weeks" - IncrementalScheduleUnitWeeks string = "Weeks" - - // IncrementalScheduleUnitMonths captures enum value "Months" - IncrementalScheduleUnitMonths string = "Months" - - // IncrementalScheduleUnitYears captures enum value "Years" - IncrementalScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *IncrementalSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, incrementalScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IncrementalSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *IncrementalSchedule) validateMinuteSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if m.MinuteSchedule != nil { - if err := m.MinuteSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) validateHourSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if m.HourSchedule != nil { - if err := m.HourSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) validateYearSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if m.YearSchedule != nil { - if err := m.YearSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this incremental schedule based on the context it is used -func (m *IncrementalSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMinuteSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHourSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateYearSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IncrementalSchedule) contextValidateMinuteSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MinuteSchedule != nil { - - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if err := m.MinuteSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) contextValidateHourSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.HourSchedule != nil { - - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if err := m.HourSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *IncrementalSchedule) contextValidateYearSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.YearSchedule != nil { - - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if err := m.YearSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IncrementalSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IncrementalSchedule) UnmarshalBinary(b []byte) error { - var res IncrementalSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_cassandra_type.go b/v2/models/indexed_cassandra_type.go deleted file mode 100644 index 9a58ea14..00000000 --- a/v2/models/indexed_cassandra_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IndexedCassandraType Cassandra object Types for search. -// -// Cassandra object Types for search. -// -// swagger:model IndexedCassandraType -type IndexedCassandraType struct { - - // Specifies the Cassandra object Types for search. - // Enum: ["CassandraKeyspaces","CassandraTables"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed cassandra type -func (m *IndexedCassandraType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedCassandraTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CassandraKeyspaces","CassandraTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedCassandraTypeTypeTypePropEnum = append(indexedCassandraTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedCassandraTypeTypeCassandraKeyspaces captures enum value "CassandraKeyspaces" - IndexedCassandraTypeTypeCassandraKeyspaces string = "CassandraKeyspaces" - - // IndexedCassandraTypeTypeCassandraTables captures enum value "CassandraTables" - IndexedCassandraTypeTypeCassandraTables string = "CassandraTables" -) - -// prop value enum -func (m *IndexedCassandraType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedCassandraTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedCassandraType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed cassandra type based on context it is used -func (m *IndexedCassandraType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedCassandraType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedCassandraType) UnmarshalBinary(b []byte) error { - var res IndexedCassandraType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_couchbase_type.go b/v2/models/indexed_couchbase_type.go deleted file mode 100644 index d51e2418..00000000 --- a/v2/models/indexed_couchbase_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IndexedCouchbaseType Couchbase object Types for search. -// -// Couchbase object Types for search. -// -// swagger:model IndexedCouchbaseType -type IndexedCouchbaseType struct { - - // Specifies the Couchbase object Types for search. - // Enum: ["CouchbaseBuckets"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed couchbase type -func (m *IndexedCouchbaseType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedCouchbaseTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CouchbaseBuckets"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedCouchbaseTypeTypeTypePropEnum = append(indexedCouchbaseTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedCouchbaseTypeTypeCouchbaseBuckets captures enum value "CouchbaseBuckets" - IndexedCouchbaseTypeTypeCouchbaseBuckets string = "CouchbaseBuckets" -) - -// prop value enum -func (m *IndexedCouchbaseType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedCouchbaseTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedCouchbaseType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed couchbase type based on context it is used -func (m *IndexedCouchbaseType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedCouchbaseType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedCouchbaseType) UnmarshalBinary(b []byte) error { - var res IndexedCouchbaseType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_group_item_type.go b/v2/models/indexed_group_item_type.go deleted file mode 100644 index af500ce9..00000000 --- a/v2/models/indexed_group_item_type.go +++ /dev/null @@ -1,113 +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" -) - -// IndexedGroupItemType Microsoft365 Group item types for search. -// -// Microsoft365 Group item types for search. -// -// swagger:model IndexedGroupItemType -type IndexedGroupItemType struct { - - // Specifies the Group item types for search. - // Enum: ["Email","EmailFolder","SiteFile","SiteFolder"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed group item type -func (m *IndexedGroupItemType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedGroupItemTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Email","EmailFolder","SiteFile","SiteFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedGroupItemTypeTypeTypePropEnum = append(indexedGroupItemTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedGroupItemTypeTypeEmail captures enum value "Email" - IndexedGroupItemTypeTypeEmail string = "Email" - - // IndexedGroupItemTypeTypeEmailFolder captures enum value "EmailFolder" - IndexedGroupItemTypeTypeEmailFolder string = "EmailFolder" - - // IndexedGroupItemTypeTypeSiteFile captures enum value "SiteFile" - IndexedGroupItemTypeTypeSiteFile string = "SiteFile" - - // IndexedGroupItemTypeTypeSiteFolder captures enum value "SiteFolder" - IndexedGroupItemTypeTypeSiteFolder string = "SiteFolder" -) - -// prop value enum -func (m *IndexedGroupItemType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedGroupItemTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedGroupItemType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed group item type based on context it is used -func (m *IndexedGroupItemType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedGroupItemType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedGroupItemType) UnmarshalBinary(b []byte) error { - var res IndexedGroupItemType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_h_d_f_s_type.go b/v2/models/indexed_h_d_f_s_type.go deleted file mode 100644 index 157aa9eb..00000000 --- a/v2/models/indexed_h_d_f_s_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IndexedHDFSType HDFS object Types for search. -// -// HDFS object Types for search. -// -// swagger:model IndexedHDFSType -type IndexedHDFSType struct { - - // Specifies the HDFS object Types for search. - // Enum: ["HDFSFolders","HDFSFiles"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed h d f s type -func (m *IndexedHDFSType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedHDFSTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HDFSFolders","HDFSFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedHDFSTypeTypeTypePropEnum = append(indexedHDFSTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedHDFSTypeTypeHDFSFolders captures enum value "HDFSFolders" - IndexedHDFSTypeTypeHDFSFolders string = "HDFSFolders" - - // IndexedHDFSTypeTypeHDFSFiles captures enum value "HDFSFiles" - IndexedHDFSTypeTypeHDFSFiles string = "HDFSFiles" -) - -// prop value enum -func (m *IndexedHDFSType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedHDFSTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedHDFSType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed h d f s type based on context it is used -func (m *IndexedHDFSType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedHDFSType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedHDFSType) UnmarshalBinary(b []byte) error { - var res IndexedHDFSType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_hbase_type.go b/v2/models/indexed_hbase_type.go deleted file mode 100644 index d7318235..00000000 --- a/v2/models/indexed_hbase_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IndexedHbaseType Hbase object Types for search. -// -// Hbase object Types for search. -// -// swagger:model IndexedHbaseType -type IndexedHbaseType struct { - - // Specifies the Hbase object Types for search. - // Enum: ["HbaseNamespaces","HbaseTables"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed hbase type -func (m *IndexedHbaseType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedHbaseTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HbaseNamespaces","HbaseTables"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedHbaseTypeTypeTypePropEnum = append(indexedHbaseTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedHbaseTypeTypeHbaseNamespaces captures enum value "HbaseNamespaces" - IndexedHbaseTypeTypeHbaseNamespaces string = "HbaseNamespaces" - - // IndexedHbaseTypeTypeHbaseTables captures enum value "HbaseTables" - IndexedHbaseTypeTypeHbaseTables string = "HbaseTables" -) - -// prop value enum -func (m *IndexedHbaseType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedHbaseTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedHbaseType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed hbase type based on context it is used -func (m *IndexedHbaseType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedHbaseType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedHbaseType) UnmarshalBinary(b []byte) error { - var res IndexedHbaseType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_hive_type.go b/v2/models/indexed_hive_type.go deleted file mode 100644 index 06cbe4f5..00000000 --- a/v2/models/indexed_hive_type.go +++ /dev/null @@ -1,110 +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" -) - -// IndexedHiveType Hive object Types for search. -// -// Hive object Types for search. -// -// swagger:model IndexedHiveType -type IndexedHiveType struct { - - // Specifies the Hive object Types for search. - // Enum: ["HiveDatabases","HiveTables","HivePartitions"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed hive type -func (m *IndexedHiveType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedHiveTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["HiveDatabases","HiveTables","HivePartitions"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedHiveTypeTypeTypePropEnum = append(indexedHiveTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedHiveTypeTypeHiveDatabases captures enum value "HiveDatabases" - IndexedHiveTypeTypeHiveDatabases string = "HiveDatabases" - - // IndexedHiveTypeTypeHiveTables captures enum value "HiveTables" - IndexedHiveTypeTypeHiveTables string = "HiveTables" - - // IndexedHiveTypeTypeHivePartitions captures enum value "HivePartitions" - IndexedHiveTypeTypeHivePartitions string = "HivePartitions" -) - -// prop value enum -func (m *IndexedHiveType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedHiveTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedHiveType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed hive type based on context it is used -func (m *IndexedHiveType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedHiveType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedHiveType) UnmarshalBinary(b []byte) error { - var res IndexedHiveType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_mongo_type.go b/v2/models/indexed_mongo_type.go deleted file mode 100644 index 8c07e2f5..00000000 --- a/v2/models/indexed_mongo_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IndexedMongoType MongoDB object Types for search. -// -// MongoDB object Types for search. -// -// swagger:model IndexedMongoType -type IndexedMongoType struct { - - // Specifies the MongoDB object Types for search. - // Enum: ["MongoDatabases","MongoCollections"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed mongo type -func (m *IndexedMongoType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedMongoTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["MongoDatabases","MongoCollections"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedMongoTypeTypeTypePropEnum = append(indexedMongoTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedMongoTypeTypeMongoDatabases captures enum value "MongoDatabases" - IndexedMongoTypeTypeMongoDatabases string = "MongoDatabases" - - // IndexedMongoTypeTypeMongoCollections captures enum value "MongoCollections" - IndexedMongoTypeTypeMongoCollections string = "MongoCollections" -) - -// prop value enum -func (m *IndexedMongoType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedMongoTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedMongoType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed mongo type based on context it is used -func (m *IndexedMongoType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedMongoType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedMongoType) UnmarshalBinary(b []byte) error { - var res IndexedMongoType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_object_snapshot.go b/v2/models/indexed_object_snapshot.go deleted file mode 100644 index 5f756c17..00000000 --- a/v2/models/indexed_object_snapshot.go +++ /dev/null @@ -1,220 +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" -) - -// IndexedObjectSnapshot Specifies a snapshot containing the indexed object. -// -// swagger:model IndexedObjectSnapshot -type IndexedObjectSnapshot struct { - - // Specifies the indexed object name. - IndexedObjectName *string `json:"indexedObjectName,omitempty"` - - // Specifies snapshot id of the object containing this indexed object. - ObjectSnapshotid *string `json:"objectSnapshotid,omitempty"` - - // Specifies a unix timestamp when the object snapshot was taken in micro seconds. - SnapshotTimestampUsecs *int64 `json:"snapshotTimestampUsecs,omitempty"` - - // Specifies the type of protection run created this snapshot. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Specifies the protection group id which contains this snapshot. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the protection group name which contains this snapshot. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the storage domain id containing this snapshot. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the number of runs have been executed before the run completed successfully. - Attempts *int64 `json:"attempts,omitempty"` - - // Specifies the indexed object size in bytes. - SizeBytes *int64 `json:"sizeBytes,omitempty"` - - // Specifies the source inode number of the file being recovered. - // Read Only: true - InodeID *int64 `json:"inodeId,omitempty"` - - // Specifies the last time file was modified in unix timestamp. - LastModifiedTimeUsecs *int64 `json:"lastModifiedTimeUsecs,omitempty"` - - // Specifies the unique identifier from the source of the item associated with this particular snapshot. It can get changed between the snapshots and therefore will be required for recovery. - IndexedObjectSourceUUID *string `json:"indexedObjectSourceUuid,omitempty"` - - // Specifies the external target information if this is an archival snapshot. - ExternalTargetInfo *ArchivalTargetSummaryInfo `json:"externalTargetInfo,omitempty"` -} - -// Validate validates this indexed object snapshot -func (m *IndexedObjectSnapshot) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalTargetInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedObjectSnapshotTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedObjectSnapshotTypeRunTypePropEnum = append(indexedObjectSnapshotTypeRunTypePropEnum, v) - } -} - -const ( - - // IndexedObjectSnapshotRunTypeKRegular captures enum value "kRegular" - IndexedObjectSnapshotRunTypeKRegular string = "kRegular" - - // IndexedObjectSnapshotRunTypeKFull captures enum value "kFull" - IndexedObjectSnapshotRunTypeKFull string = "kFull" - - // IndexedObjectSnapshotRunTypeKLog captures enum value "kLog" - IndexedObjectSnapshotRunTypeKLog string = "kLog" - - // IndexedObjectSnapshotRunTypeKSystem captures enum value "kSystem" - IndexedObjectSnapshotRunTypeKSystem string = "kSystem" - - // IndexedObjectSnapshotRunTypeKHydrateCDP captures enum value "kHydrateCDP" - IndexedObjectSnapshotRunTypeKHydrateCDP string = "kHydrateCDP" - - // IndexedObjectSnapshotRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - IndexedObjectSnapshotRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *IndexedObjectSnapshot) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedObjectSnapshotTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedObjectSnapshot) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -func (m *IndexedObjectSnapshot) validateExternalTargetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if m.ExternalTargetInfo != nil { - if err := m.ExternalTargetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this indexed object snapshot based on the context it is used -func (m *IndexedObjectSnapshot) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInodeID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternalTargetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IndexedObjectSnapshot) contextValidateInodeID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "inodeId", "body", m.InodeID); err != nil { - return err - } - - return nil -} - -func (m *IndexedObjectSnapshot) contextValidateExternalTargetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalTargetInfo != nil { - - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if err := m.ExternalTargetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedObjectSnapshot) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedObjectSnapshot) UnmarshalBinary(b []byte) error { - var res IndexedObjectSnapshot - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_object_type.go b/v2/models/indexed_object_type.go deleted file mode 100644 index 10ae1f82..00000000 --- a/v2/models/indexed_object_type.go +++ /dev/null @@ -1,149 +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" -) - -// IndexedObjectType Indexed object type. -// -// Indexed object Type. -// -// swagger:model IndexedObjectType -type IndexedObjectType struct { - - // Specifies the indexed object type. - // Enum: ["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed object type -func (m *IndexedObjectType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedObjectTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Emails","Files","CassandraObjects","CouchbaseObjects","HbaseObjects","HiveObjects","MongoObjects","HDFSObjects","ExchangeObjects","PublicFolders","GroupsObjects","TeamsObjects","SharepointObjects","OneDriveObjects","UdaObjects","SfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedObjectTypeTypeTypePropEnum = append(indexedObjectTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedObjectTypeTypeEmails captures enum value "Emails" - IndexedObjectTypeTypeEmails string = "Emails" - - // IndexedObjectTypeTypeFiles captures enum value "Files" - IndexedObjectTypeTypeFiles string = "Files" - - // IndexedObjectTypeTypeCassandraObjects captures enum value "CassandraObjects" - IndexedObjectTypeTypeCassandraObjects string = "CassandraObjects" - - // IndexedObjectTypeTypeCouchbaseObjects captures enum value "CouchbaseObjects" - IndexedObjectTypeTypeCouchbaseObjects string = "CouchbaseObjects" - - // IndexedObjectTypeTypeHbaseObjects captures enum value "HbaseObjects" - IndexedObjectTypeTypeHbaseObjects string = "HbaseObjects" - - // IndexedObjectTypeTypeHiveObjects captures enum value "HiveObjects" - IndexedObjectTypeTypeHiveObjects string = "HiveObjects" - - // IndexedObjectTypeTypeMongoObjects captures enum value "MongoObjects" - IndexedObjectTypeTypeMongoObjects string = "MongoObjects" - - // IndexedObjectTypeTypeHDFSObjects captures enum value "HDFSObjects" - IndexedObjectTypeTypeHDFSObjects string = "HDFSObjects" - - // IndexedObjectTypeTypeExchangeObjects captures enum value "ExchangeObjects" - IndexedObjectTypeTypeExchangeObjects string = "ExchangeObjects" - - // IndexedObjectTypeTypePublicFolders captures enum value "PublicFolders" - IndexedObjectTypeTypePublicFolders string = "PublicFolders" - - // IndexedObjectTypeTypeGroupsObjects captures enum value "GroupsObjects" - IndexedObjectTypeTypeGroupsObjects string = "GroupsObjects" - - // IndexedObjectTypeTypeTeamsObjects captures enum value "TeamsObjects" - IndexedObjectTypeTypeTeamsObjects string = "TeamsObjects" - - // IndexedObjectTypeTypeSharepointObjects captures enum value "SharepointObjects" - IndexedObjectTypeTypeSharepointObjects string = "SharepointObjects" - - // IndexedObjectTypeTypeOneDriveObjects captures enum value "OneDriveObjects" - IndexedObjectTypeTypeOneDriveObjects string = "OneDriveObjects" - - // IndexedObjectTypeTypeUdaObjects captures enum value "UdaObjects" - IndexedObjectTypeTypeUdaObjects string = "UdaObjects" - - // IndexedObjectTypeTypeSfdcRecords captures enum value "SfdcRecords" - IndexedObjectTypeTypeSfdcRecords string = "SfdcRecords" -) - -// prop value enum -func (m *IndexedObjectType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedObjectTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedObjectType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed object type based on context it is used -func (m *IndexedObjectType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedObjectType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedObjectType) UnmarshalBinary(b []byte) error { - var res IndexedObjectType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexed_team_item_type.go b/v2/models/indexed_team_item_type.go deleted file mode 100644 index 6e901901..00000000 --- a/v2/models/indexed_team_item_type.go +++ /dev/null @@ -1,116 +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" -) - -// IndexedTeamItemType Microsoft365 Teams item types for search. -// -// Microsoft365 Teams item types for search. -// -// swagger:model IndexedTeamItemType -type IndexedTeamItemType struct { - - // Specifies the Teams item types for search. - // Enum: ["Channel","Chat","Conversation","File","Folder"] - Type string `json:"type,omitempty"` -} - -// Validate validates this indexed team item type -func (m *IndexedTeamItemType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var indexedTeamItemTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Channel","Chat","Conversation","File","Folder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - indexedTeamItemTypeTypeTypePropEnum = append(indexedTeamItemTypeTypeTypePropEnum, v) - } -} - -const ( - - // IndexedTeamItemTypeTypeChannel captures enum value "Channel" - IndexedTeamItemTypeTypeChannel string = "Channel" - - // IndexedTeamItemTypeTypeChat captures enum value "Chat" - IndexedTeamItemTypeTypeChat string = "Chat" - - // IndexedTeamItemTypeTypeConversation captures enum value "Conversation" - IndexedTeamItemTypeTypeConversation string = "Conversation" - - // IndexedTeamItemTypeTypeFile captures enum value "File" - IndexedTeamItemTypeTypeFile string = "File" - - // IndexedTeamItemTypeTypeFolder captures enum value "Folder" - IndexedTeamItemTypeTypeFolder string = "Folder" -) - -// prop value enum -func (m *IndexedTeamItemType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, indexedTeamItemTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IndexedTeamItemType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexed team item type based on context it is used -func (m *IndexedTeamItemType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexedTeamItemType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexedTeamItemType) UnmarshalBinary(b []byte) error { - var res IndexedTeamItemType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexing_cloud_config.go b/v2/models/indexing_cloud_config.go deleted file mode 100644 index f7a4b930..00000000 --- a/v2/models/indexing_cloud_config.go +++ /dev/null @@ -1,302 +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" -) - -// IndexingCloudConfig IndexingCloudConfig -// -// Config required for indexing in DMaaS. -// -// swagger:model IndexingCloudConfig -type IndexingCloudConfig struct { - - // Tenant ID to which this config belongs. - // Required: true - TenantID *string `json:"tenantId"` - - // Name of the cloud region. - // Required: true - Region *string `json:"region"` - - // AWS Elasticsearch config. - EsConfig *ESConfigForIndexing `json:"esConfig,omitempty"` - - // Azure Elasticsearch config. - AzureEsConfig *AzureESConfigForIndexing `json:"azureEsConfig,omitempty"` - - // S3 config. - S3Config *S3ConfigForIndexing `json:"s3Config,omitempty"` - - // Azure storage config. - AzureStorageConfig *AzureStorageConfigForIndexing `json:"azureStorageConfig,omitempty"` - - // Whether this tenant is being migrated to this cluster or freshly onboarded. - IsMigratedTenant *bool `json:"isMigratedTenant,omitempty"` -} - -// Validate validates this indexing cloud config -func (m *IndexingCloudConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureEsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Config(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureStorageConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IndexingCloudConfig) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *IndexingCloudConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - return nil -} - -func (m *IndexingCloudConfig) validateEsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EsConfig) { // not required - return nil - } - - if m.EsConfig != nil { - if err := m.EsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("esConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("esConfig") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) validateAzureEsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AzureEsConfig) { // not required - return nil - } - - if m.AzureEsConfig != nil { - if err := m.AzureEsConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureEsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureEsConfig") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) validateS3Config(formats strfmt.Registry) error { - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if m.S3Config != nil { - if err := m.S3Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) validateAzureStorageConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AzureStorageConfig) { // not required - return nil - } - - if m.AzureStorageConfig != nil { - if err := m.AzureStorageConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureStorageConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureStorageConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this indexing cloud config based on the context it is used -func (m *IndexingCloudConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureEsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3Config(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureStorageConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IndexingCloudConfig) contextValidateEsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.EsConfig != nil { - - if swag.IsZero(m.EsConfig) { // not required - return nil - } - - if err := m.EsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("esConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("esConfig") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) contextValidateAzureEsConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureEsConfig != nil { - - if swag.IsZero(m.AzureEsConfig) { // not required - return nil - } - - if err := m.AzureEsConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureEsConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureEsConfig") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - - if m.S3Config != nil { - - if swag.IsZero(m.S3Config) { // not required - return nil - } - - if err := m.S3Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3Config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3Config") - } - return err - } - } - - return nil -} - -func (m *IndexingCloudConfig) contextValidateAzureStorageConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureStorageConfig != nil { - - if swag.IsZero(m.AzureStorageConfig) { // not required - return nil - } - - if err := m.AzureStorageConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureStorageConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureStorageConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IndexingCloudConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexingCloudConfig) UnmarshalBinary(b []byte) error { - var res IndexingCloudConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/indexing_policy.go b/v2/models/indexing_policy.go deleted file mode 100644 index f5f26769..00000000 --- a/v2/models/indexing_policy.go +++ /dev/null @@ -1,79 +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" -) - -// IndexingPolicy Indexing Policy. -// -// Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. -// -// swagger:model IndexingPolicy -type IndexingPolicy struct { - - // Specifies if the files found in an Object (such as a VM) should be indexed. If true (the default), files are indexed. - // Required: true - EnableIndexing *bool `json:"enableIndexing"` - - // Array of Indexed Directories. Specifies a list of directories to index. Regular expression can also be specified to provide the directory paths. Example: /Users//AppData - IncludePaths []string `json:"includePaths"` - - // Array of Excluded Directories. Specifies a list of directories to exclude from indexing.Regular expression can also be specified to provide the directory paths. Example: /Users//AppData - ExcludePaths []string `json:"excludePaths"` -} - -// Validate validates this indexing policy -func (m *IndexingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnableIndexing(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IndexingPolicy) validateEnableIndexing(formats strfmt.Registry) error { - - if err := validate.Required("enableIndexing", "body", m.EnableIndexing); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this indexing policy based on context it is used -func (m *IndexingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IndexingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexingPolicy) UnmarshalBinary(b []byte) error { - var res IndexingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/infected_file.go b/v2/models/infected_file.go deleted file mode 100644 index 1996ff5b..00000000 --- a/v2/models/infected_file.go +++ /dev/null @@ -1,180 +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" -) - -// InfectedFile Specifies an infected file. -// -// swagger:model InfectedFile -type InfectedFile struct { - - // Specifies the infected file path. - Path *string `json:"path,omitempty"` - - // Specifies the entity id of the infected file. - // Required: true - EntityID *int64 `json:"entityId"` - - // Specifies the root inode id of the file system which the infected file belongs to. - // Required: true - RootInodeID *int64 `json:"rootInodeId"` - - // Specifies the view id which the infected file belongs to. - // Required: true - ViewID *int64 `json:"viewId"` - - // Specifies the View name to which the infected file belongs to. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the state of the infected file. - // Enum: ["Quarantined","Unquarantined"] - State *string `json:"state,omitempty"` - - // Specifies a list of virus threat descriptions found in the file. - ThreatDescriptions []string `json:"threatDescriptions"` - - // Specifies the timestamp in microseconds when inode was scanned for viruses. - ScannedTimeUsecs *int64 `json:"scannedTimeUsecs,omitempty"` - - // Specifies the timestamp in microseconds when the threats were detected. - DetectedTimeUsecs *int64 `json:"detectedTimeUsecs,omitempty"` - - // Specifies the timestamp in microseconds when this file was last modified. - LastModifiedTimeUsecs *int64 `json:"lastModifiedTimeUsecs,omitempty"` - - // Specifies the ICAP Uri of the Antivirus Service which detected the threats. - AntivirusServiceIcapURI *string `json:"antivirusServiceIcapUri,omitempty"` - - // Specifies the Antivirus Service group which detected the threats. - AntivirusServiceGroupName *string `json:"antivirusServiceGroupName,omitempty"` -} - -// Validate validates this infected file -func (m *InfectedFile) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRootInodeID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InfectedFile) validateEntityID(formats strfmt.Registry) error { - - if err := validate.Required("entityId", "body", m.EntityID); err != nil { - return err - } - - return nil -} - -func (m *InfectedFile) validateRootInodeID(formats strfmt.Registry) error { - - if err := validate.Required("rootInodeId", "body", m.RootInodeID); err != nil { - return err - } - - return nil -} - -func (m *InfectedFile) validateViewID(formats strfmt.Registry) error { - - if err := validate.Required("viewId", "body", m.ViewID); err != nil { - return err - } - - return nil -} - -var infectedFileTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Quarantined","Unquarantined"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - infectedFileTypeStatePropEnum = append(infectedFileTypeStatePropEnum, v) - } -} - -const ( - - // InfectedFileStateQuarantined captures enum value "Quarantined" - InfectedFileStateQuarantined string = "Quarantined" - - // InfectedFileStateUnquarantined captures enum value "Unquarantined" - InfectedFileStateUnquarantined string = "Unquarantined" -) - -// prop value enum -func (m *InfectedFile) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, infectedFileTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InfectedFile) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this infected file based on context it is used -func (m *InfectedFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFile) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFile) UnmarshalBinary(b []byte) error { - var res InfectedFile - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/infected_file_state.go b/v2/models/infected_file_state.go deleted file mode 100644 index b73c7370..00000000 --- a/v2/models/infected_file_state.go +++ /dev/null @@ -1,105 +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" -) - -// InfectedFileState Specifies the state of infected file. -// -// swagger:model InfectedFileState -type InfectedFileState struct { - - // Specifies the state of infected file. - // Enum: ["Quarantined","Unquarantined"] - Type string `json:"type,omitempty"` -} - -// Validate validates this infected file state -func (m *InfectedFileState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var infectedFileStateTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Quarantined","Unquarantined"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - infectedFileStateTypeTypePropEnum = append(infectedFileStateTypeTypePropEnum, v) - } -} - -const ( - - // InfectedFileStateTypeQuarantined captures enum value "Quarantined" - InfectedFileStateTypeQuarantined string = "Quarantined" - - // InfectedFileStateTypeUnquarantined captures enum value "Unquarantined" - InfectedFileStateTypeUnquarantined string = "Unquarantined" -) - -// prop value enum -func (m *InfectedFileState) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, infectedFileStateTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InfectedFileState) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this infected file state based on context it is used -func (m *InfectedFileState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFileState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFileState) UnmarshalBinary(b []byte) error { - var res InfectedFileState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/infected_files.go b/v2/models/infected_files.go deleted file mode 100644 index 79713577..00000000 --- a/v2/models/infected_files.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// InfectedFiles Specifies a list of infected files. -// -// swagger:model InfectedFiles -type InfectedFiles struct { - - // Specifies the list of infected files. - InfectedFiles []*InfectedFile `json:"infectedFiles"` - - // Specifies the pagination cookie. Cookie is used to resume the enumeration of infected files. When the cookie is set the fields viewNameVec, includeQuarantinedFiles and includeUnquarantinedFiles are ignored. - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this infected files -func (m *InfectedFiles) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InfectedFiles) validateInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.InfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.InfectedFiles); i++ { - if swag.IsZero(m.InfectedFiles[i]) { // not required - continue - } - - if m.InfectedFiles[i] != nil { - if err := m.InfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this infected files based on the context it is used -func (m *InfectedFiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InfectedFiles) contextValidateInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFiles); i++ { - - if m.InfectedFiles[i] != nil { - - if swag.IsZero(m.InfectedFiles[i]) { // not required - return nil - } - - if err := m.InfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InfectedFiles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InfectedFiles) UnmarshalBinary(b []byte) error { - var res InfectedFiles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/init_cohesity_ca_request.go b/v2/models/init_cohesity_ca_request.go deleted file mode 100644 index 3212621c..00000000 --- a/v2/models/init_cohesity_ca_request.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" - "github.com/go-openapi/validate" -) - -// InitCohesityCaRequest Specifies the parameters required to initialize cohesity ca -// -// swagger:model InitCohesityCaRequest -type InitCohesityCaRequest struct { - - // Private key (RSA 4096). - // Required: true - PrivateKey *string `json:"privateKey"` - - // Certificate chain in pem format - // Required: true - // Min Items: 1 - CaChain []string `json:"caChain"` -} - -// Validate validates this init cohesity ca request -func (m *InitCohesityCaRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCaChain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InitCohesityCaRequest) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -func (m *InitCohesityCaRequest) validateCaChain(formats strfmt.Registry) error { - - if err := validate.Required("caChain", "body", m.CaChain); err != nil { - return err - } - - iCaChainSize := int64(len(m.CaChain)) - - if err := validate.MinItems("caChain", "body", iCaChainSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this init cohesity ca request based on context it is used -func (m *InitCohesityCaRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InitCohesityCaRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InitCohesityCaRequest) UnmarshalBinary(b []byte) error { - var res InitCohesityCaRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/init_cohesity_ca_response.go b/v2/models/init_cohesity_ca_response.go deleted file mode 100644 index ad61ce54..00000000 --- a/v2/models/init_cohesity_ca_response.go +++ /dev/null @@ -1,50 +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" -) - -// InitCohesityCaResponse Specifies the response to init cohesity ca request -// -// swagger:model InitCohesityCaResponse -type InitCohesityCaResponse struct { - - // Specifies ca cert in pem format - CaCertChain []string `json:"caCertChain,omitempty"` -} - -// Validate validates this init cohesity ca response -func (m *InitCohesityCaResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this init cohesity ca response based on context it is used -func (m *InitCohesityCaResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InitCohesityCaResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InitCohesityCaResponse) UnmarshalBinary(b []byte) error { - var res InitCohesityCaResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/init_failover_request.go b/v2/models/init_failover_request.go deleted file mode 100644 index db97ad7f..00000000 --- a/v2/models/init_failover_request.go +++ /dev/null @@ -1,355 +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" -) - -// InitFailoverRequest Init Failover Request. -// -// Specifies the failover request parameters to initiate a failover. -// -// swagger:model InitFailoverRequest -type InitFailoverRequest struct { - - // Specifies the details about source cluster involved in the failover operation. - SourceCluster *FailoverSourceCluster `json:"sourceCluster,omitempty"` - - // Specifies the details about replcaition cluster involved in the failover operation. - ReplicationCluster *FailoverReplicaCluster `json:"replicationCluster,omitempty"` - - // If this field is specified then protection groups will be looked up only for this specific 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"] - ProtectionGroupEnvironment *string `json:"protectionGroupEnvironment,omitempty"` -} - -// Validate validates this init failover request -func (m *InitFailoverRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionGroupEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InitFailoverRequest) validateSourceCluster(formats strfmt.Registry) error { - if swag.IsZero(m.SourceCluster) { // not required - return nil - } - - if m.SourceCluster != nil { - if err := m.SourceCluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceCluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceCluster") - } - return err - } - } - - return nil -} - -func (m *InitFailoverRequest) validateReplicationCluster(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationCluster) { // not required - return nil - } - - if m.ReplicationCluster != nil { - if err := m.ReplicationCluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationCluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationCluster") - } - return err - } - } - - return nil -} - -var initFailoverRequestTypeProtectionGroupEnvironmentPropEnum []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 { - initFailoverRequestTypeProtectionGroupEnvironmentPropEnum = append(initFailoverRequestTypeProtectionGroupEnvironmentPropEnum, v) - } -} - -const ( - - // InitFailoverRequestProtectionGroupEnvironmentKVMware captures enum value "kVMware" - InitFailoverRequestProtectionGroupEnvironmentKVMware string = "kVMware" - - // InitFailoverRequestProtectionGroupEnvironmentKHyperV captures enum value "kHyperV" - InitFailoverRequestProtectionGroupEnvironmentKHyperV string = "kHyperV" - - // InitFailoverRequestProtectionGroupEnvironmentKVCD captures enum value "kVCD" - InitFailoverRequestProtectionGroupEnvironmentKVCD string = "kVCD" - - // InitFailoverRequestProtectionGroupEnvironmentKAzure captures enum value "kAzure" - InitFailoverRequestProtectionGroupEnvironmentKAzure string = "kAzure" - - // InitFailoverRequestProtectionGroupEnvironmentKGCP captures enum value "kGCP" - InitFailoverRequestProtectionGroupEnvironmentKGCP string = "kGCP" - - // InitFailoverRequestProtectionGroupEnvironmentKKVM captures enum value "kKVM" - InitFailoverRequestProtectionGroupEnvironmentKKVM string = "kKVM" - - // InitFailoverRequestProtectionGroupEnvironmentKAcropolis captures enum value "kAcropolis" - InitFailoverRequestProtectionGroupEnvironmentKAcropolis string = "kAcropolis" - - // InitFailoverRequestProtectionGroupEnvironmentKAWS captures enum value "kAWS" - InitFailoverRequestProtectionGroupEnvironmentKAWS string = "kAWS" - - // InitFailoverRequestProtectionGroupEnvironmentKAWSNative captures enum value "kAWSNative" - InitFailoverRequestProtectionGroupEnvironmentKAWSNative string = "kAWSNative" - - // InitFailoverRequestProtectionGroupEnvironmentKAwsS3 captures enum value "kAwsS3" - InitFailoverRequestProtectionGroupEnvironmentKAwsS3 string = "kAwsS3" - - // InitFailoverRequestProtectionGroupEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - InitFailoverRequestProtectionGroupEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // InitFailoverRequestProtectionGroupEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - InitFailoverRequestProtectionGroupEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // InitFailoverRequestProtectionGroupEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - InitFailoverRequestProtectionGroupEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // InitFailoverRequestProtectionGroupEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - InitFailoverRequestProtectionGroupEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // InitFailoverRequestProtectionGroupEnvironmentKAzureNative captures enum value "kAzureNative" - InitFailoverRequestProtectionGroupEnvironmentKAzureNative string = "kAzureNative" - - // InitFailoverRequestProtectionGroupEnvironmentKAzureSQL captures enum value "kAzureSQL" - InitFailoverRequestProtectionGroupEnvironmentKAzureSQL string = "kAzureSQL" - - // InitFailoverRequestProtectionGroupEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - InitFailoverRequestProtectionGroupEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // InitFailoverRequestProtectionGroupEnvironmentKPhysical captures enum value "kPhysical" - InitFailoverRequestProtectionGroupEnvironmentKPhysical string = "kPhysical" - - // InitFailoverRequestProtectionGroupEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - InitFailoverRequestProtectionGroupEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // InitFailoverRequestProtectionGroupEnvironmentKGPFS captures enum value "kGPFS" - InitFailoverRequestProtectionGroupEnvironmentKGPFS string = "kGPFS" - - // InitFailoverRequestProtectionGroupEnvironmentKElastifile captures enum value "kElastifile" - InitFailoverRequestProtectionGroupEnvironmentKElastifile string = "kElastifile" - - // InitFailoverRequestProtectionGroupEnvironmentKNetapp captures enum value "kNetapp" - InitFailoverRequestProtectionGroupEnvironmentKNetapp string = "kNetapp" - - // InitFailoverRequestProtectionGroupEnvironmentKGenericNas captures enum value "kGenericNas" - InitFailoverRequestProtectionGroupEnvironmentKGenericNas string = "kGenericNas" - - // InitFailoverRequestProtectionGroupEnvironmentKIsilon captures enum value "kIsilon" - InitFailoverRequestProtectionGroupEnvironmentKIsilon string = "kIsilon" - - // InitFailoverRequestProtectionGroupEnvironmentKFlashBlade captures enum value "kFlashBlade" - InitFailoverRequestProtectionGroupEnvironmentKFlashBlade string = "kFlashBlade" - - // InitFailoverRequestProtectionGroupEnvironmentKPure captures enum value "kPure" - InitFailoverRequestProtectionGroupEnvironmentKPure string = "kPure" - - // InitFailoverRequestProtectionGroupEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - InitFailoverRequestProtectionGroupEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // InitFailoverRequestProtectionGroupEnvironmentKSQL captures enum value "kSQL" - InitFailoverRequestProtectionGroupEnvironmentKSQL string = "kSQL" - - // InitFailoverRequestProtectionGroupEnvironmentKExchange captures enum value "kExchange" - InitFailoverRequestProtectionGroupEnvironmentKExchange string = "kExchange" - - // InitFailoverRequestProtectionGroupEnvironmentKAD captures enum value "kAD" - InitFailoverRequestProtectionGroupEnvironmentKAD string = "kAD" - - // InitFailoverRequestProtectionGroupEnvironmentKOracle captures enum value "kOracle" - InitFailoverRequestProtectionGroupEnvironmentKOracle string = "kOracle" - - // InitFailoverRequestProtectionGroupEnvironmentKView captures enum value "kView" - InitFailoverRequestProtectionGroupEnvironmentKView string = "kView" - - // InitFailoverRequestProtectionGroupEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - InitFailoverRequestProtectionGroupEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // InitFailoverRequestProtectionGroupEnvironmentKO365 captures enum value "kO365" - InitFailoverRequestProtectionGroupEnvironmentKO365 string = "kO365" - - // InitFailoverRequestProtectionGroupEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - InitFailoverRequestProtectionGroupEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // InitFailoverRequestProtectionGroupEnvironmentKO365Teams captures enum value "kO365Teams" - InitFailoverRequestProtectionGroupEnvironmentKO365Teams string = "kO365Teams" - - // InitFailoverRequestProtectionGroupEnvironmentKO365Group captures enum value "kO365Group" - InitFailoverRequestProtectionGroupEnvironmentKO365Group string = "kO365Group" - - // InitFailoverRequestProtectionGroupEnvironmentKO365Exchange captures enum value "kO365Exchange" - InitFailoverRequestProtectionGroupEnvironmentKO365Exchange string = "kO365Exchange" - - // InitFailoverRequestProtectionGroupEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - InitFailoverRequestProtectionGroupEnvironmentKO365OneDrive string = "kO365OneDrive" - - // InitFailoverRequestProtectionGroupEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - InitFailoverRequestProtectionGroupEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // InitFailoverRequestProtectionGroupEnvironmentKKubernetes captures enum value "kKubernetes" - InitFailoverRequestProtectionGroupEnvironmentKKubernetes string = "kKubernetes" - - // InitFailoverRequestProtectionGroupEnvironmentKCassandra captures enum value "kCassandra" - InitFailoverRequestProtectionGroupEnvironmentKCassandra string = "kCassandra" - - // InitFailoverRequestProtectionGroupEnvironmentKMongoDB captures enum value "kMongoDB" - InitFailoverRequestProtectionGroupEnvironmentKMongoDB string = "kMongoDB" - - // InitFailoverRequestProtectionGroupEnvironmentKCouchbase captures enum value "kCouchbase" - InitFailoverRequestProtectionGroupEnvironmentKCouchbase string = "kCouchbase" - - // InitFailoverRequestProtectionGroupEnvironmentKHdfs captures enum value "kHdfs" - InitFailoverRequestProtectionGroupEnvironmentKHdfs string = "kHdfs" - - // InitFailoverRequestProtectionGroupEnvironmentKHive captures enum value "kHive" - InitFailoverRequestProtectionGroupEnvironmentKHive string = "kHive" - - // InitFailoverRequestProtectionGroupEnvironmentKHBase captures enum value "kHBase" - InitFailoverRequestProtectionGroupEnvironmentKHBase string = "kHBase" - - // InitFailoverRequestProtectionGroupEnvironmentKUDA captures enum value "kUDA" - InitFailoverRequestProtectionGroupEnvironmentKUDA string = "kUDA" - - // InitFailoverRequestProtectionGroupEnvironmentKSfdc captures enum value "kSfdc" - InitFailoverRequestProtectionGroupEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *InitFailoverRequest) validateProtectionGroupEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, initFailoverRequestTypeProtectionGroupEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InitFailoverRequest) validateProtectionGroupEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateProtectionGroupEnvironmentEnum("protectionGroupEnvironment", "body", *m.ProtectionGroupEnvironment); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this init failover request based on the context it is used -func (m *InitFailoverRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InitFailoverRequest) contextValidateSourceCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceCluster != nil { - - if swag.IsZero(m.SourceCluster) { // not required - return nil - } - - if err := m.SourceCluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceCluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceCluster") - } - return err - } - } - - return nil -} - -func (m *InitFailoverRequest) contextValidateReplicationCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationCluster != nil { - - if swag.IsZero(m.ReplicationCluster) { // not required - return nil - } - - if err := m.ReplicationCluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationCluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationCluster") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InitFailoverRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InitFailoverRequest) UnmarshalBinary(b []byte) error { - var res InitFailoverRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/init_failover_response.go b/v2/models/init_failover_response.go deleted file mode 100644 index 9af2616c..00000000 --- a/v2/models/init_failover_response.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// InitFailoverResponse Specifies the response after succesfully initiating the failover request. -// -// swagger:model InitFailoverResponse -type InitFailoverResponse struct { - - // Specifies the list of corrosponding source objects mapped with replica objects provided at the time of initiating failover request. - ReplicaToSourceObjects []*SourceReplicaObject `json:"replicaToSourceObjects"` - - // Specifies the information about source cluster in failover workflow. - SourceClusterInfo *FailoverSourceCluster `json:"sourceClusterInfo,omitempty"` -} - -// Validate validates this init failover response -func (m *InitFailoverResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicaToSourceObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceClusterInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InitFailoverResponse) validateReplicaToSourceObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicaToSourceObjects) { // not required - return nil - } - - for i := 0; i < len(m.ReplicaToSourceObjects); i++ { - if swag.IsZero(m.ReplicaToSourceObjects[i]) { // not required - continue - } - - if m.ReplicaToSourceObjects[i] != nil { - if err := m.ReplicaToSourceObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaToSourceObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaToSourceObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InitFailoverResponse) validateSourceClusterInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SourceClusterInfo) { // not required - return nil - } - - if m.SourceClusterInfo != nil { - if err := m.SourceClusterInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceClusterInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this init failover response based on the context it is used -func (m *InitFailoverResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicaToSourceObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceClusterInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InitFailoverResponse) contextValidateReplicaToSourceObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicaToSourceObjects); i++ { - - if m.ReplicaToSourceObjects[i] != nil { - - if swag.IsZero(m.ReplicaToSourceObjects[i]) { // not required - return nil - } - - if err := m.ReplicaToSourceObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicaToSourceObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicaToSourceObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InitFailoverResponse) contextValidateSourceClusterInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceClusterInfo != nil { - - if swag.IsZero(m.SourceClusterInfo) { // not required - return nil - } - - if err := m.SourceClusterInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceClusterInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceClusterInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InitFailoverResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InitFailoverResponse) UnmarshalBinary(b []byte) error { - var res InitFailoverResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface.go b/v2/models/interface.go deleted file mode 100644 index 7322758b..00000000 --- a/v2/models/interface.go +++ /dev/null @@ -1,498 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Interface Network interface parameters. -// -// swagger:model Interface -type Interface struct { - - // Id of the interface. - ID *int64 `json:"id,omitempty"` - - // The name of the interface. - Name *string `json:"name,omitempty"` - - // The type of the interface. - // Enum: ["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"] - Type *string `json:"type,omitempty"` - - // Role of the interface. - // Enum: ["Primary","Secondary"] - Role *string `json:"role,omitempty"` - - // Group to which this interface belongs. - Group *string `json:"group,omitempty"` - - // MAC address of the interface. - MacAddress *string `json:"macAddress,omitempty"` - - // Specifies whether or not this interface is connected. - IsConnected *bool `json:"isConnected,omitempty"` - - // Specifies whether or not the interface is up. - IsUp *bool `json:"isUp,omitempty"` - - // Specifies whether or not this interface is the default route. - DefaultRoute *bool `json:"defaultRoute,omitempty"` - - // Static IP of the interface. - StaticIP *string `json:"staticIp,omitempty"` - - // Virtual IP of the interface. - VirtualIP *string `json:"virtualIp,omitempty"` - - // Gateway of the interface. - Gateway *string `json:"gateway,omitempty"` - - // Subnet of the interface. - Subnet *string `json:"subnet,omitempty"` - - // Static IPv6 of the interface. - IPV6Static *string `json:"ipv6Static,omitempty"` - - // The IPv6 gateway of the interface. - IPV6Gateway *string `json:"ipv6Gateway,omitempty"` - - // The IPv6 subnet of the interface. - IPV6Subnet *string `json:"ipv6Subnet,omitempty"` - - // MTU of the interface. - Mtu *int32 `json:"mtu,omitempty"` - - // Speed of the interface. - // Enum: ["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"] - Speed *string `json:"speed,omitempty"` - - // Types of services this interface is used for. - Services []string `json:"services"` - - // Interface stats. - Stats *InterfaceStats `json:"stats,omitempty"` - - // Bonding mode if this interface is a bond. - // Enum: ["ActiveBackup","802_3ad"] - BondingMode *string `json:"bondingMode,omitempty"` - - // Bond member details for bond interface. - BondMembers []*BondMember `json:"bondMembers"` -} - -// Validate validates this interface -func (m *Interface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpeed(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServices(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBondingMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBondMembers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var interfaceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceTypeTypePropEnum = append(interfaceTypeTypePropEnum, v) - } -} - -const ( - - // InterfaceTypePhysical captures enum value "Physical" - InterfaceTypePhysical string = "Physical" - - // InterfaceTypeBond captures enum value "Bond" - InterfaceTypeBond string = "Bond" - - // InterfaceTypeBridge captures enum value "Bridge" - InterfaceTypeBridge string = "Bridge" - - // InterfaceTypeGroup captures enum value "Group" - InterfaceTypeGroup string = "Group" - - // InterfaceTypeVlan captures enum value "Vlan" - InterfaceTypeVlan string = "Vlan" - - // InterfaceTypeVlanPhysical captures enum value "VlanPhysical" - InterfaceTypeVlanPhysical string = "VlanPhysical" - - // InterfaceTypeVlanBond captures enum value "VlanBond" - InterfaceTypeVlanBond string = "VlanBond" - - // InterfaceTypeVlanGroup captures enum value "VlanGroup" - InterfaceTypeVlanGroup string = "VlanGroup" - - // InterfaceTypeVlanBridge captures enum value "VlanBridge" - InterfaceTypeVlanBridge string = "VlanBridge" - - // InterfaceTypeInvalid captures enum value "Invalid" - InterfaceTypeInvalid string = "Invalid" -) - -// prop value enum -func (m *Interface) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Interface) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var interfaceTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Primary","Secondary"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceTypeRolePropEnum = append(interfaceTypeRolePropEnum, v) - } -} - -const ( - - // InterfaceRolePrimary captures enum value "Primary" - InterfaceRolePrimary string = "Primary" - - // InterfaceRoleSecondary captures enum value "Secondary" - InterfaceRoleSecondary string = "Secondary" -) - -// prop value enum -func (m *Interface) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Interface) 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 -} - -var interfaceTypeSpeedPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceTypeSpeedPropEnum = append(interfaceTypeSpeedPropEnum, v) - } -} - -const ( - - // InterfaceSpeedNr1Gbits captures enum value "1Gbit/s" - InterfaceSpeedNr1Gbits string = "1Gbit/s" - - // InterfaceSpeedNr10Gbits captures enum value "10Gbit/s" - InterfaceSpeedNr10Gbits string = "10Gbit/s" - - // InterfaceSpeedNr25Gbits captures enum value "25Gbit/s" - InterfaceSpeedNr25Gbits string = "25Gbit/s" - - // InterfaceSpeedNr40Gbits captures enum value "40Gbit/s" - InterfaceSpeedNr40Gbits string = "40Gbit/s" - - // InterfaceSpeedNr100Gbits captures enum value "100Gbit/s" - InterfaceSpeedNr100Gbits string = "100Gbit/s" - - // InterfaceSpeedUnknown captures enum value "Unknown" - InterfaceSpeedUnknown string = "Unknown" -) - -// prop value enum -func (m *Interface) validateSpeedEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceTypeSpeedPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Interface) validateSpeed(formats strfmt.Registry) error { - if swag.IsZero(m.Speed) { // not required - return nil - } - - // value enum - if err := m.validateSpeedEnum("speed", "body", *m.Speed); err != nil { - return err - } - - return nil -} - -var interfaceServicesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ReplicationService","RemoteTunnelService","ClusterDataService","AvahiDiscoverService"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceServicesItemsEnum = append(interfaceServicesItemsEnum, v) - } -} - -func (m *Interface) validateServicesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceServicesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *Interface) validateServices(formats strfmt.Registry) error { - if swag.IsZero(m.Services) { // not required - return nil - } - - for i := 0; i < len(m.Services); i++ { - - // value enum - if err := m.validateServicesItemsEnum("services"+"."+strconv.Itoa(i), "body", m.Services[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *Interface) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -var interfaceTypeBondingModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ActiveBackup","802_3ad"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceTypeBondingModePropEnum = append(interfaceTypeBondingModePropEnum, v) - } -} - -const ( - - // InterfaceBondingModeActiveBackup captures enum value "ActiveBackup" - InterfaceBondingModeActiveBackup string = "ActiveBackup" - - // InterfaceBondingModeNr8023ad captures enum value "802_3ad" - InterfaceBondingModeNr8023ad string = "802_3ad" -) - -// prop value enum -func (m *Interface) validateBondingModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceTypeBondingModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Interface) validateBondingMode(formats strfmt.Registry) error { - if swag.IsZero(m.BondingMode) { // not required - return nil - } - - // value enum - if err := m.validateBondingModeEnum("bondingMode", "body", *m.BondingMode); err != nil { - return err - } - - return nil -} - -func (m *Interface) validateBondMembers(formats strfmt.Registry) error { - if swag.IsZero(m.BondMembers) { // not required - return nil - } - - for i := 0; i < len(m.BondMembers); i++ { - if swag.IsZero(m.BondMembers[i]) { // not required - continue - } - - if m.BondMembers[i] != nil { - if err := m.BondMembers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondMembers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondMembers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this interface based on the context it is used -func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBondMembers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Interface) 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 -} - -func (m *Interface) contextValidateBondMembers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BondMembers); i++ { - - if m.BondMembers[i] != nil { - - if swag.IsZero(m.BondMembers[i]) { // not required - return nil - } - - if err := m.BondMembers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondMembers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondMembers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Interface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Interface) UnmarshalBinary(b []byte) error { - var res Interface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_group.go b/v2/models/interface_group.go deleted file mode 100644 index 9c56f522..00000000 --- a/v2/models/interface_group.go +++ /dev/null @@ -1,117 +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" -) - -// InterfaceGroup Interface group paramters. -// -// swagger:model InterfaceGroup -type InterfaceGroup struct { - InterfaceGroupParams - - // Id of the interface group. - ID int32 `json:"id,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *InterfaceGroup) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 InterfaceGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.InterfaceGroupParams = aO0 - - // AO1 - var dataAO1 struct { - ID int32 `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m InterfaceGroup) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.InterfaceGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID int32 `json:"id,omitempty"` - } - - dataAO1.ID = m.ID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this interface group -func (m *InterfaceGroup) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with InterfaceGroupParams - if err := m.InterfaceGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this interface group based on the context it is used -func (m *InterfaceGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with InterfaceGroupParams - if err := m.InterfaceGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceGroup) UnmarshalBinary(b []byte) error { - var res InterfaceGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_group_network_params.go b/v2/models/interface_group_network_params.go deleted file mode 100644 index e290018b..00000000 --- a/v2/models/interface_group_network_params.go +++ /dev/null @@ -1,112 +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" -) - -// InterfaceGroupNetworkParams Interface group network parameters. -// -// swagger:model InterfaceGroupNetworkParams -type InterfaceGroupNetworkParams struct { - - // Bond interface network parameters. - BondInterfaceParams *BondInterfaceNetworkParams `json:"bondInterfaceParams,omitempty"` - - // MTU of the network interface group. - Mtu *int32 `json:"mtu,omitempty"` -} - -// Validate validates this interface group network params -func (m *InterfaceGroupNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondInterfaceParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroupNetworkParams) validateBondInterfaceParams(formats strfmt.Registry) error { - if swag.IsZero(m.BondInterfaceParams) { // not required - return nil - } - - if m.BondInterfaceParams != nil { - if err := m.BondInterfaceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondInterfaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondInterfaceParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface group network params based on the context it is used -func (m *InterfaceGroupNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBondInterfaceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroupNetworkParams) contextValidateBondInterfaceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.BondInterfaceParams != nil { - - if swag.IsZero(m.BondInterfaceParams) { // not required - return nil - } - - if err := m.BondInterfaceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondInterfaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondInterfaceParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceGroupNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceGroupNetworkParams) UnmarshalBinary(b []byte) error { - var res InterfaceGroupNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_group_params.go b/v2/models/interface_group_params.go deleted file mode 100644 index 16abf87f..00000000 --- a/v2/models/interface_group_params.go +++ /dev/null @@ -1,245 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// InterfaceGroupParams Parameters to update an interface group on the cluster. -// -// swagger:model InterfaceGroupParams -type InterfaceGroupParams struct { - - // Name of the interface group. - // Required: true - Name *string `json:"name"` - - // Type of the interface group. - // Required: true - // Enum: ["Bond","Loopback"] - Type *string `json:"type"` - - // Node and interface parameters. - // Required: true - NodeInterfaceParams []*NodeInterfaceParams `json:"nodeInterfaceParams"` - - // Interface group network parameters. - NetworkParams *InterfaceGroupNetworkParams `json:"networkParams,omitempty"` -} - -// Validate validates this interface group params -func (m *InterfaceGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeInterfaceParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroupParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var interfaceGroupParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Bond","Loopback"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceGroupParamsTypeTypePropEnum = append(interfaceGroupParamsTypeTypePropEnum, v) - } -} - -const ( - - // InterfaceGroupParamsTypeBond captures enum value "Bond" - InterfaceGroupParamsTypeBond string = "Bond" - - // InterfaceGroupParamsTypeLoopback captures enum value "Loopback" - InterfaceGroupParamsTypeLoopback string = "Loopback" -) - -// prop value enum -func (m *InterfaceGroupParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceGroupParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InterfaceGroupParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *InterfaceGroupParams) validateNodeInterfaceParams(formats strfmt.Registry) error { - - if err := validate.Required("nodeInterfaceParams", "body", m.NodeInterfaceParams); err != nil { - return err - } - - for i := 0; i < len(m.NodeInterfaceParams); i++ { - if swag.IsZero(m.NodeInterfaceParams[i]) { // not required - continue - } - - if m.NodeInterfaceParams[i] != nil { - if err := m.NodeInterfaceParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeInterfaceParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeInterfaceParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InterfaceGroupParams) validateNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if m.NetworkParams != nil { - if err := m.NetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface group params based on the context it is used -func (m *InterfaceGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeInterfaceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroupParams) contextValidateNodeInterfaceParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeInterfaceParams); i++ { - - if m.NodeInterfaceParams[i] != nil { - - if swag.IsZero(m.NodeInterfaceParams[i]) { // not required - return nil - } - - if err := m.NodeInterfaceParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeInterfaceParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeInterfaceParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *InterfaceGroupParams) contextValidateNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkParams != nil { - - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if err := m.NetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceGroupParams) UnmarshalBinary(b []byte) error { - var res InterfaceGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_groups.go b/v2/models/interface_groups.go deleted file mode 100644 index b3ea3813..00000000 --- a/v2/models/interface_groups.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// InterfaceGroups Interface groups configured on the cluster. -// -// swagger:model InterfaceGroups -type InterfaceGroups struct { - - // Interface groups configured on the cluster. - InterfaceGroups []*InterfaceGroup `json:"interfaceGroups"` -} - -// Validate validates this interface groups -func (m *InterfaceGroups) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaceGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroups) validateInterfaceGroups(formats strfmt.Registry) error { - if swag.IsZero(m.InterfaceGroups) { // not required - return nil - } - - for i := 0; i < len(m.InterfaceGroups); i++ { - if swag.IsZero(m.InterfaceGroups[i]) { // not required - continue - } - - if m.InterfaceGroups[i] != nil { - if err := m.InterfaceGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this interface groups based on the context it is used -func (m *InterfaceGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaceGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceGroups) contextValidateInterfaceGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InterfaceGroups); i++ { - - if m.InterfaceGroups[i] != nil { - - if swag.IsZero(m.InterfaceGroups[i]) { // not required - return nil - } - - if err := m.InterfaceGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceGroups) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceGroups) UnmarshalBinary(b []byte) error { - var res InterfaceGroups - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_network_params.go b/v2/models/interface_network_params.go deleted file mode 100644 index 657de4af..00000000 --- a/v2/models/interface_network_params.go +++ /dev/null @@ -1,112 +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" -) - -// InterfaceNetworkParams Interface network parameters. -// -// swagger:model InterfaceNetworkParams -type InterfaceNetworkParams struct { - - // Bond interface network parameters. - BondInterfaceParams *BondInterfaceNetworkParams `json:"bondInterfaceParams,omitempty"` - - // MTU of the network interface. - Mtu *int32 `json:"mtu,omitempty"` -} - -// Validate validates this interface network params -func (m *InterfaceNetworkParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBondInterfaceParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceNetworkParams) validateBondInterfaceParams(formats strfmt.Registry) error { - if swag.IsZero(m.BondInterfaceParams) { // not required - return nil - } - - if m.BondInterfaceParams != nil { - if err := m.BondInterfaceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondInterfaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondInterfaceParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface network params based on the context it is used -func (m *InterfaceNetworkParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBondInterfaceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceNetworkParams) contextValidateBondInterfaceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.BondInterfaceParams != nil { - - if swag.IsZero(m.BondInterfaceParams) { // not required - return nil - } - - if err := m.BondInterfaceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bondInterfaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bondInterfaceParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceNetworkParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceNetworkParams) UnmarshalBinary(b []byte) error { - var res InterfaceNetworkParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_params.go b/v2/models/interface_params.go deleted file mode 100644 index 4f8a5eac..00000000 --- a/v2/models/interface_params.go +++ /dev/null @@ -1,127 +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" -) - -// InterfaceParams Parameters of an interface. -// -// swagger:model InterfaceParams -type InterfaceParams struct { - - // Name of the interface. - // Required: true - Name *string `json:"name"` - - // Interface network parameters. - NetworkParams *InterfaceNetworkParams `json:"networkParams,omitempty"` -} - -// Validate validates this interface params -func (m *InterfaceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *InterfaceParams) validateNetworkParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if m.NetworkParams != nil { - if err := m.NetworkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this interface params based on the context it is used -func (m *InterfaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *InterfaceParams) contextValidateNetworkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkParams != nil { - - if swag.IsZero(m.NetworkParams) { // not required - return nil - } - - if err := m.NetworkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceParams) UnmarshalBinary(b []byte) error { - var res InterfaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_role_type.go b/v2/models/interface_role_type.go deleted file mode 100644 index fd43b791..00000000 --- a/v2/models/interface_role_type.go +++ /dev/null @@ -1,110 +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" -) - -// InterfaceRoleType Interface Role Type -// -// Role of a network interface. -// -// swagger:model InterfaceRoleType -type InterfaceRoleType struct { - - // Specifies the network interface role. - // Enum: ["Primary","Secondary","Undefined"] - InterfaceRoleType string `json:"interfaceRoleType,omitempty"` -} - -// Validate validates this interface role type -func (m *InterfaceRoleType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaceRoleType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var interfaceRoleTypeTypeInterfaceRoleTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Primary","Secondary","Undefined"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interfaceRoleTypeTypeInterfaceRoleTypePropEnum = append(interfaceRoleTypeTypeInterfaceRoleTypePropEnum, v) - } -} - -const ( - - // InterfaceRoleTypeInterfaceRoleTypePrimary captures enum value "Primary" - InterfaceRoleTypeInterfaceRoleTypePrimary string = "Primary" - - // InterfaceRoleTypeInterfaceRoleTypeSecondary captures enum value "Secondary" - InterfaceRoleTypeInterfaceRoleTypeSecondary string = "Secondary" - - // InterfaceRoleTypeInterfaceRoleTypeUndefined captures enum value "Undefined" - InterfaceRoleTypeInterfaceRoleTypeUndefined string = "Undefined" -) - -// prop value enum -func (m *InterfaceRoleType) validateInterfaceRoleTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceRoleTypeTypeInterfaceRoleTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InterfaceRoleType) validateInterfaceRoleType(formats strfmt.Registry) error { - if swag.IsZero(m.InterfaceRoleType) { // not required - return nil - } - - // value enum - if err := m.validateInterfaceRoleTypeEnum("interfaceRoleType", "body", m.InterfaceRoleType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this interface role type based on context it is used -func (m *InterfaceRoleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceRoleType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceRoleType) UnmarshalBinary(b []byte) error { - var res InterfaceRoleType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/interface_stats.go b/v2/models/interface_stats.go deleted file mode 100644 index 7a03d895..00000000 --- a/v2/models/interface_stats.go +++ /dev/null @@ -1,71 +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" -) - -// InterfaceStats Interface stats. -// -// swagger:model InterfaceStats -type InterfaceStats struct { - - // Total bytes received over the interface. - RxBytes *int64 `json:"rxBytes,omitempty"` - - // Number of packets received but not processed. - RxDropped *int64 `json:"rxDropped,omitempty"` - - // Total number of bad packets received. - RxErrors *int64 `json:"rxErrors,omitempty"` - - // Total number of packets received over the interface. - RxPkts *int64 `json:"rxPkts,omitempty"` - - // Total bytes transmitted over the interface. - TxBytes *int64 `json:"txBytes,omitempty"` - - // Number of packets dropped on their way to transmission. - TxDropped *int64 `json:"txDropped,omitempty"` - - // Total number of transmit problems. - TxErrors *int64 `json:"txErrors,omitempty"` - - // Total number of packets transmitted over the interface. - TxPkts *int64 `json:"txPkts,omitempty"` -} - -// Validate validates this interface stats -func (m *InterfaceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this interface stats based on context it is used -func (m *InterfaceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InterfaceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterfaceStats) UnmarshalBinary(b []byte) error { - var res InterfaceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/intervention_type.go b/v2/models/intervention_type.go deleted file mode 100644 index 09297c9e..00000000 --- a/v2/models/intervention_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// InterventionType InterventionType -// -// Specifies the type for the intervention for ongoing tasks in maintenance mode config. -// -// swagger:model InterventionType -type InterventionType struct { - - // Specifies the types of interventions associated to maintenance mode. - // Enum: ["NoIntervention","Cancel"] - Type string `json:"type,omitempty"` -} - -// Validate validates this intervention type -func (m *InterventionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var interventionTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NoIntervention","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - interventionTypeTypeTypePropEnum = append(interventionTypeTypeTypePropEnum, v) - } -} - -const ( - - // InterventionTypeTypeNoIntervention captures enum value "NoIntervention" - InterventionTypeTypeNoIntervention string = "NoIntervention" - - // InterventionTypeTypeCancel captures enum value "Cancel" - InterventionTypeTypeCancel string = "Cancel" -) - -// prop value enum -func (m *InterventionType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interventionTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *InterventionType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this intervention type based on context it is used -func (m *InterventionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *InterventionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *InterventionType) UnmarshalBinary(b []byte) error { - var res InterventionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ip_config_params.go b/v2/models/ip_config_params.go deleted file mode 100644 index cdf2b634..00000000 --- a/v2/models/ip_config_params.go +++ /dev/null @@ -1,68 +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" -) - -// IPConfigParams Specifies the IP config parameters. -// -// swagger:model IPConfigParams -type IPConfigParams struct { - - // Specifies the network interface name. IPs would be assigned to the specified interface. - Interface *string `json:"interface,omitempty"` - - // Specifies a list of IP addresses to be assigned. - Ips []string `json:"ips,omitempty"` - - // Specifies the cluster node ids. - NodeIds []string `json:"nodeIds,omitempty"` - - // Specifies the interface role. - Role *string `json:"role,omitempty"` - - // Specifies the interface gateway. - SubnetGateway *string `json:"subnetGateway,omitempty"` - - // Specifies the interface subnet mask bits. - SubnetMaskBits *int64 `json:"subnetMaskBits,omitempty"` - - // Specifies the IP family of the config. - IPFamily *int64 `json:"ipFamily,omitempty"` -} - -// Validate validates this IP config params -func (m *IPConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this IP config params based on context it is used -func (m *IPConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPConfigParams) UnmarshalBinary(b []byte) error { - var res IPConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ip_pool.go b/v2/models/ip_pool.go deleted file mode 100644 index 2900cb88..00000000 --- a/v2/models/ip_pool.go +++ /dev/null @@ -1,88 +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" -) - -// IPPool IP pools from the vlan ip addresses, the IPs in a pool goes together. -// -// swagger:model IpPool -type IPPool struct { - - // Name of the IP pool. - // Required: true - Name *string `json:"name"` - - // IP addresses. - // Required: true - Ips []string `json:"ips"` -} - -// Validate validates this Ip pool -func (m *IPPool) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IPPool) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *IPPool) validateIps(formats strfmt.Registry) error { - - if err := validate.Required("ips", "body", m.Ips); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Ip pool based on context it is used -func (m *IPPool) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPPool) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPPool) UnmarshalBinary(b []byte) error { - var res IPPool - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ip_preference.go b/v2/models/ip_preference.go deleted file mode 100644 index 3706684c..00000000 --- a/v2/models/ip_preference.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IPPreference IP Address Preference -// -// # Preferred IP address mode of the cluster -// -// swagger:model IpPreference -type IPPreference struct { - - // Specifies the ip preference of cluster. - // Enum: ["Ipv4","Ipv6"] - IPPreference string `json:"ipPreference,omitempty"` -} - -// Validate validates this Ip preference -func (m *IPPreference) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPPreference(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ipPreferenceTypeIPPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Ipv4","Ipv6"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ipPreferenceTypeIPPreferencePropEnum = append(ipPreferenceTypeIPPreferencePropEnum, v) - } -} - -const ( - - // IPPreferenceIPPreferenceIPV4 captures enum value "Ipv4" - IPPreferenceIPPreferenceIPV4 string = "Ipv4" - - // IPPreferenceIPPreferenceIPV6 captures enum value "Ipv6" - IPPreferenceIPPreferenceIPV6 string = "Ipv6" -) - -// prop value enum -func (m *IPPreference) validateIPPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ipPreferenceTypeIPPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IPPreference) validateIPPreference(formats strfmt.Registry) error { - if swag.IsZero(m.IPPreference) { // not required - return nil - } - - // value enum - if err := m.validateIPPreferenceEnum("ipPreference", "body", m.IPPreference); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Ip preference based on context it is used -func (m *IPPreference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPPreference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPPreference) UnmarshalBinary(b []byte) error { - var res IPPreference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ip_range.go b/v2/models/ip_range.go deleted file mode 100644 index 125bba3e..00000000 --- a/v2/models/ip_range.go +++ /dev/null @@ -1,88 +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" -) - -// IPRange Ip address range. -// -// swagger:model IpRange -type IPRange struct { - - // Start IP. - // Required: true - StartIP *string `json:"startIp"` - - // End IP. - // Required: true - EndIP *string `json:"endIp"` -} - -// Validate validates this Ip range -func (m *IPRange) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStartIP(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IPRange) validateStartIP(formats strfmt.Registry) error { - - if err := validate.Required("startIp", "body", m.StartIP); err != nil { - return err - } - - return nil -} - -func (m *IPRange) validateEndIP(formats strfmt.Registry) error { - - if err := validate.Required("endIp", "body", m.EndIP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Ip range based on context it is used -func (m *IPRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IPRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IPRange) UnmarshalBinary(b []byte) error { - var res IPRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ipmi_lan_config.go b/v2/models/ipmi_lan_config.go deleted file mode 100644 index 142474ef..00000000 --- a/v2/models/ipmi_lan_config.go +++ /dev/null @@ -1,88 +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" -) - -// IpmiLanConfig IPMI LAN parameters. -// -// swagger:model IpmiLanConfig -type IpmiLanConfig struct { - - // IPMI subnet mask. This should be either in CIDR prefix or in dotted decimal for IPv4. - // Required: true - IpmiSubnetMask *string `json:"ipmiSubnetMask"` - - // IPMI subnet gateway. - // Required: true - IpmiGateway *string `json:"ipmiGateway"` -} - -// Validate validates this ipmi lan config -func (m *IpmiLanConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIpmiSubnetMask(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIpmiGateway(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IpmiLanConfig) validateIpmiSubnetMask(formats strfmt.Registry) error { - - if err := validate.Required("ipmiSubnetMask", "body", m.IpmiSubnetMask); err != nil { - return err - } - - return nil -} - -func (m *IpmiLanConfig) validateIpmiGateway(formats strfmt.Registry) error { - - if err := validate.Required("ipmiGateway", "body", m.IpmiGateway); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ipmi lan config based on context it is used -func (m *IpmiLanConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IpmiLanConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IpmiLanConfig) UnmarshalBinary(b []byte) error { - var res IpmiLanConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ipmi_lan_params.go b/v2/models/ipmi_lan_params.go deleted file mode 100644 index af977157..00000000 --- a/v2/models/ipmi_lan_params.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IpmiLanParams Cluster and node level IPMI LAN parameters. -// -// swagger:model IpmiLanParams -type IpmiLanParams struct { - - // Cluster IPMI LAN parameters. - ClusterIpmiLanParams *IpmiLanConfig `json:"clusterIpmiLanParams,omitempty"` - - // Nodes IPMI LAN parameters. - NodesIpmiLanParams []*NodeIpmiLanParams `json:"nodesIpmiLanParams"` -} - -// Validate validates this ipmi lan params -func (m *IpmiLanParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIpmiLanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodesIpmiLanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IpmiLanParams) validateClusterIpmiLanParams(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIpmiLanParams) { // not required - return nil - } - - if m.ClusterIpmiLanParams != nil { - if err := m.ClusterIpmiLanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiLanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiLanParams") - } - return err - } - } - - return nil -} - -func (m *IpmiLanParams) validateNodesIpmiLanParams(formats strfmt.Registry) error { - if swag.IsZero(m.NodesIpmiLanParams) { // not required - return nil - } - - for i := 0; i < len(m.NodesIpmiLanParams); i++ { - if swag.IsZero(m.NodesIpmiLanParams[i]) { // not required - continue - } - - if m.NodesIpmiLanParams[i] != nil { - if err := m.NodesIpmiLanParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesIpmiLanParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesIpmiLanParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ipmi lan params based on the context it is used -func (m *IpmiLanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIpmiLanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodesIpmiLanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IpmiLanParams) contextValidateClusterIpmiLanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterIpmiLanParams != nil { - - if swag.IsZero(m.ClusterIpmiLanParams) { // not required - return nil - } - - if err := m.ClusterIpmiLanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiLanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiLanParams") - } - return err - } - } - - return nil -} - -func (m *IpmiLanParams) contextValidateNodesIpmiLanParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesIpmiLanParams); i++ { - - if m.NodesIpmiLanParams[i] != nil { - - if swag.IsZero(m.NodesIpmiLanParams[i]) { // not required - return nil - } - - if err := m.NodesIpmiLanParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesIpmiLanParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesIpmiLanParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IpmiLanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IpmiLanParams) UnmarshalBinary(b []byte) error { - var res IpmiLanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ipmi_users.go b/v2/models/ipmi_users.go deleted file mode 100644 index f9bbc3ce..00000000 --- a/v2/models/ipmi_users.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IpmiUsers Cluster and node level IPMI users. -// -// swagger:model IpmiUsers -type IpmiUsers struct { - - // Cluster IPMI user parameters. - ClusterIpmiUser *ClusterIpmiUser `json:"clusterIpmiUser,omitempty"` - - // Nodes IPMI user parameters. - NodesImpiUser []*NodeIpmiUser `json:"nodesImpiUser"` -} - -// Validate validates this ipmi users -func (m *IpmiUsers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIpmiUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodesImpiUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IpmiUsers) validateClusterIpmiUser(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIpmiUser) { // not required - return nil - } - - if m.ClusterIpmiUser != nil { - if err := m.ClusterIpmiUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiUser") - } - return err - } - } - - return nil -} - -func (m *IpmiUsers) validateNodesImpiUser(formats strfmt.Registry) error { - if swag.IsZero(m.NodesImpiUser) { // not required - return nil - } - - for i := 0; i < len(m.NodesImpiUser); i++ { - if swag.IsZero(m.NodesImpiUser[i]) { // not required - continue - } - - if m.NodesImpiUser[i] != nil { - if err := m.NodesImpiUser[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ipmi users based on the context it is used -func (m *IpmiUsers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIpmiUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodesImpiUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IpmiUsers) contextValidateClusterIpmiUser(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterIpmiUser != nil { - - if swag.IsZero(m.ClusterIpmiUser) { // not required - return nil - } - - if err := m.ClusterIpmiUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiUser") - } - return err - } - } - - return nil -} - -func (m *IpmiUsers) contextValidateNodesImpiUser(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesImpiUser); i++ { - - if m.NodesImpiUser[i] != nil { - - if swag.IsZero(m.NodesImpiUser[i]) { // not required - return nil - } - - if err := m.NodesImpiUser[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IpmiUsers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IpmiUsers) UnmarshalBinary(b []byte) error { - var res IpmiUsers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_data_tiering_params.go b/v2/models/isilon_data_tiering_params.go deleted file mode 100644 index 6ffaa2ab..00000000 --- a/v2/models/isilon_data_tiering_params.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonDataTieringParams Specifies the parameters which are specific to Isilon related Protection Groups. -// -// swagger:model IsilonDataTieringParams -type IsilonDataTieringParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - // Specifies the id of the root of data tiering source. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this isilon data tiering params -func (m *IsilonDataTieringParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonDataTieringParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this isilon data tiering params based on the context it is used -func (m *IsilonDataTieringParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonDataTieringParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonDataTieringParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonDataTieringParams) UnmarshalBinary(b []byte) error { - var res IsilonDataTieringParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_object_params.go b/v2/models/isilon_object_params.go deleted file mode 100644 index 41f7b60c..00000000 --- a/v2/models/isilon_object_params.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" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonObjectParams Specifies the common parameters for Isilon objects. -// -// swagger:model IsilonObjectParams -type IsilonObjectParams struct { - - // Specifies a list of NAS mount protocols supported by this object. - SupportedNasMountProtocols []string `json:"supportedNasMountProtocols"` -} - -// Validate validates this isilon object params -func (m *IsilonObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSupportedNasMountProtocols(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var isilonObjectParamsSupportedNasMountProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonObjectParamsSupportedNasMountProtocolsItemsEnum = append(isilonObjectParamsSupportedNasMountProtocolsItemsEnum, v) - } -} - -func (m *IsilonObjectParams) validateSupportedNasMountProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonObjectParamsSupportedNasMountProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonObjectParams) validateSupportedNasMountProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedNasMountProtocols) { // not required - return nil - } - - for i := 0; i < len(m.SupportedNasMountProtocols); i++ { - - // value enum - if err := m.validateSupportedNasMountProtocolsItemsEnum("supportedNasMountProtocols"+"."+strconv.Itoa(i), "body", m.SupportedNasMountProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this isilon object params based on context it is used -func (m *IsilonObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonObjectParams) UnmarshalBinary(b []byte) error { - var res IsilonObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_object_protection_params.go b/v2/models/isilon_object_protection_params.go deleted file mode 100644 index 7145004a..00000000 --- a/v2/models/isilon_object_protection_params.go +++ /dev/null @@ -1,176 +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" -) - -// IsilonObjectProtectionParams Specifies the parameters which are specific to Isilon object protection. -// -// swagger:model IsilonObjectProtectionParams -type IsilonObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies the source snapshots to be taken even if there is a pending run in a protection group. - ContinuousSnapshots *ContinuousSnapshotParams `json:"continuousSnapshots,omitempty"` - - // Specify whether to use the Isilon Changelist API to directly discover changed files/directories for faster incremental backup. Cohesity will keep an extra snapshot which will be deleted by the next successful backup. - UseChangelist *bool `json:"useChangelist,omitempty"` -} - -// Validate validates this isilon object protection params -func (m *IsilonObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContinuousSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var isilonObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonObjectProtectionParamsTypeProtocolPropEnum = append(isilonObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // IsilonObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - IsilonObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // IsilonObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - IsilonObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // IsilonObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - IsilonObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // IsilonObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - IsilonObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // IsilonObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - IsilonObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // IsilonObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - IsilonObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *IsilonObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *IsilonObjectProtectionParams) validateContinuousSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if m.ContinuousSnapshots != nil { - if err := m.ContinuousSnapshots.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -// ContextValidate validate this isilon object protection params based on the context it is used -func (m *IsilonObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateContinuousSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonObjectProtectionParams) contextValidateContinuousSnapshots(ctx context.Context, formats strfmt.Registry) error { - - if m.ContinuousSnapshots != nil { - - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if err := m.ContinuousSnapshots.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res IsilonObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_object_protection_request_params.go b/v2/models/isilon_object_protection_request_params.go deleted file mode 100644 index 9eaf197b..00000000 --- a/v2/models/isilon_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonObjectProtectionRequestParams Specifies the parameters which are specific to Isilon object protection. -// -// swagger:model IsilonObjectProtectionRequestParams -type IsilonObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - IsilonObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IsilonObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 IsilonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.IsilonObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IsilonObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.IsilonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this isilon object protection request params -func (m *IsilonObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this isilon object protection request params based on the context it is used -func (m *IsilonObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res IsilonObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_object_protection_response_params.go b/v2/models/isilon_object_protection_response_params.go deleted file mode 100644 index db8d82d3..00000000 --- a/v2/models/isilon_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// IsilonObjectProtectionResponseParams Specifies the parameters which are specific to Isilon object protection. -// -// swagger:model IsilonObjectProtectionResponseParams -type IsilonObjectProtectionResponseParams struct { - CommonNasProtectionParams - - IsilonObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IsilonObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 IsilonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.IsilonObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IsilonObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.IsilonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this isilon object protection response params -func (m *IsilonObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this isilon object protection response params based on the context it is used -func (m *IsilonObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res IsilonObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_object_protection_update_request_params.go b/v2/models/isilon_object_protection_update_request_params.go deleted file mode 100644 index d74ad56e..00000000 --- a/v2/models/isilon_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// IsilonObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Isilon object protection. -// -// swagger:model IsilonObjectProtectionUpdateRequestParams -type IsilonObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - IsilonObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IsilonObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 IsilonObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.IsilonObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IsilonObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.IsilonObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this isilon object protection update request params -func (m *IsilonObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this isilon object protection update request params based on the context it is used -func (m *IsilonObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with IsilonObjectProtectionParams - if err := m.IsilonObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res IsilonObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_protection_group_object_params.go b/v2/models/isilon_protection_group_object_params.go deleted file mode 100644 index 90ea4606..00000000 --- a/v2/models/isilon_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// IsilonProtectionGroupObjectParams Specifies an object protected by a Isilon Protection Group. -// -// swagger:model IsilonProtectionGroupObjectParams -type IsilonProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this isilon protection group object params -func (m *IsilonProtectionGroupObjectParams) 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 *IsilonProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this isilon protection group object params based on the context it is used -func (m *IsilonProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res IsilonProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_protection_group_params.go b/v2/models/isilon_protection_group_params.go deleted file mode 100644 index f1650f7a..00000000 --- a/v2/models/isilon_protection_group_params.go +++ /dev/null @@ -1,608 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonProtectionGroupParams Specifies the parameters which are specific to Isilon related Protection Groups. -// -// swagger:model IsilonProtectionGroupParams -type IsilonProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*IsilonProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the preferred protocol to use if this device supports multiple protocols. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies whether or not the Protection Group should continue regardless of whether or not an error was encountered during protection group run. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the protection group should use encryption while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specify whether to use the Isilon Changelist API to directly discover changed files/directories for faster incremental backup. Cohesity will keep an extra snapshot which will be deleted by the next successful backup. - UseChangelist *bool `json:"useChangelist,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the source snapshots to be taken even if there is a pending run in a protection group. - ContinuousSnapshots *ContinuousSnapshotParams `json:"continuousSnapshots,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` - - // Specifies if the Isilon source permissions should be modified internally to allow backups. - ModifySourcePermissions *bool `json:"modifySourcePermissions,omitempty"` -} - -// Validate validates this isilon protection group params -func (m *IsilonProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContinuousSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var isilonProtectionGroupParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonProtectionGroupParamsTypeProtocolPropEnum = append(isilonProtectionGroupParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // IsilonProtectionGroupParamsProtocolKNoProtocol captures enum value "kNoProtocol" - IsilonProtectionGroupParamsProtocolKNoProtocol string = "kNoProtocol" - - // IsilonProtectionGroupParamsProtocolKNfs3 captures enum value "kNfs3" - IsilonProtectionGroupParamsProtocolKNfs3 string = "kNfs3" - - // IsilonProtectionGroupParamsProtocolKNfs41 captures enum value "kNfs4_1" - IsilonProtectionGroupParamsProtocolKNfs41 string = "kNfs4_1" - - // IsilonProtectionGroupParamsProtocolKCifs1 captures enum value "kCifs1" - IsilonProtectionGroupParamsProtocolKCifs1 string = "kCifs1" - - // IsilonProtectionGroupParamsProtocolKCifs2 captures enum value "kCifs2" - IsilonProtectionGroupParamsProtocolKCifs2 string = "kCifs2" - - // IsilonProtectionGroupParamsProtocolKCifs3 captures enum value "kCifs3" - IsilonProtectionGroupParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *IsilonProtectionGroupParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonProtectionGroupParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonProtectionGroupParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateContinuousSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if m.ContinuousSnapshots != nil { - if err := m.ContinuousSnapshots.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this isilon protection group params based on the context it is used -func (m *IsilonProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateContinuousSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateContinuousSnapshots(ctx context.Context, formats strfmt.Registry) error { - - if m.ContinuousSnapshots != nil { - - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if err := m.ContinuousSnapshots.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonProtectionGroupParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res IsilonProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_protocol.go b/v2/models/isilon_protocol.go deleted file mode 100644 index 69e85b3a..00000000 --- a/v2/models/isilon_protocol.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// IsilonProtocol Isilon Protocol type. -// -// Isilon Protocol type. -// -// swagger:model IsilonProtocol -type IsilonProtocol struct { - - // Specifies Isilon Protocol type. - // Enum: ["kNfs","kSmb"] - IsilonProtocol string `json:"isilonProtocol,omitempty"` -} - -// Validate validates this isilon protocol -func (m *IsilonProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsilonProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var isilonProtocolTypeIsilonProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kSmb"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - isilonProtocolTypeIsilonProtocolPropEnum = append(isilonProtocolTypeIsilonProtocolPropEnum, v) - } -} - -const ( - - // IsilonProtocolIsilonProtocolKNfs captures enum value "kNfs" - IsilonProtocolIsilonProtocolKNfs string = "kNfs" - - // IsilonProtocolIsilonProtocolKSmb captures enum value "kSmb" - IsilonProtocolIsilonProtocolKSmb string = "kSmb" -) - -// prop value enum -func (m *IsilonProtocol) validateIsilonProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, isilonProtocolTypeIsilonProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *IsilonProtocol) validateIsilonProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonProtocol) { // not required - return nil - } - - // value enum - if err := m.validateIsilonProtocolEnum("isilonProtocol", "body", m.IsilonProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this isilon protocol based on context it is used -func (m *IsilonProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonProtocol) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonProtocol) UnmarshalBinary(b []byte) error { - var res IsilonProtocol - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/isilon_registration_params.go b/v2/models/isilon_registration_params.go deleted file mode 100644 index e11415bf..00000000 --- a/v2/models/isilon_registration_params.go +++ /dev/null @@ -1,283 +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" -) - -// IsilonRegistrationParams Isilon Protection Source. -// -// Specifies parameters to register an Isilon Source. -// -// swagger:model IsilonRegistrationParams -type IsilonRegistrationParams struct { - - // Specifies the IP Address Endpoint for the Isilon Source. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the credentials for an Isilon Source. - // Required: true - Credentials *Credentials `json:"credentials"` - - // Specifies whether or not to back up SMB Volumes. - BackUpSMBVolumes *bool `json:"backUpSMBVolumes,omitempty"` - - // Specifies the credentials for SMB Volumes. Must be specified if backUpSMBVolumes is set to true. - SmbCredentials *SmbMountCredentials `json:"smbCredentials,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` -} - -// Validate validates this isilon registration params -func (m *IsilonRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -func (m *IsilonRegistrationParams) validateCredentials(formats strfmt.Registry) error { - - if err := validate.Required("credentials", "body", m.Credentials); err != nil { - return err - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) validateSmbCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if m.SmbCredentials != nil { - if err := m.SmbCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this isilon registration params based on the context it is used -func (m *IsilonRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *IsilonRegistrationParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) contextValidateSmbCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbCredentials != nil { - - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if err := m.SmbCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *IsilonRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *IsilonRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IsilonRegistrationParams) UnmarshalBinary(b []byte) error { - var res IsilonRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/item_task_status_type.go b/v2/models/item_task_status_type.go deleted file mode 100644 index 0e4bc181..00000000 --- a/v2/models/item_task_status_type.go +++ /dev/null @@ -1,116 +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" -) - -// ItemTaskStatusType Mailbox task items' task status types for search. -// -// Mailbox task items' task status types for search. -// -// swagger:model ItemTaskStatusType -type ItemTaskStatusType struct { - - // Specifies the Mailbox task item's task status type for search. - // Enum: ["NotStarted","InProgress","Completed","WaitingOnOthers","Deferred"] - Type string `json:"type,omitempty"` -} - -// Validate validates this item task status type -func (m *ItemTaskStatusType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var itemTaskStatusTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotStarted","InProgress","Completed","WaitingOnOthers","Deferred"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - itemTaskStatusTypeTypeTypePropEnum = append(itemTaskStatusTypeTypeTypePropEnum, v) - } -} - -const ( - - // ItemTaskStatusTypeTypeNotStarted captures enum value "NotStarted" - ItemTaskStatusTypeTypeNotStarted string = "NotStarted" - - // ItemTaskStatusTypeTypeInProgress captures enum value "InProgress" - ItemTaskStatusTypeTypeInProgress string = "InProgress" - - // ItemTaskStatusTypeTypeCompleted captures enum value "Completed" - ItemTaskStatusTypeTypeCompleted string = "Completed" - - // ItemTaskStatusTypeTypeWaitingOnOthers captures enum value "WaitingOnOthers" - ItemTaskStatusTypeTypeWaitingOnOthers string = "WaitingOnOthers" - - // ItemTaskStatusTypeTypeDeferred captures enum value "Deferred" - ItemTaskStatusTypeTypeDeferred string = "Deferred" -) - -// prop value enum -func (m *ItemTaskStatusType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, itemTaskStatusTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ItemTaskStatusType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this item task status type based on context it is used -func (m *ItemTaskStatusType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ItemTaskStatusType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ItemTaskStatusType) UnmarshalBinary(b []byte) error { - var res ItemTaskStatusType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/job_handle.go b/v2/models/job_handle.go deleted file mode 100644 index a49a057c..00000000 --- a/v2/models/job_handle.go +++ /dev/null @@ -1,27 +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" -) - -// JobHandle Job handle for this request. -// -// swagger:model JobHandle -type JobHandle string - -// Validate validates this job handle -func (m JobHandle) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this job handle based on context it is used -func (m JobHandle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/k_m_s_state.go b/v2/models/k_m_s_state.go deleted file mode 100644 index f838f6e4..00000000 --- a/v2/models/k_m_s_state.go +++ /dev/null @@ -1,110 +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" -) - -// KMSState KMS State -// -// Specifies the state of key management system. -// -// swagger:model KMSState -type KMSState struct { - - // Specifies the state of KMS. - // Enum: ["Active","InActive","MarkedForRemoval"] - Value string `json:"value,omitempty"` -} - -// Validate validates this k m s state -func (m *KMSState) 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 kMSStateTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","InActive","MarkedForRemoval"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kMSStateTypeValuePropEnum = append(kMSStateTypeValuePropEnum, v) - } -} - -const ( - - // KMSStateValueActive captures enum value "Active" - KMSStateValueActive string = "Active" - - // KMSStateValueInActive captures enum value "InActive" - KMSStateValueInActive string = "InActive" - - // KMSStateValueMarkedForRemoval captures enum value "MarkedForRemoval" - KMSStateValueMarkedForRemoval string = "MarkedForRemoval" -) - -// prop value enum -func (m *KMSState) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kMSStateTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KMSState) 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 k m s state based on context it is used -func (m *KMSState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KMSState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KMSState) UnmarshalBinary(b []byte) error { - var res KMSState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/k_m_s_type.go b/v2/models/k_m_s_type.go deleted file mode 100644 index 8d7c98cd..00000000 --- a/v2/models/k_m_s_type.go +++ /dev/null @@ -1,110 +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" -) - -// KMSType KMS Type -// -// Specifies the type of key management system. -// -// swagger:model KMSType -type KMSType struct { - - // Specifies the type of KMS. - // Enum: ["InternalKms","AwsKms","KmipKms"] - Value string `json:"value,omitempty"` -} - -// Validate validates this k m s type -func (m *KMSType) 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 kMSTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InternalKms","AwsKms","KmipKms"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kMSTypeTypeValuePropEnum = append(kMSTypeTypeValuePropEnum, v) - } -} - -const ( - - // KMSTypeValueInternalKms captures enum value "InternalKms" - KMSTypeValueInternalKms string = "InternalKms" - - // KMSTypeValueAwsKms captures enum value "AwsKms" - KMSTypeValueAwsKms string = "AwsKms" - - // KMSTypeValueKmipKms captures enum value "KmipKms" - KMSTypeValueKmipKms string = "KmipKms" -) - -// prop value enum -func (m *KMSType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kMSTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KMSType) 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 k m s type based on context it is used -func (m *KMSType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KMSType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KMSType) UnmarshalBinary(b []byte) error { - var res KMSType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/k_m_s_usage_type.go b/v2/models/k_m_s_usage_type.go deleted file mode 100644 index 792c3837..00000000 --- a/v2/models/k_m_s_usage_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KMSUsageType KMS Usage Type -// -// Specifies the usage type of key management system. -// -// swagger:model KMSUsageType -type KMSUsageType struct { - - // Specifies the usage type of KMS. - // Enum: ["kArchival","kRpaasArchival"] - Value string `json:"value,omitempty"` -} - -// Validate validates this k m s usage type -func (m *KMSUsageType) 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 kMSUsageTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kArchival","kRpaasArchival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kMSUsageTypeTypeValuePropEnum = append(kMSUsageTypeTypeValuePropEnum, v) - } -} - -const ( - - // KMSUsageTypeValueKArchival captures enum value "kArchival" - KMSUsageTypeValueKArchival string = "kArchival" - - // KMSUsageTypeValueKRpaasArchival captures enum value "kRpaasArchival" - KMSUsageTypeValueKRpaasArchival string = "kRpaasArchival" -) - -// prop value enum -func (m *KMSUsageType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kMSUsageTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KMSUsageType) 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 k m s usage type based on context it is used -func (m *KMSUsageType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KMSUsageType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KMSUsageType) UnmarshalBinary(b []byte) error { - var res KMSUsageType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kerberos_provider.go b/v2/models/kerberos_provider.go deleted file mode 100644 index 39e4bcf9..00000000 --- a/v2/models/kerberos_provider.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KerberosProvider Specifies the the Kerberos Provider details. -// -// swagger:model KerberosProvider -type KerberosProvider struct { - - // Specifies the id. - // Read Only: true - // Pattern: ^\d+:\d+:\d+$ - ID *string `json:"id,omitempty"` - - // Specifies the realm name. - // Required: true - RealmName *string `json:"realmName"` - - // Specifies a list of Key distribution Centre(KDC) Severs. - // Required: true - KdcServers []string `json:"kdcServers"` - - // Specifies the admin server used for registration from - // the list of KDC servers. - // Required: true - AdminServer *string `json:"adminServer"` - - // Specifies the LDAP provider id to be mapped - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Specifies if specified host alias should - // overwrite existing host alias. - OverwritehostAlias *bool `json:"overwritehostAlias,omitempty"` - - // Specifies the DNS routable host alias names. - // Required: true - HostAlias []string `json:"hostAlias"` -} - -// Validate validates this kerberos provider -func (m *KerberosProvider) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRealmName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKdcServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdminServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostAlias(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KerberosProvider) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := validate.Pattern("id", "body", *m.ID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *KerberosProvider) validateRealmName(formats strfmt.Registry) error { - - if err := validate.Required("realmName", "body", m.RealmName); err != nil { - return err - } - - return nil -} - -func (m *KerberosProvider) validateKdcServers(formats strfmt.Registry) error { - - if err := validate.Required("kdcServers", "body", m.KdcServers); err != nil { - return err - } - - return nil -} - -func (m *KerberosProvider) validateAdminServer(formats strfmt.Registry) error { - - if err := validate.Required("adminServer", "body", m.AdminServer); err != nil { - return err - } - - return nil -} - -func (m *KerberosProvider) validateHostAlias(formats strfmt.Registry) error { - - if err := validate.Required("hostAlias", "body", m.HostAlias); err != nil { - return err - } - - for i := 0; i < len(m.HostAlias); i++ { - - if err := validate.Pattern("hostAlias"+"."+strconv.Itoa(i), "body", m.HostAlias[i], `^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]+[a-zA-Z0-9])$`); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this kerberos provider based on the context it is used -func (m *KerberosProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KerberosProvider) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KerberosProvider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KerberosProvider) UnmarshalBinary(b []byte) error { - var res KerberosProvider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kerberos_providers.go b/v2/models/kerberos_providers.go deleted file mode 100644 index 10d79313..00000000 --- a/v2/models/kerberos_providers.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// KerberosProviders Response of Kerberos Providers. -// -// swagger:model KerberosProviders -type KerberosProviders struct { - - // A list of registered Kerberos Providers. - KerberosProviders []*KerberosProvider `json:"kerberosProviders,omitempty"` -} - -// Validate validates this kerberos providers -func (m *KerberosProviders) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKerberosProviders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KerberosProviders) validateKerberosProviders(formats strfmt.Registry) error { - if swag.IsZero(m.KerberosProviders) { // not required - return nil - } - - for i := 0; i < len(m.KerberosProviders); i++ { - if swag.IsZero(m.KerberosProviders[i]) { // not required - continue - } - - if m.KerberosProviders[i] != nil { - if err := m.KerberosProviders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kerberosProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kerberosProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this kerberos providers based on the context it is used -func (m *KerberosProviders) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKerberosProviders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KerberosProviders) contextValidateKerberosProviders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.KerberosProviders); i++ { - - if m.KerberosProviders[i] != nil { - - if swag.IsZero(m.KerberosProviders[i]) { // not required - return nil - } - - if err := m.KerberosProviders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kerberosProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kerberosProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KerberosProviders) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KerberosProviders) UnmarshalBinary(b []byte) error { - var res KerberosProviders - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/key_value_pair.go b/v2/models/key_value_pair.go deleted file mode 100644 index ff4e8505..00000000 --- a/v2/models/key_value_pair.go +++ /dev/null @@ -1,90 +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" -) - -// KeyValuePair KeyValuePair -// -// Specifies a map structure to store Key and Values. -// -// swagger:model KeyValuePair -type KeyValuePair struct { - - // key - // Required: true - Key *string `json:"key"` - - // value - // Required: true - Value *string `json:"value"` -} - -// Validate validates this key value pair -func (m *KeyValuePair) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyValuePair) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *KeyValuePair) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this key value pair based on context it is used -func (m *KeyValuePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KeyValuePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyValuePair) UnmarshalBinary(b []byte) error { - var res KeyValuePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystone.go b/v2/models/keystone.go deleted file mode 100644 index c4bd016c..00000000 --- a/v2/models/keystone.go +++ /dev/null @@ -1,182 +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" -) - -// Keystone Specifies a Keystone. -// -// swagger:model Keystone -type Keystone struct { - KeystoneCredentials - - // Specifies the Keystone configuration name. - // Required: true - Name *string `json:"name"` - - // Specifies the Keystone configuration id. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the url points to the Keystone service. - // Required: true - AuthURL *string `json:"authUrl"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Keystone) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 KeystoneCredentials - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.KeystoneCredentials = aO0 - - // AO1 - var dataAO1 struct { - Name *string `json:"name"` - - ID *int64 `json:"id,omitempty"` - - AuthURL *string `json:"authUrl"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Name = dataAO1.Name - - m.ID = dataAO1.ID - - m.AuthURL = dataAO1.AuthURL - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Keystone) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.KeystoneCredentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Name *string `json:"name"` - - ID *int64 `json:"id,omitempty"` - - AuthURL *string `json:"authUrl"` - } - - dataAO1.Name = m.Name - - dataAO1.ID = m.ID - - dataAO1.AuthURL = m.AuthURL - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this keystone -func (m *Keystone) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KeystoneCredentials - if err := m.KeystoneCredentials.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Keystone) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *Keystone) validateAuthURL(formats strfmt.Registry) error { - - if err := validate.Required("authUrl", "body", m.AuthURL); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this keystone based on the context it is used -func (m *Keystone) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KeystoneCredentials - if err := m.KeystoneCredentials.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Keystone) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Keystone) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Keystone) UnmarshalBinary(b []byte) error { - var res Keystone - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystone_admin_params.go b/v2/models/keystone_admin_params.go deleted file mode 100644 index bd7ab6d4..00000000 --- a/v2/models/keystone_admin_params.go +++ /dev/null @@ -1,91 +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" -) - -// KeystoneAdminParams Specifies administrator credentials of a Keystone. -// -// swagger:model KeystoneAdminParams -type KeystoneAdminParams struct { - - // Specifies the administrator domain name. - // Required: true - Domain *string `json:"domain"` - - // Specifies the username of Keystone administrator. - // Required: true - Username *string `json:"username"` - - // Specifies the password of Keystone administrator. - Password *string `json:"password,omitempty"` -} - -// Validate validates this keystone admin params -func (m *KeystoneAdminParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneAdminParams) validateDomain(formats strfmt.Registry) error { - - if err := validate.Required("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -func (m *KeystoneAdminParams) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this keystone admin params based on context it is used -func (m *KeystoneAdminParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneAdminParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneAdminParams) UnmarshalBinary(b []byte) error { - var res KeystoneAdminParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystone_credentials.go b/v2/models/keystone_credentials.go deleted file mode 100644 index d89014f5..00000000 --- a/v2/models/keystone_credentials.go +++ /dev/null @@ -1,157 +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" -) - -// KeystoneCredentials Specifies user credentials of a Keystone server. -// -// swagger:model KeystoneCredentials -type KeystoneCredentials struct { - - // Specifies parameters related to Keystone administrator. - // Required: true - AdminCreds *KeystoneAdminParams `json:"adminCreds"` - - // Specifies parameters related to Keystone scope. - // Required: true - Scope *KeystoneScopeParams `json:"scope"` -} - -// Validate validates this keystone credentials -func (m *KeystoneCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdminCreds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScope(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneCredentials) validateAdminCreds(formats strfmt.Registry) error { - - if err := validate.Required("adminCreds", "body", m.AdminCreds); err != nil { - return err - } - - if m.AdminCreds != nil { - if err := m.AdminCreds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adminCreds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adminCreds") - } - return err - } - } - - return nil -} - -func (m *KeystoneCredentials) validateScope(formats strfmt.Registry) error { - - if err := validate.Required("scope", "body", m.Scope); err != nil { - return err - } - - if m.Scope != nil { - if err := m.Scope.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scope") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scope") - } - return err - } - } - - return nil -} - -// ContextValidate validate this keystone credentials based on the context it is used -func (m *KeystoneCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAdminCreds(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScope(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneCredentials) contextValidateAdminCreds(ctx context.Context, formats strfmt.Registry) error { - - if m.AdminCreds != nil { - - if err := m.AdminCreds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adminCreds") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adminCreds") - } - return err - } - } - - return nil -} - -func (m *KeystoneCredentials) contextValidateScope(ctx context.Context, formats strfmt.Registry) error { - - if m.Scope != nil { - - if err := m.Scope.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scope") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scope") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneCredentials) UnmarshalBinary(b []byte) error { - var res KeystoneCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystone_scope_params.go b/v2/models/keystone_scope_params.go deleted file mode 100644 index a93c4418..00000000 --- a/v2/models/keystone_scope_params.go +++ /dev/null @@ -1,214 +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" -) - -// KeystoneScopeParams Specifies scope paramteres of a Keystone. -// -// swagger:model KeystoneScopeParams -type KeystoneScopeParams struct { - - // Specifies the scope type. - // Required: true - // Enum: ["Project","Domain"] - Type *string `json:"type"` - - // Specifies the parameters for domain type scope. - DomainScopeParams *DomainScopeParams `json:"domainScopeParams,omitempty"` - - // Specifies the parameter for project type scope. - ProjectScopeParams *ProjectScopeParams `json:"projectScopeParams,omitempty"` -} - -// Validate validates this keystone scope params -func (m *KeystoneScopeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomainScopeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProjectScopeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var keystoneScopeParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Project","Domain"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - keystoneScopeParamsTypeTypePropEnum = append(keystoneScopeParamsTypeTypePropEnum, v) - } -} - -const ( - - // KeystoneScopeParamsTypeProject captures enum value "Project" - KeystoneScopeParamsTypeProject string = "Project" - - // KeystoneScopeParamsTypeDomain captures enum value "Domain" - KeystoneScopeParamsTypeDomain string = "Domain" -) - -// prop value enum -func (m *KeystoneScopeParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, keystoneScopeParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KeystoneScopeParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *KeystoneScopeParams) validateDomainScopeParams(formats strfmt.Registry) error { - if swag.IsZero(m.DomainScopeParams) { // not required - return nil - } - - if m.DomainScopeParams != nil { - if err := m.DomainScopeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainScopeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainScopeParams") - } - return err - } - } - - return nil -} - -func (m *KeystoneScopeParams) validateProjectScopeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ProjectScopeParams) { // not required - return nil - } - - if m.ProjectScopeParams != nil { - if err := m.ProjectScopeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectScopeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectScopeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this keystone scope params based on the context it is used -func (m *KeystoneScopeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDomainScopeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProjectScopeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeystoneScopeParams) contextValidateDomainScopeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DomainScopeParams != nil { - - if swag.IsZero(m.DomainScopeParams) { // not required - return nil - } - - if err := m.DomainScopeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("domainScopeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("domainScopeParams") - } - return err - } - } - - return nil -} - -func (m *KeystoneScopeParams) contextValidateProjectScopeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ProjectScopeParams != nil { - - if swag.IsZero(m.ProjectScopeParams) { // not required - return nil - } - - if err := m.ProjectScopeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("projectScopeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("projectScopeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneScopeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneScopeParams) UnmarshalBinary(b []byte) error { - var res KeystoneScopeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystone_scope_type.go b/v2/models/keystone_scope_type.go deleted file mode 100644 index 37546738..00000000 --- a/v2/models/keystone_scope_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KeystoneScopeType Keystone Scope Type -// -// Scope type of a Keystone configuration. -// -// swagger:model KeystoneScopeType -type KeystoneScopeType struct { - - // Specifies the scope type of a Keystone configuration. - // Enum: ["Project","Domain"] - KeystoneScopeType string `json:"keystoneScopeType,omitempty"` -} - -// Validate validates this keystone scope type -func (m *KeystoneScopeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKeystoneScopeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var keystoneScopeTypeTypeKeystoneScopeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Project","Domain"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - keystoneScopeTypeTypeKeystoneScopeTypePropEnum = append(keystoneScopeTypeTypeKeystoneScopeTypePropEnum, v) - } -} - -const ( - - // KeystoneScopeTypeKeystoneScopeTypeProject captures enum value "Project" - KeystoneScopeTypeKeystoneScopeTypeProject string = "Project" - - // KeystoneScopeTypeKeystoneScopeTypeDomain captures enum value "Domain" - KeystoneScopeTypeKeystoneScopeTypeDomain string = "Domain" -) - -// prop value enum -func (m *KeystoneScopeType) validateKeystoneScopeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, keystoneScopeTypeTypeKeystoneScopeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KeystoneScopeType) validateKeystoneScopeType(formats strfmt.Registry) error { - if swag.IsZero(m.KeystoneScopeType) { // not required - return nil - } - - // value enum - if err := m.validateKeystoneScopeTypeEnum("keystoneScopeType", "body", m.KeystoneScopeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this keystone scope type based on context it is used -func (m *KeystoneScopeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *KeystoneScopeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeystoneScopeType) UnmarshalBinary(b []byte) error { - var res KeystoneScopeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/keystones.go b/v2/models/keystones.go deleted file mode 100644 index d9beffaa..00000000 --- a/v2/models/keystones.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Keystones Specifies a list of Keystones. -// -// swagger:model Keystones -type Keystones struct { - - // Specifies a list of Keystones. - Keystones []*Keystone `json:"keystones"` -} - -// Validate validates this keystones -func (m *Keystones) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKeystones(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Keystones) validateKeystones(formats strfmt.Registry) error { - if swag.IsZero(m.Keystones) { // not required - return nil - } - - for i := 0; i < len(m.Keystones); i++ { - if swag.IsZero(m.Keystones[i]) { // not required - continue - } - - if m.Keystones[i] != nil { - if err := m.Keystones[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this keystones based on the context it is used -func (m *Keystones) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeystones(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Keystones) contextValidateKeystones(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Keystones); i++ { - - if m.Keystones[i] != nil { - - if swag.IsZero(m.Keystones[i]) { // not required - return nil - } - - if err := m.Keystones[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Keystones) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Keystones) UnmarshalBinary(b []byte) error { - var res Keystones - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kmip_kms_configuration.go b/v2/models/kmip_kms_configuration.go deleted file mode 100644 index 8387aca6..00000000 --- a/v2/models/kmip_kms_configuration.go +++ /dev/null @@ -1,212 +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" -) - -// KmipKmsConfiguration KMIP compliant KMS configuration parameters. -// -// swagger:model KmipKmsConfiguration -type KmipKmsConfiguration struct { - - // CA certificate. - // Required: true - CaCertificate *string `json:"caCertificate"` - - // Client key. - // Required: true - ClientKey *string `json:"clientKey"` - - // Client certificate. - // Required: true - ClientCertificate *string `json:"clientCertificate"` - - // KMIP protocol version used to communicate with the KMS. - // Required: true - // Enum: ["KMIP1_1","KMIP1_2","KMIP1_3","KMIP1_4","KMIP2_0"] - ProtocolVersion *string `json:"protocolVersion"` - - // KMS server IP address or FQDN. - // Required: true - Server *string `json:"server"` - - // Port on which the KMS server is listening. - Port *int32 `json:"port,omitempty"` - - // Specifies expiry date of client certificate in msecs. - // Read Only: true - CertificateExpiryDate *int64 `json:"certificateExpiryDate,omitempty"` - - // Additional KMS server IP address or FQDNs for fail over. - AdditionalServerAddress []string `json:"AdditionalServerAddress"` -} - -// Validate validates this kmip kms configuration -func (m *KmipKmsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCaCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmipKmsConfiguration) validateCaCertificate(formats strfmt.Registry) error { - - if err := validate.Required("caCertificate", "body", m.CaCertificate); err != nil { - return err - } - - return nil -} - -func (m *KmipKmsConfiguration) validateClientKey(formats strfmt.Registry) error { - - if err := validate.Required("clientKey", "body", m.ClientKey); err != nil { - return err - } - - return nil -} - -func (m *KmipKmsConfiguration) validateClientCertificate(formats strfmt.Registry) error { - - if err := validate.Required("clientCertificate", "body", m.ClientCertificate); err != nil { - return err - } - - return nil -} - -var kmipKmsConfigurationTypeProtocolVersionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KMIP1_1","KMIP1_2","KMIP1_3","KMIP1_4","KMIP2_0"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmipKmsConfigurationTypeProtocolVersionPropEnum = append(kmipKmsConfigurationTypeProtocolVersionPropEnum, v) - } -} - -const ( - - // KmipKmsConfigurationProtocolVersionKMIP11 captures enum value "KMIP1_1" - KmipKmsConfigurationProtocolVersionKMIP11 string = "KMIP1_1" - - // KmipKmsConfigurationProtocolVersionKMIP12 captures enum value "KMIP1_2" - KmipKmsConfigurationProtocolVersionKMIP12 string = "KMIP1_2" - - // KmipKmsConfigurationProtocolVersionKMIP13 captures enum value "KMIP1_3" - KmipKmsConfigurationProtocolVersionKMIP13 string = "KMIP1_3" - - // KmipKmsConfigurationProtocolVersionKMIP14 captures enum value "KMIP1_4" - KmipKmsConfigurationProtocolVersionKMIP14 string = "KMIP1_4" - - // KmipKmsConfigurationProtocolVersionKMIP20 captures enum value "KMIP2_0" - KmipKmsConfigurationProtocolVersionKMIP20 string = "KMIP2_0" -) - -// prop value enum -func (m *KmipKmsConfiguration) validateProtocolVersionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmipKmsConfigurationTypeProtocolVersionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmipKmsConfiguration) validateProtocolVersion(formats strfmt.Registry) error { - - if err := validate.Required("protocolVersion", "body", m.ProtocolVersion); err != nil { - return err - } - - // value enum - if err := m.validateProtocolVersionEnum("protocolVersion", "body", *m.ProtocolVersion); err != nil { - return err - } - - return nil -} - -func (m *KmipKmsConfiguration) validateServer(formats strfmt.Registry) error { - - if err := validate.Required("server", "body", m.Server); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kmip kms configuration based on the context it is used -func (m *KmipKmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificateExpiryDate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmipKmsConfiguration) contextValidateCertificateExpiryDate(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "certificateExpiryDate", "body", m.CertificateExpiryDate); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmipKmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmipKmsConfiguration) UnmarshalBinary(b []byte) error { - var res KmipKmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kmip_kms_configuration_response.go b/v2/models/kmip_kms_configuration_response.go deleted file mode 100644 index a40b1c8c..00000000 --- a/v2/models/kmip_kms_configuration_response.go +++ /dev/null @@ -1,145 +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" -) - -// KmipKmsConfigurationResponse KMIP compliant KMS configuration response params. -// -// swagger:model KmipKmsConfigurationResponse -type KmipKmsConfigurationResponse struct { - - // KMIP protocol version used to communicate with the KMS. - // Enum: ["KMIP1_1","KMIP1_2","KMIP1_3","KMIP1_4","KMIP2_0"] - ProtocolVersion *string `json:"protocolVersion,omitempty"` - - // KMS server IP address or FQDN. - Server *string `json:"server,omitempty"` - - // Port on which the KMS server is listening. - Port *int32 `json:"port,omitempty"` - - // Specifies expiry date of client certificate in msecs. - // Read Only: true - CertificateExpiryDate *int64 `json:"certificateExpiryDate,omitempty"` - - // Additional KMS server IP address or FQDNs for fail over. - AdditionalServerAddress []string `json:"AdditionalServerAddress"` -} - -// Validate validates this kmip kms configuration response -func (m *KmipKmsConfigurationResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocolVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var kmipKmsConfigurationResponseTypeProtocolVersionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KMIP1_1","KMIP1_2","KMIP1_3","KMIP1_4","KMIP2_0"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmipKmsConfigurationResponseTypeProtocolVersionPropEnum = append(kmipKmsConfigurationResponseTypeProtocolVersionPropEnum, v) - } -} - -const ( - - // KmipKmsConfigurationResponseProtocolVersionKMIP11 captures enum value "KMIP1_1" - KmipKmsConfigurationResponseProtocolVersionKMIP11 string = "KMIP1_1" - - // KmipKmsConfigurationResponseProtocolVersionKMIP12 captures enum value "KMIP1_2" - KmipKmsConfigurationResponseProtocolVersionKMIP12 string = "KMIP1_2" - - // KmipKmsConfigurationResponseProtocolVersionKMIP13 captures enum value "KMIP1_3" - KmipKmsConfigurationResponseProtocolVersionKMIP13 string = "KMIP1_3" - - // KmipKmsConfigurationResponseProtocolVersionKMIP14 captures enum value "KMIP1_4" - KmipKmsConfigurationResponseProtocolVersionKMIP14 string = "KMIP1_4" - - // KmipKmsConfigurationResponseProtocolVersionKMIP20 captures enum value "KMIP2_0" - KmipKmsConfigurationResponseProtocolVersionKMIP20 string = "KMIP2_0" -) - -// prop value enum -func (m *KmipKmsConfigurationResponse) validateProtocolVersionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmipKmsConfigurationResponseTypeProtocolVersionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmipKmsConfigurationResponse) validateProtocolVersion(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolVersion) { // not required - return nil - } - - // value enum - if err := m.validateProtocolVersionEnum("protocolVersion", "body", *m.ProtocolVersion); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kmip kms configuration response based on the context it is used -func (m *KmipKmsConfigurationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificateExpiryDate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmipKmsConfigurationResponse) contextValidateCertificateExpiryDate(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "certificateExpiryDate", "body", m.CertificateExpiryDate); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmipKmsConfigurationResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmipKmsConfigurationResponse) UnmarshalBinary(b []byte) error { - var res KmipKmsConfigurationResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configuration.go b/v2/models/kms_configuration.go deleted file mode 100644 index b1a6b0d5..00000000 --- a/v2/models/kms_configuration.go +++ /dev/null @@ -1,197 +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" -) - -// KmsConfiguration Key management system(KMS) configurations. -// -// swagger:model KmsConfiguration -type KmsConfiguration struct { - KmsConfigurationResponseParams - - // Id of KMS. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the state of KMS. 'Active' indicates that KMS is reachable from cluster. 'InActive' indicates that KMS is not reachable from cluster. 'MarkedForRemoval' indicates that KMS is marked for removal and the removal process is in progress. - // Read Only: true - // Enum: ["Active","InActive","MarkedForRemoval"] - State *string `json:"state,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *KmsConfiguration) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 KmsConfigurationResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.KmsConfigurationResponseParams = aO0 - - // AO1 - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - State *string `json:"state,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.State = dataAO1.State - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m KmsConfiguration) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.KmsConfigurationResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - State *string `json:"state,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.State = m.State - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this kms configuration -func (m *KmsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KmsConfigurationResponseParams - if err := m.KmsConfigurationResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var kmsConfigurationTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","InActive","MarkedForRemoval"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationTypeStatePropEnum = append(kmsConfigurationTypeStatePropEnum, v) - } -} - -// property enum -func (m *KmsConfiguration) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfiguration) validateState(formats strfmt.Registry) error { - - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kms configuration based on the context it is used -func (m *KmsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KmsConfigurationResponseParams - if err := m.KmsConfigurationResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfiguration) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *KmsConfiguration) contextValidateState(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "state", "body", m.State); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfiguration) UnmarshalBinary(b []byte) error { - var res KmsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configuration_add_update_params.go b/v2/models/kms_configuration_add_update_params.go deleted file mode 100644 index adbeb4e6..00000000 --- a/v2/models/kms_configuration_add_update_params.go +++ /dev/null @@ -1,133 +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" -) - -// KmsConfigurationAddUpdateParams Parameters to update or add key management system(KMS) on the cluster. -// -// swagger:model KmsConfigurationAddUpdateParams -type KmsConfigurationAddUpdateParams struct { - - // Name of the KMS. - // Required: true - Name *string `json:"name"` - - // Ids of storage domains used to assign the KMS for encryption. Once an external KMS (AWS KMS or KIMP KMS) is assigned to a storage domain, it cannot be changed. - StorageDomainIds []int64 `json:"storageDomainIds"` - - // Ids of external targets used to assign the KMS for encryption. Once an external KMS (AWS KMS or KIMP KMS) is assigned to an external target, it cannot be changed. - ExternalTargetIds []int64 `json:"externalTargetIds"` - - // KMIP compliant KMS configuration. - KmipKmsParams *KmipKmsConfiguration `json:"kmipKmsParams,omitempty"` -} - -// Validate validates this kms configuration add update params -func (m *KmsConfigurationAddUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKmipKmsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationAddUpdateParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *KmsConfigurationAddUpdateParams) validateKmipKmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.KmipKmsParams) { // not required - return nil - } - - if m.KmipKmsParams != nil { - if err := m.KmipKmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmipKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmipKmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kms configuration add update params based on the context it is used -func (m *KmsConfigurationAddUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKmipKmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationAddUpdateParams) contextValidateKmipKmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KmipKmsParams != nil { - - if swag.IsZero(m.KmipKmsParams) { // not required - return nil - } - - if err := m.KmipKmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmipKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmipKmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurationAddUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurationAddUpdateParams) UnmarshalBinary(b []byte) error { - var res KmsConfigurationAddUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configuration_create_params.go b/v2/models/kms_configuration_create_params.go deleted file mode 100644 index 38488d0d..00000000 --- a/v2/models/kms_configuration_create_params.go +++ /dev/null @@ -1,321 +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" -) - -// KmsConfigurationCreateParams Parameters to add key management system(KMS) on the cluster. -// -// swagger:model KmsConfigurationCreateParams -type KmsConfigurationCreateParams struct { - - // Type of KMS. 'InternalKms' indicates the internal cluster KMS. 'AwsKms' indicates AWS KMS. 'KmipKms' indicates any KMIP compliant KMS. - // Required: true - // Enum: ["InternalKms","AwsKms","KmipKms"] - Type *string `json:"type"` - - // Specifies the usage type of the kms config. 'kArchival' indicates this is used for regular archival. 'kRpaasArchival' indicates this is used for RPaaS only. - // Enum: ["kArchival","kRpaasArchival"] - UsageType *string `json:"usageType,omitempty"` - - // Specifies the ownership context of the kms config. 'Local' indicates this is used for regular archival. 'FortKnox' indicates this is used for FortKnox only. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // AWS KMS configuration. - AwsKmsParams *AwsKmsConfiguration `json:"awsKmsParams,omitempty"` - - KmsConfigurationAddUpdateParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *KmsConfigurationCreateParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Type *string `json:"type"` - - UsageType *string `json:"usageType,omitempty"` - - OwnershipContext *string `json:"ownershipContext,omitempty"` - - AwsKmsParams *AwsKmsConfiguration `json:"awsKmsParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Type = dataAO0.Type - - m.UsageType = dataAO0.UsageType - - m.OwnershipContext = dataAO0.OwnershipContext - - m.AwsKmsParams = dataAO0.AwsKmsParams - - // AO1 - var aO1 KmsConfigurationAddUpdateParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.KmsConfigurationAddUpdateParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m KmsConfigurationCreateParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Type *string `json:"type"` - - UsageType *string `json:"usageType,omitempty"` - - OwnershipContext *string `json:"ownershipContext,omitempty"` - - AwsKmsParams *AwsKmsConfiguration `json:"awsKmsParams,omitempty"` - } - - dataAO0.Type = m.Type - - dataAO0.UsageType = m.UsageType - - dataAO0.OwnershipContext = m.OwnershipContext - - dataAO0.AwsKmsParams = m.AwsKmsParams - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.KmsConfigurationAddUpdateParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this kms configuration create params -func (m *KmsConfigurationCreateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsKmsParams(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with KmsConfigurationAddUpdateParams - if err := m.KmsConfigurationAddUpdateParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var kmsConfigurationCreateParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InternalKms","AwsKms","KmipKms"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationCreateParamsTypeTypePropEnum = append(kmsConfigurationCreateParamsTypeTypePropEnum, v) - } -} - -// property enum -func (m *KmsConfigurationCreateParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationCreateParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationCreateParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var kmsConfigurationCreateParamsTypeUsageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kArchival","kRpaasArchival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationCreateParamsTypeUsageTypePropEnum = append(kmsConfigurationCreateParamsTypeUsageTypePropEnum, v) - } -} - -// property enum -func (m *KmsConfigurationCreateParams) validateUsageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationCreateParamsTypeUsageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationCreateParams) validateUsageType(formats strfmt.Registry) error { - - if swag.IsZero(m.UsageType) { // not required - return nil - } - - // value enum - if err := m.validateUsageTypeEnum("usageType", "body", *m.UsageType); err != nil { - return err - } - - return nil -} - -var kmsConfigurationCreateParamsTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationCreateParamsTypeOwnershipContextPropEnum = append(kmsConfigurationCreateParamsTypeOwnershipContextPropEnum, v) - } -} - -// property enum -func (m *KmsConfigurationCreateParams) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationCreateParamsTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationCreateParams) validateOwnershipContext(formats strfmt.Registry) error { - - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -func (m *KmsConfigurationCreateParams) validateAwsKmsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if m.AwsKmsParams != nil { - if err := m.AwsKmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kms configuration create params based on the context it is used -func (m *KmsConfigurationCreateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with KmsConfigurationAddUpdateParams - if err := m.KmsConfigurationAddUpdateParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationCreateParams) contextValidateAwsKmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKmsParams != nil { - - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if err := m.AwsKmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurationCreateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurationCreateParams) UnmarshalBinary(b []byte) error { - var res KmsConfigurationCreateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configuration_response_params.go b/v2/models/kms_configuration_response_params.go deleted file mode 100644 index 556f2077..00000000 --- a/v2/models/kms_configuration_response_params.go +++ /dev/null @@ -1,324 +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" -) - -// KmsConfigurationResponseParams KMS Configuration Response Params. -// -// swagger:model KmsConfigurationResponseParams -type KmsConfigurationResponseParams struct { - - // Name of the KMS. - Name *string `json:"name,omitempty"` - - // Type of KMS. 'InternalKms' indicates the internal cluster KMS. 'AwsKms' indicates AWS KMS. 'KmipKms' indicates any KMIP compliant KMS. - // Enum: ["InternalKms","AwsKms","KmipKms"] - Type *string `json:"type,omitempty"` - - // Specifies the usage type of the kms config. 'kArchival' indicates this is used for regular archival. 'kRpaasArchival' indicates this is used for RPaaS only. - // Enum: ["kArchival","kRpaasArchival"] - UsageType *string `json:"usageType,omitempty"` - - // AWS KMS configuration. - AwsKmsParams *AwsKmsConfigurationResponse `json:"awsKmsParams,omitempty"` - - // KMIP compliant KMS configuration. - KmipKmsParams *KmipKmsConfigurationResponse `json:"kmipKmsParams,omitempty"` - - // Ids of storage domains used to assign the KMS for encryption. Once an external KMS (AWS KMS or KIMP KMS) is assigned to a storage domain, it cannot be changed. - StorageDomainIds []int64 `json:"storageDomainIds"` - - // Ids of external targets used to assign the KMS for encryption. Once an external KMS (AWS KMS or KIMP KMS) is assigned to an external target, it cannot be changed. - ExternalTargetIds []int64 `json:"externalTargetIds"` - - // Describes the consumption of the KMS key whether it is used for local or FortKnox. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` -} - -// Validate validates this kms configuration response params -func (m *KmsConfigurationResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsKmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKmipKmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var kmsConfigurationResponseParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InternalKms","AwsKms","KmipKms"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationResponseParamsTypeTypePropEnum = append(kmsConfigurationResponseParamsTypeTypePropEnum, v) - } -} - -const ( - - // KmsConfigurationResponseParamsTypeInternalKms captures enum value "InternalKms" - KmsConfigurationResponseParamsTypeInternalKms string = "InternalKms" - - // KmsConfigurationResponseParamsTypeAwsKms captures enum value "AwsKms" - KmsConfigurationResponseParamsTypeAwsKms string = "AwsKms" - - // KmsConfigurationResponseParamsTypeKmipKms captures enum value "KmipKms" - KmsConfigurationResponseParamsTypeKmipKms string = "KmipKms" -) - -// prop value enum -func (m *KmsConfigurationResponseParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationResponseParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationResponseParams) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var kmsConfigurationResponseParamsTypeUsageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kArchival","kRpaasArchival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationResponseParamsTypeUsageTypePropEnum = append(kmsConfigurationResponseParamsTypeUsageTypePropEnum, v) - } -} - -const ( - - // KmsConfigurationResponseParamsUsageTypeKArchival captures enum value "kArchival" - KmsConfigurationResponseParamsUsageTypeKArchival string = "kArchival" - - // KmsConfigurationResponseParamsUsageTypeKRpaasArchival captures enum value "kRpaasArchival" - KmsConfigurationResponseParamsUsageTypeKRpaasArchival string = "kRpaasArchival" -) - -// prop value enum -func (m *KmsConfigurationResponseParams) validateUsageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationResponseParamsTypeUsageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationResponseParams) validateUsageType(formats strfmt.Registry) error { - if swag.IsZero(m.UsageType) { // not required - return nil - } - - // value enum - if err := m.validateUsageTypeEnum("usageType", "body", *m.UsageType); err != nil { - return err - } - - return nil -} - -func (m *KmsConfigurationResponseParams) validateAwsKmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if m.AwsKmsParams != nil { - if err := m.AwsKmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponseParams) validateKmipKmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.KmipKmsParams) { // not required - return nil - } - - if m.KmipKmsParams != nil { - if err := m.KmipKmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmipKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmipKmsParams") - } - return err - } - } - - return nil -} - -var kmsConfigurationResponseParamsTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kmsConfigurationResponseParamsTypeOwnershipContextPropEnum = append(kmsConfigurationResponseParamsTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // KmsConfigurationResponseParamsOwnershipContextLocal captures enum value "Local" - KmsConfigurationResponseParamsOwnershipContextLocal string = "Local" - - // KmsConfigurationResponseParamsOwnershipContextFortKnox captures enum value "FortKnox" - KmsConfigurationResponseParamsOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *KmsConfigurationResponseParams) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kmsConfigurationResponseParamsTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KmsConfigurationResponseParams) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kms configuration response params based on the context it is used -func (m *KmsConfigurationResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKmipKmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationResponseParams) contextValidateAwsKmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKmsParams != nil { - - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if err := m.AwsKmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -func (m *KmsConfigurationResponseParams) contextValidateKmipKmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KmipKmsParams != nil { - - if swag.IsZero(m.KmipKmsParams) { // not required - return nil - } - - if err := m.KmipKmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kmipKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kmipKmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurationResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurationResponseParams) UnmarshalBinary(b []byte) error { - var res KmsConfigurationResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configuration_update_params.go b/v2/models/kms_configuration_update_params.go deleted file mode 100644 index ed6bee70..00000000 --- a/v2/models/kms_configuration_update_params.go +++ /dev/null @@ -1,168 +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" -) - -// KmsConfigurationUpdateParams Parameters to update key management system(KMS) on the cluster. -// -// swagger:model KmsConfigurationUpdateParams -type KmsConfigurationUpdateParams struct { - - // AWS KMS configuration. - AwsKmsParams *AwsKmsConfigurationUpdateParams `json:"awsKmsParams,omitempty"` - - KmsConfigurationAddUpdateParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *KmsConfigurationUpdateParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - AwsKmsParams *AwsKmsConfigurationUpdateParams `json:"awsKmsParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.AwsKmsParams = dataAO0.AwsKmsParams - - // AO1 - var aO1 KmsConfigurationAddUpdateParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.KmsConfigurationAddUpdateParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m KmsConfigurationUpdateParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - AwsKmsParams *AwsKmsConfigurationUpdateParams `json:"awsKmsParams,omitempty"` - } - - dataAO0.AwsKmsParams = m.AwsKmsParams - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.KmsConfigurationAddUpdateParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this kms configuration update params -func (m *KmsConfigurationUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsKmsParams(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with KmsConfigurationAddUpdateParams - if err := m.KmsConfigurationAddUpdateParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationUpdateParams) validateAwsKmsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if m.AwsKmsParams != nil { - if err := m.AwsKmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kms configuration update params based on the context it is used -func (m *KmsConfigurationUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsKmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with KmsConfigurationAddUpdateParams - if err := m.KmsConfigurationAddUpdateParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurationUpdateParams) contextValidateAwsKmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsKmsParams != nil { - - if swag.IsZero(m.AwsKmsParams) { // not required - return nil - } - - if err := m.AwsKmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsKmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsKmsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurationUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurationUpdateParams) UnmarshalBinary(b []byte) error { - var res KmsConfigurationUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kms_configurations.go b/v2/models/kms_configurations.go deleted file mode 100644 index 162e65fc..00000000 --- a/v2/models/kms_configurations.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// KmsConfigurations Key management systems configured on the cluster. -// -// swagger:model KmsConfigurations -type KmsConfigurations struct { - - // Key management systems configured on the cluster. - KeyManagementSystems []*KmsConfiguration `json:"keyManagementSystems"` -} - -// Validate validates this kms configurations -func (m *KmsConfigurations) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKeyManagementSystems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurations) validateKeyManagementSystems(formats strfmt.Registry) error { - if swag.IsZero(m.KeyManagementSystems) { // not required - return nil - } - - for i := 0; i < len(m.KeyManagementSystems); i++ { - if swag.IsZero(m.KeyManagementSystems[i]) { // not required - continue - } - - if m.KeyManagementSystems[i] != nil { - if err := m.KeyManagementSystems[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyManagementSystems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyManagementSystems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this kms configurations based on the context it is used -func (m *KmsConfigurations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeyManagementSystems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KmsConfigurations) contextValidateKeyManagementSystems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.KeyManagementSystems); i++ { - - if m.KeyManagementSystems[i] != nil { - - if swag.IsZero(m.KeyManagementSystems[i]) { // not required - return nil - } - - if err := m.KeyManagementSystems[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyManagementSystems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyManagementSystems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KmsConfigurations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KmsConfigurations) UnmarshalBinary(b []byte) error { - var res KmsConfigurations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_filter_params.go b/v2/models/kubernetes_filter_params.go deleted file mode 100644 index 7191178e..00000000 --- a/v2/models/kubernetes_filter_params.go +++ /dev/null @@ -1,200 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesFilterParams Kubernetes Filter Params. -// -// Specifies the parameters to in/exclude objects (e.g.: volumes). An object satisfying any of these criteria will be included by this filter. -// -// swagger:model KubernetesFilterParams -type KubernetesFilterParams struct { - - // Array of objects that are to be included. - // Unique: true - Objects []int64 `json:"objects"` - - // Array of Object to represent Label that Specify Objects (e.g.: Persistent Volumes and Persistent Volume Claims) to Include or Exclude.It will be a two-dimensional array, where each inner array will consist of a key and value representing labels. Using this two dimensional array of Labels, the Cluster generates a list of items to include in the filter, which are derived from intersections or the union of these labels, as decided by operation parameter. - // Unique: true - LabelVector []*KubernetesLabel `json:"labelVector"` - - // Whether to include all the labels or any of them while performing inclusion/exclusion of objects. - // Enum: ["AND","OR"] - LabelCombinationMethod *string `json:"labelCombinationMethod,omitempty"` -} - -// Validate validates this kubernetes filter params -func (m *KubernetesFilterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelVector(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabelCombinationMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesFilterParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - return nil -} - -func (m *KubernetesFilterParams) validateLabelVector(formats strfmt.Registry) error { - if swag.IsZero(m.LabelVector) { // not required - return nil - } - - if err := validate.UniqueItems("labelVector", "body", m.LabelVector); err != nil { - return err - } - - for i := 0; i < len(m.LabelVector); i++ { - if swag.IsZero(m.LabelVector[i]) { // not required - continue - } - - if m.LabelVector[i] != nil { - if err := m.LabelVector[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVector" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVector" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var kubernetesFilterParamsTypeLabelCombinationMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AND","OR"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - kubernetesFilterParamsTypeLabelCombinationMethodPropEnum = append(kubernetesFilterParamsTypeLabelCombinationMethodPropEnum, v) - } -} - -const ( - - // KubernetesFilterParamsLabelCombinationMethodAND captures enum value "AND" - KubernetesFilterParamsLabelCombinationMethodAND string = "AND" - - // KubernetesFilterParamsLabelCombinationMethodOR captures enum value "OR" - KubernetesFilterParamsLabelCombinationMethodOR string = "OR" -) - -// prop value enum -func (m *KubernetesFilterParams) validateLabelCombinationMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, kubernetesFilterParamsTypeLabelCombinationMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *KubernetesFilterParams) validateLabelCombinationMethod(formats strfmt.Registry) error { - if swag.IsZero(m.LabelCombinationMethod) { // not required - return nil - } - - // value enum - if err := m.validateLabelCombinationMethodEnum("labelCombinationMethod", "body", *m.LabelCombinationMethod); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kubernetes filter params based on the context it is used -func (m *KubernetesFilterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLabelVector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesFilterParams) contextValidateLabelVector(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LabelVector); i++ { - - if m.LabelVector[i] != nil { - - if swag.IsZero(m.LabelVector[i]) { // not required - return nil - } - - if err := m.LabelVector[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelVector" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelVector" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesFilterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesFilterParams) UnmarshalBinary(b []byte) error { - var res KubernetesFilterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_label.go b/v2/models/kubernetes_label.go deleted file mode 100644 index 36081687..00000000 --- a/v2/models/kubernetes_label.go +++ /dev/null @@ -1,90 +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" -) - -// KubernetesLabel Kubernetes Label -// -// Represents a single Kubernetes label. -// -// swagger:model KubernetesLabel -type KubernetesLabel struct { - - // The key of the label, used to identify the label. - // Read Only: true - Key *string `json:"key,omitempty"` - - // The value associated with the label key. - // Read Only: true - Value *string `json:"value,omitempty"` -} - -// Validate validates this kubernetes label -func (m *KubernetesLabel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this kubernetes label based on the context it is used -func (m *KubernetesLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKey(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValue(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesLabel) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *KubernetesLabel) contextValidateValue(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesLabel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesLabel) UnmarshalBinary(b []byte) error { - var res KubernetesLabel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_namespace_recovery_new_source_config.go b/v2/models/kubernetes_namespace_recovery_new_source_config.go deleted file mode 100644 index 2a999689..00000000 --- a/v2/models/kubernetes_namespace_recovery_new_source_config.go +++ /dev/null @@ -1,110 +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" -) - -// KubernetesNamespaceRecoveryNewSourceConfig Kubernetes Namespace Recovery New Source Config -// -// Specifies the new source configuration if a Kubernetes Namespace is being restored to a different source than the one from which it was protected. -// -// swagger:model KubernetesNamespaceRecoveryNewSourceConfig -type KubernetesNamespaceRecoveryNewSourceConfig struct { - - // Specifies the id of the parent source to recover the Namespaces. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this kubernetes namespace recovery new source config -func (m *KubernetesNamespaceRecoveryNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesNamespaceRecoveryNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes namespace recovery new source config based on the context it is used -func (m *KubernetesNamespaceRecoveryNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesNamespaceRecoveryNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesNamespaceRecoveryNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesNamespaceRecoveryNewSourceConfig) UnmarshalBinary(b []byte) error { - var res KubernetesNamespaceRecoveryNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_namespace_recovery_target_config.go b/v2/models/kubernetes_namespace_recovery_target_config.go deleted file mode 100644 index e59a8637..00000000 --- a/v2/models/kubernetes_namespace_recovery_target_config.go +++ /dev/null @@ -1,129 +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" -) - -// KubernetesNamespaceRecoveryTargetConfig Kubernetes Namespace Recovery Target Config -// -// Specifies the recovery target configuration of the Namespace recovery. -// -// swagger:model KubernetesNamespaceRecoveryTargetConfig -type KubernetesNamespaceRecoveryTargetConfig struct { - - // Specifies whether or not to recover the Namespaces to a different source than they were backed up from. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new source configuration if a Kubernetes Namespace is being restored to a different source than the one from which it was protected. - NewSourceConfig *KubernetesNamespaceRecoveryNewSourceConfig `json:"newSourceConfig,omitempty"` -} - -// Validate validates this kubernetes namespace recovery target config -func (m *KubernetesNamespaceRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesNamespaceRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *KubernetesNamespaceRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes namespace recovery target config based on the context it is used -func (m *KubernetesNamespaceRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesNamespaceRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesNamespaceRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesNamespaceRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res KubernetesNamespaceRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_protection_group_object_params.go b/v2/models/kubernetes_protection_group_object_params.go deleted file mode 100644 index facd72be..00000000 --- a/v2/models/kubernetes_protection_group_object_params.go +++ /dev/null @@ -1,220 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesProtectionGroupObjectParams Kubernetes ProtectionGroup Object Params -// -// Specifies the object parameters to create Kubernetes Protection Group. -// -// swagger:model KubernetesProtectionGroupObjectParams -type KubernetesProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies a list of pvcs to exclude from being protected. This is only applicable to kubernetes. - ExcludePvcs []*KubernetesPvcInfo `json:"excludePvcs"` - - // Specifies a list of Pvcs to include in the protection. This is only applicable to kubernetes. - IncludePvcs []*KubernetesPvcInfo `json:"includePvcs"` -} - -// Validate validates this kubernetes protection group object params -func (m *KubernetesProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludePvcs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludePvcs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) validateExcludePvcs(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludePvcs) { // not required - return nil - } - - for i := 0; i < len(m.ExcludePvcs); i++ { - if swag.IsZero(m.ExcludePvcs[i]) { // not required - continue - } - - if m.ExcludePvcs[i] != nil { - if err := m.ExcludePvcs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludePvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludePvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) validateIncludePvcs(formats strfmt.Registry) error { - if swag.IsZero(m.IncludePvcs) { // not required - return nil - } - - for i := 0; i < len(m.IncludePvcs); i++ { - if swag.IsZero(m.IncludePvcs[i]) { // not required - continue - } - - if m.IncludePvcs[i] != nil { - if err := m.IncludePvcs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includePvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includePvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this kubernetes protection group object params based on the context it is used -func (m *KubernetesProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludePvcs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludePvcs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) contextValidateExcludePvcs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludePvcs); i++ { - - if m.ExcludePvcs[i] != nil { - - if swag.IsZero(m.ExcludePvcs[i]) { // not required - return nil - } - - if err := m.ExcludePvcs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludePvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludePvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionGroupObjectParams) contextValidateIncludePvcs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IncludePvcs); i++ { - - if m.IncludePvcs[i] != nil { - - if swag.IsZero(m.IncludePvcs[i]) { // not required - return nil - } - - if err := m.IncludePvcs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includePvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includePvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res KubernetesProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_protection_group_params.go b/v2/models/kubernetes_protection_group_params.go deleted file mode 100644 index 26c5ae73..00000000 --- a/v2/models/kubernetes_protection_group_params.go +++ /dev/null @@ -1,343 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesProtectionGroupParams Specifies the parameters which are related to Kubernetes Protection Groups. -// -// swagger:model KubernetesProtectionGroupParams -type KubernetesProtectionGroupParams struct { - - // Specifies the objects included in the Protection Group. - // Unique: true - Objects []*KubernetesProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Array of array of label IDs that specify labels to protect. Optionally specify a list of labels to protect by listing protection source ids of labels in this two dimensional array. Using this two dimensional array of label IDs, the cluster generates a list of namespaces to protect, which are derived from intersections of the inner arrays and union of the outer array. - LabelIds [][]int64 `json:"labelIds"` - - // Array of arrays of label IDs that specify labels to exclude. Optionally specify a list of labels to exclude from protecting by listing protection source ids of labels in this two dimensional array. Using this two dimensional array of label IDs, the Cluster generates a list of namespaces to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array. - ExcludeLabelIds [][]int64 `json:"excludeLabelIds"` - - // Specifies the paramaters to include objects (e.g.: volumes) attached to Kubernetes pods. If not populated, all objects are included unless specifically excluded otherwise. - IncludeParams *KubernetesFilterParams `json:"includeParams,omitempty"` - - // Specifies the paramaters to exclude objects attached to Kubernetes pods. Exclusion takes precedence over inclusion. - ExcludeParams *KubernetesFilterParams `json:"excludeParams,omitempty"` - - // Specifies if CSI snapshots should be used for backup of namespaces. - LeverageCSISnapshot *bool `json:"leverageCSISnapshot,omitempty"` - - // Specifies the VLAN preference that is selected by the user for doing backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` -} - -// Validate validates this kubernetes protection group params -func (m *KubernetesProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncludeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) validateIncludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if m.IncludeParams != nil { - if err := m.IncludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) validateExcludeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if m.ExcludeParams != nil { - if err := m.ExcludeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes protection group params based on the context it is used -func (m *KubernetesProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateIncludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IncludeParams != nil { - - if swag.IsZero(m.IncludeParams) { // not required - return nil - } - - if err := m.IncludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("includeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("includeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateExcludeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExcludeParams != nil { - - if swag.IsZero(m.ExcludeParams) { // not required - return nil - } - - if err := m.ExcludeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeParams") - } - return err - } - } - - return nil -} - -func (m *KubernetesProtectionGroupParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res KubernetesProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_pvc_info.go b/v2/models/kubernetes_pvc_info.go deleted file mode 100644 index f81f267d..00000000 --- a/v2/models/kubernetes_pvc_info.go +++ /dev/null @@ -1,90 +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" -) - -// KubernetesPvcInfo Kubernetes PVC Info -// -// Specifies the parameters which are related to Kubernetes PVC. -// -// swagger:model KubernetesPvcInfo -type KubernetesPvcInfo struct { - - // Specifies the id of the pvc. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Name of the pvc. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this kubernetes pvc info -func (m *KubernetesPvcInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this kubernetes pvc info based on the context it is used -func (m *KubernetesPvcInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesPvcInfo) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *KubernetesPvcInfo) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesPvcInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesPvcInfo) UnmarshalBinary(b []byte) error { - var res KubernetesPvcInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kubernetes_target_params_for_recover_kubernetes_namespace.go b/v2/models/kubernetes_target_params_for_recover_kubernetes_namespace.go deleted file mode 100644 index 5d4567f6..00000000 --- a/v2/models/kubernetes_target_params_for_recover_kubernetes_namespace.go +++ /dev/null @@ -1,348 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KubernetesTargetParamsForRecoverKubernetesNamespace Kubernetes Target Params For Recover Namespace -// -// Specifies the parameters for recovering a Kubernetes namespace to a Kubernetes source. -// -// swagger:model KubernetesTargetParamsForRecoverKubernetesNamespace -type KubernetesTargetParamsForRecoverKubernetesNamespace struct { - - // Specifies the objects to be recovered. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the list of pvc to be excluded from recovery. - ExcludedPvcs []*KubernetesPvcInfo `json:"excludedPvcs"` - - // Specifies the recovery target configuration of the Namespace recovery. - // Required: true - RecoveryTargetConfig *KubernetesNamespaceRecoveryTargetConfig `json:"recoveryTargetConfig"` - - // Specifies params to rename the Namespaces that are recovered. If not specified, the original names of the Namespaces are preserved. If a name collision occurs then the Namespace being recovered will overwrite the Namespace already present on the source. - RenameRecoveredNamespacesParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredNamespacesParams,omitempty"` -} - -// Validate validates this kubernetes target params for recover kubernetes namespace -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludedPvcs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredNamespacesParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) validateExcludedPvcs(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludedPvcs) { // not required - return nil - } - - for i := 0; i < len(m.ExcludedPvcs); i++ { - if swag.IsZero(m.ExcludedPvcs[i]) { // not required - continue - } - - if m.ExcludedPvcs[i] != nil { - if err := m.ExcludedPvcs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedPvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedPvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) validateRecoveryTargetConfig(formats strfmt.Registry) error { - - if err := validate.Required("recoveryTargetConfig", "body", m.RecoveryTargetConfig); err != nil { - return err - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) validateRenameRecoveredNamespacesParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredNamespacesParams) { // not required - return nil - } - - if m.RenameRecoveredNamespacesParams != nil { - if err := m.RenameRecoveredNamespacesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredNamespacesParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kubernetes target params for recover kubernetes namespace based on the context it is used -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludedPvcs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredNamespacesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) contextValidateExcludedPvcs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludedPvcs); i++ { - - if m.ExcludedPvcs[i] != nil { - - if swag.IsZero(m.ExcludedPvcs[i]) { // not required - return nil - } - - if err := m.ExcludedPvcs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludedPvcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludedPvcs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) contextValidateRenameRecoveredNamespacesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredNamespacesParams != nil { - - if swag.IsZero(m.RenameRecoveredNamespacesParams) { // not required - return nil - } - - if err := m.RenameRecoveredNamespacesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredNamespacesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredNamespacesParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KubernetesTargetParamsForRecoverKubernetesNamespace) UnmarshalBinary(b []byte) error { - var res KubernetesTargetParamsForRecoverKubernetesNamespace - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kvm_protection_group_object_params.go b/v2/models/kvm_protection_group_object_params.go deleted file mode 100644 index 08050332..00000000 --- a/v2/models/kvm_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// KvmProtectionGroupObjectParams Specifies an object protected by a KVM Protection Group. -// -// swagger:model KvmProtectionGroupObjectParams -type KvmProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this kvm protection group object params -func (m *KvmProtectionGroupObjectParams) 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 *KvmProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this kvm protection group object params based on the context it is used -func (m *KvmProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KvmProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KvmProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res KvmProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kvm_protection_group_params.go b/v2/models/kvm_protection_group_params.go deleted file mode 100644 index 11608e85..00000000 --- a/v2/models/kvm_protection_group_params.go +++ /dev/null @@ -1,244 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KvmProtectionGroupParams Specifies the parameters which are specific to Kvm related Protection Groups. -// -// swagger:model KvmProtectionGroupParams -type KvmProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*KvmProtectionGroupObjectParams `json:"objects"` - - // Specifies the object ids to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies settings for indexing files found in an Object (such as a VM) so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. If not specified or false then snapshots will not be app consistent. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` -} - -// Validate validates this kvm protection group params -func (m *KvmProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KvmProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *KvmProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kvm protection group params based on the context it is used -func (m *KvmProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *KvmProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *KvmProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *KvmProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KvmProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KvmProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res KvmProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kvm_target_params_for_recover_vm.go b/v2/models/kvm_target_params_for_recover_vm.go deleted file mode 100644 index 8a2acd99..00000000 --- a/v2/models/kvm_target_params_for_recover_vm.go +++ /dev/null @@ -1,219 +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" -) - -// KvmTargetParamsForRecoverVM KVM Target Params. -// -// Specifies the parameters for a KVM recovery target. -// -// swagger:model KvmTargetParamsForRecoverVm -type KvmTargetParamsForRecoverVM struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Snource with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *KvmVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this kvm target params for recover Vm -func (m *KvmTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *KvmTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *KvmTargetParamsForRecoverVM) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kvm target params for recover Vm based on the context it is used -func (m *KvmTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *KvmTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *KvmTargetParamsForRecoverVM) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KvmTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KvmTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res KvmTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/kvm_vm_recovery_target_config.go b/v2/models/kvm_vm_recovery_target_config.go deleted file mode 100644 index 48e2a985..00000000 --- a/v2/models/kvm_vm_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// KvmVMRecoveryTargetConfig KVM VMs Recovery Target Config. -// -// Specifies the target object parameters to recover KVM vms. -// -// swagger:model KvmVmRecoveryTargetConfig -type KvmVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverKvmVMNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverKvmVMOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this kvm Vm recovery target config -func (m *KvmVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *KvmVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *KvmVMRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this kvm Vm recovery target config based on the context it is used -func (m *KvmVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KvmVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *KvmVMRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KvmVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KvmVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res KvmVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/language.go b/v2/models/language.go deleted file mode 100644 index 822b9767..00000000 --- a/v2/models/language.go +++ /dev/null @@ -1,110 +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" -) - -// Language Language -// -// # Language -// -// swagger:model Language -type Language struct { - - // Specifies the language. - // Enum: ["en-us","ja-jp","zh-cn"] - Language string `json:"language,omitempty"` -} - -// Validate validates this language -func (m *Language) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLanguage(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var languageTypeLanguagePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["en-us","ja-jp","zh-cn"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - languageTypeLanguagePropEnum = append(languageTypeLanguagePropEnum, v) - } -} - -const ( - - // LanguageLanguageEnDashUs captures enum value "en-us" - LanguageLanguageEnDashUs string = "en-us" - - // LanguageLanguageJaDashJp captures enum value "ja-jp" - LanguageLanguageJaDashJp string = "ja-jp" - - // LanguageLanguageZhDashCn captures enum value "zh-cn" - LanguageLanguageZhDashCn string = "zh-cn" -) - -// prop value enum -func (m *Language) validateLanguageEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, languageTypeLanguagePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Language) validateLanguage(formats strfmt.Registry) error { - if swag.IsZero(m.Language) { // not required - return nil - } - - // value enum - if err := m.validateLanguageEnum("language", "body", m.Language); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this language based on context it is used -func (m *Language) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Language) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Language) UnmarshalBinary(b []byte) error { - var res Language - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ldap.go b/v2/models/ldap.go deleted file mode 100644 index 41dc2e75..00000000 --- a/v2/models/ldap.go +++ /dev/null @@ -1,128 +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" -) - -// Ldap Specifies an LDAP. -// -// swagger:model Ldap -type Ldap struct { - CreateLdapParams - - // Specifies the LDAP id. - ID *int64 `json:"id,omitempty"` - - // Specifies the LDAP tenant id. - TenantID *string `json:"tenantId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Ldap) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateLdapParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateLdapParams = aO0 - - // AO1 - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.TenantID = dataAO1.TenantID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Ldap) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateLdapParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *int64 `json:"id,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - - dataAO1.ID = m.ID - - 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 ldap -func (m *Ldap) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateLdapParams - if err := m.CreateLdapParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this ldap based on the context it is used -func (m *Ldap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateLdapParams - if err := m.CreateLdapParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Ldap) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Ldap) UnmarshalBinary(b []byte) error { - var res Ldap - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ldap_connection_status.go b/v2/models/ldap_connection_status.go deleted file mode 100644 index c89fbc4a..00000000 --- a/v2/models/ldap_connection_status.go +++ /dev/null @@ -1,105 +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" -) - -// LdapConnectionStatus Specifies the LDAP connection status. -// -// swagger:model LdapConnectionStatus -type LdapConnectionStatus struct { - - // Specifies the LDAP connection status. - // Enum: ["NoError","Error"] - Type string `json:"type,omitempty"` -} - -// Validate validates this ldap connection status -func (m *LdapConnectionStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ldapConnectionStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NoError","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ldapConnectionStatusTypeTypePropEnum = append(ldapConnectionStatusTypeTypePropEnum, v) - } -} - -const ( - - // LdapConnectionStatusTypeNoError captures enum value "NoError" - LdapConnectionStatusTypeNoError string = "NoError" - - // LdapConnectionStatusTypeError captures enum value "Error" - LdapConnectionStatusTypeError string = "Error" -) - -// prop value enum -func (m *LdapConnectionStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ldapConnectionStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LdapConnectionStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ldap connection status based on context it is used -func (m *LdapConnectionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LdapConnectionStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LdapConnectionStatus) UnmarshalBinary(b []byte) error { - var res LdapConnectionStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ldap_status.go b/v2/models/ldap_status.go deleted file mode 100644 index 2f0cec60..00000000 --- a/v2/models/ldap_status.go +++ /dev/null @@ -1,105 +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" -) - -// LdapStatus Specifies the LDAP connection status. -// -// swagger:model LdapStatus -type LdapStatus struct { - - // Specifies the connection status. - // Enum: ["NoError","Error"] - ConnectionStatus *string `json:"connectionStatus,omitempty"` -} - -// Validate validates this ldap status -func (m *LdapStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ldapStatusTypeConnectionStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NoError","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ldapStatusTypeConnectionStatusPropEnum = append(ldapStatusTypeConnectionStatusPropEnum, v) - } -} - -const ( - - // LdapStatusConnectionStatusNoError captures enum value "NoError" - LdapStatusConnectionStatusNoError string = "NoError" - - // LdapStatusConnectionStatusError captures enum value "Error" - LdapStatusConnectionStatusError string = "Error" -) - -// prop value enum -func (m *LdapStatus) validateConnectionStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ldapStatusTypeConnectionStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LdapStatus) validateConnectionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - // value enum - if err := m.validateConnectionStatusEnum("connectionStatus", "body", *m.ConnectionStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ldap status based on context it is used -func (m *LdapStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LdapStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LdapStatus) UnmarshalBinary(b []byte) error { - var res LdapStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ldaps.go b/v2/models/ldaps.go deleted file mode 100644 index 4d22b9ad..00000000 --- a/v2/models/ldaps.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Ldaps Specifies a list of LDAPs. -// -// swagger:model Ldaps -type Ldaps struct { - - // Specifies the list of LDAPs. - Ldaps []*Ldap `json:"ldaps"` -} - -// Validate validates this ldaps -func (m *Ldaps) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLdaps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Ldaps) validateLdaps(formats strfmt.Registry) error { - if swag.IsZero(m.Ldaps) { // not required - return nil - } - - for i := 0; i < len(m.Ldaps); i++ { - if swag.IsZero(m.Ldaps[i]) { // not required - continue - } - - if m.Ldaps[i] != nil { - if err := m.Ldaps[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldaps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldaps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ldaps based on the context it is used -func (m *Ldaps) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLdaps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Ldaps) contextValidateLdaps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ldaps); i++ { - - if m.Ldaps[i] != nil { - - if swag.IsZero(m.Ldaps[i]) { // not required - return nil - } - - if err := m.Ldaps[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldaps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldaps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Ldaps) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Ldaps) UnmarshalBinary(b []byte) error { - var res Ldaps - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lifecycle_rule.go b/v2/models/lifecycle_rule.go deleted file mode 100644 index 939c10d2..00000000 --- a/v2/models/lifecycle_rule.go +++ /dev/null @@ -1,300 +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" -) - -// LifecycleRule Specifies the Lifecycle configuration rule. -// -// swagger:model LifecycleRule -type LifecycleRule struct { - - // Specifies the Unique identifier for the rule. The value cannot be longer than 255 characters. - // Required: true - ID *string `json:"id"` - - // Specifies if the rule is currently being applied. - // Required: true - Status *bool `json:"status"` - - // Specifies the prefix used to identify objects that a lifecycle rule applies to. - Prefix *string `json:"prefix,omitempty"` - - // Specifies the days since the initiation of an incomplete multipart upload before permanently removing all parts of the upload. - AbortIncompleteMultipartUploadAction *AbortIncompleteMultipartUploadAction `json:"abortIncompleteMultipartUploadAction,omitempty"` - - // Specifies the expiration for the lifecycle of the object in the form of date, days and whether the object has a delete marker. - Expiration *ExpirationAction `json:"expiration,omitempty"` - - // Specifies the filter used to identify objects that a Lifecycle Rule applies to. - Filter *LifecycleRuleFilter `json:"filter,omitempty"` - - // Specifies when non-current object versions expire. Upon expiration, non-current object versions are permanently deleted. The action can be specified only in versioning enabled or suspended buckets. - NonCurrentVersionExpirationAction *NonCurrentVersionExpirationAction `json:"nonCurrentVersionExpirationAction,omitempty"` -} - -// Validate validates this lifecycle rule -func (m *LifecycleRule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAbortIncompleteMultipartUploadAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExpiration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNonCurrentVersionExpirationAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRule) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *LifecycleRule) validateStatus(formats strfmt.Registry) error { - - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *LifecycleRule) validateAbortIncompleteMultipartUploadAction(formats strfmt.Registry) error { - if swag.IsZero(m.AbortIncompleteMultipartUploadAction) { // not required - return nil - } - - if m.AbortIncompleteMultipartUploadAction != nil { - if err := m.AbortIncompleteMultipartUploadAction.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("abortIncompleteMultipartUploadAction") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("abortIncompleteMultipartUploadAction") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateExpiration(formats strfmt.Registry) error { - if swag.IsZero(m.Expiration) { // not required - return nil - } - - if m.Expiration != nil { - if err := m.Expiration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("expiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("expiration") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateFilter(formats strfmt.Registry) error { - if swag.IsZero(m.Filter) { // not required - return nil - } - - if m.Filter != nil { - if err := m.Filter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filter") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) validateNonCurrentVersionExpirationAction(formats strfmt.Registry) error { - if swag.IsZero(m.NonCurrentVersionExpirationAction) { // not required - return nil - } - - if m.NonCurrentVersionExpirationAction != nil { - if err := m.NonCurrentVersionExpirationAction.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nonCurrentVersionExpirationAction") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nonCurrentVersionExpirationAction") - } - return err - } - } - - return nil -} - -// ContextValidate validate this lifecycle rule based on the context it is used -func (m *LifecycleRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAbortIncompleteMultipartUploadAction(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExpiration(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNonCurrentVersionExpirationAction(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRule) contextValidateAbortIncompleteMultipartUploadAction(ctx context.Context, formats strfmt.Registry) error { - - if m.AbortIncompleteMultipartUploadAction != nil { - - if swag.IsZero(m.AbortIncompleteMultipartUploadAction) { // not required - return nil - } - - if err := m.AbortIncompleteMultipartUploadAction.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("abortIncompleteMultipartUploadAction") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("abortIncompleteMultipartUploadAction") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateExpiration(ctx context.Context, formats strfmt.Registry) error { - - if m.Expiration != nil { - - if swag.IsZero(m.Expiration) { // not required - return nil - } - - if err := m.Expiration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("expiration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("expiration") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.Filter != nil { - - if swag.IsZero(m.Filter) { // not required - return nil - } - - if err := m.Filter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filter") - } - return err - } - } - - return nil -} - -func (m *LifecycleRule) contextValidateNonCurrentVersionExpirationAction(ctx context.Context, formats strfmt.Registry) error { - - if m.NonCurrentVersionExpirationAction != nil { - - if swag.IsZero(m.NonCurrentVersionExpirationAction) { // not required - return nil - } - - if err := m.NonCurrentVersionExpirationAction.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nonCurrentVersionExpirationAction") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nonCurrentVersionExpirationAction") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRule) UnmarshalBinary(b []byte) error { - var res LifecycleRule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lifecycle_rule_filter.go b/v2/models/lifecycle_rule_filter.go deleted file mode 100644 index cad5597c..00000000 --- a/v2/models/lifecycle_rule_filter.go +++ /dev/null @@ -1,163 +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" -) - -// LifecycleRuleFilter Specifies the filter used to identify objects that a Lifecycle Rule applies to. Note: All three properties are mutually exclusive. -// -// swagger:model LifecycleRuleFilter -type LifecycleRuleFilter struct { - - // Specifies the Prefix identifying one or more objects to which the rule applies. - Prefix *string `json:"prefix,omitempty"` - - // Specifies the Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the AND operator. - And *LifecycleRuleFilterAnd `json:"and,omitempty"` - - // Specifies the tag in the object's tag set to which the rule applies. - Tag *LifecycleRuleFilterTag `json:"tag,omitempty"` -} - -// Validate validates this lifecycle rule filter -func (m *LifecycleRuleFilter) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAnd(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTag(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilter) validateAnd(formats strfmt.Registry) error { - if swag.IsZero(m.And) { // not required - return nil - } - - if m.And != nil { - if err := m.And.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("and") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("and") - } - return err - } - } - - return nil -} - -func (m *LifecycleRuleFilter) validateTag(formats strfmt.Registry) error { - if swag.IsZero(m.Tag) { // not required - return nil - } - - if m.Tag != nil { - if err := m.Tag.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tag") - } - return err - } - } - - return nil -} - -// ContextValidate validate this lifecycle rule filter based on the context it is used -func (m *LifecycleRuleFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAnd(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTag(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilter) contextValidateAnd(ctx context.Context, formats strfmt.Registry) error { - - if m.And != nil { - - if swag.IsZero(m.And) { // not required - return nil - } - - if err := m.And.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("and") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("and") - } - return err - } - } - - return nil -} - -func (m *LifecycleRuleFilter) contextValidateTag(ctx context.Context, formats strfmt.Registry) error { - - if m.Tag != nil { - - if swag.IsZero(m.Tag) { // not required - return nil - } - - if err := m.Tag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tag") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tag") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilter) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lifecycle_rule_filter_and.go b/v2/models/lifecycle_rule_filter_and.go deleted file mode 100644 index 77874ad7..00000000 --- a/v2/models/lifecycle_rule_filter_and.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LifecycleRuleFilterAnd Specifies the Lifecycle configuration Rule Filter AND element. -// -// swagger:model LifecycleRuleFilterAnd -type LifecycleRuleFilterAnd struct { - - // Specifies a Prefix identifying one or more objects to which the rule applies. - Prefix *string `json:"prefix,omitempty"` - - // Specifies the tag in the object's tag set to which the rule applies. All of these tags must exist in the object's tag set in order for the rule to apply. - Tags []*LifecycleRuleFilterTag `json:"tags"` -} - -// Validate validates this lifecycle rule filter and -func (m *LifecycleRuleFilterAnd) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilterAnd) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - for i := 0; i < len(m.Tags); i++ { - if swag.IsZero(m.Tags[i]) { // not required - continue - } - - if m.Tags[i] != nil { - if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this lifecycle rule filter and based on the context it is used -func (m *LifecycleRuleFilterAnd) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LifecycleRuleFilterAnd) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tags); i++ { - - if m.Tags[i] != nil { - - if swag.IsZero(m.Tags[i]) { // not required - return nil - } - - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilterAnd) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilterAnd) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilterAnd - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lifecycle_rule_filter_tag.go b/v2/models/lifecycle_rule_filter_tag.go deleted file mode 100644 index eb5624c7..00000000 --- a/v2/models/lifecycle_rule_filter_tag.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" -) - -// LifecycleRuleFilterTag Specifies the Lifecycle configuration Rule Filter Tag element. -// -// swagger:model LifecycleRuleFilterTag -type LifecycleRuleFilterTag struct { - - // Specifies the Name of the object key. - Key *string `json:"key,omitempty"` - - // Specifies the Value of the tag. - Value *string `json:"value,omitempty"` -} - -// Validate validates this lifecycle rule filter tag -func (m *LifecycleRuleFilterTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lifecycle rule filter tag based on context it is used -func (m *LifecycleRuleFilterTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LifecycleRuleFilterTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LifecycleRuleFilterTag) UnmarshalBinary(b []byte) error { - var res LifecycleRuleFilterTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/linux_agent_params.go b/v2/models/linux_agent_params.go deleted file mode 100644 index 4130d1b5..00000000 --- a/v2/models/linux_agent_params.go +++ /dev/null @@ -1,116 +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" -) - -// LinuxAgentParams Linux agent parameters. -// -// swagger:model LinuxAgentParams -type LinuxAgentParams struct { - - // Specifies the type of installer. - // Required: true - // Enum: ["kScript","kRPM","kSuseRPM","kDEB","kPowerPCRPM"] - PackageType *string `json:"packageType"` -} - -// Validate validates this linux agent params -func (m *LinuxAgentParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePackageType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var linuxAgentParamsTypePackageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScript","kRPM","kSuseRPM","kDEB","kPowerPCRPM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - linuxAgentParamsTypePackageTypePropEnum = append(linuxAgentParamsTypePackageTypePropEnum, v) - } -} - -const ( - - // LinuxAgentParamsPackageTypeKScript captures enum value "kScript" - LinuxAgentParamsPackageTypeKScript string = "kScript" - - // LinuxAgentParamsPackageTypeKRPM captures enum value "kRPM" - LinuxAgentParamsPackageTypeKRPM string = "kRPM" - - // LinuxAgentParamsPackageTypeKSuseRPM captures enum value "kSuseRPM" - LinuxAgentParamsPackageTypeKSuseRPM string = "kSuseRPM" - - // LinuxAgentParamsPackageTypeKDEB captures enum value "kDEB" - LinuxAgentParamsPackageTypeKDEB string = "kDEB" - - // LinuxAgentParamsPackageTypeKPowerPCRPM captures enum value "kPowerPCRPM" - LinuxAgentParamsPackageTypeKPowerPCRPM string = "kPowerPCRPM" -) - -// prop value enum -func (m *LinuxAgentParams) validatePackageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, linuxAgentParamsTypePackageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LinuxAgentParams) validatePackageType(formats strfmt.Registry) error { - - if err := validate.Required("packageType", "body", m.PackageType); err != nil { - return err - } - - // value enum - if err := m.validatePackageTypeEnum("packageType", "body", *m.PackageType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this linux agent params based on context it is used -func (m *LinuxAgentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LinuxAgentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LinuxAgentParams) UnmarshalBinary(b []byte) error { - var res LinuxAgentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/list_trusted_cas_result.go b/v2/models/list_trusted_cas_result.go deleted file mode 100644 index f36413bd..00000000 --- a/v2/models/list_trusted_cas_result.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListTrustedCasResult Specifies the basic info about CA Root Certificate. -// -// swagger:model ListTrustedCasResult -type ListTrustedCasResult struct { - - // Array of trusted certificates. - // Specifies the list of certificates returned in this response. - // List is not sorted. - Certificates []*TrustedCa `json:"certificates"` -} - -// Validate validates this list trusted cas result -func (m *ListTrustedCasResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListTrustedCasResult) validateCertificates(formats strfmt.Registry) error { - if swag.IsZero(m.Certificates) { // not required - return nil - } - - for i := 0; i < len(m.Certificates); i++ { - if swag.IsZero(m.Certificates[i]) { // not required - continue - } - - if m.Certificates[i] != nil { - if err := m.Certificates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list trusted cas result based on the context it is used -func (m *ListTrustedCasResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ListTrustedCasResult) contextValidateCertificates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Certificates); i++ { - - if m.Certificates[i] != nil { - - if swag.IsZero(m.Certificates[i]) { // not required - return nil - } - - if err := m.Certificates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ListTrustedCasResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ListTrustedCasResult) UnmarshalBinary(b []byte) error { - var res ListTrustedCasResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_disk_status.go b/v2/models/local_disk_status.go deleted file mode 100644 index 3f46abc5..00000000 --- a/v2/models/local_disk_status.go +++ /dev/null @@ -1,128 +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" -) - -// LocalDiskStatus Disk status. -// -// Status of local disk. -// -// swagger:model LocalDiskStatus -type LocalDiskStatus struct { - - // Specifies status of the local disk. - // Enum: ["Online","Offline","Removing","OkToRemove","Blacklist","New","Empty","Unknown","Activating"] - Status string `json:"status,omitempty"` -} - -// Validate validates this local disk status -func (m *LocalDiskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var localDiskStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Online","Offline","Removing","OkToRemove","Blacklist","New","Empty","Unknown","Activating"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - localDiskStatusTypeStatusPropEnum = append(localDiskStatusTypeStatusPropEnum, v) - } -} - -const ( - - // LocalDiskStatusStatusOnline captures enum value "Online" - LocalDiskStatusStatusOnline string = "Online" - - // LocalDiskStatusStatusOffline captures enum value "Offline" - LocalDiskStatusStatusOffline string = "Offline" - - // LocalDiskStatusStatusRemoving captures enum value "Removing" - LocalDiskStatusStatusRemoving string = "Removing" - - // LocalDiskStatusStatusOkToRemove captures enum value "OkToRemove" - LocalDiskStatusStatusOkToRemove string = "OkToRemove" - - // LocalDiskStatusStatusBlacklist captures enum value "Blacklist" - LocalDiskStatusStatusBlacklist string = "Blacklist" - - // LocalDiskStatusStatusNew captures enum value "New" - LocalDiskStatusStatusNew string = "New" - - // LocalDiskStatusStatusEmpty captures enum value "Empty" - LocalDiskStatusStatusEmpty string = "Empty" - - // LocalDiskStatusStatusUnknown captures enum value "Unknown" - LocalDiskStatusStatusUnknown string = "Unknown" - - // LocalDiskStatusStatusActivating captures enum value "Activating" - LocalDiskStatusStatusActivating string = "Activating" -) - -// prop value enum -func (m *LocalDiskStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, localDiskStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LocalDiskStatus) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this local disk status based on context it is used -func (m *LocalDiskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalDiskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalDiskStatus) UnmarshalBinary(b []byte) error { - var res LocalDiskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_global_object_id_list.go b/v2/models/local_global_object_id_list.go deleted file mode 100644 index bdb40044..00000000 --- a/v2/models/local_global_object_id_list.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LocalGlobalObjectIDList List of local and global IDs of objects. -// -// swagger:model LocalGlobalObjectIdList -type LocalGlobalObjectIDList struct { - - // Entity look up info summary. - ObjectIdentifiers []*LocalGlobalObjectIds `json:"objectIdentifiers"` -} - -// Validate validates this local global object Id list -func (m *LocalGlobalObjectIDList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectIdentifiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LocalGlobalObjectIDList) validateObjectIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectIdentifiers) { // not required - return nil - } - - for i := 0; i < len(m.ObjectIdentifiers); i++ { - if swag.IsZero(m.ObjectIdentifiers[i]) { // not required - continue - } - - if m.ObjectIdentifiers[i] != nil { - if err := m.ObjectIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this local global object Id list based on the context it is used -func (m *LocalGlobalObjectIDList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LocalGlobalObjectIDList) contextValidateObjectIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectIdentifiers); i++ { - - if m.ObjectIdentifiers[i] != nil { - - if swag.IsZero(m.ObjectIdentifiers[i]) { // not required - return nil - } - - if err := m.ObjectIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LocalGlobalObjectIDList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalGlobalObjectIDList) UnmarshalBinary(b []byte) error { - var res LocalGlobalObjectIDList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_global_object_ids.go b/v2/models/local_global_object_ids.go deleted file mode 100644 index 904a4533..00000000 --- a/v2/models/local_global_object_ids.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" -) - -// LocalGlobalObjectIds Local and global object IDs. -// -// swagger:model LocalGlobalObjectIds -type LocalGlobalObjectIds struct { - - // Specifies the local ID of the object. - LocalID int64 `json:"localId,omitempty"` - - // Specifies the global ID of the object. - GlobalID string `json:"globalId,omitempty"` -} - -// Validate validates this local global object ids -func (m *LocalGlobalObjectIds) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this local global object ids based on context it is used -func (m *LocalGlobalObjectIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalGlobalObjectIds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalGlobalObjectIds) UnmarshalBinary(b []byte) error { - var res LocalGlobalObjectIds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_group_params.go b/v2/models/local_group_params.go deleted file mode 100644 index c3ac7bf1..00000000 --- a/v2/models/local_group_params.go +++ /dev/null @@ -1,50 +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" -) - -// LocalGroupParams Specifies properties for LOCAL Cohesity group. -// -// swagger:model LocalGroupParams -type LocalGroupParams struct { - - // Specifies the LOCAL users which are part of this group. - UserSids []string `json:"userSids,omitempty"` -} - -// Validate validates this local group params -func (m *LocalGroupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this local group params based on context it is used -func (m *LocalGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalGroupParams) UnmarshalBinary(b []byte) error { - var res LocalGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_user_params.go b/v2/models/local_user_params.go deleted file mode 100644 index 1fb82265..00000000 --- a/v2/models/local_user_params.go +++ /dev/null @@ -1,192 +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" -) - -// LocalUserParams Specifies properties for LOCAL cohesity user. -// -// swagger:model LocalUserParams -type LocalUserParams struct { - LocalUserResponseParams - - // Specifies the password of the User. - Password *string `json:"password,omitempty"` - - // Specifies the primary group of the User. Primary group is used for file access. - // Read Only: true - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - // Specifies additional groups the User may belong to. - // Read Only: true - Groups []string `json:"groups,omitempty"` - - LocalUserParamsAllOf2 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *LocalUserParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 LocalUserResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.LocalUserResponseParams = aO0 - - // AO1 - var dataAO1 struct { - Password *string `json:"password,omitempty"` - - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - Groups []string `json:"groups,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Password = dataAO1.Password - - m.PrimaryGroup = dataAO1.PrimaryGroup - - m.Groups = dataAO1.Groups - - // AO2 - var aO2 LocalUserParamsAllOf2 - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.LocalUserParamsAllOf2 = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m LocalUserParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.LocalUserResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Password *string `json:"password,omitempty"` - - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - Groups []string `json:"groups,omitempty"` - } - - dataAO1.Password = m.Password - - dataAO1.PrimaryGroup = m.PrimaryGroup - - dataAO1.Groups = m.Groups - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - - aO2, err := swag.WriteJSON(m.LocalUserParamsAllOf2) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this local user params -func (m *LocalUserParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LocalUserResponseParams - if err := m.LocalUserResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with LocalUserParamsAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this local user params based on the context it is used -func (m *LocalUserParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LocalUserResponseParams - if err := m.LocalUserResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroups(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with LocalUserParamsAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LocalUserParams) contextValidatePrimaryGroup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "primaryGroup", "body", m.PrimaryGroup); err != nil { - return err - } - - return nil -} - -func (m *LocalUserParams) contextValidateGroups(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "groups", "body", []string(m.Groups)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LocalUserParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalUserParams) UnmarshalBinary(b []byte) error { - var res LocalUserParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// LocalUserParamsAllOf2 local user params all of2 -// -// swagger:model LocalUserParamsAllOf2 -type LocalUserParamsAllOf2 interface{} diff --git a/v2/models/local_user_response_params.go b/v2/models/local_user_response_params.go deleted file mode 100644 index c935ae45..00000000 --- a/v2/models/local_user_response_params.go +++ /dev/null @@ -1,50 +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" -) - -// LocalUserResponseParams Specifies properties for LOCAL cohesity user. -// -// swagger:model LocalUserResponseParams -type LocalUserResponseParams struct { - - // Specifies the email address of the User. - Email *string `json:"email,omitempty"` -} - -// Validate validates this local user response params -func (m *LocalUserResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this local user response params based on context it is used -func (m *LocalUserResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LocalUserResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalUserResponseParams) UnmarshalBinary(b []byte) error { - var res LocalUserResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/local_user_update_params.go b/v2/models/local_user_update_params.go deleted file mode 100644 index a7a5aa7a..00000000 --- a/v2/models/local_user_update_params.go +++ /dev/null @@ -1,140 +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" -) - -// LocalUserUpdateParams Specifies properties for LOCAL cohesity user which are updatable. -// -// swagger:model LocalUserUpdateParams -type LocalUserUpdateParams struct { - LocalUserParams - - // Specifies the current password of the user. This is required when a session user tries to update his own password. - CurrentPassword *string `json:"currentPassword,omitempty"` - - LocalUserUpdateParamsAllOf2 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *LocalUserUpdateParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 LocalUserParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.LocalUserParams = aO0 - - // AO1 - var dataAO1 struct { - CurrentPassword *string `json:"currentPassword,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CurrentPassword = dataAO1.CurrentPassword - - // AO2 - var aO2 LocalUserUpdateParamsAllOf2 - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.LocalUserUpdateParamsAllOf2 = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m LocalUserUpdateParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.LocalUserParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CurrentPassword *string `json:"currentPassword,omitempty"` - } - - dataAO1.CurrentPassword = m.CurrentPassword - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - - aO2, err := swag.WriteJSON(m.LocalUserUpdateParamsAllOf2) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this local user update params -func (m *LocalUserUpdateParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LocalUserParams - if err := m.LocalUserParams.Validate(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with LocalUserUpdateParamsAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this local user update params based on the context it is used -func (m *LocalUserUpdateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LocalUserParams - if err := m.LocalUserParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with LocalUserUpdateParamsAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *LocalUserUpdateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LocalUserUpdateParams) UnmarshalBinary(b []byte) error { - var res LocalUserUpdateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// LocalUserUpdateParamsAllOf2 local user update params all of2 -// -// swagger:model LocalUserUpdateParamsAllOf2 -type LocalUserUpdateParamsAllOf2 interface{} diff --git a/v2/models/locale.go b/v2/models/locale.go deleted file mode 100644 index aef833ab..00000000 --- a/v2/models/locale.go +++ /dev/null @@ -1,52 +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" -) - -// Locale Locale type. -// -// Locale type. -// -// swagger:model Locale -type Locale struct { - - // Specifies Locale type. - Locale string `json:"locale,omitempty"` -} - -// Validate validates this locale -func (m *Locale) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this locale based on context it is used -func (m *Locale) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Locale) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Locale) UnmarshalBinary(b []byte) error { - var res Locale - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lock_file_params.go b/v2/models/lock_file_params.go deleted file mode 100644 index 9e9a0fb6..00000000 --- a/v2/models/lock_file_params.go +++ /dev/null @@ -1,88 +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" -) - -// LockFileParams Specifies the parameters to lock a file in a view. -// -// swagger:model LockFileParams -type LockFileParams struct { - - // Specifies the file path that needs to be locked. - // Required: true - FilePath *string `json:"filePath"` - - // Specifies a definite timestamp in milliseconds for retaining the file or to extend it's expiry timestamp. - // Required: true - ExpiryTimestampMsecs *uint64 `json:"expiryTimestampMsecs"` -} - -// Validate validates this lock file params -func (m *LockFileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExpiryTimestampMsecs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LockFileParams) validateFilePath(formats strfmt.Registry) error { - - if err := validate.Required("filePath", "body", m.FilePath); err != nil { - return err - } - - return nil -} - -func (m *LockFileParams) validateExpiryTimestampMsecs(formats strfmt.Registry) error { - - if err := validate.Required("expiryTimestampMsecs", "body", m.ExpiryTimestampMsecs); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this lock file params based on context it is used -func (m *LockFileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LockFileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockFileParams) UnmarshalBinary(b []byte) error { - var res LockFileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/lock_range.go b/v2/models/lock_range.go deleted file mode 100644 index ead877f1..00000000 --- a/v2/models/lock_range.go +++ /dev/null @@ -1,56 +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" -) - -// LockRange Specifies details of an entity lock. -// -// swagger:model LockRange -type LockRange struct { - - // Specifies the offset of an entity lock. - Offset *uint64 `json:"offset,omitempty"` - - // Specifies the length of an entity lock. - Length *uint64 `json:"length,omitempty"` - - // Specifies if entity lock is exclusive. - IsExclusive *bool `json:"isExclusive,omitempty"` -} - -// Validate validates this lock range -func (m *LockRange) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this lock range based on context it is used -func (m *LockRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LockRange) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LockRange) UnmarshalBinary(b []byte) error { - var res LockRange - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/log_backup_policy.go b/v2/models/log_backup_policy.go deleted file mode 100644 index f1f9915c..00000000 --- a/v2/models/log_backup_policy.go +++ /dev/null @@ -1,159 +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" -) - -// LogBackupPolicy Log Backup (Databases) Schedule and Retention. -// -// Specifies log backup settings for a Protection Group. -// -// swagger:model LogBackupPolicy -type LogBackupPolicy struct { - - // Specifies the schedule settings for log backup. - // Required: true - Schedule *LogSchedule `json:"schedule"` - - // Specifies the Retention period of a log backup in days, months or years. - // Required: true - Retention *Retention `json:"retention"` -} - -// Validate validates this log backup policy -func (m *LogBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogBackupPolicy) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *LogBackupPolicy) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this log backup policy based on the context it is used -func (m *LogBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *LogBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *LogBackupPolicy) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *LogBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogBackupPolicy) UnmarshalBinary(b []byte) error { - var res LogBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/log_retention.go b/v2/models/log_retention.go deleted file mode 100644 index a41a5e3b..00000000 --- a/v2/models/log_retention.go +++ /dev/null @@ -1,191 +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" -) - -// LogRetention Specifies the log retention of a backup. -// -// swagger:model LogRetention -type LogRetention struct { - - // Specificies the Retention Unit of a backup measured in days, months or years.
If unit is 'Months', then number specified in duration is multiplied to 30.
Example: If duration is 4 and unit is 'Months' then number of retention days will be 30 * 4 = 120 days.
If unit is 'Years', then number specified in duration is multiplied to 365.
If duration is 2 and unit is 'Years' then number of retention days will be 365 * 2 = 730 days. - // Required: true - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the duration for a backup retention.
Example. If duration is 7 and unit is Months, the retention of a backup is 7 * 30 = 210 days. - // Required: true - // Minimum: 0 - Duration *int64 `json:"duration"` - - // Specifies WORM retention type for the 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. For RPaaS the data lock will always be automatically set to cover the whole retention, and any input will be ignored. - DataLockConfig *DataLockConfig `json:"dataLockConfig,omitempty"` -} - -// Validate validates this log retention -func (m *LogRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var logRetentionTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - logRetentionTypeUnitPropEnum = append(logRetentionTypeUnitPropEnum, v) - } -} - -const ( - - // LogRetentionUnitDays captures enum value "Days" - LogRetentionUnitDays string = "Days" - - // LogRetentionUnitWeeks captures enum value "Weeks" - LogRetentionUnitWeeks string = "Weeks" - - // LogRetentionUnitMonths captures enum value "Months" - LogRetentionUnitMonths string = "Months" - - // LogRetentionUnitYears captures enum value "Years" - LogRetentionUnitYears string = "Years" -) - -// prop value enum -func (m *LogRetention) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, logRetentionTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LogRetention) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *LogRetention) validateDuration(formats strfmt.Registry) error { - - if err := validate.Required("duration", "body", m.Duration); err != nil { - return err - } - - if err := validate.MinimumInt("duration", "body", *m.Duration, 0, false); err != nil { - return err - } - - return nil -} - -func (m *LogRetention) validateDataLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if m.DataLockConfig != nil { - if err := m.DataLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this log retention based on the context it is used -func (m *LogRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogRetention) contextValidateDataLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConfig != nil { - - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if err := m.DataLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LogRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogRetention) UnmarshalBinary(b []byte) error { - var res LogRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/log_schedule.go b/v2/models/log_schedule.go deleted file mode 100644 index 9b60ee6b..00000000 --- a/v2/models/log_schedule.go +++ /dev/null @@ -1,216 +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" -) - -// LogSchedule Log Schedule -// -// Specifies settings that defines how frequent log backup will be performed for a Protection Group. -// -// swagger:model LogSchedule -type LogSchedule struct { - - // Specifies how often to start new Protection Group Runs of a Protection Group.
'Minutes' specifies that Protection Group run starts periodically after certain number of minutes specified in 'frequency' field.
'Hours' specifies that Protection Group run starts periodically after certain number of hours specified in 'frequency' field. - // Required: true - // Enum: ["Minutes","Hours"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of minutes. - MinuteSchedule *MinuteSchedule `json:"minuteSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of hours. - HourSchedule *HourSchedule `json:"hourSchedule,omitempty"` -} - -// Validate validates this log schedule -func (m *LogSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinuteSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHourSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var logScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - logScheduleTypeUnitPropEnum = append(logScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // LogScheduleUnitMinutes captures enum value "Minutes" - LogScheduleUnitMinutes string = "Minutes" - - // LogScheduleUnitHours captures enum value "Hours" - LogScheduleUnitHours string = "Hours" -) - -// prop value enum -func (m *LogSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, logScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *LogSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *LogSchedule) validateMinuteSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if m.MinuteSchedule != nil { - if err := m.MinuteSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *LogSchedule) validateHourSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if m.HourSchedule != nil { - if err := m.HourSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this log schedule based on the context it is used -func (m *LogSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMinuteSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHourSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogSchedule) contextValidateMinuteSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MinuteSchedule != nil { - - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if err := m.MinuteSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *LogSchedule) contextValidateHourSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.HourSchedule != nil { - - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if err := m.HourSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LogSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogSchedule) UnmarshalBinary(b []byte) error { - var res LogSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/logical_volume_info.go b/v2/models/logical_volume_info.go deleted file mode 100644 index 9554e7d1..00000000 --- a/v2/models/logical_volume_info.go +++ /dev/null @@ -1,121 +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" -) - -// LogicalVolumeInfo Specifies the logical volume info for LVM or LDM volume. -// -// swagger:model LogicalVolumeInfo -type LogicalVolumeInfo struct { - - // Specifies the volume group uuid. - VolumeGroupUUID *string `json:"volumeGroupUuid,omitempty"` - - // Specifies the volume group name. - VolumeGroupName *string `json:"volumeGroupName,omitempty"` - - // Specifies the logical volume uuid. - LogicalVolumeUUID *string `json:"logicalVolumeUuid,omitempty"` - - // Specifies the logical volume name. - LogicalVolumeName *string `json:"logicalVolumeName,omitempty"` - - // Specifies the tree structure of the logical volume. - DeviceTree *DeviceTreeNode `json:"deviceTree,omitempty"` -} - -// Validate validates this logical volume info -func (m *LogicalVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeviceTree(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogicalVolumeInfo) validateDeviceTree(formats strfmt.Registry) error { - if swag.IsZero(m.DeviceTree) { // not required - return nil - } - - if m.DeviceTree != nil { - if err := m.DeviceTree.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceTree") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceTree") - } - return err - } - } - - return nil -} - -// ContextValidate validate this logical volume info based on the context it is used -func (m *LogicalVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeviceTree(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *LogicalVolumeInfo) contextValidateDeviceTree(ctx context.Context, formats strfmt.Registry) error { - - if m.DeviceTree != nil { - - if swag.IsZero(m.DeviceTree) { // not required - return nil - } - - if err := m.DeviceTree.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deviceTree") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deviceTree") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *LogicalVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LogicalVolumeInfo) UnmarshalBinary(b []byte) error { - var res LogicalVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_oref.go b/v2/models/m_oref.go deleted file mode 100644 index 7344afd5..00000000 --- a/v2/models/m_oref.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" -) - -// MOref Specifies the MoRef for a VMware object. -// -// swagger:model MOref -type MOref struct { - - // Unique identifier for the object type. - Item *string `json:"item,omitempty"` - - // Specifies the type of VMware object - Type *string `json:"type,omitempty"` -} - -// Validate validates this m oref -func (m *MOref) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this m oref based on context it is used -func (m *MOref) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MOref) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MOref) UnmarshalBinary(b []byte) error { - var res MOref - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_file_protection_group_host_params.go b/v2/models/m_s_sql_file_protection_group_host_params.go deleted file mode 100644 index f716aa3f..00000000 --- a/v2/models/m_s_sql_file_protection_group_host_params.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" - "github.com/go-openapi/validate" -) - -// MSSQLFileProtectionGroupHostParams MSSQL File Protection Group Container Params -// -// Specifies the host specific parameters for a host container in this protection group. Objects specified here should only be MSSQL root containers and will not be protected unless they are also specified in the 'objects' list. This list is just for specifying source level settings. -// -// swagger:model MSSQLFileProtectionGroupHostParams -type MSSQLFileProtectionGroupHostParams struct { - - // Specifies the id of the host container on which databases are hosted. - // Required: true - HostID *int64 `json:"hostId"` - - // Specifies the name of the host container on which databases are hosted. - // Read Only: true - HostName *string `json:"hostName,omitempty"` - - // Specifies whether or not to disable source side deduplication on this source. The default behavior is false unless the user has set 'performSourceSideDeduplication' to true. - DisableSourceSideDeduplication *bool `json:"disableSourceSideDeduplication,omitempty"` -} - -// Validate validates this m s SQL file protection group host params -func (m *MSSQLFileProtectionGroupHostParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLFileProtectionGroupHostParams) validateHostID(formats strfmt.Registry) error { - - if err := validate.Required("hostId", "body", m.HostID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this m s SQL file protection group host params based on the context it is used -func (m *MSSQLFileProtectionGroupHostParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLFileProtectionGroupHostParams) contextValidateHostName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hostName", "body", m.HostName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupHostParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupHostParams) UnmarshalBinary(b []byte) error { - var res MSSQLFileProtectionGroupHostParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_file_protection_group_object_params.go b/v2/models/m_s_sql_file_protection_group_object_params.go deleted file mode 100644 index 9da5cce7..00000000 --- a/v2/models/m_s_sql_file_protection_group_object_params.go +++ /dev/null @@ -1,112 +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" -) - -// MSSQLFileProtectionGroupObjectParams MSSQL File Protection Group Object params. -// -// Specifies the object params to create File based MSSQL Protection Group. -// -// swagger:model MSSQLFileProtectionGroupObjectParams -type MSSQLFileProtectionGroupObjectParams struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object being protected. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the type of source being protected. - // Read Only: true - SourceType *string `json:"sourceType,omitempty"` -} - -// Validate validates this m s SQL file protection group object params -func (m *MSSQLFileProtectionGroupObjectParams) 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 *MSSQLFileProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this m s SQL file protection group object params based on the context it is used -func (m *MSSQLFileProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLFileProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *MSSQLFileProtectionGroupObjectParams) contextValidateSourceType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceType", "body", m.SourceType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res MSSQLFileProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_file_protection_group_params.go b/v2/models/m_s_sql_file_protection_group_params.go deleted file mode 100644 index 9e9491a6..00000000 --- a/v2/models/m_s_sql_file_protection_group_params.go +++ /dev/null @@ -1,273 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MSSQLFileProtectionGroupParams File based MSSQL Protection Group Request Params. -// -// Specifies the params to create a File based MSSQL Protection Group. -// -// swagger:model MSSQLFileProtectionGroupParams -type MSSQLFileProtectionGroupParams struct { - - // Specifies the list of object params to be protected. - // Required: true - // Min Items: 1 - Objects []*MSSQLFileProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or not to perform source side deduplication on this Protection Group. - PerformSourceSideDeduplication *bool `json:"performSourceSideDeduplication,omitempty"` - - // Specifies settings which are to be applied to specific host containers in this protection group. - AdditionalHostParams []*MSSQLFileProtectionGroupHostParams `json:"additionalHostParams"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MSSQLFileProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*MSSQLFileProtectionGroupObjectParams `json:"objects"` - - PerformSourceSideDeduplication *bool `json:"performSourceSideDeduplication,omitempty"` - - AdditionalHostParams []*MSSQLFileProtectionGroupHostParams `json:"additionalHostParams"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.PerformSourceSideDeduplication = dataAO0.PerformSourceSideDeduplication - - m.AdditionalHostParams = dataAO0.AdditionalHostParams - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MSSQLFileProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*MSSQLFileProtectionGroupObjectParams `json:"objects"` - - PerformSourceSideDeduplication *bool `json:"performSourceSideDeduplication,omitempty"` - - AdditionalHostParams []*MSSQLFileProtectionGroupHostParams `json:"additionalHostParams"` - } - - dataAO0.Objects = m.Objects - - dataAO0.PerformSourceSideDeduplication = m.PerformSourceSideDeduplication - - dataAO0.AdditionalHostParams = m.AdditionalHostParams - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this m s SQL file protection group params -func (m *MSSQLFileProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdditionalHostParams(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLFileProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSSQLFileProtectionGroupParams) validateAdditionalHostParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AdditionalHostParams) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalHostParams); i++ { - if swag.IsZero(m.AdditionalHostParams[i]) { // not required - continue - } - - if m.AdditionalHostParams[i] != nil { - if err := m.AdditionalHostParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this m s SQL file protection group params based on the context it is used -func (m *MSSQLFileProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdditionalHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLFileProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSSQLFileProtectionGroupParams) contextValidateAdditionalHostParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalHostParams); i++ { - - if m.AdditionalHostParams[i] != nil { - - if swag.IsZero(m.AdditionalHostParams[i]) { // not required - return nil - } - - if err := m.AdditionalHostParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLFileProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res MSSQLFileProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_native_protection_group_object_params.go b/v2/models/m_s_sql_native_protection_group_object_params.go deleted file mode 100644 index f5437c92..00000000 --- a/v2/models/m_s_sql_native_protection_group_object_params.go +++ /dev/null @@ -1,112 +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" -) - -// MSSQLNativeProtectionGroupObjectParams MSSQL File Protection Group Object params. -// -// Specifies the object params to create File based MSSQL Protection Group. -// -// swagger:model MSSQLNativeProtectionGroupObjectParams -type MSSQLNativeProtectionGroupObjectParams struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object being protected. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the type of source being protected. - // Read Only: true - SourceType *string `json:"sourceType,omitempty"` -} - -// Validate validates this m s SQL native protection group object params -func (m *MSSQLNativeProtectionGroupObjectParams) 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 *MSSQLNativeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this m s SQL native protection group object params based on the context it is used -func (m *MSSQLNativeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLNativeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *MSSQLNativeProtectionGroupObjectParams) contextValidateSourceType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceType", "body", m.SourceType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLNativeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLNativeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res MSSQLNativeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_native_protection_group_params.go b/v2/models/m_s_sql_native_protection_group_params.go deleted file mode 100644 index cafbc250..00000000 --- a/v2/models/m_s_sql_native_protection_group_params.go +++ /dev/null @@ -1,213 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MSSQLNativeProtectionGroupParams Native based MSSQL Protection Group Request Params. -// -// Specifies the params to create a Native based MSSQL Protection Group. -// -// swagger:model MSSQLNativeProtectionGroupParams -type MSSQLNativeProtectionGroupParams struct { - - // Specifies the list of object params to be protected. - // Required: true - // Min Items: 1 - Objects []*MSSQLNativeProtectionGroupObjectParams `json:"objects"` - - // Specifies the number of streams to be used. - NumStreams *int32 `json:"numStreams,omitempty"` - - // Specifies the WithClause to be used. - WithClause *string `json:"withClause,omitempty"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MSSQLNativeProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*MSSQLNativeProtectionGroupObjectParams `json:"objects"` - - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.NumStreams = dataAO0.NumStreams - - m.WithClause = dataAO0.WithClause - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MSSQLNativeProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*MSSQLNativeProtectionGroupObjectParams `json:"objects"` - - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - - dataAO0.Objects = m.Objects - - dataAO0.NumStreams = m.NumStreams - - dataAO0.WithClause = m.WithClause - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this m s SQL native protection group params -func (m *MSSQLNativeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLNativeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this m s SQL native protection group params based on the context it is used -func (m *MSSQLNativeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLNativeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLNativeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLNativeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res MSSQLNativeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_protection_group_params.go b/v2/models/m_s_sql_protection_group_params.go deleted file mode 100644 index 0257c888..00000000 --- a/v2/models/m_s_sql_protection_group_params.go +++ /dev/null @@ -1,270 +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" -) - -// MSSQLProtectionGroupParams MSSQL Protection Group Params. -// -// Specifies the parameters specific to MSSQL Protection Group. -// -// swagger:model MSSQLProtectionGroupParams -type MSSQLProtectionGroupParams struct { - - // Specifies the MSSQL Protection Group type. - // Required: true - // Enum: ["kFile","kVolume","kNative"] - ProtectionType *string `json:"protectionType"` - - // Specifies the File based MSSQL Protection Group params. - FileProtectionTypeParams *MSSQLFileProtectionGroupParams `json:"fileProtectionTypeParams,omitempty"` - - // Specifies the Volume based MSSQL Protection Group params. - VolumeProtectionTypeParams *MSSQLVolumeProtectionGroupParams `json:"volumeProtectionTypeParams,omitempty"` - - // Specifies the Native based MSSQL Protection Group params. - NativeProtectionTypeParams *MSSQLNativeProtectionGroupParams `json:"nativeProtectionTypeParams,omitempty"` -} - -// Validate validates this m s SQL protection group params -func (m *MSSQLProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mSSqlProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume","kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mSSqlProtectionGroupParamsTypeProtectionTypePropEnum = append(mSSqlProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // MSSQLProtectionGroupParamsProtectionTypeKFile captures enum value "kFile" - MSSQLProtectionGroupParamsProtectionTypeKFile string = "kFile" - - // MSSQLProtectionGroupParamsProtectionTypeKVolume captures enum value "kVolume" - MSSQLProtectionGroupParamsProtectionTypeKVolume string = "kVolume" - - // MSSQLProtectionGroupParamsProtectionTypeKNative captures enum value "kNative" - MSSQLProtectionGroupParamsProtectionTypeKNative string = "kNative" -) - -// prop value enum -func (m *MSSQLProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mSSqlProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MSSQLProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *MSSQLProtectionGroupParams) validateFileProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileProtectionTypeParams) { // not required - return nil - } - - if m.FileProtectionTypeParams != nil { - if err := m.FileProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MSSQLProtectionGroupParams) validateVolumeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeProtectionTypeParams) { // not required - return nil - } - - if m.VolumeProtectionTypeParams != nil { - if err := m.VolumeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MSSQLProtectionGroupParams) validateNativeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if m.NativeProtectionTypeParams != nil { - if err := m.NativeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this m s SQL protection group params based on the context it is used -func (m *MSSQLProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLProtectionGroupParams) contextValidateFileProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileProtectionTypeParams != nil { - - if swag.IsZero(m.FileProtectionTypeParams) { // not required - return nil - } - - if err := m.FileProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MSSQLProtectionGroupParams) contextValidateVolumeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeProtectionTypeParams != nil { - - if swag.IsZero(m.VolumeProtectionTypeParams) { // not required - return nil - } - - if err := m.VolumeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MSSQLProtectionGroupParams) contextValidateNativeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeProtectionTypeParams != nil { - - if swag.IsZero(m.NativeProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res MSSQLProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_volume_protection_group_host_params.go b/v2/models/m_s_sql_volume_protection_group_host_params.go deleted file mode 100644 index bd2ddb9e..00000000 --- a/v2/models/m_s_sql_volume_protection_group_host_params.go +++ /dev/null @@ -1,101 +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" -) - -// MSSQLVolumeProtectionGroupHostParams MSSQL Volume Protection Group Container Params -// -// Specifies the host specific parameters for a host container in this protection group. Objects specified here should only be MSSQL root containers and will not be protected unless they are also specified in the 'objects' list. This list is just for specifying source level settings. -// -// swagger:model MSSQLVolumeProtectionGroupHostParams -type MSSQLVolumeProtectionGroupHostParams struct { - - // Specifies the id of the host container on which databases are hosted. - // Required: true - HostID *int64 `json:"hostId"` - - // Specifies the name of the host container on which databases are hosted. - // Read Only: true - HostName *string `json:"hostName,omitempty"` - - // Specifies the list of volume GUIDs to be protected. If not specified, all the volumes of the host will be protected. Note that volumes of host on which databases are hosted are protected even if its not mentioned in this list. - VolumeGuids []string `json:"volumeGuids"` - - // Specifies whether to enable system/bmr backup using 3rd party tools installed on agent host. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` -} - -// Validate validates this m s SQL volume protection group host params -func (m *MSSQLVolumeProtectionGroupHostParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLVolumeProtectionGroupHostParams) validateHostID(formats strfmt.Registry) error { - - if err := validate.Required("hostId", "body", m.HostID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this m s SQL volume protection group host params based on the context it is used -func (m *MSSQLVolumeProtectionGroupHostParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLVolumeProtectionGroupHostParams) contextValidateHostName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hostName", "body", m.HostName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupHostParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupHostParams) UnmarshalBinary(b []byte) error { - var res MSSQLVolumeProtectionGroupHostParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_volume_protection_group_object_params.go b/v2/models/m_s_sql_volume_protection_group_object_params.go deleted file mode 100644 index 78408bdf..00000000 --- a/v2/models/m_s_sql_volume_protection_group_object_params.go +++ /dev/null @@ -1,112 +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" -) - -// MSSQLVolumeProtectionGroupObjectParams MSSQL File Protection Group Object params. -// -// Specifies the object params to create File based MSSQL Protection Group. -// -// swagger:model MSSQLVolumeProtectionGroupObjectParams -type MSSQLVolumeProtectionGroupObjectParams struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object being protected. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the type of source being protected. - // Read Only: true - SourceType *string `json:"sourceType,omitempty"` -} - -// Validate validates this m s SQL volume protection group object params -func (m *MSSQLVolumeProtectionGroupObjectParams) 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 *MSSQLVolumeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this m s SQL volume protection group object params based on the context it is used -func (m *MSSQLVolumeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceType(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLVolumeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *MSSQLVolumeProtectionGroupObjectParams) contextValidateSourceType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceType", "body", m.SourceType); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res MSSQLVolumeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/m_s_sql_volume_protection_group_params.go b/v2/models/m_s_sql_volume_protection_group_params.go deleted file mode 100644 index 9f9c7f18..00000000 --- a/v2/models/m_s_sql_volume_protection_group_params.go +++ /dev/null @@ -1,344 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MSSQLVolumeProtectionGroupParams Volume based MSSQL Protection Group Request Params. -// -// Specifies the params to create a Volume based MSSQL Protection Group. -// -// swagger:model MSSQLVolumeProtectionGroupParams -type MSSQLVolumeProtectionGroupParams struct { - - // Specifies the list of object ids to be protected. - // Required: true - // Min Items: 1 - Objects []*MSSQLVolumeProtectionGroupObjectParams `json:"objects"` - - // Specifies whether or to perform incremental backups the first time after a server restarts. By default, a full backup will be performed. - IncrementalBackupAfterRestart *bool `json:"incrementalBackupAfterRestart,omitempty"` - - // indexing policy - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether to only backup volumes on which the specified databases reside. If not specified (default), all the volumes of the host will be protected. - BackupDbVolumesOnly *bool `json:"backupDbVolumesOnly,omitempty"` - - // Specifies settings which are to be applied to specific host containers in this protection group. - AdditionalHostParams []*MSSQLVolumeProtectionGroupHostParams `json:"additionalHostParams"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MSSQLVolumeProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*MSSQLVolumeProtectionGroupObjectParams `json:"objects"` - - IncrementalBackupAfterRestart *bool `json:"incrementalBackupAfterRestart,omitempty"` - - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - BackupDbVolumesOnly *bool `json:"backupDbVolumesOnly,omitempty"` - - AdditionalHostParams []*MSSQLVolumeProtectionGroupHostParams `json:"additionalHostParams"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.IncrementalBackupAfterRestart = dataAO0.IncrementalBackupAfterRestart - - m.IndexingPolicy = dataAO0.IndexingPolicy - - m.BackupDbVolumesOnly = dataAO0.BackupDbVolumesOnly - - m.AdditionalHostParams = dataAO0.AdditionalHostParams - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MSSQLVolumeProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*MSSQLVolumeProtectionGroupObjectParams `json:"objects"` - - IncrementalBackupAfterRestart *bool `json:"incrementalBackupAfterRestart,omitempty"` - - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - BackupDbVolumesOnly *bool `json:"backupDbVolumesOnly,omitempty"` - - AdditionalHostParams []*MSSQLVolumeProtectionGroupHostParams `json:"additionalHostParams"` - } - - dataAO0.Objects = m.Objects - - dataAO0.IncrementalBackupAfterRestart = m.IncrementalBackupAfterRestart - - dataAO0.IndexingPolicy = m.IndexingPolicy - - dataAO0.BackupDbVolumesOnly = m.BackupDbVolumesOnly - - dataAO0.AdditionalHostParams = m.AdditionalHostParams - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this m s SQL volume protection group params -func (m *MSSQLVolumeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdditionalHostParams(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) validateAdditionalHostParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AdditionalHostParams) { // not required - return nil - } - - for i := 0; i < len(m.AdditionalHostParams); i++ { - if swag.IsZero(m.AdditionalHostParams[i]) { // not required - continue - } - - if m.AdditionalHostParams[i] != nil { - if err := m.AdditionalHostParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this m s SQL volume protection group params based on the context it is used -func (m *MSSQLVolumeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdditionalHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *MSSQLVolumeProtectionGroupParams) contextValidateAdditionalHostParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AdditionalHostParams); i++ { - - if m.AdditionalHostParams[i] != nil { - - if swag.IsZero(m.AdditionalHostParams[i]) { // not required - return nil - } - - if err := m.AdditionalHostParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("additionalHostParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MSSQLVolumeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res MSSQLVolumeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/machine_account.go b/v2/models/machine_account.go deleted file mode 100644 index f48ccbe6..00000000 --- a/v2/models/machine_account.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MachineAccount Specifies a machine account. -// -// swagger:model MachineAccount -type MachineAccount struct { - - // Specifies the machine account name. - // Required: true - // Pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,13}[a-zA-Z0-9])$ - Name *string `json:"name"` - - // Specifies the DNS host name of the machine account. - DNSHostName *string `json:"dnsHostName,omitempty"` - - // Specifies a list of encryption types apply to the machine account. - // Unique: true - Encryption []string `json:"encryption"` - - // Specifies the customized Service Principal Names of the Machine Account. Service Principal Name should be unique across the Active Directory forest. - ServicePrincipalNames []string `json:"servicePrincipalNames"` -} - -// Validate validates this machine account -func (m *MachineAccount) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEncryption(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MachineAccount) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - if err := validate.Pattern("name", "body", *m.Name, `^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,13}[a-zA-Z0-9])$`); err != nil { - return err - } - - return nil -} - -var machineAccountEncryptionItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DES-CBC-CRC","DES-CBC-MD5","RC4-HMAC","AES128-CTS-HMAC-SHA1-96","AES256-CTS-HMAC-SHA1-96"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - machineAccountEncryptionItemsEnum = append(machineAccountEncryptionItemsEnum, v) - } -} - -func (m *MachineAccount) validateEncryptionItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, machineAccountEncryptionItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *MachineAccount) validateEncryption(formats strfmt.Registry) error { - if swag.IsZero(m.Encryption) { // not required - return nil - } - - if err := validate.UniqueItems("encryption", "body", m.Encryption); err != nil { - return err - } - - for i := 0; i < len(m.Encryption); i++ { - - // value enum - if err := m.validateEncryptionItemsEnum("encryption"+"."+strconv.Itoa(i), "body", m.Encryption[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this machine account based on context it is used -func (m *MachineAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MachineAccount) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MachineAccount) UnmarshalBinary(b []byte) error { - var res MachineAccount - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/machine_account_encryption_type.go b/v2/models/machine_account_encryption_type.go deleted file mode 100644 index 27bc5ce2..00000000 --- a/v2/models/machine_account_encryption_type.go +++ /dev/null @@ -1,116 +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" -) - -// MachineAccountEncryptionType Machine Account Encryption Type -// -// Machine account encryption type. -// -// swagger:model MachineAccountEncryptionType -type MachineAccountEncryptionType struct { - - // Specifies the encryption type of a machine account. - // Enum: ["DES-CBC-CRC","DES-CBC-MD5","RC4-HMAC","AES128-CTS-HMAC-SHA1-96","AES256-CTS-HMAC-SHA1-96"] - Type string `json:"type,omitempty"` -} - -// Validate validates this machine account encryption type -func (m *MachineAccountEncryptionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var machineAccountEncryptionTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DES-CBC-CRC","DES-CBC-MD5","RC4-HMAC","AES128-CTS-HMAC-SHA1-96","AES256-CTS-HMAC-SHA1-96"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - machineAccountEncryptionTypeTypeTypePropEnum = append(machineAccountEncryptionTypeTypeTypePropEnum, v) - } -} - -const ( - - // MachineAccountEncryptionTypeTypeDESDashCBCDashCRC captures enum value "DES-CBC-CRC" - MachineAccountEncryptionTypeTypeDESDashCBCDashCRC string = "DES-CBC-CRC" - - // MachineAccountEncryptionTypeTypeDESDashCBCDashMD5 captures enum value "DES-CBC-MD5" - MachineAccountEncryptionTypeTypeDESDashCBCDashMD5 string = "DES-CBC-MD5" - - // MachineAccountEncryptionTypeTypeRC4DashHMAC captures enum value "RC4-HMAC" - MachineAccountEncryptionTypeTypeRC4DashHMAC string = "RC4-HMAC" - - // MachineAccountEncryptionTypeTypeAES128DashCTSDashHMACDashSHA1Dash96 captures enum value "AES128-CTS-HMAC-SHA1-96" - MachineAccountEncryptionTypeTypeAES128DashCTSDashHMACDashSHA1Dash96 string = "AES128-CTS-HMAC-SHA1-96" - - // MachineAccountEncryptionTypeTypeAES256DashCTSDashHMACDashSHA1Dash96 captures enum value "AES256-CTS-HMAC-SHA1-96" - MachineAccountEncryptionTypeTypeAES256DashCTSDashHMACDashSHA1Dash96 string = "AES256-CTS-HMAC-SHA1-96" -) - -// prop value enum -func (m *MachineAccountEncryptionType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, machineAccountEncryptionTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MachineAccountEncryptionType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this machine account encryption type based on context it is used -func (m *MachineAccountEncryptionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MachineAccountEncryptionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MachineAccountEncryptionType) UnmarshalBinary(b []byte) error { - var res MachineAccountEncryptionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mailbox_item_type.go b/v2/models/mailbox_item_type.go deleted file mode 100644 index 0488a67f..00000000 --- a/v2/models/mailbox_item_type.go +++ /dev/null @@ -1,119 +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" -) - -// MailboxItemType Mailbox items types for search. -// -// Mailbox items types for search. -// -// swagger:model MailboxItemType -type MailboxItemType struct { - - // Specifies the Mailbox item type for search. - // Enum: ["Email","Folder","Calendar","Contact","Task","Note"] - Type string `json:"type,omitempty"` -} - -// Validate validates this mailbox item type -func (m *MailboxItemType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mailboxItemTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Email","Folder","Calendar","Contact","Task","Note"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mailboxItemTypeTypeTypePropEnum = append(mailboxItemTypeTypeTypePropEnum, v) - } -} - -const ( - - // MailboxItemTypeTypeEmail captures enum value "Email" - MailboxItemTypeTypeEmail string = "Email" - - // MailboxItemTypeTypeFolder captures enum value "Folder" - MailboxItemTypeTypeFolder string = "Folder" - - // MailboxItemTypeTypeCalendar captures enum value "Calendar" - MailboxItemTypeTypeCalendar string = "Calendar" - - // MailboxItemTypeTypeContact captures enum value "Contact" - MailboxItemTypeTypeContact string = "Contact" - - // MailboxItemTypeTypeTask captures enum value "Task" - MailboxItemTypeTypeTask string = "Task" - - // MailboxItemTypeTypeNote captures enum value "Note" - MailboxItemTypeTypeNote string = "Note" -) - -// prop value enum -func (m *MailboxItemType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mailboxItemTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MailboxItemType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mailbox item type based on context it is used -func (m *MailboxItemType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MailboxItemType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MailboxItemType) UnmarshalBinary(b []byte) error { - var res MailboxItemType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mailbox_param.go b/v2/models/mailbox_param.go deleted file mode 100644 index 9999b7c5..00000000 --- a/v2/models/mailbox_param.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MailboxParam Specifies parameters to recover a Mailbox. -// -// swagger:model MailboxParam -type MailboxParam struct { - - // Specifies whether to recover the whole Mailbox. - RecoverEntireMailbox *bool `json:"recoverEntireMailbox,omitempty"` - - // Specifies a list of email folders to recover. - RecoverFolders []*FolderItem `json:"recoverFolders"` -} - -// Validate validates this mailbox param -func (m *MailboxParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverFolders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MailboxParam) validateRecoverFolders(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFolders) { // not required - return nil - } - - for i := 0; i < len(m.RecoverFolders); i++ { - if swag.IsZero(m.RecoverFolders[i]) { // not required - continue - } - - if m.RecoverFolders[i] != nil { - if err := m.RecoverFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mailbox param based on the context it is used -func (m *MailboxParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MailboxParam) contextValidateRecoverFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverFolders); i++ { - - if m.RecoverFolders[i] != nil { - - if swag.IsZero(m.RecoverFolders[i]) { // not required - return nil - } - - if err := m.RecoverFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MailboxParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MailboxParam) UnmarshalBinary(b []byte) error { - var res MailboxParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/maintenance_mode_config.go b/v2/models/maintenance_mode_config.go deleted file mode 100644 index 418aa783..00000000 --- a/v2/models/maintenance_mode_config.go +++ /dev/null @@ -1,237 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MaintenanceModeConfig Specifies the entity metadata for maintenance mode. -// -// swagger:model MaintenanceModeConfig -type MaintenanceModeConfig struct { - - // Specifies the type of intervention for different workflows when the source goes into maintenance mode. - WorkflowInterventionSpecList []*WorkflowInterventionSpec `json:"workflowInterventionSpecList"` - - // Specifies the absolute intervals where the maintenance schedule is valid, i.e. maintenance_shedule is considered only for these time ranges. (For example, if there is one time range with [now_usecs, now_usecs + 10 days], the action will be done during the maintenance_schedule for the next 10 days.)The start time must be specified. The end time can be -1 which would denote an indefinite maintenance mode. - ActivationTimeIntervals []*TimeRangeUsecs `json:"activationTimeIntervals"` - - // Specifies the schedule to be followed in the activationTimeIntervals. - MaintenanceSchedule *Schedule `json:"maintenanceSchedule,omitempty"` - - // User provided message associated with this maintenance mode. - UserMessage string `json:"userMessage,omitempty"` -} - -// Validate validates this maintenance mode config -func (m *MaintenanceModeConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWorkflowInterventionSpecList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateActivationTimeIntervals(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaintenanceSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MaintenanceModeConfig) validateWorkflowInterventionSpecList(formats strfmt.Registry) error { - if swag.IsZero(m.WorkflowInterventionSpecList) { // not required - return nil - } - - for i := 0; i < len(m.WorkflowInterventionSpecList); i++ { - if swag.IsZero(m.WorkflowInterventionSpecList[i]) { // not required - continue - } - - if m.WorkflowInterventionSpecList[i] != nil { - if err := m.WorkflowInterventionSpecList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workflowInterventionSpecList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workflowInterventionSpecList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfig) validateActivationTimeIntervals(formats strfmt.Registry) error { - if swag.IsZero(m.ActivationTimeIntervals) { // not required - return nil - } - - for i := 0; i < len(m.ActivationTimeIntervals); i++ { - if swag.IsZero(m.ActivationTimeIntervals[i]) { // not required - continue - } - - if m.ActivationTimeIntervals[i] != nil { - if err := m.ActivationTimeIntervals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfig) validateMaintenanceSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MaintenanceSchedule) { // not required - return nil - } - - if m.MaintenanceSchedule != nil { - if err := m.MaintenanceSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this maintenance mode config based on the context it is used -func (m *MaintenanceModeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWorkflowInterventionSpecList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateActivationTimeIntervals(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaintenanceSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MaintenanceModeConfig) contextValidateWorkflowInterventionSpecList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.WorkflowInterventionSpecList); i++ { - - if m.WorkflowInterventionSpecList[i] != nil { - - if swag.IsZero(m.WorkflowInterventionSpecList[i]) { // not required - return nil - } - - if err := m.WorkflowInterventionSpecList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workflowInterventionSpecList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workflowInterventionSpecList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfig) contextValidateActivationTimeIntervals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActivationTimeIntervals); i++ { - - if m.ActivationTimeIntervals[i] != nil { - - if swag.IsZero(m.ActivationTimeIntervals[i]) { // not required - return nil - } - - if err := m.ActivationTimeIntervals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activationTimeIntervals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MaintenanceModeConfig) contextValidateMaintenanceSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MaintenanceSchedule != nil { - - if swag.IsZero(m.MaintenanceSchedule) { // not required - return nil - } - - if err := m.MaintenanceSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maintenanceSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maintenanceSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MaintenanceModeConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MaintenanceModeConfig) UnmarshalBinary(b []byte) error { - var res MaintenanceModeConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/maintenance_mode_workflow_type.go b/v2/models/maintenance_mode_workflow_type.go deleted file mode 100644 index 14a9605d..00000000 --- a/v2/models/maintenance_mode_workflow_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MaintenanceModeWorkflowType MaintenanceModeWorkflowType -// -// Specifies the workflow types involved in maintenance mode. -// -// swagger:model MaintenanceModeWorkflowType -type MaintenanceModeWorkflowType struct { - - // Specifies the types of workflow associated to maintenance mode. - // Enum: ["BackupRun"] - WorkflowType string `json:"workflowType,omitempty"` -} - -// Validate validates this maintenance mode workflow type -func (m *MaintenanceModeWorkflowType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWorkflowType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var maintenanceModeWorkflowTypeTypeWorkflowTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupRun"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - maintenanceModeWorkflowTypeTypeWorkflowTypePropEnum = append(maintenanceModeWorkflowTypeTypeWorkflowTypePropEnum, v) - } -} - -const ( - - // MaintenanceModeWorkflowTypeWorkflowTypeBackupRun captures enum value "BackupRun" - MaintenanceModeWorkflowTypeWorkflowTypeBackupRun string = "BackupRun" -) - -// prop value enum -func (m *MaintenanceModeWorkflowType) validateWorkflowTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, maintenanceModeWorkflowTypeTypeWorkflowTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MaintenanceModeWorkflowType) validateWorkflowType(formats strfmt.Registry) error { - if swag.IsZero(m.WorkflowType) { // not required - return nil - } - - // value enum - if err := m.validateWorkflowTypeEnum("workflowType", "body", m.WorkflowType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this maintenance mode workflow type based on context it is used -func (m *MaintenanceModeWorkflowType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MaintenanceModeWorkflowType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MaintenanceModeWorkflowType) UnmarshalBinary(b []byte) error { - var res MaintenanceModeWorkflowType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mark_baseos_upgrade_info.go b/v2/models/mark_baseos_upgrade_info.go deleted file mode 100644 index 5a72acc4..00000000 --- a/v2/models/mark_baseos_upgrade_info.go +++ /dev/null @@ -1,74 +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" -) - -// MarkBaseosUpgradeInfo Specifies info about BaseOS upgrade operation. -// -// swagger:model MarkBaseosUpgradeInfo -type MarkBaseosUpgradeInfo struct { - - // Specifies whether the operation is set or not. - // Required: true - SetOperation *bool `json:"setOperation"` - - // Specifies optional message related to operation status. - Message *string `json:"message,omitempty"` -} - -// Validate validates this mark baseos upgrade info -func (m *MarkBaseosUpgradeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSetOperation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MarkBaseosUpgradeInfo) validateSetOperation(formats strfmt.Registry) error { - - if err := validate.Required("setOperation", "body", m.SetOperation); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mark baseos upgrade info based on context it is used -func (m *MarkBaseosUpgradeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MarkBaseosUpgradeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MarkBaseosUpgradeInfo) UnmarshalBinary(b []byte) error { - var res MarkBaseosUpgradeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_audit_entity_types.go b/v2/models/mcm_audit_entity_types.go deleted file mode 100644 index f5c8cf6a..00000000 --- a/v2/models/mcm_audit_entity_types.go +++ /dev/null @@ -1,122 +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" -) - -// McmAuditEntityTypes Mcm Audit Entity Types -// -// # Mcm Audit Entity Types -// -// swagger:model McmAuditEntityTypes -type McmAuditEntityTypes struct { - - // Mcm Audit Entity Types - // Enum: ["WhitelabelingSetting","AuditLogSetting","GflagRecipe","Gflag","RPaasRegion","RPaaSOnboarding","ClusterUpgrade"] - EntityTypes string `json:"entityTypes,omitempty"` -} - -// Validate validates this mcm audit entity types -func (m *McmAuditEntityTypes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEntityTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmAuditEntityTypesTypeEntityTypesPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["WhitelabelingSetting","AuditLogSetting","GflagRecipe","Gflag","RPaasRegion","RPaaSOnboarding","ClusterUpgrade"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmAuditEntityTypesTypeEntityTypesPropEnum = append(mcmAuditEntityTypesTypeEntityTypesPropEnum, v) - } -} - -const ( - - // McmAuditEntityTypesEntityTypesWhitelabelingSetting captures enum value "WhitelabelingSetting" - McmAuditEntityTypesEntityTypesWhitelabelingSetting string = "WhitelabelingSetting" - - // McmAuditEntityTypesEntityTypesAuditLogSetting captures enum value "AuditLogSetting" - McmAuditEntityTypesEntityTypesAuditLogSetting string = "AuditLogSetting" - - // McmAuditEntityTypesEntityTypesGflagRecipe captures enum value "GflagRecipe" - McmAuditEntityTypesEntityTypesGflagRecipe string = "GflagRecipe" - - // McmAuditEntityTypesEntityTypesGflag captures enum value "Gflag" - McmAuditEntityTypesEntityTypesGflag string = "Gflag" - - // McmAuditEntityTypesEntityTypesRPaasRegion captures enum value "RPaasRegion" - McmAuditEntityTypesEntityTypesRPaasRegion string = "RPaasRegion" - - // McmAuditEntityTypesEntityTypesRPaaSOnboarding captures enum value "RPaaSOnboarding" - McmAuditEntityTypesEntityTypesRPaaSOnboarding string = "RPaaSOnboarding" - - // McmAuditEntityTypesEntityTypesClusterUpgrade captures enum value "ClusterUpgrade" - McmAuditEntityTypesEntityTypesClusterUpgrade string = "ClusterUpgrade" -) - -// prop value enum -func (m *McmAuditEntityTypes) validateEntityTypesEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmAuditEntityTypesTypeEntityTypesPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmAuditEntityTypes) validateEntityTypes(formats strfmt.Registry) error { - if swag.IsZero(m.EntityTypes) { // not required - return nil - } - - // value enum - if err := m.validateEntityTypesEnum("entityTypes", "body", m.EntityTypes); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm audit entity types based on context it is used -func (m *McmAuditEntityTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmAuditEntityTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmAuditEntityTypes) UnmarshalBinary(b []byte) error { - var res McmAuditEntityTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_claim_entity_type.go b/v2/models/mcm_claim_entity_type.go deleted file mode 100644 index 2ebb9f36..00000000 --- a/v2/models/mcm_claim_entity_type.go +++ /dev/null @@ -1,113 +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" -) - -// McmClaimEntityType Entity type. -// -// Entity type. -// -// swagger:model McmClaimEntityType -type McmClaimEntityType struct { - - // Entity type. - // Enum: ["Rigel","Cluster","Cohesion","IBMStorageProtect"] - Type string `json:"type,omitempty"` -} - -// Validate validates this mcm claim entity type -func (m *McmClaimEntityType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmClaimEntityTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rigel","Cluster","Cohesion","IBMStorageProtect"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmClaimEntityTypeTypeTypePropEnum = append(mcmClaimEntityTypeTypeTypePropEnum, v) - } -} - -const ( - - // McmClaimEntityTypeTypeRigel captures enum value "Rigel" - McmClaimEntityTypeTypeRigel string = "Rigel" - - // McmClaimEntityTypeTypeCluster captures enum value "Cluster" - McmClaimEntityTypeTypeCluster string = "Cluster" - - // McmClaimEntityTypeTypeCohesion captures enum value "Cohesion" - McmClaimEntityTypeTypeCohesion string = "Cohesion" - - // McmClaimEntityTypeTypeIBMStorageProtect captures enum value "IBMStorageProtect" - McmClaimEntityTypeTypeIBMStorageProtect string = "IBMStorageProtect" -) - -// prop value enum -func (m *McmClaimEntityType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmClaimEntityTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmClaimEntityType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm claim entity type based on context it is used -func (m *McmClaimEntityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmClaimEntityType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmClaimEntityType) UnmarshalBinary(b []byte) error { - var res McmClaimEntityType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_cluster_claim_request_params.go b/v2/models/mcm_cluster_claim_request_params.go deleted file mode 100644 index 25375848..00000000 --- a/v2/models/mcm_cluster_claim_request_params.go +++ /dev/null @@ -1,124 +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" -) - -// McmClusterClaimRequestParams Request params to claim cluster to Helios. -// -// Specifies the request params to claim clusters to Helios. -// -// swagger:model McmClusterClaimRequestParams -type McmClusterClaimRequestParams struct { - - // Specifies the cluster id. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the cluster incarnation id. - // Required: true - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - - // Specifies the cluster name. - // Required: true - ClusterName *string `json:"clusterName"` - - // Claim token used for authentication. - // Required: true - ClaimToken *string `json:"claimToken"` -} - -// Validate validates this mcm cluster claim request params -func (m *McmClusterClaimRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIncarnationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmClusterClaimRequestParams) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *McmClusterClaimRequestParams) validateClusterIncarnationID(formats strfmt.Registry) error { - - if err := validate.Required("clusterIncarnationId", "body", m.ClusterIncarnationID); err != nil { - return err - } - - return nil -} - -func (m *McmClusterClaimRequestParams) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *McmClusterClaimRequestParams) validateClaimToken(formats strfmt.Registry) error { - - if err := validate.Required("claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm cluster claim request params based on context it is used -func (m *McmClusterClaimRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmClusterClaimRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmClusterClaimRequestParams) UnmarshalBinary(b []byte) error { - var res McmClusterClaimRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_cluster_claim_response_params.go b/v2/models/mcm_cluster_claim_response_params.go deleted file mode 100644 index 6882c599..00000000 --- a/v2/models/mcm_cluster_claim_response_params.go +++ /dev/null @@ -1,76 +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" -) - -// McmClusterClaimResponseParams Response of claiming a cluster to Helios. -// -// Specifies the response of claiming a cluster to Helios. -// -// swagger:model McmClusterClaimResponseParams -type McmClusterClaimResponseParams struct { - - // Specifies the cluster id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the cluster name. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the Salesforce account id used to claim the cluster. - SfAccountID *string `json:"sfAccountId,omitempty"` - - // Specifies the cluster certificate. - ClusterCertificate *string `json:"clusterCertificate,omitempty"` - - // Specifies the cluster private key. - ClusterPrivateKey *string `json:"clusterPrivateKey,omitempty"` - - // Specifies the passphrase (if used) to encrypt the cluster private key. - Passphrase *string `json:"passphrase,omitempty"` - - // Specifies the CA chain that is used to sign the cluster certificate. - ClusterCaChain *string `json:"clusterCaChain,omitempty"` - - // Specifies the Helios certificate that can be used to authenticate API calls made from Helios to cluster. - HeliosCertificate *string `json:"heliosCertificate,omitempty"` -} - -// Validate validates this mcm cluster claim response params -func (m *McmClusterClaimResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mcm cluster claim response params based on context it is used -func (m *McmClusterClaimResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmClusterClaimResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmClusterClaimResponseParams) UnmarshalBinary(b []byte) error { - var res McmClusterClaimResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_cluster_identifier.go b/v2/models/mcm_cluster_identifier.go deleted file mode 100644 index b3c68b91..00000000 --- a/v2/models/mcm_cluster_identifier.go +++ /dev/null @@ -1,58 +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" -) - -// McmClusterIdentifier MCM Cluster Identifier. -// -// Specifies the MCM cluster identifier. -// -// swagger:model McmClusterIdentifier -type McmClusterIdentifier struct { - - // Specifies the cluster id of the cluster. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the incarnation id of the cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the region id of the cluster. Only valid for DMaaS clusters. - RegionID *string `json:"regionId,omitempty"` -} - -// Validate validates this mcm cluster identifier -func (m *McmClusterIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mcm cluster identifier based on context it is used -func (m *McmClusterIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmClusterIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmClusterIdentifier) UnmarshalBinary(b []byte) error { - var res McmClusterIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_cohesion_claim_request_params.go b/v2/models/mcm_cohesion_claim_request_params.go deleted file mode 100644 index 91751b15..00000000 --- a/v2/models/mcm_cohesion_claim_request_params.go +++ /dev/null @@ -1,141 +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" -) - -// McmCohesionClaimRequestParams Request params to claim cohesion appliance to Helios. -// -// Specifies the request params to claim cohesion appliance to Helios. -// -// swagger:model McmCohesionClaimRequestParams -type McmCohesionClaimRequestParams struct { - - // Specifies the Id of the cohesion appliance with AWS. - // Required: true - ApplianceID *string `json:"applianceId"` - - // Specifies the name of the cohesion appliance. - // Required: true - ApplianceName *string `json:"applianceName"` - - // Specifies the cluster id. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the cluster incarnation id. - // Required: true - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - - // Claim token used for authentication. - // Required: true - ClaimToken *string `json:"claimToken"` -} - -// Validate validates this mcm cohesion claim request params -func (m *McmCohesionClaimRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplianceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplianceName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIncarnationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmCohesionClaimRequestParams) validateApplianceID(formats strfmt.Registry) error { - - if err := validate.Required("applianceId", "body", m.ApplianceID); err != nil { - return err - } - - return nil -} - -func (m *McmCohesionClaimRequestParams) validateApplianceName(formats strfmt.Registry) error { - - if err := validate.Required("applianceName", "body", m.ApplianceName); err != nil { - return err - } - - return nil -} - -func (m *McmCohesionClaimRequestParams) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *McmCohesionClaimRequestParams) validateClusterIncarnationID(formats strfmt.Registry) error { - - if err := validate.Required("clusterIncarnationId", "body", m.ClusterIncarnationID); err != nil { - return err - } - - return nil -} - -func (m *McmCohesionClaimRequestParams) validateClaimToken(formats strfmt.Registry) error { - - if err := validate.Required("claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm cohesion claim request params based on context it is used -func (m *McmCohesionClaimRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmCohesionClaimRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmCohesionClaimRequestParams) UnmarshalBinary(b []byte) error { - var res McmCohesionClaimRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_cohesion_claim_response_params.go b/v2/models/mcm_cohesion_claim_response_params.go deleted file mode 100644 index db39a38d..00000000 --- a/v2/models/mcm_cohesion_claim_response_params.go +++ /dev/null @@ -1,76 +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" -) - -// McmCohesionClaimResponseParams Response of claiming a Cohesion appliance to Helios. -// -// Specifies the response of claiming a Cohesion Appliance to Helios. -// -// swagger:model McmCohesionClaimResponseParams -type McmCohesionClaimResponseParams struct { - - // Unique id of the cohesion appliance with AWS - ApplianceID *string `json:"applianceId,omitempty"` - - // Specifies the name of the cohesion appliance. - ApplianceName *string `json:"applianceName,omitempty"` - - // Specifies the cluster id of the appliance. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id of the appliance. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the Cohesion Appliance certificate. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the Cohesion Appliance private key. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies the passphrase (if used) to encrypt the Cohesion Appliance private key. - Passphrase *string `json:"passphrase,omitempty"` - - // Specifies the CA chain that is used to sign the Cohesion Appliance certificate. - CaChain *string `json:"caChain,omitempty"` - - // Specifies the Helios certificate that can be used to authenticate api calls made from Helios to Cohesion Appliance - HeliosCertificate *string `json:"heliosCertificate,omitempty"` -} - -// Validate validates this mcm cohesion claim response params -func (m *McmCohesionClaimResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mcm cohesion claim response params based on context it is used -func (m *McmCohesionClaimResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmCohesionClaimResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmCohesionClaimResponseParams) UnmarshalBinary(b []byte) error { - var res McmCohesionClaimResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_i_b_m_storage_protect_claim_request_params.go b/v2/models/mcm_i_b_m_storage_protect_claim_request_params.go deleted file mode 100644 index 2a2b96ee..00000000 --- a/v2/models/mcm_i_b_m_storage_protect_claim_request_params.go +++ /dev/null @@ -1,124 +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" -) - -// McmIBMStorageProtectClaimRequestParams Request params to claim IBM storage protect cluster to Helios -// -// Specifies the request params to claim IBM storage protect cluster to Helios. -// -// swagger:model McmIBMStorageProtectClaimRequestParams -type McmIBMStorageProtectClaimRequestParams struct { - - // Specifies the cluster ID for IBM storage protect. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the cluster incarnation ID for IBM storage protect. - // Required: true - ClusterIncarnationID *int64 `json:"clusterIncarnationId"` - - // Specifies the cluster name for IBM storage protect. - // Required: true - ClusterName *string `json:"clusterName"` - - // Specifies the claim token used for authentication into Helios. - // Required: true - ClaimToken *string `json:"claimToken"` -} - -// Validate validates this mcm i b m storage protect claim request params -func (m *McmIBMStorageProtectClaimRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterIncarnationID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmIBMStorageProtectClaimRequestParams) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *McmIBMStorageProtectClaimRequestParams) validateClusterIncarnationID(formats strfmt.Registry) error { - - if err := validate.Required("clusterIncarnationId", "body", m.ClusterIncarnationID); err != nil { - return err - } - - return nil -} - -func (m *McmIBMStorageProtectClaimRequestParams) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *McmIBMStorageProtectClaimRequestParams) validateClaimToken(formats strfmt.Registry) error { - - if err := validate.Required("claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm i b m storage protect claim request params based on context it is used -func (m *McmIBMStorageProtectClaimRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmIBMStorageProtectClaimRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmIBMStorageProtectClaimRequestParams) UnmarshalBinary(b []byte) error { - var res McmIBMStorageProtectClaimRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_i_b_m_storage_protect_claim_response_params.go b/v2/models/mcm_i_b_m_storage_protect_claim_response_params.go deleted file mode 100644 index 9f1ece15..00000000 --- a/v2/models/mcm_i_b_m_storage_protect_claim_response_params.go +++ /dev/null @@ -1,76 +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" -) - -// McmIBMStorageProtectClaimResponseParams Response of claiming an IBM storage protect cluster to Helios. -// -// Specifies the response of claiming an IBM storage protect cluster to Helios. -// -// swagger:model McmIBMStorageProtectClaimResponseParams -type McmIBMStorageProtectClaimResponseParams struct { - - // Specifies the cluster ID. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation ID. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the cluster name. - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies the Salesforce account ID used to claim the cluster. - SfAccountID *string `json:"sfAccountId,omitempty"` - - // Specifies the Cluster certificate. - ClusterCertificate *string `json:"clusterCertificate,omitempty"` - - // Specifies the Cluster private key. - ClusterPrivateKey *string `json:"clusterPrivateKey,omitempty"` - - // Specifies the passphrase (if used) to encrypt the cluster private key. - Passphrase *string `json:"passphrase,omitempty"` - - // Specifies the CA chain that is used to sign the cluster certificate. - ClusterCaChain *string `json:"clusterCaChain,omitempty"` - - // Specifies the Helios certificate that can be used to authenticate api calls made from Helios to cluster. - HeliosCertificate *string `json:"heliosCertificate,omitempty"` -} - -// Validate validates this mcm i b m storage protect claim response params -func (m *McmIBMStorageProtectClaimResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mcm i b m storage protect claim response params based on context it is used -func (m *McmIBMStorageProtectClaimResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmIBMStorageProtectClaimResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmIBMStorageProtectClaimResponseParams) UnmarshalBinary(b []byte) error { - var res McmIBMStorageProtectClaimResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_object_activity_attribute_type.go b/v2/models/mcm_object_activity_attribute_type.go deleted file mode 100644 index c36fd815..00000000 --- a/v2/models/mcm_object_activity_attribute_type.go +++ /dev/null @@ -1,116 +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" -) - -// McmObjectActivityAttributeType Object activity attribute type. -// -// Object activity attribute type. -// -// swagger:model McmObjectActivityAttributeType -type McmObjectActivityAttributeType struct { - - // Specifies type attribute. - // Enum: ["Status","ObjectEnvironment","ProtectionEnvironment","ActivityType","MessageCode"] - Type string `json:"type,omitempty"` -} - -// Validate validates this mcm object activity attribute type -func (m *McmObjectActivityAttributeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmObjectActivityAttributeTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Status","ObjectEnvironment","ProtectionEnvironment","ActivityType","MessageCode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmObjectActivityAttributeTypeTypeTypePropEnum = append(mcmObjectActivityAttributeTypeTypeTypePropEnum, v) - } -} - -const ( - - // McmObjectActivityAttributeTypeTypeStatus captures enum value "Status" - McmObjectActivityAttributeTypeTypeStatus string = "Status" - - // McmObjectActivityAttributeTypeTypeObjectEnvironment captures enum value "ObjectEnvironment" - McmObjectActivityAttributeTypeTypeObjectEnvironment string = "ObjectEnvironment" - - // McmObjectActivityAttributeTypeTypeProtectionEnvironment captures enum value "ProtectionEnvironment" - McmObjectActivityAttributeTypeTypeProtectionEnvironment string = "ProtectionEnvironment" - - // McmObjectActivityAttributeTypeTypeActivityType captures enum value "ActivityType" - McmObjectActivityAttributeTypeTypeActivityType string = "ActivityType" - - // McmObjectActivityAttributeTypeTypeMessageCode captures enum value "MessageCode" - McmObjectActivityAttributeTypeTypeMessageCode string = "MessageCode" -) - -// prop value enum -func (m *McmObjectActivityAttributeType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmObjectActivityAttributeTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmObjectActivityAttributeType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm object activity attribute type based on context it is used -func (m *McmObjectActivityAttributeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmObjectActivityAttributeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmObjectActivityAttributeType) UnmarshalBinary(b []byte) error { - var res McmObjectActivityAttributeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_object_activity_type.go b/v2/models/mcm_object_activity_type.go deleted file mode 100644 index 2a076e5c..00000000 --- a/v2/models/mcm_object_activity_type.go +++ /dev/null @@ -1,110 +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" -) - -// McmObjectActivityType Object activity type. -// -// Object activity type. -// -// swagger:model McmObjectActivityType -type McmObjectActivityType struct { - - // Specifies type of the object activity. - // Enum: ["BackupRun","Restore","ArchivalRun"] - Type string `json:"type,omitempty"` -} - -// Validate validates this mcm object activity type -func (m *McmObjectActivityType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmObjectActivityTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupRun","Restore","ArchivalRun"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmObjectActivityTypeTypeTypePropEnum = append(mcmObjectActivityTypeTypeTypePropEnum, v) - } -} - -const ( - - // McmObjectActivityTypeTypeBackupRun captures enum value "BackupRun" - McmObjectActivityTypeTypeBackupRun string = "BackupRun" - - // McmObjectActivityTypeTypeRestore captures enum value "Restore" - McmObjectActivityTypeTypeRestore string = "Restore" - - // McmObjectActivityTypeTypeArchivalRun captures enum value "ArchivalRun" - McmObjectActivityTypeTypeArchivalRun string = "ArchivalRun" -) - -// prop value enum -func (m *McmObjectActivityType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmObjectActivityTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmObjectActivityType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm object activity type based on context it is used -func (m *McmObjectActivityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmObjectActivityType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmObjectActivityType) UnmarshalBinary(b []byte) error { - var res McmObjectActivityType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_rigel_claim_request_params.go b/v2/models/mcm_rigel_claim_request_params.go deleted file mode 100644 index 2d369e9e..00000000 --- a/v2/models/mcm_rigel_claim_request_params.go +++ /dev/null @@ -1,156 +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" -) - -// McmRigelClaimRequestParams Request params to claim Rigel to Helios. -// -// Specifies the request params to claim Rigel to Helios. -// -// swagger:model McmRigelClaimRequestParams -type McmRigelClaimRequestParams struct { - - // Unique id for rigel instance. - // Required: true - RigelGUID *int64 `json:"rigelGuid"` - - // Claim token used for authentication. - // Required: true - ClaimToken *string `json:"claimToken"` - - // Specifies the Rigel type that is being claimed. - // Enum: ["OnPrem","Cloud"] - RigelType *string `json:"rigelType,omitempty"` - - // Specifies the cluster id. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the Rigel name. - RigelName *string `json:"rigelName,omitempty"` - - // Specifies the Rigel IP. - RigelIP *string `json:"rigelIp,omitempty"` - - // Specifies the Rigel Software version. - SoftwareVersion *string `json:"softwareVersion,omitempty"` -} - -// Validate validates this mcm rigel claim request params -func (m *McmRigelClaimRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRigelGUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClaimToken(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *McmRigelClaimRequestParams) validateRigelGUID(formats strfmt.Registry) error { - - if err := validate.Required("rigelGuid", "body", m.RigelGUID); err != nil { - return err - } - - return nil -} - -func (m *McmRigelClaimRequestParams) validateClaimToken(formats strfmt.Registry) error { - - if err := validate.Required("claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -var mcmRigelClaimRequestParamsTypeRigelTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OnPrem","Cloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmRigelClaimRequestParamsTypeRigelTypePropEnum = append(mcmRigelClaimRequestParamsTypeRigelTypePropEnum, v) - } -} - -const ( - - // McmRigelClaimRequestParamsRigelTypeOnPrem captures enum value "OnPrem" - McmRigelClaimRequestParamsRigelTypeOnPrem string = "OnPrem" - - // McmRigelClaimRequestParamsRigelTypeCloud captures enum value "Cloud" - McmRigelClaimRequestParamsRigelTypeCloud string = "Cloud" -) - -// prop value enum -func (m *McmRigelClaimRequestParams) validateRigelTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmRigelClaimRequestParamsTypeRigelTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmRigelClaimRequestParams) validateRigelType(formats strfmt.Registry) error { - if swag.IsZero(m.RigelType) { // not required - return nil - } - - // value enum - if err := m.validateRigelTypeEnum("rigelType", "body", *m.RigelType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm rigel claim request params based on context it is used -func (m *McmRigelClaimRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmRigelClaimRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmRigelClaimRequestParams) UnmarshalBinary(b []byte) error { - var res McmRigelClaimRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_rigel_claim_response_params.go b/v2/models/mcm_rigel_claim_response_params.go deleted file mode 100644 index 681ffb31..00000000 --- a/v2/models/mcm_rigel_claim_response_params.go +++ /dev/null @@ -1,187 +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" -) - -// McmRigelClaimResponseParams Response of claiming a Rigel to Helios. -// -// Specifies the response of claiming a Rigel to Helios. -// -// swagger:model McmRigelClaimResponseParams -type McmRigelClaimResponseParams struct { - - // Unique id for rigel instance. - RigelGUID *int64 `json:"rigelGuid,omitempty"` - - // Connection id for rigel instance. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Tenant id associated with the claimed rigel. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the Rigel type that is being claimed. - // Enum: ["OnPrem","Cloud"] - RigelType *string `json:"rigelType,omitempty"` - - // Specifies the Rigel certificate. - RigelCertificate *string `json:"rigelCertificate,omitempty"` - - // Specifies the Rigel private key. - RigelPrivateKey *string `json:"rigelPrivateKey,omitempty"` - - // Specifies the CA chain that is used to sign the Rigel certificate. - RigelCaChain *string `json:"rigelCaChain,omitempty"` - - // Specifies the Tenant CA chain. - TenantCaChain []*string `json:"tenantCaChain"` - - // Specifies the Helios certificate that can be used to authenticate api calls made from Helios to Rigel. - HeliosCertificate *string `json:"heliosCertificate,omitempty"` - - // Endpoint for associated data plane. - DataplaneEndpoint *string `json:"dataplaneEndpoint,omitempty"` - - // Specifies the Rigel use case. - // Enum: ["Baas","DRaasFailover"] - RigelUseCase *string `json:"rigelUseCase,omitempty"` - - // Specifies the region id of the Rigel cluster. - RegionID *string `json:"regionId,omitempty"` -} - -// Validate validates this mcm rigel claim response params -func (m *McmRigelClaimResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRigelType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRigelUseCase(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmRigelClaimResponseParamsTypeRigelTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OnPrem","Cloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmRigelClaimResponseParamsTypeRigelTypePropEnum = append(mcmRigelClaimResponseParamsTypeRigelTypePropEnum, v) - } -} - -const ( - - // McmRigelClaimResponseParamsRigelTypeOnPrem captures enum value "OnPrem" - McmRigelClaimResponseParamsRigelTypeOnPrem string = "OnPrem" - - // McmRigelClaimResponseParamsRigelTypeCloud captures enum value "Cloud" - McmRigelClaimResponseParamsRigelTypeCloud string = "Cloud" -) - -// prop value enum -func (m *McmRigelClaimResponseParams) validateRigelTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmRigelClaimResponseParamsTypeRigelTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmRigelClaimResponseParams) validateRigelType(formats strfmt.Registry) error { - if swag.IsZero(m.RigelType) { // not required - return nil - } - - // value enum - if err := m.validateRigelTypeEnum("rigelType", "body", *m.RigelType); err != nil { - return err - } - - return nil -} - -var mcmRigelClaimResponseParamsTypeRigelUseCasePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Baas","DRaasFailover"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmRigelClaimResponseParamsTypeRigelUseCasePropEnum = append(mcmRigelClaimResponseParamsTypeRigelUseCasePropEnum, v) - } -} - -const ( - - // McmRigelClaimResponseParamsRigelUseCaseBaas captures enum value "Baas" - McmRigelClaimResponseParamsRigelUseCaseBaas string = "Baas" - - // McmRigelClaimResponseParamsRigelUseCaseDRaasFailover captures enum value "DRaasFailover" - McmRigelClaimResponseParamsRigelUseCaseDRaasFailover string = "DRaasFailover" -) - -// prop value enum -func (m *McmRigelClaimResponseParams) validateRigelUseCaseEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmRigelClaimResponseParamsTypeRigelUseCasePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmRigelClaimResponseParams) validateRigelUseCase(formats strfmt.Registry) error { - if swag.IsZero(m.RigelUseCase) { // not required - return nil - } - - // value enum - if err := m.validateRigelUseCaseEnum("rigelUseCase", "body", *m.RigelUseCase); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm rigel claim response params based on context it is used -func (m *McmRigelClaimResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmRigelClaimResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmRigelClaimResponseParams) UnmarshalBinary(b []byte) error { - var res McmRigelClaimResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_service_type.go b/v2/models/mcm_service_type.go deleted file mode 100644 index 8e3247a4..00000000 --- a/v2/models/mcm_service_type.go +++ /dev/null @@ -1,122 +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" -) - -// McmServiceType Helios Services -// -// Specifies the different helios services. -// -// swagger:model McmServiceType -type McmServiceType struct { - - // Specifies the different helios services. - // Enum: ["Dmaas","Mcm","DataGovern","FortKnox","SiteContinuity","SiteContinuity2","DataInsights"] - Value string `json:"value,omitempty"` -} - -// Validate validates this mcm service type -func (m *McmServiceType) 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 mcmServiceTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Dmaas","Mcm","DataGovern","FortKnox","SiteContinuity","SiteContinuity2","DataInsights"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmServiceTypeTypeValuePropEnum = append(mcmServiceTypeTypeValuePropEnum, v) - } -} - -const ( - - // McmServiceTypeValueDmaas captures enum value "Dmaas" - McmServiceTypeValueDmaas string = "Dmaas" - - // McmServiceTypeValueMcm captures enum value "Mcm" - McmServiceTypeValueMcm string = "Mcm" - - // McmServiceTypeValueDataGovern captures enum value "DataGovern" - McmServiceTypeValueDataGovern string = "DataGovern" - - // McmServiceTypeValueFortKnox captures enum value "FortKnox" - McmServiceTypeValueFortKnox string = "FortKnox" - - // McmServiceTypeValueSiteContinuity captures enum value "SiteContinuity" - McmServiceTypeValueSiteContinuity string = "SiteContinuity" - - // McmServiceTypeValueSiteContinuity2 captures enum value "SiteContinuity2" - McmServiceTypeValueSiteContinuity2 string = "SiteContinuity2" - - // McmServiceTypeValueDataInsights captures enum value "DataInsights" - McmServiceTypeValueDataInsights string = "DataInsights" -) - -// prop value enum -func (m *McmServiceType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmServiceTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmServiceType) 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 mcm service type based on context it is used -func (m *McmServiceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmServiceType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmServiceType) UnmarshalBinary(b []byte) error { - var res McmServiceType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_signup_request_status.go b/v2/models/mcm_signup_request_status.go deleted file mode 100644 index f6cf5558..00000000 --- a/v2/models/mcm_signup_request_status.go +++ /dev/null @@ -1,113 +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" -) - -// McmSignupRequestStatus MCM signup request status type. -// -// MCM signup request status type. -// -// swagger:model McmSignupRequestStatus -type McmSignupRequestStatus struct { - - // MCM signup request status type. - // Enum: ["Open","InProgress","Denied","Finished"] - Type string `json:"type,omitempty"` -} - -// Validate validates this mcm signup request status -func (m *McmSignupRequestStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmSignupRequestStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Open","InProgress","Denied","Finished"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmSignupRequestStatusTypeTypePropEnum = append(mcmSignupRequestStatusTypeTypePropEnum, v) - } -} - -const ( - - // McmSignupRequestStatusTypeOpen captures enum value "Open" - McmSignupRequestStatusTypeOpen string = "Open" - - // McmSignupRequestStatusTypeInProgress captures enum value "InProgress" - McmSignupRequestStatusTypeInProgress string = "InProgress" - - // McmSignupRequestStatusTypeDenied captures enum value "Denied" - McmSignupRequestStatusTypeDenied string = "Denied" - - // McmSignupRequestStatusTypeFinished captures enum value "Finished" - McmSignupRequestStatusTypeFinished string = "Finished" -) - -// prop value enum -func (m *McmSignupRequestStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmSignupRequestStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmSignupRequestStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm signup request status based on context it is used -func (m *McmSignupRequestStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmSignupRequestStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmSignupRequestStatus) UnmarshalBinary(b []byte) error { - var res McmSignupRequestStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mcm_tenant_type.go b/v2/models/mcm_tenant_type.go deleted file mode 100644 index 75fcc478..00000000 --- a/v2/models/mcm_tenant_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// McmTenantType Tenant Status -// -// Describes the status of a Tenant on a Cluster or Helios. -// -// swagger:model McmTenantType -type McmTenantType struct { - - // Specifies the Tenant status - // Enum: ["Dmaas","Mcm"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this mcm tenant type -func (m *McmTenantType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mcmTenantTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Dmaas","Mcm"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mcmTenantTypeTypeEnumPropEnum = append(mcmTenantTypeTypeEnumPropEnum, v) - } -} - -const ( - - // McmTenantTypeEnumDmaas captures enum value "Dmaas" - McmTenantTypeEnumDmaas string = "Dmaas" - - // McmTenantTypeEnumMcm captures enum value "Mcm" - McmTenantTypeEnumMcm string = "Mcm" -) - -// prop value enum -func (m *McmTenantType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mcmTenantTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *McmTenantType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mcm tenant type based on context it is used -func (m *McmTenantType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *McmTenantType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *McmTenantType) UnmarshalBinary(b []byte) error { - var res McmTenantType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mfa_authentication_types.go b/v2/models/mfa_authentication_types.go deleted file mode 100644 index d64bd7a0..00000000 --- a/v2/models/mfa_authentication_types.go +++ /dev/null @@ -1,110 +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" -) - -// MfaAuthenticationTypes MFA Authentication Type -// -// Specifies the type of MFA authentication to use. -// -// swagger:model MfaAuthenticationTypes -type MfaAuthenticationTypes struct { - - // Specifies the MFA authentication type. - // Enum: ["email","totp","salesforce"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this mfa authentication types -func (m *MfaAuthenticationTypes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mfaAuthenticationTypesTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["email","totp","salesforce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mfaAuthenticationTypesTypeEnumPropEnum = append(mfaAuthenticationTypesTypeEnumPropEnum, v) - } -} - -const ( - - // MfaAuthenticationTypesEnumEmail captures enum value "email" - MfaAuthenticationTypesEnumEmail string = "email" - - // MfaAuthenticationTypesEnumTotp captures enum value "totp" - MfaAuthenticationTypesEnumTotp string = "totp" - - // MfaAuthenticationTypesEnumSalesforce captures enum value "salesforce" - MfaAuthenticationTypesEnumSalesforce string = "salesforce" -) - -// prop value enum -func (m *MfaAuthenticationTypes) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mfaAuthenticationTypesTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MfaAuthenticationTypes) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mfa authentication types based on context it is used -func (m *MfaAuthenticationTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MfaAuthenticationTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MfaAuthenticationTypes) UnmarshalBinary(b []byte) error { - var res MfaAuthenticationTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mfa_config_info.go b/v2/models/mfa_config_info.go deleted file mode 100644 index 810b3fc4..00000000 --- a/v2/models/mfa_config_info.go +++ /dev/null @@ -1,105 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MfaConfigInfo Holds the MFA configuration to be returned or stored. -// -// swagger:model MfaConfigInfo -type MfaConfigInfo struct { - - // Specifies whether MFA is enabled on a cluster level. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies the list of mechanism to receive the OTP code. - AuthenticationTypes []string `json:"authenticationTypes"` - - // Specifies whether user MFA setting needs to be retained. - RetainUserMfaSettings *bool `json:"retainUserMfaSettings,omitempty"` -} - -// Validate validates this mfa config info -func (m *MfaConfigInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mfaConfigInfoAuthenticationTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["email","totp","salesforce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mfaConfigInfoAuthenticationTypesItemsEnum = append(mfaConfigInfoAuthenticationTypesItemsEnum, v) - } -} - -func (m *MfaConfigInfo) validateAuthenticationTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mfaConfigInfoAuthenticationTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *MfaConfigInfo) validateAuthenticationTypes(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationTypes) { // not required - return nil - } - - for i := 0; i < len(m.AuthenticationTypes); i++ { - - // value enum - if err := m.validateAuthenticationTypesItemsEnum("authenticationTypes"+"."+strconv.Itoa(i), "body", m.AuthenticationTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this mfa config info based on context it is used -func (m *MfaConfigInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MfaConfigInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MfaConfigInfo) UnmarshalBinary(b []byte) error { - var res MfaConfigInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/migrate_clone_params.go b/v2/models/migrate_clone_params.go deleted file mode 100644 index 4d892bde..00000000 --- a/v2/models/migrate_clone_params.go +++ /dev/null @@ -1,55 +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" -) - -// MigrateCloneParams Oracle DB migration parameters. -// -// Specifies the DB migration parameters. -// -// swagger:model MigrateCloneParams -type MigrateCloneParams struct { - - // Specifies when the migration of the oracle instance should be started after successful recovery. - DelaySecs *int64 `json:"delaySecs,omitempty"` - - // Specifies the target paths to be used for DB migration. - TargetPathVec []string `json:"targetPathVec"` -} - -// Validate validates this migrate clone params -func (m *MigrateCloneParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this migrate clone params based on context it is used -func (m *MigrateCloneParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MigrateCloneParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MigrateCloneParams) UnmarshalBinary(b []byte) error { - var res MigrateCloneParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/minute_schedule.go b/v2/models/minute_schedule.go deleted file mode 100644 index 8e078ebf..00000000 --- a/v2/models/minute_schedule.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" -) - -// MinuteSchedule Minutes Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start after certain number of minutes. -// -// swagger:model MinuteSchedule -type MinuteSchedule struct { - FrequencySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MinuteSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 FrequencySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.FrequencySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MinuteSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.FrequencySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this minute schedule -func (m *MinuteSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this minute schedule based on the context it is used -func (m *MinuteSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FrequencySchedule - if err := m.FrequencySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MinuteSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MinuteSchedule) UnmarshalBinary(b []byte) error { - var res MinuteSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/missing_entity_params.go b/v2/models/missing_entity_params.go deleted file mode 100644 index 25e86f3c..00000000 --- a/v2/models/missing_entity_params.go +++ /dev/null @@ -1,127 +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" -) - -// MissingEntityParams Specifies the information about missing entities. -// -// swagger:model MissingEntityParams -type MissingEntityParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the id of the parent source of the object. - // Read Only: true - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the name of the parent source of the object. - // Read Only: true - ParentSourceName *string `json:"parentSourceName,omitempty"` -} - -// Validate validates this missing entity params -func (m *MissingEntityParams) 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 *MissingEntityParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this missing entity params based on the context it is used -func (m *MissingEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MissingEntityParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *MissingEntityParams) contextValidateParentSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "parentSourceId", "body", m.ParentSourceID); err != nil { - return err - } - - return nil -} - -func (m *MissingEntityParams) contextValidateParentSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "parentSourceName", "body", m.ParentSourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MissingEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MissingEntityParams) UnmarshalBinary(b []byte) error { - var res MissingEntityParams - 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 deleted file mode 100644 index 394ca635..00000000 --- a/v2/models/modify_ciphers_request_body.go +++ /dev/null @@ -1,120 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ModifyCiphersRequestBody Request to enable/disable a list of ciphers. -// -// Specifies ciphers to enable/disable on the cluster. -// -// swagger:model ModifyCiphersRequestBody -type ModifyCiphersRequestBody struct { - - // If true, the ciphers passed in will be enabled on the cluster and all other ciphers will be disabled. If false, the ciphers specified will be disabled and all other ciphers on the cluster will be enabled. - // Required: true - Enable *bool `json:"enable"` - - // Specifies a list of ciphers to enable/disable on the cluster. - // Required: true - Ciphers []string `json:"ciphers"` -} - -// Validate validates this modify ciphers request body -func (m *ModifyCiphersRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnable(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCiphers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ModifyCiphersRequestBody) validateEnable(formats strfmt.Registry) error { - - if err := validate.Required("enable", "body", m.Enable); err != nil { - return err - } - - return nil -} - -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 { - panic(err) - } - for _, v := range res { - modifyCiphersRequestBodyCiphersItemsEnum = append(modifyCiphersRequestBodyCiphersItemsEnum, v) - } -} - -func (m *ModifyCiphersRequestBody) validateCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, modifyCiphersRequestBodyCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ModifyCiphersRequestBody) validateCiphers(formats strfmt.Registry) error { - - if err := validate.Required("ciphers", "body", m.Ciphers); err != nil { - return err - } - - for i := 0; i < len(m.Ciphers); i++ { - - // value enum - if err := m.validateCiphersItemsEnum("ciphers"+"."+strconv.Itoa(i), "body", m.Ciphers[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this modify ciphers request body based on context it is used -func (m *ModifyCiphersRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ModifyCiphersRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ModifyCiphersRequestBody) UnmarshalBinary(b []byte) error { - var res ModifyCiphersRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/modify_object_store_ciphers_request_body.go b/v2/models/modify_object_store_ciphers_request_body.go deleted file mode 100644 index 1f73da42..00000000 --- a/v2/models/modify_object_store_ciphers_request_body.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ModifyObjectStoreCiphersRequestBody Request to enable/disable a list of object store ciphers. -// -// Specifies object store ciphers to enable/disable on the cluster. -// -// swagger:model ModifyObjectStoreCiphersRequestBody -type ModifyObjectStoreCiphersRequestBody struct { - - // If true, the ciphers passed in will be enabled on the cluster and all other ciphers will be disabled. If false, the ciphers specified will be disabled and all other ciphers on the cluster will be enabled. - // Required: true - Enable *bool `json:"enable"` - - // Specifies a list of object store ciphers to enable/disable on the cluster. - // Required: true - // Min Items: 1 - // Unique: true - Ciphers []string `json:"ciphers"` -} - -// Validate validates this modify object store ciphers request body -func (m *ModifyObjectStoreCiphersRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnable(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCiphers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ModifyObjectStoreCiphersRequestBody) validateEnable(formats strfmt.Registry) error { - - if err := validate.Required("enable", "body", m.Enable); err != nil { - return err - } - - return nil -} - -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 { - panic(err) - } - for _, v := range res { - modifyObjectStoreCiphersRequestBodyCiphersItemsEnum = append(modifyObjectStoreCiphersRequestBodyCiphersItemsEnum, v) - } -} - -func (m *ModifyObjectStoreCiphersRequestBody) validateCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, modifyObjectStoreCiphersRequestBodyCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ModifyObjectStoreCiphersRequestBody) validateCiphers(formats strfmt.Registry) error { - - if err := validate.Required("ciphers", "body", m.Ciphers); err != nil { - return err - } - - iCiphersSize := int64(len(m.Ciphers)) - - if err := validate.MinItems("ciphers", "body", iCiphersSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("ciphers", "body", m.Ciphers); err != nil { - return err - } - - for i := 0; i < len(m.Ciphers); i++ { - - // value enum - if err := m.validateCiphersItemsEnum("ciphers"+"."+strconv.Itoa(i), "body", m.Ciphers[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this modify object store ciphers request body based on context it is used -func (m *ModifyObjectStoreCiphersRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ModifyObjectStoreCiphersRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ModifyObjectStoreCiphersRequestBody) UnmarshalBinary(b []byte) error { - var res ModifyObjectStoreCiphersRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_d_b_auth_type.go b/v2/models/mongo_d_b_auth_type.go deleted file mode 100644 index a6666247..00000000 --- a/v2/models/mongo_d_b_auth_type.go +++ /dev/null @@ -1,113 +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" -) - -// MongoDBAuthType Enumeration of all the MongoDB Authentication types. -// -// Enumeration of all the MongoDB Authentication types. -// -// swagger:model MongoDBAuthType -type MongoDBAuthType struct { - - // Enumeration of all the MongoDB Authentication. - // Enum: ["SCRAM","LDAP","NONE","KERBEROS"] - MongoDBAuthType string `json:"MongoDBAuthType,omitempty"` -} - -// Validate validates this mongo d b auth type -func (m *MongoDBAuthType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMongoDBAuthType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mongoDBAuthTypeTypeMongoDBAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SCRAM","LDAP","NONE","KERBEROS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongoDBAuthTypeTypeMongoDBAuthTypePropEnum = append(mongoDBAuthTypeTypeMongoDBAuthTypePropEnum, v) - } -} - -const ( - - // MongoDBAuthTypeMongoDBAuthTypeSCRAM captures enum value "SCRAM" - MongoDBAuthTypeMongoDBAuthTypeSCRAM string = "SCRAM" - - // MongoDBAuthTypeMongoDBAuthTypeLDAP captures enum value "LDAP" - MongoDBAuthTypeMongoDBAuthTypeLDAP string = "LDAP" - - // MongoDBAuthTypeMongoDBAuthTypeNONE captures enum value "NONE" - MongoDBAuthTypeMongoDBAuthTypeNONE string = "NONE" - - // MongoDBAuthTypeMongoDBAuthTypeKERBEROS captures enum value "KERBEROS" - MongoDBAuthTypeMongoDBAuthTypeKERBEROS string = "KERBEROS" -) - -// prop value enum -func (m *MongoDBAuthType) validateMongoDBAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongoDBAuthTypeTypeMongoDBAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongoDBAuthType) validateMongoDBAuthType(formats strfmt.Registry) error { - if swag.IsZero(m.MongoDBAuthType) { // not required - return nil - } - - // value enum - if err := m.validateMongoDBAuthTypeEnum("MongoDBAuthType", "body", m.MongoDBAuthType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mongo d b auth type based on context it is used -func (m *MongoDBAuthType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBAuthType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBAuthType) UnmarshalBinary(b []byte) error { - var res MongoDBAuthType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_d_b_cdp_job_info.go b/v2/models/mongo_d_b_cdp_job_info.go deleted file mode 100644 index 7f183176..00000000 --- a/v2/models/mongo_d_b_cdp_job_info.go +++ /dev/null @@ -1,50 +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" -) - -// MongoDBCdpJobInfo Specifies the CDP related information for a given MongoDB protection group. This will only be populated when the protection group is configured with a CDP policy. -// -// swagger:model MongoDBCdpJobInfo -type MongoDBCdpJobInfo struct { - - // Specifies the latest available recovery point timestamp (in microseconds from epoch) - LatestRecoveryPointInTimeUsecs *int64 `json:"latestRecoveryPointInTimeUsecs,omitempty"` -} - -// Validate validates this mongo d b cdp job info -func (m *MongoDBCdpJobInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mongo d b cdp job info based on context it is used -func (m *MongoDBCdpJobInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBCdpJobInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBCdpJobInfo) UnmarshalBinary(b []byte) error { - var res MongoDBCdpJobInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_d_b_protection_group_params.go b/v2/models/mongo_d_b_protection_group_params.go deleted file mode 100644 index 903e7199..00000000 --- a/v2/models/mongo_d_b_protection_group_params.go +++ /dev/null @@ -1,167 +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" -) - -// MongoDBProtectionGroupParams Specifies the parameters for MongoDB Protection Group. -// -// swagger:model MongoDBProtectionGroupParams -type MongoDBProtectionGroupParams struct { - NoSQLProtectionGroupParams - - // Specifies the CDP related information for a given protection group. This field will only be populated when protection group is configured with a CDP policy. - // Read Only: true - CdpInfo *MongoDBCdpJobInfo `json:"cdpInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MongoDBProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NoSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NoSQLProtectionGroupParams = aO0 - - // AO1 - var dataAO1 struct { - CdpInfo *MongoDBCdpJobInfo `json:"cdpInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CdpInfo = dataAO1.CdpInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MongoDBProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.NoSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CdpInfo *MongoDBCdpJobInfo `json:"cdpInfo,omitempty"` - } - - dataAO1.CdpInfo = m.CdpInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mongo d b protection group params -func (m *MongoDBProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NoSQLProtectionGroupParams - if err := m.NoSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBProtectionGroupParams) validateCdpInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mongo d b protection group params based on the context it is used -func (m *MongoDBProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NoSQLProtectionGroupParams - if err := m.NoSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBProtectionGroupParams) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res MongoDBProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_d_b_source_registration_params.go b/v2/models/mongo_d_b_source_registration_params.go deleted file mode 100644 index 331059e2..00000000 --- a/v2/models/mongo_d_b_source_registration_params.go +++ /dev/null @@ -1,193 +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" -) - -// MongoDBSourceRegistrationParams Register MongoDB source request parameters. -// -// Specifies parameters to register MongoDB source. -// -// swagger:model MongoDBSourceRegistrationParams -type MongoDBSourceRegistrationParams struct { - - // Specify the MongoS hosts for a sharded cluster and the MongoD hosts for a non-sharded cluster. You can specify a sub-set of the hosts. - // Required: true - // Min Items: 1 - // Unique: true - Hosts []string `json:"hosts"` - - // MongoDB authentication type. - // Required: true - // Enum: ["SCRAM","LDAP","NONE","KERBEROS"] - AuthType *string `json:"authType"` - - // Specifies the username of the MongoDB cluster. Should be set if 'authType' is 'LDAP' or 'SCRAM'. - Username *string `json:"username,omitempty"` - - // Specifies the principal name of the MongoDB cluster. Should be set if 'authType' is 'KERBEROS'. - Principal *string `json:"principal,omitempty"` - - // Specifies the password for the MongoDB cluster. Should be set if 'authType' is 'LDAP' or 'SCRAM'. - Password *string `json:"password,omitempty"` - - // Authenticating Database for this cluster. Should be set if 'authType' is 'LDAP' or 'SCRAM'. - AuthenticatingDatabase *string `json:"authenticatingDatabase,omitempty"` - - // Set to true if connection to MongoDB has to be over SSL. - // Required: true - IsSslRequired *bool `json:"isSslRequired"` - - // Set this to true if you want the system to peform backups from secondary nodes. - // Required: true - UseSecondaryForBackup *bool `json:"useSecondaryForBackup"` - - // MongoDB Secondary node tag. Required only if 'useSecondaryForBackup' is true.The system will use this to identify the secondary nodes for reading backup data. - SecondaryNodeTag string `json:"secondaryNodeTag,omitempty"` -} - -// Validate validates this mongo d b source registration params -func (m *MongoDBSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsSslRequired(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUseSecondaryForBackup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoDBSourceRegistrationParams) validateHosts(formats strfmt.Registry) error { - - if err := validate.Required("hosts", "body", m.Hosts); err != nil { - return err - } - - iHostsSize := int64(len(m.Hosts)) - - if err := validate.MinItems("hosts", "body", iHostsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("hosts", "body", m.Hosts); err != nil { - return err - } - - return nil -} - -var mongoDBSourceRegistrationParamsTypeAuthTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SCRAM","LDAP","NONE","KERBEROS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongoDBSourceRegistrationParamsTypeAuthTypePropEnum = append(mongoDBSourceRegistrationParamsTypeAuthTypePropEnum, v) - } -} - -const ( - - // MongoDBSourceRegistrationParamsAuthTypeSCRAM captures enum value "SCRAM" - MongoDBSourceRegistrationParamsAuthTypeSCRAM string = "SCRAM" - - // MongoDBSourceRegistrationParamsAuthTypeLDAP captures enum value "LDAP" - MongoDBSourceRegistrationParamsAuthTypeLDAP string = "LDAP" - - // MongoDBSourceRegistrationParamsAuthTypeNONE captures enum value "NONE" - MongoDBSourceRegistrationParamsAuthTypeNONE string = "NONE" - - // MongoDBSourceRegistrationParamsAuthTypeKERBEROS captures enum value "KERBEROS" - MongoDBSourceRegistrationParamsAuthTypeKERBEROS string = "KERBEROS" -) - -// prop value enum -func (m *MongoDBSourceRegistrationParams) validateAuthTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongoDBSourceRegistrationParamsTypeAuthTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongoDBSourceRegistrationParams) validateAuthType(formats strfmt.Registry) error { - - if err := validate.Required("authType", "body", m.AuthType); err != nil { - return err - } - - // value enum - if err := m.validateAuthTypeEnum("authType", "body", *m.AuthType); err != nil { - return err - } - - return nil -} - -func (m *MongoDBSourceRegistrationParams) validateIsSslRequired(formats strfmt.Registry) error { - - if err := validate.Required("isSslRequired", "body", m.IsSslRequired); err != nil { - return err - } - - return nil -} - -func (m *MongoDBSourceRegistrationParams) validateUseSecondaryForBackup(formats strfmt.Registry) error { - - if err := validate.Required("useSecondaryForBackup", "body", m.UseSecondaryForBackup); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mongo d b source registration params based on context it is used -func (m *MongoDBSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDBSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDBSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res MongoDBSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_db_on_prem_search_params.go b/v2/models/mongo_db_on_prem_search_params.go deleted file mode 100644 index 7b61d2f2..00000000 --- a/v2/models/mongo_db_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// MongoDbOnPremSearchParams MongoDbOnPremSearchParams -// -// Parameters required to search Mongo DB on a cluster. -// -// swagger:model MongoDbOnPremSearchParams -type MongoDbOnPremSearchParams struct { - MongodbSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MongoDbOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MongodbSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MongodbSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MongoDbOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.MongodbSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mongo db on prem search params -func (m *MongoDbOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MongodbSearchParams - if err := m.MongodbSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mongo db on prem search params based on the context it is used -func (m *MongoDbOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MongodbSearchParams - if err := m.MongodbSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MongoDbOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoDbOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res MongoDbOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_indexed_object.go b/v2/models/mongo_indexed_object.go deleted file mode 100644 index a8ec61f9..00000000 --- a/v2/models/mongo_indexed_object.go +++ /dev/null @@ -1,231 +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" -) - -// MongoIndexedObject MongoIndexedObject -// -// Specifies a Mongo indexed object. -// -// swagger:model MongoIndexedObject -type MongoIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the Mongo Object Type. - // Enum: ["MongoDatabases","MongoCollections"] - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` - - // Specifies the Continuous Data Protection (CDP) details about this object. This is only available if this object if protected by a CDP enabled policy. - CdpInfo *CdpObjectInfo `json:"cdpInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MongoIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - CdpInfo *CdpObjectInfo `json:"cdpInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - m.CdpInfo = dataAO1.CdpInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MongoIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - CdpInfo *CdpObjectInfo `json:"cdpInfo,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - dataAO1.CdpInfo = m.CdpInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mongo indexed object -func (m *MongoIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mongoIndexedObjectTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["MongoDatabases","MongoCollections"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongoIndexedObjectTypeTypePropEnum = append(mongoIndexedObjectTypeTypePropEnum, v) - } -} - -// property enum -func (m *MongoIndexedObject) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongoIndexedObjectTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongoIndexedObject) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *MongoIndexedObject) validateCdpInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mongo indexed object based on the context it is used -func (m *MongoIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongoIndexedObject) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MongoIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongoIndexedObject) UnmarshalBinary(b []byte) error { - var res MongoIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongo_indexed_objects.go b/v2/models/mongo_indexed_objects.go deleted file mode 100644 index 5a47d562..00000000 --- a/v2/models/mongo_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MongoIndexedObjects Specifies the indexed Mongo objects. -// -// swagger:model MongoIndexedObjects -type MongoIndexedObjects []*MongoIndexedObject - -// Validate validates this mongo indexed objects -func (m MongoIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mongo indexed objects based on the context it is used -func (m MongoIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/mongodb_params.go b/v2/models/mongodb_params.go deleted file mode 100644 index 55f405fe..00000000 --- a/v2/models/mongodb_params.go +++ /dev/null @@ -1,162 +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" -) - -// MongodbParams Recover MongoDB environment params. -// -// Specifies the recovery options specific to MongoDB environment. -// -// swagger:model MongodbParams -type MongodbParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Recover MongoDB params. - // - // Specifies the parameters to recover MongoDB objects. - // Required: true - RecoverMongodbParams *RecoverMongodbParams `json:"recoverMongodbParams"` -} - -// Validate validates this mongodb params -func (m *MongodbParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverMongodbParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mongodbParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongodbParamsTypeRecoveryActionPropEnum = append(mongodbParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // MongodbParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - MongodbParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *MongodbParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongodbParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongodbParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *MongodbParams) validateRecoverMongodbParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverMongodbParams", "body", m.RecoverMongodbParams); err != nil { - return err - } - - if m.RecoverMongodbParams != nil { - if err := m.RecoverMongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMongodbParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mongodb params based on the context it is used -func (m *MongodbParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongodbParams) contextValidateRecoverMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverMongodbParams != nil { - - if err := m.RecoverMongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMongodbParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MongodbParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongodbParams) UnmarshalBinary(b []byte) error { - var res MongodbParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mongodb_search_params.go b/v2/models/mongodb_search_params.go deleted file mode 100644 index 6511e715..00000000 --- a/v2/models/mongodb_search_params.go +++ /dev/null @@ -1,118 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MongodbSearchParams Specifies the parameters which are specific for searching MongoDB objects. -// -// swagger:model MongodbSearchParams -type MongodbSearchParams struct { - - // Specifies the search string to search the MongoDB Objects - // Required: true - SearchString *string `json:"searchString"` - - // Specifies one or more MongoDB object types be searched. - // Required: true - MongoDBObjectTypes []string `json:"mongoDBObjectTypes"` -} - -// Validate validates this mongodb search params -func (m *MongodbSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongoDBObjectTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MongodbSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -var mongodbSearchParamsMongoDBObjectTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["MongoDatabases","MongoCollections"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mongodbSearchParamsMongoDBObjectTypesItemsEnum = append(mongodbSearchParamsMongoDBObjectTypesItemsEnum, v) - } -} - -func (m *MongodbSearchParams) validateMongoDBObjectTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mongodbSearchParamsMongoDBObjectTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *MongodbSearchParams) validateMongoDBObjectTypes(formats strfmt.Registry) error { - - if err := validate.Required("mongoDBObjectTypes", "body", m.MongoDBObjectTypes); err != nil { - return err - } - - for i := 0; i < len(m.MongoDBObjectTypes); i++ { - - // value enum - if err := m.validateMongoDBObjectTypesItemsEnum("mongoDBObjectTypes"+"."+strconv.Itoa(i), "body", m.MongoDBObjectTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this mongodb search params based on context it is used -func (m *MongodbSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MongodbSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MongodbSearchParams) UnmarshalBinary(b []byte) error { - var res MongodbSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/month_schedule.go b/v2/models/month_schedule.go deleted file mode 100644 index 3d442612..00000000 --- a/v2/models/month_schedule.go +++ /dev/null @@ -1,163 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MonthSchedule Month Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to on specific week and specific days of that week. -// -// swagger:model MonthSchedule -type MonthSchedule struct { - - // Specifies a list of days of the week when to start Protection Group Runs.
Example: To run a Protection Group on every Monday and Tuesday, set the schedule with following values:
unit: 'Weeks'
dayOfWeek: ['Monday','Tuesday'] - DayOfWeek []string `json:"dayOfWeek"` - - // Specifies the week of the month (such as 'Third') or nth day of month (such as 'First' or 'Last') in a Monthly Schedule specified by unit field as 'Months'.
This field can be used in combination with 'dayOfWeek' to define the day in the month to start the Protection Group Run.
Example: if 'weekOfMonth' is set to 'Third' and day is set to 'Monday', a backup is performed on the third Monday of every month.
Example: if 'weekOfMonth' is set to 'Last' and dayOfWeek is not set, a backup is performed on the last day of every month. - // Enum: ["First","Second","Third","Fourth","Last"] - WeekOfMonth *string `json:"weekOfMonth,omitempty"` - - // Specifies the exact date of the month (such as 18) in a Monthly Schedule specified by unit field as 'Years'.
Example: if 'dayOfMonth' is set to '18', a backup is performed on the 18th of every month. - DayOfMonth *int32 `json:"dayOfMonth,omitempty"` -} - -// Validate validates this month schedule -func (m *MonthSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayOfWeek(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekOfMonth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var monthScheduleDayOfWeekItemsEnum []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 { - monthScheduleDayOfWeekItemsEnum = append(monthScheduleDayOfWeekItemsEnum, v) - } -} - -func (m *MonthSchedule) validateDayOfWeekItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, monthScheduleDayOfWeekItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *MonthSchedule) validateDayOfWeek(formats strfmt.Registry) error { - if swag.IsZero(m.DayOfWeek) { // not required - return nil - } - - for i := 0; i < len(m.DayOfWeek); i++ { - - // value enum - if err := m.validateDayOfWeekItemsEnum("dayOfWeek"+"."+strconv.Itoa(i), "body", m.DayOfWeek[i]); err != nil { - return err - } - - } - - return nil -} - -var monthScheduleTypeWeekOfMonthPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["First","Second","Third","Fourth","Last"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - monthScheduleTypeWeekOfMonthPropEnum = append(monthScheduleTypeWeekOfMonthPropEnum, v) - } -} - -const ( - - // MonthScheduleWeekOfMonthFirst captures enum value "First" - MonthScheduleWeekOfMonthFirst string = "First" - - // MonthScheduleWeekOfMonthSecond captures enum value "Second" - MonthScheduleWeekOfMonthSecond string = "Second" - - // MonthScheduleWeekOfMonthThird captures enum value "Third" - MonthScheduleWeekOfMonthThird string = "Third" - - // MonthScheduleWeekOfMonthFourth captures enum value "Fourth" - MonthScheduleWeekOfMonthFourth string = "Fourth" - - // MonthScheduleWeekOfMonthLast captures enum value "Last" - MonthScheduleWeekOfMonthLast string = "Last" -) - -// prop value enum -func (m *MonthSchedule) validateWeekOfMonthEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, monthScheduleTypeWeekOfMonthPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MonthSchedule) validateWeekOfMonth(formats strfmt.Registry) error { - if swag.IsZero(m.WeekOfMonth) { // not required - return nil - } - - // value enum - if err := m.validateWeekOfMonthEnum("weekOfMonth", "body", *m.WeekOfMonth); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this month schedule based on context it is used -func (m *MonthSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MonthSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MonthSchedule) UnmarshalBinary(b []byte) error { - var res MonthSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mount_hyper_v_volume_params.go b/v2/models/mount_hyper_v_volume_params.go deleted file mode 100644 index 5eddf8f3..00000000 --- a/v2/models/mount_hyper_v_volume_params.go +++ /dev/null @@ -1,162 +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" -) - -// MountHyperVVolumeParams Mount Volumes Params. -// -// Specifies the parameters to mount volumes. -// -// swagger:model MountHyperVVolumeParams -type MountHyperVVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kHyperV"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a HyperV target. - HypervTargetParams *HyperVTargetParamsForMountVolume `json:"hypervTargetParams,omitempty"` -} - -// Validate validates this mount hyper v volume params -func (m *MountHyperVVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mountHyperVVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHyperV"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mountHyperVVolumeParamsTypeTargetEnvironmentPropEnum = append(mountHyperVVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // MountHyperVVolumeParamsTargetEnvironmentKHyperV captures enum value "kHyperV" - MountHyperVVolumeParamsTargetEnvironmentKHyperV string = "kHyperV" -) - -// prop value enum -func (m *MountHyperVVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mountHyperVVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MountHyperVVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *MountHyperVVolumeParams) validateHypervTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if m.HypervTargetParams != nil { - if err := m.HypervTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount hyper v volume params based on the context it is used -func (m *MountHyperVVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHypervTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountHyperVVolumeParams) contextValidateHypervTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervTargetParams != nil { - - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if err := m.HypervTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountHyperVVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountHyperVVolumeParams) UnmarshalBinary(b []byte) error { - var res MountHyperVVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mount_physical_volume_params.go b/v2/models/mount_physical_volume_params.go deleted file mode 100644 index 34ee70e1..00000000 --- a/v2/models/mount_physical_volume_params.go +++ /dev/null @@ -1,162 +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" -) - -// MountPhysicalVolumeParams Mount Physical Volumes params. -// -// Specifies the parameters to Mount Physical Volumes. -// -// swagger:model MountPhysicalVolumeParams -type MountPhysicalVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kPhysical"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a physical target. - PhysicalTargetParams *PhysicalTargetParamsForMountVolume `json:"physicalTargetParams,omitempty"` -} - -// Validate validates this mount physical volume params -func (m *MountPhysicalVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mountPhysicalVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mountPhysicalVolumeParamsTypeTargetEnvironmentPropEnum = append(mountPhysicalVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // MountPhysicalVolumeParamsTargetEnvironmentKPhysical captures enum value "kPhysical" - MountPhysicalVolumeParamsTargetEnvironmentKPhysical string = "kPhysical" -) - -// prop value enum -func (m *MountPhysicalVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mountPhysicalVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MountPhysicalVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *MountPhysicalVolumeParams) validatePhysicalTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if m.PhysicalTargetParams != nil { - if err := m.PhysicalTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount physical volume params based on the context it is used -func (m *MountPhysicalVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePhysicalTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountPhysicalVolumeParams) contextValidatePhysicalTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalTargetParams != nil { - - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if err := m.PhysicalTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountPhysicalVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountPhysicalVolumeParams) UnmarshalBinary(b []byte) error { - var res MountPhysicalVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mount_vmware_volume_params.go b/v2/models/mount_vmware_volume_params.go deleted file mode 100644 index 8ae8af87..00000000 --- a/v2/models/mount_vmware_volume_params.go +++ /dev/null @@ -1,162 +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" -) - -// MountVmwareVolumeParams Mount VMware Volumes params. -// -// Specifies the parameters to mount VMware Volumes. -// -// swagger:model MountVmwareVolumeParams -type MountVmwareVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a VMware target.. - VmwareTargetParams *VmwareTargetParamsForMountVolume `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this mount vmware volume params -func (m *MountVmwareVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mountVmwareVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mountVmwareVolumeParamsTypeTargetEnvironmentPropEnum = append(mountVmwareVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // MountVmwareVolumeParamsTargetEnvironmentKVMware captures enum value "kVMware" - MountVmwareVolumeParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *MountVmwareVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mountVmwareVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MountVmwareVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *MountVmwareVolumeParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mount vmware volume params based on the context it is used -func (m *MountVmwareVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MountVmwareVolumeParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MountVmwareVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVmwareVolumeParams) UnmarshalBinary(b []byte) error { - var res MountVmwareVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mounted_volume_mapping.go b/v2/models/mounted_volume_mapping.go deleted file mode 100644 index a8a34498..00000000 --- a/v2/models/mounted_volume_mapping.go +++ /dev/null @@ -1,56 +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" -) - -// MountedVolumeMapping Specifies the mapping of original volume and mounted volume after Instant Volume Mount. -// -// swagger:model MountedVolumeMapping -type MountedVolumeMapping struct { - - // Specifies the name of the original volume. - OriginalVolume *string `json:"originalVolume,omitempty"` - - // Specifies the name of the point where the volume is mounted. - MountedVolume *string `json:"mountedVolume,omitempty"` - - // Specifies the type of the file system of the volume. - FileSystemType *string `json:"fileSystemType,omitempty"` -} - -// Validate validates this mounted volume mapping -func (m *MountedVolumeMapping) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this mounted volume mapping based on context it is used -func (m *MountedVolumeMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MountedVolumeMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountedVolumeMapping) UnmarshalBinary(b []byte) error { - var res MountedVolumeMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ms_group_item.go b/v2/models/ms_group_item.go deleted file mode 100644 index 2075b5de..00000000 --- a/v2/models/ms_group_item.go +++ /dev/null @@ -1,280 +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" -) - -// MsGroupItem Indexed M365 Group item. -// -// Specifies the indexed M365 Group item. -// -// swagger:model MsGroupItem -type MsGroupItem struct { - CommonIndexedObjectParams - - // Specifies the M365 Group item type. - // Enum: ["Email","EmailFolder","SiteFile","SiteFolder"] - Type *string `json:"type,omitempty"` - - // Specifies the indexed M365 Group mailbox item. - MailboxItem *Email `json:"mailboxItem,omitempty"` - - // Specifies the indexed Group site document library item. - SiteItem *DocumentLibraryItem `json:"siteItem,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MsGroupItem) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - MailboxItem *Email `json:"mailboxItem,omitempty"` - - SiteItem *DocumentLibraryItem `json:"siteItem,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.MailboxItem = dataAO1.MailboxItem - - m.SiteItem = dataAO1.SiteItem - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MsGroupItem) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - MailboxItem *Email `json:"mailboxItem,omitempty"` - - SiteItem *DocumentLibraryItem `json:"siteItem,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.MailboxItem = m.MailboxItem - - dataAO1.SiteItem = m.SiteItem - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this ms group item -func (m *MsGroupItem) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMailboxItem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteItem(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var msGroupItemTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Email","EmailFolder","SiteFile","SiteFolder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - msGroupItemTypeTypePropEnum = append(msGroupItemTypeTypePropEnum, v) - } -} - -// property enum -func (m *MsGroupItem) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, msGroupItemTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MsGroupItem) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *MsGroupItem) validateMailboxItem(formats strfmt.Registry) error { - - if swag.IsZero(m.MailboxItem) { // not required - return nil - } - - if m.MailboxItem != nil { - if err := m.MailboxItem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxItem") - } - return err - } - } - - return nil -} - -func (m *MsGroupItem) validateSiteItem(formats strfmt.Registry) error { - - if swag.IsZero(m.SiteItem) { // not required - return nil - } - - if m.SiteItem != nil { - if err := m.SiteItem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteItem") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ms group item based on the context it is used -func (m *MsGroupItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMailboxItem(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteItem(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MsGroupItem) contextValidateMailboxItem(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxItem != nil { - - if swag.IsZero(m.MailboxItem) { // not required - return nil - } - - if err := m.MailboxItem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxItem") - } - return err - } - } - - return nil -} - -func (m *MsGroupItem) contextValidateSiteItem(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteItem != nil { - - if swag.IsZero(m.SiteItem) { // not required - return nil - } - - if err := m.SiteItem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteItem") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MsGroupItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MsGroupItem) UnmarshalBinary(b []byte) error { - var res MsGroupItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ms_group_items.go b/v2/models/ms_group_items.go deleted file mode 100644 index fa9aacfd..00000000 --- a/v2/models/ms_group_items.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MsGroupItems Specifies the indexed M365 Groups items like group mail items, files etc. -// -// swagger:model MsGroupItems -type MsGroupItems []*MsGroupItem - -// Validate validates this ms group items -func (m MsGroupItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this ms group items based on the context it is used -func (m MsGroupItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/ms_group_param.go b/v2/models/ms_group_param.go deleted file mode 100644 index 5753ce81..00000000 --- a/v2/models/ms_group_param.go +++ /dev/null @@ -1,326 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MsGroupParam Specifies parameters to recover MS group. -// -// swagger:model MsGroupParam -type MsGroupParam struct { - - // Specifies if the entire Group (mailbox + site) is to be restored. - RecoverEntireGroup *bool `json:"recoverEntireGroup,omitempty"` - - // Specifies whether mailbox restore is full or granular. - // Enum: ["kFull","kPartial"] - MailboxRestoreType *string `json:"mailboxRestoreType,omitempty"` - - // Specifies whether site restore is full or granular. - // Enum: ["kFull","kPartial"] - SiteRestoreType *string `json:"siteRestoreType,omitempty"` - - // Specifies the parameters to recover a MSGroup site document. - SiteRestoreParams []*OneDriveParam `json:"siteRestoreParams"` - - // Specifies parameters to recover a MSGroup Mailbox. - MailboxRestoreParams *MailboxParam `json:"mailboxRestoreParams,omitempty"` - - // Specifies the MS group recover Object info. - // Required: true - RecoverObject *CommonRecoverObjectSnapshotParams `json:"recoverObject"` -} - -// Validate validates this ms group param -func (m *MsGroupParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMailboxRestoreType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteRestoreType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMailboxRestoreParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var msGroupParamTypeMailboxRestoreTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFull","kPartial"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - msGroupParamTypeMailboxRestoreTypePropEnum = append(msGroupParamTypeMailboxRestoreTypePropEnum, v) - } -} - -const ( - - // MsGroupParamMailboxRestoreTypeKFull captures enum value "kFull" - MsGroupParamMailboxRestoreTypeKFull string = "kFull" - - // MsGroupParamMailboxRestoreTypeKPartial captures enum value "kPartial" - MsGroupParamMailboxRestoreTypeKPartial string = "kPartial" -) - -// prop value enum -func (m *MsGroupParam) validateMailboxRestoreTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, msGroupParamTypeMailboxRestoreTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MsGroupParam) validateMailboxRestoreType(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxRestoreType) { // not required - return nil - } - - // value enum - if err := m.validateMailboxRestoreTypeEnum("mailboxRestoreType", "body", *m.MailboxRestoreType); err != nil { - return err - } - - return nil -} - -var msGroupParamTypeSiteRestoreTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFull","kPartial"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - msGroupParamTypeSiteRestoreTypePropEnum = append(msGroupParamTypeSiteRestoreTypePropEnum, v) - } -} - -const ( - - // MsGroupParamSiteRestoreTypeKFull captures enum value "kFull" - MsGroupParamSiteRestoreTypeKFull string = "kFull" - - // MsGroupParamSiteRestoreTypeKPartial captures enum value "kPartial" - MsGroupParamSiteRestoreTypeKPartial string = "kPartial" -) - -// prop value enum -func (m *MsGroupParam) validateSiteRestoreTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, msGroupParamTypeSiteRestoreTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MsGroupParam) validateSiteRestoreType(formats strfmt.Registry) error { - if swag.IsZero(m.SiteRestoreType) { // not required - return nil - } - - // value enum - if err := m.validateSiteRestoreTypeEnum("siteRestoreType", "body", *m.SiteRestoreType); err != nil { - return err - } - - return nil -} - -func (m *MsGroupParam) validateSiteRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.SiteRestoreParams) { // not required - return nil - } - - for i := 0; i < len(m.SiteRestoreParams); i++ { - if swag.IsZero(m.SiteRestoreParams[i]) { // not required - continue - } - - if m.SiteRestoreParams[i] != nil { - if err := m.SiteRestoreParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteRestoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteRestoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MsGroupParam) validateMailboxRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxRestoreParams) { // not required - return nil - } - - if m.MailboxRestoreParams != nil { - if err := m.MailboxRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxRestoreParams") - } - return err - } - } - - return nil -} - -func (m *MsGroupParam) validateRecoverObject(formats strfmt.Registry) error { - - if err := validate.Required("recoverObject", "body", m.RecoverObject); err != nil { - return err - } - - if m.RecoverObject != nil { - if err := m.RecoverObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this ms group param based on the context it is used -func (m *MsGroupParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSiteRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMailboxRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MsGroupParam) contextValidateSiteRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SiteRestoreParams); i++ { - - if m.SiteRestoreParams[i] != nil { - - if swag.IsZero(m.SiteRestoreParams[i]) { // not required - return nil - } - - if err := m.SiteRestoreParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteRestoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteRestoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MsGroupParam) contextValidateMailboxRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxRestoreParams != nil { - - if swag.IsZero(m.MailboxRestoreParams) { // not required - return nil - } - - if err := m.MailboxRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxRestoreParams") - } - return err - } - } - - return nil -} - -func (m *MsGroupParam) contextValidateRecoverObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverObject != nil { - - if err := m.RecoverObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MsGroupParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MsGroupParam) UnmarshalBinary(b []byte) error { - var res MsGroupParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ms_sql_common_connection_params.go b/v2/models/ms_sql_common_connection_params.go deleted file mode 100644 index 41ff11a7..00000000 --- a/v2/models/ms_sql_common_connection_params.go +++ /dev/null @@ -1,71 +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" -) - -// MsSQLCommonConnectionParams Specifies the common parameters to connect to a SQL node/cluster -// -// swagger:model MsSQLCommonConnectionParams -type MsSQLCommonConnectionParams struct { - - // Specifies the unique identifier to locate the SQL node or cluster. The host identifier can be IP address or FQDN. - // Required: true - HostIdentifier *string `json:"hostIdentifier"` -} - -// Validate validates this ms SQL common connection params -func (m *MsSQLCommonConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostIdentifier(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MsSQLCommonConnectionParams) validateHostIdentifier(formats strfmt.Registry) error { - - if err := validate.Required("hostIdentifier", "body", m.HostIdentifier); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ms SQL common connection params based on context it is used -func (m *MsSQLCommonConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MsSQLCommonConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MsSQLCommonConnectionParams) UnmarshalBinary(b []byte) error { - var res MsSQLCommonConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ms_team_param.go b/v2/models/ms_team_param.go deleted file mode 100644 index 8bba3c0a..00000000 --- a/v2/models/ms_team_param.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MsTeamParam Specifies the parameters to recover a Microsoft 365 Team. -// -// swagger:model MsTeamParam -type MsTeamParam struct { - - // Specifies whether to recover the whole Microsoft 365 Team. - // Required: true - RecoverEntireMsTeam *bool `json:"recoverEntireMsTeam"` - - // Specifies the list of Channels to recover. These are applicable iff recoverEntireMsTeam is false. - ChannelParams []*ChannelParam `json:"channelParams"` -} - -// Validate validates this ms team param -func (m *MsTeamParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverEntireMsTeam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChannelParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MsTeamParam) validateRecoverEntireMsTeam(formats strfmt.Registry) error { - - if err := validate.Required("recoverEntireMsTeam", "body", m.RecoverEntireMsTeam); err != nil { - return err - } - - return nil -} - -func (m *MsTeamParam) validateChannelParams(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelParams) { // not required - return nil - } - - for i := 0; i < len(m.ChannelParams); i++ { - if swag.IsZero(m.ChannelParams[i]) { // not required - continue - } - - if m.ChannelParams[i] != nil { - if err := m.ChannelParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this ms team param based on the context it is used -func (m *MsTeamParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChannelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MsTeamParam) contextValidateChannelParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChannelParams); i++ { - - if m.ChannelParams[i] != nil { - - if swag.IsZero(m.ChannelParams[i]) { // not required - return nil - } - - if err := m.ChannelParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MsTeamParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MsTeamParam) UnmarshalBinary(b []byte) error { - var res MsTeamParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_connection_params.go b/v2/models/mssql_connection_params.go deleted file mode 100644 index 27fb7156..00000000 --- a/v2/models/mssql_connection_params.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" -) - -// MssqlConnectionParams Specifies the parameters to connect to a SQL node/cluster using given IP or hostname FQDN. -// -// swagger:model MssqlConnectionParams -type MssqlConnectionParams struct { - MsSQLCommonConnectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlConnectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MsSQLCommonConnectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MsSQLCommonConnectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlConnectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.MsSQLCommonConnectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql connection params -func (m *MssqlConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MsSQLCommonConnectionParams - if err := m.MsSQLCommonConnectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mssql connection params based on the context it is used -func (m *MssqlConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MsSQLCommonConnectionParams - if err := m.MsSQLCommonConnectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlConnectionParams) UnmarshalBinary(b []byte) error { - var res MssqlConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_connection_response_params.go b/v2/models/mssql_connection_response_params.go deleted file mode 100644 index 9f1791d5..00000000 --- a/v2/models/mssql_connection_response_params.go +++ /dev/null @@ -1,391 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MssqlConnectionResponseParams Specifies the response parameters after connecting to a SQL node/cluster using given IP or hostname FQDN. -// -// swagger:model MssqlConnectionResponseParams -type MssqlConnectionResponseParams struct { - MsSQLCommonConnectionParams - - // Specifies the error information if any associated with the app topology response. - Error *Error `json:"error,omitempty"` - - // Specifies whether to skip the discovery phase of all SQL servers, AAG groups etc during registration process. - SkipConnectionDiscovery *bool `json:"skipConnectionDiscovery,omitempty"` - - // Specifies the list of SQL servers. If SQL server is a part of avalibility group then it will be returned in aagServers field. This will include the list of all standalone SQL servers and servers belonging to any FCI enviournment. - Servers []*SQLServer `json:"servers"` - - // Specifies the list of FCI (Failover Cluster Instaces) Clusters. This will contain the list of all failover pools under a windows cluster. FCI clusters which are part of AAG, will be returned seperatly under aagServers field. - FciClusters []*FCICluster `json:"fciClusters"` - - // Specifies the list of AAG (Always on Avalibility) groups. - AagGroups []*AAGGroup `json:"aagGroups"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlConnectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MsSQLCommonConnectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MsSQLCommonConnectionParams = aO0 - - // AO1 - var dataAO1 struct { - Error *Error `json:"error,omitempty"` - - SkipConnectionDiscovery *bool `json:"skipConnectionDiscovery,omitempty"` - - Servers []*SQLServer `json:"servers"` - - FciClusters []*FCICluster `json:"fciClusters"` - - AagGroups []*AAGGroup `json:"aagGroups"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Error = dataAO1.Error - - m.SkipConnectionDiscovery = dataAO1.SkipConnectionDiscovery - - m.Servers = dataAO1.Servers - - m.FciClusters = dataAO1.FciClusters - - m.AagGroups = dataAO1.AagGroups - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlConnectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.MsSQLCommonConnectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Error *Error `json:"error,omitempty"` - - SkipConnectionDiscovery *bool `json:"skipConnectionDiscovery,omitempty"` - - Servers []*SQLServer `json:"servers"` - - FciClusters []*FCICluster `json:"fciClusters"` - - AagGroups []*AAGGroup `json:"aagGroups"` - } - - dataAO1.Error = m.Error - - dataAO1.SkipConnectionDiscovery = m.SkipConnectionDiscovery - - dataAO1.Servers = m.Servers - - dataAO1.FciClusters = m.FciClusters - - dataAO1.AagGroups = m.AagGroups - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql connection response params -func (m *MssqlConnectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MsSQLCommonConnectionParams - if err := m.MsSQLCommonConnectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFciClusters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAagGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlConnectionResponseParams) validateError(formats strfmt.Registry) error { - - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *MssqlConnectionResponseParams) validateServers(formats strfmt.Registry) error { - - if swag.IsZero(m.Servers) { // not required - return nil - } - - for i := 0; i < len(m.Servers); i++ { - if swag.IsZero(m.Servers[i]) { // not required - continue - } - - if m.Servers[i] != nil { - if err := m.Servers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MssqlConnectionResponseParams) validateFciClusters(formats strfmt.Registry) error { - - if swag.IsZero(m.FciClusters) { // not required - return nil - } - - for i := 0; i < len(m.FciClusters); i++ { - if swag.IsZero(m.FciClusters[i]) { // not required - continue - } - - if m.FciClusters[i] != nil { - if err := m.FciClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MssqlConnectionResponseParams) validateAagGroups(formats strfmt.Registry) error { - - if swag.IsZero(m.AagGroups) { // not required - return nil - } - - for i := 0; i < len(m.AagGroups); i++ { - if swag.IsZero(m.AagGroups[i]) { // not required - continue - } - - if m.AagGroups[i] != nil { - if err := m.AagGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mssql connection response params based on the context it is used -func (m *MssqlConnectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MsSQLCommonConnectionParams - if err := m.MsSQLCommonConnectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFciClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAagGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlConnectionResponseParams) 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 -} - -func (m *MssqlConnectionResponseParams) contextValidateServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Servers); i++ { - - if m.Servers[i] != nil { - - if swag.IsZero(m.Servers[i]) { // not required - return nil - } - - if err := m.Servers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MssqlConnectionResponseParams) contextValidateFciClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FciClusters); i++ { - - if m.FciClusters[i] != nil { - - if swag.IsZero(m.FciClusters[i]) { // not required - return nil - } - - if err := m.FciClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fciClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *MssqlConnectionResponseParams) contextValidateAagGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AagGroups); i++ { - - if m.AagGroups[i] != nil { - - if swag.IsZero(m.AagGroups[i]) { // not required - return nil - } - - if err := m.AagGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlConnectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlConnectionResponseParams) UnmarshalBinary(b []byte) error { - var res MssqlConnectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_file_object_protection.go b/v2/models/mssql_file_object_protection.go deleted file mode 100644 index 12eea57d..00000000 --- a/v2/models/mssql_file_object_protection.go +++ /dev/null @@ -1,71 +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" -) - -// MssqlFileObjectProtection Specifies the object params to create File based MSSQL Object Protection -// -// swagger:model MssqlFileObjectProtection -type MssqlFileObjectProtection struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` -} - -// Validate validates this mssql file object protection -func (m *MssqlFileObjectProtection) 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 *MssqlFileObjectProtection) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mssql file object protection based on context it is used -func (m *MssqlFileObjectProtection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlFileObjectProtection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlFileObjectProtection) UnmarshalBinary(b []byte) error { - var res MssqlFileObjectProtection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_file_object_protection_params.go b/v2/models/mssql_file_object_protection_params.go deleted file mode 100644 index 0c55453d..00000000 --- a/v2/models/mssql_file_object_protection_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MssqlFileObjectProtectionParams Specifies the params to create a File based MSSQL Object Protection. -// -// swagger:model MssqlFileObjectProtectionParams -type MssqlFileObjectProtectionParams struct { - - // Specifies the list of objects to be protected. - // Required: true - // Min Items: 1 - Objects []*MssqlFileObjectProtection `json:"objects"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlFileObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*MssqlFileObjectProtection `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlFileObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*MssqlFileObjectProtection `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql file object protection params -func (m *MssqlFileObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlFileObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mssql file object protection params based on the context it is used -func (m *MssqlFileObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlFileObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlFileObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlFileObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res MssqlFileObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_native_object_protection.go b/v2/models/mssql_native_object_protection.go deleted file mode 100644 index 1f91217d..00000000 --- a/v2/models/mssql_native_object_protection.go +++ /dev/null @@ -1,71 +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" -) - -// MssqlNativeObjectProtection Specifies the object params to create Native based MSSQL Object Protection. -// -// swagger:model MssqlNativeObjectProtection -type MssqlNativeObjectProtection struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` -} - -// Validate validates this mssql native object protection -func (m *MssqlNativeObjectProtection) 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 *MssqlNativeObjectProtection) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this mssql native object protection based on context it is used -func (m *MssqlNativeObjectProtection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlNativeObjectProtection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlNativeObjectProtection) UnmarshalBinary(b []byte) error { - var res MssqlNativeObjectProtection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_native_object_protection_params.go b/v2/models/mssql_native_object_protection_params.go deleted file mode 100644 index b19dd25e..00000000 --- a/v2/models/mssql_native_object_protection_params.go +++ /dev/null @@ -1,211 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MssqlNativeObjectProtectionParams Specifies the params to create a Native based MSSQL Object Protection. -// -// swagger:model MssqlNativeObjectProtectionParams -type MssqlNativeObjectProtectionParams struct { - - // Specifies the list of objects to be protected. - // Required: true - // Min Items: 1 - Objects []*MssqlNativeObjectProtection `json:"objects"` - - // Specifies the number of streams to be used. - NumStreams *int32 `json:"numStreams,omitempty"` - - // Specifies the WithClause to be used. - WithClause *string `json:"withClause,omitempty"` - - CommonMSSQLProtectionGroupParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlNativeObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*MssqlNativeObjectProtection `json:"objects"` - - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.NumStreams = dataAO0.NumStreams - - m.WithClause = dataAO0.WithClause - - // AO1 - var aO1 CommonMSSQLProtectionGroupParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonMSSQLProtectionGroupParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlNativeObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*MssqlNativeObjectProtection `json:"objects"` - - NumStreams *int32 `json:"numStreams,omitempty"` - - WithClause *string `json:"withClause,omitempty"` - } - - dataAO0.Objects = m.Objects - - dataAO0.NumStreams = m.NumStreams - - dataAO0.WithClause = m.WithClause - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonMSSQLProtectionGroupParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql native object protection params -func (m *MssqlNativeObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlNativeObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this mssql native object protection params based on the context it is used -func (m *MssqlNativeObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonMSSQLProtectionGroupParams - if err := m.CommonMSSQLProtectionGroupParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlNativeObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlNativeObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlNativeObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res MssqlNativeObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_object_entity_params.go b/v2/models/mssql_object_entity_params.go deleted file mode 100644 index 69ee75c6..00000000 --- a/v2/models/mssql_object_entity_params.go +++ /dev/null @@ -1,163 +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" -) - -// MssqlObjectEntityParams Object details for Mssql. -// -// swagger:model MssqlObjectEntityParams -type MssqlObjectEntityParams struct { - - // Specifies the host information for the SQL object. Includes details of Host object such as VM or Physical server. - HostInfo *HostInformation `json:"hostInfo,omitempty"` - - // Specifies the Always on Avalibility (AAG) information if associated with the SQL Object. - AagInfo *AAGInfo `json:"aagInfo,omitempty"` - - // Specifies whether the database is TDE enabled. - IsEncrypted *bool `json:"isEncrypted,omitempty"` -} - -// Validate validates this mssql object entity params -func (m *MssqlObjectEntityParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAagInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlObjectEntityParams) validateHostInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HostInfo) { // not required - return nil - } - - if m.HostInfo != nil { - if err := m.HostInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfo") - } - return err - } - } - - return nil -} - -func (m *MssqlObjectEntityParams) validateAagInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if m.AagInfo != nil { - if err := m.AagInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mssql object entity params based on the context it is used -func (m *MssqlObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHostInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAagInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlObjectEntityParams) contextValidateHostInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.HostInfo != nil { - - if swag.IsZero(m.HostInfo) { // not required - return nil - } - - if err := m.HostInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfo") - } - return err - } - } - - return nil -} - -func (m *MssqlObjectEntityParams) contextValidateAagInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AagInfo != nil { - - if swag.IsZero(m.AagInfo) { // not required - return nil - } - - if err := m.AagInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aagInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aagInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlObjectEntityParams) UnmarshalBinary(b []byte) error { - var res MssqlObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_object_protection_params.go b/v2/models/mssql_object_protection_params.go deleted file mode 100644 index d20d641e..00000000 --- a/v2/models/mssql_object_protection_params.go +++ /dev/null @@ -1,217 +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" -) - -// MssqlObjectProtectionParams Specifies the parameters specific to MSSQL Object Protection. -// -// swagger:model MssqlObjectProtectionParams -type MssqlObjectProtectionParams struct { - - // Specifies the MSSQL Object Protection type. - // Required: true - // Enum: ["kFile","kVolume","kNative"] - ObjectProtectionType *string `json:"objectProtectionType"` - - // Specifies the File based MSSQL Object Protection params. - FileObjectProtectionTypeParams *MssqlFileObjectProtectionParams `json:"fileObjectProtectionTypeParams,omitempty"` - - // Specifies the Native based MSSQL Object Protection params. - NativeObjectProtectionTypeParams *MssqlNativeObjectProtectionParams `json:"nativeObjectProtectionTypeParams,omitempty"` -} - -// Validate validates this mssql object protection params -func (m *MssqlObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNativeObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume","kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum = append(mssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum, v) - } -} - -const ( - - // MssqlObjectProtectionParamsObjectProtectionTypeKFile captures enum value "kFile" - MssqlObjectProtectionParamsObjectProtectionTypeKFile string = "kFile" - - // MssqlObjectProtectionParamsObjectProtectionTypeKVolume captures enum value "kVolume" - MssqlObjectProtectionParamsObjectProtectionTypeKVolume string = "kVolume" - - // MssqlObjectProtectionParamsObjectProtectionTypeKNative captures enum value "kNative" - MssqlObjectProtectionParamsObjectProtectionTypeKNative string = "kNative" -) - -// prop value enum -func (m *MssqlObjectProtectionParams) validateObjectProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mssqlObjectProtectionParamsTypeObjectProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MssqlObjectProtectionParams) validateObjectProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("objectProtectionType", "body", m.ObjectProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateObjectProtectionTypeEnum("objectProtectionType", "body", *m.ObjectProtectionType); err != nil { - return err - } - - return nil -} - -func (m *MssqlObjectProtectionParams) validateFileObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileObjectProtectionTypeParams) { // not required - return nil - } - - if m.FileObjectProtectionTypeParams != nil { - if err := m.FileObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MssqlObjectProtectionParams) validateNativeObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NativeObjectProtectionTypeParams) { // not required - return nil - } - - if m.NativeObjectProtectionTypeParams != nil { - if err := m.NativeObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this mssql object protection params based on the context it is used -func (m *MssqlObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNativeObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *MssqlObjectProtectionParams) contextValidateFileObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileObjectProtectionTypeParams != nil { - - if swag.IsZero(m.FileObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.FileObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *MssqlObjectProtectionParams) contextValidateNativeObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NativeObjectProtectionTypeParams != nil { - - if swag.IsZero(m.NativeObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.NativeObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nativeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nativeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res MssqlObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_object_protection_request_params.go b/v2/models/mssql_object_protection_request_params.go deleted file mode 100644 index eb20ccb3..00000000 --- a/v2/models/mssql_object_protection_request_params.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" -) - -// MssqlObjectProtectionRequestParams Specifies the request parameters specific to MSSQL object protection. -// -// swagger:model MssqlObjectProtectionRequestParams -type MssqlObjectProtectionRequestParams struct { - MssqlObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MssqlObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MssqlObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.MssqlObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql object protection request params -func (m *MssqlObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MssqlObjectProtectionParams - if err := m.MssqlObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mssql object protection request params based on the context it is used -func (m *MssqlObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MssqlObjectProtectionParams - if err := m.MssqlObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res MssqlObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_object_protection_response_params.go b/v2/models/mssql_object_protection_response_params.go deleted file mode 100644 index 0169b29a..00000000 --- a/v2/models/mssql_object_protection_response_params.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" -) - -// MssqlObjectProtectionResponseParams Specifies the response parameters specific to MSSQL object protection. -// -// swagger:model MssqlObjectProtectionResponseParams -type MssqlObjectProtectionResponseParams struct { - CommonMssqlObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonMssqlObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonMssqlObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonMssqlObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql object protection response params -func (m *MssqlObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMssqlObjectProtectionParams - if err := m.CommonMssqlObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mssql object protection response params based on the context it is used -func (m *MssqlObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMssqlObjectProtectionParams - if err := m.CommonMssqlObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res MssqlObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_object_protection_update_request_params.go b/v2/models/mssql_object_protection_update_request_params.go deleted file mode 100644 index 5aacd843..00000000 --- a/v2/models/mssql_object_protection_update_request_params.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" -) - -// MssqlObjectProtectionUpdateRequestParams Specifies the update parameters specific to MSSQL object protection. -// -// swagger:model MssqlObjectProtectionUpdateRequestParams -type MssqlObjectProtectionUpdateRequestParams struct { - CommonMssqlObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MssqlObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonMssqlObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonMssqlObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MssqlObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonMssqlObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mssql object protection update request params -func (m *MssqlObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMssqlObjectProtectionParams - if err := m.CommonMssqlObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mssql object protection update request params based on the context it is used -func (m *MssqlObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonMssqlObjectProtectionParams - if err := m.CommonMssqlObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res MssqlObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/mssql_protection_group_type.go b/v2/models/mssql_protection_group_type.go deleted file mode 100644 index 49535ced..00000000 --- a/v2/models/mssql_protection_group_type.go +++ /dev/null @@ -1,110 +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" -) - -// MssqlProtectionGroupType MSSQL Protection Group type. -// -// MSSQL Protection Group type. -// -// swagger:model MssqlProtectionGroupType -type MssqlProtectionGroupType struct { - - // Specifies MSSQL Protection Group type. - // Enum: ["kFile","kVolume","kNative"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this mssql protection group type -func (m *MssqlProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mssqlProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume","kNative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mssqlProtectionGroupTypeTypeEnvironmentPropEnum = append(mssqlProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // MssqlProtectionGroupTypeEnvironmentKFile captures enum value "kFile" - MssqlProtectionGroupTypeEnvironmentKFile string = "kFile" - - // MssqlProtectionGroupTypeEnvironmentKVolume captures enum value "kVolume" - MssqlProtectionGroupTypeEnvironmentKVolume string = "kVolume" - - // MssqlProtectionGroupTypeEnvironmentKNative captures enum value "kNative" - MssqlProtectionGroupTypeEnvironmentKNative string = "kNative" -) - -// prop value enum -func (m *MssqlProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mssqlProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MssqlProtectionGroupType) 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 validates this mssql protection group type based on context it is used -func (m *MssqlProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MssqlProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MssqlProtectionGroupType) UnmarshalBinary(b []byte) error { - var res MssqlProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/multi_stage_restore_options.go b/v2/models/multi_stage_restore_options.go deleted file mode 100644 index e31f1727..00000000 --- a/v2/models/multi_stage_restore_options.go +++ /dev/null @@ -1,55 +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" -) - -// MultiStageRestoreOptions Multi Stage Restore Options -// -// Specifies the parameters related to multi stage Sql restore. -// -// swagger:model MultiStageRestoreOptions -type MultiStageRestoreOptions struct { - - // Set this to true if you are creating a multi-stage Sql restore task needed for features such as Hot-Standby. - EnableMultiStageRestore *bool `json:"enableMultiStageRestore,omitempty"` - - // Set this to true if you want to enable auto sync for multi stage restore. - EnableAutoSync *bool `json:"enableAutoSync,omitempty"` -} - -// Validate validates this multi stage restore options -func (m *MultiStageRestoreOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this multi stage restore options based on context it is used -func (m *MultiStageRestoreOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MultiStageRestoreOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MultiStageRestoreOptions) UnmarshalBinary(b []byte) error { - var res MultiStageRestoreOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/my_sql_agent_params.go b/v2/models/my_sql_agent_params.go deleted file mode 100644 index 4fe653a0..00000000 --- a/v2/models/my_sql_agent_params.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// MySQLAgentParams MySQL agent parameters. -// -// swagger:model MySqlAgentParams -type MySQLAgentParams struct { - - // Specifies the type of installer. - // Required: true - // Enum: ["kScript","kRPM"] - PackageType *string `json:"packageType"` -} - -// Validate validates this my Sql agent params -func (m *MySQLAgentParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePackageType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var mySqlAgentParamsTypePackageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScript","kRPM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - mySqlAgentParamsTypePackageTypePropEnum = append(mySqlAgentParamsTypePackageTypePropEnum, v) - } -} - -const ( - - // MySQLAgentParamsPackageTypeKScript captures enum value "kScript" - MySQLAgentParamsPackageTypeKScript string = "kScript" - - // MySQLAgentParamsPackageTypeKRPM captures enum value "kRPM" - MySQLAgentParamsPackageTypeKRPM string = "kRPM" -) - -// prop value enum -func (m *MySQLAgentParams) validatePackageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, mySqlAgentParamsTypePackageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *MySQLAgentParams) validatePackageType(formats strfmt.Registry) error { - - if err := validate.Required("packageType", "body", m.PackageType); err != nil { - return err - } - - // value enum - if err := m.validatePackageTypeEnum("packageType", "body", *m.PackageType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this my Sql agent params based on context it is used -func (m *MySQLAgentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *MySQLAgentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MySQLAgentParams) UnmarshalBinary(b []byte) error { - var res MySQLAgentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nas_full_throttling_config.go b/v2/models/nas_full_throttling_config.go deleted file mode 100644 index a54ffdc6..00000000 --- a/v2/models/nas_full_throttling_config.go +++ /dev/null @@ -1,55 +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" -) - -// NasFullThrottlingConfig NAS Full Backup Throttling Params -// -// Specifies the throttling configuration during full backup run. -// -// swagger:model NasFullThrottlingConfig -type NasFullThrottlingConfig struct { - - // Specifies the percentage value of maximum concurrent metadata to be fetched during full backup of the source. - MaxMetadataFetchPercentage *int32 `json:"maxMetadataFetchPercentage,omitempty"` - - // Specifies the percentage value of maximum concurrent read/write during full backup of the source. - MaxReadWritePercentage *int32 `json:"maxReadWritePercentage,omitempty"` -} - -// Validate validates this nas full throttling config -func (m *NasFullThrottlingConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas full throttling config based on context it is used -func (m *NasFullThrottlingConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasFullThrottlingConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasFullThrottlingConfig) UnmarshalBinary(b []byte) error { - var res NasFullThrottlingConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nas_incremental_throttling_config.go b/v2/models/nas_incremental_throttling_config.go deleted file mode 100644 index 44a86f46..00000000 --- a/v2/models/nas_incremental_throttling_config.go +++ /dev/null @@ -1,106 +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" -) - -// NasIncrementalThrottlingConfig NAS Full Backup Throttling Params -// -// Specifies the throttling configuration during incremental backup run. -// -// swagger:model NasIncrementalThrottlingConfig -type NasIncrementalThrottlingConfig struct { - - // Specifies the percentage value of maximum concurrent metadata to be fetched during incremental backup of the source. - // Maximum: 100 - // Minimum: 0 - MaxMetadataFetchPercentage *int32 `json:"maxMetadataFetchPercentage,omitempty"` - - // Specifies the percentage value of maximum concurrent read/write during incremental backup of the source. - // Maximum: 100 - // Minimum: 0 - MaxReadWritePercentage *int32 `json:"maxReadWritePercentage,omitempty"` -} - -// Validate validates this nas incremental throttling config -func (m *NasIncrementalThrottlingConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxMetadataFetchPercentage(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxReadWritePercentage(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasIncrementalThrottlingConfig) validateMaxMetadataFetchPercentage(formats strfmt.Registry) error { - if swag.IsZero(m.MaxMetadataFetchPercentage) { // not required - return nil - } - - if err := validate.MinimumInt("maxMetadataFetchPercentage", "body", int64(*m.MaxMetadataFetchPercentage), 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("maxMetadataFetchPercentage", "body", int64(*m.MaxMetadataFetchPercentage), 100, false); err != nil { - return err - } - - return nil -} - -func (m *NasIncrementalThrottlingConfig) validateMaxReadWritePercentage(formats strfmt.Registry) error { - if swag.IsZero(m.MaxReadWritePercentage) { // not required - return nil - } - - if err := validate.MinimumInt("maxReadWritePercentage", "body", int64(*m.MaxReadWritePercentage), 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("maxReadWritePercentage", "body", int64(*m.MaxReadWritePercentage), 100, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nas incremental throttling config based on context it is used -func (m *NasIncrementalThrottlingConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasIncrementalThrottlingConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasIncrementalThrottlingConfig) UnmarshalBinary(b []byte) error { - var res NasIncrementalThrottlingConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nas_protocol.go b/v2/models/nas_protocol.go deleted file mode 100644 index 709276a9..00000000 --- a/v2/models/nas_protocol.go +++ /dev/null @@ -1,119 +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" -) - -// NasProtocol Nas Protocol type. -// -// Nas Protocol type. -// -// swagger:model NasProtocol -type NasProtocol struct { - - // Specifies Nas Protocol type. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - NasProtocol string `json:"nasProtocol,omitempty"` -} - -// Validate validates this nas protocol -func (m *NasProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNasProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nasProtocolTypeNasProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nasProtocolTypeNasProtocolPropEnum = append(nasProtocolTypeNasProtocolPropEnum, v) - } -} - -const ( - - // NasProtocolNasProtocolKNoProtocol captures enum value "kNoProtocol" - NasProtocolNasProtocolKNoProtocol string = "kNoProtocol" - - // NasProtocolNasProtocolKNfs3 captures enum value "kNfs3" - NasProtocolNasProtocolKNfs3 string = "kNfs3" - - // NasProtocolNasProtocolKNfs41 captures enum value "kNfs4_1" - NasProtocolNasProtocolKNfs41 string = "kNfs4_1" - - // NasProtocolNasProtocolKCifs1 captures enum value "kCifs1" - NasProtocolNasProtocolKCifs1 string = "kCifs1" - - // NasProtocolNasProtocolKCifs2 captures enum value "kCifs2" - NasProtocolNasProtocolKCifs2 string = "kCifs2" - - // NasProtocolNasProtocolKCifs3 captures enum value "kCifs3" - NasProtocolNasProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NasProtocol) validateNasProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nasProtocolTypeNasProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NasProtocol) validateNasProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NasProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNasProtocolEnum("nasProtocol", "body", m.NasProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nas protocol based on context it is used -func (m *NasProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasProtocol) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasProtocol) UnmarshalBinary(b []byte) error { - var res NasProtocol - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nas_qos_policy.go b/v2/models/nas_qos_policy.go deleted file mode 100644 index 30113cd5..00000000 --- a/v2/models/nas_qos_policy.go +++ /dev/null @@ -1,50 +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" -) - -// NasQosPolicy Specifies the QoS policy, which defines the principal and priority of a NAS recovery. -// -// swagger:model NasQosPolicy -type NasQosPolicy struct { - - // Specifies the ID of the QoS Policy. - ID *int64 `json:"id,omitempty"` -} - -// Validate validates this nas qos policy -func (m *NasQosPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nas qos policy based on context it is used -func (m *NasQosPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NasQosPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasQosPolicy) UnmarshalBinary(b []byte) error { - var res NasQosPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nas_throttling_config.go b/v2/models/nas_throttling_config.go deleted file mode 100644 index 1eb85e5a..00000000 --- a/v2/models/nas_throttling_config.go +++ /dev/null @@ -1,162 +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" -) - -// NasThrottlingConfig Nas Source and Protection Throttling Configuration -// -// Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. -// -// swagger:model NasThrottlingConfig -type NasThrottlingConfig struct { - - // Specifies the throttling configuration during full backup run. - FullBackupConfig *NasFullThrottlingConfig `json:"fullBackupConfig,omitempty"` - - // Specifies the throttling configuration during incremental backup run. - IncrementalBackupConfig *NasIncrementalThrottlingConfig `json:"incrementalBackupConfig,omitempty"` -} - -// Validate validates this nas throttling config -func (m *NasThrottlingConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullBackupConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalBackupConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasThrottlingConfig) validateFullBackupConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupConfig) { // not required - return nil - } - - if m.FullBackupConfig != nil { - if err := m.FullBackupConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupConfig") - } - return err - } - } - - return nil -} - -func (m *NasThrottlingConfig) validateIncrementalBackupConfig(formats strfmt.Registry) error { - if swag.IsZero(m.IncrementalBackupConfig) { // not required - return nil - } - - if m.IncrementalBackupConfig != nil { - if err := m.IncrementalBackupConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nas throttling config based on the context it is used -func (m *NasThrottlingConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFullBackupConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalBackupConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NasThrottlingConfig) contextValidateFullBackupConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FullBackupConfig != nil { - - if swag.IsZero(m.FullBackupConfig) { // not required - return nil - } - - if err := m.FullBackupConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupConfig") - } - return err - } - } - - return nil -} - -func (m *NasThrottlingConfig) contextValidateIncrementalBackupConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.IncrementalBackupConfig != nil { - - if swag.IsZero(m.IncrementalBackupConfig) { // not required - return nil - } - - if err := m.IncrementalBackupConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NasThrottlingConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NasThrottlingConfig) UnmarshalBinary(b []byte) error { - var res NasThrottlingConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_data_tiering_params.go b/v2/models/netapp_data_tiering_params.go deleted file mode 100644 index c9b8c47f..00000000 --- a/v2/models/netapp_data_tiering_params.go +++ /dev/null @@ -1,139 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappDataTieringParams Specifies the parameters which are specific to Netapp related Protection Groups. -// -// swagger:model NetappDataTieringParams -type NetappDataTieringParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - // Specifies the id of the root of data tiering source. - SourceID *int64 `json:"sourceId,omitempty"` -} - -// Validate validates this netapp data tiering params -func (m *NetappDataTieringParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappDataTieringParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this netapp data tiering params based on the context it is used -func (m *NetappDataTieringParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappDataTieringParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappDataTieringParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappDataTieringParams) UnmarshalBinary(b []byte) error { - var res NetappDataTieringParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_object_params.go b/v2/models/netapp_object_params.go deleted file mode 100644 index 6ab3aa59..00000000 --- a/v2/models/netapp_object_params.go +++ /dev/null @@ -1,211 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappObjectParams Specifies the common parameters for Netapp objects. -// -// swagger:model NetappObjectParams -type NetappObjectParams struct { - - // Specifies a list of NAS mount protocols supported by this object. - SupportedNasMountProtocols []string `json:"supportedNasMountProtocols"` - - // Specifies the Netapp volume type. - // Enum: ["ReadWrite","LoadSharing","DataProtection","DataCache","Temp","UnkownType"] - VolumeType *string `json:"volumeType,omitempty"` - - // Specifies the extended style of a NetApp volume. - // Enum: ["kFlexVol","kFlexGroup"] - VolumeExtendedStyle *string `json:"volumeExtendedStyle,omitempty"` -} - -// Validate validates this netapp object params -func (m *NetappObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSupportedNasMountProtocols(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeExtendedStyle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappObjectParamsSupportedNasMountProtocolsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappObjectParamsSupportedNasMountProtocolsItemsEnum = append(netappObjectParamsSupportedNasMountProtocolsItemsEnum, v) - } -} - -func (m *NetappObjectParams) validateSupportedNasMountProtocolsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappObjectParamsSupportedNasMountProtocolsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappObjectParams) validateSupportedNasMountProtocols(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedNasMountProtocols) { // not required - return nil - } - - for i := 0; i < len(m.SupportedNasMountProtocols); i++ { - - // value enum - if err := m.validateSupportedNasMountProtocolsItemsEnum("supportedNasMountProtocols"+"."+strconv.Itoa(i), "body", m.SupportedNasMountProtocols[i]); err != nil { - return err - } - - } - - return nil -} - -var netappObjectParamsTypeVolumeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ReadWrite","LoadSharing","DataProtection","DataCache","Temp","UnkownType"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappObjectParamsTypeVolumeTypePropEnum = append(netappObjectParamsTypeVolumeTypePropEnum, v) - } -} - -const ( - - // NetappObjectParamsVolumeTypeReadWrite captures enum value "ReadWrite" - NetappObjectParamsVolumeTypeReadWrite string = "ReadWrite" - - // NetappObjectParamsVolumeTypeLoadSharing captures enum value "LoadSharing" - NetappObjectParamsVolumeTypeLoadSharing string = "LoadSharing" - - // NetappObjectParamsVolumeTypeDataProtection captures enum value "DataProtection" - NetappObjectParamsVolumeTypeDataProtection string = "DataProtection" - - // NetappObjectParamsVolumeTypeDataCache captures enum value "DataCache" - NetappObjectParamsVolumeTypeDataCache string = "DataCache" - - // NetappObjectParamsVolumeTypeTemp captures enum value "Temp" - NetappObjectParamsVolumeTypeTemp string = "Temp" - - // NetappObjectParamsVolumeTypeUnkownType captures enum value "UnkownType" - NetappObjectParamsVolumeTypeUnkownType string = "UnkownType" -) - -// prop value enum -func (m *NetappObjectParams) validateVolumeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappObjectParamsTypeVolumeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappObjectParams) validateVolumeType(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeType) { // not required - return nil - } - - // value enum - if err := m.validateVolumeTypeEnum("volumeType", "body", *m.VolumeType); err != nil { - return err - } - - return nil -} - -var netappObjectParamsTypeVolumeExtendedStylePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFlexVol","kFlexGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappObjectParamsTypeVolumeExtendedStylePropEnum = append(netappObjectParamsTypeVolumeExtendedStylePropEnum, v) - } -} - -const ( - - // NetappObjectParamsVolumeExtendedStyleKFlexVol captures enum value "kFlexVol" - NetappObjectParamsVolumeExtendedStyleKFlexVol string = "kFlexVol" - - // NetappObjectParamsVolumeExtendedStyleKFlexGroup captures enum value "kFlexGroup" - NetappObjectParamsVolumeExtendedStyleKFlexGroup string = "kFlexGroup" -) - -// prop value enum -func (m *NetappObjectParams) validateVolumeExtendedStyleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappObjectParamsTypeVolumeExtendedStylePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappObjectParams) validateVolumeExtendedStyle(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeExtendedStyle) { // not required - return nil - } - - // value enum - if err := m.validateVolumeExtendedStyleEnum("volumeExtendedStyle", "body", *m.VolumeExtendedStyle); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this netapp object params based on context it is used -func (m *NetappObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappObjectParams) UnmarshalBinary(b []byte) error { - var res NetappObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_object_protection_params.go b/v2/models/netapp_object_protection_params.go deleted file mode 100644 index b5d445da..00000000 --- a/v2/models/netapp_object_protection_params.go +++ /dev/null @@ -1,247 +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" -) - -// NetappObjectProtectionParams Specifies the parameters which are specific to Netapp object protection. -// -// swagger:model NetappObjectProtectionParams -type NetappObjectProtectionParams struct { - - // Specifies the protocol of the NAS device being backed up. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies the objects to be excluded in the Protection. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the incremental and full snapshot label for Data-Protect Netapp Volumes backup. If field is set , incremental and full snapshot label has to be provided. If field is not set, the snapshot label will be automatically set using timestamp. - SnapshotLabel *SnapshotLabel `json:"snapshotLabel,omitempty"` - - // Specifies that snapshot label is not set for Data-Protect Netapp Volumes backup. If field is set to true, existing oldest snapshot is used for backup and subsequent incremental will be selected in ascending order of snapshot create time on the source. If snapshot label is set, this field is set to false. - BackupExistingSnapshot *bool `json:"backupExistingSnapshot,omitempty"` - - // Specifies the source snapshots to be taken even if there is a pending run in a protection group. - ContinuousSnapshots *ContinuousSnapshotParams `json:"continuousSnapshots,omitempty"` -} - -// Validate validates this netapp object protection params -func (m *NetappObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotLabel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContinuousSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappObjectProtectionParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappObjectProtectionParamsTypeProtocolPropEnum = append(netappObjectProtectionParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // NetappObjectProtectionParamsProtocolKNoProtocol captures enum value "kNoProtocol" - NetappObjectProtectionParamsProtocolKNoProtocol string = "kNoProtocol" - - // NetappObjectProtectionParamsProtocolKNfs3 captures enum value "kNfs3" - NetappObjectProtectionParamsProtocolKNfs3 string = "kNfs3" - - // NetappObjectProtectionParamsProtocolKNfs41 captures enum value "kNfs4_1" - NetappObjectProtectionParamsProtocolKNfs41 string = "kNfs4_1" - - // NetappObjectProtectionParamsProtocolKCifs1 captures enum value "kCifs1" - NetappObjectProtectionParamsProtocolKCifs1 string = "kCifs1" - - // NetappObjectProtectionParamsProtocolKCifs2 captures enum value "kCifs2" - NetappObjectProtectionParamsProtocolKCifs2 string = "kCifs2" - - // NetappObjectProtectionParamsProtocolKCifs3 captures enum value "kCifs3" - NetappObjectProtectionParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NetappObjectProtectionParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappObjectProtectionParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappObjectProtectionParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -func (m *NetappObjectProtectionParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *NetappObjectProtectionParams) validateSnapshotLabel(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if m.SnapshotLabel != nil { - if err := m.SnapshotLabel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NetappObjectProtectionParams) validateContinuousSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if m.ContinuousSnapshots != nil { - if err := m.ContinuousSnapshots.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -// ContextValidate validate this netapp object protection params based on the context it is used -func (m *NetappObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotLabel(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateContinuousSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappObjectProtectionParams) contextValidateSnapshotLabel(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotLabel != nil { - - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if err := m.SnapshotLabel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NetappObjectProtectionParams) contextValidateContinuousSnapshots(ctx context.Context, formats strfmt.Registry) error { - - if m.ContinuousSnapshots != nil { - - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if err := m.ContinuousSnapshots.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res NetappObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_object_protection_request_params.go b/v2/models/netapp_object_protection_request_params.go deleted file mode 100644 index 5129ca9a..00000000 --- a/v2/models/netapp_object_protection_request_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappObjectProtectionRequestParams Specifies the parameters which are specific to Netapp object protection. -// -// swagger:model NetappObjectProtectionRequestParams -type NetappObjectProtectionRequestParams struct { - - // Specifies the objects to be protected. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ProtectionObjectInput `json:"objects"` - - CommonNasProtectionParams - - NetappObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NetappObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - // AO1 - var aO1 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonNasProtectionParams = aO1 - - // AO2 - var aO2 NetappObjectProtectionParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.NetappObjectProtectionParams = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NetappObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - var dataAO0 struct { - Objects []*ProtectionObjectInput `json:"objects"` - } - - dataAO0.Objects = m.Objects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.NetappObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this netapp object protection request params -func (m *NetappObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this netapp object protection request params based on the context it is used -func (m *NetappObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res NetappObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_object_protection_response_params.go b/v2/models/netapp_object_protection_response_params.go deleted file mode 100644 index 7f53da22..00000000 --- a/v2/models/netapp_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// NetappObjectProtectionResponseParams Specifies the parameters which are specific to Netapp object protection. -// -// swagger:model NetappObjectProtectionResponseParams -type NetappObjectProtectionResponseParams struct { - CommonNasProtectionParams - - NetappObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NetappObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 NetappObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.NetappObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NetappObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.NetappObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this netapp object protection response params -func (m *NetappObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this netapp object protection response params based on the context it is used -func (m *NetappObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NetappObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res NetappObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_object_protection_update_request_params.go b/v2/models/netapp_object_protection_update_request_params.go deleted file mode 100644 index 5332eafe..00000000 --- a/v2/models/netapp_object_protection_update_request_params.go +++ /dev/null @@ -1,116 +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" -) - -// NetappObjectProtectionUpdateRequestParams Specifies the update parameters which are specific to Netapp object protection. -// -// swagger:model NetappObjectProtectionUpdateRequestParams -type NetappObjectProtectionUpdateRequestParams struct { - CommonNasProtectionParams - - NetappObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NetappObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNasProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNasProtectionParams = aO0 - - // AO1 - var aO1 NetappObjectProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.NetappObjectProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NetappObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNasProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.NetappObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this netapp object protection update request params -func (m *NetappObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this netapp object protection update request params based on the context it is used -func (m *NetappObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNasProtectionParams - if err := m.CommonNasProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NetappObjectProtectionParams - if err := m.NetappObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NetappObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res NetappObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_protection_group_object_params.go b/v2/models/netapp_protection_group_object_params.go deleted file mode 100644 index 7b2c6f71..00000000 --- a/v2/models/netapp_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// NetappProtectionGroupObjectParams Specifies an object protected by a Netapp Protection Group. -// -// swagger:model NetappProtectionGroupObjectParams -type NetappProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this netapp protection group object params -func (m *NetappProtectionGroupObjectParams) 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 *NetappProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this netapp protection group object params based on the context it is used -func (m *NetappProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res NetappProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_protection_group_params.go b/v2/models/netapp_protection_group_params.go deleted file mode 100644 index 3ba4cd6b..00000000 --- a/v2/models/netapp_protection_group_params.go +++ /dev/null @@ -1,780 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappProtectionGroupParams Specifies the parameters which are specific to Netapp related Protection Groups. -// -// swagger:model NetappProtectionGroupParams -type NetappProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*NetappProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies whether or not to store the snapshots in this run directly in an Archive Target instead of on the Cluster. If this is set to true, the associated policy must have exactly one Archive Target associated with it and the policy must be set up to archive after every run. Also, a Storage Domain cannot be specified. Default behavior is 'false'. - DirectCloudArchive *bool `json:"directCloudArchive,omitempty"` - - // Specifies whether or not to enable native format for direct archive job. This field is set to true if native format should be used for archiving. - NativeFormat *bool `json:"nativeFormat,omitempty"` - - // Specifies the incremental and full snapshot label for Data-Protect Netapp Volumes backup. If snapMirrorConfig is provided then snapshotLabel should not be provided. - SnapshotLabel *SnapshotLabel `json:"snapshotLabel,omitempty"` - - // Specifies the snapshot backup configuration if S3 views are used for backing up NetApp volumes. If snapshotLabel config is provided then snapMirrorConfig should not be provided. - SnapMirrorConfig *SnapMirrorConfig `json:"snapMirrorConfig,omitempty"` - - // Specifies that snapshot label is not set for Data-Protect Netapp Volumes backup. If field is set to true, existing oldest snapshot is used for backup and subsequent incremental will be selected in ascending order of snapshot create time on the source. If snapshot label is set, this field is set to false. - BackupExistingSnapshot *bool `json:"backupExistingSnapshot,omitempty"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the preferred protocol to use if this device supports multiple protocols. - // Enum: ["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies the preference of NFS version to be backed up if a volume supports multiple versions of NFS. - // Enum: ["kNfs3","kNfs4_1"] - NfsVersionPreference *string `json:"nfsVersionPreference,omitempty"` - - // Specifies whether or not the Protection Group should continue regardless of whether or not an error was encountered during protection group run. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether the protection group should use encryption while backup or not. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Optional config that enables file locking for this view. It cannot be disabled during the edit of a view, if it has been enabled during the creation of the view. Also, it cannot be enabled if it was disabled during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies file paths to include or exclude. - FileFilters *FileFilteringPolicy `json:"fileFilters,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` - - // Specifies the source snapshots to be taken even if there is a pending run in a protection group. - ContinuousSnapshots *ContinuousSnapshotParams `json:"continuousSnapshots,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during full or incremental backup of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` - - // Specifies if the Netapp source permissions should be modified internally to allow backups. - ModifySourcePermissions *bool `json:"modifySourcePermissions,omitempty"` -} - -// Validate validates this netapp protection group params -func (m *NetappProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotLabel(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapMirrorConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsVersionPreference(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContinuousSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateSnapshotLabel(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if m.SnapshotLabel != nil { - if err := m.SnapshotLabel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateSnapMirrorConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SnapMirrorConfig) { // not required - return nil - } - - if m.SnapMirrorConfig != nil { - if err := m.SnapMirrorConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapMirrorConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapMirrorConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var netappProtectionGroupParamsTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNoProtocol","kNfs3","kNfs4_1","kCifs1","kCifs2","kCifs3"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappProtectionGroupParamsTypeProtocolPropEnum = append(netappProtectionGroupParamsTypeProtocolPropEnum, v) - } -} - -const ( - - // NetappProtectionGroupParamsProtocolKNoProtocol captures enum value "kNoProtocol" - NetappProtectionGroupParamsProtocolKNoProtocol string = "kNoProtocol" - - // NetappProtectionGroupParamsProtocolKNfs3 captures enum value "kNfs3" - NetappProtectionGroupParamsProtocolKNfs3 string = "kNfs3" - - // NetappProtectionGroupParamsProtocolKNfs41 captures enum value "kNfs4_1" - NetappProtectionGroupParamsProtocolKNfs41 string = "kNfs4_1" - - // NetappProtectionGroupParamsProtocolKCifs1 captures enum value "kCifs1" - NetappProtectionGroupParamsProtocolKCifs1 string = "kCifs1" - - // NetappProtectionGroupParamsProtocolKCifs2 captures enum value "kCifs2" - NetappProtectionGroupParamsProtocolKCifs2 string = "kCifs2" - - // NetappProtectionGroupParamsProtocolKCifs3 captures enum value "kCifs3" - NetappProtectionGroupParamsProtocolKCifs3 string = "kCifs3" -) - -// prop value enum -func (m *NetappProtectionGroupParams) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappProtectionGroupParamsTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappProtectionGroupParams) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -var netappProtectionGroupParamsTypeNfsVersionPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs3","kNfs4_1"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappProtectionGroupParamsTypeNfsVersionPreferencePropEnum = append(netappProtectionGroupParamsTypeNfsVersionPreferencePropEnum, v) - } -} - -const ( - - // NetappProtectionGroupParamsNfsVersionPreferenceKNfs3 captures enum value "kNfs3" - NetappProtectionGroupParamsNfsVersionPreferenceKNfs3 string = "kNfs3" - - // NetappProtectionGroupParamsNfsVersionPreferenceKNfs41 captures enum value "kNfs4_1" - NetappProtectionGroupParamsNfsVersionPreferenceKNfs41 string = "kNfs4_1" -) - -// prop value enum -func (m *NetappProtectionGroupParams) validateNfsVersionPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappProtectionGroupParamsTypeNfsVersionPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappProtectionGroupParams) validateNfsVersionPreference(formats strfmt.Registry) error { - if swag.IsZero(m.NfsVersionPreference) { // not required - return nil - } - - // value enum - if err := m.validateNfsVersionPreferenceEnum("nfsVersionPreference", "body", *m.NfsVersionPreference); err != nil { - return err - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateFileLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateFileFilters(formats strfmt.Registry) error { - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if m.FileFilters != nil { - if err := m.FileFilters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateContinuousSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if m.ContinuousSnapshots != nil { - if err := m.ContinuousSnapshots.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this netapp protection group params based on the context it is used -func (m *NetappProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotLabel(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapMirrorConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateContinuousSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateSnapshotLabel(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotLabel != nil { - - if swag.IsZero(m.SnapshotLabel) { // not required - return nil - } - - if err := m.SnapshotLabel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotLabel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotLabel") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateSnapMirrorConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapMirrorConfig != nil { - - if swag.IsZero(m.SnapMirrorConfig) { // not required - return nil - } - - if err := m.SnapMirrorConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapMirrorConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapMirrorConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateFileFilters(ctx context.Context, formats strfmt.Registry) error { - - if m.FileFilters != nil { - - if swag.IsZero(m.FileFilters) { // not required - return nil - } - - if err := m.FileFilters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileFilters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileFilters") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateContinuousSnapshots(ctx context.Context, formats strfmt.Registry) error { - - if m.ContinuousSnapshots != nil { - - if swag.IsZero(m.ContinuousSnapshots) { // not required - return nil - } - - if err := m.ContinuousSnapshots.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSnapshots") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSnapshots") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *NetappProtectionGroupParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res NetappProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_protocol.go b/v2/models/netapp_protocol.go deleted file mode 100644 index 9dc379e6..00000000 --- a/v2/models/netapp_protocol.go +++ /dev/null @@ -1,128 +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" -) - -// NetappProtocol Netapp Protocol type. -// -// Netapp Protocol type. -// -// swagger:model NetappProtocol -type NetappProtocol struct { - - // Specifies Netapp Protocol type. - // Enum: ["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"] - NetappProtocol string `json:"netappProtocol,omitempty"` -} - -// Validate validates this netapp protocol -func (m *NetappProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetappProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappProtocolTypeNetappProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs","kCifs","kIscsi","kFc","kFcache","kHttp","kNdmp","kManagement","kNvme"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappProtocolTypeNetappProtocolPropEnum = append(netappProtocolTypeNetappProtocolPropEnum, v) - } -} - -const ( - - // NetappProtocolNetappProtocolKNfs captures enum value "kNfs" - NetappProtocolNetappProtocolKNfs string = "kNfs" - - // NetappProtocolNetappProtocolKCifs captures enum value "kCifs" - NetappProtocolNetappProtocolKCifs string = "kCifs" - - // NetappProtocolNetappProtocolKIscsi captures enum value "kIscsi" - NetappProtocolNetappProtocolKIscsi string = "kIscsi" - - // NetappProtocolNetappProtocolKFc captures enum value "kFc" - NetappProtocolNetappProtocolKFc string = "kFc" - - // NetappProtocolNetappProtocolKFcache captures enum value "kFcache" - NetappProtocolNetappProtocolKFcache string = "kFcache" - - // NetappProtocolNetappProtocolKHTTP captures enum value "kHttp" - NetappProtocolNetappProtocolKHTTP string = "kHttp" - - // NetappProtocolNetappProtocolKNdmp captures enum value "kNdmp" - NetappProtocolNetappProtocolKNdmp string = "kNdmp" - - // NetappProtocolNetappProtocolKManagement captures enum value "kManagement" - NetappProtocolNetappProtocolKManagement string = "kManagement" - - // NetappProtocolNetappProtocolKNvme captures enum value "kNvme" - NetappProtocolNetappProtocolKNvme string = "kNvme" -) - -// prop value enum -func (m *NetappProtocol) validateNetappProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappProtocolTypeNetappProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappProtocol) validateNetappProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NetappProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNetappProtocolEnum("netappProtocol", "body", m.NetappProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this netapp protocol based on context it is used -func (m *NetappProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappProtocol) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappProtocol) UnmarshalBinary(b []byte) error { - var res NetappProtocol - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_recover_file_and_folder_info.go b/v2/models/netapp_recover_file_and_folder_info.go deleted file mode 100644 index 5272182a..00000000 --- a/v2/models/netapp_recover_file_and_folder_info.go +++ /dev/null @@ -1,117 +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" -) - -// NetappRecoverFileAndFolderInfo Specifies the info about the netapp files and folders to be recovered. -// -// swagger:model NetappRecoverFileAndFolderInfo -type NetappRecoverFileAndFolderInfo struct { - CommonRecoverFileAndFolderInfo - - // Specifies the source inode number of the file being recovered. - InodeID *int64 `json:"inodeId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NetappRecoverFileAndFolderInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverFileAndFolderInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverFileAndFolderInfo = aO0 - - // AO1 - var dataAO1 struct { - InodeID *int64 `json:"inodeId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.InodeID = dataAO1.InodeID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NetappRecoverFileAndFolderInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverFileAndFolderInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - InodeID *int64 `json:"inodeId,omitempty"` - } - - dataAO1.InodeID = m.InodeID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this netapp recover file and folder info -func (m *NetappRecoverFileAndFolderInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverFileAndFolderInfo - if err := m.CommonRecoverFileAndFolderInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this netapp recover file and folder info based on the context it is used -func (m *NetappRecoverFileAndFolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverFileAndFolderInfo - if err := m.CommonRecoverFileAndFolderInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NetappRecoverFileAndFolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappRecoverFileAndFolderInfo) UnmarshalBinary(b []byte) error { - var res NetappRecoverFileAndFolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_registration_params.go b/v2/models/netapp_registration_params.go deleted file mode 100644 index 781892c1..00000000 --- a/v2/models/netapp_registration_params.go +++ /dev/null @@ -1,390 +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" -) - -// NetappRegistrationParams Netapp Protection Source. -// -// Specifies parameters to register an Netapp Source. -// -// swagger:model NetappRegistrationParams -type NetappRegistrationParams struct { - - // Specifies the Netapp source type. Can be either kCluster or kVServer (SVM). - // Required: true - // Enum: ["kCluster","kVServer"] - SourceType *string `json:"sourceType"` - - // Specifies the Hostname or IP Address Endpoint for the Netapp Source. - // Required: true - Endpoint *string `json:"endpoint"` - - // Specifies the credentials for an Netapp Source. - // Required: true - Credentials *Credentials `json:"credentials"` - - // Specifies whether or not to back up SMB Volumes. - BackUpSMBVolumes *bool `json:"backUpSMBVolumes,omitempty"` - - // Specifies the credentials for SMB Volumes. Must be specified if backUpSMBVolumes is set to true. - SmbCredentials *SmbMountCredentials `json:"smbCredentials,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies the source throttling parameters to be used during registration of the NAS source. - ThrottlingConfig *NasThrottlingConfig `json:"throttlingConfig,omitempty"` - - // Specifies if storage array snapshot is enabled or not in the Source. - StorageArraySnapshotEnabled *bool `json:"storageArraySnapshotEnabled,omitempty"` - - // Specifies the storage array snapshot management configuration. - StorageArraySnapshotConfig *StorageArraySnapshotConfig `json:"storageArraySnapshotConfig,omitempty"` -} - -// Validate validates this netapp registration params -func (m *NetappRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappRegistrationParamsTypeSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVServer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappRegistrationParamsTypeSourceTypePropEnum = append(netappRegistrationParamsTypeSourceTypePropEnum, v) - } -} - -const ( - - // NetappRegistrationParamsSourceTypeKCluster captures enum value "kCluster" - NetappRegistrationParamsSourceTypeKCluster string = "kCluster" - - // NetappRegistrationParamsSourceTypeKVServer captures enum value "kVServer" - NetappRegistrationParamsSourceTypeKVServer string = "kVServer" -) - -// prop value enum -func (m *NetappRegistrationParams) validateSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappRegistrationParamsTypeSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappRegistrationParams) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - // value enum - if err := m.validateSourceTypeEnum("sourceType", "body", *m.SourceType); err != nil { - return err - } - - return nil -} - -func (m *NetappRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -func (m *NetappRegistrationParams) validateCredentials(formats strfmt.Registry) error { - - if err := validate.Required("credentials", "body", m.Credentials); err != nil { - return err - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) validateSmbCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if m.SmbCredentials != nil { - if err := m.SmbCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) validateThrottlingConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if m.ThrottlingConfig != nil { - if err := m.ThrottlingConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) validateStorageArraySnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotConfig) { // not required - return nil - } - - if m.StorageArraySnapshotConfig != nil { - if err := m.StorageArraySnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this netapp registration params based on the context it is used -func (m *NetappRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetappRegistrationParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) contextValidateSmbCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbCredentials != nil { - - if swag.IsZero(m.SmbCredentials) { // not required - return nil - } - - if err := m.SmbCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbCredentials") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) contextValidateThrottlingConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingConfig != nil { - - if swag.IsZero(m.ThrottlingConfig) { // not required - return nil - } - - if err := m.ThrottlingConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingConfig") - } - return err - } - } - - return nil -} - -func (m *NetappRegistrationParams) contextValidateStorageArraySnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageArraySnapshotConfig != nil { - - if swag.IsZero(m.StorageArraySnapshotConfig) { // not required - return nil - } - - if err := m.StorageArraySnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetappRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappRegistrationParams) UnmarshalBinary(b []byte) error { - var res NetappRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_source_type.go b/v2/models/netapp_source_type.go deleted file mode 100644 index ad792bc1..00000000 --- a/v2/models/netapp_source_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappSourceType Netapp Source type. -// -// Netapp Source type. -// -// swagger:model NetappSourceType -type NetappSourceType struct { - - // Specifies Netapp Source type. - // Enum: ["kCluster","kVServer"] - NetappProtocol string `json:"netappProtocol,omitempty"` -} - -// Validate validates this netapp source type -func (m *NetappSourceType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetappProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var netappSourceTypeTypeNetappProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVServer"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappSourceTypeTypeNetappProtocolPropEnum = append(netappSourceTypeTypeNetappProtocolPropEnum, v) - } -} - -const ( - - // NetappSourceTypeNetappProtocolKCluster captures enum value "kCluster" - NetappSourceTypeNetappProtocolKCluster string = "kCluster" - - // NetappSourceTypeNetappProtocolKVServer captures enum value "kVServer" - NetappSourceTypeNetappProtocolKVServer string = "kVServer" -) - -// prop value enum -func (m *NetappSourceType) validateNetappProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappSourceTypeTypeNetappProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappSourceType) validateNetappProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NetappProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNetappProtocolEnum("netappProtocol", "body", m.NetappProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this netapp source type based on context it is used -func (m *NetappSourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappSourceType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappSourceType) UnmarshalBinary(b []byte) error { - var res NetappSourceType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/netapp_volume_extended_style.go b/v2/models/netapp_volume_extended_style.go deleted file mode 100644 index 2d268fb8..00000000 --- a/v2/models/netapp_volume_extended_style.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NetappVolumeExtendedStyle Netapp Volume Extended Style -// -// Specifies the Extended Styles in NetApp. -// -// swagger:model NetappVolumeExtendedStyle -type NetappVolumeExtendedStyle struct { - - // Specifies the list of Extended Styles in NetApp. - // Enum: ["kFlexVol","kFlexGroup"] - Value string `json:"value,omitempty"` -} - -// Validate validates this netapp volume extended style -func (m *NetappVolumeExtendedStyle) 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 netappVolumeExtendedStyleTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFlexVol","kFlexGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - netappVolumeExtendedStyleTypeValuePropEnum = append(netappVolumeExtendedStyleTypeValuePropEnum, v) - } -} - -const ( - - // NetappVolumeExtendedStyleValueKFlexVol captures enum value "kFlexVol" - NetappVolumeExtendedStyleValueKFlexVol string = "kFlexVol" - - // NetappVolumeExtendedStyleValueKFlexGroup captures enum value "kFlexGroup" - NetappVolumeExtendedStyleValueKFlexGroup string = "kFlexGroup" -) - -// prop value enum -func (m *NetappVolumeExtendedStyle) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, netappVolumeExtendedStyleTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetappVolumeExtendedStyle) 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 netapp volume extended style based on context it is used -func (m *NetappVolumeExtendedStyle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetappVolumeExtendedStyle) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetappVolumeExtendedStyle) UnmarshalBinary(b []byte) error { - var res NetappVolumeExtendedStyle - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/network_connection_info.go b/v2/models/network_connection_info.go deleted file mode 100644 index 8e53096e..00000000 --- a/v2/models/network_connection_info.go +++ /dev/null @@ -1,61 +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" -) - -// NetworkConnectionInfo Network Connection. -// -// Specify the network connection information. -// -// swagger:model NetworkConnectionInfo -type NetworkConnectionInfo struct { - - // Specifies the domain name of the network connection. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the network Gateway of the network connection. - NetworkGateway *string `json:"networkGateway,omitempty"` - - // Specifies the DNS Server of the network connection. - DNS *string `json:"dns,omitempty"` - - // Specifies the NTP Server of the network connection. - Ntp *string `json:"ntp,omitempty"` -} - -// Validate validates this network connection info -func (m *NetworkConnectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this network connection info based on context it is used -func (m *NetworkConnectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkConnectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkConnectionInfo) UnmarshalBinary(b []byte) error { - var res NetworkConnectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/network_interface.go b/v2/models/network_interface.go deleted file mode 100644 index ae5ab254..00000000 --- a/v2/models/network_interface.go +++ /dev/null @@ -1,341 +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" -) - -// NetworkInterface Network Interface -// -// Specifies the parameters of a network interface. -// -// swagger:model NetworkInterface -type NetworkInterface struct { - - // Specifies the name of the network interface. - Name *string `json:"name,omitempty"` - - // Specifies the type of the network interface. - // Enum: ["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"] - Type *string `json:"type,omitempty"` - - // Specifies the static IP of the network interface. - StaticIP *string `json:"staticIP,omitempty"` - - // Specifies the virtual IP of the network interface. - VirtualIP *string `json:"virtualIP,omitempty"` - - // Specifies the gateway of the network interface. - Gateway *string `json:"gateway,omitempty"` - - // Specifies the MTU of the network interface. - Mtu *int32 `json:"mtu,omitempty"` - - // Specifies the subnet of the network interface. - Subnet *string `json:"subnet,omitempty"` - - // Specifies whether or not the interface is up. - IsUp *bool `json:"isUp,omitempty"` - - // Specifies the group to which this interface belongs. - Group *string `json:"group,omitempty"` - - // Specifies the interface role. - // Enum: ["Primary","Secondary","Undefined"] - Role *string `json:"role,omitempty"` - - // Specifies whether or not this interface is the default route. - DefaultRoute *bool `json:"defaultRoute,omitempty"` - - // Specifies the names of the bond slaves for this interface. - BondSlaveNames []string `json:"bondSlaveNames"` - - // Specifies the slots of the bond slaves for this interface. - BondSlaveSlots []string `json:"bondSlaveSlots"` - - // Specifies the bonding mode of this interface. - // Enum: ["ActiveBackup","802_3ad","BalanceAlb","Invalid"] - BondingMode *string `json:"bondingMode,omitempty"` - - // Specifies the MAC address of this interface. - MacAddress *string `json:"macAddress,omitempty"` - - // Specifies whether or not this interface is connected. - IsConnected *bool `json:"isConnected,omitempty"` - - // Specifies the speed of this interface. - // Enum: ["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"] - Speed *string `json:"speed,omitempty"` -} - -// Validate validates this network interface -func (m *NetworkInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBondingMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpeed(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var networkInterfaceTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkInterfaceTypeTypePropEnum = append(networkInterfaceTypeTypePropEnum, v) - } -} - -const ( - - // NetworkInterfaceTypePhysical captures enum value "Physical" - NetworkInterfaceTypePhysical string = "Physical" - - // NetworkInterfaceTypeBond captures enum value "Bond" - NetworkInterfaceTypeBond string = "Bond" - - // NetworkInterfaceTypeBridge captures enum value "Bridge" - NetworkInterfaceTypeBridge string = "Bridge" - - // NetworkInterfaceTypeGroup captures enum value "Group" - NetworkInterfaceTypeGroup string = "Group" - - // NetworkInterfaceTypeVlan captures enum value "Vlan" - NetworkInterfaceTypeVlan string = "Vlan" - - // NetworkInterfaceTypeVlanPhysical captures enum value "VlanPhysical" - NetworkInterfaceTypeVlanPhysical string = "VlanPhysical" - - // NetworkInterfaceTypeVlanBond captures enum value "VlanBond" - NetworkInterfaceTypeVlanBond string = "VlanBond" - - // NetworkInterfaceTypeVlanGroup captures enum value "VlanGroup" - NetworkInterfaceTypeVlanGroup string = "VlanGroup" - - // NetworkInterfaceTypeVlanBridge captures enum value "VlanBridge" - NetworkInterfaceTypeVlanBridge string = "VlanBridge" - - // NetworkInterfaceTypeInvalid captures enum value "Invalid" - NetworkInterfaceTypeInvalid string = "Invalid" -) - -// prop value enum -func (m *NetworkInterface) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkInterfaceTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkInterface) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var networkInterfaceTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Primary","Secondary","Undefined"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkInterfaceTypeRolePropEnum = append(networkInterfaceTypeRolePropEnum, v) - } -} - -const ( - - // NetworkInterfaceRolePrimary captures enum value "Primary" - NetworkInterfaceRolePrimary string = "Primary" - - // NetworkInterfaceRoleSecondary captures enum value "Secondary" - NetworkInterfaceRoleSecondary string = "Secondary" - - // NetworkInterfaceRoleUndefined captures enum value "Undefined" - NetworkInterfaceRoleUndefined string = "Undefined" -) - -// prop value enum -func (m *NetworkInterface) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkInterfaceTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkInterface) 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 -} - -var networkInterfaceTypeBondingModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ActiveBackup","802_3ad","BalanceAlb","Invalid"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkInterfaceTypeBondingModePropEnum = append(networkInterfaceTypeBondingModePropEnum, v) - } -} - -const ( - - // NetworkInterfaceBondingModeActiveBackup captures enum value "ActiveBackup" - NetworkInterfaceBondingModeActiveBackup string = "ActiveBackup" - - // NetworkInterfaceBondingModeNr8023ad captures enum value "802_3ad" - NetworkInterfaceBondingModeNr8023ad string = "802_3ad" - - // NetworkInterfaceBondingModeBalanceAlb captures enum value "BalanceAlb" - NetworkInterfaceBondingModeBalanceAlb string = "BalanceAlb" - - // NetworkInterfaceBondingModeInvalid captures enum value "Invalid" - NetworkInterfaceBondingModeInvalid string = "Invalid" -) - -// prop value enum -func (m *NetworkInterface) validateBondingModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkInterfaceTypeBondingModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkInterface) validateBondingMode(formats strfmt.Registry) error { - if swag.IsZero(m.BondingMode) { // not required - return nil - } - - // value enum - if err := m.validateBondingModeEnum("bondingMode", "body", *m.BondingMode); err != nil { - return err - } - - return nil -} - -var networkInterfaceTypeSpeedPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkInterfaceTypeSpeedPropEnum = append(networkInterfaceTypeSpeedPropEnum, v) - } -} - -const ( - - // NetworkInterfaceSpeedNr1Gbits captures enum value "1Gbit/s" - NetworkInterfaceSpeedNr1Gbits string = "1Gbit/s" - - // NetworkInterfaceSpeedNr10Gbits captures enum value "10Gbit/s" - NetworkInterfaceSpeedNr10Gbits string = "10Gbit/s" - - // NetworkInterfaceSpeedNr25Gbits captures enum value "25Gbit/s" - NetworkInterfaceSpeedNr25Gbits string = "25Gbit/s" - - // NetworkInterfaceSpeedNr40Gbits captures enum value "40Gbit/s" - NetworkInterfaceSpeedNr40Gbits string = "40Gbit/s" - - // NetworkInterfaceSpeedNr100Gbits captures enum value "100Gbit/s" - NetworkInterfaceSpeedNr100Gbits string = "100Gbit/s" - - // NetworkInterfaceSpeedUnknown captures enum value "Unknown" - NetworkInterfaceSpeedUnknown string = "Unknown" -) - -// prop value enum -func (m *NetworkInterface) validateSpeedEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkInterfaceTypeSpeedPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkInterface) validateSpeed(formats strfmt.Registry) error { - if swag.IsZero(m.Speed) { // not required - return nil - } - - // value enum - if err := m.validateSpeedEnum("speed", "body", *m.Speed); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this network interface based on context it is used -func (m *NetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkInterface) UnmarshalBinary(b []byte) error { - var res NetworkInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/network_interface_params.go b/v2/models/network_interface_params.go deleted file mode 100644 index 52e7ac6d..00000000 --- a/v2/models/network_interface_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NetworkInterfaceParams Network interfaces. -// -// swagger:model NetworkInterfaceParams -type NetworkInterfaceParams struct { - - // List of interfaces on each node. - NodeNetworkInterfaces []*NodeNetworkInterfaces `json:"nodeNetworkInterfaces"` -} - -// Validate validates this network interface params -func (m *NetworkInterfaceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeNetworkInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkInterfaceParams) validateNodeNetworkInterfaces(formats strfmt.Registry) error { - if swag.IsZero(m.NodeNetworkInterfaces) { // not required - return nil - } - - for i := 0; i < len(m.NodeNetworkInterfaces); i++ { - if swag.IsZero(m.NodeNetworkInterfaces[i]) { // not required - continue - } - - if m.NodeNetworkInterfaces[i] != nil { - if err := m.NodeNetworkInterfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeNetworkInterfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeNetworkInterfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this network interface params based on the context it is used -func (m *NetworkInterfaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeNetworkInterfaces(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NetworkInterfaceParams) contextValidateNodeNetworkInterfaces(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeNetworkInterfaces); i++ { - - if m.NodeNetworkInterfaces[i] != nil { - - if swag.IsZero(m.NodeNetworkInterfaces[i]) { // not required - return nil - } - - if err := m.NodeNetworkInterfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeNetworkInterfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeNetworkInterfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkInterfaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkInterfaceParams) UnmarshalBinary(b []byte) error { - var res NetworkInterfaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/network_interface_type.go b/v2/models/network_interface_type.go deleted file mode 100644 index 56c6c608..00000000 --- a/v2/models/network_interface_type.go +++ /dev/null @@ -1,131 +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" -) - -// NetworkInterfaceType Network Interface Type -// -// Type of a network interface. -// -// swagger:model NetworkInterfaceType -type NetworkInterfaceType struct { - - // Specifies the network interface type. - // Enum: ["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"] - NetworkInterfaceType string `json:"networkInterfaceType,omitempty"` -} - -// Validate validates this network interface type -func (m *NetworkInterfaceType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkInterfaceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var networkInterfaceTypeTypeNetworkInterfaceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Physical","Bond","Bridge","Group","Vlan","VlanPhysical","VlanBond","VlanGroup","VlanBridge","Invalid"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - networkInterfaceTypeTypeNetworkInterfaceTypePropEnum = append(networkInterfaceTypeTypeNetworkInterfaceTypePropEnum, v) - } -} - -const ( - - // NetworkInterfaceTypeNetworkInterfaceTypePhysical captures enum value "Physical" - NetworkInterfaceTypeNetworkInterfaceTypePhysical string = "Physical" - - // NetworkInterfaceTypeNetworkInterfaceTypeBond captures enum value "Bond" - NetworkInterfaceTypeNetworkInterfaceTypeBond string = "Bond" - - // NetworkInterfaceTypeNetworkInterfaceTypeBridge captures enum value "Bridge" - NetworkInterfaceTypeNetworkInterfaceTypeBridge string = "Bridge" - - // NetworkInterfaceTypeNetworkInterfaceTypeGroup captures enum value "Group" - NetworkInterfaceTypeNetworkInterfaceTypeGroup string = "Group" - - // NetworkInterfaceTypeNetworkInterfaceTypeVlan captures enum value "Vlan" - NetworkInterfaceTypeNetworkInterfaceTypeVlan string = "Vlan" - - // NetworkInterfaceTypeNetworkInterfaceTypeVlanPhysical captures enum value "VlanPhysical" - NetworkInterfaceTypeNetworkInterfaceTypeVlanPhysical string = "VlanPhysical" - - // NetworkInterfaceTypeNetworkInterfaceTypeVlanBond captures enum value "VlanBond" - NetworkInterfaceTypeNetworkInterfaceTypeVlanBond string = "VlanBond" - - // NetworkInterfaceTypeNetworkInterfaceTypeVlanGroup captures enum value "VlanGroup" - NetworkInterfaceTypeNetworkInterfaceTypeVlanGroup string = "VlanGroup" - - // NetworkInterfaceTypeNetworkInterfaceTypeVlanBridge captures enum value "VlanBridge" - NetworkInterfaceTypeNetworkInterfaceTypeVlanBridge string = "VlanBridge" - - // NetworkInterfaceTypeNetworkInterfaceTypeInvalid captures enum value "Invalid" - NetworkInterfaceTypeNetworkInterfaceTypeInvalid string = "Invalid" -) - -// prop value enum -func (m *NetworkInterfaceType) validateNetworkInterfaceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, networkInterfaceTypeTypeNetworkInterfaceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NetworkInterfaceType) validateNetworkInterfaceType(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkInterfaceType) { // not required - return nil - } - - // value enum - if err := m.validateNetworkInterfaceTypeEnum("networkInterfaceType", "body", m.NetworkInterfaceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this network interface type based on context it is used -func (m *NetworkInterfaceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NetworkInterfaceType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NetworkInterfaceType) UnmarshalBinary(b []byte) error { - var res NetworkInterfaceType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/new_group_param.go b/v2/models/new_group_param.go deleted file mode 100644 index 870d3d9f..00000000 --- a/v2/models/new_group_param.go +++ /dev/null @@ -1,105 +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" -) - -// NewGroupParam Specifies the parameters for using a new protection group. -// -// swagger:model NewGroupParam -type NewGroupParam struct { - - // Specifies the name of the new protection group. - // Required: true - Name *string `json:"name"` - - // Specifies the policy id of the new protection group. - // Required: true - PolicyID *string `json:"policyId"` - - // Specifies the storage domain id of the new protection group. - // Required: true - StorageDomainID *int64 `json:"storageDomainId"` -} - -// Validate validates this new group param -func (m *NewGroupParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicyID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NewGroupParam) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *NewGroupParam) validatePolicyID(formats strfmt.Registry) error { - - if err := validate.Required("policyId", "body", m.PolicyID); err != nil { - return err - } - - return nil -} - -func (m *NewGroupParam) validateStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this new group param based on context it is used -func (m *NewGroupParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NewGroupParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NewGroupParam) UnmarshalBinary(b []byte) error { - var res NewGroupParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/new_view_files_target_params.go b/v2/models/new_view_files_target_params.go deleted file mode 100644 index ab0539ba..00000000 --- a/v2/models/new_view_files_target_params.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewViewFilesTargetParams Recover To View Files Target Params. -// -// Specifies the params of the View recovery target. -// -// swagger:model NewViewFilesTargetParams -type NewViewFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this new view files target params -func (m *NewViewFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NewViewFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *NewViewFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this new view files target params based on the context it is used -func (m *NewViewFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NewViewFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NewViewFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NewViewFilesTargetParams) UnmarshalBinary(b []byte) error { - var res NewViewFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nfs_config.go b/v2/models/nfs_config.go deleted file mode 100644 index efab12d8..00000000 --- a/v2/models/nfs_config.go +++ /dev/null @@ -1,229 +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" -) - -// NfsConfig Specifies the NFS config settings for this View. -// -// swagger:model NfsConfig -type NfsConfig struct { - - // If set, it enables discovery of view for NFS. - EnableNfsViewDiscovery *bool `json:"enableNfsViewDiscovery,omitempty"` - - // If set, it enables NFS UNIX Authentication - EnableNfsUnixAuthentication *bool `json:"enableNfsUnixAuthentication,omitempty"` - - // If set, it enables NFS Kerberos Authentication - EnableNfsKerberosAuthentication *bool `json:"enableNfsKerberosAuthentication,omitempty"` - - // If set, it enables NFS Kerberos Integrity - EnableNfsKerberosIntegrity *bool `json:"enableNfsKerberosIntegrity,omitempty"` - - // If set, it enables NFS Kerberos Privacy - EnableNfsKerberosPrivacy *bool `json:"enableNfsKerberosPrivacy,omitempty"` - - // If set, it enables NFS weak cache consistency. - EnableNfsWcc *bool `json:"enableNfsWcc,omitempty"` - - // Specifies the NFS all squash config. - NfsAllSquash *NfsSquash `json:"nfsAllSquash,omitempty"` - - // Specifies the NFS root permission config of the view file system. - NfsRootPermissions *NfsRootPermissions `json:"nfsRootPermissions,omitempty"` - - // Specifies the NFS root squash config. - NfsRootSquash *NfsSquash `json:"nfsRootSquash,omitempty"` -} - -// Validate validates this nfs config -func (m *NfsConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsAllSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootPermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsRootSquash(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NfsConfig) validateNfsAllSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if m.NfsAllSquash != nil { - if err := m.NfsAllSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *NfsConfig) validateNfsRootPermissions(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if m.NfsRootPermissions != nil { - if err := m.NfsRootPermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *NfsConfig) validateNfsRootSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if m.NfsRootSquash != nil { - if err := m.NfsRootSquash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -// ContextValidate validate this nfs config based on the context it is used -func (m *NfsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNfsAllSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootPermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsRootSquash(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NfsConfig) contextValidateNfsAllSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsAllSquash != nil { - - if swag.IsZero(m.NfsAllSquash) { // not required - return nil - } - - if err := m.NfsAllSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsAllSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsAllSquash") - } - return err - } - } - - return nil -} - -func (m *NfsConfig) contextValidateNfsRootPermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootPermissions != nil { - - if swag.IsZero(m.NfsRootPermissions) { // not required - return nil - } - - if err := m.NfsRootPermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootPermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootPermissions") - } - return err - } - } - - return nil -} - -func (m *NfsConfig) contextValidateNfsRootSquash(ctx context.Context, formats strfmt.Registry) error { - - if m.NfsRootSquash != nil { - - if swag.IsZero(m.NfsRootSquash) { // not required - return nil - } - - if err := m.NfsRootSquash.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nfsRootSquash") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nfsRootSquash") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NfsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsConfig) UnmarshalBinary(b []byte) error { - var res NfsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nfs_protocol.go b/v2/models/nfs_protocol.go deleted file mode 100644 index 45ec7657..00000000 --- a/v2/models/nfs_protocol.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NfsProtocol NFS Protocol type. -// -// NFS Protocol type. -// -// swagger:model NfsProtocol -type NfsProtocol struct { - - // Specifies Nfs Protocol type. - // Enum: ["kNfs3","kNfs4_1"] - NfsProtocol string `json:"nfsProtocol,omitempty"` -} - -// Validate validates this nfs protocol -func (m *NfsProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nfsProtocolTypeNfsProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNfs3","kNfs4_1"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nfsProtocolTypeNfsProtocolPropEnum = append(nfsProtocolTypeNfsProtocolPropEnum, v) - } -} - -const ( - - // NfsProtocolNfsProtocolKNfs3 captures enum value "kNfs3" - NfsProtocolNfsProtocolKNfs3 string = "kNfs3" - - // NfsProtocolNfsProtocolKNfs41 captures enum value "kNfs4_1" - NfsProtocolNfsProtocolKNfs41 string = "kNfs4_1" -) - -// prop value enum -func (m *NfsProtocol) validateNfsProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nfsProtocolTypeNfsProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NfsProtocol) validateNfsProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.NfsProtocol) { // not required - return nil - } - - // value enum - if err := m.validateNfsProtocolEnum("nfsProtocol", "body", m.NfsProtocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nfs protocol based on context it is used -func (m *NfsProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsProtocol) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsProtocol) UnmarshalBinary(b []byte) error { - var res NfsProtocol - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nfs_root_permissions.go b/v2/models/nfs_root_permissions.go deleted file mode 100644 index fe6a9194..00000000 --- a/v2/models/nfs_root_permissions.go +++ /dev/null @@ -1,58 +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" -) - -// NfsRootPermissions NfsRootPermissions -// -// Specifies the config of NFS root permission of a view file system. -// -// swagger:model NfsRootPermissions -type NfsRootPermissions struct { - - // Unix GID for the root of the file system. - Gid *uint32 `json:"gid,omitempty"` - - // Unix mode bits for the root of the file system. - Mode *uint32 `json:"mode,omitempty"` - - // Unix UID for the root of the file system. - UID *uint32 `json:"uid,omitempty"` -} - -// Validate validates this nfs root permissions -func (m *NfsRootPermissions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs root permissions based on context it is used -func (m *NfsRootPermissions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsRootPermissions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsRootPermissions) UnmarshalBinary(b []byte) error { - var res NfsRootPermissions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nfs_squash.go b/v2/models/nfs_squash.go deleted file mode 100644 index b50c50c7..00000000 --- a/v2/models/nfs_squash.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" -) - -// NfsSquash NfsSquash specifies the squash config for client subnet whitelist. -// -// swagger:model NfsSquash -type NfsSquash struct { - - // GID mapped for all clients. - Gid *uint32 `json:"gid,omitempty"` - - // UID mapped for all clients. - UID *uint32 `json:"uid,omitempty"` -} - -// Validate validates this nfs squash -func (m *NfsSquash) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this nfs squash based on context it is used -func (m *NfsSquash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NfsSquash) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NfsSquash) UnmarshalBinary(b []byte) error { - var res NfsSquash - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nic_speed_type.go b/v2/models/nic_speed_type.go deleted file mode 100644 index dbcb5a74..00000000 --- a/v2/models/nic_speed_type.go +++ /dev/null @@ -1,119 +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" -) - -// NicSpeedType NIC Speed Type -// -// Speed of a network interface. -// -// swagger:model NicSpeedType -type NicSpeedType struct { - - // Specifies the network interface speed. - // Enum: ["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"] - NicSpeedType string `json:"nicSpeedType,omitempty"` -} - -// Validate validates this nic speed type -func (m *NicSpeedType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNicSpeedType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nicSpeedTypeTypeNicSpeedTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["1Gbit/s","10Gbit/s","25Gbit/s","40Gbit/s","100Gbit/s","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nicSpeedTypeTypeNicSpeedTypePropEnum = append(nicSpeedTypeTypeNicSpeedTypePropEnum, v) - } -} - -const ( - - // NicSpeedTypeNicSpeedTypeNr1Gbits captures enum value "1Gbit/s" - NicSpeedTypeNicSpeedTypeNr1Gbits string = "1Gbit/s" - - // NicSpeedTypeNicSpeedTypeNr10Gbits captures enum value "10Gbit/s" - NicSpeedTypeNicSpeedTypeNr10Gbits string = "10Gbit/s" - - // NicSpeedTypeNicSpeedTypeNr25Gbits captures enum value "25Gbit/s" - NicSpeedTypeNicSpeedTypeNr25Gbits string = "25Gbit/s" - - // NicSpeedTypeNicSpeedTypeNr40Gbits captures enum value "40Gbit/s" - NicSpeedTypeNicSpeedTypeNr40Gbits string = "40Gbit/s" - - // NicSpeedTypeNicSpeedTypeNr100Gbits captures enum value "100Gbit/s" - NicSpeedTypeNicSpeedTypeNr100Gbits string = "100Gbit/s" - - // NicSpeedTypeNicSpeedTypeUnknown captures enum value "Unknown" - NicSpeedTypeNicSpeedTypeUnknown string = "Unknown" -) - -// prop value enum -func (m *NicSpeedType) validateNicSpeedTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nicSpeedTypeTypeNicSpeedTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NicSpeedType) validateNicSpeedType(formats strfmt.Registry) error { - if swag.IsZero(m.NicSpeedType) { // not required - return nil - } - - // value enum - if err := m.validateNicSpeedTypeEnum("nicSpeedType", "body", m.NicSpeedType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nic speed type based on context it is used -func (m *NicSpeedType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NicSpeedType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NicSpeedType) UnmarshalBinary(b []byte) error { - var res NicSpeedType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nimble_protection_group_object_params.go b/v2/models/nimble_protection_group_object_params.go deleted file mode 100644 index c262fb1d..00000000 --- a/v2/models/nimble_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// NimbleProtectionGroupObjectParams Nimble Protection Group Object Params. -// -// Specifies the object parameters to create Nimble Protection Group. -// -// swagger:model NimbleProtectionGroupObjectParams -type NimbleProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this nimble protection group object params -func (m *NimbleProtectionGroupObjectParams) 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 *NimbleProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this nimble protection group object params based on the context it is used -func (m *NimbleProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NimbleProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NimbleProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NimbleProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res NimbleProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nimble_protection_group_params.go b/v2/models/nimble_protection_group_params.go deleted file mode 100644 index 3a07c4ae..00000000 --- a/v2/models/nimble_protection_group_params.go +++ /dev/null @@ -1,170 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NimbleProtectionGroupParams Specifies the parameters which are specific to Nimble related Protection Groups. -// -// swagger:model NimbleProtectionGroupParams -type NimbleProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*NimbleProtectionGroupObjectParams `json:"objects"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this nimble protection group params -func (m *NimbleProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NimbleProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nimble protection group params based on the context it is used -func (m *NimbleProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NimbleProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NimbleProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *NimbleProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NimbleProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NimbleProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res NimbleProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nis_netgroup.go b/v2/models/nis_netgroup.go deleted file mode 100644 index 67ef72f4..00000000 --- a/v2/models/nis_netgroup.go +++ /dev/null @@ -1,201 +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" -) - -// NisNetgroup Specifies an NIS netgroup. -// -// swagger:model NisNetgroup -type NisNetgroup struct { - - // Specifies the netgroup name. - // Required: true - Name *string `json:"name"` - - // Specifies the domain name for the netgroup. - // Required: true - Domain *string `json:"domain"` - - // Specifies NFS protocol acess level for clients from the netgroup. - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - NfsAccess *string `json:"nfsAccess,omitempty"` - - // Specifies which nfsSquash Mounted. - // 'kNone' mounts none. - // 'kRootSquash' mounts nfsRootSquash. Whether clients from this subnet can - // mount as root on NFS. - // 'kAllSquash' mounts nfsAllSquash. Whether all clients from this subnet can - // map view with view_all_squash_uid/view_all_squash_gid configured in - // the view. - // Enum: ["kNone","kRootSquash","kAllSquash"] - NfsSquash *string `json:"nfsSquash,omitempty"` -} - -// Validate validates this nis netgroup -func (m *NisNetgroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsSquash(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisNetgroup) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *NisNetgroup) validateDomain(formats strfmt.Registry) error { - - if err := validate.Required("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -var nisNetgroupTypeNfsAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nisNetgroupTypeNfsAccessPropEnum = append(nisNetgroupTypeNfsAccessPropEnum, v) - } -} - -const ( - - // NisNetgroupNfsAccessKDisabled captures enum value "kDisabled" - NisNetgroupNfsAccessKDisabled string = "kDisabled" - - // NisNetgroupNfsAccessKReadOnly captures enum value "kReadOnly" - NisNetgroupNfsAccessKReadOnly string = "kReadOnly" - - // NisNetgroupNfsAccessKReadWrite captures enum value "kReadWrite" - NisNetgroupNfsAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *NisNetgroup) validateNfsAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nisNetgroupTypeNfsAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NisNetgroup) validateNfsAccess(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAccess) { // not required - return nil - } - - // value enum - if err := m.validateNfsAccessEnum("nfsAccess", "body", *m.NfsAccess); err != nil { - return err - } - - return nil -} - -var nisNetgroupTypeNfsSquashPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kRootSquash","kAllSquash"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nisNetgroupTypeNfsSquashPropEnum = append(nisNetgroupTypeNfsSquashPropEnum, v) - } -} - -const ( - - // NisNetgroupNfsSquashKNone captures enum value "kNone" - NisNetgroupNfsSquashKNone string = "kNone" - - // NisNetgroupNfsSquashKRootSquash captures enum value "kRootSquash" - NisNetgroupNfsSquashKRootSquash string = "kRootSquash" - - // NisNetgroupNfsSquashKAllSquash captures enum value "kAllSquash" - NisNetgroupNfsSquashKAllSquash string = "kAllSquash" -) - -// prop value enum -func (m *NisNetgroup) validateNfsSquashEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nisNetgroupTypeNfsSquashPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NisNetgroup) validateNfsSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsSquash) { // not required - return nil - } - - // value enum - if err := m.validateNfsSquashEnum("nfsSquash", "body", *m.NfsSquash); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nis netgroup based on context it is used -func (m *NisNetgroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NisNetgroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NisNetgroup) UnmarshalBinary(b []byte) error { - var res NisNetgroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nis_netgroups.go b/v2/models/nis_netgroups.go deleted file mode 100644 index c4bf480b..00000000 --- a/v2/models/nis_netgroups.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NisNetgroups Response of NIS Netgroups. -// -// swagger:model NisNetgroups -type NisNetgroups struct { - - // A list of NIS Netgroups. - NisNetgroups []*NisNetgroup `json:"nisNetgroups"` -} - -// Validate validates this nis netgroups -func (m *NisNetgroups) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNisNetgroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisNetgroups) validateNisNetgroups(formats strfmt.Registry) error { - if swag.IsZero(m.NisNetgroups) { // not required - return nil - } - - for i := 0; i < len(m.NisNetgroups); i++ { - if swag.IsZero(m.NisNetgroups[i]) { // not required - continue - } - - if m.NisNetgroups[i] != nil { - if err := m.NisNetgroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisNetgroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisNetgroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nis netgroups based on the context it is used -func (m *NisNetgroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNisNetgroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisNetgroups) contextValidateNisNetgroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NisNetgroups); i++ { - - if m.NisNetgroups[i] != nil { - - if swag.IsZero(m.NisNetgroups[i]) { // not required - return nil - } - - if err := m.NisNetgroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisNetgroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisNetgroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NisNetgroups) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NisNetgroups) UnmarshalBinary(b []byte) error { - var res NisNetgroups - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nis_provider.go b/v2/models/nis_provider.go deleted file mode 100644 index a6f13567..00000000 --- a/v2/models/nis_provider.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" - "github.com/go-openapi/validate" -) - -// NisProvider Specifies an NIS Provider. -// -// swagger:model NisProvider -type NisProvider struct { - - // Specifies the Domain Name of NIS Provider. - // Required: true - Domain *string `json:"domain"` - - // Specifies the hostname of Master Server. - // Required: true - MasterServerHostname *string `json:"masterServerHostname"` - - // Specifies a list of slave servers in the NIS Domain. - SlaveServers []string `json:"slaveServers"` - - // Specifies the list of tenant Ids for NIS Provider. - TenantIds []string `json:"tenantIds"` -} - -// Validate validates this nis provider -func (m *NisProvider) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomain(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMasterServerHostname(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisProvider) validateDomain(formats strfmt.Registry) error { - - if err := validate.Required("domain", "body", m.Domain); err != nil { - return err - } - - return nil -} - -func (m *NisProvider) validateMasterServerHostname(formats strfmt.Registry) error { - - if err := validate.Required("masterServerHostname", "body", m.MasterServerHostname); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this nis provider based on context it is used -func (m *NisProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NisProvider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NisProvider) UnmarshalBinary(b []byte) error { - var res NisProvider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nis_providers.go b/v2/models/nis_providers.go deleted file mode 100644 index 05d2764a..00000000 --- a/v2/models/nis_providers.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NisProviders Response of NIS Providers. -// -// swagger:model NisProviders -type NisProviders struct { - - // A list of NIS Providers. - NisProviders []*NisProvider `json:"nisProviders"` -} - -// Validate validates this nis providers -func (m *NisProviders) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNisProviders(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisProviders) validateNisProviders(formats strfmt.Registry) error { - if swag.IsZero(m.NisProviders) { // not required - return nil - } - - for i := 0; i < len(m.NisProviders); i++ { - if swag.IsZero(m.NisProviders[i]) { // not required - continue - } - - if m.NisProviders[i] != nil { - if err := m.NisProviders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nis providers based on the context it is used -func (m *NisProviders) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNisProviders(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NisProviders) contextValidateNisProviders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NisProviders); i++ { - - if m.NisProviders[i] != nil { - - if swag.IsZero(m.NisProviders[i]) { // not required - return nil - } - - if err := m.NisProviders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisProviders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisProviders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NisProviders) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NisProviders) UnmarshalBinary(b []byte) error { - var res NisProviders - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/nlm_lock.go b/v2/models/nlm_lock.go deleted file mode 100644 index c30801a7..00000000 --- a/v2/models/nlm_lock.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NlmLock Specifies a NLM lock. -// -// swagger:model NlmLock -type NlmLock struct { - - // Specifies the client ID. - ClientID *string `json:"clientId,omitempty"` - - // Specifies the list of lock ranges. - LockRanges []*LockRange `json:"lockRanges"` -} - -// Validate validates this nlm lock -func (m *NlmLock) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NlmLock) validateLockRanges(formats strfmt.Registry) error { - if swag.IsZero(m.LockRanges) { // not required - return nil - } - - for i := 0; i < len(m.LockRanges); i++ { - if swag.IsZero(m.LockRanges[i]) { // not required - continue - } - - if m.LockRanges[i] != nil { - if err := m.LockRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this nlm lock based on the context it is used -func (m *NlmLock) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLockRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NlmLock) contextValidateLockRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LockRanges); i++ { - - if m.LockRanges[i] != nil { - - if swag.IsZero(m.LockRanges[i]) { // not required - return nil - } - - if err := m.LockRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lockRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NlmLock) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NlmLock) UnmarshalBinary(b []byte) error { - var res NlmLock - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/no_content.go b/v2/models/no_content.go deleted file mode 100644 index 5c45e7b1..00000000 --- a/v2/models/no_content.go +++ /dev/null @@ -1,11 +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 - -// NoContent No Content -// -// swagger:model NoContent -type NoContent interface{} diff --git a/v2/models/no_sql_object_property.go b/v2/models/no_sql_object_property.go deleted file mode 100644 index 68b3506c..00000000 --- a/v2/models/no_sql_object_property.go +++ /dev/null @@ -1,88 +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" -) - -// NoSQLObjectProperty Specifies an Object property as a set of key-value pair for NoSQL objects. -// -// swagger:model NoSqlObjectProperty -type NoSQLObjectProperty struct { - - // Specifies the key of the property. - // Required: true - Key *string `json:"key"` - - // specifies the value of the property. - // Required: true - Value *string `json:"value"` -} - -// Validate validates this no Sql object property -func (m *NoSQLObjectProperty) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLObjectProperty) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *NoSQLObjectProperty) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this no Sql object property based on context it is used -func (m *NoSQLObjectProperty) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLObjectProperty) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLObjectProperty) UnmarshalBinary(b []byte) error { - var res NoSQLObjectProperty - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/no_sql_protection_group_object_params.go b/v2/models/no_sql_protection_group_object_params.go deleted file mode 100644 index 7b887795..00000000 --- a/v2/models/no_sql_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// NoSQLProtectionGroupObjectParams Specifies an object protected by a Protection Group. -// -// swagger:model NoSqlProtectionGroupObjectParams -type NoSQLProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this no Sql protection group object params -func (m *NoSQLProtectionGroupObjectParams) 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 *NoSQLProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this no Sql protection group object params based on the context it is used -func (m *NoSQLProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res NoSQLProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/no_sql_protection_group_params.go b/v2/models/no_sql_protection_group_params.go deleted file mode 100644 index 5f2d860a..00000000 --- a/v2/models/no_sql_protection_group_params.go +++ /dev/null @@ -1,211 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NoSQLProtectionGroupParams Specifies the source specific parameters for this Protection Group. -// -// swagger:model NoSqlProtectionGroupParams -type NoSQLProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Min Items: 1 - // Unique: true - Objects []*NoSQLProtectionGroupObjectParams `json:"objects"` - - // Specifies the maximum number of concurrent IO Streams that will be created to exchange data with the cluster. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum network bandwidth that each concurrent IO Stream can use for exchanging data with the cluster. - BandwidthMBPS *int64 `json:"bandwidthMBPS,omitempty"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Object ID of the Source on which this protection was run . - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the Source on which this protection was run. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // The user specified name for the Source on which this protection was run. - // Read Only: true - CustomSourceName *string `json:"customSourceName,omitempty"` -} - -// Validate validates this no Sql protection group params -func (m *NoSQLProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this no Sql protection group params based on the context it is used -func (m *NoSQLProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NoSQLProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NoSQLProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *NoSQLProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *NoSQLProtectionGroupParams) contextValidateCustomSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "customSourceName", "body", m.CustomSourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NoSQLProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NoSQLProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res NoSQLProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node.go b/v2/models/node.go deleted file mode 100644 index c214ed61..00000000 --- a/v2/models/node.go +++ /dev/null @@ -1,721 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Node Node. -// -// Node information of a cluster. -// -// swagger:model Node -type Node struct { - - // CapacityByTier describes the capacity of each storage tier. - CapacityByTier []*CapacityByTier `json:"capacityByTier"` - - // ChassisInfo describes the information for the chassis of the node. - ChassisInfo *ChassisInfo `json:"chassisInfo,omitempty"` - - // ClusterPartitionId is the Id of the cluster partition to which the Node belongs. - ClusterPartitionID *int64 `json:"clusterPartitionId,omitempty"` - - // ClusterPartitionName is the name of the cluster to which the Node belongs. - ClusterPartitionName *string `json:"clusterPartitionName,omitempty"` - - // Cohesity Node Serial Number of the Node. - CohesityNodeSerial *string `json:"cohesityNodeSerial,omitempty"` - - // DiskCountByTier describes the disk number of each storage tier. - DiskCountByTier []*CountByTier `json:"diskCountByTier"` - - // Id is the Id of the Node. - ID *int64 `json:"id,omitempty"` - - // Ip is the IP address of the Node. - IP *string `json:"ip,omitempty"` - - // Whether node is app node. - IsAppNode *bool `json:"isAppNode,omitempty"` - - // IsMarkedForRemoval specifies whether the node has been marked for - // removal. - IsMarkedForRemoval *bool `json:"isMarkedForRemoval,omitempty"` - - // MaxPhysicalCapacityBytes specifies the maximum physical capacity of the - // node in bytes. - MaxPhysicalCapacityBytes *int64 `json:"maxPhysicalCapacityBytes,omitempty"` - - // HardwareInfo describes the hardware of the node. - NodeHardwareInfo *NodeHardwareInfo `json:"nodeHardwareInfo,omitempty"` - - // NodeIncarnationId is the incarnation id of this node. The incarnation - // id is changed every time the data is wiped from the node. Various - // services on a node is only run if incarnation id of the node matches the - // incarnation id of the cluster. Whenever a mismatch is detected, Nexus - // will stop all services and clean the data from the node. After clean - // operation is completed, Nexus will set the node incarnation id to - // cluster incarnation id and start the services. - NodeIncarnationID *int64 `json:"nodeIncarnationId,omitempty"` - - // NodeSoftwareVersion is the current version of Cohesity software installed - // on a node. - NodeSoftwareVersion *string `json:"nodeSoftwareVersion,omitempty"` - - // Node type: StorageNode, AllFlashNode, RoboNode, AppNode, etc. - NodeType *string `json:"nodeType,omitempty"` - - // OfflineDiskCount is the number of offline disks in a node. - OfflineDiskCount *int64 `json:"offlineDiskCount,omitempty"` - - // OfflineMountPathsOfDisks provides the corresponding mount paths for - // direct attached disks that are currently offline - access to these were - // detected to hang sometime in the past. After these disks have been fixed, - // their mount paths needs to be removed from the following list before - // these will be accessed again. - OfflineMountPathsOfDisks []string `json:"offlineMountPathsOfDisks"` - - // Specifies the product model of the node. - ProductModel *string `json:"productModel,omitempty"` - - // Specifies the hardware model of the node. - HardwareModel *string `json:"hardwareModel,omitempty"` - - // Specifies the vendor model of the node - Vendor *string `json:"vendor,omitempty"` - - // RemovalReason specifies the removal reason of the node. - // 'kAutoHealthCheck' means the entity health is bad. - // 'kUserGracefulRemoval' means user initiated a graceful removal. - // 'kUserAvoidAccess' means user initiated a mark offline. - // 'kUserGracefulNodeRemoval' mean users initiated graceful node removal. - // 'kUserRemoveDownNode' mean user initiated graceful removal of down node. - // 'kBridgeDataUnavailable' Bridge requested a graceful removal of a disk when it is not available. - RemovalReason []string `json:"removalReason"` - - // RemovalState specifies the removal state of the node. - // 'kDontRemove' means the state of object is functional and - // it is not being removed. - // 'kMarkedForRemoval' means the object is being removed. - // 'kOkToRemove' means the object has been removed on the Cohesity Cluster and - // if the object is physical, it can be removed from the Cohesity Cluster. - // Enum: ["DontRemove","MarkedForRemoval","OkToRemove"] - RemovalState *string `json:"removalState,omitempty"` - - // Slot number occupied by this node within the chassis. - SlotNumber *uint32 `json:"slotNumber,omitempty"` - - // Specifies the hostname of the node. - HostName *string `json:"hostName,omitempty"` - - // Stats describes the node stats. - Stats *NodeStats `json:"stats,omitempty"` - - // SystemDisk describes the node system disks. - SystemDisks []*NodeSystemDiskInfo `json:"systemDisks"` - - // Specifies the services that are not ACKed after node is marked for removal. - ServicesNotAcked *string `json:"servicesNotAcked,omitempty"` - - // Specifies the services not ACKed yet for removal of this entity. - ServicesNotAckedList []string `json:"servicesNotAckedList"` - - // Specifies the services already ACKed for removal of this entity. - ServicesAckedList []string `json:"servicesAckedList"` - - // Specifies the overall progress percentage in removing the Node. - ProgressPercentage *int32 `json:"progressPercentage,omitempty"` - - // Specifies the total duration in seconds left to remove the Node. - TimeRemaining *int64 `json:"timeRemaining,omitempty"` - - // Specifies the removal progress details for services that are not acked yet. - RemovalProgressList []*ComponentRemovalProgress `json:"removalProgressList"` - - // Specifies the Unix epoch timestamp (in seconds) when the Node was marked for removal. - RemovalTimestampSecs *int64 `json:"removalTimestampSecs,omitempty"` - - // Specifies the last run time of the pre-checks execution in Unix epoch timestamp (in seconds). - PrecheckTimestampSecs *int64 `json:"precheckTimestampSecs,omitempty"` - - // Specifies the pre-check validations results. - ValidationChecks []*PreCheckValidation `json:"validationChecks"` -} - -// Validate validates this node -func (m *Node) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCapacityByTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChassisInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskCountByTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeHardwareInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemovalProgressList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Node) validateCapacityByTier(formats strfmt.Registry) error { - if swag.IsZero(m.CapacityByTier) { // not required - return nil - } - - for i := 0; i < len(m.CapacityByTier); i++ { - if swag.IsZero(m.CapacityByTier[i]) { // not required - continue - } - - if m.CapacityByTier[i] != nil { - if err := m.CapacityByTier[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateChassisInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ChassisInfo) { // not required - return nil - } - - if m.ChassisInfo != nil { - if err := m.ChassisInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisInfo") - } - return err - } - } - - return nil -} - -func (m *Node) validateDiskCountByTier(formats strfmt.Registry) error { - if swag.IsZero(m.DiskCountByTier) { // not required - return nil - } - - for i := 0; i < len(m.DiskCountByTier); i++ { - if swag.IsZero(m.DiskCountByTier[i]) { // not required - continue - } - - if m.DiskCountByTier[i] != nil { - if err := m.DiskCountByTier[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateNodeHardwareInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NodeHardwareInfo) { // not required - return nil - } - - if m.NodeHardwareInfo != nil { - if err := m.NodeHardwareInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeHardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeHardwareInfo") - } - return err - } - } - - return nil -} - -var nodeRemovalReasonItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Unknown","AutoHealthCheck","UserGracefulRemoval","UserAvoidAccess","UserGracefulNodeRemoval","UserRemoveDownNode","BridgeDataUnavailable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeRemovalReasonItemsEnum = append(nodeRemovalReasonItemsEnum, v) - } -} - -func (m *Node) validateRemovalReasonItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeRemovalReasonItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *Node) validateRemovalReason(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalReason) { // not required - return nil - } - - for i := 0; i < len(m.RemovalReason); i++ { - - // value enum - if err := m.validateRemovalReasonItemsEnum("removalReason"+"."+strconv.Itoa(i), "body", m.RemovalReason[i]); err != nil { - return err - } - - } - - return nil -} - -var nodeTypeRemovalStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DontRemove","MarkedForRemoval","OkToRemove"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeTypeRemovalStatePropEnum = append(nodeTypeRemovalStatePropEnum, v) - } -} - -const ( - - // NodeRemovalStateDontRemove captures enum value "DontRemove" - NodeRemovalStateDontRemove string = "DontRemove" - - // NodeRemovalStateMarkedForRemoval captures enum value "MarkedForRemoval" - NodeRemovalStateMarkedForRemoval string = "MarkedForRemoval" - - // NodeRemovalStateOkToRemove captures enum value "OkToRemove" - NodeRemovalStateOkToRemove string = "OkToRemove" -) - -// prop value enum -func (m *Node) validateRemovalStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeTypeRemovalStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Node) validateRemovalState(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalState) { // not required - return nil - } - - // value enum - if err := m.validateRemovalStateEnum("removalState", "body", *m.RemovalState); err != nil { - return err - } - - return nil -} - -func (m *Node) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *Node) validateSystemDisks(formats strfmt.Registry) error { - if swag.IsZero(m.SystemDisks) { // not required - return nil - } - - for i := 0; i < len(m.SystemDisks); i++ { - if swag.IsZero(m.SystemDisks[i]) { // not required - continue - } - - if m.SystemDisks[i] != nil { - if err := m.SystemDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateRemovalProgressList(formats strfmt.Registry) error { - if swag.IsZero(m.RemovalProgressList) { // not required - return nil - } - - for i := 0; i < len(m.RemovalProgressList); i++ { - if swag.IsZero(m.RemovalProgressList[i]) { // not required - continue - } - - if m.RemovalProgressList[i] != nil { - if err := m.RemovalProgressList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node based on the context it is used -func (m *Node) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCapacityByTier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChassisInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiskCountByTier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodeHardwareInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemovalProgressList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Node) contextValidateCapacityByTier(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CapacityByTier); i++ { - - if m.CapacityByTier[i] != nil { - - if swag.IsZero(m.CapacityByTier[i]) { // not required - return nil - } - - if err := m.CapacityByTier[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("capacityByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateChassisInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ChassisInfo != nil { - - if swag.IsZero(m.ChassisInfo) { // not required - return nil - } - - if err := m.ChassisInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisInfo") - } - return err - } - } - - return nil -} - -func (m *Node) contextValidateDiskCountByTier(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DiskCountByTier); i++ { - - if m.DiskCountByTier[i] != nil { - - if swag.IsZero(m.DiskCountByTier[i]) { // not required - return nil - } - - if err := m.DiskCountByTier[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("diskCountByTier" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateNodeHardwareInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NodeHardwareInfo != nil { - - if swag.IsZero(m.NodeHardwareInfo) { // not required - return nil - } - - if err := m.NodeHardwareInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeHardwareInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeHardwareInfo") - } - return err - } - } - - return nil -} - -func (m *Node) 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 -} - -func (m *Node) contextValidateSystemDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SystemDisks); i++ { - - if m.SystemDisks[i] != nil { - - if swag.IsZero(m.SystemDisks[i]) { // not required - return nil - } - - if err := m.SystemDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateRemovalProgressList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemovalProgressList); i++ { - - if m.RemovalProgressList[i] != nil { - - if swag.IsZero(m.RemovalProgressList[i]) { // not required - return nil - } - - if err := m.RemovalProgressList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("removalProgressList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Node) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Node) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Node) UnmarshalBinary(b []byte) error { - var res Node - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_bond_interface_params.go b/v2/models/node_bond_interface_params.go deleted file mode 100644 index 74790faa..00000000 --- a/v2/models/node_bond_interface_params.go +++ /dev/null @@ -1,184 +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" -) - -// NodeBondInterfaceParams Bond interface parameters. -// -// swagger:model NodeBondInterfaceParams -type NodeBondInterfaceParams struct { - UpdateNodeBondInterfaceParams - - // Name of the bond interface. - // Required: true - Name *string `json:"name"` - - // Bonding mode of the interface. - // Required: true - // Enum: ["ActiveBackup","802_3ad"] - BondingMode *string `json:"bondingMode"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NodeBondInterfaceParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateNodeBondInterfaceParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateNodeBondInterfaceParams = aO0 - - // AO1 - var dataAO1 struct { - Name *string `json:"name"` - - BondingMode *string `json:"bondingMode"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Name = dataAO1.Name - - m.BondingMode = dataAO1.BondingMode - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NodeBondInterfaceParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UpdateNodeBondInterfaceParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Name *string `json:"name"` - - BondingMode *string `json:"bondingMode"` - } - - dataAO1.Name = m.Name - - dataAO1.BondingMode = m.BondingMode - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this node bond interface params -func (m *NodeBondInterfaceParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateNodeBondInterfaceParams - if err := m.UpdateNodeBondInterfaceParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBondingMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeBondInterfaceParams) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var nodeBondInterfaceParamsTypeBondingModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ActiveBackup","802_3ad"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodeBondInterfaceParamsTypeBondingModePropEnum = append(nodeBondInterfaceParamsTypeBondingModePropEnum, v) - } -} - -// property enum -func (m *NodeBondInterfaceParams) validateBondingModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodeBondInterfaceParamsTypeBondingModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NodeBondInterfaceParams) validateBondingMode(formats strfmt.Registry) error { - - if err := validate.Required("bondingMode", "body", m.BondingMode); err != nil { - return err - } - - // value enum - if err := m.validateBondingModeEnum("bondingMode", "body", *m.BondingMode); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this node bond interface params based on the context it is used -func (m *NodeBondInterfaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateNodeBondInterfaceParams - if err := m.UpdateNodeBondInterfaceParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NodeBondInterfaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeBondInterfaceParams) UnmarshalBinary(b []byte) error { - var res NodeBondInterfaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_endpoint_state.go b/v2/models/node_endpoint_state.go deleted file mode 100644 index d54b1008..00000000 --- a/v2/models/node_endpoint_state.go +++ /dev/null @@ -1,282 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeEndpointState Node Endpoint State. -// -// Specify the results after checking connectivity on endpoints on each node. -// -// swagger:model NodeEndpointState -type NodeEndpointState struct { - - // Specifies the Id of the node. - ID *int64 `json:"id,omitempty"` - - // Specifies the results of the endpoints. - Endpoints []*EndpointConnectionState `json:"endpoints"` - - // Specifies the state on gateway. - GatewayReachability *EndpointConnectionState `json:"gatewayReachability,omitempty"` - - // Specifies the state on gateway. - DNSServerReachability *EndpointConnectionState `json:"dnsServerReachability,omitempty"` - - // Specifies the state on gateway. - NtpServerReachability *EndpointConnectionState `json:"ntpServerReachability,omitempty"` - - // Specifies the time in Epoch in micro seconds when the check is performed. - CheckTimestampUsecs *int64 `json:"checkTimestampUsecs,omitempty"` -} - -// Validate validates this node endpoint state -func (m *NodeEndpointState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoints(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGatewayReachability(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDNSServerReachability(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNtpServerReachability(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeEndpointState) validateEndpoints(formats strfmt.Registry) error { - if swag.IsZero(m.Endpoints) { // not required - return nil - } - - for i := 0; i < len(m.Endpoints); i++ { - if swag.IsZero(m.Endpoints[i]) { // not required - continue - } - - if m.Endpoints[i] != nil { - if err := m.Endpoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeEndpointState) validateGatewayReachability(formats strfmt.Registry) error { - if swag.IsZero(m.GatewayReachability) { // not required - return nil - } - - if m.GatewayReachability != nil { - if err := m.GatewayReachability.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gatewayReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gatewayReachability") - } - return err - } - } - - return nil -} - -func (m *NodeEndpointState) validateDNSServerReachability(formats strfmt.Registry) error { - if swag.IsZero(m.DNSServerReachability) { // not required - return nil - } - - if m.DNSServerReachability != nil { - if err := m.DNSServerReachability.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsServerReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsServerReachability") - } - return err - } - } - - return nil -} - -func (m *NodeEndpointState) validateNtpServerReachability(formats strfmt.Registry) error { - if swag.IsZero(m.NtpServerReachability) { // not required - return nil - } - - if m.NtpServerReachability != nil { - if err := m.NtpServerReachability.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpServerReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpServerReachability") - } - return err - } - } - - return nil -} - -// ContextValidate validate this node endpoint state based on the context it is used -func (m *NodeEndpointState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpoints(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGatewayReachability(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDNSServerReachability(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNtpServerReachability(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeEndpointState) contextValidateEndpoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Endpoints); i++ { - - if m.Endpoints[i] != nil { - - if swag.IsZero(m.Endpoints[i]) { // not required - return nil - } - - if err := m.Endpoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeEndpointState) contextValidateGatewayReachability(ctx context.Context, formats strfmt.Registry) error { - - if m.GatewayReachability != nil { - - if swag.IsZero(m.GatewayReachability) { // not required - return nil - } - - if err := m.GatewayReachability.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gatewayReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gatewayReachability") - } - return err - } - } - - return nil -} - -func (m *NodeEndpointState) contextValidateDNSServerReachability(ctx context.Context, formats strfmt.Registry) error { - - if m.DNSServerReachability != nil { - - if swag.IsZero(m.DNSServerReachability) { // not required - return nil - } - - if err := m.DNSServerReachability.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsServerReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsServerReachability") - } - return err - } - } - - return nil -} - -func (m *NodeEndpointState) contextValidateNtpServerReachability(ctx context.Context, formats strfmt.Registry) error { - - if m.NtpServerReachability != nil { - - if swag.IsZero(m.NtpServerReachability) { // not required - return nil - } - - if err := m.NtpServerReachability.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ntpServerReachability") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ntpServerReachability") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeEndpointState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeEndpointState) UnmarshalBinary(b []byte) error { - var res NodeEndpointState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_free_disks.go b/v2/models/node_free_disks.go deleted file mode 100644 index 8229b0ed..00000000 --- a/v2/models/node_free_disks.go +++ /dev/null @@ -1,166 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NodeFreeDisks NodeFreeDisks -// -// Sepcifies the free disks of a node. -// -// swagger:model NodeFreeDisks -type NodeFreeDisks struct { - - // Specifies the id of a node. - // Required: true - NodeID *int64 `json:"nodeId"` - - // Specifies list of free disks of node. - // Required: true - FreeDisks []*FreeDisk `json:"freeDisks"` - - // Chassis serial number. - ChassisSerial *string `json:"chassisSerial,omitempty"` - - // Slot number of node - Slot *int64 `json:"slot,omitempty"` - - // Error message of disks assimilation request. - // Read Only: true - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this node free disks -func (m *NodeFreeDisks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFreeDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeFreeDisks) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -func (m *NodeFreeDisks) validateFreeDisks(formats strfmt.Registry) error { - - if err := validate.Required("freeDisks", "body", m.FreeDisks); err != nil { - return err - } - - for i := 0; i < len(m.FreeDisks); i++ { - if swag.IsZero(m.FreeDisks[i]) { // not required - continue - } - - if m.FreeDisks[i] != nil { - if err := m.FreeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("freeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("freeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node free disks based on the context it is used -func (m *NodeFreeDisks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFreeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateErrorMessage(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeFreeDisks) contextValidateFreeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FreeDisks); i++ { - - if m.FreeDisks[i] != nil { - - if swag.IsZero(m.FreeDisks[i]) { // not required - return nil - } - - if err := m.FreeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("freeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("freeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeFreeDisks) contextValidateErrorMessage(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "errorMessage", "body", m.ErrorMessage); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeFreeDisks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeFreeDisks) UnmarshalBinary(b []byte) error { - var res NodeFreeDisks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_group.go b/v2/models/node_group.go deleted file mode 100644 index 471fd0af..00000000 --- a/v2/models/node_group.go +++ /dev/null @@ -1,242 +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" -) - -// NodeGroup Node Group -// -// Specifies common fields required to define Node Group. -// -// swagger:model NodeGroup -type NodeGroup struct { - - // Specifies the name of the Node Group. - // Required: true - Name *string `json:"name"` - - // Node Ids - // - // List of Node Ids that are part of this node group. - NodeIds []int64 `json:"node-ids"` - - // Id of the node group. - ID *int32 `json:"id,omitempty"` - - // Type of the node group. - Type *int32 `json:"type,omitempty"` - - // BGP config information. - BgpInstance *BgpInstance `json:"bgpInstance,omitempty"` - - // Subnet information in node group. - SubnetInfo *SubnetInfo `json:"subnetInfo,omitempty"` - - // DNS servers information in node group. - DNSServersInfo *DNSServersInfo `json:"dnsServersInfo,omitempty"` -} - -// Validate validates this node group -func (m *NodeGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBgpInstance(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDNSServersInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeGroup) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *NodeGroup) validateBgpInstance(formats strfmt.Registry) error { - if swag.IsZero(m.BgpInstance) { // not required - return nil - } - - if m.BgpInstance != nil { - if err := m.BgpInstance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bgpInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bgpInstance") - } - return err - } - } - - return nil -} - -func (m *NodeGroup) validateSubnetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetInfo) { // not required - return nil - } - - if m.SubnetInfo != nil { - if err := m.SubnetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetInfo") - } - return err - } - } - - return nil -} - -func (m *NodeGroup) validateDNSServersInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DNSServersInfo) { // not required - return nil - } - - if m.DNSServersInfo != nil { - if err := m.DNSServersInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsServersInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsServersInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this node group based on the context it is used -func (m *NodeGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBgpInstance(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDNSServersInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeGroup) contextValidateBgpInstance(ctx context.Context, formats strfmt.Registry) error { - - if m.BgpInstance != nil { - - if swag.IsZero(m.BgpInstance) { // not required - return nil - } - - if err := m.BgpInstance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bgpInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bgpInstance") - } - return err - } - } - - return nil -} - -func (m *NodeGroup) contextValidateSubnetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SubnetInfo != nil { - - if swag.IsZero(m.SubnetInfo) { // not required - return nil - } - - if err := m.SubnetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetInfo") - } - return err - } - } - - return nil -} - -func (m *NodeGroup) contextValidateDNSServersInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DNSServersInfo != nil { - - if swag.IsZero(m.DNSServersInfo) { // not required - return nil - } - - if err := m.DNSServersInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsServersInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsServersInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeGroup) UnmarshalBinary(b []byte) error { - var res NodeGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_group_request.go b/v2/models/node_group_request.go deleted file mode 100644 index 13354970..00000000 --- a/v2/models/node_group_request.go +++ /dev/null @@ -1,117 +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" -) - -// NodeGroupRequest Node Group Request. -// -// Specifies the request to create a Node Group. -// -// swagger:model NodeGroupRequest -type NodeGroupRequest struct { - NodeGroup - - NodeGroupRequestAllOf1 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NodeGroupRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NodeGroup - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NodeGroup = aO0 - - // AO1 - var aO1 NodeGroupRequestAllOf1 - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.NodeGroupRequestAllOf1 = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NodeGroupRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.NodeGroup) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.NodeGroupRequestAllOf1) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this node group request -func (m *NodeGroupRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NodeGroup - if err := m.NodeGroup.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NodeGroupRequestAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this node group request based on the context it is used -func (m *NodeGroupRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NodeGroup - if err := m.NodeGroup.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with NodeGroupRequestAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NodeGroupRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeGroupRequest) UnmarshalBinary(b []byte) error { - var res NodeGroupRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// NodeGroupRequestAllOf1 node group request all of1 -// -// swagger:model NodeGroupRequestAllOf1 -type NodeGroupRequestAllOf1 interface{} diff --git a/v2/models/node_group_response.go b/v2/models/node_group_response.go deleted file mode 100644 index 58898612..00000000 --- a/v2/models/node_group_response.go +++ /dev/null @@ -1,125 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeGroupResponse Node Group Response -// -// Specifies the details of Node Groups. -// -// swagger:model NodeGroupResponse -type NodeGroupResponse struct { - - // Node Groups - // - // Specifies the details of a Node Group. - NodeGroups []*NodeGroup `json:"nodeGroups"` -} - -// Validate validates this node group response -func (m *NodeGroupResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeGroupResponse) validateNodeGroups(formats strfmt.Registry) error { - if swag.IsZero(m.NodeGroups) { // not required - return nil - } - - for i := 0; i < len(m.NodeGroups); i++ { - if swag.IsZero(m.NodeGroups[i]) { // not required - continue - } - - if m.NodeGroups[i] != nil { - if err := m.NodeGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node group response based on the context it is used -func (m *NodeGroupResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeGroupResponse) contextValidateNodeGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeGroups); i++ { - - if m.NodeGroups[i] != nil { - - if swag.IsZero(m.NodeGroups[i]) { // not required - return nil - } - - if err := m.NodeGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeGroupResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeGroupResponse) UnmarshalBinary(b []byte) error { - var res NodeGroupResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_hardware_info.go b/v2/models/node_hardware_info.go deleted file mode 100644 index 2ac38860..00000000 --- a/v2/models/node_hardware_info.go +++ /dev/null @@ -1,58 +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" -) - -// NodeHardwareInfo Node Hardware Information. -// -// NodeHardwareInfo provides the information regarding the hardware. -// -// swagger:model NodeHardwareInfo -type NodeHardwareInfo struct { - - // Cpu provides the information regarding the CPU. - CPU *string `json:"cpu,omitempty"` - - // MemorySizeBytes provides the memory size in bytes. - MemorySizeBytes *int64 `json:"memorySizeBytes,omitempty"` - - // Network provides the information regarding the network cards. - Network *string `json:"network,omitempty"` -} - -// Validate validates this node hardware info -func (m *NodeHardwareInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node hardware info based on context it is used -func (m *NodeHardwareInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeHardwareInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeHardwareInfo) UnmarshalBinary(b []byte) error { - var res NodeHardwareInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_identify_params.go b/v2/models/node_identify_params.go deleted file mode 100644 index a689aa39..00000000 --- a/v2/models/node_identify_params.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" -) - -// NodeIdentifyParams Node Identify Request Parameters. -// -// Specifies the parameter to identify node. -// -// swagger:model NodeIdentifyParams -type NodeIdentifyParams struct { - - // Turn on/off node led light if set to true/false respectively. - // Required: true - Identify *bool `json:"identify"` -} - -// Validate validates this node identify params -func (m *NodeIdentifyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIdentify(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeIdentifyParams) validateIdentify(formats strfmt.Registry) error { - - if err := validate.Required("identify", "body", m.Identify); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node identify params based on context it is used -func (m *NodeIdentifyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeIdentifyParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeIdentifyParams) UnmarshalBinary(b []byte) error { - var res NodeIdentifyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_info.go b/v2/models/node_info.go deleted file mode 100644 index 91497450..00000000 --- a/v2/models/node_info.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeInfo Node Information -// -// Specifies general information of a node. -// -// swagger:model NodeInfo -type NodeInfo struct { - - // Specifies the Id of the node. - NodeID int64 `json:"nodeId,omitempty"` - - // Specifies the Id of the cluster to which the node belongs. - ClusterID int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation Id. - IncarnationID int64 `json:"incarnationId,omitempty"` - - // List of interfaces in node. - InterfaceList []*EndPoint `json:"interfaceList"` - - // Version of the Cohesity software running on the node. - SoftwareVersion string `json:"softwareVersion,omitempty"` - - // Chassis serial number programmed by cohesity software. - CohesityChassisSerial string `json:"cohesityChassisSerial,omitempty"` - - // Chassis serial number programmed by manufacturer. - ChassisSerial string `json:"chassisSerial,omitempty"` - - // Node serial number programmed by cohesity software. - CohesityNodeSerial string `json:"cohesityNodeSerial,omitempty"` - - // Node serial number programmed by manufacturer. - NodeSerial string `json:"nodeSerial,omitempty"` - - // Chassis model. - ChassisModel string `json:"chassisModel,omitempty"` - - // Node model. - NodeModel string `json:"nodeModel,omitempty"` - - // Slot number of the node in the chassis. - SlotNumber string `json:"slotNumber,omitempty"` - - // Host name of the node reported by the kernel. - Hostname string `json:"hostname,omitempty"` - - // Ipmi IpAddress - IpmiIP string `json:"ipmiIp,omitempty"` - - // Product Model - ProductModel string `json:"productModel,omitempty"` - - // Specifies the version information of the cohesity services. - ServicesVersionInfo []*ServiceVersionInfo `json:"servicesVersionInfo,omitempty"` -} - -// Validate validates this node info -func (m *NodeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaceList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServicesVersionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeInfo) validateInterfaceList(formats strfmt.Registry) error { - if swag.IsZero(m.InterfaceList) { // not required - return nil - } - - for i := 0; i < len(m.InterfaceList); i++ { - if swag.IsZero(m.InterfaceList[i]) { // not required - continue - } - - if m.InterfaceList[i] != nil { - if err := m.InterfaceList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeInfo) validateServicesVersionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ServicesVersionInfo) { // not required - return nil - } - - for i := 0; i < len(m.ServicesVersionInfo); i++ { - if swag.IsZero(m.ServicesVersionInfo[i]) { // not required - continue - } - - if m.ServicesVersionInfo[i] != nil { - if err := m.ServicesVersionInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesVersionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesVersionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node info based on the context it is used -func (m *NodeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaceList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServicesVersionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeInfo) contextValidateInterfaceList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InterfaceList); i++ { - - if m.InterfaceList[i] != nil { - - if swag.IsZero(m.InterfaceList[i]) { // not required - return nil - } - - if err := m.InterfaceList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaceList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaceList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *NodeInfo) contextValidateServicesVersionInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServicesVersionInfo); i++ { - - if m.ServicesVersionInfo[i] != nil { - - if swag.IsZero(m.ServicesVersionInfo[i]) { // not required - return nil - } - - if err := m.ServicesVersionInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesVersionInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesVersionInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeInfo) UnmarshalBinary(b []byte) error { - var res NodeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_interface_params.go b/v2/models/node_interface_params.go deleted file mode 100644 index d7a596fb..00000000 --- a/v2/models/node_interface_params.go +++ /dev/null @@ -1,74 +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" -) - -// NodeInterfaceParams Node and interface parameters. -// -// swagger:model NodeInterfaceParams -type NodeInterfaceParams struct { - - // Node id. - // Required: true - NodeID *int64 `json:"nodeId"` - - // Name of the interface. - InterfaceName *string `json:"interfaceName,omitempty"` -} - -// Validate validates this node interface params -func (m *NodeInterfaceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeInterfaceParams) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node interface params based on context it is used -func (m *NodeInterfaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeInterfaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeInterfaceParams) UnmarshalBinary(b []byte) error { - var res NodeInterfaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_interfaces.go b/v2/models/node_interfaces.go deleted file mode 100644 index a2569c84..00000000 --- a/v2/models/node_interfaces.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeInterfaces Node Interfaces -// -// Specifies the interfaces present on a Node. -// -// swagger:model NodeInterfaces -type NodeInterfaces struct { - - // Specifies the id of the node. - ID *int64 `json:"id,omitempty"` - - // Specifies the list of network interfaces present on this Node. - Interfaces []*NetworkInterface `json:"interfaces"` -} - -// Validate validates this node interfaces -func (m *NodeInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeInterfaces) validateInterfaces(formats strfmt.Registry) error { - if swag.IsZero(m.Interfaces) { // not required - return nil - } - - for i := 0; i < len(m.Interfaces); i++ { - if swag.IsZero(m.Interfaces[i]) { // not required - continue - } - - if m.Interfaces[i] != nil { - if err := m.Interfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node interfaces based on the context it is used -func (m *NodeInterfaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaces(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeInterfaces) contextValidateInterfaces(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Interfaces); i++ { - - if m.Interfaces[i] != nil { - - if swag.IsZero(m.Interfaces[i]) { // not required - return nil - } - - if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeInterfaces) UnmarshalBinary(b []byte) error { - var res NodeInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_ipmi_lan_params.go b/v2/models/node_ipmi_lan_params.go deleted file mode 100644 index d091999c..00000000 --- a/v2/models/node_ipmi_lan_params.go +++ /dev/null @@ -1,157 +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" -) - -// NodeIpmiLanParams IPMI LAN parameters. -// -// swagger:model NodeIpmiLanParams -type NodeIpmiLanParams struct { - IpmiLanConfig - - // Node id. - // Required: true - NodeID *int64 `json:"nodeId"` - - // IPMI ip address. - // Required: true - IpmiIP *string `json:"ipmiIp"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *NodeIpmiLanParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 IpmiLanConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.IpmiLanConfig = aO0 - - // AO1 - var dataAO1 struct { - NodeID *int64 `json:"nodeId"` - - IpmiIP *string `json:"ipmiIp"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.NodeID = dataAO1.NodeID - - m.IpmiIP = dataAO1.IpmiIP - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m NodeIpmiLanParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.IpmiLanConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - NodeID *int64 `json:"nodeId"` - - IpmiIP *string `json:"ipmiIp"` - } - - dataAO1.NodeID = m.NodeID - - dataAO1.IpmiIP = m.IpmiIP - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this node ipmi lan params -func (m *NodeIpmiLanParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IpmiLanConfig - if err := m.IpmiLanConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIpmiIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeIpmiLanParams) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -func (m *NodeIpmiLanParams) validateIpmiIP(formats strfmt.Registry) error { - - if err := validate.Required("ipmiIp", "body", m.IpmiIP); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this node ipmi lan params based on the context it is used -func (m *NodeIpmiLanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IpmiLanConfig - if err := m.IpmiLanConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *NodeIpmiLanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeIpmiLanParams) UnmarshalBinary(b []byte) error { - var res NodeIpmiLanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_ipmi_user.go b/v2/models/node_ipmi_user.go deleted file mode 100644 index f7755dd4..00000000 --- a/v2/models/node_ipmi_user.go +++ /dev/null @@ -1,88 +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" -) - -// NodeIpmiUser Node level IPMI user parameters. -// -// swagger:model NodeIpmiUser -type NodeIpmiUser struct { - - // IPMI username. - // Required: true - Username *string `json:"username"` - - // Node id. - // Required: true - NodeID *int64 `json:"nodeId"` -} - -// Validate validates this node ipmi user -func (m *NodeIpmiUser) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeIpmiUser) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *NodeIpmiUser) validateNodeID(formats strfmt.Registry) error { - - if err := validate.Required("nodeId", "body", m.NodeID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node ipmi user based on context it is used -func (m *NodeIpmiUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeIpmiUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeIpmiUser) UnmarshalBinary(b []byte) error { - var res NodeIpmiUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_network_interfaces.go b/v2/models/node_network_interfaces.go deleted file mode 100644 index 095a573f..00000000 --- a/v2/models/node_network_interfaces.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeNetworkInterfaces Interfaces on a node. -// -// swagger:model NodeNetworkInterfaces -type NodeNetworkInterfaces struct { - - // Id of the node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Chassis serial number. - ChassisSerialNumber *string `json:"chassisSerialNumber,omitempty"` - - // Slot number of the node. - Slot *int64 `json:"slot,omitempty"` - - // List of interfaces on the node. - Interfaces []*Interface `json:"interfaces"` -} - -// Validate validates this node network interfaces -func (m *NodeNetworkInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeNetworkInterfaces) validateInterfaces(formats strfmt.Registry) error { - if swag.IsZero(m.Interfaces) { // not required - return nil - } - - for i := 0; i < len(m.Interfaces); i++ { - if swag.IsZero(m.Interfaces[i]) { // not required - continue - } - - if m.Interfaces[i] != nil { - if err := m.Interfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this node network interfaces based on the context it is used -func (m *NodeNetworkInterfaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaces(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeNetworkInterfaces) contextValidateInterfaces(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Interfaces); i++ { - - if m.Interfaces[i] != nil { - - if swag.IsZero(m.Interfaces[i]) { // not required - return nil - } - - if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeNetworkInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeNetworkInterfaces) UnmarshalBinary(b []byte) error { - var res NodeNetworkInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_power_operation.go b/v2/models/node_power_operation.go deleted file mode 100644 index 80d3a5de..00000000 --- a/v2/models/node_power_operation.go +++ /dev/null @@ -1,110 +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" -) - -// NodePowerOperation NodePowerOperation -// -// swagger:model NodePowerOperation -type NodePowerOperation struct { - - // The operation clould be poweroff, reboot. - // Required: true - // Enum: ["poweroff","reboot"] - Operation *string `json:"operation"` - - // Id of the node to do the specified operation. - NodeID *int64 `json:"nodeId,omitempty"` -} - -// Validate validates this node power operation -func (m *NodePowerOperation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var nodePowerOperationTypeOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["poweroff","reboot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - nodePowerOperationTypeOperationPropEnum = append(nodePowerOperationTypeOperationPropEnum, v) - } -} - -const ( - - // NodePowerOperationOperationPoweroff captures enum value "poweroff" - NodePowerOperationOperationPoweroff string = "poweroff" - - // NodePowerOperationOperationReboot captures enum value "reboot" - NodePowerOperationOperationReboot string = "reboot" -) - -// prop value enum -func (m *NodePowerOperation) validateOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, nodePowerOperationTypeOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NodePowerOperation) validateOperation(formats strfmt.Registry) error { - - if err := validate.Required("operation", "body", m.Operation); err != nil { - return err - } - - // value enum - if err := m.validateOperationEnum("operation", "body", *m.Operation); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node power operation based on context it is used -func (m *NodePowerOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodePowerOperation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodePowerOperation) UnmarshalBinary(b []byte) error { - var res NodePowerOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_removal_params.go b/v2/models/node_removal_params.go deleted file mode 100644 index 0e1da2dc..00000000 --- a/v2/models/node_removal_params.go +++ /dev/null @@ -1,79 +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" -) - -// NodeRemovalParams Node Removal Parameters. -// -// Specifies parameters to initiate/cancel node removal. -// -// swagger:model NodeRemovalParams -type NodeRemovalParams struct { - - // If true, cancels node removal that is already in progress. - // Required: true - Cancel *bool `json:"cancel"` - - // Specifies whether node being removed is offline. - IsOffline *bool `json:"isOffline,omitempty"` - - // Specifies whether request is for pre-check validations only - IsValidateOnly *bool `json:"isValidateOnly,omitempty"` -} - -// Validate validates this node removal params -func (m *NodeRemovalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCancel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeRemovalParams) validateCancel(formats strfmt.Registry) error { - - if err := validate.Required("cancel", "body", m.Cancel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this node removal params based on context it is used -func (m *NodeRemovalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeRemovalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeRemovalParams) UnmarshalBinary(b []byte) error { - var res NodeRemovalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_reset_state.go b/v2/models/node_reset_state.go deleted file mode 100644 index 8670157e..00000000 --- a/v2/models/node_reset_state.go +++ /dev/null @@ -1,58 +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" -) - -// NodeResetState NodeResetState -// -// # Node reset state information -// -// swagger:model NodeResetState -type NodeResetState struct { - - // Node Id - NodeID *int64 `json:"nodeId,omitempty"` - - // Node Ip. - NodeIP *string `json:"nodeIp,omitempty"` - - // Reset state. - State *string `json:"state,omitempty"` -} - -// Validate validates this node reset state -func (m *NodeResetState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node reset state based on context it is used -func (m *NodeResetState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeResetState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeResetState) UnmarshalBinary(b []byte) error { - var res NodeResetState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_stats.go b/v2/models/node_stats.go deleted file mode 100644 index 45d2e4ca..00000000 --- a/v2/models/node_stats.go +++ /dev/null @@ -1,114 +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" -) - -// NodeStats Node Statistics. -// -// NodeStats provides various statistics for the node. -// -// swagger:model NodeStats -type NodeStats struct { - - // Id is the Id of the Node. - ID *int64 `json:"id,omitempty"` - - // UsagePerfStats provides the usage and performance stats for the node. - UsagePerfStats *UsageAndPerformanceStats `json:"usagePerfStats,omitempty"` -} - -// Validate validates this node stats -func (m *NodeStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsagePerfStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStats) validateUsagePerfStats(formats strfmt.Registry) error { - if swag.IsZero(m.UsagePerfStats) { // not required - 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 -} - -// ContextValidate validate this node stats based on the context it is used -func (m *NodeStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsagePerfStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStats) 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 -} - -// MarshalBinary interface implementation -func (m *NodeStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeStats) UnmarshalBinary(b []byte) error { - var res NodeStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_system_disk_info.go b/v2/models/node_system_disk_info.go deleted file mode 100644 index c6ba2791..00000000 --- a/v2/models/node_system_disk_info.go +++ /dev/null @@ -1,56 +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" -) - -// NodeSystemDiskInfo node system disk info -// -// swagger:model NodeSystemDiskInfo -type NodeSystemDiskInfo struct { - - // DevicePath is the device path of the disk. - DevicePath *string `json:"devicePath,omitempty"` - - // Id is the id of the disk. - ID *int64 `json:"id,omitempty"` - - // Offline specifies whether a disk is marked offline. - Offline *bool `json:"offline,omitempty"` -} - -// Validate validates this node system disk info -func (m *NodeSystemDiskInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node system disk info based on context it is used -func (m *NodeSystemDiskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeSystemDiskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeSystemDiskInfo) UnmarshalBinary(b []byte) error { - var res NodeSystemDiskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/node_unit_progress.go b/v2/models/node_unit_progress.go deleted file mode 100644 index e9b86f7c..00000000 --- a/v2/models/node_unit_progress.go +++ /dev/null @@ -1,67 +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" -) - -// NodeUnitProgress Patch Operation Node Unit Progress. -// -// Specifies the progress of the patch operation on a node. -// -// swagger:model NodeUnitProgress -type NodeUnitProgress struct { - - // Specifies the IP address of the node. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies whether a operation is in progress on the node. - InProgress *bool `json:"inProgress,omitempty"` - - // Specifies the patch level transition of the patch operation. For Apply operation, patch level goes up for each operation. For Revert operation, patch level goes down. Patch level zero is the base level where no patch was applied. - PatchLevelTransition *string `json:"patchLevelTransition,omitempty"` - - // Specifies the percentage of completion of the patch operation on the node. - Percentage *int64 `json:"percentage,omitempty"` - - // Specifies the time taken so far in this patch unit operation on the node. - TimeTakenSeconds *int64 `json:"timeTakenSeconds,omitempty"` - - // Specifies a message about the patch operation on the node. - NodeMessage *string `json:"nodeMessage,omitempty"` -} - -// Validate validates this node unit progress -func (m *NodeUnitProgress) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this node unit progress based on context it is used -func (m *NodeUnitProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NodeUnitProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeUnitProgress) UnmarshalBinary(b []byte) error { - var res NodeUnitProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/non_current_version_expiration_action.go b/v2/models/non_current_version_expiration_action.go deleted file mode 100644 index 5ccd2371..00000000 --- a/v2/models/non_current_version_expiration_action.go +++ /dev/null @@ -1,50 +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" -) - -// NonCurrentVersionExpirationAction Specifies the Lifecycle Non-current Version Expiration Action. -// -// swagger:model NonCurrentVersionExpirationAction -type NonCurrentVersionExpirationAction struct { - - // Specifies the number of days an object is non-current before performing the associated action. - Days *int64 `json:"days,omitempty"` -} - -// Validate validates this non current version expiration action -func (m *NonCurrentVersionExpirationAction) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this non current version expiration action based on context it is used -func (m *NonCurrentVersionExpirationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NonCurrentVersionExpirationAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NonCurrentVersionExpirationAction) UnmarshalBinary(b []byte) error { - var res NonCurrentVersionExpirationAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/num_week_in_month.go b/v2/models/num_week_in_month.go deleted file mode 100644 index caf83b3b..00000000 --- a/v2/models/num_week_in_month.go +++ /dev/null @@ -1,116 +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" -) - -// NumWeekInMonth Num Week In Month type. -// -// Num Week In Month type. -// -// swagger:model NumWeekInMonth -type NumWeekInMonth struct { - - // Specifies Num Week In Month type. - // Enum: ["First","Second","Third","Fourth","Last"] - NumWeekInMonth string `json:"numWeekInMonth,omitempty"` -} - -// Validate validates this num week in month -func (m *NumWeekInMonth) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNumWeekInMonth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var numWeekInMonthTypeNumWeekInMonthPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["First","Second","Third","Fourth","Last"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - numWeekInMonthTypeNumWeekInMonthPropEnum = append(numWeekInMonthTypeNumWeekInMonthPropEnum, v) - } -} - -const ( - - // NumWeekInMonthNumWeekInMonthFirst captures enum value "First" - NumWeekInMonthNumWeekInMonthFirst string = "First" - - // NumWeekInMonthNumWeekInMonthSecond captures enum value "Second" - NumWeekInMonthNumWeekInMonthSecond string = "Second" - - // NumWeekInMonthNumWeekInMonthThird captures enum value "Third" - NumWeekInMonthNumWeekInMonthThird string = "Third" - - // NumWeekInMonthNumWeekInMonthFourth captures enum value "Fourth" - NumWeekInMonthNumWeekInMonthFourth string = "Fourth" - - // NumWeekInMonthNumWeekInMonthLast captures enum value "Last" - NumWeekInMonthNumWeekInMonthLast string = "Last" -) - -// prop value enum -func (m *NumWeekInMonth) validateNumWeekInMonthEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, numWeekInMonthTypeNumWeekInMonthPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *NumWeekInMonth) validateNumWeekInMonth(formats strfmt.Registry) error { - if swag.IsZero(m.NumWeekInMonth) { // not required - return nil - } - - // value enum - if err := m.validateNumWeekInMonthEnum("numWeekInMonth", "body", m.NumWeekInMonth); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this num week in month based on context it is used -func (m *NumWeekInMonth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NumWeekInMonth) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NumWeekInMonth) UnmarshalBinary(b []byte) error { - var res NumWeekInMonth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/number_form_field_params.go b/v2/models/number_form_field_params.go deleted file mode 100644 index a30db8ef..00000000 --- a/v2/models/number_form_field_params.go +++ /dev/null @@ -1,65 +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" -) - -// NumberFormFieldParams Parameters to specify a numeric form field -// -// swagger:model NumberFormFieldParams -type NumberFormFieldParams struct { - - // Specifies whether the field is mandatory - Required *bool `json:"required,omitempty"` - - // Default value for the field - DefaultValue *string `json:"defaultValue,omitempty"` - - // Maximum allowable value for the field - MaximumValue *string `json:"maximumValue,omitempty"` - - // Minimum allowable value for the field - MinimumValue *string `json:"minimumValue,omitempty"` - - // Description for the field to be shown on UI screen - Description *string `json:"description,omitempty"` - - // Placeholder for the form field - Placeholder *string `json:"placeholder,omitempty"` -} - -// Validate validates this number form field params -func (m *NumberFormFieldParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this number form field params based on context it is used -func (m *NumberFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NumberFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NumberFormFieldParams) UnmarshalBinary(b []byte) error { - var res NumberFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o365_helios_search_emails_request_params.go b/v2/models/o365_helios_search_emails_request_params.go deleted file mode 100644 index 68aad741..00000000 --- a/v2/models/o365_helios_search_emails_request_params.go +++ /dev/null @@ -1,130 +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" -) - -// O365HeliosSearchEmailsRequestParams O365 Search Emails Request Params -// -// Specifies email search request params specific to O365 environment. -// -// swagger:model O365HeliosSearchEmailsRequestParams -type O365HeliosSearchEmailsRequestParams struct { - GlobalClusterIdentifier - - // Specifies the domain Ids in which mailboxes are registered. - DomainIds []int64 `json:"domainIds"` - - // Specifies the mailbox Ids which contains the emails/folders. - MailboxIds []int64 `json:"mailboxIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *O365HeliosSearchEmailsRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GlobalClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GlobalClusterIdentifier = aO0 - - // AO1 - var dataAO1 struct { - DomainIds []int64 `json:"domainIds"` - - MailboxIds []int64 `json:"mailboxIds"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DomainIds = dataAO1.DomainIds - - m.MailboxIds = dataAO1.MailboxIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m O365HeliosSearchEmailsRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.GlobalClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DomainIds []int64 `json:"domainIds"` - - MailboxIds []int64 `json:"mailboxIds"` - } - - dataAO1.DomainIds = m.DomainIds - - dataAO1.MailboxIds = m.MailboxIds - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this o365 helios search emails request params -func (m *O365HeliosSearchEmailsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this o365 helios search emails request params based on the context it is used -func (m *O365HeliosSearchEmailsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GlobalClusterIdentifier - if err := m.GlobalClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *O365HeliosSearchEmailsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365HeliosSearchEmailsRequestParams) UnmarshalBinary(b []byte) error { - var res O365HeliosSearchEmailsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o365_protection_group_type.go b/v2/models/o365_protection_group_type.go deleted file mode 100644 index 9072585b..00000000 --- a/v2/models/o365_protection_group_type.go +++ /dev/null @@ -1,119 +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" -) - -// O365ProtectionGroupType O365 Protection Group type. -// -// O365 Protection Group type. -// -// swagger:model O365ProtectionGroupType -type O365ProtectionGroupType struct { - - // Specifies O365 Protection Group type. - // Enum: ["kMailbox","kOneDrive","kSharePoint","kPublicFolders","kGroups","kTeams"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this o365 protection group type -func (m *O365ProtectionGroupType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var o365ProtectionGroupTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMailbox","kOneDrive","kSharePoint","kPublicFolders","kGroups","kTeams"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - o365ProtectionGroupTypeTypeEnvironmentPropEnum = append(o365ProtectionGroupTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // O365ProtectionGroupTypeEnvironmentKMailbox captures enum value "kMailbox" - O365ProtectionGroupTypeEnvironmentKMailbox string = "kMailbox" - - // O365ProtectionGroupTypeEnvironmentKOneDrive captures enum value "kOneDrive" - O365ProtectionGroupTypeEnvironmentKOneDrive string = "kOneDrive" - - // O365ProtectionGroupTypeEnvironmentKSharePoint captures enum value "kSharePoint" - O365ProtectionGroupTypeEnvironmentKSharePoint string = "kSharePoint" - - // O365ProtectionGroupTypeEnvironmentKPublicFolders captures enum value "kPublicFolders" - O365ProtectionGroupTypeEnvironmentKPublicFolders string = "kPublicFolders" - - // O365ProtectionGroupTypeEnvironmentKGroups captures enum value "kGroups" - O365ProtectionGroupTypeEnvironmentKGroups string = "kGroups" - - // O365ProtectionGroupTypeEnvironmentKTeams captures enum value "kTeams" - O365ProtectionGroupTypeEnvironmentKTeams string = "kTeams" -) - -// prop value enum -func (m *O365ProtectionGroupType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, o365ProtectionGroupTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *O365ProtectionGroupType) 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 validates this o365 protection group type based on context it is used -func (m *O365ProtectionGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365ProtectionGroupType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365ProtectionGroupType) UnmarshalBinary(b []byte) error { - var res O365ProtectionGroupType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o365_search_emails_request_params.go b/v2/models/o365_search_emails_request_params.go deleted file mode 100644 index 144ef25a..00000000 --- a/v2/models/o365_search_emails_request_params.go +++ /dev/null @@ -1,55 +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" -) - -// O365SearchEmailsRequestParams O365 Search Emails Request Params -// -// Specifies email search request params specific to O365 environment. -// -// swagger:model O365SearchEmailsRequestParams -type O365SearchEmailsRequestParams struct { - - // Specifies the domain Ids in which mailboxes are registered. - DomainIds []int64 `json:"domainIds"` - - // Specifies the mailbox Ids which contains the emails/folders. - MailboxIds []int64 `json:"mailboxIds"` -} - -// Validate validates this o365 search emails request params -func (m *O365SearchEmailsRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 search emails request params based on context it is used -func (m *O365SearchEmailsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365SearchEmailsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365SearchEmailsRequestParams) UnmarshalBinary(b []byte) error { - var res O365SearchEmailsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o365_search_request_params.go b/v2/models/o365_search_request_params.go deleted file mode 100644 index 6d3fff1e..00000000 --- a/v2/models/o365_search_request_params.go +++ /dev/null @@ -1,64 +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" -) - -// O365SearchRequestParams O365 Search Request Params -// -// Specifies O365 specific params search request params to search for indexed items. -// -// swagger:model O365SearchRequestParams -type O365SearchRequestParams struct { - - // Specifies the domain Ids in which indexed items are searched. - DomainIds []int64 `json:"domainIds"` - - // Specifies the user ids across which the indexed items needs to be searched. - UserIds []int64 `json:"userIds"` - - // Specifies the Sharepoint site ids across which the indexed items needs to be searched. - SiteIds []int64 `json:"siteIds"` - - // Specifies the Group ids across which the indexed items needs to be searched. - GroupIds []int64 `json:"groupIds"` - - // Specifies the Teams ids across which the indexed items needs to be searched. - TeamsIds []int64 `json:"teamsIds"` -} - -// Validate validates this o365 search request params -func (m *O365SearchRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 search request params based on context it is used -func (m *O365SearchRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365SearchRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365SearchRequestParams) UnmarshalBinary(b []byte) error { - var res O365SearchRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o365_teams_channels_search_request_params.go b/v2/models/o365_teams_channels_search_request_params.go deleted file mode 100644 index e692989a..00000000 --- a/v2/models/o365_teams_channels_search_request_params.go +++ /dev/null @@ -1,64 +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" -) - -// O365TeamsChannelsSearchRequestParams Search Document library request params. -// -// # Specifies the request parameters related to channels for Microsoft365 teams -// -// swagger:model O365TeamsChannelsSearchRequestParams -type O365TeamsChannelsSearchRequestParams struct { - - // Specifies the unique id of the channel. - ChannelID *string `json:"channelId,omitempty"` - - // Specifies the name of the channel. Only items within the specified channel will be returned. - ChannelName *string `json:"channelName,omitempty"` - - // Specifies the email id of the channel. - ChannelEmail *string `json:"channelEmail,omitempty"` - - // Specifies whether to include public channels in the response. Default is true. - IncludePublicChannels *bool `json:"includePublicChannels,omitempty"` - - // Specifies whether to include private channels in the response. Default is true. - IncludePrivateChannels *bool `json:"includePrivateChannels,omitempty"` -} - -// Validate validates this o365 teams channels search request params -func (m *O365TeamsChannelsSearchRequestParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this o365 teams channels search request params based on context it is used -func (m *O365TeamsChannelsSearchRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *O365TeamsChannelsSearchRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *O365TeamsChannelsSearchRequestParams) UnmarshalBinary(b []byte) error { - var res O365TeamsChannelsSearchRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o_auth2_action.go b/v2/models/o_auth2_action.go deleted file mode 100644 index 75a0d1a8..00000000 --- a/v2/models/o_auth2_action.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OAuth2Action OAuth 2 Action -// -// swagger:model OAuth2Action -type OAuth2Action struct { - - // Specifies an action to perform on an OAuth 2 Identity Provider. The following actions are currently supported: 1. 'RefreshPublicKeys': Refreshes the public keys currently stored on the cluster for the user sending the request. In order to do this, the public key URL specified in the current users OAuth configuration will be polled for a new public key. - // Required: true - // Enum: ["RefreshPublicKeys"] - Action *string `json:"action"` -} - -// Validate validates this o auth2 action -func (m *OAuth2Action) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oAuth2ActionTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RefreshPublicKeys"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oAuth2ActionTypeActionPropEnum = append(oAuth2ActionTypeActionPropEnum, v) - } -} - -const ( - - // OAuth2ActionActionRefreshPublicKeys captures enum value "RefreshPublicKeys" - OAuth2ActionActionRefreshPublicKeys string = "RefreshPublicKeys" -) - -// prop value enum -func (m *OAuth2Action) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oAuth2ActionTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OAuth2Action) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this o auth2 action based on context it is used -func (m *OAuth2Action) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OAuth2Action) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OAuth2Action) UnmarshalBinary(b []byte) error { - var res OAuth2Action - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o_auth2_provider.go b/v2/models/o_auth2_provider.go deleted file mode 100644 index a5ad6153..00000000 --- a/v2/models/o_auth2_provider.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OAuth2Provider OAuth 2 provider -// -// swagger:model OAuth2Provider -type OAuth2Provider struct { - - // Specifies the audiences of the configuration. This is used for validation. We will check this against the 'aud' field sent in the JWT at authorization time and if they do not match against at least one of the elements in this list, then authentication will fail. We will also check the 'clientIds' under the specified audience to make sure it matches the 'appid' in the token. - // Required: true - // Max Items: 50 - // Min Items: 1 - Audiences []*OAuthAudience `json:"audiences"` - - // Specifies the URL to poll for the public key. - // Required: true - PublicKeyURL *string `json:"publicKeyUrl"` - - // Specifies the number of minutes the cluster should wait before polling for a new public key. Default value is 1440 (24 hours). - // Maximum: 10080 - // Minimum: 1 - PollingFrequencyMins *int64 `json:"pollingFrequencyMins,omitempty"` -} - -// Validate validates this o auth2 provider -func (m *OAuth2Provider) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAudiences(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicKeyURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePollingFrequencyMins(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OAuth2Provider) validateAudiences(formats strfmt.Registry) error { - - if err := validate.Required("audiences", "body", m.Audiences); err != nil { - return err - } - - iAudiencesSize := int64(len(m.Audiences)) - - if err := validate.MinItems("audiences", "body", iAudiencesSize, 1); err != nil { - return err - } - - if err := validate.MaxItems("audiences", "body", iAudiencesSize, 50); err != nil { - return err - } - - for i := 0; i < len(m.Audiences); i++ { - if swag.IsZero(m.Audiences[i]) { // not required - continue - } - - if m.Audiences[i] != nil { - if err := m.Audiences[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("audiences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("audiences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OAuth2Provider) validatePublicKeyURL(formats strfmt.Registry) error { - - if err := validate.Required("publicKeyUrl", "body", m.PublicKeyURL); err != nil { - return err - } - - return nil -} - -func (m *OAuth2Provider) validatePollingFrequencyMins(formats strfmt.Registry) error { - if swag.IsZero(m.PollingFrequencyMins) { // not required - return nil - } - - if err := validate.MinimumInt("pollingFrequencyMins", "body", *m.PollingFrequencyMins, 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("pollingFrequencyMins", "body", *m.PollingFrequencyMins, 10080, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this o auth2 provider based on the context it is used -func (m *OAuth2Provider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAudiences(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OAuth2Provider) contextValidateAudiences(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Audiences); i++ { - - if m.Audiences[i] != nil { - - if swag.IsZero(m.Audiences[i]) { // not required - return nil - } - - if err := m.Audiences[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("audiences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("audiences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OAuth2Provider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OAuth2Provider) UnmarshalBinary(b []byte) error { - var res OAuth2Provider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/o_auth_audience.go b/v2/models/o_auth_audience.go deleted file mode 100644 index b9e8ebf7..00000000 --- a/v2/models/o_auth_audience.go +++ /dev/null @@ -1,113 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OAuthAudience OAuth 2 Audience -// -// swagger:model OAuthAudience -type OAuthAudience struct { - - // Specifies the ID of this audience. This must match the 'aud' field in the token at login time. - // Required: true - AudienceID *string `json:"audienceId"` - - // Specifies the list of client IDs which should be allowed to log in via this audience. The 'appid' in the token must match one of the values specified here. - // Required: true - // Max Items: 50 - // Min Items: 1 - ClientIds []string `json:"clientIds"` -} - -// Validate validates this o auth audience -func (m *OAuthAudience) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAudienceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OAuthAudience) validateAudienceID(formats strfmt.Registry) error { - - if err := validate.Required("audienceId", "body", m.AudienceID); err != nil { - return err - } - - return nil -} - -func (m *OAuthAudience) validateClientIds(formats strfmt.Registry) error { - - if err := validate.Required("clientIds", "body", m.ClientIds); err != nil { - return err - } - - iClientIdsSize := int64(len(m.ClientIds)) - - if err := validate.MinItems("clientIds", "body", iClientIdsSize, 1); err != nil { - return err - } - - if err := validate.MaxItems("clientIds", "body", iClientIdsSize, 50); err != nil { - return err - } - - for i := 0; i < len(m.ClientIds); i++ { - - if err := validate.MinLength("clientIds"+"."+strconv.Itoa(i), "body", m.ClientIds[i], 1); err != nil { - return err - } - - if err := validate.MaxLength("clientIds"+"."+strconv.Itoa(i), "body", m.ClientIds[i], 255); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this o auth audience based on context it is used -func (m *OAuthAudience) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OAuthAudience) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OAuthAudience) UnmarshalBinary(b []byte) error { - var res OAuthAudience - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object.go b/v2/models/object.go deleted file mode 100644 index d690862d..00000000 --- a/v2/models/object.go +++ /dev/null @@ -1,948 +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" -) - -// Object Object information -// -// Specifies information about an object. -// -// swagger:model Object -type Object struct { - CommonObjectSummary - - // Specifies the parameters which are specific to VMware objects. - VmwareParams *VmwareObjectEntityParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters for Elastifile object. - ElastifileParams *CommonNasObjectParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters for Flashblade object. - FlashbladeParams *FlashbladeObjectParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters for GenericNas object. - GenericNasParams *CommonNasObjectParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters for GPFS object. - GpfsParams *CommonNasObjectParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters for M365 Group object. - GroupParams *GroupObjectEntityParams `json:"groupParams,omitempty"` - - // Specifies the parameters for Isilon object. - IsilonParams *IsilonObjectParams `json:"isilonParams,omitempty"` - - // Specifies the parameters for Msssql object. - MssqlParams *MssqlObjectEntityParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters for NetApp object. - NetappParams *NetappObjectParams `json:"netappParams,omitempty"` - - // Specifies the parameters for Oracle object. - OracleParams *OracleObjectEntityParams `json:"oracleParams,omitempty"` - - // Specifies the parameters for Physical object. - PhysicalParams *PhysicalObjectEntityParams `json:"physicalParams,omitempty"` - - // Specifies the parameters for Sharepoint object. - SharepointParams *SharepointObjectEntityParams `json:"sharepointParams,omitempty"` - - // Specifies the parameters for UDA object. - UdaParams *UdaObjectParams `json:"udaParams,omitempty"` - - // Specifies the parameters for a View. - ViewParams *ViewObjectParams `json:"viewParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Object) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareObjectEntityParams `json:"vmwareParams,omitempty"` - - ElastifileParams *CommonNasObjectParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeObjectParams `json:"flashbladeParams,omitempty"` - - GenericNasParams *CommonNasObjectParams `json:"genericNasParams,omitempty"` - - GpfsParams *CommonNasObjectParams `json:"gpfsParams,omitempty"` - - GroupParams *GroupObjectEntityParams `json:"groupParams,omitempty"` - - IsilonParams *IsilonObjectParams `json:"isilonParams,omitempty"` - - MssqlParams *MssqlObjectEntityParams `json:"mssqlParams,omitempty"` - - NetappParams *NetappObjectParams `json:"netappParams,omitempty"` - - OracleParams *OracleObjectEntityParams `json:"oracleParams,omitempty"` - - PhysicalParams *PhysicalObjectEntityParams `json:"physicalParams,omitempty"` - - SharepointParams *SharepointObjectEntityParams `json:"sharepointParams,omitempty"` - - UdaParams *UdaObjectParams `json:"udaParams,omitempty"` - - ViewParams *ViewObjectParams `json:"viewParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.GpfsParams = dataAO1.GpfsParams - - m.GroupParams = dataAO1.GroupParams - - m.IsilonParams = dataAO1.IsilonParams - - m.MssqlParams = dataAO1.MssqlParams - - m.NetappParams = dataAO1.NetappParams - - m.OracleParams = dataAO1.OracleParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.SharepointParams = dataAO1.SharepointParams - - m.UdaParams = dataAO1.UdaParams - - m.ViewParams = dataAO1.ViewParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Object) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareObjectEntityParams `json:"vmwareParams,omitempty"` - - ElastifileParams *CommonNasObjectParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeObjectParams `json:"flashbladeParams,omitempty"` - - GenericNasParams *CommonNasObjectParams `json:"genericNasParams,omitempty"` - - GpfsParams *CommonNasObjectParams `json:"gpfsParams,omitempty"` - - GroupParams *GroupObjectEntityParams `json:"groupParams,omitempty"` - - IsilonParams *IsilonObjectParams `json:"isilonParams,omitempty"` - - MssqlParams *MssqlObjectEntityParams `json:"mssqlParams,omitempty"` - - NetappParams *NetappObjectParams `json:"netappParams,omitempty"` - - OracleParams *OracleObjectEntityParams `json:"oracleParams,omitempty"` - - PhysicalParams *PhysicalObjectEntityParams `json:"physicalParams,omitempty"` - - SharepointParams *SharepointObjectEntityParams `json:"sharepointParams,omitempty"` - - UdaParams *UdaObjectParams `json:"udaParams,omitempty"` - - ViewParams *ViewObjectParams `json:"viewParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.GroupParams = m.GroupParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.SharepointParams = m.SharepointParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.ViewParams = m.ViewParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object -func (m *Object) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectSummary - if err := m.CommonObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Object) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateGroupParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GroupParams) { // not required - return nil - } - - if m.GroupParams != nil { - if err := m.GroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *Object) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateSharepointParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if m.SharepointParams != nil { - if err := m.SharepointParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *Object) validateViewParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object based on the context it is used -func (m *Object) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectSummary - if err := m.CommonObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Object) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupParams != nil { - - if swag.IsZero(m.GroupParams) { // not required - return nil - } - - if err := m.GroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateSharepointParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointParams != nil { - - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if err := m.SharepointParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *Object) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Object) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Object) UnmarshalBinary(b []byte) error { - var res Object - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_action_request.go b/v2/models/object_action_request.go deleted file mode 100644 index 3d6a0872..00000000 --- a/v2/models/object_action_request.go +++ /dev/null @@ -1,168 +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" -) - -// ObjectActionRequest Peform an action on an Object. -// -// Specifies the request to peform an action on an Object. -// -// swagger:model ObjectActionRequest -type ObjectActionRequest struct { - CommonObjectActionRequest - - // Specifies the actions for VMware Objects. - VmwareParams *VmwareObjectActionParams `json:"vmwareParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectActionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectActionRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectActionRequest = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareObjectActionParams `json:"vmwareParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectActionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonObjectActionRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareObjectActionParams `json:"vmwareParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object action request -func (m *ObjectActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectActionRequest - if err := m.CommonObjectActionRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectActionRequest) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object action request based on the context it is used -func (m *ObjectActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectActionRequest - if err := m.CommonObjectActionRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectActionRequest) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectActionRequest) UnmarshalBinary(b []byte) error { - var res ObjectActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_archival_snapshot_info.go b/v2/models/object_archival_snapshot_info.go deleted file mode 100644 index 29f346bf..00000000 --- a/v2/models/object_archival_snapshot_info.go +++ /dev/null @@ -1,132 +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" -) - -// ObjectArchivalSnapshotInfo Object Archival Snapshot Information -// -// Specifies the Archival snapshot information for the object. -// -// swagger:model ObjectArchivalSnapshotInfo -type ObjectArchivalSnapshotInfo struct { - - // Specifies the id of the archival snapshot for the object. - SnapshotID *string `json:"snapshotId,omitempty"` - - // Specifies the logical size of this snapshot in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - ArchivalTargetSummaryInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectArchivalSnapshotInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - SnapshotID *string `json:"snapshotId,omitempty"` - - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.SnapshotID = dataAO0.SnapshotID - - m.LogicalSizeBytes = dataAO0.LogicalSizeBytes - - // AO1 - var aO1 ArchivalTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ArchivalTargetSummaryInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectArchivalSnapshotInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - SnapshotID *string `json:"snapshotId,omitempty"` - - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - } - - dataAO0.SnapshotID = m.SnapshotID - - dataAO0.LogicalSizeBytes = m.LogicalSizeBytes - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.ArchivalTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object archival snapshot info -func (m *ObjectArchivalSnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object archival snapshot info based on the context it is used -func (m *ObjectArchivalSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalTargetSummaryInfo - if err := m.ArchivalTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectArchivalSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectArchivalSnapshotInfo) UnmarshalBinary(b []byte) error { - var res ObjectArchivalSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_backup_snapshot_status.go b/v2/models/object_backup_snapshot_status.go deleted file mode 100644 index cbcbf270..00000000 --- a/v2/models/object_backup_snapshot_status.go +++ /dev/null @@ -1,131 +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" -) - -// ObjectBackupSnapshotStatus Object Backup Snapshot Status type. -// -// Object Backup Snapshot Status type. -// -// swagger:model ObjectBackupSnapshotStatus -type ObjectBackupSnapshotStatus struct { - - // Specifies Object Backup Snapshot Status type. - // Enum: ["kInProgress","kSuccessful","kFailed","kWaitingForNextAttempt","kWarning","kCurrentAttemptPaused","kCurrentAttemptResuming","kCurrentAttemptPausing","kWaitingForOlderBackupRun","kSkipped"] - ObjectBackupSnapshotStatus string `json:"objectBackupSnapshotStatus,omitempty"` -} - -// Validate validates this object backup snapshot status -func (m *ObjectBackupSnapshotStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectBackupSnapshotStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectBackupSnapshotStatusTypeObjectBackupSnapshotStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInProgress","kSuccessful","kFailed","kWaitingForNextAttempt","kWarning","kCurrentAttemptPaused","kCurrentAttemptResuming","kCurrentAttemptPausing","kWaitingForOlderBackupRun","kSkipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectBackupSnapshotStatusTypeObjectBackupSnapshotStatusPropEnum = append(objectBackupSnapshotStatusTypeObjectBackupSnapshotStatusPropEnum, v) - } -} - -const ( - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKInProgress captures enum value "kInProgress" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKInProgress string = "kInProgress" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKSuccessful captures enum value "kSuccessful" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKSuccessful string = "kSuccessful" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKFailed captures enum value "kFailed" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKFailed string = "kFailed" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWaitingForNextAttempt captures enum value "kWaitingForNextAttempt" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWaitingForNextAttempt string = "kWaitingForNextAttempt" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWarning captures enum value "kWarning" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWarning string = "kWarning" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptPaused captures enum value "kCurrentAttemptPaused" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptPaused string = "kCurrentAttemptPaused" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptResuming captures enum value "kCurrentAttemptResuming" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptResuming string = "kCurrentAttemptResuming" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptPausing captures enum value "kCurrentAttemptPausing" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKCurrentAttemptPausing string = "kCurrentAttemptPausing" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWaitingForOlderBackupRun captures enum value "kWaitingForOlderBackupRun" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKWaitingForOlderBackupRun string = "kWaitingForOlderBackupRun" - - // ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKSkipped captures enum value "kSkipped" - ObjectBackupSnapshotStatusObjectBackupSnapshotStatusKSkipped string = "kSkipped" -) - -// prop value enum -func (m *ObjectBackupSnapshotStatus) validateObjectBackupSnapshotStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectBackupSnapshotStatusTypeObjectBackupSnapshotStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectBackupSnapshotStatus) validateObjectBackupSnapshotStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectBackupSnapshotStatus) { // not required - return nil - } - - // value enum - if err := m.validateObjectBackupSnapshotStatusEnum("objectBackupSnapshotStatus", "body", m.ObjectBackupSnapshotStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object backup snapshot status based on context it is used -func (m *ObjectBackupSnapshotStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectBackupSnapshotStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectBackupSnapshotStatus) UnmarshalBinary(b []byte) error { - var res ObjectBackupSnapshotStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_browse_request.go b/v2/models/object_browse_request.go deleted file mode 100644 index 2586aba8..00000000 --- a/v2/models/object_browse_request.go +++ /dev/null @@ -1,228 +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" -) - -// ObjectBrowseRequest Fetch children of an object. -// -// Specifies the request to fetch children of an object. -// -// swagger:model ObjectBrowseRequest -type ObjectBrowseRequest struct { - CommonObjectActionRequest - - // Specifies the HDFS specific parameters for fetching content (files & folders). - HdfsParams *HdfsBrowseRequestParams `json:"hdfsParams,omitempty"` - - // Specifies the information needed in order to support pagination. This will not be included for the last page of results. - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectBrowseRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectActionRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectActionRequest = aO0 - - // AO1 - var dataAO1 struct { - HdfsParams *HdfsBrowseRequestParams `json:"hdfsParams,omitempty"` - - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.HdfsParams = dataAO1.HdfsParams - - m.PaginationInfo = dataAO1.PaginationInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectBrowseRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonObjectActionRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - HdfsParams *HdfsBrowseRequestParams `json:"hdfsParams,omitempty"` - - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` - } - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.PaginationInfo = m.PaginationInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object browse request -func (m *ObjectBrowseRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectActionRequest - if err := m.CommonObjectActionRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectBrowseRequest) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectBrowseRequest) validatePaginationInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object browse request based on the context it is used -func (m *ObjectBrowseRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectActionRequest - if err := m.CommonObjectActionRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectBrowseRequest) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectBrowseRequest) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectBrowseRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectBrowseRequest) UnmarshalBinary(b []byte) error { - var res ObjectBrowseRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_environment.go b/v2/models/object_environment.go deleted file mode 100644 index 086395d8..00000000 --- a/v2/models/object_environment.go +++ /dev/null @@ -1,206 +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" -) - -// ObjectEnvironment Object Environment -// -// Specifies object environment. -// -// swagger:model ObjectEnvironment -type ObjectEnvironment struct { - - // Specifies type of object environment. - // 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"] - Type string `json:"type,omitempty"` -} - -// Validate validates this object environment -func (m *ObjectEnvironment) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectEnvironmentTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectEnvironmentTypeTypePropEnum = append(objectEnvironmentTypeTypePropEnum, v) - } -} - -const ( - - // ObjectEnvironmentTypeKVMware captures enum value "kVMware" - ObjectEnvironmentTypeKVMware string = "kVMware" - - // ObjectEnvironmentTypeKHyperV captures enum value "kHyperV" - ObjectEnvironmentTypeKHyperV string = "kHyperV" - - // ObjectEnvironmentTypeKAzure captures enum value "kAzure" - ObjectEnvironmentTypeKAzure string = "kAzure" - - // ObjectEnvironmentTypeKKVM captures enum value "kKVM" - ObjectEnvironmentTypeKKVM string = "kKVM" - - // ObjectEnvironmentTypeKAWS captures enum value "kAWS" - ObjectEnvironmentTypeKAWS string = "kAWS" - - // ObjectEnvironmentTypeKAzureSQL captures enum value "kAzureSQL" - ObjectEnvironmentTypeKAzureSQL string = "kAzureSQL" - - // ObjectEnvironmentTypeKAcropolis captures enum value "kAcropolis" - ObjectEnvironmentTypeKAcropolis string = "kAcropolis" - - // ObjectEnvironmentTypeKGCP captures enum value "kGCP" - ObjectEnvironmentTypeKGCP string = "kGCP" - - // ObjectEnvironmentTypeKPhysical captures enum value "kPhysical" - ObjectEnvironmentTypeKPhysical string = "kPhysical" - - // ObjectEnvironmentTypeKPhysicalFiles captures enum value "kPhysicalFiles" - ObjectEnvironmentTypeKPhysicalFiles string = "kPhysicalFiles" - - // ObjectEnvironmentTypeKIsilon captures enum value "kIsilon" - ObjectEnvironmentTypeKIsilon string = "kIsilon" - - // ObjectEnvironmentTypeKNetapp captures enum value "kNetapp" - ObjectEnvironmentTypeKNetapp string = "kNetapp" - - // ObjectEnvironmentTypeKGenericNas captures enum value "kGenericNas" - ObjectEnvironmentTypeKGenericNas string = "kGenericNas" - - // ObjectEnvironmentTypeKFlashBlade captures enum value "kFlashBlade" - ObjectEnvironmentTypeKFlashBlade string = "kFlashBlade" - - // ObjectEnvironmentTypeKElastifile captures enum value "kElastifile" - ObjectEnvironmentTypeKElastifile string = "kElastifile" - - // ObjectEnvironmentTypeKGPFS captures enum value "kGPFS" - ObjectEnvironmentTypeKGPFS string = "kGPFS" - - // ObjectEnvironmentTypeKPure captures enum value "kPure" - ObjectEnvironmentTypeKPure string = "kPure" - - // ObjectEnvironmentTypeKIbmFlashSystem captures enum value "kIbmFlashSystem" - ObjectEnvironmentTypeKIbmFlashSystem string = "kIbmFlashSystem" - - // ObjectEnvironmentTypeKNimble captures enum value "kNimble" - ObjectEnvironmentTypeKNimble string = "kNimble" - - // ObjectEnvironmentTypeKSQL captures enum value "kSQL" - ObjectEnvironmentTypeKSQL string = "kSQL" - - // ObjectEnvironmentTypeKOracle captures enum value "kOracle" - ObjectEnvironmentTypeKOracle string = "kOracle" - - // ObjectEnvironmentTypeKExchange captures enum value "kExchange" - ObjectEnvironmentTypeKExchange string = "kExchange" - - // ObjectEnvironmentTypeKAD captures enum value "kAD" - ObjectEnvironmentTypeKAD string = "kAD" - - // ObjectEnvironmentTypeKView captures enum value "kView" - ObjectEnvironmentTypeKView string = "kView" - - // ObjectEnvironmentTypeKO365 captures enum value "kO365" - ObjectEnvironmentTypeKO365 string = "kO365" - - // ObjectEnvironmentTypeKHyperFlex captures enum value "kHyperFlex" - ObjectEnvironmentTypeKHyperFlex string = "kHyperFlex" - - // ObjectEnvironmentTypeKKubernetes captures enum value "kKubernetes" - ObjectEnvironmentTypeKKubernetes string = "kKubernetes" - - // ObjectEnvironmentTypeKCassandra captures enum value "kCassandra" - ObjectEnvironmentTypeKCassandra string = "kCassandra" - - // ObjectEnvironmentTypeKMongoDB captures enum value "kMongoDB" - ObjectEnvironmentTypeKMongoDB string = "kMongoDB" - - // ObjectEnvironmentTypeKCouchbase captures enum value "kCouchbase" - ObjectEnvironmentTypeKCouchbase string = "kCouchbase" - - // ObjectEnvironmentTypeKHdfs captures enum value "kHdfs" - ObjectEnvironmentTypeKHdfs string = "kHdfs" - - // ObjectEnvironmentTypeKHive captures enum value "kHive" - ObjectEnvironmentTypeKHive string = "kHive" - - // ObjectEnvironmentTypeKHBase captures enum value "kHBase" - ObjectEnvironmentTypeKHBase string = "kHBase" - - // ObjectEnvironmentTypeKUDA captures enum value "kUDA" - ObjectEnvironmentTypeKUDA string = "kUDA" - - // ObjectEnvironmentTypeKSfdc captures enum value "kSfdc" - ObjectEnvironmentTypeKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ObjectEnvironment) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectEnvironmentTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectEnvironment) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object environment based on context it is used -func (m *ObjectEnvironment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectEnvironment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectEnvironment) UnmarshalBinary(b []byte) error { - var res ObjectEnvironment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_identifier.go b/v2/models/object_identifier.go deleted file mode 100644 index 16ae3720..00000000 --- a/v2/models/object_identifier.go +++ /dev/null @@ -1,218 +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" -) - -// ObjectIdentifier Object Identifier. -// -// Specifies the basic info to identify an object. -// -// swagger:model ObjectIdentifier -type ObjectIdentifier struct { - - // Specifies object id. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the object. - Name *string `json:"name,omitempty"` - - // Specifies registered source id to which object belongs. - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies registered source name to which object belongs. - SourceName *string `json:"sourceName,omitempty"` - - // 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"` -} - -// Validate validates this object identifier -func (m *ObjectIdentifier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectIdentifierTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectIdentifierTypeEnvironmentPropEnum = append(objectIdentifierTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ObjectIdentifierEnvironmentKVMware captures enum value "kVMware" - ObjectIdentifierEnvironmentKVMware string = "kVMware" - - // ObjectIdentifierEnvironmentKHyperV captures enum value "kHyperV" - ObjectIdentifierEnvironmentKHyperV string = "kHyperV" - - // ObjectIdentifierEnvironmentKAzure captures enum value "kAzure" - ObjectIdentifierEnvironmentKAzure string = "kAzure" - - // ObjectIdentifierEnvironmentKKVM captures enum value "kKVM" - ObjectIdentifierEnvironmentKKVM string = "kKVM" - - // ObjectIdentifierEnvironmentKAWS captures enum value "kAWS" - ObjectIdentifierEnvironmentKAWS string = "kAWS" - - // ObjectIdentifierEnvironmentKAzureSQL captures enum value "kAzureSQL" - ObjectIdentifierEnvironmentKAzureSQL string = "kAzureSQL" - - // ObjectIdentifierEnvironmentKAcropolis captures enum value "kAcropolis" - ObjectIdentifierEnvironmentKAcropolis string = "kAcropolis" - - // ObjectIdentifierEnvironmentKGCP captures enum value "kGCP" - ObjectIdentifierEnvironmentKGCP string = "kGCP" - - // ObjectIdentifierEnvironmentKPhysical captures enum value "kPhysical" - ObjectIdentifierEnvironmentKPhysical string = "kPhysical" - - // ObjectIdentifierEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ObjectIdentifierEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ObjectIdentifierEnvironmentKIsilon captures enum value "kIsilon" - ObjectIdentifierEnvironmentKIsilon string = "kIsilon" - - // ObjectIdentifierEnvironmentKNetapp captures enum value "kNetapp" - ObjectIdentifierEnvironmentKNetapp string = "kNetapp" - - // ObjectIdentifierEnvironmentKGenericNas captures enum value "kGenericNas" - ObjectIdentifierEnvironmentKGenericNas string = "kGenericNas" - - // ObjectIdentifierEnvironmentKFlashBlade captures enum value "kFlashBlade" - ObjectIdentifierEnvironmentKFlashBlade string = "kFlashBlade" - - // ObjectIdentifierEnvironmentKElastifile captures enum value "kElastifile" - ObjectIdentifierEnvironmentKElastifile string = "kElastifile" - - // ObjectIdentifierEnvironmentKGPFS captures enum value "kGPFS" - ObjectIdentifierEnvironmentKGPFS string = "kGPFS" - - // ObjectIdentifierEnvironmentKPure captures enum value "kPure" - ObjectIdentifierEnvironmentKPure string = "kPure" - - // ObjectIdentifierEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ObjectIdentifierEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ObjectIdentifierEnvironmentKNimble captures enum value "kNimble" - ObjectIdentifierEnvironmentKNimble string = "kNimble" - - // ObjectIdentifierEnvironmentKSQL captures enum value "kSQL" - ObjectIdentifierEnvironmentKSQL string = "kSQL" - - // ObjectIdentifierEnvironmentKOracle captures enum value "kOracle" - ObjectIdentifierEnvironmentKOracle string = "kOracle" - - // ObjectIdentifierEnvironmentKExchange captures enum value "kExchange" - ObjectIdentifierEnvironmentKExchange string = "kExchange" - - // ObjectIdentifierEnvironmentKAD captures enum value "kAD" - ObjectIdentifierEnvironmentKAD string = "kAD" - - // ObjectIdentifierEnvironmentKView captures enum value "kView" - ObjectIdentifierEnvironmentKView string = "kView" - - // ObjectIdentifierEnvironmentKO365 captures enum value "kO365" - ObjectIdentifierEnvironmentKO365 string = "kO365" - - // ObjectIdentifierEnvironmentKHyperFlex captures enum value "kHyperFlex" - ObjectIdentifierEnvironmentKHyperFlex string = "kHyperFlex" - - // ObjectIdentifierEnvironmentKKubernetes captures enum value "kKubernetes" - ObjectIdentifierEnvironmentKKubernetes string = "kKubernetes" - - // ObjectIdentifierEnvironmentKCassandra captures enum value "kCassandra" - ObjectIdentifierEnvironmentKCassandra string = "kCassandra" - - // ObjectIdentifierEnvironmentKMongoDB captures enum value "kMongoDB" - ObjectIdentifierEnvironmentKMongoDB string = "kMongoDB" - - // ObjectIdentifierEnvironmentKCouchbase captures enum value "kCouchbase" - ObjectIdentifierEnvironmentKCouchbase string = "kCouchbase" - - // ObjectIdentifierEnvironmentKHdfs captures enum value "kHdfs" - ObjectIdentifierEnvironmentKHdfs string = "kHdfs" - - // ObjectIdentifierEnvironmentKHive captures enum value "kHive" - ObjectIdentifierEnvironmentKHive string = "kHive" - - // ObjectIdentifierEnvironmentKHBase captures enum value "kHBase" - ObjectIdentifierEnvironmentKHBase string = "kHBase" - - // ObjectIdentifierEnvironmentKUDA captures enum value "kUDA" - ObjectIdentifierEnvironmentKUDA string = "kUDA" - - // ObjectIdentifierEnvironmentKSfdc captures enum value "kSfdc" - ObjectIdentifierEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ObjectIdentifier) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectIdentifierTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectIdentifier) 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 validates this object identifier based on context it is used -func (m *ObjectIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectIdentifier) UnmarshalBinary(b []byte) error { - var res ObjectIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_identifiers_params.go b/v2/models/object_identifiers_params.go deleted file mode 100644 index 4dd50e2a..00000000 --- a/v2/models/object_identifiers_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectIdentifiersParams Extra parameters that can be specified to fetch entity identifiers. -// -// swagger:model ObjectIdentifiersParams -type ObjectIdentifiersParams struct { - - // List of unique identifiers/metadata to fetch entity identifier - ObjectUniqueIdentifiersList []*ObjectUniqueIdentifier `json:"objectUniqueIdentifiersList"` -} - -// Validate validates this object identifiers params -func (m *ObjectIdentifiersParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectUniqueIdentifiersList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectIdentifiersParams) validateObjectUniqueIdentifiersList(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectUniqueIdentifiersList) { // not required - return nil - } - - for i := 0; i < len(m.ObjectUniqueIdentifiersList); i++ { - if swag.IsZero(m.ObjectUniqueIdentifiersList[i]) { // not required - continue - } - - if m.ObjectUniqueIdentifiersList[i] != nil { - if err := m.ObjectUniqueIdentifiersList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectUniqueIdentifiersList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectUniqueIdentifiersList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object identifiers params based on the context it is used -func (m *ObjectIdentifiersParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectUniqueIdentifiersList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectIdentifiersParams) contextValidateObjectUniqueIdentifiersList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectUniqueIdentifiersList); i++ { - - if m.ObjectUniqueIdentifiersList[i] != nil { - - if swag.IsZero(m.ObjectUniqueIdentifiersList[i]) { // not required - return nil - } - - if err := m.ObjectUniqueIdentifiersList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectUniqueIdentifiersList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectUniqueIdentifiersList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectIdentifiersParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectIdentifiersParams) UnmarshalBinary(b []byte) error { - var res ObjectIdentifiersParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_info.go b/v2/models/object_info.go deleted file mode 100644 index be5840c3..00000000 --- a/v2/models/object_info.go +++ /dev/null @@ -1,325 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectInfo Specifies the object info. -// -// swagger:model ObjectInfo -type ObjectInfo struct { - - // global Id - GlobalID *GlobalID `json:"globalId,omitempty"` - - // object name - ObjectName *ObjectName `json:"objectName,omitempty"` - - // object type - ObjectType *ObjectType `json:"objectType,omitempty"` - - // Snapshots of the object. - Snapshots []*GaiaSnapshotInfo `json:"snapshots"` - - // base snapshot handle - BaseSnapshotHandle *SnapshotHandle `json:"baseSnapshotHandle,omitempty"` -} - -// Validate validates this object info -func (m *ObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGlobalID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBaseSnapshotHandle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInfo) validateGlobalID(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalID) { // not required - return nil - } - - if m.GlobalID != nil { - if err := m.GlobalID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalId") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) validateObjectName(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectName) { // not required - return nil - } - - if m.ObjectName != nil { - if err := m.ObjectName.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectName") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectName") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) validateObjectType(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - if m.ObjectType != nil { - if err := m.ObjectType.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectType") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) validateSnapshots(formats strfmt.Registry) error { - if swag.IsZero(m.Snapshots) { // not required - return nil - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInfo) validateBaseSnapshotHandle(formats strfmt.Registry) error { - if swag.IsZero(m.BaseSnapshotHandle) { // not required - return nil - } - - if m.BaseSnapshotHandle != nil { - if err := m.BaseSnapshotHandle.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseSnapshotHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseSnapshotHandle") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object info based on the context it is used -func (m *ObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGlobalID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectType(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBaseSnapshotHandle(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectInfo) contextValidateGlobalID(ctx context.Context, formats strfmt.Registry) error { - - if m.GlobalID != nil { - - if swag.IsZero(m.GlobalID) { // not required - return nil - } - - if err := m.GlobalID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalId") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) contextValidateObjectName(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectName != nil { - - if swag.IsZero(m.ObjectName) { // not required - return nil - } - - if err := m.ObjectName.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectName") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectName") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) contextValidateObjectType(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectType != nil { - - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - if err := m.ObjectType.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectType") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectType") - } - return err - } - } - - return nil -} - -func (m *ObjectInfo) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectInfo) contextValidateBaseSnapshotHandle(ctx context.Context, formats strfmt.Registry) error { - - if m.BaseSnapshotHandle != nil { - - if swag.IsZero(m.BaseSnapshotHandle) { // not required - return nil - } - - if err := m.BaseSnapshotHandle.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("baseSnapshotHandle") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("baseSnapshotHandle") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectInfo) UnmarshalBinary(b []byte) error { - var res ObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_last_run.go b/v2/models/object_last_run.go deleted file mode 100644 index 0a20599a..00000000 --- a/v2/models/object_last_run.go +++ /dev/null @@ -1,324 +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" -) - -// ObjectLastRun Specifies last run info of an object. -// -// swagger:model ObjectLastRun -type ObjectLastRun struct { - ObjectSummary - - // Specifies the last run id. - RunID string `json:"runId,omitempty"` - - // Specifies the protection group name of last run. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the protection group id of last run. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the policy name of last run. - PolicyName *string `json:"policyName,omitempty"` - - // Specifies the policy id of last run. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the status of last local back up run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - BackupRunStatus *string `json:"backupRunStatus,omitempty"` - - // Specifies the status of last archival run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - ArchivalRunStatus *string `json:"archivalRunStatus,omitempty"` - - // Specifies the status of last replication run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - ReplicationRunStatus *string `json:"replicationRunStatus,omitempty"` - - // Specifies if the sla is violated in last run. - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectLastRun) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - RunID string `json:"runId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - BackupRunStatus *string `json:"backupRunStatus,omitempty"` - - ArchivalRunStatus *string `json:"archivalRunStatus,omitempty"` - - ReplicationRunStatus *string `json:"replicationRunStatus,omitempty"` - - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.RunID = dataAO1.RunID - - m.ProtectionGroupName = dataAO1.ProtectionGroupName - - m.ProtectionGroupID = dataAO1.ProtectionGroupID - - m.PolicyName = dataAO1.PolicyName - - m.PolicyID = dataAO1.PolicyID - - m.BackupRunStatus = dataAO1.BackupRunStatus - - m.ArchivalRunStatus = dataAO1.ArchivalRunStatus - - m.ReplicationRunStatus = dataAO1.ReplicationRunStatus - - m.IsSLAViolated = dataAO1.IsSLAViolated - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectLastRun) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - RunID string `json:"runId,omitempty"` - - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - PolicyName *string `json:"policyName,omitempty"` - - PolicyID *string `json:"policyId,omitempty"` - - BackupRunStatus *string `json:"backupRunStatus,omitempty"` - - ArchivalRunStatus *string `json:"archivalRunStatus,omitempty"` - - ReplicationRunStatus *string `json:"replicationRunStatus,omitempty"` - - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - } - - dataAO1.RunID = m.RunID - - dataAO1.ProtectionGroupName = m.ProtectionGroupName - - dataAO1.ProtectionGroupID = m.ProtectionGroupID - - dataAO1.PolicyName = m.PolicyName - - dataAO1.PolicyID = m.PolicyID - - dataAO1.BackupRunStatus = m.BackupRunStatus - - dataAO1.ArchivalRunStatus = m.ArchivalRunStatus - - dataAO1.ReplicationRunStatus = m.ReplicationRunStatus - - dataAO1.IsSLAViolated = m.IsSLAViolated - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object last run -func (m *ObjectLastRun) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationRunStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectLastRunTypeBackupRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectLastRunTypeBackupRunStatusPropEnum = append(objectLastRunTypeBackupRunStatusPropEnum, v) - } -} - -// property enum -func (m *ObjectLastRun) validateBackupRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectLastRunTypeBackupRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectLastRun) validateBackupRunStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.BackupRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunStatusEnum("backupRunStatus", "body", *m.BackupRunStatus); err != nil { - return err - } - - return nil -} - -var objectLastRunTypeArchivalRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectLastRunTypeArchivalRunStatusPropEnum = append(objectLastRunTypeArchivalRunStatusPropEnum, v) - } -} - -// property enum -func (m *ObjectLastRun) validateArchivalRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectLastRunTypeArchivalRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectLastRun) validateArchivalRunStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.ArchivalRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateArchivalRunStatusEnum("archivalRunStatus", "body", *m.ArchivalRunStatus); err != nil { - return err - } - - return nil -} - -var objectLastRunTypeReplicationRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectLastRunTypeReplicationRunStatusPropEnum = append(objectLastRunTypeReplicationRunStatusPropEnum, v) - } -} - -// property enum -func (m *ObjectLastRun) validateReplicationRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectLastRunTypeReplicationRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectLastRun) validateReplicationRunStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.ReplicationRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateReplicationRunStatusEnum("replicationRunStatus", "body", *m.ReplicationRunStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this object last run based on the context it is used -func (m *ObjectLastRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectLastRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectLastRun) UnmarshalBinary(b []byte) error { - var res ObjectLastRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_linking_params.go b/v2/models/object_linking_params.go deleted file mode 100644 index 537aed19..00000000 --- a/v2/models/object_linking_params.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" -) - -// ObjectLinkingParams Specifies the parameters required for linking objects. This is currently used as a part of vm migration workflow. -// -// swagger:model ObjectLinkingParams -type ObjectLinkingParams struct { - CommonObjectsActionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectLinkingParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectsActionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectsActionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectLinkingParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonObjectsActionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object linking params -func (m *ObjectLinkingParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectsActionParams - if err := m.CommonObjectsActionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object linking params based on the context it is used -func (m *ObjectLinkingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectsActionParams - if err := m.CommonObjectsActionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectLinkingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectLinkingParams) UnmarshalBinary(b []byte) error { - var res ObjectLinkingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_linking_request.go b/v2/models/object_linking_request.go deleted file mode 100644 index 7bc8ecc3..00000000 --- a/v2/models/object_linking_request.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectLinkingRequest Request for linking replicated objects to failover objects on replication cluster. -// -// swagger:model ObjectLinkingRequest -type ObjectLinkingRequest struct { - - // Specifies the objectMap that will be used to create linking between given replicated source entity and newly restored entity on erplication cluster. - ObjectMap []*ReplicaFailoverObject `json:"objectMap"` -} - -// Validate validates this object linking request -func (m *ObjectLinkingRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectLinkingRequest) validateObjectMap(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectMap) { // not required - return nil - } - - for i := 0; i < len(m.ObjectMap); i++ { - if swag.IsZero(m.ObjectMap[i]) { // not required - continue - } - - if m.ObjectMap[i] != nil { - if err := m.ObjectMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object linking request based on the context it is used -func (m *ObjectLinkingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectLinkingRequest) contextValidateObjectMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectMap); i++ { - - if m.ObjectMap[i] != nil { - - if swag.IsZero(m.ObjectMap[i]) { // not required - return nil - } - - if err := m.ObjectMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectLinkingRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectLinkingRequest) UnmarshalBinary(b []byte) error { - var res ObjectLinkingRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_local_snapshot_info.go b/v2/models/object_local_snapshot_info.go deleted file mode 100644 index aa1bc6d5..00000000 --- a/v2/models/object_local_snapshot_info.go +++ /dev/null @@ -1,55 +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" -) - -// ObjectLocalSnapshotInfo Object Local Snapshot Information. -// -// Specifies the Local snapshot information for the object. -// -// swagger:model ObjectLocalSnapshotInfo -type ObjectLocalSnapshotInfo struct { - - // Specifies the id of the local snapshot for the object. - SnapshotID *string `json:"snapshotId,omitempty"` - - // Specifies the logical size of this snapshot in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` -} - -// Validate validates this object local snapshot info -func (m *ObjectLocalSnapshotInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object local snapshot info based on context it is used -func (m *ObjectLocalSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectLocalSnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectLocalSnapshotInfo) UnmarshalBinary(b []byte) error { - var res ObjectLocalSnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_mailbox_param.go b/v2/models/object_mailbox_param.go deleted file mode 100644 index 70b60e7a..00000000 --- a/v2/models/object_mailbox_param.go +++ /dev/null @@ -1,157 +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" -) - -// ObjectMailboxParam Specifies Mailbox recovery parameters associated with a user. -// -// swagger:model ObjectMailboxParam -type ObjectMailboxParam struct { - - // Specifies parameters to recover a Mailbox. - // Required: true - MailboxParams *MailboxParam `json:"mailboxParams"` - - // Specifies the Mailbox owner info. - // Required: true - OwnerInfo *CommonRecoverObjectSnapshotParams `json:"ownerInfo"` -} - -// Validate validates this object mailbox param -func (m *ObjectMailboxParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMailboxParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMailboxParam) validateMailboxParams(formats strfmt.Registry) error { - - if err := validate.Required("mailboxParams", "body", m.MailboxParams); err != nil { - return err - } - - if m.MailboxParams != nil { - if err := m.MailboxParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxParams") - } - return err - } - } - - return nil -} - -func (m *ObjectMailboxParam) validateOwnerInfo(formats strfmt.Registry) error { - - if err := validate.Required("ownerInfo", "body", m.OwnerInfo); err != nil { - return err - } - - if m.OwnerInfo != nil { - if err := m.OwnerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object mailbox param based on the context it is used -func (m *ObjectMailboxParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMailboxParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMailboxParam) contextValidateMailboxParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxParams != nil { - - if err := m.MailboxParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxParams") - } - return err - } - } - - return nil -} - -func (m *ObjectMailboxParam) contextValidateOwnerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerInfo != nil { - - if err := m.OwnerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMailboxParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMailboxParam) UnmarshalBinary(b []byte) error { - var res ObjectMailboxParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_ms_team_param.go b/v2/models/object_ms_team_param.go deleted file mode 100644 index bb03c150..00000000 --- a/v2/models/object_ms_team_param.go +++ /dev/null @@ -1,157 +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" -) - -// ObjectMsTeamParam Specifies recovery parameters associated with a Microsoft 365 Team. -// -// swagger:model ObjectMsTeamParam -type ObjectMsTeamParam struct { - - // Specifies parameters to recover a Microsoft 365 Team. - // Required: true - MsTeamParam *MsTeamParam `json:"msTeamParam"` - - // Specifies the Microsoft 365 Team recover object info. - // Required: true - RecoverObject *CommonRecoverObjectSnapshotParams `json:"recoverObject"` -} - -// Validate validates this object ms team param -func (m *ObjectMsTeamParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMsTeamParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMsTeamParam) validateMsTeamParam(formats strfmt.Registry) error { - - if err := validate.Required("msTeamParam", "body", m.MsTeamParam); err != nil { - return err - } - - if m.MsTeamParam != nil { - if err := m.MsTeamParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamParam") - } - return err - } - } - - return nil -} - -func (m *ObjectMsTeamParam) validateRecoverObject(formats strfmt.Registry) error { - - if err := validate.Required("recoverObject", "body", m.RecoverObject); err != nil { - return err - } - - if m.RecoverObject != nil { - if err := m.RecoverObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object ms team param based on the context it is used -func (m *ObjectMsTeamParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMsTeamParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectMsTeamParam) contextValidateMsTeamParam(ctx context.Context, formats strfmt.Registry) error { - - if m.MsTeamParam != nil { - - if err := m.MsTeamParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamParam") - } - return err - } - } - - return nil -} - -func (m *ObjectMsTeamParam) contextValidateRecoverObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverObject != nil { - - if err := m.RecoverObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMsTeamParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMsTeamParam) UnmarshalBinary(b []byte) error { - var res ObjectMsTeamParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_mutation_type.go b/v2/models/object_mutation_type.go deleted file mode 100644 index 5a9a5ea5..00000000 --- a/v2/models/object_mutation_type.go +++ /dev/null @@ -1,113 +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" -) - -// ObjectMutationType Salesforce object mutation types for search. -// -// Salesforce object mutation types for search. -// -// swagger:model ObjectMutationType -type ObjectMutationType struct { - - // Salesforce object mutation types for search. - // Enum: ["All","Added","Removed","Changed"] - Type string `json:"type,omitempty"` -} - -// Validate validates this object mutation type -func (m *ObjectMutationType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectMutationTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["All","Added","Removed","Changed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectMutationTypeTypeTypePropEnum = append(objectMutationTypeTypeTypePropEnum, v) - } -} - -const ( - - // ObjectMutationTypeTypeAll captures enum value "All" - ObjectMutationTypeTypeAll string = "All" - - // ObjectMutationTypeTypeAdded captures enum value "Added" - ObjectMutationTypeTypeAdded string = "Added" - - // ObjectMutationTypeTypeRemoved captures enum value "Removed" - ObjectMutationTypeTypeRemoved string = "Removed" - - // ObjectMutationTypeTypeChanged captures enum value "Changed" - ObjectMutationTypeTypeChanged string = "Changed" -) - -// prop value enum -func (m *ObjectMutationType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectMutationTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectMutationType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object mutation type based on context it is used -func (m *ObjectMutationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectMutationType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectMutationType) UnmarshalBinary(b []byte) error { - var res ObjectMutationType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_name.go b/v2/models/object_name.go deleted file mode 100644 index 17f88875..00000000 --- a/v2/models/object_name.go +++ /dev/null @@ -1,27 +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" -) - -// ObjectName Specifies the object name -// -// swagger:model ObjectName -type ObjectName string - -// Validate validates this object name -func (m ObjectName) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object name based on context it is used -func (m ObjectName) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/object_one_drive_param.go b/v2/models/object_one_drive_param.go deleted file mode 100644 index 92d7252c..00000000 --- a/v2/models/object_one_drive_param.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectOneDriveParam Specifies OneDrive recovery parameters associated with a user. -// -// swagger:model ObjectOneDriveParam -type ObjectOneDriveParam struct { - - // Specifies parameters to recover a OneDrive. - OneDriveParams []*OneDriveParam `json:"oneDriveParams"` - - // Specifies the OneDrive owner info. - OwnerInfo *CommonRecoverObjectSnapshotParams `json:"ownerInfo,omitempty"` -} - -// Validate validates this object one drive param -func (m *ObjectOneDriveParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOneDriveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectOneDriveParam) validateOneDriveParams(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveParams) { // not required - return nil - } - - for i := 0; i < len(m.OneDriveParams); i++ { - if swag.IsZero(m.OneDriveParams[i]) { // not required - continue - } - - if m.OneDriveParams[i] != nil { - if err := m.OneDriveParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectOneDriveParam) validateOwnerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if m.OwnerInfo != nil { - if err := m.OwnerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object one drive param based on the context it is used -func (m *ObjectOneDriveParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOneDriveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectOneDriveParam) contextValidateOneDriveParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OneDriveParams); i++ { - - if m.OneDriveParams[i] != nil { - - if swag.IsZero(m.OneDriveParams[i]) { // not required - return nil - } - - if err := m.OneDriveParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectOneDriveParam) contextValidateOwnerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerInfo != nil { - - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if err := m.OwnerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectOneDriveParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectOneDriveParam) UnmarshalBinary(b []byte) error { - var res ObjectOneDriveParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_policy.go b/v2/models/object_policy.go deleted file mode 100644 index 688517ac..00000000 --- a/v2/models/object_policy.go +++ /dev/null @@ -1,135 +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" -) - -// ObjectPolicy Protection Policy -// -// Specifies the protection policy for protecting an object. -// -// swagger:model ObjectPolicy -type ObjectPolicy struct { - - // Specifies the id of protection policy. - // Required: true - ID *string `json:"id"` - - // Specifies the protection type. - // Required: true - // Enum: ["kNative","kSnapshotManager","kPhysical","kSQL","kOracle"] - ProtectionType *string `json:"protectionType"` -} - -// Validate validates this object policy -func (m *ObjectPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectPolicy) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var objectPolicyTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNative","kSnapshotManager","kPhysical","kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectPolicyTypeProtectionTypePropEnum = append(objectPolicyTypeProtectionTypePropEnum, v) - } -} - -const ( - - // ObjectPolicyProtectionTypeKNative captures enum value "kNative" - ObjectPolicyProtectionTypeKNative string = "kNative" - - // ObjectPolicyProtectionTypeKSnapshotManager captures enum value "kSnapshotManager" - ObjectPolicyProtectionTypeKSnapshotManager string = "kSnapshotManager" - - // ObjectPolicyProtectionTypeKPhysical captures enum value "kPhysical" - ObjectPolicyProtectionTypeKPhysical string = "kPhysical" - - // ObjectPolicyProtectionTypeKSQL captures enum value "kSQL" - ObjectPolicyProtectionTypeKSQL string = "kSQL" - - // ObjectPolicyProtectionTypeKOracle captures enum value "kOracle" - ObjectPolicyProtectionTypeKOracle string = "kOracle" -) - -// prop value enum -func (m *ObjectPolicy) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectPolicyTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectPolicy) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object policy based on context it is used -func (m *ObjectPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectPolicy) UnmarshalBinary(b []byte) error { - var res ObjectPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_progress_info.go b/v2/models/object_progress_info.go deleted file mode 100644 index 03b7cbc8..00000000 --- a/v2/models/object_progress_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectProgressInfo Specifies the progress of an object. -// -// swagger:model ObjectProgressInfo -type ObjectProgressInfo struct { - ObjectIdentifier - - ProgressTaskInfo - - // Specifies progress for failed attempts of this object. - FailedAttempts []*ProgressTaskInfo `json:"failedAttempts"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectProgressInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectIdentifier = aO0 - - // AO1 - var aO1 ProgressTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ProgressTaskInfo = aO1 - - // AO2 - var dataAO2 struct { - FailedAttempts []*ProgressTaskInfo `json:"failedAttempts"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.FailedAttempts = dataAO2.FailedAttempts - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectProgressInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.ObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ProgressTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - FailedAttempts []*ProgressTaskInfo `json:"failedAttempts"` - } - - dataAO2.FailedAttempts = m.FailedAttempts - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object progress info -func (m *ObjectProgressInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailedAttempts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectProgressInfo) validateFailedAttempts(formats strfmt.Registry) error { - - if swag.IsZero(m.FailedAttempts) { // not required - return nil - } - - for i := 0; i < len(m.FailedAttempts); i++ { - if swag.IsZero(m.FailedAttempts[i]) { // not required - continue - } - - if m.FailedAttempts[i] != nil { - if err := m.FailedAttempts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object progress info based on the context it is used -func (m *ObjectProgressInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFailedAttempts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectProgressInfo) contextValidateFailedAttempts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailedAttempts); i++ { - - if m.FailedAttempts[i] != nil { - - if swag.IsZero(m.FailedAttempts[i]) { // not required - return nil - } - - if err := m.FailedAttempts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProgressInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProgressInfo) UnmarshalBinary(b []byte) error { - var res ObjectProgressInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_group_summary.go b/v2/models/object_protection_group_summary.go deleted file mode 100644 index ed9b4537..00000000 --- a/v2/models/object_protection_group_summary.go +++ /dev/null @@ -1,378 +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" -) - -// ObjectProtectionGroupSummary Specifies a summary of a protection group protecting this object. -// -// swagger:model ObjectProtectionGroupSummary -type ObjectProtectionGroupSummary struct { - - // Specifies the protection group name. - Name *string `json:"name,omitempty"` - - // Specifies the protection group id. - ID *string `json:"id,omitempty"` - - // Specifies the protection type of the job if any. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"] - ProtectionEnvType *string `json:"protectionEnvType,omitempty"` - - // Specifies the policy name for this group. - PolicyName *string `json:"policyName,omitempty"` - - // Specifies the policy id for this group. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the storage domain id of this group. Format is clusterId:clusterIncarnationId:storageDomainId. - StorageDomainID *string `json:"storageDomainId,omitempty"` - - // Specifies the status of last local back up run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - LastBackupRunStatus *string `json:"lastBackupRunStatus,omitempty"` - - // Specifies the status of last archival run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - LastArchivalRunStatus *string `json:"lastArchivalRunStatus,omitempty"` - - // Specifies the status of last replication run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - LastReplicationRunStatus *string `json:"lastReplicationRunStatus,omitempty"` - - // Specifies if the sla is violated in last run. - LastRunSLAViolated *bool `json:"lastRunSlaViolated,omitempty"` -} - -// Validate validates this object protection group summary -func (m *ObjectProtectionGroupSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionEnvType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastBackupRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastArchivalRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastReplicationRunStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectProtectionGroupSummaryTypeProtectionEnvTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionGroupSummaryTypeProtectionEnvTypePropEnum = append(objectProtectionGroupSummaryTypeProtectionEnvTypePropEnum, v) - } -} - -const ( - - // ObjectProtectionGroupSummaryProtectionEnvTypeKAgent captures enum value "kAgent" - ObjectProtectionGroupSummaryProtectionEnvTypeKAgent string = "kAgent" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKNative captures enum value "kNative" - ObjectProtectionGroupSummaryProtectionEnvTypeKNative string = "kNative" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKSnapshotManager captures enum value "kSnapshotManager" - ObjectProtectionGroupSummaryProtectionEnvTypeKSnapshotManager string = "kSnapshotManager" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ObjectProtectionGroupSummaryProtectionEnvTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ObjectProtectionGroupSummaryProtectionEnvTypeKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKAwsS3 captures enum value "kAwsS3" - ObjectProtectionGroupSummaryProtectionEnvTypeKAwsS3 string = "kAwsS3" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ObjectProtectionGroupSummaryProtectionEnvTypeKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKAzureSQL captures enum value "kAzureSQL" - ObjectProtectionGroupSummaryProtectionEnvTypeKAzureSQL string = "kAzureSQL" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKFile captures enum value "kFile" - ObjectProtectionGroupSummaryProtectionEnvTypeKFile string = "kFile" - - // ObjectProtectionGroupSummaryProtectionEnvTypeKVolume captures enum value "kVolume" - ObjectProtectionGroupSummaryProtectionEnvTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *ObjectProtectionGroupSummary) validateProtectionEnvTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionGroupSummaryTypeProtectionEnvTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionGroupSummary) validateProtectionEnvType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionEnvType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionEnvTypeEnum("protectionEnvType", "body", *m.ProtectionEnvType); err != nil { - return err - } - - return nil -} - -var objectProtectionGroupSummaryTypeLastBackupRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionGroupSummaryTypeLastBackupRunStatusPropEnum = append(objectProtectionGroupSummaryTypeLastBackupRunStatusPropEnum, v) - } -} - -const ( - - // ObjectProtectionGroupSummaryLastBackupRunStatusAccepted captures enum value "Accepted" - ObjectProtectionGroupSummaryLastBackupRunStatusAccepted string = "Accepted" - - // ObjectProtectionGroupSummaryLastBackupRunStatusRunning captures enum value "Running" - ObjectProtectionGroupSummaryLastBackupRunStatusRunning string = "Running" - - // ObjectProtectionGroupSummaryLastBackupRunStatusCanceled captures enum value "Canceled" - ObjectProtectionGroupSummaryLastBackupRunStatusCanceled string = "Canceled" - - // ObjectProtectionGroupSummaryLastBackupRunStatusCanceling captures enum value "Canceling" - ObjectProtectionGroupSummaryLastBackupRunStatusCanceling string = "Canceling" - - // ObjectProtectionGroupSummaryLastBackupRunStatusFailed captures enum value "Failed" - ObjectProtectionGroupSummaryLastBackupRunStatusFailed string = "Failed" - - // ObjectProtectionGroupSummaryLastBackupRunStatusMissed captures enum value "Missed" - ObjectProtectionGroupSummaryLastBackupRunStatusMissed string = "Missed" - - // ObjectProtectionGroupSummaryLastBackupRunStatusSucceeded captures enum value "Succeeded" - ObjectProtectionGroupSummaryLastBackupRunStatusSucceeded string = "Succeeded" - - // ObjectProtectionGroupSummaryLastBackupRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ObjectProtectionGroupSummaryLastBackupRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ObjectProtectionGroupSummaryLastBackupRunStatusOnHold captures enum value "OnHold" - ObjectProtectionGroupSummaryLastBackupRunStatusOnHold string = "OnHold" - - // ObjectProtectionGroupSummaryLastBackupRunStatusFinalizing captures enum value "Finalizing" - ObjectProtectionGroupSummaryLastBackupRunStatusFinalizing string = "Finalizing" - - // ObjectProtectionGroupSummaryLastBackupRunStatusSkipped captures enum value "Skipped" - ObjectProtectionGroupSummaryLastBackupRunStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *ObjectProtectionGroupSummary) validateLastBackupRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionGroupSummaryTypeLastBackupRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionGroupSummary) validateLastBackupRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastBackupRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastBackupRunStatusEnum("lastBackupRunStatus", "body", *m.LastBackupRunStatus); err != nil { - return err - } - - return nil -} - -var objectProtectionGroupSummaryTypeLastArchivalRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionGroupSummaryTypeLastArchivalRunStatusPropEnum = append(objectProtectionGroupSummaryTypeLastArchivalRunStatusPropEnum, v) - } -} - -const ( - - // ObjectProtectionGroupSummaryLastArchivalRunStatusAccepted captures enum value "Accepted" - ObjectProtectionGroupSummaryLastArchivalRunStatusAccepted string = "Accepted" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusRunning captures enum value "Running" - ObjectProtectionGroupSummaryLastArchivalRunStatusRunning string = "Running" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusCanceled captures enum value "Canceled" - ObjectProtectionGroupSummaryLastArchivalRunStatusCanceled string = "Canceled" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusCanceling captures enum value "Canceling" - ObjectProtectionGroupSummaryLastArchivalRunStatusCanceling string = "Canceling" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusFailed captures enum value "Failed" - ObjectProtectionGroupSummaryLastArchivalRunStatusFailed string = "Failed" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusMissed captures enum value "Missed" - ObjectProtectionGroupSummaryLastArchivalRunStatusMissed string = "Missed" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusSucceeded captures enum value "Succeeded" - ObjectProtectionGroupSummaryLastArchivalRunStatusSucceeded string = "Succeeded" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ObjectProtectionGroupSummaryLastArchivalRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusOnHold captures enum value "OnHold" - ObjectProtectionGroupSummaryLastArchivalRunStatusOnHold string = "OnHold" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusFinalizing captures enum value "Finalizing" - ObjectProtectionGroupSummaryLastArchivalRunStatusFinalizing string = "Finalizing" - - // ObjectProtectionGroupSummaryLastArchivalRunStatusSkipped captures enum value "Skipped" - ObjectProtectionGroupSummaryLastArchivalRunStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *ObjectProtectionGroupSummary) validateLastArchivalRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionGroupSummaryTypeLastArchivalRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionGroupSummary) validateLastArchivalRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastArchivalRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastArchivalRunStatusEnum("lastArchivalRunStatus", "body", *m.LastArchivalRunStatus); err != nil { - return err - } - - return nil -} - -var objectProtectionGroupSummaryTypeLastReplicationRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionGroupSummaryTypeLastReplicationRunStatusPropEnum = append(objectProtectionGroupSummaryTypeLastReplicationRunStatusPropEnum, v) - } -} - -const ( - - // ObjectProtectionGroupSummaryLastReplicationRunStatusAccepted captures enum value "Accepted" - ObjectProtectionGroupSummaryLastReplicationRunStatusAccepted string = "Accepted" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusRunning captures enum value "Running" - ObjectProtectionGroupSummaryLastReplicationRunStatusRunning string = "Running" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusCanceled captures enum value "Canceled" - ObjectProtectionGroupSummaryLastReplicationRunStatusCanceled string = "Canceled" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusCanceling captures enum value "Canceling" - ObjectProtectionGroupSummaryLastReplicationRunStatusCanceling string = "Canceling" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusFailed captures enum value "Failed" - ObjectProtectionGroupSummaryLastReplicationRunStatusFailed string = "Failed" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusMissed captures enum value "Missed" - ObjectProtectionGroupSummaryLastReplicationRunStatusMissed string = "Missed" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusSucceeded captures enum value "Succeeded" - ObjectProtectionGroupSummaryLastReplicationRunStatusSucceeded string = "Succeeded" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ObjectProtectionGroupSummaryLastReplicationRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusOnHold captures enum value "OnHold" - ObjectProtectionGroupSummaryLastReplicationRunStatusOnHold string = "OnHold" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusFinalizing captures enum value "Finalizing" - ObjectProtectionGroupSummaryLastReplicationRunStatusFinalizing string = "Finalizing" - - // ObjectProtectionGroupSummaryLastReplicationRunStatusSkipped captures enum value "Skipped" - ObjectProtectionGroupSummaryLastReplicationRunStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *ObjectProtectionGroupSummary) validateLastReplicationRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionGroupSummaryTypeLastReplicationRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionGroupSummary) validateLastReplicationRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastReplicationRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastReplicationRunStatusEnum("lastReplicationRunStatus", "body", *m.LastReplicationRunStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object protection group summary based on context it is used -func (m *ObjectProtectionGroupSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionGroupSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionGroupSummary) UnmarshalBinary(b []byte) error { - var res ObjectProtectionGroupSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_info.go b/v2/models/object_protection_info.go deleted file mode 100644 index 8b41f00a..00000000 --- a/v2/models/object_protection_info.go +++ /dev/null @@ -1,289 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectProtectionInfo Specifies the object info on cluster. -// -// swagger:model ObjectProtectionInfo -type ObjectProtectionInfo struct { - - // Specifies the object id. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the source id. - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the view id for the object. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the region id where this object belongs to. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the cluster id where this object belongs to. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id where this object belongs to. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // List of Tenants the object belongs to. - TenantIds []string `json:"tenantIds"` - - // Specifies whether the object is deleted. Deleted objects can't be protected but can be recovered or unprotected. - IsDeleted *bool `json:"isDeleted,omitempty"` - - // Specifies a list of protection groups protecting this object. - ProtectionGroups []*ObjectProtectionGroupSummary `json:"protectionGroups"` - - // Specifies a list of object protections. - ObjectBackupConfiguration []*ProtectionSummary `json:"objectBackupConfiguration"` - - // Specifies the status of the object's last protection run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - LastRunStatus *string `json:"lastRunStatus,omitempty"` -} - -// Validate validates this object protection info -func (m *ObjectProtectionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectBackupConfiguration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRunStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectProtectionInfo) validateProtectionGroups(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroups) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionGroups); i++ { - if swag.IsZero(m.ProtectionGroups[i]) { // not required - continue - } - - if m.ProtectionGroups[i] != nil { - if err := m.ProtectionGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectProtectionInfo) validateObjectBackupConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectBackupConfiguration) { // not required - return nil - } - - for i := 0; i < len(m.ObjectBackupConfiguration); i++ { - if swag.IsZero(m.ObjectBackupConfiguration[i]) { // not required - continue - } - - if m.ObjectBackupConfiguration[i] != nil { - if err := m.ObjectBackupConfiguration[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupConfiguration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupConfiguration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var objectProtectionInfoTypeLastRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionInfoTypeLastRunStatusPropEnum = append(objectProtectionInfoTypeLastRunStatusPropEnum, v) - } -} - -const ( - - // ObjectProtectionInfoLastRunStatusAccepted captures enum value "Accepted" - ObjectProtectionInfoLastRunStatusAccepted string = "Accepted" - - // ObjectProtectionInfoLastRunStatusRunning captures enum value "Running" - ObjectProtectionInfoLastRunStatusRunning string = "Running" - - // ObjectProtectionInfoLastRunStatusCanceled captures enum value "Canceled" - ObjectProtectionInfoLastRunStatusCanceled string = "Canceled" - - // ObjectProtectionInfoLastRunStatusCanceling captures enum value "Canceling" - ObjectProtectionInfoLastRunStatusCanceling string = "Canceling" - - // ObjectProtectionInfoLastRunStatusFailed captures enum value "Failed" - ObjectProtectionInfoLastRunStatusFailed string = "Failed" - - // ObjectProtectionInfoLastRunStatusMissed captures enum value "Missed" - ObjectProtectionInfoLastRunStatusMissed string = "Missed" - - // ObjectProtectionInfoLastRunStatusSucceeded captures enum value "Succeeded" - ObjectProtectionInfoLastRunStatusSucceeded string = "Succeeded" - - // ObjectProtectionInfoLastRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ObjectProtectionInfoLastRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ObjectProtectionInfoLastRunStatusOnHold captures enum value "OnHold" - ObjectProtectionInfoLastRunStatusOnHold string = "OnHold" - - // ObjectProtectionInfoLastRunStatusFinalizing captures enum value "Finalizing" - ObjectProtectionInfoLastRunStatusFinalizing string = "Finalizing" - - // ObjectProtectionInfoLastRunStatusSkipped captures enum value "Skipped" - ObjectProtectionInfoLastRunStatusSkipped string = "Skipped" - - // ObjectProtectionInfoLastRunStatusPaused captures enum value "Paused" - ObjectProtectionInfoLastRunStatusPaused string = "Paused" -) - -// prop value enum -func (m *ObjectProtectionInfo) validateLastRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionInfoTypeLastRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionInfo) validateLastRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastRunStatusEnum("lastRunStatus", "body", *m.LastRunStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this object protection info based on the context it is used -func (m *ObjectProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectBackupConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectProtectionInfo) contextValidateProtectionGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionGroups); i++ { - - if m.ProtectionGroups[i] != nil { - - if swag.IsZero(m.ProtectionGroups[i]) { // not required - return nil - } - - if err := m.ProtectionGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectProtectionInfo) contextValidateObjectBackupConfiguration(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectBackupConfiguration); i++ { - - if m.ObjectBackupConfiguration[i] != nil { - - if swag.IsZero(m.ObjectBackupConfiguration[i]) { // not required - return nil - } - - if err := m.ObjectBackupConfiguration[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupConfiguration" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupConfiguration" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionInfo) UnmarshalBinary(b []byte) error { - var res ObjectProtectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_run_info.go b/v2/models/object_protection_run_info.go deleted file mode 100644 index 2568884c..00000000 --- a/v2/models/object_protection_run_info.go +++ /dev/null @@ -1,633 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectProtectionRunInfo Object Protection Run Info. -// -// Specifies the run info for a run protecting an object. -// -// swagger:model ObjectProtectionRunInfo -type ObjectProtectionRunInfo struct { - - // Specifies the ID of the protection run. - RunID *string `json:"runId,omitempty"` - - // Type of Protection run. 'kRegular' indicates an incremental (CBT) backup. Incremental backups utilizing CBT (if supported) are captured of the target protection objects. The first run of a kRegular schedule captures all the blocks. 'kFull' indicates a full (no CBT) backup. A complete backup (all blocks) of the target protection objects are always captured and Change Block Tracking (CBT) is not utilized. 'kLog' indicates a Database Log backup. Capture the database transaction logs to allow rolling back to a specific point in time. 'kSystem' indicates system volume backup. It produces an image for bare metal recovery. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Indicated if SLA has been violated for this run. - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - // ProtectionGroupId to which this run belongs. This will only be populated if the object is protected by a protection group. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Name of the Protection Group to which this run belongs. This will only be populated if the object is protected by a protection group. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies if snapshots for this run has been deleted. - IsLocalSnapshotsDeleted *bool `json:"isLocalSnapshotsDeleted,omitempty"` - - // Specifies if this protection run is a replication run. - IsReplicationRun *bool `json:"isReplicationRun,omitempty"` - - // Specifies whether the run is a CAD run if cloud archive direct feature is enabled. If this field is true, the primary backup copy will only be available at the given archived location. - IsCloudArchivalDirect *bool `json:"isCloudArchivalDirect,omitempty"` - - // Specifies the unique id of the Protection Policy associated with the Protection Run. The Policy provides retry settings Protection Schedules, Priority, SLA, etc. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies Specifies the name of the Protection Policy. - PolicyName *string `json:"policyName,omitempty"` - - // Specifies the Storage Domain (View Box) ID where this Protection Run writes data. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the list of tenants that have permissions for this protection group run. - Permissions []*Tenant `json:"permissions"` - - // Specifies the information of the primary cluster if this run is a replication run. - OriginClusterIdentifier *ClusterIdentifier `json:"originClusterIdentifier,omitempty"` - - // ProtectionGroupId to which this run belongs on the primary cluster if this run is a replication run. - OriginProtectionGroupID *string `json:"originProtectionGroupId,omitempty"` - - // Information about local snapshot run for this object. - LocalSnapshotInfo *BackupRun `json:"localSnapshotInfo,omitempty"` - - // Information about snapshot run on the original cluster. This only applies to replication run. - OriginalBackupInfo *BackupRun `json:"originalBackupInfo,omitempty"` - - // Information about replication run for this object. - ReplicationInfo *ReplicationRun `json:"replicationInfo,omitempty"` - - // Information about archival run for this object. - ArchivalInfo *ArchivalRun `json:"archivalInfo,omitempty"` - - // Information about Cloud Spin run for this object. - CloudSpinInfo *CloudSpinRun `json:"cloudSpinInfo,omitempty"` - - // Information about onprem deploy run for this object. - OnPremDeployInfo *OnPremDeployRun `json:"onPremDeployInfo,omitempty"` - - // Specifies if object's snapshot is on legal hold. - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - // Specifies WORM retention type for the local backeup. When a WORM retention type is specified, the snapshots of the Protection Groups using this policy will be kept until the maximum of the snapshot retention time. During that time, the snapshots cannot be deleted.
'Compliance' implies WORM retention is set for compliance reason.
'Administrative' implies WORM retention is set for administrative purposes. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Specifies a label with which this run is created. Only applicable for user triggered protect now action. - RunLabel *string `json:"runLabel,omitempty"` -} - -// Validate validates this object protection run info -func (m *ObjectProtectionRunInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginClusterIdentifier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalBackupInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnPremDeployInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectProtectionRunInfoTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionRunInfoTypeRunTypePropEnum = append(objectProtectionRunInfoTypeRunTypePropEnum, v) - } -} - -const ( - - // ObjectProtectionRunInfoRunTypeKRegular captures enum value "kRegular" - ObjectProtectionRunInfoRunTypeKRegular string = "kRegular" - - // ObjectProtectionRunInfoRunTypeKFull captures enum value "kFull" - ObjectProtectionRunInfoRunTypeKFull string = "kFull" - - // ObjectProtectionRunInfoRunTypeKLog captures enum value "kLog" - ObjectProtectionRunInfoRunTypeKLog string = "kLog" - - // ObjectProtectionRunInfoRunTypeKSystem captures enum value "kSystem" - ObjectProtectionRunInfoRunTypeKSystem string = "kSystem" - - // ObjectProtectionRunInfoRunTypeKHydrateCDP captures enum value "kHydrateCDP" - ObjectProtectionRunInfoRunTypeKHydrateCDP string = "kHydrateCDP" - - // ObjectProtectionRunInfoRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - ObjectProtectionRunInfoRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *ObjectProtectionRunInfo) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionRunInfoTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionRunInfo) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateOriginClusterIdentifier(formats strfmt.Registry) error { - if swag.IsZero(m.OriginClusterIdentifier) { // not required - return nil - } - - if m.OriginClusterIdentifier != nil { - if err := m.OriginClusterIdentifier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originClusterIdentifier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originClusterIdentifier") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateLocalSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if m.LocalSnapshotInfo != nil { - if err := m.LocalSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateOriginalBackupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if m.OriginalBackupInfo != nil { - if err := m.OriginalBackupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateReplicationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if m.ReplicationInfo != nil { - if err := m.ReplicationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateArchivalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if m.ArchivalInfo != nil { - if err := m.ArchivalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateCloudSpinInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if m.CloudSpinInfo != nil { - if err := m.CloudSpinInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) validateOnPremDeployInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OnPremDeployInfo) { // not required - return nil - } - - if m.OnPremDeployInfo != nil { - if err := m.OnPremDeployInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onPremDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onPremDeployInfo") - } - return err - } - } - - return nil -} - -var objectProtectionRunInfoTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionRunInfoTypeDataLockPropEnum = append(objectProtectionRunInfoTypeDataLockPropEnum, v) - } -} - -const ( - - // ObjectProtectionRunInfoDataLockCompliance captures enum value "Compliance" - ObjectProtectionRunInfoDataLockCompliance string = "Compliance" - - // ObjectProtectionRunInfoDataLockAdministrative captures enum value "Administrative" - ObjectProtectionRunInfoDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *ObjectProtectionRunInfo) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionRunInfoTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionRunInfo) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this object protection run info based on the context it is used -func (m *ObjectProtectionRunInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginClusterIdentifier(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalBackupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudSpinInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnPremDeployInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateOriginClusterIdentifier(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginClusterIdentifier != nil { - - if swag.IsZero(m.OriginClusterIdentifier) { // not required - return nil - } - - if err := m.OriginClusterIdentifier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originClusterIdentifier") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originClusterIdentifier") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateLocalSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalSnapshotInfo != nil { - - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if err := m.LocalSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateOriginalBackupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalBackupInfo != nil { - - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if err := m.OriginalBackupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateReplicationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationInfo != nil { - - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if err := m.ReplicationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateArchivalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalInfo != nil { - - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if err := m.ArchivalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateCloudSpinInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudSpinInfo != nil { - - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if err := m.CloudSpinInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectProtectionRunInfo) contextValidateOnPremDeployInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OnPremDeployInfo != nil { - - if swag.IsZero(m.OnPremDeployInfo) { // not required - return nil - } - - if err := m.OnPremDeployInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onPremDeployInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onPremDeployInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionRunInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionRunInfo) UnmarshalBinary(b []byte) error { - var res ObjectProtectionRunInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_run_summary.go b/v2/models/object_protection_run_summary.go deleted file mode 100644 index a0b5fa54..00000000 --- a/v2/models/object_protection_run_summary.go +++ /dev/null @@ -1,118 +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" -) - -// ObjectProtectionRunSummary Object Protection Run Summary. -// -// Specifies the response body of the get object runs request. -// -// swagger:model ObjectProtectionRunSummary -type ObjectProtectionRunSummary struct { - ObjectIdentifier - - ObjectProtectionRunInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectProtectionRunSummary) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectIdentifier = aO0 - - // AO1 - var aO1 ObjectProtectionRunInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ObjectProtectionRunInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectProtectionRunSummary) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ObjectProtectionRunInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object protection run summary -func (m *ObjectProtectionRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ObjectProtectionRunInfo - if err := m.ObjectProtectionRunInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object protection run summary based on the context it is used -func (m *ObjectProtectionRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ObjectProtectionRunInfo - if err := m.ObjectProtectionRunInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionRunSummary) UnmarshalBinary(b []byte) error { - var res ObjectProtectionRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_stats_summary.go b/v2/models/object_protection_stats_summary.go deleted file mode 100644 index c4b343b4..00000000 --- a/v2/models/object_protection_stats_summary.go +++ /dev/null @@ -1,221 +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" -) - -// ObjectProtectionStatsSummary Object Protection Stats Summary -// -// Specifies the count and size of protected and unprotected objects for a given environment. -// -// swagger:model ObjectProtectionStatsSummary -type ObjectProtectionStatsSummary 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 count of the protected leaf objects. - ProtectedCount *int64 `json:"protectedCount,omitempty"` - - // Specifies the count of the unprotected leaf objects. - UnprotectedCount *int64 `json:"unprotectedCount,omitempty"` - - // Specifies the count of protected leaf objects which were deleted from the source after being protected. - DeletedProtectedCount *int64 `json:"deletedProtectedCount,omitempty"` - - // Specifies the protected logical size in bytes. - ProtectedSizeBytes *int64 `json:"protectedSizeBytes,omitempty"` - - // Specifies the unprotected logical size in bytes. - UnprotectedSizeBytes *int64 `json:"unprotectedSizeBytes,omitempty"` -} - -// Validate validates this object protection stats summary -func (m *ObjectProtectionStatsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectProtectionStatsSummaryTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionStatsSummaryTypeEnvironmentPropEnum = append(objectProtectionStatsSummaryTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ObjectProtectionStatsSummaryEnvironmentKVMware captures enum value "kVMware" - ObjectProtectionStatsSummaryEnvironmentKVMware string = "kVMware" - - // ObjectProtectionStatsSummaryEnvironmentKHyperV captures enum value "kHyperV" - ObjectProtectionStatsSummaryEnvironmentKHyperV string = "kHyperV" - - // ObjectProtectionStatsSummaryEnvironmentKAzure captures enum value "kAzure" - ObjectProtectionStatsSummaryEnvironmentKAzure string = "kAzure" - - // ObjectProtectionStatsSummaryEnvironmentKKVM captures enum value "kKVM" - ObjectProtectionStatsSummaryEnvironmentKKVM string = "kKVM" - - // ObjectProtectionStatsSummaryEnvironmentKAWS captures enum value "kAWS" - ObjectProtectionStatsSummaryEnvironmentKAWS string = "kAWS" - - // ObjectProtectionStatsSummaryEnvironmentKAzureSQL captures enum value "kAzureSQL" - ObjectProtectionStatsSummaryEnvironmentKAzureSQL string = "kAzureSQL" - - // ObjectProtectionStatsSummaryEnvironmentKAcropolis captures enum value "kAcropolis" - ObjectProtectionStatsSummaryEnvironmentKAcropolis string = "kAcropolis" - - // ObjectProtectionStatsSummaryEnvironmentKGCP captures enum value "kGCP" - ObjectProtectionStatsSummaryEnvironmentKGCP string = "kGCP" - - // ObjectProtectionStatsSummaryEnvironmentKPhysical captures enum value "kPhysical" - ObjectProtectionStatsSummaryEnvironmentKPhysical string = "kPhysical" - - // ObjectProtectionStatsSummaryEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ObjectProtectionStatsSummaryEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ObjectProtectionStatsSummaryEnvironmentKIsilon captures enum value "kIsilon" - ObjectProtectionStatsSummaryEnvironmentKIsilon string = "kIsilon" - - // ObjectProtectionStatsSummaryEnvironmentKNetapp captures enum value "kNetapp" - ObjectProtectionStatsSummaryEnvironmentKNetapp string = "kNetapp" - - // ObjectProtectionStatsSummaryEnvironmentKGenericNas captures enum value "kGenericNas" - ObjectProtectionStatsSummaryEnvironmentKGenericNas string = "kGenericNas" - - // ObjectProtectionStatsSummaryEnvironmentKFlashBlade captures enum value "kFlashBlade" - ObjectProtectionStatsSummaryEnvironmentKFlashBlade string = "kFlashBlade" - - // ObjectProtectionStatsSummaryEnvironmentKElastifile captures enum value "kElastifile" - ObjectProtectionStatsSummaryEnvironmentKElastifile string = "kElastifile" - - // ObjectProtectionStatsSummaryEnvironmentKGPFS captures enum value "kGPFS" - ObjectProtectionStatsSummaryEnvironmentKGPFS string = "kGPFS" - - // ObjectProtectionStatsSummaryEnvironmentKPure captures enum value "kPure" - ObjectProtectionStatsSummaryEnvironmentKPure string = "kPure" - - // ObjectProtectionStatsSummaryEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ObjectProtectionStatsSummaryEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ObjectProtectionStatsSummaryEnvironmentKNimble captures enum value "kNimble" - ObjectProtectionStatsSummaryEnvironmentKNimble string = "kNimble" - - // ObjectProtectionStatsSummaryEnvironmentKSQL captures enum value "kSQL" - ObjectProtectionStatsSummaryEnvironmentKSQL string = "kSQL" - - // ObjectProtectionStatsSummaryEnvironmentKOracle captures enum value "kOracle" - ObjectProtectionStatsSummaryEnvironmentKOracle string = "kOracle" - - // ObjectProtectionStatsSummaryEnvironmentKExchange captures enum value "kExchange" - ObjectProtectionStatsSummaryEnvironmentKExchange string = "kExchange" - - // ObjectProtectionStatsSummaryEnvironmentKAD captures enum value "kAD" - ObjectProtectionStatsSummaryEnvironmentKAD string = "kAD" - - // ObjectProtectionStatsSummaryEnvironmentKView captures enum value "kView" - ObjectProtectionStatsSummaryEnvironmentKView string = "kView" - - // ObjectProtectionStatsSummaryEnvironmentKO365 captures enum value "kO365" - ObjectProtectionStatsSummaryEnvironmentKO365 string = "kO365" - - // ObjectProtectionStatsSummaryEnvironmentKHyperFlex captures enum value "kHyperFlex" - ObjectProtectionStatsSummaryEnvironmentKHyperFlex string = "kHyperFlex" - - // ObjectProtectionStatsSummaryEnvironmentKKubernetes captures enum value "kKubernetes" - ObjectProtectionStatsSummaryEnvironmentKKubernetes string = "kKubernetes" - - // ObjectProtectionStatsSummaryEnvironmentKCassandra captures enum value "kCassandra" - ObjectProtectionStatsSummaryEnvironmentKCassandra string = "kCassandra" - - // ObjectProtectionStatsSummaryEnvironmentKMongoDB captures enum value "kMongoDB" - ObjectProtectionStatsSummaryEnvironmentKMongoDB string = "kMongoDB" - - // ObjectProtectionStatsSummaryEnvironmentKCouchbase captures enum value "kCouchbase" - ObjectProtectionStatsSummaryEnvironmentKCouchbase string = "kCouchbase" - - // ObjectProtectionStatsSummaryEnvironmentKHdfs captures enum value "kHdfs" - ObjectProtectionStatsSummaryEnvironmentKHdfs string = "kHdfs" - - // ObjectProtectionStatsSummaryEnvironmentKHive captures enum value "kHive" - ObjectProtectionStatsSummaryEnvironmentKHive string = "kHive" - - // ObjectProtectionStatsSummaryEnvironmentKHBase captures enum value "kHBase" - ObjectProtectionStatsSummaryEnvironmentKHBase string = "kHBase" - - // ObjectProtectionStatsSummaryEnvironmentKUDA captures enum value "kUDA" - ObjectProtectionStatsSummaryEnvironmentKUDA string = "kUDA" - - // ObjectProtectionStatsSummaryEnvironmentKSfdc captures enum value "kSfdc" - ObjectProtectionStatsSummaryEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ObjectProtectionStatsSummary) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionStatsSummaryTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionStatsSummary) 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 validates this object protection stats summary based on context it is used -func (m *ObjectProtectionStatsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionStatsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionStatsSummary) UnmarshalBinary(b []byte) error { - var res ObjectProtectionStatsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_protection_summary.go b/v2/models/object_protection_summary.go deleted file mode 100644 index 548f67f6..00000000 --- a/v2/models/object_protection_summary.go +++ /dev/null @@ -1,169 +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" -) - -// ObjectProtectionSummary Specifies the summary of a protected object. -// -// swagger:model ObjectProtectionSummary -type ObjectProtectionSummary struct { - ObjectSummary - - // Specifies the type of error which occurred during creation of the object protection. - // Enum: ["InternalError","AlreadyExistsError"] - ErrorType *string `json:"errorType,omitempty"` - - // Specifies the error message if an error occurred during creation of the object protection. - Error *string `json:"error,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectProtectionSummary) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - ErrorType *string `json:"errorType,omitempty"` - - Error *string `json:"error,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ErrorType = dataAO1.ErrorType - - m.Error = dataAO1.Error - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectProtectionSummary) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ErrorType *string `json:"errorType,omitempty"` - - Error *string `json:"error,omitempty"` - } - - dataAO1.ErrorType = m.ErrorType - - dataAO1.Error = m.Error - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object protection summary -func (m *ObjectProtectionSummary) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateErrorType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectProtectionSummaryTypeErrorTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InternalError","AlreadyExistsError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectProtectionSummaryTypeErrorTypePropEnum = append(objectProtectionSummaryTypeErrorTypePropEnum, v) - } -} - -// property enum -func (m *ObjectProtectionSummary) validateErrorTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectProtectionSummaryTypeErrorTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectProtectionSummary) validateErrorType(formats strfmt.Registry) error { - - if swag.IsZero(m.ErrorType) { // not required - return nil - } - - // value enum - if err := m.validateErrorTypeEnum("errorType", "body", *m.ErrorType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this object protection summary based on the context it is used -func (m *ObjectProtectionSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectProtectionSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectProtectionSummary) UnmarshalBinary(b []byte) error { - var res ObjectProtectionSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_run_result.go b/v2/models/object_run_result.go deleted file mode 100644 index 817aad9c..00000000 --- a/v2/models/object_run_result.go +++ /dev/null @@ -1,369 +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" -) - -// ObjectRunResult Snapshot, replication, archival results for an object. -// -// Snapshot, replication, archival results for an object. -// -// swagger:model ObjectRunResult -type ObjectRunResult struct { - - // Summary information about the object. - Object *ObjectSummary `json:"object,omitempty"` - - // Information about local snapshot run for this object. - LocalSnapshotInfo *BackupRun `json:"localSnapshotInfo,omitempty"` - - // Information about snapshot run on the original cluster. This only applies to replication run. - OriginalBackupInfo *BackupRun `json:"originalBackupInfo,omitempty"` - - // Information about replication run for this object. - ReplicationInfo *ReplicationRun `json:"replicationInfo,omitempty"` - - // Information about archival run for this object. - ArchivalInfo *ArchivalRun `json:"archivalInfo,omitempty"` - - // Information about Cloud Spin run for this object. - CloudSpinInfo *CloudSpinRun `json:"cloudSpinInfo,omitempty"` - - // Specifies if object's snapshot is on legal hold. - OnLegalHold *bool `json:"onLegalHold,omitempty"` -} - -// Validate validates this object run result -func (m *ObjectRunResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalBackupInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectRunResult) validateObject(formats strfmt.Registry) error { - if swag.IsZero(m.Object) { // not required - return nil - } - - if m.Object != nil { - if err := m.Object.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) validateLocalSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if m.LocalSnapshotInfo != nil { - if err := m.LocalSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) validateOriginalBackupInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if m.OriginalBackupInfo != nil { - if err := m.OriginalBackupInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) validateReplicationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if m.ReplicationInfo != nil { - if err := m.ReplicationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) validateArchivalInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if m.ArchivalInfo != nil { - if err := m.ArchivalInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) validateCloudSpinInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if m.CloudSpinInfo != nil { - if err := m.CloudSpinInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object run result based on the context it is used -func (m *ObjectRunResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalBackupInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudSpinInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectRunResult) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { - - if m.Object != nil { - - if swag.IsZero(m.Object) { // not required - return nil - } - - if err := m.Object.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("object") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("object") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) contextValidateLocalSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalSnapshotInfo != nil { - - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if err := m.LocalSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) contextValidateOriginalBackupInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalBackupInfo != nil { - - if swag.IsZero(m.OriginalBackupInfo) { // not required - return nil - } - - if err := m.OriginalBackupInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalBackupInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalBackupInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) contextValidateReplicationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationInfo != nil { - - if swag.IsZero(m.ReplicationInfo) { // not required - return nil - } - - if err := m.ReplicationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) contextValidateArchivalInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalInfo != nil { - - if swag.IsZero(m.ArchivalInfo) { // not required - return nil - } - - if err := m.ArchivalInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectRunResult) contextValidateCloudSpinInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudSpinInfo != nil { - - if swag.IsZero(m.CloudSpinInfo) { // not required - return nil - } - - if err := m.CloudSpinInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectRunResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectRunResult) UnmarshalBinary(b []byte) error { - var res ObjectRunResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_services_key_mapping.go b/v2/models/object_services_key_mapping.go deleted file mode 100644 index 49005fc7..00000000 --- a/v2/models/object_services_key_mapping.go +++ /dev/null @@ -1,116 +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" -) - -// ObjectServicesKeyMapping View object services key mapping config. -// -// Specifies object services key mapping config for view. -// -// swagger:model ObjectServicesKeyMapping -type ObjectServicesKeyMapping struct { - - // Specifies object services key mapping config for view. - // Enum: ["Random","Short","Long","Hierarchical","ObjectId"] - Type string `json:"type,omitempty"` -} - -// Validate validates this object services key mapping -func (m *ObjectServicesKeyMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectServicesKeyMappingTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Random","Short","Long","Hierarchical","ObjectId"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectServicesKeyMappingTypeTypePropEnum = append(objectServicesKeyMappingTypeTypePropEnum, v) - } -} - -const ( - - // ObjectServicesKeyMappingTypeRandom captures enum value "Random" - ObjectServicesKeyMappingTypeRandom string = "Random" - - // ObjectServicesKeyMappingTypeShort captures enum value "Short" - ObjectServicesKeyMappingTypeShort string = "Short" - - // ObjectServicesKeyMappingTypeLong captures enum value "Long" - ObjectServicesKeyMappingTypeLong string = "Long" - - // ObjectServicesKeyMappingTypeHierarchical captures enum value "Hierarchical" - ObjectServicesKeyMappingTypeHierarchical string = "Hierarchical" - - // ObjectServicesKeyMappingTypeObjectID captures enum value "ObjectId" - ObjectServicesKeyMappingTypeObjectID string = "ObjectId" -) - -// prop value enum -func (m *ObjectServicesKeyMapping) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectServicesKeyMappingTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectServicesKeyMapping) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object services key mapping based on context it is used -func (m *ObjectServicesKeyMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectServicesKeyMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectServicesKeyMapping) UnmarshalBinary(b []byte) error { - var res ObjectServicesKeyMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_site_param.go b/v2/models/object_site_param.go deleted file mode 100644 index bc2cce1d..00000000 --- a/v2/models/object_site_param.go +++ /dev/null @@ -1,171 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectSiteParam Specifies Site recovery parameters. -// -// swagger:model ObjectSiteParam -type ObjectSiteParam struct { - - // Specifies the parameters to recover a document library - DocumentLibraryParams []*OneDriveParam `json:"documentLibraryParams"` - - // Specifies the Site owner info. - // Required: true - OwnerInfo *CommonRecoverObjectSnapshotParams `json:"ownerInfo"` -} - -// Validate validates this object site param -func (m *ObjectSiteParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentLibraryParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSiteParam) validateDocumentLibraryParams(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentLibraryParams) { // not required - return nil - } - - for i := 0; i < len(m.DocumentLibraryParams); i++ { - if swag.IsZero(m.DocumentLibraryParams[i]) { // not required - continue - } - - if m.DocumentLibraryParams[i] != nil { - if err := m.DocumentLibraryParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSiteParam) validateOwnerInfo(formats strfmt.Registry) error { - - if err := validate.Required("ownerInfo", "body", m.OwnerInfo); err != nil { - return err - } - - if m.OwnerInfo != nil { - if err := m.OwnerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object site param based on the context it is used -func (m *ObjectSiteParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDocumentLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSiteParam) contextValidateDocumentLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DocumentLibraryParams); i++ { - - if m.DocumentLibraryParams[i] != nil { - - if swag.IsZero(m.DocumentLibraryParams[i]) { // not required - return nil - } - - if err := m.DocumentLibraryParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSiteParam) contextValidateOwnerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerInfo != nil { - - if err := m.OwnerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSiteParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSiteParam) UnmarshalBinary(b []byte) error { - var res ObjectSiteParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_snapshot.go b/v2/models/object_snapshot.go deleted file mode 100644 index 151e4abd..00000000 --- a/v2/models/object_snapshot.go +++ /dev/null @@ -1,1138 +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" -) - -// ObjectSnapshot Object Snapshot. -// -// Specifies an Object Snapshot. -// -// swagger:model ObjectSnapshot -type ObjectSnapshot struct { - - // Specifies the id of the snapshot. - ID *string `json:"id,omitempty"` - - // Specifies the target type where the Object's snapshot resides. - // Enum: ["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"] - SnapshotTargetType *string `json:"snapshotTargetType,omitempty"` - - // Specifies the ownership context for the target. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies the indexing status of objects in this snapshot.
'InProgress' indicates the indexing is in progress.
'Done' indicates indexing is done.
'NoIndex' indicates indexing is not applicable.
'Error' indicates indexing failed with error. - // Enum: ["InProgress","Done","NoIndex","Error"] - IndexingStatus *string `json:"indexingStatus,omitempty"` - - // Specifies id of the Protection Group. - // Pattern: ^\d+:\d+:\d+$ - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies name of the Protection Group. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies id of the Protection Group Run. - // Pattern: ^\d+:\d+$ - ProtectionGroupRunID *string `json:"protectionGroupRunId,omitempty"` - - // Specifies the instance id of the protection run which create the snapshot. - RunInstanceID *int64 `json:"runInstanceId,omitempty"` - - // Specifies the start time of the run in micro seconds. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Specifies the source protection group id in case of replication. - SourceGroupID *string `json:"sourceGroupId,omitempty"` - - // Specifies the type of protection run created this snapshot. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Specifies the snapshot environment. - // 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 timestamp in Unix time epoch in microseconds when the snapshot is taken for the specified Object. - SnapshotTimestampUsecs *int64 `json:"snapshotTimestampUsecs,omitempty"` - - // Specifies the expiry time of the snapshot in Unix timestamp epoch in microseconds. If the snapshot has no expiry, this property will not be set. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Specifies the Storage Domain id where the snapshot of object is present. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies if this snapshot has datalock. - HasDataLock *bool `json:"hasDataLock,omitempty"` - - // Specifies if this snapshot is on legalhold. - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - // Specifies the object id which the snapshot is taken from. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the object name which the snapshot is taken from. - ObjectName *string `json:"objectName,omitempty"` - - // Specifies the object source id which the snapshot is taken from. - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the region id where this snapshot belongs to. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the cluster id where this snapshot belongs to. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id where this snapshot belongs to. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the parameters specific to AWS type snapshot. - AwsParams *AwsSnapshotParams `json:"awsParams,omitempty"` - - // Specifies the parameters specific to Azure type snapshot. - AzureParams *AzureSnapshotParams `json:"azureParams,omitempty"` - - // Specifies the parameters specific to NetApp type snapshot. - ElastifileParams *CommonNasObjectParams `json:"elastifileParams,omitempty"` - - // Specifies the external target information if this is an archival snapshot. - ExternalTargetInfo *ArchivalTargetSummaryInfo `json:"externalTargetInfo,omitempty"` - - // Specifies the parameters specific to Flashblade type snapshot. - FlashbladeParams *FlashbladeObjectParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters specific to Generic NAS type snapshot. - GenericNasParams *CommonNasObjectParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters specific to GPFS type snapshot. - GpfsParams *CommonNasObjectParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters specific to HyperV type snapshot. - HypervParams *HypervSnapshotParams `json:"hypervParams,omitempty"` - - // Specifies the parameters specific to Isilon type snapshot. - IsilonParams *IsilonObjectParams `json:"isilonParams,omitempty"` - - // Specifies the parameters specific to NetApp type snapshot. - NetappParams *NetappObjectParams `json:"netappParams,omitempty"` - - // Specifies the parameters specific to Physical type snapshot. - PhysicalParams *PhysicalSnapshotParams `json:"physicalParams,omitempty"` - - // Specifies the parameters specific to Salesforce type snapshot. - SfdcParams *SfdcObjectParams `json:"sfdcParams,omitempty"` -} - -// Validate validates this object snapshot -func (m *ObjectSnapshot) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionGroupID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionGroupRunID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalTargetInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectSnapshotTypeSnapshotTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotTypeSnapshotTargetTypePropEnum = append(objectSnapshotTypeSnapshotTargetTypePropEnum, v) - } -} - -const ( - - // ObjectSnapshotSnapshotTargetTypeLocal captures enum value "Local" - ObjectSnapshotSnapshotTargetTypeLocal string = "Local" - - // ObjectSnapshotSnapshotTargetTypeArchival captures enum value "Archival" - ObjectSnapshotSnapshotTargetTypeArchival string = "Archival" - - // ObjectSnapshotSnapshotTargetTypeRpaasArchival captures enum value "RpaasArchival" - ObjectSnapshotSnapshotTargetTypeRpaasArchival string = "RpaasArchival" - - // ObjectSnapshotSnapshotTargetTypeStorageArraySnapshot captures enum value "StorageArraySnapshot" - ObjectSnapshotSnapshotTargetTypeStorageArraySnapshot string = "StorageArraySnapshot" - - // ObjectSnapshotSnapshotTargetTypeRemote captures enum value "Remote" - ObjectSnapshotSnapshotTargetTypeRemote string = "Remote" -) - -// prop value enum -func (m *ObjectSnapshot) validateSnapshotTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotTypeSnapshotTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshot) validateSnapshotTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetType) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotTargetTypeEnum("snapshotTargetType", "body", *m.SnapshotTargetType); err != nil { - return err - } - - return nil -} - -var objectSnapshotTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotTypeOwnershipContextPropEnum = append(objectSnapshotTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // ObjectSnapshotOwnershipContextLocal captures enum value "Local" - ObjectSnapshotOwnershipContextLocal string = "Local" - - // ObjectSnapshotOwnershipContextFortKnox captures enum value "FortKnox" - ObjectSnapshotOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *ObjectSnapshot) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshot) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -var objectSnapshotTypeIndexingStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InProgress","Done","NoIndex","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotTypeIndexingStatusPropEnum = append(objectSnapshotTypeIndexingStatusPropEnum, v) - } -} - -const ( - - // ObjectSnapshotIndexingStatusInProgress captures enum value "InProgress" - ObjectSnapshotIndexingStatusInProgress string = "InProgress" - - // ObjectSnapshotIndexingStatusDone captures enum value "Done" - ObjectSnapshotIndexingStatusDone string = "Done" - - // ObjectSnapshotIndexingStatusNoIndex captures enum value "NoIndex" - ObjectSnapshotIndexingStatusNoIndex string = "NoIndex" - - // ObjectSnapshotIndexingStatusError captures enum value "Error" - ObjectSnapshotIndexingStatusError string = "Error" -) - -// prop value enum -func (m *ObjectSnapshot) validateIndexingStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotTypeIndexingStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshot) validateIndexingStatus(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingStatus) { // not required - return nil - } - - // value enum - if err := m.validateIndexingStatusEnum("indexingStatus", "body", *m.IndexingStatus); err != nil { - return err - } - - return nil -} - -func (m *ObjectSnapshot) validateProtectionGroupID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupID) { // not required - return nil - } - - if err := validate.Pattern("protectionGroupId", "body", *m.ProtectionGroupID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *ObjectSnapshot) validateProtectionGroupRunID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupRunID) { // not required - return nil - } - - if err := validate.Pattern("protectionGroupRunId", "body", *m.ProtectionGroupRunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -var objectSnapshotTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotTypeRunTypePropEnum = append(objectSnapshotTypeRunTypePropEnum, v) - } -} - -const ( - - // ObjectSnapshotRunTypeKRegular captures enum value "kRegular" - ObjectSnapshotRunTypeKRegular string = "kRegular" - - // ObjectSnapshotRunTypeKFull captures enum value "kFull" - ObjectSnapshotRunTypeKFull string = "kFull" - - // ObjectSnapshotRunTypeKLog captures enum value "kLog" - ObjectSnapshotRunTypeKLog string = "kLog" - - // ObjectSnapshotRunTypeKSystem captures enum value "kSystem" - ObjectSnapshotRunTypeKSystem string = "kSystem" - - // ObjectSnapshotRunTypeKHydrateCDP captures enum value "kHydrateCDP" - ObjectSnapshotRunTypeKHydrateCDP string = "kHydrateCDP" - - // ObjectSnapshotRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - ObjectSnapshotRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *ObjectSnapshot) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshot) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -var objectSnapshotTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotTypeEnvironmentPropEnum = append(objectSnapshotTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ObjectSnapshotEnvironmentKVMware captures enum value "kVMware" - ObjectSnapshotEnvironmentKVMware string = "kVMware" - - // ObjectSnapshotEnvironmentKHyperV captures enum value "kHyperV" - ObjectSnapshotEnvironmentKHyperV string = "kHyperV" - - // ObjectSnapshotEnvironmentKAzure captures enum value "kAzure" - ObjectSnapshotEnvironmentKAzure string = "kAzure" - - // ObjectSnapshotEnvironmentKKVM captures enum value "kKVM" - ObjectSnapshotEnvironmentKKVM string = "kKVM" - - // ObjectSnapshotEnvironmentKAWS captures enum value "kAWS" - ObjectSnapshotEnvironmentKAWS string = "kAWS" - - // ObjectSnapshotEnvironmentKAzureSQL captures enum value "kAzureSQL" - ObjectSnapshotEnvironmentKAzureSQL string = "kAzureSQL" - - // ObjectSnapshotEnvironmentKAcropolis captures enum value "kAcropolis" - ObjectSnapshotEnvironmentKAcropolis string = "kAcropolis" - - // ObjectSnapshotEnvironmentKGCP captures enum value "kGCP" - ObjectSnapshotEnvironmentKGCP string = "kGCP" - - // ObjectSnapshotEnvironmentKPhysical captures enum value "kPhysical" - ObjectSnapshotEnvironmentKPhysical string = "kPhysical" - - // ObjectSnapshotEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ObjectSnapshotEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ObjectSnapshotEnvironmentKIsilon captures enum value "kIsilon" - ObjectSnapshotEnvironmentKIsilon string = "kIsilon" - - // ObjectSnapshotEnvironmentKNetapp captures enum value "kNetapp" - ObjectSnapshotEnvironmentKNetapp string = "kNetapp" - - // ObjectSnapshotEnvironmentKGenericNas captures enum value "kGenericNas" - ObjectSnapshotEnvironmentKGenericNas string = "kGenericNas" - - // ObjectSnapshotEnvironmentKFlashBlade captures enum value "kFlashBlade" - ObjectSnapshotEnvironmentKFlashBlade string = "kFlashBlade" - - // ObjectSnapshotEnvironmentKElastifile captures enum value "kElastifile" - ObjectSnapshotEnvironmentKElastifile string = "kElastifile" - - // ObjectSnapshotEnvironmentKGPFS captures enum value "kGPFS" - ObjectSnapshotEnvironmentKGPFS string = "kGPFS" - - // ObjectSnapshotEnvironmentKPure captures enum value "kPure" - ObjectSnapshotEnvironmentKPure string = "kPure" - - // ObjectSnapshotEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ObjectSnapshotEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ObjectSnapshotEnvironmentKNimble captures enum value "kNimble" - ObjectSnapshotEnvironmentKNimble string = "kNimble" - - // ObjectSnapshotEnvironmentKSQL captures enum value "kSQL" - ObjectSnapshotEnvironmentKSQL string = "kSQL" - - // ObjectSnapshotEnvironmentKOracle captures enum value "kOracle" - ObjectSnapshotEnvironmentKOracle string = "kOracle" - - // ObjectSnapshotEnvironmentKExchange captures enum value "kExchange" - ObjectSnapshotEnvironmentKExchange string = "kExchange" - - // ObjectSnapshotEnvironmentKAD captures enum value "kAD" - ObjectSnapshotEnvironmentKAD string = "kAD" - - // ObjectSnapshotEnvironmentKView captures enum value "kView" - ObjectSnapshotEnvironmentKView string = "kView" - - // ObjectSnapshotEnvironmentKO365 captures enum value "kO365" - ObjectSnapshotEnvironmentKO365 string = "kO365" - - // ObjectSnapshotEnvironmentKHyperFlex captures enum value "kHyperFlex" - ObjectSnapshotEnvironmentKHyperFlex string = "kHyperFlex" - - // ObjectSnapshotEnvironmentKKubernetes captures enum value "kKubernetes" - ObjectSnapshotEnvironmentKKubernetes string = "kKubernetes" - - // ObjectSnapshotEnvironmentKCassandra captures enum value "kCassandra" - ObjectSnapshotEnvironmentKCassandra string = "kCassandra" - - // ObjectSnapshotEnvironmentKMongoDB captures enum value "kMongoDB" - ObjectSnapshotEnvironmentKMongoDB string = "kMongoDB" - - // ObjectSnapshotEnvironmentKCouchbase captures enum value "kCouchbase" - ObjectSnapshotEnvironmentKCouchbase string = "kCouchbase" - - // ObjectSnapshotEnvironmentKHdfs captures enum value "kHdfs" - ObjectSnapshotEnvironmentKHdfs string = "kHdfs" - - // ObjectSnapshotEnvironmentKHive captures enum value "kHive" - ObjectSnapshotEnvironmentKHive string = "kHive" - - // ObjectSnapshotEnvironmentKHBase captures enum value "kHBase" - ObjectSnapshotEnvironmentKHBase string = "kHBase" - - // ObjectSnapshotEnvironmentKUDA captures enum value "kUDA" - ObjectSnapshotEnvironmentKUDA string = "kUDA" - - // ObjectSnapshotEnvironmentKSfdc captures enum value "kSfdc" - ObjectSnapshotEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ObjectSnapshot) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshot) 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 -} - -func (m *ObjectSnapshot) validateAwsParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateAzureParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateElastifileParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateExternalTargetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if m.ExternalTargetInfo != nil { - if err := m.ExternalTargetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateFlashbladeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateGenericNasParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateGpfsParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateHypervParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateIsilonParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateNetappParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) validateSfdcParams(formats strfmt.Registry) error { - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object snapshot based on the context it is used -func (m *ObjectSnapshot) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternalTargetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshot) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateExternalTargetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalTargetInfo != nil { - - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if err := m.ExternalTargetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *ObjectSnapshot) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshot) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshot) UnmarshalBinary(b []byte) error { - var res ObjectSnapshot - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_snapshot_id_params.go b/v2/models/object_snapshot_id_params.go deleted file mode 100644 index 83b3052a..00000000 --- a/v2/models/object_snapshot_id_params.go +++ /dev/null @@ -1,85 +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" -) - -// ObjectSnapshotIDParams ObjectSnapshotIdParams -// -// Params to fetch snapshot id for an object. -// -// swagger:model ObjectSnapshotIdParams -type ObjectSnapshotIDParams struct { - - // Specifies the protection group id. - // Required: true - ProtectionGroupID *string `json:"protectionGroupId"` - - // Specifies the instance id of the snapshot. - SnapshotJobInstanceID *int64 `json:"snapshotJobInstanceId,omitempty"` - - // Specifies the start time of the snapshot in micro seconds. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` - - // Specifies the source protection group id. - SourceGroupID *string `json:"sourceGroupId,omitempty"` - - // Specifies the vault id. - VaultID *int64 `json:"vaultId,omitempty"` -} - -// Validate validates this object snapshot Id params -func (m *ObjectSnapshotIDParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotIDParams) validateProtectionGroupID(formats strfmt.Registry) error { - - if err := validate.Required("protectionGroupId", "body", m.ProtectionGroupID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object snapshot Id params based on context it is used -func (m *ObjectSnapshotIDParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotIDParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotIDParams) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotIDParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_snapshot_id_result.go b/v2/models/object_snapshot_id_result.go deleted file mode 100644 index be30a5ee..00000000 --- a/v2/models/object_snapshot_id_result.go +++ /dev/null @@ -1,71 +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" -) - -// ObjectSnapshotIDResult object snapshot Id result -// -// swagger:model ObjectSnapshotIdResult -type ObjectSnapshotIDResult struct { - - // snapshot Id - // Required: true - SnapshotID *string `json:"snapshotId"` -} - -// Validate validates this object snapshot Id result -func (m *ObjectSnapshotIDResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotIDResult) validateSnapshotID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotId", "body", m.SnapshotID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object snapshot Id result based on context it is used -func (m *ObjectSnapshotIDResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotIDResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotIDResult) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotIDResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_snapshot_volume_info.go b/v2/models/object_snapshot_volume_info.go deleted file mode 100644 index 37b36624..00000000 --- a/v2/models/object_snapshot_volume_info.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" -) - -// ObjectSnapshotVolumeInfo Detail info of an object snapshot volume. -// -// swagger:model ObjectSnapshotVolumeInfo -type ObjectSnapshotVolumeInfo struct { - CommonObjectSnapshotVolumeParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectSnapshotVolumeInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectSnapshotVolumeParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectSnapshotVolumeParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectSnapshotVolumeInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonObjectSnapshotVolumeParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object snapshot volume info -func (m *ObjectSnapshotVolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectSnapshotVolumeParams - if err := m.CommonObjectSnapshotVolumeParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object snapshot volume info based on the context it is used -func (m *ObjectSnapshotVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectSnapshotVolumeParams - if err := m.CommonObjectSnapshotVolumeParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotVolumeInfo) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_snapshots_info.go b/v2/models/object_snapshots_info.go deleted file mode 100644 index 809ad062..00000000 --- a/v2/models/object_snapshots_info.go +++ /dev/null @@ -1,321 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectSnapshotsInfo Object Snapshots Information. -// -// Specifies the snapshots information for every Protection Group for a given object. -// -// swagger:model ObjectSnapshotsInfo -type ObjectSnapshotsInfo struct { - - // Specifies the archival snapshots information. - ArchivalSnapshotsInfo []*ObjectArchivalSnapshotInfo `json:"archivalSnapshotsInfo"` - - // Specifies the indexing status of objects in this snapshot.
'InProgress' indicates the indexing is in progress.
'Done' indicates indexing is done.
'NoIndex' indicates indexing is not applicable.
'Error' indicates indexing failed with error. - // Enum: ["InProgress","Done","NoIndex","Error"] - IndexingStatus *string `json:"indexingStatus,omitempty"` - - // Specifies id of the Protection Group. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies name of the Protection Group. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the instance id of the protection run which create the snapshot. - RunInstanceID *int64 `json:"runInstanceId,omitempty"` - - // Specifies the source protection group id in case of replication. - SourceGroupID *string `json:"sourceGroupId,omitempty"` - - // Specifies the Storage Domain id where the backup data of Object is present. - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the name of Storage Domain id where the backup data of Object is present - StorageDomainName *string `json:"storageDomainName,omitempty"` - - // Specifies the id of Protection Group Run. - ProtectionRunID *string `json:"protectionRunId,omitempty"` - - // Specifies the type of protection run created this snapshot. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - RunType *string `json:"runType,omitempty"` - - // Specifies the start time of Protection Group Run in Unix timestamp epoch in microseconds. - ProtectionRunStartTimeUsecs *int64 `json:"protectionRunStartTimeUsecs,omitempty"` - - // Specifies the end time of Protection Group Run in Unix timestamp epoch in microseconds. - ProtectionRunEndTimeUsecs *int64 `json:"protectionRunEndTimeUsecs,omitempty"` - - // Specifies the local snapshot information. - LocalSnapshotInfo *ObjectLocalSnapshotInfo `json:"localSnapshotInfo,omitempty"` -} - -// Validate validates this object snapshots info -func (m *ObjectSnapshotsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArchivalSnapshotsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotsInfo) validateArchivalSnapshotsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalSnapshotsInfo) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalSnapshotsInfo); i++ { - if swag.IsZero(m.ArchivalSnapshotsInfo[i]) { // not required - continue - } - - if m.ArchivalSnapshotsInfo[i] != nil { - if err := m.ArchivalSnapshotsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalSnapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalSnapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var objectSnapshotsInfoTypeIndexingStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InProgress","Done","NoIndex","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotsInfoTypeIndexingStatusPropEnum = append(objectSnapshotsInfoTypeIndexingStatusPropEnum, v) - } -} - -const ( - - // ObjectSnapshotsInfoIndexingStatusInProgress captures enum value "InProgress" - ObjectSnapshotsInfoIndexingStatusInProgress string = "InProgress" - - // ObjectSnapshotsInfoIndexingStatusDone captures enum value "Done" - ObjectSnapshotsInfoIndexingStatusDone string = "Done" - - // ObjectSnapshotsInfoIndexingStatusNoIndex captures enum value "NoIndex" - ObjectSnapshotsInfoIndexingStatusNoIndex string = "NoIndex" - - // ObjectSnapshotsInfoIndexingStatusError captures enum value "Error" - ObjectSnapshotsInfoIndexingStatusError string = "Error" -) - -// prop value enum -func (m *ObjectSnapshotsInfo) validateIndexingStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotsInfoTypeIndexingStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshotsInfo) validateIndexingStatus(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingStatus) { // not required - return nil - } - - // value enum - if err := m.validateIndexingStatusEnum("indexingStatus", "body", *m.IndexingStatus); err != nil { - return err - } - - return nil -} - -var objectSnapshotsInfoTypeRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSnapshotsInfoTypeRunTypePropEnum = append(objectSnapshotsInfoTypeRunTypePropEnum, v) - } -} - -const ( - - // ObjectSnapshotsInfoRunTypeKRegular captures enum value "kRegular" - ObjectSnapshotsInfoRunTypeKRegular string = "kRegular" - - // ObjectSnapshotsInfoRunTypeKFull captures enum value "kFull" - ObjectSnapshotsInfoRunTypeKFull string = "kFull" - - // ObjectSnapshotsInfoRunTypeKLog captures enum value "kLog" - ObjectSnapshotsInfoRunTypeKLog string = "kLog" - - // ObjectSnapshotsInfoRunTypeKSystem captures enum value "kSystem" - ObjectSnapshotsInfoRunTypeKSystem string = "kSystem" - - // ObjectSnapshotsInfoRunTypeKHydrateCDP captures enum value "kHydrateCDP" - ObjectSnapshotsInfoRunTypeKHydrateCDP string = "kHydrateCDP" - - // ObjectSnapshotsInfoRunTypeKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - ObjectSnapshotsInfoRunTypeKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *ObjectSnapshotsInfo) validateRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSnapshotsInfoTypeRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSnapshotsInfo) validateRunType(formats strfmt.Registry) error { - if swag.IsZero(m.RunType) { // not required - return nil - } - - // value enum - if err := m.validateRunTypeEnum("runType", "body", *m.RunType); err != nil { - return err - } - - return nil -} - -func (m *ObjectSnapshotsInfo) validateLocalSnapshotInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if m.LocalSnapshotInfo != nil { - if err := m.LocalSnapshotInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this object snapshots info based on the context it is used -func (m *ObjectSnapshotsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalSnapshotsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalSnapshotInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSnapshotsInfo) contextValidateArchivalSnapshotsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalSnapshotsInfo); i++ { - - if m.ArchivalSnapshotsInfo[i] != nil { - - if swag.IsZero(m.ArchivalSnapshotsInfo[i]) { // not required - return nil - } - - if err := m.ArchivalSnapshotsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalSnapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalSnapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ObjectSnapshotsInfo) contextValidateLocalSnapshotInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalSnapshotInfo != nil { - - if swag.IsZero(m.LocalSnapshotInfo) { // not required - return nil - } - - if err := m.LocalSnapshotInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotsInfo) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_stats.go b/v2/models/object_stats.go deleted file mode 100644 index 8965b88a..00000000 --- a/v2/models/object_stats.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectStats Object Stats. -// -// Specifies the object stats. -// -// swagger:model ObjectStats -type ObjectStats struct { - - // Specifies a summary of the object snapshots. - SnapshotsSummary []*SnapshotsSummary `json:"snapshotsSummary"` -} - -// Validate validates this object stats -func (m *ObjectStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotsSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectStats) validateSnapshotsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotsSummary) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotsSummary); i++ { - if swag.IsZero(m.SnapshotsSummary[i]) { // not required - continue - } - - if m.SnapshotsSummary[i] != nil { - if err := m.SnapshotsSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object stats based on the context it is used -func (m *ObjectStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshotsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectStats) contextValidateSnapshotsSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotsSummary); i++ { - - if m.SnapshotsSummary[i] != nil { - - if swag.IsZero(m.SnapshotsSummary[i]) { // not required - return nil - } - - if err := m.SnapshotsSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectStats) UnmarshalBinary(b []byte) error { - var res ObjectStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_stats_info.go b/v2/models/object_stats_info.go deleted file mode 100644 index ac347755..00000000 --- a/v2/models/object_stats_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectStatsInfo Specifies the Stats of an object. -// -// swagger:model ObjectStatsInfo -type ObjectStatsInfo struct { - ObjectIdentifier - - StatsTaskInfo - - // Specifies stats for failed attempts of this object. - FailedAttempts []*StatsTaskInfo `json:"failedAttempts"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectStatsInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectIdentifier = aO0 - - // AO1 - var aO1 StatsTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.StatsTaskInfo = aO1 - - // AO2 - var dataAO2 struct { - FailedAttempts []*StatsTaskInfo `json:"failedAttempts"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.FailedAttempts = dataAO2.FailedAttempts - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectStatsInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.ObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.StatsTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - FailedAttempts []*StatsTaskInfo `json:"failedAttempts"` - } - - dataAO2.FailedAttempts = m.FailedAttempts - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object stats info -func (m *ObjectStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailedAttempts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectStatsInfo) validateFailedAttempts(formats strfmt.Registry) error { - - if swag.IsZero(m.FailedAttempts) { // not required - return nil - } - - for i := 0; i < len(m.FailedAttempts); i++ { - if swag.IsZero(m.FailedAttempts[i]) { // not required - continue - } - - if m.FailedAttempts[i] != nil { - if err := m.FailedAttempts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object stats info based on the context it is used -func (m *ObjectStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFailedAttempts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectStatsInfo) contextValidateFailedAttempts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailedAttempts); i++ { - - if m.FailedAttempts[i] != nil { - - if swag.IsZero(m.FailedAttempts[i]) { // not required - return nil - } - - if err := m.FailedAttempts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedAttempts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectStatsInfo) UnmarshalBinary(b []byte) error { - var res ObjectStatsInfo - 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 deleted file mode 100644 index be94427d..00000000 --- a/v2/models/object_store_ciphers_resp.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectStoreCiphersResp Response with two lists: a list of enabled object store ciphers and a list of disabled object store ciphers. -// -// Specifies a list of enabled/disabled object store ciphers on the cluster. -// -// swagger:model ObjectStoreCiphersResp -type ObjectStoreCiphersResp struct { - - // Enabled object store ciphers. - EnabledCiphers []string `json:"enabledCiphers"` - - // Disabled object store ciphers. - DisabledCiphers []string `json:"disabledCiphers"` -} - -// Validate validates this object store ciphers resp -func (m *ObjectStoreCiphersResp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabledCiphers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDisabledCiphers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -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 { - panic(err) - } - for _, v := range res { - objectStoreCiphersRespEnabledCiphersItemsEnum = append(objectStoreCiphersRespEnabledCiphersItemsEnum, v) - } -} - -func (m *ObjectStoreCiphersResp) validateEnabledCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectStoreCiphersRespEnabledCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectStoreCiphersResp) validateEnabledCiphers(formats strfmt.Registry) error { - if swag.IsZero(m.EnabledCiphers) { // not required - return nil - } - - for i := 0; i < len(m.EnabledCiphers); i++ { - - // value enum - if err := m.validateEnabledCiphersItemsEnum("enabledCiphers"+"."+strconv.Itoa(i), "body", m.EnabledCiphers[i]); err != nil { - return err - } - - } - - return nil -} - -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 { - panic(err) - } - for _, v := range res { - objectStoreCiphersRespDisabledCiphersItemsEnum = append(objectStoreCiphersRespDisabledCiphersItemsEnum, v) - } -} - -func (m *ObjectStoreCiphersResp) validateDisabledCiphersItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectStoreCiphersRespDisabledCiphersItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectStoreCiphersResp) validateDisabledCiphers(formats strfmt.Registry) error { - if swag.IsZero(m.DisabledCiphers) { // not required - return nil - } - - for i := 0; i < len(m.DisabledCiphers); i++ { - - // value enum - if err := m.validateDisabledCiphersItemsEnum("disabledCiphers"+"."+strconv.Itoa(i), "body", m.DisabledCiphers[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this object store ciphers resp based on context it is used -func (m *ObjectStoreCiphersResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectStoreCiphersResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectStoreCiphersResp) UnmarshalBinary(b []byte) error { - var res ObjectStoreCiphersResp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_summary.go b/v2/models/object_summary.go deleted file mode 100644 index 948c904f..00000000 --- a/v2/models/object_summary.go +++ /dev/null @@ -1,556 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectSummary Object Summary -// -// Specifies the Object Summary. -// -// swagger:model ObjectSummary -type ObjectSummary struct { - ObjectIdentifier - - // Specifies the hash identifier of the object. - ObjectHash *string `json:"objectHash,omitempty"` - - // Specifies the type of the object. - // Enum: ["kCluster","kVserver","kVolume","kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate","kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKeyspace","kTable","kDatabase","kCollection","kBucket","kNamespace","kSCVMMServer","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kCustomProperty","kTenant","kSubscription","kResourceGroup","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kApplicationSecurityGroup","kNetworkSecurityGroup","kVirtualNetwork","kSubnet","kComputeOptions","kSnapshotManagerPermit","kAvailabilitySet","kSQLServer","kSQLDatabase","kOVirtManager","kHost","kStorageDomain","kVNicProfile","kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kInstanceType","kKeyPair","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAuroraCluster","kAccount","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey","kRDSPostgresDb","kAuroraClusterPostgresDb","kProject","kLabel","kMetadata","kVPCConnector","kPrismCentral","kOtherHypervisorCluster","kZone","kMountPoint","kStorageArray","kFileSystem","kContainer","kFilesystem","kFileset","kPureProtectionGroup","kVolumeGroup","kStoragePool","kViewBox","kView","kWindowsCluster","kOracleRACCluster","kOracleAPCluster","kService","kPVC","kPersistentVolumeClaim","kPersistentVolume","kRootContainer","kDAGRootContainer","kExchangeNode","kExchangeDAGDatabaseCopy","kExchangeStandaloneDatabase","kExchangeDAG","kExchangeDAGDatabase","kDomainController","kInstance","kAAG","kAAGRootContainer","kAAGDatabase","kRACRootContainer","kTableSpace","kPDB","kObject","kOrg","kAppInstance"] - ObjectType *string `json:"objectType,omitempty"` - - // Specifies the logical size of object in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the uuid which is a unique identifier of the object. - UUID *string `json:"uuid,omitempty"` - - // Specifies the global id which is a unique identifier of the object. - GlobalID *string `json:"globalId,omitempty"` - - // Specifies the protection type of the object if any. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"] - ProtectionType *string `json:"protectionType,omitempty"` - - // Specifies the operating system type of the object. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"] - OsType *string `json:"osType,omitempty"` - - // Specifies the vCenter object details. - VCenterSummary *ObjectTypeVCenterParams `json:"vCenterSummary,omitempty"` - - // Specifies the Sharepoint site object details. - SharepointSiteSummary *SharepointObjectParams `json:"sharepointSiteSummary,omitempty"` - - // Specifies the windows cluster object details. - WindowsClusterSummary *ObjectTypeWindowsClusterParams `json:"windowsClusterSummary,omitempty"` - - // Specifies child object details. - ChildObjects []*ObjectSummary `json:"childObjects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectSummary) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectIdentifier = aO0 - - // AO1 - var dataAO1 struct { - ObjectHash *string `json:"objectHash,omitempty"` - - ObjectType *string `json:"objectType,omitempty"` - - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - UUID *string `json:"uuid,omitempty"` - - GlobalID *string `json:"globalId,omitempty"` - - ProtectionType *string `json:"protectionType,omitempty"` - - OsType *string `json:"osType,omitempty"` - - VCenterSummary *ObjectTypeVCenterParams `json:"vCenterSummary,omitempty"` - - SharepointSiteSummary *SharepointObjectParams `json:"sharepointSiteSummary,omitempty"` - - WindowsClusterSummary *ObjectTypeWindowsClusterParams `json:"windowsClusterSummary,omitempty"` - - ChildObjects []*ObjectSummary `json:"childObjects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ObjectHash = dataAO1.ObjectHash - - m.ObjectType = dataAO1.ObjectType - - m.LogicalSizeBytes = dataAO1.LogicalSizeBytes - - m.UUID = dataAO1.UUID - - m.GlobalID = dataAO1.GlobalID - - m.ProtectionType = dataAO1.ProtectionType - - m.OsType = dataAO1.OsType - - m.VCenterSummary = dataAO1.VCenterSummary - - m.SharepointSiteSummary = dataAO1.SharepointSiteSummary - - m.WindowsClusterSummary = dataAO1.WindowsClusterSummary - - m.ChildObjects = dataAO1.ChildObjects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectSummary) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ObjectHash *string `json:"objectHash,omitempty"` - - ObjectType *string `json:"objectType,omitempty"` - - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - UUID *string `json:"uuid,omitempty"` - - GlobalID *string `json:"globalId,omitempty"` - - ProtectionType *string `json:"protectionType,omitempty"` - - OsType *string `json:"osType,omitempty"` - - VCenterSummary *ObjectTypeVCenterParams `json:"vCenterSummary,omitempty"` - - SharepointSiteSummary *SharepointObjectParams `json:"sharepointSiteSummary,omitempty"` - - WindowsClusterSummary *ObjectTypeWindowsClusterParams `json:"windowsClusterSummary,omitempty"` - - ChildObjects []*ObjectSummary `json:"childObjects"` - } - - dataAO1.ObjectHash = m.ObjectHash - - dataAO1.ObjectType = m.ObjectType - - dataAO1.LogicalSizeBytes = m.LogicalSizeBytes - - dataAO1.UUID = m.UUID - - dataAO1.GlobalID = m.GlobalID - - dataAO1.ProtectionType = m.ProtectionType - - dataAO1.OsType = m.OsType - - dataAO1.VCenterSummary = m.VCenterSummary - - dataAO1.SharepointSiteSummary = m.SharepointSiteSummary - - dataAO1.WindowsClusterSummary = m.WindowsClusterSummary - - dataAO1.ChildObjects = m.ChildObjects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object summary -func (m *ObjectSummary) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOsType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCenterSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointSiteSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWindowsClusterSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChildObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectSummaryTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVserver","kVolume","kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate","kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKeyspace","kTable","kDatabase","kCollection","kBucket","kNamespace","kSCVMMServer","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kCustomProperty","kTenant","kSubscription","kResourceGroup","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kApplicationSecurityGroup","kNetworkSecurityGroup","kVirtualNetwork","kSubnet","kComputeOptions","kSnapshotManagerPermit","kAvailabilitySet","kSQLServer","kSQLDatabase","kOVirtManager","kHost","kStorageDomain","kVNicProfile","kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kInstanceType","kKeyPair","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAuroraCluster","kAccount","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey","kRDSPostgresDb","kAuroraClusterPostgresDb","kProject","kLabel","kMetadata","kVPCConnector","kPrismCentral","kOtherHypervisorCluster","kZone","kMountPoint","kStorageArray","kFileSystem","kContainer","kFilesystem","kFileset","kPureProtectionGroup","kVolumeGroup","kStoragePool","kViewBox","kView","kWindowsCluster","kOracleRACCluster","kOracleAPCluster","kService","kPVC","kPersistentVolumeClaim","kPersistentVolume","kRootContainer","kDAGRootContainer","kExchangeNode","kExchangeDAGDatabaseCopy","kExchangeStandaloneDatabase","kExchangeDAG","kExchangeDAGDatabase","kDomainController","kInstance","kAAG","kAAGRootContainer","kAAGDatabase","kRACRootContainer","kTableSpace","kPDB","kObject","kOrg","kAppInstance"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSummaryTypeObjectTypePropEnum = append(objectSummaryTypeObjectTypePropEnum, v) - } -} - -// property enum -func (m *ObjectSummary) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSummaryTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSummary) validateObjectType(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", *m.ObjectType); err != nil { - return err - } - - return nil -} - -var objectSummaryTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSummaryTypeProtectionTypePropEnum = append(objectSummaryTypeProtectionTypePropEnum, v) - } -} - -// property enum -func (m *ObjectSummary) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSummaryTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSummary) validateProtectionType(formats strfmt.Registry) error { - - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -var objectSummaryTypeOsTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectSummaryTypeOsTypePropEnum = append(objectSummaryTypeOsTypePropEnum, v) - } -} - -// property enum -func (m *ObjectSummary) validateOsTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectSummaryTypeOsTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectSummary) validateOsType(formats strfmt.Registry) error { - - if swag.IsZero(m.OsType) { // not required - return nil - } - - // value enum - if err := m.validateOsTypeEnum("osType", "body", *m.OsType); err != nil { - return err - } - - return nil -} - -func (m *ObjectSummary) validateVCenterSummary(formats strfmt.Registry) error { - - if swag.IsZero(m.VCenterSummary) { // not required - return nil - } - - if m.VCenterSummary != nil { - if err := m.VCenterSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) validateSharepointSiteSummary(formats strfmt.Registry) error { - - if swag.IsZero(m.SharepointSiteSummary) { // not required - return nil - } - - if m.SharepointSiteSummary != nil { - if err := m.SharepointSiteSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointSiteSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointSiteSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) validateWindowsClusterSummary(formats strfmt.Registry) error { - - if swag.IsZero(m.WindowsClusterSummary) { // not required - return nil - } - - if m.WindowsClusterSummary != nil { - if err := m.WindowsClusterSummary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsClusterSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsClusterSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) validateChildObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.ChildObjects) { // not required - return nil - } - - for i := 0; i < len(m.ChildObjects); i++ { - if swag.IsZero(m.ChildObjects[i]) { // not required - continue - } - - if m.ChildObjects[i] != nil { - if err := m.ChildObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object summary based on the context it is used -func (m *ObjectSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectIdentifier - if err := m.ObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVCenterSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointSiteSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWindowsClusterSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChildObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectSummary) contextValidateVCenterSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.VCenterSummary != nil { - - if swag.IsZero(m.VCenterSummary) { // not required - return nil - } - - if err := m.VCenterSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) contextValidateSharepointSiteSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointSiteSummary != nil { - - if swag.IsZero(m.SharepointSiteSummary) { // not required - return nil - } - - if err := m.SharepointSiteSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointSiteSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointSiteSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) contextValidateWindowsClusterSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.WindowsClusterSummary != nil { - - if swag.IsZero(m.WindowsClusterSummary) { // not required - return nil - } - - if err := m.WindowsClusterSummary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windowsClusterSummary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windowsClusterSummary") - } - return err - } - } - - return nil -} - -func (m *ObjectSummary) contextValidateChildObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildObjects); i++ { - - if m.ChildObjects[i] != nil { - - if swag.IsZero(m.ChildObjects[i]) { // not required - return nil - } - - if err := m.ChildObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSummary) UnmarshalBinary(b []byte) error { - var res ObjectSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_type.go b/v2/models/object_type.go deleted file mode 100644 index b4206f74..00000000 --- a/v2/models/object_type.go +++ /dev/null @@ -1,527 +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" -) - -// ObjectType Object type. -// -// Specifies Object type. -// -// swagger:model ObjectType -type ObjectType struct { - - // Specifies Object type. - // Enum: ["kCluster","kVserver","kVolume","kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate","kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKeyspace","kTable","kDatabase","kCollection","kBucket","kNamespace","kSCVMMServer","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kCustomProperty","kTenant","kSubscription","kResourceGroup","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kApplicationSecurityGroup","kNetworkSecurityGroup","kVirtualNetwork","kSubnet","kComputeOptions","kSnapshotManagerPermit","kAvailabilitySet","kSQLServer","kSQLDatabase","kOVirtManager","kHost","kStorageDomain","kVNicProfile","kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kInstanceType","kKeyPair","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAuroraCluster","kAccount","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey","kRDSPostgresDb","kAuroraClusterPostgresDb","kProject","kLabel","kMetadata","kVPCConnector","kPrismCentral","kOtherHypervisorCluster","kZone","kMountPoint","kStorageArray","kFileSystem","kContainer","kFilesystem","kFileset","kPureProtectionGroup","kVolumeGroup","kStoragePool","kViewBox","kView","kWindowsCluster","kOracleRACCluster","kOracleAPCluster","kService","kPVC","kPersistentVolumeClaim","kPersistentVolume","kRootContainer","kDAGRootContainer","kExchangeNode","kExchangeDAGDatabaseCopy","kExchangeStandaloneDatabase","kExchangeDAG","kExchangeDAGDatabase","kDomainController","kInstance","kAAG","kAAGRootContainer","kAAGDatabase","kRACRootContainer","kTableSpace","kPDB","kObject","kOrg","kAppInstance"] - ObjectType string `json:"objectType,omitempty"` -} - -// Validate validates this object type -func (m *ObjectType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectTypeTypeObjectTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCluster","kVserver","kVolume","kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate","kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKeyspace","kTable","kDatabase","kCollection","kBucket","kNamespace","kSCVMMServer","kStandaloneCluster","kHostGroup","kHypervHost","kHostCluster","kCustomProperty","kTenant","kSubscription","kResourceGroup","kStorageAccount","kStorageKey","kStorageContainer","kStorageBlob","kApplicationSecurityGroup","kNetworkSecurityGroup","kVirtualNetwork","kSubnet","kComputeOptions","kSnapshotManagerPermit","kAvailabilitySet","kSQLServer","kSQLDatabase","kOVirtManager","kHost","kStorageDomain","kVNicProfile","kIAMUser","kRegion","kAvailabilityZone","kEC2Instance","kVPC","kInstanceType","kKeyPair","kRDSOptionGroup","kRDSParameterGroup","kRDSInstance","kRDSSubnet","kRDSTag","kAuroraTag","kAuroraCluster","kAccount","kSubTaskPermit","kS3Bucket","kS3Tag","kKmsKey","kRDSPostgresDb","kAuroraClusterPostgresDb","kProject","kLabel","kMetadata","kVPCConnector","kPrismCentral","kOtherHypervisorCluster","kZone","kMountPoint","kStorageArray","kFileSystem","kContainer","kFilesystem","kFileset","kPureProtectionGroup","kVolumeGroup","kStoragePool","kViewBox","kView","kWindowsCluster","kOracleRACCluster","kOracleAPCluster","kService","kPVC","kPersistentVolumeClaim","kPersistentVolume","kRootContainer","kDAGRootContainer","kExchangeNode","kExchangeDAGDatabaseCopy","kExchangeStandaloneDatabase","kExchangeDAG","kExchangeDAGDatabase","kDomainController","kInstance","kAAG","kAAGRootContainer","kAAGDatabase","kRACRootContainer","kTableSpace","kPDB","kObject","kOrg","kAppInstance"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectTypeTypeObjectTypePropEnum = append(objectTypeTypeObjectTypePropEnum, v) - } -} - -const ( - - // ObjectTypeObjectTypeKCluster captures enum value "kCluster" - ObjectTypeObjectTypeKCluster string = "kCluster" - - // ObjectTypeObjectTypeKVserver captures enum value "kVserver" - ObjectTypeObjectTypeKVserver string = "kVserver" - - // ObjectTypeObjectTypeKVolume captures enum value "kVolume" - ObjectTypeObjectTypeKVolume string = "kVolume" - - // ObjectTypeObjectTypeKVCenter captures enum value "kVCenter" - ObjectTypeObjectTypeKVCenter string = "kVCenter" - - // ObjectTypeObjectTypeKStandaloneHost captures enum value "kStandaloneHost" - ObjectTypeObjectTypeKStandaloneHost string = "kStandaloneHost" - - // ObjectTypeObjectTypeKvCloudDirector captures enum value "kvCloudDirector" - ObjectTypeObjectTypeKvCloudDirector string = "kvCloudDirector" - - // ObjectTypeObjectTypeKFolder captures enum value "kFolder" - ObjectTypeObjectTypeKFolder string = "kFolder" - - // ObjectTypeObjectTypeKDatacenter captures enum value "kDatacenter" - ObjectTypeObjectTypeKDatacenter string = "kDatacenter" - - // ObjectTypeObjectTypeKComputeResource captures enum value "kComputeResource" - ObjectTypeObjectTypeKComputeResource string = "kComputeResource" - - // ObjectTypeObjectTypeKClusterComputeResource captures enum value "kClusterComputeResource" - ObjectTypeObjectTypeKClusterComputeResource string = "kClusterComputeResource" - - // ObjectTypeObjectTypeKResourcePool captures enum value "kResourcePool" - ObjectTypeObjectTypeKResourcePool string = "kResourcePool" - - // ObjectTypeObjectTypeKDatastore captures enum value "kDatastore" - ObjectTypeObjectTypeKDatastore string = "kDatastore" - - // ObjectTypeObjectTypeKHostSystem captures enum value "kHostSystem" - ObjectTypeObjectTypeKHostSystem string = "kHostSystem" - - // ObjectTypeObjectTypeKVirtualMachine captures enum value "kVirtualMachine" - ObjectTypeObjectTypeKVirtualMachine string = "kVirtualMachine" - - // ObjectTypeObjectTypeKVirtualApp captures enum value "kVirtualApp" - ObjectTypeObjectTypeKVirtualApp string = "kVirtualApp" - - // ObjectTypeObjectTypeKStoragePod captures enum value "kStoragePod" - ObjectTypeObjectTypeKStoragePod string = "kStoragePod" - - // ObjectTypeObjectTypeKNetwork captures enum value "kNetwork" - ObjectTypeObjectTypeKNetwork string = "kNetwork" - - // ObjectTypeObjectTypeKDistributedVirtualPortgroup captures enum value "kDistributedVirtualPortgroup" - ObjectTypeObjectTypeKDistributedVirtualPortgroup string = "kDistributedVirtualPortgroup" - - // ObjectTypeObjectTypeKTagCategory captures enum value "kTagCategory" - ObjectTypeObjectTypeKTagCategory string = "kTagCategory" - - // ObjectTypeObjectTypeKTag captures enum value "kTag" - ObjectTypeObjectTypeKTag string = "kTag" - - // ObjectTypeObjectTypeKOpaqueNetwork captures enum value "kOpaqueNetwork" - ObjectTypeObjectTypeKOpaqueNetwork string = "kOpaqueNetwork" - - // ObjectTypeObjectTypeKOrganization captures enum value "kOrganization" - ObjectTypeObjectTypeKOrganization string = "kOrganization" - - // ObjectTypeObjectTypeKVirtualDatacenter captures enum value "kVirtualDatacenter" - ObjectTypeObjectTypeKVirtualDatacenter string = "kVirtualDatacenter" - - // ObjectTypeObjectTypeKCatalog captures enum value "kCatalog" - ObjectTypeObjectTypeKCatalog string = "kCatalog" - - // ObjectTypeObjectTypeKOrgMetadata captures enum value "kOrgMetadata" - ObjectTypeObjectTypeKOrgMetadata string = "kOrgMetadata" - - // ObjectTypeObjectTypeKStoragePolicy captures enum value "kStoragePolicy" - ObjectTypeObjectTypeKStoragePolicy string = "kStoragePolicy" - - // ObjectTypeObjectTypeKVirtualAppTemplate captures enum value "kVirtualAppTemplate" - ObjectTypeObjectTypeKVirtualAppTemplate string = "kVirtualAppTemplate" - - // ObjectTypeObjectTypeKDomain captures enum value "kDomain" - ObjectTypeObjectTypeKDomain string = "kDomain" - - // ObjectTypeObjectTypeKOutlook captures enum value "kOutlook" - ObjectTypeObjectTypeKOutlook string = "kOutlook" - - // ObjectTypeObjectTypeKMailbox captures enum value "kMailbox" - ObjectTypeObjectTypeKMailbox string = "kMailbox" - - // ObjectTypeObjectTypeKUsers captures enum value "kUsers" - ObjectTypeObjectTypeKUsers string = "kUsers" - - // ObjectTypeObjectTypeKGroups captures enum value "kGroups" - ObjectTypeObjectTypeKGroups string = "kGroups" - - // ObjectTypeObjectTypeKSites captures enum value "kSites" - ObjectTypeObjectTypeKSites string = "kSites" - - // ObjectTypeObjectTypeKUser captures enum value "kUser" - ObjectTypeObjectTypeKUser string = "kUser" - - // ObjectTypeObjectTypeKGroup captures enum value "kGroup" - ObjectTypeObjectTypeKGroup string = "kGroup" - - // ObjectTypeObjectTypeKSite captures enum value "kSite" - ObjectTypeObjectTypeKSite string = "kSite" - - // ObjectTypeObjectTypeKApplication captures enum value "kApplication" - ObjectTypeObjectTypeKApplication string = "kApplication" - - // ObjectTypeObjectTypeKGraphUser captures enum value "kGraphUser" - ObjectTypeObjectTypeKGraphUser string = "kGraphUser" - - // ObjectTypeObjectTypeKPublicFolders captures enum value "kPublicFolders" - ObjectTypeObjectTypeKPublicFolders string = "kPublicFolders" - - // ObjectTypeObjectTypeKPublicFolder captures enum value "kPublicFolder" - ObjectTypeObjectTypeKPublicFolder string = "kPublicFolder" - - // ObjectTypeObjectTypeKTeams captures enum value "kTeams" - ObjectTypeObjectTypeKTeams string = "kTeams" - - // ObjectTypeObjectTypeKTeam captures enum value "kTeam" - ObjectTypeObjectTypeKTeam string = "kTeam" - - // ObjectTypeObjectTypeKRootPublicFolder captures enum value "kRootPublicFolder" - ObjectTypeObjectTypeKRootPublicFolder string = "kRootPublicFolder" - - // ObjectTypeObjectTypeKO365Exchange captures enum value "kO365Exchange" - ObjectTypeObjectTypeKO365Exchange string = "kO365Exchange" - - // ObjectTypeObjectTypeKO365OneDrive captures enum value "kO365OneDrive" - ObjectTypeObjectTypeKO365OneDrive string = "kO365OneDrive" - - // ObjectTypeObjectTypeKO365Sharepoint captures enum value "kO365Sharepoint" - ObjectTypeObjectTypeKO365Sharepoint string = "kO365Sharepoint" - - // ObjectTypeObjectTypeKKeyspace captures enum value "kKeyspace" - ObjectTypeObjectTypeKKeyspace string = "kKeyspace" - - // ObjectTypeObjectTypeKTable captures enum value "kTable" - ObjectTypeObjectTypeKTable string = "kTable" - - // ObjectTypeObjectTypeKDatabase captures enum value "kDatabase" - ObjectTypeObjectTypeKDatabase string = "kDatabase" - - // ObjectTypeObjectTypeKCollection captures enum value "kCollection" - ObjectTypeObjectTypeKCollection string = "kCollection" - - // ObjectTypeObjectTypeKBucket captures enum value "kBucket" - ObjectTypeObjectTypeKBucket string = "kBucket" - - // ObjectTypeObjectTypeKNamespace captures enum value "kNamespace" - ObjectTypeObjectTypeKNamespace string = "kNamespace" - - // ObjectTypeObjectTypeKSCVMMServer captures enum value "kSCVMMServer" - ObjectTypeObjectTypeKSCVMMServer string = "kSCVMMServer" - - // ObjectTypeObjectTypeKStandaloneCluster captures enum value "kStandaloneCluster" - ObjectTypeObjectTypeKStandaloneCluster string = "kStandaloneCluster" - - // ObjectTypeObjectTypeKHostGroup captures enum value "kHostGroup" - ObjectTypeObjectTypeKHostGroup string = "kHostGroup" - - // ObjectTypeObjectTypeKHypervHost captures enum value "kHypervHost" - ObjectTypeObjectTypeKHypervHost string = "kHypervHost" - - // ObjectTypeObjectTypeKHostCluster captures enum value "kHostCluster" - ObjectTypeObjectTypeKHostCluster string = "kHostCluster" - - // ObjectTypeObjectTypeKCustomProperty captures enum value "kCustomProperty" - ObjectTypeObjectTypeKCustomProperty string = "kCustomProperty" - - // ObjectTypeObjectTypeKTenant captures enum value "kTenant" - ObjectTypeObjectTypeKTenant string = "kTenant" - - // ObjectTypeObjectTypeKSubscription captures enum value "kSubscription" - ObjectTypeObjectTypeKSubscription string = "kSubscription" - - // ObjectTypeObjectTypeKResourceGroup captures enum value "kResourceGroup" - ObjectTypeObjectTypeKResourceGroup string = "kResourceGroup" - - // ObjectTypeObjectTypeKStorageAccount captures enum value "kStorageAccount" - ObjectTypeObjectTypeKStorageAccount string = "kStorageAccount" - - // ObjectTypeObjectTypeKStorageKey captures enum value "kStorageKey" - ObjectTypeObjectTypeKStorageKey string = "kStorageKey" - - // ObjectTypeObjectTypeKStorageContainer captures enum value "kStorageContainer" - ObjectTypeObjectTypeKStorageContainer string = "kStorageContainer" - - // ObjectTypeObjectTypeKStorageBlob captures enum value "kStorageBlob" - ObjectTypeObjectTypeKStorageBlob string = "kStorageBlob" - - // ObjectTypeObjectTypeKApplicationSecurityGroup captures enum value "kApplicationSecurityGroup" - ObjectTypeObjectTypeKApplicationSecurityGroup string = "kApplicationSecurityGroup" - - // ObjectTypeObjectTypeKNetworkSecurityGroup captures enum value "kNetworkSecurityGroup" - ObjectTypeObjectTypeKNetworkSecurityGroup string = "kNetworkSecurityGroup" - - // ObjectTypeObjectTypeKVirtualNetwork captures enum value "kVirtualNetwork" - ObjectTypeObjectTypeKVirtualNetwork string = "kVirtualNetwork" - - // ObjectTypeObjectTypeKSubnet captures enum value "kSubnet" - ObjectTypeObjectTypeKSubnet string = "kSubnet" - - // ObjectTypeObjectTypeKComputeOptions captures enum value "kComputeOptions" - ObjectTypeObjectTypeKComputeOptions string = "kComputeOptions" - - // ObjectTypeObjectTypeKSnapshotManagerPermit captures enum value "kSnapshotManagerPermit" - ObjectTypeObjectTypeKSnapshotManagerPermit string = "kSnapshotManagerPermit" - - // ObjectTypeObjectTypeKAvailabilitySet captures enum value "kAvailabilitySet" - ObjectTypeObjectTypeKAvailabilitySet string = "kAvailabilitySet" - - // ObjectTypeObjectTypeKSQLServer captures enum value "kSQLServer" - ObjectTypeObjectTypeKSQLServer string = "kSQLServer" - - // ObjectTypeObjectTypeKSQLDatabase captures enum value "kSQLDatabase" - ObjectTypeObjectTypeKSQLDatabase string = "kSQLDatabase" - - // ObjectTypeObjectTypeKOVirtManager captures enum value "kOVirtManager" - ObjectTypeObjectTypeKOVirtManager string = "kOVirtManager" - - // ObjectTypeObjectTypeKHost captures enum value "kHost" - ObjectTypeObjectTypeKHost string = "kHost" - - // ObjectTypeObjectTypeKStorageDomain captures enum value "kStorageDomain" - ObjectTypeObjectTypeKStorageDomain string = "kStorageDomain" - - // ObjectTypeObjectTypeKVNicProfile captures enum value "kVNicProfile" - ObjectTypeObjectTypeKVNicProfile string = "kVNicProfile" - - // ObjectTypeObjectTypeKIAMUser captures enum value "kIAMUser" - ObjectTypeObjectTypeKIAMUser string = "kIAMUser" - - // ObjectTypeObjectTypeKRegion captures enum value "kRegion" - ObjectTypeObjectTypeKRegion string = "kRegion" - - // ObjectTypeObjectTypeKAvailabilityZone captures enum value "kAvailabilityZone" - ObjectTypeObjectTypeKAvailabilityZone string = "kAvailabilityZone" - - // ObjectTypeObjectTypeKEC2Instance captures enum value "kEC2Instance" - ObjectTypeObjectTypeKEC2Instance string = "kEC2Instance" - - // ObjectTypeObjectTypeKVPC captures enum value "kVPC" - ObjectTypeObjectTypeKVPC string = "kVPC" - - // ObjectTypeObjectTypeKInstanceType captures enum value "kInstanceType" - ObjectTypeObjectTypeKInstanceType string = "kInstanceType" - - // ObjectTypeObjectTypeKKeyPair captures enum value "kKeyPair" - ObjectTypeObjectTypeKKeyPair string = "kKeyPair" - - // ObjectTypeObjectTypeKRDSOptionGroup captures enum value "kRDSOptionGroup" - ObjectTypeObjectTypeKRDSOptionGroup string = "kRDSOptionGroup" - - // ObjectTypeObjectTypeKRDSParameterGroup captures enum value "kRDSParameterGroup" - ObjectTypeObjectTypeKRDSParameterGroup string = "kRDSParameterGroup" - - // ObjectTypeObjectTypeKRDSInstance captures enum value "kRDSInstance" - ObjectTypeObjectTypeKRDSInstance string = "kRDSInstance" - - // ObjectTypeObjectTypeKRDSSubnet captures enum value "kRDSSubnet" - ObjectTypeObjectTypeKRDSSubnet string = "kRDSSubnet" - - // ObjectTypeObjectTypeKRDSTag captures enum value "kRDSTag" - ObjectTypeObjectTypeKRDSTag string = "kRDSTag" - - // ObjectTypeObjectTypeKAuroraTag captures enum value "kAuroraTag" - ObjectTypeObjectTypeKAuroraTag string = "kAuroraTag" - - // ObjectTypeObjectTypeKAuroraCluster captures enum value "kAuroraCluster" - ObjectTypeObjectTypeKAuroraCluster string = "kAuroraCluster" - - // ObjectTypeObjectTypeKAccount captures enum value "kAccount" - ObjectTypeObjectTypeKAccount string = "kAccount" - - // ObjectTypeObjectTypeKSubTaskPermit captures enum value "kSubTaskPermit" - ObjectTypeObjectTypeKSubTaskPermit string = "kSubTaskPermit" - - // ObjectTypeObjectTypeKS3Bucket captures enum value "kS3Bucket" - ObjectTypeObjectTypeKS3Bucket string = "kS3Bucket" - - // ObjectTypeObjectTypeKS3Tag captures enum value "kS3Tag" - ObjectTypeObjectTypeKS3Tag string = "kS3Tag" - - // ObjectTypeObjectTypeKKmsKey captures enum value "kKmsKey" - ObjectTypeObjectTypeKKmsKey string = "kKmsKey" - - // ObjectTypeObjectTypeKRDSPostgresDb captures enum value "kRDSPostgresDb" - ObjectTypeObjectTypeKRDSPostgresDb string = "kRDSPostgresDb" - - // ObjectTypeObjectTypeKAuroraClusterPostgresDb captures enum value "kAuroraClusterPostgresDb" - ObjectTypeObjectTypeKAuroraClusterPostgresDb string = "kAuroraClusterPostgresDb" - - // ObjectTypeObjectTypeKProject captures enum value "kProject" - ObjectTypeObjectTypeKProject string = "kProject" - - // ObjectTypeObjectTypeKLabel captures enum value "kLabel" - ObjectTypeObjectTypeKLabel string = "kLabel" - - // ObjectTypeObjectTypeKMetadata captures enum value "kMetadata" - ObjectTypeObjectTypeKMetadata string = "kMetadata" - - // ObjectTypeObjectTypeKVPCConnector captures enum value "kVPCConnector" - ObjectTypeObjectTypeKVPCConnector string = "kVPCConnector" - - // ObjectTypeObjectTypeKPrismCentral captures enum value "kPrismCentral" - ObjectTypeObjectTypeKPrismCentral string = "kPrismCentral" - - // ObjectTypeObjectTypeKOtherHypervisorCluster captures enum value "kOtherHypervisorCluster" - ObjectTypeObjectTypeKOtherHypervisorCluster string = "kOtherHypervisorCluster" - - // ObjectTypeObjectTypeKZone captures enum value "kZone" - ObjectTypeObjectTypeKZone string = "kZone" - - // ObjectTypeObjectTypeKMountPoint captures enum value "kMountPoint" - ObjectTypeObjectTypeKMountPoint string = "kMountPoint" - - // ObjectTypeObjectTypeKStorageArray captures enum value "kStorageArray" - ObjectTypeObjectTypeKStorageArray string = "kStorageArray" - - // ObjectTypeObjectTypeKFileSystem captures enum value "kFileSystem" - ObjectTypeObjectTypeKFileSystem string = "kFileSystem" - - // ObjectTypeObjectTypeKContainer captures enum value "kContainer" - ObjectTypeObjectTypeKContainer string = "kContainer" - - // ObjectTypeObjectTypeKFilesystem captures enum value "kFilesystem" - ObjectTypeObjectTypeKFilesystem string = "kFilesystem" - - // ObjectTypeObjectTypeKFileset captures enum value "kFileset" - ObjectTypeObjectTypeKFileset string = "kFileset" - - // ObjectTypeObjectTypeKPureProtectionGroup captures enum value "kPureProtectionGroup" - ObjectTypeObjectTypeKPureProtectionGroup string = "kPureProtectionGroup" - - // ObjectTypeObjectTypeKVolumeGroup captures enum value "kVolumeGroup" - ObjectTypeObjectTypeKVolumeGroup string = "kVolumeGroup" - - // ObjectTypeObjectTypeKStoragePool captures enum value "kStoragePool" - ObjectTypeObjectTypeKStoragePool string = "kStoragePool" - - // ObjectTypeObjectTypeKViewBox captures enum value "kViewBox" - ObjectTypeObjectTypeKViewBox string = "kViewBox" - - // ObjectTypeObjectTypeKView captures enum value "kView" - ObjectTypeObjectTypeKView string = "kView" - - // ObjectTypeObjectTypeKWindowsCluster captures enum value "kWindowsCluster" - ObjectTypeObjectTypeKWindowsCluster string = "kWindowsCluster" - - // ObjectTypeObjectTypeKOracleRACCluster captures enum value "kOracleRACCluster" - ObjectTypeObjectTypeKOracleRACCluster string = "kOracleRACCluster" - - // ObjectTypeObjectTypeKOracleAPCluster captures enum value "kOracleAPCluster" - ObjectTypeObjectTypeKOracleAPCluster string = "kOracleAPCluster" - - // ObjectTypeObjectTypeKService captures enum value "kService" - ObjectTypeObjectTypeKService string = "kService" - - // ObjectTypeObjectTypeKPVC captures enum value "kPVC" - ObjectTypeObjectTypeKPVC string = "kPVC" - - // ObjectTypeObjectTypeKPersistentVolumeClaim captures enum value "kPersistentVolumeClaim" - ObjectTypeObjectTypeKPersistentVolumeClaim string = "kPersistentVolumeClaim" - - // ObjectTypeObjectTypeKPersistentVolume captures enum value "kPersistentVolume" - ObjectTypeObjectTypeKPersistentVolume string = "kPersistentVolume" - - // ObjectTypeObjectTypeKRootContainer captures enum value "kRootContainer" - ObjectTypeObjectTypeKRootContainer string = "kRootContainer" - - // ObjectTypeObjectTypeKDAGRootContainer captures enum value "kDAGRootContainer" - ObjectTypeObjectTypeKDAGRootContainer string = "kDAGRootContainer" - - // ObjectTypeObjectTypeKExchangeNode captures enum value "kExchangeNode" - ObjectTypeObjectTypeKExchangeNode string = "kExchangeNode" - - // ObjectTypeObjectTypeKExchangeDAGDatabaseCopy captures enum value "kExchangeDAGDatabaseCopy" - ObjectTypeObjectTypeKExchangeDAGDatabaseCopy string = "kExchangeDAGDatabaseCopy" - - // ObjectTypeObjectTypeKExchangeStandaloneDatabase captures enum value "kExchangeStandaloneDatabase" - ObjectTypeObjectTypeKExchangeStandaloneDatabase string = "kExchangeStandaloneDatabase" - - // ObjectTypeObjectTypeKExchangeDAG captures enum value "kExchangeDAG" - ObjectTypeObjectTypeKExchangeDAG string = "kExchangeDAG" - - // ObjectTypeObjectTypeKExchangeDAGDatabase captures enum value "kExchangeDAGDatabase" - ObjectTypeObjectTypeKExchangeDAGDatabase string = "kExchangeDAGDatabase" - - // ObjectTypeObjectTypeKDomainController captures enum value "kDomainController" - ObjectTypeObjectTypeKDomainController string = "kDomainController" - - // ObjectTypeObjectTypeKInstance captures enum value "kInstance" - ObjectTypeObjectTypeKInstance string = "kInstance" - - // ObjectTypeObjectTypeKAAG captures enum value "kAAG" - ObjectTypeObjectTypeKAAG string = "kAAG" - - // ObjectTypeObjectTypeKAAGRootContainer captures enum value "kAAGRootContainer" - ObjectTypeObjectTypeKAAGRootContainer string = "kAAGRootContainer" - - // ObjectTypeObjectTypeKAAGDatabase captures enum value "kAAGDatabase" - ObjectTypeObjectTypeKAAGDatabase string = "kAAGDatabase" - - // ObjectTypeObjectTypeKRACRootContainer captures enum value "kRACRootContainer" - ObjectTypeObjectTypeKRACRootContainer string = "kRACRootContainer" - - // ObjectTypeObjectTypeKTableSpace captures enum value "kTableSpace" - ObjectTypeObjectTypeKTableSpace string = "kTableSpace" - - // ObjectTypeObjectTypeKPDB captures enum value "kPDB" - ObjectTypeObjectTypeKPDB string = "kPDB" - - // ObjectTypeObjectTypeKObject captures enum value "kObject" - ObjectTypeObjectTypeKObject string = "kObject" - - // ObjectTypeObjectTypeKOrg captures enum value "kOrg" - ObjectTypeObjectTypeKOrg string = "kOrg" - - // ObjectTypeObjectTypeKAppInstance captures enum value "kAppInstance" - ObjectTypeObjectTypeKAppInstance string = "kAppInstance" -) - -// prop value enum -func (m *ObjectType) validateObjectTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectTypeTypeObjectTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectType) validateObjectType(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectType) { // not required - return nil - } - - // value enum - if err := m.validateObjectTypeEnum("objectType", "body", m.ObjectType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this object type based on context it is used -func (m *ObjectType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectType) UnmarshalBinary(b []byte) error { - var res ObjectType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_type_v_center_params.go b/v2/models/object_type_v_center_params.go deleted file mode 100644 index 755152bc..00000000 --- a/v2/models/object_type_v_center_params.go +++ /dev/null @@ -1,50 +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" -) - -// ObjectTypeVCenterParams Object Type VCenter Params -// -// swagger:model ObjectTypeVCenterParams -type ObjectTypeVCenterParams struct { - - // Specifies that registered vCenter source is a VMC (VMware Cloud) environment or not. - IsCloudEnv *bool `json:"isCloudEnv,omitempty"` -} - -// Validate validates this object type v center params -func (m *ObjectTypeVCenterParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object type v center params based on context it is used -func (m *ObjectTypeVCenterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectTypeVCenterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectTypeVCenterParams) UnmarshalBinary(b []byte) error { - var res ObjectTypeVCenterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_type_windows_cluster_params.go b/v2/models/object_type_windows_cluster_params.go deleted file mode 100644 index be617266..00000000 --- a/v2/models/object_type_windows_cluster_params.go +++ /dev/null @@ -1,50 +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" -) - -// ObjectTypeWindowsClusterParams Object Type Windows Cluster Params -// -// swagger:model ObjectTypeWindowsClusterParams -type ObjectTypeWindowsClusterParams struct { - - // Specifies the type of cluster resource this source represents. - ClusterSourceType *string `json:"clusterSourceType,omitempty"` -} - -// Validate validates this object type windows cluster params -func (m *ObjectTypeWindowsClusterParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this object type windows cluster params based on context it is used -func (m *ObjectTypeWindowsClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectTypeWindowsClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectTypeWindowsClusterParams) UnmarshalBinary(b []byte) error { - var res ObjectTypeWindowsClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_un_linking_params.go b/v2/models/object_un_linking_params.go deleted file mode 100644 index 2377d663..00000000 --- a/v2/models/object_un_linking_params.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" -) - -// ObjectUnLinkingParams Specifies the parameters required for unlinking objects. This is currently used as a part of vm migration workflow. -// -// swagger:model ObjectUnLinkingParams -type ObjectUnLinkingParams struct { - CommonObjectsActionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectUnLinkingParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectsActionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectsActionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectUnLinkingParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonObjectsActionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object un linking params -func (m *ObjectUnLinkingParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectsActionParams - if err := m.CommonObjectsActionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object un linking params based on the context it is used -func (m *ObjectUnLinkingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectsActionParams - if err := m.CommonObjectsActionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectUnLinkingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectUnLinkingParams) UnmarshalBinary(b []byte) error { - var res ObjectUnLinkingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_unique_identifier.go b/v2/models/object_unique_identifier.go deleted file mode 100644 index 49f268d0..00000000 --- a/v2/models/object_unique_identifier.go +++ /dev/null @@ -1,210 +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" -) - -// ObjectUniqueIdentifier Unique metadata for an object. -// -// swagger:model ObjectUniqueIdentifier -type ObjectUniqueIdentifier struct { - - // Unique identifier of the parent for the object. This is assigned by the third party adapter and saved with the object data. - ParentIdentifier *string `json:"parentIdentifier,omitempty"` - - // Unique identifier of the object. This is assigned by the third party adapter and saved with the object data. - ObjectIdentifier *string `json:"objectIdentifier,omitempty"` - - // 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"` -} - -// Validate validates this object unique identifier -func (m *ObjectUniqueIdentifier) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectUniqueIdentifierTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectUniqueIdentifierTypeEnvironmentPropEnum = append(objectUniqueIdentifierTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ObjectUniqueIdentifierEnvironmentKVMware captures enum value "kVMware" - ObjectUniqueIdentifierEnvironmentKVMware string = "kVMware" - - // ObjectUniqueIdentifierEnvironmentKHyperV captures enum value "kHyperV" - ObjectUniqueIdentifierEnvironmentKHyperV string = "kHyperV" - - // ObjectUniqueIdentifierEnvironmentKAzure captures enum value "kAzure" - ObjectUniqueIdentifierEnvironmentKAzure string = "kAzure" - - // ObjectUniqueIdentifierEnvironmentKKVM captures enum value "kKVM" - ObjectUniqueIdentifierEnvironmentKKVM string = "kKVM" - - // ObjectUniqueIdentifierEnvironmentKAWS captures enum value "kAWS" - ObjectUniqueIdentifierEnvironmentKAWS string = "kAWS" - - // ObjectUniqueIdentifierEnvironmentKAzureSQL captures enum value "kAzureSQL" - ObjectUniqueIdentifierEnvironmentKAzureSQL string = "kAzureSQL" - - // ObjectUniqueIdentifierEnvironmentKAcropolis captures enum value "kAcropolis" - ObjectUniqueIdentifierEnvironmentKAcropolis string = "kAcropolis" - - // ObjectUniqueIdentifierEnvironmentKGCP captures enum value "kGCP" - ObjectUniqueIdentifierEnvironmentKGCP string = "kGCP" - - // ObjectUniqueIdentifierEnvironmentKPhysical captures enum value "kPhysical" - ObjectUniqueIdentifierEnvironmentKPhysical string = "kPhysical" - - // ObjectUniqueIdentifierEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ObjectUniqueIdentifierEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ObjectUniqueIdentifierEnvironmentKIsilon captures enum value "kIsilon" - ObjectUniqueIdentifierEnvironmentKIsilon string = "kIsilon" - - // ObjectUniqueIdentifierEnvironmentKNetapp captures enum value "kNetapp" - ObjectUniqueIdentifierEnvironmentKNetapp string = "kNetapp" - - // ObjectUniqueIdentifierEnvironmentKGenericNas captures enum value "kGenericNas" - ObjectUniqueIdentifierEnvironmentKGenericNas string = "kGenericNas" - - // ObjectUniqueIdentifierEnvironmentKFlashBlade captures enum value "kFlashBlade" - ObjectUniqueIdentifierEnvironmentKFlashBlade string = "kFlashBlade" - - // ObjectUniqueIdentifierEnvironmentKElastifile captures enum value "kElastifile" - ObjectUniqueIdentifierEnvironmentKElastifile string = "kElastifile" - - // ObjectUniqueIdentifierEnvironmentKGPFS captures enum value "kGPFS" - ObjectUniqueIdentifierEnvironmentKGPFS string = "kGPFS" - - // ObjectUniqueIdentifierEnvironmentKPure captures enum value "kPure" - ObjectUniqueIdentifierEnvironmentKPure string = "kPure" - - // ObjectUniqueIdentifierEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ObjectUniqueIdentifierEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ObjectUniqueIdentifierEnvironmentKNimble captures enum value "kNimble" - ObjectUniqueIdentifierEnvironmentKNimble string = "kNimble" - - // ObjectUniqueIdentifierEnvironmentKSQL captures enum value "kSQL" - ObjectUniqueIdentifierEnvironmentKSQL string = "kSQL" - - // ObjectUniqueIdentifierEnvironmentKOracle captures enum value "kOracle" - ObjectUniqueIdentifierEnvironmentKOracle string = "kOracle" - - // ObjectUniqueIdentifierEnvironmentKExchange captures enum value "kExchange" - ObjectUniqueIdentifierEnvironmentKExchange string = "kExchange" - - // ObjectUniqueIdentifierEnvironmentKAD captures enum value "kAD" - ObjectUniqueIdentifierEnvironmentKAD string = "kAD" - - // ObjectUniqueIdentifierEnvironmentKView captures enum value "kView" - ObjectUniqueIdentifierEnvironmentKView string = "kView" - - // ObjectUniqueIdentifierEnvironmentKO365 captures enum value "kO365" - ObjectUniqueIdentifierEnvironmentKO365 string = "kO365" - - // ObjectUniqueIdentifierEnvironmentKHyperFlex captures enum value "kHyperFlex" - ObjectUniqueIdentifierEnvironmentKHyperFlex string = "kHyperFlex" - - // ObjectUniqueIdentifierEnvironmentKKubernetes captures enum value "kKubernetes" - ObjectUniqueIdentifierEnvironmentKKubernetes string = "kKubernetes" - - // ObjectUniqueIdentifierEnvironmentKCassandra captures enum value "kCassandra" - ObjectUniqueIdentifierEnvironmentKCassandra string = "kCassandra" - - // ObjectUniqueIdentifierEnvironmentKMongoDB captures enum value "kMongoDB" - ObjectUniqueIdentifierEnvironmentKMongoDB string = "kMongoDB" - - // ObjectUniqueIdentifierEnvironmentKCouchbase captures enum value "kCouchbase" - ObjectUniqueIdentifierEnvironmentKCouchbase string = "kCouchbase" - - // ObjectUniqueIdentifierEnvironmentKHdfs captures enum value "kHdfs" - ObjectUniqueIdentifierEnvironmentKHdfs string = "kHdfs" - - // ObjectUniqueIdentifierEnvironmentKHive captures enum value "kHive" - ObjectUniqueIdentifierEnvironmentKHive string = "kHive" - - // ObjectUniqueIdentifierEnvironmentKHBase captures enum value "kHBase" - ObjectUniqueIdentifierEnvironmentKHBase string = "kHBase" - - // ObjectUniqueIdentifierEnvironmentKUDA captures enum value "kUDA" - ObjectUniqueIdentifierEnvironmentKUDA string = "kUDA" - - // ObjectUniqueIdentifierEnvironmentKSfdc captures enum value "kSfdc" - ObjectUniqueIdentifierEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ObjectUniqueIdentifier) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectUniqueIdentifierTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectUniqueIdentifier) 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 validates this object unique identifier based on context it is used -func (m *ObjectUniqueIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectUniqueIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectUniqueIdentifier) UnmarshalBinary(b []byte) error { - var res ObjectUniqueIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/object_with_children.go b/v2/models/object_with_children.go deleted file mode 100644 index 7911bcef..00000000 --- a/v2/models/object_with_children.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectWithChildren Object information -// -// Specifies information of the object and its children objects. -// -// swagger:model ObjectWithChildren -type ObjectWithChildren struct { - Object - - // Specifies a list of child nodes for this specific node. - ObjectNode []*ObjectWithChildren `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectWithChildren) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Object - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Object = aO0 - - // AO1 - var dataAO1 struct { - ObjectNode []*ObjectWithChildren `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ObjectNode = dataAO1.ObjectNode - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectWithChildren) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Object) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ObjectNode []*ObjectWithChildren `json:"objects"` - } - - dataAO1.ObjectNode = m.ObjectNode - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object with children -func (m *ObjectWithChildren) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectWithChildren) validateObjectNode(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectNode) { // not required - return nil - } - - for i := 0; i < len(m.ObjectNode); i++ { - if swag.IsZero(m.ObjectNode[i]) { // not required - continue - } - - if m.ObjectNode[i] != nil { - if err := m.ObjectNode[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this object with children based on the context it is used -func (m *ObjectWithChildren) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectWithChildren) contextValidateObjectNode(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectNode); i++ { - - if m.ObjectNode[i] != nil { - - if swag.IsZero(m.ObjectNode[i]) { // not required - return nil - } - - if err := m.ObjectNode[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectWithChildren) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectWithChildren) UnmarshalBinary(b []byte) error { - var res ObjectWithChildren - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects.go b/v2/models/objects.go deleted file mode 100644 index ca99aa55..00000000 --- a/v2/models/objects.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Objects Objects -// -// Specifies the list of objects. -// -// swagger:model Objects -type Objects struct { - - // Specifies the list of objects. - Objects []*Object `json:"objects"` -} - -// Validate validates this objects -func (m *Objects) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Objects) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this objects based on the context it is used -func (m *Objects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Objects) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Objects) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Objects) UnmarshalBinary(b []byte) error { - var res Objects - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_action_request.go b/v2/models/objects_action_request.go deleted file mode 100644 index fa915bb6..00000000 --- a/v2/models/objects_action_request.go +++ /dev/null @@ -1,265 +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" -) - -// ObjectsActionRequest Specifies the type of the action need to be performed on given set of objects. -// -// swagger:model ObjectsActionRequest -type ObjectsActionRequest struct { - - // Specifies the action type that need to be performed. - // Enum: ["Link","UnLink"] - Action *string `json:"action,omitempty"` - - // Specifies the link type for the link/unlink action. - // Enum: ["Replication","FailoverRestore","VmMigration"] - LinkType *string `json:"linkType,omitempty"` - - // Specifies the parameters for object linking. - LinkParams *ObjectLinkingParams `json:"linkParams,omitempty"` - - // Specifies the parameters for object unlinking. - UnLinkParams *ObjectUnLinkingParams `json:"unLinkParams,omitempty"` -} - -// Validate validates this objects action request -func (m *ObjectsActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinkType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLinkParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnLinkParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectsActionRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Link","UnLink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectsActionRequestTypeActionPropEnum = append(objectsActionRequestTypeActionPropEnum, v) - } -} - -const ( - - // ObjectsActionRequestActionLink captures enum value "Link" - ObjectsActionRequestActionLink string = "Link" - - // ObjectsActionRequestActionUnLink captures enum value "UnLink" - ObjectsActionRequestActionUnLink string = "UnLink" -) - -// prop value enum -func (m *ObjectsActionRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectsActionRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectsActionRequest) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -var objectsActionRequestTypeLinkTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Replication","FailoverRestore","VmMigration"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectsActionRequestTypeLinkTypePropEnum = append(objectsActionRequestTypeLinkTypePropEnum, v) - } -} - -const ( - - // ObjectsActionRequestLinkTypeReplication captures enum value "Replication" - ObjectsActionRequestLinkTypeReplication string = "Replication" - - // ObjectsActionRequestLinkTypeFailoverRestore captures enum value "FailoverRestore" - ObjectsActionRequestLinkTypeFailoverRestore string = "FailoverRestore" - - // ObjectsActionRequestLinkTypeVMMigration captures enum value "VmMigration" - ObjectsActionRequestLinkTypeVMMigration string = "VmMigration" -) - -// prop value enum -func (m *ObjectsActionRequest) validateLinkTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectsActionRequestTypeLinkTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectsActionRequest) validateLinkType(formats strfmt.Registry) error { - if swag.IsZero(m.LinkType) { // not required - return nil - } - - // value enum - if err := m.validateLinkTypeEnum("linkType", "body", *m.LinkType); err != nil { - return err - } - - return nil -} - -func (m *ObjectsActionRequest) validateLinkParams(formats strfmt.Registry) error { - if swag.IsZero(m.LinkParams) { // not required - return nil - } - - if m.LinkParams != nil { - if err := m.LinkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linkParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsActionRequest) validateUnLinkParams(formats strfmt.Registry) error { - if swag.IsZero(m.UnLinkParams) { // not required - return nil - } - - if m.UnLinkParams != nil { - if err := m.UnLinkParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unLinkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unLinkParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this objects action request based on the context it is used -func (m *ObjectsActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLinkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnLinkParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsActionRequest) contextValidateLinkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LinkParams != nil { - - if swag.IsZero(m.LinkParams) { // not required - return nil - } - - if err := m.LinkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("linkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("linkParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsActionRequest) contextValidateUnLinkParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UnLinkParams != nil { - - if swag.IsZero(m.UnLinkParams) { // not required - return nil - } - - if err := m.UnLinkParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unLinkParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unLinkParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsActionRequest) UnmarshalBinary(b []byte) error { - var res ObjectsActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_bulk_action.go b/v2/models/objects_bulk_action.go deleted file mode 100644 index 77f00543..00000000 --- a/v2/models/objects_bulk_action.go +++ /dev/null @@ -1,105 +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" -) - -// ObjectsBulkAction Describes the object bulk action status. -// -// swagger:model ObjectsBulkAction -type ObjectsBulkAction struct { - - // Specifies the bulk action type. - // Enum: ["Link","UnLink"] - Type string `json:"type,omitempty"` -} - -// Validate validates this objects bulk action -func (m *ObjectsBulkAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectsBulkActionTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Link","UnLink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectsBulkActionTypeTypePropEnum = append(objectsBulkActionTypeTypePropEnum, v) - } -} - -const ( - - // ObjectsBulkActionTypeLink captures enum value "Link" - ObjectsBulkActionTypeLink string = "Link" - - // ObjectsBulkActionTypeUnLink captures enum value "UnLink" - ObjectsBulkActionTypeUnLink string = "UnLink" -) - -// prop value enum -func (m *ObjectsBulkAction) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectsBulkActionTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectsBulkAction) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this objects bulk action based on context it is used -func (m *ObjectsBulkAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsBulkAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsBulkAction) UnmarshalBinary(b []byte) error { - var res ObjectsBulkAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_discovery_params.go b/v2/models/objects_discovery_params.go deleted file mode 100644 index 28a6625e..00000000 --- a/v2/models/objects_discovery_params.go +++ /dev/null @@ -1,259 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ObjectsDiscoveryParams Office365 Objects Discovery parameters. -// -// Specifies the parameters used for discovering the office 365 objects selectively during source registration or refresh. -// -// swagger:model ObjectsDiscoveryParams -type ObjectsDiscoveryParams struct { - - // Specifies the list of object types that will be discovered as part of source registration or refresh. - DiscoverableObjectTypeList []string `json:"discoverableObjectTypeList"` - - // Specifies the discovery params for User(mailbox/onedrive) entities. - UsersDiscoveryParams *UsersDiscoveryParams `json:"usersDiscoveryParams,omitempty"` - - // Specifies the discovery params for SharePoint site entities. - SitesDiscoveryParams *SitesDiscoveryParams `json:"sitesDiscoveryParams,omitempty"` - - // Specifies additional params for Teams entities. - TeamsAdditionalParams *TeamsAdditionalParams `json:"teamsAdditionalParams,omitempty"` -} - -// Validate validates this objects discovery params -func (m *ObjectsDiscoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiscoverableObjectTypeList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUsersDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSitesDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsAdditionalParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var objectsDiscoveryParamsDiscoverableObjectTypeListItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDomain","kOutlook","kMailbox","kUsers","kGroups","kSites","kUser","kGroup","kSite","kApplication","kGraphUser","kPublicFolders","kPublicFolder","kTeams","kTeam","kRootPublicFolder","kO365Exchange","kO365OneDrive","kO365Sharepoint"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectsDiscoveryParamsDiscoverableObjectTypeListItemsEnum = append(objectsDiscoveryParamsDiscoverableObjectTypeListItemsEnum, v) - } -} - -func (m *ObjectsDiscoveryParams) validateDiscoverableObjectTypeListItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectsDiscoveryParamsDiscoverableObjectTypeListItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectsDiscoveryParams) validateDiscoverableObjectTypeList(formats strfmt.Registry) error { - if swag.IsZero(m.DiscoverableObjectTypeList) { // not required - return nil - } - - for i := 0; i < len(m.DiscoverableObjectTypeList); i++ { - - // value enum - if err := m.validateDiscoverableObjectTypeListItemsEnum("discoverableObjectTypeList"+"."+strconv.Itoa(i), "body", m.DiscoverableObjectTypeList[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ObjectsDiscoveryParams) validateUsersDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.UsersDiscoveryParams) { // not required - return nil - } - - if m.UsersDiscoveryParams != nil { - if err := m.UsersDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) validateSitesDiscoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.SitesDiscoveryParams) { // not required - return nil - } - - if m.SitesDiscoveryParams != nil { - if err := m.SitesDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitesDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitesDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) validateTeamsAdditionalParams(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsAdditionalParams) { // not required - return nil - } - - if m.TeamsAdditionalParams != nil { - if err := m.TeamsAdditionalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsAdditionalParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this objects discovery params based on the context it is used -func (m *ObjectsDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsersDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSitesDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsAdditionalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateUsersDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UsersDiscoveryParams != nil { - - if swag.IsZero(m.UsersDiscoveryParams) { // not required - return nil - } - - if err := m.UsersDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usersDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usersDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateSitesDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SitesDiscoveryParams != nil { - - if swag.IsZero(m.SitesDiscoveryParams) { // not required - return nil - } - - if err := m.SitesDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sitesDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sitesDiscoveryParams") - } - return err - } - } - - return nil -} - -func (m *ObjectsDiscoveryParams) contextValidateTeamsAdditionalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsAdditionalParams != nil { - - if swag.IsZero(m.TeamsAdditionalParams) { // not required - return nil - } - - if err := m.TeamsAdditionalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsAdditionalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsAdditionalParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsDiscoveryParams) UnmarshalBinary(b []byte) error { - var res ObjectsDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_last_run.go b/v2/models/objects_last_run.go deleted file mode 100644 index 652d41d9..00000000 --- a/v2/models/objects_last_run.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectsLastRun Last protection run info of objects. -// -// swagger:model ObjectsLastRun -type ObjectsLastRun struct { - - // Specifies a list of last protection runs of objects. - ObjectLastRuns []*ObjectLastRun `json:"objectLastRuns"` -} - -// Validate validates this objects last run -func (m *ObjectsLastRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectLastRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsLastRun) validateObjectLastRuns(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectLastRuns) { // not required - return nil - } - - for i := 0; i < len(m.ObjectLastRuns); i++ { - if swag.IsZero(m.ObjectLastRuns[i]) { // not required - continue - } - - if m.ObjectLastRuns[i] != nil { - if err := m.ObjectLastRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectLastRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectLastRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this objects last run based on the context it is used -func (m *ObjectsLastRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectLastRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsLastRun) contextValidateObjectLastRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectLastRuns); i++ { - - if m.ObjectLastRuns[i] != nil { - - if swag.IsZero(m.ObjectLastRuns[i]) { // not required - return nil - } - - if err := m.ObjectLastRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectLastRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectLastRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsLastRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsLastRun) UnmarshalBinary(b []byte) error { - var res ObjectsLastRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_link_type.go b/v2/models/objects_link_type.go deleted file mode 100644 index fbe20020..00000000 --- a/v2/models/objects_link_type.go +++ /dev/null @@ -1,110 +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" -) - -// ObjectsLinkType Object link type -// -// Specifies the link type for linking Magneto entities. -// -// swagger:model ObjectsLinkType -type ObjectsLinkType struct { - - // Specifies the link type for linking Magneto entities. - // Enum: ["Replication","FailoverRestore","VmMigration"] - Value string `json:"value,omitempty"` -} - -// Validate validates this objects link type -func (m *ObjectsLinkType) 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 objectsLinkTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Replication","FailoverRestore","VmMigration"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - objectsLinkTypeTypeValuePropEnum = append(objectsLinkTypeTypeValuePropEnum, v) - } -} - -const ( - - // ObjectsLinkTypeValueReplication captures enum value "Replication" - ObjectsLinkTypeValueReplication string = "Replication" - - // ObjectsLinkTypeValueFailoverRestore captures enum value "FailoverRestore" - ObjectsLinkTypeValueFailoverRestore string = "FailoverRestore" - - // ObjectsLinkTypeValueVMMigration captures enum value "VmMigration" - ObjectsLinkTypeValueVMMigration string = "VmMigration" -) - -// prop value enum -func (m *ObjectsLinkType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, objectsLinkTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ObjectsLinkType) 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 objects link type based on context it is used -func (m *ObjectsLinkType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsLinkType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsLinkType) UnmarshalBinary(b []byte) error { - var res ObjectsLinkType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/objects_search_response_body.go b/v2/models/objects_search_response_body.go deleted file mode 100644 index 82a82496..00000000 --- a/v2/models/objects_search_response_body.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectsSearchResponseBody Objects Search Result -// -// Specifies the Objects search result. -// -// swagger:model ObjectsSearchResponseBody -type ObjectsSearchResponseBody struct { - - // Specifies the list of Objects. - Objects []*SearchObject `json:"objects"` - - // Specifies the pagination cookie with which subsequent parts of the response can be fetched. - PaginationCookie *string `json:"paginationCookie,omitempty"` - - // Specifies the number of objects to be fetched for the specified pagination cookie. - Count *int32 `json:"count,omitempty"` -} - -// Validate validates this objects search response body -func (m *ObjectsSearchResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsSearchResponseBody) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this objects search response body based on the context it is used -func (m *ObjectsSearchResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ObjectsSearchResponseBody) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectsSearchResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectsSearchResponseBody) UnmarshalBinary(b []byte) error { - var res ObjectsSearchResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/odp_remote_cluster.go b/v2/models/odp_remote_cluster.go deleted file mode 100644 index 4a11b783..00000000 --- a/v2/models/odp_remote_cluster.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" -) - -// OdpRemoteCluster Specifies an ODP Remote Cluster config. -// -// swagger:model OdpRemoteCluster -type OdpRemoteCluster struct { - CreateOdpRemoteClusterParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OdpRemoteCluster) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateOdpRemoteClusterParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateOdpRemoteClusterParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OdpRemoteCluster) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CreateOdpRemoteClusterParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this odp remote cluster -func (m *OdpRemoteCluster) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateOdpRemoteClusterParams - if err := m.CreateOdpRemoteClusterParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this odp remote cluster based on the context it is used -func (m *OdpRemoteCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateOdpRemoteClusterParams - if err := m.CreateOdpRemoteClusterParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OdpRemoteCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OdpRemoteCluster) UnmarshalBinary(b []byte) error { - var res OdpRemoteCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/odp_remote_clusters.go b/v2/models/odp_remote_clusters.go deleted file mode 100644 index 90e9cf65..00000000 --- a/v2/models/odp_remote_clusters.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OdpRemoteClusters Specifies a list of ODP Remote Cluster configs. -// -// swagger:model OdpRemoteClusters -type OdpRemoteClusters struct { - - // Specifies the list of ODP Remote Cluster configs. - OdpRemoteClusters []*OdpRemoteCluster `json:"odpRemoteClusters"` -} - -// Validate validates this odp remote clusters -func (m *OdpRemoteClusters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOdpRemoteClusters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OdpRemoteClusters) validateOdpRemoteClusters(formats strfmt.Registry) error { - if swag.IsZero(m.OdpRemoteClusters) { // not required - return nil - } - - for i := 0; i < len(m.OdpRemoteClusters); i++ { - if swag.IsZero(m.OdpRemoteClusters[i]) { // not required - continue - } - - if m.OdpRemoteClusters[i] != nil { - if err := m.OdpRemoteClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("odpRemoteClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("odpRemoteClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this odp remote clusters based on the context it is used -func (m *OdpRemoteClusters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOdpRemoteClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OdpRemoteClusters) contextValidateOdpRemoteClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OdpRemoteClusters); i++ { - - if m.OdpRemoteClusters[i] != nil { - - if swag.IsZero(m.OdpRemoteClusters[i]) { // not required - return nil - } - - if err := m.OdpRemoteClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("odpRemoteClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("odpRemoteClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OdpRemoteClusters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OdpRemoteClusters) UnmarshalBinary(b []byte) error { - var res OdpRemoteClusters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_app_credentials.go b/v2/models/office365_app_credentials.go deleted file mode 100644 index f3c3310a..00000000 --- a/v2/models/office365_app_credentials.go +++ /dev/null @@ -1,55 +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" -) - -// Office365AppCredentials Office365 azure application credentials. -// -// Specifies credentials for office365 azure registered applications, used for office 365 source registration. -// -// swagger:model Office365AppCredentials -type Office365AppCredentials struct { - - // Specifies the application ID that the registration portal (apps.dev.microsoft.com) assigned. - ClientID *string `json:"clientId,omitempty"` - - // Specifies the application secret that was created in app registration portal. - ClientSecret *string `json:"clientSecret,omitempty"` -} - -// Validate validates this office365 app credentials -func (m *Office365AppCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 app credentials based on context it is used -func (m *Office365AppCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365AppCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365AppCredentials) UnmarshalBinary(b []byte) error { - var res Office365AppCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_groups_object_protection_params.go b/v2/models/office365_groups_object_protection_params.go deleted file mode 100644 index b4d303c2..00000000 --- a/v2/models/office365_groups_object_protection_params.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" -) - -// Office365GroupsObjectProtectionParams Specifies the params to create a Groups Object Protection. -// -// swagger:model Office365GroupsObjectProtectionParams -type Office365GroupsObjectProtectionParams struct { - Office365ObjectProtectionCommonParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365GroupsObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionCommonParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365GroupsObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionCommonParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 groups object protection params -func (m *Office365GroupsObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 groups object protection params based on the context it is used -func (m *Office365GroupsObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365GroupsObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365GroupsObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365GroupsObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_common_params.go b/v2/models/office365_object_protection_common_params.go deleted file mode 100644 index 7cf88d83..00000000 --- a/v2/models/office365_object_protection_common_params.go +++ /dev/null @@ -1,221 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Office365ObjectProtectionCommonParams Specifies the parameters which are specific to Microsoft 365 Object Protection. -// -// swagger:model Office365ObjectProtectionCommonParams -type Office365ObjectProtectionCommonParams struct { - - // Specifies the objects to be included in the Object Protection. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*Office365ObjectProtectionObjectParams `json:"objects"` - - // Specifies the fields required to enable indexing of the protected objects. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this office365 object protection common params -func (m *Office365ObjectProtectionCommonParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ObjectProtectionCommonParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365ObjectProtectionCommonParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 object protection common params based on the context it is used -func (m *Office365ObjectProtectionCommonParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ObjectProtectionCommonParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365ObjectProtectionCommonParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionCommonParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *Office365ObjectProtectionCommonParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionCommonParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionCommonParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_object_params.go b/v2/models/office365_object_protection_object_params.go deleted file mode 100644 index 86fb7781..00000000 --- a/v2/models/office365_object_protection_object_params.go +++ /dev/null @@ -1,118 +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" -) - -// Office365ObjectProtectionObjectParams Microsoft 365 Object Protection Object Params -// -// Specifies the object parameters to create a Microsoft 365 Object Protection. -// -// swagger:model Office365ObjectProtectionObjectParams -type Office365ObjectProtectionObjectParams struct { - - // Specifies the ID of the object being protected. If this is a non leaf level object, then the object will be auto-protected unless leaf objects are specified for exclusion. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the ID of the objects to be excluded in the Object Protection. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies if the object has to be autoprotected. This is applicable only for sharepoint sites. - ShouldAutoProtectObject *bool `json:"shouldAutoProtectObject,omitempty"` -} - -// Validate validates this office365 object protection object params -func (m *Office365ObjectProtectionObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ObjectProtectionObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *Office365ObjectProtectionObjectParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this office365 object protection object params based on the context it is used -func (m *Office365ObjectProtectionObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ObjectProtectionObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionObjectParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_params.go b/v2/models/office365_object_protection_params.go deleted file mode 100644 index fcb2d349..00000000 --- a/v2/models/office365_object_protection_params.go +++ /dev/null @@ -1,379 +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" -) - -// Office365ObjectProtectionParams Specifies the parameters which are specific to Microsoft 365 Object Protection. -// -// swagger:model Office365ObjectProtectionParams -type Office365ObjectProtectionParams struct { - - // Specifies the Microsoft 365 Object Protection type. - // Required: true - // Enum: ["kMailbox","kOneDrive","kSharePoint","kPublicFolders","kGroups","kTeams"] - ObjectProtectionType *string `json:"objectProtectionType"` - - // Specifies the User Mailbox Object Protection params. - UserMailboxObjectProtectionParams *Office365UserMailboxObjectProtectionParams `json:"userMailboxObjectProtectionParams,omitempty"` - - // Specifies the User OneDrive Protection params. - UserOneDriveObjectProtectionParams *Office365UserOneDriveObjectProtectionParams `json:"userOneDriveObjectProtectionParams,omitempty"` - - // Specifies the Sharepoint site object Protection params. - SharepointSiteObjectProtectionParams *Office365SharepointSiteObjectProtectionParams `json:"sharepointSiteObjectProtectionParams,omitempty"` - - // Specifies the Teams Object Protection params. - TeamsObjectProtectionParams *Office365TeamsObjectProtectionParams `json:"teamsObjectProtectionParams,omitempty"` - - // Specifies the Groups Object Protection params. - GroupsObjectProtectionParams *Office365GroupsObjectProtectionParams `json:"groupsObjectProtectionParams,omitempty"` -} - -// Validate validates this office365 object protection params -func (m *Office365ObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserMailboxObjectProtectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUserOneDriveObjectProtectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointSiteObjectProtectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsObjectProtectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroupsObjectProtectionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var office365ObjectProtectionParamsTypeObjectProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMailbox","kOneDrive","kSharePoint","kPublicFolders","kGroups","kTeams"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365ObjectProtectionParamsTypeObjectProtectionTypePropEnum = append(office365ObjectProtectionParamsTypeObjectProtectionTypePropEnum, v) - } -} - -const ( - - // Office365ObjectProtectionParamsObjectProtectionTypeKMailbox captures enum value "kMailbox" - Office365ObjectProtectionParamsObjectProtectionTypeKMailbox string = "kMailbox" - - // Office365ObjectProtectionParamsObjectProtectionTypeKOneDrive captures enum value "kOneDrive" - Office365ObjectProtectionParamsObjectProtectionTypeKOneDrive string = "kOneDrive" - - // Office365ObjectProtectionParamsObjectProtectionTypeKSharePoint captures enum value "kSharePoint" - Office365ObjectProtectionParamsObjectProtectionTypeKSharePoint string = "kSharePoint" - - // Office365ObjectProtectionParamsObjectProtectionTypeKPublicFolders captures enum value "kPublicFolders" - Office365ObjectProtectionParamsObjectProtectionTypeKPublicFolders string = "kPublicFolders" - - // Office365ObjectProtectionParamsObjectProtectionTypeKGroups captures enum value "kGroups" - Office365ObjectProtectionParamsObjectProtectionTypeKGroups string = "kGroups" - - // Office365ObjectProtectionParamsObjectProtectionTypeKTeams captures enum value "kTeams" - Office365ObjectProtectionParamsObjectProtectionTypeKTeams string = "kTeams" -) - -// prop value enum -func (m *Office365ObjectProtectionParams) validateObjectProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365ObjectProtectionParamsTypeObjectProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365ObjectProtectionParams) validateObjectProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("objectProtectionType", "body", m.ObjectProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateObjectProtectionTypeEnum("objectProtectionType", "body", *m.ObjectProtectionType); err != nil { - return err - } - - return nil -} - -func (m *Office365ObjectProtectionParams) validateUserMailboxObjectProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.UserMailboxObjectProtectionParams) { // not required - return nil - } - - if m.UserMailboxObjectProtectionParams != nil { - if err := m.UserMailboxObjectProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userMailboxObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userMailboxObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) validateUserOneDriveObjectProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.UserOneDriveObjectProtectionParams) { // not required - return nil - } - - if m.UserOneDriveObjectProtectionParams != nil { - if err := m.UserOneDriveObjectProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userOneDriveObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userOneDriveObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) validateSharepointSiteObjectProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.SharepointSiteObjectProtectionParams) { // not required - return nil - } - - if m.SharepointSiteObjectProtectionParams != nil { - if err := m.SharepointSiteObjectProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointSiteObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointSiteObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) validateTeamsObjectProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.TeamsObjectProtectionParams) { // not required - return nil - } - - if m.TeamsObjectProtectionParams != nil { - if err := m.TeamsObjectProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) validateGroupsObjectProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.GroupsObjectProtectionParams) { // not required - return nil - } - - if m.GroupsObjectProtectionParams != nil { - if err := m.GroupsObjectProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupsObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupsObjectProtectionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 object protection params based on the context it is used -func (m *Office365ObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserMailboxObjectProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserOneDriveObjectProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointSiteObjectProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsObjectProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroupsObjectProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ObjectProtectionParams) contextValidateUserMailboxObjectProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UserMailboxObjectProtectionParams != nil { - - if swag.IsZero(m.UserMailboxObjectProtectionParams) { // not required - return nil - } - - if err := m.UserMailboxObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userMailboxObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userMailboxObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) contextValidateUserOneDriveObjectProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UserOneDriveObjectProtectionParams != nil { - - if swag.IsZero(m.UserOneDriveObjectProtectionParams) { // not required - return nil - } - - if err := m.UserOneDriveObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userOneDriveObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userOneDriveObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) contextValidateSharepointSiteObjectProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointSiteObjectProtectionParams != nil { - - if swag.IsZero(m.SharepointSiteObjectProtectionParams) { // not required - return nil - } - - if err := m.SharepointSiteObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointSiteObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointSiteObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) contextValidateTeamsObjectProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.TeamsObjectProtectionParams != nil { - - if swag.IsZero(m.TeamsObjectProtectionParams) { // not required - return nil - } - - if err := m.TeamsObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsObjectProtectionParams") - } - return err - } - } - - return nil -} - -func (m *Office365ObjectProtectionParams) contextValidateGroupsObjectProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GroupsObjectProtectionParams != nil { - - if swag.IsZero(m.GroupsObjectProtectionParams) { // not required - return nil - } - - if err := m.GroupsObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groupsObjectProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groupsObjectProtectionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_request_params.go b/v2/models/office365_object_protection_request_params.go deleted file mode 100644 index a3dfc051..00000000 --- a/v2/models/office365_object_protection_request_params.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" -) - -// Office365ObjectProtectionRequestParams Specifies the request parameters specific to Microsoft 365 object protection. -// -// swagger:model Office365ObjectProtectionRequestParams -type Office365ObjectProtectionRequestParams struct { - Office365ObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365ObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365ObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 object protection request params -func (m *Office365ObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 object protection request params based on the context it is used -func (m *Office365ObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_response_params.go b/v2/models/office365_object_protection_response_params.go deleted file mode 100644 index dc169546..00000000 --- a/v2/models/office365_object_protection_response_params.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" -) - -// Office365ObjectProtectionResponseParams Specifies the response parameters specific to Microsoft 365 User Mailbox object protection. -// -// swagger:model Office365ObjectProtectionResponseParams -type Office365ObjectProtectionResponseParams struct { - Office365ObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365ObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365ObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 object protection response params -func (m *Office365ObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 object protection response params based on the context it is used -func (m *Office365ObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_object_protection_update_request_params.go b/v2/models/office365_object_protection_update_request_params.go deleted file mode 100644 index 65f0cf37..00000000 --- a/v2/models/office365_object_protection_update_request_params.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" -) - -// Office365ObjectProtectionUpdateRequestParams Specifies the update parameters specific to Microsoft 365 User Mailbox object protection. -// -// swagger:model Office365ObjectProtectionUpdateRequestParams -type Office365ObjectProtectionUpdateRequestParams struct { - Office365ObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365ObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365ObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 object protection update request params -func (m *Office365ObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 object protection update request params based on the context it is used -func (m *Office365ObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionParams - if err := m.Office365ObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res Office365ObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_one_drive_protection_group_params.go b/v2/models/office365_one_drive_protection_group_params.go deleted file mode 100644 index c28fef50..00000000 --- a/v2/models/office365_one_drive_protection_group_params.go +++ /dev/null @@ -1,114 +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" -) - -// Office365OneDriveProtectionGroupParams Office 365 OneDrive Protection Group Parameters. -// -// Specifies the parameters which are specific to Office 365 OneDrive related Protection Groups. -// -// swagger:model Office365OneDriveProtectionGroupParams -type Office365OneDriveProtectionGroupParams struct { - - // Array of Excluded OneDrive folders. Specifies filters to match OneDrive folders which should be excluded when backing up Office 365 source. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all the mailboxes will be protected. - ExcludeFolders []string `json:"excludeFolders"` - - // Specifies the parameters specific to the protection of the Preservation Hold library. - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` -} - -// Validate validates this office365 one drive protection group params -func (m *Office365OneDriveProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreservationHoldLibraryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365OneDriveProtectionGroupParams) validatePreservationHoldLibraryParams(formats strfmt.Registry) error { - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if m.PreservationHoldLibraryParams != nil { - if err := m.PreservationHoldLibraryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 one drive protection group params based on the context it is used -func (m *Office365OneDriveProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreservationHoldLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365OneDriveProtectionGroupParams) contextValidatePreservationHoldLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PreservationHoldLibraryParams != nil { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if err := m.PreservationHoldLibraryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365OneDriveProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365OneDriveProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res Office365OneDriveProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_outlook_protection_group_params.go b/v2/models/office365_outlook_protection_group_params.go deleted file mode 100644 index 7643fa53..00000000 --- a/v2/models/office365_outlook_protection_group_params.go +++ /dev/null @@ -1,55 +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" -) - -// Office365OutlookProtectionGroupParams Office 365(O365) Outlook Protection Group Parameters. -// -// Specifies the parameters which are specific to Office 365 Outlook related Protection Groups. -// -// swagger:model Office365OutlookProtectionGroupParams -type Office365OutlookProtectionGroupParams struct { - - // Array of prefixes used to exclude folders which are by default included. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all folders which are included by default will be included. These prefixes have no effect on folders that are excluded by default. The only folders excluded by default are documented with includeFolders. - ExcludeFolders []string `json:"excludeFolders"` - - // Array of prefixes used to include folders which are by default excluded. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all folders which are excluded by default will be excluded. These prefixes have no effect on folders that are included by default. All folders are included by default except for the Recoverable Items folder. - IncludeFolders []string `json:"includeFolders"` -} - -// Validate validates this office365 outlook protection group params -func (m *Office365OutlookProtectionGroupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 outlook protection group params based on context it is used -func (m *Office365OutlookProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365OutlookProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365OutlookProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res Office365OutlookProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_preservation_hold_library_params.go b/v2/models/office365_preservation_hold_library_params.go deleted file mode 100644 index a0119b86..00000000 --- a/v2/models/office365_preservation_hold_library_params.go +++ /dev/null @@ -1,52 +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" -) - -// Office365PreservationHoldLibraryParams Office 365 Preservation Hold Library Params -// -// Specifies the parameters specific to the protection of the Preservation Hold library. The Preservation Hold library is a hidden system location that isn't designed to be used interactively but instead, automatically stores files when this is needed for compliance reasons. It's not supported to edit, delete, or move these automatically retained files yourself. Instead, use compliance tools, such as those supported by eDiscovery to access these files. -// -// swagger:model Office365PreservationHoldLibraryParams -type Office365PreservationHoldLibraryParams struct { - - // Specifies whether to protect the preservation hold library drive if one exists. Default is false. - ShouldProtect *bool `json:"shouldProtect,omitempty"` -} - -// Validate validates this office365 preservation hold library params -func (m *Office365PreservationHoldLibraryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 preservation hold library params based on context it is used -func (m *Office365PreservationHoldLibraryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365PreservationHoldLibraryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365PreservationHoldLibraryParams) UnmarshalBinary(b []byte) error { - var res Office365PreservationHoldLibraryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_protection_group_object_params.go b/v2/models/office365_protection_group_object_params.go deleted file mode 100644 index efb73b25..00000000 --- a/v2/models/office365_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// Office365ProtectionGroupObjectParams Office 365 ProtectionGroup Object Params -// -// Specifies the object parameters to create a Office 365 Protection Group. -// -// swagger:model Office365ProtectionGroupObjectParams -type Office365ProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this office365 protection group object params -func (m *Office365ProtectionGroupObjectParams) 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 *Office365ProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this office365 protection group object params based on the context it is used -func (m *Office365ProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res Office365ProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_protection_group_params.go b/v2/models/office365_protection_group_params.go deleted file mode 100644 index e6b17dc8..00000000 --- a/v2/models/office365_protection_group_params.go +++ /dev/null @@ -1,500 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Office365ProtectionGroupParams Office 365(o365) Protection Group Parameters. -// -// Specifies the parameters which are specific to Office 365 related Protection Groups. -// -// swagger:model Office365ProtectionGroupParams -type Office365ProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*Office365ProtectionGroupObjectParams `json:"objects"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the Office 365 Protection Group types. - // Required: true - // Min Items: 1 - ProtectionTypes []string `json:"protectionTypes"` - - // Specifies the parameters specific to Outlook Protection Group type. - OutlookProtectionTypeParams *Office365OutlookProtectionGroupParams `json:"outlookProtectionTypeParams,omitempty"` - - // Specifies the parameters specific to OneDrive Protection Group type. - OneDriveProtectionTypeParams *Office365OneDriveProtectionGroupParams `json:"oneDriveProtectionTypeParams,omitempty"` - - // Specifies the parameters specific to SharePoint Protection Group type. - SharePointProtectionTypeParams *Office365SharePointProtectionGroupParams `json:"sharePointProtectionTypeParams,omitempty"` - - // Specifies the parameters specific to PublicFolders Protection Group type. - PublicFoldersProtectionTypeParams *Office365PublicFoldersProtectionGroupParams `json:"publicFoldersProtectionTypeParams,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` -} - -// Validate validates this office365 protection group params -func (m *Office365ProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutlookProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharePointProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFoldersProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -var office365ProtectionGroupParamsProtectionTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMailbox","kOneDrive","kSharePoint","kPublicFolders","kGroups","kTeams"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365ProtectionGroupParamsProtectionTypesItemsEnum = append(office365ProtectionGroupParamsProtectionTypesItemsEnum, v) - } -} - -func (m *Office365ProtectionGroupParams) validateProtectionTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365ProtectionGroupParamsProtectionTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365ProtectionGroupParams) validateProtectionTypes(formats strfmt.Registry) error { - - if err := validate.Required("protectionTypes", "body", m.ProtectionTypes); err != nil { - return err - } - - iProtectionTypesSize := int64(len(m.ProtectionTypes)) - - if err := validate.MinItems("protectionTypes", "body", iProtectionTypesSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.ProtectionTypes); i++ { - - // value enum - if err := m.validateProtectionTypesItemsEnum("protectionTypes"+"."+strconv.Itoa(i), "body", m.ProtectionTypes[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validateOutlookProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.OutlookProtectionTypeParams) { // not required - return nil - } - - if m.OutlookProtectionTypeParams != nil { - if err := m.OutlookProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validateOneDriveProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.OneDriveProtectionTypeParams) { // not required - return nil - } - - if m.OneDriveProtectionTypeParams != nil { - if err := m.OneDriveProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validateSharePointProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.SharePointProtectionTypeParams) { // not required - return nil - } - - if m.SharePointProtectionTypeParams != nil { - if err := m.SharePointProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) validatePublicFoldersProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.PublicFoldersProtectionTypeParams) { // not required - return nil - } - - if m.PublicFoldersProtectionTypeParams != nil { - if err := m.PublicFoldersProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 protection group params based on the context it is used -func (m *Office365ProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutlookProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharePointProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFoldersProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateOutlookProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OutlookProtectionTypeParams != nil { - - if swag.IsZero(m.OutlookProtectionTypeParams) { // not required - return nil - } - - if err := m.OutlookProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outlookProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outlookProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateOneDriveProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveProtectionTypeParams != nil { - - if swag.IsZero(m.OneDriveProtectionTypeParams) { // not required - return nil - } - - if err := m.OneDriveProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateSharePointProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharePointProtectionTypeParams != nil { - - if swag.IsZero(m.SharePointProtectionTypeParams) { // not required - return nil - } - - if err := m.SharePointProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePointProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePointProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidatePublicFoldersProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFoldersProtectionTypeParams != nil { - - if swag.IsZero(m.PublicFoldersProtectionTypeParams) { // not required - return nil - } - - if err := m.PublicFoldersProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFoldersProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFoldersProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *Office365ProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365ProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365ProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res Office365ProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_public_folders_protection_group_params.go b/v2/models/office365_public_folders_protection_group_params.go deleted file mode 100644 index 119f9b62..00000000 --- a/v2/models/office365_public_folders_protection_group_params.go +++ /dev/null @@ -1,52 +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" -) - -// Office365PublicFoldersProtectionGroupParams Office 365(O365) PublicFolders Protection Group Parameters. -// -// Specifies the parameters which are specific to Office 365 PublicFolders related Protection Groups. -// -// swagger:model Office365PublicFoldersProtectionGroupParams -type Office365PublicFoldersProtectionGroupParams struct { - - // Array of Excluded Public folders. Specifies filters to match PublicFolder folders which should be excluded when backing up Office 365 source. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all the PublicFolders will be protected. - ExcludeFolders []string `json:"excludeFolders"` -} - -// Validate validates this office365 public folders protection group params -func (m *Office365PublicFoldersProtectionGroupParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this office365 public folders protection group params based on context it is used -func (m *Office365PublicFoldersProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365PublicFoldersProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365PublicFoldersProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res Office365PublicFoldersProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_region_type.go b/v2/models/office365_region_type.go deleted file mode 100644 index fd316dce..00000000 --- a/v2/models/office365_region_type.go +++ /dev/null @@ -1,116 +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" -) - -// Office365RegionType Microsoft365 Region -// -// Specifies the tenant region type for Microsoft365 domain. -// -// swagger:model Office365RegionType -type Office365RegionType struct { - - // Specifies the tenant region type for Microsoft365 domain. - // Enum: ["Default","China","Germany","UsDoD","UsGccHigh"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this office365 region type -func (m *Office365RegionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var office365RegionTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","China","Germany","UsDoD","UsGccHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365RegionTypeTypeEnumPropEnum = append(office365RegionTypeTypeEnumPropEnum, v) - } -} - -const ( - - // Office365RegionTypeEnumDefault captures enum value "Default" - Office365RegionTypeEnumDefault string = "Default" - - // Office365RegionTypeEnumChina captures enum value "China" - Office365RegionTypeEnumChina string = "China" - - // Office365RegionTypeEnumGermany captures enum value "Germany" - Office365RegionTypeEnumGermany string = "Germany" - - // Office365RegionTypeEnumUsDoD captures enum value "UsDoD" - Office365RegionTypeEnumUsDoD string = "UsDoD" - - // Office365RegionTypeEnumUsGccHigh captures enum value "UsGccHigh" - Office365RegionTypeEnumUsGccHigh string = "UsGccHigh" -) - -// prop value enum -func (m *Office365RegionType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365RegionTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365RegionType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this office365 region type based on context it is used -func (m *Office365RegionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Office365RegionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365RegionType) UnmarshalBinary(b []byte) error { - var res Office365RegionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_share_point_protection_group_params.go b/v2/models/office365_share_point_protection_group_params.go deleted file mode 100644 index 3f1a7944..00000000 --- a/v2/models/office365_share_point_protection_group_params.go +++ /dev/null @@ -1,114 +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" -) - -// Office365SharePointProtectionGroupParams Office 365 SharePoint Protection Group Parameters. -// -// Specifies the parameters which are specific to Office 365 SharePoint related Protection Groups. -// -// swagger:model Office365SharePointProtectionGroupParams -type Office365SharePointProtectionGroupParams struct { - - // Specifies the parameters specific to the protection of the Preservation Hold library. - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - - // Array of paths to be excluded from backup. Specifies list of doclib/directory paths which should be excluded when backing up Office 365 source. supported exclusion: - doclib exclusion: whole doclib is excluded from backup. sample: /Doclib1 - directory exclusion: specified path in doclib will be excluded from backup. sample: /Doclib1/folderA/forderB Doclibs can be specified by either a) Doclib name - eg, Documents. b) Drive id of doclib - b!ZMSl2JRm0UeXLHfHR1m-iuD10p0CIV9qSa6TtgM Regular expressions are not supported. If not specified, all the doclibs within sharepoint site will be protected. - ExcludePaths []string `json:"excludePaths"` -} - -// Validate validates this office365 share point protection group params -func (m *Office365SharePointProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreservationHoldLibraryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SharePointProtectionGroupParams) validatePreservationHoldLibraryParams(formats strfmt.Registry) error { - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if m.PreservationHoldLibraryParams != nil { - if err := m.PreservationHoldLibraryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 share point protection group params based on the context it is used -func (m *Office365SharePointProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreservationHoldLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SharePointProtectionGroupParams) contextValidatePreservationHoldLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PreservationHoldLibraryParams != nil { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if err := m.PreservationHoldLibraryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365SharePointProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365SharePointProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res Office365SharePointProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_sharepoint_site_object_protection_params.go b/v2/models/office365_sharepoint_site_object_protection_params.go deleted file mode 100644 index 36691882..00000000 --- a/v2/models/office365_sharepoint_site_object_protection_params.go +++ /dev/null @@ -1,177 +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" -) - -// Office365SharepointSiteObjectProtectionParams Specifies the params to create a Sharepoint site Object Protection. -// -// swagger:model Office365SharepointSiteObjectProtectionParams -type Office365SharepointSiteObjectProtectionParams struct { - Office365ObjectProtectionCommonParams - - // Specifies the parameters specific to the protection of the Preservation Hold library. - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - - // Array of paths to be excluded from backup. Specifies list of doclib/directory paths which should be excluded when backing up Office 365 source. supported exclusion: - doclib exclusion: whole doclib is excluded from backup. sample: /Doclib1 - directory exclusion: specified path in doclib will be excluded from backup. sample: /Doclib1/folderA/forderB Doclibs can be specified by either a) Doclib name - eg, Documents. b) Drive id of doclib - b!ZMSl2JRm0UeXLHfHR1m-iuD10p0CIV9qSa6TtgM Regular expressions are not supported. If not specified, all the doclibs within sharepoint site will be protected. - ExcludePaths []string `json:"excludePaths"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365SharepointSiteObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionCommonParams = aO0 - - // AO1 - var dataAO1 struct { - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - - ExcludePaths []string `json:"excludePaths"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.PreservationHoldLibraryParams = dataAO1.PreservationHoldLibraryParams - - m.ExcludePaths = dataAO1.ExcludePaths - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365SharepointSiteObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionCommonParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - - ExcludePaths []string `json:"excludePaths"` - } - - dataAO1.PreservationHoldLibraryParams = m.PreservationHoldLibraryParams - - dataAO1.ExcludePaths = m.ExcludePaths - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 sharepoint site object protection params -func (m *Office365SharepointSiteObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreservationHoldLibraryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SharepointSiteObjectProtectionParams) validatePreservationHoldLibraryParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if m.PreservationHoldLibraryParams != nil { - if err := m.PreservationHoldLibraryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 sharepoint site object protection params based on the context it is used -func (m *Office365SharepointSiteObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreservationHoldLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SharepointSiteObjectProtectionParams) contextValidatePreservationHoldLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PreservationHoldLibraryParams != nil { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if err := m.PreservationHoldLibraryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365SharepointSiteObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365SharepointSiteObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365SharepointSiteObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_source_registration_params.go b/v2/models/office365_source_registration_params.go deleted file mode 100644 index 80e9a30e..00000000 --- a/v2/models/office365_source_registration_params.go +++ /dev/null @@ -1,396 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Office365SourceRegistrationParams Office 365 Source Registration parameters -// -// Specifies the paramaters to register an office-365 source. -// -// swagger:model Office365SourceRegistrationParams -type Office365SourceRegistrationParams struct { - CommonSourceRegistrationParams - - // Specifies a list of office365 azure application credentials needed to authenticate & authorize users for Office 365. - Office365AppCredentialsList []*Office365AppCredentials `json:"office365AppCredentialsList"` - - // Specifies the list of Office365 service account credentials which can be used for Mailbox Backups. - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - // Specifies whether OAuth should be used for authentication in case of Exchange Online. - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - // Specifies the list of the protection source id of the windows physical host which will be used during the protection and recovery of the sites that belong to a office365 domain. - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - // Specifies the region where Office 365 Exchange environment is. - // Enum: ["Default","China","Germany","UsDoD","UsGccHigh"] - Office365Region *string `json:"office365Region,omitempty"` - - // Specifies the parameters used for selectively discovering the office 365 objects during source registration or refresh. Example: o365ObjectsDiscoveryParams: { discoverableObjectTypeList:{['kUsers', 'kSites', 'kGroups']}, usersDiscoveryParams:{discoverUsersWithMailbox:true, discoverUsersWithOnedrive:false} } - O365ObjectsDiscoveryParams *ObjectsDiscoveryParams `json:"o365ObjectsDiscoveryParams,omitempty"` - - // Specifies whether to use existing Office365 credentials like password and client secret for app id's. This parameter is only valid in the case of updating the registered source. - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365SourceRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - Office365AppCredentialsList []*Office365AppCredentials `json:"office365AppCredentialsList"` - - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - Office365Region *string `json:"office365Region,omitempty"` - - O365ObjectsDiscoveryParams *ObjectsDiscoveryParams `json:"o365ObjectsDiscoveryParams,omitempty"` - - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Office365AppCredentialsList = dataAO1.Office365AppCredentialsList - - m.Office365ServiceAccountCredentialsList = dataAO1.Office365ServiceAccountCredentialsList - - m.UseOAuthForExchangeOnline = dataAO1.UseOAuthForExchangeOnline - - m.ProxyHostSourceIDList = dataAO1.ProxyHostSourceIDList - - m.Office365Region = dataAO1.Office365Region - - m.O365ObjectsDiscoveryParams = dataAO1.O365ObjectsDiscoveryParams - - m.UseExistingCredentials = dataAO1.UseExistingCredentials - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365SourceRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Office365AppCredentialsList []*Office365AppCredentials `json:"office365AppCredentialsList"` - - Office365ServiceAccountCredentialsList []*Credentials `json:"office365ServiceAccountCredentialsList"` - - UseOAuthForExchangeOnline *bool `json:"useOAuthForExchangeOnline,omitempty"` - - ProxyHostSourceIDList []int64 `json:"proxyHostSourceIdList"` - - Office365Region *string `json:"office365Region,omitempty"` - - O365ObjectsDiscoveryParams *ObjectsDiscoveryParams `json:"o365ObjectsDiscoveryParams,omitempty"` - - UseExistingCredentials *bool `json:"useExistingCredentials,omitempty"` - } - - dataAO1.Office365AppCredentialsList = m.Office365AppCredentialsList - - dataAO1.Office365ServiceAccountCredentialsList = m.Office365ServiceAccountCredentialsList - - dataAO1.UseOAuthForExchangeOnline = m.UseOAuthForExchangeOnline - - dataAO1.ProxyHostSourceIDList = m.ProxyHostSourceIDList - - dataAO1.Office365Region = m.Office365Region - - dataAO1.O365ObjectsDiscoveryParams = m.O365ObjectsDiscoveryParams - - dataAO1.UseExistingCredentials = m.UseExistingCredentials - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 source registration params -func (m *Office365SourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365AppCredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365ServiceAccountCredentialsList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Region(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365ObjectsDiscoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SourceRegistrationParams) validateOffice365AppCredentialsList(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365AppCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365AppCredentialsList); i++ { - if swag.IsZero(m.Office365AppCredentialsList[i]) { // not required - continue - } - - if m.Office365AppCredentialsList[i] != nil { - if err := m.Office365AppCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365SourceRegistrationParams) validateOffice365ServiceAccountCredentialsList(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365ServiceAccountCredentialsList) { // not required - return nil - } - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - continue - } - - if m.Office365ServiceAccountCredentialsList[i] != nil { - if err := m.Office365ServiceAccountCredentialsList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var office365SourceRegistrationParamsTypeOffice365RegionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","China","Germany","UsDoD","UsGccHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - office365SourceRegistrationParamsTypeOffice365RegionPropEnum = append(office365SourceRegistrationParamsTypeOffice365RegionPropEnum, v) - } -} - -// property enum -func (m *Office365SourceRegistrationParams) validateOffice365RegionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, office365SourceRegistrationParamsTypeOffice365RegionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Office365SourceRegistrationParams) validateOffice365Region(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Region) { // not required - return nil - } - - // value enum - if err := m.validateOffice365RegionEnum("office365Region", "body", *m.Office365Region); err != nil { - return err - } - - return nil -} - -func (m *Office365SourceRegistrationParams) validateO365ObjectsDiscoveryParams(formats strfmt.Registry) error { - - if swag.IsZero(m.O365ObjectsDiscoveryParams) { // not required - return nil - } - - if m.O365ObjectsDiscoveryParams != nil { - if err := m.O365ObjectsDiscoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365ObjectsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365ObjectsDiscoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 source registration params based on the context it is used -func (m *Office365SourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365AppCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365ServiceAccountCredentialsList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365ObjectsDiscoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365SourceRegistrationParams) contextValidateOffice365AppCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365AppCredentialsList); i++ { - - if m.Office365AppCredentialsList[i] != nil { - - if swag.IsZero(m.Office365AppCredentialsList[i]) { // not required - return nil - } - - if err := m.Office365AppCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365AppCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365AppCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365SourceRegistrationParams) contextValidateOffice365ServiceAccountCredentialsList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Office365ServiceAccountCredentialsList); i++ { - - if m.Office365ServiceAccountCredentialsList[i] != nil { - - if swag.IsZero(m.Office365ServiceAccountCredentialsList[i]) { // not required - return nil - } - - if err := m.Office365ServiceAccountCredentialsList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ServiceAccountCredentialsList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Office365SourceRegistrationParams) contextValidateO365ObjectsDiscoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.O365ObjectsDiscoveryParams != nil { - - if swag.IsZero(m.O365ObjectsDiscoveryParams) { // not required - return nil - } - - if err := m.O365ObjectsDiscoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365ObjectsDiscoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365ObjectsDiscoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365SourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365SourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res Office365SourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_teams_object_protection_params.go b/v2/models/office365_teams_object_protection_params.go deleted file mode 100644 index 3db5388f..00000000 --- a/v2/models/office365_teams_object_protection_params.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" -) - -// Office365TeamsObjectProtectionParams Specifies the params to create a Teams Object Protection. -// -// swagger:model Office365TeamsObjectProtectionParams -type Office365TeamsObjectProtectionParams struct { - Office365ObjectProtectionCommonParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365TeamsObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionCommonParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365TeamsObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionCommonParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 teams object protection params -func (m *Office365TeamsObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 teams object protection params based on the context it is used -func (m *Office365TeamsObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365TeamsObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365TeamsObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365TeamsObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_user_mailbox_object_protection_params.go b/v2/models/office365_user_mailbox_object_protection_params.go deleted file mode 100644 index f75ccc26..00000000 --- a/v2/models/office365_user_mailbox_object_protection_params.go +++ /dev/null @@ -1,128 +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" -) - -// Office365UserMailboxObjectProtectionParams Specifies the params to create a User Mailbox Object Protection. -// -// swagger:model Office365UserMailboxObjectProtectionParams -type Office365UserMailboxObjectProtectionParams struct { - Office365ObjectProtectionCommonParams - - // Array of prefixes used to exclude folders which are by default included. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all folders which are included by default will be included. These prefixes have no effect on folders that are excluded by default. The only folders excluded by default are documented with includeFolders. - ExcludeFolders []string `json:"excludeFolders"` - - // Array of prefixes used to include folders which are by default excluded. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all folders which are excluded by default will be excluded. These prefixes have no effect on folders that are included by default. All folders are included by default except for the Recoverable Items folder. - IncludeFolders []string `json:"includeFolders"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365UserMailboxObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionCommonParams = aO0 - - // AO1 - var dataAO1 struct { - ExcludeFolders []string `json:"excludeFolders"` - - IncludeFolders []string `json:"includeFolders"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ExcludeFolders = dataAO1.ExcludeFolders - - m.IncludeFolders = dataAO1.IncludeFolders - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365UserMailboxObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionCommonParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ExcludeFolders []string `json:"excludeFolders"` - - IncludeFolders []string `json:"includeFolders"` - } - - dataAO1.ExcludeFolders = m.ExcludeFolders - - dataAO1.IncludeFolders = m.IncludeFolders - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 user mailbox object protection params -func (m *Office365UserMailboxObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this office365 user mailbox object protection params based on the context it is used -func (m *Office365UserMailboxObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Office365UserMailboxObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365UserMailboxObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365UserMailboxObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/office365_user_one_drive_object_protection_params.go b/v2/models/office365_user_one_drive_object_protection_params.go deleted file mode 100644 index ad04b42e..00000000 --- a/v2/models/office365_user_one_drive_object_protection_params.go +++ /dev/null @@ -1,177 +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" -) - -// Office365UserOneDriveObjectProtectionParams Specifies the params to create a User OneDrive Object Protection. -// -// swagger:model Office365UserOneDriveObjectProtectionParams -type Office365UserOneDriveObjectProtectionParams struct { - Office365ObjectProtectionCommonParams - - // Specifies filters to match OneDrive folders which should be excluded when backing up office365 onedrive source. Two kinds of filters are supported. a) prefix which always starts with '/'. b) posix which always starts with empty quotes(''). Regular expressions are not supported. If not specified, all the OneDrive will be protected. - ExcludeFolders []string `json:"excludeFolders"` - - // Specifies the parameters specific to the protection of the Preservation Hold library. - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Office365UserOneDriveObjectProtectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ObjectProtectionCommonParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ObjectProtectionCommonParams = aO0 - - // AO1 - var dataAO1 struct { - ExcludeFolders []string `json:"excludeFolders"` - - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ExcludeFolders = dataAO1.ExcludeFolders - - m.PreservationHoldLibraryParams = dataAO1.PreservationHoldLibraryParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Office365UserOneDriveObjectProtectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Office365ObjectProtectionCommonParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ExcludeFolders []string `json:"excludeFolders"` - - PreservationHoldLibraryParams *Office365PreservationHoldLibraryParams `json:"preservationHoldLibraryParams,omitempty"` - } - - dataAO1.ExcludeFolders = m.ExcludeFolders - - dataAO1.PreservationHoldLibraryParams = m.PreservationHoldLibraryParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this office365 user one drive object protection params -func (m *Office365UserOneDriveObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreservationHoldLibraryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365UserOneDriveObjectProtectionParams) validatePreservationHoldLibraryParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if m.PreservationHoldLibraryParams != nil { - if err := m.PreservationHoldLibraryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this office365 user one drive object protection params based on the context it is used -func (m *Office365UserOneDriveObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ObjectProtectionCommonParams - if err := m.Office365ObjectProtectionCommonParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreservationHoldLibraryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Office365UserOneDriveObjectProtectionParams) contextValidatePreservationHoldLibraryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PreservationHoldLibraryParams != nil { - - if swag.IsZero(m.PreservationHoldLibraryParams) { // not required - return nil - } - - if err := m.PreservationHoldLibraryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservationHoldLibraryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservationHoldLibraryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Office365UserOneDriveObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Office365UserOneDriveObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res Office365UserOneDriveObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_deploy_run.go b/v2/models/on_prem_deploy_run.go deleted file mode 100644 index 0ad1f5ea..00000000 --- a/v2/models/on_prem_deploy_run.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OnPremDeployRun OnPrem deploy run information for an object. -// -// Specifies information about onprem deploy run for an object. -// -// swagger:model OnPremDeployRun -type OnPremDeployRun struct { - - // OnPrem Deploy result for a target. - OnPremDeployTargetResults []*OnPremDeployTargetResult `json:"onPremDeployTargetResults"` -} - -// Validate validates this on prem deploy run -func (m *OnPremDeployRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOnPremDeployTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployRun) validateOnPremDeployTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.OnPremDeployTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.OnPremDeployTargetResults); i++ { - if swag.IsZero(m.OnPremDeployTargetResults[i]) { // not required - continue - } - - if m.OnPremDeployTargetResults[i] != nil { - if err := m.OnPremDeployTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onPremDeployTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onPremDeployTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this on prem deploy run based on the context it is used -func (m *OnPremDeployRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOnPremDeployTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployRun) contextValidateOnPremDeployTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OnPremDeployTargetResults); i++ { - - if m.OnPremDeployTargetResults[i] != nil { - - if swag.IsZero(m.OnPremDeployTargetResults[i]) { // not required - return nil - } - - if err := m.OnPremDeployTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onPremDeployTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onPremDeployTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremDeployRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremDeployRun) UnmarshalBinary(b []byte) error { - var res OnPremDeployRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_deploy_target_result.go b/v2/models/on_prem_deploy_target_result.go deleted file mode 100644 index 48dd4545..00000000 --- a/v2/models/on_prem_deploy_target_result.go +++ /dev/null @@ -1,246 +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" -) - -// OnPremDeployTargetResult OnPrem Deploy result for a target. -// -// OnPrem Deploy result for a target. -// -// swagger:model OnPremDeployTargetResult -type OnPremDeployTargetResult struct { - - // Status of the OnPrem deploy for a target. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Message about the onprem deploy run. - Message *string `json:"message,omitempty"` - - // Target environment of the onprem deploy task. - // Enum: ["kVMware"] - Environment *string `json:"environment,omitempty"` - - // vmware params - VmwareParams *OnPremDeployTargetResultVmwareParams `json:"vmwareParams,omitempty"` - - // Specifies the error message for onprem task failure. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// Validate validates this on prem deploy target result -func (m *OnPremDeployTargetResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var onPremDeployTargetResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - onPremDeployTargetResultTypeStatusPropEnum = append(onPremDeployTargetResultTypeStatusPropEnum, v) - } -} - -const ( - - // OnPremDeployTargetResultStatusAccepted captures enum value "Accepted" - OnPremDeployTargetResultStatusAccepted string = "Accepted" - - // OnPremDeployTargetResultStatusRunning captures enum value "Running" - OnPremDeployTargetResultStatusRunning string = "Running" - - // OnPremDeployTargetResultStatusCanceled captures enum value "Canceled" - OnPremDeployTargetResultStatusCanceled string = "Canceled" - - // OnPremDeployTargetResultStatusCanceling captures enum value "Canceling" - OnPremDeployTargetResultStatusCanceling string = "Canceling" - - // OnPremDeployTargetResultStatusFailed captures enum value "Failed" - OnPremDeployTargetResultStatusFailed string = "Failed" - - // OnPremDeployTargetResultStatusMissed captures enum value "Missed" - OnPremDeployTargetResultStatusMissed string = "Missed" - - // OnPremDeployTargetResultStatusSucceeded captures enum value "Succeeded" - OnPremDeployTargetResultStatusSucceeded string = "Succeeded" - - // OnPremDeployTargetResultStatusSucceededWithWarning captures enum value "SucceededWithWarning" - OnPremDeployTargetResultStatusSucceededWithWarning string = "SucceededWithWarning" - - // OnPremDeployTargetResultStatusOnHold captures enum value "OnHold" - OnPremDeployTargetResultStatusOnHold string = "OnHold" - - // OnPremDeployTargetResultStatusFinalizing captures enum value "Finalizing" - OnPremDeployTargetResultStatusFinalizing string = "Finalizing" - - // OnPremDeployTargetResultStatusSkipped captures enum value "Skipped" - OnPremDeployTargetResultStatusSkipped string = "Skipped" - - // OnPremDeployTargetResultStatusPaused captures enum value "Paused" - OnPremDeployTargetResultStatusPaused string = "Paused" -) - -// prop value enum -func (m *OnPremDeployTargetResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, onPremDeployTargetResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OnPremDeployTargetResult) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -var onPremDeployTargetResultTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - onPremDeployTargetResultTypeEnvironmentPropEnum = append(onPremDeployTargetResultTypeEnvironmentPropEnum, v) - } -} - -const ( - - // OnPremDeployTargetResultEnvironmentKVMware captures enum value "kVMware" - OnPremDeployTargetResultEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *OnPremDeployTargetResult) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, onPremDeployTargetResultTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OnPremDeployTargetResult) 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 -} - -func (m *OnPremDeployTargetResult) validateVmwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this on prem deploy target result based on the context it is used -func (m *OnPremDeployTargetResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTargetResult) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremDeployTargetResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremDeployTargetResult) UnmarshalBinary(b []byte) error { - var res OnPremDeployTargetResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_deploy_target_result_vmware_params.go b/v2/models/on_prem_deploy_target_result_vmware_params.go deleted file mode 100644 index 7b4cb941..00000000 --- a/v2/models/on_prem_deploy_target_result_vmware_params.go +++ /dev/null @@ -1,114 +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" -) - -// OnPremDeployTargetResultVmwareParams VMware OnPrem Deploy Target. -// -// Specifies information about a VMware OnPrem deploy target. -// -// swagger:model OnPremDeployTargetResultVmwareParams -type OnPremDeployTargetResultVmwareParams struct { - - // UUID of the recovered VMware VM - UUID *string `json:"uuid,omitempty"` - - // moref - Moref *MOref `json:"moref,omitempty"` -} - -// Validate validates this on prem deploy target result vmware params -func (m *OnPremDeployTargetResultVmwareParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMoref(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTargetResultVmwareParams) validateMoref(formats strfmt.Registry) error { - if swag.IsZero(m.Moref) { // not required - return nil - } - - if m.Moref != nil { - if err := m.Moref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("moref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("moref") - } - return err - } - } - - return nil -} - -// ContextValidate validate this on prem deploy target result vmware params based on the context it is used -func (m *OnPremDeployTargetResultVmwareParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMoref(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremDeployTargetResultVmwareParams) contextValidateMoref(ctx context.Context, formats strfmt.Registry) error { - - if m.Moref != nil { - - if swag.IsZero(m.Moref) { // not required - return nil - } - - if err := m.Moref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("moref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("moref") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremDeployTargetResultVmwareParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremDeployTargetResultVmwareParams) UnmarshalBinary(b []byte) error { - var res OnPremDeployTargetResultVmwareParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_object_ids.go b/v2/models/on_prem_object_ids.go deleted file mode 100644 index 50f6937e..00000000 --- a/v2/models/on_prem_object_ids.go +++ /dev/null @@ -1,76 +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" -) - -// OnPremObjectIds List of Source IDs -// -// List of source ids for a cluster. -// -// swagger:model OnPremObjectIds -type OnPremObjectIds struct { - - // Specifies a list of object ids. Only files found in these objects will be returned. - // Unique: true - ObjectIds []int64 `json:"objectIds"` -} - -// Validate validates this on prem object ids -func (m *OnPremObjectIds) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremObjectIds) validateObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("objectIds", "body", m.ObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this on prem object ids based on context it is used -func (m *OnPremObjectIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremObjectIds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremObjectIds) UnmarshalBinary(b []byte) error { - var res OnPremObjectIds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_source_ids.go b/v2/models/on_prem_source_ids.go deleted file mode 100644 index c959c78f..00000000 --- a/v2/models/on_prem_source_ids.go +++ /dev/null @@ -1,76 +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" -) - -// OnPremSourceIds List of Source IDs -// -// List of source ids for a cluster. -// -// swagger:model OnPremSourceIds -type OnPremSourceIds struct { - - // Specifies a list of source ids. Only files found in these sources will be returned. - // Unique: true - SourceIds []int64 `json:"sourceIds"` -} - -// Validate validates this on prem source ids -func (m *OnPremSourceIds) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremSourceIds) validateSourceIds(formats strfmt.Registry) error { - if swag.IsZero(m.SourceIds) { // not required - return nil - } - - if err := validate.UniqueItems("sourceIds", "body", m.SourceIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this on prem source ids based on context it is used -func (m *OnPremSourceIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremSourceIds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremSourceIds) UnmarshalBinary(b []byte) error { - var res OnPremSourceIds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/on_prem_tenant_config.go b/v2/models/on_prem_tenant_config.go deleted file mode 100644 index 6090a768..00000000 --- a/v2/models/on_prem_tenant_config.go +++ /dev/null @@ -1,91 +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" -) - -// OnPremTenantConfig OnPremTenantConfig -// -// All configurations related to tenants for the cluster. -// -// swagger:model OnPremTenantConfig -type OnPremTenantConfig struct { - - // Wether organizations is enabled on the cluster. - // Required: true - OrganizationsEnabled *bool `json:"organizationsEnabled"` - - // Wether storage domain sharing is enabled for organizations on - // the cluster. - // Required: true - OrganizationsStorageDomainSharingEnabled *bool `json:"organizationsStorageDomainSharingEnabled"` -} - -// Validate validates this on prem tenant config -func (m *OnPremTenantConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOrganizationsEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrganizationsStorageDomainSharingEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnPremTenantConfig) validateOrganizationsEnabled(formats strfmt.Registry) error { - - if err := validate.Required("organizationsEnabled", "body", m.OrganizationsEnabled); err != nil { - return err - } - - return nil -} - -func (m *OnPremTenantConfig) validateOrganizationsStorageDomainSharingEnabled(formats strfmt.Registry) error { - - if err := validate.Required("organizationsStorageDomainSharingEnabled", "body", m.OrganizationsStorageDomainSharingEnabled); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this on prem tenant config based on context it is used -func (m *OnPremTenantConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OnPremTenantConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnPremTenantConfig) UnmarshalBinary(b []byte) error { - var res OnPremTenantConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/one_drive_item.go b/v2/models/one_drive_item.go deleted file mode 100644 index 0128bb6d..00000000 --- a/v2/models/one_drive_item.go +++ /dev/null @@ -1,56 +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" -) - -// OneDriveItem Specifies a OneDrive item to recover. -// -// swagger:model OneDriveItem -type OneDriveItem struct { - - // Specifies the item id. - ID *string `json:"id,omitempty"` - - // Specifies the path to the OneDrive item. - ItemPath *string `json:"itemPath,omitempty"` - - // Specifies if the item is a file. - IsFile *bool `json:"isFile,omitempty"` -} - -// Validate validates this one drive item -func (m *OneDriveItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this one drive item based on context it is used -func (m *OneDriveItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveItem) UnmarshalBinary(b []byte) error { - var res OneDriveItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/one_drive_items.go b/v2/models/one_drive_items.go deleted file mode 100644 index bbb7fcab..00000000 --- a/v2/models/one_drive_items.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OneDriveItems Specifies the indexed one drive items. -// -// swagger:model OneDriveItems -type OneDriveItems []*DocumentLibraryItem - -// Validate validates this one drive items -func (m OneDriveItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this one drive items based on the context it is used -func (m OneDriveItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/one_drive_param.go b/v2/models/one_drive_param.go deleted file mode 100644 index b7abc03d..00000000 --- a/v2/models/one_drive_param.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OneDriveParam Specifies parameters to recover a OneDrive. -// -// swagger:model OneDriveParam -type OneDriveParam struct { - - // Specifies the OneDrive id. - ID *string `json:"id,omitempty"` - - // Specifies the OneDrive name. - Name *string `json:"name,omitempty"` - - // Specifies whether to recover the whole OneDrive. This is set to false when excluding recovering specific drive items. - RecoverEntireDrive *bool `json:"recoverEntireDrive,omitempty"` - - // Specifies a list of OneDrive items to recover. - RecoverItems []*OneDriveItem `json:"recoverItems"` -} - -// Validate validates this one drive param -func (m *OneDriveParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveParam) validateRecoverItems(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverItems) { // not required - return nil - } - - for i := 0; i < len(m.RecoverItems); i++ { - if swag.IsZero(m.RecoverItems[i]) { // not required - continue - } - - if m.RecoverItems[i] != nil { - if err := m.RecoverItems[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverItems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverItems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this one drive param based on the context it is used -func (m *OneDriveParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OneDriveParam) contextValidateRecoverItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverItems); i++ { - - if m.RecoverItems[i] != nil { - - if swag.IsZero(m.RecoverItems[i]) { // not required - return nil - } - - if err := m.RecoverItems[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverItems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverItems" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OneDriveParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OneDriveParam) UnmarshalBinary(b []byte) error { - var res OneDriveParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/onprem_deploy_config.go b/v2/models/onprem_deploy_config.go deleted file mode 100644 index 6c0d4608..00000000 --- a/v2/models/onprem_deploy_config.go +++ /dev/null @@ -1,168 +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" -) - -// OnpremDeployConfig Onprem Deploy Configuration. -// -// Specifies the details about OnpremDeploy for snapshots. -// -// swagger:model OnpremDeployConfig -type OnpremDeployConfig struct { - CommonTargetConfiguration - - // Specifies the details about OnpremDeploy target where backup snapshots may be converted and deployed. - Params *OnpremDeployParams `json:"params,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OnpremDeployConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - Params *OnpremDeployParams `json:"params,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Params = dataAO1.Params - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OnpremDeployConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Params *OnpremDeployParams `json:"params,omitempty"` - } - - dataAO1.Params = m.Params - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this onprem deploy config -func (m *OnpremDeployConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnpremDeployConfig) validateParams(formats strfmt.Registry) error { - - if swag.IsZero(m.Params) { // not required - return nil - } - - if m.Params != nil { - if err := m.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this onprem deploy config based on the context it is used -func (m *OnpremDeployConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnpremDeployConfig) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - - if m.Params != nil { - - if swag.IsZero(m.Params) { // not required - return nil - } - - if err := m.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnpremDeployConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnpremDeployConfig) UnmarshalBinary(b []byte) error { - var res OnpremDeployConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/onprem_deploy_params.go b/v2/models/onprem_deploy_params.go deleted file mode 100644 index 0f0f6c1f..00000000 --- a/v2/models/onprem_deploy_params.go +++ /dev/null @@ -1,114 +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" -) - -// OnpremDeployParams Onprem Deploy Params. -// -// Specifies the details about OnpremDeploy target where backup snapshots may be converted and deployed. -// -// swagger:model OnpremDeployParams -type OnpremDeployParams struct { - - // Specifies the unique id of the onprem entity. - ID *int64 `json:"id,omitempty"` - - // Specifies information needed to identify various resources when deploying VMs to OnPrem sources like VMware.. - RestoreVMwareParams *RestoreVMwareVMParams `json:"restoreVMwareParams,omitempty"` -} - -// Validate validates this onprem deploy params -func (m *OnpremDeployParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreVMwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnpremDeployParams) validateRestoreVMwareParams(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreVMwareParams) { // not required - return nil - } - - if m.RestoreVMwareParams != nil { - if err := m.RestoreVMwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVMwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVMwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this onprem deploy params based on the context it is used -func (m *OnpremDeployParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestoreVMwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OnpremDeployParams) contextValidateRestoreVMwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoreVMwareParams != nil { - - if swag.IsZero(m.RestoreVMwareParams) { // not required - return nil - } - - if err := m.RestoreVMwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoreVMwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoreVMwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OnpremDeployParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnpremDeployParams) UnmarshalBinary(b []byte) error { - var res OnpremDeployParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/onprem_deploy_target_environment_type.go b/v2/models/onprem_deploy_target_environment_type.go deleted file mode 100644 index d18bd320..00000000 --- a/v2/models/onprem_deploy_target_environment_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OnpremDeployTargetEnvironmentType Onprem Deploy Target Environment Type -// -// Specifies the onprem deploy environment type. -// -// swagger:model OnpremDeployTargetEnvironmentType -type OnpremDeployTargetEnvironmentType struct { - - // Specifies the onprem deploy environment type. - // Enum: ["kVMware"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this onprem deploy target environment type -func (m *OnpremDeployTargetEnvironmentType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var onpremDeployTargetEnvironmentTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - onpremDeployTargetEnvironmentTypeTypeEnumPropEnum = append(onpremDeployTargetEnvironmentTypeTypeEnumPropEnum, v) - } -} - -const ( - - // OnpremDeployTargetEnvironmentTypeEnumKVMware captures enum value "kVMware" - OnpremDeployTargetEnvironmentTypeEnumKVMware string = "kVMware" -) - -// prop value enum -func (m *OnpremDeployTargetEnvironmentType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, onpremDeployTargetEnvironmentTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OnpremDeployTargetEnvironmentType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this onprem deploy target environment type based on context it is used -func (m *OnpremDeployTargetEnvironmentType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OnpremDeployTargetEnvironmentType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OnpremDeployTargetEnvironmentType) UnmarshalBinary(b []byte) error { - var res OnpremDeployTargetEnvironmentType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/open_id_connect_action.go b/v2/models/open_id_connect_action.go deleted file mode 100644 index 5cad488e..00000000 --- a/v2/models/open_id_connect_action.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OpenIDConnectAction Open ID Connect Action -// -// swagger:model OpenIdConnectAction -type OpenIDConnectAction struct { - - // Specifies an action to perform on an Open ID Connect Identity Provider. The following actions are currently supported: 1. 'RefreshPublicKeys': Refreshes the public keys currently stored on the cluster for the user sending the request. In order to do this, the public key URL specified in the current users Open ID configuration will be polled for a new public key. - // Required: true - // Enum: ["RefreshPublicKeys"] - Action *string `json:"action"` -} - -// Validate validates this open Id connect action -func (m *OpenIDConnectAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var openIdConnectActionTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RefreshPublicKeys"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - openIdConnectActionTypeActionPropEnum = append(openIdConnectActionTypeActionPropEnum, v) - } -} - -const ( - - // OpenIDConnectActionActionRefreshPublicKeys captures enum value "RefreshPublicKeys" - OpenIDConnectActionActionRefreshPublicKeys string = "RefreshPublicKeys" -) - -// prop value enum -func (m *OpenIDConnectAction) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, openIdConnectActionTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OpenIDConnectAction) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this open Id connect action based on context it is used -func (m *OpenIDConnectAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OpenIDConnectAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OpenIDConnectAction) UnmarshalBinary(b []byte) error { - var res OpenIDConnectAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/open_id_provider.go b/v2/models/open_id_provider.go deleted file mode 100644 index a95a94af..00000000 --- a/v2/models/open_id_provider.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OpenIDProvider Open ID provider -// -// swagger:model OpenIdProvider -type OpenIDProvider struct { - - // Specifies the audience IDs of the configuration. This is used for validation. We will check this against the 'aud' field sent in the JWT at authorization time and if they do not match against at least one of the elements in this list, then authentication will fail. - // Required: true - // Max Items: 50 - // Min Items: 1 - AudienceIds []string `json:"audienceIds"` - - // Specifies the URL to poll for the public key. - // Required: true - PublicKeyURL *string `json:"publicKeyUrl"` - - // Specifies the number of minutes the cluster should wait before polling for a new public key. Default value is 1440 (24 hours). - // Maximum: 10080 - // Minimum: 1 - PollingFrequencyMins *int64 `json:"pollingFrequencyMins,omitempty"` -} - -// Validate validates this open Id provider -func (m *OpenIDProvider) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAudienceIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicKeyURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePollingFrequencyMins(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OpenIDProvider) validateAudienceIds(formats strfmt.Registry) error { - - if err := validate.Required("audienceIds", "body", m.AudienceIds); err != nil { - return err - } - - iAudienceIdsSize := int64(len(m.AudienceIds)) - - if err := validate.MinItems("audienceIds", "body", iAudienceIdsSize, 1); err != nil { - return err - } - - if err := validate.MaxItems("audienceIds", "body", iAudienceIdsSize, 50); err != nil { - return err - } - - for i := 0; i < len(m.AudienceIds); i++ { - - if err := validate.MinLength("audienceIds"+"."+strconv.Itoa(i), "body", m.AudienceIds[i], 1); err != nil { - return err - } - - if err := validate.MaxLength("audienceIds"+"."+strconv.Itoa(i), "body", m.AudienceIds[i], 255); err != nil { - return err - } - - } - - return nil -} - -func (m *OpenIDProvider) validatePublicKeyURL(formats strfmt.Registry) error { - - if err := validate.Required("publicKeyUrl", "body", m.PublicKeyURL); err != nil { - return err - } - - return nil -} - -func (m *OpenIDProvider) validatePollingFrequencyMins(formats strfmt.Registry) error { - if swag.IsZero(m.PollingFrequencyMins) { // not required - return nil - } - - if err := validate.MinimumInt("pollingFrequencyMins", "body", *m.PollingFrequencyMins, 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("pollingFrequencyMins", "body", *m.PollingFrequencyMins, 10080, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this open Id provider based on context it is used -func (m *OpenIDProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OpenIDProvider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OpenIDProvider) UnmarshalBinary(b []byte) error { - var res OpenIDProvider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/operation_events.go b/v2/models/operation_events.go deleted file mode 100644 index af4dfc02..00000000 --- a/v2/models/operation_events.go +++ /dev/null @@ -1,114 +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" -) - -// OperationEvents Specifes the list of events that took place during the operation. -// -// swagger:model OperationEvents -type OperationEvents struct { - - // Specifies the severity of an event. - // Enum: ["Info","Warning","Error"] - Severity *string `json:"severity,omitempty"` - - // Specifies the message describing the event. - Message *string `json:"message,omitempty"` - - // Specifies the unix epoch timestamp in microseconds when this event took place. - Timestamp int64 `json:"timestamp,omitempty"` -} - -// Validate validates this operation events -func (m *OperationEvents) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSeverity(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var operationEventsTypeSeverityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Info","Warning","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - operationEventsTypeSeverityPropEnum = append(operationEventsTypeSeverityPropEnum, v) - } -} - -const ( - - // OperationEventsSeverityInfo captures enum value "Info" - OperationEventsSeverityInfo string = "Info" - - // OperationEventsSeverityWarning captures enum value "Warning" - OperationEventsSeverityWarning string = "Warning" - - // OperationEventsSeverityError captures enum value "Error" - OperationEventsSeverityError string = "Error" -) - -// prop value enum -func (m *OperationEvents) validateSeverityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, operationEventsTypeSeverityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OperationEvents) validateSeverity(formats strfmt.Registry) error { - if swag.IsZero(m.Severity) { // not required - return nil - } - - // value enum - if err := m.validateSeverityEnum("severity", "body", *m.Severity); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this operation events based on context it is used -func (m *OperationEvents) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OperationEvents) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OperationEvents) UnmarshalBinary(b []byte) error { - var res OperationEvents - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_archival_storage_class.go b/v2/models/oracle_archival_storage_class.go deleted file mode 100644 index 95f5de6f..00000000 --- a/v2/models/oracle_archival_storage_class.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleArchivalStorageClass Oracle Archival Storage Class -// -// Specifies the storage class of Oracle External Target of archival purpose type. -// -// swagger:model OracleArchivalStorageClass -type OracleArchivalStorageClass struct { - - // Specifies the storage class of Oracle External Target of archival purpose type. - // Enum: ["OracleObjectStorage","OracleArchiveStorage"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this oracle archival storage class -func (m *OracleArchivalStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleArchivalStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OracleObjectStorage","OracleArchiveStorage"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleArchivalStorageClassTypeEnumPropEnum = append(oracleArchivalStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // OracleArchivalStorageClassEnumOracleObjectStorage captures enum value "OracleObjectStorage" - OracleArchivalStorageClassEnumOracleObjectStorage string = "OracleObjectStorage" - - // OracleArchivalStorageClassEnumOracleArchiveStorage captures enum value "OracleArchiveStorage" - OracleArchivalStorageClassEnumOracleArchiveStorage string = "OracleArchiveStorage" -) - -// prop value enum -func (m *OracleArchivalStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleArchivalStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleArchivalStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle archival storage class based on context it is used -func (m *OracleArchivalStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleArchivalStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchivalStorageClass) UnmarshalBinary(b []byte) error { - var res OracleArchivalStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_archive_log_info.go b/v2/models/oracle_archive_log_info.go deleted file mode 100644 index c3b3863b..00000000 --- a/v2/models/oracle_archive_log_info.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleArchiveLogInfo OracleArchiveLogInfo -// -// Specifies information related to archive log restore. -// -// swagger:model OracleArchiveLogInfo -type OracleArchiveLogInfo struct { - - // Specifies the type of range. - // Enum: ["Time","Scn","Sequence"] - RangeType *string `json:"rangeType,omitempty"` - - // Specifies an array of oracle restore ranges. - RangeInfoVec []*OracleRangeMetaInfo `json:"rangeInfoVec"` - - // Specifies destination where archive logs are to be restored. - ArchiveLogRestoreDest *string `json:"archiveLogRestoreDest,omitempty"` -} - -// Validate validates this oracle archive log info -func (m *OracleArchiveLogInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRangeType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRangeInfoVec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleArchiveLogInfoTypeRangeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Time","Scn","Sequence"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleArchiveLogInfoTypeRangeTypePropEnum = append(oracleArchiveLogInfoTypeRangeTypePropEnum, v) - } -} - -const ( - - // OracleArchiveLogInfoRangeTypeTime captures enum value "Time" - OracleArchiveLogInfoRangeTypeTime string = "Time" - - // OracleArchiveLogInfoRangeTypeScn captures enum value "Scn" - OracleArchiveLogInfoRangeTypeScn string = "Scn" - - // OracleArchiveLogInfoRangeTypeSequence captures enum value "Sequence" - OracleArchiveLogInfoRangeTypeSequence string = "Sequence" -) - -// prop value enum -func (m *OracleArchiveLogInfo) validateRangeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleArchiveLogInfoTypeRangeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleArchiveLogInfo) validateRangeType(formats strfmt.Registry) error { - if swag.IsZero(m.RangeType) { // not required - return nil - } - - // value enum - if err := m.validateRangeTypeEnum("rangeType", "body", *m.RangeType); err != nil { - return err - } - - return nil -} - -func (m *OracleArchiveLogInfo) validateRangeInfoVec(formats strfmt.Registry) error { - if swag.IsZero(m.RangeInfoVec) { // not required - return nil - } - - for i := 0; i < len(m.RangeInfoVec); i++ { - if swag.IsZero(m.RangeInfoVec[i]) { // not required - continue - } - - if m.RangeInfoVec[i] != nil { - if err := m.RangeInfoVec[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rangeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rangeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle archive log info based on the context it is used -func (m *OracleArchiveLogInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRangeInfoVec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleArchiveLogInfo) contextValidateRangeInfoVec(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RangeInfoVec); i++ { - - if m.RangeInfoVec[i] != nil { - - if swag.IsZero(m.RangeInfoVec[i]) { // not required - return nil - } - - if err := m.RangeInfoVec[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rangeInfoVec" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rangeInfoVec" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleArchiveLogInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchiveLogInfo) UnmarshalBinary(b []byte) error { - var res OracleArchiveLogInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_archive_log_range_type.go b/v2/models/oracle_archive_log_range_type.go deleted file mode 100644 index 5ae89b86..00000000 --- a/v2/models/oracle_archive_log_range_type.go +++ /dev/null @@ -1,110 +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" -) - -// OracleArchiveLogRangeType Oracle Archive Log Range Type -// -// # Describes the Range type of archive log restore -// -// swagger:model OracleArchiveLogRangeType -type OracleArchiveLogRangeType struct { - - // Specifies oracle archive log range type - // Enum: ["Time","Scn","Sequence"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this oracle archive log range type -func (m *OracleArchiveLogRangeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleArchiveLogRangeTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Time","Scn","Sequence"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleArchiveLogRangeTypeTypeEnvironmentPropEnum = append(oracleArchiveLogRangeTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // OracleArchiveLogRangeTypeEnvironmentTime captures enum value "Time" - OracleArchiveLogRangeTypeEnvironmentTime string = "Time" - - // OracleArchiveLogRangeTypeEnvironmentScn captures enum value "Scn" - OracleArchiveLogRangeTypeEnvironmentScn string = "Scn" - - // OracleArchiveLogRangeTypeEnvironmentSequence captures enum value "Sequence" - OracleArchiveLogRangeTypeEnvironmentSequence string = "Sequence" -) - -// prop value enum -func (m *OracleArchiveLogRangeType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleArchiveLogRangeTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleArchiveLogRangeType) 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 validates this oracle archive log range type based on context it is used -func (m *OracleArchiveLogRangeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleArchiveLogRangeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleArchiveLogRangeType) UnmarshalBinary(b []byte) error { - var res OracleArchiveLogRangeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_clone_object.go b/v2/models/oracle_clone_object.go deleted file mode 100644 index 045783ba..00000000 --- a/v2/models/oracle_clone_object.go +++ /dev/null @@ -1,117 +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" -) - -// OracleCloneObject Specifies the information about an Oracle clone object. -// -// swagger:model OracleCloneObject -type OracleCloneObject struct { - CommonOracleCloneParams - - // Specifies the version of the Oracle database. - DbVersion *string `json:"dbVersion,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleCloneObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleCloneParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleCloneParams = aO0 - - // AO1 - var dataAO1 struct { - DbVersion *string `json:"dbVersion,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DbVersion = dataAO1.DbVersion - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleCloneObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonOracleCloneParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DbVersion *string `json:"dbVersion,omitempty"` - } - - dataAO1.DbVersion = m.DbVersion - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle clone object -func (m *OracleCloneObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleCloneParams - if err := m.CommonOracleCloneParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle clone object based on the context it is used -func (m *OracleCloneObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleCloneParams - if err := m.CommonOracleCloneParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleCloneObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleCloneObject) UnmarshalBinary(b []byte) error { - var res OracleCloneObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_clone_refresh_task.go b/v2/models/oracle_clone_refresh_task.go deleted file mode 100644 index 175276de..00000000 --- a/v2/models/oracle_clone_refresh_task.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" -) - -// OracleCloneRefreshTask Specifies the information about an Oracle refresh task. -// -// swagger:model OracleCloneRefreshTask -type OracleCloneRefreshTask struct { - OracleCloneObject -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleCloneRefreshTask) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 OracleCloneObject - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.OracleCloneObject = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleCloneRefreshTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.OracleCloneObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle clone refresh task -func (m *OracleCloneRefreshTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleCloneObject - if err := m.OracleCloneObject.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle clone refresh task based on the context it is used -func (m *OracleCloneRefreshTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleCloneObject - if err := m.OracleCloneObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleCloneRefreshTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleCloneRefreshTask) UnmarshalBinary(b []byte) error { - var res OracleCloneRefreshTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_clone_task.go b/v2/models/oracle_clone_task.go deleted file mode 100644 index e6a22240..00000000 --- a/v2/models/oracle_clone_task.go +++ /dev/null @@ -1,116 +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" -) - -// OracleCloneTask Specifies the information about an Oracle clone task. -// -// swagger:model OracleCloneTask -type OracleCloneTask struct { - PrePostScriptParams - - CommonOracleCloneParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleCloneTask) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PrePostScriptParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PrePostScriptParams = aO0 - - // AO1 - var aO1 CommonOracleCloneParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonOracleCloneParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleCloneTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.PrePostScriptParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CommonOracleCloneParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle clone task -func (m *OracleCloneTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PrePostScriptParams - if err := m.PrePostScriptParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonOracleCloneParams - if err := m.CommonOracleCloneParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle clone task based on the context it is used -func (m *OracleCloneTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PrePostScriptParams - if err := m.PrePostScriptParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonOracleCloneParams - if err := m.CommonOracleCloneParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleCloneTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleCloneTask) UnmarshalBinary(b []byte) error { - var res OracleCloneTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_connection_params.go b/v2/models/oracle_connection_params.go deleted file mode 100644 index 23cda02f..00000000 --- a/v2/models/oracle_connection_params.go +++ /dev/null @@ -1,71 +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" -) - -// OracleConnectionParams Specifies the parameters to connect to a Oracle node/cluster using given IP or hostname FQDN. -// -// swagger:model OracleConnectionParams -type OracleConnectionParams struct { - - // Specifies the unique identifier to locate the Oracle node or cluster. The host identifier can be IP address or FQDN. - // Required: true - Hostname *string `json:"hostname"` -} - -// Validate validates this oracle connection params -func (m *OracleConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostname(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleConnectionParams) validateHostname(formats strfmt.Registry) error { - - if err := validate.Required("hostname", "body", m.Hostname); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle connection params based on context it is used -func (m *OracleConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleConnectionParams) UnmarshalBinary(b []byte) error { - var res OracleConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_data_guard_info.go b/v2/models/oracle_data_guard_info.go deleted file mode 100644 index 26a1d7c8..00000000 --- a/v2/models/oracle_data_guard_info.go +++ /dev/null @@ -1,158 +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" -) - -// OracleDataGuardInfo Dataguard info about Oracle database. -// -// swagger:model OracleDataGuardInfo -type OracleDataGuardInfo struct { - - // Specifies the role of the Oracle DataGuard database. - // Enum: ["kPrimary","kStandby"] - Role string `json:"role,omitempty"` - - // Specifies the type of the standby oracle database. - // Enum: ["kPhysical","kLogical","kSnapshot"] - StandbyType string `json:"standbyType,omitempty"` -} - -// Validate validates this oracle data guard info -func (m *OracleDataGuardInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleDataGuardInfoTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimary","kStandby"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleDataGuardInfoTypeRolePropEnum = append(oracleDataGuardInfoTypeRolePropEnum, v) - } -} - -const ( - - // OracleDataGuardInfoRoleKPrimary captures enum value "kPrimary" - OracleDataGuardInfoRoleKPrimary string = "kPrimary" - - // OracleDataGuardInfoRoleKStandby captures enum value "kStandby" - OracleDataGuardInfoRoleKStandby string = "kStandby" -) - -// prop value enum -func (m *OracleDataGuardInfo) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleDataGuardInfoTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleDataGuardInfo) 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 -} - -var oracleDataGuardInfoTypeStandbyTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical","kLogical","kSnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleDataGuardInfoTypeStandbyTypePropEnum = append(oracleDataGuardInfoTypeStandbyTypePropEnum, v) - } -} - -const ( - - // OracleDataGuardInfoStandbyTypeKPhysical captures enum value "kPhysical" - OracleDataGuardInfoStandbyTypeKPhysical string = "kPhysical" - - // OracleDataGuardInfoStandbyTypeKLogical captures enum value "kLogical" - OracleDataGuardInfoStandbyTypeKLogical string = "kLogical" - - // OracleDataGuardInfoStandbyTypeKSnapshot captures enum value "kSnapshot" - OracleDataGuardInfoStandbyTypeKSnapshot string = "kSnapshot" -) - -// prop value enum -func (m *OracleDataGuardInfo) validateStandbyTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleDataGuardInfoTypeStandbyTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleDataGuardInfo) validateStandbyType(formats strfmt.Registry) error { - if swag.IsZero(m.StandbyType) { // not required - return nil - } - - // value enum - if err := m.validateStandbyTypeEnum("standbyType", "body", m.StandbyType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle data guard info based on context it is used -func (m *OracleDataGuardInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDataGuardInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDataGuardInfo) UnmarshalBinary(b []byte) error { - var res OracleDataGuardInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_database_host.go b/v2/models/oracle_database_host.go deleted file mode 100644 index 3c47e21e..00000000 --- a/v2/models/oracle_database_host.go +++ /dev/null @@ -1,120 +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" -) - -// OracleDatabaseHost Oracle Protection Group Database Host -// -// Specifies details about an Oracle database host. -// -// swagger:model OracleDatabaseHost -type OracleDatabaseHost struct { - - // Specifies the id of the database host from which backup is allowed. - HostID *string `json:"hostId,omitempty"` - - // Specifies the number of channels to be created for this host. Default value for the number of channels will be calculated as the minimum of number of nodes in Cohesity cluster and 2 * number of CPU on the host. - ChannelCount int32 `json:"channelCount,omitempty"` - - // Specifies the port where the Database is listening. - Port int64 `json:"port,omitempty"` - - // Specifies the necessary parameters for SBT. This is set only when backup type is kSbt. - SbtHostParams *OracleSbtHostParams `json:"sbtHostParams,omitempty"` -} - -// Validate validates this oracle database host -func (m *OracleDatabaseHost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSbtHostParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseHost) validateSbtHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if m.SbtHostParams != nil { - if err := m.SbtHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle database host based on the context it is used -func (m *OracleDatabaseHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSbtHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDatabaseHost) contextValidateSbtHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SbtHostParams != nil { - - if swag.IsZero(m.SbtHostParams) { // not required - return nil - } - - if err := m.SbtHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sbtHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sbtHostParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDatabaseHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDatabaseHost) UnmarshalBinary(b []byte) error { - var res OracleDatabaseHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_db_channel.go b/v2/models/oracle_db_channel.go deleted file mode 100644 index f157b33a..00000000 --- a/v2/models/oracle_db_channel.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleDbChannel Oracle Protection Group Database Node Channel -// -// Specifies the DB channel info for all the databases of app entity. Length of this array will be 1 for RAC and Standalone setups. -// -// swagger:model OracleDbChannel -type OracleDbChannel struct { - - // Specifies the number of days archive log should be stored. For keeping the archived log forever, set this to -1. For deleting the archived log immediately, set this to 0. For deleting the archived log after n days, set this to n. - ArchiveLogRetentionDays *int32 `json:"archiveLogRetentionDays,omitempty"` - - // Specifies the number of hours archive log should be stored. For keeping the archived log forever, set this to -1. For deleting the archived log immediately, set this to 0. For deleting the archived log after k hours, set this to k. - ArchiveLogRetentionHours *int32 `json:"archiveLogRetentionHours,omitempty"` - - // Specifies the Database credentials. - Credentials *Credentials `json:"credentials,omitempty"` - - // Specifies the unique Name of the database. - DatabaseUniqueName *string `json:"databaseUniqueName,omitempty"` - - // Specifies the database unique id. This is an internal field and is filled by magneto master based on corresponding app entity id. - DatabaseUUID *string `json:"databaseUuid,omitempty"` - - // Specifies the default number of channels to use per node per database. This value is used on all Oracle Database Nodes unless databaseNodeList item's channelCount is specified for the node. Default value for the number of channels will be calculated as the minimum of number of nodes in Cohesity cluster and 2 * number of CPU on the host. If the number of channels is unspecified here and unspecified within databaseNodeList, the above formula will be used to determine the same. - DefaultChannelCount *int32 `json:"defaultChannelCount,omitempty"` - - // Specifies the Node info from where we are allowed to take the backup/restore. - DatabaseHosts []*OracleDatabaseHost `json:"databaseNodeList"` - - // Specifies the maximum number of hosts from which backup/restore is allowed in parallel. This will be less than or equal to the number of databaseNode specified within databaseNodeList. - MaxHostCount *int32 `json:"maxHostCount,omitempty"` - - // Specifies whether the database having the Primary role within Data Guard configuration is to be backed up. - EnableDgPrimaryBackup *bool `json:"enableDgPrimaryBackup,omitempty"` - - // Specifies the type of Oracle RMAN backup requested - // Enum: ["kImageCopy","kBackupSets","kSbt"] - RmanBackupType string `json:"rmanBackupType,omitempty"` -} - -// Validate validates this oracle db channel -func (m *OracleDbChannel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRmanBackupType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDbChannel) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *OracleDbChannel) validateDatabaseHosts(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseHosts) { // not required - return nil - } - - for i := 0; i < len(m.DatabaseHosts); i++ { - if swag.IsZero(m.DatabaseHosts[i]) { // not required - continue - } - - if m.DatabaseHosts[i] != nil { - if err := m.DatabaseHosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var oracleDbChannelTypeRmanBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kImageCopy","kBackupSets","kSbt"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleDbChannelTypeRmanBackupTypePropEnum = append(oracleDbChannelTypeRmanBackupTypePropEnum, v) - } -} - -const ( - - // OracleDbChannelRmanBackupTypeKImageCopy captures enum value "kImageCopy" - OracleDbChannelRmanBackupTypeKImageCopy string = "kImageCopy" - - // OracleDbChannelRmanBackupTypeKBackupSets captures enum value "kBackupSets" - OracleDbChannelRmanBackupTypeKBackupSets string = "kBackupSets" - - // OracleDbChannelRmanBackupTypeKSbt captures enum value "kSbt" - OracleDbChannelRmanBackupTypeKSbt string = "kSbt" -) - -// prop value enum -func (m *OracleDbChannel) validateRmanBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleDbChannelTypeRmanBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleDbChannel) validateRmanBackupType(formats strfmt.Registry) error { - if swag.IsZero(m.RmanBackupType) { // not required - return nil - } - - // value enum - if err := m.validateRmanBackupTypeEnum("rmanBackupType", "body", m.RmanBackupType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this oracle db channel based on the context it is used -func (m *OracleDbChannel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatabaseHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleDbChannel) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *OracleDbChannel) contextValidateDatabaseHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DatabaseHosts); i++ { - - if m.DatabaseHosts[i] != nil { - - if swag.IsZero(m.DatabaseHosts[i]) { // not required - return nil - } - - if err := m.DatabaseHosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseNodeList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleDbChannel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleDbChannel) UnmarshalBinary(b []byte) error { - var res OracleDbChannel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_based_protection_params.go b/v2/models/oracle_object_based_protection_params.go deleted file mode 100644 index f22253da..00000000 --- a/v2/models/oracle_object_based_protection_params.go +++ /dev/null @@ -1,194 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleObjectBasedProtectionParams Specifies the parameters specific to Oracle Object Protection. -// -// swagger:model OracleObjectBasedProtectionParams -type OracleObjectBasedProtectionParams struct { - - // Specifies the list of object ids to be protected. - // Required: true - // Min Items: 1 - Objects []*OracleObjectProtectionInfo `json:"objects"` - - // Specifies whether the mountpoints created while backing up Oracle DBs should be persisted.Defaults to true if value is null to handle the backward compatibility for the upgrade case. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` - - // Specifies the VLAN preference that is selected by the user for doing backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` - - // Time in seconds after which the log backup of the database in given backup job should be auto-killed. - LogAutoKillTimeoutSecs *int64 `json:"logAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the incremental backup of the database in given backup job should be auto-killed. - IncrAutoKillTimeoutSecs *int64 `json:"incrAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the full backup of the database in given backup job should be auto-killed. - FullAutoKillTimeoutSecs *int64 `json:"fullAutoKillTimeoutSecs,omitempty"` -} - -// Validate validates this oracle object based protection params -func (m *OracleObjectBasedProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectBasedProtectionParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleObjectBasedProtectionParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle object based protection params based on the context it is used -func (m *OracleObjectBasedProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectBasedProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleObjectBasedProtectionParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectBasedProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectBasedProtectionParams) UnmarshalBinary(b []byte) error { - var res OracleObjectBasedProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_entity_params.go b/v2/models/oracle_object_entity_params.go deleted file mode 100644 index fd1d40e4..00000000 --- a/v2/models/oracle_object_entity_params.go +++ /dev/null @@ -1,160 +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" -) - -// OracleObjectEntityParams Object details for Oracle. -// -// swagger:model OracleObjectEntityParams -type OracleObjectEntityParams struct { - - // Specifies the database entity information about the type of Oracle database. - DatabaseEntityInfo *DatabaseEntityInfo `json:"databaseEntityInfo,omitempty"` - - // Specifies the host information for the Oracle object. - HostInfo *HostInformation `json:"hostInfo,omitempty"` -} - -// Validate validates this oracle object entity params -func (m *OracleObjectEntityParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatabaseEntityInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectEntityParams) validateDatabaseEntityInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DatabaseEntityInfo) { // not required - return nil - } - - if m.DatabaseEntityInfo != nil { - if err := m.DatabaseEntityInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseEntityInfo") - } - return err - } - } - - return nil -} - -func (m *OracleObjectEntityParams) validateHostInfo(formats strfmt.Registry) error { - if swag.IsZero(m.HostInfo) { // not required - return nil - } - - if m.HostInfo != nil { - if err := m.HostInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle object entity params based on the context it is used -func (m *OracleObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseEntityInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectEntityParams) contextValidateDatabaseEntityInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatabaseEntityInfo != nil { - - if swag.IsZero(m.DatabaseEntityInfo) { // not required - return nil - } - - if err := m.DatabaseEntityInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("databaseEntityInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("databaseEntityInfo") - } - return err - } - } - - return nil -} - -func (m *OracleObjectEntityParams) contextValidateHostInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.HostInfo != nil { - - if swag.IsZero(m.HostInfo) { // not required - return nil - } - - if err := m.HostInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectEntityParams) UnmarshalBinary(b []byte) error { - var res OracleObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_protection_info.go b/v2/models/oracle_object_protection_info.go deleted file mode 100644 index f8f4d471..00000000 --- a/v2/models/oracle_object_protection_info.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleObjectProtectionInfo Identifier For Oracle Object -// -// # Specifies the object identifier for Object based Oracle Protection -// -// swagger:model OracleObjectProtectionInfo -type OracleObjectProtectionInfo struct { - - // Specifies the id of the host on which databases are hosted - // Required: true - ObjectID *int64 `json:"objectId"` - - // Specifies the properties of the Oracle databases. - DbParams []*OracleProtectionGroupDbParams `json:"dbParams"` -} - -// Validate validates this oracle object protection info -func (m *OracleObjectProtectionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectProtectionInfo) validateObjectID(formats strfmt.Registry) error { - - if err := validate.Required("objectId", "body", m.ObjectID); err != nil { - return err - } - - return nil -} - -func (m *OracleObjectProtectionInfo) validateDbParams(formats strfmt.Registry) error { - if swag.IsZero(m.DbParams) { // not required - return nil - } - - for i := 0; i < len(m.DbParams); i++ { - if swag.IsZero(m.DbParams[i]) { // not required - continue - } - - if m.DbParams[i] != nil { - if err := m.DbParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle object protection info based on the context it is used -func (m *OracleObjectProtectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleObjectProtectionInfo) contextValidateDbParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbParams); i++ { - - if m.DbParams[i] != nil { - - if swag.IsZero(m.DbParams[i]) { // not required - return nil - } - - if err := m.DbParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectProtectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectProtectionInfo) UnmarshalBinary(b []byte) error { - var res OracleObjectProtectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_protection_request_params.go b/v2/models/oracle_object_protection_request_params.go deleted file mode 100644 index 99f64822..00000000 --- a/v2/models/oracle_object_protection_request_params.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" -) - -// OracleObjectProtectionRequestParams Specifies the request parameters specific to Oracle object protection -// -// swagger:model OracleObjectProtectionRequestParams -type OracleObjectProtectionRequestParams struct { - OracleObjectBasedProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 OracleObjectBasedProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.OracleObjectBasedProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.OracleObjectBasedProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle object protection request params -func (m *OracleObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle object protection request params based on the context it is used -func (m *OracleObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res OracleObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_protection_response_params.go b/v2/models/oracle_object_protection_response_params.go deleted file mode 100644 index be15fca6..00000000 --- a/v2/models/oracle_object_protection_response_params.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" -) - -// OracleObjectProtectionResponseParams Specifies the response parameters specific to Oracle object protection -// -// swagger:model OracleObjectProtectionResponseParams -type OracleObjectProtectionResponseParams struct { - OracleObjectBasedProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 OracleObjectBasedProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.OracleObjectBasedProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.OracleObjectBasedProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle object protection response params -func (m *OracleObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle object protection response params based on the context it is used -func (m *OracleObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res OracleObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_object_protection_update_request_params.go b/v2/models/oracle_object_protection_update_request_params.go deleted file mode 100644 index 80c016b9..00000000 --- a/v2/models/oracle_object_protection_update_request_params.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" -) - -// OracleObjectProtectionUpdateRequestParams Specifies the update parameters specific to Oracle object protection -// -// swagger:model OracleObjectProtectionUpdateRequestParams -type OracleObjectProtectionUpdateRequestParams struct { - OracleObjectBasedProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 OracleObjectBasedProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.OracleObjectBasedProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.OracleObjectBasedProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle object protection update request params -func (m *OracleObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle object protection update request params based on the context it is used -func (m *OracleObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleObjectBasedProtectionParams - if err := m.OracleObjectBasedProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res OracleObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_pdb_object_info.go b/v2/models/oracle_pdb_object_info.go deleted file mode 100644 index 2e11d880..00000000 --- a/v2/models/oracle_pdb_object_info.go +++ /dev/null @@ -1,88 +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" -) - -// OraclePdbObjectInfo Specifies information PDB object to restore. -// -// swagger:model OraclePdbObjectInfo -type OraclePdbObjectInfo struct { - - // Specifies pluggable database id. - // Required: true - DbID *string `json:"dbId"` - - // Specifies name of the DB. - // Required: true - DbName *string `json:"dbName"` -} - -// Validate validates this oracle pdb object info -func (m *OraclePdbObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OraclePdbObjectInfo) validateDbID(formats strfmt.Registry) error { - - if err := validate.Required("dbId", "body", m.DbID); err != nil { - return err - } - - return nil -} - -func (m *OraclePdbObjectInfo) validateDbName(formats strfmt.Registry) error { - - if err := validate.Required("dbName", "body", m.DbName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle pdb object info based on context it is used -func (m *OraclePdbObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OraclePdbObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OraclePdbObjectInfo) UnmarshalBinary(b []byte) error { - var res OraclePdbObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_pdb_restore_params.go b/v2/models/oracle_pdb_restore_params.go deleted file mode 100644 index 12f64ceb..00000000 --- a/v2/models/oracle_pdb_restore_params.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OraclePdbRestoreParams Specifies information about the list of pdbs to be restored. -// -// swagger:model OraclePdbRestoreParams -type OraclePdbRestoreParams struct { - - // Specifies if the PDB should be ignored if a PDB already exists with same name. - DropDuplicatePDB *bool `json:"dropDuplicatePDB,omitempty"` - - // Specifies list of PDB objects to restore. - PdbObjects []*OraclePdbObjectInfo `json:"pdbObjects"` - - // Specifies if pdbs should be restored to an existing CDB. - RestoreToExistingCdb *bool `json:"restoreToExistingCdb,omitempty"` - - // Specifies the new PDB name mapping to existing PDBs. - RenamePdbMap []*KeyValuePair `json:"renamePdbMap"` - - // Specifies whether to restore or skip the provided PDBs list. - IncludeInRestore *bool `json:"includeInRestore,omitempty"` -} - -// Validate validates this oracle pdb restore params -func (m *OraclePdbRestoreParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePdbObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenamePdbMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OraclePdbRestoreParams) validatePdbObjects(formats strfmt.Registry) error { - if swag.IsZero(m.PdbObjects) { // not required - return nil - } - - for i := 0; i < len(m.PdbObjects); i++ { - if swag.IsZero(m.PdbObjects[i]) { // not required - continue - } - - if m.PdbObjects[i] != nil { - if err := m.PdbObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OraclePdbRestoreParams) validateRenamePdbMap(formats strfmt.Registry) error { - if swag.IsZero(m.RenamePdbMap) { // not required - return nil - } - - for i := 0; i < len(m.RenamePdbMap); i++ { - if swag.IsZero(m.RenamePdbMap[i]) { // not required - continue - } - - if m.RenamePdbMap[i] != nil { - if err := m.RenamePdbMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle pdb restore params based on the context it is used -func (m *OraclePdbRestoreParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePdbObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenamePdbMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OraclePdbRestoreParams) contextValidatePdbObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PdbObjects); i++ { - - if m.PdbObjects[i] != nil { - - if swag.IsZero(m.PdbObjects[i]) { // not required - return nil - } - - if err := m.PdbObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OraclePdbRestoreParams) contextValidateRenamePdbMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RenamePdbMap); i++ { - - if m.RenamePdbMap[i] != nil { - - if swag.IsZero(m.RenamePdbMap[i]) { // not required - return nil - } - - if err := m.RenamePdbMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renamePdbMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OraclePdbRestoreParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OraclePdbRestoreParams) UnmarshalBinary(b []byte) error { - var res OraclePdbRestoreParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_protection_group_db_params.go b/v2/models/oracle_protection_group_db_params.go deleted file mode 100644 index ae6e9f4f..00000000 --- a/v2/models/oracle_protection_group_db_params.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleProtectionGroupDbParams Oracle Protection Group Database Params. -// -// Specifies the parameters of individual databases to create Oracle Protection Group. -// -// swagger:model OracleProtectionGroupDbParams -type OracleProtectionGroupDbParams struct { - - // Specifies the id of the Oracle database. - DatabaseID *int64 `json:"databaseId,omitempty"` - - // Specifies the name of the Oracle database. - // Read Only: true - DatabaseName *string `json:"databaseName,omitempty"` - - // Specifies the Oracle database node channels info. If not specified, the default values assigned by the server are applied to all the databases. - DbChannels []*OracleDbChannel `json:"dbChannels"` -} - -// Validate validates this oracle protection group db params -func (m *OracleProtectionGroupDbParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbChannels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupDbParams) validateDbChannels(formats strfmt.Registry) error { - if swag.IsZero(m.DbChannels) { // not required - return nil - } - - for i := 0; i < len(m.DbChannels); i++ { - if swag.IsZero(m.DbChannels[i]) { // not required - continue - } - - if m.DbChannels[i] != nil { - if err := m.DbChannels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle protection group db params based on the context it is used -func (m *OracleProtectionGroupDbParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatabaseName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbChannels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupDbParams) contextValidateDatabaseName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "databaseName", "body", m.DatabaseName); err != nil { - return err - } - - return nil -} - -func (m *OracleProtectionGroupDbParams) contextValidateDbChannels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbChannels); i++ { - - if m.DbChannels[i] != nil { - - if swag.IsZero(m.DbChannels[i]) { // not required - return nil - } - - if err := m.DbChannels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbChannels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleProtectionGroupDbParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleProtectionGroupDbParams) UnmarshalBinary(b []byte) error { - var res OracleProtectionGroupDbParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_protection_group_object_params.go b/v2/models/oracle_protection_group_object_params.go deleted file mode 100644 index 6a0b8fed..00000000 --- a/v2/models/oracle_protection_group_object_params.go +++ /dev/null @@ -1,158 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleProtectionGroupObjectParams Oracle Protection Group Object Identifier. -// -// Specifies the object identifier to create Oracle Protection Group. -// -// swagger:model OracleProtectionGroupObjectParams -type OracleProtectionGroupObjectParams struct { - - // Specifies the id of the host on which databases are hosted. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the name of the host on which databases are hosted. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the properties of the Oracle databases. - DbParams []*OracleProtectionGroupDbParams `json:"dbParams"` -} - -// Validate validates this oracle protection group object params -func (m *OracleProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupObjectParams) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *OracleProtectionGroupObjectParams) validateDbParams(formats strfmt.Registry) error { - if swag.IsZero(m.DbParams) { // not required - return nil - } - - for i := 0; i < len(m.DbParams); i++ { - if swag.IsZero(m.DbParams[i]) { // not required - continue - } - - if m.DbParams[i] != nil { - if err := m.DbParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle protection group object params based on the context it is used -func (m *OracleProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupObjectParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *OracleProtectionGroupObjectParams) contextValidateDbParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DbParams); i++ { - - if m.DbParams[i] != nil { - - if swag.IsZero(m.DbParams[i]) { // not required - return nil - } - - if err := m.DbParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res OracleProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_protection_group_params.go b/v2/models/oracle_protection_group_params.go deleted file mode 100644 index 8186ce6c..00000000 --- a/v2/models/oracle_protection_group_params.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleProtectionGroupParams Oracle Protection Group Parameters. -// -// Specifies the parameters to create Oracle Protection Group. -// -// swagger:model OracleProtectionGroupParams -type OracleProtectionGroupParams struct { - - // Specifies the list of object ids to be protected. - // Required: true - // Min Items: 1 - Objects []*OracleProtectionGroupObjectParams `json:"objects"` - - // Specifies whether the mountpoints created while backing up Oracle DBs should be persisted. Defaults to true if value is null to handle the backward compatibility for the upgrade case. - PersistMountpoints *bool `json:"persistMountpoints,omitempty"` - - // Specifies the VLAN preference that is selected by the user for doing backup. - VlanParams *VlanParams `json:"vlanParams,omitempty"` - - // Specifies the pre and post script parameters associated with a protection group. - PrePostScript *PrePostScriptParams `json:"prePostScript,omitempty"` - - // Time in seconds after which the log backup of the database in given backup job should be auto-killed. - LogAutoKillTimeoutSecs *int64 `json:"logAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the incremental backup of the database in given backup job should be auto-killed. - IncrAutoKillTimeoutSecs *int64 `json:"incrAutoKillTimeoutSecs,omitempty"` - - // Time in seconds after which the full backup of the database in given backup job should be auto-killed. - FullAutoKillTimeoutSecs *int64 `json:"fullAutoKillTimeoutSecs,omitempty"` -} - -// Validate validates this oracle protection group params -func (m *OracleProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleProtectionGroupParams) validateVlanParams(formats strfmt.Registry) error { - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if m.VlanParams != nil { - if err := m.VlanParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *OracleProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this oracle protection group params based on the context it is used -func (m *OracleProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleProtectionGroupParams) contextValidateVlanParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanParams != nil { - - if swag.IsZero(m.VlanParams) { // not required - return nil - } - - if err := m.VlanParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanParams") - } - return err - } - } - - return nil -} - -func (m *OracleProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res OracleProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_range_meta_info.go b/v2/models/oracle_range_meta_info.go deleted file mode 100644 index 30f04407..00000000 --- a/v2/models/oracle_range_meta_info.go +++ /dev/null @@ -1,91 +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" -) - -// OracleRangeMetaInfo Oracle Range Meta Info -// -// # Specifies Range related information for an oracle db -// -// swagger:model OracleRangeMetaInfo -type OracleRangeMetaInfo struct { - - // Specifies starting value of the range in time (usecs), SCN or sequence no. - StartOfRange *int64 `json:"startOfRange,omitempty"` - - // Specifies ending value of the range in time (usecs), SCN or sequence no. - EndOfRange *int64 `json:"endOfRange,omitempty"` - - // Specifies id of the Protection Group corresponding to this oracle range - // Pattern: ^\d+:\d+:\d+$ - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies resetlogs identifier associated with the oracle range. Only applicable for ranges of type SCN and sequence no. - ResetLogID *int64 `json:"resetLogId,omitempty"` - - // Specifies incarnation id associated with the oracle db for which the restore range belongs. Only applicable for ranges of type SCN and sequence no. - IncarnationID *int64 `json:"incarnationId,omitempty"` - - // Specifies thread id associated with the oracle db for which the restore range belongs. Only applicable for ranges of type sequence no. - ThreadID *int64 `json:"threadId,omitempty"` -} - -// Validate validates this oracle range meta info -func (m *OracleRangeMetaInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleRangeMetaInfo) validateProtectionGroupID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupID) { // not required - return nil - } - - if err := validate.Pattern("protectionGroupId", "body", *m.ProtectionGroupID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle range meta info based on context it is used -func (m *OracleRangeMetaInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRangeMetaInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRangeMetaInfo) UnmarshalBinary(b []byte) error { - var res OracleRangeMetaInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_recovery_granularity_type.go b/v2/models/oracle_recovery_granularity_type.go deleted file mode 100644 index f88e8d9f..00000000 --- a/v2/models/oracle_recovery_granularity_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleRecoveryGranularityType Oracle recovery granularity type. -// -// Describe the restore granular level. -// -// swagger:model OracleRecoveryGranularityType -type OracleRecoveryGranularityType struct { - - // Specifies oracle restore granularity level - // Enum: ["kPDB"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this oracle recovery granularity type -func (m *OracleRecoveryGranularityType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleRecoveryGranularityTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPDB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleRecoveryGranularityTypeTypeEnvironmentPropEnum = append(oracleRecoveryGranularityTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // OracleRecoveryGranularityTypeEnvironmentKPDB captures enum value "kPDB" - OracleRecoveryGranularityTypeEnvironmentKPDB string = "kPDB" -) - -// prop value enum -func (m *OracleRecoveryGranularityType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleRecoveryGranularityTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleRecoveryGranularityType) 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 validates this oracle recovery granularity type based on context it is used -func (m *OracleRecoveryGranularityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRecoveryGranularityType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRecoveryGranularityType) UnmarshalBinary(b []byte) error { - var res OracleRecoveryGranularityType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_recovery_validation_info.go b/v2/models/oracle_recovery_validation_info.go deleted file mode 100644 index 0f08dc9c..00000000 --- a/v2/models/oracle_recovery_validation_info.go +++ /dev/null @@ -1,52 +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" -) - -// OracleRecoveryValidationInfo OracleRecoveryValidationInfo -// -// Specifies information related to Oracle Recovery Validation. -// -// swagger:model OracleRecoveryValidationInfo -type OracleRecoveryValidationInfo struct { - - // Specifies whether we will be creating a dummy oracle instance to run the validations. Generally if source and target location are different we create a dummy oracle instance else we use the source db. - CreateDummyInstance *bool `json:"createDummyInstance,omitempty"` -} - -// Validate validates this oracle recovery validation info -func (m *OracleRecoveryValidationInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle recovery validation info based on context it is used -func (m *OracleRecoveryValidationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRecoveryValidationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRecoveryValidationInfo) UnmarshalBinary(b []byte) error { - var res OracleRecoveryValidationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_restore_meta_info_result.go b/v2/models/oracle_restore_meta_info_result.go deleted file mode 100644 index bd9c58ef..00000000 --- a/v2/models/oracle_restore_meta_info_result.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleRestoreMetaInfoResult OracleRestoreMetaInfoResult -// -// Result to store oracle meta-info from snapshot id and other oracle params. -// -// swagger:model OracleRestoreMetaInfoResult -type OracleRestoreMetaInfoResult struct { - - // Specifies map for restricted pfile params. - RestrictedPfileParamMap []*KeyValuePair `json:"restrictedPfileParamMap"` - - // Specifies map for inherited pfile params. - InheritedPfileParamMap []*KeyValuePair `json:"inheritedPfileParamMap"` - - // Specifies map for cohesity controlled pfile params. - CohesityPfileParamMap []*KeyValuePair `json:"cohesityPfileParamMap"` -} - -// Validate validates this oracle restore meta info result -func (m *OracleRestoreMetaInfoResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestrictedPfileParamMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInheritedPfileParamMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCohesityPfileParamMap(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleRestoreMetaInfoResult) validateRestrictedPfileParamMap(formats strfmt.Registry) error { - if swag.IsZero(m.RestrictedPfileParamMap) { // not required - return nil - } - - for i := 0; i < len(m.RestrictedPfileParamMap); i++ { - if swag.IsZero(m.RestrictedPfileParamMap[i]) { // not required - continue - } - - if m.RestrictedPfileParamMap[i] != nil { - if err := m.RestrictedPfileParamMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restrictedPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restrictedPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreMetaInfoResult) validateInheritedPfileParamMap(formats strfmt.Registry) error { - if swag.IsZero(m.InheritedPfileParamMap) { // not required - return nil - } - - for i := 0; i < len(m.InheritedPfileParamMap); i++ { - if swag.IsZero(m.InheritedPfileParamMap[i]) { // not required - continue - } - - if m.InheritedPfileParamMap[i] != nil { - if err := m.InheritedPfileParamMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inheritedPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inheritedPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreMetaInfoResult) validateCohesityPfileParamMap(formats strfmt.Registry) error { - if swag.IsZero(m.CohesityPfileParamMap) { // not required - return nil - } - - for i := 0; i < len(m.CohesityPfileParamMap); i++ { - if swag.IsZero(m.CohesityPfileParamMap[i]) { // not required - continue - } - - if m.CohesityPfileParamMap[i] != nil { - if err := m.CohesityPfileParamMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesityPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesityPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle restore meta info result based on the context it is used -func (m *OracleRestoreMetaInfoResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRestrictedPfileParamMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInheritedPfileParamMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCohesityPfileParamMap(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleRestoreMetaInfoResult) contextValidateRestrictedPfileParamMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RestrictedPfileParamMap); i++ { - - if m.RestrictedPfileParamMap[i] != nil { - - if swag.IsZero(m.RestrictedPfileParamMap[i]) { // not required - return nil - } - - if err := m.RestrictedPfileParamMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restrictedPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restrictedPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreMetaInfoResult) contextValidateInheritedPfileParamMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InheritedPfileParamMap); i++ { - - if m.InheritedPfileParamMap[i] != nil { - - if swag.IsZero(m.InheritedPfileParamMap[i]) { // not required - return nil - } - - if err := m.InheritedPfileParamMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inheritedPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inheritedPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreMetaInfoResult) contextValidateCohesityPfileParamMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CohesityPfileParamMap); i++ { - - if m.CohesityPfileParamMap[i] != nil { - - if swag.IsZero(m.CohesityPfileParamMap[i]) { // not required - return nil - } - - if err := m.CohesityPfileParamMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cohesityPfileParamMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cohesityPfileParamMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRestoreMetaInfoResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRestoreMetaInfoResult) UnmarshalBinary(b []byte) error { - var res OracleRestoreMetaInfoResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_restore_range_info.go b/v2/models/oracle_restore_range_info.go deleted file mode 100644 index f5a8c0b0..00000000 --- a/v2/models/oracle_restore_range_info.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleRestoreRangeInfo Oracle Restore Range Info -// -// # Specifies Restore Ranges related to an Oracle Database -// -// swagger:model OracleRestoreRangeInfo -type OracleRestoreRangeInfo struct { - - // Specifies an array of SCN based oracle restore ranges. - ScnRangeInfo []*OracleRangeMetaInfo `json:"ScnRangeInfo"` - - // Specifies an array of time based oracle restore ranges. - TimeRangeInfo []*OracleRangeMetaInfo `json:"TimeRangeInfo"` - - // Specifies an array of time based oracle restore ranges. - SequenceRangeInfo []*OracleRangeMetaInfo `json:"SequenceRangeInfo"` -} - -// Validate validates this oracle restore range info -func (m *OracleRestoreRangeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScnRangeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeRangeInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSequenceRangeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleRestoreRangeInfo) validateScnRangeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ScnRangeInfo) { // not required - return nil - } - - for i := 0; i < len(m.ScnRangeInfo); i++ { - if swag.IsZero(m.ScnRangeInfo[i]) { // not required - continue - } - - if m.ScnRangeInfo[i] != nil { - if err := m.ScnRangeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ScnRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ScnRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreRangeInfo) validateTimeRangeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.TimeRangeInfo) { // not required - return nil - } - - for i := 0; i < len(m.TimeRangeInfo); i++ { - if swag.IsZero(m.TimeRangeInfo[i]) { // not required - continue - } - - if m.TimeRangeInfo[i] != nil { - if err := m.TimeRangeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("TimeRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("TimeRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreRangeInfo) validateSequenceRangeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SequenceRangeInfo) { // not required - return nil - } - - for i := 0; i < len(m.SequenceRangeInfo); i++ { - if swag.IsZero(m.SequenceRangeInfo[i]) { // not required - continue - } - - if m.SequenceRangeInfo[i] != nil { - if err := m.SequenceRangeInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("SequenceRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("SequenceRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle restore range info based on the context it is used -func (m *OracleRestoreRangeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScnRangeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeRangeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSequenceRangeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleRestoreRangeInfo) contextValidateScnRangeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ScnRangeInfo); i++ { - - if m.ScnRangeInfo[i] != nil { - - if swag.IsZero(m.ScnRangeInfo[i]) { // not required - return nil - } - - if err := m.ScnRangeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ScnRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ScnRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreRangeInfo) contextValidateTimeRangeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeRangeInfo); i++ { - - if m.TimeRangeInfo[i] != nil { - - if swag.IsZero(m.TimeRangeInfo[i]) { // not required - return nil - } - - if err := m.TimeRangeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("TimeRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("TimeRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *OracleRestoreRangeInfo) contextValidateSequenceRangeInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SequenceRangeInfo); i++ { - - if m.SequenceRangeInfo[i] != nil { - - if swag.IsZero(m.SequenceRangeInfo[i]) { // not required - return nil - } - - if err := m.SequenceRangeInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("SequenceRangeInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("SequenceRangeInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRestoreRangeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRestoreRangeInfo) UnmarshalBinary(b []byte) error { - var res OracleRestoreRangeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_rman_backup.go b/v2/models/oracle_rman_backup.go deleted file mode 100644 index 67928a80..00000000 --- a/v2/models/oracle_rman_backup.go +++ /dev/null @@ -1,110 +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" -) - -// OracleRmanBackup Oracle RMAN backup requested type. -// -// Specifies Oracle RMAN backup requested type. -// -// swagger:model OracleRmanBackup -type OracleRmanBackup struct { - - // Specifies Oracle RMAN backup requested type. - // Enum: ["kImageCopy","kBackupSets","kSbt"] - OracleRmanBackup string `json:"oracleRmanBackup,omitempty"` -} - -// Validate validates this oracle rman backup -func (m *OracleRmanBackup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOracleRmanBackup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleRmanBackupTypeOracleRmanBackupPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kImageCopy","kBackupSets","kSbt"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleRmanBackupTypeOracleRmanBackupPropEnum = append(oracleRmanBackupTypeOracleRmanBackupPropEnum, v) - } -} - -const ( - - // OracleRmanBackupOracleRmanBackupKImageCopy captures enum value "kImageCopy" - OracleRmanBackupOracleRmanBackupKImageCopy string = "kImageCopy" - - // OracleRmanBackupOracleRmanBackupKBackupSets captures enum value "kBackupSets" - OracleRmanBackupOracleRmanBackupKBackupSets string = "kBackupSets" - - // OracleRmanBackupOracleRmanBackupKSbt captures enum value "kSbt" - OracleRmanBackupOracleRmanBackupKSbt string = "kSbt" -) - -// prop value enum -func (m *OracleRmanBackup) validateOracleRmanBackupEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleRmanBackupTypeOracleRmanBackupPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleRmanBackup) validateOracleRmanBackup(formats strfmt.Registry) error { - if swag.IsZero(m.OracleRmanBackup) { // not required - return nil - } - - // value enum - if err := m.validateOracleRmanBackupEnum("oracleRmanBackup", "body", m.OracleRmanBackup); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle rman backup based on context it is used -func (m *OracleRmanBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleRmanBackup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleRmanBackup) UnmarshalBinary(b []byte) error { - var res OracleRmanBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_sbt_host_params.go b/v2/models/oracle_sbt_host_params.go deleted file mode 100644 index 7c8764fa..00000000 --- a/v2/models/oracle_sbt_host_params.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OracleSbtHostParams Oracle Protection Group SBT Host -// -// Specifies details about capturing Oracle SBT host info. -// -// swagger:model OracleSbtHostParams -type OracleSbtHostParams struct { - - // Specifies the path of sbt library. - SbtLibraryPath *string `json:"sbtLibraryPath,omitempty"` - - // Specifies the Cohesity view path. - ViewFsPath *string `json:"viewFsPath,omitempty"` - - // Specifies the list of Cohesity primary VIPs. - VipList []string `json:"vipList"` - - // Specifies the Vlan information for Cohesity cluster. - VlanInfoList []*OracleVlanInfo `json:"vlanInfoList"` -} - -// Validate validates this oracle sbt host params -func (m *OracleSbtHostParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSbtHostParams) validateVlanInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.VlanInfoList) { // not required - return nil - } - - for i := 0; i < len(m.VlanInfoList); i++ { - if swag.IsZero(m.VlanInfoList[i]) { // not required - continue - } - - if m.VlanInfoList[i] != nil { - if err := m.VlanInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle sbt host params based on the context it is used -func (m *OracleSbtHostParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleSbtHostParams) contextValidateVlanInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VlanInfoList); i++ { - - if m.VlanInfoList[i] != nil { - - if swag.IsZero(m.VlanInfoList[i]) { // not required - return nil - } - - if err := m.VlanInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleSbtHostParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleSbtHostParams) UnmarshalBinary(b []byte) error { - var res OracleSbtHostParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_target_params_for_recover_oracle_app.go b/v2/models/oracle_target_params_for_recover_oracle_app.go deleted file mode 100644 index 42ef15ba..00000000 --- a/v2/models/oracle_target_params_for_recover_oracle_app.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" -) - -// OracleTargetParamsForRecoverOracleApp Oracle Target Params For Recover Oracle App. -// -// Specifies the params for recovering to a oracle host. Provided oracle backup should be recovered to same type of target host. For Example: If you have oracle backup taken from a physical host then that should be recovered to physical host only. -// -// swagger:model OracleTargetParamsForRecoverOracleApp -type OracleTargetParamsForRecoverOracleApp struct { - CommonRecoverOracleAppTargetParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleTargetParamsForRecoverOracleApp) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverOracleAppTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverOracleAppTargetParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleTargetParamsForRecoverOracleApp) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonRecoverOracleAppTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle target params for recover oracle app -func (m *OracleTargetParamsForRecoverOracleApp) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverOracleAppTargetParams - if err := m.CommonRecoverOracleAppTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this oracle target params for recover oracle app based on the context it is used -func (m *OracleTargetParamsForRecoverOracleApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverOracleAppTargetParams - if err := m.CommonRecoverOracleAppTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleTargetParamsForRecoverOracleApp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleTargetParamsForRecoverOracleApp) UnmarshalBinary(b []byte) error { - var res OracleTargetParamsForRecoverOracleApp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_tier.go b/v2/models/oracle_tier.go deleted file mode 100644 index 9018239a..00000000 --- a/v2/models/oracle_tier.go +++ /dev/null @@ -1,159 +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" -) - -// OracleTier Specifies the settings for a Oracle tier. -// -// swagger:model OracleTier -type OracleTier struct { - CommonCloudTierSettings - - // Specifies the Oracle tier types. - // Required: true - // Enum: ["kOracleTierStandard","kOracleTierArchive"] - TierType *string `json:"tierType"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *OracleTier) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCloudTierSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCloudTierSettings = aO0 - - // AO1 - var dataAO1 struct { - TierType *string `json:"tierType"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TierType = dataAO1.TierType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m OracleTier) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCloudTierSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TierType *string `json:"tierType"` - } - - dataAO1.TierType = m.TierType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this oracle tier -func (m *OracleTier) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleTierTypeTierTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleTierTypeTierTypePropEnum = append(oracleTierTypeTierTypePropEnum, v) - } -} - -// property enum -func (m *OracleTier) validateTierTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleTierTypeTierTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleTier) validateTierType(formats strfmt.Registry) error { - - if err := validate.Required("tierType", "body", m.TierType); err != nil { - return err - } - - // value enum - if err := m.validateTierTypeEnum("tierType", "body", *m.TierType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this oracle tier based on the context it is used -func (m *OracleTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCloudTierSettings - if err := m.CommonCloudTierSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *OracleTier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleTier) UnmarshalBinary(b []byte) error { - var res OracleTier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_tiering_levels.go b/v2/models/oracle_tiering_levels.go deleted file mode 100644 index 5b8624c7..00000000 --- a/v2/models/oracle_tiering_levels.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleTieringLevels Oracle Tiering Levels. -// -// # Oracle Tiering Levels -// -// swagger:model OracleTieringLevels -type OracleTieringLevels struct { - - // Oracle Tiering Levels - // Enum: ["kOracleTierStandard","kOracleTierArchive"] - Type string `json:"type,omitempty"` -} - -// Validate validates this oracle tiering levels -func (m *OracleTieringLevels) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleTieringLevelsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleTieringLevelsTypeTypePropEnum = append(oracleTieringLevelsTypeTypePropEnum, v) - } -} - -const ( - - // OracleTieringLevelsTypeKOracleTierStandard captures enum value "kOracleTierStandard" - OracleTieringLevelsTypeKOracleTierStandard string = "kOracleTierStandard" - - // OracleTieringLevelsTypeKOracleTierArchive captures enum value "kOracleTierArchive" - OracleTieringLevelsTypeKOracleTierArchive string = "kOracleTierArchive" -) - -// prop value enum -func (m *OracleTieringLevels) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleTieringLevelsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleTieringLevels) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle tiering levels based on context it is used -func (m *OracleTieringLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleTieringLevels) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleTieringLevels) UnmarshalBinary(b []byte) error { - var res OracleTieringLevels - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_tiering_storage_class.go b/v2/models/oracle_tiering_storage_class.go deleted file mode 100644 index 60c26c45..00000000 --- a/v2/models/oracle_tiering_storage_class.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleTieringStorageClass Oracle Tiering Storage Class -// -// Specifies the storage class of Oracle External Target of tiering purpose type. -// -// swagger:model OracleTieringStorageClass -type OracleTieringStorageClass struct { - - // Specifies the storage class of Oracle External Target of tiering purpose type. - // Enum: ["OracleObjectStorage"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this oracle tiering storage class -func (m *OracleTieringStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var oracleTieringStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OracleObjectStorage"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - oracleTieringStorageClassTypeEnumPropEnum = append(oracleTieringStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // OracleTieringStorageClassEnumOracleObjectStorage captures enum value "OracleObjectStorage" - OracleTieringStorageClassEnumOracleObjectStorage string = "OracleObjectStorage" -) - -// prop value enum -func (m *OracleTieringStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, oracleTieringStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OracleTieringStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this oracle tiering storage class based on context it is used -func (m *OracleTieringStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleTieringStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleTieringStorageClass) UnmarshalBinary(b []byte) error { - var res OracleTieringStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_tiers.go b/v2/models/oracle_tiers.go deleted file mode 100644 index b6ed6c62..00000000 --- a/v2/models/oracle_tiers.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OracleTiers Specifies Oracle tiers. -// -// swagger:model OracleTiers -type OracleTiers struct { - - // Specifies the tiers that are used to move the archived backup from current tier to next tier. The order of the tiers determines which tier will be used next for moving the archived backup. The first tier input should always be default tier where backup will be acrhived. Each tier specifies how much time after the backup will be moved to next tier from the current tier. - // Required: true - Tiers []*OracleTier `json:"tiers"` -} - -// Validate validates this oracle tiers -func (m *OracleTiers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleTiers) validateTiers(formats strfmt.Registry) error { - - if err := validate.Required("tiers", "body", m.Tiers); err != nil { - return err - } - - for i := 0; i < len(m.Tiers); i++ { - if swag.IsZero(m.Tiers[i]) { // not required - continue - } - - if m.Tiers[i] != nil { - if err := m.Tiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this oracle tiers based on the context it is used -func (m *OracleTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OracleTiers) contextValidateTiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tiers); i++ { - - if m.Tiers[i] != nil { - - if swag.IsZero(m.Tiers[i]) { // not required - return nil - } - - if err := m.Tiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OracleTiers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleTiers) UnmarshalBinary(b []byte) error { - var res OracleTiers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/oracle_vlan_info.go b/v2/models/oracle_vlan_info.go deleted file mode 100644 index 9ec5801a..00000000 --- a/v2/models/oracle_vlan_info.go +++ /dev/null @@ -1,61 +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" -) - -// OracleVlanInfo Oracle Protection Group vlan info -// -// Specifies details about capturing Cohesity cluster VLAN info for Oracle workflow. -// -// swagger:model OracleVlanInfo -type OracleVlanInfo struct { - - // Specifies the list of Ips in this VLAN. - IPList []string `json:"ipList"` - - // Specifies the gateway of this VLAN. - Gateway *string `json:"gateway,omitempty"` - - // Specifies the Id of this VLAN. - ID int32 `json:"id,omitempty"` - - // Specifies the subnet Ip for this VLAN. - SubnetIP *string `json:"subnetIp,omitempty"` -} - -// Validate validates this oracle vlan info -func (m *OracleVlanInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oracle vlan info based on context it is used -func (m *OracleVlanInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OracleVlanInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OracleVlanInfo) UnmarshalBinary(b []byte) error { - var res OracleVlanInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/org_v_d_c_network.go b/v2/models/org_v_d_c_network.go deleted file mode 100644 index 9b8ba057..00000000 --- a/v2/models/org_v_d_c_network.go +++ /dev/null @@ -1,110 +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" -) - -// OrgVDCNetwork Specifies a VDC Organization Network. -// -// swagger:model OrgVDCNetwork -type OrgVDCNetwork struct { - - // Specifies the UUID of network associated with the Virtual Cloud director. - // Required: true - VcdUUID *string `json:"vcdUuid"` - - // Specifies the name of the catalog. - // Required: true - Name *string `json:"name"` - - // Specifies the UUID of network associated with the Vcenter. - // Read Only: true - VCenterUUID *string `json:"vCenterUuid,omitempty"` -} - -// Validate validates this org v d c network -func (m *OrgVDCNetwork) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcdUUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OrgVDCNetwork) validateVcdUUID(formats strfmt.Registry) error { - - if err := validate.Required("vcdUuid", "body", m.VcdUUID); err != nil { - return err - } - - return nil -} - -func (m *OrgVDCNetwork) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this org v d c network based on the context it is used -func (m *OrgVDCNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVCenterUUID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OrgVDCNetwork) contextValidateVCenterUUID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "vCenterUuid", "body", m.VCenterUUID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OrgVDCNetwork) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OrgVDCNetwork) UnmarshalBinary(b []byte) error { - var res OrgVDCNetwork - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_elastifile_files_target_params.go b/v2/models/original_elastifile_files_target_params.go deleted file mode 100644 index 12e71aea..00000000 --- a/v2/models/original_elastifile_files_target_params.go +++ /dev/null @@ -1,195 +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" -) - -// OriginalElastifileFilesTargetParams Recover To Original Elastifile Files Target Params. -// -// Specifies the params of the original Elastifile recovery target. -// -// swagger:model OriginalElastifileFilesTargetParams -type OriginalElastifileFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original elastifile files target params -func (m *OriginalElastifileFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalElastifileFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalElastifileFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalElastifileFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original elastifile files target params based on the context it is used -func (m *OriginalElastifileFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalElastifileFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalElastifileFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalElastifileFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalElastifileFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalElastifileFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_elastifile_target_params.go b/v2/models/original_elastifile_target_params.go deleted file mode 100644 index a81114dd..00000000 --- a/v2/models/original_elastifile_target_params.go +++ /dev/null @@ -1,174 +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" -) - -// OriginalElastifileTargetParams Recover To Original Elastifile Volume Target Params. -// -// Specifies the params of the original Elastifile recovery target. -// -// swagger:model OriginalElastifileTargetParams -type OriginalElastifileTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original elastifile target params -func (m *OriginalElastifileTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalElastifileTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalElastifileTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original elastifile target params based on the context it is used -func (m *OriginalElastifileTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalElastifileTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalElastifileTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalElastifileTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalElastifileTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalElastifileTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_flashblade_files_target_params.go b/v2/models/original_flashblade_files_target_params.go deleted file mode 100644 index 7c88fd09..00000000 --- a/v2/models/original_flashblade_files_target_params.go +++ /dev/null @@ -1,195 +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" -) - -// OriginalFlashbladeFilesTargetParams Recover To Original Flashblade Files Target Params. -// -// Specifies the params of the original Flashblade recovery target. -// -// swagger:model OriginalFlashbladeFilesTargetParams -type OriginalFlashbladeFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original flashblade files target params -func (m *OriginalFlashbladeFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalFlashbladeFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalFlashbladeFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalFlashbladeFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original flashblade files target params based on the context it is used -func (m *OriginalFlashbladeFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalFlashbladeFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalFlashbladeFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalFlashbladeFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalFlashbladeFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalFlashbladeFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_flashblade_target_params.go b/v2/models/original_flashblade_target_params.go deleted file mode 100644 index f891b3a9..00000000 --- a/v2/models/original_flashblade_target_params.go +++ /dev/null @@ -1,174 +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" -) - -// OriginalFlashbladeTargetParams Recover To Original Flashblade Volume Target Params. -// -// Specifies the params of the original Flashblade recovery target. -// -// swagger:model OriginalFlashbladeTargetParams -type OriginalFlashbladeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original flashblade target params -func (m *OriginalFlashbladeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalFlashbladeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalFlashbladeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original flashblade target params based on the context it is used -func (m *OriginalFlashbladeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalFlashbladeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalFlashbladeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalFlashbladeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalFlashbladeTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalFlashbladeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_generic_nas_files_target_params.go b/v2/models/original_generic_nas_files_target_params.go deleted file mode 100644 index ea4c9582..00000000 --- a/v2/models/original_generic_nas_files_target_params.go +++ /dev/null @@ -1,144 +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" -) - -// OriginalGenericNasFilesTargetParams Recover To Original Generic Nas Files Target Params. -// -// Specifies the params of the original Generic Nas recovery target. -// -// swagger:model OriginalGenericNasFilesTargetParams -type OriginalGenericNasFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original generic nas files target params -func (m *OriginalGenericNasFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGenericNasFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalGenericNasFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original generic nas files target params based on the context it is used -func (m *OriginalGenericNasFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGenericNasFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalGenericNasFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalGenericNasFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalGenericNasFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_generic_nas_target_params.go b/v2/models/original_generic_nas_target_params.go deleted file mode 100644 index 8edaa1b1..00000000 --- a/v2/models/original_generic_nas_target_params.go +++ /dev/null @@ -1,123 +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" -) - -// OriginalGenericNasTargetParams Recover To Original Generic NAS Volume Target Params. -// -// Specifies the params of the original Generic NAS recovery target. -// -// swagger:model OriginalGenericNasTargetParams -type OriginalGenericNasTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original generic nas target params -func (m *OriginalGenericNasTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGenericNasTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original generic nas target params based on the context it is used -func (m *OriginalGenericNasTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGenericNasTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalGenericNasTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalGenericNasTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalGenericNasTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_gpfs_files_target_params.go b/v2/models/original_gpfs_files_target_params.go deleted file mode 100644 index 6d93add1..00000000 --- a/v2/models/original_gpfs_files_target_params.go +++ /dev/null @@ -1,195 +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" -) - -// OriginalGpfsFilesTargetParams Recover To Original GPFS Files Target Params. -// -// Specifies the params of the original GPFS recovery target. -// -// swagger:model OriginalGpfsFilesTargetParams -type OriginalGpfsFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original gpfs files target params -func (m *OriginalGpfsFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGpfsFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalGpfsFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalGpfsFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original gpfs files target params based on the context it is used -func (m *OriginalGpfsFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGpfsFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalGpfsFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalGpfsFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalGpfsFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalGpfsFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_gpfs_target_params.go b/v2/models/original_gpfs_target_params.go deleted file mode 100644 index a4365ec7..00000000 --- a/v2/models/original_gpfs_target_params.go +++ /dev/null @@ -1,174 +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" -) - -// OriginalGpfsTargetParams Recover To Original GPFS NAS Volume Target Params. -// -// Specifies the params of the original GPFS recovery target. -// -// swagger:model OriginalGpfsTargetParams -type OriginalGpfsTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original gpfs target params -func (m *OriginalGpfsTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGpfsTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalGpfsTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original gpfs target params based on the context it is used -func (m *OriginalGpfsTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalGpfsTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalGpfsTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalGpfsTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalGpfsTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalGpfsTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_isilon_files_target_params.go b/v2/models/original_isilon_files_target_params.go deleted file mode 100644 index 16e278b0..00000000 --- a/v2/models/original_isilon_files_target_params.go +++ /dev/null @@ -1,195 +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" -) - -// OriginalIsilonFilesTargetParams Recover To Original Isilon Files Target Params. -// -// Specifies the params of the original Isilon recovery target. -// -// swagger:model OriginalIsilonFilesTargetParams -type OriginalIsilonFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original isilon files target params -func (m *OriginalIsilonFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalIsilonFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalIsilonFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalIsilonFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original isilon files target params based on the context it is used -func (m *OriginalIsilonFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalIsilonFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalIsilonFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalIsilonFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalIsilonFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalIsilonFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_isilon_target_params.go b/v2/models/original_isilon_target_params.go deleted file mode 100644 index 03e3d7a2..00000000 --- a/v2/models/original_isilon_target_params.go +++ /dev/null @@ -1,174 +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" -) - -// OriginalIsilonTargetParams Recover To Original Isilon Volume Target Params. -// -// Specifies the params of the original Isilon recovery target. -// -// swagger:model OriginalIsilonTargetParams -type OriginalIsilonTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original isilon target params -func (m *OriginalIsilonTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalIsilonTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalIsilonTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original isilon target params based on the context it is used -func (m *OriginalIsilonTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalIsilonTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalIsilonTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalIsilonTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalIsilonTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalIsilonTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_netapp_files_target_params.go b/v2/models/original_netapp_files_target_params.go deleted file mode 100644 index e5e61c31..00000000 --- a/v2/models/original_netapp_files_target_params.go +++ /dev/null @@ -1,195 +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" -) - -// OriginalNetappFilesTargetParams Recover To Original Netapp Files Target Params. -// -// Specifies the params of the original Netapp recovery target. -// -// swagger:model OriginalNetappFilesTargetParams -type OriginalNetappFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original netapp files target params -func (m *OriginalNetappFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalNetappFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalNetappFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalNetappFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original netapp files target params based on the context it is used -func (m *OriginalNetappFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalNetappFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalNetappFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalNetappFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalNetappFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalNetappFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_netapp_target_params.go b/v2/models/original_netapp_target_params.go deleted file mode 100644 index fa9056f6..00000000 --- a/v2/models/original_netapp_target_params.go +++ /dev/null @@ -1,174 +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" -) - -// OriginalNetappTargetParams Recover To Original Netapp Volume Target Params. -// -// Specifies the params of the original Netapp recovery target. -// -// swagger:model OriginalNetappTargetParams -type OriginalNetappTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original netapp target params -func (m *OriginalNetappTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalNetappTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalNetappTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original netapp target params based on the context it is used -func (m *OriginalNetappTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalNetappTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *OriginalNetappTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalNetappTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalNetappTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalNetappTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/original_view_files_target_params.go b/v2/models/original_view_files_target_params.go deleted file mode 100644 index 12c854d9..00000000 --- a/v2/models/original_view_files_target_params.go +++ /dev/null @@ -1,141 +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" -) - -// OriginalViewFilesTargetParams Recover To Original View Files Target Params. -// -// Specifies the params of the original View recovery target. -// -// swagger:model OriginalViewFilesTargetParams -type OriginalViewFilesTargetParams struct { - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this original view files target params -func (m *OriginalViewFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalViewFilesTargetParams) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *OriginalViewFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this original view files target params based on the context it is used -func (m *OriginalViewFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OriginalViewFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *OriginalViewFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OriginalViewFilesTargetParams) UnmarshalBinary(b []byte) error { - var res OriginalViewFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/overwrite_view_params.go b/v2/models/overwrite_view_params.go deleted file mode 100644 index 9d2191b1..00000000 --- a/v2/models/overwrite_view_params.go +++ /dev/null @@ -1,71 +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" -) - -// OverwriteViewParams Specifies the parameters to overwrite a View. -// -// swagger:model OverwriteViewParams -type OverwriteViewParams struct { - - // Specifies the source View id. Target View will be overwritten by the source View. - // Required: true - SourceViewID *int64 `json:"sourceViewId"` -} - -// Validate validates this overwrite view params -func (m *OverwriteViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceViewID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *OverwriteViewParams) validateSourceViewID(formats strfmt.Registry) error { - - if err := validate.Required("sourceViewId", "body", m.SourceViewID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this overwrite view params based on context it is used -func (m *OverwriteViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OverwriteViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OverwriteViewParams) UnmarshalBinary(b []byte) error { - var res OverwriteViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ownership_context.go b/v2/models/ownership_context.go deleted file mode 100644 index d0142f3d..00000000 --- a/v2/models/ownership_context.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// OwnershipContext Ownershp Context -// -// Specifies how the External Target or KMS will be consumed internal. -// -// swagger:model OwnershipContext -type OwnershipContext struct { - - // Specifies the ownership context of Vault or KMS. - // Enum: ["Local","FortKnox"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this ownership context -func (m *OwnershipContext) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var ownershipContextTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - ownershipContextTypeEnumPropEnum = append(ownershipContextTypeEnumPropEnum, v) - } -} - -const ( - - // OwnershipContextEnumLocal captures enum value "Local" - OwnershipContextEnumLocal string = "Local" - - // OwnershipContextEnumFortKnox captures enum value "FortKnox" - OwnershipContextEnumFortKnox string = "FortKnox" -) - -// prop value enum -func (m *OwnershipContext) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, ownershipContextTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *OwnershipContext) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this ownership context based on context it is used -func (m *OwnershipContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OwnershipContext) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OwnershipContext) UnmarshalBinary(b []byte) error { - var res OwnershipContext - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pagination_info.go b/v2/models/pagination_info.go deleted file mode 100644 index 57194026..00000000 --- a/v2/models/pagination_info.go +++ /dev/null @@ -1,50 +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" -) - -// PaginationInfo Specifies information needed to support pagination. -// -// swagger:model PaginationInfo -type PaginationInfo struct { - - // Specifies a cookie which can be passed in by the user in order to retrieve the next page of results. - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this pagination info -func (m *PaginationInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pagination info based on context it is used -func (m *PaginationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PaginationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PaginationInfo) UnmarshalBinary(b []byte) error { - var res PaginationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/password_form_field_params.go b/v2/models/password_form_field_params.go deleted file mode 100644 index e40bbb27..00000000 --- a/v2/models/password_form_field_params.go +++ /dev/null @@ -1,56 +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" -) - -// PasswordFormFieldParams Parameters to specify a password form field. -// -// swagger:model PasswordFormFieldParams -type PasswordFormFieldParams struct { - - // Specifies whether the field is mandatory. - Required *bool `json:"required,omitempty"` - - // Description for the field to be shown on UI screen. - Description *string `json:"description,omitempty"` - - // Placeholder value for the form field. - Placeholder *string `json:"placeholder,omitempty"` -} - -// Validate validates this password form field params -func (m *PasswordFormFieldParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this password form field params based on context it is used -func (m *PasswordFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PasswordFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PasswordFormFieldParams) UnmarshalBinary(b []byte) error { - var res PasswordFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/patch_detail.go b/v2/models/patch_detail.go deleted file mode 100644 index dc7e8c6f..00000000 --- a/v2/models/patch_detail.go +++ /dev/null @@ -1,62 +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" -) - -// PatchDetail Detail of a patch. It gives the service and version information of the the patch. -// -// swagger:model PatchDetail -type PatchDetail struct { - - // Specifies the name of the service. - Service *string `json:"service,omitempty"` - - // Specifies the user friendly name of the service. - Component *string `json:"component,omitempty"` - - // Specifies the existing version of the service. This is the available service patch version if exists. If there is no patch available, then it is the applied patch version if applied. If both don't exist, it is the base version of the service. - Version *string `json:"version,omitempty"` - - // Specifies the version of the imported service patch. - ImportVersion *string `json:"import_version,omitempty"` - - // Specifies the status of the patch whether it is accepted or rejected. A patch is rejected if it is older than the version available or applied on the cluster. - Status *string `json:"status,omitempty"` -} - -// Validate validates this patch detail -func (m *PatchDetail) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this patch detail based on context it is used -func (m *PatchDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PatchDetail) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PatchDetail) UnmarshalBinary(b []byte) error { - var res PatchDetail - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/patch_operation.go b/v2/models/patch_operation.go deleted file mode 100644 index 1f4ff518..00000000 --- a/v2/models/patch_operation.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/strfmt" - "github.com/go-openapi/swag" -) - -// PatchOperation Patch Operation. -// -// Specifies a patch operation. -// -// swagger:model PatchOperation -type PatchOperation struct { - - // Specifies the name of the service. - Service string `json:"service,omitempty"` - - // Specifies the description of the service. - Component string `json:"component,omitempty"` - - // Specifies the version of the patch. - Version string `json:"version,omitempty"` - - // Specifies the version it replaced. - VersionReplaced string `json:"versionReplaced,omitempty"` - - // Specifies what patch management operation was performed - Operation string `json:"operation,omitempty"` - - // Specifies the time when the patch operation was done in Unix epoch in milliseconds. - OperationTimeMsecs int64 `json:"operationTimeMsecs,omitempty"` - - // Specifies the user who performed the operation. - User string `json:"user,omitempty"` - - // Specifies the domain of the user. - Domain string `json:"domain,omitempty"` -} - -// Validate validates this patch operation -func (m *PatchOperation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this patch operation based on context it is used -func (m *PatchOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PatchOperation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PatchOperation) UnmarshalBinary(b []byte) error { - var res PatchOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/patch_operation_status.go b/v2/models/patch_operation_status.go deleted file mode 100644 index 2787046b..00000000 --- a/v2/models/patch_operation_status.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PatchOperationStatus Patch Operation Status. -// -// Specifies the status of the current or the last patch operation. -// -// swagger:model PatchOperationStatus -type PatchOperationStatus struct { - - // Specifies whether a operation is in progress now. - InProgress *bool `json:"inProgress,omitempty"` - - // Specifies the patch operation. It is either apply or revert patch operation. - Operation *string `json:"operation,omitempty"` - - // Specifies the percentage of completion of the current patch operation in progress or the last patch operation completed. - Percentage *int64 `json:"percentage,omitempty"` - - // Specifies the time remaining to complete the patch operation. - TimeRemainingSeconds *int64 `json:"timeRemainingSeconds,omitempty"` - - // Specifies the time taken so far to complete the patch operation. - TimeTakenSeconds *int64 `json:"timeTakenSeconds,omitempty"` - - // Specifies the details of patch operation services at each patch level. - ServicesProgress []*ServiceUnitProgress `json:"servicesProgress"` - - // Specifies a message about the patch operation. - OperationMessage *string `json:"operationMessage,omitempty"` -} - -// Validate validates this patch operation status -func (m *PatchOperationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServicesProgress(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PatchOperationStatus) validateServicesProgress(formats strfmt.Registry) error { - if swag.IsZero(m.ServicesProgress) { // not required - return nil - } - - for i := 0; i < len(m.ServicesProgress); i++ { - if swag.IsZero(m.ServicesProgress[i]) { // not required - continue - } - - if m.ServicesProgress[i] != nil { - if err := m.ServicesProgress[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesProgress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesProgress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this patch operation status based on the context it is used -func (m *PatchOperationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServicesProgress(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PatchOperationStatus) contextValidateServicesProgress(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ServicesProgress); i++ { - - if m.ServicesProgress[i] != nil { - - if swag.IsZero(m.ServicesProgress[i]) { // not required - return nil - } - - if err := m.ServicesProgress[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("servicesProgress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("servicesProgress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PatchOperationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PatchOperationStatus) UnmarshalBinary(b []byte) error { - var res PatchOperationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/patches_details.go b/v2/models/patches_details.go deleted file mode 100644 index 66da4806..00000000 --- a/v2/models/patches_details.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PatchesDetails Details of patches in a patch or a hotfix. -// -// swagger:model PatchesDetails -type PatchesDetails []*PatchDetail - -// Validate validates this patches details -func (m PatchesDetails) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this patches details based on the context it is used -func (m PatchesDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/patches_history.go b/v2/models/patches_history.go deleted file mode 100644 index 61be735f..00000000 --- a/v2/models/patches_history.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PatchesHistory Specifies the history of patch operations. -// -// swagger:model PatchesHistory -type PatchesHistory []*PatchOperation - -// Validate validates this patches history -func (m PatchesHistory) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this patches history based on the context it is used -func (m PatchesHistory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/pause_action_object_level_params.go b/v2/models/pause_action_object_level_params.go deleted file mode 100644 index d2d3028e..00000000 --- a/v2/models/pause_action_object_level_params.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" -) - -// PauseActionObjectLevelParams Specifies the request parameters for Pause action on a Protected object. -// -// swagger:model PauseActionObjectLevelParams -type PauseActionObjectLevelParams struct { - ProtectionObjectInput -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PauseActionObjectLevelParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PauseActionObjectLevelParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this pause action object level params -func (m *PauseActionObjectLevelParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this pause action object level params based on the context it is used -func (m *PauseActionObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PauseActionObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PauseActionObjectLevelParams) UnmarshalBinary(b []byte) error { - var res PauseActionObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pause_action_object_level_response.go b/v2/models/pause_action_object_level_response.go deleted file mode 100644 index f8b27357..00000000 --- a/v2/models/pause_action_object_level_response.go +++ /dev/null @@ -1,109 +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" -) - -// PauseActionObjectLevelResponse Specifies the infomration about status of pause action. -// -// swagger:model PauseActionObjectLevelResponse -type PauseActionObjectLevelResponse struct { - - // If the action fails for this object, then error will be return here. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this pause action object level response -func (m *PauseActionObjectLevelResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PauseActionObjectLevelResponse) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this pause action object level response based on the context it is used -func (m *PauseActionObjectLevelResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PauseActionObjectLevelResponse) 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 -} - -// MarshalBinary interface implementation -func (m *PauseActionObjectLevelResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PauseActionObjectLevelResponse) UnmarshalBinary(b []byte) error { - var res PauseActionObjectLevelResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pause_protection_run_action_params.go b/v2/models/pause_protection_run_action_params.go deleted file mode 100644 index 85444067..00000000 --- a/v2/models/pause_protection_run_action_params.go +++ /dev/null @@ -1,78 +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" -) - -// PauseProtectionRunActionParams Pause protection run request. -// -// Specifies the request to pause a protection run. -// -// swagger:model PauseProtectionRunActionParams -type PauseProtectionRunActionParams struct { - - // Specifies a unique run id of the Protection Group run. - // Required: true - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId"` -} - -// Validate validates this pause protection run action params -func (m *PauseProtectionRunActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PauseProtectionRunActionParams) validateRunID(formats strfmt.Registry) error { - - if err := validate.Required("runId", "body", m.RunID); err != nil { - return err - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this pause protection run action params based on context it is used -func (m *PauseProtectionRunActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PauseProtectionRunActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PauseProtectionRunActionParams) UnmarshalBinary(b []byte) error { - var res PauseProtectionRunActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pause_protection_run_action_response_params.go b/v2/models/pause_protection_run_action_response_params.go deleted file mode 100644 index 6f79b52e..00000000 --- a/v2/models/pause_protection_run_action_response_params.go +++ /dev/null @@ -1,77 +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" -) - -// PauseProtectionRunActionResponseParams Specifies the response of a pause action on protection runs. -// -// swagger:model PauseProtectionRunActionResponseParams -type PauseProtectionRunActionResponseParams struct { - - // Specifies a unique run id of the Protection Group run. - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId,omitempty"` - - // Specifies an error occured when perfroming pause of a protection run. - Error *string `json:"error,omitempty"` -} - -// Validate validates this pause protection run action response params -func (m *PauseProtectionRunActionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PauseProtectionRunActionResponseParams) validateRunID(formats strfmt.Registry) error { - if swag.IsZero(m.RunID) { // not required - return nil - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this pause protection run action response params based on context it is used -func (m *PauseProtectionRunActionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PauseProtectionRunActionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PauseProtectionRunActionResponseParams) UnmarshalBinary(b []byte) error { - var res PauseProtectionRunActionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pause_status_run_level.go b/v2/models/pause_status_run_level.go deleted file mode 100644 index 700ccf9d..00000000 --- a/v2/models/pause_status_run_level.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PauseStatusRunLevel PauseStatusRunLevel -// -// Specifies the various statuses assciated with pause and resume operation on protection run. -// -// swagger:model PauseStatusRunLevel -type PauseStatusRunLevel struct { - - // Specifies the pause status at run level. - // Enum: ["Paused"] - PauseStatusRunLevel string `json:"pauseStatusRunLevel,omitempty"` -} - -// Validate validates this pause status run level -func (m *PauseStatusRunLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePauseStatusRunLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var pauseStatusRunLevelTypePauseStatusRunLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - pauseStatusRunLevelTypePauseStatusRunLevelPropEnum = append(pauseStatusRunLevelTypePauseStatusRunLevelPropEnum, v) - } -} - -const ( - - // PauseStatusRunLevelPauseStatusRunLevelPaused captures enum value "Paused" - PauseStatusRunLevelPauseStatusRunLevelPaused string = "Paused" -) - -// prop value enum -func (m *PauseStatusRunLevel) validatePauseStatusRunLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, pauseStatusRunLevelTypePauseStatusRunLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PauseStatusRunLevel) validatePauseStatusRunLevel(formats strfmt.Registry) error { - if swag.IsZero(m.PauseStatusRunLevel) { // not required - return nil - } - - // value enum - if err := m.validatePauseStatusRunLevelEnum("pauseStatusRunLevel", "body", m.PauseStatusRunLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this pause status run level based on context it is used -func (m *PauseStatusRunLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PauseStatusRunLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PauseStatusRunLevel) UnmarshalBinary(b []byte) error { - var res PauseStatusRunLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/perform_action_on_clones_request.go b/v2/models/perform_action_on_clones_request.go deleted file mode 100644 index 0b141e79..00000000 --- a/v2/models/perform_action_on_clones_request.go +++ /dev/null @@ -1,162 +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" -) - -// PerformActionOnClonesRequest Perform action on clones request. -// -// Specifies the request parameters to perform an action on multiple clones. -// -// swagger:model PerformActionOnClonesRequest -type PerformActionOnClonesRequest struct { - - // Specifies the action to be performed. - // Required: true - // Enum: ["Cleanup"] - Action *string `json:"action"` - - // cleanup params - CleanupParams *CloneActionCleanupParams `json:"cleanupParams,omitempty"` -} - -// Validate validates this perform action on clones request -func (m *PerformActionOnClonesRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCleanupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var performActionOnClonesRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Cleanup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - performActionOnClonesRequestTypeActionPropEnum = append(performActionOnClonesRequestTypeActionPropEnum, v) - } -} - -const ( - - // PerformActionOnClonesRequestActionCleanup captures enum value "Cleanup" - PerformActionOnClonesRequestActionCleanup string = "Cleanup" -) - -// prop value enum -func (m *PerformActionOnClonesRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, performActionOnClonesRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PerformActionOnClonesRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *PerformActionOnClonesRequest) validateCleanupParams(formats strfmt.Registry) error { - if swag.IsZero(m.CleanupParams) { // not required - return nil - } - - if m.CleanupParams != nil { - if err := m.CleanupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this perform action on clones request based on the context it is used -func (m *PerformActionOnClonesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCleanupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformActionOnClonesRequest) contextValidateCleanupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CleanupParams != nil { - - if swag.IsZero(m.CleanupParams) { // not required - return nil - } - - if err := m.CleanupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cleanupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cleanupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformActionOnClonesRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformActionOnClonesRequest) UnmarshalBinary(b []byte) error { - var res PerformActionOnClonesRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/perform_action_on_protection_group_run_request.go b/v2/models/perform_action_on_protection_group_run_request.go deleted file mode 100644 index 6060a9a0..00000000 --- a/v2/models/perform_action_on_protection_group_run_request.go +++ /dev/null @@ -1,302 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PerformActionOnProtectionGroupRunRequest Specifies the request to perform actions on protection runs. -// -// swagger:model PerformActionOnProtectionGroupRunRequest -type PerformActionOnProtectionGroupRunRequest struct { - - // Specifies the type of the action which will be performed on protection runs. - // Required: true - // Enum: ["Pause","Resume","Cancel"] - Action *string `json:"action"` - - // Specifies the pause action params for a protection run. - PauseParams []*PauseProtectionRunActionParams `json:"pauseParams"` - - // Specifies the resume action params for a protection run. - ResumeParams []*ResumeProtectionRunActionParams `json:"resumeParams"` - - // Specifies the cancel action params for a protection run. - CancelParams []*CancelProtectionGroupRunRequest `json:"cancelParams"` -} - -// Validate validates this perform action on protection group run request -func (m *PerformActionOnProtectionGroupRunRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePauseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCancelParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var performActionOnProtectionGroupRunRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - performActionOnProtectionGroupRunRequestTypeActionPropEnum = append(performActionOnProtectionGroupRunRequestTypeActionPropEnum, v) - } -} - -const ( - - // PerformActionOnProtectionGroupRunRequestActionPause captures enum value "Pause" - PerformActionOnProtectionGroupRunRequestActionPause string = "Pause" - - // PerformActionOnProtectionGroupRunRequestActionResume captures enum value "Resume" - PerformActionOnProtectionGroupRunRequestActionResume string = "Resume" - - // PerformActionOnProtectionGroupRunRequestActionCancel captures enum value "Cancel" - PerformActionOnProtectionGroupRunRequestActionCancel string = "Cancel" -) - -// prop value enum -func (m *PerformActionOnProtectionGroupRunRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, performActionOnProtectionGroupRunRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) validatePauseParams(formats strfmt.Registry) error { - if swag.IsZero(m.PauseParams) { // not required - return nil - } - - for i := 0; i < len(m.PauseParams); i++ { - if swag.IsZero(m.PauseParams[i]) { // not required - continue - } - - if m.PauseParams[i] != nil { - if err := m.PauseParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) validateResumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ResumeParams) { // not required - return nil - } - - for i := 0; i < len(m.ResumeParams); i++ { - if swag.IsZero(m.ResumeParams[i]) { // not required - continue - } - - if m.ResumeParams[i] != nil { - if err := m.ResumeParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) validateCancelParams(formats strfmt.Registry) error { - if swag.IsZero(m.CancelParams) { // not required - return nil - } - - for i := 0; i < len(m.CancelParams); i++ { - if swag.IsZero(m.CancelParams[i]) { // not required - continue - } - - if m.CancelParams[i] != nil { - if err := m.CancelParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this perform action on protection group run request based on the context it is used -func (m *PerformActionOnProtectionGroupRunRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePauseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCancelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) contextValidatePauseParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PauseParams); i++ { - - if m.PauseParams[i] != nil { - - if swag.IsZero(m.PauseParams[i]) { // not required - return nil - } - - if err := m.PauseParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) contextValidateResumeParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResumeParams); i++ { - - if m.ResumeParams[i] != nil { - - if swag.IsZero(m.ResumeParams[i]) { // not required - return nil - } - - if err := m.ResumeParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformActionOnProtectionGroupRunRequest) contextValidateCancelParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CancelParams); i++ { - - if m.CancelParams[i] != nil { - - if swag.IsZero(m.CancelParams[i]) { // not required - return nil - } - - if err := m.CancelParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformActionOnProtectionGroupRunRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformActionOnProtectionGroupRunRequest) UnmarshalBinary(b []byte) error { - var res PerformActionOnProtectionGroupRunRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/perform_run_action_response.go b/v2/models/perform_run_action_response.go deleted file mode 100644 index 58e14e01..00000000 --- a/v2/models/perform_run_action_response.go +++ /dev/null @@ -1,300 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PerformRunActionResponse Specifies the response of the performed run action. -// -// swagger:model PerformRunActionResponse -type PerformRunActionResponse struct { - - // Specifies the type of the action is performed on protection runs. - // Enum: ["Pause","Resume","Cancel"] - Action *string `json:"action,omitempty"` - - // Specifies the pause action response params. - PauseParams []*PauseProtectionRunActionResponseParams `json:"pauseParams"` - - // Specifies the resume action response params. - ResumeParams []*ResumeProtectionRunActionResponseParams `json:"resumeParams"` - - // Specifies the cancel action response params. - CancelParams []*CancelProtectionGroupRunResponseParams `json:"cancelParams"` -} - -// Validate validates this perform run action response -func (m *PerformRunActionResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePauseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCancelParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var performRunActionResponseTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - performRunActionResponseTypeActionPropEnum = append(performRunActionResponseTypeActionPropEnum, v) - } -} - -const ( - - // PerformRunActionResponseActionPause captures enum value "Pause" - PerformRunActionResponseActionPause string = "Pause" - - // PerformRunActionResponseActionResume captures enum value "Resume" - PerformRunActionResponseActionResume string = "Resume" - - // PerformRunActionResponseActionCancel captures enum value "Cancel" - PerformRunActionResponseActionCancel string = "Cancel" -) - -// prop value enum -func (m *PerformRunActionResponse) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, performRunActionResponseTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PerformRunActionResponse) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *PerformRunActionResponse) validatePauseParams(formats strfmt.Registry) error { - if swag.IsZero(m.PauseParams) { // not required - return nil - } - - for i := 0; i < len(m.PauseParams); i++ { - if swag.IsZero(m.PauseParams[i]) { // not required - continue - } - - if m.PauseParams[i] != nil { - if err := m.PauseParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRunActionResponse) validateResumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ResumeParams) { // not required - return nil - } - - for i := 0; i < len(m.ResumeParams); i++ { - if swag.IsZero(m.ResumeParams[i]) { // not required - continue - } - - if m.ResumeParams[i] != nil { - if err := m.ResumeParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRunActionResponse) validateCancelParams(formats strfmt.Registry) error { - if swag.IsZero(m.CancelParams) { // not required - return nil - } - - for i := 0; i < len(m.CancelParams); i++ { - if swag.IsZero(m.CancelParams[i]) { // not required - continue - } - - if m.CancelParams[i] != nil { - if err := m.CancelParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this perform run action response based on the context it is used -func (m *PerformRunActionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePauseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCancelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PerformRunActionResponse) contextValidatePauseParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PauseParams); i++ { - - if m.PauseParams[i] != nil { - - if swag.IsZero(m.PauseParams[i]) { // not required - return nil - } - - if err := m.PauseParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRunActionResponse) contextValidateResumeParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResumeParams); i++ { - - if m.ResumeParams[i] != nil { - - if swag.IsZero(m.ResumeParams[i]) { // not required - return nil - } - - if err := m.ResumeParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PerformRunActionResponse) contextValidateCancelParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CancelParams); i++ { - - if m.CancelParams[i] != nil { - - if swag.IsZero(m.CancelParams[i]) { // not required - return nil - } - - if err := m.CancelParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cancelParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PerformRunActionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PerformRunActionResponse) UnmarshalBinary(b []byte) error { - var res PerformRunActionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/permission_info.go b/v2/models/permission_info.go deleted file mode 100644 index 67f6c258..00000000 --- a/v2/models/permission_info.go +++ /dev/null @@ -1,239 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PermissionInfo Permissions Information -// -// Specifies the list of users, groups and users that have permissions for a given object. -// -// swagger:model PermissionInfo -type PermissionInfo struct { - - // Specifies the id of the object. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the list of users which has the permissions to the object. - Users []*User `json:"users"` - - // Specifies the list of user groups which has permissions to the object. - Groups []*Group `json:"groups"` - - // Specifies the tenant which has access to the object. - Tenant *Tenant `json:"tenant,omitempty"` -} - -// Validate validates this permission info -func (m *PermissionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenant(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PermissionInfo) validateUsers(formats strfmt.Registry) error { - if swag.IsZero(m.Users) { // not required - return nil - } - - for i := 0; i < len(m.Users); i++ { - if swag.IsZero(m.Users[i]) { // not required - continue - } - - if m.Users[i] != nil { - if err := m.Users[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PermissionInfo) validateGroups(formats strfmt.Registry) error { - if swag.IsZero(m.Groups) { // not required - return nil - } - - for i := 0; i < len(m.Groups); i++ { - if swag.IsZero(m.Groups[i]) { // not required - continue - } - - if m.Groups[i] != nil { - if err := m.Groups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PermissionInfo) validateTenant(formats strfmt.Registry) error { - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if m.Tenant != nil { - if err := m.Tenant.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -// ContextValidate validate this permission info based on the context it is used -func (m *PermissionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenant(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PermissionInfo) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Users); i++ { - - if m.Users[i] != nil { - - if swag.IsZero(m.Users[i]) { // not required - return nil - } - - if err := m.Users[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PermissionInfo) contextValidateGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Groups); i++ { - - if m.Groups[i] != nil { - - if swag.IsZero(m.Groups[i]) { // not required - return nil - } - - if err := m.Groups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("groups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("groups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PermissionInfo) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { - - if m.Tenant != nil { - - if swag.IsZero(m.Tenant) { // not required - return nil - } - - if err := m.Tenant.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tenant") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tenant") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PermissionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PermissionInfo) UnmarshalBinary(b []byte) error { - var res PermissionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_cluster_expand_params.go b/v2/models/physical_cluster_expand_params.go deleted file mode 100644 index cb38609b..00000000 --- a/v2/models/physical_cluster_expand_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalClusterExpandParams Parameters to expand physical edition cluster. -// -// swagger:model PhysicalClusterExpandParams -type PhysicalClusterExpandParams struct { - - // Virtual IPs to add to the cluster. - Vips []string `json:"vips,omitempty"` - - // Configuration of the nodes. - // Required: true - NodeConfigs []*PhysicalNodeConfigParams `json:"nodeConfigs"` - - // Chassis serial to rack id mapping configuration. - ChassisRackConfigs []*ChassisRackConfigParams `json:"chassisRackConfigs,omitempty"` -} - -// Validate validates this physical cluster expand params -func (m *PhysicalClusterExpandParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeConfigs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChassisRackConfigs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalClusterExpandParams) validateNodeConfigs(formats strfmt.Registry) error { - - if err := validate.Required("nodeConfigs", "body", m.NodeConfigs); err != nil { - return err - } - - for i := 0; i < len(m.NodeConfigs); i++ { - if swag.IsZero(m.NodeConfigs[i]) { // not required - continue - } - - if m.NodeConfigs[i] != nil { - if err := m.NodeConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalClusterExpandParams) validateChassisRackConfigs(formats strfmt.Registry) error { - if swag.IsZero(m.ChassisRackConfigs) { // not required - return nil - } - - for i := 0; i < len(m.ChassisRackConfigs); i++ { - if swag.IsZero(m.ChassisRackConfigs[i]) { // not required - continue - } - - if m.ChassisRackConfigs[i] != nil { - if err := m.ChassisRackConfigs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisRackConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisRackConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this physical cluster expand params based on the context it is used -func (m *PhysicalClusterExpandParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChassisRackConfigs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalClusterExpandParams) contextValidateNodeConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeConfigs); i++ { - - if m.NodeConfigs[i] != nil { - - if swag.IsZero(m.NodeConfigs[i]) { // not required - return nil - } - - if err := m.NodeConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalClusterExpandParams) contextValidateChassisRackConfigs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChassisRackConfigs); i++ { - - if m.ChassisRackConfigs[i] != nil { - - if swag.IsZero(m.ChassisRackConfigs[i]) { // not required - return nil - } - - if err := m.ChassisRackConfigs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chassisRackConfigs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chassisRackConfigs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalClusterExpandParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalClusterExpandParams) UnmarshalBinary(b []byte) error { - var res PhysicalClusterExpandParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_file_backup_path_params.go b/v2/models/physical_file_backup_path_params.go deleted file mode 100644 index 7e077154..00000000 --- a/v2/models/physical_file_backup_path_params.go +++ /dev/null @@ -1,77 +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" -) - -// PhysicalFileBackupPathParams physical file backup path params -// -// swagger:model PhysicalFileBackupPathParams -type PhysicalFileBackupPathParams struct { - - // Specifies a path to be included on the source. All paths under this path will be included unless they are specifically mentioned in excluded paths. - // Required: true - IncludedPath *string `json:"includedPath"` - - // Specifies a set of paths nested under the include path which should be excluded from the Protection Group. - ExcludedPaths []string `json:"excludedPaths"` - - // Specifies whether to skip any nested volumes (both local and network) that are mounted under include path. Applicable only for windows sources. - SkipNestedVolumes *bool `json:"skipNestedVolumes,omitempty"` -} - -// Validate validates this physical file backup path params -func (m *PhysicalFileBackupPathParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIncludedPath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileBackupPathParams) validateIncludedPath(formats strfmt.Registry) error { - - if err := validate.Required("includedPath", "body", m.IncludedPath); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this physical file backup path params based on context it is used -func (m *PhysicalFileBackupPathParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileBackupPathParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileBackupPathParams) UnmarshalBinary(b []byte) error { - var res PhysicalFileBackupPathParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_file_protection_group_object_params.go b/v2/models/physical_file_protection_group_object_params.go deleted file mode 100644 index 65f834fe..00000000 --- a/v2/models/physical_file_protection_group_object_params.go +++ /dev/null @@ -1,171 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalFileProtectionGroupObjectParams physical file protection group object params -// -// swagger:model PhysicalFileProtectionGroupObjectParams -type PhysicalFileProtectionGroupObjectParams struct { - - // Specifies the ID of the object protected. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object protected. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies a list of file paths to be protected by this Protection Group. - FilePaths []*PhysicalFileBackupPathParams `json:"filePaths"` - - // Specifies whether path level or object level skip nested volume setting will be used. - UsesPathLevelSkipNestedVolumeSetting *bool `json:"usesPathLevelSkipNestedVolumeSetting,omitempty"` - - // Specifies mount types of nested volumes to be skipped. - NestedVolumeTypesToSkip []string `json:"nestedVolumeTypesToSkip"` - - // Specifies whether to follow NAS target pointed by symlink for windows sources. - FollowNasSymlinkTarget *bool `json:"followNasSymlinkTarget,omitempty"` - - // Specifies the path of metadatafile on source. This file contains absolute paths of files that needs to be backed up on the same source. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` - - // Specifies writer names which should be excluded from physical file based backups. - ExcludedVssWriters []string `json:"excludedVssWriters"` -} - -// Validate validates this physical file protection group object params -func (m *PhysicalFileProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilePaths(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *PhysicalFileProtectionGroupObjectParams) validateFilePaths(formats strfmt.Registry) error { - if swag.IsZero(m.FilePaths) { // not required - return nil - } - - for i := 0; i < len(m.FilePaths); i++ { - if swag.IsZero(m.FilePaths[i]) { // not required - continue - } - - if m.FilePaths[i] != nil { - if err := m.FilePaths[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this physical file protection group object params based on the context it is used -func (m *PhysicalFileProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilePaths(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *PhysicalFileProtectionGroupObjectParams) contextValidateFilePaths(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilePaths); i++ { - - if m.FilePaths[i] != nil { - - if swag.IsZero(m.FilePaths[i]) { // not required - return nil - } - - if err := m.FilePaths[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res PhysicalFileProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_file_protection_group_params.go b/v2/models/physical_file_protection_group_params.go deleted file mode 100644 index 6ec6b8e5..00000000 --- a/v2/models/physical_file_protection_group_params.go +++ /dev/null @@ -1,369 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalFileProtectionGroupParams Specifies the parameters which are specific to Physical related Protection Groups. -// -// swagger:model PhysicalFileProtectionGroupParams -type PhysicalFileProtectionGroupParams struct { - - // Specifies the list of objects protected by this Protection Group. - // Required: true - // Min Items: 1 - Objects []*PhysicalFileProtectionGroupObjectParams `json:"objects"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to perform source side deduplication on this Protection Group. - PerformSourceSideDeduplication *bool `json:"performSourceSideDeduplication,omitempty"` - - // Specifies whether or not to perform brick based deduplication on this Protection Group. - PerformBrickBasedDeduplication *bool `json:"performBrickBasedDeduplication,omitempty"` - - // Specifies the timeouts for all the objects inside this Protection Group, for both full and incremental backups. - TaskTimeouts []*CancellationTimeoutParams `json:"taskTimeouts"` - - // Specifies Whether to take app-consistent snapshots by quiescing apps and the filesystem before taking a backup. - Quiesce *bool `json:"quiesce,omitempty"` - - // Specifies whether to continue backing up on quiesce failure. - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // Specifies whether to take CoBMR backup. - CobmrBackup *bool `json:"cobmrBackup,omitempty"` - - // Specifies the pre and post script parameters associated with a protection group. - PrePostScript *PrePostScriptParams `json:"prePostScript,omitempty"` - - // Specifies ids of sources for which deduplication has to be disabled. - DedupExclusionSourceIds []int64 `json:"dedupExclusionSourceIds"` - - // Specifies global exclude filters which are applied to all sources in a job. - GlobalExcludePaths []string `json:"globalExcludePaths"` - - // Specifies global exclude filesystems which are applied to all sources in a job. - GlobalExcludeFS []string `json:"globalExcludeFS"` - - // Specifies the Errors to be ignored in error db. - IgnorableErrors []string `json:"ignorableErrors"` - - // Specifies whether or not this job can have parallel runs. - AllowParallelRuns *bool `json:"allowParallelRuns,omitempty"` - - // Specifies writer names which should be excluded from physical file based backups. - ExcludedVssWriters []string `json:"excludedVssWriters"` -} - -// Validate validates this physical file protection group params -func (m *PhysicalFileProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskTimeouts(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnorableErrors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) validateTaskTimeouts(formats strfmt.Registry) error { - if swag.IsZero(m.TaskTimeouts) { // not required - return nil - } - - for i := 0; i < len(m.TaskTimeouts); i++ { - if swag.IsZero(m.TaskTimeouts[i]) { // not required - continue - } - - if m.TaskTimeouts[i] != nil { - if err := m.TaskTimeouts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -var physicalFileProtectionGroupParamsIgnorableErrorsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kEOF","kNonExistent"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalFileProtectionGroupParamsIgnorableErrorsItemsEnum = append(physicalFileProtectionGroupParamsIgnorableErrorsItemsEnum, v) - } -} - -func (m *PhysicalFileProtectionGroupParams) validateIgnorableErrorsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalFileProtectionGroupParamsIgnorableErrorsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalFileProtectionGroupParams) validateIgnorableErrors(formats strfmt.Registry) error { - if swag.IsZero(m.IgnorableErrors) { // not required - return nil - } - - for i := 0; i < len(m.IgnorableErrors); i++ { - - // value enum - if err := m.validateIgnorableErrorsItemsEnum("ignorableErrors"+"."+strconv.Itoa(i), "body", m.IgnorableErrors[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this physical file protection group params based on the context it is used -func (m *PhysicalFileProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskTimeouts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalFileProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) contextValidateTaskTimeouts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TaskTimeouts); i++ { - - if m.TaskTimeouts[i] != nil { - - if swag.IsZero(m.TaskTimeouts[i]) { // not required - return nil - } - - if err := m.TaskTimeouts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskTimeouts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalFileProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalFileProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalFileProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res PhysicalFileProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_mount_volumes_new_target_config.go b/v2/models/physical_mount_volumes_new_target_config.go deleted file mode 100644 index 98670df2..00000000 --- a/v2/models/physical_mount_volumes_new_target_config.go +++ /dev/null @@ -1,161 +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" -) - -// PhysicalMountVolumesNewTargetConfig HyperV Mount Volumes New Target Config. -// -// Specifies the configuration for mounting volumes to a new target. -// -// swagger:model PhysicalMountVolumesNewTargetConfig -type PhysicalMountVolumesNewTargetConfig struct { - - // Specifies the target entity where the volumes are being mounted. - // Required: true - MountTarget *RecoverTarget `json:"mountTarget"` - - // Specifies credentials to access the target server. This is required if the server is of Linux OS. - ServerCredentials *Credentials `json:"serverCredentials,omitempty"` -} - -// Validate validates this physical mount volumes new target config -func (m *PhysicalMountVolumesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServerCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalMountVolumesNewTargetConfig) validateMountTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountTarget", "body", m.MountTarget); err != nil { - return err - } - - if m.MountTarget != nil { - if err := m.MountTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalMountVolumesNewTargetConfig) validateServerCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.ServerCredentials) { // not required - return nil - } - - if m.ServerCredentials != nil { - if err := m.ServerCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical mount volumes new target config based on the context it is used -func (m *PhysicalMountVolumesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateServerCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalMountVolumesNewTargetConfig) contextValidateMountTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.MountTarget != nil { - - if err := m.MountTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalMountVolumesNewTargetConfig) contextValidateServerCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.ServerCredentials != nil { - - if swag.IsZero(m.ServerCredentials) { // not required - return nil - } - - if err := m.ServerCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalMountVolumesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalMountVolumesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res PhysicalMountVolumesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_mount_volumes_original_target_config.go b/v2/models/physical_mount_volumes_original_target_config.go deleted file mode 100644 index 4a5a4ac1..00000000 --- a/v2/models/physical_mount_volumes_original_target_config.go +++ /dev/null @@ -1,111 +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" -) - -// PhysicalMountVolumesOriginalTargetConfig Physical Mount Volumes Original Target Config. -// -// Specifies the configuration for mounting volumes to the original target. -// -// swagger:model PhysicalMountVolumesOriginalTargetConfig -type PhysicalMountVolumesOriginalTargetConfig struct { - - // Specifies credentials to access the target server. This is required if the server is of Linux OS. - ServerCredentials *Credentials `json:"serverCredentials,omitempty"` -} - -// Validate validates this physical mount volumes original target config -func (m *PhysicalMountVolumesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServerCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalMountVolumesOriginalTargetConfig) validateServerCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.ServerCredentials) { // not required - return nil - } - - if m.ServerCredentials != nil { - if err := m.ServerCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical mount volumes original target config based on the context it is used -func (m *PhysicalMountVolumesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServerCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalMountVolumesOriginalTargetConfig) contextValidateServerCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.ServerCredentials != nil { - - if swag.IsZero(m.ServerCredentials) { // not required - return nil - } - - if err := m.ServerCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("serverCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("serverCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalMountVolumesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalMountVolumesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res PhysicalMountVolumesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_node_config_params.go b/v2/models/physical_node_config_params.go deleted file mode 100644 index b8d54df1..00000000 --- a/v2/models/physical_node_config_params.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" - "github.com/go-openapi/validate" -) - -// PhysicalNodeConfigParams Specifies the configuration of the nodes. -// -// swagger:model PhysicalNodeConfigParams -type PhysicalNodeConfigParams struct { - - // Specifies the node ID for this node. - // Required: true - ID *int64 `json:"id"` - - // Specifies the IP address for the node. - // Required: true - IP *string `json:"ip"` - - // Specifies whether to use the node for compute only. - IsComputeNode bool `json:"isComputeNode,omitempty"` - - // Specifies IPMI IP for the node. - IpmiIP string `json:"ipmiIp,omitempty"` -} - -// Validate validates this physical node config params -func (m *PhysicalNodeConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalNodeConfigParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *PhysicalNodeConfigParams) validateIP(formats strfmt.Registry) error { - - if err := validate.Required("ip", "body", m.IP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this physical node config params based on context it is used -func (m *PhysicalNodeConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalNodeConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalNodeConfigParams) UnmarshalBinary(b []byte) error { - var res PhysicalNodeConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_object_entity_params.go b/v2/models/physical_object_entity_params.go deleted file mode 100644 index d3e9f801..00000000 --- a/v2/models/physical_object_entity_params.go +++ /dev/null @@ -1,50 +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" -) - -// PhysicalObjectEntityParams Specifies the common parameters for physical objects. -// -// swagger:model PhysicalObjectEntityParams -type PhysicalObjectEntityParams struct { - - // Specifies if system backup was enabled for the source in a particular run. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` -} - -// Validate validates this physical object entity params -func (m *PhysicalObjectEntityParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this physical object entity params based on context it is used -func (m *PhysicalObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalObjectEntityParams) UnmarshalBinary(b []byte) error { - var res PhysicalObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_object_protection_params.go b/v2/models/physical_object_protection_params.go deleted file mode 100644 index ef0b94aa..00000000 --- a/v2/models/physical_object_protection_params.go +++ /dev/null @@ -1,214 +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" -) - -// PhysicalObjectProtectionParams Specifies the parameters specific to Physical Object Protection. -// -// swagger:model PhysicalObjectProtectionParams -type PhysicalObjectProtectionParams struct { - - // Specifies the Physical Object Protection type. - // Required: true - // Enum: ["kFile","kVolume"] - ObjectProtectionType *string `json:"objectProtectionType"` - - // file object protection type params - FileObjectProtectionTypeParams *PhysicalFileProtectionGroupParams `json:"fileObjectProtectionTypeParams,omitempty"` - - // volume object protection type params - VolumeObjectProtectionTypeParams *PhysicalVolumeProtectionGroupParams `json:"volumeObjectProtectionTypeParams,omitempty"` -} - -// Validate validates this physical object protection params -func (m *PhysicalObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeObjectProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var physicalObjectProtectionParamsTypeObjectProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalObjectProtectionParamsTypeObjectProtectionTypePropEnum = append(physicalObjectProtectionParamsTypeObjectProtectionTypePropEnum, v) - } -} - -const ( - - // PhysicalObjectProtectionParamsObjectProtectionTypeKFile captures enum value "kFile" - PhysicalObjectProtectionParamsObjectProtectionTypeKFile string = "kFile" - - // PhysicalObjectProtectionParamsObjectProtectionTypeKVolume captures enum value "kVolume" - PhysicalObjectProtectionParamsObjectProtectionTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *PhysicalObjectProtectionParams) validateObjectProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalObjectProtectionParamsTypeObjectProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalObjectProtectionParams) validateObjectProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("objectProtectionType", "body", m.ObjectProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateObjectProtectionTypeEnum("objectProtectionType", "body", *m.ObjectProtectionType); err != nil { - return err - } - - return nil -} - -func (m *PhysicalObjectProtectionParams) validateFileObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileObjectProtectionTypeParams) { // not required - return nil - } - - if m.FileObjectProtectionTypeParams != nil { - if err := m.FileObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalObjectProtectionParams) validateVolumeObjectProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeObjectProtectionTypeParams) { // not required - return nil - } - - if m.VolumeObjectProtectionTypeParams != nil { - if err := m.VolumeObjectProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical object protection params based on the context it is used -func (m *PhysicalObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolumeObjectProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalObjectProtectionParams) contextValidateFileObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileObjectProtectionTypeParams != nil { - - if swag.IsZero(m.FileObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.FileObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalObjectProtectionParams) contextValidateVolumeObjectProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeObjectProtectionTypeParams != nil { - - if swag.IsZero(m.VolumeObjectProtectionTypeParams) { // not required - return nil - } - - if err := m.VolumeObjectProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeObjectProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeObjectProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res PhysicalObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_object_protection_request_params.go b/v2/models/physical_object_protection_request_params.go deleted file mode 100644 index 0db55397..00000000 --- a/v2/models/physical_object_protection_request_params.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" -) - -// PhysicalObjectProtectionRequestParams Specifies the request parameters specific to Physical object protection. -// -// swagger:model PhysicalObjectProtectionRequestParams -type PhysicalObjectProtectionRequestParams struct { - PhysicalObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PhysicalObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PhysicalObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PhysicalObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PhysicalObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.PhysicalObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this physical object protection request params -func (m *PhysicalObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this physical object protection request params based on the context it is used -func (m *PhysicalObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res PhysicalObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_object_protection_response_params.go b/v2/models/physical_object_protection_response_params.go deleted file mode 100644 index 9ceaf5ac..00000000 --- a/v2/models/physical_object_protection_response_params.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" -) - -// PhysicalObjectProtectionResponseParams Specifies the response parameters specific to Physical object protection. -// -// swagger:model PhysicalObjectProtectionResponseParams -type PhysicalObjectProtectionResponseParams struct { - PhysicalObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PhysicalObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PhysicalObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PhysicalObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PhysicalObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.PhysicalObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this physical object protection response params -func (m *PhysicalObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this physical object protection response params based on the context it is used -func (m *PhysicalObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res PhysicalObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_object_protection_update_request_params.go b/v2/models/physical_object_protection_update_request_params.go deleted file mode 100644 index 1d39b1e7..00000000 --- a/v2/models/physical_object_protection_update_request_params.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" -) - -// PhysicalObjectProtectionUpdateRequestParams Specifies the update parameters specific to Physical object protection. -// -// swagger:model PhysicalObjectProtectionUpdateRequestParams -type PhysicalObjectProtectionUpdateRequestParams struct { - PhysicalObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PhysicalObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PhysicalObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PhysicalObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PhysicalObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.PhysicalObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this physical object protection update request params -func (m *PhysicalObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this physical object protection update request params based on the context it is used -func (m *PhysicalObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalObjectProtectionParams - if err := m.PhysicalObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res PhysicalObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_protection_group_params.go b/v2/models/physical_protection_group_params.go deleted file mode 100644 index 8557fda4..00000000 --- a/v2/models/physical_protection_group_params.go +++ /dev/null @@ -1,216 +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" -) - -// PhysicalProtectionGroupParams Physical Protection Group Params. -// -// Specifies the parameters specific to Physical Protection Group. -// -// swagger:model PhysicalProtectionGroupParams -type PhysicalProtectionGroupParams struct { - - // Specifies the Physical Protection Group type. - // Required: true - // Enum: ["kFile","kVolume"] - ProtectionType *string `json:"protectionType"` - - // Specifies the Volume based Physical Protection Group params. - VolumeProtectionTypeParams *PhysicalVolumeProtectionGroupParams `json:"volumeProtectionTypeParams,omitempty"` - - // Specifies the File based Physical Protection Group params. - FileProtectionTypeParams *PhysicalFileProtectionGroupParams `json:"fileProtectionTypeParams,omitempty"` -} - -// Validate validates this physical protection group params -func (m *PhysicalProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolumeProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileProtectionTypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var physicalProtectionGroupParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalProtectionGroupParamsTypeProtectionTypePropEnum = append(physicalProtectionGroupParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // PhysicalProtectionGroupParamsProtectionTypeKFile captures enum value "kFile" - PhysicalProtectionGroupParamsProtectionTypeKFile string = "kFile" - - // PhysicalProtectionGroupParamsProtectionTypeKVolume captures enum value "kVolume" - PhysicalProtectionGroupParamsProtectionTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *PhysicalProtectionGroupParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalProtectionGroupParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalProtectionGroupParams) validateProtectionType(formats strfmt.Registry) error { - - if err := validate.Required("protectionType", "body", m.ProtectionType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -func (m *PhysicalProtectionGroupParams) validateVolumeProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeProtectionTypeParams) { // not required - return nil - } - - if m.VolumeProtectionTypeParams != nil { - if err := m.VolumeProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalProtectionGroupParams) validateFileProtectionTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FileProtectionTypeParams) { // not required - return nil - } - - if m.FileProtectionTypeParams != nil { - if err := m.FileProtectionTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileProtectionTypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical protection group params based on the context it is used -func (m *PhysicalProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileProtectionTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalProtectionGroupParams) contextValidateVolumeProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VolumeProtectionTypeParams != nil { - - if swag.IsZero(m.VolumeProtectionTypeParams) { // not required - return nil - } - - if err := m.VolumeProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeProtectionTypeParams") - } - return err - } - } - - return nil -} - -func (m *PhysicalProtectionGroupParams) contextValidateFileProtectionTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileProtectionTypeParams != nil { - - if swag.IsZero(m.FileProtectionTypeParams) { // not required - return nil - } - - if err := m.FileProtectionTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileProtectionTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileProtectionTypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res PhysicalProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_snapshot_params.go b/v2/models/physical_snapshot_params.go deleted file mode 100644 index 2e699386..00000000 --- a/v2/models/physical_snapshot_params.go +++ /dev/null @@ -1,108 +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" -) - -// PhysicalSnapshotParams Specifies parameters of Physical type snapshots. -// -// swagger:model PhysicalSnapshotParams -type PhysicalSnapshotParams struct { - - // Specifies the protection type of Physical snapshots. - // Enum: ["kFile","kVolume"] - ProtectionType *string `json:"protectionType,omitempty"` - - // Specifies if system backup was enabled for the source in that particular run. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` -} - -// Validate validates this physical snapshot params -func (m *PhysicalSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var physicalSnapshotParamsTypeProtectionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalSnapshotParamsTypeProtectionTypePropEnum = append(physicalSnapshotParamsTypeProtectionTypePropEnum, v) - } -} - -const ( - - // PhysicalSnapshotParamsProtectionTypeKFile captures enum value "kFile" - PhysicalSnapshotParamsProtectionTypeKFile string = "kFile" - - // PhysicalSnapshotParamsProtectionTypeKVolume captures enum value "kVolume" - PhysicalSnapshotParamsProtectionTypeKVolume string = "kVolume" -) - -// prop value enum -func (m *PhysicalSnapshotParams) validateProtectionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalSnapshotParamsTypeProtectionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalSnapshotParams) validateProtectionType(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionType) { // not required - return nil - } - - // value enum - if err := m.validateProtectionTypeEnum("protectionType", "body", *m.ProtectionType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this physical snapshot params based on context it is used -func (m *PhysicalSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalSnapshotParams) UnmarshalBinary(b []byte) error { - var res PhysicalSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_source_registration_params.go b/v2/models/physical_source_registration_params.go deleted file mode 100644 index e8398d10..00000000 --- a/v2/models/physical_source_registration_params.go +++ /dev/null @@ -1,248 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalSourceRegistrationParams Register physical sever request parameters. -// -// Specifies parameters to register physical server. -// -// swagger:model PhysicalSourceRegistrationParams -type PhysicalSourceRegistrationParams struct { - - // Specifies the endpoint IPaddress, URL or hostname of the physical host. - // Required: true - Endpoint *string `json:"endpoint"` - - // The agent running on a physical host will fail the registration if it is already registered as part of another cluster. By setting this option to true, agent can be forced to register with the current cluster. - ForceRegister *bool `json:"forceRegister,omitempty"` - - // Specifies the type of host. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"] - HostType *string `json:"hostType,omitempty"` - - // Specifies the type of physical server. - // Enum: ["kGroup","kHost","kWindowsCluster","kOracleRACCluster","kOracleAPCluster"] - PhysicalType *string `json:"physicalType,omitempty"` - - // Specifies the list of applications to be registered with Physical Source. - Applications []string `json:"applications"` -} - -// Validate validates this physical source registration params -func (m *PhysicalSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateApplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalSourceRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -var physicalSourceRegistrationParamsTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalSourceRegistrationParamsTypeHostTypePropEnum = append(physicalSourceRegistrationParamsTypeHostTypePropEnum, v) - } -} - -const ( - - // PhysicalSourceRegistrationParamsHostTypeKLinux captures enum value "kLinux" - PhysicalSourceRegistrationParamsHostTypeKLinux string = "kLinux" - - // PhysicalSourceRegistrationParamsHostTypeKWindows captures enum value "kWindows" - PhysicalSourceRegistrationParamsHostTypeKWindows string = "kWindows" - - // PhysicalSourceRegistrationParamsHostTypeKAix captures enum value "kAix" - PhysicalSourceRegistrationParamsHostTypeKAix string = "kAix" - - // PhysicalSourceRegistrationParamsHostTypeKSolaris captures enum value "kSolaris" - PhysicalSourceRegistrationParamsHostTypeKSolaris string = "kSolaris" - - // PhysicalSourceRegistrationParamsHostTypeKSapHana captures enum value "kSapHana" - PhysicalSourceRegistrationParamsHostTypeKSapHana string = "kSapHana" - - // PhysicalSourceRegistrationParamsHostTypeKOther captures enum value "kOther" - PhysicalSourceRegistrationParamsHostTypeKOther string = "kOther" - - // PhysicalSourceRegistrationParamsHostTypeKHPUX captures enum value "kHPUX" - PhysicalSourceRegistrationParamsHostTypeKHPUX string = "kHPUX" - - // PhysicalSourceRegistrationParamsHostTypeKVOS captures enum value "kVOS" - PhysicalSourceRegistrationParamsHostTypeKVOS string = "kVOS" -) - -// prop value enum -func (m *PhysicalSourceRegistrationParams) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalSourceRegistrationParamsTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalSourceRegistrationParams) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -var physicalSourceRegistrationParamsTypePhysicalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGroup","kHost","kWindowsCluster","kOracleRACCluster","kOracleAPCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalSourceRegistrationParamsTypePhysicalTypePropEnum = append(physicalSourceRegistrationParamsTypePhysicalTypePropEnum, v) - } -} - -const ( - - // PhysicalSourceRegistrationParamsPhysicalTypeKGroup captures enum value "kGroup" - PhysicalSourceRegistrationParamsPhysicalTypeKGroup string = "kGroup" - - // PhysicalSourceRegistrationParamsPhysicalTypeKHost captures enum value "kHost" - PhysicalSourceRegistrationParamsPhysicalTypeKHost string = "kHost" - - // PhysicalSourceRegistrationParamsPhysicalTypeKWindowsCluster captures enum value "kWindowsCluster" - PhysicalSourceRegistrationParamsPhysicalTypeKWindowsCluster string = "kWindowsCluster" - - // PhysicalSourceRegistrationParamsPhysicalTypeKOracleRACCluster captures enum value "kOracleRACCluster" - PhysicalSourceRegistrationParamsPhysicalTypeKOracleRACCluster string = "kOracleRACCluster" - - // PhysicalSourceRegistrationParamsPhysicalTypeKOracleAPCluster captures enum value "kOracleAPCluster" - PhysicalSourceRegistrationParamsPhysicalTypeKOracleAPCluster string = "kOracleAPCluster" -) - -// prop value enum -func (m *PhysicalSourceRegistrationParams) validatePhysicalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalSourceRegistrationParamsTypePhysicalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalSourceRegistrationParams) validatePhysicalType(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalType) { // not required - return nil - } - - // value enum - if err := m.validatePhysicalTypeEnum("physicalType", "body", *m.PhysicalType); err != nil { - return err - } - - return nil -} - -var physicalSourceRegistrationParamsApplicationsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalSourceRegistrationParamsApplicationsItemsEnum = append(physicalSourceRegistrationParamsApplicationsItemsEnum, v) - } -} - -func (m *PhysicalSourceRegistrationParams) validateApplicationsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalSourceRegistrationParamsApplicationsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalSourceRegistrationParams) validateApplications(formats strfmt.Registry) error { - if swag.IsZero(m.Applications) { // not required - return nil - } - - for i := 0; i < len(m.Applications); i++ { - - // value enum - if err := m.validateApplicationsItemsEnum("applications"+"."+strconv.Itoa(i), "body", m.Applications[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this physical source registration params based on context it is used -func (m *PhysicalSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res PhysicalSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_target_params_for_mount_volume.go b/v2/models/physical_target_params_for_mount_volume.go deleted file mode 100644 index 9c667a65..00000000 --- a/v2/models/physical_target_params_for_mount_volume.go +++ /dev/null @@ -1,305 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalTargetParamsForMountVolume Physical Recovery Target Params -// -// Specifies the parameters for a physical recovery target. -// -// swagger:model PhysicalTargetParamsForMountVolume -type PhysicalTargetParamsForMountVolume struct { - - // Specifies whether to mount to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - MountToOriginalTarget *bool `json:"mountToOriginalTarget"` - - // Specifies whether to perform a read-only mount. Default is false. - ReadOnlyMount *bool `json:"readOnlyMount,omitempty"` - - // Specifies the names of volumes that need to be mounted. If this is not specified then all volumes that are part of the source VM will be mounted on the target VM. - VolumeNames []string `json:"volumeNames"` - - // Specifies the mapping of original volumes and mounted volumes - // Read Only: true - MountedVolumeMapping []*MountedVolumeMapping `json:"mountedVolumeMapping"` - - // Specifies the configuration for mounting to a new target. - NewTargetConfig *PhysicalMountVolumesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for mounting to the original target. - OriginalTargetConfig *PhysicalMountVolumesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this physical target params for mount volume -func (m *PhysicalTargetParamsForMountVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountedVolumeMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) validateMountToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountToOriginalTarget", "body", m.MountToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) validateMountedVolumeMapping(formats strfmt.Registry) error { - if swag.IsZero(m.MountedVolumeMapping) { // not required - return nil - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - continue - } - - if m.MountedVolumeMapping[i] != nil { - if err := m.MountedVolumeMapping[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical target params for mount volume based on the context it is used -func (m *PhysicalTargetParamsForMountVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountedVolumeMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) contextValidateMountedVolumeMapping(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "mountedVolumeMapping", "body", []*MountedVolumeMapping(m.MountedVolumeMapping)); err != nil { - return err - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - - if m.MountedVolumeMapping[i] != nil { - - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - return nil - } - - if err := m.MountedVolumeMapping[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForMountVolume) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalTargetParamsForMountVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalTargetParamsForMountVolume) UnmarshalBinary(b []byte) error { - var res PhysicalTargetParamsForMountVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_target_params_for_recover_file_and_folder.go b/v2/models/physical_target_params_for_recover_file_and_folder.go deleted file mode 100644 index d2eb1aac..00000000 --- a/v2/models/physical_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,236 +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" -) - -// PhysicalTargetParamsForRecoverFileAndFolder Physical Target Params for Recover File And Folder -// -// Specifies the parameters for a Physical recovery target. -// -// swagger:model PhysicalTargetParamsForRecoverFileAndFolder -type PhysicalTargetParamsForRecoverFileAndFolder struct { - - // If this is true, then files will be restored to original paths. - RestoreToOriginalPaths *bool `json:"restoreToOriginalPaths,omitempty"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies the directory path where restore should happen if restore_to_original_paths is set to false. - AlternateRestoreDirectory *string `json:"alternateRestoreDirectory,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Whether to preserve the original time stamps. - PreserveTimestamps *bool `json:"preserveTimestamps,omitempty"` - - // Whether to preserve the ACLs of the original file. - PreserveAcls *bool `json:"preserveAcls,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to save success files or not. Default value is false - SaveSuccessFiles *bool `json:"saveSuccessFiles,omitempty"` - - // Specifies the restore type (restore everything or ACLs only) when restoring or downloading files or folders from a Physical file based or block based backup snapshot. - // Enum: ["kRegular","kACLOnly"] - RestoreEntityType *string `json:"restoreEntityType,omitempty"` - - // Specifies the target entity where the volumes are being mounted. - // Required: true - RecoverTarget *RecoverTarget `json:"recoverTarget"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this physical target params for recover file and folder -func (m *PhysicalTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRestoreEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var physicalTargetParamsForRecoverFileAndFolderTypeRestoreEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kACLOnly"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - physicalTargetParamsForRecoverFileAndFolderTypeRestoreEntityTypePropEnum = append(physicalTargetParamsForRecoverFileAndFolderTypeRestoreEntityTypePropEnum, v) - } -} - -const ( - - // PhysicalTargetParamsForRecoverFileAndFolderRestoreEntityTypeKRegular captures enum value "kRegular" - PhysicalTargetParamsForRecoverFileAndFolderRestoreEntityTypeKRegular string = "kRegular" - - // PhysicalTargetParamsForRecoverFileAndFolderRestoreEntityTypeKACLOnly captures enum value "kACLOnly" - PhysicalTargetParamsForRecoverFileAndFolderRestoreEntityTypeKACLOnly string = "kACLOnly" -) - -// prop value enum -func (m *PhysicalTargetParamsForRecoverFileAndFolder) validateRestoreEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, physicalTargetParamsForRecoverFileAndFolderTypeRestoreEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PhysicalTargetParamsForRecoverFileAndFolder) validateRestoreEntityType(formats strfmt.Registry) error { - if swag.IsZero(m.RestoreEntityType) { // not required - return nil - } - - // value enum - if err := m.validateRestoreEntityTypeEnum("restoreEntityType", "body", *m.RestoreEntityType); err != nil { - return err - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverFileAndFolder) validateRecoverTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverTarget", "body", m.RecoverTarget); err != nil { - return err - } - - if m.RecoverTarget != nil { - if err := m.RecoverTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical target params for recover file and folder based on the context it is used -func (m *PhysicalTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalTargetParamsForRecoverFileAndFolder) contextValidateRecoverTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverTarget != nil { - - if err := m.RecoverTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res PhysicalTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_target_params_for_recover_volume.go b/v2/models/physical_target_params_for_recover_volume.go deleted file mode 100644 index ce80b129..00000000 --- a/v2/models/physical_target_params_for_recover_volume.go +++ /dev/null @@ -1,229 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalTargetParamsForRecoverVolume Physical Recovery Target Params -// -// Specifies the parameters for a physical recovery target. -// -// swagger:model PhysicalTargetParamsForRecoverVolume -type PhysicalTargetParamsForRecoverVolume struct { - - // Specifies the mapping from source volumes to destination volumes. - // Required: true - VolumeMapping []*RecoverVolumeMapping `json:"volumeMapping"` - - // Specifies whether volume would be dismounted first during LockVolume failure. If not specified, default is false. - ForceUnmountVolume *bool `json:"forceUnmountVolume,omitempty"` - - // Specifies the target entity where the volumes are being mounted. - // Required: true - MountTarget *RecoveryObjectIdentifier `json:"mountTarget"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this physical target params for recover volume -func (m *PhysicalTargetParamsForRecoverVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) validateVolumeMapping(formats strfmt.Registry) error { - - if err := validate.Required("volumeMapping", "body", m.VolumeMapping); err != nil { - return err - } - - for i := 0; i < len(m.VolumeMapping); i++ { - if swag.IsZero(m.VolumeMapping[i]) { // not required - continue - } - - if m.VolumeMapping[i] != nil { - if err := m.VolumeMapping[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) validateMountTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountTarget", "body", m.MountTarget); err != nil { - return err - } - - if m.MountTarget != nil { - if err := m.MountTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical target params for recover volume based on the context it is used -func (m *PhysicalTargetParamsForRecoverVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumeMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) contextValidateVolumeMapping(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VolumeMapping); i++ { - - if m.VolumeMapping[i] != nil { - - if swag.IsZero(m.VolumeMapping[i]) { // not required - return nil - } - - if err := m.VolumeMapping[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) contextValidateMountTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.MountTarget != nil { - - if err := m.MountTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *PhysicalTargetParamsForRecoverVolume) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalTargetParamsForRecoverVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalTargetParamsForRecoverVolume) UnmarshalBinary(b []byte) error { - var res PhysicalTargetParamsForRecoverVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_volume_protection_group_object_params.go b/v2/models/physical_volume_protection_group_object_params.go deleted file mode 100644 index e91c61d4..00000000 --- a/v2/models/physical_volume_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// PhysicalVolumeProtectionGroupObjectParams Specifies object parameters for creating physical volume Protection Groups. -// -// swagger:model PhysicalVolumeProtectionGroupObjectParams -type PhysicalVolumeProtectionGroupObjectParams struct { - - // Specifies the ID of the object protected. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object protected. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the list of GUIDs of volumes protected. If empty, then all volumes will be protected by default. - VolumeGuids []string `json:"volumeGuids"` - - // Specifies whether or not to take a system backup. Applicable only for windows sources. - EnableSystemBackup *bool `json:"enableSystemBackup,omitempty"` - - // Specifies writer names which should be excluded from physical volume based backups for a given source. - ExcludedVssWriters []string `json:"excludedVssWriters"` -} - -// Validate validates this physical volume protection group object params -func (m *PhysicalVolumeProtectionGroupObjectParams) 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 *PhysicalVolumeProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this physical volume protection group object params based on the context it is used -func (m *PhysicalVolumeProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalVolumeProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalVolumeProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalVolumeProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res PhysicalVolumeProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/physical_volume_protection_group_params.go b/v2/models/physical_volume_protection_group_params.go deleted file mode 100644 index 7829099b..00000000 --- a/v2/models/physical_volume_protection_group_params.go +++ /dev/null @@ -1,254 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PhysicalVolumeProtectionGroupParams Specifies the parameters which are specific to Volume based physical Protection Groups. -// -// swagger:model PhysicalVolumeProtectionGroupParams -type PhysicalVolumeProtectionGroupParams struct { - - // objects - // Required: true - // Min Items: 1 - Objects []*PhysicalVolumeProtectionGroupObjectParams `json:"objects"` - - // Specifies the fields required to enable indexing of the protected objects such as files and directories. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to perform source side deduplication on this Protection Group. - PerformSourceSideDeduplication *bool `json:"performSourceSideDeduplication,omitempty"` - - // Specifies Whether to take app-consistent snapshots by quiescing apps and the filesystem before taking a backup - Quiesce *bool `json:"quiesce,omitempty"` - - // Specifies whether to continue backing up on quiesce failure - ContinueOnQuiesceFailure *bool `json:"continueOnQuiesceFailure,omitempty"` - - // Specifies whether or not to perform an incremental backup after the server restarts. This is applicable to windows environments. - IncrementalBackupAfterRestart *bool `json:"incrementalBackupAfterRestart,omitempty"` - - // Specifies the pre and post script parameters associated with a protection group. - PrePostScript *PrePostScriptParams `json:"prePostScript,omitempty"` - - // Specifies ids of sources for which deduplication has to be disabled. - DedupExclusionSourceIds []int64 `json:"dedupExclusionSourceIds"` - - // Specifies writer names which should be excluded from physical volume based backups. - ExcludedVssWriters []string `json:"excludedVssWriters"` - - // Specifies whether to take a CoBMR backup. - CobmrBackup *bool `json:"cobmrBackup,omitempty"` -} - -// Validate validates this physical volume protection group params -func (m *PhysicalVolumeProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this physical volume protection group params based on the context it is used -func (m *PhysicalVolumeProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *PhysicalVolumeProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalVolumeProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalVolumeProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res PhysicalVolumeProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/planned_failover_params.go b/v2/models/planned_failover_params.go deleted file mode 100644 index 5efd5480..00000000 --- a/v2/models/planned_failover_params.go +++ /dev/null @@ -1,163 +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" -) - -// PlannedFailoverParams Specifies parameters of a planned failover. -// -// swagger:model PlannedFailoverParams -type PlannedFailoverParams struct { - - // Spcifies the planned failover type.
'Prepare' indicates this is a preparation for failover.
'Finalize' indicates this is finalization of failover. After this is done, the view can be used as source view. - // Required: true - // Enum: ["Prepare","Finalize"] - Type *string `json:"type"` - - // Specifies parameters of preparation of a planned failover. - PreparePlannedFailverParams *PreparePlannedFailverParams `json:"preparePlannedFailverParams,omitempty"` -} - -// Validate validates this planned failover params -func (m *PlannedFailoverParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreparePlannedFailverParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var plannedFailoverParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Prepare","Finalize"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - plannedFailoverParamsTypeTypePropEnum = append(plannedFailoverParamsTypeTypePropEnum, v) - } -} - -const ( - - // PlannedFailoverParamsTypePrepare captures enum value "Prepare" - PlannedFailoverParamsTypePrepare string = "Prepare" - - // PlannedFailoverParamsTypeFinalize captures enum value "Finalize" - PlannedFailoverParamsTypeFinalize string = "Finalize" -) - -// prop value enum -func (m *PlannedFailoverParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, plannedFailoverParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PlannedFailoverParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *PlannedFailoverParams) validatePreparePlannedFailverParams(formats strfmt.Registry) error { - if swag.IsZero(m.PreparePlannedFailverParams) { // not required - return nil - } - - if m.PreparePlannedFailverParams != nil { - if err := m.PreparePlannedFailverParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preparePlannedFailverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preparePlannedFailverParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this planned failover params based on the context it is used -func (m *PlannedFailoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreparePlannedFailverParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PlannedFailoverParams) contextValidatePreparePlannedFailverParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PreparePlannedFailverParams != nil { - - if swag.IsZero(m.PreparePlannedFailverParams) { // not required - return nil - } - - if err := m.PreparePlannedFailverParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preparePlannedFailverParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preparePlannedFailverParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PlannedFailoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PlannedFailoverParams) UnmarshalBinary(b []byte) error { - var res PlannedFailoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/planned_run_poll_status.go b/v2/models/planned_run_poll_status.go deleted file mode 100644 index d7754d1e..00000000 --- a/v2/models/planned_run_poll_status.go +++ /dev/null @@ -1,227 +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" -) - -// PlannedRunPollStatus Specifies whether run has been scheduled or not and also returns the unique run id along with failoverId upon scheduling the run. -// -// swagger:model PlannedRunPollStatus -type PlannedRunPollStatus struct { - - // Specifies the unique failover Id which will be generated by orchestrator. This Id will be used to uniquely identify current failover operation. - FailoverID *string `json:"failoverId,omitempty"` - - // If cancelNonFailoverRuns was passed as true during creation of run for current failover then this will return the status of other run cacellations. If other runs are still pending for cancellations then this will be returned as true otherwise it will be return as false. - WaitingOnOtherRunCancellations *bool `json:"waitingOnOtherRunCancellations,omitempty"` - - // If run has been scheduled then this field will be populated with unique run id. - RunID *string `json:"runId,omitempty"` - - // Specifies the protection group id to which this run belongs. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Status of the backup job. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - BackupTaskStatus *string `json:"backupTaskStatus,omitempty"` - - // Status of the OnPrem deploy task. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - OnPremDeployTaskStatus *string `json:"onPremDeployTaskStatus,omitempty"` -} - -// Validate validates this planned run poll status -func (m *PlannedRunPollStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupTaskStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnPremDeployTaskStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var plannedRunPollStatusTypeBackupTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - plannedRunPollStatusTypeBackupTaskStatusPropEnum = append(plannedRunPollStatusTypeBackupTaskStatusPropEnum, v) - } -} - -const ( - - // PlannedRunPollStatusBackupTaskStatusAccepted captures enum value "Accepted" - PlannedRunPollStatusBackupTaskStatusAccepted string = "Accepted" - - // PlannedRunPollStatusBackupTaskStatusRunning captures enum value "Running" - PlannedRunPollStatusBackupTaskStatusRunning string = "Running" - - // PlannedRunPollStatusBackupTaskStatusCanceled captures enum value "Canceled" - PlannedRunPollStatusBackupTaskStatusCanceled string = "Canceled" - - // PlannedRunPollStatusBackupTaskStatusCanceling captures enum value "Canceling" - PlannedRunPollStatusBackupTaskStatusCanceling string = "Canceling" - - // PlannedRunPollStatusBackupTaskStatusFailed captures enum value "Failed" - PlannedRunPollStatusBackupTaskStatusFailed string = "Failed" - - // PlannedRunPollStatusBackupTaskStatusMissed captures enum value "Missed" - PlannedRunPollStatusBackupTaskStatusMissed string = "Missed" - - // PlannedRunPollStatusBackupTaskStatusSucceeded captures enum value "Succeeded" - PlannedRunPollStatusBackupTaskStatusSucceeded string = "Succeeded" - - // PlannedRunPollStatusBackupTaskStatusSucceededWithWarning captures enum value "SucceededWithWarning" - PlannedRunPollStatusBackupTaskStatusSucceededWithWarning string = "SucceededWithWarning" - - // PlannedRunPollStatusBackupTaskStatusOnHold captures enum value "OnHold" - PlannedRunPollStatusBackupTaskStatusOnHold string = "OnHold" - - // PlannedRunPollStatusBackupTaskStatusFinalizing captures enum value "Finalizing" - PlannedRunPollStatusBackupTaskStatusFinalizing string = "Finalizing" - - // PlannedRunPollStatusBackupTaskStatusSkipped captures enum value "Skipped" - PlannedRunPollStatusBackupTaskStatusSkipped string = "Skipped" - - // PlannedRunPollStatusBackupTaskStatusPaused captures enum value "Paused" - PlannedRunPollStatusBackupTaskStatusPaused string = "Paused" -) - -// prop value enum -func (m *PlannedRunPollStatus) validateBackupTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, plannedRunPollStatusTypeBackupTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PlannedRunPollStatus) validateBackupTaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.BackupTaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateBackupTaskStatusEnum("backupTaskStatus", "body", *m.BackupTaskStatus); err != nil { - return err - } - - return nil -} - -var plannedRunPollStatusTypeOnPremDeployTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - plannedRunPollStatusTypeOnPremDeployTaskStatusPropEnum = append(plannedRunPollStatusTypeOnPremDeployTaskStatusPropEnum, v) - } -} - -const ( - - // PlannedRunPollStatusOnPremDeployTaskStatusAccepted captures enum value "Accepted" - PlannedRunPollStatusOnPremDeployTaskStatusAccepted string = "Accepted" - - // PlannedRunPollStatusOnPremDeployTaskStatusRunning captures enum value "Running" - PlannedRunPollStatusOnPremDeployTaskStatusRunning string = "Running" - - // PlannedRunPollStatusOnPremDeployTaskStatusCanceled captures enum value "Canceled" - PlannedRunPollStatusOnPremDeployTaskStatusCanceled string = "Canceled" - - // PlannedRunPollStatusOnPremDeployTaskStatusCanceling captures enum value "Canceling" - PlannedRunPollStatusOnPremDeployTaskStatusCanceling string = "Canceling" - - // PlannedRunPollStatusOnPremDeployTaskStatusFailed captures enum value "Failed" - PlannedRunPollStatusOnPremDeployTaskStatusFailed string = "Failed" - - // PlannedRunPollStatusOnPremDeployTaskStatusMissed captures enum value "Missed" - PlannedRunPollStatusOnPremDeployTaskStatusMissed string = "Missed" - - // PlannedRunPollStatusOnPremDeployTaskStatusSucceeded captures enum value "Succeeded" - PlannedRunPollStatusOnPremDeployTaskStatusSucceeded string = "Succeeded" - - // PlannedRunPollStatusOnPremDeployTaskStatusSucceededWithWarning captures enum value "SucceededWithWarning" - PlannedRunPollStatusOnPremDeployTaskStatusSucceededWithWarning string = "SucceededWithWarning" - - // PlannedRunPollStatusOnPremDeployTaskStatusOnHold captures enum value "OnHold" - PlannedRunPollStatusOnPremDeployTaskStatusOnHold string = "OnHold" - - // PlannedRunPollStatusOnPremDeployTaskStatusFinalizing captures enum value "Finalizing" - PlannedRunPollStatusOnPremDeployTaskStatusFinalizing string = "Finalizing" - - // PlannedRunPollStatusOnPremDeployTaskStatusSkipped captures enum value "Skipped" - PlannedRunPollStatusOnPremDeployTaskStatusSkipped string = "Skipped" - - // PlannedRunPollStatusOnPremDeployTaskStatusPaused captures enum value "Paused" - PlannedRunPollStatusOnPremDeployTaskStatusPaused string = "Paused" -) - -// prop value enum -func (m *PlannedRunPollStatus) validateOnPremDeployTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, plannedRunPollStatusTypeOnPremDeployTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PlannedRunPollStatus) validateOnPremDeployTaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.OnPremDeployTaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateOnPremDeployTaskStatusEnum("onPremDeployTaskStatus", "body", *m.OnPremDeployTaskStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this planned run poll status based on context it is used -func (m *PlannedRunPollStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PlannedRunPollStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PlannedRunPollStatus) UnmarshalBinary(b []byte) error { - var res PlannedRunPollStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pluggable_database_info.go b/v2/models/pluggable_database_info.go deleted file mode 100644 index 6d4c399b..00000000 --- a/v2/models/pluggable_database_info.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" -) - -// PluggableDatabaseInfo Specifies the information about Pluggable databases. -// -// swagger:model PluggableDatabaseInfo -type PluggableDatabaseInfo struct { - - // Specifies the database Id of the Pluggable DB. - DatabaseID *string `json:"databaseId,omitempty"` - - // Specifies the name of the Pluggable DB. - DatabaseName *string `json:"databaseName,omitempty"` -} - -// Validate validates this pluggable database info -func (m *PluggableDatabaseInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pluggable database info based on context it is used -func (m *PluggableDatabaseInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PluggableDatabaseInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PluggableDatabaseInfo) UnmarshalBinary(b []byte) error { - var res PluggableDatabaseInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/policy_config.go b/v2/models/policy_config.go deleted file mode 100644 index d65d685a..00000000 --- a/v2/models/policy_config.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PolicyConfig Policy Config -// -// Specifies the policy configuration for protecting an object. -// -// swagger:model PolicyConfig -type PolicyConfig struct { - - // Specifies the list of protection policies for protecting an object with multiple policies. - // Min Items: 1 - // Unique: true - Policies []*ObjectPolicy `json:"policies"` -} - -// Validate validates this policy config -func (m *PolicyConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PolicyConfig) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - iPoliciesSize := int64(len(m.Policies)) - - if err := validate.MinItems("policies", "body", iPoliciesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("policies", "body", m.Policies); err != nil { - return err - } - - for i := 0; i < len(m.Policies); i++ { - if swag.IsZero(m.Policies[i]) { // not required - continue - } - - if m.Policies[i] != nil { - if err := m.Policies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this policy config based on the context it is used -func (m *PolicyConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PolicyConfig) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Policies); i++ { - - if m.Policies[i] != nil { - - if swag.IsZero(m.Policies[i]) { // not required - return nil - } - - if err := m.Policies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PolicyConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PolicyConfig) UnmarshalBinary(b []byte) error { - var res PolicyConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/policy_scheduled_backup.go b/v2/models/policy_scheduled_backup.go deleted file mode 100644 index f38aac5e..00000000 --- a/v2/models/policy_scheduled_backup.go +++ /dev/null @@ -1,113 +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" -) - -// PolicyScheduledBackup Policy Scheduled Backup type. -// -// Policy Scheduled Backup type. -// -// swagger:model PolicyScheduledBackup -type PolicyScheduledBackup struct { - - // Specifies Scheduled Backup type. - // Enum: ["Regular","Full","Log","System"] - PolicyScheduledBackup string `json:"PolicyScheduledBackup,omitempty"` -} - -// Validate validates this policy scheduled backup -func (m *PolicyScheduledBackup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicyScheduledBackup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var policyScheduledBackupTypePolicyScheduledBackupPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Regular","Full","Log","System"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - policyScheduledBackupTypePolicyScheduledBackupPropEnum = append(policyScheduledBackupTypePolicyScheduledBackupPropEnum, v) - } -} - -const ( - - // PolicyScheduledBackupPolicyScheduledBackupRegular captures enum value "Regular" - PolicyScheduledBackupPolicyScheduledBackupRegular string = "Regular" - - // PolicyScheduledBackupPolicyScheduledBackupFull captures enum value "Full" - PolicyScheduledBackupPolicyScheduledBackupFull string = "Full" - - // PolicyScheduledBackupPolicyScheduledBackupLog captures enum value "Log" - PolicyScheduledBackupPolicyScheduledBackupLog string = "Log" - - // PolicyScheduledBackupPolicyScheduledBackupSystem captures enum value "System" - PolicyScheduledBackupPolicyScheduledBackupSystem string = "System" -) - -// prop value enum -func (m *PolicyScheduledBackup) validatePolicyScheduledBackupEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, policyScheduledBackupTypePolicyScheduledBackupPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PolicyScheduledBackup) validatePolicyScheduledBackup(formats strfmt.Registry) error { - if swag.IsZero(m.PolicyScheduledBackup) { // not required - return nil - } - - // value enum - if err := m.validatePolicyScheduledBackupEnum("PolicyScheduledBackup", "body", m.PolicyScheduledBackup); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this policy scheduled backup based on context it is used -func (m *PolicyScheduledBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PolicyScheduledBackup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PolicyScheduledBackup) UnmarshalBinary(b []byte) error { - var res PolicyScheduledBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/policy_template_response.go b/v2/models/policy_template_response.go deleted file mode 100644 index 8591fbdb..00000000 --- a/v2/models/policy_template_response.go +++ /dev/null @@ -1,141 +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" -) - -// PolicyTemplateResponse Protection Policy -// -// Specifies the details about the Protection Policy. -// -// swagger:model PolicyTemplateResponse -type PolicyTemplateResponse struct { - ProtectionPolicy - - // Specifies a unique Policy id assigned by the Cohesity Cluster. - ID *string `json:"id,omitempty"` - - // Specifies the number of policies linked to this policy template. Only applicable in case of policy template. - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - // This field is set to true if this policy template qualifies to create more policies. If the template is partially filled and can not create a working policy then this field will be set to false. - IsUsable *bool `json:"isUsable,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PolicyTemplateResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionPolicy = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - IsUsable *bool `json:"isUsable,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.NumLinkedPolicies = dataAO1.NumLinkedPolicies - - m.IsUsable = dataAO1.IsUsable - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PolicyTemplateResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - NumLinkedPolicies *int64 `json:"numLinkedPolicies,omitempty"` - - IsUsable *bool `json:"isUsable,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.NumLinkedPolicies = m.NumLinkedPolicies - - dataAO1.IsUsable = m.IsUsable - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this policy template response -func (m *PolicyTemplateResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this policy template response based on the context it is used -func (m *PolicyTemplateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PolicyTemplateResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PolicyTemplateResponse) UnmarshalBinary(b []byte) error { - var res PolicyTemplateResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/policy_templates_response_with_pagination.go b/v2/models/policy_templates_response_with_pagination.go deleted file mode 100644 index a77da3e5..00000000 --- a/v2/models/policy_templates_response_with_pagination.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PolicyTemplatesResponseWithPagination Protection Policy Template Response. -// -// Specifies the details about the Protection Policy Templates. -// -// swagger:model PolicyTemplatesResponseWithPagination -type PolicyTemplatesResponseWithPagination struct { - - // Specifies a list of protection policies. - Policies []*PolicyTemplateResponse `json:"policies"` -} - -// Validate validates this policy templates response with pagination -func (m *PolicyTemplatesResponseWithPagination) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PolicyTemplatesResponseWithPagination) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - for i := 0; i < len(m.Policies); i++ { - if swag.IsZero(m.Policies[i]) { // not required - continue - } - - if m.Policies[i] != nil { - if err := m.Policies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this policy templates response with pagination based on the context it is used -func (m *PolicyTemplatesResponseWithPagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PolicyTemplatesResponseWithPagination) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Policies); i++ { - - if m.Policies[i] != nil { - - if swag.IsZero(m.Policies[i]) { // not required - return nil - } - - if err := m.Policies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PolicyTemplatesResponseWithPagination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PolicyTemplatesResponseWithPagination) UnmarshalBinary(b []byte) error { - var res PolicyTemplatesResponseWithPagination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/power_off_vm_params.go b/v2/models/power_off_vm_params.go deleted file mode 100644 index 4f1f6ee3..00000000 --- a/v2/models/power_off_vm_params.go +++ /dev/null @@ -1,50 +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" -) - -// PowerOffVMParams Specifies the params for powering off the VMs. -// -// swagger:model PowerOffVmParams -type PowerOffVMParams struct { - - // Specifies the Entity IDs of the VMs to be powered off. - VMIds []int64 `json:"vmIds"` -} - -// Validate validates this power off Vm params -func (m *PowerOffVMParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this power off Vm params based on context it is used -func (m *PowerOffVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PowerOffVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PowerOffVMParams) UnmarshalBinary(b []byte) error { - var res PowerOffVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pre_check_validation.go b/v2/models/pre_check_validation.go deleted file mode 100644 index 2957adbc..00000000 --- a/v2/models/pre_check_validation.go +++ /dev/null @@ -1,58 +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" -) - -// PreCheckValidation Pre-Check Validations -// -// Specifies details of pre-check validations. -// -// swagger:model PreCheckValidation -type PreCheckValidation struct { - - // Specifies validation type - Validation *string `json:"validation,omitempty"` - - // Specifies validation passed or failed - IsPassed *bool `json:"isPassed,omitempty"` - - // Specifies the validation failure message - Message *string `json:"message,omitempty"` -} - -// Validate validates this pre check validation -func (m *PreCheckValidation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this pre check validation based on context it is used -func (m *PreCheckValidation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PreCheckValidation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PreCheckValidation) UnmarshalBinary(b []byte) error { - var res PreCheckValidation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pre_post_script_params.go b/v2/models/pre_post_script_params.go deleted file mode 100644 index 856909ef..00000000 --- a/v2/models/pre_post_script_params.go +++ /dev/null @@ -1,162 +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" -) - -// PrePostScriptParams Pre and Post Script Params. -// -// Specifies the params for pre and post scripts. -// -// swagger:model PrePostScriptParams -type PrePostScriptParams struct { - - // Specifies the pre backup script params. This script will be executed before starting backup run. - PreScript *CommonPreBackupScriptParams `json:"preScript,omitempty"` - - // Specifies the post backup script params. This script will be executed after backup run finishes. - PostScript *CommonPostBackupScriptParams `json:"postScript,omitempty"` -} - -// Validate validates this pre post script params -func (m *PrePostScriptParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrePostScriptParams) validatePreScript(formats strfmt.Registry) error { - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if m.PreScript != nil { - if err := m.PreScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *PrePostScriptParams) validatePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if m.PostScript != nil { - if err := m.PostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pre post script params based on the context it is used -func (m *PrePostScriptParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrePostScriptParams) contextValidatePreScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PreScript != nil { - - if swag.IsZero(m.PreScript) { // not required - return nil - } - - if err := m.PreScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preScript") - } - return err - } - } - - return nil -} - -func (m *PrePostScriptParams) contextValidatePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PostScript != nil { - - if swag.IsZero(m.PostScript) { // not required - return nil - } - - if err := m.PostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrePostScriptParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrePostScriptParams) UnmarshalBinary(b []byte) error { - var res PrePostScriptParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/prepare_planned_failver_params.go b/v2/models/prepare_planned_failver_params.go deleted file mode 100644 index 3b37c293..00000000 --- a/v2/models/prepare_planned_failver_params.go +++ /dev/null @@ -1,50 +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" -) - -// PreparePlannedFailverParams Specifies parameters of preparation of a planned failover. -// -// swagger:model PreparePlannedFailverParams -type PreparePlannedFailverParams struct { - - // Specifies whether a reverse replication needs to be set for the view on target cluster after failover. - ReverseReplication *bool `json:"reverseReplication,omitempty"` -} - -// Validate validates this prepare planned failver params -func (m *PreparePlannedFailverParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this prepare planned failver params based on context it is used -func (m *PreparePlannedFailverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PreparePlannedFailverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PreparePlannedFailverParams) UnmarshalBinary(b []byte) error { - var res PreparePlannedFailverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/primary_archival_target.go b/v2/models/primary_archival_target.go deleted file mode 100644 index 1eb89cb0..00000000 --- a/v2/models/primary_archival_target.go +++ /dev/null @@ -1,144 +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" -) - -// PrimaryArchivalTarget Specifies the primary archival settings. Mainly used for cloud direct archive (CAD) policy where primary backup is stored on archival target. -// -// swagger:model PrimaryArchivalTarget -type PrimaryArchivalTarget struct { - - // Specifies the Archival target id to take primary backup. - // Required: true - TargetID *int64 `json:"targetId"` - - // Specifies the Archival target name where Snapshots are copied. - // Read Only: true - TargetName *string `json:"targetName,omitempty"` - - // Specifies the Archival target name where Snapshots are copied. - TierSettings *TierLevelSettings `json:"tierSettings,omitempty"` -} - -// Validate validates this primary archival target -func (m *PrimaryArchivalTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTierSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrimaryArchivalTarget) validateTargetID(formats strfmt.Registry) error { - - if err := validate.Required("targetId", "body", m.TargetID); err != nil { - return err - } - - return nil -} - -func (m *PrimaryArchivalTarget) validateTierSettings(formats strfmt.Registry) error { - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if m.TierSettings != nil { - if err := m.TierSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this primary archival target based on the context it is used -func (m *PrimaryArchivalTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTierSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrimaryArchivalTarget) contextValidateTargetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetName", "body", m.TargetName); err != nil { - return err - } - - return nil -} - -func (m *PrimaryArchivalTarget) contextValidateTierSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.TierSettings != nil { - - if swag.IsZero(m.TierSettings) { // not required - return nil - } - - if err := m.TierSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tierSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tierSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrimaryArchivalTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrimaryArchivalTarget) UnmarshalBinary(b []byte) error { - var res PrimaryArchivalTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/primary_backup_target.go b/v2/models/primary_backup_target.go deleted file mode 100644 index b1296c1a..00000000 --- a/v2/models/primary_backup_target.go +++ /dev/null @@ -1,161 +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" -) - -// PrimaryBackupTarget Specifies the primary backup target settings for regular backups. If the backup target field is not specified then backup will be taken locally on the Cohesity cluster. -// -// swagger:model PrimaryBackupTarget -type PrimaryBackupTarget struct { - - // Specifies the primary backup location where backups will be stored. If not specified, then default is assumed as local backup on Cohesity cluster. - // Enum: ["Local","Archival"] - TargetType *string `json:"targetType,omitempty"` - - // Specifies the archival backup target details. This is applicable only if targetType is set to 'archival'. - ArchivalTargetSettings *PrimaryArchivalTarget `json:"archivalTargetSettings,omitempty"` -} - -// Validate validates this primary backup target -func (m *PrimaryBackupTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargetSettings(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var primaryBackupTargetTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - primaryBackupTargetTypeTargetTypePropEnum = append(primaryBackupTargetTypeTargetTypePropEnum, v) - } -} - -const ( - - // PrimaryBackupTargetTargetTypeLocal captures enum value "Local" - PrimaryBackupTargetTargetTypeLocal string = "Local" - - // PrimaryBackupTargetTargetTypeArchival captures enum value "Archival" - PrimaryBackupTargetTargetTypeArchival string = "Archival" -) - -// prop value enum -func (m *PrimaryBackupTarget) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, primaryBackupTargetTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrimaryBackupTarget) validateTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *PrimaryBackupTarget) validateArchivalTargetSettings(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargetSettings) { // not required - return nil - } - - if m.ArchivalTargetSettings != nil { - if err := m.ArchivalTargetSettings.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetSettings") - } - return err - } - } - - return nil -} - -// ContextValidate validate this primary backup target based on the context it is used -func (m *PrimaryBackupTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateArchivalTargetSettings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrimaryBackupTarget) contextValidateArchivalTargetSettings(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalTargetSettings != nil { - - if swag.IsZero(m.ArchivalTargetSettings) { // not required - return nil - } - - if err := m.ArchivalTargetSettings.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargetSettings") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargetSettings") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrimaryBackupTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrimaryBackupTarget) UnmarshalBinary(b []byte) error { - var res PrimaryBackupTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/primary_backup_target_location.go b/v2/models/primary_backup_target_location.go deleted file mode 100644 index fdbc8b2a..00000000 --- a/v2/models/primary_backup_target_location.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PrimaryBackupTargetLocation Primary Backup Target Location. -// -// Primary Backup Target Location. -// -// swagger:model PrimaryBackupTargetLocation -type PrimaryBackupTargetLocation struct { - - // Primary Backup Target Location. - // Enum: ["Local","Archival"] - Type string `json:"type,omitempty"` -} - -// Validate validates this primary backup target location -func (m *PrimaryBackupTargetLocation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var primaryBackupTargetLocationTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - primaryBackupTargetLocationTypeTypePropEnum = append(primaryBackupTargetLocationTypeTypePropEnum, v) - } -} - -const ( - - // PrimaryBackupTargetLocationTypeLocal captures enum value "Local" - PrimaryBackupTargetLocationTypeLocal string = "Local" - - // PrimaryBackupTargetLocationTypeArchival captures enum value "Archival" - PrimaryBackupTargetLocationTypeArchival string = "Archival" -) - -// prop value enum -func (m *PrimaryBackupTargetLocation) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, primaryBackupTargetLocationTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrimaryBackupTargetLocation) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this primary backup target location based on context it is used -func (m *PrimaryBackupTargetLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrimaryBackupTargetLocation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrimaryBackupTargetLocation) UnmarshalBinary(b []byte) error { - var res PrimaryBackupTargetLocation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/principal_object_type.go b/v2/models/principal_object_type.go deleted file mode 100644 index a3e13a90..00000000 --- a/v2/models/principal_object_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PrincipalObjectType Principal Object Type -// -// Specifies the type of this principal. It can be a 'User' or a 'Group'. -// -// swagger:model PrincipalObjectType -type PrincipalObjectType struct { - - // Specifies the Principal Object Type - // Enum: ["User","Group"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this principal object type -func (m *PrincipalObjectType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var principalObjectTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["User","Group"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - principalObjectTypeTypeEnumPropEnum = append(principalObjectTypeTypeEnumPropEnum, v) - } -} - -const ( - - // PrincipalObjectTypeEnumUser captures enum value "User" - PrincipalObjectTypeEnumUser string = "User" - - // PrincipalObjectTypeEnumGroup captures enum value "Group" - PrincipalObjectTypeEnumGroup string = "Group" -) - -// prop value enum -func (m *PrincipalObjectType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, principalObjectTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PrincipalObjectType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this principal object type based on context it is used -func (m *PrincipalObjectType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrincipalObjectType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrincipalObjectType) UnmarshalBinary(b []byte) error { - var res PrincipalObjectType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/private_key_credentials.go b/v2/models/private_key_credentials.go deleted file mode 100644 index 05f3402b..00000000 --- a/v2/models/private_key_credentials.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" - "github.com/go-openapi/validate" -) - -// PrivateKeyCredentials Private key credentials -// -// Specifies the credentials for certificate based authentication. -// -// swagger:model PrivateKeyCredentials -type PrivateKeyCredentials struct { - - // Specifies the userId to access target entity. - // Required: true - UserID *string `json:"userId"` - - // Specifies the private key to access target entity. - // Required: true - PrivateKey *string `json:"privateKey"` - - // Specifies the passphrase to access target entity. - Passphrase string `json:"passphrase,omitempty"` -} - -// Validate validates this private key credentials -func (m *PrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -func (m *PrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this private key credentials based on context it is used -func (m *PrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res PrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/private_network_info.go b/v2/models/private_network_info.go deleted file mode 100644 index 89fe6787..00000000 --- a/v2/models/private_network_info.go +++ /dev/null @@ -1,216 +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" -) - -// PrivateNetworkInfo Azure Snapshot Manager Protection Group Object Params. -// -// Specifies the object parameters to create Azure Snapshot Manager Protection Group. -// -// swagger:model PrivateNetworkInfo -type PrivateNetworkInfo struct { - - // Specifies the subnet for creating a private endpoint. - Location *string `json:"location,omitempty"` - - // Specifies the region of the virtual network. - Region *RecoveryObjectIdentifier `json:"region,omitempty"` - - // Specifies the subnet for creating a private endpoint. - Subnet *RecoveryObjectIdentifier `json:"subnet,omitempty"` - - // Specifies the virtual network for creating a private end point. - Vpn *RecoveryObjectIdentifier `json:"vpn,omitempty"` -} - -// Validate validates this private network info -func (m *PrivateNetworkInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetworkInfo) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *PrivateNetworkInfo) validateSubnet(formats strfmt.Registry) error { - if swag.IsZero(m.Subnet) { // not required - 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 -} - -func (m *PrivateNetworkInfo) validateVpn(formats strfmt.Registry) error { - if swag.IsZero(m.Vpn) { // not required - return nil - } - - if m.Vpn != nil { - if err := m.Vpn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpn") - } - return err - } - } - - return nil -} - -// ContextValidate validate this private network info based on the context it is used -func (m *PrivateNetworkInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpn(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PrivateNetworkInfo) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *PrivateNetworkInfo) 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 *PrivateNetworkInfo) contextValidateVpn(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpn != nil { - - if swag.IsZero(m.Vpn) { // not required - return nil - } - - if err := m.Vpn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpn") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpn") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PrivateNetworkInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PrivateNetworkInfo) UnmarshalBinary(b []byte) error { - var res PrivateNetworkInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/privilege.go b/v2/models/privilege.go deleted file mode 100644 index 5c3b53e9..00000000 --- a/v2/models/privilege.go +++ /dev/null @@ -1,74 +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" -) - -// Privilege Specifies a Privileges. -// -// swagger:model Privilege -type Privilege struct { - - // Specifies the Privilege id. - ID *int32 `json:"id,omitempty"` - - // Specifies the Privilege name. - Name *string `json:"name,omitempty"` - - // Specifies the Privilege label. - Label *string `json:"label,omitempty"` - - // Specifies the Privilege category. - Category *string `json:"category,omitempty"` - - // Specifies the description message for the Privilege. - Description *string `json:"description,omitempty"` - - // Specifies whether the Privilege is available for Helios operations. - IsAvailableOnHelios *bool `json:"isAvailableOnHelios,omitempty"` - - // Specifies whether the Privilege is auto assigned to custom Roles. - IsCustomRoleDefault *bool `json:"isCustomRoleDefault,omitempty"` - - // Specifies whether the Privilege is a special privilege. Special Privileges are not assigned to builtin 'Admin' Role. - IsSpecial *bool `json:"isSpecial,omitempty"` - - // Specifies whether the Privilege is a read-only privilege. Read-only Previlege only grants read access to a Role. - IsViewOnly *bool `json:"isViewOnly,omitempty"` -} - -// Validate validates this privilege -func (m *Privilege) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this privilege based on context it is used -func (m *Privilege) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Privilege) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Privilege) UnmarshalBinary(b []byte) error { - var res Privilege - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/privileges.go b/v2/models/privileges.go deleted file mode 100644 index c6a0f32e..00000000 --- a/v2/models/privileges.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Privileges Specifies a list of Privileges. -// -// swagger:model Privileges -type Privileges struct { - - // Specifies the list of Privileges. - Privileges []*Privilege `json:"privileges"` -} - -// Validate validates this privileges -func (m *Privileges) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivileges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Privileges) validatePrivileges(formats strfmt.Registry) error { - if swag.IsZero(m.Privileges) { // not required - return nil - } - - for i := 0; i < len(m.Privileges); i++ { - if swag.IsZero(m.Privileges[i]) { // not required - continue - } - - if m.Privileges[i] != nil { - if err := m.Privileges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privileges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privileges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this privileges based on the context it is used -func (m *Privileges) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrivileges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Privileges) contextValidatePrivileges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Privileges); i++ { - - if m.Privileges[i] != nil { - - if swag.IsZero(m.Privileges[i]) { // not required - return nil - } - - if err := m.Privileges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("privileges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("privileges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Privileges) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Privileges) UnmarshalBinary(b []byte) error { - var res Privileges - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progree_task_status.go b/v2/models/progree_task_status.go deleted file mode 100644 index 38b55a3c..00000000 --- a/v2/models/progree_task_status.go +++ /dev/null @@ -1,116 +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" -) - -// ProgreeTaskStatus ProgressTaskStatus -// -// # Progress Task Status -// -// swagger:model ProgreeTaskStatus -type ProgreeTaskStatus struct { - - // Specifies the progress task status. - // Enum: ["Active","Finished","FinishedWithError","Canceled","FinishedGarbageCollected"] - ProgressaskStatus string `json:"progressaskStatus,omitempty"` -} - -// Validate validates this progree task status -func (m *ProgreeTaskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgressaskStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var progreeTaskStatusTypeProgressaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Finished","FinishedWithError","Canceled","FinishedGarbageCollected"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - progreeTaskStatusTypeProgressaskStatusPropEnum = append(progreeTaskStatusTypeProgressaskStatusPropEnum, v) - } -} - -const ( - - // ProgreeTaskStatusProgressaskStatusActive captures enum value "Active" - ProgreeTaskStatusProgressaskStatusActive string = "Active" - - // ProgreeTaskStatusProgressaskStatusFinished captures enum value "Finished" - ProgreeTaskStatusProgressaskStatusFinished string = "Finished" - - // ProgreeTaskStatusProgressaskStatusFinishedWithError captures enum value "FinishedWithError" - ProgreeTaskStatusProgressaskStatusFinishedWithError string = "FinishedWithError" - - // ProgreeTaskStatusProgressaskStatusCanceled captures enum value "Canceled" - ProgreeTaskStatusProgressaskStatusCanceled string = "Canceled" - - // ProgreeTaskStatusProgressaskStatusFinishedGarbageCollected captures enum value "FinishedGarbageCollected" - ProgreeTaskStatusProgressaskStatusFinishedGarbageCollected string = "FinishedGarbageCollected" -) - -// prop value enum -func (m *ProgreeTaskStatus) validateProgressaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, progreeTaskStatusTypeProgressaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProgreeTaskStatus) validateProgressaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ProgressaskStatus) { // not required - return nil - } - - // value enum - if err := m.validateProgressaskStatusEnum("progressaskStatus", "body", m.ProgressaskStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this progree task status based on context it is used -func (m *ProgreeTaskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProgreeTaskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgreeTaskStatus) UnmarshalBinary(b []byte) error { - var res ProgreeTaskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_stats.go b/v2/models/progress_stats.go deleted file mode 100644 index d6ecf43b..00000000 --- a/v2/models/progress_stats.go +++ /dev/null @@ -1,56 +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" -) - -// ProgressStats Specifies the stats within progress. -// -// swagger:model ProgressStats -type ProgressStats struct { - - // Specifies whether the file system walk is done. Only applicable to file based backups. - FileWalkDone *bool `json:"fileWalkDone,omitempty"` - - // Specifies the total number of file and directory entities visited in this backup. Only applicable to file based backups. - TotalFileCount *int64 `json:"totalFileCount,omitempty"` - - // Specifies the total number of file and directory entities that are backed up in this run. Only applicable to file based backups. - BackupFileCount *int64 `json:"backupFileCount,omitempty"` -} - -// Validate validates this progress stats -func (m *ProgressStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this progress stats based on context it is used -func (m *ProgressStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProgressStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressStats) UnmarshalBinary(b []byte) error { - var res ProgressStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_summary.go b/v2/models/progress_summary.go deleted file mode 100644 index 6f3a0fef..00000000 --- a/v2/models/progress_summary.go +++ /dev/null @@ -1,56 +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" -) - -// ProgressSummary Specifies the progress summary. -// -// swagger:model ProgressSummary -type ProgressSummary struct { - - // Specifies the successful count. - Success *int64 `json:"success,omitempty"` - - // Specifies the failed count. - Failed *int64 `json:"failed,omitempty"` - - // Specifies the total count. - Total *int64 `json:"total,omitempty"` -} - -// Validate validates this progress summary -func (m *ProgressSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this progress summary based on context it is used -func (m *ProgressSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProgressSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressSummary) UnmarshalBinary(b []byte) error { - var res ProgressSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_task.go b/v2/models/progress_task.go deleted file mode 100644 index d5cf3ada..00000000 --- a/v2/models/progress_task.go +++ /dev/null @@ -1,121 +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" -) - -// ProgressTask Progress Task -// -// This specifies the details about the Progress Task. -// -// swagger:model ProgressTask -type ProgressTask struct { - - // Specifies the task id of the Progress task. - ID *string `json:"id,omitempty"` - - ProgressTaskInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProgressTask) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - // AO1 - var aO1 ProgressTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ProgressTaskInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProgressTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *string `json:"id,omitempty"` - } - - dataAO0.ID = m.ID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.ProgressTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this progress task -func (m *ProgressTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this progress task based on the context it is used -func (m *ProgressTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProgressTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressTask) UnmarshalBinary(b []byte) error { - var res ProgressTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_task_event.go b/v2/models/progress_task_event.go deleted file mode 100644 index 78251635..00000000 --- a/v2/models/progress_task_event.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" -) - -// ProgressTaskEvent Specifies the details about the various events which are created during the execution of Progress Task. -// -// swagger:model ProgressTaskEvent -type ProgressTaskEvent struct { - - // Specifies the log message describing the current event. - Message *string `json:"message,omitempty"` - - // Specifies the time of the event occurance in Unix epoch Timestamp(in microseconds). - OccuredAtUsecs *int64 `json:"occuredAtUsecs,omitempty"` -} - -// Validate validates this progress task event -func (m *ProgressTaskEvent) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this progress task event based on context it is used -func (m *ProgressTaskEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProgressTaskEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressTaskEvent) UnmarshalBinary(b []byte) error { - var res ProgressTaskEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_task_info.go b/v2/models/progress_task_info.go deleted file mode 100644 index 8f70b983..00000000 --- a/v2/models/progress_task_info.go +++ /dev/null @@ -1,247 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProgressTaskInfo Progress Task -// -// Specifies the details about a Progress Task. -// -// swagger:model ProgressTaskInfo -type ProgressTaskInfo struct { - - // Specifies the current status of the progress task. - // Enum: ["Active","Finished","FinishedWithError","Canceled","FinishedGarbageCollected"] - Status *string `json:"status,omitempty"` - - // Specifies the current completed percentage of the progress task. - PercentageCompleted *float32 `json:"percentageCompleted,omitempty"` - - // Specifies the start time of the progress task in Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of the progress task in Unix epoch Timestamp(in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the expected remaining time of the progress task in Unix epoch Timestamp(in microseconds). - ExpectedRemainingTimeUsecs *int64 `json:"expectedRemainingTimeUsecs,omitempty"` - - // Specifies the event log created for progress Task. - Events []*ProgressTaskEvent `json:"events"` - - // Specifies the stats within the progress. - Stats *ProgressStats `json:"stats,omitempty"` -} - -// Validate validates this progress task info -func (m *ProgressTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEvents(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var progressTaskInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Finished","FinishedWithError","Canceled","FinishedGarbageCollected"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - progressTaskInfoTypeStatusPropEnum = append(progressTaskInfoTypeStatusPropEnum, v) - } -} - -const ( - - // ProgressTaskInfoStatusActive captures enum value "Active" - ProgressTaskInfoStatusActive string = "Active" - - // ProgressTaskInfoStatusFinished captures enum value "Finished" - ProgressTaskInfoStatusFinished string = "Finished" - - // ProgressTaskInfoStatusFinishedWithError captures enum value "FinishedWithError" - ProgressTaskInfoStatusFinishedWithError string = "FinishedWithError" - - // ProgressTaskInfoStatusCanceled captures enum value "Canceled" - ProgressTaskInfoStatusCanceled string = "Canceled" - - // ProgressTaskInfoStatusFinishedGarbageCollected captures enum value "FinishedGarbageCollected" - ProgressTaskInfoStatusFinishedGarbageCollected string = "FinishedGarbageCollected" -) - -// prop value enum -func (m *ProgressTaskInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, progressTaskInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProgressTaskInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *ProgressTaskInfo) validateEvents(formats strfmt.Registry) error { - if swag.IsZero(m.Events) { // not required - return nil - } - - for i := 0; i < len(m.Events); i++ { - if swag.IsZero(m.Events[i]) { // not required - continue - } - - if m.Events[i] != nil { - if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProgressTaskInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this progress task info based on the context it is used -func (m *ProgressTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEvents(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProgressTaskInfo) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Events); i++ { - - if m.Events[i] != nil { - - if swag.IsZero(m.Events[i]) { // not required - return nil - } - - if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProgressTaskInfo) 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 -} - -// MarshalBinary interface implementation -func (m *ProgressTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressTaskInfo) UnmarshalBinary(b []byte) error { - var res ProgressTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/progress_tasks.go b/v2/models/progress_tasks.go deleted file mode 100644 index c4d92965..00000000 --- a/v2/models/progress_tasks.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProgressTasks Progress Tasks -// -// List of Progress Tasks. -// -// swagger:model ProgressTasks -type ProgressTasks struct { - - // Specifies the list of Progress Task. - ProgressTasks []*ProgressTask `json:"progressTasks"` -} - -// Validate validates this progress tasks -func (m *ProgressTasks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgressTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProgressTasks) validateProgressTasks(formats strfmt.Registry) error { - if swag.IsZero(m.ProgressTasks) { // not required - return nil - } - - for i := 0; i < len(m.ProgressTasks); i++ { - if swag.IsZero(m.ProgressTasks[i]) { // not required - continue - } - - if m.ProgressTasks[i] != nil { - if err := m.ProgressTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progressTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progressTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this progress tasks based on the context it is used -func (m *ProgressTasks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProgressTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProgressTasks) contextValidateProgressTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProgressTasks); i++ { - - if m.ProgressTasks[i] != nil { - - if swag.IsZero(m.ProgressTasks[i]) { // not required - return nil - } - - if err := m.ProgressTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progressTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progressTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProgressTasks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProgressTasks) UnmarshalBinary(b []byte) error { - var res ProgressTasks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/project_scope_params.go b/v2/models/project_scope_params.go deleted file mode 100644 index 947faa46..00000000 --- a/v2/models/project_scope_params.go +++ /dev/null @@ -1,88 +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" -) - -// ProjectScopeParams Specifies the parameters for project type scope. -// -// swagger:model ProjectScopeParams -type ProjectScopeParams struct { - - // Specifies the project name. - // Required: true - ProjectName *string `json:"projectName"` - - // Specifies the domain name of the project. - // Required: true - DomainName *string `json:"domainName"` -} - -// Validate validates this project scope params -func (m *ProjectScopeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProjectName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDomainName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectScopeParams) validateProjectName(formats strfmt.Registry) error { - - if err := validate.Required("projectName", "body", m.ProjectName); err != nil { - return err - } - - return nil -} - -func (m *ProjectScopeParams) validateDomainName(formats strfmt.Registry) error { - - if err := validate.Required("domainName", "body", m.DomainName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this project scope params based on context it is used -func (m *ProjectScopeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectScopeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectScopeParams) UnmarshalBinary(b []byte) error { - var res ProjectScopeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protectd_objects_action_request.go b/v2/models/protectd_objects_action_request.go deleted file mode 100644 index f6ade1c7..00000000 --- a/v2/models/protectd_objects_action_request.go +++ /dev/null @@ -1,562 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectdObjectsActionRequest Specifies the request for performing various actions on protected objects. -// -// swagger:model ProtectdObjectsActionRequest -type ProtectdObjectsActionRequest struct { - - // Specifies the action type to be performed on object getting protected. Based on selected action, provide the action params. - // Required: true - // Enum: ["Pause","Resume","UnProtect","ProtectNow"] - Action *string `json:"action"` - - // Specifies the object action key for any action on the given object. - // 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"] - ObjectActionKey *string `json:"objectActionKey,omitempty"` - - // If provided action is 'Pause' then this object should be provided as input. - PauseParams *ProtectedObjectPauseActionParams `json:"pauseParams,omitempty"` - - // If provided action is 'Resume' then this object should be provided as input. - ResumeParams *ProtectedObjectResumeActionParams `json:"resumeParams,omitempty"` - - // If provided action is 'RunNow' then this object should be provided as input. - RunNowParams *ProtectedObjectRunNowActionParams `json:"runNowParams,omitempty"` - - // If provided action is 'UnProtect' then this object should be provided as input. - UnProtectParams *ProtectedObjectUnProtectActionParams `json:"unProtectParams,omitempty"` - - // Specifies the protections type on which action to be performed. This is used when an object is protected by multiple protection types. If not specified action will be performed on all protection types. - // Unique: true - SnapshotBackendTypes []string `json:"snapshotBackendTypes"` -} - -// Validate validates this protectd objects action request -func (m *ProtectdObjectsActionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectActionKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePauseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRunNowParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnProtectParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotBackendTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectdObjectsActionRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume","UnProtect","ProtectNow"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectdObjectsActionRequestTypeActionPropEnum = append(protectdObjectsActionRequestTypeActionPropEnum, v) - } -} - -const ( - - // ProtectdObjectsActionRequestActionPause captures enum value "Pause" - ProtectdObjectsActionRequestActionPause string = "Pause" - - // ProtectdObjectsActionRequestActionResume captures enum value "Resume" - ProtectdObjectsActionRequestActionResume string = "Resume" - - // ProtectdObjectsActionRequestActionUnProtect captures enum value "UnProtect" - ProtectdObjectsActionRequestActionUnProtect string = "UnProtect" - - // ProtectdObjectsActionRequestActionProtectNow captures enum value "ProtectNow" - ProtectdObjectsActionRequestActionProtectNow string = "ProtectNow" -) - -// prop value enum -func (m *ProtectdObjectsActionRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectdObjectsActionRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectdObjectsActionRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -var protectdObjectsActionRequestTypeObjectActionKeyPropEnum []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 { - protectdObjectsActionRequestTypeObjectActionKeyPropEnum = append(protectdObjectsActionRequestTypeObjectActionKeyPropEnum, v) - } -} - -const ( - - // ProtectdObjectsActionRequestObjectActionKeyKVMware captures enum value "kVMware" - ProtectdObjectsActionRequestObjectActionKeyKVMware string = "kVMware" - - // ProtectdObjectsActionRequestObjectActionKeyKHyperV captures enum value "kHyperV" - ProtectdObjectsActionRequestObjectActionKeyKHyperV string = "kHyperV" - - // ProtectdObjectsActionRequestObjectActionKeyKVCD captures enum value "kVCD" - ProtectdObjectsActionRequestObjectActionKeyKVCD string = "kVCD" - - // ProtectdObjectsActionRequestObjectActionKeyKAzure captures enum value "kAzure" - ProtectdObjectsActionRequestObjectActionKeyKAzure string = "kAzure" - - // ProtectdObjectsActionRequestObjectActionKeyKGCP captures enum value "kGCP" - ProtectdObjectsActionRequestObjectActionKeyKGCP string = "kGCP" - - // ProtectdObjectsActionRequestObjectActionKeyKKVM captures enum value "kKVM" - ProtectdObjectsActionRequestObjectActionKeyKKVM string = "kKVM" - - // ProtectdObjectsActionRequestObjectActionKeyKAcropolis captures enum value "kAcropolis" - ProtectdObjectsActionRequestObjectActionKeyKAcropolis string = "kAcropolis" - - // ProtectdObjectsActionRequestObjectActionKeyKAWS captures enum value "kAWS" - ProtectdObjectsActionRequestObjectActionKeyKAWS string = "kAWS" - - // ProtectdObjectsActionRequestObjectActionKeyKAWSNative captures enum value "kAWSNative" - ProtectdObjectsActionRequestObjectActionKeyKAWSNative string = "kAWSNative" - - // ProtectdObjectsActionRequestObjectActionKeyKAwsS3 captures enum value "kAwsS3" - ProtectdObjectsActionRequestObjectActionKeyKAwsS3 string = "kAwsS3" - - // ProtectdObjectsActionRequestObjectActionKeyKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ProtectdObjectsActionRequestObjectActionKeyKAWSSnapshotManager string = "kAWSSnapshotManager" - - // ProtectdObjectsActionRequestObjectActionKeyKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectdObjectsActionRequestObjectActionKeyKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectdObjectsActionRequestObjectActionKeyKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ProtectdObjectsActionRequestObjectActionKeyKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ProtectdObjectsActionRequestObjectActionKeyKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ProtectdObjectsActionRequestObjectActionKeyKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ProtectdObjectsActionRequestObjectActionKeyKAzureNative captures enum value "kAzureNative" - ProtectdObjectsActionRequestObjectActionKeyKAzureNative string = "kAzureNative" - - // ProtectdObjectsActionRequestObjectActionKeyKAzureSQL captures enum value "kAzureSQL" - ProtectdObjectsActionRequestObjectActionKeyKAzureSQL string = "kAzureSQL" - - // ProtectdObjectsActionRequestObjectActionKeyKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - ProtectdObjectsActionRequestObjectActionKeyKAzureSnapshotManager string = "kAzureSnapshotManager" - - // ProtectdObjectsActionRequestObjectActionKeyKPhysical captures enum value "kPhysical" - ProtectdObjectsActionRequestObjectActionKeyKPhysical string = "kPhysical" - - // ProtectdObjectsActionRequestObjectActionKeyKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectdObjectsActionRequestObjectActionKeyKPhysicalFiles string = "kPhysicalFiles" - - // ProtectdObjectsActionRequestObjectActionKeyKGPFS captures enum value "kGPFS" - ProtectdObjectsActionRequestObjectActionKeyKGPFS string = "kGPFS" - - // ProtectdObjectsActionRequestObjectActionKeyKElastifile captures enum value "kElastifile" - ProtectdObjectsActionRequestObjectActionKeyKElastifile string = "kElastifile" - - // ProtectdObjectsActionRequestObjectActionKeyKNetapp captures enum value "kNetapp" - ProtectdObjectsActionRequestObjectActionKeyKNetapp string = "kNetapp" - - // ProtectdObjectsActionRequestObjectActionKeyKGenericNas captures enum value "kGenericNas" - ProtectdObjectsActionRequestObjectActionKeyKGenericNas string = "kGenericNas" - - // ProtectdObjectsActionRequestObjectActionKeyKIsilon captures enum value "kIsilon" - ProtectdObjectsActionRequestObjectActionKeyKIsilon string = "kIsilon" - - // ProtectdObjectsActionRequestObjectActionKeyKFlashBlade captures enum value "kFlashBlade" - ProtectdObjectsActionRequestObjectActionKeyKFlashBlade string = "kFlashBlade" - - // ProtectdObjectsActionRequestObjectActionKeyKPure captures enum value "kPure" - ProtectdObjectsActionRequestObjectActionKeyKPure string = "kPure" - - // ProtectdObjectsActionRequestObjectActionKeyKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectdObjectsActionRequestObjectActionKeyKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectdObjectsActionRequestObjectActionKeyKSQL captures enum value "kSQL" - ProtectdObjectsActionRequestObjectActionKeyKSQL string = "kSQL" - - // ProtectdObjectsActionRequestObjectActionKeyKExchange captures enum value "kExchange" - ProtectdObjectsActionRequestObjectActionKeyKExchange string = "kExchange" - - // ProtectdObjectsActionRequestObjectActionKeyKAD captures enum value "kAD" - ProtectdObjectsActionRequestObjectActionKeyKAD string = "kAD" - - // ProtectdObjectsActionRequestObjectActionKeyKOracle captures enum value "kOracle" - ProtectdObjectsActionRequestObjectActionKeyKOracle string = "kOracle" - - // ProtectdObjectsActionRequestObjectActionKeyKView captures enum value "kView" - ProtectdObjectsActionRequestObjectActionKeyKView string = "kView" - - // ProtectdObjectsActionRequestObjectActionKeyKRemoteAdapter captures enum value "kRemoteAdapter" - ProtectdObjectsActionRequestObjectActionKeyKRemoteAdapter string = "kRemoteAdapter" - - // ProtectdObjectsActionRequestObjectActionKeyKO365 captures enum value "kO365" - ProtectdObjectsActionRequestObjectActionKeyKO365 string = "kO365" - - // ProtectdObjectsActionRequestObjectActionKeyKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectdObjectsActionRequestObjectActionKeyKO365PublicFolders string = "kO365PublicFolders" - - // ProtectdObjectsActionRequestObjectActionKeyKO365Teams captures enum value "kO365Teams" - ProtectdObjectsActionRequestObjectActionKeyKO365Teams string = "kO365Teams" - - // ProtectdObjectsActionRequestObjectActionKeyKO365Group captures enum value "kO365Group" - ProtectdObjectsActionRequestObjectActionKeyKO365Group string = "kO365Group" - - // ProtectdObjectsActionRequestObjectActionKeyKO365Exchange captures enum value "kO365Exchange" - ProtectdObjectsActionRequestObjectActionKeyKO365Exchange string = "kO365Exchange" - - // ProtectdObjectsActionRequestObjectActionKeyKO365OneDrive captures enum value "kO365OneDrive" - ProtectdObjectsActionRequestObjectActionKeyKO365OneDrive string = "kO365OneDrive" - - // ProtectdObjectsActionRequestObjectActionKeyKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectdObjectsActionRequestObjectActionKeyKO365Sharepoint string = "kO365Sharepoint" - - // ProtectdObjectsActionRequestObjectActionKeyKKubernetes captures enum value "kKubernetes" - ProtectdObjectsActionRequestObjectActionKeyKKubernetes string = "kKubernetes" - - // ProtectdObjectsActionRequestObjectActionKeyKCassandra captures enum value "kCassandra" - ProtectdObjectsActionRequestObjectActionKeyKCassandra string = "kCassandra" - - // ProtectdObjectsActionRequestObjectActionKeyKMongoDB captures enum value "kMongoDB" - ProtectdObjectsActionRequestObjectActionKeyKMongoDB string = "kMongoDB" - - // ProtectdObjectsActionRequestObjectActionKeyKCouchbase captures enum value "kCouchbase" - ProtectdObjectsActionRequestObjectActionKeyKCouchbase string = "kCouchbase" - - // ProtectdObjectsActionRequestObjectActionKeyKHdfs captures enum value "kHdfs" - ProtectdObjectsActionRequestObjectActionKeyKHdfs string = "kHdfs" - - // ProtectdObjectsActionRequestObjectActionKeyKHive captures enum value "kHive" - ProtectdObjectsActionRequestObjectActionKeyKHive string = "kHive" - - // ProtectdObjectsActionRequestObjectActionKeyKHBase captures enum value "kHBase" - ProtectdObjectsActionRequestObjectActionKeyKHBase string = "kHBase" - - // ProtectdObjectsActionRequestObjectActionKeyKUDA captures enum value "kUDA" - ProtectdObjectsActionRequestObjectActionKeyKUDA string = "kUDA" - - // ProtectdObjectsActionRequestObjectActionKeyKSfdc captures enum value "kSfdc" - ProtectdObjectsActionRequestObjectActionKeyKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ProtectdObjectsActionRequest) validateObjectActionKeyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectdObjectsActionRequestTypeObjectActionKeyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectdObjectsActionRequest) validateObjectActionKey(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectActionKey) { // not required - return nil - } - - // value enum - if err := m.validateObjectActionKeyEnum("objectActionKey", "body", *m.ObjectActionKey); err != nil { - return err - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) validatePauseParams(formats strfmt.Registry) error { - if swag.IsZero(m.PauseParams) { // not required - return nil - } - - if m.PauseParams != nil { - if err := m.PauseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) validateResumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.ResumeParams) { // not required - return nil - } - - if m.ResumeParams != nil { - if err := m.ResumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) validateRunNowParams(formats strfmt.Registry) error { - if swag.IsZero(m.RunNowParams) { // not required - return nil - } - - if m.RunNowParams != nil { - if err := m.RunNowParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) validateUnProtectParams(formats strfmt.Registry) error { - if swag.IsZero(m.UnProtectParams) { // not required - return nil - } - - if m.UnProtectParams != nil { - if err := m.UnProtectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unProtectParams") - } - return err - } - } - - return nil -} - -var protectdObjectsActionRequestSnapshotBackendTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWSNative","kAWSSnapshotManager","kPhysical","kSQL","kOracle","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureNative","kAzureSnapshotManager","kAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectdObjectsActionRequestSnapshotBackendTypesItemsEnum = append(protectdObjectsActionRequestSnapshotBackendTypesItemsEnum, v) - } -} - -func (m *ProtectdObjectsActionRequest) validateSnapshotBackendTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectdObjectsActionRequestSnapshotBackendTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectdObjectsActionRequest) validateSnapshotBackendTypes(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotBackendTypes) { // not required - return nil - } - - if err := validate.UniqueItems("snapshotBackendTypes", "body", m.SnapshotBackendTypes); err != nil { - return err - } - - for i := 0; i < len(m.SnapshotBackendTypes); i++ { - - // value enum - if err := m.validateSnapshotBackendTypesItemsEnum("snapshotBackendTypes"+"."+strconv.Itoa(i), "body", m.SnapshotBackendTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validate this protectd objects action request based on the context it is used -func (m *ProtectdObjectsActionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePauseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRunNowParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUnProtectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectdObjectsActionRequest) contextValidatePauseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PauseParams != nil { - - if swag.IsZero(m.PauseParams) { // not required - return nil - } - - if err := m.PauseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pauseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pauseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) contextValidateResumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ResumeParams != nil { - - if swag.IsZero(m.ResumeParams) { // not required - return nil - } - - if err := m.ResumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resumeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) contextValidateRunNowParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RunNowParams != nil { - - if swag.IsZero(m.RunNowParams) { // not required - return nil - } - - if err := m.RunNowParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runNowParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runNowParams") - } - return err - } - } - - return nil -} - -func (m *ProtectdObjectsActionRequest) contextValidateUnProtectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UnProtectParams != nil { - - if swag.IsZero(m.UnProtectParams) { // not required - return nil - } - - if err := m.UnProtectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("unProtectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("unProtectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectdObjectsActionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectdObjectsActionRequest) UnmarshalBinary(b []byte) error { - var res ProtectdObjectsActionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object.go b/v2/models/protected_object.go deleted file mode 100644 index 391642a7..00000000 --- a/v2/models/protected_object.go +++ /dev/null @@ -1,240 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObject Protected Object -// -// Specifies the Protected Object with last Run's snapshot information per Protection Group. -// -// swagger:model ProtectedObject -type ProtectedObject struct { - Object - - // Specifies the latest snapshot information for every Protection Group for a given object. - LatestSnapshotsInfo []*ObjectSnapshotsInfo `json:"latestSnapshotsInfo"` - - // Specifies the Source Object information. - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Object - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Object = aO0 - - // AO1 - var dataAO1 struct { - LatestSnapshotsInfo []*ObjectSnapshotsInfo `json:"latestSnapshotsInfo"` - - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.LatestSnapshotsInfo = dataAO1.LatestSnapshotsInfo - - m.SourceInfo = dataAO1.SourceInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Object) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - LatestSnapshotsInfo []*ObjectSnapshotsInfo `json:"latestSnapshotsInfo"` - - SourceInfo *ObjectSummary `json:"sourceInfo,omitempty"` - } - - dataAO1.LatestSnapshotsInfo = m.LatestSnapshotsInfo - - dataAO1.SourceInfo = m.SourceInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protected object -func (m *ProtectedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatestSnapshotsInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObject) validateLatestSnapshotsInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.LatestSnapshotsInfo) { // not required - return nil - } - - for i := 0; i < len(m.LatestSnapshotsInfo); i++ { - if swag.IsZero(m.LatestSnapshotsInfo[i]) { // not required - continue - } - - if m.LatestSnapshotsInfo[i] != nil { - if err := m.LatestSnapshotsInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestSnapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestSnapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObject) validateSourceInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if m.SourceInfo != nil { - if err := m.SourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protected object based on the context it is used -func (m *ProtectedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLatestSnapshotsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObject) contextValidateLatestSnapshotsInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.LatestSnapshotsInfo); i++ { - - if m.LatestSnapshotsInfo[i] != nil { - - if swag.IsZero(m.LatestSnapshotsInfo[i]) { // not required - return nil - } - - if err := m.LatestSnapshotsInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("latestSnapshotsInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("latestSnapshotsInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObject) contextValidateSourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceInfo != nil { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if err := m.SourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObject) UnmarshalBinary(b []byte) error { - var res ProtectedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_action_response.go b/v2/models/protected_object_action_response.go deleted file mode 100644 index 49eb2ea6..00000000 --- a/v2/models/protected_object_action_response.go +++ /dev/null @@ -1,179 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectedObjectActionResponse Specifies the response upon performing an action on protected objects. -// -// swagger:model ProtectedObjectActionResponse -type ProtectedObjectActionResponse struct { - - // Specifies the action type to be performed on object getting protected. Based on selected action, provide the action params. - // Enum: ["Pause","Resume","UnProtect","ProtectNow"] - Action string `json:"action,omitempty"` - - // Specifies the list of objects on which the provided action was performed. - Objects []*ActionObjectLevelResponse `json:"objects"` -} - -// Validate validates this protected object action response -func (m *ProtectedObjectActionResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectedObjectActionResponseTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume","UnProtect","ProtectNow"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectedObjectActionResponseTypeActionPropEnum = append(protectedObjectActionResponseTypeActionPropEnum, v) - } -} - -const ( - - // ProtectedObjectActionResponseActionPause captures enum value "Pause" - ProtectedObjectActionResponseActionPause string = "Pause" - - // ProtectedObjectActionResponseActionResume captures enum value "Resume" - ProtectedObjectActionResponseActionResume string = "Resume" - - // ProtectedObjectActionResponseActionUnProtect captures enum value "UnProtect" - ProtectedObjectActionResponseActionUnProtect string = "UnProtect" - - // ProtectedObjectActionResponseActionProtectNow captures enum value "ProtectNow" - ProtectedObjectActionResponseActionProtectNow string = "ProtectNow" -) - -// prop value enum -func (m *ProtectedObjectActionResponse) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectedObjectActionResponseTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectedObjectActionResponse) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", m.Action); err != nil { - return err - } - - return nil -} - -func (m *ProtectedObjectActionResponse) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected object action response based on the context it is used -func (m *ProtectedObjectActionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectActionResponse) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectActionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectActionResponse) UnmarshalBinary(b []byte) error { - var res ProtectedObjectActionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_backup_config.go b/v2/models/protected_object_backup_config.go deleted file mode 100644 index f85e5131..00000000 --- a/v2/models/protected_object_backup_config.go +++ /dev/null @@ -1,173 +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" -) - -// ProtectedObjectBackupConfig Specifies the backup configuration for protected object. -// -// swagger:model ProtectedObjectBackupConfig -type ProtectedObjectBackupConfig struct { - CommonObjectProtectParams - - EnvSpecificObjectProtectionResponseParams - - // Specifies whether or not this configuration is applied to an autoprotected object rather than this specific object. - IsAutoProtectConfig *bool `json:"isAutoProtectConfig,omitempty"` - - // Specifies the parent ID of the object which the backup configuration is applied to if this is an auto protect config. - AutoProtectParentID *int64 `json:"autoProtectParentId,omitempty"` - - // Specifies whether or not protection has been paused on this object. - IsPaused *bool `json:"isPaused,omitempty"` - - // Specifies whether or not protection has been deactivated on this object. - IsActive *bool `json:"isActive,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectedObjectBackupConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectProtectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectProtectParams = aO0 - - // AO1 - var aO1 EnvSpecificObjectProtectionResponseParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.EnvSpecificObjectProtectionResponseParams = aO1 - - // AO2 - var dataAO2 struct { - IsAutoProtectConfig *bool `json:"isAutoProtectConfig,omitempty"` - - AutoProtectParentID *int64 `json:"autoProtectParentId,omitempty"` - - IsPaused *bool `json:"isPaused,omitempty"` - - IsActive *bool `json:"isActive,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.IsAutoProtectConfig = dataAO2.IsAutoProtectConfig - - m.AutoProtectParentID = dataAO2.AutoProtectParentID - - m.IsPaused = dataAO2.IsPaused - - m.IsActive = dataAO2.IsActive - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectedObjectBackupConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.CommonObjectProtectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.EnvSpecificObjectProtectionResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - IsAutoProtectConfig *bool `json:"isAutoProtectConfig,omitempty"` - - AutoProtectParentID *int64 `json:"autoProtectParentId,omitempty"` - - IsPaused *bool `json:"isPaused,omitempty"` - - IsActive *bool `json:"isActive,omitempty"` - } - - dataAO2.IsAutoProtectConfig = m.IsAutoProtectConfig - - dataAO2.AutoProtectParentID = m.AutoProtectParentID - - dataAO2.IsPaused = m.IsPaused - - dataAO2.IsActive = m.IsActive - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protected object backup config -func (m *ProtectedObjectBackupConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with EnvSpecificObjectProtectionResponseParams - if err := m.EnvSpecificObjectProtectionResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protected object backup config based on the context it is used -func (m *ProtectedObjectBackupConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with EnvSpecificObjectProtectionResponseParams - if err := m.EnvSpecificObjectProtectionResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectBackupConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectBackupConfig) UnmarshalBinary(b []byte) error { - var res ProtectedObjectBackupConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_group_backup_config.go b/v2/models/protected_object_group_backup_config.go deleted file mode 100644 index fc0f1744..00000000 --- a/v2/models/protected_object_group_backup_config.go +++ /dev/null @@ -1,74 +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" -) - -// ProtectedObjectGroupBackupConfig Specifies the parameters of a protection group which is protecting an object. -// -// swagger:model ProtectedObjectGroupBackupConfig -type ProtectedObjectGroupBackupConfig struct { - - // Specifies the protection group id, if given object is also protected by a protection group. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the protection group name, if given object is also protected by a protection group. - // Read Only: true - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` -} - -// Validate validates this protected object group backup config -func (m *ProtectedObjectGroupBackupConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this protected object group backup config based on the context it is used -func (m *ProtectedObjectGroupBackupConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionGroupName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectGroupBackupConfig) contextValidateProtectionGroupName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "protectionGroupName", "body", m.ProtectionGroupName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectGroupBackupConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectGroupBackupConfig) UnmarshalBinary(b []byte) error { - var res ProtectedObjectGroupBackupConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_info.go b/v2/models/protected_object_info.go deleted file mode 100644 index 4c928cde..00000000 --- a/v2/models/protected_object_info.go +++ /dev/null @@ -1,369 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObjectInfo Specifies the details of a protected object. -// -// swagger:model ProtectedObjectInfo -type ProtectedObjectInfo struct { - ObjectSummary - - // Specifies the list of tenants that have permissions for this accessing given protected object. - Permissions []*Tenant `json:"permissions"` - - // Specifies the object based protection info associated with this object. - ObjectBackupConfiguration *ProtectedObjectBackupConfig `json:"objectBackupConfiguration,omitempty"` - - // Specifies the protection info associated with every object. There can be multiple instances of protection info since the same object can be protected in multiple protection groups. - ProtectionGroupConfigurations []*ProtectedObjectGroupBackupConfig `json:"protectionGroupConfigurations"` - - // Specifies the last run information for a given object. This is the most recent run across all protection groups and object backup config. - LastRun *ObjectProtectionRunSummary `json:"lastRun,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectedObjectInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - Permissions []*Tenant `json:"permissions"` - - ObjectBackupConfiguration *ProtectedObjectBackupConfig `json:"objectBackupConfiguration,omitempty"` - - ProtectionGroupConfigurations []*ProtectedObjectGroupBackupConfig `json:"protectionGroupConfigurations"` - - LastRun *ObjectProtectionRunSummary `json:"lastRun,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Permissions = dataAO1.Permissions - - m.ObjectBackupConfiguration = dataAO1.ObjectBackupConfiguration - - m.ProtectionGroupConfigurations = dataAO1.ProtectionGroupConfigurations - - m.LastRun = dataAO1.LastRun - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectedObjectInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Permissions []*Tenant `json:"permissions"` - - ObjectBackupConfiguration *ProtectedObjectBackupConfig `json:"objectBackupConfiguration,omitempty"` - - ProtectionGroupConfigurations []*ProtectedObjectGroupBackupConfig `json:"protectionGroupConfigurations"` - - LastRun *ObjectProtectionRunSummary `json:"lastRun,omitempty"` - } - - dataAO1.Permissions = m.Permissions - - dataAO1.ObjectBackupConfiguration = m.ObjectBackupConfiguration - - dataAO1.ProtectionGroupConfigurations = m.ProtectionGroupConfigurations - - dataAO1.LastRun = m.LastRun - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protected object info -func (m *ProtectedObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectBackupConfiguration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionGroupConfigurations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectInfo) validatePermissions(formats strfmt.Registry) error { - - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectInfo) validateObjectBackupConfiguration(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectBackupConfiguration) { // not required - return nil - } - - if m.ObjectBackupConfiguration != nil { - if err := m.ObjectBackupConfiguration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupConfiguration") - } - return err - } - } - - return nil -} - -func (m *ProtectedObjectInfo) validateProtectionGroupConfigurations(formats strfmt.Registry) error { - - if swag.IsZero(m.ProtectionGroupConfigurations) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionGroupConfigurations); i++ { - if swag.IsZero(m.ProtectionGroupConfigurations[i]) { // not required - continue - } - - if m.ProtectionGroupConfigurations[i] != nil { - if err := m.ProtectionGroupConfigurations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroupConfigurations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroupConfigurations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectInfo) validateLastRun(formats strfmt.Registry) error { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protected object info based on the context it is used -func (m *ProtectedObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectBackupConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtectionGroupConfigurations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectInfo) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectInfo) contextValidateObjectBackupConfiguration(ctx context.Context, formats strfmt.Registry) error { - - if m.ObjectBackupConfiguration != nil { - - if swag.IsZero(m.ObjectBackupConfiguration) { // not required - return nil - } - - if err := m.ObjectBackupConfiguration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectBackupConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectBackupConfiguration") - } - return err - } - } - - return nil -} - -func (m *ProtectedObjectInfo) contextValidateProtectionGroupConfigurations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionGroupConfigurations); i++ { - - if m.ProtectionGroupConfigurations[i] != nil { - - if swag.IsZero(m.ProtectionGroupConfigurations[i]) { // not required - return nil - } - - if err := m.ProtectionGroupConfigurations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroupConfigurations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroupConfigurations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectInfo) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectInfo) UnmarshalBinary(b []byte) error { - var res ProtectedObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_pause_action_params.go b/v2/models/protected_object_pause_action_params.go deleted file mode 100644 index 474c31ee..00000000 --- a/v2/models/protected_object_pause_action_params.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectedObjectPauseActionParams Specifies the request parameters for Pause action on Protected objects. -// -// swagger:model ProtectedObjectPauseActionParams -type ProtectedObjectPauseActionParams struct { - - // Specifies the list of objects to perform an action. If provided object id is not explicitly protected by object protection, then given action will not be performed on that. - // Min Items: 1 - // Unique: true - Objects []*PauseActionObjectLevelParams `json:"objects"` -} - -// Validate validates this protected object pause action params -func (m *ProtectedObjectPauseActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectPauseActionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected object pause action params based on the context it is used -func (m *ProtectedObjectPauseActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectPauseActionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectPauseActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectPauseActionParams) UnmarshalBinary(b []byte) error { - var res ProtectedObjectPauseActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_resume_action_params.go b/v2/models/protected_object_resume_action_params.go deleted file mode 100644 index 6328fec8..00000000 --- a/v2/models/protected_object_resume_action_params.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectedObjectResumeActionParams Specifies the request parameters for Resume action on Protected objects. -// -// swagger:model ProtectedObjectResumeActionParams -type ProtectedObjectResumeActionParams struct { - - // Specifies the list of objects to perform an action. If provided object id is not explicitly protected by object protection, then given action will not be performed on that. - // Min Items: 1 - // Unique: true - Objects []*ResumeActionObjectLevelParams `json:"objects"` -} - -// Validate validates this protected object resume action params -func (m *ProtectedObjectResumeActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectResumeActionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected object resume action params based on the context it is used -func (m *ProtectedObjectResumeActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectResumeActionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectResumeActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectResumeActionParams) UnmarshalBinary(b []byte) error { - var res ProtectedObjectResumeActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_run_now_action_params.go b/v2/models/protected_object_run_now_action_params.go deleted file mode 100644 index 36bc5481..00000000 --- a/v2/models/protected_object_run_now_action_params.go +++ /dev/null @@ -1,137 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectedObjectRunNowActionParams Specifies the request parameters for RunNow action on Protected objects. -// -// swagger:model ProtectedObjectRunNowActionParams -type ProtectedObjectRunNowActionParams struct { - - // Specifies a label with which this run is created. Only applicable for user triggered protect now action. - RunLabel *string `json:"runLabel,omitempty"` - - // Specifies the list of objects to perform an action. If provided object id is not explicitly protected by object protection, then given action will not be performed on that. - // Min Items: 1 - // Unique: true - Objects []*RunNowActionObjectLevelParams `json:"objects"` -} - -// Validate validates this protected object run now action params -func (m *ProtectedObjectRunNowActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectRunNowActionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected object run now action params based on the context it is used -func (m *ProtectedObjectRunNowActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectRunNowActionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectRunNowActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectRunNowActionParams) UnmarshalBinary(b []byte) error { - var res ProtectedObjectRunNowActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_object_un_protect_action_params.go b/v2/models/protected_object_un_protect_action_params.go deleted file mode 100644 index 14a2ec0e..00000000 --- a/v2/models/protected_object_un_protect_action_params.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectedObjectUnProtectActionParams Specifies the request parameters for Unprotect action on Protected objects. -// -// swagger:model ProtectedObjectUnProtectActionParams -type ProtectedObjectUnProtectActionParams struct { - - // Specifies the list of objects to perform an action. If provided object id is not explicitly protected by object protection, then given action will not be performed on that. - // Min Items: 1 - // Unique: true - Objects []*UnprotectActionObjectLevelParams `json:"objects"` -} - -// Validate validates this protected object un protect action params -func (m *ProtectedObjectUnProtectActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectUnProtectActionParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected object un protect action params based on the context it is used -func (m *ProtectedObjectUnProtectActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectUnProtectActionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectUnProtectActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectUnProtectActionParams) UnmarshalBinary(b []byte) error { - var res ProtectedObjectUnProtectActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_objects_search_metadata.go b/v2/models/protected_objects_search_metadata.go deleted file mode 100644 index 88ae9125..00000000 --- a/v2/models/protected_objects_search_metadata.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObjectsSearchMetadata Protected Objects Search Metadata -// -// # Specifies the metadata information about the Protection Groups, Protection Policy etc., for search result -// -// swagger:model ProtectedObjectsSearchMetadata -type ProtectedObjectsSearchMetadata struct { - - // Specifies the list of unique Protection Group identifiers for all the Objects returned in the response. - UniqueProtectionGroupIdentifiers []*ProtectionGroupIdentifier `json:"uniqueProtectionGroupIdentifiers"` -} - -// Validate validates this protected objects search metadata -func (m *ProtectedObjectsSearchMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUniqueProtectionGroupIdentifiers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSearchMetadata) validateUniqueProtectionGroupIdentifiers(formats strfmt.Registry) error { - if swag.IsZero(m.UniqueProtectionGroupIdentifiers) { // not required - return nil - } - - for i := 0; i < len(m.UniqueProtectionGroupIdentifiers); i++ { - if swag.IsZero(m.UniqueProtectionGroupIdentifiers[i]) { // not required - continue - } - - if m.UniqueProtectionGroupIdentifiers[i] != nil { - if err := m.UniqueProtectionGroupIdentifiers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uniqueProtectionGroupIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uniqueProtectionGroupIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protected objects search metadata based on the context it is used -func (m *ProtectedObjectsSearchMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUniqueProtectionGroupIdentifiers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSearchMetadata) contextValidateUniqueProtectionGroupIdentifiers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UniqueProtectionGroupIdentifiers); i++ { - - if m.UniqueProtectionGroupIdentifiers[i] != nil { - - if swag.IsZero(m.UniqueProtectionGroupIdentifiers[i]) { // not required - return nil - } - - if err := m.UniqueProtectionGroupIdentifiers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uniqueProtectionGroupIdentifiers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uniqueProtectionGroupIdentifiers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsSearchMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsSearchMetadata) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsSearchMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protected_objects_search_response_body.go b/v2/models/protected_objects_search_response_body.go deleted file mode 100644 index 12a435bf..00000000 --- a/v2/models/protected_objects_search_response_body.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedObjectsSearchResponseBody Protected Objects Search Result -// -// Specifies the Protected Objects search result. -// -// swagger:model ProtectedObjectsSearchResponseBody -type ProtectedObjectsSearchResponseBody struct { - - // Specifies the list of Protected Objects. - Objects []*ProtectedObject `json:"objects"` - - // Specifies the total number of search results which matches the search criteria. - NumResults *int64 `json:"numResults,omitempty"` - - // Specifies the metadata information about the Protection Groups, Protection Policy etc., for search result. - Metadata *ProtectedObjectsSearchMetadata `json:"metadata,omitempty"` -} - -// Validate validates this protected objects search response body -func (m *ProtectedObjectsSearchResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSearchResponseBody) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectsSearchResponseBody) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protected objects search response body based on the context it is used -func (m *ProtectedObjectsSearchResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectedObjectsSearchResponseBody) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectedObjectsSearchResponseBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedObjectsSearchResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedObjectsSearchResponseBody) UnmarshalBinary(b []byte) error { - var res ProtectedObjectsSearchResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group.go b/v2/models/protection_group.go deleted file mode 100644 index f9527b0f..00000000 --- a/v2/models/protection_group.go +++ /dev/null @@ -1,2086 +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" -) - -// ProtectionGroup Protection Group response. -// -// swagger:model ProtectionGroup -type ProtectionGroup struct { - CommonProtectionGroupResponseParams - - // Specifies the parameters which are specific to VMware related Protection Groups. - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters which are specific to Acropolis related Protection Groups. - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - // Specifies the parameters which are specific to Kubernetes related Protection Groups. - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - // Specifies the parameters specific to MSSQL Protection Group. - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Oracle Protection Group. - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to View related Protection Groups. - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - // Specifies the parameters which are specific to Pure related Protection Groups. - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - // Specifies the parameters which are specific to IBM FlashSystem related Protection Groups. - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - // Specifies the parameters which are specific to Nimble related Protection Groups. - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Protection Groups. - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Protection Group. - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Protection Group. - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - // Specifies the parameters which are specific to GCP related Protection Groups. - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - // Specifies the parameters which are specific to Kvm related Protection Groups. - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - // Specifies the parameters which are specific to Physical related Protection Groups. - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Active Directory related Protection Groups. - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - // Specifies the parameters which are specific to Office 365 related Protection Groups. - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to NetApp related Protection Groups. - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Generic Nas related Protection Groups. - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Protection Groups. - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Flashblade related Protection Groups. - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to GPFS related Protection Groups. - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Protection Groups. - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Remote Adapter related Protection Groups. - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - // Specifies the parameters which are specific to Exchangee related Protection Groups. - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific to Cassandra Protection Groups. - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters which are specific to Couchbase Protection Groups. - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters which are specific to MongoDB Protection Groups. - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters which are specific to Hive Protection Groups. - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - // Specifies the parameters which are specific to HDFS Protection Groups. - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific to HBase Protection Groups. - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter related Protection Groups. - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to SFDC Adapter related Protection Groups. - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionGroup) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonProtectionGroupResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonProtectionGroupResponseParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.AcropolisParams = dataAO1.AcropolisParams - - m.KubernetesParams = dataAO1.KubernetesParams - - m.MssqlParams = dataAO1.MssqlParams - - m.OracleParams = dataAO1.OracleParams - - m.ViewParams = dataAO1.ViewParams - - m.PureParams = dataAO1.PureParams - - m.IbmFlashSystemParams = dataAO1.IbmFlashSystemParams - - m.NimbleParams = dataAO1.NimbleParams - - m.HypervParams = dataAO1.HypervParams - - m.AwsParams = dataAO1.AwsParams - - m.AzureParams = dataAO1.AzureParams - - m.GcpParams = dataAO1.GcpParams - - m.KvmParams = dataAO1.KvmParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.AdParams = dataAO1.AdParams - - m.Office365Params = dataAO1.Office365Params - - m.NetappParams = dataAO1.NetappParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.IsilonParams = dataAO1.IsilonParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GpfsParams = dataAO1.GpfsParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.RemoteAdapterParams = dataAO1.RemoteAdapterParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.CassandraParams = dataAO1.CassandraParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.MongodbParams = dataAO1.MongodbParams - - m.HiveParams = dataAO1.HiveParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.UdaParams = dataAO1.UdaParams - - m.SfdcParams = dataAO1.SfdcParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionGroup) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonProtectionGroupResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareProtectionGroupParams `json:"vmwareParams,omitempty"` - - AcropolisParams *AcropolisProtectionGroupParams `json:"acropolisParams,omitempty"` - - KubernetesParams *KubernetesProtectionGroupParams `json:"kubernetesParams,omitempty"` - - MssqlParams *MSSQLProtectionGroupParams `json:"mssqlParams,omitempty"` - - OracleParams *OracleProtectionGroupParams `json:"oracleParams,omitempty"` - - ViewParams *ViewProtectionGroupParams `json:"viewParams,omitempty"` - - PureParams *PureProtectionGroupParams `json:"pureParams,omitempty"` - - IbmFlashSystemParams *IbmFlashSystemProtectionGroupParams `json:"ibmFlashSystemParams,omitempty"` - - NimbleParams *NimbleProtectionGroupParams `json:"nimbleParams,omitempty"` - - HypervParams *HyperVProtectionGroupParams `json:"hypervParams,omitempty"` - - AwsParams *AwsProtectionGroupParams `json:"awsParams,omitempty"` - - AzureParams *AzureProtectionGroupParams `json:"azureParams,omitempty"` - - GcpParams *GcpProtectionGroupParams `json:"gcpParams,omitempty"` - - KvmParams *KvmProtectionGroupParams `json:"kvmParams,omitempty"` - - PhysicalParams *PhysicalProtectionGroupParams `json:"physicalParams,omitempty"` - - AdParams *ADProtectionGroupParams `json:"adParams,omitempty"` - - Office365Params *Office365ProtectionGroupParams `json:"office365Params,omitempty"` - - NetappParams *NetappProtectionGroupParams `json:"netappParams,omitempty"` - - GenericNasParams *GenericNasProtectionGroupParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonProtectionGroupParams `json:"isilonParams,omitempty"` - - FlashbladeParams *FlashbladeProtectionGroupParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsProtectionGroupParams `json:"gpfsParams,omitempty"` - - ElastifileParams *ElastifileProtectionGroupParams `json:"elastifileParams,omitempty"` - - RemoteAdapterParams *RemoteAdapterProtectionGroupParams `json:"remoteAdapterParams,omitempty"` - - ExchangeParams *ExchangeProtectionGroupParams `json:"exchangeParams,omitempty"` - - CassandraParams *CassandraProtectionGroupParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *NoSQLProtectionGroupParams `json:"couchbaseParams,omitempty"` - - MongodbParams *MongoDBProtectionGroupParams `json:"mongodbParams,omitempty"` - - HiveParams *NoSQLProtectionGroupParams `json:"hiveParams,omitempty"` - - HdfsParams *HdfsProtectionGroupParams `json:"hdfsParams,omitempty"` - - HbaseParams *NoSQLProtectionGroupParams `json:"hbaseParams,omitempty"` - - UdaParams *UdaProtectionGroupParams `json:"udaParams,omitempty"` - - SfdcParams *SfdcProtectionGroupParams `json:"sfdcParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.AcropolisParams = m.AcropolisParams - - dataAO1.KubernetesParams = m.KubernetesParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.ViewParams = m.ViewParams - - dataAO1.PureParams = m.PureParams - - dataAO1.IbmFlashSystemParams = m.IbmFlashSystemParams - - dataAO1.NimbleParams = m.NimbleParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.AzureParams = m.AzureParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.KvmParams = m.KvmParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.AdParams = m.AdParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.NetappParams = m.NetappParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.RemoteAdapterParams = m.RemoteAdapterParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.SfdcParams = m.SfdcParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection group -func (m *ProtectionGroup) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupResponseParams - if err := m.CommonProtectionGroupResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNimbleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteAdapterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroup) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateAcropolisParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateKubernetesParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateViewParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validatePureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if m.PureParams != nil { - if err := m.PureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateIbmFlashSystemParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if m.IbmFlashSystemParams != nil { - if err := m.IbmFlashSystemParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateNimbleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NimbleParams) { // not required - return nil - } - - if m.NimbleParams != nil { - if err := m.NimbleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateKvmParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if m.KvmParams != nil { - if err := m.KvmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateAdParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AdParams) { // not required - return nil - } - - if m.AdParams != nil { - if err := m.AdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateRemoteAdapterParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RemoteAdapterParams) { // not required - return nil - } - - if m.RemoteAdapterParams != nil { - if err := m.RemoteAdapterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAdapterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAdapterParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection group based on the context it is used -func (m *ProtectionGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupResponseParams - if err := m.CommonProtectionGroupResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmFlashSystemParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNimbleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteAdapterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroup) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidatePureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureParams != nil { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if err := m.PureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateIbmFlashSystemParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmFlashSystemParams != nil { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if err := m.IbmFlashSystemParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateNimbleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NimbleParams != nil { - - if swag.IsZero(m.NimbleParams) { // not required - return nil - } - - if err := m.NimbleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateKvmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmParams != nil { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if err := m.KvmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateAdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AdParams != nil { - - if swag.IsZero(m.AdParams) { // not required - return nil - } - - if err := m.AdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateRemoteAdapterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteAdapterParams != nil { - - if swag.IsZero(m.RemoteAdapterParams) { // not required - return nil - } - - if err := m.RemoteAdapterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteAdapterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteAdapterParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *ProtectionGroup) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroup) UnmarshalBinary(b []byte) error { - var res ProtectionGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_alerting_policy.go b/v2/models/protection_group_alerting_policy.go deleted file mode 100644 index 5d8bcaf6..00000000 --- a/v2/models/protection_group_alerting_policy.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionGroupAlertingPolicy Specifies a policy for alerting users of the status of a Protection Group. -// -// swagger:model ProtectionGroupAlertingPolicy -type ProtectionGroupAlertingPolicy struct { - - // Specifies the run status for which the user would like to receive alerts. - // Required: true - // Min Items: 1 - // Unique: true - BackupRunStatus []string `json:"backupRunStatus"` - - // Specifies a list of targets to receive the alerts. - AlertTargets []*AlertTarget `json:"alertTargets"` - - // Specifies whether object level alerts are raised for backup failures after the backup run. - RaiseObjectLevelFailureAlert bool `json:"raiseObjectLevelFailureAlert,omitempty"` - - // Specifies whether object level alerts are raised for backup failures after last backup attempt. - RaiseObjectLevelFailureAlertAfterLastAttempt bool `json:"raiseObjectLevelFailureAlertAfterLastAttempt,omitempty"` - - // Specifies whether object level alerts are raised for backup failures after each backup attempt. - RaiseObjectLevelFailureAlertAfterEachAttempt bool `json:"raiseObjectLevelFailureAlertAfterEachAttempt,omitempty"` -} - -// Validate validates this protection group alerting policy -func (m *ProtectionGroupAlertingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAlertTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionGroupAlertingPolicyBackupRunStatusItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSuccess","kFailure","kSlaViolation","kWarning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionGroupAlertingPolicyBackupRunStatusItemsEnum = append(protectionGroupAlertingPolicyBackupRunStatusItemsEnum, v) - } -} - -func (m *ProtectionGroupAlertingPolicy) validateBackupRunStatusItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionGroupAlertingPolicyBackupRunStatusItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionGroupAlertingPolicy) validateBackupRunStatus(formats strfmt.Registry) error { - - if err := validate.Required("backupRunStatus", "body", m.BackupRunStatus); err != nil { - return err - } - - iBackupRunStatusSize := int64(len(m.BackupRunStatus)) - - if err := validate.MinItems("backupRunStatus", "body", iBackupRunStatusSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("backupRunStatus", "body", m.BackupRunStatus); err != nil { - return err - } - - for i := 0; i < len(m.BackupRunStatus); i++ { - - // value enum - if err := m.validateBackupRunStatusItemsEnum("backupRunStatus"+"."+strconv.Itoa(i), "body", m.BackupRunStatus[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *ProtectionGroupAlertingPolicy) validateAlertTargets(formats strfmt.Registry) error { - if swag.IsZero(m.AlertTargets) { // not required - return nil - } - - for i := 0; i < len(m.AlertTargets); i++ { - if swag.IsZero(m.AlertTargets[i]) { // not required - continue - } - - if m.AlertTargets[i] != nil { - if err := m.AlertTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection group alerting policy based on the context it is used -func (m *ProtectionGroupAlertingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlertTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroupAlertingPolicy) contextValidateAlertTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AlertTargets); i++ { - - if m.AlertTargets[i] != nil { - - if swag.IsZero(m.AlertTargets[i]) { // not required - return nil - } - - if err := m.AlertTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alertTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alertTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupAlertingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupAlertingPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionGroupAlertingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_identifier.go b/v2/models/protection_group_identifier.go deleted file mode 100644 index f8260a14..00000000 --- a/v2/models/protection_group_identifier.go +++ /dev/null @@ -1,55 +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" -) - -// ProtectionGroupIdentifier Protection Group Identifier. -// -// Specifies Protection Group Identifier. -// -// swagger:model ProtectionGroupIdentifier -type ProtectionGroupIdentifier struct { - - // Specifies Protection Group id. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies Protection Group name. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` -} - -// Validate validates this protection group identifier -func (m *ProtectionGroupIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection group identifier based on context it is used -func (m *ProtectionGroupIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupIdentifier) UnmarshalBinary(b []byte) error { - var res ProtectionGroupIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_info.go b/v2/models/protection_group_info.go deleted file mode 100644 index 51a67aa9..00000000 --- a/v2/models/protection_group_info.go +++ /dev/null @@ -1,357 +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" -) - -// ProtectionGroupInfo Protection Group Info -// -// Specifies basic information about a Protection Group. -// -// swagger:model ProtectionGroupInfo -type ProtectionGroupInfo struct { - - // This field is deprecated. 'protectionGroupId' should be used instead. - // Specifies the id of the Protection Group. - GroupID *int64 `json:"groupId,omitempty"` - - // Specifies the protection group id. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the name of the Protection Group. - GroupName *string `json:"groupName,omitempty"` - - // Specifies if the Protection Group's run is paused. - IsPaused *bool `json:"isPaused,omitempty"` - - // Specifies the type of the Protection Group such as View or Puppeteer. - // 'Puppeteer' refers to a Remote Adapter Group. - // Supported environment types such as 'View', 'SQL', 'VMware', etc. - // NOTE: 'Puppeteer' refers to Cohesity's Remote Adapter. - // 'VMware' indicates the VMware Protection Source environment. - // 'HyperV' indicates the HyperV Protection Source environment. - // 'SQL' indicates the SQL Protection Source environment. - // 'View' indicates the View Protection Source environment. - // 'Puppeteer' indicates the Cohesity's Remote Adapter. - // 'Physical' indicates the physical Protection Source environment. - // 'Pure' indicates the Pure Storage Protection Source environment. - // 'Nimble' indicates the Nimble Storage Protection Source environment. - // 'Azure' indicates the Microsoft's Azure Protection Source environment. - // 'Netapp' indicates the Netapp Protection Source environment. - // 'Agent' indicates the Agent Protection Source environment. - // 'GenericNas' indicates the Generic Network Attached Storage Protection - // Source environment. - // 'Acropolis' indicates the Acropolis Protection Source environment. - // 'PhsicalFiles' indicates the Physical Files Protection Source environment. - // 'Isilon' indicates the Dell EMC's Isilon Protection Source environment. - // 'GPFS' indicates IBM's GPFS Protection Source environment. - // 'KVM' indicates the KVM Protection Source environment. - // 'AWS' indicates the AWS Protection Source environment. - // 'Exchange' indicates the Exchange Protection Source environment. - // 'HyperVVSS' indicates the HyperV VSS Protection Source - // environment. - // 'Oracle' indicates the Oracle Protection Source environment. - // 'GCP' indicates the Google Cloud Platform Protection Source environment. - // 'FlashBlade' indicates the Flash Blade Protection Source environment. - // 'AWSNative' indicates the AWS Native Protection Source environment. - // 'O365' indicates the Office 365 Protection Source environment. - // 'O365Outlook' indicates Office 365 outlook Protection Source environment. - // 'HyperFlex' indicates the Hyper Flex Protection Source environment. - // 'GCPNative' indicates the GCP Native Protection Source environment. - // 'AzureNative' indicates the Azure Native Protection Source environment. - // 'Kubernetes' indicates a Kubernetes Protection Source environment. - // 'Elastifile' indicates Elastifile Protection Source environment. - // 'AD' indicates Active Directory Protection Source environment. - // Enum: ["kVMware","kHyperV","kVCD","kSQL","kView","kRemoteAdapter","kPhysical","kPure","kIbmFlashSystem","kAzure","kNetapp","kGenericNas","kAcropolis","kIsilon","kKVM","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kExchange","kOracle","kGCP","kFlashBlade","kO365","kHyperFlex","kAD","kGPFS","kKubernetes","kNimble","kElastifile","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kO365Sharepoint","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kSfdc"] - Type *string `json:"type,omitempty"` - - // Specifies information about the last run for this Protection Group. - LastRun *ProtectionGroupRun `json:"lastRun,omitempty"` -} - -// Validate validates this protection group info -func (m *ProtectionGroupInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionGroupInfoTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kVCD","kSQL","kView","kRemoteAdapter","kPhysical","kPure","kIbmFlashSystem","kAzure","kNetapp","kGenericNas","kAcropolis","kIsilon","kKVM","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kExchange","kOracle","kGCP","kFlashBlade","kO365","kHyperFlex","kAD","kGPFS","kKubernetes","kNimble","kElastifile","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kO365Sharepoint","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionGroupInfoTypeTypePropEnum = append(protectionGroupInfoTypeTypePropEnum, v) - } -} - -const ( - - // ProtectionGroupInfoTypeKVMware captures enum value "kVMware" - ProtectionGroupInfoTypeKVMware string = "kVMware" - - // ProtectionGroupInfoTypeKHyperV captures enum value "kHyperV" - ProtectionGroupInfoTypeKHyperV string = "kHyperV" - - // ProtectionGroupInfoTypeKVCD captures enum value "kVCD" - ProtectionGroupInfoTypeKVCD string = "kVCD" - - // ProtectionGroupInfoTypeKSQL captures enum value "kSQL" - ProtectionGroupInfoTypeKSQL string = "kSQL" - - // ProtectionGroupInfoTypeKView captures enum value "kView" - ProtectionGroupInfoTypeKView string = "kView" - - // ProtectionGroupInfoTypeKRemoteAdapter captures enum value "kRemoteAdapter" - ProtectionGroupInfoTypeKRemoteAdapter string = "kRemoteAdapter" - - // ProtectionGroupInfoTypeKPhysical captures enum value "kPhysical" - ProtectionGroupInfoTypeKPhysical string = "kPhysical" - - // ProtectionGroupInfoTypeKPure captures enum value "kPure" - ProtectionGroupInfoTypeKPure string = "kPure" - - // ProtectionGroupInfoTypeKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionGroupInfoTypeKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionGroupInfoTypeKAzure captures enum value "kAzure" - ProtectionGroupInfoTypeKAzure string = "kAzure" - - // ProtectionGroupInfoTypeKNetapp captures enum value "kNetapp" - ProtectionGroupInfoTypeKNetapp string = "kNetapp" - - // ProtectionGroupInfoTypeKGenericNas captures enum value "kGenericNas" - ProtectionGroupInfoTypeKGenericNas string = "kGenericNas" - - // ProtectionGroupInfoTypeKAcropolis captures enum value "kAcropolis" - ProtectionGroupInfoTypeKAcropolis string = "kAcropolis" - - // ProtectionGroupInfoTypeKIsilon captures enum value "kIsilon" - ProtectionGroupInfoTypeKIsilon string = "kIsilon" - - // ProtectionGroupInfoTypeKKVM captures enum value "kKVM" - ProtectionGroupInfoTypeKKVM string = "kKVM" - - // ProtectionGroupInfoTypeKAWS captures enum value "kAWS" - ProtectionGroupInfoTypeKAWS string = "kAWS" - - // ProtectionGroupInfoTypeKAWSNative captures enum value "kAWSNative" - ProtectionGroupInfoTypeKAWSNative string = "kAWSNative" - - // ProtectionGroupInfoTypeKAwsS3 captures enum value "kAwsS3" - ProtectionGroupInfoTypeKAwsS3 string = "kAwsS3" - - // ProtectionGroupInfoTypeKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ProtectionGroupInfoTypeKAWSSnapshotManager string = "kAWSSnapshotManager" - - // ProtectionGroupInfoTypeKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionGroupInfoTypeKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionGroupInfoTypeKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ProtectionGroupInfoTypeKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ProtectionGroupInfoTypeKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ProtectionGroupInfoTypeKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ProtectionGroupInfoTypeKAzureNative captures enum value "kAzureNative" - ProtectionGroupInfoTypeKAzureNative string = "kAzureNative" - - // ProtectionGroupInfoTypeKAzureSQL captures enum value "kAzureSQL" - ProtectionGroupInfoTypeKAzureSQL string = "kAzureSQL" - - // ProtectionGroupInfoTypeKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - ProtectionGroupInfoTypeKAzureSnapshotManager string = "kAzureSnapshotManager" - - // ProtectionGroupInfoTypeKExchange captures enum value "kExchange" - ProtectionGroupInfoTypeKExchange string = "kExchange" - - // ProtectionGroupInfoTypeKOracle captures enum value "kOracle" - ProtectionGroupInfoTypeKOracle string = "kOracle" - - // ProtectionGroupInfoTypeKGCP captures enum value "kGCP" - ProtectionGroupInfoTypeKGCP string = "kGCP" - - // ProtectionGroupInfoTypeKFlashBlade captures enum value "kFlashBlade" - ProtectionGroupInfoTypeKFlashBlade string = "kFlashBlade" - - // ProtectionGroupInfoTypeKO365 captures enum value "kO365" - ProtectionGroupInfoTypeKO365 string = "kO365" - - // ProtectionGroupInfoTypeKHyperFlex captures enum value "kHyperFlex" - ProtectionGroupInfoTypeKHyperFlex string = "kHyperFlex" - - // ProtectionGroupInfoTypeKAD captures enum value "kAD" - ProtectionGroupInfoTypeKAD string = "kAD" - - // ProtectionGroupInfoTypeKGPFS captures enum value "kGPFS" - ProtectionGroupInfoTypeKGPFS string = "kGPFS" - - // ProtectionGroupInfoTypeKKubernetes captures enum value "kKubernetes" - ProtectionGroupInfoTypeKKubernetes string = "kKubernetes" - - // ProtectionGroupInfoTypeKNimble captures enum value "kNimble" - ProtectionGroupInfoTypeKNimble string = "kNimble" - - // ProtectionGroupInfoTypeKElastifile captures enum value "kElastifile" - ProtectionGroupInfoTypeKElastifile string = "kElastifile" - - // ProtectionGroupInfoTypeKCassandra captures enum value "kCassandra" - ProtectionGroupInfoTypeKCassandra string = "kCassandra" - - // ProtectionGroupInfoTypeKMongoDB captures enum value "kMongoDB" - ProtectionGroupInfoTypeKMongoDB string = "kMongoDB" - - // ProtectionGroupInfoTypeKCouchbase captures enum value "kCouchbase" - ProtectionGroupInfoTypeKCouchbase string = "kCouchbase" - - // ProtectionGroupInfoTypeKHdfs captures enum value "kHdfs" - ProtectionGroupInfoTypeKHdfs string = "kHdfs" - - // ProtectionGroupInfoTypeKHive captures enum value "kHive" - ProtectionGroupInfoTypeKHive string = "kHive" - - // ProtectionGroupInfoTypeKHBase captures enum value "kHBase" - ProtectionGroupInfoTypeKHBase string = "kHBase" - - // ProtectionGroupInfoTypeKUDA captures enum value "kUDA" - ProtectionGroupInfoTypeKUDA string = "kUDA" - - // ProtectionGroupInfoTypeKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionGroupInfoTypeKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionGroupInfoTypeKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionGroupInfoTypeKO365PublicFolders string = "kO365PublicFolders" - - // ProtectionGroupInfoTypeKO365Teams captures enum value "kO365Teams" - ProtectionGroupInfoTypeKO365Teams string = "kO365Teams" - - // ProtectionGroupInfoTypeKO365Group captures enum value "kO365Group" - ProtectionGroupInfoTypeKO365Group string = "kO365Group" - - // ProtectionGroupInfoTypeKO365Exchange captures enum value "kO365Exchange" - ProtectionGroupInfoTypeKO365Exchange string = "kO365Exchange" - - // ProtectionGroupInfoTypeKO365OneDrive captures enum value "kO365OneDrive" - ProtectionGroupInfoTypeKO365OneDrive string = "kO365OneDrive" - - // ProtectionGroupInfoTypeKSfdc captures enum value "kSfdc" - ProtectionGroupInfoTypeKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ProtectionGroupInfo) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionGroupInfoTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionGroupInfo) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *ProtectionGroupInfo) validateLastRun(formats strfmt.Registry) error { - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if m.LastRun != nil { - if err := m.LastRun.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protection group info based on the context it is used -func (m *ProtectionGroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastRun(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroupInfo) contextValidateLastRun(ctx context.Context, formats strfmt.Registry) error { - - if m.LastRun != nil { - - if swag.IsZero(m.LastRun) { // not required - return nil - } - - if err := m.LastRun.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastRun") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastRun") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupInfo) UnmarshalBinary(b []byte) error { - var res ProtectionGroupInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_priority.go b/v2/models/protection_group_priority.go deleted file mode 100644 index dafd75fe..00000000 --- a/v2/models/protection_group_priority.go +++ /dev/null @@ -1,110 +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" -) - -// ProtectionGroupPriority Protection Group Priority type. -// -// Protection Group Priority type. -// -// swagger:model ProtectionGroupPriority -type ProtectionGroupPriority struct { - - // Specifies Protection Group priority. - // Enum: ["kLow","kMedium","kHigh"] - ProtectionGroupPriority string `json:"protectionGroupPriority,omitempty"` -} - -// Validate validates this protection group priority -func (m *ProtectionGroupPriority) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupPriority(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionGroupPriorityTypeProtectionGroupPriorityPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLow","kMedium","kHigh"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionGroupPriorityTypeProtectionGroupPriorityPropEnum = append(protectionGroupPriorityTypeProtectionGroupPriorityPropEnum, v) - } -} - -const ( - - // ProtectionGroupPriorityProtectionGroupPriorityKLow captures enum value "kLow" - ProtectionGroupPriorityProtectionGroupPriorityKLow string = "kLow" - - // ProtectionGroupPriorityProtectionGroupPriorityKMedium captures enum value "kMedium" - ProtectionGroupPriorityProtectionGroupPriorityKMedium string = "kMedium" - - // ProtectionGroupPriorityProtectionGroupPriorityKHigh captures enum value "kHigh" - ProtectionGroupPriorityProtectionGroupPriorityKHigh string = "kHigh" -) - -// prop value enum -func (m *ProtectionGroupPriority) validateProtectionGroupPriorityEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionGroupPriorityTypeProtectionGroupPriorityPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionGroupPriority) validateProtectionGroupPriority(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupPriority) { // not required - return nil - } - - // value enum - if err := m.validateProtectionGroupPriorityEnum("protectionGroupPriority", "body", m.ProtectionGroupPriority); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection group priority based on context it is used -func (m *ProtectionGroupPriority) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupPriority) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupPriority) UnmarshalBinary(b []byte) error { - var res ProtectionGroupPriority - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_run.go b/v2/models/protection_group_run.go deleted file mode 100644 index 553d314a..00000000 --- a/v2/models/protection_group_run.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" -) - -// ProtectionGroupRun Protection run. -// -// swagger:model ProtectionGroupRun -type ProtectionGroupRun struct { - CommonProtectionGroupRunResponseParameters -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionGroupRun) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonProtectionGroupRunResponseParameters - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonProtectionGroupRunResponseParameters = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionGroupRun) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonProtectionGroupRunResponseParameters) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection group run -func (m *ProtectionGroupRun) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupRunResponseParameters - if err := m.CommonProtectionGroupRunResponseParameters.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection group run based on the context it is used -func (m *ProtectionGroupRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonProtectionGroupRunResponseParameters - if err := m.CommonProtectionGroupRunResponseParameters.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupRun) UnmarshalBinary(b []byte) error { - var res ProtectionGroupRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_run_actions.go b/v2/models/protection_group_run_actions.go deleted file mode 100644 index 1361f0af..00000000 --- a/v2/models/protection_group_run_actions.go +++ /dev/null @@ -1,110 +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" -) - -// ProtectionGroupRunActions Protection Group Run Actions -// -// Specifies the various actions that can be performed on a protection run. -// -// swagger:model ProtectionGroupRunActions -type ProtectionGroupRunActions struct { - - // Specifies the action to be performed on a run. - // Enum: ["Pause","Resume","Cancel"] - Action string `json:"action,omitempty"` -} - -// Validate validates this protection group run actions -func (m *ProtectionGroupRunActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionGroupRunActionsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionGroupRunActionsTypeActionPropEnum = append(protectionGroupRunActionsTypeActionPropEnum, v) - } -} - -const ( - - // ProtectionGroupRunActionsActionPause captures enum value "Pause" - ProtectionGroupRunActionsActionPause string = "Pause" - - // ProtectionGroupRunActionsActionResume captures enum value "Resume" - ProtectionGroupRunActionsActionResume string = "Resume" - - // ProtectionGroupRunActionsActionCancel captures enum value "Cancel" - ProtectionGroupRunActionsActionCancel string = "Cancel" -) - -// prop value enum -func (m *ProtectionGroupRunActions) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionGroupRunActionsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionGroupRunActions) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection group run actions based on context it is used -func (m *ProtectionGroupRunActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupRunActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupRunActions) UnmarshalBinary(b []byte) error { - var res ProtectionGroupRunActions - 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 deleted file mode 100644 index 4e67eaee..00000000 --- a/v2/models/protection_group_runs.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionGroupRuns Protection runs. -// -// swagger:model ProtectionGroupRuns -type ProtectionGroupRuns struct { - - // Specifies the list of Protection Group runs. - Runs []*ProtectionGroupRun `json:"runs"` - - // 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"` -} - -// Validate validates this protection group runs -func (m *ProtectionGroupRuns) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroupRuns) validateRuns(formats strfmt.Registry) error { - if swag.IsZero(m.Runs) { // not required - return nil - } - - for i := 0; i < len(m.Runs); i++ { - if swag.IsZero(m.Runs[i]) { // not required - continue - } - - if m.Runs[i] != nil { - if err := m.Runs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection group runs based on the context it is used -func (m *ProtectionGroupRuns) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroupRuns) contextValidateRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Runs); i++ { - - if m.Runs[i] != nil { - - if swag.IsZero(m.Runs[i]) { // not required - return nil - } - - if err := m.Runs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("runs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("runs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupRuns) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupRuns) UnmarshalBinary(b []byte) error { - var res ProtectionGroupRuns - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_group_state_change_actions.go b/v2/models/protection_group_state_change_actions.go deleted file mode 100644 index 56f11d20..00000000 --- a/v2/models/protection_group_state_change_actions.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionGroupStateChangeActions Protection Group State Change Actions type. -// -// Protection Group State Change Actions type. -// -// swagger:model ProtectionGroupStateChangeActions -type ProtectionGroupStateChangeActions struct { - - // Specifies Protection Group State Change Actions type. - // Enum: ["kPause","kResume"] - ProtectionGroupStateChangeActions string `json:"protectionGroupStateChangeActions,omitempty"` -} - -// Validate validates this protection group state change actions -func (m *ProtectionGroupStateChangeActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupStateChangeActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionGroupStateChangeActionsTypeProtectionGroupStateChangeActionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPause","kResume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionGroupStateChangeActionsTypeProtectionGroupStateChangeActionsPropEnum = append(protectionGroupStateChangeActionsTypeProtectionGroupStateChangeActionsPropEnum, v) - } -} - -const ( - - // ProtectionGroupStateChangeActionsProtectionGroupStateChangeActionsKPause captures enum value "kPause" - ProtectionGroupStateChangeActionsProtectionGroupStateChangeActionsKPause string = "kPause" - - // ProtectionGroupStateChangeActionsProtectionGroupStateChangeActionsKResume captures enum value "kResume" - ProtectionGroupStateChangeActionsProtectionGroupStateChangeActionsKResume string = "kResume" -) - -// prop value enum -func (m *ProtectionGroupStateChangeActions) validateProtectionGroupStateChangeActionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionGroupStateChangeActionsTypeProtectionGroupStateChangeActionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionGroupStateChangeActions) validateProtectionGroupStateChangeActions(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupStateChangeActions) { // not required - return nil - } - - // value enum - if err := m.validateProtectionGroupStateChangeActionsEnum("protectionGroupStateChangeActions", "body", m.ProtectionGroupStateChangeActions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection group state change actions based on context it is used -func (m *ProtectionGroupStateChangeActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroupStateChangeActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroupStateChangeActions) UnmarshalBinary(b []byte) error { - var res ProtectionGroupStateChangeActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_groups.go b/v2/models/protection_groups.go deleted file mode 100644 index 6240246e..00000000 --- a/v2/models/protection_groups.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionGroups Protection Group response. -// -// swagger:model ProtectionGroups -type ProtectionGroups struct { - - // Specifies the list of Protection Groups which were returned by the request. - ProtectionGroups []*ProtectionGroup `json:"protectionGroups"` -} - -// Validate validates this protection groups -func (m *ProtectionGroups) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroups) validateProtectionGroups(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroups) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionGroups); i++ { - if swag.IsZero(m.ProtectionGroups[i]) { // not required - continue - } - - if m.ProtectionGroups[i] != nil { - if err := m.ProtectionGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection groups based on the context it is used -func (m *ProtectionGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionGroups) contextValidateProtectionGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionGroups); i++ { - - if m.ProtectionGroups[i] != nil { - - if swag.IsZero(m.ProtectionGroups[i]) { // not required - return nil - } - - if err := m.ProtectionGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionGroups) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionGroups) UnmarshalBinary(b []byte) error { - var res ProtectionGroups - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_object_input.go b/v2/models/protection_object_input.go deleted file mode 100644 index 75d323d2..00000000 --- a/v2/models/protection_object_input.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" - "github.com/go-openapi/validate" -) - -// ProtectionObjectInput Specifies an object protected by a Protection Group. -// -// swagger:model ProtectionObjectInput -type ProtectionObjectInput struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this protection object input -func (m *ProtectionObjectInput) 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 *ProtectionObjectInput) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection object input based on the context it is used -func (m *ProtectionObjectInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionObjectInput) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionObjectInput) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionObjectInput) UnmarshalBinary(b []byte) error { - var res ProtectionObjectInput - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy.go b/v2/models/protection_policy.go deleted file mode 100644 index 0ecf8143..00000000 --- a/v2/models/protection_policy.go +++ /dev/null @@ -1,483 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionPolicy Protection Policy -// -// Specifies common fields required to define Protection Policy. -// -// swagger:model ProtectionPolicy -type ProtectionPolicy struct { - - // Specifies the name of the Protection Policy. - // Required: true - Name *string `json:"name"` - - // Specifies the backup schedule of a Protection Policy. - // Required: true - BackupPolicy *BackupPolicy `json:"backupPolicy"` - - // Specifies the description of the Protection Policy. - Description *string `json:"description,omitempty"` - - // Blackout Window - // - // List of Blackout Windows. If specified, this field defines blackout periods when new Group Runs are not started. If a Group Run has been scheduled but not yet executed and the blackout period starts, the behavior depends on the policy field AbortInBlackoutPeriod. - BlackoutWindow []*BlackoutWindow `json:"blackoutWindow"` - - // Extended Retention - // - // Specifies additional retention policies that should be applied to the backup snapshots. A backup snapshot will be retained up to a time that is the maximum of all retention policies that are applicable to it. - ExtendedRetention []*ExtendedRetentionPolicy `json:"extendedRetention"` - - // Specifies the remote, archival or cloudSpin targets where the snapshot is backed up. - RemoteTargetPolicy *TargetsConfiguration `json:"remoteTargetPolicy,omitempty"` - - // Specifies the configuration for cascaded replications. Using cascaded replication, replication cluster(Rx) can further replicate and archive the snapshot copies to further targets. Its recommended to create cascaded configuration where protection group will be created. - CascadedTargetsConfig []*CascadedTargetConfiguration `json:"cascadedTargetsConfig"` - - // Specifies the retry options of a Protection Policy. - RetryOptions *RetryOptions `json:"retryOptions,omitempty"` - - // This field is now deprecated. Please use the DataLockConfig in the backup retention. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Specifies the current policy verison. Policy version is incremented for optionally supporting new features and differentialting across releases. - Version *int32 `json:"version,omitempty"` - - // Specifies true if Calender Based Schedule is supported by client. Default value is assumed as false for this feature. - IsCBSEnabled *bool `json:"isCBSEnabled,omitempty"` - - // Specifies the last time this Policy was updated. If this is passed into a PUT request, then the backend will validate that the timestamp passed in matches the time that the policy was actually last modified. If the two timestamps do not match, then the request will be rejected with a stale error. - LastModificationTimeUsecs *int64 `json:"lastModificationTimeUsecs,omitempty"` -} - -// Validate validates this protection policy -func (m *ProtectionPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBlackoutWindow(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExtendedRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteTargetPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCascadedTargetsConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetryOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicy) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ProtectionPolicy) validateBackupPolicy(formats strfmt.Registry) error { - - if err := validate.Required("backupPolicy", "body", m.BackupPolicy); err != nil { - return err - } - - if m.BackupPolicy != nil { - if err := m.BackupPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateBlackoutWindow(formats strfmt.Registry) error { - if swag.IsZero(m.BlackoutWindow) { // not required - return nil - } - - for i := 0; i < len(m.BlackoutWindow); i++ { - if swag.IsZero(m.BlackoutWindow[i]) { // not required - continue - } - - if m.BlackoutWindow[i] != nil { - if err := m.BlackoutWindow[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateExtendedRetention(formats strfmt.Registry) error { - if swag.IsZero(m.ExtendedRetention) { // not required - return nil - } - - for i := 0; i < len(m.ExtendedRetention); i++ { - if swag.IsZero(m.ExtendedRetention[i]) { // not required - continue - } - - if m.ExtendedRetention[i] != nil { - if err := m.ExtendedRetention[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateRemoteTargetPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteTargetPolicy) { // not required - return nil - } - - if m.RemoteTargetPolicy != nil { - if err := m.RemoteTargetPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) validateCascadedTargetsConfig(formats strfmt.Registry) error { - if swag.IsZero(m.CascadedTargetsConfig) { // not required - return nil - } - - for i := 0; i < len(m.CascadedTargetsConfig); i++ { - if swag.IsZero(m.CascadedTargetsConfig[i]) { // not required - continue - } - - if m.CascadedTargetsConfig[i] != nil { - if err := m.CascadedTargetsConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cascadedTargetsConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cascadedTargetsConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) validateRetryOptions(formats strfmt.Registry) error { - if swag.IsZero(m.RetryOptions) { // not required - return nil - } - - if m.RetryOptions != nil { - if err := m.RetryOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryOptions") - } - return err - } - } - - return nil -} - -var protectionPolicyTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyTypeDataLockPropEnum = append(protectionPolicyTypeDataLockPropEnum, v) - } -} - -const ( - - // ProtectionPolicyDataLockCompliance captures enum value "Compliance" - ProtectionPolicyDataLockCompliance string = "Compliance" - - // ProtectionPolicyDataLockAdministrative captures enum value "Administrative" - ProtectionPolicyDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *ProtectionPolicy) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicy) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this protection policy based on the context it is used -func (m *ProtectionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBlackoutWindow(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExtendedRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteTargetPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCascadedTargetsConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetryOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicy) contextValidateBackupPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupPolicy != nil { - - if err := m.BackupPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateBlackoutWindow(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BlackoutWindow); i++ { - - if m.BlackoutWindow[i] != nil { - - if swag.IsZero(m.BlackoutWindow[i]) { // not required - return nil - } - - if err := m.BlackoutWindow[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("blackoutWindow" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateExtendedRetention(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtendedRetention); i++ { - - if m.ExtendedRetention[i] != nil { - - if swag.IsZero(m.ExtendedRetention[i]) { // not required - return nil - } - - if err := m.ExtendedRetention[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extendedRetention" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateRemoteTargetPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteTargetPolicy != nil { - - if swag.IsZero(m.RemoteTargetPolicy) { // not required - return nil - } - - if err := m.RemoteTargetPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetPolicy") - } - return err - } - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateCascadedTargetsConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CascadedTargetsConfig); i++ { - - if m.CascadedTargetsConfig[i] != nil { - - if swag.IsZero(m.CascadedTargetsConfig[i]) { // not required - return nil - } - - if err := m.CascadedTargetsConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cascadedTargetsConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cascadedTargetsConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProtectionPolicy) contextValidateRetryOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.RetryOptions != nil { - - if swag.IsZero(m.RetryOptions) { // not required - return nil - } - - if err := m.RetryOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy_identifier.go b/v2/models/protection_policy_identifier.go deleted file mode 100644 index e84204df..00000000 --- a/v2/models/protection_policy_identifier.go +++ /dev/null @@ -1,55 +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" -) - -// ProtectionPolicyIdentifier Protection Policy Identifier. -// -// Specifies Protection Policy Identifier. -// -// swagger:model ProtectionPolicyIdentifier -type ProtectionPolicyIdentifier struct { - - // Specifies Protection Policy id. - ProtectionPolicyID *string `json:"protectionPolicyId,omitempty"` - - // Specifies Protection Policy name. - ProtectionPolicyName *string `json:"protectionPolicyName,omitempty"` -} - -// Validate validates this protection policy identifier -func (m *ProtectionPolicyIdentifier) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protection policy identifier based on context it is used -func (m *ProtectionPolicyIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyIdentifier) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy_request.go b/v2/models/protection_policy_request.go deleted file mode 100644 index 7f1947ae..00000000 --- a/v2/models/protection_policy_request.go +++ /dev/null @@ -1,119 +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" -) - -// ProtectionPolicyRequest Protection Policy Request. -// -// Specifies the request to create a Protection Policy. -// -// swagger:model ProtectionPolicyRequest -type ProtectionPolicyRequest struct { - ProtectionPolicy - - // Specifies the parent policy template id to which the policy is linked to. - TemplateID *string `json:"templateId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionPolicy = aO0 - - // AO1 - var dataAO1 struct { - TemplateID *string `json:"templateId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TemplateID = dataAO1.TemplateID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TemplateID *string `json:"templateId,omitempty"` - } - - dataAO1.TemplateID = m.TemplateID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy request -func (m *ProtectionPolicyRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy request based on the context it is used -func (m *ProtectionPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyRequest) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy_response.go b/v2/models/protection_policy_response.go deleted file mode 100644 index deae4bd8..00000000 --- a/v2/models/protection_policy_response.go +++ /dev/null @@ -1,174 +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" -) - -// ProtectionPolicyResponse Protection Policy -// -// Specifies the details about the Protection Policy. -// -// swagger:model ProtectionPolicyResponse -type ProtectionPolicyResponse struct { - ProtectionPolicy - - // Specifies a unique Policy id assigned by the Cohesity Cluster. - ID *string `json:"id,omitempty"` - - // Specifies the parent policy template id to which the policy is linked to. This field is set only when policy is created from template. - TemplateID *string `json:"templateId,omitempty"` - - // This field is set to true if the linked policy which is internally created from a policy templates qualifies as usable to create more policies on the cluster. If the linked policy is partially filled and can not create a working policy then this field will be set to false. In case of normal policy created on the cluster, this field wont be populated. - IsUsable *bool `json:"isUsable,omitempty"` - - // This field is set to true when policy is the replicated policy. - IsReplicated *bool `json:"isReplicated,omitempty"` - - // Specifies the number of protection groups using the protection policy. - NumProtectionGroups *int64 `json:"numProtectionGroups,omitempty"` - - // Specifies the number of protected objects using the protection policy. - NumProtectedObjects *int64 `json:"numProtectedObjects,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionPolicy = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - TemplateID *string `json:"templateId,omitempty"` - - IsUsable *bool `json:"isUsable,omitempty"` - - IsReplicated *bool `json:"isReplicated,omitempty"` - - NumProtectionGroups *int64 `json:"numProtectionGroups,omitempty"` - - NumProtectedObjects *int64 `json:"numProtectedObjects,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.TemplateID = dataAO1.TemplateID - - m.IsUsable = dataAO1.IsUsable - - m.IsReplicated = dataAO1.IsReplicated - - m.NumProtectionGroups = dataAO1.NumProtectionGroups - - m.NumProtectedObjects = dataAO1.NumProtectedObjects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - TemplateID *string `json:"templateId,omitempty"` - - IsUsable *bool `json:"isUsable,omitempty"` - - IsReplicated *bool `json:"isReplicated,omitempty"` - - NumProtectionGroups *int64 `json:"numProtectionGroups,omitempty"` - - NumProtectedObjects *int64 `json:"numProtectedObjects,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.TemplateID = m.TemplateID - - dataAO1.IsUsable = m.IsUsable - - dataAO1.IsReplicated = m.IsReplicated - - dataAO1.NumProtectionGroups = m.NumProtectionGroups - - dataAO1.NumProtectedObjects = m.NumProtectedObjects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy response -func (m *ProtectionPolicyResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy response based on the context it is used -func (m *ProtectionPolicyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionPolicy - if err := m.ProtectionPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyResponse) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy_response_with_pagination.go b/v2/models/protection_policy_response_with_pagination.go deleted file mode 100644 index 88229bdc..00000000 --- a/v2/models/protection_policy_response_with_pagination.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicyResponseWithPagination Protection Policy Response. -// -// Specifies the details about the Protection Policy. -// -// swagger:model ProtectionPolicyResponseWithPagination -type ProtectionPolicyResponseWithPagination struct { - - // Specifies a list of protection policies. - Policies []*ProtectionPolicyResponse `json:"policies"` -} - -// Validate validates this protection policy response with pagination -func (m *ProtectionPolicyResponseWithPagination) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicyResponseWithPagination) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - for i := 0; i < len(m.Policies); i++ { - if swag.IsZero(m.Policies[i]) { // not required - continue - } - - if m.Policies[i] != nil { - if err := m.Policies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection policy response with pagination based on the context it is used -func (m *ProtectionPolicyResponseWithPagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionPolicyResponseWithPagination) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Policies); i++ { - - if m.Policies[i] != nil { - - if swag.IsZero(m.Policies[i]) { // not required - return nil - } - - if err := m.Policies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyResponseWithPagination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyResponseWithPagination) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyResponseWithPagination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_policy_type.go b/v2/models/protection_policy_type.go deleted file mode 100644 index cb222142..00000000 --- a/v2/models/protection_policy_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ProtectionPolicyType Protection Policy Type. -// -// Protection Policy Type. -// -// swagger:model ProtectionPolicyType -type ProtectionPolicyType struct { - - // Specifies the protection policy type. - // Enum: ["Regular","Internal"] - Type string `json:"type,omitempty"` -} - -// Validate validates this protection policy type -func (m *ProtectionPolicyType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionPolicyTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Regular","Internal"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionPolicyTypeTypeTypePropEnum = append(protectionPolicyTypeTypeTypePropEnum, v) - } -} - -const ( - - // ProtectionPolicyTypeTypeRegular captures enum value "Regular" - ProtectionPolicyTypeTypeRegular string = "Regular" - - // ProtectionPolicyTypeTypeInternal captures enum value "Internal" - ProtectionPolicyTypeTypeInternal string = "Internal" -) - -// prop value enum -func (m *ProtectionPolicyType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionPolicyTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionPolicyType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection policy type based on context it is used -func (m *ProtectionPolicyType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyType) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_run_summary.go b/v2/models/protection_run_summary.go deleted file mode 100644 index 162f859f..00000000 --- a/v2/models/protection_run_summary.go +++ /dev/null @@ -1,359 +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" -) - -// ProtectionRunSummary Specifies the summary of a protection run. -// -// swagger:model ProtectionRunSummary -type ProtectionRunSummary struct { - - // Specifies the ID of the Protection Group run. - ID *string `json:"id,omitempty"` - - // ProtectionGroupId to which this run belongs. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Name of the Protection Group to which this run belongs. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // Specifies the environment type of the Protection Group. - // 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"` - - // Indicated if SLA has been violated for this run. - IsSLAViolated *bool `json:"isSlaViolated,omitempty"` - - // Specifies the start time of backup run in Unix epoch Timestamp(in microseconds). - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of backup run in Unix epoch Timestamp(in microseconds). - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Status of the backup run. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Specifies if the protection run is a full run. - IsFullRun *bool `json:"isFullRun,omitempty"` - - // Specifies the total number of objects protected in this run. - TotalObjectsCount *int64 `json:"totalObjectsCount,omitempty"` - - // Specifies the number of objects which are successfully protected in this run. - SuccessObjectsCount *int64 `json:"successObjectsCount,omitempty"` - - // Specifies total logical size of object(s) in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies total size of data in bytes written after taking backup. - BytesWritten *int64 `json:"bytesWritten,omitempty"` -} - -// Validate validates this protection run summary -func (m *ProtectionRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionRunSummaryTypeEnvironmentPropEnum []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 { - protectionRunSummaryTypeEnvironmentPropEnum = append(protectionRunSummaryTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionRunSummaryEnvironmentKVMware captures enum value "kVMware" - ProtectionRunSummaryEnvironmentKVMware string = "kVMware" - - // ProtectionRunSummaryEnvironmentKHyperV captures enum value "kHyperV" - ProtectionRunSummaryEnvironmentKHyperV string = "kHyperV" - - // ProtectionRunSummaryEnvironmentKVCD captures enum value "kVCD" - ProtectionRunSummaryEnvironmentKVCD string = "kVCD" - - // ProtectionRunSummaryEnvironmentKAzure captures enum value "kAzure" - ProtectionRunSummaryEnvironmentKAzure string = "kAzure" - - // ProtectionRunSummaryEnvironmentKGCP captures enum value "kGCP" - ProtectionRunSummaryEnvironmentKGCP string = "kGCP" - - // ProtectionRunSummaryEnvironmentKKVM captures enum value "kKVM" - ProtectionRunSummaryEnvironmentKKVM string = "kKVM" - - // ProtectionRunSummaryEnvironmentKAcropolis captures enum value "kAcropolis" - ProtectionRunSummaryEnvironmentKAcropolis string = "kAcropolis" - - // ProtectionRunSummaryEnvironmentKAWS captures enum value "kAWS" - ProtectionRunSummaryEnvironmentKAWS string = "kAWS" - - // ProtectionRunSummaryEnvironmentKAWSNative captures enum value "kAWSNative" - ProtectionRunSummaryEnvironmentKAWSNative string = "kAWSNative" - - // ProtectionRunSummaryEnvironmentKAwsS3 captures enum value "kAwsS3" - ProtectionRunSummaryEnvironmentKAwsS3 string = "kAwsS3" - - // ProtectionRunSummaryEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ProtectionRunSummaryEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // ProtectionRunSummaryEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionRunSummaryEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionRunSummaryEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ProtectionRunSummaryEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ProtectionRunSummaryEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ProtectionRunSummaryEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ProtectionRunSummaryEnvironmentKAzureNative captures enum value "kAzureNative" - ProtectionRunSummaryEnvironmentKAzureNative string = "kAzureNative" - - // ProtectionRunSummaryEnvironmentKAzureSQL captures enum value "kAzureSQL" - ProtectionRunSummaryEnvironmentKAzureSQL string = "kAzureSQL" - - // ProtectionRunSummaryEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - ProtectionRunSummaryEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // ProtectionRunSummaryEnvironmentKPhysical captures enum value "kPhysical" - ProtectionRunSummaryEnvironmentKPhysical string = "kPhysical" - - // ProtectionRunSummaryEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ProtectionRunSummaryEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ProtectionRunSummaryEnvironmentKGPFS captures enum value "kGPFS" - ProtectionRunSummaryEnvironmentKGPFS string = "kGPFS" - - // ProtectionRunSummaryEnvironmentKElastifile captures enum value "kElastifile" - ProtectionRunSummaryEnvironmentKElastifile string = "kElastifile" - - // ProtectionRunSummaryEnvironmentKNetapp captures enum value "kNetapp" - ProtectionRunSummaryEnvironmentKNetapp string = "kNetapp" - - // ProtectionRunSummaryEnvironmentKGenericNas captures enum value "kGenericNas" - ProtectionRunSummaryEnvironmentKGenericNas string = "kGenericNas" - - // ProtectionRunSummaryEnvironmentKIsilon captures enum value "kIsilon" - ProtectionRunSummaryEnvironmentKIsilon string = "kIsilon" - - // ProtectionRunSummaryEnvironmentKFlashBlade captures enum value "kFlashBlade" - ProtectionRunSummaryEnvironmentKFlashBlade string = "kFlashBlade" - - // ProtectionRunSummaryEnvironmentKPure captures enum value "kPure" - ProtectionRunSummaryEnvironmentKPure string = "kPure" - - // ProtectionRunSummaryEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ProtectionRunSummaryEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ProtectionRunSummaryEnvironmentKSQL captures enum value "kSQL" - ProtectionRunSummaryEnvironmentKSQL string = "kSQL" - - // ProtectionRunSummaryEnvironmentKExchange captures enum value "kExchange" - ProtectionRunSummaryEnvironmentKExchange string = "kExchange" - - // ProtectionRunSummaryEnvironmentKAD captures enum value "kAD" - ProtectionRunSummaryEnvironmentKAD string = "kAD" - - // ProtectionRunSummaryEnvironmentKOracle captures enum value "kOracle" - ProtectionRunSummaryEnvironmentKOracle string = "kOracle" - - // ProtectionRunSummaryEnvironmentKView captures enum value "kView" - ProtectionRunSummaryEnvironmentKView string = "kView" - - // ProtectionRunSummaryEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - ProtectionRunSummaryEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // ProtectionRunSummaryEnvironmentKO365 captures enum value "kO365" - ProtectionRunSummaryEnvironmentKO365 string = "kO365" - - // ProtectionRunSummaryEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ProtectionRunSummaryEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // ProtectionRunSummaryEnvironmentKO365Teams captures enum value "kO365Teams" - ProtectionRunSummaryEnvironmentKO365Teams string = "kO365Teams" - - // ProtectionRunSummaryEnvironmentKO365Group captures enum value "kO365Group" - ProtectionRunSummaryEnvironmentKO365Group string = "kO365Group" - - // ProtectionRunSummaryEnvironmentKO365Exchange captures enum value "kO365Exchange" - ProtectionRunSummaryEnvironmentKO365Exchange string = "kO365Exchange" - - // ProtectionRunSummaryEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ProtectionRunSummaryEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ProtectionRunSummaryEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ProtectionRunSummaryEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ProtectionRunSummaryEnvironmentKKubernetes captures enum value "kKubernetes" - ProtectionRunSummaryEnvironmentKKubernetes string = "kKubernetes" - - // ProtectionRunSummaryEnvironmentKCassandra captures enum value "kCassandra" - ProtectionRunSummaryEnvironmentKCassandra string = "kCassandra" - - // ProtectionRunSummaryEnvironmentKMongoDB captures enum value "kMongoDB" - ProtectionRunSummaryEnvironmentKMongoDB string = "kMongoDB" - - // ProtectionRunSummaryEnvironmentKCouchbase captures enum value "kCouchbase" - ProtectionRunSummaryEnvironmentKCouchbase string = "kCouchbase" - - // ProtectionRunSummaryEnvironmentKHdfs captures enum value "kHdfs" - ProtectionRunSummaryEnvironmentKHdfs string = "kHdfs" - - // ProtectionRunSummaryEnvironmentKHive captures enum value "kHive" - ProtectionRunSummaryEnvironmentKHive string = "kHive" - - // ProtectionRunSummaryEnvironmentKHBase captures enum value "kHBase" - ProtectionRunSummaryEnvironmentKHBase string = "kHBase" - - // ProtectionRunSummaryEnvironmentKUDA captures enum value "kUDA" - ProtectionRunSummaryEnvironmentKUDA string = "kUDA" - - // ProtectionRunSummaryEnvironmentKSfdc captures enum value "kSfdc" - ProtectionRunSummaryEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ProtectionRunSummary) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionRunSummaryTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionRunSummary) 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 -} - -var protectionRunSummaryTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionRunSummaryTypeStatusPropEnum = append(protectionRunSummaryTypeStatusPropEnum, v) - } -} - -const ( - - // ProtectionRunSummaryStatusAccepted captures enum value "Accepted" - ProtectionRunSummaryStatusAccepted string = "Accepted" - - // ProtectionRunSummaryStatusRunning captures enum value "Running" - ProtectionRunSummaryStatusRunning string = "Running" - - // ProtectionRunSummaryStatusCanceled captures enum value "Canceled" - ProtectionRunSummaryStatusCanceled string = "Canceled" - - // ProtectionRunSummaryStatusCanceling captures enum value "Canceling" - ProtectionRunSummaryStatusCanceling string = "Canceling" - - // ProtectionRunSummaryStatusFailed captures enum value "Failed" - ProtectionRunSummaryStatusFailed string = "Failed" - - // ProtectionRunSummaryStatusMissed captures enum value "Missed" - ProtectionRunSummaryStatusMissed string = "Missed" - - // ProtectionRunSummaryStatusSucceeded captures enum value "Succeeded" - ProtectionRunSummaryStatusSucceeded string = "Succeeded" - - // ProtectionRunSummaryStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ProtectionRunSummaryStatusSucceededWithWarning string = "SucceededWithWarning" - - // ProtectionRunSummaryStatusOnHold captures enum value "OnHold" - ProtectionRunSummaryStatusOnHold string = "OnHold" - - // ProtectionRunSummaryStatusFinalizing captures enum value "Finalizing" - ProtectionRunSummaryStatusFinalizing string = "Finalizing" - - // ProtectionRunSummaryStatusSkipped captures enum value "Skipped" - ProtectionRunSummaryStatusSkipped string = "Skipped" - - // ProtectionRunSummaryStatusPaused captures enum value "Paused" - ProtectionRunSummaryStatusPaused string = "Paused" -) - -// prop value enum -func (m *ProtectionRunSummary) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionRunSummaryTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionRunSummary) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection run summary based on context it is used -func (m *ProtectionRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunSummary) UnmarshalBinary(b []byte) error { - var res ProtectionRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_runs_stats.go b/v2/models/protection_runs_stats.go deleted file mode 100644 index 376f938c..00000000 --- a/v2/models/protection_runs_stats.go +++ /dev/null @@ -1,117 +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" -) - -// ProtectionRunsStats Specifies the statistics of protection runs. -// -// swagger:model ProtectionRunsStats -type ProtectionRunsStats struct { - - // Specifies the status of protection runs. - // Enum: ["Running","Canceled","Failed","Succeeded","SucceededWithWarning"] - ProtectionRunStatus *string `json:"protectionRunStatus,omitempty"` - - // Specifies the number of protection runs. - ProtectionRunsCount *int64 `json:"protectionRunsCount,omitempty"` -} - -// Validate validates this protection runs stats -func (m *ProtectionRunsStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionRunStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionRunsStatsTypeProtectionRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Canceled","Failed","Succeeded","SucceededWithWarning"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionRunsStatsTypeProtectionRunStatusPropEnum = append(protectionRunsStatsTypeProtectionRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionRunsStatsProtectionRunStatusRunning captures enum value "Running" - ProtectionRunsStatsProtectionRunStatusRunning string = "Running" - - // ProtectionRunsStatsProtectionRunStatusCanceled captures enum value "Canceled" - ProtectionRunsStatsProtectionRunStatusCanceled string = "Canceled" - - // ProtectionRunsStatsProtectionRunStatusFailed captures enum value "Failed" - ProtectionRunsStatsProtectionRunStatusFailed string = "Failed" - - // ProtectionRunsStatsProtectionRunStatusSucceeded captures enum value "Succeeded" - ProtectionRunsStatsProtectionRunStatusSucceeded string = "Succeeded" - - // ProtectionRunsStatsProtectionRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ProtectionRunsStatsProtectionRunStatusSucceededWithWarning string = "SucceededWithWarning" -) - -// prop value enum -func (m *ProtectionRunsStats) validateProtectionRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionRunsStatsTypeProtectionRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionRunsStats) validateProtectionRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateProtectionRunStatusEnum("protectionRunStatus", "body", *m.ProtectionRunStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection runs stats based on context it is used -func (m *ProtectionRunsStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunsStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunsStats) UnmarshalBinary(b []byte) error { - var res ProtectionRunsStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_runs_stats_list.go b/v2/models/protection_runs_stats_list.go deleted file mode 100644 index 7a3cfc3c..00000000 --- a/v2/models/protection_runs_stats_list.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunsStatsList Specifies the statistics of protection runs at the specific time. -// -// swagger:model ProtectionRunsStatsList -type ProtectionRunsStatsList struct { - - // Specifies a Unix epoch Timestamp (in microseconds) of this statistics. - Timestamp *int64 `json:"timestamp,omitempty"` - - // Specifies the protection runs stats. - Stats []*ProtectionRunsStats `json:"stats"` -} - -// Validate validates this protection runs stats list -func (m *ProtectionRunsStatsList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunsStatsList) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - return nil - } - - for i := 0; i < len(m.Stats); i++ { - if swag.IsZero(m.Stats[i]) { // not required - continue - } - - if m.Stats[i] != nil { - if err := m.Stats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection runs stats list based on the context it is used -func (m *ProtectionRunsStatsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunsStatsList) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Stats); i++ { - - if m.Stats[i] != nil { - - if swag.IsZero(m.Stats[i]) { // not required - return nil - } - - if err := m.Stats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunsStatsList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunsStatsList) UnmarshalBinary(b []byte) error { - var res ProtectionRunsStatsList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_runs_summary.go b/v2/models/protection_runs_summary.go deleted file mode 100644 index 12c2eb1d..00000000 --- a/v2/models/protection_runs_summary.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunsSummary Specifies a list of summaries of protection runs. -// -// swagger:model ProtectionRunsSummary -type ProtectionRunsSummary struct { - - // Specifies a list of summaries of protection runs. - ProtectionRunsSummary []*ProtectionRunSummary `json:"protectionRunsSummary"` -} - -// Validate validates this protection runs summary -func (m *ProtectionRunsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionRunsSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunsSummary) validateProtectionRunsSummary(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionRunsSummary) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionRunsSummary); i++ { - if swag.IsZero(m.ProtectionRunsSummary[i]) { // not required - continue - } - - if m.ProtectionRunsSummary[i] != nil { - if err := m.ProtectionRunsSummary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this protection runs summary based on the context it is used -func (m *ProtectionRunsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionRunsSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtectionRunsSummary) contextValidateProtectionRunsSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionRunsSummary); i++ { - - if m.ProtectionRunsSummary[i] != nil { - - if swag.IsZero(m.ProtectionRunsSummary[i]) { // not required - return nil - } - - if err := m.ProtectionRunsSummary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionRunsSummary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionRunsSummary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunsSummary) UnmarshalBinary(b []byte) error { - var res ProtectionRunsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_summary.go b/v2/models/protection_summary.go deleted file mode 100644 index 3d67e1a2..00000000 --- a/v2/models/protection_summary.go +++ /dev/null @@ -1,307 +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" -) - -// ProtectionSummary Specifies a summary of an object protection. -// -// swagger:model ProtectionSummary -type ProtectionSummary struct { - - // Specifies the policy name for this group. - PolicyName *string `json:"policyName,omitempty"` - - // Specifies the policy id for this protection. - PolicyID *string `json:"policyId,omitempty"` - - // Specifies the storage domain id of this protection. Format is clusterId:clusterIncarnationId:storageDomainId. - StorageDomainID *string `json:"storageDomainId,omitempty"` - - // Specifies the status of last local back up run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - LastBackupRunStatus *string `json:"lastBackupRunStatus,omitempty"` - - // Specifies the status of last archival run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - LastArchivalRunStatus *string `json:"lastArchivalRunStatus,omitempty"` - - // Specifies the status of last replication run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - LastReplicationRunStatus *string `json:"lastReplicationRunStatus,omitempty"` - - // Specifies if the sla is violated in last run. - LastRunSLAViolated *bool `json:"lastRunSlaViolated,omitempty"` -} - -// Validate validates this protection summary -func (m *ProtectionSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastBackupRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastArchivalRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastReplicationRunStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionSummaryTypeLastBackupRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSummaryTypeLastBackupRunStatusPropEnum = append(protectionSummaryTypeLastBackupRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionSummaryLastBackupRunStatusAccepted captures enum value "Accepted" - ProtectionSummaryLastBackupRunStatusAccepted string = "Accepted" - - // ProtectionSummaryLastBackupRunStatusRunning captures enum value "Running" - ProtectionSummaryLastBackupRunStatusRunning string = "Running" - - // ProtectionSummaryLastBackupRunStatusCanceled captures enum value "Canceled" - ProtectionSummaryLastBackupRunStatusCanceled string = "Canceled" - - // ProtectionSummaryLastBackupRunStatusCanceling captures enum value "Canceling" - ProtectionSummaryLastBackupRunStatusCanceling string = "Canceling" - - // ProtectionSummaryLastBackupRunStatusFailed captures enum value "Failed" - ProtectionSummaryLastBackupRunStatusFailed string = "Failed" - - // ProtectionSummaryLastBackupRunStatusMissed captures enum value "Missed" - ProtectionSummaryLastBackupRunStatusMissed string = "Missed" - - // ProtectionSummaryLastBackupRunStatusSucceeded captures enum value "Succeeded" - ProtectionSummaryLastBackupRunStatusSucceeded string = "Succeeded" - - // ProtectionSummaryLastBackupRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ProtectionSummaryLastBackupRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ProtectionSummaryLastBackupRunStatusOnHold captures enum value "OnHold" - ProtectionSummaryLastBackupRunStatusOnHold string = "OnHold" - - // ProtectionSummaryLastBackupRunStatusFinalizing captures enum value "Finalizing" - ProtectionSummaryLastBackupRunStatusFinalizing string = "Finalizing" - - // ProtectionSummaryLastBackupRunStatusSkipped captures enum value "Skipped" - ProtectionSummaryLastBackupRunStatusSkipped string = "Skipped" - - // ProtectionSummaryLastBackupRunStatusPaused captures enum value "Paused" - ProtectionSummaryLastBackupRunStatusPaused string = "Paused" -) - -// prop value enum -func (m *ProtectionSummary) validateLastBackupRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSummaryTypeLastBackupRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSummary) validateLastBackupRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastBackupRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastBackupRunStatusEnum("lastBackupRunStatus", "body", *m.LastBackupRunStatus); err != nil { - return err - } - - return nil -} - -var protectionSummaryTypeLastArchivalRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSummaryTypeLastArchivalRunStatusPropEnum = append(protectionSummaryTypeLastArchivalRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionSummaryLastArchivalRunStatusAccepted captures enum value "Accepted" - ProtectionSummaryLastArchivalRunStatusAccepted string = "Accepted" - - // ProtectionSummaryLastArchivalRunStatusRunning captures enum value "Running" - ProtectionSummaryLastArchivalRunStatusRunning string = "Running" - - // ProtectionSummaryLastArchivalRunStatusCanceled captures enum value "Canceled" - ProtectionSummaryLastArchivalRunStatusCanceled string = "Canceled" - - // ProtectionSummaryLastArchivalRunStatusCanceling captures enum value "Canceling" - ProtectionSummaryLastArchivalRunStatusCanceling string = "Canceling" - - // ProtectionSummaryLastArchivalRunStatusFailed captures enum value "Failed" - ProtectionSummaryLastArchivalRunStatusFailed string = "Failed" - - // ProtectionSummaryLastArchivalRunStatusMissed captures enum value "Missed" - ProtectionSummaryLastArchivalRunStatusMissed string = "Missed" - - // ProtectionSummaryLastArchivalRunStatusSucceeded captures enum value "Succeeded" - ProtectionSummaryLastArchivalRunStatusSucceeded string = "Succeeded" - - // ProtectionSummaryLastArchivalRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ProtectionSummaryLastArchivalRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ProtectionSummaryLastArchivalRunStatusOnHold captures enum value "OnHold" - ProtectionSummaryLastArchivalRunStatusOnHold string = "OnHold" - - // ProtectionSummaryLastArchivalRunStatusFinalizing captures enum value "Finalizing" - ProtectionSummaryLastArchivalRunStatusFinalizing string = "Finalizing" - - // ProtectionSummaryLastArchivalRunStatusSkipped captures enum value "Skipped" - ProtectionSummaryLastArchivalRunStatusSkipped string = "Skipped" - - // ProtectionSummaryLastArchivalRunStatusPaused captures enum value "Paused" - ProtectionSummaryLastArchivalRunStatusPaused string = "Paused" -) - -// prop value enum -func (m *ProtectionSummary) validateLastArchivalRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSummaryTypeLastArchivalRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSummary) validateLastArchivalRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastArchivalRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastArchivalRunStatusEnum("lastArchivalRunStatus", "body", *m.LastArchivalRunStatus); err != nil { - return err - } - - return nil -} - -var protectionSummaryTypeLastReplicationRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionSummaryTypeLastReplicationRunStatusPropEnum = append(protectionSummaryTypeLastReplicationRunStatusPropEnum, v) - } -} - -const ( - - // ProtectionSummaryLastReplicationRunStatusAccepted captures enum value "Accepted" - ProtectionSummaryLastReplicationRunStatusAccepted string = "Accepted" - - // ProtectionSummaryLastReplicationRunStatusRunning captures enum value "Running" - ProtectionSummaryLastReplicationRunStatusRunning string = "Running" - - // ProtectionSummaryLastReplicationRunStatusCanceled captures enum value "Canceled" - ProtectionSummaryLastReplicationRunStatusCanceled string = "Canceled" - - // ProtectionSummaryLastReplicationRunStatusCanceling captures enum value "Canceling" - ProtectionSummaryLastReplicationRunStatusCanceling string = "Canceling" - - // ProtectionSummaryLastReplicationRunStatusFailed captures enum value "Failed" - ProtectionSummaryLastReplicationRunStatusFailed string = "Failed" - - // ProtectionSummaryLastReplicationRunStatusMissed captures enum value "Missed" - ProtectionSummaryLastReplicationRunStatusMissed string = "Missed" - - // ProtectionSummaryLastReplicationRunStatusSucceeded captures enum value "Succeeded" - ProtectionSummaryLastReplicationRunStatusSucceeded string = "Succeeded" - - // ProtectionSummaryLastReplicationRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - ProtectionSummaryLastReplicationRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // ProtectionSummaryLastReplicationRunStatusOnHold captures enum value "OnHold" - ProtectionSummaryLastReplicationRunStatusOnHold string = "OnHold" - - // ProtectionSummaryLastReplicationRunStatusFinalizing captures enum value "Finalizing" - ProtectionSummaryLastReplicationRunStatusFinalizing string = "Finalizing" - - // ProtectionSummaryLastReplicationRunStatusSkipped captures enum value "Skipped" - ProtectionSummaryLastReplicationRunStatusSkipped string = "Skipped" - - // ProtectionSummaryLastReplicationRunStatusPaused captures enum value "Paused" - ProtectionSummaryLastReplicationRunStatusPaused string = "Paused" -) - -// prop value enum -func (m *ProtectionSummary) validateLastReplicationRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionSummaryTypeLastReplicationRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionSummary) validateLastReplicationRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LastReplicationRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLastReplicationRunStatusEnum("lastReplicationRunStatus", "body", *m.LastReplicationRunStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protection summary based on context it is used -func (m *ProtectionSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSummary) UnmarshalBinary(b []byte) error { - var res ProtectionSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protection_type.go b/v2/models/protection_type.go deleted file mode 100644 index bd3cd5e8..00000000 --- a/v2/models/protection_type.go +++ /dev/null @@ -1,131 +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" -) - -// ProtectionType Protection type. -// -// Protection type. -// -// swagger:model ProtectionType -type ProtectionType struct { - - // Specifies Protection type. - // Enum: ["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"] - Environment string `json:"environment,omitempty"` -} - -// Validate validates this protection type -func (m *ProtectionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protectionTypeTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAgent","kNative","kSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsS3","kAwsRDSPostgresBackup","kAzureSQL","kFile","kVolume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protectionTypeTypeEnvironmentPropEnum = append(protectionTypeTypeEnvironmentPropEnum, v) - } -} - -const ( - - // ProtectionTypeEnvironmentKAgent captures enum value "kAgent" - ProtectionTypeEnvironmentKAgent string = "kAgent" - - // ProtectionTypeEnvironmentKNative captures enum value "kNative" - ProtectionTypeEnvironmentKNative string = "kNative" - - // ProtectionTypeEnvironmentKSnapshotManager captures enum value "kSnapshotManager" - ProtectionTypeEnvironmentKSnapshotManager string = "kSnapshotManager" - - // ProtectionTypeEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ProtectionTypeEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ProtectionTypeEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ProtectionTypeEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ProtectionTypeEnvironmentKAwsS3 captures enum value "kAwsS3" - ProtectionTypeEnvironmentKAwsS3 string = "kAwsS3" - - // ProtectionTypeEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ProtectionTypeEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ProtectionTypeEnvironmentKAzureSQL captures enum value "kAzureSQL" - ProtectionTypeEnvironmentKAzureSQL string = "kAzureSQL" - - // ProtectionTypeEnvironmentKFile captures enum value "kFile" - ProtectionTypeEnvironmentKFile string = "kFile" - - // ProtectionTypeEnvironmentKVolume captures enum value "kVolume" - ProtectionTypeEnvironmentKVolume string = "kVolume" -) - -// prop value enum -func (m *ProtectionType) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protectionTypeTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtectionType) 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 validates this protection type based on context it is used -func (m *ProtectionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionType) UnmarshalBinary(b []byte) error { - var res ProtectionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/protocol_access_level.go b/v2/models/protocol_access_level.go deleted file mode 100644 index 750b0a03..00000000 --- a/v2/models/protocol_access_level.go +++ /dev/null @@ -1,110 +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" -) - -// ProtocolAccessLevel Protocol access level -// -// # Protocol access level -// -// swagger:model ProtocolAccessLevel -type ProtocolAccessLevel struct { - - // Specifies the level of access for any protocol. - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - ProtocolAccessLevel string `json:"protocolAccessLevel,omitempty"` -} - -// Validate validates this protocol access level -func (m *ProtocolAccessLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocolAccessLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var protocolAccessLevelTypeProtocolAccessLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - protocolAccessLevelTypeProtocolAccessLevelPropEnum = append(protocolAccessLevelTypeProtocolAccessLevelPropEnum, v) - } -} - -const ( - - // ProtocolAccessLevelProtocolAccessLevelKDisabled captures enum value "kDisabled" - ProtocolAccessLevelProtocolAccessLevelKDisabled string = "kDisabled" - - // ProtocolAccessLevelProtocolAccessLevelKReadOnly captures enum value "kReadOnly" - ProtocolAccessLevelProtocolAccessLevelKReadOnly string = "kReadOnly" - - // ProtocolAccessLevelProtocolAccessLevelKReadWrite captures enum value "kReadWrite" - ProtocolAccessLevelProtocolAccessLevelKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *ProtocolAccessLevel) validateProtocolAccessLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, protocolAccessLevelTypeProtocolAccessLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ProtocolAccessLevel) validateProtocolAccessLevel(formats strfmt.Registry) error { - if swag.IsZero(m.ProtocolAccessLevel) { // not required - return nil - } - - // value enum - if err := m.validateProtocolAccessLevelEnum("protocolAccessLevel", "body", m.ProtocolAccessLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this protocol access level based on context it is used -func (m *ProtocolAccessLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtocolAccessLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtocolAccessLevel) UnmarshalBinary(b []byte) error { - var res ProtocolAccessLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pst_param.go b/v2/models/pst_param.go deleted file mode 100644 index e36cd2a5..00000000 --- a/v2/models/pst_param.go +++ /dev/null @@ -1,77 +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" -) - -// PstParam Specifies the PST conversion specific parameters. -// -// swagger:model PstParam -type PstParam struct { - - // Specifies Password to be set for generated PSTs. - // Required: true - Password *string `json:"password"` - - // Specifies if create a PST or MSG for input items. - CreatePst *bool `json:"createPst,omitempty"` - - // Specifies PST size threshold in bytes. - SizeThresholdBytes *int64 `json:"sizeThresholdBytes,omitempty"` -} - -// Validate validates this pst param -func (m *PstParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PstParam) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this pst param based on context it is used -func (m *PstParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PstParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PstParam) UnmarshalBinary(b []byte) error { - var res PstParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_error_type.go b/v2/models/public_error_type.go deleted file mode 100644 index 53e0a328..00000000 --- a/v2/models/public_error_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PublicErrorType PublicErrorType -// -// # Public Error Type -// -// swagger:model PublicErrorType -type PublicErrorType struct { - - // Specifies the public error type. - // Enum: ["InternalError","AlreadyExistsError"] - Type string `json:"type,omitempty"` -} - -// Validate validates this public error type -func (m *PublicErrorType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var publicErrorTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InternalError","AlreadyExistsError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - publicErrorTypeTypeTypePropEnum = append(publicErrorTypeTypeTypePropEnum, v) - } -} - -const ( - - // PublicErrorTypeTypeInternalError captures enum value "InternalError" - PublicErrorTypeTypeInternalError string = "InternalError" - - // PublicErrorTypeTypeAlreadyExistsError captures enum value "AlreadyExistsError" - PublicErrorTypeTypeAlreadyExistsError string = "AlreadyExistsError" -) - -// prop value enum -func (m *PublicErrorType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, publicErrorTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PublicErrorType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this public error type based on context it is used -func (m *PublicErrorType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicErrorType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicErrorType) UnmarshalBinary(b []byte) error { - var res PublicErrorType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_folder.go b/v2/models/public_folder.go deleted file mode 100644 index 35481309..00000000 --- a/v2/models/public_folder.go +++ /dev/null @@ -1,77 +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" -) - -// PublicFolder Specifies an PublicFolder item to recover. -// -// swagger:model PublicFolder -type PublicFolder struct { - - // Specifies the Unique ID of the folder. - // Required: true - FolderID *string `json:"folderId"` - - // Specifies whether to recover the whole PublicFolder. - RecoverEntireFolder *bool `json:"recoverEntireFolder,omitempty"` - - // Specifies a list of item ids to recover. This field is applicable only if 'recoverEntireFolder' is false. - ItemIds []string `json:"itemIds"` -} - -// Validate validates this public folder -func (m *PublicFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFolderID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PublicFolder) validateFolderID(formats strfmt.Registry) error { - - if err := validate.Required("folderId", "body", m.FolderID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this public folder based on context it is used -func (m *PublicFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFolder) UnmarshalBinary(b []byte) error { - var res PublicFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_folder_item.go b/v2/models/public_folder_item.go deleted file mode 100644 index d0a05f7e..00000000 --- a/v2/models/public_folder_item.go +++ /dev/null @@ -1,196 +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" -) - -// PublicFolderItem PublicFolderItem -// -// Specifies an Public folder indexed item. -// -// swagger:model PublicFolderItem -type PublicFolderItem struct { - CommonIndexedObjectParams - - // Specifies the Public folder item type. - Type *string `json:"type,omitempty"` - - // Specifies the id of the indexed item. - ID *string `json:"id,omitempty"` - - // Specifies the subject of the indexed item. - Subject *string `json:"subject,omitempty"` - - // Specifies whether the item has any attachments - HasAttachments *bool `json:"hasAttachments,omitempty"` - - // Specifies the item class of the indexed item. - ItemClass *string `json:"itemClass,omitempty"` - - // Specifies the Unix timestamp epoch in seconds at which this item is received. - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - // Specifies the size in bytes for the indexed item. - ItemSize *int64 `json:"itemSize,omitempty"` - - // Specifies the id of parent folder the indexed item. - ParentFolderID *string `json:"parentFolderId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PublicFolderItem) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - Subject *string `json:"subject,omitempty"` - - HasAttachments *bool `json:"hasAttachments,omitempty"` - - ItemClass *string `json:"itemClass,omitempty"` - - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - ItemSize *int64 `json:"itemSize,omitempty"` - - ParentFolderID *string `json:"parentFolderId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ID = dataAO1.ID - - m.Subject = dataAO1.Subject - - m.HasAttachments = dataAO1.HasAttachments - - m.ItemClass = dataAO1.ItemClass - - m.ReceivedTimeSecs = dataAO1.ReceivedTimeSecs - - m.ItemSize = dataAO1.ItemSize - - m.ParentFolderID = dataAO1.ParentFolderID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PublicFolderItem) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ID *string `json:"id,omitempty"` - - Subject *string `json:"subject,omitempty"` - - HasAttachments *bool `json:"hasAttachments,omitempty"` - - ItemClass *string `json:"itemClass,omitempty"` - - ReceivedTimeSecs *int64 `json:"receivedTimeSecs,omitempty"` - - ItemSize *int64 `json:"itemSize,omitempty"` - - ParentFolderID *string `json:"parentFolderId,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ID = m.ID - - dataAO1.Subject = m.Subject - - dataAO1.HasAttachments = m.HasAttachments - - dataAO1.ItemClass = m.ItemClass - - dataAO1.ReceivedTimeSecs = m.ReceivedTimeSecs - - dataAO1.ItemSize = m.ItemSize - - dataAO1.ParentFolderID = m.ParentFolderID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this public folder item -func (m *PublicFolderItem) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this public folder item based on the context it is used -func (m *PublicFolderItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFolderItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFolderItem) UnmarshalBinary(b []byte) error { - var res PublicFolderItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_folder_item_type.go b/v2/models/public_folder_item_type.go deleted file mode 100644 index 13d77b64..00000000 --- a/v2/models/public_folder_item_type.go +++ /dev/null @@ -1,122 +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" -) - -// PublicFolderItemType Public Folder item types for search. -// -// Public Folder item types for search. -// -// swagger:model PublicFolderItemType -type PublicFolderItemType struct { - - // Specifies the Public Folder item types for search. - // Enum: ["Calendar","Contact","Post","Folder","Task","Journal","Note"] - Type string `json:"type,omitempty"` -} - -// Validate validates this public folder item type -func (m *PublicFolderItemType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var publicFolderItemTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Calendar","Contact","Post","Folder","Task","Journal","Note"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - publicFolderItemTypeTypeTypePropEnum = append(publicFolderItemTypeTypeTypePropEnum, v) - } -} - -const ( - - // PublicFolderItemTypeTypeCalendar captures enum value "Calendar" - PublicFolderItemTypeTypeCalendar string = "Calendar" - - // PublicFolderItemTypeTypeContact captures enum value "Contact" - PublicFolderItemTypeTypeContact string = "Contact" - - // PublicFolderItemTypeTypePost captures enum value "Post" - PublicFolderItemTypeTypePost string = "Post" - - // PublicFolderItemTypeTypeFolder captures enum value "Folder" - PublicFolderItemTypeTypeFolder string = "Folder" - - // PublicFolderItemTypeTypeTask captures enum value "Task" - PublicFolderItemTypeTypeTask string = "Task" - - // PublicFolderItemTypeTypeJournal captures enum value "Journal" - PublicFolderItemTypeTypeJournal string = "Journal" - - // PublicFolderItemTypeTypeNote captures enum value "Note" - PublicFolderItemTypeTypeNote string = "Note" -) - -// prop value enum -func (m *PublicFolderItemType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, publicFolderItemTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PublicFolderItemType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this public folder item type based on context it is used -func (m *PublicFolderItemType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicFolderItemType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicFolderItemType) UnmarshalBinary(b []byte) error { - var res PublicFolderItemType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_folder_items.go b/v2/models/public_folder_items.go deleted file mode 100644 index 8d9ff26c..00000000 --- a/v2/models/public_folder_items.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PublicFolderItems Specifies the indexed Public folder items. -// -// swagger:model PublicFolderItems -type PublicFolderItems []*PublicFolderItem - -// Validate validates this public folder items -func (m PublicFolderItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this public folder items based on the context it is used -func (m PublicFolderItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/public_key_request.go b/v2/models/public_key_request.go deleted file mode 100644 index eb416082..00000000 --- a/v2/models/public_key_request.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PublicKeyRequest Specifies the parameters required to retrieve SSH public key -// -// swagger:model PublicKeyRequest -type PublicKeyRequest struct { - - // Specifies the workflow initiating the SSH connection. - // Required: true - // Enum: ["DataProtection"] - WorkflowType *string `json:"workflowType"` -} - -// Validate validates this public key request -func (m *PublicKeyRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWorkflowType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var publicKeyRequestTypeWorkflowTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DataProtection"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - publicKeyRequestTypeWorkflowTypePropEnum = append(publicKeyRequestTypeWorkflowTypePropEnum, v) - } -} - -const ( - - // PublicKeyRequestWorkflowTypeDataProtection captures enum value "DataProtection" - PublicKeyRequestWorkflowTypeDataProtection string = "DataProtection" -) - -// prop value enum -func (m *PublicKeyRequest) validateWorkflowTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, publicKeyRequestTypeWorkflowTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PublicKeyRequest) validateWorkflowType(formats strfmt.Registry) error { - - if err := validate.Required("workflowType", "body", m.WorkflowType); err != nil { - return err - } - - // value enum - if err := m.validateWorkflowTypeEnum("workflowType", "body", *m.WorkflowType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this public key request based on context it is used -func (m *PublicKeyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicKeyRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicKeyRequest) UnmarshalBinary(b []byte) error { - var res PublicKeyRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_key_response.go b/v2/models/public_key_response.go deleted file mode 100644 index c8fec6d2..00000000 --- a/v2/models/public_key_response.go +++ /dev/null @@ -1,50 +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" -) - -// PublicKeyResponse Specifies the public key information. -// -// swagger:model PublicKeyResponse -type PublicKeyResponse struct { - - // Specifies the SSH public key. - PublicKey string `json:"public_key,omitempty"` -} - -// Validate validates this public key response -func (m *PublicKeyResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this public key response based on context it is used -func (m *PublicKeyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicKeyResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicKeyResponse) UnmarshalBinary(b []byte) error { - var res PublicKeyResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/public_task_status.go b/v2/models/public_task_status.go deleted file mode 100644 index 282aa3ac..00000000 --- a/v2/models/public_task_status.go +++ /dev/null @@ -1,134 +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" -) - -// PublicTaskStatus PublicTaskStatus -// -// # Public Task Status -// -// swagger:model PublicTaskStatus -type PublicTaskStatus struct { - - // Specifies the public task status. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - PublicTaskStatus string `json:"publicTaskStatus,omitempty"` -} - -// Validate validates this public task status -func (m *PublicTaskStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePublicTaskStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var publicTaskStatusTypePublicTaskStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - publicTaskStatusTypePublicTaskStatusPropEnum = append(publicTaskStatusTypePublicTaskStatusPropEnum, v) - } -} - -const ( - - // PublicTaskStatusPublicTaskStatusAccepted captures enum value "Accepted" - PublicTaskStatusPublicTaskStatusAccepted string = "Accepted" - - // PublicTaskStatusPublicTaskStatusRunning captures enum value "Running" - PublicTaskStatusPublicTaskStatusRunning string = "Running" - - // PublicTaskStatusPublicTaskStatusCanceled captures enum value "Canceled" - PublicTaskStatusPublicTaskStatusCanceled string = "Canceled" - - // PublicTaskStatusPublicTaskStatusCanceling captures enum value "Canceling" - PublicTaskStatusPublicTaskStatusCanceling string = "Canceling" - - // PublicTaskStatusPublicTaskStatusFailed captures enum value "Failed" - PublicTaskStatusPublicTaskStatusFailed string = "Failed" - - // PublicTaskStatusPublicTaskStatusMissed captures enum value "Missed" - PublicTaskStatusPublicTaskStatusMissed string = "Missed" - - // PublicTaskStatusPublicTaskStatusSucceeded captures enum value "Succeeded" - PublicTaskStatusPublicTaskStatusSucceeded string = "Succeeded" - - // PublicTaskStatusPublicTaskStatusSucceededWithWarning captures enum value "SucceededWithWarning" - PublicTaskStatusPublicTaskStatusSucceededWithWarning string = "SucceededWithWarning" - - // PublicTaskStatusPublicTaskStatusOnHold captures enum value "OnHold" - PublicTaskStatusPublicTaskStatusOnHold string = "OnHold" - - // PublicTaskStatusPublicTaskStatusFinalizing captures enum value "Finalizing" - PublicTaskStatusPublicTaskStatusFinalizing string = "Finalizing" - - // PublicTaskStatusPublicTaskStatusSkipped captures enum value "Skipped" - PublicTaskStatusPublicTaskStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *PublicTaskStatus) validatePublicTaskStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, publicTaskStatusTypePublicTaskStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *PublicTaskStatus) validatePublicTaskStatus(formats strfmt.Registry) error { - if swag.IsZero(m.PublicTaskStatus) { // not required - return nil - } - - // value enum - if err := m.validatePublicTaskStatusEnum("publicTaskStatus", "body", m.PublicTaskStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this public task status based on context it is used -func (m *PublicTaskStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PublicTaskStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PublicTaskStatus) UnmarshalBinary(b []byte) error { - var res PublicTaskStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pure_protection_group_object_params.go b/v2/models/pure_protection_group_object_params.go deleted file mode 100644 index e84435b9..00000000 --- a/v2/models/pure_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// PureProtectionGroupObjectParams Pure Protection Group Object Params. -// -// Specifies the object parameters to create Pure Protection Group. -// -// swagger:model PureProtectionGroupObjectParams -type PureProtectionGroupObjectParams struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this pure protection group object params -func (m *PureProtectionGroupObjectParams) 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 *PureProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this pure protection group object params based on the context it is used -func (m *PureProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PureProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PureProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PureProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res PureProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pure_protection_group_params.go b/v2/models/pure_protection_group_params.go deleted file mode 100644 index 1fd02404..00000000 --- a/v2/models/pure_protection_group_params.go +++ /dev/null @@ -1,224 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PureProtectionGroupParams Specifies the parameters which are specific to Pure related Protection Groups. -// -// swagger:model PureProtectionGroupParams -type PureProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*PureProtectionGroupObjectParams `json:"objects"` - - // Specifies the number of snapshots to retain on the primary environment. If not specified, then snapshots will not be deleted from the primary environment. - MaxSnapshotsOnPrimary *int64 `json:"maxSnapshotsOnPrimary,omitempty"` - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the pre script and post script to run before and after the protection group. - PrePostScript *HostBasedBackupScriptParams `json:"prePostScript,omitempty"` -} - -// Validate validates this pure protection group params -func (m *PureProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrePostScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PureProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PureProtectionGroupParams) validatePrePostScript(formats strfmt.Registry) error { - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if m.PrePostScript != nil { - if err := m.PrePostScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// ContextValidate validate this pure protection group params based on the context it is used -func (m *PureProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrePostScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PureProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *PureProtectionGroupParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *PureProtectionGroupParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *PureProtectionGroupParams) contextValidatePrePostScript(ctx context.Context, formats strfmt.Registry) error { - - if m.PrePostScript != nil { - - if swag.IsZero(m.PrePostScript) { // not required - return nil - } - - if err := m.PrePostScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("prePostScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("prePostScript") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PureProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PureProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res PureProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/pvc_information_response_params.go b/v2/models/pvc_information_response_params.go deleted file mode 100644 index dfb6014f..00000000 --- a/v2/models/pvc_information_response_params.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PvcInformationResponseParams Pvc information Response -// -// specifies pvcs of successfully backed up namespace -// -// swagger:model PvcInformationResponseParams -type PvcInformationResponseParams []*KubernetesPvcInfo - -// Validate validates this pvc information response params -func (m PvcInformationResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this pvc information response params based on the context it is used -func (m PvcInformationResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/qo_s.go b/v2/models/qo_s.go deleted file mode 100644 index 9ab0103a..00000000 --- a/v2/models/qo_s.go +++ /dev/null @@ -1,246 +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" -) - -// QoS QoS. -// -// Specifies the Quality of Service (QoS) Policy for the View. -// -// swagger:model QoS -type QoS struct { - - // Specifies the id of the QoS Policy used for the View. (Deprecated) - // This parameter is deprecated and shall not be supported in future releases. - // Use name instead. - PrincipalID *int64 `json:"principalId,omitempty"` - - // Specifies the name of the QoS Policy. If not specified, - // the default is 'Backup Target Low'. - // (To be deprecated in future release, use name instead) - // Enum: ["Backup Target High","Backup Target Low","TestAndDev High","TestAndDev Low","Backup Target SSD","Backup Target Commvault","Journaled Sequential Dump","Backup Target Auto"] - PrincipalName *string `json:"principalName,omitempty"` - - // Specifies the name of the QoS Policy. If not specified, - // the default is 'BackupTargetLow'. - // - // BackupTargetAuto: (Applicable only for C6K Platform) Use this policy - // for workloads such as backups, which keep many I/Os outstanding. - // This policy splits I/Os across SSDs and HDDs to achieve maximum - // performance based on the current usage. - // The priority for processing workload with this policy is the same as - // Backup Target High and Backup Target SSD. - // - // JournaledSequentialDump: Use this policy for workloads that write - // large amounts of data sequentially to a very small number of files - // and do not keep many I/Os outstanding. By default data is written to - // the SSD and has the highest priority and low latency. - // - // TestAndDevHigh: Use this policy for workloads that require lower I/O - // latency or do not keep many I/Os outstanding, as the I/Os are given - // higher priority compared to other QoS policies. - // Data is written to the SSD. - // - // TestAndDevLow: The same as TestAndDev High, except that the I/Os with - // this QoS policy are given lower priority - // compared to I/Os with TestAndDev High when there is contention. - // - // BackupTargetCommvault: Use this policy to intelligently detect and - // exclude application-specific markers to achieve better deduplication - // when CommVault backup application is writing to a Cohesity View. - // Data is written to SSD and has the same priority and latency as - // TestAndDev High. - // - // BackupTargetSSD: Use this policy for workloads such as backups, - // which keep many I/Os outstanding, but in this case, - // DataPlatform sends both sequential and random I/Os to SSD. - // The latency is lower than other Backup Target policies. - // The priority for processing workload with this policy - // is the same as Backup Target Auto. - // - // BackupTargetHigh: Use this policy for non-latency sensitive workloads - // such as backups, which keep many I/Os outstanding. - // Data is written to HDD and has higher latency compared to other QoS - // policies writing to a SSD The priority for processing workload with - // this policy is the same as Backup Target Auto. - // - // BackupTargetLow: The same as Backup Target High, except that the - // priority for processing workloads with this policy is lower than - // workloads with Backup Target Auto / High /SSD - // when there is contention. - // Enum: ["BackupTargetHigh","BackupTargetLow","TestAndDevHigh","TestAndDevLow","BackupTargetSSD","BackupTargetCommvault","JournaledSequentialDump","BackupTargetAuto"] - Name *string `json:"name,omitempty"` -} - -// Validate validates this qo s -func (m *QoS) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrincipalName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var qoSTypePrincipalNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Backup Target High","Backup Target Low","TestAndDev High","TestAndDev Low","Backup Target SSD","Backup Target Commvault","Journaled Sequential Dump","Backup Target Auto"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - qoSTypePrincipalNamePropEnum = append(qoSTypePrincipalNamePropEnum, v) - } -} - -const ( - - // QoSPrincipalNameBackupTargetHigh captures enum value "Backup Target High" - QoSPrincipalNameBackupTargetHigh string = "Backup Target High" - - // QoSPrincipalNameBackupTargetLow captures enum value "Backup Target Low" - QoSPrincipalNameBackupTargetLow string = "Backup Target Low" - - // QoSPrincipalNameTestAndDevHigh captures enum value "TestAndDev High" - QoSPrincipalNameTestAndDevHigh string = "TestAndDev High" - - // QoSPrincipalNameTestAndDevLow captures enum value "TestAndDev Low" - QoSPrincipalNameTestAndDevLow string = "TestAndDev Low" - - // QoSPrincipalNameBackupTargetSSD captures enum value "Backup Target SSD" - QoSPrincipalNameBackupTargetSSD string = "Backup Target SSD" - - // QoSPrincipalNameBackupTargetCommvault captures enum value "Backup Target Commvault" - QoSPrincipalNameBackupTargetCommvault string = "Backup Target Commvault" - - // QoSPrincipalNameJournaledSequentialDump captures enum value "Journaled Sequential Dump" - QoSPrincipalNameJournaledSequentialDump string = "Journaled Sequential Dump" - - // QoSPrincipalNameBackupTargetAuto captures enum value "Backup Target Auto" - QoSPrincipalNameBackupTargetAuto string = "Backup Target Auto" -) - -// prop value enum -func (m *QoS) validatePrincipalNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, qoSTypePrincipalNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QoS) validatePrincipalName(formats strfmt.Registry) error { - if swag.IsZero(m.PrincipalName) { // not required - return nil - } - - // value enum - if err := m.validatePrincipalNameEnum("principalName", "body", *m.PrincipalName); err != nil { - return err - } - - return nil -} - -var qoSTypeNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupTargetHigh","BackupTargetLow","TestAndDevHigh","TestAndDevLow","BackupTargetSSD","BackupTargetCommvault","JournaledSequentialDump","BackupTargetAuto"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - qoSTypeNamePropEnum = append(qoSTypeNamePropEnum, v) - } -} - -const ( - - // QoSNameBackupTargetHigh captures enum value "BackupTargetHigh" - QoSNameBackupTargetHigh string = "BackupTargetHigh" - - // QoSNameBackupTargetLow captures enum value "BackupTargetLow" - QoSNameBackupTargetLow string = "BackupTargetLow" - - // QoSNameTestAndDevHigh captures enum value "TestAndDevHigh" - QoSNameTestAndDevHigh string = "TestAndDevHigh" - - // QoSNameTestAndDevLow captures enum value "TestAndDevLow" - QoSNameTestAndDevLow string = "TestAndDevLow" - - // QoSNameBackupTargetSSD captures enum value "BackupTargetSSD" - QoSNameBackupTargetSSD string = "BackupTargetSSD" - - // QoSNameBackupTargetCommvault captures enum value "BackupTargetCommvault" - QoSNameBackupTargetCommvault string = "BackupTargetCommvault" - - // QoSNameJournaledSequentialDump captures enum value "JournaledSequentialDump" - QoSNameJournaledSequentialDump string = "JournaledSequentialDump" - - // QoSNameBackupTargetAuto captures enum value "BackupTargetAuto" - QoSNameBackupTargetAuto string = "BackupTargetAuto" -) - -// prop value enum -func (m *QoS) validateNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, qoSTypeNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QoS) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil - } - - // value enum - if err := m.validateNameEnum("name", "body", *m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this qo s based on context it is used -func (m *QoS) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QoS) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QoS) UnmarshalBinary(b []byte) error { - var res QoS - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/qos_policies_result.go b/v2/models/qos_policies_result.go deleted file mode 100644 index 7a139f5a..00000000 --- a/v2/models/qos_policies_result.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// QosPoliciesResult Get QoS policies result. -// -// Specifies the list of QoS policies. -// -// swagger:model QosPoliciesResult -type QosPoliciesResult struct { - - // Specifies the list of QoS policies. - QosPolicies []*QoS `json:"qosPolicies"` -} - -// Validate validates this qos policies result -func (m *QosPoliciesResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQosPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *QosPoliciesResult) validateQosPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicies) { // not required - return nil - } - - for i := 0; i < len(m.QosPolicies); i++ { - if swag.IsZero(m.QosPolicies[i]) { // not required - continue - } - - if m.QosPolicies[i] != nil { - if err := m.QosPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this qos policies result based on the context it is used -func (m *QosPoliciesResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQosPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *QosPoliciesResult) contextValidateQosPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.QosPolicies); i++ { - - if m.QosPolicies[i] != nil { - - if swag.IsZero(m.QosPolicies[i]) { // not required - return nil - } - - if err := m.QosPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *QosPoliciesResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QosPoliciesResult) UnmarshalBinary(b []byte) error { - var res QosPoliciesResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/qos_policy.go b/v2/models/qos_policy.go deleted file mode 100644 index 24ce7bc0..00000000 --- a/v2/models/qos_policy.go +++ /dev/null @@ -1,113 +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" -) - -// QosPolicy QOS Policy type. -// -// QOS Policy type. -// -// swagger:model QosPolicy -type QosPolicy struct { - - // Specifies QOS Policy type. - // Enum: ["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"] - QosPolicy string `json:"qosPolicy,omitempty"` -} - -// Validate validates this qos policy -func (m *QosPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var qosPolicyTypeQosPolicyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupHDD","kBackupSSD","kTestAndDevHigh","kBackupAll"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - qosPolicyTypeQosPolicyPropEnum = append(qosPolicyTypeQosPolicyPropEnum, v) - } -} - -const ( - - // QosPolicyQosPolicyKBackupHDD captures enum value "kBackupHDD" - QosPolicyQosPolicyKBackupHDD string = "kBackupHDD" - - // QosPolicyQosPolicyKBackupSSD captures enum value "kBackupSSD" - QosPolicyQosPolicyKBackupSSD string = "kBackupSSD" - - // QosPolicyQosPolicyKTestAndDevHigh captures enum value "kTestAndDevHigh" - QosPolicyQosPolicyKTestAndDevHigh string = "kTestAndDevHigh" - - // QosPolicyQosPolicyKBackupAll captures enum value "kBackupAll" - QosPolicyQosPolicyKBackupAll string = "kBackupAll" -) - -// prop value enum -func (m *QosPolicy) validateQosPolicyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, qosPolicyTypeQosPolicyPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QosPolicy) validateQosPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - // value enum - if err := m.validateQosPolicyEnum("qosPolicy", "body", m.QosPolicy); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this qos policy based on context it is used -func (m *QosPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QosPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QosPolicy) UnmarshalBinary(b []byte) error { - var res QosPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/quota_policy.go b/v2/models/quota_policy.go deleted file mode 100644 index de2793dc..00000000 --- a/v2/models/quota_policy.go +++ /dev/null @@ -1,84 +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" -) - -// QuotaPolicy Quota Policy -// -// Specifies a quota limit that can be optionally applied to Views and -// Storage Domains. -// At the View level, this quota defines a logical limit for usage on the View. -// At the Storage Domain level, this quota defines a physical limit or -// a default logical View limit. -// If a physical quota is specified for Storage Domain, this quota defines a physical -// limit for the usage on the Storage Domain. -// If a default logical View quota is specified for Storage Domain, this limit -// is inherited by all the Views in that Storage Domain. -// However, this inherited quota can be overwritten at the View level. -// A new write is not allowed if the resource 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 resource, as the Cluster calculates the usage -// across Nodes. -// -// swagger:model QuotaPolicy -type QuotaPolicy struct { - - // Specifies if an alert should be triggered when the usage of this - // resource exceeds this quota limit. - // This limit is optional and is specified in bytes. - // If no value is specified, there is no limit. - AlertLimitBytes *int64 `json:"alertLimitBytes,omitempty"` - - // Supported only for user quota policy. - // Specifies when the usage goes above an alert threshold percentage - // which is: - // HardLimitBytes * AlertThresholdPercentage, eg: 80% of HardLimitBytes - // Can only be set if HardLimitBytes is set. - // Cannot be set if AlertLimitBytes is already set. - AlertThresholdPercentage *int64 `json:"alertThresholdPercentage,omitempty"` - - // Specifies an optional quota limit on the usage allowed for this - // resource. This limit is specified in bytes. If no value is specified, - // there is no limit. - HardLimitBytes *int64 `json:"hardLimitBytes,omitempty"` -} - -// Validate validates this quota policy -func (m *QuotaPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this quota policy based on context it is used -func (m *QuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *QuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *QuotaPolicy) UnmarshalBinary(b []byte) error { - var res QuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rack.go b/v2/models/rack.go deleted file mode 100644 index c30a003d..00000000 --- a/v2/models/rack.go +++ /dev/null @@ -1,61 +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" -) - -// Rack Rack specific response. -// -// Specifies information about rack. -// -// swagger:model Rack -type Rack struct { - - // Specifies unique id of the rack. - ID *int64 `json:"id,omitempty"` - - // Specifies name of the rack - Name *string `json:"name,omitempty"` - - // Specifies location of the rack. - Location *string `json:"location,omitempty"` - - // List of chassis ids that are part of the rack. - ChassisIds []int64 `json:"chassisIds"` -} - -// Validate validates this rack -func (m *Rack) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this rack based on context it is used -func (m *Rack) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Rack) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Rack) UnmarshalBinary(b []byte) error { - var res Rack - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/racks.go b/v2/models/racks.go deleted file mode 100644 index 73acb70e..00000000 --- a/v2/models/racks.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Racks List of Racks -// -// Specifies info about list of racks. -// -// swagger:model Racks -type Racks struct { - - // Specifies list of racks - Racks []*Rack `json:"racks"` -} - -// Validate validates this racks -func (m *Racks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRacks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Racks) validateRacks(formats strfmt.Registry) error { - if swag.IsZero(m.Racks) { // not required - return nil - } - - for i := 0; i < len(m.Racks); i++ { - if swag.IsZero(m.Racks[i]) { // not required - continue - } - - if m.Racks[i] != nil { - if err := m.Racks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("racks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("racks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this racks based on the context it is used -func (m *Racks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRacks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Racks) contextValidateRacks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Racks); i++ { - - if m.Racks[i] != nil { - - if swag.IsZero(m.Racks[i]) { // not required - return nil - } - - if err := m.Racks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("racks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("racks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Racks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Racks) UnmarshalBinary(b []byte) error { - var res Racks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/radio_button_form_field_params.go b/v2/models/radio_button_form_field_params.go deleted file mode 100644 index a910d4f6..00000000 --- a/v2/models/radio_button_form_field_params.go +++ /dev/null @@ -1,118 +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" -) - -// RadioButtonFormFieldParams Parameters to specify a radio button component. -// -// swagger:model RadioButtonFormFieldParams -type RadioButtonFormFieldParams struct { - - // Id to identify the radio button. This is also be used for assigning component html ids which can be leveraged for writing automation against the button. - ID *string `json:"id,omitempty"` - - // Label to be shown for the radio button on the UI. - Label *string `json:"label,omitempty"` - - // Value associated with the radio button. - Value *string `json:"value,omitempty"` - - // Optional form panel to be rendered if this radio button is selected. - Panel *FormPanelParams `json:"panel,omitempty"` -} - -// Validate validates this radio button form field params -func (m *RadioButtonFormFieldParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePanel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RadioButtonFormFieldParams) validatePanel(formats strfmt.Registry) error { - if swag.IsZero(m.Panel) { // not required - return nil - } - - if m.Panel != nil { - if err := m.Panel.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("panel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("panel") - } - return err - } - } - - return nil -} - -// ContextValidate validate this radio button form field params based on the context it is used -func (m *RadioButtonFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePanel(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RadioButtonFormFieldParams) contextValidatePanel(ctx context.Context, formats strfmt.Registry) error { - - if m.Panel != nil { - - if swag.IsZero(m.Panel) { // not required - return nil - } - - if err := m.Panel.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("panel") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("panel") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RadioButtonFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RadioButtonFormFieldParams) UnmarshalBinary(b []byte) error { - var res RadioButtonFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/radio_group_form_field_params.go b/v2/models/radio_group_form_field_params.go deleted file mode 100644 index 97541af5..00000000 --- a/v2/models/radio_group_form_field_params.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RadioGroupFormFieldParams Parameters to specify a radio group form field. -// -// swagger:model RadioGroupFormFieldParams -type RadioGroupFormFieldParams struct { - - // Specifies whether the field is mandatory. - Required *bool `json:"required,omitempty"` - - // Default selection of the radio button. - DefaultValue *string `json:"defaultValue,omitempty"` - - // List of radio buttons part of the radio group. - RadioButtons []*RadioButtonFormFieldParams `json:"radioButtons"` -} - -// Validate validates this radio group form field params -func (m *RadioGroupFormFieldParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRadioButtons(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RadioGroupFormFieldParams) validateRadioButtons(formats strfmt.Registry) error { - if swag.IsZero(m.RadioButtons) { // not required - return nil - } - - for i := 0; i < len(m.RadioButtons); i++ { - if swag.IsZero(m.RadioButtons[i]) { // not required - continue - } - - if m.RadioButtons[i] != nil { - if err := m.RadioButtons[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("radioButtons" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("radioButtons" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this radio group form field params based on the context it is used -func (m *RadioGroupFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRadioButtons(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RadioGroupFormFieldParams) contextValidateRadioButtons(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RadioButtons); i++ { - - if m.RadioButtons[i] != nil { - - if swag.IsZero(m.RadioButtons[i]) { // not required - return nil - } - - if err := m.RadioButtons[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("radioButtons" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("radioButtons" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RadioGroupFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RadioGroupFormFieldParams) UnmarshalBinary(b []byte) error { - var res RadioGroupFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rds_config.go b/v2/models/rds_config.go deleted file mode 100644 index 4bce7ca7..00000000 --- a/v2/models/rds_config.go +++ /dev/null @@ -1,271 +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" -) - -// RdsConfig Recover AWS RDS params. -// -// Specifies the parameters to recover AWS RDS. -// -// swagger:model RdsConfig -type RdsConfig struct { - - // Specifies the port to use for the DB in the restored RDS instance. - // Required: true - DbPort *int32 `json:"dbPort"` - - // Specifies the DB instance identifier to use for the restored DB. - // Required: true - DbInstanceID *string `json:"dbInstanceId"` - - // Specifies whether this is a multi-az deployment or not. - // Required: true - IsMultiAzDeployment *bool `json:"isMultiAzDeployment"` - - // Specifies whether this DB will be publicly accessible or not. - EnablePublicAccessibility *bool `json:"enablePublicAccessibility,omitempty"` - - // Specifies whether to enable IAM authentication for the DB. - // Required: true - EnableIamDbAuthentication *bool `json:"enableIamDbAuthentication"` - - // Specifies whether to enable copying of tags to snapshots of the DB. - // Required: true - EnableCopyTagsToSnapshots *bool `json:"enableCopyTagsToSnapshots"` - - // Specifies whether to enable auto minor version upgrade in the restored DB. - // Required: true - EnableAutoMinorVersionUpgrade *bool `json:"enableAutoMinorVersionUpgrade"` - - // Specifies a point in time for recovery in microseconds. - PointInTimeUsecs *int64 `json:"pointInTimeUsecs,omitempty"` - - // Specifies entity representing the RDS option group to use while restoring the DB. - DbOptionGroup *RecoveryObjectIdentifier `json:"dbOptionGroup,omitempty"` - - // Specifies the entity representing the RDS parameter group to use while restoring the DB. - DbParameterGroup *RecoveryObjectIdentifier `json:"dbParameterGroup,omitempty"` -} - -// Validate validates this rds config -func (m *RdsConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDbPort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsMultiAzDeployment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableIamDbAuthentication(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableCopyTagsToSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableAutoMinorVersionUpgrade(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbOptionGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDbParameterGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RdsConfig) validateDbPort(formats strfmt.Registry) error { - - if err := validate.Required("dbPort", "body", m.DbPort); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateDbInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("dbInstanceId", "body", m.DbInstanceID); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateIsMultiAzDeployment(formats strfmt.Registry) error { - - if err := validate.Required("isMultiAzDeployment", "body", m.IsMultiAzDeployment); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateEnableIamDbAuthentication(formats strfmt.Registry) error { - - if err := validate.Required("enableIamDbAuthentication", "body", m.EnableIamDbAuthentication); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateEnableCopyTagsToSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("enableCopyTagsToSnapshots", "body", m.EnableCopyTagsToSnapshots); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateEnableAutoMinorVersionUpgrade(formats strfmt.Registry) error { - - if err := validate.Required("enableAutoMinorVersionUpgrade", "body", m.EnableAutoMinorVersionUpgrade); err != nil { - return err - } - - return nil -} - -func (m *RdsConfig) validateDbOptionGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if m.DbOptionGroup != nil { - if err := m.DbOptionGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *RdsConfig) validateDbParameterGroup(formats strfmt.Registry) error { - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if m.DbParameterGroup != nil { - if err := m.DbParameterGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -// ContextValidate validate this rds config based on the context it is used -func (m *RdsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDbOptionGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDbParameterGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RdsConfig) contextValidateDbOptionGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbOptionGroup != nil { - - if swag.IsZero(m.DbOptionGroup) { // not required - return nil - } - - if err := m.DbOptionGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbOptionGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbOptionGroup") - } - return err - } - } - - return nil -} - -func (m *RdsConfig) contextValidateDbParameterGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.DbParameterGroup != nil { - - if swag.IsZero(m.DbParameterGroup) { // not required - return nil - } - - if err := m.DbParameterGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dbParameterGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dbParameterGroup") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RdsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RdsConfig) UnmarshalBinary(b []byte) error { - var res RdsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_file_and_folder_params.go b/v2/models/recover_acropolis_file_and_folder_params.go deleted file mode 100644 index 13545e12..00000000 --- a/v2/models/recover_acropolis_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAcropolisFileAndFolderParams Recover Acropolis Files and Folders Params. -// -// Specifies the parameters to recover Acropolis files and folders. -// -// swagger:model RecoverAcropolisFileAndFolderParams -type RecoverAcropolisFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAcropolis"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an Acropolis target. - AcropolisTargetParams *AcropolisTargetParamsForRecoverFileAndFolder `json:"acropolisTargetParams,omitempty"` -} - -// Validate validates this recover acropolis file and folder params -func (m *RecoverAcropolisFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAcropolisFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAcropolis"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAcropolisFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverAcropolisFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAcropolisFileAndFolderParamsTargetEnvironmentKAcropolis captures enum value "kAcropolis" - RecoverAcropolisFileAndFolderParamsTargetEnvironmentKAcropolis string = "kAcropolis" -) - -// prop value enum -func (m *RecoverAcropolisFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAcropolisFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAcropolisFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAcropolisFileAndFolderParams) validateAcropolisTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisTargetParams) { // not required - return nil - } - - if m.AcropolisTargetParams != nil { - if err := m.AcropolisTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis file and folder params based on the context it is used -func (m *RecoverAcropolisFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAcropolisFileAndFolderParams) contextValidateAcropolisTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisTargetParams != nil { - - if swag.IsZero(m.AcropolisTargetParams) { // not required - return nil - } - - if err := m.AcropolisTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_params.go b/v2/models/recover_acropolis_params.go deleted file mode 100644 index 1d5b1e78..00000000 --- a/v2/models/recover_acropolis_params.go +++ /dev/null @@ -1,330 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAcropolisParams Recover VM params. -// -// Specifies Acropolis related recovery options. -// -// swagger:model RecoverAcropolisParams -type RecoverAcropolisParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. For recovering files, specifies the object contains the file to recover. - Objects []*RecoverAcropolisSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["RecoverVMs","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Acropolis files and folders. - RecoverFileAndFolderParams *RecoverAcropolisFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Acropolis VMs. - RecoverVMParams *RecoverAcropolisVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover acropolis params -func (m *RecoverAcropolisParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAcropolisParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAcropolisParamsTypeRecoveryActionPropEnum = append(recoverAcropolisParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverAcropolisParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverAcropolisParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverAcropolisParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverAcropolisParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverAcropolisParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAcropolisParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAcropolisParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverAcropolisParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis params based on the context it is used -func (m *RecoverAcropolisParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAcropolisParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisParams) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_snapshot_params.go b/v2/models/recover_acropolis_snapshot_params.go deleted file mode 100644 index 250bd390..00000000 --- a/v2/models/recover_acropolis_snapshot_params.go +++ /dev/null @@ -1,230 +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" -) - -// RecoverAcropolisSnapshotParams Recover Acropolis Snapshot Params. -// -// Specifies the snapshot parameters to recover Acropolis VM. -// -// swagger:model RecoverAcropolisSnapshotParams -type RecoverAcropolisSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the info about datastore migration. This is only applicable for AcropolisVm. - // Read Only: true - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - // Specifies the info about instant recovery. This is only applicable for AcropolisVm. - // Read Only: true - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverAcropolisSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DatastoreMigrationInfo = dataAO1.DatastoreMigrationInfo - - m.InstantRecoveryInfo = dataAO1.InstantRecoveryInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverAcropolisSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - - dataAO1.DatastoreMigrationInfo = m.DatastoreMigrationInfo - - dataAO1.InstantRecoveryInfo = m.InstantRecoveryInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover acropolis snapshot params -func (m *RecoverAcropolisSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreMigrationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstantRecoveryInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisSnapshotParams) validateDatastoreMigrationInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.DatastoreMigrationInfo) { // not required - return nil - } - - if m.DatastoreMigrationInfo != nil { - if err := m.DatastoreMigrationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreMigrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreMigrationInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisSnapshotParams) validateInstantRecoveryInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if m.InstantRecoveryInfo != nil { - if err := m.InstantRecoveryInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis snapshot params based on the context it is used -func (m *RecoverAcropolisSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreMigrationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstantRecoveryInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisSnapshotParams) contextValidateDatastoreMigrationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreMigrationInfo != nil { - - if swag.IsZero(m.DatastoreMigrationInfo) { // not required - return nil - } - - if err := m.DatastoreMigrationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreMigrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreMigrationInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisSnapshotParams) contextValidateInstantRecoveryInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.InstantRecoveryInfo != nil { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if err := m.InstantRecoveryInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_new_source_config.go b/v2/models/recover_acropolis_vm_new_source_config.go deleted file mode 100644 index f1004ae6..00000000 --- a/v2/models/recover_acropolis_vm_new_source_config.go +++ /dev/null @@ -1,212 +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" -) - -// RecoverAcropolisVMNewSourceConfig Recover Acropolis VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverAcropolisVmNewSourceConfig -type RecoverAcropolisVMNewSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverAcropolisVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // A storage container where the VM's files should be restored to. - StorageContainer *RecoveryObjectIdentifier `json:"storageContainer,omitempty"` -} - -// Validate validates this recover acropolis Vm new source config -func (m *RecoverAcropolisVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageContainer(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMNewSourceConfig) 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 -} - -func (m *RecoverAcropolisVMNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisVMNewSourceConfig) validateStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if m.StorageContainer != nil { - if err := m.StorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis Vm new source config based on the context it is used -func (m *RecoverAcropolisVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMNewSourceConfig) 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 -} - -func (m *RecoverAcropolisVMNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisVMNewSourceConfig) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageContainer != nil { - - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if err := m.StorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_new_source_network_config.go b/v2/models/recover_acropolis_vm_new_source_network_config.go deleted file mode 100644 index 5f0653b2..00000000 --- a/v2/models/recover_acropolis_vm_new_source_network_config.go +++ /dev/null @@ -1,114 +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" -) - -// RecoverAcropolisVMNewSourceNetworkConfig Recover Acropolis VMs network configuration. -// -// Specifies the network config parameters to applied for Acropolis VMs. -// -// swagger:model RecoverAcropolisVmNewSourceNetworkConfig -type RecoverAcropolisVMNewSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // 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"` -} - -// Validate validates this recover acropolis Vm new source network config -func (m *RecoverAcropolisVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkPortGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMNewSourceNetworkConfig) validateNetworkPortGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if m.NetworkPortGroup != nil { - if err := m.NetworkPortGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis Vm new source network config based on the context it is used -func (m *RecoverAcropolisVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkPortGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMNewSourceNetworkConfig) contextValidateNetworkPortGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkPortGroup != nil { - - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if err := m.NetworkPortGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_original_source_config.go b/v2/models/recover_acropolis_vm_original_source_config.go deleted file mode 100644 index 7f5eadf3..00000000 --- a/v2/models/recover_acropolis_vm_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverAcropolisVMOriginalSourceConfig Recover Acropolis VMs Original Source Config. -// -// Specifies the Source configuration if VM's are being recovered to Original Source. -// -// swagger:model RecoverAcropolisVmOriginalSourceConfig -type RecoverAcropolisVMOriginalSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverAcropolisVMOriginalSourceNetworkConfig `json:"networkConfig,omitempty"` -} - -// Validate validates this recover acropolis Vm original source config -func (m *RecoverAcropolisVMOriginalSourceConfig) 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 *RecoverAcropolisVMOriginalSourceConfig) 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 recover acropolis Vm original source config based on the context it is used -func (m *RecoverAcropolisVMOriginalSourceConfig) 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 *RecoverAcropolisVMOriginalSourceConfig) 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 *RecoverAcropolisVMOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_original_source_network_config.go b/v2/models/recover_acropolis_vm_original_source_network_config.go deleted file mode 100644 index 41438168..00000000 --- a/v2/models/recover_acropolis_vm_original_source_network_config.go +++ /dev/null @@ -1,52 +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" -) - -// RecoverAcropolisVMOriginalSourceNetworkConfig Recover Acropolis VMs Original Source Network configuration. -// -// Specifies the network config parameters to be applied for Acropolis VMs if recovering to original Source. -// -// swagger:model RecoverAcropolisVmOriginalSourceNetworkConfig -type RecoverAcropolisVMOriginalSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` -} - -// Validate validates this recover acropolis Vm original source network config -func (m *RecoverAcropolisVMOriginalSourceNetworkConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover acropolis Vm original source network config based on context it is used -func (m *RecoverAcropolisVMOriginalSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisVMOriginalSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMOriginalSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMOriginalSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_params.go b/v2/models/recover_acropolis_vm_params.go deleted file mode 100644 index bbdebd69..00000000 --- a/v2/models/recover_acropolis_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAcropolisVMParams Recover Acropolis params. -// -// Specifies the recovery options specific to Acropolis environment. -// -// swagger:model RecoverAcropolisVmParams -type RecoverAcropolisVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAcropolis"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a Acropolis target. - AcropolisTargetParams *AcropolisTargetParamsForRecoverVM `json:"acropolisTargetParams,omitempty"` -} - -// Validate validates this recover acropolis Vm params -func (m *RecoverAcropolisVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAcropolisVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAcropolis"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAcropolisVmParamsTypeTargetEnvironmentPropEnum = append(recoverAcropolisVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAcropolisVMParamsTargetEnvironmentKAcropolis captures enum value "kAcropolis" - RecoverAcropolisVMParamsTargetEnvironmentKAcropolis string = "kAcropolis" -) - -// prop value enum -func (m *RecoverAcropolisVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAcropolisVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAcropolisVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAcropolisVMParams) validateAcropolisTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AcropolisTargetParams) { // not required - return nil - } - - if m.AcropolisTargetParams != nil { - if err := m.AcropolisTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis Vm params based on the context it is used -func (m *RecoverAcropolisVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAcropolisVMParams) contextValidateAcropolisTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisTargetParams != nil { - - if swag.IsZero(m.AcropolisTargetParams) { // not required - return nil - } - - if err := m.AcropolisTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMParams) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_acropolis_vm_target_config.go b/v2/models/recover_acropolis_vm_target_config.go deleted file mode 100644 index a651c6dd..00000000 --- a/v2/models/recover_acropolis_vm_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverAcropolisVMTargetConfig Vm Target Configuration for Acropolis Recovery -// -// Specifies the target configuration source parameters. -// -// swagger:model RecoverAcropolisVmTargetConfig -type RecoverAcropolisVMTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverAcropolisVMNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverAcropolisVMOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover acropolis Vm target config -func (m *RecoverAcropolisVMTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverAcropolisVMTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisVMTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover acropolis Vm target config based on the context it is used -func (m *RecoverAcropolisVMTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAcropolisVMTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverAcropolisVMTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAcropolisVMTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAcropolisVMTargetConfig) UnmarshalBinary(b []byte) error { - var res RecoverAcropolisVMTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_aurora_new_source_config.go b/v2/models/recover_aws_aurora_new_source_config.go deleted file mode 100644 index 2ed6a0b0..00000000 --- a/v2/models/recover_aws_aurora_new_source_config.go +++ /dev/null @@ -1,208 +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" -) - -// RecoverAwsAuroraNewSourceConfig Recover AWS Aurora New Source Config. -// -// Specifies the new destination Source configuration where the Aurora instances will be recovered. -// -// swagger:model RecoverAwsAuroraNewSourceConfig -type RecoverAwsAuroraNewSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - // Required: true - NetworkConfig *RecoverAwsAuroraNewSourceNetworkConfig `json:"networkConfig"` - - // Specifies the AWS region in which to deploy the Aurora instance. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` - - // Specifies the id of the parent source to recover the Aurora. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover aws aurora new source config -func (m *RecoverAwsAuroraNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraNewSourceConfig) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsAuroraNewSourceConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws aurora new source config based on the context it is used -func (m *RecoverAwsAuroraNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraNewSourceConfig) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *RecoverAwsAuroraNewSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsAuroraNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsAuroraNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsAuroraNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_aurora_new_source_network_config.go b/v2/models/recover_aws_aurora_new_source_network_config.go deleted file mode 100644 index 54ffab0a..00000000 --- a/v2/models/recover_aws_aurora_new_source_network_config.go +++ /dev/null @@ -1,273 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsAuroraNewSourceNetworkConfig Recover AWS Aurora New Source Network configuration. -// -// Specifies the network config parameters to be applied for AWS Aurora if recovering to new Source. -// -// swagger:model RecoverAwsAuroraNewSourceNetworkConfig -type RecoverAwsAuroraNewSourceNetworkConfig struct { - - // Specifies the network security groups within above VPC. - SecurityGroups []*RecoveryObjectIdentifier `json:"securityGroups"` - - // Specifies the entity representing the availability zone to use while restoring the DB. - AvailabilityZone *RecoveryObjectIdentifier `json:"availabilityZone,omitempty"` - - // Specifies the subnet within above VPC. - // Required: true - Subnet *RecoveryObjectIdentifier `json:"subnet"` - - // Specifies the Virtual Private Cloud to choose for the instance type. - // Required: true - Vpc *RecoveryObjectIdentifier `json:"vpc"` -} - -// Validate validates this recover aws aurora new source network config -func (m *RecoverAwsAuroraNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecurityGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAvailabilityZone(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) validateSecurityGroups(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityGroups) { // not required - return nil - } - - for i := 0; i < len(m.SecurityGroups); i++ { - if swag.IsZero(m.SecurityGroups[i]) { // not required - continue - } - - if m.SecurityGroups[i] != nil { - if err := m.SecurityGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) validateAvailabilityZone(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if m.AvailabilityZone != nil { - if err := m.AvailabilityZone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) validateVpc(formats strfmt.Registry) error { - - if err := validate.Required("vpc", "body", m.Vpc); err != nil { - return err - } - - if m.Vpc != nil { - if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws aurora new source network config based on the context it is used -func (m *RecoverAwsAuroraNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecurityGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAvailabilityZone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) contextValidateSecurityGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecurityGroups); i++ { - - if m.SecurityGroups[i] != nil { - - if swag.IsZero(m.SecurityGroups[i]) { // not required - return nil - } - - if err := m.SecurityGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) contextValidateAvailabilityZone(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilityZone != nil { - - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if err := m.AvailabilityZone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsAuroraNewSourceNetworkConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Subnet != 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 *RecoverAwsAuroraNewSourceNetworkConfig) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpc != nil { - - if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsAuroraNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsAuroraNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsAuroraNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_aurora_params.go b/v2/models/recover_aws_aurora_params.go deleted file mode 100644 index 705a88d2..00000000 --- a/v2/models/recover_aws_aurora_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsAuroraParams Recover AWS Aurora params. -// -// Specifies the parameters to recover AWS Aurora. -// -// swagger:model RecoverAwsAuroraParams -type RecoverAwsAuroraParams struct { - - // Specifies the Protection Group Runs params to recover. All the Aurora instances that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of Aurora instances. User has to make sure specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an AWS target. - AwsTargetParams *AwsTargetParamsForRecoverAurora `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover aws aurora params -func (m *RecoverAwsAuroraParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsAuroraParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsAuroraParamsTypeTargetEnvironmentPropEnum = append(recoverAwsAuroraParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAwsAuroraParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverAwsAuroraParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverAwsAuroraParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsAuroraParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsAuroraParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsAuroraParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws aurora params based on the context it is used -func (m *RecoverAwsAuroraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsAuroraParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsAuroraParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsAuroraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsAuroraParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsAuroraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_file_and_folder_params.go b/v2/models/recover_aws_file_and_folder_params.go deleted file mode 100644 index 5f2b3e2c..00000000 --- a/v2/models/recover_aws_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsFileAndFolderParams Recover AWS File And Folder Params -// -// Specifies the parameters to recover files and folders. -// -// swagger:model RecoverAwsFileAndFolderParams -type RecoverAwsFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters to recover to an AWS target. - AwsTargetParams *AwsTargetParamsForRecoverFileAndFolder `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover aws file and folder params -func (m *RecoverAwsFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverAwsFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAwsFileAndFolderParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverAwsFileAndFolderParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverAwsFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsFileAndFolderParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws file and folder params based on the context it is used -func (m *RecoverAwsFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsFileAndFolderParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_params.go b/v2/models/recover_aws_params.go deleted file mode 100644 index d6f5878e..00000000 --- a/v2/models/recover_aws_params.go +++ /dev/null @@ -1,546 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsParams Recover AWS environment params. -// -// Specifies the recovery options specific to AWS environment. -// -// swagger:model RecoverAwsParams -type RecoverAwsParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. For recovering files, specifies the object contains the file to recover. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverVMs","RecoverRDS","RecoverAurora","RecoverFiles","RecoverS3Buckets","RecoverRDSPostgres"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover AWS Aurora. - RecoverAuroraParams *RecoverAwsAuroraParams `json:"recoverAuroraParams,omitempty"` - - // Specifies the parameters to recover files and folders. - RecoverFileAndFolderParams *RecoverAwsFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover AWS RDS Ingest. - RecoverRdsIngestParams *RecoverRDSPostgresParams `json:"recoverRdsIngestParams,omitempty"` - - // Specifies the parameters to recover AWS RDS. - RecoverRdsParams *RecoverAwsRdsParams `json:"recoverRdsParams,omitempty"` - - // Specifies the parameters to recover AWS S3 Buckets. - RecoverS3BucketParams *RecoverAwsS3BucketParams `json:"recoverS3BucketParams,omitempty"` - - // Specifies the parameters to recover AWS VM. - RecoverVMParams *RecoverAwsVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover aws params -func (m *RecoverAwsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverAuroraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverRdsIngestParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverRdsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverS3BucketParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverRDS","RecoverAurora","RecoverFiles","RecoverS3Buckets","RecoverRDSPostgres"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsParamsTypeRecoveryActionPropEnum = append(recoverAwsParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverAwsParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverAwsParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverAwsParamsRecoveryActionRecoverRDS captures enum value "RecoverRDS" - RecoverAwsParamsRecoveryActionRecoverRDS string = "RecoverRDS" - - // RecoverAwsParamsRecoveryActionRecoverAurora captures enum value "RecoverAurora" - RecoverAwsParamsRecoveryActionRecoverAurora string = "RecoverAurora" - - // RecoverAwsParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverAwsParamsRecoveryActionRecoverFiles string = "RecoverFiles" - - // RecoverAwsParamsRecoveryActionRecoverS3Buckets captures enum value "RecoverS3Buckets" - RecoverAwsParamsRecoveryActionRecoverS3Buckets string = "RecoverS3Buckets" - - // RecoverAwsParamsRecoveryActionRecoverRDSPostgres captures enum value "RecoverRDSPostgres" - RecoverAwsParamsRecoveryActionRecoverRDSPostgres string = "RecoverRDSPostgres" -) - -// prop value enum -func (m *RecoverAwsParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverAuroraParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverAuroraParams) { // not required - return nil - } - - if m.RecoverAuroraParams != nil { - if err := m.RecoverAuroraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAuroraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAuroraParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverRdsIngestParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverRdsIngestParams) { // not required - return nil - } - - if m.RecoverRdsIngestParams != nil { - if err := m.RecoverRdsIngestParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverRdsIngestParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverRdsIngestParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverRdsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverRdsParams) { // not required - return nil - } - - if m.RecoverRdsParams != nil { - if err := m.RecoverRdsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverRdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverRdsParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverS3BucketParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverS3BucketParams) { // not required - return nil - } - - if m.RecoverS3BucketParams != nil { - if err := m.RecoverS3BucketParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverS3BucketParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverS3BucketParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws params based on the context it is used -func (m *RecoverAwsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverAuroraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverRdsIngestParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverRdsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverS3BucketParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverAuroraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverAuroraParams != nil { - - if swag.IsZero(m.RecoverAuroraParams) { // not required - return nil - } - - if err := m.RecoverAuroraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAuroraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAuroraParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverRdsIngestParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverRdsIngestParams != nil { - - if swag.IsZero(m.RecoverRdsIngestParams) { // not required - return nil - } - - if err := m.RecoverRdsIngestParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverRdsIngestParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverRdsIngestParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverRdsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverRdsParams != nil { - - if swag.IsZero(m.RecoverRdsParams) { // not required - return nil - } - - if err := m.RecoverRdsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverRdsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverRdsParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverS3BucketParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverS3BucketParams != nil { - - if swag.IsZero(m.RecoverS3BucketParams) { // not required - return nil - } - - if err := m.RecoverS3BucketParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverS3BucketParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverS3BucketParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_rds_new_source_config.go b/v2/models/recover_aws_rds_new_source_config.go deleted file mode 100644 index b52dc741..00000000 --- a/v2/models/recover_aws_rds_new_source_config.go +++ /dev/null @@ -1,208 +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" -) - -// RecoverAwsRdsNewSourceConfig Recover AWS RDS New Source Config. -// -// Specifies the new destination Source configuration where the RDS instances will be recovered. -// -// swagger:model RecoverAwsRdsNewSourceConfig -type RecoverAwsRdsNewSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - // Required: true - NetworkConfig *RecoverAwsRdsNewSourceNetworkConfig `json:"networkConfig"` - - // Specifies the AWS region in which to deploy the RDS instance. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` - - // Specifies the id of the parent source to recover the RDS. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover aws rds new source config -func (m *RecoverAwsRdsNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsNewSourceConfig) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsRdsNewSourceConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws rds new source config based on the context it is used -func (m *RecoverAwsRdsNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsNewSourceConfig) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *RecoverAwsRdsNewSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsRdsNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsRdsNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsRdsNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_rds_new_source_network_config.go b/v2/models/recover_aws_rds_new_source_network_config.go deleted file mode 100644 index 8e0d4c80..00000000 --- a/v2/models/recover_aws_rds_new_source_network_config.go +++ /dev/null @@ -1,273 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsRdsNewSourceNetworkConfig Recover AWS RDS New Source Network configuration. -// -// Specifies the network config parameters to be applied for AWS RDS if recovering to new Source. -// -// swagger:model RecoverAwsRdsNewSourceNetworkConfig -type RecoverAwsRdsNewSourceNetworkConfig struct { - - // Specifies the network security groups within above VPC. - SecurityGroups []*RecoveryObjectIdentifier `json:"securityGroups"` - - // Specifies the entity representing the availability zone to use while restoring the DB. - AvailabilityZone *RecoveryObjectIdentifier `json:"availabilityZone,omitempty"` - - // Specifies the subnet within above VPC. - // Required: true - Subnet *RecoveryObjectIdentifier `json:"subnet"` - - // Specifies the Virtual Private Cloud to choose for the instance type. - // Required: true - Vpc *RecoveryObjectIdentifier `json:"vpc"` -} - -// Validate validates this recover aws rds new source network config -func (m *RecoverAwsRdsNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecurityGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAvailabilityZone(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) validateSecurityGroups(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityGroups) { // not required - return nil - } - - for i := 0; i < len(m.SecurityGroups); i++ { - if swag.IsZero(m.SecurityGroups[i]) { // not required - continue - } - - if m.SecurityGroups[i] != nil { - if err := m.SecurityGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) validateAvailabilityZone(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if m.AvailabilityZone != nil { - if err := m.AvailabilityZone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) validateVpc(formats strfmt.Registry) error { - - if err := validate.Required("vpc", "body", m.Vpc); err != nil { - return err - } - - if m.Vpc != nil { - if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws rds new source network config based on the context it is used -func (m *RecoverAwsRdsNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecurityGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAvailabilityZone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) contextValidateSecurityGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecurityGroups); i++ { - - if m.SecurityGroups[i] != nil { - - if swag.IsZero(m.SecurityGroups[i]) { // not required - return nil - } - - if err := m.SecurityGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) contextValidateAvailabilityZone(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilityZone != nil { - - if swag.IsZero(m.AvailabilityZone) { // not required - return nil - } - - if err := m.AvailabilityZone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsRdsNewSourceNetworkConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Subnet != 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 *RecoverAwsRdsNewSourceNetworkConfig) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpc != nil { - - if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsRdsNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsRdsNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsRdsNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_rds_params.go b/v2/models/recover_aws_rds_params.go deleted file mode 100644 index f4672cc0..00000000 --- a/v2/models/recover_aws_rds_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsRdsParams Recover AWS RDS params. -// -// Specifies the parameters to recover AWS RDS. -// -// swagger:model RecoverAwsRdsParams -type RecoverAwsRdsParams struct { - - // Specifies the Protection Group Runs params to recover. All the RDS instances that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of RDS instances. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an AWS target. - AwsTargetParams *AwsTargetParamsForRecoverRds `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover aws rds params -func (m *RecoverAwsRdsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsRdsParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsRdsParamsTypeTargetEnvironmentPropEnum = append(recoverAwsRdsParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAwsRdsParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverAwsRdsParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverAwsRdsParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsRdsParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsRdsParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsRdsParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws rds params based on the context it is used -func (m *RecoverAwsRdsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsRdsParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsRdsParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsRdsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsRdsParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsRdsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_s3_bucket_params.go b/v2/models/recover_aws_s3_bucket_params.go deleted file mode 100644 index 3116a853..00000000 --- a/v2/models/recover_aws_s3_bucket_params.go +++ /dev/null @@ -1,276 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsS3BucketParams Recover AWS S3 Bucket params. -// -// Specifies the parameters to recover AWS S3 Buckets. -// -// swagger:model RecoverAwsS3BucketParams -type RecoverAwsS3BucketParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the filtering policy for S3 Bucket restore. - AwsS3BucketRestoreFilterPolicy *AwsS3BucketRestoreFilterPolicy `json:"awsS3BucketRestoreFilterPolicy,omitempty"` - - // Specifies the params for recovering to an AWS target. - AwsTargetParams *AwsTargetParamsForRecoverS3 `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover aws s3 bucket params -func (m *RecoverAwsS3BucketParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3BucketRestoreFilterPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsS3BucketParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsS3BucketParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsS3BucketParamsTypeTargetEnvironmentPropEnum = append(recoverAwsS3BucketParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAwsS3BucketParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverAwsS3BucketParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverAwsS3BucketParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsS3BucketParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsS3BucketParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsS3BucketParams) validateAwsS3BucketRestoreFilterPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.AwsS3BucketRestoreFilterPolicy) { // not required - return nil - } - - if m.AwsS3BucketRestoreFilterPolicy != nil { - if err := m.AwsS3BucketRestoreFilterPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3BucketRestoreFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3BucketRestoreFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsS3BucketParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws s3 bucket params based on the context it is used -func (m *RecoverAwsS3BucketParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3BucketRestoreFilterPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsS3BucketParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsS3BucketParams) contextValidateAwsS3BucketRestoreFilterPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3BucketRestoreFilterPolicy != nil { - - if swag.IsZero(m.AwsS3BucketRestoreFilterPolicy) { // not required - return nil - } - - if err := m.AwsS3BucketRestoreFilterPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3BucketRestoreFilterPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3BucketRestoreFilterPolicy") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsS3BucketParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsS3BucketParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsS3BucketParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsS3BucketParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_vm_new_source_config.go b/v2/models/recover_aws_vm_new_source_config.go deleted file mode 100644 index 204943d8..00000000 --- a/v2/models/recover_aws_vm_new_source_config.go +++ /dev/null @@ -1,310 +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" -) - -// RecoverAwsVMNewSourceConfig Recover AWS VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverAwsVmNewSourceConfig -type RecoverAwsVMNewSourceConfig struct { - - // Specifies the encryption configuration. - EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` - - // Specifies the pair of public and private key used to login into the VM - KeyPair *RecoveryObjectIdentifier `json:"keyPair,omitempty"` - - // Specifies the networking configuration to be applied to the recovered VMs. - // Required: true - NetworkConfig *RecoverAwsVMNewSourceNetworkConfig `json:"networkConfig"` - - // Specifies the AWS region in which to deploy the VM. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover aws Vm new source config -func (m *RecoverAwsVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEncryptionConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyPair(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) validateEncryptionConfig(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if m.EncryptionConfig != nil { - if err := m.EncryptionConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) validateKeyPair(formats strfmt.Registry) error { - if swag.IsZero(m.KeyPair) { // not required - return nil - } - - if m.KeyPair != nil { - if err := m.KeyPair.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyPair") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyPair") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsVMNewSourceConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws Vm new source config based on the context it is used -func (m *RecoverAwsVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKeyPair(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) contextValidateEncryptionConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.EncryptionConfig != nil { - - if swag.IsZero(m.EncryptionConfig) { // not required - return nil - } - - if err := m.EncryptionConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("encryptionConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("encryptionConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) contextValidateKeyPair(ctx context.Context, formats strfmt.Registry) error { - - if m.KeyPair != nil { - - if swag.IsZero(m.KeyPair) { // not required - return nil - } - - if err := m.KeyPair.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyPair") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyPair") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *RecoverAwsVMNewSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAwsVMNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_vm_new_source_network_config.go b/v2/models/recover_aws_vm_new_source_network_config.go deleted file mode 100644 index 38c71cb3..00000000 --- a/v2/models/recover_aws_vm_new_source_network_config.go +++ /dev/null @@ -1,224 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsVMNewSourceNetworkConfig Recover AWS VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied for AWS VMs if recovering to new Source. -// -// swagger:model RecoverAwsVmNewSourceNetworkConfig -type RecoverAwsVMNewSourceNetworkConfig struct { - - // Specifies the network security groups within above VPC. - // Required: true - SecurityGroups []*RecoveryObjectIdentifier `json:"securityGroups"` - - // Specifies the subnet within above VPC. - // Required: true - Subnet *RecoveryObjectIdentifier `json:"subnet"` - - // Specifies the Virtual Private Cloud to choose for the instance type. - // Required: true - Vpc *RecoveryObjectIdentifier `json:"vpc"` -} - -// Validate validates this recover aws Vm new source network config -func (m *RecoverAwsVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecurityGroups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVpc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMNewSourceNetworkConfig) validateSecurityGroups(formats strfmt.Registry) error { - - if err := validate.Required("securityGroups", "body", m.SecurityGroups); err != nil { - return err - } - - for i := 0; i < len(m.SecurityGroups); i++ { - if swag.IsZero(m.SecurityGroups[i]) { // not required - continue - } - - if m.SecurityGroups[i] != nil { - if err := m.SecurityGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsVMNewSourceNetworkConfig) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - 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 -} - -func (m *RecoverAwsVMNewSourceNetworkConfig) validateVpc(formats strfmt.Registry) error { - - if err := validate.Required("vpc", "body", m.Vpc); err != nil { - return err - } - - if m.Vpc != nil { - if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws Vm new source network config based on the context it is used -func (m *RecoverAwsVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecurityGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVpc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMNewSourceNetworkConfig) contextValidateSecurityGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecurityGroups); i++ { - - if m.SecurityGroups[i] != nil { - - if swag.IsZero(m.SecurityGroups[i]) { // not required - return nil - } - - if err := m.SecurityGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsVMNewSourceNetworkConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Subnet != 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 *RecoverAwsVMNewSourceNetworkConfig) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vpc != nil { - - if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vpc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAwsVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_aws_vm_params.go b/v2/models/recover_aws_vm_params.go deleted file mode 100644 index abd03d4a..00000000 --- a/v2/models/recover_aws_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAwsVMParams Recover AWS VM params. -// -// Specifies the parameters to recover AWS VM. -// -// swagger:model RecoverAwsVmParams -type RecoverAwsVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an AWS target. - AwsTargetParams *AwsTargetParamsForRecoverVM `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover aws Vm params -func (m *RecoverAwsVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAwsVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAwsVmParamsTypeTargetEnvironmentPropEnum = append(recoverAwsVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAwsVMParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverAwsVMParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverAwsVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAwsVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAwsVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAwsVMParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover aws Vm params based on the context it is used -func (m *RecoverAwsVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAwsVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAwsVMParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAwsVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAwsVMParams) UnmarshalBinary(b []byte) error { - var res RecoverAwsVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_file_and_folder_params.go b/v2/models/recover_azure_file_and_folder_params.go deleted file mode 100644 index 2130595a..00000000 --- a/v2/models/recover_azure_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAzureFileAndFolderParams Recover Azure Files and Folders Params. -// -// Specifies the parameters to recover Azure files and folders. -// -// swagger:model RecoverAzureFileAndFolderParams -type RecoverAzureFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAzure"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an Azure target. - AzureTargetParams *AzureTargetParamsForRecoverFileAndFolder `json:"azureTargetParams,omitempty"` -} - -// Validate validates this recover azure file and folder params -func (m *RecoverAzureFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAzureFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAzureFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverAzureFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAzureFileAndFolderParamsTargetEnvironmentKAzure captures enum value "kAzure" - RecoverAzureFileAndFolderParamsTargetEnvironmentKAzure string = "kAzure" -) - -// prop value enum -func (m *RecoverAzureFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAzureFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAzureFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAzureFileAndFolderParams) validateAzureTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if m.AzureTargetParams != nil { - if err := m.AzureTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure file and folder params based on the context it is used -func (m *RecoverAzureFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAzureFileAndFolderParams) contextValidateAzureTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetParams != nil { - - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if err := m.AzureTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_params.go b/v2/models/recover_azure_params.go deleted file mode 100644 index 61cc47f9..00000000 --- a/v2/models/recover_azure_params.go +++ /dev/null @@ -1,384 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAzureParams Recover Azure environment params. -// -// Specifies the recovery options specific to Azure environment. -// -// swagger:model RecoverAzureParams -type RecoverAzureParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. For recovering files, specifies the object contains the file to recover. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverVMs","RecoverFiles","RecoverAzureSQL"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Azure SQL workloads. - AzureSQLParams *RecoverAzureSQLParams `json:"azureSqlParams,omitempty"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Azure files and folders. - RecoverFileAndFolderParams *RecoverAzureFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Azure VM. - RecoverVMParams *RecoverAzureVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover azure params -func (m *RecoverAzureParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureSQLParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAzureParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles","RecoverAzureSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAzureParamsTypeRecoveryActionPropEnum = append(recoverAzureParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverAzureParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverAzureParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverAzureParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverAzureParamsRecoveryActionRecoverFiles string = "RecoverFiles" - - // RecoverAzureParamsRecoveryActionRecoverAzureSQL captures enum value "RecoverAzureSQL" - RecoverAzureParamsRecoveryActionRecoverAzureSQL string = "RecoverAzureSQL" -) - -// prop value enum -func (m *RecoverAzureParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAzureParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAzureParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverAzureParams) validateAzureSQLParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureSQLParams) { // not required - return nil - } - - if m.AzureSQLParams != nil { - if err := m.AzureSQLParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure params based on the context it is used -func (m *RecoverAzureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureSQLParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAzureParams) contextValidateAzureSQLParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureSQLParams != nil { - - if swag.IsZero(m.AzureSQLParams) { // not required - return nil - } - - if err := m.AzureSQLParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureSqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureSqlParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_sql_new_source_config.go b/v2/models/recover_azure_sql_new_source_config.go deleted file mode 100644 index 92c1fc6d..00000000 --- a/v2/models/recover_azure_sql_new_source_config.go +++ /dev/null @@ -1,110 +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" -) - -// RecoverAzureSQLNewSourceConfig Recover Azure SQL New Source Config. -// -// Specifies the configuration for recovering Azure SQL instance to the new target. -// -// swagger:model RecoverAzureSqlNewSourceConfig -type RecoverAzureSQLNewSourceConfig struct { - - // Specifies the target source details where Azure SQL database will be recovered. This source id should be a Azure SQL target instance id were databases could be restored. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover azure Sql new source config -func (m *RecoverAzureSQLNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Sql new source config based on the context it is used -func (m *RecoverAzureSQLNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureSQLNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureSQLNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAzureSQLNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_sql_object_params.go b/v2/models/recover_azure_sql_object_params.go deleted file mode 100644 index 517386cf..00000000 --- a/v2/models/recover_azure_sql_object_params.go +++ /dev/null @@ -1,166 +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" -) - -// RecoverAzureSQLObjectParams Specifies details of recovery object to be recovered. -// -// swagger:model RecoverAzureSqlObjectParams -type RecoverAzureSQLObjectParams struct { - - // Set to true to overwrite an existing object at the destination. If set to false, and the same object exists at the destination, then recovery will fail for that object. - OverwriteDatabase *bool `json:"overwriteDatabase,omitempty"` - - // Specifies the new name to which the object should be renamed to after the recovery. - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - - // Specifies the SQL package options to be used during Azure SQL Object Recovery. - SQLPackageOptions *AzureSQLPackageOptions `json:"sqlPackageOptions,omitempty"` - - // Specifies the restored database sku options to be used during Azure SQL Object Recovery. - RestoredDatabaseSku *AzureSQLSkuOptions `json:"restoredDatabaseSku,omitempty"` -} - -// Validate validates this recover azure Sql object params -func (m *RecoverAzureSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSQLPackageOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRestoredDatabaseSku(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLObjectParams) validateSQLPackageOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if m.SQLPackageOptions != nil { - if err := m.SQLPackageOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureSQLObjectParams) validateRestoredDatabaseSku(formats strfmt.Registry) error { - if swag.IsZero(m.RestoredDatabaseSku) { // not required - return nil - } - - if m.RestoredDatabaseSku != nil { - if err := m.RestoredDatabaseSku.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredDatabaseSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredDatabaseSku") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Sql object params based on the context it is used -func (m *RecoverAzureSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSQLPackageOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestoredDatabaseSku(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLObjectParams) contextValidateSQLPackageOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLPackageOptions != nil { - - if swag.IsZero(m.SQLPackageOptions) { // not required - return nil - } - - if err := m.SQLPackageOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlPackageOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlPackageOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureSQLObjectParams) contextValidateRestoredDatabaseSku(ctx context.Context, formats strfmt.Registry) error { - - if m.RestoredDatabaseSku != nil { - - if swag.IsZero(m.RestoredDatabaseSku) { // not required - return nil - } - - if err := m.RestoredDatabaseSku.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restoredDatabaseSku") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restoredDatabaseSku") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_sql_params.go b/v2/models/recover_azure_sql_params.go deleted file mode 100644 index c95e2fcc..00000000 --- a/v2/models/recover_azure_sql_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAzureSQLParams Recover Azure SQL params. -// -// Specifies the parameters to recover Azure SQL. -// -// swagger:model RecoverAzureSqlParams -type RecoverAzureSQLParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAzure"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the details of the azure sql objects to be recovered. - // Required: true - Snapshots []*RecoverAzureSQLSnapshotParams `json:"snapshots"` - - // Specifies the params for recovering to an Azure target. - AzureTargetParams *AzureTargetParamsForRecoverAzureSQL `json:"azureTargetParams,omitempty"` -} - -// Validate validates this recover azure Sql params -func (m *RecoverAzureSQLParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverAzureSqlParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAzureSqlParamsTypeTargetEnvironmentPropEnum = append(recoverAzureSqlParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAzureSQLParamsTargetEnvironmentKAzure captures enum value "kAzure" - RecoverAzureSQLParamsTargetEnvironmentKAzure string = "kAzure" -) - -// prop value enum -func (m *RecoverAzureSQLParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAzureSqlParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAzureSQLParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAzureSQLParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAzureSQLParams) validateAzureTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if m.AzureTargetParams != nil { - if err := m.AzureTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Sql params based on the context it is used -func (m *RecoverAzureSQLParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAzureSQLParams) contextValidateAzureTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetParams != nil { - - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if err := m.AzureTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureSQLParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureSQLParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureSQLParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_sql_snapshot_params.go b/v2/models/recover_azure_sql_snapshot_params.go deleted file mode 100644 index abccb3dd..00000000 --- a/v2/models/recover_azure_sql_snapshot_params.go +++ /dev/null @@ -1,168 +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" -) - -// RecoverAzureSQLSnapshotParams Recover Azure SQL Snapshot Params. -// -// Specifies the snapshot parameters for a protected Azure SQL object. -// -// swagger:model RecoverAzureSqlSnapshotParams -type RecoverAzureSQLSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the local snapshot ids and other details of the object to be recovered. - RecoverAzureSQLObjectParams *RecoverAzureSQLObjectParams `json:"recoverAzureSqlObjectParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverAzureSQLSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - RecoverAzureSQLObjectParams *RecoverAzureSQLObjectParams `json:"recoverAzureSqlObjectParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.RecoverAzureSQLObjectParams = dataAO1.RecoverAzureSQLObjectParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverAzureSQLSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - RecoverAzureSQLObjectParams *RecoverAzureSQLObjectParams `json:"recoverAzureSqlObjectParams,omitempty"` - } - - dataAO1.RecoverAzureSQLObjectParams = m.RecoverAzureSQLObjectParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover azure Sql snapshot params -func (m *RecoverAzureSQLSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverAzureSQLObjectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLSnapshotParams) validateRecoverAzureSQLObjectParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RecoverAzureSQLObjectParams) { // not required - return nil - } - - if m.RecoverAzureSQLObjectParams != nil { - if err := m.RecoverAzureSQLObjectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAzureSqlObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAzureSqlObjectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Sql snapshot params based on the context it is used -func (m *RecoverAzureSQLSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverAzureSQLObjectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureSQLSnapshotParams) contextValidateRecoverAzureSQLObjectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverAzureSQLObjectParams != nil { - - if swag.IsZero(m.RecoverAzureSQLObjectParams) { // not required - return nil - } - - if err := m.RecoverAzureSQLObjectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAzureSqlObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAzureSqlObjectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureSQLSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureSQLSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureSQLSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_vm_new_source_config.go b/v2/models/recover_azure_vm_new_source_config.go deleted file mode 100644 index 5b108fcd..00000000 --- a/v2/models/recover_azure_vm_new_source_config.go +++ /dev/null @@ -1,616 +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" -) - -// RecoverAzureVMNewSourceConfig Recover Azure VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverAzureVmNewSourceConfig -type RecoverAzureVMNewSourceConfig struct { - - // Specifies the the details of network used in transferring the data from source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` - - // Specifies the availability set. - AvailabilitySet *RecoveryObjectIdentifier `json:"availabilitySet,omitempty"` - - // Specifies the type of VM (e.g. small, medium, large) when cloning/restoring the VM in Azure. - ComputeOption *RecoveryObjectIdentifier `json:"computeOption,omitempty"` - - // Specifies the networking configuration to be applied to the recovered VMs. - // Required: true - NetworkConfig *RecoverAzureVMNewSourceNetworkConfig `json:"networkConfig"` - - // Specifies the region to recover the VMs. Applicable for Tenant based registration on DMaaS. - Region *RecoveryObjectIdentifier `json:"region,omitempty"` - - // Specifies the Azure resource group. - // Required: true - ResourceGroup *RecoveryObjectIdentifier `json:"resourceGroup"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the storage account that will contain the storage container - StorageAccount *RecoveryObjectIdentifier `json:"storageAccount,omitempty"` - - // Specifies the storage container within the above storage account. - StorageContainer *RecoveryObjectIdentifier `json:"storageContainer,omitempty"` - - // Specifies id of the resource group for the selected storage account. - StorageResourceGroup *RecoveryObjectIdentifier `json:"storageResourceGroup,omitempty"` - - // Specifies the subscription id to recover the VMs. Applicable for Tenant based registration on DMaaS. - Subscription *RecoveryObjectIdentifier `json:"subscription,omitempty"` -} - -// Validate validates this recover azure Vm new source config -func (m *RecoverAzureVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAvailabilitySet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateComputeOption(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageAccount(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageContainer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscription(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateAvailabilitySet(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilitySet) { // not required - return nil - } - - if m.AvailabilitySet != nil { - if err := m.AvailabilitySet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilitySet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilitySet") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateComputeOption(formats strfmt.Registry) error { - if swag.IsZero(m.ComputeOption) { // not required - return nil - } - - if m.ComputeOption != nil { - if err := m.ComputeOption.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("computeOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("computeOption") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *RecoverAzureVMNewSourceConfig) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateResourceGroup(formats strfmt.Registry) error { - - if err := validate.Required("resourceGroup", "body", m.ResourceGroup); err != nil { - return err - } - - if m.ResourceGroup != nil { - if err := m.ResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateStorageAccount(formats strfmt.Registry) error { - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if m.StorageAccount != nil { - if err := m.StorageAccount.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateStorageContainer(formats strfmt.Registry) error { - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if m.StorageContainer != nil { - if err := m.StorageContainer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateStorageResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if m.StorageResourceGroup != nil { - if err := m.StorageResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) validateSubscription(formats strfmt.Registry) error { - if swag.IsZero(m.Subscription) { // not required - return nil - } - - if m.Subscription != nil { - if err := m.Subscription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscription") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Vm new source config based on the context it is used -func (m *RecoverAzureVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAvailabilitySet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateComputeOption(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageAccount(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageContainer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubscription(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateAvailabilitySet(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilitySet != nil { - - if swag.IsZero(m.AvailabilitySet) { // not required - return nil - } - - if err := m.AvailabilitySet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilitySet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilitySet") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateComputeOption(ctx context.Context, formats strfmt.Registry) error { - - if m.ComputeOption != nil { - - if swag.IsZero(m.ComputeOption) { // not required - return nil - } - - if err := m.ComputeOption.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("computeOption") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("computeOption") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceGroup != nil { - - if err := m.ResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateStorageAccount(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageAccount != nil { - - if swag.IsZero(m.StorageAccount) { // not required - return nil - } - - if err := m.StorageAccount.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageAccount") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageAccount") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateStorageContainer(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageContainer != nil { - - if swag.IsZero(m.StorageContainer) { // not required - return nil - } - - if err := m.StorageContainer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageContainer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageContainer") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateStorageResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageResourceGroup != nil { - - if swag.IsZero(m.StorageResourceGroup) { // not required - return nil - } - - if err := m.StorageResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageResourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceConfig) contextValidateSubscription(ctx context.Context, formats strfmt.Registry) error { - - if m.Subscription != nil { - - if swag.IsZero(m.Subscription) { // not required - return nil - } - - if err := m.Subscription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subscription") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subscription") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAzureVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_vm_new_source_network_config.go b/v2/models/recover_azure_vm_new_source_network_config.go deleted file mode 100644 index d5748069..00000000 --- a/v2/models/recover_azure_vm_new_source_network_config.go +++ /dev/null @@ -1,210 +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" -) - -// RecoverAzureVMNewSourceNetworkConfig Recover Azure VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied for Azure VMs if recovering to new Source. -// -// swagger:model RecoverAzureVmNewSourceNetworkConfig -type RecoverAzureVMNewSourceNetworkConfig struct { - - // Specifies id of the resource group for the selected virtual network. - NetworkResourceGroup *RecoveryObjectIdentifier `json:"networkResourceGroup,omitempty"` - - // Specifies the subnet within the above virtual network. - // Required: true - Subnet *RecoveryObjectIdentifier `json:"subnet"` - - // Specifies the Virtual Network. - // Required: true - VirtualNetwork *RecoveryObjectIdentifier `json:"virtualNetwork"` -} - -// Validate validates this recover azure Vm new source network config -func (m *RecoverAzureVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkResourceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVirtualNetwork(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMNewSourceNetworkConfig) validateNetworkResourceGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkResourceGroup) { // not required - return nil - } - - if m.NetworkResourceGroup != nil { - if err := m.NetworkResourceGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkResourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceNetworkConfig) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - 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 -} - -func (m *RecoverAzureVMNewSourceNetworkConfig) validateVirtualNetwork(formats strfmt.Registry) error { - - if err := validate.Required("virtualNetwork", "body", m.VirtualNetwork); err != nil { - return err - } - - if m.VirtualNetwork != nil { - if err := m.VirtualNetwork.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualNetwork") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Vm new source network config based on the context it is used -func (m *RecoverAzureVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkResourceGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVirtualNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMNewSourceNetworkConfig) contextValidateNetworkResourceGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkResourceGroup != nil { - - if swag.IsZero(m.NetworkResourceGroup) { // not required - return nil - } - - if err := m.NetworkResourceGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkResourceGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkResourceGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverAzureVMNewSourceNetworkConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Subnet != 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 *RecoverAzureVMNewSourceNetworkConfig) contextValidateVirtualNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualNetwork != nil { - - if err := m.VirtualNetwork.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualNetwork") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualNetwork") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverAzureVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_vm_original_source_config.go b/v2/models/recover_azure_vm_original_source_config.go deleted file mode 100644 index c0482d0b..00000000 --- a/v2/models/recover_azure_vm_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverAzureVMOriginalSourceConfig Recover Azure VMs Original Source Config. -// -// Specifies the Source configuration if VM's are being recovered to Original Source. -// -// swagger:model RecoverAzureVmOriginalSourceConfig -type RecoverAzureVMOriginalSourceConfig struct { - - // Specifies the the details of network used in transferring the data from source account to Cohesity cluster. - DataTransferInfo *DataTransferInfo `json:"dataTransferInfo,omitempty"` -} - -// Validate validates this recover azure Vm original source config -func (m *RecoverAzureVMOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataTransferInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMOriginalSourceConfig) validateDataTransferInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if m.DataTransferInfo != nil { - if err := m.DataTransferInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Vm original source config based on the context it is used -func (m *RecoverAzureVMOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataTransferInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMOriginalSourceConfig) contextValidateDataTransferInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataTransferInfo != nil { - - if swag.IsZero(m.DataTransferInfo) { // not required - return nil - } - - if err := m.DataTransferInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataTransferInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataTransferInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureVMOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureVMOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverAzureVMOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_azure_vm_params.go b/v2/models/recover_azure_vm_params.go deleted file mode 100644 index c8467d46..00000000 --- a/v2/models/recover_azure_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverAzureVMParams Recover Azure VM params. -// -// Specifies the parameters to recover Azure VM. -// -// swagger:model RecoverAzureVmParams -type RecoverAzureVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAzure"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an Azure target. - AzureTargetParams *AzureTargetParamsForRecoverVM `json:"azureTargetParams,omitempty"` -} - -// Validate validates this recover azure Vm params -func (m *RecoverAzureVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverAzureVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAzure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverAzureVmParamsTypeTargetEnvironmentPropEnum = append(recoverAzureVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverAzureVMParamsTargetEnvironmentKAzure captures enum value "kAzure" - RecoverAzureVMParamsTargetEnvironmentKAzure string = "kAzure" -) - -// prop value enum -func (m *RecoverAzureVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverAzureVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverAzureVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverAzureVMParams) validateAzureTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if m.AzureTargetParams != nil { - if err := m.AzureTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover azure Vm params based on the context it is used -func (m *RecoverAzureVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverAzureVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverAzureVMParams) contextValidateAzureTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetParams != nil { - - if swag.IsZero(m.AzureTargetParams) { // not required - return nil - } - - if err := m.AzureTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverAzureVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverAzureVMParams) UnmarshalBinary(b []byte) error { - var res RecoverAzureVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_cassandra_no_sql_object_params.go b/v2/models/recover_cassandra_no_sql_object_params.go deleted file mode 100644 index 221f232a..00000000 --- a/v2/models/recover_cassandra_no_sql_object_params.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverCassandraNoSQLObjectParams Recover Cassandra Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverCassandraNoSqlObjectParams -type RecoverCassandraNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` - - // Specifies the new name to which the object should be renamed to after the recovery. - RenameTo *string `json:"renameTo,omitempty"` - - // Specifies the properties to be applied to the object at the time of recovery. - ObjectProperties []*NoSQLObjectProperty `json:"objectProperties"` -} - -// Validate validates this recover cassandra no Sql object params -func (m *RecoverCassandraNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -func (m *RecoverCassandraNoSQLObjectParams) validateObjectProperties(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectProperties) { // not required - return nil - } - - for i := 0; i < len(m.ObjectProperties); i++ { - if swag.IsZero(m.ObjectProperties[i]) { // not required - continue - } - - if m.ObjectProperties[i] != nil { - if err := m.ObjectProperties[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover cassandra no Sql object params based on the context it is used -func (m *RecoverCassandraNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraNoSQLObjectParams) contextValidateObjectProperties(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectProperties); i++ { - - if m.ObjectProperties[i] != nil { - - if swag.IsZero(m.ObjectProperties[i]) { // not required - return nil - } - - if err := m.ObjectProperties[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCassandraNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCassandraNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverCassandraNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_cassandra_params.go b/v2/models/recover_cassandra_params.go deleted file mode 100644 index c35dd67f..00000000 --- a/v2/models/recover_cassandra_params.go +++ /dev/null @@ -1,328 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverCassandraParams Recover Cassandra params. -// -// Specifies the parameters to recover Cassandra objects. -// -// swagger:model RecoverCassandraParams -type RecoverCassandraParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids and other details of the Objects to be recovered. - // Required: true - Snapshots []*RecoverCassandraSnapshotParams `json:"snapshots"` - - // A suffix that is to be applied to all recovered objects. - Suffix *string `json:"suffix,omitempty"` - - // Selected Data centers for this cluster. - SelectedDataCenters []string `json:"selectedDataCenters"` - - // Specifies the directory on the primary to copy the files which are to be uploaded using destination sstableloader. - StagingDirectoryList []string `json:"stagingDirectoryList"` - - // Specifies the directory for restoring the logs. - LogRestoreDirectory *string `json:"logRestoreDirectory,omitempty"` - - // Specifies whether to restart Cassandra services after the point in time recovery. - RestartServices *bool `json:"restartServices,omitempty"` - - // Specifies whether to restart Cassandra services immediately after the point in time recovery. - RestartImmediately *bool `json:"restartImmediately,omitempty"` - - // Specifies the time in Unix epoch timestamp in microseconds at which the Cassandra services are to be restarted. - RestartAtUsecs *int64 `json:"restartAtUsecs,omitempty"` - - // Specifies the command to restart Cassandra services after the point in time recovery. - RestartCommand *string `json:"restartCommand,omitempty"` - - // Specifies the Id of the task required to restart Cassandra services. - // Read Only: true - RestartServicesTaskID *int64 `json:"restartServicesTaskId,omitempty"` - - // Specifies whether recover/skip roles and permissions. - RecoverPrivileges *bool `json:"recoverPrivileges,omitempty"` - - // Specifies whether the current recovery operation is a system keyspace restore operation. - IsSystemKeyspaceRestore *bool `json:"isSystemKeyspaceRestore,omitempty"` - - // Specifies whether the current recovery operation is a live table restore operation. - IsLiveTableRestore *bool `json:"isLiveTableRestore,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverCassandraParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverCassandraSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - - SelectedDataCenters []string `json:"selectedDataCenters"` - - StagingDirectoryList []string `json:"stagingDirectoryList"` - - LogRestoreDirectory *string `json:"logRestoreDirectory,omitempty"` - - RestartServices *bool `json:"restartServices,omitempty"` - - RestartImmediately *bool `json:"restartImmediately,omitempty"` - - RestartAtUsecs *int64 `json:"restartAtUsecs,omitempty"` - - RestartCommand *string `json:"restartCommand,omitempty"` - - RestartServicesTaskID *int64 `json:"restartServicesTaskId,omitempty"` - - RecoverPrivileges *bool `json:"recoverPrivileges,omitempty"` - - IsSystemKeyspaceRestore *bool `json:"isSystemKeyspaceRestore,omitempty"` - - IsLiveTableRestore *bool `json:"isLiveTableRestore,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.Suffix = dataAO1.Suffix - - m.SelectedDataCenters = dataAO1.SelectedDataCenters - - m.StagingDirectoryList = dataAO1.StagingDirectoryList - - m.LogRestoreDirectory = dataAO1.LogRestoreDirectory - - m.RestartServices = dataAO1.RestartServices - - m.RestartImmediately = dataAO1.RestartImmediately - - m.RestartAtUsecs = dataAO1.RestartAtUsecs - - m.RestartCommand = dataAO1.RestartCommand - - m.RestartServicesTaskID = dataAO1.RestartServicesTaskID - - m.RecoverPrivileges = dataAO1.RecoverPrivileges - - m.IsSystemKeyspaceRestore = dataAO1.IsSystemKeyspaceRestore - - m.IsLiveTableRestore = dataAO1.IsLiveTableRestore - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverCassandraParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverCassandraSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - - SelectedDataCenters []string `json:"selectedDataCenters"` - - StagingDirectoryList []string `json:"stagingDirectoryList"` - - LogRestoreDirectory *string `json:"logRestoreDirectory,omitempty"` - - RestartServices *bool `json:"restartServices,omitempty"` - - RestartImmediately *bool `json:"restartImmediately,omitempty"` - - RestartAtUsecs *int64 `json:"restartAtUsecs,omitempty"` - - RestartCommand *string `json:"restartCommand,omitempty"` - - RestartServicesTaskID *int64 `json:"restartServicesTaskId,omitempty"` - - RecoverPrivileges *bool `json:"recoverPrivileges,omitempty"` - - IsSystemKeyspaceRestore *bool `json:"isSystemKeyspaceRestore,omitempty"` - - IsLiveTableRestore *bool `json:"isLiveTableRestore,omitempty"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.Suffix = m.Suffix - - dataAO1.SelectedDataCenters = m.SelectedDataCenters - - dataAO1.StagingDirectoryList = m.StagingDirectoryList - - dataAO1.LogRestoreDirectory = m.LogRestoreDirectory - - dataAO1.RestartServices = m.RestartServices - - dataAO1.RestartImmediately = m.RestartImmediately - - dataAO1.RestartAtUsecs = m.RestartAtUsecs - - dataAO1.RestartCommand = m.RestartCommand - - dataAO1.RestartServicesTaskID = m.RestartServicesTaskID - - dataAO1.RecoverPrivileges = m.RecoverPrivileges - - dataAO1.IsSystemKeyspaceRestore = m.IsSystemKeyspaceRestore - - dataAO1.IsLiveTableRestore = m.IsLiveTableRestore - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover cassandra params -func (m *RecoverCassandraParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover cassandra params based on the context it is used -func (m *RecoverCassandraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRestartServicesTaskID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverCassandraParams) contextValidateRestartServicesTaskID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "restartServicesTaskId", "body", m.RestartServicesTaskID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCassandraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCassandraParams) UnmarshalBinary(b []byte) error { - var res RecoverCassandraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_cassandra_snapshot_params.go b/v2/models/recover_cassandra_snapshot_params.go deleted file mode 100644 index 90118fe7..00000000 --- a/v2/models/recover_cassandra_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverCassandraSnapshotParams Recover Cassandra Snapshot Params. -// -// Specifies the snapshot parameters for a protected Cassandra object. -// -// swagger:model RecoverCassandraSnapshotParams -type RecoverCassandraSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverCassandraNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverCassandraSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverCassandraNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverCassandraSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverCassandraNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover cassandra snapshot params -func (m *RecoverCassandraSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover cassandra snapshot params based on the context it is used -func (m *RecoverCassandraSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCassandraSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCassandraSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCassandraSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverCassandraSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_couchbase_no_sql_object_params.go b/v2/models/recover_couchbase_no_sql_object_params.go deleted file mode 100644 index 3106d959..00000000 --- a/v2/models/recover_couchbase_no_sql_object_params.go +++ /dev/null @@ -1,76 +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" -) - -// RecoverCouchbaseNoSQLObjectParams Recover Couchbase Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverCouchbaseNoSqlObjectParams -type RecoverCouchbaseNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` - - // Specifies the new name to which the object should be renamed, at the time of recovery. - RenameTo *string `json:"renameTo,omitempty"` -} - -// Validate validates this recover couchbase no Sql object params -func (m *RecoverCouchbaseNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCouchbaseNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover couchbase no Sql object params based on context it is used -func (m *RecoverCouchbaseNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCouchbaseNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCouchbaseNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverCouchbaseNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_couchbase_params.go b/v2/models/recover_couchbase_params.go deleted file mode 100644 index 7089f575..00000000 --- a/v2/models/recover_couchbase_params.go +++ /dev/null @@ -1,283 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverCouchbaseParams Recover Couchbase params. -// -// Specifies the parameters to recover Couchbase objects. -// -// swagger:model RecoverCouchbaseParams -type RecoverCouchbaseParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids of the Objects to be recovered. - // Required: true - Snapshots []*RecoverCouchbaseSnapshotParams `json:"snapshots"` - - // A suffix that is to be applied to all recovered objects. - Suffix *string `json:"suffix,omitempty"` - - // If set to true, docuements from the bucket being recovered will be appended into the bucket at the destination. - AppendDocuments *bool `json:"appendDocuments,omitempty"` - - // Set to true to recover only the bucket configurations. No documents will be recovered. - DdlOnlyRecovery *bool `json:"ddlOnlyRecovery,omitempty"` - - // If set to true existing users will be replaced with users from the bucket being recovered. - OverwriteUsers *bool `json:"overwriteUsers,omitempty"` - - // Specifies the parameters to filter documents to be restored. - // Required: true - FilterDocumentsParams *FilterDocumentsParams `json:"filterDocumentsParams"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverCouchbaseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverCouchbaseSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - - AppendDocuments *bool `json:"appendDocuments,omitempty"` - - DdlOnlyRecovery *bool `json:"ddlOnlyRecovery,omitempty"` - - OverwriteUsers *bool `json:"overwriteUsers,omitempty"` - - FilterDocumentsParams *FilterDocumentsParams `json:"filterDocumentsParams"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.Suffix = dataAO1.Suffix - - m.AppendDocuments = dataAO1.AppendDocuments - - m.DdlOnlyRecovery = dataAO1.DdlOnlyRecovery - - m.OverwriteUsers = dataAO1.OverwriteUsers - - m.FilterDocumentsParams = dataAO1.FilterDocumentsParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverCouchbaseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverCouchbaseSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - - AppendDocuments *bool `json:"appendDocuments,omitempty"` - - DdlOnlyRecovery *bool `json:"ddlOnlyRecovery,omitempty"` - - OverwriteUsers *bool `json:"overwriteUsers,omitempty"` - - FilterDocumentsParams *FilterDocumentsParams `json:"filterDocumentsParams"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.Suffix = m.Suffix - - dataAO1.AppendDocuments = m.AppendDocuments - - dataAO1.DdlOnlyRecovery = m.DdlOnlyRecovery - - dataAO1.OverwriteUsers = m.OverwriteUsers - - dataAO1.FilterDocumentsParams = m.FilterDocumentsParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover couchbase params -func (m *RecoverCouchbaseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterDocumentsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCouchbaseParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverCouchbaseParams) validateFilterDocumentsParams(formats strfmt.Registry) error { - - if err := validate.Required("filterDocumentsParams", "body", m.FilterDocumentsParams); err != nil { - return err - } - - if m.FilterDocumentsParams != nil { - if err := m.FilterDocumentsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterDocumentsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterDocumentsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover couchbase params based on the context it is used -func (m *RecoverCouchbaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilterDocumentsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCouchbaseParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverCouchbaseParams) contextValidateFilterDocumentsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterDocumentsParams != nil { - - if err := m.FilterDocumentsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterDocumentsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterDocumentsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCouchbaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCouchbaseParams) UnmarshalBinary(b []byte) error { - var res RecoverCouchbaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_couchbase_snapshot_params.go b/v2/models/recover_couchbase_snapshot_params.go deleted file mode 100644 index 94ac4a3e..00000000 --- a/v2/models/recover_couchbase_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverCouchbaseSnapshotParams Recover Couchbase Snapshot Params. -// -// Specifies the snapshot parameters for a protected Couchbase object. -// -// swagger:model RecoverCouchbaseSnapshotParams -type RecoverCouchbaseSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverCouchbaseNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverCouchbaseSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverCouchbaseNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverCouchbaseSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverCouchbaseNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover couchbase snapshot params -func (m *RecoverCouchbaseSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCouchbaseSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover couchbase snapshot params based on the context it is used -func (m *RecoverCouchbaseSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverCouchbaseSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverCouchbaseSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverCouchbaseSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverCouchbaseSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_elastifile_files_params.go b/v2/models/recover_elastifile_files_params.go deleted file mode 100644 index cc643cf6..00000000 --- a/v2/models/recover_elastifile_files_params.go +++ /dev/null @@ -1,497 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverElastifileFilesParams Recover Elastifile files Params. -// -// Specifies the parameters to recover Elastifile files. -// -// swagger:model RecoverElastifileFilesParams -type RecoverElastifileFilesParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for a Elastifile recovery target. - ElastifileTargetParams *RecoverElastifileToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover elastifile files params -func (m *RecoverElastifileFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverElastifileFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverElastifileFilesParamsTypeTargetEnvironmentPropEnum = append(recoverElastifileFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverElastifileFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverElastifileFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverElastifileFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverElastifileFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverElastifileFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverElastifileFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverElastifileFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverElastifileFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverElastifileFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverElastifileFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverElastifileFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverElastifileFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverElastifileFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverElastifileFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverElastifileFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover elastifile files params based on the context it is used -func (m *RecoverElastifileFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverElastifileFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverElastifileFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverElastifileFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_elastifile_nas_volume_params.go b/v2/models/recover_elastifile_nas_volume_params.go deleted file mode 100644 index ac7fd05e..00000000 --- a/v2/models/recover_elastifile_nas_volume_params.go +++ /dev/null @@ -1,486 +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" -) - -// RecoverElastifileNasVolumeParams Recover Elastifile NAS Volume Params. -// -// Specifies the parameters to recover Elastifile NAS volumes. -// -// swagger:model RecoverElastifileNasVolumeParams -type RecoverElastifileNasVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for a Elastifile recovery target. - ElastifileTargetParams *RecoverElastifileToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a Generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover elastifile nas volume params -func (m *RecoverElastifileNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverElastifileNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverElastifileNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverElastifileNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverElastifileNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverElastifileNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverElastifileNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverElastifileNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverElastifileNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverElastifileNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverElastifileNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverElastifileNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverElastifileNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverElastifileNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover elastifile nas volume params based on the context it is used -func (m *RecoverElastifileNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverElastifileNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverElastifileNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverElastifileNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_elastifile_params.go b/v2/models/recover_elastifile_params.go deleted file mode 100644 index 2a80ea83..00000000 --- a/v2/models/recover_elastifile_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverElastifileParams Recover Elastifile Params. -// -// Specifies the recovery options specific to Elastifile environment. -// -// swagger:model RecoverElastifileParams -type RecoverElastifileParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverElastifileFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Nas Volumes. - RecoverNasVolumeParams *RecoverElastifileNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover elastifile params -func (m *RecoverElastifileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverElastifileParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverElastifileParamsTypeRecoveryActionPropEnum = append(recoverElastifileParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverElastifileParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverElastifileParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverElastifileParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverElastifileParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverElastifileParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverElastifileParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverElastifileParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverElastifileParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover elastifile params based on the context it is used -func (m *RecoverElastifileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverElastifileParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverElastifileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverElastifileParams) UnmarshalBinary(b []byte) error { - var res RecoverElastifileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_elastifile_to_elastifile_files_target_params.go b/v2/models/recover_elastifile_to_elastifile_files_target_params.go deleted file mode 100644 index 2fb4248b..00000000 --- a/v2/models/recover_elastifile_to_elastifile_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverElastifileToElastifileFilesTargetParams Recover Elastifile To Elastifile Files Target Params. -// -// Specifies the params of the Elastifile recovery target. -// -// swagger:model RecoverElastifileToElastifileFilesTargetParams -type RecoverElastifileToElastifileFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Elastifile target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToElastifileFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalElastifileFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover elastifile to elastifile files target params -func (m *RecoverElastifileToElastifileFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileToElastifileFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverElastifileToElastifileFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileToElastifileFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover elastifile to elastifile files target params based on the context it is used -func (m *RecoverElastifileToElastifileFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileToElastifileFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileToElastifileFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverElastifileToElastifileFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverElastifileToElastifileFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverElastifileToElastifileFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_elastifile_to_elastifile_volume_target_params.go b/v2/models/recover_elastifile_to_elastifile_volume_target_params.go deleted file mode 100644 index 3bdef53d..00000000 --- a/v2/models/recover_elastifile_to_elastifile_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverElastifileToElastifileVolumeTargetParams Recover Elastifile To Elastifile Volume Target Params. -// -// Specifies the params of the Elastifile recovery target. -// -// swagger:model RecoverElastifileToElastifileVolumeTargetParams -type RecoverElastifileToElastifileVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Elastifile target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToElastifileVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalElastifileTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover elastifile to elastifile volume target params -func (m *RecoverElastifileToElastifileVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileToElastifileVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverElastifileToElastifileVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileToElastifileVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover elastifile to elastifile volume target params based on the context it is used -func (m *RecoverElastifileToElastifileVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverElastifileToElastifileVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverElastifileToElastifileVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverElastifileToElastifileVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverElastifileToElastifileVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverElastifileToElastifileVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_exchange_app_params.go b/v2/models/recover_exchange_app_params.go deleted file mode 100644 index 2e8e5f61..00000000 --- a/v2/models/recover_exchange_app_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverExchangeAppParams Recover Exchange App params. -// -// Specifies the parameters to recover Sql databases. -// -// swagger:model RecoverExchangeAppParams -type RecoverExchangeAppParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kExchange"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to an Exchange host. - ExchangeTargetParams *ExchangeTargetParamsForRecoverExchangeApp `json:"exchangeTargetParams,omitempty"` -} - -// Validate validates this recover exchange app params -func (m *RecoverExchangeAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverExchangeAppParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kExchange"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverExchangeAppParamsTypeTargetEnvironmentPropEnum = append(recoverExchangeAppParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverExchangeAppParamsTargetEnvironmentKExchange captures enum value "kExchange" - RecoverExchangeAppParamsTargetEnvironmentKExchange string = "kExchange" -) - -// prop value enum -func (m *RecoverExchangeAppParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverExchangeAppParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverExchangeAppParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverExchangeAppParams) validateExchangeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeTargetParams) { // not required - return nil - } - - if m.ExchangeTargetParams != nil { - if err := m.ExchangeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover exchange app params based on the context it is used -func (m *RecoverExchangeAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExchangeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeAppParams) contextValidateExchangeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeTargetParams != nil { - - if swag.IsZero(m.ExchangeTargetParams) { // not required - return nil - } - - if err := m.ExchangeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverExchangeAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverExchangeAppParams) UnmarshalBinary(b []byte) error { - var res RecoverExchangeAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_exchange_app_snapshot_params.go b/v2/models/recover_exchange_app_snapshot_params.go deleted file mode 100644 index db689dd3..00000000 --- a/v2/models/recover_exchange_app_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverExchangeAppSnapshotParams Recover Exchange App Snapshot Params. -// -// Specifies the snapshot parameters to recover Exchange databases. -// -// swagger:model RecoverExchangeAppSnapshotParams -type RecoverExchangeAppSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the list of params for all the databases which have to be recovered. - AppObjects []*ExchangeRecoverDatabaseParams `json:"appObjects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverExchangeAppSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - AppObjects []*ExchangeRecoverDatabaseParams `json:"appObjects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AppObjects = dataAO1.AppObjects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverExchangeAppSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AppObjects []*ExchangeRecoverDatabaseParams `json:"appObjects"` - } - - dataAO1.AppObjects = m.AppObjects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover exchange app snapshot params -func (m *RecoverExchangeAppSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAppObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeAppSnapshotParams) validateAppObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.AppObjects) { // not required - return nil - } - - for i := 0; i < len(m.AppObjects); i++ { - if swag.IsZero(m.AppObjects[i]) { // not required - continue - } - - if m.AppObjects[i] != nil { - if err := m.AppObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover exchange app snapshot params based on the context it is used -func (m *RecoverExchangeAppSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAppObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeAppSnapshotParams) contextValidateAppObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AppObjects); i++ { - - if m.AppObjects[i] != nil { - - if swag.IsZero(m.AppObjects[i]) { // not required - return nil - } - - if err := m.AppObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverExchangeAppSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverExchangeAppSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverExchangeAppSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_exchange_dbs_params.go b/v2/models/recover_exchange_dbs_params.go deleted file mode 100644 index a024e569..00000000 --- a/v2/models/recover_exchange_dbs_params.go +++ /dev/null @@ -1,179 +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" -) - -// RecoverExchangeDbsParams Recover Exchange Databases params. -// -// Specifies the parameters to recover Exchange databases. -// -// swagger:model RecoverExchangeDbsParams -type RecoverExchangeDbsParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kExchange"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameter whether the recovery should be performed to a new or an existing target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the params for recovering to an Exchange host. - ExchangeTargetParams *ExchangeTargetParamsForRecoverExchangeDbs `json:"exchangeTargetParams,omitempty"` -} - -// Validate validates this recover exchange dbs params -func (m *RecoverExchangeDbsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverExchangeDbsParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kExchange"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverExchangeDbsParamsTypeTargetEnvironmentPropEnum = append(recoverExchangeDbsParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverExchangeDbsParamsTargetEnvironmentKExchange captures enum value "kExchange" - RecoverExchangeDbsParamsTargetEnvironmentKExchange string = "kExchange" -) - -// prop value enum -func (m *RecoverExchangeDbsParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverExchangeDbsParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverExchangeDbsParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverExchangeDbsParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverExchangeDbsParams) validateExchangeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExchangeTargetParams) { // not required - return nil - } - - if m.ExchangeTargetParams != nil { - if err := m.ExchangeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover exchange dbs params based on the context it is used -func (m *RecoverExchangeDbsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExchangeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeDbsParams) contextValidateExchangeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeTargetParams != nil { - - if swag.IsZero(m.ExchangeTargetParams) { // not required - return nil - } - - if err := m.ExchangeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverExchangeDbsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverExchangeDbsParams) UnmarshalBinary(b []byte) error { - var res RecoverExchangeDbsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_exchange_dbs_snapshot_params.go b/v2/models/recover_exchange_dbs_snapshot_params.go deleted file mode 100644 index f34ef188..00000000 --- a/v2/models/recover_exchange_dbs_snapshot_params.go +++ /dev/null @@ -1,168 +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" -) - -// RecoverExchangeDbsSnapshotParams Recover Exchange Databases Snapshot Params. -// -// Specifies the snapshot parameters to recover Exchange databases. -// -// swagger:model RecoverExchangeDbsSnapshotParams -type RecoverExchangeDbsSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the recovery target configuration if the recovery is set to a different location which is different from the original source. - RecoveryTargetConfig *ExchangeRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverExchangeDbsSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - RecoveryTargetConfig *ExchangeRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.RecoveryTargetConfig = dataAO1.RecoveryTargetConfig - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverExchangeDbsSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - RecoveryTargetConfig *ExchangeRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - } - - dataAO1.RecoveryTargetConfig = m.RecoveryTargetConfig - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover exchange dbs snapshot params -func (m *RecoverExchangeDbsSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeDbsSnapshotParams) validateRecoveryTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover exchange dbs snapshot params based on the context it is used -func (m *RecoverExchangeDbsSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeDbsSnapshotParams) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverExchangeDbsSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverExchangeDbsSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverExchangeDbsSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_exchange_params.go b/v2/models/recover_exchange_params.go deleted file mode 100644 index c5a79c9a..00000000 --- a/v2/models/recover_exchange_params.go +++ /dev/null @@ -1,216 +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" -) - -// RecoverExchangeParams Recover Exchange environment params. -// -// Specifies the recovery options specific to Exchange environment. -// -// swagger:model RecoverExchangeParams -type RecoverExchangeParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverApps","RecoverExchangeDbs"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Exchange databases using SMB share. - RecoverAppParams *RecoverExchangeAppParams `json:"recoverAppParams,omitempty"` - - // Specifies the parameters to recover Exchange databases. - RecoverExchangeDbsParams *RecoverExchangeDbsParams `json:"recoverExchangeDbsParams,omitempty"` -} - -// Validate validates this recover exchange params -func (m *RecoverExchangeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverAppParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverExchangeDbsParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverExchangeParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverApps","RecoverExchangeDbs"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverExchangeParamsTypeRecoveryActionPropEnum = append(recoverExchangeParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverExchangeParamsRecoveryActionRecoverApps captures enum value "RecoverApps" - RecoverExchangeParamsRecoveryActionRecoverApps string = "RecoverApps" - - // RecoverExchangeParamsRecoveryActionRecoverExchangeDbs captures enum value "RecoverExchangeDbs" - RecoverExchangeParamsRecoveryActionRecoverExchangeDbs string = "RecoverExchangeDbs" -) - -// prop value enum -func (m *RecoverExchangeParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverExchangeParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverExchangeParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverExchangeParams) validateRecoverAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverAppParams) { // not required - return nil - } - - if m.RecoverAppParams != nil { - if err := m.RecoverAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams") - } - return err - } - } - - return nil -} - -func (m *RecoverExchangeParams) validateRecoverExchangeDbsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverExchangeDbsParams) { // not required - return nil - } - - if m.RecoverExchangeDbsParams != nil { - if err := m.RecoverExchangeDbsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverExchangeDbsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverExchangeDbsParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover exchange params based on the context it is used -func (m *RecoverExchangeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverExchangeDbsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverExchangeParams) contextValidateRecoverAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverAppParams != nil { - - if swag.IsZero(m.RecoverAppParams) { // not required - return nil - } - - if err := m.RecoverAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams") - } - return err - } - } - - return nil -} - -func (m *RecoverExchangeParams) contextValidateRecoverExchangeDbsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverExchangeDbsParams != nil { - - if swag.IsZero(m.RecoverExchangeDbsParams) { // not required - return nil - } - - if err := m.RecoverExchangeDbsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverExchangeDbsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverExchangeDbsParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverExchangeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverExchangeParams) UnmarshalBinary(b []byte) error { - var res RecoverExchangeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_file_and_folder_method.go b/v2/models/recover_file_and_folder_method.go deleted file mode 100644 index ebb770b5..00000000 --- a/v2/models/recover_file_and_folder_method.go +++ /dev/null @@ -1,110 +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" -) - -// RecoverFileAndFolderMethod Recover File and Folder Method -// -// # Recover File and Folder Method -// -// swagger:model RecoverFileAndFolderMethod -type RecoverFileAndFolderMethod struct { - - // Recover File and Folder Method. - // Enum: ["AutoDeploy","UseExistingAgent","UseHypervisorApis"] - RecoverFileAndFolderMethod string `json:"recoverFileAndFolderMethod,omitempty"` -} - -// Validate validates this recover file and folder method -func (m *RecoverFileAndFolderMethod) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverFileAndFolderMethod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverFileAndFolderMethodTypeRecoverFileAndFolderMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AutoDeploy","UseExistingAgent","UseHypervisorApis"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverFileAndFolderMethodTypeRecoverFileAndFolderMethodPropEnum = append(recoverFileAndFolderMethodTypeRecoverFileAndFolderMethodPropEnum, v) - } -} - -const ( - - // RecoverFileAndFolderMethodRecoverFileAndFolderMethodAutoDeploy captures enum value "AutoDeploy" - RecoverFileAndFolderMethodRecoverFileAndFolderMethodAutoDeploy string = "AutoDeploy" - - // RecoverFileAndFolderMethodRecoverFileAndFolderMethodUseExistingAgent captures enum value "UseExistingAgent" - RecoverFileAndFolderMethodRecoverFileAndFolderMethodUseExistingAgent string = "UseExistingAgent" - - // RecoverFileAndFolderMethodRecoverFileAndFolderMethodUseHypervisorApis captures enum value "UseHypervisorApis" - RecoverFileAndFolderMethodRecoverFileAndFolderMethodUseHypervisorApis string = "UseHypervisorApis" -) - -// prop value enum -func (m *RecoverFileAndFolderMethod) validateRecoverFileAndFolderMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverFileAndFolderMethodTypeRecoverFileAndFolderMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverFileAndFolderMethod) validateRecoverFileAndFolderMethod(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderMethod) { // not required - return nil - } - - // value enum - if err := m.validateRecoverFileAndFolderMethodEnum("recoverFileAndFolderMethod", "body", m.RecoverFileAndFolderMethod); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover file and folder method based on context it is used -func (m *RecoverFileAndFolderMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFileAndFolderMethod) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFileAndFolderMethod) UnmarshalBinary(b []byte) error { - var res RecoverFileAndFolderMethod - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_flashblade_files_params.go b/v2/models/recover_flashblade_files_params.go deleted file mode 100644 index 5cf39b76..00000000 --- a/v2/models/recover_flashblade_files_params.go +++ /dev/null @@ -1,497 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverFlashbladeFilesParams Recover Flashblade files Params. -// -// Specifies the parameters to recover Flashblade files. -// -// swagger:model RecoverFlashbladeFilesParams -type RecoverFlashbladeFilesParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverFlashbladeToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover flashblade files params -func (m *RecoverFlashbladeFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverFlashbladeFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverFlashbladeFilesParamsTypeTargetEnvironmentPropEnum = append(recoverFlashbladeFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverFlashbladeFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverFlashbladeFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverFlashbladeFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverFlashbladeFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverFlashbladeFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverFlashbladeFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverFlashbladeFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverFlashbladeFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverFlashbladeFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverFlashbladeFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverFlashbladeFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverFlashbladeFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverFlashbladeFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverFlashbladeFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover flashblade files params based on the context it is used -func (m *RecoverFlashbladeFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFlashbladeFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFlashbladeFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverFlashbladeFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_flashblade_nas_volume_params.go b/v2/models/recover_flashblade_nas_volume_params.go deleted file mode 100644 index 846bf8f6..00000000 --- a/v2/models/recover_flashblade_nas_volume_params.go +++ /dev/null @@ -1,486 +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" -) - -// RecoverFlashbladeNasVolumeParams Recover Flashblade NAS Volume Params. -// -// Specifies the parameters to recover Flashblade NAS volumes. -// -// swagger:model RecoverFlashbladeNasVolumeParams -type RecoverFlashbladeNasVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for a Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverFlashbladeToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a Generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover flashblade nas volume params -func (m *RecoverFlashbladeNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverFlashbladeNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverFlashbladeNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverFlashbladeNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverFlashbladeNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverFlashbladeNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverFlashbladeNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverFlashbladeNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover flashblade nas volume params based on the context it is used -func (m *RecoverFlashbladeNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFlashbladeNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFlashbladeNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverFlashbladeNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_flashblade_params.go b/v2/models/recover_flashblade_params.go deleted file mode 100644 index aeb39214..00000000 --- a/v2/models/recover_flashblade_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverFlashbladeParams Recover Flashblade Params. -// -// Specifies the recovery options specific to Flashblade environment. -// -// swagger:model RecoverFlashbladeParams -type RecoverFlashbladeParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverFlashbladeFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Nas Volumes. - RecoverNasVolumeParams *RecoverFlashbladeNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover flashblade params -func (m *RecoverFlashbladeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverFlashbladeParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverFlashbladeParamsTypeRecoveryActionPropEnum = append(recoverFlashbladeParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverFlashbladeParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverFlashbladeParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverFlashbladeParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverFlashbladeParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverFlashbladeParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverFlashbladeParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverFlashbladeParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverFlashbladeParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover flashblade params based on the context it is used -func (m *RecoverFlashbladeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverFlashbladeParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFlashbladeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFlashbladeParams) UnmarshalBinary(b []byte) error { - var res RecoverFlashbladeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_flashblade_to_flashblade_files_target_params.go b/v2/models/recover_flashblade_to_flashblade_files_target_params.go deleted file mode 100644 index 4872dbfb..00000000 --- a/v2/models/recover_flashblade_to_flashblade_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverFlashbladeToFlashbladeFilesTargetParams Recover Flashblade To Flashblade Files Target Params. -// -// Specifies the params of the Flashblade recovery target. -// -// swagger:model RecoverFlashbladeToFlashbladeFilesTargetParams -type RecoverFlashbladeToFlashbladeFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Flashblade target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToFlashbladeFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalFlashbladeFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover flashblade to flashblade files target params -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover flashblade to flashblade files target params based on the context it is used -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFlashbladeToFlashbladeFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverFlashbladeToFlashbladeFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_flashblade_to_flashblade_volume_target_params.go b/v2/models/recover_flashblade_to_flashblade_volume_target_params.go deleted file mode 100644 index 93f90c36..00000000 --- a/v2/models/recover_flashblade_to_flashblade_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverFlashbladeToFlashbladeVolumeTargetParams Recover Flashblade To Flashblade Volume Target Params. -// -// Specifies the params of the Flashblade recovery target. -// -// swagger:model RecoverFlashbladeToFlashbladeVolumeTargetParams -type RecoverFlashbladeToFlashbladeVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Flashblade target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalFlashbladeTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover flashblade to flashblade volume target params -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover flashblade to flashblade volume target params based on the context it is used -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverFlashbladeToFlashbladeVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverFlashbladeToFlashbladeVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gcp_file_and_folder_params.go b/v2/models/recover_gcp_file_and_folder_params.go deleted file mode 100644 index 6350989b..00000000 --- a/v2/models/recover_gcp_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGcpFileAndFolderParams Recover GCP File And Folder Params -// -// Specifies the parameters to recover files and folders. -// -// swagger:model RecoverGcpFileAndFolderParams -type RecoverGcpFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kGCP"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters to recover to a GCP target. - GcpTargetParams *GcpTargetParamsForRecoverFileAndFolder `json:"gcpTargetParams,omitempty"` -} - -// Validate validates this recover gcp file and folder params -func (m *RecoverGcpFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGcpFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGCP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGcpFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverGcpFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGcpFileAndFolderParamsTargetEnvironmentKGCP captures enum value "kGCP" - RecoverGcpFileAndFolderParamsTargetEnvironmentKGCP string = "kGCP" -) - -// prop value enum -func (m *RecoverGcpFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGcpFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGcpFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGcpFileAndFolderParams) validateGcpTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpTargetParams) { // not required - return nil - } - - if m.GcpTargetParams != nil { - if err := m.GcpTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gcp file and folder params based on the context it is used -func (m *RecoverGcpFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGcpFileAndFolderParams) contextValidateGcpTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpTargetParams != nil { - - if swag.IsZero(m.GcpTargetParams) { // not required - return nil - } - - if err := m.GcpTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGcpFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGcpFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverGcpFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gcp_params.go b/v2/models/recover_gcp_params.go deleted file mode 100644 index 1b23f0e5..00000000 --- a/v2/models/recover_gcp_params.go +++ /dev/null @@ -1,330 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGcpParams Recover GCP environment params. -// -// Specifies the recovery options specific to GCP environment. -// -// swagger:model RecoverGcpParams -type RecoverGcpParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverVMs","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files and folders. - RecoverFileAndFolderParams *RecoverGcpFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover GCP VM. - RecoverVMParams *RecoverGcpVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover gcp params -func (m *RecoverGcpParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGcpParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGcpParamsTypeRecoveryActionPropEnum = append(recoverGcpParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverGcpParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverGcpParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverGcpParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverGcpParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverGcpParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGcpParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGcpParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverGcpParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gcp params based on the context it is used -func (m *RecoverGcpParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGcpParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGcpParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGcpParams) UnmarshalBinary(b []byte) error { - var res RecoverGcpParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gcp_vm_new_source_config.go b/v2/models/recover_gcp_vm_new_source_config.go deleted file mode 100644 index ed7f94e3..00000000 --- a/v2/models/recover_gcp_vm_new_source_config.go +++ /dev/null @@ -1,306 +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" -) - -// RecoverGcpVMNewSourceConfig Recover GCP VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverGcpVmNewSourceConfig -type RecoverGcpVMNewSourceConfig struct { - - // Specifies the GCP zone in which to deploy the VM. - // Required: true - AvailabilityZone *RecoveryObjectIdentifier `json:"availabilityZone"` - - // Specifies the networking configuration to be applied to the recovered VMs. - // Required: true - NetworkConfig *RecoverGcpVMNewSourceNetworkConfig `json:"networkConfig"` - - // Specifies the GCP project in which to deploy the VM. - // Required: true - Project *RecoveryObjectIdentifier `json:"project"` - - // Specifies the GCP region in which to deploy the VM. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover gcp Vm new source config -func (m *RecoverGcpVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAvailabilityZone(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) validateAvailabilityZone(formats strfmt.Registry) error { - - if err := validate.Required("availabilityZone", "body", m.AvailabilityZone); err != nil { - return err - } - - if m.AvailabilityZone != nil { - if err := m.AvailabilityZone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) validateNetworkConfig(formats strfmt.Registry) error { - - if err := validate.Required("networkConfig", "body", m.NetworkConfig); err != nil { - return err - } - - 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 -} - -func (m *RecoverGcpVMNewSourceConfig) validateProject(formats strfmt.Registry) error { - - if err := validate.Required("project", "body", m.Project); err != nil { - return err - } - - if m.Project != nil { - if err := m.Project.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gcp Vm new source config based on the context it is used -func (m *RecoverGcpVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAvailabilityZone(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) contextValidateAvailabilityZone(ctx context.Context, formats strfmt.Registry) error { - - if m.AvailabilityZone != nil { - - if err := m.AvailabilityZone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availabilityZone") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availabilityZone") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkConfig != 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 -} - -func (m *RecoverGcpVMNewSourceConfig) contextValidateProject(ctx context.Context, formats strfmt.Registry) error { - - if m.Project != nil { - - if err := m.Project.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverGcpVMNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGcpVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGcpVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverGcpVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gcp_vm_new_source_network_config.go b/v2/models/recover_gcp_vm_new_source_network_config.go deleted file mode 100644 index cfeb9167..00000000 --- a/v2/models/recover_gcp_vm_new_source_network_config.go +++ /dev/null @@ -1,110 +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" -) - -// RecoverGcpVMNewSourceNetworkConfig Recover GCP VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied for GCP VMs if recovering to new Source. -// -// swagger:model RecoverGcpVmNewSourceNetworkConfig -type RecoverGcpVMNewSourceNetworkConfig struct { - - // Specifies the subnet. - // Required: true - Subnet *GcpVpcSubnetConfig `json:"subnet"` -} - -// Validate validates this recover gcp Vm new source network config -func (m *RecoverGcpVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSubnet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMNewSourceNetworkConfig) validateSubnet(formats strfmt.Registry) error { - - if err := validate.Required("subnet", "body", m.Subnet); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this recover gcp Vm new source network config based on the context it is used -func (m *RecoverGcpVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSubnet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMNewSourceNetworkConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Subnet != 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 -} - -// MarshalBinary interface implementation -func (m *RecoverGcpVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGcpVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverGcpVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gcp_vm_params.go b/v2/models/recover_gcp_vm_params.go deleted file mode 100644 index 232d378b..00000000 --- a/v2/models/recover_gcp_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGcpVMParams Recover GCP VM params. -// -// Specifies the parameters to recover GCP VM. -// -// swagger:model RecoverGcpVmParams -type RecoverGcpVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kGCP"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a GCP target. - GcpTargetParams *GcpTargetParamsForRecoverVM `json:"gcpTargetParams,omitempty"` -} - -// Validate validates this recover gcp Vm params -func (m *RecoverGcpVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGcpVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kGCP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGcpVmParamsTypeTargetEnvironmentPropEnum = append(recoverGcpVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGcpVMParamsTargetEnvironmentKGCP captures enum value "kGCP" - RecoverGcpVMParamsTargetEnvironmentKGCP string = "kGCP" -) - -// prop value enum -func (m *RecoverGcpVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGcpVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGcpVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGcpVMParams) validateGcpTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GcpTargetParams) { // not required - return nil - } - - if m.GcpTargetParams != nil { - if err := m.GcpTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gcp Vm params based on the context it is used -func (m *RecoverGcpVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGcpVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGcpVMParams) contextValidateGcpTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpTargetParams != nil { - - if swag.IsZero(m.GcpTargetParams) { // not required - return nil - } - - if err := m.GcpTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGcpVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGcpVMParams) UnmarshalBinary(b []byte) error { - var res RecoverGcpVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_generic_nas_files_params.go b/v2/models/recover_generic_nas_files_params.go deleted file mode 100644 index 53fd667a..00000000 --- a/v2/models/recover_generic_nas_files_params.go +++ /dev/null @@ -1,497 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGenericNasFilesParams Recover Generic Nas files Params. -// -// Specifies the parameters to recover Generic Nas files. -// -// swagger:model RecoverGenericNasFilesParams -type RecoverGenericNasFilesParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a Generic Nas recovery target. - GenericNasTargetParams *RecoverGenericNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover generic nas files params -func (m *RecoverGenericNasFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGenericNasFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGenericNasFilesParamsTypeTargetEnvironmentPropEnum = append(recoverGenericNasFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGenericNasFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverGenericNasFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverGenericNasFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverGenericNasFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverGenericNasFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverGenericNasFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverGenericNasFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverGenericNasFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverGenericNasFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverGenericNasFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverGenericNasFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverGenericNasFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverGenericNasFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGenericNasFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGenericNasFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover generic nas files params based on the context it is used -func (m *RecoverGenericNasFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGenericNasFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGenericNasFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverGenericNasFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_generic_nas_nas_volume_params.go b/v2/models/recover_generic_nas_nas_volume_params.go deleted file mode 100644 index 7982bfc5..00000000 --- a/v2/models/recover_generic_nas_nas_volume_params.go +++ /dev/null @@ -1,486 +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" -) - -// RecoverGenericNasNasVolumeParams Recover Generic NAS Volume Params. -// -// Specifies the parameters to recover Generic NAS volumes. -// -// swagger:model RecoverGenericNasNasVolumeParams -type RecoverGenericNasNasVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for a Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a Generic NAS recovery target. - GenericNasTargetParams *RecoverGenericNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover generic nas nas volume params -func (m *RecoverGenericNasNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverGenericNasNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGenericNasNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverGenericNasNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverGenericNasNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverGenericNasNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverGenericNasNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGenericNasNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover generic nas nas volume params based on the context it is used -func (m *RecoverGenericNasNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGenericNasNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGenericNasNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverGenericNasNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_generic_nas_params.go b/v2/models/recover_generic_nas_params.go deleted file mode 100644 index 385572b7..00000000 --- a/v2/models/recover_generic_nas_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGenericNasParams Recover Generic NAS Params. -// -// Specifies the recovery options specific to Generic NAS environment. -// -// swagger:model RecoverGenericNasParams -type RecoverGenericNasParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverGenericNasFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Nas Volumes. - RecoverNasVolumeParams *RecoverGenericNasNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover generic nas params -func (m *RecoverGenericNasParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGenericNasParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGenericNasParamsTypeRecoveryActionPropEnum = append(recoverGenericNasParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverGenericNasParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverGenericNasParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverGenericNasParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverGenericNasParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverGenericNasParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGenericNasParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGenericNasParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverGenericNasParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover generic nas params based on the context it is used -func (m *RecoverGenericNasParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGenericNasParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGenericNasParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGenericNasParams) UnmarshalBinary(b []byte) error { - var res RecoverGenericNasParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_generic_nas_to_generic_nas_files_target_params.go b/v2/models/recover_generic_nas_to_generic_nas_files_target_params.go deleted file mode 100644 index bdf55408..00000000 --- a/v2/models/recover_generic_nas_to_generic_nas_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverGenericNasToGenericNasFilesTargetParams Recover Generic Nas To Generic Nas Files Target Params. -// -// Specifies the params of the Generic Nas recovery target. -// -// swagger:model RecoverGenericNasToGenericNasFilesTargetParams -type RecoverGenericNasToGenericNasFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Generic Nas target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToGenericNasFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalGenericNasFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover generic nas to generic nas files target params -func (m *RecoverGenericNasToGenericNasFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasToGenericNasFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover generic nas to generic nas files target params based on the context it is used -func (m *RecoverGenericNasToGenericNasFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasToGenericNasFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGenericNasToGenericNasFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGenericNasToGenericNasFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverGenericNasToGenericNasFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_generic_nas_to_generic_nas_volume_target_params.go b/v2/models/recover_generic_nas_to_generic_nas_volume_target_params.go deleted file mode 100644 index 7c480a18..00000000 --- a/v2/models/recover_generic_nas_to_generic_nas_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverGenericNasToGenericNasVolumeTargetParams Recover Generic NAS To Generic NAS Volume Target Params. -// -// Specifies the params of the Generic NAS recovery target. -// -// swagger:model RecoverGenericNasToGenericNasVolumeTargetParams -type RecoverGenericNasToGenericNasVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Generic NAS target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToGenericNasVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalGenericNasTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover generic nas to generic nas volume target params -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover generic nas to generic nas volume target params based on the context it is used -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGenericNasToGenericNasVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverGenericNasToGenericNasVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gpfs_files_params.go b/v2/models/recover_gpfs_files_params.go deleted file mode 100644 index b39235a3..00000000 --- a/v2/models/recover_gpfs_files_params.go +++ /dev/null @@ -1,497 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGpfsFilesParams Recover Gpfs files Params. -// -// Specifies the parameters to recover Gpfs files. -// -// swagger:model RecoverGpfsFilesParams -type RecoverGpfsFilesParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverGpfsToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for a Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover gpfs files params -func (m *RecoverGpfsFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGpfsFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGpfsFilesParamsTypeTargetEnvironmentPropEnum = append(recoverGpfsFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGpfsFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverGpfsFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverGpfsFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverGpfsFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverGpfsFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverGpfsFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverGpfsFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverGpfsFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverGpfsFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverGpfsFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverGpfsFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverGpfsFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverGpfsFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGpfsFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGpfsFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gpfs files params based on the context it is used -func (m *RecoverGpfsFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGpfsFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGpfsFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverGpfsFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gpfs_nas_volume_params.go b/v2/models/recover_gpfs_nas_volume_params.go deleted file mode 100644 index f33a4343..00000000 --- a/v2/models/recover_gpfs_nas_volume_params.go +++ /dev/null @@ -1,486 +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" -) - -// RecoverGpfsNasVolumeParams Recover GPFS NAS Volume Params. -// -// Specifies the parameters to recover GPFS NAS volumes. -// -// swagger:model RecoverGpfsNasVolumeParams -type RecoverGpfsNasVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for a Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverGpfsToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover gpfs nas volume params -func (m *RecoverGpfsNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverGpfsNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGpfsNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverGpfsNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverGpfsNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverGpfsNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverGpfsNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverGpfsNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverGpfsNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverGpfsNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverGpfsNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverGpfsNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverGpfsNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGpfsNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gpfs nas volume params based on the context it is used -func (m *RecoverGpfsNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGpfsNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGpfsNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverGpfsNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gpfs_params.go b/v2/models/recover_gpfs_params.go deleted file mode 100644 index 2bff049c..00000000 --- a/v2/models/recover_gpfs_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverGpfsParams Recover GPFS Params. -// -// Specifies the recovery options specific to GPFS environment. -// -// swagger:model RecoverGpfsParams -type RecoverGpfsParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverGpfsFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Nas Volumes. - RecoverNasVolumeParams *RecoverGpfsNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover gpfs params -func (m *RecoverGpfsParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverGpfsParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverGpfsParamsTypeRecoveryActionPropEnum = append(recoverGpfsParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverGpfsParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverGpfsParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverGpfsParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverGpfsParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverGpfsParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverGpfsParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverGpfsParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverGpfsParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gpfs params based on the context it is used -func (m *RecoverGpfsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverGpfsParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGpfsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGpfsParams) UnmarshalBinary(b []byte) error { - var res RecoverGpfsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gpfs_to_gpfs_files_target_params.go b/v2/models/recover_gpfs_to_gpfs_files_target_params.go deleted file mode 100644 index 4bf93630..00000000 --- a/v2/models/recover_gpfs_to_gpfs_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverGpfsToGpfsFilesTargetParams Recover GPFS To GPFS Files Target Params. -// -// Specifies the params of the GPFS recovery target. -// -// swagger:model RecoverGpfsToGpfsFilesTargetParams -type RecoverGpfsToGpfsFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original GPFS target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToGpfsFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalGpfsFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover gpfs to gpfs files target params -func (m *RecoverGpfsToGpfsFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsToGpfsFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverGpfsToGpfsFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsToGpfsFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gpfs to gpfs files target params based on the context it is used -func (m *RecoverGpfsToGpfsFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsToGpfsFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsToGpfsFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGpfsToGpfsFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGpfsToGpfsFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverGpfsToGpfsFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_gpfs_to_gpfs_volume_target_params.go b/v2/models/recover_gpfs_to_gpfs_volume_target_params.go deleted file mode 100644 index 47e96ba0..00000000 --- a/v2/models/recover_gpfs_to_gpfs_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverGpfsToGpfsVolumeTargetParams Recover GPFS To GPFS NAS Volume Target Params. -// -// Specifies the params of the GPFS recovery target. -// -// swagger:model RecoverGpfsToGpfsVolumeTargetParams -type RecoverGpfsToGpfsVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original GPFS target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToGpfsVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalGpfsTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover gpfs to gpfs volume target params -func (m *RecoverGpfsToGpfsVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsToGpfsVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverGpfsToGpfsVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsToGpfsVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover gpfs to gpfs volume target params based on the context it is used -func (m *RecoverGpfsToGpfsVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverGpfsToGpfsVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverGpfsToGpfsVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverGpfsToGpfsVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverGpfsToGpfsVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverGpfsToGpfsVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hbase_no_sql_object_params.go b/v2/models/recover_hbase_no_sql_object_params.go deleted file mode 100644 index adb9a1d8..00000000 --- a/v2/models/recover_hbase_no_sql_object_params.go +++ /dev/null @@ -1,76 +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" -) - -// RecoverHbaseNoSQLObjectParams Recover Hbase Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverHbaseNoSqlObjectParams -type RecoverHbaseNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` - - // Specifies the new name to which the object should be renamed. at the time of recovery. - RenameTo *string `json:"renameTo,omitempty"` -} - -// Validate validates this recover hbase no Sql object params -func (m *RecoverHbaseNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHbaseNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover hbase no Sql object params based on context it is used -func (m *RecoverHbaseNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHbaseNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHbaseNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverHbaseNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hbase_params.go b/v2/models/recover_hbase_params.go deleted file mode 100644 index b5c7155e..00000000 --- a/v2/models/recover_hbase_params.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHbaseParams Recover Hbase params. -// -// Specifies the parameters to recover Hbase objects. -// -// swagger:model RecoverHbaseParams -type RecoverHbaseParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids of the Objects to be recovered. - // Required: true - Snapshots []*RecoverHbaseSnapshotParams `json:"snapshots"` - - // A suffix that is to be applied to all recovered objects. - Suffix *string `json:"suffix,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHbaseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverHbaseSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.Suffix = dataAO1.Suffix - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHbaseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverHbaseSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.Suffix = m.Suffix - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hbase params -func (m *RecoverHbaseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHbaseParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hbase params based on the context it is used -func (m *RecoverHbaseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHbaseParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHbaseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHbaseParams) UnmarshalBinary(b []byte) error { - var res RecoverHbaseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hbase_snapshot_params.go b/v2/models/recover_hbase_snapshot_params.go deleted file mode 100644 index cfadd715..00000000 --- a/v2/models/recover_hbase_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverHbaseSnapshotParams Recover Hbase Snapshot Params. -// -// Specifies the snapshot parameters for a protected Hbase object. -// -// swagger:model RecoverHbaseSnapshotParams -type RecoverHbaseSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverHbaseNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHbaseSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverHbaseNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHbaseSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverHbaseNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hbase snapshot params -func (m *RecoverHbaseSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHbaseSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hbase snapshot params based on the context it is used -func (m *RecoverHbaseSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHbaseSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHbaseSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHbaseSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverHbaseSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hdfs_no_sql_object_params.go b/v2/models/recover_hdfs_no_sql_object_params.go deleted file mode 100644 index 2f303160..00000000 --- a/v2/models/recover_hdfs_no_sql_object_params.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" -) - -// RecoverHdfsNoSQLObjectParams Recover Hdfs Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverHdfsNoSqlObjectParams -type RecoverHdfsNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` -} - -// Validate validates this recover hdfs no Sql object params -func (m *RecoverHdfsNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHdfsNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover hdfs no Sql object params based on context it is used -func (m *RecoverHdfsNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHdfsNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHdfsNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverHdfsNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hdfs_params.go b/v2/models/recover_hdfs_params.go deleted file mode 100644 index 241df548..00000000 --- a/v2/models/recover_hdfs_params.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHdfsParams Recover HDFS params. -// -// Specifies the parameters to recover HDFS objects. -// -// swagger:model RecoverHdfsParams -type RecoverHdfsParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids of the Objects to be recovered. - // Required: true - Snapshots []*RecoverHdfsSnapshotParams `json:"snapshots"` - - // Specifies the target directory where files and folders are to be recovered. If not set, this will be taken as '/' - TargetDirectory *string `json:"targetDirectory,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHdfsParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverHdfsSnapshotParams `json:"snapshots"` - - TargetDirectory *string `json:"targetDirectory,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.TargetDirectory = dataAO1.TargetDirectory - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHdfsParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverHdfsSnapshotParams `json:"snapshots"` - - TargetDirectory *string `json:"targetDirectory,omitempty"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.TargetDirectory = m.TargetDirectory - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hdfs params -func (m *RecoverHdfsParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHdfsParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hdfs params based on the context it is used -func (m *RecoverHdfsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHdfsParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHdfsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHdfsParams) UnmarshalBinary(b []byte) error { - var res RecoverHdfsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hdfs_snapshot_params.go b/v2/models/recover_hdfs_snapshot_params.go deleted file mode 100644 index 7e707647..00000000 --- a/v2/models/recover_hdfs_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverHdfsSnapshotParams Recover Hdfs Snapshot Params. -// -// Specifies the snapshot parameters for a protected Hdfs object. -// -// swagger:model RecoverHdfsSnapshotParams -type RecoverHdfsSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverHdfsNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHdfsSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverHdfsNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHdfsSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverHdfsNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hdfs snapshot params -func (m *RecoverHdfsSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHdfsSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hdfs snapshot params based on the context it is used -func (m *RecoverHdfsSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHdfsSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHdfsSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHdfsSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverHdfsSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hive_no_sql_object_params.go b/v2/models/recover_hive_no_sql_object_params.go deleted file mode 100644 index 8e695bb5..00000000 --- a/v2/models/recover_hive_no_sql_object_params.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" -) - -// RecoverHiveNoSQLObjectParams Recover Hive Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverHiveNoSqlObjectParams -type RecoverHiveNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` -} - -// Validate validates this recover hive no Sql object params -func (m *RecoverHiveNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHiveNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover hive no Sql object params based on context it is used -func (m *RecoverHiveNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHiveNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHiveNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverHiveNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hive_params.go b/v2/models/recover_hive_params.go deleted file mode 100644 index 3e2d3947..00000000 --- a/v2/models/recover_hive_params.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHiveParams Recover Hive params. -// -// Specifies the type of recover action to be performed. -// -// swagger:model RecoverHiveParams -type RecoverHiveParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids of the Objects to be recovered. - // Required: true - Snapshots []*RecoverHiveSnapshotParams `json:"snapshots"` - - // A suffix that is to be applied to all recovered objects. - Suffix *string `json:"suffix,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHiveParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverHiveSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.Suffix = dataAO1.Suffix - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHiveParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverHiveSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.Suffix = m.Suffix - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hive params -func (m *RecoverHiveParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHiveParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hive params based on the context it is used -func (m *RecoverHiveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHiveParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHiveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHiveParams) UnmarshalBinary(b []byte) error { - var res RecoverHiveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hive_snapshot_params.go b/v2/models/recover_hive_snapshot_params.go deleted file mode 100644 index 274638e9..00000000 --- a/v2/models/recover_hive_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverHiveSnapshotParams Recover Hive Snapshot Params. -// -// Specifies the snapshot parameters for a protected Hive object. -// -// swagger:model RecoverHiveSnapshotParams -type RecoverHiveSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverHiveNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverHiveSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverHiveNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverHiveSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverHiveNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover hive snapshot params -func (m *RecoverHiveSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHiveSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover hive snapshot params based on the context it is used -func (m *RecoverHiveSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHiveSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHiveSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHiveSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverHiveSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_file_and_folder_params.go b/v2/models/recover_hyper_v_file_and_folder_params.go deleted file mode 100644 index f6e18bc3..00000000 --- a/v2/models/recover_hyper_v_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHyperVFileAndFolderParams Recover HyperV File And Folder Params -// -// Specifies the parameters to recover files and folders. -// -// swagger:model RecoverHyperVFileAndFolderParams -type RecoverHyperVFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kHyperV"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters to recover to a HyperV target. - HypervTargetParams *HyperVTargetParamsForRecoverFileAndFolder `json:"hypervTargetParams,omitempty"` -} - -// Validate validates this recover hyper v file and folder params -func (m *RecoverHyperVFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverHyperVFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHyperV"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverHyperVFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverHyperVFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverHyperVFileAndFolderParamsTargetEnvironmentKHyperV captures enum value "kHyperV" - RecoverHyperVFileAndFolderParamsTargetEnvironmentKHyperV string = "kHyperV" -) - -// prop value enum -func (m *RecoverHyperVFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverHyperVFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverHyperVFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverHyperVFileAndFolderParams) validateHypervTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if m.HypervTargetParams != nil { - if err := m.HypervTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v file and folder params based on the context it is used -func (m *RecoverHyperVFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverHyperVFileAndFolderParams) contextValidateHypervTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervTargetParams != nil { - - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if err := m.HypervTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverHyperVFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_params.go b/v2/models/recover_hyper_v_params.go deleted file mode 100644 index 637dbfca..00000000 --- a/v2/models/recover_hyper_v_params.go +++ /dev/null @@ -1,384 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHyperVParams Recover HyperV environment params. -// -// Specifies the recovery options specific to HyperV environment. -// -// swagger:model RecoverHyperVParams -type RecoverHyperVParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. For recovering files, specifies the object contains the file to recover. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["RecoverVMs","InstantVolumeMount","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to mount HyperV Volumes. - MountVolumeParams *MountHyperVVolumeParams `json:"mountVolumeParams,omitempty"` - - // Specifies the parameters to recover files and folders. - RecoverFileAndFolderParams *RecoverHyperVFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover HyperV VM. - RecoverVMParams *RecoverHyperVVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover hyper v params -func (m *RecoverHyperVParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverHyperVParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","InstantVolumeMount","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverHyperVParamsTypeRecoveryActionPropEnum = append(recoverHyperVParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverHyperVParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverHyperVParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverHyperVParamsRecoveryActionInstantVolumeMount captures enum value "InstantVolumeMount" - RecoverHyperVParamsRecoveryActionInstantVolumeMount string = "InstantVolumeMount" - - // RecoverHyperVParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverHyperVParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverHyperVParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverHyperVParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverHyperVParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverHyperVParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) validateMountVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if m.MountVolumeParams != nil { - if err := m.MountVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v params based on the context it is used -func (m *RecoverHyperVParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverHyperVParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) contextValidateMountVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumeParams != nil { - - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if err := m.MountVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVParams) UnmarshalBinary(b []byte) error { - var res RecoverHyperVParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_new_source_config.go b/v2/models/recover_hyper_v_vm_new_source_config.go deleted file mode 100644 index b175fcad..00000000 --- a/v2/models/recover_hyper_v_vm_new_source_config.go +++ /dev/null @@ -1,270 +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" -) - -// RecoverHyperVVMNewSourceConfig Recover HyperV VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverHyperVVmNewSourceConfig -type RecoverHyperVVMNewSourceConfig struct { - - // Specifies the type of HyperV source to which the VMs are being restored. - // Required: true - // Enum: ["kSCVMMServer","kStandaloneHost","kStandaloneCluster"] - SourceType *string `json:"sourceType"` - - // scvmm server params - ScvmmServerParams *RecoverHyperVVMSCVMMSourceConfig `json:"scvmmServerParams,omitempty"` - - // standalone host params - StandaloneHostParams *RecoverHyperVVMStandaloneHostSourceConfig `json:"standaloneHostParams,omitempty"` - - // standalone cluster params - StandaloneClusterParams *RecoverHyperVVMStandaloneClusterSourceConfig `json:"standaloneClusterParams,omitempty"` -} - -// Validate validates this recover hyper v Vm new source config -func (m *RecoverHyperVVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScvmmServerParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneHostParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneClusterParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverHyperVVmNewSourceConfigTypeSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSCVMMServer","kStandaloneHost","kStandaloneCluster"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverHyperVVmNewSourceConfigTypeSourceTypePropEnum = append(recoverHyperVVmNewSourceConfigTypeSourceTypePropEnum, v) - } -} - -const ( - - // RecoverHyperVVMNewSourceConfigSourceTypeKSCVMMServer captures enum value "kSCVMMServer" - RecoverHyperVVMNewSourceConfigSourceTypeKSCVMMServer string = "kSCVMMServer" - - // RecoverHyperVVMNewSourceConfigSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - RecoverHyperVVMNewSourceConfigSourceTypeKStandaloneHost string = "kStandaloneHost" - - // RecoverHyperVVMNewSourceConfigSourceTypeKStandaloneCluster captures enum value "kStandaloneCluster" - RecoverHyperVVMNewSourceConfigSourceTypeKStandaloneCluster string = "kStandaloneCluster" -) - -// prop value enum -func (m *RecoverHyperVVMNewSourceConfig) validateSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverHyperVVmNewSourceConfigTypeSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - // value enum - if err := m.validateSourceTypeEnum("sourceType", "body", *m.SourceType); err != nil { - return err - } - - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) validateScvmmServerParams(formats strfmt.Registry) error { - if swag.IsZero(m.ScvmmServerParams) { // not required - return nil - } - - if m.ScvmmServerParams != nil { - if err := m.ScvmmServerParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scvmmServerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scvmmServerParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) validateStandaloneHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if m.StandaloneHostParams != nil { - if err := m.StandaloneHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) validateStandaloneClusterParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneClusterParams) { // not required - return nil - } - - if m.StandaloneClusterParams != nil { - if err := m.StandaloneClusterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneClusterParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm new source config based on the context it is used -func (m *RecoverHyperVVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateScvmmServerParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandaloneClusterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) contextValidateScvmmServerParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ScvmmServerParams != nil { - - if swag.IsZero(m.ScvmmServerParams) { // not required - return nil - } - - if err := m.ScvmmServerParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scvmmServerParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scvmmServerParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) contextValidateStandaloneHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneHostParams != nil { - - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if err := m.StandaloneHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMNewSourceConfig) contextValidateStandaloneClusterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneClusterParams != nil { - - if swag.IsZero(m.StandaloneClusterParams) { // not required - return nil - } - - if err := m.StandaloneClusterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneClusterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneClusterParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_new_source_network_config.go b/v2/models/recover_hyper_v_vm_new_source_network_config.go deleted file mode 100644 index e44d4691..00000000 --- a/v2/models/recover_hyper_v_vm_new_source_network_config.go +++ /dev/null @@ -1,114 +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" -) - -// RecoverHyperVVMNewSourceNetworkConfig Recover HyperV VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied for HyperV VMs if recovering to new Source. -// -// swagger:model RecoverHyperVVmNewSourceNetworkConfig -type RecoverHyperVVMNewSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies the virtual switch that will attached to all the network interfaces of the VMs being recovered. This parameter is mandatory if detach network is specified as false. - VirtualSwitch *RecoveryObjectIdentifier `json:"virtualSwitch,omitempty"` -} - -// Validate validates this recover hyper v Vm new source network config -func (m *RecoverHyperVVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVirtualSwitch(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMNewSourceNetworkConfig) validateVirtualSwitch(formats strfmt.Registry) error { - if swag.IsZero(m.VirtualSwitch) { // not required - return nil - } - - if m.VirtualSwitch != nil { - if err := m.VirtualSwitch.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualSwitch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualSwitch") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm new source network config based on the context it is used -func (m *RecoverHyperVVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVirtualSwitch(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMNewSourceNetworkConfig) contextValidateVirtualSwitch(ctx context.Context, formats strfmt.Registry) error { - - if m.VirtualSwitch != nil { - - if swag.IsZero(m.VirtualSwitch) { // not required - return nil - } - - if err := m.VirtualSwitch.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("virtualSwitch") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("virtualSwitch") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_original_source_config.go b/v2/models/recover_hyper_v_vm_original_source_config.go deleted file mode 100644 index a085d837..00000000 --- a/v2/models/recover_hyper_v_vm_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverHyperVVMOriginalSourceConfig Recover HyperV VMs Original Source Config. -// -// Specifies the Source configuration if VM's are being recovered to Original Source. -// -// swagger:model RecoverHyperVVmOriginalSourceConfig -type RecoverHyperVVMOriginalSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverHyperVVMOriginalSourceNetworkConfig `json:"networkConfig,omitempty"` -} - -// Validate validates this recover hyper v Vm original source config -func (m *RecoverHyperVVMOriginalSourceConfig) 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 *RecoverHyperVVMOriginalSourceConfig) 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 recover hyper v Vm original source config based on the context it is used -func (m *RecoverHyperVVMOriginalSourceConfig) 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 *RecoverHyperVVMOriginalSourceConfig) 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 *RecoverHyperVVMOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_original_source_network_config.go b/v2/models/recover_hyper_v_vm_original_source_network_config.go deleted file mode 100644 index 704caf37..00000000 --- a/v2/models/recover_hyper_v_vm_original_source_network_config.go +++ /dev/null @@ -1,52 +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" -) - -// RecoverHyperVVMOriginalSourceNetworkConfig Recover HyperV VMs Original Source Network configuration. -// -// Specifies the network config parameters to be applied for HyperV VMs if recovering to original Source. -// -// swagger:model RecoverHyperVVmOriginalSourceNetworkConfig -type RecoverHyperVVMOriginalSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` -} - -// Validate validates this recover hyper v Vm original source network config -func (m *RecoverHyperVVMOriginalSourceNetworkConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover hyper v Vm original source network config based on context it is used -func (m *RecoverHyperVVMOriginalSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMOriginalSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMOriginalSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMOriginalSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_params.go b/v2/models/recover_hyper_v_vm_params.go deleted file mode 100644 index 79b11436..00000000 --- a/v2/models/recover_hyper_v_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverHyperVVMParams Recover VMs params. -// -// Specifies the parameters to recover VMs. -// -// swagger:model RecoverHyperVVmParams -type RecoverHyperVVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kHyperV"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a HyperV target. - HypervTargetParams *HyperVTargetParamsForRecoverVM `json:"hypervTargetParams,omitempty"` -} - -// Validate validates this recover hyper v Vm params -func (m *RecoverHyperVVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverHyperVVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kHyperV"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverHyperVVmParamsTypeTargetEnvironmentPropEnum = append(recoverHyperVVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverHyperVVMParamsTargetEnvironmentKHyperV captures enum value "kHyperV" - RecoverHyperVVMParamsTargetEnvironmentKHyperV string = "kHyperV" -) - -// prop value enum -func (m *RecoverHyperVVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverHyperVVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverHyperVVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverHyperVVMParams) validateHypervTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if m.HypervTargetParams != nil { - if err := m.HypervTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm params based on the context it is used -func (m *RecoverHyperVVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverHyperVVMParams) contextValidateHypervTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervTargetParams != nil { - - if swag.IsZero(m.HypervTargetParams) { // not required - return nil - } - - if err := m.HypervTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMParams) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_s_c_vm_m_source_config.go b/v2/models/recover_hyper_v_vm_s_c_vm_m_source_config.go deleted file mode 100644 index f03114a7..00000000 --- a/v2/models/recover_hyper_v_vm_s_c_vm_m_source_config.go +++ /dev/null @@ -1,259 +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" -) - -// RecoverHyperVVMSCVMMSourceConfig Recover HyperV VMs New SCVMM Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverHyperVVmSCVMMSourceConfig -type RecoverHyperVVMSCVMMSourceConfig struct { - - // Specifies the HyperV host where the recovered VMs will be attached. For standalone host targets, the host must be the same as the source. - // Required: true - Host *RecoveryObjectIdentifier `json:"host"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverHyperVVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the datastore object where the VMs' files should be recovered to. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover hyper v Vm s c VM m source config -func (m *RecoverHyperVVMSCVMMSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) 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 -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm s c VM m source config based on the context it is used -func (m *RecoverHyperVVMSCVMMSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) 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 -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMSCVMMSourceConfig) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMSCVMMSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMSCVMMSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMSCVMMSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_standalone_cluster_source_config.go b/v2/models/recover_hyper_v_vm_standalone_cluster_source_config.go deleted file mode 100644 index ea978215..00000000 --- a/v2/models/recover_hyper_v_vm_standalone_cluster_source_config.go +++ /dev/null @@ -1,259 +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" -) - -// RecoverHyperVVMStandaloneClusterSourceConfig Recover HyperV VMs New Standalone Cluster Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverHyperVVmStandaloneClusterSourceConfig -type RecoverHyperVVMStandaloneClusterSourceConfig struct { - - // Specifies the HyperV host where the recovered VMs will be attached. For standalone host targets, the host must be the same as the source. - // Required: true - Host *RecoveryObjectIdentifier `json:"host"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverHyperVVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the datastore object where the VMs' files should be recovered to. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover hyper v Vm standalone cluster source config -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) 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 -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm standalone cluster source config based on the context it is used -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) 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 -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMStandaloneClusterSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMStandaloneClusterSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_hyper_v_vm_standalone_host_source_config.go b/v2/models/recover_hyper_v_vm_standalone_host_source_config.go deleted file mode 100644 index 2704976a..00000000 --- a/v2/models/recover_hyper_v_vm_standalone_host_source_config.go +++ /dev/null @@ -1,210 +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" -) - -// RecoverHyperVVMStandaloneHostSourceConfig Recover HyperV VMs New Standalone Host Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverHyperVVmStandaloneHostSourceConfig -type RecoverHyperVVMStandaloneHostSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverHyperVVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the datastore object where the VMs' files should be recovered to. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover hyper v Vm standalone host source config -func (m *RecoverHyperVVMStandaloneHostSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) 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 -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover hyper v Vm standalone host source config based on the context it is used -func (m *RecoverHyperVVMStandaloneHostSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) 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 -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverHyperVVMStandaloneHostSourceConfig) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverHyperVVMStandaloneHostSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverHyperVVMStandaloneHostSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverHyperVVMStandaloneHostSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_isilon_files_params.go b/v2/models/recover_isilon_files_params.go deleted file mode 100644 index e59443bb..00000000 --- a/v2/models/recover_isilon_files_params.go +++ /dev/null @@ -1,497 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverIsilonFilesParams Recover Isilon files Params. -// -// Specifies the parameters to recover Isilon files. -// -// swagger:model RecoverIsilonFilesParams -type RecoverIsilonFilesParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for a Isilon recovery target. - IsilonTargetParams *RecoverIsilonToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover isilon files params -func (m *RecoverIsilonFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverIsilonFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverIsilonFilesParamsTypeTargetEnvironmentPropEnum = append(recoverIsilonFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverIsilonFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverIsilonFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverIsilonFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverIsilonFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverIsilonFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverIsilonFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverIsilonFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverIsilonFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverIsilonFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverIsilonFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverIsilonFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverIsilonFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverIsilonFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverIsilonFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverIsilonFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover isilon files params based on the context it is used -func (m *RecoverIsilonFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverIsilonFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverIsilonFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverIsilonFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_isilon_nas_volume_params.go b/v2/models/recover_isilon_nas_volume_params.go deleted file mode 100644 index a9996748..00000000 --- a/v2/models/recover_isilon_nas_volume_params.go +++ /dev/null @@ -1,486 +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" -) - -// RecoverIsilonNasVolumeParams Recover Isilon NAS Volume Params. -// -// Specifies the parameters to recover Isilon NAS volumes. -// -// swagger:model RecoverIsilonNasVolumeParams -type RecoverIsilonNasVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for a Isilon recovery target. - IsilonTargetParams *RecoverIsilonToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for an Netapp recovery target. - NetappTargetParams *RecoverOtherNasToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover isilon nas volume params -func (m *RecoverIsilonNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverIsilonNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverIsilonNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverIsilonNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverIsilonNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverIsilonNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverIsilonNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverIsilonNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverIsilonNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverIsilonNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverIsilonNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverIsilonNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverIsilonNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverIsilonNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover isilon nas volume params based on the context it is used -func (m *RecoverIsilonNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverIsilonNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverIsilonNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverIsilonNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_isilon_params.go b/v2/models/recover_isilon_params.go deleted file mode 100644 index 1499ec71..00000000 --- a/v2/models/recover_isilon_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverIsilonParams Recover Isilon Params. -// -// Specifies the recovery options specific to Isilon environment. -// -// swagger:model RecoverIsilonParams -type RecoverIsilonParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverIsilonFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover NAS Volumes. - RecoverNasVolumeParams *RecoverIsilonNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover isilon params -func (m *RecoverIsilonParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverIsilonParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverIsilonParamsTypeRecoveryActionPropEnum = append(recoverIsilonParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverIsilonParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverIsilonParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverIsilonParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverIsilonParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverIsilonParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverIsilonParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverIsilonParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverIsilonParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover isilon params based on the context it is used -func (m *RecoverIsilonParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverIsilonParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverIsilonParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverIsilonParams) UnmarshalBinary(b []byte) error { - var res RecoverIsilonParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_isilon_to_isilon_files_target_params.go b/v2/models/recover_isilon_to_isilon_files_target_params.go deleted file mode 100644 index 5be4c1f2..00000000 --- a/v2/models/recover_isilon_to_isilon_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverIsilonToIsilonFilesTargetParams Recover Isilon To Isilon Files Target Params. -// -// Specifies the params of the Isilon recovery target. -// -// swagger:model RecoverIsilonToIsilonFilesTargetParams -type RecoverIsilonToIsilonFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Isilon target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToIsilonFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalIsilonFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover isilon to isilon files target params -func (m *RecoverIsilonToIsilonFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonToIsilonFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverIsilonToIsilonFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonToIsilonFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover isilon to isilon files target params based on the context it is used -func (m *RecoverIsilonToIsilonFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonToIsilonFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonToIsilonFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverIsilonToIsilonFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverIsilonToIsilonFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverIsilonToIsilonFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_isilon_to_isilon_volume_target_params.go b/v2/models/recover_isilon_to_isilon_volume_target_params.go deleted file mode 100644 index c077a798..00000000 --- a/v2/models/recover_isilon_to_isilon_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverIsilonToIsilonVolumeTargetParams Recover Isilon To Isilon Volume Target Params. -// -// Specifies the params of the Isilon recovery target. -// -// swagger:model RecoverIsilonToIsilonVolumeTargetParams -type RecoverIsilonToIsilonVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Isilon target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToIsilonVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalIsilonTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover isilon to isilon volume target params -func (m *RecoverIsilonToIsilonVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonToIsilonVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverIsilonToIsilonVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonToIsilonVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover isilon to isilon volume target params based on the context it is used -func (m *RecoverIsilonToIsilonVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverIsilonToIsilonVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverIsilonToIsilonVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverIsilonToIsilonVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverIsilonToIsilonVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverIsilonToIsilonVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kubernetes_namespace_params.go b/v2/models/recover_kubernetes_namespace_params.go deleted file mode 100644 index e7128e4d..00000000 --- a/v2/models/recover_kubernetes_namespace_params.go +++ /dev/null @@ -1,213 +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" -) - -// RecoverKubernetesNamespaceParams Recover Kubernetes Namespace params. -// -// Specifies the parameters to recover Kubernetes Namespaces. -// -// swagger:model RecoverKubernetesNamespaceParams -type RecoverKubernetesNamespaceParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kKubernetes"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a Kubernetes host. - KubernetesTargetParams *KubernetesTargetParamsForRecoverKubernetesNamespace `json:"kubernetesTargetParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this recover kubernetes namespace params -func (m *RecoverKubernetesNamespaceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverKubernetesNamespaceParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kKubernetes"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverKubernetesNamespaceParamsTypeTargetEnvironmentPropEnum = append(recoverKubernetesNamespaceParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverKubernetesNamespaceParamsTargetEnvironmentKKubernetes captures enum value "kKubernetes" - RecoverKubernetesNamespaceParamsTargetEnvironmentKKubernetes string = "kKubernetes" -) - -// prop value enum -func (m *RecoverKubernetesNamespaceParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverKubernetesNamespaceParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverKubernetesNamespaceParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverKubernetesNamespaceParams) validateKubernetesTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.KubernetesTargetParams) { // not required - return nil - } - - if m.KubernetesTargetParams != nil { - if err := m.KubernetesTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverKubernetesNamespaceParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kubernetes namespace params based on the context it is used -func (m *RecoverKubernetesNamespaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKubernetesTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKubernetesNamespaceParams) contextValidateKubernetesTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesTargetParams != nil { - - if swag.IsZero(m.KubernetesTargetParams) { // not required - return nil - } - - if err := m.KubernetesTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverKubernetesNamespaceParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKubernetesNamespaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKubernetesNamespaceParams) UnmarshalBinary(b []byte) error { - var res RecoverKubernetesNamespaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kubernetes_params.go b/v2/models/recover_kubernetes_params.go deleted file mode 100644 index 017a0d9e..00000000 --- a/v2/models/recover_kubernetes_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverKubernetesParams Recover Kubernetes environment params. -// -// Specifies the recovery options specific to Kubernetes environment. -// -// swagger:model RecoverKubernetesParams -type RecoverKubernetesParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNamespaces"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Kubernetes Namespaces. - RecoverNamespaceParams *RecoverKubernetesNamespaceParams `json:"recoverNamespaceParams,omitempty"` -} - -// Validate validates this recover kubernetes params -func (m *RecoverKubernetesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNamespaceParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverKubernetesParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNamespaces"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverKubernetesParamsTypeRecoveryActionPropEnum = append(recoverKubernetesParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverKubernetesParamsRecoveryActionRecoverNamespaces captures enum value "RecoverNamespaces" - RecoverKubernetesParamsRecoveryActionRecoverNamespaces string = "RecoverNamespaces" -) - -// prop value enum -func (m *RecoverKubernetesParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverKubernetesParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverKubernetesParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverKubernetesParams) validateRecoverNamespaceParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNamespaceParams) { // not required - return nil - } - - if m.RecoverNamespaceParams != nil { - if err := m.RecoverNamespaceParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNamespaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNamespaceParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kubernetes params based on the context it is used -func (m *RecoverKubernetesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverNamespaceParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKubernetesParams) contextValidateRecoverNamespaceParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNamespaceParams != nil { - - if swag.IsZero(m.RecoverNamespaceParams) { // not required - return nil - } - - if err := m.RecoverNamespaceParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNamespaceParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNamespaceParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKubernetesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKubernetesParams) UnmarshalBinary(b []byte) error { - var res RecoverKubernetesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_params.go b/v2/models/recover_kvm_params.go deleted file mode 100644 index 7e22ee4f..00000000 --- a/v2/models/recover_kvm_params.go +++ /dev/null @@ -1,276 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverKvmParams Recover KVM environment params. -// -// Specifies the recovery options specific to KVM environment. -// -// swagger:model RecoverKvmParams -type RecoverKvmParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["RecoverVMs"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover KVM VM. - RecoverVMParams *RecoverKvmVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover kvm params -func (m *RecoverKvmParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverKvmParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverKvmParamsTypeRecoveryActionPropEnum = append(recoverKvmParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverKvmParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverKvmParamsRecoveryActionRecoverVMs string = "RecoverVMs" -) - -// prop value enum -func (m *RecoverKvmParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverKvmParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverKvmParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverKvmParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kvm params based on the context it is used -func (m *RecoverKvmParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverKvmParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmParams) UnmarshalBinary(b []byte) error { - var res RecoverKvmParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_new_network_config.go b/v2/models/recover_kvm_vm_new_network_config.go deleted file mode 100644 index 5d585539..00000000 --- a/v2/models/recover_kvm_vm_new_network_config.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverKvmVMNewNetworkConfig Recover KVM VMs New Network configuration. -// -// Specifies the network config parameters to be applied for KVM VMs if recovering to a new source with a new network. -// -// swagger:model RecoverKvmVmNewNetworkConfig -type RecoverKvmVMNewNetworkConfig struct { - - // 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"` - - // Specifies VNic profile that will be attached to the restored object. - VnicProfile *RecoveryObjectIdentifier `json:"vnicProfile,omitempty"` -} - -// Validate validates this recover kvm Vm new network config -func (m *RecoverKvmVMNewNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkPortGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVnicProfile(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewNetworkConfig) validateNetworkPortGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if m.NetworkPortGroup != nil { - if err := m.NetworkPortGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewNetworkConfig) validateVnicProfile(formats strfmt.Registry) error { - if swag.IsZero(m.VnicProfile) { // not required - return nil - } - - if m.VnicProfile != nil { - if err := m.VnicProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vnicProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vnicProfile") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kvm Vm new network config based on the context it is used -func (m *RecoverKvmVMNewNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkPortGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVnicProfile(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewNetworkConfig) contextValidateNetworkPortGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkPortGroup != nil { - - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if err := m.NetworkPortGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewNetworkConfig) contextValidateVnicProfile(ctx context.Context, formats strfmt.Registry) error { - - if m.VnicProfile != nil { - - if swag.IsZero(m.VnicProfile) { // not required - return nil - } - - if err := m.VnicProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vnicProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vnicProfile") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmVMNewNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMNewNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMNewNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_new_source_config.go b/v2/models/recover_kvm_vm_new_source_config.go deleted file mode 100644 index 899c4fa3..00000000 --- a/v2/models/recover_kvm_vm_new_source_config.go +++ /dev/null @@ -1,308 +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" -) - -// RecoverKvmVMNewSourceConfig Recover KVM VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverKvmVmNewSourceConfig -type RecoverKvmVMNewSourceConfig struct { - - // Specifies the resource (KVMH host) to which the restored VM will be attached - // Required: true - Cluster *RecoveryObjectIdentifier `json:"cluster"` - - // Specifies the datacenter where the VM's files should be restored to. - // Required: true - DataCenter *RecoveryObjectIdentifier `json:"dataCenter"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverKvmVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the Storage Domain where the VM's disk should be restored to. - // Required: true - StorageDomain *RecoveryObjectIdentifier `json:"storageDomain"` -} - -// Validate validates this recover kvm Vm new source config -func (m *RecoverKvmVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataCenter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageDomain(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) validateCluster(formats strfmt.Registry) error { - - if err := validate.Required("cluster", "body", m.Cluster); err != nil { - return err - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) validateDataCenter(formats strfmt.Registry) error { - - if err := validate.Required("dataCenter", "body", m.DataCenter); err != nil { - return err - } - - if m.DataCenter != nil { - if err := m.DataCenter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataCenter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataCenter") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) 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 -} - -func (m *RecoverKvmVMNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) validateStorageDomain(formats strfmt.Registry) error { - - if err := validate.Required("storageDomain", "body", m.StorageDomain); err != nil { - return err - } - - if m.StorageDomain != nil { - if err := m.StorageDomain.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomain") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kvm Vm new source config based on the context it is used -func (m *RecoverKvmVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataCenter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - - if m.Cluster != nil { - - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) contextValidateDataCenter(ctx context.Context, formats strfmt.Registry) error { - - if m.DataCenter != nil { - - if err := m.DataCenter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataCenter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataCenter") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) 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 -} - -func (m *RecoverKvmVMNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverKvmVMNewSourceConfig) contextValidateStorageDomain(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageDomain != nil { - - if err := m.StorageDomain.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomain") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomain") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_new_source_network_config.go b/v2/models/recover_kvm_vm_new_source_network_config.go deleted file mode 100644 index fbd60685..00000000 --- a/v2/models/recover_kvm_vm_new_source_network_config.go +++ /dev/null @@ -1,114 +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" -) - -// RecoverKvmVMNewSourceNetworkConfig Recover KVM VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied for KVM VMs if recovering to new Source. -// -// swagger:model RecoverKvmVmNewSourceNetworkConfig -type RecoverKvmVMNewSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies the new network configuration of the Kvm recovery. - NewNetworkConfig *RecoverKvmVMNewNetworkConfig `json:"newNetworkConfig,omitempty"` -} - -// Validate validates this recover kvm Vm new source network config -func (m *RecoverKvmVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewSourceNetworkConfig) validateNewNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewNetworkConfig) { // not required - return nil - } - - if m.NewNetworkConfig != nil { - if err := m.NewNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newNetworkConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kvm Vm new source network config based on the context it is used -func (m *RecoverKvmVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMNewSourceNetworkConfig) contextValidateNewNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewNetworkConfig != nil { - - if swag.IsZero(m.NewNetworkConfig) { // not required - return nil - } - - if err := m.NewNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newNetworkConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_original_source_config.go b/v2/models/recover_kvm_vm_original_source_config.go deleted file mode 100644 index 812ec54e..00000000 --- a/v2/models/recover_kvm_vm_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverKvmVMOriginalSourceConfig Recover KVM VMs Original Source Config. -// -// Specifies the Source configuration if VM's are being recovered to Original Source. -// -// swagger:model RecoverKvmVmOriginalSourceConfig -type RecoverKvmVMOriginalSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverKvmVMOriginalSourceNetworkConfig `json:"networkConfig,omitempty"` -} - -// Validate validates this recover kvm Vm original source config -func (m *RecoverKvmVMOriginalSourceConfig) 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 *RecoverKvmVMOriginalSourceConfig) 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 recover kvm Vm original source config based on the context it is used -func (m *RecoverKvmVMOriginalSourceConfig) 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 *RecoverKvmVMOriginalSourceConfig) 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 *RecoverKvmVMOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_original_source_network_config.go b/v2/models/recover_kvm_vm_original_source_network_config.go deleted file mode 100644 index c91aab33..00000000 --- a/v2/models/recover_kvm_vm_original_source_network_config.go +++ /dev/null @@ -1,52 +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" -) - -// RecoverKvmVMOriginalSourceNetworkConfig Recover KVM VMs Original Source Network configuration. -// -// Specifies the network config parameters to be applied for KVM VMs if recovering to original Source. -// -// swagger:model RecoverKvmVmOriginalSourceNetworkConfig -type RecoverKvmVMOriginalSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` -} - -// Validate validates this recover kvm Vm original source network config -func (m *RecoverKvmVMOriginalSourceNetworkConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover kvm Vm original source network config based on context it is used -func (m *RecoverKvmVMOriginalSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmVMOriginalSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMOriginalSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMOriginalSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_kvm_vm_params.go b/v2/models/recover_kvm_vm_params.go deleted file mode 100644 index 2cc2d666..00000000 --- a/v2/models/recover_kvm_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverKvmVMParams Recover VMs params. -// -// Specifies the parameters to recover VMs. -// -// swagger:model RecoverKvmVmParams -type RecoverKvmVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kKVM"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a KVM target. - KvmTargetParams *KvmTargetParamsForRecoverVM `json:"kvmTargetParams,omitempty"` -} - -// Validate validates this recover kvm Vm params -func (m *RecoverKvmVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverKvmVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kKVM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverKvmVmParamsTypeTargetEnvironmentPropEnum = append(recoverKvmVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverKvmVMParamsTargetEnvironmentKKVM captures enum value "kKVM" - RecoverKvmVMParamsTargetEnvironmentKKVM string = "kKVM" -) - -// prop value enum -func (m *RecoverKvmVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverKvmVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverKvmVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverKvmVMParams) validateKvmTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.KvmTargetParams) { // not required - return nil - } - - if m.KvmTargetParams != nil { - if err := m.KvmTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover kvm Vm params based on the context it is used -func (m *RecoverKvmVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverKvmVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverKvmVMParams) contextValidateKvmTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmTargetParams != nil { - - if swag.IsZero(m.KvmTargetParams) { // not required - return nil - } - - if err := m.KvmTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverKvmVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverKvmVMParams) UnmarshalBinary(b []byte) error { - var res RecoverKvmVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_mailbox_params.go b/v2/models/recover_mailbox_params.go deleted file mode 100644 index e3c6ae5c..00000000 --- a/v2/models/recover_mailbox_params.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverMailboxParams Specifies the parameters to recover an Office 365 Mailbox. -// -// swagger:model RecoverMailboxParams -type RecoverMailboxParams struct { - - // Specifies a list of Mailbox params associated with the objects to recover. - // Required: true - Objects []*ObjectMailboxParam `json:"objects"` - - // Specifies whether to continue recovering other Mailboxes if one of Mailbox failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to skip the recovery of the archive mailbox and/or items present in the archive mailbox. Default value is true - SkipRecoverArchiveMailbox *bool `json:"skipRecoverArchiveMailbox,omitempty"` - - // Specifies whether to skip the recovery of the Recoverable Items present in the selected snapshot. Default value is true - SkipRecoverRecoverableItems *bool `json:"skipRecoverRecoverableItems,omitempty"` - - // Specifies whether to skip the recovery of the Archive Recoverable Items present in the selected snapshot. Default value is true - SkipRecoverArchiveRecoverableItems *bool `json:"skipRecoverArchiveRecoverableItems,omitempty"` - - // Specifies the PST conversion specific parameters. This should always be specified when need to convert selected items to PST. - PstParams *PstParam `json:"pstParams,omitempty"` - - // Specifies the target Mailbox to recover to. If not specified, the objects will be recovered to original location. - TargetMailbox *TargetMailboxParam `json:"targetMailbox,omitempty"` -} - -// Validate validates this recover mailbox params -func (m *RecoverMailboxParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePstParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMailbox(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMailboxParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverMailboxParams) validatePstParams(formats strfmt.Registry) error { - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if m.PstParams != nil { - if err := m.PstParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *RecoverMailboxParams) validateTargetMailbox(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if m.TargetMailbox != nil { - if err := m.TargetMailbox.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover mailbox params based on the context it is used -func (m *RecoverMailboxParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePstParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMailbox(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMailboxParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverMailboxParams) contextValidatePstParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PstParams != nil { - - if swag.IsZero(m.PstParams) { // not required - return nil - } - - if err := m.PstParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pstParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pstParams") - } - return err - } - } - - return nil -} - -func (m *RecoverMailboxParams) contextValidateTargetMailbox(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMailbox != nil { - - if swag.IsZero(m.TargetMailbox) { // not required - return nil - } - - if err := m.TargetMailbox.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMailbox") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMailbox") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMailboxParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMailboxParams) UnmarshalBinary(b []byte) error { - var res RecoverMailboxParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_mongodb_no_sql_object_params.go b/v2/models/recover_mongodb_no_sql_object_params.go deleted file mode 100644 index 62274b12..00000000 --- a/v2/models/recover_mongodb_no_sql_object_params.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverMongodbNoSQLObjectParams Recover MongoDB Object Params. -// -// Specifies the fully qualified object name and other attributes of each object to be recovered. -// -// swagger:model RecoverMongodbNoSqlObjectParams -type RecoverMongodbNoSQLObjectParams struct { - - // Specifies the fully qualified name of the object to be restored. - // Required: true - ObjectName *string `json:"objectName"` - - // Specifies the new name to which the object should be renamed. at the time of recovery. - RenameTo *string `json:"renameTo,omitempty"` - - // Specifies the properties to be applied to the object at the time of recovery. - ObjectProperties []*NoSQLObjectProperty `json:"objectProperties"` -} - -// Validate validates this recover mongodb no Sql object params -func (m *RecoverMongodbNoSQLObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbNoSQLObjectParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -func (m *RecoverMongodbNoSQLObjectParams) validateObjectProperties(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectProperties) { // not required - return nil - } - - for i := 0; i < len(m.ObjectProperties); i++ { - if swag.IsZero(m.ObjectProperties[i]) { // not required - continue - } - - if m.ObjectProperties[i] != nil { - if err := m.ObjectProperties[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover mongodb no Sql object params based on the context it is used -func (m *RecoverMongodbNoSQLObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjectProperties(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbNoSQLObjectParams) contextValidateObjectProperties(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectProperties); i++ { - - if m.ObjectProperties[i] != nil { - - if swag.IsZero(m.ObjectProperties[i]) { // not required - return nil - } - - if err := m.ObjectProperties[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProperties" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMongodbNoSQLObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMongodbNoSQLObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverMongodbNoSQLObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_mongodb_params.go b/v2/models/recover_mongodb_params.go deleted file mode 100644 index b80123ec..00000000 --- a/v2/models/recover_mongodb_params.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverMongodbParams Recover MongoDB params. -// -// Specifies the parameters to recover MongoDB objects. -// -// swagger:model RecoverMongodbParams -type RecoverMongodbParams struct { - CommonNoSQLRecoveryOptions - - // Specifies the local snapshot ids of the Objects to be recovered. - // Required: true - Snapshots []*RecoverMongodbSnapshotParams `json:"snapshots"` - - // A suffix that is to be applied to all recovered objects. - Suffix *string `json:"suffix,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverMongodbParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonNoSQLRecoveryOptions - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonNoSQLRecoveryOptions = aO0 - - // AO1 - var dataAO1 struct { - Snapshots []*RecoverMongodbSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Snapshots = dataAO1.Snapshots - - m.Suffix = dataAO1.Suffix - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverMongodbParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonNoSQLRecoveryOptions) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Snapshots []*RecoverMongodbSnapshotParams `json:"snapshots"` - - Suffix *string `json:"suffix,omitempty"` - } - - dataAO1.Snapshots = m.Snapshots - - dataAO1.Suffix = m.Suffix - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover mongodb params -func (m *RecoverMongodbParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover mongodb params based on the context it is used -func (m *RecoverMongodbParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonNoSQLRecoveryOptions - if err := m.CommonNoSQLRecoveryOptions.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMongodbParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMongodbParams) UnmarshalBinary(b []byte) error { - var res RecoverMongodbParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_mongodb_snapshot_params.go b/v2/models/recover_mongodb_snapshot_params.go deleted file mode 100644 index c3ad8064..00000000 --- a/v2/models/recover_mongodb_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverMongodbSnapshotParams Recover MongoDB Snapshot Params. -// -// Specifies the snapshot parameters for a protected Mongodb object. -// -// swagger:model RecoverMongodbSnapshotParams -type RecoverMongodbSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies details of objects to be recovered. - Objects []*RecoverMongodbNoSQLObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverMongodbSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverMongodbNoSQLObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverMongodbSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverMongodbNoSQLObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover mongodb snapshot params -func (m *RecoverMongodbSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover mongodb snapshot params based on the context it is used -func (m *RecoverMongodbSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMongodbSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMongodbSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMongodbSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverMongodbSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_ms_group_params.go b/v2/models/recover_ms_group_params.go deleted file mode 100644 index 8f1ba38d..00000000 --- a/v2/models/recover_ms_group_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverMsGroupParams Specifies the parameters to recover Microsoft 365 Group. -// -// swagger:model RecoverMsGroupParams -type RecoverMsGroupParams struct { - - // Specifies a list of groups getting restored. - // Required: true - MsGroups []*MsGroupParam `json:"msGroups"` - - // Specifies whether or not all groups are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // Specifies target group nickname in case restoreToOriginal is false. This needs to be specifid when restoreToOriginal is false. - TargetGroup *string `json:"targetGroup,omitempty"` - - // Specifies target group name in case restore_to_original is false. This needs to be specifid when restoreToOriginal is false. However, this will be ignored if restoring to alternate existing group (i.e. to a group the nickname of which is same as the one supplied by the end user). - TargetGroupName *string `json:"targetGroupName,omitempty"` - - // Specifies whether to continue recovering other MS groups if one of MS groups failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` -} - -// Validate validates this recover ms group params -func (m *RecoverMsGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMsGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMsGroupParams) validateMsGroups(formats strfmt.Registry) error { - - if err := validate.Required("msGroups", "body", m.MsGroups); err != nil { - return err - } - - for i := 0; i < len(m.MsGroups); i++ { - if swag.IsZero(m.MsGroups[i]) { // not required - continue - } - - if m.MsGroups[i] != nil { - if err := m.MsGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover ms group params based on the context it is used -func (m *RecoverMsGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMsGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMsGroupParams) contextValidateMsGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MsGroups); i++ { - - if m.MsGroups[i] != nil { - - if swag.IsZero(m.MsGroups[i]) { // not required - return nil - } - - if err := m.MsGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMsGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMsGroupParams) UnmarshalBinary(b []byte) error { - var res RecoverMsGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_ms_team_params.go b/v2/models/recover_ms_team_params.go deleted file mode 100644 index fd9f31b8..00000000 --- a/v2/models/recover_ms_team_params.go +++ /dev/null @@ -1,298 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverMsTeamParams Specifies the parameters to recover Microsoft 365 Teams. -// -// swagger:model RecoverMsTeamParams -type RecoverMsTeamParams struct { - - // Specifies a list of Microsoft 365 Teams params associated with objects to recover. - // Required: true - Objects []*ObjectMsTeamParam `json:"objects"` - - // This field is deprecated. Specifies target team nickname in case restoreToOriginal is false. - TargetTeamNickName *string `json:"targetTeamNickName,omitempty"` - - // This field is deprecated. Specifies target team name in case restoreToOriginal is false. This will be ignored if restoring to alternate existing team (i.e. to a team the nickname of which is same as the one supplied by the end user). - TargetTeamFullName *string `json:"targetTeamFullName,omitempty"` - - // Specifies whether or not all Microsoft 365 Teams are restored to original location. - RestoreToOriginal *bool `json:"restoreToOriginal,omitempty"` - - // Specifies to create new team in case the target team doesn't exists in case restoreToOriginal is false. - CreateNewTeam *bool `json:"createNewTeam,omitempty"` - - // Specifies the target team name in case restoreToOriginal is false. - TargetTeamName *string `json:"targetTeamName,omitempty"` - - // Specifies if the original members/owners should be part of the newly created target team or not. - RestoreOriginalOwners *bool `json:"restoreOriginalOwners,omitempty"` - - // Specifies whether to continue recovering other teams, if some of the teams fail to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // This field is deprecated. Use targetTeamNickName and targetTeamFullName instead. - TargetMsTeam *TargetMsTeamParam `json:"targetMsTeam,omitempty"` - - // Specifies the ms team target parameters in case of restoreToOriginal is false. - TargetMsTeamParam *TargetMsTeamParam `json:"targetMsTeamParam,omitempty"` - - // Specifies the additional owner entity info for the selected target team. - TargetTeamOwner *RecoveryObjectIdentifier `json:"targetTeamOwner,omitempty"` -} - -// Validate validates this recover ms team params -func (m *RecoverMsTeamParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMsTeam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetMsTeamParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetTeamOwner(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMsTeamParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverMsTeamParams) validateTargetMsTeam(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMsTeam) { // not required - return nil - } - - if m.TargetMsTeam != nil { - if err := m.TargetMsTeam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeam") - } - return err - } - } - - return nil -} - -func (m *RecoverMsTeamParams) validateTargetMsTeamParam(formats strfmt.Registry) error { - if swag.IsZero(m.TargetMsTeamParam) { // not required - return nil - } - - if m.TargetMsTeamParam != nil { - if err := m.TargetMsTeamParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeamParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeamParam") - } - return err - } - } - - return nil -} - -func (m *RecoverMsTeamParams) validateTargetTeamOwner(formats strfmt.Registry) error { - if swag.IsZero(m.TargetTeamOwner) { // not required - return nil - } - - if m.TargetTeamOwner != nil { - if err := m.TargetTeamOwner.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamOwner") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamOwner") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover ms team params based on the context it is used -func (m *RecoverMsTeamParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMsTeam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetMsTeamParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetTeamOwner(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverMsTeamParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverMsTeamParams) contextValidateTargetMsTeam(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMsTeam != nil { - - if swag.IsZero(m.TargetMsTeam) { // not required - return nil - } - - if err := m.TargetMsTeam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeam") - } - return err - } - } - - return nil -} - -func (m *RecoverMsTeamParams) contextValidateTargetMsTeamParam(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetMsTeamParam != nil { - - if swag.IsZero(m.TargetMsTeamParam) { // not required - return nil - } - - if err := m.TargetMsTeamParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetMsTeamParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetMsTeamParam") - } - return err - } - } - - return nil -} - -func (m *RecoverMsTeamParams) contextValidateTargetTeamOwner(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetTeamOwner != nil { - - if swag.IsZero(m.TargetTeamOwner) { // not required - return nil - } - - if err := m.TargetTeamOwner.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamOwner") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamOwner") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverMsTeamParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverMsTeamParams) UnmarshalBinary(b []byte) error { - var res RecoverMsTeamParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_nas_volume_to_view_params.go b/v2/models/recover_nas_volume_to_view_params.go deleted file mode 100644 index b7a9bf51..00000000 --- a/v2/models/recover_nas_volume_to_view_params.go +++ /dev/null @@ -1,165 +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" -) - -// RecoverNasVolumeToViewParams Recover NAS Volume as View Params. -// -// Specifies the recovery target configuration if NAS volumes are being recovered as a Cohesity view. -// -// swagger:model RecoverNasVolumeToViewParams -type RecoverNasVolumeToViewParams struct { - - // Specifies the name of the view. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the QoS policy, which defines the principal and priority of the NAS recovery. - QosPolicy *NasQosPolicy `json:"qosPolicy,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this recover nas volume to view params -func (m *RecoverNasVolumeToViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateQosPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNasVolumeToViewParams) validateQosPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - if m.QosPolicy != nil { - if err := m.QosPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosPolicy") - } - return err - } - } - - return nil -} - -func (m *RecoverNasVolumeToViewParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover nas volume to view params based on the context it is used -func (m *RecoverNasVolumeToViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateQosPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNasVolumeToViewParams) contextValidateQosPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.QosPolicy != nil { - - if swag.IsZero(m.QosPolicy) { // not required - return nil - } - - if err := m.QosPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qosPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qosPolicy") - } - return err - } - } - - return nil -} - -func (m *RecoverNasVolumeToViewParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNasVolumeToViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNasVolumeToViewParams) UnmarshalBinary(b []byte) error { - var res RecoverNasVolumeToViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_netapp_files_params.go b/v2/models/recover_netapp_files_params.go deleted file mode 100644 index bf8d166b..00000000 --- a/v2/models/recover_netapp_files_params.go +++ /dev/null @@ -1,500 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverNetappFilesParams Recover Netapp files Params. -// -// Specifies the parameters to recover Netapp files. -// -// swagger:model RecoverNetappFilesParams -type RecoverNetappFilesParams struct { - - // Specifies the list of info about the netapp files and folders to be recovered. - // Required: true - FilesAndFolders []*NetappRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies if the snapshot trying to recover is from a source initiated protection. - IsFromSourceInitiatedProtection *bool `json:"isFromSourceInitiatedProtection,omitempty"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileFilesTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeFilesTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasFilesTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsFilesTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonFilesTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for a Netapp recovery target. - NetappTargetParams *RecoverNetappToNetappFilesTargetParams `json:"netappTargetParams,omitempty"` -} - -// Validate validates this recover netapp files params -func (m *RecoverNetappFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverNetappFilesParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverNetappFilesParamsTypeTargetEnvironmentPropEnum = append(recoverNetappFilesParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverNetappFilesParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverNetappFilesParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverNetappFilesParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverNetappFilesParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverNetappFilesParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverNetappFilesParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverNetappFilesParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverNetappFilesParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverNetappFilesParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverNetappFilesParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverNetappFilesParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverNetappFilesParamsTargetEnvironmentKNetapp string = "kNetapp" -) - -// prop value enum -func (m *RecoverNetappFilesParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverNetappFilesParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverNetappFilesParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover netapp files params based on the context it is used -func (m *RecoverNetappFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappFilesParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNetappFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNetappFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverNetappFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_netapp_nas_volume_params.go b/v2/models/recover_netapp_nas_volume_params.go deleted file mode 100644 index d5c49a5a..00000000 --- a/v2/models/recover_netapp_nas_volume_params.go +++ /dev/null @@ -1,489 +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" -) - -// RecoverNetappNasVolumeParams Recover Netapp NAS Volume Params. -// -// Specifies the parameters to recover Netapp NAS volumes. -// -// swagger:model RecoverNetappNasVolumeParams -type RecoverNetappNasVolumeParams struct { - - // Specifies if the snapshot trying to recover is from a source initiated protection. - IsFromSourceInitiatedProtection *bool `json:"isFromSourceInitiatedProtection,omitempty"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for an Elastifile recovery target. - ElastifileTargetParams *RecoverOtherNasToElastifileVolumeTargetParams `json:"elastifileTargetParams,omitempty"` - - // Specifies the params for a Flashblade recovery target. - FlashbladeTargetParams *RecoverOtherNasToFlashbladeVolumeTargetParams `json:"flashbladeTargetParams,omitempty"` - - // Specifies the params for a generic NAS recovery target. - GenericNasTargetParams *RecoverOtherNasToGenericNasVolumeTargetParams `json:"genericNasTargetParams,omitempty"` - - // Specifies the params for a GPFS recovery target. - GpfsTargetParams *RecoverOtherNasToGpfsVolumeTargetParams `json:"gpfsTargetParams,omitempty"` - - // Specifies the params for an Isilon recovery target. - IsilonTargetParams *RecoverOtherNasToIsilonVolumeTargetParams `json:"isilonTargetParams,omitempty"` - - // Specifies the params for a Netapp recovery target. - NetappTargetParams *RecoverNetappToNetappVolumeTargetParams `json:"netappTargetParams,omitempty"` - - // Specifies the params for a Cohesity view recovery target. - ViewTargetParams *RecoverNasVolumeToViewParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover netapp nas volume params -func (m *RecoverNetappNasVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverNetappNasVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kElastifile","kFlashBlade","kGenericNas","kGPFS","kIsilon","kNetapp","kView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverNetappNasVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverNetappNasVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverNetappNasVolumeParamsTargetEnvironmentKElastifile captures enum value "kElastifile" - RecoverNetappNasVolumeParamsTargetEnvironmentKElastifile string = "kElastifile" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKFlashBlade captures enum value "kFlashBlade" - RecoverNetappNasVolumeParamsTargetEnvironmentKFlashBlade string = "kFlashBlade" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKGenericNas captures enum value "kGenericNas" - RecoverNetappNasVolumeParamsTargetEnvironmentKGenericNas string = "kGenericNas" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKGPFS captures enum value "kGPFS" - RecoverNetappNasVolumeParamsTargetEnvironmentKGPFS string = "kGPFS" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKIsilon captures enum value "kIsilon" - RecoverNetappNasVolumeParamsTargetEnvironmentKIsilon string = "kIsilon" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKNetapp captures enum value "kNetapp" - RecoverNetappNasVolumeParamsTargetEnvironmentKNetapp string = "kNetapp" - - // RecoverNetappNasVolumeParamsTargetEnvironmentKView captures enum value "kView" - RecoverNetappNasVolumeParamsTargetEnvironmentKView string = "kView" -) - -// prop value enum -func (m *RecoverNetappNasVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverNetappNasVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateElastifileTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if m.ElastifileTargetParams != nil { - if err := m.ElastifileTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateFlashbladeTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if m.FlashbladeTargetParams != nil { - if err := m.FlashbladeTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateGenericNasTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if m.GenericNasTargetParams != nil { - if err := m.GenericNasTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateGpfsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if m.GpfsTargetParams != nil { - if err := m.GpfsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateIsilonTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if m.IsilonTargetParams != nil { - if err := m.IsilonTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateNetappTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if m.NetappTargetParams != nil { - if err := m.NetappTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover netapp nas volume params based on the context it is used -func (m *RecoverNetappNasVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElastifileTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateElastifileTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileTargetParams != nil { - - if swag.IsZero(m.ElastifileTargetParams) { // not required - return nil - } - - if err := m.ElastifileTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateFlashbladeTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeTargetParams != nil { - - if swag.IsZero(m.FlashbladeTargetParams) { // not required - return nil - } - - if err := m.FlashbladeTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateGenericNasTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasTargetParams != nil { - - if swag.IsZero(m.GenericNasTargetParams) { // not required - return nil - } - - if err := m.GenericNasTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateGpfsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsTargetParams != nil { - - if swag.IsZero(m.GpfsTargetParams) { // not required - return nil - } - - if err := m.GpfsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateIsilonTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonTargetParams != nil { - - if swag.IsZero(m.IsilonTargetParams) { // not required - return nil - } - - if err := m.IsilonTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateNetappTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappTargetParams != nil { - - if swag.IsZero(m.NetappTargetParams) { // not required - return nil - } - - if err := m.NetappTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappNasVolumeParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNetappNasVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNetappNasVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverNetappNasVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_netapp_params.go b/v2/models/recover_netapp_params.go deleted file mode 100644 index 6940bfa0..00000000 --- a/v2/models/recover_netapp_params.go +++ /dev/null @@ -1,332 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverNetappParams Recover Netapp Params. -// -// Specifies the recovery options specific to Netapp environment. -// -// swagger:model RecoverNetappParams -type RecoverNetappParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverNasVolume","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverNetappFilesParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Nas Volumes. - RecoverNasVolumeParams *RecoverNetappNasVolumeParams `json:"recoverNasVolumeParams,omitempty"` -} - -// Validate validates this recover netapp params -func (m *RecoverNetappParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverNasVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverNetappParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverNasVolume","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverNetappParamsTypeRecoveryActionPropEnum = append(recoverNetappParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverNetappParamsRecoveryActionRecoverNasVolume captures enum value "RecoverNasVolume" - RecoverNetappParamsRecoveryActionRecoverNasVolume string = "RecoverNasVolume" - - // RecoverNetappParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverNetappParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverNetappParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverNetappParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverNetappParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverNetappParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappParams) validateRecoverNasVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if m.RecoverNasVolumeParams != nil { - if err := m.RecoverNasVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover netapp params based on the context it is used -func (m *RecoverNetappParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverNasVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverNetappParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappParams) contextValidateRecoverNasVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverNasVolumeParams != nil { - - if swag.IsZero(m.RecoverNasVolumeParams) { // not required - return nil - } - - if err := m.RecoverNasVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverNasVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverNasVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNetappParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNetappParams) UnmarshalBinary(b []byte) error { - var res RecoverNetappParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_netapp_to_netapp_files_target_params.go b/v2/models/recover_netapp_to_netapp_files_target_params.go deleted file mode 100644 index 049ad27d..00000000 --- a/v2/models/recover_netapp_to_netapp_files_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverNetappToNetappFilesTargetParams Recover Netapp To Netapp Files Target Params. -// -// Specifies the params of the Netapp recovery target. -// -// swagger:model RecoverNetappToNetappFilesTargetParams -type RecoverNetappToNetappFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Netapp target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the files will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToNetappFilesTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if files are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalNetappFilesTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover netapp to netapp files target params -func (m *RecoverNetappToNetappFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappToNetappFilesTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverNetappToNetappFilesTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappToNetappFilesTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover netapp to netapp files target params based on the context it is used -func (m *RecoverNetappToNetappFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappToNetappFilesTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappToNetappFilesTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNetappToNetappFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNetappToNetappFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverNetappToNetappFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_netapp_to_netapp_volume_target_params.go b/v2/models/recover_netapp_to_netapp_volume_target_params.go deleted file mode 100644 index 0c995158..00000000 --- a/v2/models/recover_netapp_to_netapp_volume_target_params.go +++ /dev/null @@ -1,180 +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" -) - -// RecoverNetappToNetappVolumeTargetParams Recover Netapp To Netapp Volume Target Params. -// -// Specifies the params of the Netapp recovery target. -// -// swagger:model RecoverNetappToNetappVolumeTargetParams -type RecoverNetappToNetappVolumeTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original Netapp target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the volumes will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverOtherNasToNetappVolumeTargetParams `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if volumes are being recovered to original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *OriginalNetappTargetParams `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover netapp to netapp volume target params -func (m *RecoverNetappToNetappVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappToNetappVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverNetappToNetappVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappToNetappVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover netapp to netapp volume target params based on the context it is used -func (m *RecoverNetappToNetappVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverNetappToNetappVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverNetappToNetappVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverNetappToNetappVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverNetappToNetappVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverNetappToNetappVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_o365_params.go b/v2/models/recover_o365_params.go deleted file mode 100644 index d468d2cf..00000000 --- a/v2/models/recover_o365_params.go +++ /dev/null @@ -1,603 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverO365Params Recover Office 365 environment params. -// -// Specifies the recovery options specific to Office 365 environment. -// -// swagger:model RecoverO365Params -type RecoverO365Params struct { - - // Specifies the list of recover Object parameters. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the download chats specific parameters for downloading posts for a team/channel or downloading private chats for a user. - DownloadChatsParams *DownloadChatsParams `json:"downloadChatsParams,omitempty"` - - // Specifies the recovery information to download files and folders. For instance, downloading mailbox items as PST. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Office 365 Mailbox. - RecoverMailboxParams *RecoverMailboxParams `json:"recoverMailboxParams,omitempty"` - - // Specifies the parameters to recover Microsoft 365 Group. - RecoverMsGroupParams *RecoverMsGroupParams `json:"recoverMsGroupParams,omitempty"` - - // Specifies the parameters to recover Microsoft 365 Teams. - RecoverMsTeamParams *RecoverMsTeamParams `json:"recoverMsTeamParams,omitempty"` - - // Specifies the parameters to recover Office 365 One Drive. - RecoverOneDriveParams *RecoverOneDriveParams `json:"recoverOneDriveParams,omitempty"` - - // Specifies the parameters to recover Office 365 Public Folders. - RecoverPublicFoldersParams *RecoverPublicFoldersParams `json:"recoverPublicFoldersParams,omitempty"` - - // Specifies the parameters to recover Microsoft Office 365 Sharepoint Site. - RecoverSiteParams *RecoverSiteParams `json:"recoverSiteParams,omitempty"` -} - -// Validate validates this recover o365 params -func (m *RecoverO365Params) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadChatsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverMailboxParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverMsGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverMsTeamParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverOneDriveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverPublicFoldersParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverSiteParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverO365Params) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverO365ParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverO365ParamsTypeRecoveryActionPropEnum = append(recoverO365ParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverO365ParamsRecoveryActionRecoverMailbox captures enum value "RecoverMailbox" - RecoverO365ParamsRecoveryActionRecoverMailbox string = "RecoverMailbox" - - // RecoverO365ParamsRecoveryActionRecoverOneDrive captures enum value "RecoverOneDrive" - RecoverO365ParamsRecoveryActionRecoverOneDrive string = "RecoverOneDrive" - - // RecoverO365ParamsRecoveryActionRecoverSharePoint captures enum value "RecoverSharePoint" - RecoverO365ParamsRecoveryActionRecoverSharePoint string = "RecoverSharePoint" - - // RecoverO365ParamsRecoveryActionRecoverPublicFolders captures enum value "RecoverPublicFolders" - RecoverO365ParamsRecoveryActionRecoverPublicFolders string = "RecoverPublicFolders" - - // RecoverO365ParamsRecoveryActionRecoverMsGroup captures enum value "RecoverMsGroup" - RecoverO365ParamsRecoveryActionRecoverMsGroup string = "RecoverMsGroup" - - // RecoverO365ParamsRecoveryActionRecoverMsTeam captures enum value "RecoverMsTeam" - RecoverO365ParamsRecoveryActionRecoverMsTeam string = "RecoverMsTeam" - - // RecoverO365ParamsRecoveryActionConvertToPst captures enum value "ConvertToPst" - RecoverO365ParamsRecoveryActionConvertToPst string = "ConvertToPst" - - // RecoverO365ParamsRecoveryActionDownloadChats captures enum value "DownloadChats" - RecoverO365ParamsRecoveryActionDownloadChats string = "DownloadChats" -) - -// prop value enum -func (m *RecoverO365Params) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverO365ParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverO365Params) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverO365Params) validateDownloadChatsParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if m.DownloadChatsParams != nil { - if err := m.DownloadChatsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverMailboxParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverMailboxParams) { // not required - return nil - } - - if m.RecoverMailboxParams != nil { - if err := m.RecoverMailboxParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMailboxParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverMsGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverMsGroupParams) { // not required - return nil - } - - if m.RecoverMsGroupParams != nil { - if err := m.RecoverMsGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMsGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMsGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverMsTeamParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverMsTeamParams) { // not required - return nil - } - - if m.RecoverMsTeamParams != nil { - if err := m.RecoverMsTeamParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMsTeamParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMsTeamParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverOneDriveParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverOneDriveParams) { // not required - return nil - } - - if m.RecoverOneDriveParams != nil { - if err := m.RecoverOneDriveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverOneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverOneDriveParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverPublicFoldersParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverPublicFoldersParams) { // not required - return nil - } - - if m.RecoverPublicFoldersParams != nil { - if err := m.RecoverPublicFoldersParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverPublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverPublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) validateRecoverSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverSiteParams) { // not required - return nil - } - - if m.RecoverSiteParams != nil { - if err := m.RecoverSiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSiteParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover o365 params based on the context it is used -func (m *RecoverO365Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadChatsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverMailboxParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverMsGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverMsTeamParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverOneDriveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverPublicFoldersParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverO365Params) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverO365Params) contextValidateDownloadChatsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadChatsParams != nil { - - if swag.IsZero(m.DownloadChatsParams) { // not required - return nil - } - - if err := m.DownloadChatsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadChatsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadChatsParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverMailboxParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverMailboxParams != nil { - - if swag.IsZero(m.RecoverMailboxParams) { // not required - return nil - } - - if err := m.RecoverMailboxParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMailboxParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverMsGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverMsGroupParams != nil { - - if swag.IsZero(m.RecoverMsGroupParams) { // not required - return nil - } - - if err := m.RecoverMsGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMsGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMsGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverMsTeamParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverMsTeamParams != nil { - - if swag.IsZero(m.RecoverMsTeamParams) { // not required - return nil - } - - if err := m.RecoverMsTeamParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverMsTeamParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverMsTeamParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverOneDriveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverOneDriveParams != nil { - - if swag.IsZero(m.RecoverOneDriveParams) { // not required - return nil - } - - if err := m.RecoverOneDriveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverOneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverOneDriveParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverPublicFoldersParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverPublicFoldersParams != nil { - - if swag.IsZero(m.RecoverPublicFoldersParams) { // not required - return nil - } - - if err := m.RecoverPublicFoldersParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverPublicFoldersParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverPublicFoldersParams") - } - return err - } - } - - return nil -} - -func (m *RecoverO365Params) contextValidateRecoverSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverSiteParams != nil { - - if swag.IsZero(m.RecoverSiteParams) { // not required - return nil - } - - if err := m.RecoverSiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSiteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSiteParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverO365Params) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverO365Params) UnmarshalBinary(b []byte) error { - var res RecoverO365Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_one_drive_params.go b/v2/models/recover_one_drive_params.go deleted file mode 100644 index 89cca917..00000000 --- a/v2/models/recover_one_drive_params.go +++ /dev/null @@ -1,184 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverOneDriveParams Specifies the parameters to recover an Office 365 OneDrive. -// -// swagger:model RecoverOneDriveParams -type RecoverOneDriveParams struct { - - // Specifies a list of OneDrive params associated with the objects to recover. These parameters allow overriding the request level 'recoverUserDefaultDrive' parameter for each object specified here. - // Required: true - Objects []*ObjectOneDriveParam `json:"objects"` - - // Specifies whether to continue recovering other OneDrive items if one of items failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to recover Preservation Hold Library associated with the OneDrives selected for restore. Default value is false. - RecoverPreservationHoldLibrary *bool `json:"recoverPreservationHoldLibrary,omitempty"` - - // Specifies whether to recover default drives associated with the OneDrives selected for restore. Default value is true. This setting can be overridden for each object selected for recovery, by specifying 'recoverEntireDrive' for the desired drive within 'oneDriveParams'. Granular recovery is still allowed even if this value is set to true. - RecoverUserDefaultDrive *bool `json:"recoverUserDefaultDrive,omitempty"` - - // Specifies the target OneDrive to recover to. If not specified, the objects will be recovered to original location. - TargetDrive *TargetOneDriveParam `json:"targetDrive,omitempty"` -} - -// Validate validates this recover one drive params -func (m *RecoverOneDriveParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetDrive(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOneDriveParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverOneDriveParams) validateTargetDrive(formats strfmt.Registry) error { - if swag.IsZero(m.TargetDrive) { // not required - return nil - } - - if m.TargetDrive != nil { - if err := m.TargetDrive.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDrive") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDrive") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover one drive params based on the context it is used -func (m *RecoverOneDriveParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetDrive(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOneDriveParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverOneDriveParams) contextValidateTargetDrive(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetDrive != nil { - - if swag.IsZero(m.TargetDrive) { // not required - return nil - } - - if err := m.TargetDrive.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDrive") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDrive") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOneDriveParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOneDriveParams) UnmarshalBinary(b []byte) error { - var res RecoverOneDriveParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_app_new_source_config.go b/v2/models/recover_oracle_app_new_source_config.go deleted file mode 100644 index 7852c767..00000000 --- a/v2/models/recover_oracle_app_new_source_config.go +++ /dev/null @@ -1,263 +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" -) - -// RecoverOracleAppNewSourceConfig Recover Oracle App New Source Config. -// -// Specifies the new destination Source configuration where the databases will be recovered. -// -// swagger:model RecoverOracleAppNewSourceConfig -type RecoverOracleAppNewSourceConfig struct { - - // Specifies if recovery target is a database or a view. - // Enum: ["RecoverDatabase","RecoverView"] - RecoveryTarget *string `json:"recoveryTarget,omitempty"` - - // Specifies the source id of target host where databases will be recovered. This source id can be a physical host or virtual machine. - // Required: true - Host *RecoveryObjectIdentifier `json:"host"` - - // Specifies recovery parameters when recovering to a database - RecoverDatabaseParams *RecoverOracleNewTargetDatabaseConfig `json:"recoverDatabaseParams,omitempty"` - - // Specifies recovery parameters when recovering to a view. - RecoverViewParams *RecoverOracleNewTargetViewConfig `json:"recoverViewParams,omitempty"` -} - -// Validate validates this recover oracle app new source config -func (m *RecoverOracleAppNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverDatabaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverViewParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverOracleAppNewSourceConfigTypeRecoveryTargetPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverDatabase","RecoverView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverOracleAppNewSourceConfigTypeRecoveryTargetPropEnum = append(recoverOracleAppNewSourceConfigTypeRecoveryTargetPropEnum, v) - } -} - -const ( - - // RecoverOracleAppNewSourceConfigRecoveryTargetRecoverDatabase captures enum value "RecoverDatabase" - RecoverOracleAppNewSourceConfigRecoveryTargetRecoverDatabase string = "RecoverDatabase" - - // RecoverOracleAppNewSourceConfigRecoveryTargetRecoverView captures enum value "RecoverView" - RecoverOracleAppNewSourceConfigRecoveryTargetRecoverView string = "RecoverView" -) - -// prop value enum -func (m *RecoverOracleAppNewSourceConfig) validateRecoveryTargetEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverOracleAppNewSourceConfigTypeRecoveryTargetPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) validateRecoveryTarget(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTarget) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryTargetEnum("recoveryTarget", "body", *m.RecoveryTarget); err != nil { - return err - } - - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) validateRecoverDatabaseParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverDatabaseParams) { // not required - return nil - } - - if m.RecoverDatabaseParams != nil { - if err := m.RecoverDatabaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverDatabaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverDatabaseParams") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) validateRecoverViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverViewParams) { // not required - return nil - } - - if m.RecoverViewParams != nil { - if err := m.RecoverViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverViewParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle app new source config based on the context it is used -func (m *RecoverOracleAppNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverDatabaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) contextValidateRecoverDatabaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverDatabaseParams != nil { - - if swag.IsZero(m.RecoverDatabaseParams) { // not required - return nil - } - - if err := m.RecoverDatabaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverDatabaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverDatabaseParams") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppNewSourceConfig) contextValidateRecoverViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverViewParams != nil { - - if swag.IsZero(m.RecoverViewParams) { // not required - return nil - } - - if err := m.RecoverViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverViewParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleAppNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleAppNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverOracleAppNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_app_original_source_config.go b/v2/models/recover_oracle_app_original_source_config.go deleted file mode 100644 index 821c4b1d..00000000 --- a/v2/models/recover_oracle_app_original_source_config.go +++ /dev/null @@ -1,152 +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" -) - -// RecoverOracleAppOriginalSourceConfig Recover Oracle App Original Source Config. -// -// Specifies the additional Source configuration parameters when databases will be recovered to original location. -// -// swagger:model RecoverOracleAppOriginalSourceConfig -type RecoverOracleAppOriginalSourceConfig struct { - CommonOracleAppSourceConfig - - // List of archive logs to apply on Database after overwrite restore. - RollForwardLogPathVec []string `json:"rollForwardLogPathVec"` - - // Whether or not this is a complete recovery attempt. - AttemptCompleteRecovery *bool `json:"attemptCompleteRecovery,omitempty"` - - // UTC time in msecs till which we have to roll-forward the database. - RollForwardTimeMsecs *int64 `json:"rollForwardTimeMsecs,omitempty"` - - // Specifies whether allowed to automatically stop active passive resource. - StopActivePassive *bool `json:"stopActivePassive,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverOracleAppOriginalSourceConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleAppSourceConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleAppSourceConfig = aO0 - - // now for regular properties - var propsRecoverOracleAppOriginalSourceConfig struct { - RollForwardLogPathVec []string `json:"rollForwardLogPathVec"` - - AttemptCompleteRecovery *bool `json:"attemptCompleteRecovery,omitempty"` - - RollForwardTimeMsecs *int64 `json:"rollForwardTimeMsecs,omitempty"` - - StopActivePassive *bool `json:"stopActivePassive,omitempty"` - } - if err := swag.ReadJSON(raw, &propsRecoverOracleAppOriginalSourceConfig); err != nil { - return err - } - m.RollForwardLogPathVec = propsRecoverOracleAppOriginalSourceConfig.RollForwardLogPathVec - - m.AttemptCompleteRecovery = propsRecoverOracleAppOriginalSourceConfig.AttemptCompleteRecovery - - m.RollForwardTimeMsecs = propsRecoverOracleAppOriginalSourceConfig.RollForwardTimeMsecs - - m.StopActivePassive = propsRecoverOracleAppOriginalSourceConfig.StopActivePassive - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverOracleAppOriginalSourceConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonOracleAppSourceConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsRecoverOracleAppOriginalSourceConfig struct { - RollForwardLogPathVec []string `json:"rollForwardLogPathVec"` - - AttemptCompleteRecovery *bool `json:"attemptCompleteRecovery,omitempty"` - - RollForwardTimeMsecs *int64 `json:"rollForwardTimeMsecs,omitempty"` - - StopActivePassive *bool `json:"stopActivePassive,omitempty"` - } - propsRecoverOracleAppOriginalSourceConfig.RollForwardLogPathVec = m.RollForwardLogPathVec - - propsRecoverOracleAppOriginalSourceConfig.AttemptCompleteRecovery = m.AttemptCompleteRecovery - - propsRecoverOracleAppOriginalSourceConfig.RollForwardTimeMsecs = m.RollForwardTimeMsecs - - propsRecoverOracleAppOriginalSourceConfig.StopActivePassive = m.StopActivePassive - - jsonDataPropsRecoverOracleAppOriginalSourceConfig, errRecoverOracleAppOriginalSourceConfig := swag.WriteJSON(propsRecoverOracleAppOriginalSourceConfig) - if errRecoverOracleAppOriginalSourceConfig != nil { - return nil, errRecoverOracleAppOriginalSourceConfig - } - _parts = append(_parts, jsonDataPropsRecoverOracleAppOriginalSourceConfig) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover oracle app original source config -func (m *RecoverOracleAppOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this recover oracle app original source config based on the context it is used -func (m *RecoverOracleAppOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleAppOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleAppOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverOracleAppOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_app_params.go b/v2/models/recover_oracle_app_params.go deleted file mode 100644 index 33dc93b8..00000000 --- a/v2/models/recover_oracle_app_params.go +++ /dev/null @@ -1,213 +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" -) - -// RecoverOracleAppParams Recover Oracle DB params. -// -// Specifies the parameters to recover Oracle databases. -// -// swagger:model RecoverOracleAppParams -type RecoverOracleAppParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kOracle"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a oracle host. Provided oracle backup should be recovered to same type of target host. For Example: If you have oracle backup taken from a physical host then that should be recovered to physical host only. - OracleTargetParams *OracleTargetParamsForRecoverOracleApp `json:"oracleTargetParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this recover oracle app params -func (m *RecoverOracleAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleTargetParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverOracleAppParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverOracleAppParamsTypeTargetEnvironmentPropEnum = append(recoverOracleAppParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverOracleAppParamsTargetEnvironmentKOracle captures enum value "kOracle" - RecoverOracleAppParamsTargetEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *RecoverOracleAppParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverOracleAppParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverOracleAppParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverOracleAppParams) validateOracleTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.OracleTargetParams) { // not required - return nil - } - - if m.OracleTargetParams != nil { - if err := m.OracleTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle app params based on the context it is used -func (m *RecoverOracleAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOracleTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleAppParams) contextValidateOracleTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleTargetParams != nil { - - if swag.IsZero(m.OracleTargetParams) { // not required - return nil - } - - if err := m.OracleTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTargetParams") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleAppParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleAppParams) UnmarshalBinary(b []byte) error { - var res RecoverOracleAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_db_snapshot_params.go b/v2/models/recover_oracle_db_snapshot_params.go deleted file mode 100644 index 8f73fd9d..00000000 --- a/v2/models/recover_oracle_db_snapshot_params.go +++ /dev/null @@ -1,169 +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" -) - -// RecoverOracleDbSnapshotParams Recover Oracle database Snapshot Params. -// -// Specifies the snapshot parameters to recover Oracle databases. -// -// swagger:model RecoverOracleDbSnapshotParams -type RecoverOracleDbSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the info about instant recovery. This is only applicable for RecoverOracle. - // Read Only: true - InstantRecoveryInfo *RecoveryOracleTaskInfo `json:"instantRecoveryInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverOracleDbSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - InstantRecoveryInfo *RecoveryOracleTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.InstantRecoveryInfo = dataAO1.InstantRecoveryInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverOracleDbSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - InstantRecoveryInfo *RecoveryOracleTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - - dataAO1.InstantRecoveryInfo = m.InstantRecoveryInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover oracle db snapshot params -func (m *RecoverOracleDbSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstantRecoveryInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleDbSnapshotParams) validateInstantRecoveryInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if m.InstantRecoveryInfo != nil { - if err := m.InstantRecoveryInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle db snapshot params based on the context it is used -func (m *RecoverOracleDbSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstantRecoveryInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleDbSnapshotParams) contextValidateInstantRecoveryInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.InstantRecoveryInfo != nil { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if err := m.InstantRecoveryInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleDbSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleDbSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverOracleDbSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_granular_restore_info.go b/v2/models/recover_oracle_granular_restore_info.go deleted file mode 100644 index 2c3cccb7..00000000 --- a/v2/models/recover_oracle_granular_restore_info.go +++ /dev/null @@ -1,160 +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" -) - -// RecoverOracleGranularRestoreInfo Recover Oracle Granular Restore Information -// -// Specifies information about list of objects (PDBs) to restore. -// -// swagger:model RecoverOracleGranularRestoreInfo -type RecoverOracleGranularRestoreInfo struct { - - // Specifies type of granular restore. - // Enum: ["kPDB"] - GranularityType *string `json:"granularityType,omitempty"` - - // Specifies information about the list of pdbs to be restored. - PdbRestoreParams *OraclePdbRestoreParams `json:"pdbRestoreParams,omitempty"` -} - -// Validate validates this recover oracle granular restore info -func (m *RecoverOracleGranularRestoreInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGranularityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePdbRestoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverOracleGranularRestoreInfoTypeGranularityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPDB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverOracleGranularRestoreInfoTypeGranularityTypePropEnum = append(recoverOracleGranularRestoreInfoTypeGranularityTypePropEnum, v) - } -} - -const ( - - // RecoverOracleGranularRestoreInfoGranularityTypeKPDB captures enum value "kPDB" - RecoverOracleGranularRestoreInfoGranularityTypeKPDB string = "kPDB" -) - -// prop value enum -func (m *RecoverOracleGranularRestoreInfo) validateGranularityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverOracleGranularRestoreInfoTypeGranularityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverOracleGranularRestoreInfo) validateGranularityType(formats strfmt.Registry) error { - if swag.IsZero(m.GranularityType) { // not required - return nil - } - - // value enum - if err := m.validateGranularityTypeEnum("granularityType", "body", *m.GranularityType); err != nil { - return err - } - - return nil -} - -func (m *RecoverOracleGranularRestoreInfo) validatePdbRestoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.PdbRestoreParams) { // not required - return nil - } - - if m.PdbRestoreParams != nil { - if err := m.PdbRestoreParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbRestoreParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle granular restore info based on the context it is used -func (m *RecoverOracleGranularRestoreInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePdbRestoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleGranularRestoreInfo) contextValidatePdbRestoreParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PdbRestoreParams != nil { - - if swag.IsZero(m.PdbRestoreParams) { // not required - return nil - } - - if err := m.PdbRestoreParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pdbRestoreParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pdbRestoreParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleGranularRestoreInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleGranularRestoreInfo) UnmarshalBinary(b []byte) error { - var res RecoverOracleGranularRestoreInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_new_target_database_config.go b/v2/models/recover_oracle_new_target_database_config.go deleted file mode 100644 index a4161c38..00000000 --- a/v2/models/recover_oracle_new_target_database_config.go +++ /dev/null @@ -1,501 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverOracleNewTargetDatabaseConfig Recover Oracle App New Database Target Config. -// -// Specifies recovery parameters when recovering to a database. -// -// swagger:model RecoverOracleNewTargetDatabaseConfig -type RecoverOracleNewTargetDatabaseConfig struct { - CommonOracleAppSourceConfig - - // Specifies a new name for the restored database. If this field is not specified, then the original database will be overwritten after recovery. - DatabaseName *string `json:"databaseName,omitempty"` - - // Specifies the oracle base folder at selected host. - OracleBaseFolder *string `json:"oracleBaseFolder,omitempty"` - - // Specifies the oracle home folder at selected host. - OracleHomeFolder *string `json:"oracleHomeFolder,omitempty"` - - // Specifies the location to restore database files. - DbFilesDestination *string `json:"dbFilesDestination,omitempty"` - - // Specifies the config file path on selected host which configures the restored database. - DbConfigFilePath *string `json:"dbConfigFilePath,omitempty"` - - // Specifies archive log mode for oracle restore. - EnableArchiveLogMode *bool `json:"enableArchiveLogMode,omitempty"` - - // Specifies a key value pair for pfile parameters. - PfileParameterMap []*KeyValuePair `json:"pfileParameterMap"` - - // Specifies BCT file path. - BctFilePath *string `json:"bctFilePath,omitempty"` - - // Specifies no. of tempfiles to be used for the recovered database. - NumTempfiles *int32 `json:"numTempfiles,omitempty"` - - // Specifies whether this task is a multistage restore task. If set, we migrate the DB after clone completes. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // Whether or not to skip the nid step in Oracle Clone workflow. Applicable to both smart and old clone workflow. - SkipCloneNid *bool `json:"skipCloneNid,omitempty"` - - // Specifies whether to validate filenames or not in Oracle alternate restore workflow. - NoFilenameCheck *bool `json:"noFilenameCheck,omitempty"` - - // Specifies newname clause for db files which allows user to have full control on how their database files can be renamed during the oracle alternate restore workflow. - NewNameClause *string `json:"newNameClause,omitempty"` - - // Oracle Disaster Recovery parameters. - // - // Specifies the parameters that are needed for Disaster Recovery of a database to its production configuration. - DisasterRecoveryOptions *DisasterRecoveryOptions `json:"disasterRecoveryOptions,omitempty"` - - // Whether or not to restore to a RAC database. - RestoreToRac *bool `json:"restoreToRac,omitempty"` - - // Specifies the parameters that are needed for updating oracle restore options. - OracleUpdateRestoreOptions *MigrateCloneParams `json:"oracleUpdateRestoreOptions,omitempty"` - - // Specifies redo log config. - RedoLogConfig *RedoLogGroupConfig `json:"redoLogConfig,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverOracleNewTargetDatabaseConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleAppSourceConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleAppSourceConfig = aO0 - - // now for regular properties - var propsRecoverOracleNewTargetDatabaseConfig struct { - DatabaseName *string `json:"databaseName,omitempty"` - - OracleBaseFolder *string `json:"oracleBaseFolder,omitempty"` - - OracleHomeFolder *string `json:"oracleHomeFolder,omitempty"` - - DbFilesDestination *string `json:"dbFilesDestination,omitempty"` - - DbConfigFilePath *string `json:"dbConfigFilePath,omitempty"` - - EnableArchiveLogMode *bool `json:"enableArchiveLogMode,omitempty"` - - PfileParameterMap []*KeyValuePair `json:"pfileParameterMap"` - - BctFilePath *string `json:"bctFilePath,omitempty"` - - NumTempfiles *int32 `json:"numTempfiles,omitempty"` - - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - SkipCloneNid *bool `json:"skipCloneNid,omitempty"` - - NoFilenameCheck *bool `json:"noFilenameCheck,omitempty"` - - NewNameClause *string `json:"newNameClause,omitempty"` - - DisasterRecoveryOptions *DisasterRecoveryOptions `json:"disasterRecoveryOptions,omitempty"` - - RestoreToRac *bool `json:"restoreToRac,omitempty"` - - OracleUpdateRestoreOptions *MigrateCloneParams `json:"oracleUpdateRestoreOptions,omitempty"` - - RedoLogConfig *RedoLogGroupConfig `json:"redoLogConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &propsRecoverOracleNewTargetDatabaseConfig); err != nil { - return err - } - m.DatabaseName = propsRecoverOracleNewTargetDatabaseConfig.DatabaseName - - m.OracleBaseFolder = propsRecoverOracleNewTargetDatabaseConfig.OracleBaseFolder - - m.OracleHomeFolder = propsRecoverOracleNewTargetDatabaseConfig.OracleHomeFolder - - m.DbFilesDestination = propsRecoverOracleNewTargetDatabaseConfig.DbFilesDestination - - m.DbConfigFilePath = propsRecoverOracleNewTargetDatabaseConfig.DbConfigFilePath - - m.EnableArchiveLogMode = propsRecoverOracleNewTargetDatabaseConfig.EnableArchiveLogMode - - m.PfileParameterMap = propsRecoverOracleNewTargetDatabaseConfig.PfileParameterMap - - m.BctFilePath = propsRecoverOracleNewTargetDatabaseConfig.BctFilePath - - m.NumTempfiles = propsRecoverOracleNewTargetDatabaseConfig.NumTempfiles - - m.IsMultiStageRestore = propsRecoverOracleNewTargetDatabaseConfig.IsMultiStageRestore - - m.SkipCloneNid = propsRecoverOracleNewTargetDatabaseConfig.SkipCloneNid - - m.NoFilenameCheck = propsRecoverOracleNewTargetDatabaseConfig.NoFilenameCheck - - m.NewNameClause = propsRecoverOracleNewTargetDatabaseConfig.NewNameClause - - m.DisasterRecoveryOptions = propsRecoverOracleNewTargetDatabaseConfig.DisasterRecoveryOptions - - m.RestoreToRac = propsRecoverOracleNewTargetDatabaseConfig.RestoreToRac - - m.OracleUpdateRestoreOptions = propsRecoverOracleNewTargetDatabaseConfig.OracleUpdateRestoreOptions - - m.RedoLogConfig = propsRecoverOracleNewTargetDatabaseConfig.RedoLogConfig - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverOracleNewTargetDatabaseConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonOracleAppSourceConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsRecoverOracleNewTargetDatabaseConfig struct { - DatabaseName *string `json:"databaseName,omitempty"` - - OracleBaseFolder *string `json:"oracleBaseFolder,omitempty"` - - OracleHomeFolder *string `json:"oracleHomeFolder,omitempty"` - - DbFilesDestination *string `json:"dbFilesDestination,omitempty"` - - DbConfigFilePath *string `json:"dbConfigFilePath,omitempty"` - - EnableArchiveLogMode *bool `json:"enableArchiveLogMode,omitempty"` - - PfileParameterMap []*KeyValuePair `json:"pfileParameterMap"` - - BctFilePath *string `json:"bctFilePath,omitempty"` - - NumTempfiles *int32 `json:"numTempfiles,omitempty"` - - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - SkipCloneNid *bool `json:"skipCloneNid,omitempty"` - - NoFilenameCheck *bool `json:"noFilenameCheck,omitempty"` - - NewNameClause *string `json:"newNameClause,omitempty"` - - DisasterRecoveryOptions *DisasterRecoveryOptions `json:"disasterRecoveryOptions,omitempty"` - - RestoreToRac *bool `json:"restoreToRac,omitempty"` - - OracleUpdateRestoreOptions *MigrateCloneParams `json:"oracleUpdateRestoreOptions,omitempty"` - - RedoLogConfig *RedoLogGroupConfig `json:"redoLogConfig,omitempty"` - } - propsRecoverOracleNewTargetDatabaseConfig.DatabaseName = m.DatabaseName - - propsRecoverOracleNewTargetDatabaseConfig.OracleBaseFolder = m.OracleBaseFolder - - propsRecoverOracleNewTargetDatabaseConfig.OracleHomeFolder = m.OracleHomeFolder - - propsRecoverOracleNewTargetDatabaseConfig.DbFilesDestination = m.DbFilesDestination - - propsRecoverOracleNewTargetDatabaseConfig.DbConfigFilePath = m.DbConfigFilePath - - propsRecoverOracleNewTargetDatabaseConfig.EnableArchiveLogMode = m.EnableArchiveLogMode - - propsRecoverOracleNewTargetDatabaseConfig.PfileParameterMap = m.PfileParameterMap - - propsRecoverOracleNewTargetDatabaseConfig.BctFilePath = m.BctFilePath - - propsRecoverOracleNewTargetDatabaseConfig.NumTempfiles = m.NumTempfiles - - propsRecoverOracleNewTargetDatabaseConfig.IsMultiStageRestore = m.IsMultiStageRestore - - propsRecoverOracleNewTargetDatabaseConfig.SkipCloneNid = m.SkipCloneNid - - propsRecoverOracleNewTargetDatabaseConfig.NoFilenameCheck = m.NoFilenameCheck - - propsRecoverOracleNewTargetDatabaseConfig.NewNameClause = m.NewNameClause - - propsRecoverOracleNewTargetDatabaseConfig.DisasterRecoveryOptions = m.DisasterRecoveryOptions - - propsRecoverOracleNewTargetDatabaseConfig.RestoreToRac = m.RestoreToRac - - propsRecoverOracleNewTargetDatabaseConfig.OracleUpdateRestoreOptions = m.OracleUpdateRestoreOptions - - propsRecoverOracleNewTargetDatabaseConfig.RedoLogConfig = m.RedoLogConfig - - jsonDataPropsRecoverOracleNewTargetDatabaseConfig, errRecoverOracleNewTargetDatabaseConfig := swag.WriteJSON(propsRecoverOracleNewTargetDatabaseConfig) - if errRecoverOracleNewTargetDatabaseConfig != nil { - return nil, errRecoverOracleNewTargetDatabaseConfig - } - _parts = append(_parts, jsonDataPropsRecoverOracleNewTargetDatabaseConfig) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover oracle new target database config -func (m *RecoverOracleNewTargetDatabaseConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePfileParameterMap(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDisasterRecoveryOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleUpdateRestoreOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRedoLogConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) validatePfileParameterMap(formats strfmt.Registry) error { - if swag.IsZero(m.PfileParameterMap) { // not required - return nil - } - - for i := 0; i < len(m.PfileParameterMap); i++ { - if swag.IsZero(m.PfileParameterMap[i]) { // not required - continue - } - - if m.PfileParameterMap[i] != nil { - if err := m.PfileParameterMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) validateDisasterRecoveryOptions(formats strfmt.Registry) error { - if swag.IsZero(m.DisasterRecoveryOptions) { // not required - return nil - } - - if m.DisasterRecoveryOptions != nil { - if err := m.DisasterRecoveryOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disasterRecoveryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disasterRecoveryOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) validateOracleUpdateRestoreOptions(formats strfmt.Registry) error { - if swag.IsZero(m.OracleUpdateRestoreOptions) { // not required - return nil - } - - if m.OracleUpdateRestoreOptions != nil { - if err := m.OracleUpdateRestoreOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleUpdateRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleUpdateRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) validateRedoLogConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RedoLogConfig) { // not required - return nil - } - - if m.RedoLogConfig != nil { - if err := m.RedoLogConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("redoLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("redoLogConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle new target database config based on the context it is used -func (m *RecoverOracleNewTargetDatabaseConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePfileParameterMap(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDisasterRecoveryOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleUpdateRestoreOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRedoLogConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) contextValidatePfileParameterMap(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PfileParameterMap); i++ { - - if m.PfileParameterMap[i] != nil { - - if swag.IsZero(m.PfileParameterMap[i]) { // not required - return nil - } - - if err := m.PfileParameterMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pfileParameterMap" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) contextValidateDisasterRecoveryOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.DisasterRecoveryOptions != nil { - - if swag.IsZero(m.DisasterRecoveryOptions) { // not required - return nil - } - - if err := m.DisasterRecoveryOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disasterRecoveryOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disasterRecoveryOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) contextValidateOracleUpdateRestoreOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleUpdateRestoreOptions != nil { - - if swag.IsZero(m.OracleUpdateRestoreOptions) { // not required - return nil - } - - if err := m.OracleUpdateRestoreOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleUpdateRestoreOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleUpdateRestoreOptions") - } - return err - } - } - - return nil -} - -func (m *RecoverOracleNewTargetDatabaseConfig) contextValidateRedoLogConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RedoLogConfig != nil { - - if swag.IsZero(m.RedoLogConfig) { // not required - return nil - } - - if err := m.RedoLogConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("redoLogConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("redoLogConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleNewTargetDatabaseConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleNewTargetDatabaseConfig) UnmarshalBinary(b []byte) error { - var res RecoverOracleNewTargetDatabaseConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_new_target_view_config.go b/v2/models/recover_oracle_new_target_view_config.go deleted file mode 100644 index 6e54cdb2..00000000 --- a/v2/models/recover_oracle_new_target_view_config.go +++ /dev/null @@ -1,119 +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" -) - -// RecoverOracleNewTargetViewConfig Recover Oracle App New View Target Config. -// -// Specifies recovery parameters when recovering to a view. -// -// swagger:model RecoverOracleNewTargetViewConfig -type RecoverOracleNewTargetViewConfig struct { - CommonOracleAppSourceConfig - - // Specifies the directory where cohesity view for app recovery will be mounted. - ViewMountPath *string `json:"viewMountPath,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverOracleNewTargetViewConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleAppSourceConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleAppSourceConfig = aO0 - - // now for regular properties - var propsRecoverOracleNewTargetViewConfig struct { - ViewMountPath *string `json:"viewMountPath,omitempty"` - } - if err := swag.ReadJSON(raw, &propsRecoverOracleNewTargetViewConfig); err != nil { - return err - } - m.ViewMountPath = propsRecoverOracleNewTargetViewConfig.ViewMountPath - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverOracleNewTargetViewConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonOracleAppSourceConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsRecoverOracleNewTargetViewConfig struct { - ViewMountPath *string `json:"viewMountPath,omitempty"` - } - propsRecoverOracleNewTargetViewConfig.ViewMountPath = m.ViewMountPath - - jsonDataPropsRecoverOracleNewTargetViewConfig, errRecoverOracleNewTargetViewConfig := swag.WriteJSON(propsRecoverOracleNewTargetViewConfig) - if errRecoverOracleNewTargetViewConfig != nil { - return nil, errRecoverOracleNewTargetViewConfig - } - _parts = append(_parts, jsonDataPropsRecoverOracleNewTargetViewConfig) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover oracle new target view config -func (m *RecoverOracleNewTargetViewConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this recover oracle new target view config based on the context it is used -func (m *RecoverOracleNewTargetViewConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleAppSourceConfig - if err := m.CommonOracleAppSourceConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleNewTargetViewConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleNewTargetViewConfig) UnmarshalBinary(b []byte) error { - var res RecoverOracleNewTargetViewConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_oracle_params.go b/v2/models/recover_oracle_params.go deleted file mode 100644 index 8fc48196..00000000 --- a/v2/models/recover_oracle_params.go +++ /dev/null @@ -1,230 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverOracleParams Recover Oracle environment params. -// -// Specifies the recovery options specific to oracle environment. -// -// swagger:model RecoverOracleParams -type RecoverOracleParams struct { - - // Specifies the list of parameters for list of objects to be recovered. - // Required: true - Objects []*RecoverOracleDbSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverApps","CloneAppView"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Oracle databases. - RecoverAppParams *RecoverOracleAppParams `json:"recoverAppParams,omitempty"` -} - -// Validate validates this recover oracle params -func (m *RecoverOracleParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverAppParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverOracleParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverApps","CloneAppView"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverOracleParamsTypeRecoveryActionPropEnum = append(recoverOracleParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverOracleParamsRecoveryActionRecoverApps captures enum value "RecoverApps" - RecoverOracleParamsRecoveryActionRecoverApps string = "RecoverApps" - - // RecoverOracleParamsRecoveryActionCloneAppView captures enum value "CloneAppView" - RecoverOracleParamsRecoveryActionCloneAppView string = "CloneAppView" -) - -// prop value enum -func (m *RecoverOracleParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverOracleParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverOracleParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverOracleParams) validateRecoverAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverAppParams) { // not required - return nil - } - - if m.RecoverAppParams != nil { - if err := m.RecoverAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover oracle params based on the context it is used -func (m *RecoverOracleParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOracleParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverOracleParams) contextValidateRecoverAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverAppParams != nil { - - if swag.IsZero(m.RecoverAppParams) { // not required - return nil - } - - if err := m.RecoverAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOracleParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOracleParams) UnmarshalBinary(b []byte) error { - var res RecoverOracleParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_elastifile_files_target_params.go b/v2/models/recover_other_nas_to_elastifile_files_target_params.go deleted file mode 100644 index a9e96cc1..00000000 --- a/v2/models/recover_other_nas_to_elastifile_files_target_params.go +++ /dev/null @@ -1,292 +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" -) - -// RecoverOtherNasToElastifileFilesTargetParams Recover To Elastifile Files Target Params. -// -// Specifies the params of the Elastifile recovery target. -// -// swagger:model RecoverOtherNasToElastifileFilesTargetParams -type RecoverOtherNasToElastifileFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to elastifile files target params -func (m *RecoverOtherNasToElastifileFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to elastifile files target params based on the context it is used -func (m *RecoverOtherNasToElastifileFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToElastifileFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToElastifileFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToElastifileFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_elastifile_volume_target_params.go b/v2/models/recover_other_nas_to_elastifile_volume_target_params.go deleted file mode 100644 index 14963f9c..00000000 --- a/v2/models/recover_other_nas_to_elastifile_volume_target_params.go +++ /dev/null @@ -1,275 +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" -) - -// RecoverOtherNasToElastifileVolumeTargetParams Recover To Elastifile Volume Target Params. -// -// Specifies the params of the Elastifile recovery target. -// -// swagger:model RecoverOtherNasToElastifileVolumeTargetParams -type RecoverOtherNasToElastifileVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to elastifile volume target params -func (m *RecoverOtherNasToElastifileVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to elastifile volume target params based on the context it is used -func (m *RecoverOtherNasToElastifileVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToElastifileVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToElastifileVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToElastifileVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToElastifileVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_flashblade_files_target_params.go b/v2/models/recover_other_nas_to_flashblade_files_target_params.go deleted file mode 100644 index f388bd5e..00000000 --- a/v2/models/recover_other_nas_to_flashblade_files_target_params.go +++ /dev/null @@ -1,292 +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" -) - -// RecoverOtherNasToFlashbladeFilesTargetParams Recover To Flashblade Files Target Params. -// -// Specifies the params of the Flashblade recovery target. -// -// swagger:model RecoverOtherNasToFlashbladeFilesTargetParams -type RecoverOtherNasToFlashbladeFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to flashblade files target params -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to flashblade files target params based on the context it is used -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToFlashbladeFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToFlashbladeFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_flashblade_volume_target_params.go b/v2/models/recover_other_nas_to_flashblade_volume_target_params.go deleted file mode 100644 index addbbe2b..00000000 --- a/v2/models/recover_other_nas_to_flashblade_volume_target_params.go +++ /dev/null @@ -1,275 +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" -) - -// RecoverOtherNasToFlashbladeVolumeTargetParams Recover To Flashblade Volume Target Params. -// -// Specifies the params of the Flashblade recovery target. -// -// swagger:model RecoverOtherNasToFlashbladeVolumeTargetParams -type RecoverOtherNasToFlashbladeVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to flashblade volume target params -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to flashblade volume target params based on the context it is used -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToFlashbladeVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToFlashbladeVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_generic_nas_files_target_params.go b/v2/models/recover_other_nas_to_generic_nas_files_target_params.go deleted file mode 100644 index 505f2cc1..00000000 --- a/v2/models/recover_other_nas_to_generic_nas_files_target_params.go +++ /dev/null @@ -1,241 +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" -) - -// RecoverOtherNasToGenericNasFilesTargetParams Recover To Generic Nas Files Target Params. -// -// Specifies the params of the Generic Nas recovery target. -// -// swagger:model RecoverOtherNasToGenericNasFilesTargetParams -type RecoverOtherNasToGenericNasFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to generic nas files target params -func (m *RecoverOtherNasToGenericNasFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to generic nas files target params based on the context it is used -func (m *RecoverOtherNasToGenericNasFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToGenericNasFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToGenericNasFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToGenericNasFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_generic_nas_volume_target_params.go b/v2/models/recover_other_nas_to_generic_nas_volume_target_params.go deleted file mode 100644 index 818ecdee..00000000 --- a/v2/models/recover_other_nas_to_generic_nas_volume_target_params.go +++ /dev/null @@ -1,224 +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" -) - -// RecoverOtherNasToGenericNasVolumeTargetParams Recover To Generic NAS Volume Target Params. -// -// Specifies the params of the Generic NAS recovery target. -// -// swagger:model RecoverOtherNasToGenericNasVolumeTargetParams -type RecoverOtherNasToGenericNasVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to generic nas volume target params -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to generic nas volume target params based on the context it is used -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToGenericNasVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToGenericNasVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_gpfs_files_target_params.go b/v2/models/recover_other_nas_to_gpfs_files_target_params.go deleted file mode 100644 index b841e773..00000000 --- a/v2/models/recover_other_nas_to_gpfs_files_target_params.go +++ /dev/null @@ -1,292 +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" -) - -// RecoverOtherNasToGpfsFilesTargetParams Recover To GPFS Files Target Params. -// -// Specifies the params of the GPFS recovery target. -// -// swagger:model RecoverOtherNasToGpfsFilesTargetParams -type RecoverOtherNasToGpfsFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to gpfs files target params -func (m *RecoverOtherNasToGpfsFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to gpfs files target params based on the context it is used -func (m *RecoverOtherNasToGpfsFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToGpfsFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToGpfsFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToGpfsFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_gpfs_volume_target_params.go b/v2/models/recover_other_nas_to_gpfs_volume_target_params.go deleted file mode 100644 index 03ad8ab8..00000000 --- a/v2/models/recover_other_nas_to_gpfs_volume_target_params.go +++ /dev/null @@ -1,275 +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" -) - -// RecoverOtherNasToGpfsVolumeTargetParams Recover To GPFS Nas Volume Target Params. -// -// Specifies the params of the GPFS recovery target. -// -// swagger:model RecoverOtherNasToGpfsVolumeTargetParams -type RecoverOtherNasToGpfsVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to gpfs volume target params -func (m *RecoverOtherNasToGpfsVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to gpfs volume target params based on the context it is used -func (m *RecoverOtherNasToGpfsVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToGpfsVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToGpfsVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToGpfsVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToGpfsVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_isilon_files_target_params.go b/v2/models/recover_other_nas_to_isilon_files_target_params.go deleted file mode 100644 index 077ee863..00000000 --- a/v2/models/recover_other_nas_to_isilon_files_target_params.go +++ /dev/null @@ -1,292 +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" -) - -// RecoverOtherNasToIsilonFilesTargetParams Recover To Isilon Files Target Params. -// -// Specifies the params of the Isilon recovery target. -// -// swagger:model RecoverOtherNasToIsilonFilesTargetParams -type RecoverOtherNasToIsilonFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to isilon files target params -func (m *RecoverOtherNasToIsilonFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to isilon files target params based on the context it is used -func (m *RecoverOtherNasToIsilonFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToIsilonFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToIsilonFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToIsilonFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_isilon_volume_target_params.go b/v2/models/recover_other_nas_to_isilon_volume_target_params.go deleted file mode 100644 index ec99ec17..00000000 --- a/v2/models/recover_other_nas_to_isilon_volume_target_params.go +++ /dev/null @@ -1,275 +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" -) - -// RecoverOtherNasToIsilonVolumeTargetParams Recover To Isilon Volume Target Params. -// -// Specifies the params of the Isilon recovery target. -// -// swagger:model RecoverOtherNasToIsilonVolumeTargetParams -type RecoverOtherNasToIsilonVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to isilon volume target params -func (m *RecoverOtherNasToIsilonVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to isilon volume target params based on the context it is used -func (m *RecoverOtherNasToIsilonVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToIsilonVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToIsilonVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToIsilonVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToIsilonVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_netapp_files_target_params.go b/v2/models/recover_other_nas_to_netapp_files_target_params.go deleted file mode 100644 index 8fe975dd..00000000 --- a/v2/models/recover_other_nas_to_netapp_files_target_params.go +++ /dev/null @@ -1,292 +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" -) - -// RecoverOtherNasToNetappFilesTargetParams Recover To Netapp Files Target Params. -// -// Specifies the params of the Netapp recovery target. -// -// swagger:model RecoverOtherNasToNetappFilesTargetParams -type RecoverOtherNasToNetappFilesTargetParams struct { - - // Specifies the path location to recover files to. - // Required: true - AlternatePath *string `json:"alternatePath"` - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of the files fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the parent NAS to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoverTarget `json:"volume"` -} - -// Validate validates this recover other nas to netapp files target params -func (m *RecoverOtherNasToNetappFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlternatePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) validateAlternatePath(formats strfmt.Registry) error { - - if err := validate.Required("alternatePath", "body", m.AlternatePath); err != nil { - return err - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to netapp files target params based on the context it is used -func (m *RecoverOtherNasToNetappFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappFilesTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToNetappFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToNetappFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToNetappFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_other_nas_to_netapp_volume_target_params.go b/v2/models/recover_other_nas_to_netapp_volume_target_params.go deleted file mode 100644 index 7e45a947..00000000 --- a/v2/models/recover_other_nas_to_netapp_volume_target_params.go +++ /dev/null @@ -1,275 +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" -) - -// RecoverOtherNasToNetappVolumeTargetParams Recover To Netapp Volume Target Params. -// -// Specifies the params of the Netapp recovery target. -// -// swagger:model RecoverOtherNasToNetappVolumeTargetParams -type RecoverOtherNasToNetappVolumeTargetParams struct { - - // Specifies whether to overwrite existing file/folder during recovery. - OverwriteExistingFile *bool `json:"overwriteExistingFile,omitempty"` - - // Specifies whether to preserve file/folder attributes during recovery. - PreserveFileAttributes *bool `json:"preserveFileAttributes,omitempty"` - - // Specifies whether to continue recovering other volumes if one of the volumes fails to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether encryption should be enabled during recovery. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Specifies the list of IP addresses that are allowed or denied during recovery. Allowed IPs and Denied IPs cannot be used together. - FilterIPConfig *FilterIPConfig `json:"filterIpConfig,omitempty"` - - // Specifies VLAN settings associated with the restore. If this is not specified, then the VLAN params will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for restores. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` - - // Specifies the id of the parent source of the recovery target. - ParentSource *RecoveryObjectIdentifier `json:"parentSource,omitempty"` - - // Specifies the id and name of the volume to recover to. This volume will be the target of the recovery. - // Required: true - Volume *RecoveryObjectIdentifier `json:"volume"` -} - -// Validate validates this recover other nas to netapp volume target params -func (m *RecoverOtherNasToNetappVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilterIPConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVolume(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) validateFilterIPConfig(formats strfmt.Registry) error { - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if m.FilterIPConfig != nil { - if err := m.FilterIPConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) validateParentSource(formats strfmt.Registry) error { - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if m.ParentSource != nil { - if err := m.ParentSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) validateVolume(formats strfmt.Registry) error { - - if err := validate.Required("volume", "body", m.Volume); err != nil { - return err - } - - if m.Volume != nil { - if err := m.Volume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover other nas to netapp volume target params based on the context it is used -func (m *RecoverOtherNasToNetappVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilterIPConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVolume(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) contextValidateFilterIPConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FilterIPConfig != nil { - - if swag.IsZero(m.FilterIPConfig) { // not required - return nil - } - - if err := m.FilterIPConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filterIpConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filterIpConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) contextValidateParentSource(ctx context.Context, formats strfmt.Registry) error { - - if m.ParentSource != nil { - - if swag.IsZero(m.ParentSource) { // not required - return nil - } - - if err := m.ParentSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentSource") - } - return err - } - } - - return nil -} - -func (m *RecoverOtherNasToNetappVolumeTargetParams) contextValidateVolume(ctx context.Context, formats strfmt.Registry) error { - - if m.Volume != nil { - - if err := m.Volume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volume") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverOtherNasToNetappVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverOtherNasToNetappVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverOtherNasToNetappVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_physical_file_and_folder_params.go b/v2/models/recover_physical_file_and_folder_params.go deleted file mode 100644 index 3f23eade..00000000 --- a/v2/models/recover_physical_file_and_folder_params.go +++ /dev/null @@ -1,227 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverPhysicalFileAndFolderParams Recover Physical File And Folder Params -// -// Specifies the parameters to recover files and folders. -// -// swagger:model RecoverPhysicalFileAndFolderParams -type RecoverPhysicalFileAndFolderParams struct { - - // Specifies the information about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kPhysical"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters to recover to a Physical target. - PhysicalTargetParams *PhysicalTargetParamsForRecoverFileAndFolder `json:"physicalTargetParams,omitempty"` -} - -// Validate validates this recover physical file and folder params -func (m *RecoverPhysicalFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPhysicalFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverPhysicalFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPhysicalFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverPhysicalFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverPhysicalFileAndFolderParamsTargetEnvironmentKPhysical captures enum value "kPhysical" - RecoverPhysicalFileAndFolderParamsTargetEnvironmentKPhysical string = "kPhysical" -) - -// prop value enum -func (m *RecoverPhysicalFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPhysicalFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPhysicalFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverPhysicalFileAndFolderParams) validatePhysicalTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if m.PhysicalTargetParams != nil { - if err := m.PhysicalTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover physical file and folder params based on the context it is used -func (m *RecoverPhysicalFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPhysicalFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverPhysicalFileAndFolderParams) contextValidatePhysicalTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalTargetParams != nil { - - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if err := m.PhysicalTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPhysicalFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPhysicalFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverPhysicalFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_physical_params.go b/v2/models/recover_physical_params.go deleted file mode 100644 index 8fa3d389..00000000 --- a/v2/models/recover_physical_params.go +++ /dev/null @@ -1,440 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverPhysicalParams Recover Physical environment params. -// -// Specifies the recovery options specific to Physical environment. -// -// swagger:model RecoverPhysicalParams -type RecoverPhysicalParams struct { - - // Specifies the list of Recover Object parameters. For recovering files, specifies the object contains the file to recover. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverPhysicalVolumes","InstantVolumeMount","RecoverFiles","RecoverSystem"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to mount Physical Volumes. - MountVolumeParams *MountPhysicalVolumeParams `json:"mountVolumeParams,omitempty"` - - // Specifies the parameters to perform a file and folder recovery. - RecoverFileAndFolderParams *RecoverPhysicalFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover Physical Volumes. - RecoverVolumeParams *RecoverPhysicalVolumeParams `json:"recoverVolumeParams,omitempty"` - - // Specifies the parameters to perform a system recovery. - SystemRecoveryParams *SystemRecoveryParams `json:"systemRecoveryParams,omitempty"` -} - -// Validate validates this recover physical params -func (m *RecoverPhysicalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemRecoveryParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPhysicalParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverPhysicalParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverPhysicalVolumes","InstantVolumeMount","RecoverFiles","RecoverSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPhysicalParamsTypeRecoveryActionPropEnum = append(recoverPhysicalParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverPhysicalParamsRecoveryActionRecoverPhysicalVolumes captures enum value "RecoverPhysicalVolumes" - RecoverPhysicalParamsRecoveryActionRecoverPhysicalVolumes string = "RecoverPhysicalVolumes" - - // RecoverPhysicalParamsRecoveryActionInstantVolumeMount captures enum value "InstantVolumeMount" - RecoverPhysicalParamsRecoveryActionInstantVolumeMount string = "InstantVolumeMount" - - // RecoverPhysicalParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverPhysicalParamsRecoveryActionRecoverFiles string = "RecoverFiles" - - // RecoverPhysicalParamsRecoveryActionRecoverSystem captures enum value "RecoverSystem" - RecoverPhysicalParamsRecoveryActionRecoverSystem string = "RecoverSystem" -) - -// prop value enum -func (m *RecoverPhysicalParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPhysicalParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPhysicalParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverPhysicalParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) validateMountVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if m.MountVolumeParams != nil { - if err := m.MountVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) validateRecoverVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVolumeParams) { // not required - return nil - } - - if m.RecoverVolumeParams != nil { - if err := m.RecoverVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) validateSystemRecoveryParams(formats strfmt.Registry) error { - if swag.IsZero(m.SystemRecoveryParams) { // not required - return nil - } - - if m.SystemRecoveryParams != nil { - if err := m.SystemRecoveryParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemRecoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemRecoveryParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover physical params based on the context it is used -func (m *RecoverPhysicalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemRecoveryParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPhysicalParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverPhysicalParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) contextValidateMountVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumeParams != nil { - - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if err := m.MountVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) contextValidateRecoverVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVolumeParams != nil { - - if swag.IsZero(m.RecoverVolumeParams) { // not required - return nil - } - - if err := m.RecoverVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPhysicalParams) contextValidateSystemRecoveryParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemRecoveryParams != nil { - - if swag.IsZero(m.SystemRecoveryParams) { // not required - return nil - } - - if err := m.SystemRecoveryParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemRecoveryParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemRecoveryParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPhysicalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPhysicalParams) UnmarshalBinary(b []byte) error { - var res RecoverPhysicalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_physical_volume_params.go b/v2/models/recover_physical_volume_params.go deleted file mode 100644 index 9aa61a4f..00000000 --- a/v2/models/recover_physical_volume_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverPhysicalVolumeParams Recover Physical Volumes params. -// -// Specifies the parameters to recover Physical Volumes. -// -// swagger:model RecoverPhysicalVolumeParams -type RecoverPhysicalVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kPhysical"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a physical target. - PhysicalTargetParams *PhysicalTargetParamsForRecoverVolume `json:"physicalTargetParams,omitempty"` -} - -// Validate validates this recover physical volume params -func (m *RecoverPhysicalVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverPhysicalVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPhysical"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPhysicalVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverPhysicalVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverPhysicalVolumeParamsTargetEnvironmentKPhysical captures enum value "kPhysical" - RecoverPhysicalVolumeParamsTargetEnvironmentKPhysical string = "kPhysical" -) - -// prop value enum -func (m *RecoverPhysicalVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPhysicalVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPhysicalVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverPhysicalVolumeParams) validatePhysicalTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if m.PhysicalTargetParams != nil { - if err := m.PhysicalTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover physical volume params based on the context it is used -func (m *RecoverPhysicalVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePhysicalTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPhysicalVolumeParams) contextValidatePhysicalTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalTargetParams != nil { - - if swag.IsZero(m.PhysicalTargetParams) { // not required - return nil - } - - if err := m.PhysicalTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPhysicalVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPhysicalVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverPhysicalVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_protection_group_run_params.go b/v2/models/recover_protection_group_run_params.go deleted file mode 100644 index ae3510ee..00000000 --- a/v2/models/recover_protection_group_run_params.go +++ /dev/null @@ -1,101 +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" -) - -// RecoverProtectionGroupRunParams Recover Protection Group Run Params. -// -// Specifies the Protection Group Run params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. -// -// swagger:model RecoverProtectionGroupRunParams -type RecoverProtectionGroupRunParams struct { - - // Specifies the Protection Group Run id from which to recover VMs. All the VM's that are successfully protected by this Run will be recovered. - // Required: true - // Pattern: ^\d+:\d+$ - ProtectionGroupRunID *string `json:"protectionGroupRunId"` - - // Specifies the Protection Group Instance id. - // Required: true - ProtectionGroupInstanceID *int64 `json:"protectionGroupInstanceId"` - - // Specifies the archival target id. If specified and Protection Group run has an archival snapshot then VMs are recovered from the specified archival snapshot. If not specified (default), VMs are recovered from local snapshot. - ArchivalTargetID *int64 `json:"archivalTargetId,omitempty"` - - // Specifies the local Protection Group id. In case of recovering a replication Run, this field should be provided with local Protection Group id. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` -} - -// Validate validates this recover protection group run params -func (m *RecoverProtectionGroupRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupRunID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtectionGroupInstanceID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverProtectionGroupRunParams) validateProtectionGroupRunID(formats strfmt.Registry) error { - - if err := validate.Required("protectionGroupRunId", "body", m.ProtectionGroupRunID); err != nil { - return err - } - - if err := validate.Pattern("protectionGroupRunId", "body", *m.ProtectionGroupRunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *RecoverProtectionGroupRunParams) validateProtectionGroupInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("protectionGroupInstanceId", "body", m.ProtectionGroupInstanceID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover protection group run params based on context it is used -func (m *RecoverProtectionGroupRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverProtectionGroupRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverProtectionGroupRunParams) UnmarshalBinary(b []byte) error { - var res RecoverProtectionGroupRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_public_folders_params.go b/v2/models/recover_public_folders_params.go deleted file mode 100644 index 417754f5..00000000 --- a/v2/models/recover_public_folders_params.go +++ /dev/null @@ -1,188 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverPublicFoldersParams Specifies the parameters to recover Office 365 Public Folders. -// -// swagger:model RecoverPublicFoldersParams -type RecoverPublicFoldersParams struct { - - // Specifies a list of RootPublicFolder params associated with the objects to recover. - // Required: true - // Min Items: 1 - RootPublicFolders []*RootPublicFolderParam `json:"rootPublicFolders"` - - // Specifies the path to the target folder. - TargetFolderPath *string `json:"targetFolderPath,omitempty"` - - // Specifies whether to continue recovering other Public Folders if one of Public Folder failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the target RootPublicFolder to recover to. If not specified, the objects will be recovered to original location. - TargetRootPublicFolder *RecoveryObjectIdentifier `json:"targetRootPublicFolder,omitempty"` -} - -// Validate validates this recover public folders params -func (m *RecoverPublicFoldersParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRootPublicFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetRootPublicFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPublicFoldersParams) validateRootPublicFolders(formats strfmt.Registry) error { - - if err := validate.Required("rootPublicFolders", "body", m.RootPublicFolders); err != nil { - return err - } - - iRootPublicFoldersSize := int64(len(m.RootPublicFolders)) - - if err := validate.MinItems("rootPublicFolders", "body", iRootPublicFoldersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.RootPublicFolders); i++ { - if swag.IsZero(m.RootPublicFolders[i]) { // not required - continue - } - - if m.RootPublicFolders[i] != nil { - if err := m.RootPublicFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverPublicFoldersParams) validateTargetRootPublicFolder(formats strfmt.Registry) error { - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if m.TargetRootPublicFolder != nil { - if err := m.TargetRootPublicFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover public folders params based on the context it is used -func (m *RecoverPublicFoldersParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRootPublicFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetRootPublicFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPublicFoldersParams) contextValidateRootPublicFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RootPublicFolders); i++ { - - if m.RootPublicFolders[i] != nil { - - if swag.IsZero(m.RootPublicFolders[i]) { // not required - return nil - } - - if err := m.RootPublicFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootPublicFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootPublicFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverPublicFoldersParams) contextValidateTargetRootPublicFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetRootPublicFolder != nil { - - if swag.IsZero(m.TargetRootPublicFolder) { // not required - return nil - } - - if err := m.TargetRootPublicFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRootPublicFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRootPublicFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPublicFoldersParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPublicFoldersParams) UnmarshalBinary(b []byte) error { - var res RecoverPublicFoldersParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_group_target_params.go b/v2/models/recover_pure_group_target_params.go deleted file mode 100644 index 90cb42e0..00000000 --- a/v2/models/recover_pure_group_target_params.go +++ /dev/null @@ -1,183 +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" -) - -// RecoverPureGroupTargetParams Pure SAN group Recovery Target Params. -// -// Specifies the target object parameters to recover the Pure San group. -// -// swagger:model RecoverPureGroupTargetParams -type RecoverPureGroupTargetParams struct { - - // Specifies whether to recover to a new source. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies whether to use thin clone to restore storage array snapshots. - UseThinClone *bool `json:"useThinClone,omitempty"` - - // Specifies the new destination Source configuration parameters where the Pure group will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverPureSanGroupNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if Pure group is being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverPureSanGroupOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover pure group target params -func (m *RecoverPureGroupTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureGroupTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverPureGroupTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverPureGroupTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure group target params based on the context it is used -func (m *RecoverPureGroupTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureGroupTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverPureGroupTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureGroupTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureGroupTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverPureGroupTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_params.go b/v2/models/recover_pure_params.go deleted file mode 100644 index c3fc6c04..00000000 --- a/v2/models/recover_pure_params.go +++ /dev/null @@ -1,281 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverPureParams Recover Pure Params. -// -// Specifies the recovery options specific to Pure environment. -// -// swagger:model RecoverPureParams -type RecoverPureParams struct { - - // Specifies the list of recover object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. The corresponding recovery action params must be filled out. - // Required: true - // Enum: ["RecoverSanVolumes","RecoverSanGroup"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover SAN Pure Protection Group. - RecoverSanGroupParams *RecoverPureSanGroupParams `json:"recoverSanGroupParams,omitempty"` - - // Specifies the parameters to recover SAN Volume. - RecoverSanVolumeParams *RecoverPureSanVolumeParams `json:"recoverSanVolumeParams,omitempty"` -} - -// Validate validates this recover pure params -func (m *RecoverPureParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverSanGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverSanVolumeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverPureParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverSanVolumes","RecoverSanGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPureParamsTypeRecoveryActionPropEnum = append(recoverPureParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverPureParamsRecoveryActionRecoverSanVolumes captures enum value "RecoverSanVolumes" - RecoverPureParamsRecoveryActionRecoverSanVolumes string = "RecoverSanVolumes" - - // RecoverPureParamsRecoveryActionRecoverSanGroup captures enum value "RecoverSanGroup" - RecoverPureParamsRecoveryActionRecoverSanGroup string = "RecoverSanGroup" -) - -// prop value enum -func (m *RecoverPureParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPureParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPureParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverPureParams) validateRecoverSanGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverSanGroupParams) { // not required - return nil - } - - if m.RecoverSanGroupParams != nil { - if err := m.RecoverSanGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSanGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSanGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureParams) validateRecoverSanVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverSanVolumeParams) { // not required - return nil - } - - if m.RecoverSanVolumeParams != nil { - if err := m.RecoverSanVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSanVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSanVolumeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure params based on the context it is used -func (m *RecoverPureParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverSanGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverSanVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverPureParams) contextValidateRecoverSanGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverSanGroupParams != nil { - - if swag.IsZero(m.RecoverSanGroupParams) { // not required - return nil - } - - if err := m.RecoverSanGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSanGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSanGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureParams) contextValidateRecoverSanVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverSanVolumeParams != nil { - - if swag.IsZero(m.RecoverSanVolumeParams) { // not required - return nil - } - - if err := m.RecoverSanVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSanVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSanVolumeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureParams) UnmarshalBinary(b []byte) error { - var res RecoverPureParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_group_new_source_config.go b/v2/models/recover_pure_san_group_new_source_config.go deleted file mode 100644 index 6197995a..00000000 --- a/v2/models/recover_pure_san_group_new_source_config.go +++ /dev/null @@ -1,212 +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" -) - -// RecoverPureSanGroupNewSourceConfig Recover Pure group New Source Config. -// -// Specifies the new destination Source configuration where the Pure group will be recovered. -// -// swagger:model RecoverPureSanGroupNewSourceConfig -type RecoverPureSanGroupNewSourceConfig struct { - - // Specifies params to rename the recovered SAN group. If not specified, the original names of the group are preserved. - RenameRecoveredGroupParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredGroupParams,omitempty"` - - // Specifies the id of the resource pool to recover the Pure SAN Volume to. This field must be specified if recoverToNewSource is true. - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool,omitempty"` - - // Specifies the id of the new target parent source to recover the Pure SAN group to. This field must be specified if recoverToNewSource is true. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover pure san group new source config -func (m *RecoverPureSanGroupNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRenameRecoveredGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) validateRenameRecoveredGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredGroupParams) { // not required - return nil - } - - if m.RenameRecoveredGroupParams != nil { - if err := m.RenameRecoveredGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) validateResourcePool(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san group new source config based on the context it is used -func (m *RecoverPureSanGroupNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRenameRecoveredGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) contextValidateRenameRecoveredGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredGroupParams != nil { - - if swag.IsZero(m.RenameRecoveredGroupParams) { // not required - return nil - } - - if err := m.RenameRecoveredGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanGroupNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanGroupNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverPureSanGroupNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_group_original_source_config.go b/v2/models/recover_pure_san_group_original_source_config.go deleted file mode 100644 index 6764d575..00000000 --- a/v2/models/recover_pure_san_group_original_source_config.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverPureSanGroupOriginalSourceConfig Recover Pure group Original Source Network configuration. -// -// Specifies the network config parameters to be applied for Pure group if recovering to original Source. -// -// swagger:model RecoverPureSanGroupOriginalSourceConfig -type RecoverPureSanGroupOriginalSourceConfig struct { - - // Specifies params to rename the recovered SAN group. If not specified, the original names of the group are preserved. - RenameRecoveredGroupParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredGroupParams,omitempty"` - - // Specifies the id of the resource pool to recover the SAN Volume to. This field can be specified for cases where the resource pool can be altered on the original source. - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool,omitempty"` -} - -// Validate validates this recover pure san group original source config -func (m *RecoverPureSanGroupOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRenameRecoveredGroupParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanGroupOriginalSourceConfig) validateRenameRecoveredGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredGroupParams) { // not required - return nil - } - - if m.RenameRecoveredGroupParams != nil { - if err := m.RenameRecoveredGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupOriginalSourceConfig) validateResourcePool(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san group original source config based on the context it is used -func (m *RecoverPureSanGroupOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRenameRecoveredGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanGroupOriginalSourceConfig) contextValidateRenameRecoveredGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredGroupParams != nil { - - if swag.IsZero(m.RenameRecoveredGroupParams) { // not required - return nil - } - - if err := m.RenameRecoveredGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredGroupParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanGroupOriginalSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanGroupOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanGroupOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverPureSanGroupOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_group_params.go b/v2/models/recover_pure_san_group_params.go deleted file mode 100644 index c505f14d..00000000 --- a/v2/models/recover_pure_san_group_params.go +++ /dev/null @@ -1,165 +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" -) - -// RecoverPureSanGroupParams Recover Pure SAN group Params. -// -// Specifies the parameters to recover Pure SAN group. -// -// swagger:model RecoverPureSanGroupParams -type RecoverPureSanGroupParams struct { - - // Specifies the environment of the recovery target. The corresponding target params must be filled out. - // Required: true - // Enum: ["kPure","kIbmFlashSystem"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters of the Pure SAN group to recover to. - PureTargetParams *RecoverPureGroupTargetParams `json:"pureTargetParams,omitempty"` -} - -// Validate validates this recover pure san group params -func (m *RecoverPureSanGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverPureSanGroupParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPure","kIbmFlashSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPureSanGroupParamsTypeTargetEnvironmentPropEnum = append(recoverPureSanGroupParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverPureSanGroupParamsTargetEnvironmentKPure captures enum value "kPure" - RecoverPureSanGroupParamsTargetEnvironmentKPure string = "kPure" - - // RecoverPureSanGroupParamsTargetEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RecoverPureSanGroupParamsTargetEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" -) - -// prop value enum -func (m *RecoverPureSanGroupParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPureSanGroupParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPureSanGroupParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverPureSanGroupParams) validatePureTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.PureTargetParams) { // not required - return nil - } - - if m.PureTargetParams != nil { - if err := m.PureTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san group params based on the context it is used -func (m *RecoverPureSanGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePureTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanGroupParams) contextValidatePureTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureTargetParams != nil { - - if swag.IsZero(m.PureTargetParams) { // not required - return nil - } - - if err := m.PureTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanGroupParams) UnmarshalBinary(b []byte) error { - var res RecoverPureSanGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_volume_new_source_config.go b/v2/models/recover_pure_san_volume_new_source_config.go deleted file mode 100644 index 7549c18d..00000000 --- a/v2/models/recover_pure_san_volume_new_source_config.go +++ /dev/null @@ -1,212 +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" -) - -// RecoverPureSanVolumeNewSourceConfig Recover Pure Volume New Source Config. -// -// Specifies the new destination Source configuration where the Pure volume will be recovered. -// -// swagger:model RecoverPureSanVolumeNewSourceConfig -type RecoverPureSanVolumeNewSourceConfig struct { - - // Specifies params to rename the recovered SAN volumes. If not specified, the original names of the volumes are preserved. - RenameRecoveredVolumeParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVolumeParams,omitempty"` - - // Specifies the id of the resource pool to recover the Pure SAN Volume to. This field must be specified if recoverToNewSource is true. - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool,omitempty"` - - // Specifies the id of the new target parent source to recover the Pure SAN Volume to. This field must be specified if recoverToNewSource is true. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` -} - -// Validate validates this recover pure san volume new source config -func (m *RecoverPureSanVolumeNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRenameRecoveredVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) validateRenameRecoveredVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVolumeParams) { // not required - return nil - } - - if m.RenameRecoveredVolumeParams != nil { - if err := m.RenameRecoveredVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) validateResourcePool(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san volume new source config based on the context it is used -func (m *RecoverPureSanVolumeNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRenameRecoveredVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) contextValidateRenameRecoveredVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVolumeParams != nil { - - if swag.IsZero(m.RenameRecoveredVolumeParams) { // not required - return nil - } - - if err := m.RenameRecoveredVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeNewSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanVolumeNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanVolumeNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverPureSanVolumeNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_volume_original_source_config.go b/v2/models/recover_pure_san_volume_original_source_config.go deleted file mode 100644 index b0692954..00000000 --- a/v2/models/recover_pure_san_volume_original_source_config.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverPureSanVolumeOriginalSourceConfig Recover Pure volume Original Source Network configuration. -// -// Specifies the network config parameters to be applied for Pure volumes if recovering to original Source. -// -// swagger:model RecoverPureSanVolumeOriginalSourceConfig -type RecoverPureSanVolumeOriginalSourceConfig struct { - - // Specifies params to rename the recovered SAN volumes. If not specified, the original names of the volumes are preserved. - RenameRecoveredVolumeParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVolumeParams,omitempty"` - - // Specifies the id of the resource pool to recover the SAN Volume to. This field can be specified for cases where the resource pool can be altered on the original source. - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool,omitempty"` -} - -// Validate validates this recover pure san volume original source config -func (m *RecoverPureSanVolumeOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRenameRecoveredVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanVolumeOriginalSourceConfig) validateRenameRecoveredVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVolumeParams) { // not required - return nil - } - - if m.RenameRecoveredVolumeParams != nil { - if err := m.RenameRecoveredVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeOriginalSourceConfig) validateResourcePool(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san volume original source config based on the context it is used -func (m *RecoverPureSanVolumeOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRenameRecoveredVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanVolumeOriginalSourceConfig) contextValidateRenameRecoveredVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVolumeParams != nil { - - if swag.IsZero(m.RenameRecoveredVolumeParams) { // not required - return nil - } - - if err := m.RenameRecoveredVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverPureSanVolumeOriginalSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if swag.IsZero(m.ResourcePool) { // not required - return nil - } - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanVolumeOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanVolumeOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverPureSanVolumeOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_san_volume_params.go b/v2/models/recover_pure_san_volume_params.go deleted file mode 100644 index b4f1caae..00000000 --- a/v2/models/recover_pure_san_volume_params.go +++ /dev/null @@ -1,165 +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" -) - -// RecoverPureSanVolumeParams Recover Pure SAN Volume Params. -// -// Specifies the parameters to recover Pure SAN Volume. -// -// swagger:model RecoverPureSanVolumeParams -type RecoverPureSanVolumeParams struct { - - // Specifies the environment of the recovery target. The corresponding target params must be filled out. - // Required: true - // Enum: ["kPure","kIbmFlashSystem"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the parameters of the Pure SAN volume to recover to. - PureTargetParams *RecoverPureVolumeTargetParams `json:"pureTargetParams,omitempty"` -} - -// Validate validates this recover pure san volume params -func (m *RecoverPureSanVolumeParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverPureSanVolumeParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPure","kIbmFlashSystem"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverPureSanVolumeParamsTypeTargetEnvironmentPropEnum = append(recoverPureSanVolumeParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverPureSanVolumeParamsTargetEnvironmentKPure captures enum value "kPure" - RecoverPureSanVolumeParamsTargetEnvironmentKPure string = "kPure" - - // RecoverPureSanVolumeParamsTargetEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - RecoverPureSanVolumeParamsTargetEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" -) - -// prop value enum -func (m *RecoverPureSanVolumeParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverPureSanVolumeParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverPureSanVolumeParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverPureSanVolumeParams) validatePureTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.PureTargetParams) { // not required - return nil - } - - if m.PureTargetParams != nil { - if err := m.PureTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure san volume params based on the context it is used -func (m *RecoverPureSanVolumeParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePureTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureSanVolumeParams) contextValidatePureTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureTargetParams != nil { - - if swag.IsZero(m.PureTargetParams) { // not required - return nil - } - - if err := m.PureTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureSanVolumeParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureSanVolumeParams) UnmarshalBinary(b []byte) error { - var res RecoverPureSanVolumeParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_pure_volume_target_params.go b/v2/models/recover_pure_volume_target_params.go deleted file mode 100644 index a8b43676..00000000 --- a/v2/models/recover_pure_volume_target_params.go +++ /dev/null @@ -1,183 +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" -) - -// RecoverPureVolumeTargetParams Pure SAN Volume Recovery Target Params. -// -// Specifies the target object parameters to recover the Pure San Volume. -// -// swagger:model RecoverPureVolumeTargetParams -type RecoverPureVolumeTargetParams struct { - - // Specifies whether to recover to a new source. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies whether to use thin clone to restore storage array snapshots. - UseThinClone *bool `json:"useThinClone,omitempty"` - - // Specifies the new destination Source configuration parameters where the Pure volume will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverPureSanVolumeNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if Pure volume is being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverPureSanVolumeOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this recover pure volume target params -func (m *RecoverPureVolumeTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureVolumeTargetParams) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *RecoverPureVolumeTargetParams) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverPureVolumeTargetParams) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover pure volume target params based on the context it is used -func (m *RecoverPureVolumeTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverPureVolumeTargetParams) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverPureVolumeTargetParams) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverPureVolumeTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverPureVolumeTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverPureVolumeTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_r_d_s_postgres_custom_server_config.go b/v2/models/recover_r_d_s_postgres_custom_server_config.go deleted file mode 100644 index fa05e320..00000000 --- a/v2/models/recover_r_d_s_postgres_custom_server_config.go +++ /dev/null @@ -1,193 +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" -) - -// RecoverRDSPostgresCustomServerConfig Recover RDS Postgres New Source Config. -// -// Specifies the configuration for recovering RDS Postgres instance to the known target. -// -// swagger:model RecoverRDSPostgresCustomServerConfig -type RecoverRDSPostgresCustomServerConfig struct { - - // Specifies the Ip in which to deploy the Rds instance. - // Required: true - IP *string `json:"ip"` - - // Specifies the port to use to connect to the server. - // Required: true - Port *int32 `json:"port"` - - // Specifies the standard username and password type of credentials. - // Required: true - StandardCredentials *Credentials `json:"standardCredentials"` - - // Specifies the region in which to deploy the Rds instance. - // Required: true - Region *RecoveryObjectIdentifier `json:"region"` -} - -// Validate validates this recover r d s postgres custom server config -func (m *RecoverRDSPostgresCustomServerConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIP(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandardCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) validateIP(formats strfmt.Registry) error { - - if err := validate.Required("ip", "body", m.IP); err != nil { - return err - } - - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", m.Port); err != nil { - return err - } - - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) validateStandardCredentials(formats strfmt.Registry) error { - - if err := validate.Required("standardCredentials", "body", m.StandardCredentials); err != nil { - return err - } - - if m.StandardCredentials != nil { - if err := m.StandardCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) validateRegion(formats strfmt.Registry) error { - - if err := validate.Required("region", "body", m.Region); err != nil { - return err - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover r d s postgres custom server config based on the context it is used -func (m *RecoverRDSPostgresCustomServerConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStandardCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) contextValidateStandardCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.StandardCredentials != nil { - - if err := m.StandardCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standardCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standardCredentials") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresCustomServerConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverRDSPostgresCustomServerConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverRDSPostgresCustomServerConfig) UnmarshalBinary(b []byte) error { - var res RecoverRDSPostgresCustomServerConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_r_d_s_postgres_params.go b/v2/models/recover_r_d_s_postgres_params.go deleted file mode 100644 index 2ac39070..00000000 --- a/v2/models/recover_r_d_s_postgres_params.go +++ /dev/null @@ -1,171 +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" -) - -// RecoverRDSPostgresParams Recover RDS Postgres params. -// -// Specifies the parameters to recover RDS Postgres. -// -// swagger:model RecoverRDSPostgresParams -type RecoverRDSPostgresParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kAWS"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Set to true to overwrite an existing object at the destination. If set to false, and the same object exists at the destination, then recovery will fail for that object. - OverwriteDatabase *bool `json:"overwriteDatabase,omitempty"` - - // Specifies the prefix to be prepended to the object name after the recovery. - Prefix *string `json:"prefix,omitempty"` - - // Specifies the suffix to be appended to the object name after the recovery. - Suffix *string `json:"suffix,omitempty"` - - // Specifies the params for recovering to an Aws target. - AwsTargetParams *AwsTargetParamsForRecoverRDSPostgres `json:"awsTargetParams,omitempty"` -} - -// Validate validates this recover r d s postgres params -func (m *RecoverRDSPostgresParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverRDSPostgresParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAWS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverRDSPostgresParamsTypeTargetEnvironmentPropEnum = append(recoverRDSPostgresParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverRDSPostgresParamsTargetEnvironmentKAWS captures enum value "kAWS" - RecoverRDSPostgresParamsTargetEnvironmentKAWS string = "kAWS" -) - -// prop value enum -func (m *RecoverRDSPostgresParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverRDSPostgresParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverRDSPostgresParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverRDSPostgresParams) validateAwsTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if m.AwsTargetParams != nil { - if err := m.AwsTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover r d s postgres params based on the context it is used -func (m *RecoverRDSPostgresParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverRDSPostgresParams) contextValidateAwsTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetParams != nil { - - if swag.IsZero(m.AwsTargetParams) { // not required - return nil - } - - if err := m.AwsTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverRDSPostgresParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverRDSPostgresParams) UnmarshalBinary(b []byte) error { - var res RecoverRDSPostgresParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_r_d_s_postgres_to_known_source_config.go b/v2/models/recover_r_d_s_postgres_to_known_source_config.go deleted file mode 100644 index c4f42ba1..00000000 --- a/v2/models/recover_r_d_s_postgres_to_known_source_config.go +++ /dev/null @@ -1,216 +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" -) - -// RecoverRDSPostgresToKnownSourceConfig Recover RDS Postgres Known Source Config. -// -// Specifies the configuration for recovering RDS Postgres instance to the known target. -// -// swagger:model RecoverRDSPostgresToKnownSourceConfig -type RecoverRDSPostgresToKnownSourceConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new target. - RecoverToNewSource *bool `json:"recoverToNewSource,omitempty"` - - // Specifies the instance in which to deploy the Rds instance. - Instance *RecoveryObjectIdentifier `json:"instance,omitempty"` - - // Specifies the AWS region in which to deploy the Rds instance. - Region *RecoveryObjectIdentifier `json:"region,omitempty"` - - // Specifies the target source details where RDS Postgres database will be recovered. This source id should be a RDS Postgres target instance id were databases could be restored. - Source *RecoveryObjectIdentifier `json:"source,omitempty"` -} - -// Validate validates this recover r d s postgres to known source config -func (m *RecoverRDSPostgresToKnownSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInstance(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) validateInstance(formats strfmt.Registry) error { - if swag.IsZero(m.Instance) { // not required - return nil - } - - if m.Instance != nil { - if err := m.Instance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instance") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) validateRegion(formats strfmt.Registry) error { - if swag.IsZero(m.Region) { // not required - return nil - } - - if m.Region != nil { - if err := m.Region.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover r d s postgres to known source config based on the context it is used -func (m *RecoverRDSPostgresToKnownSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInstance(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegion(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) contextValidateInstance(ctx context.Context, formats strfmt.Registry) error { - - if m.Instance != nil { - - if swag.IsZero(m.Instance) { // not required - return nil - } - - if err := m.Instance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instance") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) contextValidateRegion(ctx context.Context, formats strfmt.Registry) error { - - if m.Region != nil { - - if swag.IsZero(m.Region) { // not required - return nil - } - - if err := m.Region.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("region") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("region") - } - return err - } - } - - return nil -} - -func (m *RecoverRDSPostgresToKnownSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverRDSPostgresToKnownSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverRDSPostgresToKnownSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverRDSPostgresToKnownSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_salesforce_params.go b/v2/models/recover_salesforce_params.go deleted file mode 100644 index 6bb36d08..00000000 --- a/v2/models/recover_salesforce_params.go +++ /dev/null @@ -1,241 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverSalesforceParams Recover Salesforce environment params. -// -// Specifies the recovery options specific to Salesforce environment. -// -// swagger:model RecoverSalesforceParams -type RecoverSalesforceParams struct { - - // Specifies the list of recover Object parameters. - // Required: true - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies whether to continue recovering other salesforce objects if one of Object failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the id of registered source where the objects are to be recovered. If this is not specified, the recovery job will recover to the original location. - RecoverTo *int64 `json:"recoverTo,omitempty"` - - // Recover Salesforce object params. - // - // Specifies the parameters to recover Salesforce objects. - RecoverSfdcObjectParams *RecoverSfdcObjectParams `json:"recoverSfdcObjectParams,omitempty"` -} - -// Validate validates this recover salesforce params -func (m *RecoverSalesforceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverSfdcObjectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSalesforceParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverSalesforceParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverSalesforceParamsTypeRecoveryActionPropEnum = append(recoverSalesforceParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverSalesforceParamsRecoveryActionRecoverSfdcObjects captures enum value "RecoverSfdcObjects" - RecoverSalesforceParamsRecoveryActionRecoverSfdcObjects string = "RecoverSfdcObjects" - - // RecoverSalesforceParamsRecoveryActionRecoverSfdcOrg captures enum value "RecoverSfdcOrg" - RecoverSalesforceParamsRecoveryActionRecoverSfdcOrg string = "RecoverSfdcOrg" - - // RecoverSalesforceParamsRecoveryActionRecoverSfdcRecords captures enum value "RecoverSfdcRecords" - RecoverSalesforceParamsRecoveryActionRecoverSfdcRecords string = "RecoverSfdcRecords" -) - -// prop value enum -func (m *RecoverSalesforceParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverSalesforceParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverSalesforceParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverSalesforceParams) validateRecoverSfdcObjectParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverSfdcObjectParams) { // not required - return nil - } - - if m.RecoverSfdcObjectParams != nil { - if err := m.RecoverSfdcObjectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSfdcObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSfdcObjectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover salesforce params based on the context it is used -func (m *RecoverSalesforceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverSfdcObjectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSalesforceParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverSalesforceParams) contextValidateRecoverSfdcObjectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverSfdcObjectParams != nil { - - if swag.IsZero(m.RecoverSfdcObjectParams) { // not required - return nil - } - - if err := m.RecoverSfdcObjectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverSfdcObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverSfdcObjectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSalesforceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSalesforceParams) UnmarshalBinary(b []byte) error { - var res RecoverSalesforceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_sfdc_object_params.go b/v2/models/recover_sfdc_object_params.go deleted file mode 100644 index 83cb99fc..00000000 --- a/v2/models/recover_sfdc_object_params.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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverSfdcObjectParams Recover Salesforce object params. -// -// Specifies the parameters to recover Salesforce objects. -// -// swagger:model RecoverSfdcObjectParams -type RecoverSfdcObjectParams struct { - - // Specifies the name of the object to be restored. - ObjectName *string `json:"objectName,omitempty"` - - // Specifies a list of records IDs to be recovered for the specified Object. - Records []string `json:"records"` - - // Specifies a list of parent object IDs to include in recovery. Specified parent objects will also be recovered as part of this recovery. - ParentObjectIds []string `json:"parentObjectIds"` - - // Specifies a list of child object IDs to include in the recovery. Specified object IDs will also be recovered as part of this recovery. - ChildObjectIds []string `json:"childObjectIds"` - - // Specifies a Query to filter the records. This filtered list of records will be used for recovery. - FilterQuery *string `json:"filterQuery,omitempty"` - - // Specifies whether to include deleted Objects in the recovery. - // Required: true - IncludeDeletedObjects *bool `json:"includeDeletedObjects"` - - // Specifies a list of mutuation types for an object. Mutation type is required in conjunction with 'filterQuery'. - // Unique: true - MutationTypes []string `json:"mutationTypes"` -} - -// Validate validates this recover sfdc object params -func (m *RecoverSfdcObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIncludeDeletedObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMutationTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSfdcObjectParams) validateIncludeDeletedObjects(formats strfmt.Registry) error { - - if err := validate.Required("includeDeletedObjects", "body", m.IncludeDeletedObjects); err != nil { - return err - } - - return nil -} - -var recoverSfdcObjectParamsMutationTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["All","Added","Removed","Changed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverSfdcObjectParamsMutationTypesItemsEnum = append(recoverSfdcObjectParamsMutationTypesItemsEnum, v) - } -} - -func (m *RecoverSfdcObjectParams) validateMutationTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverSfdcObjectParamsMutationTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverSfdcObjectParams) validateMutationTypes(formats strfmt.Registry) error { - if swag.IsZero(m.MutationTypes) { // not required - return nil - } - - if err := validate.UniqueItems("mutationTypes", "body", m.MutationTypes); err != nil { - return err - } - - for i := 0; i < len(m.MutationTypes); i++ { - - // value enum - if err := m.validateMutationTypesItemsEnum("mutationTypes"+"."+strconv.Itoa(i), "body", m.MutationTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this recover sfdc object params based on context it is used -func (m *RecoverSfdcObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSfdcObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSfdcObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverSfdcObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_site_params.go b/v2/models/recover_site_params.go deleted file mode 100644 index b8ae84b2..00000000 --- a/v2/models/recover_site_params.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverSiteParams Specifies the parameters to recover Microsoft Office 365 Sharepoint site. -// -// swagger:model RecoverSiteParams -type RecoverSiteParams struct { - - // Specifies a list of site params associated with the objects to recover. - // Required: true - Objects []*ObjectSiteParam `json:"objects"` - - // Specifies whether to continue recovering the doc libs of a site, if one or more of doc libs failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies whether to recover Preservation Hold Library associated with the Sites selected for restore. Default value is false. - RecoverPreservationHoldLibrary *bool `json:"recoverPreservationHoldLibrary,omitempty"` - - // Specifies the object id of the target domain in case of full recovery of a site to a target domain. - TargetDomainObjectID *RecoveryObjectIdentifier `json:"targetDomainObjectId,omitempty"` - - // Specifies the target Site to recover to. If not specified, the objects will be recovered to original location. - TargetSite *TargetSiteParam `json:"targetSite,omitempty"` -} - -// Validate validates this recover site params -func (m *RecoverSiteParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetDomainObjectID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetSite(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSiteParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverSiteParams) validateTargetDomainObjectID(formats strfmt.Registry) error { - if swag.IsZero(m.TargetDomainObjectID) { // not required - return nil - } - - if m.TargetDomainObjectID != nil { - if err := m.TargetDomainObjectID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDomainObjectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDomainObjectId") - } - return err - } - } - - return nil -} - -func (m *RecoverSiteParams) validateTargetSite(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if m.TargetSite != nil { - if err := m.TargetSite.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover site params based on the context it is used -func (m *RecoverSiteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetDomainObjectID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetSite(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSiteParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverSiteParams) contextValidateTargetDomainObjectID(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetDomainObjectID != nil { - - if swag.IsZero(m.TargetDomainObjectID) { // not required - return nil - } - - if err := m.TargetDomainObjectID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetDomainObjectId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetDomainObjectId") - } - return err - } - } - - return nil -} - -func (m *RecoverSiteParams) contextValidateTargetSite(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetSite != nil { - - if swag.IsZero(m.TargetSite) { // not required - return nil - } - - if err := m.TargetSite.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSite") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSite") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSiteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSiteParams) UnmarshalBinary(b []byte) error { - var res RecoverSiteParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_sql_app_new_source_config.go b/v2/models/recover_sql_app_new_source_config.go deleted file mode 100644 index fbbeed71..00000000 --- a/v2/models/recover_sql_app_new_source_config.go +++ /dev/null @@ -1,252 +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" -) - -// RecoverSQLAppNewSourceConfig Recover Sql App New Source Config. -// -// Specifies the new destination Source configuration where the databases will be recovered. -// -// swagger:model RecoverSqlAppNewSourceConfig -type RecoverSQLAppNewSourceConfig struct { - CommonSQLAppSourceConfig - - // Specifies an instance name of the Sql Server that should be used for restoring databases to. - // Required: true - InstanceName *string `json:"instanceName"` - - // Specifies the directory where to put the database data files. Missing directory will be automatically created. - // Required: true - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation"` - - // Specifies the directory where to put the database log files. Missing directory will be automatically created. - // Required: true - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation"` - - // Specifies a new name for the restored database. If this field is not specified, then the original database will be overwritten after recovery. - DatabaseName *string `json:"databaseName,omitempty"` - - // Specifies the source id of target host where databases will be recovered. This source id can be a physical host or virtual machine. - // Required: true - Host *RecoveryObjectIdentifier `json:"host"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverSQLAppNewSourceConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSQLAppSourceConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSQLAppSourceConfig = aO0 - - // now for regular properties - var propsRecoverSQLAppNewSourceConfig struct { - InstanceName *string `json:"instanceName"` - - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation"` - - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation"` - - DatabaseName *string `json:"databaseName,omitempty"` - - Host *RecoveryObjectIdentifier `json:"host"` - } - if err := swag.ReadJSON(raw, &propsRecoverSQLAppNewSourceConfig); err != nil { - return err - } - m.InstanceName = propsRecoverSQLAppNewSourceConfig.InstanceName - - m.DataFileDirectoryLocation = propsRecoverSQLAppNewSourceConfig.DataFileDirectoryLocation - - m.LogFileDirectoryLocation = propsRecoverSQLAppNewSourceConfig.LogFileDirectoryLocation - - m.DatabaseName = propsRecoverSQLAppNewSourceConfig.DatabaseName - - m.Host = propsRecoverSQLAppNewSourceConfig.Host - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverSQLAppNewSourceConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonSQLAppSourceConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsRecoverSQLAppNewSourceConfig struct { - InstanceName *string `json:"instanceName"` - - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation"` - - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation"` - - DatabaseName *string `json:"databaseName,omitempty"` - - Host *RecoveryObjectIdentifier `json:"host"` - } - propsRecoverSQLAppNewSourceConfig.InstanceName = m.InstanceName - - propsRecoverSQLAppNewSourceConfig.DataFileDirectoryLocation = m.DataFileDirectoryLocation - - propsRecoverSQLAppNewSourceConfig.LogFileDirectoryLocation = m.LogFileDirectoryLocation - - propsRecoverSQLAppNewSourceConfig.DatabaseName = m.DatabaseName - - propsRecoverSQLAppNewSourceConfig.Host = m.Host - - jsonDataPropsRecoverSQLAppNewSourceConfig, errRecoverSQLAppNewSourceConfig := swag.WriteJSON(propsRecoverSQLAppNewSourceConfig) - if errRecoverSQLAppNewSourceConfig != nil { - return nil, errRecoverSQLAppNewSourceConfig - } - _parts = append(_parts, jsonDataPropsRecoverSQLAppNewSourceConfig) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover Sql app new source config -func (m *RecoverSQLAppNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSQLAppSourceConfig - if err := m.CommonSQLAppSourceConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstanceName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataFileDirectoryLocation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogFileDirectoryLocation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSQLAppNewSourceConfig) validateInstanceName(formats strfmt.Registry) error { - - if err := validate.Required("instanceName", "body", m.InstanceName); err != nil { - return err - } - - return nil -} - -func (m *RecoverSQLAppNewSourceConfig) validateDataFileDirectoryLocation(formats strfmt.Registry) error { - - if err := validate.Required("dataFileDirectoryLocation", "body", m.DataFileDirectoryLocation); err != nil { - return err - } - - return nil -} - -func (m *RecoverSQLAppNewSourceConfig) validateLogFileDirectoryLocation(formats strfmt.Registry) error { - - if err := validate.Required("logFileDirectoryLocation", "body", m.LogFileDirectoryLocation); err != nil { - return err - } - - return nil -} - -func (m *RecoverSQLAppNewSourceConfig) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover Sql app new source config based on the context it is used -func (m *RecoverSQLAppNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSQLAppSourceConfig - if err := m.CommonSQLAppSourceConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSQLAppNewSourceConfig) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSQLAppNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSQLAppNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverSQLAppNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_sql_app_original_source_config.go b/v2/models/recover_sql_app_original_source_config.go deleted file mode 100644 index 16035c76..00000000 --- a/v2/models/recover_sql_app_original_source_config.go +++ /dev/null @@ -1,152 +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" -) - -// RecoverSQLAppOriginalSourceConfig Recover Sql App New Source Config. -// -// Specifies the additional Source configuration parameters when databases will be recovered to original location. -// -// swagger:model RecoverSqlAppOriginalSourceConfig -type RecoverSQLAppOriginalSourceConfig struct { - CommonSQLAppSourceConfig - - // Specifies the directory where to put the database data files. Missing directory will be automatically created. If you are overwriting the existing database then this field will be ignored. - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation,omitempty"` - - // Specifies the directory where to put the database log files. Missing directory will be automatically created. If you are overwriting the existing database then this field will be ignored. - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation,omitempty"` - - // Set this to true if tail logs are to be captured before the recovery operation. This is only applicable if database is not being renamed. - CaptureTailLogs *bool `json:"captureTailLogs,omitempty"` - - // Specifies a new name for the restored database. If this field is not specified, then the original database will be overwritten after recovery. - NewDatabaseName *string `json:"newDatabaseName,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverSQLAppOriginalSourceConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSQLAppSourceConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSQLAppSourceConfig = aO0 - - // now for regular properties - var propsRecoverSQLAppOriginalSourceConfig struct { - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation,omitempty"` - - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation,omitempty"` - - CaptureTailLogs *bool `json:"captureTailLogs,omitempty"` - - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - } - if err := swag.ReadJSON(raw, &propsRecoverSQLAppOriginalSourceConfig); err != nil { - return err - } - m.DataFileDirectoryLocation = propsRecoverSQLAppOriginalSourceConfig.DataFileDirectoryLocation - - m.LogFileDirectoryLocation = propsRecoverSQLAppOriginalSourceConfig.LogFileDirectoryLocation - - m.CaptureTailLogs = propsRecoverSQLAppOriginalSourceConfig.CaptureTailLogs - - m.NewDatabaseName = propsRecoverSQLAppOriginalSourceConfig.NewDatabaseName - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverSQLAppOriginalSourceConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonSQLAppSourceConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsRecoverSQLAppOriginalSourceConfig struct { - DataFileDirectoryLocation *string `json:"dataFileDirectoryLocation,omitempty"` - - LogFileDirectoryLocation *string `json:"logFileDirectoryLocation,omitempty"` - - CaptureTailLogs *bool `json:"captureTailLogs,omitempty"` - - NewDatabaseName *string `json:"newDatabaseName,omitempty"` - } - propsRecoverSQLAppOriginalSourceConfig.DataFileDirectoryLocation = m.DataFileDirectoryLocation - - propsRecoverSQLAppOriginalSourceConfig.LogFileDirectoryLocation = m.LogFileDirectoryLocation - - propsRecoverSQLAppOriginalSourceConfig.CaptureTailLogs = m.CaptureTailLogs - - propsRecoverSQLAppOriginalSourceConfig.NewDatabaseName = m.NewDatabaseName - - jsonDataPropsRecoverSQLAppOriginalSourceConfig, errRecoverSQLAppOriginalSourceConfig := swag.WriteJSON(propsRecoverSQLAppOriginalSourceConfig) - if errRecoverSQLAppOriginalSourceConfig != nil { - return nil, errRecoverSQLAppOriginalSourceConfig - } - _parts = append(_parts, jsonDataPropsRecoverSQLAppOriginalSourceConfig) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover Sql app original source config -func (m *RecoverSQLAppOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSQLAppSourceConfig - if err := m.CommonSQLAppSourceConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this recover Sql app original source config based on the context it is used -func (m *RecoverSQLAppOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSQLAppSourceConfig - if err := m.CommonSQLAppSourceConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSQLAppOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSQLAppOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverSQLAppOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_sql_app_params.go b/v2/models/recover_sql_app_params.go deleted file mode 100644 index 4be51e21..00000000 --- a/v2/models/recover_sql_app_params.go +++ /dev/null @@ -1,244 +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" -) - -// RecoverSQLAppParams Recover Sql DB params. -// -// Specifies the parameters to recover Sql databases. -// -// swagger:model RecoverSqlAppParams -type RecoverSQLAppParams struct { - CommonRecoverObjectSnapshotParams - - MssqlObjectEntityParams - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kSQL"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a sql host. Provided sql backup should be recovered to same type of target host. For Example: If you have sql backup taken from a physical host then that should be recovered to physical host only. - SQLTargetParams *SQLTargetParamsForRecoverSQLApp `json:"sqlTargetParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverSQLAppParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var aO1 MssqlObjectEntityParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.MssqlObjectEntityParams = aO1 - - // AO2 - var dataAO2 struct { - TargetEnvironment *string `json:"targetEnvironment"` - - SQLTargetParams *SQLTargetParamsForRecoverSQLApp `json:"sqlTargetParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.TargetEnvironment = dataAO2.TargetEnvironment - - m.SQLTargetParams = dataAO2.SQLTargetParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverSQLAppParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.MssqlObjectEntityParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - TargetEnvironment *string `json:"targetEnvironment"` - - SQLTargetParams *SQLTargetParamsForRecoverSQLApp `json:"sqlTargetParams,omitempty"` - } - - dataAO2.TargetEnvironment = m.TargetEnvironment - - dataAO2.SQLTargetParams = m.SQLTargetParams - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover Sql app params -func (m *RecoverSQLAppParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with MssqlObjectEntityParams - if err := m.MssqlObjectEntityParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSQLTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverSqlAppParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverSqlAppParamsTypeTargetEnvironmentPropEnum = append(recoverSqlAppParamsTypeTargetEnvironmentPropEnum, v) - } -} - -// property enum -func (m *RecoverSQLAppParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverSqlAppParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverSQLAppParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverSQLAppParams) validateSQLTargetParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SQLTargetParams) { // not required - return nil - } - - if m.SQLTargetParams != nil { - if err := m.SQLTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover Sql app params based on the context it is used -func (m *RecoverSQLAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with MssqlObjectEntityParams - if err := m.MssqlObjectEntityParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSQLTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSQLAppParams) contextValidateSQLTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SQLTargetParams != nil { - - if swag.IsZero(m.SQLTargetParams) { // not required - return nil - } - - if err := m.SQLTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSQLAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSQLAppParams) UnmarshalBinary(b []byte) error { - var res RecoverSQLAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_sql_params.go b/v2/models/recover_sql_params.go deleted file mode 100644 index 9e4a95ae..00000000 --- a/v2/models/recover_sql_params.go +++ /dev/null @@ -1,235 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverSQLParams Recover Sql environment params. -// -// Specifies the recovery options specific to Sql environment. -// -// swagger:model RecoverSqlParams -type RecoverSQLParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverApps","CloneApps"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Sql databases. - // Min Items: 1 - RecoverAppParams []*RecoverSQLAppParams `json:"recoverAppParams"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this recover Sql params -func (m *RecoverSQLParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverAppParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverSqlParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverApps","CloneApps"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverSqlParamsTypeRecoveryActionPropEnum = append(recoverSqlParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverSQLParamsRecoveryActionRecoverApps captures enum value "RecoverApps" - RecoverSQLParamsRecoveryActionRecoverApps string = "RecoverApps" - - // RecoverSQLParamsRecoveryActionCloneApps captures enum value "CloneApps" - RecoverSQLParamsRecoveryActionCloneApps string = "CloneApps" -) - -// prop value enum -func (m *RecoverSQLParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverSqlParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverSQLParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverSQLParams) validateRecoverAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverAppParams) { // not required - return nil - } - - iRecoverAppParamsSize := int64(len(m.RecoverAppParams)) - - if err := validate.MinItems("recoverAppParams", "body", iRecoverAppParamsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.RecoverAppParams); i++ { - if swag.IsZero(m.RecoverAppParams[i]) { // not required - continue - } - - if m.RecoverAppParams[i] != nil { - if err := m.RecoverAppParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverSQLParams) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover Sql params based on the context it is used -func (m *RecoverSQLParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverSQLParams) contextValidateRecoverAppParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverAppParams); i++ { - - if m.RecoverAppParams[i] != nil { - - if swag.IsZero(m.RecoverAppParams[i]) { // not required - return nil - } - - if err := m.RecoverAppParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverAppParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverAppParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverSQLParams) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverSQLParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverSQLParams) UnmarshalBinary(b []byte) error { - var res RecoverSQLParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_target.go b/v2/models/recover_target.go deleted file mode 100644 index a2de7a21..00000000 --- a/v2/models/recover_target.go +++ /dev/null @@ -1,183 +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" -) - -// RecoverTarget Recover Target. -// -// Specifies the target entity to recover to. -// -// swagger:model RecoverTarget -type RecoverTarget struct { - RecoveryObjectIdentifier - - // Specifies the id of the parent source of the target. - // Read Only: true - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the name of the parent source of the target. - // Read Only: true - ParentSourceName *string `json:"parentSourceName,omitempty"` - - RecoverTargetAllOf2 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RecoveryObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RecoveryObjectIdentifier = aO0 - - // AO1 - var dataAO1 struct { - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - ParentSourceName *string `json:"parentSourceName,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ParentSourceID = dataAO1.ParentSourceID - - m.ParentSourceName = dataAO1.ParentSourceName - - // AO2 - var aO2 RecoverTargetAllOf2 - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.RecoverTargetAllOf2 = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.RecoveryObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - ParentSourceName *string `json:"parentSourceName,omitempty"` - } - - dataAO1.ParentSourceID = m.ParentSourceID - - dataAO1.ParentSourceName = m.ParentSourceName - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - - aO2, err := swag.WriteJSON(m.RecoverTargetAllOf2) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover target -func (m *RecoverTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoveryObjectIdentifier - if err := m.RecoveryObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with RecoverTargetAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this recover target based on the context it is used -func (m *RecoverTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoveryObjectIdentifier - if err := m.RecoveryObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with RecoverTargetAllOf2 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverTarget) contextValidateParentSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "parentSourceId", "body", m.ParentSourceID); err != nil { - return err - } - - return nil -} - -func (m *RecoverTarget) contextValidateParentSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "parentSourceName", "body", m.ParentSourceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverTarget) UnmarshalBinary(b []byte) error { - var res RecoverTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// RecoverTargetAllOf2 recover target all of2 -// -// swagger:model RecoverTargetAllOf2 -type RecoverTargetAllOf2 interface{} diff --git a/v2/models/recover_uda_object_params.go b/v2/models/recover_uda_object_params.go deleted file mode 100644 index 6e3e2bd6..00000000 --- a/v2/models/recover_uda_object_params.go +++ /dev/null @@ -1,59 +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" -) - -// RecoverUdaObjectParams Specifies details of objects to be recovered. -// -// swagger:model RecoverUdaObjectParams -type RecoverUdaObjectParams struct { - - // Specifies the ID of the object. - ObjectID *int64 `json:"objectId,omitempty"` - - // Specifies the fully qualified name of the object to be restored. - ObjectName *string `json:"objectName,omitempty"` - - // Set to true to overwrite an existing object at the destination. If set to false, and the same object exists at the destination, then recovery will fail for that object. - Overwrite *bool `json:"overwrite,omitempty"` - - // Specifies the new name to which the object should be renamed to after the recovery. - RenameTo *string `json:"renameTo,omitempty"` -} - -// Validate validates this recover uda object params -func (m *RecoverUdaObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover uda object params based on context it is used -func (m *RecoverUdaObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverUdaObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverUdaObjectParams) UnmarshalBinary(b []byte) error { - var res RecoverUdaObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_uda_params.go b/v2/models/recover_uda_params.go deleted file mode 100644 index 7abb49cd..00000000 --- a/v2/models/recover_uda_params.go +++ /dev/null @@ -1,217 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverUdaParams Recover Universal Data Adapter params. -// -// Specifies the parameters to recover Universal Data Adapter objects. -// -// swagger:model RecoverUdaParams -type RecoverUdaParams struct { - - // Specifies the 'Source Registration ID' of the source where the objects are to be recovered. If this is not specified, the recovery job will recover to the original location. - RecoverTo *int64 `json:"recoverTo,omitempty"` - - // Specifies the maximum number of concurrent IO Streams that will be created to exchange data with the cluster. If not specified, the default value is taken as 1. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum number of view mounts per host. If not specified, the default value is taken as 1. - Mounts *int32 `json:"mounts,omitempty"` - - // Specifies the custom arguments to be supplied to the restore job script. This field is deprecated. Use recoveryJobArguments instead. - RecoveryArgs *string `json:"recoveryArgs,omitempty"` - - // Specifies the map of custom arguments to be supplied to the restore job script. - RecoveryJobArguments []*KeyValuePair `json:"recoveryJobArguments"` - - // Specifies the local snapshot ids and other details of the objects to be recovered. - // Required: true - Snapshots []*RecoverUdaSnapshotParams `json:"snapshots"` - - // This field will hold the warnings in cases where the job status is SucceededWithWarnings. - // Read Only: true - Warnings []string `json:"warnings"` -} - -// Validate validates this recover uda params -func (m *RecoverUdaParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryJobArguments(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverUdaParams) validateRecoveryJobArguments(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryJobArguments) { // not required - return nil - } - - for i := 0; i < len(m.RecoveryJobArguments); i++ { - if swag.IsZero(m.RecoveryJobArguments[i]) { // not required - continue - } - - if m.RecoveryJobArguments[i] != nil { - if err := m.RecoveryJobArguments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverUdaParams) validateSnapshots(formats strfmt.Registry) error { - - if err := validate.Required("snapshots", "body", m.Snapshots); err != nil { - return err - } - - for i := 0; i < len(m.Snapshots); i++ { - if swag.IsZero(m.Snapshots[i]) { // not required - continue - } - - if m.Snapshots[i] != nil { - if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover uda params based on the context it is used -func (m *RecoverUdaParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryJobArguments(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWarnings(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverUdaParams) contextValidateRecoveryJobArguments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoveryJobArguments); i++ { - - if m.RecoveryJobArguments[i] != nil { - - if swag.IsZero(m.RecoveryJobArguments[i]) { // not required - return nil - } - - if err := m.RecoveryJobArguments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverUdaParams) contextValidateSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Snapshots); i++ { - - if m.Snapshots[i] != nil { - - if swag.IsZero(m.Snapshots[i]) { // not required - return nil - } - - if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverUdaParams) contextValidateWarnings(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "warnings", "body", []string(m.Warnings)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverUdaParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverUdaParams) UnmarshalBinary(b []byte) error { - var res RecoverUdaParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_uda_snapshot_params.go b/v2/models/recover_uda_snapshot_params.go deleted file mode 100644 index d5f95b5e..00000000 --- a/v2/models/recover_uda_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverUdaSnapshotParams Recover Universal Data Adapter Snapshot Params. -// -// Specifies the snapshot parameters for a protected Universal Data Adapter object. -// -// swagger:model RecoverUdaSnapshotParams -type RecoverUdaSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the local snapshot ids and other details of the objects to be recovered. - Objects []*RecoverUdaObjectParams `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverUdaSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - Objects []*RecoverUdaObjectParams `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Objects = dataAO1.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverUdaSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Objects []*RecoverUdaObjectParams `json:"objects"` - } - - dataAO1.Objects = m.Objects - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover uda snapshot params -func (m *RecoverUdaSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverUdaSnapshotParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover uda snapshot params based on the context it is used -func (m *RecoverUdaSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverUdaSnapshotParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverUdaSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverUdaSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverUdaSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_v_mware_file_and_folder_params.go b/v2/models/recover_v_mware_file_and_folder_params.go deleted file mode 100644 index f3d6bb53..00000000 --- a/v2/models/recover_v_mware_file_and_folder_params.go +++ /dev/null @@ -1,300 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVMwareFileAndFolderParams Recover VMware File And Folder Params -// -// Specifies the parameters to recover files and folders. -// -// swagger:model RecoverVMwareFileAndFolderParams -type RecoverVMwareFileAndFolderParams struct { - - // Specifies the info about the files and folders to be recovered. - // Required: true - FilesAndFolders []*CommonRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // If current recovery is child task triggered through another parent recovery operation, then this field will specify the id of the parent recovery. - // Pattern: ^\d+:\d+:\d+$ - ParentRecoveryID *string `json:"parentRecoveryId,omitempty"` - - // Specifies the glacier retrieval type when restoring or downloding files or folders from a Glacier-based cloud snapshot. - // Enum: ["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"] - GlacierRetrievalType *string `json:"glacierRetrievalType,omitempty"` - - // Specifies the parameters to recover to a VMware target. - VmwareTargetParams *VmwareTargetParamsForRecoverFileAndFolder `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this recover v mware file and folder params -func (m *RecoverVMwareFileAndFolderParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentRecoveryID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlacierRetrievalType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverVMwareFileAndFolderParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVMwareFileAndFolderParamsTypeTargetEnvironmentPropEnum = append(recoverVMwareFileAndFolderParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverVMwareFileAndFolderParamsTargetEnvironmentKVMware captures enum value "kVMware" - RecoverVMwareFileAndFolderParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *RecoverVMwareFileAndFolderParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVMwareFileAndFolderParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) validateParentRecoveryID(formats strfmt.Registry) error { - if swag.IsZero(m.ParentRecoveryID) { // not required - return nil - } - - if err := validate.Pattern("parentRecoveryId", "body", *m.ParentRecoveryID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -var recoverVMwareFileAndFolderParamsTypeGlacierRetrievalTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kStandard","kExpeditedNoPCU","kExpeditedWithPCU"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVMwareFileAndFolderParamsTypeGlacierRetrievalTypePropEnum = append(recoverVMwareFileAndFolderParamsTypeGlacierRetrievalTypePropEnum, v) - } -} - -const ( - - // RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKStandard captures enum value "kStandard" - RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKStandard string = "kStandard" - - // RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKExpeditedNoPCU captures enum value "kExpeditedNoPCU" - RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKExpeditedNoPCU string = "kExpeditedNoPCU" - - // RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKExpeditedWithPCU captures enum value "kExpeditedWithPCU" - RecoverVMwareFileAndFolderParamsGlacierRetrievalTypeKExpeditedWithPCU string = "kExpeditedWithPCU" -) - -// prop value enum -func (m *RecoverVMwareFileAndFolderParams) validateGlacierRetrievalTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVMwareFileAndFolderParamsTypeGlacierRetrievalTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) validateGlacierRetrievalType(formats strfmt.Registry) error { - if swag.IsZero(m.GlacierRetrievalType) { // not required - return nil - } - - // value enum - if err := m.validateGlacierRetrievalTypeEnum("glacierRetrievalType", "body", *m.GlacierRetrievalType); err != nil { - return err - } - - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover v mware file and folder params based on the context it is used -func (m *RecoverVMwareFileAndFolderParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVMwareFileAndFolderParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVMwareFileAndFolderParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVMwareFileAndFolderParams) UnmarshalBinary(b []byte) error { - var res RecoverVMwareFileAndFolderParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_view_files_params.go b/v2/models/recover_view_files_params.go deleted file mode 100644 index 33066813..00000000 --- a/v2/models/recover_view_files_params.go +++ /dev/null @@ -1,177 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverViewFilesParams Recover View files Params. -// -// Specifies the parameters to recover View files. -// -// swagger:model RecoverViewFilesParams -type RecoverViewFilesParams struct { - - // Specifies the list of info about the view files and folders to be recovered. - // Required: true - FilesAndFolders []*ViewRecoverFileAndFolderInfo `json:"filesAndFolders"` - - // Specifies configuration of the target view to which the files and folders are to be recovered. - ViewTargetParams *RecoverViewToViewFilesTargetParams `json:"viewTargetParams,omitempty"` -} - -// Validate validates this recover view files params -func (m *RecoverViewFilesParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFilesAndFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewFilesParams) validateFilesAndFolders(formats strfmt.Registry) error { - - if err := validate.Required("filesAndFolders", "body", m.FilesAndFolders); err != nil { - return err - } - - for i := 0; i < len(m.FilesAndFolders); i++ { - if swag.IsZero(m.FilesAndFolders[i]) { // not required - continue - } - - if m.FilesAndFolders[i] != nil { - if err := m.FilesAndFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverViewFilesParams) validateViewTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if m.ViewTargetParams != nil { - if err := m.ViewTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover view files params based on the context it is used -func (m *RecoverViewFilesParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFilesAndFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewFilesParams) contextValidateFilesAndFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FilesAndFolders); i++ { - - if m.FilesAndFolders[i] != nil { - - if swag.IsZero(m.FilesAndFolders[i]) { // not required - return nil - } - - if err := m.FilesAndFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filesAndFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverViewFilesParams) contextValidateViewTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewTargetParams != nil { - - if swag.IsZero(m.ViewTargetParams) { // not required - return nil - } - - if err := m.ViewTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverViewFilesParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverViewFilesParams) UnmarshalBinary(b []byte) error { - var res RecoverViewFilesParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_view_params.go b/v2/models/recover_view_params.go deleted file mode 100644 index 99fdf5d6..00000000 --- a/v2/models/recover_view_params.go +++ /dev/null @@ -1,279 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverViewParams Recover View environment params. -// -// Specifies the recovery options specific to View environment. -// -// swagger:model RecoverViewParams -type RecoverViewParams struct { - - // Specifies the list of recover Object parameters. - Objects []*CommonRecoverObjectSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["DownloadFilesAndFolders","RecoverFiles"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover files. - RecoverFileAndFolderParams *RecoverViewFilesParams `json:"recoverFileAndFolderParams,omitempty"` -} - -// Validate validates this recover view params -func (m *RecoverViewParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverViewParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DownloadFilesAndFolders","RecoverFiles"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverViewParamsTypeRecoveryActionPropEnum = append(recoverViewParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverViewParamsRecoveryActionDownloadFilesAndFolders captures enum value "DownloadFilesAndFolders" - RecoverViewParamsRecoveryActionDownloadFilesAndFolders string = "DownloadFilesAndFolders" - - // RecoverViewParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverViewParamsRecoveryActionRecoverFiles string = "RecoverFiles" -) - -// prop value enum -func (m *RecoverViewParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverViewParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverViewParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverViewParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverViewParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover view params based on the context it is used -func (m *RecoverViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverViewParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverViewParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverViewParams) UnmarshalBinary(b []byte) error { - var res RecoverViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_view_to_view_files_target_params.go b/v2/models/recover_view_to_view_files_target_params.go deleted file mode 100644 index e55737b6..00000000 --- a/v2/models/recover_view_to_view_files_target_params.go +++ /dev/null @@ -1,186 +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" -) - -// RecoverViewToViewFilesTargetParams Recover View To View Files Target Params. -// -// Specifies the params of the View recovery target. -// -// swagger:model RecoverViewToViewFilesTargetParams -type RecoverViewToViewFilesTargetParams struct { - - // Specifies the parameter whether the recovery should be performed to a new or the original View target. - // Required: true - RecoverToNewView *bool `json:"recoverToNewView"` - - // Specifies the name of the new view that's the target for recovery. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the ID of the view. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the new destination View configuration parameters where the files will be recovered. This is mandatory if recoverToNewView is set to true. - NewViewConfig *NewViewFilesTargetParams `json:"newViewConfig,omitempty"` - - // Specifies the View configuration if files are being recovered to original View. If not specified, all the configuration parameters will be retained. - OriginalViewConfig *OriginalViewFilesTargetParams `json:"originalViewConfig,omitempty"` -} - -// Validate validates this recover view to view files target params -func (m *RecoverViewToViewFilesTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewView(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewViewConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalViewConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewToViewFilesTargetParams) validateRecoverToNewView(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewView", "body", m.RecoverToNewView); err != nil { - return err - } - - return nil -} - -func (m *RecoverViewToViewFilesTargetParams) validateNewViewConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewViewConfig) { // not required - return nil - } - - if m.NewViewConfig != nil { - if err := m.NewViewConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newViewConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newViewConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverViewToViewFilesTargetParams) validateOriginalViewConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalViewConfig) { // not required - return nil - } - - if m.OriginalViewConfig != nil { - if err := m.OriginalViewConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalViewConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalViewConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover view to view files target params based on the context it is used -func (m *RecoverViewToViewFilesTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewViewConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalViewConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverViewToViewFilesTargetParams) contextValidateNewViewConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewViewConfig != nil { - - if swag.IsZero(m.NewViewConfig) { // not required - return nil - } - - if err := m.NewViewConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newViewConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newViewConfig") - } - return err - } - } - - return nil -} - -func (m *RecoverViewToViewFilesTargetParams) contextValidateOriginalViewConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalViewConfig != nil { - - if swag.IsZero(m.OriginalViewConfig) { // not required - return nil - } - - if err := m.OriginalViewConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalViewConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalViewConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverViewToViewFilesTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverViewToViewFilesTargetParams) UnmarshalBinary(b []byte) error { - var res RecoverViewToViewFilesTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_child_snapshot_params.go b/v2/models/recover_vmware_child_snapshot_params.go deleted file mode 100644 index 6fa304bf..00000000 --- a/v2/models/recover_vmware_child_snapshot_params.go +++ /dev/null @@ -1,230 +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" -) - -// RecoverVmwareChildSnapshotParams Recover VMware Snapshot Params. -// -// Specifies the snapshot parameters for VMware recovery. -// -// swagger:model RecoverVmwareChildSnapshotParams -type RecoverVmwareChildSnapshotParams struct { - CommonRecoverObjectSnapshotParams - - // Specifies the info about datastore migration. This is only applicable for RecoverVm. - // Read Only: true - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - // Specifies the info about instant recovery. This is only applicable for RecoverVm. - // Read Only: true - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverVmwareChildSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverObjectSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverObjectSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DatastoreMigrationInfo = dataAO1.DatastoreMigrationInfo - - m.InstantRecoveryInfo = dataAO1.InstantRecoveryInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverVmwareChildSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverObjectSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DatastoreMigrationInfo *RecoveryTaskInfo `json:"datastoreMigrationInfo,omitempty"` - - InstantRecoveryInfo *RecoveryTaskInfo `json:"instantRecoveryInfo,omitempty"` - } - - dataAO1.DatastoreMigrationInfo = m.DatastoreMigrationInfo - - dataAO1.InstantRecoveryInfo = m.InstantRecoveryInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover vmware child snapshot params -func (m *RecoverVmwareChildSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreMigrationInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstantRecoveryInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareChildSnapshotParams) validateDatastoreMigrationInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.DatastoreMigrationInfo) { // not required - return nil - } - - if m.DatastoreMigrationInfo != nil { - if err := m.DatastoreMigrationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreMigrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreMigrationInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareChildSnapshotParams) validateInstantRecoveryInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if m.InstantRecoveryInfo != nil { - if err := m.InstantRecoveryInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware child snapshot params based on the context it is used -func (m *RecoverVmwareChildSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverObjectSnapshotParams - if err := m.CommonRecoverObjectSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDatastoreMigrationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstantRecoveryInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareChildSnapshotParams) contextValidateDatastoreMigrationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DatastoreMigrationInfo != nil { - - if swag.IsZero(m.DatastoreMigrationInfo) { // not required - return nil - } - - if err := m.DatastoreMigrationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastoreMigrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastoreMigrationInfo") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareChildSnapshotParams) contextValidateInstantRecoveryInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.InstantRecoveryInfo != nil { - - if swag.IsZero(m.InstantRecoveryInfo) { // not required - return nil - } - - if err := m.InstantRecoveryInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instantRecoveryInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instantRecoveryInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareChildSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareChildSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareChildSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_disk_params.go b/v2/models/recover_vmware_disk_params.go deleted file mode 100644 index c3426dc6..00000000 --- a/v2/models/recover_vmware_disk_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverVmwareDiskParams Recover VMware VM params. -// -// Specifies the parameters to recover VMware Disks. -// -// swagger:model RecoverVmwareDiskParams -type RecoverVmwareDiskParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a VMware target. - VmwareTargetParams *VmwareTargetParamsForRecoverDisk `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this recover vmware disk params -func (m *RecoverVmwareDiskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareDiskParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareDiskParamsTypeTargetEnvironmentPropEnum = append(recoverVmwareDiskParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverVmwareDiskParamsTargetEnvironmentKVMware captures enum value "kVMware" - RecoverVmwareDiskParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *RecoverVmwareDiskParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareDiskParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareDiskParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareDiskParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware disk params based on the context it is used -func (m *RecoverVmwareDiskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareDiskParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareDiskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareDiskParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareDiskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_params.go b/v2/models/recover_vmware_params.go deleted file mode 100644 index e8fbfc48..00000000 --- a/v2/models/recover_vmware_params.go +++ /dev/null @@ -1,549 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareParams Recover VMware environment params. -// -// Specifies the recovery options specific to VMware environment. -// -// swagger:model RecoverVmwareParams -type RecoverVmwareParams struct { - - // Specifies the list of recover Object parameters. This property is mandatory for all recovery action types except recover vms. While recovering VMs, a user can specify snapshots of VM's or a Protection Group Run details to recover all the VM's that are backed up by that Run. For recovering files, specifies the object contains the file to recover. - Objects []*RecoverVmwareSnapshotParams `json:"objects"` - - // Specifies the type of recovery action to be performed. - // Required: true - // Enum: ["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to download files and folders. - DownloadFileAndFolderParams *CommonDownloadFileAndFolderParams `json:"downloadFileAndFolderParams,omitempty"` - - // Specifies the parameters to mount VMware Volumes. - MountVolumeParams *MountVmwareVolumeParams `json:"mountVolumeParams,omitempty"` - - // Specifies the parameters to recover files and folders. - RecoverFileAndFolderParams *RecoverVMwareFileAndFolderParams `json:"recoverFileAndFolderParams,omitempty"` - - // Specifies the parameters to recover a VMware vApp. - RecoverVAppParams *RecoverVmwareVAppParams `json:"recoverVAppParams,omitempty"` - - // Specifies the parameters to recover a VMware vApp template. - RecoverVAppTemplateParams *RecoverVmwareVAppTemplateParams `json:"recoverVAppTemplateParams,omitempty"` - - // Specifies the parameters to recover VMware Disks. - RecoverVMDiskParams *RecoverVmwareDiskParams `json:"recoverVmDiskParams,omitempty"` - - // Specifies the parameters to recover VMware VM. - RecoverVMParams *RecoverVmwareVMParams `json:"recoverVmParams,omitempty"` -} - -// Validate validates this recover vmware params -func (m *RecoverVmwareParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDownloadFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountVolumeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverFileAndFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVAppParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVAppTemplateParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMDiskParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverVMParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareParams) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverVmwareParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareParamsTypeRecoveryActionPropEnum = append(recoverVmwareParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // RecoverVmwareParamsRecoveryActionRecoverVMs captures enum value "RecoverVMs" - RecoverVmwareParamsRecoveryActionRecoverVMs string = "RecoverVMs" - - // RecoverVmwareParamsRecoveryActionRecoverFiles captures enum value "RecoverFiles" - RecoverVmwareParamsRecoveryActionRecoverFiles string = "RecoverFiles" - - // RecoverVmwareParamsRecoveryActionInstantVolumeMount captures enum value "InstantVolumeMount" - RecoverVmwareParamsRecoveryActionInstantVolumeMount string = "InstantVolumeMount" - - // RecoverVmwareParamsRecoveryActionRecoverVMDisks captures enum value "RecoverVmDisks" - RecoverVmwareParamsRecoveryActionRecoverVMDisks string = "RecoverVmDisks" - - // RecoverVmwareParamsRecoveryActionRecoverVApps captures enum value "RecoverVApps" - RecoverVmwareParamsRecoveryActionRecoverVApps string = "RecoverVApps" - - // RecoverVmwareParamsRecoveryActionRecoverVAppTemplates captures enum value "RecoverVAppTemplates" - RecoverVmwareParamsRecoveryActionRecoverVAppTemplates string = "RecoverVAppTemplates" - - // RecoverVmwareParamsRecoveryActionUptierSnapshot captures enum value "UptierSnapshot" - RecoverVmwareParamsRecoveryActionUptierSnapshot string = "UptierSnapshot" -) - -// prop value enum -func (m *RecoverVmwareParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareParams) validateDownloadFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if m.DownloadFileAndFolderParams != nil { - if err := m.DownloadFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateMountVolumeParams(formats strfmt.Registry) error { - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if m.MountVolumeParams != nil { - if err := m.MountVolumeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateRecoverFileAndFolderParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if m.RecoverFileAndFolderParams != nil { - if err := m.RecoverFileAndFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateRecoverVAppParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVAppParams) { // not required - return nil - } - - if m.RecoverVAppParams != nil { - if err := m.RecoverVAppParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVAppParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateRecoverVAppTemplateParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVAppTemplateParams) { // not required - return nil - } - - if m.RecoverVAppTemplateParams != nil { - if err := m.RecoverVAppTemplateParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVAppTemplateParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVAppTemplateParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateRecoverVMDiskParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMDiskParams) { // not required - return nil - } - - if m.RecoverVMDiskParams != nil { - if err := m.RecoverVMDiskParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmDiskParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) validateRecoverVMParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if m.RecoverVMParams != nil { - if err := m.RecoverVMParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware params based on the context it is used -func (m *RecoverVmwareParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDownloadFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountVolumeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverFileAndFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVAppParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVAppTemplateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMDiskParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverVMParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateDownloadFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DownloadFileAndFolderParams != nil { - - if swag.IsZero(m.DownloadFileAndFolderParams) { // not required - return nil - } - - if err := m.DownloadFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downloadFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downloadFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateMountVolumeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MountVolumeParams != nil { - - if swag.IsZero(m.MountVolumeParams) { // not required - return nil - } - - if err := m.MountVolumeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountVolumeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountVolumeParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateRecoverFileAndFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverFileAndFolderParams != nil { - - if swag.IsZero(m.RecoverFileAndFolderParams) { // not required - return nil - } - - if err := m.RecoverFileAndFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFileAndFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFileAndFolderParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateRecoverVAppParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVAppParams != nil { - - if swag.IsZero(m.RecoverVAppParams) { // not required - return nil - } - - if err := m.RecoverVAppParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVAppParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVAppParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateRecoverVAppTemplateParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVAppTemplateParams != nil { - - if swag.IsZero(m.RecoverVAppTemplateParams) { // not required - return nil - } - - if err := m.RecoverVAppTemplateParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVAppTemplateParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVAppTemplateParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateRecoverVMDiskParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMDiskParams != nil { - - if swag.IsZero(m.RecoverVMDiskParams) { // not required - return nil - } - - if err := m.RecoverVMDiskParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmDiskParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmDiskParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareParams) contextValidateRecoverVMParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverVMParams != nil { - - if swag.IsZero(m.RecoverVMParams) { // not required - return nil - } - - if err := m.RecoverVMParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverVmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverVmParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_snapshot_params.go b/v2/models/recover_vmware_snapshot_params.go deleted file mode 100644 index cb47335b..00000000 --- a/v2/models/recover_vmware_snapshot_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RecoverVmwareSnapshotParams Recover VMware Parent Snapshot Params. -// -// Specifies the snapshot parameters for VMware recovery. -// -// swagger:model RecoverVmwareSnapshotParams -type RecoverVmwareSnapshotParams struct { - RecoverVmwareChildSnapshotParams - - // Specifies optional information about any child snapshots of this object. For example a VCD snapshot may have child VM information populated here. - ChildSnapshots []*RecoverVmwareChildSnapshotParams `json:"childSnapshots"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RecoverVmwareSnapshotParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RecoverVmwareChildSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RecoverVmwareChildSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - ChildSnapshots []*RecoverVmwareChildSnapshotParams `json:"childSnapshots"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ChildSnapshots = dataAO1.ChildSnapshots - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RecoverVmwareSnapshotParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.RecoverVmwareChildSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ChildSnapshots []*RecoverVmwareChildSnapshotParams `json:"childSnapshots"` - } - - dataAO1.ChildSnapshots = m.ChildSnapshots - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recover vmware snapshot params -func (m *RecoverVmwareSnapshotParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoverVmwareChildSnapshotParams - if err := m.RecoverVmwareChildSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChildSnapshots(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareSnapshotParams) validateChildSnapshots(formats strfmt.Registry) error { - - if swag.IsZero(m.ChildSnapshots) { // not required - return nil - } - - for i := 0; i < len(m.ChildSnapshots); i++ { - if swag.IsZero(m.ChildSnapshots[i]) { // not required - continue - } - - if m.ChildSnapshots[i] != nil { - if err := m.ChildSnapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childSnapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childSnapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recover vmware snapshot params based on the context it is used -func (m *RecoverVmwareSnapshotParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoverVmwareChildSnapshotParams - if err := m.RecoverVmwareChildSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChildSnapshots(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareSnapshotParams) contextValidateChildSnapshots(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildSnapshots); i++ { - - if m.ChildSnapshots[i] != nil { - - if swag.IsZero(m.ChildSnapshots[i]) { // not required - return nil - } - - if err := m.ChildSnapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childSnapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childSnapshots" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareSnapshotParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareSnapshotParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareSnapshotParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_new_source_config.go b/v2/models/recover_vmware_v_app_new_source_config.go deleted file mode 100644 index 7bba1fe3..00000000 --- a/v2/models/recover_vmware_v_app_new_source_config.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverVmwareVAppNewSourceConfig Recover VMware vApps New Source Config. -// -// Specifies the new destination Source configuration where the vApps will be recovered. -// -// swagger:model RecoverVmwareVAppNewSourceConfig -type RecoverVmwareVAppNewSourceConfig struct { - - // Specifies the type of VMware source to which the VMs are being restored. - // Required: true - // Enum: ["kvCloudDirector"] - SourceType *string `json:"sourceType"` - - // v cloud director params - VCloudDirectorParams *RecoverVmwareVAppVCDSourceConfig `json:"vCloudDirectorParams,omitempty"` -} - -// Validate validates this recover vmware v app new source config -func (m *RecoverVmwareVAppNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCloudDirectorParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareVAppNewSourceConfigTypeSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVAppNewSourceConfigTypeSourceTypePropEnum = append(recoverVmwareVAppNewSourceConfigTypeSourceTypePropEnum, v) - } -} - -const ( - - // RecoverVmwareVAppNewSourceConfigSourceTypeKvCloudDirector captures enum value "kvCloudDirector" - RecoverVmwareVAppNewSourceConfigSourceTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *RecoverVmwareVAppNewSourceConfig) validateSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVAppNewSourceConfigTypeSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVAppNewSourceConfig) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - // value enum - if err := m.validateSourceTypeEnum("sourceType", "body", *m.SourceType); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVAppNewSourceConfig) validateVCloudDirectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if m.VCloudDirectorParams != nil { - if err := m.VCloudDirectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app new source config based on the context it is used -func (m *RecoverVmwareVAppNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVCloudDirectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppNewSourceConfig) contextValidateVCloudDirectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VCloudDirectorParams != nil { - - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if err := m.VCloudDirectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_original_source_config.go b/v2/models/recover_vmware_v_app_original_source_config.go deleted file mode 100644 index e7635340..00000000 --- a/v2/models/recover_vmware_v_app_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverVmwareVAppOriginalSourceConfig Recover VMware vApps Original Source Config. -// -// Specifies the Source configuration if vApps are being recovered to Original Source. -// -// swagger:model RecoverVmwareVAppOriginalSourceConfig -type RecoverVmwareVAppOriginalSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered vApps. - NetworkConfig *RecoverVmwareVMOriginalSourceNetworkConfig `json:"networkConfig,omitempty"` -} - -// Validate validates this recover vmware v app original source config -func (m *RecoverVmwareVAppOriginalSourceConfig) 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 *RecoverVmwareVAppOriginalSourceConfig) 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 recover vmware v app original source config based on the context it is used -func (m *RecoverVmwareVAppOriginalSourceConfig) 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 *RecoverVmwareVAppOriginalSourceConfig) 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 *RecoverVmwareVAppOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_params.go b/v2/models/recover_vmware_v_app_params.go deleted file mode 100644 index a6929e3e..00000000 --- a/v2/models/recover_vmware_v_app_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverVmwareVAppParams Recover VMware vApp params. -// -// Specifies the parameters to recover VMware vApp. -// -// swagger:model RecoverVmwareVAppParams -type RecoverVmwareVAppParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a VMware target. - VmwareTargetParams *VmwareTargetParamsForRecoverVApp `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this recover vmware v app params -func (m *RecoverVmwareVAppParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareVAppParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVAppParamsTypeTargetEnvironmentPropEnum = append(recoverVmwareVAppParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverVmwareVAppParamsTargetEnvironmentKVMware captures enum value "kVMware" - RecoverVmwareVAppParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *RecoverVmwareVAppParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVAppParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVAppParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVAppParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app params based on the context it is used -func (m *RecoverVmwareVAppParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_template_new_source_config.go b/v2/models/recover_vmware_v_app_template_new_source_config.go deleted file mode 100644 index f90892a9..00000000 --- a/v2/models/recover_vmware_v_app_template_new_source_config.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverVmwareVAppTemplateNewSourceConfig Recover VMware vApp Templates New Source Config. -// -// Specifies the new destination Source configuration where the vApps templates will be recovered. -// -// swagger:model RecoverVmwareVAppTemplateNewSourceConfig -type RecoverVmwareVAppTemplateNewSourceConfig struct { - - // Specifies the type of VMware source to which the vApp templatess are being restored. - // Required: true - // Enum: ["kvCloudDirector"] - SourceType *string `json:"sourceType"` - - // v cloud director params - VCloudDirectorParams *RecoverVmwareVAppTemplateVCDSourceConfig `json:"vCloudDirectorParams,omitempty"` -} - -// Validate validates this recover vmware v app template new source config -func (m *RecoverVmwareVAppTemplateNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCloudDirectorParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareVAppTemplateNewSourceConfigTypeSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVAppTemplateNewSourceConfigTypeSourceTypePropEnum = append(recoverVmwareVAppTemplateNewSourceConfigTypeSourceTypePropEnum, v) - } -} - -const ( - - // RecoverVmwareVAppTemplateNewSourceConfigSourceTypeKvCloudDirector captures enum value "kvCloudDirector" - RecoverVmwareVAppTemplateNewSourceConfigSourceTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *RecoverVmwareVAppTemplateNewSourceConfig) validateSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVAppTemplateNewSourceConfigTypeSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVAppTemplateNewSourceConfig) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - // value enum - if err := m.validateSourceTypeEnum("sourceType", "body", *m.SourceType); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateNewSourceConfig) validateVCloudDirectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if m.VCloudDirectorParams != nil { - if err := m.VCloudDirectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app template new source config based on the context it is used -func (m *RecoverVmwareVAppTemplateNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVCloudDirectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppTemplateNewSourceConfig) contextValidateVCloudDirectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VCloudDirectorParams != nil { - - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if err := m.VCloudDirectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppTemplateNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_template_params.go b/v2/models/recover_vmware_v_app_template_params.go deleted file mode 100644 index 3935e751..00000000 --- a/v2/models/recover_vmware_v_app_template_params.go +++ /dev/null @@ -1,162 +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" -) - -// RecoverVmwareVAppTemplateParams Recover VMware vApp template params. -// -// Specifies the parameters to recover VMware vApp template. -// -// swagger:model RecoverVmwareVAppTemplateParams -type RecoverVmwareVAppTemplateParams struct { - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a VMware target. - VmwareTargetParams *VmwareTargetParamsForRecoverVAppTemplate `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this recover vmware v app template params -func (m *RecoverVmwareVAppTemplateParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareVAppTemplateParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVAppTemplateParamsTypeTargetEnvironmentPropEnum = append(recoverVmwareVAppTemplateParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverVmwareVAppTemplateParamsTargetEnvironmentKVMware captures enum value "kVMware" - RecoverVmwareVAppTemplateParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *RecoverVmwareVAppTemplateParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVAppTemplateParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVAppTemplateParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app template params based on the context it is used -func (m *RecoverVmwareVAppTemplateParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppTemplateParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppTemplateParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_template_v_c_d_source_config.go b/v2/models/recover_vmware_v_app_template_v_c_d_source_config.go deleted file mode 100644 index 4ed5ad3a..00000000 --- a/v2/models/recover_vmware_v_app_template_v_c_d_source_config.go +++ /dev/null @@ -1,431 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVAppTemplateVCDSourceConfig Recover VMware vApp Templates vCloudDirector Source Config. -// -// Specifies the new destination Source configuration where the vApp Templates will be recovered for vCloudDirector sources. -// -// swagger:model RecoverVmwareVAppTemplateVCDSourceConfig -type RecoverVmwareVAppTemplateVCDSourceConfig struct { - - // Specifies the datastore objects where the object's files should be recovered to. - // Max Items: 1 - Datastores []*RecoveryObjectIdentifier `json:"datastores"` - - // Specifies the VDC organization network which will be attached with recoverd VM under current VApp template. - OrgVdcNetwork *OrgVDCNetwork `json:"orgVdcNetwork,omitempty"` - - // Specifies the catalog where the vApp template should reside. - // Required: true - Catalog *VdcCatalog `json:"catalog"` - - // Specifies the networking configuration to be applied to the recovered vApp templates. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the vApp templates. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the storage profile to which the objects should be recovered. This should only be specified if datastores are not specified. - StorageProfile *VcdStorageProfileParams `json:"storageProfile,omitempty"` - - // Specifies the VDC object where the recovered objects will be attached. - // Required: true - Vdc *RecoveryObjectIdentifier `json:"vdc"` -} - -// Validate validates this recover vmware v app template v c d source config -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastores(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCatalog(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageProfile(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVdc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) validateDatastores(formats strfmt.Registry) error { - if swag.IsZero(m.Datastores) { // not required - return nil - } - - iDatastoresSize := int64(len(m.Datastores)) - - if err := validate.MaxItems("datastores", "body", iDatastoresSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Datastores); i++ { - if swag.IsZero(m.Datastores[i]) { // not required - continue - } - - if m.Datastores[i] != nil { - if err := m.Datastores[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) 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 *RecoverVmwareVAppTemplateVCDSourceConfig) validateCatalog(formats strfmt.Registry) error { - - if err := validate.Required("catalog", "body", m.Catalog); err != nil { - return err - } - - if m.Catalog != nil { - if err := m.Catalog.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalog") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) validateStorageProfile(formats strfmt.Registry) error { - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if m.StorageProfile != nil { - if err := m.StorageProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) validateVdc(formats strfmt.Registry) error { - - if err := validate.Required("vdc", "body", m.Vdc); err != nil { - return err - } - - if m.Vdc != nil { - if err := m.Vdc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app template v c d source config based on the context it is used -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastores(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCatalog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageProfile(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVdc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) contextValidateDatastores(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Datastores); i++ { - - if m.Datastores[i] != nil { - - if swag.IsZero(m.Datastores[i]) { // not required - return nil - } - - if err := m.Datastores[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) 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 *RecoverVmwareVAppTemplateVCDSourceConfig) contextValidateCatalog(ctx context.Context, formats strfmt.Registry) error { - - if m.Catalog != nil { - - if err := m.Catalog.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalog") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) contextValidateStorageProfile(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageProfile != nil { - - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if err := m.StorageProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) contextValidateVdc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vdc != nil { - - if err := m.Vdc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppTemplateVCDSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppTemplateVCDSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_v_app_v_c_d_source_config.go b/v2/models/recover_vmware_v_app_v_c_d_source_config.go deleted file mode 100644 index c576ff7f..00000000 --- a/v2/models/recover_vmware_v_app_v_c_d_source_config.go +++ /dev/null @@ -1,382 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVAppVCDSourceConfig Recover VMware VMs vCloudDirector Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered for vCloudDirector sources. -// -// swagger:model RecoverVmwareVAppVCDSourceConfig -type RecoverVmwareVAppVCDSourceConfig struct { - - // Specifies the datastore objects where the object's files should be recovered to. - // Max Items: 1 - Datastores []*RecoveryObjectIdentifier `json:"datastores"` - - // Specifies the VDC organization network which will be attached with recoverd VM under current VApp. - OrgVdcNetwork *OrgVDCNetwork `json:"orgVdcNetwork,omitempty"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the storage profile to which the objects should be recovered. This should only be specified if datastores are not specified. - StorageProfile *VcdStorageProfileParams `json:"storageProfile,omitempty"` - - // Specifies the VDC object where the recovered objects will be attached. - // Required: true - Vdc *RecoveryObjectIdentifier `json:"vdc"` -} - -// Validate validates this recover vmware v app v c d source config -func (m *RecoverVmwareVAppVCDSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastores(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageProfile(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVdc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) validateDatastores(formats strfmt.Registry) error { - if swag.IsZero(m.Datastores) { // not required - return nil - } - - iDatastoresSize := int64(len(m.Datastores)) - - if err := validate.MaxItems("datastores", "body", iDatastoresSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Datastores); i++ { - if swag.IsZero(m.Datastores[i]) { // not required - continue - } - - if m.Datastores[i] != nil { - if err := m.Datastores[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) 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 *RecoverVmwareVAppVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVAppVCDSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) validateStorageProfile(formats strfmt.Registry) error { - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if m.StorageProfile != nil { - if err := m.StorageProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) validateVdc(formats strfmt.Registry) error { - - if err := validate.Required("vdc", "body", m.Vdc); err != nil { - return err - } - - if m.Vdc != nil { - if err := m.Vdc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware v app v c d source config based on the context it is used -func (m *RecoverVmwareVAppVCDSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastores(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageProfile(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVdc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) contextValidateDatastores(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Datastores); i++ { - - if m.Datastores[i] != nil { - - if swag.IsZero(m.Datastores[i]) { // not required - return nil - } - - if err := m.Datastores[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) 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 *RecoverVmwareVAppVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVAppVCDSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) contextValidateStorageProfile(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageProfile != nil { - - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if err := m.StorageProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVAppVCDSourceConfig) contextValidateVdc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vdc != nil { - - if err := m.Vdc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVAppVCDSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVAppVCDSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVAppVCDSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_esxi_source_config.go b/v2/models/recover_vmware_vm_esxi_source_config.go deleted file mode 100644 index bf87354a..00000000 --- a/v2/models/recover_vmware_vm_esxi_source_config.go +++ /dev/null @@ -1,324 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVMEsxiSourceConfig Recover VMware VMs ESXi Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered for ESXi sources. -// -// swagger:model RecoverVmwareVmEsxiSourceConfig -type RecoverVmwareVMEsxiSourceConfig struct { - - // Specifies the datastore objects where the object's files should be recovered to. - Datastores []*RecoveryObjectIdentifier `json:"datastores"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the resource pool object where the recovered objects will be attached. - // Required: true - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Folder where the VMs should be created. - VMFolder *RecoveryObjectIdentifier `json:"vmFolder,omitempty"` -} - -// Validate validates this recover vmware Vm esxi source config -func (m *RecoverVmwareVMEsxiSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastores(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) validateDatastores(formats strfmt.Registry) error { - if swag.IsZero(m.Datastores) { // not required - return nil - } - - for i := 0; i < len(m.Datastores); i++ { - if swag.IsZero(m.Datastores[i]) { // not required - continue - } - - if m.Datastores[i] != nil { - if err := m.Datastores[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) 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 -} - -func (m *RecoverVmwareVMEsxiSourceConfig) validateResourcePool(formats strfmt.Registry) error { - - if err := validate.Required("resourcePool", "body", m.ResourcePool); err != nil { - return err - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) validateVMFolder(formats strfmt.Registry) error { - if swag.IsZero(m.VMFolder) { // not required - return nil - } - - if m.VMFolder != nil { - if err := m.VMFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm esxi source config based on the context it is used -func (m *RecoverVmwareVMEsxiSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastores(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) contextValidateDatastores(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Datastores); i++ { - - if m.Datastores[i] != nil { - - if swag.IsZero(m.Datastores[i]) { // not required - return nil - } - - if err := m.Datastores[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) 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 -} - -func (m *RecoverVmwareVMEsxiSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMEsxiSourceConfig) contextValidateVMFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.VMFolder != nil { - - if swag.IsZero(m.VMFolder) { // not required - return nil - } - - if err := m.VMFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMEsxiSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMEsxiSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMEsxiSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_new_network_config.go b/v2/models/recover_vmware_vm_new_network_config.go deleted file mode 100644 index 31cabb64..00000000 --- a/v2/models/recover_vmware_vm_new_network_config.go +++ /dev/null @@ -1,117 +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" -) - -// RecoverVmwareVMNewNetworkConfig Recover VMware VMs New Network configuration. -// -// Specifies the new network config parameters to be applied to VMware VMs. -// -// swagger:model RecoverVmwareVmNewNetworkConfig -type RecoverVmwareVMNewNetworkConfig struct { - - // Specifies whether the attached network should be left in disabled state. Default is false - DisableNetwork *bool `json:"disableNetwork,omitempty"` - - // 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 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"` -} - -// Validate validates this recover vmware Vm new network config -func (m *RecoverVmwareVMNewNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNetworkPortGroup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMNewNetworkConfig) validateNetworkPortGroup(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if m.NetworkPortGroup != nil { - if err := m.NetworkPortGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm new network config based on the context it is used -func (m *RecoverVmwareVMNewNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetworkPortGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMNewNetworkConfig) contextValidateNetworkPortGroup(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkPortGroup != nil { - - if swag.IsZero(m.NetworkPortGroup) { // not required - return nil - } - - if err := m.NetworkPortGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkPortGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkPortGroup") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMNewNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMNewNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMNewNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_new_source_config.go b/v2/models/recover_vmware_vm_new_source_config.go deleted file mode 100644 index 4fae33c2..00000000 --- a/v2/models/recover_vmware_vm_new_source_config.go +++ /dev/null @@ -1,270 +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" -) - -// RecoverVmwareVMNewSourceConfig Recover VMware VMs New Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered. -// -// swagger:model RecoverVmwareVmNewSourceConfig -type RecoverVmwareVMNewSourceConfig struct { - - // Specifies the type of VMware source to which the VMs are being restored. - // Required: true - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector"] - SourceType *string `json:"sourceType"` - - // standalone host params - StandaloneHostParams *RecoverVmwareVMEsxiSourceConfig `json:"standaloneHostParams,omitempty"` - - // v center params - VCenterParams *RecoverVmwareVMVCenterSourceConfig `json:"vCenterParams,omitempty"` - - // v cloud director params - VCloudDirectorParams *RecoverVmwareVMVCDSourceConfig `json:"vCloudDirectorParams,omitempty"` -} - -// Validate validates this recover vmware Vm new source config -func (m *RecoverVmwareVMNewSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandaloneHostParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCenterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCloudDirectorParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoverVmwareVmNewSourceConfigTypeSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVmNewSourceConfigTypeSourceTypePropEnum = append(recoverVmwareVmNewSourceConfigTypeSourceTypePropEnum, v) - } -} - -const ( - - // RecoverVmwareVMNewSourceConfigSourceTypeKVCenter captures enum value "kVCenter" - RecoverVmwareVMNewSourceConfigSourceTypeKVCenter string = "kVCenter" - - // RecoverVmwareVMNewSourceConfigSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - RecoverVmwareVMNewSourceConfigSourceTypeKStandaloneHost string = "kStandaloneHost" - - // RecoverVmwareVMNewSourceConfigSourceTypeKvCloudDirector captures enum value "kvCloudDirector" - RecoverVmwareVMNewSourceConfigSourceTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *RecoverVmwareVMNewSourceConfig) validateSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVmNewSourceConfigTypeSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - // value enum - if err := m.validateSourceTypeEnum("sourceType", "body", *m.SourceType); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) validateStandaloneHostParams(formats strfmt.Registry) error { - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if m.StandaloneHostParams != nil { - if err := m.StandaloneHostParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) validateVCenterParams(formats strfmt.Registry) error { - if swag.IsZero(m.VCenterParams) { // not required - return nil - } - - if m.VCenterParams != nil { - if err := m.VCenterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) validateVCloudDirectorParams(formats strfmt.Registry) error { - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if m.VCloudDirectorParams != nil { - if err := m.VCloudDirectorParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm new source config based on the context it is used -func (m *RecoverVmwareVMNewSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStandaloneHostParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVCenterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVCloudDirectorParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) contextValidateStandaloneHostParams(ctx context.Context, formats strfmt.Registry) error { - - if m.StandaloneHostParams != nil { - - if swag.IsZero(m.StandaloneHostParams) { // not required - return nil - } - - if err := m.StandaloneHostParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standaloneHostParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standaloneHostParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) contextValidateVCenterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VCenterParams != nil { - - if swag.IsZero(m.VCenterParams) { // not required - return nil - } - - if err := m.VCenterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterParams") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMNewSourceConfig) contextValidateVCloudDirectorParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VCloudDirectorParams != nil { - - if swag.IsZero(m.VCloudDirectorParams) { // not required - return nil - } - - if err := m.VCloudDirectorParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCloudDirectorParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCloudDirectorParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMNewSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMNewSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMNewSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_new_source_network_config.go b/v2/models/recover_vmware_vm_new_source_network_config.go deleted file mode 100644 index b87408b8..00000000 --- a/v2/models/recover_vmware_vm_new_source_network_config.go +++ /dev/null @@ -1,114 +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" -) - -// RecoverVmwareVMNewSourceNetworkConfig Recover VMware VMs New Source Network configuration. -// -// Specifies the network config parameters to be applied to VMware VMs if recovering to new Source. -// -// swagger:model RecoverVmwareVmNewSourceNetworkConfig -type RecoverVmwareVMNewSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies a new network configuration for the VM recovery. - NewNetworkConfig *RecoverVmwareVMNewNetworkConfig `json:"newNetworkConfig,omitempty"` -} - -// Validate validates this recover vmware Vm new source network config -func (m *RecoverVmwareVMNewSourceNetworkConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMNewSourceNetworkConfig) validateNewNetworkConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewNetworkConfig) { // not required - return nil - } - - if m.NewNetworkConfig != nil { - if err := m.NewNetworkConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newNetworkConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm new source network config based on the context it is used -func (m *RecoverVmwareVMNewSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMNewSourceNetworkConfig) contextValidateNewNetworkConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewNetworkConfig != nil { - - if swag.IsZero(m.NewNetworkConfig) { // not required - return nil - } - - if err := m.NewNetworkConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newNetworkConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newNetworkConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMNewSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMNewSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMNewSourceNetworkConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_original_source_config.go b/v2/models/recover_vmware_vm_original_source_config.go deleted file mode 100644 index dedbbf24..00000000 --- a/v2/models/recover_vmware_vm_original_source_config.go +++ /dev/null @@ -1,111 +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" -) - -// RecoverVmwareVMOriginalSourceConfig Recover VMware VMs Original Source Config. -// -// Specifies the Source configuration if VM's are being recovered to Original Source. -// -// swagger:model RecoverVmwareVmOriginalSourceConfig -type RecoverVmwareVMOriginalSourceConfig struct { - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverVmwareVMOriginalSourceNetworkConfig `json:"networkConfig,omitempty"` -} - -// Validate validates this recover vmware Vm original source config -func (m *RecoverVmwareVMOriginalSourceConfig) 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 *RecoverVmwareVMOriginalSourceConfig) 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 recover vmware Vm original source config based on the context it is used -func (m *RecoverVmwareVMOriginalSourceConfig) 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 *RecoverVmwareVMOriginalSourceConfig) 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 *RecoverVmwareVMOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_original_source_network_config.go b/v2/models/recover_vmware_vm_original_source_network_config.go deleted file mode 100644 index 47ab13d4..00000000 --- a/v2/models/recover_vmware_vm_original_source_network_config.go +++ /dev/null @@ -1,55 +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" -) - -// RecoverVmwareVMOriginalSourceNetworkConfig Recover VMware VMs Original Source Network configuration. -// -// Specifies the network config parameters to be applied for VMware VMs if recovering to original Source. -// -// swagger:model RecoverVmwareVmOriginalSourceNetworkConfig -type RecoverVmwareVMOriginalSourceNetworkConfig struct { - - // If this is set to true, then the network will be detached from the recovered VMs. All the other networking parameters set will be ignored if set to true. Default value is false. - DetachNetwork *bool `json:"detachNetwork,omitempty"` - - // Specifies whether the attached network should be left in disabled state. Default is false. - DisableNetwork *bool `json:"disableNetwork,omitempty"` -} - -// Validate validates this recover vmware Vm original source network config -func (m *RecoverVmwareVMOriginalSourceNetworkConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recover vmware Vm original source network config based on context it is used -func (m *RecoverVmwareVMOriginalSourceNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMOriginalSourceNetworkConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMOriginalSourceNetworkConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMOriginalSourceNetworkConfig - 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 deleted file mode 100644 index a11dcf37..00000000 --- a/v2/models/recover_vmware_vm_params.go +++ /dev/null @@ -1,225 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVMParams Recover VMware VM params. -// -// Specifies the parameters to recover VMware VM. -// -// swagger:model RecoverVmwareVmParams -type RecoverVmwareVMParams struct { - - // Specifies the Protection Group Runs params to recover. All the VM's that are successfully backed up by specified Runs will be recovered. This can be specified along with individual snapshots of VMs. User has to make sure that specified Object snapshots and Protection Group Runs should not have any intersection. For example, user cannot specify multiple Runs which has same Object or an Object snapshot and a Run which has same Object's snapshot. - RecoverProtectionGroupRunsParams []*RecoverProtectionGroupRunParams `json:"recoverProtectionGroupRunsParams"` - - // Specifies the environment of the recovery target. The corresponding params below must be filled out. - // Required: true - // Enum: ["kVMware"] - TargetEnvironment *string `json:"targetEnvironment"` - - // Specifies the params for recovering to a VMware target. - VmwareTargetParams *VmwareTargetParamsForRecoverVM `json:"vmwareTargetParams,omitempty"` -} - -// Validate validates this recover vmware Vm params -func (m *RecoverVmwareVMParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverProtectionGroupRunsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareTargetParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMParams) validateRecoverProtectionGroupRunsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverProtectionGroupRunsParams) { // not required - return nil - } - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - continue - } - - if m.RecoverProtectionGroupRunsParams[i] != nil { - if err := m.RecoverProtectionGroupRunsParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var recoverVmwareVmParamsTypeTargetEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoverVmwareVmParamsTypeTargetEnvironmentPropEnum = append(recoverVmwareVmParamsTypeTargetEnvironmentPropEnum, v) - } -} - -const ( - - // RecoverVmwareVMParamsTargetEnvironmentKVMware captures enum value "kVMware" - RecoverVmwareVMParamsTargetEnvironmentKVMware string = "kVMware" -) - -// prop value enum -func (m *RecoverVmwareVMParams) validateTargetEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoverVmwareVmParamsTypeTargetEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoverVmwareVMParams) validateTargetEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("targetEnvironment", "body", m.TargetEnvironment); err != nil { - return err - } - - // value enum - if err := m.validateTargetEnvironmentEnum("targetEnvironment", "body", *m.TargetEnvironment); err != nil { - return err - } - - return nil -} - -func (m *RecoverVmwareVMParams) validateVmwareTargetParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if m.VmwareTargetParams != nil { - if err := m.VmwareTargetParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm params based on the context it is used -func (m *RecoverVmwareVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverProtectionGroupRunsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMParams) contextValidateRecoverProtectionGroupRunsParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverProtectionGroupRunsParams); i++ { - - if m.RecoverProtectionGroupRunsParams[i] != nil { - - if swag.IsZero(m.RecoverProtectionGroupRunsParams[i]) { // not required - return nil - } - - if err := m.RecoverProtectionGroupRunsParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverProtectionGroupRunsParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareTargetParams != nil { - - if swag.IsZero(m.VmwareTargetParams) { // not required - return nil - } - - if err := m.VmwareTargetParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareTargetParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareTargetParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMParams) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_v_c_d_source_config.go b/v2/models/recover_vmware_vm_v_c_d_source_config.go deleted file mode 100644 index 05e04491..00000000 --- a/v2/models/recover_vmware_vm_v_c_d_source_config.go +++ /dev/null @@ -1,426 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVMVCDSourceConfig Recover VMware VMs vCloudDirector Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered for vCloudDirector sources. -// -// swagger:model RecoverVmwareVmVCDSourceConfig -type RecoverVmwareVMVCDSourceConfig struct { - - // Specifies the datastore objects where the object's files should be recovered to. This should only be specified if storageProfile is not specified. - Datastores []*RecoveryObjectIdentifier `json:"datastores"` - - // Specifies the VDC organization network which will be attached with recoverd VM. - OrgVdcNetwork *OrgVDCNetwork `json:"orgVdcNetwork,omitempty"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Specifies the storage profile to which the objects should be recovered. This should only be specified if datastores are not specified. - StorageProfile *VcdStorageProfileParams `json:"storageProfile,omitempty"` - - // Specifies the vApp object where the recovered objects will be attached. - VApp *RecoveryObjectIdentifier `json:"vApp,omitempty"` - - // Specifies the VDC object where the recovered objects will be attached. - // Required: true - Vdc *RecoveryObjectIdentifier `json:"vdc"` -} - -// Validate validates this recover vmware Vm v c d source config -func (m *RecoverVmwareVMVCDSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastores(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgVdcNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageProfile(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVApp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVdc(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) validateDatastores(formats strfmt.Registry) error { - if swag.IsZero(m.Datastores) { // not required - return nil - } - - for i := 0; i < len(m.Datastores); i++ { - if swag.IsZero(m.Datastores[i]) { // not required - continue - } - - if m.Datastores[i] != nil { - if err := m.Datastores[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) 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 *RecoverVmwareVMVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVMVCDSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) validateStorageProfile(formats strfmt.Registry) error { - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if m.StorageProfile != nil { - if err := m.StorageProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) validateVApp(formats strfmt.Registry) error { - if swag.IsZero(m.VApp) { // not required - return nil - } - - if m.VApp != nil { - if err := m.VApp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vApp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vApp") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) validateVdc(formats strfmt.Registry) error { - - if err := validate.Required("vdc", "body", m.Vdc); err != nil { - return err - } - - if m.Vdc != nil { - if err := m.Vdc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm v c d source config based on the context it is used -func (m *RecoverVmwareVMVCDSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastores(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageProfile(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVApp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVdc(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) contextValidateDatastores(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Datastores); i++ { - - if m.Datastores[i] != nil { - - if swag.IsZero(m.Datastores[i]) { // not required - return nil - } - - if err := m.Datastores[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) 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 *RecoverVmwareVMVCDSourceConfig) 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 -} - -func (m *RecoverVmwareVMVCDSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) contextValidateStorageProfile(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageProfile != nil { - - if swag.IsZero(m.StorageProfile) { // not required - return nil - } - - if err := m.StorageProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageProfile") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) contextValidateVApp(ctx context.Context, formats strfmt.Registry) error { - - if m.VApp != nil { - - if swag.IsZero(m.VApp) { // not required - return nil - } - - if err := m.VApp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vApp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vApp") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCDSourceConfig) contextValidateVdc(ctx context.Context, formats strfmt.Registry) error { - - if m.Vdc != nil { - - if err := m.Vdc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vdc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vdc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMVCDSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMVCDSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMVCDSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_vmware_vm_v_center_source_config.go b/v2/models/recover_vmware_vm_v_center_source_config.go deleted file mode 100644 index 38fe8331..00000000 --- a/v2/models/recover_vmware_vm_v_center_source_config.go +++ /dev/null @@ -1,326 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoverVmwareVMVCenterSourceConfig Recover VMware VMs vCenter Source Config. -// -// Specifies the new destination Source configuration where the VMs will be recovered for vCenter sources. -// -// swagger:model RecoverVmwareVmVCenterSourceConfig -type RecoverVmwareVMVCenterSourceConfig struct { - - // Specifies the datastore objects where the object's files should be recovered to. - // Required: true - Datastores []*RecoveryObjectIdentifier `json:"datastores"` - - // Specifies the networking configuration to be applied to the recovered VMs. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies the resource pool object where the recovered objects will be attached. - // Required: true - ResourcePool *RecoveryObjectIdentifier `json:"resourcePool"` - - // Specifies the id of the parent source to recover the VMs. - // Required: true - Source *RecoveryObjectIdentifier `json:"source"` - - // Folder where the VMs should be created. - VMFolder *RecoveryObjectIdentifier `json:"vmFolder,omitempty"` -} - -// Validate validates this recover vmware Vm v center source config -func (m *RecoverVmwareVMVCenterSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDatastores(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourcePool(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVMFolder(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) validateDatastores(formats strfmt.Registry) error { - - if err := validate.Required("datastores", "body", m.Datastores); err != nil { - return err - } - - for i := 0; i < len(m.Datastores); i++ { - if swag.IsZero(m.Datastores[i]) { // not required - continue - } - - if m.Datastores[i] != nil { - if err := m.Datastores[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) 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 -} - -func (m *RecoverVmwareVMVCenterSourceConfig) validateResourcePool(formats strfmt.Registry) error { - - if err := validate.Required("resourcePool", "body", m.ResourcePool); err != nil { - return err - } - - if m.ResourcePool != nil { - if err := m.ResourcePool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) validateSource(formats strfmt.Registry) error { - - if err := validate.Required("source", "body", m.Source); err != nil { - return err - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) validateVMFolder(formats strfmt.Registry) error { - if swag.IsZero(m.VMFolder) { // not required - return nil - } - - if m.VMFolder != nil { - if err := m.VMFolder.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolder") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recover vmware Vm v center source config based on the context it is used -func (m *RecoverVmwareVMVCenterSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDatastores(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourcePool(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVMFolder(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) contextValidateDatastores(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Datastores); i++ { - - if m.Datastores[i] != nil { - - if swag.IsZero(m.Datastores[i]) { // not required - return nil - } - - if err := m.Datastores[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("datastores" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("datastores" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) 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 -} - -func (m *RecoverVmwareVMVCenterSourceConfig) contextValidateResourcePool(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourcePool != nil { - - if err := m.ResourcePool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcePool") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcePool") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *RecoverVmwareVMVCenterSourceConfig) contextValidateVMFolder(ctx context.Context, formats strfmt.Registry) error { - - if m.VMFolder != nil { - - if swag.IsZero(m.VMFolder) { // not required - return nil - } - - if err := m.VMFolder.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmFolder") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmFolder") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVmwareVMVCenterSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVmwareVMVCenterSourceConfig) UnmarshalBinary(b []byte) error { - var res RecoverVmwareVMVCenterSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recover_volume_mapping.go b/v2/models/recover_volume_mapping.go deleted file mode 100644 index 265d703d..00000000 --- a/v2/models/recover_volume_mapping.go +++ /dev/null @@ -1,90 +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" -) - -// RecoverVolumeMapping Recover Volume Mapping -// -// Specifies the mapping from a source volume to a destination volume. -// -// swagger:model RecoverVolumeMapping -type RecoverVolumeMapping struct { - - // Specifies the guid of the source volume. - // Required: true - SourceVolumeGUID *string `json:"sourceVolumeGuid"` - - // Specifies the guid of the destination volume. - // Required: true - DestinationVolumeGUID *string `json:"destinationVolumeGuid"` -} - -// Validate validates this recover volume mapping -func (m *RecoverVolumeMapping) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceVolumeGUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestinationVolumeGUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoverVolumeMapping) validateSourceVolumeGUID(formats strfmt.Registry) error { - - if err := validate.Required("sourceVolumeGuid", "body", m.SourceVolumeGUID); err != nil { - return err - } - - return nil -} - -func (m *RecoverVolumeMapping) validateDestinationVolumeGUID(formats strfmt.Registry) error { - - if err := validate.Required("destinationVolumeGuid", "body", m.DestinationVolumeGUID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recover volume mapping based on context it is used -func (m *RecoverVolumeMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoverVolumeMapping) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoverVolumeMapping) UnmarshalBinary(b []byte) error { - var res RecoverVolumeMapping - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovered_or_cloned_vms_rename_config.go b/v2/models/recovered_or_cloned_vms_rename_config.go deleted file mode 100644 index 041bc1c8..00000000 --- a/v2/models/recovered_or_cloned_vms_rename_config.go +++ /dev/null @@ -1,55 +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" -) - -// RecoveredOrClonedVmsRenameConfig Recover or Clone VMs Rename Config params. -// -// Specifies the prefix and suffix to be added to VMs that are recovered or cloned. -// -// swagger:model RecoveredOrClonedVmsRenameConfig -type RecoveredOrClonedVmsRenameConfig struct { - - // Specifies the prefix string to be added to recovered or cloned object names. - Prefix *string `json:"prefix,omitempty"` - - // Specifies the suffix string to be added to recovered or cloned object names. - Suffix *string `json:"suffix,omitempty"` -} - -// Validate validates this recovered or cloned vms rename config -func (m *RecoveredOrClonedVmsRenameConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this recovered or cloned vms rename config based on context it is used -func (m *RecoveredOrClonedVmsRenameConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveredOrClonedVmsRenameConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveredOrClonedVmsRenameConfig) UnmarshalBinary(b []byte) error { - var res RecoveredOrClonedVmsRenameConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recoveries.go b/v2/models/recoveries.go deleted file mode 100644 index 495adaa1..00000000 --- a/v2/models/recoveries.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Recoveries List of Recoveries. -// -// Specifies list of Recoveries. -// -// swagger:model Recoveries -type Recoveries struct { - - // Specifies list of Recoveries. - Recoveries []*Recovery `json:"recoveries"` -} - -// Validate validates this recoveries -func (m *Recoveries) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveries(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Recoveries) validateRecoveries(formats strfmt.Registry) error { - if swag.IsZero(m.Recoveries) { // not required - return nil - } - - for i := 0; i < len(m.Recoveries); i++ { - if swag.IsZero(m.Recoveries[i]) { // not required - continue - } - - if m.Recoveries[i] != nil { - if err := m.Recoveries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this recoveries based on the context it is used -func (m *Recoveries) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveries(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Recoveries) contextValidateRecoveries(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Recoveries); i++ { - - if m.Recoveries[i] != nil { - - if swag.IsZero(m.Recoveries[i]) { // not required - return nil - } - - if err := m.Recoveries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveries" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Recoveries) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Recoveries) UnmarshalBinary(b []byte) error { - var res Recoveries - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery.go b/v2/models/recovery.go deleted file mode 100644 index c69906f1..00000000 --- a/v2/models/recovery.go +++ /dev/null @@ -1,1908 +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" -) - -// Recovery Recovery. -// -// Specifies a Recovery. -// -// swagger:model Recovery -type Recovery struct { - CommonRecoveryResponseParams - - // Specifies the parameters which are specific to Acropolis related Recovery. - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - // Specifies the parameters which are specific to AWS related Recovery. - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - // Specifies the parameters which are specific to Azure related Recovery. - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - // Specifies the parameters which are specific to Cassandra Recovery. - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters which are specific to Couchbase Recovery. - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters which are specific to Elastifile related Recovery. - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters which are specific to Exchange related Recovery. - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific to FlashBlade related Recovery. - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters which are specific to GCP related Recovery. - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - // Specifies the parameters which are specific to Generic NAS related Recovery. - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters which are specific to GPFS related Recovery. - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters which are specific to Hbase Recovery. - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters which are specific to HDFS Recovery. - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific to Hive Recovery. - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - // Specifies the parameters which are specific to HyperV related Recovery. - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - // Specifies the parameters which are specific to Ibm FlashSystem related Recovery. - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - // Specifies the parameters which are specific to Isilon related Recovery. - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - // Specifies the parameters which are specific to Kubernetes related Recovery. - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - // Specifies the parameters which are specific to KVM related Recovery. - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - // Specifies the parameters which are specific to MongoDB Recovery. - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters which are specific to MsSQL related Recovery. - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - // Specifies the parameters which are specific to Netapp related Recovery. - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - // Specifies the parameters which are specific to Office 365 related Recovery. - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - // Specifies the parameters which are specific to Oracle related Recovery. - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - // Specifies the parameters which are specific to Physical related Recovery. - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - // Specifies the parameters which are specific to Pure related Recovery. - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - // Specifies the parameters which are specific to Salesforce related Recovery. - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters which are specific to Universal Data Adapter Recovery. - UdaParams *UdaParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific to View related Recovery. - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - // Specifies the parameters which are specific to VMware related Recovery. - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Recovery) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoveryResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoveryResponseParams = aO0 - - // AO1 - var dataAO1 struct { - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaParams `json:"udaParams,omitempty"` - - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AcropolisParams = dataAO1.AcropolisParams - - m.AwsParams = dataAO1.AwsParams - - m.AzureParams = dataAO1.AzureParams - - m.CassandraParams = dataAO1.CassandraParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GcpParams = dataAO1.GcpParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.GpfsParams = dataAO1.GpfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HiveParams = dataAO1.HiveParams - - m.HypervParams = dataAO1.HypervParams - - m.IbmFlashSystemParams = dataAO1.IbmFlashSystemParams - - m.IsilonParams = dataAO1.IsilonParams - - m.KubernetesParams = dataAO1.KubernetesParams - - m.KvmParams = dataAO1.KvmParams - - m.MongodbParams = dataAO1.MongodbParams - - m.MssqlParams = dataAO1.MssqlParams - - m.NetappParams = dataAO1.NetappParams - - m.Office365Params = dataAO1.Office365Params - - m.OracleParams = dataAO1.OracleParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.PureParams = dataAO1.PureParams - - m.SfdcParams = dataAO1.SfdcParams - - m.UdaParams = dataAO1.UdaParams - - m.ViewParams = dataAO1.ViewParams - - m.VmwareParams = dataAO1.VmwareParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Recovery) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoveryResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AcropolisParams *RecoverAcropolisParams `json:"acropolisParams,omitempty"` - - AwsParams *RecoverAwsParams `json:"awsParams,omitempty"` - - AzureParams *RecoverAzureParams `json:"azureParams,omitempty"` - - CassandraParams *CassandraParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchbaseParams `json:"couchbaseParams,omitempty"` - - ElastifileParams *RecoverElastifileParams `json:"elastifileParams,omitempty"` - - ExchangeParams *RecoverExchangeParams `json:"exchangeParams,omitempty"` - - FlashbladeParams *RecoverFlashbladeParams `json:"flashbladeParams,omitempty"` - - GcpParams *RecoverGcpParams `json:"gcpParams,omitempty"` - - GenericNasParams *RecoverGenericNasParams `json:"genericNasParams,omitempty"` - - GpfsParams *RecoverGpfsParams `json:"gpfsParams,omitempty"` - - HbaseParams *HbaseParams `json:"hbaseParams,omitempty"` - - HdfsParams *HdfsParams `json:"hdfsParams,omitempty"` - - HiveParams *HiveParams `json:"hiveParams,omitempty"` - - HypervParams *RecoverHyperVParams `json:"hypervParams,omitempty"` - - IbmFlashSystemParams *RecoverPureParams `json:"ibmFlashSystemParams,omitempty"` - - IsilonParams *RecoverIsilonParams `json:"isilonParams,omitempty"` - - KubernetesParams *RecoverKubernetesParams `json:"kubernetesParams,omitempty"` - - KvmParams *RecoverKvmParams `json:"kvmParams,omitempty"` - - MongodbParams *MongodbParams `json:"mongodbParams,omitempty"` - - MssqlParams *RecoverSQLParams `json:"mssqlParams,omitempty"` - - NetappParams *RecoverNetappParams `json:"netappParams,omitempty"` - - Office365Params *RecoverO365Params `json:"office365Params,omitempty"` - - OracleParams *RecoverOracleParams `json:"oracleParams,omitempty"` - - PhysicalParams *RecoverPhysicalParams `json:"physicalParams,omitempty"` - - PureParams *RecoverPureParams `json:"pureParams,omitempty"` - - SfdcParams *RecoverSalesforceParams `json:"sfdcParams,omitempty"` - - UdaParams *UdaParams `json:"udaParams,omitempty"` - - ViewParams *RecoverViewParams `json:"viewParams,omitempty"` - - VmwareParams *RecoverVmwareParams `json:"vmwareParams,omitempty"` - } - - dataAO1.AcropolisParams = m.AcropolisParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.AzureParams = m.AzureParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.IbmFlashSystemParams = m.IbmFlashSystemParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.KubernetesParams = m.KubernetesParams - - dataAO1.KvmParams = m.KvmParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.MssqlParams = m.MssqlParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.OracleParams = m.OracleParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.PureParams = m.PureParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.ViewParams = m.ViewParams - - dataAO1.VmwareParams = m.VmwareParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this recovery -func (m *Recovery) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoveryResponseParams - if err := m.CommonRecoveryResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAcropolisParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIbmFlashSystemParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKubernetesParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKvmParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Recovery) validateAcropolisParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if m.AcropolisParams != nil { - if err := m.AcropolisParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateIbmFlashSystemParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if m.IbmFlashSystemParams != nil { - if err := m.IbmFlashSystemParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateKubernetesParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if m.KubernetesParams != nil { - if err := m.KubernetesParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateKvmParams(formats strfmt.Registry) error { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if m.KvmParams != nil { - if err := m.KvmParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateMssqlParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if m.MssqlParams != nil { - if err := m.MssqlParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validatePureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if m.PureParams != nil { - if err := m.PureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateViewParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this recovery based on the context it is used -func (m *Recovery) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoveryResponseParams - if err := m.CommonRecoveryResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAcropolisParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIbmFlashSystemParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKubernetesParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKvmParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Recovery) contextValidateAcropolisParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AcropolisParams != nil { - - if swag.IsZero(m.AcropolisParams) { // not required - return nil - } - - if err := m.AcropolisParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateIbmFlashSystemParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IbmFlashSystemParams != nil { - - if swag.IsZero(m.IbmFlashSystemParams) { // not required - return nil - } - - if err := m.IbmFlashSystemParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateKubernetesParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KubernetesParams != nil { - - if swag.IsZero(m.KubernetesParams) { // not required - return nil - } - - if err := m.KubernetesParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateKvmParams(ctx context.Context, formats strfmt.Registry) error { - - if m.KvmParams != nil { - - if swag.IsZero(m.KvmParams) { // not required - return nil - } - - if err := m.KvmParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateMssqlParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlParams != nil { - - if swag.IsZero(m.MssqlParams) { // not required - return nil - } - - if err := m.MssqlParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidatePureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PureParams != nil { - - if swag.IsZero(m.PureParams) { // not required - return nil - } - - if err := m.PureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -func (m *Recovery) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Recovery) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Recovery) UnmarshalBinary(b []byte) error { - var res Recovery - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_object_identifier.go b/v2/models/recovery_object_identifier.go deleted file mode 100644 index b7cf70c6..00000000 --- a/v2/models/recovery_object_identifier.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" - "github.com/go-openapi/validate" -) - -// RecoveryObjectIdentifier Recovery Object Identifier. -// -// Specifies the object identifier to perform recovery. -// -// swagger:model RecoveryObjectIdentifier -type RecoveryObjectIdentifier struct { - - // Specifies the id of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this recovery object identifier -func (m *RecoveryObjectIdentifier) 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 *RecoveryObjectIdentifier) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this recovery object identifier based on the context it is used -func (m *RecoveryObjectIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveryObjectIdentifier) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryObjectIdentifier) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryObjectIdentifier) UnmarshalBinary(b []byte) error { - var res RecoveryObjectIdentifier - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_oracle_task_info.go b/v2/models/recovery_oracle_task_info.go deleted file mode 100644 index 88576ba6..00000000 --- a/v2/models/recovery_oracle_task_info.go +++ /dev/null @@ -1,204 +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" -) - -// RecoveryOracleTaskInfo Recovery Task Info -// -// Specifies the info about a recovery task. -// -// swagger:model RecoveryOracleTaskInfo -type RecoveryOracleTaskInfo struct { - - // Specifies the progress monitor id. - // Read Only: true - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Specifies the status of the recovery. - // Read Only: true - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Specifies the start time in Unix timestamp epoch in microseconds. - // Read Only: true - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in microseconds. - // Read Only: true - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` -} - -// Validate validates this recovery oracle task info -func (m *RecoveryOracleTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoveryOracleTaskInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoveryOracleTaskInfoTypeStatusPropEnum = append(recoveryOracleTaskInfoTypeStatusPropEnum, v) - } -} - -const ( - - // RecoveryOracleTaskInfoStatusAccepted captures enum value "Accepted" - RecoveryOracleTaskInfoStatusAccepted string = "Accepted" - - // RecoveryOracleTaskInfoStatusRunning captures enum value "Running" - RecoveryOracleTaskInfoStatusRunning string = "Running" - - // RecoveryOracleTaskInfoStatusCanceled captures enum value "Canceled" - RecoveryOracleTaskInfoStatusCanceled string = "Canceled" - - // RecoveryOracleTaskInfoStatusCanceling captures enum value "Canceling" - RecoveryOracleTaskInfoStatusCanceling string = "Canceling" - - // RecoveryOracleTaskInfoStatusFailed captures enum value "Failed" - RecoveryOracleTaskInfoStatusFailed string = "Failed" - - // RecoveryOracleTaskInfoStatusMissed captures enum value "Missed" - RecoveryOracleTaskInfoStatusMissed string = "Missed" - - // RecoveryOracleTaskInfoStatusSucceeded captures enum value "Succeeded" - RecoveryOracleTaskInfoStatusSucceeded string = "Succeeded" - - // RecoveryOracleTaskInfoStatusSucceededWithWarning captures enum value "SucceededWithWarning" - RecoveryOracleTaskInfoStatusSucceededWithWarning string = "SucceededWithWarning" - - // RecoveryOracleTaskInfoStatusOnHold captures enum value "OnHold" - RecoveryOracleTaskInfoStatusOnHold string = "OnHold" - - // RecoveryOracleTaskInfoStatusFinalizing captures enum value "Finalizing" - RecoveryOracleTaskInfoStatusFinalizing string = "Finalizing" - - // RecoveryOracleTaskInfoStatusSkipped captures enum value "Skipped" - RecoveryOracleTaskInfoStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *RecoveryOracleTaskInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoveryOracleTaskInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoveryOracleTaskInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this recovery oracle task info based on the context it is used -func (m *RecoveryOracleTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProgressTaskID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveryOracleTaskInfo) contextValidateProgressTaskID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "progressTaskId", "body", m.ProgressTaskID); err != nil { - return err - } - - return nil -} - -func (m *RecoveryOracleTaskInfo) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *RecoveryOracleTaskInfo) contextValidateStartTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "startTimeUsecs", "body", m.StartTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *RecoveryOracleTaskInfo) contextValidateEndTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "endTimeUsecs", "body", m.EndTimeUsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryOracleTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryOracleTaskInfo) UnmarshalBinary(b []byte) error { - var res RecoveryOracleTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_process_type.go b/v2/models/recovery_process_type.go deleted file mode 100644 index 680b9a73..00000000 --- a/v2/models/recovery_process_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RecoveryProcessType Recovery Process Type -// -// # Recovery Process Type -// -// swagger:model RecoveryProcessType -type RecoveryProcessType struct { - - // Specifies the recovery process type. - // Enum: ["InstantRecovery","CopyRecovery"] - RecoveryProcessType string `json:"recoveryProcessType,omitempty"` -} - -// Validate validates this recovery process type -func (m *RecoveryProcessType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoveryProcessTypeTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InstantRecovery","CopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoveryProcessTypeTypeRecoveryProcessTypePropEnum = append(recoveryProcessTypeTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // RecoveryProcessTypeRecoveryProcessTypeInstantRecovery captures enum value "InstantRecovery" - RecoveryProcessTypeRecoveryProcessTypeInstantRecovery string = "InstantRecovery" - - // RecoveryProcessTypeRecoveryProcessTypeCopyRecovery captures enum value "CopyRecovery" - RecoveryProcessTypeRecoveryProcessTypeCopyRecovery string = "CopyRecovery" -) - -// prop value enum -func (m *RecoveryProcessType) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoveryProcessTypeTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoveryProcessType) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recovery process type based on context it is used -func (m *RecoveryProcessType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryProcessType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryProcessType) UnmarshalBinary(b []byte) error { - var res RecoveryProcessType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_task_info.go b/v2/models/recovery_task_info.go deleted file mode 100644 index 7a2ba882..00000000 --- a/v2/models/recovery_task_info.go +++ /dev/null @@ -1,204 +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" -) - -// RecoveryTaskInfo Recovery Task Info -// -// Specifies the info about a recovery task. -// -// swagger:model RecoveryTaskInfo -type RecoveryTaskInfo struct { - - // Specifies the progress monitor path. - // Read Only: true - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Specifies the status of the recovery. - // Read Only: true - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Specifies the start time in Unix timestamp epoch in microseconds. - // Read Only: true - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in microseconds. - // Read Only: true - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` -} - -// Validate validates this recovery task info -func (m *RecoveryTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoveryTaskInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoveryTaskInfoTypeStatusPropEnum = append(recoveryTaskInfoTypeStatusPropEnum, v) - } -} - -const ( - - // RecoveryTaskInfoStatusAccepted captures enum value "Accepted" - RecoveryTaskInfoStatusAccepted string = "Accepted" - - // RecoveryTaskInfoStatusRunning captures enum value "Running" - RecoveryTaskInfoStatusRunning string = "Running" - - // RecoveryTaskInfoStatusCanceled captures enum value "Canceled" - RecoveryTaskInfoStatusCanceled string = "Canceled" - - // RecoveryTaskInfoStatusCanceling captures enum value "Canceling" - RecoveryTaskInfoStatusCanceling string = "Canceling" - - // RecoveryTaskInfoStatusFailed captures enum value "Failed" - RecoveryTaskInfoStatusFailed string = "Failed" - - // RecoveryTaskInfoStatusMissed captures enum value "Missed" - RecoveryTaskInfoStatusMissed string = "Missed" - - // RecoveryTaskInfoStatusSucceeded captures enum value "Succeeded" - RecoveryTaskInfoStatusSucceeded string = "Succeeded" - - // RecoveryTaskInfoStatusSucceededWithWarning captures enum value "SucceededWithWarning" - RecoveryTaskInfoStatusSucceededWithWarning string = "SucceededWithWarning" - - // RecoveryTaskInfoStatusOnHold captures enum value "OnHold" - RecoveryTaskInfoStatusOnHold string = "OnHold" - - // RecoveryTaskInfoStatusFinalizing captures enum value "Finalizing" - RecoveryTaskInfoStatusFinalizing string = "Finalizing" - - // RecoveryTaskInfoStatusSkipped captures enum value "Skipped" - RecoveryTaskInfoStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *RecoveryTaskInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoveryTaskInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoveryTaskInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this recovery task info based on the context it is used -func (m *RecoveryTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProgressTaskID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveryTaskInfo) contextValidateProgressTaskID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "progressTaskId", "body", m.ProgressTaskID); err != nil { - return err - } - - return nil -} - -func (m *RecoveryTaskInfo) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *RecoveryTaskInfo) contextValidateStartTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "startTimeUsecs", "body", m.StartTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *RecoveryTaskInfo) contextValidateEndTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "endTimeUsecs", "body", m.EndTimeUsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryTaskInfo) UnmarshalBinary(b []byte) error { - var res RecoveryTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_time_range_info.go b/v2/models/recovery_time_range_info.go deleted file mode 100644 index 2327d2c8..00000000 --- a/v2/models/recovery_time_range_info.go +++ /dev/null @@ -1,82 +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" -) - -// RecoveryTimeRangeInfo Time range. -// -// Specifies a valid time range to which this object can be recovered. -// -// swagger:model RecoveryTimeRangeInfo -type RecoveryTimeRangeInfo struct { - - // Specifies the start time of this time range. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of this time range. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies id of the Protection Group corresponding to this time range. - // Pattern: ^\d+:\d+:\d+$ - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` -} - -// Validate validates this recovery time range info -func (m *RecoveryTimeRangeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveryTimeRangeInfo) validateProtectionGroupID(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroupID) { // not required - return nil - } - - if err := validate.Pattern("protectionGroupId", "body", *m.ProtectionGroupID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recovery time range info based on context it is used -func (m *RecoveryTimeRangeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryTimeRangeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryTimeRangeInfo) UnmarshalBinary(b []byte) error { - var res RecoveryTimeRangeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_type.go b/v2/models/recovery_type.go deleted file mode 100644 index aadc0c85..00000000 --- a/v2/models/recovery_type.go +++ /dev/null @@ -1,224 +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" -) - -// RecoveryType Recovery Type -// -// # Recovery Type -// -// swagger:model RecoveryType -type RecoveryType struct { - - // Specifies the recovery types. - // Enum: ["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverRDSPostgres","RecoverAzureSQL","RecoverApps","CloneApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverExchangeDbs","CloneAppView","RecoverSanVolumes","RecoverSanGroup","RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats","RecoverNamespaces","RecoverObjects","RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords","DownloadFilesAndFolders","CloneVMs","CloneView","CloneRefreshApp","CloneVMsToView","ConvertAndDeployVMs","DeployVMs"] - RecoveryType string `json:"recoveryType,omitempty"` -} - -// Validate validates this recovery type -func (m *RecoveryType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var recoveryTypeTypeRecoveryTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","RecoverVApps","RecoverVAppTemplates","UptierSnapshot","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverRDSPostgres","RecoverAzureSQL","RecoverApps","CloneApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverExchangeDbs","CloneAppView","RecoverSanVolumes","RecoverSanGroup","RecoverMailbox","RecoverOneDrive","RecoverSharePoint","RecoverPublicFolders","RecoverMsGroup","RecoverMsTeam","ConvertToPst","DownloadChats","RecoverNamespaces","RecoverObjects","RecoverSfdcObjects","RecoverSfdcOrg","RecoverSfdcRecords","DownloadFilesAndFolders","CloneVMs","CloneView","CloneRefreshApp","CloneVMsToView","ConvertAndDeployVMs","DeployVMs"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - recoveryTypeTypeRecoveryTypePropEnum = append(recoveryTypeTypeRecoveryTypePropEnum, v) - } -} - -const ( - - // RecoveryTypeRecoveryTypeRecoverVMs captures enum value "RecoverVMs" - RecoveryTypeRecoveryTypeRecoverVMs string = "RecoverVMs" - - // RecoveryTypeRecoveryTypeRecoverFiles captures enum value "RecoverFiles" - RecoveryTypeRecoveryTypeRecoverFiles string = "RecoverFiles" - - // RecoveryTypeRecoveryTypeInstantVolumeMount captures enum value "InstantVolumeMount" - RecoveryTypeRecoveryTypeInstantVolumeMount string = "InstantVolumeMount" - - // RecoveryTypeRecoveryTypeRecoverVMDisks captures enum value "RecoverVmDisks" - RecoveryTypeRecoveryTypeRecoverVMDisks string = "RecoverVmDisks" - - // RecoveryTypeRecoveryTypeRecoverVApps captures enum value "RecoverVApps" - RecoveryTypeRecoveryTypeRecoverVApps string = "RecoverVApps" - - // RecoveryTypeRecoveryTypeRecoverVAppTemplates captures enum value "RecoverVAppTemplates" - RecoveryTypeRecoveryTypeRecoverVAppTemplates string = "RecoverVAppTemplates" - - // RecoveryTypeRecoveryTypeUptierSnapshot captures enum value "UptierSnapshot" - RecoveryTypeRecoveryTypeUptierSnapshot string = "UptierSnapshot" - - // RecoveryTypeRecoveryTypeRecoverRDS captures enum value "RecoverRDS" - RecoveryTypeRecoveryTypeRecoverRDS string = "RecoverRDS" - - // RecoveryTypeRecoveryTypeRecoverAurora captures enum value "RecoverAurora" - RecoveryTypeRecoveryTypeRecoverAurora string = "RecoverAurora" - - // RecoveryTypeRecoveryTypeRecoverS3Buckets captures enum value "RecoverS3Buckets" - RecoveryTypeRecoveryTypeRecoverS3Buckets string = "RecoverS3Buckets" - - // RecoveryTypeRecoveryTypeRecoverRDSPostgres captures enum value "RecoverRDSPostgres" - RecoveryTypeRecoveryTypeRecoverRDSPostgres string = "RecoverRDSPostgres" - - // RecoveryTypeRecoveryTypeRecoverAzureSQL captures enum value "RecoverAzureSQL" - RecoveryTypeRecoveryTypeRecoverAzureSQL string = "RecoverAzureSQL" - - // RecoveryTypeRecoveryTypeRecoverApps captures enum value "RecoverApps" - RecoveryTypeRecoveryTypeRecoverApps string = "RecoverApps" - - // RecoveryTypeRecoveryTypeCloneApps captures enum value "CloneApps" - RecoveryTypeRecoveryTypeCloneApps string = "CloneApps" - - // RecoveryTypeRecoveryTypeRecoverNasVolume captures enum value "RecoverNasVolume" - RecoveryTypeRecoveryTypeRecoverNasVolume string = "RecoverNasVolume" - - // RecoveryTypeRecoveryTypeRecoverPhysicalVolumes captures enum value "RecoverPhysicalVolumes" - RecoveryTypeRecoveryTypeRecoverPhysicalVolumes string = "RecoverPhysicalVolumes" - - // RecoveryTypeRecoveryTypeRecoverSystem captures enum value "RecoverSystem" - RecoveryTypeRecoveryTypeRecoverSystem string = "RecoverSystem" - - // RecoveryTypeRecoveryTypeRecoverExchangeDbs captures enum value "RecoverExchangeDbs" - RecoveryTypeRecoveryTypeRecoverExchangeDbs string = "RecoverExchangeDbs" - - // RecoveryTypeRecoveryTypeCloneAppView captures enum value "CloneAppView" - RecoveryTypeRecoveryTypeCloneAppView string = "CloneAppView" - - // RecoveryTypeRecoveryTypeRecoverSanVolumes captures enum value "RecoverSanVolumes" - RecoveryTypeRecoveryTypeRecoverSanVolumes string = "RecoverSanVolumes" - - // RecoveryTypeRecoveryTypeRecoverSanGroup captures enum value "RecoverSanGroup" - RecoveryTypeRecoveryTypeRecoverSanGroup string = "RecoverSanGroup" - - // RecoveryTypeRecoveryTypeRecoverMailbox captures enum value "RecoverMailbox" - RecoveryTypeRecoveryTypeRecoverMailbox string = "RecoverMailbox" - - // RecoveryTypeRecoveryTypeRecoverOneDrive captures enum value "RecoverOneDrive" - RecoveryTypeRecoveryTypeRecoverOneDrive string = "RecoverOneDrive" - - // RecoveryTypeRecoveryTypeRecoverSharePoint captures enum value "RecoverSharePoint" - RecoveryTypeRecoveryTypeRecoverSharePoint string = "RecoverSharePoint" - - // RecoveryTypeRecoveryTypeRecoverPublicFolders captures enum value "RecoverPublicFolders" - RecoveryTypeRecoveryTypeRecoverPublicFolders string = "RecoverPublicFolders" - - // RecoveryTypeRecoveryTypeRecoverMsGroup captures enum value "RecoverMsGroup" - RecoveryTypeRecoveryTypeRecoverMsGroup string = "RecoverMsGroup" - - // RecoveryTypeRecoveryTypeRecoverMsTeam captures enum value "RecoverMsTeam" - RecoveryTypeRecoveryTypeRecoverMsTeam string = "RecoverMsTeam" - - // RecoveryTypeRecoveryTypeConvertToPst captures enum value "ConvertToPst" - RecoveryTypeRecoveryTypeConvertToPst string = "ConvertToPst" - - // RecoveryTypeRecoveryTypeDownloadChats captures enum value "DownloadChats" - RecoveryTypeRecoveryTypeDownloadChats string = "DownloadChats" - - // RecoveryTypeRecoveryTypeRecoverNamespaces captures enum value "RecoverNamespaces" - RecoveryTypeRecoveryTypeRecoverNamespaces string = "RecoverNamespaces" - - // RecoveryTypeRecoveryTypeRecoverObjects captures enum value "RecoverObjects" - RecoveryTypeRecoveryTypeRecoverObjects string = "RecoverObjects" - - // RecoveryTypeRecoveryTypeRecoverSfdcObjects captures enum value "RecoverSfdcObjects" - RecoveryTypeRecoveryTypeRecoverSfdcObjects string = "RecoverSfdcObjects" - - // RecoveryTypeRecoveryTypeRecoverSfdcOrg captures enum value "RecoverSfdcOrg" - RecoveryTypeRecoveryTypeRecoverSfdcOrg string = "RecoverSfdcOrg" - - // RecoveryTypeRecoveryTypeRecoverSfdcRecords captures enum value "RecoverSfdcRecords" - RecoveryTypeRecoveryTypeRecoverSfdcRecords string = "RecoverSfdcRecords" - - // RecoveryTypeRecoveryTypeDownloadFilesAndFolders captures enum value "DownloadFilesAndFolders" - RecoveryTypeRecoveryTypeDownloadFilesAndFolders string = "DownloadFilesAndFolders" - - // RecoveryTypeRecoveryTypeCloneVMs captures enum value "CloneVMs" - RecoveryTypeRecoveryTypeCloneVMs string = "CloneVMs" - - // RecoveryTypeRecoveryTypeCloneView captures enum value "CloneView" - RecoveryTypeRecoveryTypeCloneView string = "CloneView" - - // RecoveryTypeRecoveryTypeCloneRefreshApp captures enum value "CloneRefreshApp" - RecoveryTypeRecoveryTypeCloneRefreshApp string = "CloneRefreshApp" - - // RecoveryTypeRecoveryTypeCloneVMsToView captures enum value "CloneVMsToView" - RecoveryTypeRecoveryTypeCloneVMsToView string = "CloneVMsToView" - - // RecoveryTypeRecoveryTypeConvertAndDeployVMs captures enum value "ConvertAndDeployVMs" - RecoveryTypeRecoveryTypeConvertAndDeployVMs string = "ConvertAndDeployVMs" - - // RecoveryTypeRecoveryTypeDeployVMs captures enum value "DeployVMs" - RecoveryTypeRecoveryTypeDeployVMs string = "DeployVMs" -) - -// prop value enum -func (m *RecoveryType) validateRecoveryTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, recoveryTypeTypeRecoveryTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RecoveryType) validateRecoveryType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryTypeEnum("recoveryType", "body", m.RecoveryType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this recovery type based on context it is used -func (m *RecoveryType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryType) UnmarshalBinary(b []byte) error { - var res RecoveryType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/recovery_vlan_config.go b/v2/models/recovery_vlan_config.go deleted file mode 100644 index b0b765d5..00000000 --- a/v2/models/recovery_vlan_config.go +++ /dev/null @@ -1,79 +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" -) - -// RecoveryVlanConfig Recovery VLAN config. -// -// Specifies the VLAN configuration for Recovery. -// -// swagger:model RecoveryVlanConfig -type RecoveryVlanConfig struct { - - // If this is set, then the Cohesity host name or the IP address associated with this vlan is used for mounting Cohesity's view on the remote host. - ID *int32 `json:"id,omitempty"` - - // If this is set to true, then even if VLANs are configured on the system, the partition VIPs will be used for the Recovery. - DisableVlan *bool `json:"disableVlan,omitempty"` - - // Interface group to use for Recovery. - // Read Only: true - InterfaceName *string `json:"interfaceName,omitempty"` -} - -// Validate validates this recovery vlan config -func (m *RecoveryVlanConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this recovery vlan config based on the context it is used -func (m *RecoveryVlanConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInterfaceName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RecoveryVlanConfig) contextValidateInterfaceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "interfaceName", "body", m.InterfaceName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RecoveryVlanConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RecoveryVlanConfig) UnmarshalBinary(b []byte) error { - var res RecoveryVlanConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/redo_log_group_config.go b/v2/models/redo_log_group_config.go deleted file mode 100644 index 9592e12f..00000000 --- a/v2/models/redo_log_group_config.go +++ /dev/null @@ -1,59 +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" -) - -// RedoLogGroupConfig Specifies Redo log group configuration -// -// swagger:model RedoLogGroupConfig -type RedoLogGroupConfig struct { - - // Specifies no. of redo log groups. - NumGroups *int32 `json:"numGroups,omitempty"` - - // Specifies Log member name prefix. - MemberPrefix *string `json:"memberPrefix,omitempty"` - - // Specifies Size of the member in MB. - SizeMBytes *int32 `json:"sizeMBytes,omitempty"` - - // Specifies list of members of this redo log group. - GroupMembers []string `json:"groupMembers"` -} - -// Validate validates this redo log group config -func (m *RedoLogGroupConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this redo log group config based on context it is used -func (m *RedoLogGroupConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RedoLogGroupConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RedoLogGroupConfig) UnmarshalBinary(b []byte) error { - var res RedoLogGroupConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/register_or_update_kerberos_provider_request.go b/v2/models/register_or_update_kerberos_provider_request.go deleted file mode 100644 index 9cb393f8..00000000 --- a/v2/models/register_or_update_kerberos_provider_request.go +++ /dev/null @@ -1,117 +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" -) - -// RegisterOrUpdateKerberosProviderRequest Specifies the request to register or update a Kerberos -// Provider. -// -// swagger:model RegisterOrUpdateKerberosProviderRequest -type RegisterOrUpdateKerberosProviderRequest struct { - KerberosProvider - - UnregisterKerberosRequest -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisterOrUpdateKerberosProviderRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 KerberosProvider - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.KerberosProvider = aO0 - - // AO1 - var aO1 UnregisterKerberosRequest - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UnregisterKerberosRequest = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisterOrUpdateKerberosProviderRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.KerberosProvider) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.UnregisterKerberosRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this register or update kerberos provider request -func (m *RegisterOrUpdateKerberosProviderRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KerberosProvider - if err := m.KerberosProvider.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with UnregisterKerberosRequest - if err := m.UnregisterKerberosRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this register or update kerberos provider request based on the context it is used -func (m *RegisterOrUpdateKerberosProviderRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KerberosProvider - if err := m.KerberosProvider.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with UnregisterKerberosRequest - if err := m.UnregisterKerberosRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterOrUpdateKerberosProviderRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterOrUpdateKerberosProviderRequest) UnmarshalBinary(b []byte) error { - var res RegisterOrUpdateKerberosProviderRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/register_remote_cluster_params.go b/v2/models/register_remote_cluster_params.go deleted file mode 100644 index 53a18db7..00000000 --- a/v2/models/register_remote_cluster_params.go +++ /dev/null @@ -1,116 +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" -) - -// RegisterRemoteClusterParams Specifies the parameters to register a Remote Cluster. -// -// swagger:model RegisterRemoteClusterParams -type RegisterRemoteClusterParams struct { - ValidateRemoteClusterConnectionParam - - RemoteClusterParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisterRemoteClusterParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ValidateRemoteClusterConnectionParam - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ValidateRemoteClusterConnectionParam = aO0 - - // AO1 - var aO1 RemoteClusterParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.RemoteClusterParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisterRemoteClusterParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ValidateRemoteClusterConnectionParam) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.RemoteClusterParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this register remote cluster params -func (m *RegisterRemoteClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ValidateRemoteClusterConnectionParam - if err := m.ValidateRemoteClusterConnectionParam.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with RemoteClusterParams - if err := m.RemoteClusterParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this register remote cluster params based on the context it is used -func (m *RegisterRemoteClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ValidateRemoteClusterConnectionParam - if err := m.ValidateRemoteClusterConnectionParam.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with RemoteClusterParams - if err := m.RemoteClusterParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterRemoteClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterRemoteClusterParams) UnmarshalBinary(b []byte) error { - var res RegisterRemoteClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/register_swift_params.go b/v2/models/register_swift_params.go deleted file mode 100644 index 96d70af5..00000000 --- a/v2/models/register_swift_params.go +++ /dev/null @@ -1,127 +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" -) - -// RegisterSwiftParams Specifies the parameters to register a Swift service on Keystone server. -// -// swagger:model RegisterSwiftParams -type RegisterSwiftParams struct { - - // Specifies the tenant Id who's Swift service will be registered. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the credentials of the Keystone server. Keystone configuration associated to the tenant will be used if this field is not specified. - KeystoneCredentials *KeystoneCredentials `json:"keystoneCredentials,omitempty"` -} - -// Validate validates this register swift params -func (m *RegisterSwiftParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeystoneCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterSwiftParams) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *RegisterSwiftParams) validateKeystoneCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.KeystoneCredentials) { // not required - return nil - } - - if m.KeystoneCredentials != nil { - if err := m.KeystoneCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this register swift params based on the context it is used -func (m *RegisterSwiftParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeystoneCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterSwiftParams) contextValidateKeystoneCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.KeystoneCredentials != nil { - - if swag.IsZero(m.KeystoneCredentials) { // not required - return nil - } - - if err := m.KeystoneCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterSwiftParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterSwiftParams) UnmarshalBinary(b []byte) error { - var res RegisterSwiftParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/register_trusted_cas.go b/v2/models/register_trusted_cas.go deleted file mode 100644 index edd1e3ac..00000000 --- a/v2/models/register_trusted_cas.go +++ /dev/null @@ -1,134 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RegisterTrustedCas Specifies the parameters to register a Certificate. -// -// swagger:model RegisterTrustedCas -type RegisterTrustedCas struct { - - // Specifies the certificates to be imported. - // Required: true - // Min Items: 1 - Certificates []*TrustedCaRequest `json:"certificates"` - - // Specifies if the certificates are only to be validated. - OnlyValidate *bool `json:"onlyValidate,omitempty"` -} - -// Validate validates this register trusted cas -func (m *RegisterTrustedCas) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterTrustedCas) validateCertificates(formats strfmt.Registry) error { - - if err := validate.Required("certificates", "body", m.Certificates); err != nil { - return err - } - - iCertificatesSize := int64(len(m.Certificates)) - - if err := validate.MinItems("certificates", "body", iCertificatesSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Certificates); i++ { - if swag.IsZero(m.Certificates[i]) { // not required - continue - } - - if m.Certificates[i] != nil { - if err := m.Certificates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this register trusted cas based on the context it is used -func (m *RegisterTrustedCas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisterTrustedCas) contextValidateCertificates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Certificates); i++ { - - if m.Certificates[i] != nil { - - if swag.IsZero(m.Certificates[i]) { // not required - return nil - } - - if err := m.Certificates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterTrustedCas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterTrustedCas) UnmarshalBinary(b []byte) error { - var res RegisterTrustedCas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/registered_remote_storage_list.go b/v2/models/registered_remote_storage_list.go deleted file mode 100644 index bfdaf515..00000000 --- a/v2/models/registered_remote_storage_list.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredRemoteStorageList Registered Remote Storage List -// -// Specifies information about registered remote storage servers which are used by cohesity cluster. -// -// swagger:model RegisteredRemoteStorageList -type RegisteredRemoteStorageList struct { - - // Specifies the list of registered remote storage info. - RemoteStorages []*RemoteStorageInfo `json:"remoteStorages"` -} - -// Validate validates this registered remote storage list -func (m *RegisteredRemoteStorageList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteStorages(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredRemoteStorageList) validateRemoteStorages(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteStorages) { // not required - return nil - } - - for i := 0; i < len(m.RemoteStorages); i++ { - if swag.IsZero(m.RemoteStorages[i]) { // not required - continue - } - - if m.RemoteStorages[i] != nil { - if err := m.RemoteStorages[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteStorages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteStorages" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this registered remote storage list based on the context it is used -func (m *RegisteredRemoteStorageList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteStorages(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegisteredRemoteStorageList) contextValidateRemoteStorages(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteStorages); i++ { - - if m.RemoteStorages[i] != nil { - - if swag.IsZero(m.RemoteStorages[i]) { // not required - return nil - } - - if err := m.RemoteStorages[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteStorages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteStorages" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredRemoteStorageList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredRemoteStorageList) UnmarshalBinary(b []byte) error { - var res RegisteredRemoteStorageList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/registration_info.go b/v2/models/registration_info.go deleted file mode 100644 index 70c59565..00000000 --- a/v2/models/registration_info.go +++ /dev/null @@ -1,164 +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" -) - -// RegistrationInfo Specifies the source registration informations. -// -// swagger:model RegistrationInfo -type RegistrationInfo struct { - - // Specifies the status of the authentication during the registration of a Protection Source. 'Pending' indicates the authentication is in progress. 'Scheduled' indicates the authentication is scheduled. 'Finished' indicates the authentication is completed. 'RefreshInProgress' indicates the refresh is in progress. - // Read Only: true - // Enum: ["Pending","Scheduled","Finished","RefreshInProgress"] - AuthenticationStatus *string `json:"authenticationStatus,omitempty"` - - // Specifies the time when the source was registered in milliseconds - // Read Only: true - RegistrationTimeMsecs *int64 `json:"registrationTimeMsecs,omitempty"` - - // Specifies the time when the source was last refreshed in milliseconds. - // Read Only: true - LastRefreshedTimeMsecs *int64 `json:"lastRefreshedTimeMsecs,omitempty"` -} - -// Validate validates this registration info -func (m *RegistrationInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthenticationStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var registrationInfoTypeAuthenticationStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pending","Scheduled","Finished","RefreshInProgress"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - registrationInfoTypeAuthenticationStatusPropEnum = append(registrationInfoTypeAuthenticationStatusPropEnum, v) - } -} - -const ( - - // RegistrationInfoAuthenticationStatusPending captures enum value "Pending" - RegistrationInfoAuthenticationStatusPending string = "Pending" - - // RegistrationInfoAuthenticationStatusScheduled captures enum value "Scheduled" - RegistrationInfoAuthenticationStatusScheduled string = "Scheduled" - - // RegistrationInfoAuthenticationStatusFinished captures enum value "Finished" - RegistrationInfoAuthenticationStatusFinished string = "Finished" - - // RegistrationInfoAuthenticationStatusRefreshInProgress captures enum value "RefreshInProgress" - RegistrationInfoAuthenticationStatusRefreshInProgress string = "RefreshInProgress" -) - -// prop value enum -func (m *RegistrationInfo) validateAuthenticationStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, registrationInfoTypeAuthenticationStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RegistrationInfo) validateAuthenticationStatus(formats strfmt.Registry) error { - if swag.IsZero(m.AuthenticationStatus) { // not required - return nil - } - - // value enum - if err := m.validateAuthenticationStatusEnum("authenticationStatus", "body", *m.AuthenticationStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this registration info based on the context it is used -func (m *RegistrationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAuthenticationStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistrationTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRefreshedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegistrationInfo) contextValidateAuthenticationStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "authenticationStatus", "body", m.AuthenticationStatus); err != nil { - return err - } - - return nil -} - -func (m *RegistrationInfo) contextValidateRegistrationTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "registrationTimeMsecs", "body", m.RegistrationTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *RegistrationInfo) contextValidateLastRefreshedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastRefreshedTimeMsecs", "body", m.LastRefreshedTimeMsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegistrationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegistrationInfo) UnmarshalBinary(b []byte) error { - var res RegistrationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/regular_backup_policy.go b/v2/models/regular_backup_policy.go deleted file mode 100644 index 1fe214da..00000000 --- a/v2/models/regular_backup_policy.go +++ /dev/null @@ -1,327 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegularBackupPolicy Incremental, Full and Retention Policy. -// -// Specifies the Incremental and Full policy settings and also the common Retention policy settings." -// -// swagger:model RegularBackupPolicy -type RegularBackupPolicy struct { - - // Specifies the Incremental backup schedule and retention of a Protection Policy. - Incremental *IncrementalBackupPolicy `json:"incremental,omitempty"` - - // Specifies the Full backup schedule of a Protection Policy. - Full *FullBackupPolicy `json:"full,omitempty"` - - // Specifies multiple schedules and retentions for full backup. Specify either of the 'full' or 'fullBackups' values. Its recommended to use 'fullBaackups' value since 'full' will be deprecated after few releases. - FullBackups []*FullScheduleAndRetention `json:"fullBackups"` - - // Specifies the Retention period for incremental and full backup in days, months or years. - Retention *Retention `json:"retention,omitempty"` - - // Specifies the primary backup target settings for regular backups. Specifying this field shows that instead of local backups on Cohesity cluster, primary backup location is different such as Cloud Archives like s3 or azure. - PrimaryBackupTarget *PrimaryBackupTarget `json:"primaryBackupTarget,omitempty"` -} - -// Validate validates this regular backup policy -func (m *RegularBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIncremental(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFull(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullBackups(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryBackupTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegularBackupPolicy) validateIncremental(formats strfmt.Registry) error { - if swag.IsZero(m.Incremental) { // not required - return nil - } - - if m.Incremental != nil { - if err := m.Incremental.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incremental") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incremental") - } - return err - } - } - - return nil -} - -func (m *RegularBackupPolicy) validateFull(formats strfmt.Registry) error { - if swag.IsZero(m.Full) { // not required - return nil - } - - if m.Full != nil { - if err := m.Full.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("full") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("full") - } - return err - } - } - - return nil -} - -func (m *RegularBackupPolicy) validateFullBackups(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackups) { // not required - return nil - } - - for i := 0; i < len(m.FullBackups); i++ { - if swag.IsZero(m.FullBackups[i]) { // not required - continue - } - - if m.FullBackups[i] != nil { - if err := m.FullBackups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegularBackupPolicy) 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 -} - -func (m *RegularBackupPolicy) validatePrimaryBackupTarget(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryBackupTarget) { // not required - return nil - } - - if m.PrimaryBackupTarget != nil { - if err := m.PrimaryBackupTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupTarget") - } - return err - } - } - - return nil -} - -// ContextValidate validate this regular backup policy based on the context it is used -func (m *RegularBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIncremental(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFull(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullBackups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryBackupTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RegularBackupPolicy) contextValidateIncremental(ctx context.Context, formats strfmt.Registry) error { - - if m.Incremental != nil { - - if swag.IsZero(m.Incremental) { // not required - return nil - } - - if err := m.Incremental.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incremental") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incremental") - } - return err - } - } - - return nil -} - -func (m *RegularBackupPolicy) contextValidateFull(ctx context.Context, formats strfmt.Registry) error { - - if m.Full != nil { - - if swag.IsZero(m.Full) { // not required - return nil - } - - if err := m.Full.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("full") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("full") - } - return err - } - } - - return nil -} - -func (m *RegularBackupPolicy) contextValidateFullBackups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FullBackups); i++ { - - if m.FullBackups[i] != nil { - - if swag.IsZero(m.FullBackups[i]) { // not required - return nil - } - - if err := m.FullBackups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RegularBackupPolicy) 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 -} - -func (m *RegularBackupPolicy) contextValidatePrimaryBackupTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryBackupTarget != nil { - - if swag.IsZero(m.PrimaryBackupTarget) { // not required - return nil - } - - if err := m.PrimaryBackupTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryBackupTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryBackupTarget") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RegularBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegularBackupPolicy) UnmarshalBinary(b []byte) error { - var res RegularBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_adapter_host.go b/v2/models/remote_adapter_host.go deleted file mode 100644 index eaaf889f..00000000 --- a/v2/models/remote_adapter_host.go +++ /dev/null @@ -1,286 +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" -) - -// RemoteAdapterHost Specifies params of the remote host. -// -// swagger:model RemoteAdapterHost -type RemoteAdapterHost struct { - ScriptHost - - // Specifies the params of script that will be executed in a 'kRegular' type run. - IncrementalBackupScript *CommonPreBackupScriptParams `json:"incrementalBackupScript,omitempty"` - - // Specifies the params of script that will be executed in a 'kFull' type run. - FullBackupScript *CommonPreBackupScriptParams `json:"fullBackupScript,omitempty"` - - // Specifies the params of script that will be executed in a 'kLog' type run. - LogBackupScript *CommonPreBackupScriptParams `json:"logBackupScript,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteAdapterHost) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ScriptHost - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ScriptHost = aO0 - - // AO1 - var dataAO1 struct { - IncrementalBackupScript *CommonPreBackupScriptParams `json:"incrementalBackupScript,omitempty"` - - FullBackupScript *CommonPreBackupScriptParams `json:"fullBackupScript,omitempty"` - - LogBackupScript *CommonPreBackupScriptParams `json:"logBackupScript,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.IncrementalBackupScript = dataAO1.IncrementalBackupScript - - m.FullBackupScript = dataAO1.FullBackupScript - - m.LogBackupScript = dataAO1.LogBackupScript - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteAdapterHost) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ScriptHost) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - IncrementalBackupScript *CommonPreBackupScriptParams `json:"incrementalBackupScript,omitempty"` - - FullBackupScript *CommonPreBackupScriptParams `json:"fullBackupScript,omitempty"` - - LogBackupScript *CommonPreBackupScriptParams `json:"logBackupScript,omitempty"` - } - - dataAO1.IncrementalBackupScript = m.IncrementalBackupScript - - dataAO1.FullBackupScript = m.FullBackupScript - - dataAO1.LogBackupScript = m.LogBackupScript - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote adapter host -func (m *RemoteAdapterHost) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ScriptHost - if err := m.ScriptHost.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrementalBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFullBackupScript(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupScript(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteAdapterHost) validateIncrementalBackupScript(formats strfmt.Registry) error { - - if swag.IsZero(m.IncrementalBackupScript) { // not required - 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 -} - -func (m *RemoteAdapterHost) validateFullBackupScript(formats strfmt.Registry) error { - - if swag.IsZero(m.FullBackupScript) { // not required - 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 -} - -func (m *RemoteAdapterHost) validateLogBackupScript(formats strfmt.Registry) error { - - if swag.IsZero(m.LogBackupScript) { // not required - 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 -} - -// ContextValidate validate this remote adapter host based on the context it is used -func (m *RemoteAdapterHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ScriptHost - if err := m.ScriptHost.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrementalBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFullBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupScript(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteAdapterHost) 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 *RemoteAdapterHost) 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 *RemoteAdapterHost) 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 -} - -// MarshalBinary interface implementation -func (m *RemoteAdapterHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteAdapterHost) UnmarshalBinary(b []byte) error { - var res RemoteAdapterHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_adapter_protection_group_params.go b/v2/models/remote_adapter_protection_group_params.go deleted file mode 100644 index 36632160..00000000 --- a/v2/models/remote_adapter_protection_group_params.go +++ /dev/null @@ -1,255 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RemoteAdapterProtectionGroupParams Remote Adapter Protection Group Parameters -// -// Specifies the parameters which are specific to Remote Adapter related Protection Groups. -// -// swagger:model RemoteAdapterProtectionGroupParams -type RemoteAdapterProtectionGroupParams struct { - - // Specifies a list of hosts to protected in this protection group. - // Required: true - // Min Items: 1 - Hosts []*RemoteAdapterHost `json:"hosts"` - - // Specifies the id of the view where we put the script result data. - // Required: true - ViewID *int64 `json:"viewId"` - - // Specifies the paramters for view replication. - RemoteViewParams *RemoteAdapterProtectionGroupReplicationParams `json:"remoteViewParams,omitempty"` - - // Specifies settings for indexing files found in the Remote Adapter so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies whether or not to quiesce apps and the file system in order to take app consistent snapshots. - AppConsistentSnapshot *bool `json:"appConsistentSnapshot,omitempty"` -} - -// Validate validates this remote adapter protection group params -func (m *RemoteAdapterProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteViewParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) validateHosts(formats strfmt.Registry) error { - - if err := validate.Required("hosts", "body", m.Hosts); err != nil { - return err - } - - iHostsSize := int64(len(m.Hosts)) - - if err := validate.MinItems("hosts", "body", iHostsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) validateViewID(formats strfmt.Registry) error { - - if err := validate.Required("viewId", "body", m.ViewID); err != nil { - return err - } - - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) validateRemoteViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteViewParams) { // not required - return nil - } - - if m.RemoteViewParams != nil { - if err := m.RemoteViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewParams") - } - return err - } - } - - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this remote adapter protection group params based on the context it is used -func (m *RemoteAdapterProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) contextValidateRemoteViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteViewParams != nil { - - if swag.IsZero(m.RemoteViewParams) { // not required - return nil - } - - if err := m.RemoteViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteViewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteViewParams") - } - return err - } - } - - return nil -} - -func (m *RemoteAdapterProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteAdapterProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteAdapterProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res RemoteAdapterProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_adapter_protection_group_replication_params.go b/v2/models/remote_adapter_protection_group_replication_params.go deleted file mode 100644 index 56a2748a..00000000 --- a/v2/models/remote_adapter_protection_group_replication_params.go +++ /dev/null @@ -1,76 +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" -) - -// RemoteAdapterProtectionGroupReplicationParams Remote Adapter Replication Parameters -// -// Specifies the parameters for Remote Adapter replication. -// -// swagger:model RemoteAdapterProtectionGroupReplicationParams -type RemoteAdapterProtectionGroupReplicationParams struct { - - // Specifies whether or not to create a remote view on replication cluster. - // Required: true - CreateView *bool `json:"createView"` - - // Specifies the name of the remote view. By default the name will be same as the protected view. If a view with the specified name already exists on the remote cluster, the created name will have a suffix '-1'. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this remote adapter protection group replication params -func (m *RemoteAdapterProtectionGroupReplicationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreateView(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteAdapterProtectionGroupReplicationParams) validateCreateView(formats strfmt.Registry) error { - - if err := validate.Required("createView", "body", m.CreateView); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this remote adapter protection group replication params based on context it is used -func (m *RemoteAdapterProtectionGroupReplicationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteAdapterProtectionGroupReplicationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteAdapterProtectionGroupReplicationParams) UnmarshalBinary(b []byte) error { - var res RemoteAdapterProtectionGroupReplicationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_cluster.go b/v2/models/remote_cluster.go deleted file mode 100644 index d03e37c4..00000000 --- a/v2/models/remote_cluster.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" -) - -// RemoteCluster Specifies a Remote Cluster config. -// -// swagger:model RemoteCluster -type RemoteCluster struct { - UpdateRemoteClusterParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteCluster) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateRemoteClusterParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateRemoteClusterParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteCluster) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UpdateRemoteClusterParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote cluster -func (m *RemoteCluster) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateRemoteClusterParams - if err := m.UpdateRemoteClusterParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote cluster based on the context it is used -func (m *RemoteCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateRemoteClusterParams - if err := m.UpdateRemoteClusterParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteCluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteCluster) UnmarshalBinary(b []byte) error { - var res RemoteCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_cluster_params.go b/v2/models/remote_cluster_params.go deleted file mode 100644 index 5902ef08..00000000 --- a/v2/models/remote_cluster_params.go +++ /dev/null @@ -1,249 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RemoteClusterParams Specifies the parameters to update a Remote Cluster config. -// -// swagger:model RemoteClusterParams -type RemoteClusterParams struct { - - // Specifies the purpose for which the remote cluster is being registered. - Purpose []string `json:"purpose,omitempty"` - - // Specifies the name of the network interfaces to use for communicating with the Remote Cluster. - NetworkInterface *string `json:"networkInterface,omitempty"` - - // Specifies the IP addresses of the interfaces in the local Cluster which will be used for communicating with the remote Cluster. - // Read Only: true - LocalAddresses []string `json:"localAddresses,omitempty"` - - // Specifies if the Tx clusters should be automatically registered at the Rx site. - AutoRegisterTarget *bool `json:"autoRegisterTarget,omitempty"` - - // Specifies any additional information if needed. - Description *string `json:"description,omitempty"` - - // Specifies the Remote Cluster id. - // Read Only: true - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the Remote Cluster incarnation id. - // Read Only: true - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the Remote Cluster name. - // Read Only: true - ClusterName *string `json:"clusterName,omitempty"` - - // Specifies if the Remote Cluster was registered automatically or manually. - // Read Only: true - IsAutoRegistered *bool `json:"isAutoRegistered,omitempty"` - - // Specifies the replication config for a Remote Cluster. Required when usedForReplication is set to true. - ReplicationParams *ReplicationParams `json:"replicationParams,omitempty"` -} - -// Validate validates this remote cluster params -func (m *RemoteClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePurpose(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var remoteClusterParamsPurposeItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Replication","RemoteAccess"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteClusterParamsPurposeItemsEnum = append(remoteClusterParamsPurposeItemsEnum, v) - } -} - -func (m *RemoteClusterParams) validatePurposeItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteClusterParamsPurposeItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteClusterParams) validatePurpose(formats strfmt.Registry) error { - if swag.IsZero(m.Purpose) { // not required - return nil - } - - for i := 0; i < len(m.Purpose); i++ { - - // value enum - if err := m.validatePurposeItemsEnum("purpose"+"."+strconv.Itoa(i), "body", m.Purpose[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *RemoteClusterParams) validateReplicationParams(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationParams) { // not required - return nil - } - - if m.ReplicationParams != nil { - if err := m.ReplicationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this remote cluster params based on the context it is used -func (m *RemoteClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalAddresses(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterIncarnationID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsAutoRegistered(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteClusterParams) contextValidateLocalAddresses(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "localAddresses", "body", []string(m.LocalAddresses)); err != nil { - return err - } - - return nil -} - -func (m *RemoteClusterParams) contextValidateClusterID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *RemoteClusterParams) contextValidateClusterIncarnationID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterIncarnationId", "body", m.ClusterIncarnationID); err != nil { - return err - } - - return nil -} - -func (m *RemoteClusterParams) contextValidateClusterName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *RemoteClusterParams) contextValidateIsAutoRegistered(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isAutoRegistered", "body", m.IsAutoRegistered); err != nil { - return err - } - - return nil -} - -func (m *RemoteClusterParams) contextValidateReplicationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationParams != nil { - - if swag.IsZero(m.ReplicationParams) { // not required - return nil - } - - if err := m.ReplicationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteClusterParams) UnmarshalBinary(b []byte) error { - var res RemoteClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_cluster_purpose.go b/v2/models/remote_cluster_purpose.go deleted file mode 100644 index a6b62010..00000000 --- a/v2/models/remote_cluster_purpose.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RemoteClusterPurpose Remote Cluster Purpose -// -// Specifies the purpose of Remote Cluster. -// -// swagger:model RemoteClusterPurpose -type RemoteClusterPurpose struct { - - // Specifies the purpose of Remote Cluster. - // Enum: ["Replication","RemoteAccess"] - Value string `json:"value,omitempty"` -} - -// Validate validates this remote cluster purpose -func (m *RemoteClusterPurpose) 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 remoteClusterPurposeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Replication","RemoteAccess"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteClusterPurposeTypeValuePropEnum = append(remoteClusterPurposeTypeValuePropEnum, v) - } -} - -const ( - - // RemoteClusterPurposeValueReplication captures enum value "Replication" - RemoteClusterPurposeValueReplication string = "Replication" - - // RemoteClusterPurposeValueRemoteAccess captures enum value "RemoteAccess" - RemoteClusterPurposeValueRemoteAccess string = "RemoteAccess" -) - -// prop value enum -func (m *RemoteClusterPurpose) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteClusterPurposeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteClusterPurpose) 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 remote cluster purpose based on context it is used -func (m *RemoteClusterPurpose) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteClusterPurpose) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteClusterPurpose) UnmarshalBinary(b []byte) error { - var res RemoteClusterPurpose - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_clusters.go b/v2/models/remote_clusters.go deleted file mode 100644 index 303ae85e..00000000 --- a/v2/models/remote_clusters.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteClusters Specifies a list of Remote Cluster registered with the cluster. -// -// swagger:model RemoteClusters -type RemoteClusters struct { - - // Specifies the list of Remote Clusters. - RemoteClusters []*RemoteCluster `json:"remoteClusters"` -} - -// Validate validates this remote clusters -func (m *RemoteClusters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteClusters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteClusters) validateRemoteClusters(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteClusters) { // not required - return nil - } - - for i := 0; i < len(m.RemoteClusters); i++ { - if swag.IsZero(m.RemoteClusters[i]) { // not required - continue - } - - if m.RemoteClusters[i] != nil { - if err := m.RemoteClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remote clusters based on the context it is used -func (m *RemoteClusters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteClusters) contextValidateRemoteClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteClusters); i++ { - - if m.RemoteClusters[i] != nil { - - if swag.IsZero(m.RemoteClusters[i]) { // not required - return nil - } - - if err := m.RemoteClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteClusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteClusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteClusters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteClusters) UnmarshalBinary(b []byte) error { - var res RemoteClusters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_disk.go b/v2/models/remote_disk.go deleted file mode 100644 index b1ee055e..00000000 --- a/v2/models/remote_disk.go +++ /dev/null @@ -1,322 +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" -) - -// RemoteDisk Remote disk -// -// Specifies the configuration of a remote disk. -// -// swagger:model RemoteDisk -type RemoteDisk struct { - - // Specifies the disk id. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the NFS mount path of the remote disk. - // Required: true - MountPath *string `json:"mountPath"` - - // Specifies the node id of the disk. If not specified, the disk will be evenly distributed across all the nodes. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the tier of the disk - // Required: true - // Enum: ["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"] - Tier *string `json:"tier"` - - // Specifies the logical capacity of the disk in bytes. - // Read Only: true - CapacityBytes *int64 `json:"capacityBytes,omitempty"` - - // Specifies the logical used capacity of remote disk in bytes. - // Read Only: true - UsedCapacityBytes *int64 `json:"usedCapacityBytes,omitempty"` - - // Specifies the status of a remote disk. - // Read Only: true - // Enum: ["Active","Offline","Deleting","Deleted","DataVipNotReachable","FileSystemNotAccessible","FileSystemDeleted","Mounting","Migrating","Unknown"] - Status *string `json:"status,omitempty"` - - // Specifies the name of filesystem on remote storage. - FileSystemName *string `json:"fileSystemName,omitempty"` - - // Specifies the data vip used to mount the filesystem. - DataVip *string `json:"dataVip,omitempty"` - - // Specifies ip address of the node that this remote disk is mounted on. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the physical used capacity of remote disk in bytes. - // Read Only: true - UsedCapacityBytesPhysical *int64 `json:"usedCapacityBytesPhysical,omitempty"` - - // Specifies the physical capacity of the disk in bytes. - // Read Only: true - CapacityBytesPhysical *int64 `json:"capacityBytesPhysical,omitempty"` -} - -// Validate validates this remote disk -func (m *RemoteDisk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTier(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteDisk) validateMountPath(formats strfmt.Registry) error { - - if err := validate.Required("mountPath", "body", m.MountPath); err != nil { - return err - } - - return nil -} - -var remoteDiskTypeTierPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PCIeSSD","SATA-SSD","SATA-HDD","CLOUD"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteDiskTypeTierPropEnum = append(remoteDiskTypeTierPropEnum, v) - } -} - -const ( - - // RemoteDiskTierPCIeSSD captures enum value "PCIeSSD" - RemoteDiskTierPCIeSSD string = "PCIeSSD" - - // RemoteDiskTierSATADashSSD captures enum value "SATA-SSD" - RemoteDiskTierSATADashSSD string = "SATA-SSD" - - // RemoteDiskTierSATADashHDD captures enum value "SATA-HDD" - RemoteDiskTierSATADashHDD string = "SATA-HDD" - - // RemoteDiskTierCLOUD captures enum value "CLOUD" - RemoteDiskTierCLOUD string = "CLOUD" -) - -// prop value enum -func (m *RemoteDisk) validateTierEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteDiskTypeTierPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteDisk) validateTier(formats strfmt.Registry) error { - - if err := validate.Required("tier", "body", m.Tier); err != nil { - return err - } - - // value enum - if err := m.validateTierEnum("tier", "body", *m.Tier); err != nil { - return err - } - - return nil -} - -var remoteDiskTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Offline","Deleting","Deleted","DataVipNotReachable","FileSystemNotAccessible","FileSystemDeleted","Mounting","Migrating","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - remoteDiskTypeStatusPropEnum = append(remoteDiskTypeStatusPropEnum, v) - } -} - -const ( - - // RemoteDiskStatusActive captures enum value "Active" - RemoteDiskStatusActive string = "Active" - - // RemoteDiskStatusOffline captures enum value "Offline" - RemoteDiskStatusOffline string = "Offline" - - // RemoteDiskStatusDeleting captures enum value "Deleting" - RemoteDiskStatusDeleting string = "Deleting" - - // RemoteDiskStatusDeleted captures enum value "Deleted" - RemoteDiskStatusDeleted string = "Deleted" - - // RemoteDiskStatusDataVipNotReachable captures enum value "DataVipNotReachable" - RemoteDiskStatusDataVipNotReachable string = "DataVipNotReachable" - - // RemoteDiskStatusFileSystemNotAccessible captures enum value "FileSystemNotAccessible" - RemoteDiskStatusFileSystemNotAccessible string = "FileSystemNotAccessible" - - // RemoteDiskStatusFileSystemDeleted captures enum value "FileSystemDeleted" - RemoteDiskStatusFileSystemDeleted string = "FileSystemDeleted" - - // RemoteDiskStatusMounting captures enum value "Mounting" - RemoteDiskStatusMounting string = "Mounting" - - // RemoteDiskStatusMigrating captures enum value "Migrating" - RemoteDiskStatusMigrating string = "Migrating" - - // RemoteDiskStatusUnknown captures enum value "Unknown" - RemoteDiskStatusUnknown string = "Unknown" -) - -// prop value enum -func (m *RemoteDisk) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, remoteDiskTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RemoteDisk) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this remote disk based on the context it is used -func (m *RemoteDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCapacityBytes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsedCapacityBytes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsedCapacityBytesPhysical(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCapacityBytesPhysical(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteDisk) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *RemoteDisk) contextValidateCapacityBytes(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "capacityBytes", "body", m.CapacityBytes); err != nil { - return err - } - - return nil -} - -func (m *RemoteDisk) contextValidateUsedCapacityBytes(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "usedCapacityBytes", "body", m.UsedCapacityBytes); err != nil { - return err - } - - return nil -} - -func (m *RemoteDisk) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -func (m *RemoteDisk) contextValidateUsedCapacityBytesPhysical(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "usedCapacityBytesPhysical", "body", m.UsedCapacityBytesPhysical); err != nil { - return err - } - - return nil -} - -func (m *RemoteDisk) contextValidateCapacityBytesPhysical(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "capacityBytesPhysical", "body", m.CapacityBytesPhysical); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteDisk) UnmarshalBinary(b []byte) error { - var res RemoteDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_disks.go b/v2/models/remote_disks.go deleted file mode 100644 index 34d9d4fd..00000000 --- a/v2/models/remote_disks.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteDisks Remote disks -// -// Specifies a list of remote disks. -// -// swagger:model RemoteDisks -type RemoteDisks struct { - - // Specifies a list of remote disks. - RemoteDisks []*RemoteDisk `json:"remoteDisks"` -} - -// Validate validates this remote disks -func (m *RemoteDisks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRemoteDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteDisks) validateRemoteDisks(formats strfmt.Registry) error { - if swag.IsZero(m.RemoteDisks) { // not required - return nil - } - - for i := 0; i < len(m.RemoteDisks); i++ { - if swag.IsZero(m.RemoteDisks[i]) { // not required - continue - } - - if m.RemoteDisks[i] != nil { - if err := m.RemoteDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remote disks based on the context it is used -func (m *RemoteDisks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRemoteDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteDisks) contextValidateRemoteDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RemoteDisks); i++ { - - if m.RemoteDisks[i] != nil { - - if swag.IsZero(m.RemoteDisks[i]) { // not required - return nil - } - - if err := m.RemoteDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteDisks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteDisks) UnmarshalBinary(b []byte) error { - var res RemoteDisks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_storage_info.go b/v2/models/remote_storage_info.go deleted file mode 100644 index 37a287c5..00000000 --- a/v2/models/remote_storage_info.go +++ /dev/null @@ -1,168 +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" -) - -// RemoteStorageInfo Remote storage Registration parameters. -// -// Specifies the remote storage Registration parameters. -// -// swagger:model RemoteStorageInfo -type RemoteStorageInfo struct { - CommonRemoteStorageInfo - - // Specifies the parameters to register a Pure Storage flashblade as remote storage - FlashbladeParams *FlashbladeParams `json:"flashbladeParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteStorageInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRemoteStorageInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRemoteStorageInfo = aO0 - - // AO1 - var dataAO1 struct { - FlashbladeParams *FlashbladeParams `json:"flashbladeParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.FlashbladeParams = dataAO1.FlashbladeParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteStorageInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRemoteStorageInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - FlashbladeParams *FlashbladeParams `json:"flashbladeParams,omitempty"` - } - - dataAO1.FlashbladeParams = m.FlashbladeParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote storage info -func (m *RemoteStorageInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRemoteStorageInfo - if err := m.CommonRemoteStorageInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteStorageInfo) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this remote storage info based on the context it is used -func (m *RemoteStorageInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRemoteStorageInfo - if err := m.CommonRemoteStorageInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteStorageInfo) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteStorageInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteStorageInfo) UnmarshalBinary(b []byte) error { - var res RemoteStorageInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remote_target_config.go b/v2/models/remote_target_config.go deleted file mode 100644 index 3b0efd29..00000000 --- a/v2/models/remote_target_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" - "github.com/go-openapi/validate" -) - -// RemoteTargetConfig Cluster Target Configuration -// -// # Specifies the configuration for adding remote cluster as repilcation target -// -// swagger:model RemoteTargetConfig -type RemoteTargetConfig struct { - - // Specifies the cluster id of the target replication cluster. - // Required: true - ClusterID *int64 `json:"clusterId"` - - // Specifies the cluster name of the target replication cluster. - // Read Only: true - ClusterName *string `json:"clusterName,omitempty"` -} - -// Validate validates this remote target config -func (m *RemoteTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteTargetConfig) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this remote target config based on the context it is used -func (m *RemoteTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoteTargetConfig) contextValidateClusterName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteTargetConfig) UnmarshalBinary(b []byte) error { - var res RemoteTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remove_baseos_patch_request.go b/v2/models/remove_baseos_patch_request.go deleted file mode 100644 index 0789d34c..00000000 --- a/v2/models/remove_baseos_patch_request.go +++ /dev/null @@ -1,74 +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" -) - -// RemoveBaseosPatchRequest Specifies the name and force option for baseos patch removal. -// -// swagger:model RemoveBaseosPatchRequest -type RemoveBaseosPatchRequest struct { - - // Name of the hotfix with security patch - // Required: true - PatchName *string `json:"patchName"` - - // If patch files should be removed even for inprogress patch - ForceRemove *bool `json:"forceRemove,omitempty"` -} - -// Validate validates this remove baseos patch request -func (m *RemoveBaseosPatchRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatchName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoveBaseosPatchRequest) validatePatchName(formats strfmt.Registry) error { - - if err := validate.Required("patchName", "body", m.PatchName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this remove baseos patch request based on context it is used -func (m *RemoveBaseosPatchRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RemoveBaseosPatchRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoveBaseosPatchRequest) UnmarshalBinary(b []byte) error { - var res RemoveBaseosPatchRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remove_disk.go b/v2/models/remove_disk.go deleted file mode 100644 index 7dd6b7d5..00000000 --- a/v2/models/remove_disk.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoveDisk Disk Removal Response. -// -// Specifies details of disk removal response. -// -// swagger:model RemoveDisk -type RemoveDisk struct { - - // If true, Disk is marked for removal. - MarkedForRemoval *bool `json:"markedForRemoval,omitempty"` - - // Specifies id of the disk. - ID *int64 `json:"id,omitempty"` - - // Specifies the pre-check validations results. - ValidationChecks []*PreCheckValidation `json:"validationChecks"` - - // Specifies the last run time of the pre-checks execution in Unix epoch timestamp (in seconds). - TimestampSecs *int64 `json:"timestampSecs,omitempty"` -} - -// Validate validates this remove disk -func (m *RemoveDisk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoveDisk) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remove disk based on the context it is used -func (m *RemoveDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoveDisk) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoveDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoveDisk) UnmarshalBinary(b []byte) error { - var res RemoveDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/remove_node.go b/v2/models/remove_node.go deleted file mode 100644 index c815535a..00000000 --- a/v2/models/remove_node.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoveNode Node Removal Response. -// -// Specifies details of node removal response. -// -// swagger:model RemoveNode -type RemoveNode struct { - - // If true, Node is marked for removal. - MarkedForRemoval *bool `json:"markedForRemoval,omitempty"` - - // Specifies id of the node. - ID *int64 `json:"id,omitempty"` - - // Specifies the pre-check validations results. - ValidationChecks []*PreCheckValidation `json:"validationChecks"` - - // Specifies the last run time of the pre-checks execution in Unix epoch timestamp (in seconds). - TimestampSecs *int64 `json:"timestampSecs,omitempty"` -} - -// Validate validates this remove node -func (m *RemoveNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValidationChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoveNode) validateValidationChecks(formats strfmt.Registry) error { - if swag.IsZero(m.ValidationChecks) { // not required - return nil - } - - for i := 0; i < len(m.ValidationChecks); i++ { - if swag.IsZero(m.ValidationChecks[i]) { // not required - continue - } - - if m.ValidationChecks[i] != nil { - if err := m.ValidationChecks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this remove node based on the context it is used -func (m *RemoveNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValidationChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RemoveNode) contextValidateValidationChecks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValidationChecks); i++ { - - if m.ValidationChecks[i] != nil { - - if swag.IsZero(m.ValidationChecks[i]) { // not required - return nil - } - - if err := m.ValidationChecks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validationChecks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RemoveNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoveNode) UnmarshalBinary(b []byte) error { - var res RemoveNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replica_failover_object.go b/v2/models/replica_failover_object.go deleted file mode 100644 index d472b0eb..00000000 --- a/v2/models/replica_failover_object.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" -) - -// ReplicaFailoverObject Specifies the object paring of replicated object and failover object created after restore. -// -// swagger:model ReplicaFailoverObject -type ReplicaFailoverObject struct { - - // Specifies the object Id existing on the replciation cluster. - ReplicaObjectID *int64 `json:"replicaObjectId,omitempty"` - - // Specifies the corrosponding object id of the failover object. - FailoverObjectID *int64 `json:"failoverObjectId,omitempty"` -} - -// Validate validates this replica failover object -func (m *ReplicaFailoverObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replica failover object based on context it is used -func (m *ReplicaFailoverObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicaFailoverObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicaFailoverObject) UnmarshalBinary(b []byte) error { - var res ReplicaFailoverObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replicated_view_name_config.go b/v2/models/replicated_view_name_config.go deleted file mode 100644 index 76c20adc..00000000 --- a/v2/models/replicated_view_name_config.go +++ /dev/null @@ -1,77 +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" -) - -// ReplicatedViewNameConfig Specifies an object protected by a View Protection Group. -// -// swagger:model ReplicatedViewNameConfig -type ReplicatedViewNameConfig struct { - - // Specifies the ID of the protected view. - // Required: true - SourceViewID *int64 `json:"sourceViewId"` - - // Specifies if the remote view name to be kept is same as the source view name. If this field is true, viewName field will be ignored. - UseSameViewName *bool `json:"useSameViewName,omitempty"` - - // Specifies the name of the remote view. This field is only used when useSameViewName is false. If useSameViewName is true, this field is not used. - ViewName *string `json:"viewName,omitempty"` -} - -// Validate validates this replicated view name config -func (m *ReplicatedViewNameConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceViewID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicatedViewNameConfig) validateSourceViewID(formats strfmt.Registry) error { - - if err := validate.Required("sourceViewId", "body", m.SourceViewID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this replicated view name config based on context it is used -func (m *ReplicatedViewNameConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicatedViewNameConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicatedViewNameConfig) UnmarshalBinary(b []byte) error { - var res ReplicatedViewNameConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_backup_activation.go b/v2/models/replication_backup_activation.go deleted file mode 100644 index 266a5575..00000000 --- a/v2/models/replication_backup_activation.go +++ /dev/null @@ -1,329 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ReplicationBackupActivation Specifies the request parmeters to activate the backup of failover entities on replication cluster. -// -// swagger:model ReplicationBackupActivation -type ReplicationBackupActivation struct { - - // Specifies the list of failover object that need to be protected on replication cluster. If the object set that was sent earlier is provided again then API will return an error. If this objects list is not specified then internally it will be inferred if '/objectLinkage' API has been called previously. - Objects []*FailoverObject `json:"objects"` - - // Specifies the protection group id that will be used for backing up the failover entities on replication cluster. This is a optional argument and only need to be passed if user wants to use the existing job for the backup. If specified then Orchastrator should enusre that protection group is compatible to handle all provided failover objects. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // If this is specifed as true, then reverse replication of failover objects will be enabled from replication cluster to source cluster. If source cluster is not reachable, then replications will fail until source cluster comes up again. Here orchastrator should also ensure that storage domain on replication cluster is correctly mapped to the same storage domain on the source cluster. - EnableReverseReplication *bool `json:"enableReverseReplication,omitempty"` - - // Whether to skip protecting the failed over entities previously specified via Initiate Failover API. - DoNotProtect *bool `json:"doNotProtect,omitempty"` - - // If set to true then object based backups will be created for the failed over VMs. - CreateObjectBackup *bool `json:"createObjectBackup,omitempty"` - - // Policy which will be used in the protection of the failed over objects. - TargetFailoverPolicyID *string `json:"targetFailoverPolicyId,omitempty"` - - // If this is specified, then the protection environment of the failed over objects will be set to this. Otherwise, the protection environment of the failed over objects is determined by the objects' 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"] - TargetFailoverEnvironment *string `json:"targetFailoverEnvironment,omitempty"` -} - -// Validate validates this replication backup activation -func (m *ReplicationBackupActivation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetFailoverEnvironment(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationBackupActivation) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var replicationBackupActivationTypeTargetFailoverEnvironmentPropEnum []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 { - replicationBackupActivationTypeTargetFailoverEnvironmentPropEnum = append(replicationBackupActivationTypeTargetFailoverEnvironmentPropEnum, v) - } -} - -const ( - - // ReplicationBackupActivationTargetFailoverEnvironmentKVMware captures enum value "kVMware" - ReplicationBackupActivationTargetFailoverEnvironmentKVMware string = "kVMware" - - // ReplicationBackupActivationTargetFailoverEnvironmentKHyperV captures enum value "kHyperV" - ReplicationBackupActivationTargetFailoverEnvironmentKHyperV string = "kHyperV" - - // ReplicationBackupActivationTargetFailoverEnvironmentKVCD captures enum value "kVCD" - ReplicationBackupActivationTargetFailoverEnvironmentKVCD string = "kVCD" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAzure captures enum value "kAzure" - ReplicationBackupActivationTargetFailoverEnvironmentKAzure string = "kAzure" - - // ReplicationBackupActivationTargetFailoverEnvironmentKGCP captures enum value "kGCP" - ReplicationBackupActivationTargetFailoverEnvironmentKGCP string = "kGCP" - - // ReplicationBackupActivationTargetFailoverEnvironmentKKVM captures enum value "kKVM" - ReplicationBackupActivationTargetFailoverEnvironmentKKVM string = "kKVM" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAcropolis captures enum value "kAcropolis" - ReplicationBackupActivationTargetFailoverEnvironmentKAcropolis string = "kAcropolis" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAWS captures enum value "kAWS" - ReplicationBackupActivationTargetFailoverEnvironmentKAWS string = "kAWS" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAWSNative captures enum value "kAWSNative" - ReplicationBackupActivationTargetFailoverEnvironmentKAWSNative string = "kAWSNative" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAwsS3 captures enum value "kAwsS3" - ReplicationBackupActivationTargetFailoverEnvironmentKAwsS3 string = "kAwsS3" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" - ReplicationBackupActivationTargetFailoverEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" - - // ReplicationBackupActivationTargetFailoverEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" - ReplicationBackupActivationTargetFailoverEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" - ReplicationBackupActivationTargetFailoverEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" - ReplicationBackupActivationTargetFailoverEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAzureNative captures enum value "kAzureNative" - ReplicationBackupActivationTargetFailoverEnvironmentKAzureNative string = "kAzureNative" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAzureSQL captures enum value "kAzureSQL" - ReplicationBackupActivationTargetFailoverEnvironmentKAzureSQL string = "kAzureSQL" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" - ReplicationBackupActivationTargetFailoverEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" - - // ReplicationBackupActivationTargetFailoverEnvironmentKPhysical captures enum value "kPhysical" - ReplicationBackupActivationTargetFailoverEnvironmentKPhysical string = "kPhysical" - - // ReplicationBackupActivationTargetFailoverEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" - ReplicationBackupActivationTargetFailoverEnvironmentKPhysicalFiles string = "kPhysicalFiles" - - // ReplicationBackupActivationTargetFailoverEnvironmentKGPFS captures enum value "kGPFS" - ReplicationBackupActivationTargetFailoverEnvironmentKGPFS string = "kGPFS" - - // ReplicationBackupActivationTargetFailoverEnvironmentKElastifile captures enum value "kElastifile" - ReplicationBackupActivationTargetFailoverEnvironmentKElastifile string = "kElastifile" - - // ReplicationBackupActivationTargetFailoverEnvironmentKNetapp captures enum value "kNetapp" - ReplicationBackupActivationTargetFailoverEnvironmentKNetapp string = "kNetapp" - - // ReplicationBackupActivationTargetFailoverEnvironmentKGenericNas captures enum value "kGenericNas" - ReplicationBackupActivationTargetFailoverEnvironmentKGenericNas string = "kGenericNas" - - // ReplicationBackupActivationTargetFailoverEnvironmentKIsilon captures enum value "kIsilon" - ReplicationBackupActivationTargetFailoverEnvironmentKIsilon string = "kIsilon" - - // ReplicationBackupActivationTargetFailoverEnvironmentKFlashBlade captures enum value "kFlashBlade" - ReplicationBackupActivationTargetFailoverEnvironmentKFlashBlade string = "kFlashBlade" - - // ReplicationBackupActivationTargetFailoverEnvironmentKPure captures enum value "kPure" - ReplicationBackupActivationTargetFailoverEnvironmentKPure string = "kPure" - - // ReplicationBackupActivationTargetFailoverEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - ReplicationBackupActivationTargetFailoverEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // ReplicationBackupActivationTargetFailoverEnvironmentKSQL captures enum value "kSQL" - ReplicationBackupActivationTargetFailoverEnvironmentKSQL string = "kSQL" - - // ReplicationBackupActivationTargetFailoverEnvironmentKExchange captures enum value "kExchange" - ReplicationBackupActivationTargetFailoverEnvironmentKExchange string = "kExchange" - - // ReplicationBackupActivationTargetFailoverEnvironmentKAD captures enum value "kAD" - ReplicationBackupActivationTargetFailoverEnvironmentKAD string = "kAD" - - // ReplicationBackupActivationTargetFailoverEnvironmentKOracle captures enum value "kOracle" - ReplicationBackupActivationTargetFailoverEnvironmentKOracle string = "kOracle" - - // ReplicationBackupActivationTargetFailoverEnvironmentKView captures enum value "kView" - ReplicationBackupActivationTargetFailoverEnvironmentKView string = "kView" - - // ReplicationBackupActivationTargetFailoverEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" - ReplicationBackupActivationTargetFailoverEnvironmentKRemoteAdapter string = "kRemoteAdapter" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365 captures enum value "kO365" - ReplicationBackupActivationTargetFailoverEnvironmentKO365 string = "kO365" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" - ReplicationBackupActivationTargetFailoverEnvironmentKO365PublicFolders string = "kO365PublicFolders" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365Teams captures enum value "kO365Teams" - ReplicationBackupActivationTargetFailoverEnvironmentKO365Teams string = "kO365Teams" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365Group captures enum value "kO365Group" - ReplicationBackupActivationTargetFailoverEnvironmentKO365Group string = "kO365Group" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365Exchange captures enum value "kO365Exchange" - ReplicationBackupActivationTargetFailoverEnvironmentKO365Exchange string = "kO365Exchange" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365OneDrive captures enum value "kO365OneDrive" - ReplicationBackupActivationTargetFailoverEnvironmentKO365OneDrive string = "kO365OneDrive" - - // ReplicationBackupActivationTargetFailoverEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" - ReplicationBackupActivationTargetFailoverEnvironmentKO365Sharepoint string = "kO365Sharepoint" - - // ReplicationBackupActivationTargetFailoverEnvironmentKKubernetes captures enum value "kKubernetes" - ReplicationBackupActivationTargetFailoverEnvironmentKKubernetes string = "kKubernetes" - - // ReplicationBackupActivationTargetFailoverEnvironmentKCassandra captures enum value "kCassandra" - ReplicationBackupActivationTargetFailoverEnvironmentKCassandra string = "kCassandra" - - // ReplicationBackupActivationTargetFailoverEnvironmentKMongoDB captures enum value "kMongoDB" - ReplicationBackupActivationTargetFailoverEnvironmentKMongoDB string = "kMongoDB" - - // ReplicationBackupActivationTargetFailoverEnvironmentKCouchbase captures enum value "kCouchbase" - ReplicationBackupActivationTargetFailoverEnvironmentKCouchbase string = "kCouchbase" - - // ReplicationBackupActivationTargetFailoverEnvironmentKHdfs captures enum value "kHdfs" - ReplicationBackupActivationTargetFailoverEnvironmentKHdfs string = "kHdfs" - - // ReplicationBackupActivationTargetFailoverEnvironmentKHive captures enum value "kHive" - ReplicationBackupActivationTargetFailoverEnvironmentKHive string = "kHive" - - // ReplicationBackupActivationTargetFailoverEnvironmentKHBase captures enum value "kHBase" - ReplicationBackupActivationTargetFailoverEnvironmentKHBase string = "kHBase" - - // ReplicationBackupActivationTargetFailoverEnvironmentKUDA captures enum value "kUDA" - ReplicationBackupActivationTargetFailoverEnvironmentKUDA string = "kUDA" - - // ReplicationBackupActivationTargetFailoverEnvironmentKSfdc captures enum value "kSfdc" - ReplicationBackupActivationTargetFailoverEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *ReplicationBackupActivation) validateTargetFailoverEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, replicationBackupActivationTypeTargetFailoverEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ReplicationBackupActivation) validateTargetFailoverEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.TargetFailoverEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateTargetFailoverEnvironmentEnum("targetFailoverEnvironment", "body", *m.TargetFailoverEnvironment); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this replication backup activation based on the context it is used -func (m *ReplicationBackupActivation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationBackupActivation) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationBackupActivation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationBackupActivation) UnmarshalBinary(b []byte) error { - var res ReplicationBackupActivation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_backup_activation_result.go b/v2/models/replication_backup_activation_result.go deleted file mode 100644 index 120ca064..00000000 --- a/v2/models/replication_backup_activation_result.go +++ /dev/null @@ -1,237 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationBackupActivationResult Specifies the result returned after creating a protection group for backing up failover objects on replication cluster. -// -// swagger:model ReplicationBackupActivationResult -type ReplicationBackupActivationResult struct { - - // Specifies the protection group id that will be returned upon creation of new group or existing group for backing up failover entities. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // Specifies the reverse replication result. - ReverseReplicationResult *ReverseReplicationResult `json:"reverseReplicationResult,omitempty"` - - // Specifies the list of failover object that are going to be protected on replication cluster. - Objects []*FailoverObject `json:"objects"` - - // Specifies the protection errors, if any, pertaining to each object specified in 'objects'. - ObjectErrors []*Error `json:"objectErrors"` -} - -// Validate validates this replication backup activation result -func (m *ReplicationBackupActivationResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReverseReplicationResult(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectErrors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationBackupActivationResult) validateReverseReplicationResult(formats strfmt.Registry) error { - if swag.IsZero(m.ReverseReplicationResult) { // not required - return nil - } - - if m.ReverseReplicationResult != nil { - if err := m.ReverseReplicationResult.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reverseReplicationResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reverseReplicationResult") - } - return err - } - } - - return nil -} - -func (m *ReplicationBackupActivationResult) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ReplicationBackupActivationResult) validateObjectErrors(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectErrors) { // not required - return nil - } - - for i := 0; i < len(m.ObjectErrors); i++ { - if swag.IsZero(m.ObjectErrors[i]) { // not required - continue - } - - if m.ObjectErrors[i] != nil { - if err := m.ObjectErrors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this replication backup activation result based on the context it is used -func (m *ReplicationBackupActivationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReverseReplicationResult(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectErrors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationBackupActivationResult) contextValidateReverseReplicationResult(ctx context.Context, formats strfmt.Registry) error { - - if m.ReverseReplicationResult != nil { - - if swag.IsZero(m.ReverseReplicationResult) { // not required - return nil - } - - if err := m.ReverseReplicationResult.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reverseReplicationResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reverseReplicationResult") - } - return err - } - } - - return nil -} - -func (m *ReplicationBackupActivationResult) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ReplicationBackupActivationResult) contextValidateObjectErrors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectErrors); i++ { - - if m.ObjectErrors[i] != nil { - - if swag.IsZero(m.ObjectErrors[i]) { // not required - return nil - } - - if err := m.ObjectErrors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectErrors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectErrors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationBackupActivationResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationBackupActivationResult) UnmarshalBinary(b []byte) error { - var res ReplicationBackupActivationResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_config.go b/v2/models/replication_config.go deleted file mode 100644 index ab3b2201..00000000 --- a/v2/models/replication_config.go +++ /dev/null @@ -1,341 +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" -) - -// ReplicationConfig Replication Target Configuration -// -// Specifies settings for copying Snapshots to Remote Clusters. This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model ReplicationConfig -type ReplicationConfig struct { - CommonTargetConfiguration - - // Specifies the type of target to which replication need to be performed. - // Required: true - // Enum: ["RemoteCluster","AWS","Azure"] - TargetType *string `json:"targetType"` - - // Specifies the required information to add remote cluster as replication target. - RemoteTargetConfig *RemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - // Specifies the required information to add AWS as replication target. - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - // Specifies the required information to add Azure as replication target. - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ReplicationConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetType *string `json:"targetType"` - - RemoteTargetConfig *RemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetType = dataAO1.TargetType - - m.RemoteTargetConfig = dataAO1.RemoteTargetConfig - - m.AwsTargetConfig = dataAO1.AwsTargetConfig - - m.AzureTargetConfig = dataAO1.AzureTargetConfig - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ReplicationConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetType *string `json:"targetType"` - - RemoteTargetConfig *RemoteTargetConfig `json:"remoteTargetConfig,omitempty"` - - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - - dataAO1.TargetType = m.TargetType - - dataAO1.RemoteTargetConfig = m.RemoteTargetConfig - - dataAO1.AwsTargetConfig = m.AwsTargetConfig - - dataAO1.AzureTargetConfig = m.AzureTargetConfig - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this replication config -func (m *ReplicationConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var replicationConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RemoteCluster","AWS","Azure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - replicationConfigTypeTargetTypePropEnum = append(replicationConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *ReplicationConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, replicationConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ReplicationConfig) validateTargetType(formats strfmt.Registry) error { - - if err := validate.Required("targetType", "body", m.TargetType); err != nil { - return err - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *ReplicationConfig) validateRemoteTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.RemoteTargetConfig) { // not required - return nil - } - - if m.RemoteTargetConfig != nil { - if err := m.RemoteTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationConfig) validateAwsTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if m.AwsTargetConfig != nil { - if err := m.AwsTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationConfig) validateAzureTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if m.AzureTargetConfig != nil { - if err := m.AzureTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replication config based on the context it is used -func (m *ReplicationConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationConfig) contextValidateRemoteTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RemoteTargetConfig != nil { - - if swag.IsZero(m.RemoteTargetConfig) { // not required - return nil - } - - if err := m.RemoteTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationConfig) contextValidateAwsTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetConfig != nil { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if err := m.AwsTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationConfig) contextValidateAzureTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetConfig != nil { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if err := m.AzureTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationConfig) UnmarshalBinary(b []byte) error { - var res ReplicationConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_data_stats.go b/v2/models/replication_data_stats.go deleted file mode 100644 index d0cc774f..00000000 --- a/v2/models/replication_data_stats.go +++ /dev/null @@ -1,58 +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" -) - -// ReplicationDataStats Replication data statistics. -// -// Specifies statistics about replication data. -// -// swagger:model ReplicationDataStats -type ReplicationDataStats struct { - - // Specifies the total logical size in bytes. - LogicalSizeBytes *int64 `json:"logicalSizeBytes,omitempty"` - - // Specifies the total logical bytes transferred. - LogicalBytesTransferred *int64 `json:"logicalBytesTransferred,omitempty"` - - // Specifies the total physical bytes transferred. - PhysicalBytesTransferred *int64 `json:"physicalBytesTransferred,omitempty"` -} - -// Validate validates this replication data stats -func (m *ReplicationDataStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this replication data stats based on context it is used -func (m *ReplicationDataStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationDataStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationDataStats) UnmarshalBinary(b []byte) error { - var res ReplicationDataStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_encryption_key.go b/v2/models/replication_encryption_key.go deleted file mode 100644 index 9f71428b..00000000 --- a/v2/models/replication_encryption_key.go +++ /dev/null @@ -1,71 +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" -) - -// ReplicationEncryptionKey Specifies the Replication Encryption Key. -// -// swagger:model ReplicationEncryptionKey -type ReplicationEncryptionKey struct { - - // Specifies the Replication Encryption Key. - // Read Only: true - EncryptionKey *string `json:"encryptionKey,omitempty"` -} - -// Validate validates this replication encryption key -func (m *ReplicationEncryptionKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this replication encryption key based on the context it is used -func (m *ReplicationEncryptionKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEncryptionKey(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationEncryptionKey) contextValidateEncryptionKey(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "encryptionKey", "body", m.EncryptionKey); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationEncryptionKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationEncryptionKey) UnmarshalBinary(b []byte) error { - var res ReplicationEncryptionKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_params.go b/v2/models/replication_params.go deleted file mode 100644 index e14cad69..00000000 --- a/v2/models/replication_params.go +++ /dev/null @@ -1,181 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationParams Specifies the replication config for a Remote Cluster. -// -// swagger:model ReplicationParams -type ReplicationParams struct { - - // Specifies a list of Storage Domain pairs. - StorageDomainPairs []*StorageDomainPair `json:"storageDomainPairs,omitempty"` - - // Specifies if all endpoints on Remote Cluster are reachable. - AllEndpointsReachable *bool `json:"allEndpointsReachable,omitempty"` - - // Specifies whether to compress the outbound data when transferring the replication data over the network to the Remote Cluster. - CompressionEnabled *bool `json:"compressionEnabled,omitempty"` - - // Specifies the encryption key used for encrypting the replication data from a local Cluster to a Remote Cluster. If a key is not specified, replication traffic encryption is disabled. When Snapshots are replicated from a local Cluster to a Remote Cluster, the encryption key specified on the local Cluster must be the same as the key specified on the Remote Cluster. - EncryptionKey *string `json:"encryptionKey,omitempty"` - - // Specifies settings for limiting the data transfer rate between the local and Remote Clusters. - BandwidthLimit *BandwidthThrottling `json:"bandwidthLimit,omitempty"` -} - -// Validate validates this replication params -func (m *ReplicationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageDomainPairs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBandwidthLimit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationParams) validateStorageDomainPairs(formats strfmt.Registry) error { - if swag.IsZero(m.StorageDomainPairs) { // not required - return nil - } - - for i := 0; i < len(m.StorageDomainPairs); i++ { - if swag.IsZero(m.StorageDomainPairs[i]) { // not required - continue - } - - if m.StorageDomainPairs[i] != nil { - if err := m.StorageDomainPairs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ReplicationParams) validateBandwidthLimit(formats strfmt.Registry) error { - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if m.BandwidthLimit != nil { - if err := m.BandwidthLimit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replication params based on the context it is used -func (m *ReplicationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageDomainPairs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBandwidthLimit(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationParams) contextValidateStorageDomainPairs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageDomainPairs); i++ { - - if m.StorageDomainPairs[i] != nil { - - if swag.IsZero(m.StorageDomainPairs[i]) { // not required - return nil - } - - if err := m.StorageDomainPairs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ReplicationParams) contextValidateBandwidthLimit(ctx context.Context, formats strfmt.Registry) error { - - if m.BandwidthLimit != nil { - - if swag.IsZero(m.BandwidthLimit) { // not required - return nil - } - - if err := m.BandwidthLimit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bandwidthLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bandwidthLimit") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationParams) UnmarshalBinary(b []byte) error { - var res ReplicationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_run.go b/v2/models/replication_run.go deleted file mode 100644 index 043429c4..00000000 --- a/v2/models/replication_run.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationRun Replication run information for an object. -// -// Specifies information about replication run for an object. -// -// swagger:model ReplicationRun -type ReplicationRun struct { - - // Replication result for a target. - ReplicationTargetResults []*ReplicationTargetResult `json:"replicationTargetResults"` -} - -// Validate validates this replication run -func (m *ReplicationRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationRun) validateReplicationTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTargetResults); i++ { - if swag.IsZero(m.ReplicationTargetResults[i]) { // not required - continue - } - - if m.ReplicationTargetResults[i] != nil { - if err := m.ReplicationTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this replication run based on the context it is used -func (m *ReplicationRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicationTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationRun) contextValidateReplicationTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationTargetResults); i++ { - - if m.ReplicationTargetResults[i] != nil { - - if swag.IsZero(m.ReplicationTargetResults[i]) { // not required - return nil - } - - if err := m.ReplicationTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationRun) UnmarshalBinary(b []byte) error { - var res ReplicationRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_run_summary.go b/v2/models/replication_run_summary.go deleted file mode 100644 index 1df892de..00000000 --- a/v2/models/replication_run_summary.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationRunSummary Summary information for replication run. -// -// Specifies summary information about replication run. -// -// swagger:model ReplicationRunSummary -type ReplicationRunSummary struct { - - // Replication results for each replication target. - ReplicationTargetResults []*ReplicationTargetResult `json:"replicationTargetResults"` -} - -// Validate validates this replication run summary -func (m *ReplicationRunSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationTargetResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationRunSummary) validateReplicationTargetResults(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargetResults) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTargetResults); i++ { - if swag.IsZero(m.ReplicationTargetResults[i]) { // not required - continue - } - - if m.ReplicationTargetResults[i] != nil { - if err := m.ReplicationTargetResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this replication run summary based on the context it is used -func (m *ReplicationRunSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicationTargetResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationRunSummary) contextValidateReplicationTargetResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationTargetResults); i++ { - - if m.ReplicationTargetResults[i] != nil { - - if swag.IsZero(m.ReplicationTargetResults[i]) { // not required - return nil - } - - if err := m.ReplicationTargetResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargetResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationRunSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationRunSummary) UnmarshalBinary(b []byte) error { - var res ReplicationRunSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_target_progress_info.go b/v2/models/replication_target_progress_info.go deleted file mode 100644 index 2cd76482..00000000 --- a/v2/models/replication_target_progress_info.go +++ /dev/null @@ -1,201 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ReplicationTargetProgressInfo Specifies the progress of a replication run target. -// -// swagger:model ReplicationTargetProgressInfo -type ReplicationTargetProgressInfo struct { - ReplicationTargetSummaryInfo - - ProgressTaskInfo - - // Specifies progress for objects. - Objects []*ObjectProgressInfo `json:"objects"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ReplicationTargetProgressInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ReplicationTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ReplicationTargetSummaryInfo = aO0 - - // AO1 - var aO1 ProgressTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.ProgressTaskInfo = aO1 - - // AO2 - var dataAO2 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.Objects = dataAO2.Objects - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ReplicationTargetProgressInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.ReplicationTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.ProgressTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - Objects []*ObjectProgressInfo `json:"objects"` - } - - dataAO2.Objects = m.Objects - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this replication target progress info -func (m *ReplicationTargetProgressInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSummaryInfo - if err := m.ReplicationTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationTargetProgressInfo) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this replication target progress info based on the context it is used -func (m *ReplicationTargetProgressInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSummaryInfo - if err := m.ReplicationTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with ProgressTaskInfo - if err := m.ProgressTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationTargetProgressInfo) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTargetProgressInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTargetProgressInfo) UnmarshalBinary(b []byte) error { - var res ReplicationTargetProgressInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_target_result.go b/v2/models/replication_target_result.go deleted file mode 100644 index 5e2f0084..00000000 --- a/v2/models/replication_target_result.go +++ /dev/null @@ -1,412 +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" -) - -// ReplicationTargetResult Replication result for a target. -// -// Replication result for a target. -// -// swagger:model ReplicationTargetResult -type ReplicationTargetResult struct { - ReplicationTargetSummaryInfo - - // Specifies the start time of replication in Unix epoch Timestamp(in microseconds) for a target. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of replication in Unix epoch Timestamp(in microseconds) for a target. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the time when the replication is queued for schedule in Unix epoch Timestamp(in microseconds) for a target. - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - // Status of the replication for a target. '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. 'Paused' indicates that the ongoing run has been paused. '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. 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"] - Status *string `json:"status,omitempty"` - - // Message about the replication run. - Message *string `json:"message,omitempty"` - - // Specifies the progress in percentage. - PercentageCompleted *int32 `json:"percentageCompleted,omitempty"` - - // Replication data statistics for a target. - Stats *ReplicationDataStats `json:"stats,omitempty"` - - // Specifies whether the snapshot is deleted manually. - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - // Specifies the expiry time of attempt in Unix epoch Timestamp (in microseconds) for an object. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // Task UID for a replication protection run. This is for tasks that are replicated from another cluster. - ReplicationTaskID *string `json:"replicationTaskId,omitempty"` - - // Specifies the number of metadata actions completed during the protection run. - EntriesChanged *int64 `json:"entriesChanged,omitempty"` - - // Specifies the direction of the replication. If the snapshot is replicated to this cluster, then isInBound is true. If the snapshot is replicated from this cluster to another cluster, then isInBound is false. - IsInBound *bool `json:"isInBound,omitempty"` - - // Specifies the dataLock constraints for the replication target. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - // Specifies the legal hold status for a replication target. - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - // Specifies whether view based replication was used. In this case, the view containing all objects is replicated as a whole instead of replicating on a per object basis. - MultiObjectReplication *bool `json:"multiObjectReplication,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ReplicationTargetResult) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ReplicationTargetSummaryInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ReplicationTargetSummaryInfo = aO0 - - // AO1 - var dataAO1 struct { - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - PercentageCompleted *int32 `json:"percentageCompleted,omitempty"` - - Stats *ReplicationDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - ReplicationTaskID *string `json:"replicationTaskId,omitempty"` - - EntriesChanged *int64 `json:"entriesChanged,omitempty"` - - IsInBound *bool `json:"isInBound,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - MultiObjectReplication *bool `json:"multiObjectReplication,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StartTimeUsecs = dataAO1.StartTimeUsecs - - m.EndTimeUsecs = dataAO1.EndTimeUsecs - - m.QueuedTimeUsecs = dataAO1.QueuedTimeUsecs - - m.Status = dataAO1.Status - - m.Message = dataAO1.Message - - m.PercentageCompleted = dataAO1.PercentageCompleted - - m.Stats = dataAO1.Stats - - m.IsManuallyDeleted = dataAO1.IsManuallyDeleted - - m.ExpiryTimeUsecs = dataAO1.ExpiryTimeUsecs - - m.ReplicationTaskID = dataAO1.ReplicationTaskID - - m.EntriesChanged = dataAO1.EntriesChanged - - m.IsInBound = dataAO1.IsInBound - - m.DataLockConstraints = dataAO1.DataLockConstraints - - m.OnLegalHold = dataAO1.OnLegalHold - - m.MultiObjectReplication = dataAO1.MultiObjectReplication - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ReplicationTargetResult) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ReplicationTargetSummaryInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - QueuedTimeUsecs *int64 `json:"queuedTimeUsecs,omitempty"` - - Status *string `json:"status,omitempty"` - - Message *string `json:"message,omitempty"` - - PercentageCompleted *int32 `json:"percentageCompleted,omitempty"` - - Stats *ReplicationDataStats `json:"stats,omitempty"` - - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - ReplicationTaskID *string `json:"replicationTaskId,omitempty"` - - EntriesChanged *int64 `json:"entriesChanged,omitempty"` - - IsInBound *bool `json:"isInBound,omitempty"` - - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` - - OnLegalHold *bool `json:"onLegalHold,omitempty"` - - MultiObjectReplication *bool `json:"multiObjectReplication,omitempty"` - } - - dataAO1.StartTimeUsecs = m.StartTimeUsecs - - dataAO1.EndTimeUsecs = m.EndTimeUsecs - - dataAO1.QueuedTimeUsecs = m.QueuedTimeUsecs - - dataAO1.Status = m.Status - - dataAO1.Message = m.Message - - dataAO1.PercentageCompleted = m.PercentageCompleted - - dataAO1.Stats = m.Stats - - dataAO1.IsManuallyDeleted = m.IsManuallyDeleted - - dataAO1.ExpiryTimeUsecs = m.ExpiryTimeUsecs - - dataAO1.ReplicationTaskID = m.ReplicationTaskID - - dataAO1.EntriesChanged = m.EntriesChanged - - dataAO1.IsInBound = m.IsInBound - - dataAO1.DataLockConstraints = m.DataLockConstraints - - dataAO1.OnLegalHold = m.OnLegalHold - - dataAO1.MultiObjectReplication = m.MultiObjectReplication - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this replication target result -func (m *ReplicationTargetResult) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSummaryInfo - if err := m.ReplicationTargetSummaryInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var replicationTargetResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped","Paused"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - replicationTargetResultTypeStatusPropEnum = append(replicationTargetResultTypeStatusPropEnum, v) - } -} - -// property enum -func (m *ReplicationTargetResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, replicationTargetResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ReplicationTargetResult) validateStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *ReplicationTargetResult) validateStats(formats strfmt.Registry) error { - - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *ReplicationTargetResult) validateDataLockConstraints(formats strfmt.Registry) error { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replication target result based on the context it is used -func (m *ReplicationTargetResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSummaryInfo - if err := m.ReplicationTargetSummaryInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationTargetResult) 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 -} - -func (m *ReplicationTargetResult) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTargetResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTargetResult) UnmarshalBinary(b []byte) error { - var res ReplicationTargetResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_target_summary_info.go b/v2/models/replication_target_summary_info.go deleted file mode 100644 index e5247550..00000000 --- a/v2/models/replication_target_summary_info.go +++ /dev/null @@ -1,228 +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" -) - -// ReplicationTargetSummaryInfo Replication target. -// -// Specifies replication target summary information. -// -// swagger:model ReplicationTargetSummaryInfo -type ReplicationTargetSummaryInfo struct { - ClusterIdentifier - - // aws target config - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - // azure target config - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ReplicationTargetSummaryInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ClusterIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ClusterIdentifier = aO0 - - // AO1 - var dataAO1 struct { - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsTargetConfig = dataAO1.AwsTargetConfig - - m.AzureTargetConfig = dataAO1.AzureTargetConfig - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ReplicationTargetSummaryInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ClusterIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsTargetConfig *AWSTargetConfig `json:"awsTargetConfig,omitempty"` - - AzureTargetConfig *AzureTargetConfig `json:"azureTargetConfig,omitempty"` - } - - dataAO1.AwsTargetConfig = m.AwsTargetConfig - - dataAO1.AzureTargetConfig = m.AzureTargetConfig - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this replication target summary info -func (m *ReplicationTargetSummaryInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ClusterIdentifier - if err := m.ClusterIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTargetConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationTargetSummaryInfo) validateAwsTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if m.AwsTargetConfig != nil { - if err := m.AwsTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationTargetSummaryInfo) validateAzureTargetConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if m.AzureTargetConfig != nil { - if err := m.AzureTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this replication target summary info based on the context it is used -func (m *ReplicationTargetSummaryInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ClusterIdentifier - if err := m.ClusterIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ReplicationTargetSummaryInfo) contextValidateAwsTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTargetConfig != nil { - - if swag.IsZero(m.AwsTargetConfig) { // not required - return nil - } - - if err := m.AwsTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTargetConfig") - } - return err - } - } - - return nil -} - -func (m *ReplicationTargetSummaryInfo) contextValidateAzureTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTargetConfig != nil { - - if swag.IsZero(m.AzureTargetConfig) { // not required - return nil - } - - if err := m.AzureTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTargetConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTargetSummaryInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTargetSummaryInfo) UnmarshalBinary(b []byte) error { - var res ReplicationTargetSummaryInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/replication_targets.go b/v2/models/replication_targets.go deleted file mode 100644 index 28e1eecc..00000000 --- a/v2/models/replication_targets.go +++ /dev/null @@ -1,110 +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" -) - -// ReplicationTargets ReplicationTargets -// -// # Replication Targets -// -// swagger:model ReplicationTargets -type ReplicationTargets struct { - - // Specifies the replication target. - // Enum: ["RemoteCluster","AWS","Azure"] - ReplicationTargets string `json:"replicationTargets,omitempty"` -} - -// Validate validates this replication targets -func (m *ReplicationTargets) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var replicationTargetsTypeReplicationTargetsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RemoteCluster","AWS","Azure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - replicationTargetsTypeReplicationTargetsPropEnum = append(replicationTargetsTypeReplicationTargetsPropEnum, v) - } -} - -const ( - - // ReplicationTargetsReplicationTargetsRemoteCluster captures enum value "RemoteCluster" - ReplicationTargetsReplicationTargetsRemoteCluster string = "RemoteCluster" - - // ReplicationTargetsReplicationTargetsAWS captures enum value "AWS" - ReplicationTargetsReplicationTargetsAWS string = "AWS" - - // ReplicationTargetsReplicationTargetsAzure captures enum value "Azure" - ReplicationTargetsReplicationTargetsAzure string = "Azure" -) - -// prop value enum -func (m *ReplicationTargets) validateReplicationTargetsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, replicationTargetsTypeReplicationTargetsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ReplicationTargets) validateReplicationTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargets) { // not required - return nil - } - - // value enum - if err := m.validateReplicationTargetsEnum("replicationTargets", "body", m.ReplicationTargets); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this replication targets based on context it is used -func (m *ReplicationTargets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReplicationTargets) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReplicationTargets) UnmarshalBinary(b []byte) error { - var res ReplicationTargets - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/request_initiator_type.go b/v2/models/request_initiator_type.go deleted file mode 100644 index 2b8fe055..00000000 --- a/v2/models/request_initiator_type.go +++ /dev/null @@ -1,110 +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" -) - -// RequestInitiatorType RequestInitiatorType -// -// Specifies the type of the request's initiator. -// -// swagger:model RequestInitiatorType -type RequestInitiatorType struct { - - // Specifies the type of the request's initiator. - // Enum: ["UIUser","UIAuto","Helios"] - RequestInitiatorType string `json:"requestInitiatorType,omitempty"` -} - -// Validate validates this request initiator type -func (m *RequestInitiatorType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRequestInitiatorType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var requestInitiatorTypeTypeRequestInitiatorTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["UIUser","UIAuto","Helios"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - requestInitiatorTypeTypeRequestInitiatorTypePropEnum = append(requestInitiatorTypeTypeRequestInitiatorTypePropEnum, v) - } -} - -const ( - - // RequestInitiatorTypeRequestInitiatorTypeUIUser captures enum value "UIUser" - RequestInitiatorTypeRequestInitiatorTypeUIUser string = "UIUser" - - // RequestInitiatorTypeRequestInitiatorTypeUIAuto captures enum value "UIAuto" - RequestInitiatorTypeRequestInitiatorTypeUIAuto string = "UIAuto" - - // RequestInitiatorTypeRequestInitiatorTypeHelios captures enum value "Helios" - RequestInitiatorTypeRequestInitiatorTypeHelios string = "Helios" -) - -// prop value enum -func (m *RequestInitiatorType) validateRequestInitiatorTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, requestInitiatorTypeTypeRequestInitiatorTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RequestInitiatorType) validateRequestInitiatorType(formats strfmt.Registry) error { - if swag.IsZero(m.RequestInitiatorType) { // not required - return nil - } - - // value enum - if err := m.validateRequestInitiatorTypeEnum("requestInitiatorType", "body", m.RequestInitiatorType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this request initiator type based on context it is used -func (m *RequestInitiatorType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RequestInitiatorType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RequestInitiatorType) UnmarshalBinary(b []byte) error { - var res RequestInitiatorType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/reset_or_restore_networking.go b/v2/models/reset_or_restore_networking.go deleted file mode 100644 index 29f2bf88..00000000 --- a/v2/models/reset_or_restore_networking.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ResetOrRestoreNetworking ResetOrRestoreNetworking -// -// # Update cluster or node reset state information -// -// swagger:model ResetOrRestoreNetworking -type ResetOrRestoreNetworking struct { - - // Cancel reset cluster or node state operation. - // Enum: ["network-reset","restore"] - Operation *string `json:"operation,omitempty"` -} - -// Validate validates this reset or restore networking -func (m *ResetOrRestoreNetworking) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var resetOrRestoreNetworkingTypeOperationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["network-reset","restore"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - resetOrRestoreNetworkingTypeOperationPropEnum = append(resetOrRestoreNetworkingTypeOperationPropEnum, v) - } -} - -const ( - - // ResetOrRestoreNetworkingOperationNetworkDashReset captures enum value "network-reset" - ResetOrRestoreNetworkingOperationNetworkDashReset string = "network-reset" - - // ResetOrRestoreNetworkingOperationRestore captures enum value "restore" - ResetOrRestoreNetworkingOperationRestore string = "restore" -) - -// prop value enum -func (m *ResetOrRestoreNetworking) validateOperationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, resetOrRestoreNetworkingTypeOperationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ResetOrRestoreNetworking) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(m.Operation) { // not required - return nil - } - - // value enum - if err := m.validateOperationEnum("operation", "body", *m.Operation); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this reset or restore networking based on context it is used -func (m *ResetOrRestoreNetworking) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResetOrRestoreNetworking) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResetOrRestoreNetworking) UnmarshalBinary(b []byte) error { - var res ResetOrRestoreNetworking - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/reset_patch_download_progress_result.go b/v2/models/reset_patch_download_progress_result.go deleted file mode 100644 index 86432eb1..00000000 --- a/v2/models/reset_patch_download_progress_result.go +++ /dev/null @@ -1,50 +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" -) - -// ResetPatchDownloadProgressResult Specifies the result of resetting patch download progress. -// -// swagger:model ResetPatchDownloadProgressResult -type ResetPatchDownloadProgressResult struct { - - // Specifies the result of resetting patch download progress. - Message *string `json:"message,omitempty"` -} - -// Validate validates this reset patch download progress result -func (m *ResetPatchDownloadProgressResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this reset patch download progress result based on context it is used -func (m *ResetPatchDownloadProgressResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResetPatchDownloadProgressResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResetPatchDownloadProgressResult) UnmarshalBinary(b []byte) error { - var res ResetPatchDownloadProgressResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/reset_states.go b/v2/models/reset_states.go deleted file mode 100644 index 82e52f8a..00000000 --- a/v2/models/reset_states.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ResetStates reset states -// -// swagger:model ResetStates -type ResetStates []*NodeResetState - -// Validate validates this reset states -func (m ResetStates) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this reset states based on the context it is used -func (m ResetStates) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/resource_endpoint.go b/v2/models/resource_endpoint.go deleted file mode 100644 index 59c4b5ec..00000000 --- a/v2/models/resource_endpoint.go +++ /dev/null @@ -1,65 +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" -) - -// ResourceEndpoint Specifies the details about the resource endpoint. -// -// swagger:model ResourceEndpoint -type ResourceEndpoint struct { - - // Specifies the fqdn of this endpoint. - Fqdn *string `json:"fqdn,omitempty"` - - // Specifies the ipv4 address of this endpoint. - Ipv4addr *string `json:"ipv4addr,omitempty"` - - // Specifies the ipv6 address of this endpoint. - Ipv6addr *string `json:"ipv6addr,omitempty"` - - // Specifies the subnet Ip4 address of this endpoint. - SubnetIp4addr *string `json:"subnetIp4addr,omitempty"` - - // Specifies the preferred address to use for connecting. - PreferredAddress *string `json:"preferredAddress,omitempty"` - - // Whether to use this endpoint to connect. - IsPreferredEndpoint *bool `json:"isPreferredEndpoint,omitempty"` -} - -// Validate validates this resource endpoint -func (m *ResourceEndpoint) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this resource endpoint based on context it is used -func (m *ResourceEndpoint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResourceEndpoint) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResourceEndpoint) UnmarshalBinary(b []byte) error { - var res ResourceEndpoint - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/restore_spfile_or_pfile_info.go b/v2/models/restore_spfile_or_pfile_info.go deleted file mode 100644 index 45fbe826..00000000 --- a/v2/models/restore_spfile_or_pfile_info.go +++ /dev/null @@ -1,55 +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" -) - -// RestoreSpfileOrPfileInfo RestoreSpfileOrPfileInfo -// -// Specifies information related to restoring Spfile/Pfile. -// -// swagger:model RestoreSpfileOrPfileInfo -type RestoreSpfileOrPfileInfo struct { - - // Specifies whether to restore spfile/pfile or skip it. - ShouldRestoreSpfileOrPfile *bool `json:"shouldRestoreSpfileOrPfile,omitempty"` - - // Specifies the location where spfile/file will be restored. If this is empty and shouldRestoreSpfileOrPfile is true we restore at default location: $ORACLE_HOME/dbs - FileLocation *string `json:"fileLocation,omitempty"` -} - -// Validate validates this restore spfile or pfile info -func (m *RestoreSpfileOrPfileInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore spfile or pfile info based on context it is used -func (m *RestoreSpfileOrPfileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreSpfileOrPfileInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreSpfileOrPfileInfo) UnmarshalBinary(b []byte) error { - var res RestoreSpfileOrPfileInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/restore_v_mware_vm_params.go b/v2/models/restore_v_mware_vm_params.go deleted file mode 100644 index 83744fc6..00000000 --- a/v2/models/restore_v_mware_vm_params.go +++ /dev/null @@ -1,76 +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" -) - -// RestoreVMwareVMParams VMware Target Params. -// -// Specifies the parameters for a VMware recovery target. -// -// swagger:model RestoreVMwareVMParams -type RestoreVMwareVMParams struct { - - // Specifies the folder ID where the VMs should be created. - TargetVMFolderID *int64 `json:"targetVMFolderId,omitempty"` - - // Specifies the folder where the restore datastore should be created. - TargetDataStoreID *int64 `json:"targetDataStoreId,omitempty"` - - // Specifies whether to perform copy recovery or not. - EnableCopyRecovery *bool `json:"enableCopyRecovery,omitempty"` - - // Specifies if the restore is to alternate location. - ResourcePoolID *int64 `json:"resourcePoolId,omitempty"` - - // Specifies Datastore Ids, if the restore is to alternate location. - DatastoreIds []int64 `json:"datastoreIds"` - - // Specifies whether to overwrite the VM at the target location. - OverwriteExistingVM *bool `json:"overwriteExistingVm,omitempty"` - - // Specifies whether to power off and mark the VM at the target location as deprecated. - PowerOffAndRenameExistingVM *bool `json:"powerOffAndRenameExistingVm,omitempty"` - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies whether a task in on prem deploy or not. - IsOnPremDeploy *bool `json:"isOnPremDeploy,omitempty"` -} - -// Validate validates this restore v mware VM params -func (m *RestoreVMwareVMParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restore v mware VM params based on context it is used -func (m *RestoreVMwareVMParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreVMwareVMParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreVMwareVMParams) UnmarshalBinary(b []byte) error { - var res RestoreVMwareVMParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/resume_action_object_level_params.go b/v2/models/resume_action_object_level_params.go deleted file mode 100644 index 5d70a527..00000000 --- a/v2/models/resume_action_object_level_params.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" -) - -// ResumeActionObjectLevelParams Specifies the request parameters for Resume action on a Protected object. -// -// swagger:model ResumeActionObjectLevelParams -type ResumeActionObjectLevelParams struct { - ProtectionObjectInput -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ResumeActionObjectLevelParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ResumeActionObjectLevelParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this resume action object level params -func (m *ResumeActionObjectLevelParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this resume action object level params based on the context it is used -func (m *ResumeActionObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ResumeActionObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResumeActionObjectLevelParams) UnmarshalBinary(b []byte) error { - var res ResumeActionObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/resume_action_object_level_response.go b/v2/models/resume_action_object_level_response.go deleted file mode 100644 index ec382aed..00000000 --- a/v2/models/resume_action_object_level_response.go +++ /dev/null @@ -1,109 +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" -) - -// ResumeActionObjectLevelResponse Specifies the infomration about status of resume action. -// -// swagger:model ResumeActionObjectLevelResponse -type ResumeActionObjectLevelResponse struct { - - // If the action fails for this object, then error will be return here. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this resume action object level response -func (m *ResumeActionObjectLevelResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResumeActionObjectLevelResponse) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this resume action object level response based on the context it is used -func (m *ResumeActionObjectLevelResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResumeActionObjectLevelResponse) 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 -} - -// MarshalBinary interface implementation -func (m *ResumeActionObjectLevelResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResumeActionObjectLevelResponse) UnmarshalBinary(b []byte) error { - var res ResumeActionObjectLevelResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/resume_protection_run_action_params.go b/v2/models/resume_protection_run_action_params.go deleted file mode 100644 index c03d7537..00000000 --- a/v2/models/resume_protection_run_action_params.go +++ /dev/null @@ -1,78 +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" -) - -// ResumeProtectionRunActionParams Resume protection run request. -// -// Specifies the request to resume a protection run. -// -// swagger:model ResumeProtectionRunActionParams -type ResumeProtectionRunActionParams struct { - - // Specifies a unique run id of the Protection Group run. - // Required: true - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId"` -} - -// Validate validates this resume protection run action params -func (m *ResumeProtectionRunActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResumeProtectionRunActionParams) validateRunID(formats strfmt.Registry) error { - - if err := validate.Required("runId", "body", m.RunID); err != nil { - return err - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this resume protection run action params based on context it is used -func (m *ResumeProtectionRunActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResumeProtectionRunActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResumeProtectionRunActionParams) UnmarshalBinary(b []byte) error { - var res ResumeProtectionRunActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/resume_protection_run_action_response_params.go b/v2/models/resume_protection_run_action_response_params.go deleted file mode 100644 index 3c930487..00000000 --- a/v2/models/resume_protection_run_action_response_params.go +++ /dev/null @@ -1,77 +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" -) - -// ResumeProtectionRunActionResponseParams Specifies the response of a resume action on protection runs. -// -// swagger:model ResumeProtectionRunActionResponseParams -type ResumeProtectionRunActionResponseParams struct { - - // Specifies a unique run id of the Protection Group run. - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId,omitempty"` - - // Specifies an error occured when perfroming resume of a protection run. - Error *string `json:"error,omitempty"` -} - -// Validate validates this resume protection run action response params -func (m *ResumeProtectionRunActionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ResumeProtectionRunActionResponseParams) validateRunID(formats strfmt.Registry) error { - if swag.IsZero(m.RunID) { // not required - return nil - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this resume protection run action response params based on context it is used -func (m *ResumeProtectionRunActionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ResumeProtectionRunActionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ResumeProtectionRunActionResponseParams) UnmarshalBinary(b []byte) error { - var res ResumeProtectionRunActionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/retention.go b/v2/models/retention.go deleted file mode 100644 index 6e6a0b84..00000000 --- a/v2/models/retention.go +++ /dev/null @@ -1,191 +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" -) - -// Retention Specifies the retention of a backup. -// -// swagger:model Retention -type Retention struct { - - // Specificies the Retention Unit of a backup measured in days, months or years.
If unit is 'Months', then number specified in duration is multiplied to 30.
Example: If duration is 4 and unit is 'Months' then number of retention days will be 30 * 4 = 120 days.
If unit is 'Years', then number specified in duration is multiplied to 365.
If duration is 2 and unit is 'Years' then number of retention days will be 365 * 2 = 730 days. - // Required: true - // Enum: ["Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the duration for a backup retention.
Example. If duration is 7 and unit is Months, the retention of a backup is 7 * 30 = 210 days. - // Required: true - // Minimum: 1 - Duration *int64 `json:"duration"` - - // Specifies WORM retention type for the 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. For RPaaS the data lock will always be automatically set to cover the whole retention, and any input will be ignored. - DataLockConfig *DataLockConfig `json:"dataLockConfig,omitempty"` -} - -// Validate validates this retention -func (m *Retention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDuration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var retentionTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - retentionTypeUnitPropEnum = append(retentionTypeUnitPropEnum, v) - } -} - -const ( - - // RetentionUnitDays captures enum value "Days" - RetentionUnitDays string = "Days" - - // RetentionUnitWeeks captures enum value "Weeks" - RetentionUnitWeeks string = "Weeks" - - // RetentionUnitMonths captures enum value "Months" - RetentionUnitMonths string = "Months" - - // RetentionUnitYears captures enum value "Years" - RetentionUnitYears string = "Years" -) - -// prop value enum -func (m *Retention) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, retentionTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Retention) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *Retention) validateDuration(formats strfmt.Registry) error { - - if err := validate.Required("duration", "body", m.Duration); err != nil { - return err - } - - if err := validate.MinimumInt("duration", "body", *m.Duration, 1, false); err != nil { - return err - } - - return nil -} - -func (m *Retention) validateDataLockConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if m.DataLockConfig != nil { - if err := m.DataLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this retention based on the context it is used -func (m *Retention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Retention) contextValidateDataLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConfig != nil { - - if swag.IsZero(m.DataLockConfig) { // not required - return nil - } - - if err := m.DataLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Retention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Retention) UnmarshalBinary(b []byte) error { - var res Retention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/retention_units.go b/v2/models/retention_units.go deleted file mode 100644 index a7d7324d..00000000 --- a/v2/models/retention_units.go +++ /dev/null @@ -1,113 +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" -) - -// RetentionUnits RetentionUnits -// -// Retention Units. -// -// swagger:model RetentionUnits -type RetentionUnits struct { - - // Specifies the retention unit. - // Enum: ["Days","Weeks","Months","Years"] - RetentionUnits string `json:"retentionUnits,omitempty"` -} - -// Validate validates this retention units -func (m *RetentionUnits) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetentionUnits(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var retentionUnitsTypeRetentionUnitsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - retentionUnitsTypeRetentionUnitsPropEnum = append(retentionUnitsTypeRetentionUnitsPropEnum, v) - } -} - -const ( - - // RetentionUnitsRetentionUnitsDays captures enum value "Days" - RetentionUnitsRetentionUnitsDays string = "Days" - - // RetentionUnitsRetentionUnitsWeeks captures enum value "Weeks" - RetentionUnitsRetentionUnitsWeeks string = "Weeks" - - // RetentionUnitsRetentionUnitsMonths captures enum value "Months" - RetentionUnitsRetentionUnitsMonths string = "Months" - - // RetentionUnitsRetentionUnitsYears captures enum value "Years" - RetentionUnitsRetentionUnitsYears string = "Years" -) - -// prop value enum -func (m *RetentionUnits) validateRetentionUnitsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, retentionUnitsTypeRetentionUnitsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RetentionUnits) validateRetentionUnits(formats strfmt.Registry) error { - if swag.IsZero(m.RetentionUnits) { // not required - return nil - } - - // value enum - if err := m.validateRetentionUnitsEnum("retentionUnits", "body", m.RetentionUnits); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this retention units based on context it is used -func (m *RetentionUnits) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RetentionUnits) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetentionUnits) UnmarshalBinary(b []byte) error { - var res RetentionUnits - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/retrieve_archive_task.go b/v2/models/retrieve_archive_task.go deleted file mode 100644 index 5cc70d32..00000000 --- a/v2/models/retrieve_archive_task.go +++ /dev/null @@ -1,77 +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" -) - -// RetrieveArchiveTask Specifies the persistent state of a retrieve of an archive task. -// -// swagger:model RetrieveArchiveTask -type RetrieveArchiveTask struct { - - // Specifies the globally unique id for this retrieval of an archive task. - // Pattern: ^\d+:\d+:\d+$ - TaskUID *string `json:"taskUid,omitempty"` - - // Specifies how much time the retrieved entity is present in the hot-tiers. - UptierExpiryTimes []int64 `json:"uptierExpiryTimes"` -} - -// Validate validates this retrieve archive task -func (m *RetrieveArchiveTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTaskUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetrieveArchiveTask) validateTaskUID(formats strfmt.Registry) error { - if swag.IsZero(m.TaskUID) { // not required - return nil - } - - if err := validate.Pattern("taskUid", "body", *m.TaskUID, `^\d+:\d+:\d+$`); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this retrieve archive task based on context it is used -func (m *RetrieveArchiveTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RetrieveArchiveTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetrieveArchiveTask) UnmarshalBinary(b []byte) error { - var res RetrieveArchiveTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/retry_options.go b/v2/models/retry_options.go deleted file mode 100644 index 842e4055..00000000 --- a/v2/models/retry_options.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" - "github.com/go-openapi/validate" -) - -// RetryOptions Retry Options of a Protection Policy when a Protection Group run fails. -// -// swagger:model RetryOptions -type RetryOptions struct { - - // Specifies the number of times to retry capturing Snapshots before - // the Protection Group Run fails. - // Minimum: 0 - Retries *int32 `json:"retries,omitempty"` - - // Specifies the number of minutes before retrying a failed Protection Group. - // Minimum: 1 - RetryIntervalMins *int32 `json:"retryIntervalMins,omitempty"` -} - -// Validate validates this retry options -func (m *RetryOptions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRetries(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetryIntervalMins(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RetryOptions) validateRetries(formats strfmt.Registry) error { - if swag.IsZero(m.Retries) { // not required - return nil - } - - if err := validate.MinimumInt("retries", "body", int64(*m.Retries), 0, false); err != nil { - return err - } - - return nil -} - -func (m *RetryOptions) validateRetryIntervalMins(formats strfmt.Registry) error { - if swag.IsZero(m.RetryIntervalMins) { // not required - return nil - } - - if err := validate.MinimumInt("retryIntervalMins", "body", int64(*m.RetryIntervalMins), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this retry options based on context it is used -func (m *RetryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RetryOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RetryOptions) UnmarshalBinary(b []byte) error { - var res RetryOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/reverse_replication_result.go b/v2/models/reverse_replication_result.go deleted file mode 100644 index e05552fa..00000000 --- a/v2/models/reverse_replication_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" -) - -// ReverseReplicationResult Specifies the request parameters to create a view failover task. -// -// swagger:model ReverseReplicationResult -type ReverseReplicationResult struct { - - // Specifies whether the reverse replication was enabled or not during group creation. It can be false, if source cluster is not reachable for reverse replication. - IsReverseReplicationEnabled *bool `json:"isReverseReplicationEnabled,omitempty"` - - // Specifies the reason of not enabling reverse replication. - ErrorReason *string `json:"errorReason,omitempty"` -} - -// Validate validates this reverse replication result -func (m *ReverseReplicationResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this reverse replication result based on context it is used -func (m *ReverseReplicationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ReverseReplicationResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ReverseReplicationResult) UnmarshalBinary(b []byte) error { - var res ReverseReplicationResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/revert_patches_request.go b/v2/models/revert_patches_request.go deleted file mode 100644 index ba3a7c8a..00000000 --- a/v2/models/revert_patches_request.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" -) - -// RevertPatchesRequest Revert patch. -// -// Specifies the request to revert a patch. An optional patch level can be specified. When a patch level is specified, system keeps reverting patches until the given patch level is reverted. If no patch level is specified, just the last applied patch is reverted. -// -// swagger:model RevertPatchesRequest -type RevertPatchesRequest struct { - - // Specifies the name of the service whose patch should be reverted. - // Required: true - Service *string `json:"service"` -} - -// Validate validates this revert patches request -func (m *RevertPatchesRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RevertPatchesRequest) validateService(formats strfmt.Registry) error { - - if err := validate.Required("service", "body", m.Service); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this revert patches request based on context it is used -func (m *RevertPatchesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RevertPatchesRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RevertPatchesRequest) UnmarshalBinary(b []byte) error { - var res RevertPatchesRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_claim_info.go b/v2/models/rigel_claim_info.go deleted file mode 100644 index 09b08576..00000000 --- a/v2/models/rigel_claim_info.go +++ /dev/null @@ -1,116 +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" -) - -// RigelClaimInfo Rigel Claim Info. -// -// Specifies the Rigel registration info. -// -// swagger:model RigelClaimInfo -type RigelClaimInfo struct { - - // Specifies the registration status. - // Enum: ["NotDone","InProgress","Success","Failed"] - Status *string `json:"status,omitempty"` - - // Specifies possible error message during registration. - Message *string `json:"message,omitempty"` -} - -// Validate validates this rigel claim info -func (m *RigelClaimInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rigelClaimInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotDone","InProgress","Success","Failed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rigelClaimInfoTypeStatusPropEnum = append(rigelClaimInfoTypeStatusPropEnum, v) - } -} - -const ( - - // RigelClaimInfoStatusNotDone captures enum value "NotDone" - RigelClaimInfoStatusNotDone string = "NotDone" - - // RigelClaimInfoStatusInProgress captures enum value "InProgress" - RigelClaimInfoStatusInProgress string = "InProgress" - - // RigelClaimInfoStatusSuccess captures enum value "Success" - RigelClaimInfoStatusSuccess string = "Success" - - // RigelClaimInfoStatusFailed captures enum value "Failed" - RigelClaimInfoStatusFailed string = "Failed" -) - -// prop value enum -func (m *RigelClaimInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rigelClaimInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RigelClaimInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rigel claim info based on context it is used -func (m *RigelClaimInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelClaimInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelClaimInfo) UnmarshalBinary(b []byte) error { - var res RigelClaimInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_claim_log.go b/v2/models/rigel_claim_log.go deleted file mode 100644 index 17fa9d84..00000000 --- a/v2/models/rigel_claim_log.go +++ /dev/null @@ -1,58 +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" -) - -// RigelClaimLog Rigel Claim Log. -// -// Specifies an event during Rigel claim.. -// -// swagger:model RigelClaimLog -type RigelClaimLog struct { - - // Specifies the time stamp in microseconds of the event. - TimeStamp *int64 `json:"timeStamp,omitempty"` - - // Specifies the message of this event. - Message *string `json:"message,omitempty"` - - // Specifies the severity of the event. - Type *string `json:"type,omitempty"` -} - -// Validate validates this rigel claim log -func (m *RigelClaimLog) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this rigel claim log based on context it is used -func (m *RigelClaimLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelClaimLog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelClaimLog) UnmarshalBinary(b []byte) error { - var res RigelClaimLog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_claim_logs.go b/v2/models/rigel_claim_logs.go deleted file mode 100644 index 099ecf3b..00000000 --- a/v2/models/rigel_claim_logs.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RigelClaimLogs Rigel Claim Logs. -// -// Specifies the Rigel claim logs. -// -// swagger:model RigelClaimLogs -type RigelClaimLogs struct { - - // Specifies Rigel claim logs. - RigelClaimLogs []*RigelClaimLog `json:"rigelClaimLogs"` -} - -// Validate validates this rigel claim logs -func (m *RigelClaimLogs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRigelClaimLogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelClaimLogs) validateRigelClaimLogs(formats strfmt.Registry) error { - if swag.IsZero(m.RigelClaimLogs) { // not required - return nil - } - - for i := 0; i < len(m.RigelClaimLogs); i++ { - if swag.IsZero(m.RigelClaimLogs[i]) { // not required - continue - } - - if m.RigelClaimLogs[i] != nil { - if err := m.RigelClaimLogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClaimLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClaimLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this rigel claim logs based on the context it is used -func (m *RigelClaimLogs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelClaimLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelClaimLogs) contextValidateRigelClaimLogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RigelClaimLogs); i++ { - - if m.RigelClaimLogs[i] != nil { - - if swag.IsZero(m.RigelClaimLogs[i]) { // not required - return nil - } - - if err := m.RigelClaimLogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rigelClaimLogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rigelClaimLogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelClaimLogs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelClaimLogs) UnmarshalBinary(b []byte) error { - var res RigelClaimLogs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_cluster_config_params.go b/v2/models/rigel_cluster_config_params.go deleted file mode 100644 index fc7508b6..00000000 --- a/v2/models/rigel_cluster_config_params.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RigelClusterConfigParams Rigel Cluster Params. -// -// # Params for Rigel Cluster Creation -// -// swagger:model RigelClusterConfigParams -type RigelClusterConfigParams struct { - - // Specifies the Nodes present in this Cluster. - Nodes []*RigelClusterNode `json:"nodes"` - - // Specifies the endpoint of the dataplane cluster which is associated with this rigel. - DataplaneEndpoint *string `json:"dataplaneEndpoint,omitempty"` - - // Specifies the token which is used to claim this Cluster to Helios. - // Read Only: true - ClaimToken *string `json:"claimToken,omitempty"` -} - -// Validate validates this rigel cluster config params -func (m *RigelClusterConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelClusterConfigParams) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this rigel cluster config params based on the context it is used -func (m *RigelClusterConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClaimToken(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelClusterConfigParams) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RigelClusterConfigParams) contextValidateClaimToken(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "claimToken", "body", m.ClaimToken); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelClusterConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelClusterConfigParams) UnmarshalBinary(b []byte) error { - var res RigelClusterConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_cluster_node.go b/v2/models/rigel_cluster_node.go deleted file mode 100644 index cb3e6216..00000000 --- a/v2/models/rigel_cluster_node.go +++ /dev/null @@ -1,79 +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" -) - -// RigelClusterNode Rigel Cluster Node -// -// # Params for a Rigel Cluster Node -// -// swagger:model RigelClusterNode -type RigelClusterNode struct { - - // Specifies the IP address of the Node. - // Required: true - NodeIP *string `json:"nodeIp"` - - // Specifies the ID of the Node. - NodeID *int64 `json:"nodeId,omitempty"` - - // Specifies the secondary IP address of the Node. - SecondaryNodeIP *string `json:"secondaryNodeIp,omitempty"` -} - -// Validate validates this rigel cluster node -func (m *RigelClusterNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeIP(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelClusterNode) validateNodeIP(formats strfmt.Registry) error { - - if err := validate.Required("nodeIp", "body", m.NodeIP); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rigel cluster node based on context it is used -func (m *RigelClusterNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelClusterNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelClusterNode) UnmarshalBinary(b []byte) error { - var res RigelClusterNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_connection.go b/v2/models/rigel_connection.go deleted file mode 100644 index 37999145..00000000 --- a/v2/models/rigel_connection.go +++ /dev/null @@ -1,135 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RigelConnection Rigel connection. -// -// Specify a connection of Rigel. -// -// swagger:model RigelConnection -type RigelConnection struct { - - // Specifies the id of the connection. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the connection. - Name *string `json:"name,omitempty"` - - // Flag to specify if the connection is scalable. - Scalable *bool `json:"scalable,omitempty"` - - // Specifies the ids of the connectors which are not grouped in this connection - UngroupedConnectors []int64 `json:"ungroupedConnectors"` - - // Specifies the connector groups in the connection. - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` -} - -// Validate validates this rigel connection -func (m *RigelConnection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectorGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnection) validateConnectorGroups(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectorGroups) { // not required - return nil - } - - for i := 0; i < len(m.ConnectorGroups); i++ { - if swag.IsZero(m.ConnectorGroups[i]) { // not required - continue - } - - if m.ConnectorGroups[i] != nil { - if err := m.ConnectorGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this rigel connection based on the context it is used -func (m *RigelConnection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectorGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnection) contextValidateConnectorGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConnectorGroups); i++ { - - if m.ConnectorGroups[i] != nil { - - if swag.IsZero(m.ConnectorGroups[i]) { // not required - return nil - } - - if err := m.ConnectorGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelConnection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelConnection) UnmarshalBinary(b []byte) error { - var res RigelConnection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_connection_info.go b/v2/models/rigel_connection_info.go deleted file mode 100644 index 768856c4..00000000 --- a/v2/models/rigel_connection_info.go +++ /dev/null @@ -1,58 +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" -) - -// RigelConnectionInfo Rigel Connection Info. -// -// Specifies the Rigel connection info. -// -// swagger:model RigelConnectionInfo -type RigelConnectionInfo struct { - - // Specifies if the connection is active. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies possible error message when rigel is not able to connect. - Message *string `json:"message,omitempty"` - - // Specifies last timestamp for which connection status was known. - LastConnectedTimestampMsecs *int64 `json:"lastConnectedTimestampMsecs,omitempty"` -} - -// Validate validates this rigel connection info -func (m *RigelConnectionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this rigel connection info based on context it is used -func (m *RigelConnectionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelConnectionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelConnectionInfo) UnmarshalBinary(b []byte) error { - var res RigelConnectionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_connections.go b/v2/models/rigel_connections.go deleted file mode 100644 index dbec329a..00000000 --- a/v2/models/rigel_connections.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RigelConnections Rigel connections. -// -// Specify a list of connection of Rigel. -// -// swagger:model RigelConnections -type RigelConnections struct { - - // Specifies a list of connection of Rigel. - RigelConnections []*RigelConnection `json:"RigelConnections"` -} - -// Validate validates this rigel connections -func (m *RigelConnections) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRigelConnections(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnections) validateRigelConnections(formats strfmt.Registry) error { - if swag.IsZero(m.RigelConnections) { // not required - return nil - } - - for i := 0; i < len(m.RigelConnections); i++ { - if swag.IsZero(m.RigelConnections[i]) { // not required - continue - } - - if m.RigelConnections[i] != nil { - if err := m.RigelConnections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RigelConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RigelConnections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this rigel connections based on the context it is used -func (m *RigelConnections) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelConnections(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnections) contextValidateRigelConnections(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RigelConnections); i++ { - - if m.RigelConnections[i] != nil { - - if swag.IsZero(m.RigelConnections[i]) { // not required - return nil - } - - if err := m.RigelConnections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RigelConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RigelConnections" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelConnections) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelConnections) UnmarshalBinary(b []byte) error { - var res RigelConnections - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_connector.go b/v2/models/rigel_connector.go deleted file mode 100644 index e317b8e0..00000000 --- a/v2/models/rigel_connector.go +++ /dev/null @@ -1,126 +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" -) - -// RigelConnector Rigel Connector. -// -// Specify a Rigel connector. -// -// swagger:model RigelConnector -type RigelConnector struct { - - // Specifies the id of the connector. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the connector. - Name *string `json:"name,omitempty"` - - // Specifies the Id of the connection which this connector belongs to. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the version of the connector's certificate. The version is used to revoke/renew connector's certificates. - CertificateVersion *int64 `json:"certificateVersion,omitempty"` - - // Specifies the list of accepted version of the connector's certificate. The version is used to revoke/renew connector's certificates. - CertificateVersionList []int64 `json:"certificateVersionList"` - - // Specifies the connection status. - ConnectionStatus *ConnectorConnectionInfo `json:"connectionStatus,omitempty"` -} - -// Validate validates this rigel connector -func (m *RigelConnector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnector) validateConnectionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - if m.ConnectionStatus != nil { - if err := m.ConnectionStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionStatus") - } - return err - } - } - - return nil -} - -// ContextValidate validate this rigel connector based on the context it is used -func (m *RigelConnector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectionStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnector) contextValidateConnectionStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectionStatus != nil { - - if swag.IsZero(m.ConnectionStatus) { // not required - return nil - } - - if err := m.ConnectionStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionStatus") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelConnector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelConnector) UnmarshalBinary(b []byte) error { - var res RigelConnector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_connectors.go b/v2/models/rigel_connectors.go deleted file mode 100644 index 8db14327..00000000 --- a/v2/models/rigel_connectors.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RigelConnectors Rigel Connectors. -// -// Specify a list of Rigel connectors. -// -// swagger:model RigelConnectors -type RigelConnectors struct { - - // Specifies a list of Rigel Connectors. - RigelConnectors []*RigelConnector `json:"RigelConnectors"` -} - -// Validate validates this rigel connectors -func (m *RigelConnectors) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRigelConnectors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnectors) validateRigelConnectors(formats strfmt.Registry) error { - if swag.IsZero(m.RigelConnectors) { // not required - return nil - } - - for i := 0; i < len(m.RigelConnectors); i++ { - if swag.IsZero(m.RigelConnectors[i]) { // not required - continue - } - - if m.RigelConnectors[i] != nil { - if err := m.RigelConnectors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RigelConnectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RigelConnectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this rigel connectors based on the context it is used -func (m *RigelConnectors) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRigelConnectors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelConnectors) contextValidateRigelConnectors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RigelConnectors); i++ { - - if m.RigelConnectors[i] != nil { - - if swag.IsZero(m.RigelConnectors[i]) { // not required - return nil - } - - if err := m.RigelConnectors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RigelConnectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RigelConnectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelConnectors) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelConnectors) UnmarshalBinary(b []byte) error { - var res RigelConnectors - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_entity_type.go b/v2/models/rigel_entity_type.go deleted file mode 100644 index 65cc1c77..00000000 --- a/v2/models/rigel_entity_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RigelEntityType Entity type. -// -// Entity type. -// -// swagger:model RigelEntityType -type RigelEntityType struct { - - // Entity type. - // Enum: ["OnPrem","Cloud"] - Type string `json:"type,omitempty"` -} - -// Validate validates this rigel entity type -func (m *RigelEntityType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rigelEntityTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OnPrem","Cloud"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rigelEntityTypeTypeTypePropEnum = append(rigelEntityTypeTypeTypePropEnum, v) - } -} - -const ( - - // RigelEntityTypeTypeOnPrem captures enum value "OnPrem" - RigelEntityTypeTypeOnPrem string = "OnPrem" - - // RigelEntityTypeTypeCloud captures enum value "Cloud" - RigelEntityTypeTypeCloud string = "Cloud" -) - -// prop value enum -func (m *RigelEntityType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rigelEntityTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RigelEntityType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rigel entity type based on context it is used -func (m *RigelEntityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelEntityType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelEntityType) UnmarshalBinary(b []byte) error { - var res RigelEntityType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_reg_config.go b/v2/models/rigel_reg_config.go deleted file mode 100644 index e26d79f9..00000000 --- a/v2/models/rigel_reg_config.go +++ /dev/null @@ -1,216 +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" -) - -// RigelRegConfig Rigel Registration Config. -// -// Specifies the Rigel Registration Config. -// -// swagger:model RigelRegConfig -type RigelRegConfig struct { - - // Specifies the registration status. - RegInfo *RigelClaimInfo `json:"regInfo,omitempty"` - - // Specifies the connection status between rigel and control plane(helios). - ControlPlaneConnectionInfo *RigelConnectionInfo `json:"controlPlaneConnectionInfo,omitempty"` - - // Specifies the connection status between rigel and data plane. - DataPlaneConnectionInfo *RigelConnectionInfo `json:"dataPlaneConnectionInfo,omitempty"` - - // Flag to indicate if certificate is valid. - IsCertificateValid *bool `json:"isCertificateValid,omitempty"` -} - -// Validate validates this rigel reg config -func (m *RigelRegConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateControlPlaneConnectionInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataPlaneConnectionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelRegConfig) validateRegInfo(formats strfmt.Registry) error { - if swag.IsZero(m.RegInfo) { // not required - return nil - } - - if m.RegInfo != nil { - if err := m.RegInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regInfo") - } - return err - } - } - - return nil -} - -func (m *RigelRegConfig) validateControlPlaneConnectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ControlPlaneConnectionInfo) { // not required - return nil - } - - if m.ControlPlaneConnectionInfo != nil { - if err := m.ControlPlaneConnectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controlPlaneConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controlPlaneConnectionInfo") - } - return err - } - } - - return nil -} - -func (m *RigelRegConfig) validateDataPlaneConnectionInfo(formats strfmt.Registry) error { - if swag.IsZero(m.DataPlaneConnectionInfo) { // not required - return nil - } - - if m.DataPlaneConnectionInfo != nil { - if err := m.DataPlaneConnectionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPlaneConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPlaneConnectionInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this rigel reg config based on the context it is used -func (m *RigelRegConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateControlPlaneConnectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataPlaneConnectionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RigelRegConfig) contextValidateRegInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.RegInfo != nil { - - if swag.IsZero(m.RegInfo) { // not required - return nil - } - - if err := m.RegInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("regInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("regInfo") - } - return err - } - } - - return nil -} - -func (m *RigelRegConfig) contextValidateControlPlaneConnectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ControlPlaneConnectionInfo != nil { - - if swag.IsZero(m.ControlPlaneConnectionInfo) { // not required - return nil - } - - if err := m.ControlPlaneConnectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("controlPlaneConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("controlPlaneConnectionInfo") - } - return err - } - } - - return nil -} - -func (m *RigelRegConfig) contextValidateDataPlaneConnectionInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.DataPlaneConnectionInfo != nil { - - if swag.IsZero(m.DataPlaneConnectionInfo) { // not required - return nil - } - - if err := m.DataPlaneConnectionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPlaneConnectionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPlaneConnectionInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RigelRegConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelRegConfig) UnmarshalBinary(b []byte) error { - var res RigelRegConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rigel_use_case.go b/v2/models/rigel_use_case.go deleted file mode 100644 index 69301024..00000000 --- a/v2/models/rigel_use_case.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RigelUseCase Rigel Use Case. -// -// Rigel Use Case. -// -// swagger:model RigelUseCase -type RigelUseCase struct { - - // Rigel Use Case. - // Enum: ["Baas","DRaasFailover"] - Type string `json:"type,omitempty"` -} - -// Validate validates this rigel use case -func (m *RigelUseCase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rigelUseCaseTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Baas","DRaasFailover"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rigelUseCaseTypeTypePropEnum = append(rigelUseCaseTypeTypePropEnum, v) - } -} - -const ( - - // RigelUseCaseTypeBaas captures enum value "Baas" - RigelUseCaseTypeBaas string = "Baas" - - // RigelUseCaseTypeDRaasFailover captures enum value "DRaasFailover" - RigelUseCaseTypeDRaasFailover string = "DRaasFailover" -) - -// prop value enum -func (m *RigelUseCase) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rigelUseCaseTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RigelUseCase) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rigel use case based on context it is used -func (m *RigelUseCase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RigelUseCase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RigelUseCase) UnmarshalBinary(b []byte) error { - var res RigelUseCase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/role.go b/v2/models/role.go deleted file mode 100644 index e01d58e2..00000000 --- a/v2/models/role.go +++ /dev/null @@ -1,161 +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" -) - -// Role Specifies a Role. -// -// swagger:model Role -type Role struct { - CreateRoleParameters - - // Specifies the Role label. - Label *string `json:"label,omitempty"` - - // Specifies the timestamp when the Role is created in milliseconds. - CreatedTimestampMsecs *int64 `json:"createdTimestampMsecs,omitempty"` - - // Specifies the timestamp when the Role is last updated in milliseconds. - LastUpdatedTimestampMsecs *int64 `json:"lastUpdatedTimestampMsecs,omitempty"` - - // Specifies if the Role is created by user. - IsUserCreatedRole *bool `json:"isUserCreatedRole,omitempty"` - - // Specifies the list of tenant ids who have access to this Role. - TenantIds []string `json:"tenantIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Role) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CreateRoleParameters - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CreateRoleParameters = aO0 - - // AO1 - var dataAO1 struct { - Label *string `json:"label,omitempty"` - - CreatedTimestampMsecs *int64 `json:"createdTimestampMsecs,omitempty"` - - LastUpdatedTimestampMsecs *int64 `json:"lastUpdatedTimestampMsecs,omitempty"` - - IsUserCreatedRole *bool `json:"isUserCreatedRole,omitempty"` - - TenantIds []string `json:"tenantIds"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Label = dataAO1.Label - - m.CreatedTimestampMsecs = dataAO1.CreatedTimestampMsecs - - m.LastUpdatedTimestampMsecs = dataAO1.LastUpdatedTimestampMsecs - - m.IsUserCreatedRole = dataAO1.IsUserCreatedRole - - m.TenantIds = dataAO1.TenantIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Role) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CreateRoleParameters) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Label *string `json:"label,omitempty"` - - CreatedTimestampMsecs *int64 `json:"createdTimestampMsecs,omitempty"` - - LastUpdatedTimestampMsecs *int64 `json:"lastUpdatedTimestampMsecs,omitempty"` - - IsUserCreatedRole *bool `json:"isUserCreatedRole,omitempty"` - - TenantIds []string `json:"tenantIds"` - } - - dataAO1.Label = m.Label - - dataAO1.CreatedTimestampMsecs = m.CreatedTimestampMsecs - - dataAO1.LastUpdatedTimestampMsecs = m.LastUpdatedTimestampMsecs - - dataAO1.IsUserCreatedRole = m.IsUserCreatedRole - - dataAO1.TenantIds = m.TenantIds - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this role -func (m *Role) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateRoleParameters - if err := m.CreateRoleParameters.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this role based on the context it is used -func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CreateRoleParameters - if err := m.CreateRoleParameters.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Role) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Role) UnmarshalBinary(b []byte) error { - var res Role - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/roles.go b/v2/models/roles.go deleted file mode 100644 index 43bd5fb7..00000000 --- a/v2/models/roles.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Roles Specifies a list of Roles. -// -// swagger:model Roles -type Roles struct { - - // Specifies the list of Roles. - Roles []*Role `json:"roles"` -} - -// Validate validates this roles -func (m *Roles) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Roles) validateRoles(formats strfmt.Registry) error { - if swag.IsZero(m.Roles) { // not required - return nil - } - - for i := 0; i < len(m.Roles); i++ { - if swag.IsZero(m.Roles[i]) { // not required - continue - } - - if m.Roles[i] != nil { - if err := m.Roles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("roles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("roles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this roles based on the context it is used -func (m *Roles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRoles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Roles) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Roles); i++ { - - if m.Roles[i] != nil { - - if swag.IsZero(m.Roles[i]) { // not required - return nil - } - - if err := m.Roles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("roles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("roles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Roles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Roles) UnmarshalBinary(b []byte) error { - var res Roles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/root_public_folder_param.go b/v2/models/root_public_folder_param.go deleted file mode 100644 index 71c08fdc..00000000 --- a/v2/models/root_public_folder_param.go +++ /dev/null @@ -1,174 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RootPublicFolderParam Specifies parameters to recover a RootPublicFolder. -// -// swagger:model RootPublicFolderParam -type RootPublicFolderParam struct { - - // Specifies whether to recover the whole RootPublicFolder. - RecoverEntireRootPublicFolder *bool `json:"recoverEntireRootPublicFolder,omitempty"` - - // Specifies a list of Public Folders to recover. This field is applicable only if 'recoverEntireRootPublicFolder' is false. - RecoverFolders []*PublicFolder `json:"recoverFolders"` - - // Specifies the RootPublicFolder recover Object info. - // Required: true - RecoverObject *CommonRecoverObjectSnapshotParams `json:"recoverObject"` -} - -// Validate validates this root public folder param -func (m *RootPublicFolderParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverFolders(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RootPublicFolderParam) validateRecoverFolders(formats strfmt.Registry) error { - if swag.IsZero(m.RecoverFolders) { // not required - return nil - } - - for i := 0; i < len(m.RecoverFolders); i++ { - if swag.IsZero(m.RecoverFolders[i]) { // not required - continue - } - - if m.RecoverFolders[i] != nil { - if err := m.RecoverFolders[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RootPublicFolderParam) validateRecoverObject(formats strfmt.Registry) error { - - if err := validate.Required("recoverObject", "body", m.RecoverObject); err != nil { - return err - } - - if m.RecoverObject != nil { - if err := m.RecoverObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this root public folder param based on the context it is used -func (m *RootPublicFolderParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverFolders(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecoverObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RootPublicFolderParam) contextValidateRecoverFolders(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RecoverFolders); i++ { - - if m.RecoverFolders[i] != nil { - - if swag.IsZero(m.RecoverFolders[i]) { // not required - return nil - } - - if err := m.RecoverFolders[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverFolders" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RootPublicFolderParam) contextValidateRecoverObject(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverObject != nil { - - if err := m.RecoverObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RootPublicFolderParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RootPublicFolderParam) UnmarshalBinary(b []byte) error { - var res RootPublicFolderParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rpaas_config.go b/v2/models/rpaas_config.go deleted file mode 100644 index f37c9020..00000000 --- a/v2/models/rpaas_config.go +++ /dev/null @@ -1,210 +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" -) - -// RpaasConfig RPaaS Target Configuration -// -// Specifies settings for copying Snapshots to RPaaS Targets. -// -// swagger:model RpaasConfig -type RpaasConfig struct { - CommonTargetConfiguration - - // Specifies the RPaaS target to copy the Snapshots. - // Required: true - TargetID *int64 `json:"targetId"` - - // Specifies the RPaaS target name where Snapshots are copied. - // Read Only: true - TargetName *string `json:"targetName,omitempty"` - - // Specifies the RPaaS target type where Snapshots are copied. - // Enum: ["Tape","Cloud","Nas"] - TargetType *string `json:"targetType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RpaasConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTargetConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTargetConfiguration = aO0 - - // AO1 - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetID = dataAO1.TargetID - - m.TargetName = dataAO1.TargetName - - m.TargetType = dataAO1.TargetType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RpaasConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTargetConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetID *int64 `json:"targetId"` - - TargetName *string `json:"targetName,omitempty"` - - TargetType *string `json:"targetType,omitempty"` - } - - dataAO1.TargetID = m.TargetID - - dataAO1.TargetName = m.TargetName - - dataAO1.TargetType = m.TargetType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this rpaas config -func (m *RpaasConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RpaasConfig) validateTargetID(formats strfmt.Registry) error { - - if err := validate.Required("targetId", "body", m.TargetID); err != nil { - return err - } - - return nil -} - -var rpaasConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpaasConfigTypeTargetTypePropEnum = append(rpaasConfigTypeTargetTypePropEnum, v) - } -} - -// property enum -func (m *RpaasConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpaasConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpaasConfig) validateTargetType(formats strfmt.Registry) error { - - if swag.IsZero(m.TargetType) { // not required - return nil - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this rpaas config based on the context it is used -func (m *RpaasConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTargetConfiguration - if err := m.CommonTargetConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RpaasConfig) contextValidateTargetName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "targetName", "body", m.TargetName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RpaasConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RpaasConfig) UnmarshalBinary(b []byte) error { - var res RpaasConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rpaas_kms_key_type.go b/v2/models/rpaas_kms_key_type.go deleted file mode 100644 index 96744768..00000000 --- a/v2/models/rpaas_kms_key_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RpaasKmsKeyType Rpaas KMS Key Type -// -// Specifies the kms key type. -// -// swagger:model RpaasKmsKeyType -type RpaasKmsKeyType struct { - - // Specifies the kms key type. - // Enum: ["Cohesity","CustomerManaged"] - RpaasKmsKeyType string `json:"rpaasKmsKeyType,omitempty"` -} - -// Validate validates this rpaas kms key type -func (m *RpaasKmsKeyType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRpaasKmsKeyType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rpaasKmsKeyTypeTypeRpaasKmsKeyTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Cohesity","CustomerManaged"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpaasKmsKeyTypeTypeRpaasKmsKeyTypePropEnum = append(rpaasKmsKeyTypeTypeRpaasKmsKeyTypePropEnum, v) - } -} - -const ( - - // RpaasKmsKeyTypeRpaasKmsKeyTypeCohesity captures enum value "Cohesity" - RpaasKmsKeyTypeRpaasKmsKeyTypeCohesity string = "Cohesity" - - // RpaasKmsKeyTypeRpaasKmsKeyTypeCustomerManaged captures enum value "CustomerManaged" - RpaasKmsKeyTypeRpaasKmsKeyTypeCustomerManaged string = "CustomerManaged" -) - -// prop value enum -func (m *RpaasKmsKeyType) validateRpaasKmsKeyTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpaasKmsKeyTypeTypeRpaasKmsKeyTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpaasKmsKeyType) validateRpaasKmsKeyType(formats strfmt.Registry) error { - if swag.IsZero(m.RpaasKmsKeyType) { // not required - return nil - } - - // value enum - if err := m.validateRpaasKmsKeyTypeEnum("rpaasKmsKeyType", "body", m.RpaasKmsKeyType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rpaas kms key type based on context it is used -func (m *RpaasKmsKeyType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RpaasKmsKeyType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RpaasKmsKeyType) UnmarshalBinary(b []byte) error { - var res RpaasKmsKeyType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/rpaas_provision_status.go b/v2/models/rpaas_provision_status.go deleted file mode 100644 index bcd782e6..00000000 --- a/v2/models/rpaas_provision_status.go +++ /dev/null @@ -1,116 +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" -) - -// RpaasProvisionStatus Rpaas Provision Status -// -// Specifies the provision statuses for rpaas region provisioning. -// -// swagger:model RpaasProvisionStatus -type RpaasProvisionStatus struct { - - // Specifies the provision statuses for rpaas region provisioning. - // Enum: ["Waiting","InProgress","Completed","Failed","MarkedForDeletion"] - RpaasProvisionStatus string `json:"rpaasProvisionStatus,omitempty"` -} - -// Validate validates this rpaas provision status -func (m *RpaasProvisionStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRpaasProvisionStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var rpaasProvisionStatusTypeRpaasProvisionStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Waiting","InProgress","Completed","Failed","MarkedForDeletion"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - rpaasProvisionStatusTypeRpaasProvisionStatusPropEnum = append(rpaasProvisionStatusTypeRpaasProvisionStatusPropEnum, v) - } -} - -const ( - - // RpaasProvisionStatusRpaasProvisionStatusWaiting captures enum value "Waiting" - RpaasProvisionStatusRpaasProvisionStatusWaiting string = "Waiting" - - // RpaasProvisionStatusRpaasProvisionStatusInProgress captures enum value "InProgress" - RpaasProvisionStatusRpaasProvisionStatusInProgress string = "InProgress" - - // RpaasProvisionStatusRpaasProvisionStatusCompleted captures enum value "Completed" - RpaasProvisionStatusRpaasProvisionStatusCompleted string = "Completed" - - // RpaasProvisionStatusRpaasProvisionStatusFailed captures enum value "Failed" - RpaasProvisionStatusRpaasProvisionStatusFailed string = "Failed" - - // RpaasProvisionStatusRpaasProvisionStatusMarkedForDeletion captures enum value "MarkedForDeletion" - RpaasProvisionStatusRpaasProvisionStatusMarkedForDeletion string = "MarkedForDeletion" -) - -// prop value enum -func (m *RpaasProvisionStatus) validateRpaasProvisionStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, rpaasProvisionStatusTypeRpaasProvisionStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RpaasProvisionStatus) validateRpaasProvisionStatus(formats strfmt.Registry) error { - if swag.IsZero(m.RpaasProvisionStatus) { // not required - return nil - } - - // value enum - if err := m.validateRpaasProvisionStatusEnum("rpaasProvisionStatus", "body", m.RpaasProvisionStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this rpaas provision status based on context it is used -func (m *RpaasProvisionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RpaasProvisionStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RpaasProvisionStatus) UnmarshalBinary(b []byte) error { - var res RpaasProvisionStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_archival_config.go b/v2/models/run_archival_config.go deleted file mode 100644 index 953c6844..00000000 --- a/v2/models/run_archival_config.go +++ /dev/null @@ -1,188 +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" -) - -// RunArchivalConfig Archival Target Configuration -// -// Specifies settings for copying Snapshots External Targets (such as AWS or Tape). This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model RunArchivalConfig -type RunArchivalConfig struct { - - // Specifies the Archival target to copy the Snapshots to. - // Required: true - ID *int64 `json:"id"` - - // Specifies the snapshot's archival target type from which recovery has been performed. - // Required: true - // Enum: ["Tape","Cloud","Nas"] - ArchivalTargetType *string `json:"archivalTargetType"` - - // Specifies the Retention period of snapshot in days, months or years to retain copied Snapshots on the target. - Retention *Retention `json:"retention,omitempty"` - - // Specifies if Snapshots are copied from a fully successful Protection Group Run or a partially successful Protection Group Run. If false, Snapshots are copied the Protection Group Run, even if the Run was not fully successful i.e. Snapshots were not captured for all Objects in the Protection Group. If true, Snapshots are copied only when the run is fully successful. - CopyOnlyFullySuccessful *bool `json:"copyOnlyFullySuccessful,omitempty"` -} - -// Validate validates this run archival config -func (m *RunArchivalConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunArchivalConfig) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var runArchivalConfigTypeArchivalTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runArchivalConfigTypeArchivalTargetTypePropEnum = append(runArchivalConfigTypeArchivalTargetTypePropEnum, v) - } -} - -const ( - - // RunArchivalConfigArchivalTargetTypeTape captures enum value "Tape" - RunArchivalConfigArchivalTargetTypeTape string = "Tape" - - // RunArchivalConfigArchivalTargetTypeCloud captures enum value "Cloud" - RunArchivalConfigArchivalTargetTypeCloud string = "Cloud" - - // RunArchivalConfigArchivalTargetTypeNas captures enum value "Nas" - RunArchivalConfigArchivalTargetTypeNas string = "Nas" -) - -// prop value enum -func (m *RunArchivalConfig) validateArchivalTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runArchivalConfigTypeArchivalTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunArchivalConfig) validateArchivalTargetType(formats strfmt.Registry) error { - - if err := validate.Required("archivalTargetType", "body", m.ArchivalTargetType); err != nil { - return err - } - - // value enum - if err := m.validateArchivalTargetTypeEnum("archivalTargetType", "body", *m.ArchivalTargetType); err != nil { - return err - } - - return nil -} - -func (m *RunArchivalConfig) 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 -} - -// ContextValidate validate this run archival config based on the context it is used -func (m *RunArchivalConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunArchivalConfig) 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 *RunArchivalConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunArchivalConfig) UnmarshalBinary(b []byte) error { - var res RunArchivalConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_cloud_replication_config.go b/v2/models/run_cloud_replication_config.go deleted file mode 100644 index a3d2467b..00000000 --- a/v2/models/run_cloud_replication_config.go +++ /dev/null @@ -1,267 +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" -) - -// RunCloudReplicationConfig Replication Target Configuration -// -// Specifies settings for copying Snapshots to cloud targets. This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model RunCloudReplicationConfig -type RunCloudReplicationConfig struct { - - // Specifies the type of target to which replication need to be performed. - // Required: true - // Enum: ["AWS","Azure"] - TargetType *string `json:"targetType"` - - // Specifies the config for AWS target. This must be specified if the target type is AWS. - AwsTarget *AWSTargetConfig `json:"awsTarget,omitempty"` - - // Specifies the config for Azure target. This must be specified if the target type is Azure. - AzureTarget *AzureTargetConfig `json:"azureTarget,omitempty"` - - // Specifies the Retention period of snapshot in days, months or years to retain copied Snapshots on the target. - Retention *Retention `json:"retention,omitempty"` -} - -// Validate validates this run cloud replication config -func (m *RunCloudReplicationConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var runCloudReplicationConfigTypeTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AWS","Azure"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runCloudReplicationConfigTypeTargetTypePropEnum = append(runCloudReplicationConfigTypeTargetTypePropEnum, v) - } -} - -const ( - - // RunCloudReplicationConfigTargetTypeAWS captures enum value "AWS" - RunCloudReplicationConfigTargetTypeAWS string = "AWS" - - // RunCloudReplicationConfigTargetTypeAzure captures enum value "Azure" - RunCloudReplicationConfigTargetTypeAzure string = "Azure" -) - -// prop value enum -func (m *RunCloudReplicationConfig) validateTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runCloudReplicationConfigTypeTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunCloudReplicationConfig) validateTargetType(formats strfmt.Registry) error { - - if err := validate.Required("targetType", "body", m.TargetType); err != nil { - return err - } - - // value enum - if err := m.validateTargetTypeEnum("targetType", "body", *m.TargetType); err != nil { - return err - } - - return nil -} - -func (m *RunCloudReplicationConfig) validateAwsTarget(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTarget) { // not required - return nil - } - - if m.AwsTarget != nil { - if err := m.AwsTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTarget") - } - return err - } - } - - return nil -} - -func (m *RunCloudReplicationConfig) validateAzureTarget(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTarget) { // not required - return nil - } - - if m.AzureTarget != nil { - if err := m.AzureTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTarget") - } - return err - } - } - - return nil -} - -func (m *RunCloudReplicationConfig) 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 -} - -// ContextValidate validate this run cloud replication config based on the context it is used -func (m *RunCloudReplicationConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTarget(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 *RunCloudReplicationConfig) contextValidateAwsTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTarget != nil { - - if swag.IsZero(m.AwsTarget) { // not required - return nil - } - - if err := m.AwsTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTarget") - } - return err - } - } - - return nil -} - -func (m *RunCloudReplicationConfig) contextValidateAzureTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTarget != nil { - - if swag.IsZero(m.AzureTarget) { // not required - return nil - } - - if err := m.AzureTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTarget") - } - return err - } - } - - return nil -} - -func (m *RunCloudReplicationConfig) 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 *RunCloudReplicationConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunCloudReplicationConfig) UnmarshalBinary(b []byte) error { - var res RunCloudReplicationConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_filter_values.go b/v2/models/run_filter_values.go deleted file mode 100644 index e8c17fe0..00000000 --- a/v2/models/run_filter_values.go +++ /dev/null @@ -1,122 +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" -) - -// RunFilterValues Run Filter Values. -// -// Run Filter Values. -// -// swagger:model RunFilterValues -type RunFilterValues struct { - - // Specifies Run Filter Value. - // Enum: ["kAll","kHydrateCDP","kSystem","kStorageArraySnapshot","kIncremental","kFull","kLog"] - RunFilterValues string `json:"runFilterValues,omitempty"` -} - -// Validate validates this run filter values -func (m *RunFilterValues) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunFilterValues(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var runFilterValuesTypeRunFilterValuesPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAll","kHydrateCDP","kSystem","kStorageArraySnapshot","kIncremental","kFull","kLog"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runFilterValuesTypeRunFilterValuesPropEnum = append(runFilterValuesTypeRunFilterValuesPropEnum, v) - } -} - -const ( - - // RunFilterValuesRunFilterValuesKAll captures enum value "kAll" - RunFilterValuesRunFilterValuesKAll string = "kAll" - - // RunFilterValuesRunFilterValuesKHydrateCDP captures enum value "kHydrateCDP" - RunFilterValuesRunFilterValuesKHydrateCDP string = "kHydrateCDP" - - // RunFilterValuesRunFilterValuesKSystem captures enum value "kSystem" - RunFilterValuesRunFilterValuesKSystem string = "kSystem" - - // RunFilterValuesRunFilterValuesKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - RunFilterValuesRunFilterValuesKStorageArraySnapshot string = "kStorageArraySnapshot" - - // RunFilterValuesRunFilterValuesKIncremental captures enum value "kIncremental" - RunFilterValuesRunFilterValuesKIncremental string = "kIncremental" - - // RunFilterValuesRunFilterValuesKFull captures enum value "kFull" - RunFilterValuesRunFilterValuesKFull string = "kFull" - - // RunFilterValuesRunFilterValuesKLog captures enum value "kLog" - RunFilterValuesRunFilterValuesKLog string = "kLog" -) - -// prop value enum -func (m *RunFilterValues) validateRunFilterValuesEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runFilterValuesTypeRunFilterValuesPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunFilterValues) validateRunFilterValues(formats strfmt.Registry) error { - if swag.IsZero(m.RunFilterValues) { // not required - return nil - } - - // value enum - if err := m.validateRunFilterValuesEnum("runFilterValues", "body", m.RunFilterValues); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this run filter values based on context it is used -func (m *RunFilterValues) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RunFilterValues) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunFilterValues) UnmarshalBinary(b []byte) error { - var res RunFilterValues - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_now_action_object_level_params.go b/v2/models/run_now_action_object_level_params.go deleted file mode 100644 index 78da2a8f..00000000 --- a/v2/models/run_now_action_object_level_params.go +++ /dev/null @@ -1,169 +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" -) - -// RunNowActionObjectLevelParams Specifies the request parameters for RunNow action on a Protected object. -// -// swagger:model RunNowActionObjectLevelParams -type RunNowActionObjectLevelParams struct { - ProtectionObjectInput - - // If sepcified as true then runNow will only take local snapshot ignoring all other targets such as replication, archivals etc. If not sepcified or specified as false then runNow will follow the policy settings. - TakeLocalSnapshotOnly *bool `json:"takeLocalSnapshotOnly,omitempty"` - - // Specifies the backup type should be used for RunNow action. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - BackupType string `json:"backupType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RunNowActionObjectLevelParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - // AO1 - var dataAO1 struct { - TakeLocalSnapshotOnly *bool `json:"takeLocalSnapshotOnly,omitempty"` - - BackupType string `json:"backupType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TakeLocalSnapshotOnly = dataAO1.TakeLocalSnapshotOnly - - m.BackupType = dataAO1.BackupType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RunNowActionObjectLevelParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TakeLocalSnapshotOnly *bool `json:"takeLocalSnapshotOnly,omitempty"` - - BackupType string `json:"backupType,omitempty"` - } - - dataAO1.TakeLocalSnapshotOnly = m.TakeLocalSnapshotOnly - - dataAO1.BackupType = m.BackupType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this run now action object level params -func (m *RunNowActionObjectLevelParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var runNowActionObjectLevelParamsTypeBackupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - runNowActionObjectLevelParamsTypeBackupTypePropEnum = append(runNowActionObjectLevelParamsTypeBackupTypePropEnum, v) - } -} - -// property enum -func (m *RunNowActionObjectLevelParams) validateBackupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, runNowActionObjectLevelParamsTypeBackupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *RunNowActionObjectLevelParams) validateBackupType(formats strfmt.Registry) error { - - if swag.IsZero(m.BackupType) { // not required - return nil - } - - // value enum - if err := m.validateBackupTypeEnum("backupType", "body", m.BackupType); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this run now action object level params based on the context it is used -func (m *RunNowActionObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RunNowActionObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunNowActionObjectLevelParams) UnmarshalBinary(b []byte) error { - var res RunNowActionObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_now_action_object_level_response.go b/v2/models/run_now_action_object_level_response.go deleted file mode 100644 index 97e54f2c..00000000 --- a/v2/models/run_now_action_object_level_response.go +++ /dev/null @@ -1,109 +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" -) - -// RunNowActionObjectLevelResponse Specifies the infomration about status of run now action. -// -// swagger:model RunNowActionObjectLevelResponse -type RunNowActionObjectLevelResponse struct { - - // If the action fails for this object, then error will be return here. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this run now action object level response -func (m *RunNowActionObjectLevelResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunNowActionObjectLevelResponse) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this run now action object level response based on the context it is used -func (m *RunNowActionObjectLevelResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunNowActionObjectLevelResponse) 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 -} - -// MarshalBinary interface implementation -func (m *RunNowActionObjectLevelResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunNowActionObjectLevelResponse) UnmarshalBinary(b []byte) error { - var res RunNowActionObjectLevelResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_object.go b/v2/models/run_object.go deleted file mode 100644 index f6f76865..00000000 --- a/v2/models/run_object.go +++ /dev/null @@ -1,130 +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" -) - -// RunObject Specifies the object details to create a protection run. -// -// swagger:model RunObject -type RunObject struct { - - // Specifies the id of object. - // Required: true - ID *int64 `json:"id"` - - // Specifies a list of ids of applications. - AppIds []int64 `json:"appIds"` - - // Specifies physical parameters for this run. - PhysicalParams *RunObjectPhysicalParams `json:"physicalParams,omitempty"` -} - -// Validate validates this run object -func (m *RunObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunObject) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *RunObject) validatePhysicalParams(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this run object based on the context it is used -func (m *RunObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunObject) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunObject) UnmarshalBinary(b []byte) error { - var res RunObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_object_physical_params.go b/v2/models/run_object_physical_params.go deleted file mode 100644 index a540da6c..00000000 --- a/v2/models/run_object_physical_params.go +++ /dev/null @@ -1,50 +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" -) - -// RunObjectPhysicalParams Specifies physical parameters for this run. -// -// swagger:model RunObjectPhysicalParams -type RunObjectPhysicalParams struct { - - // Specifies metadata file path during run-now requests for physical file based backups for some specific source. If specified, it will override any default metadata/directive file path set at the object level for the source. Also note that if the job default does not specify a metadata/directive file path for the source, then specifying this field for that source during run-now request will be rejected. - MetadataFilePath *string `json:"metadataFilePath,omitempty"` -} - -// Validate validates this run object physical params -func (m *RunObjectPhysicalParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this run object physical params based on context it is used -func (m *RunObjectPhysicalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RunObjectPhysicalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunObjectPhysicalParams) UnmarshalBinary(b []byte) error { - var res RunObjectPhysicalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_replication_config.go b/v2/models/run_replication_config.go deleted file mode 100644 index 91b6e3bd..00000000 --- a/v2/models/run_replication_config.go +++ /dev/null @@ -1,129 +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" -) - -// RunReplicationConfig Replication Target Configuration -// -// Specifies settings for copying Snapshots to Remote Clusters. This also specifies the retention policy that should be applied to Snapshots after they have been copied to the specified target. -// -// swagger:model RunReplicationConfig -type RunReplicationConfig struct { - - // Specifies id of Remote Cluster to copy the Snapshots to. - // Required: true - ID *int64 `json:"id"` - - // Specifies the Retention period of snapshot in days, months or years to retain copied Snapshots on the target. - Retention *Retention `json:"retention,omitempty"` -} - -// Validate validates this run replication config -func (m *RunReplicationConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunReplicationConfig) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *RunReplicationConfig) 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 -} - -// ContextValidate validate this run replication config based on the context it is used -func (m *RunReplicationConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRetention(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunReplicationConfig) 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 *RunReplicationConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunReplicationConfig) UnmarshalBinary(b []byte) error { - var res RunReplicationConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/run_targets_configuration.go b/v2/models/run_targets_configuration.go deleted file mode 100644 index 1f4a1aeb..00000000 --- a/v2/models/run_targets_configuration.go +++ /dev/null @@ -1,250 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RunTargetsConfiguration Target Configuration -// -// Specifies the replication and archival targets. -// -// swagger:model RunTargetsConfiguration -type RunTargetsConfiguration struct { - - // Specifies whether to use default policy settings or not. If specified as true then 'replications' and 'arcihvals' should not be specified. In case of true value, replicatioan targets congfigured in the policy will be added internally. - UsePolicyDefaults *bool `json:"usePolicyDefaults,omitempty"` - - // Specifies a list of replication targets configurations. - Replications []*RunReplicationConfig `json:"replications"` - - // Specifies a list of archival targets configurations. - Archivals []*RunArchivalConfig `json:"archivals"` - - // Specifies a list of cloud replication targets configurations. - CloudReplications []*RunCloudReplicationConfig `json:"cloudReplications"` -} - -// Validate validates this run targets configuration -func (m *RunTargetsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplications(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivals(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudReplications(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunTargetsConfiguration) validateReplications(formats strfmt.Registry) error { - if swag.IsZero(m.Replications) { // not required - return nil - } - - for i := 0; i < len(m.Replications); i++ { - if swag.IsZero(m.Replications[i]) { // not required - continue - } - - if m.Replications[i] != nil { - if err := m.Replications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunTargetsConfiguration) validateArchivals(formats strfmt.Registry) error { - if swag.IsZero(m.Archivals) { // not required - return nil - } - - for i := 0; i < len(m.Archivals); i++ { - if swag.IsZero(m.Archivals[i]) { // not required - continue - } - - if m.Archivals[i] != nil { - if err := m.Archivals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunTargetsConfiguration) validateCloudReplications(formats strfmt.Registry) error { - if swag.IsZero(m.CloudReplications) { // not required - return nil - } - - for i := 0; i < len(m.CloudReplications); i++ { - if swag.IsZero(m.CloudReplications[i]) { // not required - continue - } - - if m.CloudReplications[i] != nil { - if err := m.CloudReplications[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this run targets configuration based on the context it is used -func (m *RunTargetsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplications(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivals(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudReplications(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RunTargetsConfiguration) contextValidateReplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Replications); i++ { - - if m.Replications[i] != nil { - - if swag.IsZero(m.Replications[i]) { // not required - return nil - } - - if err := m.Replications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunTargetsConfiguration) contextValidateArchivals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Archivals); i++ { - - if m.Archivals[i] != nil { - - if swag.IsZero(m.Archivals[i]) { // not required - return nil - } - - if err := m.Archivals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RunTargetsConfiguration) contextValidateCloudReplications(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudReplications); i++ { - - if m.CloudReplications[i] != nil { - - if swag.IsZero(m.CloudReplications[i]) { // not required - return nil - } - - if err := m.CloudReplications[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudReplications" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudReplications" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RunTargetsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RunTargetsConfiguration) UnmarshalBinary(b []byte) error { - var res RunTargetsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_abac_server_create_request_params.go b/v2/models/s3_abac_server_create_request_params.go deleted file mode 100644 index 628c85df..00000000 --- a/v2/models/s3_abac_server_create_request_params.go +++ /dev/null @@ -1,159 +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" -) - -// S3AbacServerCreateRequestParams Specifies Request Parameters for adding a S3 ABAC server. -// -// swagger:model S3AbacServerCreateRequestParams -type S3AbacServerCreateRequestParams struct { - - // Specifies the hostname of S3 ABAC server. - // Required: true - Hostname *string `json:"hostname"` - - // Specifies the port of S3 ABAC server. - // Required: true - Port *int64 `json:"port"` - - S3AbacServerUpdateRequestParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *S3AbacServerCreateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Hostname *string `json:"hostname"` - - Port *int64 `json:"port"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Hostname = dataAO0.Hostname - - m.Port = dataAO0.Port - - // AO1 - var aO1 S3AbacServerUpdateRequestParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.S3AbacServerUpdateRequestParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m S3AbacServerCreateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Hostname *string `json:"hostname"` - - Port *int64 `json:"port"` - } - - dataAO0.Hostname = m.Hostname - - dataAO0.Port = m.Port - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.S3AbacServerUpdateRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this s3 abac server create request params -func (m *S3AbacServerCreateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostname(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with S3AbacServerUpdateRequestParams - if err := m.S3AbacServerUpdateRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3AbacServerCreateRequestParams) validateHostname(formats strfmt.Registry) error { - - if err := validate.Required("hostname", "body", m.Hostname); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerCreateRequestParams) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", m.Port); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this s3 abac server create request params based on the context it is used -func (m *S3AbacServerCreateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with S3AbacServerUpdateRequestParams - if err := m.S3AbacServerUpdateRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *S3AbacServerCreateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3AbacServerCreateRequestParams) UnmarshalBinary(b []byte) error { - var res S3AbacServerCreateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_abac_server_response.go b/v2/models/s3_abac_server_response.go deleted file mode 100644 index 02e9ac15..00000000 --- a/v2/models/s3_abac_server_response.go +++ /dev/null @@ -1,159 +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" -) - -// S3AbacServerResponse Specifies S3 ABAC server Response. -// -// swagger:model S3AbacServerResponse -type S3AbacServerResponse struct { - - // Specifies the ID of S3 ABAC server. - // Required: true - ID *int64 `json:"id"` - - // Specifies the hostname of S3 ABAC server. - // Required: true - Hostname *string `json:"hostname"` - - // Specifies the port of S3 ABAC server. - // Required: true - Port *int64 `json:"port"` - - // Specifies the path of URI for user requests. - // Required: true - BasePath *string `json:"basePath"` - - // Specifies the tenant Id for S3 ABAC server. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the client certificate. - // Required: true - Certificate *string `json:"certificate"` - - // Specifies the intermediate certificates. - // Required: true - CaBundle *string `json:"caBundle"` -} - -// Validate validates this s3 abac server response -func (m *S3AbacServerResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostname(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBasePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCaBundle(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3AbacServerResponse) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerResponse) validateHostname(formats strfmt.Registry) error { - - if err := validate.Required("hostname", "body", m.Hostname); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerResponse) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", m.Port); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerResponse) validateBasePath(formats strfmt.Registry) error { - - if err := validate.Required("basePath", "body", m.BasePath); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerResponse) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerResponse) validateCaBundle(formats strfmt.Registry) error { - - if err := validate.Required("caBundle", "body", m.CaBundle); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 abac server response based on context it is used -func (m *S3AbacServerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3AbacServerResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3AbacServerResponse) UnmarshalBinary(b []byte) error { - var res S3AbacServerResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_abac_server_update_request_params.go b/v2/models/s3_abac_server_update_request_params.go deleted file mode 100644 index f7b515fb..00000000 --- a/v2/models/s3_abac_server_update_request_params.go +++ /dev/null @@ -1,111 +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" -) - -// S3AbacServerUpdateRequestParams Specifies Request Parameters for updating a S3 ABAC server. -// -// swagger:model S3AbacServerUpdateRequestParams -type S3AbacServerUpdateRequestParams struct { - - // Specifies the client certificate. - // Required: true - Certificate *string `json:"certificate"` - - // Specifies the intermediate certificates. - // Required: true - CaBundle *string `json:"caBundle"` - - // Specifies the path of URI for user requests. - // Required: true - BasePath *string `json:"basePath"` - - // Specifies the tenant Id for S3 ABAC server. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the RSA private key. - Key *string `json:"key,omitempty"` -} - -// Validate validates this s3 abac server update request params -func (m *S3AbacServerUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCaBundle(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBasePath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3AbacServerUpdateRequestParams) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerUpdateRequestParams) validateCaBundle(formats strfmt.Registry) error { - - if err := validate.Required("caBundle", "body", m.CaBundle); err != nil { - return err - } - - return nil -} - -func (m *S3AbacServerUpdateRequestParams) validateBasePath(formats strfmt.Registry) error { - - if err := validate.Required("basePath", "body", m.BasePath); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 abac server update request params based on context it is used -func (m *S3AbacServerUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3AbacServerUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3AbacServerUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res S3AbacServerUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_abac_servers_response.go b/v2/models/s3_abac_servers_response.go deleted file mode 100644 index 632b7b64..00000000 --- a/v2/models/s3_abac_servers_response.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// S3AbacServersResponse Response of S3 ABAC servers. -// -// swagger:model S3AbacServersResponse -type S3AbacServersResponse struct { - - // A List of S3 ABAC server. - S3AbacServers []*S3AbacServerResponse `json:"s3AbacServers"` -} - -// Validate validates this s3 abac servers response -func (m *S3AbacServersResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateS3AbacServers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3AbacServersResponse) validateS3AbacServers(formats strfmt.Registry) error { - if swag.IsZero(m.S3AbacServers) { // not required - return nil - } - - for i := 0; i < len(m.S3AbacServers); i++ { - if swag.IsZero(m.S3AbacServers[i]) { // not required - continue - } - - if m.S3AbacServers[i] != nil { - if err := m.S3AbacServers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3AbacServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3AbacServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this s3 abac servers response based on the context it is used -func (m *S3AbacServersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateS3AbacServers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3AbacServersResponse) contextValidateS3AbacServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.S3AbacServers); i++ { - - if m.S3AbacServers[i] != nil { - - if swag.IsZero(m.S3AbacServers[i]) { // not required - return nil - } - - if err := m.S3AbacServers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3AbacServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3AbacServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3AbacServersResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3AbacServersResponse) UnmarshalBinary(b []byte) error { - var res S3AbacServersResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_account_params.go b/v2/models/s3_account_params.go deleted file mode 100644 index 2e7f4a92..00000000 --- a/v2/models/s3_account_params.go +++ /dev/null @@ -1,56 +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" -) - -// S3AccountParams Specifies S3 Account parameters for User. -// -// swagger:model S3AccountParams -type S3AccountParams struct { - - // Specifies the S3 Account Canonical User ID. - S3AccountID *string `json:"s3AccountId,omitempty"` - - // Specifies the S3 Account Access Key ID. - S3AccessKeyID *string `json:"s3AccessKeyId,omitempty"` - - // Specifies the S3 Account Secret Key. - S3SecretKey *string `json:"s3SecretKey,omitempty"` -} - -// Validate validates this s3 account params -func (m *S3AccountParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 account params based on context it is used -func (m *S3AccountParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3AccountParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3AccountParams) UnmarshalBinary(b []byte) error { - var res S3AccountParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_acl_grantee_type.go b/v2/models/s3_acl_grantee_type.go deleted file mode 100644 index a6f66dfb..00000000 --- a/v2/models/s3_acl_grantee_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// S3ACLGranteeType S3 Grantee Type -// -// Specifies S3 Grantee Type. -// -// swagger:model S3AclGranteeType -type S3ACLGranteeType struct { - - // Specifies S3 Grantee Type. - // Enum: ["RegisteredUser","Group"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this s3 Acl grantee type -func (m *S3ACLGranteeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var s3AclGranteeTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RegisteredUser","Group"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - s3AclGranteeTypeTypeEnumPropEnum = append(s3AclGranteeTypeTypeEnumPropEnum, v) - } -} - -const ( - - // S3ACLGranteeTypeEnumRegisteredUser captures enum value "RegisteredUser" - S3ACLGranteeTypeEnumRegisteredUser string = "RegisteredUser" - - // S3ACLGranteeTypeEnumGroup captures enum value "Group" - S3ACLGranteeTypeEnumGroup string = "Group" -) - -// prop value enum -func (m *S3ACLGranteeType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, s3AclGranteeTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *S3ACLGranteeType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 Acl grantee type based on context it is used -func (m *S3ACLGranteeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3ACLGranteeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3ACLGranteeType) UnmarshalBinary(b []byte) error { - var res S3ACLGranteeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_acl_permission.go b/v2/models/s3_acl_permission.go deleted file mode 100644 index fb35cee5..00000000 --- a/v2/models/s3_acl_permission.go +++ /dev/null @@ -1,116 +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" -) - -// S3ACLPermission S3 ACL Permission -// -// Specifies S3 ACL permission type. -// -// swagger:model S3AclPermission -type S3ACLPermission struct { - - // Specifies S3 ACL permission type. - // Enum: ["Read","Write","ReadACP","WriteACP","FullControl"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this s3 Acl permission -func (m *S3ACLPermission) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var s3AclPermissionTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Read","Write","ReadACP","WriteACP","FullControl"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - s3AclPermissionTypeEnumPropEnum = append(s3AclPermissionTypeEnumPropEnum, v) - } -} - -const ( - - // S3ACLPermissionEnumRead captures enum value "Read" - S3ACLPermissionEnumRead string = "Read" - - // S3ACLPermissionEnumWrite captures enum value "Write" - S3ACLPermissionEnumWrite string = "Write" - - // S3ACLPermissionEnumReadACP captures enum value "ReadACP" - S3ACLPermissionEnumReadACP string = "ReadACP" - - // S3ACLPermissionEnumWriteACP captures enum value "WriteACP" - S3ACLPermissionEnumWriteACP string = "WriteACP" - - // S3ACLPermissionEnumFullControl captures enum value "FullControl" - S3ACLPermissionEnumFullControl string = "FullControl" -) - -// prop value enum -func (m *S3ACLPermission) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, s3AclPermissionTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *S3ACLPermission) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 Acl permission based on context it is used -func (m *S3ACLPermission) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3ACLPermission) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3ACLPermission) UnmarshalBinary(b []byte) error { - var res S3ACLPermission - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_compatible_archival_storage_class.go b/v2/models/s3_compatible_archival_storage_class.go deleted file mode 100644 index e4516ab9..00000000 --- a/v2/models/s3_compatible_archival_storage_class.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// S3CompatibleArchivalStorageClass S3Compatible Archival Storage Class -// -// Specifies the storage class of S3Compatible Target of archival purpose type. -// -// swagger:model S3CompatibleArchivalStorageClass -type S3CompatibleArchivalStorageClass struct { - - // Specifies the storage class of S3Compatible External Target of archival purpose type. - // Enum: ["S3CompatibleRegular","S3CompatibleTapeBased"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this s3 compatible archival storage class -func (m *S3CompatibleArchivalStorageClass) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var s3CompatibleArchivalStorageClassTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["S3CompatibleRegular","S3CompatibleTapeBased"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - s3CompatibleArchivalStorageClassTypeEnumPropEnum = append(s3CompatibleArchivalStorageClassTypeEnumPropEnum, v) - } -} - -const ( - - // S3CompatibleArchivalStorageClassEnumS3CompatibleRegular captures enum value "S3CompatibleRegular" - S3CompatibleArchivalStorageClassEnumS3CompatibleRegular string = "S3CompatibleRegular" - - // S3CompatibleArchivalStorageClassEnumS3CompatibleTapeBased captures enum value "S3CompatibleTapeBased" - S3CompatibleArchivalStorageClassEnumS3CompatibleTapeBased string = "S3CompatibleTapeBased" -) - -// prop value enum -func (m *S3CompatibleArchivalStorageClass) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, s3CompatibleArchivalStorageClassTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *S3CompatibleArchivalStorageClass) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 compatible archival storage class based on context it is used -func (m *S3CompatibleArchivalStorageClass) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3CompatibleArchivalStorageClass) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3CompatibleArchivalStorageClass) UnmarshalBinary(b []byte) error { - var res S3CompatibleArchivalStorageClass - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_config.go b/v2/models/s3_config.go deleted file mode 100644 index 7bf875ff..00000000 --- a/v2/models/s3_config.go +++ /dev/null @@ -1,340 +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" -) - -// S3Config Specifies the S3 config settings for this View. -// -// swagger:model S3Config -type S3Config struct { - - // Specifies the path to access this View as an S3 share. - // Read Only: true - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - // Specifies the versioning state of S3 bucket. Buckets can be in one of three states: UnVersioned (default), VersioningEnabled, or VersioningSuspended. Once versioning is enabled for a bucket, it can never return to an UnVersioned state. However, versioning on the bucket can be suspended. - // Enum: ["UnVersioned","Enabled","Suspended"] - Versioning *string `json:"versioning,omitempty"` - - // Specifies if this View has S3 ABAC enabled. This can only be set - // while creating a view. The ABAC server corresponding the tenant - // will be used for authentication and authorization checks. - // - EnableAbac *bool `json:"enableAbac,omitempty"` - - // Specifies the ACL config of the View as an S3 bucket. - ACLConfig *ACLConfig `json:"aclConfig,omitempty"` - - // Specifies the policy in effect for this bucket. - BucketPolicy *BucketPolicy `json:"bucketPolicy,omitempty"` - - // Specifies the S3 Lifecycle policy of the bucket - LifecycleManagement *S3LifecycleManagement `json:"lifecycleManagement,omitempty"` - - // Specifies the owner info of the View as an S3 bucket. - OwnerInfo *S3OwnerInfo `json:"ownerInfo,omitempty"` -} - -// Validate validates this s3 config -func (m *S3Config) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVersioning(formats); err != nil { - res = append(res, err) - } - - if err := m.validateACLConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBucketPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLifecycleManagement(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var s3ConfigTypeVersioningPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["UnVersioned","Enabled","Suspended"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - s3ConfigTypeVersioningPropEnum = append(s3ConfigTypeVersioningPropEnum, v) - } -} - -const ( - - // S3ConfigVersioningUnVersioned captures enum value "UnVersioned" - S3ConfigVersioningUnVersioned string = "UnVersioned" - - // S3ConfigVersioningEnabled captures enum value "Enabled" - S3ConfigVersioningEnabled string = "Enabled" - - // S3ConfigVersioningSuspended captures enum value "Suspended" - S3ConfigVersioningSuspended string = "Suspended" -) - -// prop value enum -func (m *S3Config) validateVersioningEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, s3ConfigTypeVersioningPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *S3Config) validateVersioning(formats strfmt.Registry) error { - if swag.IsZero(m.Versioning) { // not required - return nil - } - - // value enum - if err := m.validateVersioningEnum("versioning", "body", *m.Versioning); err != nil { - return err - } - - return nil -} - -func (m *S3Config) validateACLConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ACLConfig) { // not required - return nil - } - - if m.ACLConfig != nil { - if err := m.ACLConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aclConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aclConfig") - } - return err - } - } - - return nil -} - -func (m *S3Config) validateBucketPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.BucketPolicy) { // not required - return nil - } - - if m.BucketPolicy != nil { - if err := m.BucketPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketPolicy") - } - return err - } - } - - return nil -} - -func (m *S3Config) validateLifecycleManagement(formats strfmt.Registry) error { - if swag.IsZero(m.LifecycleManagement) { // not required - return nil - } - - if m.LifecycleManagement != nil { - if err := m.LifecycleManagement.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lifecycleManagement") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lifecycleManagement") - } - return err - } - } - - return nil -} - -func (m *S3Config) validateOwnerInfo(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if m.OwnerInfo != nil { - if err := m.OwnerInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this s3 config based on the context it is used -func (m *S3Config) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateS3AccessPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateACLConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBucketPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLifecycleManagement(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3Config) contextValidateS3AccessPath(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "s3AccessPath", "body", m.S3AccessPath); err != nil { - return err - } - - return nil -} - -func (m *S3Config) contextValidateACLConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ACLConfig != nil { - - if swag.IsZero(m.ACLConfig) { // not required - return nil - } - - if err := m.ACLConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aclConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aclConfig") - } - return err - } - } - - return nil -} - -func (m *S3Config) contextValidateBucketPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.BucketPolicy != nil { - - if swag.IsZero(m.BucketPolicy) { // not required - return nil - } - - if err := m.BucketPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bucketPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bucketPolicy") - } - return err - } - } - - return nil -} - -func (m *S3Config) contextValidateLifecycleManagement(ctx context.Context, formats strfmt.Registry) error { - - if m.LifecycleManagement != nil { - - if swag.IsZero(m.LifecycleManagement) { // not required - return nil - } - - if err := m.LifecycleManagement.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lifecycleManagement") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lifecycleManagement") - } - return err - } - } - - return nil -} - -func (m *S3Config) contextValidateOwnerInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.OwnerInfo != nil { - - if swag.IsZero(m.OwnerInfo) { // not required - return nil - } - - if err := m.OwnerInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3Config) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3Config) UnmarshalBinary(b []byte) error { - var res S3Config - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_config_for_indexing.go b/v2/models/s3_config_for_indexing.go deleted file mode 100644 index d3dbcdc3..00000000 --- a/v2/models/s3_config_for_indexing.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" - "github.com/go-openapi/validate" -) - -// S3ConfigForIndexing S3ConfigForIndexing -// -// S3 config for indexing in DMaaS (AWS CE). -// -// swagger:model S3ConfigForIndexing -type S3ConfigForIndexing struct { - - // Name of S3 bucket to store indexed data. - // Required: true - S3BucketName *string `json:"s3BucketName"` - - // Prefix under S3 bucket where data will be stored. - // Required: true - S3Prefix *string `json:"s3Prefix"` - - // IAM role ARN which has access to S3 instance. - // Required: true - S3IamRoleArn *string `json:"s3IamRoleArn"` -} - -// Validate validates this s3 config for indexing -func (m *S3ConfigForIndexing) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateS3BucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Prefix(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3IamRoleArn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3ConfigForIndexing) validateS3BucketName(formats strfmt.Registry) error { - - if err := validate.Required("s3BucketName", "body", m.S3BucketName); err != nil { - return err - } - - return nil -} - -func (m *S3ConfigForIndexing) validateS3Prefix(formats strfmt.Registry) error { - - if err := validate.Required("s3Prefix", "body", m.S3Prefix); err != nil { - return err - } - - return nil -} - -func (m *S3ConfigForIndexing) validateS3IamRoleArn(formats strfmt.Registry) error { - - if err := validate.Required("s3IamRoleArn", "body", m.S3IamRoleArn); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s3 config for indexing based on context it is used -func (m *S3ConfigForIndexing) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3ConfigForIndexing) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3ConfigForIndexing) UnmarshalBinary(b []byte) error { - var res S3ConfigForIndexing - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_lifecycle_management.go b/v2/models/s3_lifecycle_management.go deleted file mode 100644 index bf01d7d9..00000000 --- a/v2/models/s3_lifecycle_management.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// S3LifecycleManagement Specifies the S3 Lifecycle policy of the bucket. If not specified no Lifecycle management is performed for objects in this bucket. -// -// swagger:model S3LifecycleManagement -type S3LifecycleManagement struct { - - // Specifies a unique monotonically increasing version for the lifecycle configuration. - VersionID *int64 `json:"versionId,omitempty"` - - // Specifies Lifecycle configuration rules for an Amazon S3 bucket. A maximum of 1000 rules can be specified. - Rules []*LifecycleRule `json:"rules"` -} - -// Validate validates this s3 lifecycle management -func (m *S3LifecycleManagement) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRules(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3LifecycleManagement) validateRules(formats strfmt.Registry) error { - if swag.IsZero(m.Rules) { // not required - return nil - } - - for i := 0; i < len(m.Rules); i++ { - if swag.IsZero(m.Rules[i]) { // not required - continue - } - - if m.Rules[i] != nil { - if err := m.Rules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this s3 lifecycle management based on the context it is used -func (m *S3LifecycleManagement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRules(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *S3LifecycleManagement) contextValidateRules(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Rules); i++ { - - if m.Rules[i] != nil { - - if swag.IsZero(m.Rules[i]) { // not required - return nil - } - - if err := m.Rules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *S3LifecycleManagement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3LifecycleManagement) UnmarshalBinary(b []byte) error { - var res S3LifecycleManagement - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s3_owner_info.go b/v2/models/s3_owner_info.go deleted file mode 100644 index 3863130b..00000000 --- a/v2/models/s3_owner_info.go +++ /dev/null @@ -1,55 +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" -) - -// S3OwnerInfo Specifies the owner info of an S3 bucket. For ABAC enabled bucket, -// owner is specified by distinguishedName of the user. In all other -// cases, it is defined by userId. -// -// swagger:model S3OwnerInfo -type S3OwnerInfo struct { - - // Specifies the user id of the owner. - UserID *string `json:"userId,omitempty"` - - // Specifies the distinguished name of the bucket owner for an ABAC enabled S3 Bucket. - DistinguishedName *string `json:"distinguishedName,omitempty"` -} - -// Validate validates this s3 owner info -func (m *S3OwnerInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s3 owner info based on context it is used -func (m *S3OwnerInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *S3OwnerInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *S3OwnerInfo) UnmarshalBinary(b []byte) error { - var res S3OwnerInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s_f_d_c_endpoint_type.go b/v2/models/s_f_d_c_endpoint_type.go deleted file mode 100644 index 156e022a..00000000 --- a/v2/models/s_f_d_c_endpoint_type.go +++ /dev/null @@ -1,110 +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" -) - -// SFDCEndpointType Enumeration of all the SFDC Endpoint types. -// -// Enumeration of all the SFDC Endpoint types. -// -// swagger:model SFDCEndpointType -type SFDCEndpointType struct { - - // Enumeration of all the SFDC Endpoint types. - // Enum: ["PROD","SANDBOX","OTHER"] - SFDCEndpointType string `json:"SFDCEndpointType,omitempty"` -} - -// Validate validates this s f d c endpoint type -func (m *SFDCEndpointType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSFDCEndpointType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sFDCEndpointTypeTypeSFDCEndpointTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PROD","SANDBOX","OTHER"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sFDCEndpointTypeTypeSFDCEndpointTypePropEnum = append(sFDCEndpointTypeTypeSFDCEndpointTypePropEnum, v) - } -} - -const ( - - // SFDCEndpointTypeSFDCEndpointTypePROD captures enum value "PROD" - SFDCEndpointTypeSFDCEndpointTypePROD string = "PROD" - - // SFDCEndpointTypeSFDCEndpointTypeSANDBOX captures enum value "SANDBOX" - SFDCEndpointTypeSFDCEndpointTypeSANDBOX string = "SANDBOX" - - // SFDCEndpointTypeSFDCEndpointTypeOTHER captures enum value "OTHER" - SFDCEndpointTypeSFDCEndpointTypeOTHER string = "OTHER" -) - -// prop value enum -func (m *SFDCEndpointType) validateSFDCEndpointTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sFDCEndpointTypeTypeSFDCEndpointTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SFDCEndpointType) validateSFDCEndpointType(formats strfmt.Registry) error { - if swag.IsZero(m.SFDCEndpointType) { // not required - return nil - } - - // value enum - if err := m.validateSFDCEndpointTypeEnum("SFDCEndpointType", "body", m.SFDCEndpointType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this s f d c endpoint type based on context it is used -func (m *SFDCEndpointType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SFDCEndpointType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SFDCEndpointType) UnmarshalBinary(b []byte) error { - var res SFDCEndpointType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/s_m_b_principal.go b/v2/models/s_m_b_principal.go deleted file mode 100644 index 7fafe546..00000000 --- a/v2/models/s_m_b_principal.go +++ /dev/null @@ -1,56 +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" -) - -// SMBPrincipal Specifies principal parameters. -// -// swagger:model SMBPrincipal -type SMBPrincipal struct { - - // Specifies the domain of the principal. For active directories, this is the fully qualified domain name (FQDN). - Domain *string `json:"domain,omitempty"` - - // Specifies the principal name. - Name *string `json:"name,omitempty"` - - // Specifies the principal class. - ObjectClass *string `json:"objectClass,omitempty"` -} - -// Validate validates this s m b principal -func (m *SMBPrincipal) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this s m b principal based on context it is used -func (m *SMBPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SMBPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SMBPrincipal) UnmarshalBinary(b []byte) error { - var res SMBPrincipal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/saas_service_name.go b/v2/models/saas_service_name.go deleted file mode 100644 index 76c9df1e..00000000 --- a/v2/models/saas_service_name.go +++ /dev/null @@ -1,119 +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" -) - -// SaasServiceName SaaS Service Name. -// -// saas service name. -// -// swagger:model SaasServiceName -type SaasServiceName struct { - - // Specifies SaaS service name. - // Enum: ["DataProtect","SiteContinuity","DataHawk","Ransomware","FortKnoxCold","DataInsights"] - Service string `json:"service,omitempty"` -} - -// Validate validates this saas service name -func (m *SaasServiceName) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var saasServiceNameTypeServicePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DataProtect","SiteContinuity","DataHawk","Ransomware","FortKnoxCold","DataInsights"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - saasServiceNameTypeServicePropEnum = append(saasServiceNameTypeServicePropEnum, v) - } -} - -const ( - - // SaasServiceNameServiceDataProtect captures enum value "DataProtect" - SaasServiceNameServiceDataProtect string = "DataProtect" - - // SaasServiceNameServiceSiteContinuity captures enum value "SiteContinuity" - SaasServiceNameServiceSiteContinuity string = "SiteContinuity" - - // SaasServiceNameServiceDataHawk captures enum value "DataHawk" - SaasServiceNameServiceDataHawk string = "DataHawk" - - // SaasServiceNameServiceRansomware captures enum value "Ransomware" - SaasServiceNameServiceRansomware string = "Ransomware" - - // SaasServiceNameServiceFortKnoxCold captures enum value "FortKnoxCold" - SaasServiceNameServiceFortKnoxCold string = "FortKnoxCold" - - // SaasServiceNameServiceDataInsights captures enum value "DataInsights" - SaasServiceNameServiceDataInsights string = "DataInsights" -) - -// prop value enum -func (m *SaasServiceName) validateServiceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, saasServiceNameTypeServicePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SaasServiceName) validateService(formats strfmt.Registry) error { - if swag.IsZero(m.Service) { // not required - return nil - } - - // value enum - if err := m.validateServiceEnum("service", "body", m.Service); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this saas service name based on context it is used -func (m *SaasServiceName) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SaasServiceName) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SaasServiceName) UnmarshalBinary(b []byte) error { - var res SaasServiceName - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sap_hana_agent_params.go b/v2/models/sap_hana_agent_params.go deleted file mode 100644 index 79e9b396..00000000 --- a/v2/models/sap_hana_agent_params.go +++ /dev/null @@ -1,159 +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" -) - -// SapHanaAgentParams SapHana agent parameters. -// -// swagger:model SapHanaAgentParams -type SapHanaAgentParams struct { - - // Specifies the type of installer. - // Required: true - // Enum: ["kScript","kRPM"] - PackageType *string `json:"packageType"` - - // Specifies the type of agent. kJava agent type is supported only for kScript package type. - // Required: true - // Enum: ["kJava","kLegacy"] - AgentType *string `json:"agentType"` -} - -// Validate validates this sap hana agent params -func (m *SapHanaAgentParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePackageType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sapHanaAgentParamsTypePackageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScript","kRPM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sapHanaAgentParamsTypePackageTypePropEnum = append(sapHanaAgentParamsTypePackageTypePropEnum, v) - } -} - -const ( - - // SapHanaAgentParamsPackageTypeKScript captures enum value "kScript" - SapHanaAgentParamsPackageTypeKScript string = "kScript" - - // SapHanaAgentParamsPackageTypeKRPM captures enum value "kRPM" - SapHanaAgentParamsPackageTypeKRPM string = "kRPM" -) - -// prop value enum -func (m *SapHanaAgentParams) validatePackageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sapHanaAgentParamsTypePackageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SapHanaAgentParams) validatePackageType(formats strfmt.Registry) error { - - if err := validate.Required("packageType", "body", m.PackageType); err != nil { - return err - } - - // value enum - if err := m.validatePackageTypeEnum("packageType", "body", *m.PackageType); err != nil { - return err - } - - return nil -} - -var sapHanaAgentParamsTypeAgentTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kJava","kLegacy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sapHanaAgentParamsTypeAgentTypePropEnum = append(sapHanaAgentParamsTypeAgentTypePropEnum, v) - } -} - -const ( - - // SapHanaAgentParamsAgentTypeKJava captures enum value "kJava" - SapHanaAgentParamsAgentTypeKJava string = "kJava" - - // SapHanaAgentParamsAgentTypeKLegacy captures enum value "kLegacy" - SapHanaAgentParamsAgentTypeKLegacy string = "kLegacy" -) - -// prop value enum -func (m *SapHanaAgentParams) validateAgentTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sapHanaAgentParamsTypeAgentTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SapHanaAgentParams) validateAgentType(formats strfmt.Registry) error { - - if err := validate.Required("agentType", "body", m.AgentType); err != nil { - return err - } - - // value enum - if err := m.validateAgentTypeEnum("agentType", "body", *m.AgentType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sap hana agent params based on context it is used -func (m *SapHanaAgentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SapHanaAgentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SapHanaAgentParams) UnmarshalBinary(b []byte) error { - var res SapHanaAgentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sap_oracle_agent_params.go b/v2/models/sap_oracle_agent_params.go deleted file mode 100644 index 50e7623a..00000000 --- a/v2/models/sap_oracle_agent_params.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SapOracleAgentParams SapOracle agent parameters -// -// swagger:model SapOracleAgentParams -type SapOracleAgentParams struct { - - // Specifies the type of installer. - // Required: true - // Enum: ["kScript","kRPM"] - PackageType *string `json:"packageType"` -} - -// Validate validates this sap oracle agent params -func (m *SapOracleAgentParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePackageType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sapOracleAgentParamsTypePackageTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScript","kRPM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sapOracleAgentParamsTypePackageTypePropEnum = append(sapOracleAgentParamsTypePackageTypePropEnum, v) - } -} - -const ( - - // SapOracleAgentParamsPackageTypeKScript captures enum value "kScript" - SapOracleAgentParamsPackageTypeKScript string = "kScript" - - // SapOracleAgentParamsPackageTypeKRPM captures enum value "kRPM" - SapOracleAgentParamsPackageTypeKRPM string = "kRPM" -) - -// prop value enum -func (m *SapOracleAgentParams) validatePackageTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sapOracleAgentParamsTypePackageTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SapOracleAgentParams) validatePackageType(formats strfmt.Registry) error { - - if err := validate.Required("packageType", "body", m.PackageType); err != nil { - return err - } - - // value enum - if err := m.validatePackageTypeEnum("packageType", "body", *m.PackageType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sap oracle agent params based on context it is used -func (m *SapOracleAgentParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SapOracleAgentParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SapOracleAgentParams) UnmarshalBinary(b []byte) error { - var res SapOracleAgentParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/schedule.go b/v2/models/schedule.go deleted file mode 100644 index cf72ffca..00000000 --- a/v2/models/schedule.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Schedule Specifies a schedule for actions to be taken. -// -// swagger:model Schedule -type Schedule struct { - - // Specifies the type of schedule for this ScheduleProto. - // Enum: ["PeriodicTimeWindows","CustomIntervals"] - ScheduleType *string `json:"scheduleType,omitempty"` - - // Specifies the time range within the days of the week. - PeriodicTimeWindows []*TimeWindow `json:"periodicTimeWindows"` - - // Specifies the time ranges in usecs. - TimeRanges []*TimeRangeUsecs `json:"timeRanges"` - - // Specifies the timezone of the user of this ScheduleProto. The timezones have unique names of the form 'Area/Location'. - Timezone string `json:"timezone,omitempty"` -} - -// Validate validates this schedule -func (m *Schedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScheduleType(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePeriodicTimeWindows(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimeRanges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scheduleTypeScheduleTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PeriodicTimeWindows","CustomIntervals"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scheduleTypeScheduleTypePropEnum = append(scheduleTypeScheduleTypePropEnum, v) - } -} - -const ( - - // ScheduleScheduleTypePeriodicTimeWindows captures enum value "PeriodicTimeWindows" - ScheduleScheduleTypePeriodicTimeWindows string = "PeriodicTimeWindows" - - // ScheduleScheduleTypeCustomIntervals captures enum value "CustomIntervals" - ScheduleScheduleTypeCustomIntervals string = "CustomIntervals" -) - -// prop value enum -func (m *Schedule) validateScheduleTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scheduleTypeScheduleTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Schedule) validateScheduleType(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduleType) { // not required - return nil - } - - // value enum - if err := m.validateScheduleTypeEnum("scheduleType", "body", *m.ScheduleType); err != nil { - return err - } - - return nil -} - -func (m *Schedule) validatePeriodicTimeWindows(formats strfmt.Registry) error { - if swag.IsZero(m.PeriodicTimeWindows) { // not required - return nil - } - - for i := 0; i < len(m.PeriodicTimeWindows); i++ { - if swag.IsZero(m.PeriodicTimeWindows[i]) { // not required - continue - } - - if m.PeriodicTimeWindows[i] != nil { - if err := m.PeriodicTimeWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Schedule) validateTimeRanges(formats strfmt.Registry) error { - if swag.IsZero(m.TimeRanges) { // not required - return nil - } - - for i := 0; i < len(m.TimeRanges); i++ { - if swag.IsZero(m.TimeRanges[i]) { // not required - continue - } - - if m.TimeRanges[i] != nil { - if err := m.TimeRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this schedule based on the context it is used -func (m *Schedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePeriodicTimeWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimeRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Schedule) contextValidatePeriodicTimeWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PeriodicTimeWindows); i++ { - - if m.PeriodicTimeWindows[i] != nil { - - if swag.IsZero(m.PeriodicTimeWindows[i]) { // not required - return nil - } - - if err := m.PeriodicTimeWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("periodicTimeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *Schedule) contextValidateTimeRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeRanges); i++ { - - if m.TimeRanges[i] != nil { - - if swag.IsZero(m.TimeRanges[i]) { // not required - return nil - } - - if err := m.TimeRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Schedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Schedule) UnmarshalBinary(b []byte) error { - var res Schedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/schedule_type.go b/v2/models/schedule_type.go deleted file mode 100644 index 598eb458..00000000 --- a/v2/models/schedule_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ScheduleType ScheduleType -// -// Specifies the schedule type. -// -// swagger:model ScheduleType -type ScheduleType struct { - - // Specifies the types of schedule. - // Enum: ["PeriodicTimeWindows","CustomIntervals"] - Type string `json:"type,omitempty"` -} - -// Validate validates this schedule type -func (m *ScheduleType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scheduleTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PeriodicTimeWindows","CustomIntervals"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scheduleTypeTypeTypePropEnum = append(scheduleTypeTypeTypePropEnum, v) - } -} - -const ( - - // ScheduleTypeTypePeriodicTimeWindows captures enum value "PeriodicTimeWindows" - ScheduleTypeTypePeriodicTimeWindows string = "PeriodicTimeWindows" - - // ScheduleTypeTypeCustomIntervals captures enum value "CustomIntervals" - ScheduleTypeTypeCustomIntervals string = "CustomIntervals" -) - -// prop value enum -func (m *ScheduleType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scheduleTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ScheduleType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this schedule type based on context it is used -func (m *ScheduleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScheduleType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScheduleType) UnmarshalBinary(b []byte) error { - var res ScheduleType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/schedule_unit.go b/v2/models/schedule_unit.go deleted file mode 100644 index 350b760a..00000000 --- a/v2/models/schedule_unit.go +++ /dev/null @@ -1,119 +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" -) - -// ScheduleUnit ScheduleUnit -// -// # Schedule Units -// -// swagger:model ScheduleUnit -type ScheduleUnit struct { - - // Specifies the schedule unit. - // Enum: ["Runs","Hours","Days","Weeks","Months","Years"] - ScheduleUnit string `json:"scheduleUnit,omitempty"` -} - -// Validate validates this schedule unit -func (m *ScheduleUnit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScheduleUnit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scheduleUnitTypeScheduleUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Runs","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scheduleUnitTypeScheduleUnitPropEnum = append(scheduleUnitTypeScheduleUnitPropEnum, v) - } -} - -const ( - - // ScheduleUnitScheduleUnitRuns captures enum value "Runs" - ScheduleUnitScheduleUnitRuns string = "Runs" - - // ScheduleUnitScheduleUnitHours captures enum value "Hours" - ScheduleUnitScheduleUnitHours string = "Hours" - - // ScheduleUnitScheduleUnitDays captures enum value "Days" - ScheduleUnitScheduleUnitDays string = "Days" - - // ScheduleUnitScheduleUnitWeeks captures enum value "Weeks" - ScheduleUnitScheduleUnitWeeks string = "Weeks" - - // ScheduleUnitScheduleUnitMonths captures enum value "Months" - ScheduleUnitScheduleUnitMonths string = "Months" - - // ScheduleUnitScheduleUnitYears captures enum value "Years" - ScheduleUnitScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *ScheduleUnit) validateScheduleUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scheduleUnitTypeScheduleUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ScheduleUnit) validateScheduleUnit(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduleUnit) { // not required - return nil - } - - // value enum - if err := m.validateScheduleUnitEnum("scheduleUnit", "body", m.ScheduleUnit); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this schedule unit based on context it is used -func (m *ScheduleUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScheduleUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScheduleUnit) UnmarshalBinary(b []byte) error { - var res ScheduleUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/scheduled_backup.go b/v2/models/scheduled_backup.go deleted file mode 100644 index 087a0bae..00000000 --- a/v2/models/scheduled_backup.go +++ /dev/null @@ -1,119 +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" -) - -// ScheduledBackup Scheduled Backup type. -// -// Scheduled Backup type. -// -// swagger:model ScheduledBackup -type ScheduledBackup struct { - - // Specifies Scheduled Backup type. - // Enum: ["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"] - ScheduledBackup string `json:"scheduledBackup,omitempty"` -} - -// Validate validates this scheduled backup -func (m *ScheduledBackup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScheduledBackup(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scheduledBackupTypeScheduledBackupPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRegular","kFull","kLog","kSystem","kHydrateCDP","kStorageArraySnapshot"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scheduledBackupTypeScheduledBackupPropEnum = append(scheduledBackupTypeScheduledBackupPropEnum, v) - } -} - -const ( - - // ScheduledBackupScheduledBackupKRegular captures enum value "kRegular" - ScheduledBackupScheduledBackupKRegular string = "kRegular" - - // ScheduledBackupScheduledBackupKFull captures enum value "kFull" - ScheduledBackupScheduledBackupKFull string = "kFull" - - // ScheduledBackupScheduledBackupKLog captures enum value "kLog" - ScheduledBackupScheduledBackupKLog string = "kLog" - - // ScheduledBackupScheduledBackupKSystem captures enum value "kSystem" - ScheduledBackupScheduledBackupKSystem string = "kSystem" - - // ScheduledBackupScheduledBackupKHydrateCDP captures enum value "kHydrateCDP" - ScheduledBackupScheduledBackupKHydrateCDP string = "kHydrateCDP" - - // ScheduledBackupScheduledBackupKStorageArraySnapshot captures enum value "kStorageArraySnapshot" - ScheduledBackupScheduledBackupKStorageArraySnapshot string = "kStorageArraySnapshot" -) - -// prop value enum -func (m *ScheduledBackup) validateScheduledBackupEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scheduledBackupTypeScheduledBackupPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ScheduledBackup) validateScheduledBackup(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduledBackup) { // not required - return nil - } - - // value enum - if err := m.validateScheduledBackupEnum("scheduledBackup", "body", m.ScheduledBackup); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this scheduled backup based on context it is used -func (m *ScheduledBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScheduledBackup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScheduledBackup) UnmarshalBinary(b []byte) error { - var res ScheduledBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/schema.go b/v2/models/schema.go deleted file mode 100644 index aec76ba0..00000000 --- a/v2/models/schema.go +++ /dev/null @@ -1,58 +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" -) - -// Schema Schema -// -// Specifies the metric data point where public data metric as key and the schema defined metric name as value. -// -// swagger:model Schema -type Schema struct { - - // Specifies the name of schema metric. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the name of the schema. - SchemaName *string `json:"schemaName,omitempty"` - - // Specifies the id of the entity. - EntityID *string `json:"entityId,omitempty"` -} - -// Validate validates this schema -func (m *Schema) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this schema based on context it is used -func (m *Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Schema) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Schema) UnmarshalBinary(b []byte) error { - var res Schema - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/script_host.go b/v2/models/script_host.go deleted file mode 100644 index 28d87ba3..00000000 --- a/v2/models/script_host.go +++ /dev/null @@ -1,131 +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" -) - -// ScriptHost Pre/Post Script Host -// -// Specifies the params for the host of a pre / post script. -// -// swagger:model ScriptHost -type ScriptHost struct { - - // Specifies the Hostname or IP address of the host where the pre and post script will be run. - Hostname *string `json:"hostname,omitempty"` - - // Specifies the username for the host. - Username *string `json:"username,omitempty"` - - // Specifies the Operating system type of the host. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"] - HostType *string `json:"hostType,omitempty"` -} - -// Validate validates this script host -func (m *ScriptHost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scriptHostTypeHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scriptHostTypeHostTypePropEnum = append(scriptHostTypeHostTypePropEnum, v) - } -} - -const ( - - // ScriptHostHostTypeKLinux captures enum value "kLinux" - ScriptHostHostTypeKLinux string = "kLinux" - - // ScriptHostHostTypeKWindows captures enum value "kWindows" - ScriptHostHostTypeKWindows string = "kWindows" - - // ScriptHostHostTypeKAix captures enum value "kAix" - ScriptHostHostTypeKAix string = "kAix" - - // ScriptHostHostTypeKSolaris captures enum value "kSolaris" - ScriptHostHostTypeKSolaris string = "kSolaris" - - // ScriptHostHostTypeKSapHana captures enum value "kSapHana" - ScriptHostHostTypeKSapHana string = "kSapHana" - - // ScriptHostHostTypeKOther captures enum value "kOther" - ScriptHostHostTypeKOther string = "kOther" - - // ScriptHostHostTypeKHPUX captures enum value "kHPUX" - ScriptHostHostTypeKHPUX string = "kHPUX" - - // ScriptHostHostTypeKVOS captures enum value "kVOS" - ScriptHostHostTypeKVOS string = "kVOS" -) - -// prop value enum -func (m *ScriptHost) validateHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scriptHostTypeHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ScriptHost) validateHostType(formats strfmt.Registry) error { - if swag.IsZero(m.HostType) { // not required - return nil - } - - // value enum - if err := m.validateHostTypeEnum("hostType", "body", *m.HostType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this script host based on context it is used -func (m *ScriptHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScriptHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScriptHost) UnmarshalBinary(b []byte) error { - var res ScriptHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/script_host_type.go b/v2/models/script_host_type.go deleted file mode 100644 index ddf70bb3..00000000 --- a/v2/models/script_host_type.go +++ /dev/null @@ -1,125 +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" -) - -// ScriptHostType ScriptHostType -// -// # Script Host Type -// -// swagger:model ScriptHostType -type ScriptHostType struct { - - // Specifies the host type of the pre/post script. - // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"] - ScriptHostType string `json:"scriptHostType,omitempty"` -} - -// Validate validates this script host type -func (m *ScriptHostType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateScriptHostType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var scriptHostTypeTypeScriptHostTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix","kSolaris","kSapHana","kOther","kHPUX","kVOS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - scriptHostTypeTypeScriptHostTypePropEnum = append(scriptHostTypeTypeScriptHostTypePropEnum, v) - } -} - -const ( - - // ScriptHostTypeScriptHostTypeKLinux captures enum value "kLinux" - ScriptHostTypeScriptHostTypeKLinux string = "kLinux" - - // ScriptHostTypeScriptHostTypeKWindows captures enum value "kWindows" - ScriptHostTypeScriptHostTypeKWindows string = "kWindows" - - // ScriptHostTypeScriptHostTypeKAix captures enum value "kAix" - ScriptHostTypeScriptHostTypeKAix string = "kAix" - - // ScriptHostTypeScriptHostTypeKSolaris captures enum value "kSolaris" - ScriptHostTypeScriptHostTypeKSolaris string = "kSolaris" - - // ScriptHostTypeScriptHostTypeKSapHana captures enum value "kSapHana" - ScriptHostTypeScriptHostTypeKSapHana string = "kSapHana" - - // ScriptHostTypeScriptHostTypeKOther captures enum value "kOther" - ScriptHostTypeScriptHostTypeKOther string = "kOther" - - // ScriptHostTypeScriptHostTypeKHPUX captures enum value "kHPUX" - ScriptHostTypeScriptHostTypeKHPUX string = "kHPUX" - - // ScriptHostTypeScriptHostTypeKVOS captures enum value "kVOS" - ScriptHostTypeScriptHostTypeKVOS string = "kVOS" -) - -// prop value enum -func (m *ScriptHostType) validateScriptHostTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, scriptHostTypeTypeScriptHostTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ScriptHostType) validateScriptHostType(formats strfmt.Registry) error { - if swag.IsZero(m.ScriptHostType) { // not required - return nil - } - - // value enum - if err := m.validateScriptHostTypeEnum("scriptHostType", "body", m.ScriptHostType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this script host type based on context it is used -func (m *ScriptHostType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ScriptHostType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScriptHostType) UnmarshalBinary(b []byte) error { - var res ScriptHostType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/scvmm_registration_params.go b/v2/models/scvmm_registration_params.go deleted file mode 100644 index ecc2712a..00000000 --- a/v2/models/scvmm_registration_params.go +++ /dev/null @@ -1,179 +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" -) - -// ScvmmRegistrationParams Register HyperV SCVMM request parameters. -// -// Specifies parameters to register HyperV SCVMM. -// -// swagger:model ScvmmRegistrationParams -type ScvmmRegistrationParams struct { - CommonSourceRegistrationParams - - // Specifies the agent endpoint if it is different from the source endpoint. - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - // Specifies the throttling params. - ThrottlingParams *ThrottlingParams `json:"throttlingParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ScvmmRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - ThrottlingParams *ThrottlingParams `json:"throttlingParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AgentEndpoint = dataAO1.AgentEndpoint - - m.ThrottlingParams = dataAO1.ThrottlingParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ScvmmRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AgentEndpoint *string `json:"agentEndpoint,omitempty"` - - ThrottlingParams *ThrottlingParams `json:"throttlingParams,omitempty"` - } - - dataAO1.AgentEndpoint = m.AgentEndpoint - - dataAO1.ThrottlingParams = m.ThrottlingParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this scvmm registration params -func (m *ScvmmRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScvmmRegistrationParams) validateThrottlingParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if m.ThrottlingParams != nil { - if err := m.ThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this scvmm registration params based on the context it is used -func (m *ScvmmRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ScvmmRegistrationParams) contextValidateThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingParams != nil { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if err := m.ThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ScvmmRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ScvmmRegistrationParams) UnmarshalBinary(b []byte) error { - var res ScvmmRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_document_library_request_params.go b/v2/models/search_document_library_request_params.go deleted file mode 100644 index a0d741ea..00000000 --- a/v2/models/search_document_library_request_params.go +++ /dev/null @@ -1,186 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchDocumentLibraryRequestParams Search Document library request params. -// -// Specifies the request parameters to search for files/folders in document libraries. -// -// swagger:model SearchDocumentLibraryRequestParams -type SearchDocumentLibraryRequestParams struct { - - // Specifies the search string to filter the files/folders. User can specify a wildcard character '*' as a suffix to a string where all item names are matched with the prefix string. - SearchString *string `json:"searchString,omitempty"` - - // Specifies whether to include folders in the response. Default is true. - IncludeFolders *bool `json:"includeFolders,omitempty"` - - // Specifies whether to include files in the response. Default is true. - IncludeFiles *bool `json:"includeFiles,omitempty"` - - // Specifies a list of document library types. Only items within the given types will be returned. - // Unique: true - CategoryTypes []string `json:"categoryTypes"` - - // Specifies the start time in Unix timestamp epoch in seconds when the file/folder is created. - CreationStartTimeSecs *int64 `json:"creationStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds when the file/folder is created. - CreationEndTimeSecs *int64 `json:"creationEndTimeSecs,omitempty"` - - // Specifies the minimum size of the file in bytes. - SizeBytesLowerLimit *int64 `json:"sizeBytesLowerLimit,omitempty"` - - // Specifies the maximum size of the file in bytes. - SizeBytesUpperLimit *int64 `json:"sizeBytesUpperLimit,omitempty"` - - // Specifies the list of owner names to filter on owner of the file/folder. - OwnerNames []string `json:"ownerNames"` - - // Specifies the O365 specific params to search for indexed items. - O365Params *O365SearchRequestParams `json:"o365Params,omitempty"` -} - -// Validate validates this search document library request params -func (m *SearchDocumentLibraryRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategoryTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var searchDocumentLibraryRequestParamsCategoryTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Document","Excel","Powerpoint","Image","OneNote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchDocumentLibraryRequestParamsCategoryTypesItemsEnum = append(searchDocumentLibraryRequestParamsCategoryTypesItemsEnum, v) - } -} - -func (m *SearchDocumentLibraryRequestParams) validateCategoryTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchDocumentLibraryRequestParamsCategoryTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchDocumentLibraryRequestParams) validateCategoryTypes(formats strfmt.Registry) error { - if swag.IsZero(m.CategoryTypes) { // not required - return nil - } - - if err := validate.UniqueItems("categoryTypes", "body", m.CategoryTypes); err != nil { - return err - } - - for i := 0; i < len(m.CategoryTypes); i++ { - - // value enum - if err := m.validateCategoryTypesItemsEnum("categoryTypes"+"."+strconv.Itoa(i), "body", m.CategoryTypes[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchDocumentLibraryRequestParams) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search document library request params based on the context it is used -func (m *SearchDocumentLibraryRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchDocumentLibraryRequestParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchDocumentLibraryRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchDocumentLibraryRequestParams) UnmarshalBinary(b []byte) error { - var res SearchDocumentLibraryRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_email_request_params.go b/v2/models/search_email_request_params.go deleted file mode 100644 index 1ad225ba..00000000 --- a/v2/models/search_email_request_params.go +++ /dev/null @@ -1,168 +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" -) - -// SearchEmailRequestParams Search emails request params. -// -// Specifies the request parameters to search for emails and email folders. -// -// swagger:model SearchEmailRequestParams -type SearchEmailRequestParams struct { - SearchEmailRequestParamsBase - - // Specifies the O365 specific params to search emails. - O365Params *O365SearchEmailsRequestParams `json:"o365Params,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SearchEmailRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SearchEmailRequestParamsBase - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SearchEmailRequestParamsBase = aO0 - - // AO1 - var dataAO1 struct { - O365Params *O365SearchEmailsRequestParams `json:"o365Params,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.O365Params = dataAO1.O365Params - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SearchEmailRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.SearchEmailRequestParamsBase) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - O365Params *O365SearchEmailsRequestParams `json:"o365Params,omitempty"` - } - - dataAO1.O365Params = m.O365Params - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this search email request params -func (m *SearchEmailRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchEmailRequestParamsBase - if err := m.SearchEmailRequestParamsBase.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchEmailRequestParams) validateO365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search email request params based on the context it is used -func (m *SearchEmailRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchEmailRequestParamsBase - if err := m.SearchEmailRequestParamsBase.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchEmailRequestParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchEmailRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchEmailRequestParams) UnmarshalBinary(b []byte) error { - var res SearchEmailRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_email_request_params_base.go b/v2/models/search_email_request_params_base.go deleted file mode 100644 index 9199c5bb..00000000 --- a/v2/models/search_email_request_params_base.go +++ /dev/null @@ -1,264 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchEmailRequestParamsBase Search emails request params. -// -// Specifies the request parameters to search for mailbox items and folders. -// -// swagger:model SearchEmailRequestParamsBase -type SearchEmailRequestParamsBase struct { - - // Specifies a list of mailbox item types. Only items within the given types will be returned. - // Unique: true - Types []string `json:"types"` - - // Filters the emails which have attachment. - HasAttachment *bool `json:"hasAttachment,omitempty"` - - // Filters the emails which are received from specified User's email address. - SenderAddress *string `json:"senderAddress,omitempty"` - - // Filters the emails which are sent to specified email addresses. - RecipientAddresses []string `json:"recipientAddresses"` - - // Filters the emails which are sent to specified email addresses in CC. - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - // Filters the emails which are sent to specified email addresses in BCC. - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - // Specifies the start time in Unix timestamp epoch in seconds where the received time of the email is more than specified value. - ReceivedStartTimeSecs *int64 `json:"receivedStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds where the received time of the email is less than specified value. - ReceivedEndTimeSecs *int64 `json:"receivedEndTimeSecs,omitempty"` - - // Filters the emails which have the specified text in its subject. - EmailSubject *string `json:"emailSubject,omitempty"` - - // Filters the emails which are categorized to specified folders. - FolderNames []string `json:"folderNames"` - - // Specifies the source environment. - // Enum: ["kO365"] - SourceEnvironment *string `json:"sourceEnvironment,omitempty"` - - // Specifies the start time in Unix timestamp epoch in seconds where the created time of the email/item is more than specified value. - CreatedStartTimeSecs *int64 `json:"createdStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds where the created time of the email/item is less than specified value. - CreatedEndTimeSecs *int64 `json:"createdEndTimeSecs,omitempty"` - - // Specifies the start time in Unix timestamp epoch in seconds where the last modification time of the email/item is more than specified value. - LastModifiedStartTimeSecs *int64 `json:"lastModifiedStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds where the last modification time of the email/item is less than specified value. - LastModifiedEndTimeSecs *int64 `json:"lastModifiedEndTimeSecs,omitempty"` - - // Filters the calendar items which are organized by specified User's email address. - OrganizerAddress *string `json:"organizerAddress,omitempty"` - - // Filters the calendar items which have specified email addresses as attendees. - AttendeesAddresses []string `json:"attendeesAddresses"` - - // Filters the contacts with specified text in first name. - FirstName *string `json:"firstName,omitempty"` - - // Filters the contacts with specified text in middle name. - MiddleName *string `json:"middleName,omitempty"` - - // Filters the contacts with specified text in last name. - LastName *string `json:"lastName,omitempty"` - - // Filters the contact items which have specified text in email address. - EmailAddress *string `json:"emailAddress,omitempty"` - - // Specifies the start time in Unix timestamp epoch in seconds where the last modification time of the email/item is more than specified value. - DueDateStartTimeSecs *int64 `json:"dueDateStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds where the last modification time of the email/item is less than specified value. - DueDateEndTimeSecs *int64 `json:"dueDateEndTimeSecs,omitempty"` - - // Specifies a list of task item status types. Task items having status within the given types will be returned. - // Unique: true - TaskStatusTypes []string `json:"taskStatusTypes"` -} - -// Validate validates this search email request params base -func (m *SearchEmailRequestParamsBase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTaskStatusTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var searchEmailRequestParamsBaseTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Email","Folder","Calendar","Contact","Task","Note"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchEmailRequestParamsBaseTypesItemsEnum = append(searchEmailRequestParamsBaseTypesItemsEnum, v) - } -} - -func (m *SearchEmailRequestParamsBase) validateTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchEmailRequestParamsBaseTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchEmailRequestParamsBase) validateTypes(formats strfmt.Registry) error { - if swag.IsZero(m.Types) { // not required - return nil - } - - if err := validate.UniqueItems("types", "body", m.Types); err != nil { - return err - } - - for i := 0; i < len(m.Types); i++ { - - // value enum - if err := m.validateTypesItemsEnum("types"+"."+strconv.Itoa(i), "body", m.Types[i]); err != nil { - return err - } - - } - - return nil -} - -var searchEmailRequestParamsBaseTypeSourceEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kO365"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchEmailRequestParamsBaseTypeSourceEnvironmentPropEnum = append(searchEmailRequestParamsBaseTypeSourceEnvironmentPropEnum, v) - } -} - -const ( - - // SearchEmailRequestParamsBaseSourceEnvironmentKO365 captures enum value "kO365" - SearchEmailRequestParamsBaseSourceEnvironmentKO365 string = "kO365" -) - -// prop value enum -func (m *SearchEmailRequestParamsBase) validateSourceEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchEmailRequestParamsBaseTypeSourceEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchEmailRequestParamsBase) validateSourceEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.SourceEnvironment) { // not required - return nil - } - - // value enum - if err := m.validateSourceEnvironmentEnum("sourceEnvironment", "body", *m.SourceEnvironment); err != nil { - return err - } - - return nil -} - -var searchEmailRequestParamsBaseTaskStatusTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotStarted","InProgress","Completed","WaitingOnOthers","Deferred"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchEmailRequestParamsBaseTaskStatusTypesItemsEnum = append(searchEmailRequestParamsBaseTaskStatusTypesItemsEnum, v) - } -} - -func (m *SearchEmailRequestParamsBase) validateTaskStatusTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchEmailRequestParamsBaseTaskStatusTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchEmailRequestParamsBase) validateTaskStatusTypes(formats strfmt.Registry) error { - if swag.IsZero(m.TaskStatusTypes) { // not required - return nil - } - - if err := validate.UniqueItems("taskStatusTypes", "body", m.TaskStatusTypes); err != nil { - return err - } - - for i := 0; i < len(m.TaskStatusTypes); i++ { - - // value enum - if err := m.validateTaskStatusTypesItemsEnum("taskStatusTypes"+"."+strconv.Itoa(i), "body", m.TaskStatusTypes[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this search email request params base based on context it is used -func (m *SearchEmailRequestParamsBase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchEmailRequestParamsBase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchEmailRequestParamsBase) UnmarshalBinary(b []byte) error { - var res SearchEmailRequestParamsBase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_exchange_objects_request_params.go b/v2/models/search_exchange_objects_request_params.go deleted file mode 100644 index a058a296..00000000 --- a/v2/models/search_exchange_objects_request_params.go +++ /dev/null @@ -1,71 +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" -) - -// SearchExchangeObjectsRequestParams Specifies the parameters which are specific for searching Exchange mailboxes. -// -// swagger:model SearchExchangeObjectsRequestParams -type SearchExchangeObjectsRequestParams struct { - - // Specifies the search string to search the Exchange Objects - // Required: true - SearchString *string `json:"searchString"` -} - -// Validate validates this search exchange objects request params -func (m *SearchExchangeObjectsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchExchangeObjectsRequestParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this search exchange objects request params based on context it is used -func (m *SearchExchangeObjectsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchExchangeObjectsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchExchangeObjectsRequestParams) UnmarshalBinary(b []byte) error { - var res SearchExchangeObjectsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_file_request_params.go b/v2/models/search_file_request_params.go deleted file mode 100644 index 42c88ff3..00000000 --- a/v2/models/search_file_request_params.go +++ /dev/null @@ -1,141 +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" -) - -// SearchFileRequestParams Search files request params. -// -// Specifies the request parameters to search for files and file folders. -// -// swagger:model SearchFileRequestParams -type SearchFileRequestParams struct { - SearchFileRequestParamsBase - - OnPremSourceIds - - OnPremObjectIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SearchFileRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SearchFileRequestParamsBase - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SearchFileRequestParamsBase = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - // AO2 - var aO2 OnPremObjectIds - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.OnPremObjectIds = aO2 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SearchFileRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.SearchFileRequestParamsBase) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.OnPremObjectIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this search file request params -func (m *SearchFileRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchFileRequestParamsBase - if err := m.SearchFileRequestParamsBase.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremObjectIds - if err := m.OnPremObjectIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this search file request params based on the context it is used -func (m *SearchFileRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SearchFileRequestParamsBase - if err := m.SearchFileRequestParamsBase.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremObjectIds - if err := m.OnPremObjectIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SearchFileRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchFileRequestParams) UnmarshalBinary(b []byte) error { - var res SearchFileRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_file_request_params_base.go b/v2/models/search_file_request_params_base.go deleted file mode 100644 index 4c7e7cc5..00000000 --- a/v2/models/search_file_request_params_base.go +++ /dev/null @@ -1,152 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchFileRequestParamsBase Search files request params. -// -// Specifies the request parameters to search for files and file folders. -// -// swagger:model SearchFileRequestParamsBase -type SearchFileRequestParamsBase struct { - - // Specifies the search string to filter the files. User can specify a wildcard character '*' as a suffix to a string where all files name are matched with the prefix string. - SearchString *string `json:"searchString,omitempty"` - - // Specifies a list of file types. Only files within the given types will be returned. - // Unique: true - Types []string `json:"types"` - - // Specifies a list of the source environments. Only files from these types of source will be returned. - SourceEnvironments []string `json:"sourceEnvironments"` -} - -// Validate validates this search file request params base -func (m *SearchFileRequestParamsBase) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceEnvironments(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var searchFileRequestParamsBaseTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchFileRequestParamsBaseTypesItemsEnum = append(searchFileRequestParamsBaseTypesItemsEnum, v) - } -} - -func (m *SearchFileRequestParamsBase) validateTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchFileRequestParamsBaseTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchFileRequestParamsBase) validateTypes(formats strfmt.Registry) error { - if swag.IsZero(m.Types) { // not required - return nil - } - - if err := validate.UniqueItems("types", "body", m.Types); err != nil { - return err - } - - for i := 0; i < len(m.Types); i++ { - - // value enum - if err := m.validateTypesItemsEnum("types"+"."+strconv.Itoa(i), "body", m.Types[i]); err != nil { - return err - } - - } - - return nil -} - -var searchFileRequestParamsBaseSourceEnvironmentsItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kSQL","kView","kRemoteAdapter","kPhysical","kPhysicalFiles","kPure","kIbmFlashSystem","kAzure","kNetapp","kGenericNas","kAcropolis","kIsilon","kGPFS","kKVM","kAWS","kExchange","kOracle","kGCP","kFlashBlade","kO365","kHyperFlex","kKubernetes","kElastifile","kUDA","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchFileRequestParamsBaseSourceEnvironmentsItemsEnum = append(searchFileRequestParamsBaseSourceEnvironmentsItemsEnum, v) - } -} - -func (m *SearchFileRequestParamsBase) validateSourceEnvironmentsItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchFileRequestParamsBaseSourceEnvironmentsItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchFileRequestParamsBase) validateSourceEnvironments(formats strfmt.Registry) error { - if swag.IsZero(m.SourceEnvironments) { // not required - return nil - } - - for i := 0; i < len(m.SourceEnvironments); i++ { - - // value enum - if err := m.validateSourceEnvironmentsItemsEnum("sourceEnvironments"+"."+strconv.Itoa(i), "body", m.SourceEnvironments[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this search file request params base based on context it is used -func (m *SearchFileRequestParamsBase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchFileRequestParamsBase) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchFileRequestParamsBase) UnmarshalBinary(b []byte) error { - var res SearchFileRequestParamsBase - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_indexed_objects_request.go b/v2/models/search_indexed_objects_request.go deleted file mode 100644 index 87def020..00000000 --- a/v2/models/search_indexed_objects_request.go +++ /dev/null @@ -1,1068 +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" -) - -// SearchIndexedObjectsRequest Search indexed objects request params. -// -// Specifies the request parameters to search for indexed objects. -// -// swagger:model SearchIndexedObjectsRequest -type SearchIndexedObjectsRequest struct { - CommonSearchIndexedObjectsRequestParams - - // Specifies the parameters which are specific for searching emails and email folders. - EmailParams *SearchEmailRequestParams `json:"emailParams,omitempty"` - - // Specifies the parameters which are specific for searching files and file folders. - FileParams *SearchFileRequestParams `json:"fileParams,omitempty"` - - // cassandra params - CassandraParams *CassandraOnPremSearchParams `json:"cassandraParams,omitempty"` - - // couchbase params - CouchbaseParams *CouchBaseOnPremSearchParams `json:"couchbaseParams,omitempty"` - - // hbase params - HbaseParams *HbaseOnPremSearchParams `json:"hbaseParams,omitempty"` - - // hive params - HiveParams *HiveOnPremSearchParams `json:"hiveParams,omitempty"` - - // mongodb params - MongodbParams *MongoDbOnPremSearchParams `json:"mongodbParams,omitempty"` - - // hdfs params - HdfsParams *HDFSOnPremSearchParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters which are specific for searching Exchange mailboxes. - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - // Specifies the parameters which are specific for searching Public folder items. - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - // Specifies the parameters which are specific for searching Microsoft365 Group items. - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - // Specifies the parameters which are specific for searching Microsoft365 Teams items. - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - // Specifies the parameters which are specific for searching files/folders in a document library in a Sharepoint site. - SharepointParams *SearchDocumentLibraryRequestParams `json:"sharepointParams,omitempty"` - - // Specifies the parameters which are specific for searching files/folders in a document library in a OneDrive. - OneDriveParams *SearchDocumentLibraryRequestParams `json:"oneDriveParams,omitempty"` - - // Specifies the parameters which are specific for searching Universal Data Adapter objects. - UdaParams *UdaOnPremSearchParams `json:"udaParams,omitempty"` - - // Specifies the parameters which are specific for searching records related to a salesforce Object. - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SearchIndexedObjectsRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSearchIndexedObjectsRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSearchIndexedObjectsRequestParams = aO0 - - // AO1 - var dataAO1 struct { - EmailParams *SearchEmailRequestParams `json:"emailParams,omitempty"` - - FileParams *SearchFileRequestParams `json:"fileParams,omitempty"` - - CassandraParams *CassandraOnPremSearchParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchBaseOnPremSearchParams `json:"couchbaseParams,omitempty"` - - HbaseParams *HbaseOnPremSearchParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveOnPremSearchParams `json:"hiveParams,omitempty"` - - MongodbParams *MongoDbOnPremSearchParams `json:"mongodbParams,omitempty"` - - HdfsParams *HDFSOnPremSearchParams `json:"hdfsParams,omitempty"` - - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - SharepointParams *SearchDocumentLibraryRequestParams `json:"sharepointParams,omitempty"` - - OneDriveParams *SearchDocumentLibraryRequestParams `json:"oneDriveParams,omitempty"` - - UdaParams *UdaOnPremSearchParams `json:"udaParams,omitempty"` - - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.EmailParams = dataAO1.EmailParams - - m.FileParams = dataAO1.FileParams - - m.CassandraParams = dataAO1.CassandraParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HiveParams = dataAO1.HiveParams - - m.MongodbParams = dataAO1.MongodbParams - - m.HdfsParams = dataAO1.HdfsParams - - m.ExchangeParams = dataAO1.ExchangeParams - - m.PublicFolderParams = dataAO1.PublicFolderParams - - m.MsGroupsParams = dataAO1.MsGroupsParams - - m.MsTeamsParams = dataAO1.MsTeamsParams - - m.SharepointParams = dataAO1.SharepointParams - - m.OneDriveParams = dataAO1.OneDriveParams - - m.UdaParams = dataAO1.UdaParams - - m.SfdcParams = dataAO1.SfdcParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SearchIndexedObjectsRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSearchIndexedObjectsRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - EmailParams *SearchEmailRequestParams `json:"emailParams,omitempty"` - - FileParams *SearchFileRequestParams `json:"fileParams,omitempty"` - - CassandraParams *CassandraOnPremSearchParams `json:"cassandraParams,omitempty"` - - CouchbaseParams *CouchBaseOnPremSearchParams `json:"couchbaseParams,omitempty"` - - HbaseParams *HbaseOnPremSearchParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveOnPremSearchParams `json:"hiveParams,omitempty"` - - MongodbParams *MongoDbOnPremSearchParams `json:"mongodbParams,omitempty"` - - HdfsParams *HDFSOnPremSearchParams `json:"hdfsParams,omitempty"` - - ExchangeParams *SearchExchangeObjectsRequestParams `json:"exchangeParams,omitempty"` - - PublicFolderParams *SearchPublicFolderRequestParams `json:"publicFolderParams,omitempty"` - - MsGroupsParams *SearchMsGroupsRequestParams `json:"msGroupsParams,omitempty"` - - MsTeamsParams *SearchMsTeamsRequestParams `json:"msTeamsParams,omitempty"` - - SharepointParams *SearchDocumentLibraryRequestParams `json:"sharepointParams,omitempty"` - - OneDriveParams *SearchDocumentLibraryRequestParams `json:"oneDriveParams,omitempty"` - - UdaParams *UdaOnPremSearchParams `json:"udaParams,omitempty"` - - SfdcParams *SearchSfdcRecordsRequestParams `json:"sfdcParams,omitempty"` - } - - dataAO1.EmailParams = m.EmailParams - - dataAO1.FileParams = m.FileParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.ExchangeParams = m.ExchangeParams - - dataAO1.PublicFolderParams = m.PublicFolderParams - - dataAO1.MsGroupsParams = m.MsGroupsParams - - dataAO1.MsTeamsParams = m.MsTeamsParams - - dataAO1.SharepointParams = m.SharepointParams - - dataAO1.OneDriveParams = m.OneDriveParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.SfdcParams = m.SfdcParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this search indexed objects request -func (m *SearchIndexedObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSearchIndexedObjectsRequestParams - if err := m.CommonSearchIndexedObjectsRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmailParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsGroupsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsTeamsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchIndexedObjectsRequest) validateEmailParams(formats strfmt.Registry) error { - - if swag.IsZero(m.EmailParams) { // not required - return nil - } - - if m.EmailParams != nil { - if err := m.EmailParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateFileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FileParams) { // not required - return nil - } - - if m.FileParams != nil { - if err := m.FileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateExchangeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if m.ExchangeParams != nil { - if err := m.ExchangeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validatePublicFolderParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PublicFolderParams) { // not required - return nil - } - - if m.PublicFolderParams != nil { - if err := m.PublicFolderParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateMsGroupsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MsGroupsParams) { // not required - return nil - } - - if m.MsGroupsParams != nil { - if err := m.MsGroupsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateMsTeamsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MsTeamsParams) { // not required - return nil - } - - if m.MsTeamsParams != nil { - if err := m.MsTeamsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateSharepointParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if m.SharepointParams != nil { - if err := m.SharepointParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateOneDriveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OneDriveParams) { // not required - return nil - } - - if m.OneDriveParams != nil { - if err := m.OneDriveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search indexed objects request based on the context it is used -func (m *SearchIndexedObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSearchIndexedObjectsRequestParams - if err := m.CommonSearchIndexedObjectsRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmailParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsGroupsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsTeamsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateEmailParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EmailParams != nil { - - if swag.IsZero(m.EmailParams) { // not required - return nil - } - - if err := m.EmailParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emailParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emailParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateFileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FileParams != nil { - - if swag.IsZero(m.FileParams) { // not required - return nil - } - - if err := m.FileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateExchangeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExchangeParams != nil { - - if swag.IsZero(m.ExchangeParams) { // not required - return nil - } - - if err := m.ExchangeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidatePublicFolderParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PublicFolderParams != nil { - - if swag.IsZero(m.PublicFolderParams) { // not required - return nil - } - - if err := m.PublicFolderParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateMsGroupsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MsGroupsParams != nil { - - if swag.IsZero(m.MsGroupsParams) { // not required - return nil - } - - if err := m.MsGroupsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateMsTeamsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MsTeamsParams != nil { - - if swag.IsZero(m.MsTeamsParams) { // not required - return nil - } - - if err := m.MsTeamsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msTeamsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msTeamsParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateSharepointParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SharepointParams != nil { - - if swag.IsZero(m.SharepointParams) { // not required - return nil - } - - if err := m.SharepointParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateOneDriveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OneDriveParams != nil { - - if swag.IsZero(m.OneDriveParams) { // not required - return nil - } - - if err := m.OneDriveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsRequest) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchIndexedObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchIndexedObjectsRequest) UnmarshalBinary(b []byte) error { - var res SearchIndexedObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_indexed_objects_response_body.go b/v2/models/search_indexed_objects_response_body.go deleted file mode 100644 index 4409e1f1..00000000 --- a/v2/models/search_indexed_objects_response_body.go +++ /dev/null @@ -1,933 +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" -) - -// SearchIndexedObjectsResponseBody Search Indexed objects response body. -// -// Specifies the search indexed objects response body. -// -// swagger:model SearchIndexedObjectsResponseBody -type SearchIndexedObjectsResponseBody struct { - CommonSearchIndexedObjectsResponseParams - - // emails - Emails Emails `json:"emails,omitempty"` - - // files - Files Files `json:"files,omitempty"` - - // cassandra objects - CassandraObjects CassandraIndexedObjects `json:"cassandraObjects,omitempty"` - - // couchbase objects - CouchbaseObjects CouchbaseIndexedObjects `json:"couchbaseObjects,omitempty"` - - // hbase objects - HbaseObjects HbaseIndexedObjects `json:"hbaseObjects,omitempty"` - - // hive objects - HiveObjects HiveIndexedObjects `json:"hiveObjects,omitempty"` - - // mongo objects - MongoObjects MongoIndexedObjects `json:"mongoObjects,omitempty"` - - // hdfs objects - HdfsObjects HDFSIndexedObjects `json:"hdfsObjects,omitempty"` - - // exchange objects - ExchangeObjects ExchangeIndexedObjects `json:"exchangeObjects,omitempty"` - - // public folder items - PublicFolderItems PublicFolderItems `json:"publicFolderItems,omitempty"` - - // sharepoint items - SharepointItems SharepointItems `json:"sharepointItems,omitempty"` - - // one drive items - OneDriveItems OneDriveItems `json:"oneDriveItems,omitempty"` - - // uda objects - UdaObjects UdaIndexedObjects `json:"udaObjects,omitempty"` - - // teams items - TeamsItems TeamsItems `json:"teamsItems,omitempty"` - - // sfdc records - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` - - // ms group items - MsGroupItems MsGroupItems `json:"msGroupItems,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SearchIndexedObjectsResponseBody) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSearchIndexedObjectsResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSearchIndexedObjectsResponseParams = aO0 - - // AO1 - var dataAO1 struct { - Emails Emails `json:"emails,omitempty"` - - Files Files `json:"files,omitempty"` - - CassandraObjects CassandraIndexedObjects `json:"cassandraObjects,omitempty"` - - CouchbaseObjects CouchbaseIndexedObjects `json:"couchbaseObjects,omitempty"` - - HbaseObjects HbaseIndexedObjects `json:"hbaseObjects,omitempty"` - - HiveObjects HiveIndexedObjects `json:"hiveObjects,omitempty"` - - MongoObjects MongoIndexedObjects `json:"mongoObjects,omitempty"` - - HdfsObjects HDFSIndexedObjects `json:"hdfsObjects,omitempty"` - - ExchangeObjects ExchangeIndexedObjects `json:"exchangeObjects,omitempty"` - - PublicFolderItems PublicFolderItems `json:"publicFolderItems,omitempty"` - - SharepointItems SharepointItems `json:"sharepointItems,omitempty"` - - OneDriveItems OneDriveItems `json:"oneDriveItems,omitempty"` - - UdaObjects UdaIndexedObjects `json:"udaObjects,omitempty"` - - TeamsItems TeamsItems `json:"teamsItems,omitempty"` - - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` - - MsGroupItems MsGroupItems `json:"msGroupItems,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Emails = dataAO1.Emails - - m.Files = dataAO1.Files - - m.CassandraObjects = dataAO1.CassandraObjects - - m.CouchbaseObjects = dataAO1.CouchbaseObjects - - m.HbaseObjects = dataAO1.HbaseObjects - - m.HiveObjects = dataAO1.HiveObjects - - m.MongoObjects = dataAO1.MongoObjects - - m.HdfsObjects = dataAO1.HdfsObjects - - m.ExchangeObjects = dataAO1.ExchangeObjects - - m.PublicFolderItems = dataAO1.PublicFolderItems - - m.SharepointItems = dataAO1.SharepointItems - - m.OneDriveItems = dataAO1.OneDriveItems - - m.UdaObjects = dataAO1.UdaObjects - - m.TeamsItems = dataAO1.TeamsItems - - m.SfdcRecords = dataAO1.SfdcRecords - - m.MsGroupItems = dataAO1.MsGroupItems - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SearchIndexedObjectsResponseBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSearchIndexedObjectsResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Emails Emails `json:"emails,omitempty"` - - Files Files `json:"files,omitempty"` - - CassandraObjects CassandraIndexedObjects `json:"cassandraObjects,omitempty"` - - CouchbaseObjects CouchbaseIndexedObjects `json:"couchbaseObjects,omitempty"` - - HbaseObjects HbaseIndexedObjects `json:"hbaseObjects,omitempty"` - - HiveObjects HiveIndexedObjects `json:"hiveObjects,omitempty"` - - MongoObjects MongoIndexedObjects `json:"mongoObjects,omitempty"` - - HdfsObjects HDFSIndexedObjects `json:"hdfsObjects,omitempty"` - - ExchangeObjects ExchangeIndexedObjects `json:"exchangeObjects,omitempty"` - - PublicFolderItems PublicFolderItems `json:"publicFolderItems,omitempty"` - - SharepointItems SharepointItems `json:"sharepointItems,omitempty"` - - OneDriveItems OneDriveItems `json:"oneDriveItems,omitempty"` - - UdaObjects UdaIndexedObjects `json:"udaObjects,omitempty"` - - TeamsItems TeamsItems `json:"teamsItems,omitempty"` - - SfdcRecords *SfdcRecords `json:"sfdcRecords,omitempty"` - - MsGroupItems MsGroupItems `json:"msGroupItems,omitempty"` - } - - dataAO1.Emails = m.Emails - - dataAO1.Files = m.Files - - dataAO1.CassandraObjects = m.CassandraObjects - - dataAO1.CouchbaseObjects = m.CouchbaseObjects - - dataAO1.HbaseObjects = m.HbaseObjects - - dataAO1.HiveObjects = m.HiveObjects - - dataAO1.MongoObjects = m.MongoObjects - - dataAO1.HdfsObjects = m.HdfsObjects - - dataAO1.ExchangeObjects = m.ExchangeObjects - - dataAO1.PublicFolderItems = m.PublicFolderItems - - dataAO1.SharepointItems = m.SharepointItems - - dataAO1.OneDriveItems = m.OneDriveItems - - dataAO1.UdaObjects = m.UdaObjects - - dataAO1.TeamsItems = m.TeamsItems - - dataAO1.SfdcRecords = m.SfdcRecords - - dataAO1.MsGroupItems = m.MsGroupItems - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this search indexed objects response body -func (m *SearchIndexedObjectsResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSearchIndexedObjectsResponseParams - if err := m.CommonSearchIndexedObjectsResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEmails(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongoObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExchangeObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePublicFolderItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSharepointItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOneDriveItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTeamsItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcRecords(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMsGroupItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateEmails(formats strfmt.Registry) error { - - if swag.IsZero(m.Emails) { // not required - return nil - } - - if err := m.Emails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emails") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateFiles(formats strfmt.Registry) error { - - if swag.IsZero(m.Files) { // not required - return nil - } - - if err := m.Files.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateCassandraObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraObjects) { // not required - return nil - } - - if err := m.CassandraObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateCouchbaseObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseObjects) { // not required - return nil - } - - if err := m.CouchbaseObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateHbaseObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseObjects) { // not required - return nil - } - - if err := m.HbaseObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateHiveObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveObjects) { // not required - return nil - } - - if err := m.HiveObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateMongoObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.MongoObjects) { // not required - return nil - } - - if err := m.MongoObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongoObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongoObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateHdfsObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsObjects) { // not required - return nil - } - - if err := m.HdfsObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateExchangeObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.ExchangeObjects) { // not required - return nil - } - - if err := m.ExchangeObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validatePublicFolderItems(formats strfmt.Registry) error { - - if swag.IsZero(m.PublicFolderItems) { // not required - return nil - } - - if err := m.PublicFolderItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateSharepointItems(formats strfmt.Registry) error { - - if swag.IsZero(m.SharepointItems) { // not required - return nil - } - - if err := m.SharepointItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateOneDriveItems(formats strfmt.Registry) error { - - if swag.IsZero(m.OneDriveItems) { // not required - return nil - } - - if err := m.OneDriveItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateUdaObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaObjects) { // not required - return nil - } - - if err := m.UdaObjects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateTeamsItems(formats strfmt.Registry) error { - - if swag.IsZero(m.TeamsItems) { // not required - return nil - } - - if err := m.TeamsItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateSfdcRecords(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcRecords) { // not required - return nil - } - - if m.SfdcRecords != nil { - if err := m.SfdcRecords.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecords") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecords") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) validateMsGroupItems(formats strfmt.Registry) error { - - if swag.IsZero(m.MsGroupItems) { // not required - return nil - } - - if err := m.MsGroupItems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupItems") - } - return err - } - - return nil -} - -// ContextValidate validate this search indexed objects response body based on the context it is used -func (m *SearchIndexedObjectsResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSearchIndexedObjectsResponseParams - if err := m.CommonSearchIndexedObjectsResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEmails(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongoObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExchangeObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePublicFolderItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSharepointItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOneDriveItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTeamsItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcRecords(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMsGroupItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateEmails(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Emails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("emails") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("emails") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Files.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateCassandraObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.CassandraObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateCouchbaseObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.CouchbaseObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateHbaseObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HbaseObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateHiveObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HiveObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateMongoObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.MongoObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongoObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongoObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateHdfsObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.HdfsObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateExchangeObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.ExchangeObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidatePublicFolderItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.PublicFolderItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicFolderItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("publicFolderItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateSharepointItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.SharepointItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharepointItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharepointItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateOneDriveItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.OneDriveItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oneDriveItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oneDriveItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateUdaObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.UdaObjects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaObjects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaObjects") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateTeamsItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.TeamsItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("teamsItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("teamsItems") - } - return err - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateSfdcRecords(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcRecords != nil { - - if swag.IsZero(m.SfdcRecords) { // not required - return nil - } - - if err := m.SfdcRecords.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcRecords") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcRecords") - } - return err - } - } - - return nil -} - -func (m *SearchIndexedObjectsResponseBody) contextValidateMsGroupItems(ctx context.Context, formats strfmt.Registry) error { - - if err := m.MsGroupItems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("msGroupItems") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("msGroupItems") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchIndexedObjectsResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchIndexedObjectsResponseBody) UnmarshalBinary(b []byte) error { - var res SearchIndexedObjectsResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_ms_groups_request_params.go b/v2/models/search_ms_groups_request_params.go deleted file mode 100644 index 9a3ba36c..00000000 --- a/v2/models/search_ms_groups_request_params.go +++ /dev/null @@ -1,213 +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" -) - -// SearchMsGroupsRequestParams Search Groups request params. -// -// Specifies the request params to search for Groups items. -// -// swagger:model SearchMsGroupsRequestParams -type SearchMsGroupsRequestParams struct { - - // Specifies the params to search MS group mailbox indexed items. - MailboxParams *SearchEmailRequestParamsBase `json:"mailboxParams,omitempty"` - - // Specifies the params to search MS group site indexed items. - SiteParams *SearchDocumentLibraryRequestParams `json:"siteParams,omitempty"` - - // Specifies the O365 specific params to search MS group indexed items. - O365Params *O365SearchRequestParams `json:"o365Params,omitempty"` -} - -// Validate validates this search ms groups request params -func (m *SearchMsGroupsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMailboxParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSiteParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchMsGroupsRequestParams) validateMailboxParams(formats strfmt.Registry) error { - if swag.IsZero(m.MailboxParams) { // not required - return nil - } - - if m.MailboxParams != nil { - if err := m.MailboxParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsGroupsRequestParams) validateSiteParams(formats strfmt.Registry) error { - if swag.IsZero(m.SiteParams) { // not required - return nil - } - - if m.SiteParams != nil { - if err := m.SiteParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsGroupsRequestParams) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search ms groups request params based on the context it is used -func (m *SearchMsGroupsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMailboxParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSiteParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchMsGroupsRequestParams) contextValidateMailboxParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MailboxParams != nil { - - if swag.IsZero(m.MailboxParams) { // not required - return nil - } - - if err := m.MailboxParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mailboxParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mailboxParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsGroupsRequestParams) contextValidateSiteParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SiteParams != nil { - - if swag.IsZero(m.SiteParams) { // not required - return nil - } - - if err := m.SiteParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("siteParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("siteParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsGroupsRequestParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchMsGroupsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchMsGroupsRequestParams) UnmarshalBinary(b []byte) error { - var res SearchMsGroupsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_ms_teams_request_params.go b/v2/models/search_ms_teams_request_params.go deleted file mode 100644 index cc1d772f..00000000 --- a/v2/models/search_ms_teams_request_params.go +++ /dev/null @@ -1,282 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchMsTeamsRequestParams Search Teams request params. -// -// Specifies the request params to search for Teams items. -// -// swagger:model SearchMsTeamsRequestParams -type SearchMsTeamsRequestParams struct { - - // Specifies the search string to filter the items. User can specify a wildcard character '*' as a suffix to a string where all item names are matched with the prefix string. - SearchString *string `json:"searchString,omitempty"` - - // Specifies a list of Teams item types. Only items within the given types will be returned. - // Unique: true - Types []string `json:"types"` - - // Specifies a list of teams files types. Only items within the given types will be returned. - // Unique: true - CategoryTypes []string `json:"categoryTypes"` - - // Specifies the start time in Unix timestamp epoch in seconds when the item is created. - CreationStartTimeSecs *int64 `json:"creationStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds when the item is created. - CreationEndTimeSecs *int64 `json:"creationEndTimeSecs,omitempty"` - - // Specifies the minimum size of the item in bytes. - SizeBytesLowerLimit *int64 `json:"sizeBytesLowerLimit,omitempty"` - - // Specifies the maximum size of the item in bytes. - SizeBytesUpperLimit *int64 `json:"sizeBytesUpperLimit,omitempty"` - - // Specifies the list of owner email ids to filter on owner of the item. - OwnerNames []string `json:"ownerNames"` - - // Specifies the list of channel names to filter while doing search for files. - ChannelNames []string `json:"channelNames"` - - // Specifies the channel specific params to search for indexed items. - ChannelParams *O365TeamsChannelsSearchRequestParams `json:"channelParams,omitempty"` - - // Specifies the Microsoft365 specific params to search for indexed items. - O365Params *O365SearchRequestParams `json:"o365Params,omitempty"` -} - -// Validate validates this search ms teams request params -func (m *SearchMsTeamsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCategoryTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChannelParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateO365Params(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var searchMsTeamsRequestParamsTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Channel","Chat","Conversation","File","Folder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchMsTeamsRequestParamsTypesItemsEnum = append(searchMsTeamsRequestParamsTypesItemsEnum, v) - } -} - -func (m *SearchMsTeamsRequestParams) validateTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchMsTeamsRequestParamsTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchMsTeamsRequestParams) validateTypes(formats strfmt.Registry) error { - if swag.IsZero(m.Types) { // not required - return nil - } - - if err := validate.UniqueItems("types", "body", m.Types); err != nil { - return err - } - - for i := 0; i < len(m.Types); i++ { - - // value enum - if err := m.validateTypesItemsEnum("types"+"."+strconv.Itoa(i), "body", m.Types[i]); err != nil { - return err - } - - } - - return nil -} - -var searchMsTeamsRequestParamsCategoryTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Document","Excel","Powerpoint","Image","OneNote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchMsTeamsRequestParamsCategoryTypesItemsEnum = append(searchMsTeamsRequestParamsCategoryTypesItemsEnum, v) - } -} - -func (m *SearchMsTeamsRequestParams) validateCategoryTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchMsTeamsRequestParamsCategoryTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchMsTeamsRequestParams) validateCategoryTypes(formats strfmt.Registry) error { - if swag.IsZero(m.CategoryTypes) { // not required - return nil - } - - if err := validate.UniqueItems("categoryTypes", "body", m.CategoryTypes); err != nil { - return err - } - - for i := 0; i < len(m.CategoryTypes); i++ { - - // value enum - if err := m.validateCategoryTypesItemsEnum("categoryTypes"+"."+strconv.Itoa(i), "body", m.CategoryTypes[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchMsTeamsRequestParams) validateChannelParams(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelParams) { // not required - return nil - } - - if m.ChannelParams != nil { - if err := m.ChannelParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsTeamsRequestParams) validateO365Params(formats strfmt.Registry) error { - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if m.O365Params != nil { - if err := m.O365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search ms teams request params based on the context it is used -func (m *SearchMsTeamsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChannelParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateO365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchMsTeamsRequestParams) contextValidateChannelParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ChannelParams != nil { - - if swag.IsZero(m.ChannelParams) { // not required - return nil - } - - if err := m.ChannelParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelParams") - } - return err - } - } - - return nil -} - -func (m *SearchMsTeamsRequestParams) contextValidateO365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.O365Params != nil { - - if swag.IsZero(m.O365Params) { // not required - return nil - } - - if err := m.O365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("o365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("o365Params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchMsTeamsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchMsTeamsRequestParams) UnmarshalBinary(b []byte) error { - var res SearchMsTeamsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_object.go b/v2/models/search_object.go deleted file mode 100644 index 1e25df6c..00000000 --- a/v2/models/search_object.go +++ /dev/null @@ -1,261 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SearchObject Specifies an object. -// -// swagger:model SearchObject -type SearchObject struct { - Object - - TagObject - - // Specifies the object info on each cluster. - ObjectProtectionInfos []*ObjectProtectionInfo `json:"objectProtectionInfos"` - - // Specifies the Source Object information. - SourceInfo *Object `json:"sourceInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SearchObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Object - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Object = aO0 - - // AO1 - var aO1 TagObject - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.TagObject = aO1 - - // AO2 - var dataAO2 struct { - ObjectProtectionInfos []*ObjectProtectionInfo `json:"objectProtectionInfos"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.ObjectProtectionInfos = dataAO2.ObjectProtectionInfos - - m.SourceInfo = dataAO2.SourceInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SearchObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.Object) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.TagObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - ObjectProtectionInfos []*ObjectProtectionInfo `json:"objectProtectionInfos"` - - SourceInfo *Object `json:"sourceInfo,omitempty"` - } - - dataAO2.ObjectProtectionInfos = m.ObjectProtectionInfos - - dataAO2.SourceInfo = m.SourceInfo - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this search object -func (m *SearchObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with TagObject - if err := m.TagObject.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjectProtectionInfos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchObject) validateObjectProtectionInfos(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectProtectionInfos) { // not required - return nil - } - - for i := 0; i < len(m.ObjectProtectionInfos); i++ { - if swag.IsZero(m.ObjectProtectionInfos[i]) { // not required - continue - } - - if m.ObjectProtectionInfos[i] != nil { - if err := m.ObjectProtectionInfos[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SearchObject) validateSourceInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if m.SourceInfo != nil { - if err := m.SourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this search object based on the context it is used -func (m *SearchObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with TagObject - if err := m.TagObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectProtectionInfos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchObject) contextValidateObjectProtectionInfos(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ObjectProtectionInfos); i++ { - - if m.ObjectProtectionInfos[i] != nil { - - if swag.IsZero(m.ObjectProtectionInfos[i]) { // not required - return nil - } - - if err := m.ObjectProtectionInfos[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objectProtectionInfos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objectProtectionInfos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SearchObject) contextValidateSourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceInfo != nil { - - if swag.IsZero(m.SourceInfo) { // not required - return nil - } - - if err := m.SourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SearchObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchObject) UnmarshalBinary(b []byte) error { - var res SearchObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_public_folder_request_params.go b/v2/models/search_public_folder_request_params.go deleted file mode 100644 index 51e1d979..00000000 --- a/v2/models/search_public_folder_request_params.go +++ /dev/null @@ -1,207 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchPublicFolderRequestParams Search Public Folder request params. -// -// Specifies the request parameters to search for Public Folder items. -// -// swagger:model SearchPublicFolderRequestParams -type SearchPublicFolderRequestParams struct { - - // Specifies the search string to filter the items. User can specify a wildcard character '*' as a suffix to a string where all item names are matched with the prefix string. - SearchString *string `json:"searchString,omitempty"` - - // Specifies a list of public folder item types. Only items within the given types will be returned. - // Unique: true - Types []string `json:"types"` - - // Filters the public folder items which have attachment. - HasAttachment *bool `json:"hasAttachment,omitempty"` - - // Filters the public folder items which are received from specified user's email address. - // Pattern: ^\S+@\S+.\S+$ - SenderAddress *string `json:"senderAddress,omitempty"` - - // Filters the public folder items which are sent to specified email addresses. - RecipientAddresses []string `json:"recipientAddresses"` - - // Filters the public folder items which are sent to specified email addresses in CC. - CcRecipientAddresses []string `json:"ccRecipientAddresses"` - - // Filters the public folder items which are sent to specified email addresses in BCC. - BccRecipientAddresses []string `json:"bccRecipientAddresses"` - - // Specifies the start time in Unix timestamp epoch in seconds where the received time of the public folder item is more than specified value. - ReceivedStartTimeSecs *int64 `json:"receivedStartTimeSecs,omitempty"` - - // Specifies the end time in Unix timestamp epoch in seconds where the received time of the public folder items is less than specified value. - ReceivedEndTimeSecs *int64 `json:"receivedEndTimeSecs,omitempty"` -} - -// Validate validates this search public folder request params -func (m *SearchPublicFolderRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSenderAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecipientAddresses(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCcRecipientAddresses(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBccRecipientAddresses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var searchPublicFolderRequestParamsTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Calendar","Contact","Post","Folder","Task","Journal","Note"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchPublicFolderRequestParamsTypesItemsEnum = append(searchPublicFolderRequestParamsTypesItemsEnum, v) - } -} - -func (m *SearchPublicFolderRequestParams) validateTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchPublicFolderRequestParamsTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchPublicFolderRequestParams) validateTypes(formats strfmt.Registry) error { - if swag.IsZero(m.Types) { // not required - return nil - } - - if err := validate.UniqueItems("types", "body", m.Types); err != nil { - return err - } - - for i := 0; i < len(m.Types); i++ { - - // value enum - if err := m.validateTypesItemsEnum("types"+"."+strconv.Itoa(i), "body", m.Types[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchPublicFolderRequestParams) validateSenderAddress(formats strfmt.Registry) error { - if swag.IsZero(m.SenderAddress) { // not required - return nil - } - - if err := validate.Pattern("senderAddress", "body", *m.SenderAddress, `^\S+@\S+.\S+$`); err != nil { - return err - } - - return nil -} - -func (m *SearchPublicFolderRequestParams) validateRecipientAddresses(formats strfmt.Registry) error { - if swag.IsZero(m.RecipientAddresses) { // not required - return nil - } - - for i := 0; i < len(m.RecipientAddresses); i++ { - - if err := validate.Pattern("recipientAddresses"+"."+strconv.Itoa(i), "body", m.RecipientAddresses[i], `^\S+@\S+.\S+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchPublicFolderRequestParams) validateCcRecipientAddresses(formats strfmt.Registry) error { - if swag.IsZero(m.CcRecipientAddresses) { // not required - return nil - } - - for i := 0; i < len(m.CcRecipientAddresses); i++ { - - if err := validate.Pattern("ccRecipientAddresses"+"."+strconv.Itoa(i), "body", m.CcRecipientAddresses[i], `^\S+@\S+.\S+$`); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchPublicFolderRequestParams) validateBccRecipientAddresses(formats strfmt.Registry) error { - if swag.IsZero(m.BccRecipientAddresses) { // not required - return nil - } - - for i := 0; i < len(m.BccRecipientAddresses); i++ { - - if err := validate.Pattern("bccRecipientAddresses"+"."+strconv.Itoa(i), "body", m.BccRecipientAddresses[i], `^\S+@\S+.\S+$`); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this search public folder request params based on context it is used -func (m *SearchPublicFolderRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchPublicFolderRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchPublicFolderRequestParams) UnmarshalBinary(b []byte) error { - var res SearchPublicFolderRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/search_sfdc_records_request_params.go b/v2/models/search_sfdc_records_request_params.go deleted file mode 100644 index 957635c2..00000000 --- a/v2/models/search_sfdc_records_request_params.go +++ /dev/null @@ -1,143 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SearchSfdcRecordsRequestParams Specifies the parameters which are specific for searching Salesforce records. -// -// swagger:model SearchSfdcRecordsRequestParams -type SearchSfdcRecordsRequestParams struct { - - // Specifies the query string to search records. Query string can be one or multiples clauses joined together by 'AND' or 'OR' claused. - QueryString *string `json:"queryString,omitempty"` - - // Specifies the name of the object. - // Required: true - ObjectName *string `json:"objectName"` - - // Specifies a list of mutuation types for an object. - // Required: true - // Unique: true - MutationTypes []string `json:"mutationTypes"` - - // Specifies the id of the snapshot for the object. - // Required: true - SnapshotID *string `json:"snapshotId"` -} - -// Validate validates this search sfdc records request params -func (m *SearchSfdcRecordsRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMutationTypes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SearchSfdcRecordsRequestParams) validateObjectName(formats strfmt.Registry) error { - - if err := validate.Required("objectName", "body", m.ObjectName); err != nil { - return err - } - - return nil -} - -var searchSfdcRecordsRequestParamsMutationTypesItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["All","Added","Removed","Changed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - searchSfdcRecordsRequestParamsMutationTypesItemsEnum = append(searchSfdcRecordsRequestParamsMutationTypesItemsEnum, v) - } -} - -func (m *SearchSfdcRecordsRequestParams) validateMutationTypesItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, searchSfdcRecordsRequestParamsMutationTypesItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SearchSfdcRecordsRequestParams) validateMutationTypes(formats strfmt.Registry) error { - - if err := validate.Required("mutationTypes", "body", m.MutationTypes); err != nil { - return err - } - - if err := validate.UniqueItems("mutationTypes", "body", m.MutationTypes); err != nil { - return err - } - - for i := 0; i < len(m.MutationTypes); i++ { - - // value enum - if err := m.validateMutationTypesItemsEnum("mutationTypes"+"."+strconv.Itoa(i), "body", m.MutationTypes[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *SearchSfdcRecordsRequestParams) validateSnapshotID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotId", "body", m.SnapshotID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this search sfdc records request params based on context it is used -func (m *SearchSfdcRecordsRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SearchSfdcRecordsRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SearchSfdcRecordsRequestParams) UnmarshalBinary(b []byte) error { - var res SearchSfdcRecordsRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/secret_key_entity.go b/v2/models/secret_key_entity.go deleted file mode 100644 index 080bec25..00000000 --- a/v2/models/secret_key_entity.go +++ /dev/null @@ -1,71 +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" -) - -// SecretKeyEntity Specifies the new secret key instance generated for the user. -// -// swagger:model SecretKeyEntity -type SecretKeyEntity struct { - - // Specifies the new s3 secret key. - // Read Only: true - SecretKey *string `json:"secret-key,omitempty"` -} - -// Validate validates this secret key entity -func (m *SecretKeyEntity) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this secret key entity based on the context it is used -func (m *SecretKeyEntity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecretKey(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecretKeyEntity) contextValidateSecretKey(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "secret-key", "body", m.SecretKey); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SecretKeyEntity) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecretKeyEntity) UnmarshalBinary(b []byte) error { - var res SecretKeyEntity - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config.go b/v2/models/security_config.go deleted file mode 100644 index 690b7eae..00000000 --- a/v2/models/security_config.go +++ /dev/null @@ -1,473 +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" -) - -// SecurityConfig Specifies the fields of security settings. -// -// swagger:model SecurityConfig -type SecurityConfig struct { - - // Specifies security settings related to password strength. - PasswordStrength *SecurityConfigPasswordStrength `json:"passwordStrength,omitempty"` - - // Specifies security settings related to password reuse. - PasswordReuse *SecurityConfigPasswordReuse `json:"passwordReuse,omitempty"` - - // Specifies security settings related to password lifetime. - PasswordLifetime *SecurityConfigPasswordLifetime `json:"passwordLifetime,omitempty"` - - // Specifies security settings related to account lockout. - AccountLockout *SecurityConfigAccountLockout `json:"accountLockout,omitempty"` - - // Specifies security settings related to data classification. - DataClassification *SecurityConfigDataClassification `json:"dataClassification,omitempty"` - - // Specifies security settings related to user sessions. Applies only when session management is enabled. - SessionConfiguration *SecurityConfigSessionConfiguration `json:"sessionConfiguration,omitempty"` - - // "Specifies security settings related to certificate based - // authentication." - CertificateBasedAuth *SecurityConfigCertificateBasedAuth `json:"certificateBasedAuth,omitempty"` - - // Specifies the authentication token timeout in minutes. Applies both for API based access token and browser login cookie. - AuthTokenTimeoutMinutes *int32 `json:"authTokenTimeoutMinutes,omitempty"` - - // Specifies the UI inactivity timeout in milliseconds. Default value is 30 minutes. - InactivityTimeoutMSecs *int64 `json:"inactivityTimeoutMSecs,omitempty"` - - // "Specifies ssh configuration related to the cluster." - SSHConfiguration *SecurityConfigSSHConfiguration `json:"sshConfiguration,omitempty"` -} - -// Validate validates this security config -func (m *SecurityConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePasswordStrength(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePasswordReuse(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePasswordLifetime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAccountLockout(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataClassification(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSessionConfiguration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCertificateBasedAuth(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSSHConfiguration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfig) validatePasswordStrength(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordStrength) { // not required - return nil - } - - if m.PasswordStrength != nil { - if err := m.PasswordStrength.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordStrength") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordStrength") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validatePasswordReuse(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordReuse) { // not required - return nil - } - - if m.PasswordReuse != nil { - if err := m.PasswordReuse.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordReuse") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordReuse") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validatePasswordLifetime(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordLifetime) { // not required - return nil - } - - if m.PasswordLifetime != nil { - if err := m.PasswordLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordLifetime") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validateAccountLockout(formats strfmt.Registry) error { - if swag.IsZero(m.AccountLockout) { // not required - return nil - } - - if m.AccountLockout != nil { - if err := m.AccountLockout.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accountLockout") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accountLockout") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validateDataClassification(formats strfmt.Registry) error { - if swag.IsZero(m.DataClassification) { // not required - return nil - } - - if m.DataClassification != nil { - if err := m.DataClassification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataClassification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataClassification") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validateSessionConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.SessionConfiguration) { // not required - return nil - } - - if m.SessionConfiguration != nil { - if err := m.SessionConfiguration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionConfiguration") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validateCertificateBasedAuth(formats strfmt.Registry) error { - if swag.IsZero(m.CertificateBasedAuth) { // not required - return nil - } - - if m.CertificateBasedAuth != nil { - if err := m.CertificateBasedAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificateBasedAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificateBasedAuth") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) validateSSHConfiguration(formats strfmt.Registry) error { - if swag.IsZero(m.SSHConfiguration) { // not required - return nil - } - - if m.SSHConfiguration != nil { - if err := m.SSHConfiguration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshConfiguration") - } - return err - } - } - - return nil -} - -// ContextValidate validate this security config based on the context it is used -func (m *SecurityConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePasswordStrength(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePasswordReuse(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePasswordLifetime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAccountLockout(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataClassification(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSessionConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCertificateBasedAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSSHConfiguration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfig) contextValidatePasswordStrength(ctx context.Context, formats strfmt.Registry) error { - - if m.PasswordStrength != nil { - - if swag.IsZero(m.PasswordStrength) { // not required - return nil - } - - if err := m.PasswordStrength.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordStrength") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordStrength") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidatePasswordReuse(ctx context.Context, formats strfmt.Registry) error { - - if m.PasswordReuse != nil { - - if swag.IsZero(m.PasswordReuse) { // not required - return nil - } - - if err := m.PasswordReuse.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordReuse") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordReuse") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidatePasswordLifetime(ctx context.Context, formats strfmt.Registry) error { - - if m.PasswordLifetime != nil { - - if swag.IsZero(m.PasswordLifetime) { // not required - return nil - } - - if err := m.PasswordLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordLifetime") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidateAccountLockout(ctx context.Context, formats strfmt.Registry) error { - - if m.AccountLockout != nil { - - if swag.IsZero(m.AccountLockout) { // not required - return nil - } - - if err := m.AccountLockout.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accountLockout") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accountLockout") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidateDataClassification(ctx context.Context, formats strfmt.Registry) error { - - if m.DataClassification != nil { - - if swag.IsZero(m.DataClassification) { // not required - return nil - } - - if err := m.DataClassification.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataClassification") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataClassification") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidateSessionConfiguration(ctx context.Context, formats strfmt.Registry) error { - - if m.SessionConfiguration != nil { - - if swag.IsZero(m.SessionConfiguration) { // not required - return nil - } - - if err := m.SessionConfiguration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sessionConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sessionConfiguration") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidateCertificateBasedAuth(ctx context.Context, formats strfmt.Registry) error { - - if m.CertificateBasedAuth != nil { - - if swag.IsZero(m.CertificateBasedAuth) { // not required - return nil - } - - if err := m.CertificateBasedAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificateBasedAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificateBasedAuth") - } - return err - } - } - - return nil -} - -func (m *SecurityConfig) contextValidateSSHConfiguration(ctx context.Context, formats strfmt.Registry) error { - - if m.SSHConfiguration != nil { - - if swag.IsZero(m.SSHConfiguration) { // not required - return nil - } - - if err := m.SSHConfiguration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sshConfiguration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sshConfiguration") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfig) UnmarshalBinary(b []byte) error { - var res SecurityConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_account_lockout.go b/v2/models/security_config_account_lockout.go deleted file mode 100644 index bc2afb77..00000000 --- a/v2/models/security_config_account_lockout.go +++ /dev/null @@ -1,119 +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" -) - -// SecurityConfigAccountLockout Specifies security config for account lockout. -// -// swagger:model SecurityConfigAccountLockout -type SecurityConfigAccountLockout struct { - - // Specifies the maximum number of consecutive fail login attempts. - // Minimum: 1 - MaxFailedLoginAttempts *int32 `json:"maxFailedLoginAttempts,omitempty"` - - // Specifies the time duration within which the consecutive failed login attempts causes a local user account to be locked and the lockout duration time due to that. - // Minimum: 1 - FailedLoginLockTimeDurationMins *int32 `json:"failedLoginLockTimeDurationMins,omitempty"` - - // Specifies the lockout inactivity time range in days. - // Maximum: 365 - // Minimum: 1 - InactivityTimeDays *int32 `json:"inactivityTimeDays,omitempty"` -} - -// Validate validates this security config account lockout -func (m *SecurityConfigAccountLockout) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxFailedLoginAttempts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailedLoginLockTimeDurationMins(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInactivityTimeDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfigAccountLockout) validateMaxFailedLoginAttempts(formats strfmt.Registry) error { - if swag.IsZero(m.MaxFailedLoginAttempts) { // not required - return nil - } - - if err := validate.MinimumInt("maxFailedLoginAttempts", "body", int64(*m.MaxFailedLoginAttempts), 1, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigAccountLockout) validateFailedLoginLockTimeDurationMins(formats strfmt.Registry) error { - if swag.IsZero(m.FailedLoginLockTimeDurationMins) { // not required - return nil - } - - if err := validate.MinimumInt("failedLoginLockTimeDurationMins", "body", int64(*m.FailedLoginLockTimeDurationMins), 1, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigAccountLockout) validateInactivityTimeDays(formats strfmt.Registry) error { - if swag.IsZero(m.InactivityTimeDays) { // not required - return nil - } - - if err := validate.MinimumInt("inactivityTimeDays", "body", int64(*m.InactivityTimeDays), 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("inactivityTimeDays", "body", int64(*m.InactivityTimeDays), 365, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config account lockout based on context it is used -func (m *SecurityConfigAccountLockout) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigAccountLockout) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigAccountLockout) UnmarshalBinary(b []byte) error { - var res SecurityConfigAccountLockout - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_certificate_based_auth.go b/v2/models/security_config_certificate_based_auth.go deleted file mode 100644 index 186bfdf1..00000000 --- a/v2/models/security_config_certificate_based_auth.go +++ /dev/null @@ -1,162 +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" -) - -// SecurityConfigCertificateBasedAuth Specifies security config for certificate based authentication. -// -// swagger:model SecurityConfigCertificateBasedAuth -type SecurityConfigCertificateBasedAuth struct { - - // If true, certfication based authentication is done via configured - // mapping. Else it will proceed based on legacy serial number match. - EnableMappingBasedAuthentication *bool `json:"enableMappingBasedAuthentication,omitempty"` - - // Specifies the field to be used in certificate for authentication. - // Enum: ["CommonName","EmailAddress","UserPrincipalName"] - CertificateMapping *string `json:"certificateMapping,omitempty"` - - // Specifies the field to be used in AD user for authentication. - // Enum: ["SamAccountName","UserPrincipalName"] - AdMapping *string `json:"adMapping,omitempty"` -} - -// Validate validates this security config certificate based auth -func (m *SecurityConfigCertificateBasedAuth) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificateMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAdMapping(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var securityConfigCertificateBasedAuthTypeCertificateMappingPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CommonName","EmailAddress","UserPrincipalName"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - securityConfigCertificateBasedAuthTypeCertificateMappingPropEnum = append(securityConfigCertificateBasedAuthTypeCertificateMappingPropEnum, v) - } -} - -const ( - - // SecurityConfigCertificateBasedAuthCertificateMappingCommonName captures enum value "CommonName" - SecurityConfigCertificateBasedAuthCertificateMappingCommonName string = "CommonName" - - // SecurityConfigCertificateBasedAuthCertificateMappingEmailAddress captures enum value "EmailAddress" - SecurityConfigCertificateBasedAuthCertificateMappingEmailAddress string = "EmailAddress" - - // SecurityConfigCertificateBasedAuthCertificateMappingUserPrincipalName captures enum value "UserPrincipalName" - SecurityConfigCertificateBasedAuthCertificateMappingUserPrincipalName string = "UserPrincipalName" -) - -// prop value enum -func (m *SecurityConfigCertificateBasedAuth) validateCertificateMappingEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, securityConfigCertificateBasedAuthTypeCertificateMappingPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SecurityConfigCertificateBasedAuth) validateCertificateMapping(formats strfmt.Registry) error { - if swag.IsZero(m.CertificateMapping) { // not required - return nil - } - - // value enum - if err := m.validateCertificateMappingEnum("certificateMapping", "body", *m.CertificateMapping); err != nil { - return err - } - - return nil -} - -var securityConfigCertificateBasedAuthTypeAdMappingPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SamAccountName","UserPrincipalName"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - securityConfigCertificateBasedAuthTypeAdMappingPropEnum = append(securityConfigCertificateBasedAuthTypeAdMappingPropEnum, v) - } -} - -const ( - - // SecurityConfigCertificateBasedAuthAdMappingSamAccountName captures enum value "SamAccountName" - SecurityConfigCertificateBasedAuthAdMappingSamAccountName string = "SamAccountName" - - // SecurityConfigCertificateBasedAuthAdMappingUserPrincipalName captures enum value "UserPrincipalName" - SecurityConfigCertificateBasedAuthAdMappingUserPrincipalName string = "UserPrincipalName" -) - -// prop value enum -func (m *SecurityConfigCertificateBasedAuth) validateAdMappingEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, securityConfigCertificateBasedAuthTypeAdMappingPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SecurityConfigCertificateBasedAuth) validateAdMapping(formats strfmt.Registry) error { - if swag.IsZero(m.AdMapping) { // not required - return nil - } - - // value enum - if err := m.validateAdMappingEnum("adMapping", "body", *m.AdMapping); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config certificate based auth based on context it is used -func (m *SecurityConfigCertificateBasedAuth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigCertificateBasedAuth) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigCertificateBasedAuth) UnmarshalBinary(b []byte) error { - var res SecurityConfigCertificateBasedAuth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_data_classification.go b/v2/models/security_config_data_classification.go deleted file mode 100644 index 8e5b30a2..00000000 --- a/v2/models/security_config_data_classification.go +++ /dev/null @@ -1,56 +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" -) - -// SecurityConfigDataClassification Specifies security config for data classification. -// -// swagger:model SecurityConfigDataClassification -type SecurityConfigDataClassification struct { - - // Specifies whether to mark the web page data classified/unclassified. - IsDataClassified *bool `json:"isDataClassified,omitempty"` - - // Specifies the classified data message. - ClassifiedDataMessage *string `json:"classifiedDataMessage,omitempty"` - - // Specifies the unclassified data message. - UnclassifiedDataMessage *string `json:"unclassifiedDataMessage,omitempty"` -} - -// Validate validates this security config data classification -func (m *SecurityConfigDataClassification) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this security config data classification based on context it is used -func (m *SecurityConfigDataClassification) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigDataClassification) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigDataClassification) UnmarshalBinary(b []byte) error { - var res SecurityConfigDataClassification - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_password_lifetime.go b/v2/models/security_config_password_lifetime.go deleted file mode 100644 index 86d19a9e..00000000 --- a/v2/models/security_config_password_lifetime.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" - "github.com/go-openapi/validate" -) - -// SecurityConfigPasswordLifetime Specifies security config for password lifetime. -// -// swagger:model SecurityConfigPasswordLifetime -type SecurityConfigPasswordLifetime struct { - - // Specifies the minimum password lifetime in days. - // Minimum: 0 - MinLifetimeDays *int32 `json:"minLifetimeDays,omitempty"` - - // Specifies the maximum password lifetime in days. - // Maximum: 365 - // Minimum: 1 - MaxLifetimeDays *int32 `json:"maxLifetimeDays,omitempty"` -} - -// Validate validates this security config password lifetime -func (m *SecurityConfigPasswordLifetime) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMinLifetimeDays(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxLifetimeDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfigPasswordLifetime) validateMinLifetimeDays(formats strfmt.Registry) error { - if swag.IsZero(m.MinLifetimeDays) { // not required - return nil - } - - if err := validate.MinimumInt("minLifetimeDays", "body", int64(*m.MinLifetimeDays), 0, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigPasswordLifetime) validateMaxLifetimeDays(formats strfmt.Registry) error { - if swag.IsZero(m.MaxLifetimeDays) { // not required - return nil - } - - if err := validate.MinimumInt("maxLifetimeDays", "body", int64(*m.MaxLifetimeDays), 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("maxLifetimeDays", "body", int64(*m.MaxLifetimeDays), 365, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config password lifetime based on context it is used -func (m *SecurityConfigPasswordLifetime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigPasswordLifetime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigPasswordLifetime) UnmarshalBinary(b []byte) error { - var res SecurityConfigPasswordLifetime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_password_reuse.go b/v2/models/security_config_password_reuse.go deleted file mode 100644 index fc96515c..00000000 --- a/v2/models/security_config_password_reuse.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" - "github.com/go-openapi/validate" -) - -// SecurityConfigPasswordReuse Specifies security config for password reuse. -// -// swagger:model SecurityConfigPasswordReuse -type SecurityConfigPasswordReuse struct { - - // Specifies the minimum number of old passwords that are not allowed for changing the password. - // Minimum: 0 - NumDisallowedOldPasswords *int32 `json:"numDisallowedOldPasswords,omitempty"` - - // Specifies the number of characters in the new password that needs to be different from the old password (only applicable when changing the user's own password). - // Minimum: 0 - NumDifferentChars *int32 `json:"numDifferentChars,omitempty"` -} - -// Validate validates this security config password reuse -func (m *SecurityConfigPasswordReuse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNumDisallowedOldPasswords(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNumDifferentChars(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfigPasswordReuse) validateNumDisallowedOldPasswords(formats strfmt.Registry) error { - if swag.IsZero(m.NumDisallowedOldPasswords) { // not required - return nil - } - - if err := validate.MinimumInt("numDisallowedOldPasswords", "body", int64(*m.NumDisallowedOldPasswords), 0, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigPasswordReuse) validateNumDifferentChars(formats strfmt.Registry) error { - if swag.IsZero(m.NumDifferentChars) { // not required - return nil - } - - if err := validate.MinimumInt("numDifferentChars", "body", int64(*m.NumDifferentChars), 0, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config password reuse based on context it is used -func (m *SecurityConfigPasswordReuse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigPasswordReuse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigPasswordReuse) UnmarshalBinary(b []byte) error { - var res SecurityConfigPasswordReuse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_password_strength.go b/v2/models/security_config_password_strength.go deleted file mode 100644 index 5aad296c..00000000 --- a/v2/models/security_config_password_strength.go +++ /dev/null @@ -1,86 +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" -) - -// SecurityConfigPasswordStrength Specifies security config for password strength. -// -// swagger:model SecurityConfigPasswordStrength -type SecurityConfigPasswordStrength struct { - - // Specifies the password minimum length. - // Minimum: 0 - MinLength *int32 `json:"minLength,omitempty"` - - // Specifies if the password needs to have at least one uppercase letter. - IncludeUpperLetter *bool `json:"includeUpperLetter,omitempty"` - - // Specifies if the password needs to have at least one lowercase letter. - IncludeLowerLetter *bool `json:"includeLowerLetter,omitempty"` - - // Specifies if the password needs to have at least one number. - IncludeNumber *bool `json:"includeNumber,omitempty"` - - // Specifies if the password needs to have at least one special character. - IncludeSpecialChar *bool `json:"includeSpecialChar,omitempty"` -} - -// Validate validates this security config password strength -func (m *SecurityConfigPasswordStrength) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMinLength(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfigPasswordStrength) validateMinLength(formats strfmt.Registry) error { - if swag.IsZero(m.MinLength) { // not required - return nil - } - - if err := validate.MinimumInt("minLength", "body", int64(*m.MinLength), 0, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config password strength based on context it is used -func (m *SecurityConfigPasswordStrength) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigPasswordStrength) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigPasswordStrength) UnmarshalBinary(b []byte) error { - var res SecurityConfigPasswordStrength - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_response.go b/v2/models/security_config_response.go deleted file mode 100644 index af7138b6..00000000 --- a/v2/models/security_config_response.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" -) - -// SecurityConfigResponse Security Config Response -// -// Specifies the detail response the security config. -// -// swagger:model SecurityConfigResponse -type SecurityConfigResponse struct { - SecurityConfig -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SecurityConfigResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SecurityConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SecurityConfig = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SecurityConfigResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SecurityConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this security config response -func (m *SecurityConfigResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SecurityConfig - if err := m.SecurityConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this security config response based on the context it is used -func (m *SecurityConfigResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SecurityConfig - if err := m.SecurityConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigResponse) UnmarshalBinary(b []byte) error { - var res SecurityConfigResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_session_configuration.go b/v2/models/security_config_session_configuration.go deleted file mode 100644 index 69c162e7..00000000 --- a/v2/models/security_config_session_configuration.go +++ /dev/null @@ -1,137 +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" -) - -// SecurityConfigSessionConfiguration Specifies configuration for user sessions. -// -// swagger:model SecurityConfigSessionConfiguration -type SecurityConfigSessionConfiguration struct { - - // Specifies absolute session expiration time in seconds. - // Minimum: 1 - AbsoluteTimeout *int64 `json:"absoluteTimeout,omitempty"` - - // Specifies inactivity session expiration time in seconds. - // Minimum: 1 - InactivityTimeout *int64 `json:"inactivityTimeout,omitempty"` - - // Specifies if limitations on number of active sessions is enabled or not. - LimitSessions *bool `json:"limitSessions,omitempty"` - - // Specifies maximum number of active sessions allowed per user. This applies only when limitSessions is enabled. - // Minimum: 1 - SessionLimitPerUser *int64 `json:"sessionLimitPerUser,omitempty"` - - // Specifies maximum number of active sessions allowed system wide. This applies only when limitSessions is enabled. - // Minimum: 1 - SessionLimitSystemWide *int64 `json:"sessionLimitSystemWide,omitempty"` -} - -// Validate validates this security config session configuration -func (m *SecurityConfigSessionConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAbsoluteTimeout(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInactivityTimeout(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSessionLimitPerUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSessionLimitSystemWide(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityConfigSessionConfiguration) validateAbsoluteTimeout(formats strfmt.Registry) error { - if swag.IsZero(m.AbsoluteTimeout) { // not required - return nil - } - - if err := validate.MinimumInt("absoluteTimeout", "body", *m.AbsoluteTimeout, 1, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigSessionConfiguration) validateInactivityTimeout(formats strfmt.Registry) error { - if swag.IsZero(m.InactivityTimeout) { // not required - return nil - } - - if err := validate.MinimumInt("inactivityTimeout", "body", *m.InactivityTimeout, 1, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigSessionConfiguration) validateSessionLimitPerUser(formats strfmt.Registry) error { - if swag.IsZero(m.SessionLimitPerUser) { // not required - return nil - } - - if err := validate.MinimumInt("sessionLimitPerUser", "body", *m.SessionLimitPerUser, 1, false); err != nil { - return err - } - - return nil -} - -func (m *SecurityConfigSessionConfiguration) validateSessionLimitSystemWide(formats strfmt.Registry) error { - if swag.IsZero(m.SessionLimitSystemWide) { // not required - return nil - } - - if err := validate.MinimumInt("sessionLimitSystemWide", "body", *m.SessionLimitSystemWide, 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security config session configuration based on context it is used -func (m *SecurityConfigSessionConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigSessionConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigSessionConfiguration) UnmarshalBinary(b []byte) error { - var res SecurityConfigSessionConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_config_ssh_configuration.go b/v2/models/security_config_ssh_configuration.go deleted file mode 100644 index 41749bf2..00000000 --- a/v2/models/security_config_ssh_configuration.go +++ /dev/null @@ -1,51 +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" -) - -// SecurityConfigSSHConfiguration Specifies security config for ssh configuration of cluster. -// -// swagger:model SecurityConfigSshConfiguration -type SecurityConfigSSHConfiguration struct { - - // Specifies the number of minutes of remaining idle before - // session timeout. - SSHTimeoutInMins *int32 `json:"sshTimeoutInMins,omitempty"` -} - -// Validate validates this security config Ssh configuration -func (m *SecurityConfigSSHConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this security config Ssh configuration based on context it is used -func (m *SecurityConfigSSHConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityConfigSSHConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityConfigSSHConfiguration) UnmarshalBinary(b []byte) error { - var res SecurityConfigSSHConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_principal.go b/v2/models/security_principal.go deleted file mode 100644 index 3bb1b12a..00000000 --- a/v2/models/security_principal.go +++ /dev/null @@ -1,123 +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" -) - -// SecurityPrincipal Specifies a security principal. -// -// swagger:model SecurityPrincipal -type SecurityPrincipal struct { - - // Specifies the domain name where the security principal account is maintained. - DomainName *string `json:"domainName,omitempty"` - - // Specifies the full name (first and last name) of the security principal. - FullName *string `json:"fullName,omitempty"` - - // Specifies the name of the security principal. - PrincipalName *string `json:"principalName,omitempty"` - - // Specifies the object class of the security principal. - // Enum: ["User","Group","Computer","WellKnownPrincipal"] - ObjectClass *string `json:"objectClass,omitempty"` - - // Specifies the SID of the security principal. - Sid *string `json:"sid,omitempty"` -} - -// Validate validates this security principal -func (m *SecurityPrincipal) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var securityPrincipalTypeObjectClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["User","Group","Computer","WellKnownPrincipal"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - securityPrincipalTypeObjectClassPropEnum = append(securityPrincipalTypeObjectClassPropEnum, v) - } -} - -const ( - - // SecurityPrincipalObjectClassUser captures enum value "User" - SecurityPrincipalObjectClassUser string = "User" - - // SecurityPrincipalObjectClassGroup captures enum value "Group" - SecurityPrincipalObjectClassGroup string = "Group" - - // SecurityPrincipalObjectClassComputer captures enum value "Computer" - SecurityPrincipalObjectClassComputer string = "Computer" - - // SecurityPrincipalObjectClassWellKnownPrincipal captures enum value "WellKnownPrincipal" - SecurityPrincipalObjectClassWellKnownPrincipal string = "WellKnownPrincipal" -) - -// prop value enum -func (m *SecurityPrincipal) validateObjectClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, securityPrincipalTypeObjectClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SecurityPrincipal) validateObjectClass(formats strfmt.Registry) error { - if swag.IsZero(m.ObjectClass) { // not required - return nil - } - - // value enum - if err := m.validateObjectClassEnum("objectClass", "body", *m.ObjectClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this security principal based on context it is used -func (m *SecurityPrincipal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityPrincipal) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityPrincipal) UnmarshalBinary(b []byte) error { - var res SecurityPrincipal - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/security_principals.go b/v2/models/security_principals.go deleted file mode 100644 index ae00ae3d..00000000 --- a/v2/models/security_principals.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SecurityPrincipals Specifies a list of security principals. -// -// swagger:model SecurityPrincipals -type SecurityPrincipals struct { - - // Specifies a list of security principals. - SecurityPrincipals []*SecurityPrincipal `json:"securityPrincipals"` -} - -// Validate validates this security principals -func (m *SecurityPrincipals) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSecurityPrincipals(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityPrincipals) validateSecurityPrincipals(formats strfmt.Registry) error { - if swag.IsZero(m.SecurityPrincipals) { // not required - return nil - } - - for i := 0; i < len(m.SecurityPrincipals); i++ { - if swag.IsZero(m.SecurityPrincipals[i]) { // not required - continue - } - - if m.SecurityPrincipals[i] != nil { - if err := m.SecurityPrincipals[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this security principals based on the context it is used -func (m *SecurityPrincipals) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSecurityPrincipals(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SecurityPrincipals) contextValidateSecurityPrincipals(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecurityPrincipals); i++ { - - if m.SecurityPrincipals[i] != nil { - - if swag.IsZero(m.SecurityPrincipals[i]) { // not required - return nil - } - - if err := m.SecurityPrincipals[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("securityPrincipals" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SecurityPrincipals) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SecurityPrincipals) UnmarshalBinary(b []byte) error { - var res SecurityPrincipals - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/self_service_snapshot_config.go b/v2/models/self_service_snapshot_config.go deleted file mode 100644 index 5424b89b..00000000 --- a/v2/models/self_service_snapshot_config.go +++ /dev/null @@ -1,71 +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" -) - -// SelfServiceSnapshotConfig Specifies the self service snapshot config of a view. -// -// swagger:model SelfServiceSnapshotConfig -type SelfServiceSnapshotConfig struct { - - // Specifies if self service snapshot feature is enabled. If this is set to true, the feature will also be enabled for NFS protocol. This field is deprecated. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies if previouse versions feature is enabled with SMB protocol. - PreviousVersionsEnabled *bool `json:"previousVersionsEnabled,omitempty"` - - // Specifies if self service snapshot feature is enabled for NFS protocol. - NfsAccessEnabled *bool `json:"nfsAccessEnabled,omitempty"` - - // Specifies if self service snapshot feature is enabled for SMB protocol. - SmbAccessEnabled *bool `json:"smbAccessEnabled,omitempty"` - - // Specifies the directory name for the snapshots. - SnapshotDirectoryName *string `json:"snapshotDirectoryName,omitempty"` - - // Specifies the alternate directory name for the snapshots. If it is not set, this feature for SMB protocol will not work. - AlternateSnapshotDirectoryName *string `json:"alternateSnapshotDirectoryName,omitempty"` - - // Specifies a list of sids who has access to the snapshots. - AllowAccessSids []string `json:"allowAccessSids,omitempty"` - - // Specifies a list of sids who does not have access to the snapshots. This field overrides 'allowAccessSids'. - DenyAccessSids []string `json:"denyAccessSids,omitempty"` -} - -// Validate validates this self service snapshot config -func (m *SelfServiceSnapshotConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this self service snapshot config based on context it is used -func (m *SelfServiceSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SelfServiceSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SelfServiceSnapshotConfig) UnmarshalBinary(b []byte) error { - var res SelfServiceSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/service_patch_level.go b/v2/models/service_patch_level.go deleted file mode 100644 index 9ca4a797..00000000 --- a/v2/models/service_patch_level.go +++ /dev/null @@ -1,62 +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" -) - -// ServicePatchLevel Patch level of a service. It is the number of patches applied for the service on the cluster. If a service is never patched the patch level is 0. If two patches were applied, patch level is 2. -// -// swagger:model ServicePatchLevel -type ServicePatchLevel struct { - - // Specifies the name of the service. - Service *string `json:"service,omitempty"` - - // Specifies patch level of the service after the patch operation. - PatchLevel *int64 `json:"patchLevel,omitempty"` - - // Specifies the version of the service patch after the patch operation. - PatchVersion *string `json:"patchVersion,omitempty"` - - // Specifies patch level of the service before the patch operation. - StartLevel *int64 `json:"startLevel,omitempty"` - - // Specifies the version of the service running on the cluster before the patch operation. - StartVersion *string `json:"startVersion,omitempty"` -} - -// Validate validates this service patch level -func (m *ServicePatchLevel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service patch level based on context it is used -func (m *ServicePatchLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServicePatchLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServicePatchLevel) UnmarshalBinary(b []byte) error { - var res ServicePatchLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/service_patch_levels.go b/v2/models/service_patch_levels.go deleted file mode 100644 index 4694d0a3..00000000 --- a/v2/models/service_patch_levels.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ServicePatchLevels Patch levels of a service and its dependencies. -// -// swagger:model ServicePatchLevels -type ServicePatchLevels []*ServicePatchLevel - -// Validate validates this service patch levels -func (m ServicePatchLevels) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this service patch levels based on the context it is used -func (m ServicePatchLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/service_unit_progress.go b/v2/models/service_unit_progress.go deleted file mode 100644 index fd258171..00000000 --- a/v2/models/service_unit_progress.go +++ /dev/null @@ -1,141 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ServiceUnitProgress Patch Operation Service Unit Progress. -// -// Specifies the progress of one patch operation for one service at one patch level. -// -// swagger:model ServiceUnitProgress -type ServiceUnitProgress struct { - - // Specifies the service which is patched. - Service *string `json:"service,omitempty"` - - // Specifies whether a operation is in progress for the service. - InProgress *bool `json:"inProgress,omitempty"` - - // Specifies the percentage of completion of the patch unit operation. - Percentage *int64 `json:"percentage,omitempty"` - - // Specifies the time remaining to complete the patch operation for the service. - TimeRemainingSeconds *int64 `json:"timeRemainingSeconds,omitempty"` - - // Specifies the time taken so far in this patch unit operation for the service. - TimeTakenSeconds *int64 `json:"timeTakenSeconds,omitempty"` - - // Specifies the details of patch operation for each service at each patch level. - NodesProgress []*NodeUnitProgress `json:"nodesProgress"` - - // Specifies a message about the patch unit operation. - ServiceMessage *string `json:"serviceMessage,omitempty"` -} - -// Validate validates this service unit progress -func (m *ServiceUnitProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodesProgress(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServiceUnitProgress) validateNodesProgress(formats strfmt.Registry) error { - if swag.IsZero(m.NodesProgress) { // not required - return nil - } - - for i := 0; i < len(m.NodesProgress); i++ { - if swag.IsZero(m.NodesProgress[i]) { // not required - continue - } - - if m.NodesProgress[i] != nil { - if err := m.NodesProgress[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesProgress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesProgress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this service unit progress based on the context it is used -func (m *ServiceUnitProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodesProgress(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ServiceUnitProgress) contextValidateNodesProgress(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesProgress); i++ { - - if m.NodesProgress[i] != nil { - - if swag.IsZero(m.NodesProgress[i]) { // not required - return nil - } - - if err := m.NodesProgress[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesProgress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesProgress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceUnitProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceUnitProgress) UnmarshalBinary(b []byte) error { - var res ServiceUnitProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/service_version_info.go b/v2/models/service_version_info.go deleted file mode 100644 index c76e520d..00000000 --- a/v2/models/service_version_info.go +++ /dev/null @@ -1,56 +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" -) - -// ServiceVersionInfo Specifies version information for a cohesity service. -// -// swagger:model ServiceVersionInfo -type ServiceVersionInfo struct { - - // Name of the service. - ServiceName string `json:"serviceName,omitempty"` - - // Version of the service. - ServiceVersion string `json:"serviceVersion,omitempty"` - - // LastCommitTime of the service. - LastCommitTime string `json:"lastCommitTime,omitempty"` -} - -// Validate validates this service version info -func (m *ServiceVersionInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this service version info based on context it is used -func (m *ServiceVersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ServiceVersionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ServiceVersionInfo) UnmarshalBinary(b []byte) error { - var res ServiceVersionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_aurora_cluster_info.go b/v2/models/sfdc_aurora_cluster_info.go deleted file mode 100644 index b1d5e803..00000000 --- a/v2/models/sfdc_aurora_cluster_info.go +++ /dev/null @@ -1,232 +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" -) - -// SfdcAuroraClusterInfo Sfdc Aurora Cluster Information. -// -// Specifies the Aurora cluster information required to protect an Sfdc Org. This parameter is filled internally by cohesity. It should not be filled by end user. -// -// swagger:model SfdcAuroraClusterInfo -type SfdcAuroraClusterInfo struct { - - // Contains the Id of the tenant. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the region id of the Aurora cluster. - // Required: true - RegionID *string `json:"regionId"` - - // Arn of the Aurora cluster. - // Required: true - AuroraClusterArn *string `json:"auroraClusterArn"` - - // Writer endpoint of the Aurora cluster. - // Required: true - WriterEndpoint *string `json:"writerEndpoint"` - - // Reader endpoint of the Aurora cluster. - ReaderEndpoint *string `json:"readerEndpoint,omitempty"` - - // Database user to access the dbs on the Aurora cluster. - // Required: true - DatabaseUser *string `json:"databaseUser"` - - // Contains the Arn of the IAM role of the which has access to the db user allocated to the tenant. - // Required: true - DatabaseAccessIAMRoleArn *string `json:"databaseAccessIAMRoleArn"` - - // Database port to access the dbs on the Aurora cluster. - // Required: true - DatabasePort *string `json:"databasePort"` - - // Database schema to access the dbs on the Aurora cluster. - DatabaseSchema *string `json:"databaseSchema,omitempty"` - - // Contains the tenant's S3 bucket. - // Required: true - S3BucketName *string `json:"s3BucketName"` - - // S3Bucket prefix for the intermediate. - // Required: true - S3BucketPrefix *string `json:"s3BucketPrefix"` - - // Contains the Arn of the IAM role which has read and write access to the tenant's s3 bucket. - // Required: true - S3AccessIAMRoleArn *string `json:"s3AccessIAMRoleArn"` -} - -// Validate validates this sfdc aurora cluster info -func (m *SfdcAuroraClusterInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuroraClusterArn(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWriterEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabaseAccessIAMRoleArn(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatabasePort(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BucketName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3BucketPrefix(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3AccessIAMRoleArn(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcAuroraClusterInfo) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateRegionID(formats strfmt.Registry) error { - - if err := validate.Required("regionId", "body", m.RegionID); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateAuroraClusterArn(formats strfmt.Registry) error { - - if err := validate.Required("auroraClusterArn", "body", m.AuroraClusterArn); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateWriterEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("writerEndpoint", "body", m.WriterEndpoint); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateDatabaseUser(formats strfmt.Registry) error { - - if err := validate.Required("databaseUser", "body", m.DatabaseUser); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateDatabaseAccessIAMRoleArn(formats strfmt.Registry) error { - - if err := validate.Required("databaseAccessIAMRoleArn", "body", m.DatabaseAccessIAMRoleArn); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateDatabasePort(formats strfmt.Registry) error { - - if err := validate.Required("databasePort", "body", m.DatabasePort); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateS3BucketName(formats strfmt.Registry) error { - - if err := validate.Required("s3BucketName", "body", m.S3BucketName); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateS3BucketPrefix(formats strfmt.Registry) error { - - if err := validate.Required("s3BucketPrefix", "body", m.S3BucketPrefix); err != nil { - return err - } - - return nil -} - -func (m *SfdcAuroraClusterInfo) validateS3AccessIAMRoleArn(formats strfmt.Registry) error { - - if err := validate.Required("s3AccessIAMRoleArn", "body", m.S3AccessIAMRoleArn); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sfdc aurora cluster info based on context it is used -func (m *SfdcAuroraClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcAuroraClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcAuroraClusterInfo) UnmarshalBinary(b []byte) error { - var res SfdcAuroraClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_dependent_object.go b/v2/models/sfdc_dependent_object.go deleted file mode 100644 index a4831ea1..00000000 --- a/v2/models/sfdc_dependent_object.go +++ /dev/null @@ -1,90 +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" -) - -// SfdcDependentObject SfdcDependentObject -// -// Specifies dependent object. -// -// swagger:model SfdcDependentObject -type SfdcDependentObject struct { - - // Id of an object - // Required: true - ID *string `json:"id"` - - // Name of an object - // Required: true - Name *string `json:"name"` -} - -// Validate validates this sfdc dependent object -func (m *SfdcDependentObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcDependentObject) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *SfdcDependentObject) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sfdc dependent object based on context it is used -func (m *SfdcDependentObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcDependentObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcDependentObject) UnmarshalBinary(b []byte) error { - var res SfdcDependentObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_meta_info_result.go b/v2/models/sfdc_meta_info_result.go deleted file mode 100644 index c4d5b4a8..00000000 --- a/v2/models/sfdc_meta_info_result.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SfdcMetaInfoResult SfdcMetaInfoResult -// -// Specifies the meta info params for salesforce object. -// -// swagger:model SfdcMetaInfoResult -type SfdcMetaInfoResult struct { - - // Specifies the list of parent objects. - ParentObjects []*SfdcDependentObject `json:"parentObjects"` - - // Specifies the list of child objects. - ChildObjects []*SfdcDependentObject `json:"childObjects"` -} - -// Validate validates this sfdc meta info result -func (m *SfdcMetaInfoResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParentObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChildObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcMetaInfoResult) validateParentObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ParentObjects) { // not required - return nil - } - - for i := 0; i < len(m.ParentObjects); i++ { - if swag.IsZero(m.ParentObjects[i]) { // not required - continue - } - - if m.ParentObjects[i] != nil { - if err := m.ParentObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcMetaInfoResult) validateChildObjects(formats strfmt.Registry) error { - if swag.IsZero(m.ChildObjects) { // not required - return nil - } - - for i := 0; i < len(m.ChildObjects); i++ { - if swag.IsZero(m.ChildObjects[i]) { // not required - continue - } - - if m.ChildObjects[i] != nil { - if err := m.ChildObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc meta info result based on the context it is used -func (m *SfdcMetaInfoResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParentObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChildObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcMetaInfoResult) contextValidateParentObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ParentObjects); i++ { - - if m.ParentObjects[i] != nil { - - if swag.IsZero(m.ParentObjects[i]) { // not required - return nil - } - - if err := m.ParentObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *SfdcMetaInfoResult) contextValidateChildObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChildObjects); i++ { - - if m.ChildObjects[i] != nil { - - if swag.IsZero(m.ChildObjects[i]) { // not required - return nil - } - - if err := m.ChildObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("childObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcMetaInfoResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcMetaInfoResult) UnmarshalBinary(b []byte) error { - var res SfdcMetaInfoResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_meta_info_type.go b/v2/models/sfdc_meta_info_type.go deleted file mode 100644 index 1073aa7e..00000000 --- a/v2/models/sfdc_meta_info_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SfdcMetaInfoType Specifies the type of meta info for salesforce object. -// -// Specifies the type of meta info for salesforce object. -// -// swagger:model SfdcMetaInfoType -type SfdcMetaInfoType struct { - - // Specifies the type of meta info for salesforce object. - // Enum: ["DependentObjects"] - Type string `json:"type,omitempty"` -} - -// Validate validates this sfdc meta info type -func (m *SfdcMetaInfoType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sfdcMetaInfoTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DependentObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sfdcMetaInfoTypeTypeTypePropEnum = append(sfdcMetaInfoTypeTypeTypePropEnum, v) - } -} - -const ( - - // SfdcMetaInfoTypeTypeDependentObjects captures enum value "DependentObjects" - SfdcMetaInfoTypeTypeDependentObjects string = "DependentObjects" -) - -// prop value enum -func (m *SfdcMetaInfoType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sfdcMetaInfoTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SfdcMetaInfoType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sfdc meta info type based on context it is used -func (m *SfdcMetaInfoType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcMetaInfoType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcMetaInfoType) UnmarshalBinary(b []byte) error { - var res SfdcMetaInfoType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_field_exclusion.go b/v2/models/sfdc_object_field_exclusion.go deleted file mode 100644 index 4d90aa19..00000000 --- a/v2/models/sfdc_object_field_exclusion.go +++ /dev/null @@ -1,79 +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" -) - -// SfdcObjectFieldExclusion Sfdc Object Field Exclusion. -// -// Specifies the field names to be excluded for the object. -// -// swagger:model SfdcObjectFieldExclusion -type SfdcObjectFieldExclusion struct { - - // Specifies the id of the object in which some fields are to be excluded. This should be a leaf level object. - ObjectID int64 `json:"objectId,omitempty"` - - // Specifies the list of Sfdc API names of the fields to be excluded in this object. - // Unique: true - ExcludeFieldNames []string `json:"excludeFieldNames"` -} - -// Validate validates this sfdc object field exclusion -func (m *SfdcObjectFieldExclusion) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeFieldNames(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObjectFieldExclusion) validateExcludeFieldNames(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeFieldNames) { // not required - return nil - } - - if err := validate.UniqueItems("excludeFieldNames", "body", m.ExcludeFieldNames); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this sfdc object field exclusion based on context it is used -func (m *SfdcObjectFieldExclusion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectFieldExclusion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectFieldExclusion) UnmarshalBinary(b []byte) error { - var res SfdcObjectFieldExclusion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_params.go b/v2/models/sfdc_object_params.go deleted file mode 100644 index f2d57786..00000000 --- a/v2/models/sfdc_object_params.go +++ /dev/null @@ -1,56 +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" -) - -// SfdcObjectParams Specifies the Salesforce objects mutation parameters. -// -// swagger:model SfdcObjectParams -type SfdcObjectParams struct { - - // Specifies the number of records added for the Object. - RecordsAdded *int64 `json:"recordsAdded,omitempty"` - - // Specifies the number of records updated for the Object. - RecordsModified *int64 `json:"recordsModified,omitempty"` - - // Specifies the number of records removed from the Object. - RecordsRemoved *int64 `json:"recordsRemoved,omitempty"` -} - -// Validate validates this sfdc object params -func (m *SfdcObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc object params based on context it is used -func (m *SfdcObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_protection_object_params.go b/v2/models/sfdc_object_protection_object_params.go deleted file mode 100644 index ccf05349..00000000 --- a/v2/models/sfdc_object_protection_object_params.go +++ /dev/null @@ -1,161 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SfdcObjectProtectionObjectParams Sfdc Object Protection Object Params -// -// Specifies the object parameters to create an Sfdc Object Protection. -// -// swagger:model SfdcObjectProtectionObjectParams -type SfdcObjectProtectionObjectParams struct { - - // Specifies the id of the Sfdc Org being protected. This cannot be the id of a leaf level object. By default, the Sfdc Org is auto-protected. - // Required: true - ID *int64 `json:"id"` - - // Specifies the ids of the objects to be excluded in the Object Protection. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies the list of field names to be excluded in an Sfdc object. A user can specify multiple such entries in this list. - FieldExclusionList []*SfdcObjectFieldExclusion `json:"fieldExclusionList"` -} - -// Validate validates this sfdc object protection object params -func (m *SfdcObjectProtectionObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFieldExclusionList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObjectProtectionObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *SfdcObjectProtectionObjectParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -func (m *SfdcObjectProtectionObjectParams) validateFieldExclusionList(formats strfmt.Registry) error { - if swag.IsZero(m.FieldExclusionList) { // not required - return nil - } - - for i := 0; i < len(m.FieldExclusionList); i++ { - if swag.IsZero(m.FieldExclusionList[i]) { // not required - continue - } - - if m.FieldExclusionList[i] != nil { - if err := m.FieldExclusionList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldExclusionList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldExclusionList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc object protection object params based on the context it is used -func (m *SfdcObjectProtectionObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFieldExclusionList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObjectProtectionObjectParams) contextValidateFieldExclusionList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FieldExclusionList); i++ { - - if m.FieldExclusionList[i] != nil { - - if swag.IsZero(m.FieldExclusionList[i]) { // not required - return nil - } - - if err := m.FieldExclusionList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldExclusionList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldExclusionList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectProtectionObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectProtectionObjectParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectProtectionObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_protection_params.go b/v2/models/sfdc_object_protection_params.go deleted file mode 100644 index 58df5fff..00000000 --- a/v2/models/sfdc_object_protection_params.go +++ /dev/null @@ -1,143 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SfdcObjectProtectionParams Sfdc Object Protection Parameters. -// -// Specifies the parameters that are specific to Sfdc Object Protection. -// -// swagger:model SfdcObjectProtectionParams -type SfdcObjectProtectionParams struct { - - // Specifies the objects to be included in the Object Protection. - // Required: true - // Max Items: 1 - // Min Items: 1 - // Unique: true - Objects []*SfdcObjectProtectionObjectParams `json:"objects"` -} - -// Validate validates this sfdc object protection params -func (m *SfdcObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.MaxItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc object protection params based on the context it is used -func (m *SfdcObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_protection_request_params.go b/v2/models/sfdc_object_protection_request_params.go deleted file mode 100644 index e9295262..00000000 --- a/v2/models/sfdc_object_protection_request_params.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" -) - -// SfdcObjectProtectionRequestParams Specifies the request parameters specific to Sfdc object protection. -// -// swagger:model SfdcObjectProtectionRequestParams -type SfdcObjectProtectionRequestParams struct { - SfdcObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SfdcObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SfdcObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SfdcObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SfdcObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SfdcObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this sfdc object protection request params -func (m *SfdcObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this sfdc object protection request params based on the context it is used -func (m *SfdcObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_protection_response_params.go b/v2/models/sfdc_object_protection_response_params.go deleted file mode 100644 index f534a432..00000000 --- a/v2/models/sfdc_object_protection_response_params.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" -) - -// SfdcObjectProtectionResponseParams Specifies the response parameters specific to Sfdc object protection. -// -// swagger:model SfdcObjectProtectionResponseParams -type SfdcObjectProtectionResponseParams struct { - SfdcObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SfdcObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SfdcObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SfdcObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SfdcObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SfdcObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this sfdc object protection response params -func (m *SfdcObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this sfdc object protection response params based on the context it is used -func (m *SfdcObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_object_protection_update_request_params.go b/v2/models/sfdc_object_protection_update_request_params.go deleted file mode 100644 index aad54937..00000000 --- a/v2/models/sfdc_object_protection_update_request_params.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" -) - -// SfdcObjectProtectionUpdateRequestParams Specifies the update parameters specific to Sfdc object protection. -// -// swagger:model SfdcObjectProtectionUpdateRequestParams -type SfdcObjectProtectionUpdateRequestParams struct { - SfdcObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SfdcObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SfdcObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SfdcObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SfdcObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SfdcObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this sfdc object protection update request params -func (m *SfdcObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this sfdc object protection update request params based on the context it is used -func (m *SfdcObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcObjectProtectionParams - if err := m.SfdcObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res SfdcObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_protection_group_object_params.go b/v2/models/sfdc_protection_group_object_params.go deleted file mode 100644 index 8e4159d4..00000000 --- a/v2/models/sfdc_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// SfdcProtectionGroupObjectParams SFDC Protection Group Object Identifier. -// -// Specifies the object identifier to create SFDC Protection Group. -// -// swagger:model SfdcProtectionGroupObjectParams -type SfdcProtectionGroupObjectParams struct { - - // Specifies the id of the SFDC Object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the SFDC Object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this sfdc protection group object params -func (m *SfdcProtectionGroupObjectParams) 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 *SfdcProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this sfdc protection group object params based on the context it is used -func (m *SfdcProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res SfdcProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_protection_group_params.go b/v2/models/sfdc_protection_group_params.go deleted file mode 100644 index a0943ec4..00000000 --- a/v2/models/sfdc_protection_group_params.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SfdcProtectionGroupParams SFDC Protection Group Parameters. -// -// Specifies the parameters to create SFDC Protection Group. -// -// swagger:model SfdcProtectionGroupParams -type SfdcProtectionGroupParams struct { - - // Specifies the list of objects to be protected. - // Required: true - // Min Items: 1 - Objects []*SfdcProtectionGroupObjectParams `json:"objects"` -} - -// Validate validates this sfdc protection group params -func (m *SfdcProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sfdc protection group params based on the context it is used -func (m *SfdcProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res SfdcProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_records.go b/v2/models/sfdc_records.go deleted file mode 100644 index fa56bfb2..00000000 --- a/v2/models/sfdc_records.go +++ /dev/null @@ -1,55 +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" -) - -// SfdcRecords Salesforce record. -// -// Specifies the list of salesforce records. -// -// swagger:model SfdcRecords -type SfdcRecords struct { - - // Specifies the column names for the records. - ColumnNames []string `json:"columnNames"` - - // Each record is represented by an array of strings having the same order as the 'columnNames'. - Records [][]string `json:"records"` -} - -// Validate validates this sfdc records -func (m *SfdcRecords) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sfdc records based on context it is used -func (m *SfdcRecords) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcRecords) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcRecords) UnmarshalBinary(b []byte) error { - var res SfdcRecords - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sfdc_source_registration_params.go b/v2/models/sfdc_source_registration_params.go deleted file mode 100644 index 37fcea40..00000000 --- a/v2/models/sfdc_source_registration_params.go +++ /dev/null @@ -1,267 +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" -) - -// SfdcSourceRegistrationParams Register SFDC Source request parameters. -// -// Specifies parameters to register an SFDC Protection Source. -// -// swagger:model SfdcSourceRegistrationParams -type SfdcSourceRegistrationParams struct { - - // Specifies the SFDC endpoint URL. - // Required: true - Endpoint *string `json:"endpoint"` - - // SFDC Endpoint type. - // Required: true - // Enum: ["PROD","SANDBOX","OTHER"] - EndpointType *string `json:"endpointType"` - - // Specifies Consumer key from the connected app in SFDC. - // Required: true - ConsumerKey *string `json:"consumerKey"` - - // Specifies Consumer secret from the connected app in SFDC. - // Required: true - ConsumerSecret *string `json:"consumerSecret"` - - // Specifies the username to access salesforce. - Username *string `json:"username,omitempty"` - - // Specifies the password to access salesforce. - Password *string `json:"password,omitempty"` - - // Specifies the url to access salesforce soap requests. - // Read Only: true - SoapEndpointURL *string `json:"soapEndpointUrl,omitempty"` - - // Specifies the url to access salesforce metadata requests. - // Read Only: true - MetadataEndpointURL *string `json:"metadataEndpointUrl,omitempty"` - - // Specifies the maximum number of daily API requests allowed for salesforce. - // Required: true - // Minimum: 0 - DailyAPILimit *int64 `json:"dailyApiLimit"` - - // Specifies the maximum number of concurrent API requests allowed for salesforce. - // Required: true - ConcurrentAPIRequestsLimit *int64 `json:"concurrentApiRequestsLimit"` - - // Specifies the token that will be used for fetching oAuth tokens from salesforce. - // Required: true - AuthToken *string `json:"authToken"` - - // Specifies the URL added in the connected apps Callback URL field. You can find this URL on the connected apps Manage Connected Apps page or from the connected apps definition. This value must be URL encoded. - CallbackURL *string `json:"callbackUrl,omitempty"` -} - -// Validate validates this sfdc source registration params -func (m *SfdcSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndpointType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConsumerKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConsumerSecret(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDailyAPILimit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConcurrentAPIRequestsLimit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAuthToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcSourceRegistrationParams) validateEndpoint(formats strfmt.Registry) error { - - if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { - return err - } - - return nil -} - -var sfdcSourceRegistrationParamsTypeEndpointTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PROD","SANDBOX","OTHER"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sfdcSourceRegistrationParamsTypeEndpointTypePropEnum = append(sfdcSourceRegistrationParamsTypeEndpointTypePropEnum, v) - } -} - -const ( - - // SfdcSourceRegistrationParamsEndpointTypePROD captures enum value "PROD" - SfdcSourceRegistrationParamsEndpointTypePROD string = "PROD" - - // SfdcSourceRegistrationParamsEndpointTypeSANDBOX captures enum value "SANDBOX" - SfdcSourceRegistrationParamsEndpointTypeSANDBOX string = "SANDBOX" - - // SfdcSourceRegistrationParamsEndpointTypeOTHER captures enum value "OTHER" - SfdcSourceRegistrationParamsEndpointTypeOTHER string = "OTHER" -) - -// prop value enum -func (m *SfdcSourceRegistrationParams) validateEndpointTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sfdcSourceRegistrationParamsTypeEndpointTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SfdcSourceRegistrationParams) validateEndpointType(formats strfmt.Registry) error { - - if err := validate.Required("endpointType", "body", m.EndpointType); err != nil { - return err - } - - // value enum - if err := m.validateEndpointTypeEnum("endpointType", "body", *m.EndpointType); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) validateConsumerKey(formats strfmt.Registry) error { - - if err := validate.Required("consumerKey", "body", m.ConsumerKey); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) validateConsumerSecret(formats strfmt.Registry) error { - - if err := validate.Required("consumerSecret", "body", m.ConsumerSecret); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) validateDailyAPILimit(formats strfmt.Registry) error { - - if err := validate.Required("dailyApiLimit", "body", m.DailyAPILimit); err != nil { - return err - } - - if err := validate.MinimumInt("dailyApiLimit", "body", *m.DailyAPILimit, 0, false); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) validateConcurrentAPIRequestsLimit(formats strfmt.Registry) error { - - if err := validate.Required("concurrentApiRequestsLimit", "body", m.ConcurrentAPIRequestsLimit); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) validateAuthToken(formats strfmt.Registry) error { - - if err := validate.Required("authToken", "body", m.AuthToken); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this sfdc source registration params based on the context it is used -func (m *SfdcSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSoapEndpointURL(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadataEndpointURL(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SfdcSourceRegistrationParams) contextValidateSoapEndpointURL(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "soapEndpointUrl", "body", m.SoapEndpointURL); err != nil { - return err - } - - return nil -} - -func (m *SfdcSourceRegistrationParams) contextValidateMetadataEndpointURL(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "metadataEndpointUrl", "body", m.MetadataEndpointURL); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SfdcSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SfdcSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res SfdcSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/share.go b/v2/models/share.go deleted file mode 100644 index b0082954..00000000 --- a/v2/models/share.go +++ /dev/null @@ -1,284 +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" -) - -// Share Share -// -// Specifies the details of a Share. -// -// swagger:model Share -type Share struct { - UpdateShareParam - - // Specifies the Share name. - // Required: true - Name *string `json:"name"` - - // Specifies the View name of this Share. - // Required: true - ViewName *string `json:"viewName"` - - // Specifies the View path of this Share. - // Required: true - ViewPath *string `json:"viewPath"` - - // Specifies the path for mounting this Share as an NFS share. If Kerberos Provider has multiple hostaliases, each host alias has its own path. - // Read Only: true - NfsMountPaths []string `json:"nfsMountPaths"` - - // Specifies the possible paths that can be used to mount this Share as a SMB share. If Active Directory has multiple account names, each machine account has its own path. - // Read Only: true - SmbMountPaths []string `json:"smbMountPaths"` - - // Specifies the path to access this Share as an S3 share. - // Read Only: true - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - // Specifies the tenant id who has access to this Share. - // Read Only: true - TenantID *string `json:"tenantId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Share) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateShareParam - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateShareParam = aO0 - - // AO1 - var dataAO1 struct { - Name *string `json:"name"` - - ViewName *string `json:"viewName"` - - ViewPath *string `json:"viewPath"` - - NfsMountPaths []string `json:"nfsMountPaths"` - - SmbMountPaths []string `json:"smbMountPaths"` - - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Name = dataAO1.Name - - m.ViewName = dataAO1.ViewName - - m.ViewPath = dataAO1.ViewPath - - m.NfsMountPaths = dataAO1.NfsMountPaths - - m.SmbMountPaths = dataAO1.SmbMountPaths - - m.S3AccessPath = dataAO1.S3AccessPath - - m.TenantID = dataAO1.TenantID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Share) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UpdateShareParam) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Name *string `json:"name"` - - ViewName *string `json:"viewName"` - - ViewPath *string `json:"viewPath"` - - NfsMountPaths []string `json:"nfsMountPaths"` - - SmbMountPaths []string `json:"smbMountPaths"` - - S3AccessPath *string `json:"s3AccessPath,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - } - - dataAO1.Name = m.Name - - dataAO1.ViewName = m.ViewName - - dataAO1.ViewPath = m.ViewPath - - dataAO1.NfsMountPaths = m.NfsMountPaths - - dataAO1.SmbMountPaths = m.SmbMountPaths - - dataAO1.S3AccessPath = m.S3AccessPath - - 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 share -func (m *Share) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateShareParam - if err := m.UpdateShareParam.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Share) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *Share) validateViewName(formats strfmt.Registry) error { - - if err := validate.Required("viewName", "body", m.ViewName); err != nil { - return err - } - - return nil -} - -func (m *Share) validateViewPath(formats strfmt.Registry) error { - - if err := validate.Required("viewPath", "body", m.ViewPath); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this share based on the context it is used -func (m *Share) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateShareParam - if err := m.UpdateShareParam.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3AccessPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Share) contextValidateNfsMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "nfsMountPaths", "body", []string(m.NfsMountPaths)); err != nil { - return err - } - - return nil -} - -func (m *Share) contextValidateSmbMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "smbMountPaths", "body", []string(m.SmbMountPaths)); err != nil { - return err - } - - return nil -} - -func (m *Share) contextValidateS3AccessPath(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "s3AccessPath", "body", m.S3AccessPath); err != nil { - return err - } - - return nil -} - -func (m *Share) contextValidateTenantID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Share) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Share) UnmarshalBinary(b []byte) error { - var res Share - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sharepoint_item.go b/v2/models/sharepoint_item.go deleted file mode 100644 index 2b765089..00000000 --- a/v2/models/sharepoint_item.go +++ /dev/null @@ -1,111 +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" -) - -// SharepointItem Indexed Sharepoint item. -// -// Specifies the indexed Sharepoint item. -// -// swagger:model SharepointItem -type SharepointItem struct { - - // Specifies the indexed document library item. - DocumentLibraryItem *DocumentLibraryItem `json:"documentLibraryItem,omitempty"` -} - -// Validate validates this sharepoint item -func (m *SharepointItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDocumentLibraryItem(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharepointItem) validateDocumentLibraryItem(formats strfmt.Registry) error { - if swag.IsZero(m.DocumentLibraryItem) { // not required - return nil - } - - if m.DocumentLibraryItem != nil { - if err := m.DocumentLibraryItem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryItem") - } - return err - } - } - - return nil -} - -// ContextValidate validate this sharepoint item based on the context it is used -func (m *SharepointItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDocumentLibraryItem(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SharepointItem) contextValidateDocumentLibraryItem(ctx context.Context, formats strfmt.Registry) error { - - if m.DocumentLibraryItem != nil { - - if swag.IsZero(m.DocumentLibraryItem) { // not required - return nil - } - - if err := m.DocumentLibraryItem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("documentLibraryItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("documentLibraryItem") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointItem) UnmarshalBinary(b []byte) error { - var res SharepointItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sharepoint_items.go b/v2/models/sharepoint_items.go deleted file mode 100644 index b94e94b4..00000000 --- a/v2/models/sharepoint_items.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SharepointItems Specifies the indexed Sharepoint items. -// -// swagger:model SharepointItems -type SharepointItems []*SharepointItem - -// Validate validates this sharepoint items -func (m SharepointItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this sharepoint items based on the context it is used -func (m SharepointItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/sharepoint_object_entity_params.go b/v2/models/sharepoint_object_entity_params.go deleted file mode 100644 index 71a8c5a9..00000000 --- a/v2/models/sharepoint_object_entity_params.go +++ /dev/null @@ -1,50 +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" -) - -// SharepointObjectEntityParams Specifies the common parameters for Sharepoint site objects. -// -// swagger:model SharepointObjectEntityParams -type SharepointObjectEntityParams struct { - - // Specifies the web url for the Sharepoint site. - SiteWebURL *string `json:"siteWebUrl,omitempty"` -} - -// Validate validates this sharepoint object entity params -func (m *SharepointObjectEntityParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sharepoint object entity params based on context it is used -func (m *SharepointObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointObjectEntityParams) UnmarshalBinary(b []byte) error { - var res SharepointObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sharepoint_object_params.go b/v2/models/sharepoint_object_params.go deleted file mode 100644 index 84ce354d..00000000 --- a/v2/models/sharepoint_object_params.go +++ /dev/null @@ -1,50 +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" -) - -// SharepointObjectParams Specifies the common parameters for Sharepoint site objects. -// -// swagger:model SharepointObjectParams -type SharepointObjectParams struct { - - // Specifies the web url for the Sharepoint site. - SiteWebURL *string `json:"siteWebUrl,omitempty"` -} - -// Validate validates this sharepoint object params -func (m *SharepointObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sharepoint object params based on context it is used -func (m *SharepointObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SharepointObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SharepointObjectParams) UnmarshalBinary(b []byte) error { - var res SharepointObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/shares.go b/v2/models/shares.go deleted file mode 100644 index d3dd2b4b..00000000 --- a/v2/models/shares.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Shares Shares -// -// Specifies a list of Shares. -// -// swagger:model Shares -type Shares struct { - - // Specifies the list of shares. - Shares []*Share `json:"shares"` - - // Specifies the pagination cookie. - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this shares -func (m *Shares) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateShares(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Shares) validateShares(formats strfmt.Registry) error { - if swag.IsZero(m.Shares) { // not required - return nil - } - - for i := 0; i < len(m.Shares); i++ { - if swag.IsZero(m.Shares[i]) { // not required - continue - } - - if m.Shares[i] != nil { - if err := m.Shares[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this shares based on the context it is used -func (m *Shares) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateShares(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Shares) contextValidateShares(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Shares); i++ { - - if m.Shares[i] != nil { - - if swag.IsZero(m.Shares[i]) { // not required - return nil - } - - if err := m.Shares[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("shares" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("shares" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Shares) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Shares) UnmarshalBinary(b []byte) error { - var res Shares - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/shell_key_value_pair.go b/v2/models/shell_key_value_pair.go deleted file mode 100644 index 16833954..00000000 --- a/v2/models/shell_key_value_pair.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" -) - -// ShellKeyValuePair Specifies key value pairs of shell variables which defines the restore shell environment. -// -// swagger:model ShellKeyValuePair -type ShellKeyValuePair struct { - - // Specifies the name of the shell environment variable. - Key *string `json:"key,omitempty"` - - // Specifies the value of the shell environment variable. - Value *string `json:"value,omitempty"` -} - -// Validate validates this shell key value pair -func (m *ShellKeyValuePair) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this shell key value pair based on context it is used -func (m *ShellKeyValuePair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ShellKeyValuePair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ShellKeyValuePair) UnmarshalBinary(b []byte) error { - var res ShellKeyValuePair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/simple_auth_params.go b/v2/models/simple_auth_params.go deleted file mode 100644 index fe09ead9..00000000 --- a/v2/models/simple_auth_params.go +++ /dev/null @@ -1,77 +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" -) - -// SimpleAuthParams Specifies the parameters for LDAP with 'Simple' authentication type. -// -// swagger:model SimpleAuthParams -type SimpleAuthParams struct { - - // Specifies the user distinguished name that is used for LDAP authentication. - // Required: true - UserDistinguishedName *string `json:"userDistinguishedName"` - - // Specifies the user password that is used for LDAP authentication. - UserPassword *string `json:"userPassword,omitempty"` - - // Specifies whether to use SSL for LDAP connections. - UseSsl *bool `json:"useSsl,omitempty"` -} - -// Validate validates this simple auth params -func (m *SimpleAuthParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserDistinguishedName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SimpleAuthParams) validateUserDistinguishedName(formats strfmt.Registry) error { - - if err := validate.Required("userDistinguishedName", "body", m.UserDistinguishedName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this simple auth params based on context it is used -func (m *SimpleAuthParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SimpleAuthParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SimpleAuthParams) UnmarshalBinary(b []byte) error { - var res SimpleAuthParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/simple_tags.go b/v2/models/simple_tags.go deleted file mode 100644 index b32702f1..00000000 --- a/v2/models/simple_tags.go +++ /dev/null @@ -1,90 +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" -) - -// SimpleTags Simple tags. -// -// Specifies the simple tag parameters. -// -// swagger:model SimpleTags -type SimpleTags struct { - - // Specifies key for the tag. - // Required: true - Key *string `json:"key"` - - // Specifies value for the tag. - // Required: true - Value *string `json:"value"` -} - -// Validate validates this simple tags -func (m *SimpleTags) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateKey(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SimpleTags) validateKey(formats strfmt.Registry) error { - - if err := validate.Required("key", "body", m.Key); err != nil { - return err - } - - return nil -} - -func (m *SimpleTags) validateValue(formats strfmt.Registry) error { - - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this simple tags based on context it is used -func (m *SimpleTags) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SimpleTags) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SimpleTags) UnmarshalBinary(b []byte) error { - var res SimpleTags - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sites_discovery_params.go b/v2/models/sites_discovery_params.go deleted file mode 100644 index 1c6d6682..00000000 --- a/v2/models/sites_discovery_params.go +++ /dev/null @@ -1,52 +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" -) - -// SitesDiscoveryParams Source Discovery parameter for SHarePoint Site object type -// -// Specifies discovery params for SharePoint Site entities. It should only be populated if the 'DiscoveryParams.discoverableObjectTypeList' includes 'kSites' otherwise this will be ignored. -// -// swagger:model SitesDiscoveryParams -type SitesDiscoveryParams struct { - - // Specifies whether the SHarePoint Sites will be tagged whether they belong to a group site or teams site. - EnableSiteTagging *bool `json:"enableSiteTagging,omitempty"` -} - -// Validate validates this sites discovery params -func (m *SitesDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this sites discovery params based on context it is used -func (m *SitesDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SitesDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SitesDiscoveryParams) UnmarshalBinary(b []byte) error { - var res SitesDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sla_rule.go b/v2/models/sla_rule.go deleted file mode 100644 index 8b0c9b90..00000000 --- a/v2/models/sla_rule.go +++ /dev/null @@ -1,128 +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" -) - -// SLARule Specifies an SLA rule for a specific Protection Group run type. -// -// swagger:model SlaRule -type SLARule struct { - - // Specifies the type of run this rule should apply to. - // Enum: ["kIncremental","kFull","kLog"] - BackupRunType *string `json:"backupRunType,omitempty"` - - // Specifies the number of minutes allotted to a run of the specified type before SLA is considered violated. - // Minimum: 1 - SLAMinutes *int64 `json:"slaMinutes,omitempty"` -} - -// Validate validates this Sla rule -func (m *SLARule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupRunType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSLAMinutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var slaRuleTypeBackupRunTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kIncremental","kFull","kLog"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - slaRuleTypeBackupRunTypePropEnum = append(slaRuleTypeBackupRunTypePropEnum, v) - } -} - -const ( - - // SLARuleBackupRunTypeKIncremental captures enum value "kIncremental" - SLARuleBackupRunTypeKIncremental string = "kIncremental" - - // SLARuleBackupRunTypeKFull captures enum value "kFull" - SLARuleBackupRunTypeKFull string = "kFull" - - // SLARuleBackupRunTypeKLog captures enum value "kLog" - SLARuleBackupRunTypeKLog string = "kLog" -) - -// prop value enum -func (m *SLARule) validateBackupRunTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, slaRuleTypeBackupRunTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SLARule) validateBackupRunType(formats strfmt.Registry) error { - if swag.IsZero(m.BackupRunType) { // not required - return nil - } - - // value enum - if err := m.validateBackupRunTypeEnum("backupRunType", "body", *m.BackupRunType); err != nil { - return err - } - - return nil -} - -func (m *SLARule) validateSLAMinutes(formats strfmt.Registry) error { - if swag.IsZero(m.SLAMinutes) { // not required - return nil - } - - if err := validate.MinimumInt("slaMinutes", "body", *m.SLAMinutes, 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Sla rule based on context it is used -func (m *SLARule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SLARule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SLARule) UnmarshalBinary(b []byte) error { - var res SLARule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/slave_data.go b/v2/models/slave_data.go deleted file mode 100644 index 559af6ea..00000000 --- a/v2/models/slave_data.go +++ /dev/null @@ -1,118 +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" -) - -// SlaveData Specifies the object info. -// -// swagger:model SlaveData -type SlaveData struct { - - // Task handle assigned by the master. - TaskHandle *int64 `json:"taskHandle,omitempty"` - - // Expected gandalf session_id of the slave. - ExpectedSessionID *int64 `json:"expectedSessionId,omitempty"` - - // Information from where the slave can resume indexing work on the object. - IndexingCookie *string `json:"indexingCookie,omitempty"` - - // stats - Stats *GaiaIndexingStats `json:"stats,omitempty"` -} - -// Validate validates this slave data -func (m *SlaveData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SlaveData) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this slave data based on the context it is used -func (m *SlaveData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SlaveData) 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 -} - -// MarshalBinary interface implementation -func (m *SlaveData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SlaveData) UnmarshalBinary(b []byte) error { - var res SlaveData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_active_file_path.go b/v2/models/smb_active_file_path.go deleted file mode 100644 index c073f74e..00000000 --- a/v2/models/smb_active_file_path.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbActiveFilePath Specifies a file path in an SMB view that has active sessions and opens. -// -// swagger:model SmbActiveFilePath -type SmbActiveFilePath struct { - - // Specifies the name of the View. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the id of the View. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the filepath in the view. - FilePath *string `json:"filePath,omitempty"` - - // Specifies an active session where the file is open. - ActiveSessions []*SmbActiveSession `json:"activeSessions"` -} - -// Validate validates this smb active file path -func (m *SmbActiveFilePath) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveSessions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFilePath) validateActiveSessions(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveSessions) { // not required - return nil - } - - for i := 0; i < len(m.ActiveSessions); i++ { - if swag.IsZero(m.ActiveSessions[i]) { // not required - continue - } - - if m.ActiveSessions[i] != nil { - if err := m.ActiveSessions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb active file path based on the context it is used -func (m *SmbActiveFilePath) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveSessions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveFilePath) contextValidateActiveSessions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveSessions); i++ { - - if m.ActiveSessions[i] != nil { - - if swag.IsZero(m.ActiveSessions[i]) { // not required - return nil - } - - if err := m.ActiveSessions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeSessions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveFilePath) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveFilePath) UnmarshalBinary(b []byte) error { - var res SmbActiveFilePath - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_active_open.go b/v2/models/smb_active_open.go deleted file mode 100644 index 157b016c..00000000 --- a/v2/models/smb_active_open.go +++ /dev/null @@ -1,192 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SmbActiveOpen Specifies an active open of an SMB file, its access and sharing information. -// -// swagger:model SmbActiveOpen -type SmbActiveOpen struct { - - // Specifies the id of the active open. - OpenID *int64 `json:"openId,omitempty"` - - // Specifies the File Access Type. Following documentation was taken from MSDN. - // https://msdn.microsoft.com/en-us/library/Cc246802.aspx - // - // 'FileReadData' indicates the right to read data from the file or named - // pipe. - // 'FileWriteData' indicates the right to write data into the file or named - // pipe beyond the end of the file. - // 'FileAppendData' indicates the right to append data into the file or named - // pipe. - // 'FileReadEa' indicates the right to read the extended attributes of the - // file or named pipe. - // 'FileWriteEa' indicates the right to write or change the extended - // attributes to the file or named pipe. - // 'FileExecute' indicates the right to delete entries within a directory. - // 'FileDeleteChild' indicates the right to execute the file. - // 'FileReadAttributes' indicates the right to read the attributes of the - // file. - // 'FileWriteAttributes' indicates the right to change the attributes of the - // file. - // 'Delete' indicates the right to delete the file. - // 'ReadControl' indicates the right to read the security descriptor for the - // file or named pipe. - // 'WriteDac' indicates the right to change the discretionary access control - // list (DACL) in the security descriptor for the file or named pipe. For - // the DACL data structure, see ACL in [MS-DTYP]. - // 'WriteOwner' indicates the right to change the owner in the security - // descriptor for the file or named pipe. - // 'Synchronize' is used only by SMB2 clients. - // 'AccessSystemSecurity' indicates the right to read or change the system - // access control list (SACL) in the security descriptor for the file or - // named pipe. For the SACL data structure, see ACL in [MS-DTYP].<42> - // 'MaximumAllowed' indicates that the client is requesting an open to the - // file with the highest level of access the client has on this file. - // If no access is granted for the client on this file, the server MUST - // fail the open with STATUS_ACCESS_DENIED. - // 'GenericAll' indicates a request for all the access flags that are - // previously listed except MaximumAllowed and AccessSystemSecurity. - // 'GenericExecute' indicates a request for the following combination of - // access flags listed above: - // FileReadAttributes| FileExecute| Synchronize| ReadControl. - // 'GenericWrite' indicates a request for the following combination of - // access flags listed above: - // FileWriteData| FileAppendData| FileWriteAttributes| FileWriteEa| - // Synchronize| ReadControl. - // 'GenericRead' indicates a request for the following combination of - // access flags listed above: - // FileReadData| FileReadAttributes| FileReadEa| Synchronize| - // ReadControl. - AccessInfoList []string `json:"accessInfoList"` - - // Specifies whether access privilege of others if they're allowed to read/write/delete. - AccessPrivilege []string `json:"accessPrivilege"` -} - -// Validate validates this smb active open -func (m *SmbActiveOpen) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessInfoList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAccessPrivilege(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var smbActiveOpenAccessInfoListItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FileReadData","FileWriteData","FileAppendData","FileReadEa","FileWriteEa","FileExecute","FileDeleteChild","FileReadAttributes","FileWriteAttributes","Delete","ReadControl","WriteDac","WriteOwner","Synchronize","AccessSystemSecurity","MaximumAllowed","GenericAll","GenericExecute","GenericWrite","GenericRead"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbActiveOpenAccessInfoListItemsEnum = append(smbActiveOpenAccessInfoListItemsEnum, v) - } -} - -func (m *SmbActiveOpen) validateAccessInfoListItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbActiveOpenAccessInfoListItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbActiveOpen) validateAccessInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.AccessInfoList) { // not required - return nil - } - - for i := 0; i < len(m.AccessInfoList); i++ { - - // value enum - if err := m.validateAccessInfoListItemsEnum("accessInfoList"+"."+strconv.Itoa(i), "body", m.AccessInfoList[i]); err != nil { - return err - } - - } - - return nil -} - -var smbActiveOpenAccessPrivilegeItemsEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Read","Write","Delete"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbActiveOpenAccessPrivilegeItemsEnum = append(smbActiveOpenAccessPrivilegeItemsEnum, v) - } -} - -func (m *SmbActiveOpen) validateAccessPrivilegeItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbActiveOpenAccessPrivilegeItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbActiveOpen) validateAccessPrivilege(formats strfmt.Registry) error { - if swag.IsZero(m.AccessPrivilege) { // not required - return nil - } - - for i := 0; i < len(m.AccessPrivilege); i++ { - - // value enum - if err := m.validateAccessPrivilegeItemsEnum("accessPrivilege"+"."+strconv.Itoa(i), "body", m.AccessPrivilege[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this smb active open based on context it is used -func (m *SmbActiveOpen) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveOpen) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveOpen) UnmarshalBinary(b []byte) error { - var res SmbActiveOpen - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_active_session.go b/v2/models/smb_active_session.go deleted file mode 100644 index 55e6caaa..00000000 --- a/v2/models/smb_active_session.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbActiveSession Specifies an active session and its file opens. -// -// swagger:model SmbActiveSession -type SmbActiveSession struct { - - // Specifies the id of the session. - SessionID *int64 `json:"sessionId,omitempty"` - - // Specifies the IP address from which the file is open. - ClientIP *string `json:"clientIp,omitempty"` - - // Specifies the username who keeps the file open. - UserName *string `json:"userName,omitempty"` - - // Specifies the domain of the user. - Domain *string `json:"domain,omitempty"` - - // Specifies an active open of an SMB file, its access and sharing information. - ActiveOpens []*SmbActiveOpen `json:"activeOpens"` -} - -// Validate validates this smb active session -func (m *SmbActiveSession) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveOpens(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveSession) validateActiveOpens(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveOpens) { // not required - return nil - } - - for i := 0; i < len(m.ActiveOpens); i++ { - if swag.IsZero(m.ActiveOpens[i]) { // not required - continue - } - - if m.ActiveOpens[i] != nil { - if err := m.ActiveOpens[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb active session based on the context it is used -func (m *SmbActiveSession) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveOpens(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbActiveSession) contextValidateActiveOpens(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveOpens); i++ { - - if m.ActiveOpens[i] != nil { - - if swag.IsZero(m.ActiveOpens[i]) { // not required - return nil - } - - if err := m.ActiveOpens[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeOpens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbActiveSession) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbActiveSession) UnmarshalBinary(b []byte) error { - var res SmbActiveSession - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_config.go b/v2/models/smb_config.go deleted file mode 100644 index 6eeb1dec..00000000 --- a/v2/models/smb_config.go +++ /dev/null @@ -1,187 +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" -) - -// SmbConfig Specifies the SMB config settings for this View. -// -// swagger:model SmbConfig -type SmbConfig struct { - - // If set, it enables discovery of view for SMB. - EnableSmbViewDiscovery *bool `json:"enableSmbViewDiscovery,omitempty"` - - // Specifies if access-based enumeration should be enabled. - // If 'true', only files and folders that the user has permissions to - // access are visible on the SMB share for that user. - EnableSmbAccessBasedEnumeration *bool `json:"enableSmbAccessBasedEnumeration,omitempty"` - - // Specifies the SMB encryption for the View. If set, it enables the SMB - // encryption for the View. Encryption is supported only by SMB 3.x dialects. - // Dialects that do not support would still access data in unencrypted - // format. - EnableSmbEncryption *bool `json:"enableSmbEncryption,omitempty"` - - // Specifies the SMB encryption for all the sessions for the View. - // If set, encryption is enforced for all the sessions for the View. When - // enabled all future and existing unencrypted sessions are disallowed. - EnforceSmbEncryption *bool `json:"enforceSmbEncryption,omitempty"` - - // Specifies whether fast durable handle is enabled. If enabled, view open - // handle will be kept in memory, which results in a higher performance. But - // the handles cannot be recovered if node or service crashes. - EnableFastDurableHandle *bool `json:"enableFastDurableHandle,omitempty"` - - // Specifies whether SMB opportunistic lock is enabled. - EnableSmbOplock *bool `json:"enableSmbOplock,omitempty"` - - // Specifies share level permissions of the view. - SharePermissions *ViewSharePermissions `json:"sharePermissions,omitempty"` - - // Specifies the SMB permissions for the View. - SmbPermissionsInfo *SmbPermissionsInfo `json:"smbPermissionsInfo,omitempty"` -} - -// Validate validates this smb config -func (m *SmbConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSharePermissions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbPermissionsInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbConfig) validateSharePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - if m.SharePermissions != nil { - if err := m.SharePermissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions") - } - return err - } - } - - return nil -} - -func (m *SmbConfig) validateSmbPermissionsInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if m.SmbPermissionsInfo != nil { - if err := m.SmbPermissionsInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this smb config based on the context it is used -func (m *SmbConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSharePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbPermissionsInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbConfig) contextValidateSharePermissions(ctx context.Context, formats strfmt.Registry) error { - - if m.SharePermissions != nil { - - if swag.IsZero(m.SharePermissions) { // not required - return nil - } - - if err := m.SharePermissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sharePermissions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sharePermissions") - } - return err - } - } - - return nil -} - -func (m *SmbConfig) contextValidateSmbPermissionsInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbPermissionsInfo != nil { - - if swag.IsZero(m.SmbPermissionsInfo) { // not required - return nil - } - - if err := m.SmbPermissionsInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbPermissionsInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbPermissionsInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbConfig) UnmarshalBinary(b []byte) error { - var res SmbConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_file_access_types.go b/v2/models/smb_file_access_types.go deleted file mode 100644 index 1a467c37..00000000 --- a/v2/models/smb_file_access_types.go +++ /dev/null @@ -1,161 +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" -) - -// SmbFileAccessTypes SMB File Access types -// -// Specifies the SMB file access types. -// -// swagger:model SmbFileAccessTypes -type SmbFileAccessTypes struct { - - // Specifies the list of SMB file access types. - // Enum: ["FileReadData","FileWriteData","FileAppendData","FileReadEa","FileWriteEa","FileExecute","FileDeleteChild","FileReadAttributes","FileWriteAttributes","Delete","ReadControl","WriteDac","WriteOwner","Synchronize","AccessSystemSecurity","MaximumAllowed","GenericAll","GenericExecute","GenericWrite","GenericRead"] - Value string `json:"value,omitempty"` -} - -// Validate validates this smb file access types -func (m *SmbFileAccessTypes) 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 smbFileAccessTypesTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FileReadData","FileWriteData","FileAppendData","FileReadEa","FileWriteEa","FileExecute","FileDeleteChild","FileReadAttributes","FileWriteAttributes","Delete","ReadControl","WriteDac","WriteOwner","Synchronize","AccessSystemSecurity","MaximumAllowed","GenericAll","GenericExecute","GenericWrite","GenericRead"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbFileAccessTypesTypeValuePropEnum = append(smbFileAccessTypesTypeValuePropEnum, v) - } -} - -const ( - - // SmbFileAccessTypesValueFileReadData captures enum value "FileReadData" - SmbFileAccessTypesValueFileReadData string = "FileReadData" - - // SmbFileAccessTypesValueFileWriteData captures enum value "FileWriteData" - SmbFileAccessTypesValueFileWriteData string = "FileWriteData" - - // SmbFileAccessTypesValueFileAppendData captures enum value "FileAppendData" - SmbFileAccessTypesValueFileAppendData string = "FileAppendData" - - // SmbFileAccessTypesValueFileReadEa captures enum value "FileReadEa" - SmbFileAccessTypesValueFileReadEa string = "FileReadEa" - - // SmbFileAccessTypesValueFileWriteEa captures enum value "FileWriteEa" - SmbFileAccessTypesValueFileWriteEa string = "FileWriteEa" - - // SmbFileAccessTypesValueFileExecute captures enum value "FileExecute" - SmbFileAccessTypesValueFileExecute string = "FileExecute" - - // SmbFileAccessTypesValueFileDeleteChild captures enum value "FileDeleteChild" - SmbFileAccessTypesValueFileDeleteChild string = "FileDeleteChild" - - // SmbFileAccessTypesValueFileReadAttributes captures enum value "FileReadAttributes" - SmbFileAccessTypesValueFileReadAttributes string = "FileReadAttributes" - - // SmbFileAccessTypesValueFileWriteAttributes captures enum value "FileWriteAttributes" - SmbFileAccessTypesValueFileWriteAttributes string = "FileWriteAttributes" - - // SmbFileAccessTypesValueDelete captures enum value "Delete" - SmbFileAccessTypesValueDelete string = "Delete" - - // SmbFileAccessTypesValueReadControl captures enum value "ReadControl" - SmbFileAccessTypesValueReadControl string = "ReadControl" - - // SmbFileAccessTypesValueWriteDac captures enum value "WriteDac" - SmbFileAccessTypesValueWriteDac string = "WriteDac" - - // SmbFileAccessTypesValueWriteOwner captures enum value "WriteOwner" - SmbFileAccessTypesValueWriteOwner string = "WriteOwner" - - // SmbFileAccessTypesValueSynchronize captures enum value "Synchronize" - SmbFileAccessTypesValueSynchronize string = "Synchronize" - - // SmbFileAccessTypesValueAccessSystemSecurity captures enum value "AccessSystemSecurity" - SmbFileAccessTypesValueAccessSystemSecurity string = "AccessSystemSecurity" - - // SmbFileAccessTypesValueMaximumAllowed captures enum value "MaximumAllowed" - SmbFileAccessTypesValueMaximumAllowed string = "MaximumAllowed" - - // SmbFileAccessTypesValueGenericAll captures enum value "GenericAll" - SmbFileAccessTypesValueGenericAll string = "GenericAll" - - // SmbFileAccessTypesValueGenericExecute captures enum value "GenericExecute" - SmbFileAccessTypesValueGenericExecute string = "GenericExecute" - - // SmbFileAccessTypesValueGenericWrite captures enum value "GenericWrite" - SmbFileAccessTypesValueGenericWrite string = "GenericWrite" - - // SmbFileAccessTypesValueGenericRead captures enum value "GenericRead" - SmbFileAccessTypesValueGenericRead string = "GenericRead" -) - -// prop value enum -func (m *SmbFileAccessTypes) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbFileAccessTypesTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbFileAccessTypes) 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 smb file access types based on context it is used -func (m *SmbFileAccessTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbFileAccessTypes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbFileAccessTypes) UnmarshalBinary(b []byte) error { - var res SmbFileAccessTypes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_file_opens.go b/v2/models/smb_file_opens.go deleted file mode 100644 index 97d089bd..00000000 --- a/v2/models/smb_file_opens.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbFileOpens Specifies the response to SMB active file opens. -// -// swagger:model SmbFileOpens -type SmbFileOpens struct { - - // Specifies the active opens for an SMB file in a view. - ActiveFilePaths []*SmbActiveFilePath `json:"activeFilePaths"` - - // Specifies the pagination cookie - Cookie *string `json:"cookie,omitempty"` -} - -// Validate validates this smb file opens -func (m *SmbFileOpens) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveFilePaths(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbFileOpens) validateActiveFilePaths(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveFilePaths) { // not required - return nil - } - - for i := 0; i < len(m.ActiveFilePaths); i++ { - if swag.IsZero(m.ActiveFilePaths[i]) { // not required - continue - } - - if m.ActiveFilePaths[i] != nil { - if err := m.ActiveFilePaths[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb file opens based on the context it is used -func (m *SmbFileOpens) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveFilePaths(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbFileOpens) contextValidateActiveFilePaths(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveFilePaths); i++ { - - if m.ActiveFilePaths[i] != nil { - - if swag.IsZero(m.ActiveFilePaths[i]) { // not required - return nil - } - - if err := m.ActiveFilePaths[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeFilePaths" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbFileOpens) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbFileOpens) UnmarshalBinary(b []byte) error { - var res SmbFileOpens - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_mount_credentials.go b/v2/models/smb_mount_credentials.go deleted file mode 100644 index 15887f1d..00000000 --- a/v2/models/smb_mount_credentials.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" -) - -// SmbMountCredentials SMB Mount Credentials. -// -// Specifies the credentials to mount a view. -// -// swagger:model SmbMountCredentials -type SmbMountCredentials struct { - Credentials -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SmbMountCredentials) 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 SmbMountCredentials) 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 smb mount credentials -func (m *SmbMountCredentials) 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 smb mount credentials based on the context it is used -func (m *SmbMountCredentials) 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 *SmbMountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbMountCredentials) UnmarshalBinary(b []byte) error { - var res SmbMountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_permission.go b/v2/models/smb_permission.go deleted file mode 100644 index dbaba702..00000000 --- a/v2/models/smb_permission.go +++ /dev/null @@ -1,272 +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" -) - -// SmbPermission SMB Permission. -// -// Specifies information about a single SMB permission. -// -// swagger:model SmbPermission -type SmbPermission struct { - - // Specifies the type of permission. - // 'Allow' indicates access is allowed. - // 'Deny' indicates access is denied. - // 'SpecialType' indicates a type defined in the Access Control Entry (ACE) - // does not map to 'Allow' or 'Deny'. - // Enum: ["Allow","Deny","SpecialType"] - Type *string `json:"type,omitempty"` - - // Specifies how the permission should be applied to folders and/or files. - // 'FolderSubFoldersAndFiles' indicates that permissions are applied to a Folder - // and it's sub folders and files. - // 'FolderAndSubFolders' indicates that permissions are applied to a Folder and it's sub folders. - // 'FolderAndSubFiles' indicates that permissions are applied to a Folder and it's sub files. - // 'FolderOnly' indicates that permsission are applied to folder only. - // 'SubFoldersAndFilesOnly' indicates that permissions are applied to sub folders and files only. - // 'SubFoldersOnly' indicates that permissiona are applied to sub folders only. - // 'FilesOnly' indicates that permissions are applied to files only. - // Enum: ["FolderSubFoldersAndFiles","FolderAndSubFolders","FolderAndFiles","FolderOnly","SubFoldersAndFilesOnly","SubFoldersOnly","FilesOnly"] - Mode *string `json:"mode,omitempty"` - - // Specifies the read/write access to the SMB share. - // 'ReadyOnly' indicates read only access to the SMB share. - // 'ReadWrite' indicates read and write access to the SMB share. - // 'FullControl' indicates full administrative control of the SMB share. - // 'SpecialAccess' indicates custom permissions to the SMB share using - // access masks structures. - // 'SuperUser' indicates root permissions ignoring all SMB ACLs. - // Enum: ["ReadOnly","ReadWrite","Modify","FullControl","SpecialAccess"] - Access *string `json:"access,omitempty"` - - // Specifies the security identifier (SID) of the principal. - Sid *string `json:"sid,omitempty"` - - // Specifies a custom type. - // When the type from the Access Control Entry (ACE) cannot be mapped - // to one of the enums in 'type', this field is populated with the custom - // type derived from the ACE and 'type' is set to kSpecialType. - // This is a placeholder for storing an unmapped type and should - // not be set when creating and editing a View. - SpecialType *int32 `json:"specialType,omitempty"` - - // Specifies custom access permissions. - // When the access mask from the Access Control Entry (ACE) cannot be mapped - // to one of the enums in 'access', this field is populated - // with the custom mask derived from the ACE and 'access' is set - // to kSpecialAccess. - // This is a placeholder for storing an unmapped access permission and should - // not be set when creating and editing a View. - SpecialAccessMask *uint32 `json:"specialAccessMask,omitempty"` -} - -// Validate validates this smb permission -func (m *SmbPermission) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAccess(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var smbPermissionTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Allow","Deny","SpecialType"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeTypePropEnum = append(smbPermissionTypeTypePropEnum, v) - } -} - -const ( - - // SmbPermissionTypeAllow captures enum value "Allow" - SmbPermissionTypeAllow string = "Allow" - - // SmbPermissionTypeDeny captures enum value "Deny" - SmbPermissionTypeDeny string = "Deny" - - // SmbPermissionTypeSpecialType captures enum value "SpecialType" - SmbPermissionTypeSpecialType string = "SpecialType" -) - -// prop value enum -func (m *SmbPermission) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -var smbPermissionTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["FolderSubFoldersAndFiles","FolderAndSubFolders","FolderAndFiles","FolderOnly","SubFoldersAndFilesOnly","SubFoldersOnly","FilesOnly"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeModePropEnum = append(smbPermissionTypeModePropEnum, v) - } -} - -const ( - - // SmbPermissionModeFolderSubFoldersAndFiles captures enum value "FolderSubFoldersAndFiles" - SmbPermissionModeFolderSubFoldersAndFiles string = "FolderSubFoldersAndFiles" - - // SmbPermissionModeFolderAndSubFolders captures enum value "FolderAndSubFolders" - SmbPermissionModeFolderAndSubFolders string = "FolderAndSubFolders" - - // SmbPermissionModeFolderAndFiles captures enum value "FolderAndFiles" - SmbPermissionModeFolderAndFiles string = "FolderAndFiles" - - // SmbPermissionModeFolderOnly captures enum value "FolderOnly" - SmbPermissionModeFolderOnly string = "FolderOnly" - - // SmbPermissionModeSubFoldersAndFilesOnly captures enum value "SubFoldersAndFilesOnly" - SmbPermissionModeSubFoldersAndFilesOnly string = "SubFoldersAndFilesOnly" - - // SmbPermissionModeSubFoldersOnly captures enum value "SubFoldersOnly" - SmbPermissionModeSubFoldersOnly string = "SubFoldersOnly" - - // SmbPermissionModeFilesOnly captures enum value "FilesOnly" - SmbPermissionModeFilesOnly string = "FilesOnly" -) - -// prop value enum -func (m *SmbPermission) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { - return err - } - - return nil -} - -var smbPermissionTypeAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ReadOnly","ReadWrite","Modify","FullControl","SpecialAccess"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - smbPermissionTypeAccessPropEnum = append(smbPermissionTypeAccessPropEnum, v) - } -} - -const ( - - // SmbPermissionAccessReadOnly captures enum value "ReadOnly" - SmbPermissionAccessReadOnly string = "ReadOnly" - - // SmbPermissionAccessReadWrite captures enum value "ReadWrite" - SmbPermissionAccessReadWrite string = "ReadWrite" - - // SmbPermissionAccessModify captures enum value "Modify" - SmbPermissionAccessModify string = "Modify" - - // SmbPermissionAccessFullControl captures enum value "FullControl" - SmbPermissionAccessFullControl string = "FullControl" - - // SmbPermissionAccessSpecialAccess captures enum value "SpecialAccess" - SmbPermissionAccessSpecialAccess string = "SpecialAccess" -) - -// prop value enum -func (m *SmbPermission) validateAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, smbPermissionTypeAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SmbPermission) validateAccess(formats strfmt.Registry) error { - if swag.IsZero(m.Access) { // not required - return nil - } - - // value enum - if err := m.validateAccessEnum("access", "body", *m.Access); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this smb permission based on context it is used -func (m *SmbPermission) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SmbPermission) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbPermission) UnmarshalBinary(b []byte) error { - var res SmbPermission - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smb_permissions_info.go b/v2/models/smb_permissions_info.go deleted file mode 100644 index 9a196d43..00000000 --- a/v2/models/smb_permissions_info.go +++ /dev/null @@ -1,128 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SmbPermissionsInfo SMB Permissions Information. -// -// Specifies information about SMB permissions. -// -// swagger:model SmbPermissionsInfo -type SmbPermissionsInfo struct { - - // Specifies the security identifier (SID) of the owner of the SMB - // share. - OwnerSid *string `json:"ownerSid,omitempty"` - - // Array of SMB Permissions. - // Specifies a list of SMB permissions. - Permissions []*SmbPermission `json:"permissions"` -} - -// Validate validates this smb permissions info -func (m *SmbPermissionsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbPermissionsInfo) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this smb permissions info based on the context it is used -func (m *SmbPermissionsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SmbPermissionsInfo) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SmbPermissionsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SmbPermissionsInfo) UnmarshalBinary(b []byte) error { - var res SmbPermissionsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/smtp_configuration.go b/v2/models/smtp_configuration.go deleted file mode 100644 index cde7d504..00000000 --- a/v2/models/smtp_configuration.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" - "github.com/go-openapi/validate" -) - -// SMTPConfiguration Specifies the SMTP configuration details. -// -// swagger:model SMTPConfiguration -type SMTPConfiguration struct { - - // Specifies the username which will be used to connect to the SMTP server. If username is not specified, then it would imply that SMTP server is set up for unauthenticated access. - Username *string `json:"username,omitempty"` - - // Specifies the IP address or the FQDN of the SMTP server. - // Required: true - Hostname string `json:"hostname"` - - // Specifies the SMTP port. Usually 465 or 587. For authenticated connection, it is generally 587. - // Required: true - Port int32 `json:"port"` - - // This is set to true when the SMTP server uses SSL/TLS without supporting STARTTLS. Typically, this is used for port 465. - UseSSL *bool `json:"useSSL,omitempty"` - - // Specifies if the SMTP configuration is active. - IsActive *bool `json:"isActive,omitempty"` -} - -// Validate validates this SMTP configuration -func (m *SMTPConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHostname(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePort(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SMTPConfiguration) validateHostname(formats strfmt.Registry) error { - - if err := validate.RequiredString("hostname", "body", m.Hostname); err != nil { - return err - } - - return nil -} - -func (m *SMTPConfiguration) validatePort(formats strfmt.Registry) error { - - if err := validate.Required("port", "body", int32(m.Port)); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this SMTP configuration based on context it is used -func (m *SMTPConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SMTPConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SMTPConfiguration) UnmarshalBinary(b []byte) error { - var res SMTPConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snap_mirror_config.go b/v2/models/snap_mirror_config.go deleted file mode 100644 index f6bb3018..00000000 --- a/v2/models/snap_mirror_config.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" -) - -// SnapMirrorConfig Specifies the snapshot backup configuration if S3 views are used for backing up NetApp Data-Protect volumes. -// -// swagger:model SnapMirrorConfig -type SnapMirrorConfig struct { - - // Specifies the Id of the S3 view where data need to be written. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the incremental snapshot prefix value. - IncrementalPrefix *string `json:"incrementalPrefix,omitempty"` -} - -// Validate validates this snap mirror config -func (m *SnapMirrorConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snap mirror config based on context it is used -func (m *SnapMirrorConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapMirrorConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapMirrorConfig) UnmarshalBinary(b []byte) error { - var res SnapMirrorConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_actions.go b/v2/models/snapshot_actions.go deleted file mode 100644 index 980050c7..00000000 --- a/v2/models/snapshot_actions.go +++ /dev/null @@ -1,188 +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" -) - -// SnapshotActions Snapshot Actions -// -// # Snapshot Actions -// -// swagger:model SnapshotActions -type SnapshotActions struct { - - // Snapshot Actions - // Enum: ["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","MountVolumes","RecoverVApps","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverSanVolumes","RecoverNamespaces","RecoverObjects","DownloadFilesAndFolders","RecoverPublicFolders","RecoverVAppTemplates","RecoverMailbox","RecoverOneDrive","RecoverMsTeam","RecoverMsGroup","RecoverSharePoint","ConvertToPst","RecoverSfdcRecords","RecoverAzureSQL","DownloadChats","RecoverRDSPostgres"] - SnapshotActions string `json:"snapshotActions,omitempty"` -} - -// Validate validates this snapshot actions -func (m *SnapshotActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotActionsTypeSnapshotActionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverVMs","RecoverFiles","InstantVolumeMount","RecoverVmDisks","MountVolumes","RecoverVApps","RecoverRDS","RecoverAurora","RecoverS3Buckets","RecoverApps","RecoverNasVolume","RecoverPhysicalVolumes","RecoverSystem","RecoverSanVolumes","RecoverNamespaces","RecoverObjects","DownloadFilesAndFolders","RecoverPublicFolders","RecoverVAppTemplates","RecoverMailbox","RecoverOneDrive","RecoverMsTeam","RecoverMsGroup","RecoverSharePoint","ConvertToPst","RecoverSfdcRecords","RecoverAzureSQL","DownloadChats","RecoverRDSPostgres"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotActionsTypeSnapshotActionsPropEnum = append(snapshotActionsTypeSnapshotActionsPropEnum, v) - } -} - -const ( - - // SnapshotActionsSnapshotActionsRecoverVMs captures enum value "RecoverVMs" - SnapshotActionsSnapshotActionsRecoverVMs string = "RecoverVMs" - - // SnapshotActionsSnapshotActionsRecoverFiles captures enum value "RecoverFiles" - SnapshotActionsSnapshotActionsRecoverFiles string = "RecoverFiles" - - // SnapshotActionsSnapshotActionsInstantVolumeMount captures enum value "InstantVolumeMount" - SnapshotActionsSnapshotActionsInstantVolumeMount string = "InstantVolumeMount" - - // SnapshotActionsSnapshotActionsRecoverVMDisks captures enum value "RecoverVmDisks" - SnapshotActionsSnapshotActionsRecoverVMDisks string = "RecoverVmDisks" - - // SnapshotActionsSnapshotActionsMountVolumes captures enum value "MountVolumes" - SnapshotActionsSnapshotActionsMountVolumes string = "MountVolumes" - - // SnapshotActionsSnapshotActionsRecoverVApps captures enum value "RecoverVApps" - SnapshotActionsSnapshotActionsRecoverVApps string = "RecoverVApps" - - // SnapshotActionsSnapshotActionsRecoverRDS captures enum value "RecoverRDS" - SnapshotActionsSnapshotActionsRecoverRDS string = "RecoverRDS" - - // SnapshotActionsSnapshotActionsRecoverAurora captures enum value "RecoverAurora" - SnapshotActionsSnapshotActionsRecoverAurora string = "RecoverAurora" - - // SnapshotActionsSnapshotActionsRecoverS3Buckets captures enum value "RecoverS3Buckets" - SnapshotActionsSnapshotActionsRecoverS3Buckets string = "RecoverS3Buckets" - - // SnapshotActionsSnapshotActionsRecoverApps captures enum value "RecoverApps" - SnapshotActionsSnapshotActionsRecoverApps string = "RecoverApps" - - // SnapshotActionsSnapshotActionsRecoverNasVolume captures enum value "RecoverNasVolume" - SnapshotActionsSnapshotActionsRecoverNasVolume string = "RecoverNasVolume" - - // SnapshotActionsSnapshotActionsRecoverPhysicalVolumes captures enum value "RecoverPhysicalVolumes" - SnapshotActionsSnapshotActionsRecoverPhysicalVolumes string = "RecoverPhysicalVolumes" - - // SnapshotActionsSnapshotActionsRecoverSystem captures enum value "RecoverSystem" - SnapshotActionsSnapshotActionsRecoverSystem string = "RecoverSystem" - - // SnapshotActionsSnapshotActionsRecoverSanVolumes captures enum value "RecoverSanVolumes" - SnapshotActionsSnapshotActionsRecoverSanVolumes string = "RecoverSanVolumes" - - // SnapshotActionsSnapshotActionsRecoverNamespaces captures enum value "RecoverNamespaces" - SnapshotActionsSnapshotActionsRecoverNamespaces string = "RecoverNamespaces" - - // SnapshotActionsSnapshotActionsRecoverObjects captures enum value "RecoverObjects" - SnapshotActionsSnapshotActionsRecoverObjects string = "RecoverObjects" - - // SnapshotActionsSnapshotActionsDownloadFilesAndFolders captures enum value "DownloadFilesAndFolders" - SnapshotActionsSnapshotActionsDownloadFilesAndFolders string = "DownloadFilesAndFolders" - - // SnapshotActionsSnapshotActionsRecoverPublicFolders captures enum value "RecoverPublicFolders" - SnapshotActionsSnapshotActionsRecoverPublicFolders string = "RecoverPublicFolders" - - // SnapshotActionsSnapshotActionsRecoverVAppTemplates captures enum value "RecoverVAppTemplates" - SnapshotActionsSnapshotActionsRecoverVAppTemplates string = "RecoverVAppTemplates" - - // SnapshotActionsSnapshotActionsRecoverMailbox captures enum value "RecoverMailbox" - SnapshotActionsSnapshotActionsRecoverMailbox string = "RecoverMailbox" - - // SnapshotActionsSnapshotActionsRecoverOneDrive captures enum value "RecoverOneDrive" - SnapshotActionsSnapshotActionsRecoverOneDrive string = "RecoverOneDrive" - - // SnapshotActionsSnapshotActionsRecoverMsTeam captures enum value "RecoverMsTeam" - SnapshotActionsSnapshotActionsRecoverMsTeam string = "RecoverMsTeam" - - // SnapshotActionsSnapshotActionsRecoverMsGroup captures enum value "RecoverMsGroup" - SnapshotActionsSnapshotActionsRecoverMsGroup string = "RecoverMsGroup" - - // SnapshotActionsSnapshotActionsRecoverSharePoint captures enum value "RecoverSharePoint" - SnapshotActionsSnapshotActionsRecoverSharePoint string = "RecoverSharePoint" - - // SnapshotActionsSnapshotActionsConvertToPst captures enum value "ConvertToPst" - SnapshotActionsSnapshotActionsConvertToPst string = "ConvertToPst" - - // SnapshotActionsSnapshotActionsRecoverSfdcRecords captures enum value "RecoverSfdcRecords" - SnapshotActionsSnapshotActionsRecoverSfdcRecords string = "RecoverSfdcRecords" - - // SnapshotActionsSnapshotActionsRecoverAzureSQL captures enum value "RecoverAzureSQL" - SnapshotActionsSnapshotActionsRecoverAzureSQL string = "RecoverAzureSQL" - - // SnapshotActionsSnapshotActionsDownloadChats captures enum value "DownloadChats" - SnapshotActionsSnapshotActionsDownloadChats string = "DownloadChats" - - // SnapshotActionsSnapshotActionsRecoverRDSPostgres captures enum value "RecoverRDSPostgres" - SnapshotActionsSnapshotActionsRecoverRDSPostgres string = "RecoverRDSPostgres" -) - -// prop value enum -func (m *SnapshotActions) validateSnapshotActionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotActionsTypeSnapshotActionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotActions) validateSnapshotActions(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotActions) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotActionsEnum("snapshotActions", "body", m.SnapshotActions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this snapshot actions based on context it is used -func (m *SnapshotActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotActions) UnmarshalBinary(b []byte) error { - var res SnapshotActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_diff_params.go b/v2/models/snapshot_diff_params.go deleted file mode 100644 index 920fab3d..00000000 --- a/v2/models/snapshot_diff_params.go +++ /dev/null @@ -1,278 +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" -) - -// SnapshotDiffParams snapshot diff params -// -// swagger:model SnapshotDiffParams -type SnapshotDiffParams struct { - - // cluster Id - // Required: true - ClusterID *int64 `json:"clusterId"` - - // incarnation Id - IncarnationID int64 `json:"incarnationId,omitempty"` - - // partition Id - // Required: true - PartitionID *int64 `json:"partitionId"` - - // job Id - // Required: true - JobID *int64 `json:"jobId"` - - // entity type - // Required: true - // Enum: ["kVMware","kPhysical","kView","kHyperV","kNetapp","kPure","kIsilon"] - EntityType *string `json:"entityType"` - - // base snapshot job instance Id - // Required: true - BaseSnapshotJobInstanceID *int64 `json:"baseSnapshotJobInstanceId"` - - // base snapshot time usecs - // Required: true - BaseSnapshotTimeUsecs *int64 `json:"baseSnapshotTimeUsecs"` - - // snapshot job instance Id - // Required: true - SnapshotJobInstanceID *int64 `json:"snapshotJobInstanceId"` - - // snapshot time usecs - // Required: true - SnapshotTimeUsecs *int64 `json:"snapshotTimeUsecs"` - - // page number - // Required: true - PageNumber *int64 `json:"pageNumber"` - - // page size - // Required: true - PageSize *int64 `json:"pageSize"` -} - -// Validate validates this snapshot diff params -func (m *SnapshotDiffParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePartitionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateJobID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntityType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBaseSnapshotJobInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBaseSnapshotTimeUsecs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotJobInstanceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTimeUsecs(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePageNumber(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePageSize(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotDiffParams) validateClusterID(formats strfmt.Registry) error { - - if err := validate.Required("clusterId", "body", m.ClusterID); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validatePartitionID(formats strfmt.Registry) error { - - if err := validate.Required("partitionId", "body", m.PartitionID); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validateJobID(formats strfmt.Registry) error { - - if err := validate.Required("jobId", "body", m.JobID); err != nil { - return err - } - - return nil -} - -var snapshotDiffParamsTypeEntityTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kPhysical","kView","kHyperV","kNetapp","kPure","kIsilon"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotDiffParamsTypeEntityTypePropEnum = append(snapshotDiffParamsTypeEntityTypePropEnum, v) - } -} - -const ( - - // SnapshotDiffParamsEntityTypeKVMware captures enum value "kVMware" - SnapshotDiffParamsEntityTypeKVMware string = "kVMware" - - // SnapshotDiffParamsEntityTypeKPhysical captures enum value "kPhysical" - SnapshotDiffParamsEntityTypeKPhysical string = "kPhysical" - - // SnapshotDiffParamsEntityTypeKView captures enum value "kView" - SnapshotDiffParamsEntityTypeKView string = "kView" - - // SnapshotDiffParamsEntityTypeKHyperV captures enum value "kHyperV" - SnapshotDiffParamsEntityTypeKHyperV string = "kHyperV" - - // SnapshotDiffParamsEntityTypeKNetapp captures enum value "kNetapp" - SnapshotDiffParamsEntityTypeKNetapp string = "kNetapp" - - // SnapshotDiffParamsEntityTypeKPure captures enum value "kPure" - SnapshotDiffParamsEntityTypeKPure string = "kPure" - - // SnapshotDiffParamsEntityTypeKIsilon captures enum value "kIsilon" - SnapshotDiffParamsEntityTypeKIsilon string = "kIsilon" -) - -// prop value enum -func (m *SnapshotDiffParams) validateEntityTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotDiffParamsTypeEntityTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotDiffParams) validateEntityType(formats strfmt.Registry) error { - - if err := validate.Required("entityType", "body", m.EntityType); err != nil { - return err - } - - // value enum - if err := m.validateEntityTypeEnum("entityType", "body", *m.EntityType); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validateBaseSnapshotJobInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("baseSnapshotJobInstanceId", "body", m.BaseSnapshotJobInstanceID); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validateBaseSnapshotTimeUsecs(formats strfmt.Registry) error { - - if err := validate.Required("baseSnapshotTimeUsecs", "body", m.BaseSnapshotTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validateSnapshotJobInstanceID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotJobInstanceId", "body", m.SnapshotJobInstanceID); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validateSnapshotTimeUsecs(formats strfmt.Registry) error { - - if err := validate.Required("snapshotTimeUsecs", "body", m.SnapshotTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validatePageNumber(formats strfmt.Registry) error { - - if err := validate.Required("pageNumber", "body", m.PageNumber); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffParams) validatePageSize(formats strfmt.Registry) error { - - if err := validate.Required("pageSize", "body", m.PageSize); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this snapshot diff params based on context it is used -func (m *SnapshotDiffParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotDiffParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotDiffParams) UnmarshalBinary(b []byte) error { - var res SnapshotDiffParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_diff_result.go b/v2/models/snapshot_diff_result.go deleted file mode 100644 index 50236425..00000000 --- a/v2/models/snapshot_diff_result.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SnapshotDiffResult snapshot diff result -// -// swagger:model SnapshotDiffResult -type SnapshotDiffResult struct { - - // status - // Required: true - // Enum: ["kRunning","kCompleted","kError"] - Status *string `json:"status"` - - // file operations - FileOperations []*FileOperation `json:"fileOperations"` -} - -// Validate validates this snapshot diff result -func (m *SnapshotDiffResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileOperations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotDiffResultTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kRunning","kCompleted","kError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotDiffResultTypeStatusPropEnum = append(snapshotDiffResultTypeStatusPropEnum, v) - } -} - -const ( - - // SnapshotDiffResultStatusKRunning captures enum value "kRunning" - SnapshotDiffResultStatusKRunning string = "kRunning" - - // SnapshotDiffResultStatusKCompleted captures enum value "kCompleted" - SnapshotDiffResultStatusKCompleted string = "kCompleted" - - // SnapshotDiffResultStatusKError captures enum value "kError" - SnapshotDiffResultStatusKError string = "kError" -) - -// prop value enum -func (m *SnapshotDiffResult) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotDiffResultTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotDiffResult) validateStatus(formats strfmt.Registry) error { - - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *SnapshotDiffResult) validateFileOperations(formats strfmt.Registry) error { - if swag.IsZero(m.FileOperations) { // not required - return nil - } - - for i := 0; i < len(m.FileOperations); i++ { - if swag.IsZero(m.FileOperations[i]) { // not required - continue - } - - if m.FileOperations[i] != nil { - if err := m.FileOperations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileOperations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileOperations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this snapshot diff result based on the context it is used -func (m *SnapshotDiffResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileOperations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotDiffResult) contextValidateFileOperations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileOperations); i++ { - - if m.FileOperations[i] != nil { - - if swag.IsZero(m.FileOperations[i]) { // not required - return nil - } - - if err := m.FileOperations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileOperations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileOperations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotDiffResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotDiffResult) UnmarshalBinary(b []byte) error { - var res SnapshotDiffResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_handle.go b/v2/models/snapshot_handle.go deleted file mode 100644 index 047cd52b..00000000 --- a/v2/models/snapshot_handle.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" -) - -// SnapshotHandle Information about the snapshots that exist on the system. -// -// swagger:model SnapshotHandle -type SnapshotHandle struct { - - // Specifies a distinct value that's unique to a source. - JobUID *int64 `json:"jobUid,omitempty"` - - // Run start time of the Magneto job run which has taken this snapshot. - RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` -} - -// Validate validates this snapshot handle -func (m *SnapshotHandle) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snapshot handle based on context it is used -func (m *SnapshotHandle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotHandle) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotHandle) UnmarshalBinary(b []byte) error { - var res SnapshotHandle - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_info.go b/v2/models/snapshot_info.go deleted file mode 100644 index 3223604a..00000000 --- a/v2/models/snapshot_info.go +++ /dev/null @@ -1,286 +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" -) - -// SnapshotInfo Snapshot information for an object. -// -// Snapshot info for an object. -// -// swagger:model SnapshotInfo -type SnapshotInfo struct { - - // Snapshot id for a successful snapshot. This field will not be set if the Protection Group Run has no successful attempt. - SnapshotID *string `json:"snapshotId,omitempty"` - - // Status of snapshot. - // Enum: ["kInProgress","kSuccessful","kFailed","kWaitingForNextAttempt","kWarning","kCurrentAttemptPaused","kCurrentAttemptResuming","kCurrentAttemptPausing","kWaitingForOlderBackupRun","kSkipped"] - Status *string `json:"status,omitempty"` - - // A message decribing the status. This will be populated currently only for kWaitingForOlderBackupRun status. - StatusMessage *string `json:"statusMessage,omitempty"` - - // Specifies the start time of attempt in Unix epoch Timestamp(in microseconds) for an object. - StartTimeUsecs *int64 `json:"startTimeUsecs,omitempty"` - - // Specifies the end time of attempt in Unix epoch Timestamp(in microseconds) for an object. - EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - - // Specifies the time at which the backup task was admitted to run in Unix epoch Timestamp(in microseconds) for an object. - AdmittedTimeUsecs *int64 `json:"admittedTimeUsecs,omitempty"` - - // Specifies the time when gatekeeper permit is granted to the backup task. If the backup task is rescheduled due to errors, the field is updated to the time when permit is granted again. - PermitGrantTimeUsecs *int64 `json:"permitGrantTimeUsecs,omitempty"` - - // Specifies the duration between the startTime and when gatekeeper permit is granted to the backup task. If the backup task is rescheduled due to errors, the field is updated considering the time when permit is granted again. Queue duration = PermitGrantTimeUsecs - StartTimeUsecs - QueueDurationUsecs *int64 `json:"queueDurationUsecs,omitempty"` - - // Specifies the time at which the source snapshot was taken in Unix epoch Timestamp(in microseconds) for an object. - SnapshotCreationTimeUsecs *int64 `json:"snapshotCreationTimeUsecs,omitempty"` - - // Statistics about backup data for an object. - Stats *BackupDataStats `json:"stats,omitempty"` - - // Progress monitor task for backup of the object. - ProgressTaskID *string `json:"progressTaskId,omitempty"` - - // Progress monitor task for the indexing of documents in an object. - IndexingTaskID *string `json:"indexingTaskId,omitempty"` - - // Stats task for an object. - StatsTaskID *string `json:"statsTaskId,omitempty"` - - // Specifies a list of warning messages. - Warnings []string `json:"warnings"` - - // Specifies whether the snapshot is deleted manually. - IsManuallyDeleted *bool `json:"isManuallyDeleted,omitempty"` - - // Specifies the expiry time of attempt in Unix epoch Timestamp (in microseconds) for an object. - ExpiryTimeUsecs *int64 `json:"expiryTimeUsecs,omitempty"` - - // The total number of file and directory entities visited in this backup. Only applicable to file based backups. - TotalFileCount *int64 `json:"totalFileCount,omitempty"` - - // The total number of file and directory entities that are backed up in this run. Only applicable to file based backups. - BackupFileCount *int64 `json:"backupFileCount,omitempty"` - - // Specifies the dataLock constraints for the snapshot info. - DataLockConstraints *DataLockConstraints `json:"dataLockConstraints,omitempty"` -} - -// Validate validates this snapshot info -func (m *SnapshotInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLockConstraints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInProgress","kSuccessful","kFailed","kWaitingForNextAttempt","kWarning","kCurrentAttemptPaused","kCurrentAttemptResuming","kCurrentAttemptPausing","kWaitingForOlderBackupRun","kSkipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotInfoTypeStatusPropEnum = append(snapshotInfoTypeStatusPropEnum, v) - } -} - -const ( - - // SnapshotInfoStatusKInProgress captures enum value "kInProgress" - SnapshotInfoStatusKInProgress string = "kInProgress" - - // SnapshotInfoStatusKSuccessful captures enum value "kSuccessful" - SnapshotInfoStatusKSuccessful string = "kSuccessful" - - // SnapshotInfoStatusKFailed captures enum value "kFailed" - SnapshotInfoStatusKFailed string = "kFailed" - - // SnapshotInfoStatusKWaitingForNextAttempt captures enum value "kWaitingForNextAttempt" - SnapshotInfoStatusKWaitingForNextAttempt string = "kWaitingForNextAttempt" - - // SnapshotInfoStatusKWarning captures enum value "kWarning" - SnapshotInfoStatusKWarning string = "kWarning" - - // SnapshotInfoStatusKCurrentAttemptPaused captures enum value "kCurrentAttemptPaused" - SnapshotInfoStatusKCurrentAttemptPaused string = "kCurrentAttemptPaused" - - // SnapshotInfoStatusKCurrentAttemptResuming captures enum value "kCurrentAttemptResuming" - SnapshotInfoStatusKCurrentAttemptResuming string = "kCurrentAttemptResuming" - - // SnapshotInfoStatusKCurrentAttemptPausing captures enum value "kCurrentAttemptPausing" - SnapshotInfoStatusKCurrentAttemptPausing string = "kCurrentAttemptPausing" - - // SnapshotInfoStatusKWaitingForOlderBackupRun captures enum value "kWaitingForOlderBackupRun" - SnapshotInfoStatusKWaitingForOlderBackupRun string = "kWaitingForOlderBackupRun" - - // SnapshotInfoStatusKSkipped captures enum value "kSkipped" - SnapshotInfoStatusKSkipped string = "kSkipped" -) - -// prop value enum -func (m *SnapshotInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *SnapshotInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *SnapshotInfo) validateDataLockConstraints(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if m.DataLockConstraints != nil { - if err := m.DataLockConstraints.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshot info based on the context it is used -func (m *SnapshotInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataLockConstraints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotInfo) 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 -} - -func (m *SnapshotInfo) contextValidateDataLockConstraints(ctx context.Context, formats strfmt.Registry) error { - - if m.DataLockConstraints != nil { - - if swag.IsZero(m.DataLockConstraints) { // not required - return nil - } - - if err := m.DataLockConstraints.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataLockConstraints") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataLockConstraints") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotInfo) UnmarshalBinary(b []byte) error { - var res SnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_label.go b/v2/models/snapshot_label.go deleted file mode 100644 index c1b7492e..00000000 --- a/v2/models/snapshot_label.go +++ /dev/null @@ -1,55 +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" -) - -// SnapshotLabel Snapshot Label -// -// Specifies the snapshot label for incremental and full backup of Secondary Netapp volumes (Data-Protect Volumes). -// -// swagger:model SnapshotLabel -type SnapshotLabel struct { - - // Specifies the incremental snapshot label value - IncrementalLabel *string `json:"incrementalLabel,omitempty"` - - // Specifies the full snapshot label value - FullLabel *string `json:"fullLabel,omitempty"` -} - -// Validate validates this snapshot label -func (m *SnapshotLabel) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snapshot label based on context it is used -func (m *SnapshotLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotLabel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotLabel) UnmarshalBinary(b []byte) error { - var res SnapshotLabel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_recovery_target_type.go b/v2/models/snapshot_recovery_target_type.go deleted file mode 100644 index 40229c2e..00000000 --- a/v2/models/snapshot_recovery_target_type.go +++ /dev/null @@ -1,52 +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" -) - -// SnapshotRecoveryTargetType Snapshot Recovery Target Type -// -// # Snapshot Recovery Target Type -// -// swagger:model SnapshotRecoveryTargetType -type SnapshotRecoveryTargetType struct { - - // Specifies the snapshot recovery target type. - SnapshotRecoveryTargetType string `json:"snapshotRecoveryTargetType,omitempty"` -} - -// Validate validates this snapshot recovery target type -func (m *SnapshotRecoveryTargetType) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this snapshot recovery target type based on context it is used -func (m *SnapshotRecoveryTargetType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotRecoveryTargetType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotRecoveryTargetType) UnmarshalBinary(b []byte) error { - var res SnapshotRecoveryTargetType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_tag_info.go b/v2/models/snapshot_tag_info.go deleted file mode 100644 index 98c6299f..00000000 --- a/v2/models/snapshot_tag_info.go +++ /dev/null @@ -1,117 +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" -) - -// SnapshotTagInfo Specifies the snapshot tag info for an object. -// -// swagger:model SnapshotTagInfo -type SnapshotTagInfo struct { - TagInfo - - // Specifies runs the tags are applied to. - RunIds []string `json:"runIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SnapshotTagInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TagInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TagInfo = aO0 - - // AO1 - var dataAO1 struct { - RunIds []string `json:"runIds"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.RunIds = dataAO1.RunIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SnapshotTagInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.TagInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - RunIds []string `json:"runIds"` - } - - dataAO1.RunIds = m.RunIds - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this snapshot tag info -func (m *SnapshotTagInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TagInfo - if err := m.TagInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this snapshot tag info based on the context it is used -func (m *SnapshotTagInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TagInfo - if err := m.TagInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotTagInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotTagInfo) UnmarshalBinary(b []byte) error { - var res SnapshotTagInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshot_target_type.go b/v2/models/snapshot_target_type.go deleted file mode 100644 index 60971b0c..00000000 --- a/v2/models/snapshot_target_type.go +++ /dev/null @@ -1,116 +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" -) - -// SnapshotTargetType Snapshot Target Type -// -// # Snapshot Target Type -// -// swagger:model SnapshotTargetType -type SnapshotTargetType struct { - - // Specifies the snapshot target type. - // Enum: ["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"] - SnapshotTargetType string `json:"snapshotTargetType,omitempty"` -} - -// Validate validates this snapshot target type -func (m *SnapshotTargetType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTargetType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotTargetTypeTypeSnapshotTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotTargetTypeTypeSnapshotTargetTypePropEnum = append(snapshotTargetTypeTypeSnapshotTargetTypePropEnum, v) - } -} - -const ( - - // SnapshotTargetTypeSnapshotTargetTypeLocal captures enum value "Local" - SnapshotTargetTypeSnapshotTargetTypeLocal string = "Local" - - // SnapshotTargetTypeSnapshotTargetTypeArchival captures enum value "Archival" - SnapshotTargetTypeSnapshotTargetTypeArchival string = "Archival" - - // SnapshotTargetTypeSnapshotTargetTypeRpaasArchival captures enum value "RpaasArchival" - SnapshotTargetTypeSnapshotTargetTypeRpaasArchival string = "RpaasArchival" - - // SnapshotTargetTypeSnapshotTargetTypeStorageArraySnapshot captures enum value "StorageArraySnapshot" - SnapshotTargetTypeSnapshotTargetTypeStorageArraySnapshot string = "StorageArraySnapshot" - - // SnapshotTargetTypeSnapshotTargetTypeRemote captures enum value "Remote" - SnapshotTargetTypeSnapshotTargetTypeRemote string = "Remote" -) - -// prop value enum -func (m *SnapshotTargetType) validateSnapshotTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotTargetTypeTypeSnapshotTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotTargetType) validateSnapshotTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetType) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotTargetTypeEnum("snapshotTargetType", "body", m.SnapshotTargetType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this snapshot target type based on context it is used -func (m *SnapshotTargetType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotTargetType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotTargetType) UnmarshalBinary(b []byte) error { - var res SnapshotTargetType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/snapshots_summary.go b/v2/models/snapshots_summary.go deleted file mode 100644 index d3df7882..00000000 --- a/v2/models/snapshots_summary.go +++ /dev/null @@ -1,315 +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" -) - -// SnapshotsSummary Specifies a summary of the object snapshots. -// -// swagger:model SnapshotsSummary -type SnapshotsSummary struct { - - // Specifies the cluster id where the snapshots is stored. - ClusterID *int64 `json:"clusterId,omitempty"` - - // Specifies the cluster incarnation id where the snapshots is stored. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // Specifies the cluster indentifier where the snapshots is stored. - RegionID *string `json:"regionId,omitempty"` - - // Specifies the target type where the Object's snapshot resides. - // Enum: ["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"] - SnapshotTargetType *string `json:"snapshotTargetType,omitempty"` - - // Specifies the number of snapshots of this type and target. - SnapshotCount *int64 `json:"snapshotCount,omitempty"` - - // Specifies the timestamp in Unix time epoch in microseconds when the latest snapshot is taken. - LatestSnapshotTimestampUsecs *int64 `json:"latestSnapshotTimestampUsecs,omitempty"` - - // Specifies the timestamp in Unix time epoch in microseconds when the latest run started. - LatestRunStartTimeUsecs *int64 `json:"latestRunStartTimeUsecs,omitempty"` - - // Specifies the status of latest run. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - LatestRunStatus *string `json:"latestRunStatus,omitempty"` - - // Specifies the ownership context of the snapshot target. - // Enum: ["Local","FortKnox"] - OwnershipContext *string `json:"ownershipContext,omitempty"` - - // Specifies the external target information if this is an archival snapshot. - ExternalTargetInfo *ArchivalTargetSummaryInfo `json:"externalTargetInfo,omitempty"` -} - -// Validate validates this snapshots summary -func (m *SnapshotsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLatestRunStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnershipContext(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalTargetInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var snapshotsSummaryTypeSnapshotTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival","RpaasArchival","StorageArraySnapshot","Remote"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotsSummaryTypeSnapshotTargetTypePropEnum = append(snapshotsSummaryTypeSnapshotTargetTypePropEnum, v) - } -} - -const ( - - // SnapshotsSummarySnapshotTargetTypeLocal captures enum value "Local" - SnapshotsSummarySnapshotTargetTypeLocal string = "Local" - - // SnapshotsSummarySnapshotTargetTypeArchival captures enum value "Archival" - SnapshotsSummarySnapshotTargetTypeArchival string = "Archival" - - // SnapshotsSummarySnapshotTargetTypeRpaasArchival captures enum value "RpaasArchival" - SnapshotsSummarySnapshotTargetTypeRpaasArchival string = "RpaasArchival" - - // SnapshotsSummarySnapshotTargetTypeStorageArraySnapshot captures enum value "StorageArraySnapshot" - SnapshotsSummarySnapshotTargetTypeStorageArraySnapshot string = "StorageArraySnapshot" - - // SnapshotsSummarySnapshotTargetTypeRemote captures enum value "Remote" - SnapshotsSummarySnapshotTargetTypeRemote string = "Remote" -) - -// prop value enum -func (m *SnapshotsSummary) validateSnapshotTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotsSummaryTypeSnapshotTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotsSummary) validateSnapshotTargetType(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTargetType) { // not required - return nil - } - - // value enum - if err := m.validateSnapshotTargetTypeEnum("snapshotTargetType", "body", *m.SnapshotTargetType); err != nil { - return err - } - - return nil -} - -var snapshotsSummaryTypeLatestRunStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotsSummaryTypeLatestRunStatusPropEnum = append(snapshotsSummaryTypeLatestRunStatusPropEnum, v) - } -} - -const ( - - // SnapshotsSummaryLatestRunStatusAccepted captures enum value "Accepted" - SnapshotsSummaryLatestRunStatusAccepted string = "Accepted" - - // SnapshotsSummaryLatestRunStatusRunning captures enum value "Running" - SnapshotsSummaryLatestRunStatusRunning string = "Running" - - // SnapshotsSummaryLatestRunStatusCanceled captures enum value "Canceled" - SnapshotsSummaryLatestRunStatusCanceled string = "Canceled" - - // SnapshotsSummaryLatestRunStatusCanceling captures enum value "Canceling" - SnapshotsSummaryLatestRunStatusCanceling string = "Canceling" - - // SnapshotsSummaryLatestRunStatusFailed captures enum value "Failed" - SnapshotsSummaryLatestRunStatusFailed string = "Failed" - - // SnapshotsSummaryLatestRunStatusMissed captures enum value "Missed" - SnapshotsSummaryLatestRunStatusMissed string = "Missed" - - // SnapshotsSummaryLatestRunStatusSucceeded captures enum value "Succeeded" - SnapshotsSummaryLatestRunStatusSucceeded string = "Succeeded" - - // SnapshotsSummaryLatestRunStatusSucceededWithWarning captures enum value "SucceededWithWarning" - SnapshotsSummaryLatestRunStatusSucceededWithWarning string = "SucceededWithWarning" - - // SnapshotsSummaryLatestRunStatusOnHold captures enum value "OnHold" - SnapshotsSummaryLatestRunStatusOnHold string = "OnHold" - - // SnapshotsSummaryLatestRunStatusFinalizing captures enum value "Finalizing" - SnapshotsSummaryLatestRunStatusFinalizing string = "Finalizing" - - // SnapshotsSummaryLatestRunStatusSkipped captures enum value "Skipped" - SnapshotsSummaryLatestRunStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *SnapshotsSummary) validateLatestRunStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotsSummaryTypeLatestRunStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotsSummary) validateLatestRunStatus(formats strfmt.Registry) error { - if swag.IsZero(m.LatestRunStatus) { // not required - return nil - } - - // value enum - if err := m.validateLatestRunStatusEnum("latestRunStatus", "body", *m.LatestRunStatus); err != nil { - return err - } - - return nil -} - -var snapshotsSummaryTypeOwnershipContextPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","FortKnox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - snapshotsSummaryTypeOwnershipContextPropEnum = append(snapshotsSummaryTypeOwnershipContextPropEnum, v) - } -} - -const ( - - // SnapshotsSummaryOwnershipContextLocal captures enum value "Local" - SnapshotsSummaryOwnershipContextLocal string = "Local" - - // SnapshotsSummaryOwnershipContextFortKnox captures enum value "FortKnox" - SnapshotsSummaryOwnershipContextFortKnox string = "FortKnox" -) - -// prop value enum -func (m *SnapshotsSummary) validateOwnershipContextEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, snapshotsSummaryTypeOwnershipContextPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SnapshotsSummary) validateOwnershipContext(formats strfmt.Registry) error { - if swag.IsZero(m.OwnershipContext) { // not required - return nil - } - - // value enum - if err := m.validateOwnershipContextEnum("ownershipContext", "body", *m.OwnershipContext); err != nil { - return err - } - - return nil -} - -func (m *SnapshotsSummary) validateExternalTargetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if m.ExternalTargetInfo != nil { - if err := m.ExternalTargetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this snapshots summary based on the context it is used -func (m *SnapshotsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExternalTargetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SnapshotsSummary) contextValidateExternalTargetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalTargetInfo != nil { - - if swag.IsZero(m.ExternalTargetInfo) { // not required - return nil - } - - if err := m.ExternalTargetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalTargetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalTargetInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotsSummary) UnmarshalBinary(b []byte) error { - var res SnapshotsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source.go b/v2/models/source.go deleted file mode 100644 index 6b290e6a..00000000 --- a/v2/models/source.go +++ /dev/null @@ -1,130 +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" -) - -// Source Protection Source. -// -// Specifies the Protection Source. -// -// swagger:model Source -type Source struct { - Object - - // Time at which the data about this protection source was last refreshed. - LastRefreshedTime *int64 `json:"lastRefreshedTime,omitempty"` - - // Id of the registration as part of which this source was discovered. - RegistrationID *int64 `json:"registrationId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Source) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Object - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Object = aO0 - - // AO1 - var dataAO1 struct { - LastRefreshedTime *int64 `json:"lastRefreshedTime,omitempty"` - - RegistrationID *int64 `json:"registrationId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.LastRefreshedTime = dataAO1.LastRefreshedTime - - m.RegistrationID = dataAO1.RegistrationID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Source) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Object) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - LastRefreshedTime *int64 `json:"lastRefreshedTime,omitempty"` - - RegistrationID *int64 `json:"registrationId,omitempty"` - } - - dataAO1.LastRefreshedTime = m.LastRefreshedTime - - dataAO1.RegistrationID = m.RegistrationID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source -func (m *Source) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this source based on the context it is used -func (m *Source) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Object - if err := m.Object.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Source) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Source) UnmarshalBinary(b []byte) error { - var res Source - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_attribute_filter.go b/v2/models/source_attribute_filter.go deleted file mode 100644 index a5a81e1b..00000000 --- a/v2/models/source_attribute_filter.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" -) - -// SourceAttributeFilter Specifies a pair of source filter attribute and its possible values. -// -// swagger:model SourceAttributeFilter -type SourceAttributeFilter struct { - - // Specifies the filter attribute for the source. - FilterAttribute *string `json:"filterAttribute,omitempty"` - - // Specifies the list of attribute values for above filter. - AttributeValues []string `json:"attributeValues"` -} - -// Validate validates this source attribute filter -func (m *SourceAttributeFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source attribute filter based on context it is used -func (m *SourceAttributeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SourceAttributeFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceAttributeFilter) UnmarshalBinary(b []byte) error { - var res SourceAttributeFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_attribute_filters_response_params.go b/v2/models/source_attribute_filters_response_params.go deleted file mode 100644 index eea930f2..00000000 --- a/v2/models/source_attribute_filters_response_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourceAttributeFiltersResponseParams Protection Source attribute filters -// -// swagger:model SourceAttributeFiltersResponseParams -type SourceAttributeFiltersResponseParams struct { - - // Specifies the list of protection source filters. - SourceAttributeFilters []*SourceAttributeFilter `json:"sourceAttributeFilters"` -} - -// Validate validates this source attribute filters response params -func (m *SourceAttributeFiltersResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceAttributeFilters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceAttributeFiltersResponseParams) validateSourceAttributeFilters(formats strfmt.Registry) error { - if swag.IsZero(m.SourceAttributeFilters) { // not required - return nil - } - - for i := 0; i < len(m.SourceAttributeFilters); i++ { - if swag.IsZero(m.SourceAttributeFilters[i]) { // not required - continue - } - - if m.SourceAttributeFilters[i] != nil { - if err := m.SourceAttributeFilters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAttributeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAttributeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this source attribute filters response params based on the context it is used -func (m *SourceAttributeFiltersResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceAttributeFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceAttributeFiltersResponseParams) contextValidateSourceAttributeFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceAttributeFilters); i++ { - - if m.SourceAttributeFilters[i] != nil { - - if swag.IsZero(m.SourceAttributeFilters[i]) { // not required - return nil - } - - if err := m.SourceAttributeFilters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceAttributeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceAttributeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceAttributeFiltersResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceAttributeFiltersResponseParams) UnmarshalBinary(b []byte) error { - var res SourceAttributeFiltersResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_backup_deactivation.go b/v2/models/source_backup_deactivation.go deleted file mode 100644 index 039e6138..00000000 --- a/v2/models/source_backup_deactivation.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SourceBackupDeactivation Specifies the request parmeters to deactivate the backup of failover entities on source cluster. -// -// swagger:model SourceBackupDeactivation -type SourceBackupDeactivation struct { - - // Specifies the replication cluster Id involved in failover operation. - ReplicationClusterID *int64 `json:"replicationClusterId,omitempty"` - - // If failover is initiated by view based orchastrator, then this field specifies the local view id of source cluster which is being failed over. Backup will be deactivated for view object. - // Read Only: true - ViewID *string `json:"viewId,omitempty"` - - // Specifies the list of all local entity ids of all the objects being failed from the source cluster. Backup will be deactiaved for all given objects. - Objects []*FailoverObject `json:"objects"` - - // Specifies the protection group id of the source cluster from where the objects being failed over. If this is not specified then it will be infer from the list of objects being failed over. - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` - - // If this is set to true then objects will not be removed from protection group. If this is set to false, then all objects which are being failed over will be removed from the protection group. If protection group left with zero entities then it will be paused automatically. - KeepFailoverObjects *bool `json:"keepFailoverObjects,omitempty"` -} - -// Validate validates this source backup deactivation -func (m *SourceBackupDeactivation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceBackupDeactivation) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this source backup deactivation based on the context it is used -func (m *SourceBackupDeactivation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceBackupDeactivation) contextValidateViewID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "viewId", "body", m.ViewID); err != nil { - return err - } - - return nil -} - -func (m *SourceBackupDeactivation) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceBackupDeactivation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceBackupDeactivation) UnmarshalBinary(b []byte) error { - var res SourceBackupDeactivation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_connection_request_params.go b/v2/models/source_connection_request_params.go deleted file mode 100644 index 7c9fdd38..00000000 --- a/v2/models/source_connection_request_params.go +++ /dev/null @@ -1,528 +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" -) - -// SourceConnectionRequestParams Test connection request parameters. -// -// Specifies the parameters to test connectivity with a source. -// -// swagger:model SourceConnectionRequestParams -type SourceConnectionRequestParams struct { - CommonSourceConnectionRequestParams - - // cassandra connection params - CassandraConnectionParams *CassandraConnectionParams `json:"cassandraConnectionParams,omitempty"` - - // hive connection params - HiveConnectionParams *HadoopConnectionParams `json:"hiveConnectionParams,omitempty"` - - // hbase connection params - HbaseConnectionParams *HadoopConnectionParams `json:"hbaseConnectionParams,omitempty"` - - // hdfs connection params - HdfsConnectionParams *HadoopConnectionParams `json:"hdfsConnectionParams,omitempty"` - - // mssql connection params - MssqlConnectionParams *MssqlConnectionParams `json:"mssqlConnectionParams,omitempty"` - - // oracle connection params - OracleConnectionParams *OracleConnectionParams `json:"oracleConnectionParams,omitempty"` - - // vmware connection params - VmwareConnectionParams *VmwareConnectionParams `json:"vmwareConnectionParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceConnectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceConnectionRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceConnectionRequestParams = aO0 - - // AO1 - var dataAO1 struct { - CassandraConnectionParams *CassandraConnectionParams `json:"cassandraConnectionParams,omitempty"` - - HiveConnectionParams *HadoopConnectionParams `json:"hiveConnectionParams,omitempty"` - - HbaseConnectionParams *HadoopConnectionParams `json:"hbaseConnectionParams,omitempty"` - - HdfsConnectionParams *HadoopConnectionParams `json:"hdfsConnectionParams,omitempty"` - - MssqlConnectionParams *MssqlConnectionParams `json:"mssqlConnectionParams,omitempty"` - - OracleConnectionParams *OracleConnectionParams `json:"oracleConnectionParams,omitempty"` - - VmwareConnectionParams *VmwareConnectionParams `json:"vmwareConnectionParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CassandraConnectionParams = dataAO1.CassandraConnectionParams - - m.HiveConnectionParams = dataAO1.HiveConnectionParams - - m.HbaseConnectionParams = dataAO1.HbaseConnectionParams - - m.HdfsConnectionParams = dataAO1.HdfsConnectionParams - - m.MssqlConnectionParams = dataAO1.MssqlConnectionParams - - m.OracleConnectionParams = dataAO1.OracleConnectionParams - - m.VmwareConnectionParams = dataAO1.VmwareConnectionParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceConnectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceConnectionRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CassandraConnectionParams *CassandraConnectionParams `json:"cassandraConnectionParams,omitempty"` - - HiveConnectionParams *HadoopConnectionParams `json:"hiveConnectionParams,omitempty"` - - HbaseConnectionParams *HadoopConnectionParams `json:"hbaseConnectionParams,omitempty"` - - HdfsConnectionParams *HadoopConnectionParams `json:"hdfsConnectionParams,omitempty"` - - MssqlConnectionParams *MssqlConnectionParams `json:"mssqlConnectionParams,omitempty"` - - OracleConnectionParams *OracleConnectionParams `json:"oracleConnectionParams,omitempty"` - - VmwareConnectionParams *VmwareConnectionParams `json:"vmwareConnectionParams,omitempty"` - } - - dataAO1.CassandraConnectionParams = m.CassandraConnectionParams - - dataAO1.HiveConnectionParams = m.HiveConnectionParams - - dataAO1.HbaseConnectionParams = m.HbaseConnectionParams - - dataAO1.HdfsConnectionParams = m.HdfsConnectionParams - - dataAO1.MssqlConnectionParams = m.MssqlConnectionParams - - dataAO1.OracleConnectionParams = m.OracleConnectionParams - - dataAO1.VmwareConnectionParams = m.VmwareConnectionParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source connection request params -func (m *SourceConnectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceConnectionRequestParams - if err := m.CommonSourceConnectionRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleConnectionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareConnectionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceConnectionRequestParams) validateCassandraConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraConnectionParams) { // not required - return nil - } - - if m.CassandraConnectionParams != nil { - if err := m.CassandraConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateHiveConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveConnectionParams) { // not required - return nil - } - - if m.HiveConnectionParams != nil { - if err := m.HiveConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateHbaseConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseConnectionParams) { // not required - return nil - } - - if m.HbaseConnectionParams != nil { - if err := m.HbaseConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateHdfsConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsConnectionParams) { // not required - return nil - } - - if m.HdfsConnectionParams != nil { - if err := m.HdfsConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateMssqlConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MssqlConnectionParams) { // not required - return nil - } - - if m.MssqlConnectionParams != nil { - if err := m.MssqlConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateOracleConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleConnectionParams) { // not required - return nil - } - - if m.OracleConnectionParams != nil { - if err := m.OracleConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) validateVmwareConnectionParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareConnectionParams) { // not required - return nil - } - - if m.VmwareConnectionParams != nil { - if err := m.VmwareConnectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareConnectionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source connection request params based on the context it is used -func (m *SourceConnectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceConnectionRequestParams - if err := m.CommonSourceConnectionRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareConnectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateCassandraConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraConnectionParams != nil { - - if swag.IsZero(m.CassandraConnectionParams) { // not required - return nil - } - - if err := m.CassandraConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateHiveConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveConnectionParams != nil { - - if swag.IsZero(m.HiveConnectionParams) { // not required - return nil - } - - if err := m.HiveConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateHbaseConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseConnectionParams != nil { - - if swag.IsZero(m.HbaseConnectionParams) { // not required - return nil - } - - if err := m.HbaseConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateHdfsConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectionParams != nil { - - if swag.IsZero(m.HdfsConnectionParams) { // not required - return nil - } - - if err := m.HdfsConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateMssqlConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlConnectionParams != nil { - - if swag.IsZero(m.MssqlConnectionParams) { // not required - return nil - } - - if err := m.MssqlConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateOracleConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleConnectionParams != nil { - - if swag.IsZero(m.OracleConnectionParams) { // not required - return nil - } - - if err := m.OracleConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleConnectionParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionRequestParams) contextValidateVmwareConnectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareConnectionParams != nil { - - if swag.IsZero(m.VmwareConnectionParams) { // not required - return nil - } - - if err := m.VmwareConnectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareConnectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareConnectionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceConnectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceConnectionRequestParams) UnmarshalBinary(b []byte) error { - var res SourceConnectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_connection_response_params.go b/v2/models/source_connection_response_params.go deleted file mode 100644 index 7888b681..00000000 --- a/v2/models/source_connection_response_params.go +++ /dev/null @@ -1,435 +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" -) - -// SourceConnectionResponseParams Test Connection response parameters. -// -// Specifies the response from a test connection request. -// -// swagger:model SourceConnectionResponseParams -type SourceConnectionResponseParams struct { - - // Specifies the environment type of the Protection Source. - // Required: true - // Enum: ["kCassandra","kHive","kHBase","kHdfs","kSQL","kOracle"] - Environment *string `json:"environment"` - - // Specifies the id of the connection from where this source is reachable. This should only be set for a source being registered by a tenant user. - ConnectionID *int64 `json:"connectionId,omitempty"` - - // Specifies the parameters fetched by reading cassandra configuration on the seed node. - CassandraConnectionResponseParams *CassandraSourceConfigParams `json:"cassandraConnectionResponseParams,omitempty"` - - // Specifies the parameters fetched by reading Hive configuration on the seed node. - HiveConnectionResponseParams *HiveAdditionalParams `json:"hiveConnectionResponseParams,omitempty"` - - // Specifies the parameters fetched by reading HBase configuration on the seed node. - HbaseConnectionResponseParams *HBaseAdditionalParams `json:"hbaseConnectionResponseParams,omitempty"` - - // Specifies the parameters fetched by reading Hdfs configuration on the seed node. - HdfsConnectionResponseParams *HdfsAdditionalParams `json:"hdfsConnectionResponseParams,omitempty"` - - // Specifies the response parameters after connecting to a SQL node/cluster using given IP or hostname FQDN. - MssqlConnectionResponseParams *MssqlConnectionResponseParams `json:"mssqlConnectionResponseParams,omitempty"` - - // Specifies the parameters fetched by reading VMware configuration on the seed node. - VmwareConnectionResponseParams *VmwareAdditionalParams `json:"vmwareConnectionResponseParams,omitempty"` -} - -// Validate validates this source connection response params -func (m *SourceConnectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMssqlConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareConnectionResponseParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sourceConnectionResponseParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCassandra","kHive","kHBase","kHdfs","kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sourceConnectionResponseParamsTypeEnvironmentPropEnum = append(sourceConnectionResponseParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // SourceConnectionResponseParamsEnvironmentKCassandra captures enum value "kCassandra" - SourceConnectionResponseParamsEnvironmentKCassandra string = "kCassandra" - - // SourceConnectionResponseParamsEnvironmentKHive captures enum value "kHive" - SourceConnectionResponseParamsEnvironmentKHive string = "kHive" - - // SourceConnectionResponseParamsEnvironmentKHBase captures enum value "kHBase" - SourceConnectionResponseParamsEnvironmentKHBase string = "kHBase" - - // SourceConnectionResponseParamsEnvironmentKHdfs captures enum value "kHdfs" - SourceConnectionResponseParamsEnvironmentKHdfs string = "kHdfs" - - // SourceConnectionResponseParamsEnvironmentKSQL captures enum value "kSQL" - SourceConnectionResponseParamsEnvironmentKSQL string = "kSQL" - - // SourceConnectionResponseParamsEnvironmentKOracle captures enum value "kOracle" - SourceConnectionResponseParamsEnvironmentKOracle string = "kOracle" -) - -// prop value enum -func (m *SourceConnectionResponseParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sourceConnectionResponseParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SourceConnectionResponseParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateCassandraConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraConnectionResponseParams) { // not required - return nil - } - - if m.CassandraConnectionResponseParams != nil { - if err := m.CassandraConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateHiveConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.HiveConnectionResponseParams) { // not required - return nil - } - - if m.HiveConnectionResponseParams != nil { - if err := m.HiveConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateHbaseConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.HbaseConnectionResponseParams) { // not required - return nil - } - - if m.HbaseConnectionResponseParams != nil { - if err := m.HbaseConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateHdfsConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.HdfsConnectionResponseParams) { // not required - return nil - } - - if m.HdfsConnectionResponseParams != nil { - if err := m.HdfsConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateMssqlConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.MssqlConnectionResponseParams) { // not required - return nil - } - - if m.MssqlConnectionResponseParams != nil { - if err := m.MssqlConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) validateVmwareConnectionResponseParams(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareConnectionResponseParams) { // not required - return nil - } - - if m.VmwareConnectionResponseParams != nil { - if err := m.VmwareConnectionResponseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareConnectionResponseParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source connection response params based on the context it is used -func (m *SourceConnectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMssqlConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareConnectionResponseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateCassandraConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraConnectionResponseParams != nil { - - if swag.IsZero(m.CassandraConnectionResponseParams) { // not required - return nil - } - - if err := m.CassandraConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateHiveConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveConnectionResponseParams != nil { - - if swag.IsZero(m.HiveConnectionResponseParams) { // not required - return nil - } - - if err := m.HiveConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateHbaseConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseConnectionResponseParams != nil { - - if swag.IsZero(m.HbaseConnectionResponseParams) { // not required - return nil - } - - if err := m.HbaseConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateHdfsConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsConnectionResponseParams != nil { - - if swag.IsZero(m.HdfsConnectionResponseParams) { // not required - return nil - } - - if err := m.HdfsConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateMssqlConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MssqlConnectionResponseParams != nil { - - if swag.IsZero(m.MssqlConnectionResponseParams) { // not required - return nil - } - - if err := m.MssqlConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mssqlConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mssqlConnectionResponseParams") - } - return err - } - } - - return nil -} - -func (m *SourceConnectionResponseParams) contextValidateVmwareConnectionResponseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareConnectionResponseParams != nil { - - if swag.IsZero(m.VmwareConnectionResponseParams) { // not required - return nil - } - - if err := m.VmwareConnectionResponseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareConnectionResponseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareConnectionResponseParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceConnectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceConnectionResponseParams) UnmarshalBinary(b []byte) error { - var res SourceConnectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_hierarchy_object_summaries.go b/v2/models/source_hierarchy_object_summaries.go deleted file mode 100644 index 283223ae..00000000 --- a/v2/models/source_hierarchy_object_summaries.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourceHierarchyObjectSummaries ObjectSummaries -// -// Specifies a list of Source Hierarchy Object Summaries. -// -// swagger:model SourceHierarchyObjectSummaries -type SourceHierarchyObjectSummaries struct { - - // Specifies a list of Source Hierarchy Object summaries. - Objects []*SourceHierarchyObjectSummary `json:"objects"` -} - -// Validate validates this source hierarchy object summaries -func (m *SourceHierarchyObjectSummaries) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceHierarchyObjectSummaries) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this source hierarchy object summaries based on the context it is used -func (m *SourceHierarchyObjectSummaries) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceHierarchyObjectSummaries) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceHierarchyObjectSummaries) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceHierarchyObjectSummaries) UnmarshalBinary(b []byte) error { - var res SourceHierarchyObjectSummaries - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_hierarchy_object_summary.go b/v2/models/source_hierarchy_object_summary.go deleted file mode 100644 index ef5e90db..00000000 --- a/v2/models/source_hierarchy_object_summary.go +++ /dev/null @@ -1,119 +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" -) - -// SourceHierarchyObjectSummary SourceHierarchyObjectSummaries -// -// Specifies the list of Object Summaries for Objects under a given Source. -// -// swagger:model SourceHierarchyObjectSummary -type SourceHierarchyObjectSummary struct { - ObjectSummary - - // Specifies the ID of the direct parent of this object in the source hierarchy. - ParentID *int64 `json:"parentId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceHierarchyObjectSummary) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ObjectSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ObjectSummary = aO0 - - // AO1 - var dataAO1 struct { - ParentID *int64 `json:"parentId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ParentID = dataAO1.ParentID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceHierarchyObjectSummary) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ObjectSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ParentID *int64 `json:"parentId,omitempty"` - } - - dataAO1.ParentID = m.ParentID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source hierarchy object summary -func (m *SourceHierarchyObjectSummary) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this source hierarchy object summary based on the context it is used -func (m *SourceHierarchyObjectSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ObjectSummary - if err := m.ObjectSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SourceHierarchyObjectSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceHierarchyObjectSummary) UnmarshalBinary(b []byte) error { - var res SourceHierarchyObjectSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_name.go b/v2/models/source_name.go deleted file mode 100644 index 5327bca7..00000000 --- a/v2/models/source_name.go +++ /dev/null @@ -1,27 +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" -) - -// SourceName Specifies the source name -// -// swagger:model SourceName -type SourceName string - -// Validate validates this source name -func (m SourceName) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source name based on context it is used -func (m SourceName) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/source_registration.go b/v2/models/source_registration.go deleted file mode 100644 index bc46a0d2..00000000 --- a/v2/models/source_registration.go +++ /dev/null @@ -1,1368 +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" -) - -// SourceRegistration Source Registration. -// -// Specifies the Source Registration. -// -// swagger:model SourceRegistration -type SourceRegistration struct { - CommonSourceRegistrationReponseParams - - // Specifies the parameters to register a VMware Protection Source. - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters to register a Physical Protection Source. - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - // Specifies the parameters to register a Generic Nas Source. - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters to register an Isilon Source. - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - // Specifies the parameters to register an Netapp Source. - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - // Specifies the parameters to register an Elastifile Source. - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters to register an Flashblade Source. - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters to register an GPFS Source. - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters to register a Cassandra Protection Source. - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters to register a MongoDB Protection Source. - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters to register a Couchbase Protection Source. - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters to register an HDFS Protection Source. - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters to register an HBase Protection Source. - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters to register a Hive Protection Source. - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - // Specifies the parameters to register a Universal Data Adapter Protection Source. - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - // Specifies the parameters to register an office 365 Source. - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - // Specifies the parameters to register an AWS source. - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - // Specifies the parameters to register a HyperV Protection Source. - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - // Specifies the parameters to register a SFDC Adapter Protection Source. - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters to register an Azure source. - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - - // Specifies the External Metadata registered for the entity. - ExternalMetadata *EntityExternalMetadata `json:"externalMetadata,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceRegistration) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationReponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationReponseParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - - ExternalMetadata *EntityExternalMetadata `json:"externalMetadata,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.IsilonParams = dataAO1.IsilonParams - - m.NetappParams = dataAO1.NetappParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GpfsParams = dataAO1.GpfsParams - - m.CassandraParams = dataAO1.CassandraParams - - m.MongodbParams = dataAO1.MongodbParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HiveParams = dataAO1.HiveParams - - m.UdaParams = dataAO1.UdaParams - - m.Office365Params = dataAO1.Office365Params - - m.AwsParams = dataAO1.AwsParams - - m.HypervParams = dataAO1.HypervParams - - m.SfdcParams = dataAO1.SfdcParams - - m.AzureParams = dataAO1.AzureParams - - m.ExternalMetadata = dataAO1.ExternalMetadata - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceRegistration) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationReponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - - ExternalMetadata *EntityExternalMetadata `json:"externalMetadata,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.AwsParams = m.AwsParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.AzureParams = m.AzureParams - - dataAO1.ExternalMetadata = m.ExternalMetadata - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source registration -func (m *SourceRegistration) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationReponseParams - if err := m.CommonSourceRegistrationReponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternalMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistration) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) validateExternalMetadata(formats strfmt.Registry) error { - - if swag.IsZero(m.ExternalMetadata) { // not required - return nil - } - - if m.ExternalMetadata != nil { - if err := m.ExternalMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalMetadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source registration based on the context it is used -func (m *SourceRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationReponseParams - if err := m.CommonSourceRegistrationReponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternalMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistration) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistration) contextValidateExternalMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternalMetadata != nil { - - if swag.IsZero(m.ExternalMetadata) { // not required - return nil - } - - if err := m.ExternalMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externalMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externalMetadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceRegistration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceRegistration) UnmarshalBinary(b []byte) error { - var res SourceRegistration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_registration_patch_request_params.go b/v2/models/source_registration_patch_request_params.go deleted file mode 100644 index 3b67ff30..00000000 --- a/v2/models/source_registration_patch_request_params.go +++ /dev/null @@ -1,247 +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" -) - -// SourceRegistrationPatchRequestParams Specifies the parameters to partially update the registration. -// -// swagger:model SourceRegistrationPatchRequestParams -type SourceRegistrationPatchRequestParams struct { - - // Specifies the environment type of the Protection Source to be patched. Currently the only environment supported is kCassandra - // Required: true - // Enum: ["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"] - Environment *string `json:"environment"` - - // Specifies the parameters to patch the registration of a Cassandra Protection Source. - CassandraParams *CassandraSourceRegistrationPatchParams `json:"cassandraParams,omitempty"` -} - -// Validate validates this source registration patch request params -func (m *SourceRegistrationPatchRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnvironment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var sourceRegistrationPatchRequestParamsTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kAcropolis","kKVM","kAWS","kGCP","kAzure","kPhysical","kPure","kIbmFlashSystem","kNimble","kNetapp","kGenericNas","kIsilon","kFlashBlade","kGPFS","kElastifile","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSQL","kOracle","kSfdc"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - sourceRegistrationPatchRequestParamsTypeEnvironmentPropEnum = append(sourceRegistrationPatchRequestParamsTypeEnvironmentPropEnum, v) - } -} - -const ( - - // SourceRegistrationPatchRequestParamsEnvironmentKVMware captures enum value "kVMware" - SourceRegistrationPatchRequestParamsEnvironmentKVMware string = "kVMware" - - // SourceRegistrationPatchRequestParamsEnvironmentKHyperV captures enum value "kHyperV" - SourceRegistrationPatchRequestParamsEnvironmentKHyperV string = "kHyperV" - - // SourceRegistrationPatchRequestParamsEnvironmentKAcropolis captures enum value "kAcropolis" - SourceRegistrationPatchRequestParamsEnvironmentKAcropolis string = "kAcropolis" - - // SourceRegistrationPatchRequestParamsEnvironmentKKVM captures enum value "kKVM" - SourceRegistrationPatchRequestParamsEnvironmentKKVM string = "kKVM" - - // SourceRegistrationPatchRequestParamsEnvironmentKAWS captures enum value "kAWS" - SourceRegistrationPatchRequestParamsEnvironmentKAWS string = "kAWS" - - // SourceRegistrationPatchRequestParamsEnvironmentKGCP captures enum value "kGCP" - SourceRegistrationPatchRequestParamsEnvironmentKGCP string = "kGCP" - - // SourceRegistrationPatchRequestParamsEnvironmentKAzure captures enum value "kAzure" - SourceRegistrationPatchRequestParamsEnvironmentKAzure string = "kAzure" - - // SourceRegistrationPatchRequestParamsEnvironmentKPhysical captures enum value "kPhysical" - SourceRegistrationPatchRequestParamsEnvironmentKPhysical string = "kPhysical" - - // SourceRegistrationPatchRequestParamsEnvironmentKPure captures enum value "kPure" - SourceRegistrationPatchRequestParamsEnvironmentKPure string = "kPure" - - // SourceRegistrationPatchRequestParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" - SourceRegistrationPatchRequestParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" - - // SourceRegistrationPatchRequestParamsEnvironmentKNimble captures enum value "kNimble" - SourceRegistrationPatchRequestParamsEnvironmentKNimble string = "kNimble" - - // SourceRegistrationPatchRequestParamsEnvironmentKNetapp captures enum value "kNetapp" - SourceRegistrationPatchRequestParamsEnvironmentKNetapp string = "kNetapp" - - // SourceRegistrationPatchRequestParamsEnvironmentKGenericNas captures enum value "kGenericNas" - SourceRegistrationPatchRequestParamsEnvironmentKGenericNas string = "kGenericNas" - - // SourceRegistrationPatchRequestParamsEnvironmentKIsilon captures enum value "kIsilon" - SourceRegistrationPatchRequestParamsEnvironmentKIsilon string = "kIsilon" - - // SourceRegistrationPatchRequestParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" - SourceRegistrationPatchRequestParamsEnvironmentKFlashBlade string = "kFlashBlade" - - // SourceRegistrationPatchRequestParamsEnvironmentKGPFS captures enum value "kGPFS" - SourceRegistrationPatchRequestParamsEnvironmentKGPFS string = "kGPFS" - - // SourceRegistrationPatchRequestParamsEnvironmentKElastifile captures enum value "kElastifile" - SourceRegistrationPatchRequestParamsEnvironmentKElastifile string = "kElastifile" - - // SourceRegistrationPatchRequestParamsEnvironmentKO365 captures enum value "kO365" - SourceRegistrationPatchRequestParamsEnvironmentKO365 string = "kO365" - - // SourceRegistrationPatchRequestParamsEnvironmentKHyperFlex captures enum value "kHyperFlex" - SourceRegistrationPatchRequestParamsEnvironmentKHyperFlex string = "kHyperFlex" - - // SourceRegistrationPatchRequestParamsEnvironmentKKubernetes captures enum value "kKubernetes" - SourceRegistrationPatchRequestParamsEnvironmentKKubernetes string = "kKubernetes" - - // SourceRegistrationPatchRequestParamsEnvironmentKCassandra captures enum value "kCassandra" - SourceRegistrationPatchRequestParamsEnvironmentKCassandra string = "kCassandra" - - // SourceRegistrationPatchRequestParamsEnvironmentKMongoDB captures enum value "kMongoDB" - SourceRegistrationPatchRequestParamsEnvironmentKMongoDB string = "kMongoDB" - - // SourceRegistrationPatchRequestParamsEnvironmentKCouchbase captures enum value "kCouchbase" - SourceRegistrationPatchRequestParamsEnvironmentKCouchbase string = "kCouchbase" - - // SourceRegistrationPatchRequestParamsEnvironmentKHdfs captures enum value "kHdfs" - SourceRegistrationPatchRequestParamsEnvironmentKHdfs string = "kHdfs" - - // SourceRegistrationPatchRequestParamsEnvironmentKHive captures enum value "kHive" - SourceRegistrationPatchRequestParamsEnvironmentKHive string = "kHive" - - // SourceRegistrationPatchRequestParamsEnvironmentKHBase captures enum value "kHBase" - SourceRegistrationPatchRequestParamsEnvironmentKHBase string = "kHBase" - - // SourceRegistrationPatchRequestParamsEnvironmentKUDA captures enum value "kUDA" - SourceRegistrationPatchRequestParamsEnvironmentKUDA string = "kUDA" - - // SourceRegistrationPatchRequestParamsEnvironmentKSQL captures enum value "kSQL" - SourceRegistrationPatchRequestParamsEnvironmentKSQL string = "kSQL" - - // SourceRegistrationPatchRequestParamsEnvironmentKOracle captures enum value "kOracle" - SourceRegistrationPatchRequestParamsEnvironmentKOracle string = "kOracle" - - // SourceRegistrationPatchRequestParamsEnvironmentKSfdc captures enum value "kSfdc" - SourceRegistrationPatchRequestParamsEnvironmentKSfdc string = "kSfdc" -) - -// prop value enum -func (m *SourceRegistrationPatchRequestParams) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, sourceRegistrationPatchRequestParamsTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SourceRegistrationPatchRequestParams) validateEnvironment(formats strfmt.Registry) error { - - if err := validate.Required("environment", "body", m.Environment); err != nil { - return err - } - - // value enum - if err := m.validateEnvironmentEnum("environment", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -func (m *SourceRegistrationPatchRequestParams) validateCassandraParams(formats strfmt.Registry) error { - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source registration patch request params based on the context it is used -func (m *SourceRegistrationPatchRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrationPatchRequestParams) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceRegistrationPatchRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceRegistrationPatchRequestParams) UnmarshalBinary(b []byte) error { - var res SourceRegistrationPatchRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_registration_request_params.go b/v2/models/source_registration_request_params.go deleted file mode 100644 index 34c909b2..00000000 --- a/v2/models/source_registration_request_params.go +++ /dev/null @@ -1,1308 +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" -) - -// SourceRegistrationRequestParams Source Registration parameters. -// -// Specifies the Source Registration parameters. -// -// swagger:model SourceRegistrationRequestParams -type SourceRegistrationRequestParams struct { - CommonSourceRegistrationRequestParams - - // Specifies the parameters to register a VMware Protection Source. - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters to register a Physical Protection Source. - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - // Specifies the parameters to register a Generic Nas Source. - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters to register an Isilon Source. - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - // Specifies the parameters to register an Netapp Source. - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - // Specifies the parameters to register an Elastifile Source. - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters to register an Flashblade Source. - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters to register an GPFS Source. - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters to register a Cassandra Protection Source. - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters to register a MongoDB Protection Source. - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters to register a Couchbase Protection Source. - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters to register an HDFS Protection Source. - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters to register an HBase Protection Source. - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters to register a Hive Protection Source. - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - // Specifies the parameters to register a Universal Data Adapter Protection Source. - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - // Specifies the parameters to register an office 365 Source. - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - // Specifies the parameters to register an AWS source. - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - // Specifies the parameters to register a HyperV Protection Source. - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - // Specifies the parameters to register a SDFC Adapter Protection Source. - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - // Specifies the parameters to register an Azure source. - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceRegistrationRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationRequestParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.IsilonParams = dataAO1.IsilonParams - - m.NetappParams = dataAO1.NetappParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GpfsParams = dataAO1.GpfsParams - - m.CassandraParams = dataAO1.CassandraParams - - m.MongodbParams = dataAO1.MongodbParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HiveParams = dataAO1.HiveParams - - m.UdaParams = dataAO1.UdaParams - - m.Office365Params = dataAO1.Office365Params - - m.AwsParams = dataAO1.AwsParams - - m.HypervParams = dataAO1.HypervParams - - m.SfdcParams = dataAO1.SfdcParams - - m.AzureParams = dataAO1.AzureParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceRegistrationRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.AwsParams = m.AwsParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.AzureParams = m.AzureParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source registration request params -func (m *SourceRegistrationRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationRequestParams - if err := m.CommonSourceRegistrationRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrationRequestParams) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source registration request params based on the context it is used -func (m *SourceRegistrationRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationRequestParams - if err := m.CommonSourceRegistrationRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationRequestParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceRegistrationRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceRegistrationRequestParams) UnmarshalBinary(b []byte) error { - var res SourceRegistrationRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_registration_update_request_params.go b/v2/models/source_registration_update_request_params.go deleted file mode 100644 index 1bdcab4e..00000000 --- a/v2/models/source_registration_update_request_params.go +++ /dev/null @@ -1,1319 +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" -) - -// SourceRegistrationUpdateRequestParams Source Registration update parameters. -// -// Specifies the Source registration Update request parameters. -// -// swagger:model SourceRegistrationUpdateRequestParams -type SourceRegistrationUpdateRequestParams struct { - CommonSourceRegistrationRequestParams - - // Specifies the parameters to register a VMware Protection Source. - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - // Specifies the parameters to register a Physical Protection Source. - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - // Specifies the parameters to register a Generic Nas Source. - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - // Specifies the parameters to register an Isilon Source. - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - // Specifies the parameters to register an Netapp Source. - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - // Specifies the parameters to register an Elastifile Source. - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - // Specifies the parameters to register an Flashblade Source. - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - // Specifies the parameters to register an GPFS Source. - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - // Specifies the parameters to update the registration of a Cassandra Protection Source. - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - // Specifies the parameters to register a MongoDB Protection Source. - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - // Specifies the parameters to register a Couchbase Protection Source. - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - // Specifies the parameters to update registration of an HDFS Protection Source. Update for HDFS supports two operations - Reconfigure and Update Kerberos. For the Reconfigure operation you have to specify host, config directory and either SSHCredentials or SSHPrivateKey. All other fields in the request will be ignored. For the Update Kerberos operation you should set only the Kerberos field and not set any other field. - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - // Specifies the parameters to update registration of an Hbase Protection Source. Update Hbase supports two operations - Reconfigure and Update Kerberos. For the Reconfigure operation you have to specify host, config directory and either SSHCredentials or SSHPrivateKey. All other fields in the request will be ignored. For the Update Kerberos operation you should set only the Kerberos field and not set any other field. - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - // Specifies the parameters to update registration of an Hive Protection Source. Update Hive supports two operations - Reconfigure and Update Kerberos. For the Reconfigure operation you have to specify host, config directory and either SSHCredentials or SSHPrivateKey. All other fields in the request will be ignored. For the Update Kerberos operation you should set only the Kerberos field and not set any other field. - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - // Specifies the parameters to update the registration of a Universal Data Adapter Protection Source. - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - // Specifies the parameters to update the registration of an office 365 Source. - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - // Specifies the parameters to register an AWS source. - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - // Specifies the parameters to register a HyperV Protection Source. - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - // Specifies the parameters to update the registration of a SFDC Adapter Protection Source. - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - // Specifies the last time this protection source was updated. If this is passed into a PUT request, then the backend will validate that the timestamp passed in matches the time that the protection source was actually last modified. If the two timestamps do not match, then the request will be rejected with a stale error. - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - // Specifies the parameters to register an Azure source. - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceRegistrationUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationRequestParams = aO0 - - // AO1 - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VmwareParams = dataAO1.VmwareParams - - m.PhysicalParams = dataAO1.PhysicalParams - - m.GenericNasParams = dataAO1.GenericNasParams - - m.IsilonParams = dataAO1.IsilonParams - - m.NetappParams = dataAO1.NetappParams - - m.ElastifileParams = dataAO1.ElastifileParams - - m.FlashbladeParams = dataAO1.FlashbladeParams - - m.GpfsParams = dataAO1.GpfsParams - - m.CassandraParams = dataAO1.CassandraParams - - m.MongodbParams = dataAO1.MongodbParams - - m.CouchbaseParams = dataAO1.CouchbaseParams - - m.HdfsParams = dataAO1.HdfsParams - - m.HbaseParams = dataAO1.HbaseParams - - m.HiveParams = dataAO1.HiveParams - - m.UdaParams = dataAO1.UdaParams - - m.Office365Params = dataAO1.Office365Params - - m.AwsParams = dataAO1.AwsParams - - m.HypervParams = dataAO1.HypervParams - - m.SfdcParams = dataAO1.SfdcParams - - m.LastModifiedTimestampUsecs = dataAO1.LastModifiedTimestampUsecs - - m.AzureParams = dataAO1.AzureParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceRegistrationUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VmwareParams *VmwareSourceRegistrationParams `json:"vmwareParams,omitempty"` - - PhysicalParams *PhysicalSourceRegistrationParams `json:"physicalParams,omitempty"` - - GenericNasParams *GenericNasRegistrationParams `json:"genericNasParams,omitempty"` - - IsilonParams *IsilonRegistrationParams `json:"isilonParams,omitempty"` - - NetappParams *NetappRegistrationParams `json:"netappParams,omitempty"` - - ElastifileParams *ElastifileRegistrationParams `json:"elastifileParams,omitempty"` - - FlashbladeParams *FlashbladeRegistrationParams `json:"flashbladeParams,omitempty"` - - GpfsParams *GpfsRegistrationParams `json:"gpfsParams,omitempty"` - - CassandraParams *CassandraSourceRegistrationParams `json:"cassandraParams,omitempty"` - - MongodbParams *MongoDBSourceRegistrationParams `json:"mongodbParams,omitempty"` - - CouchbaseParams *CouchbaseSourceRegistrationParams `json:"couchbaseParams,omitempty"` - - HdfsParams *HdfsSourceRegistrationParams `json:"hdfsParams,omitempty"` - - HbaseParams *HbaseSourceRegistrationParams `json:"hbaseParams,omitempty"` - - HiveParams *HiveSourceRegistrationParams `json:"hiveParams,omitempty"` - - UdaParams *UdaSourceRegistrationParams `json:"udaParams,omitempty"` - - Office365Params *Office365SourceRegistrationParams `json:"office365Params,omitempty"` - - AwsParams *AwsSourceRegistrationParams `json:"awsParams,omitempty"` - - HypervParams *HyperVSourceRegistrationParams `json:"hypervParams,omitempty"` - - SfdcParams *SfdcSourceRegistrationParams `json:"sfdcParams,omitempty"` - - LastModifiedTimestampUsecs *int64 `json:"lastModifiedTimestampUsecs,omitempty"` - - AzureParams *AzureSourceRegistrationParams `json:"azureParams,omitempty"` - } - - dataAO1.VmwareParams = m.VmwareParams - - dataAO1.PhysicalParams = m.PhysicalParams - - dataAO1.GenericNasParams = m.GenericNasParams - - dataAO1.IsilonParams = m.IsilonParams - - dataAO1.NetappParams = m.NetappParams - - dataAO1.ElastifileParams = m.ElastifileParams - - dataAO1.FlashbladeParams = m.FlashbladeParams - - dataAO1.GpfsParams = m.GpfsParams - - dataAO1.CassandraParams = m.CassandraParams - - dataAO1.MongodbParams = m.MongodbParams - - dataAO1.CouchbaseParams = m.CouchbaseParams - - dataAO1.HdfsParams = m.HdfsParams - - dataAO1.HbaseParams = m.HbaseParams - - dataAO1.HiveParams = m.HiveParams - - dataAO1.UdaParams = m.UdaParams - - dataAO1.Office365Params = m.Office365Params - - dataAO1.AwsParams = m.AwsParams - - dataAO1.HypervParams = m.HypervParams - - dataAO1.SfdcParams = m.SfdcParams - - dataAO1.LastModifiedTimestampUsecs = m.LastModifiedTimestampUsecs - - dataAO1.AzureParams = m.AzureParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source registration update request params -func (m *SourceRegistrationUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationRequestParams - if err := m.CommonSourceRegistrationRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVmwareParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGenericNasParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIsilonParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetappParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateElastifileParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFlashbladeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGpfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCassandraParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMongodbParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCouchbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHdfsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHbaseParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHiveParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUdaParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOffice365Params(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHypervParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfdcParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateVmwareParams(formats strfmt.Registry) error { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if m.VmwareParams != nil { - if err := m.VmwareParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validatePhysicalParams(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if m.PhysicalParams != nil { - if err := m.PhysicalParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateGenericNasParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if m.GenericNasParams != nil { - if err := m.GenericNasParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateIsilonParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if m.IsilonParams != nil { - if err := m.IsilonParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateNetappParams(formats strfmt.Registry) error { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if m.NetappParams != nil { - if err := m.NetappParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateElastifileParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if m.ElastifileParams != nil { - if err := m.ElastifileParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateFlashbladeParams(formats strfmt.Registry) error { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if m.FlashbladeParams != nil { - if err := m.FlashbladeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateGpfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if m.GpfsParams != nil { - if err := m.GpfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateCassandraParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if m.CassandraParams != nil { - if err := m.CassandraParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateMongodbParams(formats strfmt.Registry) error { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if m.MongodbParams != nil { - if err := m.MongodbParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateCouchbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if m.CouchbaseParams != nil { - if err := m.CouchbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateHdfsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if m.HdfsParams != nil { - if err := m.HdfsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateHbaseParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if m.HbaseParams != nil { - if err := m.HbaseParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateHiveParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if m.HiveParams != nil { - if err := m.HiveParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateUdaParams(formats strfmt.Registry) error { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if m.UdaParams != nil { - if err := m.UdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateOffice365Params(formats strfmt.Registry) error { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if m.Office365Params != nil { - if err := m.Office365Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateHypervParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if m.HypervParams != nil { - if err := m.HypervParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateSfdcParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if m.SfdcParams != nil { - if err := m.SfdcParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this source registration update request params based on the context it is used -func (m *SourceRegistrationUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationRequestParams - if err := m.CommonSourceRegistrationRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVmwareParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGenericNasParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsilonParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetappParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateElastifileParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFlashbladeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGpfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCassandraParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMongodbParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCouchbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHdfsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHbaseParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHiveParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOffice365Params(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHypervParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfdcParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateVmwareParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VmwareParams != nil { - - if swag.IsZero(m.VmwareParams) { // not required - return nil - } - - if err := m.VmwareParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmwareParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmwareParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidatePhysicalParams(ctx context.Context, formats strfmt.Registry) error { - - if m.PhysicalParams != nil { - - if swag.IsZero(m.PhysicalParams) { // not required - return nil - } - - if err := m.PhysicalParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateGenericNasParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GenericNasParams != nil { - - if swag.IsZero(m.GenericNasParams) { // not required - return nil - } - - if err := m.GenericNasParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("genericNasParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("genericNasParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateIsilonParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IsilonParams != nil { - - if swag.IsZero(m.IsilonParams) { // not required - return nil - } - - if err := m.IsilonParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateNetappParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NetappParams != nil { - - if swag.IsZero(m.NetappParams) { // not required - return nil - } - - if err := m.NetappParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateElastifileParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ElastifileParams != nil { - - if swag.IsZero(m.ElastifileParams) { // not required - return nil - } - - if err := m.ElastifileParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateFlashbladeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FlashbladeParams != nil { - - if swag.IsZero(m.FlashbladeParams) { // not required - return nil - } - - if err := m.FlashbladeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashbladeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashbladeParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateGpfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GpfsParams != nil { - - if swag.IsZero(m.GpfsParams) { // not required - return nil - } - - if err := m.GpfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateCassandraParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CassandraParams != nil { - - if swag.IsZero(m.CassandraParams) { // not required - return nil - } - - if err := m.CassandraParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateMongodbParams(ctx context.Context, formats strfmt.Registry) error { - - if m.MongodbParams != nil { - - if swag.IsZero(m.MongodbParams) { // not required - return nil - } - - if err := m.MongodbParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateCouchbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CouchbaseParams != nil { - - if swag.IsZero(m.CouchbaseParams) { // not required - return nil - } - - if err := m.CouchbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateHdfsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HdfsParams != nil { - - if swag.IsZero(m.HdfsParams) { // not required - return nil - } - - if err := m.HdfsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateHbaseParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HbaseParams != nil { - - if swag.IsZero(m.HbaseParams) { // not required - return nil - } - - if err := m.HbaseParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateHiveParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HiveParams != nil { - - if swag.IsZero(m.HiveParams) { // not required - return nil - } - - if err := m.HiveParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.UdaParams != nil { - - if swag.IsZero(m.UdaParams) { // not required - return nil - } - - if err := m.UdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateOffice365Params(ctx context.Context, formats strfmt.Registry) error { - - if m.Office365Params != nil { - - if swag.IsZero(m.Office365Params) { // not required - return nil - } - - if err := m.Office365Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365Params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365Params") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateHypervParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HypervParams != nil { - - if swag.IsZero(m.HypervParams) { // not required - return nil - } - - if err := m.HypervParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateSfdcParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SfdcParams != nil { - - if swag.IsZero(m.SfdcParams) { // not required - return nil - } - - if err := m.SfdcParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcParams") - } - return err - } - } - - return nil -} - -func (m *SourceRegistrationUpdateRequestParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceRegistrationUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceRegistrationUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res SourceRegistrationUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_registrations.go b/v2/models/source_registrations.go deleted file mode 100644 index 82542f40..00000000 --- a/v2/models/source_registrations.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourceRegistrations Protection Source Registrations. -// -// swagger:model SourceRegistrations -type SourceRegistrations struct { - - // Specifies the list of Protection Source Registrations. - Registrations []*SourceRegistration `json:"registrations"` -} - -// Validate validates this source registrations -func (m *SourceRegistrations) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRegistrations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrations) validateRegistrations(formats strfmt.Registry) error { - if swag.IsZero(m.Registrations) { // not required - return nil - } - - for i := 0; i < len(m.Registrations); i++ { - if swag.IsZero(m.Registrations[i]) { // not required - continue - } - - if m.Registrations[i] != nil { - if err := m.Registrations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this source registrations based on the context it is used -func (m *SourceRegistrations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRegistrations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SourceRegistrations) contextValidateRegistrations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Registrations); i++ { - - if m.Registrations[i] != nil { - - if swag.IsZero(m.Registrations[i]) { // not required - return nil - } - - if err := m.Registrations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SourceRegistrations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceRegistrations) UnmarshalBinary(b []byte) error { - var res SourceRegistrations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/source_replica_object.go b/v2/models/source_replica_object.go deleted file mode 100644 index ba4d758f..00000000 --- a/v2/models/source_replica_object.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" -) - -// SourceReplicaObject Specifies the response after succesfully initiating the failover request. -// -// swagger:model SourceReplicaObject -type SourceReplicaObject struct { - - // Specifies the object Id existing on the replciation cluster. - ReplicaObjectID *int64 `json:"replicaObjectId,omitempty"` - - // Specifies the corrosponding object id existing on the source cluster. - SourceObjectID *int64 `json:"sourceObjectId,omitempty"` -} - -// Validate validates this source replica object -func (m *SourceReplicaObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this source replica object based on context it is used -func (m *SourceReplicaObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SourceReplicaObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceReplicaObject) UnmarshalBinary(b []byte) error { - var res SourceReplicaObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sources.go b/v2/models/sources.go deleted file mode 100644 index 21eadce3..00000000 --- a/v2/models/sources.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Sources Protection Sources. -// -// swagger:model Sources -type Sources struct { - - // Specifies the list of Protection Sources. - Sources []*Source `json:"sources"` -} - -// Validate validates this sources -func (m *Sources) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Sources) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this sources based on the context it is used -func (m *Sources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Sources) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Sources) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Sources) UnmarshalBinary(b []byte) error { - var res Sources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sql_server.go b/v2/models/sql_server.go deleted file mode 100644 index d4433e1a..00000000 --- a/v2/models/sql_server.go +++ /dev/null @@ -1,283 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SQLServer Specifies the details of a SQL server. -// -// swagger:model SQLServer -type SQLServer struct { - - // Specifies the unique identifier of the SQL server host. - ID *string `json:"id,omitempty"` - - // Specifies the resource information about the SQL server host. - ResourceInfo *AppResource `json:"resourceInfo,omitempty"` - - // Specifies the information related to agent running on the SQL server. - AgentInfo *AgentInformation `json:"agentInfo,omitempty"` - - // Specifies the error information if any associated with SQL server host. - Error *Error `json:"error,omitempty"` - - // Indicates whether this is a active node of a FCI cluster or hosts primary replica of a AAG group. - IsPrimary *bool `json:"isPrimary,omitempty"` - - // Specifies the list of all sql instances running inside the current SQL host. - Instances []*SQLServerInstance `json:"instances"` - - // Indicates to the UI whether this server should be selected by default - IsSelectedByDefault *bool `json:"isSelectedByDefault,omitempty"` -} - -// Validate validates this SQL server -func (m *SQLServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourceInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAgentInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInstances(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLServer) validateResourceInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if m.ResourceInfo != nil { - if err := m.ResourceInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *SQLServer) validateAgentInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AgentInfo) { // not required - return nil - } - - if m.AgentInfo != nil { - if err := m.AgentInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentInfo") - } - return err - } - } - - return nil -} - -func (m *SQLServer) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -func (m *SQLServer) validateInstances(formats strfmt.Registry) error { - if swag.IsZero(m.Instances) { // not required - return nil - } - - for i := 0; i < len(m.Instances); i++ { - if swag.IsZero(m.Instances[i]) { // not required - continue - } - - if m.Instances[i] != nil { - if err := m.Instances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instances" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this SQL server based on the context it is used -func (m *SQLServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourceInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAgentInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInstances(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLServer) contextValidateResourceInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.ResourceInfo != nil { - - if swag.IsZero(m.ResourceInfo) { // not required - return nil - } - - if err := m.ResourceInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceInfo") - } - return err - } - } - - return nil -} - -func (m *SQLServer) contextValidateAgentInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AgentInfo != nil { - - if swag.IsZero(m.AgentInfo) { // not required - return nil - } - - if err := m.AgentInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("agentInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("agentInfo") - } - return err - } - } - - return nil -} - -func (m *SQLServer) 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 -} - -func (m *SQLServer) contextValidateInstances(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Instances); i++ { - - if m.Instances[i] != nil { - - if swag.IsZero(m.Instances[i]) { // not required - return nil - } - - if err := m.Instances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("instances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("instances" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLServer) UnmarshalBinary(b []byte) error { - var res SQLServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sql_server_instance.go b/v2/models/sql_server_instance.go deleted file mode 100644 index bb090367..00000000 --- a/v2/models/sql_server_instance.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SQLServerInstance Specifies the details of a SQL server. -// -// swagger:model SQLServerInstance -type SQLServerInstance struct { - - // Specifies the unique id of the SQL server instance. - ID *string `json:"id,omitempty"` - - // Specifies the name of the SQL server instance. - Name *string `json:"name,omitempty"` - - // Specifies the wehther the SQL server instance is online or not. - IsOnline *string `json:"isOnline,omitempty"` - - // Specifies the information about endpoint associated with this SQL server instance. - Endpoints []*ResourceEndpoint `json:"endpoints"` - - // Specifies whether this SQL server instance is a part of Failover cluster or not. - IsPartofFCI *bool `json:"isPartofFCI,omitempty"` -} - -// Validate validates this SQL server instance -func (m *SQLServerInstance) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLServerInstance) validateEndpoints(formats strfmt.Registry) error { - if swag.IsZero(m.Endpoints) { // not required - return nil - } - - for i := 0; i < len(m.Endpoints); i++ { - if swag.IsZero(m.Endpoints[i]) { // not required - continue - } - - if m.Endpoints[i] != nil { - if err := m.Endpoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this SQL server instance based on the context it is used -func (m *SQLServerInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpoints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SQLServerInstance) contextValidateEndpoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Endpoints); i++ { - - if m.Endpoints[i] != nil { - - if swag.IsZero(m.Endpoints[i]) { // not required - return nil - } - - if err := m.Endpoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SQLServerInstance) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLServerInstance) UnmarshalBinary(b []byte) error { - var res SQLServerInstance - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/sql_target_params_for_recover_sql_app.go b/v2/models/sql_target_params_for_recover_sql_app.go deleted file mode 100644 index 5e4436a5..00000000 --- a/v2/models/sql_target_params_for_recover_sql_app.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" -) - -// SQLTargetParamsForRecoverSQLApp Sql Target Params For Recover Sql App. -// -// Specifies the params for recovering to a sql host. Specifiy seperate settings for each db object that need to be recovered. Provided sql backup should be recovered to same type of target host. For Example: If you have sql backup taken from a physical host then that should be recovered to physical host only. -// -// swagger:model SqlTargetParamsForRecoverSqlApp -type SQLTargetParamsForRecoverSQLApp struct { - CommonRecoverSQLAppTargetParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SQLTargetParamsForRecoverSQLApp) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverSQLAppTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverSQLAppTargetParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SQLTargetParamsForRecoverSQLApp) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonRecoverSQLAppTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this Sql target params for recover Sql app -func (m *SQLTargetParamsForRecoverSQLApp) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverSQLAppTargetParams - if err := m.CommonRecoverSQLAppTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this Sql target params for recover Sql app based on the context it is used -func (m *SQLTargetParamsForRecoverSQLApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverSQLAppTargetParams - if err := m.CommonRecoverSQLAppTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SQLTargetParamsForRecoverSQLApp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SQLTargetParamsForRecoverSQLApp) UnmarshalBinary(b []byte) error { - var res SQLTargetParamsForRecoverSQLApp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ssh_password_credentials.go b/v2/models/ssh_password_credentials.go deleted file mode 100644 index 8653c2d6..00000000 --- a/v2/models/ssh_password_credentials.go +++ /dev/null @@ -1,88 +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" -) - -// SSHPasswordCredentials SSH username + password that will be used for reading configuration file and for scp backup.Either 'sshPasswordCredentials' or 'sshPrivateKeyCredentials' are required. -// -// swagger:model SshPasswordCredentials -type SSHPasswordCredentials struct { - - // SSH username. - // Required: true - Username *string `json:"username"` - - // SSH password. - // Required: true - Password *string `json:"password"` -} - -// Validate validates this Ssh password credentials -func (m *SSHPasswordCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SSHPasswordCredentials) validateUsername(formats strfmt.Registry) error { - - if err := validate.Required("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *SSHPasswordCredentials) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Ssh password credentials based on context it is used -func (m *SSHPasswordCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SSHPasswordCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SSHPasswordCredentials) UnmarshalBinary(b []byte) error { - var res SSHPasswordCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/ssh_private_key_credentials.go b/v2/models/ssh_private_key_credentials.go deleted file mode 100644 index 8b63d7e8..00000000 --- a/v2/models/ssh_private_key_credentials.go +++ /dev/null @@ -1,91 +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" -) - -// SSHPrivateKeyCredentials SSH userID + privateKey that will be used for reading configuration file and for scp backup. -// -// swagger:model SshPrivateKeyCredentials -type SSHPrivateKeyCredentials struct { - - // userId for PrivateKey credentials. - // Required: true - UserID *string `json:"userId"` - - // The private key. - // Required: true - PrivateKey *string `json:"privateKey"` - - // Passphrase for the private key. - Passphrase string `json:"passphrase,omitempty"` -} - -// Validate validates this Ssh private key credentials -func (m *SSHPrivateKeyCredentials) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserID(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrivateKey(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SSHPrivateKeyCredentials) validateUserID(formats strfmt.Registry) error { - - if err := validate.Required("userId", "body", m.UserID); err != nil { - return err - } - - return nil -} - -func (m *SSHPrivateKeyCredentials) validatePrivateKey(formats strfmt.Registry) error { - - if err := validate.Required("privateKey", "body", m.PrivateKey); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this Ssh private key credentials based on context it is used -func (m *SSHPrivateKeyCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SSHPrivateKeyCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SSHPrivateKeyCredentials) UnmarshalBinary(b []byte) error { - var res SSHPrivateKeyCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/standalone_cluster_registration_params.go b/v2/models/standalone_cluster_registration_params.go deleted file mode 100644 index a6d87105..00000000 --- a/v2/models/standalone_cluster_registration_params.go +++ /dev/null @@ -1,117 +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" -) - -// StandaloneClusterRegistrationParams Register HyperV failover cluster request parameters. -// -// Specifies parameters to register HyperV failover cluster. -// -// swagger:model StandaloneClusterRegistrationParams -type StandaloneClusterRegistrationParams struct { - EndpointOnlyRegistrationParams - - StandaloneClusterRegistrationParamsAllOf1 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *StandaloneClusterRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 EndpointOnlyRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.EndpointOnlyRegistrationParams = aO0 - - // AO1 - var aO1 StandaloneClusterRegistrationParamsAllOf1 - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.StandaloneClusterRegistrationParamsAllOf1 = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m StandaloneClusterRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.EndpointOnlyRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.StandaloneClusterRegistrationParamsAllOf1) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this standalone cluster registration params -func (m *StandaloneClusterRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EndpointOnlyRegistrationParams - if err := m.EndpointOnlyRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StandaloneClusterRegistrationParamsAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this standalone cluster registration params based on the context it is used -func (m *StandaloneClusterRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EndpointOnlyRegistrationParams - if err := m.EndpointOnlyRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StandaloneClusterRegistrationParamsAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *StandaloneClusterRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StandaloneClusterRegistrationParams) UnmarshalBinary(b []byte) error { - var res StandaloneClusterRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// StandaloneClusterRegistrationParamsAllOf1 standalone cluster registration params all of1 -// -// swagger:model StandaloneClusterRegistrationParamsAllOf1 -type StandaloneClusterRegistrationParamsAllOf1 interface{} diff --git a/v2/models/standalone_host_registration_params.go b/v2/models/standalone_host_registration_params.go deleted file mode 100644 index 484bbb64..00000000 --- a/v2/models/standalone_host_registration_params.go +++ /dev/null @@ -1,117 +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" -) - -// StandaloneHostRegistrationParams Register standalone HyperV host request parameters. -// -// Specifies parameters to register standalone HyperV host. -// -// swagger:model StandaloneHostRegistrationParams -type StandaloneHostRegistrationParams struct { - EndpointOnlyRegistrationParams - - StandaloneHostRegistrationParamsAllOf1 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *StandaloneHostRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 EndpointOnlyRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.EndpointOnlyRegistrationParams = aO0 - - // AO1 - var aO1 StandaloneHostRegistrationParamsAllOf1 - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.StandaloneHostRegistrationParamsAllOf1 = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m StandaloneHostRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.EndpointOnlyRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.StandaloneHostRegistrationParamsAllOf1) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this standalone host registration params -func (m *StandaloneHostRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EndpointOnlyRegistrationParams - if err := m.EndpointOnlyRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StandaloneHostRegistrationParamsAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this standalone host registration params based on the context it is used -func (m *StandaloneHostRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EndpointOnlyRegistrationParams - if err := m.EndpointOnlyRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with StandaloneHostRegistrationParamsAllOf1 - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *StandaloneHostRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StandaloneHostRegistrationParams) UnmarshalBinary(b []byte) error { - var res StandaloneHostRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// StandaloneHostRegistrationParamsAllOf1 standalone host registration params all of1 -// -// swagger:model StandaloneHostRegistrationParamsAllOf1 -type StandaloneHostRegistrationParamsAllOf1 interface{} diff --git a/v2/models/standard_params.go b/v2/models/standard_params.go deleted file mode 100644 index ed47f4b8..00000000 --- a/v2/models/standard_params.go +++ /dev/null @@ -1,216 +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" -) - -// StandardParams Register AWS Commercial request parameters. -// -// # Specifies the parameters to register a commercial AWS -// -// swagger:model StandardParams -type StandardParams struct { - - // Specifies the Authentication method(IamArn/IamRole) used by api - // Required: true - // Enum: ["kUseIAMUser","kUseIAMRole"] - AuthMethodType *string `json:"authMethodType"` - - // Specifies the credentials required to register as AWS source. - IamUserAwsCredentials *IamUserAwsCredentials `json:"iamUserAwsCredentials,omitempty"` - - // Specifies the credentials required to register as AWS source. - IamRoleAwsCredentials *IamRoleAwsCredentials `json:"iamRoleAwsCredentials,omitempty"` -} - -// Validate validates this standard params -func (m *StandardParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAuthMethodType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIamUserAwsCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIamRoleAwsCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var standardParamsTypeAuthMethodTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kUseIAMUser","kUseIAMRole"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - standardParamsTypeAuthMethodTypePropEnum = append(standardParamsTypeAuthMethodTypePropEnum, v) - } -} - -const ( - - // StandardParamsAuthMethodTypeKUseIAMUser captures enum value "kUseIAMUser" - StandardParamsAuthMethodTypeKUseIAMUser string = "kUseIAMUser" - - // StandardParamsAuthMethodTypeKUseIAMRole captures enum value "kUseIAMRole" - StandardParamsAuthMethodTypeKUseIAMRole string = "kUseIAMRole" -) - -// prop value enum -func (m *StandardParams) validateAuthMethodTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, standardParamsTypeAuthMethodTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StandardParams) validateAuthMethodType(formats strfmt.Registry) error { - - if err := validate.Required("authMethodType", "body", m.AuthMethodType); err != nil { - return err - } - - // value enum - if err := m.validateAuthMethodTypeEnum("authMethodType", "body", *m.AuthMethodType); err != nil { - return err - } - - return nil -} - -func (m *StandardParams) validateIamUserAwsCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.IamUserAwsCredentials) { // not required - return nil - } - - if m.IamUserAwsCredentials != nil { - if err := m.IamUserAwsCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamUserAwsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamUserAwsCredentials") - } - return err - } - } - - return nil -} - -func (m *StandardParams) validateIamRoleAwsCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.IamRoleAwsCredentials) { // not required - return nil - } - - if m.IamRoleAwsCredentials != nil { - if err := m.IamRoleAwsCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamRoleAwsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamRoleAwsCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this standard params based on the context it is used -func (m *StandardParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIamUserAwsCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIamRoleAwsCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StandardParams) contextValidateIamUserAwsCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.IamUserAwsCredentials != nil { - - if swag.IsZero(m.IamUserAwsCredentials) { // not required - return nil - } - - if err := m.IamUserAwsCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamUserAwsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamUserAwsCredentials") - } - return err - } - } - - return nil -} - -func (m *StandardParams) contextValidateIamRoleAwsCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.IamRoleAwsCredentials != nil { - - if swag.IsZero(m.IamRoleAwsCredentials) { // not required - return nil - } - - if err := m.IamRoleAwsCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("iamRoleAwsCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("iamRoleAwsCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StandardParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StandardParams) UnmarshalBinary(b []byte) error { - var res StandardParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/standby_object.go b/v2/models/standby_object.go deleted file mode 100644 index 1b462ad0..00000000 --- a/v2/models/standby_object.go +++ /dev/null @@ -1,74 +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" -) - -// StandbyObject Specifies the standby related information for a given VM object. This field will only be populated when standby is configured on the protection group. -// -// swagger:model StandbyObject -type StandbyObject struct { - - // Specifies the entity id of the corresponding backup object for which this standby is configured. - EntityID *int64 `json:"entityId,omitempty"` - - // Specifies the protection group id to which this standby object belongs. - // Read Only: true - ProtectionGroupID *string `json:"protectionGroupId,omitempty"` -} - -// Validate validates this standby object -func (m *StandbyObject) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this standby object based on the context it is used -func (m *StandbyObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionGroupID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StandbyObject) contextValidateProtectionGroupID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "protectionGroupId", "body", m.ProtectionGroupID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StandbyObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StandbyObject) UnmarshalBinary(b []byte) error { - var res StandbyObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/static_route_params.go b/v2/models/static_route_params.go deleted file mode 100644 index a637fb40..00000000 --- a/v2/models/static_route_params.go +++ /dev/null @@ -1,139 +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" -) - -// StaticRouteParams Specifies the static route parameters. -// -// swagger:model StaticRouteParams -type StaticRouteParams struct { - - // Specifies the unique identifier for the route. - // Read Only: true - ID *string `json:"id,omitempty"` - - // Specifies the network interface name to use for communicating with the destination network. - Interface *string `json:"interface,omitempty"` - - // Specifies the network interfaces name to use for communicating with the destination network. - // Required: true - InterfaceGroup *string `json:"interfaceGroup"` - - // Specifies the destination network of the Static Route. - // Required: true - DestinationNetwork *string `json:"destinationNetwork"` - - // Specifies the next hop to the destination network. - // Required: true - NextHop *string `json:"nextHop"` - - // Specifies a description of the Static Route. - Description *string `json:"description,omitempty"` - - // Specifies MTU setting per route. - Mtu *int64 `json:"mtu,omitempty"` - - // Specifies the network node group to represent a group of nodes. - NodeGroupName *string `json:"nodeGroupName,omitempty"` -} - -// Validate validates this static route params -func (m *StaticRouteParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterfaceGroup(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestinationNetwork(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNextHop(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StaticRouteParams) validateInterfaceGroup(formats strfmt.Registry) error { - - if err := validate.Required("interfaceGroup", "body", m.InterfaceGroup); err != nil { - return err - } - - return nil -} - -func (m *StaticRouteParams) validateDestinationNetwork(formats strfmt.Registry) error { - - if err := validate.Required("destinationNetwork", "body", m.DestinationNetwork); err != nil { - return err - } - - return nil -} - -func (m *StaticRouteParams) validateNextHop(formats strfmt.Registry) error { - - if err := validate.Required("nextHop", "body", m.NextHop); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this static route params based on the context it is used -func (m *StaticRouteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StaticRouteParams) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StaticRouteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StaticRouteParams) UnmarshalBinary(b []byte) error { - var res StaticRouteParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/static_routes.go b/v2/models/static_routes.go deleted file mode 100644 index 338dfdfd..00000000 --- a/v2/models/static_routes.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StaticRoutes Specifies a list of defined static routes. -// -// swagger:model StaticRoutes -type StaticRoutes struct { - - // Specifies the list of routes. - Routes []*StaticRouteParams `json:"routes"` -} - -// Validate validates this static routes -func (m *StaticRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StaticRoutes) validateRoutes(formats strfmt.Registry) error { - if swag.IsZero(m.Routes) { // not required - return nil - } - - for i := 0; i < len(m.Routes); i++ { - if swag.IsZero(m.Routes[i]) { // not required - continue - } - - if m.Routes[i] != nil { - if err := m.Routes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("routes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this static routes based on the context it is used -func (m *StaticRoutes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRoutes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StaticRoutes) contextValidateRoutes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Routes); i++ { - - if m.Routes[i] != nil { - - if swag.IsZero(m.Routes[i]) { // not required - return nil - } - - if err := m.Routes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("routes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StaticRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StaticRoutes) UnmarshalBinary(b []byte) error { - var res StaticRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/stats_task.go b/v2/models/stats_task.go deleted file mode 100644 index 8f16c851..00000000 --- a/v2/models/stats_task.go +++ /dev/null @@ -1,121 +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" -) - -// StatsTask Stats Task -// -// This specifies the details about the Stats Task. -// -// swagger:model StatsTask -type StatsTask struct { - - // Specifies the task id of the Stats task. - ID *string `json:"id,omitempty"` - - StatsTaskInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *StatsTask) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - // AO1 - var aO1 StatsTaskInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.StatsTaskInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m StatsTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *string `json:"id,omitempty"` - } - - dataAO0.ID = m.ID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.StatsTaskInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this stats task -func (m *StatsTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this stats task based on the context it is used -func (m *StatsTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StatsTaskInfo - if err := m.StatsTaskInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *StatsTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StatsTask) UnmarshalBinary(b []byte) error { - var res StatsTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/stats_task_info.go b/v2/models/stats_task_info.go deleted file mode 100644 index eea23e56..00000000 --- a/v2/models/stats_task_info.go +++ /dev/null @@ -1,162 +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" -) - -// StatsTaskInfo Stats Task -// -// Specifies the details about a Stats Task. -// -// swagger:model StatsTaskInfo -type StatsTaskInfo struct { - - // Specifies the run status for which are generic for most adapters. - BackupGenericStats *BackupGenericStats `json:"backupGenericStats,omitempty"` - - // Stats specifc for NAS Backup. - NasStats *BackupNasStats `json:"nasStats,omitempty"` -} - -// Validate validates this stats task info -func (m *StatsTaskInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupGenericStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNasStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsTaskInfo) validateBackupGenericStats(formats strfmt.Registry) error { - if swag.IsZero(m.BackupGenericStats) { // not required - return nil - } - - if m.BackupGenericStats != nil { - if err := m.BackupGenericStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupGenericStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupGenericStats") - } - return err - } - } - - return nil -} - -func (m *StatsTaskInfo) validateNasStats(formats strfmt.Registry) error { - if swag.IsZero(m.NasStats) { // not required - return nil - } - - if m.NasStats != nil { - if err := m.NasStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasStats") - } - return err - } - } - - return nil -} - -// ContextValidate validate this stats task info based on the context it is used -func (m *StatsTaskInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupGenericStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNasStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsTaskInfo) contextValidateBackupGenericStats(ctx context.Context, formats strfmt.Registry) error { - - if m.BackupGenericStats != nil { - - if swag.IsZero(m.BackupGenericStats) { // not required - return nil - } - - if err := m.BackupGenericStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupGenericStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupGenericStats") - } - return err - } - } - - return nil -} - -func (m *StatsTaskInfo) contextValidateNasStats(ctx context.Context, formats strfmt.Registry) error { - - if m.NasStats != nil { - - if swag.IsZero(m.NasStats) { // not required - return nil - } - - if err := m.NasStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasStats") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StatsTaskInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StatsTaskInfo) UnmarshalBinary(b []byte) error { - var res StatsTaskInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/stats_tasks.go b/v2/models/stats_tasks.go deleted file mode 100644 index a477625c..00000000 --- a/v2/models/stats_tasks.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StatsTasks Run Stats Tasks -// -// List of Run Stats Tasks. -// -// swagger:model StatsTasks -type StatsTasks struct { - - // Specifies the list of Run Stats Task. - StatsTasks []*StatsTask `json:"statsTasks"` -} - -// Validate validates this stats tasks -func (m *StatsTasks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatsTasks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsTasks) validateStatsTasks(formats strfmt.Registry) error { - if swag.IsZero(m.StatsTasks) { // not required - return nil - } - - for i := 0; i < len(m.StatsTasks); i++ { - if swag.IsZero(m.StatsTasks[i]) { // not required - continue - } - - if m.StatsTasks[i] != nil { - if err := m.StatsTasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this stats tasks based on the context it is used -func (m *StatsTasks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatsTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StatsTasks) contextValidateStatsTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StatsTasks); i++ { - - if m.StatsTasks[i] != nil { - - if swag.IsZero(m.StatsTasks[i]) { // not required - return nil - } - - if err := m.StatsTasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("statsTasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("statsTasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StatsTasks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StatsTasks) UnmarshalBinary(b []byte) error { - var res StatsTasks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_backup_policy.go b/v2/models/storage_array_snapshot_backup_policy.go deleted file mode 100644 index 2c44f4d9..00000000 --- a/v2/models/storage_array_snapshot_backup_policy.go +++ /dev/null @@ -1,159 +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" -) - -// StorageArraySnapshotBackupPolicy Storage Array Snapshot Schedule and Retention. -// -// Specifies storage snapshot managment backup settings for a Protection Group. -// -// swagger:model StorageArraySnapshotBackupPolicy -type StorageArraySnapshotBackupPolicy struct { - - // Specifies the schedule settings for storage snapshot managment backup. - // Required: true - Schedule *StorageArraySnapshotSchedule `json:"schedule"` - - // Specifies the Retention period of a storage snapshot managment backup in days, months or years. - // Required: true - Retention *Retention `json:"retention"` -} - -// Validate validates this storage array snapshot backup policy -func (m *StorageArraySnapshotBackupPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotBackupPolicy) validateSchedule(formats strfmt.Registry) error { - - if err := validate.Required("schedule", "body", m.Schedule); err != nil { - return err - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotBackupPolicy) validateRetention(formats strfmt.Registry) error { - - if err := validate.Required("retention", "body", m.Retention); err != nil { - return err - } - - 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 -} - -// ContextValidate validate this storage array snapshot backup policy based on the context it is used -func (m *StorageArraySnapshotBackupPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSchedule(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 *StorageArraySnapshotBackupPolicy) contextValidateSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.Schedule != nil { - - if err := m.Schedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotBackupPolicy) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { - - if m.Retention != 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 *StorageArraySnapshotBackupPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotBackupPolicy) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotBackupPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_config.go b/v2/models/storage_array_snapshot_config.go deleted file mode 100644 index 78509deb..00000000 --- a/v2/models/storage_array_snapshot_config.go +++ /dev/null @@ -1,231 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StorageArraySnapshotConfig Storage Snapshot Mgmt throttling Policy Config. -// -// Specifies the storage array snapshot config for individual volume/lun. -// -// swagger:model StorageArraySnapshotConfig -type StorageArraySnapshotConfig struct { - - // Specifies whether we will use storage snapshot managmement max snapshots config to all volumes/luns that are part of the registered entity. - MaxSnapshotsConfigEnabled *bool `json:"maxSnapshotsConfigEnabled,omitempty"` - - // Specifies whether we will use storage snapshot managmement max space config to all volumes/luns that are part of the registered entity. - MaxSpaceConfigEnabled *bool `json:"maxSpaceConfigEnabled,omitempty"` - - // Specifies the max space threshold configuration for storage snapshots. - MaxSpaceConfig *StorageArraySnapshotMaxSpaceConfig `json:"maxSpaceConfig,omitempty"` - - // Specifies the max snapshots threshold configuration taken for storage snapshots. - MaxSnapshotConfig *StorageArraySnapshotMaxSnapshotConfig `json:"maxSnapshotConfig,omitempty"` - - // Specifies the list of storage array snapshot management throttling policies for individual volume/lun. - StorageArraySnapshotThrottlingPolicies []*StorageArraySnapshotThrottlingPolicy `json:"storageArraySnapshotThrottlingPolicies"` -} - -// Validate validates this storage array snapshot config -func (m *StorageArraySnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageArraySnapshotThrottlingPolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotConfig) validateMaxSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if m.MaxSpaceConfig != nil { - if err := m.MaxSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfig) validateMaxSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if m.MaxSnapshotConfig != nil { - if err := m.MaxSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfig) validateStorageArraySnapshotThrottlingPolicies(formats strfmt.Registry) error { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies) { // not required - return nil - } - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - continue - } - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - if err := m.StorageArraySnapshotThrottlingPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this storage array snapshot config based on the context it is used -func (m *StorageArraySnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMaxSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageArraySnapshotThrottlingPolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotConfig) contextValidateMaxSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSpaceConfig != nil { - - if swag.IsZero(m.MaxSpaceConfig) { // not required - return nil - } - - if err := m.MaxSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfig) contextValidateMaxSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSnapshotConfig != nil { - - if swag.IsZero(m.MaxSnapshotConfig) { // not required - return nil - } - - if err := m.MaxSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotConfig) contextValidateStorageArraySnapshotThrottlingPolicies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageArraySnapshotThrottlingPolicies); i++ { - - if m.StorageArraySnapshotThrottlingPolicies[i] != nil { - - if swag.IsZero(m.StorageArraySnapshotThrottlingPolicies[i]) { // not required - return nil - } - - if err := m.StorageArraySnapshotThrottlingPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageArraySnapshotThrottlingPolicies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotConfig) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_max_snapshot_config.go b/v2/models/storage_array_snapshot_max_snapshot_config.go deleted file mode 100644 index a6e74bbc..00000000 --- a/v2/models/storage_array_snapshot_max_snapshot_config.go +++ /dev/null @@ -1,52 +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" -) - -// StorageArraySnapshotMaxSnapshotConfig Storage Snapshot Mgmt Max Snapshots Config. -// -// Specifies max snapshots threshold configuration that can used by snapshots to take storage snapshot. -// -// swagger:model StorageArraySnapshotMaxSnapshotConfig -type StorageArraySnapshotMaxSnapshotConfig struct { - - // Specifies max number of storage snapshots allowed per volume/lun. - MaxSnapshots *int32 `json:"maxSnapshots,omitempty"` -} - -// Validate validates this storage array snapshot max snapshot config -func (m *StorageArraySnapshotMaxSnapshotConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage array snapshot max snapshot config based on context it is used -func (m *StorageArraySnapshotMaxSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSnapshotConfig) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotMaxSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_max_space_config.go b/v2/models/storage_array_snapshot_max_space_config.go deleted file mode 100644 index 082b8f9f..00000000 --- a/v2/models/storage_array_snapshot_max_space_config.go +++ /dev/null @@ -1,52 +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" -) - -// StorageArraySnapshotMaxSpaceConfig Storage Snapshot Mgmt Max Space Config. -// -// Specifies max space threshold configuration that can used by snapshots to take storage snapshot. -// -// swagger:model StorageArraySnapshotMaxSpaceConfig -type StorageArraySnapshotMaxSpaceConfig struct { - - // Specifies max space threshold can used by snapshots in percentage in volume/lun to take storage snapshot. - MaxSnapshotSpacePercentage *int32 `json:"maxSnapshotSpacePercentage,omitempty"` -} - -// Validate validates this storage array snapshot max space config -func (m *StorageArraySnapshotMaxSpaceConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage array snapshot max space config based on context it is used -func (m *StorageArraySnapshotMaxSpaceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSpaceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotMaxSpaceConfig) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotMaxSpaceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_schedule.go b/v2/models/storage_array_snapshot_schedule.go deleted file mode 100644 index a3a9b035..00000000 --- a/v2/models/storage_array_snapshot_schedule.go +++ /dev/null @@ -1,432 +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" -) - -// StorageArraySnapshotSchedule Storage Snap Mgmt Schedule -// -// Specifies settings that defines how frequent Storage Snapshot Management backup will be performed for a Protection Group. -// -// swagger:model StorageArraySnapshotSchedule -type StorageArraySnapshotSchedule struct { - - // Specifies how often to start new Protection Group Runs of a Protection Group.
'Minutes' specifies that Protection Group run starts periodically after certain number of minutes specified in 'frequency' field.
'Hours' specifies that Protection Group run starts periodically after certain number of hours specified in 'frequency' field. - // Required: true - // Enum: ["Minutes","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of minutes. - MinuteSchedule *MinuteSchedule `json:"minuteSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of hours. - HourSchedule *HourSchedule `json:"hourSchedule,omitempty"` - - // Specifies the days Schedule for Protection Group to start runs after certain number of days. - DaySchedule *DaySchedule `json:"daySchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on certain number of days in a week. - WeekSchedule *WeekSchedule `json:"weekSchedule,omitempty"` - - // Specifies the week Schedule for Protection Group to start runs on specific week in a month and specific days of that week. - MonthSchedule *MonthSchedule `json:"monthSchedule,omitempty"` - - // Specifies the year Schedule for Protection Group to start runs on specific day of that year. - YearSchedule *YearSchedule `json:"yearSchedule,omitempty"` -} - -// Validate validates this storage array snapshot schedule -func (m *StorageArraySnapshotSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinuteSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHourSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDaySchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWeekSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMonthSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateYearSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var storageArraySnapshotScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - storageArraySnapshotScheduleTypeUnitPropEnum = append(storageArraySnapshotScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // StorageArraySnapshotScheduleUnitMinutes captures enum value "Minutes" - StorageArraySnapshotScheduleUnitMinutes string = "Minutes" - - // StorageArraySnapshotScheduleUnitHours captures enum value "Hours" - StorageArraySnapshotScheduleUnitHours string = "Hours" - - // StorageArraySnapshotScheduleUnitDays captures enum value "Days" - StorageArraySnapshotScheduleUnitDays string = "Days" - - // StorageArraySnapshotScheduleUnitWeeks captures enum value "Weeks" - StorageArraySnapshotScheduleUnitWeeks string = "Weeks" - - // StorageArraySnapshotScheduleUnitMonths captures enum value "Months" - StorageArraySnapshotScheduleUnitMonths string = "Months" - - // StorageArraySnapshotScheduleUnitYears captures enum value "Years" - StorageArraySnapshotScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *StorageArraySnapshotSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, storageArraySnapshotScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StorageArraySnapshotSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateMinuteSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if m.MinuteSchedule != nil { - if err := m.MinuteSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateHourSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if m.HourSchedule != nil { - if err := m.HourSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateDaySchedule(formats strfmt.Registry) error { - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if m.DaySchedule != nil { - if err := m.DaySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateWeekSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if m.WeekSchedule != nil { - if err := m.WeekSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateMonthSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if m.MonthSchedule != nil { - if err := m.MonthSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) validateYearSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if m.YearSchedule != nil { - if err := m.YearSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage array snapshot schedule based on the context it is used -func (m *StorageArraySnapshotSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMinuteSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHourSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDaySchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateWeekSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMonthSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateYearSchedule(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateMinuteSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MinuteSchedule != nil { - - if swag.IsZero(m.MinuteSchedule) { // not required - return nil - } - - if err := m.MinuteSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("minuteSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("minuteSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateHourSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.HourSchedule != nil { - - if swag.IsZero(m.HourSchedule) { // not required - return nil - } - - if err := m.HourSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hourSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hourSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateDaySchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.DaySchedule != nil { - - if swag.IsZero(m.DaySchedule) { // not required - return nil - } - - if err := m.DaySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("daySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("daySchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateWeekSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.WeekSchedule != nil { - - if swag.IsZero(m.WeekSchedule) { // not required - return nil - } - - if err := m.WeekSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("weekSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("weekSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateMonthSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.MonthSchedule != nil { - - if swag.IsZero(m.MonthSchedule) { // not required - return nil - } - - if err := m.MonthSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthSchedule") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotSchedule) contextValidateYearSchedule(ctx context.Context, formats strfmt.Registry) error { - - if m.YearSchedule != nil { - - if swag.IsZero(m.YearSchedule) { // not required - return nil - } - - if err := m.YearSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("yearSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("yearSchedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotSchedule) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_array_snapshot_throttling_policy.go b/v2/models/storage_array_snapshot_throttling_policy.go deleted file mode 100644 index bea357c7..00000000 --- a/v2/models/storage_array_snapshot_throttling_policy.go +++ /dev/null @@ -1,171 +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" -) - -// StorageArraySnapshotThrottlingPolicy Storage Snapshot Mgmt throttling Policy Config. -// -// Specifies the throttling policy for individual volume/lun. -// -// swagger:model StorageArraySnapshotThrottlingPolicy -type StorageArraySnapshotThrottlingPolicy struct { - - // Specifies the volume ID of the Storage Snapshot Mgmt throttling Policy. - ID *int64 `json:"Id,omitempty"` - - // Specifies whether we will use storage snapshot managmement max snapshots config to all volumes/luns that are part of the registered entity. - MaxSnapshotsConfigEnabled *bool `json:"maxSnapshotsConfigEnabled,omitempty"` - - // Specifies whether we will use storage snapshot managmement max space config to all volumes/luns that are part of the registered entity. - MaxSpaceConfigEnabled *bool `json:"maxSpaceConfigEnabled,omitempty"` - - // Specifies the max space threshold configuration for storage snapshots. - MaxSnapshotsMgmtSpaceConfig *StorageArraySnapshotMaxSpaceConfig `json:"maxSnapshotsMgmtSpaceConfig,omitempty"` - - // Specifies the max snapshots threshold configuration taken for storage snapshots. - MaxSnapshotsMgmtSnapshotConfig *StorageArraySnapshotMaxSnapshotConfig `json:"maxSnapshotsMgmtSnapshotConfig,omitempty"` -} - -// Validate validates this storage array snapshot throttling policy -func (m *StorageArraySnapshotThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMaxSnapshotsMgmtSpaceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxSnapshotsMgmtSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) validateMaxSnapshotsMgmtSpaceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSnapshotsMgmtSpaceConfig) { // not required - return nil - } - - if m.MaxSnapshotsMgmtSpaceConfig != nil { - if err := m.MaxSnapshotsMgmtSpaceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotsMgmtSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotsMgmtSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) validateMaxSnapshotsMgmtSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.MaxSnapshotsMgmtSnapshotConfig) { // not required - return nil - } - - if m.MaxSnapshotsMgmtSnapshotConfig != nil { - if err := m.MaxSnapshotsMgmtSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotsMgmtSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotsMgmtSnapshotConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage array snapshot throttling policy based on the context it is used -func (m *StorageArraySnapshotThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMaxSnapshotsMgmtSpaceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxSnapshotsMgmtSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) contextValidateMaxSnapshotsMgmtSpaceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSnapshotsMgmtSpaceConfig != nil { - - if swag.IsZero(m.MaxSnapshotsMgmtSpaceConfig) { // not required - return nil - } - - if err := m.MaxSnapshotsMgmtSpaceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotsMgmtSpaceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotsMgmtSpaceConfig") - } - return err - } - } - - return nil -} - -func (m *StorageArraySnapshotThrottlingPolicy) contextValidateMaxSnapshotsMgmtSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxSnapshotsMgmtSnapshotConfig != nil { - - if swag.IsZero(m.MaxSnapshotsMgmtSnapshotConfig) { // not required - return nil - } - - if err := m.MaxSnapshotsMgmtSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxSnapshotsMgmtSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxSnapshotsMgmtSnapshotConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageArraySnapshotThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageArraySnapshotThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res StorageArraySnapshotThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_domain.go b/v2/models/storage_domain.go deleted file mode 100644 index c10c37bf..00000000 --- a/v2/models/storage_domain.go +++ /dev/null @@ -1,690 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// StorageDomain Specifies a Storage Domain. -// -// swagger:model StorageDomain -type StorageDomain struct { - - // Specifies the Storage Domain id. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the Storage Domain name. - // Required: true - Name *string `json:"name"` - - // Specifies the cluster partition id of the Storage Domain. - // Required: true - ClusterPartitionID *int64 `json:"clusterPartitionId"` - - // Specifies the cluster partition name of the Storage Domain. - // Read Only: true - ClusterPartitionName *string `json:"clusterPartitionName,omitempty"` - - // Specifies a list of Subnets with IP addresses that have permissions to access the Storage Domain. - SubnetWhitelist []*Subnet `json:"subnetWhitelist"` - - // Specifies whether to enable creation of S3 bucket on this Storage Domain. - S3BucketsEnabled *bool `json:"s3BucketsEnabled,omitempty"` - - // Specifies the Active Directory domain name that this Storage Domain is mapped to. - AdDomainName *string `json:"adDomainName,omitempty"` - - // Specifies the NIS domain names that this Storage Domain is mapped to. - NisDomainNames []string `json:"nisDomainNames"` - - // Specifies the Kerberos realm name that this Storage Domain is mapped to. - KerberosRealmName *string `json:"kerberosRealmName,omitempty"` - - // Specifies the LDAP provider id that this Storage Domain is mapped to. - LdapProviderID *int64 `json:"ldapProviderId,omitempty"` - - // Specifies a list of tenant ids that that Storage Domain belongs. There can only be one tenant id in this field unless Storage Domain sharing between tenants is allowed on this cluster. - TenantIds []string `json:"tenantIds"` - - // Specifies whether to enable driect archive on this Storage Domain. If enabled, this Storage Domain can be used as a staging area while copying a large dataset that can't fit on the cluster to an external target. - DirectArchiveEnabled *bool `json:"directArchiveEnabled,omitempty"` - - // Specifies the brick size used for blobs in this Storage Domain. - BlobBrickSizeBytes *int32 `json:"blobBrickSizeBytes,omitempty"` - - // Specifies the associated KMS server id. - KmsServerID *int64 `json:"kmsServerId,omitempty"` - - // Specifies whether DEK(Data Encryption Key) rotation is enabled for this Storage Domain. This is applicable only when the Storage Domain uses AWS or similar KMS in which the KEK (Key Encryption Key) is not created and maintained by Cohesity. For Internal KMS and keys stored in Safenet servers, DEK rotation will not be performed. - DekRotationEnabled *bool `json:"dekRotationEnabled,omitempty"` - - // If 'true', when the Cohesity Cluster is writing to a file, the file modification time is not persisted synchronously during the file write, so the modification time may not be accurate. (Typically the file modification time is off by 30 seconds but it can be longer.) - TreatFileSyncAsDataSync *bool `json:"treatFileSyncAsDataSync,omitempty"` - - // Specifies whether Storage Domain is recommended for the specified View template. - // Read Only: true - Recommended *bool `json:"recommended,omitempty"` - - // Specifies the Storage Domain schemas. - // Read Only: true - Schemas []*Schema `json:"schemas"` - - // Specifies the file count by size for the View. - // Read Only: true - FileCountBySize []*FileCount `json:"fileCountBySize"` - - // Specifies the cloud domain Id. - CloudDomainID *int64 `json:"cloudDomainId,omitempty"` - - // Specifies the vault Id associated with cloud domain ID. - VaultID *int64 `json:"vaultId,omitempty"` - - // Last key rotation timestamp in msecs for storage domain. - LastKeyRotationTimestampMsecs *int64 `json:"lastKeyRotationTimestampMsecs,omitempty"` - - // Specifies the cloud down water fall parameters for this Storage Domain. - CloudDownWaterFallParams *CloudDownWaterFallParams `json:"cloudDownWaterFallParams,omitempty"` - - // Specifies a default user quota limit for users within views in this Storage Domain. - DefaultUserQuota *QuotaPolicy `json:"defaultUserQuota,omitempty"` - - // Specifies a default logical quota limit for all views in this Storage Domain. This quota can be overwritten by a view level quota. - DefaultViewQuota *QuotaPolicy `json:"defaultViewQuota,omitempty"` - - // Specifies a quota limit for physical usage of this Storage Domain. This quota defines a limit of data that can be physically (after data size is reduced by block tracking, compression and deduplication) stored on this storage domain. A new write will not be allowed when the storage domain usage will exceeds the specified quota. Due to the latency of calculating usage across all nodes, the actual storage domain usage may exceed the quota limit by a little bit. - PhysicalQuota *QuotaPolicy `json:"physicalQuota,omitempty"` - - // Specifies the Storage Domain stats. - // Read Only: true - Stats *DataUsageStats `json:"stats,omitempty"` - - // Specifies the storage policy for this Storage Domain. - StoragePolicy *StoragePolicy `json:"storagePolicy,omitempty"` -} - -// Validate validates this storage domain -func (m *StorageDomain) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterPartitionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchemas(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileCountBySize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudDownWaterFallParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultUserQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultViewQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomain) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *StorageDomain) validateClusterPartitionID(formats strfmt.Registry) error { - - if err := validate.Required("clusterPartitionId", "body", m.ClusterPartitionID); err != nil { - return err - } - - return nil -} - -func (m *StorageDomain) validateSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) validateSchemas(formats strfmt.Registry) error { - if swag.IsZero(m.Schemas) { // not required - return nil - } - - for i := 0; i < len(m.Schemas); i++ { - if swag.IsZero(m.Schemas[i]) { // not required - continue - } - - if m.Schemas[i] != nil { - if err := m.Schemas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) validateFileCountBySize(formats strfmt.Registry) error { - if swag.IsZero(m.FileCountBySize) { // not required - return nil - } - - for i := 0; i < len(m.FileCountBySize); i++ { - if swag.IsZero(m.FileCountBySize[i]) { // not required - continue - } - - if m.FileCountBySize[i] != nil { - if err := m.FileCountBySize[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) validateCloudDownWaterFallParams(formats strfmt.Registry) error { - if swag.IsZero(m.CloudDownWaterFallParams) { // not required - return nil - } - - if m.CloudDownWaterFallParams != nil { - if err := m.CloudDownWaterFallParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDownWaterFallParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDownWaterFallParams") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) validateDefaultUserQuota(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultUserQuota) { // not required - return nil - } - - if m.DefaultUserQuota != nil { - if err := m.DefaultUserQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuota") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) validateDefaultViewQuota(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultViewQuota) { // not required - return nil - } - - if m.DefaultViewQuota != nil { - if err := m.DefaultViewQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuota") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) validatePhysicalQuota(formats strfmt.Registry) error { - if swag.IsZero(m.PhysicalQuota) { // not required - 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 -} - -func (m *StorageDomain) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *StorageDomain) validateStoragePolicy(formats strfmt.Registry) error { - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if m.StoragePolicy != nil { - if err := m.StoragePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage domain based on the context it is used -func (m *StorageDomain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterPartitionName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecommended(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSchemas(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileCountBySize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudDownWaterFallParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultUserQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultViewQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePhysicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomain) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *StorageDomain) contextValidateClusterPartitionName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "clusterPartitionName", "body", m.ClusterPartitionName); err != nil { - return err - } - - return nil -} - -func (m *StorageDomain) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) contextValidateRecommended(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "recommended", "body", m.Recommended); err != nil { - return err - } - - return nil -} - -func (m *StorageDomain) contextValidateSchemas(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "schemas", "body", []*Schema(m.Schemas)); err != nil { - return err - } - - for i := 0; i < len(m.Schemas); i++ { - - if m.Schemas[i] != nil { - - if swag.IsZero(m.Schemas[i]) { // not required - return nil - } - - if err := m.Schemas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schemas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("schemas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) contextValidateFileCountBySize(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "fileCountBySize", "body", []*FileCount(m.FileCountBySize)); err != nil { - return err - } - - for i := 0; i < len(m.FileCountBySize); i++ { - - if m.FileCountBySize[i] != nil { - - if swag.IsZero(m.FileCountBySize[i]) { // not required - return nil - } - - if err := m.FileCountBySize[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *StorageDomain) contextValidateCloudDownWaterFallParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloudDownWaterFallParams != nil { - - if swag.IsZero(m.CloudDownWaterFallParams) { // not required - return nil - } - - if err := m.CloudDownWaterFallParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDownWaterFallParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDownWaterFallParams") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) contextValidateDefaultUserQuota(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultUserQuota != nil { - - if swag.IsZero(m.DefaultUserQuota) { // not required - return nil - } - - if err := m.DefaultUserQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuota") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) contextValidateDefaultViewQuota(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultViewQuota != nil { - - if swag.IsZero(m.DefaultViewQuota) { // not required - return nil - } - - if err := m.DefaultViewQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuota") - } - return err - } - } - - return nil -} - -func (m *StorageDomain) 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 -} - -func (m *StorageDomain) 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 -} - -func (m *StorageDomain) contextValidateStoragePolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicy != nil { - - if swag.IsZero(m.StoragePolicy) { // not required - return nil - } - - if err := m.StoragePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageDomain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageDomain) UnmarshalBinary(b []byte) error { - var res StorageDomain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_domain_pair.go b/v2/models/storage_domain_pair.go deleted file mode 100644 index 03e06941..00000000 --- a/v2/models/storage_domain_pair.go +++ /dev/null @@ -1,127 +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" -) - -// StorageDomainPair Specifies a Storage Domain pair. -// -// swagger:model StorageDomainPair -type StorageDomainPair struct { - - // Specifies the local Storage Domain id. - // Required: true - LocalStorageDomainID *int64 `json:"localStorageDomainId"` - - // Specifies the remote Storage Domain id. - // Required: true - RemoteStorageDomainID *int64 `json:"remoteStorageDomainId"` - - // Specifies the local Storage Domain name. - // Read Only: true - LocalStorageDomainName *string `json:"localStorageDomainName,omitempty"` - - // Specifies the remote Storage Domain name. - // Read Only: true - RemoteStorageDomainName *string `json:"remoteStorageDomainName,omitempty"` -} - -// Validate validates this storage domain pair -func (m *StorageDomainPair) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocalStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRemoteStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomainPair) validateLocalStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("localStorageDomainId", "body", m.LocalStorageDomainID); err != nil { - return err - } - - return nil -} - -func (m *StorageDomainPair) validateRemoteStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("remoteStorageDomainId", "body", m.RemoteStorageDomainID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this storage domain pair based on the context it is used -func (m *StorageDomainPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalStorageDomainName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRemoteStorageDomainName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomainPair) contextValidateLocalStorageDomainName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "localStorageDomainName", "body", m.LocalStorageDomainName); err != nil { - return err - } - - return nil -} - -func (m *StorageDomainPair) contextValidateRemoteStorageDomainName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "remoteStorageDomainName", "body", m.RemoteStorageDomainName); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageDomainPair) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageDomainPair) UnmarshalBinary(b []byte) error { - var res StorageDomainPair - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_domains.go b/v2/models/storage_domains.go deleted file mode 100644 index c301aab6..00000000 --- a/v2/models/storage_domains.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StorageDomains Specifies a list of Storage Domains. -// -// swagger:model StorageDomains -type StorageDomains struct { - - // Specifies the list of storage domains. - StorageDomains []*StorageDomain `json:"storageDomains"` -} - -// Validate validates this storage domains -func (m *StorageDomains) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageDomains(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomains) validateStorageDomains(formats strfmt.Registry) error { - if swag.IsZero(m.StorageDomains) { // not required - return nil - } - - for i := 0; i < len(m.StorageDomains); i++ { - if swag.IsZero(m.StorageDomains[i]) { // not required - continue - } - - if m.StorageDomains[i] != nil { - if err := m.StorageDomains[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this storage domains based on the context it is used -func (m *StorageDomains) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StorageDomains) contextValidateStorageDomains(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageDomains); i++ { - - if m.StorageDomains[i] != nil { - - if swag.IsZero(m.StorageDomains[i]) { // not required - return nil - } - - if err := m.StorageDomains[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StorageDomains) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StorageDomains) UnmarshalBinary(b []byte) error { - var res StorageDomains - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_policy.go b/v2/models/storage_policy.go deleted file mode 100644 index 5e7ea3ce..00000000 --- a/v2/models/storage_policy.go +++ /dev/null @@ -1,333 +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" -) - -// StoragePolicy Storage Policy -// -// Specifies the storage policy of a Storage Domain. -// -// swagger:model StoragePolicy -type StoragePolicy struct { - - // Specifies the time in seconds when deduplication and compression of the Storage Domain starts. - DeduplicationCompressionDelaySecs *int32 `json:"deduplicationCompressionDelaySecs,omitempty"` - - // Specifies the encryption type for a Storage Domain. - // Enum: ["None","Strong","Weak"] - EncryptionType *string `json:"encryptionType,omitempty"` - - // Specifies the encryption mode for a Storage Domain. - // Enum: ["CBC","GCM"] - AesEncryptionMode *string `json:"aesEncryptionMode,omitempty"` - - // Specifies the vault id assigned for cloud spill for a Storage Domain. - CloudSpillVaultID *int64 `json:"cloudSpillVaultId,omitempty"` - - // Specifies the number of disk failures to tolerate for a Storage Domain. By default, this field is 1 for cluster with three or more nodes. If erasure coding is enabled, this field will be the same as numCodedStripes. - NumDiskFailuresTolerated *int32 `json:"numDiskFailuresTolerated,omitempty"` - - // Specifies the number of node failures to tolerate for a Storage Domain. By default this field is replication factor minus 1 for replication chunk files and is the same as numCodedStripes for erasure coding chunk files. - NumNodeFailuresTolerated *int32 `json:"numNodeFailuresTolerated,omitempty"` - - // Specifies whether app marker detection is enabled. When enabled, app markers will be removed from data and put in separate chunks. - AppMarkerDetectionEnabled *bool `json:"appMarkerDetectionEnabled,omitempty"` - - // Specifies compression settings for a Storage Domain. - CompressionParams *CompressionParams `json:"compressionParams,omitempty"` - - // Specifies deduplication settings for a Storage Domain. - DeduplicationParams *DeduplicationParams `json:"deduplicationParams,omitempty"` - - // Specifies the erasure coding parameters for a Storage Domain. - ErasureCodingParams *ErasureCodingParams `json:"erasureCodingParams,omitempty"` -} - -// Validate validates this storage policy -func (m *StoragePolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEncryptionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAesEncryptionMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCompressionParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeduplicationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateErasureCodingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var storagePolicyTypeEncryptionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Strong","Weak"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - storagePolicyTypeEncryptionTypePropEnum = append(storagePolicyTypeEncryptionTypePropEnum, v) - } -} - -const ( - - // StoragePolicyEncryptionTypeNone captures enum value "None" - StoragePolicyEncryptionTypeNone string = "None" - - // StoragePolicyEncryptionTypeStrong captures enum value "Strong" - StoragePolicyEncryptionTypeStrong string = "Strong" - - // StoragePolicyEncryptionTypeWeak captures enum value "Weak" - StoragePolicyEncryptionTypeWeak string = "Weak" -) - -// prop value enum -func (m *StoragePolicy) validateEncryptionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, storagePolicyTypeEncryptionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StoragePolicy) validateEncryptionType(formats strfmt.Registry) error { - if swag.IsZero(m.EncryptionType) { // not required - return nil - } - - // value enum - if err := m.validateEncryptionTypeEnum("encryptionType", "body", *m.EncryptionType); err != nil { - return err - } - - return nil -} - -var storagePolicyTypeAesEncryptionModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CBC","GCM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - storagePolicyTypeAesEncryptionModePropEnum = append(storagePolicyTypeAesEncryptionModePropEnum, v) - } -} - -const ( - - // StoragePolicyAesEncryptionModeCBC captures enum value "CBC" - StoragePolicyAesEncryptionModeCBC string = "CBC" - - // StoragePolicyAesEncryptionModeGCM captures enum value "GCM" - StoragePolicyAesEncryptionModeGCM string = "GCM" -) - -// prop value enum -func (m *StoragePolicy) validateAesEncryptionModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, storagePolicyTypeAesEncryptionModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *StoragePolicy) validateAesEncryptionMode(formats strfmt.Registry) error { - if swag.IsZero(m.AesEncryptionMode) { // not required - return nil - } - - // value enum - if err := m.validateAesEncryptionModeEnum("aesEncryptionMode", "body", *m.AesEncryptionMode); err != nil { - return err - } - - return nil -} - -func (m *StoragePolicy) validateCompressionParams(formats strfmt.Registry) error { - if swag.IsZero(m.CompressionParams) { // not required - return nil - } - - if m.CompressionParams != nil { - if err := m.CompressionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("compressionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("compressionParams") - } - return err - } - } - - return nil -} - -func (m *StoragePolicy) validateDeduplicationParams(formats strfmt.Registry) error { - if swag.IsZero(m.DeduplicationParams) { // not required - return nil - } - - if m.DeduplicationParams != nil { - if err := m.DeduplicationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deduplicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deduplicationParams") - } - return err - } - } - - return nil -} - -func (m *StoragePolicy) validateErasureCodingParams(formats strfmt.Registry) error { - if swag.IsZero(m.ErasureCodingParams) { // not required - return nil - } - - if m.ErasureCodingParams != nil { - if err := m.ErasureCodingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("erasureCodingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("erasureCodingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this storage policy based on the context it is used -func (m *StoragePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCompressionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeduplicationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateErasureCodingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *StoragePolicy) contextValidateCompressionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CompressionParams != nil { - - if swag.IsZero(m.CompressionParams) { // not required - return nil - } - - if err := m.CompressionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("compressionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("compressionParams") - } - return err - } - } - - return nil -} - -func (m *StoragePolicy) contextValidateDeduplicationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.DeduplicationParams != nil { - - if swag.IsZero(m.DeduplicationParams) { // not required - return nil - } - - if err := m.DeduplicationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deduplicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deduplicationParams") - } - return err - } - } - - return nil -} - -func (m *StoragePolicy) contextValidateErasureCodingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ErasureCodingParams != nil { - - if swag.IsZero(m.ErasureCodingParams) { // not required - return nil - } - - if err := m.ErasureCodingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("erasureCodingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("erasureCodingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *StoragePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StoragePolicy) UnmarshalBinary(b []byte) error { - var res StoragePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/storage_policy_override.go b/v2/models/storage_policy_override.go deleted file mode 100644 index abcc7e64..00000000 --- a/v2/models/storage_policy_override.go +++ /dev/null @@ -1,61 +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" -) - -// StoragePolicyOverride Storage Policy Override. -// -// Specifies if inline deduplication and compression settings inherited from -// Storage Domain (View Box) should be disabled for this View. -// -// swagger:model StoragePolicyOverride -type StoragePolicyOverride struct { - - // If false, the inline deduplication and compression settings inherited - // from the Storage Domain (View Box) apply to this View. - // If true, both inline deduplication and compression are disabled for this - // View. This can only be set to true if inline deduplication is set for - // the Storage Domain (View Box). - DisableInlineDedupAndCompression *bool `json:"disableInlineDedupAndCompression,omitempty"` - - // If it is set to true, we would disable dedup for writes made in this - // view irrespective of the view box's storage policy. - DisableDedup *bool `json:"disableDedup,omitempty"` -} - -// Validate validates this storage policy override -func (m *StoragePolicyOverride) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this storage policy override based on context it is used -func (m *StoragePolicyOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StoragePolicyOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StoragePolicyOverride) UnmarshalBinary(b []byte) error { - var res StoragePolicyOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/string_form_field_params.go b/v2/models/string_form_field_params.go deleted file mode 100644 index 5f23ac52..00000000 --- a/v2/models/string_form_field_params.go +++ /dev/null @@ -1,59 +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" -) - -// StringFormFieldParams Parameters to specify a string form field -// -// swagger:model StringFormFieldParams -type StringFormFieldParams struct { - - // Specifies whether the field is mandatory - Required *bool `json:"required,omitempty"` - - // Default value for the field - DefaultValue *string `json:"defaultValue,omitempty"` - - // Description for the field to be shown on UI screen - Description *string `json:"description,omitempty"` - - // Placeholder for the form field - Placeholder *string `json:"placeholder,omitempty"` -} - -// Validate validates this string form field params -func (m *StringFormFieldParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this string form field params based on context it is used -func (m *StringFormFieldParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *StringFormFieldParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StringFormFieldParams) UnmarshalBinary(b []byte) error { - var res StringFormFieldParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/subnet.go b/v2/models/subnet.go deleted file mode 100644 index 885ec81a..00000000 --- a/v2/models/subnet.go +++ /dev/null @@ -1,313 +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" -) - -// Subnet Subnet -// -// Defines a Subnet (Subnetwork). -// 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 Subnet -type Subnet struct { - - // Component that has reserved the subnet. - Component *string `json:"component,omitempty"` - - // Description of the subnet. - Description *string `json:"description,omitempty"` - - // Gateway for the subnet. - Gateway *string `json:"gateway,omitempty"` - - // ID of the subnet. - ID *int32 `json:"id,omitempty"` - - // Specifies either an IPv6 address or an IPv4 address. - IP *string `json:"ip,omitempty"` - - // Specifies the netmask using bits. - NetmaskBits *int32 `json:"netmaskBits,omitempty"` - - // Specifies the netmask using an IP4 address. - // The netmask can only be set using netmaskIp4 if the IP address - // is an IPv4 address. - NetmaskIp4 *string `json:"netmaskIp4,omitempty"` - - // Specifies whether clients from this subnet can mount using NFS protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - NfsAccess *string `json:"nfsAccess,omitempty"` - - // Specifies which nfsSquash Mounted. - // 'kNone' mounts none. - // 'kRootSquash' mounts nfsRootSquash. Whether clients from this subnet can - // mount as root on NFS. - // 'kAllSquash' mounts nfsAllSquash. Whether all clients from this subnet can - // map view with view_all_squash_uid/view_all_squash_gid configured in - // the view. - // Enum: ["kNone","kRootSquash","kAllSquash"] - NfsSquash *string `json:"nfsSquash,omitempty"` - - // Specifies whether clients from this subnet can mount using SMB protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - SmbAccess *string `json:"smbAccess,omitempty"` - - // Specifies whether clients from this subnet can access using S3 protocol. - // Protocol access level. - // 'kDisabled' indicates Protocol access level 'Disabled' - // 'kReadOnly' indicates Protocol access level 'ReadOnly' - // 'kReadWrite' indicates Protocol access level 'ReadWrite' - // Enum: ["kDisabled","kReadOnly","kReadWrite"] - S3Access *string `json:"s3Access,omitempty"` -} - -// Validate validates this subnet -func (m *Subnet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNfsAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNfsSquash(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3Access(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var subnetTypeNfsAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeNfsAccessPropEnum = append(subnetTypeNfsAccessPropEnum, v) - } -} - -const ( - - // SubnetNfsAccessKDisabled captures enum value "kDisabled" - SubnetNfsAccessKDisabled string = "kDisabled" - - // SubnetNfsAccessKReadOnly captures enum value "kReadOnly" - SubnetNfsAccessKReadOnly string = "kReadOnly" - - // SubnetNfsAccessKReadWrite captures enum value "kReadWrite" - SubnetNfsAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateNfsAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeNfsAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateNfsAccess(formats strfmt.Registry) error { - if swag.IsZero(m.NfsAccess) { // not required - return nil - } - - // value enum - if err := m.validateNfsAccessEnum("nfsAccess", "body", *m.NfsAccess); err != nil { - return err - } - - return nil -} - -var subnetTypeNfsSquashPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNone","kRootSquash","kAllSquash"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeNfsSquashPropEnum = append(subnetTypeNfsSquashPropEnum, v) - } -} - -const ( - - // SubnetNfsSquashKNone captures enum value "kNone" - SubnetNfsSquashKNone string = "kNone" - - // SubnetNfsSquashKRootSquash captures enum value "kRootSquash" - SubnetNfsSquashKRootSquash string = "kRootSquash" - - // SubnetNfsSquashKAllSquash captures enum value "kAllSquash" - SubnetNfsSquashKAllSquash string = "kAllSquash" -) - -// prop value enum -func (m *Subnet) validateNfsSquashEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeNfsSquashPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateNfsSquash(formats strfmt.Registry) error { - if swag.IsZero(m.NfsSquash) { // not required - return nil - } - - // value enum - if err := m.validateNfsSquashEnum("nfsSquash", "body", *m.NfsSquash); err != nil { - return err - } - - return nil -} - -var subnetTypeSmbAccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeSmbAccessPropEnum = append(subnetTypeSmbAccessPropEnum, v) - } -} - -const ( - - // SubnetSmbAccessKDisabled captures enum value "kDisabled" - SubnetSmbAccessKDisabled string = "kDisabled" - - // SubnetSmbAccessKReadOnly captures enum value "kReadOnly" - SubnetSmbAccessKReadOnly string = "kReadOnly" - - // SubnetSmbAccessKReadWrite captures enum value "kReadWrite" - SubnetSmbAccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateSmbAccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeSmbAccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateSmbAccess(formats strfmt.Registry) error { - if swag.IsZero(m.SmbAccess) { // not required - return nil - } - - // value enum - if err := m.validateSmbAccessEnum("smbAccess", "body", *m.SmbAccess); err != nil { - return err - } - - return nil -} - -var subnetTypeS3AccessPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kDisabled","kReadOnly","kReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - subnetTypeS3AccessPropEnum = append(subnetTypeS3AccessPropEnum, v) - } -} - -const ( - - // SubnetS3AccessKDisabled captures enum value "kDisabled" - SubnetS3AccessKDisabled string = "kDisabled" - - // SubnetS3AccessKReadOnly captures enum value "kReadOnly" - SubnetS3AccessKReadOnly string = "kReadOnly" - - // SubnetS3AccessKReadWrite captures enum value "kReadWrite" - SubnetS3AccessKReadWrite string = "kReadWrite" -) - -// prop value enum -func (m *Subnet) validateS3AccessEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, subnetTypeS3AccessPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Subnet) validateS3Access(formats strfmt.Registry) error { - if swag.IsZero(m.S3Access) { // not required - return nil - } - - // value enum - if err := m.validateS3AccessEnum("s3Access", "body", *m.S3Access); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this subnet based on context it is used -func (m *Subnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Subnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Subnet) UnmarshalBinary(b []byte) error { - var res Subnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/subnet_info.go b/v2/models/subnet_info.go deleted file mode 100644 index b82d8136..00000000 --- a/v2/models/subnet_info.go +++ /dev/null @@ -1,58 +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" -) - -// SubnetInfo SubnetInfo -// -// Subnet information. -// -// swagger:model SubnetInfo -type SubnetInfo struct { - - // Subnet IP. - SubnetIP *string `json:"subnetIp,omitempty"` - - // Subnet netmask bits. - NetmaskBits *int32 `json:"netmaskBits,omitempty"` - - // Gateway. - Gateway *string `json:"gateway,omitempty"` -} - -// Validate validates this subnet info -func (m *SubnetInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this subnet info based on context it is used -func (m *SubnetInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SubnetInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SubnetInfo) UnmarshalBinary(b []byte) error { - var res SubnetInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/success_resp.go b/v2/models/success_resp.go deleted file mode 100644 index 62b3cb33..00000000 --- a/v2/models/success_resp.go +++ /dev/null @@ -1,71 +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" -) - -// SuccessResp Specifies the firewall profile names to be removed. -// -// swagger:model SuccessResp -type SuccessResp struct { - - // Specifies the response message. - // Required: true - Message *string `json:"message"` -} - -// Validate validates this success resp -func (m *SuccessResp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMessage(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SuccessResp) validateMessage(formats strfmt.Registry) error { - - if err := validate.Required("message", "body", m.Message); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this success resp based on context it is used -func (m *SuccessResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SuccessResp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SuccessResp) UnmarshalBinary(b []byte) error { - var res SuccessResp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/support_channel_config.go b/v2/models/support_channel_config.go deleted file mode 100644 index 5f942d09..00000000 --- a/v2/models/support_channel_config.go +++ /dev/null @@ -1,90 +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" -) - -// SupportChannelConfig Support channel configuration. -// -// Specifies the support channel configuration. -// -// swagger:model SupportChannelConfig -type SupportChannelConfig struct { - - // Specifies id the support channel is enabled. - // Required: true - IsEnabled *bool `json:"isEnabled"` - - // Specifies the support channel expiry time. - // Required: true - EndTimeUsecs *int64 `json:"endTimeUsecs"` -} - -// Validate validates this support channel config -func (m *SupportChannelConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTimeUsecs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SupportChannelConfig) validateIsEnabled(formats strfmt.Registry) error { - - if err := validate.Required("isEnabled", "body", m.IsEnabled); err != nil { - return err - } - - return nil -} - -func (m *SupportChannelConfig) validateEndTimeUsecs(formats strfmt.Registry) error { - - if err := validate.Required("endTimeUsecs", "body", m.EndTimeUsecs); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this support channel config based on context it is used -func (m *SupportChannelConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportChannelConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportChannelConfig) UnmarshalBinary(b []byte) error { - var res SupportChannelConfig - 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 deleted file mode 100644 index ccde1593..00000000 --- a/v2/models/support_mfa_config_info.go +++ /dev/null @@ -1,117 +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" -) - -// SupportMfaConfigInfo Holds the MFA configuration to be returned or stored. -// -// swagger:model SupportMfaConfigInfo -type SupportMfaConfigInfo struct { - - // Specifies whether MFA is enabled for support user. - Enabled *bool `json:"enabled,omitempty"` - - // Specifies the mechanism to receive the OTP code. - // Enum: ["email","totp","salesforce"] - Environment *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"` -} - -// 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 { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var supportMfaConfigInfoTypeEnvironmentPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["email","totp","salesforce"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - supportMfaConfigInfoTypeEnvironmentPropEnum = append(supportMfaConfigInfoTypeEnvironmentPropEnum, v) - } -} - -const ( - - // SupportMfaConfigInfoEnvironmentEmail captures enum value "email" - SupportMfaConfigInfoEnvironmentEmail string = "email" - - // SupportMfaConfigInfoEnvironmentTotp captures enum value "totp" - SupportMfaConfigInfoEnvironmentTotp string = "totp" - - // SupportMfaConfigInfoEnvironmentSalesforce captures enum value "salesforce" - SupportMfaConfigInfoEnvironmentSalesforce string = "salesforce" -) - -// prop value enum -func (m *SupportMfaConfigInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, supportMfaConfigInfoTypeEnvironmentPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SupportMfaConfigInfo) validateEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.Environment) { // not required - return nil - } - - // value enum - if err := m.validateEnvironmentEnum("mfaType", "body", *m.Environment); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this support mfa config info based on context it is used -func (m *SupportMfaConfigInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportMfaConfigInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportMfaConfigInfo) UnmarshalBinary(b []byte) error { - var res SupportMfaConfigInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/support_totp_key_info.go b/v2/models/support_totp_key_info.go deleted file mode 100644 index fbb34b1d..00000000 --- a/v2/models/support_totp_key_info.go +++ /dev/null @@ -1,56 +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" -) - -// SupportTotpKeyInfo Specifies the TOTP key info -// -// swagger:model SupportTotpKeyInfo -type SupportTotpKeyInfo struct { - - // Specifies the TOTP secret key. - TotpSecretKey string `json:"totpSecretKey,omitempty"` - - // Specifies the TOTP key URI for generating MFA QR code. - TotpURI string `json:"totpUri,omitempty"` - - // Specifies the TOTP account name to be configured for support user. - AccountName string `json:"accountName,omitempty"` -} - -// Validate validates this support totp key info -func (m *SupportTotpKeyInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this support totp key info based on context it is used -func (m *SupportTotpKeyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportTotpKeyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportTotpKeyInfo) UnmarshalBinary(b []byte) error { - var res SupportTotpKeyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/support_user_config.go b/v2/models/support_user_config.go deleted file mode 100644 index 1227e448..00000000 --- a/v2/models/support_user_config.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" -) - -// SupportUserConfig Specifies the support user's configuration on the Cohesity cluster such as if its shell password has been set and/or sudo access is granted. -// -// swagger:model SupportUserConfig -type SupportUserConfig struct { - - // Specifies if the support user has sudo access. - EnableSudoAccess *bool `json:"enableSudoAccess,omitempty"` - - // Specifies if the password for the support user has been set. - PasswordSet *bool `json:"passwordSet,omitempty"` -} - -// Validate validates this support user config -func (m *SupportUserConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this support user config based on context it is used -func (m *SupportUserConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportUserConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportUserConfig) UnmarshalBinary(b []byte) error { - var res SupportUserConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/supported_hadoop_distributions.go b/v2/models/supported_hadoop_distributions.go deleted file mode 100644 index 616b74ae..00000000 --- a/v2/models/supported_hadoop_distributions.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SupportedHadoopDistributions Enumeration of all the supported Hadoop distributions. -// -// Enumeration of all the supported Hadoop distributions. -// -// swagger:model SupportedHadoopDistributions -type SupportedHadoopDistributions struct { - - // Enumeration of all the supported Hadoop distributions. - // Enum: ["CDH","HDP"] - SupportedHadoopDistributions string `json:"SupportedHadoopDistributions,omitempty"` -} - -// Validate validates this supported hadoop distributions -func (m *SupportedHadoopDistributions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSupportedHadoopDistributions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var supportedHadoopDistributionsTypeSupportedHadoopDistributionsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CDH","HDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - supportedHadoopDistributionsTypeSupportedHadoopDistributionsPropEnum = append(supportedHadoopDistributionsTypeSupportedHadoopDistributionsPropEnum, v) - } -} - -const ( - - // SupportedHadoopDistributionsSupportedHadoopDistributionsCDH captures enum value "CDH" - SupportedHadoopDistributionsSupportedHadoopDistributionsCDH string = "CDH" - - // SupportedHadoopDistributionsSupportedHadoopDistributionsHDP captures enum value "HDP" - SupportedHadoopDistributionsSupportedHadoopDistributionsHDP string = "HDP" -) - -// prop value enum -func (m *SupportedHadoopDistributions) validateSupportedHadoopDistributionsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, supportedHadoopDistributionsTypeSupportedHadoopDistributionsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SupportedHadoopDistributions) validateSupportedHadoopDistributions(formats strfmt.Registry) error { - if swag.IsZero(m.SupportedHadoopDistributions) { // not required - return nil - } - - // value enum - if err := m.validateSupportedHadoopDistributionsEnum("SupportedHadoopDistributions", "body", m.SupportedHadoopDistributions); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this supported hadoop distributions based on context it is used -func (m *SupportedHadoopDistributions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SupportedHadoopDistributions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SupportedHadoopDistributions) UnmarshalBinary(b []byte) error { - var res SupportedHadoopDistributions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/swift_config.go b/v2/models/swift_config.go deleted file mode 100644 index f2b6a9e2..00000000 --- a/v2/models/swift_config.go +++ /dev/null @@ -1,59 +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" -) - -// SwiftConfig Specifies the Swift config settings for this View. -// -// swagger:model SwiftConfig -type SwiftConfig struct { - - // Specifies the Keystone project domain. - SwiftProjectDomain *string `json:"swiftProjectDomain,omitempty"` - - // Specifies the Keystone project name. - SwiftProjectName *string `json:"swiftProjectName,omitempty"` - - // Specifies the Keystone user domain. - SwiftUserDomain *string `json:"swiftUserDomain,omitempty"` - - // Specifies the Keystone username. - SwiftUsername *string `json:"swiftUsername,omitempty"` -} - -// Validate validates this swift config -func (m *SwiftConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this swift config based on context it is used -func (m *SwiftConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SwiftConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SwiftConfig) UnmarshalBinary(b []byte) error { - var res SwiftConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/swift_params.go b/v2/models/swift_params.go deleted file mode 100644 index 8f38fb82..00000000 --- a/v2/models/swift_params.go +++ /dev/null @@ -1,101 +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" -) - -// SwiftParams Specifies the parameters to update a Swift configuration. -// -// swagger:model SwiftParams -type SwiftParams struct { - - // Specifies the tenant Id who will use this Swift configuration. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the associated Keystone configuration Id. - KeystoneID *int64 `json:"keystoneId,omitempty"` - - // Specifies a list of roles that can operate on Cohesity Swift service. - // Min Items: 1 - // Unique: true - OperatorRoles []string `json:"operatorRoles"` -} - -// Validate validates this swift params -func (m *SwiftParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperatorRoles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SwiftParams) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *SwiftParams) validateOperatorRoles(formats strfmt.Registry) error { - if swag.IsZero(m.OperatorRoles) { // not required - return nil - } - - iOperatorRolesSize := int64(len(m.OperatorRoles)) - - if err := validate.MinItems("operatorRoles", "body", iOperatorRolesSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("operatorRoles", "body", m.OperatorRoles); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this swift params based on context it is used -func (m *SwiftParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SwiftParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SwiftParams) UnmarshalBinary(b []byte) error { - var res SwiftParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/syslog_audit_tag.go b/v2/models/syslog_audit_tag.go deleted file mode 100644 index 46b23e39..00000000 --- a/v2/models/syslog_audit_tag.go +++ /dev/null @@ -1,61 +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" -) - -// SyslogAuditTag SyslogAuditTag -// -// Cohesity audit tag name. -// -// swagger:model SyslogAuditTag -type SyslogAuditTag struct { - - // Cluster audit tagging name. - ClusterAudit *string `json:"clusterAudit,omitempty"` - - // Filer audit tagging name. - FilerAudit *string `json:"filerAudit,omitempty"` - - // Data protection events audit tagging name. - DataProtectionEventsAudit *string `json:"dataProtectionEventsAudit,omitempty"` - - // Alert audit tagging name. - AlertAudit *string `json:"alertAudit,omitempty"` -} - -// Validate validates this syslog audit tag -func (m *SyslogAuditTag) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this syslog audit tag based on context it is used -func (m *SyslogAuditTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SyslogAuditTag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SyslogAuditTag) UnmarshalBinary(b []byte) error { - var res SyslogAuditTag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/syslog_server.go b/v2/models/syslog_server.go deleted file mode 100644 index d47291ea..00000000 --- a/v2/models/syslog_server.go +++ /dev/null @@ -1,88 +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" -) - -// SyslogServer Syslog Server. -// -// Specifies information about syslog server. -// -// swagger:model SyslogServer -type SyslogServer struct { - - // The id of the syslog server. - ID *int32 `json:"id,omitempty"` - - // Specifies the IP address or hostname of the syslog server. - IP *string `json:"ip,omitempty"` - - // Specifies the port where the syslog server listens. - Port *int32 `json:"port,omitempty"` - - // Specifies the protocol used to send the logs. - Protocol *string `json:"protocol,omitempty"` - - // Specifies a unique name for the syslog server on the Cluster. - Name *string `json:"name,omitempty"` - - // Specifies whether to enable the syslog server on the Cluster. - Enabled *bool `json:"enabled,omitempty"` - - // Send enabled syslog facilities related logs to logging server. - FacilityList []string `json:"facilityList"` - - // Send programes related logs to logging server. - ProgramNameList []string `json:"programNameList"` - - // Send logs including the msg patterns to logging server. - MsgPatternList []string `json:"msgPatternList"` - - // Send logs including the msg patterns to logging server. - RawMsgPatternList []string `json:"rawMsgPatternList"` - - // Specify whether to enable tls support. - IsTLSEnabled *bool `json:"isTlsEnabled,omitempty"` - - // Syslog server CA certificate. - CaCertificate *string `json:"caCertificate,omitempty"` - - // TokenId used for filtering messages on a relay or collector - TokenID *string `json:"tokenId,omitempty"` -} - -// Validate validates this syslog server -func (m *SyslogServer) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this syslog server based on context it is used -func (m *SyslogServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SyslogServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SyslogServer) UnmarshalBinary(b []byte) error { - var res SyslogServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/syslog_server_status.go b/v2/models/syslog_server_status.go deleted file mode 100644 index 46a38311..00000000 --- a/v2/models/syslog_server_status.go +++ /dev/null @@ -1,58 +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" -) - -// SyslogServerStatus SyslogServerStatus -// -// Remote system logging server. -// -// swagger:model SyslogServerStatus -type SyslogServerStatus struct { - - // The id of the syslog server. - ID *int32 `json:"id,omitempty"` - - // Specify if the syslog server is reachable or not. - IsReachable *bool `json:"isReachable,omitempty"` - - // Description for current status. - Message *string `json:"message,omitempty"` -} - -// Validate validates this syslog server status -func (m *SyslogServerStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this syslog server status based on context it is used -func (m *SyslogServerStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SyslogServerStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SyslogServerStatus) UnmarshalBinary(b []byte) error { - var res SyslogServerStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/syslog_servers.go b/v2/models/syslog_servers.go deleted file mode 100644 index ee82e9e8..00000000 --- a/v2/models/syslog_servers.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SyslogServers List of syslog servers -// -// Specifies the list of syslog servers. -// -// swagger:model SyslogServers -type SyslogServers struct { - - // Specifies the list of syslog servers. - SyslogServers []*SyslogServer `json:"syslogServers"` -} - -// Validate validates this syslog servers -func (m *SyslogServers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSyslogServers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SyslogServers) validateSyslogServers(formats strfmt.Registry) error { - if swag.IsZero(m.SyslogServers) { // not required - return nil - } - - for i := 0; i < len(m.SyslogServers); i++ { - if swag.IsZero(m.SyslogServers[i]) { // not required - continue - } - - if m.SyslogServers[i] != nil { - if err := m.SyslogServers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this syslog servers based on the context it is used -func (m *SyslogServers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSyslogServers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SyslogServers) contextValidateSyslogServers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SyslogServers); i++ { - - if m.SyslogServers[i] != nil { - - if swag.IsZero(m.SyslogServers[i]) { // not required - return nil - } - - if err := m.SyslogServers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syslogServers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SyslogServers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SyslogServers) UnmarshalBinary(b []byte) error { - var res SyslogServers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/system_app_status_params.go b/v2/models/system_app_status_params.go deleted file mode 100644 index d8867e9c..00000000 --- a/v2/models/system_app_status_params.go +++ /dev/null @@ -1,62 +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" -) - -// SystemAppStatusParams Specifies the status of each system app on the cluster. -// -// swagger:model SystemAppStatusParams -type SystemAppStatusParams struct { - - // Specifies the name of the system app. - Name string `json:"name,omitempty"` - - // Specifies the service endpoint. - ServiceEndpoint string `json:"serviceEndpoint,omitempty"` - - // Specifies the number of configured replicas. - ConfiguredReplicas int32 `json:"configuredReplicas,omitempty"` - - // Specifies the number of ready replicas. - ReadyReplicas int32 `json:"readyReplicas,omitempty"` - - // Specifies the number of available replicas. - AvailableReplicas int32 `json:"availableReplicas,omitempty"` -} - -// Validate validates this system app status params -func (m *SystemAppStatusParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this system app status params based on context it is used -func (m *SystemAppStatusParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SystemAppStatusParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SystemAppStatusParams) UnmarshalBinary(b []byte) error { - var res SystemAppStatusParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/system_recovery_params.go b/v2/models/system_recovery_params.go deleted file mode 100644 index 91615ab2..00000000 --- a/v2/models/system_recovery_params.go +++ /dev/null @@ -1,52 +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" -) - -// SystemRecoveryParams System Recovery Params -// -// # Specifies the parameters to perform a system recovery -// -// swagger:model SystemRecoveryParams -type SystemRecoveryParams struct { - - // Specifies the path to the recovery view. - FullNasPath *string `json:"fullNasPath,omitempty"` -} - -// Validate validates this system recovery params -func (m *SystemRecoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this system recovery params based on context it is used -func (m *SystemRecoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SystemRecoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SystemRecoveryParams) UnmarshalBinary(b []byte) error { - var res SystemRecoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tag.go b/v2/models/tag.go deleted file mode 100644 index 5ea0f600..00000000 --- a/v2/models/tag.go +++ /dev/null @@ -1,211 +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" -) - -// Tag Tag. -// -// # Tag details -// -// swagger:model Tag -type Tag struct { - - // Specifies unique id of the Tag. - // Read Only: true - // Pattern: ^\d+:\d+:[A-Z0-9-]+$ - ID *string `json:"id,omitempty"` - - // Name of the Tag. Name has to be unique under Namespace. - // Required: true - Name *string `json:"name"` - - // Namespace of the Tag. This is used to filter tags based on - // application or usecase. For example all tags related to vcenter can - // be put under one namespace or different departments could have their - // own namespaces e.g. finance/tag1 or operations/tag2 etc. - // Required: true - Namespace *string `json:"namespace"` - - // Tenant Id to whom the Tag belongs. - // Read Only: true - TenantID *string `json:"tenantId,omitempty"` - - // Description of the Tag. - Description *string `json:"description,omitempty"` - - // Specifies the timestamp in microseconds since the epoch - // when this Tag was created. - // Read Only: true - CreatedTimeUsecs *uint64 `json:"createdTimeUsecs,omitempty"` - - // Specifies the timestamp in microseconds since the epoch - // when this Tag was last updated. - // Read Only: true - LastUpdatedTimeUsecs *uint64 `json:"lastUpdatedTimeUsecs,omitempty"` - - // If true, Tag is marked for deletion. - // Read Only: true - MarkedForDeletion *bool `json:"markedForDeletion,omitempty"` - - // Color of the tag in UI. - UIColor *string `json:"uiColor,omitempty"` - - // Path of the tag for UI nesting purposes. - UIPathElements []string `json:"uiPathElements,omitempty"` -} - -// Validate validates this tag -func (m *Tag) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNamespace(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Tag) validateID(formats strfmt.Registry) error { - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := validate.Pattern("id", "body", *m.ID, `^\d+:\d+:[A-Z0-9-]+$`); err != nil { - return err - } - - return nil -} - -func (m *Tag) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *Tag) validateNamespace(formats strfmt.Registry) error { - - if err := validate.Required("namespace", "body", m.Namespace); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this tag based on the context it is used -func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTenantID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdatedTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMarkedForDeletion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Tag) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *Tag) contextValidateTenantID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *Tag) contextValidateCreatedTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdTimeUsecs", "body", m.CreatedTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *Tag) contextValidateLastUpdatedTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedTimeUsecs", "body", m.LastUpdatedTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *Tag) contextValidateMarkedForDeletion(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "markedForDeletion", "body", m.MarkedForDeletion); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Tag) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Tag) UnmarshalBinary(b []byte) error { - var res Tag - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tag_info.go b/v2/models/tag_info.go deleted file mode 100644 index 1e3cc212..00000000 --- a/v2/models/tag_info.go +++ /dev/null @@ -1,71 +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" -) - -// TagInfo Specifies the tag info for an object. -// -// swagger:model TagInfo -type TagInfo struct { - - // Specifies Id of tag applied to the object. - // Required: true - TagID *string `json:"tagId"` -} - -// Validate validates this tag info -func (m *TagInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagInfo) validateTagID(formats strfmt.Registry) error { - - if err := validate.Required("tagId", "body", m.TagID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tag info based on context it is used -func (m *TagInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TagInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagInfo) UnmarshalBinary(b []byte) error { - var res TagInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tag_object.go b/v2/models/tag_object.go deleted file mode 100644 index 454988c0..00000000 --- a/v2/models/tag_object.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TagObject Specifies all the tag related info for an object. -// -// swagger:model TagObject -type TagObject struct { - - // Specifies tag applied to the object. - Tags []*TagInfo `json:"tags"` - - // Specifies snapshot tags applied to the object. - SnapshotTags []*SnapshotTagInfo `json:"snapshotTags"` -} - -// Validate validates this tag object -func (m *TagObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTags(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotTags(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagObject) validateTags(formats strfmt.Registry) error { - if swag.IsZero(m.Tags) { // not required - return nil - } - - for i := 0; i < len(m.Tags); i++ { - if swag.IsZero(m.Tags[i]) { // not required - continue - } - - if m.Tags[i] != nil { - if err := m.Tags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TagObject) validateSnapshotTags(formats strfmt.Registry) error { - if swag.IsZero(m.SnapshotTags) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotTags); i++ { - if swag.IsZero(m.SnapshotTags[i]) { // not required - continue - } - - if m.SnapshotTags[i] != nil { - if err := m.SnapshotTags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tag object based on the context it is used -func (m *TagObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotTags(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagObject) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tags); i++ { - - if m.Tags[i] != nil { - - if swag.IsZero(m.Tags[i]) { // not required - return nil - } - - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TagObject) contextValidateSnapshotTags(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SnapshotTags); i++ { - - if m.SnapshotTags[i] != nil { - - if swag.IsZero(m.SnapshotTags[i]) { // not required - return nil - } - - if err := m.SnapshotTags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTags" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TagObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagObject) UnmarshalBinary(b []byte) error { - var res TagObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tag_params.go b/v2/models/tag_params.go deleted file mode 100644 index 766f7dd0..00000000 --- a/v2/models/tag_params.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TagParams Specifies the tag vectors used to exclude EBS volumes attached to EC2 instances at global and object level. Contains two vectors: exclusion and inclusion. E.g., {exclusionTagArray: [(K1, V1), (K2, V2)], inclusionTagArray: [(K3, V3)]} => This will exclude a particular volume iff it has all the tags in exclusionTagArray((K1, V1), (K2, V2)) and has none of the tags in the inclusionTagArray((K3, V3)). -// -// swagger:model TagParams -type TagParams struct { - - // Array which contains tags for AND exclusion. E.g., exclusionTagArray: [(K1, V1), (K2, V2)] => This will exclude a particular volume iff it has both these tags. - ExclusionTagArray []*EBSTag `json:"exclusionTagArray"` - - // Array which contains tags for AND inclusion. E.g., inclusionTagArray: [(K3, V3), (K4, V4)] => This will exclude a particular volume iff it does not have both these tags. - InclusionTagArray []*EBSTag `json:"inclusionTagArray"` -} - -// Validate validates this tag params -func (m *TagParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExclusionTagArray(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInclusionTagArray(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagParams) validateExclusionTagArray(formats strfmt.Registry) error { - if swag.IsZero(m.ExclusionTagArray) { // not required - return nil - } - - for i := 0; i < len(m.ExclusionTagArray); i++ { - if swag.IsZero(m.ExclusionTagArray[i]) { // not required - continue - } - - if m.ExclusionTagArray[i] != nil { - if err := m.ExclusionTagArray[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionTagArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionTagArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TagParams) validateInclusionTagArray(formats strfmt.Registry) error { - if swag.IsZero(m.InclusionTagArray) { // not required - return nil - } - - for i := 0; i < len(m.InclusionTagArray); i++ { - if swag.IsZero(m.InclusionTagArray[i]) { // not required - continue - } - - if m.InclusionTagArray[i] != nil { - if err := m.InclusionTagArray[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionTagArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionTagArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tag params based on the context it is used -func (m *TagParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExclusionTagArray(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInclusionTagArray(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TagParams) contextValidateExclusionTagArray(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExclusionTagArray); i++ { - - if m.ExclusionTagArray[i] != nil { - - if swag.IsZero(m.ExclusionTagArray[i]) { // not required - return nil - } - - if err := m.ExclusionTagArray[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exclusionTagArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exclusionTagArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TagParams) contextValidateInclusionTagArray(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InclusionTagArray); i++ { - - if m.InclusionTagArray[i] != nil { - - if swag.IsZero(m.InclusionTagArray[i]) { // not required - return nil - } - - if err := m.InclusionTagArray[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inclusionTagArray" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inclusionTagArray" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TagParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TagParams) UnmarshalBinary(b []byte) error { - var res TagParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_bandwidth_throttlings.go b/v2/models/target_bandwidth_throttlings.go deleted file mode 100644 index 6dde2701..00000000 --- a/v2/models/target_bandwidth_throttlings.go +++ /dev/null @@ -1,162 +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" -) - -// TargetBandwidthThrottlings Target Bandwidth Throttlings -// -// Specifies the bandwidth throttling setting of the External Target. -// -// swagger:model TargetBandwidthThrottlings -type TargetBandwidthThrottlings struct { - - // download - Download *BandwidthThrottling `json:"download,omitempty"` - - // upload - Upload *BandwidthThrottling `json:"upload,omitempty"` -} - -// Validate validates this target bandwidth throttlings -func (m *TargetBandwidthThrottlings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDownload(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpload(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetBandwidthThrottlings) validateDownload(formats strfmt.Registry) error { - if swag.IsZero(m.Download) { // not required - return nil - } - - if m.Download != nil { - if err := m.Download.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *TargetBandwidthThrottlings) validateUpload(formats strfmt.Registry) error { - if swag.IsZero(m.Upload) { // not required - return nil - } - - if m.Upload != nil { - if err := m.Upload.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// ContextValidate validate this target bandwidth throttlings based on the context it is used -func (m *TargetBandwidthThrottlings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDownload(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpload(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetBandwidthThrottlings) contextValidateDownload(ctx context.Context, formats strfmt.Registry) error { - - if m.Download != nil { - - if swag.IsZero(m.Download) { // not required - return nil - } - - if err := m.Download.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("download") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("download") - } - return err - } - } - - return nil -} - -func (m *TargetBandwidthThrottlings) contextValidateUpload(ctx context.Context, formats strfmt.Registry) error { - - if m.Upload != nil { - - if swag.IsZero(m.Upload) { // not required - return nil - } - - if err := m.Upload.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("upload") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("upload") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetBandwidthThrottlings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetBandwidthThrottlings) UnmarshalBinary(b []byte) error { - var res TargetBandwidthThrottlings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_encryption_level.go b/v2/models/target_encryption_level.go deleted file mode 100644 index a922948b..00000000 --- a/v2/models/target_encryption_level.go +++ /dev/null @@ -1,110 +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" -) - -// TargetEncryptionLevel Target Encryption Level -// -// Specifies the encryption level of the external target. -// -// swagger:model TargetEncryptionLevel -type TargetEncryptionLevel struct { - - // Specifies the encryption level of the external target. - // Enum: ["None","Weak","Strong"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target encryption level -func (m *TargetEncryptionLevel) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetEncryptionLevelTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["None","Weak","Strong"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetEncryptionLevelTypeEnumPropEnum = append(targetEncryptionLevelTypeEnumPropEnum, v) - } -} - -const ( - - // TargetEncryptionLevelEnumNone captures enum value "None" - TargetEncryptionLevelEnumNone string = "None" - - // TargetEncryptionLevelEnumWeak captures enum value "Weak" - TargetEncryptionLevelEnumWeak string = "Weak" - - // TargetEncryptionLevelEnumStrong captures enum value "Strong" - TargetEncryptionLevelEnumStrong string = "Strong" -) - -// prop value enum -func (m *TargetEncryptionLevel) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetEncryptionLevelTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetEncryptionLevel) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target encryption level based on context it is used -func (m *TargetEncryptionLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetEncryptionLevel) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetEncryptionLevel) UnmarshalBinary(b []byte) error { - var res TargetEncryptionLevel - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_mailbox_param.go b/v2/models/target_mailbox_param.go deleted file mode 100644 index dd7e1dc3..00000000 --- a/v2/models/target_mailbox_param.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" - "github.com/go-openapi/validate" -) - -// TargetMailboxParam Specifies the target Mailbox to recover to. -// -// swagger:model TargetMailboxParam -type TargetMailboxParam struct { - - // Specifies the id of the target mailbox. Atleast one of id or primarySMTPAddress need to be defined. In case both id and primarySMTPAddress are defined then id takes precedence. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the path to the target folder. - // Required: true - TargetFolderPath *string `json:"targetFolderPath"` - - // Specifies the id of the domain for alternate domain recovery. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the primary SMTP address of the target mailbox. Atleast one of id or primarySMTPAddress needs to be defined. In case both id and primarySMTPAddress are defined then id takes precedence. - PrimarySMTPAddress *string `json:"primarySmtpAddress,omitempty"` -} - -// Validate validates this target mailbox param -func (m *TargetMailboxParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetFolderPath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetMailboxParam) validateTargetFolderPath(formats strfmt.Registry) error { - - if err := validate.Required("targetFolderPath", "body", m.TargetFolderPath); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this target mailbox param based on the context it is used -func (m *TargetMailboxParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetMailboxParam) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetMailboxParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetMailboxParam) UnmarshalBinary(b []byte) error { - var res TargetMailboxParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_ms_team_param.go b/v2/models/target_ms_team_param.go deleted file mode 100644 index 803cefa8..00000000 --- a/v2/models/target_ms_team_param.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" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TargetMsTeamParam Specifies the target Microsoft 365 Team to recover to. -// -// swagger:model TargetMsTeamParam -type TargetMsTeamParam struct { - - // Specifies the selected existing target team info. - TargetTeam struct { - RecoveryObjectIdentifier - } `json:"targetTeam,omitempty"` - - // Specifies the id of the domain during alternate domain recovery. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the ms team target channel parameters in case of granular restore to alternate location. - TargetTeamsChannelParam *TargetTeamsChannelParam `json:"targetTeamsChannelParam,omitempty"` -} - -// Validate validates this target ms team param -func (m *TargetMsTeamParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetTeam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetTeamsChannelParam(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetMsTeamParam) validateTargetTeam(formats strfmt.Registry) error { - if swag.IsZero(m.TargetTeam) { // not required - return nil - } - - return nil -} - -func (m *TargetMsTeamParam) validateTargetTeamsChannelParam(formats strfmt.Registry) error { - if swag.IsZero(m.TargetTeamsChannelParam) { // not required - return nil - } - - if m.TargetTeamsChannelParam != nil { - if err := m.TargetTeamsChannelParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamsChannelParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamsChannelParam") - } - return err - } - } - - return nil -} - -// ContextValidate validate this target ms team param based on the context it is used -func (m *TargetMsTeamParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetTeam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetTeamsChannelParam(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetMsTeamParam) contextValidateTargetTeam(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *TargetMsTeamParam) contextValidateTargetTeamsChannelParam(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetTeamsChannelParam != nil { - - if swag.IsZero(m.TargetTeamsChannelParam) { // not required - return nil - } - - if err := m.TargetTeamsChannelParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetTeamsChannelParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetTeamsChannelParam") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetMsTeamParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetMsTeamParam) UnmarshalBinary(b []byte) error { - var res TargetMsTeamParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_nfs_security_type.go b/v2/models/target_nfs_security_type.go deleted file mode 100644 index f5018521..00000000 --- a/v2/models/target_nfs_security_type.go +++ /dev/null @@ -1,119 +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" -) - -// TargetNfsSecurityType Target NFS Security Type -// -// Specifies the NFS security type of the target. -// -// swagger:model TargetNfsSecurityType -type TargetNfsSecurityType struct { - - // Specifies the NFS security type of the target. - // Enum: ["Default","None","System","KRB5","KRB5I","KRB5P"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target nfs security type -func (m *TargetNfsSecurityType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetNfsSecurityTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Default","None","System","KRB5","KRB5I","KRB5P"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetNfsSecurityTypeTypeEnumPropEnum = append(targetNfsSecurityTypeTypeEnumPropEnum, v) - } -} - -const ( - - // TargetNfsSecurityTypeEnumDefault captures enum value "Default" - TargetNfsSecurityTypeEnumDefault string = "Default" - - // TargetNfsSecurityTypeEnumNone captures enum value "None" - TargetNfsSecurityTypeEnumNone string = "None" - - // TargetNfsSecurityTypeEnumSystem captures enum value "System" - TargetNfsSecurityTypeEnumSystem string = "System" - - // TargetNfsSecurityTypeEnumKRB5 captures enum value "KRB5" - TargetNfsSecurityTypeEnumKRB5 string = "KRB5" - - // TargetNfsSecurityTypeEnumKRB5I captures enum value "KRB5I" - TargetNfsSecurityTypeEnumKRB5I string = "KRB5I" - - // TargetNfsSecurityTypeEnumKRB5P captures enum value "KRB5P" - TargetNfsSecurityTypeEnumKRB5P string = "KRB5P" -) - -// prop value enum -func (m *TargetNfsSecurityType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetNfsSecurityTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetNfsSecurityType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target nfs security type based on context it is used -func (m *TargetNfsSecurityType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetNfsSecurityType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetNfsSecurityType) UnmarshalBinary(b []byte) error { - var res TargetNfsSecurityType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_nfs_version_number.go b/v2/models/target_nfs_version_number.go deleted file mode 100644 index d49be09b..00000000 --- a/v2/models/target_nfs_version_number.go +++ /dev/null @@ -1,116 +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" -) - -// TargetNfsVersionNumber Target NFS Version Number -// -// Specifies the NFS version number of the target. -// -// swagger:model TargetNfsVersionNumber -type TargetNfsVersionNumber struct { - - // Specifies the NFS version number of the target. - // Enum: ["NFSv3","NFSv4","NFSv4_0","NFSv4_1","NFSv4_2"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target nfs version number -func (m *TargetNfsVersionNumber) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetNfsVersionNumberTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NFSv3","NFSv4","NFSv4_0","NFSv4_1","NFSv4_2"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetNfsVersionNumberTypeEnumPropEnum = append(targetNfsVersionNumberTypeEnumPropEnum, v) - } -} - -const ( - - // TargetNfsVersionNumberEnumNFSv3 captures enum value "NFSv3" - TargetNfsVersionNumberEnumNFSv3 string = "NFSv3" - - // TargetNfsVersionNumberEnumNFSv4 captures enum value "NFSv4" - TargetNfsVersionNumberEnumNFSv4 string = "NFSv4" - - // TargetNfsVersionNumberEnumNFSv40 captures enum value "NFSv4_0" - TargetNfsVersionNumberEnumNFSv40 string = "NFSv4_0" - - // TargetNfsVersionNumberEnumNFSv41 captures enum value "NFSv4_1" - TargetNfsVersionNumberEnumNFSv41 string = "NFSv4_1" - - // TargetNfsVersionNumberEnumNFSv42 captures enum value "NFSv4_2" - TargetNfsVersionNumberEnumNFSv42 string = "NFSv4_2" -) - -// prop value enum -func (m *TargetNfsVersionNumber) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetNfsVersionNumberTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetNfsVersionNumber) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target nfs version number based on context it is used -func (m *TargetNfsVersionNumber) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetNfsVersionNumber) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetNfsVersionNumber) UnmarshalBinary(b []byte) error { - var res TargetNfsVersionNumber - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_one_drive_param.go b/v2/models/target_one_drive_param.go deleted file mode 100644 index c15ed5f3..00000000 --- a/v2/models/target_one_drive_param.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" - "github.com/go-openapi/validate" -) - -// TargetOneDriveParam Specifies the target OneDrive to recover to. -// -// swagger:model TargetOneDriveParam -type TargetOneDriveParam struct { - - // Specifies the id of the target onedrive. Atleast one of id or primarySMTPAddress need to be defined. In case both id and primarySMTPAddress are defined then id takes precedence. - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the path to the target folder. - // Required: true - TargetFolderPath *string `json:"targetFolderPath"` - - // Specifies the id of the domain for alternate domain recovery. - ParentSourceID *int64 `json:"parentSourceId,omitempty"` - - // Specifies the primary SMTP address of the target onedrive. Atleast one of id or primarySMTPAddress needs to be defined. In case both id and primarySMTPAddress are defined then id takes precedence. - PrimarySMTPAddress *string `json:"primarySmtpAddress,omitempty"` -} - -// Validate validates this target one drive param -func (m *TargetOneDriveParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTargetFolderPath(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetOneDriveParam) validateTargetFolderPath(formats strfmt.Registry) error { - - if err := validate.Required("targetFolderPath", "body", m.TargetFolderPath); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this target one drive param based on the context it is used -func (m *TargetOneDriveParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetOneDriveParam) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetOneDriveParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetOneDriveParam) UnmarshalBinary(b []byte) error { - var res TargetOneDriveParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_purpose_type.go b/v2/models/target_purpose_type.go deleted file mode 100644 index d7d67215..00000000 --- a/v2/models/target_purpose_type.go +++ /dev/null @@ -1,110 +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" -) - -// TargetPurposeType Target Purpose Type -// -// Specifies the purpose type of External Target. -// -// swagger:model TargetPurposeType -type TargetPurposeType struct { - - // Specifies the purpose type of External Target. - // Enum: ["Archival","Tiering","Rpaas"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target purpose type -func (m *TargetPurposeType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetPurposeTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Archival","Tiering","Rpaas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetPurposeTypeTypeEnumPropEnum = append(targetPurposeTypeTypeEnumPropEnum, v) - } -} - -const ( - - // TargetPurposeTypeEnumArchival captures enum value "Archival" - TargetPurposeTypeEnumArchival string = "Archival" - - // TargetPurposeTypeEnumTiering captures enum value "Tiering" - TargetPurposeTypeEnumTiering string = "Tiering" - - // TargetPurposeTypeEnumRpaas captures enum value "Rpaas" - TargetPurposeTypeEnumRpaas string = "Rpaas" -) - -// prop value enum -func (m *TargetPurposeType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetPurposeTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetPurposeType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target purpose type based on context it is used -func (m *TargetPurposeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetPurposeType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetPurposeType) UnmarshalBinary(b []byte) error { - var res TargetPurposeType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_registration_status.go b/v2/models/target_registration_status.go deleted file mode 100644 index 551cfb31..00000000 --- a/v2/models/target_registration_status.go +++ /dev/null @@ -1,110 +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" -) - -// TargetRegistrationStatus Target Registration Status -// -// Specifies the registration status of the external target. -// -// swagger:model TargetRegistrationStatus -type TargetRegistrationStatus struct { - - // Specifies the registration status of the external target. - // Enum: ["Registered","Unregistering","Unregistered"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target registration status -func (m *TargetRegistrationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetRegistrationStatusTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Registered","Unregistering","Unregistered"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetRegistrationStatusTypeEnumPropEnum = append(targetRegistrationStatusTypeEnumPropEnum, v) - } -} - -const ( - - // TargetRegistrationStatusEnumRegistered captures enum value "Registered" - TargetRegistrationStatusEnumRegistered string = "Registered" - - // TargetRegistrationStatusEnumUnregistering captures enum value "Unregistering" - TargetRegistrationStatusEnumUnregistering string = "Unregistering" - - // TargetRegistrationStatusEnumUnregistered captures enum value "Unregistered" - TargetRegistrationStatusEnumUnregistered string = "Unregistered" -) - -// prop value enum -func (m *TargetRegistrationStatus) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetRegistrationStatusTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetRegistrationStatus) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target registration status based on context it is used -func (m *TargetRegistrationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetRegistrationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetRegistrationStatus) UnmarshalBinary(b []byte) error { - var res TargetRegistrationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_schedule.go b/v2/models/target_schedule.go deleted file mode 100644 index 9dbd31aa..00000000 --- a/v2/models/target_schedule.go +++ /dev/null @@ -1,142 +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" -) - -// TargetSchedule Schedule -// -// Specifies a schedule fregquency and schedule unit for copying Snapshots to backup targets. -// -// swagger:model TargetSchedule -type TargetSchedule struct { - - // Specifies the frequency that Snapshots should be copied to the specified target. Used in combination with multiplier.
'Runs' means that the Snapshot copy occurs after the number of Protection Group Runs equals the number specified in the frequency.
'Hours' means that the Snapshot copy occurs hourly at the frequency set in the frequency, for example if scheduleFrequency is 2, the copy occurs every 2 hours.
'Days' means that the Snapshot copy occurs daily at the frequency set in the frequency.
'Weeks' means that the Snapshot copy occurs weekly at the frequency set in the frequency.
'Months' means that the Snapshot copy occurs monthly at the frequency set in the Frequency.
'Years' means that the Snapshot copy occurs yearly at the frequency set in the scheduleFrequency. - // Required: true - // Enum: ["Runs","Hours","Days","Weeks","Months","Years"] - Unit *string `json:"unit"` - - // Specifies a factor to multiply the unit by, to determine the copy schedule. - // For example if set to 2 and the unit is hourly, then Snapshots from the first eligible Job Run for every 2 hour period is copied. - // Minimum: 1 - Frequency *int32 `json:"frequency,omitempty"` -} - -// Validate validates this target schedule -func (m *TargetSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFrequency(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetScheduleTypeUnitPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Runs","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetScheduleTypeUnitPropEnum = append(targetScheduleTypeUnitPropEnum, v) - } -} - -const ( - - // TargetScheduleUnitRuns captures enum value "Runs" - TargetScheduleUnitRuns string = "Runs" - - // TargetScheduleUnitHours captures enum value "Hours" - TargetScheduleUnitHours string = "Hours" - - // TargetScheduleUnitDays captures enum value "Days" - TargetScheduleUnitDays string = "Days" - - // TargetScheduleUnitWeeks captures enum value "Weeks" - TargetScheduleUnitWeeks string = "Weeks" - - // TargetScheduleUnitMonths captures enum value "Months" - TargetScheduleUnitMonths string = "Months" - - // TargetScheduleUnitYears captures enum value "Years" - TargetScheduleUnitYears string = "Years" -) - -// prop value enum -func (m *TargetSchedule) validateUnitEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetScheduleTypeUnitPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetSchedule) validateUnit(formats strfmt.Registry) error { - - if err := validate.Required("unit", "body", m.Unit); err != nil { - return err - } - - // value enum - if err := m.validateUnitEnum("unit", "body", *m.Unit); err != nil { - return err - } - - return nil -} - -func (m *TargetSchedule) validateFrequency(formats strfmt.Registry) error { - if swag.IsZero(m.Frequency) { // not required - return nil - } - - if err := validate.MinimumInt("frequency", "body", int64(*m.Frequency), 1, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target schedule based on context it is used -func (m *TargetSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetSchedule) UnmarshalBinary(b []byte) error { - var res TargetSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_share_type.go b/v2/models/target_share_type.go deleted file mode 100644 index 0da5f32f..00000000 --- a/v2/models/target_share_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TargetShareType Target Share Type -// -// Specifies the share type of the external target. -// -// swagger:model TargetShareType -type TargetShareType struct { - - // Specifies the share type of the external target. - // Enum: ["CIFS","NFS"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this target share type -func (m *TargetShareType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetShareTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["CIFS","NFS"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetShareTypeTypeEnumPropEnum = append(targetShareTypeTypeEnumPropEnum, v) - } -} - -const ( - - // TargetShareTypeEnumCIFS captures enum value "CIFS" - TargetShareTypeEnumCIFS string = "CIFS" - - // TargetShareTypeEnumNFS captures enum value "NFS" - TargetShareTypeEnumNFS string = "NFS" -) - -// prop value enum -func (m *TargetShareType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetShareTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetShareType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this target share type based on context it is used -func (m *TargetShareType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TargetShareType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetShareType) UnmarshalBinary(b []byte) error { - var res TargetShareType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_site_param.go b/v2/models/target_site_param.go deleted file mode 100644 index 257cbf93..00000000 --- a/v2/models/target_site_param.go +++ /dev/null @@ -1,128 +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" -) - -// TargetSiteParam Specifies the target Site to recover to. -// -// swagger:model TargetSiteParam -type TargetSiteParam struct { - RecoveryObjectIdentifier - - // Specifies the name for the target doc lib. - TargetDocLibName *string `json:"targetDocLibName,omitempty"` - - // Specifies the prefix for the target doc lib. - TargetDocLibPrefix *string `json:"targetDocLibPrefix,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TargetSiteParam) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RecoveryObjectIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RecoveryObjectIdentifier = aO0 - - // AO1 - var dataAO1 struct { - TargetDocLibName *string `json:"targetDocLibName,omitempty"` - - TargetDocLibPrefix *string `json:"targetDocLibPrefix,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.TargetDocLibName = dataAO1.TargetDocLibName - - m.TargetDocLibPrefix = dataAO1.TargetDocLibPrefix - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TargetSiteParam) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.RecoveryObjectIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - TargetDocLibName *string `json:"targetDocLibName,omitempty"` - - TargetDocLibPrefix *string `json:"targetDocLibPrefix,omitempty"` - } - - dataAO1.TargetDocLibName = m.TargetDocLibName - - dataAO1.TargetDocLibPrefix = m.TargetDocLibPrefix - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this target site param -func (m *TargetSiteParam) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoveryObjectIdentifier - if err := m.RecoveryObjectIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this target site param based on the context it is used -func (m *TargetSiteParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RecoveryObjectIdentifier - if err := m.RecoveryObjectIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TargetSiteParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetSiteParam) UnmarshalBinary(b []byte) error { - var res TargetSiteParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/target_teams_channel_param.go b/v2/models/target_teams_channel_param.go deleted file mode 100644 index 66053b57..00000000 --- a/v2/models/target_teams_channel_param.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TargetTeamsChannelParam Specifies the target Microsoft 365 Team channel to recover to in case of granular restore -// -// swagger:model TargetTeamsChannelParam -type TargetTeamsChannelParam struct { - - // Specifies the id of the target channel. - ID *string `json:"id,omitempty"` - - // Specifies the name of the target channel. - Name *string `json:"name,omitempty"` - - // Specifies whether we should create a new channel. If this is true name must not be empty - CreateNewChannel *bool `json:"createNewChannel,omitempty"` - - // Specifies whether to create a public or private channel - // Enum: ["Private","Public"] - ChannelType string `json:"channelType,omitempty"` - - // List of owners for the private channel. At least one owner is needed to create a private channel - ChannelOwners []*RecoveryObjectIdentifier `json:"channelOwners"` -} - -// Validate validates this target teams channel param -func (m *TargetTeamsChannelParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChannelType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChannelOwners(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var targetTeamsChannelParamTypeChannelTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Private","Public"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - targetTeamsChannelParamTypeChannelTypePropEnum = append(targetTeamsChannelParamTypeChannelTypePropEnum, v) - } -} - -const ( - - // TargetTeamsChannelParamChannelTypePrivate captures enum value "Private" - TargetTeamsChannelParamChannelTypePrivate string = "Private" - - // TargetTeamsChannelParamChannelTypePublic captures enum value "Public" - TargetTeamsChannelParamChannelTypePublic string = "Public" -) - -// prop value enum -func (m *TargetTeamsChannelParam) validateChannelTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, targetTeamsChannelParamTypeChannelTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TargetTeamsChannelParam) validateChannelType(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelType) { // not required - return nil - } - - // value enum - if err := m.validateChannelTypeEnum("channelType", "body", m.ChannelType); err != nil { - return err - } - - return nil -} - -func (m *TargetTeamsChannelParam) validateChannelOwners(formats strfmt.Registry) error { - if swag.IsZero(m.ChannelOwners) { // not required - return nil - } - - for i := 0; i < len(m.ChannelOwners); i++ { - if swag.IsZero(m.ChannelOwners[i]) { // not required - continue - } - - if m.ChannelOwners[i] != nil { - if err := m.ChannelOwners[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelOwners" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelOwners" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this target teams channel param based on the context it is used -func (m *TargetTeamsChannelParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChannelOwners(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetTeamsChannelParam) contextValidateChannelOwners(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ChannelOwners); i++ { - - if m.ChannelOwners[i] != nil { - - if swag.IsZero(m.ChannelOwners[i]) { // not required - return nil - } - - if err := m.ChannelOwners[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelOwners" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelOwners" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetTeamsChannelParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetTeamsChannelParam) UnmarshalBinary(b []byte) error { - var res TargetTeamsChannelParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/targets_configuration.go b/v2/models/targets_configuration.go deleted file mode 100644 index 44511784..00000000 --- a/v2/models/targets_configuration.go +++ /dev/null @@ -1,369 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TargetsConfiguration Specifies the replication, archival and cloud spin targets of Protection Policy. -// -// swagger:model TargetsConfiguration -type TargetsConfiguration struct { - - // replication targets - ReplicationTargets []*ReplicationConfig `json:"replicationTargets"` - - // archival targets - ArchivalTargets []*ArchivalConfig `json:"archivalTargets"` - - // cloud spin targets - CloudSpinTargets []*CloudSpinConfig `json:"cloudSpinTargets"` - - // onprem deploy targets - OnpremDeployTargets []*OnpremDeployConfig `json:"onpremDeployTargets"` - - // rpaas targets - RpaasTargets []*RpaasConfig `json:"rpaasTargets"` -} - -// Validate validates this targets configuration -func (m *TargetsConfiguration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloudSpinTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOnpremDeployTargets(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRpaasTargets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetsConfiguration) validateReplicationTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationTargets) { // not required - return nil - } - - for i := 0; i < len(m.ReplicationTargets); i++ { - if swag.IsZero(m.ReplicationTargets[i]) { // not required - continue - } - - if m.ReplicationTargets[i] != nil { - if err := m.ReplicationTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) validateArchivalTargets(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalTargets) { // not required - return nil - } - - for i := 0; i < len(m.ArchivalTargets); i++ { - if swag.IsZero(m.ArchivalTargets[i]) { // not required - continue - } - - if m.ArchivalTargets[i] != nil { - if err := m.ArchivalTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) validateCloudSpinTargets(formats strfmt.Registry) error { - if swag.IsZero(m.CloudSpinTargets) { // not required - return nil - } - - for i := 0; i < len(m.CloudSpinTargets); i++ { - if swag.IsZero(m.CloudSpinTargets[i]) { // not required - continue - } - - if m.CloudSpinTargets[i] != nil { - if err := m.CloudSpinTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) validateOnpremDeployTargets(formats strfmt.Registry) error { - if swag.IsZero(m.OnpremDeployTargets) { // not required - return nil - } - - for i := 0; i < len(m.OnpremDeployTargets); i++ { - if swag.IsZero(m.OnpremDeployTargets[i]) { // not required - continue - } - - if m.OnpremDeployTargets[i] != nil { - if err := m.OnpremDeployTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) validateRpaasTargets(formats strfmt.Registry) error { - if swag.IsZero(m.RpaasTargets) { // not required - return nil - } - - for i := 0; i < len(m.RpaasTargets); i++ { - if swag.IsZero(m.RpaasTargets[i]) { // not required - continue - } - - if m.RpaasTargets[i] != nil { - if err := m.RpaasTargets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this targets configuration based on the context it is used -func (m *TargetsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateReplicationTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloudSpinTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOnpremDeployTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRpaasTargets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TargetsConfiguration) contextValidateReplicationTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ReplicationTargets); i++ { - - if m.ReplicationTargets[i] != nil { - - if swag.IsZero(m.ReplicationTargets[i]) { // not required - return nil - } - - if err := m.ReplicationTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) contextValidateArchivalTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ArchivalTargets); i++ { - - if m.ArchivalTargets[i] != nil { - - if swag.IsZero(m.ArchivalTargets[i]) { // not required - return nil - } - - if err := m.ArchivalTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) contextValidateCloudSpinTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.CloudSpinTargets); i++ { - - if m.CloudSpinTargets[i] != nil { - - if swag.IsZero(m.CloudSpinTargets[i]) { // not required - return nil - } - - if err := m.CloudSpinTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudSpinTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) contextValidateOnpremDeployTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OnpremDeployTargets); i++ { - - if m.OnpremDeployTargets[i] != nil { - - if swag.IsZero(m.OnpremDeployTargets[i]) { // not required - return nil - } - - if err := m.OnpremDeployTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("onpremDeployTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TargetsConfiguration) contextValidateRpaasTargets(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.RpaasTargets); i++ { - - if m.RpaasTargets[i] != nil { - - if swag.IsZero(m.RpaasTargets[i]) { // not required - return nil - } - - if err := m.RpaasTargets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpaasTargets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TargetsConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TargetsConfiguration) UnmarshalBinary(b []byte) error { - var res TargetsConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/task_logs.go b/v2/models/task_logs.go deleted file mode 100644 index e5fefd6f..00000000 --- a/v2/models/task_logs.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" -) - -// TaskLogs Specifies the id of the task log related to this active directory. -// -// swagger:model TaskLogs -type TaskLogs struct { - - // Specifies the id of adding task. - AddTaskID *string `json:"addTaskId,omitempty"` - - // Specifies the id of editing task. - EditTaskID []string `json:"editTaskId"` -} - -// Validate validates this task logs -func (m *TaskLogs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this task logs based on context it is used -func (m *TaskLogs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TaskLogs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskLogs) UnmarshalBinary(b []byte) error { - var res TaskLogs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_action.go b/v2/models/tdm_action.go deleted file mode 100644 index 21b2668b..00000000 --- a/v2/models/tdm_action.go +++ /dev/null @@ -1,116 +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" -) - -// TdmAction TdmAction -// -// Supported actions in TDM. -// -// swagger:model TdmAction -type TdmAction struct { - - // Specifies the TDM action type. - // Enum: ["clone","teardown","refresh","snapshot","rewind"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tdm action -func (m *TdmAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tdmActionTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["clone","teardown","refresh","snapshot","rewind"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tdmActionTypeTypePropEnum = append(tdmActionTypeTypePropEnum, v) - } -} - -const ( - - // TdmActionTypeClone captures enum value "clone" - TdmActionTypeClone string = "clone" - - // TdmActionTypeTeardown captures enum value "teardown" - TdmActionTypeTeardown string = "teardown" - - // TdmActionTypeRefresh captures enum value "refresh" - TdmActionTypeRefresh string = "refresh" - - // TdmActionTypeSnapshot captures enum value "snapshot" - TdmActionTypeSnapshot string = "snapshot" - - // TdmActionTypeRewind captures enum value "rewind" - TdmActionTypeRewind string = "rewind" -) - -// prop value enum -func (m *TdmAction) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tdmActionTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TdmAction) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tdm action based on context it is used -func (m *TdmAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TdmAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmAction) UnmarshalBinary(b []byte) error { - var res TdmAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_clone_task_request_params.go b/v2/models/tdm_clone_task_request_params.go deleted file mode 100644 index 59f92c6b..00000000 --- a/v2/models/tdm_clone_task_request_params.go +++ /dev/null @@ -1,166 +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" -) - -// TdmCloneTaskRequestParams Specifies the request parameters to create a clone task. -// -// swagger:model TdmCloneTaskRequestParams -type TdmCloneTaskRequestParams struct { - CommonTdmCloneTaskRequestParams - - // oracle params - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmCloneTaskRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneTaskRequestParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneTaskRequestParams = aO0 - - // AO1 - var dataAO1 struct { - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OracleParams = dataAO1.OracleParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmCloneTaskRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneTaskRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` - } - - dataAO1.OracleParams = m.OracleParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm clone task request params -func (m *TdmCloneTaskRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskRequestParams - if err := m.CommonTdmCloneTaskRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmCloneTaskRequestParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm clone task request params based on the context it is used -func (m *TdmCloneTaskRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskRequestParams - if err := m.CommonTdmCloneTaskRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmCloneTaskRequestParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmCloneTaskRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmCloneTaskRequestParams) UnmarshalBinary(b []byte) error { - var res TdmCloneTaskRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_clone_task_response_params.go b/v2/models/tdm_clone_task_response_params.go deleted file mode 100644 index 9d111368..00000000 --- a/v2/models/tdm_clone_task_response_params.go +++ /dev/null @@ -1,166 +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" -) - -// TdmCloneTaskResponseParams Specifies the response parameters for a clone task. -// -// swagger:model TdmCloneTaskResponseParams -type TdmCloneTaskResponseParams struct { - CommonTdmCloneTaskResponseParams - - // oracle params - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmCloneTaskResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneTaskResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneTaskResponseParams = aO0 - - // AO1 - var dataAO1 struct { - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OracleParams = dataAO1.OracleParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmCloneTaskResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneTaskResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OracleParams *OracleCloneTask `json:"oracleParams,omitempty"` - } - - dataAO1.OracleParams = m.OracleParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm clone task response params -func (m *TdmCloneTaskResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskResponseParams - if err := m.CommonTdmCloneTaskResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmCloneTaskResponseParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm clone task response params based on the context it is used -func (m *TdmCloneTaskResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneTaskResponseParams - if err := m.CommonTdmCloneTaskResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmCloneTaskResponseParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmCloneTaskResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmCloneTaskResponseParams) UnmarshalBinary(b []byte) error { - var res TdmCloneTaskResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_environment.go b/v2/models/tdm_environment.go deleted file mode 100644 index 473951ce..00000000 --- a/v2/models/tdm_environment.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TdmEnvironment TdmEnvironment -// -// Supported environments in TDM. -// -// swagger:model TdmEnvironment -type TdmEnvironment struct { - - // Specifies the TDM environment type. - // Enum: ["kSQL","kOracle"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tdm environment -func (m *TdmEnvironment) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tdmEnvironmentTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL","kOracle"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tdmEnvironmentTypeTypePropEnum = append(tdmEnvironmentTypeTypePropEnum, v) - } -} - -const ( - - // TdmEnvironmentTypeKSQL captures enum value "kSQL" - TdmEnvironmentTypeKSQL string = "kSQL" - - // TdmEnvironmentTypeKOracle captures enum value "kOracle" - TdmEnvironmentTypeKOracle string = "kOracle" -) - -// prop value enum -func (m *TdmEnvironment) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tdmEnvironmentTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TdmEnvironment) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tdm environment based on context it is used -func (m *TdmEnvironment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TdmEnvironment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmEnvironment) UnmarshalBinary(b []byte) error { - var res TdmEnvironment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_object.go b/v2/models/tdm_object.go deleted file mode 100644 index b150bcec..00000000 --- a/v2/models/tdm_object.go +++ /dev/null @@ -1,166 +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" -) - -// TdmObject Specifies a TDM object. -// -// swagger:model TdmObject -type TdmObject struct { - CommonTdmObjectResponseParams - - // oracle params - OracleParams *OracleCloneObject `json:"oracleParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmObjectResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmObjectResponseParams = aO0 - - // AO1 - var dataAO1 struct { - OracleParams *OracleCloneObject `json:"oracleParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OracleParams = dataAO1.OracleParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmObjectResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OracleParams *OracleCloneObject `json:"oracleParams,omitempty"` - } - - dataAO1.OracleParams = m.OracleParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm object -func (m *TdmObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmObjectResponseParams - if err := m.CommonTdmObjectResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObject) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm object based on the context it is used -func (m *TdmObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmObjectResponseParams - if err := m.CommonTdmObjectResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObject) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmObject) UnmarshalBinary(b []byte) error { - var res TdmObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_object_timeline_event.go b/v2/models/tdm_object_timeline_event.go deleted file mode 100644 index f849ee4f..00000000 --- a/v2/models/tdm_object_timeline_event.go +++ /dev/null @@ -1,226 +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" -) - -// TdmObjectTimelineEvent Specifies a TDM object timeline event. -// -// swagger:model TdmObjectTimelineEvent -type TdmObjectTimelineEvent struct { - CommonTdmObjectTimelineEventsResponseParams - - // clone params - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - // snapshot params - SnapshotParams *TdmSnapshot `json:"snapshotParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmObjectTimelineEvent) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmObjectTimelineEventsResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmObjectTimelineEventsResponseParams = aO0 - - // AO1 - var dataAO1 struct { - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - SnapshotParams *TdmSnapshot `json:"snapshotParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CloneParams = dataAO1.CloneParams - - m.SnapshotParams = dataAO1.SnapshotParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmObjectTimelineEvent) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmObjectTimelineEventsResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - SnapshotParams *TdmSnapshot `json:"snapshotParams,omitempty"` - } - - dataAO1.CloneParams = m.CloneParams - - dataAO1.SnapshotParams = m.SnapshotParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm object timeline event -func (m *TdmObjectTimelineEvent) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmObjectTimelineEventsResponseParams - if err := m.CommonTdmObjectTimelineEventsResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjectTimelineEvent) validateCloneParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if m.CloneParams != nil { - if err := m.CloneParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *TdmObjectTimelineEvent) validateSnapshotParams(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if m.SnapshotParams != nil { - if err := m.SnapshotParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm object timeline event based on the context it is used -func (m *TdmObjectTimelineEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmObjectTimelineEventsResponseParams - if err := m.CommonTdmObjectTimelineEventsResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSnapshotParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjectTimelineEvent) contextValidateCloneParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloneParams != nil { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if err := m.CloneParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *TdmObjectTimelineEvent) contextValidateSnapshotParams(ctx context.Context, formats strfmt.Registry) error { - - if m.SnapshotParams != nil { - - if swag.IsZero(m.SnapshotParams) { // not required - return nil - } - - if err := m.SnapshotParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmObjectTimelineEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmObjectTimelineEvent) UnmarshalBinary(b []byte) error { - var res TdmObjectTimelineEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_object_timeline_events.go b/v2/models/tdm_object_timeline_events.go deleted file mode 100644 index 85e5f696..00000000 --- a/v2/models/tdm_object_timeline_events.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TdmObjectTimelineEvents Specifies a collection of TDM object's timeline events. -// -// swagger:model TdmObjectTimelineEvents -type TdmObjectTimelineEvents struct { - - // Specifies the collection of the timeline events, filtered by the specified criteria. - Events []*TdmObjectTimelineEvent `json:"events"` -} - -// Validate validates this tdm object timeline events -func (m *TdmObjectTimelineEvents) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEvents(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjectTimelineEvents) validateEvents(formats strfmt.Registry) error { - if swag.IsZero(m.Events) { // not required - return nil - } - - for i := 0; i < len(m.Events); i++ { - if swag.IsZero(m.Events[i]) { // not required - continue - } - - if m.Events[i] != nil { - if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tdm object timeline events based on the context it is used -func (m *TdmObjectTimelineEvents) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEvents(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjectTimelineEvents) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Events); i++ { - - if m.Events[i] != nil { - - if swag.IsZero(m.Events[i]) { // not required - return nil - } - - if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("events" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmObjectTimelineEvents) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmObjectTimelineEvents) UnmarshalBinary(b []byte) error { - var res TdmObjectTimelineEvents - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_objects.go b/v2/models/tdm_objects.go deleted file mode 100644 index 46b90886..00000000 --- a/v2/models/tdm_objects.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TdmObjects Specifies a collection of TDM objects. -// -// swagger:model TdmObjects -type TdmObjects struct { - - // Specifies the collection of TDM objects, filtered by the specified criteria. - Objects []*TdmObject `json:"objects"` - - // pagination info - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this tdm objects -func (m *TdmObjects) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjects) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TdmObjects) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm objects based on the context it is used -func (m *TdmObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmObjects) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TdmObjects) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmObjects) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmObjects) UnmarshalBinary(b []byte) error { - var res TdmObjects - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_refresh_task_request_params.go b/v2/models/tdm_refresh_task_request_params.go deleted file mode 100644 index 32021d4e..00000000 --- a/v2/models/tdm_refresh_task_request_params.go +++ /dev/null @@ -1,91 +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" -) - -// TdmRefreshTaskRequestParams Specifies the parameters to refresh a clone with new data. -// -// swagger:model TdmRefreshTaskRequestParams -type TdmRefreshTaskRequestParams struct { - - // Specifies the ID of the clone, which needs to be refreshed. - // Required: true - CloneID *string `json:"cloneId"` - - // Specifies the snapshot ID, using which the clone is to be refreshed. - // Required: true - SnapshotID *string `json:"snapshotId"` - - // Specifies the description of the clone refresh task. - Description *string `json:"description,omitempty"` -} - -// Validate validates this tdm refresh task request params -func (m *TdmRefreshTaskRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloneID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSnapshotID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmRefreshTaskRequestParams) validateCloneID(formats strfmt.Registry) error { - - if err := validate.Required("cloneId", "body", m.CloneID); err != nil { - return err - } - - return nil -} - -func (m *TdmRefreshTaskRequestParams) validateSnapshotID(formats strfmt.Registry) error { - - if err := validate.Required("snapshotId", "body", m.SnapshotID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tdm refresh task request params based on context it is used -func (m *TdmRefreshTaskRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TdmRefreshTaskRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmRefreshTaskRequestParams) UnmarshalBinary(b []byte) error { - var res TdmRefreshTaskRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_refresh_task_response_params.go b/v2/models/tdm_refresh_task_response_params.go deleted file mode 100644 index 1c12fb0d..00000000 --- a/v2/models/tdm_refresh_task_response_params.go +++ /dev/null @@ -1,166 +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" -) - -// TdmRefreshTaskResponseParams Specifies the response parameters for a refresh task. -// -// swagger:model TdmRefreshTaskResponseParams -type TdmRefreshTaskResponseParams struct { - CommonTdmRefreshTaskResponseParams - - // oracle params - OracleParams *OracleCloneRefreshTask `json:"oracleParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmRefreshTaskResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmRefreshTaskResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmRefreshTaskResponseParams = aO0 - - // AO1 - var dataAO1 struct { - OracleParams *OracleCloneRefreshTask `json:"oracleParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OracleParams = dataAO1.OracleParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmRefreshTaskResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmRefreshTaskResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OracleParams *OracleCloneRefreshTask `json:"oracleParams,omitempty"` - } - - dataAO1.OracleParams = m.OracleParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm refresh task response params -func (m *TdmRefreshTaskResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmRefreshTaskResponseParams - if err := m.CommonTdmRefreshTaskResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmRefreshTaskResponseParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm refresh task response params based on the context it is used -func (m *TdmRefreshTaskResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmRefreshTaskResponseParams - if err := m.CommonTdmRefreshTaskResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmRefreshTaskResponseParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmRefreshTaskResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmRefreshTaskResponseParams) UnmarshalBinary(b []byte) error { - var res TdmRefreshTaskResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_snapshot.go b/v2/models/tdm_snapshot.go deleted file mode 100644 index 99880468..00000000 --- a/v2/models/tdm_snapshot.go +++ /dev/null @@ -1,243 +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" -) - -// TdmSnapshot Specifies the response params for a TDM snapshot. -// -// swagger:model TdmSnapshot -type TdmSnapshot struct { - CommonTdmCloneSnapshotParams - - // Specifies the ID of the snapshot. - // Required: true - ID *string `json:"id"` - - // Specifies whether the snapshot was taken automatically by the scheduler. - IsAutomated *bool `json:"isAutomated,omitempty"` - - // Specifies the time (in usecs from epoch) when the snapshot was created. - CreatedAt *int64 `json:"createdAt,omitempty"` - - // Specifies the time (in usecs from epoch) when the snapshot was last updated. - UpdatedAt *int64 `json:"updatedAt,omitempty"` - - // Specifies the details of the user, who created the snapshot. This will be null for snapshots, that are taken by system, such as a scheduler. - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - // Specifies the details of the user, who last updated the snapshot. - UpdatedByUser struct { - User - } `json:"updatedByUser,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmSnapshot) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneSnapshotParams = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id"` - - IsAutomated *bool `json:"isAutomated,omitempty"` - - CreatedAt *int64 `json:"createdAt,omitempty"` - - UpdatedAt *int64 `json:"updatedAt,omitempty"` - - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - UpdatedByUser struct { - User - } `json:"updatedByUser,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.IsAutomated = dataAO1.IsAutomated - - m.CreatedAt = dataAO1.CreatedAt - - m.UpdatedAt = dataAO1.UpdatedAt - - m.CreatedByUser = dataAO1.CreatedByUser - - m.UpdatedByUser = dataAO1.UpdatedByUser - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmSnapshot) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id"` - - IsAutomated *bool `json:"isAutomated,omitempty"` - - CreatedAt *int64 `json:"createdAt,omitempty"` - - UpdatedAt *int64 `json:"updatedAt,omitempty"` - - CreatedByUser struct { - User - } `json:"createdByUser,omitempty"` - - UpdatedByUser struct { - User - } `json:"updatedByUser,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.IsAutomated = m.IsAutomated - - dataAO1.CreatedAt = m.CreatedAt - - dataAO1.UpdatedAt = m.UpdatedAt - - dataAO1.CreatedByUser = m.CreatedByUser - - dataAO1.UpdatedByUser = m.UpdatedByUser - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm snapshot -func (m *TdmSnapshot) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedByUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdatedByUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmSnapshot) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *TdmSnapshot) validateCreatedByUser(formats strfmt.Registry) error { - - if swag.IsZero(m.CreatedByUser) { // not required - return nil - } - - return nil -} - -func (m *TdmSnapshot) validateUpdatedByUser(formats strfmt.Registry) error { - - if swag.IsZero(m.UpdatedByUser) { // not required - return nil - } - - return nil -} - -// ContextValidate validate this tdm snapshot based on the context it is used -func (m *TdmSnapshot) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdatedByUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmSnapshot) contextValidateCreatedByUser(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -func (m *TdmSnapshot) contextValidateUpdatedByUser(ctx context.Context, formats strfmt.Registry) error { - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmSnapshot) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmSnapshot) UnmarshalBinary(b []byte) error { - var res TdmSnapshot - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_snapshot_task_params.go b/v2/models/tdm_snapshot_task_params.go deleted file mode 100644 index cdb79a33..00000000 --- a/v2/models/tdm_snapshot_task_params.go +++ /dev/null @@ -1,134 +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" -) - -// TdmSnapshotTaskParams Specifies the parameters to create a snapshot of an existing clone. -// -// swagger:model TdmSnapshotTaskParams -type TdmSnapshotTaskParams struct { - - // Specifies the ID of the clone. - // Required: true - CloneID *string `json:"cloneId"` - - CommonTdmCloneSnapshotParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmSnapshotTaskParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - CloneID *string `json:"cloneId"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.CloneID = dataAO0.CloneID - - // AO1 - var aO1 CommonTdmCloneSnapshotParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonTdmCloneSnapshotParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmSnapshotTaskParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - CloneID *string `json:"cloneId"` - } - - dataAO0.CloneID = m.CloneID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonTdmCloneSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm snapshot task params -func (m *TdmSnapshotTaskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloneID(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmSnapshotTaskParams) validateCloneID(formats strfmt.Registry) error { - - if err := validate.Required("cloneId", "body", m.CloneID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this tdm snapshot task params based on the context it is used -func (m *TdmSnapshotTaskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TdmSnapshotTaskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmSnapshotTaskParams) UnmarshalBinary(b []byte) error { - var res TdmSnapshotTaskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_status.go b/v2/models/tdm_status.go deleted file mode 100644 index 69e74704..00000000 --- a/v2/models/tdm_status.go +++ /dev/null @@ -1,116 +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" -) - -// TdmStatus TdmStatus -// -// Possible status of a TDM resource (task/object). -// -// swagger:model TdmStatus -type TdmStatus struct { - - // Specifies the status of the resource. - // Enum: ["scheduled","inProgress","succeeded","failed","canceled"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tdm status -func (m *TdmStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tdmStatusTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["scheduled","inProgress","succeeded","failed","canceled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tdmStatusTypeTypePropEnum = append(tdmStatusTypeTypePropEnum, v) - } -} - -const ( - - // TdmStatusTypeScheduled captures enum value "scheduled" - TdmStatusTypeScheduled string = "scheduled" - - // TdmStatusTypeInProgress captures enum value "inProgress" - TdmStatusTypeInProgress string = "inProgress" - - // TdmStatusTypeSucceeded captures enum value "succeeded" - TdmStatusTypeSucceeded string = "succeeded" - - // TdmStatusTypeFailed captures enum value "failed" - TdmStatusTypeFailed string = "failed" - - // TdmStatusTypeCanceled captures enum value "canceled" - TdmStatusTypeCanceled string = "canceled" -) - -// prop value enum -func (m *TdmStatus) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tdmStatusTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TdmStatus) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tdm status based on context it is used -func (m *TdmStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TdmStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmStatus) UnmarshalBinary(b []byte) error { - var res TdmStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_task.go b/v2/models/tdm_task.go deleted file mode 100644 index db4d3453..00000000 --- a/v2/models/tdm_task.go +++ /dev/null @@ -1,226 +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" -) - -// TdmTask Specifies a TDM task. -// -// swagger:model TdmTask -type TdmTask struct { - CommonTdmTaskResponseParams - - // clone params - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - // refresh params - RefreshParams *TdmRefreshTaskResponseParams `json:"refreshParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TdmTask) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmTaskResponseParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmTaskResponseParams = aO0 - - // AO1 - var dataAO1 struct { - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - RefreshParams *TdmRefreshTaskResponseParams `json:"refreshParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CloneParams = dataAO1.CloneParams - - m.RefreshParams = dataAO1.RefreshParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TdmTask) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTdmTaskResponseParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CloneParams *TdmCloneTaskResponseParams `json:"cloneParams,omitempty"` - - RefreshParams *TdmRefreshTaskResponseParams `json:"refreshParams,omitempty"` - } - - dataAO1.CloneParams = m.CloneParams - - dataAO1.RefreshParams = m.RefreshParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tdm task -func (m *TdmTask) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmTaskResponseParams - if err := m.CommonTdmTaskResponseParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCloneParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmTask) validateCloneParams(formats strfmt.Registry) error { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if m.CloneParams != nil { - if err := m.CloneParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *TdmTask) validateRefreshParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RefreshParams) { // not required - return nil - } - - if m.RefreshParams != nil { - if err := m.RefreshParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm task based on the context it is used -func (m *TdmTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmTaskResponseParams - if err := m.CommonTdmTaskResponseParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCloneParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmTask) contextValidateCloneParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CloneParams != nil { - - if swag.IsZero(m.CloneParams) { // not required - return nil - } - - if err := m.CloneParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneParams") - } - return err - } - } - - return nil -} - -func (m *TdmTask) contextValidateRefreshParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RefreshParams != nil { - - if swag.IsZero(m.RefreshParams) { // not required - return nil - } - - if err := m.RefreshParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmTask) UnmarshalBinary(b []byte) error { - var res TdmTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_tasks.go b/v2/models/tdm_tasks.go deleted file mode 100644 index 769a462b..00000000 --- a/v2/models/tdm_tasks.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TdmTasks Specifies a collection of TDM tasks. -// -// swagger:model TdmTasks -type TdmTasks struct { - - // Specifies the collection of TDM tasks, filtered by the specified criteria. - Tasks []*TdmTask `json:"tasks"` - - // pagination info - PaginationInfo *PaginationInfo `json:"paginationInfo,omitempty"` -} - -// Validate validates this tdm tasks -func (m *TdmTasks) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTasks(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePaginationInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmTasks) validateTasks(formats strfmt.Registry) error { - if swag.IsZero(m.Tasks) { // not required - return nil - } - - for i := 0; i < len(m.Tasks); i++ { - if swag.IsZero(m.Tasks[i]) { // not required - continue - } - - if m.Tasks[i] != nil { - if err := m.Tasks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TdmTasks) validatePaginationInfo(formats strfmt.Registry) error { - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if m.PaginationInfo != nil { - if err := m.PaginationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tdm tasks based on the context it is used -func (m *TdmTasks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTasks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePaginationInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmTasks) contextValidateTasks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tasks); i++ { - - if m.Tasks[i] != nil { - - if swag.IsZero(m.Tasks[i]) { // not required - return nil - } - - if err := m.Tasks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tasks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tasks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TdmTasks) contextValidatePaginationInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.PaginationInfo != nil { - - if swag.IsZero(m.PaginationInfo) { // not required - return nil - } - - if err := m.PaginationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("paginationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("paginationInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TdmTasks) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmTasks) UnmarshalBinary(b []byte) error { - var res TdmTasks - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tdm_teardown_task_request_params.go b/v2/models/tdm_teardown_task_request_params.go deleted file mode 100644 index dc3b3c8f..00000000 --- a/v2/models/tdm_teardown_task_request_params.go +++ /dev/null @@ -1,71 +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" -) - -// TdmTeardownTaskRequestParams Specifies the parameters to teardown a clone. -// -// swagger:model TdmTeardownTaskRequestParams -type TdmTeardownTaskRequestParams struct { - - // Specifies the ID of the clone to teardown. - // Required: true - CloneID *string `json:"cloneId"` -} - -// Validate validates this tdm teardown task request params -func (m *TdmTeardownTaskRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloneID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TdmTeardownTaskRequestParams) validateCloneID(formats strfmt.Registry) error { - - if err := validate.Required("cloneId", "body", m.CloneID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tdm teardown task request params based on context it is used -func (m *TdmTeardownTaskRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TdmTeardownTaskRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TdmTeardownTaskRequestParams) UnmarshalBinary(b []byte) error { - var res TdmTeardownTaskRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/team_channel_type.go b/v2/models/team_channel_type.go deleted file mode 100644 index bfd1596e..00000000 --- a/v2/models/team_channel_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TeamChannelType Microsoft365 Teams channel types for search. -// -// Microsoft365 Teams channel types for search. -// -// swagger:model TeamChannelType -type TeamChannelType struct { - - // Specifies the Teams channel types for search. - // Enum: ["Private","Public"] - Type string `json:"type,omitempty"` -} - -// Validate validates this team channel type -func (m *TeamChannelType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var teamChannelTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Private","Public"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - teamChannelTypeTypeTypePropEnum = append(teamChannelTypeTypeTypePropEnum, v) - } -} - -const ( - - // TeamChannelTypeTypePrivate captures enum value "Private" - TeamChannelTypeTypePrivate string = "Private" - - // TeamChannelTypeTypePublic captures enum value "Public" - TeamChannelTypeTypePublic string = "Public" -) - -// prop value enum -func (m *TeamChannelType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, teamChannelTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TeamChannelType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this team channel type based on context it is used -func (m *TeamChannelType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TeamChannelType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TeamChannelType) UnmarshalBinary(b []byte) error { - var res TeamChannelType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/teams_additional_params.go b/v2/models/teams_additional_params.go deleted file mode 100644 index 3d8c81ca..00000000 --- a/v2/models/teams_additional_params.go +++ /dev/null @@ -1,52 +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" -) - -// TeamsAdditionalParams Source additional parameter for Teams object type -// -// Specifies additional params for Teams entities. It should only be populated if the 'DiscoveryParams.discoverableObjectTypeList' includes 'kTeams' otherwise this will be ignored. -// -// swagger:model TeamsAdditionalParams -type TeamsAdditionalParams struct { - - // Specifies whether the Teams posts/conversations will be backed up or not. If this is false or not specified teams' posts backup will not be done. - AllowPostsBackup *bool `json:"allowPostsBackup,omitempty"` -} - -// Validate validates this teams additional params -func (m *TeamsAdditionalParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this teams additional params based on context it is used -func (m *TeamsAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TeamsAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TeamsAdditionalParams) UnmarshalBinary(b []byte) error { - var res TeamsAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/teams_file_item.go b/v2/models/teams_file_item.go deleted file mode 100644 index f656b854..00000000 --- a/v2/models/teams_file_item.go +++ /dev/null @@ -1,119 +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" -) - -// TeamsFileItem ChannelItem -// -// Specifies a M365 Teams channel file item. -// -// swagger:model TeamsFileItem -type TeamsFileItem struct { - - // Specifies the file type. - // Enum: ["File","Directory","Symlink"] - FileType *string `json:"fileType,omitempty"` - - // Specifies the size in bytes for the indexed item. - ItemSize *int64 `json:"itemSize,omitempty"` - - // Specifies the Unix timestamp epoch in seconds at which this item is created. - CreationTimeSecs *int64 `json:"creationTimeSecs,omitempty"` - - // Specifies the name of the drive location for this file. - DriveName *string `json:"driveName,omitempty"` -} - -// Validate validates this teams file item -func (m *TeamsFileItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var teamsFileItemTypeFileTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["File","Directory","Symlink"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - teamsFileItemTypeFileTypePropEnum = append(teamsFileItemTypeFileTypePropEnum, v) - } -} - -const ( - - // TeamsFileItemFileTypeFile captures enum value "File" - TeamsFileItemFileTypeFile string = "File" - - // TeamsFileItemFileTypeDirectory captures enum value "Directory" - TeamsFileItemFileTypeDirectory string = "Directory" - - // TeamsFileItemFileTypeSymlink captures enum value "Symlink" - TeamsFileItemFileTypeSymlink string = "Symlink" -) - -// prop value enum -func (m *TeamsFileItem) validateFileTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, teamsFileItemTypeFileTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TeamsFileItem) validateFileType(formats strfmt.Registry) error { - if swag.IsZero(m.FileType) { // not required - return nil - } - - // value enum - if err := m.validateFileTypeEnum("fileType", "body", *m.FileType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this teams file item based on context it is used -func (m *TeamsFileItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TeamsFileItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TeamsFileItem) UnmarshalBinary(b []byte) error { - var res TeamsFileItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/teams_item.go b/v2/models/teams_item.go deleted file mode 100644 index 6159f721..00000000 --- a/v2/models/teams_item.go +++ /dev/null @@ -1,280 +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" -) - -// TeamsItem Indexed M365 Teams item. -// -// Specifies the indexed M365 Teams item. -// -// swagger:model TeamsItem -type TeamsItem struct { - CommonIndexedObjectParams - - // Specifies the M365 Teams item type. - // Enum: ["Channel","Chat","Conversation","File","Folder"] - Type *string `json:"type,omitempty"` - - // Specifies the indexed M365 Teams channel item. - ChannelItem *ChannelItem `json:"channelItem,omitempty"` - - // Specifies the indexed document library item. - FileItem *TeamsFileItem `json:"fileItem,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TeamsItem) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ChannelItem *ChannelItem `json:"channelItem,omitempty"` - - FileItem *TeamsFileItem `json:"fileItem,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Type = dataAO1.Type - - m.ChannelItem = dataAO1.ChannelItem - - m.FileItem = dataAO1.FileItem - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TeamsItem) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Type *string `json:"type,omitempty"` - - ChannelItem *ChannelItem `json:"channelItem,omitempty"` - - FileItem *TeamsFileItem `json:"fileItem,omitempty"` - } - - dataAO1.Type = m.Type - - dataAO1.ChannelItem = m.ChannelItem - - dataAO1.FileItem = m.FileItem - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this teams item -func (m *TeamsItem) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateChannelItem(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileItem(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var teamsItemTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Channel","Chat","Conversation","File","Folder"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - teamsItemTypeTypePropEnum = append(teamsItemTypeTypePropEnum, v) - } -} - -// property enum -func (m *TeamsItem) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, teamsItemTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TeamsItem) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *TeamsItem) validateChannelItem(formats strfmt.Registry) error { - - if swag.IsZero(m.ChannelItem) { // not required - return nil - } - - if m.ChannelItem != nil { - if err := m.ChannelItem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelItem") - } - return err - } - } - - return nil -} - -func (m *TeamsItem) validateFileItem(formats strfmt.Registry) error { - - if swag.IsZero(m.FileItem) { // not required - return nil - } - - if m.FileItem != nil { - if err := m.FileItem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileItem") - } - return err - } - } - - return nil -} - -// ContextValidate validate this teams item based on the context it is used -func (m *TeamsItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateChannelItem(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileItem(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TeamsItem) contextValidateChannelItem(ctx context.Context, formats strfmt.Registry) error { - - if m.ChannelItem != nil { - - if swag.IsZero(m.ChannelItem) { // not required - return nil - } - - if err := m.ChannelItem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("channelItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("channelItem") - } - return err - } - } - - return nil -} - -func (m *TeamsItem) contextValidateFileItem(ctx context.Context, formats strfmt.Registry) error { - - if m.FileItem != nil { - - if swag.IsZero(m.FileItem) { // not required - return nil - } - - if err := m.FileItem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileItem") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileItem") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TeamsItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TeamsItem) UnmarshalBinary(b []byte) error { - var res TeamsItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/teams_items.go b/v2/models/teams_items.go deleted file mode 100644 index fab72dac..00000000 --- a/v2/models/teams_items.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TeamsItems Specifies the indexed M365 Teams items like channels, files etc. -// -// swagger:model TeamsItems -type TeamsItems []*TeamsItem - -// Validate validates this teams items -func (m TeamsItems) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this teams items based on the context it is used -func (m TeamsItems) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/tear_down_status.go b/v2/models/tear_down_status.go deleted file mode 100644 index 63f84d19..00000000 --- a/v2/models/tear_down_status.go +++ /dev/null @@ -1,113 +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" -) - -// TearDownStatus TearDownStatus -// -// # Tear Down Status -// -// swagger:model TearDownStatus -type TearDownStatus struct { - - // Specifies the tear down status. - // Enum: ["DestroyScheduled","Destroying","Destroyed","DestroyError"] - TearDownStatus string `json:"tearDownStatus,omitempty"` -} - -// Validate validates this tear down status -func (m *TearDownStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTearDownStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tearDownStatusTypeTearDownStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DestroyScheduled","Destroying","Destroyed","DestroyError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tearDownStatusTypeTearDownStatusPropEnum = append(tearDownStatusTypeTearDownStatusPropEnum, v) - } -} - -const ( - - // TearDownStatusTearDownStatusDestroyScheduled captures enum value "DestroyScheduled" - TearDownStatusTearDownStatusDestroyScheduled string = "DestroyScheduled" - - // TearDownStatusTearDownStatusDestroying captures enum value "Destroying" - TearDownStatusTearDownStatusDestroying string = "Destroying" - - // TearDownStatusTearDownStatusDestroyed captures enum value "Destroyed" - TearDownStatusTearDownStatusDestroyed string = "Destroyed" - - // TearDownStatusTearDownStatusDestroyError captures enum value "DestroyError" - TearDownStatusTearDownStatusDestroyError string = "DestroyError" -) - -// prop value enum -func (m *TearDownStatus) validateTearDownStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tearDownStatusTypeTearDownStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TearDownStatus) validateTearDownStatus(formats strfmt.Registry) error { - if swag.IsZero(m.TearDownStatus) { // not required - return nil - } - - // value enum - if err := m.validateTearDownStatusEnum("tearDownStatus", "body", m.TearDownStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tear down status based on context it is used -func (m *TearDownStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TearDownStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TearDownStatus) UnmarshalBinary(b []byte) error { - var res TearDownStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/template.go b/v2/models/template.go deleted file mode 100644 index 9934c5a0..00000000 --- a/v2/models/template.go +++ /dev/null @@ -1,266 +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" -) - -// Template Template. -// -// Description of the view template. -// -// swagger:model Template -type Template struct { - - // Specifies an id of the view template. - // Read Only: true - ID *int64 `json:"id,omitempty"` - - // Specifies the name of the view template. - Name *string `json:"name,omitempty"` - - // Specifies whether to enable dedup in storage domain. - Dedup *bool `json:"dedup,omitempty"` - - // Specifies whether to enable compression in storage domain. - Compress *bool `json:"compress,omitempty"` - - // Specifies if the tempate is custom or static. - // Read Only: true - IsDefault *bool `json:"isDefault,omitempty"` - - // Used for uniquely indentifying a default template. - // Read Only: true - // Enum: ["Unknown","BackupGeneral","BackupCommvault","BackupVeeam","FileServiceVideos","FileServiceMultimedia","FileServiceArchive","ObjectServiceContainer","ZDLRA","SAPHANA","TSM","ApplicationsDump","FileServiceGeneral","DigitalArchive","ObjectServiceGeneral","SplunkSmartStore","Hadoop"] - DefaultTemplateName *string `json:"defaultTemplateName,omitempty"` - - // Specifies the parameters which is used to create the view. - // No field is required. - ViewParams *CreateView `json:"viewParams,omitempty"` -} - -// Validate validates this template -func (m *Template) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultTemplateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var templateTypeDefaultTemplateNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Unknown","BackupGeneral","BackupCommvault","BackupVeeam","FileServiceVideos","FileServiceMultimedia","FileServiceArchive","ObjectServiceContainer","ZDLRA","SAPHANA","TSM","ApplicationsDump","FileServiceGeneral","DigitalArchive","ObjectServiceGeneral","SplunkSmartStore","Hadoop"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - templateTypeDefaultTemplateNamePropEnum = append(templateTypeDefaultTemplateNamePropEnum, v) - } -} - -const ( - - // TemplateDefaultTemplateNameUnknown captures enum value "Unknown" - TemplateDefaultTemplateNameUnknown string = "Unknown" - - // TemplateDefaultTemplateNameBackupGeneral captures enum value "BackupGeneral" - TemplateDefaultTemplateNameBackupGeneral string = "BackupGeneral" - - // TemplateDefaultTemplateNameBackupCommvault captures enum value "BackupCommvault" - TemplateDefaultTemplateNameBackupCommvault string = "BackupCommvault" - - // TemplateDefaultTemplateNameBackupVeeam captures enum value "BackupVeeam" - TemplateDefaultTemplateNameBackupVeeam string = "BackupVeeam" - - // TemplateDefaultTemplateNameFileServiceVideos captures enum value "FileServiceVideos" - TemplateDefaultTemplateNameFileServiceVideos string = "FileServiceVideos" - - // TemplateDefaultTemplateNameFileServiceMultimedia captures enum value "FileServiceMultimedia" - TemplateDefaultTemplateNameFileServiceMultimedia string = "FileServiceMultimedia" - - // TemplateDefaultTemplateNameFileServiceArchive captures enum value "FileServiceArchive" - TemplateDefaultTemplateNameFileServiceArchive string = "FileServiceArchive" - - // TemplateDefaultTemplateNameObjectServiceContainer captures enum value "ObjectServiceContainer" - TemplateDefaultTemplateNameObjectServiceContainer string = "ObjectServiceContainer" - - // TemplateDefaultTemplateNameZDLRA captures enum value "ZDLRA" - TemplateDefaultTemplateNameZDLRA string = "ZDLRA" - - // TemplateDefaultTemplateNameSAPHANA captures enum value "SAPHANA" - TemplateDefaultTemplateNameSAPHANA string = "SAPHANA" - - // TemplateDefaultTemplateNameTSM captures enum value "TSM" - TemplateDefaultTemplateNameTSM string = "TSM" - - // TemplateDefaultTemplateNameApplicationsDump captures enum value "ApplicationsDump" - TemplateDefaultTemplateNameApplicationsDump string = "ApplicationsDump" - - // TemplateDefaultTemplateNameFileServiceGeneral captures enum value "FileServiceGeneral" - TemplateDefaultTemplateNameFileServiceGeneral string = "FileServiceGeneral" - - // TemplateDefaultTemplateNameDigitalArchive captures enum value "DigitalArchive" - TemplateDefaultTemplateNameDigitalArchive string = "DigitalArchive" - - // TemplateDefaultTemplateNameObjectServiceGeneral captures enum value "ObjectServiceGeneral" - TemplateDefaultTemplateNameObjectServiceGeneral string = "ObjectServiceGeneral" - - // TemplateDefaultTemplateNameSplunkSmartStore captures enum value "SplunkSmartStore" - TemplateDefaultTemplateNameSplunkSmartStore string = "SplunkSmartStore" - - // TemplateDefaultTemplateNameHadoop captures enum value "Hadoop" - TemplateDefaultTemplateNameHadoop string = "Hadoop" -) - -// prop value enum -func (m *Template) validateDefaultTemplateNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, templateTypeDefaultTemplateNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *Template) validateDefaultTemplateName(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultTemplateName) { // not required - return nil - } - - // value enum - if err := m.validateDefaultTemplateNameEnum("defaultTemplateName", "body", *m.DefaultTemplateName); err != nil { - return err - } - - return nil -} - -func (m *Template) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this template based on the context it is used -func (m *Template) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsDefault(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDefaultTemplateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Template) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *Template) contextValidateIsDefault(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isDefault", "body", m.IsDefault); err != nil { - return err - } - - return nil -} - -func (m *Template) contextValidateDefaultTemplateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "defaultTemplateName", "body", m.DefaultTemplateName); err != nil { - return err - } - - return nil -} - -func (m *Template) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Template) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Template) UnmarshalBinary(b []byte) error { - var res Template - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant.go b/v2/models/tenant.go deleted file mode 100644 index 740be11a..00000000 --- a/v2/models/tenant.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" -) - -// Tenant Tenant -// -// Specifies a tenant object. -// -// swagger:model Tenant -type Tenant struct { - TenantInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *Tenant) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TenantInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TenantInfo = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m Tenant) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TenantInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tenant -func (m *Tenant) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TenantInfo - if err := m.TenantInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this tenant based on the context it is used -func (m *Tenant) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TenantInfo - if err := m.TenantInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *Tenant) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Tenant) UnmarshalBinary(b []byte) error { - var res Tenant - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_action_body.go b/v2/models/tenant_action_body.go deleted file mode 100644 index 0f333cae..00000000 --- a/v2/models/tenant_action_body.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TenantActionBody Specifies an action on the Tenant. -// -// swagger:model TenantActionBody -type TenantActionBody struct { - - // Specifies the action which will be performed on the Tenant. - // Required: true - // Enum: ["Activate","Deactivate"] - Action *string `json:"action"` -} - -// Validate validates this tenant action body -func (m *TenantActionBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantActionBodyTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Activate","Deactivate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantActionBodyTypeActionPropEnum = append(tenantActionBodyTypeActionPropEnum, v) - } -} - -const ( - - // TenantActionBodyActionActivate captures enum value "Activate" - TenantActionBodyActionActivate string = "Activate" - - // TenantActionBodyActionDeactivate captures enum value "Deactivate" - TenantActionBodyActionDeactivate string = "Deactivate" -) - -// prop value enum -func (m *TenantActionBody) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantActionBodyTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantActionBody) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant action body based on context it is used -func (m *TenantActionBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantActionBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantActionBody) UnmarshalBinary(b []byte) error { - var res TenantActionBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_actions.go b/v2/models/tenant_actions.go deleted file mode 100644 index fb2f3450..00000000 --- a/v2/models/tenant_actions.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TenantActions Tenants Actions -// -// Specifies the actions that can be performed on a Tenant. -// -// swagger:model TenantActions -type TenantActions struct { - - // Specifies the actions that can be performed on a Tenant. - // Enum: ["Activate","Deactivate"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this tenant actions -func (m *TenantActions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantActionsTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Activate","Deactivate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantActionsTypeEnumPropEnum = append(tenantActionsTypeEnumPropEnum, v) - } -} - -const ( - - // TenantActionsEnumActivate captures enum value "Activate" - TenantActionsEnumActivate string = "Activate" - - // TenantActionsEnumDeactivate captures enum value "Deactivate" - TenantActionsEnumDeactivate string = "Deactivate" -) - -// prop value enum -func (m *TenantActions) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantActionsTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantActions) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant actions based on context it is used -func (m *TenantActions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantActions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantActions) UnmarshalBinary(b []byte) error { - var res TenantActions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_assignment_properties.go b/v2/models/tenant_assignment_properties.go deleted file mode 100644 index afe40a10..00000000 --- a/v2/models/tenant_assignment_properties.go +++ /dev/null @@ -1,297 +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" -) - -// TenantAssignmentProperties TenantAssignmentProperties -// -// List of all the assigned properties to a Tenant. -// -// swagger:model TenantAssignmentProperties -type TenantAssignmentProperties struct { - - // storage domains - StorageDomains *StorageDomains `json:"storageDomains,omitempty"` - - // objects - Objects TenantAssignmentTypeIntegerID `json:"objects,omitempty"` - - // vlans - Vlans TenantAssignmentTypeStringID `json:"vlans,omitempty"` - - // views - Views *GetViewsResult `json:"views,omitempty"` - - // policies - Policies *ProtectionPolicyResponseWithPagination `json:"policies,omitempty"` -} - -// Validate validates this tenant assignment properties -func (m *TenantAssignmentProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlans(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignmentProperties) validateStorageDomains(formats strfmt.Registry) error { - if swag.IsZero(m.StorageDomains) { // not required - return nil - } - - if m.StorageDomains != nil { - if err := m.StorageDomains.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains") - } - return err - } - } - - return nil -} - -func (m *TenantAssignmentProperties) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := m.Objects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects") - } - return err - } - - return nil -} - -func (m *TenantAssignmentProperties) validateVlans(formats strfmt.Registry) error { - if swag.IsZero(m.Vlans) { // not required - return nil - } - - if err := m.Vlans.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans") - } - return err - } - - return nil -} - -func (m *TenantAssignmentProperties) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - if m.Views != nil { - if err := m.Views.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views") - } - return err - } - } - - return nil -} - -func (m *TenantAssignmentProperties) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - if m.Policies != nil { - if err := m.Policies.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tenant assignment properties based on the context it is used -func (m *TenantAssignmentProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlans(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignmentProperties) contextValidateStorageDomains(ctx context.Context, formats strfmt.Registry) error { - - if m.StorageDomains != nil { - - if swag.IsZero(m.StorageDomains) { // not required - return nil - } - - if err := m.StorageDomains.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains") - } - return err - } - } - - return nil -} - -func (m *TenantAssignmentProperties) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Objects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects") - } - return err - } - - return nil -} - -func (m *TenantAssignmentProperties) contextValidateVlans(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Vlans.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans") - } - return err - } - - return nil -} - -func (m *TenantAssignmentProperties) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - if m.Views != nil { - - if swag.IsZero(m.Views) { // not required - return nil - } - - if err := m.Views.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views") - } - return err - } - } - - return nil -} - -func (m *TenantAssignmentProperties) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - if m.Policies != nil { - - if swag.IsZero(m.Policies) { // not required - return nil - } - - if err := m.Policies.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantAssignmentProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantAssignmentProperties) UnmarshalBinary(b []byte) error { - var res TenantAssignmentProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_assignment_type_integer_id.go b/v2/models/tenant_assignment_type_integer_id.go deleted file mode 100644 index 03731613..00000000 --- a/v2/models/tenant_assignment_type_integer_id.go +++ /dev/null @@ -1,29 +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" -) - -// TenantAssignmentTypeIntegerID TenantAssignmentTypeIntegerId -// -// A list of Ids of properties assigned to the tenant. -// -// swagger:model TenantAssignmentTypeIntegerId -type TenantAssignmentTypeIntegerID []int64 - -// Validate validates this tenant assignment type integer Id -func (m TenantAssignmentTypeIntegerID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant assignment type integer Id based on context it is used -func (m TenantAssignmentTypeIntegerID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/tenant_assignment_type_string_id.go b/v2/models/tenant_assignment_type_string_id.go deleted file mode 100644 index 84a58895..00000000 --- a/v2/models/tenant_assignment_type_string_id.go +++ /dev/null @@ -1,29 +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" -) - -// TenantAssignmentTypeStringID TenantAssignmentTypeStringId -// -// A list of Ids of properties assigned to the tenant. -// -// swagger:model TenantAssignmentTypeStringId -type TenantAssignmentTypeStringID []string - -// Validate validates this tenant assignment type string Id -func (m TenantAssignmentTypeStringID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant assignment type string Id based on context it is used -func (m TenantAssignmentTypeStringID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/v2/models/tenant_assignments.go b/v2/models/tenant_assignments.go deleted file mode 100644 index f14e4c94..00000000 --- a/v2/models/tenant_assignments.go +++ /dev/null @@ -1,114 +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" -) - -// TenantAssignments TenantAssignments -// -// All properties like entities, sources, policies etc assigned to the tenant. -// -// swagger:model TenantAssignments -type TenantAssignments struct { - - // The tenant id. - TenantID *string `json:"tenantId,omitempty"` - - // assignments - Assignments *TenantAssignmentsResult `json:"assignments,omitempty"` -} - -// Validate validates this tenant assignments -func (m *TenantAssignments) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAssignments(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignments) validateAssignments(formats strfmt.Registry) error { - if swag.IsZero(m.Assignments) { // not required - return nil - } - - if m.Assignments != nil { - if err := m.Assignments.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("assignments") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("assignments") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tenant assignments based on the context it is used -func (m *TenantAssignments) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAssignments(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignments) contextValidateAssignments(ctx context.Context, formats strfmt.Registry) error { - - if m.Assignments != nil { - - if swag.IsZero(m.Assignments) { // not required - return nil - } - - if err := m.Assignments.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("assignments") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("assignments") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantAssignments) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantAssignments) UnmarshalBinary(b []byte) error { - var res TenantAssignments - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_assignments_params.go b/v2/models/tenant_assignments_params.go deleted file mode 100644 index 3bd4a9af..00000000 --- a/v2/models/tenant_assignments_params.go +++ /dev/null @@ -1,65 +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" -) - -// TenantAssignmentsParams TenantAssignmentsParams -// -// Parameters to be specified for assigning properties like storage domain, -// entities, policies to the tenant. -// -// swagger:model TenantAssignmentsParams -type TenantAssignmentsParams struct { - - // List of storage domains on the cluster, to be associated to the Tenant. - StorageDomainIds []int64 `json:"storageDomainIds"` - - // List of objects on the cluster, to be associated to the Tenant. - ObjectIds []int64 `json:"objectIds"` - - // List of vlans on the cluster, to be associated to the Tenant. - VlanIfaceNames []string `json:"vlanIfaceNames"` - - // List of views on the cluster, to be associated to the Tenant. - ViewIds []int64 `json:"viewIds"` - - // List of policies on the cluster, to be associated to the Tenant. - PolicyIds []string `json:"policyIds"` -} - -// Validate validates this tenant assignments params -func (m *TenantAssignmentsParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant assignments params based on context it is used -func (m *TenantAssignmentsParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantAssignmentsParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantAssignmentsParams) UnmarshalBinary(b []byte) error { - var res TenantAssignmentsParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_assignments_result.go b/v2/models/tenant_assignments_result.go deleted file mode 100644 index 588cd19c..00000000 --- a/v2/models/tenant_assignments_result.go +++ /dev/null @@ -1,268 +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" -) - -// TenantAssignmentsResult Result of attempted tenant assignments -// -// swagger:model TenantAssignmentsResult -type TenantAssignmentsResult struct { - - // storage domains - StorageDomains TenantAssignmentTypeIntegerID `json:"storageDomains,omitempty"` - - // objects - Objects TenantAssignmentTypeIntegerID `json:"objects,omitempty"` - - // vlans - Vlans TenantAssignmentTypeStringID `json:"vlans,omitempty"` - - // views - Views TenantAssignmentTypeIntegerID `json:"views,omitempty"` - - // policies - Policies TenantAssignmentTypeStringID `json:"policies,omitempty"` -} - -// Validate validates this tenant assignments result -func (m *TenantAssignmentsResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlans(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViews(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePolicies(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignmentsResult) validateStorageDomains(formats strfmt.Registry) error { - if swag.IsZero(m.StorageDomains) { // not required - return nil - } - - if err := m.StorageDomains.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) validateObjects(formats strfmt.Registry) error { - if swag.IsZero(m.Objects) { // not required - return nil - } - - if err := m.Objects.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) validateVlans(formats strfmt.Registry) error { - if swag.IsZero(m.Vlans) { // not required - return nil - } - - if err := m.Vlans.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) validateViews(formats strfmt.Registry) error { - if swag.IsZero(m.Views) { // not required - return nil - } - - if err := m.Views.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) validatePolicies(formats strfmt.Registry) error { - if swag.IsZero(m.Policies) { // not required - return nil - } - - if err := m.Policies.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies") - } - return err - } - - return nil -} - -// ContextValidate validate this tenant assignments result based on the context it is used -func (m *TenantAssignmentsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlans(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViews(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePolicies(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantAssignmentsResult) contextValidateStorageDomains(ctx context.Context, formats strfmt.Registry) error { - - if err := m.StorageDomains.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomains") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomains") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Objects.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) contextValidateVlans(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Vlans.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlans") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlans") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) contextValidateViews(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Views.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("views") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("views") - } - return err - } - - return nil -} - -func (m *TenantAssignmentsResult) contextValidatePolicies(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Policies.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("policies") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("policies") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantAssignmentsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantAssignmentsResult) UnmarshalBinary(b []byte) error { - var res TenantAssignmentsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_backfill_task_type.go b/v2/models/tenant_backfill_task_type.go deleted file mode 100644 index df0695a0..00000000 --- a/v2/models/tenant_backfill_task_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TenantBackfillTaskType Tenant Backfill Task Type -// -// Specifies the Tenant Backfill Task Type. -// -// swagger:model TenantBackfillTaskType -type TenantBackfillTaskType struct { - - // Specifies Tenant Backfill Task Type. - // Enum: ["SourceRegistration","ObjectProtection"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this tenant backfill task type -func (m *TenantBackfillTaskType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantBackfillTaskTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SourceRegistration","ObjectProtection"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantBackfillTaskTypeTypeEnumPropEnum = append(tenantBackfillTaskTypeTypeEnumPropEnum, v) - } -} - -const ( - - // TenantBackfillTaskTypeEnumSourceRegistration captures enum value "SourceRegistration" - TenantBackfillTaskTypeEnumSourceRegistration string = "SourceRegistration" - - // TenantBackfillTaskTypeEnumObjectProtection captures enum value "ObjectProtection" - TenantBackfillTaskTypeEnumObjectProtection string = "ObjectProtection" -) - -// prop value enum -func (m *TenantBackfillTaskType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantBackfillTaskTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantBackfillTaskType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant backfill task type based on context it is used -func (m *TenantBackfillTaskType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantBackfillTaskType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantBackfillTaskType) UnmarshalBinary(b []byte) error { - var res TenantBackfillTaskType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_dmaas_cert.go b/v2/models/tenant_dmaas_cert.go deleted file mode 100644 index 06de46fc..00000000 --- a/v2/models/tenant_dmaas_cert.go +++ /dev/null @@ -1,64 +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" -) - -// TenantDmaasCert Tenant Dmaas Certificate. -// -// Specifies the parameters to of a tenant certificate. -// -// swagger:model TenantDmaasCert -type TenantDmaasCert struct { - - // The id of the tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant certificate. - Certificate *string `json:"certificate,omitempty"` - - // Specifies the tenant private key. - PrivateKey *string `json:"privateKey,omitempty"` - - // Specifies the CA chain that is used to sign the connector certificate. - ConnectorCaChain *string `json:"connectorCaChain,omitempty"` - - // Specifies the passphrase used to encode the private key. - Passphrase *string `json:"passphrase,omitempty"` -} - -// Validate validates this tenant dmaas cert -func (m *TenantDmaasCert) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this tenant dmaas cert based on context it is used -func (m *TenantDmaasCert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantDmaasCert) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantDmaasCert) UnmarshalBinary(b []byte) error { - var res TenantDmaasCert - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_dmaas_certs.go b/v2/models/tenant_dmaas_certs.go deleted file mode 100644 index f51c17d5..00000000 --- a/v2/models/tenant_dmaas_certs.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TenantDmaasCerts Tenant Dmaas Certificates. -// -// Specifies a list of tenant certificates. -// -// swagger:model TenantDmaasCerts -type TenantDmaasCerts struct { - - // Specifies a list of tenant certificates. - Certificates []*TenantDmaasCert `json:"certificates"` -} - -// Validate validates this tenant dmaas certs -func (m *TenantDmaasCerts) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantDmaasCerts) validateCertificates(formats strfmt.Registry) error { - if swag.IsZero(m.Certificates) { // not required - return nil - } - - for i := 0; i < len(m.Certificates); i++ { - if swag.IsZero(m.Certificates[i]) { // not required - continue - } - - if m.Certificates[i] != nil { - if err := m.Certificates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tenant dmaas certs based on the context it is used -func (m *TenantDmaasCerts) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantDmaasCerts) contextValidateCertificates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Certificates); i++ { - - if m.Certificates[i] != nil { - - if swag.IsZero(m.Certificates[i]) { // not required - return nil - } - - if err := m.Certificates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantDmaasCerts) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantDmaasCerts) UnmarshalBinary(b []byte) error { - var res TenantDmaasCerts - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_info.go b/v2/models/tenant_info.go deleted file mode 100644 index 0606033e..00000000 --- a/v2/models/tenant_info.go +++ /dev/null @@ -1,232 +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" -) - -// TenantInfo Tenant -// -// Description of a Tenant and it's properties. -// -// swagger:model TenantInfo -type TenantInfo struct { - - // The tenant id. - ID *string `json:"id,omitempty"` - - // Name of the Tenant. - Name *string `json:"name,omitempty"` - - // Description about the tenant. - Description *string `json:"description,omitempty"` - - // Current Status of the Tenant. - // Enum: ["Active","Inactive","MarkedForDeletion","Deleted"] - Status *string `json:"status,omitempty"` - - // network - Network *TenantNetwork `json:"network,omitempty"` - - // Epoch time when tenant was created. - // Read Only: true - CreatedAtTimeMsecs *int64 `json:"createdAtTimeMsecs,omitempty"` - - // Epoch time when tenant was last updated. - // Read Only: true - LastUpdatedAtTimeMsecs *int64 `json:"lastUpdatedAtTimeMsecs,omitempty"` - - // Epoch time when tenant was last updated. - // Read Only: true - DeletedAtTimeMsecs *int64 `json:"deletedAtTimeMsecs,omitempty"` - - // Flag to indicate if tenant is managed on helios - IsManagedOnHelios *bool `json:"isManagedOnHelios,omitempty"` -} - -// Validate validates this tenant info -func (m *TenantInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetwork(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Inactive","MarkedForDeletion","Deleted"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantInfoTypeStatusPropEnum = append(tenantInfoTypeStatusPropEnum, v) - } -} - -const ( - - // TenantInfoStatusActive captures enum value "Active" - TenantInfoStatusActive string = "Active" - - // TenantInfoStatusInactive captures enum value "Inactive" - TenantInfoStatusInactive string = "Inactive" - - // TenantInfoStatusMarkedForDeletion captures enum value "MarkedForDeletion" - TenantInfoStatusMarkedForDeletion string = "MarkedForDeletion" - - // TenantInfoStatusDeleted captures enum value "Deleted" - TenantInfoStatusDeleted string = "Deleted" -) - -// prop value enum -func (m *TenantInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *TenantInfo) validateNetwork(formats strfmt.Registry) error { - if swag.IsZero(m.Network) { // not required - return nil - } - - if m.Network != nil { - if err := m.Network.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("network") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tenant info based on the context it is used -func (m *TenantInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdatedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeletedAtTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantInfo) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.Network != nil { - - if swag.IsZero(m.Network) { // not required - return nil - } - - if err := m.Network.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("network") - } - return err - } - } - - return nil -} - -func (m *TenantInfo) contextValidateCreatedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdAtTimeMsecs", "body", m.CreatedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *TenantInfo) contextValidateLastUpdatedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedAtTimeMsecs", "body", m.LastUpdatedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *TenantInfo) contextValidateDeletedAtTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "deletedAtTimeMsecs", "body", m.DeletedAtTimeMsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantInfo) UnmarshalBinary(b []byte) error { - var res TenantInfo - 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 deleted file mode 100644 index defd81d1..00000000 --- a/v2/models/tenant_migration_action.go +++ /dev/null @@ -1,228 +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" -) - -// TenantMigrationAction Specifies a tenant action. -// -// swagger:model TenantMigrationAction -type TenantMigrationAction struct { - - // Specifies the tenant ID of the user on which the action is being performed. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the tenant migration ID. This ID should be unique across clusters and should be generated by clients - TenantMigrationUUID *string `json:"tenantMigrationUuid,omitempty"` - - // Specifies the action which will be performed on the tenant. - // Required: true - // Enum: ["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"] - Action *string `json:"action"` - - // 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 cluster service on which this action needs to be performed. - // Enum: ["kMagneto","kYoda","kIcebox"] - Service *string `json:"service,omitempty"` - - // API version - Version *int32 `json:"version,omitempty"` -} - -// Validate validates this tenant migration action -func (m *TenantMigrationAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantMigrationAction) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -var tenantMigrationActionTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantMigrationActionTypeActionPropEnum = append(tenantMigrationActionTypeActionPropEnum, v) - } -} - -const ( - - // TenantMigrationActionActionStartMigration captures enum value "StartMigration" - TenantMigrationActionActionStartMigration string = "StartMigration" - - // TenantMigrationActionActionStopMigration captures enum value "StopMigration" - TenantMigrationActionActionStopMigration string = "StopMigration" - - // TenantMigrationActionActionGetTenantMigrationServices captures enum value "GetTenantMigrationServices" - TenantMigrationActionActionGetTenantMigrationServices string = "GetTenantMigrationServices" - - // TenantMigrationActionActionPreCheck captures enum value "PreCheck" - TenantMigrationActionActionPreCheck string = "PreCheck" - - // TenantMigrationActionActionImport captures enum value "Import" - TenantMigrationActionActionImport string = "Import" - - // TenantMigrationActionActionExport captures enum value "Export" - TenantMigrationActionActionExport string = "Export" - - // TenantMigrationActionActionQuiesce captures enum value "Quiesce" - TenantMigrationActionActionQuiesce string = "Quiesce" - - // TenantMigrationActionActionUnquiesce captures enum value "Unquiesce" - TenantMigrationActionActionUnquiesce string = "Unquiesce" - - // TenantMigrationActionActionMigrateMetadata captures enum value "MigrateMetadata" - TenantMigrationActionActionMigrateMetadata string = "MigrateMetadata" - - // TenantMigrationActionActionMigrateData captures enum value "MigrateData" - TenantMigrationActionActionMigrateData string = "MigrateData" - - // TenantMigrationActionActionPurgeTenantData captures enum value "PurgeTenantData" - TenantMigrationActionActionPurgeTenantData string = "PurgeTenantData" - - // TenantMigrationActionActionExportMetadataForValidation captures enum value "ExportMetadataForValidation" - TenantMigrationActionActionExportMetadataForValidation string = "ExportMetadataForValidation" - - // TenantMigrationActionActionImportMetadataForValidation captures enum value "ImportMetadataForValidation" - TenantMigrationActionActionImportMetadataForValidation string = "ImportMetadataForValidation" - - // TenantMigrationActionActionValidateMetadata captures enum value "ValidateMetadata" - TenantMigrationActionActionValidateMetadata string = "ValidateMetadata" - - // TenantMigrationActionActionDisableInlineChanges captures enum value "DisableInlineChanges" - TenantMigrationActionActionDisableInlineChanges string = "DisableInlineChanges" - - // TenantMigrationActionActionEnableInlineChanges captures enum value "EnableInlineChanges" - TenantMigrationActionActionEnableInlineChanges string = "EnableInlineChanges" -) - -// prop value enum -func (m *TenantMigrationAction) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantMigrationActionTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantMigrationAction) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -var tenantMigrationActionTypeServicePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMagneto","kYoda","kIcebox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantMigrationActionTypeServicePropEnum = append(tenantMigrationActionTypeServicePropEnum, v) - } -} - -const ( - - // TenantMigrationActionServiceKMagneto captures enum value "kMagneto" - TenantMigrationActionServiceKMagneto string = "kMagneto" - - // TenantMigrationActionServiceKYoda captures enum value "kYoda" - TenantMigrationActionServiceKYoda string = "kYoda" - - // TenantMigrationActionServiceKIcebox captures enum value "kIcebox" - TenantMigrationActionServiceKIcebox string = "kIcebox" -) - -// prop value enum -func (m *TenantMigrationAction) validateServiceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantMigrationActionTypeServicePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantMigrationAction) validateService(formats strfmt.Registry) error { - if swag.IsZero(m.Service) { // not required - return nil - } - - // value enum - if err := m.validateServiceEnum("service", "body", *m.Service); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant migration action based on context it is used -func (m *TenantMigrationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantMigrationAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantMigrationAction) UnmarshalBinary(b []byte) error { - var res TenantMigrationAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_migration_result.go b/v2/models/tenant_migration_result.go deleted file mode 100644 index 54c1d405..00000000 --- a/v2/models/tenant_migration_result.go +++ /dev/null @@ -1,129 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TenantMigrationResult Tenant -// -// Get Tenant migration actions related details. -// -// swagger:model TenantMigrationResult -type TenantMigrationResult struct { - - // Specifies the tenant ID of the user on which the action is being performed. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant migration ID. This ID should be unique across clusters and should be generated by clients - TenantMigrationUUID *string `json:"tenantMigrationUuid,omitempty"` - - // List of Services. - Services []*TenantMigrationService `json:"services"` -} - -// Validate validates this tenant migration result -func (m *TenantMigrationResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateServices(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantMigrationResult) validateServices(formats strfmt.Registry) error { - if swag.IsZero(m.Services) { // not required - return nil - } - - for i := 0; i < len(m.Services); i++ { - if swag.IsZero(m.Services[i]) { // not required - continue - } - - if m.Services[i] != nil { - if err := m.Services[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tenant migration result based on the context it is used -func (m *TenantMigrationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateServices(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantMigrationResult) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Services); i++ { - - if m.Services[i] != nil { - - if swag.IsZero(m.Services[i]) { // not required - return nil - } - - if err := m.Services[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("services" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantMigrationResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantMigrationResult) UnmarshalBinary(b []byte) error { - var res TenantMigrationResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_migration_service.go b/v2/models/tenant_migration_service.go deleted file mode 100644 index 6b99ee69..00000000 --- a/v2/models/tenant_migration_service.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TenantMigrationService Tenant -// -// Describes a cluser service participating in tenant migration. -// -// swagger:model TenantMigrationService -type TenantMigrationService struct { - - // Specifies the cluster service on which this action needs to be performed. - // Enum: ["kMagneto","kYoda","kIcebox"] - Service *string `json:"service,omitempty"` - - // List of Actions. - Actions []*TenantMigrationServiceAction `json:"actions"` -} - -// Validate validates this tenant migration service -func (m *TenantMigrationService) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateService(formats); err != nil { - res = append(res, err) - } - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantMigrationServiceTypeServicePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kMagneto","kYoda","kIcebox"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantMigrationServiceTypeServicePropEnum = append(tenantMigrationServiceTypeServicePropEnum, v) - } -} - -const ( - - // TenantMigrationServiceServiceKMagneto captures enum value "kMagneto" - TenantMigrationServiceServiceKMagneto string = "kMagneto" - - // TenantMigrationServiceServiceKYoda captures enum value "kYoda" - TenantMigrationServiceServiceKYoda string = "kYoda" - - // TenantMigrationServiceServiceKIcebox captures enum value "kIcebox" - TenantMigrationServiceServiceKIcebox string = "kIcebox" -) - -// prop value enum -func (m *TenantMigrationService) validateServiceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantMigrationServiceTypeServicePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantMigrationService) validateService(formats strfmt.Registry) error { - if swag.IsZero(m.Service) { // not required - return nil - } - - // value enum - if err := m.validateServiceEnum("service", "body", *m.Service); err != nil { - return err - } - - return nil -} - -func (m *TenantMigrationService) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - for i := 0; i < len(m.Actions); i++ { - if swag.IsZero(m.Actions[i]) { // not required - continue - } - - if m.Actions[i] != nil { - if err := m.Actions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this tenant migration service based on the context it is used -func (m *TenantMigrationService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantMigrationService) contextValidateActions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Actions); i++ { - - if m.Actions[i] != nil { - - if swag.IsZero(m.Actions[i]) { // not required - return nil - } - - if err := m.Actions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TenantMigrationService) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantMigrationService) UnmarshalBinary(b []byte) error { - var res TenantMigrationService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_migration_service_action.go b/v2/models/tenant_migration_service_action.go deleted file mode 100644 index 6a9160af..00000000 --- a/v2/models/tenant_migration_service_action.go +++ /dev/null @@ -1,229 +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" -) - -// TenantMigrationServiceAction Tenant -// -// Describes a tenant migration action status. -// -// swagger:model TenantMigrationServiceAction -type TenantMigrationServiceAction struct { - - // Specifies the action which will be performed on the tenant. - // Enum: ["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"] - Action *string `json:"action,omitempty"` - - // Action status - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // 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"` -} - -// Validate validates this tenant migration service action -func (m *TenantMigrationServiceAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantMigrationServiceActionTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["StartMigration","StopMigration","GetTenantMigrationServices","PreCheck","Import","Export","Quiesce","Unquiesce","MigrateMetadata","MigrateData","PurgeTenantData","ExportMetadataForValidation","ImportMetadataForValidation","ValidateMetadata","DisableInlineChanges","EnableInlineChanges"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantMigrationServiceActionTypeActionPropEnum = append(tenantMigrationServiceActionTypeActionPropEnum, v) - } -} - -const ( - - // TenantMigrationServiceActionActionStartMigration captures enum value "StartMigration" - TenantMigrationServiceActionActionStartMigration string = "StartMigration" - - // TenantMigrationServiceActionActionStopMigration captures enum value "StopMigration" - TenantMigrationServiceActionActionStopMigration string = "StopMigration" - - // TenantMigrationServiceActionActionGetTenantMigrationServices captures enum value "GetTenantMigrationServices" - TenantMigrationServiceActionActionGetTenantMigrationServices string = "GetTenantMigrationServices" - - // TenantMigrationServiceActionActionPreCheck captures enum value "PreCheck" - TenantMigrationServiceActionActionPreCheck string = "PreCheck" - - // TenantMigrationServiceActionActionImport captures enum value "Import" - TenantMigrationServiceActionActionImport string = "Import" - - // TenantMigrationServiceActionActionExport captures enum value "Export" - TenantMigrationServiceActionActionExport string = "Export" - - // TenantMigrationServiceActionActionQuiesce captures enum value "Quiesce" - TenantMigrationServiceActionActionQuiesce string = "Quiesce" - - // TenantMigrationServiceActionActionUnquiesce captures enum value "Unquiesce" - TenantMigrationServiceActionActionUnquiesce string = "Unquiesce" - - // TenantMigrationServiceActionActionMigrateMetadata captures enum value "MigrateMetadata" - TenantMigrationServiceActionActionMigrateMetadata string = "MigrateMetadata" - - // TenantMigrationServiceActionActionMigrateData captures enum value "MigrateData" - TenantMigrationServiceActionActionMigrateData string = "MigrateData" - - // TenantMigrationServiceActionActionPurgeTenantData captures enum value "PurgeTenantData" - TenantMigrationServiceActionActionPurgeTenantData string = "PurgeTenantData" - - // TenantMigrationServiceActionActionExportMetadataForValidation captures enum value "ExportMetadataForValidation" - TenantMigrationServiceActionActionExportMetadataForValidation string = "ExportMetadataForValidation" - - // TenantMigrationServiceActionActionImportMetadataForValidation captures enum value "ImportMetadataForValidation" - TenantMigrationServiceActionActionImportMetadataForValidation string = "ImportMetadataForValidation" - - // TenantMigrationServiceActionActionValidateMetadata captures enum value "ValidateMetadata" - TenantMigrationServiceActionActionValidateMetadata string = "ValidateMetadata" - - // TenantMigrationServiceActionActionDisableInlineChanges captures enum value "DisableInlineChanges" - TenantMigrationServiceActionActionDisableInlineChanges string = "DisableInlineChanges" - - // TenantMigrationServiceActionActionEnableInlineChanges captures enum value "EnableInlineChanges" - TenantMigrationServiceActionActionEnableInlineChanges string = "EnableInlineChanges" -) - -// prop value enum -func (m *TenantMigrationServiceAction) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantMigrationServiceActionTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantMigrationServiceAction) validateAction(formats strfmt.Registry) error { - if swag.IsZero(m.Action) { // not required - return nil - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -var tenantMigrationServiceActionTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantMigrationServiceActionTypeStatusPropEnum = append(tenantMigrationServiceActionTypeStatusPropEnum, v) - } -} - -const ( - - // TenantMigrationServiceActionStatusAccepted captures enum value "Accepted" - TenantMigrationServiceActionStatusAccepted string = "Accepted" - - // TenantMigrationServiceActionStatusRunning captures enum value "Running" - TenantMigrationServiceActionStatusRunning string = "Running" - - // TenantMigrationServiceActionStatusCanceled captures enum value "Canceled" - TenantMigrationServiceActionStatusCanceled string = "Canceled" - - // TenantMigrationServiceActionStatusCanceling captures enum value "Canceling" - TenantMigrationServiceActionStatusCanceling string = "Canceling" - - // TenantMigrationServiceActionStatusFailed captures enum value "Failed" - TenantMigrationServiceActionStatusFailed string = "Failed" - - // TenantMigrationServiceActionStatusMissed captures enum value "Missed" - TenantMigrationServiceActionStatusMissed string = "Missed" - - // TenantMigrationServiceActionStatusSucceeded captures enum value "Succeeded" - TenantMigrationServiceActionStatusSucceeded string = "Succeeded" - - // TenantMigrationServiceActionStatusSucceededWithWarning captures enum value "SucceededWithWarning" - TenantMigrationServiceActionStatusSucceededWithWarning string = "SucceededWithWarning" - - // TenantMigrationServiceActionStatusOnHold captures enum value "OnHold" - TenantMigrationServiceActionStatusOnHold string = "OnHold" - - // TenantMigrationServiceActionStatusFinalizing captures enum value "Finalizing" - TenantMigrationServiceActionStatusFinalizing string = "Finalizing" - - // TenantMigrationServiceActionStatusSkipped captures enum value "Skipped" - TenantMigrationServiceActionStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *TenantMigrationServiceAction) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantMigrationServiceActionTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantMigrationServiceAction) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant migration service action based on context it is used -func (m *TenantMigrationServiceAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantMigrationServiceAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantMigrationServiceAction) UnmarshalBinary(b []byte) error { - var res TenantMigrationServiceAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_network.go b/v2/models/tenant_network.go deleted file mode 100644 index fb38f0a2..00000000 --- a/v2/models/tenant_network.go +++ /dev/null @@ -1,84 +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" -) - -// TenantNetwork TenantNetwork -// -// Networking information about a Tenant on a Cluster. -// -// swagger:model TenantNetwork -type TenantNetwork struct { - - // Whether connector (hybrid extender) is enabled. - // Required: true - ConnectorEnabled *bool `json:"connectorEnabled"` - - // The hostname for Cohesity cluster as seen by tenants and as is routable - // from the tenant's network. Tenant's VLAN's hostname, if available can be - // used instead but it is mandatory to provide this value if there's no VLAN - // hostname to use. Also, when set, this field would take precedence over - // VLAN hostname. - ClusterHostname *string `json:"clusterHostname,omitempty"` - - // Set of IPs as seen from the tenant's network for the Cohesity cluster. - // Only one from 'clusterHostname' and 'clusterIps' is needed. - ClusterIps []string `json:"clusterIps"` -} - -// Validate validates this tenant network -func (m *TenantNetwork) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectorEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TenantNetwork) validateConnectorEnabled(formats strfmt.Registry) error { - - if err := validate.Required("connectorEnabled", "body", m.ConnectorEnabled); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant network based on context it is used -func (m *TenantNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantNetwork) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantNetwork) UnmarshalBinary(b []byte) error { - var res TenantNetwork - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenant_status.go b/v2/models/tenant_status.go deleted file mode 100644 index 1ed43a7c..00000000 --- a/v2/models/tenant_status.go +++ /dev/null @@ -1,113 +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" -) - -// TenantStatus Tenant Status -// -// Describes the status of a Tenant on a Cluster or Helios. -// -// swagger:model TenantStatus -type TenantStatus struct { - - // Specifies the Tenant status - // Enum: ["Active","Inactive","MarkedForDeletion","Deleted"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this tenant status -func (m *TenantStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tenantStatusTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Active","Inactive","MarkedForDeletion","Deleted"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tenantStatusTypeEnumPropEnum = append(tenantStatusTypeEnumPropEnum, v) - } -} - -const ( - - // TenantStatusEnumActive captures enum value "Active" - TenantStatusEnumActive string = "Active" - - // TenantStatusEnumInactive captures enum value "Inactive" - TenantStatusEnumInactive string = "Inactive" - - // TenantStatusEnumMarkedForDeletion captures enum value "MarkedForDeletion" - TenantStatusEnumMarkedForDeletion string = "MarkedForDeletion" - - // TenantStatusEnumDeleted captures enum value "Deleted" - TenantStatusEnumDeleted string = "Deleted" -) - -// prop value enum -func (m *TenantStatus) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tenantStatusTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TenantStatus) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tenant status based on context it is used -func (m *TenantStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TenantStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TenantStatus) UnmarshalBinary(b []byte) error { - var res TenantStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tenants_info.go b/v2/models/tenants_info.go deleted file mode 100644 index b7a6279c..00000000 --- a/v2/models/tenants_info.go +++ /dev/null @@ -1,80 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TenantsInfo Tenants -// -// A List of tenants. -// -// swagger:model TenantsInfo -type TenantsInfo []*TenantInfo - -// Validate validates this tenants info -func (m TenantsInfo) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this tenants info based on the context it is used -func (m TenantsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/test_smtp_config.go b/v2/models/test_smtp_config.go deleted file mode 100644 index e0ab0736..00000000 --- a/v2/models/test_smtp_config.go +++ /dev/null @@ -1,71 +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" -) - -// TestSMTPConfig Specifies a request body to send a test email and validate SMTP configuration. Ensure SMTP is configured on the cluster and that it is not disabled. -// -// swagger:model TestSMTPConfig -type TestSMTPConfig struct { - - // Specifies the recipient's email address. - // Required: true - Email string `json:"email"` -} - -// Validate validates this test SMTP config -func (m *TestSMTPConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEmail(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TestSMTPConfig) validateEmail(formats strfmt.Registry) error { - - if err := validate.RequiredString("email", "body", m.Email); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this test SMTP config based on context it is used -func (m *TestSMTPConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TestSMTPConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TestSMTPConfig) UnmarshalBinary(b []byte) error { - var res TestSMTPConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/throttling_params.go b/v2/models/throttling_params.go deleted file mode 100644 index d0bb6127..00000000 --- a/v2/models/throttling_params.go +++ /dev/null @@ -1,132 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ThrottlingParams Throttling Params. -// -// Specifies throttling params. -// -// swagger:model ThrottlingParams -type ThrottlingParams struct { - - // If the latency of a datastore is above this value, then a new backup task that uses the datastore won't be started. - NewTaskLatencyThresholdMsecs *int64 `json:"newTaskLatencyThresholdMsecs,omitempty"` - - // If the latency of a datastore is above this value, then an existing backup task that uses the datastore will start getting throttled. - ActiveTaskLatencyThresholdMsecs *int64 `json:"activeTaskLatencyThresholdMsecs,omitempty"` - - // If this value is > 0 and the number of streams concurrently active on a datastore is equal to it, then any further requests to access the datastore would be denied until the number of active streams reduces. This applies for all the datastores in the specified host. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - // Specifies datastore specific parameters. - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` -} - -// Validate validates this throttling params -func (m *ThrottlingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataStoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingParams) validateDataStoreParams(formats strfmt.Registry) error { - if swag.IsZero(m.DataStoreParams) { // not required - return nil - } - - for i := 0; i < len(m.DataStoreParams); i++ { - if swag.IsZero(m.DataStoreParams[i]) { // not required - continue - } - - if m.DataStoreParams[i] != nil { - if err := m.DataStoreParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this throttling params based on the context it is used -func (m *ThrottlingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataStoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ThrottlingParams) contextValidateDataStoreParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataStoreParams); i++ { - - if m.DataStoreParams[i] != nil { - - if swag.IsZero(m.DataStoreParams[i]) { // not required - return nil - } - - if err := m.DataStoreParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ThrottlingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ThrottlingParams) UnmarshalBinary(b []byte) error { - var res ThrottlingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tier_level_settings.go b/v2/models/tier_level_settings.go deleted file mode 100644 index 3350ebd5..00000000 --- a/v2/models/tier_level_settings.go +++ /dev/null @@ -1,322 +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" -) - -// TierLevelSettings Specifies the settings tier levels configured with each archival target. The tier settings need to be applied in specific order and default tier should always be passed as first entry in tiers array. The following example illustrates how to configure tiering input for AWS tiering. Same type of input structure applied to other cloud platforms also.
If user wants to achieve following tiering for backup,
User Desired Tiering-
1.Archive Full back up for 12 Months
2.Tier Levels
[1,12] [
s3 (1 to 2 months), (default tier)
s3 Intelligent tiering (3 to 6 months),
s3 One Zone (7 to 9 months)
Glacier (10 to 12 months)]
API Input
1.tiers-[
{'tierType': 'S3','moveAfterUnit':'months',
'moveAfter':2 - move from s3 to s3Inte after 2 months},
{'tierType': 'S3Inte','moveAfterUnit':'months',
'moveAfter':4 - move from S3Inte to Glacier after 4 months},
{'tierType': 'Glacier', 'moveAfterUnit':'months',
'moveAfter': 3 - move from Glacier to S3 One Zone after 3 months },
{'tierType': 'S3 One Zone', 'moveAfterUnit': nil,
'moveAfter': nil - For the last record, 'moveAfter' and 'moveAfterUnit'
will be ignored since there are no further tier for data movement }
}] -// -// swagger:model TierLevelSettings -type TierLevelSettings struct { - - // Specifies the cloud platform to enable tiering. - // Required: true - // Enum: ["AWS","Azure","Oracle","Google"] - CloudPlatform *string `json:"cloudPlatform"` - - // Specifies the settings for AWS Tiers. - AwsTiering *AWSTiers `json:"awsTiering,omitempty"` - - // Specifies the settings for Azure Tiers. - AzureTiering *AzureTiers `json:"azureTiering,omitempty"` - - // Specifies the settings for Google Tiers. - GoogleTiering *GoogleTiers `json:"googleTiering,omitempty"` - - // Specifies the settings for Oracle Tiers. - OracleTiering *OracleTiers `json:"oracleTiering,omitempty"` -} - -// Validate validates this tier level settings -func (m *TierLevelSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCloudPlatform(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogleTiering(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleTiering(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tierLevelSettingsTypeCloudPlatformPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AWS","Azure","Oracle","Google"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tierLevelSettingsTypeCloudPlatformPropEnum = append(tierLevelSettingsTypeCloudPlatformPropEnum, v) - } -} - -const ( - - // TierLevelSettingsCloudPlatformAWS captures enum value "AWS" - TierLevelSettingsCloudPlatformAWS string = "AWS" - - // TierLevelSettingsCloudPlatformAzure captures enum value "Azure" - TierLevelSettingsCloudPlatformAzure string = "Azure" - - // TierLevelSettingsCloudPlatformOracle captures enum value "Oracle" - TierLevelSettingsCloudPlatformOracle string = "Oracle" - - // TierLevelSettingsCloudPlatformGoogle captures enum value "Google" - TierLevelSettingsCloudPlatformGoogle string = "Google" -) - -// prop value enum -func (m *TierLevelSettings) validateCloudPlatformEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tierLevelSettingsTypeCloudPlatformPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TierLevelSettings) validateCloudPlatform(formats strfmt.Registry) error { - - if err := validate.Required("cloudPlatform", "body", m.CloudPlatform); err != nil { - return err - } - - // value enum - if err := m.validateCloudPlatformEnum("cloudPlatform", "body", *m.CloudPlatform); err != nil { - return err - } - - return nil -} - -func (m *TierLevelSettings) validateAwsTiering(formats strfmt.Registry) error { - if swag.IsZero(m.AwsTiering) { // not required - return nil - } - - if m.AwsTiering != nil { - if err := m.AwsTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) validateAzureTiering(formats strfmt.Registry) error { - if swag.IsZero(m.AzureTiering) { // not required - return nil - } - - if m.AzureTiering != nil { - if err := m.AzureTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) validateGoogleTiering(formats strfmt.Registry) error { - if swag.IsZero(m.GoogleTiering) { // not required - return nil - } - - if m.GoogleTiering != nil { - if err := m.GoogleTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) validateOracleTiering(formats strfmt.Registry) error { - if swag.IsZero(m.OracleTiering) { // not required - return nil - } - - if m.OracleTiering != nil { - if err := m.OracleTiering.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTiering") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tier level settings based on the context it is used -func (m *TierLevelSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogleTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleTiering(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TierLevelSettings) contextValidateAwsTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsTiering != nil { - - if swag.IsZero(m.AwsTiering) { // not required - return nil - } - - if err := m.AwsTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) contextValidateAzureTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureTiering != nil { - - if swag.IsZero(m.AzureTiering) { // not required - return nil - } - - if err := m.AzureTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) contextValidateGoogleTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.GoogleTiering != nil { - - if swag.IsZero(m.GoogleTiering) { // not required - return nil - } - - if err := m.GoogleTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleTiering") - } - return err - } - } - - return nil -} - -func (m *TierLevelSettings) contextValidateOracleTiering(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleTiering != nil { - - if swag.IsZero(m.OracleTiering) { // not required - return nil - } - - if err := m.OracleTiering.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleTiering") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleTiering") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TierLevelSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TierLevelSettings) UnmarshalBinary(b []byte) error { - var res TierLevelSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_aws_external_target_params.go b/v2/models/tiering_aws_external_target_params.go deleted file mode 100644 index d754fdbc..00000000 --- a/v2/models/tiering_aws_external_target_params.go +++ /dev/null @@ -1,228 +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" -) - -// TieringAwsExternalTargetParams AWS External Target Request Params for tiering purpose type. -// -// Specifies the common parameters which are specific to AWS related External Targets. -// -// swagger:model TieringAwsExternalTargetParams -type TieringAwsExternalTargetParams struct { - CommonTieringAwsExternalTargetParams - - // aws s3 standard params - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - // aws s3 intelligent params - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringAwsExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTieringAwsExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTieringAwsExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AwsS3StandardParams = dataAO1.AwsS3StandardParams - - m.AwsS3IntelligentParams = dataAO1.AwsS3IntelligentParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringAwsExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTieringAwsExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AwsS3StandardParams *AwsS3StandardParams `json:"awsS3StandardParams,omitempty"` - - AwsS3IntelligentParams *AwsS3IntelligentParams `json:"awsS3IntelligentParams,omitempty"` - } - - dataAO1.AwsS3StandardParams = m.AwsS3StandardParams - - dataAO1.AwsS3IntelligentParams = m.AwsS3IntelligentParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering aws external target params -func (m *TieringAwsExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringAwsExternalTargetParams - if err := m.CommonTieringAwsExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3StandardParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsS3IntelligentParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringAwsExternalTargetParams) validateAwsS3StandardParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3StandardParams) { // not required - return nil - } - - if m.AwsS3StandardParams != nil { - if err := m.AwsS3StandardParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardParams") - } - return err - } - } - - return nil -} - -func (m *TieringAwsExternalTargetParams) validateAwsS3IntelligentParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsS3IntelligentParams) { // not required - return nil - } - - if m.AwsS3IntelligentParams != nil { - if err := m.AwsS3IntelligentParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3IntelligentParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3IntelligentParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tiering aws external target params based on the context it is used -func (m *TieringAwsExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringAwsExternalTargetParams - if err := m.CommonTieringAwsExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3StandardParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsS3IntelligentParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringAwsExternalTargetParams) contextValidateAwsS3StandardParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3StandardParams != nil { - - if swag.IsZero(m.AwsS3StandardParams) { // not required - return nil - } - - if err := m.AwsS3StandardParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3StandardParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3StandardParams") - } - return err - } - } - - return nil -} - -func (m *TieringAwsExternalTargetParams) contextValidateAwsS3IntelligentParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsS3IntelligentParams != nil { - - if swag.IsZero(m.AwsS3IntelligentParams) { // not required - return nil - } - - if err := m.AwsS3IntelligentParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsS3IntelligentParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsS3IntelligentParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TieringAwsExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringAwsExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringAwsExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_azure_external_target_params.go b/v2/models/tiering_azure_external_target_params.go deleted file mode 100644 index c49ebe6f..00000000 --- a/v2/models/tiering_azure_external_target_params.go +++ /dev/null @@ -1,168 +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" -) - -// TieringAzureExternalTargetParams Azure External Target Request Params for tiering purpose type. -// -// Specifies the common parameters which are specific to Azure related External Targets. -// -// swagger:model TieringAzureExternalTargetParams -type TieringAzureExternalTargetParams struct { - CommonTieringAzureExternalTargetParams - - // hot blob params - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringAzureExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTieringAzureExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTieringAzureExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.HotBlobParams = dataAO1.HotBlobParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringAzureExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTieringAzureExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - HotBlobParams *AzureHotBlobParams `json:"hotBlobParams,omitempty"` - } - - dataAO1.HotBlobParams = m.HotBlobParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering azure external target params -func (m *TieringAzureExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringAzureExternalTargetParams - if err := m.CommonTieringAzureExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHotBlobParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringAzureExternalTargetParams) validateHotBlobParams(formats strfmt.Registry) error { - - if swag.IsZero(m.HotBlobParams) { // not required - return nil - } - - if m.HotBlobParams != nil { - if err := m.HotBlobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hotBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hotBlobParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tiering azure external target params based on the context it is used -func (m *TieringAzureExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringAzureExternalTargetParams - if err := m.CommonTieringAzureExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHotBlobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringAzureExternalTargetParams) contextValidateHotBlobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.HotBlobParams != nil { - - if swag.IsZero(m.HotBlobParams) { // not required - return nil - } - - if err := m.HotBlobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hotBlobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hotBlobParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TieringAzureExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringAzureExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringAzureExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_bandwidth_settings.go b/v2/models/tiering_bandwidth_settings.go deleted file mode 100644 index ef81cebb..00000000 --- a/v2/models/tiering_bandwidth_settings.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" -) - -// TieringBandwidthSettings Tiering Bandwidth Settings -// -// Specifies the global bandwidth setting of the Tiering External Target. -// -// swagger:model TieringBandwidthSettings -type TieringBandwidthSettings struct { - CommonBandwidthSettings -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringBandwidthSettings) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonBandwidthSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonBandwidthSettings = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringBandwidthSettings) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonBandwidthSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering bandwidth settings -func (m *TieringBandwidthSettings) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBandwidthSettings - if err := m.CommonBandwidthSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this tiering bandwidth settings based on the context it is used -func (m *TieringBandwidthSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonBandwidthSettings - if err := m.CommonBandwidthSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TieringBandwidthSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringBandwidthSettings) UnmarshalBinary(b []byte) error { - var res TieringBandwidthSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_cloud_platforms.go b/v2/models/tiering_cloud_platforms.go deleted file mode 100644 index 4db9e005..00000000 --- a/v2/models/tiering_cloud_platforms.go +++ /dev/null @@ -1,113 +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" -) - -// TieringCloudPlatforms Tiering Cloud Platforms. -// -// Tiering Cloud Platforms. -// -// swagger:model TieringCloudPlatforms -type TieringCloudPlatforms struct { - - // Tiering Cloud Platforms. - // Enum: ["AWS","Azure","Oracle","Google"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tiering cloud platforms -func (m *TieringCloudPlatforms) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringCloudPlatformsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AWS","Azure","Oracle","Google"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringCloudPlatformsTypeTypePropEnum = append(tieringCloudPlatformsTypeTypePropEnum, v) - } -} - -const ( - - // TieringCloudPlatformsTypeAWS captures enum value "AWS" - TieringCloudPlatformsTypeAWS string = "AWS" - - // TieringCloudPlatformsTypeAzure captures enum value "Azure" - TieringCloudPlatformsTypeAzure string = "Azure" - - // TieringCloudPlatformsTypeOracle captures enum value "Oracle" - TieringCloudPlatformsTypeOracle string = "Oracle" - - // TieringCloudPlatformsTypeGoogle captures enum value "Google" - TieringCloudPlatformsTypeGoogle string = "Google" -) - -// prop value enum -func (m *TieringCloudPlatforms) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringCloudPlatformsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringCloudPlatforms) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tiering cloud platforms based on context it is used -func (m *TieringCloudPlatforms) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringCloudPlatforms) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringCloudPlatforms) UnmarshalBinary(b []byte) error { - var res TieringCloudPlatforms - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_external_target_params.go b/v2/models/tiering_external_target_params.go deleted file mode 100644 index 8ccfdd09..00000000 --- a/v2/models/tiering_external_target_params.go +++ /dev/null @@ -1,406 +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" -) - -// TieringExternalTargetParams Specifies the parameters which are specific to Tiering purpose type External Targets. -// -// swagger:model TieringExternalTargetParams -type TieringExternalTargetParams struct { - CommonTieringExternalTargetParams - - // azure params - AzureParams *TieringAzureExternalTargetParams `json:"azureParams,omitempty"` - - // gcp params - GcpParams *TieringGcpExternalTargetParams `json:"gcpParams,omitempty"` - - // aws params - AwsParams *TieringAwsExternalTargetParams `json:"awsParams,omitempty"` - - // oracle params - OracleParams *TieringOracleExternalTargetParams `json:"oracleParams,omitempty"` - - // s3 comp params - S3CompParams *TieringS3CompExternalTargetParams `json:"s3CompParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTieringExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTieringExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - AzureParams *TieringAzureExternalTargetParams `json:"azureParams,omitempty"` - - GcpParams *TieringGcpExternalTargetParams `json:"gcpParams,omitempty"` - - AwsParams *TieringAwsExternalTargetParams `json:"awsParams,omitempty"` - - OracleParams *TieringOracleExternalTargetParams `json:"oracleParams,omitempty"` - - S3CompParams *TieringS3CompExternalTargetParams `json:"s3CompParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.AzureParams = dataAO1.AzureParams - - m.GcpParams = dataAO1.GcpParams - - m.AwsParams = dataAO1.AwsParams - - m.OracleParams = dataAO1.OracleParams - - m.S3CompParams = dataAO1.S3CompParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonTieringExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - AzureParams *TieringAzureExternalTargetParams `json:"azureParams,omitempty"` - - GcpParams *TieringGcpExternalTargetParams `json:"gcpParams,omitempty"` - - AwsParams *TieringAwsExternalTargetParams `json:"awsParams,omitempty"` - - OracleParams *TieringOracleExternalTargetParams `json:"oracleParams,omitempty"` - - S3CompParams *TieringS3CompExternalTargetParams `json:"s3CompParams,omitempty"` - } - - dataAO1.AzureParams = m.AzureParams - - dataAO1.GcpParams = m.GcpParams - - dataAO1.AwsParams = m.AwsParams - - dataAO1.OracleParams = m.OracleParams - - dataAO1.S3CompParams = m.S3CompParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering external target params -func (m *TieringExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringExternalTargetParams - if err := m.CommonTieringExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGcpParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAwsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOracleParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3CompParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringExternalTargetParams) validateAzureParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if m.AzureParams != nil { - if err := m.AzureParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) validateGcpParams(formats strfmt.Registry) error { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if m.GcpParams != nil { - if err := m.GcpParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) validateAwsParams(formats strfmt.Registry) error { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if m.AwsParams != nil { - if err := m.AwsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) validateOracleParams(formats strfmt.Registry) error { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if m.OracleParams != nil { - if err := m.OracleParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) validateS3CompParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3CompParams) { // not required - return nil - } - - if m.S3CompParams != nil { - if err := m.S3CompParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this tiering external target params based on the context it is used -func (m *TieringExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTieringExternalTargetParams - if err := m.CommonTieringExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGcpParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAwsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOracleParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3CompParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringExternalTargetParams) contextValidateAzureParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureParams != nil { - - if swag.IsZero(m.AzureParams) { // not required - return nil - } - - if err := m.AzureParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) contextValidateGcpParams(ctx context.Context, formats strfmt.Registry) error { - - if m.GcpParams != nil { - - if swag.IsZero(m.GcpParams) { // not required - return nil - } - - if err := m.GcpParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) contextValidateAwsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsParams != nil { - - if swag.IsZero(m.AwsParams) { // not required - return nil - } - - if err := m.AwsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) contextValidateOracleParams(ctx context.Context, formats strfmt.Registry) error { - - if m.OracleParams != nil { - - if swag.IsZero(m.OracleParams) { // not required - return nil - } - - if err := m.OracleParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleParams") - } - return err - } - } - - return nil -} - -func (m *TieringExternalTargetParams) contextValidateS3CompParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3CompParams != nil { - - if swag.IsZero(m.S3CompParams) { // not required - return nil - } - - if err := m.S3CompParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3CompParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3CompParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TieringExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_gcp_external_target_params.go b/v2/models/tiering_gcp_external_target_params.go deleted file mode 100644 index 1db0246f..00000000 --- a/v2/models/tiering_gcp_external_target_params.go +++ /dev/null @@ -1,161 +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" -) - -// TieringGcpExternalTargetParams GCP Tiering External Target Request Common Params for tiering purpose type. -// -// Specifies the parameters which are specific to GCP related External Targets of tiering purpose type. -// -// swagger:model TieringGcpExternalTargetParams -type TieringGcpExternalTargetParams struct { - CommonGcpExternalTargetParams - - // Specifies the GCP External Target class. - // Required: true - // Enum: ["GCPStandard"] - StorageClass *string `json:"storageClass"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringGcpExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonGcpExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonGcpExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringGcpExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonGcpExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - - dataAO1.StorageClass = m.StorageClass - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering gcp external target params -func (m *TieringGcpExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonGcpExternalTargetParams - if err := m.CommonGcpExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringGcpExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["GCPStandard"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringGcpExternalTargetParamsTypeStorageClassPropEnum = append(tieringGcpExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *TieringGcpExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringGcpExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringGcpExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this tiering gcp external target params based on the context it is used -func (m *TieringGcpExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonGcpExternalTargetParams - if err := m.CommonGcpExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TieringGcpExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringGcpExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringGcpExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_info.go b/v2/models/tiering_info.go deleted file mode 100644 index abfcd2f5..00000000 --- a/v2/models/tiering_info.go +++ /dev/null @@ -1,251 +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" -) - -// TieringInfo Specifies the data tiering task details. -// -// swagger:model TieringInfo -type TieringInfo struct { - - // Specifies the progress of data tiering task. - Progress *ProgressSummary `json:"progress,omitempty"` - - // Status of the analysis run. - // '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. - // 'OnHold' indicates that the run has On hold. - // 'Skipped' indicates that the run was skipped. - // Enum: ["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"] - Status *string `json:"status,omitempty"` - - // Specifies the stats of data tiering task. - Stats *DataTieringTaskStats `json:"stats,omitempty"` -} - -// Validate validates this tiering info -func (m *TieringInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringInfo) validateProgress(formats strfmt.Registry) error { - if swag.IsZero(m.Progress) { // not required - return nil - } - - if m.Progress != nil { - if err := m.Progress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -var tieringInfoTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Accepted","Running","Canceled","Canceling","Failed","Missed","Succeeded","SucceededWithWarning","OnHold","Finalizing","Skipped"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringInfoTypeStatusPropEnum = append(tieringInfoTypeStatusPropEnum, v) - } -} - -const ( - - // TieringInfoStatusAccepted captures enum value "Accepted" - TieringInfoStatusAccepted string = "Accepted" - - // TieringInfoStatusRunning captures enum value "Running" - TieringInfoStatusRunning string = "Running" - - // TieringInfoStatusCanceled captures enum value "Canceled" - TieringInfoStatusCanceled string = "Canceled" - - // TieringInfoStatusCanceling captures enum value "Canceling" - TieringInfoStatusCanceling string = "Canceling" - - // TieringInfoStatusFailed captures enum value "Failed" - TieringInfoStatusFailed string = "Failed" - - // TieringInfoStatusMissed captures enum value "Missed" - TieringInfoStatusMissed string = "Missed" - - // TieringInfoStatusSucceeded captures enum value "Succeeded" - TieringInfoStatusSucceeded string = "Succeeded" - - // TieringInfoStatusSucceededWithWarning captures enum value "SucceededWithWarning" - TieringInfoStatusSucceededWithWarning string = "SucceededWithWarning" - - // TieringInfoStatusOnHold captures enum value "OnHold" - TieringInfoStatusOnHold string = "OnHold" - - // TieringInfoStatusFinalizing captures enum value "Finalizing" - TieringInfoStatusFinalizing string = "Finalizing" - - // TieringInfoStatusSkipped captures enum value "Skipped" - TieringInfoStatusSkipped string = "Skipped" -) - -// prop value enum -func (m *TieringInfo) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringInfoTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringInfo) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -func (m *TieringInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - 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 -} - -// ContextValidate validate this tiering info based on the context it is used -func (m *TieringInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProgress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TieringInfo) contextValidateProgress(ctx context.Context, formats strfmt.Registry) error { - - if m.Progress != nil { - - if swag.IsZero(m.Progress) { // not required - return nil - } - - if err := m.Progress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("progress") - } - return err - } - } - - return nil -} - -func (m *TieringInfo) 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 -} - -// MarshalBinary interface implementation -func (m *TieringInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringInfo) UnmarshalBinary(b []byte) error { - var res TieringInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_levels.go b/v2/models/tiering_levels.go deleted file mode 100644 index dd2da691..00000000 --- a/v2/models/tiering_levels.go +++ /dev/null @@ -1,149 +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" -) - -// TieringLevels Tiering Levels. -// -// # Tiering Levels -// -// swagger:model TieringLevels -type TieringLevels struct { - - // Tiering Levels - // Enum: ["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAzureTierHot","kAzureTierCool","kAzureTierArchive","kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline","kOracleTierStandard","kOracleTierArchive"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tiering levels -func (m *TieringLevels) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringLevelsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kAmazonS3Standard","kAmazonS3StandardIA","kAmazonS3OneZoneIA","kAmazonS3IntelligentTiering","kAmazonS3Glacier","kAmazonS3GlacierDeepArchive","kAzureTierHot","kAzureTierCool","kAzureTierArchive","kGoogleStandard","kGoogleRegional","kGoogleMultiRegional","kGoogleNearline","kGoogleColdline","kOracleTierStandard","kOracleTierArchive"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringLevelsTypeTypePropEnum = append(tieringLevelsTypeTypePropEnum, v) - } -} - -const ( - - // TieringLevelsTypeKAmazonS3Standard captures enum value "kAmazonS3Standard" - TieringLevelsTypeKAmazonS3Standard string = "kAmazonS3Standard" - - // TieringLevelsTypeKAmazonS3StandardIA captures enum value "kAmazonS3StandardIA" - TieringLevelsTypeKAmazonS3StandardIA string = "kAmazonS3StandardIA" - - // TieringLevelsTypeKAmazonS3OneZoneIA captures enum value "kAmazonS3OneZoneIA" - TieringLevelsTypeKAmazonS3OneZoneIA string = "kAmazonS3OneZoneIA" - - // TieringLevelsTypeKAmazonS3IntelligentTiering captures enum value "kAmazonS3IntelligentTiering" - TieringLevelsTypeKAmazonS3IntelligentTiering string = "kAmazonS3IntelligentTiering" - - // TieringLevelsTypeKAmazonS3Glacier captures enum value "kAmazonS3Glacier" - TieringLevelsTypeKAmazonS3Glacier string = "kAmazonS3Glacier" - - // TieringLevelsTypeKAmazonS3GlacierDeepArchive captures enum value "kAmazonS3GlacierDeepArchive" - TieringLevelsTypeKAmazonS3GlacierDeepArchive string = "kAmazonS3GlacierDeepArchive" - - // TieringLevelsTypeKAzureTierHot captures enum value "kAzureTierHot" - TieringLevelsTypeKAzureTierHot string = "kAzureTierHot" - - // TieringLevelsTypeKAzureTierCool captures enum value "kAzureTierCool" - TieringLevelsTypeKAzureTierCool string = "kAzureTierCool" - - // TieringLevelsTypeKAzureTierArchive captures enum value "kAzureTierArchive" - TieringLevelsTypeKAzureTierArchive string = "kAzureTierArchive" - - // TieringLevelsTypeKGoogleStandard captures enum value "kGoogleStandard" - TieringLevelsTypeKGoogleStandard string = "kGoogleStandard" - - // TieringLevelsTypeKGoogleRegional captures enum value "kGoogleRegional" - TieringLevelsTypeKGoogleRegional string = "kGoogleRegional" - - // TieringLevelsTypeKGoogleMultiRegional captures enum value "kGoogleMultiRegional" - TieringLevelsTypeKGoogleMultiRegional string = "kGoogleMultiRegional" - - // TieringLevelsTypeKGoogleNearline captures enum value "kGoogleNearline" - TieringLevelsTypeKGoogleNearline string = "kGoogleNearline" - - // TieringLevelsTypeKGoogleColdline captures enum value "kGoogleColdline" - TieringLevelsTypeKGoogleColdline string = "kGoogleColdline" - - // TieringLevelsTypeKOracleTierStandard captures enum value "kOracleTierStandard" - TieringLevelsTypeKOracleTierStandard string = "kOracleTierStandard" - - // TieringLevelsTypeKOracleTierArchive captures enum value "kOracleTierArchive" - TieringLevelsTypeKOracleTierArchive string = "kOracleTierArchive" -) - -// prop value enum -func (m *TieringLevels) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringLevelsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringLevels) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tiering levels based on context it is used -func (m *TieringLevels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringLevels) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringLevels) UnmarshalBinary(b []byte) error { - var res TieringLevels - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_oracle_external_target_params.go b/v2/models/tiering_oracle_external_target_params.go deleted file mode 100644 index c938450e..00000000 --- a/v2/models/tiering_oracle_external_target_params.go +++ /dev/null @@ -1,161 +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" -) - -// TieringOracleExternalTargetParams Oracle External Target Request Params for tiering purpose type. -// -// Specifies the common parameters which are specific to Oracle related External Targets. -// -// swagger:model TieringOracleExternalTargetParams -type TieringOracleExternalTargetParams struct { - CommonOracleExternalTargetParams - - // Specifies the Oracle External Target class. - // Required: true - // Enum: ["OracleObjectStorage"] - StorageClass *string `json:"storageClass"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringOracleExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonOracleExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonOracleExternalTargetParams = aO0 - - // AO1 - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.StorageClass = dataAO1.StorageClass - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringOracleExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonOracleExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - StorageClass *string `json:"storageClass"` - } - - dataAO1.StorageClass = m.StorageClass - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering oracle external target params -func (m *TieringOracleExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleExternalTargetParams - if err := m.CommonOracleExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageClass(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringOracleExternalTargetParamsTypeStorageClassPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OracleObjectStorage"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringOracleExternalTargetParamsTypeStorageClassPropEnum = append(tieringOracleExternalTargetParamsTypeStorageClassPropEnum, v) - } -} - -// property enum -func (m *TieringOracleExternalTargetParams) validateStorageClassEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringOracleExternalTargetParamsTypeStorageClassPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringOracleExternalTargetParams) validateStorageClass(formats strfmt.Registry) error { - - if err := validate.Required("storageClass", "body", m.StorageClass); err != nil { - return err - } - - // value enum - if err := m.validateStorageClassEnum("storageClass", "body", *m.StorageClass); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this tiering oracle external target params based on the context it is used -func (m *TieringOracleExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonOracleExternalTargetParams - if err := m.CommonOracleExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TieringOracleExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringOracleExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringOracleExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_s3_comp_external_target_params.go b/v2/models/tiering_s3_comp_external_target_params.go deleted file mode 100644 index db981c89..00000000 --- a/v2/models/tiering_s3_comp_external_target_params.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" -) - -// TieringS3CompExternalTargetParams S3 Compatible Tiering External Target Request Common Params for tiering purpose type. -// -// Specifies the parameters which are specific to S3 Compatible related External Targets of tiering purpose type. -// -// swagger:model TieringS3CompExternalTargetParams -type TieringS3CompExternalTargetParams struct { - CommonS3CompExternalTargetParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TieringS3CompExternalTargetParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonS3CompExternalTargetParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonS3CompExternalTargetParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TieringS3CompExternalTargetParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonS3CompExternalTargetParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this tiering s3 comp external target params -func (m *TieringS3CompExternalTargetParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonS3CompExternalTargetParams - if err := m.CommonS3CompExternalTargetParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this tiering s3 comp external target params based on the context it is used -func (m *TieringS3CompExternalTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonS3CompExternalTargetParams - if err := m.CommonS3CompExternalTargetParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TieringS3CompExternalTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringS3CompExternalTargetParams) UnmarshalBinary(b []byte) error { - var res TieringS3CompExternalTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_target_storage_type.go b/v2/models/tiering_target_storage_type.go deleted file mode 100644 index c018386d..00000000 --- a/v2/models/tiering_target_storage_type.go +++ /dev/null @@ -1,116 +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" -) - -// TieringTargetStorageType Tiering Target Storage Type -// -// Specifies the storage type of External Target of tiering purpose type. -// -// swagger:model TieringTargetStorageType -type TieringTargetStorageType struct { - - // Specifies the storage type of External Target of tiering purpose type. - // Enum: ["Azure","Google","AWS","Oracle","S3Compatible"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this tiering target storage type -func (m *TieringTargetStorageType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringTargetStorageTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Azure","Google","AWS","Oracle","S3Compatible"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringTargetStorageTypeTypeEnumPropEnum = append(tieringTargetStorageTypeTypeEnumPropEnum, v) - } -} - -const ( - - // TieringTargetStorageTypeEnumAzure captures enum value "Azure" - TieringTargetStorageTypeEnumAzure string = "Azure" - - // TieringTargetStorageTypeEnumGoogle captures enum value "Google" - TieringTargetStorageTypeEnumGoogle string = "Google" - - // TieringTargetStorageTypeEnumAWS captures enum value "AWS" - TieringTargetStorageTypeEnumAWS string = "AWS" - - // TieringTargetStorageTypeEnumOracle captures enum value "Oracle" - TieringTargetStorageTypeEnumOracle string = "Oracle" - - // TieringTargetStorageTypeEnumS3Compatible captures enum value "S3Compatible" - TieringTargetStorageTypeEnumS3Compatible string = "S3Compatible" -) - -// prop value enum -func (m *TieringTargetStorageType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringTargetStorageTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringTargetStorageType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tiering target storage type based on context it is used -func (m *TieringTargetStorageType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringTargetStorageType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringTargetStorageType) UnmarshalBinary(b []byte) error { - var res TieringTargetStorageType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/tiering_type.go b/v2/models/tiering_type.go deleted file mode 100644 index e495df21..00000000 --- a/v2/models/tiering_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TieringType Data tiering task type. -// -// Data tiering task type. -// -// swagger:model TieringType -type TieringType struct { - - // Specifies the data tiering task type. - // Enum: ["Downtier","Uptier"] - Type string `json:"type,omitempty"` -} - -// Validate validates this tiering type -func (m *TieringType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var tieringTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Downtier","Uptier"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - tieringTypeTypeTypePropEnum = append(tieringTypeTypeTypePropEnum, v) - } -} - -const ( - - // TieringTypeTypeDowntier captures enum value "Downtier" - TieringTypeTypeDowntier string = "Downtier" - - // TieringTypeTypeUptier captures enum value "Uptier" - TieringTypeTypeUptier string = "Uptier" -) - -// prop value enum -func (m *TieringType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, tieringTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TieringType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this tiering type based on context it is used -func (m *TieringType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TieringType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TieringType) UnmarshalBinary(b []byte) error { - var res TieringType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time.go b/v2/models/time.go deleted file mode 100644 index 9c31809a..00000000 --- a/v2/models/time.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" -) - -// Time Specifies the time in hours and minutes. -// -// swagger:model Time -type Time struct { - - // Specifies the hour of this time. - Hour *int32 `json:"hour,omitempty"` - - // Specifies the minute of this time. - Minute *int32 `json:"minute,omitempty"` -} - -// Validate validates this time -func (m *Time) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this time based on context it is used -func (m *Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Time) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Time) UnmarshalBinary(b []byte) error { - var res Time - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_of_a_week.go b/v2/models/time_of_a_week.go deleted file mode 100644 index 2a94a902..00000000 --- a/v2/models/time_of_a_week.go +++ /dev/null @@ -1,209 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TimeOfAWeek Specifies a time period by specifying a single daily time period and one or more days of the week, for example 9 AM - 5 PM on Monday, Wednesday or Friday. If different time periods are required on different days, then multiple instances of this Weekly Time Period must be specified. -// -// swagger:model TimeOfAWeek -type TimeOfAWeek struct { - - // Array of Week Days. Specifies a list of days of a week (such as 'Sunday') when the time period should be applied. If not set, the time range applies to all days of the week. Specifies a day in a week such as 'Sunday', 'Monday', etc. - Days []string `json:"days"` - - // Specifies the start time for the daily time period. - StartTime *TimeOfDay `json:"startTime,omitempty"` - - // Specifies the end time for the daily time period. - EndTime *TimeOfDay `json:"endTime,omitempty"` - - // All Day. Specifies that bandwidth limit is applied for entire day. - IsAllDay *bool `json:"isAllDay,omitempty"` -} - -// Validate validates this time of a week -func (m *TimeOfAWeek) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDays(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var timeOfAWeekDaysItemsEnum []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 { - timeOfAWeekDaysItemsEnum = append(timeOfAWeekDaysItemsEnum, v) - } -} - -func (m *TimeOfAWeek) validateDaysItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, timeOfAWeekDaysItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *TimeOfAWeek) validateDays(formats strfmt.Registry) error { - if swag.IsZero(m.Days) { // not required - return nil - } - - for i := 0; i < len(m.Days); i++ { - - // value enum - if err := m.validateDaysItemsEnum("days"+"."+strconv.Itoa(i), "body", m.Days[i]); err != nil { - return err - } - - } - - return nil -} - -func (m *TimeOfAWeek) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *TimeOfAWeek) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -// ContextValidate validate this time of a week based on the context it is used -func (m *TimeOfAWeek) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - 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 -} - -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 -} - -// MarshalBinary interface implementation -func (m *TimeOfAWeek) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfAWeek) UnmarshalBinary(b []byte) error { - var res TimeOfAWeek - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_of_day.go b/v2/models/time_of_day.go deleted file mode 100644 index 9671a3ce..00000000 --- a/v2/models/time_of_day.go +++ /dev/null @@ -1,111 +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" -) - -// TimeOfDay Specifies the time of day. Used for scheduling purposes. -// -// swagger:model TimeOfDay -type TimeOfDay struct { - - // Specifies the hour of the day (0-23). - // Required: true - // Maximum: 23 - // Minimum: 0 - Hour *int32 `json:"hour"` - - // Specifies the minute of the hour (0-59). - // Required: true - // Maximum: 59 - // Minimum: 0 - Minute *int32 `json:"minute"` - - // Specifies the time zone of the user. If not specified, default value is assumed as America/Los_Angeles. - TimeZone *string `json:"timeZone,omitempty"` -} - -// Validate validates this time of day -func (m *TimeOfDay) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHour(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeOfDay) validateHour(formats strfmt.Registry) error { - - if err := validate.Required("hour", "body", m.Hour); err != nil { - return err - } - - if err := validate.MinimumInt("hour", "body", int64(*m.Hour), 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("hour", "body", int64(*m.Hour), 23, false); err != nil { - return err - } - - return nil -} - -func (m *TimeOfDay) validateMinute(formats strfmt.Registry) error { - - if err := validate.Required("minute", "body", m.Minute); err != nil { - return err - } - - if err := validate.MinimumInt("minute", "body", int64(*m.Minute), 0, false); err != nil { - return err - } - - if err := validate.MaximumInt("minute", "body", int64(*m.Minute), 59, false); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this time of day based on context it is used -func (m *TimeOfDay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TimeOfDay) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfDay) UnmarshalBinary(b []byte) error { - var res TimeOfDay - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_range_usecs.go b/v2/models/time_range_usecs.go deleted file mode 100644 index 43e31c33..00000000 --- a/v2/models/time_range_usecs.go +++ /dev/null @@ -1,88 +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" -) - -// TimeRangeUsecs Specifies a valid time range in micro seconds. -// -// swagger:model TimeRangeUsecs -type TimeRangeUsecs struct { - - // Specifies the start time of this time range. - // Required: true - StartTimeUsecs *int64 `json:"startTimeUsecs"` - - // Specifies the end time of this time range. - // Required: true - EndTimeUsecs *int64 `json:"endTimeUsecs"` -} - -// Validate validates this time range usecs -func (m *TimeRangeUsecs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStartTimeUsecs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTimeUsecs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeRangeUsecs) validateStartTimeUsecs(formats strfmt.Registry) error { - - if err := validate.Required("startTimeUsecs", "body", m.StartTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *TimeRangeUsecs) validateEndTimeUsecs(formats strfmt.Registry) error { - - if err := validate.Required("endTimeUsecs", "body", m.EndTimeUsecs); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this time range usecs based on context it is used -func (m *TimeRangeUsecs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TimeRangeUsecs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeRangeUsecs) UnmarshalBinary(b []byte) error { - var res TimeRangeUsecs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_series_stats.go b/v2/models/time_series_stats.go deleted file mode 100644 index ee96bd5e..00000000 --- a/v2/models/time_series_stats.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TimeSeriesStats Specifies a list of time series stats. -// -// swagger:model TimeSeriesStats -type TimeSeriesStats struct { - - // Specifies the list of time series stats. - TimeSeriesStats []*TimeSeriesStatsForMetric `json:"timeSeriesStats"` -} - -// Validate validates this time series stats -func (m *TimeSeriesStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimeSeriesStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeSeriesStats) validateTimeSeriesStats(formats strfmt.Registry) error { - if swag.IsZero(m.TimeSeriesStats) { // not required - return nil - } - - for i := 0; i < len(m.TimeSeriesStats); i++ { - if swag.IsZero(m.TimeSeriesStats[i]) { // not required - continue - } - - if m.TimeSeriesStats[i] != nil { - if err := m.TimeSeriesStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeSeriesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeSeriesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this time series stats based on the context it is used -func (m *TimeSeriesStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimeSeriesStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeSeriesStats) contextValidateTimeSeriesStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TimeSeriesStats); i++ { - - if m.TimeSeriesStats[i] != nil { - - if swag.IsZero(m.TimeSeriesStats[i]) { // not required - return nil - } - - if err := m.TimeSeriesStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeSeriesStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeSeriesStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TimeSeriesStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeSeriesStats) UnmarshalBinary(b []byte) error { - var res TimeSeriesStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_series_stats_for_metric.go b/v2/models/time_series_stats_for_metric.go deleted file mode 100644 index f4179b7b..00000000 --- a/v2/models/time_series_stats_for_metric.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TimeSeriesStatsForMetric Specifies the time series stats for a metric. -// -// swagger:model TimeSeriesStatsForMetric -type TimeSeriesStatsForMetric struct { - - // Specifies the metric name. - MetricName *string `json:"metricName,omitempty"` - - // Specifies the type of the data points. - // Enum: ["kInt64","kDouble","kString","kBytes"] - Type *string `json:"type,omitempty"` - - // Specifies a list of data points. - DataPoints []*DataPoint `json:"dataPoints"` -} - -// Validate validates this time series stats for metric -func (m *TimeSeriesStatsForMetric) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataPoints(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var timeSeriesStatsForMetricTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kInt64","kDouble","kString","kBytes"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - timeSeriesStatsForMetricTypeTypePropEnum = append(timeSeriesStatsForMetricTypeTypePropEnum, v) - } -} - -const ( - - // TimeSeriesStatsForMetricTypeKInt64 captures enum value "kInt64" - TimeSeriesStatsForMetricTypeKInt64 string = "kInt64" - - // TimeSeriesStatsForMetricTypeKDouble captures enum value "kDouble" - TimeSeriesStatsForMetricTypeKDouble string = "kDouble" - - // TimeSeriesStatsForMetricTypeKString captures enum value "kString" - TimeSeriesStatsForMetricTypeKString string = "kString" - - // TimeSeriesStatsForMetricTypeKBytes captures enum value "kBytes" - TimeSeriesStatsForMetricTypeKBytes string = "kBytes" -) - -// prop value enum -func (m *TimeSeriesStatsForMetric) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, timeSeriesStatsForMetricTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TimeSeriesStatsForMetric) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *TimeSeriesStatsForMetric) validateDataPoints(formats strfmt.Registry) error { - if swag.IsZero(m.DataPoints) { // not required - return nil - } - - for i := 0; i < len(m.DataPoints); i++ { - if swag.IsZero(m.DataPoints[i]) { // not required - continue - } - - if m.DataPoints[i] != nil { - if err := m.DataPoints[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this time series stats for metric based on the context it is used -func (m *TimeSeriesStatsForMetric) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataPoints(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeSeriesStatsForMetric) contextValidateDataPoints(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataPoints); i++ { - - if m.DataPoints[i] != nil { - - if swag.IsZero(m.DataPoints[i]) { // not required - return nil - } - - if err := m.DataPoints[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataPoints" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataPoints" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TimeSeriesStatsForMetric) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeSeriesStatsForMetric) UnmarshalBinary(b []byte) error { - var res TimeSeriesStatsForMetric - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_units.go b/v2/models/time_units.go deleted file mode 100644 index 661cb42a..00000000 --- a/v2/models/time_units.go +++ /dev/null @@ -1,119 +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" -) - -// TimeUnits Time Units type. -// -// Time Units type. -// -// swagger:model TimeUnits -type TimeUnits struct { - - // Specifies Time Units type. - // Enum: ["Minutes","Hours","Days","Weeks","Months","Years"] - TimeUnits string `json:"timeUnits,omitempty"` -} - -// Validate validates this time units -func (m *TimeUnits) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimeUnits(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var timeUnitsTypeTimeUnitsPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Minutes","Hours","Days","Weeks","Months","Years"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - timeUnitsTypeTimeUnitsPropEnum = append(timeUnitsTypeTimeUnitsPropEnum, v) - } -} - -const ( - - // TimeUnitsTimeUnitsMinutes captures enum value "Minutes" - TimeUnitsTimeUnitsMinutes string = "Minutes" - - // TimeUnitsTimeUnitsHours captures enum value "Hours" - TimeUnitsTimeUnitsHours string = "Hours" - - // TimeUnitsTimeUnitsDays captures enum value "Days" - TimeUnitsTimeUnitsDays string = "Days" - - // TimeUnitsTimeUnitsWeeks captures enum value "Weeks" - TimeUnitsTimeUnitsWeeks string = "Weeks" - - // TimeUnitsTimeUnitsMonths captures enum value "Months" - TimeUnitsTimeUnitsMonths string = "Months" - - // TimeUnitsTimeUnitsYears captures enum value "Years" - TimeUnitsTimeUnitsYears string = "Years" -) - -// prop value enum -func (m *TimeUnits) validateTimeUnitsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, timeUnitsTypeTimeUnitsPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TimeUnits) validateTimeUnits(formats strfmt.Registry) error { - if swag.IsZero(m.TimeUnits) { // not required - return nil - } - - // value enum - if err := m.validateTimeUnitsEnum("timeUnits", "body", m.TimeUnits); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this time units based on context it is used -func (m *TimeUnits) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TimeUnits) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeUnits) UnmarshalBinary(b []byte) error { - var res TimeUnits - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/time_window.go b/v2/models/time_window.go deleted file mode 100644 index f5ce0cc6..00000000 --- a/v2/models/time_window.go +++ /dev/null @@ -1,227 +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" -) - -// TimeWindow Specifies a a time range within a day. -// -// swagger:model TimeWindow -type TimeWindow struct { - - // Specifies the week day. - // Enum: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] - DayOfTheWeek *string `json:"dayOfTheWeek,omitempty"` - - // Specifies the start time of this time range. - StartTime *Time `json:"startTime,omitempty"` - - // Specifies the end time of this time range. - EndTime *Time `json:"endTime,omitempty"` -} - -// Validate validates this time window -func (m *TimeWindow) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayOfTheWeek(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var timeWindowTypeDayOfTheWeekPropEnum []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 { - timeWindowTypeDayOfTheWeekPropEnum = append(timeWindowTypeDayOfTheWeekPropEnum, v) - } -} - -const ( - - // TimeWindowDayOfTheWeekSunday captures enum value "Sunday" - TimeWindowDayOfTheWeekSunday string = "Sunday" - - // TimeWindowDayOfTheWeekMonday captures enum value "Monday" - TimeWindowDayOfTheWeekMonday string = "Monday" - - // TimeWindowDayOfTheWeekTuesday captures enum value "Tuesday" - TimeWindowDayOfTheWeekTuesday string = "Tuesday" - - // TimeWindowDayOfTheWeekWednesday captures enum value "Wednesday" - TimeWindowDayOfTheWeekWednesday string = "Wednesday" - - // TimeWindowDayOfTheWeekThursday captures enum value "Thursday" - TimeWindowDayOfTheWeekThursday string = "Thursday" - - // TimeWindowDayOfTheWeekFriday captures enum value "Friday" - TimeWindowDayOfTheWeekFriday string = "Friday" - - // TimeWindowDayOfTheWeekSaturday captures enum value "Saturday" - TimeWindowDayOfTheWeekSaturday string = "Saturday" -) - -// prop value enum -func (m *TimeWindow) validateDayOfTheWeekEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, timeWindowTypeDayOfTheWeekPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TimeWindow) validateDayOfTheWeek(formats strfmt.Registry) error { - if swag.IsZero(m.DayOfTheWeek) { // not required - return nil - } - - // value enum - if err := m.validateDayOfTheWeekEnum("dayOfTheWeek", "body", *m.DayOfTheWeek); err != nil { - return err - } - - return nil -} - -func (m *TimeWindow) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required - 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 -} - -func (m *TimeWindow) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required - 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 -} - -// ContextValidate validate this time window based on the context it is used -func (m *TimeWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStartTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEndTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TimeWindow) 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 -} - -func (m *TimeWindow) 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 -} - -// MarshalBinary interface implementation -func (m *TimeWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeWindow) UnmarshalBinary(b []byte) error { - var res TimeWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/totp_key_info.go b/v2/models/totp_key_info.go deleted file mode 100644 index 20dacc59..00000000 --- a/v2/models/totp_key_info.go +++ /dev/null @@ -1,59 +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" -) - -// TotpKeyInfo Specifies the Time based OTP key info -// -// swagger:model TotpKeyInfo -type TotpKeyInfo struct { - - // Specifies the Time based OTP key name. - TotpKeyName string `json:"totpKeyName,omitempty"` - - // Specifies the Time based OTP key ID. - TotpKeyID string `json:"totpKeyId,omitempty"` - - // Specifies the Time based OTP secret key. - TotpSecretKey string `json:"totpSecretKey,omitempty"` - - // Specifies the Time based OTP key URI for generating MFA QR code. - TotpURI string `json:"totpUri,omitempty"` -} - -// Validate validates this totp key info -func (m *TotpKeyInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this totp key info based on context it is used -func (m *TotpKeyInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TotpKeyInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TotpKeyInfo) UnmarshalBinary(b []byte) error { - var res TotpKeyInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/trusted_ca.go b/v2/models/trusted_ca.go deleted file mode 100644 index 47381b92..00000000 --- a/v2/models/trusted_ca.go +++ /dev/null @@ -1,287 +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" -) - -// TrustedCa Specifies the basic info about CA Root Certificate. -// -// swagger:model TrustedCa -type TrustedCa struct { - - // Unique id for the certificate. - // Read Only: true - ID *string `json:"id,omitempty"` - - // Unique name for the certificate. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies the issuer. - // Read Only: true - IssuedBy *string `json:"issuedBy,omitempty"` - - // Specifies whom it was issued to. - // Read Only: true - IssuedTo *string `json:"issuedTo,omitempty"` - - // Specifies the timestamp epoch in microseconds when this certificate - // will start being valid. - // Read Only: true - IssuedTimeUsecs *int64 `json:"issuedTimeUsecs,omitempty"` - - // Specifies the timestamp epoch in microseconds when this certificate - // will no longer be valid. - // Read Only: true - ExpirationTimeUsecs *int64 `json:"expirationTimeUsecs,omitempty"` - - // description of the certificate. - // Read Only: true - Description *string `json:"description,omitempty"` - - // Specifies the timestamp epoch in microseconds when this certificate - // was registered on the cluster. - // Read Only: true - RegistrationTimeUsecs *int64 `json:"registrationTimeUsecs,omitempty"` - - // Specifies the timestamp epoch in microseconds when this certificate - // was last validated. - // Read Only: true - LastValidatedTimeUsecs *int64 `json:"lastValidatedTimeUsecs,omitempty"` - - // Validation Status of the certificate. - // Read Only: true - // Enum: ["Valid","Expired","Revoked","Unknown"] - Status *string `json:"status,omitempty"` -} - -// Validate validates this trusted ca -func (m *TrustedCa) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var trustedCaTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Valid","Expired","Revoked","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - trustedCaTypeStatusPropEnum = append(trustedCaTypeStatusPropEnum, v) - } -} - -const ( - - // TrustedCaStatusValid captures enum value "Valid" - TrustedCaStatusValid string = "Valid" - - // TrustedCaStatusExpired captures enum value "Expired" - TrustedCaStatusExpired string = "Expired" - - // TrustedCaStatusRevoked captures enum value "Revoked" - TrustedCaStatusRevoked string = "Revoked" - - // TrustedCaStatusUnknown captures enum value "Unknown" - TrustedCaStatusUnknown string = "Unknown" -) - -// prop value enum -func (m *TrustedCa) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, trustedCaTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TrustedCa) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this trusted ca based on the context it is used -func (m *TrustedCa) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIssuedBy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIssuedTo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIssuedTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExpirationTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDescription(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistrationTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastValidatedTimeUsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedCa) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateIssuedBy(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "issuedBy", "body", m.IssuedBy); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateIssuedTo(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "issuedTo", "body", m.IssuedTo); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateIssuedTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "issuedTimeUsecs", "body", m.IssuedTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateExpirationTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "expirationTimeUsecs", "body", m.ExpirationTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateDescription(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "description", "body", m.Description); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateRegistrationTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "registrationTimeUsecs", "body", m.RegistrationTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateLastValidatedTimeUsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastValidatedTimeUsecs", "body", m.LastValidatedTimeUsecs); err != nil { - return err - } - - return nil -} - -func (m *TrustedCa) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "status", "body", m.Status); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TrustedCa) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TrustedCa) UnmarshalBinary(b []byte) error { - var res TrustedCa - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/trusted_ca_request.go b/v2/models/trusted_ca_request.go deleted file mode 100644 index 8912e73c..00000000 --- a/v2/models/trusted_ca_request.go +++ /dev/null @@ -1,92 +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" -) - -// TrustedCaRequest Specifies the basic info about CA Root Certificate. -// -// swagger:model TrustedCaRequest -type TrustedCaRequest struct { - - // Specifies the certificate to be imported. Certificate should be in - // PEM format. - // Required: true - Certificate *string `json:"certificate"` - - // Descriptive name of the certificate. - // Required: true - Name *string `json:"name"` - - // Description of the certificate. - Description *string `json:"description,omitempty"` -} - -// Validate validates this trusted ca request -func (m *TrustedCaRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedCaRequest) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -func (m *TrustedCaRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this trusted ca request based on context it is used -func (m *TrustedCaRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TrustedCaRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TrustedCaRequest) UnmarshalBinary(b []byte) error { - var res TrustedCaRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/trusted_domain.go b/v2/models/trusted_domain.go deleted file mode 100644 index 5f43f0ab..00000000 --- a/v2/models/trusted_domain.go +++ /dev/null @@ -1,127 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TrustedDomain Specifies the details of a trusted domain. -// -// swagger:model TrustedDomain -type TrustedDomain struct { - - // Specifies a domain name. - DomainName *string `json:"domainName,omitempty"` - - // Specifies a list of preferred domain controllers for this domain. - PreferredDomainControllers []*DomainController `json:"preferredDomainControllers"` - - // Specifies a list of denied domain controllers of this domain. - DomainControllersDenyList []*string `json:"domainControllersDenyList"` -} - -// Validate validates this trusted domain -func (m *TrustedDomain) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePreferredDomainControllers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedDomain) validatePreferredDomainControllers(formats strfmt.Registry) error { - if swag.IsZero(m.PreferredDomainControllers) { // not required - return nil - } - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - continue - } - - if m.PreferredDomainControllers[i] != nil { - if err := m.PreferredDomainControllers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this trusted domain based on the context it is used -func (m *TrustedDomain) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePreferredDomainControllers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedDomain) contextValidatePreferredDomainControllers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.PreferredDomainControllers); i++ { - - if m.PreferredDomainControllers[i] != nil { - - if swag.IsZero(m.PreferredDomainControllers[i]) { // not required - return nil - } - - if err := m.PreferredDomainControllers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preferredDomainControllers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TrustedDomain) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TrustedDomain) UnmarshalBinary(b []byte) error { - var res TrustedDomain - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/trusted_domain_params.go b/v2/models/trusted_domain_params.go deleted file mode 100644 index 9ef670e1..00000000 --- a/v2/models/trusted_domain_params.go +++ /dev/null @@ -1,253 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TrustedDomainParams Specifies the params related to trusted domains. -// -// swagger:model TrustedDomainParams -type TrustedDomainParams struct { - - // Specifies if trusted domain discovery is enabled. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies a list of trusted domains. - TrustedDomains []*TrustedDomain `json:"trustedDomains"` - - // Specifies a list of domains to add to blacklist. These domains will be blacklisted in trusted domain discovery. - BlacklistedDomains []string `json:"blacklistedDomains"` - - // Specifies a list of domains to add to whitelist. Only these domains will be used for authentication if 'onlyUseWhitelistedDomains' is set. - WhitelistedDomains []string `json:"whitelistedDomains"` - - // Specifies whether to use 'whitelistedDomains' only for authentication. - OnlyUseWhitelistedDomains *bool `json:"onlyUseWhitelistedDomains,omitempty"` - - // Specifies the discovery status of trusted domains. - // Read Only: true - // Enum: ["Completed","Running","Error"] - DiscoveryStatus *string `json:"discoveryStatus,omitempty"` - - // Specifies the identifier for the task running discovery. - // Read Only: true - TaskIdentifier *string `json:"taskIdentifier,omitempty"` -} - -// Validate validates this trusted domain params -func (m *TrustedDomainParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTrustedDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateWhitelistedDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiscoveryStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedDomainParams) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *TrustedDomainParams) validateTrustedDomains(formats strfmt.Registry) error { - if swag.IsZero(m.TrustedDomains) { // not required - return nil - } - - for i := 0; i < len(m.TrustedDomains); i++ { - if swag.IsZero(m.TrustedDomains[i]) { // not required - continue - } - - if m.TrustedDomains[i] != nil { - if err := m.TrustedDomains[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trustedDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trustedDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TrustedDomainParams) validateWhitelistedDomains(formats strfmt.Registry) error { - if swag.IsZero(m.WhitelistedDomains) { // not required - return nil - } - - for i := 0; i < len(m.WhitelistedDomains); i++ { - - if err := validate.Pattern("whitelistedDomains"+"."+strconv.Itoa(i), "body", m.WhitelistedDomains[i], `^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_\-]{0,61}[a-zA-Z0-9]))*$`); err != nil { - return err - } - - } - - return nil -} - -var trustedDomainParamsTypeDiscoveryStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Completed","Running","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - trustedDomainParamsTypeDiscoveryStatusPropEnum = append(trustedDomainParamsTypeDiscoveryStatusPropEnum, v) - } -} - -const ( - - // TrustedDomainParamsDiscoveryStatusCompleted captures enum value "Completed" - TrustedDomainParamsDiscoveryStatusCompleted string = "Completed" - - // TrustedDomainParamsDiscoveryStatusRunning captures enum value "Running" - TrustedDomainParamsDiscoveryStatusRunning string = "Running" - - // TrustedDomainParamsDiscoveryStatusError captures enum value "Error" - TrustedDomainParamsDiscoveryStatusError string = "Error" -) - -// prop value enum -func (m *TrustedDomainParams) validateDiscoveryStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, trustedDomainParamsTypeDiscoveryStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *TrustedDomainParams) validateDiscoveryStatus(formats strfmt.Registry) error { - if swag.IsZero(m.DiscoveryStatus) { // not required - return nil - } - - // value enum - if err := m.validateDiscoveryStatusEnum("discoveryStatus", "body", *m.DiscoveryStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this trusted domain params based on the context it is used -func (m *TrustedDomainParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTrustedDomains(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDiscoveryStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTaskIdentifier(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TrustedDomainParams) contextValidateTrustedDomains(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TrustedDomains); i++ { - - if m.TrustedDomains[i] != nil { - - if swag.IsZero(m.TrustedDomains[i]) { // not required - return nil - } - - if err := m.TrustedDomains[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("trustedDomains" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("trustedDomains" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *TrustedDomainParams) contextValidateDiscoveryStatus(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "discoveryStatus", "body", m.DiscoveryStatus); err != nil { - return err - } - - return nil -} - -func (m *TrustedDomainParams) contextValidateTaskIdentifier(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "taskIdentifier", "body", m.TaskIdentifier); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TrustedDomainParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TrustedDomainParams) UnmarshalBinary(b []byte) error { - var res TrustedDomainParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_config_params.go b/v2/models/uda_config_params.go deleted file mode 100644 index d66eefcc..00000000 --- a/v2/models/uda_config_params.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaConfigParams Specifies parameters for a UDA connector. -// -// swagger:model UdaConfigParams -type UdaConfigParams struct { - - // index - Index *UdaIndexParams `json:"index,omitempty"` - - // Array of parameters for different host operating systems. - HostOsSpecificConfigurations []*UdaHostOsSpecificParams `json:"hostOsSpecificConfigurations"` -} - -// Validate validates this uda config params -func (m *UdaConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndex(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHostOsSpecificConfigurations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConfigParams) validateIndex(formats strfmt.Registry) error { - if swag.IsZero(m.Index) { // not required - return nil - } - - if m.Index != nil { - if err := m.Index.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("index") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("index") - } - return err - } - } - - return nil -} - -func (m *UdaConfigParams) validateHostOsSpecificConfigurations(formats strfmt.Registry) error { - if swag.IsZero(m.HostOsSpecificConfigurations) { // not required - return nil - } - - for i := 0; i < len(m.HostOsSpecificConfigurations); i++ { - if swag.IsZero(m.HostOsSpecificConfigurations[i]) { // not required - continue - } - - if m.HostOsSpecificConfigurations[i] != nil { - if err := m.HostOsSpecificConfigurations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostOsSpecificConfigurations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostOsSpecificConfigurations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda config params based on the context it is used -func (m *UdaConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndex(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHostOsSpecificConfigurations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConfigParams) contextValidateIndex(ctx context.Context, formats strfmt.Registry) error { - - if m.Index != nil { - - if swag.IsZero(m.Index) { // not required - return nil - } - - if err := m.Index.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("index") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("index") - } - return err - } - } - - return nil -} - -func (m *UdaConfigParams) contextValidateHostOsSpecificConfigurations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.HostOsSpecificConfigurations); i++ { - - if m.HostOsSpecificConfigurations[i] != nil { - - if swag.IsZero(m.HostOsSpecificConfigurations[i]) { // not required - return nil - } - - if err := m.HostOsSpecificConfigurations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hostOsSpecificConfigurations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hostOsSpecificConfigurations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaConfigParams) UnmarshalBinary(b []byte) error { - var res UdaConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_configs_list.go b/v2/models/uda_configs_list.go deleted file mode 100644 index baf5be84..00000000 --- a/v2/models/uda_configs_list.go +++ /dev/null @@ -1,50 +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" -) - -// UdaConfigsList List of configs as strings. -// -// swagger:model UdaConfigsList -type UdaConfigsList struct { - - // Configs list. - Configs []string `json:"configs"` -} - -// Validate validates this uda configs list -func (m *UdaConfigsList) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda configs list based on context it is used -func (m *UdaConfigsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaConfigsList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaConfigsList) UnmarshalBinary(b []byte) error { - var res UdaConfigsList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_connector_config_params.go b/v2/models/uda_connector_config_params.go deleted file mode 100644 index 457e9acb..00000000 --- a/v2/models/uda_connector_config_params.go +++ /dev/null @@ -1,191 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaConnectorConfigParams UDA connector config params -// -// Specifies the request parameters to create/update a new UDA connector config. -// -// swagger:model UdaConnectorConfigParams -type UdaConnectorConfigParams struct { - - // Specifies the index config as json string. - IndexConfig *string `json:"indexConfig,omitempty"` - - // Specifies the translation messages for various locales. It maps locale name to their respective translation json strings. - UITranslationConfig []*UdaLocaleSpecificTranslations `json:"uiTranslationConfig"` - - // Specifies operating system specific configuration. - OsSpecificConfig []*UdaOSSpecificConfigParams `json:"osSpecificConfig"` - - // If true, any existing connector config with the the same ID is replaced if it exists. - Replace *bool `json:"replace,omitempty"` -} - -// Validate validates this uda connector config params -func (m *UdaConnectorConfigParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUITranslationConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOsSpecificConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConnectorConfigParams) validateUITranslationConfig(formats strfmt.Registry) error { - if swag.IsZero(m.UITranslationConfig) { // not required - return nil - } - - for i := 0; i < len(m.UITranslationConfig); i++ { - if swag.IsZero(m.UITranslationConfig[i]) { // not required - continue - } - - if m.UITranslationConfig[i] != nil { - if err := m.UITranslationConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uiTranslationConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uiTranslationConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaConnectorConfigParams) validateOsSpecificConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OsSpecificConfig) { // not required - return nil - } - - for i := 0; i < len(m.OsSpecificConfig); i++ { - if swag.IsZero(m.OsSpecificConfig[i]) { // not required - continue - } - - if m.OsSpecificConfig[i] != nil { - if err := m.OsSpecificConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("osSpecificConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("osSpecificConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda connector config params based on the context it is used -func (m *UdaConnectorConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUITranslationConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOsSpecificConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaConnectorConfigParams) contextValidateUITranslationConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UITranslationConfig); i++ { - - if m.UITranslationConfig[i] != nil { - - if swag.IsZero(m.UITranslationConfig[i]) { // not required - return nil - } - - if err := m.UITranslationConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uiTranslationConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uiTranslationConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaConnectorConfigParams) contextValidateOsSpecificConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OsSpecificConfig); i++ { - - if m.OsSpecificConfig[i] != nil { - - if swag.IsZero(m.OsSpecificConfig[i]) { // not required - return nil - } - - if err := m.OsSpecificConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("osSpecificConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("osSpecificConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaConnectorConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaConnectorConfigParams) UnmarshalBinary(b []byte) error { - var res UdaConnectorConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_create_run_response_params.go b/v2/models/uda_create_run_response_params.go deleted file mode 100644 index 058ea6e1..00000000 --- a/v2/models/uda_create_run_response_params.go +++ /dev/null @@ -1,50 +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" -) - -// UdaCreateRunResponseParams Specifies the response for creation of a Universal Data Adapter protection run. -// -// swagger:model UdaCreateRunResponseParams -type UdaCreateRunResponseParams struct { - - // Specifies a unique run id for an externally triggered run. This id can be used by the caller to identify the corresponding backup process on the source host. - ExternallyTriggeredRunID *string `json:"externallyTriggeredRunId,omitempty"` -} - -// Validate validates this uda create run response params -func (m *UdaCreateRunResponseParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda create run response params based on context it is used -func (m *UdaCreateRunResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaCreateRunResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaCreateRunResponseParams) UnmarshalBinary(b []byte) error { - var res UdaCreateRunResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_dynamic_form_params.go b/v2/models/uda_dynamic_form_params.go deleted file mode 100644 index 3f71445d..00000000 --- a/v2/models/uda_dynamic_form_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaDynamicFormParams Specifies parameters related to dynamic form through which additional fields can be specified by connector providers. -// -// swagger:model UdaDynamicFormParams -type UdaDynamicFormParams struct { - - // Array of panels. - Panels []*FormPanelParams `json:"panels"` -} - -// Validate validates this uda dynamic form params -func (m *UdaDynamicFormParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePanels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaDynamicFormParams) validatePanels(formats strfmt.Registry) error { - if swag.IsZero(m.Panels) { // not required - return nil - } - - for i := 0; i < len(m.Panels); i++ { - if swag.IsZero(m.Panels[i]) { // not required - continue - } - - if m.Panels[i] != nil { - if err := m.Panels[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("panels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("panels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda dynamic form params based on the context it is used -func (m *UdaDynamicFormParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePanels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaDynamicFormParams) contextValidatePanels(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Panels); i++ { - - if m.Panels[i] != nil { - - if swag.IsZero(m.Panels[i]) { // not required - return nil - } - - if err := m.Panels[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("panels" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("panels" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaDynamicFormParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaDynamicFormParams) UnmarshalBinary(b []byte) error { - var res UdaDynamicFormParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_externally_triggered_run_params.go b/v2/models/uda_externally_triggered_run_params.go deleted file mode 100644 index 4cfd1bb9..00000000 --- a/v2/models/uda_externally_triggered_run_params.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaExternallyTriggeredRunParams Specifies the parameters for an externally triggered run. -// -// swagger:model UdaExternallyTriggeredRunParams -type UdaExternallyTriggeredRunParams struct { - - // Specifies the IP or FQDN of the source host where this backup will run. - ControlNode *string `json:"controlNode,omitempty"` - - // Specifies a map of custom arguments to be supplied to the plugin. - BackupArgs []*KeyValuePair `json:"backupArgs"` -} - -// Validate validates this uda externally triggered run params -func (m *UdaExternallyTriggeredRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackupArgs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaExternallyTriggeredRunParams) validateBackupArgs(formats strfmt.Registry) error { - if swag.IsZero(m.BackupArgs) { // not required - return nil - } - - for i := 0; i < len(m.BackupArgs); i++ { - if swag.IsZero(m.BackupArgs[i]) { // not required - continue - } - - if m.BackupArgs[i] != nil { - if err := m.BackupArgs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupArgs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupArgs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda externally triggered run params based on the context it is used -func (m *UdaExternallyTriggeredRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackupArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaExternallyTriggeredRunParams) contextValidateBackupArgs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupArgs); i++ { - - if m.BackupArgs[i] != nil { - - if swag.IsZero(m.BackupArgs[i]) { // not required - return nil - } - - if err := m.BackupArgs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupArgs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupArgs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaExternallyTriggeredRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaExternallyTriggeredRunParams) UnmarshalBinary(b []byte) error { - var res UdaExternallyTriggeredRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_host_os_specific_params.go b/v2/models/uda_host_os_specific_params.go deleted file mode 100644 index 2224073c..00000000 --- a/v2/models/uda_host_os_specific_params.go +++ /dev/null @@ -1,265 +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" -) - -// UdaHostOsSpecificParams Connector parameters specific to an operating system. -// -// swagger:model UdaHostOsSpecificParams -type UdaHostOsSpecificParams struct { - - // Type of the host operating system. - HostOsType *string `json:"hostOsType,omitempty"` - - // index - Index *UdaOSIndexConfigParams `json:"index,omitempty"` - - // registration - Registration *UdaRegistrationParams `json:"registration,omitempty"` - - // protection - Protection *UdaProtectionParams `json:"protection,omitempty"` - - // recovery - Recovery *UdaRecoveryParams `json:"recovery,omitempty"` -} - -// Validate validates this uda host os specific params -func (m *UdaHostOsSpecificParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIndex(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegistration(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtection(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecovery(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaHostOsSpecificParams) validateIndex(formats strfmt.Registry) error { - if swag.IsZero(m.Index) { // not required - return nil - } - - if m.Index != nil { - if err := m.Index.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("index") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("index") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) validateRegistration(formats strfmt.Registry) error { - if swag.IsZero(m.Registration) { // not required - return nil - } - - if m.Registration != nil { - if err := m.Registration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registration") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) validateProtection(formats strfmt.Registry) error { - if swag.IsZero(m.Protection) { // not required - return nil - } - - if m.Protection != nil { - if err := m.Protection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protection") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) validateRecovery(formats strfmt.Registry) error { - if swag.IsZero(m.Recovery) { // not required - return nil - } - - if m.Recovery != nil { - if err := m.Recovery.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recovery") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recovery") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda host os specific params based on the context it is used -func (m *UdaHostOsSpecificParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIndex(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRegistration(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProtection(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRecovery(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaHostOsSpecificParams) contextValidateIndex(ctx context.Context, formats strfmt.Registry) error { - - if m.Index != nil { - - if swag.IsZero(m.Index) { // not required - return nil - } - - if err := m.Index.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("index") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("index") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) contextValidateRegistration(ctx context.Context, formats strfmt.Registry) error { - - if m.Registration != nil { - - if swag.IsZero(m.Registration) { // not required - return nil - } - - if err := m.Registration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registration") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) contextValidateProtection(ctx context.Context, formats strfmt.Registry) error { - - if m.Protection != nil { - - if swag.IsZero(m.Protection) { // not required - return nil - } - - if err := m.Protection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protection") - } - return err - } - } - - return nil -} - -func (m *UdaHostOsSpecificParams) contextValidateRecovery(ctx context.Context, formats strfmt.Registry) error { - - if m.Recovery != nil { - - if swag.IsZero(m.Recovery) { // not required - return nil - } - - if err := m.Recovery.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recovery") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recovery") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaHostOsSpecificParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaHostOsSpecificParams) UnmarshalBinary(b []byte) error { - var res UdaHostOsSpecificParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_index_params.go b/v2/models/uda_index_params.go deleted file mode 100644 index 6ce18950..00000000 --- a/v2/models/uda_index_params.go +++ /dev/null @@ -1,68 +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" -) - -// UdaIndexParams Parameters to define/specify a Uda connector. -// -// swagger:model UdaIndexParams -type UdaIndexParams struct { - - // Unique id for each Uda connector. - ID *int64 `json:"id,omitempty"` - - // Type of the uda connector. - SourceType *string `json:"sourceType,omitempty"` - - // Label to be shown On UI screen. - Label *string `json:"label,omitempty"` - - // Whether the dynamic config support is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - - // Version of the connector. - Version *int64 `json:"version,omitempty"` - - // Syntax used for configuration file. - Syntax *int32 `json:"syntax,omitempty"` - - // UI feature flag that controls the visibility of the connector. - UIFeatureFlag *string `json:"uiFeatureFlag,omitempty"` -} - -// Validate validates this uda index params -func (m *UdaIndexParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda index params based on context it is used -func (m *UdaIndexParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaIndexParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaIndexParams) UnmarshalBinary(b []byte) error { - var res UdaIndexParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_indexed_object.go b/v2/models/uda_indexed_object.go deleted file mode 100644 index 2e759772..00000000 --- a/v2/models/uda_indexed_object.go +++ /dev/null @@ -1,141 +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" -) - -// UdaIndexedObject UdaIndexedObject -// -// Specifies a Universal Data Adapter indexed object. -// -// swagger:model UdaIndexedObject -type UdaIndexedObject struct { - CommonIndexedObjectParams - - // Specifies the id of the indexed object. - ID *string `json:"id,omitempty"` - - // Specifies the full name of the indexed object. - FullName *string `json:"fullName,omitempty"` - - // Specifies the type of the indexed object. - ObjectType *string `json:"objectType,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UdaIndexedObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIndexedObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIndexedObjectParams = aO0 - - // AO1 - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - FullName *string `json:"fullName,omitempty"` - - ObjectType *string `json:"objectType,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ID = dataAO1.ID - - m.FullName = dataAO1.FullName - - m.ObjectType = dataAO1.ObjectType - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UdaIndexedObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonIndexedObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ID *string `json:"id,omitempty"` - - FullName *string `json:"fullName,omitempty"` - - ObjectType *string `json:"objectType,omitempty"` - } - - dataAO1.ID = m.ID - - dataAO1.FullName = m.FullName - - dataAO1.ObjectType = m.ObjectType - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uda indexed object -func (m *UdaIndexedObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda indexed object based on the context it is used -func (m *UdaIndexedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIndexedObjectParams - if err := m.CommonIndexedObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UdaIndexedObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaIndexedObject) UnmarshalBinary(b []byte) error { - var res UdaIndexedObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_indexed_objects.go b/v2/models/uda_indexed_objects.go deleted file mode 100644 index d8e5a44f..00000000 --- a/v2/models/uda_indexed_objects.go +++ /dev/null @@ -1,78 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UdaIndexedObjects Specifies the indexed Universal Data Adapter objects. -// -// swagger:model UdaIndexedObjects -type UdaIndexedObjects []*UdaIndexedObject - -// Validate validates this uda indexed objects -func (m UdaIndexedObjects) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda indexed objects based on the context it is used -func (m UdaIndexedObjects) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - - if swag.IsZero(m[i]) { // not required - return nil - } - - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v2/models/uda_locale_specific_translations.go b/v2/models/uda_locale_specific_translations.go deleted file mode 100644 index 2274df57..00000000 --- a/v2/models/uda_locale_specific_translations.go +++ /dev/null @@ -1,55 +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" -) - -// UdaLocaleSpecificTranslations UDA locale specific translations. -// -// Specifies the translation messages for a specific locale. -// -// swagger:model UdaLocaleSpecificTranslations -type UdaLocaleSpecificTranslations struct { - - // Name of the locale. - LocaleName string `json:"localeName,omitempty"` - - // Translations json for the locale. - Translations string `json:"translations,omitempty"` -} - -// Validate validates this uda locale specific translations -func (m *UdaLocaleSpecificTranslations) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda locale specific translations based on context it is used -func (m *UdaLocaleSpecificTranslations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaLocaleSpecificTranslations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaLocaleSpecificTranslations) UnmarshalBinary(b []byte) error { - var res UdaLocaleSpecificTranslations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_o_s_index_config_params.go b/v2/models/uda_o_s_index_config_params.go deleted file mode 100644 index c73da61c..00000000 --- a/v2/models/uda_o_s_index_config_params.go +++ /dev/null @@ -1,50 +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" -) - -// UdaOSIndexConfigParams Specifies the basic configuration for the operating system type. -// -// swagger:model UdaOSIndexConfigParams -type UdaOSIndexConfigParams struct { - - // UI feature flag that controls the visibility of the corresponding operating system type for the UDA connector. - UIFeatureFlag *string `json:"uiFeatureFlag,omitempty"` -} - -// Validate validates this uda o s index config params -func (m *UdaOSIndexConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda o s index config params based on context it is used -func (m *UdaOSIndexConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaOSIndexConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaOSIndexConfigParams) UnmarshalBinary(b []byte) error { - var res UdaOSIndexConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_o_s_specific_config_params.go b/v2/models/uda_o_s_specific_config_params.go deleted file mode 100644 index da856225..00000000 --- a/v2/models/uda_o_s_specific_config_params.go +++ /dev/null @@ -1,64 +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" -) - -// UdaOSSpecificConfigParams UDA operating system configuration params. -// -// Specifices operating system specific config. -// -// swagger:model UdaOSSpecificConfigParams -type UdaOSSpecificConfigParams struct { - - // Name of the operating system. - OsType string `json:"osType,omitempty"` - - // Specifies the basic configuration for the operating system type as a json string. - IndexConfig *string `json:"indexConfig,omitempty"` - - // Specifies the registration config as json string. - RegistrationConfig *string `json:"registrationConfig,omitempty"` - - // Specifies the protection config as json string. - ProtectionConfig *string `json:"protectionConfig,omitempty"` - - // Specifies the recovery config as json string. - RecoveryConfig *string `json:"recoveryConfig,omitempty"` -} - -// Validate validates this uda o s specific config params -func (m *UdaOSSpecificConfigParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda o s specific config params based on context it is used -func (m *UdaOSSpecificConfigParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaOSSpecificConfigParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaOSSpecificConfigParams) UnmarshalBinary(b []byte) error { - var res UdaOSSpecificConfigParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_params.go b/v2/models/uda_object_params.go deleted file mode 100644 index 3473751a..00000000 --- a/v2/models/uda_object_params.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" -) - -// UdaObjectParams Specifies the common parameters for UDA objects. -// -// swagger:model UdaObjectParams -type UdaObjectParams struct { - - // Specifies whether this Object belongs to a source having entity support. - HasEntitySupport *bool `json:"hasEntitySupport,omitempty"` - - // Specifies the source type for Universal Data Adapter object. - SourceType *string `json:"sourceType,omitempty"` -} - -// Validate validates this uda object params -func (m *UdaObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda object params based on context it is used -func (m *UdaObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectParams) UnmarshalBinary(b []byte) error { - var res UdaObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_protection_object_params.go b/v2/models/uda_object_protection_object_params.go deleted file mode 100644 index 029026da..00000000 --- a/v2/models/uda_object_protection_object_params.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" - "github.com/go-openapi/validate" -) - -// UdaObjectProtectionObjectParams Universal Data Adapter Object Protection Object Params -// -// Specifies the object parameters to create an Universal Data Adapter Object Protection. -// -// swagger:model UdaObjectProtectionObjectParams -type UdaObjectProtectionObjectParams struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the ids of the objects to be excluded in the Object Protection. This can be used to ignore specific objects under a parent object which has been included for protection. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` -} - -// Validate validates this uda object protection object params -func (m *UdaObjectProtectionObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaObjectProtectionObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *UdaObjectProtectionObjectParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this uda object protection object params based on context it is used -func (m *UdaObjectProtectionObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectProtectionObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectProtectionObjectParams) UnmarshalBinary(b []byte) error { - var res UdaObjectProtectionObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_protection_params.go b/v2/models/uda_object_protection_params.go deleted file mode 100644 index 8cda4090..00000000 --- a/v2/models/uda_object_protection_params.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UdaObjectProtectionParams Universal Data Adapter Object Protection Parameters. -// -// Specifies the parameters that are specific to Universal Data Adapter Object Protection. -// -// swagger:model UdaObjectProtectionParams -type UdaObjectProtectionParams struct { - - // Specifies the objects to be included in the Object Protection. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*UdaObjectProtectionObjectParams `json:"objects"` - - // Specifies the map of custom arguments to be supplied to the various backup scripts. - BackupJobArguments []*KeyValuePair `json:"backupJobArguments"` - - // Specifies the maximum number of concurrent IO Streams thatwill be created to exchange data with the cluster. If not specified, the default value is taken as 1. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum number of view mounts per host. If not specified, the default value is taken as 1. - Mounts *int32 `json:"mounts,omitempty"` - - // Specifies whether this Protection Group is created from a source having entity support. - // Read Only: true - HasEntitySupport *bool `json:"hasEntitySupport,omitempty"` - - // Specifies the custom arguments to be supplied to the full backup script when a full backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - FullBackupArgs *string `json:"fullBackupArgs,omitempty"` - - // Specifies the custom arguments to be supplied to the incremental backup script when an incremental backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - IncrBackupArgs *string `json:"incrBackupArgs,omitempty"` - - // Specifies the custom arguments to be supplied to the log backup script when a log backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - LogBackupArgs *string `json:"logBackupArgs,omitempty"` -} - -// Validate validates this uda object protection params -func (m *UdaObjectProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupJobArguments(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaObjectProtectionParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaObjectProtectionParams) validateBackupJobArguments(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJobArguments) { // not required - return nil - } - - for i := 0; i < len(m.BackupJobArguments); i++ { - if swag.IsZero(m.BackupJobArguments[i]) { // not required - continue - } - - if m.BackupJobArguments[i] != nil { - if err := m.BackupJobArguments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uda object protection params based on the context it is used -func (m *UdaObjectProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupJobArguments(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHasEntitySupport(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaObjectProtectionParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaObjectProtectionParams) contextValidateBackupJobArguments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupJobArguments); i++ { - - if m.BackupJobArguments[i] != nil { - - if swag.IsZero(m.BackupJobArguments[i]) { // not required - return nil - } - - if err := m.BackupJobArguments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaObjectProtectionParams) contextValidateHasEntitySupport(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hasEntitySupport", "body", m.HasEntitySupport); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectProtectionParams) UnmarshalBinary(b []byte) error { - var res UdaObjectProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_protection_request_params.go b/v2/models/uda_object_protection_request_params.go deleted file mode 100644 index a9954055..00000000 --- a/v2/models/uda_object_protection_request_params.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" -) - -// UdaObjectProtectionRequestParams Specifies the request parameters specific to Universal Data Adapter object protection. -// -// swagger:model UdaObjectProtectionRequestParams -type UdaObjectProtectionRequestParams struct { - UdaObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UdaObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UdaObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UdaObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UdaObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UdaObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uda object protection request params -func (m *UdaObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda object protection request params based on the context it is used -func (m *UdaObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res UdaObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_protection_response_params.go b/v2/models/uda_object_protection_response_params.go deleted file mode 100644 index 8d378dcb..00000000 --- a/v2/models/uda_object_protection_response_params.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" -) - -// UdaObjectProtectionResponseParams Specifies the response parameters specific to Universal Data Adapter object protection. -// -// swagger:model UdaObjectProtectionResponseParams -type UdaObjectProtectionResponseParams struct { - UdaObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UdaObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UdaObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UdaObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UdaObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UdaObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uda object protection response params -func (m *UdaObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda object protection response params based on the context it is used -func (m *UdaObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res UdaObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_object_protection_update_request_params.go b/v2/models/uda_object_protection_update_request_params.go deleted file mode 100644 index 4615c565..00000000 --- a/v2/models/uda_object_protection_update_request_params.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" -) - -// UdaObjectProtectionUpdateRequestParams Specifies the update parameters specific to Universal Data Adapter object protection. -// -// swagger:model UdaObjectProtectionUpdateRequestParams -type UdaObjectProtectionUpdateRequestParams struct { - UdaObjectProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UdaObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UdaObjectProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UdaObjectProtectionParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UdaObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UdaObjectProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uda object protection update request params -func (m *UdaObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda object protection update request params based on the context it is used -func (m *UdaObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaObjectProtectionParams - if err := m.UdaObjectProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UdaObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res UdaObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_on_prem_search_params.go b/v2/models/uda_on_prem_search_params.go deleted file mode 100644 index 0ab38489..00000000 --- a/v2/models/uda_on_prem_search_params.go +++ /dev/null @@ -1,118 +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" -) - -// UdaOnPremSearchParams UdaOnPremSearchParams -// -// Parameters required to search Universal Data Adapter objects. -// -// swagger:model UdaOnPremSearchParams -type UdaOnPremSearchParams struct { - UdaSearchParams - - OnPremSourceIds -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UdaOnPremSearchParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UdaSearchParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UdaSearchParams = aO0 - - // AO1 - var aO1 OnPremSourceIds - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.OnPremSourceIds = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UdaOnPremSearchParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UdaSearchParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.OnPremSourceIds) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uda on prem search params -func (m *UdaOnPremSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaSearchParams - if err := m.UdaSearchParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this uda on prem search params based on the context it is used -func (m *UdaOnPremSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaSearchParams - if err := m.UdaSearchParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with OnPremSourceIds - if err := m.OnPremSourceIds.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UdaOnPremSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaOnPremSearchParams) UnmarshalBinary(b []byte) error { - var res UdaOnPremSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_params.go b/v2/models/uda_params.go deleted file mode 100644 index f6d1434d..00000000 --- a/v2/models/uda_params.go +++ /dev/null @@ -1,160 +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" -) - -// UdaParams Recover Universal Data Adapter environment params. -// -// Specifies the recovery options specific to Universal Data Adapter environment. -// -// swagger:model UdaParams -type UdaParams struct { - - // Specifies the type of recover action to be performed. - // Required: true - // Enum: ["RecoverObjects"] - RecoveryAction *string `json:"recoveryAction"` - - // Specifies the parameters to recover Universal Data Adapter objects. - // Required: true - RecoverUdaParams *RecoverUdaParams `json:"recoverUdaParams"` -} - -// Validate validates this uda params -func (m *UdaParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverUdaParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var udaParamsTypeRecoveryActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["RecoverObjects"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - udaParamsTypeRecoveryActionPropEnum = append(udaParamsTypeRecoveryActionPropEnum, v) - } -} - -const ( - - // UdaParamsRecoveryActionRecoverObjects captures enum value "RecoverObjects" - UdaParamsRecoveryActionRecoverObjects string = "RecoverObjects" -) - -// prop value enum -func (m *UdaParams) validateRecoveryActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, udaParamsTypeRecoveryActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UdaParams) validateRecoveryAction(formats strfmt.Registry) error { - - if err := validate.Required("recoveryAction", "body", m.RecoveryAction); err != nil { - return err - } - - // value enum - if err := m.validateRecoveryActionEnum("recoveryAction", "body", *m.RecoveryAction); err != nil { - return err - } - - return nil -} - -func (m *UdaParams) validateRecoverUdaParams(formats strfmt.Registry) error { - - if err := validate.Required("recoverUdaParams", "body", m.RecoverUdaParams); err != nil { - return err - } - - if m.RecoverUdaParams != nil { - if err := m.RecoverUdaParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverUdaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverUdaParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda params based on the context it is used -func (m *UdaParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoverUdaParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaParams) contextValidateRecoverUdaParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoverUdaParams != nil { - - if err := m.RecoverUdaParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoverUdaParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoverUdaParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaParams) UnmarshalBinary(b []byte) error { - var res UdaParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_protection_group_object_params.go b/v2/models/uda_protection_group_object_params.go deleted file mode 100644 index 47aec26e..00000000 --- a/v2/models/uda_protection_group_object_params.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" -) - -// UdaProtectionGroupObjectParams Specifies the Universal Data Adapter object details. -// -// swagger:model UdaProtectionGroupObjectParams -type UdaProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - ID *int64 `json:"id,omitempty"` - - // Specifies the fully qualified name of the object. - Name *string `json:"name,omitempty"` -} - -// Validate validates this uda protection group object params -func (m *UdaProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda protection group object params based on context it is used -func (m *UdaProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res UdaProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_protection_group_params.go b/v2/models/uda_protection_group_params.go deleted file mode 100644 index 3a674cdd..00000000 --- a/v2/models/uda_protection_group_params.go +++ /dev/null @@ -1,279 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UdaProtectionGroupParams Specifies parameters related to the Universal Data Adapter Protection job. -// -// swagger:model UdaProtectionGroupParams -type UdaProtectionGroupParams struct { - - // Specifies the source Id of the objects to be protected. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies a list of fully qualified names of the objects to be protected. - // Required: true - // Min Items: 1 - Objects []*UdaProtectionGroupObjectParams `json:"objects"` - - // Specifies the custom arguments to be supplied to the full backup script when a full backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - FullBackupArgs *string `json:"fullBackupArgs,omitempty"` - - // Specifies the custom arguments to be supplied to the incremental backup script when an incremental backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - IncrBackupArgs *string `json:"incrBackupArgs,omitempty"` - - // Specifies the custom arguments to be supplied to the log backup script when a log backup is enabled in the policy. This field is deprecated. Use backupJobArguments instead. - LogBackupArgs *string `json:"logBackupArgs,omitempty"` - - // Specifies the map of custom arguments to be supplied to the various backup scripts. - BackupJobArguments []*KeyValuePair `json:"backupJobArguments"` - - // Specifies the maximum number of concurrent IO Streams that will be created to exchange data with the cluster. If not specified, the default value is taken as 1. - Concurrency *int32 `json:"concurrency,omitempty"` - - // Specifies the maximum number of view mounts per host. If not specified, the default value is taken as 1. - Mounts *int32 `json:"mounts,omitempty"` - - // Specifies whether this Protection Group is created from a source having entity support. - // Read Only: true - HasEntitySupport *bool `json:"hasEntitySupport,omitempty"` - - // Specifies the objects to be excluded in the Protection Group. - // Unique: true - ExcludeObjectIds []int64 `json:"excludeObjectIds"` - - // Specifies whether this Protection Group is created from a source having externally triggered log backup support. - // Read Only: true - EtLogBackup *bool `json:"etLogBackup,omitempty"` -} - -// Validate validates this uda protection group params -func (m *UdaProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBackupJobArguments(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExcludeObjectIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionGroupParams) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *UdaProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaProtectionGroupParams) validateBackupJobArguments(formats strfmt.Registry) error { - if swag.IsZero(m.BackupJobArguments) { // not required - return nil - } - - for i := 0; i < len(m.BackupJobArguments); i++ { - if swag.IsZero(m.BackupJobArguments[i]) { // not required - continue - } - - if m.BackupJobArguments[i] != nil { - if err := m.BackupJobArguments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaProtectionGroupParams) validateExcludeObjectIds(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeObjectIds) { // not required - return nil - } - - if err := validate.UniqueItems("excludeObjectIds", "body", m.ExcludeObjectIds); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this uda protection group params based on the context it is used -func (m *UdaProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBackupJobArguments(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHasEntitySupport(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEtLogBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaProtectionGroupParams) contextValidateBackupJobArguments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.BackupJobArguments); i++ { - - if m.BackupJobArguments[i] != nil { - - if swag.IsZero(m.BackupJobArguments[i]) { // not required - return nil - } - - if err := m.BackupJobArguments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backupJobArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaProtectionGroupParams) contextValidateHasEntitySupport(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "hasEntitySupport", "body", m.HasEntitySupport); err != nil { - return err - } - - return nil -} - -func (m *UdaProtectionGroupParams) contextValidateEtLogBackup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "etLogBackup", "body", m.EtLogBackup); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res UdaProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_protection_params.go b/v2/models/uda_protection_params.go deleted file mode 100644 index 74355069..00000000 --- a/v2/models/uda_protection_params.go +++ /dev/null @@ -1,495 +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" -) - -// UdaProtectionParams Parameters to customize protection workflow. -// -// swagger:model UdaProtectionParams -type UdaProtectionParams struct { - - // dynamic form - DynamicForm *UdaDynamicFormParams `json:"dynamicForm,omitempty"` - - // primary fields - PrimaryFields *UdaProtectionParamsPrimaryFields `json:"primaryFields,omitempty"` -} - -// Validate validates this uda protection params -func (m *UdaProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDynamicForm(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryFields(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionParams) validateDynamicForm(formats strfmt.Registry) error { - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if m.DynamicForm != nil { - if err := m.DynamicForm.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParams) validatePrimaryFields(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if m.PrimaryFields != nil { - if err := m.PrimaryFields.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda protection params based on the context it is used -func (m *UdaProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDynamicForm(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionParams) contextValidateDynamicForm(ctx context.Context, formats strfmt.Registry) error { - - if m.DynamicForm != nil { - - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if err := m.DynamicForm.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParams) contextValidatePrimaryFields(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryFields != nil { - - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if err := m.PrimaryFields.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionParams) UnmarshalBinary(b []byte) error { - var res UdaProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaProtectionParamsPrimaryFields Parameters to customize existing/ default form fields. -// -// swagger:model UdaProtectionParamsPrimaryFields -type UdaProtectionParamsPrimaryFields struct { - - // full backup args - FullBackupArgs *UdaProtectionParamsPrimaryFieldsFullBackupArgs `json:"fullBackupArgs,omitempty"` - - // incr backup args - IncrBackupArgs *UdaProtectionParamsPrimaryFieldsIncrBackupArgs `json:"incrBackupArgs,omitempty"` - - // log backup args - LogBackupArgs *UdaProtectionParamsPrimaryFieldsLogBackupArgs `json:"logBackupArgs,omitempty"` -} - -// Validate validates this uda protection params primary fields -func (m *UdaProtectionParamsPrimaryFields) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFullBackupArgs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIncrBackupArgs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogBackupArgs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) validateFullBackupArgs(formats strfmt.Registry) error { - if swag.IsZero(m.FullBackupArgs) { // not required - return nil - } - - if m.FullBackupArgs != nil { - if err := m.FullBackupArgs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "fullBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "fullBackupArgs") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) validateIncrBackupArgs(formats strfmt.Registry) error { - if swag.IsZero(m.IncrBackupArgs) { // not required - return nil - } - - if m.IncrBackupArgs != nil { - if err := m.IncrBackupArgs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "incrBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "incrBackupArgs") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) validateLogBackupArgs(formats strfmt.Registry) error { - if swag.IsZero(m.LogBackupArgs) { // not required - return nil - } - - if m.LogBackupArgs != nil { - if err := m.LogBackupArgs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "logBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "logBackupArgs") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda protection params primary fields based on the context it is used -func (m *UdaProtectionParamsPrimaryFields) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFullBackupArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIncrBackupArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogBackupArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) contextValidateFullBackupArgs(ctx context.Context, formats strfmt.Registry) error { - - if m.FullBackupArgs != nil { - - if swag.IsZero(m.FullBackupArgs) { // not required - return nil - } - - if err := m.FullBackupArgs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "fullBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "fullBackupArgs") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) contextValidateIncrBackupArgs(ctx context.Context, formats strfmt.Registry) error { - - if m.IncrBackupArgs != nil { - - if swag.IsZero(m.IncrBackupArgs) { // not required - return nil - } - - if err := m.IncrBackupArgs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "incrBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "incrBackupArgs") - } - return err - } - } - - return nil -} - -func (m *UdaProtectionParamsPrimaryFields) contextValidateLogBackupArgs(ctx context.Context, formats strfmt.Registry) error { - - if m.LogBackupArgs != nil { - - if swag.IsZero(m.LogBackupArgs) { // not required - return nil - } - - if err := m.LogBackupArgs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "logBackupArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "logBackupArgs") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFields) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFields) UnmarshalBinary(b []byte) error { - var res UdaProtectionParamsPrimaryFields - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaProtectionParamsPrimaryFieldsFullBackupArgs Specifies the custom arguments to be supplied to the full backup script when a full backup is enabled in the policy. -// -// swagger:model UdaProtectionParamsPrimaryFieldsFullBackupArgs -type UdaProtectionParamsPrimaryFieldsFullBackupArgs struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Whether the field will be only a readonly field on the UI. - Readonly *bool `json:"readonly,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` - - // Whether the field is mandatory. - Required *bool `json:"required,omitempty"` -} - -// Validate validates this uda protection params primary fields full backup args -func (m *UdaProtectionParamsPrimaryFieldsFullBackupArgs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda protection params primary fields full backup args based on context it is used -func (m *UdaProtectionParamsPrimaryFieldsFullBackupArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsFullBackupArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsFullBackupArgs) UnmarshalBinary(b []byte) error { - var res UdaProtectionParamsPrimaryFieldsFullBackupArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaProtectionParamsPrimaryFieldsIncrBackupArgs Specifies the custom arguments to be supplied to the incremental backup script when an incremental backup is enabled in the policy. -// -// swagger:model UdaProtectionParamsPrimaryFieldsIncrBackupArgs -type UdaProtectionParamsPrimaryFieldsIncrBackupArgs struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Whether the field will be only a readonly field on the UI. - Readonly *bool `json:"readonly,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` - - // Whether the field is mandatory. - Required *bool `json:"required,omitempty"` -} - -// Validate validates this uda protection params primary fields incr backup args -func (m *UdaProtectionParamsPrimaryFieldsIncrBackupArgs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda protection params primary fields incr backup args based on context it is used -func (m *UdaProtectionParamsPrimaryFieldsIncrBackupArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsIncrBackupArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsIncrBackupArgs) UnmarshalBinary(b []byte) error { - var res UdaProtectionParamsPrimaryFieldsIncrBackupArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaProtectionParamsPrimaryFieldsLogBackupArgs Specifies the custom arguments to be supplied to the log backup script when a log backup is enabled in the policy. -// -// swagger:model UdaProtectionParamsPrimaryFieldsLogBackupArgs -type UdaProtectionParamsPrimaryFieldsLogBackupArgs struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Whether the field will be only a readonly field on the UI. - Readonly *bool `json:"readonly,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` - - // Whether the field is mandatory. - Required *bool `json:"required,omitempty"` -} - -// Validate validates this uda protection params primary fields log backup args -func (m *UdaProtectionParamsPrimaryFieldsLogBackupArgs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda protection params primary fields log backup args based on context it is used -func (m *UdaProtectionParamsPrimaryFieldsLogBackupArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsLogBackupArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionParamsPrimaryFieldsLogBackupArgs) UnmarshalBinary(b []byte) error { - var res UdaProtectionParamsPrimaryFieldsLogBackupArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_protection_run_params.go b/v2/models/uda_protection_run_params.go deleted file mode 100644 index 0132d84b..00000000 --- a/v2/models/uda_protection_run_params.go +++ /dev/null @@ -1,109 +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" -) - -// UdaProtectionRunParams Specifies the parameters for Universal Data Adapter protection run. -// -// swagger:model UdaProtectionRunParams -type UdaProtectionRunParams struct { - - // Specifies the parameters for an externally triggered run. - ExternallyTriggeredRunParams *UdaExternallyTriggeredRunParams `json:"externallyTriggeredRunParams,omitempty"` -} - -// Validate validates this uda protection run params -func (m *UdaProtectionRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExternallyTriggeredRunParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionRunParams) validateExternallyTriggeredRunParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExternallyTriggeredRunParams) { // not required - return nil - } - - if m.ExternallyTriggeredRunParams != nil { - if err := m.ExternallyTriggeredRunParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredRunParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda protection run params based on the context it is used -func (m *UdaProtectionRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExternallyTriggeredRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaProtectionRunParams) contextValidateExternallyTriggeredRunParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternallyTriggeredRunParams != nil { - - if swag.IsZero(m.ExternallyTriggeredRunParams) { // not required - return nil - } - - if err := m.ExternallyTriggeredRunParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredRunParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredRunParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaProtectionRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaProtectionRunParams) UnmarshalBinary(b []byte) error { - var res UdaProtectionRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_recovery_params.go b/v2/models/uda_recovery_params.go deleted file mode 100644 index 63ed1df0..00000000 --- a/v2/models/uda_recovery_params.go +++ /dev/null @@ -1,301 +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" -) - -// UdaRecoveryParams Parameters to customize recovery workflow. -// -// swagger:model UdaRecoveryParams -type UdaRecoveryParams struct { - - // dynamic form - DynamicForm *UdaDynamicFormParams `json:"dynamicForm,omitempty"` - - // primary fields - PrimaryFields *UdaRecoveryParamsPrimaryFields `json:"primaryFields,omitempty"` -} - -// Validate validates this uda recovery params -func (m *UdaRecoveryParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDynamicForm(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryFields(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoveryParams) validateDynamicForm(formats strfmt.Registry) error { - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if m.DynamicForm != nil { - if err := m.DynamicForm.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaRecoveryParams) validatePrimaryFields(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if m.PrimaryFields != nil { - if err := m.PrimaryFields.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda recovery params based on the context it is used -func (m *UdaRecoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDynamicForm(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoveryParams) contextValidateDynamicForm(ctx context.Context, formats strfmt.Registry) error { - - if m.DynamicForm != nil { - - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if err := m.DynamicForm.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaRecoveryParams) contextValidatePrimaryFields(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryFields != nil { - - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if err := m.PrimaryFields.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoveryParams) UnmarshalBinary(b []byte) error { - var res UdaRecoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRecoveryParamsPrimaryFields Parameters to customize existing/ default form fields. -// -// swagger:model UdaRecoveryParamsPrimaryFields -type UdaRecoveryParamsPrimaryFields struct { - - // recovery args - RecoveryArgs *UdaRecoveryParamsPrimaryFieldsRecoveryArgs `json:"recoveryArgs,omitempty"` -} - -// Validate validates this uda recovery params primary fields -func (m *UdaRecoveryParamsPrimaryFields) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryArgs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoveryParamsPrimaryFields) validateRecoveryArgs(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryArgs) { // not required - return nil - } - - if m.RecoveryArgs != nil { - if err := m.RecoveryArgs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "recoveryArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "recoveryArgs") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda recovery params primary fields based on the context it is used -func (m *UdaRecoveryParamsPrimaryFields) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRecoveryParamsPrimaryFields) contextValidateRecoveryArgs(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryArgs != nil { - - if swag.IsZero(m.RecoveryArgs) { // not required - return nil - } - - if err := m.RecoveryArgs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "recoveryArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "recoveryArgs") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoveryParamsPrimaryFields) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoveryParamsPrimaryFields) UnmarshalBinary(b []byte) error { - var res UdaRecoveryParamsPrimaryFields - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRecoveryParamsPrimaryFieldsRecoveryArgs Specifies custom arguments to be supplied to the source recovery. -// -// swagger:model UdaRecoveryParamsPrimaryFieldsRecoveryArgs -type UdaRecoveryParamsPrimaryFieldsRecoveryArgs struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Whether the field will be only a readonly field on the UI. - Readonly *bool `json:"readonly,omitempty"` - - // Whether the field is mandatory. - Required *bool `json:"required,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` -} - -// Validate validates this uda recovery params primary fields recovery args -func (m *UdaRecoveryParamsPrimaryFieldsRecoveryArgs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda recovery params primary fields recovery args based on context it is used -func (m *UdaRecoveryParamsPrimaryFieldsRecoveryArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRecoveryParamsPrimaryFieldsRecoveryArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRecoveryParamsPrimaryFieldsRecoveryArgs) UnmarshalBinary(b []byte) error { - var res UdaRecoveryParamsPrimaryFieldsRecoveryArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_registration_params.go b/v2/models/uda_registration_params.go deleted file mode 100644 index d3307a9f..00000000 --- a/v2/models/uda_registration_params.go +++ /dev/null @@ -1,568 +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" -) - -// UdaRegistrationParams Parameters to customize registration workflow. -// -// swagger:model UdaRegistrationParams -type UdaRegistrationParams struct { - - // dynamic form - DynamicForm *UdaDynamicFormParams `json:"dynamicForm,omitempty"` - - // primary fields - PrimaryFields *UdaRegistrationParamsPrimaryFields `json:"primaryFields,omitempty"` -} - -// Validate validates this uda registration params -func (m *UdaRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDynamicForm(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePrimaryFields(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRegistrationParams) validateDynamicForm(formats strfmt.Registry) error { - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if m.DynamicForm != nil { - if err := m.DynamicForm.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParams) validatePrimaryFields(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if m.PrimaryFields != nil { - if err := m.PrimaryFields.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda registration params based on the context it is used -func (m *UdaRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDynamicForm(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRegistrationParams) contextValidateDynamicForm(ctx context.Context, formats strfmt.Registry) error { - - if m.DynamicForm != nil { - - if swag.IsZero(m.DynamicForm) { // not required - return nil - } - - if err := m.DynamicForm.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dynamicForm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dynamicForm") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParams) contextValidatePrimaryFields(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryFields != nil { - - if swag.IsZero(m.PrimaryFields) { // not required - return nil - } - - if err := m.PrimaryFields.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParams) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRegistrationParamsPrimaryFields Parameters to customize existing/ default form fields. -// -// swagger:model UdaRegistrationParamsPrimaryFields -type UdaRegistrationParamsPrimaryFields struct { - - // app authentication - AppAuthentication *UdaRegistrationParamsPrimaryFieldsAppAuthentication `json:"appAuthentication,omitempty"` - - // mount view - MountView *UdaRegistrationParamsPrimaryFieldsMountView `json:"mountView,omitempty"` - - // script dir - ScriptDir *UdaRegistrationParamsPrimaryFieldsScriptDir `json:"scriptDir,omitempty"` - - // source registration args - SourceRegistrationArgs *UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs `json:"sourceRegistrationArgs,omitempty"` -} - -// Validate validates this uda registration params primary fields -func (m *UdaRegistrationParamsPrimaryFields) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppAuthentication(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountView(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScriptDir(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceRegistrationArgs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) validateAppAuthentication(formats strfmt.Registry) error { - if swag.IsZero(m.AppAuthentication) { // not required - return nil - } - - if m.AppAuthentication != nil { - if err := m.AppAuthentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "appAuthentication") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "appAuthentication") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) validateMountView(formats strfmt.Registry) error { - if swag.IsZero(m.MountView) { // not required - return nil - } - - if m.MountView != nil { - if err := m.MountView.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "mountView") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "mountView") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) validateScriptDir(formats strfmt.Registry) error { - if swag.IsZero(m.ScriptDir) { // not required - return nil - } - - if m.ScriptDir != nil { - if err := m.ScriptDir.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "scriptDir") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "scriptDir") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) validateSourceRegistrationArgs(formats strfmt.Registry) error { - if swag.IsZero(m.SourceRegistrationArgs) { // not required - return nil - } - - if m.SourceRegistrationArgs != nil { - if err := m.SourceRegistrationArgs.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "sourceRegistrationArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "sourceRegistrationArgs") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda registration params primary fields based on the context it is used -func (m *UdaRegistrationParamsPrimaryFields) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppAuthentication(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMountView(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScriptDir(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceRegistrationArgs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) contextValidateAppAuthentication(ctx context.Context, formats strfmt.Registry) error { - - if m.AppAuthentication != nil { - - if swag.IsZero(m.AppAuthentication) { // not required - return nil - } - - if err := m.AppAuthentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "appAuthentication") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "appAuthentication") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) contextValidateMountView(ctx context.Context, formats strfmt.Registry) error { - - if m.MountView != nil { - - if swag.IsZero(m.MountView) { // not required - return nil - } - - if err := m.MountView.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "mountView") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "mountView") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) contextValidateScriptDir(ctx context.Context, formats strfmt.Registry) error { - - if m.ScriptDir != nil { - - if swag.IsZero(m.ScriptDir) { // not required - return nil - } - - if err := m.ScriptDir.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "scriptDir") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "scriptDir") - } - return err - } - } - - return nil -} - -func (m *UdaRegistrationParamsPrimaryFields) contextValidateSourceRegistrationArgs(ctx context.Context, formats strfmt.Registry) error { - - if m.SourceRegistrationArgs != nil { - - if swag.IsZero(m.SourceRegistrationArgs) { // not required - return nil - } - - if err := m.SourceRegistrationArgs.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primaryFields" + "." + "sourceRegistrationArgs") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primaryFields" + "." + "sourceRegistrationArgs") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFields) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFields) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParamsPrimaryFields - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRegistrationParamsPrimaryFieldsAppAuthentication Specifies config for the app authentication -// -// swagger:model UdaRegistrationParamsPrimaryFieldsAppAuthentication -type UdaRegistrationParamsPrimaryFieldsAppAuthentication struct { - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` -} - -// Validate validates this uda registration params primary fields app authentication -func (m *UdaRegistrationParamsPrimaryFieldsAppAuthentication) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda registration params primary fields app authentication based on context it is used -func (m *UdaRegistrationParamsPrimaryFieldsAppAuthentication) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsAppAuthentication) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsAppAuthentication) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParamsPrimaryFieldsAppAuthentication - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRegistrationParamsPrimaryFieldsMountView Specifies if SMB/NFS view mounting should be enabled on source. -// -// swagger:model UdaRegistrationParamsPrimaryFieldsMountView -type UdaRegistrationParamsPrimaryFieldsMountView struct { - - // Default value for the field. - DefaultValue *bool `json:"defaultValue,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` -} - -// Validate validates this uda registration params primary fields mount view -func (m *UdaRegistrationParamsPrimaryFieldsMountView) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda registration params primary fields mount view based on context it is used -func (m *UdaRegistrationParamsPrimaryFieldsMountView) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsMountView) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsMountView) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParamsPrimaryFieldsMountView - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRegistrationParamsPrimaryFieldsScriptDir Specifies the absolute path of scripts used to interact with the Universal Data Adapter source. -// -// swagger:model UdaRegistrationParamsPrimaryFieldsScriptDir -type UdaRegistrationParamsPrimaryFieldsScriptDir struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` -} - -// Validate validates this uda registration params primary fields script dir -func (m *UdaRegistrationParamsPrimaryFieldsScriptDir) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda registration params primary fields script dir based on context it is used -func (m *UdaRegistrationParamsPrimaryFieldsScriptDir) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsScriptDir) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsScriptDir) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParamsPrimaryFieldsScriptDir - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs Specifies custom arguments to be supplied to the source registration. -// -// swagger:model UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs -type UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs struct { - - // Default value for the field. - DefaultValue *string `json:"defaultValue,omitempty"` - - // Whether the field will be only a readonly field on the UI. - Readonly *bool `json:"readonly,omitempty"` - - // Whether the field is mandatory. - Required *bool `json:"required,omitempty"` - - // Specifies if the field will be hidden on the UI screen or not. - Hidden *bool `json:"hidden,omitempty"` -} - -// Validate validates this uda registration params primary fields source registration args -func (m *UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda registration params primary fields source registration args based on context it is used -func (m *UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs) UnmarshalBinary(b []byte) error { - var res UdaRegistrationParamsPrimaryFieldsSourceRegistrationArgs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_search_params.go b/v2/models/uda_search_params.go deleted file mode 100644 index 5e821b05..00000000 --- a/v2/models/uda_search_params.go +++ /dev/null @@ -1,71 +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" -) - -// UdaSearchParams Specifies the parameters which are specific for searching Universal Data Adapter objects. -// -// swagger:model UdaSearchParams -type UdaSearchParams struct { - - // Specifies the search string to search the Universal Data Adapter Objects - // Required: true - SearchString *string `json:"searchString"` -} - -// Validate validates this uda search params -func (m *UdaSearchParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSearchString(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaSearchParams) validateSearchString(formats strfmt.Registry) error { - - if err := validate.Required("searchString", "body", m.SearchString); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this uda search params based on context it is used -func (m *UdaSearchParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSearchParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSearchParams) UnmarshalBinary(b []byte) error { - var res UdaSearchParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_source_registration_params.go b/v2/models/uda_source_registration_params.go deleted file mode 100644 index 7dbf2c6a..00000000 --- a/v2/models/uda_source_registration_params.go +++ /dev/null @@ -1,426 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UdaSourceRegistrationParams Register Universal Data Adapter source registration request parameters. -// -// Specifies parameters to register a Universal Data Adapter source. -// -// swagger:model UdaSourceRegistrationParams -type UdaSourceRegistrationParams struct { - - // Specifies the source type for Universal Data Adapter source. - // Required: true - SourceType *string `json:"sourceType"` - - // Specifies the OS type for Universal Data Adapter source. - // Enum: ["kLinux","kWindows","kAix"] - OsType *string `json:"osType,omitempty"` - - // Specifies the IPs/hostnames for the nodes forming the Universal Data Adapter source cluster. - // Required: true - // Min Items: 1 - // Unique: true - Hosts []string `json:"hosts"` - - // Specifies the absolute path of scripts used to interact with the Universal Data Adapter source. - // Required: true - ScriptDir *string `json:"scriptDir"` - - // Specifies if SMB/NFS view mounting should be enabled on source. Default value is false. - MountView *bool `json:"mountView,omitempty"` - - // Specifies custom arguments to be supplied to the source registration scripts. This field is deprecated. Use sourceRegistrationArguments instead. - SourceRegistrationArgs *string `json:"sourceRegistrationArgs,omitempty"` - - // Specifies the map of custom arguments to be supplied to the source registration scripts. - SourceRegistrationArguments []*KeyValuePair `json:"sourceRegistrationArguments"` - - // credentials - Credentials *UdaSourceRegistrationParamsCredentials `json:"credentials,omitempty"` - - // view params - ViewParams *UdaSourceRegistrationParamsViewParams `json:"viewParams,omitempty"` -} - -// Validate validates this uda source registration params -func (m *UdaSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOsType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScriptDir(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSourceRegistrationArguments(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaSourceRegistrationParams) validateSourceType(formats strfmt.Registry) error { - - if err := validate.Required("sourceType", "body", m.SourceType); err != nil { - return err - } - - return nil -} - -var udaSourceRegistrationParamsTypeOsTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kLinux","kWindows","kAix"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - udaSourceRegistrationParamsTypeOsTypePropEnum = append(udaSourceRegistrationParamsTypeOsTypePropEnum, v) - } -} - -const ( - - // UdaSourceRegistrationParamsOsTypeKLinux captures enum value "kLinux" - UdaSourceRegistrationParamsOsTypeKLinux string = "kLinux" - - // UdaSourceRegistrationParamsOsTypeKWindows captures enum value "kWindows" - UdaSourceRegistrationParamsOsTypeKWindows string = "kWindows" - - // UdaSourceRegistrationParamsOsTypeKAix captures enum value "kAix" - UdaSourceRegistrationParamsOsTypeKAix string = "kAix" -) - -// prop value enum -func (m *UdaSourceRegistrationParams) validateOsTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, udaSourceRegistrationParamsTypeOsTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UdaSourceRegistrationParams) validateOsType(formats strfmt.Registry) error { - if swag.IsZero(m.OsType) { // not required - return nil - } - - // value enum - if err := m.validateOsTypeEnum("osType", "body", *m.OsType); err != nil { - return err - } - - return nil -} - -func (m *UdaSourceRegistrationParams) validateHosts(formats strfmt.Registry) error { - - if err := validate.Required("hosts", "body", m.Hosts); err != nil { - return err - } - - iHostsSize := int64(len(m.Hosts)) - - if err := validate.MinItems("hosts", "body", iHostsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("hosts", "body", m.Hosts); err != nil { - return err - } - - return nil -} - -func (m *UdaSourceRegistrationParams) validateScriptDir(formats strfmt.Registry) error { - - if err := validate.Required("scriptDir", "body", m.ScriptDir); err != nil { - return err - } - - return nil -} - -func (m *UdaSourceRegistrationParams) validateSourceRegistrationArguments(formats strfmt.Registry) error { - if swag.IsZero(m.SourceRegistrationArguments) { // not required - return nil - } - - for i := 0; i < len(m.SourceRegistrationArguments); i++ { - if swag.IsZero(m.SourceRegistrationArguments[i]) { // not required - continue - } - - if m.SourceRegistrationArguments[i] != nil { - if err := m.SourceRegistrationArguments[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaSourceRegistrationParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *UdaSourceRegistrationParams) validateViewParams(formats strfmt.Registry) error { - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if m.ViewParams != nil { - if err := m.ViewParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this uda source registration params based on the context it is used -func (m *UdaSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceRegistrationArguments(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UdaSourceRegistrationParams) contextValidateSourceRegistrationArguments(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SourceRegistrationArguments); i++ { - - if m.SourceRegistrationArguments[i] != nil { - - if swag.IsZero(m.SourceRegistrationArguments[i]) { // not required - return nil - } - - if err := m.SourceRegistrationArguments[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceRegistrationArguments" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UdaSourceRegistrationParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -func (m *UdaSourceRegistrationParams) contextValidateViewParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewParams != nil { - - if swag.IsZero(m.ViewParams) { // not required - return nil - } - - if err := m.ViewParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res UdaSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaSourceRegistrationParamsCredentials Specifies credentials to access the Universal Data Adapter source. For e.g.: To perform backup and recovery tasks with Oracle Recovery Manager (RMAN), specify credentials for a user having 'SYSDBA' or 'SYSBACKUP' administrative privilege. -// -// swagger:model UdaSourceRegistrationParamsCredentials -type UdaSourceRegistrationParamsCredentials struct { - - // Specifies the password to access target entity. - Password *string `json:"password,omitempty"` - - // Specifies the username to access target entity. - Username *string `json:"username,omitempty"` -} - -// Validate validates this uda source registration params credentials -func (m *UdaSourceRegistrationParamsCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda source registration params credentials based on context it is used -func (m *UdaSourceRegistrationParamsCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSourceRegistrationParamsCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSourceRegistrationParamsCredentials) UnmarshalBinary(b []byte) error { - var res UdaSourceRegistrationParamsCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// UdaSourceRegistrationParamsViewParams Specifies optional configuration parameters for the mounted view. -// -// swagger:model UdaSourceRegistrationParamsViewParams -type UdaSourceRegistrationParamsViewParams struct { - - // This field is deprecated and its value will be ignored. It was used to specify the absolute path on the host where the Cohesity view would be mounted. This is now controlled by the agent configuration and is common for all the Universal Data Adapter sources. - MountDir *string `json:"mountDir,omitempty"` -} - -// Validate validates this uda source registration params view params -func (m *UdaSourceRegistrationParamsViewParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uda source registration params view params based on context it is used -func (m *UdaSourceRegistrationParamsViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSourceRegistrationParamsViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSourceRegistrationParamsViewParams) UnmarshalBinary(b []byte) error { - var res UdaSourceRegistrationParamsViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uda_source_type.go b/v2/models/uda_source_type.go deleted file mode 100644 index 133e2175..00000000 --- a/v2/models/uda_source_type.go +++ /dev/null @@ -1,137 +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" -) - -// UdaSourceType Enumeration of all the supported source types for the Universal Data Adapter. -// -// Enumeration of all the supported source types for the Universal Data Adapter. -// -// swagger:model UdaSourceType -type UdaSourceType struct { - - // Enumeration of all the supported source types for the Universal Data Adapter. - // Enum: ["kCockroachDB","kDB2","kMySQL","kOther","kSapHana","kSapMaxDB","kSapOracle","kSapSybase","kSapSybaseIQ","kSapASE","kPostgreSQL","kCouchbaseV2"] - Type string `json:"type,omitempty"` -} - -// Validate validates this uda source type -func (m *UdaSourceType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var udaSourceTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kCockroachDB","kDB2","kMySQL","kOther","kSapHana","kSapMaxDB","kSapOracle","kSapSybase","kSapSybaseIQ","kSapASE","kPostgreSQL","kCouchbaseV2"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - udaSourceTypeTypeTypePropEnum = append(udaSourceTypeTypeTypePropEnum, v) - } -} - -const ( - - // UdaSourceTypeTypeKCockroachDB captures enum value "kCockroachDB" - UdaSourceTypeTypeKCockroachDB string = "kCockroachDB" - - // UdaSourceTypeTypeKDB2 captures enum value "kDB2" - UdaSourceTypeTypeKDB2 string = "kDB2" - - // UdaSourceTypeTypeKMySQL captures enum value "kMySQL" - UdaSourceTypeTypeKMySQL string = "kMySQL" - - // UdaSourceTypeTypeKOther captures enum value "kOther" - UdaSourceTypeTypeKOther string = "kOther" - - // UdaSourceTypeTypeKSapHana captures enum value "kSapHana" - UdaSourceTypeTypeKSapHana string = "kSapHana" - - // UdaSourceTypeTypeKSapMaxDB captures enum value "kSapMaxDB" - UdaSourceTypeTypeKSapMaxDB string = "kSapMaxDB" - - // UdaSourceTypeTypeKSapOracle captures enum value "kSapOracle" - UdaSourceTypeTypeKSapOracle string = "kSapOracle" - - // UdaSourceTypeTypeKSapSybase captures enum value "kSapSybase" - UdaSourceTypeTypeKSapSybase string = "kSapSybase" - - // UdaSourceTypeTypeKSapSybaseIQ captures enum value "kSapSybaseIQ" - UdaSourceTypeTypeKSapSybaseIQ string = "kSapSybaseIQ" - - // UdaSourceTypeTypeKSapASE captures enum value "kSapASE" - UdaSourceTypeTypeKSapASE string = "kSapASE" - - // UdaSourceTypeTypeKPostgreSQL captures enum value "kPostgreSQL" - UdaSourceTypeTypeKPostgreSQL string = "kPostgreSQL" - - // UdaSourceTypeTypeKCouchbaseV2 captures enum value "kCouchbaseV2" - UdaSourceTypeTypeKCouchbaseV2 string = "kCouchbaseV2" -) - -// prop value enum -func (m *UdaSourceType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, udaSourceTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UdaSourceType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this uda source type based on context it is used -func (m *UdaSourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UdaSourceType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UdaSourceType) UnmarshalBinary(b []byte) error { - var res UdaSourceType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/universal_id.go b/v2/models/universal_id.go deleted file mode 100644 index 1c96a30a..00000000 --- a/v2/models/universal_id.go +++ /dev/null @@ -1,56 +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" -) - -// UniversalID universal Id -// -// swagger:model UniversalId -type UniversalID struct { - - // The id of the cluster at which the object was created. - ClusterID *int64 `json:"clusterId,omitempty"` - - // The incarnation id of the above cluster. - ClusterIncarnationID *int64 `json:"clusterIncarnationId,omitempty"` - - // The object id - this is unique within the above cluster. - ObjectID *int64 `json:"objectId,omitempty"` -} - -// Validate validates this universal Id -func (m *UniversalID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this universal Id based on context it is used -func (m *UniversalID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UniversalID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UniversalID) UnmarshalBinary(b []byte) error { - var res UniversalID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unplanned_failover_params.go b/v2/models/unplanned_failover_params.go deleted file mode 100644 index 1fe99ea6..00000000 --- a/v2/models/unplanned_failover_params.go +++ /dev/null @@ -1,50 +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" -) - -// UnplannedFailoverParams Specifies parameters of an unplanned failover. -// -// swagger:model UnplannedFailoverParams -type UnplannedFailoverParams struct { - - // Specifies whether a reverse replication needs to be set for the view on target cluster after failover. - ReverseReplication *bool `json:"reverseReplication,omitempty"` -} - -// Validate validates this unplanned failover params -func (m *UnplannedFailoverParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this unplanned failover params based on context it is used -func (m *UnplannedFailoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UnplannedFailoverParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnplannedFailoverParams) UnmarshalBinary(b []byte) error { - var res UnplannedFailoverParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unprotect_action_object_level_params.go b/v2/models/unprotect_action_object_level_params.go deleted file mode 100644 index be76cf7c..00000000 --- a/v2/models/unprotect_action_object_level_params.go +++ /dev/null @@ -1,128 +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" -) - -// UnprotectActionObjectLevelParams Specifies the request parameters for Unprotect action on a Protected object. -// -// swagger:model UnprotectActionObjectLevelParams -type UnprotectActionObjectLevelParams struct { - ProtectionObjectInput - - // Specifies whether to delete all snapshots along with unprotecting object protection. If set to true, all snapshots will be deleted and no more recoverable. - DeleteAllSnapshots *bool `json:"deleteAllSnapshots,omitempty"` - - // If specified as true then it will cancel the ongoing runs and immediatly unprotect. - ForceUnprotect *bool `json:"forceUnprotect,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UnprotectActionObjectLevelParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionObjectInput - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionObjectInput = aO0 - - // AO1 - var dataAO1 struct { - DeleteAllSnapshots *bool `json:"deleteAllSnapshots,omitempty"` - - ForceUnprotect *bool `json:"forceUnprotect,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.DeleteAllSnapshots = dataAO1.DeleteAllSnapshots - - m.ForceUnprotect = dataAO1.ForceUnprotect - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UnprotectActionObjectLevelParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ProtectionObjectInput) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - DeleteAllSnapshots *bool `json:"deleteAllSnapshots,omitempty"` - - ForceUnprotect *bool `json:"forceUnprotect,omitempty"` - } - - dataAO1.DeleteAllSnapshots = m.DeleteAllSnapshots - - dataAO1.ForceUnprotect = m.ForceUnprotect - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this unprotect action object level params -func (m *UnprotectActionObjectLevelParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this unprotect action object level params based on the context it is used -func (m *UnprotectActionObjectLevelParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionObjectInput - if err := m.ProtectionObjectInput.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UnprotectActionObjectLevelParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnprotectActionObjectLevelParams) UnmarshalBinary(b []byte) error { - var res UnprotectActionObjectLevelParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unprotect_action_object_level_response.go b/v2/models/unprotect_action_object_level_response.go deleted file mode 100644 index 0a07213f..00000000 --- a/v2/models/unprotect_action_object_level_response.go +++ /dev/null @@ -1,109 +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" -) - -// UnprotectActionObjectLevelResponse Specifies the infomration about status of Unprotect action. -// -// swagger:model UnprotectActionObjectLevelResponse -type UnprotectActionObjectLevelResponse struct { - - // If the action fails for this object, then error will be return here. - Error *Error `json:"error,omitempty"` -} - -// Validate validates this unprotect action object level response -func (m *UnprotectActionObjectLevelResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateError(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnprotectActionObjectLevelResponse) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required - 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 -} - -// ContextValidate validate this unprotect action object level response based on the context it is used -func (m *UnprotectActionObjectLevelResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateError(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnprotectActionObjectLevelResponse) 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 -} - -// MarshalBinary interface implementation -func (m *UnprotectActionObjectLevelResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnprotectActionObjectLevelResponse) UnmarshalBinary(b []byte) error { - var res UnprotectActionObjectLevelResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unregister_kerberos_provider.go b/v2/models/unregister_kerberos_provider.go deleted file mode 100644 index 8cf456ef..00000000 --- a/v2/models/unregister_kerberos_provider.go +++ /dev/null @@ -1,50 +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" -) - -// UnregisterKerberosProvider Response of Unregister Kerberos Provider. -// -// swagger:model UnregisterKerberosProvider -type UnregisterKerberosProvider struct { - - // A status message returned upon unregistering. - Message string `json:"message,omitempty"` -} - -// Validate validates this unregister kerberos provider -func (m *UnregisterKerberosProvider) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this unregister kerberos provider based on context it is used -func (m *UnregisterKerberosProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UnregisterKerberosProvider) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnregisterKerberosProvider) UnmarshalBinary(b []byte) error { - var res UnregisterKerberosProvider - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unregister_kerberos_request.go b/v2/models/unregister_kerberos_request.go deleted file mode 100644 index 787f8aab..00000000 --- a/v2/models/unregister_kerberos_request.go +++ /dev/null @@ -1,74 +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" -) - -// UnregisterKerberosRequest Specifies the request to unregister a Kerberos Provider. -// -// swagger:model UnregisterKerberosRequest -type UnregisterKerberosRequest struct { - - // Specifies the password of Kerberos admin principal. - // Required: true - AdminPassword *string `json:"adminPassword"` - - // Specifies the name of the Kerberos admin principal. - AdminPrincipal *string `json:"adminPrincipal,omitempty"` -} - -// Validate validates this unregister kerberos request -func (m *UnregisterKerberosRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdminPassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnregisterKerberosRequest) validateAdminPassword(formats strfmt.Registry) error { - - if err := validate.Required("adminPassword", "body", m.AdminPassword); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this unregister kerberos request based on context it is used -func (m *UnregisterKerberosRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UnregisterKerberosRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnregisterKerberosRequest) UnmarshalBinary(b []byte) error { - var res UnregisterKerberosRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/unregister_swift_params.go b/v2/models/unregister_swift_params.go deleted file mode 100644 index 783bf46f..00000000 --- a/v2/models/unregister_swift_params.go +++ /dev/null @@ -1,127 +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" -) - -// UnregisterSwiftParams Specifies the parameters to unregister a Swift service from Keystone server. -// -// swagger:model UnregisterSwiftParams -type UnregisterSwiftParams struct { - - // Specifies the tenant Id who's Swift service will be unregistered. - // Required: true - TenantID *string `json:"tenantId"` - - // Specifies the credentials of the Keystone server. Keystone configuration associated to the tenant will be used if this field is not specified. - KeystoneCredentials *KeystoneCredentials `json:"keystoneCredentials,omitempty"` -} - -// Validate validates this unregister swift params -func (m *UnregisterSwiftParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeystoneCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnregisterSwiftParams) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenantId", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -func (m *UnregisterSwiftParams) validateKeystoneCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.KeystoneCredentials) { // not required - return nil - } - - if m.KeystoneCredentials != nil { - if err := m.KeystoneCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this unregister swift params based on the context it is used -func (m *UnregisterSwiftParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateKeystoneCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UnregisterSwiftParams) contextValidateKeystoneCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.KeystoneCredentials != nil { - - if swag.IsZero(m.KeystoneCredentials) { // not required - return nil - } - - if err := m.KeystoneCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keystoneCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keystoneCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UnregisterSwiftParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UnregisterSwiftParams) UnmarshalBinary(b []byte) error { - var res UnregisterSwiftParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/up_tiering_file_selection_type.go b/v2/models/up_tiering_file_selection_type.go deleted file mode 100644 index 850657ea..00000000 --- a/v2/models/up_tiering_file_selection_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpTieringFileSelectionType Data up-tiering file selection type. -// -// Data up-tiering file selection type. -// -// swagger:model UpTieringFileSelectionType -type UpTieringFileSelectionType struct { - - // Specifies the data up-tiering file selection type. - // Enum: ["LastAccessed","LastModified"] - Type string `json:"type,omitempty"` -} - -// Validate validates this up tiering file selection type -func (m *UpTieringFileSelectionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var upTieringFileSelectionTypeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LastAccessed","LastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upTieringFileSelectionTypeTypeTypePropEnum = append(upTieringFileSelectionTypeTypeTypePropEnum, v) - } -} - -const ( - - // UpTieringFileSelectionTypeTypeLastAccessed captures enum value "LastAccessed" - UpTieringFileSelectionTypeTypeLastAccessed string = "LastAccessed" - - // UpTieringFileSelectionTypeTypeLastModified captures enum value "LastModified" - UpTieringFileSelectionTypeTypeLastModified string = "LastModified" -) - -// prop value enum -func (m *UpTieringFileSelectionType) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upTieringFileSelectionTypeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpTieringFileSelectionType) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this up tiering file selection type based on context it is used -func (m *UpTieringFileSelectionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpTieringFileSelectionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpTieringFileSelectionType) UnmarshalBinary(b []byte) error { - var res UpTieringFileSelectionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_active_directory_request.go b/v2/models/update_active_directory_request.go deleted file mode 100644 index 82f33d91..00000000 --- a/v2/models/update_active_directory_request.go +++ /dev/null @@ -1,248 +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" -) - -// UpdateActiveDirectoryRequest Specifies the request to create an Active Directory. -// -// swagger:model UpdateActiveDirectoryRequest -type UpdateActiveDirectoryRequest struct { - CommonActiveDirectoryParams - - // Specifies if specified machine accounts should overwrite existing machine accounts. - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - // Specifies level of transitive Active Directory trust domains to be used. - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - // Specifies the params of a user with administrative privilege of this Active Directory. This field is mandatory if machine accounts are updated. - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams,omitempty"` - - // Specifies the params of the user id mapping info of an Active Directory. - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateActiveDirectoryRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonActiveDirectoryParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonActiveDirectoryParams = aO0 - - // AO1 - var dataAO1 struct { - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams,omitempty"` - - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.OverwriteMachineAccounts = dataAO1.OverwriteMachineAccounts - - m.TransitiveAdTrustLevelLimit = dataAO1.TransitiveAdTrustLevelLimit - - m.ActiveDirectoryAdminParams = dataAO1.ActiveDirectoryAdminParams - - m.IDMappingParams = dataAO1.IDMappingParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateActiveDirectoryRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonActiveDirectoryParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - OverwriteMachineAccounts *bool `json:"overwriteMachineAccounts,omitempty"` - - TransitiveAdTrustLevelLimit *int32 `json:"transitiveAdTrustLevelLimit,omitempty"` - - ActiveDirectoryAdminParams *ActiveDirectoryAdminParams `json:"activeDirectoryAdminParams,omitempty"` - - IDMappingParams *IDMappingParams `json:"idMappingParams,omitempty"` - } - - dataAO1.OverwriteMachineAccounts = m.OverwriteMachineAccounts - - dataAO1.TransitiveAdTrustLevelLimit = m.TransitiveAdTrustLevelLimit - - dataAO1.ActiveDirectoryAdminParams = m.ActiveDirectoryAdminParams - - dataAO1.IDMappingParams = m.IDMappingParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update active directory request -func (m *UpdateActiveDirectoryRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateActiveDirectoryAdminParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIDMappingParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateActiveDirectoryRequest) validateActiveDirectoryAdminParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ActiveDirectoryAdminParams) { // not required - return nil - } - - if m.ActiveDirectoryAdminParams != nil { - if err := m.ActiveDirectoryAdminParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -func (m *UpdateActiveDirectoryRequest) validateIDMappingParams(formats strfmt.Registry) error { - - if swag.IsZero(m.IDMappingParams) { // not required - return nil - } - - if m.IDMappingParams != nil { - if err := m.IDMappingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idMappingParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update active directory request based on the context it is used -func (m *UpdateActiveDirectoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonActiveDirectoryParams - if err := m.CommonActiveDirectoryParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateActiveDirectoryAdminParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIDMappingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateActiveDirectoryRequest) contextValidateActiveDirectoryAdminParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ActiveDirectoryAdminParams != nil { - - if swag.IsZero(m.ActiveDirectoryAdminParams) { // not required - return nil - } - - if err := m.ActiveDirectoryAdminParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeDirectoryAdminParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeDirectoryAdminParams") - } - return err - } - } - - return nil -} - -func (m *UpdateActiveDirectoryRequest) contextValidateIDMappingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.IDMappingParams != nil { - - if swag.IsZero(m.IDMappingParams) { // not required - return nil - } - - if err := m.IDMappingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idMappingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idMappingParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateActiveDirectoryRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateActiveDirectoryRequest) UnmarshalBinary(b []byte) error { - var res UpdateActiveDirectoryRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_archival_snapshot_config.go b/v2/models/update_archival_snapshot_config.go deleted file mode 100644 index 9a786a0b..00000000 --- a/v2/models/update_archival_snapshot_config.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateArchivalSnapshotConfig Archival Snapshot Config. -// -// Specifies the params to perform actions on archival snapshots taken by a Protection Group Run. -// -// swagger:model UpdateArchivalSnapshotConfig -type UpdateArchivalSnapshotConfig struct { - - // Specifies the new configuration about adding Archival Snapshot to existing Protection Group Run. - NewSnapshotConfig []*RunArchivalConfig `json:"newSnapshotConfig"` - - // Specifies the configuration about updating an existing Archival Snapshot Run. - UpdateExistingSnapshotConfig []*UpdateExistingArchivalSnapshotConfig `json:"updateExistingSnapshotConfig"` -} - -// Validate validates this update archival snapshot config -func (m *UpdateArchivalSnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdateExistingSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateArchivalSnapshotConfig) validateNewSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSnapshotConfig) { // not required - return nil - } - - for i := 0; i < len(m.NewSnapshotConfig); i++ { - if swag.IsZero(m.NewSnapshotConfig[i]) { // not required - continue - } - - if m.NewSnapshotConfig[i] != nil { - if err := m.NewSnapshotConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateArchivalSnapshotConfig) validateUpdateExistingSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateExistingSnapshotConfig) { // not required - return nil - } - - for i := 0; i < len(m.UpdateExistingSnapshotConfig); i++ { - if swag.IsZero(m.UpdateExistingSnapshotConfig[i]) { // not required - continue - } - - if m.UpdateExistingSnapshotConfig[i] != nil { - if err := m.UpdateExistingSnapshotConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update archival snapshot config based on the context it is used -func (m *UpdateArchivalSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdateExistingSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateArchivalSnapshotConfig) contextValidateNewSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NewSnapshotConfig); i++ { - - if m.NewSnapshotConfig[i] != nil { - - if swag.IsZero(m.NewSnapshotConfig[i]) { // not required - return nil - } - - if err := m.NewSnapshotConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateArchivalSnapshotConfig) contextValidateUpdateExistingSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateExistingSnapshotConfig); i++ { - - if m.UpdateExistingSnapshotConfig[i] != nil { - - if swag.IsZero(m.UpdateExistingSnapshotConfig[i]) { // not required - return nil - } - - if err := m.UpdateExistingSnapshotConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateArchivalSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateArchivalSnapshotConfig) UnmarshalBinary(b []byte) error { - var res UpdateArchivalSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_bifrost_connection_request.go b/v2/models/update_bifrost_connection_request.go deleted file mode 100644 index 216a946e..00000000 --- a/v2/models/update_bifrost_connection_request.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" -) - -// UpdateBifrostConnectionRequest Update Hybrid Extender Connection Request. -// -// Specify the params to update a Hybrid Extender connection. -// -// swagger:model UpdateBifrostConnectionRequest -type UpdateBifrostConnectionRequest struct { - BifrostConnection -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateBifrostConnectionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BifrostConnection - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BifrostConnection = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateBifrostConnectionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BifrostConnection) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update bifrost connection request -func (m *UpdateBifrostConnectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostConnection - if err := m.BifrostConnection.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update bifrost connection request based on the context it is used -func (m *UpdateBifrostConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostConnection - if err := m.BifrostConnection.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateBifrostConnectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateBifrostConnectionRequest) UnmarshalBinary(b []byte) error { - var res UpdateBifrostConnectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_bifrost_connector_request.go b/v2/models/update_bifrost_connector_request.go deleted file mode 100644 index d839bca4..00000000 --- a/v2/models/update_bifrost_connector_request.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" -) - -// UpdateBifrostConnectorRequest Hybrid Extender connector update request. -// -// Params to update a Hybrid Extender connector. -// -// swagger:model UpdateBifrostConnectorRequest -type UpdateBifrostConnectorRequest struct { - BifrostConnector -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateBifrostConnectorRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BifrostConnector - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BifrostConnector = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateBifrostConnectorRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BifrostConnector) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update bifrost connector request -func (m *UpdateBifrostConnectorRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostConnector - if err := m.BifrostConnector.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update bifrost connector request based on the context it is used -func (m *UpdateBifrostConnectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostConnector - if err := m.BifrostConnector.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateBifrostConnectorRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateBifrostConnectorRequest) UnmarshalBinary(b []byte) error { - var res UpdateBifrostConnectorRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_certificate_by_csr_request.go b/v2/models/update_certificate_by_csr_request.go deleted file mode 100644 index 671c5a4f..00000000 --- a/v2/models/update_certificate_by_csr_request.go +++ /dev/null @@ -1,88 +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" -) - -// UpdateCertificateByCsrRequest Specifies the request to update a certificate. -// -// swagger:model UpdateCertificateByCsrRequest -type UpdateCertificateByCsrRequest struct { - - // Specifies the certificate to be imported. - // Required: true - Certificate *string `json:"certificate"` - - // Specifies the id of the csr corresponding to the certificate. - // Required: true - CsrID *string `json:"csrId"` -} - -// Validate validates this update certificate by csr request -func (m *UpdateCertificateByCsrRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCsrID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateCertificateByCsrRequest) validateCertificate(formats strfmt.Registry) error { - - if err := validate.Required("certificate", "body", m.Certificate); err != nil { - return err - } - - return nil -} - -func (m *UpdateCertificateByCsrRequest) validateCsrID(formats strfmt.Registry) error { - - if err := validate.Required("csrId", "body", m.CsrID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update certificate by csr request based on context it is used -func (m *UpdateCertificateByCsrRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateCertificateByCsrRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateCertificateByCsrRequest) UnmarshalBinary(b []byte) error { - var res UpdateCertificateByCsrRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_certificate_by_csr_response_body.go b/v2/models/update_certificate_by_csr_response_body.go deleted file mode 100644 index 5774a05c..00000000 --- a/v2/models/update_certificate_by_csr_response_body.go +++ /dev/null @@ -1,52 +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" -) - -// UpdateCertificateByCsrResponseBody Update Certificate Response -// -// Specifies the response to update a certificate. -// -// swagger:model UpdateCertificateByCsrResponseBody -type UpdateCertificateByCsrResponseBody struct { - - // Specifies the certificate. - Certificate *string `json:"certificate,omitempty"` -} - -// Validate validates this update certificate by csr response body -func (m *UpdateCertificateByCsrResponseBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update certificate by csr response body based on context it is used -func (m *UpdateCertificateByCsrResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateCertificateByCsrResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateCertificateByCsrResponseBody) UnmarshalBinary(b []byte) error { - var res UpdateCertificateByCsrResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_cluster_ipmi_user.go b/v2/models/update_cluster_ipmi_user.go deleted file mode 100644 index 1d2578b7..00000000 --- a/v2/models/update_cluster_ipmi_user.go +++ /dev/null @@ -1,132 +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" -) - -// UpdateClusterIpmiUser Cluster level IPMI user parameters. -// -// swagger:model UpdateClusterIpmiUser -type UpdateClusterIpmiUser struct { - ClusterIpmiUser - - // IPMI user password. - // Required: true - Password *string `json:"password"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateClusterIpmiUser) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ClusterIpmiUser - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ClusterIpmiUser = aO0 - - // AO1 - var dataAO1 struct { - Password *string `json:"password"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Password = dataAO1.Password - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateClusterIpmiUser) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ClusterIpmiUser) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Password *string `json:"password"` - } - - dataAO1.Password = m.Password - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update cluster ipmi user -func (m *UpdateClusterIpmiUser) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ClusterIpmiUser - if err := m.ClusterIpmiUser.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateClusterIpmiUser) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update cluster ipmi user based on the context it is used -func (m *UpdateClusterIpmiUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ClusterIpmiUser - if err := m.ClusterIpmiUser.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateClusterIpmiUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateClusterIpmiUser) UnmarshalBinary(b []byte) error { - var res UpdateClusterIpmiUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_cluster_vlan_params.go b/v2/models/update_cluster_vlan_params.go deleted file mode 100644 index dc81470c..00000000 --- a/v2/models/update_cluster_vlan_params.go +++ /dev/null @@ -1,330 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateClusterVlanParams Parameters to update vlan on the cluster. -// -// swagger:model UpdateClusterVlanParams -type UpdateClusterVlanParams struct { - - // Allow vlan to be used by all tenants without explicit assignment. Set to true only when the vlan is not assigned to any tenant. - AllTenantAccess *bool `json:"allTenantAccess,omitempty"` - - // Vlan IP addresses for apps. - AppIps []string `json:"appIps"` - - // Description of the vlan. - Description *string `json:"description,omitempty"` - - // Set to true to enable ECMP in the vlan. - EcmpEnabled *bool `json:"ecmpEnabled,omitempty"` - - // Type of IP addresses. The default value is Ipv4. - // Enum: ["Ipv4","Ipv6"] - IPAddressesType *string `json:"ipAddressesType,omitempty"` - - // Subnet gateway of the vlan. This can be Ipv4 or Ipv6 gateway based on the IP addresses type. - Gateway *string `json:"gateway,omitempty"` - - // IPv6 or IPv6 subnet in CIDR format i.e ip-address/prefix. Examples: IPv4 subnet'192.168.0.101/24', '10.10.1.32/27'. IPv6 subnet '3005:1231:2006:0025::0/96', 3005:1231:2006:0025::0/128 - Subnet *string `json:"subnet,omitempty"` - - // Tenant id to assign vlan to a tenant. - TenantID *string `json:"tenantId,omitempty"` - - // Name of the Vlan. - VlanName *string `json:"vlanName,omitempty"` - - // MTU of the vlan. - Mtu *int32 `json:"mtu,omitempty"` - - // Vlan IP addresses, only one of ips or ipRanges parameters should be given. - Ips []string `json:"ips"` - - // Vlan IP address ranges, only one of ips or ipRanges parameters should be given. - IPRanges []*IPRange `json:"ipRanges"` - - // FQDN of the vlan. - Fqdn *string `json:"fqdn,omitempty"` - - // IP pools from the vlan ip addresses, the IPs in a pool goes together. One IP from each pool forms a VIP group. - IPPools []*IPPool `json:"ipPools"` - - // DNS delegation zones of the vlan. - DNSDelegationZones []*DNSDelegationZone `json:"dnsDelegationZones"` -} - -// Validate validates this update cluster vlan params -func (m *UpdateClusterVlanParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPAddressesType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPRanges(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIPPools(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDNSDelegationZones(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateClusterVlanParamsTypeIPAddressesTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Ipv4","Ipv6"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateClusterVlanParamsTypeIPAddressesTypePropEnum = append(updateClusterVlanParamsTypeIPAddressesTypePropEnum, v) - } -} - -const ( - - // UpdateClusterVlanParamsIPAddressesTypeIPV4 captures enum value "Ipv4" - UpdateClusterVlanParamsIPAddressesTypeIPV4 string = "Ipv4" - - // UpdateClusterVlanParamsIPAddressesTypeIPV6 captures enum value "Ipv6" - UpdateClusterVlanParamsIPAddressesTypeIPV6 string = "Ipv6" -) - -// prop value enum -func (m *UpdateClusterVlanParams) validateIPAddressesTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateClusterVlanParamsTypeIPAddressesTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateClusterVlanParams) validateIPAddressesType(formats strfmt.Registry) error { - if swag.IsZero(m.IPAddressesType) { // not required - return nil - } - - // value enum - if err := m.validateIPAddressesTypeEnum("ipAddressesType", "body", *m.IPAddressesType); err != nil { - return err - } - - return nil -} - -func (m *UpdateClusterVlanParams) validateIPRanges(formats strfmt.Registry) error { - if swag.IsZero(m.IPRanges) { // not required - return nil - } - - for i := 0; i < len(m.IPRanges); i++ { - if swag.IsZero(m.IPRanges[i]) { // not required - continue - } - - if m.IPRanges[i] != nil { - if err := m.IPRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterVlanParams) validateIPPools(formats strfmt.Registry) error { - if swag.IsZero(m.IPPools) { // not required - return nil - } - - for i := 0; i < len(m.IPPools); i++ { - if swag.IsZero(m.IPPools[i]) { // not required - continue - } - - if m.IPPools[i] != nil { - if err := m.IPPools[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterVlanParams) validateDNSDelegationZones(formats strfmt.Registry) error { - if swag.IsZero(m.DNSDelegationZones) { // not required - return nil - } - - for i := 0; i < len(m.DNSDelegationZones); i++ { - if swag.IsZero(m.DNSDelegationZones[i]) { // not required - continue - } - - if m.DNSDelegationZones[i] != nil { - if err := m.DNSDelegationZones[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update cluster vlan params based on the context it is used -func (m *UpdateClusterVlanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIPRanges(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIPPools(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDNSDelegationZones(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateClusterVlanParams) contextValidateIPRanges(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IPRanges); i++ { - - if m.IPRanges[i] != nil { - - if swag.IsZero(m.IPRanges[i]) { // not required - return nil - } - - if err := m.IPRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipRanges" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterVlanParams) contextValidateIPPools(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IPPools); i++ { - - if m.IPPools[i] != nil { - - if swag.IsZero(m.IPPools[i]) { // not required - return nil - } - - if err := m.IPPools[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ipPools" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateClusterVlanParams) contextValidateDNSDelegationZones(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DNSDelegationZones); i++ { - - if m.DNSDelegationZones[i] != nil { - - if swag.IsZero(m.DNSDelegationZones[i]) { // not required - return nil - } - - if err := m.DNSDelegationZones[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dnsDelegationZones" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateClusterVlanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateClusterVlanParams) UnmarshalBinary(b []byte) error { - var res UpdateClusterVlanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_data_tiering_state.go b/v2/models/update_data_tiering_state.go deleted file mode 100644 index 9f64df20..00000000 --- a/v2/models/update_data_tiering_state.go +++ /dev/null @@ -1,56 +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" -) - -// UpdateDataTieringState Specifies the summary of the state updation for the multiple data -// tiering groups. -// -// swagger:model UpdateDataTieringState -type UpdateDataTieringState struct { - - // Specifies a list of data tiering groups ids for which - // updation of state failed. - FailedIds []string `json:"failedIds"` - - // Specifies a list of data tiering groups ids for which updation of - // state was successful. - SuccessfulIds []string `json:"successfulIds"` -} - -// Validate validates this update data tiering state -func (m *UpdateDataTieringState) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update data tiering state based on context it is used -func (m *UpdateDataTieringState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateDataTieringState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateDataTieringState) UnmarshalBinary(b []byte) error { - var res UpdateDataTieringState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_data_tiering_state_request.go b/v2/models/update_data_tiering_state_request.go deleted file mode 100644 index 32d9cc1d..00000000 --- a/v2/models/update_data_tiering_state_request.go +++ /dev/null @@ -1,143 +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" -) - -// UpdateDataTieringStateRequest Update state of the data tiering groups. -// -// Specifies the parameters to perform an action on the data tiering -// groups for the specified Sources. -// -// swagger:model UpdateDataTieringStateRequest -type UpdateDataTieringStateRequest struct { - - // Specifies the action to be performed on all the specified data - // tiering groups. - // 'Pause' specifies to pause. - // 'Resume' specifies to resume. - // Required: true - // Enum: ["Pause","Resume"] - Action *string `json:"action"` - - // Specifies a list of data tiering groups ids for - // which the state should change. - // Required: true - // Min Items: 1 - // Unique: true - Ids []string `json:"ids"` -} - -// Validate validates this update data tiering state request -func (m *UpdateDataTieringStateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateDataTieringStateRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Pause","Resume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateDataTieringStateRequestTypeActionPropEnum = append(updateDataTieringStateRequestTypeActionPropEnum, v) - } -} - -const ( - - // UpdateDataTieringStateRequestActionPause captures enum value "Pause" - UpdateDataTieringStateRequestActionPause string = "Pause" - - // UpdateDataTieringStateRequestActionResume captures enum value "Resume" - UpdateDataTieringStateRequestActionResume string = "Resume" -) - -// prop value enum -func (m *UpdateDataTieringStateRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateDataTieringStateRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateDataTieringStateRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *UpdateDataTieringStateRequest) validateIds(formats strfmt.Registry) error { - - if err := validate.Required("ids", "body", m.Ids); err != nil { - return err - } - - iIdsSize := int64(len(m.Ids)) - - if err := validate.MinItems("ids", "body", iIdsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("ids", "body", m.Ids); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update data tiering state request based on context it is used -func (m *UpdateDataTieringStateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateDataTieringStateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateDataTieringStateRequest) UnmarshalBinary(b []byte) error { - var res UpdateDataTieringStateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_existing_archival_snapshot_config.go b/v2/models/update_existing_archival_snapshot_config.go deleted file mode 100644 index fc1818c8..00000000 --- a/v2/models/update_existing_archival_snapshot_config.go +++ /dev/null @@ -1,194 +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" -) - -// UpdateExistingArchivalSnapshotConfig Update Archival Snapshot Config. -// -// Specifies the configuration about updating an existing Archival Snapshot Run. -// -// swagger:model UpdateExistingArchivalSnapshotConfig -type UpdateExistingArchivalSnapshotConfig struct { - - // Specifies the id of the archival target. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the archival target. - Name *string `json:"name,omitempty"` - - // Specifies the snapshot's archival target type from which recovery has been performed. - // Required: true - // Enum: ["Tape","Cloud","Nas"] - ArchivalTargetType *string `json:"archivalTargetType"` - - // Specifies whether to retain the snapshot for legal purpose. If set to true, the snapshots cannot be deleted until the retention period. Note that using this option may cause the Cluster to run out of space. If set to false explicitly, the hold is removed, and the snapshots will expire as specified in the policy of the Protection Group. If this field is not specified, there is no change to the hold of the run. This field can be set only by a User having Data Security Role. - EnableLegalHold *bool `json:"enableLegalHold,omitempty"` - - // Specifies whether to delete the snapshot. When this is set to true, all other params will be ignored. - DeleteSnapshot *bool `json:"deleteSnapshot,omitempty"` - - // Specifies whether to retry the archival operation in case if earlier attempt failed. If not specified or set to false, archival is not retried. - Resync *bool `json:"resync,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention type is specified, the snapshots of the Protection Groups using this policy will be kept until the maximum of the snapshot retention time. During that time, the snapshots cannot be deleted.
'Compliance' implies WORM retention is set for compliance reason.
'Administrative' implies WORM retention is set for administrative purposes. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Specifies number of days to retain the snapshots. If positive, then this value is added to exisiting expiry time thereby increasing the retention period of the snapshot. Conversly, if this value is negative, then value is subtracted to existing expiry time thereby decreasing the retention period of the snaphot. Here, by this operation if expiry time goes below current time then snapshot is immediately deleted. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` -} - -// Validate validates this update existing archival snapshot config -func (m *UpdateExistingArchivalSnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalTargetType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateExistingArchivalSnapshotConfig) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var updateExistingArchivalSnapshotConfigTypeArchivalTargetTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Tape","Cloud","Nas"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateExistingArchivalSnapshotConfigTypeArchivalTargetTypePropEnum = append(updateExistingArchivalSnapshotConfigTypeArchivalTargetTypePropEnum, v) - } -} - -const ( - - // UpdateExistingArchivalSnapshotConfigArchivalTargetTypeTape captures enum value "Tape" - UpdateExistingArchivalSnapshotConfigArchivalTargetTypeTape string = "Tape" - - // UpdateExistingArchivalSnapshotConfigArchivalTargetTypeCloud captures enum value "Cloud" - UpdateExistingArchivalSnapshotConfigArchivalTargetTypeCloud string = "Cloud" - - // UpdateExistingArchivalSnapshotConfigArchivalTargetTypeNas captures enum value "Nas" - UpdateExistingArchivalSnapshotConfigArchivalTargetTypeNas string = "Nas" -) - -// prop value enum -func (m *UpdateExistingArchivalSnapshotConfig) validateArchivalTargetTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateExistingArchivalSnapshotConfigTypeArchivalTargetTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateExistingArchivalSnapshotConfig) validateArchivalTargetType(formats strfmt.Registry) error { - - if err := validate.Required("archivalTargetType", "body", m.ArchivalTargetType); err != nil { - return err - } - - // value enum - if err := m.validateArchivalTargetTypeEnum("archivalTargetType", "body", *m.ArchivalTargetType); err != nil { - return err - } - - return nil -} - -var updateExistingArchivalSnapshotConfigTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateExistingArchivalSnapshotConfigTypeDataLockPropEnum = append(updateExistingArchivalSnapshotConfigTypeDataLockPropEnum, v) - } -} - -const ( - - // UpdateExistingArchivalSnapshotConfigDataLockCompliance captures enum value "Compliance" - UpdateExistingArchivalSnapshotConfigDataLockCompliance string = "Compliance" - - // UpdateExistingArchivalSnapshotConfigDataLockAdministrative captures enum value "Administrative" - UpdateExistingArchivalSnapshotConfigDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *UpdateExistingArchivalSnapshotConfig) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateExistingArchivalSnapshotConfigTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateExistingArchivalSnapshotConfig) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update existing archival snapshot config based on context it is used -func (m *UpdateExistingArchivalSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateExistingArchivalSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateExistingArchivalSnapshotConfig) UnmarshalBinary(b []byte) error { - var res UpdateExistingArchivalSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_existing_replication_snapshot_config.go b/v2/models/update_existing_replication_snapshot_config.go deleted file mode 100644 index 03a2bce2..00000000 --- a/v2/models/update_existing_replication_snapshot_config.go +++ /dev/null @@ -1,139 +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" -) - -// UpdateExistingReplicationSnapshotConfig Update Replication Snapshot Config. -// -// Specifies the configuration about updating an existing Replication Snapshot Run. -// -// swagger:model UpdateExistingReplicationSnapshotConfig -type UpdateExistingReplicationSnapshotConfig struct { - - // Specifies the cluster id of the replication cluster. - // Required: true - ID *int64 `json:"id"` - - // Specifies the cluster name of the replication cluster. - Name *string `json:"name,omitempty"` - - // Specifies whether to retain the snapshot for legal purpose. If set to true, the snapshots cannot be deleted until the retention period. Note that using this option may cause the Cluster to run out of space. If set to false explicitly, the hold is removed, and the snapshots will expire as specified in the policy of the Protection Group. If this field is not specified, there is no change to the hold of the run. This field can be set only by a User having Data Security Role. - EnableLegalHold *bool `json:"enableLegalHold,omitempty"` - - // Specifies whether to delete the snapshot. When this is set to true, all other params will be ignored. - DeleteSnapshot *bool `json:"deleteSnapshot,omitempty"` - - // Specifies whether to retry the replication operation in case if earlier attempt failed. If not specified or set to false, replication is not retried. - Resync *bool `json:"resync,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention type is specified, the snapshots of the Protection Groups using this policy will be kept until the maximum of the snapshot retention time. During that time, the snapshots cannot be deleted.
'Compliance' implies WORM retention is set for compliance reason.
'Administrative' implies WORM retention is set for administrative purposes. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Specifies number of days to retain the snapshots. If positive, then this value is added to exisiting expiry time thereby increasing the retention period of the snapshot. Conversly, if this value is negative, then value is subtracted to existing expiry time thereby decreasing the retention period of the snaphot. Here, by this operation if expiry time goes below current time then snapshot is immediately deleted. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` -} - -// Validate validates this update existing replication snapshot config -func (m *UpdateExistingReplicationSnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateExistingReplicationSnapshotConfig) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var updateExistingReplicationSnapshotConfigTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateExistingReplicationSnapshotConfigTypeDataLockPropEnum = append(updateExistingReplicationSnapshotConfigTypeDataLockPropEnum, v) - } -} - -const ( - - // UpdateExistingReplicationSnapshotConfigDataLockCompliance captures enum value "Compliance" - UpdateExistingReplicationSnapshotConfigDataLockCompliance string = "Compliance" - - // UpdateExistingReplicationSnapshotConfigDataLockAdministrative captures enum value "Administrative" - UpdateExistingReplicationSnapshotConfigDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *UpdateExistingReplicationSnapshotConfig) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateExistingReplicationSnapshotConfigTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateExistingReplicationSnapshotConfig) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update existing replication snapshot config based on context it is used -func (m *UpdateExistingReplicationSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateExistingReplicationSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateExistingReplicationSnapshotConfig) UnmarshalBinary(b []byte) error { - var res UpdateExistingReplicationSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_feature_flag_params.go b/v2/models/update_feature_flag_params.go deleted file mode 100644 index fc0be033..00000000 --- a/v2/models/update_feature_flag_params.go +++ /dev/null @@ -1,67 +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" -) - -// UpdateFeatureFlagParams Feature Flag update request. -// -// Describes update feature flag request params. -// -// swagger:model UpdateFeatureFlagParams -type UpdateFeatureFlagParams struct { - - // Name of the feature flag that is to be updated. - Name *string `json:"name,omitempty"` - - // Bool to specify if it's UI feature flag. - IsUIFeature *bool `json:"isUiFeature,omitempty"` - - // New override status for the feature flag. - IsApproved *bool `json:"isApproved,omitempty"` - - // Reason for updating the feature flag override status. - Reason *string `json:"reason,omitempty"` - - // Clear any override status for the feature flag. - Clear *bool `json:"clear,omitempty"` - - // Specifies the timestamp of override operation. - Timestamp *int64 `json:"timestamp,omitempty"` -} - -// Validate validates this update feature flag params -func (m *UpdateFeatureFlagParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update feature flag params based on context it is used -func (m *UpdateFeatureFlagParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateFeatureFlagParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateFeatureFlagParams) UnmarshalBinary(b []byte) error { - var res UpdateFeatureFlagParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_fleet_env_info_request.go b/v2/models/update_fleet_env_info_request.go deleted file mode 100644 index f0d25474..00000000 --- a/v2/models/update_fleet_env_info_request.go +++ /dev/null @@ -1,177 +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" -) - -// UpdateFleetEnvInfoRequest Update Fleet Env Info Request. -// -// Specifies the params to add fleet env info. -// -// swagger:model UpdateFleetEnvInfoRequest -type UpdateFleetEnvInfoRequest struct { - - // Specifies the IAM role used to create instances.This field is now deprecated, use awsFleetInfo instead. - IamRole *string `json:"iamRole,omitempty"` - - // Specifies the Region of the CE cluster. This field is now deprecated, use awsFleetInfo instead. - Region *string `json:"region,omitempty"` - - // Specifies the VPC of the CE cluster.This field is now deprecated, use awsFleetInfo instead. - VpcID *string `json:"vpcId,omitempty"` - - // Specifies the Subnet of the CE cluster.This field is now deprecated, use awsFleetInfo instead. - SubnetID *string `json:"subnetId,omitempty"` - - // Specifies the security group Id.This field is now deprecated, use awsFleetInfo instead. - SecurityGroupID *string `json:"securityGroupId,omitempty"` - - // aws fleet info - AwsFleetInfo *AwsFleetInfo `json:"awsFleetInfo,omitempty"` - - // azure fleet info - AzureFleetInfo *AzureFleetInfo `json:"azureFleetInfo,omitempty"` -} - -// Validate validates this update fleet env info request -func (m *UpdateFleetEnvInfoRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsFleetInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureFleetInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateFleetEnvInfoRequest) validateAwsFleetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AwsFleetInfo) { // not required - return nil - } - - if m.AwsFleetInfo != nil { - if err := m.AwsFleetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateFleetEnvInfoRequest) validateAzureFleetInfo(formats strfmt.Registry) error { - if swag.IsZero(m.AzureFleetInfo) { // not required - return nil - } - - if m.AzureFleetInfo != nil { - if err := m.AzureFleetInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureFleetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureFleetInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update fleet env info request based on the context it is used -func (m *UpdateFleetEnvInfoRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsFleetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureFleetInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateFleetEnvInfoRequest) contextValidateAwsFleetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsFleetInfo != nil { - - if swag.IsZero(m.AwsFleetInfo) { // not required - return nil - } - - if err := m.AwsFleetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsFleetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsFleetInfo") - } - return err - } - } - - return nil -} - -func (m *UpdateFleetEnvInfoRequest) contextValidateAzureFleetInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureFleetInfo != nil { - - if swag.IsZero(m.AzureFleetInfo) { // not required - return nil - } - - if err := m.AzureFleetInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureFleetInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureFleetInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateFleetEnvInfoRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateFleetEnvInfoRequest) UnmarshalBinary(b []byte) error { - var res UpdateFleetEnvInfoRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_group_parameters.go b/v2/models/update_group_parameters.go deleted file mode 100644 index 8a47e09d..00000000 --- a/v2/models/update_group_parameters.go +++ /dev/null @@ -1,121 +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" -) - -// UpdateGroupParameters Specifies group properties to update. -// -// swagger:model UpdateGroupParameters -type UpdateGroupParameters struct { - - // Specifies the description of the group. - Description *string `json:"description,omitempty"` - - // Specifies the Cohesity roles to associate with the group. The Cohesity roles determine privileges on the Cohesity Cluster for this group. - Roles []string `json:"roles,omitempty"` - - // Specifies whether the Group is restricted. A restricted group can only view & manage the objects it has permissions to. - Restricted *bool `json:"restricted,omitempty"` - - // Specifies a list of tenant ids who can access this group. - TenantIds []string `json:"tenantIds,omitempty"` - - // Specifies the LOCAL group properties. - LocalGroupParams *LocalGroupParams `json:"localGroupParams,omitempty"` -} - -// Validate validates this update group parameters -func (m *UpdateGroupParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocalGroupParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateGroupParameters) validateLocalGroupParams(formats strfmt.Registry) error { - if swag.IsZero(m.LocalGroupParams) { // not required - return nil - } - - if m.LocalGroupParams != nil { - if err := m.LocalGroupParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localGroupParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update group parameters based on the context it is used -func (m *UpdateGroupParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalGroupParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateGroupParameters) contextValidateLocalGroupParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalGroupParams != nil { - - if swag.IsZero(m.LocalGroupParams) { // not required - return nil - } - - if err := m.LocalGroupParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localGroupParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localGroupParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateGroupParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateGroupParameters) UnmarshalBinary(b []byte) error { - var res UpdateGroupParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_idp_request_params.go b/v2/models/update_idp_request_params.go deleted file mode 100644 index 5378d2fe..00000000 --- a/v2/models/update_idp_request_params.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" -) - -// UpdateIdpRequestParams Specifies parameters to update identity providers -// -// swagger:model UpdateIdpRequestParams -type UpdateIdpRequestParams struct { - CommonIdentityProviderConfiguration -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateIdpRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonIdentityProviderConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonIdentityProviderConfiguration = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateIdpRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonIdentityProviderConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update idp request params -func (m *UpdateIdpRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update idp request params based on the context it is used -func (m *UpdateIdpRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonIdentityProviderConfiguration - if err := m.CommonIdentityProviderConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateIdpRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateIdpRequestParams) UnmarshalBinary(b []byte) error { - var res UpdateIdpRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_infected_files_list.go b/v2/models/update_infected_files_list.go deleted file mode 100644 index 0c3955ca..00000000 --- a/v2/models/update_infected_files_list.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateInfectedFilesList Specifies a list of infected files. -// -// swagger:model UpdateInfectedFilesList -type UpdateInfectedFilesList struct { - - // Specifies the list of infected files that are successfully updated. - UpdateSucceededInfectedFiles []*InfectedFile `json:"updateSucceededInfectedFiles"` - - // Specifies the list of infected files that failed update. - UpdateFailedInfectedFiles []*InfectedFile `json:"updateFailedInfectedFiles"` -} - -// Validate validates this update infected files list -func (m *UpdateInfectedFilesList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUpdateSucceededInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdateFailedInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFilesList) validateUpdateSucceededInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateSucceededInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.UpdateSucceededInfectedFiles); i++ { - if swag.IsZero(m.UpdateSucceededInfectedFiles[i]) { // not required - continue - } - - if m.UpdateSucceededInfectedFiles[i] != nil { - if err := m.UpdateSucceededInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateInfectedFilesList) validateUpdateFailedInfectedFiles(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateFailedInfectedFiles) { // not required - return nil - } - - for i := 0; i < len(m.UpdateFailedInfectedFiles); i++ { - if swag.IsZero(m.UpdateFailedInfectedFiles[i]) { // not required - continue - } - - if m.UpdateFailedInfectedFiles[i] != nil { - if err := m.UpdateFailedInfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update infected files list based on the context it is used -func (m *UpdateInfectedFilesList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUpdateSucceededInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdateFailedInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFilesList) contextValidateUpdateSucceededInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateSucceededInfectedFiles); i++ { - - if m.UpdateSucceededInfectedFiles[i] != nil { - - if swag.IsZero(m.UpdateSucceededInfectedFiles[i]) { // not required - return nil - } - - if err := m.UpdateSucceededInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateSucceededInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateInfectedFilesList) contextValidateUpdateFailedInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateFailedInfectedFiles); i++ { - - if m.UpdateFailedInfectedFiles[i] != nil { - - if swag.IsZero(m.UpdateFailedInfectedFiles[i]) { // not required - return nil - } - - if err := m.UpdateFailedInfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateFailedInfectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateInfectedFilesList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateInfectedFilesList) UnmarshalBinary(b []byte) error { - var res UpdateInfectedFilesList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_infected_files_parameters.go b/v2/models/update_infected_files_parameters.go deleted file mode 100644 index 64167423..00000000 --- a/v2/models/update_infected_files_parameters.go +++ /dev/null @@ -1,182 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateInfectedFilesParameters Specifies the parameters of infected files to be updated. -// -// swagger:model UpdateInfectedFilesParameters -type UpdateInfectedFilesParameters struct { - - // Specifies a list of infected files to be updated. - // Required: true - // Min Items: 1 - InfectedFiles []*InfectedFile `json:"infectedFiles"` - - // Specifies the state[Quarantined, Unquarantined] of the infected file. - // Enum: ["Quarantined","Unquarantined"] - State *string `json:"state,omitempty"` -} - -// Validate validates this update infected files parameters -func (m *UpdateInfectedFilesParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfectedFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFilesParameters) validateInfectedFiles(formats strfmt.Registry) error { - - if err := validate.Required("infectedFiles", "body", m.InfectedFiles); err != nil { - return err - } - - iInfectedFilesSize := int64(len(m.InfectedFiles)) - - if err := validate.MinItems("infectedFiles", "body", iInfectedFilesSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.InfectedFiles); i++ { - if swag.IsZero(m.InfectedFiles[i]) { // not required - continue - } - - if m.InfectedFiles[i] != nil { - if err := m.InfectedFiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var updateInfectedFilesParametersTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Quarantined","Unquarantined"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateInfectedFilesParametersTypeStatePropEnum = append(updateInfectedFilesParametersTypeStatePropEnum, v) - } -} - -const ( - - // UpdateInfectedFilesParametersStateQuarantined captures enum value "Quarantined" - UpdateInfectedFilesParametersStateQuarantined string = "Quarantined" - - // UpdateInfectedFilesParametersStateUnquarantined captures enum value "Unquarantined" - UpdateInfectedFilesParametersStateUnquarantined string = "Unquarantined" -) - -// prop value enum -func (m *UpdateInfectedFilesParameters) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateInfectedFilesParametersTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateInfectedFilesParameters) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required - return nil - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update infected files parameters based on the context it is used -func (m *UpdateInfectedFilesParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfectedFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateInfectedFilesParameters) contextValidateInfectedFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InfectedFiles); i++ { - - if m.InfectedFiles[i] != nil { - - if swag.IsZero(m.InfectedFiles[i]) { // not required - return nil - } - - if err := m.InfectedFiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infectedFiles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateInfectedFilesParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateInfectedFilesParameters) UnmarshalBinary(b []byte) error { - var res UpdateInfectedFilesParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_ipmi_users.go b/v2/models/update_ipmi_users.go deleted file mode 100644 index f02357f5..00000000 --- a/v2/models/update_ipmi_users.go +++ /dev/null @@ -1,172 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateIpmiUsers Parameters to update cluster and node level IPMI users. -// -// swagger:model UpdateIpmiUsers -type UpdateIpmiUsers struct { - - // Cluster IPMI user parameters. - ClusterIpmiUser *UpdateClusterIpmiUser `json:"clusterIpmiUser,omitempty"` - - // Nodes IPMI user parameters. - NodesImpiUser []*UpdateNodeIpmiUser `json:"nodesImpiUser"` -} - -// Validate validates this update ipmi users -func (m *UpdateIpmiUsers) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterIpmiUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodesImpiUser(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateIpmiUsers) validateClusterIpmiUser(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterIpmiUser) { // not required - return nil - } - - if m.ClusterIpmiUser != nil { - if err := m.ClusterIpmiUser.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiUser") - } - return err - } - } - - return nil -} - -func (m *UpdateIpmiUsers) validateNodesImpiUser(formats strfmt.Registry) error { - if swag.IsZero(m.NodesImpiUser) { // not required - return nil - } - - for i := 0; i < len(m.NodesImpiUser); i++ { - if swag.IsZero(m.NodesImpiUser[i]) { // not required - continue - } - - if m.NodesImpiUser[i] != nil { - if err := m.NodesImpiUser[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update ipmi users based on the context it is used -func (m *UpdateIpmiUsers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterIpmiUser(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodesImpiUser(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateIpmiUsers) contextValidateClusterIpmiUser(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterIpmiUser != nil { - - if swag.IsZero(m.ClusterIpmiUser) { // not required - return nil - } - - if err := m.ClusterIpmiUser.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterIpmiUser") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterIpmiUser") - } - return err - } - } - - return nil -} - -func (m *UpdateIpmiUsers) contextValidateNodesImpiUser(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodesImpiUser); i++ { - - if m.NodesImpiUser[i] != nil { - - if swag.IsZero(m.NodesImpiUser[i]) { // not required - return nil - } - - if err := m.NodesImpiUser[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodesImpiUser" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateIpmiUsers) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateIpmiUsers) UnmarshalBinary(b []byte) error { - var res UpdateIpmiUsers - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_keystone_request.go b/v2/models/update_keystone_request.go deleted file mode 100644 index 65fb955a..00000000 --- a/v2/models/update_keystone_request.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" -) - -// UpdateKeystoneRequest Specifies the parameters to update a Keystone configuration. -// -// swagger:model UpdateKeystoneRequest -type UpdateKeystoneRequest struct { - Keystone -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateKeystoneRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Keystone - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Keystone = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateKeystoneRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Keystone) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update keystone request -func (m *UpdateKeystoneRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Keystone - if err := m.Keystone.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update keystone request based on the context it is used -func (m *UpdateKeystoneRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Keystone - if err := m.Keystone.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateKeystoneRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateKeystoneRequest) UnmarshalBinary(b []byte) error { - var res UpdateKeystoneRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_local_snapshot_config.go b/v2/models/update_local_snapshot_config.go deleted file mode 100644 index 450f0949..00000000 --- a/v2/models/update_local_snapshot_config.go +++ /dev/null @@ -1,116 +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" -) - -// UpdateLocalSnapshotConfig Local Snapshot Config. -// -// Specifies the params to perform actions on local snapshot taken by a Protection Group Run. -// -// swagger:model UpdateLocalSnapshotConfig -type UpdateLocalSnapshotConfig struct { - - // Specifies whether to retain the snapshot for legal purpose. If set to true, the snapshots cannot be deleted until the retention period. Note that using this option may cause the Cluster to run out of space. If set to false explicitly, the hold is removed, and the snapshots will expire as specified in the policy of the Protection Group. If this field is not specified, there is no change to the hold of the run. This field can be set only by a User having Data Security Role. - EnableLegalHold *bool `json:"enableLegalHold,omitempty"` - - // Specifies whether to delete the snapshot. When this is set to true, all other params will be ignored. - DeleteSnapshot *bool `json:"deleteSnapshot,omitempty"` - - // Specifies WORM retention type for the snapshots. When a WORM retention type is specified, the snapshots of the Protection Groups using this policy will be kept until the maximum of the snapshot retention time. During that time, the snapshots cannot be deleted.
'Compliance' implies WORM retention is set for compliance reason.
'Administrative' implies WORM retention is set for administrative purposes. - // Enum: ["Compliance","Administrative"] - DataLock *string `json:"dataLock,omitempty"` - - // Specifies number of days to retain the snapshots. If positive, then this value is added to exisiting expiry time thereby increasing the retention period of the snapshot. Conversly, if this value is negative, then value is subtracted to existing expiry time thereby decreasing the retention period of the snaphot. Here, by this operation if expiry time goes below current time then snapshot is immediately deleted. - DaysToKeep *int64 `json:"daysToKeep,omitempty"` -} - -// Validate validates this update local snapshot config -func (m *UpdateLocalSnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataLock(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateLocalSnapshotConfigTypeDataLockPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateLocalSnapshotConfigTypeDataLockPropEnum = append(updateLocalSnapshotConfigTypeDataLockPropEnum, v) - } -} - -const ( - - // UpdateLocalSnapshotConfigDataLockCompliance captures enum value "Compliance" - UpdateLocalSnapshotConfigDataLockCompliance string = "Compliance" - - // UpdateLocalSnapshotConfigDataLockAdministrative captures enum value "Administrative" - UpdateLocalSnapshotConfigDataLockAdministrative string = "Administrative" -) - -// prop value enum -func (m *UpdateLocalSnapshotConfig) validateDataLockEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateLocalSnapshotConfigTypeDataLockPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateLocalSnapshotConfig) validateDataLock(formats strfmt.Registry) error { - if swag.IsZero(m.DataLock) { // not required - return nil - } - - // value enum - if err := m.validateDataLockEnum("dataLock", "body", *m.DataLock); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update local snapshot config based on context it is used -func (m *UpdateLocalSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateLocalSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateLocalSnapshotConfig) UnmarshalBinary(b []byte) error { - var res UpdateLocalSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_m_f_a_result.go b/v2/models/update_m_f_a_result.go deleted file mode 100644 index bbda6276..00000000 --- a/v2/models/update_m_f_a_result.go +++ /dev/null @@ -1,116 +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" -) - -// UpdateMFAResult update m f a result -// -// swagger:model UpdateMFAResult -type UpdateMFAResult struct { - SupportTotpKeyInfo - - SupportMfaConfigInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateMFAResult) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SupportTotpKeyInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SupportTotpKeyInfo = aO0 - - // AO1 - var aO1 SupportMfaConfigInfo - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.SupportMfaConfigInfo = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateMFAResult) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.SupportTotpKeyInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.SupportMfaConfigInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update m f a result -func (m *UpdateMFAResult) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SupportTotpKeyInfo - if err := m.SupportTotpKeyInfo.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SupportMfaConfigInfo - if err := m.SupportMfaConfigInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update m f a result based on the context it is used -func (m *UpdateMFAResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SupportTotpKeyInfo - if err := m.SupportTotpKeyInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SupportMfaConfigInfo - if err := m.SupportMfaConfigInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateMFAResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateMFAResult) UnmarshalBinary(b []byte) error { - var res UpdateMFAResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_node_bond_interface_params.go b/v2/models/update_node_bond_interface_params.go deleted file mode 100644 index fd4a1e50..00000000 --- a/v2/models/update_node_bond_interface_params.go +++ /dev/null @@ -1,134 +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" -) - -// UpdateNodeBondInterfaceParams Parameters to update bond interface. -// -// swagger:model UpdateNodeBondInterfaceParams -type UpdateNodeBondInterfaceParams struct { - - // Names of the secondary interfaces. - // Required: true - // Min Items: 1 - Members []string `json:"members"` - - // Type of the node where the interface has to be created. 'ClusterNode' indicates a node that is part of a cluster. 'FreeNode' indicates a node that is not part of cluster. - // Required: true - // Enum: ["ClusterNode","FreeNode"] - NodeType *string `json:"nodeType"` - - // Id of the node, this is required when node is part of a cluster i.e when nodeType is 'ClusterNode'. - NodeID *int64 `json:"nodeId,omitempty"` -} - -// Validate validates this update node bond interface params -func (m *UpdateNodeBondInterfaceParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMembers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateNodeBondInterfaceParams) validateMembers(formats strfmt.Registry) error { - - if err := validate.Required("members", "body", m.Members); err != nil { - return err - } - - iMembersSize := int64(len(m.Members)) - - if err := validate.MinItems("members", "body", iMembersSize, 1); err != nil { - return err - } - - return nil -} - -var updateNodeBondInterfaceParamsTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ClusterNode","FreeNode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateNodeBondInterfaceParamsTypeNodeTypePropEnum = append(updateNodeBondInterfaceParamsTypeNodeTypePropEnum, v) - } -} - -const ( - - // UpdateNodeBondInterfaceParamsNodeTypeClusterNode captures enum value "ClusterNode" - UpdateNodeBondInterfaceParamsNodeTypeClusterNode string = "ClusterNode" - - // UpdateNodeBondInterfaceParamsNodeTypeFreeNode captures enum value "FreeNode" - UpdateNodeBondInterfaceParamsNodeTypeFreeNode string = "FreeNode" -) - -// prop value enum -func (m *UpdateNodeBondInterfaceParams) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateNodeBondInterfaceParamsTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateNodeBondInterfaceParams) validateNodeType(formats strfmt.Registry) error { - - if err := validate.Required("nodeType", "body", m.NodeType); err != nil { - return err - } - - // value enum - if err := m.validateNodeTypeEnum("nodeType", "body", *m.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update node bond interface params based on context it is used -func (m *UpdateNodeBondInterfaceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateNodeBondInterfaceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateNodeBondInterfaceParams) UnmarshalBinary(b []byte) error { - var res UpdateNodeBondInterfaceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_node_ipmi_user.go b/v2/models/update_node_ipmi_user.go deleted file mode 100644 index a3c3f0da..00000000 --- a/v2/models/update_node_ipmi_user.go +++ /dev/null @@ -1,132 +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" -) - -// UpdateNodeIpmiUser Node level IPMI user parameters. -// -// swagger:model UpdateNodeIpmiUser -type UpdateNodeIpmiUser struct { - NodeIpmiUser - - // IPMI user password. - // Required: true - Password *string `json:"password"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateNodeIpmiUser) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NodeIpmiUser - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NodeIpmiUser = aO0 - - // AO1 - var dataAO1 struct { - Password *string `json:"password"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Password = dataAO1.Password - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateNodeIpmiUser) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.NodeIpmiUser) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Password *string `json:"password"` - } - - dataAO1.Password = m.Password - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update node ipmi user -func (m *UpdateNodeIpmiUser) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NodeIpmiUser - if err := m.NodeIpmiUser.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateNodeIpmiUser) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update node ipmi user based on the context it is used -func (m *UpdateNodeIpmiUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NodeIpmiUser - if err := m.NodeIpmiUser.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateNodeIpmiUser) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateNodeIpmiUser) UnmarshalBinary(b []byte) error { - var res UpdateNodeIpmiUser - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_object_snapshot_request.go b/v2/models/update_object_snapshot_request.go deleted file mode 100644 index 1f3f5bb9..00000000 --- a/v2/models/update_object_snapshot_request.go +++ /dev/null @@ -1,113 +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" -) - -// UpdateObjectSnapshotRequest Update Object Snapshot Request. -// -// Specifies the parameters to update an object snapshot. -// -// swagger:model UpdateObjectSnapshotRequest -type UpdateObjectSnapshotRequest struct { - - // Whether to set the snapshot on legal hold. If set to true, the run cannot be deleted during the retention period. - SetLegalHold *bool `json:"setLegalHold,omitempty"` - - // Specifies the snapshot data lock type. - // Enum: ["Compliance","Administrative"] - DataLockType *string `json:"dataLockType,omitempty"` - - // Specifies the expiry time of the snapshot in Unix timestamp epoch in seconds. - ExpiryTimeSecs *int32 `json:"expiryTimeSecs,omitempty"` -} - -// Validate validates this update object snapshot request -func (m *UpdateObjectSnapshotRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataLockType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateObjectSnapshotRequestTypeDataLockTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateObjectSnapshotRequestTypeDataLockTypePropEnum = append(updateObjectSnapshotRequestTypeDataLockTypePropEnum, v) - } -} - -const ( - - // UpdateObjectSnapshotRequestDataLockTypeCompliance captures enum value "Compliance" - UpdateObjectSnapshotRequestDataLockTypeCompliance string = "Compliance" - - // UpdateObjectSnapshotRequestDataLockTypeAdministrative captures enum value "Administrative" - UpdateObjectSnapshotRequestDataLockTypeAdministrative string = "Administrative" -) - -// prop value enum -func (m *UpdateObjectSnapshotRequest) validateDataLockTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateObjectSnapshotRequestTypeDataLockTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateObjectSnapshotRequest) validateDataLockType(formats strfmt.Registry) error { - if swag.IsZero(m.DataLockType) { // not required - return nil - } - - // value enum - if err := m.validateDataLockTypeEnum("dataLockType", "body", *m.DataLockType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update object snapshot request based on context it is used -func (m *UpdateObjectSnapshotRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateObjectSnapshotRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateObjectSnapshotRequest) UnmarshalBinary(b []byte) error { - var res UpdateObjectSnapshotRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_odp_remote_cluster_params.go b/v2/models/update_odp_remote_cluster_params.go deleted file mode 100644 index f533b619..00000000 --- a/v2/models/update_odp_remote_cluster_params.go +++ /dev/null @@ -1,166 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateOdpRemoteClusterParams Specifies the parameters to create an ODP Remote Cluster config. -// -// swagger:model UpdateOdpRemoteClusterParams -type UpdateOdpRemoteClusterParams struct { - - // Specifies the ODP Remote Cluster name. - // Required: true - ClusterName *string `json:"clusterName"` - - // Specifies if the cluster id is stale and needs to be refreshed. - ClusterIDStale *bool `json:"clusterIdStale,omitempty"` - - // Specifies if all endpoints on ODP Remote Cluster are reachable. - AllEndpointsReachable *bool `json:"allEndpointsReachable,omitempty"` - - // Specifies a list of Storage Domain pairs. - StorageDomainPairs []*StorageDomainPair `json:"storageDomainPairs"` - - // Specifies whether to compress the data transferred to ODP Remote Cluster. - CompressionEnabled *bool `json:"compressionEnabled,omitempty"` - - // Specifies the key used for encrypting the data transferred to ODP Remote Cluster. - KeyEncryptionKey *string `json:"keyEncryptionKey,omitempty"` - - // Specifies if the ODP Remote Cluster is used for replication. - UsedForReplication *bool `json:"usedForReplication,omitempty"` - - // Specifies the tenant id. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the tenant id for ODP Remote Cluster. - RemoteTenantID *string `json:"remoteTenantId,omitempty"` - - // Specifies the interface group name of the ODP Remote Cluster. - InterfaceGroupName *string `json:"interfaceGroupName,omitempty"` - - // Specifies whether to use Bifrost Broker channel for remote connection. - UseBifrostBrokerChannel *bool `json:"useBifrostBrokerChannel,omitempty"` -} - -// Validate validates this update odp remote cluster params -func (m *UpdateOdpRemoteClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStorageDomainPairs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateOdpRemoteClusterParams) validateClusterName(formats strfmt.Registry) error { - - if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { - return err - } - - return nil -} - -func (m *UpdateOdpRemoteClusterParams) validateStorageDomainPairs(formats strfmt.Registry) error { - if swag.IsZero(m.StorageDomainPairs) { // not required - return nil - } - - for i := 0; i < len(m.StorageDomainPairs); i++ { - if swag.IsZero(m.StorageDomainPairs[i]) { // not required - continue - } - - if m.StorageDomainPairs[i] != nil { - if err := m.StorageDomainPairs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update odp remote cluster params based on the context it is used -func (m *UpdateOdpRemoteClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStorageDomainPairs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateOdpRemoteClusterParams) contextValidateStorageDomainPairs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StorageDomainPairs); i++ { - - if m.StorageDomainPairs[i] != nil { - - if swag.IsZero(m.StorageDomainPairs[i]) { // not required - return nil - } - - if err := m.StorageDomainPairs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storageDomainPairs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateOdpRemoteClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateOdpRemoteClusterParams) UnmarshalBinary(b []byte) error { - var res UpdateOdpRemoteClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protected_objects_request.go b/v2/models/update_protected_objects_request.go deleted file mode 100644 index 40795823..00000000 --- a/v2/models/update_protected_objects_request.go +++ /dev/null @@ -1,116 +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" -) - -// UpdateProtectedObjectsRequest Specifies the request to update an object backup configuration. -// -// swagger:model UpdateProtectedObjectsRequest -type UpdateProtectedObjectsRequest struct { - CommonObjectProtectParams - - EnvSpecificObjectProtectionUpdateRequestParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateProtectedObjectsRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonObjectProtectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonObjectProtectParams = aO0 - - // AO1 - var aO1 EnvSpecificObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.EnvSpecificObjectProtectionUpdateRequestParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateProtectedObjectsRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonObjectProtectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.EnvSpecificObjectProtectionUpdateRequestParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update protected objects request -func (m *UpdateProtectedObjectsRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with EnvSpecificObjectProtectionUpdateRequestParams - if err := m.EnvSpecificObjectProtectionUpdateRequestParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update protected objects request based on the context it is used -func (m *UpdateProtectedObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonObjectProtectParams - if err := m.CommonObjectProtectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with EnvSpecificObjectProtectionUpdateRequestParams - if err := m.EnvSpecificObjectProtectionUpdateRequestParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectedObjectsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectedObjectsRequest) UnmarshalBinary(b []byte) error { - var res UpdateProtectedObjectsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protection_group_run_params.go b/v2/models/update_protection_group_run_params.go deleted file mode 100644 index ce5f2702..00000000 --- a/v2/models/update_protection_group_run_params.go +++ /dev/null @@ -1,236 +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" -) - -// UpdateProtectionGroupRunParams Update Protection Group Run Request Params. -// -// Specifies the params to update a Protection Group Run. -// -// swagger:model UpdateProtectionGroupRunParams -type UpdateProtectionGroupRunParams struct { - - // Specifies a unique Protection Group Run id. - // Required: true - // Pattern: ^\d+:\d+$ - RunID *string `json:"runId"` - - // Specifies the params to perform actions on local snapshot taken by this Protection Group Run. - LocalSnapshotConfig *UpdateLocalSnapshotConfig `json:"localSnapshotConfig,omitempty"` - - // Specifies the params to perform actions on replication snapshots taken by this Protection Group Run. A user can configure new replication targets here. - ReplicationSnapshotConfig *UpdateReplicationSnapshotConfig `json:"replicationSnapshotConfig,omitempty"` - - // Specifies the params to perform actions on archival snapshots taken by this Protection Group Run. A user can configure new archival targets here. - ArchivalSnapshotConfig *UpdateArchivalSnapshotConfig `json:"archivalSnapshotConfig,omitempty"` -} - -// Validate validates this update protection group run params -func (m *UpdateProtectionGroupRunParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRunID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateArchivalSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunParams) validateRunID(formats strfmt.Registry) error { - - if err := validate.Required("runId", "body", m.RunID); err != nil { - return err - } - - if err := validate.Pattern("runId", "body", *m.RunID, `^\d+:\d+$`); err != nil { - return err - } - - return nil -} - -func (m *UpdateProtectionGroupRunParams) validateLocalSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.LocalSnapshotConfig) { // not required - return nil - } - - if m.LocalSnapshotConfig != nil { - if err := m.LocalSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionGroupRunParams) validateReplicationSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationSnapshotConfig) { // not required - return nil - } - - if m.ReplicationSnapshotConfig != nil { - if err := m.ReplicationSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionGroupRunParams) validateArchivalSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ArchivalSnapshotConfig) { // not required - return nil - } - - if m.ArchivalSnapshotConfig != nil { - if err := m.ArchivalSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalSnapshotConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update protection group run params based on the context it is used -func (m *UpdateProtectionGroupRunParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocalSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateArchivalSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunParams) contextValidateLocalSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalSnapshotConfig != nil { - - if swag.IsZero(m.LocalSnapshotConfig) { // not required - return nil - } - - if err := m.LocalSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionGroupRunParams) contextValidateReplicationSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationSnapshotConfig != nil { - - if swag.IsZero(m.ReplicationSnapshotConfig) { // not required - return nil - } - - if err := m.ReplicationSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateProtectionGroupRunParams) contextValidateArchivalSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ArchivalSnapshotConfig != nil { - - if swag.IsZero(m.ArchivalSnapshotConfig) { // not required - return nil - } - - if err := m.ArchivalSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalSnapshotConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionGroupRunParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionGroupRunParams) UnmarshalBinary(b []byte) error { - var res UpdateProtectionGroupRunParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protection_group_run_request_body.go b/v2/models/update_protection_group_run_request_body.go deleted file mode 100644 index d2b7c87c..00000000 --- a/v2/models/update_protection_group_run_request_body.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateProtectionGroupRunRequestBody Update Protection Group Run Request Body. -// -// Specifies the params to update a list of Protection Group Runs. -// -// swagger:model UpdateProtectionGroupRunRequestBody -type UpdateProtectionGroupRunRequestBody struct { - - // update protection group run params - // Required: true - // Min Items: 1 - UpdateProtectionGroupRunParams []*UpdateProtectionGroupRunParams `json:"updateProtectionGroupRunParams"` -} - -// Validate validates this update protection group run request body -func (m *UpdateProtectionGroupRunRequestBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUpdateProtectionGroupRunParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunRequestBody) validateUpdateProtectionGroupRunParams(formats strfmt.Registry) error { - - if err := validate.Required("updateProtectionGroupRunParams", "body", m.UpdateProtectionGroupRunParams); err != nil { - return err - } - - iUpdateProtectionGroupRunParamsSize := int64(len(m.UpdateProtectionGroupRunParams)) - - if err := validate.MinItems("updateProtectionGroupRunParams", "body", iUpdateProtectionGroupRunParamsSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.UpdateProtectionGroupRunParams); i++ { - if swag.IsZero(m.UpdateProtectionGroupRunParams[i]) { // not required - continue - } - - if m.UpdateProtectionGroupRunParams[i] != nil { - if err := m.UpdateProtectionGroupRunParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateProtectionGroupRunParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateProtectionGroupRunParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update protection group run request body based on the context it is used -func (m *UpdateProtectionGroupRunRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUpdateProtectionGroupRunParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunRequestBody) contextValidateUpdateProtectionGroupRunParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateProtectionGroupRunParams); i++ { - - if m.UpdateProtectionGroupRunParams[i] != nil { - - if swag.IsZero(m.UpdateProtectionGroupRunParams[i]) { // not required - return nil - } - - if err := m.UpdateProtectionGroupRunParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateProtectionGroupRunParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateProtectionGroupRunParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionGroupRunRequestBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionGroupRunRequestBody) UnmarshalBinary(b []byte) error { - var res UpdateProtectionGroupRunRequestBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protection_group_run_response_body.go b/v2/models/update_protection_group_run_response_body.go deleted file mode 100644 index 8c030b92..00000000 --- a/v2/models/update_protection_group_run_response_body.go +++ /dev/null @@ -1,126 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionGroupRunResponseBody Update Protection Group Run Response Body. -// -// Specifies the response of update Protection Group Runs request. -// -// swagger:model UpdateProtectionGroupRunResponseBody -type UpdateProtectionGroupRunResponseBody struct { - - // Specifies a list of ids of Protection Group Runs that are successfully updated. - SuccessfulRunIds []string `json:"successfulRunIds"` - - // Specifies a list of ids of Protection Group Runs that failed to update along with error details. - FailedRuns []*FailedRunDetails `json:"failedRuns"` -} - -// Validate validates this update protection group run response body -func (m *UpdateProtectionGroupRunResponseBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFailedRuns(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunResponseBody) validateFailedRuns(formats strfmt.Registry) error { - if swag.IsZero(m.FailedRuns) { // not required - return nil - } - - for i := 0; i < len(m.FailedRuns); i++ { - if swag.IsZero(m.FailedRuns[i]) { // not required - continue - } - - if m.FailedRuns[i] != nil { - if err := m.FailedRuns[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update protection group run response body based on the context it is used -func (m *UpdateProtectionGroupRunResponseBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFailedRuns(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupRunResponseBody) contextValidateFailedRuns(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailedRuns); i++ { - - if m.FailedRuns[i] != nil { - - if swag.IsZero(m.FailedRuns[i]) { // not required - return nil - } - - if err := m.FailedRuns[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedRuns" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedRuns" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionGroupRunResponseBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionGroupRunResponseBody) UnmarshalBinary(b []byte) error { - var res UpdateProtectionGroupRunResponseBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protection_groups_state.go b/v2/models/update_protection_groups_state.go deleted file mode 100644 index aaed4791..00000000 --- a/v2/models/update_protection_groups_state.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionGroupsState Specifies the response of updation of state of multiple Protection Groups. -// -// swagger:model UpdateProtectionGroupsState -type UpdateProtectionGroupsState struct { - - // Specifies a list of Protection Group ids along with details for which updation of state was failed. - FailedProtectionGroups []*FailedProtectionGroupDetails `json:"failedProtectionGroups"` - - // Specifies a list of Protection Group ids for which updation of state was successful. - SuccessfulProtectionGroupIds []string `json:"successfulProtectionGroupIds"` -} - -// Validate validates this update protection groups state -func (m *UpdateProtectionGroupsState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFailedProtectionGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupsState) validateFailedProtectionGroups(formats strfmt.Registry) error { - if swag.IsZero(m.FailedProtectionGroups) { // not required - return nil - } - - for i := 0; i < len(m.FailedProtectionGroups); i++ { - if swag.IsZero(m.FailedProtectionGroups[i]) { // not required - continue - } - - if m.FailedProtectionGroups[i] != nil { - if err := m.FailedProtectionGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedProtectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedProtectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update protection groups state based on the context it is used -func (m *UpdateProtectionGroupsState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFailedProtectionGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateProtectionGroupsState) contextValidateFailedProtectionGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FailedProtectionGroups); i++ { - - if m.FailedProtectionGroups[i] != nil { - - if swag.IsZero(m.FailedProtectionGroups[i]) { // not required - return nil - } - - if err := m.FailedProtectionGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failedProtectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failedProtectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionGroupsState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionGroupsState) UnmarshalBinary(b []byte) error { - var res UpdateProtectionGroupsState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_protection_groups_state_request.go b/v2/models/update_protection_groups_state_request.go deleted file mode 100644 index 5302ade1..00000000 --- a/v2/models/update_protection_groups_state_request.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" -) - -// UpdateProtectionGroupsStateRequest Update state of Protection Groups. -// -// Specifies the parameters to perform an action of list of Protection Groups. -// -// swagger:model UpdateProtectionGroupsStateRequest -type UpdateProtectionGroupsStateRequest struct { - - // Specifies the action to be performed on all the specfied Protection Groups. 'kActivate' specifies that Protection Group should be activated. 'kDeactivate' sepcifies that Protection Group should be deactivated. 'kPause' specifies that Protection Group should be paused. 'kResume' specifies that Protection Group should be resumed. - // Required: true - // Enum: ["kPause","kResume"] - Action *string `json:"action"` - - // Specifies a list of Protection Group ids for which the state should change. - // Required: true - // Min Items: 1 - // Unique: true - Ids []string `json:"ids"` -} - -// Validate validates this update protection groups state request -func (m *UpdateProtectionGroupsStateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateProtectionGroupsStateRequestTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPause","kResume"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateProtectionGroupsStateRequestTypeActionPropEnum = append(updateProtectionGroupsStateRequestTypeActionPropEnum, v) - } -} - -const ( - - // UpdateProtectionGroupsStateRequestActionKPause captures enum value "kPause" - UpdateProtectionGroupsStateRequestActionKPause string = "kPause" - - // UpdateProtectionGroupsStateRequestActionKResume captures enum value "kResume" - UpdateProtectionGroupsStateRequestActionKResume string = "kResume" -) - -// prop value enum -func (m *UpdateProtectionGroupsStateRequest) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateProtectionGroupsStateRequestTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateProtectionGroupsStateRequest) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *UpdateProtectionGroupsStateRequest) validateIds(formats strfmt.Registry) error { - - if err := validate.Required("ids", "body", m.Ids); err != nil { - return err - } - - iIdsSize := int64(len(m.Ids)) - - if err := validate.MinItems("ids", "body", iIdsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("ids", "body", m.Ids); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update protection groups state request based on context it is used -func (m *UpdateProtectionGroupsStateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionGroupsStateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionGroupsStateRequest) UnmarshalBinary(b []byte) error { - var res UpdateProtectionGroupsStateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_remote_cluster_params.go b/v2/models/update_remote_cluster_params.go deleted file mode 100644 index 78997854..00000000 --- a/v2/models/update_remote_cluster_params.go +++ /dev/null @@ -1,160 +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" -) - -// UpdateRemoteClusterParams Specifies the parameters to update a Remote Cluster config. -// -// swagger:model UpdateRemoteClusterParams -type UpdateRemoteClusterParams struct { - RemoteClusterParams - - // Specifies the Cohesity user name used to connect to the Remote Cluster. - Username string `json:"username,omitempty"` - - // Specifies the password for Cohesity user to use when connecting to the Remote Cluster. - Password *string `json:"password,omitempty"` - - // Specifies the VIP or IP addresses of the Nodes on the Remote Cluster to connect with. Hostnames are not supported. - // Min Items: 1 - NodeAddresses []string `json:"nodeAddresses,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateRemoteClusterParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteClusterParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteClusterParams = aO0 - - // AO1 - var dataAO1 struct { - Username string `json:"username,omitempty"` - - Password *string `json:"password,omitempty"` - - NodeAddresses []string `json:"nodeAddresses,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Username = dataAO1.Username - - m.Password = dataAO1.Password - - m.NodeAddresses = dataAO1.NodeAddresses - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateRemoteClusterParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.RemoteClusterParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Username string `json:"username,omitempty"` - - Password *string `json:"password,omitempty"` - - NodeAddresses []string `json:"nodeAddresses,omitempty"` - } - - dataAO1.Username = m.Username - - dataAO1.Password = m.Password - - dataAO1.NodeAddresses = m.NodeAddresses - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update remote cluster params -func (m *UpdateRemoteClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteClusterParams - if err := m.RemoteClusterParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeAddresses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRemoteClusterParams) validateNodeAddresses(formats strfmt.Registry) error { - - if swag.IsZero(m.NodeAddresses) { // not required - return nil - } - - iNodeAddressesSize := int64(len(m.NodeAddresses)) - - if err := validate.MinItems("nodeAddresses", "body", iNodeAddressesSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this update remote cluster params based on the context it is used -func (m *UpdateRemoteClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteClusterParams - if err := m.RemoteClusterParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRemoteClusterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRemoteClusterParams) UnmarshalBinary(b []byte) error { - var res UpdateRemoteClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_replication_snapshot_config.go b/v2/models/update_replication_snapshot_config.go deleted file mode 100644 index eba1bb62..00000000 --- a/v2/models/update_replication_snapshot_config.go +++ /dev/null @@ -1,185 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateReplicationSnapshotConfig Replication Snapshot Config. -// -// Specifies the params to perform actions on replication snapshots taken by a Protection Group Run. -// -// swagger:model UpdateReplicationSnapshotConfig -type UpdateReplicationSnapshotConfig struct { - - // Specifies the new configuration about adding Replication Snapshot to existing Protection Group Run. - NewSnapshotConfig []*RunReplicationConfig `json:"newSnapshotConfig"` - - // Specifies the configuration about updating an existing Replication Snapshot Run. - UpdateExistingSnapshotConfig []*UpdateExistingReplicationSnapshotConfig `json:"updateExistingSnapshotConfig"` -} - -// Validate validates this update replication snapshot config -func (m *UpdateReplicationSnapshotConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNewSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdateExistingSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateReplicationSnapshotConfig) validateNewSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSnapshotConfig) { // not required - return nil - } - - for i := 0; i < len(m.NewSnapshotConfig); i++ { - if swag.IsZero(m.NewSnapshotConfig[i]) { // not required - continue - } - - if m.NewSnapshotConfig[i] != nil { - if err := m.NewSnapshotConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateReplicationSnapshotConfig) validateUpdateExistingSnapshotConfig(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateExistingSnapshotConfig) { // not required - return nil - } - - for i := 0; i < len(m.UpdateExistingSnapshotConfig); i++ { - if swag.IsZero(m.UpdateExistingSnapshotConfig[i]) { // not required - continue - } - - if m.UpdateExistingSnapshotConfig[i] != nil { - if err := m.UpdateExistingSnapshotConfig[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update replication snapshot config based on the context it is used -func (m *UpdateReplicationSnapshotConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUpdateExistingSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateReplicationSnapshotConfig) contextValidateNewSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NewSnapshotConfig); i++ { - - if m.NewSnapshotConfig[i] != nil { - - if swag.IsZero(m.NewSnapshotConfig[i]) { // not required - return nil - } - - if err := m.NewSnapshotConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateReplicationSnapshotConfig) contextValidateUpdateExistingSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UpdateExistingSnapshotConfig); i++ { - - if m.UpdateExistingSnapshotConfig[i] != nil { - - if swag.IsZero(m.UpdateExistingSnapshotConfig[i]) { // not required - return nil - } - - if err := m.UpdateExistingSnapshotConfig[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("updateExistingSnapshotConfig" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateReplicationSnapshotConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateReplicationSnapshotConfig) UnmarshalBinary(b []byte) error { - var res UpdateReplicationSnapshotConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_rigel_connection_request.go b/v2/models/update_rigel_connection_request.go deleted file mode 100644 index 901935c8..00000000 --- a/v2/models/update_rigel_connection_request.go +++ /dev/null @@ -1,191 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateRigelConnectionRequest Update Rigel Connection Request. -// -// Specify the params to update a connection of Rigel. -// -// swagger:model UpdateRigelConnectionRequest -type UpdateRigelConnectionRequest struct { - CommonCreateOrUpdateRigelConnectionRequest - - // Specifies the ids of the connectors which are not grouped in this connection - UngroupedConnectors []int64 `json:"ungroupedConnectors"` - - // Specifies the connector groups in the connection. - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateRigelConnectionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCreateOrUpdateRigelConnectionRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCreateOrUpdateRigelConnectionRequest = aO0 - - // AO1 - var dataAO1 struct { - UngroupedConnectors []int64 `json:"ungroupedConnectors"` - - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.UngroupedConnectors = dataAO1.UngroupedConnectors - - m.ConnectorGroups = dataAO1.ConnectorGroups - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateRigelConnectionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonCreateOrUpdateRigelConnectionRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - UngroupedConnectors []int64 `json:"ungroupedConnectors"` - - ConnectorGroups []*ConnectorGroup `json:"connectorGroups"` - } - - dataAO1.UngroupedConnectors = m.UngroupedConnectors - - dataAO1.ConnectorGroups = m.ConnectorGroups - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update rigel connection request -func (m *UpdateRigelConnectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectionRequest - if err := m.CommonCreateOrUpdateRigelConnectionRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectorGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRigelConnectionRequest) validateConnectorGroups(formats strfmt.Registry) error { - - if swag.IsZero(m.ConnectorGroups) { // not required - return nil - } - - for i := 0; i < len(m.ConnectorGroups); i++ { - if swag.IsZero(m.ConnectorGroups[i]) { // not required - continue - } - - if m.ConnectorGroups[i] != nil { - if err := m.ConnectorGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update rigel connection request based on the context it is used -func (m *UpdateRigelConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectionRequest - if err := m.CommonCreateOrUpdateRigelConnectionRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnectorGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRigelConnectionRequest) contextValidateConnectorGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConnectorGroups); i++ { - - if m.ConnectorGroups[i] != nil { - - if swag.IsZero(m.ConnectorGroups[i]) { // not required - return nil - } - - if err := m.ConnectorGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectorGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRigelConnectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRigelConnectionRequest) UnmarshalBinary(b []byte) error { - var res UpdateRigelConnectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_rigel_connector_request.go b/v2/models/update_rigel_connector_request.go deleted file mode 100644 index 0a775236..00000000 --- a/v2/models/update_rigel_connector_request.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" -) - -// UpdateRigelConnectorRequest Update Rigel connector Request. -// -// Specify the params to update a Rigel connector. -// -// swagger:model UpdateRigelConnectorRequest -type UpdateRigelConnectorRequest struct { - CommonCreateOrUpdateRigelConnectorRequest -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateRigelConnectorRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonCreateOrUpdateRigelConnectorRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonCreateOrUpdateRigelConnectorRequest = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateRigelConnectorRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonCreateOrUpdateRigelConnectorRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update rigel connector request -func (m *UpdateRigelConnectorRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectorRequest - if err := m.CommonCreateOrUpdateRigelConnectorRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update rigel connector request based on the context it is used -func (m *UpdateRigelConnectorRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonCreateOrUpdateRigelConnectorRequest - if err := m.CommonCreateOrUpdateRigelConnectorRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRigelConnectorRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRigelConnectorRequest) UnmarshalBinary(b []byte) error { - var res UpdateRigelConnectorRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_role_parameters.go b/v2/models/update_role_parameters.go deleted file mode 100644 index ea8dff7a..00000000 --- a/v2/models/update_role_parameters.go +++ /dev/null @@ -1,81 +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" -) - -// UpdateRoleParameters Specifies the parameters to update a Role. -// -// swagger:model UpdateRoleParameters -type UpdateRoleParameters struct { - - // Specifies the description message for the Role. - Description *string `json:"description,omitempty"` - - // Specifies the list of Privileges of the Role. - // Required: true - // Min Items: 1 - Privileges []string `json:"privileges"` -} - -// Validate validates this update role parameters -func (m *UpdateRoleParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrivileges(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateRoleParameters) validatePrivileges(formats strfmt.Registry) error { - - if err := validate.Required("privileges", "body", m.Privileges); err != nil { - return err - } - - iPrivilegesSize := int64(len(m.Privileges)) - - if err := validate.MinItems("privileges", "body", iPrivilegesSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this update role parameters based on context it is used -func (m *UpdateRoleParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateRoleParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateRoleParameters) UnmarshalBinary(b []byte) error { - var res UpdateRoleParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_security_config_request.go b/v2/models/update_security_config_request.go deleted file mode 100644 index 3ec344c7..00000000 --- a/v2/models/update_security_config_request.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" -) - -// UpdateSecurityConfigRequest Update Security Config Request -// -// Specifies the request params for updating the security config. -// -// swagger:model UpdateSecurityConfigRequest -type UpdateSecurityConfigRequest struct { - SecurityConfig -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateSecurityConfigRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SecurityConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SecurityConfig = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateSecurityConfigRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SecurityConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update security config request -func (m *UpdateSecurityConfigRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SecurityConfig - if err := m.SecurityConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update security config request based on the context it is used -func (m *UpdateSecurityConfigRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SecurityConfig - if err := m.SecurityConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateSecurityConfigRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateSecurityConfigRequest) UnmarshalBinary(b []byte) error { - var res UpdateSecurityConfigRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_share_param.go b/v2/models/update_share_param.go deleted file mode 100644 index 172f1566..00000000 --- a/v2/models/update_share_param.go +++ /dev/null @@ -1,232 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateShareParam Update Share Parameter. -// -// Specifies the parameter to update a Share. -// -// swagger:model UpdateShareParam -type UpdateShareParam struct { - - // This field is currently deprecated. Specifies if Filer Audit Logging is enabled for this Share. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Specifies the state of File Audit logging for this Share. Inherited: Audit log setting is inherited from the View. Enabled: Audit log is enabled for this Share. Disabled: Audit log is disabled for this Share. - // Enum: ["Inherited","Enabled","Disabled"] - FileAuditLoggingState *string `json:"fileAuditLoggingState,omitempty"` - - // List of external client subnet IPs that are allowed to access the share. - ClientSubnetWhitelist []*Subnet `json:"clientSubnetWhitelist"` - - // SMB config for the alias (share). - SmbConfig *AliasSmbConfig `json:"smbConfig,omitempty"` -} - -// Validate validates this update share param -func (m *UpdateShareParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileAuditLoggingState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClientSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateShareParamTypeFileAuditLoggingStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Inherited","Enabled","Disabled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateShareParamTypeFileAuditLoggingStatePropEnum = append(updateShareParamTypeFileAuditLoggingStatePropEnum, v) - } -} - -const ( - - // UpdateShareParamFileAuditLoggingStateInherited captures enum value "Inherited" - UpdateShareParamFileAuditLoggingStateInherited string = "Inherited" - - // UpdateShareParamFileAuditLoggingStateEnabled captures enum value "Enabled" - UpdateShareParamFileAuditLoggingStateEnabled string = "Enabled" - - // UpdateShareParamFileAuditLoggingStateDisabled captures enum value "Disabled" - UpdateShareParamFileAuditLoggingStateDisabled string = "Disabled" -) - -// prop value enum -func (m *UpdateShareParam) validateFileAuditLoggingStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateShareParamTypeFileAuditLoggingStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateShareParam) validateFileAuditLoggingState(formats strfmt.Registry) error { - if swag.IsZero(m.FileAuditLoggingState) { // not required - return nil - } - - // value enum - if err := m.validateFileAuditLoggingStateEnum("fileAuditLoggingState", "body", *m.FileAuditLoggingState); err != nil { - return err - } - - return nil -} - -func (m *UpdateShareParam) validateClientSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - continue - } - - if m.ClientSubnetWhitelist[i] != nil { - if err := m.ClientSubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateShareParam) validateSmbConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SmbConfig) { // not required - return nil - } - - if m.SmbConfig != nil { - if err := m.SmbConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update share param based on the context it is used -func (m *UpdateShareParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateShareParam) contextValidateClientSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - - if m.ClientSubnetWhitelist[i] != nil { - - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateShareParam) contextValidateSmbConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbConfig != nil { - - if swag.IsZero(m.SmbConfig) { // not required - return nil - } - - if err := m.SmbConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateShareParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateShareParam) UnmarshalBinary(b []byte) error { - var res UpdateShareParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_smtp_params.go b/v2/models/update_smtp_params.go deleted file mode 100644 index b20fad03..00000000 --- a/v2/models/update_smtp_params.go +++ /dev/null @@ -1,117 +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" -) - -// UpdateSMTPParams Specifies the parameters to update cluster SMTP configuration. -// -// swagger:model UpdateSMTPParams -type UpdateSMTPParams struct { - SMTPConfiguration - - // Specifies the password of the SMTP user. This is required if username is specified in the request. - Password *string `json:"password,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateSMTPParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SMTPConfiguration - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SMTPConfiguration = aO0 - - // AO1 - var dataAO1 struct { - Password *string `json:"password,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Password = dataAO1.Password - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateSMTPParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.SMTPConfiguration) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Password *string `json:"password,omitempty"` - } - - dataAO1.Password = m.Password - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update SMTP params -func (m *UpdateSMTPParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SMTPConfiguration - if err := m.SMTPConfiguration.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update SMTP params based on the context it is used -func (m *UpdateSMTPParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SMTPConfiguration - if err := m.SMTPConfiguration.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateSMTPParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateSMTPParams) UnmarshalBinary(b []byte) error { - var res UpdateSMTPParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_storage_domain_param.go b/v2/models/update_storage_domain_param.go deleted file mode 100644 index 6918e9e4..00000000 --- a/v2/models/update_storage_domain_param.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" -) - -// UpdateStorageDomainParam Specifies the parameter to update a Storage Domain. -// -// swagger:model UpdateStorageDomainParam -type UpdateStorageDomainParam struct { - StorageDomain -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateStorageDomainParam) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 StorageDomain - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.StorageDomain = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateStorageDomainParam) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.StorageDomain) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update storage domain param -func (m *UpdateStorageDomainParam) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StorageDomain - if err := m.StorageDomain.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update storage domain param based on the context it is used -func (m *UpdateStorageDomainParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StorageDomain - if err := m.StorageDomain.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateStorageDomainParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateStorageDomainParam) UnmarshalBinary(b []byte) error { - var res UpdateStorageDomainParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_support_user_params.go b/v2/models/update_support_user_params.go deleted file mode 100644 index 918cde46..00000000 --- a/v2/models/update_support_user_params.go +++ /dev/null @@ -1,56 +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" -) - -// UpdateSupportUserParams Specifies the support user params. -// -// swagger:model UpdateSupportUserParams -type UpdateSupportUserParams struct { - - // Specifies the current password of the user. This is required when trying to update the current user's password. - CurrentPassword *string `json:"currentPassword,omitempty"` - - // Specifies the new password for the support user. - NewPassword *string `json:"newPassword,omitempty"` - - // If set to true, sudo access will be enabled for the user. If null, the endpoint will not attempt to alter sudo access privilege for the support user. - EnableSudoAccess *bool `json:"enableSudoAccess,omitempty"` -} - -// Validate validates this update support user params -func (m *UpdateSupportUserParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update support user params based on context it is used -func (m *UpdateSupportUserParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateSupportUserParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateSupportUserParams) UnmarshalBinary(b []byte) error { - var res UpdateSupportUserParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_tdm_snapshot_request.go b/v2/models/update_tdm_snapshot_request.go deleted file mode 100644 index ff79c84d..00000000 --- a/v2/models/update_tdm_snapshot_request.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" -) - -// UpdateTdmSnapshotRequest Specifies the request parameters to update a TDM snapshot. -// -// swagger:model UpdateTdmSnapshotRequest -type UpdateTdmSnapshotRequest struct { - CommonTdmCloneSnapshotParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateTdmSnapshotRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonTdmCloneSnapshotParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonTdmCloneSnapshotParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateTdmSnapshotRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CommonTdmCloneSnapshotParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update tdm snapshot request -func (m *UpdateTdmSnapshotRequest) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update tdm snapshot request based on the context it is used -func (m *UpdateTdmSnapshotRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonTdmCloneSnapshotParams - if err := m.CommonTdmCloneSnapshotParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateTdmSnapshotRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateTdmSnapshotRequest) UnmarshalBinary(b []byte) error { - var res UpdateTdmSnapshotRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_tenant_body.go b/v2/models/update_tenant_body.go deleted file mode 100644 index 9e687a34..00000000 --- a/v2/models/update_tenant_body.go +++ /dev/null @@ -1,168 +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" -) - -// UpdateTenantBody UpdateTenantBody -// -// Parameters to be specified for updating a tenant. -// -// swagger:model UpdateTenantBody -type UpdateTenantBody struct { - UpdateTenantParams - - // network - Network *TenantNetwork `json:"network,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateTenantBody) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateTenantParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateTenantParams = aO0 - - // AO1 - var dataAO1 struct { - Network *TenantNetwork `json:"network,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Network = dataAO1.Network - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateTenantBody) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UpdateTenantParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Network *TenantNetwork `json:"network,omitempty"` - } - - dataAO1.Network = m.Network - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update tenant body -func (m *UpdateTenantBody) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateTenantParams - if err := m.UpdateTenantParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetwork(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateTenantBody) validateNetwork(formats strfmt.Registry) error { - - if swag.IsZero(m.Network) { // not required - return nil - } - - if m.Network != nil { - if err := m.Network.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("network") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update tenant body based on the context it is used -func (m *UpdateTenantBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateTenantParams - if err := m.UpdateTenantParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetwork(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateTenantBody) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { - - if m.Network != nil { - - if swag.IsZero(m.Network) { // not required - return nil - } - - if err := m.Network.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("network") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateTenantBody) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateTenantBody) UnmarshalBinary(b []byte) error { - var res UpdateTenantBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_tenant_params.go b/v2/models/update_tenant_params.go deleted file mode 100644 index 594c86bf..00000000 --- a/v2/models/update_tenant_params.go +++ /dev/null @@ -1,55 +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" -) - -// UpdateTenantParams UpdateTenantParams -// -// Parameters to be specified for updating a tenant. -// -// swagger:model UpdateTenantParams -type UpdateTenantParams struct { - - // Name of the Tenant. - Name *string `json:"name,omitempty"` - - // Description about the tenant - Description *string `json:"description,omitempty"` -} - -// Validate validates this update tenant params -func (m *UpdateTenantParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update tenant params based on context it is used -func (m *UpdateTenantParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateTenantParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateTenantParams) UnmarshalBinary(b []byte) error { - var res UpdateTenantParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_user_parameters.go b/v2/models/update_user_parameters.go deleted file mode 100644 index 2087d204..00000000 --- a/v2/models/update_user_parameters.go +++ /dev/null @@ -1,166 +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" -) - -// UpdateUserParameters Specifies User properties to update. -// -// swagger:model UpdateUserParameters -type UpdateUserParameters struct { - CommonUpdatableUserParams - - // Specifies the LOCAL user properties. This field is required when updating LOCAL Cohesity User params. - LocalUserParams *LocalUserUpdateParams `json:"localUserParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateUserParameters) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonUpdatableUserParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonUpdatableUserParams = aO0 - - // AO1 - var dataAO1 struct { - LocalUserParams *LocalUserUpdateParams `json:"localUserParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.LocalUserParams = dataAO1.LocalUserParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateUserParameters) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonUpdatableUserParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - LocalUserParams *LocalUserUpdateParams `json:"localUserParams,omitempty"` - } - - dataAO1.LocalUserParams = m.LocalUserParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update user parameters -func (m *UpdateUserParameters) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonUpdatableUserParams - if err := m.CommonUpdatableUserParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalUserParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateUserParameters) validateLocalUserParams(formats strfmt.Registry) error { - - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if m.LocalUserParams != nil { - if err := m.LocalUserParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update user parameters based on the context it is used -func (m *UpdateUserParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonUpdatableUserParams - if err := m.CommonUpdatableUserParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalUserParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateUserParameters) contextValidateLocalUserParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalUserParams != nil { - - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if err := m.LocalUserParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateUserParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateUserParameters) UnmarshalBinary(b []byte) error { - var res UpdateUserParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/update_view_param.go b/v2/models/update_view_param.go deleted file mode 100644 index 3b4f0710..00000000 --- a/v2/models/update_view_param.go +++ /dev/null @@ -1,1242 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpdateViewParam Specifies the settings that define a View. Common fields between create, -// edit and response struct. -// -// swagger:model UpdateViewParam -type UpdateViewParam struct { - - // Specifies the name of the View. - Name *string `json:"name,omitempty"` - - // Specifies the category of the View. - // Enum: ["BackupTarget","FileServices","ObjectServices"] - Category *string `json:"category,omitempty"` - - // Specifies the supported Protocols for the View. - ProtocolAccess []*ViewProtocol `json:"protocolAccess,omitempty"` - - // Specifies whether view level client subnet whitelist overrides cluster and - // global setting. - OverrideGlobalSubnetWhitelist *bool `json:"overrideGlobalSubnetWhitelist,omitempty"` - - // Array of Subnets. - // Specifies a list of Subnets with IP addresses that have permissions to - // access the View. (Overrides or extends the Subnets specified at the global - // Cohesity Cluster level.) - SubnetWhitelist []*Subnet `json:"subnetWhitelist,omitempty"` - - // Specifies whether view level client netgroup whitelist overrides cluster and - // global setting. - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - // Specifies the security mode used for this view. - // Currently we support the following modes: Native, Unified and NTFS style. - // 'NativeMode' indicates a native security mode. - // 'UnifiedMode' indicates a unified security mode. - // 'NtfsMode' indicates a NTFS style security mode. - // Enum: ["NativeMode","UnifiedMode","NtfsMode"] - SecurityMode *string `json:"securityMode,omitempty"` - - // Specifies an optional text description about the View. - Description *string `json:"description,omitempty"` - - // Specifies if this View can be mounted using the NFS protocol - // on Windows systems. If true, this View can be NFS mounted on Windows - // systems. - AllowMountOnWindows *bool `json:"allowMountOnWindows,omitempty"` - - // Specifies if this view should allow minion or not. If true, this will - // allow minion. - EnableMinion *bool `json:"enableMinion,omitempty"` - - // Specifies if Filer Audit Logging is enabled for this view. - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - // Optional tenant id who has access to this View. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies whether to enable live indexing for the view. - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - // Specifies whether to enable offline file caching of the view. - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - // Array of Security Identifiers (SIDs) - // Specifies the list of security identifiers (SIDs) for the restricted - // Principals who have access to this View. - AccessSids []string `json:"accessSids,omitempty"` - - // Specifies whether view lock is enabled. If enabled the view cannot be - // modified or deleted until unlock. By default it is disabled. - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - // Specifies if the view is a read only view. User will no longer be able to write to this view if this is set to true. - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - // Specifies if metadata accelerator is enabled for this view. Only - // supported while creating a view. - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - // Specifies whether the view is for externally triggered backup - // target. If so, Magneto will ignore the backup schedule for the - // view protection job of this view. By default it is disabled. - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - // If small files are accessed sequentially from a client, - // this specifies whether to detect and - // prefetch files based on the lexicographic index to - // improve file read performance. - LexicographicPrefetch *bool `json:"lexicographicPrefetch,omitempty"` - - // Specifies the antivirus scan config settings for this View. - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - // Optional filtering criteria that should be satisfied by all the files - // created in this view. It does not affect existing files. - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - // Optional config that enables file locking for this view. It cannot be - // disabled during the edit of a view, if it has been enabled during the - // creation of the view. Also, it cannot be enabled if it was disabled - // during the creation of the view. - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - // Specifies the Lifecycle policy of this filer (NFS/SMB) view. - FilerLifecycleManagement *FilerLifecycleManagement `json:"filerLifecycleManagement,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 *QuotaPolicy `json:"logicalQuota,omitempty"` - - // Array of Netgroups. - // Specifies a list of netgroups with domains that have permissions to - // access the View. (Overrides or extends the Netgroup specified at the global - // Cohesity Cluster level.) - NetgroupWhitelist *NisNetgroups `json:"netgroupWhitelist,omitempty"` - - // Specifies the Quality of Service (QoS) Policy for the View. - Qos *QoS `json:"qos,omitempty"` - - // Specifies self service config of this view. - SelfServiceSnapshotConfig *SelfServiceSnapshotConfig `json:"selfServiceSnapshotConfig,omitempty"` - - // Specifies if inline deduplication and compression settings inherited from - // the Storage Domain (View Box) should be disabled for this View. - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - // Specifies the pinning config of this view. - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` - - NfsConfig - - SmbConfig - - S3Config - - SwiftConfig -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateViewParam) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Category *string `json:"category,omitempty"` - - ProtocolAccess []*ViewProtocol `json:"protocolAccess,omitempty"` - - OverrideGlobalSubnetWhitelist *bool `json:"overrideGlobalSubnetWhitelist,omitempty"` - - SubnetWhitelist []*Subnet `json:"subnetWhitelist,omitempty"` - - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - SecurityMode *string `json:"securityMode,omitempty"` - - Description *string `json:"description,omitempty"` - - AllowMountOnWindows *bool `json:"allowMountOnWindows,omitempty"` - - EnableMinion *bool `json:"enableMinion,omitempty"` - - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - AccessSids []string `json:"accessSids,omitempty"` - - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - LexicographicPrefetch *bool `json:"lexicographicPrefetch,omitempty"` - - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - FilerLifecycleManagement *FilerLifecycleManagement `json:"filerLifecycleManagement,omitempty"` - - LogicalQuota *QuotaPolicy `json:"logicalQuota,omitempty"` - - NetgroupWhitelist *NisNetgroups `json:"netgroupWhitelist,omitempty"` - - Qos *QoS `json:"qos,omitempty"` - - SelfServiceSnapshotConfig *SelfServiceSnapshotConfig `json:"selfServiceSnapshotConfig,omitempty"` - - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Name = dataAO0.Name - - m.Category = dataAO0.Category - - m.ProtocolAccess = dataAO0.ProtocolAccess - - m.OverrideGlobalSubnetWhitelist = dataAO0.OverrideGlobalSubnetWhitelist - - m.SubnetWhitelist = dataAO0.SubnetWhitelist - - m.OverrideGlobalNetgroupWhitelist = dataAO0.OverrideGlobalNetgroupWhitelist - - m.SecurityMode = dataAO0.SecurityMode - - m.Description = dataAO0.Description - - m.AllowMountOnWindows = dataAO0.AllowMountOnWindows - - m.EnableMinion = dataAO0.EnableMinion - - m.EnableFilerAuditLogging = dataAO0.EnableFilerAuditLogging - - m.TenantID = dataAO0.TenantID - - m.EnableLiveIndexing = dataAO0.EnableLiveIndexing - - m.EnableOfflineCaching = dataAO0.EnableOfflineCaching - - m.AccessSids = dataAO0.AccessSids - - m.ViewLockEnabled = dataAO0.ViewLockEnabled - - m.IsReadOnly = dataAO0.IsReadOnly - - m.EnableMetadataAccelerator = dataAO0.EnableMetadataAccelerator - - m.IsExternallyTriggeredBackupTarget = dataAO0.IsExternallyTriggeredBackupTarget - - m.LexicographicPrefetch = dataAO0.LexicographicPrefetch - - m.AntivirusScanConfig = dataAO0.AntivirusScanConfig - - m.FileExtensionFilter = dataAO0.FileExtensionFilter - - m.FileLockConfig = dataAO0.FileLockConfig - - m.FilerLifecycleManagement = dataAO0.FilerLifecycleManagement - - m.LogicalQuota = dataAO0.LogicalQuota - - m.NetgroupWhitelist = dataAO0.NetgroupWhitelist - - m.Qos = dataAO0.Qos - - m.SelfServiceSnapshotConfig = dataAO0.SelfServiceSnapshotConfig - - m.StoragePolicyOverride = dataAO0.StoragePolicyOverride - - m.ViewPinningConfig = dataAO0.ViewPinningConfig - - // AO1 - var aO1 NfsConfig - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.NfsConfig = aO1 - - // AO2 - var aO2 SmbConfig - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.SmbConfig = aO2 - - // AO3 - var aO3 S3Config - if err := swag.ReadJSON(raw, &aO3); err != nil { - return err - } - m.S3Config = aO3 - - // AO4 - var aO4 SwiftConfig - if err := swag.ReadJSON(raw, &aO4); err != nil { - return err - } - m.SwiftConfig = aO4 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateViewParam) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 5) - - var dataAO0 struct { - Name *string `json:"name,omitempty"` - - Category *string `json:"category,omitempty"` - - ProtocolAccess []*ViewProtocol `json:"protocolAccess,omitempty"` - - OverrideGlobalSubnetWhitelist *bool `json:"overrideGlobalSubnetWhitelist,omitempty"` - - SubnetWhitelist []*Subnet `json:"subnetWhitelist,omitempty"` - - OverrideGlobalNetgroupWhitelist *bool `json:"overrideGlobalNetgroupWhitelist,omitempty"` - - SecurityMode *string `json:"securityMode,omitempty"` - - Description *string `json:"description,omitempty"` - - AllowMountOnWindows *bool `json:"allowMountOnWindows,omitempty"` - - EnableMinion *bool `json:"enableMinion,omitempty"` - - EnableFilerAuditLogging *bool `json:"enableFilerAuditLogging,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - EnableLiveIndexing *bool `json:"enableLiveIndexing,omitempty"` - - EnableOfflineCaching *bool `json:"enableOfflineCaching,omitempty"` - - AccessSids []string `json:"accessSids,omitempty"` - - ViewLockEnabled *bool `json:"viewLockEnabled,omitempty"` - - IsReadOnly *bool `json:"isReadOnly,omitempty"` - - EnableMetadataAccelerator *bool `json:"enableMetadataAccelerator,omitempty"` - - IsExternallyTriggeredBackupTarget *bool `json:"isExternallyTriggeredBackupTarget,omitempty"` - - LexicographicPrefetch *bool `json:"lexicographicPrefetch,omitempty"` - - AntivirusScanConfig *AntivirusScanConfig `json:"antivirusScanConfig,omitempty"` - - FileExtensionFilter *FileExtensionFilter `json:"fileExtensionFilter,omitempty"` - - FileLockConfig *FileLevelDataLockConfig `json:"fileLockConfig,omitempty"` - - FilerLifecycleManagement *FilerLifecycleManagement `json:"filerLifecycleManagement,omitempty"` - - LogicalQuota *QuotaPolicy `json:"logicalQuota,omitempty"` - - NetgroupWhitelist *NisNetgroups `json:"netgroupWhitelist,omitempty"` - - Qos *QoS `json:"qos,omitempty"` - - SelfServiceSnapshotConfig *SelfServiceSnapshotConfig `json:"selfServiceSnapshotConfig,omitempty"` - - StoragePolicyOverride *StoragePolicyOverride `json:"storagePolicyOverride,omitempty"` - - ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` - } - - dataAO0.Name = m.Name - - dataAO0.Category = m.Category - - dataAO0.ProtocolAccess = m.ProtocolAccess - - dataAO0.OverrideGlobalSubnetWhitelist = m.OverrideGlobalSubnetWhitelist - - dataAO0.SubnetWhitelist = m.SubnetWhitelist - - dataAO0.OverrideGlobalNetgroupWhitelist = m.OverrideGlobalNetgroupWhitelist - - dataAO0.SecurityMode = m.SecurityMode - - dataAO0.Description = m.Description - - dataAO0.AllowMountOnWindows = m.AllowMountOnWindows - - dataAO0.EnableMinion = m.EnableMinion - - dataAO0.EnableFilerAuditLogging = m.EnableFilerAuditLogging - - dataAO0.TenantID = m.TenantID - - dataAO0.EnableLiveIndexing = m.EnableLiveIndexing - - dataAO0.EnableOfflineCaching = m.EnableOfflineCaching - - dataAO0.AccessSids = m.AccessSids - - dataAO0.ViewLockEnabled = m.ViewLockEnabled - - dataAO0.IsReadOnly = m.IsReadOnly - - dataAO0.EnableMetadataAccelerator = m.EnableMetadataAccelerator - - dataAO0.IsExternallyTriggeredBackupTarget = m.IsExternallyTriggeredBackupTarget - - dataAO0.LexicographicPrefetch = m.LexicographicPrefetch - - dataAO0.AntivirusScanConfig = m.AntivirusScanConfig - - dataAO0.FileExtensionFilter = m.FileExtensionFilter - - dataAO0.FileLockConfig = m.FileLockConfig - - dataAO0.FilerLifecycleManagement = m.FilerLifecycleManagement - - dataAO0.LogicalQuota = m.LogicalQuota - - dataAO0.NetgroupWhitelist = m.NetgroupWhitelist - - dataAO0.Qos = m.Qos - - dataAO0.SelfServiceSnapshotConfig = m.SelfServiceSnapshotConfig - - dataAO0.StoragePolicyOverride = m.StoragePolicyOverride - - dataAO0.ViewPinningConfig = m.ViewPinningConfig - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.NfsConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.SmbConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - - aO3, err := swag.WriteJSON(m.S3Config) - if err != nil { - return nil, err - } - _parts = append(_parts, aO3) - - aO4, err := swag.WriteJSON(m.SwiftConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO4) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update view param -func (m *UpdateViewParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProtocolAccess(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecurityMode(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAntivirusScanConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileExtensionFilter(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileLockConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilerLifecycleManagement(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalQuota(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetgroupWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSelfServiceSnapshotConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStoragePolicyOverride(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewPinningConfig(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with NfsConfig - if err := m.NfsConfig.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SmbConfig - if err := m.SmbConfig.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with S3Config - if err := m.S3Config.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SwiftConfig - if err := m.SwiftConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var updateViewParamTypeCategoryPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupTarget","FileServices","ObjectServices"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateViewParamTypeCategoryPropEnum = append(updateViewParamTypeCategoryPropEnum, v) - } -} - -// property enum -func (m *UpdateViewParam) validateCategoryEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateViewParamTypeCategoryPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateViewParam) validateCategory(formats strfmt.Registry) error { - - if swag.IsZero(m.Category) { // not required - return nil - } - - // value enum - if err := m.validateCategoryEnum("category", "body", *m.Category); err != nil { - return err - } - - return nil -} - -func (m *UpdateViewParam) validateProtocolAccess(formats strfmt.Registry) error { - - if swag.IsZero(m.ProtocolAccess) { // not required - return nil - } - - for i := 0; i < len(m.ProtocolAccess); i++ { - if swag.IsZero(m.ProtocolAccess[i]) { // not required - continue - } - - if m.ProtocolAccess[i] != nil { - if err := m.ProtocolAccess[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) validateSubnetWhitelist(formats strfmt.Registry) error { - - if swag.IsZero(m.SubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.SubnetWhitelist); i++ { - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - continue - } - - if m.SubnetWhitelist[i] != nil { - if err := m.SubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var updateViewParamTypeSecurityModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NativeMode","UnifiedMode","NtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - updateViewParamTypeSecurityModePropEnum = append(updateViewParamTypeSecurityModePropEnum, v) - } -} - -// property enum -func (m *UpdateViewParam) validateSecurityModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, updateViewParamTypeSecurityModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpdateViewParam) validateSecurityMode(formats strfmt.Registry) error { - - if swag.IsZero(m.SecurityMode) { // not required - return nil - } - - // value enum - if err := m.validateSecurityModeEnum("securityMode", "body", *m.SecurityMode); err != nil { - return err - } - - return nil -} - -func (m *UpdateViewParam) validateAntivirusScanConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if m.AntivirusScanConfig != nil { - if err := m.AntivirusScanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateFileExtensionFilter(formats strfmt.Registry) error { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if m.FileExtensionFilter != nil { - if err := m.FileExtensionFilter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateFileLockConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if m.FileLockConfig != nil { - if err := m.FileLockConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateFilerLifecycleManagement(formats strfmt.Registry) error { - - if swag.IsZero(m.FilerLifecycleManagement) { // not required - return nil - } - - if m.FilerLifecycleManagement != nil { - if err := m.FilerLifecycleManagement.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerLifecycleManagement") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerLifecycleManagement") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateLogicalQuota(formats strfmt.Registry) error { - - if swag.IsZero(m.LogicalQuota) { // not required - 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 -} - -func (m *UpdateViewParam) validateNetgroupWhitelist(formats strfmt.Registry) error { - - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - if m.NetgroupWhitelist != nil { - if err := m.NetgroupWhitelist.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateQos(formats strfmt.Registry) error { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if m.Qos != nil { - if err := m.Qos.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateSelfServiceSnapshotConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.SelfServiceSnapshotConfig) { // not required - return nil - } - - if m.SelfServiceSnapshotConfig != nil { - if err := m.SelfServiceSnapshotConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selfServiceSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selfServiceSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateStoragePolicyOverride(formats strfmt.Registry) error { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if m.StoragePolicyOverride != nil { - if err := m.StoragePolicyOverride.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) validateViewPinningConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if m.ViewPinningConfig != nil { - if err := m.ViewPinningConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - 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 - - if err := m.contextValidateProtocolAccess(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAntivirusScanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileExtensionFilter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileLockConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilerLifecycleManagement(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLogicalQuota(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetgroupWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSelfServiceSnapshotConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStoragePolicyOverride(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewPinningConfig(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with NfsConfig - if err := m.NfsConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SmbConfig - if err := m.SmbConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with S3Config - if err := m.S3Config.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with SwiftConfig - if err := m.SwiftConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpdateViewParam) contextValidateProtocolAccess(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtocolAccess); i++ { - - if m.ProtocolAccess[i] != nil { - - if swag.IsZero(m.ProtocolAccess[i]) { // not required - return nil - } - - if err := m.ProtocolAccess[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protocolAccess" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) contextValidateSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubnetWhitelist); i++ { - - if m.SubnetWhitelist[i] != nil { - - if swag.IsZero(m.SubnetWhitelist[i]) { // not required - return nil - } - - if err := m.SubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *UpdateViewParam) contextValidateAntivirusScanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AntivirusScanConfig != nil { - - if swag.IsZero(m.AntivirusScanConfig) { // not required - return nil - } - - if err := m.AntivirusScanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("antivirusScanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("antivirusScanConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateFileExtensionFilter(ctx context.Context, formats strfmt.Registry) error { - - if m.FileExtensionFilter != nil { - - if swag.IsZero(m.FileExtensionFilter) { // not required - return nil - } - - if err := m.FileExtensionFilter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileExtensionFilter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileExtensionFilter") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateFileLockConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.FileLockConfig != nil { - - if swag.IsZero(m.FileLockConfig) { // not required - return nil - } - - if err := m.FileLockConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileLockConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileLockConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateFilerLifecycleManagement(ctx context.Context, formats strfmt.Registry) error { - - if m.FilerLifecycleManagement != nil { - - if swag.IsZero(m.FilerLifecycleManagement) { // not required - return nil - } - - if err := m.FilerLifecycleManagement.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filerLifecycleManagement") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filerLifecycleManagement") - } - return err - } - } - - return nil -} - -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 -} - -func (m *UpdateViewParam) contextValidateNetgroupWhitelist(ctx context.Context, formats strfmt.Registry) error { - - if m.NetgroupWhitelist != nil { - - if swag.IsZero(m.NetgroupWhitelist) { // not required - return nil - } - - if err := m.NetgroupWhitelist.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netgroupWhitelist") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netgroupWhitelist") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateQos(ctx context.Context, formats strfmt.Registry) error { - - if m.Qos != nil { - - if swag.IsZero(m.Qos) { // not required - return nil - } - - if err := m.Qos.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("qos") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("qos") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateSelfServiceSnapshotConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SelfServiceSnapshotConfig != nil { - - if swag.IsZero(m.SelfServiceSnapshotConfig) { // not required - return nil - } - - if err := m.SelfServiceSnapshotConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selfServiceSnapshotConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selfServiceSnapshotConfig") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateStoragePolicyOverride(ctx context.Context, formats strfmt.Registry) error { - - if m.StoragePolicyOverride != nil { - - if swag.IsZero(m.StoragePolicyOverride) { // not required - return nil - } - - if err := m.StoragePolicyOverride.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storagePolicyOverride") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("storagePolicyOverride") - } - return err - } - } - - return nil -} - -func (m *UpdateViewParam) contextValidateViewPinningConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewPinningConfig != nil { - - if swag.IsZero(m.ViewPinningConfig) { // not required - return nil - } - - if err := m.ViewPinningConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewPinningConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewPinningConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateViewParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateViewParam) UnmarshalBinary(b []byte) error { - var res UpdateViewParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgrade_check_node_result.go b/v2/models/upgrade_check_node_result.go deleted file mode 100644 index 0f8c360c..00000000 --- a/v2/models/upgrade_check_node_result.go +++ /dev/null @@ -1,187 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpgradeCheckNodeResult :Healthcheck results for node" -// -// # The healthcheck results for node -// -// swagger:model UpgradeCheckNodeResult -type UpgradeCheckNodeResult struct { - - // The node ip - NodeIP string `json:"nodeIp,omitempty"` - - // The healthcheck run status for node - // Enum: ["Running","Passed","Failed","Skipped","Error"] - NodeTestStatus string `json:"nodeTestStatus,omitempty"` - - // The healthcheck test results for node - NodeTestResults []*UpgradeCheckTestResult `json:"nodeTestResults,omitempty"` -} - -// Validate validates this upgrade check node result -func (m *UpgradeCheckNodeResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodeTestStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeTestResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var upgradeCheckNodeResultTypeNodeTestStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Passed","Failed","Skipped","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradeCheckNodeResultTypeNodeTestStatusPropEnum = append(upgradeCheckNodeResultTypeNodeTestStatusPropEnum, v) - } -} - -const ( - - // UpgradeCheckNodeResultNodeTestStatusRunning captures enum value "Running" - UpgradeCheckNodeResultNodeTestStatusRunning string = "Running" - - // UpgradeCheckNodeResultNodeTestStatusPassed captures enum value "Passed" - UpgradeCheckNodeResultNodeTestStatusPassed string = "Passed" - - // UpgradeCheckNodeResultNodeTestStatusFailed captures enum value "Failed" - UpgradeCheckNodeResultNodeTestStatusFailed string = "Failed" - - // UpgradeCheckNodeResultNodeTestStatusSkipped captures enum value "Skipped" - UpgradeCheckNodeResultNodeTestStatusSkipped string = "Skipped" - - // UpgradeCheckNodeResultNodeTestStatusError captures enum value "Error" - UpgradeCheckNodeResultNodeTestStatusError string = "Error" -) - -// prop value enum -func (m *UpgradeCheckNodeResult) validateNodeTestStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradeCheckNodeResultTypeNodeTestStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradeCheckNodeResult) validateNodeTestStatus(formats strfmt.Registry) error { - if swag.IsZero(m.NodeTestStatus) { // not required - return nil - } - - // value enum - if err := m.validateNodeTestStatusEnum("nodeTestStatus", "body", m.NodeTestStatus); err != nil { - return err - } - - return nil -} - -func (m *UpgradeCheckNodeResult) validateNodeTestResults(formats strfmt.Registry) error { - if swag.IsZero(m.NodeTestResults) { // not required - return nil - } - - for i := 0; i < len(m.NodeTestResults); i++ { - if swag.IsZero(m.NodeTestResults[i]) { // not required - continue - } - - if m.NodeTestResults[i] != nil { - if err := m.NodeTestResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeTestResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeTestResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this upgrade check node result based on the context it is used -func (m *UpgradeCheckNodeResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeTestResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpgradeCheckNodeResult) contextValidateNodeTestResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeTestResults); i++ { - - if m.NodeTestResults[i] != nil { - - if swag.IsZero(m.NodeTestResults[i]) { // not required - return nil - } - - if err := m.NodeTestResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeTestResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeTestResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeCheckNodeResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeCheckNodeResult) UnmarshalBinary(b []byte) error { - var res UpgradeCheckNodeResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgrade_check_run_tests_request.go b/v2/models/upgrade_check_run_tests_request.go deleted file mode 100644 index fcbeda6e..00000000 --- a/v2/models/upgrade_check_run_tests_request.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpgradeCheckRunTestsRequest Upgrade checks request -// -// # Specifies upgrade checks request parameters -// -// swagger:model UpgradeCheckRunTestsRequest -type UpgradeCheckRunTestsRequest struct { - - // Type of upgrade checks(pre/post) to run - // Enum: ["PreUpgrade","PostUpgrade"] - RequestType string `json:"requestType,omitempty"` -} - -// Validate validates this upgrade check run tests request -func (m *UpgradeCheckRunTestsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRequestType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var upgradeCheckRunTestsRequestTypeRequestTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PreUpgrade","PostUpgrade"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradeCheckRunTestsRequestTypeRequestTypePropEnum = append(upgradeCheckRunTestsRequestTypeRequestTypePropEnum, v) - } -} - -const ( - - // UpgradeCheckRunTestsRequestRequestTypePreUpgrade captures enum value "PreUpgrade" - UpgradeCheckRunTestsRequestRequestTypePreUpgrade string = "PreUpgrade" - - // UpgradeCheckRunTestsRequestRequestTypePostUpgrade captures enum value "PostUpgrade" - UpgradeCheckRunTestsRequestRequestTypePostUpgrade string = "PostUpgrade" -) - -// prop value enum -func (m *UpgradeCheckRunTestsRequest) validateRequestTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradeCheckRunTestsRequestTypeRequestTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradeCheckRunTestsRequest) validateRequestType(formats strfmt.Registry) error { - if swag.IsZero(m.RequestType) { // not required - return nil - } - - // value enum - if err := m.validateRequestTypeEnum("requestType", "body", m.RequestType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this upgrade check run tests request based on context it is used -func (m *UpgradeCheckRunTestsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeCheckRunTestsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeCheckRunTestsRequest) UnmarshalBinary(b []byte) error { - var res UpgradeCheckRunTestsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgrade_check_run_tests_result.go b/v2/models/upgrade_check_run_tests_result.go deleted file mode 100644 index fe82aaca..00000000 --- a/v2/models/upgrade_check_run_tests_result.go +++ /dev/null @@ -1,52 +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" -) - -// UpgradeCheckRunTestsResult Upgrade checks request result -// -// Specifies the result for upgrade checks run tests request. -// -// swagger:model UpgradeCheckRunTestsResult -type UpgradeCheckRunTestsResult struct { - - // Specifies test run instance allocated for upgrade checks - TestRunInstanceID int64 `json:"testRunInstanceId,omitempty"` -} - -// Validate validates this upgrade check run tests result -func (m *UpgradeCheckRunTestsResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upgrade check run tests result based on context it is used -func (m *UpgradeCheckRunTestsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeCheckRunTestsResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeCheckRunTestsResult) UnmarshalBinary(b []byte) error { - var res UpgradeCheckRunTestsResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgrade_check_test_result.go b/v2/models/upgrade_check_test_result.go deleted file mode 100644 index 009f97a1..00000000 --- a/v2/models/upgrade_check_test_result.go +++ /dev/null @@ -1,134 +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" -) - -// UpgradeCheckTestResult :Healthcheck test result" -// -// # The healthcheck test result -// -// swagger:model UpgradeCheckTestResult -type UpgradeCheckTestResult struct { - - // The healthcheck test id - TestID string `json:"testId,omitempty"` - - // The healthcheck test name - TestName string `json:"testName,omitempty"` - - // The healthcheck test result - // Enum: ["Passed","Failed","Warning","Skipped","Error","Timeout","Unknown"] - TestResult string `json:"testResult,omitempty"` - - // The healthcheck test output - TestOutput string `json:"testOutput,omitempty"` - - // The kb link for diagnosing test failure - TestKbLink string `json:"testKbLink,omitempty"` -} - -// Validate validates this upgrade check test result -func (m *UpgradeCheckTestResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTestResult(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var upgradeCheckTestResultTypeTestResultPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Passed","Failed","Warning","Skipped","Error","Timeout","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradeCheckTestResultTypeTestResultPropEnum = append(upgradeCheckTestResultTypeTestResultPropEnum, v) - } -} - -const ( - - // UpgradeCheckTestResultTestResultPassed captures enum value "Passed" - UpgradeCheckTestResultTestResultPassed string = "Passed" - - // UpgradeCheckTestResultTestResultFailed captures enum value "Failed" - UpgradeCheckTestResultTestResultFailed string = "Failed" - - // UpgradeCheckTestResultTestResultWarning captures enum value "Warning" - UpgradeCheckTestResultTestResultWarning string = "Warning" - - // UpgradeCheckTestResultTestResultSkipped captures enum value "Skipped" - UpgradeCheckTestResultTestResultSkipped string = "Skipped" - - // UpgradeCheckTestResultTestResultError captures enum value "Error" - UpgradeCheckTestResultTestResultError string = "Error" - - // UpgradeCheckTestResultTestResultTimeout captures enum value "Timeout" - UpgradeCheckTestResultTestResultTimeout string = "Timeout" - - // UpgradeCheckTestResultTestResultUnknown captures enum value "Unknown" - UpgradeCheckTestResultTestResultUnknown string = "Unknown" -) - -// prop value enum -func (m *UpgradeCheckTestResult) validateTestResultEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradeCheckTestResultTypeTestResultPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradeCheckTestResult) validateTestResult(formats strfmt.Registry) error { - if swag.IsZero(m.TestResult) { // not required - return nil - } - - // value enum - if err := m.validateTestResultEnum("testResult", "body", m.TestResult); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this upgrade check test result based on context it is used -func (m *UpgradeCheckTestResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeCheckTestResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeCheckTestResult) UnmarshalBinary(b []byte) error { - var res UpgradeCheckTestResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgrade_checks_results.go b/v2/models/upgrade_checks_results.go deleted file mode 100644 index 48779aa7..00000000 --- a/v2/models/upgrade_checks_results.go +++ /dev/null @@ -1,193 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpgradeChecksResults Upgrade checks results -// -// Specifies upgrade checks results from cluster. -// -// swagger:model UpgradeChecksResults -type UpgradeChecksResults struct { - - // Specifies test run instance of upgrade checks - TestRunInstanceID string `json:"testRunInstanceId,omitempty"` - - // type of checks(preupgrade/postupgrade) - RequestType string `json:"requestType,omitempty"` - - // Specifies unix epoch start time of checks(in seconds). - StartTimeSecs *int64 `json:"startTimeSecs,omitempty"` - - // Specifies unix epoch finish time of checks(in seconds). - FinishTimeSecs *int64 `json:"finishTimeSecs,omitempty"` - - // final result (running/pass/fail) of run - // Enum: ["Running","Passed","Failed","NotAvailable"] - ResultStatus string `json:"resultStatus,omitempty"` - - // The healthcheck result for node - NodeResults []*UpgradeCheckNodeResult `json:"nodeResults,omitempty"` -} - -// Validate validates this upgrade checks results -func (m *UpgradeChecksResults) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResultStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var upgradeChecksResultsTypeResultStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Passed","Failed","NotAvailable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradeChecksResultsTypeResultStatusPropEnum = append(upgradeChecksResultsTypeResultStatusPropEnum, v) - } -} - -const ( - - // UpgradeChecksResultsResultStatusRunning captures enum value "Running" - UpgradeChecksResultsResultStatusRunning string = "Running" - - // UpgradeChecksResultsResultStatusPassed captures enum value "Passed" - UpgradeChecksResultsResultStatusPassed string = "Passed" - - // UpgradeChecksResultsResultStatusFailed captures enum value "Failed" - UpgradeChecksResultsResultStatusFailed string = "Failed" - - // UpgradeChecksResultsResultStatusNotAvailable captures enum value "NotAvailable" - UpgradeChecksResultsResultStatusNotAvailable string = "NotAvailable" -) - -// prop value enum -func (m *UpgradeChecksResults) validateResultStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradeChecksResultsTypeResultStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradeChecksResults) validateResultStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ResultStatus) { // not required - return nil - } - - // value enum - if err := m.validateResultStatusEnum("resultStatus", "body", m.ResultStatus); err != nil { - return err - } - - return nil -} - -func (m *UpgradeChecksResults) validateNodeResults(formats strfmt.Registry) error { - if swag.IsZero(m.NodeResults) { // not required - return nil - } - - for i := 0; i < len(m.NodeResults); i++ { - if swag.IsZero(m.NodeResults[i]) { // not required - continue - } - - if m.NodeResults[i] != nil { - if err := m.NodeResults[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this upgrade checks results based on the context it is used -func (m *UpgradeChecksResults) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodeResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UpgradeChecksResults) contextValidateNodeResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NodeResults); i++ { - - if m.NodeResults[i] != nil { - - if swag.IsZero(m.NodeResults[i]) { // not required - return nil - } - - if err := m.NodeResults[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodeResults" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodeResults" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradeChecksResults) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradeChecksResults) UnmarshalBinary(b []byte) error { - var res UpgradeChecksResults - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgradecheck_node_test_status.go b/v2/models/upgradecheck_node_test_status.go deleted file mode 100644 index d113ca64..00000000 --- a/v2/models/upgradecheck_node_test_status.go +++ /dev/null @@ -1,116 +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" -) - -// UpgradecheckNodeTestStatus Upgrade Check execution status on node. -// -// Specifies status of running upgrade health checks on the node. The healthchecks execution on node can have following possible outcomes Running - The health check is still running on the node. Passed - The health check has passed on this node. Failed - The health check failed on node. Corrective action as described by knowledge base article for the failure must be taken to resolve failure. Skipped - The health check was skipped on this node. Error - Health check execution failure on node. -// -// swagger:model UpgradecheckNodeTestStatus -type UpgradecheckNodeTestStatus struct { - - // Specifies the node status of running upgrade checks. - // Enum: ["Running","Passed","Failed","Skipped","Error"] - Value string `json:"value,omitempty"` -} - -// Validate validates this upgradecheck node test status -func (m *UpgradecheckNodeTestStatus) 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 upgradecheckNodeTestStatusTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Passed","Failed","Skipped","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradecheckNodeTestStatusTypeValuePropEnum = append(upgradecheckNodeTestStatusTypeValuePropEnum, v) - } -} - -const ( - - // UpgradecheckNodeTestStatusValueRunning captures enum value "Running" - UpgradecheckNodeTestStatusValueRunning string = "Running" - - // UpgradecheckNodeTestStatusValuePassed captures enum value "Passed" - UpgradecheckNodeTestStatusValuePassed string = "Passed" - - // UpgradecheckNodeTestStatusValueFailed captures enum value "Failed" - UpgradecheckNodeTestStatusValueFailed string = "Failed" - - // UpgradecheckNodeTestStatusValueSkipped captures enum value "Skipped" - UpgradecheckNodeTestStatusValueSkipped string = "Skipped" - - // UpgradecheckNodeTestStatusValueError captures enum value "Error" - UpgradecheckNodeTestStatusValueError string = "Error" -) - -// prop value enum -func (m *UpgradecheckNodeTestStatus) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradecheckNodeTestStatusTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradecheckNodeTestStatus) 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 upgradecheck node test status based on context it is used -func (m *UpgradecheckNodeTestStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradecheckNodeTestStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradecheckNodeTestStatus) UnmarshalBinary(b []byte) error { - var res UpgradecheckNodeTestStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgradecheck_request_type.go b/v2/models/upgradecheck_request_type.go deleted file mode 100644 index b29e158f..00000000 --- a/v2/models/upgradecheck_request_type.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UpgradecheckRequestType Upgrade check request type (preupgrade/postupgrade) -// -// Specifies the type of upgrade checks to perform. Based on selected upgrade checks category, the relevant checks are performed on the cluster. Following types of upgrade healthchecks can be requested Preupgrade - Checks relevant before performing an upgrade. Postupgrade - Checks relevant after performing an upgrade. -// -// swagger:model UpgradecheckRequestType -type UpgradecheckRequestType struct { - - // value - // Enum: ["PreUpgrade","PostUpgrade"] - Value string `json:"value,omitempty"` -} - -// Validate validates this upgradecheck request type -func (m *UpgradecheckRequestType) 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 upgradecheckRequestTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["PreUpgrade","PostUpgrade"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradecheckRequestTypeTypeValuePropEnum = append(upgradecheckRequestTypeTypeValuePropEnum, v) - } -} - -const ( - - // UpgradecheckRequestTypeValuePreUpgrade captures enum value "PreUpgrade" - UpgradecheckRequestTypeValuePreUpgrade string = "PreUpgrade" - - // UpgradecheckRequestTypeValuePostUpgrade captures enum value "PostUpgrade" - UpgradecheckRequestTypeValuePostUpgrade string = "PostUpgrade" -) - -// prop value enum -func (m *UpgradecheckRequestType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradecheckRequestTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradecheckRequestType) 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 upgradecheck request type based on context it is used -func (m *UpgradecheckRequestType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradecheckRequestType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradecheckRequestType) UnmarshalBinary(b []byte) error { - var res UpgradecheckRequestType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgradecheck_result_status.go b/v2/models/upgradecheck_result_status.go deleted file mode 100644 index a7a422a2..00000000 --- a/v2/models/upgradecheck_result_status.go +++ /dev/null @@ -1,113 +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" -) - -// UpgradecheckResultStatus Upgrade Check result status on cluster. -// -// Specifies the overall status of running upgrade health checks. The healthchecks execution status can have following possible values Running - The health checks are still running on cluster. Passed - The health checks have passed on the cluster. Failed - The health checks failed on the cluster node. -// -// swagger:model UpgradecheckResultStatus -type UpgradecheckResultStatus struct { - - // Specifies status of running upgrade checks on cluster. - // Enum: ["Running","Passed","Failed","NotAvailable"] - Value string `json:"value,omitempty"` -} - -// Validate validates this upgradecheck result status -func (m *UpgradecheckResultStatus) 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 upgradecheckResultStatusTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Passed","Failed","NotAvailable"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradecheckResultStatusTypeValuePropEnum = append(upgradecheckResultStatusTypeValuePropEnum, v) - } -} - -const ( - - // UpgradecheckResultStatusValueRunning captures enum value "Running" - UpgradecheckResultStatusValueRunning string = "Running" - - // UpgradecheckResultStatusValuePassed captures enum value "Passed" - UpgradecheckResultStatusValuePassed string = "Passed" - - // UpgradecheckResultStatusValueFailed captures enum value "Failed" - UpgradecheckResultStatusValueFailed string = "Failed" - - // UpgradecheckResultStatusValueNotAvailable captures enum value "NotAvailable" - UpgradecheckResultStatusValueNotAvailable string = "NotAvailable" -) - -// prop value enum -func (m *UpgradecheckResultStatus) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradecheckResultStatusTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradecheckResultStatus) 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 upgradecheck result status based on context it is used -func (m *UpgradecheckResultStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradecheckResultStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradecheckResultStatus) UnmarshalBinary(b []byte) error { - var res UpgradecheckResultStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upgradecheck_test_result.go b/v2/models/upgradecheck_test_result.go deleted file mode 100644 index 019145b2..00000000 --- a/v2/models/upgradecheck_test_result.go +++ /dev/null @@ -1,122 +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" -) - -// UpgradecheckTestResult Upgrade Check execution result. -// -// Specifies an upgrade check result. Upgrade checks perform health checks on cluster before upgrade and report failures that are useful for cluster health diagnosis. When a health check executes it has one of many possible outcomes that are enumerated here. The healthcheck result can have following possible outcomes Passed - Health check has passed. Failed - Health check failed. Corrective action as described by knowledge base article for the failure must be taken to resolve failure. Skipped - Health check was skipped as it does not apply for the platform / model. Warning - Health check found issues in cluster with warning severity. diagnose the check as per knowledge base article for the check. Error - Health check execution failure. This could be due to failure for the check to be launched or unexepcted termination of the check. Timeout - Health check execution timed out. -// -// swagger:model UpgradecheckTestResult -type UpgradecheckTestResult struct { - - // Specifies the list of upgrade check test results. - // Enum: ["Passed","Failed","Warning","Skipped","Error","Timeout","Unknown"] - Value string `json:"value,omitempty"` -} - -// Validate validates this upgradecheck test result -func (m *UpgradecheckTestResult) 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 upgradecheckTestResultTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Passed","Failed","Warning","Skipped","Error","Timeout","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - upgradecheckTestResultTypeValuePropEnum = append(upgradecheckTestResultTypeValuePropEnum, v) - } -} - -const ( - - // UpgradecheckTestResultValuePassed captures enum value "Passed" - UpgradecheckTestResultValuePassed string = "Passed" - - // UpgradecheckTestResultValueFailed captures enum value "Failed" - UpgradecheckTestResultValueFailed string = "Failed" - - // UpgradecheckTestResultValueWarning captures enum value "Warning" - UpgradecheckTestResultValueWarning string = "Warning" - - // UpgradecheckTestResultValueSkipped captures enum value "Skipped" - UpgradecheckTestResultValueSkipped string = "Skipped" - - // UpgradecheckTestResultValueError captures enum value "Error" - UpgradecheckTestResultValueError string = "Error" - - // UpgradecheckTestResultValueTimeout captures enum value "Timeout" - UpgradecheckTestResultValueTimeout string = "Timeout" - - // UpgradecheckTestResultValueUnknown captures enum value "Unknown" - UpgradecheckTestResultValueUnknown string = "Unknown" -) - -// prop value enum -func (m *UpgradecheckTestResult) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, upgradecheckTestResultTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UpgradecheckTestResult) 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 upgradecheck test result based on context it is used -func (m *UpgradecheckTestResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UpgradecheckTestResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpgradecheckTestResult) UnmarshalBinary(b []byte) error { - var res UpgradecheckTestResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uplink_switch.go b/v2/models/uplink_switch.go deleted file mode 100644 index 70796eaf..00000000 --- a/v2/models/uplink_switch.go +++ /dev/null @@ -1,56 +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" -) - -// UplinkSwitch Uplink switch details. -// -// swagger:model UplinkSwitch -type UplinkSwitch struct { - - // Name of the system. - Name *string `json:"name,omitempty"` - - // Description of the system. - Description *string `json:"description,omitempty"` - - // Port id. - PortID *string `json:"portId,omitempty"` -} - -// Validate validates this uplink switch -func (m *UplinkSwitch) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this uplink switch based on context it is used -func (m *UplinkSwitch) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UplinkSwitch) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UplinkSwitch) UnmarshalBinary(b []byte) error { - var res UplinkSwitch - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upload_cluster_cert_request.go b/v2/models/upload_cluster_cert_request.go deleted file mode 100644 index 097b8225..00000000 --- a/v2/models/upload_cluster_cert_request.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UploadClusterCertRequest Specifies the payload for the upload cluster certificates request -// -// swagger:model UploadClusterCertRequest -type UploadClusterCertRequest struct { - - // Array of certificates - Certificates []*Certificate `json:"certificates,omitempty"` -} - -// Validate validates this upload cluster cert request -func (m *UploadClusterCertRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCertificates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UploadClusterCertRequest) validateCertificates(formats strfmt.Registry) error { - if swag.IsZero(m.Certificates) { // not required - return nil - } - - for i := 0; i < len(m.Certificates); i++ { - if swag.IsZero(m.Certificates[i]) { // not required - continue - } - - if m.Certificates[i] != nil { - if err := m.Certificates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this upload cluster cert request based on the context it is used -func (m *UploadClusterCertRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCertificates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UploadClusterCertRequest) contextValidateCertificates(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Certificates); i++ { - - if m.Certificates[i] != nil { - - if swag.IsZero(m.Certificates[i]) { // not required - return nil - } - - if err := m.Certificates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("certificates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UploadClusterCertRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UploadClusterCertRequest) UnmarshalBinary(b []byte) error { - var res UploadClusterCertRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upload_cluster_cert_response.go b/v2/models/upload_cluster_cert_response.go deleted file mode 100644 index e951eba4..00000000 --- a/v2/models/upload_cluster_cert_response.go +++ /dev/null @@ -1,50 +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" -) - -// UploadClusterCertResponse Specifies the response of the upload cluster certificate request -// -// swagger:model UploadClusterCertResponse -type UploadClusterCertResponse struct { - - // status messages - StatusMessages []string `json:"statusMessages"` -} - -// Validate validates this upload cluster cert response -func (m *UploadClusterCertResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upload cluster cert response based on context it is used -func (m *UploadClusterCertResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UploadClusterCertResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UploadClusterCertResponse) UnmarshalBinary(b []byte) error { - var res UploadClusterCertResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/upload_package_url_params.go b/v2/models/upload_package_url_params.go deleted file mode 100644 index aef3ee19..00000000 --- a/v2/models/upload_package_url_params.go +++ /dev/null @@ -1,71 +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" -) - -// UploadPackageURLParams Parameters to upload a package to the cluster by URL. -// -// swagger:model UploadPackageUrlParams -type UploadPackageURLParams struct { - - // The URL where the package is hosted. - // Required: true - URL *string `json:"url"` -} - -// Validate validates this upload package Url params -func (m *UploadPackageURLParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateURL(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UploadPackageURLParams) validateURL(formats strfmt.Registry) error { - - if err := validate.Required("url", "body", m.URL); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this upload package Url params based on context it is used -func (m *UploadPackageURLParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UploadPackageURLParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UploadPackageURLParams) UnmarshalBinary(b []byte) error { - var res UploadPackageURLParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uptiering_file_age_policy.go b/v2/models/uptiering_file_age_policy.go deleted file mode 100644 index 446032d4..00000000 --- a/v2/models/uptiering_file_age_policy.go +++ /dev/null @@ -1,114 +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" -) - -// UptieringFileAgePolicy Specifies the file's selection rule by file age for up tiering data -// tiering task eg. -// 1. select files last accessed 2 weeks ago. -// 2. select files last modified 1 month ago. -// -// swagger:model UptieringFileAgePolicy -type UptieringFileAgePolicy struct { - - // Specifies the condition for the file age. - // Enum: ["LastAccessed","LastModified"] - Condition *string `json:"condition,omitempty"` - - // Specifies the number of msecs used for file selection. - AgeMsecs *int64 `json:"ageMsecs,omitempty"` - - // Specifies number of file access in last ageMsecs. - NumFileAccess *uint32 `json:"numFileAccess,omitempty"` -} - -// Validate validates this uptiering file age policy -func (m *UptieringFileAgePolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCondition(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var uptieringFileAgePolicyTypeConditionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LastAccessed","LastModified"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - uptieringFileAgePolicyTypeConditionPropEnum = append(uptieringFileAgePolicyTypeConditionPropEnum, v) - } -} - -const ( - - // UptieringFileAgePolicyConditionLastAccessed captures enum value "LastAccessed" - UptieringFileAgePolicyConditionLastAccessed string = "LastAccessed" - - // UptieringFileAgePolicyConditionLastModified captures enum value "LastModified" - UptieringFileAgePolicyConditionLastModified string = "LastModified" -) - -// prop value enum -func (m *UptieringFileAgePolicy) validateConditionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, uptieringFileAgePolicyTypeConditionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UptieringFileAgePolicy) validateCondition(formats strfmt.Registry) error { - if swag.IsZero(m.Condition) { // not required - return nil - } - - // value enum - if err := m.validateConditionEnum("condition", "body", *m.Condition); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this uptiering file age policy based on context it is used -func (m *UptieringFileAgePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UptieringFileAgePolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UptieringFileAgePolicy) UnmarshalBinary(b []byte) error { - var res UptieringFileAgePolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uptiering_policy.go b/v2/models/uptiering_policy.go deleted file mode 100644 index 805c7922..00000000 --- a/v2/models/uptiering_policy.go +++ /dev/null @@ -1,241 +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" -) - -// UptieringPolicy Specifies the data uptiering policy. -// -// swagger:model UptieringPolicy -type UptieringPolicy struct { - - // file age - FileAge *UptieringFileAgePolicy `json:"fileAge,omitempty"` - - // If set, all files in the view will be uptiered regardless of - // file_select_policy, num_file_access, hot_file_window, file_size - // constraints. - IncludeAllFiles *bool `json:"includeAllFiles,omitempty"` - - // target - Target *UptieringTarget `json:"target,omitempty"` - - CommonTieringPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UptieringPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - FileAge *UptieringFileAgePolicy `json:"fileAge,omitempty"` - - IncludeAllFiles *bool `json:"includeAllFiles,omitempty"` - - Target *UptieringTarget `json:"target,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.FileAge = dataAO0.FileAge - - m.IncludeAllFiles = dataAO0.IncludeAllFiles - - m.Target = dataAO0.Target - - // AO1 - var aO1 CommonTieringPolicy - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonTieringPolicy = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UptieringPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - FileAge *UptieringFileAgePolicy `json:"fileAge,omitempty"` - - IncludeAllFiles *bool `json:"includeAllFiles,omitempty"` - - Target *UptieringTarget `json:"target,omitempty"` - } - - dataAO0.FileAge = m.FileAge - - dataAO0.IncludeAllFiles = m.IncludeAllFiles - - dataAO0.Target = m.Target - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonTieringPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this uptiering policy -func (m *UptieringPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileAge(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonTieringPolicy - if err := m.CommonTieringPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UptieringPolicy) validateFileAge(formats strfmt.Registry) error { - - if swag.IsZero(m.FileAge) { // not required - return nil - } - - if m.FileAge != nil { - if err := m.FileAge.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileAge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileAge") - } - return err - } - } - - return nil -} - -func (m *UptieringPolicy) validateTarget(formats strfmt.Registry) error { - - if swag.IsZero(m.Target) { // not required - 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 -} - -// ContextValidate validate this uptiering policy based on the context it is used -func (m *UptieringPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileAge(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonTieringPolicy - if err := m.CommonTieringPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UptieringPolicy) contextValidateFileAge(ctx context.Context, formats strfmt.Registry) error { - - if m.FileAge != nil { - - if swag.IsZero(m.FileAge) { // not required - return nil - } - - if err := m.FileAge.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileAge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileAge") - } - return err - } - } - - return nil -} - -func (m *UptieringPolicy) 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 -} - -// MarshalBinary interface implementation -func (m *UptieringPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UptieringPolicy) UnmarshalBinary(b []byte) error { - var res UptieringPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/uptiering_target.go b/v2/models/uptiering_target.go deleted file mode 100644 index 39ee5e58..00000000 --- a/v2/models/uptiering_target.go +++ /dev/null @@ -1,144 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UptieringTarget Specifies the target data tiering details for uptier job. -// This is in beta phase. Please use target inside -// CommonDataTieringTaskParams, present directly under data tiering request -// body. If target is present inside CommonDataTieringTaskParams, this -// target will be ignored. -// -// swagger:model UptieringTarget -type UptieringTarget struct { - - // Specifies the Storage Domain ID where the view will be kept. - // Required: true - StorageDomainID *int64 `json:"storageDomainId"` - - // Specifies a list of mapping between sources and its corresponding - // viewNames and mountPaths, where the sources were downtiered. - DowntieredDataLocations []*DowntieredDataLocation `json:"downtieredDataLocations"` -} - -// Validate validates this uptiering target -func (m *UptieringTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStorageDomainID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDowntieredDataLocations(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UptieringTarget) validateStorageDomainID(formats strfmt.Registry) error { - - if err := validate.Required("storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -func (m *UptieringTarget) validateDowntieredDataLocations(formats strfmt.Registry) error { - if swag.IsZero(m.DowntieredDataLocations) { // not required - return nil - } - - for i := 0; i < len(m.DowntieredDataLocations); i++ { - if swag.IsZero(m.DowntieredDataLocations[i]) { // not required - continue - } - - if m.DowntieredDataLocations[i] != nil { - if err := m.DowntieredDataLocations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this uptiering target based on the context it is used -func (m *UptieringTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDowntieredDataLocations(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UptieringTarget) contextValidateDowntieredDataLocations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DowntieredDataLocations); i++ { - - if m.DowntieredDataLocations[i] != nil { - - if swag.IsZero(m.DowntieredDataLocations[i]) { // not required - return nil - } - - if err := m.DowntieredDataLocations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("downtieredDataLocations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UptieringTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UptieringTarget) UnmarshalBinary(b []byte) error { - var res UptieringTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/usage_and_performance_stats.go b/v2/models/usage_and_performance_stats.go deleted file mode 100644 index ef8e89d5..00000000 --- a/v2/models/usage_and_performance_stats.go +++ /dev/null @@ -1,108 +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" -) - -// UsageAndPerformanceStats Usage and Performance Statistics -// -// Provides usage and performance statistics -// for entities such as a disks, Nodes or Clusters. -// -// swagger:model UsageAndPerformanceStats -type UsageAndPerformanceStats struct { - - // Specifies the data read from the protected objects by the Cohesity Cluster - // before any data reduction using deduplication and compression. - DataInBytes *int64 `json:"dataInBytes,omitempty"` - - // Morphed Usage before data is replicated to other nodes as per RF or - // Erasure Coding policy. - DataInBytesAfterReduction *int64 `json:"dataInBytesAfterReduction,omitempty"` - - // Specifies the minimum usable capacity available - // after erasure coding or RF. This will only be populated for cluster. - // If a cluster has multiple Domains (View Boxes) with different RF or - // erasure coding, this metric will be computed using the scheme that will - // provide least saving. - MinUsablePhysicalCapacityBytes *int64 `json:"minUsablePhysicalCapacityBytes,omitempty"` - - // Provides the total number of bytes read in the last 30 seconds. - NumBytesRead *int64 `json:"numBytesRead,omitempty"` - - // Provides the total number of bytes written in the last 30 second. - NumBytesWritten *int64 `json:"numBytesWritten,omitempty"` - - // Provides the total physical capacity in bytes of all the storage devices, - // after subtracting space reserved for cluster services - PhysicalCapacityBytes *int64 `json:"physicalCapacityBytes,omitempty"` - - // Provides the number of Read IOs that occurred in the last 30 seconds. - ReadIos *int64 `json:"readIos,omitempty"` - - // Provides the Read latency in milliseconds for the Read IOs that occurred - // during the last 30 seconds. - ReadLatencyMsecs *float64 `json:"readLatencyMsecs,omitempty"` - - // Provides the total available capacity as computed by - // the Linux 'statfs' command. - SystemCapacityBytes *int64 `json:"systemCapacityBytes,omitempty"` - - // Provides the usage of bytes, as computed by the Linux 'statfs' command, - // after the size of the data is reduced by - // change-block tracking, compression and deduplication. - SystemUsageBytes *int64 `json:"systemUsageBytes,omitempty"` - - // Provides the usage of bytes, as computed by the Cohesity Cluster, - // before the size of the data is reduced by - // change-block tracking, compression and deduplication. - TotalPhysicalRawUsageBytes *int64 `json:"totalPhysicalRawUsageBytes,omitempty"` - - // Provides the data stored locally, after the data has been reduced by - // deduplication and compression, including the space required for honoring - // the resiliency settings (EC/RF). - TotalPhysicalUsageBytes *int64 `json:"totalPhysicalUsageBytes,omitempty"` - - // Provides the number of Write IOs that occurred in the last 30 seconds. - WriteIos *int64 `json:"writeIos,omitempty"` - - // Provides the Write latency in milliseconds for the Write IOs that occurred - // during the last 30 seconds. - WriteLatencyMsecs *float64 `json:"writeLatencyMsecs,omitempty"` -} - -// Validate validates this usage and performance stats -func (m *UsageAndPerformanceStats) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this usage and performance stats based on context it is used -func (m *UsageAndPerformanceStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UsageAndPerformanceStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsageAndPerformanceStats) UnmarshalBinary(b []byte) error { - var res UsageAndPerformanceStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user.go b/v2/models/user.go deleted file mode 100644 index bf3cd5b3..00000000 --- a/v2/models/user.go +++ /dev/null @@ -1,58 +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" -) - -// User User -// -// Specifies a user object. -// -// swagger:model User -type User struct { - - // Specifies the name of the user. - Name *string `json:"name,omitempty"` - - // Specifies the sid of the user. - Sid *string `json:"sid,omitempty"` - - // Specifies the domain of the user. - Domain *string `json:"domain,omitempty"` -} - -// Validate validates this user -func (m *User) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user based on context it is used -func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *User) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *User) UnmarshalBinary(b []byte) error { - var res User - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_api_key.go b/v2/models/user_api_key.go deleted file mode 100644 index 5fd607d8..00000000 --- a/v2/models/user_api_key.go +++ /dev/null @@ -1,207 +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" -) - -// UserAPIKey Specifies a user API key instance. -// -// swagger:model UserAPIKey -type UserAPIKey struct { - - // Specifies the unique id of the API key. - // Read Only: true - ID *string `json:"id,omitempty"` - - // Specifies the API key name. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies if the API key is active. - // Read Only: true - IsActive *bool `json:"isActive,omitempty"` - - // Specifies if the API key has expired. - // Read Only: true - IsExpired *bool `json:"isExpired,omitempty"` - - // Specifies the user who owns the API key. - // Read Only: true - UserSid *string `json:"userSid,omitempty"` - - // Specifies the user SID who created the API key. - // Read Only: true - CreatedByUserSid *string `json:"createdByUserSid,omitempty"` - - // Specifies the time in milliseconds when the API key was created. - // Read Only: true - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the time in milliseconds when the API key was last rotated. - // Read Only: true - LastRotatedTimeMsecs *int64 `json:"lastRotatedTimeMsecs,omitempty"` - - // Specifies the time in milliseconds when the API key will expire. null signifies no-expiry. - // Read Only: true - ExpiryTimeMsecs *int64 `json:"expiryTimeMsecs,omitempty"` -} - -// Validate validates this user API key -func (m *UserAPIKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validate this user API key based on the context it is used -func (m *UserAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsActive(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsExpired(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUserSid(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedByUserSid(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastRotatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExpiryTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserAPIKey) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateIsActive(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isActive", "body", m.IsActive); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateIsExpired(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isExpired", "body", m.IsExpired); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateUserSid(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "userSid", "body", m.UserSid); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateCreatedByUserSid(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdByUserSid", "body", m.CreatedByUserSid); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateCreatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdTimeMsecs", "body", m.CreatedTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateLastRotatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastRotatedTimeMsecs", "body", m.LastRotatedTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *UserAPIKey) contextValidateExpiryTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "expiryTimeMsecs", "body", m.ExpiryTimeMsecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserAPIKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserAPIKey) UnmarshalBinary(b []byte) error { - var res UserAPIKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_api_keys.go b/v2/models/user_api_keys.go deleted file mode 100644 index f7cb014c..00000000 --- a/v2/models/user_api_keys.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UserAPIKeys List of user owned API Keys. -// -// swagger:model UserAPIKeys -type UserAPIKeys struct { - - // List of user owned API Keys. - APIKeys []*UserAPIKey `json:"apiKeys"` -} - -// Validate validates this user API keys -func (m *UserAPIKeys) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAPIKeys(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserAPIKeys) validateAPIKeys(formats strfmt.Registry) error { - if swag.IsZero(m.APIKeys) { // not required - return nil - } - - for i := 0; i < len(m.APIKeys); i++ { - if swag.IsZero(m.APIKeys[i]) { // not required - continue - } - - if m.APIKeys[i] != nil { - if err := m.APIKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user API keys based on the context it is used -func (m *UserAPIKeys) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAPIKeys(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserAPIKeys) contextValidateAPIKeys(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.APIKeys); i++ { - - if m.APIKeys[i] != nil { - - if swag.IsZero(m.APIKeys[i]) { // not required - return nil - } - - if err := m.APIKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apiKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apiKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserAPIKeys) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserAPIKeys) UnmarshalBinary(b []byte) error { - var res UserAPIKeys - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_db_backup_preference.go b/v2/models/user_db_backup_preference.go deleted file mode 100644 index f7b4aabb..00000000 --- a/v2/models/user_db_backup_preference.go +++ /dev/null @@ -1,110 +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" -) - -// UserDbBackupPreference User Database Backup Preference Type. -// -// Specifies User Database Backup Preference Type. -// -// swagger:model UserDbBackupPreference -type UserDbBackupPreference struct { - - // Specifies User Database Backup Preference Type. - // Enum: ["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"] - UserDbBackupPreference string `json:"userDbBackupPreference,omitempty"` -} - -// Validate validates this user db backup preference -func (m *UserDbBackupPreference) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserDbBackupPreference(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var userDbBackupPreferenceTypeUserDbBackupPreferencePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kBackupAllDatabases","kBackupAllExceptAAGDatabases","kBackupOnlyAAGDatabases"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userDbBackupPreferenceTypeUserDbBackupPreferencePropEnum = append(userDbBackupPreferenceTypeUserDbBackupPreferencePropEnum, v) - } -} - -const ( - - // UserDbBackupPreferenceUserDbBackupPreferenceKBackupAllDatabases captures enum value "kBackupAllDatabases" - UserDbBackupPreferenceUserDbBackupPreferenceKBackupAllDatabases string = "kBackupAllDatabases" - - // UserDbBackupPreferenceUserDbBackupPreferenceKBackupAllExceptAAGDatabases captures enum value "kBackupAllExceptAAGDatabases" - UserDbBackupPreferenceUserDbBackupPreferenceKBackupAllExceptAAGDatabases string = "kBackupAllExceptAAGDatabases" - - // UserDbBackupPreferenceUserDbBackupPreferenceKBackupOnlyAAGDatabases captures enum value "kBackupOnlyAAGDatabases" - UserDbBackupPreferenceUserDbBackupPreferenceKBackupOnlyAAGDatabases string = "kBackupOnlyAAGDatabases" -) - -// prop value enum -func (m *UserDbBackupPreference) validateUserDbBackupPreferenceEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userDbBackupPreferenceTypeUserDbBackupPreferencePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserDbBackupPreference) validateUserDbBackupPreference(formats strfmt.Registry) error { - if swag.IsZero(m.UserDbBackupPreference) { // not required - return nil - } - - // value enum - if err := m.validateUserDbBackupPreferenceEnum("userDbBackupPreference", "body", m.UserDbBackupPreference); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this user db backup preference based on context it is used -func (m *UserDbBackupPreference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserDbBackupPreference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserDbBackupPreference) UnmarshalBinary(b []byte) error { - var res UserDbBackupPreference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_id.go b/v2/models/user_id.go deleted file mode 100644 index fb26381e..00000000 --- a/v2/models/user_id.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" -) - -// UserID Specifies the User Id type. Either sid or unixUid should be set. -// -// swagger:model UserId -type UserID struct { - - // Specifies the user sid. - Sid *string `json:"sid,omitempty"` - - // Specifies the unix Uid. - UnixUID *uint32 `json:"unixUid,omitempty"` -} - -// Validate validates this user Id -func (m *UserID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user Id based on context it is used -func (m *UserID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserID) UnmarshalBinary(b []byte) error { - var res UserID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_id_mapping_params.go b/v2/models/user_id_mapping_params.go deleted file mode 100644 index 4208b8ee..00000000 --- a/v2/models/user_id_mapping_params.go +++ /dev/null @@ -1,487 +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" -) - -// UserIDMappingParams Specifies how the Unix and Windows users are mapped in an Active Directory. -// -// swagger:model UserIdMappingParams -type UserIDMappingParams struct { - - // Specifies the type of the mapping. - // Required: true - // Enum: ["Rfc2307","Sfu30","Centrify","CustomAttributes","LdapProvider","NisProvider","Rid","Fixed"] - Type *string `json:"type"` - - // Specifies the params for Centrify mapping type mapping. - CentrifyTypeParams *AdCentrifyTypeParams `json:"centrifyTypeParams,omitempty"` - - // Specifies the params for CustomAttributes mapping type mapping. - CustomAttributesTypeParams *AdCustomAttributesTypeParams `json:"customAttributesTypeParams,omitempty"` - - // Specifies the params for Fixed mapping type mapping. - FixedTypeParams *AdFixedTypeParams `json:"fixedTypeParams,omitempty"` - - // Specifies the params for LdapProvider mapping type mapping. - LdapProviderTypeParams *AdLdapProviderTypeParams `json:"ldapProviderTypeParams,omitempty"` - - // Specifies the params for NisProvider mapping type mapping. - NisProviderTypeParams *AdNisProviderTypeParams `json:"nisProviderTypeParams,omitempty"` - - // Specifies the params for Rfc2307 mapping type mapping. - Rfc2307TypeParams *AdRfc2307TypeParams `json:"rfc2307TypeParams,omitempty"` - - // Specifies the params for Sfu30 mapping type mapping. - Sfu30TypeParams *AdSfu30TypeParams `json:"sfu30TypeParams,omitempty"` -} - -// Validate validates this user Id mapping params -func (m *UserIDMappingParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCentrifyTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCustomAttributesTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFixedTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLdapProviderTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNisProviderTypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRfc2307TypeParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSfu30TypeParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var userIdMappingParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Rfc2307","Sfu30","Centrify","CustomAttributes","LdapProvider","NisProvider","Rid","Fixed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userIdMappingParamsTypeTypePropEnum = append(userIdMappingParamsTypeTypePropEnum, v) - } -} - -const ( - - // UserIDMappingParamsTypeRfc2307 captures enum value "Rfc2307" - UserIDMappingParamsTypeRfc2307 string = "Rfc2307" - - // UserIDMappingParamsTypeSfu30 captures enum value "Sfu30" - UserIDMappingParamsTypeSfu30 string = "Sfu30" - - // UserIDMappingParamsTypeCentrify captures enum value "Centrify" - UserIDMappingParamsTypeCentrify string = "Centrify" - - // UserIDMappingParamsTypeCustomAttributes captures enum value "CustomAttributes" - UserIDMappingParamsTypeCustomAttributes string = "CustomAttributes" - - // UserIDMappingParamsTypeLdapProvider captures enum value "LdapProvider" - UserIDMappingParamsTypeLdapProvider string = "LdapProvider" - - // UserIDMappingParamsTypeNisProvider captures enum value "NisProvider" - UserIDMappingParamsTypeNisProvider string = "NisProvider" - - // UserIDMappingParamsTypeRid captures enum value "Rid" - UserIDMappingParamsTypeRid string = "Rid" - - // UserIDMappingParamsTypeFixed captures enum value "Fixed" - UserIDMappingParamsTypeFixed string = "Fixed" -) - -// prop value enum -func (m *UserIDMappingParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userIdMappingParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserIDMappingParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *UserIDMappingParams) validateCentrifyTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.CentrifyTypeParams) { // not required - return nil - } - - if m.CentrifyTypeParams != nil { - if err := m.CentrifyTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateCustomAttributesTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.CustomAttributesTypeParams) { // not required - return nil - } - - if m.CustomAttributesTypeParams != nil { - if err := m.CustomAttributesTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateFixedTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.FixedTypeParams) { // not required - return nil - } - - if m.FixedTypeParams != nil { - if err := m.FixedTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateLdapProviderTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.LdapProviderTypeParams) { // not required - return nil - } - - if m.LdapProviderTypeParams != nil { - if err := m.LdapProviderTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldapProviderTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldapProviderTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateNisProviderTypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.NisProviderTypeParams) { // not required - return nil - } - - if m.NisProviderTypeParams != nil { - if err := m.NisProviderTypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisProviderTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisProviderTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateRfc2307TypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.Rfc2307TypeParams) { // not required - return nil - } - - if m.Rfc2307TypeParams != nil { - if err := m.Rfc2307TypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rfc2307TypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rfc2307TypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) validateSfu30TypeParams(formats strfmt.Registry) error { - if swag.IsZero(m.Sfu30TypeParams) { // not required - return nil - } - - if m.Sfu30TypeParams != nil { - if err := m.Sfu30TypeParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfu30TypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfu30TypeParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this user Id mapping params based on the context it is used -func (m *UserIDMappingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCentrifyTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCustomAttributesTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFixedTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLdapProviderTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNisProviderTypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRfc2307TypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSfu30TypeParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserIDMappingParams) contextValidateCentrifyTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CentrifyTypeParams != nil { - - if swag.IsZero(m.CentrifyTypeParams) { // not required - return nil - } - - if err := m.CentrifyTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("centrifyTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("centrifyTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateCustomAttributesTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.CustomAttributesTypeParams != nil { - - if swag.IsZero(m.CustomAttributesTypeParams) { // not required - return nil - } - - if err := m.CustomAttributesTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("customAttributesTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("customAttributesTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateFixedTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.FixedTypeParams != nil { - - if swag.IsZero(m.FixedTypeParams) { // not required - return nil - } - - if err := m.FixedTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fixedTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fixedTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateLdapProviderTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LdapProviderTypeParams != nil { - - if swag.IsZero(m.LdapProviderTypeParams) { // not required - return nil - } - - if err := m.LdapProviderTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ldapProviderTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ldapProviderTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateNisProviderTypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.NisProviderTypeParams != nil { - - if swag.IsZero(m.NisProviderTypeParams) { // not required - return nil - } - - if err := m.NisProviderTypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nisProviderTypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nisProviderTypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateRfc2307TypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.Rfc2307TypeParams != nil { - - if swag.IsZero(m.Rfc2307TypeParams) { // not required - return nil - } - - if err := m.Rfc2307TypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rfc2307TypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rfc2307TypeParams") - } - return err - } - } - - return nil -} - -func (m *UserIDMappingParams) contextValidateSfu30TypeParams(ctx context.Context, formats strfmt.Registry) error { - - if m.Sfu30TypeParams != nil { - - if swag.IsZero(m.Sfu30TypeParams) { // not required - return nil - } - - if err := m.Sfu30TypeParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfu30TypeParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfu30TypeParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserIDMappingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserIDMappingParams) UnmarshalBinary(b []byte) error { - var res UserIDMappingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_lock_reason.go b/v2/models/user_lock_reason.go deleted file mode 100644 index 35621414..00000000 --- a/v2/models/user_lock_reason.go +++ /dev/null @@ -1,114 +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" -) - -// UserLockReason Specifies the reason for locking a user. -// -// swagger:model UserLockReason -type UserLockReason struct { - - // Specifies the reason for locking a user. - // Enum: ["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"] - Type string `json:"type,omitempty"` -} - -// Validate validates this user lock reason -func (m *UserLockReason) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var userLockReasonTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userLockReasonTypeTypePropEnum = append(userLockReasonTypeTypePropEnum, v) - } -} - -const ( - - // UserLockReasonTypeNotLocked captures enum value "NotLocked" - UserLockReasonTypeNotLocked string = "NotLocked" - - // UserLockReasonTypeFailedLoginAttempts captures enum value "FailedLoginAttempts" - UserLockReasonTypeFailedLoginAttempts string = "FailedLoginAttempts" - - // UserLockReasonTypeLockedByAdmin captures enum value "LockedByAdmin" - UserLockReasonTypeLockedByAdmin string = "LockedByAdmin" - - // UserLockReasonTypeInactivity captures enum value "Inactivity" - UserLockReasonTypeInactivity string = "Inactivity" - - // UserLockReasonTypeOtherReasons captures enum value "OtherReasons" - UserLockReasonTypeOtherReasons string = "OtherReasons" -) - -// prop value enum -func (m *UserLockReason) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userLockReasonTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserLockReason) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this user lock reason based on context it is used -func (m *UserLockReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserLockReason) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserLockReason) UnmarshalBinary(b []byte) error { - var res UserLockReason - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_params.go b/v2/models/user_params.go deleted file mode 100644 index 955c80c6..00000000 --- a/v2/models/user_params.go +++ /dev/null @@ -1,531 +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" -) - -// UserParams Specifies a User. -// -// swagger:model UserParams -type UserParams struct { - - // Specifies the sid of the User. - // Read Only: true - Sid *string `json:"sid,omitempty"` - - // Specifies the username. - // Read Only: true - Username string `json:"username,omitempty"` - - // Specifies the domain of the user. For active directories, this is the fully qualified domain name (FQDN). It is 'LOCAL' for local users on the Cohesity Cluster. A user is uniquely identified by combination of the username and the domain. - // Read Only: true - Domain string `json:"domain,omitempty"` - - // Specifies the epoch time in milliseconds when the user account was created. - // Read Only: true - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the user account was last modified. - // Read Only: true - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - // Specifies the epoch time in milliseconds when the user last logged in successfully. - // Read Only: true - LastLoginTimeMsecs *int64 `json:"lastLoginTimeMsecs,omitempty"` - - // Specifies if the user must change password. - // Read Only: true - ForcePasswordChange *bool `json:"forcePasswordChange,omitempty"` - - // Specifies the primary group of the User. Primary group is used for file access. - // Read Only: true - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - // Specifies additional groups the User may belong to. - // Read Only: true - OtherGroups []string `json:"otherGroups,omitempty"` - - // Specifies the tenant id of the User. - TenantID *string `json:"tenantId,omitempty"` - - // Specifies the reason for locking the User. - // Read Only: true - // Enum: ["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"] - LockedReason *string `json:"lockedReason,omitempty"` - - // Specifies the LOCAL user properties. This field is required when adding a new LOCAL Cohesity User. - LocalUserParams *LocalUserResponseParams `json:"localUserParams,omitempty"` - - // Specifies the S3 Account parameters of the User. - // Read Only: true - S3AccountParams *S3AccountParams `json:"s3AccountParams,omitempty"` - - CommonUpdatableUserParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UserParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Sid *string `json:"sid,omitempty"` - - Username string `json:"username,omitempty"` - - Domain string `json:"domain,omitempty"` - - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - LastLoginTimeMsecs *int64 `json:"lastLoginTimeMsecs,omitempty"` - - ForcePasswordChange *bool `json:"forcePasswordChange,omitempty"` - - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - OtherGroups []string `json:"otherGroups,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - LockedReason *string `json:"lockedReason,omitempty"` - - LocalUserParams *LocalUserResponseParams `json:"localUserParams,omitempty"` - - S3AccountParams *S3AccountParams `json:"s3AccountParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Sid = dataAO0.Sid - - m.Username = dataAO0.Username - - m.Domain = dataAO0.Domain - - m.CreatedTimeMsecs = dataAO0.CreatedTimeMsecs - - m.LastUpdatedTimeMsecs = dataAO0.LastUpdatedTimeMsecs - - m.LastLoginTimeMsecs = dataAO0.LastLoginTimeMsecs - - m.ForcePasswordChange = dataAO0.ForcePasswordChange - - m.PrimaryGroup = dataAO0.PrimaryGroup - - m.OtherGroups = dataAO0.OtherGroups - - m.TenantID = dataAO0.TenantID - - m.LockedReason = dataAO0.LockedReason - - m.LocalUserParams = dataAO0.LocalUserParams - - m.S3AccountParams = dataAO0.S3AccountParams - - // AO1 - var aO1 CommonUpdatableUserParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonUpdatableUserParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UserParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Sid *string `json:"sid,omitempty"` - - Username string `json:"username,omitempty"` - - Domain string `json:"domain,omitempty"` - - CreatedTimeMsecs *int64 `json:"createdTimeMsecs,omitempty"` - - LastUpdatedTimeMsecs *int64 `json:"lastUpdatedTimeMsecs,omitempty"` - - LastLoginTimeMsecs *int64 `json:"lastLoginTimeMsecs,omitempty"` - - ForcePasswordChange *bool `json:"forcePasswordChange,omitempty"` - - PrimaryGroup *string `json:"primaryGroup,omitempty"` - - OtherGroups []string `json:"otherGroups,omitempty"` - - TenantID *string `json:"tenantId,omitempty"` - - LockedReason *string `json:"lockedReason,omitempty"` - - LocalUserParams *LocalUserResponseParams `json:"localUserParams,omitempty"` - - S3AccountParams *S3AccountParams `json:"s3AccountParams,omitempty"` - } - - dataAO0.Sid = m.Sid - - dataAO0.Username = m.Username - - dataAO0.Domain = m.Domain - - dataAO0.CreatedTimeMsecs = m.CreatedTimeMsecs - - dataAO0.LastUpdatedTimeMsecs = m.LastUpdatedTimeMsecs - - dataAO0.LastLoginTimeMsecs = m.LastLoginTimeMsecs - - dataAO0.ForcePasswordChange = m.ForcePasswordChange - - dataAO0.PrimaryGroup = m.PrimaryGroup - - dataAO0.OtherGroups = m.OtherGroups - - dataAO0.TenantID = m.TenantID - - dataAO0.LockedReason = m.LockedReason - - dataAO0.LocalUserParams = m.LocalUserParams - - dataAO0.S3AccountParams = m.S3AccountParams - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonUpdatableUserParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this user params -func (m *UserParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLockedReason(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLocalUserParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateS3AccountParams(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonUpdatableUserParams - if err := m.CommonUpdatableUserParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var userParamsTypeLockedReasonPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotLocked","FailedLoginAttempts","LockedByAdmin","Inactivity","OtherReasons"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - userParamsTypeLockedReasonPropEnum = append(userParamsTypeLockedReasonPropEnum, v) - } -} - -// property enum -func (m *UserParams) validateLockedReasonEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, userParamsTypeLockedReasonPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *UserParams) validateLockedReason(formats strfmt.Registry) error { - - if swag.IsZero(m.LockedReason) { // not required - return nil - } - - // value enum - if err := m.validateLockedReasonEnum("lockedReason", "body", *m.LockedReason); err != nil { - return err - } - - return nil -} - -func (m *UserParams) validateLocalUserParams(formats strfmt.Registry) error { - - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if m.LocalUserParams != nil { - if err := m.LocalUserParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -func (m *UserParams) validateS3AccountParams(formats strfmt.Registry) error { - - if swag.IsZero(m.S3AccountParams) { // not required - return nil - } - - if m.S3AccountParams != nil { - if err := m.S3AccountParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3AccountParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3AccountParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this user params based on the context it is used -func (m *UserParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSid(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsername(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDomain(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastUpdatedTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastLoginTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateForcePasswordChange(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePrimaryGroup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOtherGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLockedReason(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLocalUserParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3AccountParams(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonUpdatableUserParams - if err := m.CommonUpdatableUserParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserParams) contextValidateSid(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sid", "body", m.Sid); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateUsername(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "username", "body", string(m.Username)); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateDomain(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "domain", "body", string(m.Domain)); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateCreatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createdTimeMsecs", "body", m.CreatedTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateLastUpdatedTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedTimeMsecs", "body", m.LastUpdatedTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateLastLoginTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastLoginTimeMsecs", "body", m.LastLoginTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateForcePasswordChange(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "forcePasswordChange", "body", m.ForcePasswordChange); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidatePrimaryGroup(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "primaryGroup", "body", m.PrimaryGroup); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateOtherGroups(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "otherGroups", "body", []string(m.OtherGroups)); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateLockedReason(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lockedReason", "body", m.LockedReason); err != nil { - return err - } - - return nil -} - -func (m *UserParams) contextValidateLocalUserParams(ctx context.Context, formats strfmt.Registry) error { - - if m.LocalUserParams != nil { - - if swag.IsZero(m.LocalUserParams) { // not required - return nil - } - - if err := m.LocalUserParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUserParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUserParams") - } - return err - } - } - - return nil -} - -func (m *UserParams) contextValidateS3AccountParams(ctx context.Context, formats strfmt.Registry) error { - - if m.S3AccountParams != nil { - - if swag.IsZero(m.S3AccountParams) { // not required - return nil - } - - if err := m.S3AccountParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("s3AccountParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("s3AccountParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserParams) UnmarshalBinary(b []byte) error { - var res UserParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_quota.go b/v2/models/user_quota.go deleted file mode 100644 index 4d5fb8c2..00000000 --- a/v2/models/user_quota.go +++ /dev/null @@ -1,192 +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" -) - -// UserQuota Specifies a user quota for a user. -// -// swagger:model UserQuota -type UserQuota struct { - UserID - - // Specifies the user usage in bytes. - // Read Only: true - UsageBytes *int64 `json:"usageBytes,omitempty"` - - // Specifies the quota policy for the given user. - QuotaPolicy *QuotaPolicy `json:"quotaPolicy,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UserQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UserID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UserID = aO0 - - // AO1 - var dataAO1 struct { - UsageBytes *int64 `json:"usageBytes,omitempty"` - - QuotaPolicy *QuotaPolicy `json:"quotaPolicy,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.UsageBytes = dataAO1.UsageBytes - - m.QuotaPolicy = dataAO1.QuotaPolicy - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UserQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.UserID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - UsageBytes *int64 `json:"usageBytes,omitempty"` - - QuotaPolicy *QuotaPolicy `json:"quotaPolicy,omitempty"` - } - - dataAO1.UsageBytes = m.UsageBytes - - dataAO1.QuotaPolicy = m.QuotaPolicy - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this user quota -func (m *UserQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UserID - if err := m.UserID.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuota) validateQuotaPolicy(formats strfmt.Registry) error { - - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if m.QuotaPolicy != nil { - if err := m.QuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this user quota based on the context it is used -func (m *UserQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UserID - if err := m.UserID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateUsageBytes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuota) contextValidateUsageBytes(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "usageBytes", "body", m.UsageBytes); err != nil { - return err - } - - return nil -} - -func (m *UserQuota) contextValidateQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.QuotaPolicy != nil { - - if swag.IsZero(m.QuotaPolicy) { // not required - return nil - } - - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuota) UnmarshalBinary(b []byte) error { - var res UserQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_quota_delete_params.go b/v2/models/user_quota_delete_params.go deleted file mode 100644 index e65db924..00000000 --- a/v2/models/user_quota_delete_params.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UserQuotaDeleteParams Specifies list of users to delete logical user quota. If userIds are not specified, all the user quotas will be deleted. -// -// swagger:model UserQuotaDeleteParams -type UserQuotaDeleteParams struct { - - // Array of userIds. Specifies the list of user Ids to delete logical user quota override. - UserIds []*UserID `json:"userIds"` -} - -// Validate validates this user quota delete params -func (m *UserQuotaDeleteParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserIds(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaDeleteParams) validateUserIds(formats strfmt.Registry) error { - if swag.IsZero(m.UserIds) { // not required - return nil - } - - for i := 0; i < len(m.UserIds); i++ { - if swag.IsZero(m.UserIds[i]) { // not required - continue - } - - if m.UserIds[i] != nil { - if err := m.UserIds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user quota delete params based on the context it is used -func (m *UserQuotaDeleteParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserIds(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaDeleteParams) contextValidateUserIds(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UserIds); i++ { - - if m.UserIds[i] != nil { - - if swag.IsZero(m.UserIds[i]) { // not required - return nil - } - - if err := m.UserIds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userIds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userIds" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuotaDeleteParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaDeleteParams) UnmarshalBinary(b []byte) error { - var res UserQuotaDeleteParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_quota_overrides.go b/v2/models/user_quota_overrides.go deleted file mode 100644 index 29ddaf2b..00000000 --- a/v2/models/user_quota_overrides.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// UserQuotaOverrides Specifies a list of user quotas set on the View. These user quotas will override the default View user quota. -// -// swagger:model UserQuotaOverrides -type UserQuotaOverrides struct { - - // Array of UserQuota. Specifies the list of UserQuota for each user. - // Required: true - UserQuotas []*UserQuota `json:"userQuotas"` - - // Specifies the pagination cookie. - Cookie *string `json:"cookie,omitempty"` - - // By default, the overrides specified in userQuotas is treated as delta and the existing overrides will be left untouched. Set this to true, if the existing overrides should be cleared before applying overrides specified in userQuotas. - OverrideExistingPerUserQuotas *bool `json:"overrideExistingPerUserQuotas,omitempty"` -} - -// Validate validates this user quota overrides -func (m *UserQuotaOverrides) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUserQuotas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaOverrides) validateUserQuotas(formats strfmt.Registry) error { - - if err := validate.Required("userQuotas", "body", m.UserQuotas); err != nil { - return err - } - - for i := 0; i < len(m.UserQuotas); i++ { - if swag.IsZero(m.UserQuotas[i]) { // not required - continue - } - - if m.UserQuotas[i] != nil { - if err := m.UserQuotas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this user quota overrides based on the context it is used -func (m *UserQuotaOverrides) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUserQuotas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UserQuotaOverrides) contextValidateUserQuotas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.UserQuotas); i++ { - - if m.UserQuotas[i] != nil { - - if swag.IsZero(m.UserQuotas[i]) { // not required - return nil - } - - if err := m.UserQuotas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("userQuotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("userQuotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UserQuotaOverrides) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserQuotaOverrides) UnmarshalBinary(b []byte) error { - var res UserQuotaOverrides - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_session.go b/v2/models/user_session.go deleted file mode 100644 index a4c52275..00000000 --- a/v2/models/user_session.go +++ /dev/null @@ -1,50 +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" -) - -// UserSession User session response -// -// swagger:model UserSession -type UserSession struct { - - // Specifies the session id - SessionID string `json:"sessionId,omitempty"` -} - -// Validate validates this user session -func (m *UserSession) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user session based on context it is used -func (m *UserSession) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserSession) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserSession) UnmarshalBinary(b []byte) error { - var res UserSession - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_sessions_count.go b/v2/models/user_sessions_count.go deleted file mode 100644 index ea41783c..00000000 --- a/v2/models/user_sessions_count.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" -) - -// UserSessionsCount Specifies the sessions count for a user. -// -// swagger:model UserSessionsCount -type UserSessionsCount struct { - - // Specifies the user sid. - Sid string `json:"sid,omitempty"` - - // Specifies the number of sessions for the user. - SessionsCount int64 `json:"sessionsCount,omitempty"` -} - -// Validate validates this user sessions count -func (m *UserSessionsCount) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user sessions count based on context it is used -func (m *UserSessionsCount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserSessionsCount) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserSessionsCount) UnmarshalBinary(b []byte) error { - var res UserSessionsCount - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/user_ui_config.go b/v2/models/user_ui_config.go deleted file mode 100644 index e5de860b..00000000 --- a/v2/models/user_ui_config.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" -) - -// UserUIConfig Specifies the params to update UI config. -// -// swagger:model UserUiConfig -type UserUIConfig struct { - - // Specifies the user's preferences for UI customization. - Preferences *string `json:"preferences,omitempty"` - - // Specifies the locale. - Locale *string `json:"locale,omitempty"` -} - -// Validate validates this user Ui config -func (m *UserUIConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this user Ui config based on context it is used -func (m *UserUIConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UserUIConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UserUIConfig) UnmarshalBinary(b []byte) error { - var res UserUIConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/users_discovery_params.go b/v2/models/users_discovery_params.go deleted file mode 100644 index 71a5cc50..00000000 --- a/v2/models/users_discovery_params.go +++ /dev/null @@ -1,67 +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" -) - -// UsersDiscoveryParams Source Discovery parameter for kUser object type -// -// Specifies discovery params for User(mailbox/onedrive) entities. It should only be populated when the 'DiscoveryParams.discoverableObjectTypeList' includes 'kUsers' otherwise this will be ignored. -// -// swagger:model UsersDiscoveryParams -type UsersDiscoveryParams struct { - - // Specifies if office 365 users with valid mailboxes should be discovered or not. - DiscoverUsersWithMailbox *bool `json:"discoverUsersWithMailbox,omitempty"` - - // Specifies if office 365 users with valid Onedrives should be discovered or not. - DiscoverUsersWithOnedrive *bool `json:"discoverUsersWithOnedrive,omitempty"` - - // Specifies whether users' mailbox info including the provisioning status, mailbox type & in-place archival support will be fetched and processed. - FetchMailboxInfo *bool `json:"fetchMailboxInfo,omitempty"` - - // Specifies whether users' onedrive info including the provisioning status & storage quota will be fetched and processed. - FetchOneDriveInfo *bool `json:"fetchOneDriveInfo,omitempty"` - - // Specifies whether to skip processing user who have uninitialized OneDrive or are without MySite. - SkipUsersWithoutMySite *bool `json:"skipUsersWithoutMySite,omitempty"` - - // Specifies whether users' chats should be backed up or not. If this is false or not specified users' chats backup will not be done. - AllowChatsBackup *bool `json:"allowChatsBackup,omitempty"` -} - -// Validate validates this users discovery params -func (m *UsersDiscoveryParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this users discovery params based on context it is used -func (m *UsersDiscoveryParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UsersDiscoveryParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsersDiscoveryParams) UnmarshalBinary(b []byte) error { - var res UsersDiscoveryParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/users_list.go b/v2/models/users_list.go deleted file mode 100644 index 2a67ca8d..00000000 --- a/v2/models/users_list.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UsersList Specifies a list of users. -// -// swagger:model UsersList -type UsersList struct { - - // Specifies the list of users. - Users []*UserParams `json:"users"` -} - -// Validate validates this users list -func (m *UsersList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsers(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UsersList) validateUsers(formats strfmt.Registry) error { - if swag.IsZero(m.Users) { // not required - return nil - } - - for i := 0; i < len(m.Users); i++ { - if swag.IsZero(m.Users[i]) { // not required - continue - } - - if m.Users[i] != nil { - if err := m.Users[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this users list based on the context it is used -func (m *UsersList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *UsersList) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Users); i++ { - - if m.Users[i] != nil { - - if swag.IsZero(m.Users[i]) { // not required - return nil - } - - if err := m.Users[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("users" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("users" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *UsersList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UsersList) UnmarshalBinary(b []byte) error { - var res UsersList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/v_mware_mount_volumes_new_target_config.go b/v2/models/v_mware_mount_volumes_new_target_config.go deleted file mode 100644 index e83ecd3c..00000000 --- a/v2/models/v_mware_mount_volumes_new_target_config.go +++ /dev/null @@ -1,181 +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" -) - -// VMwareMountVolumesNewTargetConfig VMware Mount Volumes New Target Config. -// -// Specifies the configuration for mounting volumes to a new target. -// -// swagger:model VMwareMountVolumesNewTargetConfig -type VMwareMountVolumesNewTargetConfig struct { - - // Specifies the target entity where the volumes are being mounted. - // Required: true - MountTarget *RecoverTarget `json:"mountTarget"` - - // Specifies whether the volumes need to be online within the target environment after attaching the disks. For linux VMs, this should always be set to true. For Windows, this is optional. If this is set to true, VMware tools must be installed on the VM. If this is set to false, useExistingAgent and targetCredentials are not needed. - // Required: true - BringDisksOnline *bool `json:"bringDisksOnline"` - - // Specifies whether this will use an existing agent on the target vm or will deploy a new agent. This is required if bringDisksOnline is set to true. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Specifies credentials to access the target VM. This is required if bringDisksOnline is set to true and useExistingAgent set to false. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this v mware mount volumes new target config -func (m *VMwareMountVolumesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBringDisksOnline(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareMountVolumesNewTargetConfig) validateMountTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountTarget", "body", m.MountTarget); err != nil { - return err - } - - if m.MountTarget != nil { - if err := m.MountTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *VMwareMountVolumesNewTargetConfig) validateBringDisksOnline(formats strfmt.Registry) error { - - if err := validate.Required("bringDisksOnline", "body", m.BringDisksOnline); err != nil { - return err - } - - return nil -} - -func (m *VMwareMountVolumesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v mware mount volumes new target config based on the context it is used -func (m *VMwareMountVolumesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareMountVolumesNewTargetConfig) contextValidateMountTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.MountTarget != nil { - - if err := m.MountTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountTarget") - } - return err - } - } - - return nil -} - -func (m *VMwareMountVolumesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareMountVolumesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareMountVolumesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res VMwareMountVolumesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/v_mware_mount_volumes_original_target_config.go b/v2/models/v_mware_mount_volumes_original_target_config.go deleted file mode 100644 index b138a350..00000000 --- a/v2/models/v_mware_mount_volumes_original_target_config.go +++ /dev/null @@ -1,132 +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" -) - -// VMwareMountVolumesOriginalTargetConfig VMware Mount Volumes Original Target Config. -// -// Specifies the configuration for mounting volumes to the original target. -// -// swagger:model VMwareMountVolumesOriginalTargetConfig -type VMwareMountVolumesOriginalTargetConfig struct { - - // Specifies whether the volumes need to be online within the target environment after attaching the disks. For linux VMs, this should always be set to true. For Windows, this is optional. If this is set to true, VMware tools must be installed on the VM. If this is set to false, useExistingAgent and targetCredentials are not needed. - // Required: true - BringDisksOnline *bool `json:"bringDisksOnline"` - - // Specifies whether this will use an existing agent on the target vm or will deploy a new agent. This is required if bringDisksOnline is set to true. - UseExistingAgent *bool `json:"useExistingAgent,omitempty"` - - // Specifies credentials to access the target VM. This is required if bringDisksOnline is set to true and useExistingAgent set to false. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this v mware mount volumes original target config -func (m *VMwareMountVolumesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBringDisksOnline(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareMountVolumesOriginalTargetConfig) validateBringDisksOnline(formats strfmt.Registry) error { - - if err := validate.Required("bringDisksOnline", "body", m.BringDisksOnline); err != nil { - return err - } - - return nil -} - -func (m *VMwareMountVolumesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v mware mount volumes original target config based on the context it is used -func (m *VMwareMountVolumesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMwareMountVolumesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VMwareMountVolumesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMwareMountVolumesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res VMwareMountVolumesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/validate_remote_cluster_connection_param.go b/v2/models/validate_remote_cluster_connection_param.go deleted file mode 100644 index 4bb1a6e4..00000000 --- a/v2/models/validate_remote_cluster_connection_param.go +++ /dev/null @@ -1,112 +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" -) - -// ValidateRemoteClusterConnectionParam Specifies the parameters to update a Remote Cluster config. -// -// swagger:model ValidateRemoteClusterConnectionParam -type ValidateRemoteClusterConnectionParam struct { - - // Specifies the Cohesity user name used to connect to the Remote Cluster. - // Required: true - Username string `json:"username"` - - // Specifies the password for Cohesity user to use when connecting to the Remote Cluster. - // Required: true - Password string `json:"password"` - - // Specifies the VIP or IP addresses of the Nodes on the Remote Cluster to connect with. Hostnames are not supported. - // Required: true - // Min Items: 1 - NodeAddresses []string `json:"nodeAddresses"` -} - -// Validate validates this validate remote cluster connection param -func (m *ValidateRemoteClusterConnectionParam) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUsername(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodeAddresses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ValidateRemoteClusterConnectionParam) validateUsername(formats strfmt.Registry) error { - - if err := validate.RequiredString("username", "body", m.Username); err != nil { - return err - } - - return nil -} - -func (m *ValidateRemoteClusterConnectionParam) validatePassword(formats strfmt.Registry) error { - - if err := validate.RequiredString("password", "body", m.Password); err != nil { - return err - } - - return nil -} - -func (m *ValidateRemoteClusterConnectionParam) validateNodeAddresses(formats strfmt.Registry) error { - - if err := validate.Required("nodeAddresses", "body", m.NodeAddresses); err != nil { - return err - } - - iNodeAddressesSize := int64(len(m.NodeAddresses)) - - if err := validate.MinItems("nodeAddresses", "body", iNodeAddressesSize, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this validate remote cluster connection param based on context it is used -func (m *ValidateRemoteClusterConnectionParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ValidateRemoteClusterConnectionParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ValidateRemoteClusterConnectionParam) UnmarshalBinary(b []byte) error { - var res ValidateRemoteClusterConnectionParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/validate_support_user_cred_params.go b/v2/models/validate_support_user_cred_params.go deleted file mode 100644 index db4ad4ed..00000000 --- a/v2/models/validate_support_user_cred_params.go +++ /dev/null @@ -1,76 +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" -) - -// ValidateSupportUserCredParams Specifies the support user credentials to validate. -// -// swagger:model ValidateSupportUserCredParams -type ValidateSupportUserCredParams struct { - - // Specifies the password of the user to validate. - // Required: true - // Min Length: 1 - Password *string `json:"password"` -} - -// Validate validates this validate support user cred params -func (m *ValidateSupportUserCredParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePassword(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ValidateSupportUserCredParams) validatePassword(formats strfmt.Registry) error { - - if err := validate.Required("password", "body", m.Password); err != nil { - return err - } - - if err := validate.MinLength("password", "body", *m.Password, 1); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this validate support user cred params based on context it is used -func (m *ValidateSupportUserCredParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ValidateSupportUserCredParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ValidateSupportUserCredParams) UnmarshalBinary(b []byte) error { - var res ValidateSupportUserCredParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcd_additional_params.go b/v2/models/vcd_additional_params.go deleted file mode 100644 index 99f94f14..00000000 --- a/v2/models/vcd_additional_params.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VcdAdditionalParams VCD Additional Params. -// -// Additional params for VCD protection source. -// -// swagger:model VcdAdditionalParams -type VcdAdditionalParams struct { - - // Specifies the list of vCenters associated with this VCD protection source. - VcenterInfoList []*VcdVcenterInfo `json:"vcenterInfoList"` -} - -// Validate validates this vcd additional params -func (m *VcdAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcenterInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdAdditionalParams) validateVcenterInfoList(formats strfmt.Registry) error { - if swag.IsZero(m.VcenterInfoList) { // not required - return nil - } - - for i := 0; i < len(m.VcenterInfoList); i++ { - if swag.IsZero(m.VcenterInfoList[i]) { // not required - continue - } - - if m.VcenterInfoList[i] != nil { - if err := m.VcenterInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vcd additional params based on the context it is used -func (m *VcdAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVcenterInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdAdditionalParams) contextValidateVcenterInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VcenterInfoList); i++ { - - if m.VcenterInfoList[i] != nil { - - if swag.IsZero(m.VcenterInfoList[i]) { // not required - return nil - } - - if err := m.VcenterInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VcdAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdAdditionalParams) UnmarshalBinary(b []byte) error { - var res VcdAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcd_connection_params.go b/v2/models/vcd_connection_params.go deleted file mode 100644 index 62823da8..00000000 --- a/v2/models/vcd_connection_params.go +++ /dev/null @@ -1,136 +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" -) - -// VcdConnectionParams Parameters to connect and query VMware config file. -// -// Specifies the parameters to connect to a seed node and fetch information from its config file. -// -// swagger:model VcdConnectionParams -type VcdConnectionParams struct { - - // IP or hostname of the source. - // Required: true - Host *string `json:"host"` - - Credentials -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VcdConnectionParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Host *string `json:"host"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Host = dataAO0.Host - - // AO1 - var aO1 Credentials - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Credentials = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VcdConnectionParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Host *string `json:"host"` - } - - dataAO0.Host = m.Host - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.Credentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vcd connection params -func (m *VcdConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - // 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 -} - -func (m *VcdConnectionParams) validateHost(formats strfmt.Registry) error { - - if err := validate.Required("host", "body", m.Host); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vcd connection params based on the context it is used -func (m *VcdConnectionParams) 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 *VcdConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdConnectionParams) UnmarshalBinary(b []byte) error { - var res VcdConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcd_registration_params.go b/v2/models/vcd_registration_params.go deleted file mode 100644 index cc76cc9b..00000000 --- a/v2/models/vcd_registration_params.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VcdRegistrationParams Register VMware vCloud director request parameters. -// -// Specifies parameters to register VMware vCloud director. -// -// swagger:model VcdRegistrationParams -type VcdRegistrationParams struct { - CommonSourceRegistrationParams - - // Specifies the credentials information for all the vcenters in vcloud director. - // Required: true - // Min Items: 1 - VcenterCredentialInfoList []*VcenterCredentialInfo `json:"vcenterCredentialInfoList"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VcdRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - VcenterCredentialInfoList []*VcenterCredentialInfo `json:"vcenterCredentialInfoList"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.VcenterCredentialInfoList = dataAO1.VcenterCredentialInfoList - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VcdRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - VcenterCredentialInfoList []*VcenterCredentialInfo `json:"vcenterCredentialInfoList"` - } - - dataAO1.VcenterCredentialInfoList = m.VcenterCredentialInfoList - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vcd registration params -func (m *VcdRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcenterCredentialInfoList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdRegistrationParams) validateVcenterCredentialInfoList(formats strfmt.Registry) error { - - if err := validate.Required("vcenterCredentialInfoList", "body", m.VcenterCredentialInfoList); err != nil { - return err - } - - iVcenterCredentialInfoListSize := int64(len(m.VcenterCredentialInfoList)) - - if err := validate.MinItems("vcenterCredentialInfoList", "body", iVcenterCredentialInfoListSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.VcenterCredentialInfoList); i++ { - if swag.IsZero(m.VcenterCredentialInfoList[i]) { // not required - continue - } - - if m.VcenterCredentialInfoList[i] != nil { - if err := m.VcenterCredentialInfoList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterCredentialInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterCredentialInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vcd registration params based on the context it is used -func (m *VcdRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcenterCredentialInfoList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdRegistrationParams) contextValidateVcenterCredentialInfoList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.VcenterCredentialInfoList); i++ { - - if m.VcenterCredentialInfoList[i] != nil { - - if swag.IsZero(m.VcenterCredentialInfoList[i]) { // not required - return nil - } - - if err := m.VcenterCredentialInfoList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcenterCredentialInfoList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcenterCredentialInfoList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VcdRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdRegistrationParams) UnmarshalBinary(b []byte) error { - var res VcdRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcd_storage_profile_params.go b/v2/models/vcd_storage_profile_params.go deleted file mode 100644 index dae4f280..00000000 --- a/v2/models/vcd_storage_profile_params.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" - "github.com/go-openapi/validate" -) - -// VcdStorageProfileParams VCD Storage Profile Params -// -// Specifies the parameters of a VCD storage profile. -// -// swagger:model VcdStorageProfileParams -type VcdStorageProfileParams struct { - - // Specifies the UUID assigned by the VCD to the storage profile. - // Required: true - VcdUUID *string `json:"vcdUuid"` - - // Specifies the name of the storage profile. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this vcd storage profile params -func (m *VcdStorageProfileParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcdUUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdStorageProfileParams) validateVcdUUID(formats strfmt.Registry) error { - - if err := validate.Required("vcdUuid", "body", m.VcdUUID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vcd storage profile params based on the context it is used -func (m *VcdStorageProfileParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcdStorageProfileParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VcdStorageProfileParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdStorageProfileParams) UnmarshalBinary(b []byte) error { - var res VcdStorageProfileParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcd_vcenter_info.go b/v2/models/vcd_vcenter_info.go deleted file mode 100644 index 00faf1de..00000000 --- a/v2/models/vcd_vcenter_info.go +++ /dev/null @@ -1,55 +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" -) - -// VcdVcenterInfo VCD vCenter Info -// -// Specifies information about a vCetner. -// -// swagger:model VcdVcenterInfo -type VcdVcenterInfo struct { - - // Specifies the name of the vCenter. - Name *string `json:"name,omitempty"` - - // Specifies the endpoint of the vCenter. - Endpoint *string `json:"endpoint,omitempty"` -} - -// Validate validates this vcd vcenter info -func (m *VcdVcenterInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vcd vcenter info based on context it is used -func (m *VcdVcenterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VcdVcenterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcdVcenterInfo) UnmarshalBinary(b []byte) error { - var res VcdVcenterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcenter_credential_info.go b/v2/models/vcenter_credential_info.go deleted file mode 100644 index acdf71bb..00000000 --- a/v2/models/vcenter_credential_info.go +++ /dev/null @@ -1,119 +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" -) - -// VcenterCredentialInfo VMware vCenter Credential Info -// -// Specifies the credential information for a specific vcenter. -// -// swagger:model VcenterCredentialInfo -type VcenterCredentialInfo struct { - CommonSourceRegistrationParams - - // Specifies the name of the vCenter. - Name *string `json:"name,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VcenterCredentialInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - Name *string `json:"name,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Name = dataAO1.Name - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VcenterCredentialInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Name *string `json:"name,omitempty"` - } - - dataAO1.Name = m.Name - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vcenter credential info -func (m *VcenterCredentialInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vcenter credential info based on the context it is used -func (m *VcenterCredentialInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VcenterCredentialInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcenterCredentialInfo) UnmarshalBinary(b []byte) error { - var res VcenterCredentialInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vcenter_registration_params.go b/v2/models/vcenter_registration_params.go deleted file mode 100644 index d6a042f6..00000000 --- a/v2/models/vcenter_registration_params.go +++ /dev/null @@ -1,295 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VcenterRegistrationParams Register VMware vCenter request parameters. -// -// Specifies parameters to register VMware vCenter. -// -// swagger:model VcenterRegistrationParams -type VcenterRegistrationParams struct { - CommonSourceRegistrationParams - - // Specifies the CA certificate to enable SSL communication between host and cluster. - CaCert *string `json:"caCert,omitempty"` - - // Specifies to use VM BIOS UUID to track virtual machines in the host. - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - // Specifies the minimum free space (in GB) expected to be available in the datastore where the virtual disks of the VM being backed up reside. If the space available is lower than the specified value, backup will be aborted. - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - // Specifies the minimum free space (in percentage) expected to be available in the datastore where the virtual disks of the VM being backed up reside. If the space available is lower than the specified value, backup will be aborted. - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - // Specifies if the VM linking feature is enabled for the VCenter. If enabled, migrated VMs present in the VCenter which earlier belonged to some other VCenter will be linked during EH refresh. - LinkVmsAcrossVcenter *bool `json:"linkVmsAcrossVcenter,omitempty"` - - // Specifies the throttling params. - ThrottlingParams *VmwareThrottlingParams `json:"throttlingParams,omitempty"` - - // Specifies datastore specific parameters. - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VcenterRegistrationParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonSourceRegistrationParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonSourceRegistrationParams = aO0 - - // AO1 - var dataAO1 struct { - CaCert *string `json:"caCert,omitempty"` - - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - LinkVmsAcrossVcenter *bool `json:"linkVmsAcrossVcenter,omitempty"` - - ThrottlingParams *VmwareThrottlingParams `json:"throttlingParams,omitempty"` - - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CaCert = dataAO1.CaCert - - m.UseVMBiosUUID = dataAO1.UseVMBiosUUID - - m.MinFreeDatastoreSpaceForBackupGb = dataAO1.MinFreeDatastoreSpaceForBackupGb - - m.MinFreeDatastoreSpaceForBackupPercentage = dataAO1.MinFreeDatastoreSpaceForBackupPercentage - - m.LinkVmsAcrossVcenter = dataAO1.LinkVmsAcrossVcenter - - m.ThrottlingParams = dataAO1.ThrottlingParams - - m.DataStoreParams = dataAO1.DataStoreParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VcenterRegistrationParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonSourceRegistrationParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CaCert *string `json:"caCert,omitempty"` - - UseVMBiosUUID *bool `json:"useVmBiosUuid,omitempty"` - - MinFreeDatastoreSpaceForBackupGb *int64 `json:"minFreeDatastoreSpaceForBackupGb,omitempty"` - - MinFreeDatastoreSpaceForBackupPercentage *int64 `json:"minFreeDatastoreSpaceForBackupPercentage,omitempty"` - - LinkVmsAcrossVcenter *bool `json:"linkVmsAcrossVcenter,omitempty"` - - ThrottlingParams *VmwareThrottlingParams `json:"throttlingParams,omitempty"` - - DataStoreParams []*DatastoreParams `json:"dataStoreParams"` - } - - dataAO1.CaCert = m.CaCert - - dataAO1.UseVMBiosUUID = m.UseVMBiosUUID - - dataAO1.MinFreeDatastoreSpaceForBackupGb = m.MinFreeDatastoreSpaceForBackupGb - - dataAO1.MinFreeDatastoreSpaceForBackupPercentage = m.MinFreeDatastoreSpaceForBackupPercentage - - dataAO1.LinkVmsAcrossVcenter = m.LinkVmsAcrossVcenter - - dataAO1.ThrottlingParams = m.ThrottlingParams - - dataAO1.DataStoreParams = m.DataStoreParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vcenter registration params -func (m *VcenterRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateThrottlingParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDataStoreParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcenterRegistrationParams) validateThrottlingParams(formats strfmt.Registry) error { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if m.ThrottlingParams != nil { - if err := m.ThrottlingParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -func (m *VcenterRegistrationParams) validateDataStoreParams(formats strfmt.Registry) error { - - if swag.IsZero(m.DataStoreParams) { // not required - return nil - } - - for i := 0; i < len(m.DataStoreParams); i++ { - if swag.IsZero(m.DataStoreParams[i]) { // not required - continue - } - - if m.DataStoreParams[i] != nil { - if err := m.DataStoreParams[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vcenter registration params based on the context it is used -func (m *VcenterRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonSourceRegistrationParams - if err := m.CommonSourceRegistrationParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateThrottlingParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDataStoreParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VcenterRegistrationParams) contextValidateThrottlingParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ThrottlingParams != nil { - - if swag.IsZero(m.ThrottlingParams) { // not required - return nil - } - - if err := m.ThrottlingParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingParams") - } - return err - } - } - - return nil -} - -func (m *VcenterRegistrationParams) contextValidateDataStoreParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DataStoreParams); i++ { - - if m.DataStoreParams[i] != nil { - - if swag.IsZero(m.DataStoreParams[i]) { // not required - return nil - } - - if err := m.DataStoreParams[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataStoreParams" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VcenterRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VcenterRegistrationParams) UnmarshalBinary(b []byte) error { - var res VcenterRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vdc_catalog.go b/v2/models/vdc_catalog.go deleted file mode 100644 index 65c1e502..00000000 --- a/v2/models/vdc_catalog.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" - "github.com/go-openapi/validate" -) - -// VdcCatalog VDC Catalog -// -// Specifies a VDC Catalog. -// -// swagger:model VdcCatalog -type VdcCatalog struct { - - // Specifies the UUID of the catalog. - // Required: true - UUID *string `json:"uuid"` - - // Specifies the name of the catalog. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this vdc catalog -func (m *VdcCatalog) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcCatalog) validateUUID(formats strfmt.Registry) error { - - if err := validate.Required("uuid", "body", m.UUID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vdc catalog based on the context it is used -func (m *VdcCatalog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcCatalog) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VdcCatalog) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VdcCatalog) UnmarshalBinary(b []byte) error { - var res VdcCatalog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vdc_catalogs.go b/v2/models/vdc_catalogs.go deleted file mode 100644 index d9844f18..00000000 --- a/v2/models/vdc_catalogs.go +++ /dev/null @@ -1,123 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VdcCatalogs VDC Catalogs -// -// Specifies a list of VDC Catalogs. -// -// swagger:model VdcCatalogs -type VdcCatalogs struct { - - // Specifies a list of VDC Catalogs. - Catalogs []*VdcCatalog `json:"catalogs"` -} - -// Validate validates this vdc catalogs -func (m *VdcCatalogs) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCatalogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcCatalogs) validateCatalogs(formats strfmt.Registry) error { - if swag.IsZero(m.Catalogs) { // not required - return nil - } - - for i := 0; i < len(m.Catalogs); i++ { - if swag.IsZero(m.Catalogs[i]) { // not required - continue - } - - if m.Catalogs[i] != nil { - if err := m.Catalogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vdc catalogs based on the context it is used -func (m *VdcCatalogs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCatalogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcCatalogs) contextValidateCatalogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Catalogs); i++ { - - if m.Catalogs[i] != nil { - - if swag.IsZero(m.Catalogs[i]) { // not required - return nil - } - - if err := m.Catalogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VdcCatalogs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VdcCatalogs) UnmarshalBinary(b []byte) error { - var res VdcCatalogs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vdc_object.go b/v2/models/vdc_object.go deleted file mode 100644 index 88e12a83..00000000 --- a/v2/models/vdc_object.go +++ /dev/null @@ -1,183 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VdcObject Specifies the details about VMware Virtual datacenter. -// -// swagger:model VdcObject -type VdcObject struct { - - // Specifies a list of VDC Catalogs. - Catalogs []*VdcCatalog `json:"catalogs"` - - // Specifies a list of Organization VDC Networks. - OrgNetworks []*OrgVDCNetwork `json:"orgNetworks"` -} - -// Validate validates this vdc object -func (m *VdcObject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCatalogs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrgNetworks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcObject) validateCatalogs(formats strfmt.Registry) error { - if swag.IsZero(m.Catalogs) { // not required - return nil - } - - for i := 0; i < len(m.Catalogs); i++ { - if swag.IsZero(m.Catalogs[i]) { // not required - continue - } - - if m.Catalogs[i] != nil { - if err := m.Catalogs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VdcObject) validateOrgNetworks(formats strfmt.Registry) error { - if swag.IsZero(m.OrgNetworks) { // not required - return nil - } - - for i := 0; i < len(m.OrgNetworks); i++ { - if swag.IsZero(m.OrgNetworks[i]) { // not required - continue - } - - if m.OrgNetworks[i] != nil { - if err := m.OrgNetworks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vdc object based on the context it is used -func (m *VdcObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCatalogs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrgNetworks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VdcObject) contextValidateCatalogs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Catalogs); i++ { - - if m.Catalogs[i] != nil { - - if swag.IsZero(m.Catalogs[i]) { // not required - return nil - } - - if err := m.Catalogs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("catalogs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VdcObject) contextValidateOrgNetworks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OrgNetworks); i++ { - - if m.OrgNetworks[i] != nil { - - if swag.IsZero(m.OrgNetworks[i]) { // not required - return nil - } - - if err := m.OrgNetworks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orgNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orgNetworks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VdcObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VdcObject) UnmarshalBinary(b []byte) error { - var res VdcObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/verify_totp_request.go b/v2/models/verify_totp_request.go deleted file mode 100644 index d584b865..00000000 --- a/v2/models/verify_totp_request.go +++ /dev/null @@ -1,50 +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" -) - -// VerifyTotpRequest Holds the Totp code to be verified. -// -// swagger:model VerifyTotpRequest -type VerifyTotpRequest struct { - - // Specifies the Totp code. - TotpCode *string `json:"totpCode,omitempty"` -} - -// Validate validates this verify totp request -func (m *VerifyTotpRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this verify totp request based on context it is used -func (m *VerifyTotpRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VerifyTotpRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VerifyTotpRequest) UnmarshalBinary(b []byte) error { - var res VerifyTotpRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/verify_totp_result.go b/v2/models/verify_totp_result.go deleted file mode 100644 index 045ca2b0..00000000 --- a/v2/models/verify_totp_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" -) - -// VerifyTotpResult Result of verifying totp code for support user. -// -// swagger:model VerifyTotpResult -type VerifyTotpResult struct { - - // Specifies whether or not verification of totp code is success. - Success *bool `json:"success,omitempty"` - - // Specifies message of otp verification result. - Message *string `json:"message,omitempty"` -} - -// Validate validates this verify totp result -func (m *VerifyTotpResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this verify totp result based on context it is used -func (m *VerifyTotpResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VerifyTotpResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VerifyTotpResult) UnmarshalBinary(b []byte) error { - var res VerifyTotpResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view.go b/v2/models/view.go deleted file mode 100644 index 1c83353f..00000000 --- a/v2/models/view.go +++ /dev/null @@ -1,922 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// View View. -// -// Specifies settings for defining a storage location (called a View) -// with NFS and SMB mount paths in a Storage Domain (View Box) on the Cohesity -// Cluster. -// -// swagger:model View -type View struct { - - // Specifies an id of the View assigned by the Cohesity Cluster. - // Read Only: true - ViewID *int64 `json:"viewId,omitempty"` - - // If True, category in response is not set by user but inferred by - // Iris because none is set. Category can only be none when view was - // created by v1 API or cloned from a view created by v1 API. - // - // Inference Logic is as follows: - // 1. Object Services if only S3 or Swift protocol is selected. - // 2. Backup Target only if one read-write protocol is selected and - // QoS is "Backup Target Commvault" or "Backup Target SSD". - // 3. File Services if there are more than 1 read-write protocol or - // it doesn't fit any other category. - // Read Only: true - IsCategoryInferred *bool `json:"isCategoryInferred,omitempty"` - - // DataLock (Write Once Read Many) lock expiry epoch time in microseconds. If - // a view is marked as a DataLock view, only a Data Security Officer (a user - // having Data Security Privilege) can delete the view until the lock expiry - // time. - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - // Specifies the Object Services key mapping config of the view. This parameter can only - // be set during create and cannot be changed. - // Configuration of Object Services key mapping. - // Specifies the type of Object Services key mapping config. - // Read Only: true - // Enum: ["Random","Short","Long","Hierarchical","ObjectId"] - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - // Specifies the id of the Storage Domain (View Box) where the View is - // stored. - // Read Only: true - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - // Specifies the name of the Storage Domain (View Box) where the View is - // stored. - // Read Only: true - StorageDomainName *string `json:"storageDomainName,omitempty"` - - // Specifies whether to support case insensitive file/folder names. This - // parameter can only be set during create and cannot be changed. - // Read Only: true - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - // Specifies the time that the View was created in milliseconds. - // Read Only: true - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - // Specifies the NFS mount path of the View (without the hostname - // information). - // This path is used to support NFS mounting of the paths specified in the - // nfsExportPathList on Windows systems. - // Read Only: true - BasicMountPath *string `json:"basicMountPath,omitempty"` - - // This field is currently deprecated. Please use NFS MountPaths - // which would be an array of strings. - // Read Only: true - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - // Array of NFS Paths. - // Specifies the path for mounting this View as an NFS share. If - // Kerberos Provider has multiple hostaliases, each host alias has - // its own path. - // Read Only: true - NfsMountPaths []string `json:"nfsMountPaths"` - - // Array of SMB Paths. - // Specifies the possible paths that can be used to mount this View - // as a SMB share. If Active Directory has multiple account names; - // each machine account has its own path. - // Read Only: true - SmbMountPaths []string `json:"smbMountPaths"` - - // Aliases created for the view. A view alias allows a directory path inside - // a view to be mounted using the alias name. - // Read Only: true - Aliases []*ViewAliasInfo `json:"aliases"` - - // Specifies if a view contains migrated data. - // Read Only: true - IsTargetForMigratedData *bool `json:"isTargetForMigratedData,omitempty"` - - // Specifies the file count by size for the View. - FileCountBySize []*FileCount `json:"fileCountBySize"` - - // Specifies the sid of the view owner. - OwnerSid *string `json:"ownerSid,omitempty"` - - // Specifies whether to support s3 folder support feature. This - // parameter can only be set during create and cannot be changed. - // Read Only: true - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - // Specifies the intent of the View. - Intent *ViewIntent `json:"intent,omitempty"` - - // Specifies statistics about the View. - // Read Only: true - Stats *ViewStats `json:"stats,omitempty"` - - // Specifies the information about the failover of the - // view. - // Read Only: true - ViewFailover *ViewFailover `json:"viewFailover,omitempty"` - - // view protection - // Read Only: true - ViewProtection *ViewProtection `json:"viewProtection,omitempty"` - - UpdateViewParam -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *View) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ViewID *int64 `json:"viewId,omitempty"` - - IsCategoryInferred *bool `json:"isCategoryInferred,omitempty"` - - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - StorageDomainName *string `json:"storageDomainName,omitempty"` - - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - BasicMountPath *string `json:"basicMountPath,omitempty"` - - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - NfsMountPaths []string `json:"nfsMountPaths"` - - SmbMountPaths []string `json:"smbMountPaths"` - - Aliases []*ViewAliasInfo `json:"aliases"` - - IsTargetForMigratedData *bool `json:"isTargetForMigratedData,omitempty"` - - FileCountBySize []*FileCount `json:"fileCountBySize"` - - OwnerSid *string `json:"ownerSid,omitempty"` - - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - Intent *ViewIntent `json:"intent,omitempty"` - - Stats *ViewStats `json:"stats,omitempty"` - - ViewFailover *ViewFailover `json:"viewFailover,omitempty"` - - ViewProtection *ViewProtection `json:"viewProtection,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ViewID = dataAO0.ViewID - - m.IsCategoryInferred = dataAO0.IsCategoryInferred - - m.DataLockExpiryUsecs = dataAO0.DataLockExpiryUsecs - - m.ObjectServicesMappingConfig = dataAO0.ObjectServicesMappingConfig - - m.StorageDomainID = dataAO0.StorageDomainID - - m.StorageDomainName = dataAO0.StorageDomainName - - m.CaseInsensitiveNamesEnabled = dataAO0.CaseInsensitiveNamesEnabled - - m.CreateTimeMsecs = dataAO0.CreateTimeMsecs - - m.BasicMountPath = dataAO0.BasicMountPath - - m.NfsMountPath = dataAO0.NfsMountPath - - m.NfsMountPaths = dataAO0.NfsMountPaths - - m.SmbMountPaths = dataAO0.SmbMountPaths - - m.Aliases = dataAO0.Aliases - - m.IsTargetForMigratedData = dataAO0.IsTargetForMigratedData - - m.FileCountBySize = dataAO0.FileCountBySize - - m.OwnerSid = dataAO0.OwnerSid - - m.S3FolderSupportEnabled = dataAO0.S3FolderSupportEnabled - - m.Intent = dataAO0.Intent - - m.Stats = dataAO0.Stats - - m.ViewFailover = dataAO0.ViewFailover - - m.ViewProtection = dataAO0.ViewProtection - - // AO1 - var aO1 UpdateViewParam - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UpdateViewParam = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m View) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ViewID *int64 `json:"viewId,omitempty"` - - IsCategoryInferred *bool `json:"isCategoryInferred,omitempty"` - - DataLockExpiryUsecs *int64 `json:"dataLockExpiryUsecs,omitempty"` - - ObjectServicesMappingConfig *string `json:"objectServicesMappingConfig,omitempty"` - - StorageDomainID *int64 `json:"storageDomainId,omitempty"` - - StorageDomainName *string `json:"storageDomainName,omitempty"` - - CaseInsensitiveNamesEnabled *bool `json:"caseInsensitiveNamesEnabled,omitempty"` - - CreateTimeMsecs *int64 `json:"createTimeMsecs,omitempty"` - - BasicMountPath *string `json:"basicMountPath,omitempty"` - - NfsMountPath *string `json:"nfsMountPath,omitempty"` - - NfsMountPaths []string `json:"nfsMountPaths"` - - SmbMountPaths []string `json:"smbMountPaths"` - - Aliases []*ViewAliasInfo `json:"aliases"` - - IsTargetForMigratedData *bool `json:"isTargetForMigratedData,omitempty"` - - FileCountBySize []*FileCount `json:"fileCountBySize"` - - OwnerSid *string `json:"ownerSid,omitempty"` - - S3FolderSupportEnabled *bool `json:"s3FolderSupportEnabled,omitempty"` - - Intent *ViewIntent `json:"intent,omitempty"` - - Stats *ViewStats `json:"stats,omitempty"` - - ViewFailover *ViewFailover `json:"viewFailover,omitempty"` - - ViewProtection *ViewProtection `json:"viewProtection,omitempty"` - } - - dataAO0.ViewID = m.ViewID - - dataAO0.IsCategoryInferred = m.IsCategoryInferred - - dataAO0.DataLockExpiryUsecs = m.DataLockExpiryUsecs - - dataAO0.ObjectServicesMappingConfig = m.ObjectServicesMappingConfig - - dataAO0.StorageDomainID = m.StorageDomainID - - dataAO0.StorageDomainName = m.StorageDomainName - - dataAO0.CaseInsensitiveNamesEnabled = m.CaseInsensitiveNamesEnabled - - dataAO0.CreateTimeMsecs = m.CreateTimeMsecs - - dataAO0.BasicMountPath = m.BasicMountPath - - dataAO0.NfsMountPath = m.NfsMountPath - - dataAO0.NfsMountPaths = m.NfsMountPaths - - dataAO0.SmbMountPaths = m.SmbMountPaths - - dataAO0.Aliases = m.Aliases - - dataAO0.IsTargetForMigratedData = m.IsTargetForMigratedData - - dataAO0.FileCountBySize = m.FileCountBySize - - dataAO0.OwnerSid = m.OwnerSid - - dataAO0.S3FolderSupportEnabled = m.S3FolderSupportEnabled - - dataAO0.Intent = m.Intent - - dataAO0.Stats = m.Stats - - dataAO0.ViewFailover = m.ViewFailover - - dataAO0.ViewProtection = m.ViewProtection - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.UpdateViewParam) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view -func (m *View) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjectServicesMappingConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAliases(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileCountBySize(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIntent(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewFailover(formats); err != nil { - res = append(res, err) - } - - if err := m.validateViewProtection(formats); err != nil { - res = append(res, err) - } - - // 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 -} - -var viewTypeObjectServicesMappingConfigPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Random","Short","Long","Hierarchical","ObjectId"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewTypeObjectServicesMappingConfigPropEnum = append(viewTypeObjectServicesMappingConfigPropEnum, v) - } -} - -// property enum -func (m *View) validateObjectServicesMappingConfigEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewTypeObjectServicesMappingConfigPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *View) validateObjectServicesMappingConfig(formats strfmt.Registry) error { - - if swag.IsZero(m.ObjectServicesMappingConfig) { // not required - return nil - } - - // value enum - if err := m.validateObjectServicesMappingConfigEnum("objectServicesMappingConfig", "body", *m.ObjectServicesMappingConfig); err != nil { - return err - } - - return nil -} - -func (m *View) validateAliases(formats strfmt.Registry) error { - - if swag.IsZero(m.Aliases) { // not required - return nil - } - - for i := 0; i < len(m.Aliases); i++ { - if swag.IsZero(m.Aliases[i]) { // not required - continue - } - - if m.Aliases[i] != nil { - if err := m.Aliases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateFileCountBySize(formats strfmt.Registry) error { - - if swag.IsZero(m.FileCountBySize) { // not required - return nil - } - - for i := 0; i < len(m.FileCountBySize); i++ { - if swag.IsZero(m.FileCountBySize[i]) { // not required - continue - } - - if m.FileCountBySize[i] != nil { - if err := m.FileCountBySize[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) validateIntent(formats strfmt.Registry) error { - - if swag.IsZero(m.Intent) { // not required - return nil - } - - if m.Intent != nil { - if err := m.Intent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -func (m *View) validateStats(formats strfmt.Registry) error { - - if swag.IsZero(m.Stats) { // not required - 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 -} - -func (m *View) validateViewFailover(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewFailover) { // not required - return nil - } - - if m.ViewFailover != nil { - if err := m.ViewFailover.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewFailover") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewFailover") - } - return err - } - } - - return nil -} - -func (m *View) validateViewProtection(formats strfmt.Registry) error { - - if swag.IsZero(m.ViewProtection) { // not required - return nil - } - - if m.ViewProtection != nil { - if err := m.ViewProtection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtection") - } - 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 - - if err := m.contextValidateViewID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsCategoryInferred(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObjectServicesMappingConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageDomainID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStorageDomainName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCaseInsensitiveNamesEnabled(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreateTimeMsecs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBasicMountPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsMountPath(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNfsMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbMountPaths(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAliases(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIsTargetForMigratedData(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFileCountBySize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateS3FolderSupportEnabled(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIntent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewFailover(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateViewProtection(ctx, formats); err != nil { - res = append(res, err) - } - - // 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 -} - -func (m *View) contextValidateViewID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "viewId", "body", m.ViewID); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateIsCategoryInferred(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isCategoryInferred", "body", m.IsCategoryInferred); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateObjectServicesMappingConfig(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "objectServicesMappingConfig", "body", m.ObjectServicesMappingConfig); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateStorageDomainID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageDomainId", "body", m.StorageDomainID); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateStorageDomainName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "storageDomainName", "body", m.StorageDomainName); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateCaseInsensitiveNamesEnabled(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "caseInsensitiveNamesEnabled", "body", m.CaseInsensitiveNamesEnabled); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateCreateTimeMsecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "createTimeMsecs", "body", m.CreateTimeMsecs); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateBasicMountPath(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "basicMountPath", "body", m.BasicMountPath); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateNfsMountPath(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "nfsMountPath", "body", m.NfsMountPath); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateNfsMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "nfsMountPaths", "body", []string(m.NfsMountPaths)); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateSmbMountPaths(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "smbMountPaths", "body", []string(m.SmbMountPaths)); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateAliases(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "aliases", "body", []*ViewAliasInfo(m.Aliases)); err != nil { - return err - } - - for i := 0; i < len(m.Aliases); i++ { - - if m.Aliases[i] != nil { - - if swag.IsZero(m.Aliases[i]) { // not required - return nil - } - - if err := m.Aliases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("aliases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("aliases" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateIsTargetForMigratedData(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "isTargetForMigratedData", "body", m.IsTargetForMigratedData); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateFileCountBySize(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileCountBySize); i++ { - - if m.FileCountBySize[i] != nil { - - if swag.IsZero(m.FileCountBySize[i]) { // not required - return nil - } - - if err := m.FileCountBySize[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileCountBySize" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *View) contextValidateS3FolderSupportEnabled(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "s3FolderSupportEnabled", "body", m.S3FolderSupportEnabled); err != nil { - return err - } - - return nil -} - -func (m *View) contextValidateIntent(ctx context.Context, formats strfmt.Registry) error { - - if m.Intent != nil { - - if swag.IsZero(m.Intent) { // not required - return nil - } - - if err := m.Intent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("intent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("intent") - } - return err - } - } - - return nil -} - -func (m *View) 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 -} - -func (m *View) contextValidateViewFailover(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewFailover != nil { - - if swag.IsZero(m.ViewFailover) { // not required - return nil - } - - if err := m.ViewFailover.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewFailover") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewFailover") - } - return err - } - } - - return nil -} - -func (m *View) contextValidateViewProtection(ctx context.Context, formats strfmt.Registry) error { - - if m.ViewProtection != nil { - - if swag.IsZero(m.ViewProtection) { // not required - return nil - } - - if err := m.ViewProtection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtection") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtection") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *View) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *View) UnmarshalBinary(b []byte) error { - var res View - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_alias_info.go b/v2/models/view_alias_info.go deleted file mode 100644 index 4a79444c..00000000 --- a/v2/models/view_alias_info.go +++ /dev/null @@ -1,238 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewAliasInfo View Alias Information. -// -// View Alias Info is returned as part of list views. -// -// swagger:model ViewAliasInfo -type ViewAliasInfo struct { - - // Alias name. - AliasName *string `json:"aliasName,omitempty"` - - // View path for the alias. - ViewPath *string `json:"viewPath,omitempty"` - - // List of external client subnet IPs that are allowed to access the share. - ClientSubnetWhitelist []*Subnet `json:"clientSubnetWhitelist"` - - // This field is currently deprecated. Specifies whether to enable filer audit log on this view alias. This is only used if filer audit logging is enabled in cluster config. - EnableFilerAuditLog *bool `json:"enableFilerAuditLog,omitempty"` - - // Specifies the state of File Audit logging for this Share. Supported types: [Inherited, Enabled, Disabled]. Inherited: Audit log setting is inherited from the View. Enabled: Audit log is enabled for this Share. Disabled: Audit log is disabled for this Share. - // Enum: ["Inherited","Enabled","Disabled"] - FileAuditLoggingState *string `json:"fileAuditLoggingState,omitempty"` - - // SMB config for the alias (share). - SmbConfig *AliasSmbConfig `json:"smbConfig,omitempty"` -} - -// Validate validates this view alias info -func (m *ViewAliasInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClientSubnetWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFileAuditLoggingState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSmbConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewAliasInfo) validateClientSubnetWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.ClientSubnetWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - continue - } - - if m.ClientSubnetWhitelist[i] != nil { - if err := m.ClientSubnetWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var viewAliasInfoTypeFileAuditLoggingStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Inherited","Enabled","Disabled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewAliasInfoTypeFileAuditLoggingStatePropEnum = append(viewAliasInfoTypeFileAuditLoggingStatePropEnum, v) - } -} - -const ( - - // ViewAliasInfoFileAuditLoggingStateInherited captures enum value "Inherited" - ViewAliasInfoFileAuditLoggingStateInherited string = "Inherited" - - // ViewAliasInfoFileAuditLoggingStateEnabled captures enum value "Enabled" - ViewAliasInfoFileAuditLoggingStateEnabled string = "Enabled" - - // ViewAliasInfoFileAuditLoggingStateDisabled captures enum value "Disabled" - ViewAliasInfoFileAuditLoggingStateDisabled string = "Disabled" -) - -// prop value enum -func (m *ViewAliasInfo) validateFileAuditLoggingStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewAliasInfoTypeFileAuditLoggingStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewAliasInfo) validateFileAuditLoggingState(formats strfmt.Registry) error { - if swag.IsZero(m.FileAuditLoggingState) { // not required - return nil - } - - // value enum - if err := m.validateFileAuditLoggingStateEnum("fileAuditLoggingState", "body", *m.FileAuditLoggingState); err != nil { - return err - } - - return nil -} - -func (m *ViewAliasInfo) validateSmbConfig(formats strfmt.Registry) error { - if swag.IsZero(m.SmbConfig) { // not required - return nil - } - - if m.SmbConfig != nil { - if err := m.SmbConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view alias info based on the context it is used -func (m *ViewAliasInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClientSubnetWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSmbConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewAliasInfo) contextValidateClientSubnetWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClientSubnetWhitelist); i++ { - - if m.ClientSubnetWhitelist[i] != nil { - - if swag.IsZero(m.ClientSubnetWhitelist[i]) { // not required - return nil - } - - if err := m.ClientSubnetWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clientSubnetWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewAliasInfo) contextValidateSmbConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.SmbConfig != nil { - - if swag.IsZero(m.SmbConfig) { // not required - return nil - } - - if err := m.SmbConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("smbConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("smbConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewAliasInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewAliasInfo) UnmarshalBinary(b []byte) error { - var res ViewAliasInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_category.go b/v2/models/view_category.go deleted file mode 100644 index 58e5a005..00000000 --- a/v2/models/view_category.go +++ /dev/null @@ -1,110 +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" -) - -// ViewCategory View Category. -// -// Specifies category for view. -// -// swagger:model ViewCategory -type ViewCategory struct { - - // Specifies category for view. - // Enum: ["BackupTarget","FileServices","ObjectServices"] - Type string `json:"type,omitempty"` -} - -// Validate validates this view category -func (m *ViewCategory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewCategoryTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupTarget","FileServices","ObjectServices"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewCategoryTypeTypePropEnum = append(viewCategoryTypeTypePropEnum, v) - } -} - -const ( - - // ViewCategoryTypeBackupTarget captures enum value "BackupTarget" - ViewCategoryTypeBackupTarget string = "BackupTarget" - - // ViewCategoryTypeFileServices captures enum value "FileServices" - ViewCategoryTypeFileServices string = "FileServices" - - // ViewCategoryTypeObjectServices captures enum value "ObjectServices" - ViewCategoryTypeObjectServices string = "ObjectServices" -) - -// prop value enum -func (m *ViewCategory) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewCategoryTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewCategory) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view category based on context it is used -func (m *ViewCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewCategory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewCategory) UnmarshalBinary(b []byte) error { - var res ViewCategory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_client.go b/v2/models/view_client.go deleted file mode 100644 index 9ef805fc..00000000 --- a/v2/models/view_client.go +++ /dev/null @@ -1,141 +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" -) - -// ViewClient Specifies a View Client. -// -// swagger:model ViewClient -type ViewClient struct { - - // Specifies the client ip. - IP *string `json:"ip,omitempty"` - - // Specifies the protocol the client uses. - // Enum: ["NFS","SMB"] - Protocol *string `json:"protocol,omitempty"` - - // Specifies the node ip which the client is connected to. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the server ip which the client is connected to. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the name of the View which the client is connected to. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the id of the View which the client is connected to. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the path of the View which the client is connected to. - ViewPath *string `json:"viewPath,omitempty"` - - // Specifies the UID of the client user. - UID *int32 `json:"uid,omitempty"` - - // Specifies the GID of the client user. - Gid *int32 `json:"gid,omitempty"` - - // Specifies the username of the client. - Username *string `json:"username,omitempty"` - - // Specifies the user domain of the client. - UserDomain *string `json:"userDomain,omitempty"` - - // Specifies the time how long the client has connected to the server. - ConnectedTimeUsecs *int64 `json:"connectedTimeUsecs,omitempty"` - - // Specifies the dialect version for SMB client. - SmbDialectVersion *int32 `json:"smbDialectVersion,omitempty"` -} - -// Validate validates this view client -func (m *ViewClient) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtocol(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewClientTypeProtocolPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NFS","SMB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewClientTypeProtocolPropEnum = append(viewClientTypeProtocolPropEnum, v) - } -} - -const ( - - // ViewClientProtocolNFS captures enum value "NFS" - ViewClientProtocolNFS string = "NFS" - - // ViewClientProtocolSMB captures enum value "SMB" - ViewClientProtocolSMB string = "SMB" -) - -// prop value enum -func (m *ViewClient) validateProtocolEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewClientTypeProtocolPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewClient) validateProtocol(formats strfmt.Registry) error { - if swag.IsZero(m.Protocol) { // not required - return nil - } - - // value enum - if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view client based on context it is used -func (m *ViewClient) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClient) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClient) UnmarshalBinary(b []byte) error { - var res ViewClient - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_client_stats.go b/v2/models/view_client_stats.go deleted file mode 100644 index 2da097b8..00000000 --- a/v2/models/view_client_stats.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewClientStats Specifies the View Client stats. -// -// swagger:model ViewClientStats -type ViewClientStats struct { - - // Specifies the client IP. - ClientIP *string `json:"clientIp,omitempty"` - - // Specifies the list of Client stats. - Stats []*ClientStats `json:"stats"` -} - -// Validate validates this view client stats -func (m *ViewClientStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientStats) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - return nil - } - - for i := 0; i < len(m.Stats); i++ { - if swag.IsZero(m.Stats[i]) { // not required - continue - } - - if m.Stats[i] != nil { - if err := m.Stats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view client stats based on the context it is used -func (m *ViewClientStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientStats) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Stats); i++ { - - if m.Stats[i] != nil { - - if swag.IsZero(m.Stats[i]) { // not required - return nil - } - - if err := m.Stats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClientStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClientStats) UnmarshalBinary(b []byte) error { - var res ViewClientStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_clients.go b/v2/models/view_clients.go deleted file mode 100644 index ff8c98e8..00000000 --- a/v2/models/view_clients.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewClients Specifies a list of View Clients. -// -// swagger:model ViewClients -type ViewClients struct { - - // Specifies the list of Clients. - Clients []*ViewClient `json:"clients"` -} - -// Validate validates this view clients -func (m *ViewClients) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClients(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClients) validateClients(formats strfmt.Registry) error { - if swag.IsZero(m.Clients) { // not required - return nil - } - - for i := 0; i < len(m.Clients); i++ { - if swag.IsZero(m.Clients[i]) { // not required - continue - } - - if m.Clients[i] != nil { - if err := m.Clients[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clients" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clients" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view clients based on the context it is used -func (m *ViewClients) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClients(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClients) contextValidateClients(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Clients); i++ { - - if m.Clients[i] != nil { - - if swag.IsZero(m.Clients[i]) { // not required - return nil - } - - if err := m.Clients[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clients" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clients" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClients) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClients) UnmarshalBinary(b []byte) error { - var res ViewClients - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_clients_stats.go b/v2/models/view_clients_stats.go deleted file mode 100644 index 148494e5..00000000 --- a/v2/models/view_clients_stats.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewClientsStats Specifies a list of View Client stats. -// -// swagger:model ViewClientsStats -type ViewClientsStats struct { - - // Specifies the list of View Client stats. - ViewClientsStats []*ViewClientStats `json:"viewClientsStats"` -} - -// Validate validates this view clients stats -func (m *ViewClientsStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewClientsStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientsStats) validateViewClientsStats(formats strfmt.Registry) error { - if swag.IsZero(m.ViewClientsStats) { // not required - return nil - } - - for i := 0; i < len(m.ViewClientsStats); i++ { - if swag.IsZero(m.ViewClientsStats[i]) { // not required - continue - } - - if m.ViewClientsStats[i] != nil { - if err := m.ViewClientsStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewClientsStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewClientsStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view clients stats based on the context it is used -func (m *ViewClientsStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewClientsStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientsStats) contextValidateViewClientsStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewClientsStats); i++ { - - if m.ViewClientsStats[i] != nil { - - if swag.IsZero(m.ViewClientsStats[i]) { // not required - return nil - } - - if err := m.ViewClientsStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewClientsStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewClientsStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClientsStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClientsStats) UnmarshalBinary(b []byte) error { - var res ViewClientsStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_clients_summary.go b/v2/models/view_clients_summary.go deleted file mode 100644 index d2cfd603..00000000 --- a/v2/models/view_clients_summary.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewClientsSummary Specifies the View Client summary. -// -// swagger:model ViewClientsSummary -type ViewClientsSummary struct { - - // Specifies a list of summary. - Summary []*ViewClientsSummaryInfo `json:"summary"` -} - -// Validate validates this view clients summary -func (m *ViewClientsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientsSummary) validateSummary(formats strfmt.Registry) error { - if swag.IsZero(m.Summary) { // not required - return nil - } - - for i := 0; i < len(m.Summary); i++ { - if swag.IsZero(m.Summary[i]) { // not required - continue - } - - if m.Summary[i] != nil { - if err := m.Summary[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view clients summary based on the context it is used -func (m *ViewClientsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewClientsSummary) contextValidateSummary(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Summary); i++ { - - if m.Summary[i] != nil { - - if swag.IsZero(m.Summary[i]) { // not required - return nil - } - - if err := m.Summary[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summary" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summary" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClientsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClientsSummary) UnmarshalBinary(b []byte) error { - var res ViewClientsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_clients_summary_info.go b/v2/models/view_clients_summary_info.go deleted file mode 100644 index d98ce15d..00000000 --- a/v2/models/view_clients_summary_info.go +++ /dev/null @@ -1,59 +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" -) - -// ViewClientsSummaryInfo Specifies the View Client summary info. -// -// swagger:model ViewClientsSummaryInfo -type ViewClientsSummaryInfo struct { - - // Specifies the server ip the clients are connected to. - ServerIP *string `json:"serverIp,omitempty"` - - // Specifies the node ip the clients are connected to. - NodeIP *string `json:"nodeIp,omitempty"` - - // Specifies the number of NFS clients. - NfsClientCount *int64 `json:"nfsClientCount,omitempty"` - - // Specifies the number of SMB clients. - SmbClientCount *int64 `json:"smbClientCount,omitempty"` -} - -// Validate validates this view clients summary info -func (m *ViewClientsSummaryInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view clients summary info based on context it is used -func (m *ViewClientsSummaryInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewClientsSummaryInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewClientsSummaryInfo) UnmarshalBinary(b []byte) error { - var res ViewClientsSummaryInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_directory_quota.go b/v2/models/view_directory_quota.go deleted file mode 100644 index 0cfa80d3..00000000 --- a/v2/models/view_directory_quota.go +++ /dev/null @@ -1,159 +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" -) - -// ViewDirectoryQuota Specifies a View directory quota. -// -// swagger:model ViewDirectoryQuota -type ViewDirectoryQuota struct { - - // Specifies the directory path. - // Required: true - DirectoryPath *string `json:"directoryPath"` - - // Specifies the directory usage in bytes. - // Read Only: true - UsageBytes *int64 `json:"usageBytes,omitempty"` - - // Specifies whether directory quota walk is pending. - // Read Only: true - DirectoryWalkPending *bool `json:"directoryWalkPending,omitempty"` - - // Specifies the directory quota policy. - // Required: true - QuotaPolicy *ViewDirectoryQuotaPolicy `json:"quotaPolicy"` -} - -// Validate validates this view directory quota -func (m *ViewDirectoryQuota) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirectoryPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewDirectoryQuota) validateDirectoryPath(formats strfmt.Registry) error { - - if err := validate.Required("directoryPath", "body", m.DirectoryPath); err != nil { - return err - } - - return nil -} - -func (m *ViewDirectoryQuota) validateQuotaPolicy(formats strfmt.Registry) error { - - if err := validate.Required("quotaPolicy", "body", m.QuotaPolicy); err != nil { - return err - } - - if m.QuotaPolicy != nil { - if err := m.QuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view directory quota based on the context it is used -func (m *ViewDirectoryQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateUsageBytes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDirectoryWalkPending(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewDirectoryQuota) contextValidateUsageBytes(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "usageBytes", "body", m.UsageBytes); err != nil { - return err - } - - return nil -} - -func (m *ViewDirectoryQuota) contextValidateDirectoryWalkPending(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "directoryWalkPending", "body", m.DirectoryWalkPending); err != nil { - return err - } - - return nil -} - -func (m *ViewDirectoryQuota) contextValidateQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.QuotaPolicy != nil { - - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("quotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("quotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewDirectoryQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewDirectoryQuota) UnmarshalBinary(b []byte) error { - var res ViewDirectoryQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_directory_quota_policy.go b/v2/models/view_directory_quota_policy.go deleted file mode 100644 index 4c38c162..00000000 --- a/v2/models/view_directory_quota_policy.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" -) - -// ViewDirectoryQuotaPolicy Specifies a quota for View directory. -// -// swagger:model ViewDirectoryQuotaPolicy -type ViewDirectoryQuotaPolicy struct { - - // Specifies if an alert should be triggered when the usage of this resource exceeds this quota limit. This limit is optional and is specified in bytes. If no value is specified, there is no limit. - AlertLimitBytes *int64 `json:"alertLimitBytes,omitempty"` - - // Specifies an optional quota limit on the usage allowed for this resource. This limit is specified in bytes. If no value is specified, there is no limit. - HardLimitBytes *int64 `json:"hardLimitBytes,omitempty"` -} - -// Validate validates this view directory quota policy -func (m *ViewDirectoryQuotaPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view directory quota policy based on context it is used -func (m *ViewDirectoryQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewDirectoryQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewDirectoryQuotaPolicy) UnmarshalBinary(b []byte) error { - var res ViewDirectoryQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_directory_quotas.go b/v2/models/view_directory_quotas.go deleted file mode 100644 index 6f007342..00000000 --- a/v2/models/view_directory_quotas.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewDirectoryQuotas Specifies a list of View directory quotas. -// -// swagger:model ViewDirectoryQuotas -type ViewDirectoryQuotas struct { - - // Specifies the list of View directory quotas. - DirectoryQuotas []*ViewDirectoryQuota `json:"directoryQuotas"` - - // Specifies the pagination cookie. - Cookie *int64 `json:"cookie,omitempty"` -} - -// Validate validates this view directory quotas -func (m *ViewDirectoryQuotas) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirectoryQuotas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewDirectoryQuotas) validateDirectoryQuotas(formats strfmt.Registry) error { - if swag.IsZero(m.DirectoryQuotas) { // not required - return nil - } - - for i := 0; i < len(m.DirectoryQuotas); i++ { - if swag.IsZero(m.DirectoryQuotas[i]) { // not required - continue - } - - if m.DirectoryQuotas[i] != nil { - if err := m.DirectoryQuotas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directoryQuotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directoryQuotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view directory quotas based on the context it is used -func (m *ViewDirectoryQuotas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDirectoryQuotas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewDirectoryQuotas) contextValidateDirectoryQuotas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.DirectoryQuotas); i++ { - - if m.DirectoryQuotas[i] != nil { - - if swag.IsZero(m.DirectoryQuotas[i]) { // not required - return nil - } - - if err := m.DirectoryQuotas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directoryQuotas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directoryQuotas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewDirectoryQuotas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewDirectoryQuotas) UnmarshalBinary(b []byte) error { - var res ViewDirectoryQuotas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_failover.go b/v2/models/view_failover.go deleted file mode 100644 index 375e3a31..00000000 --- a/v2/models/view_failover.go +++ /dev/null @@ -1,62 +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" -) - -// ViewFailover Specifies the failover status of a view. -// -// swagger:model ViewFailover -type ViewFailover struct { - - // Specifies if the view is ready for failover. - IsFailoverReady *bool `json:"isFailoverReady,omitempty"` - - // Specifies the remote view id. - RemoteViewID *int64 `json:"remoteViewId,omitempty"` - - // Specifies the remote cluster id. - RemoteClusterID *int64 `json:"remoteClusterId,omitempty"` - - // Specifies the remote cluster incarnation id. - RemoteClusterIncarnationID *int64 `json:"remoteClusterIncarnationId,omitempty"` - - // View uid. - ViewUID *string `json:"viewUid,omitempty"` -} - -// Validate validates this view failover -func (m *ViewFailover) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view failover based on context it is used -func (m *ViewFailover) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewFailover) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewFailover) UnmarshalBinary(b []byte) error { - var res ViewFailover - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_intent.go b/v2/models/view_intent.go deleted file mode 100644 index f3f90af8..00000000 --- a/v2/models/view_intent.go +++ /dev/null @@ -1,156 +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" -) - -// ViewIntent Sepcifies the intent of the View. -// -// swagger:model ViewIntent -type ViewIntent struct { - - // Specifies the template id from which the View is created. - TemplateID *int64 `json:"templateId,omitempty"` - - // Specifies the template name from which the View is created. - TemplateName *string `json:"templateName,omitempty"` - - // Used for uniquely indentifying a default template - // Enum: ["Unknown","BackupGeneral","BackupCommvault","BackupVeeam","FileServiceVideos","FileServiceMultimedia","FileServiceArchive","ObjectServiceContainer","ZDLRA","SAPHANA","TSM","ApplicationsDump","FileServiceGeneral","DigitalArchive","ObjectServiceGeneral","SplunkSmartStore","Hadoop"] - DefaultTemplateName *string `json:"defaultTemplateName,omitempty"` -} - -// Validate validates this view intent -func (m *ViewIntent) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultTemplateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewIntentTypeDefaultTemplateNamePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Unknown","BackupGeneral","BackupCommvault","BackupVeeam","FileServiceVideos","FileServiceMultimedia","FileServiceArchive","ObjectServiceContainer","ZDLRA","SAPHANA","TSM","ApplicationsDump","FileServiceGeneral","DigitalArchive","ObjectServiceGeneral","SplunkSmartStore","Hadoop"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewIntentTypeDefaultTemplateNamePropEnum = append(viewIntentTypeDefaultTemplateNamePropEnum, v) - } -} - -const ( - - // ViewIntentDefaultTemplateNameUnknown captures enum value "Unknown" - ViewIntentDefaultTemplateNameUnknown string = "Unknown" - - // ViewIntentDefaultTemplateNameBackupGeneral captures enum value "BackupGeneral" - ViewIntentDefaultTemplateNameBackupGeneral string = "BackupGeneral" - - // ViewIntentDefaultTemplateNameBackupCommvault captures enum value "BackupCommvault" - ViewIntentDefaultTemplateNameBackupCommvault string = "BackupCommvault" - - // ViewIntentDefaultTemplateNameBackupVeeam captures enum value "BackupVeeam" - ViewIntentDefaultTemplateNameBackupVeeam string = "BackupVeeam" - - // ViewIntentDefaultTemplateNameFileServiceVideos captures enum value "FileServiceVideos" - ViewIntentDefaultTemplateNameFileServiceVideos string = "FileServiceVideos" - - // ViewIntentDefaultTemplateNameFileServiceMultimedia captures enum value "FileServiceMultimedia" - ViewIntentDefaultTemplateNameFileServiceMultimedia string = "FileServiceMultimedia" - - // ViewIntentDefaultTemplateNameFileServiceArchive captures enum value "FileServiceArchive" - ViewIntentDefaultTemplateNameFileServiceArchive string = "FileServiceArchive" - - // ViewIntentDefaultTemplateNameObjectServiceContainer captures enum value "ObjectServiceContainer" - ViewIntentDefaultTemplateNameObjectServiceContainer string = "ObjectServiceContainer" - - // ViewIntentDefaultTemplateNameZDLRA captures enum value "ZDLRA" - ViewIntentDefaultTemplateNameZDLRA string = "ZDLRA" - - // ViewIntentDefaultTemplateNameSAPHANA captures enum value "SAPHANA" - ViewIntentDefaultTemplateNameSAPHANA string = "SAPHANA" - - // ViewIntentDefaultTemplateNameTSM captures enum value "TSM" - ViewIntentDefaultTemplateNameTSM string = "TSM" - - // ViewIntentDefaultTemplateNameApplicationsDump captures enum value "ApplicationsDump" - ViewIntentDefaultTemplateNameApplicationsDump string = "ApplicationsDump" - - // ViewIntentDefaultTemplateNameFileServiceGeneral captures enum value "FileServiceGeneral" - ViewIntentDefaultTemplateNameFileServiceGeneral string = "FileServiceGeneral" - - // ViewIntentDefaultTemplateNameDigitalArchive captures enum value "DigitalArchive" - ViewIntentDefaultTemplateNameDigitalArchive string = "DigitalArchive" - - // ViewIntentDefaultTemplateNameObjectServiceGeneral captures enum value "ObjectServiceGeneral" - ViewIntentDefaultTemplateNameObjectServiceGeneral string = "ObjectServiceGeneral" - - // ViewIntentDefaultTemplateNameSplunkSmartStore captures enum value "SplunkSmartStore" - ViewIntentDefaultTemplateNameSplunkSmartStore string = "SplunkSmartStore" - - // ViewIntentDefaultTemplateNameHadoop captures enum value "Hadoop" - ViewIntentDefaultTemplateNameHadoop string = "Hadoop" -) - -// prop value enum -func (m *ViewIntent) validateDefaultTemplateNameEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewIntentTypeDefaultTemplateNamePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewIntent) validateDefaultTemplateName(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultTemplateName) { // not required - return nil - } - - // value enum - if err := m.validateDefaultTemplateNameEnum("defaultTemplateName", "body", *m.DefaultTemplateName); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view intent based on context it is used -func (m *ViewIntent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewIntent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewIntent) UnmarshalBinary(b []byte) error { - var res ViewIntent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_object_params.go b/v2/models/view_object_params.go deleted file mode 100644 index 6eea3038..00000000 --- a/v2/models/view_object_params.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" -) - -// ViewObjectParams Specifies the details of a view. -// -// swagger:model ViewObjectParams -type ViewObjectParams struct { - - // Specifies a distinct value that's unique to a source. - UID *string `json:"uid,omitempty"` - - // Specifies the name of the view. - Name *string `json:"name,omitempty"` -} - -// Validate validates this view object params -func (m *ViewObjectParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view object params based on context it is used -func (m *ViewObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewObjectParams) UnmarshalBinary(b []byte) error { - var res ViewObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_object_summary.go b/v2/models/view_object_summary.go deleted file mode 100644 index fd83122c..00000000 --- a/v2/models/view_object_summary.go +++ /dev/null @@ -1,50 +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" -) - -// ViewObjectSummary Specifies the view object summary. -// -// swagger:model ViewObjectSummary -type ViewObjectSummary struct { - - // Specifies the total views count. - TotalViewsCount *int64 `json:"totalViewsCount,omitempty"` -} - -// Validate validates this view object summary -func (m *ViewObjectSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view object summary based on context it is used -func (m *ViewObjectSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewObjectSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewObjectSummary) UnmarshalBinary(b []byte) error { - var res ViewObjectSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_options.go b/v2/models/view_options.go deleted file mode 100644 index e4f7a7ee..00000000 --- a/v2/models/view_options.go +++ /dev/null @@ -1,58 +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" -) - -// ViewOptions View Options -// -// Specifies the parameters related to the Exchange restore of type view. All the files related to one database are cloned to a view and the view can be used by third party tools like Kroll, etc. to restore exchange databases. -// -// swagger:model ViewOptions -type ViewOptions struct { - - // Whether to white-list the Exchange restore view for all the IP addresses - WhitelistRestoreViewForAll *bool `json:"whitelistRestoreViewForAll,omitempty"` - - // The name of the view. - ViewName *string `json:"viewName,omitempty"` - - // The path of the SMB share. - MountPoint *string `json:"mountPoint,omitempty"` -} - -// Validate validates this view options -func (m *ViewOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view options based on context it is used -func (m *ViewOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewOptions) UnmarshalBinary(b []byte) error { - var res ViewOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_params.go b/v2/models/view_params.go deleted file mode 100644 index 2776a416..00000000 --- a/v2/models/view_params.go +++ /dev/null @@ -1,55 +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" -) - -// ViewParams View -// -// Specifies the details about a view. -// -// swagger:model ViewParams -type ViewParams struct { - - // Specifies the ID of the view. - ID *string `json:"id,omitempty"` - - // Specifies the name of the view. - Name *string `json:"name,omitempty"` -} - -// Validate validates this view params -func (m *ViewParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view params based on context it is used -func (m *ViewParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewParams) UnmarshalBinary(b []byte) error { - var res ViewParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_pinning_config.go b/v2/models/view_pinning_config.go deleted file mode 100644 index a5901ee3..00000000 --- a/v2/models/view_pinning_config.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" - "github.com/go-openapi/validate" -) - -// ViewPinningConfig Specifies the pinning config of a view. -// -// swagger:model ViewPinningConfig -type ViewPinningConfig struct { - - // Specifies if view pinning is enabled. If set to true, view will be pinned to SSD and view data will be stored there. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the time to pin files after last access. - PinnedTimeSecs *int64 `json:"pinnedTimeSecs,omitempty"` - - // Specifies the timestamp when view pinning config is last updated. - // Read Only: true - LastUpdatedTimestampSecs *int64 `json:"lastUpdatedTimestampSecs,omitempty"` -} - -// Validate validates this view pinning config -func (m *ViewPinningConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewPinningConfig) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this view pinning config based on the context it is used -func (m *ViewPinningConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastUpdatedTimestampSecs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewPinningConfig) contextValidateLastUpdatedTimestampSecs(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "lastUpdatedTimestampSecs", "body", m.LastUpdatedTimestampSecs); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewPinningConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewPinningConfig) UnmarshalBinary(b []byte) error { - var res ViewPinningConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection.go b/v2/models/view_protection.go deleted file mode 100644 index 29ae8ccf..00000000 --- a/v2/models/view_protection.go +++ /dev/null @@ -1,133 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewProtection View Protection. -// -// Specifies information about the Protection Groups that are protecting the -// View. -// -// swagger:model ViewProtection -type ViewProtection struct { - - // Specifies the id of the Protection Source that is using this View. - MagnetoEntityID *int64 `json:"magnetoEntityId,omitempty"` - - // Array of Protection Group. - // Specifies the Protection Group that are protecting the View. - ProtectionGroups []*ProtectionGroupInfo `json:"protectionGroups"` - - // Specifies if this View is an inactive View that was created on this - // Remote Cluster to store the Snapshots created by replication. - // This inactive View cannot be NFS or SMB mounted. - Inactive *bool `json:"inactive,omitempty"` -} - -// Validate validates this view protection -func (m *ViewProtection) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtection) validateProtectionGroups(formats strfmt.Registry) error { - if swag.IsZero(m.ProtectionGroups) { // not required - return nil - } - - for i := 0; i < len(m.ProtectionGroups); i++ { - if swag.IsZero(m.ProtectionGroups[i]) { // not required - continue - } - - if m.ProtectionGroups[i] != nil { - if err := m.ProtectionGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view protection based on the context it is used -func (m *ViewProtection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProtectionGroups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtection) contextValidateProtectionGroups(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ProtectionGroups); i++ { - - if m.ProtectionGroups[i] != nil { - - if swag.IsZero(m.ProtectionGroups[i]) { // not required - return nil - } - - if err := m.ProtectionGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionGroups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtection) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtection) UnmarshalBinary(b []byte) error { - var res ViewProtection - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection_config.go b/v2/models/view_protection_config.go deleted file mode 100644 index 763a4f76..00000000 --- a/v2/models/view_protection_config.go +++ /dev/null @@ -1,214 +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" -) - -// ViewProtectionConfig Specifies the View protection config. -// -// swagger:model ViewProtectionConfig -type ViewProtectionConfig struct { - - // Specifies the View protection group type. - // Required: true - // Enum: ["ExistingGroup","NewGroup"] - ProtectionGroupType *string `json:"protectionGroupType"` - - // Specifies the parameters used for existing protection group. - ExistingGroupParam *ExistingGroupParam `json:"existingGroupParam,omitempty"` - - // Specifies the parameters used for new protection group. - NewGroupParam *NewGroupParam `json:"newGroupParam,omitempty"` -} - -// Validate validates this view protection config -func (m *ViewProtectionConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProtectionGroupType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExistingGroupParam(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewGroupParam(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtectionConfigTypeProtectionGroupTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ExistingGroup","NewGroup"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtectionConfigTypeProtectionGroupTypePropEnum = append(viewProtectionConfigTypeProtectionGroupTypePropEnum, v) - } -} - -const ( - - // ViewProtectionConfigProtectionGroupTypeExistingGroup captures enum value "ExistingGroup" - ViewProtectionConfigProtectionGroupTypeExistingGroup string = "ExistingGroup" - - // ViewProtectionConfigProtectionGroupTypeNewGroup captures enum value "NewGroup" - ViewProtectionConfigProtectionGroupTypeNewGroup string = "NewGroup" -) - -// prop value enum -func (m *ViewProtectionConfig) validateProtectionGroupTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtectionConfigTypeProtectionGroupTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtectionConfig) validateProtectionGroupType(formats strfmt.Registry) error { - - if err := validate.Required("protectionGroupType", "body", m.ProtectionGroupType); err != nil { - return err - } - - // value enum - if err := m.validateProtectionGroupTypeEnum("protectionGroupType", "body", *m.ProtectionGroupType); err != nil { - return err - } - - return nil -} - -func (m *ViewProtectionConfig) validateExistingGroupParam(formats strfmt.Registry) error { - if swag.IsZero(m.ExistingGroupParam) { // not required - return nil - } - - if m.ExistingGroupParam != nil { - if err := m.ExistingGroupParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingGroupParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingGroupParam") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionConfig) validateNewGroupParam(formats strfmt.Registry) error { - if swag.IsZero(m.NewGroupParam) { // not required - return nil - } - - if m.NewGroupParam != nil { - if err := m.NewGroupParam.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newGroupParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newGroupParam") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view protection config based on the context it is used -func (m *ViewProtectionConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExistingGroupParam(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNewGroupParam(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionConfig) contextValidateExistingGroupParam(ctx context.Context, formats strfmt.Registry) error { - - if m.ExistingGroupParam != nil { - - if swag.IsZero(m.ExistingGroupParam) { // not required - return nil - } - - if err := m.ExistingGroupParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("existingGroupParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("existingGroupParam") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionConfig) contextValidateNewGroupParam(ctx context.Context, formats strfmt.Registry) error { - - if m.NewGroupParam != nil { - - if swag.IsZero(m.NewGroupParam) { // not required - return nil - } - - if err := m.NewGroupParam.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newGroupParam") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newGroupParam") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionConfig) UnmarshalBinary(b []byte) error { - var res ViewProtectionConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection_group_object_params.go b/v2/models/view_protection_group_object_params.go deleted file mode 100644 index 5af7ad63..00000000 --- a/v2/models/view_protection_group_object_params.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" - "github.com/go-openapi/validate" -) - -// ViewProtectionGroupObjectParams Specifies an object protected by a View Protection Group. -// -// swagger:model ViewProtectionGroupObjectParams -type ViewProtectionGroupObjectParams struct { - - // Specifies the ID of the object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the name of the object. - // Read Only: true - Name *string `json:"name,omitempty"` -} - -// Validate validates this view protection group object params -func (m *ViewProtectionGroupObjectParams) 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 *ViewProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this view protection group object params based on the context it is used -func (m *ViewProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res ViewProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection_group_params.go b/v2/models/view_protection_group_params.go deleted file mode 100644 index 978391dc..00000000 --- a/v2/models/view_protection_group_params.go +++ /dev/null @@ -1,291 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewProtectionGroupParams View Protection Group Parameters -// -// Specifies the parameters which are specific to view related Protection Groups. -// -// swagger:model ViewProtectionGroupParams -type ViewProtectionGroupParams struct { - - // Specifies the objects to be included in the Protection Group. - // Required: true - // Min Items: 1 - // Unique: true - Objects []*ViewProtectionGroupObjectParams `json:"objects"` - - // Specifies the paramters for view replication. - ReplicationParams *ViewProtectionGroupReplicationParams `json:"replicationParams,omitempty"` - - // Specifies settings for indexing files found in the View so these files can be searched and recovered. This also specifies inclusion and exclusion rules that determine the directories to index. - IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` - - // Specifies the externally triggered job paramters. - ExternallyTriggeredJobParams *ExternallyTriggeredJobParams `json:"externallyTriggeredJobParams,omitempty"` -} - -// Validate validates this view protection group params -func (m *ViewProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicationParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIndexingPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExternallyTriggeredJobParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - iObjectsSize := int64(len(m.Objects)) - - if err := validate.MinItems("objects", "body", iObjectsSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewProtectionGroupParams) validateReplicationParams(formats strfmt.Registry) error { - if swag.IsZero(m.ReplicationParams) { // not required - return nil - } - - if m.ReplicationParams != nil { - if err := m.ReplicationParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationParams") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionGroupParams) validateIndexingPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if m.IndexingPolicy != nil { - if err := m.IndexingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionGroupParams) validateExternallyTriggeredJobParams(formats strfmt.Registry) error { - if swag.IsZero(m.ExternallyTriggeredJobParams) { // not required - return nil - } - - if m.ExternallyTriggeredJobParams != nil { - if err := m.ExternallyTriggeredJobParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view protection group params based on the context it is used -func (m *ViewProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicationParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIndexingPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExternallyTriggeredJobParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ViewProtectionGroupParams) contextValidateReplicationParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ReplicationParams != nil { - - if swag.IsZero(m.ReplicationParams) { // not required - return nil - } - - if err := m.ReplicationParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicationParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicationParams") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionGroupParams) contextValidateIndexingPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.IndexingPolicy != nil { - - if swag.IsZero(m.IndexingPolicy) { // not required - return nil - } - - if err := m.IndexingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingPolicy") - } - return err - } - } - - return nil -} - -func (m *ViewProtectionGroupParams) contextValidateExternallyTriggeredJobParams(ctx context.Context, formats strfmt.Registry) error { - - if m.ExternallyTriggeredJobParams != nil { - - if swag.IsZero(m.ExternallyTriggeredJobParams) { // not required - return nil - } - - if err := m.ExternallyTriggeredJobParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("externallyTriggeredJobParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("externallyTriggeredJobParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res ViewProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection_group_replication_params.go b/v2/models/view_protection_group_replication_params.go deleted file mode 100644 index 6447669d..00000000 --- a/v2/models/view_protection_group_replication_params.go +++ /dev/null @@ -1,136 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewProtectionGroupReplicationParams Replication Parameters -// -// Specifies the parameters for view replication. -// -// swagger:model ViewProtectionGroupReplicationParams -type ViewProtectionGroupReplicationParams struct { - - // Specifies the list of remote view names for the protected views in the Protection Group. By default the names will be the same as the name of the protected view. - // Min Items: 1 - // Unique: true - ViewNameConfigList []*ReplicatedViewNameConfig `json:"viewNameConfigList"` -} - -// Validate validates this view protection group replication params -func (m *ViewProtectionGroupReplicationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewNameConfigList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionGroupReplicationParams) validateViewNameConfigList(formats strfmt.Registry) error { - if swag.IsZero(m.ViewNameConfigList) { // not required - return nil - } - - iViewNameConfigListSize := int64(len(m.ViewNameConfigList)) - - if err := validate.MinItems("viewNameConfigList", "body", iViewNameConfigListSize, 1); err != nil { - return err - } - - if err := validate.UniqueItems("viewNameConfigList", "body", m.ViewNameConfigList); err != nil { - return err - } - - for i := 0; i < len(m.ViewNameConfigList); i++ { - if swag.IsZero(m.ViewNameConfigList[i]) { // not required - continue - } - - if m.ViewNameConfigList[i] != nil { - if err := m.ViewNameConfigList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewNameConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewNameConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view protection group replication params based on the context it is used -func (m *ViewProtectionGroupReplicationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewNameConfigList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewProtectionGroupReplicationParams) contextValidateViewNameConfigList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewNameConfigList); i++ { - - if m.ViewNameConfigList[i] != nil { - - if swag.IsZero(m.ViewNameConfigList[i]) { // not required - return nil - } - - if err := m.ViewNameConfigList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewNameConfigList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewNameConfigList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionGroupReplicationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionGroupReplicationParams) UnmarshalBinary(b []byte) error { - var res ViewProtectionGroupReplicationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protection_type.go b/v2/models/view_protection_type.go deleted file mode 100644 index aa7cdae4..00000000 --- a/v2/models/view_protection_type.go +++ /dev/null @@ -1,116 +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" -) - -// ViewProtectionType View Protection Type -// -// Specifies the view protection type. -// -// swagger:model ViewProtectionType -type ViewProtectionType struct { - - // Specifies the view protection type. - // Enum: ["Local","Archival","ReplicationOut","ReplicationIn","UnProtected"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this view protection type -func (m *ViewProtectionType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtectionTypeTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Local","Archival","ReplicationOut","ReplicationIn","UnProtected"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtectionTypeTypeEnumPropEnum = append(viewProtectionTypeTypeEnumPropEnum, v) - } -} - -const ( - - // ViewProtectionTypeEnumLocal captures enum value "Local" - ViewProtectionTypeEnumLocal string = "Local" - - // ViewProtectionTypeEnumArchival captures enum value "Archival" - ViewProtectionTypeEnumArchival string = "Archival" - - // ViewProtectionTypeEnumReplicationOut captures enum value "ReplicationOut" - ViewProtectionTypeEnumReplicationOut string = "ReplicationOut" - - // ViewProtectionTypeEnumReplicationIn captures enum value "ReplicationIn" - ViewProtectionTypeEnumReplicationIn string = "ReplicationIn" - - // ViewProtectionTypeEnumUnProtected captures enum value "UnProtected" - ViewProtectionTypeEnumUnProtected string = "UnProtected" -) - -// prop value enum -func (m *ViewProtectionType) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtectionTypeTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtectionType) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view protection type based on context it is used -func (m *ViewProtectionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionType) UnmarshalBinary(b []byte) error { - var res ViewProtectionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protocol.go b/v2/models/view_protocol.go deleted file mode 100644 index fad74d11..00000000 --- a/v2/models/view_protocol.go +++ /dev/null @@ -1,174 +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" -) - -// ViewProtocol Protocol Option -// -// Specifies the protocol options for view. -// -// swagger:model ViewProtocol -type ViewProtocol struct { - - // 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"` - - // Mode of protocol access. - // 'ReadOnly' - // 'ReadWrite' - // Enum: ["ReadOnly","ReadWrite"] - Mode string `json:"mode,omitempty"` -} - -// Validate validates this view protocol -func (m *ViewProtocol) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtocolTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NFS","NFS4","SMB","S3","Swift"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtocolTypeTypePropEnum = append(viewProtocolTypeTypePropEnum, v) - } -} - -const ( - - // ViewProtocolTypeNFS captures enum value "NFS" - ViewProtocolTypeNFS string = "NFS" - - // ViewProtocolTypeNFS4 captures enum value "NFS4" - ViewProtocolTypeNFS4 string = "NFS4" - - // ViewProtocolTypeSMB captures enum value "SMB" - ViewProtocolTypeSMB string = "SMB" - - // ViewProtocolTypeS3 captures enum value "S3" - ViewProtocolTypeS3 string = "S3" - - // ViewProtocolTypeSwift captures enum value "Swift" - ViewProtocolTypeSwift string = "Swift" -) - -// prop value enum -func (m *ViewProtocol) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtocolTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtocol) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -var viewProtocolTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ReadOnly","ReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtocolTypeModePropEnum = append(viewProtocolTypeModePropEnum, v) - } -} - -const ( - - // ViewProtocolModeReadOnly captures enum value "ReadOnly" - ViewProtocolModeReadOnly string = "ReadOnly" - - // ViewProtocolModeReadWrite captures enum value "ReadWrite" - ViewProtocolModeReadWrite string = "ReadWrite" -) - -// prop value enum -func (m *ViewProtocol) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtocolTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtocol) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", m.Mode); err != nil { - return err - } - - 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/v2/models/view_protocol_access.go b/v2/models/view_protocol_access.go deleted file mode 100644 index 2e895bad..00000000 --- a/v2/models/view_protocol_access.go +++ /dev/null @@ -1,116 +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" -) - -// ViewProtocolAccess View Protocol Access. -// -// Specifies protocol access for view. -// -// swagger:model ViewProtocolAccess -type ViewProtocolAccess struct { - - // Specifies protocol access for view. - // Enum: ["NFS","NFS4","SMB","S3","Swift"] - Type string `json:"type,omitempty"` -} - -// Validate validates this view protocol access -func (m *ViewProtocolAccess) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtocolAccessTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NFS","NFS4","SMB","S3","Swift"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtocolAccessTypeTypePropEnum = append(viewProtocolAccessTypeTypePropEnum, v) - } -} - -const ( - - // ViewProtocolAccessTypeNFS captures enum value "NFS" - ViewProtocolAccessTypeNFS string = "NFS" - - // ViewProtocolAccessTypeNFS4 captures enum value "NFS4" - ViewProtocolAccessTypeNFS4 string = "NFS4" - - // ViewProtocolAccessTypeSMB captures enum value "SMB" - ViewProtocolAccessTypeSMB string = "SMB" - - // ViewProtocolAccessTypeS3 captures enum value "S3" - ViewProtocolAccessTypeS3 string = "S3" - - // ViewProtocolAccessTypeSwift captures enum value "Swift" - ViewProtocolAccessTypeSwift string = "Swift" -) - -// prop value enum -func (m *ViewProtocolAccess) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtocolAccessTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtocolAccess) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view protocol access based on context it is used -func (m *ViewProtocolAccess) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtocolAccess) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtocolAccess) UnmarshalBinary(b []byte) error { - var res ViewProtocolAccess - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_protocol_access_mode.go b/v2/models/view_protocol_access_mode.go deleted file mode 100644 index 908c97c9..00000000 --- a/v2/models/view_protocol_access_mode.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewProtocolAccessMode View Protocol Access Mode -// -// Specifies protocol access mode for view. -// -// swagger:model ViewProtocolAccessMode -type ViewProtocolAccessMode struct { - - // Specifies protocol access mode for view. - // Enum: ["ReadOnly","ReadWrite"] - Type string `json:"type,omitempty"` -} - -// Validate validates this view protocol access mode -func (m *ViewProtocolAccessMode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewProtocolAccessModeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ReadOnly","ReadWrite"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewProtocolAccessModeTypeTypePropEnum = append(viewProtocolAccessModeTypeTypePropEnum, v) - } -} - -const ( - - // ViewProtocolAccessModeTypeReadOnly captures enum value "ReadOnly" - ViewProtocolAccessModeTypeReadOnly string = "ReadOnly" - - // ViewProtocolAccessModeTypeReadWrite captures enum value "ReadWrite" - ViewProtocolAccessModeTypeReadWrite string = "ReadWrite" -) - -// prop value enum -func (m *ViewProtocolAccessMode) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewProtocolAccessModeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewProtocolAccessMode) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view protocol access mode based on context it is used -func (m *ViewProtocolAccessMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtocolAccessMode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtocolAccessMode) UnmarshalBinary(b []byte) error { - var res ViewProtocolAccessMode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_recover_file_and_folder_info.go b/v2/models/view_recover_file_and_folder_info.go deleted file mode 100644 index 3c82f110..00000000 --- a/v2/models/view_recover_file_and_folder_info.go +++ /dev/null @@ -1,117 +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" -) - -// ViewRecoverFileAndFolderInfo Specifies the info about the view files and folders to be recovered. -// -// swagger:model ViewRecoverFileAndFolderInfo -type ViewRecoverFileAndFolderInfo struct { - CommonRecoverFileAndFolderInfo - - // Specifies the source inode number of the file being recovered. - InodeID *int64 `json:"inodeId,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewRecoverFileAndFolderInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonRecoverFileAndFolderInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonRecoverFileAndFolderInfo = aO0 - - // AO1 - var dataAO1 struct { - InodeID *int64 `json:"inodeId,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.InodeID = dataAO1.InodeID - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewRecoverFileAndFolderInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonRecoverFileAndFolderInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - InodeID *int64 `json:"inodeId,omitempty"` - } - - dataAO1.InodeID = m.InodeID - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view recover file and folder info -func (m *ViewRecoverFileAndFolderInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverFileAndFolderInfo - if err := m.CommonRecoverFileAndFolderInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view recover file and folder info based on the context it is used -func (m *ViewRecoverFileAndFolderInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonRecoverFileAndFolderInfo - if err := m.CommonRecoverFileAndFolderInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewRecoverFileAndFolderInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewRecoverFileAndFolderInfo) UnmarshalBinary(b []byte) error { - var res ViewRecoverFileAndFolderInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_security_mode.go b/v2/models/view_security_mode.go deleted file mode 100644 index 1d672030..00000000 --- a/v2/models/view_security_mode.go +++ /dev/null @@ -1,110 +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" -) - -// ViewSecurityMode View Security Mode. -// -// Specifies Security Mode for view. -// -// swagger:model ViewSecurityMode -type ViewSecurityMode struct { - - // Specifies Security Mode for view. - // Enum: ["NativeMode","UnifiedMode","NtfsMode"] - Type string `json:"type,omitempty"` -} - -// Validate validates this view security mode -func (m *ViewSecurityMode) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewSecurityModeTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NativeMode","UnifiedMode","NtfsMode"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewSecurityModeTypeTypePropEnum = append(viewSecurityModeTypeTypePropEnum, v) - } -} - -const ( - - // ViewSecurityModeTypeNativeMode captures enum value "NativeMode" - ViewSecurityModeTypeNativeMode string = "NativeMode" - - // ViewSecurityModeTypeUnifiedMode captures enum value "UnifiedMode" - ViewSecurityModeTypeUnifiedMode string = "UnifiedMode" - - // ViewSecurityModeTypeNtfsMode captures enum value "NtfsMode" - ViewSecurityModeTypeNtfsMode string = "NtfsMode" -) - -// prop value enum -func (m *ViewSecurityMode) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewSecurityModeTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewSecurityMode) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", m.Type); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this view security mode based on context it is used -func (m *ViewSecurityMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewSecurityMode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewSecurityMode) UnmarshalBinary(b []byte) error { - var res ViewSecurityMode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_share_permissions.go b/v2/models/view_share_permissions.go deleted file mode 100644 index f356f4db..00000000 --- a/v2/models/view_share_permissions.go +++ /dev/null @@ -1,124 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewSharePermissions Specifies share permissions of the view. -// -// swagger:model ViewSharePermissions -type ViewSharePermissions struct { - - // Specifies a list of super user sids. - SuperUserSids []string `json:"superUserSids"` - - // Specifies a list of share permissions. - Permissions []*SmbPermission `json:"permissions"` -} - -// Validate validates this view share permissions -func (m *ViewSharePermissions) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePermissions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewSharePermissions) validatePermissions(formats strfmt.Registry) error { - if swag.IsZero(m.Permissions) { // not required - return nil - } - - for i := 0; i < len(m.Permissions); i++ { - if swag.IsZero(m.Permissions[i]) { // not required - continue - } - - if m.Permissions[i] != nil { - if err := m.Permissions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view share permissions based on the context it is used -func (m *ViewSharePermissions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePermissions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewSharePermissions) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Permissions); i++ { - - if m.Permissions[i] != nil { - - if swag.IsZero(m.Permissions[i]) { // not required - return nil - } - - if err := m.Permissions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("permissions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("permissions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewSharePermissions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewSharePermissions) UnmarshalBinary(b []byte) error { - var res ViewSharePermissions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_stats.go b/v2/models/view_stats.go deleted file mode 100644 index 1bd66f9f..00000000 --- a/v2/models/view_stats.go +++ /dev/null @@ -1,114 +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" -) - -// ViewStats View Stats. -// -// Provides statistics about the View. -// -// swagger:model ViewStats -type ViewStats struct { - - // Specifies the id of the View. - ID *int64 `json:"id,omitempty"` - - // Specifies the data usage metric of the data stored in this View. - DataUsageStats *DataUsageStats `json:"dataUsageStats,omitempty"` -} - -// Validate validates this view stats -func (m *ViewStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDataUsageStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStats) validateDataUsageStats(formats strfmt.Registry) error { - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if m.DataUsageStats != nil { - if err := m.DataUsageStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view stats based on the context it is used -func (m *ViewStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDataUsageStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStats) contextValidateDataUsageStats(ctx context.Context, formats strfmt.Registry) error { - - if m.DataUsageStats != nil { - - if swag.IsZero(m.DataUsageStats) { // not required - return nil - } - - if err := m.DataUsageStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dataUsageStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dataUsageStats") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStats) UnmarshalBinary(b []byte) error { - var res ViewStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_stats_in_last_hours.go b/v2/models/view_stats_in_last_hours.go deleted file mode 100644 index 94289aa7..00000000 --- a/v2/models/view_stats_in_last_hours.go +++ /dev/null @@ -1,62 +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" -) - -// ViewStatsInLastHours Specifies the View stats for last hours. -// -// swagger:model ViewStatsInLastHours -type ViewStatsInLastHours struct { - - // Specifies the time range. - LastHours *int64 `json:"lastHours,omitempty"` - - // Specifies the stats value for NFS protocol. - NfsProtocolValue *int64 `json:"nfsProtocolValue,omitempty"` - - // Specifies the stats value for SMB protocol. - SmbProtocolValue *int64 `json:"smbProtocolValue,omitempty"` - - // Specifies the stats value for S3 protocol. - S3ProtocolValue *int64 `json:"s3ProtocolValue,omitempty"` - - // Specifies the stats value for any protocols. - Value *int64 `json:"value,omitempty"` -} - -// Validate validates this view stats in last hours -func (m *ViewStatsInLastHours) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this view stats in last hours based on context it is used -func (m *ViewStatsInLastHours) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsInLastHours) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsInLastHours) UnmarshalBinary(b []byte) error { - var res ViewStatsInLastHours - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_stats_info.go b/v2/models/view_stats_info.go deleted file mode 100644 index d7efa306..00000000 --- a/v2/models/view_stats_info.go +++ /dev/null @@ -1,130 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewStatsInfo Specifies the View stats. -// -// swagger:model ViewStatsInfo -type ViewStatsInfo struct { - - // Specifies the view Id. - ViewID *int64 `json:"viewId,omitempty"` - - // Specifies the view name. - ViewName *string `json:"viewName,omitempty"` - - // Specifies the protocols of this view. - Protocols []string `json:"protocols"` - - // Specifies the list of View stats. - Stats []*ViewStatsInfoDetails `json:"stats"` -} - -// Validate validates this view stats info -func (m *ViewStatsInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsInfo) validateStats(formats strfmt.Registry) error { - if swag.IsZero(m.Stats) { // not required - return nil - } - - for i := 0; i < len(m.Stats); i++ { - if swag.IsZero(m.Stats[i]) { // not required - continue - } - - if m.Stats[i] != nil { - if err := m.Stats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view stats info based on the context it is used -func (m *ViewStatsInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsInfo) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Stats); i++ { - - if m.Stats[i] != nil { - - if swag.IsZero(m.Stats[i]) { // not required - return nil - } - - if err := m.Stats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsInfo) UnmarshalBinary(b []byte) error { - var res ViewStatsInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_stats_info_details.go b/v2/models/view_stats_info_details.go deleted file mode 100644 index f0d904d0..00000000 --- a/v2/models/view_stats_info_details.go +++ /dev/null @@ -1,464 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ViewStatsInfoDetails Specifies the View stats details. -// -// swagger:model ViewStatsInfoDetails -type ViewStatsInfoDetails struct { - - // Specifies the stats metric. - // Enum: ["kNumBytesRead","kNumBytesWritten","kReadIos","kWriteIos","kReadLatencyUsecs","kWriteLatencyUsecs","kNumReadErrors","kNumWriteErrors","kNFSv3MntLatUsecs","kNFSv3MntOps","kNFSv3MntErr","kNFSv3UmntLatUsecs","kNFSv3UmntOps","kNFSv3UmntErr","kNFSv3CreateLatUsecs","kNFSv3CreateOps","kNFSv3CreateErr","kNFSv3RemoveLatUsecs","kNFSv3RemoveOps","kNFSv3RemoveErr","kNFSv3MkdirLatUsecs","kNFSv3MkdirOps","kNFSv3MkdirErr","kNFSv3RmdirLatUsecs","kNFSv3RmdirOps","kNFSv3RmdirErr","kNFSv3LookupLatUsecs","kNFSv3LookupOps","kNFSv3LookupErr","kNFSv3ReaddirLatUsecs","kNFSv3ReaddirOps","kNFSv3ReaddirErr","kNFSv3ReaddirplusLatUsecs","kNFSv3ReaddirplusOps","kNFSv3ReaddirplusErr","kNFSv3SymlinkLatUsecs","kNFSv3SymlinkOps","kNFSv3SymlinkErr","kNFSv3RenameLatUsecs","kNFSv3RenameOps","kNFSv3RenameErr","kSMBSessionSetupLatUsecs","kSMBSessionSetupOps","kSMBSessionSetupErr","kSMBLogoffLatUsecs","kSMBLogoffOps","kSMBLogoffErr","kSMBTreeConnectLatUsecs","kSMBTreeConnectOps","kSMBTreeConnectErr","kSMBTreeDisconnectLatUsecs","kSMBTreeDisconnectOps","kSMBTreeDisconnectErr","kSMBOpenLatUsecs","kSMBOpenOps","kSMBOpenErr","kSMBCloseLatUsecs","kSMBCloseOps","kSMBCloseErr","kSMBCreateFileLatUsecs","kSMBCreateFileOps","kSMBCreateFileErr","kSMBDeleteFileLatUsecs","kSMBDeleteFileOps","kSMBDeleteFileErr","kSMBMkdirLatUsecs","kSMBMkdirOps","kSMBMkdirErr","kSMBRmdirLatUsecs","kSMBRmdirOps","kSMBRmdirErr","kSMBReaddirLatUsecs","kSMBReaddirOps","kSMBReaddirErr","kSMBGetInfoLatUsecs","kSMBGetInfoOps","kSMBGetInfoErr","kSMBSetInfoLatUsecs","kSMBSetInfoOps","kSMBSetInfoErr","kSMBRenameLatUsecs","kSMBRenameOps","kSMBRenameErr","kS3GetLatency","kS3PutLatency","kS3ListLatency","kS3GetIO","kS3PutIO","kS3ListIO","kS3GetSize","kS3PutSize","kS3DeleteLatency","kS3DeleteIO","kS3GetBandwidth","kS3PutBandwidth","kS3GetIOError","kS3PutIOError","kS3DeleteIOError","kS3ListIOError"] - Metric *string `json:"metric,omitempty"` - - // Specifies the stats value in last hours. - ValueInLastHours []*ViewStatsInLastHours `json:"valueInLastHours"` -} - -// Validate validates this view stats info details -func (m *ViewStatsInfoDetails) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetric(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValueInLastHours(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var viewStatsInfoDetailsTypeMetricPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kNumBytesRead","kNumBytesWritten","kReadIos","kWriteIos","kReadLatencyUsecs","kWriteLatencyUsecs","kNumReadErrors","kNumWriteErrors","kNFSv3MntLatUsecs","kNFSv3MntOps","kNFSv3MntErr","kNFSv3UmntLatUsecs","kNFSv3UmntOps","kNFSv3UmntErr","kNFSv3CreateLatUsecs","kNFSv3CreateOps","kNFSv3CreateErr","kNFSv3RemoveLatUsecs","kNFSv3RemoveOps","kNFSv3RemoveErr","kNFSv3MkdirLatUsecs","kNFSv3MkdirOps","kNFSv3MkdirErr","kNFSv3RmdirLatUsecs","kNFSv3RmdirOps","kNFSv3RmdirErr","kNFSv3LookupLatUsecs","kNFSv3LookupOps","kNFSv3LookupErr","kNFSv3ReaddirLatUsecs","kNFSv3ReaddirOps","kNFSv3ReaddirErr","kNFSv3ReaddirplusLatUsecs","kNFSv3ReaddirplusOps","kNFSv3ReaddirplusErr","kNFSv3SymlinkLatUsecs","kNFSv3SymlinkOps","kNFSv3SymlinkErr","kNFSv3RenameLatUsecs","kNFSv3RenameOps","kNFSv3RenameErr","kSMBSessionSetupLatUsecs","kSMBSessionSetupOps","kSMBSessionSetupErr","kSMBLogoffLatUsecs","kSMBLogoffOps","kSMBLogoffErr","kSMBTreeConnectLatUsecs","kSMBTreeConnectOps","kSMBTreeConnectErr","kSMBTreeDisconnectLatUsecs","kSMBTreeDisconnectOps","kSMBTreeDisconnectErr","kSMBOpenLatUsecs","kSMBOpenOps","kSMBOpenErr","kSMBCloseLatUsecs","kSMBCloseOps","kSMBCloseErr","kSMBCreateFileLatUsecs","kSMBCreateFileOps","kSMBCreateFileErr","kSMBDeleteFileLatUsecs","kSMBDeleteFileOps","kSMBDeleteFileErr","kSMBMkdirLatUsecs","kSMBMkdirOps","kSMBMkdirErr","kSMBRmdirLatUsecs","kSMBRmdirOps","kSMBRmdirErr","kSMBReaddirLatUsecs","kSMBReaddirOps","kSMBReaddirErr","kSMBGetInfoLatUsecs","kSMBGetInfoOps","kSMBGetInfoErr","kSMBSetInfoLatUsecs","kSMBSetInfoOps","kSMBSetInfoErr","kSMBRenameLatUsecs","kSMBRenameOps","kSMBRenameErr","kS3GetLatency","kS3PutLatency","kS3ListLatency","kS3GetIO","kS3PutIO","kS3ListIO","kS3GetSize","kS3PutSize","kS3DeleteLatency","kS3DeleteIO","kS3GetBandwidth","kS3PutBandwidth","kS3GetIOError","kS3PutIOError","kS3DeleteIOError","kS3ListIOError"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - viewStatsInfoDetailsTypeMetricPropEnum = append(viewStatsInfoDetailsTypeMetricPropEnum, v) - } -} - -const ( - - // ViewStatsInfoDetailsMetricKNumBytesRead captures enum value "kNumBytesRead" - ViewStatsInfoDetailsMetricKNumBytesRead string = "kNumBytesRead" - - // ViewStatsInfoDetailsMetricKNumBytesWritten captures enum value "kNumBytesWritten" - ViewStatsInfoDetailsMetricKNumBytesWritten string = "kNumBytesWritten" - - // ViewStatsInfoDetailsMetricKReadIos captures enum value "kReadIos" - ViewStatsInfoDetailsMetricKReadIos string = "kReadIos" - - // ViewStatsInfoDetailsMetricKWriteIos captures enum value "kWriteIos" - ViewStatsInfoDetailsMetricKWriteIos string = "kWriteIos" - - // ViewStatsInfoDetailsMetricKReadLatencyUsecs captures enum value "kReadLatencyUsecs" - ViewStatsInfoDetailsMetricKReadLatencyUsecs string = "kReadLatencyUsecs" - - // ViewStatsInfoDetailsMetricKWriteLatencyUsecs captures enum value "kWriteLatencyUsecs" - ViewStatsInfoDetailsMetricKWriteLatencyUsecs string = "kWriteLatencyUsecs" - - // ViewStatsInfoDetailsMetricKNumReadErrors captures enum value "kNumReadErrors" - ViewStatsInfoDetailsMetricKNumReadErrors string = "kNumReadErrors" - - // ViewStatsInfoDetailsMetricKNumWriteErrors captures enum value "kNumWriteErrors" - ViewStatsInfoDetailsMetricKNumWriteErrors string = "kNumWriteErrors" - - // ViewStatsInfoDetailsMetricKNFSv3MntLatUsecs captures enum value "kNFSv3MntLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3MntLatUsecs string = "kNFSv3MntLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3MntOps captures enum value "kNFSv3MntOps" - ViewStatsInfoDetailsMetricKNFSv3MntOps string = "kNFSv3MntOps" - - // ViewStatsInfoDetailsMetricKNFSv3MntErr captures enum value "kNFSv3MntErr" - ViewStatsInfoDetailsMetricKNFSv3MntErr string = "kNFSv3MntErr" - - // ViewStatsInfoDetailsMetricKNFSv3UmntLatUsecs captures enum value "kNFSv3UmntLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3UmntLatUsecs string = "kNFSv3UmntLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3UmntOps captures enum value "kNFSv3UmntOps" - ViewStatsInfoDetailsMetricKNFSv3UmntOps string = "kNFSv3UmntOps" - - // ViewStatsInfoDetailsMetricKNFSv3UmntErr captures enum value "kNFSv3UmntErr" - ViewStatsInfoDetailsMetricKNFSv3UmntErr string = "kNFSv3UmntErr" - - // ViewStatsInfoDetailsMetricKNFSv3CreateLatUsecs captures enum value "kNFSv3CreateLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3CreateLatUsecs string = "kNFSv3CreateLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3CreateOps captures enum value "kNFSv3CreateOps" - ViewStatsInfoDetailsMetricKNFSv3CreateOps string = "kNFSv3CreateOps" - - // ViewStatsInfoDetailsMetricKNFSv3CreateErr captures enum value "kNFSv3CreateErr" - ViewStatsInfoDetailsMetricKNFSv3CreateErr string = "kNFSv3CreateErr" - - // ViewStatsInfoDetailsMetricKNFSv3RemoveLatUsecs captures enum value "kNFSv3RemoveLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3RemoveLatUsecs string = "kNFSv3RemoveLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3RemoveOps captures enum value "kNFSv3RemoveOps" - ViewStatsInfoDetailsMetricKNFSv3RemoveOps string = "kNFSv3RemoveOps" - - // ViewStatsInfoDetailsMetricKNFSv3RemoveErr captures enum value "kNFSv3RemoveErr" - ViewStatsInfoDetailsMetricKNFSv3RemoveErr string = "kNFSv3RemoveErr" - - // ViewStatsInfoDetailsMetricKNFSv3MkdirLatUsecs captures enum value "kNFSv3MkdirLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3MkdirLatUsecs string = "kNFSv3MkdirLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3MkdirOps captures enum value "kNFSv3MkdirOps" - ViewStatsInfoDetailsMetricKNFSv3MkdirOps string = "kNFSv3MkdirOps" - - // ViewStatsInfoDetailsMetricKNFSv3MkdirErr captures enum value "kNFSv3MkdirErr" - ViewStatsInfoDetailsMetricKNFSv3MkdirErr string = "kNFSv3MkdirErr" - - // ViewStatsInfoDetailsMetricKNFSv3RmdirLatUsecs captures enum value "kNFSv3RmdirLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3RmdirLatUsecs string = "kNFSv3RmdirLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3RmdirOps captures enum value "kNFSv3RmdirOps" - ViewStatsInfoDetailsMetricKNFSv3RmdirOps string = "kNFSv3RmdirOps" - - // ViewStatsInfoDetailsMetricKNFSv3RmdirErr captures enum value "kNFSv3RmdirErr" - ViewStatsInfoDetailsMetricKNFSv3RmdirErr string = "kNFSv3RmdirErr" - - // ViewStatsInfoDetailsMetricKNFSv3LookupLatUsecs captures enum value "kNFSv3LookupLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3LookupLatUsecs string = "kNFSv3LookupLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3LookupOps captures enum value "kNFSv3LookupOps" - ViewStatsInfoDetailsMetricKNFSv3LookupOps string = "kNFSv3LookupOps" - - // ViewStatsInfoDetailsMetricKNFSv3LookupErr captures enum value "kNFSv3LookupErr" - ViewStatsInfoDetailsMetricKNFSv3LookupErr string = "kNFSv3LookupErr" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirLatUsecs captures enum value "kNFSv3ReaddirLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3ReaddirLatUsecs string = "kNFSv3ReaddirLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirOps captures enum value "kNFSv3ReaddirOps" - ViewStatsInfoDetailsMetricKNFSv3ReaddirOps string = "kNFSv3ReaddirOps" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirErr captures enum value "kNFSv3ReaddirErr" - ViewStatsInfoDetailsMetricKNFSv3ReaddirErr string = "kNFSv3ReaddirErr" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirplusLatUsecs captures enum value "kNFSv3ReaddirplusLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3ReaddirplusLatUsecs string = "kNFSv3ReaddirplusLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirplusOps captures enum value "kNFSv3ReaddirplusOps" - ViewStatsInfoDetailsMetricKNFSv3ReaddirplusOps string = "kNFSv3ReaddirplusOps" - - // ViewStatsInfoDetailsMetricKNFSv3ReaddirplusErr captures enum value "kNFSv3ReaddirplusErr" - ViewStatsInfoDetailsMetricKNFSv3ReaddirplusErr string = "kNFSv3ReaddirplusErr" - - // ViewStatsInfoDetailsMetricKNFSv3SymlinkLatUsecs captures enum value "kNFSv3SymlinkLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3SymlinkLatUsecs string = "kNFSv3SymlinkLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3SymlinkOps captures enum value "kNFSv3SymlinkOps" - ViewStatsInfoDetailsMetricKNFSv3SymlinkOps string = "kNFSv3SymlinkOps" - - // ViewStatsInfoDetailsMetricKNFSv3SymlinkErr captures enum value "kNFSv3SymlinkErr" - ViewStatsInfoDetailsMetricKNFSv3SymlinkErr string = "kNFSv3SymlinkErr" - - // ViewStatsInfoDetailsMetricKNFSv3RenameLatUsecs captures enum value "kNFSv3RenameLatUsecs" - ViewStatsInfoDetailsMetricKNFSv3RenameLatUsecs string = "kNFSv3RenameLatUsecs" - - // ViewStatsInfoDetailsMetricKNFSv3RenameOps captures enum value "kNFSv3RenameOps" - ViewStatsInfoDetailsMetricKNFSv3RenameOps string = "kNFSv3RenameOps" - - // ViewStatsInfoDetailsMetricKNFSv3RenameErr captures enum value "kNFSv3RenameErr" - ViewStatsInfoDetailsMetricKNFSv3RenameErr string = "kNFSv3RenameErr" - - // ViewStatsInfoDetailsMetricKSMBSessionSetupLatUsecs captures enum value "kSMBSessionSetupLatUsecs" - ViewStatsInfoDetailsMetricKSMBSessionSetupLatUsecs string = "kSMBSessionSetupLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBSessionSetupOps captures enum value "kSMBSessionSetupOps" - ViewStatsInfoDetailsMetricKSMBSessionSetupOps string = "kSMBSessionSetupOps" - - // ViewStatsInfoDetailsMetricKSMBSessionSetupErr captures enum value "kSMBSessionSetupErr" - ViewStatsInfoDetailsMetricKSMBSessionSetupErr string = "kSMBSessionSetupErr" - - // ViewStatsInfoDetailsMetricKSMBLogoffLatUsecs captures enum value "kSMBLogoffLatUsecs" - ViewStatsInfoDetailsMetricKSMBLogoffLatUsecs string = "kSMBLogoffLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBLogoffOps captures enum value "kSMBLogoffOps" - ViewStatsInfoDetailsMetricKSMBLogoffOps string = "kSMBLogoffOps" - - // ViewStatsInfoDetailsMetricKSMBLogoffErr captures enum value "kSMBLogoffErr" - ViewStatsInfoDetailsMetricKSMBLogoffErr string = "kSMBLogoffErr" - - // ViewStatsInfoDetailsMetricKSMBTreeConnectLatUsecs captures enum value "kSMBTreeConnectLatUsecs" - ViewStatsInfoDetailsMetricKSMBTreeConnectLatUsecs string = "kSMBTreeConnectLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBTreeConnectOps captures enum value "kSMBTreeConnectOps" - ViewStatsInfoDetailsMetricKSMBTreeConnectOps string = "kSMBTreeConnectOps" - - // ViewStatsInfoDetailsMetricKSMBTreeConnectErr captures enum value "kSMBTreeConnectErr" - ViewStatsInfoDetailsMetricKSMBTreeConnectErr string = "kSMBTreeConnectErr" - - // ViewStatsInfoDetailsMetricKSMBTreeDisconnectLatUsecs captures enum value "kSMBTreeDisconnectLatUsecs" - ViewStatsInfoDetailsMetricKSMBTreeDisconnectLatUsecs string = "kSMBTreeDisconnectLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBTreeDisconnectOps captures enum value "kSMBTreeDisconnectOps" - ViewStatsInfoDetailsMetricKSMBTreeDisconnectOps string = "kSMBTreeDisconnectOps" - - // ViewStatsInfoDetailsMetricKSMBTreeDisconnectErr captures enum value "kSMBTreeDisconnectErr" - ViewStatsInfoDetailsMetricKSMBTreeDisconnectErr string = "kSMBTreeDisconnectErr" - - // ViewStatsInfoDetailsMetricKSMBOpenLatUsecs captures enum value "kSMBOpenLatUsecs" - ViewStatsInfoDetailsMetricKSMBOpenLatUsecs string = "kSMBOpenLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBOpenOps captures enum value "kSMBOpenOps" - ViewStatsInfoDetailsMetricKSMBOpenOps string = "kSMBOpenOps" - - // ViewStatsInfoDetailsMetricKSMBOpenErr captures enum value "kSMBOpenErr" - ViewStatsInfoDetailsMetricKSMBOpenErr string = "kSMBOpenErr" - - // ViewStatsInfoDetailsMetricKSMBCloseLatUsecs captures enum value "kSMBCloseLatUsecs" - ViewStatsInfoDetailsMetricKSMBCloseLatUsecs string = "kSMBCloseLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBCloseOps captures enum value "kSMBCloseOps" - ViewStatsInfoDetailsMetricKSMBCloseOps string = "kSMBCloseOps" - - // ViewStatsInfoDetailsMetricKSMBCloseErr captures enum value "kSMBCloseErr" - ViewStatsInfoDetailsMetricKSMBCloseErr string = "kSMBCloseErr" - - // ViewStatsInfoDetailsMetricKSMBCreateFileLatUsecs captures enum value "kSMBCreateFileLatUsecs" - ViewStatsInfoDetailsMetricKSMBCreateFileLatUsecs string = "kSMBCreateFileLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBCreateFileOps captures enum value "kSMBCreateFileOps" - ViewStatsInfoDetailsMetricKSMBCreateFileOps string = "kSMBCreateFileOps" - - // ViewStatsInfoDetailsMetricKSMBCreateFileErr captures enum value "kSMBCreateFileErr" - ViewStatsInfoDetailsMetricKSMBCreateFileErr string = "kSMBCreateFileErr" - - // ViewStatsInfoDetailsMetricKSMBDeleteFileLatUsecs captures enum value "kSMBDeleteFileLatUsecs" - ViewStatsInfoDetailsMetricKSMBDeleteFileLatUsecs string = "kSMBDeleteFileLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBDeleteFileOps captures enum value "kSMBDeleteFileOps" - ViewStatsInfoDetailsMetricKSMBDeleteFileOps string = "kSMBDeleteFileOps" - - // ViewStatsInfoDetailsMetricKSMBDeleteFileErr captures enum value "kSMBDeleteFileErr" - ViewStatsInfoDetailsMetricKSMBDeleteFileErr string = "kSMBDeleteFileErr" - - // ViewStatsInfoDetailsMetricKSMBMkdirLatUsecs captures enum value "kSMBMkdirLatUsecs" - ViewStatsInfoDetailsMetricKSMBMkdirLatUsecs string = "kSMBMkdirLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBMkdirOps captures enum value "kSMBMkdirOps" - ViewStatsInfoDetailsMetricKSMBMkdirOps string = "kSMBMkdirOps" - - // ViewStatsInfoDetailsMetricKSMBMkdirErr captures enum value "kSMBMkdirErr" - ViewStatsInfoDetailsMetricKSMBMkdirErr string = "kSMBMkdirErr" - - // ViewStatsInfoDetailsMetricKSMBRmdirLatUsecs captures enum value "kSMBRmdirLatUsecs" - ViewStatsInfoDetailsMetricKSMBRmdirLatUsecs string = "kSMBRmdirLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBRmdirOps captures enum value "kSMBRmdirOps" - ViewStatsInfoDetailsMetricKSMBRmdirOps string = "kSMBRmdirOps" - - // ViewStatsInfoDetailsMetricKSMBRmdirErr captures enum value "kSMBRmdirErr" - ViewStatsInfoDetailsMetricKSMBRmdirErr string = "kSMBRmdirErr" - - // ViewStatsInfoDetailsMetricKSMBReaddirLatUsecs captures enum value "kSMBReaddirLatUsecs" - ViewStatsInfoDetailsMetricKSMBReaddirLatUsecs string = "kSMBReaddirLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBReaddirOps captures enum value "kSMBReaddirOps" - ViewStatsInfoDetailsMetricKSMBReaddirOps string = "kSMBReaddirOps" - - // ViewStatsInfoDetailsMetricKSMBReaddirErr captures enum value "kSMBReaddirErr" - ViewStatsInfoDetailsMetricKSMBReaddirErr string = "kSMBReaddirErr" - - // ViewStatsInfoDetailsMetricKSMBGetInfoLatUsecs captures enum value "kSMBGetInfoLatUsecs" - ViewStatsInfoDetailsMetricKSMBGetInfoLatUsecs string = "kSMBGetInfoLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBGetInfoOps captures enum value "kSMBGetInfoOps" - ViewStatsInfoDetailsMetricKSMBGetInfoOps string = "kSMBGetInfoOps" - - // ViewStatsInfoDetailsMetricKSMBGetInfoErr captures enum value "kSMBGetInfoErr" - ViewStatsInfoDetailsMetricKSMBGetInfoErr string = "kSMBGetInfoErr" - - // ViewStatsInfoDetailsMetricKSMBSetInfoLatUsecs captures enum value "kSMBSetInfoLatUsecs" - ViewStatsInfoDetailsMetricKSMBSetInfoLatUsecs string = "kSMBSetInfoLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBSetInfoOps captures enum value "kSMBSetInfoOps" - ViewStatsInfoDetailsMetricKSMBSetInfoOps string = "kSMBSetInfoOps" - - // ViewStatsInfoDetailsMetricKSMBSetInfoErr captures enum value "kSMBSetInfoErr" - ViewStatsInfoDetailsMetricKSMBSetInfoErr string = "kSMBSetInfoErr" - - // ViewStatsInfoDetailsMetricKSMBRenameLatUsecs captures enum value "kSMBRenameLatUsecs" - ViewStatsInfoDetailsMetricKSMBRenameLatUsecs string = "kSMBRenameLatUsecs" - - // ViewStatsInfoDetailsMetricKSMBRenameOps captures enum value "kSMBRenameOps" - ViewStatsInfoDetailsMetricKSMBRenameOps string = "kSMBRenameOps" - - // ViewStatsInfoDetailsMetricKSMBRenameErr captures enum value "kSMBRenameErr" - ViewStatsInfoDetailsMetricKSMBRenameErr string = "kSMBRenameErr" - - // ViewStatsInfoDetailsMetricKS3GetLatency captures enum value "kS3GetLatency" - ViewStatsInfoDetailsMetricKS3GetLatency string = "kS3GetLatency" - - // ViewStatsInfoDetailsMetricKS3PutLatency captures enum value "kS3PutLatency" - ViewStatsInfoDetailsMetricKS3PutLatency string = "kS3PutLatency" - - // ViewStatsInfoDetailsMetricKS3ListLatency captures enum value "kS3ListLatency" - ViewStatsInfoDetailsMetricKS3ListLatency string = "kS3ListLatency" - - // ViewStatsInfoDetailsMetricKS3GetIO captures enum value "kS3GetIO" - ViewStatsInfoDetailsMetricKS3GetIO string = "kS3GetIO" - - // ViewStatsInfoDetailsMetricKS3PutIO captures enum value "kS3PutIO" - ViewStatsInfoDetailsMetricKS3PutIO string = "kS3PutIO" - - // ViewStatsInfoDetailsMetricKS3ListIO captures enum value "kS3ListIO" - ViewStatsInfoDetailsMetricKS3ListIO string = "kS3ListIO" - - // ViewStatsInfoDetailsMetricKS3GetSize captures enum value "kS3GetSize" - ViewStatsInfoDetailsMetricKS3GetSize string = "kS3GetSize" - - // ViewStatsInfoDetailsMetricKS3PutSize captures enum value "kS3PutSize" - ViewStatsInfoDetailsMetricKS3PutSize string = "kS3PutSize" - - // ViewStatsInfoDetailsMetricKS3DeleteLatency captures enum value "kS3DeleteLatency" - ViewStatsInfoDetailsMetricKS3DeleteLatency string = "kS3DeleteLatency" - - // ViewStatsInfoDetailsMetricKS3DeleteIO captures enum value "kS3DeleteIO" - ViewStatsInfoDetailsMetricKS3DeleteIO string = "kS3DeleteIO" - - // ViewStatsInfoDetailsMetricKS3GetBandwidth captures enum value "kS3GetBandwidth" - ViewStatsInfoDetailsMetricKS3GetBandwidth string = "kS3GetBandwidth" - - // ViewStatsInfoDetailsMetricKS3PutBandwidth captures enum value "kS3PutBandwidth" - ViewStatsInfoDetailsMetricKS3PutBandwidth string = "kS3PutBandwidth" - - // ViewStatsInfoDetailsMetricKS3GetIOError captures enum value "kS3GetIOError" - ViewStatsInfoDetailsMetricKS3GetIOError string = "kS3GetIOError" - - // ViewStatsInfoDetailsMetricKS3PutIOError captures enum value "kS3PutIOError" - ViewStatsInfoDetailsMetricKS3PutIOError string = "kS3PutIOError" - - // ViewStatsInfoDetailsMetricKS3DeleteIOError captures enum value "kS3DeleteIOError" - ViewStatsInfoDetailsMetricKS3DeleteIOError string = "kS3DeleteIOError" - - // ViewStatsInfoDetailsMetricKS3ListIOError captures enum value "kS3ListIOError" - ViewStatsInfoDetailsMetricKS3ListIOError string = "kS3ListIOError" -) - -// prop value enum -func (m *ViewStatsInfoDetails) validateMetricEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, viewStatsInfoDetailsTypeMetricPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ViewStatsInfoDetails) validateMetric(formats strfmt.Registry) error { - if swag.IsZero(m.Metric) { // not required - return nil - } - - // value enum - if err := m.validateMetricEnum("metric", "body", *m.Metric); err != nil { - return err - } - - return nil -} - -func (m *ViewStatsInfoDetails) validateValueInLastHours(formats strfmt.Registry) error { - if swag.IsZero(m.ValueInLastHours) { // not required - return nil - } - - for i := 0; i < len(m.ValueInLastHours); i++ { - if swag.IsZero(m.ValueInLastHours[i]) { // not required - continue - } - - if m.ValueInLastHours[i] != nil { - if err := m.ValueInLastHours[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this view stats info details based on the context it is used -func (m *ViewStatsInfoDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateValueInLastHours(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewStatsInfoDetails) contextValidateValueInLastHours(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ValueInLastHours); i++ { - - if m.ValueInLastHours[i] != nil { - - if swag.IsZero(m.ValueInLastHours[i]) { // not required - return nil - } - - if err := m.ValueInLastHours[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valueInLastHours" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewStatsInfoDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewStatsInfoDetails) UnmarshalBinary(b []byte) error { - var res ViewStatsInfoDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_user_quota_settings.go b/v2/models/view_user_quota_settings.go deleted file mode 100644 index 14968cee..00000000 --- a/v2/models/view_user_quota_settings.go +++ /dev/null @@ -1,127 +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" -) - -// ViewUserQuotaSettings Specifies the user quota config on the View. -// -// swagger:model ViewUserQuotaSettings -type ViewUserQuotaSettings struct { - - // Specifies whether user quota is enabled for the View. - // Required: true - Enabled *bool `json:"enabled"` - - // Specifies the default user quota policy of the View. - DefaultQuotaPolicy *QuotaPolicy `json:"defaultQuotaPolicy,omitempty"` -} - -// Validate validates this view user quota settings -func (m *ViewUserQuotaSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnabled(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDefaultQuotaPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotaSettings) validateEnabled(formats strfmt.Registry) error { - - if err := validate.Required("enabled", "body", m.Enabled); err != nil { - return err - } - - return nil -} - -func (m *ViewUserQuotaSettings) validateDefaultQuotaPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultQuotaPolicy) { // not required - return nil - } - - if m.DefaultQuotaPolicy != nil { - if err := m.DefaultQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultQuotaPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this view user quota settings based on the context it is used -func (m *ViewUserQuotaSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDefaultQuotaPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewUserQuotaSettings) contextValidateDefaultQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.DefaultQuotaPolicy != nil { - - if swag.IsZero(m.DefaultQuotaPolicy) { // not required - return nil - } - - if err := m.DefaultQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultQuotaPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewUserQuotaSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewUserQuotaSettings) UnmarshalBinary(b []byte) error { - var res ViewUserQuotaSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/view_user_quotas.go b/v2/models/view_user_quotas.go deleted file mode 100644 index 81ea0d8f..00000000 --- a/v2/models/view_user_quotas.go +++ /dev/null @@ -1,116 +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" -) - -// ViewUserQuotas Specifies the default logical user quota on the View along with the list of logical quota overrides for each user. -// -// swagger:model ViewUserQuotas -type ViewUserQuotas struct { - ViewUserQuotaSettings - - UserQuotaOverrides -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewUserQuotas) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ViewUserQuotaSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ViewUserQuotaSettings = aO0 - - // AO1 - var aO1 UserQuotaOverrides - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.UserQuotaOverrides = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewUserQuotas) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.ViewUserQuotaSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.UserQuotaOverrides) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view user quotas -func (m *ViewUserQuotas) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ViewUserQuotaSettings - if err := m.ViewUserQuotaSettings.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with UserQuotaOverrides - if err := m.UserQuotaOverrides.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view user quotas based on the context it is used -func (m *ViewUserQuotas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ViewUserQuotaSettings - if err := m.ViewUserQuotaSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with UserQuotaOverrides - if err := m.UserQuotaOverrides.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewUserQuotas) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewUserQuotas) UnmarshalBinary(b []byte) error { - var res ViewUserQuotas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/views_global_settings.go b/v2/models/views_global_settings.go deleted file mode 100644 index 49503ad8..00000000 --- a/v2/models/views_global_settings.go +++ /dev/null @@ -1,62 +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" -) - -// ViewsGlobalSettings Specifies the Global Settings for SmartFiles. -// -// swagger:model ViewsGlobalSettings -type ViewsGlobalSettings struct { - - // Specifies if SMB Authentication should be enabled. - EnableSmbAuth *bool `json:"enableSmbAuth,omitempty"` - - // Specifies if SMB Multi-Channel should be enabled. - EnableSmbMultiChannel *bool `json:"enableSmbMultiChannel,omitempty"` - - // Specifies the visibility of Remote Cohesity Views for external clients. - EnableRemoteViewsVisibility *bool `json:"enableRemoteViewsVisibility,omitempty"` - - // Specifies the visibility of Remote Cohesity Views on Cohesity GUI. - EnableRemoteViewsGuiVisibility *bool `json:"enableRemoteViewsGuiVisibility,omitempty"` - - // Specifies the list of domain names for S3 Virtual Hosted Style Paths. If set, all the Cohesity S3 Views in the cluster can be accessed using any of the specified domain names. - S3VirtualHostedDomainNames []string `json:"s3VirtualHostedDomainNames"` -} - -// Validate validates this views global settings -func (m *ViewsGlobalSettings) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this views global settings based on context it is used -func (m *ViewsGlobalSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewsGlobalSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewsGlobalSettings) UnmarshalBinary(b []byte) error { - var res ViewsGlobalSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/views_stats.go b/v2/models/views_stats.go deleted file mode 100644 index 602d8b6e..00000000 --- a/v2/models/views_stats.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewsStats Specifies a list of View stats. -// -// swagger:model ViewsStats -type ViewsStats struct { - - // Specifies a list of View stats. - ViewsStats []*ViewStatsInfo `json:"viewsStats"` -} - -// Validate validates this views stats -func (m *ViewsStats) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateViewsStats(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewsStats) validateViewsStats(formats strfmt.Registry) error { - if swag.IsZero(m.ViewsStats) { // not required - return nil - } - - for i := 0; i < len(m.ViewsStats); i++ { - if swag.IsZero(m.ViewsStats[i]) { // not required - continue - } - - if m.ViewsStats[i] != nil { - if err := m.ViewsStats[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewsStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewsStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this views stats based on the context it is used -func (m *ViewsStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateViewsStats(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ViewsStats) contextValidateViewsStats(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ViewsStats); i++ { - - if m.ViewsStats[i] != nil { - - if swag.IsZero(m.ViewsStats[i]) { // not required - return nil - } - - if err := m.ViewsStats[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewsStats" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewsStats" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ViewsStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewsStats) UnmarshalBinary(b []byte) error { - var res ViewsStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/views_summary.go b/v2/models/views_summary.go deleted file mode 100644 index 48946582..00000000 --- a/v2/models/views_summary.go +++ /dev/null @@ -1,122 +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" -) - -// ViewsSummary Get the summary of the Views. -// -// swagger:model ViewsSummary -type ViewsSummary struct { - - // Specifies the number of all the views. - TotalViews *int64 `json:"totalViews,omitempty"` - - // Specifies the number of all protected views. - ProtectedViews *int64 `json:"protectedViews,omitempty"` - - // Specifies the number of all the views that are replicated out to remote clusters. - ReplicatedOutViews *int64 `json:"replicatedOutViews,omitempty"` - - // Specifies the number of all the views that are replicated from remote clusters. - ReplicatedInViews *int64 `json:"replicatedInViews,omitempty"` - - // Specifies the logical usage of all the views in bytes. - LogicalUsageBytes *int64 `json:"logicalUsageBytes,omitempty"` - - // Specifies the timestamp in micro seconds when 'logicalUsageBytes' was calculated. - LogicalUsageBytesTimestampUsec *int64 `json:"logicalUsageBytesTimestampUsec,omitempty"` - - // Specifies the logical usage of all the views in bytes at a specific time. - LogicalUsageBytesPrev *int64 `json:"logicalUsageBytesPrev,omitempty"` - - // Specifies the timestamp in micro seconds when 'logicalUsageBytesPrev' was calculated. - LogicalUsageBytesPrevTimestampUsec *int64 `json:"logicalUsageBytesPrevTimestampUsec,omitempty"` - - // Specifies the storage consumed of all the views in bytes. - StorageConsumedBytes *int64 `json:"storageConsumedBytes,omitempty"` - - // Specifies the timestamp in micro seconds when 'storageConsumedBytes' was calculated. - StorageConsumedBytesTimestampUsec *int64 `json:"storageConsumedBytesTimestampUsec,omitempty"` - - // Specifies the storage consumed by all the views in bytes at a specific time. - StorageConsumedBytesPrev *int64 `json:"storageConsumedBytesPrev,omitempty"` - - // Specifies the timestamp in micro seconds when 'storageConsumedBytesPrev' was calculated. - StorageConsumedBytesPrevTimestampUsec *int64 `json:"storageConsumedBytesPrevTimestampUsec,omitempty"` - - // Specifies the number of files. - NumFiles *int64 `json:"numFiles,omitempty"` - - // Specifies the number of files at a specific time. - NumFilesPrev *int64 `json:"numFilesPrev,omitempty"` - - // Specifies the number of directories. - NumDirectories *int64 `json:"numDirectories,omitempty"` - - // Specifies the number of directories at a specific time. - NumDirectoriesPrev *int64 `json:"numDirectoriesPrev,omitempty"` - - // Specifies the entity id of all the views. - ViewEntityID *string `json:"viewEntityId,omitempty"` - - // Specifies the data written to all the views in bytes. - DataWrittenBytes *int64 `json:"dataWrittenBytes,omitempty"` - - // Specifies the timestamp in micro seconds when 'dataWrittenBytes' was calculated. - DataWrittenBytesTimestampUsec *int64 `json:"dataWrittenBytesTimestampUsec,omitempty"` - - // Specifies the data written to all the views in bytes at a specific time. - DataWrittenBytesPrev *int64 `json:"dataWrittenBytesPrev,omitempty"` - - // Specifies the timestamp in micro seconds when 'dataWrittenBytesPrev' was calculated. - DataWrittenBytesPrevTimestampUsec *int64 `json:"dataWrittenBytesPrevTimestampUsec,omitempty"` - - // Specifies the size of the data that has been replicated to other nodes as per RF or Erasure Coding policy. - LocalTierResiliencyImpactBytes *int64 `json:"localTierResiliencyImpactBytes,omitempty"` - - // Specifies the timestamp in micro seconds when 'localTierResiliencyImpactBytes' was calculated. - LocalTierResiliencyImpactBytesTimestampUsec *int64 `json:"localTierResiliencyImpactBytesTimestampUsec,omitempty"` - - // Specifies the size of the data that has been replicated to other nodes as per RF or Erasure Coding policy at a specific time. - LocalTierResiliencyImpactBytesPrev *int64 `json:"localTierResiliencyImpactBytesPrev,omitempty"` - - // Specifies the timestamp in micro seconds when 'localTierResiliencyImpactBytesPrev' was calculated. - LocalTierResiliencyImpactBytesPrevTimestampUsec *int64 `json:"localTierResiliencyImpactBytesPrevTimestampUsec,omitempty"` -} - -// Validate validates this views summary -func (m *ViewsSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this views summary based on context it is used -func (m *ViewsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ViewsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewsSummary) UnmarshalBinary(b []byte) error { - var res ViewsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vlan_params.go b/v2/models/vlan_params.go deleted file mode 100644 index 282d006a..00000000 --- a/v2/models/vlan_params.go +++ /dev/null @@ -1,58 +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" -) - -// VlanParams Vlan Params for backup/restore operation. -// -// Specifies VLAN params associated with the backup/restore operation. -// -// swagger:model VlanParams -type VlanParams struct { - - // If this is set, then the Cohesity host name or the IP address associated with this VLAN is used for mounting Cohesity's view on the remote host. - VlanID *int32 `json:"vlanId,omitempty"` - - // If this is set to true, then even if VLANs are configured on the system, the partition VIPs will be used for the restore. - DisableVlan *bool `json:"disableVlan,omitempty"` - - // Interface group to use for backup/restore. If this is not specified, primary interface group for the cluster will be used. - InterfaceName *string `json:"interfaceName,omitempty"` -} - -// Validate validates this vlan params -func (m *VlanParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vlan params based on context it is used -func (m *VlanParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VlanParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanParams) UnmarshalBinary(b []byte) error { - var res VlanParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vm_filter.go b/v2/models/vm_filter.go deleted file mode 100644 index 6edfe099..00000000 --- a/v2/models/vm_filter.go +++ /dev/null @@ -1,117 +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" -) - -// VMFilter Specifies the VM filter details. -// -// swagger:model VMFilter -type VMFilter struct { - Filter - - // Specifies whether the provided filter string is case sensitive or not. This needs to be explicitly set to true if user is trying to filter by case sensitive expressions. The default value is assumed to be false. - CaseSensitive *bool `json:"caseSensitive,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VMFilter) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Filter - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Filter = aO0 - - // AO1 - var dataAO1 struct { - CaseSensitive *bool `json:"caseSensitive,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CaseSensitive = dataAO1.CaseSensitive - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VMFilter) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.Filter) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CaseSensitive *bool `json:"caseSensitive,omitempty"` - } - - dataAO1.CaseSensitive = m.CaseSensitive - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this VM filter -func (m *VMFilter) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Filter - if err := m.Filter.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this VM filter based on the context it is used -func (m *VMFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Filter - if err := m.Filter.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VMFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMFilter) UnmarshalBinary(b []byte) error { - var res VMFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vm_ware_c_d_p_filter_params.go b/v2/models/vm_ware_c_d_p_filter_params.go deleted file mode 100644 index d30cdf23..00000000 --- a/v2/models/vm_ware_c_d_p_filter_params.go +++ /dev/null @@ -1,71 +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" -) - -// VMWareCDPFilterParams Specifies the parameters to download VMware CDP IO filter. -// -// swagger:model VMWareCDPFilterParams -type VMWareCDPFilterParams struct { - - // Specifies the version of the ESXi host where filter needs to be installed. - // Required: true - EsxiVersion *string `json:"esxiVersion"` -} - -// Validate validates this VM ware c d p filter params -func (m *VMWareCDPFilterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEsxiVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VMWareCDPFilterParams) validateEsxiVersion(formats strfmt.Registry) error { - - if err := validate.Required("esxiVersion", "body", m.EsxiVersion); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this VM ware c d p filter params based on context it is used -func (m *VMWareCDPFilterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VMWareCDPFilterParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VMWareCDPFilterParams) UnmarshalBinary(b []byte) error { - var res VMWareCDPFilterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_additional_params.go b/v2/models/vmware_additional_params.go deleted file mode 100644 index 36e5aa61..00000000 --- a/v2/models/vmware_additional_params.go +++ /dev/null @@ -1,111 +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" -) - -// VmwareAdditionalParams VMware Additional Params. -// -// Additional params for VMware protection source. -// -// swagger:model VmwareAdditionalParams -type VmwareAdditionalParams struct { - - // Specifies the VCD additional params. - VcdParams *VcdAdditionalParams `json:"vcdParams,omitempty"` -} - -// Validate validates this vmware additional params -func (m *VmwareAdditionalParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVcdParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareAdditionalParams) validateVcdParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if m.VcdParams != nil { - if err := m.VcdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware additional params based on the context it is used -func (m *VmwareAdditionalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVcdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareAdditionalParams) contextValidateVcdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdParams != nil { - - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if err := m.VcdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareAdditionalParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareAdditionalParams) UnmarshalBinary(b []byte) error { - var res VmwareAdditionalParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_cdp_object.go b/v2/models/vmware_cdp_object.go deleted file mode 100644 index 9458ca87..00000000 --- a/v2/models/vmware_cdp_object.go +++ /dev/null @@ -1,191 +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" -) - -// VmwareCdpObject Specifies the VMware specific CDP object details. -// -// swagger:model VmwareCdpObject -type VmwareCdpObject struct { - CdpObjectInfo - - // Specifies the state of CDP IO filter. CDP IO filter is an agent which will be installed on the object for performing continuous backup.
1. 'kNotInstalled' specifies that CDP is enabled on this object but filter is not installed.
2. 'kInstallFilterInProgress' specifies that IO filter installation is triggered and in progress.
3. 'kFilterInstalledIOInactive' specifies that IO filter is installed but IO streaming is disabled due to missing backup or explicitly disabled by the user.
4. 'kIOActivationInProgress' specifies that IO filter is activated to start streaming.
5. 'kIOActive' specifies that filter is attached to the object and started streaming.
6. 'kIODeactivationInProgress' specifies that deactivation has been initiated to stop the IO streaming.
7. 'kUninstallFilterInProgress' specifies that uninstallation of IO filter is in progress. - // Enum: ["NotInstalled","InstallFilterInProgress","FilterInstalledIOInactive","FilterInstalled","IOInactive","IOActivationInProgress","IOActive","IODeactivationInProgress","UninstallFilterInProgress","UpgradeFilterInProgress","UpgradeFilterFailed","WaitingForCDPPolicyAttach"] - IoFilterStatus *string `json:"ioFilterStatus,omitempty"` - - // Specifies the error message related to IO filter if there is any. - IoFilterErrorMessage *string `json:"ioFilterErrorMessage,omitempty"` - - // Specifies the error message from the cdp pre-processing stage if any. - PreProcessingErrorMessage *string `json:"preProcessingErrorMessage,omitempty"` - - // Specifies the error message from the guardrails info from cdp state if any. - GuardrailsErrorMessage *string `json:"guardrailsErrorMessage,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareCdpObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CdpObjectInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CdpObjectInfo = aO0 - - // AO1 - var dataAO1 struct { - IoFilterStatus *string `json:"ioFilterStatus,omitempty"` - - IoFilterErrorMessage *string `json:"ioFilterErrorMessage,omitempty"` - - PreProcessingErrorMessage *string `json:"preProcessingErrorMessage,omitempty"` - - GuardrailsErrorMessage *string `json:"guardrailsErrorMessage,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.IoFilterStatus = dataAO1.IoFilterStatus - - m.IoFilterErrorMessage = dataAO1.IoFilterErrorMessage - - m.PreProcessingErrorMessage = dataAO1.PreProcessingErrorMessage - - m.GuardrailsErrorMessage = dataAO1.GuardrailsErrorMessage - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareCdpObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CdpObjectInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - IoFilterStatus *string `json:"ioFilterStatus,omitempty"` - - IoFilterErrorMessage *string `json:"ioFilterErrorMessage,omitempty"` - - PreProcessingErrorMessage *string `json:"preProcessingErrorMessage,omitempty"` - - GuardrailsErrorMessage *string `json:"guardrailsErrorMessage,omitempty"` - } - - dataAO1.IoFilterStatus = m.IoFilterStatus - - dataAO1.IoFilterErrorMessage = m.IoFilterErrorMessage - - dataAO1.PreProcessingErrorMessage = m.PreProcessingErrorMessage - - dataAO1.GuardrailsErrorMessage = m.GuardrailsErrorMessage - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware cdp object -func (m *VmwareCdpObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CdpObjectInfo - if err := m.CdpObjectInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIoFilterStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareCdpObjectTypeIoFilterStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NotInstalled","InstallFilterInProgress","FilterInstalledIOInactive","FilterInstalled","IOInactive","IOActivationInProgress","IOActive","IODeactivationInProgress","UninstallFilterInProgress","UpgradeFilterInProgress","UpgradeFilterFailed","WaitingForCDPPolicyAttach"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareCdpObjectTypeIoFilterStatusPropEnum = append(vmwareCdpObjectTypeIoFilterStatusPropEnum, v) - } -} - -// property enum -func (m *VmwareCdpObject) validateIoFilterStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareCdpObjectTypeIoFilterStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareCdpObject) validateIoFilterStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.IoFilterStatus) { // not required - return nil - } - - // value enum - if err := m.validateIoFilterStatusEnum("ioFilterStatus", "body", *m.IoFilterStatus); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vmware cdp object based on the context it is used -func (m *VmwareCdpObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CdpObjectInfo - if err := m.CdpObjectInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareCdpObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareCdpObject) UnmarshalBinary(b []byte) error { - var res VmwareCdpObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_connection_params.go b/v2/models/vmware_connection_params.go deleted file mode 100644 index 3612749c..00000000 --- a/v2/models/vmware_connection_params.go +++ /dev/null @@ -1,168 +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" -) - -// VmwareConnectionParams Parameters to connect and query VMware config file. -// -// Specifies the parameters to connect to a seed node and fetch information from its config file. -// -// swagger:model VmwareConnectionParams -type VmwareConnectionParams struct { - - // Specifies the VMware Source type. - // Required: true - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector"] - Type *string `json:"type"` - - // Specifies the parameters to register a VCD. - VcdParams *VcdConnectionParams `json:"vcdParams,omitempty"` -} - -// Validate validates this vmware connection params -func (m *VmwareConnectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareConnectionParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareConnectionParamsTypeTypePropEnum = append(vmwareConnectionParamsTypeTypePropEnum, v) - } -} - -const ( - - // VmwareConnectionParamsTypeKVCenter captures enum value "kVCenter" - VmwareConnectionParamsTypeKVCenter string = "kVCenter" - - // VmwareConnectionParamsTypeKStandaloneHost captures enum value "kStandaloneHost" - VmwareConnectionParamsTypeKStandaloneHost string = "kStandaloneHost" - - // VmwareConnectionParamsTypeKvCloudDirector captures enum value "kvCloudDirector" - VmwareConnectionParamsTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *VmwareConnectionParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareConnectionParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareConnectionParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *VmwareConnectionParams) validateVcdParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if m.VcdParams != nil { - if err := m.VcdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware connection params based on the context it is used -func (m *VmwareConnectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVcdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareConnectionParams) contextValidateVcdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdParams != nil { - - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if err := m.VcdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareConnectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareConnectionParams) UnmarshalBinary(b []byte) error { - var res VmwareConnectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_disk_controller_type.go b/v2/models/vmware_disk_controller_type.go deleted file mode 100644 index 9838eb4c..00000000 --- a/v2/models/vmware_disk_controller_type.go +++ /dev/null @@ -1,110 +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" -) - -// VmwareDiskControllerType VMware disk controller type. -// -// Vmware disk controller type. -// -// swagger:model VmwareDiskControllerType -type VmwareDiskControllerType struct { - - // Specifies VMware disk controller type. - // Enum: ["kScsi","kIde","kSata"] - VmwareDiskControllerType string `json:"vmwareDiskControllerType,omitempty"` -} - -// Validate validates this vmware disk controller type -func (m *VmwareDiskControllerType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVmwareDiskControllerType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareDiskControllerTypeTypeVmwareDiskControllerTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kScsi","kIde","kSata"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareDiskControllerTypeTypeVmwareDiskControllerTypePropEnum = append(vmwareDiskControllerTypeTypeVmwareDiskControllerTypePropEnum, v) - } -} - -const ( - - // VmwareDiskControllerTypeVmwareDiskControllerTypeKScsi captures enum value "kScsi" - VmwareDiskControllerTypeVmwareDiskControllerTypeKScsi string = "kScsi" - - // VmwareDiskControllerTypeVmwareDiskControllerTypeKIde captures enum value "kIde" - VmwareDiskControllerTypeVmwareDiskControllerTypeKIde string = "kIde" - - // VmwareDiskControllerTypeVmwareDiskControllerTypeKSata captures enum value "kSata" - VmwareDiskControllerTypeVmwareDiskControllerTypeKSata string = "kSata" -) - -// prop value enum -func (m *VmwareDiskControllerType) validateVmwareDiskControllerTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareDiskControllerTypeTypeVmwareDiskControllerTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareDiskControllerType) validateVmwareDiskControllerType(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareDiskControllerType) { // not required - return nil - } - - // value enum - if err := m.validateVmwareDiskControllerTypeEnum("vmwareDiskControllerType", "body", m.VmwareDiskControllerType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vmware disk controller type based on context it is used -func (m *VmwareDiskControllerType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareDiskControllerType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareDiskControllerType) UnmarshalBinary(b []byte) error { - var res VmwareDiskControllerType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_disk_provision_type.go b/v2/models/vmware_disk_provision_type.go deleted file mode 100644 index 70df7b50..00000000 --- a/v2/models/vmware_disk_provision_type.go +++ /dev/null @@ -1,116 +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" -) - -// VmwareDiskProvisionType Vmware Disk provisioning policies. -// -// Specifies the Virtual Disk Provisioning Policies for Vmware VM. -// -// swagger:model VmwareDiskProvisionType -type VmwareDiskProvisionType struct { - - // Specifies the Virtual Disk Provisioning Policies for Vmware VM. - // Enum: ["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"] - Value string `json:"value,omitempty"` -} - -// Validate validates this vmware disk provision type -func (m *VmwareDiskProvisionType) 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 vmwareDiskProvisionTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareDiskProvisionTypeTypeValuePropEnum = append(vmwareDiskProvisionTypeTypeValuePropEnum, v) - } -} - -const ( - - // VmwareDiskProvisionTypeValueKThickLazyZeroed captures enum value "kThickLazyZeroed" - VmwareDiskProvisionTypeValueKThickLazyZeroed string = "kThickLazyZeroed" - - // VmwareDiskProvisionTypeValueKThickEagerZero captures enum value "kThickEagerZero" - VmwareDiskProvisionTypeValueKThickEagerZero string = "kThickEagerZero" - - // VmwareDiskProvisionTypeValueKThin captures enum value "kThin" - VmwareDiskProvisionTypeValueKThin string = "kThin" - - // VmwareDiskProvisionTypeValueKBackedUpDiskType captures enum value "kBackedUpDiskType" - VmwareDiskProvisionTypeValueKBackedUpDiskType string = "kBackedUpDiskType" - - // VmwareDiskProvisionTypeValueOriginalBackUpDisk captures enum value "originalBackUpDisk" - VmwareDiskProvisionTypeValueOriginalBackUpDisk string = "originalBackUpDisk" -) - -// prop value enum -func (m *VmwareDiskProvisionType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareDiskProvisionTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareDiskProvisionType) 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 vmware disk provision type based on context it is used -func (m *VmwareDiskProvisionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareDiskProvisionType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareDiskProvisionType) UnmarshalBinary(b []byte) error { - var res VmwareDiskProvisionType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_action.go b/v2/models/vmware_object_action.go deleted file mode 100644 index 52b0083f..00000000 --- a/v2/models/vmware_object_action.go +++ /dev/null @@ -1,116 +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" -) - -// VmwareObjectAction Actions on VMware objects. -// -// Actions on VMware objects. -// -// swagger:model VmwareObjectAction -type VmwareObjectAction struct { - - // Specifies the actions on vmware objects. - // Enum: ["enableAppProtection","disableAppProtection","upgradeCdpIoFilter","uninstallCdpIoFilter","reEnableCDP"] - VmwareObjectAction string `json:"vmwareObjectAction,omitempty"` -} - -// Validate validates this vmware object action -func (m *VmwareObjectAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVmwareObjectAction(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareObjectActionTypeVmwareObjectActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["enableAppProtection","disableAppProtection","upgradeCdpIoFilter","uninstallCdpIoFilter","reEnableCDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareObjectActionTypeVmwareObjectActionPropEnum = append(vmwareObjectActionTypeVmwareObjectActionPropEnum, v) - } -} - -const ( - - // VmwareObjectActionVmwareObjectActionEnableAppProtection captures enum value "enableAppProtection" - VmwareObjectActionVmwareObjectActionEnableAppProtection string = "enableAppProtection" - - // VmwareObjectActionVmwareObjectActionDisableAppProtection captures enum value "disableAppProtection" - VmwareObjectActionVmwareObjectActionDisableAppProtection string = "disableAppProtection" - - // VmwareObjectActionVmwareObjectActionUpgradeCdpIoFilter captures enum value "upgradeCdpIoFilter" - VmwareObjectActionVmwareObjectActionUpgradeCdpIoFilter string = "upgradeCdpIoFilter" - - // VmwareObjectActionVmwareObjectActionUninstallCdpIoFilter captures enum value "uninstallCdpIoFilter" - VmwareObjectActionVmwareObjectActionUninstallCdpIoFilter string = "uninstallCdpIoFilter" - - // VmwareObjectActionVmwareObjectActionReEnableCDP captures enum value "reEnableCDP" - VmwareObjectActionVmwareObjectActionReEnableCDP string = "reEnableCDP" -) - -// prop value enum -func (m *VmwareObjectAction) validateVmwareObjectActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareObjectActionTypeVmwareObjectActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareObjectAction) validateVmwareObjectAction(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareObjectAction) { // not required - return nil - } - - // value enum - if err := m.validateVmwareObjectActionEnum("vmwareObjectAction", "body", m.VmwareObjectAction); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vmware object action based on context it is used -func (m *VmwareObjectAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectAction) UnmarshalBinary(b []byte) error { - var res VmwareObjectAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_action_params.go b/v2/models/vmware_object_action_params.go deleted file mode 100644 index d58a37fb..00000000 --- a/v2/models/vmware_object_action_params.go +++ /dev/null @@ -1,174 +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" -) - -// VmwareObjectActionParams Actions on VMware Objects -// -// Specifies the parameters to perform an action on VMware Objects. -// -// swagger:model VmwareObjectActionParams -type VmwareObjectActionParams struct { - - // Specifies the action on the Object. - // Required: true - // Enum: ["enableAppProtection","disableAppProtection","upgradeCdpIoFilter","uninstallCdpIoFilter","reEnableCDP"] - Action *string `json:"action"` - - // Specifies the parameters to enable App Protection on VMware Object. - EnableAppProtectionParams *VmwareObjectEnableAppProtectionParams `json:"enableAppProtectionParams,omitempty"` -} - -// Validate validates this vmware object action params -func (m *VmwareObjectActionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAction(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableAppProtectionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareObjectActionParamsTypeActionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["enableAppProtection","disableAppProtection","upgradeCdpIoFilter","uninstallCdpIoFilter","reEnableCDP"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareObjectActionParamsTypeActionPropEnum = append(vmwareObjectActionParamsTypeActionPropEnum, v) - } -} - -const ( - - // VmwareObjectActionParamsActionEnableAppProtection captures enum value "enableAppProtection" - VmwareObjectActionParamsActionEnableAppProtection string = "enableAppProtection" - - // VmwareObjectActionParamsActionDisableAppProtection captures enum value "disableAppProtection" - VmwareObjectActionParamsActionDisableAppProtection string = "disableAppProtection" - - // VmwareObjectActionParamsActionUpgradeCdpIoFilter captures enum value "upgradeCdpIoFilter" - VmwareObjectActionParamsActionUpgradeCdpIoFilter string = "upgradeCdpIoFilter" - - // VmwareObjectActionParamsActionUninstallCdpIoFilter captures enum value "uninstallCdpIoFilter" - VmwareObjectActionParamsActionUninstallCdpIoFilter string = "uninstallCdpIoFilter" - - // VmwareObjectActionParamsActionReEnableCDP captures enum value "reEnableCDP" - VmwareObjectActionParamsActionReEnableCDP string = "reEnableCDP" -) - -// prop value enum -func (m *VmwareObjectActionParams) validateActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareObjectActionParamsTypeActionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareObjectActionParams) validateAction(formats strfmt.Registry) error { - - if err := validate.Required("action", "body", m.Action); err != nil { - return err - } - - // value enum - if err := m.validateActionEnum("action", "body", *m.Action); err != nil { - return err - } - - return nil -} - -func (m *VmwareObjectActionParams) validateEnableAppProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.EnableAppProtectionParams) { // not required - return nil - } - - if m.EnableAppProtectionParams != nil { - if err := m.EnableAppProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("enableAppProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("enableAppProtectionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware object action params based on the context it is used -func (m *VmwareObjectActionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEnableAppProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectActionParams) contextValidateEnableAppProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EnableAppProtectionParams != nil { - - if swag.IsZero(m.EnableAppProtectionParams) { // not required - return nil - } - - if err := m.EnableAppProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("enableAppProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("enableAppProtectionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectActionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectActionParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectActionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_enable_app_protection_params.go b/v2/models/vmware_object_enable_app_protection_params.go deleted file mode 100644 index ff36af3a..00000000 --- a/v2/models/vmware_object_enable_app_protection_params.go +++ /dev/null @@ -1,171 +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" -) - -// VmwareObjectEnableAppProtectionParams VMware app protection parameters. -// -// Specifies the parameters to enable app protection on VMware. -// -// swagger:model VmwareObjectEnableAppProtectionParams -type VmwareObjectEnableAppProtectionParams struct { - - // Specifies the app from which protection must be enabled. - // Required: true - // Enum: ["kSQL","kOracle","kAD","kExchange"] - AppType *string `json:"appType"` - - // Specifies the parameters to enable protection for SQL app on this VM. - EnableSQLProtectionParams *VmwareObjectEnableSQLProtectionParams `json:"enableSqlProtectionParams,omitempty"` -} - -// Validate validates this vmware object enable app protection params -func (m *VmwareObjectEnableAppProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEnableSQLProtectionParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareObjectEnableAppProtectionParamsTypeAppTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kSQL","kOracle","kAD","kExchange"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareObjectEnableAppProtectionParamsTypeAppTypePropEnum = append(vmwareObjectEnableAppProtectionParamsTypeAppTypePropEnum, v) - } -} - -const ( - - // VmwareObjectEnableAppProtectionParamsAppTypeKSQL captures enum value "kSQL" - VmwareObjectEnableAppProtectionParamsAppTypeKSQL string = "kSQL" - - // VmwareObjectEnableAppProtectionParamsAppTypeKOracle captures enum value "kOracle" - VmwareObjectEnableAppProtectionParamsAppTypeKOracle string = "kOracle" - - // VmwareObjectEnableAppProtectionParamsAppTypeKAD captures enum value "kAD" - VmwareObjectEnableAppProtectionParamsAppTypeKAD string = "kAD" - - // VmwareObjectEnableAppProtectionParamsAppTypeKExchange captures enum value "kExchange" - VmwareObjectEnableAppProtectionParamsAppTypeKExchange string = "kExchange" -) - -// prop value enum -func (m *VmwareObjectEnableAppProtectionParams) validateAppTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareObjectEnableAppProtectionParamsTypeAppTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareObjectEnableAppProtectionParams) validateAppType(formats strfmt.Registry) error { - - if err := validate.Required("appType", "body", m.AppType); err != nil { - return err - } - - // value enum - if err := m.validateAppTypeEnum("appType", "body", *m.AppType); err != nil { - return err - } - - return nil -} - -func (m *VmwareObjectEnableAppProtectionParams) validateEnableSQLProtectionParams(formats strfmt.Registry) error { - if swag.IsZero(m.EnableSQLProtectionParams) { // not required - return nil - } - - if m.EnableSQLProtectionParams != nil { - if err := m.EnableSQLProtectionParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("enableSqlProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("enableSqlProtectionParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware object enable app protection params based on the context it is used -func (m *VmwareObjectEnableAppProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEnableSQLProtectionParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectEnableAppProtectionParams) contextValidateEnableSQLProtectionParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EnableSQLProtectionParams != nil { - - if swag.IsZero(m.EnableSQLProtectionParams) { // not required - return nil - } - - if err := m.EnableSQLProtectionParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("enableSqlProtectionParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("enableSqlProtectionParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectEnableAppProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectEnableAppProtectionParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectEnableAppProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_enable_sql_protection_params.go b/v2/models/vmware_object_enable_sql_protection_params.go deleted file mode 100644 index d35c5282..00000000 --- a/v2/models/vmware_object_enable_sql_protection_params.go +++ /dev/null @@ -1,114 +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" -) - -// VmwareObjectEnableSQLProtectionParams Enable SQL protection parameters. -// -// Specifies the parameters for enabling SQL protection. -// -// swagger:model VmwareObjectEnableSqlProtectionParams -type VmwareObjectEnableSQLProtectionParams struct { - - // Specifies if agent is already installed. - UseInstalledAgent *bool `json:"useInstalledAgent,omitempty"` - - // Specifies the credentials to connect to SQL. This is needed only if agent is not installed. - Credentials *VmwareSQLCredentialParams `json:"credentials,omitempty"` -} - -// Validate validates this vmware object enable Sql protection params -func (m *VmwareObjectEnableSQLProtectionParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectEnableSQLProtectionParams) validateCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if m.Credentials != nil { - if err := m.Credentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware object enable Sql protection params based on the context it is used -func (m *VmwareObjectEnableSQLProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectEnableSQLProtectionParams) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.Credentials != nil { - - if swag.IsZero(m.Credentials) { // not required - return nil - } - - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectEnableSQLProtectionParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectEnableSQLProtectionParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectEnableSQLProtectionParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_entity_params.go b/v2/models/vmware_object_entity_params.go deleted file mode 100644 index 173e6d3b..00000000 --- a/v2/models/vmware_object_entity_params.go +++ /dev/null @@ -1,230 +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" -) - -// VmwareObjectEntityParams Object details for Vmware. -// -// swagger:model VmwareObjectEntityParams -type VmwareObjectEntityParams struct { - - // VMware Object type. - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate"] - Type *string `json:"type,omitempty"` - - // Specifies the Continuous Data Protection (CDP) details about this object. This is only available if this object if protected by a CDP enabled policy. - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - // Specifies if the object is a VM template. - IsTemplate *bool `json:"isTemplate,omitempty"` -} - -// Validate validates this vmware object entity params -func (m *VmwareObjectEntityParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareObjectEntityParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareObjectEntityParamsTypeTypePropEnum = append(vmwareObjectEntityParamsTypeTypePropEnum, v) - } -} - -const ( - - // VmwareObjectEntityParamsTypeKVCenter captures enum value "kVCenter" - VmwareObjectEntityParamsTypeKVCenter string = "kVCenter" - - // VmwareObjectEntityParamsTypeKStandaloneHost captures enum value "kStandaloneHost" - VmwareObjectEntityParamsTypeKStandaloneHost string = "kStandaloneHost" - - // VmwareObjectEntityParamsTypeKvCloudDirector captures enum value "kvCloudDirector" - VmwareObjectEntityParamsTypeKvCloudDirector string = "kvCloudDirector" - - // VmwareObjectEntityParamsTypeKFolder captures enum value "kFolder" - VmwareObjectEntityParamsTypeKFolder string = "kFolder" - - // VmwareObjectEntityParamsTypeKDatacenter captures enum value "kDatacenter" - VmwareObjectEntityParamsTypeKDatacenter string = "kDatacenter" - - // VmwareObjectEntityParamsTypeKComputeResource captures enum value "kComputeResource" - VmwareObjectEntityParamsTypeKComputeResource string = "kComputeResource" - - // VmwareObjectEntityParamsTypeKClusterComputeResource captures enum value "kClusterComputeResource" - VmwareObjectEntityParamsTypeKClusterComputeResource string = "kClusterComputeResource" - - // VmwareObjectEntityParamsTypeKResourcePool captures enum value "kResourcePool" - VmwareObjectEntityParamsTypeKResourcePool string = "kResourcePool" - - // VmwareObjectEntityParamsTypeKDatastore captures enum value "kDatastore" - VmwareObjectEntityParamsTypeKDatastore string = "kDatastore" - - // VmwareObjectEntityParamsTypeKHostSystem captures enum value "kHostSystem" - VmwareObjectEntityParamsTypeKHostSystem string = "kHostSystem" - - // VmwareObjectEntityParamsTypeKVirtualMachine captures enum value "kVirtualMachine" - VmwareObjectEntityParamsTypeKVirtualMachine string = "kVirtualMachine" - - // VmwareObjectEntityParamsTypeKVirtualApp captures enum value "kVirtualApp" - VmwareObjectEntityParamsTypeKVirtualApp string = "kVirtualApp" - - // VmwareObjectEntityParamsTypeKStoragePod captures enum value "kStoragePod" - VmwareObjectEntityParamsTypeKStoragePod string = "kStoragePod" - - // VmwareObjectEntityParamsTypeKNetwork captures enum value "kNetwork" - VmwareObjectEntityParamsTypeKNetwork string = "kNetwork" - - // VmwareObjectEntityParamsTypeKDistributedVirtualPortgroup captures enum value "kDistributedVirtualPortgroup" - VmwareObjectEntityParamsTypeKDistributedVirtualPortgroup string = "kDistributedVirtualPortgroup" - - // VmwareObjectEntityParamsTypeKTagCategory captures enum value "kTagCategory" - VmwareObjectEntityParamsTypeKTagCategory string = "kTagCategory" - - // VmwareObjectEntityParamsTypeKTag captures enum value "kTag" - VmwareObjectEntityParamsTypeKTag string = "kTag" - - // VmwareObjectEntityParamsTypeKOpaqueNetwork captures enum value "kOpaqueNetwork" - VmwareObjectEntityParamsTypeKOpaqueNetwork string = "kOpaqueNetwork" - - // VmwareObjectEntityParamsTypeKOrganization captures enum value "kOrganization" - VmwareObjectEntityParamsTypeKOrganization string = "kOrganization" - - // VmwareObjectEntityParamsTypeKVirtualDatacenter captures enum value "kVirtualDatacenter" - VmwareObjectEntityParamsTypeKVirtualDatacenter string = "kVirtualDatacenter" - - // VmwareObjectEntityParamsTypeKCatalog captures enum value "kCatalog" - VmwareObjectEntityParamsTypeKCatalog string = "kCatalog" - - // VmwareObjectEntityParamsTypeKOrgMetadata captures enum value "kOrgMetadata" - VmwareObjectEntityParamsTypeKOrgMetadata string = "kOrgMetadata" - - // VmwareObjectEntityParamsTypeKStoragePolicy captures enum value "kStoragePolicy" - VmwareObjectEntityParamsTypeKStoragePolicy string = "kStoragePolicy" - - // VmwareObjectEntityParamsTypeKVirtualAppTemplate captures enum value "kVirtualAppTemplate" - VmwareObjectEntityParamsTypeKVirtualAppTemplate string = "kVirtualAppTemplate" -) - -// prop value enum -func (m *VmwareObjectEntityParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareObjectEntityParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareObjectEntityParams) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *VmwareObjectEntityParams) validateCdpInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware object entity params based on the context it is used -func (m *VmwareObjectEntityParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectEntityParams) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectEntityParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectEntityParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectEntityParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_protection_request.go b/v2/models/vmware_object_protection_request.go deleted file mode 100644 index 311167e6..00000000 --- a/v2/models/vmware_object_protection_request.go +++ /dev/null @@ -1,145 +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" -) - -// VmwareObjectProtectionRequest Specifies the VMware object level settings for object protection. -// -// swagger:model VmwareObjectProtectionRequest -type VmwareObjectProtectionRequest struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the list of IDs of the objects to not be protected in this backup. This field only applies if provided object id is non leaf entity such as Tag or a folder. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - CommonVmwareObjectParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareObjectProtectionRequest) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *int64 `json:"id"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.ExcludeObjectIds = dataAO0.ExcludeObjectIds - - // AO1 - var aO1 CommonVmwareObjectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareObjectParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareObjectProtectionRequest) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *int64 `json:"id"` - - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - - dataAO0.ID = m.ID - - dataAO0.ExcludeObjectIds = m.ExcludeObjectIds - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware object protection request -func (m *VmwareObjectProtectionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectProtectionRequest) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this vmware object protection request based on the context it is used -func (m *VmwareObjectProtectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectProtectionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectProtectionRequest) UnmarshalBinary(b []byte) error { - var res VmwareObjectProtectionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_protection_request_params.go b/v2/models/vmware_object_protection_request_params.go deleted file mode 100644 index 14cad8a8..00000000 --- a/v2/models/vmware_object_protection_request_params.go +++ /dev/null @@ -1,253 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareObjectProtectionRequestParams Specifies the parameters which are specific to VMware object protection. -// -// swagger:model VmwareObjectProtectionRequestParams -type VmwareObjectProtectionRequestParams struct { - - // Specifies the objects to include in the backup. - // Required: true - Objects []*VmwareObjectProtectionRequest `json:"objects"` - - // Specifies a list of disks to exclude from the backup. - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - - CommonVmwareProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareObjectProtectionRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*VmwareObjectProtectionRequest `json:"objects"` - - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.GlobalExcludeDisks = dataAO0.GlobalExcludeDisks - - // AO1 - var aO1 CommonVmwareProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareObjectProtectionRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Objects []*VmwareObjectProtectionRequest `json:"objects"` - - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - } - - dataAO0.Objects = m.Objects - - dataAO0.GlobalExcludeDisks = m.GlobalExcludeDisks - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware object protection request params -func (m *VmwareObjectProtectionRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalExcludeDisks(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectProtectionRequestParams) validateObjects(formats strfmt.Registry) error { - - if err := validate.Required("objects", "body", m.Objects); err != nil { - return err - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareObjectProtectionRequestParams) validateGlobalExcludeDisks(formats strfmt.Registry) error { - - if swag.IsZero(m.GlobalExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - continue - } - - if m.GlobalExcludeDisks[i] != nil { - if err := m.GlobalExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware object protection request params based on the context it is used -func (m *VmwareObjectProtectionRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectProtectionRequestParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareObjectProtectionRequestParams) contextValidateGlobalExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - - if m.GlobalExcludeDisks[i] != nil { - - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectProtectionRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectProtectionRequestParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectProtectionRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_protection_response.go b/v2/models/vmware_object_protection_response.go deleted file mode 100644 index 558ddf2f..00000000 --- a/v2/models/vmware_object_protection_response.go +++ /dev/null @@ -1,237 +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" -) - -// VmwareObjectProtectionResponse Specifies the input for a protection object in the VMware environment. -// -// swagger:model VmwareObjectProtectionResponse -type VmwareObjectProtectionResponse struct { - CommonVmwareObjectParams - - // Specifies the list of IDs of the objects to not be protected in this backup. This field only applies if provided object id is non leaf entity such as Tag or a folder. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - // Specifies the CDP related information for a given object. This field will only be populated when protection group is configured with policy having CDP retention settings. - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - // Specifies the hot standby related information for a given object. This field will only be populated when protection group is configured with standby settings. - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareObjectProtectionResponse) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonVmwareObjectParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonVmwareObjectParams = aO0 - - // AO1 - var dataAO1 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ExcludeObjectIds = dataAO1.ExcludeObjectIds - - m.CdpInfo = dataAO1.CdpInfo - - m.StandbyInfo = dataAO1.StandbyInfo - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareObjectProtectionResponse) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonVmwareObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` - } - - dataAO1.ExcludeObjectIds = m.ExcludeObjectIds - - dataAO1.CdpInfo = m.CdpInfo - - dataAO1.StandbyInfo = m.StandbyInfo - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware object protection response -func (m *VmwareObjectProtectionResponse) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectProtectionResponse) validateCdpInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -func (m *VmwareObjectProtectionResponse) validateStandbyInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.StandbyInfo) { // not required - return nil - } - - if m.StandbyInfo != nil { - if err := m.StandbyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware object protection response based on the context it is used -func (m *VmwareObjectProtectionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandbyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareObjectProtectionResponse) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -func (m *VmwareObjectProtectionResponse) contextValidateStandbyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.StandbyInfo != nil { - - if swag.IsZero(m.StandbyInfo) { // not required - return nil - } - - if err := m.StandbyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectProtectionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectProtectionResponse) UnmarshalBinary(b []byte) error { - var res VmwareObjectProtectionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_protection_response_params.go b/v2/models/vmware_object_protection_response_params.go deleted file mode 100644 index 5717c8ec..00000000 --- a/v2/models/vmware_object_protection_response_params.go +++ /dev/null @@ -1,116 +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" -) - -// VmwareObjectProtectionResponseParams Specifies the parameters which are specific to VMware object protection. -// -// swagger:model VmwareObjectProtectionResponseParams -type VmwareObjectProtectionResponseParams struct { - VmwareObjectProtectionResponse - - CommonVmwareProtectionParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareObjectProtectionResponseParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 VmwareObjectProtectionResponse - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.VmwareObjectProtectionResponse = aO0 - - // AO1 - var aO1 CommonVmwareProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareProtectionParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareObjectProtectionResponseParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.VmwareObjectProtectionResponse) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware object protection response params -func (m *VmwareObjectProtectionResponseParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with VmwareObjectProtectionResponse - if err := m.VmwareObjectProtectionResponse.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vmware object protection response params based on the context it is used -func (m *VmwareObjectProtectionResponseParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with VmwareObjectProtectionResponse - if err := m.VmwareObjectProtectionResponse.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectProtectionResponseParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectProtectionResponseParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectProtectionResponseParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_object_protection_update_request_params.go b/v2/models/vmware_object_protection_update_request_params.go deleted file mode 100644 index 16d41400..00000000 --- a/v2/models/vmware_object_protection_update_request_params.go +++ /dev/null @@ -1,140 +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" -) - -// VmwareObjectProtectionUpdateRequestParams Specifies the parameters which are specific to VMware object protection. -// -// swagger:model VmwareObjectProtectionUpdateRequestParams -type VmwareObjectProtectionUpdateRequestParams struct { - CommonVmwareProtectionParams - - CommonVmwareObjectParams - - // Specifies the list of IDs of the objects to not be protected in this backup. This field only applies if provided object id is non leaf entity such as Tag or a folder. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareObjectProtectionUpdateRequestParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonVmwareProtectionParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonVmwareProtectionParams = aO0 - - // AO1 - var aO1 CommonVmwareObjectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareObjectParams = aO1 - - // AO2 - var dataAO2 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - if err := swag.ReadJSON(raw, &dataAO2); err != nil { - return err - } - - m.ExcludeObjectIds = dataAO2.ExcludeObjectIds - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareObjectProtectionUpdateRequestParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 3) - - aO0, err := swag.WriteJSON(m.CommonVmwareProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - var dataAO2 struct { - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - } - - dataAO2.ExcludeObjectIds = m.ExcludeObjectIds - - jsonDataAO2, errAO2 := swag.WriteJSON(dataAO2) - if errAO2 != nil { - return nil, errAO2 - } - _parts = append(_parts, jsonDataAO2) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware object protection update request params -func (m *VmwareObjectProtectionUpdateRequestParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vmware object protection update request params based on the context it is used -func (m *VmwareObjectProtectionUpdateRequestParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareObjectProtectionUpdateRequestParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareObjectProtectionUpdateRequestParams) UnmarshalBinary(b []byte) error { - var res VmwareObjectProtectionUpdateRequestParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_protection_group_extra_params.go b/v2/models/vmware_protection_group_extra_params.go deleted file mode 100644 index 7dc36c35..00000000 --- a/v2/models/vmware_protection_group_extra_params.go +++ /dev/null @@ -1,180 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareProtectionGroupExtraParams Specifies the extra parameters which are specific to VMware object protection Group. -// -// swagger:model VmwareProtectionGroupExtraParams -type VmwareProtectionGroupExtraParams struct { - - // Specifies the id of the parent of the objects. - // Read Only: true - SourceID *int64 `json:"sourceId,omitempty"` - - // Specifies the name of the parent of the objects. - // Read Only: true - SourceName *string `json:"sourceName,omitempty"` - - // Specifies the list of IDs of the objects to not be protected in this backup. This field only applies if provided object id is non leaf entity such as Tag or a folder. This can be used to ignore specific objects under a parent object which has been included for protection. - ExcludeObjectIds []*int64 `json:"excludeObjectIds"` - - // Array of Array of VM Tag Ids that Specify VMs to Protect. Optionally specify a list of VMs to protect by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to protect which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. To protect only 'Eng' VMs in the East and all the VMs in the West, specify the following tag id array: [ [1101, 2221], [3031] ], where 1101 is the 'Eng' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The inner array [1101, 2221] produces a list of VMs that are both tagged with 'Eng' and 'East' (an intersection). The outer array combines the list from the inner array with list of VMs tagged with 'West' (a union). The list of resulting VMs are protected by this Protection Group. - VMTagIds [][]int64 `json:"vmTagIds"` - - // Array of Arrays of VM Tag Ids that Specify VMs to Exclude. Optionally specify a list of VMs to exclude from protecting by listing Protection Source ids of VM Tags in this two dimensional array. Using this two dimensional array of Tag ids, the Cluster generates a list of VMs to exclude from protecting, which are derived from intersections of the inner arrays and union of the outer array, as shown by the following example. For example a Datacenter is selected to be protected but you want to exclude all the 'Former Employees' VMs in the East and West but keep all the VMs for 'Former Employees' in the South which are also stored in this Datacenter, by specifying the following tag id array: [ [1000, 2221], [1000, 3031] ], where 1000 is the 'Former Employee' VM Tag id, 2221 is the 'East' VM Tag id and 3031 is the 'West' VM Tag id. The first inner array [1000, 2221] produces a list of VMs that are both tagged with 'Former Employees' and 'East' (an intersection). The second inner array [1000, 3031] produces a list of VMs that are both tagged with 'Former Employees' and 'West' (an intersection). The outer array combines the list of VMs from the two inner arrays. The list of resulting VMs are excluded from being protected this Job. - ExcludeVMTagIds [][]int64 `json:"excludeVmTagIds"` - - // Specifies the list of exclusion filters applied during the group creation or edit. These exclusion filters can be wildcard supported strings or regular expressions. Objects satisfying these filters will be excluded during backup and also auto protected objects will be ignored if filtered by any of the filters. - ExcludeFilters []*VMFilter `json:"excludeFilters"` - - // Whether to leverage the storage array based snapshots for this backup. To leverage storage snapshots, the storage array has to be registered as a source. If storage based snapshots can not be taken, backup will fallback to the default backup method. - LeverageStorageSnapshots *bool `json:"leverageStorageSnapshots,omitempty"` - - // Whether to leverage the hyperflex based snapshots for this backup. To leverage hyperflex snapshots, it has to first be registered. If hyperflex based snapshots cannot be taken, backup will fallback to the default backup method. - LeverageHyperflexSnapshots *bool `json:"leverageHyperflexSnapshots,omitempty"` - - // Whether to leverage the nutanix based snapshots for this backup. To leverage nutanix snapshots, it has to first be registered. If nutanix based snapshots cannot be taken, backup will fallback to the default backup method. - LeverageNutanixSnapshots *bool `json:"leverageNutanixSnapshots,omitempty"` - - // Specifies whether or not to move the workload to the cloud. - CloudMigration *bool `json:"cloudMigration,omitempty"` - - // Specifies whether or not this job can have parallel runs. - AllowParallelRuns *bool `json:"allowParallelRuns,omitempty"` -} - -// Validate validates this vmware protection group extra params -func (m *VmwareProtectionGroupExtraParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExcludeFilters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupExtraParams) validateExcludeFilters(formats strfmt.Registry) error { - if swag.IsZero(m.ExcludeFilters) { // not required - return nil - } - - for i := 0; i < len(m.ExcludeFilters); i++ { - if swag.IsZero(m.ExcludeFilters[i]) { // not required - continue - } - - if m.ExcludeFilters[i] != nil { - if err := m.ExcludeFilters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware protection group extra params based on the context it is used -func (m *VmwareProtectionGroupExtraParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSourceID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSourceName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExcludeFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupExtraParams) contextValidateSourceID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *VmwareProtectionGroupExtraParams) contextValidateSourceName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "sourceName", "body", m.SourceName); err != nil { - return err - } - - return nil -} - -func (m *VmwareProtectionGroupExtraParams) contextValidateExcludeFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExcludeFilters); i++ { - - if m.ExcludeFilters[i] != nil { - - if swag.IsZero(m.ExcludeFilters[i]) { // not required - return nil - } - - if err := m.ExcludeFilters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("excludeFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareProtectionGroupExtraParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareProtectionGroupExtraParams) UnmarshalBinary(b []byte) error { - var res VmwareProtectionGroupExtraParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_protection_group_object_params.go b/v2/models/vmware_protection_group_object_params.go deleted file mode 100644 index f1feb582..00000000 --- a/v2/models/vmware_protection_group_object_params.go +++ /dev/null @@ -1,343 +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" -) - -// VmwareProtectionGroupObjectParams Specifies the input for a protection object in the VMware environment. -// -// swagger:model VmwareProtectionGroupObjectParams -type VmwareProtectionGroupObjectParams struct { - - // Specifies the id of the object being protected. This can be a leaf level or non leaf level object. - // Required: true - ID *int64 `json:"id"` - - // Specifies the type of the VMware object. - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate"] - Type *string `json:"type,omitempty"` - - // Specifies the name of the virtual machine. - // Read Only: true - Name *string `json:"name,omitempty"` - - // Specifies whether the vm is part of an Autoprotection and there is at least one object-specific setting applied to this vm. True implies that the vm or its parent directory is autoprotected and will remain part of the autoprotection with additional settings specified here. False implies the object is not part of an Autoprotection and will remain protected and its individual settings here even if a parent directory's Autoprotection setting is altered. Default is false. - IsAutoprotected *bool `json:"isAutoprotected,omitempty"` - - // Specifies the CDP related information for a given object. This field will only be populated when protection group is configured with policy having CDP retnetion settings. - // Read Only: true - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - // Specifies the standby related information for a given object. This field will only be populated when standby is configured in backup job settings. - // Read Only: true - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` - - CommonVmwareObjectParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareProtectionGroupObjectParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *int64 `json:"id"` - - Type *string `json:"type,omitempty"` - - Name *string `json:"name,omitempty"` - - IsAutoprotected *bool `json:"isAutoprotected,omitempty"` - - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.Type = dataAO0.Type - - m.Name = dataAO0.Name - - m.IsAutoprotected = dataAO0.IsAutoprotected - - m.CdpInfo = dataAO0.CdpInfo - - m.StandbyInfo = dataAO0.StandbyInfo - - // AO1 - var aO1 CommonVmwareObjectParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareObjectParams = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareProtectionGroupObjectParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *int64 `json:"id"` - - Type *string `json:"type,omitempty"` - - Name *string `json:"name,omitempty"` - - IsAutoprotected *bool `json:"isAutoprotected,omitempty"` - - CdpInfo *VmwareCdpObject `json:"cdpInfo,omitempty"` - - StandbyInfo *VmwareStandbyObject `json:"standbyInfo,omitempty"` - } - - dataAO0.ID = m.ID - - dataAO0.Type = m.Type - - dataAO0.Name = m.Name - - dataAO0.IsAutoprotected = m.IsAutoprotected - - dataAO0.CdpInfo = m.CdpInfo - - dataAO0.StandbyInfo = m.StandbyInfo - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareObjectParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware protection group object params -func (m *VmwareProtectionGroupObjectParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyInfo(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupObjectParams) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -var vmwareProtectionGroupObjectParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector","kFolder","kDatacenter","kComputeResource","kClusterComputeResource","kResourcePool","kDatastore","kHostSystem","kVirtualMachine","kVirtualApp","kStoragePod","kNetwork","kDistributedVirtualPortgroup","kTagCategory","kTag","kOpaqueNetwork","kOrganization","kVirtualDatacenter","kCatalog","kOrgMetadata","kStoragePolicy","kVirtualAppTemplate"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareProtectionGroupObjectParamsTypeTypePropEnum = append(vmwareProtectionGroupObjectParamsTypeTypePropEnum, v) - } -} - -// property enum -func (m *VmwareProtectionGroupObjectParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareProtectionGroupObjectParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareProtectionGroupObjectParams) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *VmwareProtectionGroupObjectParams) validateCdpInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if m.CdpInfo != nil { - if err := m.CdpInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -func (m *VmwareProtectionGroupObjectParams) validateStandbyInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.StandbyInfo) { // not required - return nil - } - - if m.StandbyInfo != nil { - if err := m.StandbyInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware protection group object params based on the context it is used -func (m *VmwareProtectionGroupObjectParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateName(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCdpInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandbyInfo(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareObjectParams - if err := m.CommonVmwareObjectParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupObjectParams) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *VmwareProtectionGroupObjectParams) contextValidateCdpInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CdpInfo != nil { - - if swag.IsZero(m.CdpInfo) { // not required - return nil - } - - if err := m.CdpInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cdpInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cdpInfo") - } - return err - } - } - - return nil -} - -func (m *VmwareProtectionGroupObjectParams) contextValidateStandbyInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.StandbyInfo != nil { - - if swag.IsZero(m.StandbyInfo) { // not required - return nil - } - - if err := m.StandbyInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareProtectionGroupObjectParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareProtectionGroupObjectParams) UnmarshalBinary(b []byte) error { - var res VmwareProtectionGroupObjectParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_protection_group_params.go b/v2/models/vmware_protection_group_params.go deleted file mode 100644 index 52917c59..00000000 --- a/v2/models/vmware_protection_group_params.go +++ /dev/null @@ -1,368 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VmwareProtectionGroupParams Specifies the parameters which are specific to VMware related Protection Groups. -// -// swagger:model VmwareProtectionGroupParams -type VmwareProtectionGroupParams struct { - - // Specifies the objects to include in the backup. - Objects []*VmwareProtectionGroupObjectParams `json:"objects"` - - // Specifies a list of disks to exclude from the backup. - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - - // Specifies the standby resource objects for this backup. - StandbyResourceObjects []*VmwareProtectionGroupStandbyResourceParams `json:"standbyResourceObjects"` - - CommonVmwareProtectionParams - - VmwareProtectionGroupExtraParams - - CommonCdpParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareProtectionGroupParams) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Objects []*VmwareProtectionGroupObjectParams `json:"objects"` - - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - - StandbyResourceObjects []*VmwareProtectionGroupStandbyResourceParams `json:"standbyResourceObjects"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Objects = dataAO0.Objects - - m.GlobalExcludeDisks = dataAO0.GlobalExcludeDisks - - m.StandbyResourceObjects = dataAO0.StandbyResourceObjects - - // AO1 - var aO1 CommonVmwareProtectionParams - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CommonVmwareProtectionParams = aO1 - - // AO2 - var aO2 VmwareProtectionGroupExtraParams - if err := swag.ReadJSON(raw, &aO2); err != nil { - return err - } - m.VmwareProtectionGroupExtraParams = aO2 - - // AO3 - var aO3 CommonCdpParams - if err := swag.ReadJSON(raw, &aO3); err != nil { - return err - } - m.CommonCdpParams = aO3 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareProtectionGroupParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 4) - - var dataAO0 struct { - Objects []*VmwareProtectionGroupObjectParams `json:"objects"` - - GlobalExcludeDisks []*DiskInfo `json:"globalExcludeDisks"` - - StandbyResourceObjects []*VmwareProtectionGroupStandbyResourceParams `json:"standbyResourceObjects"` - } - - dataAO0.Objects = m.Objects - - dataAO0.GlobalExcludeDisks = m.GlobalExcludeDisks - - dataAO0.StandbyResourceObjects = m.StandbyResourceObjects - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.CommonVmwareProtectionParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - - aO2, err := swag.WriteJSON(m.VmwareProtectionGroupExtraParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO2) - - aO3, err := swag.WriteJSON(m.CommonCdpParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO3) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware protection group params -func (m *VmwareProtectionGroupParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateObjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalExcludeDisks(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyResourceObjects(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with VmwareProtectionGroupExtraParams - if err := m.VmwareProtectionGroupExtraParams.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonCdpParams - if err := m.CommonCdpParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupParams) validateObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.Objects) { // not required - return nil - } - - for i := 0; i < len(m.Objects); i++ { - if swag.IsZero(m.Objects[i]) { // not required - continue - } - - if m.Objects[i] != nil { - if err := m.Objects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareProtectionGroupParams) validateGlobalExcludeDisks(formats strfmt.Registry) error { - - if swag.IsZero(m.GlobalExcludeDisks) { // not required - return nil - } - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - continue - } - - if m.GlobalExcludeDisks[i] != nil { - if err := m.GlobalExcludeDisks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareProtectionGroupParams) validateStandbyResourceObjects(formats strfmt.Registry) error { - - if swag.IsZero(m.StandbyResourceObjects) { // not required - return nil - } - - for i := 0; i < len(m.StandbyResourceObjects); i++ { - if swag.IsZero(m.StandbyResourceObjects[i]) { // not required - continue - } - - if m.StandbyResourceObjects[i] != nil { - if err := m.StandbyResourceObjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyResourceObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyResourceObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware protection group params based on the context it is used -func (m *VmwareProtectionGroupParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateObjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalExcludeDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandbyResourceObjects(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with CommonVmwareProtectionParams - if err := m.CommonVmwareProtectionParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with VmwareProtectionGroupExtraParams - if err := m.VmwareProtectionGroupExtraParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CommonCdpParams - if err := m.CommonCdpParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupParams) contextValidateObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Objects); i++ { - - if m.Objects[i] != nil { - - if swag.IsZero(m.Objects[i]) { // not required - return nil - } - - if err := m.Objects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("objects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("objects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareProtectionGroupParams) contextValidateGlobalExcludeDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalExcludeDisks); i++ { - - if m.GlobalExcludeDisks[i] != nil { - - if swag.IsZero(m.GlobalExcludeDisks[i]) { // not required - return nil - } - - if err := m.GlobalExcludeDisks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalExcludeDisks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareProtectionGroupParams) contextValidateStandbyResourceObjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.StandbyResourceObjects); i++ { - - if m.StandbyResourceObjects[i] != nil { - - if swag.IsZero(m.StandbyResourceObjects[i]) { // not required - return nil - } - - if err := m.StandbyResourceObjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyResourceObjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyResourceObjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareProtectionGroupParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareProtectionGroupParams) UnmarshalBinary(b []byte) error { - var res VmwareProtectionGroupParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_protection_group_standby_resource_params.go b/v2/models/vmware_protection_group_standby_resource_params.go deleted file mode 100644 index dbc0ed23..00000000 --- a/v2/models/vmware_protection_group_standby_resource_params.go +++ /dev/null @@ -1,281 +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" -) - -// VmwareProtectionGroupStandbyResourceParams VMware protection group standby resource params which will be used to create standby VM entity for backup entity. -// -// swagger:model VmwareProtectionGroupStandbyResourceParams -type VmwareProtectionGroupStandbyResourceParams struct { - CommonStandbyResourceParams - - // Specifies the object id for parent vCenter source where this standby resource should be created. - ParentObjectID *int64 `json:"parentObjectId,omitempty"` - - // Specifies the object id for target vm folder where this standby resource should be created. - TargetFolderObjectID *int64 `json:"targetFolderObjectId,omitempty"` - - // Specifies the object id for target datastore folder where disks for this standby resource should be placed. - TargetDatastoreFolderObjectID *int64 `json:"targetDatastoreFolderObjectId,omitempty"` - - // Specifies the object id for resource pool where this standby resource should be created. - ResourcePoolObjectID *int64 `json:"resourcePoolObjectId,omitempty"` - - // Specifies the list of IDs of the datastore objects where this standby resource should be created. - DatastoreObjectIds []*int64 `json:"datastoreObjectIds"` - - // Specifies the networking configuration to be applied to this standby resource. - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - // Specifies params to rename the standby resource. - RenameRestoredObjectParams *RecoveredOrClonedVmsRenameConfig `json:"renameRestoredObjectParams,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareProtectionGroupStandbyResourceParams) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CommonStandbyResourceParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CommonStandbyResourceParams = aO0 - - // AO1 - var dataAO1 struct { - ParentObjectID *int64 `json:"parentObjectId,omitempty"` - - TargetFolderObjectID *int64 `json:"targetFolderObjectId,omitempty"` - - TargetDatastoreFolderObjectID *int64 `json:"targetDatastoreFolderObjectId,omitempty"` - - ResourcePoolObjectID *int64 `json:"resourcePoolObjectId,omitempty"` - - DatastoreObjectIds []*int64 `json:"datastoreObjectIds"` - - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - RenameRestoredObjectParams *RecoveredOrClonedVmsRenameConfig `json:"renameRestoredObjectParams,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.ParentObjectID = dataAO1.ParentObjectID - - m.TargetFolderObjectID = dataAO1.TargetFolderObjectID - - m.TargetDatastoreFolderObjectID = dataAO1.TargetDatastoreFolderObjectID - - m.ResourcePoolObjectID = dataAO1.ResourcePoolObjectID - - m.DatastoreObjectIds = dataAO1.DatastoreObjectIds - - m.NetworkConfig = dataAO1.NetworkConfig - - m.RenameRestoredObjectParams = dataAO1.RenameRestoredObjectParams - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareProtectionGroupStandbyResourceParams) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CommonStandbyResourceParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - ParentObjectID *int64 `json:"parentObjectId,omitempty"` - - TargetFolderObjectID *int64 `json:"targetFolderObjectId,omitempty"` - - TargetDatastoreFolderObjectID *int64 `json:"targetDatastoreFolderObjectId,omitempty"` - - ResourcePoolObjectID *int64 `json:"resourcePoolObjectId,omitempty"` - - DatastoreObjectIds []*int64 `json:"datastoreObjectIds"` - - NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` - - RenameRestoredObjectParams *RecoveredOrClonedVmsRenameConfig `json:"renameRestoredObjectParams,omitempty"` - } - - dataAO1.ParentObjectID = m.ParentObjectID - - dataAO1.TargetFolderObjectID = m.TargetFolderObjectID - - dataAO1.TargetDatastoreFolderObjectID = m.TargetDatastoreFolderObjectID - - dataAO1.ResourcePoolObjectID = m.ResourcePoolObjectID - - dataAO1.DatastoreObjectIds = m.DatastoreObjectIds - - dataAO1.NetworkConfig = m.NetworkConfig - - dataAO1.RenameRestoredObjectParams = m.RenameRestoredObjectParams - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware protection group standby resource params -func (m *VmwareProtectionGroupStandbyResourceParams) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonStandbyResourceParams - if err := m.CommonStandbyResourceParams.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRestoredObjectParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupStandbyResourceParams) 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 -} - -func (m *VmwareProtectionGroupStandbyResourceParams) validateRenameRestoredObjectParams(formats strfmt.Registry) error { - - if swag.IsZero(m.RenameRestoredObjectParams) { // not required - return nil - } - - if m.RenameRestoredObjectParams != nil { - if err := m.RenameRestoredObjectParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware protection group standby resource params based on the context it is used -func (m *VmwareProtectionGroupStandbyResourceParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CommonStandbyResourceParams - if err := m.CommonStandbyResourceParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRestoredObjectParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareProtectionGroupStandbyResourceParams) 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 -} - -func (m *VmwareProtectionGroupStandbyResourceParams) contextValidateRenameRestoredObjectParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRestoredObjectParams != nil { - - if swag.IsZero(m.RenameRestoredObjectParams) { // not required - return nil - } - - if err := m.RenameRestoredObjectParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRestoredObjectParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRestoredObjectParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareProtectionGroupStandbyResourceParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareProtectionGroupStandbyResourceParams) UnmarshalBinary(b []byte) error { - var res VmwareProtectionGroupStandbyResourceParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_disks_original_source_config.go b/v2/models/vmware_recover_disks_original_source_config.go deleted file mode 100644 index 3e45cf71..00000000 --- a/v2/models/vmware_recover_disks_original_source_config.go +++ /dev/null @@ -1,131 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareRecoverDisksOriginalSourceConfig Specifies the configuration for restoring a disk to the original VM from which the snapshot was taken. -// -// swagger:model VmwareRecoverDisksOriginalSourceConfig -type VmwareRecoverDisksOriginalSourceConfig struct { - - // Specifies the disks to be recovered and the location to which they will be recovered. - // Required: true - // Min Items: 1 - Disks []*VmwareRecoverOriginalSourceDiskParams `json:"disks"` -} - -// Validate validates this vmware recover disks original source config -func (m *VmwareRecoverDisksOriginalSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverDisksOriginalSourceConfig) validateDisks(formats strfmt.Registry) error { - - if err := validate.Required("disks", "body", m.Disks); err != nil { - return err - } - - iDisksSize := int64(len(m.Disks)) - - if err := validate.MinItems("disks", "body", iDisksSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Disks); i++ { - if swag.IsZero(m.Disks[i]) { // not required - continue - } - - if m.Disks[i] != nil { - if err := m.Disks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware recover disks original source config based on the context it is used -func (m *VmwareRecoverDisksOriginalSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverDisksOriginalSourceConfig) contextValidateDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Disks); i++ { - - if m.Disks[i] != nil { - - if swag.IsZero(m.Disks[i]) { // not required - return nil - } - - if err := m.Disks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverDisksOriginalSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverDisksOriginalSourceConfig) UnmarshalBinary(b []byte) error { - var res VmwareRecoverDisksOriginalSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_disks_target_source_config.go b/v2/models/vmware_recover_disks_target_source_config.go deleted file mode 100644 index 0a534509..00000000 --- a/v2/models/vmware_recover_disks_target_source_config.go +++ /dev/null @@ -1,148 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareRecoverDisksTargetSourceConfig Specifies the configuration for restoring disks to a different VM than the one from which the snapshot was taken. -// -// swagger:model VmwareRecoverDisksTargetSourceConfig -type VmwareRecoverDisksTargetSourceConfig struct { - - // Specifies the source ID of the VM to which the disks will be restored. - // Required: true - SourceID *int64 `json:"sourceId"` - - // Specifies the disks to be recovered and the location to which they will be recovered. - // Required: true - // Min Items: 1 - Disks []*VmwareRecoverTargetSourceDiskParams `json:"disks"` -} - -// Validate validates this vmware recover disks target source config -func (m *VmwareRecoverDisksTargetSourceConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSourceID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDisks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverDisksTargetSourceConfig) validateSourceID(formats strfmt.Registry) error { - - if err := validate.Required("sourceId", "body", m.SourceID); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverDisksTargetSourceConfig) validateDisks(formats strfmt.Registry) error { - - if err := validate.Required("disks", "body", m.Disks); err != nil { - return err - } - - iDisksSize := int64(len(m.Disks)) - - if err := validate.MinItems("disks", "body", iDisksSize, 1); err != nil { - return err - } - - for i := 0; i < len(m.Disks); i++ { - if swag.IsZero(m.Disks[i]) { // not required - continue - } - - if m.Disks[i] != nil { - if err := m.Disks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this vmware recover disks target source config based on the context it is used -func (m *VmwareRecoverDisksTargetSourceConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDisks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverDisksTargetSourceConfig) contextValidateDisks(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Disks); i++ { - - if m.Disks[i] != nil { - - if swag.IsZero(m.Disks[i]) { // not required - return nil - } - - if err := m.Disks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverDisksTargetSourceConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverDisksTargetSourceConfig) UnmarshalBinary(b []byte) error { - var res VmwareRecoverDisksTargetSourceConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_files_new_target_config.go b/v2/models/vmware_recover_files_new_target_config.go deleted file mode 100644 index 5e789581..00000000 --- a/v2/models/vmware_recover_files_new_target_config.go +++ /dev/null @@ -1,234 +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" -) - -// VmwareRecoverFilesNewTargetConfig Vmware Recover Files New Target Config. -// -// Specifies the configuration for recovering files and folders to a new target. -// -// swagger:model VmwareRecoverFilesNewTargetConfig -type VmwareRecoverFilesNewTargetConfig struct { - - // Specifies the method to recover files and folders. - // Required: true - // Enum: ["AutoDeploy","UseExistingAgent","UseHypervisorApis"] - RecoverMethod *string `json:"recoverMethod"` - - // Specifies the path location to recover files to. - // Required: true - AbsolutePath *string `json:"absolutePath"` - - // Specifies the target VM to recover files and folders to. - // Required: true - TargetVM *RecoverTarget `json:"targetVm"` - - // Specifies the credentials for the target VM. This is mandatory if the recoverMethod is AutoDeploy or UseHypervisorApis. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this vmware recover files new target config -func (m *VmwareRecoverFilesNewTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAbsolutePath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVM(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareRecoverFilesNewTargetConfigTypeRecoverMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AutoDeploy","UseExistingAgent","UseHypervisorApis"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareRecoverFilesNewTargetConfigTypeRecoverMethodPropEnum = append(vmwareRecoverFilesNewTargetConfigTypeRecoverMethodPropEnum, v) - } -} - -const ( - - // VmwareRecoverFilesNewTargetConfigRecoverMethodAutoDeploy captures enum value "AutoDeploy" - VmwareRecoverFilesNewTargetConfigRecoverMethodAutoDeploy string = "AutoDeploy" - - // VmwareRecoverFilesNewTargetConfigRecoverMethodUseExistingAgent captures enum value "UseExistingAgent" - VmwareRecoverFilesNewTargetConfigRecoverMethodUseExistingAgent string = "UseExistingAgent" - - // VmwareRecoverFilesNewTargetConfigRecoverMethodUseHypervisorApis captures enum value "UseHypervisorApis" - VmwareRecoverFilesNewTargetConfigRecoverMethodUseHypervisorApis string = "UseHypervisorApis" -) - -// prop value enum -func (m *VmwareRecoverFilesNewTargetConfig) validateRecoverMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareRecoverFilesNewTargetConfigTypeRecoverMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) validateRecoverMethod(formats strfmt.Registry) error { - - if err := validate.Required("recoverMethod", "body", m.RecoverMethod); err != nil { - return err - } - - // value enum - if err := m.validateRecoverMethodEnum("recoverMethod", "body", *m.RecoverMethod); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) validateAbsolutePath(formats strfmt.Registry) error { - - if err := validate.Required("absolutePath", "body", m.AbsolutePath); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) validateTargetVM(formats strfmt.Registry) error { - - if err := validate.Required("targetVm", "body", m.TargetVM); err != nil { - return err - } - - if m.TargetVM != nil { - if err := m.TargetVM.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware recover files new target config based on the context it is used -func (m *VmwareRecoverFilesNewTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) contextValidateTargetVM(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVM != nil { - - if err := m.TargetVM.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVm") - } - return err - } - } - - return nil -} - -func (m *VmwareRecoverFilesNewTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverFilesNewTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverFilesNewTargetConfig) UnmarshalBinary(b []byte) error { - var res VmwareRecoverFilesNewTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_files_original_target_config.go b/v2/models/vmware_recover_files_original_target_config.go deleted file mode 100644 index d1ca5d42..00000000 --- a/v2/models/vmware_recover_files_original_target_config.go +++ /dev/null @@ -1,188 +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" -) - -// VmwareRecoverFilesOriginalTargetConfig Vmware Recover Files Original Target Config. -// -// Specifies the configuration for recovering files and folders to the original target. -// -// swagger:model VmwareRecoverFilesOriginalTargetConfig -type VmwareRecoverFilesOriginalTargetConfig struct { - - // Specifies the method to recover files and folders. - // Required: true - // Enum: ["AutoDeploy","UseExistingAgent","UseHypervisorApis"] - RecoverMethod *string `json:"recoverMethod"` - - // Specifies whether to recover files and folders to the original path location. If false, alternatePath must be specified. - // Required: true - RecoverToOriginalPath *bool `json:"recoverToOriginalPath"` - - // Specifies the alternate path location to recover files to. - AlternatePath *string `json:"alternatePath,omitempty"` - - // Specifies the credentials for the target VM. This is mandatory if the recoverMethod is AutoDeploy or UseHypervisorApis. - TargetVMCredentials *Credentials `json:"targetVmCredentials,omitempty"` -} - -// Validate validates this vmware recover files original target config -func (m *VmwareRecoverFilesOriginalTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverMethod(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoverToOriginalPath(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetVMCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareRecoverFilesOriginalTargetConfigTypeRecoverMethodPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AutoDeploy","UseExistingAgent","UseHypervisorApis"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareRecoverFilesOriginalTargetConfigTypeRecoverMethodPropEnum = append(vmwareRecoverFilesOriginalTargetConfigTypeRecoverMethodPropEnum, v) - } -} - -const ( - - // VmwareRecoverFilesOriginalTargetConfigRecoverMethodAutoDeploy captures enum value "AutoDeploy" - VmwareRecoverFilesOriginalTargetConfigRecoverMethodAutoDeploy string = "AutoDeploy" - - // VmwareRecoverFilesOriginalTargetConfigRecoverMethodUseExistingAgent captures enum value "UseExistingAgent" - VmwareRecoverFilesOriginalTargetConfigRecoverMethodUseExistingAgent string = "UseExistingAgent" - - // VmwareRecoverFilesOriginalTargetConfigRecoverMethodUseHypervisorApis captures enum value "UseHypervisorApis" - VmwareRecoverFilesOriginalTargetConfigRecoverMethodUseHypervisorApis string = "UseHypervisorApis" -) - -// prop value enum -func (m *VmwareRecoverFilesOriginalTargetConfig) validateRecoverMethodEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareRecoverFilesOriginalTargetConfigTypeRecoverMethodPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareRecoverFilesOriginalTargetConfig) validateRecoverMethod(formats strfmt.Registry) error { - - if err := validate.Required("recoverMethod", "body", m.RecoverMethod); err != nil { - return err - } - - // value enum - if err := m.validateRecoverMethodEnum("recoverMethod", "body", *m.RecoverMethod); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverFilesOriginalTargetConfig) validateRecoverToOriginalPath(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalPath", "body", m.RecoverToOriginalPath); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverFilesOriginalTargetConfig) validateTargetVMCredentials(formats strfmt.Registry) error { - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if m.TargetVMCredentials != nil { - if err := m.TargetVMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware recover files original target config based on the context it is used -func (m *VmwareRecoverFilesOriginalTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTargetVMCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverFilesOriginalTargetConfig) contextValidateTargetVMCredentials(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetVMCredentials != nil { - - if swag.IsZero(m.TargetVMCredentials) { // not required - return nil - } - - if err := m.TargetVMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetVmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetVmCredentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverFilesOriginalTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverFilesOriginalTargetConfig) UnmarshalBinary(b []byte) error { - var res VmwareRecoverFilesOriginalTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_original_source_disk_params.go b/v2/models/vmware_recover_original_source_disk_params.go deleted file mode 100644 index 2bde3893..00000000 --- a/v2/models/vmware_recover_original_source_disk_params.go +++ /dev/null @@ -1,77 +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" -) - -// VmwareRecoverOriginalSourceDiskParams Specifies disk specific parameters for performing a disk recovery. -// -// swagger:model VmwareRecoverOriginalSourceDiskParams -type VmwareRecoverOriginalSourceDiskParams struct { - - // Specifies the UUID of the source disk being recovered. - // Required: true - DiskUUID *string `json:"diskUuid"` - - // Specifies whether or not to overwrite the original disk. If this is set to true, then datastoreId should not be specified. Otherwise, datastoreId must be specified. - OverwriteOriginalDisk *bool `json:"overwriteOriginalDisk,omitempty"` - - // Specifies the ID of the datastore on which the specified disk will be spun up. - DatastoreID *int64 `json:"datastoreId,omitempty"` -} - -// Validate validates this vmware recover original source disk params -func (m *VmwareRecoverOriginalSourceDiskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskUUID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverOriginalSourceDiskParams) validateDiskUUID(formats strfmt.Registry) error { - - if err := validate.Required("diskUuid", "body", m.DiskUUID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vmware recover original source disk params based on context it is used -func (m *VmwareRecoverOriginalSourceDiskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverOriginalSourceDiskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverOriginalSourceDiskParams) UnmarshalBinary(b []byte) error { - var res VmwareRecoverOriginalSourceDiskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_recover_target_source_disk_params.go b/v2/models/vmware_recover_target_source_disk_params.go deleted file mode 100644 index d7c307e7..00000000 --- a/v2/models/vmware_recover_target_source_disk_params.go +++ /dev/null @@ -1,88 +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" -) - -// VmwareRecoverTargetSourceDiskParams Specifies disk specific parameters for performing a disk recovery. -// -// swagger:model VmwareRecoverTargetSourceDiskParams -type VmwareRecoverTargetSourceDiskParams struct { - - // Specifies the UUID of the source disk being recovered. - // Required: true - DiskUUID *string `json:"diskUuid"` - - // Specifies the ID of the datastore on which the specified disk will be spun up. - // Required: true - DatastoreID *int64 `json:"datastoreId"` -} - -// Validate validates this vmware recover target source disk params -func (m *VmwareRecoverTargetSourceDiskParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDiskUUID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDatastoreID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareRecoverTargetSourceDiskParams) validateDiskUUID(formats strfmt.Registry) error { - - if err := validate.Required("diskUuid", "body", m.DiskUUID); err != nil { - return err - } - - return nil -} - -func (m *VmwareRecoverTargetSourceDiskParams) validateDatastoreID(formats strfmt.Registry) error { - - if err := validate.Required("datastoreId", "body", m.DatastoreID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vmware recover target source disk params based on context it is used -func (m *VmwareRecoverTargetSourceDiskParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareRecoverTargetSourceDiskParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareRecoverTargetSourceDiskParams) UnmarshalBinary(b []byte) error { - var res VmwareRecoverTargetSourceDiskParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_source_registration_params.go b/v2/models/vmware_source_registration_params.go deleted file mode 100644 index 80f08303..00000000 --- a/v2/models/vmware_source_registration_params.go +++ /dev/null @@ -1,268 +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" -) - -// VmwareSourceRegistrationParams Specifies the paramaters to register a VMware source. -// -// swagger:model VmwareSourceRegistrationParams -type VmwareSourceRegistrationParams struct { - - // Specifies the VMware Source type. - // Required: true - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector"] - Type *string `json:"type"` - - // Specifies the parameters to register a VMware vCenter. - VCenterParams *VcenterRegistrationParams `json:"vCenterParams,omitempty"` - - // Specifies the parameters to register a ESXi. - EsxiParams *EsxiRegistrationParams `json:"esxiParams,omitempty"` - - // Specifies the parameters to register a VCD. - VcdParams *VcdRegistrationParams `json:"vcdParams,omitempty"` -} - -// Validate validates this vmware source registration params -func (m *VmwareSourceRegistrationParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVCenterParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEsxiParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVcdParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareSourceRegistrationParamsTypeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareSourceRegistrationParamsTypeTypePropEnum = append(vmwareSourceRegistrationParamsTypeTypePropEnum, v) - } -} - -const ( - - // VmwareSourceRegistrationParamsTypeKVCenter captures enum value "kVCenter" - VmwareSourceRegistrationParamsTypeKVCenter string = "kVCenter" - - // VmwareSourceRegistrationParamsTypeKStandaloneHost captures enum value "kStandaloneHost" - VmwareSourceRegistrationParamsTypeKStandaloneHost string = "kStandaloneHost" - - // VmwareSourceRegistrationParamsTypeKvCloudDirector captures enum value "kvCloudDirector" - VmwareSourceRegistrationParamsTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *VmwareSourceRegistrationParams) validateTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareSourceRegistrationParamsTypeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareSourceRegistrationParams) validateType(formats strfmt.Registry) error { - - if err := validate.Required("type", "body", m.Type); err != nil { - return err - } - - // value enum - if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { - return err - } - - return nil -} - -func (m *VmwareSourceRegistrationParams) validateVCenterParams(formats strfmt.Registry) error { - if swag.IsZero(m.VCenterParams) { // not required - return nil - } - - if m.VCenterParams != nil { - if err := m.VCenterParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterParams") - } - return err - } - } - - return nil -} - -func (m *VmwareSourceRegistrationParams) validateEsxiParams(formats strfmt.Registry) error { - if swag.IsZero(m.EsxiParams) { // not required - return nil - } - - if m.EsxiParams != nil { - if err := m.EsxiParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("esxiParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("esxiParams") - } - return err - } - } - - return nil -} - -func (m *VmwareSourceRegistrationParams) validateVcdParams(formats strfmt.Registry) error { - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if m.VcdParams != nil { - if err := m.VcdParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware source registration params based on the context it is used -func (m *VmwareSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVCenterParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEsxiParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVcdParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareSourceRegistrationParams) contextValidateVCenterParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VCenterParams != nil { - - if swag.IsZero(m.VCenterParams) { // not required - return nil - } - - if err := m.VCenterParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vCenterParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vCenterParams") - } - return err - } - } - - return nil -} - -func (m *VmwareSourceRegistrationParams) contextValidateEsxiParams(ctx context.Context, formats strfmt.Registry) error { - - if m.EsxiParams != nil { - - if swag.IsZero(m.EsxiParams) { // not required - return nil - } - - if err := m.EsxiParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("esxiParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("esxiParams") - } - return err - } - } - - return nil -} - -func (m *VmwareSourceRegistrationParams) contextValidateVcdParams(ctx context.Context, formats strfmt.Registry) error { - - if m.VcdParams != nil { - - if swag.IsZero(m.VcdParams) { // not required - return nil - } - - if err := m.VcdParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vcdParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vcdParams") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareSourceRegistrationParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareSourceRegistrationParams) UnmarshalBinary(b []byte) error { - var res VmwareSourceRegistrationParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_source_type.go b/v2/models/vmware_source_type.go deleted file mode 100644 index f3a26d37..00000000 --- a/v2/models/vmware_source_type.go +++ /dev/null @@ -1,110 +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" -) - -// VmwareSourceType VMware Source Type -// -// # VMware Source Type -// -// swagger:model VmwareSourceType -type VmwareSourceType struct { - - // Specifies the VMware Source types. - // Enum: ["kVCenter","kStandaloneHost","kvCloudDirector"] - VmwareSourceType string `json:"vmwareSourceType,omitempty"` -} - -// Validate validates this vmware source type -func (m *VmwareSourceType) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVmwareSourceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareSourceTypeTypeVmwareSourceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kVCenter","kStandaloneHost","kvCloudDirector"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareSourceTypeTypeVmwareSourceTypePropEnum = append(vmwareSourceTypeTypeVmwareSourceTypePropEnum, v) - } -} - -const ( - - // VmwareSourceTypeVmwareSourceTypeKVCenter captures enum value "kVCenter" - VmwareSourceTypeVmwareSourceTypeKVCenter string = "kVCenter" - - // VmwareSourceTypeVmwareSourceTypeKStandaloneHost captures enum value "kStandaloneHost" - VmwareSourceTypeVmwareSourceTypeKStandaloneHost string = "kStandaloneHost" - - // VmwareSourceTypeVmwareSourceTypeKvCloudDirector captures enum value "kvCloudDirector" - VmwareSourceTypeVmwareSourceTypeKvCloudDirector string = "kvCloudDirector" -) - -// prop value enum -func (m *VmwareSourceType) validateVmwareSourceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareSourceTypeTypeVmwareSourceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareSourceType) validateVmwareSourceType(formats strfmt.Registry) error { - if swag.IsZero(m.VmwareSourceType) { // not required - return nil - } - - // value enum - if err := m.validateVmwareSourceTypeEnum("vmwareSourceType", "body", m.VmwareSourceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this vmware source type based on context it is used -func (m *VmwareSourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareSourceType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareSourceType) UnmarshalBinary(b []byte) error { - var res VmwareSourceType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_sql_credential_params.go b/v2/models/vmware_sql_credential_params.go deleted file mode 100644 index 6056caa6..00000000 --- a/v2/models/vmware_sql_credential_params.go +++ /dev/null @@ -1,55 +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" -) - -// VmwareSQLCredentialParams Credentials to connect to SQL. -// -// Specifies the credentials to connect to SQL. -// -// swagger:model VmwareSQLCredentialParams -type VmwareSQLCredentialParams struct { - - // username for when agent is not installed - Username *string `json:"username,omitempty"` - - // password for when agent is not installed - Password *string `json:"password,omitempty"` -} - -// Validate validates this vmware SQL credential params -func (m *VmwareSQLCredentialParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vmware SQL credential params based on context it is used -func (m *VmwareSQLCredentialParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareSQLCredentialParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareSQLCredentialParams) UnmarshalBinary(b []byte) error { - var res VmwareSQLCredentialParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_standby_object.go b/v2/models/vmware_standby_object.go deleted file mode 100644 index c8fcb2e7..00000000 --- a/v2/models/vmware_standby_object.go +++ /dev/null @@ -1,254 +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" -) - -// VmwareStandbyObject Specifies the VMware specific standby object details. -// -// swagger:model VmwareStandbyObject -type VmwareStandbyObject struct { - StandbyObject - - // Specifies the current status of the standby object protected using continuous data protection policy. - // Enum: ["Init","VMCreationInProgress","VMCreated","LogStreamingInProgress","ReHydrationRequired","ReHydrationInProgress","Steady","Disabled","RestoreComplete"] - CdpStandbyStatus *string `json:"CdpStandbyStatus,omitempty"` - - // Specifies the guest ID(OS) of the standby VM for the corresponding backup object. - // Read Only: true - GuestID *string `json:"guestId,omitempty"` - - // Specifies the MORef of the standby VM created on VMware environments. - StandbyMOref *MOref `json:"standbyMOref,omitempty"` - - // Specifies the time till which the standby object has been hydrated for the corresponding backup object. - StandbyTime *int64 `json:"standbyTime,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareStandbyObject) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 StandbyObject - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.StandbyObject = aO0 - - // AO1 - var dataAO1 struct { - CdpStandbyStatus *string `json:"CdpStandbyStatus,omitempty"` - - GuestID *string `json:"guestId,omitempty"` - - StandbyMOref *MOref `json:"standbyMOref,omitempty"` - - StandbyTime *int64 `json:"standbyTime,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.CdpStandbyStatus = dataAO1.CdpStandbyStatus - - m.GuestID = dataAO1.GuestID - - m.StandbyMOref = dataAO1.StandbyMOref - - m.StandbyTime = dataAO1.StandbyTime - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareStandbyObject) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.StandbyObject) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - CdpStandbyStatus *string `json:"CdpStandbyStatus,omitempty"` - - GuestID *string `json:"guestId,omitempty"` - - StandbyMOref *MOref `json:"standbyMOref,omitempty"` - - StandbyTime *int64 `json:"standbyTime,omitempty"` - } - - dataAO1.CdpStandbyStatus = m.CdpStandbyStatus - - dataAO1.GuestID = m.GuestID - - dataAO1.StandbyMOref = m.StandbyMOref - - dataAO1.StandbyTime = m.StandbyTime - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware standby object -func (m *VmwareStandbyObject) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StandbyObject - if err := m.StandbyObject.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCdpStandbyStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStandbyMOref(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareStandbyObjectTypeCdpStandbyStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Init","VMCreationInProgress","VMCreated","LogStreamingInProgress","ReHydrationRequired","ReHydrationInProgress","Steady","Disabled","RestoreComplete"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareStandbyObjectTypeCdpStandbyStatusPropEnum = append(vmwareStandbyObjectTypeCdpStandbyStatusPropEnum, v) - } -} - -// property enum -func (m *VmwareStandbyObject) validateCdpStandbyStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareStandbyObjectTypeCdpStandbyStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareStandbyObject) validateCdpStandbyStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.CdpStandbyStatus) { // not required - return nil - } - - // value enum - if err := m.validateCdpStandbyStatusEnum("CdpStandbyStatus", "body", *m.CdpStandbyStatus); err != nil { - return err - } - - return nil -} - -func (m *VmwareStandbyObject) validateStandbyMOref(formats strfmt.Registry) error { - - if swag.IsZero(m.StandbyMOref) { // not required - return nil - } - - if m.StandbyMOref != nil { - if err := m.StandbyMOref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyMOref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyMOref") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware standby object based on the context it is used -func (m *VmwareStandbyObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with StandbyObject - if err := m.StandbyObject.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGuestID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStandbyMOref(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareStandbyObject) contextValidateGuestID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "guestId", "body", m.GuestID); err != nil { - return err - } - - return nil -} - -func (m *VmwareStandbyObject) contextValidateStandbyMOref(ctx context.Context, formats strfmt.Registry) error { - - if m.StandbyMOref != nil { - - if swag.IsZero(m.StandbyMOref) { // not required - return nil - } - - if err := m.StandbyMOref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("standbyMOref") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("standbyMOref") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareStandbyObject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareStandbyObject) UnmarshalBinary(b []byte) error { - var res VmwareStandbyObject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_mount_volume.go b/v2/models/vmware_target_params_for_mount_volume.go deleted file mode 100644 index e459567d..00000000 --- a/v2/models/vmware_target_params_for_mount_volume.go +++ /dev/null @@ -1,305 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VmwareTargetParamsForMountVolume VMware Target Params. -// -// Specifies the parameters for a VMware mount volume target. -// -// swagger:model VmwareTargetParamsForMountVolume -type VmwareTargetParamsForMountVolume struct { - - // Specifies whether to mount to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - MountToOriginalTarget *bool `json:"mountToOriginalTarget"` - - // Specifies whether to perform a read-only mount. Default is false. - ReadOnlyMount *bool `json:"readOnlyMount,omitempty"` - - // Specifies the names of volumes that need to be mounted. If this is not specified then all volumes that are part of the source VM will be mounted on the target VM. - VolumeNames []string `json:"volumeNames"` - - // Specifies the mapping of original volumes and mounted volumes - // Read Only: true - MountedVolumeMapping []*MountedVolumeMapping `json:"mountedVolumeMapping"` - - // Specifies the configuration for mounting to a new target. - NewTargetConfig *VMwareMountVolumesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for mounting to the original target. - OriginalTargetConfig *VMwareMountVolumesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for mount volume -func (m *VmwareTargetParamsForMountVolume) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMountToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMountedVolumeMapping(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForMountVolume) validateMountToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("mountToOriginalTarget", "body", m.MountToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) validateMountedVolumeMapping(formats strfmt.Registry) error { - if swag.IsZero(m.MountedVolumeMapping) { // not required - return nil - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - continue - } - - if m.MountedVolumeMapping[i] != nil { - if err := m.MountedVolumeMapping[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for mount volume based on the context it is used -func (m *VmwareTargetParamsForMountVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMountedVolumeMapping(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForMountVolume) contextValidateMountedVolumeMapping(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "mountedVolumeMapping", "body", []*MountedVolumeMapping(m.MountedVolumeMapping)); err != nil { - return err - } - - for i := 0; i < len(m.MountedVolumeMapping); i++ { - - if m.MountedVolumeMapping[i] != nil { - - if swag.IsZero(m.MountedVolumeMapping[i]) { // not required - return nil - } - - if err := m.MountedVolumeMapping[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountedVolumeMapping" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForMountVolume) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForMountVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForMountVolume) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForMountVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_recover_disk.go b/v2/models/vmware_target_params_for_recover_disk.go deleted file mode 100644 index d26ec56f..00000000 --- a/v2/models/vmware_target_params_for_recover_disk.go +++ /dev/null @@ -1,222 +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" -) - -// VmwareTargetParamsForRecoverDisk VMware Target Params. -// -// Specifies the parameters for a VMware recovery target. -// -// swagger:model VmwareTargetParamsForRecoverDisk -type VmwareTargetParamsForRecoverDisk struct { - - // Specifies the configuration for restoring a disk to the original VM from which the snapshot was taken. - OriginalSourceConfig *VmwareRecoverDisksOriginalSourceConfig `json:"originalSourceConfig,omitempty"` - - // Specifies the configuration for restoring disks to a different VM than the one from which the snapshot was taken. - TargetSourceConfig *VmwareRecoverDisksTargetSourceConfig `json:"targetSourceConfig,omitempty"` - - // Specifies whether or not to power off VMs before performing the recovery. - PowerOffVms *bool `json:"powerOffVms,omitempty"` - - // Specifies whether or not to power on VMs after performing the recovery. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether or not to continue performing the recovery in the event that an error is encountered. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for recover disk -func (m *VmwareTargetParamsForRecoverDisk) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) validateTargetSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.TargetSourceConfig) { // not required - return nil - } - - if m.TargetSourceConfig != nil { - if err := m.TargetSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for recover disk based on the context it is used -func (m *VmwareTargetParamsForRecoverDisk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) contextValidateTargetSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.TargetSourceConfig != nil { - - if swag.IsZero(m.TargetSourceConfig) { // not required - return nil - } - - if err := m.TargetSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverDisk) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverDisk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverDisk) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForRecoverDisk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_recover_file_and_folder.go b/v2/models/vmware_target_params_for_recover_file_and_folder.go deleted file mode 100644 index eaf7b3ed..00000000 --- a/v2/models/vmware_target_params_for_recover_file_and_folder.go +++ /dev/null @@ -1,240 +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" -) - -// VmwareTargetParamsForRecoverFileAndFolder VMware Target Params for Recover File And Folder -// -// Specifies the parameters for a VMware recovery target. -// -// swagger:model VmwareTargetParamsForRecoverFileAndFolder -type VmwareTargetParamsForRecoverFileAndFolder struct { - - // Specifies whether to recover to the original target. If true, originalTargetConfig must be specified. If false, newTargetConfig must be specified. - // Required: true - RecoverToOriginalTarget *bool `json:"recoverToOriginalTarget"` - - // Specifies whether to overwrite the existing files. Default is true. - OverwriteExisting *bool `json:"overwriteExisting,omitempty"` - - // Specifies whether to preserve original attributes. Default is true. - PreserveAttributes *bool `json:"preserveAttributes,omitempty"` - - // Specifies whether to continue recovering other files if one of files or folders failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies the configuration for recovering to a new target. - NewTargetConfig *VmwareRecoverFilesNewTargetConfig `json:"newTargetConfig,omitempty"` - - // Specifies the configuration for recovering to the original target. - OriginalTargetConfig *VmwareRecoverFilesOriginalTargetConfig `json:"originalTargetConfig,omitempty"` - - // Specifies VLAN Params associated with the recovered files and folders. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for recover file and folder -func (m *VmwareTargetParamsForRecoverFileAndFolder) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToOriginalTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) validateRecoverToOriginalTarget(formats strfmt.Registry) error { - - if err := validate.Required("recoverToOriginalTarget", "body", m.RecoverToOriginalTarget); err != nil { - return err - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) validateNewTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if m.NewTargetConfig != nil { - if err := m.NewTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) validateOriginalTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if m.OriginalTargetConfig != nil { - if err := m.OriginalTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for recover file and folder based on the context it is used -func (m *VmwareTargetParamsForRecoverFileAndFolder) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) contextValidateNewTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewTargetConfig != nil { - - if swag.IsZero(m.NewTargetConfig) { // not required - return nil - } - - if err := m.NewTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) contextValidateOriginalTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalTargetConfig != nil { - - if swag.IsZero(m.OriginalTargetConfig) { // not required - return nil - } - - if err := m.OriginalTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverFileAndFolder) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverFileAndFolder) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverFileAndFolder) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForRecoverFileAndFolder - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_recover_v_app.go b/v2/models/vmware_target_params_for_recover_v_app.go deleted file mode 100644 index 625e1a11..00000000 --- a/v2/models/vmware_target_params_for_recover_v_app.go +++ /dev/null @@ -1,390 +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" -) - -// VmwareTargetParamsForRecoverVApp VMware Target Params. -// -// Specifies the parameters for a VMware recovery target. -// -// swagger:model VmwareTargetParamsForRecoverVApp -type VmwareTargetParamsForRecoverVApp struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies type of Recovery Process to be used. InstantRecovery/CopyRecovery etc... Default value is InstantRecovery. - // Enum: ["InstantRecovery","CopyRecovery"] - RecoveryProcessType string `json:"recoveryProcessType,omitempty"` - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies whether to enable SAN transport for copy recovery or not - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Specifies the Virtual Disk Provisioning Policies for Vmware VM - // Enum: ["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"] - DiskProvisionType *string `json:"diskProvisionType,omitempty"` - - // If this field is set to true and SAN transport recovery fails, then recovery will fallback to use NBDSSL transport. This field only applies if 'leverageSanTransport' is set to true. - EnableNBDSSLFallback *bool `json:"enableNBDSSLFallback,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *VmwareVAppRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the vApps that are recovered. If not specified, the original names of the vApps are preserved. - RenameRecoveredVAppsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVAppsParams,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for recover v app -func (m *VmwareTargetParamsForRecoverVApp) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskProvisionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVAppsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareTargetParamsForRecoverVAppTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InstantRecovery","CopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVAppTypeRecoveryProcessTypePropEnum = append(vmwareTargetParamsForRecoverVAppTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVAppRecoveryProcessTypeInstantRecovery captures enum value "InstantRecovery" - VmwareTargetParamsForRecoverVAppRecoveryProcessTypeInstantRecovery string = "InstantRecovery" - - // VmwareTargetParamsForRecoverVAppRecoveryProcessTypeCopyRecovery captures enum value "CopyRecovery" - VmwareTargetParamsForRecoverVAppRecoveryProcessTypeCopyRecovery string = "CopyRecovery" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVApp) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVAppTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -var vmwareTargetParamsForRecoverVAppTypeDiskProvisionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVAppTypeDiskProvisionTypePropEnum = append(vmwareTargetParamsForRecoverVAppTypeDiskProvisionTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThickLazyZeroed captures enum value "kThickLazyZeroed" - VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThickLazyZeroed string = "kThickLazyZeroed" - - // VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThickEagerZero captures enum value "kThickEagerZero" - VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThickEagerZero string = "kThickEagerZero" - - // VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThin captures enum value "kThin" - VmwareTargetParamsForRecoverVAppDiskProvisionTypeKThin string = "kThin" - - // VmwareTargetParamsForRecoverVAppDiskProvisionTypeKBackedUpDiskType captures enum value "kBackedUpDiskType" - VmwareTargetParamsForRecoverVAppDiskProvisionTypeKBackedUpDiskType string = "kBackedUpDiskType" - - // VmwareTargetParamsForRecoverVAppDiskProvisionTypeOriginalBackUpDisk captures enum value "originalBackUpDisk" - VmwareTargetParamsForRecoverVAppDiskProvisionTypeOriginalBackUpDisk string = "originalBackUpDisk" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVApp) validateDiskProvisionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVAppTypeDiskProvisionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateDiskProvisionType(formats strfmt.Registry) error { - if swag.IsZero(m.DiskProvisionType) { // not required - return nil - } - - // value enum - if err := m.validateDiskProvisionTypeEnum("diskProvisionType", "body", *m.DiskProvisionType); err != nil { - return err - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateRenameRecoveredVAppsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVAppsParams) { // not required - return nil - } - - if m.RenameRecoveredVAppsParams != nil { - if err := m.RenameRecoveredVAppsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVAppsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVAppsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for recover v app based on the context it is used -func (m *VmwareTargetParamsForRecoverVApp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVAppsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) contextValidateRenameRecoveredVAppsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVAppsParams != nil { - - if swag.IsZero(m.RenameRecoveredVAppsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVAppsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVAppsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVAppsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVApp) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVApp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVApp) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForRecoverVApp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_recover_v_app_template.go b/v2/models/vmware_target_params_for_recover_v_app_template.go deleted file mode 100644 index 8e7b4a60..00000000 --- a/v2/models/vmware_target_params_for_recover_v_app_template.go +++ /dev/null @@ -1,387 +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" -) - -// VmwareTargetParamsForRecoverVAppTemplate VMware Target Params. -// -// Specifies the parameters for a VMware recovery target when recovering a vApp Template. -// -// swagger:model VmwareTargetParamsForRecoverVAppTemplate -type VmwareTargetParamsForRecoverVAppTemplate struct { - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies type of Recovery Process to be used. InstantRecovery/CopyRecovery etc... Default value is InstantRecovery. - // Enum: ["InstantRecovery","CopyRecovery"] - RecoveryProcessType string `json:"recoveryProcessType,omitempty"` - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies whether to enable SAN transport for copy recovery or not - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Specifies the Virtual Disk Provisioning Policies for Vmware VM - // Enum: ["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"] - DiskProvisionType *string `json:"diskProvisionType,omitempty"` - - // If this field is set to true and SAN transport recovery fails, then recovery will fallback to use NBDSSL transport. This field only applies if 'leverageSanTransport' is set to true. - EnableNBDSSLFallback *bool `json:"enableNBDSSLFallback,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vApp templates will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *VmwareVAppTemplateRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the vApps templates that are recovered. If not specified, the original names of the vApp templates are preserved. - RenameRecoveredVAppTemplateParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVAppTemplateParams,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for recover v app template -func (m *VmwareTargetParamsForRecoverVAppTemplate) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskProvisionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVAppTemplateParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareTargetParamsForRecoverVAppTemplateTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InstantRecovery","CopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVAppTemplateTypeRecoveryProcessTypePropEnum = append(vmwareTargetParamsForRecoverVAppTemplateTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVAppTemplateRecoveryProcessTypeInstantRecovery captures enum value "InstantRecovery" - VmwareTargetParamsForRecoverVAppTemplateRecoveryProcessTypeInstantRecovery string = "InstantRecovery" - - // VmwareTargetParamsForRecoverVAppTemplateRecoveryProcessTypeCopyRecovery captures enum value "CopyRecovery" - VmwareTargetParamsForRecoverVAppTemplateRecoveryProcessTypeCopyRecovery string = "CopyRecovery" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVAppTemplateTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -var vmwareTargetParamsForRecoverVAppTemplateTypeDiskProvisionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVAppTemplateTypeDiskProvisionTypePropEnum = append(vmwareTargetParamsForRecoverVAppTemplateTypeDiskProvisionTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThickLazyZeroed captures enum value "kThickLazyZeroed" - VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThickLazyZeroed string = "kThickLazyZeroed" - - // VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThickEagerZero captures enum value "kThickEagerZero" - VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThickEagerZero string = "kThickEagerZero" - - // VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThin captures enum value "kThin" - VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKThin string = "kThin" - - // VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKBackedUpDiskType captures enum value "kBackedUpDiskType" - VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeKBackedUpDiskType string = "kBackedUpDiskType" - - // VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeOriginalBackUpDisk captures enum value "originalBackUpDisk" - VmwareTargetParamsForRecoverVAppTemplateDiskProvisionTypeOriginalBackUpDisk string = "originalBackUpDisk" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateDiskProvisionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVAppTemplateTypeDiskProvisionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateDiskProvisionType(formats strfmt.Registry) error { - if swag.IsZero(m.DiskProvisionType) { // not required - return nil - } - - // value enum - if err := m.validateDiskProvisionTypeEnum("diskProvisionType", "body", *m.DiskProvisionType); err != nil { - return err - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateRenameRecoveredVAppTemplateParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVAppTemplateParams) { // not required - return nil - } - - if m.RenameRecoveredVAppTemplateParams != nil { - if err := m.RenameRecoveredVAppTemplateParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVAppTemplateParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVAppTemplateParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for recover v app template based on the context it is used -func (m *VmwareTargetParamsForRecoverVAppTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVAppTemplateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) contextValidateRenameRecoveredVAppTemplateParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVAppTemplateParams != nil { - - if swag.IsZero(m.RenameRecoveredVAppTemplateParams) { // not required - return nil - } - - if err := m.RenameRecoveredVAppTemplateParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVAppTemplateParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVAppTemplateParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVAppTemplate) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVAppTemplate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVAppTemplate) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForRecoverVAppTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_target_params_for_recover_vm.go b/v2/models/vmware_target_params_for_recover_vm.go deleted file mode 100644 index f29a24cf..00000000 --- a/v2/models/vmware_target_params_for_recover_vm.go +++ /dev/null @@ -1,348 +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" -) - -// VmwareTargetParamsForRecoverVM VMware Target Params. -// -// Specifies the parameters for a VMware recovery target. -// -// swagger:model VmwareTargetParamsForRecoverVM -type VmwareTargetParamsForRecoverVM struct { - - // Specifies whether to power on vms after recovery. If not specified, or false, recovered vms will be in powered off state. - PowerOnVms *bool `json:"powerOnVms,omitempty"` - - // Specifies whether to continue recovering other vms if one of vms failed to recover. Default value is false. - ContinueOnError *bool `json:"continueOnError,omitempty"` - - // Specifies type of Recovery Process to be used. InstantRecovery/CopyRecovery etc... Default value is InstantRecovery. - // Enum: ["InstantRecovery","CopyRecovery"] - RecoveryProcessType string `json:"recoveryProcessType,omitempty"` - - // Specifies whether to attempt differential restore. - AttemptDifferentialRestore *bool `json:"attemptDifferentialRestore,omitempty"` - - // Specifies whether to overwrite the VM at the target location. This is a data destructive operation and if this is selected, the original VM may no longer be accessible. This option is only applicable if renameRecoveredVmParams is null and powerOffAndRenameExistingVm is false. This option is not supported for vApp or vApp template recoveries. Default value is false. - OverwriteExistingVM *bool `json:"overwriteExistingVm,omitempty"` - - // Specifies whether to power off and mark the VM at the target location as deprecated. As an example, will be renamed to deprecated::, and a new VM with the name in place of the now deprecated VM. Both deprecated:: and will exist on the primary, but the corresponding protection job will only backup on its next run. Only applicable if renameRecoveredVmParams is null and overwriteExistingVm is false. This option is not supported for vApp or vApp template recoveries. Default value is false. - PowerOffAndRenameExistingVM *bool `json:"powerOffAndRenameExistingVm,omitempty"` - - // Specifies whether this is a multistage restore which is used for migration/hot-standby purpose. - IsMultiStageRestore *bool `json:"isMultiStageRestore,omitempty"` - - // Specifies whether to enable SAN transport for copy recovery or not - LeverageSanTransport *bool `json:"leverageSanTransport,omitempty"` - - // Specifies the Virtual Disk Provisioning Policies for Vmware VM - // Enum: ["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"] - DiskProvisionType *string `json:"diskProvisionType,omitempty"` - - // If this field is set to true and SAN transport recovery fails, then recovery will fallback to use NBDSSL transport. This field only applies if 'leverageSanTransport' is set to true. - EnableNBDSSLFallback *bool `json:"enableNBDSSLFallback,omitempty"` - - // Specifies the recovery target configuration if recovery has to be done to a different location which is different from original source or to original Source with different configuration. If not specified, then the recovery of the vms will be performed to original location with all configuration parameters retained. - RecoveryTargetConfig *VmwareVMRecoveryTargetConfig `json:"recoveryTargetConfig,omitempty"` - - // Specifies params to rename the VMs that are recovered. If not specified, the original names of the VMs are preserved. - RenameRecoveredVmsParams *RecoveredOrClonedVmsRenameConfig `json:"renameRecoveredVmsParams,omitempty"` - - // Specifies VLAN Params associated with the recovered. If this is not specified, then the VLAN settings will be automatically selected from one of the below options: a. If VLANs are configured on Cohesity, then the VLAN host/VIP will be automatically based on the client's (e.g. ESXI host) IP address. b. If VLANs are not configured on Cohesity, then the partition hostname or VIPs will be used for Recovery. - VlanConfig *RecoveryVlanConfig `json:"vlanConfig,omitempty"` -} - -// Validate validates this vmware target params for recover VM -func (m *VmwareTargetParamsForRecoverVM) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoveryProcessType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDiskProvisionType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRecoveryTargetConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRenameRecoveredVmsParams(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVlanConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var vmwareTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["InstantRecovery","CopyRecovery"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum = append(vmwareTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVMRecoveryProcessTypeInstantRecovery captures enum value "InstantRecovery" - VmwareTargetParamsForRecoverVMRecoveryProcessTypeInstantRecovery string = "InstantRecovery" - - // VmwareTargetParamsForRecoverVMRecoveryProcessTypeCopyRecovery captures enum value "CopyRecovery" - VmwareTargetParamsForRecoverVMRecoveryProcessTypeCopyRecovery string = "CopyRecovery" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVM) validateRecoveryProcessTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVmTypeRecoveryProcessTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) validateRecoveryProcessType(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryProcessType) { // not required - return nil - } - - // value enum - if err := m.validateRecoveryProcessTypeEnum("recoveryProcessType", "body", m.RecoveryProcessType); err != nil { - return err - } - - return nil -} - -var vmwareTargetParamsForRecoverVmTypeDiskProvisionTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kThickLazyZeroed","kThickEagerZero","kThin","kBackedUpDiskType","originalBackUpDisk"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - vmwareTargetParamsForRecoverVmTypeDiskProvisionTypePropEnum = append(vmwareTargetParamsForRecoverVmTypeDiskProvisionTypePropEnum, v) - } -} - -const ( - - // VmwareTargetParamsForRecoverVMDiskProvisionTypeKThickLazyZeroed captures enum value "kThickLazyZeroed" - VmwareTargetParamsForRecoverVMDiskProvisionTypeKThickLazyZeroed string = "kThickLazyZeroed" - - // VmwareTargetParamsForRecoverVMDiskProvisionTypeKThickEagerZero captures enum value "kThickEagerZero" - VmwareTargetParamsForRecoverVMDiskProvisionTypeKThickEagerZero string = "kThickEagerZero" - - // VmwareTargetParamsForRecoverVMDiskProvisionTypeKThin captures enum value "kThin" - VmwareTargetParamsForRecoverVMDiskProvisionTypeKThin string = "kThin" - - // VmwareTargetParamsForRecoverVMDiskProvisionTypeKBackedUpDiskType captures enum value "kBackedUpDiskType" - VmwareTargetParamsForRecoverVMDiskProvisionTypeKBackedUpDiskType string = "kBackedUpDiskType" - - // VmwareTargetParamsForRecoverVMDiskProvisionTypeOriginalBackUpDisk captures enum value "originalBackUpDisk" - VmwareTargetParamsForRecoverVMDiskProvisionTypeOriginalBackUpDisk string = "originalBackUpDisk" -) - -// prop value enum -func (m *VmwareTargetParamsForRecoverVM) validateDiskProvisionTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, vmwareTargetParamsForRecoverVmTypeDiskProvisionTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) validateDiskProvisionType(formats strfmt.Registry) error { - if swag.IsZero(m.DiskProvisionType) { // not required - return nil - } - - // value enum - if err := m.validateDiskProvisionTypeEnum("diskProvisionType", "body", *m.DiskProvisionType); err != nil { - return err - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) validateRecoveryTargetConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if m.RecoveryTargetConfig != nil { - if err := m.RecoveryTargetConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) validateRenameRecoveredVmsParams(formats strfmt.Registry) error { - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if m.RenameRecoveredVmsParams != nil { - if err := m.RenameRecoveredVmsParams.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) validateVlanConfig(formats strfmt.Registry) error { - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if m.VlanConfig != nil { - if err := m.VlanConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware target params for recover VM based on the context it is used -func (m *VmwareTargetParamsForRecoverVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRecoveryTargetConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRenameRecoveredVmsParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVlanConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) contextValidateRecoveryTargetConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.RecoveryTargetConfig != nil { - - if swag.IsZero(m.RecoveryTargetConfig) { // not required - return nil - } - - if err := m.RecoveryTargetConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("recoveryTargetConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("recoveryTargetConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) contextValidateRenameRecoveredVmsParams(ctx context.Context, formats strfmt.Registry) error { - - if m.RenameRecoveredVmsParams != nil { - - if swag.IsZero(m.RenameRecoveredVmsParams) { // not required - return nil - } - - if err := m.RenameRecoveredVmsParams.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("renameRecoveredVmsParams") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("renameRecoveredVmsParams") - } - return err - } - } - - return nil -} - -func (m *VmwareTargetParamsForRecoverVM) contextValidateVlanConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.VlanConfig != nil { - - if swag.IsZero(m.VlanConfig) { // not required - return nil - } - - if err := m.VlanConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vlanConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vlanConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVM) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareTargetParamsForRecoverVM) UnmarshalBinary(b []byte) error { - var res VmwareTargetParamsForRecoverVM - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_throttling_params.go b/v2/models/vmware_throttling_params.go deleted file mode 100644 index 09ffe4d2..00000000 --- a/v2/models/vmware_throttling_params.go +++ /dev/null @@ -1,61 +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" -) - -// VmwareThrottlingParams Throttling Params. -// -// Specifies throttling params. -// -// swagger:model VmwareThrottlingParams -type VmwareThrottlingParams struct { - - // If the latency of a datastore is above this value, then a new backup task that uses the datastore won't be started. - NewTaskLatencyThresholdMsecs *int64 `json:"newTaskLatencyThresholdMsecs,omitempty"` - - // If the latency of a datastore is above this value, then an existing backup task that uses the datastore will start getting throttled. - ActiveTaskLatencyThresholdMsecs *int64 `json:"activeTaskLatencyThresholdMsecs,omitempty"` - - // If this value is > 0 and the number of streams concurrently active on a datastore is equal to it, then any further requests to access the datastore would be denied until the number of active streams reduces. This applies for all the datastores in the specified host. - MaxConcurrentStreams *int32 `json:"maxConcurrentStreams,omitempty"` - - // Specifies the number of VMs of a vCenter that can be backed up concurrently. - MaxConcurrentBackups *int32 `json:"maxConcurrentBackups,omitempty"` -} - -// Validate validates this vmware throttling params -func (m *VmwareThrottlingParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this vmware throttling params based on context it is used -func (m *VmwareThrottlingParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareThrottlingParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareThrottlingParams) UnmarshalBinary(b []byte) error { - var res VmwareThrottlingParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_v_app_recovery_target_config.go b/v2/models/vmware_v_app_recovery_target_config.go deleted file mode 100644 index 80f07144..00000000 --- a/v2/models/vmware_v_app_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// VmwareVAppRecoveryTargetConfig Vmware VMs Recovery Target Config. -// -// Specifies the target object parameters to recover VMware vApps. -// -// swagger:model VmwareVAppRecoveryTargetConfig -type VmwareVAppRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverVmwareVAppNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverVmwareVAppOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this vmware v app recovery target config -func (m *VmwareVAppRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVAppRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *VmwareVAppRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVAppRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware v app recovery target config based on the context it is used -func (m *VmwareVAppRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVAppRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVAppRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareVAppRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareVAppRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res VmwareVAppRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_v_app_template_recovery_target_config.go b/v2/models/vmware_v_app_template_recovery_target_config.go deleted file mode 100644 index 052aeb35..00000000 --- a/v2/models/vmware_v_app_template_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// VmwareVAppTemplateRecoveryTargetConfig Vmware vApp Template Recovery Target Config. -// -// Specifies the target object parameters to recover VMware vApp templates. -// -// swagger:model VmwareVAppTemplateRecoveryTargetConfig -type VmwareVAppTemplateRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the vApp templates will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverVmwareVAppTemplateNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if vApp templates are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverVmwareVAppOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this vmware v app template recovery target config -func (m *VmwareVAppTemplateRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVAppTemplateRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *VmwareVAppTemplateRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVAppTemplateRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware v app template recovery target config based on the context it is used -func (m *VmwareVAppTemplateRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVAppTemplateRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVAppTemplateRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareVAppTemplateRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareVAppTemplateRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res VmwareVAppTemplateRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/vmware_vm_recovery_target_config.go b/v2/models/vmware_vm_recovery_target_config.go deleted file mode 100644 index ee7a421b..00000000 --- a/v2/models/vmware_vm_recovery_target_config.go +++ /dev/null @@ -1,180 +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" -) - -// VmwareVMRecoveryTargetConfig Vmware VMs Recovery Target Config. -// -// Specifies the target object parameters to recover VMware vms. -// -// swagger:model VmwareVmRecoveryTargetConfig -type VmwareVMRecoveryTargetConfig struct { - - // Specifies the parameter whether the recovery should be performed to a new or an existing Source Target. - // Required: true - RecoverToNewSource *bool `json:"recoverToNewSource"` - - // Specifies the new destination Source configuration parameters where the VMs will be recovered. This is mandatory if recoverToNewSource is set to true. - NewSourceConfig *RecoverVmwareVMNewSourceConfig `json:"newSourceConfig,omitempty"` - - // Specifies the Source configuration if VM's are being recovered to Original Source. If not specified, all the configuration parameters will be retained. - OriginalSourceConfig *RecoverVmwareVMOriginalSourceConfig `json:"originalSourceConfig,omitempty"` -} - -// Validate validates this vmware Vm recovery target config -func (m *VmwareVMRecoveryTargetConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRecoverToNewSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNewSourceConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOriginalSourceConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVMRecoveryTargetConfig) validateRecoverToNewSource(formats strfmt.Registry) error { - - if err := validate.Required("recoverToNewSource", "body", m.RecoverToNewSource); err != nil { - return err - } - - return nil -} - -func (m *VmwareVMRecoveryTargetConfig) validateNewSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if m.NewSourceConfig != nil { - if err := m.NewSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVMRecoveryTargetConfig) validateOriginalSourceConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if m.OriginalSourceConfig != nil { - if err := m.OriginalSourceConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this vmware Vm recovery target config based on the context it is used -func (m *VmwareVMRecoveryTargetConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNewSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOriginalSourceConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VmwareVMRecoveryTargetConfig) contextValidateNewSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.NewSourceConfig != nil { - - if swag.IsZero(m.NewSourceConfig) { // not required - return nil - } - - if err := m.NewSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("newSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("newSourceConfig") - } - return err - } - } - - return nil -} - -func (m *VmwareVMRecoveryTargetConfig) contextValidateOriginalSourceConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OriginalSourceConfig != nil { - - if swag.IsZero(m.OriginalSourceConfig) { // not required - return nil - } - - if err := m.OriginalSourceConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("originalSourceConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("originalSourceConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareVMRecoveryTargetConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareVMRecoveryTargetConfig) UnmarshalBinary(b []byte) error { - var res VmwareVMRecoveryTargetConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/volume_info.go b/v2/models/volume_info.go deleted file mode 100644 index 3817e94a..00000000 --- a/v2/models/volume_info.go +++ /dev/null @@ -1,185 +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" -) - -// VolumeInfo Specifies info of logical volume (filesystem). -// -// swagger:model VolumeInfo -type VolumeInfo struct { - - // Specifies the volume name. - Name *string `json:"name,omitempty"` - - // Specifies if this volume is supported. - IsSupported *bool `json:"isSupported,omitempty"` - - // Specifies the volume type. - // Enum: ["SimpleVolume","LVM","LDM"] - VolumeType *string `json:"volumeType,omitempty"` - - // Specifies the filesystem type. - FilesystemType *string `json:"filesystemType,omitempty"` - - // Specifies the filesystem uuid. - FilesystemUUID *string `json:"filesystemUuid,omitempty"` - - // Specifies the volume guid. - VolumeGUID *string `json:"volumeGuid,omitempty"` - - // Specifies volume size in bytes. - VolumeSizeInBytes *int64 `json:"volumeSizeInBytes,omitempty"` - - // Specifies if this is NTFS dedupe volume - IsDedupe *bool `json:"isDedupe,omitempty"` - - // Specifies the logical volume info. This fields is for 'LVM' and 'LDM' volume type only. - LogicalVolumeInfo *LogicalVolumeInfo `json:"logicalVolumeInfo,omitempty"` -} - -// Validate validates this volume info -func (m *VolumeInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumeType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLogicalVolumeInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var volumeInfoTypeVolumeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SimpleVolume","LVM","LDM"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - volumeInfoTypeVolumeTypePropEnum = append(volumeInfoTypeVolumeTypePropEnum, v) - } -} - -const ( - - // VolumeInfoVolumeTypeSimpleVolume captures enum value "SimpleVolume" - VolumeInfoVolumeTypeSimpleVolume string = "SimpleVolume" - - // VolumeInfoVolumeTypeLVM captures enum value "LVM" - VolumeInfoVolumeTypeLVM string = "LVM" - - // VolumeInfoVolumeTypeLDM captures enum value "LDM" - VolumeInfoVolumeTypeLDM string = "LDM" -) - -// prop value enum -func (m *VolumeInfo) validateVolumeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, volumeInfoTypeVolumeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *VolumeInfo) validateVolumeType(formats strfmt.Registry) error { - if swag.IsZero(m.VolumeType) { // not required - return nil - } - - // value enum - if err := m.validateVolumeTypeEnum("volumeType", "body", *m.VolumeType); err != nil { - return err - } - - return nil -} - -func (m *VolumeInfo) validateLogicalVolumeInfo(formats strfmt.Registry) error { - if swag.IsZero(m.LogicalVolumeInfo) { // not required - return nil - } - - if m.LogicalVolumeInfo != nil { - if err := m.LogicalVolumeInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolumeInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this volume info based on the context it is used -func (m *VolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLogicalVolumeInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeInfo) contextValidateLogicalVolumeInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.LogicalVolumeInfo != nil { - - if swag.IsZero(m.LogicalVolumeInfo) { // not required - return nil - } - - if err := m.LogicalVolumeInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolumeInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolumeInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *VolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VolumeInfo) UnmarshalBinary(b []byte) error { - var res VolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/web_socket_request_status.go b/v2/models/web_socket_request_status.go deleted file mode 100644 index 1808a691..00000000 --- a/v2/models/web_socket_request_status.go +++ /dev/null @@ -1,110 +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" -) - -// WebSocketRequestStatus WebSocket Request Status -// -// Describes the status of a websocket request, equivalent of HTTP codes. -// -// swagger:model WebSocketRequestStatus -type WebSocketRequestStatus struct { - - // Specifies the Request status - // Enum: ["Running","Complete","Error"] - Enum string `json:"enum,omitempty"` -} - -// Validate validates this web socket request status -func (m *WebSocketRequestStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnum(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var webSocketRequestStatusTypeEnumPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Running","Complete","Error"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - webSocketRequestStatusTypeEnumPropEnum = append(webSocketRequestStatusTypeEnumPropEnum, v) - } -} - -const ( - - // WebSocketRequestStatusEnumRunning captures enum value "Running" - WebSocketRequestStatusEnumRunning string = "Running" - - // WebSocketRequestStatusEnumComplete captures enum value "Complete" - WebSocketRequestStatusEnumComplete string = "Complete" - - // WebSocketRequestStatusEnumError captures enum value "Error" - WebSocketRequestStatusEnumError string = "Error" -) - -// prop value enum -func (m *WebSocketRequestStatus) validateEnumEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, webSocketRequestStatusTypeEnumPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WebSocketRequestStatus) validateEnum(formats strfmt.Registry) error { - if swag.IsZero(m.Enum) { // not required - return nil - } - - // value enum - if err := m.validateEnumEnum("enum", "body", m.Enum); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this web socket request status based on context it is used -func (m *WebSocketRequestStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WebSocketRequestStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WebSocketRequestStatus) UnmarshalBinary(b []byte) error { - var res WebSocketRequestStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/week_days.go b/v2/models/week_days.go deleted file mode 100644 index 77cf763e..00000000 --- a/v2/models/week_days.go +++ /dev/null @@ -1,122 +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" -) - -// WeekDays Week Days type. -// -// Week Days type. -// -// swagger:model WeekDays -type WeekDays struct { - - // Specifies Week Days type. - // Enum: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] - WeekDays string `json:"weekDays,omitempty"` -} - -// Validate validates this week days -func (m *WeekDays) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWeekDays(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var weekDaysTypeWeekDaysPropEnum []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 { - weekDaysTypeWeekDaysPropEnum = append(weekDaysTypeWeekDaysPropEnum, v) - } -} - -const ( - - // WeekDaysWeekDaysSunday captures enum value "Sunday" - WeekDaysWeekDaysSunday string = "Sunday" - - // WeekDaysWeekDaysMonday captures enum value "Monday" - WeekDaysWeekDaysMonday string = "Monday" - - // WeekDaysWeekDaysTuesday captures enum value "Tuesday" - WeekDaysWeekDaysTuesday string = "Tuesday" - - // WeekDaysWeekDaysWednesday captures enum value "Wednesday" - WeekDaysWeekDaysWednesday string = "Wednesday" - - // WeekDaysWeekDaysThursday captures enum value "Thursday" - WeekDaysWeekDaysThursday string = "Thursday" - - // WeekDaysWeekDaysFriday captures enum value "Friday" - WeekDaysWeekDaysFriday string = "Friday" - - // WeekDaysWeekDaysSaturday captures enum value "Saturday" - WeekDaysWeekDaysSaturday string = "Saturday" -) - -// prop value enum -func (m *WeekDays) validateWeekDaysEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, weekDaysTypeWeekDaysPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WeekDays) validateWeekDays(formats strfmt.Registry) error { - if swag.IsZero(m.WeekDays) { // not required - return nil - } - - // value enum - if err := m.validateWeekDaysEnum("weekDays", "body", m.WeekDays); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this week days based on context it is used -func (m *WeekDays) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WeekDays) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WeekDays) UnmarshalBinary(b []byte) error { - var res WeekDays - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/week_schedule.go b/v2/models/week_schedule.go deleted file mode 100644 index 092f7801..00000000 --- a/v2/models/week_schedule.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" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// WeekSchedule Week Schedule -// -// Specifies settings that define a schedule for a Protection Group runs to start on certain days of week. -// -// swagger:model WeekSchedule -type WeekSchedule struct { - - // Specifies a list of days of the week when to start Protection Group Runs.
Example: To run a Protection Group on every Monday and Tuesday, set the schedule with following values:
unit: 'Weeks'
dayOfWeek: ['Monday','Tuesday'] - // Required: true - DayOfWeek []string `json:"dayOfWeek"` -} - -// Validate validates this week schedule -func (m *WeekSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayOfWeek(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var weekScheduleDayOfWeekItemsEnum []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 { - weekScheduleDayOfWeekItemsEnum = append(weekScheduleDayOfWeekItemsEnum, v) - } -} - -func (m *WeekSchedule) validateDayOfWeekItemsEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, weekScheduleDayOfWeekItemsEnum, true); err != nil { - return err - } - return nil -} - -func (m *WeekSchedule) validateDayOfWeek(formats strfmt.Registry) error { - - if err := validate.Required("dayOfWeek", "body", m.DayOfWeek); err != nil { - return err - } - - for i := 0; i < len(m.DayOfWeek); i++ { - - // value enum - if err := m.validateDayOfWeekItemsEnum("dayOfWeek"+"."+strconv.Itoa(i), "body", m.DayOfWeek[i]); err != nil { - return err - } - - } - - return nil -} - -// ContextValidate validates this week schedule based on context it is used -func (m *WeekSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WeekSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WeekSchedule) UnmarshalBinary(b []byte) error { - var res WeekSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/workflow_intervention_spec.go b/v2/models/workflow_intervention_spec.go deleted file mode 100644 index 7c999b67..00000000 --- a/v2/models/workflow_intervention_spec.go +++ /dev/null @@ -1,156 +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" -) - -// WorkflowInterventionSpec Specifies the intervention for each workflow type. -// -// swagger:model WorkflowInterventionSpec -type WorkflowInterventionSpec struct { - - // Specifies the workflow type for which an intervention would be needed when maintenance mode begins - // Required: true - // Enum: ["BackupRun"] - WorkflowType *string `json:"workflowType"` - - // Specifies the intervention type for ongoing tasks. - // Required: true - // Enum: ["NoIntervention","Cancel"] - Intervention *string `json:"intervention"` -} - -// Validate validates this workflow intervention spec -func (m *WorkflowInterventionSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWorkflowType(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIntervention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var workflowInterventionSpecTypeWorkflowTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BackupRun"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - workflowInterventionSpecTypeWorkflowTypePropEnum = append(workflowInterventionSpecTypeWorkflowTypePropEnum, v) - } -} - -const ( - - // WorkflowInterventionSpecWorkflowTypeBackupRun captures enum value "BackupRun" - WorkflowInterventionSpecWorkflowTypeBackupRun string = "BackupRun" -) - -// prop value enum -func (m *WorkflowInterventionSpec) validateWorkflowTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, workflowInterventionSpecTypeWorkflowTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WorkflowInterventionSpec) validateWorkflowType(formats strfmt.Registry) error { - - if err := validate.Required("workflowType", "body", m.WorkflowType); err != nil { - return err - } - - // value enum - if err := m.validateWorkflowTypeEnum("workflowType", "body", *m.WorkflowType); err != nil { - return err - } - - return nil -} - -var workflowInterventionSpecTypeInterventionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["NoIntervention","Cancel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - workflowInterventionSpecTypeInterventionPropEnum = append(workflowInterventionSpecTypeInterventionPropEnum, v) - } -} - -const ( - - // WorkflowInterventionSpecInterventionNoIntervention captures enum value "NoIntervention" - WorkflowInterventionSpecInterventionNoIntervention string = "NoIntervention" - - // WorkflowInterventionSpecInterventionCancel captures enum value "Cancel" - WorkflowInterventionSpecInterventionCancel string = "Cancel" -) - -// prop value enum -func (m *WorkflowInterventionSpec) validateInterventionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, workflowInterventionSpecTypeInterventionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WorkflowInterventionSpec) validateIntervention(formats strfmt.Registry) error { - - if err := validate.Required("intervention", "body", m.Intervention); err != nil { - return err - } - - // value enum - if err := m.validateInterventionEnum("intervention", "body", *m.Intervention); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this workflow intervention spec based on context it is used -func (m *WorkflowInterventionSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WorkflowInterventionSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WorkflowInterventionSpec) UnmarshalBinary(b []byte) error { - var res WorkflowInterventionSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/workload_stats_schema.go b/v2/models/workload_stats_schema.go deleted file mode 100644 index 635ddb73..00000000 --- a/v2/models/workload_stats_schema.go +++ /dev/null @@ -1,178 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// WorkloadStatsSchema Specifies the workload types. -// -// swagger:model WorkloadStatsSchema -type WorkloadStatsSchema struct { - WorkloadSubType - - // Specifies the Workload Sub-Types. - SubTypes []*WorkloadSubType `json:"subTypes"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *WorkloadStatsSchema) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 WorkloadSubType - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.WorkloadSubType = aO0 - - // AO1 - var dataAO1 struct { - SubTypes []*WorkloadSubType `json:"subTypes"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.SubTypes = dataAO1.SubTypes - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m WorkloadStatsSchema) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.WorkloadSubType) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - SubTypes []*WorkloadSubType `json:"subTypes"` - } - - dataAO1.SubTypes = m.SubTypes - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this workload stats schema -func (m *WorkloadStatsSchema) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with WorkloadSubType - if err := m.WorkloadSubType.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubTypes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadStatsSchema) validateSubTypes(formats strfmt.Registry) error { - - if swag.IsZero(m.SubTypes) { // not required - return nil - } - - for i := 0; i < len(m.SubTypes); i++ { - if swag.IsZero(m.SubTypes[i]) { // not required - continue - } - - if m.SubTypes[i] != nil { - if err := m.SubTypes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subTypes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subTypes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this workload stats schema based on the context it is used -func (m *WorkloadStatsSchema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with WorkloadSubType - if err := m.WorkloadSubType.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSubTypes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadStatsSchema) contextValidateSubTypes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SubTypes); i++ { - - if m.SubTypes[i] != nil { - - if swag.IsZero(m.SubTypes[i]) { // not required - return nil - } - - if err := m.SubTypes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subTypes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subTypes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *WorkloadStatsSchema) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WorkloadStatsSchema) UnmarshalBinary(b []byte) error { - var res WorkloadStatsSchema - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/workload_stats_summary.go b/v2/models/workload_stats_summary.go deleted file mode 100644 index f876103a..00000000 --- a/v2/models/workload_stats_summary.go +++ /dev/null @@ -1,121 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// WorkloadStatsSummary Specifies the Workload Stats Summary Schema. -// -// swagger:model WorkloadStatsSummary -type WorkloadStatsSummary struct { - - // Specifies the Workload types. - Workloads []*WorkloadStatsSchema `json:"workloads"` -} - -// Validate validates this workload stats summary -func (m *WorkloadStatsSummary) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWorkloads(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadStatsSummary) validateWorkloads(formats strfmt.Registry) error { - if swag.IsZero(m.Workloads) { // not required - return nil - } - - for i := 0; i < len(m.Workloads); i++ { - if swag.IsZero(m.Workloads[i]) { // not required - continue - } - - if m.Workloads[i] != nil { - if err := m.Workloads[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workloads" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workloads" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this workload stats summary based on the context it is used -func (m *WorkloadStatsSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWorkloads(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadStatsSummary) contextValidateWorkloads(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Workloads); i++ { - - if m.Workloads[i] != nil { - - if swag.IsZero(m.Workloads[i]) { // not required - return nil - } - - if err := m.Workloads[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("workloads" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("workloads" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *WorkloadStatsSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WorkloadStatsSummary) UnmarshalBinary(b []byte) error { - var res WorkloadStatsSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/workload_sub_type.go b/v2/models/workload_sub_type.go deleted file mode 100644 index 61f6a5ea..00000000 --- a/v2/models/workload_sub_type.go +++ /dev/null @@ -1,189 +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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// WorkloadSubType Specifies the Workload Sub-Type. -// -// swagger:model WorkloadSubType -type WorkloadSubType struct { - EntityIdentifier - - // Specifies the Schema Name of Workload. - Schema *string `json:"schema,omitempty"` - - // Specifies the entities part of Workload schema. - Entities []*EntityIdentifier `json:"entities"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *WorkloadSubType) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 EntityIdentifier - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.EntityIdentifier = aO0 - - // AO1 - var dataAO1 struct { - Schema *string `json:"schema,omitempty"` - - Entities []*EntityIdentifier `json:"entities"` - } - if err := swag.ReadJSON(raw, &dataAO1); err != nil { - return err - } - - m.Schema = dataAO1.Schema - - m.Entities = dataAO1.Entities - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m WorkloadSubType) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.EntityIdentifier) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - var dataAO1 struct { - Schema *string `json:"schema,omitempty"` - - Entities []*EntityIdentifier `json:"entities"` - } - - dataAO1.Schema = m.Schema - - dataAO1.Entities = m.Entities - - jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) - if errAO1 != nil { - return nil, errAO1 - } - _parts = append(_parts, jsonDataAO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this workload sub type -func (m *WorkloadSubType) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EntityIdentifier - if err := m.EntityIdentifier.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEntities(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadSubType) validateEntities(formats strfmt.Registry) error { - - if swag.IsZero(m.Entities) { // not required - return nil - } - - for i := 0; i < len(m.Entities); i++ { - if swag.IsZero(m.Entities[i]) { // not required - continue - } - - if m.Entities[i] != nil { - if err := m.Entities[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this workload sub type based on the context it is used -func (m *WorkloadSubType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EntityIdentifier - if err := m.EntityIdentifier.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateEntities(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *WorkloadSubType) contextValidateEntities(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Entities); i++ { - - if m.Entities[i] != nil { - - if swag.IsZero(m.Entities[i]) { // not required - return nil - } - - if err := m.Entities[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entities" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("entities" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *WorkloadSubType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WorkloadSubType) UnmarshalBinary(b []byte) error { - var res WorkloadSubType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/workload_type.go b/v2/models/workload_type.go deleted file mode 100644 index 8c417814..00000000 --- a/v2/models/workload_type.go +++ /dev/null @@ -1,131 +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" -) - -// WorkloadType Workload Types. -// -// Specifies the workload types on the cohesity cluster. -// -// swagger:model WorkloadType -type WorkloadType struct { - - // Specifies the workload types - // Enum: ["Backup","Archive","Restore","Replication","Indexing","SmartFiles","Apps","Background","Other","Unknown"] - Value string `json:"value,omitempty"` -} - -// Validate validates this workload type -func (m *WorkloadType) 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 workloadTypeTypeValuePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Backup","Archive","Restore","Replication","Indexing","SmartFiles","Apps","Background","Other","Unknown"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - workloadTypeTypeValuePropEnum = append(workloadTypeTypeValuePropEnum, v) - } -} - -const ( - - // WorkloadTypeValueBackup captures enum value "Backup" - WorkloadTypeValueBackup string = "Backup" - - // WorkloadTypeValueArchive captures enum value "Archive" - WorkloadTypeValueArchive string = "Archive" - - // WorkloadTypeValueRestore captures enum value "Restore" - WorkloadTypeValueRestore string = "Restore" - - // WorkloadTypeValueReplication captures enum value "Replication" - WorkloadTypeValueReplication string = "Replication" - - // WorkloadTypeValueIndexing captures enum value "Indexing" - WorkloadTypeValueIndexing string = "Indexing" - - // WorkloadTypeValueSmartFiles captures enum value "SmartFiles" - WorkloadTypeValueSmartFiles string = "SmartFiles" - - // WorkloadTypeValueApps captures enum value "Apps" - WorkloadTypeValueApps string = "Apps" - - // WorkloadTypeValueBackground captures enum value "Background" - WorkloadTypeValueBackground string = "Background" - - // WorkloadTypeValueOther captures enum value "Other" - WorkloadTypeValueOther string = "Other" - - // WorkloadTypeValueUnknown captures enum value "Unknown" - WorkloadTypeValueUnknown string = "Unknown" -) - -// prop value enum -func (m *WorkloadType) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, workloadTypeTypeValuePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WorkloadType) 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 workload type based on context it is used -func (m *WorkloadType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WorkloadType) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WorkloadType) UnmarshalBinary(b []byte) error { - var res WorkloadType - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/worm_properties.go b/v2/models/worm_properties.go deleted file mode 100644 index 5d61e86d..00000000 --- a/v2/models/worm_properties.go +++ /dev/null @@ -1,58 +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" -) - -// WormProperties WORM Archival data. -// -// Specifies the WORM related properties for this archive. -// -// swagger:model WormProperties -type WormProperties struct { - - // Specifies whether this archive run is WORM compliant - IsArchiveWormCompliant *bool `json:"isArchiveWormCompliant,omitempty"` - - // Specifies reason of archive not being worm compliant. - WormNonComplianceReason *string `json:"wormNonComplianceReason,omitempty"` - - // Specifies the time at which the WORM protection expires. - WormExpiryTimeUsecs *int64 `json:"wormExpiryTimeUsecs,omitempty"` -} - -// Validate validates this worm properties -func (m *WormProperties) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this worm properties based on context it is used -func (m *WormProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WormProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WormProperties) UnmarshalBinary(b []byte) error { - var res WormProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/worm_retention.go b/v2/models/worm_retention.go deleted file mode 100644 index adadbd76..00000000 --- a/v2/models/worm_retention.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" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// WormRetention Worm Retention type. -// -// Worm Retention type. -// -// swagger:model WormRetention -type WormRetention struct { - - // Specifies Worm Retention type. - // Enum: ["Compliance","Administrative"] - WormRetention string `json:"wormRetention,omitempty"` -} - -// Validate validates this worm retention -func (m *WormRetention) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWormRetention(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var wormRetentionTypeWormRetentionPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["Compliance","Administrative"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - wormRetentionTypeWormRetentionPropEnum = append(wormRetentionTypeWormRetentionPropEnum, v) - } -} - -const ( - - // WormRetentionWormRetentionCompliance captures enum value "Compliance" - WormRetentionWormRetentionCompliance string = "Compliance" - - // WormRetentionWormRetentionAdministrative captures enum value "Administrative" - WormRetentionWormRetentionAdministrative string = "Administrative" -) - -// prop value enum -func (m *WormRetention) validateWormRetentionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, wormRetentionTypeWormRetentionPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *WormRetention) validateWormRetention(formats strfmt.Registry) error { - if swag.IsZero(m.WormRetention) { // not required - return nil - } - - // value enum - if err := m.validateWormRetentionEnum("wormRetention", "body", m.WormRetention); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this worm retention based on context it is used -func (m *WormRetention) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WormRetention) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WormRetention) UnmarshalBinary(b []byte) error { - var res WormRetention - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/worm_specific_target_params.go b/v2/models/worm_specific_target_params.go deleted file mode 100644 index 59f5a408..00000000 --- a/v2/models/worm_specific_target_params.go +++ /dev/null @@ -1,64 +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" -) - -// WormSpecificTargetParams Azure External Target Request WORM Params for archival purpose type. -// -// Specifies the parameters which specific to WORM and needs to passed when WORM is enabled for archival External Targets. -// -// swagger:model WormSpecificTargetParams -type WormSpecificTargetParams struct { - - // Specifies the resource group of worm enabled external target. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Specifies the subscription id of worm enabled external target. - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // Specifies the application id of worm enabled external target. - ApplicationID *string `json:"applicationId,omitempty"` - - // Specifies the encrypted application key of worm enabled external target. - EncryptedApplicationKey *string `json:"encryptedApplicationKey,omitempty"` - - // Specifies the tenant id of worm enabled external target. - TenantID *string `json:"tenantId,omitempty"` -} - -// Validate validates this worm specific target params -func (m *WormSpecificTargetParams) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this worm specific target params based on context it is used -func (m *WormSpecificTargetParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *WormSpecificTargetParams) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *WormSpecificTargetParams) UnmarshalBinary(b []byte) error { - var res WormSpecificTargetParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/models/year_schedule.go b/v2/models/year_schedule.go deleted file mode 100644 index 4ad2cd9b..00000000 --- a/v2/models/year_schedule.go +++ /dev/null @@ -1,109 +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" -) - -// YearSchedule Year Schedule -// -// Specifies settings that define a schedule for a Protection Group to run on specific year and specific day of that year. -// -// swagger:model YearSchedule -type YearSchedule struct { - - // Specifies the day of the Year (such as 'First' or 'Last') in a Yearly Schedule.
This field is used to define the day in the year to start the Protection Group Run.
Example: if 'dayOfYear' is set to 'First', a backup is performed on the first day of every year.
Example: if 'dayOfYear' is set to 'Last', a backup is performed on the last day of every year. - // Required: true - // Enum: ["First","Last"] - DayOfYear *string `json:"dayOfYear"` -} - -// Validate validates this year schedule -func (m *YearSchedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDayOfYear(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var yearScheduleTypeDayOfYearPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["First","Last"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - yearScheduleTypeDayOfYearPropEnum = append(yearScheduleTypeDayOfYearPropEnum, v) - } -} - -const ( - - // YearScheduleDayOfYearFirst captures enum value "First" - YearScheduleDayOfYearFirst string = "First" - - // YearScheduleDayOfYearLast captures enum value "Last" - YearScheduleDayOfYearLast string = "Last" -) - -// prop value enum -func (m *YearSchedule) validateDayOfYearEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, yearScheduleTypeDayOfYearPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *YearSchedule) validateDayOfYear(formats strfmt.Registry) error { - - if err := validate.Required("dayOfYear", "body", m.DayOfYear); err != nil { - return err - } - - // value enum - if err := m.validateDayOfYearEnum("dayOfYear", "body", *m.DayOfYear); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this year schedule based on context it is used -func (m *YearSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *YearSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *YearSchedule) UnmarshalBinary(b []byte) error { - var res YearSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -}